Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions src/services/code-index/manager.ts
Original file line number Diff line number Diff line change
@@ -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"
Expand Down Expand Up @@ -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 }
Expand Down Expand Up @@ -305,7 +304,7 @@ export class CodeIndexManager {
)

const ignoreInstance = ignore()
const workspacePath = getWorkspacePath()
const workspacePath = this.workspacePath

if (!workspacePath) {
this._stateManager.setSystemState("Standby", "")
Expand Down
4 changes: 3 additions & 1 deletion src/services/code-index/vector-store/qdrant-client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)
Expand Down Expand Up @@ -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) => {
Expand Down
Loading