Add AskUserQuestion Support & Fix Plan Mode Auto-Entry #167
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.
Summary
This PR adds support for Claude Code CLI's
AskUserQuestiontool and fixes an issue where Claude would enter plan mode even when the "Plan First" toggle was disabled.Changes
AskUserQuestion Tool Support
Added full support for the
AskUserQuestiontool, which allows Claude to ask users clarifying questions during task execution.Features:
Technical Details:
AskUserQuestioncomes through ascan_use_toolwithtool_name: 'AskUserQuestion'request.input.questionsbehavior: 'allow'withupdatedInput.answersFiles Modified:
src/extension.ts- Backend handling and response flowsrc/script.ts- Question UI rendering and interaction handlerssrc/ui-styles.ts- Purple-themed CSS stylesPlan Mode Auto-Deny Fix
Fixed an issue where Claude would call
EnterPlanModetool independently, causing the extension to enter plan mode even when the user had the "Plan First" toggle disabled.Solution:
_planModeEnabledstate tracking synced with UI toggleEnterPlanModerequests when toggle is OFFFiles Modified:
src/extension.ts- Added state tracking and auto-deny logicTesting
AskUserQuestionUI displays correctly with questions