From ef08fd7c71bc004410da4791c45cd87a17fc7193 Mon Sep 17 00:00:00 2001 From: hugocasa Date: Fri, 18 Sep 2026 16:02:51 +0200 Subject: [PATCH] fix: ask for a tool name on every kind of agent tool Co-Authored-By: Claude Opus 5 --- .../flows/common/FlowCardHeader.svelte | 28 +++++++++++-------- 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/frontend/src/lib/components/flows/common/FlowCardHeader.svelte b/frontend/src/lib/components/flows/common/FlowCardHeader.svelte index 063367cc85..323a04abe3 100644 --- a/frontend/src/lib/components/flows/common/FlowCardHeader.svelte +++ b/frontend/src/lib/components/flows/common/FlowCardHeader.svelte @@ -59,6 +59,9 @@ let toolNameError = $derived( isAgentTool ? getToolNameError(summary ?? '', undefined, siblingToolNames) : undefined ) + // An agent tool's summary is the function name the model is given, not free text, so the field + // asks for a name whatever the tool runs: a script, an MCP server or another agent. + let summaryPlaceholder = $derived(isAgentTool ? 'Tool name' : 'Summary') const dispatch = createEventDispatcher() const customUi: FlowBuilderWhitelabelCustomUi | undefined = getContext('customUi') @@ -191,6 +194,14 @@ }) +{#snippet summaryInput()} + +{/snippet} +
{/if} -
- - {#if toolNameError && !isAgentTool} -

{toolNameError}

- {/if} +
+ {@render summaryInput()}
{:else if flowModuleValue.type === 'flow'} flow - + {@render summaryInput()} {:else if flowModuleValue.type === 'aiagent'} AI Agent - + {@render summaryInput()} {/if}