cleanup app, config and root

This commit is contained in:
Kujtim Hoxha
2025-04-13 13:17:17 +02:00
parent 5601466fe1
commit 3ad983db0f
21 changed files with 517 additions and 284 deletions

View File

@@ -1,6 +1,7 @@
package repl
import (
"context"
"fmt"
"strings"
@@ -57,12 +58,13 @@ var sessionKeyMapValue = sessionsKeyMap{
}
func (i *sessionsCmp) Init() tea.Cmd {
existing, err := i.app.Sessions.List()
existing, err := i.app.Sessions.List(context.Background())
if err != nil {
return util.ReportError(err)
}
if len(existing) == 0 || existing[0].MessageCount > 0 {
newSession, err := i.app.Sessions.Create(
context.Background(),
"New Session",
)
if err != nil {