Fixed regression from 3536438d
We were sending an empty string to the output channel when `ping` messages were received from Anthropic's API. This was causing the TUI to break since we started doing an empty chunk check (and mistakenly not waiting for future chunks if one was received). This commit makes it so we no longer an empty string on the ping message from Anthropic, and we update the handling of msgAssistantChunk and msgAssistantReply to make it less likely that we forget to wait for the next chunk/reply.
This commit is contained in:
@@ -229,8 +229,7 @@ func (c *AnthropicClient) CreateChatCompletionStream(
|
||||
case "message_start":
|
||||
// noop
|
||||
case "ping":
|
||||
// write an empty string to signal start of text
|
||||
output <- ""
|
||||
// signals start of text - currently ignoring
|
||||
case "content_block_start":
|
||||
// ignore?
|
||||
case "content_block_delta":
|
||||
|
||||
Reference in New Issue
Block a user