Skip to content

Commit 1ed1b0c

Browse files
Add logging for text response content in HybridSession and clean up code
1 parent 9e0af9e commit 1ed1b0c

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

src/modules/hybrid/hybrid_session.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,12 @@ export class HybridSession extends BaseSession {
5555
block.type === "text" ? {type: "text", text: block.text} : block
5656
)
5757

58+
if (response.content.find((block) => block.type === "text")?.text) {
59+
console.log(`🤖 ${response.content.find((block) => block.type === "text")?.text}`)
60+
}
61+
5862
this.messages.push({role: "assistant", content: responseContent})
59-
63+
6064
if (response.stop_reason !== "tool_use") {
6165
console.log(response.content.find((block) => block.type === "text")?.text ?? "")
6266
break

0 commit comments

Comments
 (0)