321
322
constructor(
324
>
readonly sessionUri: URI,
325
>
readonly chatChannelUri: URI,
326
>
readonly workspace: URI | undefined,
327
>
project: IAgentSessionProjectInfo | undefined,
328
>
model: ModelSelection | undefined,
329
>
agent: AgentSelection | undefined,
330
>
config: Record<string, unknown> | undefined,
331
>
abortController: AbortController,
332
>
private readonly _pendingClientToolCalls: PendingRequestRegistry<CallToolResult>,
333
>
toolDiff: SessionClientToolsDiff,
334
>
private readonly _permissionModeFallback: ClaudePermissionMode,
335
>
private readonly _metadataStore: ClaudeSessionMetadataStore,
336
>
@IInstantiationService private readonly _instantiationService: IInstantiationService,
337
>
@IAgentConfigurationService private readonly _configurationService: IAgentConfigurationService,
338
>
@IAgentHostStateManager private readonly _stateManager: AgentHostStateManager,
339
>
@IClaudeAgentSdkService private readonly _sdkService: IClaudeAgentSdkService,
340
>
@ISessionDataService private readonly _sessionDataService: ISessionDataService,
341
>
@ILogService private readonly _logService: ILogService,
342
>
@IFileService private readonly _fileService: IFileService,
343
>
@INativeEnvironmentService private readonly _environmentService: INativeEnvironmentService,
344
>
) {
345
>
super();
346
>
this._chatChannelUri = chatChannelUri;
347
>
this.project = project;
348
>
this._provisionalModel = model;
349
>
this._provisionalAgent = agent;
350
>
this.provisionalConfig = config;
351
>
this.abortController = abortController;
352
>
this.toolDiff = this._register(toolDiff);
353
>
this._register(this.clientCustomizationsDiff.onDidChange(() => this._onDidCustomizationsChange.fire()));
354
>
355
>
this._watchCustomizations(this.workspace);
356
>
}
357
358
private _watchCustomizations(directory: URI | undefined): void {
360
>
const watcher = this._customizationWatcher.add(new ClaudeCustomizationWatcher(
361
>
directory,
362
>
this._environmentService.userHome,
363
>
this._fileService,
364
>
this._logService,
365
>
));
366
>
this._customizationWatcher.add(watcher.onDidChange(() => this._onDidCustomizationsChange.fire()));
367
>
}
368
369
/**