Skip to content

Commit 956bfb6

Browse files
authored
Add "new session" to chat context menu (#198376)
From discussion
1 parent 36dee1f commit 956bfb6

2 files changed

Lines changed: 9 additions & 3 deletions

File tree

src/vs/workbench/contrib/chat/browser/actions/chatClearActions.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,19 +63,23 @@ export function registerClearActions() {
6363
primary: KeyMod.WinCtrl | KeyCode.KeyL
6464
},
6565
when: CONTEXT_IN_CHAT_SESSION
66+
},
67+
menu: {
68+
id: MenuId.ChatContext,
69+
group: 'z_clear'
6670
}
6771
});
6872
}
6973

7074
run(accessor: ServicesAccessor, ...args: any[]) {
71-
announceChatCleared(accessor);
7275
const widgetService = accessor.get(IChatWidgetService);
7376

7477
const widget = widgetService.lastFocusedWidget;
7578
if (!widget) {
7679
return;
7780
}
7881

82+
announceChatCleared(accessor);
7983
widget.clear();
8084
}
8185
});

src/vs/workbench/contrib/chat/browser/actions/chatCopyActions.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ export function registerChatCopyActions() {
2323
f1: false,
2424
category: CHAT_CATEGORY,
2525
menu: {
26-
id: MenuId.ChatContext
26+
id: MenuId.ChatContext,
27+
group: 'copy',
2728
}
2829
});
2930
}
@@ -56,7 +57,8 @@ export function registerChatCopyActions() {
5657
f1: false,
5758
category: CHAT_CATEGORY,
5859
menu: {
59-
id: MenuId.ChatContext
60+
id: MenuId.ChatContext,
61+
group: 'copy',
6062
}
6163
});
6264
}

0 commit comments

Comments
 (0)