* fix(cli): streaming deltas, task ID propagation, cancel recovery, and misc fixes
- Stream tool_use ask messages (command, tool, mcp) as structured deltas
instead of full snapshots in json-event-emitter
- Generate task ID upfront and propagate through runTask/createTask so
currentTaskId is available in extension state immediately
- Wait for resumable state after cancel before processing follow-up
messages to prevent race conditions in stdin-stream
- Add ROO_CODE_DISABLE_TELEMETRY=1 env var to disable cloud telemetry
- Provide valid empty JSON Schema for custom tools without parameters
to fix strict-mode API validation
- Skip paths outside cwd in RooProtectedController to avoid RangeError
- Silently handle abort during exponential backoff retry countdown
- Enable customTools experiment in extension host
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* fix: add start() to TaskStub in single-open-invariant test
The ClineProvider.createTask change to call task.start() after
addClineToStack requires the test's TaskStub mock to have this method.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
When the CLI is configured with the Roo provider, proactively fetch
and warm the model list during activation so that model information
is available before the first prompt is sent. The warmup has a 10s
timeout and failures are logged only in debug mode so they never
block normal operation.
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
* changeset version bump
* Revise CHANGELOG for recent version updates
Updated changelog for versions 3.50.4 to 3.48.0, including new features, fixes, and improvements.
---------
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>
* feat: add MiniMax M2.5 model and set as default
* fix: update MiniMax M2.5 contextWindow to 204_800
* Delete .changeset/add-minimax-m25.md
---------
Co-authored-by: Roo Code <roomote@roocode.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>
* feat: restore Unbound as a provider
* Adds translations
* fix: add unbound to ClineProvider test expectations
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Pass --template="" to git init and strip GIT_TEMPLATE_DIR from the
environment so system/user git hooks and other template files never
get copied into the shadow repository used for checkpoints.
Co-authored-by: Roo Code <roomote@roocode.com>
* fix(bedrock): enable prompt caching for custom ARN and default to ON
- Set supportsPromptCache to true for custom-arn model info in useSelectedModel.ts
- Change awsUsePromptCache default from false to true using nullish coalescing
- Add tests for custom-arn prompt caching support
Closes#10846
* fix(bedrock): align backend awsUsePromptCache default with UI (?? true)
The backend treated undefined awsUsePromptCache as falsy (OFF) while the
UI checkbox defaulted to true via nullish coalescing. This caused the UI
to show prompt caching as ON but the backend to keep it OFF for new users.
Apply the same ?? true default in the backend so both sides agree.
---------
Co-authored-by: Roo Code <roomote@roocode.com>
* feat: add visual feedback to copy button in task actions
The copy button now shows a checkmark for 2 seconds after copying to provide visual feedback.
Fixes#11401
* fix: change Check icon import name in TaskActions and update test
- Fix Check icon import name from Check to CheckIcon for consistency in TaskActions.tsx
- Add test to verify check icon is shown when showCopyFeedback is true
- Mock useCopyToClipboard hook in TaskActions.spec.tsx to test copy button functionality
This change resolves the import inconsistency and adds a test to ensure the copy button correctly shows a check icon after successful copy.
* feat: show aggregated +/− line counts in FileChangesPanel header
* feat(FileChangesPanel): show merged diff relative to final file state
* fix(webview): restrict readFileContent to paths inside the workspace
* fix: add workspace-boundary validation to readFileContent to prevent path traversal
* fix(tests): mock isPathOutsideWorkspace in readFileContent spec
* fix(tests): mock isPathOutsideWorkspace in readFileContent spec
* fix: use path.resolve/path.sep in readFileContent test mock for cross-platform compatibility
The isPathOutsideWorkspace mock used hardcoded Unix-style path comparisons
(/mock/workspace with forward slashes), which fails on Windows where
path.resolve() produces paths with drive letters (C:\mock\workspace\...).
Replace manual string normalization with path.resolve() and path.sep so the
mock behaves correctly on both Windows and Unix.
---------
Co-authored-by: Roo Code <roomote@roocode.com>
* feat: disable apply_diff and enable edit tool for Vertex and Gemini providers
* feat: disable apply_diff and enable edit tool for Anthropic provider
* feat: disable apply_diff and enable edit tool for Anthropic Vertex provider
* fix: remove out-of-scope Anthropic/Anthropic-Vertex changes
The PR scope is Gemini and Vertex providers only. Reverting the
Anthropic and Anthropic-Vertex tool preference changes that were
not part of the stated scope.
---------
Co-authored-by: Roo Code <roomote@roocode.com>
feat: add `timeout` parameter to `execute_command` tool
Allow the agent to specify a per-command timeout in seconds. When
exceeded, the command continues running in the background (like clicking
"Run in Background") and the output collected so far is returned,
rather than aborting. This is useful for long-running processes like dev
servers or file watchers that may never exit on their own.
The agent timeout runs independently of the user-configured abort
timeout — the user timeout remains active as a safety net even after
the agent moves on.
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* feat: remove Roomote Control from extension
Remove all Roomote Control (remote control) functionality:
- Remove BridgeOrchestrator and entire bridge directory from @roo-code/cloud
- Remove remoteControlEnabled, featureRoomoteControlEnabled from extension state
- Remove extensionBridgeEnabled from CloudUserInfo and user settings
- Remove roomoteControlEnabled from organization/user feature schemas
- Remove enableBridge from Task and ClineProvider
- Remove remote control toggle from CloudView UI
- Remove remoteControlEnabled message handler
- Remove extension bridge disconnect on logout/deactivate
- Update CloudTaskButton to show for all logged-in users
- Remove remote control translation strings from all locales
- Update all related tests
CLO-765
* fix: remove dead getOrganizationMetadata and unused socket.io-client dep
* Readmes
* Readmes
* Types
* fix: remove leftover Roomote Control references from locale READMEs and stale BridgeOrchestrator mock
* Removes cloudtaskbutton
* fix: remove orphaned qrcode packages and dead openInCloud translation keys
* pnpmlock
* Revert these
* Revert these
* Revert these
* Remove socket.io
---------
Co-authored-by: Roo Code <roomote@roocode.com>
Co-authored-by: Bruno Bergher <bruno@roocode.com>
Co-authored-by: cte <cestreich@gmail.com>
Changed the settings search results to be the same width as the search input. This ensures the results dropdown does not overflow outside of the parent panel.
* chore: remove integration test files
* chore: remove integration test job from CI workflow
---------
Co-authored-by: Roo Code <roomote@roocode.com>
Co-authored-by: Hannes Rudolph <hrudolph@gmail.com>
* feat(cli): add NDJSON stdin protocol, list subcommands, and modularize run.ts
Overhaul the stdin prompt stream from raw text lines to a structured NDJSON
command protocol (start/message/cancel/ping/shutdown) with requestId
correlation, ack/done/error lifecycle events, and queue telemetry. Add list
subcommands (commands, modes, models) for programmatic discovery. Extract
stdin stream logic from run.ts into stdin-stream.ts and add shared isRecord
guard utility. Includes unit tests for all new modules.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* fix(core): fix Task.ts bug affecting CLI operation
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
* feat: add per-task file-based history store for cross-instance safety
Implement TaskHistoryStore service that stores each task's HistoryItem
as an individual JSON file in its existing task directory. This prevents
silent data loss when multiple VS Code windows write to the shared
globalState taskHistory array concurrently.
Key changes:
- New TaskHistoryStore class with per-task file writes via safeWriteJson
- Index file (_index.json) for fast startup reads
- Reconciliation logic to detect and fix drift between instances
- fs.watch for cross-instance reactivity
- Debounced index writes (2s window) for streaming performance
- Migration from globalState on first startup
- Write-through to globalState during transition period
- Fallback lookups from globalState for backward compatibility
Files created:
- src/core/task-persistence/TaskHistoryStore.ts
- src/core/task-persistence/__tests__/TaskHistoryStore.spec.ts
- src/core/task-persistence/__tests__/TaskHistoryStore.crossInstance.spec.ts
Files modified:
- src/shared/globalFileNames.ts (added historyItem, historyIndex)
- src/core/task-persistence/index.ts (export TaskHistoryStore)
- src/core/webview/ClineProvider.ts (integrate store, remove write lock)
- Test files updated for new store-based approach
* fix: address review feedback - reconcile lock, init promise, write-through serialization
- reconcile() now runs through withLock() to prevent interleaving with
upsert/delete at async boundaries
- Added initialized promise so callers can await store readiness before
reading (getStateToPostToWebview now awaits it)
- Write-through to globalState now happens inside the store lock via
onWrite callback, preventing concurrent call races on the transition
period fallback
- Removed separate updateGlobalState("taskHistory") calls from
ClineProvider since the onWrite callback handles it serialized
* fix: add TaskHistoryStore to task-persistence mock in Task.persistence.spec.ts
The test mocks task-persistence with an explicit factory that was
missing the new TaskHistoryStore export, causing all 9 tests to fail
with "No TaskHistoryStore export is defined on the mock".
* perf: debounce globalState write-through to avoid full-array writes on every mutation
Instead of writing the entire HistoryItem[] array to globalState on
every upsert/delete (expensive with 5000+ tasks), the write-through
is now debounced with a 5-second window. Per-task file writes remain
immediate (~200 bytes each). The globalState is flushed on dispose
to ensure no data loss on shutdown.
This makes the hot path during streaming (token count updates) write
only the per-task file, not the full array.
---------
Co-authored-by: Roo Code <roomote@roocode.com>
* fix(chat): stabilize rehydration scroll-to-bottom convergence
* fix(chat): preserve user escape hatch during initial settle
* refactor(chat): reduce scroll fix PR scope and remove debug plumbing
* fix(chat): redesign rehydration scroll lifecycle
* refactor(chat): extract scroll lifecycle into useScrollLifecycle hook
- Extract ~400 lines of scroll lifecycle logic from ChatView.tsx into
a dedicated useScrollLifecycle hook, reducing ChatView scroll-related
refs from ~17 to 0 and making the logic testable in isolation.
- Reduce INITIAL_LOAD_SETTLE_HARD_CAP_MS from 10s to 5s. If rehydration
takes longer, there is likely a rendering performance issue worth
investigating separately.
- Document the scrollToIndex reversal: PR #6780 removed scrollToIndex
due to jitter from stale numeric indices. The "LAST" constant used
here resolves at call time, avoiding that issue.
- All 6 existing scroll regression tests pass unchanged.
* fix(chat): harden scroll lifecycle pointer intent and settle phase fallback
* test(chat): stabilize ChatView scroll debug repro flake
* refactor(chat): simplify hydration scroll lifecycle
* fix(chat): start existing task at latest message bottom
---------
Co-authored-by: Roo Code <roomote@roocode.com>
* feat: add per-workspace indexing opt-in and stop/cancel control
- Add codeIndexWorkspaceEnabled flag in workspaceState (default: false)
- Thread AbortController/AbortSignal through orchestrator → scanner
- Add Stop Indexing button and Stopping state to UI
- Fix handleSettingsChange() to abort active scan when disabling toggle
- Add translations for all 18 locales
* fix: correct abort handling in indexing scanner and orchestrator
- Re-throw AbortError in scanner's file processing catch block to prevent
abort signals from being silently swallowed as file errors
- Reorder stopWatcher() before setSystemState() in orchestrator abort
catch path to ensure watcher cleanup before state transition
- Update scanner test to assert AbortError propagation on mid-scan abort
* fix: optimize workspace check ordering, translate new i18n keys, fix abort handling
- Move workspace-enabled check before _recreateServices() in initialize()
to avoid creating Qdrant/embedder connections for disabled workspaces
- Translate new i18n keys (indexingStopped, indexingStoppedPartial, stopping,
stopIndexingButton, stoppingButton, workspaceToggleLabel,
workspaceDisabledMessage) in all 17 non-English locales
- Re-throw AbortError in scanner catch block to prevent silent swallowing
- Reorder stopWatcher() before setSystemState() in orchestrator abort path
- Update scanner test to assert AbortError propagation on mid-scan abort
- Fix recoverFromError test for workspace-enabled check ordering
* fix: per-folder enablement key, abort-safe dispose and back-pressure, translate i18n
Addresses 0xMink review feedback:
- Store workspace enablement keyed by folder path to support multi-root
workspaces (codeIndexWorkspaceEnabled:<path> instead of single boolean)
- Add test proving folder A enabled does not enable folder B
- dispose() now calls stopIndexing() to abort orphaned scans on folder removal
- Scanner back-pressure loop checks abort signal to avoid spin-waiting
- Move workspace-enabled check before _recreateServices() in initialize()
- Translate new i18n keys in all 17 non-English locales
- Fix abort handling in orchestrator and scanner catch blocks
* fix: flush debounced cache writes on abort to preserve indexing progress
* feat: add global auto-enable default for backward-compatible workspace indexing
* fix: stop/start indexer when auto-enable default changes effective state
* fix: URI-keyed enablement, throw AbortError in back-pressure, stopWatcher on early-return
* fix: iterate all managers when auto-enable default changes in multi-root workspaces
---------
Co-authored-by: James Mtendamema <jmtendamema@geologicai.com>
* Add file changes panel per conversation
Closes#11493
* Add unit tests for file changes and consolidate specs in src/__tests__
Closes#11493
* fix(chat): only show approved file diffs in conversation panel