trying to improve forge

This commit is contained in:
Jeff Carr 2025-08-21 22:27:16 -05:00
parent a10b75d453
commit 44f860caa0
1 changed files with 2 additions and 25 deletions

27
main.go
View File

@ -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("")
}