- Updated shell-quote from v1.8.2 to v1.8.3 in webview-ui
- Added shell-quote v1.8.3 to backend dependencies
- Updated shared extract-command-pattern module to use shell-quote for proper parsing
- Added @types/shell-quote for TypeScript support
- Ensures consistent command pattern extraction across frontend and backend
- Use extractCommandPattern function to extract base command patterns
- Add proper error handling for providerRef.deref()
- Use internationalization for user-facing messages
- Extract addCommandToWhitelist helper function to reduce duplication
- Add comments explaining why we can't use the shared askApproval function
- Add third button option to command approval dialog
- Implement streamlined whitelisting workflow that adds command to whitelist and executes it
- Update UI to show three buttons: 'Run Command', 'Add & Run', and 'Reject'
- Add backend logic to detect 'Add & Run' selection and update allowedCommands setting
- Enhance message passing system to support tertiary button interactions
Fixes#5290
Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>
Co-authored-by: Daniel Riccio <ricciodaniel98@gmail.com>
Co-authored-by: Daniel <57051444+daniel-lxs@users.noreply.github.com>
* fix: resolve Claude Code token counting inefficiency and enable caching (#5104)
- Remove 1.5x fudge factor from Claude Code token counting
- Enable prompt caching support for all Claude Code models
- Add comprehensive tests for token counting and caching
- Update existing tests to reflect accurate token counting
This fixes the extreme token inefficiency where simple messages would
jump from ~40k to over 60k tokens, causing API hangs when approaching
the artificial 120k limit. Claude Code now properly utilizes its full
200k context window with accurate token counting.
* fix: address PR review comments
- Extract IMAGE_TOKEN_ESTIMATE as a named constant for clarity
- Update token counting tests to use exact counts instead of ranges for deterministic testing
- Fix test expectations to match actual tokenizer output
* Remove token counting changes, keep only cache support
- Removed custom countTokens override from claude-code.ts
- Deleted claude-code-token-counting.spec.ts test file
- Kept cache token collection and reporting functionality
- Kept supportsPromptCache: true for all Claude Code models
- Kept claude-code-caching.spec.ts tests
This focuses the PR on enabling cache support without modifying token counting behavior.
* fix: update webview test to expect supportsPromptCache=true for Claude Code models
---------
Co-authored-by: Daniel Riccio <ricciodaniel98@gmail.com>
Co-authored-by: Bruno Bergher <me@brunobergher.comexport>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>
Co-authored-by: Daniel Riccio <ricciodaniel98@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Daniel <57051444+daniel-lxs@users.noreply.github.com>
Co-authored-by: Daniel Riccio <ricciodaniel98@gmail.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>
* Fixes#4882: Remove experimental setting for command execution in attempt_completion
- Remove DISABLE_COMPLETION_COMMAND from experiments system
- Permanently disable command execution in attempt_completion tool
- Update tool prompts to remove command parameter and examples
- Remove experimental UI toggle and localization entries (18+ languages)
- Update tests to reflect permanent behavior
- Remove experiment-specific test file
Command execution is now permanently disabled in attempt_completion.
Users must use execute_command tool separately before attempt_completion.
* refactor: simplify getAttemptCompletionDescription by removing unnecessary variables
* test: fix tests by regenerating snaps
---------
Co-authored-by: Daniel Riccio <ricciodaniel98@gmail.com>
The test was expecting isFetching to be false in the default state, but the implementation correctly initializes it as true to show a loading state on initial load. Updated the test expectation to match the actual behavior.