Skip to content

Conversation

@ScDor
Copy link

@ScDor ScDor commented Jan 31, 2026

This PR enhances the ask_followup_question tool to support multiple questions and optional multiple-choice responses.

Key changes:

  • Updated ask_followup_question schema to accept a questions array.
  • Support for Question objects with text and options.
  • New UI for handling multiple questions (all at once or one by one).
  • Added user settings to toggle one-by-one question display.
  • Improved streaming logic to show the first question while accumulating others.
  • Fully migrated to native tool calling protocol.
  • Added comprehensive unit and UI tests.

Important

Enhance ask_followup_question to support multiple questions and multiple-choice responses, with updated schema, UI, and tests.

  • Behavior:
    • ask_followup_question now supports multiple questions and multiple-choice options.
    • Updated ask_followup_question schema in ask_followup_question.ts to accept questions array.
    • New UI component MultiQuestionHandler in ChatRow.tsx to handle multiple questions.
    • Added user setting showQuestionsOneByOne in UISettings.tsx to toggle question display mode.
    • Improved streaming logic in AskFollowupQuestionTool.ts to show first question while accumulating others.
  • Tests:
    • Added tests for MultiQuestionHandler in MultiQuestionHandler.spec.tsx.
    • Updated tests in askFollowupQuestionTool.spec.ts to cover new functionality.
  • Misc:
    • Added showQuestionsOneByOne setting to ExtensionStateContext.tsx and SettingsView.tsx.
    • Updated translations in chat.json for new question handling.

This description was created by Ellipsis for d3028c3. You can customize this summary. It will automatically update as commits are pushed.

ScDor added 4 commits January 16, 2026 18:30
- Separate navigation logic from submission logic in MultiQuestionHandler
- Add dedicated handleFinish function to send combined responses
- Prevent immediate sending when navigating between questions
- Add comprehensive tests to verify the UX fix
- All existing functionality preserved, tests passing
@ScDor ScDor requested review from cte, jr and mrubens as code owners January 31, 2026 11:48
@dosubot dosubot bot added size:XL This PR changes 500-999 lines, ignoring generated files. Enhancement New feature or request labels Jan 31, 2026
@roomote
Copy link
Contributor

roomote bot commented Jan 31, 2026

Rooviewer Clock   See task on Roo Cloud

Reviewed the multi-question enhancement for ask_followup_question. Found 2 issues that need attention:

  • Missing translation keys for showQuestionsOneByOne UI setting in settings.json
  • Type mismatch between FollowUpData interface (string[]) and actual runtime data (Array<string | { text: string; options?: string[] }>)

Mention @roomote in a comment to request specific changes to this pull request or fix all unresolved issues.

Comment on lines +107 to +122
<SearchableSetting
settingId="ui-show-questions-one-by-one"
section="ui"
label={t("settings:ui.showQuestionsOneByOne.label")}>
<div className="flex flex-col gap-1">
<VSCodeCheckbox
checked={showQuestionsOneByOne}
onChange={(e: any) => handleShowQuestionsOneByOneChange(e.target.checked)}
data-testid="show-questions-one-by-one-checkbox">
<span className="font-medium">{t("settings:ui.showQuestionsOneByOne.label")}</span>
</VSCodeCheckbox>
<div className="text-vscode-descriptionForeground text-sm ml-5 mt-1">
{t("settings:ui.showQuestionsOneByOne.description")}
</div>
</div>
</SearchableSetting>
Copy link
Contributor

Choose a reason for hiding this comment

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

Missing translation keys. The settings:ui.showQuestionsOneByOne.label and settings:ui.showQuestionsOneByOne.description keys are referenced here but not defined in webview-ui/src/i18n/locales/en/settings.json. The UI section in that file only has collapseThinking and requireCtrlEnterToSend. This will cause the raw translation keys to be displayed in the UI instead of human-readable text.

Fix it with Roo Code or mention @roomote and request a fix.

Comment on lines +11 to +12
/** Array of questions being asked by the LLM */
questions?: string[]
Copy link
Contributor

Choose a reason for hiding this comment

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

Type mismatch between this interface and the actual data sent by AskFollowupQuestionTool. This defines questions as string[], but the tool sends Array<string | { text: string; options?: string[] }> to support multiple-choice questions. The Zod schema below has the same issue. This inconsistency means:

  1. TypeScript types don't match runtime data
  2. The Zod schema would fail validation if used on actual data with object questions
  3. ChatRow.tsx uses safeJsonParse<FollowUpData> with an incorrect type assertion

Consider updating the type to: questions?: Array<string | { text: string; options?: string[] }>

Fix it with Roo Code or mention @roomote and request a fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Enhancement New feature or request size:XL This PR changes 500-999 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant