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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user