* Update codebase search description to emphasize English query requirement
* refactor: improve the wording
---------
Co-authored-by: Daniel <57051444+daniel-lxs@users.noreply.github.com>
* Fix#3650: Allow empty content in write_to_file tool
Change validation from !newContent to newContent === undefined
to allow empty strings while still rejecting undefined values.
* Add unit tests for writeToFileTool
- Remove AuthService callbacks, add user-info event
- Store userInfo on AuthService and fetch it when sessions go active
- Simplify CloudService callbacks to just stateChanged
- Add cloudUserInfo to state and remove authenticatedUser message
* Fix menu breaking when Roo is moved between primary and secondary sidebars
Hello Roo Team! We changed this on the Kilo side and thought it might be useful to you!
The menu buttons (Settings etc.) stop working when Roo is moved between the primary and secondary sidebars.
This is because ClineProvider is prematurely disposed in that case
This change prevents the ClineProvider from being disposed when hosted in a sidebar.
It should still be disposed when hosted in a tab, because they have their own ClineProvider instance.
Found while investigating https://github.com/Kilo-Org/kilocode/issues/502.
* refactor: improve logging
* fix: extra bracket
---------
Co-authored-by: Daniel <57051444+daniel-lxs@users.noreply.github.com>
* [Condense] Skip condense and show error if the context grows
* update tests
* changeset
* nit: error should be nonempty
* update translations
* add more errors
* add more test cases
* update translations
* pipe error back from truncate code
* add condense_context_error ClineMessage
* fixes
* translations
* Refactor weather server example implementation inside of prompt to use new MCP SDK features
* update NPM install instructions as well
* docs: minor improvements
* refactor: improve readability on mcpHub check
* fix: add missing bracket
* refactor: add interfaces
---------
Co-authored-by: Daniel <57051444+daniel-lxs@users.noreply.github.com>
* feat: Make checkpoint on new task
Ensures that invoking the `newTaskTool` always creates a checkpoint, even if no files have changed. This provides a consistent state snapshot before a sub-task is initiated.
* refactor: remove delay
---------
Co-authored-by: Daniel <57051444+daniel-lxs@users.noreply.github.com>
Hello Roo Team! We received this contribution on the Kilo side and thought it might be useful to you!
These changes were originally submitted by a (presumably) native speaker of the language: https://github.com/Kilo-Org/kilocode/pull/516
The ClineProvider was looking for the .vite-port file in the wrong location.
Updated the path resolution to correctly point to the project root where
the Vite development server creates the file.
Fixes: #4006
Signed-off-by: Eric Wheeler <roo-code@z.ewheeler.org>
Co-authored-by: Eric Wheeler <roo-code@z.ewheeler.org>
* feat: Enhance configuration change handling and model dimension checks
* fix: Update embedder creation to use modelId from config
* test: Add unit tests for ServiceFactory embedder and vector store creation
* test: Add comprehensive restart detection tests for configuration changes
* feat: Implement model ID selection logic for provider changes in CodeIndexSettings
* fix: Initialize configuration on constructor to prevent false restart triggers
* fix: Enhance API key handling and restart logic in CodeIndexConfigManager
* fix: Improve handling of external settings changes and automatic indexing in webviewMessageHandler
* fix: Ensure handleExternalSettingsChange only restarts service when manager is initialized
* refactor: remove console logs
* fix: Load configuration during initialization to ensure correct state and restart requirements
* 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>