Skip to content

Feature: Per-Workspace Codebase Indexing Control #7511

@VooDisss

Description

@VooDisss

Problem Description

Currently, the codebase indexing feature in the RooCode VS Code extension is controlled by a single global setting. When enabled, it automatically starts indexing all open workspaces upon VS Code launch. This can lead to high GPU usage, especially for users who work with multiple VS Code windows simultaneously (e.g., 10+ windows). It becomes difficult to identify which VS Code instance is causing the high resource consumption.

This is problematic for users who only need indexing for specific projects and want to keep it disabled for others to conserve system resources.

Proposed Solution

Introduce a per-workspace setting for codebase indexing that overrides the global default. This would allow users to:

  1. Set a global default for indexing: For example, have indexing disabled globally.
  2. Enable or disable indexing for individual workspaces: A user could then enable indexing for a specific workspace, and that setting would persist for that workspace across sessions.

This would provide a more granular control over resource usage and a better user experience for developers working on multiple projects.

Technical Context

Based on an analysis of the codebase, the core of the indexing feature resides in the src/services/code-index/ directory.

  • CodeIndexConfigManager (src/services/code-index/config-manager.ts) is responsible for loading the indexing configuration. It currently reads from the global state, and this would need to be modified to also read from workspace-level settings.
  • CodeIndexManager (src/services/code-index/manager.ts) is a singleton that manages the indexing process for each workspace. It would need to be updated to use the new workspace-specific configuration.
  • CodeIndexOrchestrator (src/services/code-index/orchestrator.ts) is responsible for the actual indexing and file watching. Its behavior is driven by the configuration provided by CodeIndexConfigManager.

The proposed changes would primarily involve updating CodeIndexConfigManager to first check for a workspace-specific setting, and if one is not found, to fall back to the global setting. This would allow for the desired override behavior.

Impact

This feature would greatly improve the user experience for developers who work on multiple projects simultaneously, by giving them more control over resource usage. It would also make the RooCode extension more efficient and less intrusive for users who do not need indexing on all their projects.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Issue - Needs ScopingValid, but needs effort estimate or design input before work can start.enhancementNew feature or request

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions