@next-bricks/ai-portal 0.30.0 → 0.31.0
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/bricks.json +27 -13
- package/dist/chunks/1027.b9dfafcf.js +3 -0
- package/dist/chunks/1027.b9dfafcf.js.map +1 -0
- package/dist/chunks/2675.bf62058e.js +2 -0
- package/dist/chunks/2675.bf62058e.js.map +1 -0
- package/dist/chunks/{4820.b66649ca.js → 4820.4960fd2b.js} +2 -2
- package/dist/chunks/4820.4960fd2b.js.map +1 -0
- package/dist/chunks/ai-employees.b4cfaf9c.js +3 -0
- package/dist/chunks/ai-employees.b4cfaf9c.js.map +1 -0
- package/dist/chunks/chat-box.01a5c267.js +2 -0
- package/dist/chunks/chat-box.01a5c267.js.map +1 -0
- package/dist/chunks/chat-stream.d8e6ac51.js +2 -0
- package/dist/chunks/chat-stream.d8e6ac51.js.map +1 -0
- package/dist/chunks/cruise-canvas.5d138815.js +2 -0
- package/dist/chunks/cruise-canvas.5d138815.js.map +1 -0
- package/dist/chunks/elevo-sidebar.1e3a8f66.js +3 -0
- package/dist/chunks/elevo-sidebar.1e3a8f66.js.map +1 -0
- package/dist/chunks/icon-button.1f657055.js +2 -0
- package/dist/chunks/icon-button.1f657055.js.map +1 -0
- package/dist/chunks/main.cbdc3d1a.js +2 -0
- package/dist/chunks/{main.32e7b0fa.js.map → main.cbdc3d1a.js.map} +1 -1
- package/dist/chunks/mcp-tools.457ff64a.js +2 -0
- package/dist/chunks/mcp-tools.457ff64a.js.map +1 -0
- package/dist/chunks/page-container.01004a0c.js +2 -0
- package/dist/chunks/page-container.01004a0c.js.map +1 -0
- package/dist/chunks/project-summary.9483f9d4.js +2 -0
- package/dist/chunks/project-summary.9483f9d4.js.map +1 -0
- package/dist/chunks/show-cases.068e7b6c.js +2 -0
- package/dist/chunks/show-cases.068e7b6c.js.map +1 -0
- package/dist/chunks/tab-list.acfe1ff4.js +3 -0
- package/dist/chunks/tab-list.acfe1ff4.js.map +1 -0
- package/dist/examples.json +14 -8
- package/dist/images/25c20165.png +0 -0
- package/dist/images/820d60a5.png +0 -0
- package/dist/images/c2e27e10.png +0 -0
- package/dist/index.3be09cbd.js +2 -0
- package/dist/index.3be09cbd.js.map +1 -0
- package/dist/manifest.json +122 -54
- package/dist/types.json +466 -268
- package/dist-types/ai-employees/i18n.d.ts +2 -1
- package/dist-types/ai-employees/index.d.ts +1 -0
- package/dist-types/bootstrap.d.ts +2 -0
- package/dist-types/chat-box/index.d.ts +1 -10
- package/dist-types/chat-stream/index.d.ts +2 -0
- package/dist-types/cruise-canvas/LegacyCruiseCanvas.d.ts +1 -1
- package/dist-types/cruise-canvas/index.d.ts +2 -0
- package/dist-types/cruise-canvas/useLayout.d.ts +3 -1
- package/dist-types/elevo-sidebar/ChatHistory.d.ts +2 -0
- package/dist-types/elevo-sidebar/i18n.d.ts +3 -1
- package/dist-types/elevo-sidebar/index.d.ts +1 -0
- package/dist-types/icon-button/index.d.ts +1 -1
- package/dist-types/page-container/index.d.ts +8 -0
- package/dist-types/project-summary/i18n.d.ts +16 -0
- package/dist-types/project-summary/index.d.ts +20 -0
- package/dist-types/project-summary/index.spec.d.ts +1 -0
- package/dist-types/show-cases/i18n.d.ts +2 -1
- package/dist-types/tab-list/index.d.ts +29 -0
- package/dist-types/tab-list/index.spec.d.ts +1 -0
- package/docs/project-summary.md +11 -0
- package/docs/tab-list.md +11 -0
- package/package.json +2 -2
- package/dist/chunks/1027.89bc41f2.js +0 -3
- package/dist/chunks/1027.89bc41f2.js.map +0 -1
- package/dist/chunks/4820.b66649ca.js.map +0 -1
- package/dist/chunks/4851.39bf8330.js +0 -2
- package/dist/chunks/4851.39bf8330.js.map +0 -1
- package/dist/chunks/ai-employees.25f9b485.js +0 -3
- package/dist/chunks/ai-employees.25f9b485.js.map +0 -1
- package/dist/chunks/chat-box.b34adf84.js +0 -2
- package/dist/chunks/chat-box.b34adf84.js.map +0 -1
- package/dist/chunks/chat-stream.0274b098.js +0 -2
- package/dist/chunks/chat-stream.0274b098.js.map +0 -1
- package/dist/chunks/cruise-canvas.d4e9e5d8.js +0 -2
- package/dist/chunks/cruise-canvas.d4e9e5d8.js.map +0 -1
- package/dist/chunks/elevo-sidebar.ec539eca.js +0 -3
- package/dist/chunks/elevo-sidebar.ec539eca.js.map +0 -1
- package/dist/chunks/icon-button.62a7f33f.js +0 -2
- package/dist/chunks/icon-button.62a7f33f.js.map +0 -1
- package/dist/chunks/main.32e7b0fa.js +0 -2
- package/dist/chunks/mcp-tools.0004fb6d.js +0 -3
- package/dist/chunks/mcp-tools.0004fb6d.js.map +0 -1
- package/dist/chunks/page-container.8ac1b6c4.js +0 -2
- package/dist/chunks/page-container.8ac1b6c4.js.map +0 -1
- package/dist/chunks/show-cases.87f03dc8.js +0 -3
- package/dist/chunks/show-cases.87f03dc8.js.LICENSE.txt +0 -5
- package/dist/chunks/show-cases.87f03dc8.js.map +0 -1
- package/dist/images/0cbe181e.png +0 -0
- package/dist/images/4215203f.png +0 -0
- package/dist/images/5e54ffc5.png +0 -0
- package/dist/images/87c8a33b.png +0 -0
- package/dist/images/8c2cf79e.png +0 -0
- package/dist/images/8e5c445f.png +0 -0
- package/dist/images/af389fa6.svg +0 -16
- package/dist/images/dd5fc700.png +0 -0
- package/dist/images/eef4f2bd.png +0 -0
- package/dist/images/f542faa9.png +0 -0
- package/dist/images/f819b04a.png +0 -0
- package/dist/index.89d6ab59.js +0 -2
- package/dist/index.89d6ab59.js.map +0 -1
- /package/dist/chunks/{1027.89bc41f2.js.LICENSE.txt → 1027.b9dfafcf.js.LICENSE.txt} +0 -0
- /package/dist/chunks/{ai-employees.25f9b485.js.LICENSE.txt → ai-employees.b4cfaf9c.js.LICENSE.txt} +0 -0
- /package/dist/chunks/{elevo-sidebar.ec539eca.js.LICENSE.txt → elevo-sidebar.1e3a8f66.js.LICENSE.txt} +0 -0
- /package/dist/chunks/{mcp-tools.0004fb6d.js.LICENSE.txt → tab-list.acfe1ff4.js.LICENSE.txt} +0 -0
package/dist/bricks.json
CHANGED
|
@@ -1,28 +1,33 @@
|
|
|
1
1
|
{
|
|
2
2
|
"id": "bricks/ai-portal",
|
|
3
3
|
"bricks": [
|
|
4
|
-
"ai-portal.cruise-canvas",
|
|
5
4
|
"ai-portal.chat-box",
|
|
5
|
+
"ai-portal.cruise-canvas",
|
|
6
|
+
"ai-portal.home-container",
|
|
6
7
|
"ai-portal.chat-history",
|
|
7
8
|
"ai-portal.stat-with-mini-chart",
|
|
8
9
|
"ai-portal.elevo-logo",
|
|
9
|
-
"ai-portal.home-container",
|
|
10
10
|
"ai-portal.elevo-sidebar",
|
|
11
11
|
"ai-portal.icon-button",
|
|
12
|
-
"ai-portal.show-cases",
|
|
13
12
|
"ai-portal.mcp-tools",
|
|
13
|
+
"ai-portal.show-cases",
|
|
14
14
|
"ai-portal.chat-stream",
|
|
15
15
|
"ai-portal.ai-employees",
|
|
16
16
|
"ai-portal.ai-agents",
|
|
17
|
+
"ai-portal.page-container",
|
|
17
18
|
"ai-portal.save-request-store",
|
|
18
19
|
"ai-portal.load-request-store",
|
|
19
20
|
"ai-portal.clear-request-store",
|
|
20
|
-
"ai-portal.
|
|
21
|
+
"ai-portal.project-summary",
|
|
22
|
+
"ai-portal.tab-list"
|
|
21
23
|
],
|
|
22
24
|
"elements": [],
|
|
23
25
|
"processors": [],
|
|
24
26
|
"editors": [],
|
|
25
27
|
"dependencies": {
|
|
28
|
+
"ai-portal.chat-box": [
|
|
29
|
+
"eo-icon"
|
|
30
|
+
],
|
|
26
31
|
"ai-portal.cruise-canvas": [
|
|
27
32
|
"eo-icon",
|
|
28
33
|
"eo-button",
|
|
@@ -35,9 +40,6 @@
|
|
|
35
40
|
"basic.copy-to-clipboard",
|
|
36
41
|
"eo-easyops-avatar"
|
|
37
42
|
],
|
|
38
|
-
"ai-portal.chat-box": [
|
|
39
|
-
"eo-icon"
|
|
40
|
-
],
|
|
41
43
|
"ai-portal.chat-history": [
|
|
42
44
|
"eo-icon",
|
|
43
45
|
"eo-link",
|
|
@@ -58,11 +60,13 @@
|
|
|
58
60
|
"eo-icon",
|
|
59
61
|
"eo-tooltip"
|
|
60
62
|
],
|
|
61
|
-
"ai-portal.show-cases": [
|
|
62
|
-
"eo-link"
|
|
63
|
-
],
|
|
64
63
|
"ai-portal.mcp-tools": [
|
|
65
|
-
"eo-icon"
|
|
64
|
+
"eo-icon",
|
|
65
|
+
"ai-portal.tab-list"
|
|
66
|
+
],
|
|
67
|
+
"ai-portal.show-cases": [
|
|
68
|
+
"eo-link",
|
|
69
|
+
"ai-portal.tab-list"
|
|
66
70
|
],
|
|
67
71
|
"ai-portal.chat-stream": [
|
|
68
72
|
"eo-icon",
|
|
@@ -76,12 +80,22 @@
|
|
|
76
80
|
"basic.copy-to-clipboard"
|
|
77
81
|
],
|
|
78
82
|
"ai-portal.ai-employees": [
|
|
79
|
-
"eo-link"
|
|
83
|
+
"eo-link",
|
|
84
|
+
"eo-icon",
|
|
85
|
+
"ai-portal.tab-list"
|
|
80
86
|
],
|
|
81
87
|
"ai-portal.ai-agents": [
|
|
82
88
|
"eo-icon",
|
|
83
89
|
"eo-link"
|
|
90
|
+
],
|
|
91
|
+
"ai-portal.page-container": [
|
|
92
|
+
"eo-link"
|
|
93
|
+
],
|
|
94
|
+
"ai-portal.project-summary": [
|
|
95
|
+
"eo-icon",
|
|
96
|
+
"eo-link",
|
|
97
|
+
"ai-portal.tab-list"
|
|
84
98
|
]
|
|
85
99
|
},
|
|
86
|
-
"filePath": "bricks/ai-portal/dist/index.
|
|
100
|
+
"filePath": "bricks/ai-portal/dist/index.3be09cbd.js"
|
|
87
101
|
}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
/*! For license information please see 1027.b9dfafcf.js.LICENSE.txt */
|
|
2
|
+
"use strict";(globalThis.webpackChunk_next_bricks_ai_portal=globalThis.webpackChunk_next_bricks_ai_portal||[]).push([[1027],{17099:(e,t,i)=>{e.exports=i.p+"images/e47076cc.png"},26785:(e,t,i)=>{i.d(t,{Y:()=>E});var n=i(89575),a=i(18769),o=i.n(a),r=i(21302),l=i.n(r),s=i(53373),c=i.n(s),d=i(57372);const p=async(e,t)=>(await d.http.post("api/gateway/logic.llm.aiops_service/api/v1/llm/agent/flow/search",e,t)).data;var m=i(41030),u=i(99671),g=i(42965),h=i(97907),f=i(98343);const E=(0,a.forwardRef)(v);function v(e,t){let{activeId:i,actions:r,urlTemplate:s,onActionClick:d,onHistoryClick:E}=e;const v=(0,a.useRef)(null),[b,x]=(0,a.useState)(null),[y,k]=(0,a.useState)(),[w,T]=(0,a.useState)();(0,a.useEffect)((()=>{Promise.all([p({next_token:w},{interceptorParams:{ignoreLoadingBar:!0}}),new Promise((e=>setTimeout(e,500)))]).then((e=>{let[t]=e;x((e=>[...null!=e?e:[],...t.data])),k(t.next_token)})).catch((e=>{console.error("Error loading chat history:",e)}))}),[w]);const O=(0,a.useMemo)((()=>{const e=new Map,t=l()(),i=t.clone().startOf("day"),n=i.clone().subtract(1,"day"),a=i.clone().subtract(7,"days"),o=i.clone().subtract(30,"days"),r=+i/1e3,s=+n/1e3,c=+a/1e3,d=+o/1e3,p=+t.clone().startOf("year")/1e3;for(const t of null!=b?b:[]){let i;i=t.startTime>=r?(0,u.t)(u.K.TODAY):t.startTime>=s?(0,u.t)(u.K.YESTERDAY):t.startTime>=c?(0,u.t)(u.K.PREVIOUS_7_DAYS):t.startTime>=d?(0,u.t)(u.K.PREVIOUS_30_DAYS):t.startTime>=p?l()(1e3*t.startTime).format("MMMM"):l()(1e3*t.startTime).format("YYYY");let n=e.get(i);n||e.set(i,n={title:i,items:[]}),n.items.push(t)}return[...e.values()]}),[b]),[_,C]=(0,a.useState)(null),S=(0,a.useRef)(null);(0,a.useEffect)((()=>{const e=S.current,t=v.current;if(!e||!y||!t)return;const i=new IntersectionObserver((e=>{for(const t of e)t.isIntersecting&&T(y)}),{root:t});return i.observe(e),()=>{i.disconnect()}}),[y]);const A=(0,a.useRef)(0),R=(0,a.useCallback)((async()=>{try{const e=++A.current,t=await p({},{interceptorParams:{ignoreLoadingBar:!0}});if(e!==A.current)return;x((e=>{const i=null!=e?e:[],n=t.data,a=new Set(n.map((e=>e.id))),o=new Map(n.map((e=>[e.id,e])));let r=!1,l=!1,s=!0;for(const e of i){const t=o.get(e.id);if(!t)break;if(r=!0,l=s&&t!==n[0]||!(0,m.isEqual)(t,e),l)break;s=!1}return r?l?[...n,...i.filter((e=>!a.has(e.id)))]:e:(k(t.next_token),n)}))}catch(e){console.error("Error pulling chat history:",e)}}),[]);return(0,a.useImperativeHandle)(t,(()=>({pull:R})),[R]),b?o().createElement("div",{className:"history",ref:v},o().createElement("ul",null,O.map((e=>o().createElement("li",{key:e.title,className:"group"},o().createElement("div",{className:"group-title"},e.title),o().createElement("ul",{className:"items"},e.items.map((e=>o().createElement("li",{key:e.id},o().createElement(g.EM,(0,n.A)({className:c()("item",{"actions-active":e.id===_,active:e.id===i}),onClick:E},s?{url:(0,f.Q)(s,e)}:null),o().createElement("div",{className:"item-title",title:e.title},e.title),o().createElement(g.qu,{className:"actions",actions:r,onActionClick:t=>{d({action:t.detail,item:e})},onVisibleChange:t=>{C(t.detail?e.id:null)}}),!h.QB.includes(e.state)&&o().createElement("div",{className:"working"})))))))))),y&&o().createElement("div",{className:"load-more",ref:S},o().createElement(g.Bj,{lib:"antd",icon:"loading-3-quarters",spinning:!0}))):o().createElement("div",{className:"history"},o().createElement("div",{className:"loading"},o().createElement(g.Bj,{lib:"antd",theme:"outlined",icon:"loading-3-quarters",spinning:!0})))}},42965:(e,t,i)=>{i.d(t,{Bj:()=>a,EM:()=>o,JQ:()=>l,Py:()=>c,qb:()=>r,qu:()=>s});var n=i(11280);const a=(0,n.wrapBrick)("eo-icon"),o=(0,n.wrapBrick)("eo-link"),r=(0,n.wrapBrick)("eo-dropdown-actions",{onActionClick:"action.click",onVisibleChange:"visible.change"}),l=(0,n.wrapBrick)("eo-easyops-avatar"),s=(0,n.wrapBrick)("eo-mini-actions",{onActionClick:"action.click",onVisibleChange:"visible.change"}),c=(0,n.wrapBrick)("ai-portal.icon-button")},45646:(e,t,i)=>{i.d(t,{D:()=>f});var n=i(89575),a=i(18769),o=i.n(a),r=i(53373),l=i.n(r),s=i(57372);const c=async(e,t)=>(await s.http.get("api/gateway/logic.llm.aiops_service/api/v1/elevo/conversations",{...t,params:e})).data;var d=i(41030),p=i(99671),m=i(42965),u=i(97907),g=i(98343);const h={lib:"fa",icon:"plus"},f=(0,a.forwardRef)(E);function E(e,t){let{username:i,historyActiveId:r,historyActions:f,historyUrlTemplate:E,projectActiveId:v,projectUrlTemplate:b,projectActions:x,onActionClick:y,onHistoryClick:k,onProjectActionClick:w,onAddProject:T}=e;const O=(0,a.useRef)(null),[_,C]=(0,a.useState)(null),[S,A]=(0,a.useState)(!1),[R,I]=(0,a.useState)(null),[P,N]=(0,a.useState)(!1),[Y,j]=(0,a.useState)(),[D,B]=(0,a.useState)(),M=(0,a.useRef)(!0),[U,V]=(0,a.useState)([]),H=(0,a.useMemo)((()=>[...null!=f?f:[],{isDropdown:!0,text:(0,p.t)(p.K.MOVE_TO_PROJECT),disabled:!(null!=_&&_.length),items:null==_?void 0:_.map((e=>({event:"move",key:e.instanceId,text:e.name,project:e})))}]),[f,_]);(0,a.useEffect)((()=>{(async()=>{try{const e=await(async()=>(await s.http.get("api/gateway/logic.llm.aiops_service/api/v1/elevo/projects",{params:{page:1,page_size:3e3}})).data)();C(e.list)}catch(e){console.error("Error loading projects:",e),C([])}})()}),[]),(0,a.useEffect)((()=>{j(void 0),B(void 0),I(null)}),[i]),(0,a.useEffect)((()=>{Promise.all([c({token:D,limit:30,onlyOwner:!0,onlyRelatedProject:!0},{interceptorParams:{ignoreLoadingBar:!0}}),...M.current?[]:[new Promise((e=>setTimeout(e,500)))]]).then((e=>{let[t]=e;M.current=!1,I((e=>[...null!=e?e:[],...t.conversations])),j(t.nextToken)})).catch((e=>{console.error("Error loading chat history:",e),I([])}))}),[D,i]);const[J,L]=(0,a.useState)(null),q=(0,a.useRef)(null);(0,a.useEffect)((()=>{const e=q.current,t=O.current;if(!e||!Y||!t||P)return;const i=new IntersectionObserver((e=>{for(const t of e)t.isIntersecting&&B(Y)}),{root:t});return i.observe(e),()=>{i.disconnect()}}),[Y,P]);const z=(0,a.useRef)(0),G=(0,a.useCallback)((async()=>{try{const e=++z.current,t=await c({username:i,limit:30},{interceptorParams:{ignoreLoadingBar:!0}});if(e!==z.current)return;I((e=>{const i=null!=e?e:[],n=t.conversations,a=new Set(n.map((e=>e.conversationId))),o=new Map(n.map((e=>[e.conversationId,e])));let r=!1,l=!1,s=!0;for(const e of i){const t=o.get(e.conversationId);if(!t)break;if(r=!0,l=s&&t!==n[0]||!(0,d.isEqual)(t,e),l)break;s=!1}return r?l?[...n,...i.filter((e=>!a.has(e.conversationId)))]:e:(j(t.nextToken),n)}))}catch(e){console.error("Error pulling chat history:",e)}}),[i]);(0,a.useImperativeHandle)(t,(()=>({pull:G,removeProject:e=>{C((t=>t?t.filter((t=>t.instanceId!==e)):t))},addProject:e=>{C((t=>t?[...t,e]:[e]))},moveConversation:e=>{V((t=>[...t,e]))}})),[G]);const K=(0,a.useMemo)((()=>R&&R.length?R.filter((e=>!U.includes(e.conversationId))):R),[R,U]);return o().createElement("div",{className:"history",ref:O},o().createElement("div",{className:l()("section",{collapsed:S})},o().createElement("div",{className:"section-title"},o().createElement("div",{className:"section-label",onClick:()=>A((e=>!e))},(0,p.t)(p.K.PROJECTS),o().createElement(m.Bj,{lib:"fa",icon:"angle-down"})),o().createElement(m.Py,{icon:h,variant:"mini-light",tooltip:(0,p.t)(p.K.CREATE_PROJECT),onClick:T})),o().createElement("ul",{className:"items"},_?_.map((e=>o().createElement("li",{key:e.instanceId},o().createElement(m.EM,(0,n.A)({className:l()("item",{"actions-active":e.instanceId===J,active:e.instanceId===v}),onClick:k},b?{url:(0,g.Q)(b,e)}:null),o().createElement("div",{className:"item-title",title:e.name},e.name),o().createElement(m.qu,{className:"actions",actions:x,onActionClick:t=>{w({action:t.detail,project:e})},onVisibleChange:t=>{L(t.detail?e.instanceId:null)}}))))):o().createElement("li",{className:"loading"},o().createElement(m.Bj,{lib:"antd",theme:"outlined",icon:"loading-3-quarters",spinning:!0})))),o().createElement("div",{className:l()("section",{collapsed:P})},o().createElement("div",{className:"section-title"},o().createElement("div",{className:"section-label",onClick:()=>N((e=>!e))},(0,p.t)(p.K.HISTORY),o().createElement(m.Bj,{lib:"fa",icon:"angle-down"}))),o().createElement("ul",{className:"items"},K?K.map((e=>o().createElement("li",{key:e.conversationId},o().createElement(m.EM,(0,n.A)({className:l()("item",{"actions-active":e.conversationId===J,active:e.conversationId===r}),onClick:k},E?{url:(0,g.Q)(E,e)}:null),o().createElement("div",{className:"item-title",title:e.title},e.title),o().createElement(m.qu,{className:"actions",actions:H,onActionClick:t=>{y({action:t.detail,item:e})},onVisibleChange:t=>{L(t.detail?e.conversationId:null)}}),!u.QB.includes(e.state)&&o().createElement("div",{className:"working"}))))):o().createElement("li",{className:"loading"},o().createElement(m.Bj,{lib:"antd",theme:"outlined",icon:"loading-3-quarters",spinning:!0}))),!P&&Y&&o().createElement("div",{className:"load-more",ref:q},o().createElement(m.Bj,{lib:"antd",icon:"loading-3-quarters",spinning:!0}))))}},61408:(e,t,i)=>{i.d(t,{A:()=>l});var n=i(36758),a=i.n(n),o=i(40935),r=i.n(o)()(a());r.push([e.id,':host{display:block}:host([hidden]){display:none}*{box-sizing:border-box}.sidebar{position:relative;z-index:1;width:261px;height:100%;background:#f6f7f9;border-right:1px solid #e3e5eb;padding:26px 12px 0;display:flex;flex-direction:column;transition:transform 0.3s ease-in-out}.logo-bar{display:flex;align-items:center;justify-content:space-between;margin-bottom:30px;margin-left:4px}.logo-link::part(link){display:block}.logo{vertical-align:middle}.new-chat::part(link){display:flex;gap:0;align-items:center;color:var(--elevo-color-brand);font-size:14px;text-align:left;cursor:pointer}.sidebar .new-chat::part(link){background:#f0f4ff;border-radius:8px;border:1px solid #c9d7ff;padding:9px 13px;font-weight:500;margin-bottom:16px}.sidebar .new-chat::part(link):hover{background:rgba(201,215,255,0.5)}.new-chat-icon{font-size:16px;margin-right:5px}.footer{border-top:1px solid rgba(0,0,0,0.04);padding:9px 12px;margin:0 -12px}.dropdown{display:block}.account{background:none;border:none;border-radius:8px;padding:6px 10px;display:block;width:100%;text-align:left;cursor:pointer}.account:hover{background:rgba(0,0,0,0.04)}.alternative{position:fixed;top:8px;left:8px;padding:6px 10px 6px 8px;display:flex;align-items:center;opacity:0;z-index:1;transition:opacity 0.2s ease-in-out;background:rgba(255,255,255,0);border-radius:8px;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px)}.alternative .new-chat::part(link){padding:4px;margin-left:16px;font-size:12px}.alternative .new-chat::part(link):hover{color:#7891ff}.alternative .new-chat::part(link):active{color:#0911b3}.container{width:261px;height:100%;transition:width 0.3s ease-in-out}.container.collapsed{width:0;overflow:visible}.container.collapsed .sidebar{transform:translateX(-100%)}.container.collapsed .alternative{opacity:1}:host([behavior="drawer"]){z-index:1;width:0}:host(:not([behavior="drawer"])) .alternative .new-chat{display:none}.mask{position:fixed;top:0;right:0;bottom:0;left:0}.links{border-bottom:1px solid rgba(0,0,0,0.06);padding-bottom:16px;margin-bottom:16px}.link{display:block}.link + .link{margin-top:4px}.link::part(link){display:flex;gap:0;align-items:center;padding:7px 10px;border-radius:8px;color:#000}.link::part(link):hover{background:rgba(0,0,0,0.04)}.link .icon{font-size:16px;margin-right:10px}.link .title{flex:1;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.history{flex:1;min-height:0;overflow-y:auto;margin:0 -12px;padding:0 12px}.history ul{list-style:none;margin:0;padding:0}.history .section + .section{margin-top:14px}.history .section-title{display:flex;align-items:center;justify-content:space-between;height:30px;margin-bottom:6px;padding:0 8px}.history .section-label{display:flex;align-items:center;height:24px;padding:0 8px;margin-left:-8px;cursor:pointer;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:500;font-size:12px;color:#8c8c8c;border-radius:8px}.history .section-label eo-icon{vertical-align:middle;margin-left:6px;transition:transform 0.2s ease-in-out}.history .section-label:hover{background:rgba(0,0,0,0.04)}.history .collapsed > ul{display:none}.history .collapsed .section-label eo-icon{transform:rotate(-90deg)}.history .loading{display:flex;align-items:center;justify-content:center;height:36px}.history .group + .group{margin-top:15px}.history .group-title{font-weight:500;font-size:12px;color:#000;padding:8px;height:36px;line-height:20px}.history .item{display:block}.history .item::part(link){display:flex;align-items:center;padding:0 8px;height:36px;border-radius:8px;color:#000}.history .item.active::part(link){background:rgba(0,0,0,0.06)}.history .item.actions-active::part(link),.history .item::part(link):hover{background:rgba(0,0,0,0.04)}.history .item-title{flex:1;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.history .actions{cursor:auto}.history .item:not(:hover):not(.actions-active) .actions{display:none}.history .working{width:8px;height:8px;border-radius:8px;background:var(--elevo-color-brand);margin:0 7px}.history .item.actions-active .working,.history .item:hover .working,.history .item.active .working{display:none}.history .load-more{display:flex;justify-content:center;align-items:center;height:36px}',""]);const l=r.toString()},98343:(e,t,i)=>{i.d(t,{Q:()=>a});var n=i(41030);function a(e,t){return null==e?void 0:e.replace(/{{(.*?)}}/g,((e,i)=>(0,n.get)(t,i.trim())))}},99671:(e,t,i)=>{i.d(t,{I:()=>s,K:()=>a,NS:()=>l,t:()=>c});var n=i(87117);let a=function(e){return e.NEW_CHAT="NEW_CHAT",e.LOGOUT="LOGOUT",e.TODAY="TODAY",e.YESTERDAY="YESTERDAY",e.PREVIOUS_7_DAYS="PREVIOUS_7_DAYS",e.PREVIOUS_30_DAYS="PREVIOUS_30_DAYS",e.SWITCH_LANGUAGE="SWITCH_LANGUAGE",e.PROJECTS="PROJECTS",e.HISTORY="HISTORY",e.CREATE_PROJECT="CREATE_PROJECT",e.MOVE_TO_PROJECT="MOVE_TO_PROJECT",e}({});const o={[a.NEW_CHAT]:"New chat",[a.LOGOUT]:"Logout",[a.TODAY]:"Today",[a.YESTERDAY]:"Yesterday",[a.PREVIOUS_7_DAYS]:"Previous 7 days",[a.PREVIOUS_30_DAYS]:"Previous 30 days",[a.SWITCH_LANGUAGE]:"中文",[a.PROJECTS]:"Project management",[a.HISTORY]:"Chat history",[a.CREATE_PROJECT]:"Create project",[a.MOVE_TO_PROJECT]:"Move to project"},r={[a.NEW_CHAT]:"新对话",[a.LOGOUT]:"登出",[a.TODAY]:"今天",[a.YESTERDAY]:"昨天",[a.PREVIOUS_7_DAYS]:"过去7天",[a.PREVIOUS_30_DAYS]:"过去30天",[a.SWITCH_LANGUAGE]:"English",[a.PROJECTS]:"项目管理",[a.HISTORY]:"历史对话",[a.CREATE_PROJECT]:"创建项目",[a.MOVE_TO_PROJECT]:"移动到项目"},l="bricks/ai-portal/elevo-sidebar",s={en:o,zh:r},c=n.i18n.getFixedT(null,l)}}]);
|
|
3
|
+
//# sourceMappingURL=1027.b9dfafcf.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chunks/1027.b9dfafcf.js","mappings":";ySAKO,MAAMA,EAAsCC,MAAOC,EAAMC,WAA4F,EAAAC,KAAKC,KAAK,mEAAoEH,EAAMC,IAAUD,gEC4CnP,MAAMI,GAAoBC,EAAAA,EAAAA,YAAWC,GAErC,SAASA,EAAmBC,EAQjCC,GACA,IARA,SACEC,EAAQ,QACRC,EAAO,YACPC,EAAW,cACXC,EAAa,eACbC,GACuBN,EAGzB,MAAMO,GAAUC,EAAAA,EAAAA,QAA8B,OACvCC,EAAMC,IAAWC,EAAAA,EAAAA,UAAqC,OACtDC,EAAWC,IAAgBF,EAAAA,EAAAA,aAC3BG,EAAeC,IAAoBJ,EAAAA,EAAAA,aAE1CK,EAAAA,EAAAA,YAAU,KACRC,QAAQC,IAAI,CACV3B,EACE,CAAE4B,WAAYL,GACd,CACEM,kBAAmB,CACjBC,kBAAkB,KAIxB,IAAIJ,SAASK,GAAYC,WAAWD,EAAS,SAE5CE,MAAKC,IAAY,IAAV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AC1I,EAAE2I,QAAS,KACZ,CAAC3I,EAAEC,OAAQ,KACX,CAACD,EAAEE,WAAY,KACf,CAACF,EAAEG,iBAAkB,OACrB,CAACH,EAAEI,kBAAmB,QACtB,CAACJ,EAAE4I,iBAAkB,UACrB,CAAC5I,EAAE4H,UAAW,OACd,CAAC5H,EAAEgI,SAAU,OACb,CAAChI,EAAE+H,gBAAiB,OACpB,CAAC/H,EAAEoG,iBAAkB,SAGV0C,EAAK,iCAELC,EAAU,CAAEN,KAAII,MAEhB9I,EAAIiJ,EAAAA,KAAKC,UAAU,KAAMH","sources":["webpack:///../../node_modules/@next-api-sdk/llm-sdk/dist/esm/api/llm/agent_flow/searchTaskForAgentFlow.js","webpack:///./src/elevo-sidebar/LegacyChatHistory.tsx","webpack:///./src/elevo-sidebar/bricks.ts","webpack:///../../node_modules/@next-api-sdk/llm-sdk/dist/esm/api/llm/elevo/getElevoProjects.js","webpack:///../../node_modules/@next-api-sdk/llm-sdk/dist/esm/api/llm/elevo/listElevoConversations.js","webpack:///./src/elevo-sidebar/ChatHistory.tsx","webpack:///./src/elevo-sidebar/styles.shadow.css","webpack:///./src/shared/parseTemplate.ts","webpack:///./src/elevo-sidebar/i18n.ts"],"sourcesContent":["import { http } from \"@next-core/http\";\n/**\n * @description 分页查询agent flow, 默认只查询最近三个页的数据\n * @endpoint POST /api/v1/llm/agent/flow/search\n */\nexport const AgentFlowApi_searchTaskForAgentFlow = async (data, options) => /**! @contract easyops.api.llm.agent_flow.SearchTaskForAgentFlow@1.0.0 */(await http.post(\"api/gateway/logic.llm.aiops_service/api/v1/llm/agent/flow/search\", data, options)).data;\n//# sourceMappingURL=searchTaskForAgentFlow.js.map","import React, {\n forwardRef,\n useCallback,\n useEffect,\n useImperativeHandle,\n useMemo,\n useRef,\n useState,\n} from \"react\";\nimport moment from \"moment\";\nimport classNames from \"classnames\";\nimport { AgentFlowApi_searchTaskForAgentFlow } from \"@next-api-sdk/llm-sdk\";\nimport type {\n ActionType,\n SimpleActionType,\n} from \"@next-bricks/basic/mini-actions\";\nimport { isEqual } from \"lodash\";\nimport { K, t } from \"./i18n.js\";\nimport type { TaskState } from \"../cruise-canvas/interfaces.js\";\nimport { WrappedIcon, WrappedLink, WrappedMiniActions } from \"./bricks.js\";\nimport { DONE_STATES } from \"../shared/constants.js\";\nimport type { ChatHistoryRef } from \"./ChatHistory.js\";\nimport { parseTemplate } from \"../shared/parseTemplate.js\";\n\ninterface LegacyHistoryItem {\n id: string;\n title: string;\n startTime: number;\n state?: TaskState;\n}\n\ninterface LegacyGroupedHistory {\n title: string;\n items: LegacyHistoryItem[];\n}\n\nexport interface LegacyActionClickDetail {\n action: SimpleActionType;\n item: LegacyHistoryItem;\n}\n\nexport interface LegacyChatHistoryProps {\n activeId?: string;\n urlTemplate?: string;\n actions?: ActionType[];\n onActionClick: (detail: LegacyActionClickDetail) => void;\n onHistoryClick: () => void;\n}\n\nexport const LegacyChatHistory = forwardRef(LowLevelChatHistory);\n\nexport function LowLevelChatHistory(\n {\n activeId,\n actions,\n urlTemplate,\n onActionClick,\n onHistoryClick,\n }: LegacyChatHistoryProps,\n ref: React.Ref<ChatHistoryRef>\n) {\n const rootRef = useRef<HTMLDivElement | null>(null);\n const [list, setList] = useState<LegacyHistoryItem[] | null>(null);\n const [nextToken, setNextToken] = useState<string | undefined>();\n const [loadNextToken, setLoadNextToken] = useState<string | undefined>();\n\n useEffect(() => {\n Promise.all([\n AgentFlowApi_searchTaskForAgentFlow(\n { next_token: loadNextToken },\n {\n interceptorParams: {\n ignoreLoadingBar: true,\n },\n }\n ),\n new Promise((resolve) => setTimeout(resolve, 500)), // Force a minimum delay\n ])\n .then(([data]) => {\n setList((prev) => [\n ...(prev ?? []),\n ...(data.data as LegacyHistoryItem[]),\n ]);\n setNextToken(data.next_token);\n })\n .catch((error) => {\n if (process.env.NODE_ENV !== \"test\") {\n // eslint-disable-next-line no-console\n console.error(\"Error loading chat history:\", error);\n }\n });\n }, [loadNextToken]);\n\n const groups = useMemo(() => {\n const groupMap = new Map<string, LegacyGroupedHistory>();\n // Group history by\n // - today\n // - yesterday\n // - previous 7 days\n // - previous 30 days\n // - each month this year\n // - each year before.\n const now = moment();\n const startOfDay = now.clone().startOf(\"day\");\n const yesterday = startOfDay.clone().subtract(1, \"day\");\n const sevenDaysAgo = startOfDay.clone().subtract(7, \"days\");\n const thirtyDaysAgo = startOfDay.clone().subtract(30, \"days\");\n const thisYear = now.clone().startOf(\"year\");\n\n const timestamps = {\n startOfDay: +startOfDay / 1000,\n yesterday: +yesterday / 1000,\n sevenDaysAgo: +sevenDaysAgo / 1000,\n thirtyDaysAgo: +thirtyDaysAgo / 1000,\n thisYear: +thisYear / 1000,\n };\n for (const item of list ?? []) {\n let groupKey: string;\n if (item.startTime >= timestamps.startOfDay) {\n groupKey = t(K.TODAY);\n } else if (item.startTime >= timestamps.yesterday) {\n groupKey = t(K.YESTERDAY);\n } else if (item.startTime >= timestamps.sevenDaysAgo) {\n groupKey = t(K.PREVIOUS_7_DAYS);\n } else if (item.startTime >= timestamps.thirtyDaysAgo) {\n groupKey = t(K.PREVIOUS_30_DAYS);\n } else if (item.startTime >= timestamps.thisYear) {\n groupKey = moment(item.startTime * 1000).format(\"MMMM\");\n } else {\n groupKey = moment(item.startTime * 1000).format(\"YYYY\");\n }\n let group = groupMap.get(groupKey);\n if (!group) {\n groupMap.set(groupKey, (group = { title: groupKey, items: [] }));\n }\n group.items.push(item);\n }\n\n return [...groupMap.values()];\n }, [list]);\n\n const [actionsVisible, setActionsVisible] = useState<string | null>(null);\n\n const nextRef = useRef<HTMLDivElement | null>(null);\n\n useEffect(() => {\n const next = nextRef.current;\n const root = rootRef.current;\n if (!next || !nextToken || !root) {\n return;\n }\n const observer = new IntersectionObserver(\n (entries) => {\n for (const entry of entries) {\n if (entry.isIntersecting) {\n setLoadNextToken(nextToken);\n }\n }\n },\n { root }\n );\n observer.observe(next);\n return () => {\n observer.disconnect();\n };\n }, [nextToken]);\n\n const pullIdRef = useRef(0);\n\n const pull = useCallback(async () => {\n try {\n const pullId = ++pullIdRef.current;\n const tempList = await AgentFlowApi_searchTaskForAgentFlow(\n {},\n {\n interceptorParams: {\n ignoreLoadingBar: true,\n },\n }\n );\n if (pullId !== pullIdRef.current) {\n // Ignore this pull if a newer one has been triggered\n return;\n }\n setList((prev) => {\n const prevList = prev ?? [];\n const newList = tempList.data as LegacyHistoryItem[];\n const newIds = new Set(newList.map((item) => item.id));\n const newItemsMap = new Map(newList.map((item) => [item.id, item]));\n\n let foundIntersection = false;\n let foundChanged = false;\n let isFirst = true;\n for (const item of prevList) {\n const newItem = newItemsMap.get(item.id);\n if (newItem) {\n foundIntersection = true;\n foundChanged =\n (isFirst && newItem !== newList[0]) || !isEqual(newItem, item);\n if (foundChanged) {\n break;\n }\n } else {\n break;\n }\n isFirst = false;\n }\n\n if (!foundIntersection) {\n setNextToken(tempList.next_token);\n return newList;\n }\n\n if (foundChanged) {\n return [\n ...newList,\n ...prevList.filter((item) => !newIds.has(item.id)),\n ];\n }\n\n return prev;\n });\n } catch (error) {\n // eslint-disable-next-line no-console\n console.error(\"Error pulling chat history:\", error);\n }\n }, []);\n\n useImperativeHandle(\n ref,\n () => ({\n pull,\n }),\n [pull]\n );\n\n if (!list) {\n return (\n <div className=\"history\">\n <div className=\"loading\">\n <WrappedIcon\n lib=\"antd\"\n theme=\"outlined\"\n icon=\"loading-3-quarters\"\n spinning\n />\n </div>\n </div>\n );\n }\n\n return (\n <div className=\"history\" ref={rootRef}>\n <ul>\n {groups.map((group) => (\n <li key={group.title} className=\"group\">\n <div className=\"group-title\">{group.title}</div>\n <ul className=\"items\">\n {group.items.map((item) => (\n <li key={item.id}>\n <WrappedLink\n className={classNames(\"item\", {\n \"actions-active\": item.id === actionsVisible,\n active: item.id === activeId,\n })}\n onClick={onHistoryClick}\n {...(urlTemplate\n ? { url: parseTemplate(urlTemplate, item) }\n : null)}\n >\n <div className=\"item-title\" title={item.title}>\n {item.title}\n </div>\n <WrappedMiniActions\n className=\"actions\"\n actions={actions}\n onActionClick={(e) => {\n onActionClick({ action: e.detail, item });\n }}\n onVisibleChange={(e) => {\n setActionsVisible(e.detail ? item.id : null);\n }}\n />\n {!DONE_STATES.includes(item.state!) && (\n <div className=\"working\"></div>\n )}\n </WrappedLink>\n </li>\n ))}\n </ul>\n </li>\n ))}\n </ul>\n {nextToken && (\n <div className=\"load-more\" ref={nextRef}>\n <WrappedIcon lib=\"antd\" icon=\"loading-3-quarters\" spinning />\n </div>\n )}\n </div>\n );\n}\n","import { wrapBrick } from \"@next-core/react-element\";\nimport type {\n GeneralIcon,\n GeneralIconProps,\n} from \"@next-bricks/icons/general-icon\";\nimport type { Link, LinkProps } from \"@next-bricks/basic/link\";\nimport type {\n EoDropdownActions,\n DropdownActionsProps,\n DropdownActionsEvents,\n DropdownActionsEventsMapping,\n} from \"@next-bricks/basic/dropdown-actions\";\nimport type {\n EoEasyopsAvatar,\n EoEasyopsAvatarProps,\n} from \"@next-bricks/basic/easyops-avatar\";\nimport type {\n EoMiniActions,\n EoMiniActionsEvents,\n EoMiniActionsEventsMapping,\n EoMiniActionsProps,\n} from \"@next-bricks/basic/mini-actions\";\nimport type { IconButton, IconButtonProps } from \"../icon-button\";\n\nexport const WrappedIcon = wrapBrick<GeneralIcon, GeneralIconProps>(\"eo-icon\");\nexport const WrappedLink = wrapBrick<Link, LinkProps>(\"eo-link\");\nexport const WrappedDropdownActions = wrapBrick<\n EoDropdownActions,\n DropdownActionsProps,\n DropdownActionsEvents,\n DropdownActionsEventsMapping\n>(\"eo-dropdown-actions\", {\n onActionClick: \"action.click\",\n onVisibleChange: \"visible.change\",\n});\nexport const WrappedEasyopsAvatar = wrapBrick<\n EoEasyopsAvatar,\n EoEasyopsAvatarProps\n>(\"eo-easyops-avatar\");\nexport const WrappedMiniActions = wrapBrick<\n EoMiniActions,\n EoMiniActionsProps,\n EoMiniActionsEvents,\n EoMiniActionsEventsMapping\n>(\"eo-mini-actions\", {\n onActionClick: \"action.click\",\n onVisibleChange: \"visible.change\",\n});\nexport const WrappedIconButton = wrapBrick<IconButton, IconButtonProps>(\n \"ai-portal.icon-button\"\n);\n","import { http } from \"@next-core/http\";\n/**\n * @description 获取elevo项目列表\n * @endpoint list /api/v1/elevo/projects\n */\nexport const ElevoApi_getElevoProjects = async (params, options) => /**! @contract easyops.api.llm.elevo.GetElevoProjects@1.0.0 */(await http.get(\"api/gateway/logic.llm.aiops_service/api/v1/elevo/projects\", {\n ...options,\n params\n})).data;\n//# sourceMappingURL=getElevoProjects.js.map","import { http } from \"@next-core/http\";\n/**\n * @description 获取elevo会话列表\n * @endpoint GET /api/v1/elevo/conversations\n */\nexport const ElevoApi_listElevoConversations = async (params, options) => /**! @contract easyops.api.llm.elevo.ListElevoConversations@1.0.0 */(await http.get(\"api/gateway/logic.llm.aiops_service/api/v1/elevo/conversations\", {\n ...options,\n params\n})).data;\n//# sourceMappingURL=listElevoConversations.js.map","import React, {\n forwardRef,\n useCallback,\n useEffect,\n useImperativeHandle,\n useMemo,\n useRef,\n useState,\n} from \"react\";\nimport classNames from \"classnames\";\nimport {\n ElevoApi_listElevoConversations,\n ElevoApi_getElevoProjects,\n type ElevoApi_ListElevoConversationsRequestParams,\n} from \"@next-api-sdk/llm-sdk\";\nimport type {\n ActionType,\n SimpleActionType,\n} from \"@next-bricks/basic/mini-actions\";\nimport type { GeneralIconProps } from \"@next-bricks/icons/general-icon\";\nimport { isEqual } from \"lodash\";\nimport { K, t } from \"./i18n.js\";\nimport type { TaskState } from \"../cruise-canvas/interfaces.js\";\nimport {\n WrappedIcon,\n WrappedLink,\n WrappedMiniActions,\n WrappedIconButton,\n} from \"./bricks.js\";\nimport { DONE_STATES } from \"../shared/constants.js\";\nimport { parseTemplate } from \"../shared/parseTemplate.js\";\n\nconst ADD_ICON: GeneralIconProps = {\n lib: \"fa\",\n icon: \"plus\",\n};\n\nexport interface HistoryItem {\n conversationId: string;\n title: string;\n startTime: number;\n state?: TaskState;\n}\n\nexport interface GroupedHistory {\n title: string;\n items: HistoryItem[];\n}\n\nexport interface ActionClickDetail {\n action: SimpleActionType;\n item: HistoryItem;\n project?: Project;\n}\n\nexport interface ProjectActionClickDetail {\n action: SimpleActionType;\n project: Project;\n}\n\nexport interface Project {\n /** 实例ID */\n instanceId: string;\n /** 项目名称 */\n name: string;\n /** 项目描述 */\n description: string;\n /** 状态 */\n state: \"active\" | \"inactive\";\n /** 默认数字人ID */\n defaultAiEmployeeId: string;\n /** 创建者 */\n creator: string;\n /** 创建时间 */\n ctime: string;\n /** 修改时间 */\n mtime: string;\n /** 修改者 */\n modifier: string;\n}\n\nexport interface ChatHistoryProps {\n username?: string;\n historyActiveId?: string;\n historyUrlTemplate?: string;\n historyActions?: ActionType[];\n projectActiveId?: string;\n projectUrlTemplate?: string;\n projectActions?: ActionType[];\n onActionClick: (detail: ActionClickDetail) => void;\n onHistoryClick: () => void;\n onProjectActionClick: (detail: ProjectActionClickDetail) => void;\n onAddProject: () => void;\n}\n\nexport interface ChatHistoryRef {\n pull: () => void;\n removeProject?: (projectId: string) => void;\n addProject?: (project: Project) => void;\n moveConversation?: (conversationId: string) => void;\n}\n\nexport const ChatHistory = forwardRef(LowLevelChatHistory);\n\nexport function LowLevelChatHistory(\n {\n username,\n historyActiveId,\n historyActions,\n historyUrlTemplate,\n projectActiveId,\n projectUrlTemplate,\n projectActions,\n onActionClick,\n onHistoryClick,\n onProjectActionClick,\n onAddProject,\n }: ChatHistoryProps,\n ref: React.Ref<ChatHistoryRef>\n) {\n const rootRef = useRef<HTMLDivElement | null>(null);\n const [projects, setProjects] = useState<Project[] | null>(null);\n const [projectsCollapsed, setProjectsCollapsed] = useState(false);\n const [historyList, setHistoryList] = useState<HistoryItem[] | null>(null);\n const [historyCollapsed, setHistoryCollapsed] = useState(false);\n const [nextToken, setNextToken] = useState<string | undefined>();\n const [loadNextToken, setLoadNextToken] = useState<string | undefined>();\n const initialRef = useRef(true);\n const [movedConversations, setMovedConversations] = useState<string[]>([]);\n\n const mergedHistoryActions = useMemo(\n () =>\n [\n ...(historyActions ?? []),\n {\n isDropdown: true,\n text: t(K.MOVE_TO_PROJECT),\n disabled: !projects?.length,\n items: projects?.map((project) => ({\n event: \"move\",\n key: project.instanceId,\n text: project.name,\n project,\n })),\n },\n ] as ActionType[],\n [historyActions, projects]\n );\n\n useEffect(() => {\n (async () => {\n try {\n const projects = await ElevoApi_getElevoProjects({\n page: 1,\n page_size: 3000,\n });\n setProjects(projects.list as Project[]);\n } catch (error) {\n // eslint-disable-next-line no-console\n console.error(\"Error loading projects:\", error);\n setProjects([]);\n }\n })();\n }, []);\n\n useEffect(() => {\n setNextToken(undefined);\n setLoadNextToken(undefined);\n setHistoryList(null);\n }, [username]);\n\n useEffect(() => {\n Promise.all([\n ElevoApi_listElevoConversations(\n {\n token: loadNextToken,\n // username,\n limit: 30,\n onlyOwner: true,\n onlyRelatedProject: true,\n } as ElevoApi_ListElevoConversationsRequestParams,\n {\n interceptorParams: {\n ignoreLoadingBar: true,\n },\n }\n ),\n ...(initialRef.current\n ? []\n : [\n new Promise((resolve) => setTimeout(resolve, 500)), // Force a minimum delay\n ]),\n ])\n .then(([data]) => {\n initialRef.current = false;\n setHistoryList((prev) => [\n ...(prev ?? []),\n ...(data.conversations as HistoryItem[]),\n ]);\n setNextToken(data.nextToken);\n })\n .catch((error) => {\n // eslint-disable-next-line no-console\n console.error(\"Error loading chat history:\", error);\n setHistoryList([]);\n });\n }, [loadNextToken, username]);\n\n const [actionsVisible, setActionsVisible] = useState<string | null>(null);\n\n const nextRef = useRef<HTMLDivElement | null>(null);\n\n useEffect(() => {\n const next = nextRef.current;\n const root = rootRef.current;\n if (!next || !nextToken || !root || historyCollapsed) {\n return;\n }\n const observer = new IntersectionObserver(\n (entries) => {\n for (const entry of entries) {\n if (entry.isIntersecting) {\n setLoadNextToken(nextToken);\n }\n }\n },\n { root }\n );\n observer.observe(next);\n return () => {\n observer.disconnect();\n };\n }, [nextToken, historyCollapsed]);\n\n const pullIdRef = useRef(0);\n\n const pull = useCallback(async () => {\n try {\n const pullId = ++pullIdRef.current;\n const tempList = await ElevoApi_listElevoConversations(\n { username, limit: 30 },\n {\n interceptorParams: {\n ignoreLoadingBar: true,\n },\n }\n );\n if (pullId !== pullIdRef.current) {\n // Ignore this pull if a newer one has been triggered\n return;\n }\n setHistoryList((prev) => {\n const prevList = prev ?? [];\n const newList = tempList.conversations as HistoryItem[];\n const newIds = new Set(newList.map((item) => item.conversationId));\n const newItemsMap = new Map(\n newList.map((item) => [item.conversationId, item])\n );\n\n let foundIntersection = false;\n let foundChanged = false;\n let isFirst = true;\n for (const item of prevList) {\n const newItem = newItemsMap.get(item.conversationId);\n if (newItem) {\n foundIntersection = true;\n foundChanged =\n (isFirst && newItem !== newList[0]) || !isEqual(newItem, item);\n if (foundChanged) {\n break;\n }\n } else {\n break;\n }\n isFirst = false;\n }\n\n if (!foundIntersection) {\n setNextToken(tempList.nextToken);\n return newList;\n }\n\n if (foundChanged) {\n return [\n ...newList,\n ...prevList.filter((item) => !newIds.has(item.conversationId)),\n ];\n }\n\n return prev;\n });\n } catch (error) {\n // eslint-disable-next-line no-console\n console.error(\"Error pulling chat history:\", error);\n }\n }, [username]);\n\n useImperativeHandle(\n ref,\n () => ({\n pull,\n removeProject: (projectId: string) => {\n setProjects((prev) =>\n prev ? prev.filter((p) => p.instanceId !== projectId) : prev\n );\n },\n addProject: (project: Project) => {\n setProjects((prev) => (prev ? [...prev, project] : [project]));\n },\n moveConversation: (conversationId: string) => {\n setMovedConversations((prev) => [...prev, conversationId]);\n },\n }),\n [pull]\n );\n\n const filteredHistoryList = useMemo(() => {\n if (!historyList || !historyList.length) {\n return historyList;\n }\n return historyList.filter(\n (item) => !movedConversations.includes(item.conversationId)\n );\n }, [historyList, movedConversations]);\n\n return (\n <div className=\"history\" ref={rootRef}>\n <div className={classNames(\"section\", { collapsed: projectsCollapsed })}>\n <div className=\"section-title\">\n <div\n className=\"section-label\"\n onClick={() => setProjectsCollapsed((prev) => !prev)}\n >\n {t(K.PROJECTS)}\n <WrappedIcon lib=\"fa\" icon=\"angle-down\" />\n </div>\n <WrappedIconButton\n icon={ADD_ICON}\n variant=\"mini-light\"\n tooltip={t(K.CREATE_PROJECT)}\n onClick={onAddProject}\n />\n </div>\n <ul className=\"items\">\n {projects ? (\n projects.map((project) => (\n <li key={project.instanceId}>\n <WrappedLink\n className={classNames(\"item\", {\n \"actions-active\": project.instanceId === actionsVisible,\n active: project.instanceId === projectActiveId,\n })}\n onClick={onHistoryClick}\n {...(projectUrlTemplate\n ? { url: parseTemplate(projectUrlTemplate, project) }\n : null)}\n >\n <div className=\"item-title\" title={project.name}>\n {project.name}\n </div>\n <WrappedMiniActions\n className=\"actions\"\n actions={projectActions}\n onActionClick={(e) => {\n onProjectActionClick({ action: e.detail, project });\n }}\n onVisibleChange={(e) => {\n setActionsVisible(e.detail ? project.instanceId : null);\n }}\n />\n </WrappedLink>\n </li>\n ))\n ) : (\n <li className=\"loading\">\n <WrappedIcon\n lib=\"antd\"\n theme=\"outlined\"\n icon=\"loading-3-quarters\"\n spinning\n />\n </li>\n )}\n </ul>\n </div>\n <div className={classNames(\"section\", { collapsed: historyCollapsed })}>\n <div className=\"section-title\">\n <div\n className=\"section-label\"\n onClick={() => setHistoryCollapsed((prev) => !prev)}\n >\n {t(K.HISTORY)}\n <WrappedIcon lib=\"fa\" icon=\"angle-down\" />\n </div>\n </div>\n <ul className=\"items\">\n {filteredHistoryList ? (\n filteredHistoryList.map((item) => (\n <li key={item.conversationId}>\n <WrappedLink\n className={classNames(\"item\", {\n \"actions-active\": item.conversationId === actionsVisible,\n active: item.conversationId === historyActiveId,\n })}\n onClick={onHistoryClick}\n {...(historyUrlTemplate\n ? { url: parseTemplate(historyUrlTemplate, item) }\n : null)}\n >\n <div className=\"item-title\" title={item.title}>\n {item.title}\n </div>\n <WrappedMiniActions\n className=\"actions\"\n actions={mergedHistoryActions}\n onActionClick={(e) => {\n onActionClick({ action: e.detail, item });\n }}\n onVisibleChange={(e) => {\n setActionsVisible(e.detail ? item.conversationId : null);\n }}\n />\n {!DONE_STATES.includes(item.state!) && (\n <div className=\"working\"></div>\n )}\n </WrappedLink>\n </li>\n ))\n ) : (\n <li className=\"loading\">\n <WrappedIcon\n lib=\"antd\"\n theme=\"outlined\"\n icon=\"loading-3-quarters\"\n spinning\n />\n </li>\n )}\n </ul>\n {!historyCollapsed && nextToken && (\n <div className=\"load-more\" ref={nextRef}>\n <WrappedIcon lib=\"antd\" icon=\"loading-3-quarters\" spinning />\n </div>\n )}\n </div>\n </div>\n );\n}\n","// Imports\nimport ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/noSourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `:host{display:block}:host([hidden]){display:none}*{box-sizing:border-box}.sidebar{position:relative;z-index:1;width:261px;height:100%;background:#f6f7f9;border-right:1px solid #e3e5eb;padding:26px 12px 0;display:flex;flex-direction:column;transition:transform 0.3s ease-in-out}.logo-bar{display:flex;align-items:center;justify-content:space-between;margin-bottom:30px;margin-left:4px}.logo-link::part(link){display:block}.logo{vertical-align:middle}.new-chat::part(link){display:flex;gap:0;align-items:center;color:var(--elevo-color-brand);font-size:14px;text-align:left;cursor:pointer}.sidebar .new-chat::part(link){background:#f0f4ff;border-radius:8px;border:1px solid #c9d7ff;padding:9px 13px;font-weight:500;margin-bottom:16px}.sidebar .new-chat::part(link):hover{background:rgba(201,215,255,0.5)}.new-chat-icon{font-size:16px;margin-right:5px}.footer{border-top:1px solid rgba(0,0,0,0.04);padding:9px 12px;margin:0 -12px}.dropdown{display:block}.account{background:none;border:none;border-radius:8px;padding:6px 10px;display:block;width:100%;text-align:left;cursor:pointer}.account:hover{background:rgba(0,0,0,0.04)}.alternative{position:fixed;top:8px;left:8px;padding:6px 10px 6px 8px;display:flex;align-items:center;opacity:0;z-index:1;transition:opacity 0.2s ease-in-out;background:rgba(255,255,255,0);border-radius:8px;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px)}.alternative .new-chat::part(link){padding:4px;margin-left:16px;font-size:12px}.alternative .new-chat::part(link):hover{color:#7891ff}.alternative .new-chat::part(link):active{color:#0911b3}.container{width:261px;height:100%;transition:width 0.3s ease-in-out}.container.collapsed{width:0;overflow:visible}.container.collapsed .sidebar{transform:translateX(-100%)}.container.collapsed .alternative{opacity:1}:host([behavior=\"drawer\"]){z-index:1;width:0}:host(:not([behavior=\"drawer\"])) .alternative .new-chat{display:none}.mask{position:fixed;top:0;right:0;bottom:0;left:0}.links{border-bottom:1px solid rgba(0,0,0,0.06);padding-bottom:16px;margin-bottom:16px}.link{display:block}.link + .link{margin-top:4px}.link::part(link){display:flex;gap:0;align-items:center;padding:7px 10px;border-radius:8px;color:#000}.link::part(link):hover{background:rgba(0,0,0,0.04)}.link .icon{font-size:16px;margin-right:10px}.link .title{flex:1;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.history{flex:1;min-height:0;overflow-y:auto;margin:0 -12px;padding:0 12px}.history ul{list-style:none;margin:0;padding:0}.history .section + .section{margin-top:14px}.history .section-title{display:flex;align-items:center;justify-content:space-between;height:30px;margin-bottom:6px;padding:0 8px}.history .section-label{display:flex;align-items:center;height:24px;padding:0 8px;margin-left:-8px;cursor:pointer;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:500;font-size:12px;color:#8c8c8c;border-radius:8px}.history .section-label eo-icon{vertical-align:middle;margin-left:6px;transition:transform 0.2s ease-in-out}.history .section-label:hover{background:rgba(0,0,0,0.04)}.history .collapsed > ul{display:none}.history .collapsed .section-label eo-icon{transform:rotate(-90deg)}.history .loading{display:flex;align-items:center;justify-content:center;height:36px}.history .group + .group{margin-top:15px}.history .group-title{font-weight:500;font-size:12px;color:#000;padding:8px;height:36px;line-height:20px}.history .item{display:block}.history .item::part(link){display:flex;align-items:center;padding:0 8px;height:36px;border-radius:8px;color:#000}.history .item.active::part(link){background:rgba(0,0,0,0.06)}.history .item.actions-active::part(link),.history .item::part(link):hover{background:rgba(0,0,0,0.04)}.history .item-title{flex:1;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.history .actions{cursor:auto}.history .item:not(:hover):not(.actions-active) .actions{display:none}.history .working{width:8px;height:8px;border-radius:8px;background:var(--elevo-color-brand);margin:0 7px}.history .item.actions-active .working,.history .item:hover .working,.history .item.active .working{display:none}.history .load-more{display:flex;justify-content:center;align-items:center;height:36px}`, \"\"]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___.toString();\n","import { get } from \"lodash\";\n\nexport function parseTemplate(\n template: string | undefined,\n context: Record<string, any>\n) {\n return template?.replace(/{{(.*?)}}/g, (_match: string, key: string) => {\n const value = get(context, key.trim());\n return value;\n });\n}\n","import { i18n } from \"@next-core/i18n\";\n\nexport enum K {\n NEW_CHAT = \"NEW_CHAT\",\n LOGOUT = \"LOGOUT\",\n TODAY = \"TODAY\",\n YESTERDAY = \"YESTERDAY\",\n PREVIOUS_7_DAYS = \"PREVIOUS_7_DAYS\",\n PREVIOUS_30_DAYS = \"PREVIOUS_30_DAYS\",\n SWITCH_LANGUAGE = \"SWITCH_LANGUAGE\",\n PROJECTS = \"PROJECTS\",\n HISTORY = \"HISTORY\",\n CREATE_PROJECT = \"CREATE_PROJECT\",\n MOVE_TO_PROJECT = \"MOVE_TO_PROJECT\",\n}\n\nconst en: Locale = {\n [K.NEW_CHAT]: \"New chat\",\n [K.LOGOUT]: \"Logout\",\n [K.TODAY]: \"Today\",\n [K.YESTERDAY]: \"Yesterday\",\n [K.PREVIOUS_7_DAYS]: \"Previous 7 days\",\n [K.PREVIOUS_30_DAYS]: \"Previous 30 days\",\n [K.SWITCH_LANGUAGE]: \"中文\",\n [K.PROJECTS]: \"Project management\",\n [K.HISTORY]: \"Chat history\",\n [K.CREATE_PROJECT]: \"Create project\",\n [K.MOVE_TO_PROJECT]: \"Move to project\",\n};\n\nconst zh: Locale = {\n [K.NEW_CHAT]: \"新对话\",\n [K.LOGOUT]: \"登出\",\n [K.TODAY]: \"今天\",\n [K.YESTERDAY]: \"昨天\",\n [K.PREVIOUS_7_DAYS]: \"过去7天\",\n [K.PREVIOUS_30_DAYS]: \"过去30天\",\n [K.SWITCH_LANGUAGE]: \"English\",\n [K.PROJECTS]: \"项目管理\",\n [K.HISTORY]: \"历史对话\",\n [K.CREATE_PROJECT]: \"创建项目\",\n [K.MOVE_TO_PROJECT]: \"移动到项目\",\n};\n\nexport const NS = \"bricks/ai-portal/elevo-sidebar\";\n\nexport const locales = { en, zh };\n\nexport const t = i18n.getFixedT(null, NS);\n\ntype Locale = { [k in K]: string } & {\n [k in K as `${k}_plural`]?: string;\n};\n"],"names":["AgentFlowApi_searchTaskForAgentFlow","async","data","options","http","post","LegacyChatHistory","forwardRef","LowLevelChatHistory","_ref","ref","activeId","actions","urlTemplate","onActionClick","onHistoryClick","rootRef","useRef","list","setList","useState","nextToken","setNextToken","loadNextToken","setLoadNextToken","useEffect","Promise","all","next_token","interceptorParams","ignoreLoadingBar","resolve","setTimeout","then","_ref2","prev","catch","error","console","groups","useMemo","groupMap","Map","now","moment","startOfDay","clone","startOf","yesterday","subtract","sevenDaysAgo","thirtyDaysAgo","timestamps","item","groupKey","startTime","t","K","TODAY","YESTERDAY","PREVIOUS_7_DAYS","PREVIOUS_30_DAYS","format","group","get","set","title","items","push","values","actionsVisible","setActionsVisible","nextRef","next","current","root","observer","IntersectionObserver","entries","entry","isIntersecting","observe","disconnect","pullIdRef","pull","useCallback","pullId","tempList","prevList","newList","newIds","Set","map","id","newItemsMap","foundIntersection","foundChanged","isFirst","newItem","isEqual","filter","has","useImperativeHandle","React","className","key","WrappedLink","_extends","classNames","active","onClick","url","parseTemplate","WrappedMiniActions","e","action","detail","onVisibleChange","DONE_STATES","includes","state","WrappedIcon","lib","icon","spinning","theme","wrapBrick","WrappedDropdownActions","WrappedEasyopsAvatar","WrappedIconButton","ElevoApi_listElevoConversations","params","ADD_ICON","ChatHistory","username","historyActiveId","historyActions","historyUrlTemplate","projectActiveId","projectUrlTemplate","projectActions","onProjectActionClick","onAddProject","projects","setProjects","projectsCollapsed","setProjectsCollapsed","historyList","setHistoryList","historyCollapsed","setHistoryCollapsed","initialRef","movedConversations","setMovedConversations","mergedHistoryActions","isDropdown","text","MOVE_TO_PROJECT","disabled","length","project","event","instanceId","name","page","page_size","ElevoApi_getElevoProjects","undefined","token","limit","onlyOwner","onlyRelatedProject","conversations","conversationId","removeProject","projectId","p","addProject","moveConversation","filteredHistoryList","collapsed","PROJECTS","variant","tooltip","CREATE_PROJECT","HISTORY","___CSS_LOADER_EXPORT___","module","toString","template","context","replace","_match","trim","en","NEW_CHAT","LOGOUT","SWITCH_LANGUAGE","zh","NS","locales","i18n","getFixedT"],"sourceRoot":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";(globalThis.webpackChunk_next_bricks_ai_portal=globalThis.webpackChunk_next_bricks_ai_portal||[]).push([[2675],{24:(e,t,i)=>{i.d(t,{A:()=>l});var a=i(36758),n=i.n(a),s=i(40935),r=i.n(s)()(n());r.push([e.id,':host{display:block;white-space:nowrap}.container{border-radius:var(--elevo-border-radius)}:host([hidden]){display:none}*{box-sizing:border-box}.label{font-weight:500;overflow:hidden;text-overflow:ellipsis}.stat{font-weight:600}.chart{min-width:0}.chart > *{display:block}:host(:not([size="small"])) .container{background:linear-gradient(164deg,rgba(105,153,253,0) 40%,rgba(105,153,253,0.05) 60%,rgba(105,153,253,0.32) 100%),#fff;padding:22px}:host(:not([size="small"])) .label{font-size:14px;height:22px;margin-bottom:16px}:host(:not([size="small"])) .stat-and-chart{display:flex;align-items:center;justify-content:end;position:relative}:host(:not([size="small"])) .stat{font-size:36px;color:#1d212a;position:absolute;left:0}:host(:not([size="small"])) .chart{width:calc(100% - 160px)}:host([size="small"]) .container{padding:11px 15px;display:flex;align-items:center;justify-content:end;position:relative;background:var(--elevo-component-background);-webkit-backdrop-filter:var(--elevo-component-backdrop-filter);backdrop-filter:var(--elevo-component-backdrop-filter)}:host([size="small"]) .label-and-stat{position:absolute;left:15px}:host([size="small"]) .label{font-size:12px;color:#8c8c8c;line-height:17px;height:17px;margin-bottom:7px}:host([size="small"]) .stat{font-size:20px;color:#262626;line-height:24px}:host([size="small"]) .chart{width:calc(100% - 90px)}',""]);const l=r.toString()},5135:(e,t,i)=>{var a,n=i(74635),s=i(70918),r=i(26902),l=i(5536),o=i(86121),c=i(70829),h=i(62740),d=i(18769),p=i.n(d),u=i(7921),m=i(11280),b=(i(65168),i(87117)),A=i(80079),g=i(51850),k=i(28548);let E,w,x,v,f,y,T,M,S,R,_,N,D,C,O,I,F,W,U,L,z,V,H,Y,j,B,P,$,G,J,q,K,X,Q,Z,ee,te,ie,ae,ne,se,re,le,oe,ce,he,de,pe,ue,me,be,Ae;(0,b.initializeI18n)(A.NS,A.I);const{defineElement:ge,property:ke,event:Ee,method:we}=(0,u.createDecorators)(),xe=(0,d.forwardRef)(g.A),ve=(0,d.forwardRef)(k.B);let fe;var ye=new WeakMap,Te=new WeakMap,Me=new WeakMap,Se=new WeakMap,Re=new WeakMap,_e=new WeakMap,Ne=new WeakMap,De=new WeakMap,Ce=new WeakMap,Oe=new WeakMap,Ie=new WeakMap,Fe=new WeakMap,We=new WeakMap,Ue=new WeakMap,Le=new WeakMap,ze=new WeakMap,Ve=new WeakSet,He=new WeakMap,Ye=new WeakMap,je=new WeakMap,Be=new WeakMap,Pe=new WeakMap,$e=new WeakMap,Ge=new WeakMap,Je=new WeakMap,qe=new WeakMap,Ke=new WeakMap;class Xe extends m.ReactNextElement{constructor(){super(...arguments),(0,n.A)(this,Ve),(0,s.A)(this,ye,(E(this),x(this))),(0,s.A)(this,Te,(v(this),f(this))),(0,s.A)(this,Me,(y(this),T(this))),(0,s.A)(this,Se,(M(this),S(this))),(0,s.A)(this,Re,(R(this),_(this))),(0,s.A)(this,_e,(N(this),D(this))),(0,s.A)(this,Ne,(C(this),O(this))),(0,s.A)(this,De,(I(this),F(this))),(0,s.A)(this,Ce,(W(this),U(this))),(0,s.A)(this,Oe,(L(this),z(this))),(0,s.A)(this,Ie,(V(this),H(this))),(0,s.A)(this,Fe,(Y(this),j(this))),(0,s.A)(this,We,(B(this),P(this))),(0,s.A)(this,Ue,($(this),G(this))),(0,s.A)(this,Le,(J(this),q(this))),(0,s.A)(this,ze,(K(this),X(this))),(0,s.A)(this,He,(ee(this),()=>{(0,l.A)(Ve,this,Q).emit()})),(0,s.A)(this,Ye,te(this)),(0,s.A)(this,je,(ne(this),()=>{(0,l.A)(Ve,this,ie).emit()})),(0,s.A)(this,Be,se(this)),(0,s.A)(this,Pe,(oe(this),e=>{(0,l.A)(Ve,this,re).emit(e)})),(0,s.A)(this,$e,ce(this)),(0,s.A)(this,Ge,(pe(this),e=>{(0,l.A)(Ve,this,he).emit(e)})),(0,s.A)(this,Je,ue(this)),(0,s.A)(this,qe,(Ae(this),()=>{(0,l.A)(Ve,this,me).emit("chat")})),(0,s.A)(this,Ke,(0,d.createRef)())}get conversationId(){return(0,c.A)(ye,this)}set conversationId(e){(0,o.A)(ye,this,e)}get initialRequest(){return(0,c.A)(Te,this)}set initialRequest(e){(0,o.A)(Te,this,e)}get taskId(){return(0,c.A)(Me,this)}set taskId(e){(0,o.A)(Me,this,e)}get task(){return(0,c.A)(Se,this)}set task(e){(0,o.A)(Se,this,e)}get jobs(){return(0,c.A)(Re,this)}set jobs(e){(0,o.A)(Re,this,e)}get replay(){return(0,c.A)(_e,this)}set replay(e){(0,o.A)(_e,this,e)}get replayDelay(){return(0,c.A)(Ne,this)}set replayDelay(e){(0,o.A)(Ne,this,e)}get supports(){return(0,c.A)(De,this)}set supports(e){(0,o.A)(De,this,e)}get showHiddenJobs(){return(0,c.A)(Ce,this)}set showHiddenJobs(e){(0,o.A)(Ce,this,e)}get showFeedback(){return(0,c.A)(Oe,this)}set showFeedback(e){(0,o.A)(Oe,this,e)}get showFeedbackAfterFailed(){return(0,c.A)(Ie,this)}set showFeedbackAfterFailed(e){(0,o.A)(Ie,this,e)}get showFeedbackOnView(){return(0,c.A)(Fe,this)}set showFeedbackOnView(e){(0,o.A)(Fe,this,e)}get showUiSwitch(){return(0,c.A)(We,this)}set showUiSwitch(e){(0,o.A)(We,this,e)}get hideMermaid(){return(0,c.A)(Ue,this)}set hideMermaid(e){(0,o.A)(Ue,this,e)}get showJsxEditor(){return(0,c.A)(Le,this)}set showJsxEditor(e){(0,o.A)(Le,this,e)}resumed(){var e,t;null===(e=(0,c.A)(Ke,this).current)||void 0===e||null===(t=e.resumed)||void 0===t||t.call(e)}feedbackSubmitDone(){var e;null===(e=(0,c.A)(Ke,this).current)||void 0===e||e.feedbackSubmitDone()}feedbackSubmitFailed(){var e;null===(e=(0,c.A)(Ke,this).current)||void 0===e||e.feedbackSubmitFailed()}feedbackOnViewDone(e){var t;null===(t=(0,c.A)(Ke,this).current)||void 0===t||t.feedbackOnViewDone(e)}render(){const e=this.conversationId?ve:xe;return p().createElement(e,{conversationId:this.conversationId,initialRequest:this.initialRequest,taskId:this.taskId,jobs:this.jobs,task:this.task,replay:this.replay,replayDelay:this.replayDelay,supports:this.supports,showHiddenJobs:this.showHiddenJobs,showFeedback:this.showFeedback,showFeedbackAfterFailed:this.showFeedbackAfterFailed,showUiSwitch:this.showUiSwitch,showFeedbackOnView:this.showFeedbackOnView,showJsxEditor:this.showJsxEditor,onShare:(0,c.A)(He,this),onTerminate:(0,c.A)(je,this),onSubmitFeedback:(0,c.A)(Pe,this),onSwitchToChat:(0,c.A)(qe,this),onFeedbackOnView:(0,c.A)(Ge,this),ref:(0,c.A)(Ke,this)})}}a=Xe,({e:[x,v,f,y,T,M,S,R,_,N,D,C,O,I,F,W,U,L,z,V,H,Y,j,B,P,$,G,J,q,K,X,Q,Z,ee,te,ie,ae,ne,se,re,le,oe,ce,he,de,pe,ue,me,be,Ae,E],c:[fe,w]}=(0,h.A)(a,[ge("ai-portal.cruise-canvas",{shadowOptions:!1})],[[ke(),1,"conversationId"],[ke({attribute:!1,render:!1}),1,"initialRequest"],[ke(),1,"taskId"],[ke({attribute:!1}),1,"task"],[ke({attribute:!1}),1,"jobs"],[ke({type:Boolean,render:!1}),1,"replay"],[ke({type:Number,render:!1}),1,"replayDelay"],[ke({attribute:!1}),1,"supports"],[ke({type:Boolean}),1,"showHiddenJobs"],[ke({type:Boolean}),1,"showFeedback"],[ke({type:Boolean}),1,"showFeedbackAfterFailed"],[ke({type:Boolean}),1,"showFeedbackOnView"],[ke({type:Boolean}),1,"showUiSwitch"],[ke({type:Boolean,render:!1}),1,"hideMermaid"],[ke({type:Boolean}),1,"showJsxEditor"],[Ee({type:"share"}),1,"shareEvent",e=>(0,c.A)(ze,e),(e,t)=>(0,o.A)(ze,e,t)],[Ee({type:"terminate"}),1,"terminateEvent",e=>(0,c.A)(Ye,e),(e,t)=>(0,o.A)(Ye,e,t)],[Ee({type:"feedback.submit"}),1,"feedbackSubmitEvent",e=>(0,c.A)(Be,e),(e,t)=>(0,o.A)(Be,e,t)],[Ee({type:"feedback.on.view"}),1,"feedbackOnViewEvent",e=>(0,c.A)($e,e),(e,t)=>(0,o.A)($e,e,t)],[Ee({type:"ui.switch"}),1,"switch",e=>(0,c.A)(Je,e),(e,t)=>(0,o.A)(Je,e,t)],[we(),2,"resumed"],[we(),2,"feedbackSubmitDone"],[we(),2,"feedbackSubmitFailed"],[we(),2,"feedbackOnViewDone"]],0,(e=>Ke.has((0,r.A)(e))),m.ReactNextElement)),w();var Qe=i(71451);let Ze=function(e){return e.ASK_ANY_THING="ASK_ANYTHING",e.COMMON_TASKS="COMMON_TASKS",e}({});const et="bricks/ai-portal/chat-box",tt={en:{[Ze.ASK_ANY_THING]:"Ask anything",[Ze.COMMON_TASKS]:"Common tasks"},zh:{[Ze.ASK_ANY_THING]:"询问任何问题",[Ze.COMMON_TASKS]:"常用任务"}},it=b.i18n.getFixedT(null,et);var at,nt=i(47008);let st,rt,lt,ot,ct,ht,dt,pt,ut,mt,bt;(0,b.initializeI18n)(et,tt);const At=(0,m.wrapBrick)("eo-icon"),{defineElement:gt,property:kt,event:Et}=(0,u.createDecorators)();let wt;var xt=new WeakMap,vt=new WeakMap,ft=new WeakMap,yt=new WeakMap,Tt=new WeakSet,Mt=new WeakMap;class St extends m.ReactNextElement{constructor(){super(...arguments),(0,n.A)(this,Tt),(0,s.A)(this,xt,rt(this)),(0,s.A)(this,vt,(lt(this),ot(this))),(0,s.A)(this,ft,(ct(this),ht(this))),(0,s.A)(this,yt,(dt(this),pt(this))),(0,s.A)(this,Mt,(bt(this),e=>{(0,l.A)(Tt,this,ut).emit(e)}))}get disabled(){return(0,c.A)(xt,this)}set disabled(e){(0,o.A)(xt,this,e)}get placeholder(){return(0,c.A)(vt,this)}set placeholder(e){(0,o.A)(vt,this,e)}get autoFocus(){return(0,c.A)(ft,this)}set autoFocus(e){(0,o.A)(ft,this,e)}render(){return p().createElement(Rt,{disabled:this.disabled,placeholder:this.placeholder,autoFocus:this.autoFocus,onSubmit:(0,c.A)(Mt,this)})}}function Rt(e){let{disabled:t,placeholder:i,autoFocus:a,onSubmit:n}=e;const s=(0,d.useRef)(null),r=(0,d.useRef)(null),[l,o]=(0,d.useState)(""),c=(0,d.useRef)(""),h=(0,d.useCallback)((e=>{e.currentTarget.value&&(null==n||n(e.currentTarget.value))}),[n]),u=(0,d.useCallback)((e=>{c.current=e.target.value,o(e.target.value)}),[]),m=(0,d.useCallback)((()=>{null==n||n(c.current)}),[n]);return(0,d.useEffect)((()=>{a&&Promise.resolve().then((()=>{var e;null===(e=r.current)||void 0===e||e.focus()}))}),[]),p().createElement("div",{className:"root"},p().createElement("div",{className:"container",ref:s},p().createElement(Qe.e,{containerRef:s,ref:r,value:l,minRows:58/22,paddingSize:60,autoResize:!0,disabled:t,placeholder:null!=i?i:it(Ze.ASK_ANY_THING),submitWhen:"enter-without-shift",onSubmit:h,onChange:u}),p().createElement("button",{className:"btn-send",disabled:!l,onClick:m},p().createElement(At,{lib:"fa",prefix:"fas",icon:"arrow-up"}))))}at=St,({e:[rt,lt,ot,ct,ht,dt,pt,ut,mt,bt],c:[wt,st]}=(0,h.A)(at,[gt("ai-portal.chat-box",{styleTexts:[nt.A]})],[[kt({type:Boolean}),1,"disabled"],[kt(),1,"placeholder"],[kt({type:Boolean}),1,"autoFocus"],[Et({type:"message.submit"}),1,"messageSubmit",e=>(0,c.A)(yt,e),(e,t)=>(0,o.A)(yt,e,t)]],0,(e=>Mt.has((0,r.A)(e))),m.ReactNextElement)),st();var _t,Nt=i(82165);let Dt;const{defineElement:Ct}=(0,u.createDecorators)();let Ot;class It extends m.ReactNextElement{render(){return p().createElement(Ft,null)}}function Ft(){return p().createElement("slot",null)}_t=It,[Ot,Dt]=(0,h.A)(_t,[Ct("ai-portal.home-container",{styleTexts:[Nt.A]})],[],0,void 0,m.ReactNextElement).c,Dt();var Wt=i(21302),Ut=i.n(Wt),Lt=i(53373),zt=i.n(Lt);let Vt=function(e){return e.TODAY="TODAY",e.YESTERDAY="YESTERDAY",e.PREVIOUS_7_DAYS="PREVIOUS_7_DAYS",e.PREVIOUS_30_DAYS="PREVIOUS_30_DAYS",e}({});const Ht="bricks/ai-portal/chat-history",Yt={en:{[Vt.TODAY]:"Today",[Vt.YESTERDAY]:"Yesterday",[Vt.PREVIOUS_7_DAYS]:"Previous 7 days",[Vt.PREVIOUS_30_DAYS]:"Previous 30 days"},zh:{[Vt.TODAY]:"今天",[Vt.YESTERDAY]:"昨天",[Vt.PREVIOUS_7_DAYS]:"过去7天",[Vt.PREVIOUS_30_DAYS]:"过去30天"}},jt=b.i18n.getFixedT(null,Ht);var Bt,Pt=i(21411),$t=i(97907);let Gt,Jt,qt,Kt,Xt,Qt,Zt,ei,ti,ii,ai,ni,si,ri,li;(0,b.initializeI18n)(Ht,Yt);const oi=(0,m.wrapBrick)("eo-icon"),ci=(0,m.wrapBrick)("eo-link"),hi=(0,m.wrapBrick)("eo-mini-actions",{onActionClick:"action.click",onVisibleChange:"visible.change"}),{defineElement:di,property:pi,event:ui}=(0,u.createDecorators)();let mi;var bi=new WeakMap,Ai=new WeakMap,gi=new WeakMap,ki=new WeakMap,Ei=new WeakSet,wi=new WeakMap,xi=new WeakMap,vi=new WeakMap;class fi extends m.ReactNextElement{constructor(){super(...arguments),(0,n.A)(this,Ei),(0,s.A)(this,bi,Jt(this)),(0,s.A)(this,Ai,(qt(this),Kt(this))),(0,s.A)(this,gi,(Xt(this),Qt(this))),(0,s.A)(this,ki,(Zt(this),ei(this))),(0,s.A)(this,wi,(ai(this),e=>{(0,l.A)(Ei,this,ti).emit(e)})),(0,s.A)(this,xi,ni(this)),(0,s.A)(this,vi,(li(this),e=>{(0,l.A)(Ei,this,si).emit({nextToken:e})}))}get list(){return(0,c.A)(bi,this)}set list(e){(0,o.A)(bi,this,e)}get actions(){return(0,c.A)(Ai,this)}set actions(e){(0,o.A)(Ai,this,e)}get nextToken(){return(0,c.A)(gi,this)}set nextToken(e){(0,o.A)(gi,this,e)}render(){return p().createElement(yi,{root:this,list:this.list,actions:this.actions,nextToken:this.nextToken,onActionClick:(0,c.A)(wi,this),onLoadMore:(0,c.A)(vi,this)})}}function yi(e){let{root:t,list:i,actions:a,nextToken:n,onActionClick:s,onLoadMore:r}=e;const l=(0,d.useMemo)((()=>{const e=new Map,t=Ut()(),a=t.clone().startOf("day"),n=a.clone().subtract(1,"day"),s=a.clone().subtract(7,"days"),r=a.clone().subtract(30,"days"),l=+a/1e3,o=+n/1e3,c=+s/1e3,h=+r/1e3,d=+t.clone().startOf("year")/1e3;for(const t of null!=i?i:[]){let i;i=t.startTime>=l?jt(Vt.TODAY):t.startTime>=o?jt(Vt.YESTERDAY):t.startTime>=c?jt(Vt.PREVIOUS_7_DAYS):t.startTime>=h?jt(Vt.PREVIOUS_30_DAYS):t.startTime>=d?Ut()(1e3*t.startTime).format("MMMM"):Ut()(1e3*t.startTime).format("YYYY");let a=e.get(i);a||e.set(i,a={title:i,items:[]}),a.items.push(t)}return[...e.values()]}),[i]),[o,c]=(0,d.useState)(null),h=(0,d.useRef)(null);return(0,d.useEffect)((()=>{const e=h.current;if(!e||!n)return;const i=new IntersectionObserver((e=>{for(const t of e)t.isIntersecting&&r(n)}),{root:t});return i.observe(e),()=>{i.disconnect()}}),[n,r,t]),i?p().createElement(p().Fragment,null,p().createElement("ul",null,l.map((e=>p().createElement("li",{key:e.title,className:"group"},p().createElement("div",{className:"group-title"},e.title),p().createElement("ul",{className:"items"},e.items.map((e=>p().createElement("li",{key:e.id},p().createElement(ci,{className:zt()("item",{active:o===e.id}),url:e.url},p().createElement("div",{className:"item-title",title:e.title},e.title),p().createElement(hi,{className:"actions",actions:a,onActionClick:t=>{s({action:t.detail,item:e})},onVisibleChange:t=>{c(t.detail?e.id:null)}}),!$t.QB.includes(e.state)&&p().createElement("div",{className:"working"})))))))))),n&&p().createElement("div",{className:"load-more",ref:h},p().createElement(oi,{lib:"antd",icon:"loading-3-quarters",spinning:!0}))):p().createElement("div",{className:"loading"},p().createElement(oi,{lib:"antd",theme:"outlined",icon:"loading-3-quarters",spinning:!0}))}Bt=fi,({e:[Jt,qt,Kt,Xt,Qt,Zt,ei,ti,ii,ai,ni,si,ri,li],c:[mi,Gt]}=(0,h.A)(Bt,[di("ai-portal.chat-history",{styleTexts:[Pt.A]})],[[pi({attribute:!1}),1,"list"],[pi({attribute:!1}),1,"actions"],[pi(),1,"nextToken"],[ui({type:"action.click"}),1,"actionClick",e=>(0,c.A)(ki,e),(e,t)=>(0,o.A)(ki,e,t)],[ui({type:"load.more"}),1,"loadMore",e=>(0,c.A)(xi,e),(e,t)=>(0,o.A)(xi,e,t)]],0,(e=>vi.has((0,r.A)(e))),m.ReactNextElement)),Gt();var Ti,Mi=i(89575),Si=i(24);let Ri,_i,Ni,Di,Ci,Oi,Ii,Fi,Wi,Ui,Li,zi,Vi,Hi,Yi,ji,Bi,Pi,$i,Gi,Ji;const qi=(0,m.wrapBrick)("eo-mini-line-chart"),{defineElement:Ki,property:Xi}=(0,u.createDecorators)();let Qi;var Zi=new WeakMap,ea=new WeakMap,ta=new WeakMap,ia=new WeakMap,aa=new WeakMap,na=new WeakMap,sa=new WeakMap,ra=new WeakMap,la=new WeakMap,oa=new WeakMap;class ca extends m.ReactNextElement{constructor(){super(...arguments),(0,s.A)(this,Zi,_i(this)),(0,s.A)(this,ea,(Ni(this),Di(this))),(0,s.A)(this,ta,(Ci(this),Oi(this))),(0,s.A)(this,ia,(Ii(this),Fi(this))),(0,s.A)(this,aa,(Wi(this),Ui(this))),(0,s.A)(this,na,(Li(this),zi(this))),(0,s.A)(this,sa,(Vi(this),Hi(this))),(0,s.A)(this,ra,(Yi(this),ji(this))),(0,s.A)(this,la,(Bi(this),Pi(this))),(0,s.A)(this,oa,($i(this),Gi(this))),Ji(this)}get label(){return(0,c.A)(Zi,this)}set label(e){(0,o.A)(Zi,this,e)}get value(){return(0,c.A)(ea,this)}set value(e){(0,o.A)(ea,this,e)}get size(){return(0,c.A)(ta,this)}set size(e){(0,o.A)(ta,this,e)}get lineColor(){return(0,c.A)(ia,this)}set lineColor(e){(0,o.A)(ia,this,e)}get showArea(){return(0,c.A)(aa,this)}set showArea(e){(0,o.A)(aa,this,e)}get min(){return(0,c.A)(na,this)}set min(e){(0,o.A)(na,this,e)}get max(){return(0,c.A)(sa,this)}set max(e){(0,o.A)(sa,this,e)}get xField(){return(0,c.A)(ra,this)}set xField(e){(0,o.A)(ra,this,e)}get yField(){return(0,c.A)(la,this)}set yField(e){(0,o.A)(la,this,e)}get data(){return(0,c.A)(oa,this)}set data(e){(0,o.A)(oa,this,e)}render(){return p().createElement(ha,{label:this.label,value:this.value,size:this.size,lineColor:this.lineColor,showArea:this.showArea,min:this.min,max:this.max,xField:this.xField,yField:this.yField,data:this.data})}}function ha(e){let{label:t,value:i,size:a,...n}=e;return"small"===a?p().createElement("div",{className:"container"},p().createElement("div",{className:"label-and-stat"},p().createElement("div",{className:"label"},t),p().createElement("div",{className:"stat"},i)),p().createElement("div",{className:"chart"},p().createElement(qi,(0,Mi.A)({},n,{lineWidth:1.5,width:"auto",height:"55"})))):p().createElement("div",{className:"container"},p().createElement("div",{className:"label"},t),p().createElement("div",{className:"stat-and-chart"},p().createElement("div",{className:"chart"},p().createElement(qi,(0,Mi.A)({},n,{lineWidth:2,width:"auto",height:"92"}))),p().createElement("div",{className:"stat"},i)))}Ti=ca,({e:[_i,Ni,Di,Ci,Oi,Ii,Fi,Wi,Ui,Li,zi,Vi,Hi,Yi,ji,Bi,Pi,$i,Gi,Ji],c:[Qi,Ri]}=(0,h.A)(Ti,[Ki("ai-portal.stat-with-mini-chart",{styleTexts:[Si.A]})],[[Xi(),1,"label"],[Xi(),1,"value"],[Xi(),1,"size"],[Xi(),1,"lineColor"],[Xi({type:Boolean}),1,"showArea"],[Xi({type:Number}),1,"min"],[Xi({type:Number}),1,"max"],[Xi(),1,"xField"],[Xi(),1,"yField"],[Xi({attribute:!1}),1,"data"]],0,void 0,m.ReactNextElement)),Ri();var da,pa=i(17099),ua=i(31653);let ma;const{defineElement:ba}=(0,u.createDecorators)();let Aa;class ga extends m.ReactNextElement{render(){return p().createElement(ka,null)}}function ka(){return p().createElement("img",{src:pa,alt:"Elevo",width:95,height:28})}da=ga,[Aa,ma]=(0,h.A)(da,[ba("ai-portal.elevo-logo",{styleTexts:[ua.A]})],[],0,void 0,m.ReactNextElement).c,ma();var Ea,wa=i(29475),xa=i(99671),va=i(61408),fa=i(42965),ya=i(45646),Ta=i(26785);let Ma,Sa,Ra,_a,Na,Da,Ca,Oa,Ia,Fa,Wa,Ua,La,za,Va,Ha,Ya,ja,Ba,Pa,$a,Ga,Ja,qa,Ka,Xa,Qa,Za,en,tn,an,nn,sn,rn,ln,on,cn,hn,dn,pn,un,mn,bn,An,gn,kn;(0,b.initializeI18n)(xa.NS,xa.I);const En={lib:"easyops",icon:"sidebar"},{defineElement:wn,property:xn,event:vn,method:fn}=(0,u.createDecorators)(),yn=(0,d.forwardRef)(Qn);let Tn;var Mn=new WeakMap,Sn=new WeakMap,Rn=new WeakMap,_n=new WeakMap,Nn=new WeakMap,Dn=new WeakMap,Cn=new WeakMap,On=new WeakMap,In=new WeakMap,Fn=new WeakMap,Wn=new WeakMap,Un=new WeakMap,Ln=new WeakMap,zn=new WeakMap,Vn=new WeakMap,Hn=new WeakSet,Yn=new WeakMap,jn=new WeakMap,Bn=new WeakMap,Pn=new WeakMap,$n=new WeakMap,Gn=new WeakMap,Jn=new WeakMap,qn=new WeakMap,Kn=new WeakMap;class Xn extends m.ReactNextElement{constructor(){super(...arguments),(0,n.A)(this,Hn),(0,s.A)(this,Mn,(Ma(this),Ra(this,!0))),(0,s.A)(this,Sn,(_a(this),Na(this))),(0,s.A)(this,Rn,(Da(this),Ca(this))),(0,s.A)(this,_n,(Oa(this),Ia(this))),(0,s.A)(this,Nn,(Fa(this),Wa(this))),(0,s.A)(this,Dn,(Ua(this),La(this))),(0,s.A)(this,Cn,(za(this),Va(this))),(0,s.A)(this,On,(Ha(this),Ya(this))),(0,s.A)(this,In,(ja(this),Ba(this))),(0,s.A)(this,Fn,(Pa(this),$a(this))),(0,s.A)(this,Wn,(Ga(this),Ja(this))),(0,s.A)(this,Un,(qa(this),Ka(this))),(0,s.A)(this,Ln,(Xa(this),Qa(this))),(0,s.A)(this,zn,(Za(this),en(this))),(0,s.A)(this,Vn,(tn(this),an(this))),(0,s.A)(this,Yn,(rn(this),()=>{(0,l.A)(Hn,this,nn).emit()})),(0,s.A)(this,jn,ln(this)),(0,s.A)(this,Bn,(hn(this),e=>{(0,l.A)(Hn,this,on).emit(e)})),(0,s.A)(this,Pn,(e=>{(0,l.A)(Hn,this,on).emit(e)})),(0,s.A)(this,$n,dn(this)),(0,s.A)(this,Gn,(mn(this),e=>{(0,l.A)(Hn,this,pn).emit(e)})),(0,s.A)(this,Jn,bn(this)),(0,s.A)(this,qn,(kn(this),()=>{(0,l.A)(Hn,this,An).emit()})),(0,s.A)(this,Kn,(0,d.createRef)())}get legacy(){return(0,c.A)(Mn,this)}set legacy(e){(0,o.A)(Mn,this,e)}get username(){return(0,c.A)(Sn,this)}set username(e){(0,o.A)(Sn,this,e)}get userInstanceId(){return(0,c.A)(Rn,this)}set userInstanceId(e){(0,o.A)(Rn,this,e)}get behavior(){return(0,c.A)(_n,this)}set behavior(e){(0,o.A)(_n,this,e)}get logoUrl(){return(0,c.A)(Nn,this)}set logoUrl(e){(0,o.A)(Nn,this,e)}get newChatUrl(){return(0,c.A)(Dn,this)}set newChatUrl(e){(0,o.A)(Dn,this,e)}get newChatLinkWhenCollapsed(){return(0,c.A)(Cn,this)}set newChatLinkWhenCollapsed(e){(0,o.A)(Cn,this,e)}get historyActiveId(){return(0,c.A)(On,this)}set historyActiveId(e){(0,o.A)(On,this,e)}get historyUrlTemplate(){return(0,c.A)(In,this)}set historyUrlTemplate(e){(0,o.A)(In,this,e)}get historyActions(){return(0,c.A)(Fn,this)}set historyActions(e){(0,o.A)(Fn,this,e)}get projectActiveId(){return(0,c.A)(Wn,this)}set projectActiveId(e){(0,o.A)(Wn,this,e)}get projectUrlTemplate(){return(0,c.A)(Un,this)}set projectUrlTemplate(e){(0,o.A)(Un,this,e)}get projectActions(){return(0,c.A)(Ln,this)}set projectActions(e){(0,o.A)(Ln,this,e)}get links(){return(0,c.A)(zn,this)}set links(e){(0,o.A)(zn,this,e)}pullHistory(e){setTimeout((()=>{var e;null===(e=(0,c.A)(Kn,this).current)||void 0===e||e.pull()}),e)}close(){var e;null===(e=(0,c.A)(Kn,this).current)||void 0===e||e.close()}removeProject(e){var t,i;null===(t=(0,c.A)(Kn,this).current)||void 0===t||null===(i=t.removeProject)||void 0===i||i.call(t,e)}addProject(e){var t,i;null===(t=(0,c.A)(Kn,this).current)||void 0===t||null===(i=t.addProject)||void 0===i||i.call(t,e)}moveConversation(e){var t,i;null===(t=(0,c.A)(Kn,this).current)||void 0===t||null===(i=t.moveConversation)||void 0===i||i.call(t,e)}render(){return p().createElement(yn,{ref:(0,c.A)(Kn,this),legacy:this.legacy,username:this.username,userInstanceId:this.userInstanceId,behavior:this.behavior,logoUrl:this.logoUrl,newChatUrl:this.newChatUrl,newChatLinkWhenCollapsed:this.newChatLinkWhenCollapsed,historyActiveId:this.historyActiveId,historyUrlTemplate:this.historyUrlTemplate,historyActions:this.historyActions,projectActiveId:this.projectActiveId,projectUrlTemplate:this.projectUrlTemplate,projectActions:this.projectActions,links:this.links,onLogout:(0,c.A)(Yn,this),onLegacyActionClick:(0,c.A)(Pn,this),onActionClick:(0,c.A)(Bn,this),onProjectActionClick:(0,c.A)(Gn,this),onAddProject:(0,c.A)(qn,this)})}}function Qn(e,t){let{legacy:i,username:a,userInstanceId:n,behavior:s,logoUrl:r,newChatUrl:l,newChatLinkWhenCollapsed:o,historyActiveId:c,historyUrlTemplate:h,historyActions:u,projectActiveId:m,projectUrlTemplate:A,projectActions:g,links:k,onLogout:E,onActionClick:w,onLegacyActionClick:x,onProjectActionClick:v,onAddProject:f}=e;const[y,T]=(0,d.useState)("drawer"===s),M=(0,d.useCallback)((()=>{T(!0)}),[]),S=(0,d.useCallback)((()=>{T(!1)}),[]);(0,d.useEffect)((()=>{"drawer"===s&&T(!0)}),[s]);const R=(0,d.useCallback)((()=>{T(!0)}),[]),_=(0,d.useCallback)((()=>{"drawer"===s&&T(!0)}),[s]),N=(0,d.useMemo)((()=>[{key:"logout",icon:{lib:"fa",prefix:"fas",icon:"arrow-right-from-bracket"},text:(0,xa.t)(xa.K.LOGOUT)},{key:"switch-language",icon:{lib:"easyops",icon:"language"},text:(0,xa.t)(xa.K.SWITCH_LANGUAGE)}]),[]),D=(0,d.useRef)(null);return(0,d.useImperativeHandle)(t,(()=>({close:()=>{T(!0)},pull:()=>{var e;null===(e=D.current)||void 0===e||e.pull()},removeProject:e=>{var t,i;null===(t=D.current)||void 0===t||null===(i=t.removeProject)||void 0===i||i.call(t,e)},addProject:e=>{var t,i;null===(t=D.current)||void 0===t||null===(i=t.addProject)||void 0===i||i.call(t,e)},moveConversation:e=>{var t,i;null===(t=D.current)||void 0===t||null===(i=t.moveConversation)||void 0===i||i.call(t,e)}})),[]),p().createElement("div",{className:zt()("container",{collapsed:y})},"drawer"===s&&!y&&p().createElement("div",{className:"mask",onClick:R}),p().createElement("div",{className:"alternative"},p().createElement(fa.Py,{icon:En,variant:"light",onClick:S}),o&&p().createElement(fa.EM,{className:"new-chat",url:l},p().createElement(fa.Bj,{className:"new-chat-icon",lib:"easyops",icon:"new-chat"}),(0,xa.t)(xa.K.NEW_CHAT))),p().createElement("div",{className:"sidebar"},p().createElement("div",{className:"logo-bar"},p().createElement(fa.EM,{url:r,className:"logo-link"},p().createElement("img",{className:"logo",alt:"Elevo",src:pa,width:95,height:28})),p().createElement(fa.Py,{icon:En,variant:"light",onClick:M})),p().createElement(fa.EM,{className:"new-chat",url:l},p().createElement(fa.Bj,{className:"new-chat-icon",lib:"easyops",icon:"new-chat"}),(0,xa.t)(xa.K.NEW_CHAT)),null!=k&&k.length?p().createElement("div",{className:"links"},k.map(((e,t)=>p().createElement(fa.EM,{className:"link",key:t,url:e.url},p().createElement(fa.Bj,(0,Mi.A)({className:"icon"},e.icon)),p().createElement("span",{className:"title"},e.title))))):null,i?p().createElement(Ta.Y,{ref:D,activeId:c,urlTemplate:h,actions:u,onActionClick:x,onHistoryClick:_}):p().createElement(ya.D,{ref:D,username:a,historyActiveId:c,historyUrlTemplate:h,historyActions:u,projectActiveId:m,projectUrlTemplate:A,projectActions:g,onActionClick:w,onHistoryClick:_,onProjectActionClick:v,onAddProject:f}),p().createElement("div",{className:"footer"},p().createElement(fa.qb,{className:"dropdown",actions:N,onActionClick:async e=>{"logout"===e.detail.key?E():(await b.i18n.changeLanguage(b.i18n.language&&"en"===b.i18n.language.split("-")[0]?"zh":"en"),(0,wa.getHistory)().reload())}},p().createElement("button",{className:"account"},p().createElement(fa.JQ,{nameOrInstanceId:n,showName:!0,size:"xs"}))))))}Ea=Xn,({e:[Ra,_a,Na,Da,Ca,Oa,Ia,Fa,Wa,Ua,La,za,Va,Ha,Ya,ja,Ba,Pa,$a,Ga,Ja,qa,Ka,Xa,Qa,Za,en,tn,an,nn,sn,rn,ln,on,cn,hn,dn,pn,un,mn,bn,An,gn,kn,Ma],c:[Tn,Sa]}=(0,h.A)(Ea,[wn("ai-portal.elevo-sidebar",{styleTexts:[va.A]})],[[xn({type:Boolean}),1,"legacy"],[xn(),1,"username"],[xn(),1,"userInstanceId"],[xn(),1,"behavior"],[xn(),1,"logoUrl"],[xn(),1,"newChatUrl"],[xn({type:Boolean}),1,"newChatLinkWhenCollapsed"],[xn(),1,"historyActiveId"],[xn(),1,"historyUrlTemplate"],[xn({attribute:!1}),1,"historyActions"],[xn(),1,"projectActiveId"],[xn(),1,"projectUrlTemplate"],[xn({attribute:!1}),1,"projectActions"],[xn({attribute:!1}),1,"links"],[vn({type:"logout"}),1,"logout",e=>(0,c.A)(Vn,e),(e,t)=>(0,o.A)(Vn,e,t)],[vn({type:"action.click"}),1,"actionClick",e=>(0,c.A)(jn,e),(e,t)=>(0,o.A)(jn,e,t)],[vn({type:"project.action.click"}),1,"projectActionClick",e=>(0,c.A)($n,e),(e,t)=>(0,o.A)($n,e,t)],[vn({type:"add.project"}),1,"addProject",e=>(0,c.A)(Jn,e),(e,t)=>(0,o.A)(Jn,e,t)],[fn(),2,"pullHistory"],[fn(),2,"close"],[fn(),2,"removeProject"],[fn(),2,"addProject"],[fn(),2,"moveConversation"]],0,(e=>Kn.has((0,r.A)(e))),m.ReactNextElement)),Sa();var Zn,es=i(47338);let ts,is,as,ns,ss,rs,ls,os,cs;const hs=(0,m.wrapBrick)("eo-icon"),ds=(0,m.wrapBrick)("eo-tooltip"),{defineElement:ps,property:us}=(0,u.createDecorators)();let ms;var bs=new WeakMap,As=new WeakMap,gs=new WeakMap,ks=new WeakMap;class Es extends m.ReactNextElement{constructor(){super(...arguments),(0,s.A)(this,bs,is(this)),(0,s.A)(this,As,(as(this),ns(this))),(0,s.A)(this,gs,(ss(this),rs(this))),(0,s.A)(this,ks,(ls(this),os(this))),cs(this)}get icon(){return(0,c.A)(bs,this)}set icon(e){(0,o.A)(bs,this,e)}get tooltip(){return(0,c.A)(As,this)}set tooltip(e){(0,o.A)(As,this,e)}get disabled(){return(0,c.A)(gs,this)}set disabled(e){(0,o.A)(gs,this,e)}get variant(){return(0,c.A)(ks,this)}set variant(e){(0,o.A)(ks,this,e)}render(){return p().createElement(ws,{icon:this.icon,tooltip:this.tooltip,disabled:this.disabled})}}function ws(e){let{icon:t,tooltip:i,disabled:a}=e;const n=p().createElement("button",{disabled:a},p().createElement(hs,t));return i?p().createElement(ds,{content:i},n):n}Zn=Es,({e:[is,as,ns,ss,rs,ls,os,cs],c:[ms,ts]}=(0,h.A)(Zn,[ps("ai-portal.icon-button",{styleTexts:[es.A]})],[[us({attribute:!1}),1,"icon"],[us(),1,"tooltip"],[us({type:Boolean}),1,"disabled"],[us({render:!1}),1,"variant"]],0,void 0,m.ReactNextElement)),ts();let xs=function(e){return e.ALL="ALL",e.EXPLORE_EXCELLENT_CASES="EXPLORE_EXCELLENT_CASES",e}({});const vs="bricks/ai-portal/show-cases",fs={en:{[xs.ALL]:"All",[xs.EXPLORE_EXCELLENT_CASES]:"Explore excellent cases"},zh:{[xs.ALL]:"全部",[xs.EXPLORE_EXCELLENT_CASES]:"探索优秀案例"}},ys=b.i18n.getFixedT(null,vs);var Ts=i(42873),Ms=i(98343);const Ss=i.p+"images/c2e27e10.png";var Rs;let _s,Ns,Ds,Cs,Os;(0,b.initializeI18n)(vs,fs);const Is=(0,m.wrapBrick)("eo-link"),Fs=(0,m.wrapBrick)("ai-portal.tab-list",{onTabClick:"tab.click"}),{defineElement:Ws,property:Us}=(0,u.createDecorators)();let Ls;var zs=new WeakMap,Vs=new WeakMap;class Hs extends m.ReactNextElement{constructor(){super(...arguments),(0,s.A)(this,zs,Ns(this)),(0,s.A)(this,Vs,(Ds(this),Cs(this))),Os(this)}get list(){return(0,c.A)(zs,this)}set list(e){(0,o.A)(zs,this,e)}get taskUrlTemplate(){return(0,c.A)(Vs,this)}set taskUrlTemplate(e){(0,o.A)(Vs,this,e)}render(){return p().createElement(Ys,{list:this.list,taskUrlTemplate:this.taskUrlTemplate})}}function Ys(e){let{list:t,taskUrlTemplate:i}=e;const a=(0,d.useMemo)((()=>["",...new Set(null==t?void 0:t.map((e=>e.scenario)).filter(Boolean))]),[t]),[n,s]=(0,d.useState)(""),r=(0,d.useMemo)((()=>n?null==t?void 0:t.filter((e=>e.scenario===n)):t),[n,t]),l=(0,d.useMemo)((()=>a.map((e=>({id:e,label:""===e?ys(xs.ALL):e})))),[a]);return null!=t&&t.length?p().createElement(p().Fragment,null,p().createElement("div",{className:"tips"},`${ys(xs.EXPLORE_EXCELLENT_CASES)} ↓`),p().createElement(Fs,{tabs:l,activeTab:n,onTabClick:e=>s(e.detail.id)}),p().createElement("ul",{className:"cases"},null==r?void 0:r.map((e=>p().createElement("li",{key:e.taskId,className:"item"},p().createElement(Is,{className:"link",url:(0,Ms.Q)(i,e)},p().createElement("span",{className:"thumbnail",style:{backgroundImage:[...e.thumbUrl?[`url(${(0,wa.getBasePath)()}${e.thumbUrl})`]:[],`url(${Ss})`].join(", ")}},!e.thumbUrl&&p().createElement(p().Fragment,null,p().createElement("span",{className:"quote"}),p().createElement("span",{className:"text"},e.summary))),p().createElement("span",{className:"title"},p().createElement("span",null,e.title)))))))):null}Rs=Hs,({e:[Ns,Ds,Cs,Os],c:[Ls,_s]}=(0,h.A)(Rs,[Ws("ai-portal.show-cases",{styleTexts:[Ts.A]})],[[Us({attribute:!1}),1,"list"],[Us(),1,"taskUrlTemplate"]],0,void 0,m.ReactNextElement)),_s();let js=function(e){return e.MCP_HUB="MCP_HUB",e.ALL="ALL",e.SERVER_cmdb="SERVER_cmdb",e.SERVER_cmdb_product_helper="SERVER_cmdb_product_helper",e.SERVER_alert="SERVER_alert",e.SERVER_web_builder="SERVER_web_builder",e.SERVER_web_builder2="SERVER_web_builder2",e.SERVER_host_troubleshooting="SERVER_host_troubleshooting",e.SERVER_system_inspection="SERVER_system_inspection",e.SERVER_grafana="SERVER_grafana",e.SERVER_kubernetes="SERVER_kubernetes",e.SERVER_llm="SERVER_llm",e}({});const Bs="bricks/ai-portal/mcp-tools",Ps={en:{[js.MCP_HUB]:"MCP Hub",[js.ALL]:"All",[js.SERVER_cmdb]:"CMDB",[js.SERVER_cmdb_product_helper]:"CMDB",[js.SERVER_alert]:"Alert",[js.SERVER_web_builder]:"View",[js.SERVER_web_builder2]:"View",[js.SERVER_host_troubleshooting]:"Host Troubleshooting",[js.SERVER_system_inspection]:"System Inspection",[js.SERVER_grafana]:"Grafana",[js.SERVER_kubernetes]:"Kubernetes",[js.SERVER_llm]:"LLM"},zh:{[js.MCP_HUB]:"MCP 中心",[js.ALL]:"全部",[js.SERVER_cmdb]:"CMDB",[js.SERVER_cmdb_product_helper]:"CMDB",[js.SERVER_alert]:"告警",[js.SERVER_web_builder]:"视图",[js.SERVER_web_builder2]:"视图",[js.SERVER_host_troubleshooting]:"主机故障排查",[js.SERVER_system_inspection]:"系统巡检",[js.SERVER_grafana]:"Grafana",[js.SERVER_kubernetes]:"Kubernetes",[js.SERVER_llm]:"大模型"}},$s=b.i18n.getFixedT(null,Bs);var Gs,Js=i(31748);let qs,Ks,Xs,Qs,Zs;(0,b.initializeI18n)(Bs,Ps);const er={lib:"antd",icon:"tool"},tr=new Map([["EasyOps平台",{servers:["cmdb","cmdb_product_helper"]}],["Grafana",{servers:["grafana"]}],["Kubernetes",{servers:["kubernetes"]}],["监控事件",{servers:["alert"]}],["浏览器",{servers:["playwright"]}],["低代码",{servers:["web-builder","web-builder2"]}],["大模型",{servers:["llm"]}],["故障排查",{servers:["host-troubleshooting"]}]]),ir=(0,m.wrapBrick)("eo-icon"),ar=(0,m.wrapBrick)("ai-portal.tab-list",{onTabClick:"tab.click"}),{defineElement:nr,property:sr}=(0,u.createDecorators)();let rr;var lr=new WeakMap,or=new WeakMap;class cr extends m.ReactNextElement{constructor(){super(...arguments),(0,s.A)(this,lr,Ks(this)),(0,s.A)(this,or,(Xs(this),Qs(this,!0))),Zs(this)}get list(){return(0,c.A)(lr,this)}set list(e){(0,o.A)(lr,this,e)}get withContainer(){return(0,c.A)(or,this)}set withContainer(e){(0,o.A)(or,this,e)}render(){return p().createElement(hr,{list:this.list,withContainer:this.withContainer})}}function hr(e){let{list:t,withContainer:i}=e;const[a,n]=(0,d.useMemo)((()=>{const e=new Map,i=new Map;null==t||t.forEach((t=>{const a=$s(`SERVER_${t.server.id.replaceAll("-","_")}`,t.server.name);let n=e.get(a);n||e.set(a,n=[]),n.push(t);const s=[...tr.entries()].find((e=>{let[i,{servers:a}]=e;return a.includes(t.server.id)})),r=s?s[0]:"其他";let l=i.get(r);l||i.set(r,l=[]),l.push(a)}));const a=["CMDB"];return[new Map([...e.entries()].sort(((e,t)=>{let[i]=e,[n]=t;const s=a.indexOf(i),r=a.indexOf(n);return(s<0?a.length:s)-(r<0?a.length:r)}))),i]}),[t]),s=(0,d.useMemo)((()=>{const e=[...tr.keys()],t=[...n.keys()];return t.sort(((t,i)=>{const a=e.indexOf(t),n=e.indexOf(i);return(a<0?e.length:a)-(n<0?e.length:n)})),["",...t]}),[n]),[r,l]=(0,d.useState)(""),o=(0,d.useMemo)((()=>{const e=[...a];if(!r)return e;const t=n.get(r);return e.filter((e=>{let[i]=e;return null==t?void 0:t.includes(i)}))}),[r,a,n]),c=(0,d.useMemo)((()=>s.map((e=>({id:e,label:""===e?$s(js.ALL):e})))),[s]),h=p().createElement(p().Fragment,null,p().createElement(ar,{tabs:c,activeTab:r,onTabClick:e=>l(e.detail.id)}),p().createElement("ul",{className:"groups"},null==o?void 0:o.map((e=>{let[t,i]=e;return p().createElement("li",{key:t,className:"group"},p().createElement("h2",null,t),p().createElement("ul",{className:"list"},i.map(((e,t)=>{var i;return p().createElement("li",{key:t,className:"item"},p().createElement("div",{className:"heading"},p().createElement(ir,(0,Mi.A)({className:"icon"},null!==(i=e.icon)&&void 0!==i?i:er,{fallback:er})),p().createElement("div",{className:"title"},e.title)),p().createElement("div",{className:"description"},e.description))}))))}))));return i?p().createElement("div",{className:"container"},p().createElement("h1",null,$s(js.MCP_HUB)),h):h}Gs=cr,({e:[Ks,Xs,Qs,Zs],c:[rr,qs]}=(0,h.A)(Gs,[nr("ai-portal.mcp-tools",{styleTexts:[Js.A]})],[[sr({attribute:!1}),1,"list"],[sr({type:Boolean}),1,"withContainer"]],0,void 0,m.ReactNextElement)),qs();var dr,pr=i(99126),ur=i(92914),mr=i(7863),br=i(80413),Ar=i(22025),gr=i(44394),kr=i(13183),Er=i(30578),wr=i(31918),xr=i(92449),vr=i(85011),fr=i(65023),yr=i(17911),Tr=i(95491),Mr=i(11303);let Sr,Rr,_r,Nr,Dr,Cr,Or,Ir,Fr,Wr,Ur,Lr,zr,Vr,Hr,Yr,jr,Br,Pr,$r,Gr,Jr,qr,Kr,Xr,Qr,Zr,el,tl,il,al,nl,sl,rl,ll,ol,cl,hl,dl,pl;(0,b.initializeI18n)(ur.NS,ur.I);const ul={lib:"easyops",icon:"share"},{defineElement:ml,property:bl,event:Al,method:gl}=(0,u.createDecorators)(),kl=(0,d.forwardRef)(Yl);let El;var wl=new WeakMap,xl=new WeakMap,vl=new WeakMap,fl=new WeakMap,yl=new WeakMap,Tl=new WeakMap,Ml=new WeakMap,Sl=new WeakMap,Rl=new WeakMap,_l=new WeakMap,Nl=new WeakSet,Dl=new WeakMap,Cl=new WeakMap,Ol=new WeakMap,Il=new WeakMap,Fl=new WeakMap,Wl=new WeakMap,Ul=new WeakMap,Ll=new WeakMap,zl=new WeakMap,Vl=new WeakMap;class Hl extends m.ReactNextElement{constructor(){super(...arguments),(0,n.A)(this,Nl),(0,s.A)(this,wl,(Sr(this),_r(this))),(0,s.A)(this,xl,(Nr(this),Dr(this))),(0,s.A)(this,vl,(Cr(this),Or(this))),(0,s.A)(this,fl,(Ir(this),Fr(this))),(0,s.A)(this,yl,(Wr(this),Ur(this))),(0,s.A)(this,Tl,(Lr(this),zr(this))),(0,s.A)(this,Ml,(Vr(this),Hr(this))),(0,s.A)(this,Sl,(Yr(this),jr(this))),(0,s.A)(this,Rl,(Br(this),Pr(this))),(0,s.A)(this,_l,($r(this),Gr(this))),(0,s.A)(this,Dl,(Kr(this),()=>{(0,l.A)(Nl,this,Jr).emit()})),(0,s.A)(this,Cl,Xr(this)),(0,s.A)(this,Ol,(el(this),()=>{(0,l.A)(Nl,this,Qr).emit()})),(0,s.A)(this,Il,tl(this)),(0,s.A)(this,Fl,(nl(this),e=>{(0,l.A)(Nl,this,il).emit(e)})),(0,s.A)(this,Wl,sl(this)),(0,s.A)(this,Ul,(ol(this),e=>{(0,l.A)(Nl,this,rl).emit(e)})),(0,s.A)(this,Ll,cl(this)),(0,s.A)(this,zl,(pl(this),()=>{(0,l.A)(Nl,this,hl).emit("canvas")})),(0,s.A)(this,Vl,(0,d.createRef)())}get taskId(){return(0,c.A)(wl,this)}set taskId(e){(0,o.A)(wl,this,e)}get replay(){return(0,c.A)(xl,this)}set replay(e){(0,o.A)(xl,this,e)}get replayDelay(){return(0,c.A)(vl,this)}set replayDelay(e){(0,o.A)(vl,this,e)}get supports(){return(0,c.A)(fl,this)}set supports(e){(0,o.A)(fl,this,e)}get showFeedback(){return(0,c.A)(yl,this)}set showFeedback(e){(0,o.A)(yl,this,e)}get showFeedbackAfterFailed(){return(0,c.A)(Tl,this)}set showFeedbackAfterFailed(e){(0,o.A)(Tl,this,e)}get showFeedbackOnView(){return(0,c.A)(Ml,this)}set showFeedbackOnView(e){(0,o.A)(Ml,this,e)}get showUiSwitch(){return(0,c.A)(Sl,this)}set showUiSwitch(e){(0,o.A)(Sl,this,e)}get hideMermaid(){return(0,c.A)(Rl,this)}set hideMermaid(e){(0,o.A)(Rl,this,e)}resumed(){var e;null===(e=(0,c.A)(Vl,this).current)||void 0===e||e.resumed()}feedbackSubmitDone(){var e;null===(e=(0,c.A)(Vl,this).current)||void 0===e||e.feedbackSubmitDone()}feedbackSubmitFailed(){var e;null===(e=(0,c.A)(Vl,this).current)||void 0===e||e.feedbackSubmitFailed()}feedbackOnViewDone(e){var t;null===(t=(0,c.A)(Vl,this).current)||void 0===t||t.feedbackOnViewDone(e)}render(){return p().createElement(kl,{taskId:this.taskId,replay:this.replay,replayDelay:this.replayDelay,supports:this.supports,showFeedback:this.showFeedback,showFeedbackAfterFailed:this.showFeedbackAfterFailed,showFeedbackOnView:this.showFeedbackOnView,showUiSwitch:this.showUiSwitch,onShare:(0,c.A)(Dl,this),onTerminate:(0,c.A)(Ol,this),onSubmitFeedback:(0,c.A)(Fl,this),onSwitchToCanvas:(0,c.A)(zl,this),onFeedbackOnView:(0,c.A)(Ul,this)})}}function Yl(e,t){var i;let{taskId:a,replay:n,replayDelay:s,supports:r,showFeedback:l,showFeedbackAfterFailed:o,showFeedbackOnView:c,showUiSwitch:h,onShare:u,onTerminate:m,onSubmitFeedback:b,onSwitchToCanvas:A,onFeedbackOnView:g}=e;const{task:k,jobs:E,error:w,humanInputRef:x,resumedRef:v,skipToResults:f,watchAgain:y}=(0,mr.S)(a,n,s),T=null!==(i=null==k?void 0:k.title)&&void 0!==i?i:"",M=null==k?void 0:k.state,S=$t.QB.includes(M),{messages:R,inputRequiredJobId:_,lastToolCallJobId:N}=(0,br.e)(k,E),D=(0,d.useMemo)((()=>null==E?void 0:E.flatMap((e=>e.generatedView?{id:e.id,view:e.generatedView}:[]))),[E]),[C,O]=(0,d.useState)(!1),[I,F]=(0,d.useState)(!1),[W,U]=(0,d.useState)(!!l);(0,d.useEffect)((()=>{U(!!l)}),[l]);const[L,z]=(0,d.useState)(),V=(0,d.useCallback)((e=>{O(!0),b(e)}),[b]);(0,d.useImperativeHandle)(t,(()=>({resumed:()=>{var e;return null===(e=v.current)||void 0===e?void 0:e.call(v)},feedbackSubmitDone:()=>{F(!0),setTimeout((()=>{U(!1)}),3e3)},feedbackSubmitFailed:()=>{O(!1)},feedbackOnViewDone:e=>{z((t=>{const i=new Set(t);return i.add(e),i}))}})),[v]);const[H,Y]=(0,d.useState)(null),[j,B]=(0,d.useState)(null),[P,$]=(0,d.useState)(!1),G=(0,d.useRef)(!1),J=!!k;(0,d.useEffect)((()=>{if(J){const e=setTimeout((()=>{G.current=!0}),1e3);return()=>{clearTimeout(e)}}}),[J]),(0,d.useEffect)((()=>{G.current&&N&&!P&&B(N)}),[N,P]),(0,d.useEffect)((()=>{(0,wa.getRuntime)().applyPageTitle(T)}),[T]),(0,d.useEffect)((()=>{w&&(0,wa.handleHttpError)(w)}),[w]);const q=(0,d.useCallback)(((e,t)=>{var i;null===(i=x.current)||void 0===i||i.call(x,e,t)}),[x]),K=(0,d.useMemo)((()=>({humanInput:q,onShare:u,onTerminate:m,supports:r,activeExpandedViewJobId:H,setActiveExpandedViewJobId:Y,activeToolCallJobId:j,setActiveToolCallJobId:B,submittingFeedback:C,submittedFeedback:I,onSubmitFeedback:V,setShowFeedback:U,showFeedbackOnView:c,onFeedbackOnView:g,feedbackDoneViews:L})),[q,u,m,r,H,j,C,I,V,c,g,L]),X=(0,d.useMemo)((()=>({lastToolCallJobId:N,setUserClosedAside:$})),[N]),Q=(0,d.useRef)(!1),Z=(0,d.useRef)(!1),ee=(0,d.useRef)(null),[te,ie]=(0,d.useState)(!1);(0,d.useEffect)((()=>{const e=ee.current,t=null==e?void 0:e.firstElementChild;if(Z.current||!e||!t)return;const i=()=>{ie(e.scrollTop+e.clientHeight+24<e.scrollHeight),Q.current&&(Z.current=e.scrollTop+e.clientHeight+6<e.scrollHeight)};let a;e.addEventListener("scroll",i);const n=new pr.A((()=>{Z.current||(Q.current=!1,e.scrollTo({top:t.scrollHeight,behavior:"instant"}),clearTimeout(a),a=setTimeout((()=>{Q.current=!0}),100))}));return n.observe(t),()=>{n.disconnect(),e.removeEventListener("scroll",i)}}),[J]);const ae=(0,d.useCallback)((()=>{const e=ee.current;null==e||e.scrollTo({top:null==e?void 0:e.scrollHeight,behavior:"instant"})}),[]),ne=(0,d.useMemo)((()=>j?null==E?void 0:E.find((e=>e.id===j)):null),[j,E]);return p().createElement(wr.j.Provider,{value:K},p().createElement(Tr.W.Provider,{value:X},p().createElement("div",{className:Ar.A.container},p().createElement("div",{className:Ar.A.header},p().createElement("div",{className:Ar.A.left}),p().createElement("h1",null,T),p().createElement("div",{className:Ar.A.right},h&&p().createElement(gr.Py,{icon:$t.Rq,variant:"mini",style:{transform:"rotate(90deg)"},onClick:A}),p().createElement(gr.Py,{icon:ul,variant:"mini",onClick:u}))),J?p().createElement(p().Fragment,null,p().createElement("div",{className:Ar.A.main,ref:ee},p().createElement("div",{className:Ar.A.narrow},R.map(((e,t,i)=>p().createElement("div",{className:Ar.A.message,key:t},"user"===e.role?p().createElement(kr.R,{content:e.content}):p().createElement(Er.G,{jobs:e.jobs,taskState:M,isLatest:t===i.length-1})))),W&&("completed"===M||"failed"===M&&o)&&p().createElement(Mr.k,{className:Ar.A.feedback}))),p().createElement("div",{className:Ar.A["scroll-down"],hidden:!te,onClick:ae},p().createElement(gr.Bj,{lib:"antd",icon:"down"}))):p().createElement("div",{className:Ar.A["loading-icon"]},p().createElement(gr.Bj,{lib:"antd",theme:"outlined",icon:"loading-3-quarters",spinning:!0})),n||null!=r&&r.chat?p().createElement("div",{className:Ar.A.footer},p().createElement("div",{className:Ar.A.narrow},n?p().createElement(fr.b,{taskDone:S,skipToResults:f,watchAgain:y}):p().createElement(xr.s,{state:M,canChat:S&&!!_,inputRequiredJobId:_}))):null),p().createElement("div",{className:zt()(Ar.A.aside,{[Ar.A.expanded]:!!j})},j&&p().createElement(yr.n,{job:ne})),H&&p().createElement(vr.f,{views:D})))}dr=Hl,({e:[_r,Nr,Dr,Cr,Or,Ir,Fr,Wr,Ur,Lr,zr,Vr,Hr,Yr,jr,Br,Pr,$r,Gr,Jr,qr,Kr,Xr,Qr,Zr,el,tl,il,al,nl,sl,rl,ll,ol,cl,hl,dl,pl,Sr],c:[El,Rr]}=(0,h.A)(dr,[ml("ai-portal.chat-stream",{shadowOptions:!1})],[[bl(),1,"taskId"],[bl({type:Boolean}),1,"replay"],[bl({type:Number}),1,"replayDelay"],[bl({attribute:!1}),1,"supports"],[bl({type:Boolean}),1,"showFeedback"],[bl({type:Boolean}),1,"showFeedbackAfterFailed"],[bl({type:Boolean}),1,"showFeedbackOnView"],[bl({type:Boolean}),1,"showUiSwitch"],[bl({type:Boolean,render:!1}),1,"hideMermaid"],[Al({type:"share"}),1,"shareEvent",e=>(0,c.A)(_l,e),(e,t)=>(0,o.A)(_l,e,t)],[Al({type:"terminate"}),1,"terminateEvent",e=>(0,c.A)(Cl,e),(e,t)=>(0,o.A)(Cl,e,t)],[Al({type:"feedback.submit"}),1,"feedbackSubmitEvent",e=>(0,c.A)(Il,e),(e,t)=>(0,o.A)(Il,e,t)],[Al({type:"feedback.on.view"}),1,"feedbackOnViewEvent",e=>(0,c.A)(Wl,e),(e,t)=>(0,o.A)(Wl,e,t)],[Al({type:"ui.switch"}),1,"switch",e=>(0,c.A)(Ll,e),(e,t)=>(0,o.A)(Ll,e,t)],[gl(),2,"resumed"],[gl(),2,"feedbackSubmitDone"],[gl(),2,"feedbackSubmitFailed"],[gl(),2,"feedbackOnViewDone"]],0,(e=>Vl.has((0,r.A)(e))),m.ReactNextElement)),Rr();let jl=function(e){return e.AI_EMPLOYEES="AI_EMPLOYEES",e.UNTITLED="UNTITLED",e}({});const Bl="bricks/ai-portal/ai-employees",Pl=b.i18n.getFixedT(null,Bl);var $l,Gl=i(98036);let Jl,ql,Kl,Xl,Ql,Zl,eo,to,io;(0,b.initializeI18n)(Bl,{en:{AI_EMPLOYEES:"AI Employees",UNTITLED:"Untitled"},zh:{AI_EMPLOYEES:"Ai 数字人",UNTITLED:"未命名"}});const ao=(0,m.wrapBrick)("eo-link"),no=(0,m.wrapBrick)("eo-icon"),so=(0,m.wrapBrick)("ai-portal.tab-list",{onTabClick:"tab.click"}),{defineElement:ro,property:lo}=(0,u.createDecorators)();let oo;var co=new WeakMap,ho=new WeakMap,po=new WeakMap,uo=new WeakMap;class mo extends m.ReactNextElement{constructor(){super(...arguments),(0,s.A)(this,co,ql(this)),(0,s.A)(this,ho,(Kl(this),Xl(this))),(0,s.A)(this,po,(Ql(this),Zl(this))),(0,s.A)(this,uo,(eo(this),to(this,!0))),io(this)}get list(){return(0,c.A)(co,this)}set list(e){(0,o.A)(co,this,e)}get industries(){return(0,c.A)(ho,this)}set industries(e){(0,o.A)(ho,this,e)}get urlTemplate(){return(0,c.A)(po,this)}set urlTemplate(e){(0,o.A)(po,this,e)}get withContainer(){return(0,c.A)(uo,this)}set withContainer(e){(0,o.A)(uo,this,e)}render(){return p().createElement(bo,{list:this.list,industries:this.industries,urlTemplate:this.urlTemplate,withContainer:this.withContainer})}}function bo(e){let{list:t,industries:i,urlTemplate:a,withContainer:n}=e;const s=(0,d.useMemo)((()=>[...new Set([...null!=i?i:[],...(null!=t?t:[]).map((e=>e.industry))])]),[i,t]),[r,l]=(0,d.useState)(s[0]),o=(0,d.useMemo)((()=>{const e=new Map;return null==t||t.forEach((t=>{if(t.industry!==r)return;let i=e.get(t.role);i||e.set(t.role,i=[]),i.push(t)})),[...e.entries()]}),[r,t]),c=(0,d.useMemo)((()=>s.map((e=>({id:e,label:e||Pl(jl.UNTITLED)})))),[s]),h=p().createElement(p().Fragment,null,p().createElement(so,{tabs:c,activeTab:r,onTabClick:e=>l(e.detail.id)}),p().createElement("ul",{className:"groups"},o.map((e=>{let[t,i]=e;return p().createElement("li",{key:t,className:"group"},p().createElement("h2",null,t),p().createElement("ul",{className:"list"},i.map(((e,t)=>p().createElement("li",{key:t},p().createElement(ao,(0,Mi.A)({className:zt()("link",{clickable:!!a})},a?{url:(0,Ms.Q)(a,e)}:null),p().createElement("div",{className:"heading"},p().createElement("div",{className:"avatar"},e.avatar?p().createElement("img",{src:e.avatar}):p().createElement(no,{lib:"antd",icon:"user"})),p().createElement("div",{className:"title"},e.name)),p().createElement("div",{className:"description"},e.description)))))))}))));return n?p().createElement("div",{className:"container"},p().createElement("h1",null,Pl(jl.AI_EMPLOYEES)),h):h}$l=mo,({e:[ql,Kl,Xl,Ql,Zl,eo,to,io],c:[oo,Jl]}=(0,h.A)($l,[ro("ai-portal.ai-employees",{styleTexts:[Gl.A]})],[[lo({attribute:!1}),1,"list"],[lo({attribute:!1}),1,"industries"],[lo(),1,"urlTemplate"],[lo({type:Boolean}),1,"withContainer"]],0,void 0,m.ReactNextElement)),Jl();let Ao=function(e){return e.AGENTS="AGENTS",e}({});const go="bricks/ai-portal/ai-agents",ko=b.i18n.getFixedT(null,go);var Eo,wo=i(83059);let xo,vo,fo,yo,To,Mo,So;const Ro={lib:"antd",icon:"tool"};(0,b.initializeI18n)(go,{en:{AGENTS:"Agents"},zh:{AGENTS:"智能体"}});const _o=(0,m.wrapBrick)("eo-icon"),No=(0,m.wrapBrick)("eo-link"),{defineElement:Do,property:Co}=(0,u.createDecorators)();let Oo;var Io=new WeakMap,Fo=new WeakMap,Wo=new WeakMap;class Uo extends m.ReactNextElement{constructor(){super(...arguments),(0,s.A)(this,Io,vo(this)),(0,s.A)(this,Fo,(fo(this),yo(this))),(0,s.A)(this,Wo,(To(this),Mo(this,!0))),So(this)}get list(){return(0,c.A)(Io,this)}set list(e){(0,o.A)(Io,this,e)}get urlTemplate(){return(0,c.A)(Fo,this)}set urlTemplate(e){(0,o.A)(Fo,this,e)}get withContainer(){return(0,c.A)(Wo,this)}set withContainer(e){(0,o.A)(Wo,this,e)}render(){return p().createElement(Lo,{list:this.list,urlTemplate:this.urlTemplate,withContainer:this.withContainer})}}function Lo(e){let{list:t,urlTemplate:i,withContainer:a}=e;const n=p().createElement(p().Fragment,null,p().createElement("ul",{className:"list"},null==t?void 0:t.map(((e,t)=>{var a,n;return p().createElement("li",{key:t},p().createElement(No,(0,Mi.A)({className:zt()("link",{clickable:!!i})},i?{url:(0,Ms.Q)(i,e)}:null),p().createElement("div",{className:"heading"},p().createElement("div",{className:"icon"},p().createElement(_o,(0,Mi.A)({},null!==(a=e.icon)&&void 0!==a?a:Ro,{fallback:Ro}))),p().createElement("div",{className:"title"},e.name)),p().createElement("div",{className:"tags"},null===(n=e.tags)||void 0===n?void 0:n.map(((e,t)=>p().createElement("span",{key:t,className:"tag"},e)))),p().createElement("div",{className:"description"},e.description)))}))));return a?p().createElement("div",{className:"container"},p().createElement("h1",null,ko(Ao.AGENTS)),n):n}Eo=Uo,({e:[vo,fo,yo,To,Mo,So],c:[Oo,xo]}=(0,h.A)(Eo,[Do("ai-portal.ai-agents",{styleTexts:[wo.A]})],[[Co({attribute:!1}),1,"list"],[Co(),1,"urlTemplate"],[Co({type:Boolean}),1,"withContainer"]],0,void 0,m.ReactNextElement)),xo();var zo=i(94558);let Vo=null;customElements.define("ai-portal.save-request-store",(0,zo.createProviderClass)((function(e){Vo=e}))),customElements.define("ai-portal.load-request-store",(0,zo.createProviderClass)((function(){const e=Vo;return Vo=null,e}))),customElements.define("ai-portal.clear-request-store",(0,zo.createProviderClass)((function(){Vo=null})));var Ho,Yo=i(49041);let jo,Bo,Po,$o,Go,Jo,qo;const Ko=(0,m.wrapBrick)("eo-link"),{defineElement:Xo,property:Qo}=(0,u.createDecorators)();let Zo;var ec=new WeakMap,tc=new WeakMap,ic=new WeakMap;class ac extends m.ReactNextElement{constructor(){super(...arguments),(0,s.A)(this,ec,Bo(this)),(0,s.A)(this,tc,(Po(this),$o(this))),(0,s.A)(this,ic,(Go(this),Jo(this))),qo(this)}get pageTitle(){return(0,c.A)(ec,this)}set pageTitle(e){(0,o.A)(ec,this,e)}get breadcrumbs(){return(0,c.A)(tc,this)}set breadcrumbs(e){(0,o.A)(tc,this,e)}get size(){return(0,c.A)(ic,this)}set size(e){(0,o.A)(ic,this,e)}render(){return p().createElement(nc,{pageTitle:this.pageTitle,breadcrumbs:this.breadcrumbs})}}function nc(e){let{breadcrumbs:t,pageTitle:i}=e;return(0,d.useEffect)((()=>{"string"==typeof i&&(0,wa.getRuntime)().applyPageTitle(i)}),[i]),p().createElement("div",{className:"container"},i||null!=t&&t.length?p().createElement("nav",null,null!=t&&t.length?p().createElement("ul",{className:"breadcrumbs"},t.map(((e,t)=>p().createElement("li",{key:t},p().createElement(Ko,{url:e.url},e.text))))):null,i?p().createElement("h1",null,i):null):null,p().createElement("slot",null))}Ho=ac,({e:[Bo,Po,$o,Go,Jo,qo],c:[Zo,jo]}=(0,h.A)(Ho,[Xo("ai-portal.page-container",{styleTexts:[Yo.A]})],[[Qo(),1,"pageTitle"],[Qo({attribute:!1}),1,"breadcrumbs"],[Qo({render:!1}),1,"size"]],0,void 0,m.ReactNextElement)),jo();const sc="libs-datetime";let rc=function(e){return e.TODAY="TODAY",e.YESTERDAY="YESTERDAY",e.FUTURE_AFTER="FUTURE_AFTER",e.FORMAT_MEDIUM_DATETIME="FORMAT_MEDIUM_DATETIME",e.FORMAT_MEDIUM_DATE="FORMAT_MEDIUM_DATE",e.FORMAT_SHORT_DATETIME="FORMAT_SHORT_DATETIME",e.FORMAT_SHORT_DATE="FORMAT_SHORT_DATE",e.FORMAT_SHORT_DAY_DATETIME="FORMAT_SHORT_DAY_DATETIME",e.FORMAT_SHORT_DAY_DATE="FORMAT_SHORT_DAY_DATE",e.SECONDS="SECONDS",e.MILL_SECONDS="MILL_SECONDS",e.MINUTES="MINUTES",e.HOURS="HOURS",e.DAYS="DARS",e.MONTHS="MONTHS",e}({});const lc={[rc.YESTERDAY]:"Yesterday",[rc.TODAY]:"Today",[rc.FUTURE_AFTER]:"After {{time}}",[rc.FORMAT_MEDIUM_DATETIME]:"LLL",[rc.FORMAT_MEDIUM_DATE]:"LL",[rc.FORMAT_SHORT_DATETIME]:"MMM D ah:mm",[rc.FORMAT_SHORT_DATE]:"MMM D",[rc.FORMAT_SHORT_DAY_DATETIME]:"MMM D HH:mm",[rc.FORMAT_SHORT_DAY_DATE]:"MMM D",[rc.MONTHS]:"months",[rc.HOURS]:"hours",[rc.SECONDS]:"seconds",[rc.MILL_SECONDS]:"millseconds",[rc.DAYS]:"days",[rc.MINUTES]:"minutes"},oc={[rc.YESTERDAY]:"昨天",[rc.TODAY]:"今天",[rc.FUTURE_AFTER]:"{{time}}后",[rc.FORMAT_MEDIUM_DATETIME]:"LL ah:mm",[rc.FORMAT_MEDIUM_DATE]:"LL",[rc.FORMAT_SHORT_DATETIME]:"MMMD日 ah:mm",[rc.FORMAT_SHORT_DATE]:"MMMD日",[rc.FORMAT_SHORT_DAY_DATETIME]:"MMMD日 HH:mm",[rc.FORMAT_SHORT_DAY_DATE]:"MMMD日",[rc.MONTHS]:"个月",[rc.HOURS]:"小时",[rc.SECONDS]:"秒",[rc.MILL_SECONDS]:"毫秒",[rc.DAYS]:"天",[rc.MINUTES]:"分钟"};(0,b.initializeI18n)(sc,{en:lc,zh:oc});let cc=function(e){return e.full="full",e.default="default",e.relative="relative",e.past="past",e.future="future",e.accurate="accurate",e.auto="auto",e}({});let hc=function(e){return e.CHATS="CHATS",e.GOALS="GOALS",e}({});const dc="bricks/ai-portal/project-summary",pc={en:{[hc.CHATS]:"Chat history",[hc.GOALS]:"Project goals"},zh:{[hc.CHATS]:"历史对话",[hc.GOALS]:"项目目标"}},uc=b.i18n.getFixedT(null,dc);var mc,bc=i(56562);let Ac,gc,kc,Ec,wc;(0,b.initializeI18n)(dc,pc);const xc=(0,m.wrapBrick)("eo-icon"),vc=(0,m.wrapBrick)("eo-link"),fc=(0,m.wrapBrick)("ai-portal.tab-list",{onTabClick:"tab.click"}),yc="chats",Tc=[{id:yc,label:uc(hc.CHATS)},{id:"goals",label:uc(hc.GOALS)}],{defineElement:Mc,property:Sc}=(0,u.createDecorators)();let Rc;var _c=new WeakMap,Nc=new WeakMap;class Dc extends m.ReactNextElement{constructor(){super(...arguments),(0,s.A)(this,_c,gc(this)),(0,s.A)(this,Nc,(kc(this),Ec(this))),wc(this)}get chatList(){return(0,c.A)(_c,this)}set chatList(e){(0,o.A)(_c,this,e)}get chatUrlTemplate(){return(0,c.A)(Nc,this)}set chatUrlTemplate(e){(0,o.A)(Nc,this,e)}render(){return p().createElement(Cc,{chatList:this.chatList,chatUrlTemplate:this.chatUrlTemplate})}}function Cc(e){let{chatList:t,chatUrlTemplate:i}=e;const[a,n]=(0,d.useState)(yc);return p().createElement(p().Fragment,null,p().createElement(fc,{tabs:Tc,activeTab:a,onTabClick:e=>n(e.detail.id)}),a===yc?t?p().createElement("ul",{className:"chats"},t.map((e=>p().createElement("li",{key:e.conversationId,className:"item"},p().createElement(vc,{className:"link",url:(0,Ms.Q)(i,e)},p().createElement("div",{className:"title"},e.title),p().createElement("div",{className:"time"},p().createElement(xc,{lib:"antd",icon:"clock-circle"}),function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:cc.auto,i=arguments.length>2?arguments[2]:void 0;if(null==e||e===-1/0||e===1/0)return null;const a=Wt(e),n=Wt().add(0),s="date"===i?"LL":"LL HH:mm",r=b.i18n.t(`${sc}:${"date"===i?rc.FORMAT_MEDIUM_DATE:rc.FORMAT_MEDIUM_DATETIME}`),l=b.i18n.t(`${sc}:${"date"===i?rc.FORMAT_SHORT_DATE:rc.FORMAT_SHORT_DATETIME}`),o=b.i18n.t(`${sc}:${"date"===i?rc.FORMAT_SHORT_DAY_DATE:rc.FORMAT_SHORT_DAY_DATETIME}`),c="date"===i?"LL":"LL HH:mm:ss";let h;switch(t){case cc.full:h=a.format(s);break;case cc.default:h=a.format(c);break;case cc.relative:{const e=+a-+n;h=e<=0?Wt.duration(e).humanize(!0):b.i18n.t(`${sc}:${rc.FUTURE_AFTER}`,{time:Wt.duration(e).humanize()});break}case cc.past:h=Wt.duration(Math.min(+a-+n,0)).humanize(!0);break;case cc.future:h=b.i18n.t(`${sc}:${rc.FUTURE_AFTER}`,{time:Wt.duration(Math.max(+a-+n,0)).humanize()});break;case cc.accurate:h=(()=>{const e=+a.diff(n,"days",!0).toFixed(1);let t="";const r=a.year()<n.year()?"lastYear":e<-2||a.isBefore(n.clone().add(-1,"day"),"day")?"twoDaysBefore":a.isSame(n.clone().add(-1,"day"),"day")?"yesterday":a.isSame(n,"day")?"sameDay":e<2&&a.isSame(n.clone().add(1,"day"),"day")?"nextDay":e<7?"nextWeek":"default";switch(r){case"sameDay":case"yesterday":t=`${b.i18n.t(`${sc}:${"yesterday"===r?rc.YESTERDAY:rc.TODAY}`)}${"date"===i?"":` ${a.format("HH:mm")}`}`;break;case"lastYear":default:t=a.format(s);break;case"twoDaysBefore":t=a.format(o)}return t})();break;default:h=a.format(a.year()===n.year()?l:r)}return h}(e.startTime,cc.relative))))))):p().createElement("div",{className:"loading"},p().createElement(xc,{lib:"antd",icon:"loading-3-quarters",spinning:!0})):null)}mc=Dc,({e:[gc,kc,Ec,wc],c:[Rc,Ac]}=(0,h.A)(mc,[Mc("ai-portal.project-summary",{styleTexts:[bc.A]})],[[Sc({attribute:!1}),1,"chatList"],[Sc(),1,"chatUrlTemplate"]],0,void 0,m.ReactNextElement)),Ac();var Oc,Ic=i(20124);let Fc,Wc,Uc,Lc,zc,Vc,Hc,Yc,jc;const{defineElement:Bc,property:Pc,event:$c}=(0,u.createDecorators)();let Gc;var Jc=new WeakMap,qc=new WeakMap,Kc=new WeakMap,Xc=new WeakSet,Qc=new WeakMap;class Zc extends m.ReactNextElement{constructor(){super(...arguments),(0,n.A)(this,Xc),(0,s.A)(this,Jc,Wc(this)),(0,s.A)(this,qc,(Uc(this),Lc(this))),(0,s.A)(this,Kc,(zc(this),Vc(this))),(0,s.A)(this,Qc,(jc(this),e=>{this.activeTab=e.id,(0,l.A)(Xc,this,Hc).emit(e)}))}get tabs(){return(0,c.A)(Jc,this)}set tabs(e){(0,o.A)(Jc,this,e)}get activeTab(){return(0,c.A)(qc,this)}set activeTab(e){(0,o.A)(qc,this,e)}render(){return p().createElement(eh,{tabs:this.tabs,activeTab:this.activeTab,onTabClick:(0,c.A)(Qc,this)})}}function eh(e){let{tabs:t,activeTab:i,onTabClick:a}=e;return p().createElement("ul",{className:"tabs",part:"tabs"},null==t?void 0:t.map((e=>p().createElement("li",{key:e.id,part:"tab",className:zt()("tab",{active:e.id===i})},p().createElement("a",{onClick:()=>a(e)},e.label)))))}Oc=Zc,({e:[Wc,Uc,Lc,zc,Vc,Hc,Yc,jc],c:[Gc,Fc]}=(0,h.A)(Oc,[Bc("ai-portal.tab-list",{styleTexts:[Ic.A]})],[[Pc({attribute:!1}),1,"tabs"],[Pc({attribute:!1}),1,"activeTab"],[$c({type:"tab.click"}),1,"tabClick",e=>(0,c.A)(Kc,e),(e,t)=>(0,o.A)(Kc,e,t)]],0,(e=>Qc.has((0,r.A)(e))),m.ReactNextElement)),Fc()},20124:(e,t,i)=>{i.d(t,{A:()=>l});var a=i(36758),n=i.n(a),s=i(40935),r=i.n(s)()(n());r.push([e.id,':host{display:block}:host([hidden]){display:none}*{box-sizing:border-box}.tabs{list-style:none;padding:0;margin:0;display:flex;font-size:16px}.tabs .tab + .tab{margin-left:32px}.tabs a{color:rgba(38,38,38,0.65);cursor:pointer}.tabs .active a{color:#262626;font-weight:500}.tabs .active a::after{content:"";display:block;width:100%;height:4px;background-color:currentColor;border-radius:2px}',""]);const l=r.toString()},21411:(e,t,i)=>{i.d(t,{A:()=>l});var a=i(36758),n=i.n(a),s=i(40935),r=i.n(s)()(n());r.push([e.id,":host{display:block}:host([hidden]){display:none}*{box-sizing:border-box}ul{list-style:none;margin:0;padding:0}.loading{display:flex;justify-content:center;padding:8px}.group + .group{margin-top:15px}.group-title{font-weight:500;font-size:12px;color:#000;padding:8px;height:36px;line-height:20px}.item{display:block}.item::part(link){display:flex;align-items:center;padding:0 8px;height:36px;border-radius:8px;color:#000}.item::part(link):hover{background:rgba(0,0,0,0.04)}.item-title{flex:1;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.actions{cursor:auto}.item:not(:hover):not(.active) .actions{display:none}.working{width:8px;height:8px;border-radius:8px;background:var(--elevo-color-brand);margin:0 7px}.item:hover .working,\n.item.active .working{display:none}.load-more{display:flex;justify-content:center;align-items:center;height:36px}",""]);const l=r.toString()},25676:(e,t,i)=>{e.exports=i.p+"images/4b299d0b.png"},31653:(e,t,i)=>{i.d(t,{A:()=>l});var a=i(36758),n=i.n(a),s=i(40935),r=i.n(s)()(n());r.push([e.id,":host{display:inline-block;padding:3px 0}:host([hidden]){display:none}img{display:block}",""]);const l=r.toString()},31748:(e,t,i)=>{i.d(t,{A:()=>p});var a=i(36758),n=i.n(a),s=i(40935),r=i.n(s),l=i(20062),o=i.n(l),c=new URL(i(25676),i.b),h=r()(n()),d=o()(c);h.push([e.id,`:host{display:block}:host([hidden]){display:none}:host([with-container]){position:relative;width:100%;height:100%;overflow:hidden;background-color:rgb(205,206,207);background-image:url(${d});background-size:cover;background-repeat:no-repeat;background-position:center;background-attachment:fixed;color:#262626;padding:48px 24px;overflow-y:auto}*{box-sizing:border-box}.container{max-width:1400px;margin:0 auto}h1,\nh2{font-weight:500;margin:0}h1{font-size:20px;line-height:28px;margin-bottom:17px}h2{font-size:16px;line-height:22px}.groups,\n.list{list-style:none;margin:0;padding:0}.groups{margin-top:27px}.group + .group{margin-top:32px}.list{margin-top:16px;display:grid;grid-template-columns:repeat(auto-fill,minmax(320px,1fr));gap:24px}.list .item{background:rgba(255,255,255,0.9);box-shadow:0px 2px 5px 0px rgba(0,0,0,0.08);border-radius:12px;padding:20px 26px}.heading{display:flex;align-items:center}.icon{font-size:24px;color:#333;margin-right:8px}.title{font-size:15px;font-weight:500;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.description{margin-top:13px;font-size:13px;color:rgba(0,0,0,0.45);line-height:18px;height:54px;display:-webkit-box;-webkit-line-clamp:3;line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}`,""]);const p=h.toString()},32360:(e,t,i)=>{e.exports=i.p+"images/6336f999.png"},42873:(e,t,i)=>{i.d(t,{A:()=>p});var a=i(36758),n=i.n(a),s=i(40935),r=i.n(s),l=i(20062),o=i.n(l),c=new URL(i(49214),i.b),h=r()(n()),d=o()(c);h.push([e.id,`:host{display:flex;flex-direction:column;align-items:center;max-width:1200px;width:100%}:host([hidden]){display:none}*{box-sizing:border-box}.tips{color:rgba(0,0,0,0.45);margin-bottom:27px}.cases{list-style:none;padding:0;margin:0;display:grid;width:100%;grid-template-columns:repeat(auto-fill,minmax(276px,1fr));gap:24px;margin-top:36px}.link{display:block}.link::part(link){display:flex;gap:0;flex-direction:column;height:218px}.title{width:100%;padding:10px 4px 0;color:#262626;font-weight:500}.title span{display:-webkit-box;-webkit-line-clamp:2;line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.link:hover .title{color:var(--elevo-color-brand)}.thumbnail{width:100%;height:139px;padding:22px 29px 0;border-radius:12px;overflow:hidden;background-size:cover;background-position:center;background-repeat:no-repeat}.quote{display:block;width:14px;height:12px;margin-bottom:8px;background:url(${d}) no-repeat center;background-size:contain}.text{display:-webkit-box;-webkit-line-clamp:3;line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;font-size:13px;line-height:22px;color:rgba(24,33,47,0.8);height:66px}`,""]);const p=h.toString()},47008:(e,t,i)=>{i.d(t,{A:()=>p});var a=i(36758),n=i.n(a),s=i(40935),r=i.n(s),l=i(20062),o=i.n(l),c=new URL(i(47336),i.b),h=r()(n()),d=o()(c);h.push([e.id,`:host{display:block}:host([hidden]){display:none}*{box-sizing:border-box}.root{color:#262626;background:url(${d}) no-repeat center bottom;background-size:100% 104px;padding:12px 12px 29px}.container{position:relative;background:#ffffff;box-shadow:0px 2px 4px 0px rgba(38,45,65,0.1);border-radius:16px;border:1px solid #dadfe8}.container:has(textarea:focus){border-color:#b7c3d8}textarea{display:block;width:100%;padding:10px 16px 50px;color:var(--antd-input-color);border-radius:16px;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);border:1px solid rgba(255,255,255,0.5);font-size:14px;line-height:22px;height:120px}textarea::placeholder{color:rgba(0,0,0,0.4)}.btn-send:focus,\ntextarea:focus{outline:none}.btn-send{position:absolute;bottom:12px;right:14px;width:28px;height:28px;display:flex;align-items:center;justify-content:center;background:var(--elevo-color-brand);border:none;border-radius:8px;color:#fff}.btn-send[disabled]{background:rgba(0,0,0,0.15)}.btn-send:not([disabled]){cursor:pointer}.btn-send:not([disabled]):hover{background:#5166ff}.btn-send:not([disabled]):active{background:#1e33cc}`,""]);const p=h.toString()},47336:(e,t,i)=>{e.exports=i.p+"images/25c20165.png"},47338:(e,t,i)=>{i.d(t,{A:()=>l});var a=i(36758),n=i.n(a),s=i(40935),r=i.n(s)()(n());r.push([e.id,':host{display:inline-block}:host([hidden]){display:none}:host,\neo-tooltip{vertical-align:middle}button{width:28px;height:28px;font-size:18px;border-radius:8px;display:flex;align-items:center;justify-content:center;border:none;background:none;color:#333}button:disabled{color:#8c8c8c}button:not(:disabled){cursor:pointer}button:focus{outline:none}button:not(:disabled):hover{background:rgba(0,0,0,0.04)}button:not(:disabled):active{background:rgba(0,0,0,0.08)}:host([variant="light"]) button{color:#595959}:host([variant="mini"]) button{width:24px;height:24px;font-size:16px;border-radius:4px}:host([variant="mini-light"]) button{color:#8c8c8c;width:20px;height:20px;font-size:14px;border-radius:4px}:host([variant="bordered"]) button{background:#ffffff;border-radius:8px;border:1px solid rgba(0,0,0,0.1);color:#595959;width:32px;height:32px;font-size:18px}:host([variant="bordered"]) button:not(:disabled):hover{background:rgba(0,0,0,0.04)}',""]);const l=r.toString()},49041:(e,t,i)=>{i.d(t,{A:()=>p});var a=i(36758),n=i.n(a),s=i(40935),r=i.n(s),l=i(20062),o=i.n(l),c=new URL(i(25676),i.b),h=r()(n()),d=o()(c);h.push([e.id,`:host{display:block;position:relative;width:100%;height:100%;overflow:hidden;background-color:rgb(205,206,207);background-image:url(${d});background-size:cover;background-repeat:no-repeat;background-position:center;background-attachment:fixed;color:#262626;padding:17px 54px 48px;overflow-y:auto}:host([hidden]){display:none}*{box-sizing:border-box}.container{max-width:1400px;margin:0 auto}:host([size="small"]) .container{max-width:1000px}nav{font-weight:500;font-size:20px;line-height:28px;display:flex;margin-bottom:17px}h1{margin:0;font-size:inherit;line-height:inherit}.breadcrumbs{list-style:none;padding:0;margin:0;color:#bfbfbf}.breadcrumbs eo-link::part(link){color:inherit}.breadcrumbs eo-link::part(link):hover{color:#595959}.breadcrumbs li::after{content:"/";margin:0 8px}`,""]);const p=h.toString()},49214:(e,t,i)=>{e.exports=i.p+"images/820d60a5.png"},56562:(e,t,i)=>{i.d(t,{A:()=>l});var a=i(36758),n=i.n(a),s=i(40935),r=i.n(s)()(n());r.push([e.id,":host{display:flex;flex-direction:column;align-items:center;max-width:1200px;width:100%}:host([hidden]){display:none}*{box-sizing:border-box}.chats{list-style:none;padding:0;margin:0;display:grid;width:100%;grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:24px;margin-top:2em}.chats .link{display:block}.chats .link::part(link){background:#fff;border-radius:12px;border:1px solid rgba(0,0,0,0.1);overflow:hidden;display:block;padding:16px 16px 12px}.chats .link::part(link):hover{box-shadow:0px 2px 8px 0px rgba(0,0,0,0.1)}.chats .title{height:40px;line-height:20px;display:-webkit-box;-webkit-line-clamp:2;line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;color:#262626}.chats .time{margin-top:20px;font-size:12px;color:#8c8c8c;display:flex;align-items:center}.chats .time eo-icon{margin-right:4px}.loading{display:flex;align-items:center;justify-content:center;margin-top:2em;font-size:16px;color:#8c8c8c}",""]);const l=r.toString()},82165:(e,t,i)=>{i.d(t,{A:()=>p});var a=i(36758),n=i.n(a),s=i(40935),r=i.n(s),l=i(20062),o=i.n(l),c=new URL(i(32360),i.b),h=r()(n()),d=o()(c);h.push([e.id,`:host{display:block;background-color:#fff;background-image:url(${d});background-position:center;background-size:cover;background-repeat:no-repeat;background-attachment:fixed}:host([hidden]){display:none}`,""]);const p=h.toString()},83059:(e,t,i)=>{i.d(t,{A:()=>p});var a=i(36758),n=i.n(a),s=i(40935),r=i.n(s),l=i(20062),o=i.n(l),c=new URL(i(25676),i.b),h=r()(n()),d=o()(c);h.push([e.id,`:host{display:block}:host([hidden]){display:none}:host([with-container]){position:relative;width:100%;height:100%;overflow:hidden;background-color:rgb(205,206,207);background-image:url(${d});background-size:cover;background-repeat:no-repeat;background-position:center;background-attachment:fixed;color:#262626;padding:48px 24px;overflow-y:auto}*{box-sizing:border-box}.container{max-width:1400px;margin:0 auto}h1{font-weight:500;margin:0;font-size:20px;line-height:28px;margin-bottom:17px}.list{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(auto-fill,minmax(320px,1fr));gap:24px}.link{display:block;height:100%}.link::part(link){display:block;height:100%;color:#262626;background:rgba(255,255,255,0.9);box-shadow:0px 2px 5px 0px rgba(0,0,0,0.08);border-radius:12px;padding:20px 26px;box-sizing:border-box}.link:not(.clickable)::part(link){cursor:auto}.clickable::part(link):hover{box-shadow:0px 4px 10px 0px rgba(0,0,0,0.1)}.heading{display:flex;align-items:center}.icon{width:48px;height:48px;display:flex;align-items:center;justify-content:center;background:#ffffff;border-radius:12px;border:1px solid #e8e9ec;font-size:32px;color:#595959;margin-right:16px}.title{font-size:16px;font-weight:500;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.clickable::part(link):hover .title{color:var(--elevo-color-brand)}.description{margin-top:13px;font-size:13px;color:rgba(0,0,0,0.45);line-height:18px;height:54px;display:-webkit-box;-webkit-line-clamp:3;line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}.tags{display:flex;gap:6px;margin:16px 0 -3px}.tag{display:block;background:rgba(0,0,0,0.04);border-radius:4px;font-size:12px;line-height:22px;padding:0 7px}`,""]);const p=h.toString()},98036:(e,t,i)=>{i.d(t,{A:()=>p});var a=i(36758),n=i.n(a),s=i(40935),r=i.n(s),l=i(20062),o=i.n(l),c=new URL(i(25676),i.b),h=r()(n()),d=o()(c);h.push([e.id,`:host{display:block}:host([hidden]){display:none}:host([with-container]){position:relative;width:100%;height:100%;overflow:hidden;background-color:rgb(205,206,207);background-image:url(${d});background-size:cover;background-repeat:no-repeat;background-position:center;background-attachment:fixed;color:#262626;padding:48px 24px;overflow-y:auto}*{box-sizing:border-box}.container{max-width:1400px;margin:0 auto;margin-bottom:17px}h1,\nh2{font-weight:500;margin:0}h1{font-size:20px;line-height:28px;margin-bottom:17px}h2{font-size:16px;line-height:22px}.groups,\n.list{list-style:none;margin:0;padding:0}.groups{margin-top:27px}.group + .group{margin-top:32px}.list{margin-top:16px;display:grid;grid-template-columns:repeat(auto-fill,minmax(320px,1fr));gap:24px}.link{display:block;height:100%}.link::part(link){display:block;height:100%;color:#262626;background:rgba(255,255,255,0.9);box-shadow:0px 2px 5px 0px rgba(0,0,0,0.08);border-radius:12px;padding:20px 26px;box-sizing:border-box}.link:not(.clickable)::part(link){cursor:auto}.clickable::part(link):hover{box-shadow:0px 4px 10px 0px rgba(0,0,0,0.1)}.heading{display:flex;align-items:center}.avatar{width:48px;height:48px;border-radius:12px;margin-right:16px;background-color:#d5d6e6;display:flex;align-items:center;justify-content:center;font-size:24px}.avatar img{width:100%;height:100%}.title{font-size:16px;font-weight:500;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.clickable::part(link):hover .title{color:var(--elevo-color-brand)}.description{margin-top:13px;font-size:13px;color:rgba(0,0,0,0.45);line-height:18px;height:54px;display:-webkit-box;-webkit-line-clamp:3;line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}`,""]);const p=h.toString()}}]);
|
|
2
|
+
//# sourceMappingURL=2675.bf62058e.js.map
|