fix: move Skip permissions to Advanced section, fix indentation

- Moved "Skip permissions" toggle from ClaudeLocalConfigFields (main
  adapter config area) into ClaudeLocalAdvancedFields (collapsible
  advanced section)
- Fixed double-indentation on Advanced Adapter Settings by moving
  the CollapsibleSection out of the px-4 pb-3 wrapper div

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Forgotten
2026-02-20 12:50:36 -06:00
parent 0131cf3449
commit 0f4ab72888
2 changed files with 199 additions and 197 deletions

View File

@@ -10,7 +10,11 @@ import {
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";
export function ClaudeLocalConfigFields({
export function ClaudeLocalConfigFields(_props: AdapterConfigFieldsProps) {
return null;
}
export function ClaudeLocalAdvancedFields({
isCreate,
values,
set,
@@ -38,21 +42,6 @@ export function ClaudeLocalConfigFields({
: mark("adapterConfig", "dangerouslySkipPermissions", v)
}
/>
{/* Max turns — only shown in advanced section context, rendered here for availability */}
</>
);
}
export function ClaudeLocalAdvancedFields({
isCreate,
values,
set,
config,
eff,
mark,
}: AdapterConfigFieldsProps) {
return (
<Field label="Max turns per run" hint={help.maxTurnsPerRun}>
{isCreate ? (
<input
@@ -74,5 +63,6 @@ export function ClaudeLocalAdvancedFields({
/>
)}
</Field>
</>
);
}

View File

@@ -370,7 +370,7 @@ export function AgentConfigForm(props: AgentConfigFormProps) {
value={eff("identity", "capabilities", props.agent.capabilities ?? "")}
onChange={(v) => mark("identity", "capabilities", v || null)}
placeholder="Describe what this agent can do..."
contentClassName="min-h-[120px]"
contentClassName="min-h-[44px] text-sm font-mono"
imageUploadHandler={async (file) => {
const asset = await uploadMarkdownImage.mutateAsync({
file,
@@ -510,7 +510,7 @@ export function AgentConfigForm(props: AgentConfigFormProps) {
: mark("adapterConfig", "promptTemplate", v || undefined)
}
placeholder="You are agent {{ agent.name }}. Your role is {{ agent.role }}..."
contentClassName="min-h-[180px]"
contentClassName="min-h-[88px] text-sm font-mono"
imageUploadHandler={async (file) => {
const namespace = isCreate
? "agents/drafts/prompt-template"
@@ -524,6 +524,7 @@ export function AgentConfigForm(props: AgentConfigFormProps) {
{/* Adapter-specific fields */}
<uiAdapter.ConfigFields {...adapterFieldProps} />
</div>
{/* Advanced adapter section — collapsible in both modes */}
{isLocal && (
@@ -598,7 +599,7 @@ export function AgentConfigForm(props: AgentConfigFormProps) {
: mark("adapterConfig", "bootstrapPromptTemplate", v || undefined)
}
placeholder="Optional initial setup prompt for the first run"
contentClassName="min-h-[120px]"
contentClassName="min-h-[44px] text-sm font-mono"
imageUploadHandler={async (file) => {
const namespace = isCreate
? "agents/drafts/bootstrap-prompt"
@@ -684,7 +685,6 @@ export function AgentConfigForm(props: AgentConfigFormProps) {
</CollapsibleSection>
)}
</div>
</div>
{/* ---- Heartbeat Policy ---- */}
{isCreate ? (
@@ -757,6 +757,18 @@ export function AgentConfigForm(props: AgentConfigFormProps) {
className={inputClass}
/>
</Field>
<Field label="Max concurrent runs" hint={help.maxConcurrentRuns}>
<DraftNumberInput
value={eff(
"heartbeat",
"maxConcurrentRuns",
Number(heartbeat.maxConcurrentRuns ?? 1),
)}
onCommit={(v) => mark("heartbeat", "maxConcurrentRuns", v)}
immediate
className={inputClass}
/>
</Field>
</div>
</div>
</div>