feat(chat): support ai photo viewing

This commit is contained in:
2026-06-23 10:33:20 +08:00
parent cebc8f7443
commit d81abd6efd
16 changed files with 160 additions and 45 deletions
+4
View File
@@ -22,6 +22,7 @@ export const LocalMessageSchema = z.object({
role: z.string(),
content: z.string(),
createdAt: z.string().default(""),
imageUrl: z.string().nullable().default(null),
sessionId: z.string().default(""),
});
@@ -33,6 +34,7 @@ export class LocalMessage {
declare readonly role: string;
declare readonly content: string;
declare readonly createdAt: string;
declare readonly imageUrl: string | null;
declare readonly sessionId: string;
private constructor(input: LocalMessageInput) {
@@ -60,6 +62,7 @@ export class LocalMessage {
role: this.role,
content: this.content,
createdAt: this.createdAt,
imageUrl: this.imageUrl,
sessionId: this.sessionId,
};
}
@@ -71,6 +74,7 @@ export class LocalMessage {
role: row.role,
content: row.content,
createdAt: row.createdAt,
imageUrl: row.imageUrl ?? null,
sessionId: row.sessionId,
});
}