summaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
Diffstat (limited to 'main.go')
-rw-r--r--main.go35
1 files changed, 25 insertions, 10 deletions
diff --git a/main.go b/main.go
index 4afcff4..6f91f27 100644
--- a/main.go
+++ b/main.go
@@ -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("")
}