@@ -25,11 +25,10 @@ import { Progress } from '../../../../platform/progress/common/progress.js';
25
25
import { IStorageService , StorageScope , StorageTarget } from '../../../../platform/storage/common/storage.js' ;
26
26
import { ITelemetryService } from '../../../../platform/telemetry/common/telemetry.js' ;
27
27
import { IWorkspaceContextService } from '../../../../platform/workspace/common/workspace.js' ;
28
- import { IWorkbenchAssignmentService } from '../../../services/assignment/common/assignmentService.js' ;
29
28
import { IExtensionService } from '../../../services/extensions/common/extensions.js' ;
30
29
import { IChatAgent , IChatAgentCommand , IChatAgentData , IChatAgentHistoryEntry , IChatAgentRequest , IChatAgentResult , IChatAgentService } from './chatAgents.js' ;
31
30
import { ChatModel , ChatRequestModel , ChatRequestRemovalReason , IChatModel , IChatRequestModel , IChatRequestVariableData , IChatResponseModel , IExportableChatData , ISerializableChatData , ISerializableChatDataIn , ISerializableChatsData , normalizeSerializableChatData , toChatHistoryContent , updateRanges } from './chatModel.js' ;
32
- import { ChatRequestAgentPart , ChatRequestAgentSubcommandPart , ChatRequestSlashCommandPart , IParsedChatRequest , chatAgentLeader , chatSubcommandLeader , getPromptText } from './chatParserTypes.js' ;
31
+ import { chatAgentLeader , ChatRequestAgentPart , ChatRequestAgentSubcommandPart , ChatRequestSlashCommandPart , chatSubcommandLeader , getPromptText , IParsedChatRequest } from './chatParserTypes.js' ;
33
32
import { ChatRequestParser } from './chatRequestParser.js' ;
34
33
import { IChatCompleteResponse , IChatDetail , IChatFollowup , IChatProgress , IChatSendRequestData , IChatSendRequestOptions , IChatSendRequestResponseState , IChatService , IChatTransferredSessionData , IChatUserActionEvent } from './chatService.js' ;
35
34
import { ChatServiceTelemetry } from './chatServiceTelemetry.js' ;
@@ -161,7 +160,6 @@ export class ChatService extends Disposable implements IChatService {
161
160
@IChatSlashCommandService private readonly chatSlashCommandService : IChatSlashCommandService ,
162
161
@IChatAgentService private readonly chatAgentService : IChatAgentService ,
163
162
@IConfigurationService private readonly configurationService : IConfigurationService ,
164
- @IWorkbenchAssignmentService private readonly experimentService : IWorkbenchAssignmentService ,
165
163
@IChatTransferService private readonly chatTransferService : IChatTransferService ,
166
164
@ILanguageModelsService private readonly languageModelsService : ILanguageModelsService ,
167
165
) {
@@ -804,7 +802,6 @@ export class ChatService extends Disposable implements IChatService {
804
802
const agent = ( detectedAgent ?? agentPart ?. agent ?? defaultAgent ) ! ;
805
803
const command = detectedCommand ?? agentSlashCommandPart ?. command ;
806
804
await this . extensionService . activateByEvent ( `onChatParticipant:${ agent . id } ` ) ;
807
- await this . checkAgentAllowed ( agent ) ;
808
805
809
806
// Recompute history in case the agent or command changed
810
807
const history = this . getHistoryEntriesFromModel ( requests , model . sessionId , location , agent . id ) ;
@@ -959,15 +956,6 @@ export class ChatService extends Disposable implements IChatService {
959
956
return attachedContextVariables ;
960
957
}
961
958
962
- private async checkAgentAllowed ( agent : IChatAgentData ) : Promise < void > {
963
- if ( agent . modes . includes ( ChatModeKind . Agent ) ) {
964
- const enabled = await this . experimentService . getTreatment < boolean > ( 'chatAgentEnabled' ) ;
965
- if ( enabled === false ) {
966
- throw new Error ( 'Agent is currently disabled' ) ;
967
- }
968
- }
969
- }
970
-
971
959
private attachmentKindsForTelemetry ( variableData : IChatRequestVariableData ) : string [ ] {
972
960
// TODO this shows why attachments still have to be cleaned up somewhat
973
961
return variableData . variables . map ( v => {
0 commit comments