diff options
| author | Jeff Carr <[email protected]> | 2025-08-30 14:42:57 -0500 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2025-08-30 14:42:57 -0500 |
| commit | 7f8f5e3b9b37fccbb357b70e6490823a8b22ae7e (patch) | |
| tree | 11b6f74e8d3f33b3fdb82421cb79653f65685fe8 /main.go | |
| parent | c971bfddf74d48d87f10f5f050b1eef3fd12bf20 (diff) | |
basic JSON parsing into genai struc
Diffstat (limited to 'main.go')
| -rw-r--r-- | main.go | 35 |
1 files changed, 25 insertions, 10 deletions
@@ -32,6 +32,8 @@ var ARGNAME string = "regex" var configSave bool func main() { + // f, _ := os.OpenFile("/tmp/regex.secret.log", os.O_APPEND|os.O_CREATE|os.O_WRONLY, 0644) + // log.CaptureMode(f) me = new(mainType) gui.InitArg() me.pp = arg.MustParse(&argv) @@ -58,6 +60,14 @@ func main() { okExit("") } + if argv.Connect != nil { + err := doConnect() + if err != nil { + badExit(err) + } + okExit("") + } + if argv.Editor != nil { doEditor() okExit("") @@ -105,24 +115,29 @@ func main() { } if argv.Playback != nil { - if argv.Playback.Uuid != "" { - showChat(argv.Playback.Uuid) + if argv.Uuid != "" { + showChat(argv.Uuid) } else { doPlayback() } okExit("") } - // if opening the GUI, always check git for dirty repos - log.Info("look for 'auto' here") - // Find the "auto" chat. - for _, chat := range me.chats.GetChats() { - if chat.GetChatName() == "auto" { - prettyFormatChat(chat) - okExit("") + /* + // if opening the GUI, always check git for dirty repos + log.Info("look for 'auto' here") + // Find the "auto" chat. + for _, chat := range me.chats.GetChats() { + if chat.GetChatName() == "auto" { + prettyFormatChat(chat) + okExit("") + } } - } + */ // doGui() + + // by default, start interacting with gemini-cli + doEditor() okExit("") } |
