* feat: syntax highlighting terminal output with Shiki
Refactored CommandExecution.tsx to:
- Implement CodeBlock component for terminal display
- Use Shiki for syntax highlighting of shell commands and terminal output
Signed-off-by: Eric Wheeler <roo-code@z.ewheeler.org>
* ui: present same compressed command output that the model will receive
Avoids rendering problems and performance regressions:
- Compresses output using BaseTerminal.compressTerminalOutput
- Eliminates need for Virtuoso by limiting output size
Ensures command output shown in UI matches the compressed format provided to the model:
- Applies same BaseTerminal.compressTerminalOutput processing
- Uses configured terminalOutputLineLimit for consistency
Signed-off-by: Eric Wheeler <roo-code@z.ewheeler.org>
* test: update CommandExecution tests to use CodeBlock mock
- Replace virtuoso mock with CodeBlock mock to fix shiki import error
- Update CodeBlock mock to properly handle source prop
- Add proper empty output test case verification
- Keep original test values and structure
Signed-off-by: Eric Wheeler <roo-code@z.ewheeler.org>
---------
Signed-off-by: Eric Wheeler <roo-code@z.ewheeler.org>
Co-authored-by: Eric Wheeler <roo-code@z.ewheeler.org>
* Enable model switching on API failure
Bug: Cannot change model selection after API error due to UI state #1657
UI Bug: OpenRouter ran out of credits prevents user from switching models #1206
* Remove irrelevant code
- Add enableMcpServerCreation setting to control whether MCP server creation is allowed
- Add UI toggle in settings view for this feature
- Update system prompt to conditionally include MCP server creation documentation
- Add tests for new functionality
Replace Create React App with Vite build system
Add ESLint configuration and improve TypeScript types
Create VSCode UI component mocks for better testing
Update test files with proper async handling
Add Tailwind CSS integration
Fix accessibility by adding ARIA roles
Implements automatic approval for mode switching operations when enabled, following
existing auto-approval patterns in the codebase.
Implementation:
- Added `alwaysAllowModeSwitch` to state management
- Updated `isAutoApproved` function in ChatView to handle mode switch requests
- Added mode switch option to AutoApproveMenu with appropriate handler
- Integrated with existing auto-approval flow
Tests:
- Added three test cases in ChatView.auto-approve.test.tsx:
1. Verifies mode switch auto-approval when enabled
2. Verifies no auto-approval when mode switch setting is disabled
3. Verifies no auto-approval when global auto-approval is disabled
The implementation follows existing patterns for other auto-approve features
(read, write, browser, etc.) to maintain consistency in the codebase.
- Rename customPrompts to customModePrompts for mode-specific prompts
- Add new customSupportPrompts type for support action prompts
- Update types to be more specific (CustomModePrompts and CustomSupportPrompts)
- Fix all related tests and component implementations