Skip to content

Commit b887bd2

Browse files
committed
fix: add missing type definitions for workspace indexing toggle
1 parent ead391f commit b887bd2

File tree

4 files changed

+9
-2
lines changed

4 files changed

+9
-2
lines changed

packages/types/src/codebase-index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ export const CODEBASE_INDEX_DEFAULTS = {
2020

2121
export const codebaseIndexConfigSchema = z.object({
2222
codebaseIndexEnabled: z.boolean().optional(),
23+
workspaceIndexEnabled: z.boolean().optional(), // Workspace-specific indexing toggle
2324
codebaseIndexQdrantUrl: z.string().optional(),
2425
codebaseIndexEmbedderProvider: z
2526
.enum(["openai", "ollama", "openai-compatible", "gemini", "mistral", "vercel-ai-gateway"])

src/core/webview/webviewMessageHandler.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ import { TelemetryService } from "@roo-code/telemetry"
1818

1919
import { type ApiMessage } from "../task-persistence/apiMessages"
2020
import { saveTaskMessages } from "../task-persistence"
21+
import { type IndexingStatus } from "../../shared/ExtensionMessage"
2122

2223
import { ClineProvider } from "./ClineProvider"
2324
import { handleCheckpointRestoreOperation } from "./checkpointRestoreHandler"
@@ -2547,7 +2548,7 @@ export const webviewMessageHandler = async (
25472548
return
25482549
}
25492550

2550-
const status = manager
2551+
const baseStatus = manager
25512552
? manager.getCurrentStatus()
25522553
: {
25532554
systemStatus: "Standby",
@@ -2558,7 +2559,8 @@ export const webviewMessageHandler = async (
25582559
workspacePath: undefined,
25592560
}
25602561

2561-
// Add workspace-specific indexing enabled state
2562+
// Create a new status object with workspace-specific indexing enabled state
2563+
let status: IndexingStatus = { ...baseStatus }
25622564
if (manager && provider.cwd) {
25632565
const workspaceEnabled = manager.configManager?.getWorkspaceIndexEnabled(provider.cwd)
25642566
if (workspaceEnabled !== undefined) {

src/shared/ExtensionMessage.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ export interface IndexingStatus {
4444
totalItems: number
4545
currentItemUnit?: string
4646
workspacePath?: string
47+
workspaceIndexEnabled?: boolean
4748
}
4849

4950
export interface IndexingStatusUpdateMessage {

src/shared/WebviewMessage.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -290,6 +290,9 @@ export interface WebviewMessage {
290290
codebaseIndexSearchMaxResults?: number
291291
codebaseIndexSearchMinScore?: number
292292

293+
// Workspace-specific settings
294+
workspaceIndexEnabled?: boolean
295+
293296
// Secret settings
294297
codeIndexOpenAiKey?: string
295298
codeIndexQdrantApiKey?: string

0 commit comments

Comments
 (0)