@@ -43,11 +43,6 @@ const NAV_ITEMS_CONFIG: NavConfigItem[] = [
4343 } ,
4444 { type : 'divider' , text : 'settings.sidebar.api-tools' } ,
4545 { type : 'item' , id : 'edit-context' , label : 'settings.sidebar.edit-context' } ,
46- {
47- type : 'item' ,
48- id : 'code-completions' ,
49- label : 'settings.sidebar.code-completions'
50- } ,
5146 {
5247 type : 'item' ,
5348 id : 'intelligent-update' ,
@@ -58,6 +53,11 @@ const NAV_ITEMS_CONFIG: NavConfigItem[] = [
5853 id : 'prune-context' ,
5954 label : 'settings.sidebar.prune-context'
6055 } ,
56+ {
57+ type : 'item' ,
58+ id : 'code-completions' ,
59+ label : 'settings.sidebar.code-completions'
60+ } ,
6161 {
6262 type : 'item' ,
6363 id : 'commit-messages' ,
@@ -139,9 +139,9 @@ export const Home: React.FC<Props> = (props) => {
139139 general : null ,
140140 'model-providers' : null ,
141141 'edit-context' : null ,
142- 'code-completions' : null ,
143142 'intelligent-update' : null ,
144143 'prune-context' : null ,
144+ 'code-completions' : null ,
145145 'commit-messages' : null
146146 } )
147147 const [ commit_instructions , set_commit_instructions ] = useState ( '' )
@@ -391,34 +391,6 @@ export const Home: React.FC<Props> = (props) => {
391391 />
392392 </ Group >
393393 </ Section >
394- < Section
395- ref = { ( el ) => ( section_refs . current [ 'code-completions' ] = el ) }
396- group = "API Tool"
397- title = "Code Completions"
398- subtitle = "Get accurate code at cursor from state-of-the-art models."
399- on_stuck_change = { code_completions_on_stuck_change }
400- >
401- < Group >
402- < ApiToolConfigurationSection
403- configurations = { props . code_completions_configs }
404- set_configurations = { props . set_code_completions_configs }
405- tool_name = "CODE_COMPLETIONS"
406- can_have_default = { true }
407- on_add = { ( ) => props . on_add_config ( 'CODE_COMPLETIONS' ) }
408- on_reorder = { ( reordered ) =>
409- props . on_reorder_configs ( 'CODE_COMPLETIONS' , reordered )
410- }
411- on_edit = { ( id ) => props . on_edit_config ( 'CODE_COMPLETIONS' , id ) }
412- on_delete = { ( id ) => props . on_delete_config ( 'CODE_COMPLETIONS' , id ) }
413- on_set_default = { ( id ) =>
414- props . on_set_default_config ( 'CODE_COMPLETIONS' , id )
415- }
416- on_unset_default = { ( ) =>
417- props . on_unset_default_config ( 'CODE_COMPLETIONS' )
418- }
419- />
420- </ Group >
421- </ Section >
422394 < Section
423395 ref = { ( el ) => ( section_refs . current [ 'intelligent-update' ] = el ) }
424396 group = "API Tool"
@@ -471,6 +443,34 @@ export const Home: React.FC<Props> = (props) => {
471443 />
472444 </ Group >
473445 </ Section >
446+ < Section
447+ ref = { ( el ) => ( section_refs . current [ 'code-completions' ] = el ) }
448+ group = "API Tool"
449+ title = "Code Completions"
450+ subtitle = "Get accurate code at cursor from state-of-the-art models."
451+ on_stuck_change = { code_completions_on_stuck_change }
452+ >
453+ < Group >
454+ < ApiToolConfigurationSection
455+ configurations = { props . code_completions_configs }
456+ set_configurations = { props . set_code_completions_configs }
457+ tool_name = "CODE_COMPLETIONS"
458+ can_have_default = { true }
459+ on_add = { ( ) => props . on_add_config ( 'CODE_COMPLETIONS' ) }
460+ on_reorder = { ( reordered ) =>
461+ props . on_reorder_configs ( 'CODE_COMPLETIONS' , reordered )
462+ }
463+ on_edit = { ( id ) => props . on_edit_config ( 'CODE_COMPLETIONS' , id ) }
464+ on_delete = { ( id ) => props . on_delete_config ( 'CODE_COMPLETIONS' , id ) }
465+ on_set_default = { ( id ) =>
466+ props . on_set_default_config ( 'CODE_COMPLETIONS' , id )
467+ }
468+ on_unset_default = { ( ) =>
469+ props . on_unset_default_config ( 'CODE_COMPLETIONS' )
470+ }
471+ />
472+ </ Group >
473+ </ Section >
474474 < Section
475475 ref = { ( el ) => ( section_refs . current [ 'commit-messages' ] = el ) }
476476 group = "API Tool"
0 commit comments