swarm-ui: label the empty effort option by runtime
On the ACP runtime the empty effort option is opencode's default, not claude's. The label and the two type comments now say so.
This commit is contained in:
parent
93ae435287
commit
aea35d2a10
2 changed files with 15 additions and 7 deletions
|
|
@ -34,10 +34,17 @@ const RUNTIME_OPTIONS = [
|
|||
{ value: "acp", label: "ACP (opencode)" },
|
||||
];
|
||||
|
||||
const EFFORT_OPTIONS = [
|
||||
{ value: "", label: "claude's default" },
|
||||
...EFFORTS.map((e) => ({ value: e, label: e })),
|
||||
];
|
||||
// The empty effort option is the runtime's own default: claude's on the API
|
||||
// key runtime, opencode's on ACP.
|
||||
function effortOptions(runtime: Runtime) {
|
||||
return [
|
||||
{
|
||||
value: "",
|
||||
label: runtime === "acp" ? "opencode's default" : "claude's default",
|
||||
},
|
||||
...EFFORTS.map((e) => ({ value: e, label: e })),
|
||||
];
|
||||
}
|
||||
|
||||
export function ClassifierSettings() {
|
||||
// The settings as the controller holds them; null until the first read.
|
||||
|
|
@ -147,7 +154,7 @@ export function ClassifierSettings() {
|
|||
id="classifier-effort"
|
||||
label="effort"
|
||||
value={draft.effort}
|
||||
options={EFFORT_OPTIONS}
|
||||
options={effortOptions(draft.runtime)}
|
||||
onChange={(effort) => edit({ ...draft, effort })}
|
||||
/>
|
||||
<TextField
|
||||
|
|
|
|||
Loading…
Reference in a new issue