feat(chat): implement pull-to-refresh functionality and pagination for chat history
This commit is contained in:
@@ -23,6 +23,8 @@ interface ChatState {
|
||||
upgradeReason: MachineContext["upgradeReason"];
|
||||
/** history 初始加载完成标志(local → network → save 跑完) —— UI 可用此显示 loading */
|
||||
historyLoaded: boolean;
|
||||
hasMoreHistory: boolean;
|
||||
isLoadingMoreHistory: boolean;
|
||||
unlockHistoryPromptVisible: boolean;
|
||||
lockedHistoryCount: number;
|
||||
isUnlockingHistory: boolean;
|
||||
@@ -76,6 +78,10 @@ function selectChatState(state: ChatSnapshot): SelectedChatState {
|
||||
upgradePromptVisible: state.context.upgradePromptVisible,
|
||||
upgradeReason: state.context.upgradeReason,
|
||||
historyLoaded: state.context.historyLoaded,
|
||||
hasMoreHistory:
|
||||
state.context.historyLoaded &&
|
||||
state.context.nextHistoryOffset < state.context.historyTotal,
|
||||
isLoadingMoreHistory: state.context.isLoadingMoreHistory,
|
||||
unlockHistoryPromptVisible: state.context.unlockHistoryPromptVisible,
|
||||
lockedHistoryCount: state.context.lockedHistoryCount,
|
||||
isUnlockingHistory: state.context.isUnlockingHistory,
|
||||
|
||||
Reference in New Issue
Block a user