mirror of
https://github.com/microsoft/vscode.git
synced 2025-12-25 04:36:23 +00:00
agent sessions - fix filter and actions (#278553)
This commit is contained in:
@@ -23,7 +23,7 @@ import { ViewPaneContainer } from '../../browser/parts/views/viewPaneContainer.j
|
||||
import { IWorkbenchContribution, WorkbenchPhase, registerWorkbenchContribution2 } from '../../common/contributions.js';
|
||||
import { ICustomViewDescriptor, IViewContainersRegistry, IViewDescriptor, IViewsRegistry, ViewContainer, Extensions as ViewContainerExtensions, ViewContainerLocation } from '../../common/views.js';
|
||||
import { ChatContextKeyExprs } from '../../contrib/chat/common/chatContextKeys.js';
|
||||
import { AGENT_SESSIONS_VIEWLET_ID as CHAT_SESSIONS } from '../../contrib/chat/common/constants.js';
|
||||
import { LEGACY_AGENT_SESSIONS_VIEW_ID } from '../../contrib/chat/common/constants.js';
|
||||
import { VIEWLET_ID as DEBUG } from '../../contrib/debug/common/debug.js';
|
||||
import { VIEWLET_ID as EXPLORER } from '../../contrib/files/common/files.js';
|
||||
import { VIEWLET_ID as REMOTE } from '../../contrib/remote/browser/remoteExplorer.js';
|
||||
@@ -643,7 +643,7 @@ class ViewsExtensionHandler implements IWorkbenchContribution {
|
||||
case 'debug': return this.viewContainersRegistry.get(DEBUG);
|
||||
case 'scm': return this.viewContainersRegistry.get(SCM);
|
||||
case 'remote': return this.viewContainersRegistry.get(REMOTE);
|
||||
case 'agentSessions': return this.viewContainersRegistry.get(CHAT_SESSIONS);
|
||||
case 'agentSessions': return this.viewContainersRegistry.get(LEGACY_AGENT_SESSIONS_VIEW_ID);
|
||||
default: return this.viewContainersRegistry.get(`workbench.view.extension.${value}`);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -66,7 +66,7 @@ import { IChatSessionItem, IChatSessionsService, localChatSessionType } from '..
|
||||
import { ISCMHistoryItemChangeRangeVariableEntry, ISCMHistoryItemChangeVariableEntry } from '../../common/chatVariableEntries.js';
|
||||
import { IChatRequestViewModel, IChatResponseViewModel, isRequestVM } from '../../common/chatViewModel.js';
|
||||
import { IChatWidgetHistoryService } from '../../common/chatWidgetHistoryService.js';
|
||||
import { AGENT_SESSIONS_VIEWLET_ID, ChatAgentLocation, ChatConfiguration, ChatModeKind } from '../../common/constants.js';
|
||||
import { LEGACY_AGENT_SESSIONS_VIEW_ID, ChatAgentLocation, ChatConfiguration, ChatModeKind } from '../../common/constants.js';
|
||||
import { ILanguageModelChatSelector, ILanguageModelsService } from '../../common/languageModels.js';
|
||||
import { CopilotUsageExtensionFeatureId } from '../../common/languageModelStats.js';
|
||||
import { ILanguageModelToolsConfirmationService } from '../../common/languageModelToolsConfirmationService.js';
|
||||
@@ -1116,7 +1116,7 @@ export function registerChatActions() {
|
||||
id: MenuId.ViewTitle,
|
||||
group: 'submenu',
|
||||
order: 1,
|
||||
when: ContextKeyExpr.equals('view', `${AGENT_SESSIONS_VIEWLET_ID}.local`),
|
||||
when: ContextKeyExpr.equals('view', `${LEGACY_AGENT_SESSIONS_VIEW_ID}.local`),
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -1145,7 +1145,7 @@ export function registerChatActions() {
|
||||
id: MenuId.ViewTitle,
|
||||
group: 'submenu',
|
||||
order: 1,
|
||||
when: ContextKeyExpr.equals('view', `${AGENT_SESSIONS_VIEWLET_ID}.local`),
|
||||
when: ContextKeyExpr.equals('view', `${LEGACY_AGENT_SESSIONS_VIEW_ID}.local`),
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -1180,7 +1180,7 @@ export function registerChatActions() {
|
||||
id: MenuId.ViewTitle,
|
||||
group: 'submenu',
|
||||
order: 1,
|
||||
when: ContextKeyExpr.equals('view', `${AGENT_SESSIONS_VIEWLET_ID}.local`),
|
||||
when: ContextKeyExpr.equals('view', `${LEGACY_AGENT_SESSIONS_VIEW_ID}.local`),
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -29,7 +29,8 @@ import { ChatContextKeys } from '../../common/chatContextKeys.js';
|
||||
import { IChatService } from '../../common/chatService.js';
|
||||
import { IChatSessionItem, IChatSessionsService, localChatSessionType } from '../../common/chatSessionsService.js';
|
||||
import { LocalChatSessionUri } from '../../common/chatUri.js';
|
||||
import { AGENT_SESSIONS_VIEWLET_ID, ChatConfiguration } from '../../common/constants.js';
|
||||
import { LEGACY_AGENT_SESSIONS_VIEW_ID, ChatConfiguration } from '../../common/constants.js';
|
||||
import { AGENT_SESSIONS_VIEW_CONTAINER_ID, AGENT_SESSIONS_VIEW_ID } from '../agentSessions/agentSessions.js';
|
||||
import { ChatViewId, IChatWidgetService } from '../chat.js';
|
||||
import { IChatEditorOptions } from '../chatEditor.js';
|
||||
import { findExistingChatEditorByUri } from '../chatSessions/common.js';
|
||||
@@ -331,25 +332,25 @@ export class ToggleChatSessionsDescriptionDisplayAction extends Action2 {
|
||||
*/
|
||||
export class ToggleAgentSessionsViewLocationAction extends Action2 {
|
||||
|
||||
static readonly id = 'workbench.action.chatSessions.toggleNewSingleView';
|
||||
static readonly id = 'workbench.action.chatSessions.toggleNewCombinedView';
|
||||
|
||||
constructor() {
|
||||
super({
|
||||
id: ToggleAgentSessionsViewLocationAction.id,
|
||||
title: localize('chatSessions.toggleViewLocation.label', "Enable New Single View"),
|
||||
title: localize('chatSessions.toggleViewLocation.label', "Combined Sessions View"),
|
||||
category: CHAT_CATEGORY,
|
||||
f1: false,
|
||||
toggled: ContextKeyExpr.equals(`config.${ChatConfiguration.AgentSessionsViewLocation}`, 'single-view'),
|
||||
menu: [
|
||||
{
|
||||
id: MenuId.ViewContainerTitle,
|
||||
when: ContextKeyExpr.equals('viewContainer', AGENT_SESSIONS_VIEWLET_ID),
|
||||
when: ContextKeyExpr.equals('viewContainer', LEGACY_AGENT_SESSIONS_VIEW_ID),
|
||||
group: '2_togglenew',
|
||||
order: 1
|
||||
},
|
||||
{
|
||||
id: MenuId.ViewTitle,
|
||||
when: ContextKeyExpr.equals('view', 'workbench.view.agentSessions'),
|
||||
id: MenuId.ViewContainerTitle,
|
||||
when: ContextKeyExpr.equals('viewContainer', AGENT_SESSIONS_VIEW_CONTAINER_ID),
|
||||
group: '2_togglenew',
|
||||
order: 1
|
||||
}
|
||||
@@ -367,7 +368,7 @@ export class ToggleAgentSessionsViewLocationAction extends Action2 {
|
||||
|
||||
await configurationService.updateValue(ChatConfiguration.AgentSessionsViewLocation, newValue);
|
||||
|
||||
const viewId = newValue === 'single-view' ? 'workbench.view.agentSessions' : `${AGENT_SESSIONS_VIEWLET_ID}.local`;
|
||||
const viewId = newValue === 'single-view' ? AGENT_SESSIONS_VIEW_ID : `${LEGACY_AGENT_SESSIONS_VIEW_ID}.local`;
|
||||
await viewsService.openView(viewId, true);
|
||||
}
|
||||
}
|
||||
@@ -495,7 +496,7 @@ MenuRegistry.appendMenuItem(MenuId.ViewContainerTitle, {
|
||||
},
|
||||
group: '1_config',
|
||||
order: 1,
|
||||
when: ContextKeyExpr.equals('viewContainer', AGENT_SESSIONS_VIEWLET_ID),
|
||||
when: ContextKeyExpr.equals('viewContainer', LEGACY_AGENT_SESSIONS_VIEW_ID),
|
||||
});
|
||||
|
||||
MenuRegistry.appendMenuItem(MenuId.ViewTitle, {
|
||||
@@ -506,5 +507,5 @@ MenuRegistry.appendMenuItem(MenuId.ViewTitle, {
|
||||
},
|
||||
group: 'navigation',
|
||||
order: 1,
|
||||
when: ContextKeyExpr.equals('view', `${AGENT_SESSIONS_VIEWLET_ID}.local`),
|
||||
when: ContextKeyExpr.equals('view', `${LEGACY_AGENT_SESSIONS_VIEW_ID}.local`),
|
||||
});
|
||||
|
||||
@@ -11,7 +11,7 @@ import { ActionViewItem, IActionViewItemOptions } from '../../../../../base/brow
|
||||
import { CommandsRegistry, ICommandService } from '../../../../../platform/commands/common/commands.js';
|
||||
import { EventHelper, h, hide, show } from '../../../../../base/browser/dom.js';
|
||||
import { assertReturnsDefined } from '../../../../../base/common/types.js';
|
||||
import { ISubmenuItem, MenuId, MenuRegistry, registerAction2 } from '../../../../../platform/actions/common/actions.js';
|
||||
import { Action2, ISubmenuItem, MenuId, MenuRegistry, registerAction2 } from '../../../../../platform/actions/common/actions.js';
|
||||
import { Codicon } from '../../../../../base/common/codicons.js';
|
||||
import { ServicesAccessor } from '../../../../../editor/browser/editorExtensions.js';
|
||||
import { ViewAction } from '../../../../browser/parts/views/viewPane.js';
|
||||
@@ -19,6 +19,8 @@ import { AGENT_SESSIONS_VIEW_ID, AgentSessionProviders } from './agentSessions.j
|
||||
import { AgentSessionsView } from './agentSessionsView.js';
|
||||
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';
|
||||
|
||||
//#region Diff Statistics Action
|
||||
|
||||
@@ -166,4 +168,23 @@ MenuRegistry.appendMenuItem(MenuId.AgentSessionsTitle, {
|
||||
icon: Codicon.filter
|
||||
} satisfies ISubmenuItem);
|
||||
|
||||
registerAction2(class extends Action2 {
|
||||
constructor() {
|
||||
super({
|
||||
id: 'agentSessions.filter.resetExcludes',
|
||||
title: localize('agentSessions.filter.reset', 'Reset'),
|
||||
menu: {
|
||||
id: MenuId.AgentSessionsFilterSubMenu,
|
||||
group: '4_reset',
|
||||
order: 0,
|
||||
},
|
||||
});
|
||||
}
|
||||
run(accessor: ServicesAccessor): void {
|
||||
const storageService = accessor.get(IStorageService);
|
||||
|
||||
resetFilter(storageService);
|
||||
}
|
||||
});
|
||||
|
||||
//#endregion
|
||||
|
||||
@@ -29,9 +29,21 @@ const DEFAULT_EXCLUDES: IAgentSessionsViewExcludes = Object.freeze({
|
||||
archived: true as const,
|
||||
});
|
||||
|
||||
const FILTER_STORAGE_KEY = 'agentSessions.filterExcludes';
|
||||
|
||||
export function resetFilter(storageService: IStorageService): void {
|
||||
const excludes = {
|
||||
providers: [...DEFAULT_EXCLUDES.providers],
|
||||
states: [...DEFAULT_EXCLUDES.states],
|
||||
archived: DEFAULT_EXCLUDES.archived,
|
||||
};
|
||||
|
||||
storageService.store(FILTER_STORAGE_KEY, JSON.stringify(excludes), StorageScope.PROFILE, StorageTarget.USER);
|
||||
}
|
||||
|
||||
export class AgentSessionsViewFilter extends Disposable {
|
||||
|
||||
private static readonly STORAGE_KEY = 'agentSessions.filterExcludes';
|
||||
private static readonly STORAGE_KEY = FILTER_STORAGE_KEY;
|
||||
|
||||
private readonly _onDidChange = this._register(new Emitter<void>());
|
||||
readonly onDidChange = this._onDidChange.event;
|
||||
@@ -67,20 +79,25 @@ export class AgentSessionsViewFilter extends Disposable {
|
||||
archived: DEFAULT_EXCLUDES.archived,
|
||||
};
|
||||
|
||||
if (fromEvent) {
|
||||
this.updateFilterActions();
|
||||
this.updateFilterActions();
|
||||
|
||||
if (fromEvent) {
|
||||
this._onDidChange.fire();
|
||||
}
|
||||
}
|
||||
|
||||
private storeExcludes(excludes: IAgentSessionsViewExcludes): void {
|
||||
this.excludes = excludes;
|
||||
|
||||
this.storageService.store(AgentSessionsViewFilter.STORAGE_KEY, JSON.stringify(this.excludes), StorageScope.PROFILE, StorageTarget.USER);
|
||||
}
|
||||
|
||||
private updateFilterActions(): void {
|
||||
this.actionDisposables.clear();
|
||||
|
||||
this.registerProviderActions(this.actionDisposables);
|
||||
this.registerStateActions(this.actionDisposables);
|
||||
this.registerArchivedActions(this.actionDisposables);
|
||||
this.registerResetAction(this.actionDisposables);
|
||||
}
|
||||
|
||||
private registerProviderActions(disposables: DisposableStore): void {
|
||||
@@ -122,12 +139,7 @@ export class AgentSessionsViewFilter extends Disposable {
|
||||
providerExcludes.add(provider.id);
|
||||
}
|
||||
|
||||
that.excludes = {
|
||||
...that.excludes,
|
||||
providers: Array.from(providerExcludes),
|
||||
};
|
||||
|
||||
that.storageService.store(AgentSessionsViewFilter.STORAGE_KEY, JSON.stringify(that.excludes), StorageScope.PROFILE, StorageTarget.USER);
|
||||
that.storeExcludes({ ...that.excludes, providers: Array.from(providerExcludes) });
|
||||
}
|
||||
}));
|
||||
}
|
||||
@@ -164,12 +176,7 @@ export class AgentSessionsViewFilter extends Disposable {
|
||||
stateExcludes.add(state.id);
|
||||
}
|
||||
|
||||
that.excludes = {
|
||||
...that.excludes,
|
||||
states: Array.from(stateExcludes),
|
||||
};
|
||||
|
||||
that.storageService.store(AgentSessionsViewFilter.STORAGE_KEY, JSON.stringify(that.excludes), StorageScope.PROFILE, StorageTarget.USER);
|
||||
that.storeExcludes({ ...that.excludes, states: Array.from(stateExcludes) });
|
||||
}
|
||||
}));
|
||||
}
|
||||
@@ -191,38 +198,7 @@ export class AgentSessionsViewFilter extends Disposable {
|
||||
});
|
||||
}
|
||||
run(): void {
|
||||
that.excludes = {
|
||||
...that.excludes,
|
||||
archived: !that.excludes.archived,
|
||||
};
|
||||
|
||||
that.storageService.store(AgentSessionsViewFilter.STORAGE_KEY, JSON.stringify(that.excludes), StorageScope.PROFILE, StorageTarget.USER);
|
||||
}
|
||||
}));
|
||||
}
|
||||
|
||||
private registerResetAction(disposables: DisposableStore): void {
|
||||
const that = this;
|
||||
disposables.add(registerAction2(class extends Action2 {
|
||||
constructor() {
|
||||
super({
|
||||
id: 'agentSessions.filter.resetExcludes',
|
||||
title: localize('agentSessions.filter.reset', 'Reset'),
|
||||
menu: {
|
||||
id: that.options.filterMenuId,
|
||||
group: '4_reset',
|
||||
order: 0,
|
||||
},
|
||||
});
|
||||
}
|
||||
run(): void {
|
||||
that.excludes = {
|
||||
providers: [...DEFAULT_EXCLUDES.providers],
|
||||
states: [...DEFAULT_EXCLUDES.states],
|
||||
archived: DEFAULT_EXCLUDES.archived,
|
||||
};
|
||||
|
||||
that.storageService.store(AgentSessionsViewFilter.STORAGE_KEY, JSON.stringify(that.excludes), StorageScope.PROFILE, StorageTarget.USER);
|
||||
that.storeExcludes({ ...that.excludes, archived: !that.excludes.archived });
|
||||
}
|
||||
}));
|
||||
}
|
||||
|
||||
@@ -33,7 +33,7 @@ import { ChatEditorInput } from '../browser/chatEditorInput.js';
|
||||
import { IChatAgentAttachmentCapabilities, IChatAgentData, IChatAgentRequest, IChatAgentService } from '../common/chatAgents.js';
|
||||
import { ChatContextKeys } from '../common/chatContextKeys.js';
|
||||
import { ChatSessionStatus, IChatSession, IChatSessionContentProvider, IChatSessionItem, IChatSessionItemProvider, IChatSessionProviderOptionGroup, IChatSessionProviderOptionItem, IChatSessionsExtensionPoint, IChatSessionsService, localChatSessionType, SessionOptionsChangedCallback } from '../common/chatSessionsService.js';
|
||||
import { AGENT_SESSIONS_VIEWLET_ID, ChatAgentLocation, ChatModeKind } from '../common/constants.js';
|
||||
import { LEGACY_AGENT_SESSIONS_VIEW_ID, ChatAgentLocation, ChatModeKind } from '../common/constants.js';
|
||||
import { CHAT_CATEGORY } from './actions/chatActions.js';
|
||||
import { IChatEditorOptions } from './chatEditor.js';
|
||||
import { NEW_CHAT_SESSION_ACTION_ID } from './chatSessions/common.js';
|
||||
@@ -475,7 +475,7 @@ export class ChatSessionsService extends Disposable implements IChatSessionsServ
|
||||
const menuActions = rawMenuActions.map(value => value[1]).flat();
|
||||
|
||||
const whenClause = ContextKeyExpr.and(
|
||||
ContextKeyExpr.equals('view', `${AGENT_SESSIONS_VIEWLET_ID}.${contribution.type}`)
|
||||
ContextKeyExpr.equals('view', `${LEGACY_AGENT_SESSIONS_VIEW_ID}.${contribution.type}`)
|
||||
);
|
||||
|
||||
// If there's exactly one action, inline it
|
||||
|
||||
@@ -26,7 +26,7 @@ import { IExtensionService } from '../../../../../services/extensions/common/ext
|
||||
import { IWorkbenchLayoutService } from '../../../../../services/layout/browser/layoutService.js';
|
||||
import { ChatContextKeyExprs } from '../../../common/chatContextKeys.js';
|
||||
import { IChatSessionItemProvider, IChatSessionsExtensionPoint, IChatSessionsService, localChatSessionType } from '../../../common/chatSessionsService.js';
|
||||
import { AGENT_SESSIONS_VIEWLET_ID } from '../../../common/constants.js';
|
||||
import { LEGACY_AGENT_SESSIONS_VIEW_ID } from '../../../common/constants.js';
|
||||
import { ACTION_ID_OPEN_CHAT } from '../../actions/chatActions.js';
|
||||
import { ChatSessionTracker } from '../chatSessionTracker.js';
|
||||
import { SessionsViewPane } from './sessionsViewPane.js';
|
||||
@@ -40,7 +40,7 @@ export class ChatSessionsView extends Disposable implements IWorkbenchContributi
|
||||
private registerViewContainer(): void {
|
||||
Registry.as<IViewContainersRegistry>(Extensions.ViewContainersRegistry).registerViewContainer(
|
||||
{
|
||||
id: AGENT_SESSIONS_VIEWLET_ID,
|
||||
id: LEGACY_AGENT_SESSIONS_VIEW_ID,
|
||||
title: nls.localize2('chat.agent.sessions', "Agent Sessions"),
|
||||
ctorDescriptor: new SyncDescriptor(ChatSessionsViewPaneContainer),
|
||||
hideIfEmpty: true,
|
||||
@@ -101,7 +101,7 @@ export class ChatSessionsViewContrib extends Disposable implements IWorkbenchCon
|
||||
|
||||
// Unregister removed views
|
||||
if (viewsToUnregister.length > 0) {
|
||||
const container = Registry.as<IViewContainersRegistry>(Extensions.ViewContainersRegistry).get(AGENT_SESSIONS_VIEWLET_ID);
|
||||
const container = Registry.as<IViewContainersRegistry>(Extensions.ViewContainersRegistry).get(LEGACY_AGENT_SESSIONS_VIEW_ID);
|
||||
if (container) {
|
||||
Registry.as<IViewsRegistry>(Extensions.ViewsRegistry).deregisterViews(viewsToUnregister, container);
|
||||
}
|
||||
@@ -112,7 +112,7 @@ export class ChatSessionsViewContrib extends Disposable implements IWorkbenchCon
|
||||
}
|
||||
|
||||
private async registerViews(extensionPointContributions: IChatSessionsExtensionPoint[]) {
|
||||
const container = Registry.as<IViewContainersRegistry>(Extensions.ViewContainersRegistry).get(AGENT_SESSIONS_VIEWLET_ID);
|
||||
const container = Registry.as<IViewContainersRegistry>(Extensions.ViewContainersRegistry).get(LEGACY_AGENT_SESSIONS_VIEW_ID);
|
||||
const providers = this.getAllChatSessionItemProviders();
|
||||
|
||||
if (container && providers.length > 0) {
|
||||
@@ -177,7 +177,7 @@ export class ChatSessionsViewContrib extends Disposable implements IWorkbenchCon
|
||||
orderedProviders.forEach(({ provider, displayName, baseOrder, when }) => {
|
||||
// Only register if not already registered
|
||||
if (!this.registeredViewDescriptors.has(provider.chatSessionType)) {
|
||||
const viewId = `${AGENT_SESSIONS_VIEWLET_ID}.${provider.chatSessionType}`;
|
||||
const viewId = `${LEGACY_AGENT_SESSIONS_VIEW_ID}.${provider.chatSessionType}`;
|
||||
const viewDescriptor: IViewDescriptor = {
|
||||
id: viewId,
|
||||
name: {
|
||||
@@ -203,7 +203,7 @@ export class ChatSessionsViewContrib extends Disposable implements IWorkbenchCon
|
||||
}
|
||||
});
|
||||
|
||||
const gettingStartedViewId = `${AGENT_SESSIONS_VIEWLET_ID}.gettingStarted`;
|
||||
const gettingStartedViewId = `${LEGACY_AGENT_SESSIONS_VIEW_ID}.gettingStarted`;
|
||||
if (!this.registeredViewDescriptors.has('gettingStarted')
|
||||
&& this.productService.chatSessionRecommendations?.length) {
|
||||
const gettingStartedDescriptor: IViewDescriptor = {
|
||||
@@ -232,7 +232,7 @@ export class ChatSessionsViewContrib extends Disposable implements IWorkbenchCon
|
||||
override dispose(): void {
|
||||
// Unregister all views before disposal
|
||||
if (this.registeredViewDescriptors.size > 0) {
|
||||
const container = Registry.as<IViewContainersRegistry>(Extensions.ViewContainersRegistry).get(AGENT_SESSIONS_VIEWLET_ID);
|
||||
const container = Registry.as<IViewContainersRegistry>(Extensions.ViewContainersRegistry).get(LEGACY_AGENT_SESSIONS_VIEW_ID);
|
||||
if (container) {
|
||||
const allRegisteredViews = Array.from(this.registeredViewDescriptors.values());
|
||||
Registry.as<IViewsRegistry>(Extensions.ViewsRegistry).deregisterViews(allRegisteredViews, container);
|
||||
@@ -260,7 +260,7 @@ class ChatSessionsViewPaneContainer extends ViewPaneContainer {
|
||||
@ILogService logService: ILogService,
|
||||
) {
|
||||
super(
|
||||
AGENT_SESSIONS_VIEWLET_ID,
|
||||
LEGACY_AGENT_SESSIONS_VIEW_ID,
|
||||
{
|
||||
mergeViewWithContainerWhenSingleView: false,
|
||||
},
|
||||
|
||||
@@ -46,7 +46,8 @@ import { IInlineCompletionsService } from '../../../../editor/browser/services/i
|
||||
import { IChatSessionsService } from '../common/chatSessionsService.js';
|
||||
import { IMarkdownRendererService } from '../../../../platform/markdown/browser/markdownRenderer.js';
|
||||
import { MarkdownString } from '../../../../base/common/htmlContent.js';
|
||||
import { AGENT_SESSIONS_VIEWLET_ID } from '../common/constants.js';
|
||||
import { LEGACY_AGENT_SESSIONS_VIEW_ID } from '../common/constants.js';
|
||||
import { AGENT_SESSIONS_VIEW_ID } from './agentSessions/agentSessions.js';
|
||||
|
||||
const gaugeForeground = registerColor('gauge.foreground', {
|
||||
dark: inputValidationInfoBorder,
|
||||
@@ -449,9 +450,9 @@ class ChatStatusDashboard extends Disposable {
|
||||
run: () => {
|
||||
// TODO@bpasero remove this check once settled
|
||||
if (this.configurationService.getValue('chat.agentSessionsViewLocation') === 'single-view') {
|
||||
this.runCommandAndClose('workbench.view.agentSessions');
|
||||
this.runCommandAndClose(AGENT_SESSIONS_VIEW_ID);
|
||||
} else {
|
||||
this.runCommandAndClose(AGENT_SESSIONS_VIEWLET_ID);
|
||||
this.runCommandAndClose(LEGACY_AGENT_SESSIONS_VIEW_ID);
|
||||
}
|
||||
}
|
||||
}));
|
||||
|
||||
@@ -120,7 +120,8 @@ export function isSupportedChatFileScheme(accessor: ServicesAccessor, scheme: st
|
||||
return true;
|
||||
}
|
||||
|
||||
export const AGENT_SESSIONS_VIEWLET_ID = 'workbench.view.chat.sessions'; // TODO@bpasero clear once settled
|
||||
/** @deprecated */
|
||||
export const LEGACY_AGENT_SESSIONS_VIEW_ID = 'workbench.view.chat.sessions'; // TODO@bpasero clear once settled
|
||||
export const MANAGE_CHAT_COMMAND_ID = 'workbench.action.chat.manage';
|
||||
export const ChatEditorTitleMaxLength = 30;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user