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:
@@ -10,7 +10,11 @@ import {
|
|||||||
const inputClass =
|
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";
|
"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,
|
isCreate,
|
||||||
values,
|
values,
|
||||||
set,
|
set,
|
||||||
@@ -38,21 +42,6 @@ export function ClaudeLocalConfigFields({
|
|||||||
: mark("adapterConfig", "dangerouslySkipPermissions", v)
|
: 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}>
|
<Field label="Max turns per run" hint={help.maxTurnsPerRun}>
|
||||||
{isCreate ? (
|
{isCreate ? (
|
||||||
<input
|
<input
|
||||||
@@ -74,5 +63,6 @@ export function ClaudeLocalAdvancedFields({
|
|||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
</Field>
|
</Field>
|
||||||
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -370,7 +370,7 @@ export function AgentConfigForm(props: AgentConfigFormProps) {
|
|||||||
value={eff("identity", "capabilities", props.agent.capabilities ?? "")}
|
value={eff("identity", "capabilities", props.agent.capabilities ?? "")}
|
||||||
onChange={(v) => mark("identity", "capabilities", v || null)}
|
onChange={(v) => mark("identity", "capabilities", v || null)}
|
||||||
placeholder="Describe what this agent can do..."
|
placeholder="Describe what this agent can do..."
|
||||||
contentClassName="min-h-[120px]"
|
contentClassName="min-h-[44px] text-sm font-mono"
|
||||||
imageUploadHandler={async (file) => {
|
imageUploadHandler={async (file) => {
|
||||||
const asset = await uploadMarkdownImage.mutateAsync({
|
const asset = await uploadMarkdownImage.mutateAsync({
|
||||||
file,
|
file,
|
||||||
@@ -510,7 +510,7 @@ export function AgentConfigForm(props: AgentConfigFormProps) {
|
|||||||
: mark("adapterConfig", "promptTemplate", v || undefined)
|
: mark("adapterConfig", "promptTemplate", v || undefined)
|
||||||
}
|
}
|
||||||
placeholder="You are agent {{ agent.name }}. Your role is {{ agent.role }}..."
|
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) => {
|
imageUploadHandler={async (file) => {
|
||||||
const namespace = isCreate
|
const namespace = isCreate
|
||||||
? "agents/drafts/prompt-template"
|
? "agents/drafts/prompt-template"
|
||||||
@@ -524,6 +524,7 @@ export function AgentConfigForm(props: AgentConfigFormProps) {
|
|||||||
|
|
||||||
{/* Adapter-specific fields */}
|
{/* Adapter-specific fields */}
|
||||||
<uiAdapter.ConfigFields {...adapterFieldProps} />
|
<uiAdapter.ConfigFields {...adapterFieldProps} />
|
||||||
|
</div>
|
||||||
|
|
||||||
{/* Advanced adapter section — collapsible in both modes */}
|
{/* Advanced adapter section — collapsible in both modes */}
|
||||||
{isLocal && (
|
{isLocal && (
|
||||||
@@ -598,7 +599,7 @@ export function AgentConfigForm(props: AgentConfigFormProps) {
|
|||||||
: mark("adapterConfig", "bootstrapPromptTemplate", v || undefined)
|
: mark("adapterConfig", "bootstrapPromptTemplate", v || undefined)
|
||||||
}
|
}
|
||||||
placeholder="Optional initial setup prompt for the first run"
|
placeholder="Optional initial setup prompt for the first run"
|
||||||
contentClassName="min-h-[120px]"
|
contentClassName="min-h-[44px] text-sm font-mono"
|
||||||
imageUploadHandler={async (file) => {
|
imageUploadHandler={async (file) => {
|
||||||
const namespace = isCreate
|
const namespace = isCreate
|
||||||
? "agents/drafts/bootstrap-prompt"
|
? "agents/drafts/bootstrap-prompt"
|
||||||
@@ -684,7 +685,6 @@ export function AgentConfigForm(props: AgentConfigFormProps) {
|
|||||||
</CollapsibleSection>
|
</CollapsibleSection>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
|
|
||||||
{/* ---- Heartbeat Policy ---- */}
|
{/* ---- Heartbeat Policy ---- */}
|
||||||
{isCreate ? (
|
{isCreate ? (
|
||||||
@@ -757,6 +757,18 @@ export function AgentConfigForm(props: AgentConfigFormProps) {
|
|||||||
className={inputClass}
|
className={inputClass}
|
||||||
/>
|
/>
|
||||||
</Field>
|
</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>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user