Commit graph

202 commits

Author SHA1 Message Date
Daniel
61e122dc34
Codebase indexing (Clean history) (#3137)
* 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>
2025-05-23 19:07:19 -06:00
slytechnical
1791bb9053
Ability to refresh LiteLLM models list (take 2) (#3852)
* 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
2025-05-23 16:19:40 -05:00
SannidhyaSah
d149d65e14
Feature/condensing enhancements (#3826)
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>
2025-05-22 17:26:46 -04:00
Canyon Robins
1fe65364ee
[Condense] Add a slider for the context condense threshold (#3790)
* [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
2025-05-21 12:10:00 -07:00
Canyon Robins
c3716f1107
[Condense] Add a button to condense the task context (#3623)
* [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
2025-05-20 13:47:02 -07:00
Chris Hasson
25cd57e157
feat(settings): Add allowedMaxRequests feature inspired by Cline (#3631)
* 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>
2025-05-20 11:30:27 -04:00
John Richmond
8cb5c4e9e3
Restore profile management work + fix #3434 (#3449)
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>
2025-05-12 15:47:09 -04:00
Matt Rubens
730d037a12
Revert "Improve provider profile management in the external API (#3386)" (#3440) 2025-05-10 08:27:37 -04:00
Chris Estreich
c21aa230e3
Get rid of ApiConfiguration type alias, rename ApiConfigMeta to ProviderSettingsEntry (#3380) 2025-05-08 23:52:18 -07:00
Chris Estreich
973295835a
Webview message handler + terminal settings cleanup (#3189) 2025-05-05 12:56:41 -07:00
KJ7LNW
904f71cb19
feat: add VSCode terminal environment inheritance setting (#2862)
Co-authored-by: Eric Wheeler <roo-code@z.ewheeler.org>
2025-05-05 12:19:50 -07:00
Chris Estreich
1d7569b14c
Improve command execution component (#3057) 2025-04-29 23:56:59 -07:00
Chris Estreich
2e1d949e65
Add support for multiple command execution strategies (#2820) 2025-04-28 08:55:07 -07:00
Sacha Sayan
83133c6e6d
UI top down homescreen (#2951)
* isotrUpdate welcome screen UI components and fix unused variable

* Save collapsibility.

* Add persistence, locales.

* Top layout, expanded tips.

* Minimal 'tasks' language.

* Adjust announcement positioning/dimensions.

* Fix tests, defaults.

* Fix translations.

* Compromise-compromise.

* Final tweaks.

* More tweaks.

* More tweaks.

* Issues fix.

* Update translations, remove debug.

* Fix transparency issue.

---------

Co-authored-by: hannesrudolph <hrudolph@gmail.com>
2025-04-25 22:39:11 -04:00
Chris Estreich
cb29e9d56f
Remove ModelInfo objects from settings (#2939) 2025-04-25 15:23:25 -07:00
Yikai Liao
b5ffaf1ba2
Fix Terminal Carriage Return Handling for Correct Progress Bar Display (#2562)
* 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>
2025-04-24 00:22:47 -04:00
Sam Hoang Van
f06567d579
Feat/improve insert block content (#2510)
* 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>
2025-04-21 16:49:27 -04:00
Sam Hoang Van
80b298492c
improve search and replace tool (#2764)
* 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
2025-04-21 15:25:03 -04:00
Sacha Sayan
159e4005e5
UI Glam Sesh: Makeover for TaskHeader, ChatView, HistoryPreview... (#2701)
* - UI Glam Session -> Makeover for TaskHeader, ChatView, HistoryPreview, WelcomeView
- In particular, display a "no tasks in workspace" message when no tasks are found.
- Clean up Inferface Settings (not needed now) on Settings View
- Copy updates throughout these areas.

* Apply suggestions from code review

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

* Missing translation string.

* Fix test

* Fix tests

* Improve translations / fix missing strings.

* Support xAI for evals (#2703)

* Make sure the slash commands only fire if they're the first character (#2702)

* Update contributors list (#2675)

docs: update contributors list [skip ci]

Co-authored-by: mrubens <mrubens@users.noreply.github.com>

* v3.12.3 (#2710)

* Changeset version bump (#2711)

* changeset version bump

* Updating CHANGELOG.md format

* Update CHANGELOG.md

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: R00-B0T <github-actions@github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* Update translations

---------

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
Co-authored-by: cte <cestreich@gmail.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: R00-B0T <110429663+R00-B0T@users.noreply.github.com>
Co-authored-by: R00-B0T <github-actions@github.com>
2025-04-17 12:54:55 -04:00
Aleksandr Kirillov
1cca4f47c7
feat: Add 'roo.acceptInput' command (#2598)
* feat: Add 'roo.acceptInput' command

* Update package.nls.json

* Update translations

---------

Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>
2025-04-15 23:01:45 -04:00
Chris Estreich
3b19d7a455
Await checkpoint saves (except the initial) (#2665) 2025-04-15 16:57:12 -07:00
Zhang Tony
d3c65ceac6
feature: Closable welcome message (#2541)
* draft: try to add a setting button

* Add showGreeting setting and related changes

* i18n: showGreeting

* fix chinese i18n 'dot'
2025-04-13 01:16:01 -04:00
Eric Wheeler
4ef62c6a13 feat: add ZDOTDIR handling for zsh shell integration
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: #2205
Fixes: #2129

Signed-off-by: Eric Wheeler <roo-code@z.ewheeler.org>
2025-04-11 13:09:41 -07:00
Eric Wheeler
b4c67f133b feat: add terminal settings for Oh My Zsh and Powerlevel10k shell integration
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>
2025-04-10 21:18:37 -07:00
Eric Wheeler
b020e46076 fix: clear ZSH EOL mark to prevent command output interpretation issues
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>
2025-04-10 21:18:37 -07:00
Eric Wheeler
211e31b8f6 feat: add terminalPowershellCounter configuration option
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>
2025-04-10 21:18:37 -07:00
Eric Wheeler
4d1cfe8141 feat: add terminal.commandDelay setting
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>
2025-04-10 21:18:37 -07:00
Ross McFarland
58149a083e
Clean up global rateLimitSeconds & fully shift to provider version (#2408)
* 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
2025-04-08 11:21:54 -04:00
Marco Quinten
fff8fdd3f3
feat(browserTool): Implement resize action (#2370)
* Implement resize action for browser action tool

* Update snapshots
2025-04-07 09:34:32 -04:00
Aleksandr Kirillov
88cac3c9d8
feat: add command to focus Roo Code input field (#2369)
* feat: add command to focus Roo Code input field

* fixup! feat: add command to focus Roo Code input field

* fixup! feat: add command to focus Roo Code input field
2025-04-07 07:54:49 -04:00
Matt Rubens
b0b4240c8b
Revert "feat @-mention window path style & file with space (#1924)" (#2162)
* Revert "feat @-mention window path style & file with space (#1924)"

This reverts commit c62e8f2ee2.

* Add changeset
2025-03-31 15:56:47 -05:00
Afshawn Lotfi
cbe7075f4f
In-Editor Browser Improvements (#1601)
* 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>
2025-03-29 00:46:01 -04:00
Chris Estreich
0fd399de78
Automatically generate roo-code.d.ts (including type generation via zod-to-ts) (#2024) 2025-03-27 09:38:56 -07:00
Sam Hoang Van
c62e8f2ee2
feat @-mention window path style & file with space (#1924)
* feat @-mention window path style & file with space

* Update src/core/mentions/index.ts

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

---------

Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>
2025-03-27 00:10:06 -04:00
Chris Estreich
a414c7d028
Wrangle our settings-related types and add support for settings import / export (#1997)
* Strongly type our settings use composition where possible

* Update src/core/contextProxy.ts

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

* Update src/core/contextProxy.ts

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

* Add comment, tweak function name

* Add changeset

* Clean up toolGroup types

* Comments tweak

* Remove unused type

* More type safety

* Improve import / export, add translations

---------

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
2025-03-26 16:29:01 -07:00
jwc11
55bbe88e39
feat: add pinning and sorting for API configurations dropdown (#2001)
* 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>
2025-03-26 11:29:24 -07:00
Diarmid Mackenzie
f773bc3024
Remove "Enable Custom Mode Creation Through Prompts" toggle (#1980)
* Remove custom mode creation option

* Remove redundant code branch
2025-03-25 15:31:29 -04:00
Diarmid Mackenzie
ec423a715c
Fetch instructions (#1869)
* 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>
2025-03-25 13:08:17 -04:00
Matt Rubens
1810efe496
Additional checkbox for auto-approving reads and writes outside of the workspace (#1965) 2025-03-25 01:35:33 -04:00
Sam Hoang Van
70a476e722
feat read file range (#1440)
* 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>
2025-03-20 00:55:47 -04:00
Matt Rubens
f181da1454
Move context-mention file/folder search to the server (#1824) 2025-03-20 00:45:27 -04:00
Chris Estreich
a15691dc1d
Add a way to stop TTS (#1787) 2025-03-18 17:05:05 -07:00
Chris Estreich
878b3820d2
Settings tweaks: add terminal & language sections, fix whell scroll in editor tab (#1763) 2025-03-18 00:11:57 -07:00
KJ7LNW
6301e90454
Fix shell integration race condition (and other minor fixup/cleanup) (#1660)
* 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>
2025-03-17 23:57:20 -07:00
Seth Miller
f16a49de87
Add text-to-speech functionality (#1412)
* 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>
2025-03-18 01:47:16 -04:00
Matt Rubens
9bbbaf2288 Add a new setting to control the number of workspace files included in the system prompt 2025-03-14 12:06:56 -04:00
cte
4b23644683 Add Cline events and roofactor subtasks slightly 2025-03-12 22:52:37 -07:00
Matt Rubens
00bf91470b Add i18n 2025-03-12 11:23:06 -04:00
Matt Rubens
baa346dc46 Remove preferredLanguage and just rely on VSCode language 2025-03-12 11:23:04 -04:00
cte
4b6def5f31 ContextProxy fix - constructor should not be async 2025-03-11 14:24:21 -07:00