Update stuff
Build and Push Next App / quality (push) Successful in 1m21s
Build and Push Next App / build-next (push) Successful in 3m34s

This commit is contained in:
Gabriel Brown
2026-06-22 00:41:51 -05:00
parent 2e13febfc7
commit 4114d5595c
20 changed files with 672 additions and 354 deletions
@@ -24,6 +24,14 @@ import {
} from '@spoon/ui';
const efforts = ['minimal', 'low', 'medium', 'high', 'xhigh'] as const;
const modelOptions = [
{ value: 'gpt-5.1-codex', label: 'GPT-5.1 Codex' },
{ value: 'gpt-5.5', label: 'GPT-5.5' },
{ value: 'gpt-5.5-pro', label: 'GPT-5.5 Pro' },
{ value: 'gpt-5.4', label: 'GPT-5.4' },
{ value: 'gpt-5.4-mini', label: 'GPT-5.4 Mini' },
] as const;
type AgentModel = (typeof modelOptions)[number]['value'];
type AgentSettings = {
enabled: boolean;
@@ -36,6 +44,11 @@ type AgentSettings = {
reasoningEffort: 'none' | 'minimal' | 'low' | 'medium' | 'high' | 'xhigh';
};
const toAgentModel = (value?: string): AgentModel =>
modelOptions.some((option) => option.value === value)
? (value as AgentModel)
: 'gpt-5.1-codex';
export const SpoonAgentSettingsForm = ({
spoon,
settings,
@@ -60,8 +73,8 @@ export const SpoonAgentSettingsForm = ({
settings?.checkCommand ?? '',
);
const [testCommand, setTestCommand] = useState(settings?.testCommand ?? '');
const [agentModel, setAgentModel] = useState(
settings?.agentModel ?? 'gpt-5.1-codex',
const [agentModel, setAgentModel] = useState<AgentModel>(
toAgentModel(settings?.agentModel),
);
const [reasoningEffort, setReasoningEffort] = useState<
'minimal' | 'low' | 'medium' | 'high' | 'xhigh'
@@ -127,11 +140,21 @@ export const SpoonAgentSettingsForm = ({
</div>
<div className='grid gap-2'>
<Label htmlFor='agentModel'>Model</Label>
<Input
id='agentModel'
<Select
value={agentModel}
onChange={(event) => setAgentModel(event.target.value)}
/>
onValueChange={(value) => setAgentModel(value as AgentModel)}
>
<SelectTrigger id='agentModel'>
<SelectValue />
</SelectTrigger>
<SelectContent>
{modelOptions.map((option) => (
<SelectItem key={option.value} value={option.value}>
{option.label}
</SelectItem>
))}
</SelectContent>
</Select>
</div>
<div className='grid gap-2'>
<Label>Reasoning effort</Label>
@@ -160,27 +183,37 @@ export const SpoonAgentSettingsForm = ({
<Input
id='installCommand'
value={installCommand}
placeholder='bun install'
placeholder='Auto-detect from lockfile'
onChange={(event) => setInstallCommand(event.target.value)}
/>
<p className='text-muted-foreground text-xs'>
Leave blank to inspect the repository and choose bun, pnpm, yarn,
or npm.
</p>
</div>
<div className='grid gap-2'>
<Label htmlFor='checkCommand'>Check command</Label>
<Input
id='checkCommand'
value={checkCommand}
placeholder='bun typecheck'
placeholder='Auto-detect typecheck or lint'
onChange={(event) => setCheckCommand(event.target.value)}
/>
<p className='text-muted-foreground text-xs'>
Leave blank to read package.json scripts after cloning.
</p>
</div>
<div className='grid gap-2'>
<Label htmlFor='testCommand'>Test command</Label>
<Input
id='testCommand'
value={testCommand}
placeholder='bun test'
placeholder='Auto-detect test script'
onChange={(event) => setTestCommand(event.target.value)}
/>
<p className='text-muted-foreground text-xs'>
Leave blank to run the detected test script when one exists.
</p>
</div>
</div>
<Button type='button' onClick={save}>