@fses/workbench-app 0.2.2 → 0.2.4
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/WORKBENCH-CLOSURE.json +12 -12
- package/dist/{Workspace-fYH2XNdb.js → Workspace-CIfCreXf.js} +6 -7
- package/dist/fses-workbench-app.js +4 -4
- package/dist/{index-CbIJlts1.js → index-xopzCjp-.js} +239 -234
- package/dist/internal/personal-workbench/lib/cardRecommendationIdentity.d.ts +37 -0
- package/dist/internal/personal-workbench/lib/workbenchCardRecommendationReturnItemUpsert.d.ts +32 -0
- package/dist/runtime/index.js +1 -1
- package/dist/style.css +1 -1
- package/dist/{useWorkbenchRuntime-Ch8lqkjO.js → useWorkbenchRuntime-Bn92SaQG.js} +6030 -5843
- package/node_modules/@fses/ai-chat/dist/fses-ai-chat.js +293 -293
- package/node_modules/@fses/ai-chat/dist/fses-ai-chat.umd.cjs +1 -1
- package/node_modules/@fses/ai-chat/dist/style.css +1 -1
- package/node_modules/@fses/ai-chat/package.json +5 -5
- package/node_modules/@fses/workbench-card/dist/fses-workbench-card-echarts-protocol.js +656 -641
- package/node_modules/@fses/workbench-card/dist/fses-workbench-card-renderers.js +2425 -2410
- package/node_modules/@fses/workbench-card/package.json +1 -1
- package/node_modules/@fses/workbench-card/src/renderers/chart/echarts-protocol/converters/series.converter.ts +34 -13
- package/package.json +3 -3
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import { toRefs as
|
|
1
|
+
import { toRefs as te, shallowReadonly as W, inject as oe, defineComponent as E, provide as ae, openBlock as b, createElementBlock as k, renderSlot as g, createElementVNode as A, normalizeClass as q, normalizeStyle as R, withModifiers as se, createCommentVNode as P, createVNode as z, Transition as ie, withCtx as w, computed as de, createBlock as K, defineAsyncComponent as ce, unref as le } from "vue";
|
|
2
2
|
import "./canvasFacade-B0oy__da.js";
|
|
3
|
-
import "./useWorkbenchRuntime-
|
|
3
|
+
import { b as ue } from "./useWorkbenchRuntime-Bn92SaQG.js";
|
|
4
4
|
import "./cardFactory-CoDF-zsR.js";
|
|
5
5
|
import "./workbenchCustomComponentRegistry-6GHzavdM.js";
|
|
6
6
|
const G = Symbol("workbench-app-context");
|
|
7
|
-
function
|
|
8
|
-
const { adapters: r, config:
|
|
7
|
+
function fe(e) {
|
|
8
|
+
const { adapters: r, config: n, extensions: t } = te(e);
|
|
9
9
|
return {
|
|
10
10
|
adapters: W(r),
|
|
11
|
-
config: W(
|
|
12
|
-
extensions: W(
|
|
11
|
+
config: W(n),
|
|
12
|
+
extensions: W(t)
|
|
13
13
|
};
|
|
14
14
|
}
|
|
15
|
-
function
|
|
15
|
+
function rr() {
|
|
16
16
|
const e = oe(G);
|
|
17
17
|
if (!e)
|
|
18
18
|
throw new Error("useWorkbenchAppContext must be used inside WorkbenchWorkspaceCore");
|
|
19
19
|
return e;
|
|
20
20
|
}
|
|
21
|
-
const
|
|
21
|
+
const me = { class: "fses-workbench-app" }, he = /* @__PURE__ */ E({
|
|
22
22
|
__name: "WorkbenchWorkspaceCore",
|
|
23
23
|
props: {
|
|
24
24
|
adapters: {},
|
|
@@ -26,11 +26,11 @@ const fe = { class: "fses-workbench-app" }, me = /* @__PURE__ */ E({
|
|
|
26
26
|
extensions: {}
|
|
27
27
|
},
|
|
28
28
|
setup(e) {
|
|
29
|
-
return ae(G,
|
|
30
|
-
g(
|
|
29
|
+
return ae(G, fe(e)), (n, t) => (b(), k("div", me, [
|
|
30
|
+
g(n.$slots, "default")
|
|
31
31
|
]));
|
|
32
32
|
}
|
|
33
|
-
}),
|
|
33
|
+
}), pe = { class: "workbench-shell" }, ge = ["aria-hidden", "inert"], ye = { class: "workbench-studio-panel__body" }, L = 48, be = /* @__PURE__ */ E({
|
|
34
34
|
__name: "WorkbenchShell",
|
|
35
35
|
props: {
|
|
36
36
|
studioPanelWidth: {},
|
|
@@ -44,8 +44,8 @@ const fe = { class: "fses-workbench-app" }, me = /* @__PURE__ */ E({
|
|
|
44
44
|
},
|
|
45
45
|
emits: ["startDrag"],
|
|
46
46
|
setup(e, { emit: r }) {
|
|
47
|
-
const
|
|
48
|
-
return (
|
|
47
|
+
const n = r;
|
|
48
|
+
return (t, o) => (b(), k("div", pe, [
|
|
49
49
|
A("div", {
|
|
50
50
|
class: q(["workbench-shell__body", { "workbench-shell__body--dragging": e.dragging }])
|
|
51
51
|
}, [
|
|
@@ -55,60 +55,60 @@ const fe = { class: "fses-workbench-app" }, me = /* @__PURE__ */ E({
|
|
|
55
55
|
flexBasis: e.drawerOpen ? `calc(100% - ${e.drawerWidth || 392}px)` : e.canvasFocusMode || !e.studioPanelEnabled ? "100%" : e.studioPanelCollapsed ? `calc(100% - ${L}px)` : `calc(100% - ${e.studioPanelWidth}px - 8px)`
|
|
56
56
|
})
|
|
57
57
|
}, [
|
|
58
|
-
g(
|
|
58
|
+
g(t.$slots, "left", {}, void 0, !0)
|
|
59
59
|
], 4),
|
|
60
|
-
e.studioPanelEnabled && !e.studioPanelCollapsed && !e.canvasFocusMode && !e.drawerOpen ? (b(),
|
|
60
|
+
e.studioPanelEnabled && !e.studioPanelCollapsed && !e.canvasFocusMode && !e.drawerOpen ? (b(), k("div", {
|
|
61
61
|
key: 0,
|
|
62
62
|
"aria-orientation": "vertical",
|
|
63
63
|
"aria-label": "调整问数栏宽度",
|
|
64
64
|
class: "workbench-splitter",
|
|
65
65
|
role: "separator",
|
|
66
|
-
onPointerdown: o[0] || (o[0] = (d) =>
|
|
66
|
+
onPointerdown: o[0] || (o[0] = (d) => n("startDrag", d)),
|
|
67
67
|
onDragstart: o[1] || (o[1] = se(() => {
|
|
68
68
|
}, ["prevent"]))
|
|
69
69
|
}, [...o[2] || (o[2] = [
|
|
70
70
|
A("div", { class: "workbench-splitter__track" }, null, -1)
|
|
71
71
|
])], 32)) : P("", !0),
|
|
72
|
-
e.studioPanelEnabled && !e.canvasFocusMode && !e.drawerOpen ? (b(),
|
|
72
|
+
e.studioPanelEnabled && !e.canvasFocusMode && !e.drawerOpen ? (b(), k("div", {
|
|
73
73
|
key: 1,
|
|
74
74
|
class: q(["workbench-studio-panel", { "workbench-studio-panel--collapsed": e.studioPanelCollapsed }]),
|
|
75
75
|
style: R({ flexBasis: e.studioPanelCollapsed ? "0px" : `${e.studioPanelWidth}px` }),
|
|
76
76
|
"aria-hidden": e.studioPanelCollapsed ? "true" : void 0,
|
|
77
77
|
inert: e.studioPanelCollapsed ? !0 : void 0
|
|
78
78
|
}, [
|
|
79
|
-
A("div",
|
|
80
|
-
g(
|
|
79
|
+
A("div", ye, [
|
|
80
|
+
g(t.$slots, "right", {}, void 0, !0)
|
|
81
81
|
])
|
|
82
|
-
], 14,
|
|
82
|
+
], 14, ge)) : P("", !0),
|
|
83
83
|
z(ie, { name: "workbench-assistant-rail-shell" }, {
|
|
84
84
|
default: w(() => [
|
|
85
|
-
e.studioPanelEnabled && e.studioPanelCollapsed && !e.canvasFocusMode && !e.drawerOpen ? (b(),
|
|
85
|
+
e.studioPanelEnabled && e.studioPanelCollapsed && !e.canvasFocusMode && !e.drawerOpen ? (b(), k("div", {
|
|
86
86
|
key: 0,
|
|
87
87
|
class: "workbench-assistant-rail-shell",
|
|
88
88
|
style: R({ flexBasis: `${L}px` }),
|
|
89
89
|
"aria-label": "收起状态问数助手入口"
|
|
90
90
|
}, [
|
|
91
|
-
g(
|
|
91
|
+
g(t.$slots, "collapsed-right", {}, void 0, !0)
|
|
92
92
|
], 4)) : P("", !0)
|
|
93
93
|
]),
|
|
94
94
|
_: 3
|
|
95
95
|
}),
|
|
96
|
-
e.drawerOpen ? (b(),
|
|
96
|
+
e.drawerOpen ? (b(), k("div", {
|
|
97
97
|
key: 2,
|
|
98
98
|
class: "workbench-shell__drawer",
|
|
99
99
|
style: R({ flexBasis: `${e.drawerWidth || 392}px` })
|
|
100
100
|
}, [
|
|
101
|
-
g(
|
|
101
|
+
g(t.$slots, "drawer", {}, void 0, !0)
|
|
102
102
|
], 4)) : P("", !0)
|
|
103
103
|
], 2)
|
|
104
104
|
]));
|
|
105
105
|
}
|
|
106
|
-
}),
|
|
107
|
-
const
|
|
108
|
-
for (const [
|
|
109
|
-
t
|
|
110
|
-
return
|
|
111
|
-
},
|
|
106
|
+
}), we = (e, r) => {
|
|
107
|
+
const n = e.__vccOpts || e;
|
|
108
|
+
for (const [t, o] of r)
|
|
109
|
+
n[t] = o;
|
|
110
|
+
return n;
|
|
111
|
+
}, Ie = /* @__PURE__ */ we(be, [["__scopeId", "data-v-352c4f8f"]]), nr = /* @__PURE__ */ E({
|
|
112
112
|
__name: "WorkbenchAppHost",
|
|
113
113
|
props: {
|
|
114
114
|
adapters: {},
|
|
@@ -117,7 +117,7 @@ const fe = { class: "fses-workbench-app" }, me = /* @__PURE__ */ E({
|
|
|
117
117
|
runtime: {}
|
|
118
118
|
},
|
|
119
119
|
setup(e) {
|
|
120
|
-
const r = e,
|
|
120
|
+
const r = e, n = de(() => ({
|
|
121
121
|
canvasFocusMode: r.runtime.canvasFocusMode ?? !1,
|
|
122
122
|
drawerOpen: r.runtime.drawerOpen ?? !1,
|
|
123
123
|
drawerWidth: r.runtime.drawerWidth,
|
|
@@ -127,37 +127,37 @@ const fe = { class: "fses-workbench-app" }, me = /* @__PURE__ */ E({
|
|
|
127
127
|
studioPanelEnabled: r.runtime.studioPanelEnabled ?? !0,
|
|
128
128
|
studioPanelWidth: r.runtime.studioPanelWidth ?? 420
|
|
129
129
|
}));
|
|
130
|
-
return (
|
|
130
|
+
return (t, o) => (b(), K(he, {
|
|
131
131
|
adapters: r.adapters,
|
|
132
132
|
config: r.config,
|
|
133
133
|
extensions: r.extensions
|
|
134
134
|
}, {
|
|
135
135
|
default: w(() => [
|
|
136
|
-
z(
|
|
137
|
-
"canvas-focus-mode":
|
|
138
|
-
"drawer-open":
|
|
139
|
-
"drawer-width":
|
|
140
|
-
dragging:
|
|
141
|
-
"image-workbench":
|
|
142
|
-
"studio-panel-collapsed":
|
|
143
|
-
"studio-panel-enabled":
|
|
144
|
-
"studio-panel-width":
|
|
136
|
+
z(Ie, {
|
|
137
|
+
"canvas-focus-mode": n.value.canvasFocusMode,
|
|
138
|
+
"drawer-open": n.value.drawerOpen,
|
|
139
|
+
"drawer-width": n.value.drawerWidth,
|
|
140
|
+
dragging: n.value.dragging,
|
|
141
|
+
"image-workbench": n.value.imageWorkbench,
|
|
142
|
+
"studio-panel-collapsed": n.value.studioPanelCollapsed,
|
|
143
|
+
"studio-panel-enabled": n.value.studioPanelEnabled,
|
|
144
|
+
"studio-panel-width": n.value.studioPanelWidth,
|
|
145
145
|
onStartDrag: o[0] || (o[0] = (d) => {
|
|
146
146
|
var h, y;
|
|
147
147
|
return (y = (h = r.runtime).startStudioPanelDrag) == null ? void 0 : y.call(h, d);
|
|
148
148
|
})
|
|
149
149
|
}, {
|
|
150
150
|
left: w(() => [
|
|
151
|
-
g(
|
|
151
|
+
g(t.$slots, "left")
|
|
152
152
|
]),
|
|
153
153
|
right: w(() => [
|
|
154
|
-
g(
|
|
154
|
+
g(t.$slots, "right")
|
|
155
155
|
]),
|
|
156
156
|
"collapsed-right": w(() => [
|
|
157
|
-
g(
|
|
157
|
+
g(t.$slots, "collapsed-right")
|
|
158
158
|
]),
|
|
159
159
|
drawer: w(() => [
|
|
160
|
-
g(
|
|
160
|
+
g(t.$slots, "drawer")
|
|
161
161
|
]),
|
|
162
162
|
_: 3
|
|
163
163
|
}, 8, ["canvas-focus-mode", "drawer-open", "drawer-width", "dragging", "image-workbench", "studio-panel-collapsed", "studio-panel-enabled", "studio-panel-width"])
|
|
@@ -166,27 +166,27 @@ const fe = { class: "fses-workbench-app" }, me = /* @__PURE__ */ E({
|
|
|
166
166
|
}, 8, ["adapters", "config", "extensions"]));
|
|
167
167
|
}
|
|
168
168
|
});
|
|
169
|
-
let
|
|
169
|
+
let v = {}, Y = {}, J = {};
|
|
170
170
|
function ke(e) {
|
|
171
|
-
|
|
171
|
+
v = e;
|
|
172
172
|
}
|
|
173
|
-
function
|
|
174
|
-
Y = e, J = r, ke(
|
|
173
|
+
function Se(e, r, n) {
|
|
174
|
+
Y = e, J = r, ke(n);
|
|
175
175
|
}
|
|
176
176
|
function tr() {
|
|
177
177
|
return Y;
|
|
178
178
|
}
|
|
179
|
-
function nr() {
|
|
180
|
-
return J;
|
|
181
|
-
}
|
|
182
179
|
function or() {
|
|
183
|
-
return
|
|
180
|
+
return J;
|
|
184
181
|
}
|
|
185
182
|
function ar() {
|
|
183
|
+
return v;
|
|
184
|
+
}
|
|
185
|
+
function sr() {
|
|
186
186
|
var e;
|
|
187
|
-
return (e =
|
|
187
|
+
return (e = v.fde) == null ? void 0 : e.generatedTemplateShell;
|
|
188
188
|
}
|
|
189
|
-
const
|
|
189
|
+
const ir = /* @__PURE__ */ E({
|
|
190
190
|
__name: "WorkbenchApplication",
|
|
191
191
|
props: {
|
|
192
192
|
adapters: {},
|
|
@@ -196,39 +196,39 @@ const sr = /* @__PURE__ */ E({
|
|
|
196
196
|
},
|
|
197
197
|
setup(e) {
|
|
198
198
|
const r = e;
|
|
199
|
-
|
|
200
|
-
const
|
|
201
|
-
return (
|
|
199
|
+
Se(r.adapters, r.config, r.extensions);
|
|
200
|
+
const n = ce(() => import("./Workspace-CIfCreXf.js"));
|
|
201
|
+
return (t, o) => (b(), K(le(n), {
|
|
202
202
|
"embed-in-portal": r.embedInPortal
|
|
203
203
|
}, {
|
|
204
204
|
"before-workbench": w(() => [
|
|
205
|
-
g(
|
|
205
|
+
g(t.$slots, "before-workbench")
|
|
206
206
|
]),
|
|
207
207
|
_: 3
|
|
208
208
|
}, 8, ["embed-in-portal"]));
|
|
209
209
|
}
|
|
210
210
|
});
|
|
211
|
-
function
|
|
211
|
+
function dr(e) {
|
|
212
212
|
return {
|
|
213
213
|
getItem: (r) => e.getItem(r),
|
|
214
214
|
removeItem: (r) => e.removeItem(r),
|
|
215
|
-
setItem: (r,
|
|
215
|
+
setItem: (r, n) => e.setItem(r, n)
|
|
216
216
|
};
|
|
217
217
|
}
|
|
218
|
-
const
|
|
218
|
+
const Ce = {
|
|
219
219
|
resolveAssetUrl: (e) => e
|
|
220
220
|
}, S = {
|
|
221
221
|
debug: (e, r) => console.debug(e, r),
|
|
222
222
|
error: (e, r) => console.error(e, r),
|
|
223
223
|
info: (e, r) => console.info(e, r),
|
|
224
224
|
warn: (e, r) => console.warn(e, r)
|
|
225
|
-
},
|
|
225
|
+
}, Ae = {
|
|
226
226
|
error: (e) => S.error(e),
|
|
227
227
|
info: (e) => S.info(e),
|
|
228
228
|
success: (e) => S.info(e),
|
|
229
229
|
warning: (e) => S.warn(e)
|
|
230
230
|
};
|
|
231
|
-
function
|
|
231
|
+
function cr(e = {}) {
|
|
232
232
|
const r = /* @__PURE__ */ new Map();
|
|
233
233
|
return {
|
|
234
234
|
agentTransportAdapter: {
|
|
@@ -236,12 +236,12 @@ function dr(e = {}) {
|
|
|
236
236
|
},
|
|
237
237
|
requestJson: async () => ({})
|
|
238
238
|
},
|
|
239
|
-
assetAdapter:
|
|
239
|
+
assetAdapter: Ce,
|
|
240
240
|
identityAdapter: {
|
|
241
241
|
readIdentity: () => ({ appId: "test-app", roleId: "default", tenantId: "test-tenant", userId: "test-user" })
|
|
242
242
|
},
|
|
243
243
|
loggerAdapter: S,
|
|
244
|
-
messageAdapter:
|
|
244
|
+
messageAdapter: Ae,
|
|
245
245
|
platformRequestAdapter: {
|
|
246
246
|
ensureSessionReady: async () => !0,
|
|
247
247
|
requestJson: async () => ({})
|
|
@@ -254,12 +254,12 @@ function dr(e = {}) {
|
|
|
254
254
|
}
|
|
255
255
|
},
|
|
256
256
|
storageAdapter: {
|
|
257
|
-
getItem: (
|
|
258
|
-
removeItem: (
|
|
259
|
-
r.delete(
|
|
257
|
+
getItem: (n) => r.get(n) ?? null,
|
|
258
|
+
removeItem: (n) => {
|
|
259
|
+
r.delete(n);
|
|
260
260
|
},
|
|
261
|
-
setItem: (
|
|
262
|
-
r.set(
|
|
261
|
+
setItem: (n, t) => {
|
|
262
|
+
r.set(n, t);
|
|
263
263
|
}
|
|
264
264
|
},
|
|
265
265
|
uploadAdapter: {
|
|
@@ -268,7 +268,7 @@ function dr(e = {}) {
|
|
|
268
268
|
...e
|
|
269
269
|
};
|
|
270
270
|
}
|
|
271
|
-
const
|
|
271
|
+
const Re = [
|
|
272
272
|
"attachments",
|
|
273
273
|
"cards",
|
|
274
274
|
"cardRecommendationDraft",
|
|
@@ -290,21 +290,21 @@ const Ae = [
|
|
|
290
290
|
"thinkingProcessMessages",
|
|
291
291
|
"workbenchTurnId"
|
|
292
292
|
];
|
|
293
|
-
function
|
|
294
|
-
for (const
|
|
295
|
-
e[
|
|
293
|
+
function lr(e, r) {
|
|
294
|
+
for (const n of Re)
|
|
295
|
+
e[n] = r[n];
|
|
296
296
|
}
|
|
297
|
-
function
|
|
297
|
+
function Pe(e) {
|
|
298
298
|
const r = e.cardRecommendationDraft;
|
|
299
299
|
if (!r || typeof r != "object") return "";
|
|
300
|
-
const
|
|
301
|
-
return typeof
|
|
300
|
+
const n = r.sourceTurnId;
|
|
301
|
+
return typeof n == "string" && n.trim() ? n.trim() : "";
|
|
302
302
|
}
|
|
303
|
-
function
|
|
303
|
+
function Te(e) {
|
|
304
304
|
const r = e.cardRecommendationDraft;
|
|
305
305
|
if (!r || typeof r != "object") return "";
|
|
306
|
-
const
|
|
307
|
-
return typeof
|
|
306
|
+
const n = r.placementTurnId;
|
|
307
|
+
return typeof n == "string" && n.trim() ? n.trim() : "";
|
|
308
308
|
}
|
|
309
309
|
function X(e) {
|
|
310
310
|
const r = e.workbenchTurnId;
|
|
@@ -313,52 +313,52 @@ function X(e) {
|
|
|
313
313
|
function Z(e) {
|
|
314
314
|
if (typeof e != "string" || !e.startsWith("workbench-turn-")) return "";
|
|
315
315
|
const r = ["-reply", "-conclusion-stream", "-item-", "-process-", "-task-", "-card-mutation-confirmation"];
|
|
316
|
-
for (const
|
|
317
|
-
const
|
|
318
|
-
if (
|
|
316
|
+
for (const n of r) {
|
|
317
|
+
const t = e.indexOf(n, 15);
|
|
318
|
+
if (t > 15) return e.slice(15, t);
|
|
319
319
|
}
|
|
320
320
|
return "";
|
|
321
321
|
}
|
|
322
322
|
function _(e, r) {
|
|
323
|
-
var
|
|
324
|
-
if (e.role !== "assistant" || !((
|
|
325
|
-
const
|
|
326
|
-
return
|
|
323
|
+
var t;
|
|
324
|
+
if (e.role !== "assistant" || !((t = e.content) != null && t.trim())) return !1;
|
|
325
|
+
const n = X(e);
|
|
326
|
+
return n ? n === r : Z(e.id) !== r ? !1 : typeof e.id == "string" && (e.id.endsWith("-reply") || e.id.endsWith("-conclusion-stream"));
|
|
327
327
|
}
|
|
328
328
|
function U(e, r) {
|
|
329
|
-
return !!(r && e.some((
|
|
329
|
+
return !!(r && e.some((n) => _(n, r)));
|
|
330
330
|
}
|
|
331
|
-
function
|
|
332
|
-
const
|
|
333
|
-
return U(e,
|
|
331
|
+
function Ee(e, r) {
|
|
332
|
+
const n = Pe(r), t = Te(r);
|
|
333
|
+
return U(e, n) ? n : U(e, t) ? t : t || X(r) || n || Z(r.id);
|
|
334
334
|
}
|
|
335
|
-
function
|
|
335
|
+
function ur(e) {
|
|
336
336
|
for (const r of e.appendedMessages.values()) {
|
|
337
337
|
if (!r.cardRecommendationDraft) continue;
|
|
338
|
-
const
|
|
339
|
-
if (!
|
|
340
|
-
const
|
|
341
|
-
if (
|
|
342
|
-
const o = e.messages.findIndex((y) => _(y,
|
|
343
|
-
if (o < 0 ||
|
|
344
|
-
const [d] = e.messages.splice(
|
|
338
|
+
const n = Ee(e.messages, r);
|
|
339
|
+
if (!n) continue;
|
|
340
|
+
const t = e.messages.indexOf(r);
|
|
341
|
+
if (t < 0) continue;
|
|
342
|
+
const o = e.messages.findIndex((y) => _(y, n));
|
|
343
|
+
if (o < 0 || t === o + 1) continue;
|
|
344
|
+
const [d] = e.messages.splice(t, 1), h = e.messages.findIndex((y) => _(y, n));
|
|
345
345
|
if (h < 0) {
|
|
346
|
-
e.messages.splice(
|
|
346
|
+
e.messages.splice(t, 0, d);
|
|
347
347
|
continue;
|
|
348
348
|
}
|
|
349
349
|
e.messages.splice(h + 1, 0, d);
|
|
350
350
|
}
|
|
351
351
|
}
|
|
352
|
-
function
|
|
352
|
+
function We(e) {
|
|
353
353
|
return !e.thinkingProcess;
|
|
354
354
|
}
|
|
355
|
-
function
|
|
355
|
+
function _e(e) {
|
|
356
356
|
const r = e.content.trim();
|
|
357
|
-
return
|
|
357
|
+
return We(e) ? `${r.replace(/完成(?:,用时 .*)?$/u, "").trim()}完成` : r;
|
|
358
358
|
}
|
|
359
|
-
function
|
|
359
|
+
function fr(e, r) {
|
|
360
360
|
return {
|
|
361
|
-
content:
|
|
361
|
+
content: _e(e),
|
|
362
362
|
loading: !1,
|
|
363
363
|
...typeof e.startTime == "number" ? { startTime: e.startTime } : {},
|
|
364
364
|
...typeof e.endTime == "number" ? { endTime: e.endTime } : typeof r == "number" ? { endTime: r } : {}
|
|
@@ -388,18 +388,18 @@ function ee(e) {
|
|
|
388
388
|
].join("|");
|
|
389
389
|
}
|
|
390
390
|
function re(e) {
|
|
391
|
-
const r = p(e),
|
|
391
|
+
const r = p(e), n = p(r.data);
|
|
392
392
|
return [
|
|
393
393
|
a(r.resultId),
|
|
394
394
|
a(r.sourceTurnId),
|
|
395
395
|
a(r.rowCount),
|
|
396
|
-
Q(r.rows ||
|
|
397
|
-
Q(r.columns ||
|
|
398
|
-
ee(r.dataBinding ||
|
|
396
|
+
Q(r.rows || n.rows),
|
|
397
|
+
Q(r.columns || n.columns),
|
|
398
|
+
ee(r.dataBinding || n.dataBinding)
|
|
399
399
|
].join("|");
|
|
400
400
|
}
|
|
401
|
-
function
|
|
402
|
-
const r = p(e),
|
|
401
|
+
function Me(e) {
|
|
402
|
+
const r = p(e), n = p(r.blockPlan), t = p(n.data), o = p(n.meta), d = p(o.queryResult);
|
|
403
403
|
return [
|
|
404
404
|
a(r.recommendationId),
|
|
405
405
|
a(r.capabilityId),
|
|
@@ -407,99 +407,104 @@ function _e(e) {
|
|
|
407
407
|
a(r.previewStatus),
|
|
408
408
|
a(r.nextAction),
|
|
409
409
|
a(r.dataShape),
|
|
410
|
-
a(
|
|
411
|
-
a(
|
|
412
|
-
ee(r.dataBinding ||
|
|
410
|
+
a(n.id),
|
|
411
|
+
a(n.title),
|
|
412
|
+
ee(r.dataBinding || t.dataBinding),
|
|
413
413
|
re(r.queryResult || d)
|
|
414
414
|
].join(":");
|
|
415
415
|
}
|
|
416
|
-
function
|
|
417
|
-
const r = p(e),
|
|
418
|
-
if (
|
|
419
|
-
const
|
|
416
|
+
function mr(e) {
|
|
417
|
+
const r = p(e), n = typeof r.type == "string" ? r.type : "";
|
|
418
|
+
if (n === "card_recommendations_ready") {
|
|
419
|
+
const t = Array.isArray(r.recommendations) ? r.recommendations : [], o = ue({
|
|
420
|
+
payload: r,
|
|
421
|
+
conversationId: a(r.conversationId),
|
|
422
|
+
groupType: n
|
|
423
|
+
});
|
|
420
424
|
return [
|
|
421
|
-
|
|
425
|
+
n,
|
|
426
|
+
o.renderKey,
|
|
422
427
|
a(r.sourceTurnId),
|
|
423
428
|
a(r.placementTurnId),
|
|
424
429
|
re(r.queryResult),
|
|
425
|
-
|
|
430
|
+
t.map(Me).join(",")
|
|
426
431
|
].join(":");
|
|
427
432
|
}
|
|
428
|
-
if (
|
|
429
|
-
const
|
|
430
|
-
return `${
|
|
433
|
+
if (n === "query_result_table_ready") {
|
|
434
|
+
const t = p(r.queryResult), o = Array.isArray(t.rows) ? t.rows.length : "", d = Array.isArray(t.columns) ? t.columns.length : "";
|
|
435
|
+
return `${n}:${o}:${d}:${t.rowCount ?? ""}`;
|
|
431
436
|
}
|
|
432
|
-
return
|
|
437
|
+
return n;
|
|
433
438
|
}
|
|
434
|
-
const
|
|
435
|
-
function
|
|
439
|
+
const Be = /* @__PURE__ */ new Set(["pending", "running"]), De = "/data-binding-candidate/query", ve = "/workbench/v2/documents/", Ne = "/data-bindings/";
|
|
440
|
+
function $e(e) {
|
|
436
441
|
return typeof (e == null ? void 0 : e.refreshApi) == "string" ? e.refreshApi.trim() : "";
|
|
437
442
|
}
|
|
438
|
-
function
|
|
439
|
-
return e.includes(
|
|
443
|
+
function Oe(e) {
|
|
444
|
+
return e.includes(De);
|
|
440
445
|
}
|
|
441
|
-
function
|
|
446
|
+
function ne(e) {
|
|
442
447
|
let r = e;
|
|
443
448
|
try {
|
|
444
449
|
r = new URL(e, "http://localhost").pathname;
|
|
445
450
|
} catch {
|
|
446
451
|
r = e;
|
|
447
452
|
}
|
|
448
|
-
return r.includes(
|
|
453
|
+
return r.includes(ve) && r.includes(Ne);
|
|
449
454
|
}
|
|
450
455
|
function M(e) {
|
|
451
456
|
return !!(e && typeof e == "object" && !Array.isArray(e));
|
|
452
457
|
}
|
|
453
458
|
function m(e) {
|
|
454
459
|
if (!M(e)) return !1;
|
|
455
|
-
const r = typeof e.source == "string" ? e.source.trim().toLowerCase() : "",
|
|
456
|
-
return r === "image" ||
|
|
460
|
+
const r = typeof e.source == "string" ? e.source.trim().toLowerCase() : "", n = typeof e.sourceType == "string" ? e.sourceType.trim().toLowerCase() : "", t = typeof e.composeSource == "string" ? e.composeSource.trim().toLowerCase() : "";
|
|
461
|
+
return r === "image" || n === "image" || t === "image" || m(e.params);
|
|
457
462
|
}
|
|
458
463
|
function C(e) {
|
|
459
464
|
return M(e) ? m(e) || m(e.recognition) ? !0 : M(e.v2) ? C(e.v2) : !1 : !1;
|
|
460
465
|
}
|
|
461
|
-
function
|
|
462
|
-
return (r == null ? void 0 : r.suppressImageComposeAutoRefresh) !== !0 || !
|
|
466
|
+
function Fe(e, r, n) {
|
|
467
|
+
return (r == null ? void 0 : r.suppressImageComposeAutoRefresh) !== !0 || !ne(n) ? !1 : m(e == null ? void 0 : e.params) || m(e) || m(r) || m(r == null ? void 0 : r.source) || m(r == null ? void 0 : r.data) || C(r == null ? void 0 : r.recognition) || C(r == null ? void 0 : r.meta);
|
|
463
468
|
}
|
|
464
|
-
function
|
|
469
|
+
function He(e, r) {
|
|
465
470
|
return m(e == null ? void 0 : e.params) || m(e) || m(r) || m(r == null ? void 0 : r.source) || m(r == null ? void 0 : r.data) || C(r == null ? void 0 : r.recognition) || C(r == null ? void 0 : r.meta);
|
|
466
471
|
}
|
|
467
|
-
function
|
|
472
|
+
function hr(e, r) {
|
|
468
473
|
if (!e) return !1;
|
|
469
|
-
const
|
|
470
|
-
if (!
|
|
471
|
-
const
|
|
472
|
-
return !(
|
|
474
|
+
const n = $e(e);
|
|
475
|
+
if (!n || Oe(n) || Fe(e, r, n)) return !1;
|
|
476
|
+
const t = typeof (e == null ? void 0 : e.status) == "string" ? e.status.trim().toLowerCase() : "";
|
|
477
|
+
return !(Be.has(t) || ne(n) && He(e, r));
|
|
473
478
|
}
|
|
474
|
-
function
|
|
475
|
-
var
|
|
476
|
-
const r = (
|
|
477
|
-
return
|
|
479
|
+
function pr(e) {
|
|
480
|
+
var t;
|
|
481
|
+
const r = (t = e.title) == null ? void 0 : t.trim(), n = r ? xe(r) : void 0;
|
|
482
|
+
return n || `字段 ${e.index + 1}`;
|
|
478
483
|
}
|
|
479
|
-
function
|
|
484
|
+
function xe(e) {
|
|
480
485
|
const r = e.replace(/[A-Za-z0-9_./\\()[\]{}::,,;;#%+\-=]+/gu, "").replace(/\s+/gu, "").trim();
|
|
481
486
|
return r && /[\u3400-\u9fff]/u.test(r) ? r : void 0;
|
|
482
487
|
}
|
|
483
|
-
function B(e, r = {},
|
|
484
|
-
return Number.isFinite(e) ? new Intl.NumberFormat("zh-CN", r).format(e) :
|
|
488
|
+
function B(e, r = {}, n = "-") {
|
|
489
|
+
return Number.isFinite(e) ? new Intl.NumberFormat("zh-CN", r).format(e) : n;
|
|
485
490
|
}
|
|
486
|
-
function
|
|
491
|
+
function gr(e, r = "") {
|
|
487
492
|
return r === "percent" ? `${(e * 100).toFixed(1)}%` : r === "currency" ? Math.abs(e) >= 1e8 ? `¥${(e / 1e8).toFixed(2)}亿` : Math.abs(e) >= 1e4 ? `¥${(e / 1e4).toFixed(1)}万` : `¥${B(e)}` : B(e);
|
|
488
493
|
}
|
|
489
|
-
function
|
|
494
|
+
function yr(e, r = {}) {
|
|
490
495
|
return e === 0 ? "-" : B(e, r);
|
|
491
496
|
}
|
|
492
497
|
function j(e = {}) {
|
|
493
|
-
var
|
|
498
|
+
var n, t, o, d, h, y, N, $, O, F, H, x;
|
|
494
499
|
const r = {
|
|
495
500
|
workspaceId: l([
|
|
496
|
-
s((
|
|
501
|
+
s((n = e.routeQuery) == null ? void 0 : n.workspaceId),
|
|
497
502
|
c(e.locationSearch, "workspaceId"),
|
|
498
503
|
u(e.locationHash, "workspaceId"),
|
|
499
504
|
f(e.locationPathname, "workspaceId")
|
|
500
505
|
]),
|
|
501
506
|
userId: l([
|
|
502
|
-
s((
|
|
507
|
+
s((t = e.routeQuery) == null ? void 0 : t.userId),
|
|
503
508
|
c(e.locationSearch, "userId"),
|
|
504
509
|
u(e.locationHash, "userId"),
|
|
505
510
|
f(e.locationPathname, "userId")
|
|
@@ -532,7 +537,7 @@ function j(e = {}) {
|
|
|
532
537
|
f(e.locationPathname, "conversationId")
|
|
533
538
|
]),
|
|
534
539
|
resourceId: l([
|
|
535
|
-
s((
|
|
540
|
+
s((N = e.routeQuery) == null ? void 0 : N.resourceId),
|
|
536
541
|
c(e.locationSearch, "resourceId"),
|
|
537
542
|
u(e.locationHash, "resourceId"),
|
|
538
543
|
f(e.locationPathname, "resourceId")
|
|
@@ -568,9 +573,9 @@ function j(e = {}) {
|
|
|
568
573
|
f(e.locationPathname, "fdeName")
|
|
569
574
|
])
|
|
570
575
|
};
|
|
571
|
-
return
|
|
576
|
+
return Ue(r);
|
|
572
577
|
}
|
|
573
|
-
function
|
|
578
|
+
function br(e) {
|
|
574
579
|
if (typeof window > "u")
|
|
575
580
|
return j({ routeQuery: e });
|
|
576
581
|
const r = j({
|
|
@@ -581,55 +586,55 @@ function yr(e) {
|
|
|
581
586
|
});
|
|
582
587
|
return {
|
|
583
588
|
...r,
|
|
584
|
-
userId: r.userId ||
|
|
589
|
+
userId: r.userId || qe(window)
|
|
585
590
|
};
|
|
586
591
|
}
|
|
587
592
|
function s(e) {
|
|
588
593
|
return Array.isArray(e) ? s(e[0]) : typeof e == "string" ? e.trim() : "";
|
|
589
594
|
}
|
|
590
595
|
function c(e, r) {
|
|
591
|
-
var
|
|
592
|
-
return e && ((
|
|
596
|
+
var n;
|
|
597
|
+
return e && ((n = new URLSearchParams(e.startsWith("?") ? e.slice(1) : e).get(r)) == null ? void 0 : n.trim()) || "";
|
|
593
598
|
}
|
|
594
599
|
function u(e, r) {
|
|
595
600
|
if (!e) return "";
|
|
596
|
-
const
|
|
597
|
-
if (
|
|
598
|
-
const
|
|
601
|
+
const n = e.indexOf("?");
|
|
602
|
+
if (n < 0) return "";
|
|
603
|
+
const t = e.indexOf("#", n + 1), o = t >= 0 ? e.slice(n + 1, t) : e.slice(n + 1);
|
|
599
604
|
return c(o, r);
|
|
600
605
|
}
|
|
601
606
|
function f(e, r) {
|
|
602
607
|
if (!e || !e.includes("=")) return "";
|
|
603
|
-
const
|
|
604
|
-
return
|
|
608
|
+
const n = e.split("/").filter(Boolean).find((t) => t.includes("="));
|
|
609
|
+
return n ? c(n, r) : "";
|
|
605
610
|
}
|
|
606
611
|
function V(e, r) {
|
|
607
|
-
return l(r.flatMap((
|
|
608
|
-
var
|
|
612
|
+
return l(r.flatMap((n) => {
|
|
613
|
+
var t;
|
|
609
614
|
return [
|
|
610
|
-
s((
|
|
611
|
-
c(e.locationSearch,
|
|
612
|
-
u(e.locationHash,
|
|
613
|
-
f(e.locationPathname,
|
|
615
|
+
s((t = e.routeQuery) == null ? void 0 : t[n]),
|
|
616
|
+
c(e.locationSearch, n),
|
|
617
|
+
u(e.locationHash, n),
|
|
618
|
+
f(e.locationPathname, n)
|
|
614
619
|
];
|
|
615
620
|
}));
|
|
616
621
|
}
|
|
617
622
|
function l(e) {
|
|
618
623
|
return e.find((r) => r.trim()) || "";
|
|
619
624
|
}
|
|
620
|
-
function
|
|
625
|
+
function qe(e) {
|
|
621
626
|
const r = [
|
|
622
627
|
e.__BT_WORKBENCH_USER__,
|
|
623
628
|
e.__BT_RUNTIME_IDENTITY__,
|
|
624
629
|
e.__BT_RUNTIME_CONTEXT__
|
|
625
630
|
];
|
|
626
|
-
for (const
|
|
627
|
-
const
|
|
628
|
-
if (
|
|
631
|
+
for (const n of r) {
|
|
632
|
+
const t = Le(n);
|
|
633
|
+
if (t) return t;
|
|
629
634
|
}
|
|
630
635
|
return "";
|
|
631
636
|
}
|
|
632
|
-
function
|
|
637
|
+
function Le(e) {
|
|
633
638
|
if (!e || typeof e != "object" || Array.isArray(e)) return "";
|
|
634
639
|
const r = e;
|
|
635
640
|
return l([
|
|
@@ -640,8 +645,8 @@ function qe(e) {
|
|
|
640
645
|
s(r["ego-userinfo"])
|
|
641
646
|
]);
|
|
642
647
|
}
|
|
643
|
-
function
|
|
644
|
-
if (!
|
|
648
|
+
function Ue(e) {
|
|
649
|
+
if (!Qe(e)) return e;
|
|
645
650
|
const r = e.fdeResourceId || e.resourceId;
|
|
646
651
|
return {
|
|
647
652
|
...e,
|
|
@@ -651,9 +656,9 @@ function Le(e) {
|
|
|
651
656
|
fdeResourceId: r
|
|
652
657
|
};
|
|
653
658
|
}
|
|
654
|
-
function
|
|
655
|
-
const r = e.mode.trim().toLowerCase(),
|
|
656
|
-
return r === "fde" ||
|
|
659
|
+
function Qe(e) {
|
|
660
|
+
const r = e.mode.trim().toLowerCase(), n = e.fdeMode.trim().toLowerCase();
|
|
661
|
+
return r === "fde" || n === "true" || n === "1" || n === "yes";
|
|
657
662
|
}
|
|
658
663
|
const i = {
|
|
659
664
|
radius: "standard",
|
|
@@ -663,7 +668,7 @@ const i = {
|
|
|
663
668
|
textureColor: "#ffffff",
|
|
664
669
|
motion: "none",
|
|
665
670
|
density: "standard"
|
|
666
|
-
},
|
|
671
|
+
}, wr = [
|
|
667
672
|
{
|
|
668
673
|
key: "radius",
|
|
669
674
|
label: "圆角",
|
|
@@ -720,7 +725,7 @@ const i = {
|
|
|
720
725
|
{ value: "compact", label: "高密度紧凑版" }
|
|
721
726
|
]
|
|
722
727
|
}
|
|
723
|
-
],
|
|
728
|
+
], je = {
|
|
724
729
|
radius: ["square", "small", "standard", "large"],
|
|
725
730
|
border: ["none", "light", "strong"],
|
|
726
731
|
shadow: ["none", "soft", "strong"],
|
|
@@ -731,40 +736,40 @@ const i = {
|
|
|
731
736
|
function D(e) {
|
|
732
737
|
return e && typeof e == "object" && !Array.isArray(e) ? e : {};
|
|
733
738
|
}
|
|
734
|
-
function
|
|
735
|
-
const
|
|
736
|
-
return typeof r == "string" &&
|
|
739
|
+
function I(e, r) {
|
|
740
|
+
const n = i[e];
|
|
741
|
+
return typeof r == "string" && je[e].includes(r) ? r : n;
|
|
737
742
|
}
|
|
738
|
-
function
|
|
743
|
+
function Ve(e) {
|
|
739
744
|
return typeof e == "string" && /^#[0-9a-fA-F]{6}$/.test(e) ? e.toLowerCase() : i.textureColor;
|
|
740
745
|
}
|
|
741
746
|
function T(e) {
|
|
742
747
|
const r = D(e);
|
|
743
748
|
return {
|
|
744
|
-
radius:
|
|
745
|
-
border:
|
|
746
|
-
shadow:
|
|
747
|
-
texture:
|
|
748
|
-
textureColor:
|
|
749
|
-
motion:
|
|
750
|
-
density:
|
|
749
|
+
radius: I("radius", r.radius),
|
|
750
|
+
border: I("border", r.border),
|
|
751
|
+
shadow: I("shadow", r.shadow),
|
|
752
|
+
texture: I("texture", r.texture),
|
|
753
|
+
textureColor: Ve(r.textureColor),
|
|
754
|
+
motion: I("motion", r.motion),
|
|
755
|
+
density: I("density", r.density)
|
|
751
756
|
};
|
|
752
757
|
}
|
|
753
|
-
function
|
|
758
|
+
function Ir(e) {
|
|
754
759
|
const r = T(e);
|
|
755
760
|
return r.radius === i.radius && r.border === i.border && r.shadow === i.shadow && r.texture === i.texture && r.textureColor === i.textureColor && r.motion === i.motion && r.density === i.density;
|
|
756
761
|
}
|
|
757
|
-
const
|
|
762
|
+
const ze = {
|
|
758
763
|
square: 0,
|
|
759
764
|
small: 4,
|
|
760
765
|
standard: 8,
|
|
761
766
|
large: 16
|
|
762
|
-
},
|
|
767
|
+
}, Ke = {
|
|
763
768
|
none: "none",
|
|
764
769
|
soft: "soft",
|
|
765
770
|
standard: "soft",
|
|
766
771
|
strong: "strong"
|
|
767
|
-
},
|
|
772
|
+
}, Ge = {
|
|
768
773
|
thumbnail: "compact",
|
|
769
774
|
compact: "compact",
|
|
770
775
|
standard: "standard",
|
|
@@ -774,7 +779,7 @@ function kr(e) {
|
|
|
774
779
|
const r = T(e);
|
|
775
780
|
return {
|
|
776
781
|
cardStyle: {
|
|
777
|
-
cardRadius:
|
|
782
|
+
cardRadius: ze[r.radius],
|
|
778
783
|
cardShadow: r.shadow === "strong" ? "strong" : r.shadow,
|
|
779
784
|
density: r.density === "loose" ? "expanded" : r.density,
|
|
780
785
|
...r.texture === "color" ? { backgroundColor: r.textureColor } : {},
|
|
@@ -782,13 +787,13 @@ function kr(e) {
|
|
|
782
787
|
}
|
|
783
788
|
};
|
|
784
789
|
}
|
|
785
|
-
function
|
|
786
|
-
const r = D(e == null ? void 0 : e.cardStyle),
|
|
787
|
-
if (Object.keys(
|
|
788
|
-
return T(
|
|
789
|
-
const
|
|
790
|
+
function Sr(e) {
|
|
791
|
+
const r = D(e == null ? void 0 : e.cardStyle), n = D(r.shell);
|
|
792
|
+
if (Object.keys(n).length > 0)
|
|
793
|
+
return T(n);
|
|
794
|
+
const t = typeof r.cardRadius == "number" ? r.cardRadius <= 0 ? "square" : r.cardRadius <= 4 ? "small" : r.cardRadius >= 16 ? "large" : "standard" : i.radius, o = typeof r.cardShadow == "string" && Ke[r.cardShadow] || i.shadow, d = typeof r.density == "string" && Ge[r.density] || i.density, h = typeof r.backgroundColor == "string" ? r.backgroundColor : void 0;
|
|
790
795
|
return T({
|
|
791
|
-
radius:
|
|
796
|
+
radius: t,
|
|
792
797
|
border: i.border,
|
|
793
798
|
shadow: o,
|
|
794
799
|
texture: h ? "color" : i.texture,
|
|
@@ -797,41 +802,41 @@ function Ir(e) {
|
|
|
797
802
|
density: d
|
|
798
803
|
});
|
|
799
804
|
}
|
|
800
|
-
const
|
|
805
|
+
const Cr = "@fses/workbench-app";
|
|
801
806
|
export {
|
|
802
|
-
|
|
803
|
-
|
|
807
|
+
cr as A,
|
|
808
|
+
Ce as B,
|
|
804
809
|
S as C,
|
|
805
810
|
i as D,
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
811
|
+
Ae as E,
|
|
812
|
+
yr as F,
|
|
813
|
+
rr as G,
|
|
814
|
+
wr as W,
|
|
815
|
+
we as _,
|
|
816
|
+
pr as a,
|
|
817
|
+
sr as b,
|
|
818
|
+
_e as c,
|
|
819
|
+
lr as d,
|
|
820
|
+
fr as e,
|
|
821
|
+
gr as f,
|
|
822
|
+
mr as g,
|
|
818
823
|
tr as h,
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
+
or as i,
|
|
825
|
+
br as j,
|
|
826
|
+
nr as k,
|
|
827
|
+
Sr as l,
|
|
828
|
+
Ir as m,
|
|
824
829
|
T as n,
|
|
825
830
|
kr as o,
|
|
826
|
-
|
|
831
|
+
ur as p,
|
|
827
832
|
G as q,
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
833
|
+
ar as r,
|
|
834
|
+
hr as s,
|
|
835
|
+
Cr as t,
|
|
836
|
+
ir as u,
|
|
837
|
+
Ie as v,
|
|
838
|
+
$e as w,
|
|
839
|
+
he as x,
|
|
840
|
+
dr as y,
|
|
841
|
+
fe as z
|
|
837
842
|
};
|