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

fix: remove BM25 codebase indexing feature#303

Merged
breaking-brake merged 1 commit intomainbreaking-brake/cc-wf-studio:mainfrom
fix/remove-bm25-searchbreaking-brake/cc-wf-studio:fix/remove-bm25-searchCopy head branch name to clipboard
Dec 21, 2025
Merged

fix: remove BM25 codebase indexing feature#303
breaking-brake merged 1 commit intomainbreaking-brake/cc-wf-studio:mainfrom
fix/remove-bm25-searchbreaking-brake/cc-wf-studio:fix/remove-bm25-searchCopy head branch name to clipboard

Conversation

@breaking-brake
Copy link
Copy Markdown
Owner

Problem

The BM25 codebase indexing feature (Issue #265, PR #266) was implemented as a Beta feature but has significant issues:

Current Behavior

  1. Users manually build a local BM25 index of their codebase
  2. Index is stored in VSCode's globalStorageUri
  3. AI refinement queries trigger keyword searches against the index
  4. Search results are displayed alongside AI responses

Issues

❌ Manual index maintenance required (users must rebuild when code changes)
❌ BM25 keyword search has limited semantic understanding
❌ Index data persists in globalStorageUri even after feature removal
❌ Claude Code CLI already has built-in codebase understanding (makes this redundant)

Expected Behavior

✅ Claude Code CLI's native codebase understanding should be used instead
✅ No manual index building required
✅ No orphaned data left on user devices

Solution

Completely removed the BM25 codebase indexing feature and added automatic cleanup for existing users.

Key Changes

Removed Files (8):

  • src/extension/commands/codebase-index-handlers.ts (489 lines)
  • src/extension/services/codebase-index-service.ts (633 lines)
  • src/extension/services/vector-search-service.ts (310 lines)
  • src/shared/types/codebase-index.ts (263 lines)
  • src/webview/src/services/codebase-search-service.ts (585 lines)
  • src/webview/src/components/chat/CodebaseSearchResults.tsx (212 lines)
  • src/webview/src/components/chat/CodebaseStatusBadge.tsx (147 lines)
  • src/webview/src/components/dialogs/CodebaseSettingsDialog.tsx (462 lines)

Modified Files (16):

  • Removed @orama/orama and @orama/plugin-data-persistence dependencies
  • Removed all BM25 message types and handlers
  • Removed BM25 state from refinement store
  • Removed BM25 UI components from chat interface
  • Removed all BM25 translations (5 languages)
  • Removed cc-wf-studio.codebaseReference.enabled setting

Added Cleanup (1):

Changes

Dependencies

File: package.json

Removed:

"@orama/orama": "^2.2.0",
"@orama/plugin-data-persistence": "^2.2.0"

Extension Activation

File: src/extension/extension.ts

Added automatic cleanup:

async function cleanupLegacyBM25Index(context: vscode.ExtensionContext): Promise<void> {
  // Removes {globalStorageUri}/indexes/ directory
  // Logged to "Claude Code Workflow Studio" Output Channel
}

Message Types

File: src/shared/types/messages.ts

Removed all BM25 message types:

  • BUILD_INDEX, CANCEL_INDEX_BUILD, GET_INDEX_STATUS, CLEAR_INDEX, SEARCH_CODEBASE
  • INDEX_BUILD_PROGRESS, INDEX_BUILD_SUCCESS, INDEX_BUILD_FAILED
  • SEARCH_CODEBASE_RESULT, SEARCH_CODEBASE_FAILED
  • GET_SETTING, SET_SETTING (Settings payloads)
  • OPEN_FILE_AT_LINE (Search result navigation)

UI Components

Files: MessageBubble.tsx, RefinementChatPanel.tsx, SettingsDropdown.tsx

Removed:

  • BM25 search results display
  • Codebase search integration
  • Settings dialog integration
  • @codebase command parsing

Translations

Files: en.ts, ja.ts, ko.ts, zh-CN.ts, zh-TW.ts

Removed all codebaseIndex.* and codebaseReference.* keys

Impact

  • Breaking Change: Users who enabled the Beta feature will lose access
  • Data Cleanup: Legacy index data automatically removed on next extension activation
  • Bundle Size Reduction: ~3,600 lines of code removed
  • Dependency Reduction: 2 fewer npm packages (@orama)
  • No Migration Required: Cleanup is automatic and transparent

Testing

Notes

  • Why fix: instead of chore:: This is a user-facing change (Beta feature removal) that should appear in CHANGELOG
  • Technical Debt: Cleanup code in extension.ts should be removed after 3-6 months (Issue Remove temporary BM25 cleanup code after sufficient user migration period #302)
  • CHANGELOG: This will appear as a bug fix (patch version bump)
  • Future: Rely on Claude Code CLI's built-in codebase understanding for AI refinement

🤖 Generated with Claude Code

- Removed 8 BM25-related files (services, handlers, components, types)
- Removed @orama dependencies from package.json
- Removed all BM25 UI components, translations, and settings
- Added automatic cleanup of legacy index data on extension activation
- Removed all message types and handlers for BM25 operations

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@breaking-brake breaking-brake merged commit 7a5878d into main Dec 21, 2025
3 checks passed
@breaking-brake breaking-brake deleted the fix/remove-bm25-search branch December 21, 2025 11:11
@breaking-brake breaking-brake mentioned this pull request Dec 22, 2025
github-actions Bot added a commit that referenced this pull request Dec 22, 2025
## [3.8.5](v3.8.4...v3.8.5) (2025-12-22)

### Bug Fixes

* remove BM25 codebase indexing feature ([#303](#303)) ([7a5878d](7a5878d))
* remove unused timeout setting and enable proper AI cancellation ([#305](#305)) ([666a231](666a231))

### Improvements

* prevent dropdown menu from closing on settings selection ([#304](#304)) ([544cc42](544cc42))
@github-actions
Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 3.8.5 🎉

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.

1 participant

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