From 51839a8f623c08df11ff5dae022ac318da754193 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Fri, 17 Oct 2025 16:29:40 -0500 Subject: renamed library --- argv.go | 16 +++++++++------- main.go | 6 +++--- structs.go | 6 +++--- 3 files changed, 15 insertions(+), 13 deletions(-) diff --git a/argv.go b/argv.go index 71d8946..c8fdbaf 100644 --- a/argv.go +++ b/argv.go @@ -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...) } diff --git a/main.go b/main.go index 42ec96f..20f0d4a 100644 --- a/main.go +++ b/main.go @@ -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 diff --git a/structs.go b/structs.go index 21a527c..da20513 100644 --- a/structs.go +++ b/structs.go @@ -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 } -- cgit v1.2.3