Draft
Conversation
Extract Kilo-specific codebase search utilities into a dedicated module to improve code organization and minimize merge conflicts with upstream. Changes: - Add types.ts with Zod schemas for configuration validation - Add config.ts for configuration loading with defaults - Add collection.ts for SHA-256 hash-based collection naming - Add embeddings.ts with OpenAI, Mistral, Ollama provider support - Refactor codebase-search.ts to use extracted modules - Conditionally register tool only when configured - Add comprehensive unit tests
Rename tool definition and permission identifiers from kebab-case (codebase-search) to snake_case (codebase_search) for naming consistency.
Contributor
|
Hey! Your PR title Please update it to start with one of:
Where See CONTRIBUTING.md for details. |
Add a new codebase search tool with support for semantic search using Qdrant or LanceDB vector databases. Includes: - Documentation in AGENTS.md - Codebase search configuration dialog (dialog-tool-codebase-search.tsx) - Tool selection dialog (dialog-tool.tsx) - Integration with prompt menu in prompt/index.tsx The tool allows configuring: - Embedding model (e.g., codestral-embed-2505, text-embedding-3-small) - Vector database type (Qdrant or LanceDB) - Database connection settings (URL for Qdrant, path for LanceDB) - Similarity threshold for search results - Maximum number of results to return Configuration is saved to opencode.jsonc file in the project or global config directory.
89d65ca to
708f008
Compare
Contributor
|
Thanks for your contribution! This PR doesn't have a linked issue. All PRs must reference an existing issue. Please:
See CONTRIBUTING.md for details. |
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.
Context
Added cloud based codebase_search tool to CLI
Implementation
This tool implementation reuses VSCode codebase indexing. As I am using Mistral embedded model with Qdrant cloud vector DB, I tested only that type of index search. Added tools menu to the CLI (can be invoked by
/toolscommand or Ctrl+P) to setup tool. API keys for Mistral and Qdrant must be added via /connect or manual editing of auth.json.Screenshots
How to Test
Get in Touch