Add copy button to chat message toolbar

The copy action was only available via right-click context menu (ChatContext).
Add it to the ChatMessageTitle toolbar so it appears as a visible icon button
on hover, using the copy codicon.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
Pierce Boggan
2026-02-24 16:56:44 -07:00
parent 405897eb11
commit 8f8b99bdb6
@@ -4,6 +4,7 @@
*--------------------------------------------------------------------------------------------*/
import * as dom from '../../../../../base/browser/dom.js';
import { Codicon } from '../../../../../base/common/codicons.js';
import { ServicesAccessor } from '../../../../../editor/browser/editorExtensions.js';
import { localize2 } from '../../../../../nls.js';
import { Action2, MenuId, registerAction2 } from '../../../../../platform/actions/common/actions.js';
@@ -54,11 +55,20 @@ export function registerChatCopyActions() {
title: localize2('interactive.copyItem.label', "Copy"),
f1: false,
category: CHAT_CATEGORY,
menu: {
id: MenuId.ChatContext,
when: ChatContextKeys.responseIsFiltered.negate(),
group: 'copy',
}
icon: Codicon.copy,
menu: [
{
id: MenuId.ChatContext,
when: ChatContextKeys.responseIsFiltered.negate(),
group: 'copy',
},
{
id: MenuId.ChatMessageTitle,
group: 'navigation',
order: 5,
when: ChatContextKeys.responseIsFiltered.negate(),
}
]
});
}