import type { AdapterConfigFieldsProps } from "../types"; import { Field, ToggleField, DraftInput, DraftNumberInput, help, } from "../../components/agent-config-primitives"; import { ChoosePathButton } from "../../components/PathInstructionsModal"; import { LocalWorkspaceRuntimeFields } from "../local-workspace-runtime-fields"; const inputClass = "w-full rounded-md border border-border px-2.5 py-1.5 bg-transparent outline-none text-sm font-mono placeholder:text-muted-foreground/40"; const instructionsFileHint = "Absolute path to a markdown file (e.g. AGENTS.md) that defines this agent's behavior. Injected into the system prompt at runtime."; export function ClaudeLocalConfigFields({ mode, isCreate, adapterType, values, set, config, eff, mark, models, }: AdapterConfigFieldsProps) { return ( <>
isCreate ? set!({ instructionsFilePath: v }) : mark("adapterConfig", "instructionsFilePath", v || undefined) } immediate className={inputClass} placeholder="/absolute/path/to/AGENTS.md" />
); } export function ClaudeLocalAdvancedFields({ isCreate, values, set, config, eff, mark, }: AdapterConfigFieldsProps) { return ( <> isCreate ? set!({ chrome: v }) : mark("adapterConfig", "chrome", v) } /> isCreate ? set!({ dangerouslySkipPermissions: v }) : mark("adapterConfig", "dangerouslySkipPermissions", v) } /> {isCreate ? ( set!({ maxTurnsPerRun: Number(e.target.value) })} /> ) : ( mark("adapterConfig", "maxTurnsPerRun", v || 300)} immediate className={inputClass} /> )} ); }