MCPcopy Create free account
hub / github.com/Stevenic/codepilot / Codepilot

Class Codepilot

lib/Codepilot.d.ts:6–32  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4 * The main class for the Codepilot application.
5 */
6export declare class Codepilot {
7 private readonly _index;
8 private readonly _functions;
9 /**
10 * Creates a new `Codepilot` instance.
11 * @param index The code index to use.
12 */
13 constructor(index: CodeIndex);
14 /**
15 * Gets the code index.
16 */
17 get index(): CodeIndex;
18 /**
19 * Registers a new function to be used in the chat completion.
20 * @remarks
21 * This is used to add new capabilities to Codepilot's chat feature
22 * @param name The name of the function.
23 * @param schema The schema of the function.
24 * @param fn The function to be executed.
25 */
26 addFunction<TArgs = Record<string, any>>(schema: ChatCompletionFunction, fn: (args: TArgs) => Promise<any>): this;
27 /**
28 * Starts the chat session and listens for user input.
29 */
30 chat(): Promise<void>;
31 private createModel;
32}
33//# sourceMappingURL=Codepilot.d.ts.map

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected