refactor(chat): tighten media cache boundaries

This commit is contained in:
2026-06-30 16:12:02 +08:00
parent ccd2d6bd48
commit 9cff16e2d9
17 changed files with 388 additions and 146 deletions
+2 -3
View File
@@ -12,6 +12,7 @@
*/
import Dexie, { type Table } from "dexie";
import type { ChatMediaKind } from "@/data/dto/chat";
import type {
ChatImageData,
ChatLockDetailData,
@@ -32,13 +33,11 @@ export interface LocalMessageRow {
sessionId: string;
}
export type LocalChatMediaKind = "image" | "audio";
export interface LocalChatMediaRow {
cacheKey: string;
ownerKey: string;
messageId: string;
kind: LocalChatMediaKind;
kind: ChatMediaKind;
remoteUrl: string;
blob: Blob;
mimeType: string;