feat(chat): implement pull-to-refresh functionality and pagination for chat history

This commit is contained in:
2026-07-15 18:19:35 +08:00
parent 05ca15be48
commit c37a2f9040
21 changed files with 892 additions and 66 deletions
+11
View File
@@ -3,6 +3,7 @@ import { shouldPromptUnlockHistory } from "../helper/unlock";
import { initialState } from "../chat-state";
import {
guestInitializingState,
historyPaginationTransitions,
userInitializingState,
} from "./history-flow";
import {
@@ -79,8 +80,13 @@ const guestSessionState = chatMachineSetup.createStateConfig({
id: "loadHistory",
src: "loadHistory",
},
{
id: "loadMoreHistory",
src: "loadMoreHistory",
},
],
on: {
...historyPaginationTransitions,
ChatUserLogin: {
target: "#chat.userSession",
actions: "startUserSession",
@@ -137,8 +143,13 @@ const userSessionState = chatMachineSetup.createStateConfig({
id: "loadHistory",
src: "loadHistory",
},
{
id: "loadMoreHistory",
src: "loadMoreHistory",
},
],
on: {
...historyPaginationTransitions,
ChatGuestLogin: {
target: "#chat.guestSession",
actions: "startGuestSession",