Skip to content

Commit e7f293b

Browse files
authored
fix: Only show "Cancelled" for explicitly cancelled turns (#1467)
## Problem Tool calls pending permission incorrectly flash "(Cancelled)" because wasCancelled triggers on turnComplete, not just turnCancelled. Closes #1267 ## Changes 1. Remove turnComplete from wasCancelled check in useToolCallStatus 2. Only show "(Cancelled)" when stopReason is actually "cancelled" ## How did you test this? Manually
1 parent 3f61990 commit e7f293b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

apps/code/src/renderer/features/sessions/components/session-update/toolCallUtils.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ export function useToolCallStatus(
5151
const isIncomplete = status === "pending" || status === "in_progress";
5252
const isLoading = isIncomplete && !turnCancelled && !turnComplete;
5353
const isFailed = status === "failed";
54-
const wasCancelled = isIncomplete && (turnCancelled || turnComplete);
54+
const wasCancelled = isIncomplete && turnCancelled;
5555
const isComplete = status === "completed";
5656

5757
return { isIncomplete, isLoading, isFailed, wasCancelled, isComplete };

0 commit comments

Comments
 (0)