Skip to content

Commit 75893cd

Browse files
authored
Capitalize reasoning effort labels (#277)
1 parent 24c35d2 commit 75893cd

2 files changed

Lines changed: 8 additions & 4 deletions

File tree

src/ModelConfigOption.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ import type {Model, ReasoningEffortOption} from "./app-server/v2";
55
export const MODEL_CONFIG_ID = "model";
66
export const REASONING_EFFORT_CONFIG_ID = "reasoning_effort";
77

8+
function capitalize(value: string): string {
9+
return value.charAt(0).toUpperCase() + value.slice(1);
10+
}
11+
812
export function findSupportedEffort(
913
options: ReadonlyArray<ReasoningEffortOption>,
1014
effort: string | undefined,
@@ -51,7 +55,7 @@ export function createReasoningEffortConfigOption(
5155
currentValue: currentEffort,
5256
options: supportedReasoningEfforts.map(option => ({
5357
value: option.reasoningEffort,
54-
name: option.reasoningEffort,
58+
name: capitalize(option.reasoningEffort),
5559
description: option.description,
5660
})),
5761
};

src/__tests__/CodexACPAgent/session-config-options.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,9 @@ describe("Session config options", () => {
7474
currentValue: "medium",
7575
type: "select",
7676
options: [
77-
{value: "low", name: "low"},
78-
{value: "medium", name: "medium"},
79-
{value: "high", name: "high"},
77+
{value: "low", name: "Low"},
78+
{value: "medium", name: "Medium"},
79+
{value: "high", name: "High"},
8080
],
8181
});
8282

0 commit comments

Comments
 (0)