feat(chat): migrate chat protocol to lock detail

This commit is contained in:
2026-06-24 14:06:30 +08:00
parent c280a3c1ea
commit 42c03f8901
34 changed files with 609 additions and 373 deletions
+8 -4
View File
@@ -12,6 +12,10 @@
*/
import Dexie, { type Table } from "dexie";
import type {
ChatImageData,
ChatLockDetailData,
} from "@/data/schemas/chat";
export interface LocalMessageRow {
/** Dexie 自增主键(数据库内部使用,不暴露给 LocalMessage 类)。 */
@@ -19,12 +23,12 @@ export interface LocalMessageRow {
/** 消息 id(来自 ChatMessage.id)。 */
id: string;
role: string;
type: string;
content: string;
createdAt: string;
imageUrl?: string | null;
isPrivate?: boolean | null;
privateLocked?: boolean | null;
privateHint?: string | null;
audioUrl?: string | null;
image?: ChatImageData;
lockDetail?: ChatLockDetailData;
sessionId: string;
}