@next-bricks/ai-portal 0.16.0 → 0.16.1
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 +8 -8
- package/dist/chunks/6220.3515a915.js +3 -0
- package/dist/chunks/6220.3515a915.js.map +1 -0
- package/dist/chunks/{9073.bdd66226.js → 9073.1feba14f.js} +2 -2
- package/dist/chunks/9073.1feba14f.js.map +1 -0
- package/dist/chunks/cruise-canvas.d9cda7bc.js +2 -0
- package/dist/chunks/cruise-canvas.d9cda7bc.js.map +1 -0
- package/dist/chunks/{main.eecae8a6.js → main.ff1a6ab9.js} +2 -2
- package/dist/chunks/{main.eecae8a6.js.map → main.ff1a6ab9.js.map} +1 -1
- package/dist/examples.json +8 -8
- package/dist/{index.c1a6a59a.js → index.c754c040.js} +2 -2
- package/dist/{index.c1a6a59a.js.map → index.c754c040.js.map} +1 -1
- package/dist/manifest.json +56 -56
- package/dist/types.json +89 -89
- package/dist-types/cruise-canvas/useZoom.d.ts +2 -1
- package/package.json +2 -2
- package/dist/chunks/6220.770aba56.js +0 -3
- package/dist/chunks/6220.770aba56.js.map +0 -1
- package/dist/chunks/9073.bdd66226.js.map +0 -1
- package/dist/chunks/cruise-canvas.aaa43ae4.js +0 -2
- package/dist/chunks/cruise-canvas.aaa43ae4.js.map +0 -1
- /package/dist/chunks/{6220.770aba56.js.LICENSE.txt → 6220.3515a915.js.LICENSE.txt} +0 -0
package/dist/bricks.json
CHANGED
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
"id": "bricks/ai-portal",
|
|
3
3
|
"bricks": [
|
|
4
4
|
"ai-portal.cruise-canvas",
|
|
5
|
-
"ai-portal.chat-box",
|
|
6
|
-
"ai-portal.home-container",
|
|
7
5
|
"ai-portal.chat-history",
|
|
6
|
+
"ai-portal.home-container",
|
|
8
7
|
"ai-portal.stat-with-mini-chart",
|
|
9
|
-
"ai-portal.elevo-
|
|
10
|
-
"ai-portal.
|
|
8
|
+
"ai-portal.elevo-sidebar",
|
|
9
|
+
"ai-portal.chat-box",
|
|
10
|
+
"ai-portal.elevo-logo"
|
|
11
11
|
],
|
|
12
12
|
"elements": [],
|
|
13
13
|
"processors": [],
|
|
@@ -24,9 +24,6 @@
|
|
|
24
24
|
"basic.copy-to-clipboard",
|
|
25
25
|
"eo-easyops-avatar"
|
|
26
26
|
],
|
|
27
|
-
"ai-portal.chat-box": [
|
|
28
|
-
"eo-icon"
|
|
29
|
-
],
|
|
30
27
|
"ai-portal.chat-history": [
|
|
31
28
|
"eo-icon",
|
|
32
29
|
"eo-link",
|
|
@@ -41,7 +38,10 @@
|
|
|
41
38
|
"eo-dropdown-actions",
|
|
42
39
|
"eo-easyops-avatar",
|
|
43
40
|
"eo-mini-actions"
|
|
41
|
+
],
|
|
42
|
+
"ai-portal.chat-box": [
|
|
43
|
+
"eo-icon"
|
|
44
44
|
]
|
|
45
45
|
},
|
|
46
|
-
"filePath": "bricks/ai-portal/dist/index.
|
|
46
|
+
"filePath": "bricks/ai-portal/dist/index.c754c040.js"
|
|
47
47
|
}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
/*! For license information please see 6220.3515a915.js.LICENSE.txt */
|
|
2
|
+
"use strict";(globalThis.webpackChunk_next_bricks_ai_portal=globalThis.webpackChunk_next_bricks_ai_portal||[]).push([[6220],{24:(e,t,n)=>{n.d(t,{A:()=>o});var i=n(36758),a=n.n(i),s=n(40935),r=n.n(s)()(a());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 o=r.toString()},21411:(e,t,n)=>{n.d(t,{A:()=>o});var i=n(36758),a=n.n(i),s=n(40935),r=n.n(s)()(a());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:#2540ff;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 o=r.toString()},26093:(e,t,n)=>{var i,a=n(74635),s=n(70918),r=n(26902),o=n(5536),l=n(86121),c=n(70829),d=n(62740),u=n(18769),h=n.n(u),m=n(7921),p=n(11280),g=n(23081),b=(n(65168),n(90079)),f=n(53373),A=n.n(f),v=n(99126),k=n(67566),x=n(69445),E=n(80079),w=n(32464),y=n(58231),N=n(36494),S=n(97642),T=n(92773),M=n(59533),C=n(13153),R=n(34999),_=n(27954),I=n(24388),Y=n(56938),W=n(77971),O=n(39295),z=n(39194),D=n(16854),U=n(55805),j=n(85620),P=n(73349),L=n(62601),V=n(57097),F=n(83490),H=n(8324);let B,$,q,G,K,X,Q,J,Z,ee,te,ne,ie,ae,se,re,oe,le,ce,de,ue,he,me,pe,ge,be;(0,b.initializeI18n)(E.NS,E.I);const{defineElement:fe,property:Ae,event:ve,method:ke}=(0,m.createDecorators)(),xe=(0,u.memo)(Pe),Ee=(0,u.forwardRef)(je);let we;var ye=new WeakMap,Ne=new WeakMap,Se=new WeakMap,Te=new WeakMap,Me=new WeakMap,Ce=new WeakSet,Re=new WeakMap,_e=new WeakMap,Ie=new WeakMap,Ye=new WeakMap,We=new WeakMap,Oe=new WeakMap,ze=new WeakMap,De=new WeakMap;class Ue extends p.ReactNextElement{constructor(){super(...arguments),(0,a.A)(this,Ce),(0,s.A)(this,ye,(B(this),q(this))),(0,s.A)(this,Ne,(G(this),K(this))),(0,s.A)(this,Se,(X(this),Q(this))),(0,s.A)(this,Te,(J(this),Z(this))),(0,s.A)(this,Me,(ee(this),te(this))),(0,s.A)(this,Re,(ae(this),()=>{(0,o.A)(Ce,this,ne).emit()})),(0,s.A)(this,_e,se(this)),(0,s.A)(this,Ie,(le(this),()=>{(0,o.A)(Ce,this,re).emit()})),(0,s.A)(this,Ye,ce(this)),(0,s.A)(this,We,(he(this),()=>{(0,o.A)(Ce,this,de).emit()})),(0,s.A)(this,Oe,me(this)),(0,s.A)(this,ze,(be(this),()=>{(0,o.A)(Ce,this,pe).emit()})),(0,s.A)(this,De,(0,u.createRef)())}get taskId(){return(0,c.A)(ye,this)}set taskId(e){(0,l.A)(ye,this,e)}get task(){return(0,c.A)(Ne,this)}set task(e){(0,l.A)(Ne,this,e)}get jobs(){return(0,c.A)(Se,this)}set jobs(e){(0,l.A)(Se,this,e)}get replay(){return(0,c.A)(Te,this)}set replay(e){(0,l.A)(Te,this,e)}resumed(){var e;null===(e=(0,c.A)(De,this).current)||void 0===e||e.resumed()}render(){return h().createElement(Ee,{taskId:this.taskId,jobs:this.jobs,task:this.task,replay:this.replay,onShare:(0,c.A)(Re,this),onPause:(0,c.A)(Ie,this),onResume:(0,c.A)(We,this),onCancel:(0,c.A)(ze,this),ref:(0,c.A)(De,this)})}}function je(e,t){var n;let{taskId:i,task:a,jobs:s,replay:r,onShare:o,onPause:l,onResume:c,onCancel:d}=e;const m=(0,u.useRef)(null),{task:p,jobs:b,plan:f,error:v,humanInputRef:E,resumedRef:_}=(0,T.S)(i,r),I=i?p:a,Y=i?b:s,W=i?f:null==a?void 0:a.plan,O=(0,M.B)(I,Y),z=null==O?void 0:O.nodes,B=null==O?void 0:O.edges,$=null==O?void 0:O.nav,q=null==O?void 0:O.views,G=null!==(n=null==I?void 0:I.title)&&void 0!==n?n:"",K=null==I?void 0:I.state,[X,Q]=(0,u.useState)(null),J=(0,u.useMemo)((()=>{if(X){const[e,t]=X.split(":");if("job"===e||"view"===e)return t}return null}),[X]);(0,u.useImperativeHandle)(t,(()=>({resumed:()=>{var e;return null===(e=_.current)||void 0===e?void 0:e.call(_)}})),[_]);const Z=(0,u.useRef)(!1);(0,u.useEffect)((()=>{const e=setTimeout((()=>{Z.current=!0}),3e3);return()=>{clearTimeout(e)}}),[]);const ee=(0,u.useRef)(!1),te=(0,u.useCallback)(((e,t)=>Z.current&&0!==t?(ee.current=!0,e.transition().duration(null!=t?t:300).ease((e=>e*(2-e))).on("end",(()=>{ee.current=!1}))):e),[]);(0,u.useEffect)((()=>{(0,g.getRuntime)().applyPageTitle(G)}),[G]),(0,u.useEffect)((()=>{v&&(0,g.handleHttpError)(v)}),[v]);const ne=(0,u.useCallback)(((e,t)=>{var n;null===(n=E.current)||void 0===n||n.call(E,e,t)}),[E]),[ie,ae]=(0,u.useState)(null),se=(0,u.useCallback)(((e,t)=>{ae((n=>{if(!t){if(!n)return null;const t=new Map(n);return t.delete(e)?t:n}return n?new Map(n).set(e,t):new Map([[e,t]])}))}),[]),{sizeReady:re,nodes:oe,edges:le}=(0,S.g)({rawNodes:z,rawEdges:B,state:K,sizeMap:ie}),ce=(0,u.useRef)(!1),de=(0,u.useRef)(!1),[ue,he]=(0,u.useState)(!1),{grabbing:me,transform:pe,transformRef:ge,zoomer:be}=(0,y.f)({rootRef:m,zoomable:re,scrollable:re&&!ue,pannable:re,manualScrolledUpRef:de}),{centered:fe,setCentered:Ae,reCenterRef:ve}=(0,N.E)({nodes:oe,sizeReady:re,zoomer:be,rootRef:m,selectTransition:te}),ke=!D.QB.includes(null!=K?K:"working")&&2===oe.length,Ee=(0,u.useMemo)((()=>new Set(le.map((e=>e.source)))),[le]),we=(0,u.useMemo)((()=>{if(!re)return null;const e=[];for(const t of oe)Ee.has(t.id)||e.push(t);return e.length>0?Math.max(...e.map((e=>e.view.y+e.view.height))):null}),[oe,Ee,re]),ye=(0,u.useRef)(null);(0,u.useEffect)((()=>{ye.current=we}),[we]),(0,u.useEffect)((()=>{const e=m.current;if(!e||null===we||ce.current&&de.current)return;const{offsetHeight:t}=e,n=ge.current,i=we*n.k+n.y,a=t-D.xX-i;a<0&&be.transform(te((0,k.A)(e),a>-100?100:a<-500?300:200),new H.uV(n.k,n.x,n.y+a))}),[we,ge,be,te]),(0,u.useEffect)((()=>{const e=ye.current,t=m.current;if(!t||null===e||ee.current)return;const{offsetHeight:n}=t,i=e*pe.k+pe.y,a=n-D.xX-i;ce.current=a<0}),[pe,be]);const Ne=(0,u.useCallback)((()=>{ve.current=!0,Ae(!1)}),[ve,Ae]),Se=(0,u.useCallback)((e=>{be.scaleTo((0,k.A)(m.current),e)}),[be]),Te=(0,u.useMemo)((()=>re?(0,x.o)(oe.map((e=>e.view))):null),[oe,re]);(0,u.useEffect)((()=>{if(!Te)return;const e=m.current;if(!e)return;const{offsetWidth:t,offsetHeight:n}=e,i=t/pe.k,a=n/pe.k,s=-(i-20-Te.x),r=i-20+(Te.x+Te.width),o=-(a-20-Te.y),l=a-20+(Te.y+Te.height);be.translateExtent([[s,o],[r,l]])}),[be,pe.k,Te]);const Me=(0,u.useCallback)((e=>{let{nodeId:t,jobId:n,behavior:i,block:a}=e;const s=m.current,r=oe.filter((e=>{var i;return!(t&&e.id!==t||n&&(null===(i=e.job)||void 0===i?void 0:i.id)!==n)}));if(!s||0===r.length)return;const o=(0,x.o)(r.map((e=>e.view))),{x:l,y:c}=(0,L.D)(o,[s.offsetWidth,s.offsetHeight],[D.RV,D.kq,D.xX,D.bL],ge.current,a);(l||c)&&be.translateBy(te((0,k.A)(s),"instant"===i?0:void 0),l,c)}),[oe,te,ge,be]),Ce=(0,u.useCallback)(((e,t)=>{const n=m.current;if(!n||!re)return;let i,a=0,s=0,r=300;const o="left"===e||"right"===e;if("line"===t)i=40*("up"===e||"left"===e?1:-1),r=150;else if("page"===t)i=(n.offsetHeight-D.xX)*("up"===e?-1:1);else{const{y:t,height:a}=(0,x.o)(oe.map((e=>e.view)));if("down"===e){const e=t+a-t+D.xX;i=n.offsetHeight-e-ge.current.y}else i=t+D.RV-ge.current.y}o?a=i:s=i,(a||s)&&be.translateBy(te((0,k.A)(n),r),a,s)}),[oe,te,re,ge,be]),[Re,_e]=(0,u.useState)(null),[Ie,Ye]=(0,u.useState)(null),We=(0,u.useMemo)((()=>({humanInput:ne,onShare:o,onPause:l,onResume:c,onCancel:d,onNodeResize:se,activeToolCallJobId:Re,setActiveToolCallJobId:_e,setActiveNodeId:Q,hoverOnScrollableContent:ue,setHoverOnScrollableContent:he,activeExpandedViewJobId:Ie,setActiveExpandedViewJobId:Ye})),[Re,ue,Ie,se,ne,o,l,c,d]),Oe=(0,u.useMemo)((()=>Re?null==Y?void 0:Y.find((e=>e.id===Re)):null),[Re,Y]),ze=(0,u.useCallback)((e=>{for(const t of e.nativeEvent.composedPath()){if(t instanceof HTMLElement&&t.classList.contains(w.A.node))return;if(t===m.current)break}Q(null)}),[]);return(0,u.useEffect)((()=>{const e=m.current;if(!e||Oe||Ie)return;const t=t=>{if(document.activeElement&&document.activeElement!==document.body&&document.activeElement!==e)return;const n=(0,V.l)(t,{activeNodeId:X,nodes:oe});if(!n)return;const{action:i,node:a}=n;if("scroll"===i)Ce(n.direction,n.range);else if("enter"===i){var s,r;if("job"!==a.type&&"view"!==a.type)return;const e="ask_human"===(null===(s=a.job.toolCall)||void 0===s?void 0:s.name),t="ask_human_confirming_plan"===(null===(r=a.job.toolCall)||void 0===r?void 0:r.name);if(e||t)return}t.preventDefault(),t.stopPropagation(),"enter"===i?"view"===a.type?Ye(a.job.id):_e(a.job.id):"switch-active-node"===i&&(Q(a.id),"job"===a.type||"view"===a.type?Me({jobId:a.job.id,behavior:"smooth"}):Me({nodeId:a.id,behavior:"smooth"}))};return document.addEventListener("keydown",t),()=>{document.removeEventListener("keydown",t)}}),[X,Oe,Ie,oe,Me,Ce]),h().createElement(j.Q.Provider,{value:We},h().createElement("div",{className:A()(w.A.root,{[w.A.loading]:!I}),ref:m,style:{cursor:me?"grabbing":"grab"},tabIndex:-1,onClick:ze},!I&&h().createElement("div",{className:w.A["loading-icon"]},h().createElement(U.Bj,{lib:"antd",theme:"outlined",icon:"loading-3-quarters",spinning:!0})),h().createElement("div",{className:A()(w.A.canvas,{[w.A.ready]:re&&fe}),style:{transform:`translate3d(${pe.x}px, ${pe.y}px, 0) scale(${pe.k})`}},h().createElement("svg",{className:w.A.edges},le.map((e=>h().createElement("path",{className:w.A.edge,key:`${e.source}-${e.target}`,d:e.points.map(((e,t)=>{let{x:n,y:i}=e;return`${0===t?"M":"L"}${n},${i}`})).join(" ")})))),oe.map((e=>{var t,n,i;return h().createElement(xe,{key:e.id,id:e.id,type:e.type,content:e.content,job:e.job,state:e.state,startTime:null==I?void 0:I.startTime,taskLoading:ke,instructionLoading:"instruction"===e.type&&!Ee.has(e.id)&&!D.QB.includes(null!==(t=e.state)&&void 0!==t?t:"working")&&!D.X4.includes(null!=K?K:"working"),edges:le,x:null===(n=e.view)||void 0===n?void 0:n.x,y:null===(i=e.view)||void 0===i?void 0:i.y,active:X===e.id})})))),h().createElement("div",{className:w.A.widgets},h().createElement("div",{className:w.A["nav-container"]},h().createElement("ul",{className:w.A.nav},null==$?void 0:$.map((e=>h().createElement("li",{key:e.id,className:A()(w.A["nav-item"],{[w.A.active]:J===e.id})},h().createElement("a",{className:w.A["nav-link"],onClick:()=>{Q(`job:${e.id}`),Me({jobId:e.id,block:"start"})}},h().createElement("span",{className:w.A["nav-link-text"]},e.title))))))),h().createElement(C.r,{plan:W,state:K}),h().createElement(R.l,{scale:pe.k,onScaleChange:Se,onReCenter:Ne})),Oe&&h().createElement(P.M,{job:Oe}),Ie&&h().createElement(F.f,{views:q}))}function Pe(e){let{id:t,type:n,state:i,job:a,content:s,startTime:r,taskLoading:o,instructionLoading:l,x:c,y:d,active:m}=e;const p=(0,u.useRef)(null),{onNodeResize:g,setActiveNodeId:b}=(0,u.useContext)(j.Q);(0,u.useEffect)((()=>{const e=p.current;if(!e)return;const n=new v.A((()=>{g(t,[e.offsetWidth,e.offsetHeight])}));return n.observe(e),()=>{n.disconnect(),g(t,null)}}),[t,g]),(0,u.useEffect)((()=>{const e=p.current;if(!e)return;const t=e=>{e.stopPropagation()};return e.addEventListener("mousedown",t),()=>{e.removeEventListener("mousedown",t)}}),[]);const f=(0,u.useCallback)((()=>{"start"!==n&&"instruction"!==n&&b(t)}),[t,b,n]);return h().createElement("div",{className:A()(w.A.node,{[w.A.ready]:null!=c&&null!=d}),ref:p,style:{left:c,top:d},onClick:f},"start"===n?h().createElement(_.H,null):"end"===n?h().createElement(O.s,{active:m}):"requirement"===n?h().createElement(I.O,{content:s,startTime:r,loading:o,active:m}):"instruction"===n?h().createElement(Y.L,{content:a.instruction,loading:l}):"view"===n?h().createElement(z.Y,{job:a,active:m}):h().createElement(W.W,{state:i,job:a,active:m}))}i=Ue,({e:[q,G,K,X,Q,J,Z,ee,te,ne,ie,ae,se,re,oe,le,ce,de,ue,he,me,pe,ge,be,B],c:[we,$]}=(0,d.A)(i,[fe("ai-portal.cruise-canvas",{shadowOptions:!1})],[[Ae(),1,"taskId"],[Ae({attribute:!1}),1,"task"],[Ae({attribute:!1}),1,"jobs"],[Ae({type:Number}),1,"replay"],[ve({type:"share"}),1,"shareEvent",e=>(0,c.A)(Me,e),(e,t)=>(0,l.A)(Me,e,t)],[ve({type:"pause"}),1,"pauseEvent",e=>(0,c.A)(_e,e),(e,t)=>(0,l.A)(_e,e,t)],[ve({type:"resume"}),1,"resumeEvent",e=>(0,c.A)(Ye,e),(e,t)=>(0,l.A)(Ye,e,t)],[ve({type:"cancel"}),1,"cancelEvent",e=>(0,c.A)(Oe,e),(e,t)=>(0,l.A)(Oe,e,t)],[ke(),2,"resumed"]],0,(e=>De.has((0,r.A)(e))),p.ReactNextElement)),$();var Le=n(71451),Ve=n(41030);let Fe=function(e){return e.ASK_ANY_THING="ASK_ANYTHING",e.COMMON_TASKS="COMMON_TASKS",e}({});const He="bricks/ai-portal/chat-box",Be={en:{[Fe.ASK_ANY_THING]:"Ask anything",[Fe.COMMON_TASKS]:"Common tasks"},zh:{[Fe.ASK_ANY_THING]:"询问任何问题",[Fe.COMMON_TASKS]:"常用任务"}},$e=b.i18n.getFixedT(null,He),qe=n.p+"images/af389fa6.svg";var Ge,Ke=n(47008);let Xe,Qe,Je,Ze,et,tt,nt,it,at,st,rt,ot,lt,ct,dt;(0,b.initializeI18n)(He,Be);const ut=(0,p.wrapBrick)("eo-icon"),{defineElement:ht,property:mt,event:pt}=(0,m.createDecorators)();let gt;var bt=new WeakMap,ft=new WeakMap,At=new WeakMap,vt=new WeakMap,kt=new WeakMap,xt=new WeakMap,Et=new WeakSet,wt=new WeakMap;class yt extends p.ReactNextElement{constructor(){super(...arguments),(0,a.A)(this,Et),(0,s.A)(this,bt,Qe(this)),(0,s.A)(this,ft,(Je(this),Ze(this))),(0,s.A)(this,At,(et(this),tt(this))),(0,s.A)(this,vt,(nt(this),it(this))),(0,s.A)(this,kt,(at(this),st(this))),(0,s.A)(this,xt,(rt(this),ot(this))),(0,s.A)(this,wt,(dt(this),e=>{(0,o.A)(Et,this,lt).emit(e)}))}get disabled(){return(0,c.A)(bt,this)}set disabled(e){(0,l.A)(bt,this,e)}get placeholder(){return(0,c.A)(ft,this)}set placeholder(e){(0,l.A)(ft,this,e)}get autoFocus(){return(0,c.A)(At,this)}set autoFocus(e){(0,l.A)(At,this,e)}get suggestions(){return(0,c.A)(vt,this)}set suggestions(e){(0,l.A)(vt,this,e)}get suggestionsLabel(){return(0,c.A)(kt,this)}set suggestionsLabel(e){(0,l.A)(kt,this,e)}render(){return h().createElement(Nt,{disabled:this.disabled,placeholder:this.placeholder,autoFocus:this.autoFocus,suggestions:this.suggestions,suggestionsLabel:this.suggestionsLabel,onSubmit:(0,c.A)(wt,this)})}}function Nt(e){let{disabled:t,placeholder:n,autoFocus:i,suggestions:a,suggestionsLabel:s,onSubmit:r}=e;const o=(0,u.useRef)(null),l=(0,u.useRef)(null),[c,d]=(0,u.useState)(""),m=(0,u.useRef)(""),p=(0,u.useCallback)((e=>{e.currentTarget.value&&(null==r||r(e.currentTarget.value))}),[r]),g=(0,u.useCallback)((e=>{m.current=e.target.value,d(e.target.value)}),[]),b=(0,u.useCallback)((()=>{null==r||r(m.current)}),[r]);(0,u.useEffect)((()=>{i&&Promise.resolve().then((()=>{var e;null===(e=l.current)||void 0===e||e.focus()}))}),[]);const f=(0,u.useMemo)((()=>null!=a&&a.length?(0,Ve.chunk)(a,Math.max(2,Math.ceil(a.length/2))):[]),[a]),A=(0,u.useCallback)((e=>{m.current=e.content,d(e.content),setTimeout((()=>{var e;null===(e=l.current)||void 0===e||e.focus()}))}),[]);return h().createElement("div",{className:"root"},h().createElement("div",{className:"container",ref:o},h().createElement(Le.e,{containerRef:o,ref:l,value:c,minRows:3,paddingSize:62,autoResize:!0,disabled:t,placeholder:null!=n?n:$e(Fe.ASK_ANY_THING),submitWhen:"enter-without-shift",onSubmit:p,onChange:g}),h().createElement("button",{className:"btn-send",disabled:!c,onClick:b},h().createElement(ut,{lib:"fa",prefix:"fas",icon:"arrow-up"}))),!(null==f||!f.length)&&h().createElement("div",{className:"suggestions"},h().createElement("div",{className:"heading"},h().createElement("img",{className:"icon",src:qe,width:16,height:16}),h().createElement("span",null,null!=s?s:$e(Fe.COMMON_TASKS))),f.map(((e,t)=>h().createElement(St,{key:t,suggestions:e,pixelPerSecond:10*(t+2),onSelect:A})))))}function St(e){let{suggestions:t,pixelPerSecond:n,onSelect:i}=e;const a=(0,u.useRef)(null),s=(0,u.useRef)(null),[r,o]=(0,u.useState)(0);return(0,u.useEffect)((()=>{const e=a.current,t=s.current;if(!e||!t)return;let i,r,l,c,d=0;const u=(t.offsetWidth-7)/2+7;function h(e){r=e,void 0===l&&(l=e),void 0!==i&&(d+=e-i,i=void 0),o((e-l-d)/1e3*n%u),c=requestAnimationFrame(h)}c=requestAnimationFrame(h);const m=()=>{cancelAnimationFrame(c),i=r},p=()=>{c=requestAnimationFrame(h)};return e.addEventListener("mouseenter",m),e.addEventListener("mouseleave",p),()=>{cancelAnimationFrame(c),e.removeEventListener("mouseenter",m),e.removeEventListener("mouseleave",p)}}),[t,n]),h().createElement("div",{className:"carousel",ref:a},h().createElement("ul",{className:"list",ref:s,style:{transform:`translateX(${-r}px)`}},[...t,...t].map(((e,t)=>h().createElement("li",{key:t},h().createElement("div",{className:"item",onClick:()=>i(e),title:e.content},h().createElement("div",{className:"title"},e.title),h().createElement("div",{className:"content"},e.content)))))))}Ge=yt,({e:[Qe,Je,Ze,et,tt,nt,it,at,st,rt,ot,lt,ct,dt],c:[gt,Xe]}=(0,d.A)(Ge,[ht("ai-portal.chat-box",{styleTexts:[Ke.A]})],[[mt({type:Boolean}),1,"disabled"],[mt(),1,"placeholder"],[mt({type:Boolean}),1,"autoFocus"],[mt({attribute:!1}),1,"suggestions"],[mt(),1,"suggestionsLabel"],[pt({type:"message.submit"}),1,"messageSubmit",e=>(0,c.A)(xt,e),(e,t)=>(0,l.A)(xt,e,t)]],0,(e=>wt.has((0,r.A)(e))),p.ReactNextElement)),Xe();var Tt,Mt=n(82165);let Ct;const{defineElement:Rt}=(0,m.createDecorators)();let _t;class It extends p.ReactNextElement{render(){return h().createElement(Yt,null)}}function Yt(){return h().createElement("slot",null)}Tt=It,[_t,Ct]=(0,d.A)(Tt,[Rt("ai-portal.home-container",{styleTexts:[Mt.A]})],[],0,void 0,p.ReactNextElement).c,Ct();var Wt=n(21302),Ot=n.n(Wt);let zt=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 Dt="bricks/ai-portal/chat-history",Ut={en:{[zt.TODAY]:"Today",[zt.YESTERDAY]:"Yesterday",[zt.PREVIOUS_7_DAYS]:"Previous 7 days",[zt.PREVIOUS_30_DAYS]:"Previous 30 days"},zh:{[zt.TODAY]:"今天",[zt.YESTERDAY]:"昨天",[zt.PREVIOUS_7_DAYS]:"过去7天",[zt.PREVIOUS_30_DAYS]:"过去30天"}},jt=b.i18n.getFixedT(null,Dt);var Pt,Lt=n(21411);let Vt,Ft,Ht,Bt,$t,qt,Gt,Kt,Xt,Qt,Jt,Zt,en,tn,nn;(0,b.initializeI18n)(Dt,Ut);const an=(0,p.wrapBrick)("eo-icon"),sn=(0,p.wrapBrick)("eo-link"),rn=(0,p.wrapBrick)("eo-mini-actions",{onActionClick:"action.click",onVisibleChange:"visible.change"}),{defineElement:on,property:ln,event:cn}=(0,m.createDecorators)();let dn;var un=new WeakMap,hn=new WeakMap,mn=new WeakMap,pn=new WeakMap,gn=new WeakSet,bn=new WeakMap,fn=new WeakMap,An=new WeakMap;class vn extends p.ReactNextElement{constructor(){super(...arguments),(0,a.A)(this,gn),(0,s.A)(this,un,Ft(this)),(0,s.A)(this,hn,(Ht(this),Bt(this))),(0,s.A)(this,mn,($t(this),qt(this))),(0,s.A)(this,pn,(Gt(this),Kt(this))),(0,s.A)(this,bn,(Jt(this),e=>{(0,o.A)(gn,this,Xt).emit(e)})),(0,s.A)(this,fn,Zt(this)),(0,s.A)(this,An,(nn(this),e=>{(0,o.A)(gn,this,en).emit({nextToken:e})}))}get list(){return(0,c.A)(un,this)}set list(e){(0,l.A)(un,this,e)}get actions(){return(0,c.A)(hn,this)}set actions(e){(0,l.A)(hn,this,e)}get nextToken(){return(0,c.A)(mn,this)}set nextToken(e){(0,l.A)(mn,this,e)}render(){return h().createElement(kn,{root:this,list:this.list,actions:this.actions,nextToken:this.nextToken,onActionClick:(0,c.A)(bn,this),onLoadMore:(0,c.A)(An,this)})}}function kn(e){let{root:t,list:n,actions:i,nextToken:a,onActionClick:s,onLoadMore:r}=e;const o=(0,u.useMemo)((()=>{const e=new Map,t=Ot()(),i=t.startOf("day"),a=i.clone().subtract(1,"day"),s=i.clone().subtract(7,"days"),r=i.clone().subtract(30,"days"),o=+i/1e3,l=+a/1e3,c=+s/1e3,d=+r/1e3,u=+t.startOf("year")/1e3;for(const t of null!=n?n:[]){let n;n=t.startTime>=o?jt(zt.TODAY):t.startTime>=l?jt(zt.YESTERDAY):t.startTime>=c?jt(zt.PREVIOUS_7_DAYS):t.startTime>=d?jt(zt.PREVIOUS_30_DAYS):t.startTime>=u?Ot()(1e3*t.startTime).format("MMMM"):Ot()(1e3*t.startTime).format("YYYY");let i=e.get(n);i||e.set(n,i={title:n,items:[]}),i.items.push(t)}return[...e.values()]}),[n]),[l,c]=(0,u.useState)(null),d=(0,u.useRef)(null);return(0,u.useEffect)((()=>{const e=d.current;if(!e||!a)return;const n=new IntersectionObserver((e=>{for(const t of e)t.isIntersecting&&r(a)}),{root:t});return n.observe(e),()=>{n.disconnect()}}),[a,r,t]),n?h().createElement(h().Fragment,null,h().createElement("ul",null,o.map((e=>h().createElement("li",{key:e.title,className:"group"},h().createElement("div",{className:"group-title"},e.title),h().createElement("ul",{className:"items"},e.items.map((e=>h().createElement("li",{key:e.id},h().createElement(sn,{className:A()("item",{active:l===e.id}),url:e.url},h().createElement("div",{className:"item-title",title:e.title},e.title),h().createElement(rn,{className:"actions",actions:i,onActionClick:t=>{s({action:t.detail,item:e})},onVisibleChange:t=>{c(t.detail?e.id:null)}}),!D.QB.includes(e.state)&&h().createElement("div",{className:"working"})))))))))),a&&h().createElement("div",{className:"load-more",ref:d},h().createElement(an,{lib:"antd",icon:"loading-3-quarters",spinning:!0}))):h().createElement("div",{className:"loading"},h().createElement(an,{lib:"antd",theme:"outlined",icon:"loading-3-quarters",spinning:!0}))}Pt=vn,({e:[Ft,Ht,Bt,$t,qt,Gt,Kt,Xt,Qt,Jt,Zt,en,tn,nn],c:[dn,Vt]}=(0,d.A)(Pt,[on("ai-portal.chat-history",{styleTexts:[Lt.A]})],[[ln({attribute:!1}),1,"list"],[ln({attribute:!1}),1,"actions"],[ln(),1,"nextToken"],[cn({type:"action.click"}),1,"actionClick",e=>(0,c.A)(pn,e),(e,t)=>(0,l.A)(pn,e,t)],[cn({type:"load.more"}),1,"loadMore",e=>(0,c.A)(fn,e),(e,t)=>(0,l.A)(fn,e,t)]],0,(e=>An.has((0,r.A)(e))),p.ReactNextElement)),Vt();var xn,En=n(89575),wn=n(24);let yn,Nn,Sn,Tn,Mn,Cn,Rn,_n,In,Yn,Wn,On,zn,Dn,Un,jn,Pn,Ln,Vn,Fn,Hn;const Bn=(0,p.wrapBrick)("eo-mini-line-chart"),{defineElement:$n,property:qn}=(0,m.createDecorators)();let Gn;var Kn=new WeakMap,Xn=new WeakMap,Qn=new WeakMap,Jn=new WeakMap,Zn=new WeakMap,ei=new WeakMap,ti=new WeakMap,ni=new WeakMap,ii=new WeakMap,ai=new WeakMap;class si extends p.ReactNextElement{constructor(){super(...arguments),(0,s.A)(this,Kn,Nn(this)),(0,s.A)(this,Xn,(Sn(this),Tn(this))),(0,s.A)(this,Qn,(Mn(this),Cn(this))),(0,s.A)(this,Jn,(Rn(this),_n(this))),(0,s.A)(this,Zn,(In(this),Yn(this))),(0,s.A)(this,ei,(Wn(this),On(this))),(0,s.A)(this,ti,(zn(this),Dn(this))),(0,s.A)(this,ni,(Un(this),jn(this))),(0,s.A)(this,ii,(Pn(this),Ln(this))),(0,s.A)(this,ai,(Vn(this),Fn(this))),Hn(this)}get label(){return(0,c.A)(Kn,this)}set label(e){(0,l.A)(Kn,this,e)}get value(){return(0,c.A)(Xn,this)}set value(e){(0,l.A)(Xn,this,e)}get size(){return(0,c.A)(Qn,this)}set size(e){(0,l.A)(Qn,this,e)}get lineColor(){return(0,c.A)(Jn,this)}set lineColor(e){(0,l.A)(Jn,this,e)}get showArea(){return(0,c.A)(Zn,this)}set showArea(e){(0,l.A)(Zn,this,e)}get min(){return(0,c.A)(ei,this)}set min(e){(0,l.A)(ei,this,e)}get max(){return(0,c.A)(ti,this)}set max(e){(0,l.A)(ti,this,e)}get xField(){return(0,c.A)(ni,this)}set xField(e){(0,l.A)(ni,this,e)}get yField(){return(0,c.A)(ii,this)}set yField(e){(0,l.A)(ii,this,e)}get data(){return(0,c.A)(ai,this)}set data(e){(0,l.A)(ai,this,e)}render(){return h().createElement(ri,{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 ri(e){let{label:t,value:n,size:i,...a}=e;return"small"===i?h().createElement("div",{className:"container"},h().createElement("div",{className:"label-and-stat"},h().createElement("div",{className:"label"},t),h().createElement("div",{className:"stat"},n)),h().createElement("div",{className:"chart"},h().createElement(Bn,(0,En.A)({},a,{lineWidth:1.5,width:"auto",height:"55"})))):h().createElement("div",{className:"container"},h().createElement("div",{className:"label"},t),h().createElement("div",{className:"stat-and-chart"},h().createElement("div",{className:"chart"},h().createElement(Bn,(0,En.A)({},a,{lineWidth:2,width:"auto",height:"92"}))),h().createElement("div",{className:"stat"},n)))}xn=si,({e:[Nn,Sn,Tn,Mn,Cn,Rn,_n,In,Yn,Wn,On,zn,Dn,Un,jn,Pn,Ln,Vn,Fn,Hn],c:[Gn,yn]}=(0,d.A)(xn,[$n("ai-portal.stat-with-mini-chart",{styleTexts:[wn.A]})],[[qn(),1,"label"],[qn(),1,"value"],[qn(),1,"size"],[qn(),1,"lineColor"],[qn({type:Boolean}),1,"showArea"],[qn({type:Number}),1,"min"],[qn({type:Number}),1,"max"],[qn(),1,"xField"],[qn(),1,"yField"],[qn({attribute:!1}),1,"data"]],0,void 0,p.ReactNextElement)),yn();const oi=n.p+"images/7385e5f5.png";var li,ci=n(31653);let di;const{defineElement:ui}=(0,m.createDecorators)();let hi;class mi extends p.ReactNextElement{render(){return h().createElement(pi,null)}}function pi(){return h().createElement("img",{src:oi,alt:"Elevo",width:95,height:26})}li=mi,[hi,di]=(0,d.A)(li,[ui("ai-portal.elevo-logo",{styleTexts:[ci.A]})],[],0,void 0,p.ReactNextElement).c,di();let gi=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}({});const bi="bricks/ai-portal/elevo-sidebar",fi={en:{[gi.NEW_CHAT]:"New chat",[gi.LOGOUT]:"Logout",[gi.TODAY]:"Today",[gi.YESTERDAY]:"Yesterday",[gi.PREVIOUS_7_DAYS]:"Previous 7 days",[gi.PREVIOUS_30_DAYS]:"Previous 30 days"},zh:{[gi.NEW_CHAT]:"新对话",[gi.LOGOUT]:"登出",[gi.TODAY]:"今天",[gi.YESTERDAY]:"昨天",[gi.PREVIOUS_7_DAYS]:"过去7天",[gi.PREVIOUS_30_DAYS]:"过去30天"}},Ai=b.i18n.getFixedT(null,bi);var vi=n(61408);const ki=(0,p.wrapBrick)("eo-icon"),xi=(0,p.wrapBrick)("eo-link"),Ei=(0,p.wrapBrick)("eo-dropdown-actions",{onActionClick:"action.click",onVisibleChange:"visible.change"}),wi=(0,p.wrapBrick)("eo-easyops-avatar"),yi=(0,p.wrapBrick)("eo-mini-actions",{onActionClick:"action.click",onVisibleChange:"visible.change"});var Ni=n(57372);const Si=async(e,t)=>(await Ni.http.post("api/gateway/logic.llm.aiops_service/api/v1/llm/agent/flow/search",e,t)).data;function Ti(e){let{actions:t=[],urlTemplate:n,onActionClick:i,onHistoryClick:a}=e;const s=(0,u.useRef)(null),[r,o]=(0,u.useState)(null),[l,c]=(0,u.useState)(),[d,m]=(0,u.useState)();(0,u.useEffect)((()=>{Promise.all([Si({next_token:d}),new Promise((e=>setTimeout(e,500)))]).then((e=>{let[t]=e;o((e=>[...null!=e?e:[],...t.data])),c(t.next_token)})).catch((e=>{console.error("Error loading chat history:",e)}))}),[d]);const p=(0,u.useMemo)((()=>{const e=new Map,t=Ot()(),n=t.startOf("day"),i=n.clone().subtract(1,"day"),a=n.clone().subtract(7,"days"),s=n.clone().subtract(30,"days"),o=+n/1e3,l=+i/1e3,c=+a/1e3,d=+s/1e3,u=+t.startOf("year")/1e3;for(const t of null!=r?r:[]){let n;n=t.startTime>=o?Ai(gi.TODAY):t.startTime>=l?Ai(gi.YESTERDAY):t.startTime>=c?Ai(gi.PREVIOUS_7_DAYS):t.startTime>=d?Ai(gi.PREVIOUS_30_DAYS):t.startTime>=u?Ot()(1e3*t.startTime).format("MMMM"):Ot()(1e3*t.startTime).format("YYYY");let i=e.get(n);i||e.set(n,i={title:n,items:[]}),i.items.push(t)}return[...e.values()]}),[r]),[g,b]=(0,u.useState)(null),f=(0,u.useRef)(null);return(0,u.useEffect)((()=>{const e=f.current,t=s.current;if(!e||!l||!t)return;const n=new IntersectionObserver((e=>{for(const t of e)t.isIntersecting&&m(l)}),{root:t});return n.observe(e),()=>{n.disconnect()}}),[l]),r?h().createElement("div",{className:"history",ref:s},h().createElement("ul",null,p.map((e=>h().createElement("li",{key:e.title,className:"group"},h().createElement("div",{className:"group-title"},e.title),h().createElement("ul",{className:"items"},e.items.map((e=>{return h().createElement("li",{key:e.id},h().createElement(xi,(0,En.A)({className:A()("item",{active:g===e.id}),onClick:a},n?{url:(s=n,r=e,null==s?void 0:s.replace(/{{(.*?)}}/g,((e,t)=>(0,Ve.get)(r,t))))}:null),h().createElement("div",{className:"item-title",title:e.title},e.title),h().createElement(yi,{className:"actions",actions:t,onActionClick:t=>{i({action:t.detail,item:e})},onVisibleChange:t=>{b(t.detail?e.id:null)}}),!D.QB.includes(e.state)&&h().createElement("div",{className:"working"})));var s,r}))))))),l&&h().createElement("div",{className:"load-more",ref:f},h().createElement(ki,{lib:"antd",icon:"loading-3-quarters",spinning:!0}))):h().createElement("div",{className:"history"},h().createElement("div",{className:"loading"},h().createElement(ki,{lib:"antd",theme:"outlined",icon:"loading-3-quarters",spinning:!0})))}var Mi;let Ci,Ri,_i,Ii,Yi,Wi,Oi,zi,Di,Ui,ji,Pi,Li,Vi,Fi,Hi,Bi,$i,qi,Gi,Ki;(0,b.initializeI18n)(bi,fi);const Xi=[{icon:{lib:"fa",prefix:"fas",icon:"arrow-right-from-bracket"},text:Ai(gi.LOGOUT)}],{defineElement:Qi,property:Ji,event:Zi}=(0,m.createDecorators)();let ea;var ta=new WeakMap,na=new WeakMap,ia=new WeakMap,aa=new WeakMap,sa=new WeakMap,ra=new WeakMap,oa=new WeakMap,la=new WeakSet,ca=new WeakMap,da=new WeakMap,ua=new WeakMap;class ha extends p.ReactNextElement{constructor(){super(...arguments),(0,a.A)(this,la),(0,s.A)(this,ta,Ri(this)),(0,s.A)(this,na,(_i(this),Ii(this))),(0,s.A)(this,ia,(Yi(this),Wi(this))),(0,s.A)(this,aa,(Oi(this),zi(this))),(0,s.A)(this,sa,(Di(this),Ui(this))),(0,s.A)(this,ra,(ji(this),Pi(this))),(0,s.A)(this,oa,(Li(this),Vi(this))),(0,s.A)(this,ca,(Bi(this),()=>{(0,o.A)(la,this,Fi).emit()})),(0,s.A)(this,da,$i(this)),(0,s.A)(this,ua,(Ki(this),e=>{(0,o.A)(la,this,qi).emit(e)}))}get userInstanceId(){return(0,c.A)(ta,this)}set userInstanceId(e){(0,l.A)(ta,this,e)}get behavior(){return(0,c.A)(na,this)}set behavior(e){(0,l.A)(na,this,e)}get logoUrl(){return(0,c.A)(ia,this)}set logoUrl(e){(0,l.A)(ia,this,e)}get newChatUrl(){return(0,c.A)(aa,this)}set newChatUrl(e){(0,l.A)(aa,this,e)}get historyUrlTemplate(){return(0,c.A)(sa,this)}set historyUrlTemplate(e){(0,l.A)(sa,this,e)}get historyActions(){return(0,c.A)(ra,this)}set historyActions(e){(0,l.A)(ra,this,e)}render(){return h().createElement(ma,{userInstanceId:this.userInstanceId,behavior:this.behavior,logoUrl:this.logoUrl,newChatUrl:this.newChatUrl,historyUrlTemplate:this.historyUrlTemplate,historyActions:this.historyActions,onLogout:(0,c.A)(ca,this),onActionClick:(0,c.A)(ua,this)})}}function ma(e){let{userInstanceId:t,behavior:n,logoUrl:i,newChatUrl:a,historyUrlTemplate:s,historyActions:r,onLogout:o,onActionClick:l}=e;const[c,d]=(0,u.useState)("drawer"===n),m=(0,u.useCallback)((()=>{d(!0)}),[]),p=(0,u.useCallback)((()=>{d(!1)}),[]);(0,u.useEffect)((()=>{"drawer"===n&&d(!0)}),[n]);const g=(0,u.useCallback)((()=>{d(!0)}),[]),b=(0,u.useCallback)((()=>{"drawer"===n&&d(!0)}),[n]);return h().createElement("div",{className:A()("container",{collapsed:c})},"drawer"===n&&!c&&h().createElement("div",{className:"mask",onClick:g}),h().createElement("div",{className:"sidebar"},h().createElement("div",{className:"logo-bar"},h().createElement(xi,{url:i,className:"logo-link"},h().createElement("img",{className:"logo",alt:"Elevo",src:oi,width:95,height:26})),h().createElement("button",{className:"toggle",onClick:m},h().createElement(ki,{lib:"easyops",icon:"sidebar"}))),h().createElement(xi,{className:"new-chat",url:a},h().createElement(ki,{className:"new-chat-icon",lib:"easyops",icon:"new-chat"}),Ai(gi.NEW_CHAT)),h().createElement(Ti,{urlTemplate:s,actions:r,onActionClick:l,onHistoryClick:b}),h().createElement("div",{className:"footer"},h().createElement(Ei,{className:"dropdown",actions:Xi,onActionClick:o},h().createElement("button",{className:"account"},h().createElement(wi,{nameOrInstanceId:t,showName:!0,size:"xs"}))))),h().createElement("div",{className:"alternative"},h().createElement("button",{className:"toggle",onClick:p},h().createElement(ki,{lib:"easyops",icon:"sidebar"})),h().createElement(xi,{className:"new-chat",url:a},h().createElement(ki,{className:"new-chat-icon",lib:"easyops",icon:"new-chat"}),Ai(gi.NEW_CHAT))))}Mi=ha,({e:[Ri,_i,Ii,Yi,Wi,Oi,zi,Di,Ui,ji,Pi,Li,Vi,Fi,Hi,Bi,$i,qi,Gi,Ki],c:[ea,Ci]}=(0,d.A)(Mi,[Qi("ai-portal.elevo-sidebar",{styleTexts:[vi.A]})],[[Ji(),1,"userInstanceId"],[Ji(),1,"behavior"],[Ji(),1,"logoUrl"],[Ji(),1,"newChatUrl"],[Ji(),1,"historyUrlTemplate"],[Ji({attribute:!1}),1,"historyActions"],[Zi({type:"logout"}),1,"logout",e=>(0,c.A)(oa,e),(e,t)=>(0,l.A)(oa,e,t)],[Zi({type:"action.click"}),1,"actionClick",e=>(0,c.A)(da,e),(e,t)=>(0,l.A)(da,e,t)]],0,(e=>ua.has((0,r.A)(e))),p.ReactNextElement)),Ci()},31653:(e,t,n)=>{n.d(t,{A:()=>o});var i=n(36758),a=n.n(i),s=n(40935),r=n.n(s)()(a());r.push([e.id,":host{display:inline-block;padding:3px 0}:host([hidden]){display:none}img{display:block}",""]);const o=r.toString()},32360:(e,t,n)=>{e.exports=n.p+"images/6336f999.png"},47008:(e,t,n)=>{n.d(t,{A:()=>h});var i=n(36758),a=n.n(i),s=n(40935),r=n.n(s),o=n(20062),l=n.n(o),c=new URL(n(91107),n.b),d=r()(a()),u=l()(c);d.push([e.id,`:host{display:block}:host([hidden]){display:none}*{box-sizing:border-box}.root{color:#262626;background-color:#e1e3ec;background-image:url(${u});background-size:694px 144px;background-position:top left;background-repeat:no-repeat;box-shadow:inset 0px 2px 5px 1px rgba(42,46,59,0.1);border-radius:20px;padding:12px}.container{position:relative}textarea{display:block;width:100%;padding:10px 16px 52px;color:var(--antd-input-color);background:rgba(255,255,255,0.8);border-radius:14px;-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:130px}textarea::placeholder{color:rgba(0,0,0,0.4)}.btn-send:focus,\ntextarea:focus{outline:none}.btn-send{position:absolute;bottom:14px;right:14px;width:28px;height:28px;display:flex;align-items:center;justify-content:center;background:#2540ff;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}.suggestions{margin-top:19px}.heading{display:flex;align-items:center;padding:0 5px;margin-bottom:8px}.icon{margin-right:5px}.carousel{overflow:hidden}.carousel + .carousel{margin-top:7px}.list{display:flex;width:max-content;list-style:none;margin:0;padding:0;font-size:12px}.item{background:rgba(255,255,255,0.4);border-radius:12px;border:1px solid #dcdee6;padding:12px;max-width:330px;cursor:pointer}.item:hover{background:rgba(255,255,255,0.5);border:1px solid rgba(37,64,255,0.3)}.list > li + li{margin-left:7px}.title{margin-bottom:4px}.content{color:rgba(0,0,0,0.45);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.tooltip{display:block}`,""]);const h=d.toString()},61408:(e,t,n)=>{n.d(t,{A:()=>o});var i=n(36758),a=n.n(i),s=n(40935),r=n.n(s)()(a());r.push([e.id,':host{display:block}:host([hidden]){display:none}*{box-sizing:border-box}.sidebar{position:relative;width:261px;height:100%;background:#f6f7f9;border-right:1px solid #e3e5eb;padding:26px 16px 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}.logo-link::part(link){display:block}.logo{vertical-align:middle}.toggle{color:#595959;font-size:18px;width:28px;height:28px;display:flex;align-items:center;justify-content:space-between;background:none;border:none;cursor:pointer;border-radius:8px}.toggle:hover{background:rgba(0,0,0,0.04)}.new-chat::part(link){display:flex;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:23px}.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 -16px}.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:14px;left:16px;display:flex;align-items:center;opacity:0;z-index:1;transition:opacity 0.2s ease-in-out}.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}.collapsed{width:0;overflow:visible}.collapsed .sidebar{transform:translateX(-100%)}.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;background:var(--antd-modal-mask-bg)}.history{flex:1;min-height:0;overflow-y:auto;margin:0 -16px;padding:0 12px}.history ul{list-style:none;margin:0;padding:0}.history .loading{display:flex;justify-content:center;padding:8px}.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::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(.active) .actions{display:none}.history .working{width:8px;height:8px;border-radius:8px;background:#2540ff;margin:0 7px}.history .item:hover .working,.history .item.active .working{display:none}.history .load-more{display:flex;justify-content:center;align-items:center;height:36px}',""]);const o=r.toString()},82165:(e,t,n)=>{n.d(t,{A:()=>h});var i=n(36758),a=n.n(i),s=n(40935),r=n.n(s),o=n(20062),l=n.n(o),c=new URL(n(32360),n.b),d=r()(a()),u=l()(c);d.push([e.id,`:host{display:block;background-color:#fff;background-image:url(${u});background-position:center;background-size:cover;background-repeat:no-repeat;background-attachment:fixed}:host([hidden]){display:none}`,""]);const h=d.toString()},91107:(e,t,n)=>{e.exports=n.p+"images/eef4f2bd.png"}}]);
|
|
3
|
+
//# sourceMappingURL=6220.3515a915.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chunks/6220.3515a915.js","mappings":";8LAGIA,QAA0B,GAA4B,KAE1DA,EAAwBC,KAAK,CAACC,EAAOC,GAAI,21CAA41C,KAEr4C,QAAeH,EAAwBI,gFCJnCJ,QAA0B,GAA4B,KAE1DA,EAAwBC,KAAK,CAACC,EAAOC,GAAI,20BAC2E,KAEpH,QAAeH,EAAwBI,mjBCsDvCC,EAAAA,EAAAA,gBAAeC,EAAAA,GAAIC,EAAAA,GAEnB,MAAM,cAAEC,GAAa,SAAEC,GAAUC,MAAK,UAAEC,KAAWC,EAAAA,EAAAA,oBAE7CC,IAAwBC,EAAAA,EAAAA,MAAKC,IAS7BC,IAAwBC,EAAAA,EAAAA,YAAWC,IAEzC,IAAAC,GAAA,IAAAC,GAAA,IAAAC,QAAAC,GAAA,IAAAD,QAAAE,GAAA,IAAAF,QAAAG,GAAA,IAAAH,QAAAI,GAAA,IAAAJ,QAAAK,GAAA,IAAAC,QAAAC,GAAA,IAAAP,QAAAQ,GAAA,IAAAR,QAAAS,GAAA,IAAAT,QAAAU,GAAA,IAAAV,QAAAW,GAAA,IAAAX,QAAAY,GAAA,IAAAZ,QAAAa,GAAA,IAAAb,QAAAc,GAAA,IAAAd,QAIA,MAAAe,WAI2BC,EAAAA,iBAA8CC,WAAAA,GAAA,SAAAC,YAAAC,EAAAA,EAAAA,GAA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AAY,CAACC,GAAAA,MACb,EAEC9Z,KAAU,qBAGVA,KAAU,eAGVA,KAAU,cAGVA,KAAU,iBAGVA,KAAU,yBAGVA,GAAS,CAAEqU,WAAW,IAAQ,qBAG9BpU,GAAM,CAAEyG,KAAM,WAAW,WAAA6N,IAAA5Q,EAAAA,EAAAA,GAAArC,GAAAiT,GAAA,CAAAA,EAAA3Q,KAAAC,EAAAA,EAAAA,GAAAvC,GAAAiT,EAAA3Q,IAAA,CAOzB3D,GAAM,CAAEyG,KAAM,iBAAiB,gBAAA6N,IAAA5Q,EAAAA,EAAAA,GAAAnC,GAAA+S,GAAA,CAAAA,EAAA3Q,KAAAC,EAAAA,EAAAA,GAAArC,GAAA+S,EAAA3Q,KAAA,GAAA4Q,GAAAsG,GAAAnQ,KAAA8J,EAAAA,EAAAA,GAAAD,KA1BP5S,EAAAA,mBAAgBsS,0EC/CvC3U,QAA0B,GAA4B,KAE1DA,EAAwBC,KAAK,CAACC,EAAOC,GAAI,2FAA4F,KAErI,QAAeH,EAAwBI,kKCHnC4kB,EAAgC,IAAIC,IAAI,cACxCjlB,EAA0B,IAA4B,KACtDklB,EAAqC,IAAgCF,GAEzEhlB,EAAwBC,KAAK,CAACC,EAAOC,GAAI,8IAA8I+kB,8kDACm3B,KAE1iC,QAAellB,EAAwBI,gFCRnCJ,QAA0B,GAA4B,KAE1DA,EAAwBC,KAAK,CAACC,EAAOC,GAAI,q7FAAs7F,KAE/9F,QAAeH,EAAwBI,6GCHnC4kB,EAAgC,IAAIC,IAAI,cACxCjlB,EAA0B,IAA4B,KACtDklB,EAAqC,IAAgCF,GAEzEhlB,EAAwBC,KAAK,CAACC,EAAOC,GAAI,kEAAkE+kB,4IAA8K,KAEzR,QAAellB,EAAwBI","sources":["webpack:///./src/stat-with-mini-chart/styles.shadow.css","webpack:///./src/chat-history/styles.shadow.css","webpack:///./src/cruise-canvas/index.tsx","webpack:///./src/chat-box/i18n.ts","webpack:///./src/chat-box/index.tsx","webpack:///./src/home-container/index.tsx","webpack:///./src/chat-history/i18n.ts","webpack:///./src/chat-history/index.tsx","webpack:///./src/stat-with-mini-chart/index.tsx","webpack:///./src/elevo-logo/index.tsx","webpack:///./src/elevo-sidebar/i18n.ts","webpack:///./src/elevo-sidebar/bricks.ts","webpack:///../../node_modules/@next-api-sdk/llm-sdk/dist/esm/api/llm/agent_flow/searchTaskForAgentFlow.js","webpack:///./src/elevo-sidebar/ChatHistory.tsx","webpack:///./src/elevo-sidebar/index.tsx","webpack:///./src/elevo-logo/styles.shadow.css","webpack:///./src/chat-box/styles.shadow.css","webpack:///./src/elevo-sidebar/styles.shadow.css","webpack:///./src/home-container/styles.shadow.css"],"sourcesContent":["// 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;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)}`, \"\"]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___.toString();\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}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:#2540ff;margin:0 7px}.item:hover .working,\n.item.active .working{display:none}.load-more{display:flex;justify-content:center;align-items:center;height:36px}`, \"\"]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___.toString();\n","// istanbul ignore file: experimental\nimport React, {\n createRef,\n forwardRef,\n memo,\n useCallback,\n useContext,\n useEffect,\n useImperativeHandle,\n useMemo,\n useRef,\n useState,\n} from \"react\";\nimport { createDecorators, type EventEmitter } from \"@next-core/element\";\nimport { ReactNextElement } from \"@next-core/react-element\";\nimport { getRuntime, handleHttpError } from \"@next-core/runtime\";\nimport \"@next-core/theme\";\nimport { initializeI18n } from \"@next-core/i18n\";\nimport classNames from \"classnames\";\nimport ResizeObserver from \"resize-observer-polyfill\";\nimport { select, type Selection } from \"d3-selection\";\nimport { mergeRects } from \"@next-shared/diagram\";\nimport { NS, locales } from \"./i18n.js\";\nimport styles from \"./styles.module.css\";\nimport { useZoom } from \"./useZoom.js\";\nimport type {\n SizeTuple,\n GraphNode,\n Job,\n RequirementGraphNode,\n JobGraphNode,\n TaskBaseDetail,\n GraphEdge,\n} from \"./interfaces.js\";\nimport { useAutoCenter } from \"./useAutoCenter.js\";\nimport { useLayout } from \"./useLayout.js\";\nimport { useTaskDetail } from \"./useTaskDetail.js\";\nimport { useTaskGraph } from \"./useTaskGraph.js\";\nimport { PlanProgress } from \"./PlanProgress/PlanProgress.js\";\nimport { ZoomBar } from \"./ZoomBar/ZoomBar.js\";\nimport { NodeStart } from \"./NodeStart/NodeStart.js\";\nimport { NodeRequirement } from \"./NodeRequirement/NodeRequirement.js\";\nimport { NodeInstruction } from \"./NodeInstruction/NodeInstruction.js\";\nimport { NodeJob } from \"./NodeJob/NodeJob.js\";\nimport { NodeEnd } from \"./NodeEnd/NodeEnd.js\";\nimport { NodeView } from \"./NodeView/NodeView.js\";\nimport {\n CANVAS_PADDING_BOTTOM,\n CANVAS_PADDING_LEFT,\n CANVAS_PADDING_RIGHT,\n CANVAS_PADDING_TOP,\n DONE_STATES,\n GENERAL_DONE_STATES,\n} from \"./constants.js\";\nimport { WrappedIcon } from \"./bricks.js\";\nimport { CanvasContext } from \"./CanvasContext.js\";\nimport { ToolCallDetail } from \"./ToolCallDetail/ToolCallDetail.js\";\nimport { getScrollTo } from \"./utils/getScrollTo.js\";\nimport { handleKeyboardNav } from \"./utils/handleKeyboardNav.js\";\nimport { ExpandedView } from \"./ExpandedView/ExpandedView.js\";\nimport { ZoomTransform } from \"d3-zoom\";\n\ninitializeI18n(NS, locales);\n\nconst { defineElement, property, event, method } = createDecorators();\n\nconst MemoizedNodeComponent = memo(NodeComponent);\n\nexport interface CruiseCanvasProps {\n taskId?: string;\n task?: TaskBaseDetail;\n jobs?: Job[];\n replay?: number;\n}\n\nconst CruiseCanvasComponent = forwardRef(LegacyCruiseCanvasComponent);\n\n/**\n * 构件 `ai-portal.cruise-canvas`\n */\nexport\n@defineElement(\"ai-portal.cruise-canvas\", {\n // Will wrap v2 bricks which don't support in shadow DOM.\n shadowOptions: false,\n})\nclass CruiseCanvas extends ReactNextElement implements CruiseCanvasProps {\n @property()\n accessor taskId: string | undefined;\n\n @property({ attribute: false })\n accessor task: TaskBaseDetail | undefined;\n\n @property({ attribute: false })\n accessor jobs: Job[] | undefined;\n\n /**\n * 设置回放时消息之间的时间间隔,单位为秒。\n */\n @property({ type: Number })\n accessor replay: number | undefined;\n\n @event({ type: \"share\" })\n accessor #shareEvent!: EventEmitter<void>;\n\n #onShare = () => {\n this.#shareEvent.emit();\n };\n\n @event({ type: \"pause\" })\n accessor #pauseEvent!: EventEmitter<void>;\n\n #onPause = () => {\n this.#pauseEvent.emit();\n };\n\n @event({ type: \"resume\" })\n accessor #resumeEvent!: EventEmitter<void>;\n\n #onResume = () => {\n this.#resumeEvent.emit();\n };\n\n @event({ type: \"cancel\" })\n accessor #cancelEvent!: EventEmitter<void>;\n\n #onCancel = () => {\n this.#cancelEvent.emit();\n };\n\n #ref = createRef<CruiseCanvasRef>();\n\n @method()\n resumed() {\n this.#ref.current?.resumed();\n }\n\n render() {\n return (\n <CruiseCanvasComponent\n taskId={this.taskId}\n jobs={this.jobs}\n task={this.task}\n replay={this.replay}\n onShare={this.#onShare}\n onPause={this.#onPause}\n onResume={this.#onResume}\n onCancel={this.#onCancel}\n ref={this.#ref}\n />\n );\n }\n}\n\ninterface CruiseCanvasComponentProps extends CruiseCanvasProps {\n onShare: () => void;\n onPause: () => void;\n onResume: () => void;\n onCancel: () => void;\n}\n\ninterface ScrollToOptions {\n nodeId?: string;\n jobId?: string;\n\n /**\n * @default \"auto\"\n */\n behavior?: \"smooth\" | \"instant\" | \"auto\";\n\n /**\n * When set to \"start\", force scroll even if the node is fully visible.\n *\n * @default \"nearest\"\n */\n block?: \"start\" | \"nearest\";\n}\n\ninterface CruiseCanvasRef {\n resumed: () => void;\n}\n\nfunction LegacyCruiseCanvasComponent(\n {\n taskId,\n task: propTask,\n jobs: propJobs,\n replay,\n onShare,\n onPause,\n onResume,\n onCancel,\n }: CruiseCanvasComponentProps,\n ref: React.Ref<CruiseCanvasRef>\n) {\n const rootRef = useRef<HTMLDivElement>(null);\n const {\n task: _task,\n jobs: _jobs,\n plan: _plan,\n error,\n humanInputRef,\n resumedRef,\n } = useTaskDetail(taskId, replay);\n const task = taskId ? _task : propTask;\n const jobs = taskId ? _jobs : propJobs;\n const plan = taskId ? _plan : propTask?.plan;\n const graph = useTaskGraph(task, jobs);\n const rawNodes = graph?.nodes;\n const rawEdges = graph?.edges;\n const nav = graph?.nav;\n const views = graph?.views;\n const pageTitle = task?.title ?? \"\";\n const taskState = task?.state;\n const [activeNodeId, setActiveNodeId] = useState<string | null>(null);\n const currentNavId = useMemo(() => {\n if (activeNodeId) {\n const [type, jobId] = activeNodeId.split(\":\");\n if (type === \"job\" || type === \"view\") {\n return jobId;\n }\n }\n return null;\n }, [activeNodeId]);\n\n useImperativeHandle(\n ref,\n () => ({\n resumed: () => resumedRef.current?.(),\n }),\n [resumedRef]\n );\n\n // Enable transition after 3 seconds to avoid initial flicker\n const transitionEnabledRef = useRef(false);\n useEffect(() => {\n const timer = setTimeout(() => {\n transitionEnabledRef.current = true;\n }, 3e3);\n return () => {\n clearTimeout(timer);\n };\n }, []);\n\n const transitionRef = useRef(false);\n const selectTransition = useCallback(\n (\n selection: Selection<HTMLDivElement, unknown, null, undefined>,\n duration?: number\n ) => {\n if (!transitionEnabledRef.current || duration === 0) {\n return selection;\n }\n transitionRef.current = true;\n return selection\n .transition()\n .duration(duration ?? 300)\n .ease((t) => t * (2 - t)) // Ease in-out\n .on(\"end\", () => {\n transitionRef.current = false;\n });\n },\n []\n );\n\n useEffect(() => {\n getRuntime().applyPageTitle(pageTitle);\n }, [pageTitle]);\n\n useEffect(() => {\n if (error) {\n handleHttpError(error);\n }\n }, [error]);\n\n const humanInput = useCallback(\n (jobId: string, input: string) => {\n humanInputRef.current?.(jobId, input);\n },\n [humanInputRef]\n );\n\n const [sizeMap, setSizeMap] = useState<Map<string, SizeTuple> | null>(null);\n const onNodeResize = useCallback((id: string, size: SizeTuple | null) => {\n // Handle resize logic here\n setSizeMap((prev) => {\n if (!size) {\n if (!prev) {\n return null;\n }\n const newMap = new Map(prev);\n const deleted = newMap.delete(id);\n return deleted ? newMap : prev;\n }\n return prev ? new Map(prev).set(id, size) : new Map([[id, size]]);\n });\n }, []);\n\n const { sizeReady, nodes, edges } = useLayout({\n rawNodes,\n rawEdges,\n state: taskState,\n sizeMap,\n });\n\n // Disable auto scroll when the user manually scrolled up\n const detectScrolledUpRef = useRef(false);\n const manualScrolledUpRef = useRef(false);\n\n const [hoverOnScrollableContent, setHoverOnScrollableContent] =\n useState(false);\n\n const { grabbing, transform, transformRef, zoomer /* , scaleRange */ } =\n useZoom({\n rootRef,\n zoomable: sizeReady,\n scrollable: sizeReady && !hoverOnScrollableContent,\n pannable: sizeReady,\n manualScrolledUpRef,\n });\n\n const { centered, setCentered, reCenterRef } = useAutoCenter({\n nodes,\n sizeReady,\n zoomer,\n rootRef,\n selectTransition,\n });\n\n const taskDone = DONE_STATES.includes(taskState ?? \"working\");\n const taskLoading = !taskDone && nodes.length === 2;\n\n const nonLeafNodes = useMemo(() => {\n return new Set<string>(edges.map((edge) => edge.source));\n }, [edges]);\n\n const bottom = useMemo(() => {\n if (!sizeReady) {\n return null;\n }\n\n const leafNodes: GraphNode[] = [];\n for (const node of nodes) {\n if (!nonLeafNodes.has(node.id)) {\n leafNodes.push(node);\n }\n }\n if (leafNodes.length > 0) {\n const y1 = Math.max(\n ...leafNodes.map((node) => node.view!.y + node.view!.height)\n );\n return y1;\n }\n\n return null;\n }, [nodes, nonLeafNodes, sizeReady]);\n\n const bottomRef = useRef<number | null>(null);\n useEffect(() => {\n bottomRef.current = bottom;\n }, [bottom]);\n\n // Make the latest (bottom most) node visible\n useEffect(() => {\n const root = rootRef.current;\n if (\n !root ||\n bottom === null ||\n (detectScrolledUpRef.current && manualScrolledUpRef.current)\n ) {\n return;\n }\n const { offsetHeight } = root;\n const transform = transformRef.current;\n const transformedBottom = bottom * transform.k + transform.y;\n const diffY = offsetHeight - CANVAS_PADDING_BOTTOM - transformedBottom;\n if (diffY < 0) {\n // Use `zoomer.transform()` which will not be restricted to its translate/scale extent\n zoomer.transform(\n selectTransition(\n select(root),\n diffY > -100 ? 100 : diffY < -500 ? 300 : 200\n ),\n new ZoomTransform(transform.k, transform.x, transform.y + diffY)\n );\n }\n }, [bottom, transformRef, zoomer, selectTransition]);\n\n // Detect if the user scrolled up manually\n useEffect(() => {\n const bottom = bottomRef.current;\n const root = rootRef.current;\n if (!root || bottom === null || transitionRef.current) {\n return;\n }\n const { offsetHeight } = root;\n const transformedBottom = bottom * transform.k + transform.y;\n\n const diffY = offsetHeight - CANVAS_PADDING_BOTTOM - transformedBottom;\n detectScrolledUpRef.current = diffY < 0;\n }, [transform, zoomer]);\n\n const handleReCenter = useCallback(() => {\n reCenterRef.current = true;\n setCentered(false);\n }, [reCenterRef, setCentered]);\n\n const handleScaleChange = useCallback(\n (scale: number) => {\n zoomer.scaleTo(select(rootRef.current!), scale);\n },\n [zoomer]\n );\n\n const fullRect = useMemo(() => {\n if (!sizeReady) {\n return null;\n }\n return mergeRects(nodes.map((node) => node.view!));\n }, [nodes, sizeReady]);\n\n useEffect(() => {\n if (!fullRect) {\n return;\n }\n const root = rootRef.current;\n if (!root) {\n return;\n }\n\n const distance = 20;\n const { offsetWidth, offsetHeight } = root;\n const viewportWidth = offsetWidth / transform.k;\n const viewportHeight = offsetHeight / transform.k;\n const minX = -(viewportWidth - distance - fullRect.x);\n const maxX = viewportWidth - distance + (fullRect.x + fullRect.width);\n const minY = -(viewportHeight - distance - fullRect.y);\n const maxY = viewportHeight - distance + (fullRect.y + fullRect.height);\n\n zoomer.translateExtent([\n [minX, minY],\n [maxX, maxY],\n ]);\n }, [zoomer, transform.k, fullRect]);\n\n const scrollTo = useCallback(\n ({ nodeId, jobId, behavior, block }: ScrollToOptions) => {\n /**\n * - When the node is fully visible, take no action.\n * - Otherwise, scroll to make it fully visible while make the scroll\n * distance as small as possible.\n * - Special cases:\n * - When the node is higher or wider than the viewport, scroll to\n * the top or left of the node.\n */\n const root = rootRef.current;\n const targets = nodes.filter((n) => {\n if (nodeId && n.id !== nodeId) {\n return false;\n }\n if (jobId && (n as JobGraphNode).job?.id !== jobId) {\n return false;\n }\n return true;\n });\n if (!root || targets.length === 0) {\n return;\n }\n const rect = mergeRects(targets.map((node) => node.view!));\n\n const { x, y } = getScrollTo(\n rect,\n [root.offsetWidth, root.offsetHeight],\n [\n CANVAS_PADDING_TOP,\n CANVAS_PADDING_RIGHT,\n CANVAS_PADDING_BOTTOM,\n CANVAS_PADDING_LEFT,\n ],\n transformRef.current,\n block\n );\n\n if (x || y) {\n zoomer.translateBy(\n selectTransition(\n select(root),\n behavior === \"instant\" ? 0 : undefined\n ),\n x,\n y\n );\n }\n },\n [nodes, selectTransition, transformRef, zoomer]\n );\n\n const scrollBy = useCallback(\n (\n direction: \"up\" | \"down\" | \"left\" | \"right\",\n range: \"line\" | \"page\" | \"document\"\n ) => {\n const root = rootRef.current;\n if (!root || !sizeReady) {\n return;\n }\n let x = 0;\n let y = 0;\n let duration = 300;\n let distance: number;\n const isHorizontal = direction === \"left\" || direction === \"right\";\n if (range === \"line\") {\n const lineHeight = 40;\n distance =\n lineHeight * (direction === \"up\" || direction === \"left\" ? 1 : -1);\n duration = 150;\n } else if (range === \"page\") {\n const pageHeight = root.offsetHeight - CANVAS_PADDING_BOTTOM;\n distance = pageHeight * (direction === \"up\" ? -1 : 1);\n } else {\n const { y: top, height } = mergeRects(nodes.map((node) => node.view!));\n\n if (direction === \"down\") {\n const bottom = top + height;\n const targetHeight = bottom - top + CANVAS_PADDING_BOTTOM;\n distance = root.offsetHeight - targetHeight - transformRef.current.y;\n } else {\n distance = top + CANVAS_PADDING_TOP - transformRef.current.y;\n }\n }\n\n if (isHorizontal) {\n x = distance;\n } else {\n y = distance;\n }\n\n if (x || y) {\n zoomer.translateBy(selectTransition(select(root), duration), x, y);\n }\n },\n [nodes, selectTransition, sizeReady, transformRef, zoomer]\n );\n\n const [activeToolCallJobId, setActiveToolCallJobId] = useState<string | null>(\n null\n );\n\n const [activeExpandedViewJobId, setActiveExpandedViewJobId] = useState<\n string | null\n >(null);\n\n const canvasContextValue = useMemo(\n () => ({\n humanInput,\n onShare,\n onPause,\n onResume,\n onCancel,\n onNodeResize,\n activeToolCallJobId,\n setActiveToolCallJobId,\n setActiveNodeId,\n hoverOnScrollableContent,\n setHoverOnScrollableContent,\n activeExpandedViewJobId,\n setActiveExpandedViewJobId,\n }),\n [\n activeToolCallJobId,\n hoverOnScrollableContent,\n activeExpandedViewJobId,\n onNodeResize,\n humanInput,\n onShare,\n onPause,\n onResume,\n onCancel,\n ]\n );\n\n const activeToolCallJob = useMemo(() => {\n if (!activeToolCallJobId) {\n return null;\n }\n return jobs?.find((job) => job.id === activeToolCallJobId);\n }, [activeToolCallJobId, jobs]);\n\n const handleRootClick = useCallback((e: React.MouseEvent) => {\n for (const element of e.nativeEvent.composedPath()) {\n if (\n element instanceof HTMLElement &&\n element.classList.contains(styles.node)\n ) {\n // If the click is on a node, do not reset active node\n return;\n }\n if (element === rootRef.current) {\n break;\n }\n }\n setActiveNodeId(null);\n }, []);\n\n useEffect(() => {\n const root = rootRef.current;\n if (!root || activeToolCallJob || activeExpandedViewJobId) {\n return;\n }\n\n const handleKeyDown = (e: KeyboardEvent) => {\n if (\n document.activeElement &&\n document.activeElement !== document.body &&\n document.activeElement !== root\n ) {\n return;\n }\n\n const keyboardAction = handleKeyboardNav(e, { activeNodeId, nodes });\n if (!keyboardAction) {\n return;\n }\n const { action, node } = keyboardAction;\n\n if (action === \"scroll\") {\n scrollBy(keyboardAction.direction, keyboardAction.range);\n } else if (action === \"enter\") {\n if (node.type !== \"job\" && node.type !== \"view\") {\n return;\n }\n const askUser = node.job.toolCall?.name === \"ask_human\";\n const askUserPlan =\n node.job.toolCall?.name === \"ask_human_confirming_plan\";\n if (askUser || askUserPlan) {\n return;\n }\n }\n e.preventDefault();\n e.stopPropagation();\n\n if (action === \"enter\") {\n if (node.type === \"view\") {\n setActiveExpandedViewJobId(node.job.id);\n } else {\n setActiveToolCallJobId((node as JobGraphNode).job.id);\n }\n } else if (action === \"switch-active-node\") {\n setActiveNodeId(node.id);\n if (node.type === \"job\" || node.type === \"view\") {\n scrollTo({\n jobId: node.job.id,\n behavior: \"smooth\",\n });\n } else {\n scrollTo({\n nodeId: node.id,\n behavior: \"smooth\",\n });\n }\n }\n };\n document.addEventListener(\"keydown\", handleKeyDown);\n return () => {\n document.removeEventListener(\"keydown\", handleKeyDown);\n };\n }, [\n activeNodeId,\n activeToolCallJob,\n activeExpandedViewJobId,\n nodes,\n scrollTo,\n scrollBy,\n ]);\n\n return (\n <CanvasContext.Provider value={canvasContextValue}>\n <div\n className={classNames(styles.root, { [styles.loading]: !task })}\n ref={rootRef}\n style={{\n cursor: grabbing ? \"grabbing\" : \"grab\",\n }}\n tabIndex={-1}\n onClick={handleRootClick}\n >\n {!task && (\n <div className={styles[\"loading-icon\"]}>\n <WrappedIcon\n lib=\"antd\"\n theme=\"outlined\"\n icon=\"loading-3-quarters\"\n spinning\n />\n </div>\n )}\n <div\n className={classNames(styles.canvas, {\n [styles.ready]: sizeReady && centered,\n })}\n style={{\n transform: `translate3d(${transform.x}px, ${transform.y}px, 0) scale(${transform.k})`,\n }}\n >\n <svg className={styles.edges}>\n {edges.map((edge) => (\n <path\n className={styles.edge}\n key={`${edge.source}-${edge.target}`}\n d={edge\n .points!.map(\n ({ x, y }, i) => `${i === 0 ? \"M\" : \"L\"}${x},${y}`\n )\n .join(\" \")}\n />\n ))}\n </svg>\n {nodes.map((node) => (\n <MemoizedNodeComponent\n key={node.id}\n id={node.id}\n type={node.type}\n content={(node as RequirementGraphNode).content}\n job={(node as JobGraphNode).job}\n state={node.state}\n startTime={task?.startTime}\n taskLoading={taskLoading}\n instructionLoading={\n node.type === \"instruction\" &&\n !nonLeafNodes.has(node.id) &&\n !DONE_STATES.includes(node.state ?? \"working\") &&\n !GENERAL_DONE_STATES.includes(taskState ?? \"working\")\n }\n edges={edges}\n x={node.view?.x}\n y={node.view?.y}\n active={activeNodeId === node.id}\n />\n ))}\n </div>\n </div>\n <div className={styles.widgets}>\n <div className={styles[\"nav-container\"]}>\n <ul className={styles.nav}>\n {nav?.map((item) => (\n <li\n key={item.id}\n className={classNames(styles[\"nav-item\"], {\n [styles.active]: currentNavId === item.id,\n })}\n >\n <a\n className={styles[\"nav-link\"]}\n onClick={() => {\n setActiveNodeId(`job:${item.id}`);\n scrollTo({ jobId: item.id, block: \"start\" });\n }}\n >\n <span className={styles[\"nav-link-text\"]}>{item.title}</span>\n </a>\n </li>\n ))}\n </ul>\n </div>\n <PlanProgress plan={plan} state={taskState} />\n <ZoomBar\n scale={transform.k}\n onScaleChange={handleScaleChange}\n onReCenter={handleReCenter}\n />\n </div>\n {activeToolCallJob && <ToolCallDetail job={activeToolCallJob} />}\n {activeExpandedViewJobId && <ExpandedView views={views!} />}\n </CanvasContext.Provider>\n );\n}\n\ninterface NodeComponentProps {\n id: string;\n type: GraphNode[\"type\"];\n edges: GraphEdge[];\n content?: string;\n job?: Job;\n state?: string;\n startTime?: number;\n taskLoading?: boolean;\n instructionLoading?: boolean;\n x?: number;\n y?: number;\n active?: boolean;\n}\n\nfunction NodeComponent({\n id,\n type,\n state,\n job,\n content,\n startTime,\n taskLoading,\n instructionLoading,\n x,\n y,\n active,\n}: NodeComponentProps) {\n const nodeRef = useRef<HTMLDivElement>(null);\n const { onNodeResize, setActiveNodeId } = useContext(CanvasContext);\n\n useEffect(() => {\n const element = nodeRef.current;\n if (!element) {\n return;\n }\n const observer = new ResizeObserver(() => {\n onNodeResize(id, [element.offsetWidth, element.offsetHeight]);\n });\n observer.observe(element);\n return () => {\n observer.disconnect();\n onNodeResize(id, null);\n };\n }, [id, onNodeResize]);\n\n useEffect(() => {\n const element = nodeRef.current;\n if (!element) {\n return;\n }\n const handleMouseDown = (e: MouseEvent) => {\n e.stopPropagation();\n };\n element.addEventListener(\"mousedown\", handleMouseDown);\n return () => {\n element.removeEventListener(\"mousedown\", handleMouseDown);\n };\n }, []);\n\n const handleClick = useCallback(() => {\n if (type !== \"start\" && type !== \"instruction\") {\n setActiveNodeId(id);\n }\n }, [id, setActiveNodeId, type]);\n\n return (\n <div\n className={classNames(styles.node, {\n [styles.ready]: x != null && y != null,\n })}\n ref={nodeRef}\n style={{\n left: x,\n top: y,\n }}\n onClick={handleClick}\n >\n {type === \"start\" ? (\n <NodeStart />\n ) : type === \"end\" ? (\n <NodeEnd active={active} />\n ) : type === \"requirement\" ? (\n <NodeRequirement\n content={content}\n startTime={startTime}\n loading={taskLoading}\n active={active}\n />\n ) : type === \"instruction\" ? (\n <NodeInstruction\n content={job!.instruction}\n loading={instructionLoading}\n />\n ) : type === \"view\" ? (\n <NodeView job={job!} active={active} />\n ) : (\n <NodeJob state={state} job={job!} active={active} />\n )}\n </div>\n );\n}\n","import { i18n } from \"@next-core/i18n\";\n\nexport enum K {\n ASK_ANY_THING = \"ASK_ANYTHING\",\n COMMON_TASKS = \"COMMON_TASKS\",\n}\n\nconst en: Locale = {\n [K.ASK_ANY_THING]: \"Ask anything\",\n [K.COMMON_TASKS]: \"Common tasks\",\n};\n\nconst zh: Locale = {\n [K.ASK_ANY_THING]: \"询问任何问题\",\n [K.COMMON_TASKS]: \"常用任务\",\n};\n\nexport const NS = \"bricks/ai-portal/chat-box\";\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","import React, {\n useCallback,\n useEffect,\n useMemo,\n useRef,\n useState,\n} from \"react\";\nimport { createDecorators, type EventEmitter } from \"@next-core/element\";\nimport { ReactNextElement, wrapBrick } from \"@next-core/react-element\";\nimport {\n TextareaAutoResize,\n type TextareaAutoResizeRef,\n} from \"@next-shared/form\";\nimport { chunk } from \"lodash\";\nimport \"@next-core/theme\";\nimport { initializeI18n } from \"@next-core/i18n\";\nimport type {\n GeneralIcon,\n GeneralIconProps,\n} from \"@next-bricks/icons/general-icon\";\nimport { K, NS, locales, t } from \"./i18n.js\";\nimport tips from \"./images/tips.svg\";\nimport styleText from \"./styles.shadow.css\";\n\ninitializeI18n(NS, locales);\n\nconst WrappedIcon = wrapBrick<GeneralIcon, GeneralIconProps>(\"eo-icon\");\n\nconst { defineElement, property, event } = createDecorators();\n\nexport interface ChatBoxProps {\n disabled?: boolean;\n placeholder?: string;\n autoFocus?: boolean;\n suggestions?: Suggestion[];\n suggestionsLabel?: string;\n}\n\nexport interface Suggestion {\n title: string;\n content: string;\n}\n\n/**\n * 构件 `ai-portal.chat-box`\n */\nexport\n@defineElement(\"ai-portal.chat-box\", {\n styleTexts: [styleText],\n})\nclass ChatBox extends ReactNextElement implements ChatBoxProps {\n @property({ type: Boolean })\n accessor disabled: boolean | undefined;\n\n @property()\n accessor placeholder: string | undefined;\n\n @property({ type: Boolean })\n accessor autoFocus: boolean | undefined;\n\n @property({ attribute: false })\n accessor suggestions: Suggestion[] | undefined;\n\n @property()\n accessor suggestionsLabel: string | undefined;\n\n @event({ type: \"message.submit\" })\n accessor #messageSubmit!: EventEmitter<string>;\n\n #handleMessageSubmit = (value: string) => {\n this.#messageSubmit.emit(value);\n };\n\n render() {\n return (\n <ChatBoxComponent\n disabled={this.disabled}\n placeholder={this.placeholder}\n autoFocus={this.autoFocus}\n suggestions={this.suggestions}\n suggestionsLabel={this.suggestionsLabel}\n onSubmit={this.#handleMessageSubmit}\n />\n );\n }\n}\n\nexport interface ChatBoxComponentProps extends ChatBoxProps {\n // Define react event handlers here.\n onSubmit?: (value: string) => void;\n}\n\nexport function ChatBoxComponent({\n disabled,\n placeholder,\n autoFocus,\n suggestions,\n suggestionsLabel,\n onSubmit,\n}: ChatBoxComponentProps) {\n const containerRef = useRef<HTMLDivElement>(null);\n const textareaRef = useRef<TextareaAutoResizeRef>(null);\n const [value, setValue] = useState(\"\");\n const valueRef = useRef(\"\");\n\n const handleSubmit = useCallback(\n (e: React.FormEvent<HTMLTextAreaElement>) => {\n if (e.currentTarget.value) {\n onSubmit?.(e.currentTarget.value);\n }\n },\n [onSubmit]\n );\n\n const handleChange = useCallback(\n (e: React.ChangeEvent<HTMLTextAreaElement>) => {\n valueRef.current = e.target.value;\n setValue(e.target.value);\n },\n []\n );\n\n const handleSubmitClick = useCallback(() => {\n onSubmit?.(valueRef.current);\n }, [onSubmit]);\n\n useEffect(\n () => {\n if (autoFocus) {\n Promise.resolve().then(() => {\n textareaRef.current?.focus();\n });\n }\n },\n // One-time focus\n // eslint-disable-next-line react-hooks/exhaustive-deps\n []\n );\n\n // istanbul ignore next: experimental\n const groupedSuggestions = useMemo(() => {\n if (!suggestions?.length) {\n return [];\n }\n return chunk(suggestions, Math.max(2, Math.ceil(suggestions.length / 2)));\n }, [suggestions]);\n\n // istanbul ignore next: experimental\n const handleSelectSuggestion = useCallback((suggestion: Suggestion) => {\n valueRef.current = suggestion.content;\n setValue(suggestion.content);\n setTimeout(() => {\n textareaRef.current?.focus();\n });\n }, []);\n\n return (\n <div className=\"root\">\n <div className=\"container\" ref={containerRef}>\n <TextareaAutoResize\n containerRef={containerRef}\n ref={textareaRef}\n value={value}\n minRows={3}\n paddingSize={62}\n autoResize\n disabled={disabled}\n placeholder={placeholder ?? t(K.ASK_ANY_THING)}\n submitWhen=\"enter-without-shift\"\n onSubmit={handleSubmit}\n onChange={handleChange}\n />\n <button\n className=\"btn-send\"\n disabled={!value}\n onClick={handleSubmitClick}\n >\n <WrappedIcon lib=\"fa\" prefix=\"fas\" icon=\"arrow-up\" />\n </button>\n </div>\n {\n // istanbul ignore next: experimental\n !!groupedSuggestions?.length && (\n <div className=\"suggestions\">\n <div className=\"heading\">\n <img\n className=\"icon\"\n src={tips as unknown as string}\n width={16}\n height={16}\n />\n <span>{suggestionsLabel ?? t(K.COMMON_TASKS)}</span>\n </div>\n {groupedSuggestions.map((group, index) => (\n <SuggestionCarousel\n key={index}\n suggestions={group}\n pixelPerSecond={(index + 2) * 10}\n onSelect={handleSelectSuggestion}\n />\n ))}\n </div>\n )\n }\n </div>\n );\n}\n\nexport interface SuggestionCarouselProps {\n suggestions: Suggestion[];\n pixelPerSecond: number;\n onSelect: (suggestion: Suggestion) => void;\n}\n\n// istanbul ignore next: experimental\nfunction SuggestionCarousel({\n suggestions,\n pixelPerSecond,\n onSelect,\n}: SuggestionCarouselProps) {\n const carouselRef = useRef<HTMLDivElement>(null);\n const listRef = useRef<HTMLUListElement>(null);\n const [x, setX] = useState(0);\n\n // Auto scroll suggestions infinitely.\n // Stop scrolling when mouse enter, and resume when mouse leave.\n useEffect(() => {\n const carousel = carouselRef.current;\n const list = listRef.current;\n\n if (!carousel || !list) {\n return;\n }\n\n let previousTimestamp: number | undefined;\n let currentTimestamp: number | undefined;\n let offsetTime = 0;\n let start: number | undefined;\n let timer: number;\n\n // We doubled the suggestions to make it scroll infinitely.\n const gap = 7;\n const listSingleWidth = (list.offsetWidth - gap) / 2;\n const mod = listSingleWidth + gap;\n\n function step(timestamp: number) {\n currentTimestamp = timestamp;\n if (start === undefined) {\n start = timestamp;\n }\n if (previousTimestamp !== undefined) {\n offsetTime += timestamp - previousTimestamp;\n previousTimestamp = undefined;\n }\n const elapsed = timestamp - start - offsetTime;\n setX(((elapsed / 1000) * pixelPerSecond) % mod);\n timer = requestAnimationFrame(step);\n }\n\n timer = requestAnimationFrame(step);\n\n const onMouseEnter = () => {\n cancelAnimationFrame(timer);\n previousTimestamp = currentTimestamp;\n };\n const onMouseLeave = () => {\n timer = requestAnimationFrame(step);\n };\n\n carousel.addEventListener(\"mouseenter\", onMouseEnter);\n carousel.addEventListener(\"mouseleave\", onMouseLeave);\n\n return () => {\n cancelAnimationFrame(timer);\n carousel.removeEventListener(\"mouseenter\", onMouseEnter);\n carousel.removeEventListener(\"mouseleave\", onMouseLeave);\n };\n }, [suggestions, pixelPerSecond]);\n\n return (\n <div className=\"carousel\" ref={carouselRef}>\n <ul\n className=\"list\"\n ref={listRef}\n style={{ transform: `translateX(${-x}px)` }}\n >\n {[...suggestions, ...suggestions].map((item, index) => (\n <li key={index}>\n <div\n className=\"item\"\n onClick={() => onSelect(item)}\n title={item.content}\n >\n <div className=\"title\">{item.title}</div>\n <div className=\"content\">{item.content}</div>\n </div>\n </li>\n ))}\n </ul>\n </div>\n );\n}\n","import React from \"react\";\nimport { createDecorators } from \"@next-core/element\";\nimport { ReactNextElement } from \"@next-core/react-element\";\nimport \"@next-core/theme\";\nimport styleText from \"./styles.shadow.css\";\n\nconst { defineElement } = createDecorators();\n\n/**\n * 构件 `ai-portal.home-container`\n */\nexport\n@defineElement(\"ai-portal.home-container\", {\n styleTexts: [styleText],\n})\nclass HomeContainer extends ReactNextElement {\n render() {\n return <HomeContainerComponent />;\n }\n}\n\nexport function HomeContainerComponent() {\n return <slot />;\n}\n","import { i18n } from \"@next-core/i18n\";\n\nexport enum K {\n TODAY = \"TODAY\",\n YESTERDAY = \"YESTERDAY\",\n PREVIOUS_7_DAYS = \"PREVIOUS_7_DAYS\",\n PREVIOUS_30_DAYS = \"PREVIOUS_30_DAYS\",\n}\n\nconst en: Locale = {\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};\n\nconst zh: Locale = {\n [K.TODAY]: \"今天\",\n [K.YESTERDAY]: \"昨天\",\n [K.PREVIOUS_7_DAYS]: \"过去7天\",\n [K.PREVIOUS_30_DAYS]: \"过去30天\",\n};\n\nexport const NS = \"bricks/ai-portal/chat-history\";\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","// istanbul ignore file: experimental\nimport React, { useEffect, useMemo, useRef, useState } from \"react\";\nimport { createDecorators, type EventEmitter } from \"@next-core/element\";\nimport { ReactNextElement, wrapBrick } from \"@next-core/react-element\";\nimport moment from \"moment\";\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 ActionType,\n EoMiniActions,\n EoMiniActionsEvents,\n EoMiniActionsEventsMapping,\n EoMiniActionsProps,\n SimpleActionType,\n} from \"@next-bricks/basic/mini-actions\";\nimport \"@next-core/theme\";\nimport { initializeI18n } from \"@next-core/i18n\";\nimport { K, NS, locales, t } from \"./i18n.js\";\nimport styleText from \"./styles.shadow.css\";\nimport type { TaskState } from \"../cruise-canvas/interfaces.js\";\nimport classNames from \"classnames\";\nimport { DONE_STATES } from \"../cruise-canvas/constants.js\";\n\ninitializeI18n(NS, locales);\n\nconst WrappedIcon = wrapBrick<GeneralIcon, GeneralIconProps>(\"eo-icon\");\nconst WrappedLink = wrapBrick<Link, LinkProps>(\"eo-link\");\nconst WrappedMiniActions = wrapBrick<\n EoMiniActions,\n EoMiniActionsProps,\n EoMiniActionsEvents,\n EoMiniActionsEventsMapping\n>(\"eo-mini-actions\", {\n onActionClick: \"action.click\",\n onVisibleChange: \"visible.change\",\n});\n\nconst { defineElement, property, event } = createDecorators();\n\nexport interface ChatHistoryProps {\n list?: HistoryItem[];\n actions?: ActionType[];\n nextToken?: string;\n}\n\nexport interface HistoryItem {\n id: string;\n url: string;\n title: string;\n startTime: number;\n state?: TaskState;\n}\n\nexport interface ActionClickDetail {\n action: SimpleActionType;\n item: HistoryItem;\n}\n\n/**\n * 构件 `ai-portal.chat-history`\n */\nexport\n@defineElement(\"ai-portal.chat-history\", {\n styleTexts: [styleText],\n})\nclass ChatHistory extends ReactNextElement implements ChatHistoryProps {\n @property({ attribute: false })\n accessor list: HistoryItem[] | undefined;\n\n @property({ attribute: false })\n accessor actions: ActionType[] | undefined;\n\n @property()\n accessor nextToken: string | undefined;\n\n @event({ type: \"action.click\" })\n accessor #actionClick!: EventEmitter<ActionClickDetail>;\n\n #handleActionClick = (detail: ActionClickDetail) => {\n this.#actionClick.emit(detail);\n };\n\n @event({ type: \"load.more\" })\n accessor #loadMore!: EventEmitter<{ nextToken: string }>;\n\n #handleLoadMore = (nextToken: string) => {\n this.#loadMore.emit({ nextToken });\n };\n\n render() {\n return (\n <ChatHistoryComponent\n root={this}\n list={this.list}\n actions={this.actions}\n nextToken={this.nextToken}\n onActionClick={this.#handleActionClick}\n onLoadMore={this.#handleLoadMore}\n />\n );\n }\n}\n\nexport interface ChatHistoryComponentProps extends ChatHistoryProps {\n root: HTMLElement;\n onActionClick: (detail: ActionClickDetail) => void;\n onLoadMore: (nextToken: string) => void;\n}\n\ninterface GroupedHistory {\n title: string;\n items: HistoryItem[];\n}\n\nexport function ChatHistoryComponent({\n root,\n list,\n actions,\n nextToken,\n onActionClick,\n onLoadMore,\n}: ChatHistoryComponentProps) {\n const groups = useMemo(() => {\n const groupMap = new Map<string, GroupedHistory>();\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.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.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 if (!next || !nextToken) {\n return;\n }\n const observer = new IntersectionObserver(\n (entries) => {\n for (const entry of entries) {\n if (entry.isIntersecting) {\n onLoadMore(nextToken);\n }\n }\n },\n { root }\n );\n observer.observe(next);\n return () => {\n observer.disconnect();\n };\n }, [nextToken, onLoadMore, root]);\n\n if (!list) {\n return (\n <div className=\"loading\">\n <WrappedIcon\n lib=\"antd\"\n theme=\"outlined\"\n icon=\"loading-3-quarters\"\n spinning\n />\n </div>\n );\n }\n\n return (\n <>\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 active: actionsVisible === item.id,\n })}\n url={item.url}\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 </>\n );\n}\n","import React from \"react\";\nimport { createDecorators } from \"@next-core/element\";\nimport { ReactNextElement, wrapBrick } from \"@next-core/react-element\";\nimport \"@next-core/theme\";\nimport styleText from \"./styles.shadow.css\";\nimport type {\n MiniLineChart,\n MiniLineChartProps,\n} from \"@next-bricks/mini-chart/mini-line-chart\";\n\nconst WrappedMiniLineChart = wrapBrick<MiniLineChart, MiniLineChartProps>(\n \"eo-mini-line-chart\"\n);\n\nconst { defineElement, property } = createDecorators();\n\nexport interface StatWithMiniChartProps\n extends Pick<\n MiniLineChartProps,\n \"data\" | \"xField\" | \"yField\" | \"lineColor\" | \"showArea\" | \"min\" | \"max\"\n > {\n label?: string;\n value?: string;\n size?: \"medium\" | \"small\";\n}\n\n/**\n * 构件 `ai-portal.stat-with-mini-chart`\n */\nexport\n@defineElement(\"ai-portal.stat-with-mini-chart\", {\n styleTexts: [styleText],\n})\nclass StatWithMiniChart\n extends ReactNextElement\n implements StatWithMiniChartProps\n{\n @property()\n accessor label: string | undefined;\n\n @property()\n accessor value: string | undefined;\n\n /**\n * @default \"medium\"\n */\n @property()\n accessor size: \"medium\" | \"small\" | undefined;\n\n /**\n * @default \"var(--color-brand)\"\n */\n @property()\n accessor lineColor: string | undefined;\n\n @property({ type: Boolean })\n accessor showArea: boolean | undefined;\n\n /**\n * Specify the minimum value of the y-axis.\n * If not specified, the minimum value will be calculated from the data.\n */\n @property({ type: Number })\n accessor min: number | undefined;\n\n /**\n * Specify the maximum value of the y-axis.\n * If not specified, the maximum value will be calculated from the data.\n */\n @property({ type: Number })\n accessor max: number | undefined;\n\n /**\n * @default \"0\"\n */\n @property()\n accessor xField: string | undefined;\n\n /**\n * @default \"1\"\n */\n @property()\n accessor yField: string | undefined;\n\n @property({ attribute: false })\n accessor data: Record<string, number>[] | undefined;\n\n render() {\n return (\n <StatWithMiniChartComponent\n label={this.label}\n value={this.value}\n size={this.size}\n lineColor={this.lineColor}\n showArea={this.showArea}\n min={this.min}\n max={this.max}\n xField={this.xField}\n yField={this.yField}\n data={this.data}\n />\n );\n }\n}\n\nfunction StatWithMiniChartComponent({\n label,\n value,\n size,\n ...chartProps\n}: StatWithMiniChartProps) {\n if (size === \"small\") {\n return (\n <div className=\"container\">\n <div className=\"label-and-stat\">\n <div className=\"label\">{label}</div>\n <div className=\"stat\">{value}</div>\n </div>\n <div className=\"chart\">\n <WrappedMiniLineChart\n {...chartProps}\n lineWidth={1.5}\n width=\"auto\"\n height=\"55\"\n />\n </div>\n </div>\n );\n }\n return (\n <div className=\"container\">\n <div className=\"label\">{label}</div>\n <div className=\"stat-and-chart\">\n <div className=\"chart\">\n <WrappedMiniLineChart\n {...chartProps}\n lineWidth={2}\n width=\"auto\"\n height=\"92\"\n />\n </div>\n <div className=\"stat\">{value}</div>\n </div>\n </div>\n );\n}\n","import React from \"react\";\nimport { createDecorators } from \"@next-core/element\";\nimport { ReactNextElement } from \"@next-core/react-element\";\nimport \"@next-core/theme\";\nimport logoImage from \"./images/logo@2x.png\";\nimport styleText from \"./styles.shadow.css\";\n\nconst { defineElement } = createDecorators();\n\n/**\n * Elevo Logo\n */\nexport\n@defineElement(\"ai-portal.elevo-logo\", {\n styleTexts: [styleText],\n})\nclass ElevoLogo extends ReactNextElement {\n render() {\n return <ElevoLogoComponent />;\n }\n}\n\nfunction ElevoLogoComponent() {\n return <img src={logoImage} alt=\"Elevo\" width={95} height={26} />;\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}\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};\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};\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","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\";\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});\n","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, { useEffect, useMemo, useRef, useState } 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 { get } 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 \"../cruise-canvas/constants.js\";\n\nexport interface HistoryItem {\n id: 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}\n\nexport interface ChatHistoryProps {\n urlTemplate?: string;\n actions?: ActionType[];\n onActionClick: (detail: ActionClickDetail) => void;\n onHistoryClick: () => void;\n}\n\nexport function ChatHistory({\n actions = [],\n urlTemplate,\n onActionClick,\n onHistoryClick,\n}: ChatHistoryProps) {\n const rootRef = useRef<HTMLDivElement | null>(null);\n const [list, setList] = useState<HistoryItem[] | 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({ next_token: loadNextToken }),\n new Promise((resolve) => setTimeout(resolve, 500)), // Force a minimum delay\n ])\n .then(([data]) => {\n setList((prev) => [...(prev ?? []), ...(data.data as HistoryItem[])]);\n setNextToken(data.next_token);\n })\n .catch((error) => {\n // eslint-disable-next-line no-console\n console.error(\"Error loading chat history:\", error);\n });\n }, [loadNextToken]);\n\n const groups = useMemo(() => {\n const groupMap = new Map<string, GroupedHistory>();\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.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.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 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 active: actionsVisible === item.id,\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\nfunction parseTemplate(template: string, context: Record<string, any>) {\n return template?.replace(/{{(.*?)}}/g, (_match: string, key: string) => {\n const value = get(context, key);\n return value;\n });\n}\n","import React, { useCallback, useEffect, useState } from \"react\";\nimport { createDecorators, type EventEmitter } from \"@next-core/element\";\nimport { ReactNextElement } from \"@next-core/react-element\";\nimport \"@next-core/theme\";\nimport { initializeI18n } from \"@next-core/i18n\";\nimport classNames from \"classnames\";\nimport type { DropdownActionsProps } from \"@next-bricks/basic/dropdown-actions\";\nimport { K, NS, locales, t } from \"./i18n.js\";\nimport styleText from \"./styles.shadow.css\";\nimport ElevoLogo from \"../elevo-logo/images/logo@2x.png\";\nimport {\n WrappedDropdownActions,\n WrappedEasyopsAvatar,\n WrappedIcon,\n WrappedLink,\n} from \"./bricks.js\";\nimport { ChatHistory, type ActionClickDetail } from \"./ChatHistory.js\";\nimport type { ActionType } from \"@next-bricks/basic/mini-actions\";\n\ninitializeI18n(NS, locales);\n\nconst dropdownActions: DropdownActionsProps[\"actions\"] = [\n {\n icon: {\n lib: \"fa\",\n prefix: \"fas\",\n icon: \"arrow-right-from-bracket\",\n },\n text: t(K.LOGOUT),\n },\n];\n\nconst { defineElement, property, event } = createDecorators();\n\nexport interface ElevoSidebarProps {\n userInstanceId?: string;\n behavior?: \"default\" | \"drawer\";\n logoUrl?: string;\n newChatUrl?: string;\n historyUrlTemplate?: string;\n historyActions?: ActionType[];\n}\n\n/**\n * 构件 `ai-portal.elevo-sidebar`\n */\nexport\n@defineElement(\"ai-portal.elevo-sidebar\", {\n styleTexts: [styleText],\n})\nclass ElevoSidebar extends ReactNextElement implements ElevoSidebarProps {\n @property()\n accessor userInstanceId: string | undefined;\n\n @property()\n accessor behavior: \"default\" | \"drawer\" | undefined;\n\n @property()\n accessor logoUrl: string | undefined;\n\n @property()\n accessor newChatUrl: string | undefined;\n\n @property()\n accessor historyUrlTemplate: string | undefined;\n\n @property({ attribute: false })\n accessor historyActions: ActionType[] | undefined;\n\n @event({ type: \"logout\" })\n accessor #logout!: EventEmitter<void>;\n\n #handleLogout = () => {\n this.#logout.emit();\n };\n\n @event({ type: \"action.click\" })\n accessor #actionClick!: EventEmitter<ActionClickDetail>;\n\n #handleActionClick = (detail: ActionClickDetail) => {\n this.#actionClick.emit(detail);\n };\n\n render() {\n return (\n <ElevoSidebarComponent\n userInstanceId={this.userInstanceId}\n behavior={this.behavior}\n logoUrl={this.logoUrl}\n newChatUrl={this.newChatUrl}\n historyUrlTemplate={this.historyUrlTemplate}\n historyActions={this.historyActions}\n onLogout={this.#handleLogout}\n onActionClick={this.#handleActionClick}\n />\n );\n }\n}\n\ninterface ElevoSidebarComponentProps extends ElevoSidebarProps {\n onLogout: () => void;\n onActionClick: (detail: ActionClickDetail) => void;\n}\n\nfunction ElevoSidebarComponent({\n userInstanceId,\n behavior,\n logoUrl,\n newChatUrl,\n historyUrlTemplate,\n historyActions,\n onLogout,\n onActionClick,\n}: ElevoSidebarComponentProps) {\n const [collapsed, setCollapsed] = useState(behavior === \"drawer\");\n const handleCollapse = useCallback(() => {\n setCollapsed(true);\n }, []);\n const handleExpand = useCallback(() => {\n setCollapsed(false);\n }, []);\n\n useEffect(() => {\n if (behavior === \"drawer\") {\n setCollapsed(true);\n }\n }, [behavior]);\n\n const handleClickMask = useCallback(() => {\n setCollapsed(true);\n }, []);\n\n const handleHistoryClick = useCallback(() => {\n if (behavior === \"drawer\") {\n setCollapsed(true);\n }\n }, [behavior]);\n\n return (\n <div className={classNames(\"container\", { collapsed })}>\n {behavior === \"drawer\" && !collapsed && (\n <div className=\"mask\" onClick={handleClickMask} />\n )}\n <div className=\"sidebar\">\n <div className=\"logo-bar\">\n <WrappedLink url={logoUrl} className=\"logo-link\">\n <img\n className=\"logo\"\n alt=\"Elevo\"\n src={ElevoLogo}\n width={95}\n height={26}\n />\n </WrappedLink>\n <button className=\"toggle\" onClick={handleCollapse}>\n <WrappedIcon lib=\"easyops\" icon=\"sidebar\" />\n </button>\n </div>\n <WrappedLink className=\"new-chat\" url={newChatUrl}>\n <WrappedIcon\n className=\"new-chat-icon\"\n lib=\"easyops\"\n icon=\"new-chat\"\n />\n {t(K.NEW_CHAT)}\n </WrappedLink>\n <ChatHistory\n urlTemplate={historyUrlTemplate}\n actions={historyActions}\n onActionClick={onActionClick}\n onHistoryClick={handleHistoryClick}\n />\n <div className=\"footer\">\n <WrappedDropdownActions\n className=\"dropdown\"\n actions={dropdownActions}\n onActionClick={onLogout}\n >\n <button className=\"account\">\n <WrappedEasyopsAvatar\n nameOrInstanceId={userInstanceId}\n showName\n size=\"xs\"\n />\n </button>\n </WrappedDropdownActions>\n </div>\n </div>\n <div className=\"alternative\">\n <button className=\"toggle\" onClick={handleExpand}>\n <WrappedIcon lib=\"easyops\" icon=\"sidebar\" />\n </button>\n <WrappedLink className=\"new-chat\" url={newChatUrl}>\n <WrappedIcon\n className=\"new-chat-icon\"\n lib=\"easyops\"\n icon=\"new-chat\"\n />\n {t(K.NEW_CHAT)}\n </WrappedLink>\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:inline-block;padding:3px 0}:host([hidden]){display:none}img{display:block}`, \"\"]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___.toString();\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\";\nimport ___CSS_LOADER_GET_URL_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/getUrl.js\";\nvar ___CSS_LOADER_URL_IMPORT_0___ = new URL(\"./images/background@2x.png\", import.meta.url);\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);\nvar ___CSS_LOADER_URL_REPLACEMENT_0___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_0___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `:host{display:block}:host([hidden]){display:none}*{box-sizing:border-box}.root{color:#262626;background-color:#e1e3ec;background-image:url(${___CSS_LOADER_URL_REPLACEMENT_0___});background-size:694px 144px;background-position:top left;background-repeat:no-repeat;box-shadow:inset 0px 2px 5px 1px rgba(42,46,59,0.1);border-radius:20px;padding:12px}.container{position:relative}textarea{display:block;width:100%;padding:10px 16px 52px;color:var(--antd-input-color);background:rgba(255,255,255,0.8);border-radius:14px;-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:130px}textarea::placeholder{color:rgba(0,0,0,0.4)}.btn-send:focus,\ntextarea:focus{outline:none}.btn-send{position:absolute;bottom:14px;right:14px;width:28px;height:28px;display:flex;align-items:center;justify-content:center;background:#2540ff;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}.suggestions{margin-top:19px}.heading{display:flex;align-items:center;padding:0 5px;margin-bottom:8px}.icon{margin-right:5px}.carousel{overflow:hidden}.carousel + .carousel{margin-top:7px}.list{display:flex;width:max-content;list-style:none;margin:0;padding:0;font-size:12px}.item{background:rgba(255,255,255,0.4);border-radius:12px;border:1px solid #dcdee6;padding:12px;max-width:330px;cursor:pointer}.item:hover{background:rgba(255,255,255,0.5);border:1px solid rgba(37,64,255,0.3)}.list > li + li{margin-left:7px}.title{margin-bottom:4px}.content{color:rgba(0,0,0,0.45);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.tooltip{display:block}`, \"\"]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___.toString();\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;width:261px;height:100%;background:#f6f7f9;border-right:1px solid #e3e5eb;padding:26px 16px 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}.logo-link::part(link){display:block}.logo{vertical-align:middle}.toggle{color:#595959;font-size:18px;width:28px;height:28px;display:flex;align-items:center;justify-content:space-between;background:none;border:none;cursor:pointer;border-radius:8px}.toggle:hover{background:rgba(0,0,0,0.04)}.new-chat::part(link){display:flex;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:23px}.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 -16px}.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:14px;left:16px;display:flex;align-items:center;opacity:0;z-index:1;transition:opacity 0.2s ease-in-out}.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}.collapsed{width:0;overflow:visible}.collapsed .sidebar{transform:translateX(-100%)}.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;background:var(--antd-modal-mask-bg)}.history{flex:1;min-height:0;overflow-y:auto;margin:0 -16px;padding:0 12px}.history ul{list-style:none;margin:0;padding:0}.history .loading{display:flex;justify-content:center;padding:8px}.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::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(.active) .actions{display:none}.history .working{width:8px;height:8px;border-radius:8px;background:#2540ff;margin:0 7px}.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","// 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\";\nimport ___CSS_LOADER_GET_URL_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/getUrl.js\";\nvar ___CSS_LOADER_URL_IMPORT_0___ = new URL(\"./images/background.png\", import.meta.url);\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);\nvar ___CSS_LOADER_URL_REPLACEMENT_0___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_0___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `:host{display:block;background-color:#fff;background-image:url(${___CSS_LOADER_URL_REPLACEMENT_0___});background-position:center;background-size:cover;background-repeat:no-repeat;background-attachment:fixed}:host([hidden]){display:none}`, \"\"]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___.toString();\n"],"names":["___CSS_LOADER_EXPORT___","push","module","id","toString","initializeI18n","NS","locales","defineElement","property","event","method","createDecorators","MemoizedNodeComponent","memo","NodeComponent","CruiseCanvasComponent","forwardRef","LegacyCruiseCanvasComponent","_CruiseCanvas","_A","WeakMap","_B","_C","_D","_E","_CruiseCanvas_brand","WeakSet","_onShare","_F","_onPause","_G","_onResume","_H","_onCancel","_ref","CruiseCanvas","ReactNextElement","constructor","arguments","_classPrivateMethodInitSpec","_classPrivateFieldInitSpec","_initProto","_init_taskId","_init_extra_taskId","_init_task","_init_extra_task","_init_jobs","_init_extra_jobs","_init_replay","_init_extra_replay","_init_shareEvent","_init_extra_shareEvent","_classPrivateGetter","this","_get_shareEvent","emit","_init_pauseEvent","_init_extra_pauseEvent","_get_pauseEvent","_init_resumeEvent","_init_extra_resumeEvent","_get_resumeEvent","_init_cancelEvent","_init_extra_cancelEvent","_get_cancelEvent","createRef","taskId","_classPrivateFieldGet","v","_classPrivateFieldSet","task","jobs","replay","resumed","_classPrivateFieldGet2","current","render","React","onShare","onPause","onResume","onCancel","ref","_ref2","_task$title","propTask","propJobs","rootRef","useRef","_task","_jobs","plan","_plan","error","humanInputRef","resumedRef","useTaskDetail","graph","useTaskGraph","rawNodes","nodes","rawEdges","edges","nav","views","pageTitle","title","taskState","state","activeNodeId","setActiveNodeId","useState","currentNavId","useMemo","type","jobId","split","useImperativeHandle","_resumedRef$current","call","transitionEnabledRef","useEffect","timer","setTimeout","clearTimeout","transitionRef","selectTransition","useCallback","selection","duration","transition","ease","t","on","getRuntime","applyPageTitle","handleHttpError","humanInput","input","_humanInputRef$curren","sizeMap","setSizeMap","onNodeResize","size","prev","newMap","Map","delete","set","sizeReady","useLayout","detectScrolledUpRef","manualScrolledUpRef","hoverOnScrollableContent","setHoverOnScrollableContent","grabbing","transform","transformRef","zoomer","useZoom","zoomable","scrollable","pannable","centered","setCentered","reCenterRef","useAutoCenter","taskLoading","DONE_STATES","includes","length","nonLeafNodes","Set","map","edge","source","bottom","leafNodes","node","has","Math","max","view","y","height","bottomRef","root","offsetHeight","transformedBottom","k","diffY","CANVAS_PADDING_BOTTOM","select","ZoomTransform","x","handleReCenter","handleScaleChange","scale","scaleTo","fullRect","mergeRects","offsetWidth","viewportWidth","viewportHeight","minX","maxX","width","minY","maxY","translateExtent","scrollTo","_ref3","nodeId","behavior","block","targets","filter","n","_job","job","rect","getScrollTo","CANVAS_PADDING_TOP","CANVAS_PADDING_RIGHT","CANVAS_PADDING_LEFT","translateBy","undefined","scrollBy","direction","range","distance","isHorizontal","top","targetHeight","activeToolCallJobId","setActiveToolCallJobId","activeExpandedViewJobId","setActiveExpandedViewJobId","canvasContextValue","activeToolCallJob","find","handleRootClick","e","element","nativeEvent","composedPath","HTMLElement","classList","contains","styles","handleKeyDown","document","activeElement","body","keyboardAction","handleKeyboardNav","action","_node$job$toolCall","_node$job$toolCall2","askUser","toolCall","name","askUserPlan","preventDefault","stopPropagation","addEventListener","removeEventListener","CanvasContext","Provider","value","className","classNames","loading","style","cursor","tabIndex","onClick","WrappedIcon","lib","theme","icon","spinning","canvas","ready","key","target","d","points","_ref4","i","join","_node$state","_node$view","_node$view2","content","startTime","instructionLoading","GENERAL_DONE_STATES","active","widgets","item","PlanProgress","ZoomBar","onScaleChange","onReCenter","ToolCallDetail","ExpandedView","_ref5","nodeRef","useContext","observer","ResizeObserver","observe","disconnect","handleMouseDown","handleClick","left","NodeStart","NodeEnd","NodeRequirement","NodeInstruction","instruction","NodeView","NodeJob","_CruiseCanvas2","_set_shareEvent","_set_pauseEvent","_set_resumeEvent","_set_cancelEvent","c","_initClass","_applyDecs","shadowOptions","attribute","Number","o","_","_checkInRHS","K","en","ASK_ANY_THING","COMMON_TASKS","zh","i18n","getFixedT","wrapBrick","_ChatBox","_ChatBox_brand","_handleMessageSubmit","ChatBox","_init_disabled","_init_extra_disabled","_init_placeholder","_init_extra_placeholder","_init_autoFocus","_init_extra_autoFocus","_init_suggestions","_init_extra_suggestions","_init_suggestionsLabel","_init_extra_suggestionsLabel","_init_messageSubmit","_init_extra_messageSubmit","_get_messageSubmit","disabled","placeholder","autoFocus","suggestions","suggestionsLabel","ChatBoxComponent","onSubmit","containerRef","textareaRef","setValue","valueRef","handleSubmit","currentTarget","handleChange","handleSubmitClick","Promise","resolve","then","_textareaRef$current","focus","groupedSuggestions","chunk","ceil","handleSelectSuggestion","suggestion","_textareaRef$current2","TextareaAutoResize","minRows","paddingSize","autoResize","submitWhen","onChange","prefix","src","tips","group","index","SuggestionCarousel","pixelPerSecond","onSelect","carouselRef","listRef","setX","carousel","list","previousTimestamp","currentTimestamp","start","offsetTime","mod","step","timestamp","requestAnimationFrame","onMouseEnter","cancelAnimationFrame","onMouseLeave","_ChatBox2","_set_messageSubmit","styleTexts","styleText","Boolean","_HomeContainer","HomeContainer","HomeContainerComponent","_HomeContainer2","TODAY","YESTERDAY","PREVIOUS_7_DAYS","PREVIOUS_30_DAYS","WrappedLink","WrappedMiniActions","onActionClick","onVisibleChange","_ChatHistory","_ChatHistory_brand","_handleActionClick","_handleLoadMore","ChatHistory","_init_list","_init_extra_list","_init_actions","_init_extra_actions","_init_nextToken","_init_extra_nextToken","_init_actionClick","_init_extra_actionClick","detail","_get_actionClick","_init_loadMore","_init_extra_loadMore","nextToken","_get_loadMore","actions","ChatHistoryComponent","onLoadMore","groups","groupMap","now","moment","startOfDay","startOf","yesterday","clone","subtract","sevenDaysAgo","thirtyDaysAgo","timestamps","groupKey","format","get","items","values","actionsVisible","setActionsVisible","nextRef","next","IntersectionObserver","entries","entry","isIntersecting","url","_ChatHistory2","_set_actionClick","_set_loadMore","WrappedMiniLineChart","_StatWithMiniChart","_I","_J","StatWithMiniChart","_init_label","_init_extra_label","_init_value","_init_extra_value","_init_size","_init_extra_size","_init_lineColor","_init_extra_lineColor","_init_showArea","_init_extra_showArea","_init_min","_init_extra_min","_init_max","_init_extra_max","_init_xField","_init_extra_xField","_init_yField","_init_extra_yField","_init_data","_init_extra_data","label","lineColor","showArea","min","xField","yField","data","StatWithMiniChartComponent","chartProps","_extends","lineWidth","_StatWithMiniChart2","_ElevoLogo","ElevoLogo","ElevoLogoComponent","logoImage","alt","_ElevoLogo2","NEW_CHAT","LOGOUT","WrappedDropdownActions","WrappedEasyopsAvatar","AgentFlowApi_searchTaskForAgentFlow","async","options","http","post","urlTemplate","onHistoryClick","setList","setNextToken","loadNextToken","setLoadNextToken","all","next_token","catch","console","template","context","replace","_match","dropdownActions","text","_ElevoSidebar","_ElevoSidebar_brand","_handleLogout","ElevoSidebar","_init_userInstanceId","_init_extra_userInstanceId","_init_behavior","_init_extra_behavior","_init_logoUrl","_init_extra_logoUrl","_init_newChatUrl","_init_extra_newChatUrl","_init_historyUrlTemplate","_init_extra_historyUrlTemplate","_init_historyActions","_init_extra_historyActions","_init_logout","_init_extra_logout","_get_logout","userInstanceId","logoUrl","newChatUrl","historyUrlTemplate","historyActions","ElevoSidebarComponent","onLogout","collapsed","setCollapsed","handleCollapse","handleExpand","handleClickMask","handleHistoryClick","nameOrInstanceId","showName","_ElevoSidebar2","_set_logout","___CSS_LOADER_URL_IMPORT_0___","URL","___CSS_LOADER_URL_REPLACEMENT_0___"],"sourceRoot":""}
|