feat: add --block flag to poc-agent read

The --block flag makes poc-agent read block until a complete response
is received (detected by a new user input line starting with '>'),
then exit. This enables smoother three-way conversations where one
instance can wait for the other's complete response without polling.

The implementation:
- Added cmd_read_inner() with block parameter
- Modified socket streaming to detect '>' lines as response boundaries
- Added --block CLI flag to Read subcommand

The --follow flag continues to stream indefinitely.
The --block flag reads one complete response and exits.
Neither flag exits immediately if there's no new output.
This commit is contained in:
Kent Overstreet 2026-03-21 23:39:12 -04:00
parent 8a83f39734
commit a3acf0a681
3 changed files with 19 additions and 6 deletions

View file

@ -62,6 +62,9 @@ pub enum SubCmd {
/// Stream output continuously instead of exiting
#[arg(short, long)]
follow: bool,
/// Block until a complete response is received, then exit
#[arg(long)]
block: bool,
},
/// Send a message to the running agent
Write {