d41761d6e9
Rewrites oxker from Rust/ratatui to Go/Bubbletea, migrated to the Bubbletea v2 API (charm.land/bubbletea/v2). Removes all original Rust source files and legacy Go modules (internal/ui, internal/input, bubbles). Key changes: - View() returns tea.View with declarative AltScreen and MouseMode - KeyMsg → KeyPressMsg, MouseMsg → MouseClickMsg/WheelMsg/MotionMsg/ReleaseMsg - execWriteKey rewritten for v2 key fields (Code/Mod/Text) - Mouse toggle via View field instead of imperative commands - Filter/search text input uses msg.Text for v2 space key compat Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
41 lines
758 B
Go
41 lines
758 B
Go
package main
|
|
|
|
import (
|
|
"fmt"
|
|
"os"
|
|
|
|
tea "charm.land/bubbletea/v2"
|
|
"github.com/oxker/oxker/internal/app"
|
|
)
|
|
|
|
func main() {
|
|
// Parse command-line arguments
|
|
cliArgs, err := ParseCLIArgs()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error parsing CLI args: %v\n", err)
|
|
os.Exit(1)
|
|
}
|
|
|
|
// Load configuration
|
|
cfg, err := LoadConfig(cliArgs)
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error loading config: %v\n", err)
|
|
os.Exit(1)
|
|
}
|
|
|
|
// Debug mode - no TUI
|
|
if !cfg.GUI {
|
|
ShowDebugInfo(nil)
|
|
return
|
|
}
|
|
|
|
// Create and start the Bubble Tea program
|
|
// AltScreen and MouseMode are now controlled via View() return value
|
|
p := tea.NewProgram(app.New(cfg))
|
|
|
|
if _, err := p.Run(); err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error: %v\n", err)
|
|
os.Exit(1)
|
|
}
|
|
}
|