Repository navigation
Include rich Markdown selections in chat context - #340717
Merged
Henning Dieterichs (hediet) merged 2 commits intoOct 9, 2026
Merged
Conversation
Reuse custom-editor navigation for per-panel source ranges, handle navigation readiness and removal, and cancel superseded context updates. Fixes #326726 Co-authored-by: Copilot <[email protected]>
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Refresh cancellation can leave existing widgets stale, and unthrottled editor events can flood context providers.
2 open findings
What changed in this PR
Adds rich Markdown selections to implicit chat context across the workbench and Agents window.
Changes:
- Tracks custom-editor navigation and source selections.
- Cancels superseded context updates and preserves provider context.
- Adds regression tests and contributor documentation.
| File | Description |
|---|---|
customEditorInput.ts |
Emits navigation lifecycle changes. |
chatImplicitContext.ts |
Adds custom-editor selection context. |
chatImplicitContext.test.ts |
Tests selection and lifecycle behavior. |
CONTRIBUTING.md |
Documents Markdown chat context. |
🧠 Review effort: Balanced
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Giuseppe Cianci (Giuspepe)
previously approved these changes
Oct 9, 2026
Debounce custom editor events together and refresh existing widgets when registration supersedes pending work. Cover both review findings with regression tests. Co-authored-by: Copilot <[email protected]>
Christof Marti (chrmarti)
approved these changes
Oct 9, 2026
Henning Dieterichs (hediet)
deleted the
hediet/custom-editor-chat-selection
branch
October 9, 2026 13:18
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Use the custom-text-editor navigation infrastructure from #340695 to include rich Markdown selections as implicit chat context, including in the Agents window.
Validation: 27 targeted tests passed, including 8 new selection-context tests. Full client typecheck, changed-file lint, module layering, and commit hygiene passed.
Closes #326726