(part: ToolPart)
| 657 | } |
| 658 | |
| 659 | function bashCommand(part: ToolPart): string | undefined { |
| 660 | if (part.tool !== "bash") { |
| 661 | return undefined |
| 662 | } |
| 663 | |
| 664 | const input = part.state.input |
| 665 | if (!input || typeof input !== "object" || Array.isArray(input)) { |
| 666 | return undefined |
| 667 | } |
| 668 | |
| 669 | const command = Reflect.get(input, "command") |
| 670 | return typeof command === "string" ? command : undefined |
| 671 | } |
| 672 | |
| 673 | function shellCommit( |
| 674 | input: { |
no test coverage detected