From 26ba7dedca2d1150d7561cbcfc9c3e9a6425d954 Mon Sep 17 00:00:00 2001 From: Rob Lourens Date: Mon, 6 Jan 2025 19:17:37 -0800 Subject: [PATCH] Rename for clarity --- src/vs/workbench/contrib/chat/common/chatAgents.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/vs/workbench/contrib/chat/common/chatAgents.ts b/src/vs/workbench/contrib/chat/common/chatAgents.ts index f49f47c86a7..8045fc3d091 100644 --- a/src/vs/workbench/contrib/chat/common/chatAgents.ts +++ b/src/vs/workbench/contrib/chat/common/chatAgents.ts @@ -257,7 +257,7 @@ export class ChatAgentService extends Disposable implements IChatAgentService { private readonly _defaultAgentRegistered: IContextKey; private readonly _editingAgentRegistered: IContextKey; private readonly _agentModeContextKey: IContextKey; - private readonly _hasAgentContextKey: IContextKey; + private readonly _hasToolsAgentContextKey: IContextKey; private _chatParticipantDetectionProviders = new Map(); @@ -276,7 +276,7 @@ export class ChatAgentService extends Disposable implements IChatAgentService { })); this._agentModeContextKey = ChatContextKeys.Editing.agentMode.bindTo(contextKeyService); - this._hasAgentContextKey = ChatContextKeys.Editing.hasToolsAgent.bindTo(contextKeyService); + this._hasToolsAgentContextKey = ChatContextKeys.Editing.hasToolsAgent.bindTo(contextKeyService); this._agentModeContextKey.set( this.storageService.getBoolean(ChatToolsAgentModeStorageKey, StorageScope.WORKSPACE, false)); this._register( @@ -340,8 +340,8 @@ export class ChatAgentService extends Disposable implements IChatAgentService { } this._editingAgentRegistered.set(editingAgentRegistered); this._defaultAgentRegistered.set(defaultAgentRegistered); - if (toolsAgentRegistered !== this._hasAgentContextKey.get()) { - this._hasAgentContextKey.set(toolsAgentRegistered); + if (toolsAgentRegistered !== this._hasToolsAgentContextKey.get()) { + this._hasToolsAgentContextKey.set(toolsAgentRegistered); this._onDidChangeAgents.fire(this.getDefaultAgent(ChatAgentLocation.EditingSession)); } } @@ -418,7 +418,7 @@ export class ChatAgentService extends Disposable implements IChatAgentService { } public get toolsAgentModeEnabled(): boolean { - return !!this._hasAgentContextKey.get() && !!this._agentModeContextKey.get(); + return !!this._hasToolsAgentContextKey.get() && !!this._agentModeContextKey.get(); } toggleToolsAgentMode(): void {