From f51324bfbc59eba8c9e5f54067da9bba2da75ba4 Mon Sep 17 00:00:00 2001 From: Arda Erzin Date: Fri, 26 Jun 2026 00:18:26 +0200 Subject: [PATCH] feat(frontend): offer Agent in the Prompts page "Create new" menu MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The Home create modal offers Chat / Completion / Agent, but the Prompts page's "Create new" menu (and the breadcrumb create menu) only listed Chat and Completion, so agent workflows couldn't be created from Prompts. The create handler is already type-agnostic (handleOpenNewPromptModal → createEphemeralAppFromTemplate({type}) → open the agent create drawer, with onOpenNewPrompt/onNewPrompt typed `(type: AppType)`); only the menu entries were missing. Add an Agent item to both menus, wired exactly like Chat/Completion. --- .../prompts/components/PromptsBreadcrumb.tsx | 10 ++++++++++ .../prompts/components/PromptsTableSection.tsx | 17 +++++++++++++++++ 2 files changed, 27 insertions(+) diff --git a/web/oss/src/components/pages/prompts/components/PromptsBreadcrumb.tsx b/web/oss/src/components/pages/prompts/components/PromptsBreadcrumb.tsx index 5617934f79..dd0811d9de 100644 --- a/web/oss/src/components/pages/prompts/components/PromptsBreadcrumb.tsx +++ b/web/oss/src/components/pages/prompts/components/PromptsBreadcrumb.tsx @@ -148,6 +148,16 @@ const PromptsBreadcrumb = ({ ), onClick: () => onNewPrompt?.("completion"), }, + { + key: "new_prompt_agent", + label: ( + + {getAppTypeIcon("agent")} + Agent + + ), + onClick: () => onNewPrompt?.("agent"), + }, ], }, { diff --git a/web/oss/src/components/pages/prompts/components/PromptsTableSection.tsx b/web/oss/src/components/pages/prompts/components/PromptsTableSection.tsx index d74fc91d72..60f9fc0f0f 100644 --- a/web/oss/src/components/pages/prompts/components/PromptsTableSection.tsx +++ b/web/oss/src/components/pages/prompts/components/PromptsTableSection.tsx @@ -92,6 +92,23 @@ export const PromptsTableSection = ({ onOpenNewPrompt("completion") }, }, + { + key: "new_prompt_agent", + label: ( + + {getAppTypeIcon("agent")} + Agent + + ), + onClick: ({ + domEvent, + }: { + domEvent: React.MouseEvent | React.KeyboardEvent + }) => { + domEvent.stopPropagation() + onOpenNewPrompt("agent") + }, + }, ], }, {