mirror of
https://github.com/microsoft/vscode.git
synced 2026-02-28 05:35:08 +00:00
agent sessions - add actions to plus menu for background/cloud chats (#278954)
* agent sessions - add actions to plus menu for background/cloud chats * feedback
This commit is contained in:
@@ -21,6 +21,57 @@ import { URI } from '../../../../../base/common/uri.js';
|
||||
import { IChatService } from '../../common/chatService.js';
|
||||
import { IStorageService } from '../../../../../platform/storage/common/storage.js';
|
||||
import { resetFilter } from './agentSessionsViewFilter.js';
|
||||
import { CHAT_CATEGORY } from '../actions/chatActions.js';
|
||||
import { ChatContextKeys } from '../../common/chatContextKeys.js';
|
||||
import { NEW_CHAT_SESSION_ACTION_ID } from '../chatSessions/common.js';
|
||||
|
||||
//#region New Chat Session Actions
|
||||
|
||||
registerAction2(class NewBackgroundChatAction extends Action2 {
|
||||
constructor() {
|
||||
super({
|
||||
id: `workbench.action.newBackgroundChat`,
|
||||
title: localize2('interactiveSession.newBackgroundChatEditor', "New Background Chat"),
|
||||
f1: true,
|
||||
category: CHAT_CATEGORY,
|
||||
precondition: ChatContextKeys.enabled,
|
||||
menu: {
|
||||
id: MenuId.ChatNewMenu,
|
||||
group: '3_new_special',
|
||||
order: 1
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
run(accessor: ServicesAccessor) {
|
||||
const commandService = accessor.get(ICommandService);
|
||||
return commandService.executeCommand(`${NEW_CHAT_SESSION_ACTION_ID}.${AgentSessionProviders.Background}`);
|
||||
}
|
||||
});
|
||||
|
||||
registerAction2(class NewCloudChatAction extends Action2 {
|
||||
constructor() {
|
||||
super({
|
||||
id: `workbench.action.newCloudChat`,
|
||||
title: localize2('interactiveSession.newCloudChat', "New Cloud Chat"),
|
||||
f1: true,
|
||||
category: CHAT_CATEGORY,
|
||||
precondition: ChatContextKeys.enabled,
|
||||
menu: {
|
||||
id: MenuId.ChatNewMenu,
|
||||
group: '3_new_special',
|
||||
order: 2
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
run(accessor: ServicesAccessor) {
|
||||
const commandService = accessor.get(ICommandService);
|
||||
return commandService.executeCommand(`${NEW_CHAT_SESSION_ACTION_ID}.${AgentSessionProviders.Cloud}`);
|
||||
}
|
||||
});
|
||||
|
||||
//#endregion
|
||||
|
||||
//#region Diff Statistics Action
|
||||
|
||||
|
||||
Reference in New Issue
Block a user