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
+6
View File
@@ -17,6 +17,8 @@ export type ReadAndSyncHistoryOutput = {
localOverwritten: boolean;
localCount: number;
networkCount: number;
total: number;
limit: number;
};
export type LocalHistorySnapshotOutput = {
@@ -121,6 +123,8 @@ export async function syncNetworkHistory(
localOverwritten,
localCount,
networkCount: networkUi.length,
total: networkResult.data.total,
limit: networkResult.data.limit,
};
}
@@ -144,5 +148,7 @@ export async function readAndSyncHistory(): Promise<ReadAndSyncHistoryOutput> {
localOverwritten: false,
localCount: localSnapshot.localCount,
networkCount: 0,
total: 0,
limit: CHAT_HISTORY_LIMIT,
};
}