Commit graph

5729 commits

Author SHA1 Message Date
Roo Code
d139c7b0e6 fix: Complete type fixes for Files Changed Overview feature 2025-09-08 17:33:25 -06:00
Roo Code
3dff339218 fix: Add remaining missing types for Files Changed Overview feature 2025-09-08 17:33:15 -06:00
Roo Code
c467d53d09 fix: Add missing types for Files Changed Overview feature 2025-09-08 17:32:56 -06:00
Shawn
4d90ad1d81 Fix TypeScript compilation errors and FileChangeManager logic after rebase
- Remove deprecated BridgeOrchestrator imports and usage from Task.ts, extension.ts
- Replace removed getUserSettings() method calls with fallbacks
- Fix type compatibility issues with clineMessages parameter
- Fix FileChangeManager baseline assignment and rejection logic
  - Auto-assign fromCheckpoint as initial baseline when files enter FCO
  - Fix rejection to preserve existing baselines
  - Fix acceptance to properly update baselines to current checkpoint
  - Add missing mock setups in tests for applyPerFileBaselines calls
  - Update test expectations to match calculated line differences
- All TypeScript type checking now passes (11/11 packages)
2025-09-08 17:32:44 -06:00
Hannes Rudolph
6569710752 fix: add cache reporting support for OpenAI-Native provider (#7602)
* fix: add cache reporting support for OpenAI-Native provider

- Add normalizeUsage method to properly extract cache tokens from Responses API
- Support both detailed token shapes (input_tokens_details) and legacy fields
- Calculate cache read/write tokens with proper fallbacks
- Include reasoning tokens when available in output_tokens_details
- Ensure accurate cost calculation using uncached input tokens

This fixes the issue where caching information was not being reported
when using the OpenAI-Native provider with the Responses API.

* fix: improve cache token normalization and add comprehensive tests

- Add fallback to derive total input tokens from details when totals are missing
- Remove unused convertToOpenAiMessages import
- Add comment explaining cost calculation alignment with Gemini provider
- Add comprehensive test coverage for normalizeUsage method covering:
  - Detailed token shapes with cached/miss tokens
  - Legacy field names and SSE-only events
  - Edge cases including missing totals with details-only
  - Cost calculation with uncached input tokens

* fix: address PR review comments

- Remove incorrect fallback to missFromDetails for cache write tokens
- Fix cost calculation to pass total input tokens (calculateApiCostOpenAI handles subtraction)
- Improve readability by extracting cache detail checks to intermediate variables
- Remove redundant ?? undefined
- Update tests to reflect correct behavior (miss tokens are not cache writes)
- Add clarifying comments about cache miss vs cache write tokens
2025-09-08 17:32:44 -06:00
John Richmond
b80167300c Cloud: fix provider syncing (#7603)
ClineProvider creation was moved before CloudService which broke
the old way of doing things.
2025-09-08 17:32:28 -06:00
Bruno Bergher
a8401164e3 Shows a pill with the base Roo Code Cloud URL when not pointing to pr… (#7555)
Co-authored-by: Roo Code <roomote@roocode.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>
Co-authored-by: roomote[bot] <219738659+roomote[bot]@users.noreply.github.com>
2025-09-08 17:32:28 -06:00
roomote[bot]
e063d63e17 feat: add configurable embedding batch size for code indexing (#7464)
Co-authored-by: Roo Code <roomote@roocode.com>
Co-authored-by: Daniel Riccio <ricciodaniel98@gmail.com>
2025-09-08 17:32:27 -06:00
github-actions[bot]
114008beec Changeset version bump (#7580)
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-09-08 17:32:27 -06:00
github-actions[bot]
313ff47e4b Update contributors list (#7462)
Co-authored-by: mrubens <2600+mrubens@users.noreply.github.com>
2025-09-08 17:32:27 -06:00
Matt Rubens
64cb7e67ad v3.26.4 (#7579) 2025-09-08 17:32:05 -06:00
Matt Rubens
08d92f889a Disconnect extension bridge on logout (#7563)
* Disconnect extension bridge on logout

* Remove bad test

* Cleanup
2025-09-08 17:32:05 -06:00
roomote[bot]
81d5f9d85a feat: add Ollama API key support for Turbo mode (#7425)
* feat: add Ollama API key support for Turbo mode

- Add ollamaApiKey field to ProviderSettings schema
- Add ollamaApiKey to SECRET_STATE_KEYS for secure storage
- Update Ollama and NativeOllama providers to use API key for authentication
- Add UI field for Ollama API key (shown when custom base URL is provided)
- Add test coverage for API key functionality

This enables users to use Ollama Turbo with datacenter-grade hardware by providing an API key for authenticated Ollama instances or cloud services.

* fix: use VSCodeTextField for Ollama API key field

Remove non-existent ApiKeyField import and use standard VSCodeTextField with password type, matching other provider implementations

* Add missing translation keys for Ollama API key support

- Add providers.ollama.apiKey and providers.ollama.apiKeyHelp to all 18 language files
- Support for authenticated Ollama instances and cloud services
- Relates to PR #7425

* refactor: improve type safety for Ollama client configuration

- Replace 'any' type with proper OllamaOptions (Config) type
- Import Config type from ollama package for better type checking

---------

Co-authored-by: Roo Code <roomote@roocode.com>
Co-authored-by: Daniel Riccio <ricciodaniel98@gmail.com>
2025-09-08 17:32:05 -06:00
roomote[bot]
b5eec19667 feat: rename Account tab to Cloud tab (#7558)
Co-authored-by: Roo Code <roomote@roocode.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>
2025-09-08 17:32:04 -06:00
Daniel
feb0cc1f86 feat: optimize memory usage for image handling in webview (#7556)
* feat: optimize memory usage for image handling in webview

- Replace base64 image data with webview URIs to reduce memory footprint
- Add proper resource roots to webview for workspace file access
- Implement convertToWebviewUri method for safe file-to-URI conversion
- Update ImageViewer to handle both webview URIs and file paths separately
- Add image message type for proper image rendering in chat
- Improve error handling and display for failed image loads
- Add comprehensive tests for ImageViewer component
- Format display paths as relative for better readability

This change significantly reduces memory usage by avoiding base64 encoding
of images and instead using VSCode's webview URI system for direct file
access. Images are now loaded on-demand from disk rather than being held
in memory as base64 strings.

* fix: address PR review comments

- Use safeJsonParse instead of JSON.parse in ChatRow.tsx
- Add type definition for parsed image info
- Add more specific error types in ClineProvider.ts
- Add comprehensive JSDoc comments to ImageBlock.tsx
- Improve error handling and type safety

* fix: address MrUbens' review comments

- Remove hardcoded 'rc1' pattern in formatDisplayPath, use generic workspace detection
- Internationalize 'No image data' text using i18n system

* chore: remove useless comment

* chore(i18n): add image.noData to all locales to fix translation check

* test: update ImageViewer.spec to align with i18n key and flexible path formatting
2025-09-08 17:31:50 -06:00
Matt Rubens
3725917199 Putting the Roo in Roo-leases (#7546) 2025-09-08 17:31:50 -06:00
Chris Estreich
47855ed69f Mode and provider profile selector (#7545) 2025-09-08 17:31:40 -06:00
github-actions[bot]
0126507e9b Changeset version bump (#7542)
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-09-08 17:31:23 -06:00
Matt Rubens
3d14f87cbb chore: add changeset for v3.26.3 (#7541) 2025-09-08 17:31:23 -06:00
Daniel
a96fe08b18 refactor: flatten image generation settings structure (#7536) 2025-09-08 17:31:23 -06:00
roomote[bot]
5236675d9a feat: sync extension bridge settings with cloud (#7535)
- Use CloudService.getUserSettings() for remoteControlEnabled instead of global state
- Update CloudService.updateUserSettings when toggling remote control
- Add BridgeOrchestrator.connectOrDisconnect handling in settings update handler
- Remove dependency on contentProxy/globalSettings for remote control state
---------

Co-authored-by: Roo Code <roomote@roocode.com>
Co-authored-by: John Richmond <5629+jr@users.noreply.github.com>
2025-09-08 17:31:23 -06:00
roomote[bot]
5ddd4635ec feat: add optional input image parameter to image generation tool (#7525)
Co-authored-by: Roo Code <roomote@roocode.com>
Co-authored-by: Daniel Riccio <ricciodaniel98@gmail.com>
2025-09-08 17:31:22 -06:00
Chris Estreich
3f51a57045 Implement deferred task subscriptions (#7517) 2025-09-08 17:31:03 -06:00
Chris Estreich
2b7e259983 Refactor the extension bridge (#7515) 2025-09-08 17:31:03 -06:00
Chris Estreich
af00c627b7 Move @roo-code/cloud to the Roo-Code repo (#7503) 2025-09-08 17:30:44 -06:00
github-actions[bot]
8d94af5b7a Changeset version bump (#7491)
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-09-08 17:30:12 -06:00
Daniel
94b4a5ccc2 fix: prevent dirty state on initial mount in ImageGenerationSettings (#7495) 2025-09-08 17:29:56 -06:00
Matt Rubens
67af3ba4e1 Add padding to image model picker (#7494) 2025-09-08 17:29:40 -06:00
Daniel
1dabac2af7 feat: update OpenRouter API to support input/output modalities and filter image generation models (#7492) 2025-09-08 17:29:40 -06:00
Matt Rubens
09d8ff770a Support free imagegen (#7493) 2025-09-08 17:29:16 -06:00
Matt Rubens
e8d5e9102a Release v3.26.2 (#7490) 2025-09-08 17:29:16 -06:00
Daniel
ea51c04483 feat: add image generation tool with OpenRouter integration (#7474)
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>
Co-authored-by: cte <cestreich@gmail.com>
2025-09-08 17:29:16 -06:00
Matt Rubens
3eb9d12534 Bump cloud to 0.25.0 (#7475) 2025-09-08 17:28:40 -06:00
Daniel
6842fff258 Fix GPT-5 Responses API issues with condensing and image support (#7067)
Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
Co-authored-by: Roo Code <roomote@roocode.com>
Co-authored-by: Hannes Rudolph <hrudolph@gmail.com>
2025-09-08 17:27:24 -06:00
Matt Rubens
602a4fea7f Add type for RooCodeEventName.TaskSpawned (#7465) 2025-09-08 17:16:06 -06:00
Shawn
11dd48a685 Simplify FileChangeManager architecture with proper accept and reject logic for Files Change Overview
• Replace dual Set<string> (acceptedFiles/rejectedFiles) with single Map<string, string> (acceptedBaselines) for cleaner state management
• Remove complex hiding/unhiding logic in applyPerFileBaselines()
• Rejected files are simply removed from changeset and reappear naturally when edited again via update FCOAfterEdit
• Accepted files get per-file baselines to show only incremental changes
• Self-correcting system: file visibility determined by diffs, not flags
2025-09-08 17:12:44 -06:00
Shawn
21661d7484 Files Changed Overview updating after file edits using tool calls.
Problem:
  - FCO missing last edited file (calculated at checkpoint creation before tools execute)
  - FCO disappears when tasks are aborted (state not preserved)
  - Manual user edits must remain protected during rollback (issue #4827)

  Solution:
  - Add immediate FCO updates after each file editing tool execution
  - Preserve FCO state during task abort and restore on resume
  - Maintain checkpoint timing BEFORE edits for rollback safety
  - Add final checkpoint on task completion to capture all changes

  Changes:
  - Add updateFCOAfterEdit helper to calculate and display changes without checkpoints
  - Update presentAssistantMessage to call FCO updates after file tools
  - Add final checkpoint in attemptCompletionTool
  - Preserve/restore FCO state in ClineProvider during abort/resume
  - Add test utilities for checkpoint functionality

  This separates FCO visibility (immediate updates) from checkpoint safety (before edits),
  solving both user experience issues while maintaining rollback protection.
2025-09-08 17:12:44 -06:00
Shawn
32dafd3dd9 removed initial checkpoint creation
Pathing shows up on a separate line from the file name
2025-09-08 17:06:51 -06:00
Shawn
1b199674fa possible checkpoint memory leak
- Fix checkpoint memory leak by making
  ongoingCheckpointSaves task-scoped
- Moved ongoingCheckpointSaves Map from module-level to
  Task class property
- Add cleanup in Task.dispose() method to prevent memory
   leaks
- Update checkpoint functions to use task-scoped Map
- Fix test mock to include ongoingCheckpointSaves
  property
2025-09-08 17:06:51 -06:00
Shawn
8715471bb5 Removed UI from settings, Files Changed now stacked properly under Todo 2025-09-08 17:05:21 -06:00
Shawn
de2a236bac Switched to tailwind for FilesChangedOverview
- Reduced from 21 to 4 inline styles (only dynamic ones remain)
  - Converted static styles to Tailwind CSS classes:
    - Container styles: border, px-2.5, py-1.5, m-0, etc.
    - Flexbox layouts: flex, justify-between, items-center, gap-2
    - Button styles: Consistent classes for primary/secondary/icon buttons
    - Text styles: font-mono, text-xs, font-medium, etc.
  - Preserved dynamic styles for runtime calculations:
    - Virtualization: height, transform
    - State-based: opacity, borderBottom
  - Updated tests to check for CSS classes instead of inline styles
2025-09-08 17:03:59 -06:00
Shawn
bb2ae8d7dd ix: code quality improvements for FCO feature and address more comments
- Remove duplicate enableCheckpoints check in checkpoints/index.ts
  - Remove unused _CheckpointEventData interface from
  FilesChangedOverview.tsx
  - Fix message type naming consistency: checkpoint_created ->
  checkpointCreated, checkpoint_restored -> checkpointRestored
  - Remove debug console.log statements from checkpoints/index.ts
2025-09-08 17:03:58 -06:00
Shawn
3048471ae1 Ignore empty tool usage
Added more test cases missing and removed cases in case nothing was changed. and made it so those get ignored by the fco
2025-09-08 17:02:08 -06:00
Shawn
b4086b1a5a Chat-only edits are not tracked 2025-09-08 17:02:08 -06:00
Shawn
90d9306534 Apply missing FCO theming changes from backup branch
From commit 71c63f9a6 'language files, theming, bug fix, Test improvements':

Theming Updates:
- Convert from Tailwind CSS classes to inline styles for consistent theming
- Make Files Changed Overview match TodoList theming (slim and compact)
- Simplify formatLineChanges to show only '+X, -Y' format (no translations)
- Remove parentheses from count format in summary
- Update FileItem to use thinner rows (32px instead of 60px)
- Apply compact padding and margins throughout component

Visual Changes:
- Smaller button sizes and padding for compact look
- Consistent inline styling using CSS variables
- Better alignment with VS Code theming system
- Matches TodoList component styling for unified look

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-08 17:02:08 -06:00
Shawn
390c500d40 Apply remaining FCO edge case fixes from backup branch
Applies commits 04bd21403 and 3d15bba1d from backup branch:

FCO Edge Case Fixes:
- Add .roo/ exclusion to checkpoint diffs
- Filter out directories from ShadowCheckpointService.getDiff()
- Implement improved line-by-line diff calculation in FileChangeManager
- Add comprehensive FileChangeManager tests (70+ test cases)

Windows Compatibility:
- Fix 'core.bare and core.worktree do not make sense' error
- Add core.bare=false configuration for shadow git repos

LLM-Only Filtering:
- Complete async integration of getLLMOnlyChanges() in FCO handlers
- Fix getCurrentCline → getCurrentTask method name alignment
- Update all FCO message handlers to use LLM-only filtering

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-08 17:02:08 -06:00
Shawn
709a7029da Fix type issues in FCOMessageHandler
- Change getCurrentCline() to getCurrentTask()
- Fix Promise return type in test mock

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-08 17:02:08 -06:00
Shawn
877404aab9 Bug fixes and test cases added
- Added more tests for checkpoints
- Fixed bug where fco was not updating after checkpoints properly.
- It would include all previous edits from the previous checkpoint on tasks that were mid edit.
- Added timestamp checking to cover the edge case.
- Added tests for the edge cases covered.
- Bug fix for users enabling FCO after some time using the task.
- One more edge case being covered when the user enables fco after talking with the task for a while.
- To solve this, added test cases and have the settings enabled to set the timestamp if it was previously disabled.
- Added better separation of concerns for testing of FCO web ui.
2025-09-08 17:02:08 -06:00
Hannes Rudolph
46683d3344 chore(shared): dedupe WebviewMessage.type union; add WebviewMessagePayload alias; clarify ExtensionMessage header comment 2025-09-08 17:02:08 -06:00
Hannes Rudolph
39d2ca2ba3 style(webview): replace remaining inline styles in FilesChangedOverview with CSS utility classes where feasible; keep dynamic styles for virtualization 2025-09-08 17:01:09 -06:00