diff --git a/src/services/code-index/manager.ts b/src/services/code-index/manager.ts index 1257b747c6..c4ebd9557d 100644 --- a/src/services/code-index/manager.ts +++ b/src/services/code-index/manager.ts @@ -1,5 +1,4 @@ import * as vscode from "vscode" -import { getWorkspacePath } from "../../utils/path" import { ContextProxy } from "../../core/config/ContextProxy" import { VectorStoreSearchResult } from "./interfaces" import { IndexingState } from "./interfaces/manager" @@ -132,7 +131,7 @@ export class CodeIndexManager { } // 3. Check if workspace is available - const workspacePath = getWorkspacePath() + const workspacePath = this.workspacePath if (!workspacePath) { this._stateManager.setSystemState("Standby", "No workspace folder open") return { requiresRestart } @@ -305,7 +304,7 @@ export class CodeIndexManager { ) const ignoreInstance = ignore() - const workspacePath = getWorkspacePath() + const workspacePath = this.workspacePath if (!workspacePath) { this._stateManager.setSystemState("Standby", "") diff --git a/src/services/code-index/vector-store/qdrant-client.ts b/src/services/code-index/vector-store/qdrant-client.ts index 50f39666c4..eccdaf6e6e 100644 --- a/src/services/code-index/vector-store/qdrant-client.ts +++ b/src/services/code-index/vector-store/qdrant-client.ts @@ -17,6 +17,7 @@ export class QdrantVectorStore implements IVectorStore { private client: QdrantClient private readonly collectionName: string private readonly qdrantUrl: string = "http://localhost:6333" + private readonly workspacePath: string /** * Creates a new Qdrant vector store @@ -29,6 +30,7 @@ export class QdrantVectorStore implements IVectorStore { // Store the resolved URL for our property this.qdrantUrl = parsedUrl + this.workspacePath = workspacePath try { const urlObj = new URL(parsedUrl) @@ -445,7 +447,7 @@ export class QdrantVectorStore implements IVectorStore { return } - const workspaceRoot = getWorkspacePath() + const workspaceRoot = this.workspacePath // Build filters using pathSegments to match the indexed fields const filters = filePaths.map((filePath) => {