TPromptsStorage > PromptsStorage

This commit is contained in:
Martin Aeschlimann
2025-09-28 23:12:56 +02:00
parent 04302493d2
commit 6ae622cd5e
8 changed files with 75 additions and 75 deletions
@@ -12,7 +12,7 @@ import { IOpenerService } from '../../../../../../platform/opener/common/opener.
import { PROMPT_DOCUMENTATION_URL, PromptsType } from '../../../common/promptSyntax/promptTypes.js';
import { IPickOptions, IQuickInputService, IQuickPickItem } from '../../../../../../platform/quickinput/common/quickInput.js';
import { IWorkspaceContextService } from '../../../../../../platform/workspace/common/workspace.js';
import { IPromptPath, IPromptsService, TPromptsStorage } from '../../../common/promptSyntax/service/promptsService.js';
import { IPromptPath, IPromptsService, PromptsStorage } from '../../../common/promptSyntax/service/promptsService.js';
interface IFolderQuickPickItem extends IQuickPickItem {
@@ -54,7 +54,7 @@ export async function askForPromptSourceFolder(
const foldersList = folders.map<IFolderQuickPickItem>(folder => {
const uri = folder.uri;
const detail = (existingFolder && isEqual(uri, existingFolder)) ? localize('current.folder', "Current Location") : undefined;
if (folder.storage !== TPromptsStorage.local) {
if (folder.storage !== PromptsStorage.local) {
return {
type: 'item',
label: promptsService.getPromptLocationLabel(folder),
@@ -8,7 +8,7 @@ import { URI } from '../../../../../../base/common/uri.js';
import { assert } from '../../../../../../base/common/assert.js';
import { Codicon } from '../../../../../../base/common/codicons.js';
import { ThemeIcon } from '../../../../../../base/common/themables.js';
import { IPromptPath, IPromptsService, TPromptsStorage } from '../../../common/promptSyntax/service/promptsService.js';
import { IPromptPath, IPromptsService, PromptsStorage } from '../../../common/promptSyntax/service/promptsService.js';
import { dirname, extUri, joinPath } from '../../../../../../base/common/resources.js';
import { DisposableStore } from '../../../../../../base/common/lifecycle.js';
import { IFileService } from '../../../../../../platform/files/common/files.js';
@@ -295,17 +295,17 @@ export class PromptFilePickers {
if (newItems.length > 0) {
result.push(...newItems);
}
const locals = await this._promptsService.listPromptFilesForStorage(options.type, TPromptsStorage.local, CancellationToken.None);
const locals = await this._promptsService.listPromptFilesForStorage(options.type, PromptsStorage.local, CancellationToken.None);
if (locals.length) {
result.push({ type: 'separator', label: localize('separator.workspace', "Workspace") });
result.push(...locals.map(l => this._createPromptPickItem(l, buttons)));
}
const exts = await this._promptsService.listPromptFilesForStorage(options.type, TPromptsStorage.extension, CancellationToken.None);
const exts = await this._promptsService.listPromptFilesForStorage(options.type, PromptsStorage.extension, CancellationToken.None);
if (exts.length) {
result.push({ type: 'separator', label: localize('separator.extensions', "Extensions") });
result.push(...exts.map(e => this._createPromptPickItem(e, buttons)));
}
const users = await this._promptsService.listPromptFilesForStorage(options.type, TPromptsStorage.user, CancellationToken.None);
const users = await this._promptsService.listPromptFilesForStorage(options.type, PromptsStorage.user, CancellationToken.None);
if (users.length) {
result.push({ type: 'separator', label: localize('separator.user', "User Data") });
result.push(...users.map(u => this._createPromptPickItem(u, buttons)));
@@ -332,13 +332,13 @@ export class PromptFilePickers {
let tooltip: string | undefined;
switch (promptFile.storage) {
case TPromptsStorage.extension:
case PromptsStorage.extension:
tooltip = promptFile.extension.displayName ?? promptFile.extension.id;
break;
case TPromptsStorage.local:
case PromptsStorage.local:
tooltip = this._labelService.getUriLabel(dirname(promptFile.uri), { relative: true });
break;
case TPromptsStorage.user:
case PromptsStorage.user:
tooltip = undefined;
break;
}
@@ -24,7 +24,7 @@ export const IPromptsService = createDecorator<IPromptsService>('IPromptsService
/**
* Where the prompt is stored.
*/
export enum TPromptsStorage {
export enum PromptsStorage {
local = 'local',
user = 'user',
extension = 'extension'
@@ -46,7 +46,7 @@ export interface IPromptPathBase {
/**
* Storage of the prompt.
*/
readonly storage: TPromptsStorage;
readonly storage: PromptsStorage;
/**
* Type of the prompt (e.g. 'prompt' or 'instructions').
@@ -64,16 +64,16 @@ export interface IPromptPathBase {
}
export interface IExtensionPromptPath extends IPromptPathBase {
readonly storage: TPromptsStorage.extension;
readonly storage: PromptsStorage.extension;
readonly extension: IExtensionDescription;
readonly name: string;
readonly description: string;
}
export interface ILocalPromptPath extends IPromptPathBase {
readonly storage: TPromptsStorage.local;
readonly storage: PromptsStorage.local;
}
export interface IUserPromptPath extends IPromptPathBase {
readonly storage: TPromptsStorage.user;
readonly storage: PromptsStorage.user;
}
@@ -170,7 +170,7 @@ export interface IPromptsService extends IDisposable {
/**
* List all available prompt files.
*/
listPromptFilesForStorage(type: PromptsType, storage: TPromptsStorage, token: CancellationToken): Promise<readonly IPromptPath[]>;
listPromptFilesForStorage(type: PromptsType, storage: PromptsStorage, token: CancellationToken): Promise<readonly IPromptPath[]>;
/**
* Get a list of prompt source folders based on the provided prompt type.
@@ -17,7 +17,7 @@ import { IModelService } from '../../../../../../editor/common/services/model.js
import { CancellationToken } from '../../../../../../base/common/cancellation.js';
import { IInstantiationService } from '../../../../../../platform/instantiation/common/instantiation.js';
import { IUserDataProfileService } from '../../../../../services/userDataProfile/common/userDataProfile.js';
import { IChatPromptSlashCommand, ICustomChatMode, IExtensionPromptPath, ILocalPromptPath, IPromptPath, IPromptsService, IUserPromptPath, TPromptsStorage } from './promptsService.js';
import { IChatPromptSlashCommand, ICustomChatMode, IExtensionPromptPath, ILocalPromptPath, IPromptPath, IPromptsService, IUserPromptPath, PromptsStorage } from './promptsService.js';
import { getCleanPromptName, PROMPT_FILE_EXTENSION } from '../config/promptFileLocations.js';
import { ILanguageService } from '../../../../../../editor/common/languages/language.js';
import { PromptsConfig } from '../config/config.js';
@@ -121,25 +121,25 @@ export class PromptsService extends Disposable implements IPromptsService {
}
const prompts = await Promise.all([
this.fileLocator.listFiles(type, TPromptsStorage.user, token).then(uris => uris.map(uri => ({ uri, storage: TPromptsStorage.user, type } satisfies IUserPromptPath))),
this.fileLocator.listFiles(type, TPromptsStorage.local, token).then(uris => uris.map(uri => ({ uri, storage: TPromptsStorage.local, type } satisfies ILocalPromptPath)))
this.fileLocator.listFiles(type, PromptsStorage.user, token).then(uris => uris.map(uri => ({ uri, storage: PromptsStorage.user, type } satisfies IUserPromptPath))),
this.fileLocator.listFiles(type, PromptsStorage.local, token).then(uris => uris.map(uri => ({ uri, storage: PromptsStorage.local, type } satisfies ILocalPromptPath)))
]);
return [...prompts.flat(), ...this.contributedFiles[type].values()];
}
public async listPromptFilesForStorage(type: PromptsType, storage: TPromptsStorage, token: CancellationToken): Promise<readonly IPromptPath[]> {
public async listPromptFilesForStorage(type: PromptsType, storage: PromptsStorage, token: CancellationToken): Promise<readonly IPromptPath[]> {
if (!PromptsConfig.enabled(this.configurationService)) {
return [];
}
switch (storage) {
case TPromptsStorage.extension:
case PromptsStorage.extension:
return Promise.resolve(Array.from(this.contributedFiles[type].values()));
case TPromptsStorage.local:
return this.fileLocator.listFiles(type, TPromptsStorage.local, token).then(uris => uris.map(uri => ({ uri, storage: TPromptsStorage.local, type } satisfies ILocalPromptPath)));
case TPromptsStorage.user:
return this.fileLocator.listFiles(type, TPromptsStorage.user, token).then(uris => uris.map(uri => ({ uri, storage: TPromptsStorage.user, type } satisfies IUserPromptPath)));
case PromptsStorage.local:
return this.fileLocator.listFiles(type, PromptsStorage.local, token).then(uris => uris.map(uri => ({ uri, storage: PromptsStorage.local, type } satisfies ILocalPromptPath)));
case PromptsStorage.user:
return this.fileLocator.listFiles(type, PromptsStorage.user, token).then(uris => uris.map(uri => ({ uri, storage: PromptsStorage.user, type } satisfies IUserPromptPath)));
default:
throw new Error(`[listPromptFilesForStorage] Unsupported prompt storage type: ${storage}`);
}
@@ -153,10 +153,10 @@ export class PromptsService extends Disposable implements IPromptsService {
const result: IPromptPath[] = [];
for (const uri of this.fileLocator.getConfigBasedSourceFolders(type)) {
result.push({ uri, storage: TPromptsStorage.local, type });
result.push({ uri, storage: PromptsStorage.local, type });
}
const userHome = this.userDataService.currentProfile.promptsHome;
result.push({ uri: userHome, storage: TPromptsStorage.user, type });
result.push({ uri: userHome, storage: PromptsStorage.user, type });
return result;
}
@@ -289,7 +289,7 @@ export class PromptsService extends Disposable implements IPromptsService {
// keep first registration per extension (handler filters duplicates per extension already)
return Disposable.None;
}
bucket.set(uri, { uri, name, description, storage: TPromptsStorage.extension, type, extension } satisfies IExtensionPromptPath);
bucket.set(uri, { uri, name, description, storage: PromptsStorage.extension, type, extension } satisfies IExtensionPromptPath);
if (type === PromptsType.mode) {
this.cachedCustomChatModes = undefined;
}
@@ -302,9 +302,9 @@ export class PromptsService extends Disposable implements IPromptsService {
getPromptLocationLabel(promptPath: IPromptPath): string {
switch (promptPath.storage) {
case TPromptsStorage.local: return this.labelService.getUriLabel(dirname(promptPath.uri), { relative: true });
case TPromptsStorage.user: return localize('user-data-dir.capitalized', 'User Data');
case TPromptsStorage.extension: {
case PromptsStorage.local: return this.labelService.getUriLabel(dirname(promptPath.uri), { relative: true });
case PromptsStorage.user: return localize('user-data-dir.capitalized', 'User Data');
case PromptsStorage.extension: {
return localize('extension.with.id', 'Extension: {0}', promptPath.extension.displayName ?? promptPath.extension.id);
}
default: throw new Error('Unknown prompt storage type');
@@ -18,7 +18,7 @@ import { Schemas } from '../../../../../../base/common/network.js';
import { getExcludes, IFileQuery, ISearchConfiguration, ISearchService, QueryType } from '../../../../../services/search/common/search.js';
import { CancellationToken } from '../../../../../../base/common/cancellation.js';
import { isCancellationError } from '../../../../../../base/common/errors.js';
import { TPromptsStorage } from '../service/promptsService.js';
import { PromptsStorage } from '../service/promptsService.js';
import { IUserDataProfileService } from '../../../../../services/userDataProfile/common/userDataProfile.js';
import { Emitter, Event } from '../../../../../../base/common/event.js';
import { Disposable, DisposableStore } from '../../../../../../base/common/lifecycle.js';
@@ -46,10 +46,10 @@ export class PromptFilesLocator extends Disposable {
*
* @returns List of prompt files found in the workspace.
*/
public async listFiles(type: PromptsType, storage: TPromptsStorage, token: CancellationToken): Promise<readonly URI[]> {
if (storage === TPromptsStorage.local) {
public async listFiles(type: PromptsType, storage: PromptsStorage, token: CancellationToken): Promise<readonly URI[]> {
if (storage === PromptsStorage.local) {
return await this.listFilesInLocal(type, token);
} else if (storage === TPromptsStorage.user) {
} else if (storage === PromptsStorage.user) {
return await this.listFilesInUserData(type, token);
}
throw new Error(`Unsupported prompt file storage: ${storage}`);
@@ -11,7 +11,7 @@ import { ITextModel } from '../../../../../editor/common/model.js';
import { IExtensionDescription } from '../../../../../platform/extensions/common/extensions.js';
import { PromptsType } from '../../common/promptSyntax/promptTypes.js';
import { ParsedPromptFile } from '../../common/promptSyntax/service/newPromptsParser.js';
import { ICustomChatMode, IPromptPath, IPromptsService, TPromptsStorage } from '../../common/promptSyntax/service/promptsService.js';
import { ICustomChatMode, IPromptPath, IPromptsService, PromptsStorage } from '../../common/promptSyntax/service/promptsService.js';
export class MockPromptsService implements IPromptsService {
_serviceBrand: undefined;
@@ -33,7 +33,7 @@ export class MockPromptsService implements IPromptsService {
// Stub implementations for required interface methods
getSyntaxParserFor(_model: any): any { throw new Error('Not implemented'); }
listPromptFiles(_type: any): Promise<readonly any[]> { throw new Error('Not implemented'); }
listPromptFilesForStorage(type: PromptsType, storage: TPromptsStorage, token: CancellationToken): Promise<readonly IPromptPath[]> { throw new Error('Not implemented'); }
listPromptFilesForStorage(type: PromptsType, storage: PromptsStorage, token: CancellationToken): Promise<readonly IPromptPath[]> { throw new Error('Not implemented'); }
getSourceFolders(_type: any): readonly any[] { throw new Error('Not implemented'); }
asPromptSlashCommand(_command: string): any { return undefined; }
resolvePromptSlashCommand(_data: any, _token: CancellationToken): Promise<any> { throw new Error('Not implemented'); }
@@ -21,7 +21,7 @@ import { ILogService, NullLogService } from '../../../../../../../platform/log/c
import { INSTRUCTION_FILE_EXTENSION, INSTRUCTIONS_DEFAULT_SOURCE_FOLDER, MODE_DEFAULT_SOURCE_FOLDER, PROMPT_DEFAULT_SOURCE_FOLDER, PROMPT_FILE_EXTENSION } from '../../../../common/promptSyntax/config/promptFileLocations.js';
import { INSTRUCTIONS_LANGUAGE_ID, PROMPT_LANGUAGE_ID, PromptsType } from '../../../../common/promptSyntax/promptTypes.js';
import { PromptsService } from '../../../../common/promptSyntax/service/promptsServiceImpl.js';
import { ICustomChatMode, IPromptsService, TPromptsStorage } from '../../../../common/promptSyntax/service/promptsService.js';
import { ICustomChatMode, IPromptsService, PromptsStorage } from '../../../../common/promptSyntax/service/promptsService.js';
import { MockFilesystem } from '../testUtils/mockFilesystem.js';
import { ILabelService } from '../../../../../../../platform/label/common/label.js';
import { ComputeAutomaticInstructions, newInstructionsCollectionEvent } from '../../../../common/promptSyntax/computeAutomaticInstructions.js';
@@ -287,33 +287,33 @@ suite('PromptsService', () => {
// local instructions
{
uri: URI.joinPath(rootFolderUri, '.github/prompts/file1.instructions.md'),
storage: TPromptsStorage.local,
storage: PromptsStorage.local,
type: PromptsType.instructions,
},
{
uri: URI.joinPath(rootFolderUri, '.github/prompts/file2.instructions.md'),
storage: TPromptsStorage.local,
storage: PromptsStorage.local,
type: PromptsType.instructions,
},
{
uri: URI.joinPath(rootFolderUri, '.github/prompts/file3.instructions.md'),
storage: TPromptsStorage.local,
storage: PromptsStorage.local,
type: PromptsType.instructions,
},
{
uri: URI.joinPath(rootFolderUri, '.github/prompts/file4.instructions.md'),
storage: TPromptsStorage.local,
storage: PromptsStorage.local,
type: PromptsType.instructions,
},
// user instructions
{
uri: URI.joinPath(userPromptsFolderUri, 'file10.instructions.md'),
storage: TPromptsStorage.user,
storage: PromptsStorage.user,
type: PromptsType.instructions,
},
{
uri: URI.joinPath(userPromptsFolderUri, 'file11.instructions.md'),
storage: TPromptsStorage.user,
storage: PromptsStorage.user,
type: PromptsType.instructions,
},
]));
@@ -475,33 +475,33 @@ suite('PromptsService', () => {
// local instructions
{
uri: URI.joinPath(rootFolderUri, '.github/prompts/file1.instructions.md'),
storage: TPromptsStorage.local,
storage: PromptsStorage.local,
type: PromptsType.instructions,
},
{
uri: URI.joinPath(rootFolderUri, '.github/prompts/file2.instructions.md'),
storage: TPromptsStorage.local,
storage: PromptsStorage.local,
type: PromptsType.instructions,
},
{
uri: URI.joinPath(rootFolderUri, '.github/prompts/file3.instructions.md'),
storage: TPromptsStorage.local,
storage: PromptsStorage.local,
type: PromptsType.instructions,
},
{
uri: URI.joinPath(rootFolderUri, '.github/prompts/file4.instructions.md'),
storage: TPromptsStorage.local,
storage: PromptsStorage.local,
type: PromptsType.instructions,
},
// user instructions
{
uri: URI.joinPath(userPromptsFolderUri, 'file10.instructions.md'),
storage: TPromptsStorage.user,
storage: PromptsStorage.user,
type: PromptsType.instructions,
},
{
uri: URI.joinPath(userPromptsFolderUri, 'file11.instructions.md'),
storage: TPromptsStorage.user,
storage: PromptsStorage.user,
type: PromptsType.instructions,
},
]));
@@ -737,12 +737,12 @@ suite('PromptsService', () => {
// local instructions
{
uri: URI.joinPath(rootFolderUri, '.github/chatmodes/mode1.instructions.md'),
storage: TPromptsStorage.local,
storage: PromptsStorage.local,
type: PromptsType.mode,
},
{
uri: URI.joinPath(rootFolderUri, '.github/chatmodes/mode2.instructions.md'),
storage: TPromptsStorage.local,
storage: PromptsStorage.local,
type: PromptsType.instructions,
},
@@ -27,7 +27,7 @@ import { isValidGlob, PromptFilesLocator } from '../../../../common/promptSyntax
import { IMockFolder, MockFilesystem } from '../testUtils/mockFilesystem.js';
import { mockService } from './mock.js';
import { TestUserDataProfileService } from '../../../../../../test/common/workbenchTestServices.js';
import { TPromptsStorage } from '../../../../common/promptSyntax/service/promptsService.js';
import { PromptsStorage } from '../../../../common/promptSyntax/service/promptsService.js';
/**
* Mocked instance of {@link IConfigurationService}.
@@ -148,7 +148,7 @@ suite('PromptFilesLocator', () => {
const locator = instantiationService.createInstance(PromptFilesLocator);
return {
async listFiles(type: PromptsType, storage: TPromptsStorage, token: CancellationToken): Promise<readonly URI[]> {
async listFiles(type: PromptsType, storage: PromptsStorage, token: CancellationToken): Promise<readonly URI[]> {
return locator.listFiles(type, storage, token);
},
getConfigBasedSourceFolders(type: PromptsType): readonly URI[] {
@@ -169,7 +169,7 @@ suite('PromptFilesLocator', () => {
const locator = await createPromptsLocator(undefined, EMPTY_WORKSPACE, []);
assertOutcome(
await locator.listFiles(PromptsType.prompt, TPromptsStorage.local, CancellationToken.None),
await locator.listFiles(PromptsType.prompt, PromptsStorage.local, CancellationToken.None),
[],
'No prompts must be found.',
);
@@ -183,7 +183,7 @@ suite('PromptFilesLocator', () => {
}, EMPTY_WORKSPACE, []);
assertOutcome(
await locator.listFiles(PromptsType.prompt, TPromptsStorage.local, CancellationToken.None),
await locator.listFiles(PromptsType.prompt, PromptsStorage.local, CancellationToken.None),
[],
'No prompts must be found.',
);
@@ -197,7 +197,7 @@ suite('PromptFilesLocator', () => {
], EMPTY_WORKSPACE, []);
assertOutcome(
await locator.listFiles(PromptsType.prompt, TPromptsStorage.local, CancellationToken.None),
await locator.listFiles(PromptsType.prompt, PromptsStorage.local, CancellationToken.None),
[],
'No prompts must be found.',
);
@@ -208,7 +208,7 @@ suite('PromptFilesLocator', () => {
const locator = await createPromptsLocator(null, EMPTY_WORKSPACE, []);
assertOutcome(
await locator.listFiles(PromptsType.prompt, TPromptsStorage.local, CancellationToken.None),
await locator.listFiles(PromptsType.prompt, PromptsStorage.local, CancellationToken.None),
[],
'No prompts must be found.',
);
@@ -219,7 +219,7 @@ suite('PromptFilesLocator', () => {
const locator = await createPromptsLocator('/etc/hosts/prompts', EMPTY_WORKSPACE, []);
assertOutcome(
await locator.listFiles(PromptsType.prompt, TPromptsStorage.local, CancellationToken.None),
await locator.listFiles(PromptsType.prompt, PromptsStorage.local, CancellationToken.None),
[],
'No prompts must be found.',
);
@@ -272,7 +272,7 @@ suite('PromptFilesLocator', () => {
]);
assertOutcome(
await locator.listFiles(PromptsType.prompt, TPromptsStorage.local, CancellationToken.None),
await locator.listFiles(PromptsType.prompt, PromptsStorage.local, CancellationToken.None),
[
'/Users/legomushroom/repos/prompts/test.prompt.md',
'/Users/legomushroom/repos/prompts/refactor-tests.prompt.md',
@@ -348,7 +348,7 @@ suite('PromptFilesLocator', () => {
);
assertOutcome(
await locator.listFiles(PromptsType.prompt, TPromptsStorage.local, CancellationToken.None),
await locator.listFiles(PromptsType.prompt, PromptsStorage.local, CancellationToken.None),
[
'/Users/legomushroom/repos/vscode/deps/text/my.prompt.md',
'/Users/legomushroom/repos/vscode/deps/text/nested/specific.prompt.md',
@@ -506,7 +506,7 @@ suite('PromptFilesLocator', () => {
);
assertOutcome(
await locator.listFiles(PromptsType.prompt, TPromptsStorage.local, CancellationToken.None),
await locator.listFiles(PromptsType.prompt, PromptsStorage.local, CancellationToken.None),
[
'/Users/legomushroom/repos/vscode/deps/text/nested/specific.prompt.md',
'/Users/legomushroom/repos/vscode/deps/text/nested/unspecific1.prompt.md',
@@ -588,7 +588,7 @@ suite('PromptFilesLocator', () => {
);
assertOutcome(
await locator.listFiles(PromptsType.prompt, TPromptsStorage.local, CancellationToken.None),
await locator.listFiles(PromptsType.prompt, PromptsStorage.local, CancellationToken.None),
[
'/Users/legomushroom/repos/vscode/deps/text/my.prompt.md',
'/Users/legomushroom/repos/vscode/deps/text/nested/specific.prompt.md',
@@ -747,7 +747,7 @@ suite('PromptFilesLocator', () => {
);
assertOutcome(
await locator.listFiles(PromptsType.prompt, TPromptsStorage.local, CancellationToken.None),
await locator.listFiles(PromptsType.prompt, PromptsStorage.local, CancellationToken.None),
[
'/Users/legomushroom/repos/vscode/deps/text/nested/specific.prompt.md',
'/Users/legomushroom/repos/vscode/deps/text/nested/unspecific1.prompt.md',
@@ -826,7 +826,7 @@ suite('PromptFilesLocator', () => {
);
assertOutcome(
await locator.listFiles(PromptsType.prompt, TPromptsStorage.local, CancellationToken.None),
await locator.listFiles(PromptsType.prompt, PromptsStorage.local, CancellationToken.None),
[
'/Users/legomushroom/repos/vscode/deps/text/my.prompt.md',
'/Users/legomushroom/repos/vscode/deps/text/nested/specific.prompt.md',
@@ -985,7 +985,7 @@ suite('PromptFilesLocator', () => {
);
assertOutcome(
await locator.listFiles(PromptsType.prompt, TPromptsStorage.local, CancellationToken.None),
await locator.listFiles(PromptsType.prompt, PromptsStorage.local, CancellationToken.None),
[
'/Users/legomushroom/repos/vscode/deps/text/nested/specific.prompt.md',
'/Users/legomushroom/repos/vscode/deps/text/nested/unspecific1.prompt.md',
@@ -1070,7 +1070,7 @@ suite('PromptFilesLocator', () => {
]);
assertOutcome(
await locator.listFiles(PromptsType.prompt, TPromptsStorage.local, CancellationToken.None),
await locator.listFiles(PromptsType.prompt, PromptsStorage.local, CancellationToken.None),
[
'/Users/legomushroom/repos/vscode/.github/prompts/my.prompt.md',
'/Users/legomushroom/repos/prompts/test.prompt.md',
@@ -1157,7 +1157,7 @@ suite('PromptFilesLocator', () => {
]);
assertOutcome(
await locator.listFiles(PromptsType.prompt, TPromptsStorage.local, CancellationToken.None),
await locator.listFiles(PromptsType.prompt, PromptsStorage.local, CancellationToken.None),
[
'/Users/legomushroom/repos/prompts/test.prompt.md',
'/Users/legomushroom/repos/prompts/refactor-tests.prompt.md',
@@ -1278,7 +1278,7 @@ suite('PromptFilesLocator', () => {
]);
assertOutcome(
await locator.listFiles(PromptsType.prompt, TPromptsStorage.local, CancellationToken.None),
await locator.listFiles(PromptsType.prompt, PromptsStorage.local, CancellationToken.None),
[
'/Users/legomushroom/repos/vscode/.github/prompts/default.prompt.md',
'/Users/legomushroom/repos/node/.github/prompts/refactor-static-classes.prompt.md',
@@ -1399,7 +1399,7 @@ suite('PromptFilesLocator', () => {
]);
assertOutcome(
await locator.listFiles(PromptsType.prompt, TPromptsStorage.local, CancellationToken.None),
await locator.listFiles(PromptsType.prompt, PromptsStorage.local, CancellationToken.None),
[
'/Users/legomushroom/repos/vscode/.github/prompts/default.prompt.md',
'/Users/legomushroom/repos/node/.github/prompts/refactor-static-classes.prompt.md',
@@ -1523,7 +1523,7 @@ suite('PromptFilesLocator', () => {
]);
assertOutcome(
await locator.listFiles(PromptsType.prompt, TPromptsStorage.local, CancellationToken.None),
await locator.listFiles(PromptsType.prompt, PromptsStorage.local, CancellationToken.None),
[
'/Users/legomushroom/repos/prompts/test.prompt.md',
'/Users/legomushroom/repos/prompts/refactor-tests.prompt.md',
@@ -1646,7 +1646,7 @@ suite('PromptFilesLocator', () => {
]);
assertOutcome(
await locator.listFiles(PromptsType.prompt, TPromptsStorage.local, CancellationToken.None),
await locator.listFiles(PromptsType.prompt, PromptsStorage.local, CancellationToken.None),
[
// all of these are due to the `.github/prompts` setting
'/Users/legomushroom/repos/vscode/.github/prompts/default.prompt.md',
@@ -1761,7 +1761,7 @@ suite('PromptFilesLocator', () => {
);
assertOutcome(
await locator.listFiles(PromptsType.prompt, TPromptsStorage.local, CancellationToken.None),
await locator.listFiles(PromptsType.prompt, PromptsStorage.local, CancellationToken.None),
[
'/Users/legomushroom/repos/vscode/gen/text/my.prompt.md',
'/Users/legomushroom/repos/vscode/gen/text/nested/specific.prompt.md',
@@ -1966,7 +1966,7 @@ suite('PromptFilesLocator', () => {
);
assertOutcome(
await locator.listFiles(PromptsType.prompt, TPromptsStorage.local, CancellationToken.None),
await locator.listFiles(PromptsType.prompt, PromptsStorage.local, CancellationToken.None),
[
'/Users/legomushroom/repos/vscode/gen/text/my.prompt.md',
'/Users/legomushroom/repos/vscode/gen/text/nested/specific.prompt.md',
@@ -2090,7 +2090,7 @@ suite('PromptFilesLocator', () => {
);
assertOutcome(
await locator.listFiles(PromptsType.prompt, TPromptsStorage.local, CancellationToken.None),
await locator.listFiles(PromptsType.prompt, PromptsStorage.local, CancellationToken.None),
[
'/Users/legomushroom/repos/vscode/gen/text/my.prompt.md',
'/Users/legomushroom/repos/vscode/gen/text/nested/specific.prompt.md',
@@ -2325,7 +2325,7 @@ suite('PromptFilesLocator', () => {
);
assertOutcome(
await locator.listFiles(PromptsType.prompt, TPromptsStorage.local, CancellationToken.None),
await locator.listFiles(PromptsType.prompt, PromptsStorage.local, CancellationToken.None),
[
'/Users/legomushroom/repos/vscode/gen/text/my.prompt.md',
'/Users/legomushroom/repos/vscode/gen/text/nested/specific.prompt.md',