mirror of
https://github.com/microsoft/vscode.git
synced 2025-12-20 02:08:47 +00:00
agent sessions - flip default for insiders to show single-view (#278731)
* agent sessions - flip default for insiders to show `single-view` * fix smoke test
This commit is contained in:
1
.vscode/settings.json
vendored
1
.vscode/settings.json
vendored
@@ -214,5 +214,4 @@
|
||||
"azureMcp.serverMode": "all",
|
||||
"azureMcp.readOnly": true,
|
||||
"chat.tools.terminal.outputLocation": "none",
|
||||
"chat.agentSessionsViewLocation": "single-view"
|
||||
}
|
||||
|
||||
@@ -516,8 +516,8 @@ export function registerChatActions() {
|
||||
ContextKeyExpr.equals('view', ChatViewId),
|
||||
ChatContextKeys.inEmptyStateWithHistoryEnabled.negate()
|
||||
),
|
||||
group: 'navigation',
|
||||
order: 2
|
||||
group: '2_history',
|
||||
order: 1
|
||||
},
|
||||
{
|
||||
id: MenuId.EditorTitle,
|
||||
|
||||
@@ -529,7 +529,7 @@ configurationRegistry.registerConfiguration({
|
||||
type: 'string',
|
||||
enum: ['disabled', 'view', 'single-view'],
|
||||
description: nls.localize('chat.sessionsViewLocation.description', "Controls where to show the agent sessions menu."),
|
||||
default: 'view',
|
||||
default: product.quality === 'stable' ? 'view' : 'single-view',
|
||||
tags: ['experimental'],
|
||||
experiment: {
|
||||
mode: 'auto'
|
||||
|
||||
@@ -87,6 +87,7 @@ import { IPosition } from '../../../../editor/common/core/position.js';
|
||||
import { IMarker, IMarkerService, MarkerSeverity } from '../../../../platform/markers/common/markers.js';
|
||||
import { EditorContextKeys } from '../../../../editor/common/editorContextKeys.js';
|
||||
import { ICodeEditorService } from '../../../../editor/browser/services/codeEditorService.js';
|
||||
import { AGENT_SESSIONS_VIEW_CONTAINER_ID } from './agentSessions/agentSessions.js';
|
||||
|
||||
const defaultChat = {
|
||||
extensionId: product.defaultChatAgent?.extensionId ?? '',
|
||||
@@ -1672,9 +1673,12 @@ export class ChatTeardownContribution extends Disposable implements IWorkbenchCo
|
||||
const activeContainers = this.viewDescriptorService.getViewContainersByLocation(ViewContainerLocation.AuxiliaryBar).filter(
|
||||
container => this.viewDescriptorService.getViewContainerModel(container).activeViewDescriptors.length > 0
|
||||
);
|
||||
const hasChatView = activeContainers.some(container => container.id === CHAT_SIDEBAR_PANEL_ID);
|
||||
const hasAgentSessionsView = activeContainers.some(container => container.id === AGENT_SESSIONS_VIEW_CONTAINER_ID);
|
||||
if (
|
||||
(activeContainers.length === 0) || // chat view is already gone but we know it was there before
|
||||
(activeContainers.length === 1 && activeContainers.at(0)?.id === CHAT_SIDEBAR_PANEL_ID) // chat view is the only view which is going to go away
|
||||
(activeContainers.length === 0) || // chat view is already gone but we know it was there before
|
||||
(activeContainers.length === 1 && (hasChatView || hasAgentSessionsView)) || // chat view or agent sessions is the only view which is going to go away
|
||||
(activeContainers.length === 2 && hasChatView && hasAgentSessionsView) // both chat and agent sessions view are going to go away
|
||||
) {
|
||||
this.layoutService.setPartHidden(true, Parts.AUXILIARYBAR_PART); // hide if there are no views in the secondary sidebar
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user