Commit graph

2059 commits

Author SHA1 Message Date
github-actions[bot]
06e4e46eb6 changeset version bump 2025-05-24 23:51:00 +00:00
Chris Estreich
77a5b6c06d
Fix reasoning budget for Gemini 2.5 Flash on OpenRouter (#3945)
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>
2025-05-24 19:46:42 -04:00
Hannes Rudolph
a8922e0c96
Improve tool descriptions to guide proper file editing tool selection (#3943)
* Improve tool descriptions to guide proper file editing tool selection

### Problem
LLMs were frequently choosing `write_to_file` for file edits instead of more appropriate tools like `apply_diff`, `insert_content`, or `search_and_replace`. This was likely because the tool descriptions made it seem like files needed to be reconstructed rather than edited.

### Changes Made

**write_to_file tool description:**
- Clarified primary use cases: **creating new files** or **complete rewrites when intentionally required**
- Changed opening from "write full content" to "write content" to reduce emphasis on full reconstruction
- Updated parameter description to be more specific about when complete content is needed

**apply_diff tool description:**
- Enhanced description to emphasize "targeted modifications" and "precise, surgical edits"
- Clarified that multiple search/replace operations can be performed in a single call
- Removed misleading "only a single operation allowed" restriction
- Better positioned as the preferred tool for making several targeted changes efficiently

### Impact
These changes should guide LLMs toward:
- Using `write_to_file` primarily for new files or intentional complete rewrites
- Using `apply_diff` for targeted edits and modifications to existing files
- Better understanding of when each tool is most appropriate

The updated descriptions maintain necessary technical details while providing clearer guidance on tool selection without being overly prescriptive.

* Update src/core/prompts/tools/write-to-file.ts

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

* Update src/core/prompts/tools/write-to-file.ts

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

* Update src/core/prompts/tools/write-to-file.ts

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

---------

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>
2025-05-24 18:35:27 -04:00
Daniel
20e7f118bc
Add handling for external settings changes (#3942) 2025-05-24 18:05:28 -04:00
Daniel
be9195c1ee
Fix: Use EMBEDDING_MODEL_PROFILES as default in the state (#3939)
fix: update codebaseIndexModels to use EMBEDDING_MODEL_PROFILES as default
2025-05-24 16:39:34 -04:00
Daniel
def222f501
Enhance error handling for collection checks on initialize (#3937) 2025-05-24 16:23:43 -04:00
Matt Rubens
2053d27d63
Default to full file reads (#3936) 2025-05-24 15:17:48 -04:00
Sam Hoang Van
e86c0a165d
fix(FileContextTracker): mark file as edited by Roo when added to context tracker (#3499) 2025-05-24 15:15:06 -04:00
Matt Rubens
ca85162235
Handle partial messages in the codebase search tool (#3934) 2025-05-24 14:33:29 -04:00
Daniel
448dc2be37
Fix Qdrant initialization logic when vector size changes (#3925) 2025-05-24 13:12:13 -04:00
Matt Rubens
4abadd877b
Default to Sonnet 4 (#3928) 2025-05-24 13:06:25 -04:00
DEV×PAIN
a734aca02e
fix(mcp): fix error loading config when running MCP Server with npx and bunx (#3922) 2025-05-24 09:07:05 -07:00
Shariq Riaz
ff50a47b5b
feat: enable prompt caching for gemini-2.5-flash-preview-05-20 (#3907)
* feat: enable prompt caching for gemini-2.5-flash-preview-05-20

* feat: Add cache pricing for gemini-2.5-flash-preview-05-20 models
2025-05-24 07:38:45 -04:00
Noritaka Kobayashi
472943281f
refactor: simplify object assignment & use startsWith (#3891) 2025-05-23 23:48:55 -07:00
Chris Estreich
1366ba0115
Preserve model settings when selecting a specific OpenRouter provider (#3915) 2025-05-23 23:22:41 -07:00
Chris Estreich
2cfb96692d
Fix o1-pro on OpenRouter (#3914) 2025-05-23 23:11:41 -07:00
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
ronyblum
5ab78b37c0
Bedrock Prompt Caching Improvements (#3099)
Fix system prompt caching on first message
2025-05-23 17:51:47 -04:00
Shariq Riaz
20c7453425
Remove claude-3.7-sonnet and claude-3.7-sonnet:thinking from vscodelm (#3895)
* Remove claude-3.7-sonnet and claude-3.7-sonnet:thinking from vscodelm provider in api.ts (not supported via API)

* Add static blacklist for unsupported VS Code Language Model IDs

---------

Co-authored-by: Ruakij <ruakij@ruekov.eu>
2025-05-23 17:28:42 -04: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
Chris Estreich
872902754a
Fix max tokens in the task header (#3893) 2025-05-23 02:32:21 -07:00
Chris Estreich
fa1e7b415c
Re-work support for reasoning models, including "hybrid" reasoning models (#3870) 2025-05-23 01:40:17 -07:00
github-actions[bot]
7206da97fb
Changeset version bump (#3869)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Chris Estreich <cestreich@gmail.com>
2025-05-23 01:39:43 -07:00
Chris Estreich
6931cc9262
Fix global settings export (#3890) 2025-05-23 01:33:40 -07:00
Chris Estreich
b9d3331f41
Fix vscode-material-icons path (#3889) 2025-05-23 01:22:43 -07:00
KJ7LNW
82701584ae
fix: respect user-configured terminal integration timeout (#3886) 2025-05-22 22:34:33 -07: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
Matt Rubens
c52d6d52ab
Fix openrouter names for caching and computer use (#3868)
Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
2025-05-22 17:07:56 -04:00
Adil Hafeez
29ebd9b274
fix spelling of reterence (#3804)
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>
2025-05-22 16:42:04 -04:00
github-actions[bot]
36dff338b5
Changeset version bump (#3853)
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-05-22 15:36:05 -04:00
Matt Rubens
fb3f6d0378
Fix Claude 4 models in Vertex (#3849) 2025-05-22 14:43:31 -04:00
Chris Estreich
0521163212
Fix changeset version bumping (#3850) 2025-05-22 11:41:19 -07:00
Matt Rubens
790c6b50f2
Fix referrer (#3848) 2025-05-22 14:35:14 -04:00
Shariq Riaz
8a8fadd407
Add Claude Sonnet 4 and Claude Opus 4 models with thinking variants (#3844)
Co-authored-by: cte <cestreich@gmail.com>
2025-05-22 10:44:56 -07:00
Chris Estreich
39cd50b989
Fix linter errors (#3821) 2025-05-21 23:16:43 -07:00
Chris Estreich
d5484b52fa
Upgrade to ESLint 9 + share eslint config across workspaces (#3815) 2025-05-21 21:30:21 -07:00
Chris Estreich
57249a0881
PNPM + Turbo monorepo + Nightly releases (#3407) 2025-05-21 21:01:20 -07:00
Matt Rubens
9c740e8d66
v3.18 (#3800)
* v3.18

* Update webview-ui/src/i18n/locales/ko/chat.json

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

---------

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
2025-05-21 17:30:55 -04:00
Canyon Robins
8df7f450e3
[Condense] Add isAutomaticTrigger to condense telemetry (#3798) 2025-05-21 13:02:54 -07:00
Canyon Robins
d7ae811a45
[Condense] Track telemetry for condense and truncate operations (#3796)
* [Condense] Track telemetry for condense and truncate operations

* update tests

* test fix nits
2025-05-21 12:49:43 -07: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
Noritaka Kobayashi
4e71b78327
refactor: simplify loop syntax in combineApiRequests and XmlMatcher (#3776) 2025-05-21 09:33:18 -04:00
axb
3c73684729
fix: fix diffview scoll display (#3783) 2025-05-21 09:32:17 -04:00
Chris Estreich
7d99689031
More VSCode command / build fixes (#3780) 2025-05-21 00:07:37 -07:00
xyOz
ad9c87a04f
Another grey screen fix. (#3644)
Memory memory memory
2025-05-20 22:27:46 -04:00
Daniel
27e47de3aa
Add Gemini Flash 2.5 05-20 variants for the Vertex provider (#3758)
* feat(api): add gemini-2.5-flash-preview-05-20 model configuration

* feat(tests): update apiModelId to gemini-2.5-flash-preview-05-20 in ProviderSettingsManager tests in case the old version is deprecated

* chore: add changeset

* feat(api): update vertexModels to add gemini-2.5-flash-preview-05-20 variants

* chore: update changeset
2025-05-20 21:13:21 -04:00
Shariq Riaz
5ccce3a39d
feat: add gemini-2.5-flash-preview-05-20 models (#3769) 2025-05-20 21:08:07 -04:00
xyOz
9402a4d54f
Lm studio and ollama usage fix (#3707)
* integration

* Fix
2025-05-20 20:32:43 -04:00
Chris Estreich
f274a150c4
Get package publisher and name from package.json + command type safety (#3766) 2025-05-20 16:41:03 -07:00
Canyon Robins
ff837d5cbf
[Condense] Fix double counting last message when condensing (#3763) 2025-05-20 14:15:15 -07:00