Skip to content

The open-source app everyone uses to manage agents at work

fix: hide instructions file and show advanced fields in import adapter config

Dotta0763e2eb20aa
diff --git a/ui/src/adapters/claude-local/config-fields.tsx b/ui/src/adapters/claude-local/config-fields.tsx
index f62307ff95..972c378e58 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 (
<>
- <Field label="Agent instructions file" hint={instructionsFileHint}>
- <div className="flex items-center gap-2">
- <DraftInput
- value={
- isCreate
- ? values!.instructionsFilePath ?? ""
- : eff(
- "adapterConfig",
- "instructionsFilePath",
- String(config.instructionsFilePath ?? ""),
- )
- }
- onCommit={(v) =>
- isCreate
- ? set!({ instructionsFilePath: v })
- : mark("adapterConfig", "instructionsFilePath", v || undefined)
- }
- immediate
- className={inputClass}
- placeholder="/absolute/path/to/AGENTS.md"
- />
- <ChoosePathButton />
- </div>
- </Field>
+ {!hideInstructionsFile && (
+ <Field label="Agent instructions file" hint={instructionsFileHint}>
+ <div className="flex items-center gap-2">
+ <DraftInput
+ value={
+ isCreate
+ ? values!.instructionsFilePath ?? ""
+ : eff(
+ "adapterConfig",
+ "instructionsFilePath",
+ String(config.instructionsFilePath ?? ""),
+ )
+ }
+ onCommit={(v) =>
+ isCreate
+ ? set!({ instructionsFilePath: v })
+ : mark("adapterConfig", "instructionsFilePath", v || undefined)
+ }
+ immediate
+ className={inputClass}
+ placeholder="/absolute/path/to/AGENTS.md"
+ />
+ <ChoosePathButton />
+ </div>
+ </Field>
+ )}
<LocalWorkspaceRuntimeFields
isCreate={isCreate}
values={values}
diff --git a/ui/src/adapters/codex-local/config-fields.tsx b/ui/src/adapters/codex-local/config-fields.tsx
index 77a930f2e4..125630bae3 100644
--- a/ui/src/adapters/codex-local/config-fields.tsx
+++ b/ui/src/adapters/codex-local/config-fields.tsx
@@ -23,36 +23,39 @@ export function CodexLocalConfigFields({
eff,
mark,
models,
+ hideInstructionsFile,
}: AdapterConfigFieldsProps) {
const bypassEnabled =
config.dangerouslyBypassApprovalsAndSandbox === true || config.dangerouslyBypassSandbox === true;
return (
<>
- <Field label="Agent instructions file" hint={instructionsFileHint}>
- <div className="flex items-center gap-2">
- <DraftInput
- value={
- isCreate
- ? values!.instructionsFilePath ?? ""
- : eff(
- "adapterConfig",
- "instructionsFilePath",
- String(config.instructionsFilePath ?? ""),
- )
- }
- onCommit={(v) =>
- isCreate
- ? set!({ instructionsFilePath: v })
- : mark("adapterConfig", "instructionsFilePath", v || undefined)
- }
- immediate
- className={inputClass}
- placeholder="/absolute/path/to/AGENTS.md"
- />
- <ChoosePathButton />
- </div>
- </Field>
+ {!hideInstructionsFile && (
+ <Field label="Agent instructions file" hint={instructionsFileHint}>
+ <div className="flex items-center gap-2">
+ <DraftInput
+ value={
+ isCreate
+ ? values!.instructionsFilePath ?? ""
+ : eff(
+ "adapterConfig",
+ "instructionsFilePath",
+ String(config.instructionsFilePath ?? ""),
+ )
+ }
+ onCommit={(v) =>
+ isCreate
+ ? set!({ instructionsFilePath: v })
+ : mark("adapterConfig", "instructionsFilePath", v || undefined)
+ }
+ immediate
+ className={inputClass}
+ placeholder="/absolute/path/to/AGENTS.md"
+ />
+ <ChoosePathButton />
+ </div>
+ </Field>
+ )}
<ToggleField
label="Bypass sandbox"
hint={help.dangerouslyBypassSandbox}
diff --git a/ui/src/adapters/cursor/config-fields.tsx b/ui/src/adapters/cursor/config-fields.tsx
index da5701be8b..5d0204ceb9 100644
--- a/ui/src/adapters/cursor/config-fields.tsx
+++ b/ui/src/adapters/cursor/config-fields.tsx
@@ -17,7 +17,9 @@ export function CursorLocalConfigFields({
config,
eff,
mark,
+ hideInstructionsFile,
}: AdapterConfigFieldsProps) {
+ if (hideInstructionsFile) return null;
return (
<Field label="Agent instructions file" hint={instructionsFileHint}>
<div className="flex items-center gap-2">
diff --git a/ui/src/adapters/opencode-local/config-fields.tsx b/ui/src/adapters/opencode-local/config-fields.tsx
index 043e91c193..a4ab1d5392 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 (
<Field label="Agent instructions file" hint={instructionsFileHint}>
<div className="flex items-center gap-2">
diff --git a/ui/src/adapters/types.ts b/ui/src/adapters/types.ts
index 65d9836baa..6a7ae48a32 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 c495a188fb..a323148b6c 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" && (
+ <ClaudeLocalAdvancedFields
+ mode="create"
+ isCreate
+ adapterType={selectedType}
+ values={vals}
+ set={(patch) => onChangeConfig(agent.slug, patch)}
+ config={{}}
+ eff={() => "" as any}
+ mark={() => {}}
+ models={[]}
+ />
+ )}
</div>
)}
</div>