Skip to content

Commit 27cd7eb

Browse files
committed
Use workspacePath from instance in CodeIndexManager and QdrantVectorStore
1 parent 58b0b64 commit 27cd7eb

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

src/services/code-index/manager.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import * as vscode from "vscode"
2-
import { getWorkspacePath } from "../../utils/path"
32
import { ContextProxy } from "../../core/config/ContextProxy"
43
import { VectorStoreSearchResult } from "./interfaces"
54
import { IndexingState } from "./interfaces/manager"
@@ -132,7 +131,7 @@ export class CodeIndexManager {
132131
}
133132

134133
// 3. Check if workspace is available
135-
const workspacePath = this.workspacePath || getWorkspacePath()
134+
const workspacePath = this.workspacePath
136135
if (!workspacePath) {
137136
this._stateManager.setSystemState("Standby", "No workspace folder open")
138137
return { requiresRestart }

src/services/code-index/vector-store/qdrant-client.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export class QdrantVectorStore implements IVectorStore {
1717
private client: QdrantClient
1818
private readonly collectionName: string
1919
private readonly qdrantUrl: string = "http://localhost:6333"
20-
private readonly workspaceRoot: string
20+
private readonly workspacePath: string
2121

2222
/**
2323
* Creates a new Qdrant vector store
@@ -30,7 +30,7 @@ export class QdrantVectorStore implements IVectorStore {
3030

3131
// Store the resolved URL for our property
3232
this.qdrantUrl = parsedUrl
33-
this.workspaceRoot = workspacePath
33+
this.workspacePath = workspacePath
3434

3535
try {
3636
const urlObj = new URL(parsedUrl)
@@ -447,7 +447,7 @@ export class QdrantVectorStore implements IVectorStore {
447447
return
448448
}
449449

450-
const workspaceRoot = this.workspaceRoot || getWorkspacePath()
450+
const workspaceRoot = this.workspacePath
451451

452452
// Build filters using pathSegments to match the indexed fields
453453
const filters = filePaths.map((filePath) => {

0 commit comments

Comments
 (0)