| 671 | } |
| 672 | |
| 673 | function scrollBashFinal(p: ToolProps<typeof BashTool>): string { |
| 674 | const code = p.metadata.exit ?? num(p.frame.meta.exitCode) ?? num(p.frame.meta.exit_code) |
| 675 | const time = span(p.frame.state) |
| 676 | if (code === undefined) { |
| 677 | if (!time) { |
| 678 | return "bash completed" |
| 679 | } |
| 680 | |
| 681 | return `bash completed · ${time}` |
| 682 | } |
| 683 | |
| 684 | return `bash completed (exit ${code})${time ? ` · ${time}` : ""}` |
| 685 | } |
| 686 | |
| 687 | function scrollReadStart(p: ToolProps<typeof ReadTool>): string { |
| 688 | const file = toolPath(p.input.filePath) |