fix: add missing type definitions for workspace indexing toggle

This commit is contained in:
Roo Code 2025-09-12 05:59:59 +00:00
parent ead391f906
commit b887bd25e6
4 changed files with 9 additions and 2 deletions

View file

@ -20,6 +20,7 @@ export const CODEBASE_INDEX_DEFAULTS = {
export const codebaseIndexConfigSchema = z.object({
codebaseIndexEnabled: z.boolean().optional(),
workspaceIndexEnabled: z.boolean().optional(), // Workspace-specific indexing toggle
codebaseIndexQdrantUrl: z.string().optional(),
codebaseIndexEmbedderProvider: z
.enum(["openai", "ollama", "openai-compatible", "gemini", "mistral", "vercel-ai-gateway"])

View file

@ -18,6 +18,7 @@ import { TelemetryService } from "@roo-code/telemetry"
import { type ApiMessage } from "../task-persistence/apiMessages"
import { saveTaskMessages } from "../task-persistence"
import { type IndexingStatus } from "../../shared/ExtensionMessage"
import { ClineProvider } from "./ClineProvider"
import { handleCheckpointRestoreOperation } from "./checkpointRestoreHandler"
@ -2547,7 +2548,7 @@ export const webviewMessageHandler = async (
return
}
const status = manager
const baseStatus = manager
? manager.getCurrentStatus()
: {
systemStatus: "Standby",
@ -2558,7 +2559,8 @@ export const webviewMessageHandler = async (
workspacePath: undefined,
}
// Add workspace-specific indexing enabled state
// Create a new status object with workspace-specific indexing enabled state
let status: IndexingStatus = { ...baseStatus }
if (manager && provider.cwd) {
const workspaceEnabled = manager.configManager?.getWorkspaceIndexEnabled(provider.cwd)
if (workspaceEnabled !== undefined) {

View file

@ -44,6 +44,7 @@ export interface IndexingStatus {
totalItems: number
currentItemUnit?: string
workspacePath?: string
workspaceIndexEnabled?: boolean
}
export interface IndexingStatusUpdateMessage {

View file

@ -290,6 +290,9 @@ export interface WebviewMessage {
codebaseIndexSearchMaxResults?: number
codebaseIndexSearchMinScore?: number
// Workspace-specific settings
workspaceIndexEnabled?: boolean
// Secret settings
codeIndexOpenAiKey?: string
codeIndexQdrantApiKey?: string