continue-custom/core/tools/viewRepoMap.ts

24 lines
566 B
TypeScript

import { Tool } from "..";
import generateRepoMap from "../util/generateRepoMap";
export const viewRepoMapTool: Tool = {
type: "function",
action: async (args, extras) => {
const repoMap = await generateRepoMap(extras.llm, extras.ide, {});
return [
{
name: "Repo map",
description: "Overview of the repository structure",
content: repoMap,
},
];
},
function: {
name: "view_repo_map",
description: "View the repository map",
parameters: {
type: "object",
properties: {},
},
},
};