Expand description
The terminal client: one line in, one run out.
Generic over its input and output rather than wired to stdin/stdout, so
the integration tests under tests/ drive this code with a scripted
script and assert on the transcript it produces. A client whose printing is
only exercised by a human is a client whose printing breaks quietly.
Reading is synchronous inside an async fn on purpose: this is a one-user terminal, and nothing else needs the runtime while it waits for a keystroke.
Structs§
- Terminal
- Where the conversation is read from and written to.
Functions§
- converse
- Reads lines until the input ends, running one turn per line.