summaryrefslogtreecommitdiffhomepage
path: root/cmd
diff options
context:
space:
mode:
authorDax Raad <[email protected]>2025-05-19 15:43:14 -0400
committerDax Raad <[email protected]>2025-05-26 12:40:17 -0400
commit652429377b99085d686d6b907c2f550c304e6b98 (patch)
treee4fa0de6b0503885c76bb77e1e0d0e7d56e5117e /cmd
parent99af6146d5def31c59993636d60eb75a483a283b (diff)
downloadopencode-652429377b99085d686d6b907c2f550c304e6b98.tar.gz
opencode-652429377b99085d686d6b907c2f550c304e6b98.zip
sync
Diffstat (limited to 'cmd')
-rw-r--r--cmd/root.go12
1 files changed, 12 insertions, 0 deletions
diff --git a/cmd/root.go b/cmd/root.go
index ab102afe6..81083ef72 100644
--- a/cmd/root.go
+++ b/cmd/root.go
@@ -182,6 +182,18 @@ to assist developers in writing, debugging, and understanding code directly from
}
}()
+ evts, err := app.Client.Event(ctx)
+ if err != nil {
+ slog.Error("Failed to subscribe to events", "error", err)
+ return err
+ }
+
+ go func() {
+ for item := range evts {
+ program.Send(item)
+ }
+ }()
+
// Cleanup function for when the program exits
cleanup := func() {
// Cancel subscriptions first