import z from "zod";
import { createToolFactory, ToolCategory } from "../tools2/types.js";
export const buildListFilesToolFactory = createToolFactory("build_listFiles", (services) => {
    return {
        category: ToolCategory.GENERAL,
        description: `
      List all files in the application.

      Use this to understand the current file structure before making changes.
      Helps with understanding existing components, pages, and application architecture.
    `,
        inputSchema: z.object({}),
        execute: async () => {
            const files = await services.appShell.listFiles(["**/*.{ts,tsx,yaml,css}", "package.json", "skills/app/**/*.md"], {
                ignore: ["node_modules/**", "chakra/**"],
            });
            return { files };
        },
        readOnly: true,
        getSummary: (_input, output) => {
            const count = output.files.length;
            return { output: `${count} file${count === 1 ? "" : "s"}` };
        },
    };
});
//# sourceMappingURL=build-list-files.js.map