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