Documentation
¶
Index ¶
- Variables
- func BrandLines() []string
- func ErrorStr(text string) string
- func FormatServiceStatus(s ServiceStatus) string
- func FormatTestResult(r TestResult) string
- func GPUSummary() string
- func Info(text string) string
- func LogoLines() []string
- func PrintBrand(subtitle string)
- func PrintError(text string)
- func PrintFullBanner(subtitle string)
- func PrintInfo(text string)
- func PrintSuccess(text string)
- func PrintWarning(text string)
- func RenderBanner(variant BannerVariant, subtitle string, termWidth int) string
- func RenderBrand() string
- func RenderFullBanner(subtitle string) string
- func RenderLogo() string
- func RenderNewLogo() string
- func RenderSeparator() string
- func RenderSmallBanner(subtitle string) string
- func RenderStepGroup(steps []*InstallStep, s spinner.Model, termWidth int) string
- func RenderStepList(steps []*InstallStep, s spinner.Model) string
- func RenderSummary(steps []*InstallStep) string
- func RenderWelcome(subtitle string) string
- func RunConfirm(question string) (bool, error)
- func RunInstall(steps []InstallStep) error
- func RunMainMenu() string
- func RunModelsFlow() map[string]string
- func RunSelect(title, subtitle string, options []SelectOption) string
- func SetupHelixAutostart() string
- func SetupOllamaAutostart() string
- func Success(text string) string
- func Warning(text string) string
- type BannerVariant
- type ConfirmModel
- type ConfirmResult
- type InstalStepMsg
- type InstallModel
- type InstallStep
- type MenuItem
- type MenuModel
- type SelectModel
- type SelectOption
- type ServiceStatus
- type StepState
- type TestResult
Constants ¶
This section is empty.
Variables ¶
var ChatOptions = []SelectOption{
{
Key: "llama3.2:3b",
Label: "llama3.2:3b",
Detail: "~2.0 GB · 3B params",
Description: "Recomendado — Meta Llama 3.2, balance velocidad/calidad",
},
{
Key: "phi4-mini:3.8b",
Label: "phi4-mini:3.8b",
Detail: "~2.5 GB · 3.8B params",
Description: "Microsoft Phi-4 Mini, excelente para JSON y structured output",
},
{
Key: "qwen3.5:0.5b",
Label: "qwen3.5:0.5b",
Detail: "~0.4 GB · 0.5B params",
Description: "Ultraligero, funciona en cualquier parte",
},
{
Key: "gemma3:2b",
Label: "gemma3:2b",
Detail: "~1.5 GB · 2B params",
Description: "Google Gemma 3, buena relación calidad/tamaño",
},
{
Key: "mistral:7b",
Label: "mistral:7b",
Detail: "~4.1 GB · 7B params",
Description: "Más preciso pero pesado — requiere GPU o mucha RAM",
},
}
var EmbeddingOptions = []SelectOption{
{
Key: "mxbai-embed-large:latest",
Label: "mxbai-embed-large",
Detail: "1024 dims · ~0.5B",
Description: "Recomendado — balance calidad/rendimiento",
},
{
Key: "nomic-embed-text:latest",
Label: "nomic-embed-text",
Detail: "768 dims · ~0.1B",
Description: "Más rápido en CPU, bueno para equipos modestos",
},
{
Key: "all-minilm:latest",
Label: "all-minilm",
Detail: "384 dims · ~0.02B",
Description: "Ultraligero, ideal para CPU o Raspberry Pi",
},
}
Functions ¶
func BrandLines ¶
func BrandLines() []string
BrandLines retorna las líneas del brand (para bubbletea).
func FormatServiceStatus ¶
func FormatServiceStatus(s ServiceStatus) string
FormatServiceStatus returns a colored string for service status.
func FormatTestResult ¶
func FormatTestResult(r TestResult) string
FormatTestResult returns a colored string for a test result.
func GPUSummary ¶
func GPUSummary() string
GPUSummary returns a formatted string with GPU detection results.
func PrintBrand ¶
func PrintBrand(subtitle string)
PrintBrand imprime brand centrado sin borde en stdout.
func PrintFullBanner ¶
func PrintFullBanner(subtitle string)
PrintFullBanner imprime brand sin Zorro ni borde en stdout (compatibilidad).
func RenderBanner ¶
func RenderBanner(variant BannerVariant, subtitle string, termWidth int) string
RenderBanner renders the appropriate banner for the given variant and width. NO usa bordes alrededor del ASCII art. Centra usando el ancho real de terminal.
func RenderBrand ¶
func RenderBrand() string
RenderBrand renderiza el logo ZYRO 3D centrado con estilo naranja (sin borde).
func RenderFullBanner ¶
RenderFullBanner es idéntico a RenderWelcome (sin Zorro, sin borde). Se mantiene para compatibilidad pero se recomienda usar RenderWelcome.
func RenderLogo ¶
func RenderLogo() string
RenderLogo renderiza el Zorro Hacker centrado con estilo verde. Solo se usa para el tema de OpenCode, NO en el CLI install.
func RenderSeparator ¶
func RenderSeparator() string
RenderSeparator dibuja una línea horizontal sutil (ej: ─────────────).
func RenderSmallBanner ¶
RenderSmallBanner renders a minimal text-only banner for narrow terminals (sin borde).
func RenderStepGroup ¶
func RenderStepGroup(steps []*InstallStep, s spinner.Model, termWidth int) string
RenderStepGroup renderiza la lista de pasos dentro de un contenedor con borde redondeado.
func RenderStepList ¶
func RenderStepList(steps []*InstallStep, s spinner.Model) string
RenderStepList renders the list of steps with their current states. Opcionalmente se puede envolver en un borde con stepGroupStyle.
func RenderSummary ¶
func RenderSummary(steps []*InstallStep) string
RenderSummary renders a summary table of all completed steps.
func RenderWelcome ¶
RenderWelcome renderiza brand + subtítulo centrados, SIN borde. Es el banner principal para el flujo de instalación.
func RunConfirm ¶
RunConfirm displays an interactive Yes/No prompt and returns the choice. It blocks until the user makes a selection.
func RunInstall ¶
func RunInstall(steps []InstallStep) error
RunInstall executes the installation TUI and returns any fatal error.
func RunMainMenu ¶
func RunMainMenu() string
RunMainMenu displays the main menu and returns the selected option key. Returns "exit" if the user cancels.
func RunModelsFlow ¶
RunModelsFlow ejecuta el flujo completo de configuración de modelos. Retorna la config seleccionada o nil si cancela.
func RunSelect ¶
func RunSelect(title, subtitle string, options []SelectOption) string
RunSelect displays a selection list and returns the selected key. Returns empty string if cancelled.
func SetupHelixAutostart ¶
func SetupHelixAutostart() string
SetupHelixAutostart configura HelixDB para inicio automático con systemd --user.
func SetupOllamaAutostart ¶
func SetupOllamaAutostart() string
SetupOllamaAutostart configura Ollama para inicio automático.
Types ¶
type BannerVariant ¶
type BannerVariant int
BannerVariant determines which banner to render based on terminal width.
const ( // BannerMedium shows ZYRO 3D centered (≥60 cols). BannerMedium BannerVariant = iota // BannerSmall shows simple text (<60 cols). BannerSmall )
func ResolveBanner ¶
func ResolveBanner(width int) BannerVariant
ResolveBanner determines the banner variant based on terminal width.
type ConfirmModel ¶
type ConfirmModel struct {
// contains filtered or unexported fields
}
ConfirmModel is a bubbletea model for interactive Yes/No prompts. The user navigates with ↑↓ arrows and confirms with Enter.
func NewConfirmModel ¶
func NewConfirmModel(question string) ConfirmModel
NewConfirmModel creates a new confirm model.
func (ConfirmModel) Init ¶
func (m ConfirmModel) Init() tea.Cmd
func (ConfirmModel) Update ¶
func (m ConfirmModel) Update(msg tea.Msg) (tea.Model, tea.Cmd)
func (ConfirmModel) View ¶
func (m ConfirmModel) View() string
type ConfirmResult ¶
type ConfirmResult int
ConfirmResult represents the user's choice.
const ( // ConfirmYes means the user selected "Sí". ConfirmYes ConfirmResult = iota // ConfirmNo means the user selected "No". ConfirmNo )
type InstalStepMsg ¶
type InstalStepMsg struct {
// Index is the step index in the steps slice.
Index int
// Err is nil on success, or the error returned by Action.
Err error
}
InstalStepMsg is sent when a step completes execution.
type InstallModel ¶
type InstallModel struct {
// contains filtered or unexported fields
}
InstallModel is the main bubbletea model for the multi-step installer.
func NewInstallModel ¶
func NewInstallModel(steps []InstallStep) InstallModel
NewInstallModel creates a new InstallModel with the given steps.
func (InstallModel) Init ¶
func (m InstallModel) Init() tea.Cmd
Init starts the first step and the spinner.
func (InstallModel) Update ¶
func (m InstallModel) Update(msg tea.Msg) (tea.Model, tea.Cmd)
Update handles messages and updates the model.
func (InstallModel) View ¶
func (m InstallModel) View() string
View renders the current state of the installer.
type InstallStep ¶
type InstallStep struct {
// Name is the descriptive title (e.g. "Extracting MCP tools").
Name string
// Action is the function that performs the actual work.
// It runs in a goroutine. Returns error on failure.
Action func() error
// contains filtered or unexported fields
}
InstallStep defines a single step in the installation process.
type MenuModel ¶
type MenuModel struct {
// contains filtered or unexported fields
}
MenuModel is the main menu Bubbletea model.
func NewMainMenu ¶
func NewMainMenu() MenuModel
NewMainMenu creates the main menu with default options.
type SelectModel ¶
type SelectModel struct {
// contains filtered or unexported fields
}
SelectModel is a generic list selector for choosing from options.
func NewSelectModel ¶
func NewSelectModel(title, subtitle string, options []SelectOption) SelectModel
NewSelectModel creates a new selection list.
func (SelectModel) Init ¶
func (m SelectModel) Init() tea.Cmd
func (SelectModel) View ¶
func (m SelectModel) View() string
type SelectOption ¶
type SelectOption struct {
Key string
Label string
Description string
Detail string // right-aligned detail (e.g. "1024 dims", "2.0 GB")
}
SelectOption represents an option in a selection list.
type ServiceStatus ¶
ServiceStatus represents the status of a service.
func CheckHelixDB ¶
func CheckHelixDB() ServiceStatus
CheckHelixDB verifica que HelixDB esté corriendo.
type TestResult ¶
TestResult holds the result of a model test.
func TestChat ¶
func TestChat(model string, timeout int) TestResult
TestChat prueba el modelo chat contra Ollama.
func TestEmbedding ¶
func TestEmbedding(model string, timeout int) TestResult
TestEmbedding prueba el modelo de embeddings contra Ollama.