Commit graph

31 commits

Author SHA1 Message Date
Hannes Rudolph
b2b77809ff
Reapply Batch 1: 22 clean non-AI-SDK cherry-picks (#11473)
* fix: add image content support to MCP tool responses (#10874)

Co-authored-by: Roo Code <roomote@roocode.com>

* fix: transform tool blocks to text before condensing (EXT-624) (#10975)

* refactor(read_file): Codex-inspired read_file refactor EXT-617 (#10981)

* feat: allow import settings in initial welcome screen (#10994)

Co-authored-by: Roo Code <roomote@roocode.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* fix(code-index): remove deprecated text-embedding-004 and migrate to gemini-embedding-001 (#11038)

Co-authored-by: Roo Code <roomote@roocode.com>
Co-authored-by: Hannes Rudolph <hrudolph@gmail.com>

* chore: treat extension .env as optional (#11116)

* fix: sanitize tool_use_id in tool_result blocks to match API history (#11131)

Tool IDs from providers like Gemini/OpenRouter contain special characters
(e.g., 'functions.read_file:0') that are sanitized when saving tool_use
blocks to API history. However, tool_result blocks were using the original
unsanitized IDs, causing ToolResultIdMismatchError.

This fix ensures tool_result blocks use sanitizeToolUseId() to match the
sanitized tool_use IDs in conversation history.

Fixes EXT-711

* fix: queue messages during command execution instead of losing them (#11140)

* IPC fixes for task cancellation and queued messages (#11162)

* feat: add support for AGENTS.local.md personal override files (#11183)

Co-authored-by: Roo Code <roomote@roocode.com>
Co-authored-by: roomote[bot] <219738659+roomote[bot]@users.noreply.github.com>

* fix(cli): resolve race condition causing provider switch during mode changes (#11205)

When using slash commands with `mode:` frontmatter (e.g., `/cli-release`
with `mode: code`), the CLI would fail with "Could not resolve
authentication method" from the Anthropic SDK, even when using a
non-Anthropic provider like `--provider roo`.

Root cause: In `markWebviewReady()`, the `webviewDidLaunch` message was
sent before `updateSettings`, creating a race condition. The
`webviewDidLaunch` handler's "first-time init" sync would read
`getState()` before CLI-provided settings were applied to the context
proxy. Since `getState()` defaults `apiProvider` to "anthropic" when
unset, this default was saved to the provider profile. When a slash
command triggered `handleModeSwitch()`, it found this corrupted profile
with `apiProvider: "anthropic"` (but no API key) and activated it,
overwriting the CLI's working roo provider configuration.

Fix:
1. Reorder `markWebviewReady()` to send `updateSettings` before
   `webviewDidLaunch`, ensuring the context proxy has CLI-provided
   values when the initialization handler runs.
2. Guard the first-time init sync with `checkExistKey(apiConfiguration)`
   to prevent saving a profile with only the default "anthropic"
   fallback and no actual API keys configured.

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>

* chore: remove dead toolFormat code from getEnvironmentDetails (#11207)

Remove the toolFormat constant and <tool_format> line from environment
details output. Native tool calling is now the only supported protocol,
making this code unnecessary.

Fixes #11206

Co-authored-by: Roo Code <roomote@roocode.com>

* feat: extract translation and merge resolver modes into reusable skills (#11215)

* feat: extract translation and merge resolver modes into reusable skills

- Add roo-translation skill with comprehensive i18n guidelines
- Add roo-conflict-resolution skill for intelligent merge conflict resolution
- Add /roo-translate slash command as shortcut for translation skill
- Add /roo-resolve-conflicts slash command as shortcut for conflict resolution skill

The existing translate and merge-resolver modes are preserved. These new skills
and commands provide reusable access to the same functionality.

Closes CLO-722

* feat: add guidances directory with translator guidance file

- Add .roo/guidances/roo-translator.md for brand voice, tone, and word choice guidance
- Update roo-translation skill to reference the guidance file

The guidance file serves as a placeholder for translation style guidelines
that will be interpolated at runtime.

* fix: rename guidances directory to guidance (singular)

* fix: remove language-specific section from translator guidance

The guidance file should focus on brand voice, tone, and word choice only.

* fix: remove language-specific guidelines section from skill file

* Update .roo/skills/roo-translation/SKILL.md

Co-authored-by: roomote[bot] <219738659+roomote[bot]@users.noreply.github.com>

---------

Co-authored-by: Roo Code <roomote@roocode.com>
Co-authored-by: Bruno Bergher <bruno@roocode.com>
Co-authored-by: roomote[bot] <219738659+roomote[bot]@users.noreply.github.com>

* feat: add Claude Opus 4.6 support across all providers (#11224)

* feat: add Claude Opus 4.6 support across all providers

Add Claude Opus 4.6 (claude-opus-4-6) model definitions and 1M context
support across Anthropic, Bedrock, Vertex AI, OpenRouter, and Vercel AI
Gateway providers.

- Anthropic: 128K max output, /5 pricing, 1M context tiers
- Bedrock: anthropic.claude-opus-4-6-v1:0 with 1M context + global inference
- Vertex: claude-opus-4-6 with 1M context tiers
- OpenRouter: prompt caching + reasoning budget sets
- Vercel AI Gateway: Opus 4.5 and 4.6 added to capability sets
- UI: 1M context checkbox for Opus 4.6 on all providers
- i18n: Updated 1M context descriptions across 18 locales

Also adds Opus 4.5 to Vercel AI Gateway (previously missing) and
OpenRouter maxTokens overrides for Opus 4.5/4.6.

Closes #11223

* fix: apply tier pricing when 1M context is enabled on Bedrock

When awsBedrock1MContext is enabled for tiered models like Opus 4.6,
also apply the 1M tier pricing (inputPrice, outputPrice, cache prices)
instead of only updating contextWindow. This ensures cost calculations
and UI display use the correct >200K rates.

* feat: add gpt-5.3-codex model to OpenAI Codex provider (#11225)

feat: add gpt-5.3-codex model and make it default for OpenAI Codex provider

Co-authored-by: Roo Code <roomote@roocode.com>

* fix: prevent parent task state loss during orchestrator delegation (#11281)

* fix: make removeClineFromStack() delegation-aware to prevent orphaned parent tasks (#11302)

* fix: make removeClineFromStack() delegation-aware to prevent orphaned parent tasks

When a delegated child task is removed via removeClineFromStack() (e.g., Clear
Task, navigate to history, start new task), the parent task was left orphaned
in "delegated" status with a stale awaitingChildId. This made the parent
unresumable without manual history repair.

This fix captures parentTaskId and childTaskId before abort/dispose, then
repairs the parent metadata (status -> active, clear awaitingChildId) when
the popped task is a delegated child and awaitingChildId matches.

Parent lookup + updateTaskHistory are wrapped in try/catch so failures are
non-fatal (logged but do not block the pop).

Closes #11301

* fix: add skipDelegationRepair opt-out to removeClineFromStack() for nested delegation

---------

Co-authored-by: Roo Code <roomote@roocode.com>

* fix(reliability): prevent webview postMessage crashes and make dispose idempotent (#11313)

* fix(reliability): prevent webview postMessage crashes and make dispose idempotent

Closes: #11311

1. postMessageToWebview() now catches rejections from
   webview.postMessage() so that messages sent after the webview is
   disposed do not surface as unhandled promise rejections.

2. dispose() is guarded by a _disposed flag so that repeated calls
   (e.g. during rapid extension deactivation) are no-ops.

3. CloudService mock in ClineProvider.spec.ts updated to include
   off() — a pre-existing gap exposed by the new dispose test.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix: add early _disposed check in postMessageToWebview

Skip the postMessage call entirely when the provider is already disposed,
avoiding unnecessary try/catch execution. Added test coverage for this path.

* chore: trigger CI

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: daniel-lxs <ricciodaniel98@gmail.com>

* fix: resolve race condition in new_task delegation that loses parent task history (#11331)

* fix: resolve race condition in new_task delegation that loses parent task history

When delegateParentAndOpenChild creates a child task via createTask(), the
Task constructor fires startTask() as a fire-and-forget async call. The child
immediately begins its task loop and eventually calls saveClineMessages() →
updateTaskHistory(), which reads globalState, modifies it, and writes back.

Meanwhile, delegateParentAndOpenChild persists the parent's delegation
metadata (status: 'delegated', delegatedToId, awaitingChildId, childIds) via
a separate updateTaskHistory() call AFTER createTask() returns.

These two concurrent read-modify-write operations on globalState race: the
last writer wins, overwriting the other's changes. When the child's write
lands last, the parent's delegation fields are lost, making the parent task
unresumable when the child finishes.

Fix: create the child task with startTask: false, persist the parent's
delegation metadata first, then manually call child.start(). This ensures
the parent metadata is safely in globalState before the child begins writing.

* docs: clarify Task.start() only handles new tasks, not history resume

* fix: serialize taskHistory writes and fix delegation status overwrite race (#11335)

Add a promise-chain mutex (withTaskHistoryLock) to serialize all
read-modify-write operations on taskHistory, preventing concurrent
interleaving from silently dropping entries.

Reorder reopenParentFromDelegation to close the child instance
before marking it completed, so the abort path's stale 'active'
status write no longer overwrites the 'completed' state.

Covered by new tests: RPD-04/05/06, UTH-02/04, and a full mutex
concurrency suite.

* Fix task resumption in the API module (#11369)

* chore: clean up repo-facing mode rules (#11410)

* fix: add maxReadFileLine to ExtensionState type for webview compatibility

---------

Co-authored-by: roomote[bot] <219738659+roomote[bot]@users.noreply.github.com>
Co-authored-by: Roo Code <roomote@roocode.com>
Co-authored-by: Daniel <57051444+daniel-lxs@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>
Co-authored-by: Chris Estreich <cestreich@gmail.com>
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Co-authored-by: Bruno Bergher <bruno@roocode.com>
Co-authored-by: 0xMink <dennis@dennismink.com>
Co-authored-by: daniel-lxs <ricciodaniel98@gmail.com>
2026-02-14 13:47:12 -07:00
Daniel
6cfa82f571
Revert to pre-AI-SDK state (January 29, 2026) (#11462)
Revert to pre-AI-SDK state (commit 67e568f6b)

This commit reverts the codebase to the state before AI SDK migration work began.

Target commit: 67e568f6b - refactor: replace fetch_instructions with skill tool and built-in skills (#10913)
Date: January 29, 2026

This removes approximately 152 commits of AI SDK migration work.
A follow-up PR will add back bug fixes and features that are unrelated to AI SDK.

Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-13 16:45:18 -05:00
Hannes Rudolph
cc86049f10
refactor(read_file): Codex-inspired read_file refactor EXT-617 (#10981) 2026-01-29 15:16:32 -07:00
Chris Estreich
87a5afa629
Revert "feat(e2e): Enable E2E tests - 39 passing tests" (#10794)
Co-authored-by: Hannes Rudolph <hrudolph@gmail.com>
2026-01-16 17:22:43 -08:00
Archimedes
dba76f51e7
fix(e2e): add alwaysAllow config for MCP time server tools (#10733) 2026-01-14 23:50:17 -05:00
Archimedes
dbf206f06b
feat(e2e): Enable E2E tests - 39 passing tests (#10720)
Co-authored-by: roomote[bot] <219738659+roomote[bot]@users.noreply.github.com>
2026-01-14 12:15:54 -08:00
Chris Estreich
ea9717d7ba
Add a TUI (#10480)
Co-authored-by: Roo Code <roomote@roocode.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>
Co-authored-by: Daniel <57051444+daniel-lxs@users.noreply.github.com>
2026-01-09 19:19:58 -08:00
Chris Estreich
3171ffc809
Move more types to @roo-code/types (for the cli) (#10583) 2026-01-09 11:59:06 -08:00
Hannes Rudolph
c37aa02b21
chore: remove human-relay provider (#10388)
Co-authored-by: Roo Code <roomote@roocode.com>
2025-12-30 15:38:46 -07:00
Daniel
ce229012a3
refactor: remove insert_content tool (#9751)
Co-authored-by: Roo Code <roomote@roocode.com>
2025-12-03 16:33:22 -05:00
Bruno Bergher
49aad8576e
ux: Toolbar cleanup and settings consolidation (#9710)
Co-authored-by: Roo Code <roomote@roocode.com>
2025-12-01 09:43:15 -05:00
John Richmond
341863f8cd
Update glob to ^11.1.0 (#9449) 2025-11-20 14:45:02 -08:00
roomote[bot]
81d5f63b72
fix: remove search_and_replace tool from codebase (#8892)
Co-authored-by: Roo Code <roomote@roocode.com>
Co-authored-by: daniel-lxs <ricciodaniel98@gmail.com>
Co-authored-by: Hannes Rudolph <hrudolph@gmail.com>
2025-10-30 22:51:29 -04:00
Matt Rubens
6fa6c3c1e6
Skip failing tools tests (#8767) 2025-10-22 01:07:02 -04:00
Daniel
687b37943a
fix: resolve CI e2e test ETIMEDOUT errors when downloading VS Code (#7583) 2025-09-05 14:54:22 -04:00
Chris Estreich
b2d2a2c5d2
Task and TaskProvider event emitter cleanup + a few new events (#6606)
Co-authored-by: Roo Code <roomote@roocode.com>
2025-08-02 11:12:44 -07:00
Daniel
623fa2a025
test: update list-files test for fixed hidden files bug (#6261)
test: update list-files test to reflect fixed hidden files bug
2025-07-26 21:15:34 -04:00
roomote[bot]
c61bd95bbe
fix: restore list styles for markdown lists in chat interface (#6095)
Co-authored-by: Roo Code <roomote@roocode.com>
Co-authored-by: Daniel Riccio <ricciodaniel98@gmail.com>
2025-07-25 16:51:45 -04:00
Matt Rubens
e84dd0a2cf
Skip all MCP CI tests (#5645) 2025-07-12 22:23:28 -04:00
Daniel
84bfd76924
test: disable flaky MCP directory_tree test (#5627)
The test 'Should request MCP filesystem directory_tree tool and complete successfully' has been timing out after 45s in CI. Disabling it temporarily to unblock the test suite while we investigate the root cause.
2025-07-12 10:38:55 -05:00
Noritaka Kobayashi
ab55854702
chore: fix typos in comment & document (#5569) 2025-07-10 11:33:26 -04:00
Hannes Rudolph
18c3f5dc33
feat: change default mode to architect for new installations (#5289)
* feat: change default mode to architect for new installations

- Reordered modes array to put architect mode first
- Updated test to reflect architect as the default mode
- Maintains backward compatibility for existing users

* test: update snapshots and fix tests for architect default mode

- Update all snapshot tests to reflect architect as the default mode
- Fix mode destructuring in validateToolUse tests
- All tests now pass with the new default mode configuration

* docs: add comment explaining mode ordering for default selection

Addresses PR review feedback to clarify that the first mode in the array
serves as the default for new installations

* fix: Update integration test to use lowercase mode name

The test was using 'Ask' (capitalized) but modes are now lowercase 'ask'.
This was causing the test to timeout as the mode validation failed.
2025-06-30 17:46:56 -04:00
Chris Estreich
1f05caa569
Skip e2e test that often prompts you (#5044) 2025-06-23 09:32:48 -07:00
Chris Estreich
bccf11f2eb
Increase suite-level e2e test timeout (#4975) 2025-06-21 00:57:13 -07:00
Hannes Rudolph
7a8483dc12
fix: add symlink support to list_files tool (#4654) (#4859)
Co-authored-by: Daniel Riccio <ricciodaniel98@gmail.com>
2025-06-20 15:26:55 -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
Chris Estreich
ab01fb3bdb
Move to Postgres for evals on roocode.com (#4520) 2025-06-11 14:17:53 -07:00
renovate[bot]
0505174644
chore(deps): update dependency @vscode/test-cli to ^0.0.11 (#4162)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-05-30 20:16:59 -07:00
Chris Estreich
343f29b432
Improve the prompt for the "modes" e2e test (#4055) 2025-05-27 12:56:46 -07:00
Chris Estreich
e66136f1aa
Add a new @roo-code/types package and use it everywhere (#3912) 2025-05-26 12:06:45 -07:00
Chris Estreich
58a0efa9e1
Move e2e into apps (#3823) 2025-05-22 08:41:58 -07:00