From cef656264ea137fb1e960d3d591ae76fcfe0bc3c Mon Sep 17 00:00:00 2001 From: Mikkel Georgsen Date: Wed, 1 Apr 2026 12:00:30 +0200 Subject: [PATCH] [nexus] feat(20-01): expand HermesLocalConfigFields with model, toolsets, persistSession, timeoutSec - Add Model field (both create + edit modes) using CreateConfigValues.model - Add Toolsets field (both create + edit modes) using extraArgs in create, adapterConfig.toolsets in edit - Add Persist Session checkbox (edit mode only) wired to adapterConfig.persistSession - Add Timeout (seconds) field (edit mode only) wired to adapterConfig.timeoutSec - Restructure component to use fragment with conditional hideInstructionsFile guard - TypeScript compiles cleanly --- .../adapters/hermes-local/config-fields.tsx | 177 +++++++++++++----- 1 file changed, 128 insertions(+), 49 deletions(-) diff --git a/ui/src/adapters/hermes-local/config-fields.tsx b/ui/src/adapters/hermes-local/config-fields.tsx index 62b85fea..69ab93fe 100644 --- a/ui/src/adapters/hermes-local/config-fields.tsx +++ b/ui/src/adapters/hermes-local/config-fields.tsx @@ -1,49 +1,128 @@ -import type { AdapterConfigFieldsProps } from "../types"; -import { - Field, - DraftInput, -} from "../../components/agent-config-primitives"; -import { ChoosePathButton } from "../../components/PathInstructionsModal"; - -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 HermesLocalConfigFields({ - isCreate, - values, - set, - config, - eff, - mark, - hideInstructionsFile, -}: AdapterConfigFieldsProps) { - if (hideInstructionsFile) return null; - return ( - -
- - isCreate - ? set!({ instructionsFilePath: v }) - : mark("adapterConfig", "instructionsFilePath", v || undefined) - } - immediate - className={inputClass} - placeholder="/absolute/path/to/AGENTS.md" - /> - -
-
- ); -} +import type { AdapterConfigFieldsProps } from "../types"; +import { + Field, + DraftInput, +} from "../../components/agent-config-primitives"; +import { ChoosePathButton } from "../../components/PathInstructionsModal"; + +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 HermesLocalConfigFields({ + isCreate, + values, + set, + config, + eff, + mark, + hideInstructionsFile, +}: AdapterConfigFieldsProps) { + return ( + <> + {!hideInstructionsFile && ( + +
+ + isCreate + ? set!({ instructionsFilePath: v }) + : mark("adapterConfig", "instructionsFilePath", v || undefined) + } + immediate + className={inputClass} + placeholder="/absolute/path/to/AGENTS.md" + /> + +
+
+ )} + + + isCreate + ? set!({ model: v }) + : mark("adapterConfig", "model", v || undefined) + } + immediate + className={inputClass} + placeholder="anthropic/claude-sonnet-4" + /> + + + + isCreate + ? set!({ extraArgs: v }) + : mark("adapterConfig", "toolsets", v || undefined) + } + immediate + className={inputClass} + placeholder="terminal,file,web" + /> + + {!isCreate && ( + <> + + + + + + mark("adapterConfig", "timeoutSec", Number(v) || 300) + } + immediate + className={inputClass} + placeholder="300" + /> + + + )} + + ); +}