File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed
webview-ui/src/components/settings Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -51,6 +51,7 @@ export const CodeIndexSettings: React.FC<CodeIndexSettingsProps> = ({
5151 areSettingsCommitted,
5252} ) => {
5353 const { t } = useAppTranslation ( )
54+ const DEFAULT_QDRANT_URL = "http://localhost:6333"
5455 const [ indexingStatus , setIndexingStatus ] = useState ( {
5556 systemStatus : "Standby" ,
5657 message : "" ,
@@ -425,13 +426,23 @@ export const CodeIndexSettings: React.FC<CodeIndexSettingsProps> = ({
425426 </ div >
426427 < div >
427428 < VSCodeTextField
428- value = { codebaseIndexConfig . codebaseIndexQdrantUrl || "http://localhost:6333" }
429+ value = { codebaseIndexConfig . codebaseIndexQdrantUrl ?? DEFAULT_QDRANT_URL }
430+ placeholder = { DEFAULT_QDRANT_URL }
429431 onInput = { ( e : any ) =>
430432 setCachedStateField ( "codebaseIndexConfig" , {
431433 ...codebaseIndexConfig ,
432434 codebaseIndexQdrantUrl : e . target . value ,
433435 } )
434436 }
437+ onBlur = { ( e : any ) => {
438+ // Set default value if field is empty on blur
439+ if ( ! e . target . value ) {
440+ setCachedStateField ( "codebaseIndexConfig" , {
441+ ...codebaseIndexConfig ,
442+ codebaseIndexQdrantUrl : DEFAULT_QDRANT_URL ,
443+ } )
444+ }
445+ } }
435446 style = { { width : "100%" } } > </ VSCodeTextField >
436447 </ div >
437448 </ div >
You can’t perform that action at this time.
0 commit comments