Skip to content

Commit 4a4356c

Browse files
committed
refactor: rename localVectorStoreDirectoryPlaceholder to localVectorStoreDirectory for consistency
1 parent 82f6f3d commit 4a4356c

File tree

2 files changed

+9
-12
lines changed

2 files changed

+9
-12
lines changed

src/services/code-index/config-manager.ts

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export class CodeIndexConfigManager {
1313
private codebaseIndexEnabled: boolean = true
1414
private embedderProvider: EmbedderProvider = "openai"
1515
private vectorStoreProvider: "local" | "qdrant" = "qdrant"
16-
private localVectorStoreDirectoryPlaceholder?: string
16+
private localVectorStoreDirectory?: string
1717
private modelId?: string
1818
private modelDimension?: number
1919
private openAiOptions?: ApiHandlerOptions
@@ -83,7 +83,7 @@ export class CodeIndexConfigManager {
8383
// Update instance variables with configuration
8484
this.codebaseIndexEnabled = codebaseIndexEnabled ?? true
8585
this.vectorStoreProvider = codebaseIndexVectorStoreProvider ?? "qdrant"
86-
this.localVectorStoreDirectoryPlaceholder = codebaseIndexLocalVectorStoreDirectory
86+
this.localVectorStoreDirectory = codebaseIndexLocalVectorStoreDirectory
8787
this.qdrantUrl = codebaseIndexQdrantUrl
8888
this.qdrantApiKey = qdrantApiKey ?? ""
8989
this.searchMinScore = codebaseIndexSearchMinScore
@@ -165,7 +165,7 @@ export class CodeIndexConfigManager {
165165
configured: this.isConfigured(),
166166
embedderProvider: this.embedderProvider,
167167
vectorStoreProvider: this.vectorStoreProvider,
168-
localVectorStoreDirectoryPlaceholder: this.localVectorStoreDirectoryPlaceholder,
168+
localVectorStoreDirectory: this.localVectorStoreDirectory,
169169
modelId: this.modelId,
170170
modelDimension: this.modelDimension,
171171
openAiKey: this.openAiOptions?.openAiNativeApiKey ?? "",
@@ -272,7 +272,7 @@ export class CodeIndexConfigManager {
272272
const prevQdrantUrl = prev?.qdrantUrl ?? ""
273273
const prevQdrantApiKey = prev?.qdrantApiKey ?? ""
274274
const prevVectorStoreProvider = prev?.vectorStoreProvider ?? "qdrant"
275-
const prevLocalDbPath = prev?.localVectorStoreDirectoryPlaceholder ?? ""
275+
const prevLocalDbPath = prev?.localVectorStoreDirectory ?? ""
276276

277277
// 1. Transition from disabled/unconfigured to enabled/configured
278278
if ((!prevEnabled || !prevConfigured) && this.codebaseIndexEnabled && nowConfigured) {
@@ -306,10 +306,7 @@ export class CodeIndexConfigManager {
306306
}
307307

308308
// Local DB path change (only affects local vector store)
309-
if (
310-
this.vectorStoreProvider === "local" &&
311-
prevLocalDbPath !== (this.localVectorStoreDirectoryPlaceholder ?? "")
312-
) {
309+
if (this.vectorStoreProvider === "local" && prevLocalDbPath !== (this.localVectorStoreDirectory ?? "")) {
313310
return true
314311
}
315312

@@ -323,7 +320,7 @@ export class CodeIndexConfigManager {
323320
const currentMistralApiKey = this.mistralOptions?.apiKey ?? ""
324321
const currentQdrantUrl = this.qdrantUrl ?? ""
325322
const currentQdrantApiKey = this.qdrantApiKey ?? ""
326-
const currentLocalDbPath = this.localVectorStoreDirectoryPlaceholder ?? ""
323+
const currentLocalDbPath = this.localVectorStoreDirectory ?? ""
327324

328325
if (prevOpenAiKey !== currentOpenAiKey) {
329326
return true
@@ -404,7 +401,7 @@ export class CodeIndexConfigManager {
404401
isConfigured: this.isConfigured(),
405402
embedderProvider: this.embedderProvider,
406403
vectorStoreProvider: this.vectorStoreProvider ?? "qdrant",
407-
localVectorStoreDirectoryPlaceholder: this.localVectorStoreDirectoryPlaceholder,
404+
localVectorStoreDirectoryPlaceholder: this.localVectorStoreDirectory,
408405
modelId: this.modelId,
409406
modelDimension: this.modelDimension,
410407
openAiOptions: this.openAiOptions,
@@ -502,6 +499,6 @@ export class CodeIndexConfigManager {
502499
* Gets the current local database path for vector storage
503500
*/
504501
public get currentLocalDbPath(): string | undefined {
505-
return this.localVectorStoreDirectoryPlaceholder
502+
return this.localVectorStoreDirectory
506503
}
507504
}

src/services/code-index/interfaces/config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ export type PreviousConfigSnapshot = {
3030
configured: boolean
3131
embedderProvider: EmbedderProvider
3232
vectorStoreProvider?: "local" | "qdrant"
33-
localVectorStoreDirectoryPlaceholder?: string
33+
localVectorStoreDirectory?: string
3434
modelId?: string
3535
modelDimension?: number // Generic dimension property
3636
openAiKey?: string

0 commit comments

Comments
 (0)