Repository navigation
ask questions not in thinking + ux improvements - #291456
Merged
Justin Chen (justschen) merged 3 commits intoJan 29, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR improves the UX for the chat question carousel feature by preventing the ask questions tool from appearing in thinking sections, automatically unchecking default selections when users enter freeform text, and allowing users to submit answers using the Enter key in text areas.
Changes:
- Modified tool invocation filtering to exclude
copilot_askQuestionsfrom being pinned to thinking parts - Added keyboard event handler to submit on Enter key (without Shift) in freeform text areas
- Added input event handler to automatically uncheck radio buttons/checkboxes when text is entered in freeform areas
- Updated answer collection logic to exclude selected values when freeform text is present
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/vs/workbench/contrib/chat/browser/widget/chatListRenderer.ts | Adds filtering logic to prevent ask questions tool invocations from being pinned to thinking sections |
| src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatQuestionCarouselPart.ts | Implements Enter key submission, automatic unchecking of defaults when freeform text is entered, and updates value collection to exclude selected values when freeform text exists |
Comment on lines
+515
to
+531
| this._inputBoxes.add(dom.addDisposableListener(freeformTextarea, dom.EventType.KEY_DOWN, (e: KeyboardEvent) => { | ||
| const event = new StandardKeyboardEvent(e); | ||
| if (event.keyCode === KeyCode.Enter && !event.shiftKey && freeformTextarea.value.trim()) { | ||
| e.preventDefault(); | ||
| e.stopPropagation(); | ||
| this.handleNext(); | ||
| } | ||
| })); | ||
|
|
||
| // uncheck radio when there is text | ||
| this._inputBoxes.add(dom.addDisposableListener(freeformTextarea, dom.EventType.INPUT, () => { | ||
| if (freeformTextarea.value.trim()) { | ||
| for (const radio of radioInputs) { | ||
| radio.checked = false; | ||
| } | ||
| } | ||
| })); |
There was a problem hiding this comment.
The Enter key handler and radio unchecking logic are duplicated between renderSingleSelect and renderMultiSelect methods. Consider extracting this common logic into a reusable helper method to improve maintainability and reduce code duplication.
Dmitriy Vasyura (dmitrivMS)
previously approved these changes
Jan 29, 2026
…chatQuestionCarouselPart.ts Co-authored-by: Copilot <[email protected]>
Don Jayamanne (DonJayamanne)
approved these changes
Jan 29, 2026
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
cc. Elijah King (@eli-w-king) Karthik Nadig (@karthiknadig)