- Added translations for Claude Code settings in all supported languages
- Fixed default max output tokens from 8192 to 8000 in run.ts
- Translations include labels and descriptions for all Claude Code provider settings
- Add new provider that executes local claude CLI tool
- Support streaming responses from CLI JSON output
- Add configuration UI for setting CLI path
- Include all necessary type definitions and models
- Add English translations for new provider
This allows users to use Claude models through a locally installed
command-line tool instead of API endpoints.
Add support for the save/discard flow for support prompt setting page
Normally when you edit things on the settings pages, the save button lights up,
allowing you to discard your changes. Currently the prompts page doesn't support this flow-
the prompts are immediately saved when they change.
With this change, we use the normal cachedState system in the SettingView, allowing users to dicard changes to their prompts like any other setting.
This removed the need for the resetSupportPrompt event since we send the entire state of the support prompts (same as before).
Test plan:
* Manually verified prompts can be saved/discarded for different types of support prompts.
* Add reasoning budget support to Bedrock models and update related components
- Introduced `supportsReasoningBudget` property in Bedrock models.
- Enhanced `AwsBedrockHandler` to handle reasoning budget in payloads.
- Updated `ThinkingBudget` component to dynamically set max tokens based on reasoning support.
- Modified `ApiOptions` and `Bedrock` components to conditionally render `ThinkingBudget`.
- Added tests for extended thinking functionality in `bedrock-reasoning.test.ts`.
* Add BedrockThinkingConfig interface and update payload structure
* fix: address PR review feedback (#4481)
- Simplify ThinkingBudget ternary logic since component only renders when reasoning budget supported
- Break down complex thinking enabled condition with clear documentation
- Replace 'as any' usage with proper TypeScript interfaces for AWS SDK events
- Add comprehensive documentation for multiple stream structures explaining AWS SDK compatibility
* feat: show ThinkingBudget component unconditionally
Remove selectedProviderModels.length check to display ThinkingBudget
for all providers, not just those with available models
---------
Co-authored-by: hannesrudolph <hrudolph@gmail.com>
* add mermaid buttons
* feat: Add Modal, TabButton, and ZoomControls components
* feat: Add error handling messages for image operations and file opening
* mermaid: Add drag functionality and support contious zooming
* add active color for tabbutton
* refactor zoom controls
* refactor: Remove unused svgToPng prop and simplify handleCopy function
* Move zoom to constants and increase max zoom
* feat: add save image functionality and refactor image handling
* feat: add translations
---------
Co-authored-by: Daniel Riccio <ricciodaniel98@gmail.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>
* Add reasoning budget support to Bedrock models and update related components
- Introduced `supportsReasoningBudget` property in Bedrock models.
- Enhanced `AwsBedrockHandler` to handle reasoning budget in payloads.
- Updated `ThinkingBudget` component to dynamically set max tokens based on reasoning support.
- Modified `ApiOptions` and `Bedrock` components to conditionally render `ThinkingBudget`.
- Added tests for extended thinking functionality in `bedrock-reasoning.test.ts`.
* Add BedrockThinkingConfig interface and update payload structure
* fix: address PR review feedback (#4481)
- Simplify ThinkingBudget ternary logic since component only renders when reasoning budget supported
- Break down complex thinking enabled condition with clear documentation
- Replace 'as any' usage with proper TypeScript interfaces for AWS SDK events
- Add comprehensive documentation for multiple stream structures explaining AWS SDK compatibility
* feat: add BatchDiffApproval component for multi-file diff application
- Introduced a new component `BatchDiffApproval` to handle the approval of batch changes across multiple files.
- Integrated the `BatchDiffApproval` component into `ChatRow` to display batch diff requests.
- Updated experimental settings to include a toggle for multi-file apply diff functionality.
- Enhanced localization files to support new strings related to batch changes in multiple languages.
- Updated tests to cover the new multi-file apply diff feature.
* revert this
* fix: update applyDiff parameter type to accept string or DiffItem
* refactor: keep original file name for apply diff tool
* revert this
* Update src/core/webview/__tests__/ClineProvider.test.ts
* revert this
* fix: keep the original path if the experiment is disabled
* test: add dynamic strategy selection tests for MultiSearchReplaceDiffStrategy and MultiFileSearchReplaceDiffStrategy
* fix: mock applyDiffTool module and ensure legacy tool resolves successfully in tests
* remove this
* ellipsis suggestion
Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
* refactor: mirror concurrent file reads
---------
Co-authored-by: Daniel Riccio <ricciodaniel98@gmail.com>
Co-authored-by: Daniel <57051444+daniel-lxs@users.noreply.github.com>
Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
* feat: add prompt history navigation with arrow keys (#4139)
- Navigate through prompt history using arrow up/down keys
- Only triggers when cursor is at first line (up) or last line (down)
- Preserves current input when starting navigation
- Resets navigation state when typing or sending messages
- Follows VSCode's standard UX patterns for history navigation
* fix: correct prompt history order and add workspace filtering (#4139)
- Remove reverse() to maintain chronological order in history array
- Add workspace filtering to only show prompts from current workspace
- Ensure arrow up navigates to older prompts (as expected)
- Filter history items by workspace field matching current cwd
* test: Fix Windows unit test failures for prompt history navigation
- Add missing taskHistory and cwd properties to all useExtensionState mocks
- Add comprehensive test coverage for prompt history navigation feature
- Ensure all 25 tests pass including new prompt history functionality
Fixes failing Windows CI test in PR #4450
* refactor: Improve cursor positioning with useLayoutEffect
- Replace setTimeout(..., 0) with useLayoutEffect for more reliable cursor positioning
- Implement state-based cursor positioning pattern suggested by @mochiya98
- Add CursorPositionState interface for better type safety
- Maintain all existing functionality while improving timing reliability
This addresses the technical suggestion in PR #4450 comment about using
useLayoutEffect instead of setTimeout for DOM manipulation timing.
* feat: optimize prompt history with performance improvements and memory management
- Add useMemo for prompt history filtering to prevent unnecessary re-computations
- Implement MAX_PROMPT_HISTORY_SIZE = 100 limit for memory management
- Extract logic into usePromptHistory custom hook for better code organization
- Simplify ChatTextArea component by delegating history logic to custom hook
Addresses review feedback on PR #4450 for issue #4139
* refactor: clean up unused code and fix linting issues in prompt history
- Remove unused CursorPositionState interface from ChatTextArea
- Remove unused destructured variables from usePromptHistory hook
- Fix missing dependency in useEffect dependency array
- Rename unused parameter with underscore prefix
Related to #4139
* feat: implement hybrid prompt history with position reset
- In chat: Use conversation messages (user_feedback), newest first
- Out of chat: Use task history, oldest first
- Reset navigation position when switching between history sources
- Switch from taskHistory to clineMessages for active conversations
- Maintain backward compatibility with task history fallback
- Add comprehensive tests for hybrid behavior and position reset
This provides intuitive UX where:
- Users navigate recent conversation messages during tasks (newest first)
- Users access initial task prompts when starting fresh (oldest first)
- Navigation always starts fresh when switching contexts
* fix: correct task history slicing order for prompt navigation
Task history was using .slice(-100) which gets the newest 100 tasks,
but we want to show oldest tasks first when navigating. Changed to
.slice(0, 100) to get the oldest 100 tasks instead.
This ensures that when starting fresh (no conversation), up arrow
shows the oldest task prompts first, which is the intended behavior.
* refactor: remove comment on task history size limitation and clarify order preservation
* refactor: replace local ClineMessage and TaskHistoryItem interfaces with imported types
* fix: prevent prompt history fallback to task list during active conversation
When an active task has only an initial prompt with no follow-up user messages,
the prompt history should return empty instead of falling back to task history.
This fixes the "Starting Fresh" behavior appearing inappropriately.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
---------
Co-authored-by: Daniel Riccio <ricciodaniel98@gmail.com>
Co-authored-by: Claude <noreply@anthropic.com>
* feat: add MCP viewer and enhanced UI
- Add McpExecutionStatus type with discriminated union for execution states
- Implement McpExecution component with live status updates and collapsible output
- Replace inline MCP UI in ChatRow with dedicated McpExecution component
- Add comprehensive test coverage for useMcpToolTool
- Enhance CodeAccordian to support custom headers
- Improve combineCommandSequences to handle MCP execution flows
* refactor: merge loops in combineCommandSequences for better efficiency
- Reduced from 3 separate loops to 1 main processing loop
- Improved time complexity from O(n²) to O(n)
- Reduced total passes through array from 4 to 2
- Better memory access patterns and cache utilization
* feat: enhance JSON parsing and rendering in McpExecution component
* feat: add mock implementations for react-markdown and remark-gfm
* fix: remove unreachable return statement in ChatRowContent component
* feat(i18n): add execution status messages and error handling for invalid JSON arguments
* test: add parameter validation tests for missing server_name and tool_name
* Update McpExecution component to show server name in header and tool name in approval section
---------
Co-authored-by: Daniel Riccio <ricciodaniel98@gmail.com>
feat: Clicking the panel will always focus it
Adds a new `focusPanel` command and utility function to allow focusing the active webview panel (tab or sidebar). This command is now triggered when a user clicks on non-interactive content within the webview, improving user experience by automatically bringing the panel into focus.
This fixes an issue where sometimes the menu options do not appear because the panel is not in focus:
https://github.com/orgs/Kilo-Org/projects/4/views/1?pane=issue&itemId=113936749&issue=Kilo-Org%7Ckilocode%7C619
**Details**
- **New Command:** Introduced `focusPanel` command to programmatically focus the webview panel.
- **Utility Function:** Created `src/utils/focusPanel.ts` to encapsulate the logic for revealing tab panels or focusing sidebar panels.
- **Webview Integration:** Added a `focusPanelRequest` message type to `WebviewMessage` and implemented a handler in `webviewMessageHandler` to execute the new `focusPanel` command.
- **User Experience:** Implemented a `useAddNonInteractiveClickListener` hook in `webview-ui` that sends a `focusPanelRequest` message to the extension when a click occurs on non-interactive elements, ensuring the webview gains focus.
- **Refactor:** Modified the `focusInput` command to utilize the new `focusPanel` utility, reducing code duplication and centralizing panel focus logic.
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>
* fix: TaskItem display and copy issues with HTML tags in task messages.
* Display issue: HTML tags not displaying in HistoryView.
* Copy issue: HTML tags in message are removed when clicking the copy button in TaskItem.
* perf(webview-ui): add LRU cache to escapeHtml function
- Add LRU cache with 500 item limit for escapeHtml results
- Improves performance by caching frequently escaped strings
- Reduces redundant HTML escaping operations
---------
Co-authored-by: Jimmycai <jimmycai@qiyi.com>
Co-authored-by: Daniel Riccio <ricciodaniel98@gmail.com>