diff --git a/ui/src/adapters/claude-local/config-fields.tsx b/ui/src/adapters/claude-local/config-fields.tsx index f62307ff..972c378e 100644 --- a/ui/src/adapters/claude-local/config-fields.tsx +++ b/ui/src/adapters/claude-local/config-fields.tsx @@ -25,33 +25,36 @@ export function ClaudeLocalConfigFields({ eff, mark, models, + hideInstructionsFile, }: AdapterConfigFieldsProps) { return ( <> - -
- - isCreate - ? set!({ instructionsFilePath: v }) - : mark("adapterConfig", "instructionsFilePath", v || undefined) - } - immediate - className={inputClass} - placeholder="/absolute/path/to/AGENTS.md" - /> - -
-
+ {!hideInstructionsFile && ( + +
+ + isCreate + ? set!({ instructionsFilePath: v }) + : mark("adapterConfig", "instructionsFilePath", v || undefined) + } + immediate + className={inputClass} + placeholder="/absolute/path/to/AGENTS.md" + /> + +
+
+ )} - -
- - isCreate - ? set!({ instructionsFilePath: v }) - : mark("adapterConfig", "instructionsFilePath", v || undefined) - } - immediate - className={inputClass} - placeholder="/absolute/path/to/AGENTS.md" - /> - -
-
+ {!hideInstructionsFile && ( + +
+ + isCreate + ? set!({ instructionsFilePath: v }) + : mark("adapterConfig", "instructionsFilePath", v || undefined) + } + immediate + className={inputClass} + placeholder="/absolute/path/to/AGENTS.md" + /> + +
+
+ )}
diff --git a/ui/src/adapters/opencode-local/config-fields.tsx b/ui/src/adapters/opencode-local/config-fields.tsx index 043e91c1..a4ab1d53 100644 --- a/ui/src/adapters/opencode-local/config-fields.tsx +++ b/ui/src/adapters/opencode-local/config-fields.tsx @@ -17,7 +17,9 @@ export function OpenCodeLocalConfigFields({ config, eff, mark, + hideInstructionsFile, }: AdapterConfigFieldsProps) { + if (hideInstructionsFile) return null; return (
diff --git a/ui/src/adapters/types.ts b/ui/src/adapters/types.ts index 65d9836b..6a7ae48a 100644 --- a/ui/src/adapters/types.ts +++ b/ui/src/adapters/types.ts @@ -20,6 +20,8 @@ export interface AdapterConfigFieldsProps { mark: (group: "adapterConfig", field: string, value: unknown) => void; /** Available models for dropdowns */ models: { id: string; label: string }[]; + /** When true, hides the instructions file path field (e.g. during import where it's set automatically) */ + hideInstructionsFile?: boolean; } export interface UIAdapterModule { diff --git a/ui/src/pages/CompanyImport.tsx b/ui/src/pages/CompanyImport.tsx index c495a188..a323148b 100644 --- a/ui/src/pages/CompanyImport.tsx +++ b/ui/src/pages/CompanyImport.tsx @@ -27,6 +27,7 @@ import { import { Field, adapterLabels } from "../components/agent-config-primitives"; import { defaultCreateValues } from "../components/agent-config-defaults"; import { getUIAdapter } from "../adapters"; +import { ClaudeLocalAdvancedFields } from "../adapters/claude-local/config-fields"; import type { CreateConfigValues } from "@paperclipai/adapter-utils"; import { type FileTreeNode, @@ -542,7 +543,21 @@ function AdapterPickerList({ eff={() => "" as any} mark={() => {}} models={[]} + hideInstructionsFile /> + {selectedType === "claude_local" && ( + onChangeConfig(agent.slug, patch)} + config={{}} + eff={() => "" as any} + mark={() => {}} + models={[]} + /> + )}
)}