Commit graph

4749 commits

Author SHA1 Message Date
Matt Rubens
b27a01f0cf
Update CHANGELOG.md 2025-06-13 15:17:36 -04:00
github-actions[bot]
2bd42359f6 changeset version bump 2025-06-13 19:14:02 +00:00
Matt Rubens
0284b1101c
v3.20.2 (#4662) 2025-06-13 15:13:15 -04:00
Matt Rubens
ca0338af15
Limit search_files to only look within the workspace (#4642) 2025-06-13 12:10:43 -04:00
Eamon Nerbonne
e535b55076
♻️ Refactor: Avoid type system duplication (#4596) 2025-06-13 12:10:34 -04:00
Sam Hoang Van
8fb368dd6b
feat(ui): add max height constraint to MCP execution response (#4644) 2025-06-13 11:29:41 -04:00
Hannes Rudolph
fc82485563
Docs extractor mode (#4621) 2025-06-13 11:29:12 -04:00
Daniel
a1b8b12928
Prevent MCP 'installed' label from being squeezed #4630 (#4649) 2025-06-13 11:28:33 -04:00
Daniel
48d0b19324
Feat: Improve Issue Fixer Rules for Targeted Fixes (#4652) 2025-06-13 11:28:05 -04:00
Daniel
87186067f9
Feat: Improve PR Reviewer Rules (#4651) 2025-06-13 11:08:51 -04:00
Daniel
28ad8d719e
Reapply reasoning for bedrock with fix (#4645)
* 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>
2025-06-13 11:07:27 -04:00
Sam Hoang Van
9eb9fabee0
feat(ui): sync BatchDiffApproval styling with BatchFilePermission (#4640) 2025-06-13 09:01:47 -04:00
pugazhendhi-m
2cb02d6512
Add cache breakpoints for custom vertex models on Unbound (#4585)
Co-authored-by: Pugazhendhi <pugazhendhi@unboundsecurity.ai>
2025-06-13 08:29:40 -04:00
Raffael
dc00167289
Update ContextManagementSettings.tsx (#4634)
Allow 5% threshold for context condensing (thats already 50k with gemini 1M context, enough for many tasks)
2025-06-13 06:42:55 -04:00
Chris Estreich
28a16c9ee7
Force tar-fs >=2.1.3 (#4629) 2025-06-12 23:27:41 -07:00
github-actions[bot]
4e46698fd3
Changeset version bump (#4628)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>
2025-06-13 01:49:08 -04:00
Matt Rubens
9db7840655
v3.20.1 (#4627) 2025-06-13 01:46:22 -04:00
Matt Rubens
47e84b4572
Revert "feat: Add reasoning budget support to Bedrock models for extended thinking (#4201)" (#4626) 2025-06-13 01:43:06 -04:00
Hannes Rudolph
bde7a7bf2a
feat: Add indexing status badge to chat view (#4429) (#4532)
Co-authored-by: Daniel <57051444+daniel-lxs@users.noreply.github.com>
Co-authored-by: Daniel Riccio <ricciodaniel98@gmail.com>
2025-06-12 21:56:57 -04:00
Daniel
5f29348519
Improve performance of MCP execution block (#4615) 2025-06-12 21:17:55 -04:00
github-actions[bot]
0cf3f00bab
Update contributors list (#4348)
docs: update contributors list [skip ci]

Co-authored-by: mrubens <2600+mrubens@users.noreply.github.com>
2025-06-12 20:57:45 -04:00
Matt Rubens
1492e5780e
Update CHANGELOG.md 2025-06-12 20:24:09 -04:00
github-actions[bot]
ca5f2d05f9
Changeset version bump (#4593)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>
2025-06-12 18:17:12 -04:00
Matt Rubens
ffc8dc7b6b
v3.20 (#4609)
Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
2025-06-12 17:54:53 -04:00
Daniel
33ce5a2e24
Fix undefined on multi-file apply_diff output (#4608)
feat: enhance file handling in `apply_diff` case to support legacy and multi-file formats
2025-06-12 16:46:16 -04:00
Matt Rubens
184c4803c6
Move concurrent reads into context settings and default to 5 (#4597)
* Move concurrent reads into context settings and default to 5

* Spacing tweaks

* Change max back to 100
2025-06-12 16:21:39 -04:00
Matt Rubens
2eca105e35
Add a footer to the marketplace to report issues (#4604) 2025-06-12 16:18:07 -04:00
Chris Estreich
fe52c19fde
Evals fixes (#4599) 2025-06-12 13:01:59 -07:00
Trung Dang
84ccf3fcc3
feat: add injectVariables(), support magic variables for MCPs (workspaceFolder) (#4442)
* feat: add `injectVariables()`, support magic variables for MCPs

* fix: fallback for `workspaceFolder` should just be an empty string

Previously this is intended so that the CLI receives a correct empty path argument, but on a second thought, if the user have added the quotes themselves it might cause error.

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>

* chore: remove unused import

* chore: better log format

* chore: better describe the accepted config type and more extensive test

---------

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
2025-06-12 13:17:41 -04:00
Dixie Flatline
c481827cbb
Manually specify openai-compat format and parse it (#4463)
* Manually specify openai-compat format and parse it

* fixup! Manually specify openai-compat format and parse it

* Expect base64 in embedding test arguments

* fixup! Manually specify openai-compat format and parse it

Remove debug logs

* fixup! Manually specify openai-compat format and parse it

Improve comment

* fixup! Manually specify openai-compat format and parse it

* Add tests to exercise base64 decode of embeddings

* Add tests to verify openai base64 and brokenness behavior

* feat: improve typing

* refactor: switch from jest to vitest for mocking in tests

---------

Co-authored-by: Dixie Flatline <dflatline>
Co-authored-by: Daniel Riccio <ricciodaniel98@gmail.com>
2025-06-12 13:12:48 -04:00
axb
dfcf8fe760
add mermaid buttons (#4547)
* 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>
2025-06-12 13:06:27 -04:00
Matt Rubens
85fd86e675
Revert "Always focus the panel when clicked to ensure menu buttons are visible" (#4592)
Revert "Always focus the panel when clicked to ensure menu buttons are visibl…"

This reverts commit 1b1e5a20f1.
2025-06-12 12:51:34 -04:00
Hannes Rudolph
fb3a728a30
feat: Add reasoning budget support to Bedrock models for extended thinking (#4201) (#4481)
* 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
2025-06-12 12:39:21 -04:00
Sam Hoang Van
7bed94454a
feat: Enhance apply_diff with XML for multi-file/multi-diff operations & batch UI (#3342)
* 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>
2025-06-12 12:36:34 -04:00
Edwin P Jacques
8b6f5f8baa
update xai models and pricing (#4315)
* update xai models and pricing

* cache accounting for xAI

* change log
2025-06-12 11:59:45 -04:00
Chris Estreich
15e3d6fc87
feat(tests): core tools integration tests (#4433)
* feat(tests): add apply_diff tool tests

* feat(tests): add tests for write_to_file tool functionality

* feat(tests): add comprehensive tests for read_file tool functionality

* feat(tests): add tests for execute_command tool functionality

* feat(integration-tester): add integration testing role with comprehensive guidelines

* feat(tests): enhance test runner with grep and specific file filtering

* feat(tests): add comprehensive tests for search_files tool functionality

* feat(tests): add comprehensive tests for list_files tool functionality

* feat(tests): add tests for insert_content tool functionality

* feat(tests): add comprehensive tests for search_and_replace tool functionality

* feat(tests): add comprehensive tests for use_mcp_tool functionality

* feat(tests): increase timeout values for various tool tests to improve reliability

* fix(tests): add non-null assertion for workspaceDir assignment in multiple test files

* feat(tests): enhance read_file tool tests with increased timeouts and improved prompts

* feat(tests): enhance read_file tool tests to extract and verify tool results

* feat(tests): enhance execute_command tool tests with additional context in prompts

* refactor(tests): remove script execution test and related setup for execute_command tool

* fix(tests): increase timeout for task start and completion in apply_diff and read_file tests

* fix(tests): clarify error handling message in command execution test

* refactor(tests): remove error handling test and related setup for execute_command tool

* fix: update openRouterModelId to use anthropic/claude-3.5-sonnet

* fix: update openRouterModelId to use openai/gpt-4.1

* fix(tests): increase timeouts for apply_diff, execute_command, and search_and_replace tests

* fix(tests): disable terminal shell integration for execute_command tool tests

* chore: rewrite integration tester mode

* Update .roo/rules-integration-tester/1_workflow.xml

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>

---------

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>
2025-06-12 11:50:25 -04:00
KJ7LNW
53e7e6beaa
feat: Allow escaping of context mentions (#4362)
* allow escaping of context mentions

* refactor: update comment

---------

Co-authored-by: cannuri <91494156+cannuri@users.noreply.github.com>
Co-authored-by: Daniel <57051444+daniel-lxs@users.noreply.github.com>
2025-06-12 11:49:19 -04:00
Ruakij
8f58737550
Fix #4113: Move relPath & newContent checks in writeToFileTool earlie… (#4378)
Fix #4113: Move relPath & newContent checks in writeToFileTool earlier and run after they exist or block is non-partial
Add tests covering the issue.
2025-06-12 11:48:14 -04:00
Hannes Rudolph
91a477d831
docs: add JSDoc documentation for ClineAsk and ClineSay types (#4427)
docs: add comprehensive JSDoc documentation for ClineAsk and ClineSay types
2025-06-12 11:47:23 -04:00
Hannes Rudolph
69472099ea
feat: Navigate prompt history in prompt field via arrow up/down (#4139) (#4450)
* 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>
2025-06-12 11:43:54 -04:00
Matt Rubens
befbebb8a4
Populate whenToUse for built-in modes (#4579) 2025-06-12 11:40:55 -04:00
Hannes Rudolph
a851ffb7cb
feat: Add DeepSeek R1 support to Chutes provider (#4523) (#4525)
* feat: Add DeepSeek R1 support to Chutes provider (#4523)

- Modified BaseOpenAiCompatibleProvider to expose client as protected
- Enhanced ChutesHandler to detect DeepSeek R1 models and parse reasoning chunks
- Applied R1 format conversion for message formatting
- Set appropriate temperature (0.6) for DeepSeek models
- Migrated tests from Jest to Vitest format
- Added comprehensive tests for DeepSeek R1 functionality

This ensures reasoning chunks are properly separated from regular content
when using DeepSeek R1 models via Chutes provider.

* feat: Enhance DeepSeek R1 support with <think> tag handling in Chutes provider

* fix: Correct temperature retrieval in ChutesHandler to use model's info

* fix: Update condition for DeepSeek-R1 model identification in createMessage method

---------

Co-authored-by: Daniel Riccio <ricciodaniel98@gmail.com>
2025-06-12 11:39:41 -04:00
Hannes Rudolph
c17a07d096
Fix: Reset terminal busy state after manual commands complete (#4583)
fix: reset terminal busy state after manual commands complete (#4319)

- Add terminal.busy = true when shell execution starts
- Add terminal.busy = false when shell execution ends for both Roo and non-Roo terminals
- Add comprehensive tests for busy flag management
- Fixes issue where terminals got stuck in busy state after manual commands
2025-06-12 11:09:08 -04:00
Chris Estreich
bad9b0e163
Bump @roo-code/types to v1.26.0 (#4584)
* Bump @roo-code/types to v1.26.0

* Add instructions for NPM publish
2025-06-12 11:05:53 -04:00
Sam Hoang Van
a9c1dad2ce
feat(mcp): improve mcp with McpExecution, make UX like terminal execute (#3485)
* 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>
2025-06-12 00:46:07 -04:00
Chris Hasson
1b1e5a20f1
Always focus the panel when clicked to ensure menu buttons are visible (#4511)
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>
2025-06-12 00:09:19 -04:00
forestyoo
d5f862a6e0
fix: TaskItem display and copy issues with HTML tags in task messages. (#4444)
* 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>
2025-06-11 23:50:56 -04:00
Matt Rubens
d7087c3eb8
Update o3 prices (#4580) 2025-06-11 23:30:22 -04:00
renovate[bot]
6449f8a51a
chore(deps): update dependency @dotenvx/dotenvx to v1.44.2 (#4533)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-11 23:24:08 -04:00
Christiaan Arnoldus
11668af83d
Fix OpenRouter cost calculation with BYOK (#4543)
Currently, when you use OpenRouter with your own key for the underlying service, the costs shown by Roo Code are way off what it actually costs.

With bring your own key, OpenRouter charges 5% of what it normally would (see https://openrouter.ai/docs/use-cases/byok)
so we have to multiply the reported cost by 20 to get an estimate of what it actually costs.

Co-authored-by: Johan Otten <drakonen@drakonen.com>
Co-authored-by: Eamon Nerbonne <eamon@nerbonne.org>
2025-06-11 23:19:24 -04:00