Skip to content

Commit f922dd2

Browse files
authored
Don't render "Canceled" error (microsoft#249692)
We only get these now that cancellation is handled correctly for agent mode Fix microsoft/vscode-copilot#17613
1 parent fb328b8 commit f922dd2

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/vs/base/common/errors.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ export interface V8CallSite {
192192
toString(): string;
193193
}
194194

195-
const canceledName = 'Canceled';
195+
export const canceledName = 'Canceled';
196196

197197
/**
198198
* Checks if the given error is a promise in canceled state

src/vs/workbench/contrib/chat/browser/chatListRenderer.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ import { ChatMarkdownDecorationsRenderer } from './chatMarkdownDecorationsRender
7878
import { ChatMarkdownRenderer } from './chatMarkdownRenderer.js';
7979
import { ChatEditorOptions } from './chatOptions.js';
8080
import { ChatCodeBlockContentProvider, CodeBlockPart } from './codeBlockPart.js';
81+
import { canceledName } from '../../../../base/common/errors.js';
8182

8283
const $ = dom.$;
8384

@@ -537,7 +538,7 @@ export class ChatListItemRenderer extends Disposable implements ITreeRenderer<Ch
537538
content.push({ kind: 'codeCitations', citations: element.codeCitations });
538539
}
539540

540-
if (element.errorDetails?.message) {
541+
if (element.errorDetails?.message && element.errorDetails.message !== canceledName) {
541542
content.push({ kind: 'errorDetails', errorDetails: element.errorDetails, isLast: index === this.delegate.getListLength() - 1 });
542543
}
543544

0 commit comments

Comments
 (0)