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}