fix(chat): stabilize history pagination and message keys

This commit is contained in:
2977094657
2026-03-15 19:08:13 +08:00
parent 2b97b6ac9d
commit c0ad450960
6 changed files with 337 additions and 172 deletions

View File

@@ -183,12 +183,14 @@ export interface ElectronAPI {
success: boolean;
messages?: Message[];
hasMore?: boolean;
nextOffset?: number;
error?: string
}>
getLatestMessages: (sessionId: string, limit?: number) => Promise<{
success: boolean
messages?: Message[]
hasMore?: boolean
nextOffset?: number
error?: string
}>
getNewMessages: (sessionId: string, minTime: number, limit?: number) => Promise<{

View File

@@ -41,6 +41,7 @@ export interface ContactInfo {
// 消息
export interface Message {
messageKey: string
localId: number
serverId: number
localType: number
@@ -105,6 +106,7 @@ export interface Message {
// 聊天记录
chatRecordTitle?: string // 聊天记录标题
chatRecordList?: ChatRecordItem[] // 聊天记录列表
_db_path?: string
}
// 聊天记录项