Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

feat: add local codebase indexing with BM25 full-text search (#265)#266

Merged
breaking-brake merged 4 commits intomainbreaking-brake/cc-wf-studio:mainfrom
feat/265-codebase-index-bm25breaking-brake/cc-wf-studio:feat/265-codebase-index-bm25Copy head branch name to clipboard
Dec 13, 2025
Merged

feat: add local codebase indexing with BM25 full-text search (#265)#266
breaking-brake merged 4 commits intomainbreaking-brake/cc-wf-studio:mainfrom
feat/265-codebase-index-bm25breaking-brake/cc-wf-studio:feat/265-codebase-index-bm25Copy head branch name to clipboard

Conversation

@breaking-brake
Copy link
Copy Markdown
Owner

Summary

Implements local codebase indexing with BM25 full-text search to provide contextual code snippets during AI workflow refinement. Closes #265.

Problem

When users refine workflows with AI assistance, the AI lacks context about the user's actual codebase, making suggestions less relevant and requiring users to manually provide code context.

Solution

Added a local codebase indexing system that:

  • Indexes source files using BM25 algorithm for full-text search
  • Provides contextual code snippets during AI refinement conversations
  • Stores index in VSCode's globalStorageUri (not workspace directory)
  • Auto-migrates existing indexes from old location

Changes

New Files

  • src/extension/services/codebase-index-service.ts - Core indexing service with BM25
  • src/extension/services/vector-search-service.ts - Search service using Orama
  • src/extension/commands/codebase-index-handlers.ts - Message handlers
  • src/shared/types/codebase-index.ts - Type definitions
  • src/webview/src/services/codebase-search-service.ts - Webview bridge service
  • src/webview/src/components/chat/CodebaseSearchResults.tsx - Search results UI
  • src/webview/src/components/chat/CodebaseStatusBadge.tsx - Index status indicator
  • src/webview/src/components/dialogs/CodebaseSettingsDialog.tsx - Settings dialog

Modified Files

  • package.json - Added Orama dependencies and settings
  • src/shared/types/messages.ts - Added codebase index message types
  • src/webview/src/components/dialogs/RefinementChatPanel.tsx - Integrated search
  • src/webview/src/stores/refinement-store.ts - Added codebase state
  • Translation files (5 languages) - Added i18n keys

Features

  • BM25 Full-Text Search: Efficient ranking algorithm for code search
  • Incremental Indexing: Only re-indexes changed files
  • Settings Dialog: Configure file patterns, chunk size, exclusions
  • Status Badge: Shows index state (idle, building, ready, error)
  • Auto-Migration: Moves existing index from .vscode/ to globalStorageUri
  • Beta Feature: Disabled by default, enable via settings

Impact

  • New beta feature, disabled by default
  • No breaking changes to existing functionality
  • Index stored in VSCode extension storage, not workspace

Testing

  • Manual E2E testing completed
  • Build verification passed
  • Code quality checks passed (format, lint, check)

🤖 Generated with Claude Code

breaking-brake and others added 4 commits December 13, 2025 22:45
- Add Orama-based search engine (pure TypeScript, no CSP issues)
- Implement file scanning, chunking, and indexing service
- Add message types for Extension ↔ Webview communication
- Include test command for manual E2E testing
- Persist index to .vscode/codebase-index.json

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add CodebaseSettingsDialog for enable/disable toggle and index management
- Add CodebaseStatusBadge showing index status in chat panel header
- Add CodebaseSearchResults component for displaying search results
- Add setting persistence via VSCode configuration
- Add codebase-search-service for webview-extension communication
- Remove testCodebaseIndex command (no longer needed)
- Add i18n support for all 5 languages

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Changed index location from .vscode/ to VSCode globalStorageUri
- Added workspace hash for unique storage per workspace
- Implemented auto-migration of existing index files
- Removed unused imports from extension.ts

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@breaking-brake breaking-brake merged commit a0fa749 into main Dec 13, 2025
3 checks passed
@breaking-brake breaking-brake deleted the feat/265-codebase-index-bm25 branch December 13, 2025 15:35
@breaking-brake breaking-brake mentioned this pull request Dec 13, 2025
github-actions Bot added a commit that referenced this pull request Dec 13, 2025
## [3.7.0](v3.6.1...v3.7.0) (2025-12-13)

### Features

* add local codebase indexing with BM25 full-text search ([#265](#265)) ([#266](#266)) ([a0fa749](a0fa749))
@github-actions
Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 3.7.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: ローカルコードベースインデックス機能(BM25全文検索)

1 participant

Morty Proxy This is a proxified and sanitized view of the page, visit original site.