0412Xu commited on
Commit
54f7012
·
verified ·
1 Parent(s): b414530

Upload 2 files

Browse files
Files changed (2) hide show
  1. src/proto/message.js +0 -0
  2. src/proto/message.proto +122 -33
src/proto/message.js CHANGED
The diff for this file is too large to render. See raw diff
 
src/proto/message.proto CHANGED
@@ -1,44 +1,133 @@
1
  syntax = "proto3";
2
 
3
- message ChatMessage {
4
- message UserMessage {
5
- string content = 1;
6
- int32 role = 2;
7
- string messageId = 13;
8
- }
9
-
10
- message Instructions {
11
- string instruction = 1;
12
- }
13
-
14
- message Model {
15
  string name = 1;
16
- bytes empty = 4;
 
 
17
  }
 
 
 
18
 
19
- repeated UserMessage userMessages = 2;
20
- Instructions instructions = 4;
21
- Model model = 7;
22
- int32 unknown13 = 13;
23
- string conversationId = 15;
24
- int32 unknown16 = 16;
25
- int32 unknown29 = 29;
26
- int32 unknown31 = 31;
27
  }
28
 
29
- message ResMessage {
30
  string content = 1;
31
- bytes empty = 4;
32
- string prompt = 5;
33
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
34
 
35
- message AvailableModelsResponse {
36
- message AvailableModel {
37
- string name = 1;
38
- bool default_on = 2;
39
- optional bool is_long_context_only = 3;
40
- optional bool is_chat_only = 4;
41
- }
42
- repeated AvailableModel models = 2;
43
- repeated string model_names = 1;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
44
  }
 
1
  syntax = "proto3";
2
 
3
+ message AvailableModelsResponse {
4
+ message AvailableModel {
 
 
 
 
 
 
 
 
 
 
5
  string name = 1;
6
+ bool defaultOn = 2;
7
+ optional bool isLongContextOnly = 3;
8
+ optional bool isChatOnly = 4;
9
  }
10
+ repeated AvailableModel models = 2;
11
+ repeated string modelNames = 1;
12
+ }
13
 
14
+ message MessageSummary {
15
+ string content = 1;
16
+ string summaryId1 = 2;
17
+ string summaryId2 = 3; // uuid, equal to summaryId1
18
+ string previousSummaryId = 4;
 
 
 
19
  }
20
 
21
+ message MessageThinking {
22
  string content = 1;
 
 
23
  }
24
+ message StreamUnifiedChatWithToolsRequest {
25
+ message Request {
26
+ message Message {
27
+ message Image {
28
+ message Metadata {
29
+ int32 width = 1;
30
+ int32 height = 2;
31
+ }
32
+ bytes data = 1;
33
+ Metadata metadata = 2;
34
+ }
35
+ string content = 1;
36
+ int32 role = 2;
37
+ Image image = 10;
38
+ string messageId = 13;
39
+ string unknown29 = 29; // 1, only for user message
40
+ string summaryId = 32;
41
+ MessageSummary summary = 39;
42
+ MessageThinking thinking = 45;
43
+ int32 chatModeEnum = 47; // 1 for ask, 2 for agent, 3 for edit
44
+ }
45
+ message Instruction {
46
+ string instruction = 1;
47
+ }
48
+ message Model {
49
+ string name = 1;
50
+ bytes empty = 4;
51
+ }
52
+ message CursorSetting {
53
+ message Unknown6 {
54
+ bytes unknown1 = 1;
55
+ bytes unknown2 = 2;
56
+ }
57
+ string name = 1;
58
+ bytes unknown3 = 3;
59
+ Unknown6 unknown6 = 6;
60
+ int32 unknown8 = 8;
61
+ int32 unknown9 = 9;
62
+ }
63
+ message Metadata {
64
+ string os = 1; // win32
65
+ string arch = 2; // x64
66
+ string version = 3; // 10.0.22631
67
+ string path = 4; // C:\Program Files\PowerShell\7\pwsh.exe
68
+ string timestamp = 5; // 2025-03-03T13:10:08.590Z
69
+ }
70
+ message MessageId {
71
+ string messageId = 1;
72
+ string summaryId = 2;
73
+ int32 role = 3;
74
+ }
75
 
76
+ repeated Message messages = 1;
77
+ int32 unknown2 = 2; // 1
78
+ Instruction instruction = 3;
79
+ int32 unknown4 = 4; // 1
80
+ Model model = 5;
81
+ repeated string wikiTool = 7; // one url one item
82
+ string webTool = 8; // "full search"
83
+ int32 unknown13 = 13;
84
+ CursorSetting cursorSetting = 15;
85
+ int32 unknown19 = 19; // 1
86
+ int32 unknown22 = 22; // 1
87
+ string conversationId = 23; // uuid
88
+ Metadata metadata = 26;
89
+ int32 unknown27 = 27; // 1
90
+ string unknown29 = 29;
91
+ repeated MessageId messageIds = 30;
92
+ int32 largeContext = 35; // 1
93
+ int32 unknown38 = 38; // 0
94
+ int32 chatModeEnum = 46; // 1 for ask, 2 for agent, 3 for edit
95
+ string unknown47 = 47;
96
+ int32 unknown48 = 48; // 0
97
+ int32 unknown49 = 49; // 0
98
+ int32 unknown51 = 51; // 0
99
+ int32 unknown53 = 53; // 0
100
+ string chatMode = 54;
101
+ }
102
+
103
+ Request request = 1;
104
+ }
105
+
106
+ message StreamUnifiedChatWithToolsResponse {
107
+ message Message {
108
+ message WebTool {
109
+ message WebPage {
110
+ string url = 1;
111
+ string title = 2;
112
+ string content = 3;
113
+ }
114
+ repeated WebPage webPage = 1;
115
+ }
116
+ message Unknown12 {
117
+ message Content {
118
+ string content = 1;
119
+ }
120
+ Content content = 1;
121
+ }
122
+ string content = 1;
123
+ WebTool webtool = 11;
124
+ Unknown12 unknown12 = 12;
125
+ string unknown22 = 22; // uuid
126
+ string unknown23 = 23;
127
+ string unknown27 = 27; // uuid
128
+ MessageThinking thinking = 25;
129
+ }
130
+
131
+ Message message = 2;
132
+ MessageSummary summary = 3;
133
  }