summaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
authorCastor Gemini <[email protected]>2025-08-22 02:51:47 -0500
committerJeff Carr <[email protected]>2025-08-22 02:51:47 -0500
commitbffc301568d59d137fba657628eee3d19780e296 (patch)
tree66bbbf4cb571cb08f92b22e7b97fc3d37509f558 /main.go
parent3d6f228b6e14d87795edf6bc0a8ec8930f34929f (diff)
refactor(gemini): Adapt app to new protobuf structure
- Update main.go and doPlayback.go to be compatible with the refactored 'Chat -> Entries' protobuf message format. - Remove the now-obsolete format_rich_log.go file. - The application now compiles successfully against the new chatpb library.
Diffstat (limited to 'main.go')
-rw-r--r--main.go16
1 files changed, 8 insertions, 8 deletions
diff --git a/main.go b/main.go
index 8312610..3f1c795 100644
--- a/main.go
+++ b/main.go
@@ -71,10 +71,7 @@ func main() {
}
if argv.Playback != nil {
- log.Info("do playback here")
doPlayback()
- // pb := formatRichLog("log/2025-08-20-final.text")
- // pb.ConfigSave()
okExit("")
}
@@ -90,14 +87,17 @@ func main() {
func verifyUuids(chats *chatpb.Chats) bool {
var changed bool
-
- all := chats.SortByUuid()
- for all.Scan() {
- chat := all.Next()
- if chat.Uuid == "" {
+ for _, chat := range chats.GetChats() {
+ if chat.GetUuid() == "" {
chat.Uuid = uuid.New().String()
changed = true
}
+ for _, entry := range chat.GetEntries() {
+ if entry.GetUuid() == "" {
+ entry.Uuid = uuid.New().String()
+ changed = true
+ }
+ }
}
return changed
}