From 2c22479b452b1fad9bc29c2a544088b662189d83 Mon Sep 17 00:00:00 2001 From: hachem Date: Sat, 29 Aug 2026 03:56:34 +0200 Subject: add: generate --- internal/cli/cli.go | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'internal/cli/cli.go') diff --git a/internal/cli/cli.go b/internal/cli/cli.go index 6609a7e..fecf64b 100644 --- a/internal/cli/cli.go +++ b/internal/cli/cli.go @@ -32,6 +32,7 @@ type model struct { commands []command busy bool quitting bool + events chan tea.Msg width int } @@ -100,6 +101,17 @@ func (m *model) Update(msg tea.Msg) (tea.Model, tea.Cmd) { m.busy = false return m, tea.Println(msg.text) + case streamMsg: + return m, tea.Sequence(tea.Println(msg.text), waitForEvent(m.events)) + + case streamDoneMsg: + m.busy = false + m.events = nil + if msg.text == "" { + return m, nil + } + return m, tea.Println(msg.text) + case spinner.TickMsg: if !m.busy { return m, nil -- cgit v1.3