@ibiz-template/vue3-components 0.7.41-alpha.41 → 0.7.41-alpha.43
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/ibiz-markdown-editor-DJ662N4_.js +1 -0
- package/dist/{index-CaWTEUU1.js → index-CG3sQH0b.js} +1 -1
- package/dist/index-D3x_MFr-.js +11 -0
- package/dist/{index-CD2XM6M6.js → index-kZrZndeH.js} +1 -1
- package/dist/index.min.css +1 -1
- package/dist/index.system.min.js +1 -1
- package/dist/wang-editor-DDSO3Ha9.js +1 -0
- package/dist/{xlsx-util-Dvg2kWh7.js → xlsx-util-8YSXhmdI.js} +1 -1
- package/es/control/form/form-detail/form-item/composite-form-item-ex/composite-form-item-ex.controller.mjs +16 -6
- package/es/control/toolbar/export-excel/export-excel.mjs +19 -4
- package/es/editor/code/monaco-editor/monaco-editor.mjs +13 -195
- package/es/editor/html/wang-editor/module/ai-module.mjs +1 -1
- package/es/editor/html/wang-editor/wang-editor.mjs +31 -202
- package/es/editor/markdown/ibiz-markdown-editor/custom-menu.mjs +16 -223
- package/es/editor/markdown/ibiz-markdown-editor/ibiz-markdown-editor.css +1 -1
- package/es/editor/markdown/ibiz-markdown-editor/ibiz-markdown-editor.mjs +2 -1
- package/es/editor/text-box/input/input.mjs +9 -197
- package/es/locale/en/index.mjs +24 -1
- package/es/locale/zh-CN/index.mjs +24 -1
- package/es/panel-component/panel-app-title/panel-app-title.mjs +19 -42
- package/es/util/ai-chat-util/ai-chat-util.mjs +644 -15
- package/es/util/ai-chat-util/ai-feedback/ai-feedback.css +1 -0
- package/es/util/ai-chat-util/ai-feedback/ai-feedback.mjs +130 -0
- package/es/util/app-util/app-util.mjs +24 -246
- package/es/util/inline-ai-util/inline-ai-textarea/inline-ai-textarea.hook.mjs +12 -4
- package/es/util/inline-ai-util/inline-ai-textarea/inline-ai-textarea.mjs +3 -1
- package/lib/control/form/form-detail/form-item/composite-form-item-ex/composite-form-item-ex.controller.cjs +16 -6
- package/lib/control/toolbar/export-excel/export-excel.cjs +18 -3
- package/lib/editor/code/monaco-editor/monaco-editor.cjs +13 -195
- package/lib/editor/html/wang-editor/module/ai-module.cjs +1 -1
- package/lib/editor/html/wang-editor/wang-editor.cjs +30 -201
- package/lib/editor/markdown/ibiz-markdown-editor/custom-menu.cjs +16 -223
- package/lib/editor/markdown/ibiz-markdown-editor/ibiz-markdown-editor.cjs +2 -1
- package/lib/editor/markdown/ibiz-markdown-editor/ibiz-markdown-editor.css +1 -1
- package/lib/editor/text-box/input/input.cjs +8 -196
- package/lib/locale/en/index.cjs +24 -1
- package/lib/locale/zh-CN/index.cjs +24 -1
- package/lib/panel-component/panel-app-title/panel-app-title.cjs +18 -41
- package/lib/util/ai-chat-util/ai-chat-util.cjs +642 -13
- package/lib/util/ai-chat-util/ai-feedback/ai-feedback.cjs +132 -0
- package/lib/util/ai-chat-util/ai-feedback/ai-feedback.css +1 -0
- package/lib/util/app-util/app-util.cjs +23 -245
- package/lib/util/inline-ai-util/inline-ai-textarea/inline-ai-textarea.cjs +3 -1
- package/lib/util/inline-ai-util/inline-ai-textarea/inline-ai-textarea.hook.cjs +12 -4
- package/package.json +7 -7
- package/dist/ibiz-markdown-editor-DEV-iSvz.js +0 -1
- package/dist/index-Bv2fgePf.js +0 -11
- package/dist/wang-editor-4cNAgOaJ.js +0 -1
|
@@ -2,10 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
var Cherry = require('cherry-markdown');
|
|
4
4
|
var vue = require('vue');
|
|
5
|
-
var qxUtil = require('qx-util');
|
|
6
5
|
var vue3Util = require('@ibiz-template/vue3-util');
|
|
7
|
-
var core = require('@ibiz-template/core');
|
|
8
|
-
var runtime = require('@ibiz-template/runtime');
|
|
9
6
|
|
|
10
7
|
"use strict";
|
|
11
8
|
function initCustomMenu(c, opts) {
|
|
@@ -34,12 +31,20 @@ function initCustomMenu(c, opts) {
|
|
|
34
31
|
);
|
|
35
32
|
if (items.length === 0)
|
|
36
33
|
return;
|
|
34
|
+
const { zIndex } = vue3Util.useUIStore();
|
|
35
|
+
const popoverZIndex = zIndex.increment();
|
|
37
36
|
ibiz.inLineAIUtil.showContextMenus(
|
|
38
37
|
// 浮动工具栏的左侧距离
|
|
39
38
|
selectionPosition.left,
|
|
40
39
|
// 浮动工具栏的顶部距离 + 浮动工具栏的高度
|
|
41
40
|
selectionPosition.top + 43,
|
|
42
|
-
items
|
|
41
|
+
items,
|
|
42
|
+
{
|
|
43
|
+
zIndex: popoverZIndex,
|
|
44
|
+
onClose: () => {
|
|
45
|
+
zIndex.decrement();
|
|
46
|
+
}
|
|
47
|
+
}
|
|
43
48
|
);
|
|
44
49
|
}
|
|
45
50
|
});
|
|
@@ -54,27 +59,17 @@ function initCustomMenu(c, opts) {
|
|
|
54
59
|
const appDataEntityId = c.model.appDataEntityId;
|
|
55
60
|
if (!appDataEntityId || !c.deACMode)
|
|
56
61
|
return;
|
|
57
|
-
const
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
const {
|
|
62
|
-
contentToolbarItems,
|
|
63
|
-
footerToolbarItems,
|
|
64
|
-
questionToolbarItems,
|
|
65
|
-
otherToolbarItems
|
|
66
|
-
} = ibiz.aiChatUtil.calcAiToolbarItemsByAc(c.deACMode);
|
|
67
|
-
const { containerOptions, chatOptions } = ibiz.aiChatUtil.getEditorExAIChatParams(
|
|
62
|
+
const { zIndex } = vue3Util.useUIStore();
|
|
63
|
+
const containerZIndex = zIndex.increment();
|
|
64
|
+
chatInstance = await ibiz.aiChatUtil.getAIChat();
|
|
65
|
+
const { containerOptions, chatOptions } = await ibiz.aiChatUtil.getEditorExAIChatParams(
|
|
68
66
|
c.editorParams,
|
|
69
67
|
c.context,
|
|
70
68
|
c.params,
|
|
71
|
-
props.data
|
|
69
|
+
props.data,
|
|
70
|
+
c.deACMode,
|
|
71
|
+
{ chatInstance, view: c.view, ctrl: c.ctrl }
|
|
72
72
|
);
|
|
73
|
-
const { zIndex } = vue3Util.useUIStore();
|
|
74
|
-
const containerZIndex = zIndex.increment();
|
|
75
|
-
chatInstance = await ibiz.aiChatUtil.getAIChat();
|
|
76
|
-
let id = "";
|
|
77
|
-
let abortController;
|
|
78
73
|
chatInstance.create({
|
|
79
74
|
containerOptions: {
|
|
80
75
|
zIndex: containerZIndex,
|
|
@@ -85,89 +80,7 @@ function initCustomMenu(c, opts) {
|
|
|
85
80
|
context: { ...c.context },
|
|
86
81
|
params: { ...c.params, srfactag: c.deACMode.codeName },
|
|
87
82
|
appDataEntityId,
|
|
88
|
-
contentToolbarItems,
|
|
89
|
-
footerToolbarItems,
|
|
90
|
-
questionToolbarItems,
|
|
91
|
-
otherToolbarItems,
|
|
92
|
-
aiAgentlist,
|
|
93
83
|
...chatOptions,
|
|
94
|
-
question: async (aiChat, ctx, param, other, arr, sessionid, srfaiagent, srfmode) => {
|
|
95
|
-
id = qxUtil.createUUID();
|
|
96
|
-
abortController = new AbortController();
|
|
97
|
-
const deService = await ibiz.hub.getApp(ctx.srfappid).deService.getService(ctx, other.appDataEntityId);
|
|
98
|
-
try {
|
|
99
|
-
const questionRequestData = {
|
|
100
|
-
messages: arr,
|
|
101
|
-
sessionid
|
|
102
|
-
};
|
|
103
|
-
if (srfaiagent) {
|
|
104
|
-
questionRequestData.srfaiagent = srfaiagent;
|
|
105
|
-
}
|
|
106
|
-
if (srfmode) {
|
|
107
|
-
questionRequestData.mode = srfmode;
|
|
108
|
-
}
|
|
109
|
-
await deService.aiChatSse(
|
|
110
|
-
(msg) => {
|
|
111
|
-
if (msg.actionstate === 20 && msg.actionresult) {
|
|
112
|
-
aiChat.addMessage({
|
|
113
|
-
messageid: id,
|
|
114
|
-
state: msg.actionstate,
|
|
115
|
-
type: "DEFAULT",
|
|
116
|
-
role: "ASSISTANT",
|
|
117
|
-
content: msg.actionresult
|
|
118
|
-
});
|
|
119
|
-
} else if (msg.actionstate === 30 && msg.actionresult) {
|
|
120
|
-
const result = JSON.parse(msg.actionresult);
|
|
121
|
-
const choices = result.choices;
|
|
122
|
-
if (choices && choices.length > 0) {
|
|
123
|
-
aiChat.replaceMessage({
|
|
124
|
-
messageid: id,
|
|
125
|
-
state: msg.actionstate,
|
|
126
|
-
type: "DEFAULT",
|
|
127
|
-
role: "ASSISTANT",
|
|
128
|
-
content: choices[0].content || ""
|
|
129
|
-
});
|
|
130
|
-
}
|
|
131
|
-
} else if (msg.actionstate === 40) {
|
|
132
|
-
aiChat.replaceMessage({
|
|
133
|
-
messageid: id,
|
|
134
|
-
state: msg.actionstate,
|
|
135
|
-
type: "ERROR",
|
|
136
|
-
role: "ASSISTANT",
|
|
137
|
-
content: msg.actionresult
|
|
138
|
-
});
|
|
139
|
-
}
|
|
140
|
-
},
|
|
141
|
-
abortController,
|
|
142
|
-
ctx,
|
|
143
|
-
param,
|
|
144
|
-
{ ...questionRequestData }
|
|
145
|
-
);
|
|
146
|
-
} catch (error) {
|
|
147
|
-
aiChat.replaceMessage({
|
|
148
|
-
messageid: id,
|
|
149
|
-
state: 40,
|
|
150
|
-
type: "ERROR",
|
|
151
|
-
role: "ASSISTANT",
|
|
152
|
-
content: error.message || ibiz.i18n.t("app.aiError")
|
|
153
|
-
});
|
|
154
|
-
abortController == null ? void 0 : abortController.abort();
|
|
155
|
-
} finally {
|
|
156
|
-
aiChat.completeMessage(id, true);
|
|
157
|
-
return true;
|
|
158
|
-
}
|
|
159
|
-
},
|
|
160
|
-
abortQuestion: async (aiChat) => {
|
|
161
|
-
abortController == null ? void 0 : abortController.abort();
|
|
162
|
-
await aiChat.stopMessage({
|
|
163
|
-
messageid: id,
|
|
164
|
-
state: 30,
|
|
165
|
-
type: "DEFAULT",
|
|
166
|
-
role: "ASSISTANT",
|
|
167
|
-
content: ""
|
|
168
|
-
});
|
|
169
|
-
await aiChat.completeMessage(id, true);
|
|
170
|
-
},
|
|
171
84
|
action: (action, message) => {
|
|
172
85
|
if (action === "backfill") {
|
|
173
86
|
if (isEditing.value) {
|
|
@@ -176,126 +89,6 @@ function initCustomMenu(c, opts) {
|
|
|
176
89
|
emit("change", message.realcontent);
|
|
177
90
|
}
|
|
178
91
|
}
|
|
179
|
-
},
|
|
180
|
-
history: async (ctx, param, other) => {
|
|
181
|
-
const deService = await ibiz.hub.getApp(ctx.srfappid).deService.getService(ctx, other.appDataEntityId);
|
|
182
|
-
const historyRequestData = {};
|
|
183
|
-
if (other.appendCurData) {
|
|
184
|
-
Object.assign(historyRequestData, {
|
|
185
|
-
...other.appendCurData
|
|
186
|
-
});
|
|
187
|
-
}
|
|
188
|
-
if (other.srfaiagent) {
|
|
189
|
-
Object.assign(historyRequestData, {
|
|
190
|
-
srfaiagent: other.srfaiagent
|
|
191
|
-
});
|
|
192
|
-
}
|
|
193
|
-
if (other.srfmode) {
|
|
194
|
-
Object.assign(historyRequestData, {
|
|
195
|
-
mode: other.srfmode
|
|
196
|
-
});
|
|
197
|
-
}
|
|
198
|
-
const result = await deService.aiChatHistory(
|
|
199
|
-
ctx,
|
|
200
|
-
param,
|
|
201
|
-
historyRequestData
|
|
202
|
-
);
|
|
203
|
-
if (result.data && Array.isArray(result.data)) {
|
|
204
|
-
let preMsg;
|
|
205
|
-
result.data.forEach((item) => {
|
|
206
|
-
if (item.role === "TOOL") {
|
|
207
|
-
if (preMsg && item.content) {
|
|
208
|
-
chatInstance.aiChat.updateRecommendPrompt(
|
|
209
|
-
preMsg,
|
|
210
|
-
item.content
|
|
211
|
-
);
|
|
212
|
-
}
|
|
213
|
-
} else {
|
|
214
|
-
const msg = {
|
|
215
|
-
messageid: qxUtil.createUUID(),
|
|
216
|
-
state: 30,
|
|
217
|
-
type: "DEFAULT",
|
|
218
|
-
role: item.role,
|
|
219
|
-
content: item.content,
|
|
220
|
-
completed: true
|
|
221
|
-
};
|
|
222
|
-
preMsg = msg;
|
|
223
|
-
chatInstance.aiChat.addMessage(msg);
|
|
224
|
-
}
|
|
225
|
-
});
|
|
226
|
-
}
|
|
227
|
-
return true;
|
|
228
|
-
},
|
|
229
|
-
recommendPrompt: async (ctx, param, other) => {
|
|
230
|
-
const deService = await ibiz.hub.getApp(ctx.srfappid).deService.getService(ctx, other.appDataEntityId);
|
|
231
|
-
const result = await deService.aiChatRecommendPrompt(
|
|
232
|
-
ctx,
|
|
233
|
-
param,
|
|
234
|
-
other.message
|
|
235
|
-
);
|
|
236
|
-
if (result.ok && result.data) {
|
|
237
|
-
const choices = result.data.choices;
|
|
238
|
-
if (choices && choices.length > 0) {
|
|
239
|
-
return choices[0];
|
|
240
|
-
}
|
|
241
|
-
return null;
|
|
242
|
-
}
|
|
243
|
-
return null;
|
|
244
|
-
},
|
|
245
|
-
uploader: {
|
|
246
|
-
onUpload: async (file, reportProgress, options) => {
|
|
247
|
-
const fileMeata = ibiz.util.file.calcFileUpDownUrl(
|
|
248
|
-
(options == null ? void 0 : options.context) || c.context,
|
|
249
|
-
(options == null ? void 0 : options.params) || c.params,
|
|
250
|
-
{}
|
|
251
|
-
);
|
|
252
|
-
const fielUploadHeaders = ibiz.util.file.getUploadHeaders();
|
|
253
|
-
const formData = new FormData();
|
|
254
|
-
formData.append("file", file);
|
|
255
|
-
const res = await ibiz.net.axios({
|
|
256
|
-
url: fileMeata.uploadUrl,
|
|
257
|
-
method: "post",
|
|
258
|
-
headers: fielUploadHeaders,
|
|
259
|
-
data: formData,
|
|
260
|
-
onUploadProgress: (progressEvent) => {
|
|
261
|
-
const percent = progressEvent.loaded / progressEvent.total * 100;
|
|
262
|
-
reportProgress(percent);
|
|
263
|
-
}
|
|
264
|
-
});
|
|
265
|
-
return res.data;
|
|
266
|
-
}
|
|
267
|
-
},
|
|
268
|
-
extendToolbarClick: async (event, source, context, params, data) => {
|
|
269
|
-
var _a, _b;
|
|
270
|
-
const result = await runtime.UIActionUtil.exec(
|
|
271
|
-
source.id,
|
|
272
|
-
{
|
|
273
|
-
view: c.view,
|
|
274
|
-
ctrl: c.ctrl,
|
|
275
|
-
context: core.IBizContext.create(context),
|
|
276
|
-
params,
|
|
277
|
-
data: [data],
|
|
278
|
-
event
|
|
279
|
-
},
|
|
280
|
-
source.appId
|
|
281
|
-
);
|
|
282
|
-
if (result.closeView) {
|
|
283
|
-
c.view.closeView({ ok: true });
|
|
284
|
-
} else if (result.refresh) {
|
|
285
|
-
switch (result.refreshMode) {
|
|
286
|
-
case 1:
|
|
287
|
-
c.view.callUIAction(runtime.SysUIActionTag.REFRESH);
|
|
288
|
-
break;
|
|
289
|
-
case 2:
|
|
290
|
-
(_a = c.view.parentView) == null ? void 0 : _a.callUIAction(runtime.SysUIActionTag.REFRESH);
|
|
291
|
-
break;
|
|
292
|
-
case 3:
|
|
293
|
-
(_b = c.view.getTopView()) == null ? void 0 : _b.callUIAction(runtime.SysUIActionTag.REFRESH);
|
|
294
|
-
break;
|
|
295
|
-
default:
|
|
296
|
-
}
|
|
297
|
-
}
|
|
298
|
-
return result;
|
|
299
92
|
}
|
|
300
93
|
}
|
|
301
94
|
});
|
|
@@ -51,7 +51,7 @@ const IBizMarkDown = /* @__PURE__ */ vue.defineComponent({
|
|
|
51
51
|
let lastMarkDownWidth = 0;
|
|
52
52
|
const cssVars = vue.ref({});
|
|
53
53
|
const toolbarCssVars = vue.ref({});
|
|
54
|
-
const lastDirectoryState = vue.ref("
|
|
54
|
+
const lastDirectoryState = vue.ref("pure");
|
|
55
55
|
let isIgnoreChange = false;
|
|
56
56
|
let chatInstance;
|
|
57
57
|
const [AIMenu, AIChart] = customMenu.initCustomMenu(c, {
|
|
@@ -355,6 +355,7 @@ const IBizMarkDown = /* @__PURE__ */ vue.defineComponent({
|
|
|
355
355
|
}
|
|
356
356
|
}
|
|
357
357
|
});
|
|
358
|
+
editor.toggleToc("pure");
|
|
358
359
|
editor.setTheme(theme.value);
|
|
359
360
|
if (customTheme) {
|
|
360
361
|
editor.setTheme(customTheme);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.ibiz-markdown{--ibiz-markdown-width:100%;--ibiz-markdown-color-manual-toolbar-bg-save:var(--ibiz-color-primary);--ibiz-markdown-color-manual-toolbar-text-save:var(--ibiz-color-primary-active-text);--ibiz-markdown-color-manual-toolbar-text-cancel:var(--ibiz-color-text-1);--ibiz-markdown-color-manual-toolbar-text-cancel-hover:var(--ibiz-color-primary);--ibiz-markdown-color-dark-scrollbar-thumb-dark:rgb(var(--ibiz-grey-4));--ibiz-markdown-color-light-scrollbar-thumb-dark:rgb(var(--ibiz-grey-4));--ibiz-markdown-color-scrollbar-thumb-dark-hover:rgba(var(--ibiz-grey-4), 0.5);--ibiz-markdown-color-dark-toc-text:var(--ibiz-color-fill-0);--ibiz-markdown-color-toc-header-text:var(--ibiz-color-text-0);--ibiz-markdown-color-dark-mardown-border:rgb(var(--ibiz-grey-2));--ibiz-markdown-spacing-manual-toolbar-height:32px;--ibiz-markdown-spacing-manual-toolbar-gap:var(--ibiz-spacing-base);--ibiz-markdown-spacing-manual-toolbar-item-padding:0 var(--ibiz-spacing-base);--ibiz-markdown-spacing-manual-toolbar-margin:var(--ibiz-spacing-base-tight) var(--ibiz-spacing-tight) 0 0;--ibiz-markdown-spacing-manual-toolbar-fullscreen-height:var(--ibiz-height-control-default);--ibiz-markdown-spacing-manual-toolbar-fullscreen-padding:0 var(--ibiz-spacing-extra-loose);--ibiz-markdown-spacing-manual-toolbar-fullscreen-height-header:var(--ibiz-spacing-super-loose);--ibiz-markdown-height-manual-toolbar-height:var(--ibiz-height-control-default);--ibiz-markdown-border-radius-manual-toolbar-item:var(--ibiz-border-radius-small);--ibiz-markdown-border-manual-toolbar-fullscreen-footer:1px solid var(--ibiz-color-border);--ibiz-markdown-img-preview-top:-32px;--ibiz-markdown-img-preview-right:-36px;--ibiz-markdown-img-preview-width:32px;--ibiz-markdown-img-preview-height:32px}.ibiz-markdown__header{display:flex;flex-shrink:0;gap:var(--ibiz-markdown-spacing-manual-toolbar-gap);align-items:center;justify-content:end;height:var(--ibiz-markdown-spacing-manual-toolbar-height)}.ibiz-markdown__header--edit{cursor:pointer}.ibiz-markdown__header--full{cursor:pointer}.ibiz-markdown__header.is-fullscreen{position:fixed;top:0;right:0;left:0;z-index:999;width:100%;height:calc(var(--ibiz-markdown-spacing-manual-toolbar-fullscreen-height-header));padding:var(--ibiz-markdown-spacing-manual-toolbar-fullscreen-padding);margin-top:0;background-color:var(--ibiz-view-bg-color)}.ibiz-markdown__header.is-fullscreen+.ibiz-markdown-cherry .cherry.fullscreen{top:calc(var(--ibiz-markdown-spacing-manual-toolbar-fullscreen-height-header));height:calc(100% - var(--ibiz-markdown-spacing-manual-toolbar-fullscreen-height-header))}.ibiz-markdown__footer{display:flex;gap:var(--ibiz-markdown-spacing-manual-toolbar-gap);align-items:center;justify-content:end;height:var(--ibiz-markdown-spacing-manual-toolbar-height);margin:var(--ibiz-markdown-spacing-manual-toolbar-margin)}.ibiz-markdown__footer--save{height:var(--ibiz-markdown-height-manual-toolbar-height);padding:var(--ibiz-markdown-spacing-manual-toolbar-item-padding);line-height:var(--ibiz-markdown-height-manual-toolbar-height);color:var(--ibiz-markdown-color-manual-toolbar-text-save);text-align:center;cursor:pointer;background-color:var(--ibiz-markdown-color-manual-toolbar-bg-save);border-radius:var(--ibiz-markdown-border-radius-manual-toolbar-item)}.ibiz-markdown__footer--cancel{color:var(--ibiz-markdown-color-manual-toolbar-text-cancel);cursor:pointer}.ibiz-markdown__footer--cancel:hover{color:var(--ibiz-markdown-color-manual-toolbar-text-cancel-hover)}.ibiz-markdown__footer.is-fullscreen{position:fixed;right:0;bottom:0;left:0;z-index:999;width:100%;height:calc(var(--ibiz-markdown-spacing-manual-toolbar-fullscreen-height) * 2);padding:var(--ibiz-markdown-spacing-manual-toolbar-fullscreen-padding);margin-top:0;background-color:var(--ibiz-view-bg-color);border-top:var(--ibiz-markdown-border-manual-toolbar-fullscreen-footer)}.ibiz-markdown__footer.is-fullscreen+.ibiz-markdown-cherry .cherry.fullscreen{height:calc(100% - var(--ibiz-markdown-spacing-manual-toolbar-fullscreen-height) * 2)}.ibiz-markdown__img-preview.el-image{position:absolute;height:0}.ibiz-markdown__img-preview .el-image-viewer__wrapper{width:90%;height:90%;margin:auto}.ibiz-markdown__img-preview .el-image-viewer__mask{position:fixed;width:100vw;height:100vh;cursor:zoom-out;opacity:.7}.ibiz-markdown__img-preview .el-image-viewer__close{top:var(--ibiz-markdown-img-preview-top);right:var(--ibiz-markdown-img-preview-right);width:var(--ibiz-markdown-img-preview-width);height:var(--ibiz-markdown-img-preview-height)}.ibiz-markdown .ibiz-markdown-cherry{width:var(--ibiz-markdown-width);outline:0}.ibiz-markdown .ibiz-markdown-cherry .cherry{width:100%;border:1px solid var(--ibiz-color-border);box-shadow:none}.ibiz-markdown .ibiz-markdown-cherry .cherry .cherry-toolbar{box-shadow:none}.ibiz-markdown .ibiz-markdown-cherry .cherry .cherry-editor{border-top:1px solid var(--ibiz-color-border)}.ibiz-markdown .ibiz-markdown-cherry .cherry .cherry-previewer{border-top:1px solid var(--ibiz-color-border)}.ibiz-markdown .ibiz-markdown-cherry .cherry .cherry-previewer img{cursor:zoom-in}.ibiz-markdown .ibiz-markdown-cherry .cherry .cherry-sidebar{border-left:1px solid var(--ibiz-color-border);box-shadow:none}.ibiz-markdown.is-disabled .cherry{min-height:auto}.ibiz-markdown.is-disabled .ibiz-markdown__fullscreen{position:absolute;top:8px;right:12px;z-index:98;font-size:var(--ibiz-font-size-regular);line-height:2.8}.ibiz-markdown.is-disabled .theme__dark .ibiz-markdown__fullscreen{color:var(--ibiz-color-text-0)}.ibiz-markdown.is-disabled .theme__dark .ibiz-markdown__fullscreen:hover{background-color:var(--ibiz-color-bg-3)}.ibiz-markdown.is-manual{display:flex;flex-direction:column}.ibiz-markdown.is-manual .ibiz-markdown-cherry{flex-grow:1;height:calc(100% - var(--ibiz-markdown-spacing-manual-toolbar-height))!important}.ibiz-markdown.is-manual.is-editing{flex-direction:column-reverse}.ibiz-markdown.is-manual .ibiz-markdown-menu{display:none}.ibiz-markdown.is-manual.is-editing .ibiz-markdown-menu{display:block}.ibiz-markdown.is-show-editor-switch-menu .ibiz-composite-form-item-ex-menu{--ibiz-composite-form-item-ex-menu-height:47px;--ibiz-composite-form-item-ex-menu-padding:var(--ibiz-spacing-tight) var(--ibiz-spacing-tight) 0;max-height:100%}.ibiz-markdown.is-show-editor-switch-menu .cherry-toolbar{padding-right:calc(var(--ibiz-composite-form-item-ex-menu-width) +
|
|
1
|
+
.ibiz-markdown{--ibiz-markdown-width:100%;--ibiz-markdown-color-manual-toolbar-bg-save:var(--ibiz-color-primary);--ibiz-markdown-color-manual-toolbar-text-save:var(--ibiz-color-primary-active-text);--ibiz-markdown-color-manual-toolbar-text-cancel:var(--ibiz-color-text-1);--ibiz-markdown-color-manual-toolbar-text-cancel-hover:var(--ibiz-color-primary);--ibiz-markdown-color-dark-scrollbar-thumb-dark:rgb(var(--ibiz-grey-4));--ibiz-markdown-color-light-scrollbar-thumb-dark:rgb(var(--ibiz-grey-4));--ibiz-markdown-color-scrollbar-thumb-dark-hover:rgba(var(--ibiz-grey-4), 0.5);--ibiz-markdown-color-dark-toc-text:var(--ibiz-color-fill-0);--ibiz-markdown-color-toc-header-text:var(--ibiz-color-text-0);--ibiz-markdown-color-dark-mardown-border:rgb(var(--ibiz-grey-2));--ibiz-markdown-spacing-manual-toolbar-height:32px;--ibiz-markdown-spacing-manual-toolbar-gap:var(--ibiz-spacing-base);--ibiz-markdown-spacing-manual-toolbar-item-padding:0 var(--ibiz-spacing-base);--ibiz-markdown-spacing-manual-toolbar-margin:var(--ibiz-spacing-base-tight) var(--ibiz-spacing-tight) 0 0;--ibiz-markdown-spacing-manual-toolbar-fullscreen-height:var(--ibiz-height-control-default);--ibiz-markdown-spacing-manual-toolbar-fullscreen-padding:0 var(--ibiz-spacing-extra-loose);--ibiz-markdown-spacing-manual-toolbar-fullscreen-height-header:var(--ibiz-spacing-super-loose);--ibiz-markdown-height-manual-toolbar-height:var(--ibiz-height-control-default);--ibiz-markdown-border-radius-manual-toolbar-item:var(--ibiz-border-radius-small);--ibiz-markdown-border-manual-toolbar-fullscreen-footer:1px solid var(--ibiz-color-border);--ibiz-markdown-img-preview-top:-32px;--ibiz-markdown-img-preview-right:-36px;--ibiz-markdown-img-preview-width:32px;--ibiz-markdown-img-preview-height:32px}.ibiz-markdown__header{display:flex;flex-shrink:0;gap:var(--ibiz-markdown-spacing-manual-toolbar-gap);align-items:center;justify-content:end;height:var(--ibiz-markdown-spacing-manual-toolbar-height)}.ibiz-markdown__header--edit{cursor:pointer}.ibiz-markdown__header--full{cursor:pointer}.ibiz-markdown__header.is-fullscreen{position:fixed;top:0;right:0;left:0;z-index:999;width:100%;height:calc(var(--ibiz-markdown-spacing-manual-toolbar-fullscreen-height-header));padding:var(--ibiz-markdown-spacing-manual-toolbar-fullscreen-padding);margin-top:0;background-color:var(--ibiz-view-bg-color)}.ibiz-markdown__header.is-fullscreen+.ibiz-markdown-cherry .cherry.fullscreen{top:calc(var(--ibiz-markdown-spacing-manual-toolbar-fullscreen-height-header));height:calc(100% - var(--ibiz-markdown-spacing-manual-toolbar-fullscreen-height-header))}.ibiz-markdown__footer{display:flex;gap:var(--ibiz-markdown-spacing-manual-toolbar-gap);align-items:center;justify-content:end;height:var(--ibiz-markdown-spacing-manual-toolbar-height);margin:var(--ibiz-markdown-spacing-manual-toolbar-margin)}.ibiz-markdown__footer--save{height:var(--ibiz-markdown-height-manual-toolbar-height);padding:var(--ibiz-markdown-spacing-manual-toolbar-item-padding);line-height:var(--ibiz-markdown-height-manual-toolbar-height);color:var(--ibiz-markdown-color-manual-toolbar-text-save);text-align:center;cursor:pointer;background-color:var(--ibiz-markdown-color-manual-toolbar-bg-save);border-radius:var(--ibiz-markdown-border-radius-manual-toolbar-item)}.ibiz-markdown__footer--cancel{color:var(--ibiz-markdown-color-manual-toolbar-text-cancel);cursor:pointer}.ibiz-markdown__footer--cancel:hover{color:var(--ibiz-markdown-color-manual-toolbar-text-cancel-hover)}.ibiz-markdown__footer.is-fullscreen{position:fixed;right:0;bottom:0;left:0;z-index:999;width:100%;height:calc(var(--ibiz-markdown-spacing-manual-toolbar-fullscreen-height) * 2);padding:var(--ibiz-markdown-spacing-manual-toolbar-fullscreen-padding);margin-top:0;background-color:var(--ibiz-view-bg-color);border-top:var(--ibiz-markdown-border-manual-toolbar-fullscreen-footer)}.ibiz-markdown__footer.is-fullscreen+.ibiz-markdown-cherry .cherry.fullscreen{height:calc(100% - var(--ibiz-markdown-spacing-manual-toolbar-fullscreen-height) * 2)}.ibiz-markdown__img-preview.el-image{position:absolute;height:0}.ibiz-markdown__img-preview .el-image-viewer__wrapper{width:90%;height:90%;margin:auto}.ibiz-markdown__img-preview .el-image-viewer__mask{position:fixed;width:100vw;height:100vh;cursor:zoom-out;opacity:.7}.ibiz-markdown__img-preview .el-image-viewer__close{top:var(--ibiz-markdown-img-preview-top);right:var(--ibiz-markdown-img-preview-right);width:var(--ibiz-markdown-img-preview-width);height:var(--ibiz-markdown-img-preview-height)}.ibiz-markdown .ibiz-markdown-cherry{width:var(--ibiz-markdown-width);outline:0}.ibiz-markdown .ibiz-markdown-cherry .cherry{width:100%;border:1px solid var(--ibiz-color-border);box-shadow:none}.ibiz-markdown .ibiz-markdown-cherry .cherry .cherry-toolbar{box-shadow:none}.ibiz-markdown .ibiz-markdown-cherry .cherry .cherry-editor{border-top:1px solid var(--ibiz-color-border)}.ibiz-markdown .ibiz-markdown-cherry .cherry .cherry-previewer{border-top:1px solid var(--ibiz-color-border)}.ibiz-markdown .ibiz-markdown-cherry .cherry .cherry-previewer img{cursor:zoom-in}.ibiz-markdown .ibiz-markdown-cherry .cherry .cherry-sidebar{top:49px;border-left:1px solid var(--ibiz-color-border);box-shadow:none}.ibiz-markdown.is-disabled .cherry{min-height:auto}.ibiz-markdown.is-disabled .ibiz-markdown__fullscreen{position:absolute;top:8px;right:12px;z-index:98;font-size:var(--ibiz-font-size-regular);line-height:2.8}.ibiz-markdown.is-disabled .theme__dark .ibiz-markdown__fullscreen{color:var(--ibiz-color-text-0)}.ibiz-markdown.is-disabled .theme__dark .ibiz-markdown__fullscreen:hover{background-color:var(--ibiz-color-bg-3)}.ibiz-markdown.is-manual{display:flex;flex-direction:column}.ibiz-markdown.is-manual .ibiz-markdown-cherry{flex-grow:1;height:calc(100% - var(--ibiz-markdown-spacing-manual-toolbar-height))!important}.ibiz-markdown.is-manual.is-editing{flex-direction:column-reverse}.ibiz-markdown.is-manual .ibiz-markdown-menu{display:none}.ibiz-markdown.is-manual.is-editing .ibiz-markdown-menu{display:block}.ibiz-markdown.is-show-editor-switch-menu .ibiz-composite-form-item-ex-menu{--ibiz-composite-form-item-ex-menu-height:47px;--ibiz-composite-form-item-ex-menu-padding:var(--ibiz-spacing-tight) var(--ibiz-spacing-base-tight) 0;max-height:100%}.ibiz-markdown.is-show-editor-switch-menu .cherry-toolbar{padding-right:calc(var(--ibiz-composite-form-item-ex-menu-width) + var(--ibiz-spacing-extra-tight))}.ibiz-markdown.is-show-editor-switch-menu .ibiz-markdown-menu{position:absolute;top:1px;right:1px;z-index:var(--ibiz-composite-form-item-ex-menu-z-index);display:flex;align-items:center;height:calc(var(--ibiz-markdown-toolbar-height) - 1px);background:var(--ibiz-composite-form-item-ex-menu-bg-color);border-right:1px solid var(--ibiz-color-border);border-left:1px solid var(--ibiz-color-border)}.ibiz-markdown.is-show-editor-switch-menu .ibiz-markdown-menu.is-fullscreen{position:fixed;z-index:1000}.ibiz-markdown.is-show-editor-switch-menu .ibiz-markdown-menu .ibiz-composite-form-item-ex-menu{position:relative}.ibiz-markdown .cherry-preview--full{border-left:none}.ibiz-markdown .theme__dark,.ibiz-markdown .theme__light{color:var(--ibiz-form-item-text-color)}.ibiz-markdown .cherry-markdown h1 a::before,.ibiz-markdown .cherry-markdown h2 a::before,.ibiz-markdown .cherry-markdown h3 a::before,.ibiz-markdown .cherry-markdown h4 a::before,.ibiz-markdown .cherry-markdown h5 a::before,.ibiz-markdown .cherry-markdown h6 a::before{display:none}.ibiz-markdown .cherry.fullscreen{z-index:999}.ibiz-markdown--light .theme__green .cherry-toolbar,.ibiz-markdown--light .theme__light .cherry-toolbar,.ibiz-markdown--light .theme__violet .cherry-toolbar{background-color:var(--ibiz-color-bg-0)}.ibiz-markdown--light .theme__dark.cherry .cherry-flex-toc{color:var(--ibiz-markdown-color-toc-header-text)}.ibiz-markdown--light .theme__dark.cherry ::-webkit-scrollbar-thumb{background:var(--ibiz-markdown-color-light-scrollbar-thumb-dark)}.ibiz-markdown--light .theme__dark.cherry ::-webkit-scrollbar-thumb:hover{background:var(--ibiz-markdown-color-scrollbar-thumb-dark-hover)}.ibiz-markdown--dark.ibiz-markdown-cherry .cherry{border:1px solid var(--ibiz-markdown-color-dark-mardown-border)}.ibiz-markdown--dark .theme__green .cherry-toolbar,.ibiz-markdown--dark .theme__light .cherry-toolbar,.ibiz-markdown--dark .theme__violet .cherry-toolbar{background-color:var(--ibiz-color-shadow)}.ibiz-markdown--dark .theme__dark.cherry .cherry-toc-head{color:var(--ibiz-markdown-color-dark-toc-text)}.ibiz-markdown--dark .theme__dark.cherry ::-webkit-scrollbar-thumb{background:var(--ibiz-markdown-color-dark-scrollbar-thumb-dark)}.ibiz-markdown--dark .theme__dark.cherry ::-webkit-scrollbar-thumb:hover{background:var(--ibiz-markdown-color-scrollbar-thumb-dark-hover)}
|
|
@@ -3,9 +3,7 @@
|
|
|
3
3
|
var vue = require('vue');
|
|
4
4
|
var lodashEs = require('lodash-es');
|
|
5
5
|
var vue3Util = require('@ibiz-template/vue3-util');
|
|
6
|
-
var runtime = require('@ibiz-template/runtime');
|
|
7
6
|
var core = require('@ibiz-template/core');
|
|
8
|
-
var qxUtil = require('qx-util');
|
|
9
7
|
require('./input.css');
|
|
10
8
|
|
|
11
9
|
"use strict";
|
|
@@ -166,24 +164,19 @@ const IBizInput = /* @__PURE__ */ vue.defineComponent({
|
|
|
166
164
|
const appDataEntityId = c.model.appDataEntityId;
|
|
167
165
|
if (!appDataEntityId || !c.deACMode)
|
|
168
166
|
return;
|
|
169
|
-
const {
|
|
170
|
-
contentToolbarItems,
|
|
171
|
-
footerToolbarItems,
|
|
172
|
-
questionToolbarItems,
|
|
173
|
-
otherToolbarItems
|
|
174
|
-
} = ibiz.aiChatUtil.calcAiToolbarItemsByAc(c.deACMode);
|
|
175
|
-
const aiAgentlist = await ibiz.aiChatUtil.getAIAgentList(c.context, c.params);
|
|
176
|
-
const {
|
|
177
|
-
containerOptions,
|
|
178
|
-
chatOptions
|
|
179
|
-
} = ibiz.aiChatUtil.getEditorExAIChatParams(c.editorParams, c.context, c.params, props.data);
|
|
180
167
|
const {
|
|
181
168
|
zIndex
|
|
182
169
|
} = vue3Util.useUIStore();
|
|
183
170
|
const containerZIndex = zIndex.increment();
|
|
184
171
|
chatInstance = await ibiz.aiChatUtil.getAIChat();
|
|
185
|
-
|
|
186
|
-
|
|
172
|
+
const {
|
|
173
|
+
containerOptions,
|
|
174
|
+
chatOptions
|
|
175
|
+
} = await ibiz.aiChatUtil.getEditorExAIChatParams(c.editorParams, c.context, c.params, props.data, c.deACMode, {
|
|
176
|
+
chatInstance,
|
|
177
|
+
view: c.view,
|
|
178
|
+
ctrl: c.ctrl
|
|
179
|
+
});
|
|
187
180
|
chatInstance.create({
|
|
188
181
|
containerOptions: {
|
|
189
182
|
zIndex: containerZIndex,
|
|
@@ -199,191 +192,10 @@ const IBizInput = /* @__PURE__ */ vue.defineComponent({
|
|
|
199
192
|
srfactag: c.deACMode.codeName
|
|
200
193
|
},
|
|
201
194
|
appDataEntityId,
|
|
202
|
-
contentToolbarItems,
|
|
203
|
-
footerToolbarItems,
|
|
204
|
-
questionToolbarItems,
|
|
205
|
-
otherToolbarItems,
|
|
206
|
-
aiAgentlist,
|
|
207
195
|
...chatOptions,
|
|
208
|
-
question: async (aiChat, ctx, param, other, arr, sessionid, srfaiagent, srfmode) => {
|
|
209
|
-
id = qxUtil.createUUID();
|
|
210
|
-
abortController = new AbortController();
|
|
211
|
-
const deService = await ibiz.hub.getApp(ctx.srfappid).deService.getService(ctx, other.appDataEntityId);
|
|
212
|
-
try {
|
|
213
|
-
const questionRequestData = {
|
|
214
|
-
messages: arr,
|
|
215
|
-
sessionid
|
|
216
|
-
};
|
|
217
|
-
if (srfaiagent) {
|
|
218
|
-
questionRequestData.srfaiagent = srfaiagent;
|
|
219
|
-
}
|
|
220
|
-
if (srfmode) {
|
|
221
|
-
questionRequestData.mode = srfmode;
|
|
222
|
-
}
|
|
223
|
-
await deService.aiChatSse((msg) => {
|
|
224
|
-
if (msg.actionstate === 20 && msg.actionresult) {
|
|
225
|
-
aiChat.addMessage({
|
|
226
|
-
messageid: id,
|
|
227
|
-
state: msg.actionstate,
|
|
228
|
-
type: "DEFAULT",
|
|
229
|
-
role: "ASSISTANT",
|
|
230
|
-
content: msg.actionresult
|
|
231
|
-
});
|
|
232
|
-
} else if (msg.actionstate === 30 && msg.actionresult) {
|
|
233
|
-
const result = JSON.parse(msg.actionresult);
|
|
234
|
-
const choices = result.choices;
|
|
235
|
-
if (choices && choices.length > 0) {
|
|
236
|
-
aiChat.replaceMessage({
|
|
237
|
-
messageid: id,
|
|
238
|
-
state: msg.actionstate,
|
|
239
|
-
type: "DEFAULT",
|
|
240
|
-
role: "ASSISTANT",
|
|
241
|
-
content: choices[0].content || ""
|
|
242
|
-
});
|
|
243
|
-
}
|
|
244
|
-
} else if (msg.actionstate === 40) {
|
|
245
|
-
aiChat.replaceMessage({
|
|
246
|
-
messageid: id,
|
|
247
|
-
state: msg.actionstate,
|
|
248
|
-
type: "ERROR",
|
|
249
|
-
role: "ASSISTANT",
|
|
250
|
-
content: msg.actionresult
|
|
251
|
-
});
|
|
252
|
-
}
|
|
253
|
-
}, abortController, ctx, param, {
|
|
254
|
-
...questionRequestData
|
|
255
|
-
});
|
|
256
|
-
} catch (error) {
|
|
257
|
-
aiChat.replaceMessage({
|
|
258
|
-
messageid: id,
|
|
259
|
-
state: 40,
|
|
260
|
-
type: "ERROR",
|
|
261
|
-
role: "ASSISTANT",
|
|
262
|
-
content: error.message || ibiz.i18n.t("app.aiError")
|
|
263
|
-
});
|
|
264
|
-
abortController == null ? void 0 : abortController.abort();
|
|
265
|
-
} finally {
|
|
266
|
-
aiChat.completeMessage(id, true);
|
|
267
|
-
return true;
|
|
268
|
-
}
|
|
269
|
-
},
|
|
270
|
-
abortQuestion: async (aiChat) => {
|
|
271
|
-
abortController == null ? void 0 : abortController.abort();
|
|
272
|
-
await aiChat.stopMessage({
|
|
273
|
-
messageid: id,
|
|
274
|
-
state: 30,
|
|
275
|
-
type: "DEFAULT",
|
|
276
|
-
role: "ASSISTANT",
|
|
277
|
-
content: ""
|
|
278
|
-
});
|
|
279
|
-
await aiChat.completeMessage(id, true);
|
|
280
|
-
},
|
|
281
196
|
action: (action, message) => {
|
|
282
197
|
if (action === "backfill")
|
|
283
198
|
emit("change", message.realcontent);
|
|
284
|
-
},
|
|
285
|
-
history: async (ctx, param, other) => {
|
|
286
|
-
const deService = await ibiz.hub.getApp(ctx.srfappid).deService.getService(ctx, other.appDataEntityId);
|
|
287
|
-
const historyRequestData = {};
|
|
288
|
-
if (other.appendCurData) {
|
|
289
|
-
Object.assign(historyRequestData, {
|
|
290
|
-
...other.appendCurData
|
|
291
|
-
});
|
|
292
|
-
}
|
|
293
|
-
if (other.srfaiagent) {
|
|
294
|
-
Object.assign(historyRequestData, {
|
|
295
|
-
srfaiagent: other.srfaiagent
|
|
296
|
-
});
|
|
297
|
-
}
|
|
298
|
-
if (other.srfmode) {
|
|
299
|
-
Object.assign(historyRequestData, {
|
|
300
|
-
mode: other.srfmode
|
|
301
|
-
});
|
|
302
|
-
}
|
|
303
|
-
const result = await deService.aiChatHistory(ctx, param, historyRequestData);
|
|
304
|
-
if (result.data && Array.isArray(result.data)) {
|
|
305
|
-
let preMsg;
|
|
306
|
-
result.data.forEach((item) => {
|
|
307
|
-
if (item.role === "TOOL") {
|
|
308
|
-
if (preMsg && item.content) {
|
|
309
|
-
chatInstance.aiChat.updateRecommendPrompt(preMsg, item.content);
|
|
310
|
-
}
|
|
311
|
-
} else {
|
|
312
|
-
const msg = {
|
|
313
|
-
messageid: qxUtil.createUUID(),
|
|
314
|
-
state: 30,
|
|
315
|
-
type: "DEFAULT",
|
|
316
|
-
role: item.role,
|
|
317
|
-
content: item.content,
|
|
318
|
-
completed: true
|
|
319
|
-
};
|
|
320
|
-
preMsg = msg;
|
|
321
|
-
chatInstance.aiChat.addMessage(msg);
|
|
322
|
-
}
|
|
323
|
-
});
|
|
324
|
-
}
|
|
325
|
-
return true;
|
|
326
|
-
},
|
|
327
|
-
recommendPrompt: async (ctx, param, other) => {
|
|
328
|
-
const deService = await ibiz.hub.getApp(ctx.srfappid).deService.getService(ctx, other.appDataEntityId);
|
|
329
|
-
const result = await deService.aiChatRecommendPrompt(ctx, param, other.message);
|
|
330
|
-
if (result.ok && result.data) {
|
|
331
|
-
const choices = result.data.choices;
|
|
332
|
-
if (choices && choices.length > 0) {
|
|
333
|
-
return choices[0];
|
|
334
|
-
}
|
|
335
|
-
return null;
|
|
336
|
-
}
|
|
337
|
-
return null;
|
|
338
|
-
},
|
|
339
|
-
uploader: {
|
|
340
|
-
onUpload: async (file, reportProgress, options) => {
|
|
341
|
-
const fileMeata = ibiz.util.file.calcFileUpDownUrl((options == null ? void 0 : options.context) || c.context, (options == null ? void 0 : options.params) || c.params, {});
|
|
342
|
-
const uploadHeaders = ibiz.util.file.getUploadHeaders();
|
|
343
|
-
const formData = new FormData();
|
|
344
|
-
formData.append("file", file);
|
|
345
|
-
const res = await ibiz.net.axios({
|
|
346
|
-
url: fileMeata.uploadUrl,
|
|
347
|
-
method: "post",
|
|
348
|
-
headers: uploadHeaders,
|
|
349
|
-
data: formData,
|
|
350
|
-
onUploadProgress: (progressEvent) => {
|
|
351
|
-
const percent = progressEvent.loaded / progressEvent.total * 100;
|
|
352
|
-
reportProgress(percent);
|
|
353
|
-
}
|
|
354
|
-
});
|
|
355
|
-
return res.data;
|
|
356
|
-
}
|
|
357
|
-
},
|
|
358
|
-
extendToolbarClick: async (event, source, context, params, data) => {
|
|
359
|
-
var _a, _b;
|
|
360
|
-
const result = await runtime.UIActionUtil.exec(source.id, {
|
|
361
|
-
view: c.view,
|
|
362
|
-
ctrl: c.ctrl,
|
|
363
|
-
context: core.IBizContext.create(context),
|
|
364
|
-
params,
|
|
365
|
-
data: [data],
|
|
366
|
-
event
|
|
367
|
-
}, source.appId);
|
|
368
|
-
if (result.closeView) {
|
|
369
|
-
c.view.closeView({
|
|
370
|
-
ok: true
|
|
371
|
-
});
|
|
372
|
-
} else if (result.refresh) {
|
|
373
|
-
switch (result.refreshMode) {
|
|
374
|
-
case 1:
|
|
375
|
-
c.view.callUIAction(runtime.SysUIActionTag.REFRESH);
|
|
376
|
-
break;
|
|
377
|
-
case 2:
|
|
378
|
-
(_a = c.view.parentView) == null ? void 0 : _a.callUIAction(runtime.SysUIActionTag.REFRESH);
|
|
379
|
-
break;
|
|
380
|
-
case 3:
|
|
381
|
-
(_b = c.view.getTopView()) == null ? void 0 : _b.callUIAction(runtime.SysUIActionTag.REFRESH);
|
|
382
|
-
break;
|
|
383
|
-
default:
|
|
384
|
-
}
|
|
385
|
-
}
|
|
386
|
-
return result;
|
|
387
199
|
}
|
|
388
200
|
}
|
|
389
201
|
});
|
package/lib/locale/en/index.cjs
CHANGED
|
@@ -486,7 +486,7 @@ var index = {
|
|
|
486
486
|
},
|
|
487
487
|
toolbar: {
|
|
488
488
|
exportExcel: {
|
|
489
|
-
exportAll: "Export all(Export up to
|
|
489
|
+
exportAll: "Export all(Export up to {maxRowCount} rows)",
|
|
490
490
|
expCurrentPage: "Export current page",
|
|
491
491
|
expCurrentSelect: "Export the current selection",
|
|
492
492
|
page: "Page",
|
|
@@ -852,6 +852,29 @@ var index = {
|
|
|
852
852
|
warningDesc: "Are you sure to terminate the creation?",
|
|
853
853
|
thinking: "In depth thinking",
|
|
854
854
|
thinked: "Deeply pondered"
|
|
855
|
+
},
|
|
856
|
+
aiChartUtil: {
|
|
857
|
+
feedback: "Feedback",
|
|
858
|
+
description: "Description",
|
|
859
|
+
regardingIssue: "Regarding the problem",
|
|
860
|
+
understandProblem: "Not understanding the problem",
|
|
861
|
+
forgotContext: "Forgot the previous text",
|
|
862
|
+
notFollowingRequire: "Not Following Requirements",
|
|
863
|
+
regardingResponse: "Regarding the effectiveness of the answer",
|
|
864
|
+
incorrectAswer: "Incorrect answer",
|
|
865
|
+
logicalConfusion: "Logical confusion",
|
|
866
|
+
poorTimeliness: "Poor timeliness",
|
|
867
|
+
poorReadability: "Poor readability",
|
|
868
|
+
incompleteAnswer: "Incomplete answer",
|
|
869
|
+
unprofessional: "The answer is vague and unprofessional",
|
|
870
|
+
report: "Report",
|
|
871
|
+
pornographicVulgar: "Pornographic Vulgar",
|
|
872
|
+
politicallySensitive: "Politically sensitive",
|
|
873
|
+
illegalCriminal: "Illegal crime",
|
|
874
|
+
discriminationPrejudice: "Discrimination or Prejudice Answer",
|
|
875
|
+
violationPrivacy: "Violation of Privacy",
|
|
876
|
+
contentInfringement: "Content infringement",
|
|
877
|
+
placeholder: "Please enter"
|
|
855
878
|
}
|
|
856
879
|
},
|
|
857
880
|
// runTime
|
|
@@ -482,7 +482,7 @@ var index = {
|
|
|
482
482
|
},
|
|
483
483
|
toolbar: {
|
|
484
484
|
exportExcel: {
|
|
485
|
-
exportAll: "\u5BFC\u51FA\u5168\u90E8(\u6700\u5927\u5BFC\
|
|
485
|
+
exportAll: "\u5BFC\u51FA\u5168\u90E8(\u6700\u5927\u5BFC\u51FA{maxRowCount}\u884C)",
|
|
486
486
|
expCurrentPage: "\u5BFC\u51FA\u5F53\u524D\u9875",
|
|
487
487
|
expCurrentSelect: "\u5BFC\u51FA\u5F53\u524D\u9009\u4E2D",
|
|
488
488
|
page: "\u9875",
|
|
@@ -848,6 +848,29 @@ var index = {
|
|
|
848
848
|
warningDesc: "\u786E\u8BA4\u4E2D\u6B62\u521B\u4F5C\u5417\uFF1F",
|
|
849
849
|
thinking: "\u6DF1\u5EA6\u601D\u8003\u4E2D",
|
|
850
850
|
thinked: "\u5DF2\u6DF1\u5EA6\u601D\u8003"
|
|
851
|
+
},
|
|
852
|
+
aiChartUtil: {
|
|
853
|
+
feedback: "\u53CD\u9988",
|
|
854
|
+
description: "\u63CF\u8FF0",
|
|
855
|
+
regardingIssue: "\u9488\u5BF9\u95EE\u9898",
|
|
856
|
+
understandProblem: "\u4E0D\u7406\u89E3\u95EE\u9898",
|
|
857
|
+
forgotContext: "\u9057\u5FD8\u4E86\u4E0A\u6587",
|
|
858
|
+
notFollowingRequire: "\u4E0D\u9075\u5FAA\u8981\u6C42",
|
|
859
|
+
regardingResponse: "\u9488\u5BF9\u56DE\u7B54\u6548\u679C",
|
|
860
|
+
incorrectAswer: "\u56DE\u7B54\u9519\u8BEF",
|
|
861
|
+
logicalConfusion: "\u903B\u8F91\u6DF7\u4E71",
|
|
862
|
+
poorTimeliness: "\u65F6\u6548\u6027\u5DEE",
|
|
863
|
+
poorReadability: "\u53EF\u8BFB\u6027\u5DEE",
|
|
864
|
+
incompleteAnswer: "\u56DE\u7B54\u4E0D\u5B8C\u6574",
|
|
865
|
+
unprofessional: "\u56DE\u7B54\u7B3C\u7EDF\u4E0D\u4E13\u4E1A",
|
|
866
|
+
report: "\u4E3E\u62A5",
|
|
867
|
+
pornographicVulgar: "\u8272\u60C5\u4F4E\u4FD7",
|
|
868
|
+
politicallySensitive: "\u653F\u6CBB\u654F\u611F",
|
|
869
|
+
illegalCriminal: "\u8FDD\u6CD5\u72AF\u7F6A",
|
|
870
|
+
discriminationPrejudice: "\u6B67\u89C6\u6216\u504F\u89C1\u56DE\u7B54",
|
|
871
|
+
violationPrivacy: "\u4FB5\u72AF\u9690\u79C1",
|
|
872
|
+
contentInfringement: "\u5185\u5BB9\u4FB5\u6743",
|
|
873
|
+
placeholder: "\u8BF7\u8F93\u5165"
|
|
851
874
|
}
|
|
852
875
|
},
|
|
853
876
|
// runTime
|