fix(chat): queue outgoing messages

This commit is contained in:
2026-06-26 11:11:43 +08:00
parent 2858ceccdc
commit fe85af0cd7
8 changed files with 240 additions and 60 deletions
+2
View File
@@ -3,6 +3,7 @@ import type { UiMessage } from "@/data/dto/chat";
export interface ChatState {
messages: UiMessage[];
isReplyingAI: boolean;
pendingReplyCount: number;
/**
* WebSocket 连接状态(仅 VIP 用户会话期间 true)
* - VIP true:走 WS
@@ -34,6 +35,7 @@ export interface ChatState {
export const initialState: ChatState = {
messages: [],
isReplyingAI: false,
pendingReplyCount: 0,
wsConnected: false,
upgradePromptVisible: false,
upgradeReason: null,