add scripts

This commit is contained in:
Lobo 2025-10-24 11:59:29 -03:00
parent 3412dd7900
commit 70d95cdcce
4 changed files with 81 additions and 8 deletions

View file

@ -31,6 +31,8 @@ type App struct {
outgoing chan OutgoingEvent
error chan error
scripts []string
vx *vaxis.Vaxis
pager *pager.Model
input *textinput.Model
@ -61,7 +63,6 @@ func (app *App) AppendMessage(data string) {
vaxis.Segment{Text: data, Style: style},
vaxis.Segment{Text: "\n"},
)
app.pager.Offset = math.MaxInt
}
@ -112,6 +113,10 @@ func NewApp() *App {
panic(err)
}
if err := app.RefreshScripts(); err != nil {
panic(err)
}
go func() {
for {
select {