Skip to content

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

feat: hide bootstrap prompt config unless agent already has one

dotta3562cca743a4
diff --git a/ui/src/components/AgentConfigForm.tsx b/ui/src/components/AgentConfigForm.tsx
index c6e48cd009..5dab6a1e5d 100644
--- a/ui/src/components/AgentConfigForm.tsx
+++ b/ui/src/components/AgentConfigForm.tsx
@@ -717,36 +717,32 @@ export function AgentConfigForm(props: AgentConfigFormProps) {
)}
</>
)}
- <Field label="Bootstrap prompt (first run)" hint={help.bootstrapPrompt}>
- <MarkdownEditor
- value={
- isCreate
- ? val!.bootstrapPrompt
- : eff(
- "adapterConfig",
- "bootstrapPromptTemplate",
- String(config.bootstrapPromptTemplate ?? ""),
- )
- }
- onChange={(v) =>
- isCreate
- ? set!({ bootstrapPrompt: v })
- : mark("adapterConfig", "bootstrapPromptTemplate", v || undefined)
- }
- placeholder="Optional initial setup prompt for the first run"
- contentClassName="min-h-[44px] text-sm font-mono"
- imageUploadHandler={async (file) => {
- const namespace = isCreate
- ? "agents/drafts/bootstrap-prompt"
- : `agents/${props.agent.id}/bootstrap-prompt`;
- const asset = await uploadMarkdownImage.mutateAsync({ file, namespace });
- return asset.contentPath;
- }}
- />
- </Field>
- <div className="rounded-md border border-sky-500/25 bg-sky-500/10 px-3 py-2 text-xs text-sky-100">
- Bootstrap prompt is only sent for fresh sessions. Put stable setup, habits, and longer reusable guidance here. Frequent changes reduce the value of session reuse because new sessions must replay it.
- </div>
+ {!isCreate && typeof config.bootstrapPromptTemplate === "string" && config.bootstrapPromptTemplate && (
+ <>
+ <Field label="Bootstrap prompt (legacy)" hint={help.bootstrapPrompt}>
+ <MarkdownEditor
+ value={eff(
+ "adapterConfig",
+ "bootstrapPromptTemplate",
+ String(config.bootstrapPromptTemplate ?? ""),
+ )}
+ onChange={(v) =>
+ mark("adapterConfig", "bootstrapPromptTemplate", v || undefined)
+ }
+ placeholder="Optional initial setup prompt for the first run"
+ contentClassName="min-h-[44px] text-sm font-mono"
+ imageUploadHandler={async (file) => {
+ const namespace = `agents/${props.agent.id}/bootstrap-prompt`;
+ const asset = await uploadMarkdownImage.mutateAsync({ file, namespace });
+ return asset.contentPath;
+ }}
+ />
+ </Field>
+ <div className="rounded-md border border-amber-500/25 bg-amber-500/10 px-3 py-2 text-xs text-amber-200">
+ Bootstrap prompt is legacy and will be removed in a future release. Consider moving this content into the agent&apos;s prompt template or instructions file instead.
+ </div>
+ </>
+ )}
{adapterType === "claude_local" && (
<ClaudeLocalAdvancedFields {...adapterFieldProps} />
)}