* feat: apply changes from local main
* fix: add missing types
* feat: deduplicate code blocks coming out of parser
* feat: implement a cache manager to improve cache handling
* refactor: move code index service initialization to extension and remove await from indexing process
* fix: return undefined instead of throwing if no workspace is detected
* feat: allow auto approve if it is active for read tools
* refactor: improve UI of the results and allow opening the ranges directly in the editor
* refactor: use dependency injection to improve performance
* feat: implement result filtering by directory path
* refactor: centralize path normalization logic
* refactor: remove unnecessary barrel file
* refactor: prevent restarting the service if no settings change
* fix: the indexing process should never be awaited
* refactor: cleanup unused method
* refactor: remove batch limits for ollama
* refactor(parser): simplify method signatures and improve chunking logic
- Remove redundant min/max chars parameters
- Add better handling for oversized lines
- Improve chunking logic with segment handling
- Clean up method signatures and parameter ordering
* fix(settings): make select inputs full width in CodeIndexSettings
* refactor: increase max list file limit
* feat(ui): improve codebase search result display formatting
* test: add tests for cache and config managers
* test: create unit tests for parser and scanner
* feat(parser): improve segment hash uniqueness
- Added startCharIndex to segment hash calculation in _chunkTextByLines
- Track character position when splitting oversized lines
- Ensures unique identification of segments from same line
* feat(file-watcher): add error logging and optional ignoreController injection
* fix: allow getting the state if the service is disabled
* fix: set the embedding models when cline provider is initialized
* feat: use zod to validate form
* feat(file-watcher): enhance file watcher for batched deletions and improved vector store interactions
Improve file watcher to handle file deletions in batches and optimize vector store operations.
* feat(CodeIndexSettings): move OpenAI key input to a conditional rendering block
* feat(CodeIndexSettings): update button visibility based on indexing status
* feat(file-watcher): refactor vscode mock and enhance file watcher tests
* fix(CodeIndexManager): do not await startIndexing on configuration changes
* feat(types): add codeIndexOpenAiKey and codeIndexQdrantApiKey to ProviderSettings and IpcMessage
* feat(FileWatcher): enhance file processing with batch operations and new status handling
* fix(webviewMessageHandler): handle errors during CodeIndexManager initialization
* refactor(CodeIndexManager): streamline service creation by consolidating into a single method
* feat(CodeIndex): implement minimum search score configuration and update search methods
* refactor(CodeIndexSettings): replace ApiConfiguration with ProviderSettings and update related methods
* refactor: move contants to centralized file
* refactor(constants): rename CODEBASE_INDEX_SEARCH_MIN_SCORE to SEARCH_MIN_SCORE
* feat(QdrantVectorStore): enhance search functionality with new query structure and indexing
* feat(FileWatcher): implement batch processing and retry logic for upserting points
* fix(CodeIndexSettings): rename setProviderSettingsField to setApiConfigurationField and move model label
* fix(ChatRow): remove limit from search query messages
* refactor(CodebaseSearchResult): remove unused props from component
* feat: implement batch processing for file events in FileWatcher
- Introduced a new mechanism to accumulate file events (create, change, delete) and process them in batches.
- Added debounce functionality to optimize processing frequency.
- Emitted events for batch processing start, progress updates, and completion with detailed summaries.
- Refactored existing processing logic to handle batch deletions and upserts efficiently.
- Enhanced error handling and logging for better traceability during batch operations.
* feat(CodeIndex): implement batch processing and update progress reporting
* fix: define a default url for qdrant
* feat(CodeIndexManager): add initialization check and update startIndexing logic
* feat(CodeIndexSettings): validate Qdrant URL and update settings commitment logic
* feat: refactor progress calculation and update progress bar rendering
* refactor: remove webview provider and related methods
* fix: simplify indexing status update by directly using update values
* feat: integrate .gitignore support into file processing and scanning logic
* fix: update clearCacheFile method to write an empty object instead of deleting the cache file
* Revert this
* Run prettier
* fix: add new dependencies for qdrant client and directory scanner
* feat: add codebase search functionality to localization files
* feat: add localization strings for codebase indexing settings
* feat: integrate CodeIndexSettings into ExperimentalSettings and update settings localization
* refactor: remove console logs from various components for cleaner output
* feat: enhance capabilities section and codebase search tool description
* feat: add code indexing localization for multiple languages
* fix: correct indentation for CodeIndexSettings component in ExperimentalSettings
* refactor: update unit tests to properly test current functionality
* feat: add mock implementation for p-limit and update Jest config
* feat: track file creation, change, and deletion events in accumulatedEvents
* refactor: simplify file watcher tests by removing waitForFileProcessingToFinish and using direct event accumulation
* refactor: mock ContextProxy's getValue method to return current config name in ClineProvider tests
* refactor: mock missing properties required by codebase indexing manager
---------
Co-authored-by: cte <cestreich@gmail.com>
* Litellm models can now be refreshed
* Fix no-case-declarations lint issue and put back missing autoCondenseContextPercent webviewMessageHandler case
* Add tests for litellm config changes
* replace hardcoded keys with constants
Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>
Co-authored-by: Your Name <you@example.com>
* [Condense] Add a slider for the context condense threshold
* slider UI
* condense if we reach the threshold
* fixes
* test typing fixes
* add more truncate tests
* changeset
* update translations
* fix missing type
* [Condense] Add a button to condense the task context
* wip
* wip
* wip
* bring back delete size
* account for the system prompt in the context
* update tests to use systemPrompt
* add type
* translations
* nit
* update tests
* filter to the current task
* nit
* refactor
* nit
* non interactive option
* simplify chat summary UI
* changeset
* nit
* fix check-types
* throw
* feat(settings): Introduce the "auto-approve request count" feature from Cline
This is the first minor UI feature I've added, so please let me know if I'm missing anything! (translations, organization, etc!)
Please see commits for details
introduce allowedMaxRequests to globalSettingsSchema
update ExtensionState and its context with allowedMaxRequests
implement UI for setting max requests in AutoApproveMenu component
prompt user when auto-approval limit is reached with i18n support
increment consecutiveAutoApprovedRequestsCount and reset upon user approval
add translations for auto-approved request limit reached prompt in multiple languages
add new UI for "auto_approval_max_req_reached" in ChatRowContent
display prompt with title, description, and button for user action
🔧 chore(gitignore): add .idea to .gitignore to exclude IDE-specific files
- remove .idea/workspace.xml to clean up repository
* 🔧 chore(gitignore): add IDE configuration files to ignore list
- add .idea directory to ignore JetBrains IDE configurations
* 🌐 i18n(chat): add translation keys for api request limit
- introduce translation keys for "title" and "unlimited" in multiple languages
- update description for api request limit in various languages
* 🌐 i18n(chat): migrate auto-approved request limit translations
- move translations from common.json to chat.json across locales
- update component to use Trans for dynamic text rendering
* Update the UI for setting max requests
* Hide the auto-approve limit warning once clicked
---------
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>
* fix(terminal): Ensure correct handling of carriage returns for progress bars
This commit refines the tests for `TerminalProcess` to ensure the correct interpretation of terminal output containing carriage returns (`\\r`), which is essential for properly handling dynamic elements like progress bars (e.g., `tqdm`).
- Validated the `processCarriageReturns` method's behavior in simulating terminal line overwrites caused by `\\r`.
- Corrected the expectation in the `handles carriage returns in mixed content` test to accurately reflect the method's output (final line content + preserved escape sequences), confirming the logic works as intended for progress-bar-like updates.
- Fixed a minor Jest `toBe` syntax error in a related test case.
- Suppressed an expected `console.warn` in the non-shell-integration test for cleaner logs.
By ensuring `processCarriageReturns` is correctly tested, we increase confidence that the component responsible for pre-processing terminal output handles progress bars appropriately before the output is potentially used elsewhere (e.g., sent to an LLM).
* fix(test): Make TerminalProcess integration test reliable
This commit fixes the flaky test case `integrates with getUnretrievedOutput to handle progress bars` in `TerminalProcess.test.ts`.
The test previously failed intermittently due to:
1. Relying on a fixed `setTimeout` duration to wait for asynchronous stream processing, which created a race condition.
2. Incorrectly assuming that `await terminalProcess.run(...)` would return the final output directly via its resolved value.
The fix addresses these issues by:
- Removing the unreliable intermediate check based on `setTimeout`.
- Modifying the test to correctly obtain the final output by listening for the `completed` event emitted by `TerminalProcess`, which is the intended way to receive the result.
This ensures the test accurately reflects the behavior of `TerminalProcess` and is no longer prone to timing-related failures.
* Add changeset for terminal carriage return fix
* Implement terminal compress progress bar feature
This commit introduces a new feature to compress terminal output by processing carriage returns. The `processCarriageReturns` function has been integrated into the `Terminal` class to handle progress bar updates effectively, ensuring only the final state is displayed.
Additionally, the `terminalCompressProgressBar` setting has been added to the global settings schema, allowing users to enable or disable this feature.
Tests have been updated to validate the new functionality and ensure correct behavior in various scenarios.
A Benchmark is also added to test the performance.
Not that there is still no i18n support for this.
* Add i18n support for compressProgressBar setting in multiple languages
* Optimize processCarriageReturns function for performance and multi-byte character handling
This commit enhances the `processCarriageReturns` function by implementing in-place string operations to improve performance, especially with large outputs. Key features include:
- Line-by-line processing to maximize chunk handling.
- Use of string indexes and substring operations instead of arrays.
- Single-pass traversal of input for efficiency.
- Special handling for multi-byte characters to prevent corruption during overwrites.
Additionally, tests have been updated to validate the new functionality, ensuring correct behavior with various character sets, including emojis and non-ASCII text.
Highly Density CR case is added to Benchmark
* slight performance improvement by caching several variable
* Optimize multi-byte character handling in processCarriageReturns
Refactor the logic within the `processCarriageReturns` function to simplify the detection of partially overwritten multi-byte characters (e.g., emojis).
Removed redundant checks and clarified the conditions for identifying potential character corruption during carriage return processing. This improves code readability and maintainability while preserving the original functionality of replacing potentially corrupted characters with a space.
Also enforced consistent use of semicolons for improved code style.
* docs: standardize carriage return (\r) and line feed (\n) terminology
Improve code clarity by consistently adding escape sequence notation to all
references of carriage returns and line feeds throughout documentation and tests.
This makes the code more readable and avoids ambiguity when discussing these special characters.
* feat: Improve terminal output processing clarity and settings UI
- Add detailed comments to `processCarriageReturns` explaining line feed handling.
- Relocate `terminalCompressProgressBar` setting below `terminalOutputLineLimit` for better context in UI.
* Fix: Compress Progress Bar Setting Checkbox
---------
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>
* refactor: enhance insertGroups and insertContentTool for better handling of insertion operations
* refactor: simplify insert_content tool
- Remove operations-based implementation in favor of single line insertion
- Update parameters from operations to line and content
- Simplify insertion logic and error handling
- Update tool description and documentation
- Remove XML parsing for operations
- Clean up code and improve error messages
* refactor: remove insert_content experiment and related tests
* Remove the append_to_file tool
* Improvements to chat row and instructions
---------
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>
* Refactor search and replace tool
* feat(search-replace): enhance search/replace tool UI and messaging
Refactor search/replace tool message structure for better consistency
Add dedicated UI component for displaying search/replace operations
Add i18n support for search/replace operations in all supported languages
Improve partial tool handling in searchAndReplaceTool
* Remove search_and_replace experiment and related references
Creates a temporary ZDOTDIR to handle zsh shell integration properly while preserving user's zsh configuration. This ensures VSCode shell integration works correctly with zsh without modifying the user's existing setup.
- Add terminalZdotdir setting (disabled by default)
- Create temporary directory with proper security (sticky bit)
- Add automatic cleanup on terminal close
- Add translations for all supported languages
User confirmed fixes:
Fixes: #2205Fixes: #2129
Signed-off-by: Eric Wheeler <roo-code@z.ewheeler.org>
Added two new terminal settings:
- terminalZshOhMy: Sets ITERM_SHELL_INTEGRATION_INSTALLED=Yes for Oh My Zsh
- terminalZshP10k: Sets POWERLEVEL9K_TERM_SHELL_INTEGRATION=true for Powerlevel10k
Signed-off-by: Eric Wheeler <roo-code@z.ewheeler.org>
Added a new configuration option 'terminalZshClearEolMark' (default: true) that
sets PROMPT_EOL_MARK='' in the terminal environment. This prevents issues with
command output interpretation when the output ends with special characters like '%'.
Added translations for all supported languages.
Fixes: #2194
Signed-off-by: Eric Wheeler <roo-code@z.ewheeler.org>
Add a new configuration option that allows users to toggle the PowerShell counter workaround. This workaround adds a counter to PowerShell commands to ensure proper command execution and output capture.
The setting is disabled by default, allowing users to enable it only when needed.
Signed-off-by: Eric Wheeler <roo-code@z.ewheeler.org>
Add a new configurable setting to control command execution delays in terminals.
When set to a non-zero value, this adds a sleep delay after command execution
via PROMPT_COMMAND in bash/zsh and start-sleep in PowerShell.
The default value is 0, which disables the delay completely. This setting
replaces the previous hardcoded delay of 50ms that was added as a workaround
for VSCode bug #237208.
Fixes: #2017
Signed-off-by: Eric Wheeler <roo-code@z.ewheeler.org>
* Directly use provider rateLimitSeconds and remove uneeded default
* remove a bunch of unused rateLimitSeconds references
* rateLimitSettings field def in GlobalSettingsRecord isn't needed for migration
* Browser Automation Improvements
* Added multi-tab remote Chrome support
* Added support for hover
* Properly caching remote browser host in global state
* Cleanup functions
* Updated for changes after merge
* Added www. exception for common tabs
* Update src/core/webview/ClineProvider.ts
* Revert README changes
---------
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>
* feat: add pinning functionality for API configurations
Added the ability to pin/unpin API configurations, enabling prioritized appearance in dropdown menus.
- modified state management to support storing pinned configurations persistently.
- Updated UI components to display and toggle pin states
- Adjusted backend handling for syncing pinned configuration states across sessions.
* refactor: add support for loading API configurations by ID
- Introduced a new method `loadConfigById` in `ConfigManager` to load API configurations using their unique ID.
- Refactored the dropdown and pin logic to work with ID
- Added tests to verify the new functionality for loading configurations by ID.
* fix: preserve existing API config ID on updates
- Ensure that the existing ID is retained when updating an API config.
- Prevents unintentional ID changes during configuration updates.
* Fix theme issues
---------
Co-authored-by: james <james@systemslogiq.com>
Co-authored-by: cte <cestreich@gmail.com>
* Code for new fetch_instructions tool
* Call parameter for fetch_instructions task, not text
* Additional places that fetch_instructions needs to be added.
* Pass necessary objects into create MCP server code
* Update snapshots to reflect changes to prompts
* Fixes from testing
* Move guidance on creating project modes to fetchable instructions
* i18n for new prompt
Translations suggested by Roo.
* Missing translation
* Another missing i18n update
* Missing Catalan translation
* Re-use content parameter on ClineSayTool
* Remove space from zh-TW translation
This is consistent with other translations
Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
* PR review - suggested changes to prompts
* Slightly more conservative in terms of text pruning from default prompt
* Move additional detail about mode creation into fetch_instructions instructions
---------
Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
* feat read file range
feat: add file truncation with code structure preview
Add configurable line limit for large file handling with source code structure preview. This improves performance and memory usage while maintaining code readability.
Key changes:
Add maxReadFileLine setting (default: 4500) with UI controls
Create efficient line counter utility using streams
Add parseSourceCodeDefinitionsForFile for single file parsing
Show truncation notice with code structure for large files
Add comprehensive tests for new functionality
Move file extensions to shared constant
add line number
pr comment
Return definition ranges from tree-sitter
make treesitter always add line
add line number to rg search
enhance tree siter output & fix test
update snapshot
fix test
* Add translations, tweak range
---------
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>
* fix: clarify PowerShell command completion workaround
The command completion detection approach in PowerShell requires an output
string to allow duplicate commands to execute in some versions of code.
Update the string to explicitly indicate it is a Roo PowerShell workaround,
making it clear in terminal output that this is intentional behavior rather
than a side effect.
Signed-off-by: Eric Wheeler <roo-code@z.ewheeler.org>
* cleanup: improve terminal logging and error handling
No functional changes - purely improves error handling and logging clarity.
Terminal.ts:
- Handle undefined process state in setActiveStream without throwing
- Add terminal IDs to all log messages for better traceability
- Improve error message clarity in shell integration timeout
TerminalRegistry.ts:
- Reorganize shell execution event handlers for better flow
- Log shell execution events before processing for reliable debugging
- Add detailed context to terminal not found scenarios
- Include command and execution state in error messages
Signed-off-by: Eric Wheeler <roo-code@z.ewheeler.org>
* feat: make terminal shell integration timeout configurable
Users with long shell startup times were encountering "Shell Integration Unavailable" errors due to the hard-coded 4s timeout. The timeout is now configurable through Advanced Settings (1-60s).
Thanks @filthy for troubleshooting and @kiwina for suggesting making the timeout configurable.
Fixes#1654
Signed-off-by: Eric Wheeler <roo-code@z.ewheeler.org>
* critical fix: race condition that prevents command completion
Terminal running state is now managed in TerminalRegistry instead of Terminal to prevent race between stream close and shell completion.
While this race may not trigger on current VSCode versions, newer releases with additional terminal fixes may expose the issue. This proactively prevents "Shell execution end event received, but process is not running" errors.
Signed-off-by: Eric Wheeler <roo-code@z.ewheeler.org>
* fix: improve command execution path reporting
Enhance clarity of command execution context and error reporting:
- Check to see if the directory changed because of the command
- Clarify execution path message
- Add explicit message when command exits with non-zero code
Signed-off-by: Eric Wheeler <roo-code@z.ewheeler.org>
* system instructions: clarify terminal directory operations
Clear guidance for the AI system on:
- Working directory constraints
- Path handling requirements
- Tool vs terminal directory behavior
Signed-off-by: Eric Wheeler <roo-code@z.ewheeler.org>
* test: update snapshots for system prompt working directory instructions
Signed-off-by: Eric Wheeler <roo-code@z.ewheeler.org>
---------
Signed-off-by: Eric Wheeler <roo-code@z.ewheeler.org>
Co-authored-by: Eric Wheeler <roo-code@z.ewheeler.org>
Co-authored-by: Chris Estreich <cestreich@gmail.com>
* Add text-to-speech functionality
* Add speed config option to text-to-speech
* Fix test case for tts speed slider
* Fix test case for tts speed slider (really)
* Disabled error message logging in tts.ts
* ignore markdown and mermaid diagrams in TTS
* add ttsEnabled and ttsSpeed to GlobalStateKey
* fix failing webview test for save button
* Translations
* Fix tests
---------
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>