mirror of
https://github.com/toeverything/AFFiNE.git
synced 2025-01-01 23:02:58 +03:00
fix: history attachment query (#6670)
This commit is contained in:
parent
c425cfa598
commit
01a0f60d03
@ -188,6 +188,7 @@ export class PromptService {
|
||||
create: messages.map((m, idx) => ({
|
||||
idx,
|
||||
...m,
|
||||
attachments: m.attachments || undefined,
|
||||
params: m.params || undefined,
|
||||
})),
|
||||
},
|
||||
@ -206,6 +207,7 @@ export class PromptService {
|
||||
create: messages.map((m, idx) => ({
|
||||
idx,
|
||||
...m,
|
||||
attachments: m.attachments || undefined,
|
||||
params: m.params || undefined,
|
||||
})),
|
||||
},
|
||||
|
@ -161,6 +161,7 @@ export class ChatSessionService {
|
||||
|
||||
const messages = state.messages.map(m => ({
|
||||
...m,
|
||||
attachments: m.attachments || undefined,
|
||||
params: m.params || undefined,
|
||||
}));
|
||||
|
||||
@ -322,6 +323,7 @@ export class ChatSessionService {
|
||||
select: {
|
||||
role: true,
|
||||
content: true,
|
||||
attachments: true,
|
||||
params: true,
|
||||
createdAt: true,
|
||||
},
|
||||
|
@ -59,7 +59,7 @@ export const ChatMessageRole = Object.values(AiPromptRole) as [
|
||||
|
||||
const PureMessageSchema = z.object({
|
||||
content: z.string(),
|
||||
attachments: z.array(z.string()).optional(),
|
||||
attachments: z.array(z.string()).optional().nullable(),
|
||||
params: z
|
||||
.record(z.union([z.string(), z.array(z.string())]))
|
||||
.optional()
|
||||
|
Loading…
Reference in New Issue
Block a user