- Add bubbletea/lipgloss/glamour dependencies for TUI - Create internal/tui package with EventWriter, styles, and bubbletea Model - Support streaming output display in conversation window - Add right panel with statistics and active agent status - Implement multi-agent collaboration with sub-agents - Add AgentCallTool for delegating tasks to sub-agents - Support parallel tool execution with goroutines - Auto-discover sub-agents from ~/.orca/prompts/ directory - Fix orchestrator routing based on msg.To field - Add non-blocking event writer with timeout to prevent blocking
74 lines
1.6 KiB
Go
74 lines
1.6 KiB
Go
package tui
|
|
|
|
import "github.com/charmbracelet/lipgloss"
|
|
|
|
var (
|
|
colors = struct {
|
|
primary string
|
|
secondary string
|
|
accent string
|
|
success string
|
|
warning string
|
|
danger string
|
|
muted string
|
|
bg string
|
|
border string
|
|
}{
|
|
primary: "#7AA2F7",
|
|
secondary: "#BB9AF7",
|
|
accent: "#7DCFFF",
|
|
success: "#9ECE6A",
|
|
warning: "#E0AF68",
|
|
danger: "#F7768E",
|
|
muted: "#565F89",
|
|
bg: "#1A1B26",
|
|
border: "#414868",
|
|
}
|
|
|
|
baseStyle = lipgloss.NewStyle().
|
|
Background(lipgloss.Color(colors.bg))
|
|
|
|
titleStyle = lipgloss.NewStyle().
|
|
Bold(true).
|
|
Foreground(lipgloss.Color(colors.primary)).
|
|
Padding(0, 1)
|
|
|
|
boxStyle = lipgloss.NewStyle().
|
|
Border(lipgloss.RoundedBorder()).
|
|
BorderForeground(lipgloss.Color(colors.border)).
|
|
Padding(1, 2).
|
|
Background(lipgloss.Color(colors.bg))
|
|
|
|
userStyle = lipgloss.NewStyle().
|
|
Foreground(lipgloss.Color(colors.accent)).
|
|
Bold(true)
|
|
|
|
agentStyle = lipgloss.NewStyle().
|
|
Foreground(lipgloss.Color(colors.success)).
|
|
Bold(true)
|
|
|
|
systemStyle = lipgloss.NewStyle().
|
|
Foreground(lipgloss.Color(colors.warning)).
|
|
Bold(true)
|
|
|
|
mutedStyle = lipgloss.NewStyle().
|
|
Foreground(lipgloss.Color(colors.muted))
|
|
|
|
statValueStyle = lipgloss.NewStyle().
|
|
Bold(true).
|
|
Foreground(lipgloss.Color(colors.primary))
|
|
|
|
statLabelStyle = lipgloss.NewStyle().
|
|
Foreground(lipgloss.Color(colors.muted))
|
|
|
|
activeAgentStyle = lipgloss.NewStyle().
|
|
Foreground(lipgloss.Color(colors.success))
|
|
|
|
idleAgentStyle = lipgloss.NewStyle().
|
|
Foreground(lipgloss.Color(colors.muted))
|
|
|
|
processingStyle = lipgloss.NewStyle().
|
|
Foreground(lipgloss.Color(colors.warning)).
|
|
Bold(true)
|
|
)
|