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

Method constructor

src/SourceCodeSection.ts:16–19  ·  view source on GitHub ↗

* Creates a new 'SourceCodeSection' instance. * @param index Code index to use. * @param tokens Optional. Sizing strategy for this section. Defaults to `auto`. * @param userPrefix Optional. Prefix to use for text output. Defaults to `user: `.

(index: CodeIndex, tokens: number = -1, userPrefix: string = 'user: ')

Source from the content-addressed store, hash-verified

14 * @param userPrefix Optional. Prefix to use for text output. Defaults to `user: `.
15 */
16 public constructor(index: CodeIndex, tokens: number = -1, userPrefix: string = 'user: ') {
17 super(tokens, true, '\n', userPrefix);
18 this._index = index;
19 }
20
21 public async renderAsMessages(memory: PromptMemory, functions: PromptFunctions, tokenizer: Tokenizer, maxTokens: number): Promise<RenderedPromptSection<Message<string>[]>> {
22 // Query the code index

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected