summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-08-22 01:58:26 -0500
committerJeff Carr <[email protected]>2025-08-22 01:58:26 -0500
commit80090152a19af0e93fefe738b0bbebc912010e29 (patch)
treef12279af6941a6f0e3c13c28986605f581ce0068
parent4fd6fd81d352cdec499616485879b1ac48b6f198 (diff)
make chat entries
-rw-r--r--chat.proto13
-rw-r--r--config.go2
2 files changed, 14 insertions, 1 deletions
diff --git a/chat.proto b/chat.proto
index 4f50fbb..19b42e1 100644
--- a/chat.proto
+++ b/chat.proto
@@ -34,6 +34,17 @@ message CodeSnippet { // `autogenpb:nomute
string content = 2;
}
+message ChatEntry { // `autogenpb:nomutex`
+ Who from = 1;
+ google.protobuf.Timestamp ctime = 2;
+ string content = 3;
+ Table table = 4;
+ repeated ToolCall ToolCalls = 5;
+ string ContentFile = 6; // `autogenpb:unique` `autogenpb:sort`
+ string uuid = 7; // `autogenpb:unique` `autogenpb:sort`
+ repeated CodeSnippet Snippets = 8;
+}
+
message Chat { // `autogenpb:nomutex`
Who from = 1;
google.protobuf.Timestamp ctime = 2;
@@ -43,6 +54,8 @@ message Chat { // `autogenpb:nomute
string ContentFile = 6; // `autogenpb:unique` `autogenpb:sort`
string uuid = 7; // `autogenpb:unique` `autogenpb:sort`
repeated CodeSnippet Snippets = 8;
+ string ChatName = 9;
+ repeated ChatEntry Entries = 10;
}
message Chats { // `autogenpb:marshal` `autogenpb:mutex`
diff --git a/config.go b/config.go
index 6a2b096..a7c79fe 100644
--- a/config.go
+++ b/config.go
@@ -56,7 +56,7 @@ func (all *Chats) ConfigSave() error {
}
return err
}
- if err := configWrite("gemini.pb", data); err != nil {
+ if err := configWrite("gemini.pb", data); err != nil {
log.Infof("chatpb.ConfigSave() failed len(Chats)=%d bytes=%d", len(cleanChats.Chats), len(data))
return err
}