mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-18 18:46:19 +08:00
fix(server): nullable value for parent id (#10725)
This commit is contained in:
@@ -409,7 +409,7 @@ export class ChatSessionService {
|
||||
): Promise<
|
||||
Array<{
|
||||
id: string;
|
||||
parentSessionId?: string;
|
||||
parentSessionId: string | null;
|
||||
promptName: string;
|
||||
}>
|
||||
> {
|
||||
@@ -433,7 +433,7 @@ export class ChatSessionService {
|
||||
.then(sessions =>
|
||||
sessions.map(({ id, parentSessionId, promptName }) => ({
|
||||
id,
|
||||
parentSessionId: parentSessionId || undefined,
|
||||
parentSessionId: parentSessionId || null,
|
||||
promptName,
|
||||
}))
|
||||
);
|
||||
@@ -548,7 +548,7 @@ export class ChatSessionService {
|
||||
|
||||
return {
|
||||
sessionId: id,
|
||||
action: prompt.action || undefined,
|
||||
action: prompt.action || null,
|
||||
tokens: tokenCost,
|
||||
createdAt,
|
||||
messages: preload.concat(ret.data),
|
||||
|
||||
Reference in New Issue
Block a user