fix: 保留 Agent token 估算数值

- src/agent/agent-invocation.repository.ts: 脱敏 Agent 调用输入时保留 tokenEstimate 数字,避免 Prisma 写入失败
This commit is contained in:
湛兮
2026-06-12 05:57:42 +08:00
parent 1d15c1c676
commit b305922a5b
+9 -1
View File
@@ -139,7 +139,15 @@ export class AgentInvocationRepository {
private sanitizeInput(
input: CreateAgentInvocationRecordInput,
): CreateAgentInvocationRecordInput {
return redactSensitive(input);
const redacted = redactSensitive({
...input,
tokenEstimate: undefined,
});
return {
...redacted,
tokenEstimate: input.tokenEstimate,
};
}
private inputDigest(