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:
Benjamin Pasero
2025-11-24 06:33:56 +01:00
committed by GitHub
parent 30cfcc9385
commit 52f0590d80

View File

@@ -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