(value: unknown, maxBytes: number)
| 161 | } |
| 162 | |
| 163 | function summarizeValueForExecutionData(value: unknown, maxBytes: number): unknown { |
| 164 | const size = getJsonByteSize(value, maxBytes) |
| 165 | if (size === undefined || size <= maxBytes) { |
| 166 | return value |
| 167 | } |
| 168 | |
| 169 | return { |
| 170 | _truncated: true, |
| 171 | reason: 'execution_data_size_limit', |
| 172 | originalBytes: size, |
| 173 | summary: describeValue(value), |
| 174 | } |
| 175 | } |
| 176 | |
| 177 | function summarizeTextForExecutionData(value: string | undefined): string | undefined { |
| 178 | if (!value) return value |
no test coverage detected