diff options
| author | Dax Raad <[email protected]> | 2025-05-19 15:43:14 -0400 |
|---|---|---|
| committer | Dax Raad <[email protected]> | 2025-05-26 12:40:17 -0400 |
| commit | 652429377b99085d686d6b907c2f550c304e6b98 (patch) | |
| tree | e4fa0de6b0503885c76bb77e1e0d0e7d56e5117e /cmd | |
| parent | 99af6146d5def31c59993636d60eb75a483a283b (diff) | |
| download | opencode-652429377b99085d686d6b907c2f550c304e6b98.tar.gz opencode-652429377b99085d686d6b907c2f550c304e6b98.zip | |
sync
Diffstat (limited to 'cmd')
| -rw-r--r-- | cmd/root.go | 12 |
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 |
