feat: display ASCII banner on TUI startup

This commit is contained in:
Luxferre
2026-03-21 19:21:16 +02:00
parent 5a9c47abea
commit 9695a11cc4
2 changed files with 10 additions and 1 deletions
+7 -1
View File
@@ -39,6 +39,12 @@ var (
userStyle = lipgloss.NewStyle().Foreground(lipgloss.Color("6")).Bold(true) userStyle = lipgloss.NewStyle().Foreground(lipgloss.Color("6")).Bold(true)
agentStyle = lipgloss.NewStyle().Foreground(lipgloss.Color("5")).Bold(true) agentStyle = lipgloss.NewStyle().Foreground(lipgloss.Color("5")).Bold(true)
sysStyle = lipgloss.NewStyle().Foreground(lipgloss.Color("8")).Italic(true) sysStyle = lipgloss.NewStyle().Foreground(lipgloss.Color("8")).Italic(true)
banner = ` _ __ __ _ __
___ (_) ___/ / ___ / /__ (_) ____ / /__
(_-< / / / _ / / -_) / '_/ / / / __/ / '_/
/___//_/ \_,_/ \__/ /_/\_\ /_/ \__/ /_/\_\
----------------------------------------------`
) )
type model struct { type model struct {
@@ -106,7 +112,7 @@ func initialModel() model {
textarea: ta, textarea: ta,
agent: agent, agent: agent,
pool: pool, pool: pool,
history: []sidekick.Message{{Role: sidekick.MessageRoleSystem, Content: "Sidekick initialized. Type a message below."}}, history: []sidekick.Message{{Role: sidekick.MessageRoleSystem, Content: banner + "\n\nSidekick initialized. Type a message below."}},
} }
} }
+3
View File
@@ -27,6 +27,9 @@ func TestInitialModel(t *testing.T) {
if len(m.history) != 1 { if len(m.history) != 1 {
t.Errorf("expected 1 initial message in history, got %d", len(m.history)) t.Errorf("expected 1 initial message in history, got %d", len(m.history))
} }
if !strings.Contains(m.history[0].Content, "Sidekick initialized") {
t.Error("expected initial message content to contain 'Sidekick initialized'")
}
} }
func TestModelUpdate(t *testing.T) { func TestModelUpdate(t *testing.T) {