@blueking/ai-blueking 1.2.5-beta.6 → 1.2.5-beta.7
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/composables/use-session-store.d.ts +2 -0
- package/dist/store/sessionStore.d.ts +2 -0
- package/dist/vue2/{arc-DrEzlumu.mjs → arc-CjZ4Sy0N.mjs} +1 -1
- package/dist/vue2/{blockDiagram-38ab4fdb-DEk7MB4k.mjs → blockDiagram-38ab4fdb-D_JdyyMP.mjs} +5 -5
- package/dist/{vue3/c4Diagram-3d4e48cf-Be9azlzy.mjs → vue2/c4Diagram-3d4e48cf-BPNojQsF.mjs} +2 -2
- package/dist/{vue3/channel-CVz6mQ87.mjs → vue2/channel-CyP5aTgi.mjs} +1 -1
- package/dist/vue2/{classDiagram-70f12bd4-dzQSxUER.mjs → classDiagram-70f12bd4-kF0aWJo2.mjs} +5 -5
- package/dist/vue2/{classDiagram-v2-f2320105-6mJKz2-7.mjs → classDiagram-v2-f2320105-DCdAhfpF.mjs} +5 -5
- package/dist/vue2/{clone-CeDxIqre.mjs → clone-DIkB5LKb.mjs} +1 -1
- package/dist/vue2/{createText-2e5e7dd3-CfR1hZfz.mjs → createText-2e5e7dd3-gCDNrcYz.mjs} +1 -1
- package/dist/{vue3/edges-e0da2a9e-D7FgBk1A.mjs → vue2/edges-e0da2a9e-CArfG7b5.mjs} +3 -3
- package/dist/{vue3/erDiagram-9861fffd-Dz-uhHGS.mjs → vue2/erDiagram-9861fffd-CG9ypDjo.mjs} +4 -4
- package/dist/vue2/{flowDb-956e92f1-oUPnRK9H.mjs → flowDb-956e92f1-BLxIyByn.mjs} +1 -1
- package/dist/{vue3/flowDiagram-66a62f08-CMQAOOB2.mjs → vue2/flowDiagram-66a62f08-HkNaHgFA.mjs} +6 -6
- package/dist/vue2/{flowDiagram-v2-96b9c2cf-fnOChKcM.mjs → flowDiagram-v2-96b9c2cf-DIK_4Xim.mjs} +5 -5
- package/dist/vue2/{flowchart-elk-definition-4a651766-dGTsVMg1.mjs → flowchart-elk-definition-4a651766-ChbQwnxd.mjs} +4 -4
- package/dist/{vue3/ganttDiagram-c361ad54-Bbpx9GT5.mjs → vue2/ganttDiagram-c361ad54-C649j0PV.mjs} +2 -2
- package/dist/{vue3/gitGraphDiagram-72cf32ee-CT1Jd5vY.mjs → vue2/gitGraphDiagram-72cf32ee-CJbgxjnQ.mjs} +1 -1
- package/dist/vue2/{graph-BhCy8meG.mjs → graph-giIUjUZD.mjs} +1 -1
- package/dist/{vue3/index-3862675e-Ct74Pniq.mjs → vue2/index-3862675e-DpiRHnai.mjs} +6 -6
- package/dist/vue2/index.es.min.js +1 -1
- package/dist/vue2/index.iife.min.js +2 -2
- package/dist/vue2/index.umd.min.js +2 -2
- package/dist/vue2/{infoDiagram-f8f76790-i-Pb_P0Z.mjs → infoDiagram-f8f76790-DSUOY1Xn.mjs} +1 -1
- package/dist/vue2/{journeyDiagram-49397b02-CdJFAejE.mjs → journeyDiagram-49397b02-DHVVMHGw.mjs} +3 -3
- package/dist/vue2/{layout-D9IbABeX.mjs → layout-DqzIAc4H.mjs} +2 -2
- package/dist/vue2/{line-DWRC-9Te.mjs → line-D12Dowqe.mjs} +1 -1
- package/dist/vue2/{linear-B2kUduxy.mjs → linear-DiuHj4Sp.mjs} +1 -1
- package/dist/vue2/{mindmap-definition-fc14e90a-BNLnRgV8.mjs → mindmap-definition-fc14e90a-virbzq7t.mjs} +2 -2
- package/dist/vue2/{pieDiagram-8a3498a8-DUgTtYf7.mjs → pieDiagram-8a3498a8-R5oLee70.mjs} +2 -2
- package/dist/vue2/{quadrantDiagram-120e2f19-B0ZZ20ce.mjs → quadrantDiagram-120e2f19-Cb4xVG7V.mjs} +2 -2
- package/dist/vue2/{requirementDiagram-deff3bca-Sr_p6ekq.mjs → requirementDiagram-deff3bca-Ds0vK1IO.mjs} +4 -4
- package/dist/vue2/{sankeyDiagram-04a897e0-KCo_4ROD.mjs → sankeyDiagram-04a897e0-CiyQfCSy.mjs} +1 -1
- package/dist/vue2/{sequenceDiagram-704730f1-Dz9HaQEj.mjs → sequenceDiagram-704730f1-DDVDqsRa.mjs} +2 -2
- package/dist/{vue3/stateDiagram-587899a1-0aZAzY6D.mjs → vue2/stateDiagram-587899a1-YkcF6Vx8.mjs} +5 -5
- package/dist/vue2/{stateDiagram-v2-d93cdb3a-RhcF-6fR.mjs → stateDiagram-v2-d93cdb3a-Cvu3WFl0.mjs} +5 -5
- package/dist/{vue3/styles-6aaf32cf-CxU2HsUF.mjs → vue2/styles-6aaf32cf-B3Skjal0.mjs} +1 -1
- package/dist/vue2/{styles-9a916d00-DW-18tkD.mjs → styles-9a916d00-C0E1EPUJ.mjs} +1 -1
- package/dist/{vue3/styles-c10674c1-OyRr0uwd.mjs → vue2/styles-c10674c1-BivFXW_o.mjs} +4 -4
- package/dist/vue2/{svgDrawCommon-08f97a94-D7iETaLY.mjs → svgDrawCommon-08f97a94-fNQAKhKe.mjs} +1 -1
- package/dist/vue2/{timeline-definition-85554ec2-OsgbOXsT.mjs → timeline-definition-85554ec2-8NcP4pQt.mjs} +2 -2
- package/dist/vue2/{vue2-D-9PCUE6.mjs → vue2-RpH9FTzh.mjs} +746 -738
- package/dist/vue2/{xychartDiagram-e933f94c-C0-OvAd7.mjs → xychartDiagram-e933f94c-pjlh2O4Z.mjs} +4 -4
- package/dist/vue3/{arc-BfJ2ieFB.mjs → arc-DLjtFT1j.mjs} +1 -1
- package/dist/vue3/{blockDiagram-38ab4fdb-DOCk8ROg.mjs → blockDiagram-38ab4fdb-DjtpIc4L.mjs} +5 -5
- package/dist/{vue2/c4Diagram-3d4e48cf-CcpZgje9.mjs → vue3/c4Diagram-3d4e48cf-BW4ZQuFR.mjs} +2 -2
- package/dist/{vue2/channel-gp8KlGBi.mjs → vue3/channel-CuQiUawy.mjs} +1 -1
- package/dist/vue3/{classDiagram-70f12bd4-DkRsP1aM.mjs → classDiagram-70f12bd4-BRprQlAL.mjs} +5 -5
- package/dist/vue3/{classDiagram-v2-f2320105-Ds832Yka.mjs → classDiagram-v2-f2320105-cVAG5gfr.mjs} +5 -5
- package/dist/vue3/{clone-GXcH-6-j.mjs → clone-D7h7lyqK.mjs} +1 -1
- package/dist/vue3/{createText-2e5e7dd3-oy41gKUt.mjs → createText-2e5e7dd3-CK4unGEC.mjs} +1 -1
- package/dist/{vue2/edges-e0da2a9e-CccuzKLa.mjs → vue3/edges-e0da2a9e-CeJ7yk4q.mjs} +3 -3
- package/dist/{vue2/erDiagram-9861fffd-C-hdVa3_.mjs → vue3/erDiagram-9861fffd-EbFPjZVd.mjs} +4 -4
- package/dist/vue3/{flowDb-956e92f1-DZLrXKVu.mjs → flowDb-956e92f1-BT0XW4Ys.mjs} +1 -1
- package/dist/{vue2/flowDiagram-66a62f08-CJWZObXC.mjs → vue3/flowDiagram-66a62f08-BeZXWJk-.mjs} +6 -6
- package/dist/vue3/{flowDiagram-v2-96b9c2cf-BxsBDWHL.mjs → flowDiagram-v2-96b9c2cf-D18PYsRN.mjs} +5 -5
- package/dist/vue3/{flowchart-elk-definition-4a651766-FJ94iIUo.mjs → flowchart-elk-definition-4a651766-CVrwSA6V.mjs} +4 -4
- package/dist/{vue2/ganttDiagram-c361ad54-DAATWkWe.mjs → vue3/ganttDiagram-c361ad54-CROESQcw.mjs} +2 -2
- package/dist/{vue2/gitGraphDiagram-72cf32ee--N5KG7US.mjs → vue3/gitGraphDiagram-72cf32ee-C817TgMw.mjs} +1 -1
- package/dist/vue3/{graph-CVllRwkc.mjs → graph-CRSoGxIZ.mjs} +1 -1
- package/dist/{vue2/index-3862675e-CNZomI9t.mjs → vue3/index-3862675e-CQEqNR37.mjs} +6 -6
- package/dist/vue3/index.es.min.js +1 -1
- package/dist/vue3/index.iife.min.js +2 -2
- package/dist/vue3/index.umd.min.js +58 -58
- package/dist/vue3/{infoDiagram-f8f76790-Du-Zl0O9.mjs → infoDiagram-f8f76790-Cr6dMqe-.mjs} +1 -1
- package/dist/vue3/{journeyDiagram-49397b02-7H9QVYfs.mjs → journeyDiagram-49397b02-BjcO4pXe.mjs} +3 -3
- package/dist/vue3/{layout-CuKrhAey.mjs → layout-B_GVIAnN.mjs} +2 -2
- package/dist/vue3/{line-rtow7SOZ.mjs → line-CBFr1Kh2.mjs} +1 -1
- package/dist/vue3/{linear-Co5nPEh1.mjs → linear-B83UPn4N.mjs} +1 -1
- package/dist/vue3/{mindmap-definition-fc14e90a-z9B-RJW7.mjs → mindmap-definition-fc14e90a-DwMHh4bU.mjs} +2 -2
- package/dist/vue3/{pieDiagram-8a3498a8-Cfayi4VJ.mjs → pieDiagram-8a3498a8-gyNBBq39.mjs} +2 -2
- package/dist/vue3/{quadrantDiagram-120e2f19-DW3jGXtJ.mjs → quadrantDiagram-120e2f19-DM8m3jl7.mjs} +2 -2
- package/dist/vue3/{requirementDiagram-deff3bca-C1B63IQf.mjs → requirementDiagram-deff3bca-CzQBMKJu.mjs} +4 -4
- package/dist/vue3/{sankeyDiagram-04a897e0-C_bCxLBm.mjs → sankeyDiagram-04a897e0-pz-P1icc.mjs} +1 -1
- package/dist/vue3/{sequenceDiagram-704730f1-BaHsOYRP.mjs → sequenceDiagram-704730f1-CsqJ-wZ5.mjs} +2 -2
- package/dist/{vue2/stateDiagram-587899a1-BTQog9xH.mjs → vue3/stateDiagram-587899a1-D4pMLlnu.mjs} +5 -5
- package/dist/vue3/{stateDiagram-v2-d93cdb3a-DRuct76v.mjs → stateDiagram-v2-d93cdb3a-EKXu674o.mjs} +5 -5
- package/dist/{vue2/styles-6aaf32cf-928Rrp1p.mjs → vue3/styles-6aaf32cf-C71cGqt_.mjs} +1 -1
- package/dist/vue3/{styles-9a916d00-kyz6ItuV.mjs → styles-9a916d00-AeStUBOG.mjs} +1 -1
- package/dist/{vue2/styles-c10674c1-DG3TZzxX.mjs → vue3/styles-c10674c1-CvFc0Q50.mjs} +4 -4
- package/dist/vue3/{svgDrawCommon-08f97a94-BsVMvVSK.mjs → svgDrawCommon-08f97a94-Bv33f1pF.mjs} +1 -1
- package/dist/vue3/{timeline-definition-85554ec2-BVxYkURC.mjs → timeline-definition-85554ec2-Cskf4Izk.mjs} +2 -2
- package/dist/vue3/{vue3-Oifi09Vw.mjs → vue3-BuBJFQsu.mjs} +277 -269
- package/dist/vue3/{xychartDiagram-e933f94c-Bu8XjMbp.mjs → xychartDiagram-e933f94c-C4lMipiw.mjs} +4 -4
- package/package.json +2 -2
|
@@ -1941,6 +1941,7 @@ export declare function provideSessionStore(): {
|
|
|
1941
1941
|
enabled: boolean;
|
|
1942
1942
|
staff: string[];
|
|
1943
1943
|
} | undefined;
|
|
1944
|
+
saasUrl?: string | undefined;
|
|
1944
1945
|
}, import("@blueking/ai-ui-sdk/types").IAgentInfo | {
|
|
1945
1946
|
conversationSettings?: {
|
|
1946
1947
|
openingRemark?: string | undefined;
|
|
@@ -1979,6 +1980,7 @@ export declare function provideSessionStore(): {
|
|
|
1979
1980
|
enabled: boolean;
|
|
1980
1981
|
staff: string[];
|
|
1981
1982
|
} | undefined;
|
|
1983
|
+
saasUrl?: string | undefined;
|
|
1982
1984
|
}>;
|
|
1983
1985
|
getSessionList: () => Promise<{
|
|
1984
1986
|
isEdit?: boolean | undefined;
|
|
@@ -1953,6 +1953,7 @@ export declare function useSessionStore(): {
|
|
|
1953
1953
|
enabled: boolean;
|
|
1954
1954
|
staff: string[];
|
|
1955
1955
|
} | undefined;
|
|
1956
|
+
saasUrl?: string | undefined;
|
|
1956
1957
|
}, IAgentInfo | {
|
|
1957
1958
|
conversationSettings?: {
|
|
1958
1959
|
openingRemark?: string | undefined;
|
|
@@ -1991,6 +1992,7 @@ export declare function useSessionStore(): {
|
|
|
1991
1992
|
enabled: boolean;
|
|
1992
1993
|
staff: string[];
|
|
1993
1994
|
} | undefined;
|
|
1995
|
+
saasUrl?: string | undefined;
|
|
1994
1996
|
}>;
|
|
1995
1997
|
getSessionList: () => Promise<{
|
|
1996
1998
|
isEdit?: boolean | undefined;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { w as ln, c as O } from "./path-DLwuMfdd.mjs";
|
|
2
|
-
import { au as an, av as G, aw as D, ax as rn, ay as y, Q as on, az as K, aA as _, aB as un, aC as t, aD as sn, aE as tn, aF as fn } from "./vue2-
|
|
2
|
+
import { au as an, av as G, aw as D, ax as rn, ay as y, Q as on, az as K, aA as _, aB as un, aC as t, aD as sn, aE as tn, aF as fn } from "./vue2-RpH9FTzh.mjs";
|
|
3
3
|
function cn(l) {
|
|
4
4
|
return l.innerRadius;
|
|
5
5
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { X as se, A as ye, d as H, e as Ee, l as S, E as we, k as De, g as he, p as ve } from "./vue2-
|
|
2
|
-
import { c as Ne } from "./clone-
|
|
3
|
-
import { i as ke, c as Ie, b as Oe, d as Te, a as ge, p as ze } from "./edges-e0da2a9e-
|
|
4
|
-
import { G as Ce } from "./graph-
|
|
1
|
+
import { X as se, A as ye, d as H, e as Ee, l as S, E as we, k as De, g as he, p as ve } from "./vue2-RpH9FTzh.mjs";
|
|
2
|
+
import { c as Ne } from "./clone-DIkB5LKb.mjs";
|
|
3
|
+
import { i as ke, c as Ie, b as Oe, d as Te, a as ge, p as ze } from "./edges-e0da2a9e-CArfG7b5.mjs";
|
|
4
|
+
import { G as Ce } from "./graph-giIUjUZD.mjs";
|
|
5
5
|
import "dayjs";
|
|
6
|
-
import { c as Ae } from "./channel-
|
|
6
|
+
import { c as Ae } from "./channel-CyP5aTgi.mjs";
|
|
7
7
|
import { o as Re } from "./ordinal-C0oynhte.mjs";
|
|
8
8
|
import { s as Be } from "./Tableau10-D7jGxypv.mjs";
|
|
9
9
|
var le, oe, ee = function() {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { g as Dt, s as we, a as Oe, b as Te, c as Re, d as Nt, l as le, e as De, f as Se, h as wt, i as ue, j as Pe, w as Me, k as Kt, m as oe } from "./
|
|
2
|
-
import { d as Le, g as Ne } from "./svgDrawCommon-08f97a94-
|
|
1
|
+
import { g as Dt, s as we, a as Oe, b as Te, c as Re, d as Nt, l as le, e as De, f as Se, h as wt, i as ue, j as Pe, w as Me, k as Kt, m as oe } from "./vue2-RpH9FTzh.mjs";
|
|
2
|
+
import { d as Le, g as Ne } from "./svgDrawCommon-08f97a94-fNQAKhKe.mjs";
|
|
3
3
|
import "dayjs";
|
|
4
4
|
var Yt = function() {
|
|
5
5
|
var e = function(bt, _, x, m) {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { s as G, d as S, p as A } from "./styles-9a916d00-
|
|
2
|
-
import { g as v, l as y, d as B, e as W, F as $, B as M, G as I } from "./vue2-
|
|
3
|
-
import { G as O } from "./graph-
|
|
4
|
-
import { l as P } from "./layout-
|
|
1
|
+
import { s as G, d as S, p as A } from "./styles-9a916d00-C0E1EPUJ.mjs";
|
|
2
|
+
import { g as v, l as y, d as B, e as W, F as $, B as M, G as I } from "./vue2-RpH9FTzh.mjs";
|
|
3
|
+
import { G as O } from "./graph-giIUjUZD.mjs";
|
|
4
|
+
import { l as P } from "./layout-DqzIAc4H.mjs";
|
|
5
5
|
import "dayjs";
|
|
6
|
-
import { l as X } from "./line-
|
|
6
|
+
import { l as X } from "./line-D12Dowqe.mjs";
|
|
7
7
|
let H = 0;
|
|
8
8
|
const Y = function(i, a, t, o, p) {
|
|
9
9
|
const g = function(e) {
|
package/dist/vue2/{classDiagram-v2-f2320105-6mJKz2-7.mjs → classDiagram-v2-f2320105-DCdAhfpF.mjs}
RENAMED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { s as M, d as _, p as B } from "./styles-9a916d00-
|
|
2
|
-
import { l as d, g as c, d as w, B as R, o as G, k as D, p as E, q as C, n as A } from "./vue2-
|
|
3
|
-
import { G as q } from "./graph-
|
|
4
|
-
import { r as z } from "./index-3862675e-
|
|
1
|
+
import { s as M, d as _, p as B } from "./styles-9a916d00-C0E1EPUJ.mjs";
|
|
2
|
+
import { l as d, g as c, d as w, B as R, o as G, k as D, p as E, q as C, n as A } from "./vue2-RpH9FTzh.mjs";
|
|
3
|
+
import { G as q } from "./graph-giIUjUZD.mjs";
|
|
4
|
+
import { r as z } from "./index-3862675e-DpiRHnai.mjs";
|
|
5
5
|
import "dayjs";
|
|
6
|
-
import "./layout-
|
|
6
|
+
import "./layout-DqzIAc4H.mjs";
|
|
7
7
|
const S = (s) => D.sanitizeText(s, c());
|
|
8
8
|
let k = {
|
|
9
9
|
dividerMargin: 10,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { l as At, b5 as zt, b6 as It } from "./vue2-
|
|
1
|
+
import { l as At, b5 as zt, b6 as It } from "./vue2-RpH9FTzh.mjs";
|
|
2
2
|
const Tt = {};
|
|
3
3
|
function Bt(n, r) {
|
|
4
4
|
const t = Tt, e = typeof t.includeImageAlt == "boolean" ? t.includeImageAlt : !0, u = typeof t.includeHtml == "boolean" ? t.includeHtml : !0;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { l as g, F as lt, g as b, r as H, d as E, B as j, i as q,
|
|
2
|
-
import { a as st } from "./createText-2e5e7dd3-
|
|
3
|
-
import { l as ct } from "./line-
|
|
1
|
+
import { l as g, F as lt, g as b, r as H, d as E, B as j, i as q, b5 as Q } from "./vue2-RpH9FTzh.mjs";
|
|
2
|
+
import { a as st } from "./createText-2e5e7dd3-gCDNrcYz.mjs";
|
|
3
|
+
import { l as ct } from "./line-D12Dowqe.mjs";
|
|
4
4
|
const ht = (e, t, a, i) => {
|
|
5
5
|
t.forEach((l) => {
|
|
6
6
|
wt[l](e, a, i);
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { C as Et, D as mt, a as gt, s as kt, b as xt, c as Rt, g as Z, l as V, d as rt, B as Ot, e as bt, E as Nt, F as Tt, G as At } from "./
|
|
2
|
-
import { G as Mt } from "./graph-
|
|
3
|
-
import { l as St } from "./layout-
|
|
1
|
+
import { C as Et, D as mt, a as gt, s as kt, b as xt, c as Rt, g as Z, l as V, d as rt, B as Ot, e as bt, E as Nt, F as Tt, G as At } from "./vue2-RpH9FTzh.mjs";
|
|
2
|
+
import { G as Mt } from "./graph-giIUjUZD.mjs";
|
|
3
|
+
import { l as St } from "./layout-DqzIAc4H.mjs";
|
|
4
4
|
import "dayjs";
|
|
5
|
-
import { l as wt } from "./line-
|
|
5
|
+
import { l as wt } from "./line-D12Dowqe.mjs";
|
|
6
6
|
const It = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;
|
|
7
7
|
function Dt(t) {
|
|
8
8
|
return typeof t == "string" && It.test(t);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as me, D as ye, s as ve, a as Ve, b as Le, c as Ie, ap as Re, k as Ne, l as J1, g as et, E as we, B as dt, d as w1 } from "./vue2-
|
|
1
|
+
import { C as me, D as ye, s as ve, a as Ve, b as Le, c as Ie, ap as Re, k as Ne, l as J1, g as et, E as we, B as dt, d as w1 } from "./vue2-RpH9FTzh.mjs";
|
|
2
2
|
var pt = function() {
|
|
3
3
|
var e = function(f1, a, o, f) {
|
|
4
4
|
for (o = o || {}, f = f1.length; f--; o[f1[f]] = a)
|
package/dist/{vue3/flowDiagram-66a62f08-CMQAOOB2.mjs → vue2/flowDiagram-66a62f08-HkNaHgFA.mjs}
RENAMED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { f as V, p as Lt } from "./flowDb-956e92f1-
|
|
2
|
-
import { h as S, f as tt, G as _t } from "./graph-
|
|
3
|
-
import { d as m, n as U, l as R, g as G, o as Et, p as Y, q as z, r as et, t as rt, k as at } from "./
|
|
4
|
-
import { u as Tt, r as Nt, p as At, l as Ct, d as M } from "./layout-
|
|
5
|
-
import { a as N, b as nt, i as st, c as E, e as it, d as ot, f as It, g as Bt, s as Mt } from "./styles-c10674c1-
|
|
6
|
-
import { l as Dt } from "./line-
|
|
1
|
+
import { f as V, p as Lt } from "./flowDb-956e92f1-BLxIyByn.mjs";
|
|
2
|
+
import { h as S, f as tt, G as _t } from "./graph-giIUjUZD.mjs";
|
|
3
|
+
import { d as m, n as U, l as R, g as G, o as Et, p as Y, q as z, r as et, t as rt, k as at } from "./vue2-RpH9FTzh.mjs";
|
|
4
|
+
import { u as Tt, r as Nt, p as At, l as Ct, d as M } from "./layout-DqzIAc4H.mjs";
|
|
5
|
+
import { a as N, b as nt, i as st, c as E, e as it, d as ot, f as It, g as Bt, s as Mt } from "./styles-c10674c1-BivFXW_o.mjs";
|
|
6
|
+
import { l as Dt } from "./line-D12Dowqe.mjs";
|
|
7
7
|
import "dayjs";
|
|
8
8
|
function Rt(r) {
|
|
9
9
|
if (!r.ok) throw new Error(r.status + " " + r.statusText);
|
package/dist/vue2/{flowDiagram-v2-96b9c2cf-fnOChKcM.mjs → flowDiagram-v2-96b9c2cf-DIK_4Xim.mjs}
RENAMED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { f as o, p as a } from "./flowDb-956e92f1-
|
|
2
|
-
import { f as t, g as e } from "./styles-c10674c1-
|
|
3
|
-
import { u as s } from "./vue2-
|
|
4
|
-
import "./graph-
|
|
5
|
-
import "./layout-
|
|
1
|
+
import { f as o, p as a } from "./flowDb-956e92f1-BLxIyByn.mjs";
|
|
2
|
+
import { f as t, g as e } from "./styles-c10674c1-BivFXW_o.mjs";
|
|
3
|
+
import { u as s } from "./vue2-RpH9FTzh.mjs";
|
|
4
|
+
import "./graph-giIUjUZD.mjs";
|
|
5
|
+
import "./layout-DqzIAc4H.mjs";
|
|
6
6
|
import "dayjs";
|
|
7
7
|
const b = {
|
|
8
8
|
parser: a,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { p as xNe, d as FNe } from "./flowDb-956e92f1-
|
|
2
|
-
import { an as BNe, ao as Nse, d as IO, l as Ba, X as xU, o as RNe, p as E0n, q as j0n, n as $U, k as KNe } from "./vue2-
|
|
3
|
-
import { i as _Ne, a as HNe, l as qNe, b as UNe, k as GNe, m as zNe } from "./edges-e0da2a9e-
|
|
1
|
+
import { p as xNe, d as FNe } from "./flowDb-956e92f1-BLxIyByn.mjs";
|
|
2
|
+
import { an as BNe, ao as Nse, d as IO, l as Ba, X as xU, o as RNe, p as E0n, q as j0n, n as $U, k as KNe } from "./vue2-RpH9FTzh.mjs";
|
|
3
|
+
import { i as _Ne, a as HNe, l as qNe, b as UNe, k as GNe, m as zNe } from "./edges-e0da2a9e-CArfG7b5.mjs";
|
|
4
4
|
import "dayjs";
|
|
5
|
-
import { l as XNe } from "./line-
|
|
5
|
+
import { l as XNe } from "./line-D12Dowqe.mjs";
|
|
6
6
|
function NU(ct) {
|
|
7
7
|
throw new Error('Could not dynamically require "' + ct + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.');
|
|
8
8
|
}
|
package/dist/{vue3/ganttDiagram-c361ad54-Bbpx9GT5.mjs → vue2/ganttDiagram-c361ad54-C649j0PV.mjs}
RENAMED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { R as Re, J as bn, K as ze, L as Be, M as qe, N as $t, O as vn, a as xn, s as wn, C as Cn, D as Dn, b as Mn, c as _n, g as wt, d as Rt, e as Sn, l as Xt, k as Un, j as Fn, E as En, B as An } from "./
|
|
1
|
+
import { R as Re, J as bn, K as ze, L as Be, M as qe, N as $t, O as vn, a as xn, s as wn, C as Cn, D as Dn, b as Mn, c as _n, g as wt, d as Rt, e as Sn, l as Xt, k as Un, j as Fn, E as En, B as An } from "./vue2-RpH9FTzh.mjs";
|
|
2
2
|
import K from "dayjs";
|
|
3
3
|
import In from "dayjs/plugin/isoWeek.js";
|
|
4
4
|
import Ln from "dayjs/plugin/customParseFormat.js";
|
|
5
5
|
import Yn from "dayjs/plugin/advancedFormat.js";
|
|
6
|
-
import { b as Wn, t as _e, c as Nn, a as On, l as Hn } from "./linear-
|
|
6
|
+
import { b as Wn, t as _e, c as Nn, a as On, l as Hn } from "./linear-DiuHj4Sp.mjs";
|
|
7
7
|
import { i as Vn } from "./init-DjUOC4st.mjs";
|
|
8
8
|
function Pn(t, e) {
|
|
9
9
|
let n;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as vt, D as Ct, s as Ot, a as Pt, b as Gt, c as It, g as C, l as B, d as St, B as At, H as Nt, E as Ht, k as D, I as Bt } from "./
|
|
1
|
+
import { C as vt, D as Ct, s as Ot, a as Pt, b as Gt, c as It, g as C, l as B, d as St, B as At, H as Nt, E as Ht, k as D, I as Bt } from "./vue2-RpH9FTzh.mjs";
|
|
2
2
|
import "dayjs";
|
|
3
3
|
var mt = function() {
|
|
4
4
|
var r = function(I, o, u, d) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { aI as C, aJ as Ze, ad as y, aK as m, aL as qe, aM as Xe, ac as Te, aN as Je, aO as Ee, aP as G, aa as X, aQ as Qe, aR as me, aS as We, aT as I, aj as Oe, aU as D, a5 as we, aV as ze, aW as Z, aX as Ve, aY as ke, aZ as $, ai as en, a_ as nn, ab as rn, a$ as re, b0 as tn, b1 as sn, ah as an, ag as ve, ae as un, b2 as j, a8 as fn, b3 as on, ak as M, z as te, b4 as ie } from "./vue2-
|
|
1
|
+
import { aI as C, aJ as Ze, ad as y, aK as m, aL as qe, aM as Xe, ac as Te, aN as Je, aO as Ee, aP as G, aa as X, aQ as Qe, aR as me, aS as We, aT as I, aj as Oe, aU as D, a5 as we, aV as ze, aW as Z, aX as Ve, aY as ke, aZ as $, ai as en, a_ as nn, ab as rn, a$ as re, b0 as tn, b1 as sn, ah as an, ag as ve, ae as un, b2 as j, a8 as fn, b3 as on, ak as M, z as te, b4 as ie } from "./vue2-RpH9FTzh.mjs";
|
|
2
2
|
var dn = "[object Symbol]";
|
|
3
3
|
function J(e) {
|
|
4
4
|
return typeof e == "symbol" || C(e) && Ze(e) == dn;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { i as N, G as A } from "./graph-
|
|
2
|
-
import { m as $, l as H } from "./layout-
|
|
3
|
-
import { c as V } from "./clone-
|
|
4
|
-
import { i as U, u as W, s as _, a as q, b as z, g as D, p as O, c as K, d as Q, e as p, f as J, h as Y, j as Z } from "./edges-e0da2a9e-
|
|
5
|
-
import { l as s, g as T, r as S, d as L } from "./
|
|
6
|
-
import { a as I } from "./createText-2e5e7dd3-
|
|
1
|
+
import { i as N, G as A } from "./graph-giIUjUZD.mjs";
|
|
2
|
+
import { m as $, l as H } from "./layout-DqzIAc4H.mjs";
|
|
3
|
+
import { c as V } from "./clone-DIkB5LKb.mjs";
|
|
4
|
+
import { i as U, u as W, s as _, a as q, b as z, g as D, p as O, c as K, d as Q, e as p, f as J, h as Y, j as Z } from "./edges-e0da2a9e-CArfG7b5.mjs";
|
|
5
|
+
import { l as s, g as T, r as S, d as L } from "./vue2-RpH9FTzh.mjs";
|
|
6
|
+
import { a as I } from "./createText-2e5e7dd3-gCDNrcYz.mjs";
|
|
7
7
|
function m(e) {
|
|
8
8
|
var t = {
|
|
9
9
|
options: {
|
|
@@ -458,7 +458,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
458
458
|
}
|
|
459
459
|
}
|
|
460
460
|
}
|
|
461
|
-
}`;t=document.createElement("style"),t.textContent=o+l,document.head.appendChild(t)},i=()=>{t&&(t.remove(),t=null)};x7(()=>{n()}),qf(()=>{i()})},THn={[Mne.Error]:[]},CHn=(t,n)=>{THn[t].forEach(i=>{i(n)})};function W2e(t,n,i){return n in t?Object.defineProperty(t,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[n]=i,t}class QG extends Error{constructor(n,i,o){super(),W2e(this,"code",void 0),W2e(this,"message",void 0),W2e(this,"response",void 0),this.code=n,this.message=i,this.response=o}}const xHn=(t,n)=>{var i,o,l,u,f,h;const m=(t==null||(i=t.error)===null||i===void 0?void 0:i.message)||(t==null?void 0:t.message)||(t==null||(o=t.response)===null||o===void 0?void 0:o.message)||"系统错误",b=(t==null||(l=t.error)===null||l===void 0?void 0:l.code)||(t==null?void 0:t.code)||(t==null||(u=t.response)===null||u===void 0?void 0:u.code)||-1,_=(t==null||(f=t.error)===null||f===void 0?void 0:f.data)||(t==null?void 0:t.data)||(t==null||(h=t.response)===null||h===void 0?void 0:h.data)||t;return CHn(Mne.Error,{code:b,message:m,data:_,config:n}),Promise.reject(new QG(b,m,_))};function rct(t,n,i,o,l,u,f){try{var h=t[u](f),m=h.value}catch(b){i(b);return}h.done?n(m):Promise.resolve(m).then(o,l)}function ict(t){return function(){var n=this,i=arguments;return new Promise(function(o,l){var u=t.apply(n,i);function f(m){rct(u,o,l,f,h,"next",m)}function h(m){rct(u,o,l,f,h,"throw",m)}f(void 0)})}}const kHn=function(){var t=ict(function*(n,i){const o=yield n[i.responseType](),l=o.error||o,u=l.code||n.code||-1,f=l.message||n.statusText||"系统错误";if(n.ok)switch(u){case"success":case 0:return Promise.resolve(l.data);default:throw new QG(u,f,l)}else throw new QG(u,f,l)});return function(i,o){return t.apply(this,arguments)}}(),AHn=function(){var t=ict(function*(n){if(!n.ok)throw new QG(n.status||-1,n.statusText||"系统错误");const i=n.body.getReader(),o=new ReadableStream({start(l){return u();function u(){return i.read().then(({done:f,value:h})=>{if(f){l.close();return}return l.enqueue(h),u()})}}});return new Response(o).blob()});return function(i){return t.apply(this,arguments)}}(),IHn=(t,n)=>n.responseType==="file"?AHn(t):kHn(t,n);function act(t,n,i,o,l,u,f){try{var h=t[u](f),m=h.value}catch(b){i(b);return}h.done?n(m):Promise.resolve(m).then(o,l)}function NHn(t){return function(){var n=this,i=arguments;return new Promise(function(o,l){var u=t.apply(n,i);function f(m){act(u,o,l,f,h,"next",m)}function h(m){act(u,o,l,f,h,"throw",m)}f(void 0)})}}function OHn(t,n,i){return n in t?Object.defineProperty(t,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[n]=i,t}function Lne(t){for(var n=1;n<arguments.length;n++){var i=arguments[n]!=null?arguments[n]:{},o=Object.keys(i);typeof Object.getOwnPropertySymbols=="function"&&(o=o.concat(Object.getOwnPropertySymbols(i).filter(function(l){return Object.getOwnPropertyDescriptor(i,l).enumerable}))),o.forEach(function(l){OHn(t,l,i[l])})}return t}function MHn(t,n){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);i.push.apply(i,o)}return i}function oct(t,n){return n=n??{},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):MHn(Object(n)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(n,i))}),t}const RHn={json:"application/json",text:"text/plain",formData:"multipart/form-data"},sct=["delete","get","head","options"],cct=["post","put","patch"],LHn=[...sct,...cct],DHn=(t,n,i)=>{const o={"X-Requested-With":"fetch","X-CSRFToken":gHn("aidev_csrftoken")||""};i.requestType!=="formData"&&(o["Content-Type"]=RHn[i.requestType]||"application/json");let l=oct(Lne({method:t.toLocaleUpperCase(),mode:"cors",cache:"default",credentials:"include",redirect:"follow",referrerPolicy:"no-referrer-when-downgrade",responseType:"json",globalError:!0},i),{headers:Lne({},o,i==null?void 0:i.headers)});return cct.includes(t)?l=q2e(l,{body:i.requestType==="formData"?n:JSON.stringify(n)}):l=q2e(l,n),l},PHn=(t,n,i={})=>{try{const o=location.origin,l=new URL(t,o);if(!/https?:\/\//.test(t)){const u=window.SITE_URL||"",f=u.endsWith("/")?u.slice(0,-1):u;l.pathname=f+l.pathname}if(sct.includes(n)){const u=(h,m)=>{["",void 0,null].includes(m)||l.searchParams.append(h,m)},f=!!(i!=null&&i.noEncodeURI);i==null||delete i.noEncodeURI,Object.keys(i||{}).forEach(h=>{const m=i[h];f&&Object.prototype.toString.call(m)==="[object Array]"?m.forEach(b=>{u(h,b)}):u(h,m)})}return l.href}catch(o){throw new QG(-1,o.message)}},Q1={};LHn.forEach(t=>{Object.defineProperty(Q1,t,{get(){return function(){var n=NHn(function*(i,o,l={}){var u;const f={url:i,data:o,headers:l.headers},h=Lne({},f,((u=l.beforeRequest)===null||u===void 0?void 0:u.call(l,f))||{});let m,b;try{b=DHn(t,h.data,oct(Lne({},l),{headers:h.headers}));const E=PHn(h.url,t,h.data);return m=yield fetch(E,b),yield IHn(m,b)}catch(E){return xHn(E,b)}finally{var _;(_=l.afterRequest)===null||_===void 0||_.call(l,f,m)}});return function(i,o){return n.apply(this,arguments)}}()}})});const BHn=t=>{var n,i,o,l,u,f;return{conversationSettings:{openingRemark:t==null||(n=t.conversation_settings)===null||n===void 0?void 0:n.opening_remark,predefinedQuestions:t==null||(i=t.conversation_settings)===null||i===void 0?void 0:i.predefined_questions,commands:t==null||(l=t.conversation_settings)===null||l===void 0||(o=l.commands)===null||o===void 0?void 0:o.map(h=>({id:h.id,name:h.name,icon:h.icon,components:h.components.map(m=>({type:m.type,name:m.name,key:m.key,placeholder:m.placeholder,default:m.default,required:m.required,fillBack:m.fill_back,fillRegx:m.fill_regx,rows:m.rows,min:m.min,max:m.max,options:m.options})),content:h.content,agentId:h.agent_id,status:h.status})),enableChatSession:t==null||(u=t.conversation_settings)===null||u===void 0?void 0:u.enable_chat_session},promptSetting:{content:t==null||(f=t.prompt_setting)===null||f===void 0?void 0:f.content},agentName:t==null?void 0:t.agent_name,chatGroup:t!=null&&t.chat_group?{enabled:t.chat_group.enabled,staff:t.chat_group.staff}:void 0}},K2e=t=>t?{accessModel:t.access_model,accessModelStrategy:t.access_model_strategy,viewSpace:t.view_space,manageSpace:t.manage_space,viewAgent:t.view_agent,createAgent:t.create_agent,manageAgent:t.manage_agent,viewPrompt:t.view_prompt,createPrompt:t.create_prompt,managePrompt:t.manage_prompt,viewCollection:t.view_collection,createCollection:t.create_collection,manageCollection:t.manage_collection,viewTool:t.view_tool,createTool:t.create_tool,manageTool:t.manage_tool,viewKnowledgebase:t.view_knowledgebase,createKnowledgebase:t.create_knowledgebase,manageKnowledgebase:t.manage_knowledgebase,viewQueryTemplate:t.view_query_template,createQueryTemplate:t.create_query_template,manageQueryTemplate:t.manage_query_template,viewDataset:t.view_dataset,manageDataset:t.manage_dataset,createMcp:t.create_mcp,manageMcp:t.manage_mcp,viewMcp:t.view_mcp}:void 0;function FHn(t,n,i){return n in t?Object.defineProperty(t,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[n]=i,t}function lct(t){for(var n=1;n<arguments.length;n++){var i=arguments[n]!=null?arguments[n]:{},o=Object.keys(i);typeof Object.getOwnPropertySymbols=="function"&&(o=o.concat(Object.getOwnPropertySymbols(i).filter(function(l){return Object.getOwnPropertyDescriptor(i,l).enumerable}))),o.forEach(function(l){FHn(t,l,i[l])})}return t}function jHn(t,n){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);i.push.apply(i,o)}return i}function uct(t,n){return n=n??{},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):jHn(Object(n)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(n,i))}),t}const fct=t=>{const n=/\/([^/]*)$/.exec(t),i={fileName:void 0,filePath:void 0};return n&&(i.fileName=t.slice(n.index+1),i.filePath=t.slice(0,n.index)),i},UHn=t=>({id:t.id,url:t.url,content:t.content,tag_names:t.tagNames,config:{splitter:t.splitter,handle_type:t.handleType,update_frequency:t.updateFrequency,headers:t.headers,csv_delimiter:t.csvDelimiter},knowledge_name:t.name,file_name:Rne(t.filePath,t.fileName),file_size:t.fileSize,file_type:t.fileType,file_path:Rne(t.filePath,t.fileName),path_type:t.pathType,created_type:t.createdType,status:t.status,knowledge_base_id:t.knowledgebaseId,parent_anchor_path:t.parentAnchorPath,anchor_path:Xst(t.parentAnchorPath,t.fileName),index_config:t.indexConfig,credential_id:t.credentialId,space_id:t.spaceId}),dct=t=>{var n,i,o,l,u;const{fileName:f=t.file_path,filePath:h=""}=fct(t.file_path);return{anchorPath:t.anchor_path,id:t.id,spaceId:t.space_id,url:t.url,content:t.content,tagNames:t.tag_names,handleType:(n=t.config)===null||n===void 0?void 0:n.handle_type,splitter:(i=t.config)===null||i===void 0?void 0:i.splitter,updateFrequency:(o=t.config)===null||o===void 0?void 0:o.update_frequency,headers:(l=t.config)===null||l===void 0?void 0:l.headers,csvDelimiter:(u=t.config)===null||u===void 0?void 0:u.csv_delimiter,fileName:f,filePath:h,fileSize:t.file_size,fileType:t.file_type,pathType:t.path_type,createdType:t.created_type,status:t.status,permission:K2e(t.permission),knowledgebaseId:t.knowledge_base_id,knowledgebaseName:t.knowledge_base_name,parentAnchorPath:t.parent_anchor_path,name:t.knowledge_name,errorMessage:t.error_message,isStructured:t.is_structured,updatedAt:t.updated_at,updatedBy:t.updated_by,indexConfig:t.index_config,credentialId:t.credential_id}},Dne=(t,n)=>{var i,o,l;const{fileName:u=t.file_path,filePath:f=""}=fct(t.file_path),h={id:t.id,spaceId:t.space_id,knowledgebaseCode:"",fileName:u,filePath:f,handleType:(i=t.config)===null||i===void 0?void 0:i.handle_type,updateFrequency:(o=t.config)===null||o===void 0?void 0:o.update_frequency,name:t.knowledge_name,number:t.knowledge_count,folderNumber:t.folder_num,url:t.url,updatedBy:t.updated_by,pathType:t.path_type,fileType:t.file_type,createdType:t.created_type,indexConfig:t.index_config,anchorPath:t.anchor_path,parentAnchorPath:t.parent_anchor_path,permission:n==null?void 0:n.permission,knowledgebaseId:n==null?void 0:n.id};return uct(lct({},h),{children:(l=t.children)===null||l===void 0?void 0:l.map(m=>Dne(m,n))})},zHn=t=>({config:{handle_type:t.handleType},id:t.id,name:t.name,type:t.type,knowledgebase_code:t.knowledgebaseCode,description:t.description,generate_type:t.generateType,knowledge_count:t.number,anchor_path:t.anchorPath,index_config:t.indexConfig,status:t.status}),GHn=t=>({id:t.id,config:{splitter:"",handle_type:t.handleType,update_frequency:t.updateFrequency},created_type:t.createdType,knowledge_name:t.name,file_name:Rne(t.filePath,t.name),file_path:Rne(t.filePath,t.name),path_type:t.pathType,anchor_path:Xst(t.parentAnchorPath,t.name)}),hct=t=>{var n,i;const o={id:t.id,spaceId:t.space_id,filePath:"",handleType:(n=t.config)===null||n===void 0?void 0:n.handle_type,name:t.name,type:t.type,knowledgebaseCode:t.knowledgebase_code,status:t.status,generateType:t.generate_type,number:t.knowledge_count,folderNumber:t.folder_num,updatedBy:t.updated_by,anchorPath:t.anchor_path,description:t.description,indexConfig:t.index_config,permission:K2e(t.permission)};return uct(lct({},o),{children:(i=t.children)===null||i===void 0?void 0:i.map(l=>Dne(l,o))})},pct=t=>({header:t.property.header,query:t.property.query,body:t.property.body,creator:t.created_by,createTime:t.created_at,updateTime:t.updated_at,toolCode:t.tool_code,toolName:t.tool_name,icon:t.icon,description:t.description,method:t.method,url:t.url,generateType:t.generate_type,id:t.tool_id,spaceId:t.space_id,status:t.status,isSensitive:t.is_sensitive,credentialId:t.credential_id,credentialType:t.credential_type,permission:K2e(t.permission)}),$Hn=t=>({created_by:t.creator,created_at:t.createTime,updated_at:t.updateTime,tool_code:t.toolCode,tool_name:t.toolName,icon:t.icon,description:t.description,method:t.method,url:t.url,generate_type:t.generateType,tool_id:t.id,status:t.status,is_sensitive:t.isSensitive,credential_id:t.credentialId,credential_type:t.credentialType,property:{header:t.header,query:t.query,body:t.body}});function HHn(t,n,i){return n in t?Object.defineProperty(t,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[n]=i,t}function VHn(t){for(var n=1;n<arguments.length;n++){var i=arguments[n]!=null?arguments[n]:{},o=Object.keys(i);typeof Object.getOwnPropertySymbols=="function"&&(o=o.concat(Object.getOwnPropertySymbols(i).filter(function(l){return Object.getOwnPropertyDescriptor(i,l).enumerable}))),o.forEach(function(l){HHn(t,l,i[l])})}return t}function YHn(t,n){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);i.push.apply(i,o)}return i}function qHn(t,n){return n=n??{},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):YHn(Object(n)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(n,i))}),t}const Q2e=t=>{const n={[fi.Ai]:Os.Assistant,[fi.User]:Os.User,[fi.System]:Os.System,[fi.Hidden]:Os.Hidden,[fi.Guide]:Os.Guide,[fi.Time]:Os.System,[fi.Role]:Os.System,[fi.Placeholder]:Os.Placeholder,[fi.HiddenAi]:Os.HiddenAssistant,[fi.HiddenGuide]:Os.HiddenGuide,[fi.HiddenRole]:Os.HiddenSystem,[fi.HiddenUser]:Os.HiddenUser,[fi.TemplateAi]:Os.TemplateAssistant,[fi.TemplateGuide]:Os.TemplateGuide,[fi.TemplateRole]:Os.TemplateSystem,[fi.TemplateUser]:Os.TemplateUser,[fi.TemplateHidden]:Os.TemplateHidden,[fi.Pause]:Os.Pause,[fi.TokenExpired]:Os.Pause,[fi.ImageNotSupported]:Os.Pause,[fi.UserImage]:Os.UserImage};return{content:t.content,role:n[t.role]}},WHn=t=>{const n={[Os.Assistant]:fi.Ai,[Os.User]:fi.User,[Os.System]:fi.Role,[Os.Hidden]:fi.Hidden,[Os.Guide]:fi.Guide,[Os.Placeholder]:fi.Placeholder,[Os.HiddenAssistant]:fi.HiddenAi,[Os.HiddenGuide]:fi.HiddenGuide,[Os.HiddenSystem]:fi.HiddenRole,[Os.HiddenUser]:fi.HiddenUser,[Os.TemplateAssistant]:fi.TemplateAi,[Os.TemplateGuide]:fi.TemplateGuide,[Os.TemplateSystem]:fi.TemplateRole,[Os.TemplateUser]:fi.TemplateUser,[Os.TemplateHidden]:fi.TemplateHidden,[Os.Pause]:fi.Pause,[Os.UserImage]:fi.UserImage};return{content:t.content,role:n[t.role]}},Pne=t=>{var n,i,o,l;return{sessionCode:t.session_code,sessionName:t.session_name,model:t.model,updatedAt:t.updated_at,createdAt:t.created_at,roleInfo:t.role_info?{collectionId:t.role_info.collection_id,collectionName:t.role_info.collection_name,content:t.role_info.content,variables:t.role_info.variables}:void 0,sessionProperty:{isAutoClear:t.session_property.is_auto_clear,isAutoCalcPrompt:t.session_property.is_auto_clac_prompt},tools:(n=t.tools)===null||n===void 0?void 0:n.map(pct),anchorPathResources:{knowledges:(i=t.anchor_path_resources)===null||i===void 0?void 0:i.knowledges.map(dct),knowledgebases:(o=t.anchor_path_resources)===null||o===void 0?void 0:o.knowledgebases.map(hct),knowledgeFolders:(l=t.anchor_path_resources)===null||l===void 0?void 0:l.knowledge_folders.map(u=>Dne(u))}}},gct=t=>{var n,i;return{session_code:t.sessionCode,session_name:t.sessionName,model:t.model||void 0,updated_at:t.updatedAt,created_at:t.createdAt,role_info:t.roleInfo?{collection_id:t.roleInfo.collectionId,collection_name:t.roleInfo.collectionName,content:t.roleInfo.content,variables:t.roleInfo.variables}:void 0,session_property:{is_auto_clear:(n=t.sessionProperty)===null||n===void 0?void 0:n.isAutoClear,is_auto_clac_prompt:(i=t.sessionProperty)===null||i===void 0?void 0:i.isAutoCalcPrompt}}},KHn=t=>{var n,i,o,l,u,f,h,m,b,_,E,S,T,x,I,N,O;return{id:t.id,sessionCode:t.session_code,createdAt:t.created_at,createdBy:t.created_by,updatedAt:t.updated_at,updatedBy:t.updated_by,liked:t.liked,role:t.role,content:t.content,spaceId:t.space_id,rate:t.rate,status:t.status,property:{extra:{tools:(o=t.property)===null||o===void 0||(i=o.extra)===null||i===void 0||(n=i.tools)===null||n===void 0?void 0:n.map(pct),anchorPathResources:{knowledges:(h=t.property)===null||h===void 0||(f=h.extra)===null||f===void 0||(u=f.anchor_path_resources)===null||u===void 0||(l=u.knowledges)===null||l===void 0?void 0:l.map(dct),knowledgebases:(E=t.property)===null||E===void 0||(_=E.extra)===null||_===void 0||(b=_.anchor_path_resources)===null||b===void 0||(m=b.knowledgebases)===null||m===void 0?void 0:m.map(hct),knowledgeFolders:(I=t.property)===null||I===void 0||(x=I.extra)===null||x===void 0||(T=x.anchor_path_resources)===null||T===void 0||(S=T.knowledge_folders)===null||S===void 0?void 0:S.map(L=>Dne(L))},cite:(O=t.property)===null||O===void 0||(N=O.extra)===null||N===void 0?void 0:N.cite}}}},mct=t=>{var n,i,o,l,u,f,h,m,b,_,E,S,T,x,I,N;return{id:t.id,session_code:t.sessionCode,created_at:t.createdAt,created_by:t.createdBy,updated_at:t.updatedAt,updated_by:t.updatedBy,liked:t.liked,role:t.role,content:t.content,space_id:t.spaceId,rate:t.rate,status:t.status,property:{extra:qHn(VHn({},t==null||(n=t.property)===null||n===void 0?void 0:n.extra),{tools:(l=t.property)===null||l===void 0||(o=l.extra)===null||o===void 0||(i=o.tools)===null||i===void 0?void 0:i.map($Hn),anchor_path_resources:{knowledges:(m=t.property)===null||m===void 0||(h=m.extra)===null||h===void 0||(f=h.anchorPathResources)===null||f===void 0||(u=f.knowledges)===null||u===void 0?void 0:u.map(UHn),knowledgebases:(S=t.property)===null||S===void 0||(E=S.extra)===null||E===void 0||(_=E.anchorPathResources)===null||_===void 0||(b=_.knowledgebases)===null||b===void 0?void 0:b.map(zHn),knowledge_folders:(N=t.property)===null||N===void 0||(I=N.extra)===null||I===void 0||(x=I.anchorPathResources)===null||x===void 0||(T=x.knowledgeFolders)===null||T===void 0?void 0:T.map(GHn)}})}}},bct=({apiPrefix:t,headers:n,beforeRequest:i,afterRequest:o})=>({getAgentInfo:()=>Q1.get(`${t}/agent/info/`,void 0,{headers:n,beforeRequest:i,afterRequest:o}).then(P=>BHn(P)),clearSession:P=>Q1.post(`${t}/chat_completion/${P}/clear/`,void 0,{headers:n,beforeRequest:i,afterRequest:o}),getSessions:()=>Q1.get(`${t}/session/`,void 0,{headers:n,beforeRequest:i,afterRequest:o}).then(P=>P.map(Pne)),plusSession:P=>Q1.post(`${t}/session/`,gct(P),{headers:n,beforeRequest:i,afterRequest:o}).then(B=>Pne(B)),modifySession:P=>Q1.put(`${t}/session/${P.sessionCode}/`,gct(P),{headers:n,beforeRequest:i,afterRequest:o}).then(B=>Pne(B)),deleteSession:P=>Q1.delete(`${t}/session/${P}/`,void 0,{headers:n,beforeRequest:i,afterRequest:o}),batchDeleteSessions:P=>Q1.post(`${t}/session/batch_delete/`,{session_codes:P},{headers:n,beforeRequest:i,afterRequest:o}),getSession:P=>Q1.get(`${t}/session/${P}/`,void 0,{headers:n,beforeRequest:i,afterRequest:o}).then(B=>Pne(B)),getSessionContents:P=>Q1.get(`${t}/session_content/content/`,{session_code:P},{headers:n,beforeRequest:i,afterRequest:o}).then(B=>B.map(KHn)),plusSessionContent:P=>Q1.post(`${t}/session_content/`,mct(P),{headers:n,beforeRequest:i,afterRequest:o}),modifySessionContent:P=>Q1.put(`${t}/session_content/${P.id}/`,mct(P),{headers:n,beforeRequest:i,afterRequest:o}),deleteSessionContent:P=>Q1.delete(`${t}/session_content/${P}/`,void 0,{headers:n,beforeRequest:i,afterRequest:o}),batchDeleteSessionContents:P=>Q1.post(`${t}/session_content/batch_delete/`,{ids:P},{headers:n,beforeRequest:i,afterRequest:o}),renameSession:P=>Q1.post(`${t}/session/${P}/ai_rename/`,void 0,{headers:n,beforeRequest:i,afterRequest:o}).then(B=>({sessionCode:B.session_code,sessionName:B.session_name})),getChatGroup:P=>Q1.post(`${t}/chat_group/`,P,{headers:n,beforeRequest:i,afterRequest:o})}),QHn=(t,n,i,o)=>{let l=t==="内容正在生成中..."||i?"":t;if(!l.includes('<section class="think-head click-close">'))l+=`<section class="think-head click-close">
|
|
461
|
+
}`;t=document.createElement("style"),t.textContent=o+l,document.head.appendChild(t)},i=()=>{t&&(t.remove(),t=null)};x7(()=>{n()}),qf(()=>{i()})},THn={[Mne.Error]:[]},CHn=(t,n)=>{THn[t].forEach(i=>{i(n)})};function W2e(t,n,i){return n in t?Object.defineProperty(t,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[n]=i,t}class QG extends Error{constructor(n,i,o){super(),W2e(this,"code",void 0),W2e(this,"message",void 0),W2e(this,"response",void 0),this.code=n,this.message=i,this.response=o}}const xHn=(t,n)=>{var i,o,l,u,f,h;const m=(t==null||(i=t.error)===null||i===void 0?void 0:i.message)||(t==null?void 0:t.message)||(t==null||(o=t.response)===null||o===void 0?void 0:o.message)||"系统错误",b=(t==null||(l=t.error)===null||l===void 0?void 0:l.code)||(t==null?void 0:t.code)||(t==null||(u=t.response)===null||u===void 0?void 0:u.code)||-1,_=(t==null||(f=t.error)===null||f===void 0?void 0:f.data)||(t==null?void 0:t.data)||(t==null||(h=t.response)===null||h===void 0?void 0:h.data)||t;return CHn(Mne.Error,{code:b,message:m,data:_,config:n}),Promise.reject(new QG(b,m,_))};function rct(t,n,i,o,l,u,f){try{var h=t[u](f),m=h.value}catch(b){i(b);return}h.done?n(m):Promise.resolve(m).then(o,l)}function ict(t){return function(){var n=this,i=arguments;return new Promise(function(o,l){var u=t.apply(n,i);function f(m){rct(u,o,l,f,h,"next",m)}function h(m){rct(u,o,l,f,h,"throw",m)}f(void 0)})}}const kHn=function(){var t=ict(function*(n,i){const o=yield n[i.responseType](),l=o.error||o,u=l.code||n.code||-1,f=l.message||n.statusText||"系统错误";if(n.ok)switch(u){case"success":case 0:return Promise.resolve(l.data);default:throw new QG(u,f,l)}else throw new QG(u,f,l)});return function(i,o){return t.apply(this,arguments)}}(),AHn=function(){var t=ict(function*(n){if(!n.ok)throw new QG(n.status||-1,n.statusText||"系统错误");const i=n.body.getReader(),o=new ReadableStream({start(l){return u();function u(){return i.read().then(({done:f,value:h})=>{if(f){l.close();return}return l.enqueue(h),u()})}}});return new Response(o).blob()});return function(i){return t.apply(this,arguments)}}(),IHn=(t,n)=>n.responseType==="file"?AHn(t):kHn(t,n);function act(t,n,i,o,l,u,f){try{var h=t[u](f),m=h.value}catch(b){i(b);return}h.done?n(m):Promise.resolve(m).then(o,l)}function NHn(t){return function(){var n=this,i=arguments;return new Promise(function(o,l){var u=t.apply(n,i);function f(m){act(u,o,l,f,h,"next",m)}function h(m){act(u,o,l,f,h,"throw",m)}f(void 0)})}}function OHn(t,n,i){return n in t?Object.defineProperty(t,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[n]=i,t}function Lne(t){for(var n=1;n<arguments.length;n++){var i=arguments[n]!=null?arguments[n]:{},o=Object.keys(i);typeof Object.getOwnPropertySymbols=="function"&&(o=o.concat(Object.getOwnPropertySymbols(i).filter(function(l){return Object.getOwnPropertyDescriptor(i,l).enumerable}))),o.forEach(function(l){OHn(t,l,i[l])})}return t}function MHn(t,n){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);i.push.apply(i,o)}return i}function oct(t,n){return n=n??{},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):MHn(Object(n)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(n,i))}),t}const RHn={json:"application/json",text:"text/plain",formData:"multipart/form-data"},sct=["delete","get","head","options"],cct=["post","put","patch"],LHn=[...sct,...cct],DHn=(t,n,i)=>{const o={"X-Requested-With":"fetch","X-CSRFToken":gHn("aidev_csrftoken")||""};i.requestType!=="formData"&&(o["Content-Type"]=RHn[i.requestType]||"application/json");let l=oct(Lne({method:t.toLocaleUpperCase(),mode:"cors",cache:"default",credentials:"include",redirect:"follow",referrerPolicy:"no-referrer-when-downgrade",responseType:"json",globalError:!0},i),{headers:Lne({},o,i==null?void 0:i.headers)});return cct.includes(t)?l=q2e(l,{body:i.requestType==="formData"?n:JSON.stringify(n)}):l=q2e(l,n),l},PHn=(t,n,i={})=>{try{const o=location.origin,l=new URL(t,o);if(!/https?:\/\//.test(t)){const u=window.SITE_URL||"",f=u.endsWith("/")?u.slice(0,-1):u;l.pathname=f+l.pathname}if(sct.includes(n)){const u=(h,m)=>{["",void 0,null].includes(m)||l.searchParams.append(h,m)},f=!!(i!=null&&i.noEncodeURI);i==null||delete i.noEncodeURI,Object.keys(i||{}).forEach(h=>{const m=i[h];f&&Object.prototype.toString.call(m)==="[object Array]"?m.forEach(b=>{u(h,b)}):u(h,m)})}return l.href}catch(o){throw new QG(-1,o.message)}},Q1={};LHn.forEach(t=>{Object.defineProperty(Q1,t,{get(){return function(){var n=NHn(function*(i,o,l={}){var u;const f={url:i,data:o,headers:l.headers},h=Lne({},f,((u=l.beforeRequest)===null||u===void 0?void 0:u.call(l,f))||{});let m,b;try{b=DHn(t,h.data,oct(Lne({},l),{headers:h.headers}));const E=PHn(h.url,t,h.data);return m=yield fetch(E,b),yield IHn(m,b)}catch(E){return xHn(E,b)}finally{var _;(_=l.afterRequest)===null||_===void 0||_.call(l,f,m)}});return function(i,o){return n.apply(this,arguments)}}()}})});const BHn=t=>{var n,i,o,l,u,f;return{conversationSettings:{openingRemark:t==null||(n=t.conversation_settings)===null||n===void 0?void 0:n.opening_remark,predefinedQuestions:t==null||(i=t.conversation_settings)===null||i===void 0?void 0:i.predefined_questions,commands:t==null||(l=t.conversation_settings)===null||l===void 0||(o=l.commands)===null||o===void 0?void 0:o.map(h=>({id:h.id,name:h.name,icon:h.icon,components:h.components.map(m=>({type:m.type,name:m.name,key:m.key,placeholder:m.placeholder,default:m.default,required:m.required,fillBack:m.fill_back,fillRegx:m.fill_regx,rows:m.rows,min:m.min,max:m.max,options:m.options})),content:h.content,agentId:h.agent_id,status:h.status})),enableChatSession:t==null||(u=t.conversation_settings)===null||u===void 0?void 0:u.enable_chat_session},promptSetting:{content:t==null||(f=t.prompt_setting)===null||f===void 0?void 0:f.content},agentName:t==null?void 0:t.agent_name,chatGroup:t!=null&&t.chat_group?{enabled:t.chat_group.enabled,staff:t.chat_group.staff}:void 0,saasUrl:t==null?void 0:t.saas_url}},K2e=t=>t?{accessModel:t.access_model,accessModelStrategy:t.access_model_strategy,viewSpace:t.view_space,manageSpace:t.manage_space,viewAgent:t.view_agent,createAgent:t.create_agent,manageAgent:t.manage_agent,viewPrompt:t.view_prompt,createPrompt:t.create_prompt,managePrompt:t.manage_prompt,viewCollection:t.view_collection,createCollection:t.create_collection,manageCollection:t.manage_collection,viewTool:t.view_tool,createTool:t.create_tool,manageTool:t.manage_tool,viewKnowledgebase:t.view_knowledgebase,createKnowledgebase:t.create_knowledgebase,manageKnowledgebase:t.manage_knowledgebase,viewQueryTemplate:t.view_query_template,createQueryTemplate:t.create_query_template,manageQueryTemplate:t.manage_query_template,viewDataset:t.view_dataset,manageDataset:t.manage_dataset,createMcp:t.create_mcp,manageMcp:t.manage_mcp,viewMcp:t.view_mcp}:void 0;function FHn(t,n,i){return n in t?Object.defineProperty(t,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[n]=i,t}function lct(t){for(var n=1;n<arguments.length;n++){var i=arguments[n]!=null?arguments[n]:{},o=Object.keys(i);typeof Object.getOwnPropertySymbols=="function"&&(o=o.concat(Object.getOwnPropertySymbols(i).filter(function(l){return Object.getOwnPropertyDescriptor(i,l).enumerable}))),o.forEach(function(l){FHn(t,l,i[l])})}return t}function jHn(t,n){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);i.push.apply(i,o)}return i}function uct(t,n){return n=n??{},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):jHn(Object(n)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(n,i))}),t}const fct=t=>{const n=/\/([^/]*)$/.exec(t),i={fileName:void 0,filePath:void 0};return n&&(i.fileName=t.slice(n.index+1),i.filePath=t.slice(0,n.index)),i},UHn=t=>({id:t.id,url:t.url,content:t.content,tag_names:t.tagNames,config:{splitter:t.splitter,handle_type:t.handleType,update_frequency:t.updateFrequency,headers:t.headers,csv_delimiter:t.csvDelimiter},knowledge_name:t.name,file_name:Rne(t.filePath,t.fileName),file_size:t.fileSize,file_type:t.fileType,file_path:Rne(t.filePath,t.fileName),path_type:t.pathType,created_type:t.createdType,status:t.status,knowledge_base_id:t.knowledgebaseId,parent_anchor_path:t.parentAnchorPath,anchor_path:Xst(t.parentAnchorPath,t.fileName),index_config:t.indexConfig,credential_id:t.credentialId,space_id:t.spaceId}),dct=t=>{var n,i,o,l,u;const{fileName:f=t.file_path,filePath:h=""}=fct(t.file_path);return{anchorPath:t.anchor_path,id:t.id,spaceId:t.space_id,url:t.url,content:t.content,tagNames:t.tag_names,handleType:(n=t.config)===null||n===void 0?void 0:n.handle_type,splitter:(i=t.config)===null||i===void 0?void 0:i.splitter,updateFrequency:(o=t.config)===null||o===void 0?void 0:o.update_frequency,headers:(l=t.config)===null||l===void 0?void 0:l.headers,csvDelimiter:(u=t.config)===null||u===void 0?void 0:u.csv_delimiter,fileName:f,filePath:h,fileSize:t.file_size,fileType:t.file_type,pathType:t.path_type,createdType:t.created_type,status:t.status,permission:K2e(t.permission),knowledgebaseId:t.knowledge_base_id,knowledgebaseName:t.knowledge_base_name,parentAnchorPath:t.parent_anchor_path,name:t.knowledge_name,errorMessage:t.error_message,isStructured:t.is_structured,updatedAt:t.updated_at,updatedBy:t.updated_by,indexConfig:t.index_config,credentialId:t.credential_id}},Dne=(t,n)=>{var i,o,l;const{fileName:u=t.file_path,filePath:f=""}=fct(t.file_path),h={id:t.id,spaceId:t.space_id,knowledgebaseCode:"",fileName:u,filePath:f,handleType:(i=t.config)===null||i===void 0?void 0:i.handle_type,updateFrequency:(o=t.config)===null||o===void 0?void 0:o.update_frequency,name:t.knowledge_name,number:t.knowledge_count,folderNumber:t.folder_num,url:t.url,updatedBy:t.updated_by,pathType:t.path_type,fileType:t.file_type,createdType:t.created_type,indexConfig:t.index_config,anchorPath:t.anchor_path,parentAnchorPath:t.parent_anchor_path,permission:n==null?void 0:n.permission,knowledgebaseId:n==null?void 0:n.id};return uct(lct({},h),{children:(l=t.children)===null||l===void 0?void 0:l.map(m=>Dne(m,n))})},zHn=t=>({config:{handle_type:t.handleType},id:t.id,name:t.name,type:t.type,knowledgebase_code:t.knowledgebaseCode,description:t.description,generate_type:t.generateType,knowledge_count:t.number,anchor_path:t.anchorPath,index_config:t.indexConfig,status:t.status}),GHn=t=>({id:t.id,config:{splitter:"",handle_type:t.handleType,update_frequency:t.updateFrequency},created_type:t.createdType,knowledge_name:t.name,file_name:Rne(t.filePath,t.name),file_path:Rne(t.filePath,t.name),path_type:t.pathType,anchor_path:Xst(t.parentAnchorPath,t.name)}),hct=t=>{var n,i;const o={id:t.id,spaceId:t.space_id,filePath:"",handleType:(n=t.config)===null||n===void 0?void 0:n.handle_type,name:t.name,type:t.type,knowledgebaseCode:t.knowledgebase_code,status:t.status,generateType:t.generate_type,number:t.knowledge_count,folderNumber:t.folder_num,updatedBy:t.updated_by,anchorPath:t.anchor_path,description:t.description,indexConfig:t.index_config,permission:K2e(t.permission)};return uct(lct({},o),{children:(i=t.children)===null||i===void 0?void 0:i.map(l=>Dne(l,o))})},pct=t=>({header:t.property.header,query:t.property.query,body:t.property.body,creator:t.created_by,createTime:t.created_at,updateTime:t.updated_at,toolCode:t.tool_code,toolName:t.tool_name,icon:t.icon,description:t.description,method:t.method,url:t.url,generateType:t.generate_type,id:t.tool_id,spaceId:t.space_id,status:t.status,isSensitive:t.is_sensitive,credentialId:t.credential_id,credentialType:t.credential_type,permission:K2e(t.permission)}),$Hn=t=>({created_by:t.creator,created_at:t.createTime,updated_at:t.updateTime,tool_code:t.toolCode,tool_name:t.toolName,icon:t.icon,description:t.description,method:t.method,url:t.url,generate_type:t.generateType,tool_id:t.id,status:t.status,is_sensitive:t.isSensitive,credential_id:t.credentialId,credential_type:t.credentialType,property:{header:t.header,query:t.query,body:t.body}});function HHn(t,n,i){return n in t?Object.defineProperty(t,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[n]=i,t}function VHn(t){for(var n=1;n<arguments.length;n++){var i=arguments[n]!=null?arguments[n]:{},o=Object.keys(i);typeof Object.getOwnPropertySymbols=="function"&&(o=o.concat(Object.getOwnPropertySymbols(i).filter(function(l){return Object.getOwnPropertyDescriptor(i,l).enumerable}))),o.forEach(function(l){HHn(t,l,i[l])})}return t}function YHn(t,n){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);i.push.apply(i,o)}return i}function qHn(t,n){return n=n??{},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):YHn(Object(n)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(n,i))}),t}const Q2e=t=>{const n={[fi.Ai]:Os.Assistant,[fi.User]:Os.User,[fi.System]:Os.System,[fi.Hidden]:Os.Hidden,[fi.Guide]:Os.Guide,[fi.Time]:Os.System,[fi.Role]:Os.System,[fi.Placeholder]:Os.Placeholder,[fi.HiddenAi]:Os.HiddenAssistant,[fi.HiddenGuide]:Os.HiddenGuide,[fi.HiddenRole]:Os.HiddenSystem,[fi.HiddenUser]:Os.HiddenUser,[fi.TemplateAi]:Os.TemplateAssistant,[fi.TemplateGuide]:Os.TemplateGuide,[fi.TemplateRole]:Os.TemplateSystem,[fi.TemplateUser]:Os.TemplateUser,[fi.TemplateHidden]:Os.TemplateHidden,[fi.Pause]:Os.Pause,[fi.TokenExpired]:Os.Pause,[fi.ImageNotSupported]:Os.Pause,[fi.UserImage]:Os.UserImage};return{content:t.content,role:n[t.role]}},WHn=t=>{const n={[Os.Assistant]:fi.Ai,[Os.User]:fi.User,[Os.System]:fi.Role,[Os.Hidden]:fi.Hidden,[Os.Guide]:fi.Guide,[Os.Placeholder]:fi.Placeholder,[Os.HiddenAssistant]:fi.HiddenAi,[Os.HiddenGuide]:fi.HiddenGuide,[Os.HiddenSystem]:fi.HiddenRole,[Os.HiddenUser]:fi.HiddenUser,[Os.TemplateAssistant]:fi.TemplateAi,[Os.TemplateGuide]:fi.TemplateGuide,[Os.TemplateSystem]:fi.TemplateRole,[Os.TemplateUser]:fi.TemplateUser,[Os.TemplateHidden]:fi.TemplateHidden,[Os.Pause]:fi.Pause,[Os.UserImage]:fi.UserImage};return{content:t.content,role:n[t.role]}},Pne=t=>{var n,i,o,l;return{sessionCode:t.session_code,sessionName:t.session_name,model:t.model,updatedAt:t.updated_at,createdAt:t.created_at,roleInfo:t.role_info?{collectionId:t.role_info.collection_id,collectionName:t.role_info.collection_name,content:t.role_info.content,variables:t.role_info.variables}:void 0,sessionProperty:{isAutoClear:t.session_property.is_auto_clear,isAutoCalcPrompt:t.session_property.is_auto_clac_prompt},tools:(n=t.tools)===null||n===void 0?void 0:n.map(pct),anchorPathResources:{knowledges:(i=t.anchor_path_resources)===null||i===void 0?void 0:i.knowledges.map(dct),knowledgebases:(o=t.anchor_path_resources)===null||o===void 0?void 0:o.knowledgebases.map(hct),knowledgeFolders:(l=t.anchor_path_resources)===null||l===void 0?void 0:l.knowledge_folders.map(u=>Dne(u))}}},gct=t=>{var n,i;return{session_code:t.sessionCode,session_name:t.sessionName,model:t.model||void 0,updated_at:t.updatedAt,created_at:t.createdAt,role_info:t.roleInfo?{collection_id:t.roleInfo.collectionId,collection_name:t.roleInfo.collectionName,content:t.roleInfo.content,variables:t.roleInfo.variables}:void 0,session_property:{is_auto_clear:(n=t.sessionProperty)===null||n===void 0?void 0:n.isAutoClear,is_auto_clac_prompt:(i=t.sessionProperty)===null||i===void 0?void 0:i.isAutoCalcPrompt}}},KHn=t=>{var n,i,o,l,u,f,h,m,b,_,E,S,T,x,I,N,O;return{id:t.id,sessionCode:t.session_code,createdAt:t.created_at,createdBy:t.created_by,updatedAt:t.updated_at,updatedBy:t.updated_by,liked:t.liked,role:t.role,content:t.content,spaceId:t.space_id,rate:t.rate,status:t.status,property:{extra:{tools:(o=t.property)===null||o===void 0||(i=o.extra)===null||i===void 0||(n=i.tools)===null||n===void 0?void 0:n.map(pct),anchorPathResources:{knowledges:(h=t.property)===null||h===void 0||(f=h.extra)===null||f===void 0||(u=f.anchor_path_resources)===null||u===void 0||(l=u.knowledges)===null||l===void 0?void 0:l.map(dct),knowledgebases:(E=t.property)===null||E===void 0||(_=E.extra)===null||_===void 0||(b=_.anchor_path_resources)===null||b===void 0||(m=b.knowledgebases)===null||m===void 0?void 0:m.map(hct),knowledgeFolders:(I=t.property)===null||I===void 0||(x=I.extra)===null||x===void 0||(T=x.anchor_path_resources)===null||T===void 0||(S=T.knowledge_folders)===null||S===void 0?void 0:S.map(L=>Dne(L))},cite:(O=t.property)===null||O===void 0||(N=O.extra)===null||N===void 0?void 0:N.cite}}}},mct=t=>{var n,i,o,l,u,f,h,m,b,_,E,S,T,x,I,N;return{id:t.id,session_code:t.sessionCode,created_at:t.createdAt,created_by:t.createdBy,updated_at:t.updatedAt,updated_by:t.updatedBy,liked:t.liked,role:t.role,content:t.content,space_id:t.spaceId,rate:t.rate,status:t.status,property:{extra:qHn(VHn({},t==null||(n=t.property)===null||n===void 0?void 0:n.extra),{tools:(l=t.property)===null||l===void 0||(o=l.extra)===null||o===void 0||(i=o.tools)===null||i===void 0?void 0:i.map($Hn),anchor_path_resources:{knowledges:(m=t.property)===null||m===void 0||(h=m.extra)===null||h===void 0||(f=h.anchorPathResources)===null||f===void 0||(u=f.knowledges)===null||u===void 0?void 0:u.map(UHn),knowledgebases:(S=t.property)===null||S===void 0||(E=S.extra)===null||E===void 0||(_=E.anchorPathResources)===null||_===void 0||(b=_.knowledgebases)===null||b===void 0?void 0:b.map(zHn),knowledge_folders:(N=t.property)===null||N===void 0||(I=N.extra)===null||I===void 0||(x=I.anchorPathResources)===null||x===void 0||(T=x.knowledgeFolders)===null||T===void 0?void 0:T.map(GHn)}})}}},bct=({apiPrefix:t,headers:n,beforeRequest:i,afterRequest:o})=>({getAgentInfo:()=>Q1.get(`${t}/agent/info/`,void 0,{headers:n,beforeRequest:i,afterRequest:o}).then(P=>BHn(P)),clearSession:P=>Q1.post(`${t}/chat_completion/${P}/clear/`,void 0,{headers:n,beforeRequest:i,afterRequest:o}),getSessions:()=>Q1.get(`${t}/session/`,void 0,{headers:n,beforeRequest:i,afterRequest:o}).then(P=>P.map(Pne)),plusSession:P=>Q1.post(`${t}/session/`,gct(P),{headers:n,beforeRequest:i,afterRequest:o}).then(B=>Pne(B)),modifySession:P=>Q1.put(`${t}/session/${P.sessionCode}/`,gct(P),{headers:n,beforeRequest:i,afterRequest:o}).then(B=>Pne(B)),deleteSession:P=>Q1.delete(`${t}/session/${P}/`,void 0,{headers:n,beforeRequest:i,afterRequest:o}),batchDeleteSessions:P=>Q1.post(`${t}/session/batch_delete/`,{session_codes:P},{headers:n,beforeRequest:i,afterRequest:o}),getSession:P=>Q1.get(`${t}/session/${P}/`,void 0,{headers:n,beforeRequest:i,afterRequest:o}).then(B=>Pne(B)),getSessionContents:P=>Q1.get(`${t}/session_content/content/`,{session_code:P},{headers:n,beforeRequest:i,afterRequest:o}).then(B=>B.map(KHn)),plusSessionContent:P=>Q1.post(`${t}/session_content/`,mct(P),{headers:n,beforeRequest:i,afterRequest:o}),modifySessionContent:P=>Q1.put(`${t}/session_content/${P.id}/`,mct(P),{headers:n,beforeRequest:i,afterRequest:o}),deleteSessionContent:P=>Q1.delete(`${t}/session_content/${P}/`,void 0,{headers:n,beforeRequest:i,afterRequest:o}),batchDeleteSessionContents:P=>Q1.post(`${t}/session_content/batch_delete/`,{ids:P},{headers:n,beforeRequest:i,afterRequest:o}),renameSession:P=>Q1.post(`${t}/session/${P}/ai_rename/`,void 0,{headers:n,beforeRequest:i,afterRequest:o}).then(B=>({sessionCode:B.session_code,sessionName:B.session_name})),getChatGroup:P=>Q1.post(`${t}/chat_group/`,P,{headers:n,beforeRequest:i,afterRequest:o})}),QHn=(t,n,i,o)=>{let l=t==="内容正在生成中..."||i?"":t;if(!l.includes('<section class="think-head click-close">'))l+=`<section class="think-head click-close">
|
|
462
462
|
<i class="ai-ui-sdk-icon ai-ui-sdk-sikao"></i>思考中...<i class="ai-ui-sdk-icon ai-ui-sdk-angle-up"></i>
|
|
463
463
|
</section>
|
|
464
464
|
<section class="think-body">
|
|
@@ -537,7 +537,7 @@ Use Shift + Enter to enter a new line`,"你好,我是小鲸":"Hello, I am BK G
|
|
|
537
537
|
只给我输出结果,其他内容一概不要。请勿用引号将回复包起来
|
|
538
538
|
'''
|
|
539
539
|
{{ SELECTED_TEXT }}
|
|
540
|
-
'''`,explanationShortcut:'您是一位专业的解释者。请详细解释"{{ SELECTED_TEXT }}"。您的解释应包括 1) 基本含义和概念解释;2) 实际应用或使用案例;3) 如果是技术术语,请提供相关技术背景;4) 适当时提供具体示例,以帮助理解。使用清晰易懂的语言,确保非专业人员也能理解。如果该词/短语有多种含义,请列出主要定义。在确保信息完整性和准确性的同时,请保持答复简洁明了。',新会话:"新会话",重命名:"重命名",自动生成命名:"自动生成命名",分享会话:"分享会话"},Za=t=>aJn!=="en"?sJn[t]||t:oJn[t]||t;function cJn(){const t=rr([]),n=rr(null),i=rr(!1),o=rr({});let l={};const u=rr({}),f=rr(!1),h=rr(new Set),m=rr(null);let b=null;const _=X=>{b=X},E=X=>{f.value=!0,m.value=X,h.value=new Set},S=()=>{f.value=!1,m.value=null,h.value=new Set},T=X=>{const ie=new Set(h.value);ie.has(X)?ie.delete(X):ie.add(X),h.value=ie},x=(X,ie)=>{if(ie){const re=new Set(h.value);X.forEach(se=>re.add(se)),h.value=re}else{const re=new Set(h.value);X.forEach(se=>re.delete(se)),h.value=re}},I=X=>X.length===0?!1:X.every(ie=>h.value.has(ie)),N=X=>{if(X.length===0)return!1;const ie=X.filter(re=>h.value.has(re)).length;return ie>0&&ie<X.length},O=()=>Array.from(h.value),L=X=>h.value.has(X),P=(X,ie)=>{var Se,Te,Oe,Re,_e,we;if(!b){console.error(`SDK API ${X} error:`,ie);return}const re=ie,se=((Se=re==null?void 0:re.error)==null?void 0:Se.message)||(re==null?void 0:re.message)||((Te=re==null?void 0:re.response)==null?void 0:Te.message)||"系统错误",be=((Oe=re==null?void 0:re.error)==null?void 0:Oe.code)||(re==null?void 0:re.code)||((Re=re==null?void 0:re.response)==null?void 0:Re.code)||-1,ae=((_e=re==null?void 0:re.error)==null?void 0:_e.data)||(re==null?void 0:re.data)||((we=re==null?void 0:re.response)==null?void 0:we.data)||ie;b({apiName:X,code:be,message:se,data:ae})},B=rr({agentName:"",conversationSettings:{openingRemark:"",predefinedQuestions:[]},promptSetting:{content:[]}}),G=X=>{if(!l[X])throw new Error(`${X} not registered`);return l[X]},z=async X=>{try{await G("setCurrentSessionChain")(X),J(X)}catch(ie){throw console.error("Failed to switch session:",ie),P("setCurrentSessionChain",ie),ie}},H=X=>{if(t.value=X.map(ie=>({...ie,isEdit:!1})),n.value){const ie=X.find(re=>{var se;return re.sessionCode===((se=n.value)==null?void 0:se.sessionCode)});ie&&(n.value={...n.value,...ie,isEdit:n.value.isEdit})}},V=X=>{const ie={...X,isEdit:!1};return t.value.unshift(ie),ie},$=async X=>{const ie=X||rJn(),re=Za("新会话"),se={sessionCode:ie,sessionName:re,createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()},be=V(se),ae=G("plusSessionApi");try{await ae(be)}catch(Ne){throw P("plusSessionApi",Ne),Ne}return await z(be),be},q=X=>{const ie=t.value.find(re=>re.sessionCode===X);ie&&(u.value[X]={...ie},W(X,{isEdit:!0},{syncBackend:!1}))},F=async(X,ie)=>{const re=u.value[X];if(!re)return null;const se=Object.entries(ie).some(([ae,Ne])=>ae==="isEdit"?!1:re[ae]!==Ne),be=await W(X,{...ie,isEdit:!1},{syncBackend:se});return delete u.value[X],be},W=async(X,ie,re={})=>{const{syncBackend:se=!0,forceSync:be=!1}=re,ae=t.value.findIndex(Te=>Te.sessionCode===X);if(ae===-1)return null;const Ne=t.value[ae],Se={...Ne,...ie};if(t.value[ae]=Se,t.value=[...t.value],o.value[X]||(o.value[X]=0),o.value[X]++,n.value&&n.value.sessionCode===X&&(n.value={...n.value,...ie}),se&&!ie.isEdit||be)try{const Te=G("modifySessionApi"),Oe={...Se,isEdit:!1};await Te(Oe)}catch(Te){console.error("Failed to sync session to backend:",Te),P("modifySessionApi",Te),t.value[ae]=Ne,t.value=[...t.value],n.value&&n.value.sessionCode===X&&(n.value=Ne)}return Se},U=async X=>{var be;const ie=G("deleteSessionApi");try{await ie(X)}catch(ae){throw P("deleteSessionApi",ae),ae}const re=t.value.findIndex(ae=>ae.sessionCode===X);if(re===-1)return null;const se=((be=n.value)==null?void 0:be.sessionCode)===X;if(t.value.splice(re,1),se){if(t.value.length>0){const ae=new Date().toDateString(),Ne=t.value.filter(Te=>new Date(Te.createdAt||"").toDateString()===ae),Se=Ne.length>0?Ne[0]:t.value[0];return await z(Se),Se}return await Q(!1),null}return null},J=X=>{const ie=t.value.find(re=>re.sessionCode===X.sessionCode);if(ie)n.value=ie;else{const re=V(X);n.value=re}},Z=X=>{l=X},Q=async(X=!0,ie=!1)=>{var ae,Ne,Se,Te;let re=t.value;if(X){const Oe=G("getSessionsApi");try{re=await Oe(),H(re)}catch(Re){throw P("getSessionsApi",Re),Re}}let se=null,be=[];if(re.length>0){const Oe=re.sort((we,me)=>new Date(me.createdAt||"").getTime()-new Date(we.createdAt||"").getTime())[0],Re=G("getSessionContentsApi");try{be=await Re(Oe.sessionCode)}catch(we){throw P("getSessionContentsApi",we),we}(!be.filter(we=>!UD.includes(we.role)).some(we=>we.content&&we.content.trim()!=="")||ie)&&(se={...Oe,isEdit:!1})}if(se?(G("setSessionContents")(be),z(se)):(se=await $(),be=[]),!B.value||X){const Oe=G("getAgentInfoApi");try{const Re=await Oe();Object.assign(B.value,Re)}catch(Re){throw P("getAgentInfoApi",Re),Re}}if((Se=(Ne=(ae=B.value)==null?void 0:ae.promptSetting)==null?void 0:Ne.content)!=null&&Se.length&&be.length===0){const Oe=G("handleCompleteRole");try{await Oe(se.sessionCode,B.value.promptSetting.content)}catch(Re){throw P("handleCompleteRole",Re),Re}}return{conversationSettings:(Te=B.value)==null?void 0:Te.conversationSettings}};return{sessionList:t,currentSession:n,setSessionList:H,addSession:V,addNewSession:$,initSession:Q,updateSession:W,startEditSession:q,finishEditSession:F,deleteSession:U,setCurrentSession:J,registerSdkMethods:Z,registerErrorCallback:_,switchSessionWithContents:z,sessionContentLoading:i,agentInfo:B,getSessionList:async()=>{const X=G("getSessionsApi");let ie;try{ie=await X(),H(ie)}catch(re){throw P("getSessionsApi",re),re}if(n.value){const re=ie.find(se=>{var be;return se.sessionCode===((be=n.value)==null?void 0:be.sessionCode)});re&&(n.value={...n.value,...re,isEdit:n.value.isEdit})}return ie.forEach(re=>{o.value[re.sessionCode]||(o.value[re.sessionCode]=0),o.value[re.sessionCode]++}),t.value},sessionUpdateCounter:o,isSelectMode:f,selectedMessages:h,selectModeType:m,enterSelectMode:E,exitSelectMode:S,toggleMessageSelection:T,toggleSelectAll:x,isSelectAll:I,isIndeterminate:N,getSelectedMessages:O,isMessageSelected:L,handleSdkError:P}}const Wft=Symbol("session-store");function lJn(){const t=cJn();return h6(Wft,t),t}function uJn(){const t=Ow(Wft);if(!t)throw new Error("Session store not provided");return t}function zD(t={}){const n="ai-blueking-tooltip",i=rr([]),o=(b,_,E={})=>{try{const S=typeof b=="string"?document.querySelector(b):b;if(!S)return console.warn(`Tooltip target not found: ${b}`),null;const T={content:_,placement:"top",arrow:!0,delay:[300,0],theme:n,...t,...E},x=iO(S,T);return i.value.push(x),x}catch(S){return console.error("Failed to create tooltip:",S),null}},l=(b,_,E={})=>{const S=document.querySelectorAll(b),T=[];return S.forEach(x=>{const I=o(x,_,E);I&&T.push(I)}),T},u=b=>{const _=[];return b.forEach(({element:E,content:S,options:T})=>{const x=o(E,S,T);x&&_.push(x)}),_},f=()=>{i.value.forEach(b=>{b.destroy()}),i.value=[]},h=(b,_)=>{b.setContent(_)},m=b=>{b.destroy()};return qf(()=>{f()}),{instances:i,createTooltip:o,createTooltipsForSelector:l,createMultipleTooltips:u,destroyAll:f,updateContent:h,destroyInstance:m}}const fJn={class:"bkai-history-panel"},dJn={class:"history-panel-header"},hJn={class:"history-panel-header-title"},pJn={class:"input-icon"},gJn={class:"history-panel-content"},mJn={class:"history-panel-content-item-title"},bJn={class:"history-panel-content-item-list"},vJn=["onClick"],yJn={class:"history-panel-content-item-list-item-action"},_Jn=["onClick"],wJn=Ns({__name:"history-panel",props:{sessionStore:{}},emits:["close"],setup(t,{emit:n}){const i=t,o=n,l=kst,u=rr(""),f=i.sessionStore,h=rr({}),m=xa(()=>{const I={today:{key:"today",alias:Za("今天"),sessionList:[]},yesterday:{key:"yesterday",alias:Za("昨天"),sessionList:[]},before:{key:"before",alias:Za("之前"),sessionList:[]}},N=f.sessionList.value.filter(O=>O.sessionName.toLowerCase().includes(u.value.toLowerCase()));for(const O of N){const L=new Date(O.createdAt||""),P=new Date,B=new Date;B.setDate(B.getDate()-1),L.toDateString()===P.toDateString()?I.today.sessionList.push(O):L.toDateString()===B.toDateString()?I.yesterday.sessionList.push(O):I.before.sessionList.push(O)}return Object.values(I).filter(O=>O.sessionList.length>0)}),b=I=>{var N;return((N=f.currentSession.value)==null?void 0:N.sessionCode)===I.sessionCode},_=I=>{b(I)||(f.switchSessionWithContents(I),o("close"))},E=I=>{f.deleteSession(I)},S=I=>{f.finishEditSession(I.sessionCode,{sessionName:I.sessionName})},T=I=>{f.startEditSession(I.sessionCode),tu(()=>{const N=h.value[I.sessionCode];N&&N.focus()})},x=(I,N)=>{N.target.blur()};return(I,N)=>(Jr(),ia("div",fJn,[ei("div",dJn,[ei("h1",hJn,Kc(Rn(Za)("历史会话")),1),yi(Rn(vD),{modelValue:u.value,"onUpdate:modelValue":N[0]||(N[0]=O=>u.value=O),behavior:"simplicity",placeholder:Rn(Za)("搜索会话名称"),style:{height:"22px"}},{suffix:nu(()=>[ei("span",pJn,[yi(Rn(B_e))])]),_:1},8,["modelValue","placeholder"])]),ei("div",gJn,[m.value.length>0?(Jr(!0),ia(Qc,{key:0},Nw(m.value,O=>(Jr(),ia("div",{key:O.key,class:"history-panel-content-item"},[ei("div",mJn,[ei("span",null,Kc(O.alias),1)]),ei("div",bJn,[(Jr(!0),ia(Qc,null,Nw(O.sessionList,L=>(Jr(),ia("div",{key:`${L.sessionCode}-${Rn(f).sessionUpdateCounter.value[L.sessionCode]||0}`,class:Wc(["history-panel-content-item-list-item",{active:b(L)}]),onClick:P=>_(L)},[L.isEdit?(Jr(),Gu(Rn(vD),{key:1,ref_for:!0,ref:P=>{L.isEdit&&(h.value[L.sessionCode]=P)},modelValue:L.sessionName,"onUpdate:modelValue":P=>L.sessionName=P,style:{width:"100%",height:"28px"},onBlur:P=>S(L),onEnter:x,onClick:N[2]||(N[2]=PN(()=>{},["stop"]))},null,8,["modelValue","onUpdate:modelValue","onBlur"])):(Jr(),ia(Qc,{key:0},[yi(Rn(n7n),{style:{width:"calc(100% - 42px)"}},{default:nu(()=>[W1(Kc(L.sessionName),1)]),_:2},1024),ei("span",yJn,[fb(ei("i",{class:"bkai-icon bkai-bianji",onClick:PN(P=>T(L),["stop"])},null,8,_Jn),[[Rn(l),{content:Rn(Za)("编辑"),boundary:"parent"}]]),yi(Rn(U$n),{title:Rn(Za)("确认删除会话 ?"),content:"删除操作无法撤回,请谨慎操作!","confirm-config":{theme:"danger"},trigger:"click",boundary:"parent",onConfirm:P=>E(L.sessionCode)},{default:nu(()=>[fb(ei("i",{class:"bkai-icon bkai-shanchu",onClick:N[1]||(N[1]=PN(()=>{},["stop"]))},null,512),[[Rn(l),{content:Rn(Za)("删除"),boundary:"parent"}]])]),_:2},1032,["title","onConfirm"])])],64))],10,vJn))),128))])]))),128)):(Jr(),Gu(Rn(Fzn),{key:1,style:{"margin-top":"100px"},description:u.value?Rn(Za)("搜索为空"):Rn(Za)("暂无对话"),scene:"part",type:u.value?"search-empty":"empty"},null,8,["description","type"]))])]))}}),pp=(t,n)=>{const i=t.__vccOpts||t;for(const[o,l]of n)i[o]=l;return i},EJn=pp(wJn,[["__scopeId","data-v-538e5107"]]),SJn={class:"left-section"},TJn={class:"logo"},CJn=["src"],xJn={key:0,class:"rename-tooltip"},kJn={class:"rename-content"},AJn={class:"right-section"},IJn=pp(Ns({__name:"ai-header",props:{title:{default:""},isCompressionHeight:{type:Boolean,default:!1},draggable:{type:Boolean,default:!0},showHistoryIcon:{type:Boolean,default:!0},showNewChatIcon:{type:Boolean,default:!0},enableChatSession:{type:Boolean,default:!0},chatGroup:{default:()=>({enabled:!1,staff:[]})}},emits:["close","toggle-compression","new-chat","auto-generate-name","help-click"],setup(t,{emit:n}){const i=t,o=n,l=kst,u=uJn(),f=rr(null),h=rr(null),m=rr(!1),b=rr(""),_=rr(null),{handleTriggerClick:E}=tJn({triggerRef:f,panelComponent:EJn,panelProps:{sessionStore:u},tippyOptions:{placement:"bottom-end",offset:[0,8],appendTo:()=>document.querySelector(".ai-blueking-container-wrapper")||document.body}}),S=xa(()=>{var X,ie,re;return i.enableChatSession?i.title||`${((ie=u.agentInfo.value)==null?void 0:ie.agentName)||""}-${((re=u.currentSession.value)==null?void 0:re.sessionName)||""}`:(X=u.agentInfo.value)==null?void 0:X.agentName}),T=xa(()=>i.isCompressionHeight?"bkai-morenchicun":"bkai-yasuo"),x=xa(()=>i.isCompressionHeight?Za("恢复默认尺寸"):Za("缩小高度")),I=rr(null),N=rr(null),O=rr(null),L=xa(()=>`
|
|
540
|
+
'''`,explanationShortcut:'您是一位专业的解释者。请详细解释"{{ SELECTED_TEXT }}"。您的解释应包括 1) 基本含义和概念解释;2) 实际应用或使用案例;3) 如果是技术术语,请提供相关技术背景;4) 适当时提供具体示例,以帮助理解。使用清晰易懂的语言,确保非专业人员也能理解。如果该词/短语有多种含义,请列出主要定义。在确保信息完整性和准确性的同时,请保持答复简洁明了。',新会话:"新会话",重命名:"重命名",自动生成命名:"自动生成命名",分享会话:"分享会话"},Za=t=>aJn!=="en"?sJn[t]||t:oJn[t]||t;function cJn(){const t=rr([]),n=rr(null),i=rr(!1),o=rr({});let l={};const u=rr({}),f=rr(!1),h=rr(new Set),m=rr(null);let b=null;const _=X=>{b=X},E=X=>{f.value=!0,m.value=X,h.value=new Set},S=()=>{f.value=!1,m.value=null,h.value=new Set},T=X=>{const ie=new Set(h.value);ie.has(X)?ie.delete(X):ie.add(X),h.value=ie},x=(X,ie)=>{if(ie){const re=new Set(h.value);X.forEach(se=>re.add(se)),h.value=re}else{const re=new Set(h.value);X.forEach(se=>re.delete(se)),h.value=re}},I=X=>X.length===0?!1:X.every(ie=>h.value.has(ie)),N=X=>{if(X.length===0)return!1;const ie=X.filter(re=>h.value.has(re)).length;return ie>0&&ie<X.length},O=()=>Array.from(h.value),L=X=>h.value.has(X),P=(X,ie)=>{var Se,Te,Oe,Re,_e,we;if(!b){console.error(`SDK API ${X} error:`,ie);return}const re=ie,se=((Se=re==null?void 0:re.error)==null?void 0:Se.message)||(re==null?void 0:re.message)||((Te=re==null?void 0:re.response)==null?void 0:Te.message)||"系统错误",be=((Oe=re==null?void 0:re.error)==null?void 0:Oe.code)||(re==null?void 0:re.code)||((Re=re==null?void 0:re.response)==null?void 0:Re.code)||-1,ae=((_e=re==null?void 0:re.error)==null?void 0:_e.data)||(re==null?void 0:re.data)||((we=re==null?void 0:re.response)==null?void 0:we.data)||ie;b({apiName:X,code:be,message:se,data:ae})},B=rr({agentName:"",conversationSettings:{openingRemark:"",predefinedQuestions:[]},promptSetting:{content:[]}}),G=X=>{if(!l[X])throw new Error(`${X} not registered`);return l[X]},z=async X=>{try{await G("setCurrentSessionChain")(X),J(X)}catch(ie){throw console.error("Failed to switch session:",ie),P("setCurrentSessionChain",ie),ie}},H=X=>{if(t.value=X.map(ie=>({...ie,isEdit:!1})),n.value){const ie=X.find(re=>{var se;return re.sessionCode===((se=n.value)==null?void 0:se.sessionCode)});ie&&(n.value={...n.value,...ie,isEdit:n.value.isEdit})}},V=X=>{const ie={...X,isEdit:!1};return t.value.unshift(ie),ie},$=async X=>{const ie=X||rJn(),re=Za("新会话"),se={sessionCode:ie,sessionName:re,createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()},be=V(se),ae=G("plusSessionApi");try{await ae(be)}catch(Ne){throw P("plusSessionApi",Ne),Ne}return await z(be),be},q=X=>{const ie=t.value.find(re=>re.sessionCode===X);ie&&(u.value[X]={...ie},W(X,{isEdit:!0},{syncBackend:!1}))},F=async(X,ie)=>{const re=u.value[X];if(!re)return null;const se=Object.entries(ie).some(([ae,Ne])=>ae==="isEdit"?!1:re[ae]!==Ne),be=await W(X,{...ie,isEdit:!1},{syncBackend:se});return delete u.value[X],be},W=async(X,ie,re={})=>{const{syncBackend:se=!0,forceSync:be=!1}=re,ae=t.value.findIndex(Te=>Te.sessionCode===X);if(ae===-1)return null;const Ne=t.value[ae],Se={...Ne,...ie};if(t.value[ae]=Se,t.value=[...t.value],o.value[X]||(o.value[X]=0),o.value[X]++,n.value&&n.value.sessionCode===X&&(n.value={...n.value,...ie}),se&&!ie.isEdit||be)try{const Te=G("modifySessionApi"),Oe={...Se,isEdit:!1};await Te(Oe)}catch(Te){console.error("Failed to sync session to backend:",Te),P("modifySessionApi",Te),t.value[ae]=Ne,t.value=[...t.value],n.value&&n.value.sessionCode===X&&(n.value=Ne)}return Se},U=async X=>{var be;const ie=G("deleteSessionApi");try{await ie(X)}catch(ae){throw P("deleteSessionApi",ae),ae}const re=t.value.findIndex(ae=>ae.sessionCode===X);if(re===-1)return null;const se=((be=n.value)==null?void 0:be.sessionCode)===X;if(t.value.splice(re,1),se){if(t.value.length>0){const ae=new Date().toDateString(),Ne=t.value.filter(Te=>new Date(Te.createdAt||"").toDateString()===ae),Se=Ne.length>0?Ne[0]:t.value[0];return await z(Se),Se}return await Q(!1),null}return null},J=X=>{const ie=t.value.find(re=>re.sessionCode===X.sessionCode);if(ie)n.value=ie;else{const re=V(X);n.value=re}},Z=X=>{l=X},Q=async(X=!0,ie=!1)=>{var ae,Ne,Se,Te;let re=t.value;if(X){const Oe=G("getSessionsApi");try{re=await Oe(),H(re)}catch(Re){throw P("getSessionsApi",Re),Re}}let se=null,be=[];if(re.length>0){const Oe=re.sort((we,me)=>new Date(me.createdAt||"").getTime()-new Date(we.createdAt||"").getTime())[0],Re=G("getSessionContentsApi");try{be=await Re(Oe.sessionCode)}catch(we){throw P("getSessionContentsApi",we),we}(!be.filter(we=>!UD.includes(we.role)).some(we=>we.content&&we.content.trim()!=="")||ie)&&(se={...Oe,isEdit:!1})}if(se?(G("setSessionContents")(be),z(se)):(se=await $(),be=[]),!B.value||X){const Oe=G("getAgentInfoApi");try{const Re=await Oe();if(Object.assign(B.value,Re),Re.saasUrl&&Re.saasUrl.trim()!=="")try{await fetch(Re.saasUrl,{credentials:"include"})}catch(_e){console.error("Failed to fetch saasUrl:",_e)}}catch(Re){throw P("getAgentInfoApi",Re),Re}}if((Se=(Ne=(ae=B.value)==null?void 0:ae.promptSetting)==null?void 0:Ne.content)!=null&&Se.length&&be.length===0){const Oe=G("handleCompleteRole");try{await Oe(se.sessionCode,B.value.promptSetting.content)}catch(Re){throw P("handleCompleteRole",Re),Re}}return{conversationSettings:(Te=B.value)==null?void 0:Te.conversationSettings}};return{sessionList:t,currentSession:n,setSessionList:H,addSession:V,addNewSession:$,initSession:Q,updateSession:W,startEditSession:q,finishEditSession:F,deleteSession:U,setCurrentSession:J,registerSdkMethods:Z,registerErrorCallback:_,switchSessionWithContents:z,sessionContentLoading:i,agentInfo:B,getSessionList:async()=>{const X=G("getSessionsApi");let ie;try{ie=await X(),H(ie)}catch(re){throw P("getSessionsApi",re),re}if(n.value){const re=ie.find(se=>{var be;return se.sessionCode===((be=n.value)==null?void 0:be.sessionCode)});re&&(n.value={...n.value,...re,isEdit:n.value.isEdit})}return ie.forEach(re=>{o.value[re.sessionCode]||(o.value[re.sessionCode]=0),o.value[re.sessionCode]++}),t.value},sessionUpdateCounter:o,isSelectMode:f,selectedMessages:h,selectModeType:m,enterSelectMode:E,exitSelectMode:S,toggleMessageSelection:T,toggleSelectAll:x,isSelectAll:I,isIndeterminate:N,getSelectedMessages:O,isMessageSelected:L,handleSdkError:P}}const Wft=Symbol("session-store");function lJn(){const t=cJn();return h6(Wft,t),t}function uJn(){const t=Ow(Wft);if(!t)throw new Error("Session store not provided");return t}function zD(t={}){const n="ai-blueking-tooltip",i=rr([]),o=(b,_,E={})=>{try{const S=typeof b=="string"?document.querySelector(b):b;if(!S)return console.warn(`Tooltip target not found: ${b}`),null;const T={content:_,placement:"top",arrow:!0,delay:[300,0],theme:n,...t,...E},x=iO(S,T);return i.value.push(x),x}catch(S){return console.error("Failed to create tooltip:",S),null}},l=(b,_,E={})=>{const S=document.querySelectorAll(b),T=[];return S.forEach(x=>{const I=o(x,_,E);I&&T.push(I)}),T},u=b=>{const _=[];return b.forEach(({element:E,content:S,options:T})=>{const x=o(E,S,T);x&&_.push(x)}),_},f=()=>{i.value.forEach(b=>{b.destroy()}),i.value=[]},h=(b,_)=>{b.setContent(_)},m=b=>{b.destroy()};return qf(()=>{f()}),{instances:i,createTooltip:o,createTooltipsForSelector:l,createMultipleTooltips:u,destroyAll:f,updateContent:h,destroyInstance:m}}const fJn={class:"bkai-history-panel"},dJn={class:"history-panel-header"},hJn={class:"history-panel-header-title"},pJn={class:"input-icon"},gJn={class:"history-panel-content"},mJn={class:"history-panel-content-item-title"},bJn={class:"history-panel-content-item-list"},vJn=["onClick"],yJn={class:"history-panel-content-item-list-item-action"},_Jn=["onClick"],wJn=Ns({__name:"history-panel",props:{sessionStore:{}},emits:["close"],setup(t,{emit:n}){const i=t,o=n,l=kst,u=rr(""),f=i.sessionStore,h=rr({}),m=xa(()=>{const I={today:{key:"today",alias:Za("今天"),sessionList:[]},yesterday:{key:"yesterday",alias:Za("昨天"),sessionList:[]},before:{key:"before",alias:Za("之前"),sessionList:[]}},N=f.sessionList.value.filter(O=>O.sessionName.toLowerCase().includes(u.value.toLowerCase()));for(const O of N){const L=new Date(O.createdAt||""),P=new Date,B=new Date;B.setDate(B.getDate()-1),L.toDateString()===P.toDateString()?I.today.sessionList.push(O):L.toDateString()===B.toDateString()?I.yesterday.sessionList.push(O):I.before.sessionList.push(O)}return Object.values(I).filter(O=>O.sessionList.length>0)}),b=I=>{var N;return((N=f.currentSession.value)==null?void 0:N.sessionCode)===I.sessionCode},_=I=>{b(I)||(f.switchSessionWithContents(I),o("close"))},E=I=>{f.deleteSession(I)},S=I=>{f.finishEditSession(I.sessionCode,{sessionName:I.sessionName})},T=I=>{f.startEditSession(I.sessionCode),tu(()=>{const N=h.value[I.sessionCode];N&&N.focus()})},x=(I,N)=>{N.target.blur()};return(I,N)=>(Jr(),ia("div",fJn,[ei("div",dJn,[ei("h1",hJn,Kc(Rn(Za)("历史会话")),1),yi(Rn(vD),{modelValue:u.value,"onUpdate:modelValue":N[0]||(N[0]=O=>u.value=O),behavior:"simplicity",placeholder:Rn(Za)("搜索会话名称"),style:{height:"22px"}},{suffix:nu(()=>[ei("span",pJn,[yi(Rn(B_e))])]),_:1},8,["modelValue","placeholder"])]),ei("div",gJn,[m.value.length>0?(Jr(!0),ia(Qc,{key:0},Nw(m.value,O=>(Jr(),ia("div",{key:O.key,class:"history-panel-content-item"},[ei("div",mJn,[ei("span",null,Kc(O.alias),1)]),ei("div",bJn,[(Jr(!0),ia(Qc,null,Nw(O.sessionList,L=>(Jr(),ia("div",{key:`${L.sessionCode}-${Rn(f).sessionUpdateCounter.value[L.sessionCode]||0}`,class:Wc(["history-panel-content-item-list-item",{active:b(L)}]),onClick:P=>_(L)},[L.isEdit?(Jr(),Gu(Rn(vD),{key:1,ref_for:!0,ref:P=>{L.isEdit&&(h.value[L.sessionCode]=P)},modelValue:L.sessionName,"onUpdate:modelValue":P=>L.sessionName=P,style:{width:"100%",height:"28px"},onBlur:P=>S(L),onEnter:x,onClick:N[2]||(N[2]=PN(()=>{},["stop"]))},null,8,["modelValue","onUpdate:modelValue","onBlur"])):(Jr(),ia(Qc,{key:0},[yi(Rn(n7n),{style:{width:"calc(100% - 42px)"}},{default:nu(()=>[W1(Kc(L.sessionName),1)]),_:2},1024),ei("span",yJn,[fb(ei("i",{class:"bkai-icon bkai-bianji",onClick:PN(P=>T(L),["stop"])},null,8,_Jn),[[Rn(l),{content:Rn(Za)("编辑"),boundary:"parent"}]]),yi(Rn(U$n),{title:Rn(Za)("确认删除会话 ?"),content:"删除操作无法撤回,请谨慎操作!","confirm-config":{theme:"danger"},trigger:"click",boundary:"parent",onConfirm:P=>E(L.sessionCode)},{default:nu(()=>[fb(ei("i",{class:"bkai-icon bkai-shanchu",onClick:N[1]||(N[1]=PN(()=>{},["stop"]))},null,512),[[Rn(l),{content:Rn(Za)("删除"),boundary:"parent"}]])]),_:2},1032,["title","onConfirm"])])],64))],10,vJn))),128))])]))),128)):(Jr(),Gu(Rn(Fzn),{key:1,style:{"margin-top":"100px"},description:u.value?Rn(Za)("搜索为空"):Rn(Za)("暂无对话"),scene:"part",type:u.value?"search-empty":"empty"},null,8,["description","type"]))])]))}}),pp=(t,n)=>{const i=t.__vccOpts||t;for(const[o,l]of n)i[o]=l;return i},EJn=pp(wJn,[["__scopeId","data-v-538e5107"]]),SJn={class:"left-section"},TJn={class:"logo"},CJn=["src"],xJn={key:0,class:"rename-tooltip"},kJn={class:"rename-content"},AJn={class:"right-section"},IJn=pp(Ns({__name:"ai-header",props:{title:{default:""},isCompressionHeight:{type:Boolean,default:!1},draggable:{type:Boolean,default:!0},showHistoryIcon:{type:Boolean,default:!0},showNewChatIcon:{type:Boolean,default:!0},enableChatSession:{type:Boolean,default:!0},chatGroup:{default:()=>({enabled:!1,staff:[]})}},emits:["close","toggle-compression","new-chat","auto-generate-name","help-click"],setup(t,{emit:n}){const i=t,o=n,l=kst,u=uJn(),f=rr(null),h=rr(null),m=rr(!1),b=rr(""),_=rr(null),{handleTriggerClick:E}=tJn({triggerRef:f,panelComponent:EJn,panelProps:{sessionStore:u},tippyOptions:{placement:"bottom-end",offset:[0,8],appendTo:()=>document.querySelector(".ai-blueking-container-wrapper")||document.body}}),S=xa(()=>{var X,ie,re;return i.enableChatSession?i.title||`${((ie=u.agentInfo.value)==null?void 0:ie.agentName)||""}-${((re=u.currentSession.value)==null?void 0:re.sessionName)||""}`:(X=u.agentInfo.value)==null?void 0:X.agentName}),T=xa(()=>i.isCompressionHeight?"bkai-morenchicun":"bkai-yasuo"),x=xa(()=>i.isCompressionHeight?Za("恢复默认尺寸"):Za("缩小高度")),I=rr(null),N=rr(null),O=rr(null),L=xa(()=>`
|
|
541
541
|
<div class="tippy-dropdown-menu">
|
|
542
542
|
<div class="tippy-menu-item" data-action="rename">
|
|
543
543
|
<i class="bkai-icon bkai-bianji"></i>
|