@@ -22,7 +22,8 @@ export class CodeIndexConfigManager {
2222 private qdrantUrl ?: string = "http://localhost:6333"
2323 private qdrantApiKey ?: string
2424 private searchProvider ?: string
25- private valkeyUrl ?: string = "http://localhost:6379"
25+ private valkeyHostname ?: string = "localhost"
26+ private valkeyPort ?: number = 6379
2627 private valkeyUsername ?: string
2728 private valkeyPassword ?: string
2829 private searchMinScore ?: number
@@ -49,7 +50,8 @@ export class CodeIndexConfigManager {
4950 const codebaseIndexConfig = this . contextProxy ?. getGlobalState ( "codebaseIndexConfig" ) ?? {
5051 codebaseIndexEnabled : true ,
5152 codebaseIndexQdrantUrl : "http://localhost:6333" ,
52- codebaseIndexValkeyUrl : "http://localhost:6379" ,
53+ codebaseIndexValkeyHostname : "localhost" ,
54+ codebaseIndexValkeyPort : 6379 ,
5355 codebaseIndexValkeyUsername : "" ,
5456 codebaseIndexEmbedderProvider : "openai" ,
5557 codebaseIndexEmbedderBaseUrl : "" ,
@@ -61,7 +63,8 @@ export class CodeIndexConfigManager {
6163 const {
6264 codebaseIndexEnabled,
6365 codebaseIndexQdrantUrl,
64- codebaseIndexValkeyUrl,
66+ codebaseIndexValkeyHostname,
67+ codebaseIndexValkeyPort,
6568 codebaseIndexValkeyUsername,
6669 codebaseIndexEmbedderProvider,
6770 codebaseIndexEmbedderBaseUrl,
@@ -84,7 +87,8 @@ export class CodeIndexConfigManager {
8487 this . codebaseIndexEnabled = codebaseIndexEnabled ?? true
8588 this . qdrantUrl = codebaseIndexQdrantUrl
8689 this . qdrantApiKey = qdrantApiKey ?? ""
87- this . valkeyUrl = codebaseIndexValkeyUrl
90+ this . valkeyHostname = codebaseIndexValkeyHostname ?? "localhost"
91+ this . valkeyPort = codebaseIndexValkeyPort ?? 6379
8892 this . valkeyPassword = valkeyPassword
8993 this . valkeyUsername = codebaseIndexValkeyUsername
9094 this . searchMinScore = codebaseIndexSearchMinScore
@@ -157,7 +161,8 @@ export class CodeIndexConfigManager {
157161 mistralOptions ?: { apiKey : string }
158162 qdrantUrl ?: string
159163 qdrantApiKey ?: string
160- valkeyUrl ?: string
164+ valkeyHostname ?: string
165+ valkeyPort ?: number
161166 valkeyPassword ?: string
162167 valkeyUsername ?: string
163168 searchProvider ?: string
@@ -179,7 +184,8 @@ export class CodeIndexConfigManager {
179184 geminiApiKey : this . geminiOptions ?. apiKey ?? "" ,
180185 mistralApiKey : this . mistralOptions ?. apiKey ?? "" ,
181186 qdrantUrl : this . qdrantUrl ?? "" ,
182- valkeyUrl : this . valkeyUrl ?? "" ,
187+ valkeyHostname : this . valkeyHostname ?? "" ,
188+ valkeyPort : this . valkeyPort ?? 6379 ,
183189 valkeyUsername : this . valkeyUsername ?? "" ,
184190 searchProvider : this . searchProvider ?? "" ,
185191 qdrantApiKey : this . qdrantApiKey ?? "" ,
@@ -208,7 +214,8 @@ export class CodeIndexConfigManager {
208214 mistralOptions : this . mistralOptions ,
209215 qdrantUrl : this . qdrantUrl ,
210216 qdrantApiKey : this . qdrantApiKey ,
211- valkeyUrl : this . valkeyUrl ,
217+ valkeyHostname : this . valkeyHostname ,
218+ valkeyPort : this . valkeyPort ,
212219 valkeyPassword : this . valkeyPassword ,
213220 valkeyUsername : this . valkeyUsername ,
214221 searchProvider : this . searchProvider ,
@@ -222,7 +229,7 @@ export class CodeIndexConfigManager {
222229 * Checks if the service is properly configured based on the embedder type.
223230 */
224231 public isConfigured ( ) : boolean {
225- const dbUrlPresent = this . qdrantUrl || this . valkeyUrl
232+ const dbUrlPresent = this . qdrantUrl || this . valkeyHostname
226233 if ( this . embedderProvider === "openai" ) {
227234 const openAiKey = this . openAiOptions ?. openAiNativeApiKey
228235 return ! ! ( openAiKey && dbUrlPresent )
@@ -278,7 +285,8 @@ export class CodeIndexConfigManager {
278285 const prevGeminiApiKey = prev ?. geminiApiKey ?? ""
279286 const prevMistralApiKey = prev ?. mistralApiKey ?? ""
280287 const prevQdrantUrl = prev ?. qdrantUrl ?? ""
281- const prevValkeyUrl = prev ?. valkeyUrl ?? ""
288+ const prevValkeyHostname = prev ?. valkeyHostname ?? ""
289+ const prevValkeyPort = prev ?. valkeyPort ?? 6379
282290 const prevSearchProvider = prev ?. searchProvider ?? ""
283291 const prevQdrantApiKey = prev ?. qdrantApiKey ?? ""
284292 const prevValkeyPassword = prev ?. valkeyPassword ?? ""
@@ -319,7 +327,8 @@ export class CodeIndexConfigManager {
319327 const currentGeminiApiKey = this . geminiOptions ?. apiKey ?? ""
320328 const currentMistralApiKey = this . mistralOptions ?. apiKey ?? ""
321329 const currentQdrantUrl = this . qdrantUrl ?? ""
322- const currentValkeyUrl = this . valkeyUrl ?? ""
330+ const currentValkeyHostname = this . valkeyHostname ?? ""
331+ const currentValkeyPort = this . valkeyPort ?? 6379
323332 const currentSearchProvider = this . searchProvider ?? ""
324333 const currentQdrantApiKey = this . qdrantApiKey ?? ""
325334 const currentValkeyPassword = this . valkeyPassword ?? ""
@@ -361,7 +370,7 @@ export class CodeIndexConfigManager {
361370 return true
362371 }
363372
364- if ( prevValkeyUrl !== currentValkeyUrl ) {
373+ if ( prevValkeyHostname !== currentValkeyHostname || prevValkeyPort !== currentValkeyPort ) {
365374 return true
366375 }
367376
@@ -428,7 +437,8 @@ export class CodeIndexConfigManager {
428437 qdrantUrl : this . qdrantUrl ,
429438 qdrantApiKey : this . qdrantApiKey ,
430439 searchProvider : this . searchProvider ,
431- valkeyUrl : this . valkeyUrl ,
440+ valkeyHostname : this . valkeyHostname ,
441+ valkeyPort : this . valkeyPort ,
432442 valkeyUsername : this . valkeyUsername ,
433443 valkeyPassword : this . valkeyPassword ,
434444 searchMinScore : this . currentSearchMinScore ,
0 commit comments