feat: Configable Ollama embedding timeout (#5733)#9885
Open
KagurazakaNyaa wants to merge 5 commits intoRooCodeInc:mainfrom
Open
feat: Configable Ollama embedding timeout (#5733)#9885KagurazakaNyaa wants to merge 5 commits intoRooCodeInc:mainfrom
KagurazakaNyaa wants to merge 5 commits intoRooCodeInc:mainfrom
Conversation
i18n: Add Ollama timeout configuration localization for all languages (by AI)
Contributor
All issues have been resolved. Issues resolved:
Mention @roomote in a comment to request specific changes to this pull request or fix all unresolved issues. |
Co-authored-by: roomote[bot] <219738659+roomote[bot]@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds configurable timeout settings for Ollama embedding and validation requests, allowing users to adjust these values through the UI instead of relying on hardcoded defaults. This addresses issues where users experienced timeouts during embedding operations on slower systems or with large models.
Key Changes:
- Added two new configurable settings:
ollamaEmbeddingTimeoutMsandollamaValidationTimeoutMswith defaults of 60000ms and 30000ms respectively - Implemented UI controls in the code index popover for users to configure these timeout values
- Added comprehensive i18n support across 18 locale files
Reviewed changes
Copilot reviewed 30 out of 30 changed files in this pull request and generated 20 comments.
Show a summary per file
| File | Description |
|---|---|
src/services/code-index/embedders/ollama.ts |
Core implementation of configurable timeout logic in the Ollama embedder |
src/services/code-index/config-manager.ts |
Added timeout configuration handling and change detection |
packages/types/src/provider-settings.ts |
Added schema definitions for Ollama timeout settings |
packages/types/src/codebase-index.ts |
Added schema definitions for codebase index timeout settings |
src/core/webview/ClineProvider.ts |
Added timeout settings to webview state management |
src/core/webview/webviewMessageHandler.ts |
Added timeout settings to settings update handler |
src/shared/WebviewMessage.ts |
Added timeout fields to webview message interface |
webview-ui/src/components/chat/CodeIndexPopover.tsx |
Added UI controls for configuring timeout values |
webview-ui/src/i18n/locales/*/settings.json |
Added translations for timeout settings across 18 locales |
src/services/code-index/embedders/__tests__/ollama.spec.ts |
Added tests for timeout configuration |
src/services/code-index/__tests__/config-manager.spec.ts |
Updated tests to include timeout settings |
src/services/code-index/__tests__/service-factory.spec.ts |
Updated tests to include timeout settings |
src/services/code-index/interfaces/config.ts |
Added timeout fields to config snapshot interface |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related GitHub Issue
Closes: #5733 #5517
Improved: #5778
Roo Code Task Context (Optional)
Description
This PR modifies the approach in #5778 that simply increased the Ollam timeout, allowing users to modify the timeout setting in the embedded settings interface.
Test Procedure
The test was initiated by launching debug mode with F5 and opening a codebase in the debug VS Code instance to begin indexing. A low timeout was set initially, and if errors like those in #5733 occurred, the timeout was increased until the embedding could be completed successfully.
Pre-Submission Checklist
Screenshots / Videos
Documentation Updates
Does this PR necessitate updates to user-facing documentation?
Both added settings are very intuitive, and the interface elements are sufficient to describe themselves, so there is no need to update the documentation.
Additional Notes
Get in Touch
kagurazakanyaa
Important
Introduces configurable timeout settings for Ollama embedding and validation, with updates to code, tests, UI, and translations.
codebase-index.tsandprovider-settings.ts.ClineProvider.tsto handle new timeout settings.config-manager.spec.tsandollama.spec.tsto cover new timeout configurations.CodeIndexPopover.tsxto include new timeout settings fields.settings.jsonfiles.This description was created by
for ebb28f5. You can customize this summary. It will automatically update as commits are pushed.