diff options
| author | hachem <im@hachem.wtf> | 2026-08-29 03:56:34 +0200 |
|---|---|---|
| committer | hachem <im@hachem.wtf> | 2026-08-29 03:56:34 +0200 |
| commit | 2c22479b452b1fad9bc29c2a544088b662189d83 (patch) | |
| tree | 7aa8395f6b750b0b7bba5fe8eccf66931e55fb3a /internal/cli/cli.go | |
| parent | a221b4c5edd3ff4d4a9d74113d9d3b8c7473133d (diff) | |
add: generate
Diffstat (limited to 'internal/cli/cli.go')
| -rw-r--r-- | internal/cli/cli.go | 12 |
1 files changed, 12 insertions, 0 deletions
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 |
