From f55f7cd6f04041f9ae01a8cda6b7d2fc16da12b6 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Tue, 9 Sep 2025 05:40:44 -0500 Subject: new more better GUI codebase --- main.go | 25 +++++++------------------ 1 file changed, 7 insertions(+), 18 deletions(-) (limited to 'main.go') diff --git a/main.go b/main.go index ea0f24b..e85db7b 100644 --- a/main.go +++ b/main.go @@ -7,11 +7,10 @@ package main import ( "embed" - "os" "github.com/google/uuid" "go.wit.com/dev/alexflint/arg" - "go.wit.com/gui" + "go.wit.com/lib/gui/prep" "go.wit.com/lib/protobuf/chatpb" "go.wit.com/log" ) @@ -32,20 +31,12 @@ var ARGNAME string = "regex" var configSave bool func main() { - var err error me = new(mainType) - gui.InitArg() + prep.Bash(ARGNAME, argv.DoAutoComplete) // this line should be: prep.Bash(argv) + me.myGui = prep.Gui() // prepares the GUI package for go-args me.pp = arg.MustParse(&argv) - if argv.Bash { - argv.doBash() - os.Exit(0) - } - if len(argv.BashAuto) != 0 { - argv.doBashAuto() - os.Exit(0) - } - + var err error // load the default chat protobuf me.chats = chatpb.NewChats() if err := me.chats.ConfigLoad(); err != nil { @@ -109,11 +100,9 @@ func main() { okExit("") } - doGui() - - // by default, start interacting with gemini-cli - // me.pp.WriteHelp(os.Stdout) - okExit("") + me.myGui.Start() // loads the GUI toolkit + doGui() // start making our forge GUI + debug() // sits here forever } func verifyUuids(chats *chatpb.Chats) bool { -- cgit v1.2.3