chore: refactoring status updates

This commit is contained in:
adamdottv 2025-05-08 12:03:59 -05:00
commit f41b7bbd0a
No known key found for this signature in database
GPG key ID: 9CB48779AF150E75
24 changed files with 366 additions and 264 deletions

View file

@ -17,6 +17,7 @@ import (
"github.com/opencode-ai/opencode/internal/config"
"github.com/opencode-ai/opencode/internal/logging"
"github.com/opencode-ai/opencode/internal/lsp/protocol"
"github.com/opencode-ai/opencode/internal/status"
)
type Client struct {
@ -106,7 +107,7 @@ func NewClient(ctx context.Context, command string, args ...string) (*Client, er
// Start message handling loop
go func() {
defer logging.RecoverPanic("LSP-message-handler", func() {
logging.ErrorPersist("LSP message handler crashed, LSP functionality may be impaired")
status.Error("LSP message handler crashed, LSP functionality may be impaired")
})
client.handleMessages()
}()