()
| 114 | |
| 115 | // Get sanitized error logs with sensitive information redacted |
| 116 | function getSanitizedErrorLogs(): Array<{ |
| 117 | error?: string; |
| 118 | timestamp?: string; |
| 119 | }> { |
| 120 | // Sanitize error logs to remove any API keys |
| 121 | return getInMemoryErrors().map(errorInfo => { |
| 122 | // Create a copy of the error info to avoid modifying the original |
| 123 | const errorCopy = { |
| 124 | ...errorInfo |
| 125 | } as { |
| 126 | error?: string; |
| 127 | timestamp?: string; |
| 128 | }; |
| 129 | |
| 130 | // Sanitize error if present and is a string |
| 131 | if (errorCopy && typeof errorCopy.error === 'string') { |
| 132 | errorCopy.error = redactSensitiveInfo(errorCopy.error); |
| 133 | } |
| 134 | return errorCopy; |
| 135 | }); |
| 136 | } |
| 137 | async function loadRawTranscriptJsonl(): Promise<string | null> { |
| 138 | try { |
| 139 | const transcriptPath = getTranscriptPath(); |
nothing calls this directly
no test coverage detected