Skip to content

Commit e573c00

Browse files
committed
Reorder "Code Completions" section in settings and update README to reflect the new order, also fix alternating row background in configurations list
1 parent 00f23ac commit e573c00

3 files changed

Lines changed: 38 additions & 38 deletions

File tree

‎README.md‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,12 +80,12 @@ Like all of CWC, the extension is [open-source](https://github.com/robertpiosik/
8080
**🛠️ Edit Context** \
8181
Pair-programming using natural language instructions.
8282

83-
**🛠️ Code Completions** \
84-
Get accurate code at cursor from state-of-the-art models.
85-
8683
**🛠️ Intelligent Update** \
8784
Integrate changes from malformed markdown code blocks.
8885

86+
**🛠️ Code Completions** \
87+
Get accurate code at cursor from state-of-the-art models.
88+
8989
**🛠️ Prune Context** \
9090
Remove irrelevant files from the current context selection.
9191

‎apps/editor/src/views/settings/frontend/Home/Home.tsx‎

Lines changed: 34 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -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"

‎packages/ui/src/components/editor/settings/ConfigurationsList/ConfigurationsList.module.scss‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
gap: 12px;
3434
padding: 0 12px;
3535

36-
&:nth-child(even) {
36+
&:nth-child(odd) {
3737
background-color: var(--cwc-bg-tertiary);
3838
}
3939

0 commit comments

Comments
 (0)