fix: 修复历史记录不保存的问题(final 消息类型被错误覆盖为 partial)
This commit is contained in:
@@ -75,7 +75,7 @@ func (h *Handler) handleConn(c *websocket.Conn) {
|
||||
accMu.Lock()
|
||||
accText += msg.Text
|
||||
// Send accumulated preview to phone
|
||||
preview := ServerMsg{Type: MsgPartial, Text: accText}
|
||||
preview := ServerMsg{Type: msg.Type, Text: accText}
|
||||
accMu.Unlock()
|
||||
if err := c.WriteMessage(websocket.TextMessage, preview.Bytes()); err != nil {
|
||||
log.Warn("ws write error", "err", err)
|
||||
|
||||
Reference in New Issue
Block a user