Skip to content
Closed
Show file tree
Hide file tree
Changes from 19 commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
69940f1
feat(ui): reorder api profile
elianiva Sep 6, 2025
951c876
feat(ui): improve a11y
elianiva Sep 6, 2025
e2e1330
feat(profile-selector): persist order settings
elianiva Sep 6, 2025
60d7bf8
test(api-selector): fix broken test
elianiva Sep 6, 2025
e8d02b1
feat(profile-selector): add keyboard support
elianiva Sep 6, 2025
c765902
fix: missing translations
elianiva Sep 7, 2025
4820e6f
fix(api-selector): use single source of truth
elianiva Sep 16, 2025
2407f9b
test(api-selector): adjust with new behaviour
elianiva Sep 16, 2025
5d91970
refactor: move profile reorder to settings
elianiva Sep 29, 2025
be6bb60
refactor: simplify api config reordering logic
elianiva Sep 29, 2025
866e93c
fix(api-selector): incorrect param shape
elianiva Sep 29, 2025
094bd2f
chore: add missing translations
elianiva Sep 29, 2025
52b0acc
fix: reordering not working caused by validation
elianiva Sep 29, 2025
775b927
refactor: slightly better api config item ui
elianiva Sep 29, 2025
d840a31
test(api-selector): sync with current behaviour
elianiva Sep 29, 2025
27b8aff
style: readme formatting
elianiva Sep 30, 2025
87c5dd9
refactor(reorder-profile): simplify code
elianiva Sep 30, 2025
4869127
chore: remove redundant locales
elianiva Sep 30, 2025
0d95ce0
style: readme formatting got reset
elianiva Sep 30, 2025
638e912
fix(ui): persist API config custom order on sort; add onSortModeChang…
hannesrudolph Nov 6, 2025
52bf3c3
feat(ui): apply Bruno feedback — simplify Chat dropdown (remove sort …
hannesrudolph Nov 6, 2025
daed3e6
fix(ui): ensure Chat dropdown strictly sorts A–Z (case-insensitive, n…
hannesrudolph Nov 6, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion locales/ca/README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion locales/de/README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion locales/es/README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion locales/fr/README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion locales/hi/README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion locales/id/README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion locales/it/README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion locales/ja/README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion locales/ko/README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion locales/nl/README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion locales/pl/README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion locales/pt-BR/README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion locales/ru/README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion locales/tr/README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion locales/vi/README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion locales/zh-CN/README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion locales/zh-TW/README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions packages/types/src/global-settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,15 @@ export const globalSettingsSchema = z.object({
currentApiConfigName: z.string().optional(),
listApiConfigMeta: z.array(providerSettingsEntrySchema).optional(),
pinnedApiConfigs: z.record(z.string(), z.boolean()).optional(),
apiConfigsCustomOrder: z
.array(
z.object({
id: z.string(),
index: z.number(),
pinned: z.boolean(),
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I left the pinned field here because I'm not sure what to do with the pinned configs for now. I tried doing separate reordering but that feels a bit overkill, so I reverted it and thought of leaving this here just in case we might want to do something with it in the future.

}),
)
.optional(),
Comment on lines +55 to +63
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The pinned field in apiConfigsCustomOrder is defined but never meaningfully used. In ApiConfigManager.tsx line 172, it's preserved with a default value but the sorting logic only uses the index field. This unused field adds complexity to the data model without providing value. Either implement functionality that uses this field or remove it from the schema to avoid data inconsistencies.

Fix it with Roo Code or mention @roomote and request a fix.


lastShownAnnouncementId: z.string().optional(),
customInstructions: z.string().optional(),
Expand Down Expand Up @@ -284,6 +293,7 @@ export const EVALS_SETTINGS: RooCodeSettings = {
lastShownAnnouncementId: "jul-09-2025-3-23-0",

pinnedApiConfigs: {},
apiConfigsCustomOrder: [],

autoApprovalEnabled: true,
alwaysAllowReadOnly: true,
Expand Down
3 changes: 3 additions & 0 deletions src/core/webview/ClineProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1881,6 +1881,7 @@ export class ClineProvider
openRouterImageApiKey,
openRouterImageGenerationSelectedModel,
openRouterUseMiddleOutTransform,
apiConfigsCustomOrder,
featureRoomoteControlEnabled,
} = await this.getState()

Expand Down Expand Up @@ -1968,6 +1969,7 @@ export class ClineProvider
currentApiConfigName: currentApiConfigName ?? "default",
listApiConfigMeta: listApiConfigMeta ?? [],
pinnedApiConfigs: pinnedApiConfigs ?? {},
apiConfigsCustomOrder: apiConfigsCustomOrder ?? [],
mode: mode ?? defaultModeSlug,
customModePrompts: customModePrompts ?? {},
customSupportPrompts: customSupportPrompts ?? {},
Expand Down Expand Up @@ -2194,6 +2196,7 @@ export class ClineProvider
currentApiConfigName: stateValues.currentApiConfigName ?? "default",
listApiConfigMeta: stateValues.listApiConfigMeta ?? [],
pinnedApiConfigs: stateValues.pinnedApiConfigs ?? {},
apiConfigsCustomOrder: stateValues.apiConfigsCustomOrder ?? [],
modeApiConfigs: stateValues.modeApiConfigs ?? ({} as Record<Mode, string>),
customModePrompts: stateValues.customModePrompts ?? {},
customSupportPrompts: stateValues.customSupportPrompts ?? {},
Expand Down
16 changes: 16 additions & 0 deletions src/core/webview/webviewMessageHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1699,6 +1699,22 @@ export const webviewMessageHandler = async (
await provider.postStateToWebview()
}
break
case "setApiConfigsCustomOrder":
if (message.values && Array.isArray(message.values.customOrder)) {
const isValidOrder = message.values.customOrder.every(
(item: any) =>
typeof item === "object" &&
typeof item.id === "string" &&
typeof item.index === "number" &&
typeof item.pinned === "boolean",
)

if (isValidOrder) {
await updateGlobalState("apiConfigsCustomOrder", message.values.customOrder)
await provider.postStateToWebview()
}
}
break
case "enhancementApiConfigId":
await updateGlobalState("enhancementApiConfigId", message.text)
await provider.postStateToWebview()
Expand Down
1 change: 1 addition & 0 deletions src/shared/ExtensionMessage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,7 @@ export type ExtensionState = Pick<
| "currentApiConfigName"
| "listApiConfigMeta"
| "pinnedApiConfigs"
| "apiConfigsCustomOrder"
// | "lastShownAnnouncementId"
| "customInstructions"
// | "taskHistory" // Optional in GlobalSettings, required here.
Expand Down
1 change: 1 addition & 0 deletions src/shared/WebviewMessage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,7 @@ export interface WebviewMessage {
| "includeCurrentCost"
| "searchFiles"
| "toggleApiConfigPin"
| "setApiConfigsCustomOrder"
| "setHistoryPreviewCollapsed"
| "hasOpenedModeSelector"
| "cloudButtonClicked"
Expand Down
Loading