@@ -32,7 +32,7 @@ import { IAICustomizationWorkspaceService, AICustomizationManagementSection } fr
3232import { CustomizationHarness , ICustomizationHarnessService , IHarnessDescriptor , createVSCodeHarnessDescriptor , createClaudeHarnessDescriptor , createCliHarnessDescriptor , getCliUserRoots , getClaudeUserRoots } from '../../../../contrib/chat/common/customizationHarnessService.js' ;
3333import { IChatSessionsService } from '../../../../contrib/chat/common/chatSessionsService.js' ;
3434import { PromptsType } from '../../../../contrib/chat/common/promptSyntax/promptTypes.js' ;
35- import { IPromptsService , IResolvedAgentFile , AgentInstructionFileType , PromptsStorage , IAgentSkill , IChatPromptSlashCommand } from '../../../../contrib/chat/common/promptSyntax/service/promptsService.js' ;
35+ import { IPromptsService , AgentInstructionFileType , PromptsStorage , IAgentSkill , IChatPromptSlashCommand , IAgentInstructionFile } from '../../../../contrib/chat/common/promptSyntax/service/promptsService.js' ;
3636import { ParsedPromptFile } from '../../../../contrib/chat/common/promptSyntax/promptFileParser.js' ;
3737import { IAgentPluginService , IAgentPlugin } from '../../../../contrib/chat/common/plugins/agentPluginService.js' ;
3838import { IPluginMarketplaceService , IMarketplacePlugin , MarketplaceType , PluginSourceKind } from '../../../../contrib/chat/common/plugins/pluginMarketplaceService.js' ;
@@ -96,7 +96,7 @@ function toExtensionInfo(file: IFixtureFile): { identifier: ExtensionIdentifier;
9696 } ;
9797}
9898
99- function createMockPromptsService ( files : IFixtureFile [ ] , agentInstructions : IResolvedAgentFile [ ] ) : IPromptsService {
99+ function createMockPromptsService ( files : IFixtureFile [ ] , agentInstructions : IAgentInstructionFile [ ] ) : IPromptsService {
100100 const applyToMap = new ResourceMap < string | undefined > ( ) ;
101101 const descriptionMap = new ResourceMap < string | undefined > ( ) ;
102102 for ( const f of files ) { applyToMap . set ( f . uri , f . applyTo ) ; descriptionMap . set ( f . uri , f . description ) ; }
@@ -148,16 +148,18 @@ function createMockPromptsService(files: IFixtureFile[], agentInstructions: IRes
148148 override async getPromptSlashCommands ( ) : Promise < readonly IChatPromptSlashCommand [ ] > {
149149 const promptFiles = files . filter ( f => f . type === PromptsType . prompt ) ;
150150 const commands = await Promise . all ( promptFiles . map ( async f => {
151- const promptPath = { uri : f . uri , storage : f . storage , type : f . type , extension : toExtensionInfo ( f ) as never } ;
152- const parsedPromptFile = await this . parseNew ( f . uri , CancellationToken . None ) ;
153151 return {
152+ uri : f . uri ,
153+ userInvocable : true ,
154154 name : f . name ?? 'prompt' ,
155155 description : f . description ,
156156 argumentHint : undefined ,
157- promptPath : promptPath as IChatPromptSlashCommand [ 'promptPath' ] ,
158- parsedPromptFile,
157+ type : f . type ,
158+ storage : f . storage ,
159+ source : undefined ,
160+ extension : toExtensionInfo ( f ) as never ,
159161 when : undefined ,
160- } ;
162+ } satisfies IChatPromptSlashCommand ;
161163 } ) ) ;
162164 return commands ;
163165 }
@@ -301,7 +303,7 @@ const allFiles: IFixtureFile[] = [
301303 { uri : URI . file ( '/home/dev/.copilot/hooks/backup-changes.json' ) , storage : PromptsStorage . user , type : PromptsType . hook , name : 'Backup Changes' , description : 'Auto-stash uncommitted changes' } ,
302304] ;
303305
304- const agentInstructions : IResolvedAgentFile [ ] = [
306+ const agentInstructions : IAgentInstructionFile [ ] = [
305307 { uri : URI . file ( '/workspace/AGENTS.md' ) , realPath : undefined , type : AgentInstructionFileType . agentsMd } ,
306308 { uri : URI . file ( '/workspace/CLAUDE.md' ) , realPath : undefined , type : AgentInstructionFileType . claudeMd } ,
307309 { uri : URI . file ( '/workspace/.github/copilot-instructions.md' ) , realPath : undefined , type : AgentInstructionFileType . copilotInstructionsMd } ,
0 commit comments