| 583 | } |
| 584 | |
| 585 | async function emitBash(state: State, signal?: AbortSignal): Promise<void> { |
| 586 | const ref = make(state, "bash", { |
| 587 | command: "git status", |
| 588 | workdir: process.cwd(), |
| 589 | description: "Show git status", |
| 590 | }) |
| 591 | startTool(state, ref) |
| 592 | await wait(70, signal) |
| 593 | doneTool(state, ref, { |
| 594 | title: "git status", |
| 595 | output: `${process.cwd()}\ngit status\nOn branch demo\nnothing to commit, working tree clean\n`, |
| 596 | metadata: { |
| 597 | exitCode: 0, |
| 598 | }, |
| 599 | }) |
| 600 | } |
| 601 | |
| 602 | function emitWrite(state: State): void { |
| 603 | const file = path.join(process.cwd(), "src", "demo-format.ts") |