@field-studio/sdk 0.0.0-stage → 0.1.1

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.
Files changed (63) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +131 -2
  3. package/dist/index.d.ts +97 -0
  4. package/dist/index.js +129 -0
  5. package/dist/node/identity.d.ts +68 -0
  6. package/dist/node/identity.js +1 -0
  7. package/dist/node/index.d.ts +41 -0
  8. package/dist/node/index.js +165 -0
  9. package/dist/react/agent/AgentEditor.d.ts +16 -0
  10. package/dist/react/agent/AgentEditor.js +51 -0
  11. package/dist/react/agent/MCPManager.d.ts +12 -0
  12. package/dist/react/agent/MCPManager.js +72 -0
  13. package/dist/react/agent/SkillImport.d.ts +8 -0
  14. package/dist/react/agent/SkillImport.js +31 -0
  15. package/dist/react/agent/SkillViewer.d.ts +7 -0
  16. package/dist/react/agent/SkillViewer.js +61 -0
  17. package/dist/react/agent/catalog.css +205 -0
  18. package/dist/react/agent/index.d.ts +7 -0
  19. package/dist/react/agent/index.js +5 -0
  20. package/dist/react/agent/skillTitle.d.ts +3 -0
  21. package/dist/react/agent/skillTitle.js +4 -0
  22. package/dist/react/agent/types.d.ts +46 -0
  23. package/dist/react/agent/types.js +1 -0
  24. package/dist/react/assistant/AssistantPanel.d.ts +15 -0
  25. package/dist/react/assistant/AssistantPanel.js +144 -0
  26. package/dist/react/assistant/AssistantProvider.d.ts +119 -0
  27. package/dist/react/assistant/AssistantProvider.js +427 -0
  28. package/dist/react/assistant/QuestionPanel.d.ts +8 -0
  29. package/dist/react/assistant/QuestionPanel.js +32 -0
  30. package/dist/react/assistant/TaskComposer.d.ts +25 -0
  31. package/dist/react/assistant/TaskComposer.js +354 -0
  32. package/dist/react/assistant/TaskFiles.d.ts +24 -0
  33. package/dist/react/assistant/TaskFiles.js +107 -0
  34. package/dist/react/assistant/assistant.css +428 -0
  35. package/dist/react/assistant/composer.css +116 -0
  36. package/dist/react/assistant/files.css +19 -0
  37. package/dist/react/assistant/index.d.ts +10 -0
  38. package/dist/react/assistant/index.js +6 -0
  39. package/dist/react/assistant/layout.d.ts +7 -0
  40. package/dist/react/assistant/layout.js +19 -0
  41. package/dist/react/assistant/messages.d.ts +355 -0
  42. package/dist/react/assistant/messages.js +239 -0
  43. package/dist/react/assistant/questions.css +6 -0
  44. package/dist/react/assistant/types.d.ts +85 -0
  45. package/dist/react/assistant/types.js +1 -0
  46. package/dist/react/auth/AuthShell.d.ts +35 -0
  47. package/dist/react/auth/AuthShell.js +197 -0
  48. package/dist/react/auth/RoleManager.d.ts +23 -0
  49. package/dist/react/auth/RoleManager.js +95 -0
  50. package/dist/react/auth/auth.css +70 -0
  51. package/dist/react/auth/index.d.ts +2 -0
  52. package/dist/react/auth/index.js +1 -0
  53. package/dist/react/index.d.ts +57 -0
  54. package/dist/react/index.js +177 -0
  55. package/dist/react/ui/Controls.d.ts +78 -0
  56. package/dist/react/ui/Controls.js +234 -0
  57. package/dist/react/ui/base.css +261 -0
  58. package/dist/react/ui/controls.css +35 -0
  59. package/dist/react/ui/index.d.ts +2 -0
  60. package/dist/react/ui/index.js +2 -0
  61. package/dist/workspace.d.ts +107 -0
  62. package/dist/workspace.js +139 -0
  63. package/package.json +86 -3
@@ -0,0 +1,355 @@
1
+ export declare const english: {
2
+ queued: string;
3
+ running: string;
4
+ awaiting_confirmation: string;
5
+ completed: string;
6
+ failed: string;
7
+ cancelled: string;
8
+ taskRunning: string;
9
+ resize: string;
10
+ newConversation: string;
11
+ history: string;
12
+ collapse: string;
13
+ intro: string;
14
+ suggestions: string;
15
+ attachment: string;
16
+ artifact: string;
17
+ analyzing: string;
18
+ recommendations: string;
19
+ retry: string;
20
+ viewProposals: string;
21
+ dismissError: string;
22
+ unavailable: string;
23
+ closeContext: string;
24
+ contextHint: string;
25
+ pageContext: string;
26
+ workspaceLoadError: string;
27
+ fileLimit: string;
28
+ workspaceLimit: string;
29
+ uploadFailed: string;
30
+ deleteFailed: string;
31
+ taskInput: string;
32
+ addTaskAttachments: string;
33
+ promptHint: string;
34
+ selectSkill: string;
35
+ mention: string;
36
+ dismissSuggestion: string;
37
+ suggestedSkills: string;
38
+ suggestedMentions: string;
39
+ agent: string;
40
+ loading: string;
41
+ noSkills: string;
42
+ noMentions: string;
43
+ dropFiles: string;
44
+ addAttachments: string;
45
+ attachHint: string;
46
+ workspaceFiles: string;
47
+ workspace: string;
48
+ stop: string;
49
+ stopHint: string;
50
+ send: string;
51
+ sendHint: string;
52
+ closeWorkspace: string;
53
+ workspaceHint: string;
54
+ uploadFiles: string;
55
+ uploadFolder: string;
56
+ refreshFiles: string;
57
+ uploadToWorkspace: string;
58
+ uploadFolderToWorkspace: string;
59
+ referenceFolder: string;
60
+ loadingFiles: string;
61
+ emptyWorkspace: string;
62
+ workspaceLimitsHint: string;
63
+ attachmentsUnavailable: string;
64
+ updatingWorkspace: string;
65
+ attachmentCountLimit: string;
66
+ attachmentSizeLimit: string;
67
+ attachmentTotalLimit: string;
68
+ fileLoadError: string;
69
+ downloadFile: string;
70
+ attachmentsUploaded: string;
71
+ agentQuestions: string;
72
+ answerError: string;
73
+ moreInformation: string;
74
+ otherAnswer: string;
75
+ submitting: string;
76
+ submitAnswer: string;
77
+ connectionError: string;
78
+ pageActionFailed: string;
79
+ actionFailed: string;
80
+ selectAgent: string;
81
+ taskCancelled: string;
82
+ taskRequeued: string;
83
+ proposalRejected: string;
84
+ reviewError: string;
85
+ review: string;
86
+ accepted: string;
87
+ changesRequested: string;
88
+ reviewHint: string;
89
+ accept: string;
90
+ requestChanges: string;
91
+ reason: string;
92
+ submitChanges: string;
93
+ cancel: string;
94
+ conversation: (name: string) => string;
95
+ ask: (name: string) => string;
96
+ toolCalls: (count: number) => string;
97
+ contextCount: (count: number) => string;
98
+ contextTitle: (page: string) => string;
99
+ pendingProposals: (count: number) => string;
100
+ promptLimit: (limit: number) => string;
101
+ uploadProgress: (current: number, total: number, name: string) => string;
102
+ uploadPartial: (count: number, total: number, error: string) => string;
103
+ uploaded: (count: number) => string;
104
+ removeSkill: (name: string) => string;
105
+ removeAttachment: (name: string, index: number) => string;
106
+ fileCount: (count: number) => string;
107
+ preview: (name: string) => string;
108
+ download: (name: string) => string;
109
+ deleteFile: (name: string) => string;
110
+ selectedFileCount: (count: number) => string;
111
+ closeDialog: (name: string) => string;
112
+ previewTitle: (name: string) => string;
113
+ attempt: (count: number) => string;
114
+ questionOptions: (question: string) => string;
115
+ };
116
+ export type AssistantMessages = typeof english;
117
+ export declare const chinese: AssistantMessages;
118
+ export declare const AssistantDisplayContext: import("react").Context<{
119
+ name: string;
120
+ locale: string;
121
+ messages: {
122
+ queued: string;
123
+ running: string;
124
+ awaiting_confirmation: string;
125
+ completed: string;
126
+ failed: string;
127
+ cancelled: string;
128
+ taskRunning: string;
129
+ resize: string;
130
+ newConversation: string;
131
+ history: string;
132
+ collapse: string;
133
+ intro: string;
134
+ suggestions: string;
135
+ attachment: string;
136
+ artifact: string;
137
+ analyzing: string;
138
+ recommendations: string;
139
+ retry: string;
140
+ viewProposals: string;
141
+ dismissError: string;
142
+ unavailable: string;
143
+ closeContext: string;
144
+ contextHint: string;
145
+ pageContext: string;
146
+ workspaceLoadError: string;
147
+ fileLimit: string;
148
+ workspaceLimit: string;
149
+ uploadFailed: string;
150
+ deleteFailed: string;
151
+ taskInput: string;
152
+ addTaskAttachments: string;
153
+ promptHint: string;
154
+ selectSkill: string;
155
+ mention: string;
156
+ dismissSuggestion: string;
157
+ suggestedSkills: string;
158
+ suggestedMentions: string;
159
+ agent: string;
160
+ loading: string;
161
+ noSkills: string;
162
+ noMentions: string;
163
+ dropFiles: string;
164
+ addAttachments: string;
165
+ attachHint: string;
166
+ workspaceFiles: string;
167
+ workspace: string;
168
+ stop: string;
169
+ stopHint: string;
170
+ send: string;
171
+ sendHint: string;
172
+ closeWorkspace: string;
173
+ workspaceHint: string;
174
+ uploadFiles: string;
175
+ uploadFolder: string;
176
+ refreshFiles: string;
177
+ uploadToWorkspace: string;
178
+ uploadFolderToWorkspace: string;
179
+ referenceFolder: string;
180
+ loadingFiles: string;
181
+ emptyWorkspace: string;
182
+ workspaceLimitsHint: string;
183
+ attachmentsUnavailable: string;
184
+ updatingWorkspace: string;
185
+ attachmentCountLimit: string;
186
+ attachmentSizeLimit: string;
187
+ attachmentTotalLimit: string;
188
+ fileLoadError: string;
189
+ downloadFile: string;
190
+ attachmentsUploaded: string;
191
+ agentQuestions: string;
192
+ answerError: string;
193
+ moreInformation: string;
194
+ otherAnswer: string;
195
+ submitting: string;
196
+ submitAnswer: string;
197
+ connectionError: string;
198
+ pageActionFailed: string;
199
+ actionFailed: string;
200
+ selectAgent: string;
201
+ taskCancelled: string;
202
+ taskRequeued: string;
203
+ proposalRejected: string;
204
+ reviewError: string;
205
+ review: string;
206
+ accepted: string;
207
+ changesRequested: string;
208
+ reviewHint: string;
209
+ accept: string;
210
+ requestChanges: string;
211
+ reason: string;
212
+ submitChanges: string;
213
+ cancel: string;
214
+ conversation: (name: string) => string;
215
+ ask: (name: string) => string;
216
+ toolCalls: (count: number) => string;
217
+ contextCount: (count: number) => string;
218
+ contextTitle: (page: string) => string;
219
+ pendingProposals: (count: number) => string;
220
+ promptLimit: (limit: number) => string;
221
+ uploadProgress: (current: number, total: number, name: string) => string;
222
+ uploadPartial: (count: number, total: number, error: string) => string;
223
+ uploaded: (count: number) => string;
224
+ removeSkill: (name: string) => string;
225
+ removeAttachment: (name: string, index: number) => string;
226
+ fileCount: (count: number) => string;
227
+ preview: (name: string) => string;
228
+ download: (name: string) => string;
229
+ deleteFile: (name: string) => string;
230
+ selectedFileCount: (count: number) => string;
231
+ closeDialog: (name: string) => string;
232
+ previewTitle: (name: string) => string;
233
+ attempt: (count: number) => string;
234
+ questionOptions: (question: string) => string;
235
+ };
236
+ }>;
237
+ export declare function useAssistantDisplay(): {
238
+ name: string;
239
+ locale: string;
240
+ messages: {
241
+ queued: string;
242
+ running: string;
243
+ awaiting_confirmation: string;
244
+ completed: string;
245
+ failed: string;
246
+ cancelled: string;
247
+ taskRunning: string;
248
+ resize: string;
249
+ newConversation: string;
250
+ history: string;
251
+ collapse: string;
252
+ intro: string;
253
+ suggestions: string;
254
+ attachment: string;
255
+ artifact: string;
256
+ analyzing: string;
257
+ recommendations: string;
258
+ retry: string;
259
+ viewProposals: string;
260
+ dismissError: string;
261
+ unavailable: string;
262
+ closeContext: string;
263
+ contextHint: string;
264
+ pageContext: string;
265
+ workspaceLoadError: string;
266
+ fileLimit: string;
267
+ workspaceLimit: string;
268
+ uploadFailed: string;
269
+ deleteFailed: string;
270
+ taskInput: string;
271
+ addTaskAttachments: string;
272
+ promptHint: string;
273
+ selectSkill: string;
274
+ mention: string;
275
+ dismissSuggestion: string;
276
+ suggestedSkills: string;
277
+ suggestedMentions: string;
278
+ agent: string;
279
+ loading: string;
280
+ noSkills: string;
281
+ noMentions: string;
282
+ dropFiles: string;
283
+ addAttachments: string;
284
+ attachHint: string;
285
+ workspaceFiles: string;
286
+ workspace: string;
287
+ stop: string;
288
+ stopHint: string;
289
+ send: string;
290
+ sendHint: string;
291
+ closeWorkspace: string;
292
+ workspaceHint: string;
293
+ uploadFiles: string;
294
+ uploadFolder: string;
295
+ refreshFiles: string;
296
+ uploadToWorkspace: string;
297
+ uploadFolderToWorkspace: string;
298
+ referenceFolder: string;
299
+ loadingFiles: string;
300
+ emptyWorkspace: string;
301
+ workspaceLimitsHint: string;
302
+ attachmentsUnavailable: string;
303
+ updatingWorkspace: string;
304
+ attachmentCountLimit: string;
305
+ attachmentSizeLimit: string;
306
+ attachmentTotalLimit: string;
307
+ fileLoadError: string;
308
+ downloadFile: string;
309
+ attachmentsUploaded: string;
310
+ agentQuestions: string;
311
+ answerError: string;
312
+ moreInformation: string;
313
+ otherAnswer: string;
314
+ submitting: string;
315
+ submitAnswer: string;
316
+ connectionError: string;
317
+ pageActionFailed: string;
318
+ actionFailed: string;
319
+ selectAgent: string;
320
+ taskCancelled: string;
321
+ taskRequeued: string;
322
+ proposalRejected: string;
323
+ reviewError: string;
324
+ review: string;
325
+ accepted: string;
326
+ changesRequested: string;
327
+ reviewHint: string;
328
+ accept: string;
329
+ requestChanges: string;
330
+ reason: string;
331
+ submitChanges: string;
332
+ cancel: string;
333
+ conversation: (name: string) => string;
334
+ ask: (name: string) => string;
335
+ toolCalls: (count: number) => string;
336
+ contextCount: (count: number) => string;
337
+ contextTitle: (page: string) => string;
338
+ pendingProposals: (count: number) => string;
339
+ promptLimit: (limit: number) => string;
340
+ uploadProgress: (current: number, total: number, name: string) => string;
341
+ uploadPartial: (count: number, total: number, error: string) => string;
342
+ uploaded: (count: number) => string;
343
+ removeSkill: (name: string) => string;
344
+ removeAttachment: (name: string, index: number) => string;
345
+ fileCount: (count: number) => string;
346
+ preview: (name: string) => string;
347
+ download: (name: string) => string;
348
+ deleteFile: (name: string) => string;
349
+ selectedFileCount: (count: number) => string;
350
+ closeDialog: (name: string) => string;
351
+ previewTitle: (name: string) => string;
352
+ attempt: (count: number) => string;
353
+ questionOptions: (question: string) => string;
354
+ };
355
+ };
@@ -0,0 +1,239 @@
1
+ import { createContext, useContext } from 'react';
2
+ export const english = {
3
+ queued: 'Awaiting execution',
4
+ running: 'Analyzing',
5
+ awaiting_confirmation: 'Awaiting confirmation',
6
+ completed: 'Complete',
7
+ failed: 'Execution failed',
8
+ cancelled: 'Canceled',
9
+ taskRunning: 'A task is running',
10
+ resize: 'Resize conversation panel',
11
+ newConversation: 'New conversation',
12
+ history: 'Past tasks',
13
+ collapse: 'Collapse conversation panel',
14
+ intro: 'Ask a question or delegate role-specific work to enabled agents in this workspace. Combine their analyses in the final answer.',
15
+ suggestions: 'Start with a question',
16
+ attachment: 'Input attachment',
17
+ artifact: 'Generated file',
18
+ analyzing: 'Reading and analyzing business data…',
19
+ recommendations: 'Recommended steps',
20
+ retry: 'Run again',
21
+ viewProposals: 'View pending proposals',
22
+ dismissError: 'Dismiss error',
23
+ unavailable: 'No model is configured. Conversations are unavailable.',
24
+ closeContext: 'Close page context',
25
+ contextHint: 'Selected context is sent with your next message. Clearing a selection keeps conversation history.',
26
+ pageContext: 'Page context',
27
+ workspaceLoadError: 'Could not load the workspace',
28
+ fileLimit: 'A file cannot exceed 10 MiB',
29
+ workspaceLimit: 'A workspace supports at most 50 files with a combined size of at most 100 MiB',
30
+ uploadFailed: 'Upload failed',
31
+ deleteFailed: 'Delete failed',
32
+ taskInput: 'Task input',
33
+ addTaskAttachments: 'Add task attachments',
34
+ promptHint: 'Describe your task. Use / for skills and @ for files.',
35
+ selectSkill: 'Select a skill',
36
+ mention: 'Mention an agent or reference files',
37
+ dismissSuggestion: 'Dismiss proposal',
38
+ suggestedSkills: 'Suggested skills',
39
+ suggestedMentions: 'Suggested agents and files',
40
+ agent: 'Agent',
41
+ loading: 'Loading…',
42
+ noSkills: 'No matching skills. Add skills in the agent library',
43
+ noMentions: 'No matching agents or files',
44
+ dropFiles: 'Release to attach files',
45
+ addAttachments: 'Add attachments',
46
+ attachHint: 'Add attachments or drop files here',
47
+ workspaceFiles: 'Workspace files',
48
+ workspace: 'Workspace',
49
+ stop: 'Stop task',
50
+ stopHint: 'Stop current task',
51
+ send: 'Send question',
52
+ sendHint: 'Enter to send. Shift + Enter for a new line.',
53
+ closeWorkspace: 'Close workspace',
54
+ workspaceHint: 'Files are stored on the server for use across tasks. Only referenced files are sent to the AI.',
55
+ uploadFiles: 'Upload files',
56
+ uploadFolder: 'Upload folder',
57
+ refreshFiles: 'Refresh files',
58
+ uploadToWorkspace: 'Upload to workspace',
59
+ uploadFolderToWorkspace: 'Upload folder to workspace',
60
+ referenceFolder: 'Reference all files in folder',
61
+ loadingFiles: 'Loading files…',
62
+ emptyWorkspace: 'The workspace has no files',
63
+ workspaceLimitsHint: 'Single file 10 MiB · Workspace 100 MiB / 50 files · Each referenced file counts toward the five-file limit',
64
+ attachmentsUnavailable: 'This conversation does not support attachments or workspace files',
65
+ updatingWorkspace: 'Updating the workspace…',
66
+ attachmentCountLimit: 'Each task can have up to 5 attachments',
67
+ attachmentSizeLimit: 'An attachment cannot exceed 10 MiB',
68
+ attachmentTotalLimit: 'Attachments cannot exceed a combined size of 25 MiB',
69
+ fileLoadError: 'Could not load the file',
70
+ downloadFile: 'Download file',
71
+ attachmentsUploaded: 'Attachments uploaded. Creating task…',
72
+ agentQuestions: 'Agent questions',
73
+ answerError: 'Could not submit the answer. Try again.',
74
+ moreInformation: 'The agent needs more information',
75
+ otherAnswer: 'Enter another answer',
76
+ submitting: 'Submitting…',
77
+ submitAnswer: 'Submit answer',
78
+ connectionError: 'Could not connect to the service',
79
+ pageActionFailed: 'Page action failed',
80
+ actionFailed: 'Action failed. Try again',
81
+ selectAgent: 'Select an enabled agent',
82
+ taskCancelled: 'Task canceled',
83
+ taskRequeued: 'Task queued again',
84
+ proposalRejected: 'Proposal rejected',
85
+ reviewError: 'Could not save the result review. Try again',
86
+ review: 'Result review',
87
+ accepted: 'Result accepted',
88
+ changesRequested: 'Changes requested',
89
+ reviewHint: 'Review the AI result. Approve each work order action separately.',
90
+ accept: 'Accept result',
91
+ requestChanges: 'Request changes',
92
+ reason: 'Reason for changes',
93
+ submitChanges: 'Submit change request',
94
+ cancel: 'Cancel',
95
+ conversation: (name) => `${name} conversation`,
96
+ ask: (name) => `Ask ${name}`,
97
+ toolCalls: (count) => `Called ${count} tools`,
98
+ contextCount: (count) => `${count} context items loaded`,
99
+ contextTitle: (page) => `${page} context`,
100
+ pendingProposals: (count) => `Analysis complete. Review ${count} pending proposals.`,
101
+ promptLimit: (limit) => `Questions can contain at most ${limit} characters`,
102
+ uploadProgress: (current, total, name) => `Uploading ${current}/${total}: ${name}`,
103
+ uploadPartial: (count, total, error) => `Uploaded ${count}/${total} files; ${error}. Uploaded files were kept. Retry only the remaining files.`,
104
+ uploaded: (count) => `Uploaded ${count} files`,
105
+ removeSkill: (name) => `Remove skill ${name}`,
106
+ removeAttachment: (name, index) => `Remove attachment ${name} (${index})`,
107
+ fileCount: (count) => `${count} files`,
108
+ preview: (name) => `Preview ${name}`,
109
+ download: (name) => `Download ${name}`,
110
+ deleteFile: (name) => `Delete workspace file ${name}`,
111
+ selectedFileCount: (count) => `${count}/5 files · Total limit 25 MiB`,
112
+ closeDialog: (name) => `Close ${name}`,
113
+ previewTitle: (name) => `${name} preview`,
114
+ attempt: (count) => `Attempt ${count}`,
115
+ questionOptions: (question) => `${question}: options`,
116
+ };
117
+ export const chinese = {
118
+ queued: '等待执行',
119
+ running: '分析中',
120
+ awaiting_confirmation: '等待确认',
121
+ completed: '已完成',
122
+ failed: '执行失败',
123
+ cancelled: '已取消',
124
+ taskRunning: '有任务正在运行',
125
+ resize: '调整对话面板宽度',
126
+ newConversation: '新建对话',
127
+ history: '历史任务',
128
+ collapse: '收起对话面板',
129
+ intro: '可以直接提问,也可以把任务分给工作区中已启用的智能体,并在最终答复中汇总分析结果。',
130
+ suggestions: '从一个问题开始',
131
+ attachment: '输入附件',
132
+ artifact: '生成的文件',
133
+ analyzing: '正在读取并分析业务数据…',
134
+ recommendations: '建议步骤',
135
+ retry: '重新运行',
136
+ viewProposals: '查看待确认提案',
137
+ dismissError: '关闭错误提示',
138
+ unavailable: '尚未配置模型,暂时无法对话。',
139
+ closeContext: '关闭页面上下文',
140
+ contextHint: '选中的上下文将随下一条消息发送。取消勾选后仍会保留对话历史。',
141
+ pageContext: '页面上下文',
142
+ workspaceLoadError: '无法加载工作区',
143
+ fileLimit: '单个文件不能超过 10 MiB',
144
+ workspaceLimit: '工作区最多可存储 50 个文件,总大小不能超过 100 MiB',
145
+ uploadFailed: '上传失败',
146
+ deleteFailed: '删除失败',
147
+ taskInput: '任务输入',
148
+ addTaskAttachments: '添加任务附件',
149
+ promptHint: '请描述任务。输入 / 选择技能,输入 @ 引用文件。',
150
+ selectSkill: '选择技能',
151
+ mention: '提及智能体或引用文件',
152
+ dismissSuggestion: '关闭建议',
153
+ suggestedSkills: '推荐技能',
154
+ suggestedMentions: '推荐智能体和文件',
155
+ agent: '智能体',
156
+ loading: '加载中…',
157
+ noSkills: '没有匹配的技能,可在智能体库中添加技能',
158
+ noMentions: '没有匹配的智能体或文件',
159
+ dropFiles: '松开以添加附件',
160
+ addAttachments: '添加附件',
161
+ attachHint: '添加附件或将文件拖到此处',
162
+ workspaceFiles: '工作区文件',
163
+ workspace: '工作区',
164
+ stop: '停止任务',
165
+ stopHint: '停止当前任务',
166
+ send: '发送问题',
167
+ sendHint: '按 Enter 发送,Shift + Enter 换行。',
168
+ closeWorkspace: '关闭工作区',
169
+ workspaceHint: '文件保存在服务器上,可跨任务使用。只有被引用的文件才会发送给 AI。',
170
+ uploadFiles: '上传文件',
171
+ uploadFolder: '上传文件夹',
172
+ refreshFiles: '刷新文件',
173
+ uploadToWorkspace: '上传到工作区',
174
+ uploadFolderToWorkspace: '上传文件夹到工作区',
175
+ referenceFolder: '引用文件夹中的全部文件',
176
+ loadingFiles: '正在加载文件…',
177
+ emptyWorkspace: '工作区中没有文件',
178
+ workspaceLimitsHint: '单个文件上限 10 MiB,工作区上限 100 MiB、50 个文件。每次任务最多引用 5 个文件。',
179
+ attachmentsUnavailable: '当前对话不支持附件或工作区文件',
180
+ updatingWorkspace: '正在更新工作区…',
181
+ attachmentCountLimit: '每个任务最多可添加 5 个附件',
182
+ attachmentSizeLimit: '单个附件不能超过 10 MiB',
183
+ attachmentTotalLimit: '附件总大小不能超过 25 MiB',
184
+ fileLoadError: '无法加载文件',
185
+ downloadFile: '下载文件',
186
+ attachmentsUploaded: '附件已上传,正在创建任务…',
187
+ agentQuestions: '智能体提问',
188
+ answerError: '无法提交回答,请重试。',
189
+ moreInformation: '智能体需要更多信息',
190
+ otherAnswer: '输入其他回答',
191
+ submitting: '正在提交…',
192
+ submitAnswer: '提交回答',
193
+ connectionError: '无法连接服务',
194
+ pageActionFailed: '页面操作失败',
195
+ actionFailed: '操作失败,请重试',
196
+ selectAgent: '请选择已启用的智能体',
197
+ taskCancelled: '任务已取消',
198
+ taskRequeued: '任务已重新排队',
199
+ proposalRejected: '提案已拒绝',
200
+ reviewError: '无法保存审核结果,请重试',
201
+ review: '结果审核',
202
+ accepted: '结果已接受',
203
+ changesRequested: '已要求修改',
204
+ reviewHint: '请审核 AI 结果,并逐项审批工单操作。',
205
+ accept: '接受结果',
206
+ requestChanges: '要求修改',
207
+ reason: '修改原因',
208
+ submitChanges: '提交修改请求',
209
+ cancel: '取消',
210
+ conversation: (name) => `${name}对话`,
211
+ ask: (name) => `向${name}提问`,
212
+ toolCalls: (count) => `已调用 ${count} 个工具`,
213
+ contextCount: (count) => `已加载 ${count} 项上下文`,
214
+ contextTitle: (page) => `${page} 的上下文`,
215
+ pendingProposals: (count) => `分析已完成,请审核 ${count} 项待确认的提案。`,
216
+ promptLimit: (limit) => `问题最多可输入 ${limit} 个字符`,
217
+ uploadProgress: (current, total, name) => `正在上传 ${current}/${total}:${name}`,
218
+ uploadPartial: (count, total, error) => `已上传 ${count}/${total} 个文件。${error}。已上传的文件已保留,请重试剩余文件。`,
219
+ uploaded: (count) => `已上传 ${count} 个文件`,
220
+ removeSkill: (name) => `移除技能 ${name}`,
221
+ removeAttachment: (name, index) => `移除附件 ${name}(${index})`,
222
+ fileCount: (count) => `${count} 个文件`,
223
+ preview: (name) => `预览 ${name}`,
224
+ download: (name) => `下载 ${name}`,
225
+ deleteFile: (name) => `删除工作区文件 ${name}`,
226
+ selectedFileCount: (count) => `已选 ${count}/5 个文件,总大小上限 25 MiB`,
227
+ closeDialog: (name) => `关闭 ${name}`,
228
+ previewTitle: (name) => `${name}预览`,
229
+ attempt: (count) => `第 ${count} 次执行`,
230
+ questionOptions: (question) => `${question}的选项`,
231
+ };
232
+ export const AssistantDisplayContext = createContext({
233
+ name: 'Assistant',
234
+ locale: 'en',
235
+ messages: english,
236
+ });
237
+ export function useAssistantDisplay() {
238
+ return useContext(AssistantDisplayContext);
239
+ }
@@ -0,0 +1,6 @@
1
+ .question-panel { margin: 16px 0; padding: 16px; border: 1px solid #cdd7e3; border-radius: 6px; background: #f8fafc; }
2
+ .question-intro { margin: 0 0 14px; color: #526579; font-size: 12px; }
3
+ .question-panel fieldset { padding: 0; margin: 0 0 18px; border: 0; min-width: 0; }
4
+ .question-panel legend { margin-bottom: 10px; font-weight: 600; font-size: 14px; overflow-wrap: anywhere; }
5
+ .question-panel .ui-radio-group { margin-bottom: 10px; }
6
+ .question-text { width: 100%; border: 1px solid #cdd7e3; border-radius: 4px; padding: 9px 10px; background: #fff; color: inherit; }
@@ -0,0 +1,85 @@
1
+ export interface Skill {
2
+ id: string;
3
+ package_name?: string;
4
+ name: string;
5
+ description: string;
6
+ instructions: string;
7
+ resources?: Record<string, string>;
8
+ binary_resources?: Record<string, string>;
9
+ }
10
+ export interface Proposal {
11
+ id: string;
12
+ status: 'pending' | 'executed' | 'rejected' | 'expired';
13
+ }
14
+ export interface Analysis {
15
+ summary: string;
16
+ findings: {
17
+ title: string;
18
+ detail: string;
19
+ [key: string]: unknown;
20
+ }[];
21
+ recommendations: string[];
22
+ [key: string]: unknown;
23
+ }
24
+ export interface TaskFile {
25
+ id: string;
26
+ name: string;
27
+ size: number;
28
+ relative_path?: string;
29
+ kind?: 'input' | 'output';
30
+ attempt?: number;
31
+ }
32
+ export interface PendingInput {
33
+ id: string;
34
+ status: 'pending' | 'answered' | 'cancelled' | 'expired';
35
+ questions: {
36
+ id: string;
37
+ header: string;
38
+ question: string;
39
+ isOther: boolean;
40
+ isSecret: boolean;
41
+ options: {
42
+ label: string;
43
+ description: string;
44
+ }[] | null;
45
+ }[];
46
+ expires_at?: string;
47
+ }
48
+ export interface Task {
49
+ review_status?: 'accepted' | 'changes_requested' | 'unreviewed' | null;
50
+ reviews?: {
51
+ id: string;
52
+ decision: 'accepted' | 'changes_requested';
53
+ comment: string;
54
+ created_at?: string;
55
+ }[];
56
+ turn_history?: {
57
+ attempt: number;
58
+ prompt: string;
59
+ result: Analysis | null;
60
+ agent_id?: string;
61
+ }[];
62
+ pending_input?: PendingInput;
63
+ attachments?: TaskFile[];
64
+ artifacts?: TaskFile[];
65
+ proposals?: Proposal[];
66
+ id: string;
67
+ agent_id: string;
68
+ prompt: string;
69
+ status: 'queued' | 'running' | 'awaiting_confirmation' | 'completed' | 'failed' | 'cancelled';
70
+ version: number;
71
+ created_at: string;
72
+ updated_at: string;
73
+ error: string | null;
74
+ result: Analysis | null;
75
+ events: {
76
+ time: string;
77
+ stage: string;
78
+ message: string;
79
+ data?: unknown;
80
+ }[];
81
+ input_tokens: number;
82
+ output_tokens: number;
83
+ duration_ms: number;
84
+ attempt: number;
85
+ }
@@ -0,0 +1 @@
1
+ export {};