fix: 修复历史记录不保存的问题(final 消息类型被错误覆盖为 partial)

This commit is contained in:
2026-03-01 06:43:59 +08:00
parent cead3e42b8
commit e4b5841c93

View File

@@ -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)