Skip to content

ask questions not in thinking + ux improvements - #291456

Merged
Justin Chen (justschen) merged 3 commits into
microsoft:mainfrom
justschen:justin/pignite
Jan 29, 2026
Merged

Justin Chen (justschen) merged 3 commits into
microsoft:mainfrom
justschen:justin/pignite

Conversation

@justschen

@justschen Justin Chen (justschen) commented Jan 29, 2026 •

Copy link
Copy Markdown
Collaborator
  1. makes sure the entire tool invocation is not in thinking
  2. when there is text in freeform area, unchecks and doesn't send defaults
  3. can hit enter on text area to continue

cc. Elijah King (@eli-w-king) Karthik Nadig (@karthiknadig)

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_askQuestions from 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;
}
}
}));

Copilot AI Jan 29, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot generated this review using guidance from repository custom instructions.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants