Skip to content

feat(tools): codebase search tool #405

Draft
mikij wants to merge 8 commits intoKilo-Org:devfrom
mikij:feat/codebase-search-tool
Draft

feat(tools): codebase search tool #405
mikij wants to merge 8 commits intoKilo-Org:devfrom
mikij:feat/codebase-search-tool

Conversation

@mikij
Copy link
Contributor

@mikij mikij commented Feb 17, 2026

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 /tools command or Ctrl+P) to setup tool. API keys for Mistral and Qdrant must be added via /connect or manual editing of auth.json.

Screenshots

before after
image

How to Test

Get in Touch

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.
@github-actions
Copy link
Contributor

Hey! Your PR title Feat/codebase search tool doesn't follow conventional commit format.

Please update it to start with one of:

  • feat: or feat(scope): new feature
  • fix: or fix(scope): bug fix
  • docs: or docs(scope): documentation changes
  • chore: or chore(scope): maintenance tasks
  • refactor: or refactor(scope): code refactoring
  • test: or test(scope): adding or updating tests

Where scope is the package name (e.g., app, desktop, kilo).

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.
@mikij mikij force-pushed the feat/codebase-search-tool branch from 89d65ca to 708f008 Compare February 17, 2026 22:56
@mikij mikij changed the title Feat/codebase search tool feat(tools): codebase search tool Feb 17, 2026
@github-actions
Copy link
Contributor

Thanks for your contribution!

This PR doesn't have a linked issue. All PRs must reference an existing issue.

Please:

  1. Open an issue describing the bug/feature (if one doesn't exist)
  2. Add Fixes #<number> or Closes #<number> to this PR description

See CONTRIBUTING.md for details.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant