@next-bricks/ai-portal 0.25.1 → 0.25.2
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 +14 -14
- package/dist/chunks/5054.b5664d8e.js +2 -0
- package/dist/chunks/5054.b5664d8e.js.map +1 -0
- package/dist/chunks/6175.85d46564.js +3 -0
- package/dist/chunks/6175.85d46564.js.map +1 -0
- package/dist/chunks/chat-stream.ee882aeb.js +2 -0
- package/dist/chunks/chat-stream.ee882aeb.js.map +1 -0
- package/dist/chunks/{main.94f38953.js → main.2a65e7bb.js} +2 -2
- package/dist/chunks/{main.94f38953.js.map → main.2a65e7bb.js.map} +1 -1
- package/dist/examples.json +10 -10
- package/dist/{index.42684e6d.js → index.9c3a15cf.js} +2 -2
- package/dist/{index.42684e6d.js.map → index.9c3a15cf.js.map} +1 -1
- package/dist/manifest.json +78 -78
- package/dist/types.json +64 -64
- package/package.json +2 -2
- package/dist/chunks/5054.89a601a2.js +0 -2
- package/dist/chunks/5054.89a601a2.js.map +0 -1
- package/dist/chunks/6175.2dde0d7d.js +0 -3
- package/dist/chunks/6175.2dde0d7d.js.map +0 -1
- package/dist/chunks/chat-stream.c2b961c7.js +0 -2
- package/dist/chunks/chat-stream.c2b961c7.js.map +0 -1
- /package/dist/chunks/{6175.2dde0d7d.js.LICENSE.txt → 6175.85d46564.js.LICENSE.txt} +0 -0
package/dist/bricks.json
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"id": "bricks/ai-portal",
|
|
3
3
|
"bricks": [
|
|
4
|
-
"ai-portal.cruise-canvas",
|
|
5
4
|
"ai-portal.chat-box",
|
|
6
|
-
"ai-portal.
|
|
5
|
+
"ai-portal.cruise-canvas",
|
|
7
6
|
"ai-portal.chat-history",
|
|
8
7
|
"ai-portal.stat-with-mini-chart",
|
|
8
|
+
"ai-portal.home-container",
|
|
9
9
|
"ai-portal.elevo-logo",
|
|
10
|
-
"ai-portal.elevo-sidebar",
|
|
11
10
|
"ai-portal.icon-button",
|
|
12
|
-
"ai-portal.
|
|
11
|
+
"ai-portal.elevo-sidebar",
|
|
13
12
|
"ai-portal.mcp-tools",
|
|
13
|
+
"ai-portal.show-cases",
|
|
14
14
|
"ai-portal.chat-stream",
|
|
15
15
|
"ai-portal.ai-employees",
|
|
16
16
|
"ai-portal.ai-agents"
|
|
@@ -19,6 +19,9 @@
|
|
|
19
19
|
"processors": [],
|
|
20
20
|
"editors": [],
|
|
21
21
|
"dependencies": {
|
|
22
|
+
"ai-portal.chat-box": [
|
|
23
|
+
"eo-icon"
|
|
24
|
+
],
|
|
22
25
|
"ai-portal.cruise-canvas": [
|
|
23
26
|
"eo-icon",
|
|
24
27
|
"eo-button",
|
|
@@ -31,9 +34,6 @@
|
|
|
31
34
|
"basic.copy-to-clipboard",
|
|
32
35
|
"eo-easyops-avatar"
|
|
33
36
|
],
|
|
34
|
-
"ai-portal.chat-box": [
|
|
35
|
-
"eo-icon"
|
|
36
|
-
],
|
|
37
37
|
"ai-portal.chat-history": [
|
|
38
38
|
"eo-icon",
|
|
39
39
|
"eo-link",
|
|
@@ -42,6 +42,10 @@
|
|
|
42
42
|
"ai-portal.stat-with-mini-chart": [
|
|
43
43
|
"eo-mini-line-chart"
|
|
44
44
|
],
|
|
45
|
+
"ai-portal.icon-button": [
|
|
46
|
+
"eo-icon",
|
|
47
|
+
"eo-tooltip"
|
|
48
|
+
],
|
|
45
49
|
"ai-portal.elevo-sidebar": [
|
|
46
50
|
"eo-icon",
|
|
47
51
|
"eo-link",
|
|
@@ -50,16 +54,12 @@
|
|
|
50
54
|
"eo-mini-actions",
|
|
51
55
|
"ai-portal.icon-button"
|
|
52
56
|
],
|
|
53
|
-
"ai-portal.
|
|
54
|
-
"eo-icon"
|
|
55
|
-
"eo-tooltip"
|
|
57
|
+
"ai-portal.mcp-tools": [
|
|
58
|
+
"eo-icon"
|
|
56
59
|
],
|
|
57
60
|
"ai-portal.show-cases": [
|
|
58
61
|
"eo-link"
|
|
59
62
|
],
|
|
60
|
-
"ai-portal.mcp-tools": [
|
|
61
|
-
"eo-icon"
|
|
62
|
-
],
|
|
63
63
|
"ai-portal.chat-stream": [
|
|
64
64
|
"eo-icon",
|
|
65
65
|
"eo-button",
|
|
@@ -75,5 +75,5 @@
|
|
|
75
75
|
"eo-icon"
|
|
76
76
|
]
|
|
77
77
|
},
|
|
78
|
-
"filePath": "bricks/ai-portal/dist/index.
|
|
78
|
+
"filePath": "bricks/ai-portal/dist/index.9c3a15cf.js"
|
|
79
79
|
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";(globalThis.webpackChunk_next_bricks_ai_portal=globalThis.webpackChunk_next_bricks_ai_portal||[]).push([[5054],{8778:(e,t,a)=>{a.d(t,{A:()=>l});var n=a(36758),o=a.n(n),i=a(40935),r=a.n(i)()(o());r.push([e.id,".heading--Uyl__y0l{display:flex;align-items:center;padding:5px 8px;margin:0 -8px 12px;cursor:pointer}.main--TukugFGT{font-size:16px;line-height:26px}.caret--RIrd1Bh6{opacity:0;transition:transform 0.2s ease-in-out}.heading--Uyl__y0l:hover{background:rgba(184,187,205,0.15);border-radius:8px}.heading--Uyl__y0l:hover .caret--RIrd1Bh6{opacity:1}.icon--i_Eo2KvU{display:flex;align-items:center;margin-right:12px}.title--dRyYSVof{color:#262626;font-weight:500;flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tool--eKJi4smD{background:#e2e5ef;border:1px solid #d4d4de;border-radius:13px;line-height:24px;padding:0 12px;width:-moz-fit-content;width:fit-content;color:#595959;cursor:pointer}.body--CUgbPhLT{padding-left:26px;margin-bottom:20px}.collapsed--RP7bbO2u .body--CUgbPhLT{display:none}.collapsed--RP7bbO2u .caret--RIrd1Bh6{transform:rotate(180deg);opacity:1}.content--zdMqn1ov{margin-top:14px}.content--zdMqn1ov .markdown--id3ANDOE .mermaid{background:rgba(255,255,255,0.6);border-radius:8px;border:1px solid rgba(0,0,0,0.1);-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);padding:20px;min-width:var(--cruise-canvas-node-width-medium);width:-moz-fit-content;width:fit-content;max-width:100%}.content--zdMqn1ov:empty{display:none}.message--CC09F6Pi:first-child > .message-part--h0OExat1:first-child > :first-child{margin-top:0}.icon--i_Eo2KvU{color:#abaab7}.completed--NfHzTqxj .icon--i_Eo2KvU{color:#0fbe59}.failed--UHw5ym5a .icon--i_Eo2KvU{color:#f24c25}.working--hPmYriQY .icon--i_Eo2KvU{color:var(--elevo-color-brand)}.input-required--iLv9MI8X .icon--i_Eo2KvU{color:#12aacc}.canceled--xdorM4ka .icon--i_Eo2KvU{color:#fcaa07}ai-portal\\.chat-stream[hide-mermaid] .content--zdMqn1ov .markdown--id3ANDOE .mermaid{display:none}",""]),r.locals={heading:"heading--Uyl__y0l",main:"main--TukugFGT",caret:"caret--RIrd1Bh6",icon:"icon--i_Eo2KvU",title:"title--dRyYSVof",tool:"tool--eKJi4smD",body:"body--CUgbPhLT",collapsed:"collapsed--RP7bbO2u",content:"content--zdMqn1ov",markdown:"markdown--id3ANDOE",message:"message--CC09F6Pi","message-part":"message-part--h0OExat1",completed:"completed--NfHzTqxj",failed:"failed--UHw5ym5a",working:"working--hPmYriQY","input-required":"input-required--iLv9MI8X",canceled:"canceled--xdorM4ka"};const l=r},13183:(e,t,a)=>{a.d(t,{R:()=>w});var n=a(18769),o=a.n(n),i=a(72591),r=a.n(i),l=a(1740),s=a.n(l),d=a(88128),c=a.n(d),p=a(30855),m=a.n(p),u=a(93051),g=a.n(u),f=a(73656),h=a.n(f),x=a(26598),b={};b.styleTagTransform=h(),b.setAttributes=m(),b.insert=c().bind(null,"head"),b.domAPI=s(),b.insertStyleElement=g(),r()(x.A,b);const v=x.A&&x.A.locals?x.A.locals:void 0;function w(e){let{content:t}=e;return o().createElement("div",{className:v.user},t)}},17911:(e,t,a)=>{a.d(t,{n:()=>T});var n=a(18769),o=a.n(n),i=a(72591),r=a.n(i),l=a(1740),s=a.n(l),d=a(88128),c=a.n(d),p=a(30855),m=a.n(p),u=a(93051),g=a.n(u),f=a(73656),h=a.n(f),x=a(83090),b={};b.styleTagTransform=h(),b.setAttributes=m(),b.insert=c().bind(null,"head"),b.domAPI=s(),b.insertStyleElement=g(),r()(x.A,b);const v=x.A&&x.A.locals?x.A.locals:void 0;var w=a(36903),y=a(44394),k=a(42137),N=a(31918),E=a(95491),A=a(53373),_=a.n(A),I=a(41763),C=a(69131);const j={lib:"easyops",icon:"shrink"};function T(e){let{job:t}=e;const{setActiveToolCallJobId:a}=(0,n.useContext)(N.j),{setUserClosedAside:i}=(0,n.useContext)(E.W),[r,l]=(0,n.useMemo)((()=>{var e;const a=[],n=[],o=[];return null===(e=t.messages)||void 0===e||e.forEach((e=>{if("tool"===e.role)for(const i of e.parts){var t;if("data"===i.type)switch(null===(t=i.data)||void 0===t?void 0:t.type){case"markdown":a.push(i.data.content);break;case"cmdb_instance_detail":n.push(i.data)}else"file"===i.type&&o.push(i.file)}})),[a.join(""),n,o]}),[t.messages]);return o().createElement("div",{className:v.aside},o().createElement("div",{className:v.box},o().createElement("div",{className:v.header},o().createElement("div",{className:v.title},"Elevo's Computer"),o().createElement(y.Py,{icon:j,variant:"mini",onClick:()=>{a(null),i(!0)}})),o().createElement("div",{className:v.body},o().createElement(k.t,{job:t,variant:"read-only"}),t.generatedView?(0,C.F)(t.generatedView)?o().createElement(O,{name:t.generatedView.title||"View",source:t.generatedView.source,language:"jsx"}):o().createElement(O,{name:t.generatedView.title||"View",source:JSON.stringify(t.generatedView,null,2),language:"json"}):r?o().createElement(O,{name:"Content",source:r,language:"md"}):l.length>0?o().createElement(O,{name:"CMDB",source:JSON.stringify(l,null,2),language:"json"}):null)))}function O(e){let{name:t,source:a,language:n}=e;return o().createElement("div",{className:_()(v.app,v.editor)},o().createElement("div",{className:v.heading},`${t}.${n}`),o().createElement("div",{className:_()(v.content,w.A.markdown)},o().createElement("div",{className:v.scroller},o().createElement(I.w,{content:`\`\`\`\`${n}\n${a}\n\`\`\`\``}))))}},22025:(e,t,a)=>{a.d(t,{A:()=>x});var n=a(72591),o=a.n(n),i=a(1740),r=a.n(i),l=a(88128),s=a.n(l),d=a(30855),c=a.n(d),p=a(93051),m=a.n(p),u=a(73656),g=a.n(u),f=a(76239),h={};h.styleTagTransform=g(),h.setAttributes=c(),h.insert=s().bind(null,"head"),h.domAPI=r(),h.insertStyleElement=m(),o()(f.A,h);const x=f.A&&f.A.locals?f.A.locals:void 0},26598:(e,t,a)=>{a.d(t,{A:()=>l});var n=a(36758),o=a.n(n),i=a(40935),r=a.n(i)()(o());r.push([e.id,".user--HjXM9OHW{background:rgba(255,255,255,0.6);border-radius:24px;padding:8px 16px;width:-moz-fit-content;width:fit-content;max-width:500px;margin-left:auto;overflow-wrap:break-word;white-space:pre-wrap;font-size:16px;line-height:26px}",""]),r.locals={user:"user--HjXM9OHW"};const l=r},28340:(e,t,a)=>{e.exports=a.p+"images/ddd8ccd2.png"},30578:(e,t,a)=>{a.d(t,{G:()=>Y});var n=a(18769),o=a.n(n),i=a(72591),r=a.n(i),l=a(1740),s=a.n(l),d=a(88128),c=a.n(d),p=a(30855),m=a.n(p),u=a(93051),g=a.n(u),f=a(73656),h=a.n(f),x=a(35754),b={};b.styleTagTransform=h(),b.setAttributes=m(),b.insert=c().bind(null,"head"),b.domAPI=s(),b.insertStyleElement=g(),r()(x.A,b);const v=x.A&&x.A.locals?x.A.locals:void 0,w=a.p+"images/de350a46.png";var y=a(89575),k=a(53373),N=a.n(k),E=a(8778),A={};A.styleTagTransform=h(),A.setAttributes=m(),A.insert=c().bind(null,"head"),A.domAPI=s(),A.insertStyleElement=g(),r()(E.A,A);const _=E.A&&E.A.locals?E.A.locals:void 0;var I=a(36903),C=a(44394),j=a(41763),T=a(74049),O=a(92914);function P(e){let{job:t}=e;const a=(0,n.useMemo)((()=>{var e;const a=null===(e=t.messages)||void 0===e?void 0:e.find((e=>"tool"===e.role));if(a){var n;const e=null===(n=a.parts)||void 0===n||null===(n=n.find((e=>"text"===e.type)))||void 0===n?void 0:n.text;if(e)try{return JSON.parse(e)}catch{}}return null}),[t.messages]);return"plan"===(null==a?void 0:a.type)&&Array.isArray(a.steps)?o().createElement("div",{className:_.message},o().createElement("ol",{style:{paddingLeft:.5*Math.floor(Math.log10(a.steps.length+1))+1.5+"em"}},a.steps.map(((e,t)=>o().createElement("li",{key:t},e))))):o().createElement("div",{className:_.message},"Something went wrong.")}var R=a(85317),S=a(23543),M=a(65438),U={};U.styleTagTransform=h(),U.setAttributes=m(),U.insert=c().bind(null,"head"),U.domAPI=s(),U.insertStyleElement=g(),r()(M.A,U);const q=M.A&&M.A.locals?M.A.locals:void 0;function z(e){let{job:t}=e;const[a,i]=(0,n.useState)("medium"),r=(0,n.useCallback)((e=>{i(e)}),[]);return o().createElement("div",{className:N()(q.view,{[q.large]:"large"===a})},o().createElement(S.y,{job:t,onSizeChange:r}))}var L=a(31918),D=a(95491);const K={lib:"fa",icon:"angle-up"};function F(e){var t,a,i,r,l;let{job:s,taskState:d}=e;const c=s.toolCall,p=(null==c||null===(t=c.annotations)||void 0===t?void 0:t.title)||(null==c?void 0:c.name),m=null==c?void 0:c.name,u="ask_human"===m,g="ask_human_confirming_plan"===m,f=u||g,h=u&&["ask_user_more","ask_user_confirm","ask_user_choose","ask_user_select_from_cmdb","ask_user_adjust_plan"].includes(null===(a=s.toolCall.arguments)||void 0===a?void 0:a.command)||g,x=!!c&&!f,{setActiveToolCallJobId:b}=(0,n.useContext)(L.j),{lastToolCallJobId:v,setUserClosedAside:w}=(0,n.useContext)(D.W),{className:k,icon:E}=(0,n.useMemo)((()=>function(e,t){switch(e){case"completed":return{className:_.completed,icon:{lib:"antd",theme:"filled",icon:"check-circle"}};case"submitted":case"working":return"paused"===t||"canceled"===t?{icon:{lib:"fa",prefix:"far",icon:"paused"===t?"circle-pause":"circle-stop"}}:{className:_.working,icon:{lib:"antd",theme:"outlined",icon:"loading-3-quarters",spinning:!0}};case"input-required":return{className:_["input-required"],icon:{lib:"fa",prefix:"far",icon:"circle-user"}};case"failed":return{className:_.failed,icon:{lib:"fa",prefix:"fas",icon:"xmark"}};case"canceled":return{className:_.canceled,icon:{lib:"fa",prefix:"far",icon:"circle-stop"}};case"skipped":return{icon:{lib:"fa",prefix:"fas",icon:"ban"}};default:return{icon:{lib:"fa",prefix:"far",icon:"clock"}}}}(s.state,d)),[s.state,d]),[A,S]=(0,n.useMemo)((()=>{var e;const t=[],a=[],n=[];let o="llm_answer"===m;return null===(e=s.messages)||void 0===e||e.forEach((e=>{if("tool"===e.role)for(const l of e.parts){var i;if("data"===l.type)switch(null===(i=l.data)||void 0===i?void 0:i.type){case"markdown":t.push(l.data.content);break;case"cmdb_instance_detail":var r;a.push(l.data),o||(o=Object.keys("object"===(null===(r=l.data)||void 0===r||null===(r=r.outputSchema)||void 0===r?void 0:r.type)?l.data.outputSchema.properties:l.data.detail).length>6)}else"file"===l.type&&n.push(l.file)}})),[t.join(""),a,n]}),[s.messages,m]),[M,U]=(0,n.useState)(!1);return o().createElement("div",{className:N()({[_.collapsed]:M})},o().createElement("div",{className:_.main},h?o().createElement(o().Fragment,null,(g||!(null===(i=c.arguments)||void 0===i||!i.question))&&o().createElement("div",{className:N()(_.message,I.A.markdown)},o().createElement(j.w,{className:_["message-part"],content:g?(0,O.t)(O.K.CONFIRMING_PLAN_TIPS):null===(r=s.toolCall.arguments)||void 0===r?void 0:r.question})),"input-required"===s.state&&(g?o().createElement(R.a,{jobId:s.id,steps:s.toolCall.arguments.steps}):null)):null,g&&"completed"===s.state?o().createElement(P,{job:s}):u?null:null===(l=s.messages)||void 0===l?void 0:l.map(((e,t)=>{var a;return"tool"!==e.role||f?o().createElement("div",{key:t,className:N()(_.message,I.A.markdown)},null===(a=e.parts)||void 0===a?void 0:a.map(((e,t)=>o().createElement(o().Fragment,{key:t},"text"===e.type&&o().createElement(j.w,{className:_["message-part"],content:e.text}))))):null}))),x&&o().createElement(o().Fragment,null,o().createElement("div",{className:N()(_.heading,k),onClick:()=>U((e=>!e))},o().createElement("div",{className:_.icon},o().createElement(C.Bj,E)),o().createElement("div",{className:_.title},s.instruction||p),o().createElement(C.Bj,(0,y.A)({className:_.caret},K))),o().createElement("div",{className:_.body},o().createElement("div",{className:_.tool,onClick:()=>{b(s.id),s.id===v&&w(!1)}},p),o().createElement("div",{className:_.content},A&&o().createElement("div",{className:N()(_.markdown,I.A.markdown)},o().createElement(j.w,{content:A})),S.map(((e,t)=>o().createElement("div",{key:t,className:_.box},o().createElement(T.H,e)))),s.generatedView?o().createElement(z,{job:s}):null))))}var J=a(97907);function Y(e){let{jobs:t,taskState:a,isLatest:i}=e;const r=(0,n.useMemo)((()=>{if(!i||J.Z5.includes(a))return!1;for(const e of t)if("input-required"===e.state)return!1;const e=t[t.length-1];if(e&&"working"===e.state&&e.toolCall){const t=e.toolCall.name;if("ask_human"!==t&&"ask_human_confirming_plan"!==t)return!1}return!0}),[i,t,a]);return o().createElement("div",{className:v.assistant},o().createElement("div",{className:v.avatar},o().createElement("img",{src:w,width:32,height:32,alt:"Elevo"})),o().createElement("div",{className:v.body},t.map((e=>o().createElement(F,{key:e.id,job:e,taskState:a}))),r&&o().createElement("div",{className:v.texting})))}},35754:(e,t,a)=>{a.d(t,{A:()=>l});var n=a(36758),o=a.n(n),i=a(40935),r=a.n(i)()(o());r.push([e.id,'.assistant--CrlgPgYL{display:flex}.body--sAIo2dhL{flex:1;min-width:0;padding:3px 0 3px 16px}.texting--Rpmsbpca{position:relative}.texting--Rpmsbpca::after{position:absolute;content:" ";animation:texting--Rpmsbpca 2s infinite;white-space:pre}@keyframes texting--Rpmsbpca{0%{content:" "}25%{content:". "}50%{content:".. "}75%{content:"..."}100%{content:" "}}',""]),r.locals={assistant:"assistant--CrlgPgYL",body:"body--sAIo2dhL",texting:"texting--Rpmsbpca"};const l=r},65438:(e,t,a)=>{a.d(t,{A:()=>l});var n=a(36758),o=a.n(n),i=a(40935),r=a.n(i)()(o());r.push([e.id,".view--O8CNDdS_{background:rgba(255,255,255,0.6);border-radius:8px;border:1px solid rgba(0,0,0,0.1);-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);padding:12px 20px;width:var(--cruise-canvas-node-width-medium)}.large--jT3IWlRf{width:var(--cruise-canvas-node-width-large)}",""]),r.locals={view:"view--O8CNDdS_",large:"large--jT3IWlRf"};const l=r},76239:(e,t,a)=>{a.d(t,{A:()=>m});var n=a(36758),o=a.n(n),i=a(40935),r=a.n(i),l=a(20062),s=a.n(l),d=new URL(a(28340),a.b),c=r()(o()),p=s()(d);c.push([e.id,`ai-portal\\.chat-stream{display:flex;position:relative;width:100%;height:100%;overflow:hidden;background-color:#f3f3f4;background-image:url(${p});background-size:cover;background-repeat:no-repeat;background-position:center;background-attachment:fixed;color:rgba(0,0,0,0.88);--cruise-canvas-node-width-small:330px;--cruise-canvas-node-width-medium:453px;--cruise-canvas-node-width-large:800px;--cruise-canvas-primary-color:var(--elevo-color-brand);--cruise-canvas-input-background:rgba(255,255,255,0.8);--cruise-canvas-input-box-shadow:0px 1px 0px 0px #ffffff,inset 0px 2px 4px 0px #b3bcf9}.container--IOwk4fR1{display:flex;flex-direction:column;position:relative;flex:1;min-width:0}.header--O9c4lNA3{height:54px;padding:0 24px;display:flex;align-items:center;justify-content:space-between}.header--O9c4lNA3 h1{font-weight:500;font-size:14px;margin:0;flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-align:center}.header--O9c4lNA3 .left--ed9ka1jF,.header--O9c4lNA3 .right--fs8TyVN3{width:56px}.header--O9c4lNA3 .right--fs8TyVN3{display:flex;align-items:center;justify-content:end;gap:8px}.main--KDIjetJs{overflow-y:auto;flex:1;padding:20px 24px}.narrow--xWih9UIb{width:100%;max-width:800px;margin:0 auto}.message--YIXGDQNi + .message--YIXGDQNi{margin-top:40px}.loading-icon--lagcmORP{flex:1;display:flex;align-items:center;justify-content:center;font-size:48px;color:#fff}.footer--aLZ8UWjM{padding:0 20px 24px}.aside--Xjd6To2A{width:0%;height:100%;transition:width 0.2s ease-in-out}.expanded--xZgk3uBF{width:50%}.feedback--YbYylTcK{margin:24px auto 0}.scroll-down--uNre4ZYi{display:flex;align-items:center;justify-content:center;position:absolute;left:50%;bottom:120px;transform:translateX(-50%);width:32px;height:32px;font-size:12px;border-radius:16px;background:#ffffff;box-shadow:0px 4px 8px 0px rgba(0,0,0,0.06);border:1px solid rgba(0,0,0,0.02);cursor:pointer}.scroll-down--uNre4ZYi:hover{box-shadow:0px 6px 12px 0px rgba(0,0,0,0.1)}`,""]),c.locals={container:"container--IOwk4fR1",header:"header--O9c4lNA3",left:"left--ed9ka1jF",right:"right--fs8TyVN3",main:"main--KDIjetJs",narrow:"narrow--xWih9UIb",message:"message--YIXGDQNi","loading-icon":"loading-icon--lagcmORP",footer:"footer--aLZ8UWjM",aside:"aside--Xjd6To2A",expanded:"expanded--xZgk3uBF",feedback:"feedback--YbYylTcK","scroll-down":"scroll-down--uNre4ZYi"};const m=c},80413:(e,t,a)=>{a.d(t,{e:()=>i});var n=a(18769),o=a(25538);function i(e,t){return(0,n.useMemo)((()=>{if(!e)return{messages:[],inputRequiredJobId:null,lastToolCallJobId:null};const a=[{role:"user",content:e.requirement}],{list:n,jobMap:i}=(0,o.K)(t);let r={role:"assistant",jobs:[]},l=null,s=null;for(const e of n){var d,c;const t=i.get(e);if(t.toolCall&&(s=e),"completed"===t.state&&null!==(d=t.messages)&&void 0!==d&&d.length&&t.messages.every((e=>"user"===e.role))){r.jobs.length>0&&a.push(r),a.push({role:"user",content:t.messages.flatMap((e=>e.parts.map((e=>"text"===e.type?e.text:"")))).join("")}),r={role:"assistant",jobs:[]};continue}r.jobs.push(t);const n="ask_human"===(null===(c=t.toolCall)||void 0===c?void 0:c.name);if(n&&"completed"===t.state){a.push(r);e:for(const e of null!==(p=t.messages)&&void 0!==p?p:[]){var p;if("tool"===e.role)for(const t of e.parts){if("text"===t.type)try{const{human_answer:e}=JSON.parse(t.text);a.push({role:"user",content:e})}catch(e){console.error("Error parsing human answer:",e)}break e}}r={role:"assistant",jobs:[]}}n&&"input-required"===t.state&&(l=e)}return a.push(r),{messages:a,inputRequiredJobId:l,lastToolCallJobId:s}}),[e,t])}},83090:(e,t,a)=>{a.d(t,{A:()=>l});var n=a(36758),o=a.n(n),i=a(40935),r=a.n(i)()(o());r.push([e.id,'.aside--DDIdDtkt{padding:12px 12px 12px 0;height:100%}.box--niuFBiiQ{background:#ffffff;box-shadow:1px 1px 10px 0px rgba(0,10,26,0.1);border-radius:12px;height:100%;display:flex;flex-direction:column}.header--DPl_hrTp{height:52px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid rgba(0,0,0,0.15);padding:0 20px}.title--HlE9yRcJ{font-weight:500;font-size:16px;color:#262626}.body--OLKz1zeC{flex:1;min-height:0;padding:20px;display:flex;flex-direction:column}.app--UanK0TGf{flex:1;min-height:0;background:#ffffff;border-radius:9px;border:1px solid #ccd1de;margin-top:16px;overflow:hidden;display:flex;flex-direction:column}.heading--ngRi_rQ4{background:#e6e9f3;color:#5e6472;padding:5px 14px}.content--I2i0y65v{font-size:12px;flex:1;min-height:0;position:relative}.scroller--mLfznC_I{height:100%;overflow-x:hidden;overflow-y:auto;overflow:hidden auto;padding:10px}.editor--p_Sqs1os .content--I2i0y65v div[class*="code-block--"]{position:static}.editor--p_Sqs1os .content--I2i0y65v code[class*="language-"],\n.editor--p_Sqs1os .content--I2i0y65v pre[class*="language-"]{background:none;padding:0;margin:0;border-radius:0}',""]),r.locals={aside:"aside--DDIdDtkt",box:"box--niuFBiiQ",header:"header--DPl_hrTp",title:"title--HlE9yRcJ",body:"body--OLKz1zeC",app:"app--UanK0TGf",heading:"heading--ngRi_rQ4",content:"content--I2i0y65v",scroller:"scroller--mLfznC_I",editor:"editor--p_Sqs1os"};const l=r},92914:(e,t,a)=>{a.d(t,{I:()=>r,K:()=>o,NS:()=>i,t:()=>l});var n=a(90079);let o=function(e){return e.CONFIRMING_PLAN_TIPS="CONFIRMING_PLAN_TIPS",e}({});const i="bricks/ai-portal/chat-stream",r={en:{CONFIRMING_PLAN_TIPS:"According to the request, I have made the following plan:"},zh:{CONFIRMING_PLAN_TIPS:"根据需求,我已制定如下计划:"}},l=n.i18n.getFixedT(null,i)},95491:(e,t,a)=>{a.d(t,{W:()=>n});const n=(0,a(18769).createContext)({lastToolCallJobId:null,setUserClosedAside:()=>{}})}}]);
|
|
2
|
+
//# sourceMappingURL=5054.b5664d8e.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chunks/5054.b5664d8e.js","mappings":"gMAGIA,E,MAA0B,GAA4B,KAE1DA,EAAwBC,KAAK,CAACC,EAAOC,GAAI,+uDAAgvD,KAEzxDH,EAAwBI,OAAS,CAChC,QAAW,oBACX,KAAQ,iBACR,MAAS,kBACT,KAAQ,iBACR,MAAS,kBACT,KAAQ,iBACR,KAAQ,iBACR,UAAa,sBACb,QAAW,oBACX,SAAY,qBACZ,QAAW,oBACX,eAAgB,yBAChB,UAAa,sBACb,OAAU,mBACV,QAAW,oBACX,iBAAkB,2BAClB,SAAY,sBAEb,S,6LCfIC,EAAU,CAAC,EAEfA,EAAQC,kBAAoB,IAC5BD,EAAQE,cAAgB,IACxBF,EAAQG,OAAS,SAAc,KAAM,QACrCH,EAAQI,OAAS,IACjBJ,EAAQK,mBAAqB,IAEhB,IAAI,IAASL,GAKnB,QAAe,KAAW,IAAQD,OAAS,IAAQA,YAASO,ECjB5D,SAASC,EAAWC,GAAgC,IAA/B,QAAEC,GAA2BD,EACvD,OAAOE,IAAAA,cAAA,OAAKC,UAAWC,EAAOC,MAAOJ,EACvC,C,6LCEIT,EAAU,CAAC,EAEfA,EAAQC,kBAAoB,IAC5BD,EAAQE,cAAgB,IACxBF,EAAQG,OAAS,SAAc,KAAM,QACrCH,EAAQI,OAAS,IACjBJ,EAAQK,mBAAqB,IAEhB,IAAI,IAASL,GAKnB,QAAe,KAAW,IAAQD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1DA,EAAwBC,KAAK,CAACC,EAAOC,GAAI,soCAC0E,KAEnHH,EAAwBI,OAAS,CAChC,MAAS,kBACT,IAAO,gBACP,OAAU,mBACV,MAAS,kBACT,KAAQ,iBACR,IAAO,gBACP,QAAW,oBACX,QAAW,oBACX,SAAY,qBACZ,OAAU,oBAEX,S,2EClBO,IAAK6I,EAAC,SAADA,GAAC,OAADA,EAAC,4CAADA,CAAC,MAIb,MASa6C,EAAK,+BAELC,EAAU,CAAEC,GAXN,CACjB9C,qBACE,6DASyB+C,GANV,CACjB/C,qBAAsB,mBAOXF,EAAIkD,EAAAA,KAAKC,UAAU,KAAML,E,mCCZ/B,MAAMlK,GAAgBwK,E,SAAAA,eAAkC,CAC7DxE,kBAAmB,KACnBjG,mBAAoBA,Q","sources":["webpack:///./src/chat-stream/NodeJob/NodeJob.module.css","webpack:///./src/chat-stream/UserMessage/UserMessage.module.css?84b2","webpack:///./src/chat-stream/UserMessage/UserMessage.tsx","webpack:///./src/chat-stream/Aside/Aside.module.css?0aa1","webpack:///./src/chat-stream/Aside/Aside.tsx","webpack:///./src/chat-stream/styles.module.css?c00e","webpack:///./src/chat-stream/UserMessage/UserMessage.module.css","webpack:///./src/chat-stream/AssistantMessage/AssistantMessage.module.css?a84b","webpack:///./src/chat-stream/NodeJob/NodeJob.module.css?840d","webpack:///./src/chat-stream/HumanAdjustPlanResult/HumanAdjustPlanResult.tsx","webpack:///./src/chat-stream/NodeView/NodeView.module.css?3001","webpack:///./src/chat-stream/NodeView/NodeView.tsx","webpack:///./src/chat-stream/NodeJob/NodeJob.tsx","webpack:///./src/chat-stream/AssistantMessage/AssistantMessage.tsx","webpack:///./src/chat-stream/AssistantMessage/AssistantMessage.module.css","webpack:///./src/chat-stream/NodeView/NodeView.module.css","webpack:///./src/chat-stream/styles.module.css","webpack:///./src/chat-stream/useChatStream.ts","webpack:///./src/chat-stream/Aside/Aside.module.css","webpack:///./src/chat-stream/i18n.ts","webpack:///./src/chat-stream/StreamContext.ts"],"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, `.heading--Uyl__y0l{display:flex;align-items:center;padding:5px 8px;margin:0 -8px 12px;cursor:pointer}.main--TukugFGT{font-size:16px;line-height:26px}.caret--RIrd1Bh6{opacity:0;transition:transform 0.2s ease-in-out}.heading--Uyl__y0l:hover{background:rgba(184,187,205,0.15);border-radius:8px}.heading--Uyl__y0l:hover .caret--RIrd1Bh6{opacity:1}.icon--i_Eo2KvU{display:flex;align-items:center;margin-right:12px}.title--dRyYSVof{color:#262626;font-weight:500;flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tool--eKJi4smD{background:#e2e5ef;border:1px solid #d4d4de;border-radius:13px;line-height:24px;padding:0 12px;width:-moz-fit-content;width:fit-content;color:#595959;cursor:pointer}.body--CUgbPhLT{padding-left:26px;margin-bottom:20px}.collapsed--RP7bbO2u .body--CUgbPhLT{display:none}.collapsed--RP7bbO2u .caret--RIrd1Bh6{transform:rotate(180deg);opacity:1}.content--zdMqn1ov{margin-top:14px}.content--zdMqn1ov .markdown--id3ANDOE .mermaid{background:rgba(255,255,255,0.6);border-radius:8px;border:1px solid rgba(0,0,0,0.1);-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);padding:20px;min-width:var(--cruise-canvas-node-width-medium);width:-moz-fit-content;width:fit-content;max-width:100%}.content--zdMqn1ov:empty{display:none}.message--CC09F6Pi:first-child > .message-part--h0OExat1:first-child > :first-child{margin-top:0}.icon--i_Eo2KvU{color:#abaab7}.completed--NfHzTqxj .icon--i_Eo2KvU{color:#0fbe59}.failed--UHw5ym5a .icon--i_Eo2KvU{color:#f24c25}.working--hPmYriQY .icon--i_Eo2KvU{color:var(--elevo-color-brand)}.input-required--iLv9MI8X .icon--i_Eo2KvU{color:#12aacc}.canceled--xdorM4ka .icon--i_Eo2KvU{color:#fcaa07}ai-portal\\\\.chat-stream[hide-mermaid] .content--zdMqn1ov .markdown--id3ANDOE .mermaid{display:none}`, \"\"]);\n// Exports\n___CSS_LOADER_EXPORT___.locals = {\n\t\"heading\": `heading--Uyl__y0l`,\n\t\"main\": `main--TukugFGT`,\n\t\"caret\": `caret--RIrd1Bh6`,\n\t\"icon\": `icon--i_Eo2KvU`,\n\t\"title\": `title--dRyYSVof`,\n\t\"tool\": `tool--eKJi4smD`,\n\t\"body\": `body--CUgbPhLT`,\n\t\"collapsed\": `collapsed--RP7bbO2u`,\n\t\"content\": `content--zdMqn1ov`,\n\t\"markdown\": `markdown--id3ANDOE`,\n\t\"message\": `message--CC09F6Pi`,\n\t\"message-part\": `message-part--h0OExat1`,\n\t\"completed\": `completed--NfHzTqxj`,\n\t\"failed\": `failed--UHw5ym5a`,\n\t\"working\": `working--hPmYriQY`,\n\t\"input-required\": `input-required--iLv9MI8X`,\n\t\"canceled\": `canceled--xdorM4ka`\n};\nexport default ___CSS_LOADER_EXPORT___;\n","\n import API from \"!../../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../../../../node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"!../../../../../node_modules/style-loader/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../../../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../../../../node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../../../../node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../../../../node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[3].use[1]!../../../../../node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[3].use[2]!./UserMessage.module.css\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\noptions.insert = insertFn.bind(null, \"head\");\noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../../../../node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[3].use[1]!../../../../../node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[3].use[2]!./UserMessage.module.css\";\n export default content && content.locals ? content.locals : undefined;\n","import React from \"react\";\nimport styles from \"./UserMessage.module.css\";\n\nexport interface UserMessageProps {\n content: string;\n}\n\nexport function UserMessage({ content }: UserMessageProps) {\n return <div className={styles.user}>{content}</div>;\n}\n","\n import API from \"!../../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../../../../node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"!../../../../../node_modules/style-loader/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../../../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../../../../node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../../../../node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../../../../node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[3].use[1]!../../../../../node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[3].use[2]!./Aside.module.css\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\noptions.insert = insertFn.bind(null, \"head\");\noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../../../../node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[3].use[1]!../../../../../node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[3].use[2]!./Aside.module.css\";\n export default content && content.locals ? content.locals : undefined;\n","import React, { useContext, useMemo } from \"react\";\nimport type { GeneralIconProps } from \"@next-bricks/icons/general-icon\";\nimport styles from \"./Aside.module.css\";\nimport sharedStyles from \"../../cruise-canvas/shared.module.css\";\nimport { WrappedIconButton } from \"../../shared/bricks\";\nimport type {\n CmdbInstanceDetailData,\n FileInfo,\n Job,\n} from \"../../cruise-canvas/interfaces\";\nimport { ToolCallStatus } from \"../../cruise-canvas/ToolCallStatus/ToolCallStatus\";\nimport { TaskContext } from \"../../shared/TaskContext\";\nimport { StreamContext } from \"../StreamContext\";\nimport classNames from \"classnames\";\nimport { EnhancedMarkdown } from \"../../cruise-canvas/EnhancedMarkdown/EnhancedMarkdown\";\nimport { isJsxView } from \"../../cruise-canvas/utils/jsx-converters/isJsxView\";\n\nconst ICON_SHRINK: GeneralIconProps = {\n lib: \"easyops\",\n icon: \"shrink\",\n};\n\nexport interface AsideProps {\n job: Job;\n}\n\nexport function Aside({ job }: AsideProps) {\n const { setActiveToolCallJobId } = useContext(TaskContext);\n const { setUserClosedAside } = useContext(StreamContext);\n\n const [toolMarkdownContent, cmdbInstanceDetails /* , files */] =\n useMemo(() => {\n const contents: string[] = [];\n const instanceDetails: CmdbInstanceDetailData[] = [];\n const files: FileInfo[] = [];\n job.messages?.forEach((message) => {\n if (message.role === \"tool\") {\n for (const part of message.parts) {\n if (part.type === \"data\") {\n switch (part.data?.type) {\n case \"markdown\":\n contents.push(part.data.content);\n break;\n case \"cmdb_instance_detail\":\n instanceDetails.push(part.data as CmdbInstanceDetailData);\n break;\n }\n } else if (part.type === \"file\") {\n files.push(part.file);\n }\n }\n }\n });\n\n const markdownContent = contents.join(\"\");\n\n return [markdownContent, instanceDetails, files] as const;\n }, [job.messages]);\n\n return (\n <div className={styles.aside}>\n <div className={styles.box}>\n <div className={styles.header}>\n <div className={styles.title}>Elevo's Computer</div>\n <WrappedIconButton\n icon={ICON_SHRINK}\n variant=\"mini\"\n onClick={() => {\n setActiveToolCallJobId(null);\n setUserClosedAside(true);\n }}\n />\n </div>\n <div className={styles.body}>\n <ToolCallStatus job={job} variant=\"read-only\" />\n {job.generatedView ? (\n isJsxView(job.generatedView) ? (\n <EditorApp\n name={job.generatedView.title || \"View\"}\n source={job.generatedView.source}\n language=\"jsx\"\n />\n ) : (\n <EditorApp\n name={job.generatedView.title || \"View\"}\n source={JSON.stringify(job.generatedView, null, 2)}\n language=\"json\"\n />\n )\n ) : toolMarkdownContent ? (\n <EditorApp\n name=\"Content\"\n source={toolMarkdownContent}\n language=\"md\"\n />\n ) : cmdbInstanceDetails.length > 0 ? (\n <EditorApp\n name=\"CMDB\"\n source={JSON.stringify(cmdbInstanceDetails, null, 2)}\n language=\"json\"\n />\n ) : null}\n </div>\n </div>\n </div>\n );\n}\n\ninterface EditorAppProps {\n name: string;\n source: string;\n language: string;\n}\n\nfunction EditorApp({ name, source, language }: EditorAppProps) {\n return (\n <div className={classNames(styles.app, styles.editor)}>\n <div className={styles.heading}>{`${name}.${language}`}</div>\n <div className={classNames(styles.content, sharedStyles.markdown)}>\n <div className={styles.scroller}>\n <EnhancedMarkdown\n content={`\\`\\`\\`\\`${language}\\n${source}\\n\\`\\`\\`\\``}\n />\n </div>\n </div>\n </div>\n );\n}\n","\n import API from \"!../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../../../node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"!../../../../node_modules/style-loader/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../../../node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../../../node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../../../node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[3].use[1]!../../../../node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[3].use[2]!./styles.module.css\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\noptions.insert = insertFn.bind(null, \"head\");\noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../../../node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[3].use[1]!../../../../node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[3].use[2]!./styles.module.css\";\n export default content && content.locals ? content.locals : undefined;\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, `.user--HjXM9OHW{background:rgba(255,255,255,0.6);border-radius:24px;padding:8px 16px;width:-moz-fit-content;width:fit-content;max-width:500px;margin-left:auto;overflow-wrap:break-word;white-space:pre-wrap;font-size:16px;line-height:26px}`, \"\"]);\n// Exports\n___CSS_LOADER_EXPORT___.locals = {\n\t\"user\": `user--HjXM9OHW`\n};\nexport default ___CSS_LOADER_EXPORT___;\n","\n import API from \"!../../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../../../../node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"!../../../../../node_modules/style-loader/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../../../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../../../../node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../../../../node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../../../../node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[3].use[1]!../../../../../node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[3].use[2]!./AssistantMessage.module.css\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\noptions.insert = insertFn.bind(null, \"head\");\noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../../../../node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[3].use[1]!../../../../../node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[3].use[2]!./AssistantMessage.module.css\";\n export default content && content.locals ? content.locals : undefined;\n","\n import API from \"!../../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../../../../node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"!../../../../../node_modules/style-loader/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../../../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../../../../node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../../../../node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../../../../node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[3].use[1]!../../../../../node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[3].use[2]!./NodeJob.module.css\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\noptions.insert = insertFn.bind(null, \"head\");\noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../../../../node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[3].use[1]!../../../../../node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[3].use[2]!./NodeJob.module.css\";\n export default content && content.locals ? content.locals : undefined;\n","import React, { useMemo } from \"react\";\nimport type { Job } from \"../../cruise-canvas/interfaces\";\nimport styles from \"../NodeJob/NodeJob.module.css\";\n\nexport interface HumanAdjustPlanResultProps {\n job: Job;\n}\n\nexport function HumanAdjustPlanResult({\n job,\n}: HumanAdjustPlanResultProps): JSX.Element {\n const response = useMemo(() => {\n const msg = job.messages?.find((msg) => {\n return msg.role === \"tool\";\n });\n if (msg) {\n const text = msg.parts?.find((part) => part.type === \"text\")?.text;\n if (text) {\n try {\n return JSON.parse(text) as { type: \"plan\"; steps: string[] };\n } catch {\n // Fallback to original text\n }\n }\n }\n return null;\n }, [job.messages]);\n\n if (response?.type === \"plan\" && Array.isArray(response.steps)) {\n return (\n <div className={styles.message}>\n <ol\n style={{\n paddingLeft: `${Math.floor(Math.log10(response.steps.length + 1)) * 0.5 + 1.5}em`,\n }}\n >\n {response.steps.map((step, index) => (\n <li key={index}>{step}</li>\n ))}\n </ol>\n </div>\n );\n }\n\n return <div className={styles.message}>Something went wrong.</div>;\n}\n","\n import API from \"!../../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../../../../node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"!../../../../../node_modules/style-loader/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../../../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../../../../node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../../../../node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../../../../node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[3].use[1]!../../../../../node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[3].use[2]!./NodeView.module.css\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\noptions.insert = insertFn.bind(null, \"head\");\noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../../../../node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[3].use[1]!../../../../../node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[3].use[2]!./NodeView.module.css\";\n export default content && content.locals ? content.locals : undefined;\n","// istanbul ignore file: experimental\nimport React, { useCallback, useState } from \"react\";\nimport classNames from \"classnames\";\nimport { CreatedView } from \"../../shared/CreatedView/CreatedView\";\nimport type { Job } from \"../../cruise-canvas/interfaces\";\nimport styles from \"./NodeView.module.css\";\n\nexport interface NodeViewProps {\n job: Job;\n}\n\nexport function NodeView({ job }: NodeViewProps): JSX.Element {\n const [size, setSize] = useState<\"medium\" | \"large\">(\"medium\");\n\n const handleSizeChange = useCallback((value: \"medium\" | \"large\") => {\n setSize(value);\n }, []);\n\n return (\n <div\n className={classNames(styles.view, {\n [styles.large]: size === \"large\",\n })}\n >\n <CreatedView job={job} onSizeChange={handleSizeChange} />\n </div>\n );\n}\n","import React, { useContext, useMemo, useState } from \"react\";\nimport classNames from \"classnames\";\nimport type { GeneralIconProps } from \"@next-bricks/icons/general-icon\";\nimport type {\n CmdbInstanceDetailData,\n FileInfo,\n Job,\n JobState,\n TaskState,\n} from \"../../cruise-canvas/interfaces.js\";\nimport styles from \"./NodeJob.module.css\";\nimport sharedStyles from \"../../cruise-canvas/shared.module.css\";\nimport { WrappedIcon } from \"../../shared/bricks.js\";\nimport { EnhancedMarkdown } from \"../../cruise-canvas/EnhancedMarkdown/EnhancedMarkdown.js\";\nimport { CmdbInstanceDetail } from \"../../cruise-canvas/CmdbInstanceDetail/CmdbInstanceDetail.js\";\nimport { K, t } from \"../i18n.js\";\nimport { HumanAdjustPlanResult } from \"../HumanAdjustPlanResult/HumanAdjustPlanResult.js\";\nimport { HumanAdjustPlan } from \"../../shared/HumanAdjustPlan/HumanAdjustPlan.js\";\nimport { NodeView } from \"../NodeView/NodeView.js\";\nimport { TaskContext } from \"../../shared/TaskContext.js\";\nimport { StreamContext } from \"../StreamContext.js\";\n\nexport interface NodeJobProps {\n job: Job;\n taskState: TaskState | undefined;\n}\n\nconst ICON_UP: GeneralIconProps = {\n lib: \"fa\",\n icon: \"angle-up\",\n};\n\nexport function NodeJob({ job, taskState }: NodeJobProps) {\n const toolCall = job.toolCall;\n const toolTitle = toolCall?.annotations?.title || toolCall?.name;\n const toolName = toolCall?.name;\n const askUser = toolName === \"ask_human\";\n const askUserPlan = toolName === \"ask_human_confirming_plan\";\n const generalAskUser = askUser || askUserPlan;\n const knownAskUser =\n (askUser &&\n [\n \"ask_user_more\",\n \"ask_user_confirm\",\n \"ask_user_choose\",\n \"ask_user_select_from_cmdb\",\n \"ask_user_adjust_plan\",\n ].includes(job.toolCall!.arguments?.command as string)) ||\n askUserPlan;\n const showToolCall = !!toolCall && !generalAskUser;\n const { setActiveToolCallJobId } = useContext(TaskContext);\n const { lastToolCallJobId, setUserClosedAside } = useContext(StreamContext);\n\n const { className, icon } = useMemo(() => {\n return getClassNameAndIconProps(job.state, taskState);\n }, [job.state, taskState]);\n\n const [toolMarkdownContent, cmdbInstanceDetails /* , files */] =\n useMemo(() => {\n const contents: string[] = [];\n const instanceDetails: CmdbInstanceDetailData[] = [];\n const files: FileInfo[] = [];\n let large = toolName === \"llm_answer\";\n job.messages?.forEach((message) => {\n if (message.role === \"tool\") {\n for (const part of message.parts) {\n if (part.type === \"data\") {\n switch (part.data?.type) {\n case \"markdown\":\n contents.push(part.data.content);\n break;\n case \"cmdb_instance_detail\":\n instanceDetails.push(part.data as CmdbInstanceDetailData);\n if (!large) {\n large =\n Object.keys(\n part.data?.outputSchema?.type === \"object\"\n ? part.data.outputSchema.properties\n : part.data.detail\n ).length > 6;\n }\n break;\n }\n } else if (part.type === \"file\") {\n files.push(part.file);\n }\n }\n }\n });\n\n const markdownContent = contents.join(\"\");\n\n return [markdownContent, instanceDetails, files] as const;\n }, [job.messages, toolName]);\n\n const [collapsed, setCollapsed] = useState(false);\n\n return (\n <div className={classNames({ [styles.collapsed]: collapsed })}>\n <div className={styles.main}>\n {knownAskUser ? (\n <>\n {(askUserPlan || !!toolCall!.arguments?.question) && (\n <div\n className={classNames(styles.message, sharedStyles.markdown)}\n >\n <EnhancedMarkdown\n className={styles[\"message-part\"]}\n content={\n askUserPlan\n ? t(K.CONFIRMING_PLAN_TIPS)\n : (job.toolCall!.arguments?.question as string)\n }\n />\n </div>\n )}\n {job.state === \"input-required\" &&\n (askUserPlan ? (\n <HumanAdjustPlan\n jobId={job.id}\n steps={job.toolCall!.arguments!.steps as string[]}\n />\n ) : null)}\n </>\n ) : null}\n {askUserPlan && job.state === \"completed\" ? (\n <HumanAdjustPlanResult job={job} />\n ) : askUser ? null : (\n job.messages?.map((message, index) =>\n message.role === \"tool\" && !generalAskUser ? null : (\n <div\n key={index}\n className={classNames(styles.message, sharedStyles.markdown)}\n >\n {message.parts?.map((part, partIndex) => (\n <React.Fragment key={partIndex}>\n {part.type === \"text\" && (\n <EnhancedMarkdown\n className={styles[\"message-part\"]}\n content={part.text}\n />\n )}\n </React.Fragment>\n ))}\n </div>\n )\n )\n )}\n </div>\n {showToolCall && (\n <>\n <div\n className={classNames(styles.heading, className)}\n onClick={() => setCollapsed((prev) => !prev)}\n >\n <div className={styles.icon}>\n <WrappedIcon {...icon} />\n </div>\n <div className={styles.title}>{job.instruction || toolTitle}</div>\n <WrappedIcon className={styles.caret} {...ICON_UP} />\n </div>\n <div className={styles.body}>\n <div\n className={styles.tool}\n onClick={() => {\n setActiveToolCallJobId(job.id);\n if (job.id === lastToolCallJobId) {\n setUserClosedAside(false);\n }\n }}\n >\n {toolTitle}\n </div>\n <div className={styles.content}>\n {toolMarkdownContent && (\n <div\n className={classNames(styles.markdown, sharedStyles.markdown)}\n >\n <EnhancedMarkdown content={toolMarkdownContent} />\n </div>\n )}\n {cmdbInstanceDetails.map((detail, index) => (\n <div key={index} className={styles.box}>\n <CmdbInstanceDetail {...detail} />\n </div>\n ))}\n {job.generatedView ? <NodeView job={job} /> : null}\n </div>\n </div>\n </>\n )}\n </div>\n );\n}\n\nfunction getClassNameAndIconProps(\n state: JobState | undefined,\n taskState: TaskState | undefined\n) {\n switch (state) {\n case \"completed\":\n return {\n className: styles.completed,\n icon: {\n lib: \"antd\",\n theme: \"filled\",\n icon: \"check-circle\",\n },\n };\n case \"submitted\":\n case \"working\":\n if (taskState === \"paused\" || taskState === \"canceled\") {\n return {\n icon: {\n lib: \"fa\",\n prefix: \"far\",\n icon: taskState === \"paused\" ? \"circle-pause\" : \"circle-stop\",\n },\n };\n }\n return {\n className: styles.working,\n icon: {\n lib: \"antd\",\n theme: \"outlined\",\n icon: \"loading-3-quarters\",\n spinning: true,\n },\n };\n case \"input-required\":\n return {\n className: styles[\"input-required\"],\n icon: {\n lib: \"fa\",\n prefix: \"far\",\n icon: \"circle-user\",\n },\n };\n case \"failed\":\n return {\n className: styles.failed,\n icon: {\n lib: \"fa\",\n prefix: \"fas\",\n icon: \"xmark\",\n },\n };\n case \"canceled\":\n return {\n className: styles.canceled,\n icon: {\n lib: \"fa\",\n prefix: \"far\",\n icon: \"circle-stop\",\n },\n };\n case \"skipped\":\n return {\n icon: {\n lib: \"fa\",\n prefix: \"fas\",\n icon: \"ban\",\n },\n };\n default:\n return {\n icon: {\n lib: \"fa\",\n prefix: \"far\",\n icon: \"clock\",\n },\n };\n }\n}\n","import React, { useMemo } from \"react\";\nimport type { Job, TaskState } from \"../../cruise-canvas/interfaces.js\";\nimport styles from \"./AssistantMessage.module.css\";\nimport Avatar from \"../images/avatar@2x.png\";\nimport { NodeJob } from \"../NodeJob/NodeJob.js\";\nimport { NON_WORKING_STATES } from \"../../shared/constants.js\";\n\nexport interface AssistantMessageProps {\n jobs: Job[];\n taskState: TaskState | undefined;\n isLatest?: boolean;\n}\n\nexport function AssistantMessage({\n jobs,\n taskState,\n isLatest,\n}: AssistantMessageProps) {\n const working = useMemo(() => {\n if (!isLatest || NON_WORKING_STATES.includes(taskState!)) {\n return false;\n }\n for (const job of jobs) {\n if (job.state === \"input-required\") {\n return false;\n }\n }\n const lastJob = jobs[jobs.length - 1];\n if (lastJob && lastJob.state === \"working\" && lastJob.toolCall) {\n const toolName = lastJob.toolCall.name;\n if (\n toolName !== \"ask_human\" &&\n toolName !== \"ask_human_confirming_plan\"\n ) {\n return false;\n }\n }\n\n return true;\n }, [isLatest, jobs, taskState]);\n\n return (\n <div className={styles.assistant}>\n <div className={styles.avatar}>\n <img src={Avatar} width={32} height={32} alt=\"Elevo\" />\n </div>\n <div className={styles.body}>\n {jobs.map((job) => (\n <NodeJob key={job.id} job={job} taskState={taskState} />\n ))}\n {working && <div className={styles.texting}></div>}\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, `.assistant--CrlgPgYL{display:flex}.body--sAIo2dhL{flex:1;min-width:0;padding:3px 0 3px 16px}.texting--Rpmsbpca{position:relative}.texting--Rpmsbpca::after{position:absolute;content:\" \";animation:texting--Rpmsbpca 2s infinite;white-space:pre}@keyframes texting--Rpmsbpca{0%{content:\" \"}25%{content:\". \"}50%{content:\".. \"}75%{content:\"...\"}100%{content:\" \"}}`, \"\"]);\n// Exports\n___CSS_LOADER_EXPORT___.locals = {\n\t\"assistant\": `assistant--CrlgPgYL`,\n\t\"body\": `body--sAIo2dhL`,\n\t\"texting\": `texting--Rpmsbpca`\n};\nexport default ___CSS_LOADER_EXPORT___;\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, `.view--O8CNDdS_{background:rgba(255,255,255,0.6);border-radius:8px;border:1px solid rgba(0,0,0,0.1);-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);padding:12px 20px;width:var(--cruise-canvas-node-width-medium)}.large--jT3IWlRf{width:var(--cruise-canvas-node-width-large)}`, \"\"]);\n// Exports\n___CSS_LOADER_EXPORT___.locals = {\n\t\"view\": `view--O8CNDdS_`,\n\t\"large\": `large--jT3IWlRf`\n};\nexport default ___CSS_LOADER_EXPORT___;\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, `ai-portal\\\\.chat-stream{display:flex;position:relative;width:100%;height:100%;overflow:hidden;background-color:#f3f3f4;background-image:url(${___CSS_LOADER_URL_REPLACEMENT_0___});background-size:cover;background-repeat:no-repeat;background-position:center;background-attachment:fixed;color:rgba(0,0,0,0.88);--cruise-canvas-node-width-small:330px;--cruise-canvas-node-width-medium:453px;--cruise-canvas-node-width-large:800px;--cruise-canvas-primary-color:var(--elevo-color-brand);--cruise-canvas-input-background:rgba(255,255,255,0.8);--cruise-canvas-input-box-shadow:0px 1px 0px 0px #ffffff,inset 0px 2px 4px 0px #b3bcf9}.container--IOwk4fR1{display:flex;flex-direction:column;position:relative;flex:1;min-width:0}.header--O9c4lNA3{height:54px;padding:0 24px;display:flex;align-items:center;justify-content:space-between}.header--O9c4lNA3 h1{font-weight:500;font-size:14px;margin:0;flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-align:center}.header--O9c4lNA3 .left--ed9ka1jF,.header--O9c4lNA3 .right--fs8TyVN3{width:56px}.header--O9c4lNA3 .right--fs8TyVN3{display:flex;align-items:center;justify-content:end;gap:8px}.main--KDIjetJs{overflow-y:auto;flex:1;padding:20px 24px}.narrow--xWih9UIb{width:100%;max-width:800px;margin:0 auto}.message--YIXGDQNi + .message--YIXGDQNi{margin-top:40px}.loading-icon--lagcmORP{flex:1;display:flex;align-items:center;justify-content:center;font-size:48px;color:#fff}.footer--aLZ8UWjM{padding:0 20px 24px}.aside--Xjd6To2A{width:0%;height:100%;transition:width 0.2s ease-in-out}.expanded--xZgk3uBF{width:50%}.feedback--YbYylTcK{margin:24px auto 0}.scroll-down--uNre4ZYi{display:flex;align-items:center;justify-content:center;position:absolute;left:50%;bottom:120px;transform:translateX(-50%);width:32px;height:32px;font-size:12px;border-radius:16px;background:#ffffff;box-shadow:0px 4px 8px 0px rgba(0,0,0,0.06);border:1px solid rgba(0,0,0,0.02);cursor:pointer}.scroll-down--uNre4ZYi:hover{box-shadow:0px 6px 12px 0px rgba(0,0,0,0.1)}`, \"\"]);\n// Exports\n___CSS_LOADER_EXPORT___.locals = {\n\t\"container\": `container--IOwk4fR1`,\n\t\"header\": `header--O9c4lNA3`,\n\t\"left\": `left--ed9ka1jF`,\n\t\"right\": `right--fs8TyVN3`,\n\t\"main\": `main--KDIjetJs`,\n\t\"narrow\": `narrow--xWih9UIb`,\n\t\"message\": `message--YIXGDQNi`,\n\t\"loading-icon\": `loading-icon--lagcmORP`,\n\t\"footer\": `footer--aLZ8UWjM`,\n\t\"aside\": `aside--Xjd6To2A`,\n\t\"expanded\": `expanded--xZgk3uBF`,\n\t\"feedback\": `feedback--YbYylTcK`,\n\t\"scroll-down\": `scroll-down--uNre4ZYi`\n};\nexport default ___CSS_LOADER_EXPORT___;\n","import { useMemo } from \"react\";\nimport type { Job, TaskBaseDetail } from \"../cruise-canvas/interfaces.js\";\nimport type { ChatMessage } from \"./interfaces.js\";\nimport { getOrderedJobs } from \"../cruise-canvas/getOrderedJobs.js\";\n\nexport function useChatStream(\n task: TaskBaseDetail | null | undefined,\n jobs: Job[] | null | undefined\n) {\n return useMemo(() => {\n if (!task) {\n return {\n messages: [],\n inputRequiredJobId: null,\n lastToolCallJobId: null,\n };\n }\n\n const messages: ChatMessage[] = [\n {\n role: \"user\",\n content: task.requirement,\n },\n ];\n\n const { list, jobMap } = getOrderedJobs(jobs);\n\n let prevAssistantMessage: ChatMessage = {\n role: \"assistant\",\n jobs: [],\n };\n let inputRequiredJobId: string | null = null;\n let lastToolCallJobId: string | null = null;\n for (const jobId of list) {\n const job = jobMap.get(jobId)!;\n\n if (job.toolCall) {\n lastToolCallJobId = jobId;\n }\n\n if (\n job.state === \"completed\" &&\n job.messages?.length &&\n job.messages.every((msg) => msg.role === \"user\")\n ) {\n if (prevAssistantMessage.jobs.length > 0) {\n messages.push(prevAssistantMessage);\n }\n messages.push({\n role: \"user\",\n content: job.messages\n .flatMap((msg) =>\n msg.parts.map((part) => (part.type === \"text\" ? part.text : \"\"))\n )\n .join(\"\"),\n });\n prevAssistantMessage = {\n role: \"assistant\",\n jobs: [],\n };\n continue;\n }\n\n prevAssistantMessage.jobs.push(job);\n\n const toolName = job.toolCall?.name;\n const askUser = toolName === \"ask_human\";\n if (askUser && job.state === \"completed\") {\n messages.push(prevAssistantMessage);\n\n loop: for (const msg of job.messages ?? []) {\n if (msg.role === \"tool\") {\n for (const part of msg.parts) {\n if (part.type === \"text\") {\n try {\n const { human_answer } = JSON.parse(part.text);\n messages.push({\n role: \"user\",\n content: human_answer,\n });\n } catch (error) {\n // eslint-disable-next-line no-console\n console.error(\"Error parsing human answer:\", error);\n }\n }\n break loop;\n }\n }\n }\n\n prevAssistantMessage = {\n role: \"assistant\",\n jobs: [],\n };\n }\n\n if (askUser && job.state === \"input-required\") {\n inputRequiredJobId = jobId;\n }\n }\n\n messages.push(prevAssistantMessage);\n\n return { messages, inputRequiredJobId, lastToolCallJobId };\n }, [task, jobs]);\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, `.aside--DDIdDtkt{padding:12px 12px 12px 0;height:100%}.box--niuFBiiQ{background:#ffffff;box-shadow:1px 1px 10px 0px rgba(0,10,26,0.1);border-radius:12px;height:100%;display:flex;flex-direction:column}.header--DPl_hrTp{height:52px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid rgba(0,0,0,0.15);padding:0 20px}.title--HlE9yRcJ{font-weight:500;font-size:16px;color:#262626}.body--OLKz1zeC{flex:1;min-height:0;padding:20px;display:flex;flex-direction:column}.app--UanK0TGf{flex:1;min-height:0;background:#ffffff;border-radius:9px;border:1px solid #ccd1de;margin-top:16px;overflow:hidden;display:flex;flex-direction:column}.heading--ngRi_rQ4{background:#e6e9f3;color:#5e6472;padding:5px 14px}.content--I2i0y65v{font-size:12px;flex:1;min-height:0;position:relative}.scroller--mLfznC_I{height:100%;overflow-x:hidden;overflow-y:auto;overflow:hidden auto;padding:10px}.editor--p_Sqs1os .content--I2i0y65v div[class*=\"code-block--\"]{position:static}.editor--p_Sqs1os .content--I2i0y65v code[class*=\"language-\"],\n.editor--p_Sqs1os .content--I2i0y65v pre[class*=\"language-\"]{background:none;padding:0;margin:0;border-radius:0}`, \"\"]);\n// Exports\n___CSS_LOADER_EXPORT___.locals = {\n\t\"aside\": `aside--DDIdDtkt`,\n\t\"box\": `box--niuFBiiQ`,\n\t\"header\": `header--DPl_hrTp`,\n\t\"title\": `title--HlE9yRcJ`,\n\t\"body\": `body--OLKz1zeC`,\n\t\"app\": `app--UanK0TGf`,\n\t\"heading\": `heading--ngRi_rQ4`,\n\t\"content\": `content--I2i0y65v`,\n\t\"scroller\": `scroller--mLfznC_I`,\n\t\"editor\": `editor--p_Sqs1os`\n};\nexport default ___CSS_LOADER_EXPORT___;\n","import { i18n } from \"@next-core/i18n\";\n\nexport enum K {\n CONFIRMING_PLAN_TIPS = \"CONFIRMING_PLAN_TIPS\",\n}\n\nconst en: Locale = {\n CONFIRMING_PLAN_TIPS:\n \"According to the request, I have made the following plan:\",\n};\n\nconst zh: Locale = {\n CONFIRMING_PLAN_TIPS: \"根据需求,我已制定如下计划:\",\n};\n\nexport const NS = \"bricks/ai-portal/chat-stream\";\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 { createContext, type Dispatch } from \"react\";\n\nexport interface StreamContextValue {\n lastToolCallJobId: string | null;\n setUserClosedAside: Dispatch<React.SetStateAction<boolean>>;\n}\n\nexport const StreamContext = createContext<StreamContextValue>({\n lastToolCallJobId: null,\n setUserClosedAside: () => {},\n});\n"],"names":["___CSS_LOADER_EXPORT___","push","module","id","locals","options","styleTagTransform","setAttributes","insert","domAPI","insertStyleElement","undefined","UserMessage","_ref","content","React","className","styles","user","ICON_SHRINK","lib","icon","Aside","job","setActiveToolCallJobId","useContext","TaskContext","setUserClosedAside","StreamContext","toolMarkdownContent","cmdbInstanceDetails","useMemo","_job$messages","contents","instanceDetails","files","messages","forEach","message","role","part","parts","_part$data","type","data","file","join","aside","box","header","title","WrappedIconButton","variant","onClick","body","ToolCallStatus","generatedView","isJsxView","EditorApp","name","source","language","JSON","stringify","length","_ref2","classNames","app","editor","heading","sharedStyles","markdown","scroller","EnhancedMarkdown","HumanAdjustPlanResult","response","msg","find","_msg$parts","text","parse","Array","isArray","steps","style","paddingLeft","Math","floor","log10","map","step","index","key","NodeView","size","setSize","useState","handleSizeChange","useCallback","value","view","large","CreatedView","onSizeChange","ICON_UP","NodeJob","_toolCall$annotations","_arguments","_arguments2","_arguments3","_job$messages2","taskState","toolCall","toolTitle","annotations","toolName","askUser","askUserPlan","generalAskUser","knownAskUser","includes","arguments","command","showToolCall","lastToolCallJobId","state","completed","theme","prefix","working","spinning","failed","canceled","getClassNameAndIconProps","_part$data2","Object","keys","outputSchema","properties","detail","collapsed","setCollapsed","main","question","t","K","CONFIRMING_PLAN_TIPS","HumanAdjustPlan","jobId","_message$parts","partIndex","prev","WrappedIcon","instruction","_extends","caret","tool","CmdbInstanceDetail","AssistantMessage","jobs","isLatest","NON_WORKING_STATES","lastJob","assistant","avatar","src","Avatar","width","height","alt","texting","___CSS_LOADER_URL_IMPORT_0___","URL","___CSS_LOADER_URL_REPLACEMENT_0___","useChatStream","task","inputRequiredJobId","requirement","list","jobMap","getOrderedJobs","prevAssistantMessage","_job$toolCall","get","every","flatMap","loop","human_answer","error","console","NS","locales","en","zh","i18n","getFixedT","createContext"],"sourceRoot":""}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
/*! For license information please see 6175.85d46564.js.LICENSE.txt */
|
|
2
|
+
"use strict";(globalThis.webpackChunk_next_bricks_ai_portal=globalThis.webpackChunk_next_bricks_ai_portal||[]).push([[6175],{24:(e,t,i)=>{i.d(t,{A:()=>o});var n=i(36758),a=i.n(n),s=i(40935),r=i.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()},15733:(e,t,i)=>{e.exports=i.p+"images/4b299d0b.png"},21411:(e,t,i)=>{i.d(t,{A:()=>o});var n=i(36758),a=i.n(n),s=i(40935),r=i.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:var(--elevo-color-brand);margin:0 7px}.item:hover .working,\n.item.active .working{display:none}.load-more{display:flex;justify-content:center;align-items:center;height:36px}",""]);const o=r.toString()},29476:(e,t,i)=>{var n,a=i(74635),s=i(70918),r=i(26902),o=i(5536),l=i(86121),c=i(70829),d=i(62740),u=i(18769),h=i.n(u),p=i(7921),m=i(11280),g=i(23081),b=(i(65168),i(90079)),f=i(53373),v=i.n(f),k=i(99126),A=i(67566),x=i(8324),E=i(69445),w=i(2460),y=i(32464),S=i(58231),R=i(36494),N=i(97642),M=i(40369),_=i(59533),T=i(34999),C=i(27954),I=i(24388),W=i(56938),z=i(25718),D=i(39295),U=i(83888),V=i(16854),L=i(97907),O=i(44394),Y=i(85620),F=i(73349),P=i(62601),H=i(57097),B=i(85011),j=i(54163),G=i(65023),J=i(92449),$=i(62897),q=i(11303),K=i(31918),X=i(48680);let Q,Z,ee,te,ie,ne,ae,se,re,oe,le,ce,de,ue,he,pe,me,ge,be,fe,ve,ke,Ae,xe,Ee,we,ye,Se,Re,Ne,Me,_e,Te,Ce,Ie,We,ze,De,Ue,Ve,Le,Oe,Ye,Fe,Pe,He;(0,b.initializeI18n)(w.NS,w.I);const{defineElement:Be,property:je,event:Ge,method:Je}=(0,p.createDecorators)(),$e=(0,u.memo)(wt),qe=(0,u.forwardRef)(Et);let Ke;var Xe=new WeakMap,Qe=new WeakMap,Ze=new WeakMap,et=new WeakMap,tt=new WeakMap,it=new WeakMap,nt=new WeakMap,at=new WeakMap,st=new WeakMap,rt=new WeakMap,ot=new WeakMap,lt=new WeakSet,ct=new WeakMap,dt=new WeakMap,ut=new WeakMap,ht=new WeakMap,pt=new WeakMap,mt=new WeakMap,gt=new WeakMap,bt=new WeakMap,ft=new WeakMap,vt=new WeakMap,kt=new WeakMap,At=new WeakMap;class xt extends m.ReactNextElement{constructor(){super(...arguments),(0,a.A)(this,lt),(0,s.A)(this,Xe,(Q(this),ee(this))),(0,s.A)(this,Qe,(te(this),ie(this))),(0,s.A)(this,Ze,(ne(this),ae(this))),(0,s.A)(this,et,(se(this),re(this))),(0,s.A)(this,tt,(oe(this),le(this))),(0,s.A)(this,it,(ce(this),de(this))),(0,s.A)(this,nt,(ue(this),he(this))),(0,s.A)(this,at,(pe(this),me(this))),(0,s.A)(this,st,(ge(this),be(this))),(0,s.A)(this,rt,(fe(this),ve(this))),(0,s.A)(this,ot,(ke(this),Ae(this))),(0,s.A)(this,ct,(we(this),()=>{(0,o.A)(lt,this,xe).emit()})),(0,s.A)(this,dt,ye(this)),(0,s.A)(this,ut,(Ne(this),()=>{(0,o.A)(lt,this,Se).emit()})),(0,s.A)(this,ht,Me(this)),(0,s.A)(this,pt,(Ce(this),()=>{(0,o.A)(lt,this,_e).emit()})),(0,s.A)(this,mt,Ie(this)),(0,s.A)(this,gt,(De(this),()=>{(0,o.A)(lt,this,We).emit()})),(0,s.A)(this,bt,Ue(this)),(0,s.A)(this,ft,(Oe(this),e=>{(0,o.A)(lt,this,Ve).emit(e)})),(0,s.A)(this,vt,Ye(this)),(0,s.A)(this,kt,(He(this),()=>{(0,o.A)(lt,this,Fe).emit("chat")})),(0,s.A)(this,At,(0,u.createRef)())}get taskId(){return(0,c.A)(Xe,this)}set taskId(e){(0,l.A)(Xe,this,e)}get task(){return(0,c.A)(Qe,this)}set task(e){(0,l.A)(Qe,this,e)}get jobs(){return(0,c.A)(Ze,this)}set jobs(e){(0,l.A)(Ze,this,e)}get replay(){return(0,c.A)(et,this)}set replay(e){(0,l.A)(et,this,e)}get replayDelay(){return(0,c.A)(tt,this)}set replayDelay(e){(0,l.A)(tt,this,e)}get supports(){return(0,c.A)(it,this)}set supports(e){(0,l.A)(it,this,e)}get showHiddenJobs(){return(0,c.A)(nt,this)}set showHiddenJobs(e){(0,l.A)(nt,this,e)}get showFeedback(){return(0,c.A)(at,this)}set showFeedback(e){(0,l.A)(at,this,e)}get showUiSwitch(){return(0,c.A)(st,this)}set showUiSwitch(e){(0,l.A)(st,this,e)}get hideMermaid(){return(0,c.A)(rt,this)}set hideMermaid(e){(0,l.A)(rt,this,e)}resumed(){var e;null===(e=(0,c.A)(At,this).current)||void 0===e||e.resumed()}feedbackSubmitDone(){var e;null===(e=(0,c.A)(At,this).current)||void 0===e||e.feedbackSubmitDone()}feedbackSubmitFailed(){var e;null===(e=(0,c.A)(At,this).current)||void 0===e||e.feedbackSubmitFailed()}render(){return h().createElement(qe,{taskId:this.taskId,jobs:this.jobs,task:this.task,replay:this.replay,replayDelay:this.replayDelay,supports:this.supports,showHiddenJobs:this.showHiddenJobs,showFeedback:this.showFeedback,showUiSwitch:this.showUiSwitch,onShare:(0,c.A)(ct,this),onPause:(0,c.A)(ut,this),onResume:(0,c.A)(pt,this),onCancel:(0,c.A)(gt,this),onSubmitFeedback:(0,c.A)(ft,this),onSwitchToChat:(0,c.A)(kt,this),ref:(0,c.A)(At,this)})}}function Et(e,t){var i;let{taskId:n,task:a,jobs:s,replay:r,replayDelay:o,supports:l,showHiddenJobs:c,showFeedback:d,showUiSwitch:p,onShare:m,onPause:b,onResume:f,onCancel:k,onSubmitFeedback:w,onSwitchToChat:C}=e;const I=(0,u.useRef)(null),{task:W,jobs:z,error:D,humanInputRef:U,resumedRef:q,skipToResults:X,watchAgain:Q}=(0,M.S)(n,r,o),Z=n?W:a,ee=n?z:s,te=null==Z?void 0:Z.plan,ie=(0,_.B)(Z,ee,{showHiddenJobs:c}),ne=null==ie?void 0:ie.nodes,ae=null==ie?void 0:ie.edges,se=null==ie?void 0:ie.nav,re=null==ie?void 0:ie.views,oe=null==ie?void 0:ie.jobLevels,le=null!==(i=null==Z?void 0:Z.title)&&void 0!==i?i:"",ce=null==Z?void 0:Z.state,[de,ue]=(0,u.useState)(null),he=(0,u.useMemo)((()=>{if(de){const[e,t]=de.split(":");if("job"===e||"view"===e)return t}return null}),[de]),[pe,me]=(0,u.useState)(!1),[ge,be]=(0,u.useState)(!1),[fe,ve]=(0,u.useState)(!!d);(0,u.useEffect)((()=>{ve(!!d)}),[d]);const ke=(0,u.useCallback)((e=>{me(!0),w(e)}),[w]);(0,u.useImperativeHandle)(t,(()=>({resumed:()=>{var e;return null===(e=q.current)||void 0===e?void 0:e.call(q)},feedbackSubmitDone:()=>{be(!0),setTimeout((()=>{ve(!1)}),3e3)},feedbackSubmitFailed:()=>{me(!1)}})),[q]);const Ae=(0,u.useRef)(!1);(0,u.useEffect)((()=>{const e=setTimeout((()=>{Ae.current=!0}),3e3);return()=>{clearTimeout(e)}}),[]),(0,u.useEffect)((()=>{(0,g.getRuntime)().applyPageTitle(le)}),[le]),(0,u.useEffect)((()=>{D&&(0,g.handleHttpError)(D)}),[D]);const xe=(0,u.useCallback)(((e,t)=>{var i;null===(i=U.current)||void 0===i||i.call(U,e,t)}),[U]),[Ee,we]=(0,u.useState)(null),ye=(0,u.useCallback)(((e,t)=>{we((i=>{if(!t){if(!i)return null;const t=new Map(i);return t.delete(e)?t:i}return i?new Map(i).set(e,t):new Map([[e,t]])}))}),[]),{sizeReady:Se,nodes:Re,edges:Ne}=(0,N.g)({rawNodes:ne,rawEdges:ae,state:ce,sizeMap:Ee,showFeedback:fe}),Me=(0,u.useRef)(!1),_e=(0,u.useRef)(!1),[Te,Ce]=(0,u.useState)(!1),{grabbing:Ie,transform:We,transformRef:ze,zoomer:De}=(0,S.f)({rootRef:I,zoomable:Se,scrollable:Se&&!Te,pannable:Se,manualScrolledUpRef:_e}),Ue=(0,u.useRef)(!1),Ve=(0,u.useMemo)((()=>{let e=null;const t=i=>{const n=ze.current,a="function"==typeof i?i(n):i;if(!a)return;const{transform:s,translateBy:r}=a;let o=(0,A.A)(I.current);var l,c,d,u,h,p;Ae.current&&0!==a.duration&&(Ue.current=!0,o=o.transition().duration(null!==(l=a.duration)&&void 0!==l?l:300).ease((e=>e*(2-e))).on("end",(()=>{if(Ue.current=!1,e){const i=e;e=null,t(i)}}))),s?De.transform(o,new x.uV(null!==(c=s.k)&&void 0!==c?c:n.k,null!==(d=s.x)&&void 0!==d?d:n.x,null!==(u=s.y)&&void 0!==u?u:n.y)):De.translateBy(o,null!==(h=r[0])&&void 0!==h?h:0,null!==(p=r[1])&&void 0!==p?p:0)};return i=>{Ue.current?e=i:t(i)}}),[ze,De]),{centered:Le,setCentered:Oe,reCenterRef:Ye}=(0,R.E)({nodes:Re,sizeReady:Se,zoomer:De,rootRef:I,pushZoomTransition:Ve}),Fe=L.QB.includes(ce),Pe=(0,u.useMemo)((()=>new Set(Ne.map((e=>e.source)))),[Ne]),He=(0,u.useMemo)((()=>{if(!Se)return null;const e=[];for(const t of Re)Pe.has(t.id)||e.push(t);return e.length>0?Math.max(...e.map((e=>e.view.y+e.view.height))):null}),[Re,Pe,Se]),Be=(0,u.useRef)(null);(0,u.useEffect)((()=>{Be.current=He}),[He]),(0,u.useEffect)((()=>{const e=I.current;!e||null===He||Me.current&&_e.current||Ve((t=>{const{offsetHeight:i}=e,n=He*t.k+t.y,a=i-V.xX-n;return a<0?{transform:{y:t.y+a},duration:a>-100?100:a<-500?300:200}:null}))}),[He,Ve]),(0,u.useEffect)((()=>{const e=Be.current,t=I.current;if(!t||null===e||Ue.current)return;const{offsetHeight:i}=t,n=e*We.k+We.y,a=i-V.xX-n;Me.current=a<0}),[We,De]);const je=(0,u.useCallback)((()=>{Ye.current=!0,Oe(!1)}),[Ye,Oe]),Ge=(0,u.useCallback)((e=>{De.scaleTo((0,A.A)(I.current),e)}),[De]),Je=(0,u.useMemo)((()=>Se?(0,E.o)(Re.map((e=>e.view))):null),[Re,Se]);(0,u.useEffect)((()=>{if(!Je)return;const e=I.current;if(!e)return;const{offsetWidth:t,offsetHeight:i}=e,n=t/We.k,a=i/We.k,s=-(n-20-Je.x),r=n-20+(Je.x+Je.width),o=-(a-20-Je.y),l=a-20+(Je.y+Je.height);De.translateExtent([[s,o],[r,l]])}),[De,We.k,Je]);const qe=(0,u.useCallback)((e=>{let{nodeId:t,jobId:i,behavior:n,block:a}=e;const s=I.current,r=Re.filter((e=>{var n;return!(t&&e.id!==t||i&&(null===(n=e.job)||void 0===n?void 0:n.id)!==i)}));if(!s||0===r.length)return;const o=(0,E.o)(r.map((e=>e.view))),{x:l,y:c}=(0,P.D)(o,[s.offsetWidth,s.offsetHeight],[V.RV,V.kq,V.xX,V.bL],ze.current,a);(l||c)&&Ve({translateBy:[l,c],duration:"instant"===n?0:void 0})}),[Re,Ve,ze]),Ke=(0,u.useCallback)(((e,t)=>{const i=I.current;if(!i||!Se)return;let n,a=0,s=0,r=300;const o="left"===e||"right"===e;if("line"===t)n=40*("up"===e||"left"===e?1:-1),r=150;else if("page"===t)n=(i.offsetHeight-V.xX)*("up"===e?-1:1);else{const{y:t,height:a}=(0,E.o)(Re.map((e=>e.view)));if("down"===e){const e=t+a-t+V.xX;n=i.offsetHeight-e-ze.current.y}else n=t+V.RV-ze.current.y}o?a=n:s=n,(a||s)&&Ve({translateBy:[a,s],duration:r})}),[Re,Ve,Se,ze]),[Xe,Qe]=(0,u.useState)(null),[Ze,et]=(0,u.useState)(null),[tt,it]=h().useState(null),nt=(0,u.useMemo)((()=>({humanInput:xe,onShare:m,onPause:b,onResume:f,onCancel:k,supports:l,activeExpandedViewJobId:Ze,setActiveExpandedViewJobId:et,activeToolCallJobId:Xe,setActiveToolCallJobId:Qe,submittingFeedback:pe,submittedFeedback:ge,onSubmitFeedback:ke,setShowFeedback:ve})),[xe,k,b,f,m,l,Ze,Xe,pe,ge,ke]),at=(0,u.useMemo)((()=>({onNodeResize:ye,setActiveNodeId:ue,hoverOnScrollableContent:Te,setHoverOnScrollableContent:Ce,setActiveFile:it})),[Te,ye]),st=(0,u.useMemo)((()=>Xe?null==ee?void 0:ee.find((e=>e.id===Xe)):null),[Xe,ee]),rt=(0,u.useCallback)((e=>{for(const t of e.nativeEvent.composedPath()){if(t instanceof HTMLElement&&t.classList.contains(y.A.node))return;if(t===I.current)break}ue(null)}),[]);return(0,u.useEffect)((()=>{const e=I.current;if(!e||st||Ze||tt)return;const t=t=>{if(document.activeElement&&document.activeElement!==document.body&&document.activeElement!==e)return;const i=(0,H.l)(t,{activeNodeId:de,nodes:Re});if(!i)return;const{action:n,node:a}=i;if("scroll"===n)Ke(i.direction,i.range);else if("enter"===n){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"===n?"view"===a.type?et(a.job.id):Qe(a.job.id):"switch-active-node"===n&&(a?(ue(a.id),"job"===a.type||"view"===a.type?qe({jobId:a.job.id,behavior:"smooth"}):qe({nodeId:a.id,behavior:"smooth"})):ue(null))};return document.addEventListener("keydown",t),()=>{document.removeEventListener("keydown",t)}}),[de,st,Ze,tt,Re,qe,Ke]),h().createElement(K.j.Provider,{value:nt},h().createElement(Y.Q.Provider,{value:at},h().createElement("div",{className:v()(y.A.root,{[y.A.loading]:!Z}),ref:I,style:{cursor:Ie?"grabbing":"grab"},tabIndex:-1,onClick:rt},!Z&&h().createElement("div",{className:y.A["loading-icon"]},h().createElement(O.Bj,{lib:"antd",theme:"outlined",icon:"loading-3-quarters",spinning:!0})),h().createElement("div",{className:v()(y.A.canvas,{[y.A.ready]:Se&&Le}),style:{transform:`translate3d(${We.x}px, ${We.y}px, 0) scale(${We.k})`}},h().createElement("svg",{className:y.A.edges},Ne.map((e=>e.source===V.Jw||e.target===V.Jw?null:h().createElement("path",{className:y.A.edge,key:`${e.source}-${e.target}`,d:e.points.map(((e,t)=>{let{x:i,y:n}=e;return`${0===t?"M":"L"}${i},${n}`})).join(" ")})))),Re.map((e=>{var t,i;return h().createElement($e,{key:e.id,id:e.id,type:e.type,content:e.content,job:e.job,state:e.state,startTime:null==Z?void 0:Z.startTime,instructionLoading:"instruction"===e.type&&!Pe.has(e.id)&&!L.QB.includes(e.state)&&!L.X4.includes(ce),edges:Ne,x:null===(t=e.view)||void 0===t?void 0:t.x,y:null===(i=e.view)||void 0===i?void 0:i.y,active:de===e.id})})))),h().createElement("div",{className:y.A.widgets},h().createElement(j.s,{nav:se,plan:te,jobs:ee,jobLevels:oe,currentNavId:he,taskState:ce,onClick:e=>{ue(`job:${e}`),qe({jobId:e,block:"start"})}}),h().createElement(T.l,{scale:We.k,showUiSwitch:p,onScaleChange:Ge,onReCenter:je,onSwitchToChat:C}),r?h().createElement("div",{className:y.A["footer-container"]},h().createElement(G.b,{taskDone:Fe,skipToResults:X,watchAgain:()=>{Q(),Oe(!1)}})):null!=l&&l.chat?h().createElement("div",{className:y.A["footer-container"]},h().createElement(J.s,{taskState:ce,taskDone:Fe})):null),st&&h().createElement(F.M,{job:st}),Ze&&h().createElement(B.f,{views:re}),tt&&h().createElement($.d,{file:tt})))}function wt(e){let{id:t,type:i,state:n,job:a,content:s,startTime:r,instructionLoading:o,x:l,y:c,active:d}=e;const p=(0,u.useRef)(null),{onNodeResize:m,setActiveNodeId:g}=(0,u.useContext)(Y.Q);(0,u.useEffect)((()=>{const e=p.current;if(!e)return;const i=new k.A((()=>{m(t,[e.offsetWidth,e.offsetHeight])}));return i.observe(e),()=>{i.disconnect(),m(t,null)}}),[t,m]),(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 b=(0,u.useCallback)((()=>{"start"!==i&&"instruction"!==i&&g(t)}),[t,g,i]);return h().createElement("div",{className:v()(y.A.node,{[y.A.ready]:null!=l&&null!=c}),ref:p,style:{left:l,top:c},onClick:b},"start"===i?h().createElement(C.H,null):"end"===i?h().createElement(D.s,null):"feedback"===i?h().createElement(q.k,null):"requirement"===i?h().createElement(I.O,{content:s,startTime:r,active:d}):"loading"===i?h().createElement(X.V,null):"instruction"===i?h().createElement(W.L,{content:a.instruction,loading:o}):"view"===i?h().createElement(U.Y,{job:a,active:d}):h().createElement(z.W,{state:n,job:a,active:d}))}n=xt,({e:[ee,te,ie,ne,ae,se,re,oe,le,ce,de,ue,he,pe,me,ge,be,fe,ve,ke,Ae,xe,Ee,we,ye,Se,Re,Ne,Me,_e,Te,Ce,Ie,We,ze,De,Ue,Ve,Le,Oe,Ye,Fe,Pe,He,Q],c:[Ke,Z]}=(0,d.A)(n,[Be("ai-portal.cruise-canvas",{shadowOptions:!1})],[[je(),1,"taskId"],[je({attribute:!1}),1,"task"],[je({attribute:!1}),1,"jobs"],[je({type:Boolean}),1,"replay"],[je({type:Number}),1,"replayDelay"],[je({attribute:!1}),1,"supports"],[je({type:Boolean}),1,"showHiddenJobs"],[je({type:Boolean}),1,"showFeedback"],[je({type:Boolean}),1,"showUiSwitch"],[je({type:Boolean,render:!1}),1,"hideMermaid"],[Ge({type:"share"}),1,"shareEvent",e=>(0,c.A)(ot,e),(e,t)=>(0,l.A)(ot,e,t)],[Ge({type:"pause"}),1,"pauseEvent",e=>(0,c.A)(dt,e),(e,t)=>(0,l.A)(dt,e,t)],[Ge({type:"resume"}),1,"resumeEvent",e=>(0,c.A)(ht,e),(e,t)=>(0,l.A)(ht,e,t)],[Ge({type:"cancel"}),1,"cancelEvent",e=>(0,c.A)(mt,e),(e,t)=>(0,l.A)(mt,e,t)],[Ge({type:"feedback.submit"}),1,"feedbackSubmitEvent",e=>(0,c.A)(bt,e),(e,t)=>(0,l.A)(bt,e,t)],[Ge({type:"ui.switch"}),1,"switch",e=>(0,c.A)(vt,e),(e,t)=>(0,l.A)(vt,e,t)],[Je(),2,"resumed"],[Je(),2,"feedbackSubmitDone"],[Je(),2,"feedbackSubmitFailed"]],0,(e=>At.has((0,r.A)(e))),m.ReactNextElement)),Z();var yt=i(71451),St=i(41030);let Rt=function(e){return e.ASK_ANY_THING="ASK_ANYTHING",e.COMMON_TASKS="COMMON_TASKS",e}({});const Nt="bricks/ai-portal/chat-box",Mt={en:{[Rt.ASK_ANY_THING]:"Ask anything",[Rt.COMMON_TASKS]:"Common tasks"},zh:{[Rt.ASK_ANY_THING]:"询问任何问题",[Rt.COMMON_TASKS]:"常用任务"}},_t=b.i18n.getFixedT(null,Nt),Tt=i.p+"images/af389fa6.svg";var Ct,It=i(47008);let Wt,zt,Dt,Ut,Vt,Lt,Ot,Yt,Ft,Pt,Ht,Bt,jt,Gt,Jt;(0,b.initializeI18n)(Nt,Mt);const $t=(0,m.wrapBrick)("eo-icon"),{defineElement:qt,property:Kt,event:Xt}=(0,p.createDecorators)();let Qt;var Zt=new WeakMap,ei=new WeakMap,ti=new WeakMap,ii=new WeakMap,ni=new WeakMap,ai=new WeakMap,si=new WeakSet,ri=new WeakMap;class oi extends m.ReactNextElement{constructor(){super(...arguments),(0,a.A)(this,si),(0,s.A)(this,Zt,zt(this)),(0,s.A)(this,ei,(Dt(this),Ut(this))),(0,s.A)(this,ti,(Vt(this),Lt(this))),(0,s.A)(this,ii,(Ot(this),Yt(this))),(0,s.A)(this,ni,(Ft(this),Pt(this))),(0,s.A)(this,ai,(Ht(this),Bt(this))),(0,s.A)(this,ri,(Jt(this),e=>{(0,o.A)(si,this,jt).emit(e)}))}get disabled(){return(0,c.A)(Zt,this)}set disabled(e){(0,l.A)(Zt,this,e)}get placeholder(){return(0,c.A)(ei,this)}set placeholder(e){(0,l.A)(ei,this,e)}get autoFocus(){return(0,c.A)(ti,this)}set autoFocus(e){(0,l.A)(ti,this,e)}get suggestions(){return(0,c.A)(ii,this)}set suggestions(e){(0,l.A)(ii,this,e)}get suggestionsLabel(){return(0,c.A)(ni,this)}set suggestionsLabel(e){(0,l.A)(ni,this,e)}render(){return h().createElement(li,{disabled:this.disabled,placeholder:this.placeholder,autoFocus:this.autoFocus,suggestions:this.suggestions,suggestionsLabel:this.suggestionsLabel,onSubmit:(0,c.A)(ri,this)})}}function li(e){let{disabled:t,placeholder:i,autoFocus:n,suggestions:a,suggestionsLabel:s,onSubmit:r}=e;const o=(0,u.useRef)(null),l=(0,u.useRef)(null),[c,d]=(0,u.useState)(""),p=(0,u.useRef)(""),m=(0,u.useCallback)((e=>{e.currentTarget.value&&(null==r||r(e.currentTarget.value))}),[r]),g=(0,u.useCallback)((e=>{p.current=e.target.value,d(e.target.value)}),[]),b=(0,u.useCallback)((()=>{null==r||r(p.current)}),[r]);(0,u.useEffect)((()=>{n&&Promise.resolve().then((()=>{var e;null===(e=l.current)||void 0===e||e.focus()}))}),[]);const f=(0,u.useMemo)((()=>null!=a&&a.length?(0,St.chunk)(a,Math.max(2,Math.ceil(a.length/2))):[]),[a]),v=(0,u.useCallback)((e=>{p.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(yt.e,{containerRef:o,ref:l,value:c,minRows:3,paddingSize:62,autoResize:!0,disabled:t,placeholder:null!=i?i:_t(Rt.ASK_ANY_THING),submitWhen:"enter-without-shift",onSubmit:m,onChange:g}),h().createElement("button",{className:"btn-send",disabled:!c,onClick:b},h().createElement($t,{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:Tt,width:16,height:16}),h().createElement("span",null,null!=s?s:_t(Rt.COMMON_TASKS))),f.map(((e,t)=>h().createElement(ci,{key:t,suggestions:e,pixelPerSecond:10*(t+2),onSelect:v})))))}function ci(e){let{suggestions:t,pixelPerSecond:i,onSelect:n}=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 n,r,l,c,d=0;const u=(t.offsetWidth-7)/2+7;function h(e){r=e,void 0===l&&(l=e),void 0!==n&&(d+=e-n,n=void 0),o((e-l-d)/1e3*i%u),c=requestAnimationFrame(h)}c=requestAnimationFrame(h);const p=()=>{cancelAnimationFrame(c),n=r},m=()=>{c=requestAnimationFrame(h)};return e.addEventListener("mouseenter",p),e.addEventListener("mouseleave",m),()=>{cancelAnimationFrame(c),e.removeEventListener("mouseenter",p),e.removeEventListener("mouseleave",m)}}),[t,i]),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:()=>n(e),title:e.content},h().createElement("div",{className:"title"},e.title),h().createElement("div",{className:"content"},e.content)))))))}Ct=oi,({e:[zt,Dt,Ut,Vt,Lt,Ot,Yt,Ft,Pt,Ht,Bt,jt,Gt,Jt],c:[Qt,Wt]}=(0,d.A)(Ct,[qt("ai-portal.chat-box",{styleTexts:[It.A]})],[[Kt({type:Boolean}),1,"disabled"],[Kt(),1,"placeholder"],[Kt({type:Boolean}),1,"autoFocus"],[Kt({attribute:!1}),1,"suggestions"],[Kt(),1,"suggestionsLabel"],[Xt({type:"message.submit"}),1,"messageSubmit",e=>(0,c.A)(ai,e),(e,t)=>(0,l.A)(ai,e,t)]],0,(e=>ri.has((0,r.A)(e))),m.ReactNextElement)),Wt();var di,ui=i(82165);let hi;const{defineElement:pi}=(0,p.createDecorators)();let mi;class gi extends m.ReactNextElement{render(){return h().createElement(bi,null)}}function bi(){return h().createElement("slot",null)}di=gi,[mi,hi]=(0,d.A)(di,[pi("ai-portal.home-container",{styleTexts:[ui.A]})],[],0,void 0,m.ReactNextElement).c,hi();var fi=i(21302),vi=i.n(fi);let ki=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 Ai="bricks/ai-portal/chat-history",xi={en:{[ki.TODAY]:"Today",[ki.YESTERDAY]:"Yesterday",[ki.PREVIOUS_7_DAYS]:"Previous 7 days",[ki.PREVIOUS_30_DAYS]:"Previous 30 days"},zh:{[ki.TODAY]:"今天",[ki.YESTERDAY]:"昨天",[ki.PREVIOUS_7_DAYS]:"过去7天",[ki.PREVIOUS_30_DAYS]:"过去30天"}},Ei=b.i18n.getFixedT(null,Ai);var wi,yi=i(21411);let Si,Ri,Ni,Mi,_i,Ti,Ci,Ii,Wi,zi,Di,Ui,Vi,Li,Oi;(0,b.initializeI18n)(Ai,xi);const Yi=(0,m.wrapBrick)("eo-icon"),Fi=(0,m.wrapBrick)("eo-link"),Pi=(0,m.wrapBrick)("eo-mini-actions",{onActionClick:"action.click",onVisibleChange:"visible.change"}),{defineElement:Hi,property:Bi,event:ji}=(0,p.createDecorators)();let Gi;var Ji=new WeakMap,$i=new WeakMap,qi=new WeakMap,Ki=new WeakMap,Xi=new WeakSet,Qi=new WeakMap,Zi=new WeakMap,en=new WeakMap;class tn extends m.ReactNextElement{constructor(){super(...arguments),(0,a.A)(this,Xi),(0,s.A)(this,Ji,Ri(this)),(0,s.A)(this,$i,(Ni(this),Mi(this))),(0,s.A)(this,qi,(_i(this),Ti(this))),(0,s.A)(this,Ki,(Ci(this),Ii(this))),(0,s.A)(this,Qi,(Di(this),e=>{(0,o.A)(Xi,this,Wi).emit(e)})),(0,s.A)(this,Zi,Ui(this)),(0,s.A)(this,en,(Oi(this),e=>{(0,o.A)(Xi,this,Vi).emit({nextToken:e})}))}get list(){return(0,c.A)(Ji,this)}set list(e){(0,l.A)(Ji,this,e)}get actions(){return(0,c.A)($i,this)}set actions(e){(0,l.A)($i,this,e)}get nextToken(){return(0,c.A)(qi,this)}set nextToken(e){(0,l.A)(qi,this,e)}render(){return h().createElement(nn,{root:this,list:this.list,actions:this.actions,nextToken:this.nextToken,onActionClick:(0,c.A)(Qi,this),onLoadMore:(0,c.A)(en,this)})}}function nn(e){let{root:t,list:i,actions:n,nextToken:a,onActionClick:s,onLoadMore:r}=e;const o=(0,u.useMemo)((()=>{const e=new Map,t=vi()(),n=t.clone().startOf("day"),a=n.clone().subtract(1,"day"),s=n.clone().subtract(7,"days"),r=n.clone().subtract(30,"days"),o=+n/1e3,l=+a/1e3,c=+s/1e3,d=+r/1e3,u=+t.clone().startOf("year")/1e3;for(const t of null!=i?i:[]){let i;i=t.startTime>=o?Ei(ki.TODAY):t.startTime>=l?Ei(ki.YESTERDAY):t.startTime>=c?Ei(ki.PREVIOUS_7_DAYS):t.startTime>=d?Ei(ki.PREVIOUS_30_DAYS):t.startTime>=u?vi()(1e3*t.startTime).format("MMMM"):vi()(1e3*t.startTime).format("YYYY");let n=e.get(i);n||e.set(i,n={title:i,items:[]}),n.items.push(t)}return[...e.values()]}),[i]),[l,c]=(0,u.useState)(null),d=(0,u.useRef)(null);return(0,u.useEffect)((()=>{const e=d.current;if(!e||!a)return;const i=new IntersectionObserver((e=>{for(const t of e)t.isIntersecting&&r(a)}),{root:t});return i.observe(e),()=>{i.disconnect()}}),[a,r,t]),i?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(Fi,{className:v()("item",{active:l===e.id}),url:e.url},h().createElement("div",{className:"item-title",title:e.title},e.title),h().createElement(Pi,{className:"actions",actions:n,onActionClick:t=>{s({action:t.detail,item:e})},onVisibleChange:t=>{c(t.detail?e.id:null)}}),!L.QB.includes(e.state)&&h().createElement("div",{className:"working"})))))))))),a&&h().createElement("div",{className:"load-more",ref:d},h().createElement(Yi,{lib:"antd",icon:"loading-3-quarters",spinning:!0}))):h().createElement("div",{className:"loading"},h().createElement(Yi,{lib:"antd",theme:"outlined",icon:"loading-3-quarters",spinning:!0}))}wi=tn,({e:[Ri,Ni,Mi,_i,Ti,Ci,Ii,Wi,zi,Di,Ui,Vi,Li,Oi],c:[Gi,Si]}=(0,d.A)(wi,[Hi("ai-portal.chat-history",{styleTexts:[yi.A]})],[[Bi({attribute:!1}),1,"list"],[Bi({attribute:!1}),1,"actions"],[Bi(),1,"nextToken"],[ji({type:"action.click"}),1,"actionClick",e=>(0,c.A)(Ki,e),(e,t)=>(0,l.A)(Ki,e,t)],[ji({type:"load.more"}),1,"loadMore",e=>(0,c.A)(Zi,e),(e,t)=>(0,l.A)(Zi,e,t)]],0,(e=>en.has((0,r.A)(e))),m.ReactNextElement)),Si();var an,sn=i(89575),rn=i(24);let on,ln,cn,dn,un,hn,pn,mn,gn,bn,fn,vn,kn,An,xn,En,wn,yn,Sn,Rn,Nn;const Mn=(0,m.wrapBrick)("eo-mini-line-chart"),{defineElement:_n,property:Tn}=(0,p.createDecorators)();let Cn;var In=new WeakMap,Wn=new WeakMap,zn=new WeakMap,Dn=new WeakMap,Un=new WeakMap,Vn=new WeakMap,Ln=new WeakMap,On=new WeakMap,Yn=new WeakMap,Fn=new WeakMap;class Pn extends m.ReactNextElement{constructor(){super(...arguments),(0,s.A)(this,In,ln(this)),(0,s.A)(this,Wn,(cn(this),dn(this))),(0,s.A)(this,zn,(un(this),hn(this))),(0,s.A)(this,Dn,(pn(this),mn(this))),(0,s.A)(this,Un,(gn(this),bn(this))),(0,s.A)(this,Vn,(fn(this),vn(this))),(0,s.A)(this,Ln,(kn(this),An(this))),(0,s.A)(this,On,(xn(this),En(this))),(0,s.A)(this,Yn,(wn(this),yn(this))),(0,s.A)(this,Fn,(Sn(this),Rn(this))),Nn(this)}get label(){return(0,c.A)(In,this)}set label(e){(0,l.A)(In,this,e)}get value(){return(0,c.A)(Wn,this)}set value(e){(0,l.A)(Wn,this,e)}get size(){return(0,c.A)(zn,this)}set size(e){(0,l.A)(zn,this,e)}get lineColor(){return(0,c.A)(Dn,this)}set lineColor(e){(0,l.A)(Dn,this,e)}get showArea(){return(0,c.A)(Un,this)}set showArea(e){(0,l.A)(Un,this,e)}get min(){return(0,c.A)(Vn,this)}set min(e){(0,l.A)(Vn,this,e)}get max(){return(0,c.A)(Ln,this)}set max(e){(0,l.A)(Ln,this,e)}get xField(){return(0,c.A)(On,this)}set xField(e){(0,l.A)(On,this,e)}get yField(){return(0,c.A)(Yn,this)}set yField(e){(0,l.A)(Yn,this,e)}get data(){return(0,c.A)(Fn,this)}set data(e){(0,l.A)(Fn,this,e)}render(){return h().createElement(Hn,{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 Hn(e){let{label:t,value:i,size:n,...a}=e;return"small"===n?h().createElement("div",{className:"container"},h().createElement("div",{className:"label-and-stat"},h().createElement("div",{className:"label"},t),h().createElement("div",{className:"stat"},i)),h().createElement("div",{className:"chart"},h().createElement(Mn,(0,sn.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(Mn,(0,sn.A)({},a,{lineWidth:2,width:"auto",height:"92"}))),h().createElement("div",{className:"stat"},i)))}an=Pn,({e:[ln,cn,dn,un,hn,pn,mn,gn,bn,fn,vn,kn,An,xn,En,wn,yn,Sn,Rn,Nn],c:[Cn,on]}=(0,d.A)(an,[_n("ai-portal.stat-with-mini-chart",{styleTexts:[rn.A]})],[[Tn(),1,"label"],[Tn(),1,"value"],[Tn(),1,"size"],[Tn(),1,"lineColor"],[Tn({type:Boolean}),1,"showArea"],[Tn({type:Number}),1,"min"],[Tn({type:Number}),1,"max"],[Tn(),1,"xField"],[Tn(),1,"yField"],[Tn({attribute:!1}),1,"data"]],0,void 0,m.ReactNextElement)),on();const Bn=i.p+"images/7385e5f5.png";var jn,Gn=i(31653);let Jn;const{defineElement:$n}=(0,p.createDecorators)();let qn;class Kn extends m.ReactNextElement{render(){return h().createElement(Xn,null)}}function Xn(){return h().createElement("img",{src:Bn,alt:"Elevo",width:95,height:26})}jn=Kn,[qn,Jn]=(0,d.A)(jn,[$n("ai-portal.elevo-logo",{styleTexts:[Gn.A]})],[],0,void 0,m.ReactNextElement).c,Jn();let Qn=function(e){return e.NEW_CHAT="NEW_CHAT",e.LOGOUT="LOGOUT",e.TODAY="TODAY",e.YESTERDAY="YESTERDAY",e.PREVIOUS_7_DAYS="PREVIOUS_7_DAYS",e.PREVIOUS_30_DAYS="PREVIOUS_30_DAYS",e.SWITCH_LANGUAGE="SWITCH_LANGUAGE",e}({});const Zn="bricks/ai-portal/elevo-sidebar",ea={en:{[Qn.NEW_CHAT]:"New chat",[Qn.LOGOUT]:"Logout",[Qn.TODAY]:"Today",[Qn.YESTERDAY]:"Yesterday",[Qn.PREVIOUS_7_DAYS]:"Previous 7 days",[Qn.PREVIOUS_30_DAYS]:"Previous 30 days",[Qn.SWITCH_LANGUAGE]:"中文"},zh:{[Qn.NEW_CHAT]:"新对话",[Qn.LOGOUT]:"登出",[Qn.TODAY]:"今天",[Qn.YESTERDAY]:"昨天",[Qn.PREVIOUS_7_DAYS]:"过去7天",[Qn.PREVIOUS_30_DAYS]:"过去30天",[Qn.SWITCH_LANGUAGE]:"English"}},ta=b.i18n.getFixedT(null,Zn);var ia=i(61408);const na=(0,m.wrapBrick)("eo-icon"),aa=(0,m.wrapBrick)("eo-link"),sa=(0,m.wrapBrick)("eo-dropdown-actions",{onActionClick:"action.click",onVisibleChange:"visible.change"}),ra=(0,m.wrapBrick)("eo-easyops-avatar"),oa=(0,m.wrapBrick)("eo-mini-actions",{onActionClick:"action.click",onVisibleChange:"visible.change"}),la=(0,m.wrapBrick)("ai-portal.icon-button");var ca=i(57372);const da=async(e,t)=>(await ca.http.post("api/gateway/logic.llm.aiops_service/api/v1/llm/agent/flow/search",e,t)).data,ua=(0,u.forwardRef)(ha);function ha(e,t){let{activeId:i,actions:n,urlTemplate:a,onActionClick:s,onHistoryClick:r}=e;const o=(0,u.useRef)(null),[l,c]=(0,u.useState)(null),[d,p]=(0,u.useState)(),[m,g]=(0,u.useState)();(0,u.useEffect)((()=>{Promise.all([da({next_token:m},{interceptorParams:{ignoreLoadingBar:!0}}),new Promise((e=>setTimeout(e,500)))]).then((e=>{let[t]=e;c((e=>[...null!=e?e:[],...t.data])),p(t.next_token)})).catch((e=>{console.error("Error loading chat history:",e)}))}),[m]);const b=(0,u.useMemo)((()=>{const e=new Map,t=vi()(),i=t.clone().startOf("day"),n=i.clone().subtract(1,"day"),a=i.clone().subtract(7,"days"),s=i.clone().subtract(30,"days"),r=+i/1e3,o=+n/1e3,c=+a/1e3,d=+s/1e3,u=+t.clone().startOf("year")/1e3;for(const t of null!=l?l:[]){let i;i=t.startTime>=r?ta(Qn.TODAY):t.startTime>=o?ta(Qn.YESTERDAY):t.startTime>=c?ta(Qn.PREVIOUS_7_DAYS):t.startTime>=d?ta(Qn.PREVIOUS_30_DAYS):t.startTime>=u?vi()(1e3*t.startTime).format("MMMM"):vi()(1e3*t.startTime).format("YYYY");let n=e.get(i);n||e.set(i,n={title:i,items:[]}),n.items.push(t)}return[...e.values()]}),[l]),[f,k]=(0,u.useState)(null),A=(0,u.useRef)(null);(0,u.useEffect)((()=>{const e=A.current,t=o.current;if(!e||!d||!t)return;const i=new IntersectionObserver((e=>{for(const t of e)t.isIntersecting&&g(d)}),{root:t});return i.observe(e),()=>{i.disconnect()}}),[d]);const x=(0,u.useRef)(0),E=(0,u.useCallback)((async()=>{try{const e=++x.current,t=await da({},{interceptorParams:{ignoreLoadingBar:!0}});if(e!==x.current)return;c((e=>{const i=null!=e?e:[],n=t.data,a=new Set(n.map((e=>e.id))),s=new Map(n.map((e=>[e.id,e])));let r=!1,o=!1,l=!0;for(const e of i){const t=s.get(e.id);if(!t)break;if(r=!0,o=l&&t!==n[0]||!(0,St.isEqual)(t,e),o)break;l=!1}return r?o?[...n,...i.filter((e=>!a.has(e.id)))]:e:(p(t.next_token),n)}))}catch(e){console.error("Error pulling chat history:",e)}}),[]);return(0,u.useImperativeHandle)(t,(()=>({pull:E})),[E]),l?h().createElement("div",{className:"history",ref:o},h().createElement("ul",null,b.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(aa,(0,sn.A)({className:v()("item",{"actions-active":e.id===f,active:e.id===i}),onClick:r},a?{url:(t=a,o=e,null==t?void 0:t.replace(/{{(.*?)}}/g,((e,t)=>(0,St.get)(o,t))))}:null),h().createElement("div",{className:"item-title",title:e.title},e.title),h().createElement(oa,{className:"actions",actions:n,onActionClick:t=>{s({action:t.detail,item:e})},onVisibleChange:t=>{k(t.detail?e.id:null)}}),!L.QB.includes(e.state)&&h().createElement("div",{className:"working"})));var t,o}))))))),d&&h().createElement("div",{className:"load-more",ref:A},h().createElement(na,{lib:"antd",icon:"loading-3-quarters",spinning:!0}))):h().createElement("div",{className:"history"},h().createElement("div",{className:"loading"},h().createElement(na,{lib:"antd",theme:"outlined",icon:"loading-3-quarters",spinning:!0})))}var pa;let ma,ga,ba,fa,va,ka,Aa,xa,Ea,wa,ya,Sa,Ra,Na,Ma,_a,Ta,Ca,Ia,Wa,za,Da,Ua,Va,La,Oa;(0,b.initializeI18n)(Zn,ea);const Ya={lib:"easyops",icon:"sidebar"},{defineElement:Fa,property:Pa,event:Ha,method:Ba}=(0,p.createDecorators)(),ja=(0,u.forwardRef)(ls);let Ga;var Ja=new WeakMap,$a=new WeakMap,qa=new WeakMap,Ka=new WeakMap,Xa=new WeakMap,Qa=new WeakMap,Za=new WeakMap,es=new WeakMap,ts=new WeakMap,is=new WeakSet,ns=new WeakMap,as=new WeakMap,ss=new WeakMap,rs=new WeakMap;class os extends m.ReactNextElement{constructor(){super(...arguments),(0,a.A)(this,is),(0,s.A)(this,Ja,(ma(this),ba(this))),(0,s.A)(this,$a,(fa(this),va(this))),(0,s.A)(this,qa,(ka(this),Aa(this))),(0,s.A)(this,Ka,(xa(this),Ea(this))),(0,s.A)(this,Xa,(wa(this),ya(this))),(0,s.A)(this,Qa,(Sa(this),Ra(this))),(0,s.A)(this,Za,(Na(this),Ma(this))),(0,s.A)(this,es,(_a(this),Ta(this))),(0,s.A)(this,ts,(Ca(this),Ia(this))),(0,s.A)(this,ns,(Da(this),()=>{(0,o.A)(is,this,Wa).emit()})),(0,s.A)(this,as,Ua(this)),(0,s.A)(this,ss,(Oa(this),e=>{(0,o.A)(is,this,Va).emit(e)})),(0,s.A)(this,rs,(0,u.createRef)())}get userInstanceId(){return(0,c.A)(Ja,this)}set userInstanceId(e){(0,l.A)(Ja,this,e)}get behavior(){return(0,c.A)($a,this)}set behavior(e){(0,l.A)($a,this,e)}get logoUrl(){return(0,c.A)(qa,this)}set logoUrl(e){(0,l.A)(qa,this,e)}get newChatUrl(){return(0,c.A)(Ka,this)}set newChatUrl(e){(0,l.A)(Ka,this,e)}get historyActiveId(){return(0,c.A)(Xa,this)}set historyActiveId(e){(0,l.A)(Xa,this,e)}get historyUrlTemplate(){return(0,c.A)(Qa,this)}set historyUrlTemplate(e){(0,l.A)(Qa,this,e)}get historyActions(){return(0,c.A)(Za,this)}set historyActions(e){(0,l.A)(Za,this,e)}get links(){return(0,c.A)(es,this)}set links(e){(0,l.A)(es,this,e)}pullHistory(e){setTimeout((()=>{var e;null===(e=(0,c.A)(rs,this).current)||void 0===e||e.pull()}),e)}close(){var e;null===(e=(0,c.A)(rs,this).current)||void 0===e||e.close()}render(){return h().createElement(ja,{ref:(0,c.A)(rs,this),userInstanceId:this.userInstanceId,behavior:this.behavior,logoUrl:this.logoUrl,newChatUrl:this.newChatUrl,historyActiveId:this.historyActiveId,historyUrlTemplate:this.historyUrlTemplate,historyActions:this.historyActions,links:this.links,onLogout:(0,c.A)(ns,this),onActionClick:(0,c.A)(ss,this)})}}function ls(e,t){let{userInstanceId:i,behavior:n,logoUrl:a,newChatUrl:s,historyActiveId:r,historyUrlTemplate:o,historyActions:l,links:c,onLogout:d,onActionClick:p}=e;const[m,f]=(0,u.useState)("drawer"===n),k=(0,u.useCallback)((()=>{f(!0)}),[]),A=(0,u.useCallback)((()=>{f(!1)}),[]);(0,u.useEffect)((()=>{"drawer"===n&&f(!0)}),[n]);const x=(0,u.useCallback)((()=>{f(!0)}),[]),E=(0,u.useCallback)((()=>{"drawer"===n&&f(!0)}),[n]),w=(0,u.useMemo)((()=>[{key:"logout",icon:{lib:"fa",prefix:"fas",icon:"arrow-right-from-bracket"},text:ta(Qn.LOGOUT)},{key:"switch-language",icon:{lib:"easyops",icon:"language"},text:ta(Qn.SWITCH_LANGUAGE)}]),[]),y=(0,u.useRef)(null);return(0,u.useImperativeHandle)(t,(()=>({close:()=>{f(!0)},pull:()=>{var e;null===(e=y.current)||void 0===e||e.pull()}})),[]),h().createElement("div",{className:v()("container",{collapsed:m})},"drawer"===n&&!m&&h().createElement("div",{className:"mask",onClick:x}),h().createElement("div",{className:"sidebar"},h().createElement("div",{className:"logo-bar"},h().createElement(aa,{url:a,className:"logo-link"},h().createElement("img",{className:"logo",alt:"Elevo",src:Bn,width:95,height:26})),h().createElement(la,{icon:Ya,variant:"light",onClick:k})),h().createElement(aa,{className:"new-chat",url:s},h().createElement(na,{className:"new-chat-icon",lib:"easyops",icon:"new-chat"}),ta(Qn.NEW_CHAT)),null!=c&&c.length?h().createElement("div",{className:"links"},c.map(((e,t)=>h().createElement(aa,{className:"link",key:t,url:e.url},h().createElement(na,(0,sn.A)({className:"icon"},e.icon)),h().createElement("span",{className:"title"},e.title))))):null,h().createElement(ua,{ref:y,activeId:r,urlTemplate:o,actions:l,onActionClick:p,onHistoryClick:E}),h().createElement("div",{className:"footer"},h().createElement(sa,{className:"dropdown",actions:w,onActionClick:async e=>{"logout"===e.detail.key?d():(await b.i18n.changeLanguage(b.i18n.language&&"en"===b.i18n.language.split("-")[0]?"zh":"en"),(0,g.getHistory)().reload())}},h().createElement("button",{className:"account"},h().createElement(ra,{nameOrInstanceId:i,showName:!0,size:"xs"}))))),h().createElement("div",{className:"alternative"},h().createElement(la,{icon:Ya,variant:"light",onClick:A}),h().createElement(aa,{className:"new-chat",url:s},h().createElement(na,{className:"new-chat-icon",lib:"easyops",icon:"new-chat"}),ta(Qn.NEW_CHAT))))}pa=os,({e:[ba,fa,va,ka,Aa,xa,Ea,wa,ya,Sa,Ra,Na,Ma,_a,Ta,Ca,Ia,Wa,za,Da,Ua,Va,La,Oa,ma],c:[Ga,ga]}=(0,d.A)(pa,[Fa("ai-portal.elevo-sidebar",{styleTexts:[ia.A]})],[[Pa(),1,"userInstanceId"],[Pa(),1,"behavior"],[Pa(),1,"logoUrl"],[Pa(),1,"newChatUrl"],[Pa(),1,"historyActiveId"],[Pa(),1,"historyUrlTemplate"],[Pa({attribute:!1}),1,"historyActions"],[Pa({attribute:!1}),1,"links"],[Ha({type:"logout"}),1,"logout",e=>(0,c.A)(ts,e),(e,t)=>(0,l.A)(ts,e,t)],[Ha({type:"action.click"}),1,"actionClick",e=>(0,c.A)(as,e),(e,t)=>(0,l.A)(as,e,t)],[Ba(),2,"pullHistory"],[Ba(),2,"close"]],0,(e=>rs.has((0,r.A)(e))),m.ReactNextElement)),ga();var cs,ds=i(47338);let us,hs,ps,ms,gs,bs,fs,vs,ks;const As=(0,m.wrapBrick)("eo-icon"),xs=(0,m.wrapBrick)("eo-tooltip"),{defineElement:Es,property:ws}=(0,p.createDecorators)();let ys;var Ss=new WeakMap,Rs=new WeakMap,Ns=new WeakMap,Ms=new WeakMap;class _s extends m.ReactNextElement{constructor(){super(...arguments),(0,s.A)(this,Ss,hs(this)),(0,s.A)(this,Rs,(ps(this),ms(this))),(0,s.A)(this,Ns,(gs(this),bs(this))),(0,s.A)(this,Ms,(fs(this),vs(this))),ks(this)}get icon(){return(0,c.A)(Ss,this)}set icon(e){(0,l.A)(Ss,this,e)}get tooltip(){return(0,c.A)(Rs,this)}set tooltip(e){(0,l.A)(Rs,this,e)}get disabled(){return(0,c.A)(Ns,this)}set disabled(e){(0,l.A)(Ns,this,e)}get variant(){return(0,c.A)(Ms,this)}set variant(e){(0,l.A)(Ms,this,e)}render(){return h().createElement(Ts,{icon:this.icon,tooltip:this.tooltip,disabled:this.disabled})}}function Ts(e){let{icon:t,tooltip:i,disabled:n}=e;const a=h().createElement("button",{disabled:n},h().createElement(As,t));return i?h().createElement(xs,{content:i},a):a}cs=_s,({e:[hs,ps,ms,gs,bs,fs,vs,ks],c:[ys,us]}=(0,d.A)(cs,[Es("ai-portal.icon-button",{styleTexts:[ds.A]})],[[ws({attribute:!1}),1,"icon"],[ws(),1,"tooltip"],[ws({type:Boolean}),1,"disabled"],[ws({render:!1}),1,"variant"]],0,void 0,m.ReactNextElement)),us();let Cs=function(e){return e.ALL="ALL",e}({});const Is="bricks/ai-portal/show-cases",Ws={en:{[Cs.ALL]:"All"},zh:{[Cs.ALL]:"全部"}},zs=b.i18n.getFixedT(null,Is);var Ds,Us=i(42873);let Vs,Ls,Os,Ys,Fs;(0,b.initializeI18n)(Is,Ws);const Ps=(0,m.wrapBrick)("eo-link"),{defineElement:Hs,property:Bs}=(0,p.createDecorators)();let js;var Gs=new WeakMap,Js=new WeakMap;class $s extends m.ReactNextElement{constructor(){super(...arguments),(0,s.A)(this,Gs,Ls(this)),(0,s.A)(this,Js,(Os(this),Ys(this))),Fs(this)}get list(){return(0,c.A)(Gs,this)}set list(e){(0,l.A)(Gs,this,e)}get taskUrlTemplate(){return(0,c.A)(Js,this)}set taskUrlTemplate(e){(0,l.A)(Js,this,e)}render(){return h().createElement(qs,{list:this.list,taskUrlTemplate:this.taskUrlTemplate})}}function qs(e){let{list:t,taskUrlTemplate:i}=e;const n=(0,u.useMemo)((()=>[null,...new Set(null==t?void 0:t.map((e=>e.scenario)).filter(Boolean))]),[t]),[a,s]=(0,u.useState)(null),r=(0,u.useMemo)((()=>a?null==t?void 0:t.filter((e=>e.scenario===a)):t),[a,t]);return null!=t&&t.length?h().createElement(h().Fragment,null,h().createElement("ul",{className:"nav"},null==n?void 0:n.map((e=>h().createElement("li",{key:e,className:"item"},h().createElement("a",{className:v()({active:a===e}),onClick:()=>s(e)},null===e?zs(Cs.ALL):e))))),h().createElement("ul",{className:"cases"},null==r?void 0:r.map((e=>{return h().createElement("li",{key:e.taskId,className:"item"},h().createElement(Ps,{className:"link",url:(t=i,n=e,null==t?void 0:t.replace(/{{(.*?)}}/g,((e,t)=>(0,St.get)(n,t))))},h().createElement("span",{className:v()("placeholder",e.thumbUrl?"thumbnail":"summary")},e.thumbUrl?h().createElement("span",{style:{backgroundImage:`url(${(0,g.getBasePath)()}${e.thumbUrl})`}}):h().createElement("span",{className:"summary-1"},h().createElement("span",{className:"summary-2"},h().createElement("span",null,e.summary)))),h().createElement("span",{className:"title"},h().createElement("span",null,e.title))));var t,n})))):null}Ds=$s,({e:[Ls,Os,Ys,Fs],c:[js,Vs]}=(0,d.A)(Ds,[Hs("ai-portal.show-cases",{styleTexts:[Us.A]})],[[Bs({attribute:!1}),1,"list"],[Bs(),1,"taskUrlTemplate"]],0,void 0,m.ReactNextElement)),Vs();let Ks=function(e){return e.MCP_HUB="MCP_HUB",e.ALL="ALL",e.SERVER_cmdb="SERVER_cmdb",e.SERVER_cmdb_product_helper="SERVER_cmdb_product_helper",e.SERVER_alert="SERVER_alert",e.SERVER_web_builder="SERVER_web_builder",e.SERVER_web_builder2="SERVER_web_builder2",e.SERVER_host_troubleshooting="SERVER_host_troubleshooting",e.SERVER_system_inspection="SERVER_system_inspection",e.SERVER_grafana="SERVER_grafana",e.SERVER_kubernetes="SERVER_kubernetes",e.SERVER_llm="SERVER_llm",e}({});const Xs="bricks/ai-portal/mcp-tools",Qs={en:{[Ks.MCP_HUB]:"MCP Hub",[Ks.ALL]:"All",[Ks.SERVER_cmdb]:"CMDB",[Ks.SERVER_cmdb_product_helper]:"CMDB",[Ks.SERVER_alert]:"Alert",[Ks.SERVER_web_builder]:"View",[Ks.SERVER_web_builder2]:"View",[Ks.SERVER_host_troubleshooting]:"Host Troubleshooting",[Ks.SERVER_system_inspection]:"System Inspection",[Ks.SERVER_grafana]:"Grafana",[Ks.SERVER_kubernetes]:"Kubernetes",[Ks.SERVER_llm]:"LLM"},zh:{[Ks.MCP_HUB]:"MCP 中心",[Ks.ALL]:"全部",[Ks.SERVER_cmdb]:"CMDB",[Ks.SERVER_cmdb_product_helper]:"CMDB",[Ks.SERVER_alert]:"告警",[Ks.SERVER_web_builder]:"视图",[Ks.SERVER_web_builder2]:"视图",[Ks.SERVER_host_troubleshooting]:"主机故障排查",[Ks.SERVER_system_inspection]:"系统巡检",[Ks.SERVER_grafana]:"Grafana",[Ks.SERVER_kubernetes]:"Kubernetes",[Ks.SERVER_llm]:"大模型"}},Zs=b.i18n.getFixedT(null,Xs);var er,tr=i(31748);let ir,nr,ar;(0,b.initializeI18n)(Xs,Qs);const sr={lib:"antd",icon:"tool"},rr=new Map([["EasyOps平台",{servers:["cmdb","cmdb_product_helper"]}],["Grafana",{servers:["grafana"]}],["Kubernetes",{servers:["kubernetes"]}],["监控事件",{servers:["alert"]}],["浏览器",{servers:["playwright"]}],["低代码",{servers:["web-builder","web-builder2"]}],["大模型",{servers:["llm"]}],["故障排查",{servers:["host-troubleshooting"]}]]),or=(0,m.wrapBrick)("eo-icon"),{defineElement:lr,property:cr}=(0,p.createDecorators)();let dr;var ur=new WeakMap;class hr extends m.ReactNextElement{constructor(){super(...arguments),(0,s.A)(this,ur,nr(this)),ar(this)}get list(){return(0,c.A)(ur,this)}set list(e){(0,l.A)(ur,this,e)}render(){return h().createElement(pr,{list:this.list})}}function pr(e){let{list:t}=e;const[i,n]=(0,u.useMemo)((()=>{const e=new Map,i=new Map;null==t||t.forEach((t=>{const n=Zs(`SERVER_${t.server.id.replaceAll("-","_")}`,t.server.name);let a=e.get(n);a||e.set(n,a=[]),a.push(t);const s=[...rr.entries()].find((e=>{let[i,{servers:n}]=e;return n.includes(t.server.id)})),r=s?s[0]:"其他";let o=i.get(r);o||i.set(r,o=[]),o.push(n)}));const n=["CMDB"];return[new Map([...e.entries()].sort(((e,t)=>{let[i]=e,[a]=t;const s=n.indexOf(i),r=n.indexOf(a);return(s<0?n.length:s)-(r<0?n.length:r)}))),i]}),[t]),a=(0,u.useMemo)((()=>{const e=[...rr.keys()],t=[...n.keys()];return t.sort(((t,i)=>{const n=e.indexOf(t),a=e.indexOf(i);return(n<0?e.length:n)-(a<0?e.length:a)})),[null,...t]}),[n]),[s,r]=(0,u.useState)(null),o=(0,u.useMemo)((()=>{const e=[...i];if(null===s)return e;const t=n.get(s);return e.filter((e=>{let[i]=e;return null==t?void 0:t.includes(i)}))}),[s,i,n]);return h().createElement("div",{className:"container"},h().createElement("h1",null,Zs(Ks.MCP_HUB)),h().createElement("ul",{className:"nav"},null==a?void 0:a.map((e=>h().createElement("li",{key:e,className:"item"},h().createElement("a",{className:v()({active:s===e}),onClick:()=>r(e)},null===e?Zs(Ks.ALL):e))))),h().createElement("ul",{className:"groups"},null==o?void 0:o.map((e=>{let[t,i]=e;return h().createElement("li",{key:t,className:"group"},h().createElement("h2",null,t),h().createElement("ul",{className:"list"},i.map(((e,t)=>{var i;return h().createElement("li",{key:t,className:"item"},h().createElement("div",{className:"heading"},h().createElement(or,(0,sn.A)({className:"icon"},null!==(i=e.icon)&&void 0!==i?i:sr,{fallback:sr})),h().createElement("div",{className:"title"},e.title)),h().createElement("div",{className:"description"},e.description))}))))}))))}er=hr,({e:[nr,ar],c:[dr,ir]}=(0,d.A)(er,[lr("ai-portal.mcp-tools",{styleTexts:[tr.A]})],[[cr({attribute:!1}),1,"list"]],0,void 0,m.ReactNextElement)),ir();var mr,gr=i(92914),br=i(80413),fr=i(22025),vr=i(13183),kr=i(30578),Ar=i(17911),xr=i(95491);let Er,wr,yr,Sr,Rr,Nr,Mr,_r,Tr,Cr,Ir,Wr,zr,Dr,Ur,Vr,Lr,Or,Yr,Fr,Pr,Hr,Br,jr,Gr,Jr,$r,qr,Kr,Xr,Qr,Zr,eo,to,io,no,ao,so,ro,oo;(0,b.initializeI18n)(gr.NS,gr.I);const lo={lib:"easyops",icon:"share"},{defineElement:co,property:uo,event:ho,method:po}=(0,p.createDecorators)(),mo=(0,u.forwardRef)(Lo);let go;var bo=new WeakMap,fo=new WeakMap,vo=new WeakMap,ko=new WeakMap,Ao=new WeakMap,xo=new WeakMap,Eo=new WeakMap,wo=new WeakMap,yo=new WeakSet,So=new WeakMap,Ro=new WeakMap,No=new WeakMap,Mo=new WeakMap,_o=new WeakMap,To=new WeakMap,Co=new WeakMap,Io=new WeakMap,Wo=new WeakMap,zo=new WeakMap,Do=new WeakMap,Uo=new WeakMap;class Vo extends m.ReactNextElement{constructor(){super(...arguments),(0,a.A)(this,yo),(0,s.A)(this,bo,(Er(this),yr(this))),(0,s.A)(this,fo,(Sr(this),Rr(this))),(0,s.A)(this,vo,(Nr(this),Mr(this))),(0,s.A)(this,ko,(_r(this),Tr(this))),(0,s.A)(this,Ao,(Cr(this),Ir(this))),(0,s.A)(this,xo,(Wr(this),zr(this))),(0,s.A)(this,Eo,(Dr(this),Ur(this))),(0,s.A)(this,wo,(Vr(this),Lr(this))),(0,s.A)(this,So,(Fr(this),()=>{(0,o.A)(yo,this,Or).emit()})),(0,s.A)(this,Ro,Pr(this)),(0,s.A)(this,No,(jr(this),()=>{(0,o.A)(yo,this,Hr).emit()})),(0,s.A)(this,Mo,Gr(this)),(0,s.A)(this,_o,(qr(this),()=>{(0,o.A)(yo,this,Jr).emit()})),(0,s.A)(this,To,Kr(this)),(0,s.A)(this,Co,(Zr(this),()=>{(0,o.A)(yo,this,Xr).emit()})),(0,s.A)(this,Io,eo(this)),(0,s.A)(this,Wo,(no(this),e=>{(0,o.A)(yo,this,to).emit(e)})),(0,s.A)(this,zo,ao(this)),(0,s.A)(this,Do,(oo(this),()=>{(0,o.A)(yo,this,so).emit("canvas")})),(0,s.A)(this,Uo,(0,u.createRef)())}get taskId(){return(0,c.A)(bo,this)}set taskId(e){(0,l.A)(bo,this,e)}get replay(){return(0,c.A)(fo,this)}set replay(e){(0,l.A)(fo,this,e)}get replayDelay(){return(0,c.A)(vo,this)}set replayDelay(e){(0,l.A)(vo,this,e)}get supports(){return(0,c.A)(ko,this)}set supports(e){(0,l.A)(ko,this,e)}get showFeedback(){return(0,c.A)(Ao,this)}set showFeedback(e){(0,l.A)(Ao,this,e)}get showUiSwitch(){return(0,c.A)(xo,this)}set showUiSwitch(e){(0,l.A)(xo,this,e)}get hideMermaid(){return(0,c.A)(Eo,this)}set hideMermaid(e){(0,l.A)(Eo,this,e)}resumed(){var e;null===(e=(0,c.A)(Uo,this).current)||void 0===e||e.resumed()}feedbackSubmitDone(){var e;null===(e=(0,c.A)(Uo,this).current)||void 0===e||e.feedbackSubmitDone()}feedbackSubmitFailed(){var e;null===(e=(0,c.A)(Uo,this).current)||void 0===e||e.feedbackSubmitFailed()}render(){return h().createElement(mo,{taskId:this.taskId,replay:this.replay,replayDelay:this.replayDelay,supports:this.supports,showFeedback:this.showFeedback,showUiSwitch:this.showUiSwitch,onShare:(0,c.A)(So,this),onPause:(0,c.A)(No,this),onResume:(0,c.A)(_o,this),onCancel:(0,c.A)(Co,this),onSubmitFeedback:(0,c.A)(Wo,this),onSwitchToCanvas:(0,c.A)(Do,this)})}}function Lo(e,t){var i;let{taskId:n,replay:a,replayDelay:s,supports:r,showFeedback:o,showUiSwitch:l,onShare:c,onPause:d,onResume:p,onCancel:m,onSubmitFeedback:b,onSwitchToCanvas:f}=e;const{task:A,jobs:x,error:E,humanInputRef:w,resumedRef:y,skipToResults:S,watchAgain:R}=(0,M.S)(n,a,s),N=null!==(i=null==A?void 0:A.title)&&void 0!==i?i:"",_=null==A?void 0:A.state,T=L.QB.includes(_),{messages:C,inputRequiredJobId:I,lastToolCallJobId:W}=(0,br.e)(A,x),z=(0,u.useMemo)((()=>null==x?void 0:x.flatMap((e=>e.generatedView?{id:e.id,view:e.generatedView}:[]))),[x]),[D,U]=(0,u.useState)(!1),[V,Y]=(0,u.useState)(!1),[F,P]=(0,u.useState)(!!o);(0,u.useEffect)((()=>{P(!!o)}),[o]);const H=(0,u.useCallback)((e=>{U(!0),b(e)}),[b]);(0,u.useImperativeHandle)(t,(()=>({resumed:()=>{var e;return null===(e=y.current)||void 0===e?void 0:e.call(y)},feedbackSubmitDone:()=>{Y(!0),setTimeout((()=>{P(!1)}),3e3)},feedbackSubmitFailed:()=>{U(!1)}})),[y]);const[j,$]=(0,u.useState)(null),[X,Q]=(0,u.useState)(null),[Z,ee]=(0,u.useState)(!1),te=(0,u.useRef)(!1),ie=!!A;(0,u.useEffect)((()=>{if(ie){const e=setTimeout((()=>{te.current=!0}),1e3);return()=>{clearTimeout(e)}}}),[ie]),(0,u.useEffect)((()=>{te.current&&W&&!Z&&Q(W)}),[W,Z]),(0,u.useEffect)((()=>{(0,g.getRuntime)().applyPageTitle(N)}),[N]),(0,u.useEffect)((()=>{E&&(0,g.handleHttpError)(E)}),[E]);const ne=(0,u.useCallback)(((e,t)=>{var i;null===(i=w.current)||void 0===i||i.call(w,e,t)}),[w]),ae=(0,u.useMemo)((()=>({humanInput:ne,onShare:c,onPause:d,onResume:p,onCancel:m,supports:r,activeExpandedViewJobId:j,setActiveExpandedViewJobId:$,activeToolCallJobId:X,setActiveToolCallJobId:Q,submittingFeedback:D,submittedFeedback:V,onSubmitFeedback:H,setShowFeedback:P})),[ne,c,d,p,m,r,j,X,D,V,H]),se=(0,u.useMemo)((()=>({lastToolCallJobId:W,setUserClosedAside:ee})),[W]),re=(0,u.useRef)(!1),oe=(0,u.useRef)(!1),le=(0,u.useRef)(null),[ce,de]=(0,u.useState)(!1);(0,u.useEffect)((()=>{const e=le.current,t=null==e?void 0:e.firstElementChild;if(oe.current||!e||!t)return;const i=()=>{de(e.scrollTop+e.clientHeight+24<e.scrollHeight),re.current&&(oe.current=e.scrollTop+e.clientHeight+6<e.scrollHeight)};let n;e.addEventListener("scroll",i);const a=new k.A((()=>{oe.current||(re.current=!1,e.scrollTo({top:t.scrollHeight,behavior:"instant"}),clearTimeout(n),n=setTimeout((()=>{re.current=!0}),100))}));return a.observe(t),()=>{a.disconnect(),e.removeEventListener("scroll",i)}}),[ie]);const ue=(0,u.useCallback)((()=>{const e=le.current;null==e||e.scrollTo({top:null==e?void 0:e.scrollHeight,behavior:"instant"})}),[]),he=(0,u.useMemo)((()=>X?null==x?void 0:x.find((e=>e.id===X)):null),[X,x]);return h().createElement(K.j.Provider,{value:ae},h().createElement(xr.W.Provider,{value:se},h().createElement("div",{className:fr.A.container},h().createElement("div",{className:fr.A.header},h().createElement("div",{className:fr.A.left}),h().createElement("h1",null,N),h().createElement("div",{className:fr.A.right},l&&h().createElement(O.Py,{icon:L.Rq,variant:"mini",style:{transform:"rotate(90deg)"},onClick:f}),h().createElement(O.Py,{icon:lo,variant:"mini",onClick:c}))),ie?h().createElement(h().Fragment,null,h().createElement("div",{className:fr.A.main,ref:le},h().createElement("div",{className:fr.A.narrow},C.map(((e,t,i)=>h().createElement("div",{className:fr.A.message,key:t},"user"===e.role?h().createElement(vr.R,{content:e.content}):h().createElement(kr.G,{jobs:e.jobs,taskState:_,isLatest:t===i.length-1})))),F&&"completed"===_&&h().createElement(q.k,{className:fr.A.feedback}))),h().createElement("div",{className:fr.A["scroll-down"],hidden:!ce,onClick:ue},h().createElement(O.Bj,{lib:"antd",icon:"down"}))):h().createElement("div",{className:fr.A["loading-icon"]},h().createElement(O.Bj,{lib:"antd",theme:"outlined",icon:"loading-3-quarters",spinning:!0})),a||null!=r&&r.chat?h().createElement("div",{className:fr.A.footer},h().createElement("div",{className:fr.A.narrow},a?h().createElement(G.b,{taskDone:T,skipToResults:S,watchAgain:R}):h().createElement(J.s,{taskState:_,taskDone:T,inputRequiredJobId:I}))):null),h().createElement("div",{className:v()(fr.A.aside,{[fr.A.expanded]:!!X})},X&&h().createElement(Ar.n,{job:he})),j&&h().createElement(B.f,{views:z})))}mr=Vo,({e:[yr,Sr,Rr,Nr,Mr,_r,Tr,Cr,Ir,Wr,zr,Dr,Ur,Vr,Lr,Or,Yr,Fr,Pr,Hr,Br,jr,Gr,Jr,$r,qr,Kr,Xr,Qr,Zr,eo,to,io,no,ao,so,ro,oo,Er],c:[go,wr]}=(0,d.A)(mr,[co("ai-portal.chat-stream",{shadowOptions:!1})],[[uo(),1,"taskId"],[uo({type:Boolean}),1,"replay"],[uo({type:Number}),1,"replayDelay"],[uo({attribute:!1}),1,"supports"],[uo({type:Boolean}),1,"showFeedback"],[uo({type:Boolean}),1,"showUiSwitch"],[uo({type:Boolean,render:!1}),1,"hideMermaid"],[ho({type:"share"}),1,"shareEvent",e=>(0,c.A)(wo,e),(e,t)=>(0,l.A)(wo,e,t)],[ho({type:"pause"}),1,"pauseEvent",e=>(0,c.A)(Ro,e),(e,t)=>(0,l.A)(Ro,e,t)],[ho({type:"resume"}),1,"resumeEvent",e=>(0,c.A)(Mo,e),(e,t)=>(0,l.A)(Mo,e,t)],[ho({type:"cancel"}),1,"cancelEvent",e=>(0,c.A)(To,e),(e,t)=>(0,l.A)(To,e,t)],[ho({type:"feedback.submit"}),1,"feedbackSubmitEvent",e=>(0,c.A)(Io,e),(e,t)=>(0,l.A)(Io,e,t)],[ho({type:"ui.switch"}),1,"switch",e=>(0,c.A)(zo,e),(e,t)=>(0,l.A)(zo,e,t)],[po(),2,"resumed"],[po(),2,"feedbackSubmitDone"],[po(),2,"feedbackSubmitFailed"]],0,(e=>Uo.has((0,r.A)(e))),m.ReactNextElement)),wr();const Oo=i.p+"images/8c2cf79e.png",Yo=i.p+"images/0cbe181e.png",Fo=i.p+"images/87c8a33b.png",Po=i.p+"images/f542faa9.png",Ho=i.p+"images/8e5c445f.png",Bo=i.p+"images/dd5fc700.png",jo=i.p+"images/4215203f.png",Go=i.p+"images/5e54ffc5.png";let Jo=function(e){return e.AI_EMPLOYEES="AI_EMPLOYEES",e}({});const $o="bricks/ai-portal/ai-employees",qo=b.i18n.getFixedT(null,$o);var Ko,Xo=i(98036);let Qo,Zo,el,tl,il;(0,b.initializeI18n)($o,{en:{AI_EMPLOYEES:"AI Employees"},zh:{AI_EMPLOYEES:"Ai 数字人"}});const nl=[Oo,Yo,Fo,Po,Ho,Bo,jo,Go],{defineElement:al,property:sl}=(0,p.createDecorators)();let rl;var ol=new WeakMap,ll=new WeakMap;class cl extends m.ReactNextElement{constructor(){super(...arguments),(0,s.A)(this,ol,Zo(this)),(0,s.A)(this,ll,(el(this),tl(this))),il(this)}get list(){return(0,c.A)(ol,this)}set list(e){(0,l.A)(ol,this,e)}get industries(){return(0,c.A)(ll,this)}set industries(e){(0,l.A)(ll,this,e)}render(){return h().createElement(dl,{list:this.list,industries:this.industries})}}function dl(e){let{list:t,industries:i}=e;const n=(0,u.useMemo)((()=>[...new Set([...null!=i?i:[],...(null!=t?t:[]).map((e=>e.industry))])]),[i,t]),[a,s]=(0,u.useState)(n[0]),r=(0,u.useMemo)((()=>{const e=new Map;return null==t||t.forEach((t=>{if(t.industry!==a)return;let i=e.get(t.role);i||e.set(t.role,i=[]),i.push(t)})),[...e.entries()]}),[a,t]),o=n.indexOf(a);return h().createElement("div",{className:"container"},h().createElement("h1",null,qo(Jo.AI_EMPLOYEES)),h().createElement("ul",{className:"nav"},n.map((e=>h().createElement("li",{key:e,className:"item"},h().createElement("a",{className:v()({active:e===a}),onClick:()=>s(e)},e))))),h().createElement("ul",{className:"groups"},r.map(((e,t)=>{let[i,n]=e;return h().createElement("li",{key:i,className:"group"},h().createElement("h2",null,i),h().createElement("ul",{className:"list"},n.map(((e,i)=>h().createElement("li",{key:i,className:"item"},h().createElement("div",{className:"heading"},h().createElement("div",{className:"avatar"},h().createElement("img",{src:nl[(i+t+o)%nl.length]})),h().createElement("div",{className:"title"},e.name)),h().createElement("div",{className:"description"},e.description))))))}))))}Ko=cl,({e:[Zo,el,tl,il],c:[rl,Qo]}=(0,d.A)(Ko,[al("ai-portal.ai-employees",{styleTexts:[Xo.A]})],[[sl({attribute:!1}),1,"list"],[sl({attribute:!1}),1,"industries"]],0,void 0,m.ReactNextElement)),Qo();let ul=function(e){return e.AGENTS="AGENTS",e}({});const hl="bricks/ai-portal/ai-agents",pl=b.i18n.getFixedT(null,hl);var ml,gl=i(83059);let bl,fl,vl;const kl={lib:"antd",icon:"tool"};(0,b.initializeI18n)(hl,{en:{AGENTS:"Agents"},zh:{AGENTS:"智能体"}});const Al=(0,m.wrapBrick)("eo-icon"),{defineElement:xl,property:El}=(0,p.createDecorators)();let wl;var yl=new WeakMap;class Sl extends m.ReactNextElement{constructor(){super(...arguments),(0,s.A)(this,yl,fl(this)),vl(this)}get list(){return(0,c.A)(yl,this)}set list(e){(0,l.A)(yl,this,e)}render(){return h().createElement(Rl,{list:this.list})}}function Rl(e){let{list:t}=e;return h().createElement("div",{className:"container"},h().createElement("h1",null,pl(ul.AGENTS)),h().createElement("ul",{className:"list"},null==t?void 0:t.map(((e,t)=>{var i,n;return h().createElement("li",{key:t,className:"item"},h().createElement("div",{className:"heading"},h().createElement("div",{className:"icon"},h().createElement(Al,(0,sn.A)({},null!==(i=e.icon)&&void 0!==i?i:kl,{fallback:kl}))),h().createElement("div",{className:"title"},e.name)),h().createElement("div",{className:"tags"},null===(n=e.tags)||void 0===n?void 0:n.map(((e,t)=>h().createElement("span",{key:t,className:"tag"},e)))),h().createElement("div",{className:"description"},e.description))}))))}ml=Sl,({e:[fl,vl],c:[wl,bl]}=(0,d.A)(ml,[xl("ai-portal.ai-agents",{styleTexts:[gl.A]})],[[El({attribute:!1}),1,"list"]],0,void 0,m.ReactNextElement)),bl()},31653:(e,t,i)=>{i.d(t,{A:()=>o});var n=i(36758),a=i.n(n),s=i(40935),r=i.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()},31748:(e,t,i)=>{i.d(t,{A:()=>h});var n=i(36758),a=i.n(n),s=i(40935),r=i.n(s),o=i(20062),l=i.n(o),c=new URL(i(15733),i.b),d=r()(a()),u=l()(c);d.push([e.id,`:host{display:block;position:relative;width:100%;height:100%;overflow:hidden;background-color:rgb(205,206,207);background-image:url(${u});background-size:cover;background-repeat:no-repeat;background-position:center;background-attachment:fixed;color:#262626;padding:48px 24px;overflow-y:auto}:host([hidden]){display:none}*{box-sizing:border-box}.container{max-width:1400px;margin:0 auto}h1,\nh2{font-weight:500;margin:0}h1{font-size:20px;line-height:28px}h2{font-size:16px;line-height:22px}.nav,\n.groups,\n.list{list-style:none;margin:0;padding:0}.nav{display:flex;font-size:16px;margin-top:17px}.nav .item + .item{margin-left:32px}.nav .item a{color:rgba(38,38,38,0.65);cursor:pointer}.nav .item a.active{color:#262626;font-weight:500}.nav .item a.active::after{content:"";display:block;width:100%;height:4px;background-color:currentColor;border-radius:2px}.groups{margin-top:27px}.group + .group{margin-top:32px}.list{margin-top:16px;display:grid;grid-template-columns:repeat(auto-fill,minmax(320px,1fr));gap:24px}.list .item{background:rgba(255,255,255,0.9);box-shadow:0px 2px 5px 0px rgba(0,0,0,0.08);border-radius:12px;padding:20px 26px}.heading{display:flex;align-items:center}.icon{font-size:24px;color:#333;margin-right:8px}.title{font-size:15px;font-weight:500;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.description{margin-top:13px;font-size:13px;color:rgba(0,0,0,0.45);line-height:18px;height:54px;display:-webkit-box;-webkit-line-clamp:3;line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}`,""]);const h=d.toString()},32360:(e,t,i)=>{e.exports=i.p+"images/6336f999.png"},42873:(e,t,i)=>{i.d(t,{A:()=>h});var n=i(36758),a=i.n(n),s=i(40935),r=i.n(s),o=i(20062),l=i.n(o),c=new URL(i(89518),i.b),d=r()(a()),u=l()(c);d.push([e.id,`:host{display:flex;flex-direction:column;align-items:center;max-width:1200px;width:100%}:host([hidden]){display:none}*{box-sizing:border-box}.nav,\n.cases{list-style:none;padding:0;margin:0}.nav{display:flex;font-size:16px}.nav .item + .item{margin-left:32px}.nav .item a{color:rgba(38,38,38,0.65);cursor:pointer}.nav .item a.active{color:#262626;font-weight:500}.nav .item a.active::after{content:"";display:block;width:100%;height:4px;background-color:currentColor;border-radius:2px}.cases{display:grid;width:100%;grid-template-columns:repeat(auto-fill,minmax(276px,1fr));gap:24px;margin-top:2em}.link{background:#fefefe;border:1px solid #e8e9ec;border-radius:12px;overflow:hidden;display:block}.link::part(link){display:flex;gap:0;flex-direction:column;height:218px}.title{width:100%;height:76px;padding:16px 16px 15px;color:#262626;border-top:1px solid #e8e9ec;font-weight:500;font-size:15px;line-height:22px}.title span{display:-webkit-box;-webkit-line-clamp:2;line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.placeholder{width:100%;height:142px;background:linear-gradient(308deg,#dee9fc 0%,#fcfbfd 100%,#fbf9fe 100%);overflow:hidden}.summary{color:rgba(0,0,0,0.65);padding:27px 0 0 24px}.thumbnail span{display:block;width:100%;height:100%;background-size:cover;background-position:center;background-repeat:no-repeat}.link:hover{box-shadow:0px 4px 12px 0px rgba(0,0,0,0.06)}.link:hover .title{color:var(--elevo-color-brand)}.summary-1{display:block;background-image:url(${u});background-size:237px 115px;background-repeat:no-repeat;background-position:0 0;padding:10px 0 0 10px}.summary-2{display:block;background:linear-gradient(90deg,#ffffff 0%,#e4ecfc 100%);padding:12px 15px 5px 15px;border-top-left-radius:12px}.summary-2 span{display:-webkit-box;-webkit-line-clamp:4;line-clamp:4;-webkit-box-orient:vertical;overflow:hidden;font-size:15px;color:#525971;line-height:22px;height:88px}`,""]);const h=d.toString()},47008:(e,t,i)=>{i.d(t,{A:()=>h});var n=i(36758),a=i.n(n),s=i(40935),r=i.n(s),o=i(20062),l=i.n(o),c=new URL(i(91107),i.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:var(--elevo-color-brand);border:none;border-radius:8px;color:#fff}.btn-send[disabled]{background:rgba(0,0,0,0.15)}.btn-send:not([disabled]){cursor:pointer}.btn-send:not([disabled]):hover{background:#5166ff}.btn-send:not([disabled]):active{background:#1e33cc}.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()},47338:(e,t,i)=>{i.d(t,{A:()=>o});var n=i(36758),a=i.n(n),s=i(40935),r=i.n(s)()(a());r.push([e.id,':host{display:inline-block}:host([hidden]){display:none}:host,\neo-tooltip{vertical-align:middle}button{width:28px;height:28px;font-size:18px;border-radius:8px;display:flex;align-items:center;justify-content:center;border:none;background:none;color:#333}button:disabled{color:#8c8c8c}button:not(:disabled){cursor:pointer}button:focus{outline:none}button:not(:disabled):hover{background:rgba(0,0,0,0.04)}button:not(:disabled):active{background:rgba(0,0,0,0.08)}:host([variant="light"]) button{color:#595959}:host([variant="mini"]) button{width:24px;height:24px;font-size:16px;border-radius:4px}',""]);const o=r.toString()},61408:(e,t,i)=>{i.d(t,{A:()=>o});var n=i(36758),a=i.n(n),s=i(40935),r=i.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}.new-chat::part(link){display:flex;gap:0;align-items:center;color:var(--elevo-color-brand);font-size:14px;text-align:left;cursor:pointer}.sidebar .new-chat::part(link){background:#f0f4ff;border-radius:8px;border:1px solid #c9d7ff;padding:9px 13px;font-weight:500;margin-bottom:16px}.sidebar .new-chat::part(link):hover{background:rgba(201,215,255,0.5)}.new-chat-icon{font-size:16px;margin-right:5px}.footer{border-top:1px solid rgba(0,0,0,0.04);padding:9px 12px;margin:0 -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:8px;left:8px;padding:6px 10px 6px 8px;display:flex;align-items:center;opacity:0;z-index:1;transition:opacity 0.2s ease-in-out;background:rgba(255,255,255,0);border-radius:8px;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px)}.alternative .new-chat::part(link){padding:4px;margin-left:16px;font-size:12px}.alternative .new-chat::part(link):hover{color:#7891ff}.alternative .new-chat::part(link):active{color:#0911b3}.container{width:261px;height:100%;transition:width 0.3s ease-in-out}.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}.links{border-bottom:1px solid rgba(0,0,0,0.06);padding-bottom:16px;margin-bottom:16px}.link{display:block}.link + .link{margin-top:4px}.link::part(link){display:flex;gap:0;align-items:center;padding:7px 13px;border-radius:8px;color:#000}.link::part(link):hover{background:rgba(0,0,0,0.04)}.link .icon{font-size:16px;margin-right:10px}.link .title{flex:1;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.history{flex:1;min-height:0;overflow-y:auto;margin:0 -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.active::part(link){background:rgba(0,0,0,0.06)}.history .item.actions-active::part(link),.history .item::part(link):hover{background:rgba(0,0,0,0.04)}.history .item-title{flex:1;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.history .actions{cursor:auto}.history .item:not(:hover):not(.actions-active) .actions{display:none}.history .working{width:8px;height:8px;border-radius:8px;background:var(--elevo-color-brand);margin:0 7px}.history .item.actions-active .working,.history .item:hover .working,.history .item.active .working{display:none}.history .load-more{display:flex;justify-content:center;align-items:center;height:36px}',""]);const o=r.toString()},82165:(e,t,i)=>{i.d(t,{A:()=>h});var n=i(36758),a=i.n(n),s=i(40935),r=i.n(s),o=i(20062),l=i.n(o),c=new URL(i(32360),i.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()},83059:(e,t,i)=>{i.d(t,{A:()=>h});var n=i(36758),a=i.n(n),s=i(40935),r=i.n(s),o=i(20062),l=i.n(o),c=new URL(i(15733),i.b),d=r()(a()),u=l()(c);d.push([e.id,`:host{display:block;position:relative;width:100%;height:100%;overflow:hidden;background-color:rgb(205,206,207);background-image:url(${u});background-size:cover;background-repeat:no-repeat;background-position:center;background-attachment:fixed;color:#262626;padding:48px 24px;overflow-y:auto}:host([hidden]){display:none}*{box-sizing:border-box}.container{max-width:1400px;margin:0 auto}h1{font-weight:500;margin:0;font-size:20px;line-height:28px}.list{list-style:none;margin:0;padding:0;margin-top:30px;display:grid;grid-template-columns:repeat(auto-fill,minmax(320px,1fr));gap:24px}.list .item{background:rgba(255,255,255,0.9);box-shadow:0px 2px 5px 0px rgba(0,0,0,0.08);border-radius:12px;padding:20px 26px}.heading{display:flex;align-items:center}.icon{width:48px;height:48px;display:flex;align-items:center;justify-content:center;background:#ffffff;border-radius:12px;border:1px solid #e8e9ec;font-size:32px;color:#595959;margin-right:16px}.title{font-size:16px;font-weight:500;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.description{margin-top:13px;font-size:13px;color:rgba(0,0,0,0.45);line-height:18px;height:54px;display:-webkit-box;-webkit-line-clamp:3;line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}.tags{display:flex;gap:6px;margin:16px 0 -3px}.tag{display:block;background:rgba(0,0,0,0.04);border-radius:4px;font-size:12px;line-height:22px;padding:0 7px}`,""]);const h=d.toString()},89518:(e,t,i)=>{e.exports=i.p+"images/f819b04a.png"},91107:(e,t,i)=>{e.exports=i.p+"images/eef4f2bd.png"},98036:(e,t,i)=>{i.d(t,{A:()=>h});var n=i(36758),a=i.n(n),s=i(40935),r=i.n(s),o=i(20062),l=i.n(o),c=new URL(i(15733),i.b),d=r()(a()),u=l()(c);d.push([e.id,`:host{display:block;position:relative;width:100%;height:100%;overflow:hidden;background-color:rgb(205,206,207);background-image:url(${u});background-size:cover;background-repeat:no-repeat;background-position:center;background-attachment:fixed;color:#262626;padding:48px 24px;overflow-y:auto}:host([hidden]){display:none}*{box-sizing:border-box}.container{max-width:1400px;margin:0 auto}h1,\nh2{font-weight:500;margin:0}h1{font-size:20px;line-height:28px}h2{font-size:16px;line-height:22px}.nav,\n.groups,\n.list{list-style:none;margin:0;padding:0}.nav{display:flex;font-size:16px;margin-top:17px}.nav .item + .item{margin-left:32px}.nav .item a{color:rgba(38,38,38,0.65);cursor:pointer}.nav .item a.active{color:#262626;font-weight:500}.nav .item a.active::after{content:"";display:block;width:100%;height:4px;background-color:currentColor;border-radius:2px}.groups{margin-top:27px}.group + .group{margin-top:32px}.list{margin-top:16px;display:grid;grid-template-columns:repeat(auto-fill,minmax(320px,1fr));gap:24px}.list .item{background:rgba(255,255,255,0.9);box-shadow:0px 2px 5px 0px rgba(0,0,0,0.08);border-radius:12px;padding:20px 26px}.heading{display:flex;align-items:center}.avatar{width:48px;height:48px;border-radius:12px;margin-right:16px;background-color:#d5d6e6}.title{font-size:16px;font-weight:500;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.description{margin-top:13px;font-size:13px;color:rgba(0,0,0,0.45);line-height:18px;height:54px;display:-webkit-box;-webkit-line-clamp:3;line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}`,""]);const h=d.toString()}}]);
|
|
3
|
+
//# sourceMappingURL=6175.85d46564.js.map
|