mirror of
https://github.com/aljazceru/opencode.git
synced 2025-12-22 18:24:21 +01:00
wip: refactoring
This commit is contained in:
@@ -65,13 +65,13 @@ func (m statusCmp) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
|
||||
case chat.SessionClearedMsg:
|
||||
m.session = session.Session{}
|
||||
case pubsub.Event[session.Session]:
|
||||
if msg.Type == pubsub.UpdatedEvent {
|
||||
if msg.Type == session.EventSessionUpdated {
|
||||
if m.session.ID == msg.Payload.ID {
|
||||
m.session = msg.Payload
|
||||
}
|
||||
}
|
||||
case pubsub.Event[status.StatusMessage]:
|
||||
if msg.Type == pubsub.CreatedEvent {
|
||||
if msg.Type == status.EventStatusPublished {
|
||||
statusMsg := statusMessage{
|
||||
Level: msg.Payload.Level,
|
||||
Message: msg.Payload.Message,
|
||||
@@ -308,4 +308,3 @@ func NewStatusCmp(lspClients map[string]*lsp.Client) StatusCmp {
|
||||
|
||||
return statusComponent
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user