diff --git a/src/vs/sessions/contrib/chat/browser/promptsService.ts b/src/vs/sessions/contrib/chat/browser/promptsService.ts index bcce55f35dc..b77212599ea 100644 --- a/src/vs/sessions/contrib/chat/browser/promptsService.ts +++ b/src/vs/sessions/contrib/chat/browser/promptsService.ts @@ -38,8 +38,7 @@ export class AgenticPromptsService extends PromptsService { private getCopilotRoot(): URI { if (!this._copilotRoot) { - const pathService = this.instantiationService.invokeFunction(accessor => accessor.get(IPathService)); - this._copilotRoot = joinPath(pathService.userHome({ preferLocal: true }), '.copilot'); + this._copilotRoot = joinPath(this.pathService.userHome({ preferLocal: true }), '.copilot'); } return this._copilotRoot; } @@ -62,9 +61,8 @@ export class AgenticPromptsService extends PromptsService { * Each subdirectory containing a SKILL.md is treated as a skill. */ private async discoverBuiltinSkills(): Promise { - const fileService = this.instantiationService.invokeFunction(accessor => accessor.get(IFileService)); try { - const stat = await fileService.resolve(BUILTIN_SKILLS_URI); + const stat = await this.fileService.resolve(BUILTIN_SKILLS_URI); if (!stat.children) { return []; } diff --git a/src/vs/workbench/contrib/chat/common/promptSyntax/service/promptsServiceImpl.ts b/src/vs/workbench/contrib/chat/common/promptSyntax/service/promptsServiceImpl.ts index 62b0430152f..4e617edc4ae 100644 --- a/src/vs/workbench/contrib/chat/common/promptSyntax/service/promptsServiceImpl.ts +++ b/src/vs/workbench/contrib/chat/common/promptSyntax/service/promptsServiceImpl.ts @@ -175,13 +175,13 @@ export class PromptsService extends Disposable implements IPromptsService { @IInstantiationService protected readonly instantiationService: IInstantiationService, @IUserDataProfileService private readonly userDataService: IUserDataProfileService, @IConfigurationService private readonly configurationService: IConfigurationService, - @IFileService private readonly fileService: IFileService, + @IFileService protected readonly fileService: IFileService, @IFilesConfigurationService private readonly filesConfigService: IFilesConfigurationService, @IStorageService private readonly storageService: IStorageService, @IExtensionService private readonly extensionService: IExtensionService, @ITelemetryService private readonly telemetryService: ITelemetryService, @IWorkspaceContextService private readonly workspaceService: IWorkspaceContextService, - @IPathService private readonly pathService: IPathService, + @IPathService protected readonly pathService: IPathService, @IContextKeyService private readonly contextKeyService: IContextKeyService, @IAgentPluginService private readonly agentPluginService: IAgentPluginService, @IWorkspaceTrustManagementService private readonly workspaceTrustService: IWorkspaceTrustManagementService,