From 86d0c5383ec931b4df6d13203366a43684bbd0d1 Mon Sep 17 00:00:00 2001 From: Forgotten Date: Thu, 26 Feb 2026 16:34:39 -0600 Subject: [PATCH] feat(ui): add instructions file path field to adapter config forms Add agent instructions file field to Claude and Codex adapter config panels, allowing users to specify an absolute path to an AGENTS.md-style file injected into the system prompt at runtime. Co-Authored-By: Claude Opus 4.6 --- .../adapters/claude-local/config-fields.tsx | 36 +++++++++++++++++-- ui/src/adapters/codex-local/config-fields.tsx | 28 +++++++++++++++ ui/src/components/agent-config-defaults.ts | 1 + 3 files changed, 63 insertions(+), 2 deletions(-) diff --git a/ui/src/adapters/claude-local/config-fields.tsx b/ui/src/adapters/claude-local/config-fields.tsx index f7887279..b57024b6 100644 --- a/ui/src/adapters/claude-local/config-fields.tsx +++ b/ui/src/adapters/claude-local/config-fields.tsx @@ -10,8 +10,40 @@ 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(_props: AdapterConfigFieldsProps) { - return null; +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({ + isCreate, + values, + set, + config, + eff, + mark, +}: AdapterConfigFieldsProps) { + return ( + + + isCreate + ? set!({ instructionsFilePath: v }) + : mark("adapterConfig", "instructionsFilePath", v || undefined) + } + immediate + className={inputClass} + placeholder="/absolute/path/to/AGENTS.md" + /> + + ); } export function ClaudeLocalAdvancedFields({ diff --git a/ui/src/adapters/codex-local/config-fields.tsx b/ui/src/adapters/codex-local/config-fields.tsx index 4de58c75..e487a7bc 100644 --- a/ui/src/adapters/codex-local/config-fields.tsx +++ b/ui/src/adapters/codex-local/config-fields.tsx @@ -1,9 +1,16 @@ import type { AdapterConfigFieldsProps } from "../types"; import { + Field, ToggleField, + DraftInput, help, } from "../../components/agent-config-primitives"; +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 CodexLocalConfigFields({ isCreate, values, @@ -17,6 +24,27 @@ export function CodexLocalConfigFields({ return ( <> + + + isCreate + ? set!({ instructionsFilePath: v }) + : mark("adapterConfig", "instructionsFilePath", v || undefined) + } + immediate + className={inputClass} + placeholder="/absolute/path/to/AGENTS.md" + /> +