- 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
41 lines
836 B
Go
41 lines
836 B
Go
package main
|
|
|
|
import (
|
|
"fmt"
|
|
"log"
|
|
"os"
|
|
|
|
tea "github.com/charmbracelet/bubbletea"
|
|
"github.com/orca/orca/internal/config"
|
|
"github.com/orca/orca/internal/tui"
|
|
"github.com/orca/orca/pkg/kernel"
|
|
)
|
|
|
|
func main() {
|
|
cfg, err := config.LoadConfig()
|
|
if err != nil {
|
|
log.Fatalf("Failed to load config: %v", err)
|
|
}
|
|
|
|
k := kernel.NewWithConfig(cfg)
|
|
if err := k.Start(); err != nil {
|
|
log.Fatalf("Failed to start kernel: %v", err)
|
|
}
|
|
|
|
if err := k.InitPlugins(); err != nil {
|
|
log.Printf("Warning: failed to load skills: %v", err)
|
|
}
|
|
|
|
m := tui.NewModel(k)
|
|
p := tea.NewProgram(m, tea.WithAltScreen(), tea.WithMouseCellMotion())
|
|
|
|
if _, err := p.Run(); err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error running TUI: %v\n", err)
|
|
os.Exit(1)
|
|
}
|
|
|
|
if err := k.Stop(); err != nil {
|
|
log.Printf("Warning: error stopping kernel: %v", err)
|
|
}
|
|
}
|