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

Method constructor

lib/SourceCodeSection.js:24–27  ·  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, tokens = -1, userPrefix = 'user: ')

Source from the content-addressed store, hash-verified

22 * @param userPrefix Optional. Prefix to use for text output. Defaults to `user: `.
23 */
24 constructor(index, tokens = -1, userPrefix = 'user: ') {
25 super(tokens, true, '\n', userPrefix);
26 this._index = index;
27 }
28 renderAsMessages(memory, functions, tokenizer, maxTokens) {
29 return __awaiter(this, void 0, void 0, function* () {
30 // Query the code index

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected