Skip to content

Commit d1b8f7f

Browse files
committed
Behind setting
1 parent 7d23c93 commit d1b8f7f

File tree

3 files changed

+11
-1
lines changed

3 files changed

+11
-1
lines changed

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -778,6 +778,7 @@ export function registerChatActions() {
778778
const dialogService = accessor.get(IDialogService);
779779
const commandService = accessor.get(ICommandService);
780780
const chatSessionsService = accessor.get(IChatSessionsService);
781+
const configurationService = accessor.get(IConfigurationService);
781782

782783
const view = await viewsService.openView<ChatViewPane>(ChatViewId);
783784
if (!view) {
@@ -797,7 +798,8 @@ export function registerChatActions() {
797798
}
798799
}
799800

800-
if (chatSessionsService.hasChatSessionsProviders) {
801+
const showAgentSessionsMenuConfig = configurationService.getValue<string>(ChatConfiguration.AgentSessionsViewLocation);
802+
if (showAgentSessionsMenuConfig === 'showChatsMenu' && chatSessionsService.hasChatSessionsProviders) {
801803
await this.showIntegratedPicker(chatService, quickInputService, commandService, editorService, view, chatSessionsService);
802804
} else {
803805
await this.showLegacyPicker(chatService, quickInputService, commandService, editorService, view);

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -349,6 +349,13 @@ configurationRegistry.registerConfiguration({
349349
default: false,
350350
tags: ['preview'],
351351
},
352+
[ChatConfiguration.AgentSessionsViewLocation]: {
353+
type: 'string',
354+
enum: ['disabled', 'showChatsMenu'],
355+
description: nls.localize('chat.sessionsViewLocation.description', "Controls where to show the agent sessions menu."),
356+
default: 'disabled',
357+
tags: ['experimental'],
358+
},
352359
[mcpDiscoverySection]: {
353360
oneOf: [
354361
{ type: 'boolean' },

src/vs/workbench/contrib/chat/common/constants.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ export enum ChatConfiguration {
1111
EditRequests = 'chat.editRequests',
1212
EnableMath = 'chat.math.enabled',
1313
CheckpointsEnabled = 'chat.checkpoints.enabled',
14+
AgentSessionsViewLocation = 'chat.agentSessionsViewLocation',
1415
}
1516

1617
/**

0 commit comments

Comments
 (0)