improve status message handling
This commit is contained in:
parent
57a2210d8d
commit
f463ce6694
10 changed files with 140 additions and 84 deletions
|
|
@ -11,7 +11,9 @@ import (
|
|||
"github.com/kujtimiihoxha/termai/internal/lsp/watcher"
|
||||
"github.com/kujtimiihoxha/termai/internal/message"
|
||||
"github.com/kujtimiihoxha/termai/internal/permission"
|
||||
"github.com/kujtimiihoxha/termai/internal/pubsub"
|
||||
"github.com/kujtimiihoxha/termai/internal/session"
|
||||
"github.com/kujtimiihoxha/termai/internal/tui/util"
|
||||
)
|
||||
|
||||
type App struct {
|
||||
|
|
@ -25,6 +27,7 @@ type App struct {
|
|||
|
||||
Logger logging.Interface
|
||||
|
||||
Status *pubsub.Broker[util.InfoMsg]
|
||||
ceanups []func()
|
||||
}
|
||||
|
||||
|
|
@ -43,6 +46,7 @@ func New(ctx context.Context, conn *sql.DB) *App {
|
|||
Messages: messages,
|
||||
Permissions: permission.Default,
|
||||
Logger: log,
|
||||
Status: pubsub.NewBroker[util.InfoMsg](),
|
||||
LSPClients: make(map[string]*lsp.Client),
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue