@workflow-code/cli 0.2.4-20261012002.codex-cli-web → 0.2.4-20261012004.codex-studio-integration
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-PGM3IPWA.js → chunk-SGVXPYCT.js} +1 -0
- package/dist/index.js +3 -3
- package/dist/{mcp-LQ2IV6VA.js → mcp-UQTMW3LK.js} +1 -1
- package/dist/web/kanban-workspace.js +13209 -300
- package/dist/web/worker.mjs +2 -1
- package/dist/web/workflow-ui.js +13300 -390
- package/dist/web/workflow-workspace.js +13351 -441
- package/dist/{web-Z66GHLM3.js → web-OMVO2EGT.js} +360 -33
- package/dist/{workspace-V3UXVFK6.js → workspace-OKFR57T6.js} +1 -1
- package/package.json +4 -4
|
@@ -24,9 +24,10 @@ import "./chunk-J2JMC4MZ.js";
|
|
|
24
24
|
import "./chunk-MNY562W5.js";
|
|
25
25
|
import {
|
|
26
26
|
clearCliAuthConfig,
|
|
27
|
+
createEmptyWorkflowAuthConfig,
|
|
27
28
|
readCliAuthConfig,
|
|
28
29
|
writeCliAuthConfig
|
|
29
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-SGVXPYCT.js";
|
|
30
31
|
import {
|
|
31
32
|
isWorkflowProjectDataStorageLocationAllowed,
|
|
32
33
|
readWorkflowProjectInfo,
|
|
@@ -34,7 +35,9 @@ import {
|
|
|
34
35
|
} from "./chunk-P6K3NB5S.js";
|
|
35
36
|
import {
|
|
36
37
|
getCurrentLocale,
|
|
37
|
-
i18n
|
|
38
|
+
i18n,
|
|
39
|
+
initI18n,
|
|
40
|
+
normalizeLocale
|
|
38
41
|
} from "./chunk-7WEXRL5A.js";
|
|
39
42
|
import "./chunk-NSPRIPOP.js";
|
|
40
43
|
|
|
@@ -42,6 +45,320 @@ import "./chunk-NSPRIPOP.js";
|
|
|
42
45
|
import { spawn as spawn3 } from "child_process";
|
|
43
46
|
import path8 from "path";
|
|
44
47
|
|
|
48
|
+
// src/web/messages.zh-cn.json
|
|
49
|
+
var messages_zh_cn_default = {
|
|
50
|
+
" and others": "\u7B49",
|
|
51
|
+
", ": "\u3001",
|
|
52
|
+
"{0}": "\u5DF2{0}",
|
|
53
|
+
"{0} \xB7 {1}/{2} items": "{0} \xB7 {1}/{2} \u9879",
|
|
54
|
+
"{0} days": "{0} \u5929",
|
|
55
|
+
"{0} failed": "{0}\u5931\u8D25",
|
|
56
|
+
"{0} hours": "{0} \u5C0F\u65F6",
|
|
57
|
+
"{0} min": "{0} \u5206",
|
|
58
|
+
"{0} must be a valid boolean.": "{0} \u9700\u8981\u662F\u6709\u6548\u5E03\u5C14\u503C\u3002",
|
|
59
|
+
"{0} must be a valid number.": "{0} \u9700\u8981\u662F\u6709\u6548\u6570\u5B57\u3002",
|
|
60
|
+
"{0} must be valid JSON.": "{0} \u9700\u8981\u662F\u6709\u6548\u7684 JSON\u3002",
|
|
61
|
+
"{0} selected": "\u5DF2\u9009 {0} \u9879",
|
|
62
|
+
"{0} tools": "{0} \u4E2A\u5DE5\u5177",
|
|
63
|
+
"{0}...": "\u6B63\u5728{0}",
|
|
64
|
+
"{0}{1} \xB7 {2} items": "\u5DF2{0}{1} \xB7 {2} \u9879",
|
|
65
|
+
"{1} in {0}": "{0} \u4E2D {1}",
|
|
66
|
+
"Account balance ${0}": "\u8D26\u6237\u4F59\u989D ${0}",
|
|
67
|
+
"Add attachment": "\u6DFB\u52A0\u9644\u4EF6",
|
|
68
|
+
"Agent run": "Agent \u8FD0\u884C",
|
|
69
|
+
"All chats": "\u5168\u90E8\u804A\u5929",
|
|
70
|
+
"All conversations": "\u5168\u90E8\u5BF9\u8BDD",
|
|
71
|
+
Apply: "\u5E94\u7528",
|
|
72
|
+
"Apply changes": "\u5E94\u7528\u4FEE\u6539",
|
|
73
|
+
"Approve execution": "\u6279\u51C6\u6267\u884C",
|
|
74
|
+
Ask: "\u63D0\u95EE",
|
|
75
|
+
Attachment: "\u9644\u4EF6",
|
|
76
|
+
"Auto-approve": "\u81EA\u52A8\u6279\u51C6",
|
|
77
|
+
"Awaiting confirmation": "\u7B49\u5F85\u786E\u8BA4",
|
|
78
|
+
"Awaiting confirmation: {0}": "\u7B49\u5F85\u786E\u8BA4{0}",
|
|
79
|
+
"Back to {0}": "\u8FD4\u56DE {0}",
|
|
80
|
+
Branch: "\u5206\u652F",
|
|
81
|
+
"Browser sign-in": "\u6D4F\u89C8\u5668\u767B\u5F55",
|
|
82
|
+
"Call tool": "\u8C03\u7528\u5DE5\u5177",
|
|
83
|
+
Cancel: "\u53D6\u6D88",
|
|
84
|
+
"Cancel editing": "\u53D6\u6D88\u7F16\u8F91",
|
|
85
|
+
Card: "\u5361\u7247",
|
|
86
|
+
Chat: "\u804A\u5929",
|
|
87
|
+
"Choose files": "\u9009\u62E9\u6587\u4EF6",
|
|
88
|
+
Close: "\u5173\u95ED",
|
|
89
|
+
"Close account": "\u5173\u95ED\u8D26\u53F7",
|
|
90
|
+
"Close conversation history": "\u5173\u95ED\u5BF9\u8BDD\u5386\u53F2",
|
|
91
|
+
"Close parameters": "\u5173\u95ED\u53C2\u6570",
|
|
92
|
+
"Close search": "\u5173\u95ED\u641C\u7D22",
|
|
93
|
+
Code: "\u4EE3\u7801",
|
|
94
|
+
Command: "\u547D\u4EE4",
|
|
95
|
+
"Compact context": "\u538B\u7F29\u4E0A\u4E0B\u6587",
|
|
96
|
+
Complete: "\u5B8C\u6210",
|
|
97
|
+
Completed: "\u5DF2\u5B8C\u6210",
|
|
98
|
+
"Configuration {0}": "\u914D\u7F6E {0}",
|
|
99
|
+
"Configuration actions": "\u914D\u7F6E\u64CD\u4F5C",
|
|
100
|
+
"Configuration name": "\u914D\u7F6E\u540D\u79F0",
|
|
101
|
+
"Connecting to project": "\u6B63\u5728\u8FDE\u63A5\u9879\u76EE",
|
|
102
|
+
"Connection changed.": "\u8FDE\u63A5\u5DF2\u53D8\u66F4\u3002",
|
|
103
|
+
"Connection interrupted": "\u8FDE\u63A5\u5DF2\u4E2D\u65AD",
|
|
104
|
+
"Connection interrupted.": "\u8FDE\u63A5\u5DF2\u4E2D\u65AD\u3002",
|
|
105
|
+
"Connection not verified": "\u8FDE\u63A5\u672A\u9A8C\u8BC1",
|
|
106
|
+
Conversation: "\u5BF9\u8BDD",
|
|
107
|
+
"Conversation actions": "\u5BF9\u8BDD\u64CD\u4F5C",
|
|
108
|
+
"Conversation history": "\u5BF9\u8BDD\u5386\u53F2",
|
|
109
|
+
"Conversation messages": "\u5BF9\u8BDD\u6D88\u606F",
|
|
110
|
+
"Conversation name": "\u5BF9\u8BDD\u540D\u79F0",
|
|
111
|
+
Conversations: "\u5BF9\u8BDD\u5217\u8868",
|
|
112
|
+
Copied: "\u5DF2\u590D\u5236",
|
|
113
|
+
Copy: "\u590D\u5236",
|
|
114
|
+
"Copy {0}": "\u590D\u5236{0}",
|
|
115
|
+
"Copy code": "\u590D\u5236\u4EE3\u7801",
|
|
116
|
+
"Copy message": "\u590D\u5236\u6D88\u606F",
|
|
117
|
+
"Current configuration": "\u5F53\u524D\u914D\u7F6E",
|
|
118
|
+
Daily: "\u6BCF\u65E5",
|
|
119
|
+
Default: "\u9ED8\u8BA4",
|
|
120
|
+
Delete: "\u5220\u9664",
|
|
121
|
+
"Delete conversation": "\u5220\u9664\u5BF9\u8BDD",
|
|
122
|
+
"Delete record": "\u5220\u9664\u8BB0\u5F55",
|
|
123
|
+
"Delete this configuration?": "\u5220\u9664\u8FD9\u4E2A\u914D\u7F6E\uFF1F",
|
|
124
|
+
"Delete this conversation?": "\u5220\u9664\u8FD9\u4E2A\u5BF9\u8BDD\uFF1F",
|
|
125
|
+
"Delete this run?": "\u5220\u9664\u8FD9\u6761\u8FD0\u884C\u8BB0\u5F55\uFF1F",
|
|
126
|
+
Deny: "\u62D2\u7EDD",
|
|
127
|
+
Details: "\u8BE6\u60C5",
|
|
128
|
+
"Download file": "\u4E0B\u8F7D\u6587\u4EF6",
|
|
129
|
+
"Duration {0}{1}s": "\u7528\u65F6 {0}{1}s",
|
|
130
|
+
Edit: "\u7F16\u8F91",
|
|
131
|
+
"Edit file": "\u7F16\u8F91\u6587\u4EF6",
|
|
132
|
+
"Edit queued message": "\u7F16\u8F91\u5F85\u53D1\u6D88\u606F",
|
|
133
|
+
Email: "\u90AE\u7BB1",
|
|
134
|
+
Enable: "\u542F\u7528",
|
|
135
|
+
"End run": "\u7ED3\u675F\u8FD0\u884C",
|
|
136
|
+
"Ended: {0}": "\u7ED3\u675F\uFF1A{0}",
|
|
137
|
+
"Enter your email and password.": "\u8BF7\u8F93\u5165\u90AE\u7BB1\u548C\u5BC6\u7801\u3002",
|
|
138
|
+
"Entrypoint parameters": "\u5165\u53E3\u53C2\u6570",
|
|
139
|
+
Entrypoints: "\u8FD0\u884C\u5165\u53E3",
|
|
140
|
+
Error: "\u9519\u8BEF",
|
|
141
|
+
Execute: "\u6267\u884C",
|
|
142
|
+
"Execute plan": "\u6309\u8BA1\u5212\u6267\u884C",
|
|
143
|
+
"Export conversation": "\u5BFC\u51FA\u5BF9\u8BDD",
|
|
144
|
+
"Export record": "\u5BFC\u51FA\u8BB0\u5F55",
|
|
145
|
+
"Export run": "\u5BFC\u51FA\u8FD0\u884C\u8BB0\u5F55",
|
|
146
|
+
Failed: "\u5931\u8D25",
|
|
147
|
+
"Failed to load Kanban": "\u770B\u677F\u52A0\u8F7D\u5931\u8D25",
|
|
148
|
+
File: "\u6587\u4EF6",
|
|
149
|
+
"File exceeds 50 MiB.": "\u6587\u4EF6\u8D85\u8FC7 50 MiB\u3002",
|
|
150
|
+
"Files in {0}": "{0} \u4E2D\u7684\u6587\u4EF6",
|
|
151
|
+
"Fit graph": "\u9002\u914D\u6D41\u7A0B",
|
|
152
|
+
Form: "\u8868\u5355",
|
|
153
|
+
"Full screen": "\u5168\u5C4F",
|
|
154
|
+
"Generated file": "\u751F\u6210\u6587\u4EF6",
|
|
155
|
+
"Go to latest message": "\u56DE\u5230\u6700\u65B0\u6D88\u606F",
|
|
156
|
+
Graph: "\u6D41\u7A0B",
|
|
157
|
+
Height: "\u9AD8\u5EA6",
|
|
158
|
+
"Hide conversations": "\u9690\u85CF\u5BF9\u8BDD\u5217\u8868",
|
|
159
|
+
"Hide Kanban configurations": "\u9690\u85CF\u770B\u677F\u914D\u7F6E",
|
|
160
|
+
"Hide password": "\u9690\u85CF\u5BC6\u7801",
|
|
161
|
+
"Hide runs": "\u9690\u85CF\u8FD0\u884C\u8BB0\u5F55",
|
|
162
|
+
Image: "\u56FE\u7247",
|
|
163
|
+
"Incorrect email or password, or sign-in expired.": "\u90AE\u7BB1\u6216\u5BC6\u7801\u4E0D\u6B63\u786E\uFF0C\u6216\u767B\u5F55\u5DF2\u5931\u6548\u3002",
|
|
164
|
+
Interrupted: "\u5DF2\u4E2D\u65AD",
|
|
165
|
+
"JSON argument array": "JSON \u53C2\u6570\u6570\u7EC4",
|
|
166
|
+
"Just now": "\u521A\u521A",
|
|
167
|
+
Kanban: "\u770B\u677F",
|
|
168
|
+
"Kanban configurations": "\u770B\u677F\u914D\u7F6E",
|
|
169
|
+
List: "\u5217\u51FA",
|
|
170
|
+
"List files": "\u5217\u51FA\u6587\u4EF6",
|
|
171
|
+
"Load more": "\u52A0\u8F7D\u66F4\u591A",
|
|
172
|
+
"Loading Kanban": "\u6B63\u5728\u52A0\u8F7D\u770B\u677F",
|
|
173
|
+
"Loading parameters...": "\u52A0\u8F7D\u53C2\u6570...",
|
|
174
|
+
"Loading...": "\u52A0\u8F7D\u4E2D...",
|
|
175
|
+
"Lock title": "\u9501\u5B9A\u6807\u9898",
|
|
176
|
+
Logs: "\u65E5\u5FD7",
|
|
177
|
+
Loop: "\u5FAA\u73AF",
|
|
178
|
+
"Loop end": "\u5FAA\u73AF\u7ED3\u675F",
|
|
179
|
+
"Managed by server": "\u7531\u670D\u52A1\u5668\u7BA1\u7406",
|
|
180
|
+
"Manage this account through Studio.": "\u8BF7\u5728 Studio \u4E2D\u7BA1\u7406\u6B64\u8D26\u53F7\u3002",
|
|
181
|
+
Merge: "\u6C47\u5408",
|
|
182
|
+
Message: "\u6D88\u606F",
|
|
183
|
+
Monthly: "\u6BCF\u6708",
|
|
184
|
+
"Move up": "\u4E0A\u79FB",
|
|
185
|
+
"New configuration": "\u65B0\u5EFA\u914D\u7F6E",
|
|
186
|
+
"New conversation": "\u65B0\u5BF9\u8BDD",
|
|
187
|
+
"New run": "\u65B0\u5EFA\u8FD0\u884C",
|
|
188
|
+
Next: "\u4E0B\u4E00\u4E2A",
|
|
189
|
+
"Next question": "\u4E0B\u4E00\u95EE",
|
|
190
|
+
No: "\u5426",
|
|
191
|
+
"No active subscriptions": "\u6682\u65E0\u5DF2\u8BA2\u9605\u5957\u9910",
|
|
192
|
+
"No additional details": "\u6682\u65E0\u989D\u5916\u8BE6\u60C5",
|
|
193
|
+
"No available options": "\u6682\u65E0\u53EF\u7528\u9009\u9879",
|
|
194
|
+
"No conversations": "\u6682\u65E0\u5BF9\u8BDD",
|
|
195
|
+
"No logs": "\u6682\u65E0\u65E5\u5FD7",
|
|
196
|
+
"No matching conversations": "\u6CA1\u6709\u5339\u914D\u7684\u5BF9\u8BDD",
|
|
197
|
+
"No options": "\u6682\u65E0\u9009\u9879",
|
|
198
|
+
"No page methods registered": "\u9875\u9762\u6682\u672A\u6CE8\u518C\u65B9\u6CD5",
|
|
199
|
+
"No runs": "\u6682\u65E0\u8FD0\u884C\u8BB0\u5F55",
|
|
200
|
+
"No static workflow structure is available. Showing recorded execution nodes.": "\u672A\u89E3\u6790\u5230\u9759\u6001\u6D41\u7A0B\u7ED3\u6784\uFF0C\u663E\u793A\u5DF2\u6709\u8FD0\u884C\u8282\u70B9\u3002",
|
|
201
|
+
"No tools declared by this project": "\u9879\u76EE\u672A\u58F0\u660E\u5DE5\u5177",
|
|
202
|
+
"Node {0} does not match the static structure.": "\u8282\u70B9 {0} \u672A\u5339\u914D\u9759\u6001\u7ED3\u6784\u3002",
|
|
203
|
+
"Not selected": "\u672A\u9009\u62E9",
|
|
204
|
+
"Open {0}": "\u6253\u5F00 {0}",
|
|
205
|
+
"Page methods": "\u9875\u9762\u65B9\u6CD5",
|
|
206
|
+
"Parameter mode": "\u53C2\u6570\u6A21\u5F0F",
|
|
207
|
+
Parameters: "\u53C2\u6570",
|
|
208
|
+
"Parameters JSON": "\u53C2\u6570 JSON",
|
|
209
|
+
Password: "\u5BC6\u7801",
|
|
210
|
+
"Pending approval": "\u5F85\u786E\u8BA4",
|
|
211
|
+
Phone: "\u624B\u673A",
|
|
212
|
+
Plan: "\u8BA1\u5212",
|
|
213
|
+
"Please confirm {0}": "\u8BF7\u786E\u8BA4 {0}",
|
|
214
|
+
"Please enter {0}.": "\u8BF7\u586B\u5199 {0}\u3002",
|
|
215
|
+
"Preview size": "\u9884\u89C8\u5C3A\u5BF8",
|
|
216
|
+
Previous: "\u4E0A\u4E00\u4E2A",
|
|
217
|
+
"Previous question": "\u4E0A\u4E00\u95EE",
|
|
218
|
+
"Project connection expired": "\u9879\u76EE\u8FDE\u63A5\u5DF2\u5931\u6548",
|
|
219
|
+
"Project connection expired.": "\u9879\u76EE\u8FDE\u63A5\u5DF2\u5931\u6548\u3002",
|
|
220
|
+
"Queued messages ({0})": "\u5F85\u53D1\u6D88\u606F ({0})",
|
|
221
|
+
Read: "\u8BFB\u53D6",
|
|
222
|
+
"Read data": "\u8BFB\u53D6\u6570\u636E",
|
|
223
|
+
"Read file": "\u8BFB\u53D6\u6587\u4EF6",
|
|
224
|
+
"Read knowledge": "\u8BFB\u53D6\u77E5\u8BC6",
|
|
225
|
+
"Read web page": "\u8BFB\u53D6\u7F51\u9875",
|
|
226
|
+
Reasoning: "\u601D\u8003\u8FC7\u7A0B",
|
|
227
|
+
Reconnect: "\u91CD\u65B0\u8FDE\u63A5",
|
|
228
|
+
"Reconnecting...": "\u6B63\u5728\u91CD\u65B0\u8FDE\u63A5...",
|
|
229
|
+
"Reconnection will start when the network is available.": "\u7F51\u7EDC\u6062\u590D\u540E\u5C06\u81EA\u52A8\u91CD\u8FDE\u3002",
|
|
230
|
+
"Refresh Kanban": "\u5237\u65B0\u770B\u677F",
|
|
231
|
+
"Refresh parameters": "\u5237\u65B0\u53C2\u6570",
|
|
232
|
+
"Refresh usage": "\u5237\u65B0\u7528\u91CF",
|
|
233
|
+
"Related projects are unavailable: {0}": "\u5173\u8054\u9879\u76EE\u4E0D\u53EF\u7528\uFF1A{0}",
|
|
234
|
+
"Remove attachment": "\u79FB\u9664\u9644\u4EF6",
|
|
235
|
+
"Remove file": "\u79FB\u9664\u6587\u4EF6",
|
|
236
|
+
Rename: "\u91CD\u547D\u540D",
|
|
237
|
+
"Rename configuration": "\u91CD\u547D\u540D\u914D\u7F6E",
|
|
238
|
+
"Rename conversation": "\u91CD\u547D\u540D\u5BF9\u8BDD",
|
|
239
|
+
"Reopen using the project's run URL.": "\u8BF7\u4F7F\u7528\u9879\u76EE\u8FD0\u884C\u5730\u5740\u91CD\u65B0\u6253\u5F00\u3002",
|
|
240
|
+
Rerun: "\u91CD\u65B0\u8FD0\u884C",
|
|
241
|
+
Reset: "\u91CD\u7F6E",
|
|
242
|
+
"Reset options": "\u91CD\u7F6E\u9009\u9879",
|
|
243
|
+
"Resize preview": "\u8C03\u6574\u9884\u89C8\u5C3A\u5BF8",
|
|
244
|
+
Responding: "\u56DE\u590D\u4E2D",
|
|
245
|
+
"Responding...": "\u6B63\u5728\u56DE\u590D...",
|
|
246
|
+
Result: "\u7ED3\u679C",
|
|
247
|
+
"Resume queue": "\u7EE7\u7EED\u53D1\u9001\u961F\u5217",
|
|
248
|
+
"Resume run": "\u7EE7\u7EED\u8FD0\u884C",
|
|
249
|
+
Retry: "\u91CD\u8BD5",
|
|
250
|
+
"Retry loading parameters": "\u91CD\u8BD5\u52A0\u8F7D\u53C2\u6570",
|
|
251
|
+
"Retry save": "\u91CD\u8BD5\u4FDD\u5B58",
|
|
252
|
+
"Revise instructions": "\u4FEE\u6539\u8981\u6C42",
|
|
253
|
+
"Revise plan": "\u4FEE\u6539\u8BA1\u5212",
|
|
254
|
+
Run: "\u8FD0\u884C",
|
|
255
|
+
"Run arguments must be an array of strings.": "\u8FD0\u884C\u53C2\u6570\u9700\u8981\u662F\u5B57\u7B26\u4E32\u6570\u7EC4\u3002",
|
|
256
|
+
"Run command": "\u8FD0\u884C\u547D\u4EE4",
|
|
257
|
+
"Run failed": "\u8FD0\u884C\u5931\u8D25",
|
|
258
|
+
"Run interrupted": "\u8FD0\u884C\u5DF2\u4E2D\u65AD",
|
|
259
|
+
"Run logs": "\u8FD0\u884C\u65E5\u5FD7",
|
|
260
|
+
"Run parameters": "\u8FD0\u884C\u53C2\u6570",
|
|
261
|
+
"Run records \xB7 {0} items, {1} failed": "\u8FD0\u884C\u8BB0\u5F55 \xB7 {0} \u9879\uFF0C{1} \u9879\u5931\u8D25",
|
|
262
|
+
"Run subtask": "\u8FD0\u884C\u5B50\u4EFB\u52A1",
|
|
263
|
+
"Run timed out": "\u8FD0\u884C\u8D85\u65F6",
|
|
264
|
+
Running: "\u8FD0\u884C\u4E2D",
|
|
265
|
+
"Running...": "\u6B63\u5728\u8FD0\u884C...",
|
|
266
|
+
Runs: "\u8FD0\u884C\u8BB0\u5F55",
|
|
267
|
+
Save: "\u4FDD\u5B58",
|
|
268
|
+
"Save queued message": "\u4FDD\u5B58\u5F85\u53D1\u6D88\u606F",
|
|
269
|
+
Search: "\u641C\u7D22",
|
|
270
|
+
"Search all conversations": "\u641C\u7D22\u5168\u90E8\u5BF9\u8BDD",
|
|
271
|
+
"Search content": "\u641C\u7D22\u5185\u5BB9",
|
|
272
|
+
"Search conversation content": "\u641C\u7D22\u5BF9\u8BDD\u5185\u5BB9",
|
|
273
|
+
"Search conversations": "\u641C\u7D22\u5BF9\u8BDD",
|
|
274
|
+
"Search knowledge": "\u641C\u7D22\u77E5\u8BC6",
|
|
275
|
+
"Search runs": "\u641C\u7D22\u8FD0\u884C\u8BB0\u5F55",
|
|
276
|
+
"Search web": "\u641C\u7D22\u7F51\u9875",
|
|
277
|
+
"Select up to 32 files.": "\u6700\u591A\u9009\u62E9 32 \u4E2A\u6587\u4EF6\u3002",
|
|
278
|
+
"Select...": "\u9009\u62E9...",
|
|
279
|
+
Send: "\u53D1\u9001",
|
|
280
|
+
"Send a message...": "\u53D1\u9001\u6D88\u606F...",
|
|
281
|
+
"Send now": "\u7ACB\u5373\u53D1\u9001",
|
|
282
|
+
Server: "\u670D\u52A1\u5668",
|
|
283
|
+
"Show conversations": "\u663E\u793A\u5BF9\u8BDD\u5217\u8868",
|
|
284
|
+
"Show Kanban configurations": "\u663E\u793A\u770B\u677F\u914D\u7F6E",
|
|
285
|
+
"Show password": "\u663E\u793A\u5BC6\u7801",
|
|
286
|
+
"Show runs": "\u663E\u793A\u8FD0\u884C\u8BB0\u5F55",
|
|
287
|
+
"Sign in": "\u767B\u5F55",
|
|
288
|
+
"Sign in to Workflow": "\u767B\u5F55 Workflow",
|
|
289
|
+
"Sign in to Workflow Server to connect Kanban data.": "\u8BF7\u767B\u5F55 Workflow Server \u4EE5\u8FDE\u63A5\u770B\u677F\u6570\u636E\u3002",
|
|
290
|
+
"Sign in to Workflow Server, then refresh parameters.": "\u8BF7\u5148\u767B\u5F55 Workflow Server\uFF0C\u7136\u540E\u5237\u65B0\u53C2\u6570\u3002",
|
|
291
|
+
"Sign out": "\u9000\u51FA\u767B\u5F55",
|
|
292
|
+
"Sign-in expired": "\u767B\u5F55\u5DF2\u5931\u6548",
|
|
293
|
+
"Sign-in expired. Sign in to Workflow Server again.": "\u767B\u5F55\u5DF2\u5931\u6548\uFF0C\u8BF7\u91CD\u65B0\u767B\u5F55 Workflow Server\u3002",
|
|
294
|
+
"Signed in; account verified": "\u5DF2\u767B\u5F55\uFF0C\u8D26\u53F7\u9A8C\u8BC1\u901A\u8FC7",
|
|
295
|
+
"Signed out": "\u672A\u767B\u5F55",
|
|
296
|
+
"Signing in...": "\u767B\u5F55\u4E2D...",
|
|
297
|
+
"Started: {0}": "\u5F00\u59CB\uFF1A{0}",
|
|
298
|
+
Stop: "\u505C\u6B62",
|
|
299
|
+
"Stop run": "\u505C\u6B62\u8FD0\u884C",
|
|
300
|
+
Stopped: "\u5DF2\u505C\u6B62",
|
|
301
|
+
"Stopped \xB7 {0}/{1} items completed": "\u5DF2\u505C\u6B62 \xB7 {0}/{1} \u9879\u5B8C\u6210",
|
|
302
|
+
"Stopped {0}": "\u5DF2\u505C\u6B62{0}",
|
|
303
|
+
"Submitting...": "\u6B63\u5728\u63D0\u4EA4...",
|
|
304
|
+
"System AI": "\u7CFB\u7EDF AI",
|
|
305
|
+
"System AI usage": "\u7CFB\u7EDF AI \u7528\u91CF",
|
|
306
|
+
Tablet: "\u5E73\u677F",
|
|
307
|
+
"The current session is running.": "\u5F53\u524D\u4F1A\u8BDD\u6B63\u5728\u8FD0\u884C\u3002",
|
|
308
|
+
"The Kanban connection is unavailable.": "\u770B\u677F\u8FDE\u63A5\u4E0D\u53EF\u7528\u3002",
|
|
309
|
+
"The options for {0} have changed. Please select again.": "{0} \u7684\u9009\u9879\u5DF2\u5931\u6548\uFF0C\u8BF7\u91CD\u65B0\u9009\u62E9\u3002",
|
|
310
|
+
"The project does not support this attachment type.": "\u9879\u76EE\u4E0D\u652F\u6301\u6B64\u7C7B\u9644\u4EF6\u3002",
|
|
311
|
+
"The related project connection was interrupted. Reconnecting.": "\u5173\u8054\u9879\u76EE\u66F4\u65B0\u8FDE\u63A5\u5DF2\u4E2D\u65AD\uFF0C\u6B63\u5728\u91CD\u8FDE\u3002",
|
|
312
|
+
"The request timed out. Check the current status.": "\u8BF7\u6C42\u8D85\u65F6\uFF0C\u8BF7\u68C0\u67E5\u5F53\u524D\u72B6\u6001\u3002",
|
|
313
|
+
Thinking: "\u601D\u8003",
|
|
314
|
+
"Thought complete": "\u601D\u8003\u5B8C\u6210",
|
|
315
|
+
"Timed out": "\u5DF2\u8D85\u65F6",
|
|
316
|
+
Tool: "\u5DE5\u5177",
|
|
317
|
+
"Tool input": "\u5DE5\u5177\u53C2\u6570",
|
|
318
|
+
"Tool permissions": "\u5DE5\u5177\u6743\u9650",
|
|
319
|
+
Trace: "\u8F68\u8FF9",
|
|
320
|
+
Unlimited: "\u4E0D\u9650",
|
|
321
|
+
"Unlock title": "\u89E3\u9664\u6807\u9898\u9501\u5B9A",
|
|
322
|
+
"Unsupported attachment type, or the 50 MiB per file / 32 attachment limit was exceeded.": "\u9644\u4EF6\u7C7B\u578B\u4E0D\u53D7\u652F\u6301\uFF0C\u6216\u8D85\u8FC7\u5355\u6587\u4EF6 50 MiB / 32 \u4E2A\u9644\u4EF6\u9650\u5236\u3002",
|
|
323
|
+
"Update data": "\u66F4\u65B0\u6570\u636E",
|
|
324
|
+
"Update knowledge": "\u66F4\u65B0\u77E5\u8BC6",
|
|
325
|
+
"Update tasks": "\u66F4\u65B0\u4EFB\u52A1\u5217\u8868",
|
|
326
|
+
Validity: "\u6709\u6548\u671F",
|
|
327
|
+
"Verify sign-in": "\u9A8C\u8BC1\u767B\u5F55",
|
|
328
|
+
"Verifying account...": "\u6B63\u5728\u9A8C\u8BC1\u8D26\u53F7...",
|
|
329
|
+
"View all ({0})": "\u67E5\u770B\u5168\u90E8\uFF08{0}\uFF09",
|
|
330
|
+
"Waiting for input": "\u7B49\u5F85\u8F93\u5165",
|
|
331
|
+
"Waiting for tool results...": "\u7B49\u5F85\u5DE5\u5177\u7ED3\u679C...",
|
|
332
|
+
Weekly: "\u6BCF\u5468",
|
|
333
|
+
Width: "\u5BBD\u5EA6",
|
|
334
|
+
Workflow: "\u5DE5\u4F5C\u6D41",
|
|
335
|
+
"Workflow Account": "Workflow \u8D26\u53F7",
|
|
336
|
+
"Workflow entrypoint": "\u5DE5\u4F5C\u6D41\u5165\u53E3",
|
|
337
|
+
"Workflow run": "\u5DE5\u4F5C\u6D41\u8FD0\u884C",
|
|
338
|
+
Write: "\u5199\u5165",
|
|
339
|
+
"Write anything": "\u968F\u5FC3\u8F93\u5165",
|
|
340
|
+
"Write file": "\u5199\u5165\u6587\u4EF6",
|
|
341
|
+
Yes: "\u662F",
|
|
342
|
+
"Zoom in": "\u653E\u5927",
|
|
343
|
+
"Zoom out": "\u7F29\u5C0F"
|
|
344
|
+
};
|
|
345
|
+
|
|
346
|
+
// src/web/localization.ts
|
|
347
|
+
if (typeof document !== "undefined" && document.documentElement) {
|
|
348
|
+
const requested = new URL(location.href).searchParams.get("workflowLocale");
|
|
349
|
+
initI18n({ preference: normalizeLocale(requested || document.documentElement.lang || navigator.language) });
|
|
350
|
+
} else if (!i18n.isInitialized) {
|
|
351
|
+
initI18n();
|
|
352
|
+
}
|
|
353
|
+
i18n.addResourceBundle("zh-CN", "cliWeb", messages_zh_cn_default);
|
|
354
|
+
i18n.addResourceBundle("en", "cliWeb", Object.fromEntries(Object.keys(messages_zh_cn_default).map((message) => [message, message])));
|
|
355
|
+
var locale = getCurrentLocale;
|
|
356
|
+
function t(message, ...args) {
|
|
357
|
+
const translate = i18n.t;
|
|
358
|
+
const text = translate(message, { ns: "cliWeb", keySeparator: false, nsSeparator: false, fallbackLng: false, defaultValue: message });
|
|
359
|
+
return text.replace(/\{(\d+)\}/g, (placeholder, index) => Number(index) < args.length ? String(args[Number(index)]) : placeholder);
|
|
360
|
+
}
|
|
361
|
+
|
|
45
362
|
// src/web/server.ts
|
|
46
363
|
import { createServer } from "http";
|
|
47
364
|
import { createHash as createHash3, randomBytes as randomBytes2, timingSafeEqual } from "crypto";
|
|
@@ -140,33 +457,33 @@ function validateWorkflowValues(fields, values, states = {}) {
|
|
|
140
457
|
const value = workflowParamValue(field, values[field.name]);
|
|
141
458
|
const label = field.label || field.name;
|
|
142
459
|
if (field.required && (typeof value === "string" && !value.trim() || Array.isArray(value) && !value.length)) {
|
|
143
|
-
throw new Error(
|
|
460
|
+
throw new Error(t("Please enter {0}.", label));
|
|
144
461
|
}
|
|
145
462
|
if (value === "" || Array.isArray(value) && !value.length) {
|
|
146
463
|
continue;
|
|
147
464
|
}
|
|
148
465
|
if (field.type === "number" && (typeof value !== "string" || !Number.isFinite(Number(value)))) {
|
|
149
|
-
throw new Error(
|
|
466
|
+
throw new Error(t("{0} must be a valid number.", label));
|
|
150
467
|
}
|
|
151
468
|
if (field.type === "boolean" && value !== "true" && value !== "false") {
|
|
152
|
-
throw new Error(
|
|
469
|
+
throw new Error(t("{0} must be a valid boolean.", label));
|
|
153
470
|
}
|
|
154
471
|
if (field.format === "json" || field.type === "file" || field.control === "audio") {
|
|
155
472
|
let parsed;
|
|
156
473
|
try {
|
|
157
474
|
parsed = JSON.parse(typeof value === "string" ? value : JSON.stringify(value));
|
|
158
475
|
} catch {
|
|
159
|
-
throw new Error(
|
|
476
|
+
throw new Error(t("{0} must be valid JSON.", label));
|
|
160
477
|
}
|
|
161
478
|
if (field.required && (field.type === "file" || field.control === "audio") && (parsed === null || Array.isArray(parsed) && !parsed.length)) {
|
|
162
|
-
throw new Error(
|
|
479
|
+
throw new Error(t("Please enter {0}.", label));
|
|
163
480
|
}
|
|
164
481
|
}
|
|
165
482
|
const choices = states[field.name]?.resolvedOptions ?? field.options;
|
|
166
483
|
if (choices && choices.length > 0) {
|
|
167
484
|
const allowed = new Set(choices.filter((option) => states[field.name]?.options?.[option.value]?.visible !== false && !states[field.name]?.options?.[option.value]?.disabled).map((option) => option.value));
|
|
168
485
|
if ((Array.isArray(value) ? value : [value]).some((entry) => !allowed.has(entry))) {
|
|
169
|
-
throw new Error(
|
|
486
|
+
throw new Error(t("The options for {0} have changed. Please select again.", label));
|
|
170
487
|
}
|
|
171
488
|
}
|
|
172
489
|
}
|
|
@@ -226,7 +543,7 @@ var ConversationController = class {
|
|
|
226
543
|
delete message.submittingInput;
|
|
227
544
|
if (message.status === "running") {
|
|
228
545
|
message.status = message.pendingInput ? "waiting_for_input" : "aborted";
|
|
229
|
-
message.error = "
|
|
546
|
+
message.error = t("Run interrupted");
|
|
230
547
|
}
|
|
231
548
|
}
|
|
232
549
|
}
|
|
@@ -250,7 +567,7 @@ var ConversationController = class {
|
|
|
250
567
|
}
|
|
251
568
|
blank() {
|
|
252
569
|
const now = Date.now();
|
|
253
|
-
return { id: globalThis.crypto.randomUUID(), title: "
|
|
570
|
+
return { id: globalThis.crypto.randomUUID(), title: t("New conversation"), createdAt: now, updatedAt: now, messages: [], parameterValues: {}, toolPermissionPolicies: {}, queuedInputs: [], draft: { text: "", attachments: [] } };
|
|
254
571
|
}
|
|
255
572
|
async persist() {
|
|
256
573
|
const sessions = this.sessions.map((entry) => ({ ...entry, messages: entry.messages.map(({ submittingInput: _, ...message }) => message) }));
|
|
@@ -355,7 +672,7 @@ var ConversationController = class {
|
|
|
355
672
|
const waiting = entry.messages.some((message) => message.pendingInput);
|
|
356
673
|
if (entry.activeRunId || waiting || entry.queuedInputs?.length) {
|
|
357
674
|
if (!this.project.conversation?.inputQueue?.enabled) {
|
|
358
|
-
throw new Error("
|
|
675
|
+
throw new Error(t("The current session is running."));
|
|
359
676
|
}
|
|
360
677
|
if (entry.draft?.editingQueueId) {
|
|
361
678
|
const index = entry.queuedInputs.findIndex((item) => item.id === entry.draft?.editingQueueId);
|
|
@@ -399,7 +716,7 @@ var ConversationController = class {
|
|
|
399
716
|
}
|
|
400
717
|
if (!answer) {
|
|
401
718
|
if (!entry.messages.length && !entry.titleLocked) {
|
|
402
|
-
entry.title = (input.text || input.attachments[0]?.name || "
|
|
719
|
+
entry.title = (input.text || input.attachments[0]?.name || t("Workflow run")).slice(0, 80);
|
|
403
720
|
}
|
|
404
721
|
entry.messages.push({ id: globalThis.crypto.randomUUID(), role: "user", content: input.text || "", attachments: input.attachments, args, input, entrypointId: input.entrypointId, createdAt: Date.now() });
|
|
405
722
|
answer = { id: globalThis.crypto.randomUUID(), role: "assistant", content: "", items: [], status: "running", createdAt: Date.now(), model: typeof input.params.model === "string" ? input.params.model : void 0, args, entrypointId: input.entrypointId, events: [] };
|
|
@@ -431,7 +748,7 @@ var ConversationController = class {
|
|
|
431
748
|
rawArgs(text) {
|
|
432
749
|
const raw = JSON.parse(text);
|
|
433
750
|
if (!Array.isArray(raw) || !raw.every((arg) => typeof arg === "string")) {
|
|
434
|
-
throw new Error("
|
|
751
|
+
throw new Error(t("Run arguments must be an array of strings."));
|
|
435
752
|
}
|
|
436
753
|
return raw;
|
|
437
754
|
}
|
|
@@ -440,7 +757,7 @@ var ConversationController = class {
|
|
|
440
757
|
try {
|
|
441
758
|
await this.persist();
|
|
442
759
|
if (task.cancelled || this.disposed) {
|
|
443
|
-
throw new Error("
|
|
760
|
+
throw new Error(t("Stopped"));
|
|
444
761
|
}
|
|
445
762
|
const report = await this.runtime.run(request, (event) => {
|
|
446
763
|
if (task.cancelled || this.disposed || this.tasks.get(answer.runId) !== task) {
|
|
@@ -476,7 +793,7 @@ var ConversationController = class {
|
|
|
476
793
|
this.changed();
|
|
477
794
|
});
|
|
478
795
|
if (task.cancelled || this.disposed) {
|
|
479
|
-
throw new Error("
|
|
796
|
+
throw new Error(t("Stopped"));
|
|
480
797
|
}
|
|
481
798
|
answer.report = report;
|
|
482
799
|
answer.status = report.status;
|
|
@@ -498,17 +815,17 @@ var ConversationController = class {
|
|
|
498
815
|
answer.timers = report.timers ?? answer.timers;
|
|
499
816
|
if (report.status === "failed") {
|
|
500
817
|
const data = report.result?.data;
|
|
501
|
-
answer.error = report.result?.error?.message || (data && typeof data === "object" && "errMessage" in data && typeof data.errMessage === "string" ? data.errMessage : "
|
|
818
|
+
answer.error = report.result?.error?.message || (data && typeof data === "object" && "errMessage" in data && typeof data.errMessage === "string" ? data.errMessage : t("Run failed"));
|
|
502
819
|
}
|
|
503
820
|
if (report.status === "aborted" || report.status === "timed_out") {
|
|
504
|
-
answer.error = report.status === "aborted" ? "
|
|
821
|
+
answer.error = report.status === "aborted" ? t("Stopped") : t("Run timed out");
|
|
505
822
|
}
|
|
506
823
|
if (answer.submittingInput && pending && report.status === "failed") {
|
|
507
824
|
answer.status = "waiting_for_input";
|
|
508
825
|
answer.pendingInput = pending;
|
|
509
826
|
}
|
|
510
827
|
if (!answer.content && !answer.items?.length && report.status === "success") {
|
|
511
|
-
answer.content = report.result?.data === void 0 ? "
|
|
828
|
+
answer.content = report.result?.data === void 0 ? t("Completed") : JSON.stringify(report.result.data, null, 2);
|
|
512
829
|
}
|
|
513
830
|
} catch (error) {
|
|
514
831
|
answer.error = error instanceof Error ? error.message : String(error);
|
|
@@ -568,7 +885,7 @@ var ConversationController = class {
|
|
|
568
885
|
if (pending) {
|
|
569
886
|
pending.pendingInput = void 0;
|
|
570
887
|
pending.status = "aborted";
|
|
571
|
-
pending.error = "
|
|
888
|
+
pending.error = t("Stopped");
|
|
572
889
|
this.changed();
|
|
573
890
|
void this.persist().catch((error) => this.options.log(String(error)));
|
|
574
891
|
}
|
|
@@ -790,7 +1107,7 @@ var WorkflowController = class {
|
|
|
790
1107
|
delete record2.submittingInput;
|
|
791
1108
|
if (record2.status === "running" || record2.status === "waiting_for_input") {
|
|
792
1109
|
record2.status = "interrupted";
|
|
793
|
-
record2.error = "
|
|
1110
|
+
record2.error = t("Run interrupted");
|
|
794
1111
|
this.clearTimers(record2);
|
|
795
1112
|
}
|
|
796
1113
|
}
|
|
@@ -1565,10 +1882,10 @@ var KanbanController = class {
|
|
|
1565
1882
|
create(workspace, params, values = createDefaultKanbanValues(params), name) {
|
|
1566
1883
|
if (!name) {
|
|
1567
1884
|
let index = 1;
|
|
1568
|
-
while (workspace.configurations.some((item2) => item2.name ===
|
|
1885
|
+
while (workspace.configurations.some((item2) => item2.name === t("Configuration {0}", index))) {
|
|
1569
1886
|
index++;
|
|
1570
1887
|
}
|
|
1571
|
-
name =
|
|
1888
|
+
name = t("Configuration {0}", index);
|
|
1572
1889
|
}
|
|
1573
1890
|
const date = (/* @__PURE__ */ new Date()).toISOString(), item = { id: randomUUID2(), name, values: { ...values }, createdAt: date, updatedAt: date };
|
|
1574
1891
|
workspace.configurations.push(item);
|
|
@@ -1744,7 +2061,7 @@ var KanbanController = class {
|
|
|
1744
2061
|
this.missingRelatedProjectAliases = [];
|
|
1745
2062
|
const connection = this.hooks.connection();
|
|
1746
2063
|
if (!connection) {
|
|
1747
|
-
this.relatedProjectWarning = "
|
|
2064
|
+
this.relatedProjectWarning = t("Sign in to Workflow Server to connect Kanban data.");
|
|
1748
2065
|
return;
|
|
1749
2066
|
}
|
|
1750
2067
|
const abort = this.feed = new AbortController();
|
|
@@ -1766,7 +2083,7 @@ var KanbanController = class {
|
|
|
1766
2083
|
} }, abort.signal);
|
|
1767
2084
|
} catch {
|
|
1768
2085
|
if (!abort.signal.aborted) {
|
|
1769
|
-
this.relatedProjectWarning = "
|
|
2086
|
+
this.relatedProjectWarning = t("The related project connection was interrupted. Reconnecting.");
|
|
1770
2087
|
this.hooks.changed();
|
|
1771
2088
|
}
|
|
1772
2089
|
}
|
|
@@ -2154,6 +2471,7 @@ import { spawn } from "child_process";
|
|
|
2154
2471
|
import { existsSync, readFileSync } from "fs";
|
|
2155
2472
|
import path5 from "path";
|
|
2156
2473
|
import { fileURLToPath } from "url";
|
|
2474
|
+
import { WORKFLOW_RUNTIME_LOCALE_ENV } from "workflow-code";
|
|
2157
2475
|
function cliRoot() {
|
|
2158
2476
|
let directory = path5.dirname(fileURLToPath(import.meta.url));
|
|
2159
2477
|
for (let depth = 0; depth < 8; depth++) {
|
|
@@ -2187,6 +2505,8 @@ function createWebRuntime(projectDir, storageDir, connection) {
|
|
|
2187
2505
|
const env = {
|
|
2188
2506
|
...process.env,
|
|
2189
2507
|
WORKFLOW_RUNTIME_PLATFORM: "cli",
|
|
2508
|
+
[WORKFLOW_RUNTIME_LOCALE_ENV]: locale(),
|
|
2509
|
+
WORKFLOW_CODE_LOCALE: locale(),
|
|
2190
2510
|
WORKFLOW_SERVER_URL: auth?.serverUrl ?? "",
|
|
2191
2511
|
WORKFLOW_SERVER_ADMIN_KEY: auth?.accessToken ?? "",
|
|
2192
2512
|
WORKFLOW_SERVER_TOKEN: "",
|
|
@@ -2318,7 +2638,7 @@ function createWebRuntime(projectDir, storageDir, connection) {
|
|
|
2318
2638
|
// src/web/account-auth.ts
|
|
2319
2639
|
async function loginWebAccount(serverUrl, email, password) {
|
|
2320
2640
|
if (!email.trim() || !password) {
|
|
2321
|
-
throw new Error("
|
|
2641
|
+
throw new Error(t("Enter your email and password."));
|
|
2322
2642
|
}
|
|
2323
2643
|
let token = "";
|
|
2324
2644
|
let cookie = "";
|
|
@@ -2328,7 +2648,7 @@ async function loginWebAccount(serverUrl, email, password) {
|
|
|
2328
2648
|
const response = await fetch(`${serverUrl}${endpoint}`, { ...options, redirect: "error", signal: AbortSignal.timeout(15e3) });
|
|
2329
2649
|
const result = await response.json();
|
|
2330
2650
|
if (!response.ok || result.errCode !== 0 || !result.data) {
|
|
2331
|
-
const message = response.status === 401 ? "
|
|
2651
|
+
const message = response.status === 401 ? t("Incorrect email or password, or sign-in expired.") : result.errMessage || "Workflow Server login failed.";
|
|
2332
2652
|
throw new Error(String(message).replaceAll(password, "[redacted]").replaceAll(token || "\0", "[redacted]"));
|
|
2333
2653
|
}
|
|
2334
2654
|
return { response, data: result.data };
|
|
@@ -2410,7 +2730,7 @@ async function startWebServer(options) {
|
|
|
2410
2730
|
let login;
|
|
2411
2731
|
let passwordLogin = false;
|
|
2412
2732
|
let hostConnection = options.host?.connection;
|
|
2413
|
-
let hostManaged =
|
|
2733
|
+
let hostManaged = options.host !== void 0;
|
|
2414
2734
|
let authEpoch = 0;
|
|
2415
2735
|
let authenticationInitialized = false;
|
|
2416
2736
|
let authCheck;
|
|
@@ -2573,7 +2893,7 @@ async function startWebServer(options) {
|
|
|
2573
2893
|
return;
|
|
2574
2894
|
}
|
|
2575
2895
|
const readingEpoch = authEpoch;
|
|
2576
|
-
const config = await readCliAuthConfig();
|
|
2896
|
+
const config = hostManaged ? createEmptyWorkflowAuthConfig() : await readCliAuthConfig();
|
|
2577
2897
|
if (readingEpoch !== authEpoch) {
|
|
2578
2898
|
return;
|
|
2579
2899
|
}
|
|
@@ -2864,7 +3184,7 @@ ${token}`;
|
|
|
2864
3184
|
if (message.type === "export-message") {
|
|
2865
3185
|
replies.push({ type: "download", name: `run-${answer.id}.json`, content: JSON.stringify(redactWorkflowData(answer, [...sensitiveTokens], false), null, 2) }, { type: "exported", sessionId: current.id, messageId: answer.id });
|
|
2866
3186
|
} else {
|
|
2867
|
-
replies.push({ type: "preview", title: message.type === "logs" ? "
|
|
3187
|
+
replies.push({ type: "preview", title: message.type === "logs" ? t("Run logs") : t("Trace"), content: message.type === "logs" ? answer.report?.logs ?? "" : { report: answer.report, events: answer.events, items: answer.items } });
|
|
2868
3188
|
}
|
|
2869
3189
|
break;
|
|
2870
3190
|
}
|
|
@@ -2902,6 +3222,9 @@ ${token}`;
|
|
|
2902
3222
|
break;
|
|
2903
3223
|
}
|
|
2904
3224
|
case "login": {
|
|
3225
|
+
if (hostManaged) {
|
|
3226
|
+
throw new Error(t("Manage this account through Studio."));
|
|
3227
|
+
}
|
|
2905
3228
|
if (!options.host && process.env.WORKFLOW_SERVER_ADMIN_KEY !== void 0) {
|
|
2906
3229
|
throw new Error("This session is supplied by the host. Sign in through the host.");
|
|
2907
3230
|
}
|
|
@@ -2957,15 +3280,19 @@ ${token}`;
|
|
|
2957
3280
|
case "verify":
|
|
2958
3281
|
await refreshAuth(true);
|
|
2959
3282
|
break;
|
|
2960
|
-
case "logout":
|
|
3283
|
+
case "logout": {
|
|
3284
|
+
if (hostManaged) {
|
|
3285
|
+
throw new Error(t("Manage this account through Studio."));
|
|
3286
|
+
}
|
|
2961
3287
|
signedOut = true;
|
|
2962
3288
|
login?.kill();
|
|
2963
|
-
if (
|
|
3289
|
+
if (process.env.WORKFLOW_SERVER_ADMIN_KEY === void 0) {
|
|
2964
3290
|
await clearCliAuthConfig();
|
|
2965
3291
|
}
|
|
2966
3292
|
authIdentity = "signed-out";
|
|
2967
3293
|
await refreshAuth();
|
|
2968
3294
|
break;
|
|
3295
|
+
}
|
|
2969
3296
|
default:
|
|
2970
3297
|
throw new Error(`Unsupported action: ${message.type}`);
|
|
2971
3298
|
}
|
|
@@ -3073,7 +3400,7 @@ ${token}`;
|
|
|
3073
3400
|
const ancestors = options.host ? "'self' vscode-webview: vscode-file: https://*.vscode-cdn.net https://*.vscode-webview.net http://127.0.0.1:* http://localhost:*" : "'self' vscode-webview:";
|
|
3074
3401
|
response.writeHead(200, { "Content-Type": "text/html; charset=utf-8", "Cache-Control": "no-store", "Content-Security-Policy": `default-src 'self'; script-src 'self'; style-src 'self' 'unsafe-inline'; img-src 'self' data: https: http:; font-src 'self'; connect-src 'self'; media-src 'self' blob:; frame-src 'self'; object-src 'none'; base-uri 'none'; frame-ancestors ${ancestors}; form-action 'self'` });
|
|
3075
3402
|
const ui = isKanban ? "kanban-workspace" : isWorkflow ? "workflow-workspace" : "workflow-ui";
|
|
3076
|
-
response.end(`<!doctype html><html lang="
|
|
3403
|
+
response.end(`<!doctype html><html lang="${locale()}" data-theme="${options.theme ?? "auto"}"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><meta name="workflow-project" content="${key}"><title>Workflow</title><link rel="stylesheet" href="/assets/codicons/codicon.css"><link rel="stylesheet" href="/assets/${ui}.css"><link rel="stylesheet" href="/assets/theme.css"></head><body data-surface="${options.host?.surface ?? "editor"}" data-account-host="${hostManaged}"><div id="app"></div><script src="/assets/${ui}.js" defer></script></body></html>`);
|
|
3077
3404
|
return;
|
|
3078
3405
|
}
|
|
3079
3406
|
const assets = { "/assets/workflow-ui.js": "application/javascript", "/assets/workflow-ui.css": "text/css", "/assets/theme.css": "text/css", "/assets/codicons/codicon.css": "text/css", "/assets/codicons/codicon.ttf": "font/ttf" };
|
|
@@ -3286,7 +3613,7 @@ async function main(argv) {
|
|
|
3286
3613
|
};
|
|
3287
3614
|
process.once("SIGINT", close);
|
|
3288
3615
|
process.once("SIGTERM", close);
|
|
3289
|
-
console.log(options.json ? JSON.stringify({ type: "ready", protocolVersion: 1, hostProtocolVersion: 1, traceProtocolVersion: 1, assistantProtocolVersion: host?.assistant ? ASSISTANT_PROTOCOL_VERSION : void 0, url: app.url, project: { id: app.project.id, name: app.project.name, projectType: app.project.projectType }, runtime: app.project.runtime }) : `Workflow Web: ${app.url}`);
|
|
3616
|
+
console.log(options.json ? JSON.stringify({ type: "ready", protocolVersion: 1, hostProtocolVersion: 1, accountProtocolVersion: 1, traceProtocolVersion: 1, assistantProtocolVersion: host?.assistant ? ASSISTANT_PROTOCOL_VERSION : void 0, url: app.url, project: { id: app.project.id, name: app.project.name, projectType: app.project.projectType }, runtime: app.project.runtime }) : `Workflow Web: ${app.url}`);
|
|
3290
3617
|
if (lines) {
|
|
3291
3618
|
void (async () => {
|
|
3292
3619
|
try {
|