(
toolName: string | undefined,
result: { success: boolean; output?: unknown; error?: string } | undefined
)
| 69 | * call's outcome and metadata; only the secret is stripped. |
| 70 | */ |
| 71 | export function redactToolCallResult( |
| 72 | toolName: string | undefined, |
| 73 | result: { success: boolean; output?: unknown; error?: string } | undefined |
| 74 | ): { success: boolean; output?: unknown; error?: string } | undefined { |
| 75 | if (!result || toolName !== GenerateApiKey.id) return result |
| 76 | const output = result.output |
| 77 | if (!output || typeof output !== 'object') return result |
| 78 | const record = output as Record<string, unknown> |
| 79 | if (typeof record.key !== 'string') return result |
| 80 | return { |
| 81 | ...result, |
| 82 | output: { ...record, key: REDACTED_MARKER, redacted: true }, |
| 83 | } |
| 84 | } |
| 85 | |
| 86 | function isMergeableAssistantTextBlock(block: PersistedContentBlock): boolean { |
| 87 | return ( |
no outgoing calls
no test coverage detected