chatpb/chat.proto

66 lines
3.1 KiB
Protocol Buffer

syntax = "proto3";
package chatpb;
import "google/protobuf/timestamp.proto"; // Import the well-known type for Timestamp
message Row { // `autogenpb:nomutex`
repeated string fields = 1;
}
message Table { // `autogenpb:nomutex`
int32 columns = 1;
repeated Row rows = 2;
}
enum Who {
NOONE = 0;
GEMINI = 1;
USER = 2;
}
// NEW: A message to hold all the details of a tool call
message ToolCall { // `autogenpb:nomutex`
string name = 1; // e.g., "Shell"
string input = 2; // The command that was run
string description = 3; // The description for the command
string output_stdout = 4;
string output_stderr = 5;
int32 exit_code = 6;
}
message CodeSnippet { // `autogenpb:nomutex`
string filename = 1;
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;
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;
string ChatName = 9;
repeated ChatEntry Entries = 10;
}
message Chats { // `autogenpb:marshal` `autogenpb:mutex`
string uuid = 1; // `autogenpb:uuid:9fd31f10-c25d-4d66-bc8d-5f6eb7c79057`
string version = 2; // `autogenpb:version:v0.0.1`
repeated Chat Chats = 3; // THIS MUST BE Chat and then Chats
}