mirror of
https://github.com/aljazceru/opencode.git
synced 2026-01-06 01:14:52 +01:00
fix: status messages
This commit is contained in:
@@ -7,6 +7,7 @@ import (
|
||||
"github.com/charmbracelet/lipgloss"
|
||||
"github.com/kujtimiihoxha/termai/internal/config"
|
||||
"github.com/kujtimiihoxha/termai/internal/llm/models"
|
||||
"github.com/kujtimiihoxha/termai/internal/pubsub"
|
||||
"github.com/kujtimiihoxha/termai/internal/tui/styles"
|
||||
"github.com/kujtimiihoxha/termai/internal/tui/util"
|
||||
"github.com/kujtimiihoxha/termai/internal/version"
|
||||
@@ -34,6 +35,9 @@ func (m statusCmp) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
|
||||
case tea.WindowSizeMsg:
|
||||
m.width = msg.Width
|
||||
return m, m.clearMessageCmd()
|
||||
case pubsub.Event[util.InfoMsg]:
|
||||
m.info = &msg.Payload
|
||||
return m, m.clearMessageCmd()
|
||||
case util.InfoMsg:
|
||||
m.info = &msg
|
||||
return m, m.clearMessageCmd()
|
||||
@@ -87,6 +91,6 @@ func (m statusCmp) model() string {
|
||||
|
||||
func NewStatusCmp() tea.Model {
|
||||
return &statusCmp{
|
||||
messageTTL: 5 * time.Second,
|
||||
messageTTL: 15 * time.Second,
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user