This commit is contained in:
Saoud Rizwan
2024-10-04 18:37:14 -04:00
parent 7b4ad310ad
commit 27abea6ca5
2 changed files with 3 additions and 4 deletions

View File

@@ -1611,7 +1611,6 @@ export class ClaudeDev {
// this also indicates the end of the text content
textContent.partial = false
// remove the partially accumulated tool use tag from the end of text (<tool)
console.log("removing from text", toolUseOpeningTag.slice(0, -1))
textContent.content = textContent.content.slice(0, -toolUseOpeningTag.slice(0, -1).length).trim()
break
}
@@ -1632,8 +1631,6 @@ export class ClaudeDev {
toolUses.push(currentToolUse)
}
console.log(assistantMessage, textContent, toolUses)
const prevLength = this.assistantMessageContent.length
this.assistantMessageContent = [textContent, ...toolUses]
if (this.assistantMessageContent.length > prevLength) {