Skip to content

Commit c76f8a9

Browse files
committed
Update Claude Opus model version to 4.6 and enforce drag-and-drop sorting for configuration and provider lists
1 parent f1c5ac1 commit c76f8a9

3 files changed

Lines changed: 36 additions & 44 deletions

File tree

‎packages/shared/src/constants/chatbots.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ export const CHATBOTS = {
8080
models: {
8181
'sonnet-4-5': { label: 'Sonnet 4.5' },
8282
'haiku-4-5': { label: 'Haiku 4.5' },
83-
'opus-4-5': { label: 'Opus 4.5' }
83+
'opus-4-6': { label: 'Opus 4.6' }
8484
}
8585
} as Chatbot,
8686
Copilot: {

‎packages/ui/src/components/editor/settings/ConfigurationsList/ConfigurationsList.tsx‎

Lines changed: 31 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -31,19 +31,16 @@ export namespace ConfigurationsList {
3131
export const ConfigurationsList: React.FC<ConfigurationsList.Props> = (
3232
props
3333
) => {
34-
const sortable = props.on_reorder !== undefined
3534
const has_default = props.configurations.some((c) => c.is_default)
3635

3736
const render_item = (
3837
config: ConfigurationsList.Configuration,
3938
index: number
4039
) => (
4140
<div key={config.id} className={styles.row}>
42-
{sortable && (
43-
<div className={cn(styles['drag-handle'], styles['col-drag'])}>
44-
<span className="codicon codicon-gripper" />
45-
</div>
46-
)}
41+
<div className={cn(styles['drag-handle'], styles['col-drag'])}>
42+
<span className="codicon codicon-gripper" />
43+
</div>
4744
{props.on_set_default && (
4845
<Radio
4946
name={props.radio_group_name ?? 'default_configuration'}
@@ -62,13 +59,11 @@ export const ConfigurationsList: React.FC<ConfigurationsList.Props> = (
6259
<span>{config.description}</span>
6360
</div>
6461
<div className={styles['col-actions']}>
65-
{sortable && (
66-
<IconButton
67-
codicon_icon="insert"
68-
title="Insert new configuration below/above"
69-
on_click={() => props.on_add({ insertion_index: index })}
70-
/>
71-
)}
62+
<IconButton
63+
codicon_icon="insert"
64+
title="Insert new configuration below/above"
65+
on_click={() => props.on_add({ insertion_index: index })}
66+
/>
7267
<IconButton
7368
codicon_icon="edit"
7469
title="Edit configuration"
@@ -114,33 +109,30 @@ export const ConfigurationsList: React.FC<ConfigurationsList.Props> = (
114109
return (
115110
<div className={styles.container}>
116111
{render_header(true)}
117-
<div className={styles.list}>
118-
{props.configurations.length > 0 &&
119-
(sortable ? (
120-
<ReactSortable
121-
list={props.configurations}
122-
setList={(new_list) => {
123-
const has_order_changed =
124-
new_list.length != props.configurations.length ||
125-
new_list.some(
126-
(item, index) => item.id != props.configurations[index].id
127-
)
112+
{props.configurations.length > 0 && (
113+
<div className={styles.list}>
114+
<ReactSortable
115+
list={props.configurations}
116+
setList={(new_list) => {
117+
const has_order_changed =
118+
new_list.length != props.configurations.length ||
119+
new_list.some(
120+
(item, index) => item.id != props.configurations[index].id
121+
)
128122

129-
if (has_order_changed) {
130-
props.on_reorder(new_list)
131-
}
132-
}}
133-
tag="div"
134-
animation={150}
135-
>
136-
{props.configurations.map((item, index) =>
137-
render_item(item, index)
138-
)}
139-
</ReactSortable>
140-
) : (
141-
props.configurations.map((item, index) => render_item(item, index))
142-
))}
143-
</div>
123+
if (has_order_changed) {
124+
props.on_reorder(new_list)
125+
}
126+
}}
127+
tag="div"
128+
animation={150}
129+
>
130+
{props.configurations.map((item, index) =>
131+
render_item(item, index)
132+
)}
133+
</ReactSortable>
134+
</div>
135+
)}
144136
{props.configurations.length > 0 && render_header(false)}
145137
</div>
146138
)

‎packages/ui/src/components/editor/settings/ModelProviders/ModelProviders.tsx‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,8 @@ export const ModelProviders: React.FC<ModelProviders.Props> = (props) => {
9191
return (
9292
<div className={styles.container}>
9393
{render_header(true)}
94-
<div className={styles.list}>
95-
{props.providers.length > 0 && (
94+
{props.providers.length > 0 && (
95+
<div className={styles.list}>
9696
<ReactSortable
9797
list={with_ids(props.providers)}
9898
setList={(new_list) => {
@@ -113,8 +113,8 @@ export const ModelProviders: React.FC<ModelProviders.Props> = (props) => {
113113
>
114114
{props.providers.map((p, i) => render_item(p, i))}
115115
</ReactSortable>
116-
)}
117-
</div>
116+
</div>
117+
)}
118118
{props.providers.length > 0 && render_header(false)}
119119
</div>
120120
)

0 commit comments

Comments
 (0)