(result: string)
| 66 | } |
| 67 | |
| 68 | function getResultText(result: string): string { |
| 69 | const parsed = parseToolResultValue(result); |
| 70 | if (typeof parsed === "string") { |
| 71 | return parsed; |
| 72 | } |
| 73 | |
| 74 | const record = asRecord(parsed); |
| 75 | const output = [ |
| 76 | getToolString(record, ["stdout", "output", "text"]), |
| 77 | getToolString(record, ["stderr"]), |
| 78 | ] |
| 79 | .filter((value): value is string => value != null) |
| 80 | .join("\n"); |
| 81 | |
| 82 | return output || result; |
| 83 | } |
| 84 | |
| 85 | function getDiffPath(text: string): string | null { |
| 86 | for (const line of text.split(/\r?\n/)) { |
no test coverage detected