Skip to content

Conversation

@digitarald
Copy link
Contributor

Summary

Enhances the AskQuestions tool with free text input mode and improved user experience for custom answers.

Changes

Free Text Input Mode

  • Questions can now omit options to show a simple input box for free text responses
  • Updated schema: options minItems changed from 2 to 0, no longer required
  • Added validation: questions with exactly 1 option are rejected (need 0 for free text or 2+ for choice)

Improved Custom Answer UX

  • Added dynamic "Use X" option that appears when typing non-matching text
  • Renamed isFreeText to isCustomTextOption and isOtherOption for clarity
  • "Other..." option now has edit icon prefix for visual consistency

Model Description Updates

  • Clearer guidance on when to use vs when NOT to use the tool
  • Expanded options limit from 4 to 6 per question
  • Better phrasing for multiSelect usage

Other Improvements

  • Invocation messages now include question headers for better context
  • Extracted IQuestionAnswer and AskQuestionResult types for cleaner code
  • Fixed edge case handling when no selection is made

Copilot AI review requested due to automatic review settings January 22, 2026 21:16
@vs-code-engineering vs-code-engineering bot added this to the January 2026 milestone Jan 22, 2026
Copy link
Contributor

Copilot AI left a comment

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 enhances the AskQuestions tool with a free text input mode and improved custom answer UX. Questions can now omit the options array entirely to show a simple input box for free text responses, and the custom answer experience has been improved with a dynamic "Use X" option that appears when typing non-matching text.

Changes:

  • Added free text input mode when questions have no options
  • Improved custom answer UX with dynamic "Use {typed text}" option and visual refinements
  • Updated schema to allow 0-6 options per question (previously required 2-4)
  • Enhanced model description with clearer guidance on when to use/not use the tool
  • Better invocation messages that include question headers for context

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
src/extension/tools/vscode-node/askQuestionsTool.ts Implements free text mode with _askFreeTextQuestion(), adds dynamic custom text option in QuickPick, refactors type definitions, improves validation and default selection logic
package.json Updates schema to make options field optional with 0-6 items, expands model description with clearer usage guidelines and "When NOT to use" section
Comments suppressed due to low confidence (1)

src/extension/tools/vscode-node/askQuestionsTool.ts:391

  • When users select "Other..." and provide an empty string in the input box, it should be treated as skipped rather than accepted as valid free text. Currently, empty strings are accepted as valid answers (line 388), which differs from the free text input mode behavior (lines 200-205) where empty strings result in a skipped question.
						} else {
							resolve({
								selected: otherSelections,
								freeText: freeTextInput,
								skipped: false
							});
						}

@digitarald digitarald enabled auto-merge January 22, 2026 21:29
@digitarald digitarald changed the title feat(askQuestions): add free text mode and improve UX Ask questions tool: add free text mode and improve UX/prompt Jan 22, 2026
@digitarald digitarald added this pull request to the merge queue Jan 22, 2026
Merged via the queue into main with commit 7256edd Jan 22, 2026
25 checks passed
@digitarald digitarald deleted the ask-questions-tool-improvements branch January 22, 2026 22:27
eleanorjboyd pushed a commit to eleanorjboyd/vscode-copilot-chat that referenced this pull request Jan 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants