feat: display ASCII banner on TUI startup
This commit is contained in:
@@ -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."}},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -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) {
|
||||||
|
|||||||
Reference in New Issue
Block a user