@@ -5,6 +5,7 @@ import { ModelProvidersSection } from './sections/ModelProvidersSection'
55import { NavigationDivider } from '@ui/components/editor/settings/NavigationDivider'
66import { Item } from '@ui/components/editor/settings/Item'
77import { ApiToolConfigurationSection } from './sections/ApiToolConfigurationSection'
8+ import { Group } from '@ui/components/editor/settings/Group/Group'
89import { Section } from '@ui/components/editor/settings/Section'
910import { Textarea } from '@ui/components/editor/common/Textarea'
1011import {
@@ -293,17 +294,19 @@ export const Home: React.FC<Props> = (props) => {
293294 subtitle = "Manage your model providers here. Add, edit, reorder, or delete providers as needed."
294295 on_stuck_change = { model_providers_on_stuck_change }
295296 >
296- < ModelProvidersSection
297- providers = { props . providers }
298- on_reorder = { ( reordered ) => {
299- props . set_providers ( reordered )
300- props . on_reorder_providers ( reordered )
301- } }
302- on_add_provider = { props . on_add_provider }
303- on_delete_provider = { props . on_delete_provider }
304- on_rename_provider = { props . on_rename_provider }
305- on_change_api_key = { props . on_change_api_key }
306- />
297+ < Group >
298+ < ModelProvidersSection
299+ providers = { props . providers }
300+ on_reorder = { ( reordered ) => {
301+ props . set_providers ( reordered )
302+ props . on_reorder_providers ( reordered )
303+ } }
304+ on_add_provider = { props . on_add_provider }
305+ on_delete_provider = { props . on_delete_provider }
306+ on_rename_provider = { props . on_rename_provider }
307+ on_change_api_key = { props . on_change_api_key }
308+ />
309+ </ Group >
307310 </ Section >
308311 < Section
309312 ref = { ( el ) => ( section_refs . current [ 'edit-context' ] = el ) }
@@ -312,29 +315,31 @@ export const Home: React.FC<Props> = (props) => {
312315 subtitle = "Modify, create or delete files based on natural language instructions."
313316 on_stuck_change = { edit_context_on_stuck_change }
314317 >
315- < Item
316- title = "System Instructions"
317- description = "Tone and style instructions for the model."
318- slot_placement = "below"
319- slot = {
320- < Textarea
321- value = { edit_context_instructions }
322- on_change = { set_edit_context_instructions }
323- />
324- }
325- />
326- < ApiToolConfigurationSection
327- configurations = { props . edit_context_configs }
328- set_configurations = { props . set_edit_context_configs }
329- tool_name = "EDIT_CONTEXT"
330- can_have_default = { false }
331- on_add = { ( ) => props . on_add_config ( 'EDIT_CONTEXT' ) }
332- on_reorder = { ( reordered ) =>
333- props . on_reorder_configs ( 'EDIT_CONTEXT' , reordered )
334- }
335- on_edit = { ( id ) => props . on_edit_config ( 'EDIT_CONTEXT' , id ) }
336- on_delete = { ( id ) => props . on_delete_config ( 'EDIT_CONTEXT' , id ) }
337- />
318+ < Group >
319+ < Item
320+ title = "System Instructions"
321+ description = "Tone and style instructions for the model."
322+ slot_placement = "below"
323+ slot = {
324+ < Textarea
325+ value = { edit_context_instructions }
326+ on_change = { set_edit_context_instructions }
327+ />
328+ }
329+ />
330+ < ApiToolConfigurationSection
331+ configurations = { props . edit_context_configs }
332+ set_configurations = { props . set_edit_context_configs }
333+ tool_name = "EDIT_CONTEXT"
334+ can_have_default = { false }
335+ on_add = { ( ) => props . on_add_config ( 'EDIT_CONTEXT' ) }
336+ on_reorder = { ( reordered ) =>
337+ props . on_reorder_configs ( 'EDIT_CONTEXT' , reordered )
338+ }
339+ on_edit = { ( id ) => props . on_edit_config ( 'EDIT_CONTEXT' , id ) }
340+ on_delete = { ( id ) => props . on_delete_config ( 'EDIT_CONTEXT' , id ) }
341+ />
342+ </ Group >
338343 </ Section >
339344 < Section
340345 ref = { ( el ) => ( section_refs . current [ 'code-completions' ] = el ) }
@@ -343,24 +348,26 @@ export const Home: React.FC<Props> = (props) => {
343348 subtitle = "Get accurate code-at-cursor from state-of-the-art reasoning models."
344349 on_stuck_change = { code_completions_on_stuck_change }
345350 >
346- < ApiToolConfigurationSection
347- configurations = { props . code_completions_configs }
348- set_configurations = { props . set_code_completions_configs }
349- tool_name = "CODE_COMPLETIONS"
350- can_have_default = { true }
351- on_add = { ( ) => props . on_add_config ( 'CODE_COMPLETIONS' ) }
352- on_reorder = { ( reordered ) =>
353- props . on_reorder_configs ( 'CODE_COMPLETIONS' , reordered )
354- }
355- on_edit = { ( id ) => props . on_edit_config ( 'CODE_COMPLETIONS' , id ) }
356- on_delete = { ( id ) => props . on_delete_config ( 'CODE_COMPLETIONS' , id ) }
357- on_set_default = { ( id ) =>
358- props . on_set_default_config ( 'CODE_COMPLETIONS' , id )
359- }
360- on_unset_default = { ( ) =>
361- props . on_unset_default_config ( 'CODE_COMPLETIONS' )
362- }
363- />
351+ < Group >
352+ < ApiToolConfigurationSection
353+ configurations = { props . code_completions_configs }
354+ set_configurations = { props . set_code_completions_configs }
355+ tool_name = "CODE_COMPLETIONS"
356+ can_have_default = { true }
357+ on_add = { ( ) => props . on_add_config ( 'CODE_COMPLETIONS' ) }
358+ on_reorder = { ( reordered ) =>
359+ props . on_reorder_configs ( 'CODE_COMPLETIONS' , reordered )
360+ }
361+ on_edit = { ( id ) => props . on_edit_config ( 'CODE_COMPLETIONS' , id ) }
362+ on_delete = { ( id ) => props . on_delete_config ( 'CODE_COMPLETIONS' , id ) }
363+ on_set_default = { ( id ) =>
364+ props . on_set_default_config ( 'CODE_COMPLETIONS' , id )
365+ }
366+ on_unset_default = { ( ) =>
367+ props . on_unset_default_config ( 'CODE_COMPLETIONS' )
368+ }
369+ />
370+ </ Group >
364371 </ Section >
365372 < Section
366373 ref = { ( el ) => ( section_refs . current [ 'intelligent-update' ] = el ) }
@@ -369,24 +376,28 @@ export const Home: React.FC<Props> = (props) => {
369376 subtitle = { `Handle "truncated" edit format and malformed diffs.` }
370377 on_stuck_change = { intelligent_update_on_stuck_change }
371378 >
372- < ApiToolConfigurationSection
373- configurations = { props . intelligent_update_configs }
374- set_configurations = { props . set_intelligent_update_configs }
375- tool_name = "INTELLIGENT_UPDATE"
376- can_have_default = { true }
377- on_add = { ( ) => props . on_add_config ( 'INTELLIGENT_UPDATE' ) }
378- on_reorder = { ( reordered ) =>
379- props . on_reorder_configs ( 'INTELLIGENT_UPDATE' , reordered )
380- }
381- on_edit = { ( id ) => props . on_edit_config ( 'INTELLIGENT_UPDATE' , id ) }
382- on_delete = { ( id ) => props . on_delete_config ( 'INTELLIGENT_UPDATE' , id ) }
383- on_set_default = { ( id ) =>
384- props . on_set_default_config ( 'INTELLIGENT_UPDATE' , id )
385- }
386- on_unset_default = { ( ) =>
387- props . on_unset_default_config ( 'INTELLIGENT_UPDATE' )
388- }
389- />
379+ < Group >
380+ < ApiToolConfigurationSection
381+ configurations = { props . intelligent_update_configs }
382+ set_configurations = { props . set_intelligent_update_configs }
383+ tool_name = "INTELLIGENT_UPDATE"
384+ can_have_default = { true }
385+ on_add = { ( ) => props . on_add_config ( 'INTELLIGENT_UPDATE' ) }
386+ on_reorder = { ( reordered ) =>
387+ props . on_reorder_configs ( 'INTELLIGENT_UPDATE' , reordered )
388+ }
389+ on_edit = { ( id ) => props . on_edit_config ( 'INTELLIGENT_UPDATE' , id ) }
390+ on_delete = { ( id ) =>
391+ props . on_delete_config ( 'INTELLIGENT_UPDATE' , id )
392+ }
393+ on_set_default = { ( id ) =>
394+ props . on_set_default_config ( 'INTELLIGENT_UPDATE' , id )
395+ }
396+ on_unset_default = { ( ) =>
397+ props . on_unset_default_config ( 'INTELLIGENT_UPDATE' )
398+ }
399+ />
400+ </ Group >
390401 </ Section >
391402 < Section
392403 ref = { ( el ) => ( section_refs . current [ 'commit-messages' ] = el ) }
@@ -395,35 +406,37 @@ export const Home: React.FC<Props> = (props) => {
395406 subtitle = "Generate meaningful summaries of changes adhering to your style."
396407 on_stuck_change = { commit_messages_on_stuck_change }
397408 >
398- < Item
399- title = "Instructions"
400- description = "Guidelines for how generated commit messages should be written. Use this to set tone, structure, and conventions (e.g., Conventional Commits, line limits, gitmoji), which will be applied when creating summaries of changes."
401- slot_placement = "below"
402- slot = {
403- < Textarea
404- value = { commit_instructions }
405- on_change = { set_commit_instructions }
406- />
407- }
408- />
409- < ApiToolConfigurationSection
410- configurations = { props . commit_messages_configs }
411- set_configurations = { props . set_commit_messages_configs }
412- tool_name = "COMMIT_MESSAGES"
413- can_have_default = { true }
414- on_add = { ( ) => props . on_add_config ( 'COMMIT_MESSAGES' ) }
415- on_reorder = { ( reordered ) =>
416- props . on_reorder_configs ( 'COMMIT_MESSAGES' , reordered )
417- }
418- on_edit = { ( id ) => props . on_edit_config ( 'COMMIT_MESSAGES' , id ) }
419- on_delete = { ( id ) => props . on_delete_config ( 'COMMIT_MESSAGES' , id ) }
420- on_set_default = { ( id ) =>
421- props . on_set_default_config ( 'COMMIT_MESSAGES' , id )
422- }
423- on_unset_default = { ( ) =>
424- props . on_unset_default_config ( 'COMMIT_MESSAGES' )
425- }
426- />
409+ < Group >
410+ < Item
411+ title = "Instructions"
412+ description = "Guidelines for how generated commit messages should be written. Use this to set tone, structure, and conventions (e.g., Conventional Commits, line limits, gitmoji), which will be applied when creating summaries of changes."
413+ slot_placement = "below"
414+ slot = {
415+ < Textarea
416+ value = { commit_instructions }
417+ on_change = { set_commit_instructions }
418+ />
419+ }
420+ />
421+ < ApiToolConfigurationSection
422+ configurations = { props . commit_messages_configs }
423+ set_configurations = { props . set_commit_messages_configs }
424+ tool_name = "COMMIT_MESSAGES"
425+ can_have_default = { true }
426+ on_add = { ( ) => props . on_add_config ( 'COMMIT_MESSAGES' ) }
427+ on_reorder = { ( reordered ) =>
428+ props . on_reorder_configs ( 'COMMIT_MESSAGES' , reordered )
429+ }
430+ on_edit = { ( id ) => props . on_edit_config ( 'COMMIT_MESSAGES' , id ) }
431+ on_delete = { ( id ) => props . on_delete_config ( 'COMMIT_MESSAGES' , id ) }
432+ on_set_default = { ( id ) =>
433+ props . on_set_default_config ( 'COMMIT_MESSAGES' , id )
434+ }
435+ on_unset_default = { ( ) =>
436+ props . on_unset_default_config ( 'COMMIT_MESSAGES' )
437+ }
438+ />
439+ </ Group >
427440 </ Section >
428441 </ Layout >
429442 </ div >
0 commit comments