feat(quick-pane): add compact runtime controls

This commit is contained in:
2026-08-27 23:37:47 +02:00
parent e869a0bfcb
commit 5e9074605d
10 changed files with 1090 additions and 227 deletions
+40
View File
@@ -0,0 +1,40 @@
import { reconcileThinkingLevel, thinkingLevelOptions } from "../model-catalog";
import type { Model } from "../workspace/types";
import "./ThinkingSelector.css";
type ThinkingSelectorProps = {
model?: Model;
value: string;
disabled?: boolean;
className?: string;
onChange: (level: string) => void;
};
export function ThinkingSelector({
model,
value,
disabled = false,
className,
onChange,
}: ThinkingSelectorProps) {
const selected = reconcileThinkingLevel(model, value);
const classes = ["thinking-selector", className].filter(Boolean).join(" ");
return (
<label className={classes}>
<span>Thinking</span>
<select
aria-label="Thinking"
value={selected}
disabled={disabled}
onChange={(event) => onChange(event.currentTarget.value)}
>
{thinkingLevelOptions(model).map((option) => (
<option key={option.value} value={option.value}>
{option.label}
</option>
))}
</select>
</label>
);
}