fix: ChatCitation 字段 + BigInt 类型修复
All checks were successful
Deploy API Server / build-and-deploy (push) Successful in 48s

- ChatCitation.content → excerptText(对齐 Prisma schema)
- ChatCitation.score 不存在→ 移除
- UploadedFile.sizeBytes BigInt → Number() 转换

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
wangdl 2026-05-30 08:42:07 +08:00
parent b90387dd51
commit d7a7611b36
2 changed files with 3 additions and 3 deletions

View File

@ -94,8 +94,8 @@ export class RagChatService {
data: { data: {
messageId: aiMsg.id, messageId: aiMsg.id,
chunkId: c.id, chunkId: c.id,
content: c.text.slice(0, 500), sourceTitle: c.title ?? null,
score: c.score ?? 0, excerptText: c.text.slice(0, 500),
}, },
}); });
} }

View File

@ -76,7 +76,7 @@ export class UsersService {
where: { userId }, where: { userId },
select: { sizeBytes: true, mimeType: true }, select: { sizeBytes: true, mimeType: true },
}); });
const usedBytes = files.reduce((sum, f) => sum + f.sizeBytes, 0); const usedBytes = files.reduce((sum, f) => sum + Number(f.sizeBytes), 0);
const totalBytes = 1024 * 1024 * 1024; // 1GB hardcoded for now const totalBytes = 1024 * 1024 * 1024; // 1GB hardcoded for now
return { totalBytes, usedBytes, fileCount: files.length }; return { totalBytes, usedBytes, fileCount: files.length };
} }