diff --git a/prompts/common.ts b/prompts/common.ts index 1f69ba8..71f4c4a 100644 --- a/prompts/common.ts +++ b/prompts/common.ts @@ -50,10 +50,11 @@ export async function getCode( throw new Error(`invalid code blocks ${JSON.stringify(codeBlocks)}`); } + remove(tree, "code"); return { code: codeBlocks[0], usage: chatCompletion.usage, - description: toMarkdown(remove(tree, "code")), + description: toMarkdown(tree), }; }, { delay: 100, maxTry: 3 }