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" },
|
||||
// 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
|
||||
|
|
|
|||
|
|
@ -29,7 +29,8 @@ export interface AcpSettings {
|
|||
/** The settings in force. A PUT changes only the fields it carries. */
|
||||
export interface ClassifierSettingsBody {
|
||||
model: string;
|
||||
/** `null` is claude's own default, which passes no `--effort`. */
|
||||
/** `null` is the runtime's own default: claude's, which passes no
|
||||
* `--effort`, or opencode's. */
|
||||
effort: Effort | null;
|
||||
max_concurrent_reviews: number;
|
||||
runtime: Runtime;
|
||||
|
|
@ -40,7 +41,7 @@ export interface ClassifierSettingsBody {
|
|||
/** The form's fields as the user typed them. */
|
||||
export interface SettingsDraft {
|
||||
model: string;
|
||||
/** An effort, or `""` for claude's default. */
|
||||
/** An effort, or `""` for the runtime's own default. */
|
||||
effort: string;
|
||||
max: string;
|
||||
runtime: Runtime;
|
||||
|
|
|
|||
Loading…
Reference in a new issue