Path: blob/main/src/vs/workbench/contrib/chat/test/common/mockPromptsService.ts
3296 views
/*---------------------------------------------------------------------------------------------1* Copyright (c) Microsoft Corporation. All rights reserved.2* Licensed under the MIT License. See License.txt in the project root for license information.3*--------------------------------------------------------------------------------------------*/45import { CancellationToken } from '../../../../../base/common/cancellation.js';6import { Emitter } from '../../../../../base/common/event.js';7import { URI } from '../../../../../base/common/uri.js';8import { ICustomChatMode, IPromptsService } from '../../common/promptSyntax/service/promptsService.js';910export class MockPromptsService implements IPromptsService {11_serviceBrand: undefined;1213private readonly _onDidChangeCustomChatModes = new Emitter<void>();14readonly onDidChangeCustomChatModes = this._onDidChangeCustomChatModes.event;1516private _customModes: ICustomChatMode[] = [];1718setCustomModes(modes: ICustomChatMode[]): void {19this._customModes = modes;20this._onDidChangeCustomChatModes.fire();21}2223async getCustomChatModes(token: CancellationToken): Promise<readonly ICustomChatMode[]> {24return this._customModes;25}2627// Stub implementations for required interface methods28getSyntaxParserFor(_model: any): any { throw new Error('Not implemented'); }29listPromptFiles(_type: any): Promise<readonly any[]> { throw new Error('Not implemented'); }30getSourceFolders(_type: any): readonly any[] { throw new Error('Not implemented'); }31asPromptSlashCommand(_command: string): any { return undefined; }32resolvePromptSlashCommand(_data: any, _token: CancellationToken): Promise<any> { throw new Error('Not implemented'); }33findPromptSlashCommands(): Promise<any[]> { throw new Error('Not implemented'); }34parse(_uri: URI, _type: any, _token: CancellationToken): Promise<any> { throw new Error('Not implemented'); }35getPromptFileType(_resource: URI): any { return undefined; }36dispose(): void { }37}383940