fix(editor): Handle plan confirmation correctly at the UI (no-changelog) (#28613)

This commit is contained in:
Jaakko Husso 2026-04-17 14:05:33 +02:00 committed by GitHub
parent 5c9a732af4
commit 46aa46d996
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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="