feat(chat): support ai photo viewing
This commit is contained in:
@@ -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,
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user