diff --git a/core/promptFiles/v1/getPromptFiles.ts b/core/promptFiles/v1/getPromptFiles.ts deleted file mode 100644 index b9bb5d823..000000000 --- a/core/promptFiles/v1/getPromptFiles.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { IDE } from "../.."; -import { walkDir } from "../../indexing/walkDir"; - -export async function getPromptFiles( - ide: IDE, - dir: string, -): Promise<{ path: string; content: string }[]> { - try { - const exists = await ide.fileExists(dir); - - if (!exists) { - return []; - } - - const paths = await walkDir(dir, ide, { ignoreFiles: [] }); - const results = paths.map(async (path) => { - const content = await ide.readFile(path); // make a try catch - return { path, content }; - }); - return Promise.all(results); - } catch (e) { - console.error(e); - return []; - } -} diff --git a/core/promptFiles/v1/index.ts b/core/promptFiles/v1/index.ts index e14c2103c..940403e38 100644 --- a/core/promptFiles/v1/index.ts +++ b/core/promptFiles/v1/index.ts @@ -1,7 +1,6 @@ import { createNewPromptFile } from "./createNewPromptFile"; -import { getPromptFilesV1 } from "./getPromptFiles"; import { slashCommandFromPromptFile } from "./slashCommandFromPromptFile"; export const DEFAULT_PROMPTS_FOLDER = ".prompts"; -export { createNewPromptFile, getPromptFilesV1, slashCommandFromPromptFile }; +export { createNewPromptFile, slashCommandFromPromptFile };