mirror of
https://github.com/n8n-io/n8n
synced 2026-04-21 15:47:20 +00:00
fix(editor): Handle plan confirmation correctly at the UI (no-changelog) (#28613)
This commit is contained in:
parent
5c9a732af4
commit
46aa46d996
1 changed files with 14 additions and 12 deletions
|
|
@ -199,21 +199,13 @@ function mapTaskItemsToPlannedTasks(tasks?: TaskList): PlannedTaskArg[] | undefi
|
|||
:is-loading="toolCallsById[entry.toolCallId].isLoading"
|
||||
:tool-call-id="toolCallsById[entry.toolCallId].toolCallId"
|
||||
/>
|
||||
<!-- Hidden tool calls (builder/data-table/researcher/planner handled by child agent via AgentSection) -->
|
||||
<!-- Hidden tool calls (builder/data-table/researcher handled by child agent via AgentSection) -->
|
||||
<template v-else-if="toolCallsById[entry.toolCallId].renderHint === 'builder'" />
|
||||
<template v-else-if="toolCallsById[entry.toolCallId].renderHint === 'data-table'" />
|
||||
<template v-else-if="toolCallsById[entry.toolCallId].renderHint === 'researcher'" />
|
||||
<!-- Planner: suppress tool call — PlanReviewPanel renders after the child AgentSection -->
|
||||
<template v-else-if="toolCallsById[entry.toolCallId].renderHint === 'planner'" />
|
||||
<!-- Answered questions (read-only after resolution) -->
|
||||
<AnsweredQuestions
|
||||
v-else-if="
|
||||
toolCallsById[entry.toolCallId].confirmation?.inputType === 'questions' &&
|
||||
!toolCallsById[entry.toolCallId].isLoading
|
||||
"
|
||||
:tool-call="toolCallsById[entry.toolCallId]"
|
||||
/>
|
||||
<!-- Plan review from plan() tool: always render inline -->
|
||||
<!-- Plan review must match before the planner renderHint suppression:
|
||||
when the plan tool attaches the confirmation to its own tool call
|
||||
(no planner child agent), that suppression would otherwise hide it. -->
|
||||
<PlanReviewPanel
|
||||
v-else-if="toolCallsById[entry.toolCallId].confirmation?.inputType === 'plan-review'"
|
||||
:planned-tasks="
|
||||
|
|
@ -226,6 +218,16 @@ function mapTaskItemsToPlannedTasks(tasks?: TaskList): PlannedTaskArg[] | undefi
|
|||
@approve="handlePlanConfirm(toolCallsById[entry.toolCallId], true)"
|
||||
@request-changes="(fb) => handlePlanConfirm(toolCallsById[entry.toolCallId], false, fb)"
|
||||
/>
|
||||
<!-- Planner: suppress tool call — PlanReviewPanel renders after the child AgentSection -->
|
||||
<template v-else-if="toolCallsById[entry.toolCallId].renderHint === 'planner'" />
|
||||
<!-- Answered questions (read-only after resolution) -->
|
||||
<AnsweredQuestions
|
||||
v-else-if="
|
||||
toolCallsById[entry.toolCallId].confirmation?.inputType === 'questions' &&
|
||||
!toolCallsById[entry.toolCallId].isLoading
|
||||
"
|
||||
:tool-call="toolCallsById[entry.toolCallId]"
|
||||
/>
|
||||
<!-- Suppress default tool call while questions are pending -->
|
||||
<template
|
||||
v-else-if="
|
||||
|
|
|
|||
Loading…
Reference in a new issue