From 96040dbd6400dcb519dedb756f29ac8804c7c18c Mon Sep 17 00:00:00 2001 From: socketteer Date: Fri, 5 Apr 2024 05:16:45 -0700 Subject: [PATCH] add new node to parent based on prompt for those completions, not current generating node --- main.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/main.ts b/main.ts index cf14862..109078a 100644 --- a/main.ts +++ b/main.ts @@ -1270,7 +1270,7 @@ export default class LoomPlugin extends Plugin { // the tokenization and completion depend on the provider, // so call a different method depending on the provider - console.log("prompt", prompt); + // console.log("prompt", prompt); const completionMethods: Record Promise> = { cohere: this.completeCohere, @@ -1303,7 +1303,7 @@ export default class LoomPlugin extends Plugin { } const rawCompletions = result.completions; - console.log("rawCompletions", rawCompletions); + // console.log("rawCompletions", rawCompletions); // escape and clean up the completions const completions = rawCompletions.map((completion: string) => { @@ -1324,7 +1324,7 @@ export default class LoomPlugin extends Plugin { // create a child of the current node for each completion let ids = []; for (let completion of completions) { - const [id, node] = this.newNode(completion, state.generating, true); + const [id, node] = this.newNode(completion, rootNode, true); state.nodes[id] = node; ids.push(id); }