Skip to content

Conversation

@roomote
Copy link
Contributor

@roomote roomote bot commented Dec 4, 2025

This PR attempts to address Issue #8131 by implementing a simpler per-workspace control for codebase indexing as requested by @machinekoder.

Summary

Implements a workspace-level setting that allows users to enable/disable codebase indexing on a per-workspace basis, reducing GPU/CPU usage by only indexing where needed.

Changes

  • Added roo-cline.enableCodebaseIndexing workspace-level configuration property with "scope": "resource" to allow per-workspace control
  • Updated CodeIndexConfigManager to check workspace settings first before falling back to global settings
  • Workspace setting overrides global configuration when explicitly set
  • Added comprehensive test coverage for the new functionality

How it works

  1. The new setting roo-cline.enableCodebaseIndexing can be configured at the workspace level
  2. When set, it overrides any global codebase indexing configuration
  3. When not set, the extension falls back to the global setting
  4. Each workspace can independently control whether indexing is enabled

Testing

  • All new tests pass ✅
  • All existing tests pass ✅
  • Linting passes ✅
  • Type checking passes ✅

Benefits

  • Simple checkbox per workspace (as requested)
  • No complex UI changes needed
  • Reduces resource usage by allowing selective indexing
  • Maintains backward compatibility with existing global settings

Fixes #8131

Feedback and guidance are welcome!

- Add workspace-level configuration property enableCodebaseIndexing
- Update CodeIndexConfigManager to check workspace settings first
- Workspace setting overrides global configuration when set
- Add comprehensive tests for per-workspace functionality

Fixes #8131
@roomote
Copy link
Contributor Author

roomote bot commented Dec 4, 2025

Rooviewer Clock   See task on Roo Cloud

Review complete. Found 1 issue that needs attention:

  • Remove "default": false from workspace setting to enable proper fallback to global settings

Mention @roomote in a comment to request specific changes to this pull request or fix all unresolved issues.

Comment on lines +410 to +415
"roo-cline.enableCodebaseIndexing": {
"type": "boolean",
"default": false,
"description": "%settings.enableCodebaseIndexing.description%",
"scope": "resource"
},
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The workspace setting has "default": false which prevents the intended fallback behavior to global settings. When a user hasn't explicitly configured the workspace setting, VSCode's getConfiguration().get() will return false (the default) instead of undefined, so the code at line 102 (workspaceIndexingEnabled ?? codebaseIndexEnabled) will always use the workspace value even when not explicitly set. This means users cannot rely on their global setting as a default - the workspace will always default to disabled. Remove the "default": false line so unconfigured workspaces return undefined and properly fall back to the global setting.

Fix it with Roo Code or mention @roomote and request a fix.

@hannesrudolph hannesrudolph added the Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. label Dec 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels.

Projects

Status: Triage

Development

Successfully merging this pull request may close these issues.

[ENHANCEMENT] Per-workspace control for Codebase Indexing (reduce GPU)

3 participants