Skip to content

Conversation

@Frangus90
Copy link

Summary

This PR adds support for Claude Code CLI's AskUserQuestion tool 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 AskUserQuestion tool, which allows Claude to ask users clarifying questions during task execution.

Features:

  • Purple-themed question UI cards that match the extension's design language
  • Support for single-select (radio) and multi-select (checkbox) questions
  • "Other" option with text input for custom responses
  • Proper state management for pending question requests
  • Response format compatible with Claude Code CLI protocol

Technical Details:

  • AskUserQuestion comes through as can_use_tool with tool_name: 'AskUserQuestion'
  • Questions are in request.input.questions
  • Response uses behavior: 'allow' with updatedInput.answers

Files Modified:

  • src/extension.ts - Backend handling and response flow
  • src/script.ts - Question UI rendering and interaction handlers
  • src/ui-styles.ts - Purple-themed CSS styles

Plan Mode Auto-Deny Fix

Fixed an issue where Claude would call EnterPlanMode tool independently, causing the extension to enter plan mode even when the user had the "Plan First" toggle disabled.

Solution:

  • Added _planModeEnabled state tracking synced with UI toggle
  • Auto-deny EnterPlanMode requests when toggle is OFF
  • Allows users to maintain control over when planning mode is used

Files Modified:

  • src/extension.ts - Added state tracking and auto-deny logic

Testing

  • Verified plan mode no longer auto-activates when toggle is OFF
  • Verified AskUserQuestion UI displays correctly with questions
  • Verified single-select and multi-select options work
  • Verified "Other" text input option works
  • Verified responses are sent back to Claude correctly
  • Verified question cards update to "answered" state after submission

- Implemented functionality to discover project commands from the .claude/commands/ directory.
- Added UI elements for displaying and interacting with discovered commands.
- Enhanced styles for collapsible command sections.
- Created markdown files for various project commands to guide users.
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.

1 participant