fix: 保留 Agent token 估算数值
- src/agent/agent-invocation.repository.ts: 脱敏 Agent 调用输入时保留 tokenEstimate 数字,避免 Prisma 写入失败
This commit is contained in:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user