feat(tui-go): workflow-propose choice panel

Render a workflow.proposed frame as a single-select picker with a manual-answer
slot: ↑↓/jk to choose, enter to launch, e for custom, esc to peek away. Picking
a candidate sends StartSession (and focuses the launched session); the custom
slot continues the conversation via ChatInput. Reuses the modal helpers from the
clarification view.
This commit is contained in:
2026-06-14 13:29:34 +04:00
parent b62b6e09a1
commit b563d9841d
9 changed files with 420 additions and 0 deletions
+14
View File
@@ -82,6 +82,20 @@ func (c *Client) Send(frame []byte) {
}
}
// Drain returns all queued-but-unsent client frames. Test-only: meaningful before
// Run starts consuming the send channel, so a test can assert on what was Sent.
func (c *Client) Drain() [][]byte {
var out [][]byte
for {
select {
case f := <-c.send:
out = append(out, f)
default:
return out
}
}
}
// Run drives the reconnect loop until ctx is cancelled.
func (c *Client) Run(ctx context.Context) {
backoff := initialBackoff