summaryrefslogtreecommitdiff
path: root/addChat.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-09-02 15:18:41 -0500
committerJeff Carr <[email protected]>2025-09-02 15:18:41 -0500
commitaa2483e255d68bfa6e19aae7531d2c28fb2f1253 (patch)
tree924b393008b54d2a65f3cb7b3f558df225b9890a /addChat.go
parentaebfe325d63a947d936c069a8cffd3b2d631aeae (diff)
more changes to make import from gemini-cli work
Diffstat (limited to 'addChat.go')
-rw-r--r--addChat.go17
1 files changed, 8 insertions, 9 deletions
diff --git a/addChat.go b/addChat.go
index f33650f..5ed87d2 100644
--- a/addChat.go
+++ b/addChat.go
@@ -6,6 +6,7 @@ import (
"time"
"go.wit.com/log"
+ timestamppb "google.golang.org/protobuf/types/known/timestamppb"
)
// returns true if the pb was added
@@ -23,14 +24,12 @@ func (c *Chat) AddGeminiRequest(fname string, age time.Time, pb *GeminiRequest)
return false
}
}
- log.Info("not sure if c.Entries == pb for real. need to read Content & Parts")
- /*
- e := new(ChatEntry)
- e.Ctime = timestamppb.New(age)
- e.From = Who_USER
- e.ContentFile = fname
- e.GeminiRequest = pb
- c.AppendEntry(e)
- */
+ log.Info("Adding new ChatEntry for", "/tmp/"+fname)
+ e := new(ChatEntry)
+ e.Ctime = timestamppb.New(age)
+ e.From = Who_USER
+ e.ContentFile = fname
+ e.GeminiRequest = pb
+ c.AppendEntry(e)
return true
}