summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-08-30 16:17:01 -0500
committerJeff Carr <[email protected]>2025-08-30 16:17:01 -0500
commit6888512b3bb422e83d98edcf3e7b18b89f3f504f (patch)
tree5852b0fa5ac10cecb81fd04e96c65a124a896232
parentb750fb9252df98f7f42b8c0e43a0a150958e52f8 (diff)
minor cleanups
-rw-r--r--Makefile2
-rw-r--r--argv.go2
-rw-r--r--doNewChat.go7
-rw-r--r--main.go5
4 files changed, 14 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 091bbd2..cbdcdd3 100644
--- a/Makefile
+++ b/Makefile
@@ -2,7 +2,7 @@ VERSION = $(shell git describe --tags)
BUILDTIME = $(shell date +%Y.%m.%d_%H%M)
default: install
- regex --json /tmp/regex.55128216-e93b-4339-8854-622ca11af890.gemini-api-request.128.json
+ regex --json tmp/regex.55128216-e93b-4339-8854-622ca11af890.gemini-api-request.128.json
vet:
@GO111MODULE=off go vet
diff --git a/argv.go b/argv.go
index 375ca06..314adf4 100644
--- a/argv.go
+++ b/argv.go
@@ -11,9 +11,11 @@ var argv args
type args struct {
Uuid string `arg:"--uuid" help:"look at this uuid"`
+ Topic string `arg:"--topic" help:"set the topic"`
JsonFile string `arg:"--json" help:"import a JSON file from gemini-cli"`
Interact *EmptyCmd `arg:"subcommand:interact" help:"open env EDITOR"`
Playback *PlaybackCmd `arg:"subcommand:playback" help:"dump your prior conversations to the terminal'"`
+ NewChat *PlaybackCmd `arg:"subcommand:newchat" help:"used by gemini-cli on startup"`
Stats string `arg:"--stats" help:"add stats to a chat"`
Force bool `arg:"--force" help:"try to strong arm things"`
Verbose bool `arg:"--verbose" help:"show more output"`
diff --git a/doNewChat.go b/doNewChat.go
index adb0ee3..089b3df 100644
--- a/doNewChat.go
+++ b/doNewChat.go
@@ -7,9 +7,14 @@ import (
)
func doNewChat() {
+ if found := me.chats.FindByUuid(argv.Uuid); found != nil {
+ found.ChatName = argv.Topic
+ me.chats.ConfigSave()
+ return
+ }
chat := &chatpb.Chat{
Uuid: argv.Uuid,
- ChatName: "todo: set this",
+ ChatName: argv.Topic,
Ctime: timestamppb.Now(),
}
diff --git a/main.go b/main.go
index 16c2ea7..273a32f 100644
--- a/main.go
+++ b/main.go
@@ -98,6 +98,11 @@ func main() {
okExit("")
}
+ if argv.NewChat != nil {
+ doNewChat()
+ okExit("")
+ }
+
if argv.Playback != nil {
if argv.Uuid != "" {
showChat(argv.Uuid)