diff options
| -rw-r--r-- | argv.go | 16 | ||||
| -rw-r--r-- | main.go | 6 | ||||
| -rw-r--r-- | structs.go | 6 |
3 files changed, 15 insertions, 13 deletions
@@ -6,7 +6,7 @@ package main import ( "os" - "go.wit.com/lib/gui/prep" + "go.wit.com/lib/protobuf/argvpb" ) /* @@ -45,10 +45,6 @@ type PlaybackCmd struct { Submit *EmptyCmd `arg:"subcommand:submit" help:"convert and submit the last entry"` } -func (args) Version() string { - return ARGNAME + " " + VERSION + " Built on " + BUILDTIME -} - func (a args) Description() string { return ` regex -- interact with Googles' Gemini AI @@ -67,9 +63,15 @@ func (args) Buildtime() (string, string) { return BUILDTIME, VERSION } -func (a args) DoAutoComplete(pb *prep.Auto) { +func (args) Version() string { + return argvpb.StandardVersion(ARGNAME, VERSION, BUILDTIME) +} + +// sends the strings to bash or zsh that will be your options +func (a args) SendCompletionStrings(pb *argvpb.Argv) { if pb.Cmd == "" { - pb.Autocomplete3([]string{"--bash", "interact", "playback", "clean", "--version"}) + base := []string{"--bash", "interact", "playback", "clean", "--version"} + pb.SendStrings(base) } else { pb.SubCommand(pb.Goargs...) } @@ -9,7 +9,7 @@ import ( "embed" "github.com/google/uuid" - "go.wit.com/lib/gui/prep" + "go.wit.com/lib/protobuf/argvpb" "go.wit.com/lib/protobuf/chatpb" "go.wit.com/log" ) @@ -31,8 +31,8 @@ var configSave bool func main() { me = new(mainType) - me.myGui = prep.Gui() // prepares the GUI package for go-args - me.auto = prep.Bash3(&argv) // add support for bash autocomplete with go-arg + // me.myGui = prep.Gui() // prepares the GUI package for go-args + me.argv = argvpb.Autocomplete(&argv) // adds shell auto complete to go-args var err error // load the default chat protobuf @@ -7,7 +7,7 @@ import ( "context" "go.wit.com/lib/gadgets" - "go.wit.com/lib/gui/prep" + "go.wit.com/lib/protobuf/argvpb" "go.wit.com/lib/protobuf/chatpb" "google.golang.org/genai" ) @@ -16,11 +16,11 @@ var me *mainType // this app's variables type mainType struct { - auto *prep.Auto // more experiments for bash handling + argv *argvpb.Argv // shell autocomplete chats *chatpb.Chats // all our prior conversations with regex client *genai.Client // the Google Gemini AI client variable ctx context.Context // global context. what does this acutally mean? lastChat *chatpb.Chat // the last chat. append to here - myGui *prep.GuiPrep // the gui toolkit handle + myGui *argvpb.GuiPrep // the gui toolkit handle mainWindow *gadgets.GenericWindow // the main GUI window } |
