summaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
Diffstat (limited to 'main.go')
-rw-r--r--main.go25
1 files changed, 7 insertions, 18 deletions
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 {