mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-09-05 08:10:14 +00:00
fix: show correct button text for subtask completion after interruption
Fixes #9133 - When a subtask is interrupted and then resumed, it now correctly shows "Complete Subtask and Return" button instead of "Start New Task". The fix adds conditional logic to check for parentTaskId in both the completion_result and resume_completed_task message handlers in ChatView.tsx.
This commit is contained in:
parent
e98f4b9057
commit
5627d0e4d1
1 changed files with 12 additions and 2 deletions
|
|
@ -387,7 +387,12 @@ const ChatViewComponent: React.ForwardRefRenderFunction<ChatViewRef, ChatViewPro
|
|||
setSendingDisabled(isPartial)
|
||||
setClineAsk("completion_result")
|
||||
setEnableButtons(!isPartial)
|
||||
setPrimaryButtonText(t("chat:startNewTask.title"))
|
||||
// Check if current task has a parent task to return to
|
||||
setPrimaryButtonText(
|
||||
currentTaskItem?.parentTaskId
|
||||
? t("chat:completeSubtaskAndReturn")
|
||||
: t("chat:startNewTask.title"),
|
||||
)
|
||||
setSecondaryButtonText(undefined)
|
||||
break
|
||||
case "resume_task":
|
||||
|
|
@ -402,7 +407,12 @@ const ChatViewComponent: React.ForwardRefRenderFunction<ChatViewRef, ChatViewPro
|
|||
setSendingDisabled(false)
|
||||
setClineAsk("resume_completed_task")
|
||||
setEnableButtons(true)
|
||||
setPrimaryButtonText(t("chat:startNewTask.title"))
|
||||
// Check if current task has a parent task to return to
|
||||
setPrimaryButtonText(
|
||||
currentTaskItem?.parentTaskId
|
||||
? t("chat:completeSubtaskAndReturn")
|
||||
: t("chat:startNewTask.title"),
|
||||
)
|
||||
setSecondaryButtonText(undefined)
|
||||
setDidClickCancel(false)
|
||||
break
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue