summaryrefslogtreecommitdiffhomepage
path: root/cmd
diff options
context:
space:
mode:
authorKujtim Hoxha <[email protected]>2025-04-07 19:43:31 +0200
committerKujtim Hoxha <[email protected]>2025-04-07 19:43:31 +0200
commitf463ce6694143a8f17953ca029d4c274d0193edd (patch)
tree6cb6c416fb07065303862ac461fcbad3311badb7 /cmd
parent57a2210d8d81efe43a41aa09538f4e26b6f6f374 (diff)
downloadopencode-f463ce6694143a8f17953ca029d4c274d0193edd.tar.gz
opencode-f463ce6694143a8f17953ca029d4c274d0193edd.zip
improve status message handling
Diffstat (limited to 'cmd')
-rw-r--r--cmd/root.go10
1 files changed, 10 insertions, 0 deletions
diff --git a/cmd/root.go b/cmd/root.go
index 3ed809328..0c7c145b7 100644
--- a/cmd/root.go
+++ b/cmd/root.go
@@ -107,6 +107,16 @@ func setupSubscriptions(app *app.App) (chan tea.Msg, func()) {
wg.Done()
}()
}
+ {
+ sub := app.Status.Subscribe(ctx)
+ wg.Add(1)
+ go func() {
+ for ev := range sub {
+ ch <- ev
+ }
+ wg.Done()
+ }()
+ }
return ch, func() {
cancel()
wg.Wait()