Skip to content
This repository was archived by the owner on May 15, 2026. It is now read-only.
Draft
Show file tree
Hide file tree
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
4 changes: 2 additions & 2 deletions webview-ui/src/components/chat/ChatRow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -872,7 +872,7 @@ export const ChatRowContent = ({
<div>
{childTaskId && !isFollowedBySubtaskResult && (
<button
className="cursor-pointer flex gap-1 items-center mt-2 text-vscode-descriptionForeground hover:text-vscode-descriptionForeground hover:underline font-normal"
className="cursor-pointer flex gap-1 items-center mt-2 px-2 py-1 rounded text-vscode-textLink-foreground hover:text-vscode-textLink-activeForeground bg-vscode-textLink-foreground/10 hover:bg-vscode-textLink-foreground/20 font-medium transition-colors"
onClick={() =>
vscode.postMessage({ type: "showTaskWithId", text: childTaskId })
}>
Expand Down Expand Up @@ -1032,7 +1032,7 @@ export const ChatRowContent = ({
<MarkdownBlock markdown={message.text} />
{completedChildTaskId && (
<button
className="cursor-pointer flex gap-1 items-center mt-2 text-vscode-descriptionForeground hover:text-vscode-descriptionForeground hover:underline font-normal"
className="cursor-pointer flex gap-1 items-center mt-2 px-2 py-1 rounded text-vscode-textLink-foreground hover:text-vscode-textLink-activeForeground bg-vscode-textLink-foreground/10 hover:bg-vscode-textLink-foreground/20 font-medium transition-colors"
onClick={() =>
vscode.postMessage({ type: "showTaskWithId", text: completedChildTaskId })
}>
Expand Down
151 changes: 101 additions & 50 deletions webview-ui/src/components/chat/ChatView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1545,7 +1545,8 @@ const ChatViewComponent: React.ForwardRefRenderFunction<ChatViewRef, ChatViewPro
vscode.postMessage({ type: "condenseTaskContextRequest", text: taskId })
}

const areButtonsVisible = showScrollToBottom || primaryButtonText || secondaryButtonText
const activeSubtaskId = currentTaskItem?.awaitingChildId
const areButtonsVisible = showScrollToBottom || primaryButtonText || secondaryButtonText || activeSubtaskId

return (
<div
Expand Down Expand Up @@ -1670,59 +1671,109 @@ const ChatViewComponent: React.ForwardRefRenderFunction<ChatViewRef, ChatViewPro
</>
) : (
<>
{primaryButtonText && (
<StandardTooltip
content={
primaryButtonText === t("chat:retry.title")
? t("chat:retry.tooltip")
: primaryButtonText === t("chat:save.title")
? t("chat:save.tooltip")
: primaryButtonText === t("chat:approve.title")
? t("chat:approve.tooltip")
: primaryButtonText === t("chat:runCommand.title")
? t("chat:runCommand.tooltip")
: primaryButtonText === t("chat:startNewTask.title")
? t("chat:startNewTask.tooltip")
: primaryButtonText === t("chat:resumeTask.title")
? t("chat:resumeTask.tooltip")
: primaryButtonText ===
t("chat:proceedAnyways.title")
? t("chat:proceedAnyways.tooltip")
: primaryButtonText ===
t("chat:proceedWhileRunning.title")
? t("chat:proceedWhileRunning.tooltip")
: undefined
}>
{activeSubtaskId && !primaryButtonText && !secondaryButtonText ? (
<StandardTooltip content={t("chat:subtasks.showActiveSubtaskTooltip")}>
<Button
variant="primary"
disabled={!enableButtons}
className={secondaryButtonText ? "flex-1 mr-[6px]" : "flex-[2] mr-0"}
onClick={() => handlePrimaryButtonClick(inputValue, selectedImages)}>
{primaryButtonText}
</Button>
</StandardTooltip>
)}
{secondaryButtonText && (
<StandardTooltip
content={
secondaryButtonText === t("chat:startNewTask.title")
? t("chat:startNewTask.tooltip")
: secondaryButtonText === t("chat:reject.title")
? t("chat:reject.tooltip")
: secondaryButtonText === t("chat:terminate.title")
? t("chat:terminate.tooltip")
: secondaryButtonText === t("chat:killCommand.title")
? t("chat:killCommand.tooltip")
: undefined
}>
<Button
variant="secondary"
disabled={!enableButtons}
className="flex-1 ml-[6px]"
onClick={() => handleSecondaryButtonClick(inputValue, selectedImages)}>
{secondaryButtonText}
data-testid="show-subtask-button"
className="flex-[2] mr-0"
onClick={() =>
vscode.postMessage({
type: "showTaskWithId",
text: activeSubtaskId,
})
}>
{t("chat:subtasks.showActiveSubtask")}
</Button>
</StandardTooltip>
) : (
<>
{primaryButtonText && (
<StandardTooltip
content={
primaryButtonText === t("chat:retry.title")
? t("chat:retry.tooltip")
: primaryButtonText === t("chat:save.title")
? t("chat:save.tooltip")
: primaryButtonText === t("chat:approve.title")
? t("chat:approve.tooltip")
: primaryButtonText === t("chat:runCommand.title")
? t("chat:runCommand.tooltip")
: primaryButtonText ===
t("chat:startNewTask.title")
? t("chat:startNewTask.tooltip")
: primaryButtonText ===
t("chat:resumeTask.title")
? t("chat:resumeTask.tooltip")
: primaryButtonText ===
t("chat:proceedAnyways.title")
? t("chat:proceedAnyways.tooltip")
: primaryButtonText ===
t(
"chat:proceedWhileRunning.title",
)
? t(
"chat:proceedWhileRunning.tooltip",
)
: undefined
}>
<Button
variant="primary"
disabled={!enableButtons}
className={
secondaryButtonText || activeSubtaskId
? "flex-1 mr-[6px]"
: "flex-[2] mr-0"
}
onClick={() =>
handlePrimaryButtonClick(inputValue, selectedImages)
}>
{primaryButtonText}
</Button>
</StandardTooltip>
)}
{activeSubtaskId && (
<StandardTooltip content={t("chat:subtasks.showActiveSubtaskTooltip")}>
<Button
variant="secondary"
data-testid="show-subtask-button"
className="flex-1 ml-[6px]"
onClick={() =>
vscode.postMessage({
type: "showTaskWithId",
text: activeSubtaskId,
})
}>
{t("chat:subtasks.showActiveSubtask")}
</Button>
</StandardTooltip>
)}
{secondaryButtonText && (
<StandardTooltip
content={
secondaryButtonText === t("chat:startNewTask.title")
? t("chat:startNewTask.tooltip")
: secondaryButtonText === t("chat:reject.title")
? t("chat:reject.tooltip")
: secondaryButtonText === t("chat:terminate.title")
? t("chat:terminate.tooltip")
: secondaryButtonText ===
t("chat:killCommand.title")
? t("chat:killCommand.tooltip")
: undefined
}>
<Button
variant="secondary"
disabled={!enableButtons}
className="flex-1 ml-[6px]"
onClick={() =>
handleSecondaryButtonClick(inputValue, selectedImages)
}>
{secondaryButtonText}
</Button>
</StandardTooltip>
)}
</>
)}
</>
)}
Expand Down
Loading
Loading