fix(chat): render cached history before network sync

This commit is contained in:
2026-07-02 11:51:20 +08:00
parent cd25fa35f2
commit 5821a4d062
7 changed files with 339 additions and 114 deletions
+9
View File
@@ -22,6 +22,15 @@ export type ChatEvent =
| { type: "ChatGuestLogin" }
| { type: "ChatUserLogin"; token: string }
| { type: "ChatLogout" }
| {
type: "ChatLocalHistoryLoaded";
output: import("./chat-history-sync").LocalHistorySnapshotOutput;
}
| {
type: "ChatNetworkHistoryLoaded";
output: import("./chat-history-sync").NetworkHistorySyncOutput;
}
| { type: "ChatHistoryLoadFailed"; error: unknown }
// 业务事件
| { type: "ChatSendMessage"; content: string }
| { type: "ChatSendImage"; imageBase64: string }