Function
emitError
(state: State, text: string)
Source from the content-addressed store, hash-verified
| 566 | } |
| 567 | |
| 568 | function emitError(state: State, text: string): void { |
| 569 | const event = { |
| 570 | id: `session.error:${state.id}:${Date.now()}`, |
| 571 | type: "session.error", |
| 572 | properties: { |
| 573 | sessionID: state.id, |
| 574 | error: { |
| 575 | name: "UnknownError", |
| 576 | data: { |
| 577 | message: text, |
| 578 | }, |
| 579 | }, |
| 580 | }, |
| 581 | } satisfies Event |
| 582 | feed(state, event) |
| 583 | } |
| 584 | |
| 585 | async function emitBash(state: State, signal?: AbortSignal): Promise<void> { |
| 586 | const ref = make(state, "bash", { |
Tested by
no test coverage detected