import { getBasename } from "../../util/index.js";
import { BaseContextProvider } from "../index.js";
// import { getOutlines } from "llm-code-highlighter/dist/index.continue";
class CodeOutlineContextProvider extends BaseContextProvider {
    static description = {
        title: "outline",
        displayTitle: "Outline",
        description: "Definition lines only (from open files)",
        type: "normal",
    };
    async getContextItems(query, extras) {
        const ide = extras.ide;
        const openFiles = await ide.getOpenFiles();
        const allFiles = await Promise.all(openFiles.map(async (filepath) => {
            return {
                name: getBasename(filepath),
                absPath: filepath,
                content: `${await ide.readFile(filepath)}`,
            };
        }));
        // const outlines = await getOutlines(
        //   allFiles
        //     .filter((file) => file.content.length > 0)
        //     .map((file) => {
        //       return {
        //         relPath: file.name,
        //         code: file.content,
        //       };
        //     })
        // );
        // return [
        //   {
        //     content: outlines ? outlines : "",
        //     name: "Code Outline",
        //     description: "Definition lines only (from open files)",
        //   },
        // ];
        return [];
    }
    async load() { }
}
export default CodeOutlineContextProvider;
