summaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
Diffstat (limited to 'main.go')
-rw-r--r--main.go27
1 files changed, 2 insertions, 25 deletions
diff --git a/main.go b/main.go
index e5a4ee7..a05c617 100644
--- a/main.go
+++ b/main.go
@@ -31,17 +31,6 @@ var ARGNAME string = "gemini"
// using this for now. triggers config save
var configSave bool
-/*
-func getVersion(repo *gitpb.Repo, name string) string {
- cmd := []string{"git", "describe", "--tags", "--always", name}
- result, _ := repo.RunQuiet(cmd)
- output := strings.Join(result.Stdout, "\n")
- log.Info("cmd =", cmd, output)
-
- return strings.TrimSpace(output)
-}
-*/
-
func main() {
me = new(mainType)
gui.InitArg()
@@ -65,20 +54,8 @@ func main() {
}
if argv.Add != "" {
- log.Info("add new conversation to protobuf", argv.Add)
- pb := parseRichLog(argv.Add)
- verifyUuids(pb)
- all := pb.SortByUuid()
- for all.Scan() {
- chat := all.Next()
- log.Info("NEW CHAT", chat.From, chat.Uuid)
- if test := me.chats.FindByContentFile(chat.ContentFile); test != nil {
- log.Info("NOT NEW CHAT", test.ContentFile)
- continue
- }
- me.chats.AppendByUuid(chat)
- }
- pb.ConfigSave()
+ me.chats.AddFile(argv.Add)
+ me.chats.ConfigSave()
okExit("")
}