Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions webview-ui/src/components/chat/ChatView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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":
Expand All @@ -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
Expand Down