@next-bricks/ai-portal 0.64.7 → 0.64.9

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 CHANGED
@@ -2,24 +2,24 @@
2
2
  "id": "bricks/ai-portal",
3
3
  "bricks": [
4
4
  "ai-portal.chat-box",
5
+ "ai-portal.cruise-canvas",
5
6
  "ai-portal.stat-with-mini-chart",
6
- "ai-portal.icon-button",
7
7
  "ai-portal.elevo-sidebar",
8
- "ai-portal.mcp-tools",
8
+ "ai-portal.home-container",
9
+ "ai-portal.icon-button",
9
10
  "ai-portal.show-cases",
10
- "ai-portal.cruise-canvas",
11
- "ai-portal.ai-employees",
11
+ "ai-portal.mcp-tools",
12
12
  "ai-portal.chat-stream",
13
+ "ai-portal.ai-employees",
13
14
  "ai-portal.call-tool",
14
- "ai-portal.ai-agents",
15
15
  "ai-portal.save-request-store",
16
16
  "ai-portal.load-request-store",
17
17
  "ai-portal.clear-request-store",
18
18
  "ai-portal.set-chat-command",
19
19
  "ai-portal.page-container",
20
+ "ai-portal.ai-agents",
20
21
  "ai-portal.tab-list",
21
22
  "ai-portal.dropdown-select",
22
- "ai-portal.home-container",
23
23
  "ai-portal.preview-container",
24
24
  "ai-portal.action-buttons",
25
25
  "ai-portal.goal-card-list",
@@ -28,9 +28,9 @@
28
28
  "ai-portal.activity-timeline",
29
29
  "ai-portal.chat-input",
30
30
  "ai-portal.elevo-logo",
31
+ "ai-portal.sticky-container",
31
32
  "ai-portal.show-case",
32
33
  "ai-portal.blank-state",
33
- "ai-portal.sticky-container",
34
34
  "ai-portal.elevo-card",
35
35
  "ai-portal.flow-tabs",
36
36
  "ai-portal.stage-flow",
@@ -49,31 +49,6 @@
49
49
  "eo-actions",
50
50
  "ai-portal.icon-button"
51
51
  ],
52
- "ai-portal.stat-with-mini-chart": [
53
- "eo-mini-line-chart"
54
- ],
55
- "ai-portal.icon-button": [
56
- "eo-icon",
57
- "eo-tooltip"
58
- ],
59
- "ai-portal.elevo-sidebar": [
60
- "ai-portal.elevo-logo",
61
- "eo-icon",
62
- "eo-link",
63
- "eo-dropdown-actions",
64
- "eo-easyops-avatar",
65
- "eo-mini-actions",
66
- "ai-portal.icon-button"
67
- ],
68
- "ai-portal.mcp-tools": [
69
- "eo-icon",
70
- "ai-portal.tab-list",
71
- "ai-portal.sticky-container"
72
- ],
73
- "ai-portal.show-cases": [
74
- "ai-portal.show-case",
75
- "ai-portal.tab-list"
76
- ],
77
52
  "ai-portal.cruise-canvas": [
78
53
  "eo-icon",
79
54
  "eo-button",
@@ -92,8 +67,27 @@
92
67
  "presentational.code-wrapper",
93
68
  "eo-avatar"
94
69
  ],
95
- "ai-portal.ai-employees": [
70
+ "ai-portal.stat-with-mini-chart": [
71
+ "eo-mini-line-chart"
72
+ ],
73
+ "ai-portal.elevo-sidebar": [
74
+ "ai-portal.elevo-logo",
75
+ "eo-icon",
96
76
  "eo-link",
77
+ "eo-dropdown-actions",
78
+ "eo-easyops-avatar",
79
+ "eo-mini-actions",
80
+ "ai-portal.icon-button"
81
+ ],
82
+ "ai-portal.icon-button": [
83
+ "eo-icon",
84
+ "eo-tooltip"
85
+ ],
86
+ "ai-portal.show-cases": [
87
+ "ai-portal.show-case",
88
+ "ai-portal.tab-list"
89
+ ],
90
+ "ai-portal.mcp-tools": [
97
91
  "eo-icon",
98
92
  "ai-portal.tab-list",
99
93
  "ai-portal.sticky-container"
@@ -114,14 +108,20 @@
114
108
  "basic.copy-to-clipboard",
115
109
  "presentational.code-wrapper"
116
110
  ],
117
- "ai-portal.ai-agents": [
111
+ "ai-portal.ai-employees": [
112
+ "eo-link",
118
113
  "eo-icon",
119
- "eo-link"
114
+ "ai-portal.tab-list",
115
+ "ai-portal.sticky-container"
120
116
  ],
121
117
  "ai-portal.page-container": [
122
118
  "eo-link",
123
119
  "ai-portal.sticky-container"
124
120
  ],
121
+ "ai-portal.ai-agents": [
122
+ "eo-icon",
123
+ "eo-link"
124
+ ],
125
125
  "ai-portal.dropdown-select": [
126
126
  "eo-popover",
127
127
  "eo-icon",
@@ -225,5 +225,5 @@
225
225
  "presentational.code-wrapper"
226
226
  ]
227
227
  },
228
- "filePath": "bricks/ai-portal/dist/index.92f99895.js"
228
+ "filePath": "bricks/ai-portal/dist/index.a6348301.js"
229
229
  }
@@ -0,0 +1,3 @@
1
+ /*! For license information please see 5411.095a6093.js.LICENSE.txt */
2
+ "use strict";(globalThis.webpackChunk_next_bricks_ai_portal=globalThis.webpackChunk_next_bricks_ai_portal||[]).push([[5411],{5813:(e,t,i)=>{i.d(t,{I:()=>c,K:()=>r,NS:()=>l,t:()=>s});var n=i(67177);let r=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.MY="MY",e.PROJECTS="PROJECTS",e.HISTORY="HISTORY",e.CREATE_PROJECT="CREATE_PROJECT",e.MOVE_TO_PROJECT="MOVE_TO_PROJECT",e.UNTITLED="UNTITLED",e.UNNAMED="UNNAMED",e.BUSINESS_OBJECTS="BUSINESS_OBJECTS",e.BUSINESS_OBJECT_MODELS="BUSINESS_OBJECT_MODELS",e.SERVICEFLOWS="SERVICEFLOWS",e.COLLABORATION_SPACES="COLLABORATION_SPACES",e.CREATE_SERVICEFLOW="CREATE_SERVICEFLOW",e}({});const a={[r.NEW_CHAT]:"New chat",[r.LOGOUT]:"Logout",[r.TODAY]:"Today",[r.YESTERDAY]:"Yesterday",[r.PREVIOUS_7_DAYS]:"Previous 7 days",[r.PREVIOUS_30_DAYS]:"Previous 30 days",[r.SWITCH_LANGUAGE]:"中文",[r.MY]:"My",[r.PROJECTS]:"Projects",[r.HISTORY]:"Chats",[r.CREATE_PROJECT]:"Create project",[r.MOVE_TO_PROJECT]:"Move to project",[r.UNTITLED]:"Untitled",[r.UNNAMED]:"Unnamed",[r.BUSINESS_OBJECTS]:"Business objects",[r.SERVICEFLOWS]:"Serviceflows",[r.COLLABORATION_SPACES]:"Collaboration spaces",[r.CREATE_SERVICEFLOW]:"Create serviceflow",[r.BUSINESS_OBJECT_MODELS]:"Business object models"},o={[r.NEW_CHAT]:"新对话",[r.LOGOUT]:"登出",[r.TODAY]:"今天",[r.YESTERDAY]:"昨天",[r.PREVIOUS_7_DAYS]:"过去7天",[r.PREVIOUS_30_DAYS]:"过去30天",[r.SWITCH_LANGUAGE]:"English",[r.MY]:"我的",[r.PROJECTS]:"项目",[r.HISTORY]:"对话",[r.CREATE_PROJECT]:"创建项目",[r.MOVE_TO_PROJECT]:"移动到项目",[r.UNTITLED]:"无标题",[r.UNNAMED]:"未命名",[r.BUSINESS_OBJECTS]:"业务对象",[r.SERVICEFLOWS]:"业务流",[r.COLLABORATION_SPACES]:"协作空间",[r.CREATE_SERVICEFLOW]:"创建业务流",[r.BUSINESS_OBJECT_MODELS]:"业务对象模型"},l="bricks/ai-portal/elevo-sidebar",c={en:a,zh:o},s=n.i18n.getFixedT(null,l)},17452:(e,t,i)=>{i.d(t,{c:()=>n,w:()=>r});const n={lib:"fa",icon:"plus"},r={lib:"lucide",icon:"box"}},41938:(e,t,i)=>{i.d(t,{c:()=>g});var n=i(89575),r=i(18769),a=i.n(r),o=i(53373),l=i.n(o),c=i(60128),s=i(51578),d=i(5813),p=i(70579),u=i(94504),m=i(17452),E=i(84311);function g(e){let{returnUrl:t,introUrl:i,spaceDetail:o,spaceObjects:g,spaceServiceflows:h,spaceLinks:v,onAddServiceflow:f}=e;const x=(0,r.useRef)(null),[b,k]=(0,r.useState)(!1),[S,y]=(0,r.useState)(!1),O=(0,E.d)(i),C=null==o?void 0:o.icon,T=(null==C?void 0:C.color)||"gray",{color:w,...N}=C||{};return a().createElement(a().Fragment,null,a().createElement(p.EM,{url:t,className:"return-link"},a().createElement(p.Bj,{className:"icon",lib:"lucide",icon:"chevron-left"}),a().createElement("div",{className:"avatar",style:{color:`var(--theme-${T}-color)`}},a().createElement(p.Bj,N)),a().createElement("div",{className:"heading"},a().createElement("div",{className:"title"},null==o?void 0:o.name),a().createElement("div",{className:"sub-title"},(0,d.t)(d.K.COLLABORATION_SPACES)))),a().createElement("div",{className:"divider"}),a().createElement("div",{className:"history",ref:x},g?a().createElement("div",{className:l()("section",{collapsed:b})},a().createElement(s._,{rootRef:x,title:(0,d.t)(d.K.BUSINESS_OBJECTS),collapsed:b,onToggle:()=>k((e=>!e))},a().createElement(p.Py,{icon:m.w,variant:"mini-light",tooltip:(0,d.t)(d.K.BUSINESS_OBJECT_MODELS),tooltipHoist:!0,className:"button",active:O,onClick:()=>(0,c.getHistory)().push(i)})),a().createElement("ul",{className:"items"},g.map(((e,t)=>a().createElement("li",{key:t},a().createElement(u.k,{url:e.url,activeIncludes:e.activeIncludes,render:t=>{let{active:i}=t;return a().createElement(p.EM,{className:l()("item",{active:i}),url:e.url},a().createElement("div",{className:"item-title"},e.title))}})))))):null,h?a().createElement("div",{className:l()("section",{collapsed:S})},a().createElement(s._,{rootRef:x,title:(0,d.t)(d.K.SERVICEFLOWS),collapsed:S,onToggle:()=>y((e=>!e))},a().createElement(p.Py,{icon:m.c,variant:"mini-light",tooltip:(0,d.t)(d.K.CREATE_SERVICEFLOW),tooltipHoist:!0,className:"button",onClick:f})),a().createElement("ul",{className:"items"},h.map(((e,t)=>a().createElement("li",{key:t},a().createElement(u.k,{url:e.url,activeIncludes:e.activeIncludes,render:t=>{let{active:i}=t;return a().createElement(p.EM,{className:l()("item",{active:i}),url:e.url},a().createElement("div",{className:"item-title"},e.title))}})))))):null,null!=v&&v.length?a().createElement("div",{className:"space-links"},v.map(((e,t)=>a().createElement(u.k,{key:t,url:e.url,activeIncludes:e.activeIncludes,render:i=>{let{active:r}=i;return a().createElement(p.EM,{key:t,className:l()("link",{active:r}),url:e.url},a().createElement(p.Bj,(0,n.A)({className:"icon"},e.icon)),a().createElement("span",{className:"title"},e.title))}})))):null))}},51578:(e,t,i)=>{i.d(t,{_:()=>s});var n=i(18769),r=i.n(n),a=i(41030),o=i(53373),l=i.n(o),c=i(70579);function s(e){let{rootRef:t,title:i,collapsed:o,children:s,onToggle:d}=e;const p=(0,n.useRef)(null),[u,m]=(0,n.useState)(!1);return(0,n.useEffect)((()=>{if(o)return void m(!1);const e=t.current,i=p.current,n=null==i?void 0:i.nextElementSibling;if(!e||!i||!n)return;const r=(0,a.throttle)((()=>{const e=i.getBoundingClientRect(),t=n.getBoundingClientRect().top-e.top-e.height;m(t<1)}),100);return e.addEventListener("scroll",r),()=>{e.removeEventListener("scroll",r)}}),[o,t]),r().createElement("div",{className:l()("section-title",{sticky:u}),ref:p},r().createElement("div",{className:"section-label",onClick:d},i,r().createElement(c.Bj,{lib:"fa",icon:"angle-down"})),s)}},61341:(e,t,i)=>{i.d(t,{D:()=>b});var n=i(18769),r=i.n(n),a=i(53373),o=i.n(a),l=i(22919);const c=async(e,t)=>(await l.http.get("api/gateway/logic.llm.aiops_service/api/v1/elevo/conversations",{...t,params:e})).data;var s=i(41030),d=i(5813),p=i(70579),u=i(40177),m=i(65549),E=i(94504),g=i(51578),h=i(17452),v=i(89575),f=i(84311);function x(e){let{title:t,url:i,activeIncludes:a,actions:l,onClick:c,onActionClick:s,children:u}=e;const m=(0,f.d)(i,a),[E,g]=(0,n.useState)(!1),[h,x]=(0,n.useState)(!1);return r().createElement(p.EM,(0,v.A)({className:o()("item",{"actions-active":E,active:m})},i?{url:i}:null,{onClick:c,onMouseEnter:()=>{x(!0)}}),r().createElement("div",{className:"item-title",title:t},t||(0,d.t)(d.K.UNNAMED)),h&&r().createElement(p.qu,{className:"actions",actions:l,themeVariant:"elevo",onActionClick:s,onVisibleChange:e=>{g(e.detail)}}),u)}const b=(0,n.forwardRef)(k);function k(e,t){let{showProjects:i,historyActions:a,historyUrlTemplate:v,projectUrlTemplate:f,projectActions:b,canAddProject:k,myLinks:S,onActionClick:y,onHistoryClick:O,onProjectActionClick:C,onAddProject:T}=e;const w=(0,n.useRef)(null),[N,_]=(0,n.useState)(!1),[A,R]=(0,n.useState)(null),[I,P]=(0,n.useState)(!1),[B,L]=(0,n.useState)(!1),[U,j]=(0,n.useState)(null),[D,M]=(0,n.useState)(!1),[Y,V]=(0,n.useState)(),[J,H]=(0,n.useState)(),[W,z]=(0,n.useState)(!1),F=(0,n.useRef)(!0),[G,K]=(0,n.useState)([]),q=(0,n.useMemo)((()=>[...null!=a?a:[],{isDropdown:!0,text:(0,d.t)(d.K.MOVE_TO_PROJECT),disabled:!(null!=A&&A.length),items:null==A?void 0:A.map((e=>({event:"move",key:e.instanceId,text:e.name,project:e})))}]),[a,A]);(0,n.useEffect)((()=>{i&&(async()=>{try{const e=await(async()=>(await l.http.get("api/gateway/logic.llm.aiops_service/api/v1/elevo/projects",{params:{page:1,page_size:3e3}})).data)();R(e.list)}catch(e){console.error("Error loading projects:",e),L(!0),R([])}})()}),[i]),(0,n.useEffect)((()=>{Promise.all([c({token:J,limit:30,onlyOwner:!0,onlyUnrelatedProject:!0},{interceptorParams:{ignoreLoadingBar:!0}}),...F.current?[]:[new Promise((e=>setTimeout(e,500)))]]).then((e=>{let[t]=e;F.current=!1,j((e=>[...null!=e?e:[],...t.conversations])),V(t.nextToken)})).catch((e=>{console.error("Error loading chat history:",e),j([]),z(!0)}))}),[J]);const Q=(0,n.useRef)(null);(0,n.useEffect)((()=>{const e=Q.current,t=w.current;if(!e||!Y||!t||D)return;const i=new IntersectionObserver((e=>{for(const t of e)t.isIntersecting&&H(Y)}),{root:t});return i.observe(e),()=>{i.disconnect()}}),[Y,D]);const X=(0,n.useRef)(0),$=(0,n.useCallback)((async()=>{try{const e=++X.current,t=await c({limit:30,onlyOwner:!0,onlyUnrelatedProject:!0},{interceptorParams:{ignoreLoadingBar:!0}});if(e!==X.current)return;j((e=>{const i=null!=e?e:[],n=t.conversations,r=new Set(n.map((e=>e.conversationId))),a=new Map(n.map((e=>[e.conversationId,e])));let o=!1,l=!1,c=!0;for(const e of i){const t=a.get(e.conversationId);if(!t)break;if(o=!0,l=c&&t!==n[0]||!(0,s.isEqual)(t,e),l)break;c=!1}return o?l?[...n,...i.filter((e=>!r.has(e.conversationId)))]:e:(V(t.nextToken),n)}))}catch(e){console.error("Error pulling chat history:",e)}}),[]);(0,n.useImperativeHandle)(t,(()=>({pull:$,removeProject:e=>{R((t=>t?t.filter((t=>t.instanceId!==e)):t))},addProject:e=>{R((t=>t?[...t,e]:[e]))},moveConversation:e=>{K((t=>[...t,e]))}})),[$]);const Z=(0,n.useMemo)((()=>U&&U.length?U.filter((e=>!G.includes(e.conversationId))):U),[U,G]);return r().createElement("div",{className:"history",ref:w},null!=S&&S.length?r().createElement("div",{className:o()("section",{collapsed:N})},r().createElement(g._,{rootRef:w,title:(0,d.t)(d.K.MY),collapsed:N,onToggle:()=>_((e=>!e))}),r().createElement("ul",{className:"items"},S.map(((e,t)=>r().createElement("li",{key:t},r().createElement(E.k,{url:e.url,activeIncludes:e.activeIncludes,render:t=>{let{active:i}=t;return r().createElement(p.EM,{className:o()("item",{active:i}),url:e.url},r().createElement("div",{className:"item-title"},e.title))}})))))):null,i&&r().createElement("div",{className:o()("section",{collapsed:I})},r().createElement(g._,{rootRef:w,title:(0,d.t)(d.K.PROJECTS),collapsed:I,onToggle:()=>P((e=>!e))},k&&r().createElement(p.Py,{icon:h.c,variant:"mini-light",tooltip:(0,d.t)(d.K.CREATE_PROJECT),tooltipHoist:!0,className:"button",onClick:T})),r().createElement("ul",{className:"items"},B?r().createElement("li",{className:"error"},"Failed to load project"):A?A.map((e=>{const t=f?(0,m.Q)(f,e):void 0;return r().createElement("li",{key:e.instanceId},r().createElement(x,{title:e.name,url:t,actions:b,onClick:O,onActionClick:t=>{C({action:t.detail,project:e})}}))})):r().createElement("li",{className:"loading"},r().createElement(p.Bj,{lib:"antd",theme:"outlined",icon:"loading-3-quarters",spinning:!0})))),r().createElement("div",{className:o()("section",{collapsed:D})},r().createElement(g._,{rootRef:w,title:(0,d.t)(d.K.HISTORY),collapsed:D,onToggle:()=>M((e=>!e))}),r().createElement("ul",{className:"items"},Z?Z.map((e=>{const t=v?(0,m.Q)(v,e):void 0;return r().createElement("li",{key:e.conversationId},r().createElement(x,{title:e.title,url:t,actions:q,onClick:O,onActionClick:t=>{y({action:t.detail,item:e,project:t.detail.project})}},!u.QB.includes(e.state)&&r().createElement("div",{className:"working"})))})):r().createElement("li",{className:"loading"},r().createElement(p.Bj,{lib:"antd",theme:"outlined",icon:"loading-3-quarters",spinning:!0})),W?r().createElement("li",{className:"error"},"Failed to load chat history"):null),!D&&Y&&r().createElement("div",{className:"load-more",ref:Q},r().createElement(p.Bj,{lib:"antd",icon:"loading-3-quarters",spinning:!0}))))}},61408:(e,t,i)=>{i.d(t,{A:()=>l});var n=i(36758),r=i.n(n),a=i(40935),o=i.n(a)()(r());o.push([e.id,':host{display:block}:host([hidden]){display:none}*{box-sizing:border-box}.sidebar{position:relative;z-index:2;width:260px;height:100%;background:rgba(246,247,249,0.5);border:1px solid rgba(255,255,255,0.3);border-radius:12px;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);padding:23px 11px 0;display:flex;flex-direction:column;transition:transform 0.3s ease-in-out}.logo-bar{display:flex;align-items:center;justify-content:space-between;margin-bottom:30px;margin-left:4px}.main{flex:1;min-height:0;display:flex;flex-direction:column}.divider{border-top:1px solid rgba(0,0,0,0.06);margin:16px 0}.logo-link::part(link){display:block}.logo{vertical-align:middle}.new-chat::part(link){display:flex;gap:0;align-items:center;color:var(--elevo-color-brand);font-size:14px;text-align:left;cursor:pointer}.sidebar .new-chat::part(link){background:#f0f4ff;border-radius:8px;border:1px solid #c9d7ff;padding:9px 13px;font-weight:500;margin-bottom:16px}.sidebar .new-chat::part(link):hover{background:rgba(201,215,255,0.5)}.new-chat-icon{font-size:16px;margin-right:5px}.footer{border-top:1px solid rgba(0,0,0,0.04);padding:9px 12px;margin:0 -12px}.dropdown{display:block}.account{background:none;border:none;border-radius:8px;padding:6px 10px;display:block;width:100%;text-align:left;cursor:pointer}.account:hover{background:rgba(0,0,0,0.04)}.alternative{position:fixed;top:8px;left:8px;padding:6px 10px 6px 8px;display:flex;align-items:center;opacity:0;z-index:2;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:270px;padding:10px 0 10px 10px;height:100%;transition:width 0.3s ease-in-out,padding 0.3s ease-in-out}.container.collapsed{width:0;padding:10px 0;overflow:visible}.container.collapsed .sidebar{transform:translateX(-100%)}.container.collapsed .alternative{opacity:1}:host([behavior="drawer"]){z-index:2;width:0}:host(:not([behavior="drawer"])) .alternative .new-chat{display:none}.mask{position:fixed;top:0;right:0;bottom:0;left:0}.link{display:block}.link + .link{margin-top:4px}.link::part(link){display:flex;gap:0;align-items:center;padding:7px 10px;border-radius:8px;color:#000}.link.active::part(link),.link::part(link):hover{background:rgba(0,0,0,0.04)}.link .icon{font-size:16px;margin-right:10px}.link .title{flex:1;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.history{flex:1;min-height:0;overflow-y:auto;margin:0 -12px;padding:0 12px}.history ul{list-style:none;margin:0;padding:0}.history .section + .section{margin-top:14px}.history .section-title{display:flex;align-items:center;justify-content:space-between;height:30px;margin-bottom:6px;padding:0 8px;position:sticky;top:0}.history .section-title.sticky::before{content:"";position:absolute;top:0;right:0;bottom:0;left:0;background-color:rgb(229,228,234);border-radius:8px;z-index:-1}.history .section-label{display:flex;align-items:center;height:24px;padding:0 8px;margin-left:-8px;cursor:pointer;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:500;font-size:12px;color:#8c8c8c;border-radius:8px}.history .section-label eo-icon{vertical-align:middle;margin-left:6px;transition:transform 0.2s ease-in-out}.history .section-label:hover{background:rgba(0,0,0,0.04)}.history .collapsed > ul{display:none}.history .collapsed .section-label eo-icon{transform:rotate(-90deg)}.history .error,.history .loading{display:flex;align-items:center;height:36px;padding:0 8px}.history .loading{justify-content:center}.history .error{color:var(--color-error)}.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}.button{display:flex}.space-links{margin-top:16px}.return-link{display:block}.return-link .heading{display:flex;flex-direction:column;align-items:flex-start;gap:4px;flex:1;min-width:0}.return-link .title,.return-link .sub-title{width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.return-link .title{font-weight:500;font-size:14px}.return-link .sub-title{font-size:12px;color:rgba(0,0,0,0.45)}.return-link .icon{font-size:16px;color:#646a73}.return-link .avatar{background:#fff;border-radius:8px;border:1px solid rgba(0,0,0,0.1);width:36px;height:36px;display:flex;align-items:center;justify-content:center;font-size:18px}.return-link::part(link){display:flex;align-items:center;justify-content:center;gap:10px;padding:6px 8px;border-radius:8px;color:#262626}.return-link::part(link):hover{background:rgba(0,0,0,0.04)}',""]);const l=o.toString()},70579:(e,t,i)=>{i.d(t,{Bj:()=>r,EM:()=>a,JQ:()=>l,Py:()=>s,qb:()=>o,qu:()=>c});var n=i(30981);const r=(0,n.wrapBrick)("eo-icon"),a=(0,n.wrapBrick)("eo-link"),o=(0,n.wrapBrick)("eo-dropdown-actions",{onActionClick:"action.click",onVisibleChange:"visible.change"}),l=(0,n.wrapBrick)("eo-easyops-avatar"),c=(0,n.wrapBrick)("eo-mini-actions",{onActionClick:"action.click",onVisibleChange:"visible.change"}),s=(0,n.wrapBrick)("ai-portal.icon-button")},84311:(e,t,i)=>{i.d(t,{d:()=>a});var n=i(18769),r=i(60128);function a(e,t){const[i,a]=(0,n.useState)(!1);return(0,n.useEffect)((()=>{if(!e)return void a(!1);function i(i){for(const n of[e,...null!=t?t:[]])if((0,r.matchPath)(i.pathname,{path:n,exact:!1}))return void a(!0);a(!1)}const n=(0,r.getHistory)();return i(n.location),n.listen(i)}),[e,t]),i}},94504:(e,t,i)=>{i.d(t,{k:()=>r});var n=i(84311);function r(e){let{url:t,activeIncludes:i,render:r}=e;return r({active:(0,n.d)(t,i)})}}}]);
3
+ //# sourceMappingURL=5411.095a6093.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chunks/5411.095a6093.js","mappings":";qMAEO,IAAKA,EAAC,SAADA,GAAC,OAADA,EAAC,oBAADA,EAAC,gBAADA,EAAC,cAADA,EAAC,sBAADA,EAAC,kCAADA,EAAC,oCAADA,EAAC,kCAADA,EAAC,QAADA,EAAC,oBAADA,EAAC,kBAADA,EAAC,gCAADA,EAAC,kCAADA,EAAC,oBAADA,EAAC,kBAADA,EAAC,oCAADA,EAAC,gDAADA,EAAC,4BAADA,EAAC,4CAADA,EAAC,wCAADA,CAAC,MAsBb,MAAMC,EAAa,CACjB,CAACD,EAAEE,UAAW,WACd,CAACF,EAAEG,QAAS,SACZ,CAACH,EAAEI,OAAQ,QACX,CAACJ,EAAEK,WAAY,YACf,CAACL,EAAEM,iBAAkB,kBACrB,CAACN,EAAEO,kBAAmB,mBACtB,CAACP,EAAEQ,iBAAkB,KACrB,CAACR,EAAES,IAAK,KACR,CAACT,EAAEU,UAAW,WACd,CAACV,EAAEW,SAAU,QACb,CAACX,EAAEY,gBAAiB,iBACpB,CA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,kBAAmB,CACnB1H,cAAe,eACfQ,gBAAiB,mBAENzD,GAAoB2K,EAAAA,EAAAA,WAC/B,qFC7CK,SAAS9L,EACdO,EACAyB,GAEA,MAAOT,EAAQ0K,IAAarM,EAAAA,EAAAA,WAAS,GAsBrC,OApBA+C,EAAAA,EAAAA,YAAU,KACR,IAAKpC,EAEH,YADA0L,GAAU,GAGZ,SAASC,EAAgBC,GACvB,IAAK,MAAMC,IAAQ,CAAC7L,KAAUyB,QAAAA,EAAkB,IAE9C,IADgBqK,EAAAA,EAAAA,WAAUF,EAAIG,SAAU,CAAEF,OAAMG,OAAO,IAGrD,YADAN,GAAU,GAIdA,GAAU,EACZ,CACA,MAAMO,GAAU/K,EAAAA,EAAAA,cAEhB,OADAyK,EAAgBM,EAAQC,UACjBD,EAAQE,OAAOR,EAAgB,GACrC,CAAC3L,EAAKyB,IAEFT,CACT,mDCtBO,SAASQ,EAAO/C,GAAgD,IAA/C,IAAEuB,EAAG,eAAEyB,EAAc,OAAEC,GAAsBjD,EAGnE,OAAOiD,EAAO,CAAEV,QAFDvB,EAAAA,EAAAA,GAAiBO,EAAKyB,IAGvC","sources":["webpack:///./src/elevo-sidebar/i18n.ts","webpack:///./src/elevo-sidebar/constants.ts","webpack:///./src/elevo-sidebar/SpaceNav.tsx","webpack:///./src/elevo-sidebar/SectionTitle.tsx","webpack:///../../node_modules/@next-api-sdk/llm-sdk/dist/esm/api/llm/elevo/getElevoProjects.js","webpack:///../../node_modules/@next-api-sdk/llm-sdk/dist/esm/api/llm/elevo/listElevoConversations.js","webpack:///./src/elevo-sidebar/NavLinkWithActions.tsx","webpack:///./src/elevo-sidebar/ChatHistory.tsx","webpack:///./src/elevo-sidebar/styles.shadow.css","webpack:///./src/elevo-sidebar/bricks.ts","webpack:///./src/elevo-sidebar/useNavLinkActive.ts","webpack:///./src/elevo-sidebar/NavLink.tsx"],"sourcesContent":["import { i18n } from \"@next-core/i18n\";\n\nexport enum K {\n NEW_CHAT = \"NEW_CHAT\",\n LOGOUT = \"LOGOUT\",\n TODAY = \"TODAY\",\n YESTERDAY = \"YESTERDAY\",\n PREVIOUS_7_DAYS = \"PREVIOUS_7_DAYS\",\n PREVIOUS_30_DAYS = \"PREVIOUS_30_DAYS\",\n SWITCH_LANGUAGE = \"SWITCH_LANGUAGE\",\n MY = \"MY\",\n PROJECTS = \"PROJECTS\",\n HISTORY = \"HISTORY\",\n CREATE_PROJECT = \"CREATE_PROJECT\",\n MOVE_TO_PROJECT = \"MOVE_TO_PROJECT\",\n UNTITLED = \"UNTITLED\",\n UNNAMED = \"UNNAMED\",\n BUSINESS_OBJECTS = \"BUSINESS_OBJECTS\",\n BUSINESS_OBJECT_MODELS = \"BUSINESS_OBJECT_MODELS\",\n SERVICEFLOWS = \"SERVICEFLOWS\",\n COLLABORATION_SPACES = \"COLLABORATION_SPACES\",\n CREATE_SERVICEFLOW = \"CREATE_SERVICEFLOW\",\n}\n\nconst en: Locale = {\n [K.NEW_CHAT]: \"New chat\",\n [K.LOGOUT]: \"Logout\",\n [K.TODAY]: \"Today\",\n [K.YESTERDAY]: \"Yesterday\",\n [K.PREVIOUS_7_DAYS]: \"Previous 7 days\",\n [K.PREVIOUS_30_DAYS]: \"Previous 30 days\",\n [K.SWITCH_LANGUAGE]: \"中文\",\n [K.MY]: \"My\",\n [K.PROJECTS]: \"Projects\",\n [K.HISTORY]: \"Chats\",\n [K.CREATE_PROJECT]: \"Create project\",\n [K.MOVE_TO_PROJECT]: \"Move to project\",\n [K.UNTITLED]: \"Untitled\",\n [K.UNNAMED]: \"Unnamed\",\n [K.BUSINESS_OBJECTS]: \"Business objects\",\n [K.SERVICEFLOWS]: \"Serviceflows\",\n [K.COLLABORATION_SPACES]: \"Collaboration spaces\",\n [K.CREATE_SERVICEFLOW]: \"Create serviceflow\",\n [K.BUSINESS_OBJECT_MODELS]: \"Business object models\",\n};\n\nconst zh: Locale = {\n [K.NEW_CHAT]: \"新对话\",\n [K.LOGOUT]: \"登出\",\n [K.TODAY]: \"今天\",\n [K.YESTERDAY]: \"昨天\",\n [K.PREVIOUS_7_DAYS]: \"过去7天\",\n [K.PREVIOUS_30_DAYS]: \"过去30天\",\n [K.SWITCH_LANGUAGE]: \"English\",\n [K.MY]: \"我的\",\n [K.PROJECTS]: \"项目\",\n [K.HISTORY]: \"对话\",\n [K.CREATE_PROJECT]: \"创建项目\",\n [K.MOVE_TO_PROJECT]: \"移动到项目\",\n [K.UNTITLED]: \"无标题\",\n [K.UNNAMED]: \"未命名\",\n [K.BUSINESS_OBJECTS]: \"业务对象\",\n [K.SERVICEFLOWS]: \"业务流\",\n [K.COLLABORATION_SPACES]: \"协作空间\",\n [K.CREATE_SERVICEFLOW]: \"创建业务流\",\n [K.BUSINESS_OBJECT_MODELS]: \"业务对象模型\",\n};\n\nexport const NS = \"bricks/ai-portal/elevo-sidebar\";\n\nexport const locales = { en, zh };\n\nexport const t = i18n.getFixedT(null, NS);\n\ntype Locale = { [k in K]: string } & {\n [k in K as `${k}_plural`]?: string;\n};\n","import type { GeneralIconProps } from \"@next-bricks/icons/general-icon\";\n\nexport const ADD_ICON: GeneralIconProps = {\n lib: \"fa\",\n icon: \"plus\",\n};\n\nexport const MODEL_ICON: GeneralIconProps = {\n lib: \"lucide\",\n icon: \"box\",\n};\n","import React, { useRef, useState } from \"react\";\nimport classNames from \"classnames\";\nimport { getHistory } from \"@next-core/runtime\";\nimport { SectionTitle } from \"./SectionTitle.js\";\nimport { K, t } from \"./i18n.js\";\nimport { WrappedIcon, WrappedIconButton, WrappedLink } from \"./bricks.js\";\nimport { NavLink } from \"./NavLink.js\";\nimport type { SidebarLink } from \"./interfaces.js\";\nimport { ADD_ICON, MODEL_ICON } from \"./constants.js\";\nimport { useNavLinkActive } from \"./useNavLinkActive.js\";\nimport type { GeneralIconProps } from \"@next-bricks/icons/general-icon\";\n\nexport interface SpaceNavProps {\n returnUrl: string;\n introUrl: string;\n spaceDetail: {\n instanceId: string;\n name: string;\n icon?: GeneralIconProps & {\n color?: string;\n };\n };\n spaceObjects?: SidebarLink[];\n spaceServiceflows?: SidebarLink[];\n spaceLinks?: SidebarLink[];\n}\n\nexport interface SpaceNavComponentProps extends SpaceNavProps {\n onAddServiceflow?: () => void;\n}\n\nexport function SpaceNav({\n returnUrl,\n introUrl,\n spaceDetail,\n spaceObjects,\n spaceServiceflows,\n spaceLinks,\n onAddServiceflow,\n}: SpaceNavComponentProps) {\n const rootRef = useRef<HTMLDivElement | null>(null);\n const [objectsCollapsed, setObjectsCollapsed] = useState(false);\n const [serviceflowsCollapsed, setServiceflowsCollapsed] = useState(false);\n const introActive = useNavLinkActive(introUrl);\n\n const avatarIcon = spaceDetail?.icon;\n const avatarColor = avatarIcon?.color || \"gray\";\n const { color, ...iconProps } = avatarIcon || {};\n\n return (\n <>\n <WrappedLink url={returnUrl} className=\"return-link\">\n <WrappedIcon className=\"icon\" lib=\"lucide\" icon=\"chevron-left\" />\n <div\n className=\"avatar\"\n style={{\n color: `var(--theme-${avatarColor}-color)`,\n }}\n >\n <WrappedIcon {...iconProps} />\n </div>\n <div className=\"heading\">\n <div className=\"title\">{spaceDetail?.name}</div>\n <div className=\"sub-title\">{t(K.COLLABORATION_SPACES)}</div>\n </div>\n </WrappedLink>\n <div className=\"divider\" />\n <div className=\"history\" ref={rootRef}>\n {spaceObjects ? (\n <div\n className={classNames(\"section\", { collapsed: objectsCollapsed })}\n >\n <SectionTitle\n rootRef={rootRef}\n title={t(K.BUSINESS_OBJECTS)}\n collapsed={objectsCollapsed}\n onToggle={() => setObjectsCollapsed((prev) => !prev)}\n >\n <WrappedIconButton\n icon={MODEL_ICON}\n variant=\"mini-light\"\n tooltip={t(K.BUSINESS_OBJECT_MODELS)}\n tooltipHoist={true}\n className=\"button\"\n active={introActive}\n onClick={() => getHistory().push(introUrl)}\n />\n </SectionTitle>\n <ul className=\"items\">\n {spaceObjects.map((obj, index) => (\n <li key={index}>\n <NavLink\n url={obj.url}\n activeIncludes={obj.activeIncludes}\n render={({ active }) => (\n <WrappedLink\n className={classNames(\"item\", { active })}\n url={obj.url}\n >\n <div className=\"item-title\">{obj.title}</div>\n </WrappedLink>\n )}\n />\n </li>\n ))}\n </ul>\n </div>\n ) : null}\n {spaceServiceflows ? (\n <div\n className={classNames(\"section\", {\n collapsed: serviceflowsCollapsed,\n })}\n >\n <SectionTitle\n rootRef={rootRef}\n title={t(K.SERVICEFLOWS)}\n collapsed={serviceflowsCollapsed}\n onToggle={() => setServiceflowsCollapsed((prev) => !prev)}\n >\n <WrappedIconButton\n icon={ADD_ICON}\n variant=\"mini-light\"\n tooltip={t(K.CREATE_SERVICEFLOW)}\n tooltipHoist={true}\n className=\"button\"\n onClick={onAddServiceflow}\n />\n </SectionTitle>\n <ul className=\"items\">\n {spaceServiceflows.map((obj, index) => (\n <li key={index}>\n <NavLink\n url={obj.url}\n activeIncludes={obj.activeIncludes}\n render={({ active }) => (\n <WrappedLink\n className={classNames(\"item\", { active })}\n url={obj.url}\n >\n <div className=\"item-title\">{obj.title}</div>\n </WrappedLink>\n )}\n />\n </li>\n ))}\n </ul>\n </div>\n ) : null}\n {spaceLinks?.length ? (\n <div className=\"space-links\">\n {spaceLinks.map((link, index) => (\n <NavLink\n key={index}\n url={link.url}\n activeIncludes={link.activeIncludes}\n render={({ active }) => (\n <WrappedLink\n key={index}\n className={classNames(\"link\", { active })}\n url={link.url}\n >\n <WrappedIcon className=\"icon\" {...link.icon} />\n <span className=\"title\">{link.title}</span>\n </WrappedLink>\n )}\n />\n ))}\n </div>\n ) : null}\n </div>\n </>\n );\n}\n","import React, {\n useEffect,\n useRef,\n useState,\n type MutableRefObject,\n type PropsWithChildren,\n} from \"react\";\nimport { throttle } from \"lodash\";\nimport classNames from \"classnames\";\nimport { WrappedIcon } from \"./bricks.js\";\n\nexport interface SectionTitleProps {\n rootRef: MutableRefObject<HTMLDivElement | null>;\n title: string;\n collapsed: boolean;\n onToggle: () => void;\n}\n\nexport function SectionTitle({\n rootRef,\n title,\n collapsed,\n children,\n onToggle,\n}: PropsWithChildren<SectionTitleProps>) {\n const ref = useRef<HTMLDivElement | null>(null);\n const [stickyActive, setStickyActive] = useState(false);\n\n useEffect(() => {\n if (collapsed) {\n setStickyActive(false);\n return;\n }\n const parent = rootRef.current;\n const element = ref.current;\n const sibling = element?.nextElementSibling as HTMLElement | null;\n if (!parent || !element || !sibling) {\n return;\n }\n const onScroll = throttle(() => {\n const rect = element.getBoundingClientRect();\n const siblingRect = sibling.getBoundingClientRect();\n const diff = siblingRect.top - rect.top - rect.height;\n setStickyActive(diff < 1);\n }, 100);\n parent.addEventListener(\"scroll\", onScroll);\n return () => {\n parent.removeEventListener(\"scroll\", onScroll);\n };\n }, [collapsed, rootRef]);\n\n return (\n <div\n className={classNames(\"section-title\", { sticky: stickyActive })}\n ref={ref}\n >\n <div className=\"section-label\" onClick={onToggle}>\n {title}\n <WrappedIcon lib=\"fa\" icon=\"angle-down\" />\n </div>\n {children}\n </div>\n );\n}\n","import { http } from \"@next-core/http\";\n/**\n * @description 获取elevo项目列表\n * @endpoint list /api/v1/elevo/projects\n */\nexport const ElevoApi_getElevoProjects = async (params, options) => /**! @contract easyops.api.llm.elevo.GetElevoProjects@1.0.0 */(await http.get(\"api/gateway/logic.llm.aiops_service/api/v1/elevo/projects\", {\n ...options,\n params\n})).data;\n//# sourceMappingURL=getElevoProjects.js.map","import { http } from \"@next-core/http\";\n/**\n * @description 获取elevo会话列表\n * @endpoint GET /api/v1/elevo/conversations\n */\nexport const ElevoApi_listElevoConversations = async (params, options) => /**! @contract easyops.api.llm.elevo.ListElevoConversations@1.0.0 */(await http.get(\"api/gateway/logic.llm.aiops_service/api/v1/elevo/conversations\", {\n ...options,\n params\n})).data;\n//# sourceMappingURL=listElevoConversations.js.map","import React, { useState, type PropsWithChildren } from \"react\";\nimport classNames from \"classnames\";\nimport type {\n ActionType,\n SimpleActionType,\n} from \"@next-bricks/basic/mini-actions\";\nimport { useNavLinkActive } from \"./useNavLinkActive\";\nimport { WrappedLink, WrappedMiniActions } from \"./bricks\";\nimport { K, t } from \"./i18n\";\n\nexport interface NavLinkWithActionsProps {\n title?: string;\n url?: string;\n activeIncludes?: string[];\n actions?: ActionType[];\n onClick?: () => void;\n onActionClick?: (e: CustomEvent<SimpleActionType>) => void;\n}\n\nexport function NavLinkWithActions({\n title,\n url,\n activeIncludes,\n actions,\n onClick,\n onActionClick,\n children,\n}: PropsWithChildren<NavLinkWithActionsProps>) {\n const active = useNavLinkActive(url, activeIncludes);\n const [actionsVisible, setActionsVisible] = useState(false);\n const [actionsShown, setActionsShown] = useState(false);\n\n return (\n <WrappedLink\n className={classNames(\"item\", {\n \"actions-active\": actionsVisible,\n active,\n })}\n {...(url ? { url } : null)}\n onClick={onClick}\n onMouseEnter={() => {\n setActionsShown(true);\n }}\n >\n <div className=\"item-title\" title={title}>\n {title || t(K.UNNAMED)}\n </div>\n {actionsShown && (\n <WrappedMiniActions\n className=\"actions\"\n actions={actions}\n themeVariant=\"elevo\"\n onActionClick={onActionClick}\n onVisibleChange={(e) => {\n setActionsVisible(e.detail);\n }}\n />\n )}\n {children}\n </WrappedLink>\n );\n}\n","import React, {\n forwardRef,\n useCallback,\n useEffect,\n useImperativeHandle,\n useMemo,\n useRef,\n useState,\n} from \"react\";\nimport classNames from \"classnames\";\nimport {\n ElevoApi_listElevoConversations,\n ElevoApi_getElevoProjects,\n type ElevoApi_ListElevoConversationsRequestParams,\n} from \"@next-api-sdk/llm-sdk\";\nimport type {\n ActionType,\n SimpleActionType,\n} from \"@next-bricks/basic/mini-actions\";\nimport { isEqual } from \"lodash\";\nimport { K, t } from \"./i18n.js\";\nimport { WrappedIcon, WrappedLink, WrappedIconButton } from \"./bricks.js\";\nimport { DONE_STATES } from \"../shared/constants.js\";\nimport { parseTemplate } from \"../shared/parseTemplate.js\";\nimport type { ConversationState } from \"../shared/interfaces.js\";\nimport type { SidebarLink } from \"./interfaces.js\";\nimport { NavLink } from \"./NavLink.js\";\nimport { SectionTitle } from \"./SectionTitle.js\";\nimport { ADD_ICON } from \"./constants.js\";\nimport { NavLinkWithActions } from \"./NavLinkWithActions.js\";\n\nexport interface HistoryItem {\n conversationId: string;\n title: string;\n startTime: number;\n state?: ConversationState;\n}\n\nexport interface GroupedHistory {\n title: string;\n items: HistoryItem[];\n}\n\nexport interface ActionClickDetail {\n action: SimpleActionType & {\n project?: Project;\n };\n item: HistoryItem;\n project?: Project;\n}\n\nexport interface ProjectActionClickDetail {\n action: SimpleActionType;\n project: Project;\n}\n\nexport interface PersonalActionClickDetail {\n action: SimpleActionType;\n}\n\nexport interface Project {\n /** 实例ID */\n instanceId: string;\n /** 项目名称 */\n name: string;\n /** 项目描述 */\n description: string;\n /** 状态 */\n state: \"active\" | \"inactive\";\n /** 默认数字人ID */\n defaultAiEmployeeId: string;\n /** 创建者 */\n creator: string;\n /** 创建时间 */\n ctime: string;\n /** 修改时间 */\n mtime: string;\n /** 修改者 */\n modifier: string;\n}\n\nexport interface ChatHistoryProps {\n showProjects?: boolean;\n historyUrlTemplate?: string;\n historyActions?: ActionType[];\n projectUrlTemplate?: string;\n projectActions?: ActionType[];\n canAddProject?: boolean;\n myLinks?: SidebarLink[];\n onActionClick: (detail: ActionClickDetail) => void;\n onHistoryClick: () => void;\n onProjectActionClick: (detail: ProjectActionClickDetail) => void;\n onAddProject: () => void;\n}\n\nexport interface ChatHistoryRef {\n pull: () => void;\n removeProject?: (projectId: string) => void;\n addProject?: (project: Project) => void;\n moveConversation?: (conversationId: string) => void;\n}\n\nexport const ChatHistory = forwardRef(LowLevelChatHistory);\n\nexport function LowLevelChatHistory(\n {\n showProjects,\n historyActions,\n historyUrlTemplate,\n projectUrlTemplate,\n projectActions,\n canAddProject,\n myLinks,\n onActionClick,\n onHistoryClick,\n onProjectActionClick,\n onAddProject,\n }: ChatHistoryProps,\n ref: React.Ref<ChatHistoryRef>\n) {\n const rootRef = useRef<HTMLDivElement | null>(null);\n const [myCollapsed, setMyCollapsed] = useState(false);\n const [projects, setProjects] = useState<Project[] | null>(null);\n const [projectsCollapsed, setProjectsCollapsed] = useState(false);\n const [projectsError, setProjectsError] = useState(false);\n const [historyList, setHistoryList] = useState<HistoryItem[] | null>(null);\n const [historyCollapsed, setHistoryCollapsed] = useState(false);\n const [nextToken, setNextToken] = useState<string | undefined>();\n const [loadNextToken, setLoadNextToken] = useState<string | undefined>();\n const [historyError, setHistoryError] = useState(false);\n const initialRef = useRef(true);\n const [movedConversations, setMovedConversations] = useState<string[]>([]);\n\n const mergedHistoryActions = useMemo(\n () =>\n [\n ...(historyActions ?? []),\n {\n isDropdown: true,\n text: t(K.MOVE_TO_PROJECT),\n disabled: !projects?.length,\n items: projects?.map((project) => ({\n event: \"move\",\n key: project.instanceId,\n text: project.name,\n project,\n })),\n },\n ] as ActionType[],\n [historyActions, projects]\n );\n\n useEffect(() => {\n if (!showProjects) {\n return;\n }\n (async () => {\n try {\n const projects = await ElevoApi_getElevoProjects({\n page: 1,\n page_size: 3000,\n });\n setProjects(projects.list as Project[]);\n } catch (error) {\n // eslint-disable-next-line no-console\n console.error(\"Error loading projects:\", error);\n setProjectsError(true);\n setProjects([]);\n }\n })();\n }, [showProjects]);\n\n useEffect(() => {\n Promise.all([\n ElevoApi_listElevoConversations(\n {\n token: loadNextToken,\n limit: 30,\n onlyOwner: true,\n onlyUnrelatedProject: true,\n } as ElevoApi_ListElevoConversationsRequestParams,\n {\n interceptorParams: {\n ignoreLoadingBar: true,\n },\n }\n ),\n ...(initialRef.current\n ? []\n : [\n new Promise((resolve) => setTimeout(resolve, 500)), // Force a minimum delay\n ]),\n ])\n .then(([data]) => {\n initialRef.current = false;\n setHistoryList((prev) => [\n ...(prev ?? []),\n ...(data.conversations as HistoryItem[]),\n ]);\n setNextToken(data.nextToken);\n })\n .catch((error) => {\n // eslint-disable-next-line no-console\n console.error(\"Error loading chat history:\", error);\n setHistoryList([]);\n setHistoryError(true);\n });\n }, [loadNextToken]);\n\n const nextRef = useRef<HTMLDivElement | null>(null);\n\n useEffect(() => {\n const next = nextRef.current;\n const root = rootRef.current;\n if (!next || !nextToken || !root || historyCollapsed) {\n return;\n }\n const observer = new IntersectionObserver(\n (entries) => {\n for (const entry of entries) {\n if (entry.isIntersecting) {\n setLoadNextToken(nextToken);\n }\n }\n },\n { root }\n );\n observer.observe(next);\n return () => {\n observer.disconnect();\n };\n }, [nextToken, historyCollapsed]);\n\n const pullIdRef = useRef(0);\n\n const pull = useCallback(async () => {\n try {\n const pullId = ++pullIdRef.current;\n const tempList = await ElevoApi_listElevoConversations(\n {\n limit: 30,\n onlyOwner: true,\n onlyUnrelatedProject: true,\n } as ElevoApi_ListElevoConversationsRequestParams,\n {\n interceptorParams: {\n ignoreLoadingBar: true,\n },\n }\n );\n if (pullId !== pullIdRef.current) {\n // Ignore this pull if a newer one has been triggered\n return;\n }\n setHistoryList((prev) => {\n const prevList = prev ?? [];\n const newList = tempList.conversations as HistoryItem[];\n const newIds = new Set(newList.map((item) => item.conversationId));\n const newItemsMap = new Map(\n newList.map((item) => [item.conversationId, item])\n );\n\n let foundIntersection = false;\n let foundChanged = false;\n let isFirst = true;\n for (const item of prevList) {\n const newItem = newItemsMap.get(item.conversationId);\n if (newItem) {\n foundIntersection = true;\n foundChanged =\n (isFirst && newItem !== newList[0]) || !isEqual(newItem, item);\n if (foundChanged) {\n break;\n }\n } else {\n break;\n }\n isFirst = false;\n }\n\n if (!foundIntersection) {\n setNextToken(tempList.nextToken);\n return newList;\n }\n\n if (foundChanged) {\n return [\n ...newList,\n ...prevList.filter((item) => !newIds.has(item.conversationId)),\n ];\n }\n\n return prev;\n });\n } catch (error) {\n // eslint-disable-next-line no-console\n console.error(\"Error pulling chat history:\", error);\n }\n }, []);\n\n useImperativeHandle(\n ref,\n () => ({\n pull,\n removeProject: (projectId: string) => {\n setProjects((prev) =>\n prev ? prev.filter((p) => p.instanceId !== projectId) : prev\n );\n },\n addProject: (project: Project) => {\n setProjects((prev) => (prev ? [...prev, project] : [project]));\n },\n moveConversation: (conversationId: string) => {\n setMovedConversations((prev) => [...prev, conversationId]);\n },\n }),\n [pull]\n );\n\n const filteredHistoryList = useMemo(() => {\n if (!historyList || !historyList.length) {\n return historyList;\n }\n return historyList.filter(\n (item) => !movedConversations.includes(item.conversationId)\n );\n }, [historyList, movedConversations]);\n\n return (\n <div className=\"history\" ref={rootRef}>\n {myLinks?.length ? (\n <div className={classNames(\"section\", { collapsed: myCollapsed })}>\n <SectionTitle\n rootRef={rootRef}\n title={t(K.MY)}\n collapsed={myCollapsed}\n onToggle={() => setMyCollapsed((prev) => !prev)}\n />\n <ul className=\"items\">\n {myLinks.map((link, index) => (\n <li key={index}>\n <NavLink\n url={link.url}\n activeIncludes={link.activeIncludes}\n render={({ active }) => (\n <WrappedLink\n className={classNames(\"item\", { active })}\n url={link.url}\n >\n <div className=\"item-title\">{link.title}</div>\n </WrappedLink>\n )}\n />\n </li>\n ))}\n </ul>\n </div>\n ) : null}\n {showProjects && (\n <div\n className={classNames(\"section\", { collapsed: projectsCollapsed })}\n >\n <SectionTitle\n rootRef={rootRef}\n title={t(K.PROJECTS)}\n collapsed={projectsCollapsed}\n onToggle={() => setProjectsCollapsed((prev) => !prev)}\n >\n {canAddProject && (\n <WrappedIconButton\n icon={ADD_ICON}\n variant=\"mini-light\"\n tooltip={t(K.CREATE_PROJECT)}\n tooltipHoist={true}\n className=\"button\"\n onClick={onAddProject}\n />\n )}\n </SectionTitle>\n <ul className=\"items\">\n {projectsError ? (\n <li className=\"error\">Failed to load project</li>\n ) : projects ? (\n projects.map((project) => {\n const url = projectUrlTemplate\n ? parseTemplate(projectUrlTemplate, project)\n : undefined;\n return (\n <li key={project.instanceId}>\n <NavLinkWithActions\n title={project.name}\n url={url}\n actions={projectActions}\n onClick={onHistoryClick}\n onActionClick={(e) => {\n onProjectActionClick({\n action: e.detail,\n project,\n });\n }}\n />\n </li>\n );\n })\n ) : (\n <li className=\"loading\">\n <WrappedIcon\n lib=\"antd\"\n theme=\"outlined\"\n icon=\"loading-3-quarters\"\n spinning\n />\n </li>\n )}\n </ul>\n </div>\n )}\n <div className={classNames(\"section\", { collapsed: historyCollapsed })}>\n <SectionTitle\n rootRef={rootRef}\n title={t(K.HISTORY)}\n collapsed={historyCollapsed}\n onToggle={() => setHistoryCollapsed((prev) => !prev)}\n />\n <ul className=\"items\">\n {filteredHistoryList ? (\n filteredHistoryList.map((item) => {\n const url = historyUrlTemplate\n ? parseTemplate(historyUrlTemplate, item)\n : undefined;\n return (\n <li key={item.conversationId}>\n <NavLinkWithActions\n title={item.title}\n url={url}\n actions={mergedHistoryActions}\n onClick={onHistoryClick}\n onActionClick={(e) => {\n onActionClick({\n action: e.detail,\n item,\n project: (e.detail as { project?: Project }).project,\n });\n }}\n >\n {!DONE_STATES.includes(item.state!) && (\n <div className=\"working\"></div>\n )}\n </NavLinkWithActions>\n </li>\n );\n })\n ) : (\n <li className=\"loading\">\n <WrappedIcon\n lib=\"antd\"\n theme=\"outlined\"\n icon=\"loading-3-quarters\"\n spinning\n />\n </li>\n )}\n {historyError ? (\n <li className=\"error\">Failed to load chat history</li>\n ) : null}\n </ul>\n {!historyCollapsed && nextToken && (\n <div className=\"load-more\" ref={nextRef}>\n <WrappedIcon lib=\"antd\" icon=\"loading-3-quarters\" spinning />\n </div>\n )}\n </div>\n </div>\n );\n}\n","// Imports\nimport ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/noSourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `:host{display:block}:host([hidden]){display:none}*{box-sizing:border-box}.sidebar{position:relative;z-index:2;width:260px;height:100%;background:rgba(246,247,249,0.5);border:1px solid rgba(255,255,255,0.3);border-radius:12px;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);padding:23px 11px 0;display:flex;flex-direction:column;transition:transform 0.3s ease-in-out}.logo-bar{display:flex;align-items:center;justify-content:space-between;margin-bottom:30px;margin-left:4px}.main{flex:1;min-height:0;display:flex;flex-direction:column}.divider{border-top:1px solid rgba(0,0,0,0.06);margin:16px 0}.logo-link::part(link){display:block}.logo{vertical-align:middle}.new-chat::part(link){display:flex;gap:0;align-items:center;color:var(--elevo-color-brand);font-size:14px;text-align:left;cursor:pointer}.sidebar .new-chat::part(link){background:#f0f4ff;border-radius:8px;border:1px solid #c9d7ff;padding:9px 13px;font-weight:500;margin-bottom:16px}.sidebar .new-chat::part(link):hover{background:rgba(201,215,255,0.5)}.new-chat-icon{font-size:16px;margin-right:5px}.footer{border-top:1px solid rgba(0,0,0,0.04);padding:9px 12px;margin:0 -12px}.dropdown{display:block}.account{background:none;border:none;border-radius:8px;padding:6px 10px;display:block;width:100%;text-align:left;cursor:pointer}.account:hover{background:rgba(0,0,0,0.04)}.alternative{position:fixed;top:8px;left:8px;padding:6px 10px 6px 8px;display:flex;align-items:center;opacity:0;z-index:2;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:270px;padding:10px 0 10px 10px;height:100%;transition:width 0.3s ease-in-out,padding 0.3s ease-in-out}.container.collapsed{width:0;padding:10px 0;overflow:visible}.container.collapsed .sidebar{transform:translateX(-100%)}.container.collapsed .alternative{opacity:1}:host([behavior=\"drawer\"]){z-index:2;width:0}:host(:not([behavior=\"drawer\"])) .alternative .new-chat{display:none}.mask{position:fixed;top:0;right:0;bottom:0;left:0}.link{display:block}.link + .link{margin-top:4px}.link::part(link){display:flex;gap:0;align-items:center;padding:7px 10px;border-radius:8px;color:#000}.link.active::part(link),.link::part(link):hover{background:rgba(0,0,0,0.04)}.link .icon{font-size:16px;margin-right:10px}.link .title{flex:1;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.history{flex:1;min-height:0;overflow-y:auto;margin:0 -12px;padding:0 12px}.history ul{list-style:none;margin:0;padding:0}.history .section + .section{margin-top:14px}.history .section-title{display:flex;align-items:center;justify-content:space-between;height:30px;margin-bottom:6px;padding:0 8px;position:sticky;top:0}.history .section-title.sticky::before{content:\"\";position:absolute;top:0;right:0;bottom:0;left:0;background-color:rgb(229,228,234);border-radius:8px;z-index:-1}.history .section-label{display:flex;align-items:center;height:24px;padding:0 8px;margin-left:-8px;cursor:pointer;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:500;font-size:12px;color:#8c8c8c;border-radius:8px}.history .section-label eo-icon{vertical-align:middle;margin-left:6px;transition:transform 0.2s ease-in-out}.history .section-label:hover{background:rgba(0,0,0,0.04)}.history .collapsed > ul{display:none}.history .collapsed .section-label eo-icon{transform:rotate(-90deg)}.history .error,.history .loading{display:flex;align-items:center;height:36px;padding:0 8px}.history .loading{justify-content:center}.history .error{color:var(--color-error)}.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}.button{display:flex}.space-links{margin-top:16px}.return-link{display:block}.return-link .heading{display:flex;flex-direction:column;align-items:flex-start;gap:4px;flex:1;min-width:0}.return-link .title,.return-link .sub-title{width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.return-link .title{font-weight:500;font-size:14px}.return-link .sub-title{font-size:12px;color:rgba(0,0,0,0.45)}.return-link .icon{font-size:16px;color:#646a73}.return-link .avatar{background:#fff;border-radius:8px;border:1px solid rgba(0,0,0,0.1);width:36px;height:36px;display:flex;align-items:center;justify-content:center;font-size:18px}.return-link::part(link){display:flex;align-items:center;justify-content:center;gap:10px;padding:6px 8px;border-radius:8px;color:#262626}.return-link::part(link):hover{background:rgba(0,0,0,0.04)}`, \"\"]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___.toString();\n","import { wrapBrick } from \"@next-core/react-element\";\nimport type {\n GeneralIcon,\n GeneralIconProps,\n} from \"@next-bricks/icons/general-icon\";\nimport type { Link, LinkProps } from \"@next-bricks/basic/link\";\nimport type {\n EoDropdownActions,\n DropdownActionsProps,\n DropdownActionsEvents,\n DropdownActionsEventsMapping,\n} from \"@next-bricks/basic/dropdown-actions\";\nimport type {\n EoEasyopsAvatar,\n EoEasyopsAvatarProps,\n} from \"@next-bricks/basic/easyops-avatar\";\nimport type {\n EoMiniActions,\n EoMiniActionsEvents,\n EoMiniActionsEventsMapping,\n EoMiniActionsProps,\n} from \"@next-bricks/basic/mini-actions\";\nimport type { IconButton, IconButtonProps } from \"../icon-button\";\n\nexport const WrappedIcon = wrapBrick<GeneralIcon, GeneralIconProps>(\"eo-icon\");\nexport const WrappedLink = wrapBrick<Link, LinkProps>(\"eo-link\");\nexport const WrappedDropdownActions = wrapBrick<\n EoDropdownActions,\n DropdownActionsProps & { themeVariant?: \"default\" | \"elevo\" },\n DropdownActionsEvents,\n DropdownActionsEventsMapping\n>(\"eo-dropdown-actions\", {\n onActionClick: \"action.click\",\n onVisibleChange: \"visible.change\",\n});\nexport const WrappedEasyopsAvatar = wrapBrick<\n EoEasyopsAvatar,\n EoEasyopsAvatarProps\n>(\"eo-easyops-avatar\");\nexport const WrappedMiniActions = wrapBrick<\n EoMiniActions,\n EoMiniActionsProps & { themeVariant?: \"default\" | \"elevo\" },\n EoMiniActionsEvents,\n EoMiniActionsEventsMapping\n>(\"eo-mini-actions\", {\n onActionClick: \"action.click\",\n onVisibleChange: \"visible.change\",\n});\nexport const WrappedIconButton = wrapBrick<IconButton, IconButtonProps>(\n \"ai-portal.icon-button\"\n);\n","import { useEffect, useState } from \"react\";\nimport { getHistory, matchPath } from \"@next-core/runtime\";\nimport type { Location } from \"history\";\n\nexport function useNavLinkActive(\n url: string | null | undefined,\n activeIncludes?: string[]\n) {\n const [active, setActive] = useState(false);\n\n useEffect(() => {\n if (!url) {\n setActive(false);\n return;\n }\n function checkLinkActive(loc: Location) {\n for (const path of [url!, ...(activeIncludes ?? [])]) {\n const matched = matchPath(loc.pathname, { path, exact: false });\n if (matched) {\n setActive(true);\n return;\n }\n }\n setActive(false);\n }\n const history = getHistory();\n checkLinkActive(history.location);\n return history.listen(checkLinkActive);\n }, [url, activeIncludes]);\n\n return active;\n}\n","import React from \"react\";\nimport { useNavLinkActive } from \"./useNavLinkActive\";\n\nexport interface NavLinkProps {\n url?: string;\n activeIncludes?: string[];\n render: (props: { active: boolean }) => React.ReactElement;\n}\n\nexport function NavLink({ url, activeIncludes, render }: NavLinkProps) {\n const active = useNavLinkActive(url, activeIncludes);\n\n return render({ active });\n}\n"],"names":["K","en","NEW_CHAT","LOGOUT","TODAY","YESTERDAY","PREVIOUS_7_DAYS","PREVIOUS_30_DAYS","SWITCH_LANGUAGE","MY","PROJECTS","HISTORY","CREATE_PROJECT","MOVE_TO_PROJECT","UNTITLED","UNNAMED","BUSINESS_OBJECTS","SERVICEFLOWS","COLLABORATION_SPACES","CREATE_SERVICEFLOW","BUSINESS_OBJECT_MODELS","zh","NS","locales","t","i18n","getFixedT","ADD_ICON","lib","icon","MODEL_ICON","SpaceNav","_ref","returnUrl","introUrl","spaceDetail","spaceObjects","spaceServiceflows","spaceLinks","onAddServiceflow","rootRef","useRef","objectsCollapsed","setObjectsCollapsed","useState","serviceflowsCollapsed","setServiceflowsCollapsed","introActive","useNavLinkActive","avatarIcon","avatarColor","color","iconProps","React","WrappedLink","url","className","WrappedIcon","style","name","ref","classNames","collapsed","SectionTitle","title","onToggle","prev","WrappedIconButton","variant","tooltip","tooltipHoist","active","onClick","getHistory","push","map","obj","index","key","NavLink","activeIncludes","render","_ref2","_ref3","length","link","_ref4","_extends","children","stickyActive","setStickyActive","useEffect","parent","current","element","sibling","nextElementSibling","onScroll","throttle","rect","getBoundingClientRect","diff","top","height","addEventListener","removeEventListener","sticky","ElevoApi_listElevoConversations","async","params","options","http","get","data","NavLinkWithActions","actions","onActionClick","actionsVisible","setActionsVisible","actionsShown","setActionsShown","onMouseEnter","WrappedMiniActions","themeVariant","onVisibleChange","e","detail","ChatHistory","forwardRef","LowLevelChatHistory","showProjects","historyActions","historyUrlTemplate","projectUrlTemplate","projectActions","canAddProject","myLinks","onHistoryClick","onProjectActionClick","onAddProject","myCollapsed","setMyCollapsed","projects","setProjects","projectsCollapsed","setProjectsCollapsed","projectsError","setProjectsError","historyList","setHistoryList","historyCollapsed","setHistoryCollapsed","nextToken","setNextToken","loadNextToken","setLoadNextToken","historyError","setHistoryError","initialRef","movedConversations","setMovedConversations","mergedHistoryActions","useMemo","isDropdown","text","disabled","items","project","event","instanceId","page","page_size","ElevoApi_getElevoProjects","list","error","console","Promise","all","token","limit","onlyOwner","onlyUnrelatedProject","interceptorParams","ignoreLoadingBar","resolve","setTimeout","then","conversations","catch","nextRef","next","root","observer","IntersectionObserver","entries","entry","isIntersecting","observe","disconnect","pullIdRef","pull","useCallback","pullId","tempList","prevList","newList","newIds","Set","item","conversationId","newItemsMap","Map","foundIntersection","foundChanged","isFirst","newItem","isEqual","filter","has","useImperativeHandle","removeProject","projectId","p","addProject","moveConversation","filteredHistoryList","includes","parseTemplate","undefined","action","theme","spinning","DONE_STATES","state","___CSS_LOADER_EXPORT___","module","id","toString","wrapBrick","WrappedDropdownActions","WrappedEasyopsAvatar","setActive","checkLinkActive","loc","path","matchPath","pathname","exact","history","location","listen"],"sourceRoot":""}
@@ -1,2 +1,2 @@
1
- "use strict";(globalThis.webpackChunk_next_bricks_ai_portal=globalThis.webpackChunk_next_bricks_ai_portal||[]).push([[9273],{9442:(e,t,a)=>{a.d(t,{A:()=>h});var n=a(72591),i=a.n(n),r=a(1740),s=a.n(r),l=a(88128),o=a.n(l),c=a(30855),d=a.n(c),m=a(93051),u=a.n(m),p=a(73656),f=a.n(p),b=a(86e3),g={};g.styleTagTransform=f(),g.setAttributes=d(),g.insert=o().bind(null,"head"),g.domAPI=s(),g.insertStyleElement=u(),i()(b.A,g);const h=b.A&&b.A.locals?b.A.locals:void 0},13330:(e,t,a)=>{a.d(t,{p:()=>s});var n=a(18769),i=a(50045),r=a(40177);function s(e,t,a,s,l,o,c){const d=null==c?void 0:c.showHumanActions,m=null==c?void 0:c.skipActivitySubTasks;return(0,n.useMemo)((()=>{if(!e)return{messages:[],lastDetail:null};const{chunks:n,jobMap:c}=(0,i.a)(a,s,l,o,m),u=[];let p={role:"assistant",chunks:[]},f=null;for(const e of n)if("job"===e.type){var b;const t=e.job;var g;t.toolCall&&!t.ignoreDetails&&(f={type:"job",id:t.id}),"completed"===t.state&&null!==(b=t.messages)&&void 0!==b&&b.length&&t.messages.every((e=>"user"===e.role))?(p.chunks.length>0&&u.push(p),u.push({role:"user",content:t.messages.flatMap((e=>e.parts.map((e=>"text"===e.type?e.text:"")))).join(""),cmd:t.cmd,mentionedAiEmployeeId:t.mentionedAiEmployeeId,fromSkippedSubTask:e.fromSkippedSubTask,files:null===(g=t.messages)||void 0===g?void 0:g.filter((e=>"user"===e.role)).flatMap((e=>e.parts)).filter((e=>"file"===e.type)).map((e=>e.file))}),p={role:"assistant",chunks:[]}):p.chunks.push(e),t.humanAction&&(p.chunks.length>0&&u.push(p),d&&u.push({role:"user",content:t.humanAction}),p={role:"assistant",chunks:[]})}else p.chunks.push(e),"error"!==e.type&&(f={type:e.type,id:e.task.id});let h=u.length>0&&!r.QB.includes(t);if(h&&"assistant"===p.role&&0===p.chunks.length){const e=u[u.length-1];"user"===e.role&&e.fromSkippedSubTask&&(h=!1)}return(p.chunks.length>0||h)&&u.push(p),{messages:u,jobMap:c,lastDetail:f}}),[e,t,a,l,o,s,d,m])}},17994:(e,t,a)=>{a.d(t,{A:()=>l});var n=a(36758),i=a.n(n),r=a(40935),s=a.n(r)()(i());s.push([e.id,".hil--e3zZFYQc{background:rgba(255,255,255,0.5);border-radius:8px;border:1px solid #ffffff;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);padding:13px 16px;margin-top:12px}.content--tmVj790o,\n.actions--wbNFKF3J{display:flex;align-items:center}.content--tmVj790o{gap:10px;flex-wrap:wrap}.actions--wbNFKF3J{justify-content:flex-end;margin-top:-3px}",""]),s.locals={hil:"hil--e3zZFYQc",content:"content--tmVj790o",actions:"actions--wbNFKF3J"};const l=s},26598:(e,t,a)=>{a.d(t,{A:()=>l});var n=a(36758),i=a.n(n),r=a(40935),s=a.n(r)()(i());s.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}",""]),s.locals={user:"user--HjXM9OHW"};const l=s},30621:(e,t,a)=>{a.d(t,{R:()=>x});var n=a(18769),i=a.n(n),r=a(72591),s=a.n(r),l=a(1740),o=a.n(l),c=a(88128),d=a.n(c),m=a(30855),u=a.n(m),p=a(93051),f=a.n(p),b=a(73656),g=a.n(b),h=a(26598),v={};v.styleTagTransform=g(),v.setAttributes=u(),v.insert=d().bind(null,"head"),v.domAPI=o(),v.insertStyleElement=f(),s()(h.A,v);const k=h.A&&h.A.locals?h.A.locals:void 0;var A=a(77388),E=a(47760);function x(e){let{content:t,cmd:a,mentionedAiEmployeeId:n,files:r}=e;return i().createElement(i().Fragment,null,i().createElement("div",{className:k.user},(a||n)&&i().createElement(A._,{cmd:a,mentionedAiEmployeeId:n}),t),null!=r&&r.length?i().createElement(E.$,{files:r,ui:"chat"}):null)}},32360:(e,t,a)=>{e.exports=a.p+"images/72c24398.png"},35754:(e,t,a)=>{a.d(t,{A:()=>l});var n=a(36758),i=a.n(n),r=a(40935),s=a.n(r)()(i());s.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{content:" ";animation:texting--Rpmsbpca 2s infinite;white-space:pre}.avatar--jaJhEiSV{font-size:32px}@keyframes texting--Rpmsbpca{0%{content:"\\00a0\\00a0\\00a0"}25%{content:".\\00a0\\00a0"}50%{content:"..\\00a0"}75%{content:"..."}100%{content:"\\00a0\\00a0\\00a0"}}',""]),s.locals={assistant:"assistant--CrlgPgYL",body:"body--sAIo2dhL",texting:"texting--Rpmsbpca",avatar:"avatar--jaJhEiSV"};const l=s},40563:(e,t,a)=>{a.d(t,{i:()=>r});var n=a(18769),i=a(99126);function r(e,t,a){const r=(0,n.useRef)(!1),s=(0,n.useRef)(!1),[l,o]=(0,n.useState)(!1);return(0,n.useEffect)((()=>{const e=t.current,n=a.current;if(s.current||!e||!n)return;const l=()=>{o(e.scrollTop+e.clientHeight+24<e.scrollHeight),r.current&&(s.current=e.scrollTop+e.clientHeight+6<e.scrollHeight)};let c;e.addEventListener("scroll",l);const d=new i.A((()=>{s.current||(r.current=!1,e.scrollTo({top:n.scrollHeight,behavior:"instant"}),clearTimeout(c),c=setTimeout((()=>{r.current=!0}),100))}));return d.observe(n),()=>{d.disconnect(),e.removeEventListener("scroll",l)}}),[e]),{scrollable:l,scrollToBottom:(0,n.useCallback)((()=>{const e=t.current;null==e||e.scrollTo({top:null==e?void 0:e.scrollHeight,behavior:"instant"})}),[t])}}},48952:(e,t,a)=>{a.d(t,{I:()=>s,K:()=>i,NS:()=>r,t:()=>l});var n=a(67177);let i=function(e){return e.SWITCH_TO_CANVAS="SWITCH_TO_CANVAS",e.INITIATING_SERVICE_FLOW="INITIATING_SERVICE_FLOW",e.STARTING_SERVICE_FLOW_ACTIVITY="STARTING_SERVICE_FLOW_ACTIVITY",e.HIL_TIPS="HIL_TIPS",e}({});const r="bricks/ai-portal/chat-stream",s={en:{SWITCH_TO_CANVAS:"Switch to canvas",INITIATING_SERVICE_FLOW:"Initiating service flow: {{ name }}",STARTING_SERVICE_FLOW_ACTIVITY:"Starting service flow activity: {{ name }}",HIL_TIPS:"Triggered HIL rule, waiting for {{ name }} to process."},zh:{SWITCH_TO_CANVAS:"切换为画布",INITIATING_SERVICE_FLOW:"发起业务流:{{ name }}",STARTING_SERVICE_FLOW_ACTIVITY:"开始业务流活动:{{ name }}",HIL_TIPS:"触发 HIL 规则,等待 {{ name }} 处理。"}},l=n.i18n.getFixedT(null,r)},50094:(e,t,a)=>{a.d(t,{A:()=>l});var n=a(36758),i=a.n(n),r=a(40935),s=a.n(r)()(i());s.push([e.id,'.heading--lj5kJ2fg{display:flex;align-items:center;padding:5px 8px;margin:0 0 12px;cursor:pointer}.main--P8894aNV{font-size:16px;line-height:26px}.caret--XqX6mjyf{opacity:0;transition:transform 0.2s ease-in-out}.heading--lj5kJ2fg:hover{background:rgba(184,187,205,0.15);border-radius:8px}.heading--lj5kJ2fg:hover .caret--XqX6mjyf{opacity:1}.icon--l8SzaFlV{display:flex;align-items:center;margin-right:12px}.title--FZPCnJbE{color:#262626;font-weight:500;flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tool--ugqSpeIM{background:#e2e5ef;border:1px solid #d4d4de;border-radius:13px;line-height:24px;padding:0 12px;width:-moz-fit-content;width:fit-content;font-size:12px;color:rgba(0,0,0,0.65);cursor:pointer;display:flex;align-items:center;gap:7px;margin-bottom:12px}.tool--ugqSpeIM eo-icon{font-size:14px;color:#8c8c8c}.body--p3Zt_jA4{margin-bottom:20px}.heading--lj5kJ2fg + .body--p3Zt_jA4{padding-left:26px}.collapsed--cGSG2zk_ .body--p3Zt_jA4{display:none}.collapsed--cGSG2zk_ .caret--XqX6mjyf{transform:rotate(180deg);opacity:1}.content--pBkkWQ5e{margin-top:14px;font-size:16px;line-height:26px}.content--pBkkWQ5e .markdown--Ky2J85cs [class*="code-wrapper--"]::part(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:auto;max-width:100%}.content--pBkkWQ5e:empty{display:none}.message--okEUzWzg:first-child > .message-part--kxjYnHz0:first-child > :first-child{margin-top:0}.icon--l8SzaFlV{color:#abaab7}.completed--JWq7E1Jw .icon--l8SzaFlV{color:#0fbe59}.failed--uk7jDD7K .icon--l8SzaFlV{color:#f24c25}.working--dZiN0y04 .icon--l8SzaFlV{color:var(--elevo-color-brand)}.input-required--JSuPr8br .icon--l8SzaFlV{color:#12aacc}.canceled--LyMjPJQd .icon--l8SzaFlV{color:#fcaa07}ai-portal\\.chat-stream[hide-mermaid] .content--pBkkWQ5e .markdown--Ky2J85cs .mermaid{display:none}.error--n_Of3DwP{color:var(--color-error);white-space:pre-wrap;word-break:break-word}',""]),s.locals={heading:"heading--lj5kJ2fg",main:"main--P8894aNV",caret:"caret--XqX6mjyf",icon:"icon--l8SzaFlV",title:"title--FZPCnJbE",tool:"tool--ugqSpeIM",body:"body--p3Zt_jA4",collapsed:"collapsed--cGSG2zk_",content:"content--pBkkWQ5e",markdown:"markdown--Ky2J85cs",message:"message--okEUzWzg","message-part":"message-part--kxjYnHz0",completed:"completed--JWq7E1Jw",failed:"failed--uk7jDD7K",working:"working--dZiN0y04","input-required":"input-required--JSuPr8br",canceled:"canceled--LyMjPJQd",error:"error--n_Of3DwP"};const l=s},51069:(e,t,a)=>{a.d(t,{W:()=>n});const n=(0,a(18769).createContext)({lastDetail:null,setUserClosedAside:()=>{}})},65438:(e,t,a)=>{a.d(t,{A:()=>l});var n=a(36758),i=a.n(n),r=a(40935),s=a.n(r)()(i());s.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);max-width:100%;margin-top:14px}.large--jT3IWlRf{width:var(--cruise-canvas-node-width-large)}",""]),s.locals={view:"view--O8CNDdS_",large:"large--jT3IWlRf"};const l=s},84766:(e,t,a)=>{a.d(t,{G:()=>Z});var n=a(18769),i=a.n(n),r=a(72591),s=a.n(r),l=a(1740),o=a.n(l),c=a(88128),d=a.n(c),m=a(30855),u=a.n(m),p=a(93051),f=a.n(p),b=a(73656),g=a.n(b),h=a(35754),v={};v.styleTagTransform=g(),v.setAttributes=u(),v.insert=d().bind(null,"head"),v.domAPI=o(),v.insertStyleElement=f(),s()(h.A,v);const k=h.A&&h.A.locals?h.A.locals:void 0;var A=a(40177),E=a(30672),x=a(35430),w=a(89575),y=a(53373),I=a.n(y),S=a(41030),T=a(50094),N={};N.styleTagTransform=g(),N.setAttributes=u(),N.insert=d().bind(null,"head"),N.domAPI=o(),N.insertStyleElement=f(),s()(T.A,N);const _=T.A&&T.A.locals?T.A.locals:void 0;var j=a(36903),C=a(29386),V=a(42854),F=a(86976),W=a(65438),z={};z.styleTagTransform=g(),z.setAttributes=u(),z.insert=d().bind(null,"head"),z.domAPI=o(),z.insertStyleElement=f(),s()(W.A,z);const H=W.A&&W.A.locals?W.A.locals:void 0;function L(e){let{job:t}=e;const[a,r]=(0,n.useState)("medium"),s=(0,n.useCallback)((e=>{r(e)}),[]);return i().createElement("div",{className:I()(H.view,{[H.large]:"large"===a})},i().createElement(F.y,{job:t,onSizeChange:s}))}var R=a(76720),q=a(51069);function P(e,t){switch(e){case"completed":return{className:_.completed,icon:{lib:"antd",theme:"filled",icon:"check-circle"}};case"submitted":case"working":return"terminated"===t?{icon:{lib:"fa",prefix:"far",icon:"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":case"terminated":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"}}}}var J=a(47760);function O(e){var t,a;let{job:r,isSubTask:s}=e;const l=r.toolCall,o=(null==l||null===(t=l.annotations)||void 0===t?void 0:t.title)||(null==l?void 0:l.name),c=null==l?void 0:l.name,d=!!l,{conversationState:m,setActiveDetail:u,setSubActiveDetail:p}=(0,n.useContext)(R.j),{lastDetail:f,setUserClosedAside:b}=(0,n.useContext)(q.W),{className:g,icon:h}=(0,n.useMemo)((()=>P(r.state,m)),[r.state,m]),[v,k,x]=(0,n.useMemo)((()=>{var e;const t=[],a=[],n=[];let i="llm_answer"===c;return null===(e=r.messages)||void 0===e||e.forEach((e=>{if("tool"===e.role)for(const l of e.parts){var r;if("data"===l.type)switch(null===(r=l.data)||void 0===r?void 0:r.type){case"markdown":t.push(l.data.content);break;case"cmdb_instance_detail":var s;a.push(l.data),i||(i=Object.keys("object"===(null===(s=l.data)||void 0===s||null===(s=s.outputSchema)||void 0===s?void 0:s.type)?l.data.outputSchema.properties:l.data.detail).length>6)}else"file"===l.type&&n.push(l.file)}})),[t.join(""),a,n]}),[r.messages,c]),[y,T]=(0,n.useState)(!1),N=d||!!r.instruction;return i().createElement("div",{className:I()({[_.collapsed]:y})},N&&i().createElement("div",{className:I()(_.heading,g),onClick:()=>T((e=>!e))},i().createElement("div",{className:_.icon},i().createElement(E.Bj,h)),i().createElement("div",{className:_.title},r.instruction||o),i().createElement(E.Bj,(0,w.A)({className:_.caret},A.ae))),i().createElement("div",{className:_.body},d&&i().createElement("div",{className:_.tool,onClick:()=>{const e={type:"job",id:r.id};(s?p:u)((t=>(0,S.isEqual)(t,e)?t:e)),(0,S.isEqual)(e,f)&&b(!1)}},i().createElement(E.Bj,{lib:"lucide",icon:"square-chevron-right"}),o),i().createElement("div",{className:_.main},null===(a=r.messages)||void 0===a?void 0:a.map(((e,t)=>{var a;return"tool"===e.role?null:i().createElement("div",{key:t,className:I()(_.message,j.A.markdown)},null===(a=e.parts)||void 0===a?void 0:a.map(((e,t)=>i().createElement(i().Fragment,{key:t},"text"===e.type&&i().createElement(C.w,{className:I()(_["message-part"],j.A["markdown-wrapper"]),content:e.text})))))}))),i().createElement("div",{className:_.content},v&&i().createElement("div",{className:I()(_.markdown,j.A.markdown)},i().createElement(C.w,{className:j.A["markdown-wrapper"],content:v})),k.map(((e,t)=>i().createElement("div",{key:t,className:_.box},i().createElement(V.H,e)))),r.generatedView?i().createElement(L,{job:r}):null,x.length>0&&i().createElement(J.$,{files:x}))))}var G=a(48952);function D(e){let{chunk:t,isSubTask:a}=e;return"job"===t.type?i().createElement(O,{job:t.job,isSubTask:a}):"error"===t.type?i().createElement("div",{className:_.error},t.error):i().createElement(M,{chunk:t,isSubTask:a})}function M(e){let{chunk:t,isSubTask:a}=e;const{conversationState:r,setActiveDetail:s,setSubActiveDetail:l}=(0,n.useContext)(R.j),{setUserClosedAside:o,lastDetail:c}=(0,n.useContext)(q.W),[d,m]=(0,n.useState)(!1),{type:u,task:p}=t,{className:f,icon:b}=(0,n.useMemo)((()=>P("flow"===t.type?"completed":p.state,r)),[t.type,r,p.state]);return i().createElement("div",{className:I()({[_.collapsed]:d})},i().createElement("div",{className:I()(_.heading,f),onClick:()=>m((e=>!e))},i().createElement("div",{className:_.icon},i().createElement(E.Bj,b)),i().createElement("div",{className:_.title},"flow"===u?(0,G.t)(G.K.INITIATING_SERVICE_FLOW,{name:t.flow.name}):(0,G.t)(G.K.STARTING_SERVICE_FLOW_ACTIVITY,{name:t.activity.name})),i().createElement(E.Bj,(0,w.A)({className:_.caret},A.ae))),i().createElement("div",{className:_.body},i().createElement("div",{className:_.tool,onClick:()=>{const e={type:t.type,id:t.task.id};(a?l:s)((t=>(0,S.isEqual)(t,e)?t:e)),(0,S.isEqual)(e,c)&&o(!1)}},i().createElement(E.Bj,{lib:"lucide",icon:"route"}),"flow"===u?(0,G.t)(G.K.INITIATING_SERVICE_FLOW,{name:t.flow.name}):(0,G.t)(G.K.STARTING_SERVICE_FLOW_ACTIVITY,{name:t.activity.name}))))}var B=a(17994),K={};K.styleTagTransform=g(),K.setAttributes=u(),K.insert=d().bind(null,"head"),K.domAPI=o(),K.insertStyleElement=f(),s()(B.A,K);const Q=B.A&&B.A.locals?B.A.locals:void 0;function X(e){let{job:t}=e;return i().createElement("div",{className:Q.hil},i().createElement("div",{className:Q.content},i().createElement(E.Bj,{lib:"antd",icon:"exclamation-circle"}),(0,G.t)(G.K.HIL_TIPS,{name:t.hil.username})),t.requestHumanAction&&i().createElement("div",{className:Q.actions},i().createElement(x.n,{action:t.requestHumanAction,ui:"chat"})))}const Y={type:"error",error:"The conversation was marked as finished early due to an unexpected issue.\nPlease refresh the page or try again later."};function Z(e){let{chunks:t,scopeState:a,isLatest:r,isSubTask:s,finished:l,earlyFinished:o}=e;const[c,d]=(0,n.useMemo)((()=>{if(!t||0===t.length)return[!1,void 0];const e=t[t.length-1];let n;if(e)switch(e.type){case"flow":case"activity":n=e.task.jobs[e.task.jobs.length-1];break;case"job":n=e.job;break;default:return[!1,void 0]}if(!r||A.Z5.includes(a))return[!1,n];for(const e of t)switch(e.type){case"flow":case"activity":if(e.task.jobs.some((e=>"input-required"===e.state)))return[!1,n];break;case"job":if("input-required"===e.job.state)return[!1,n]}return n&&"working"===n.state&&n.toolCall?[!1,n]:[!0,n]}),[r,t,a]);return i().createElement("div",{className:k.assistant},i().createElement(E.Bj,{lib:"easyops",category:"image",icon:"elevo-avatar-png",className:k.avatar}),i().createElement("div",{className:k.body},null==t?void 0:t.map(((e,t)=>i().createElement(D,{key:t,chunk:e,isSubTask:s}))),c&&!l&&i().createElement("div",{className:k.texting}),r&&d&&!A.X4.includes(a)&&("working"===d.state||"input-required"===d.state)&&!d.humanAction&&(d.hil?i().createElement(X,{job:d}):d.requestHumanAction&&i().createElement(x.n,{action:d.requestHumanAction,ui:"chat"})),o&&i().createElement(D,{chunk:Y})))}},86e3:(e,t,a)=>{a.d(t,{A:()=>l});var n=a(36758),i=a.n(n),r=a(40935),s=a.n(r)()(i());s.push([e.id,".scroll-down--st4A5sQ4{position:absolute;left:50%;bottom:136px;transform:translateX(-50%);width:32px;height:32px;font-size:12px}",""]),s.locals={"scroll-down":"scroll-down--st4A5sQ4"};const l=s}}]);
2
- //# sourceMappingURL=9273.e6feece8.js.map
1
+ "use strict";(globalThis.webpackChunk_next_bricks_ai_portal=globalThis.webpackChunk_next_bricks_ai_portal||[]).push([[9273],{9442:(e,t,a)=>{a.d(t,{A:()=>h});var n=a(72591),i=a.n(n),r=a(1740),s=a.n(r),l=a(88128),o=a.n(l),c=a(30855),d=a.n(c),m=a(93051),u=a.n(m),p=a(73656),f=a.n(p),b=a(86e3),g={};g.styleTagTransform=f(),g.setAttributes=d(),g.insert=o().bind(null,"head"),g.domAPI=s(),g.insertStyleElement=u(),i()(b.A,g);const h=b.A&&b.A.locals?b.A.locals:void 0},13330:(e,t,a)=>{a.d(t,{p:()=>s});var n=a(18769),i=a(50045),r=a(40177);function s(e,t,a,s,l,o,c){const d=null==c?void 0:c.showHumanActions,m=null==c?void 0:c.skipActivitySubTasks;return(0,n.useMemo)((()=>{if(!e)return{messages:[],lastDetail:null};const{chunks:n,jobMap:c}=(0,i.a)(a,s,l,o,m),u=[];let p={role:"assistant",chunks:[]},f=null;for(const e of n)if("job"===e.type){var b;const t=e.job;var g;t.toolCall&&!t.ignoreDetails&&(f={type:"job",id:t.id}),"completed"===t.state&&null!==(b=t.messages)&&void 0!==b&&b.length&&t.messages.every((e=>"user"===e.role))?(p.chunks.length>0&&u.push(p),u.push({role:"user",content:t.messages.flatMap((e=>e.parts.map((e=>"text"===e.type?e.text:"")))).join(""),cmd:t.cmd,mentionedAiEmployeeId:t.mentionedAiEmployeeId,fromSkippedSubTask:e.fromSkippedSubTask,files:null===(g=t.messages)||void 0===g?void 0:g.filter((e=>"user"===e.role)).flatMap((e=>e.parts)).filter((e=>"file"===e.type)).map((e=>e.file))}),p={role:"assistant",chunks:[]}):p.chunks.push(e),t.humanAction&&(p.chunks.length>0&&u.push(p),d&&u.push({role:"user",content:t.humanAction}),p={role:"assistant",chunks:[]})}else p.chunks.push(e),"error"!==e.type&&(f={type:e.type,id:e.task.id});let h=u.length>0&&!r.QB.includes(t);if(h&&"assistant"===p.role&&0===p.chunks.length){const e=u[u.length-1];"user"===e.role&&e.fromSkippedSubTask&&(h=!1)}return(p.chunks.length>0||h)&&u.push(p),{messages:u,jobMap:c,lastDetail:f}}),[e,t,a,l,o,s,d,m])}},17994:(e,t,a)=>{a.d(t,{A:()=>l});var n=a(36758),i=a.n(n),r=a(40935),s=a.n(r)()(i());s.push([e.id,".hil--e3zZFYQc{background:rgba(255,255,255,0.5);border-radius:8px;border:1px solid #ffffff;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);padding:13px 16px;margin-top:12px}.content--tmVj790o,\n.actions--wbNFKF3J{display:flex;align-items:center}.content--tmVj790o{gap:10px;flex-wrap:wrap}.actions--wbNFKF3J{justify-content:flex-end;margin-top:-3px}",""]),s.locals={hil:"hil--e3zZFYQc",content:"content--tmVj790o",actions:"actions--wbNFKF3J"};const l=s},26598:(e,t,a)=>{a.d(t,{A:()=>l});var n=a(36758),i=a.n(n),r=a(40935),s=a.n(r)()(i());s.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}",""]),s.locals={user:"user--HjXM9OHW"};const l=s},30621:(e,t,a)=>{a.d(t,{R:()=>x});var n=a(18769),i=a.n(n),r=a(72591),s=a.n(r),l=a(1740),o=a.n(l),c=a(88128),d=a.n(c),m=a(30855),u=a.n(m),p=a(93051),f=a.n(p),b=a(73656),g=a.n(b),h=a(26598),v={};v.styleTagTransform=g(),v.setAttributes=u(),v.insert=d().bind(null,"head"),v.domAPI=o(),v.insertStyleElement=f(),s()(h.A,v);const k=h.A&&h.A.locals?h.A.locals:void 0;var A=a(77388),E=a(47760);function x(e){let{content:t,cmd:a,mentionedAiEmployeeId:n,files:r}=e;return i().createElement(i().Fragment,null,i().createElement("div",{className:k.user},(a||n)&&i().createElement(A._,{cmd:a,mentionedAiEmployeeId:n}),t),null!=r&&r.length?i().createElement(E.$,{files:r,ui:"chat"}):null)}},32360:(e,t,a)=>{e.exports=a.p+"images/72c24398.png"},35754:(e,t,a)=>{a.d(t,{A:()=>l});var n=a(36758),i=a.n(n),r=a(40935),s=a.n(r)()(i());s.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{content:" ";animation:texting--Rpmsbpca 2s infinite;white-space:pre}.avatar--jaJhEiSV{font-size:32px}@keyframes texting--Rpmsbpca{0%{content:"\\00a0\\00a0\\00a0"}25%{content:".\\00a0\\00a0"}50%{content:"..\\00a0"}75%{content:"..."}100%{content:"\\00a0\\00a0\\00a0"}}',""]),s.locals={assistant:"assistant--CrlgPgYL",body:"body--sAIo2dhL",texting:"texting--Rpmsbpca",avatar:"avatar--jaJhEiSV"};const l=s},40563:(e,t,a)=>{a.d(t,{i:()=>r});var n=a(18769),i=a(99126);function r(e,t,a){const r=(0,n.useRef)(!1),s=(0,n.useRef)(!1),[l,o]=(0,n.useState)(!1);return(0,n.useEffect)((()=>{const e=t.current,n=a.current;if(s.current||!e||!n)return;const l=()=>{o(e.scrollTop+e.clientHeight+24<e.scrollHeight),r.current&&(s.current=e.scrollTop+e.clientHeight+6<e.scrollHeight)};let c;e.addEventListener("scroll",l);const d=new i.A((()=>{s.current||(r.current=!1,e.scrollTo({top:n.scrollHeight,behavior:"instant"}),clearTimeout(c),c=setTimeout((()=>{r.current=!0}),100))}));return d.observe(n),()=>{d.disconnect(),e.removeEventListener("scroll",l)}}),[e]),{scrollable:l,scrollToBottom:(0,n.useCallback)((()=>{const e=t.current;null==e||e.scrollTo({top:null==e?void 0:e.scrollHeight,behavior:"instant"})}),[t])}}},48952:(e,t,a)=>{a.d(t,{I:()=>s,K:()=>i,NS:()=>r,t:()=>l});var n=a(67177);let i=function(e){return e.SWITCH_TO_CANVAS="SWITCH_TO_CANVAS",e.INITIATING_SERVICE_FLOW="INITIATING_SERVICE_FLOW",e.STARTING_SERVICE_FLOW_ACTIVITY="STARTING_SERVICE_FLOW_ACTIVITY",e.HIL_TIPS="HIL_TIPS",e}({});const r="bricks/ai-portal/chat-stream",s={en:{SWITCH_TO_CANVAS:"Switch to canvas",INITIATING_SERVICE_FLOW:"Initiating service flow: {{ name }}",STARTING_SERVICE_FLOW_ACTIVITY:"Starting service flow activity: {{ name }}",HIL_TIPS:"Triggered HIL rule, waiting for {{ name }} to process."},zh:{SWITCH_TO_CANVAS:"切换为画布",INITIATING_SERVICE_FLOW:"发起业务流:{{ name }}",STARTING_SERVICE_FLOW_ACTIVITY:"开始业务流活动:{{ name }}",HIL_TIPS:"触发 HIL 规则,等待 {{ name }} 处理。"}},l=n.i18n.getFixedT(null,r)},50094:(e,t,a)=>{a.d(t,{A:()=>l});var n=a(36758),i=a.n(n),r=a(40935),s=a.n(r)()(i());s.push([e.id,'.heading--lj5kJ2fg{display:flex;align-items:center;padding:5px 8px;margin:0 0 12px;cursor:pointer}.main--P8894aNV{font-size:16px;line-height:26px}.caret--XqX6mjyf{opacity:0;transition:transform 0.2s ease-in-out}.heading--lj5kJ2fg:hover{background:rgba(184,187,205,0.15);border-radius:8px}.heading--lj5kJ2fg:hover .caret--XqX6mjyf{opacity:1}.icon--l8SzaFlV{display:flex;align-items:center;margin-right:12px}.title--FZPCnJbE{color:#262626;font-weight:500;flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tool--ugqSpeIM{background:#e2e5ef;border:1px solid #d4d4de;border-radius:13px;line-height:24px;padding:0 12px;width:-moz-fit-content;width:fit-content;font-size:12px;color:rgba(0,0,0,0.65);cursor:pointer;display:flex;align-items:center;gap:7px;margin-bottom:12px}.tool--ugqSpeIM eo-icon{font-size:14px;color:#8c8c8c}.body--p3Zt_jA4{margin-bottom:20px}.heading--lj5kJ2fg + .body--p3Zt_jA4{padding-left:26px}.collapsed--cGSG2zk_ .body--p3Zt_jA4{display:none}.collapsed--cGSG2zk_ .caret--XqX6mjyf{transform:rotate(180deg);opacity:1}.content--pBkkWQ5e{margin-top:14px;font-size:16px;line-height:26px}.content--pBkkWQ5e .markdown--Ky2J85cs [class*="code-wrapper--"]::part(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:auto;max-width:100%}.content--pBkkWQ5e:empty{display:none}.message--okEUzWzg:first-child > .message-part--kxjYnHz0:first-child > :first-child{margin-top:0}.icon--l8SzaFlV{color:#abaab7}.completed--JWq7E1Jw .icon--l8SzaFlV{color:#0fbe59}.failed--uk7jDD7K .icon--l8SzaFlV{color:#f24c25}.working--dZiN0y04 .icon--l8SzaFlV{color:var(--elevo-color-brand)}.input-required--JSuPr8br .icon--l8SzaFlV{color:#12aacc}.canceled--LyMjPJQd .icon--l8SzaFlV{color:#fcaa07}ai-portal\\.chat-stream[hide-mermaid] .content--pBkkWQ5e .markdown--Ky2J85cs .mermaid{display:none}.error--n_Of3DwP{color:var(--color-error);white-space:pre-wrap;word-break:break-word}',""]),s.locals={heading:"heading--lj5kJ2fg",main:"main--P8894aNV",caret:"caret--XqX6mjyf",icon:"icon--l8SzaFlV",title:"title--FZPCnJbE",tool:"tool--ugqSpeIM",body:"body--p3Zt_jA4",collapsed:"collapsed--cGSG2zk_",content:"content--pBkkWQ5e",markdown:"markdown--Ky2J85cs",message:"message--okEUzWzg","message-part":"message-part--kxjYnHz0",completed:"completed--JWq7E1Jw",failed:"failed--uk7jDD7K",working:"working--dZiN0y04","input-required":"input-required--JSuPr8br",canceled:"canceled--LyMjPJQd",error:"error--n_Of3DwP"};const l=s},51069:(e,t,a)=>{a.d(t,{W:()=>n});const n=(0,a(18769).createContext)({lastDetail:null,setUserClosedAside:()=>{}})},65438:(e,t,a)=>{a.d(t,{A:()=>l});var n=a(36758),i=a.n(n),r=a(40935),s=a.n(r)()(i());s.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);max-width:100%;margin-top:14px}.large--jT3IWlRf{width:var(--cruise-canvas-node-width-large)}",""]),s.locals={view:"view--O8CNDdS_",large:"large--jT3IWlRf"};const l=s},84766:(e,t,a)=>{a.d(t,{G:()=>Z});var n=a(18769),i=a.n(n),r=a(72591),s=a.n(r),l=a(1740),o=a.n(l),c=a(88128),d=a.n(c),m=a(30855),u=a.n(m),p=a(93051),f=a.n(p),b=a(73656),g=a.n(b),h=a(35754),v={};v.styleTagTransform=g(),v.setAttributes=u(),v.insert=d().bind(null,"head"),v.domAPI=o(),v.insertStyleElement=f(),s()(h.A,v);const k=h.A&&h.A.locals?h.A.locals:void 0;var A=a(40177),E=a(30672),x=a(35430),w=a(89575),y=a(53373),I=a.n(y),S=a(41030),T=a(50094),N={};N.styleTagTransform=g(),N.setAttributes=u(),N.insert=d().bind(null,"head"),N.domAPI=o(),N.insertStyleElement=f(),s()(T.A,N);const _=T.A&&T.A.locals?T.A.locals:void 0;var j=a(36903),C=a(29386),V=a(42854),F=a(86976),W=a(65438),z={};z.styleTagTransform=g(),z.setAttributes=u(),z.insert=d().bind(null,"head"),z.domAPI=o(),z.insertStyleElement=f(),s()(W.A,z);const H=W.A&&W.A.locals?W.A.locals:void 0;function L(e){let{job:t}=e;const[a,r]=(0,n.useState)("medium"),s=(0,n.useCallback)((e=>{r(e)}),[]);return i().createElement("div",{className:I()(H.view,{[H.large]:"large"===a})},i().createElement(F.y,{job:t,onSizeChange:s}))}var R=a(76720),q=a(51069);function P(e,t){switch(e){case"completed":return{className:_.completed,icon:{lib:"antd",theme:"filled",icon:"check-circle"}};case"submitted":case"working":return"terminated"===t?{icon:{lib:"fa",prefix:"far",icon:"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":case"terminated":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"}}}}var J=a(47760);function O(e){var t,a;let{job:r,isSubTask:s}=e;const l=r.toolCall,o=(null==l||null===(t=l.annotations)||void 0===t?void 0:t.title)||(null==l?void 0:l.name),c=null==l?void 0:l.name,d=!!l,{conversationState:m,setActiveDetail:u,setSubActiveDetail:p}=(0,n.useContext)(R.j),{lastDetail:f,setUserClosedAside:b}=(0,n.useContext)(q.W),{className:g,icon:h}=(0,n.useMemo)((()=>P(r.state,m)),[r.state,m]),[v,k,x]=(0,n.useMemo)((()=>{var e;const t=[],a=[],n=[];let i="llm_answer"===c;return null===(e=r.messages)||void 0===e||e.forEach((e=>{if("tool"===e.role)for(const l of e.parts){var r;if("data"===l.type)switch(null===(r=l.data)||void 0===r?void 0:r.type){case"markdown":t.push(l.data.content);break;case"cmdb_instance_detail":var s;a.push(l.data),i||(i=Object.keys("object"===(null===(s=l.data)||void 0===s||null===(s=s.outputSchema)||void 0===s?void 0:s.type)?l.data.outputSchema.properties:l.data.detail).length>6)}else"file"===l.type&&n.push(l.file)}})),[t.join(""),a,n]}),[r.messages,c]),[y,T]=(0,n.useState)(!1),N=d||!!r.instruction;return i().createElement("div",{className:I()({[_.collapsed]:y})},N&&i().createElement("div",{className:I()(_.heading,g),onClick:()=>T((e=>!e))},i().createElement("div",{className:_.icon},i().createElement(E.Bj,h)),i().createElement("div",{className:_.title},r.instruction||o),i().createElement(E.Bj,(0,w.A)({className:_.caret},A.ae))),i().createElement("div",{className:_.body},d&&i().createElement("div",{className:_.tool,onClick:()=>{const e={type:"job",id:r.id};(s?p:u)((t=>(0,S.isEqual)(t,e)?t:e)),(0,S.isEqual)(e,f)&&b(!1)}},i().createElement(E.Bj,{lib:"lucide",icon:"square-chevron-right"}),o),i().createElement("div",{className:_.main},null===(a=r.messages)||void 0===a?void 0:a.map(((e,t)=>{var a;return"tool"===e.role?null:i().createElement("div",{key:t,className:I()(_.message,j.A.markdown)},null===(a=e.parts)||void 0===a?void 0:a.map(((e,t)=>i().createElement(i().Fragment,{key:t},"text"===e.type&&i().createElement(C.w,{className:I()(_["message-part"],j.A["markdown-wrapper"]),content:e.text})))))}))),i().createElement("div",{className:_.content},v&&i().createElement("div",{className:I()(_.markdown,j.A.markdown)},i().createElement(C.w,{className:j.A["markdown-wrapper"],content:v})),k.map(((e,t)=>i().createElement("div",{key:t,className:_.box},i().createElement(V.H,e)))),r.generatedView?i().createElement(L,{job:r}):null,x.length>0&&i().createElement(J.$,{files:x}))))}var G=a(48952);function D(e){let{chunk:t,isSubTask:a}=e;return"job"===t.type?i().createElement(O,{job:t.job,isSubTask:a}):"error"===t.type?i().createElement("div",{className:_.error},t.error):i().createElement(M,{chunk:t,isSubTask:a})}function M(e){let{chunk:t,isSubTask:a}=e;const{conversationState:r,setActiveDetail:s,setSubActiveDetail:l}=(0,n.useContext)(R.j),{setUserClosedAside:o,lastDetail:c}=(0,n.useContext)(q.W),[d,m]=(0,n.useState)(!1),{type:u,task:p}=t,{className:f,icon:b}=(0,n.useMemo)((()=>P("flow"===t.type?"completed":p.state,r)),[t.type,r,p.state]);return i().createElement("div",{className:I()({[_.collapsed]:d})},i().createElement("div",{className:I()(_.heading,f),onClick:()=>m((e=>!e))},i().createElement("div",{className:_.icon},i().createElement(E.Bj,b)),i().createElement("div",{className:_.title},"flow"===u?(0,G.t)(G.K.INITIATING_SERVICE_FLOW,{name:t.flow.name}):(0,G.t)(G.K.STARTING_SERVICE_FLOW_ACTIVITY,{name:t.activity.name})),i().createElement(E.Bj,(0,w.A)({className:_.caret},A.ae))),i().createElement("div",{className:_.body},i().createElement("div",{className:_.tool,onClick:()=>{const e={type:t.type,id:t.task.id};(a?l:s)((t=>(0,S.isEqual)(t,e)?t:e)),(0,S.isEqual)(e,c)&&o(!1)}},i().createElement(E.Bj,{lib:"lucide",icon:"route"}),"flow"===u?(0,G.t)(G.K.INITIATING_SERVICE_FLOW,{name:t.flow.name}):(0,G.t)(G.K.STARTING_SERVICE_FLOW_ACTIVITY,{name:t.activity.name}))))}var B=a(17994),K={};K.styleTagTransform=g(),K.setAttributes=u(),K.insert=d().bind(null,"head"),K.domAPI=o(),K.insertStyleElement=f(),s()(B.A,K);const Q=B.A&&B.A.locals?B.A.locals:void 0;function X(e){let{job:t}=e;return i().createElement("div",{className:Q.hil},i().createElement("div",{className:Q.content},i().createElement(E.Bj,{lib:"antd",icon:"exclamation-circle"}),(0,G.t)(G.K.HIL_TIPS,{name:t.hil.username})),t.requestHumanAction&&i().createElement("div",{className:Q.actions},i().createElement(x.n,{action:t.requestHumanAction,ui:"chat"})))}const Y={type:"error",error:"The conversation was marked as finished early due to an unexpected issue.\nPlease refresh the page or try again later."};function Z(e){let{chunks:t,scopeState:a,isLatest:r,isSubTask:s,finished:l,earlyFinished:o}=e;const[c,d]=(0,n.useMemo)((()=>{if(!t||0===t.length)return[r&&!A.Z5.includes(a),void 0];const e=t[t.length-1];let n;if(e)switch(e.type){case"flow":case"activity":n=e.task.jobs[e.task.jobs.length-1];break;case"job":n=e.job;break;default:return[!1,void 0]}if(!r||A.Z5.includes(a))return[!1,n];for(const e of t)switch(e.type){case"flow":case"activity":if(e.task.jobs.some((e=>"input-required"===e.state)))return[!1,n];break;case"job":if("input-required"===e.job.state)return[!1,n]}return n&&"working"===n.state&&n.toolCall?[!1,n]:[!0,n]}),[r,t,a]);return i().createElement("div",{className:k.assistant},i().createElement(E.Bj,{lib:"easyops",category:"image",icon:"elevo-avatar-png",className:k.avatar}),i().createElement("div",{className:k.body},null==t?void 0:t.map(((e,t)=>i().createElement(D,{key:t,chunk:e,isSubTask:s}))),c&&!l&&i().createElement("div",{className:k.texting}),r&&d&&!A.X4.includes(a)&&("working"===d.state||"input-required"===d.state)&&!d.humanAction&&(d.hil?i().createElement(X,{job:d}):d.requestHumanAction&&i().createElement(x.n,{action:d.requestHumanAction,ui:"chat"})),o&&i().createElement(D,{chunk:Y})))}},86e3:(e,t,a)=>{a.d(t,{A:()=>l});var n=a(36758),i=a.n(n),r=a(40935),s=a.n(r)()(i());s.push([e.id,".scroll-down--st4A5sQ4{position:absolute;left:50%;bottom:136px;transform:translateX(-50%);width:32px;height:32px;font-size:12px}",""]),s.locals={"scroll-down":"scroll-down--st4A5sQ4"};const l=s}}]);
2
+ //# sourceMappingURL=9273.760f5efc.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chunks/9273.760f5efc.js","mappings":"kSAWIA,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,IAAQM,OAAS,IAAQA,YAASC,C,wECV5D,SAASC,EACdC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAd,GAKA,MAAMe,EAAmBf,aAAO,EAAPA,EAASe,iBAC5BC,EAAuBh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AAQ,GACrB,CAACH,EAAUvL,EAAQsL,IAEtB,OACE9I,IAAAA,cAAA,OAAKC,UAAWC,EAAOqJ,WACrBvJ,IAAAA,cAAC6G,EAAAA,GAAW,CACVzC,IAAI,UACJoF,SAAS,QACTrF,KAAK,mBACLlE,UAAWC,EAAOuJ,SAEpBzJ,IAAAA,cAAA,OAAKC,UAAWC,EAAO+G,MACpBzJ,aAAM,EAANA,EAAQoB,KAAI,CAACf,EAAOwJ,IACnBrH,IAAAA,cAAC+H,EAAS,CAACR,IAAKF,EAAOxJ,MAAOA,EAAOgH,UAAWA,MAEjDN,IAAYyE,GAAYhJ,IAAAA,cAAA,OAAKC,UAAWC,EAAOwJ,UAC/CX,GACCG,IACCS,EAAAA,GAAoBjK,SAASoJ,KACX,YAAlBI,EAAQpM,OAAyC,mBAAlBoM,EAAQpM,SACvCoM,EAAQ5J,cACR4J,EAAQZ,IACPtI,IAAAA,cAACqI,EAAc,CAACrK,IAAKkL,IAErBA,EAAQV,oBACNxI,IAAAA,cAAC0I,EAAAA,EAAkB,CACjBC,OAAQO,EAAQV,mBAChBlI,GAAG,UAIV2I,GAAiBjJ,IAAAA,cAAC+H,EAAS,CAAClK,MAAO+K,KAI5C,C,qECnHIhJ,E,MAA0B,GAA4B,KAE1DA,EAAwBpB,KAAK,CAACqB,EAAOzB,GAAI,mIAAoI,KAE7KwB,EAAwBlD,OAAS,CAChC,cAAe,yBAEhB,S","sources":["webpack:///./src/chat-stream/ScrollDownButton.module.css?e644","webpack:///./src/chat-stream/useConversationStream.ts","webpack:///./src/chat-stream/HumanInTheLoop/HumanInTheLoop.module.css","webpack:///./src/chat-stream/UserMessage/UserMessage.module.css","webpack:///./src/chat-stream/UserMessage/UserMessage.module.css?84b2","webpack:///./src/chat-stream/UserMessage/UserMessage.tsx","webpack:///./src/chat-stream/AssistantMessage/AssistantMessage.module.css","webpack:///./src/chat-stream/useAutoScroll.ts","webpack:///./src/chat-stream/i18n.ts","webpack:///./src/chat-stream/NodeChunk/NodeChunk.module.css","webpack:///./src/chat-stream/StreamContext.ts","webpack:///./src/chat-stream/NodeView/NodeView.module.css","webpack:///./src/chat-stream/AssistantMessage/AssistantMessage.module.css?a84b","webpack:///./src/chat-stream/NodeChunk/NodeChunk.module.css?1c0e","webpack:///./src/chat-stream/NodeView/NodeView.module.css?3001","webpack:///./src/chat-stream/NodeView/NodeView.tsx","webpack:///./src/chat-stream/NodeChunk/getStateDisplay.ts","webpack:///./src/chat-stream/NodeChunk/NodeJob.tsx","webpack:///./src/chat-stream/NodeChunk/NodeChunk.tsx","webpack:///./src/chat-stream/HumanInTheLoop/HumanInTheLoop.module.css?e637","webpack:///./src/chat-stream/HumanInTheLoop/HumanInTheLoop.tsx","webpack:///./src/chat-stream/AssistantMessage/AssistantMessage.tsx","webpack:///./src/chat-stream/ScrollDownButton.module.css"],"sourcesContent":["\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]!./ScrollDownButton.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]!./ScrollDownButton.module.css\";\n export default content && content.locals ? content.locals : undefined;\n","import { useMemo } from \"react\";\nimport type { ChatMessage, MessageFromAssistant } from \"./interfaces.js\";\nimport type {\n ActiveDetail,\n ActivityWithFlow,\n ConversationError,\n ConversationState,\n ServiceFlowRun,\n Task,\n TaskState,\n} from \"../shared/interfaces.js\";\nimport { getFlatChunks } from \"../shared/getFlatChunks.js\";\nimport { DONE_STATES } from \"../shared/constants.js\";\n\nexport function useConversationStream(\n conversationAvailable: boolean,\n state: ConversationState | TaskState | undefined,\n tasks: Task[],\n errors: ConversationError[],\n flowMap?: Map<string, ServiceFlowRun>,\n activityMap?: Map<string, ActivityWithFlow>,\n options?: {\n showHumanActions?: boolean;\n skipActivitySubTasks?: boolean;\n }\n) {\n const showHumanActions = options?.showHumanActions;\n const skipActivitySubTasks = options?.skipActivitySubTasks;\n\n return useMemo(() => {\n if (!conversationAvailable) {\n return {\n messages: [],\n lastDetail: null,\n };\n }\n\n const { chunks, jobMap } = getFlatChunks(\n tasks,\n errors,\n flowMap,\n activityMap,\n skipActivitySubTasks\n );\n const messages: ChatMessage[] = [];\n\n let prevAssistantMessage: MessageFromAssistant = {\n role: \"assistant\",\n chunks: [],\n };\n let lastDetail: ActiveDetail | null = null;\n for (const chunk of chunks) {\n if (chunk.type === \"job\") {\n const job = chunk.job;\n if (job.toolCall && !job.ignoreDetails) {\n lastDetail = {\n type: \"job\",\n id: job.id,\n };\n }\n\n if (\n job.state === \"completed\" &&\n job.messages?.length &&\n job.messages.every((msg) => msg.role === \"user\")\n ) {\n if (prevAssistantMessage.chunks.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 cmd: job.cmd,\n mentionedAiEmployeeId: job.mentionedAiEmployeeId,\n fromSkippedSubTask: chunk.fromSkippedSubTask,\n files: job.messages\n ?.filter((msg) => msg.role === \"user\")\n .flatMap((msg) => msg.parts)\n .filter((part) => part.type === \"file\")\n .map((part) => part.file),\n });\n prevAssistantMessage = {\n role: \"assistant\",\n chunks: [],\n };\n } else {\n prevAssistantMessage.chunks.push(chunk);\n }\n\n if (job.humanAction) {\n if (prevAssistantMessage.chunks.length > 0) {\n messages.push(prevAssistantMessage);\n }\n if (showHumanActions) {\n messages.push({\n role: \"user\",\n content: job.humanAction,\n });\n }\n prevAssistantMessage = {\n role: \"assistant\",\n chunks: [],\n };\n }\n } else {\n prevAssistantMessage.chunks.push(chunk);\n if (chunk.type !== \"error\") {\n lastDetail = {\n type: chunk.type,\n id: chunk.task.id,\n };\n }\n }\n }\n\n let shouldAppendEmptyMessage =\n messages.length > 0 && !DONE_STATES.includes(state);\n if (\n shouldAppendEmptyMessage &&\n prevAssistantMessage.role === \"assistant\" &&\n prevAssistantMessage.chunks.length === 0\n ) {\n const lastMessage = messages[messages.length - 1];\n if (lastMessage.role === \"user\" && lastMessage.fromSkippedSubTask) {\n shouldAppendEmptyMessage = false;\n }\n }\n\n if (prevAssistantMessage.chunks.length > 0 || shouldAppendEmptyMessage) {\n messages.push(prevAssistantMessage);\n }\n\n return { messages, jobMap, lastDetail };\n }, [\n conversationAvailable,\n state,\n tasks,\n flowMap,\n activityMap,\n errors,\n showHumanActions,\n skipActivitySubTasks,\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, `.hil--e3zZFYQc{background:rgba(255,255,255,0.5);border-radius:8px;border:1px solid #ffffff;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);padding:13px 16px;margin-top:12px}.content--tmVj790o,\n.actions--wbNFKF3J{display:flex;align-items:center}.content--tmVj790o{gap:10px;flex-wrap:wrap}.actions--wbNFKF3J{justify-content:flex-end;margin-top:-3px}`, \"\"]);\n// Exports\n___CSS_LOADER_EXPORT___.locals = {\n\t\"hil\": `hil--e3zZFYQc`,\n\t\"content\": `content--tmVj790o`,\n\t\"actions\": `actions--wbNFKF3J`\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, `.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]!./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\";\nimport type { CommandPayload, FileInfo } from \"../../shared/interfaces\";\nimport { ReadableCommand } from \"../../shared/ReadableCommand/ReadableCommand\";\nimport { FileList } from \"../../shared/FilePreview/FileList\";\n\nexport interface UserMessageProps {\n content: string;\n cmd?: CommandPayload;\n mentionedAiEmployeeId?: string;\n files?: FileInfo[];\n}\n\nexport function UserMessage({\n content,\n cmd,\n mentionedAiEmployeeId,\n files,\n}: UserMessageProps) {\n return (\n <>\n <div className={styles.user}>\n {(cmd || mentionedAiEmployeeId) && (\n <ReadableCommand\n cmd={cmd}\n mentionedAiEmployeeId={mentionedAiEmployeeId}\n />\n )}\n {content}\n </div>\n {files?.length ? <FileList files={files} ui=\"chat\" /> : null}\n </>\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{content:\" \";animation:texting--Rpmsbpca 2s infinite;white-space:pre}.avatar--jaJhEiSV{font-size:32px}@keyframes texting--Rpmsbpca{0%{content:\"\\\\00a0\\\\00a0\\\\00a0\"}25%{content:\".\\\\00a0\\\\00a0\"}50%{content:\"..\\\\00a0\"}75%{content:\"...\"}100%{content:\"\\\\00a0\\\\00a0\\\\00a0\"}}`, \"\"]);\n// Exports\n___CSS_LOADER_EXPORT___.locals = {\n\t\"assistant\": `assistant--CrlgPgYL`,\n\t\"body\": `body--sAIo2dhL`,\n\t\"texting\": `texting--Rpmsbpca`,\n\t\"avatar\": `avatar--jaJhEiSV`\n};\nexport default ___CSS_LOADER_EXPORT___;\n","import {\n useCallback,\n useEffect,\n useRef,\n useState,\n type RefObject,\n} from \"react\";\nimport ResizeObserver from \"resize-observer-polyfill\";\n\nexport function useAutoScroll(\n contentAvailable: boolean,\n scrollContainerRef: RefObject<HTMLDivElement>,\n scrollContentRef: RefObject<HTMLDivElement>\n) {\n const detectScrolledUpRef = useRef(false);\n const manualScrolledRef = useRef(false);\n const [scrollable, setScrollable] = useState(false);\n\n useEffect(() => {\n const scrollContainer = scrollContainerRef.current;\n const contentContainer = scrollContentRef.current;\n if (manualScrolledRef.current || !scrollContainer || !contentContainer) {\n return;\n }\n\n const handleScroll = () => {\n setScrollable(\n scrollContainer.scrollTop + scrollContainer.clientHeight! + 24 <\n scrollContainer.scrollHeight\n );\n if (!detectScrolledUpRef.current) {\n return;\n }\n manualScrolledRef.current =\n scrollContainer.scrollTop + scrollContainer.clientHeight! + 6 <\n scrollContainer.scrollHeight;\n };\n scrollContainer.addEventListener(\"scroll\", handleScroll);\n\n let timer: ReturnType<typeof setTimeout>;\n const observer = new ResizeObserver(() => {\n if (manualScrolledRef.current) {\n return;\n }\n detectScrolledUpRef.current = false;\n // Scroll to the bottom of the content container\n scrollContainer.scrollTo({\n top: contentContainer.scrollHeight,\n behavior: \"instant\",\n });\n clearTimeout(timer);\n timer = setTimeout(() => {\n detectScrolledUpRef.current = true;\n }, 100);\n });\n observer.observe(contentContainer);\n\n return () => {\n observer.disconnect();\n scrollContainer.removeEventListener(\"scroll\", handleScroll);\n };\n // Auto scroll after the conversation becomes available\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [contentAvailable]);\n\n const scrollToBottom = useCallback(() => {\n const scrollContainer = scrollContainerRef.current;\n scrollContainer?.scrollTo({\n top: scrollContainer?.scrollHeight,\n behavior: \"instant\",\n });\n }, [scrollContainerRef]);\n\n return { scrollable, scrollToBottom };\n}\n","import { i18n } from \"@next-core/i18n\";\n\nexport enum K {\n SWITCH_TO_CANVAS = \"SWITCH_TO_CANVAS\",\n INITIATING_SERVICE_FLOW = \"INITIATING_SERVICE_FLOW\",\n STARTING_SERVICE_FLOW_ACTIVITY = \"STARTING_SERVICE_FLOW_ACTIVITY\",\n HIL_TIPS = \"HIL_TIPS\",\n}\n\nconst en: Locale = {\n SWITCH_TO_CANVAS: \"Switch to canvas\",\n INITIATING_SERVICE_FLOW: \"Initiating service flow: {{ name }}\",\n STARTING_SERVICE_FLOW_ACTIVITY: \"Starting service flow activity: {{ name }}\",\n HIL_TIPS: \"Triggered HIL rule, waiting for {{ name }} to process.\",\n};\n\nconst zh: Locale = {\n SWITCH_TO_CANVAS: \"切换为画布\",\n INITIATING_SERVICE_FLOW: \"发起业务流:{{ name }}\",\n STARTING_SERVICE_FLOW_ACTIVITY: \"开始业务流活动:{{ name }}\",\n HIL_TIPS: \"触发 HIL 规则,等待 {{ name }} 处理。\",\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","// 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--lj5kJ2fg{display:flex;align-items:center;padding:5px 8px;margin:0 0 12px;cursor:pointer}.main--P8894aNV{font-size:16px;line-height:26px}.caret--XqX6mjyf{opacity:0;transition:transform 0.2s ease-in-out}.heading--lj5kJ2fg:hover{background:rgba(184,187,205,0.15);border-radius:8px}.heading--lj5kJ2fg:hover .caret--XqX6mjyf{opacity:1}.icon--l8SzaFlV{display:flex;align-items:center;margin-right:12px}.title--FZPCnJbE{color:#262626;font-weight:500;flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tool--ugqSpeIM{background:#e2e5ef;border:1px solid #d4d4de;border-radius:13px;line-height:24px;padding:0 12px;width:-moz-fit-content;width:fit-content;font-size:12px;color:rgba(0,0,0,0.65);cursor:pointer;display:flex;align-items:center;gap:7px;margin-bottom:12px}.tool--ugqSpeIM eo-icon{font-size:14px;color:#8c8c8c}.body--p3Zt_jA4{margin-bottom:20px}.heading--lj5kJ2fg + .body--p3Zt_jA4{padding-left:26px}.collapsed--cGSG2zk_ .body--p3Zt_jA4{display:none}.collapsed--cGSG2zk_ .caret--XqX6mjyf{transform:rotate(180deg);opacity:1}.content--pBkkWQ5e{margin-top:14px;font-size:16px;line-height:26px}.content--pBkkWQ5e .markdown--Ky2J85cs [class*=\"code-wrapper--\"]::part(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:auto;max-width:100%}.content--pBkkWQ5e:empty{display:none}.message--okEUzWzg:first-child > .message-part--kxjYnHz0:first-child > :first-child{margin-top:0}.icon--l8SzaFlV{color:#abaab7}.completed--JWq7E1Jw .icon--l8SzaFlV{color:#0fbe59}.failed--uk7jDD7K .icon--l8SzaFlV{color:#f24c25}.working--dZiN0y04 .icon--l8SzaFlV{color:var(--elevo-color-brand)}.input-required--JSuPr8br .icon--l8SzaFlV{color:#12aacc}.canceled--LyMjPJQd .icon--l8SzaFlV{color:#fcaa07}ai-portal\\\\.chat-stream[hide-mermaid] .content--pBkkWQ5e .markdown--Ky2J85cs .mermaid{display:none}.error--n_Of3DwP{color:var(--color-error);white-space:pre-wrap;word-break:break-word}`, \"\"]);\n// Exports\n___CSS_LOADER_EXPORT___.locals = {\n\t\"heading\": `heading--lj5kJ2fg`,\n\t\"main\": `main--P8894aNV`,\n\t\"caret\": `caret--XqX6mjyf`,\n\t\"icon\": `icon--l8SzaFlV`,\n\t\"title\": `title--FZPCnJbE`,\n\t\"tool\": `tool--ugqSpeIM`,\n\t\"body\": `body--p3Zt_jA4`,\n\t\"collapsed\": `collapsed--cGSG2zk_`,\n\t\"content\": `content--pBkkWQ5e`,\n\t\"markdown\": `markdown--Ky2J85cs`,\n\t\"message\": `message--okEUzWzg`,\n\t\"message-part\": `message-part--kxjYnHz0`,\n\t\"completed\": `completed--JWq7E1Jw`,\n\t\"failed\": `failed--uk7jDD7K`,\n\t\"working\": `working--dZiN0y04`,\n\t\"input-required\": `input-required--JSuPr8br`,\n\t\"canceled\": `canceled--LyMjPJQd`,\n\t\"error\": `error--n_Of3DwP`\n};\nexport default ___CSS_LOADER_EXPORT___;\n","import { createContext, type Dispatch } from \"react\";\nimport type { ActiveDetail } from \"../shared/interfaces\";\n\nexport interface StreamContextValue {\n lastDetail: ActiveDetail | null;\n setUserClosedAside: Dispatch<React.SetStateAction<boolean>>;\n}\n\nexport const StreamContext = createContext<StreamContextValue>({\n lastDetail: null,\n setUserClosedAside: () => {},\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, `.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);max-width:100%;margin-top:14px}.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","\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]!./NodeChunk.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]!./NodeChunk.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]!./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 \"../../shared/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 type { GeneralIconProps } from \"@next-bricks/icons/general-icon\";\nimport type {\n ConversationState,\n JobState,\n TaskState,\n} from \"../../shared/interfaces\";\nimport styles from \"./NodeChunk.module.css\";\n\nexport function getStateDisplay(\n state: JobState | TaskState | undefined,\n conversationState: ConversationState | undefined\n): {\n className?: string;\n icon: GeneralIconProps;\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 (conversationState === \"terminated\") {\n return {\n icon: {\n lib: \"fa\",\n prefix: \"far\",\n icon: \"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 case \"terminated\" as JobState:\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, { useContext, useMemo, useState } from \"react\";\nimport classNames from \"classnames\";\nimport { isEqual } from \"lodash\";\nimport type { CmdbInstanceDetailData } from \"../../cruise-canvas/interfaces.js\";\nimport styles from \"./NodeChunk.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 { NodeView } from \"../NodeView/NodeView.js\";\nimport { TaskContext } from \"../../shared/TaskContext.js\";\nimport { StreamContext } from \"../StreamContext.js\";\nimport type { ActiveDetail, FileInfo, Job } from \"../../shared/interfaces.js\";\nimport { getStateDisplay } from \"./getStateDisplay.js\";\nimport { ICON_UP } from \"../../shared/constants.js\";\nimport { FileList } from \"../../shared/FilePreview/FileList.js\";\n\nexport interface NodeJobProps {\n job: Job;\n isSubTask?: boolean;\n}\n\nexport function NodeJob({ job, isSubTask }: NodeJobProps) {\n const toolCall = job.toolCall;\n const toolTitle = toolCall?.annotations?.title || toolCall?.name;\n const toolName = toolCall?.name;\n const showToolCall = !!toolCall;\n const { conversationState, setActiveDetail, setSubActiveDetail } =\n useContext(TaskContext);\n const { lastDetail, setUserClosedAside } = useContext(StreamContext);\n\n const { className, icon } = useMemo(() => {\n return getStateDisplay(job.state, conversationState);\n }, [job.state, conversationState]);\n\n const [toolMarkdownContent, cmdbInstanceDetails, files] = 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 const showHeading = showToolCall || !!job.instruction;\n\n return (\n <div className={classNames({ [styles.collapsed]: collapsed })}>\n {showHeading && (\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 )}\n <div className={styles.body}>\n {showToolCall && (\n <div\n className={styles.tool}\n onClick={() => {\n const detail: ActiveDetail = {\n type: \"job\",\n id: job.id,\n };\n (isSubTask ? setSubActiveDetail : setActiveDetail)((prev) =>\n isEqual(prev, detail) ? prev : detail\n );\n if (isEqual(detail, lastDetail)) {\n setUserClosedAside(false);\n }\n }}\n >\n <WrappedIcon lib=\"lucide\" icon=\"square-chevron-right\" />\n {toolTitle}\n </div>\n )}\n <div className={styles.main}>\n {job.messages?.map((message, index) =>\n message.role === \"tool\" ? 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={classNames(\n styles[\"message-part\"],\n sharedStyles[\"markdown-wrapper\"]\n )}\n content={part.text}\n />\n )}\n </React.Fragment>\n ))}\n </div>\n )\n )}\n </div>\n <div className={styles.content}>\n {toolMarkdownContent && (\n <div className={classNames(styles.markdown, sharedStyles.markdown)}>\n <EnhancedMarkdown\n className={sharedStyles[\"markdown-wrapper\"]}\n content={toolMarkdownContent}\n />\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 {files.length > 0 && <FileList files={files} />}\n </div>\n </div>\n </div>\n );\n}\n","import React, { useContext, useMemo, useState } from \"react\";\nimport classNames from \"classnames\";\nimport { isEqual } from \"lodash\";\nimport styles from \"./NodeChunk.module.css\";\nimport type {\n MessageChunk,\n MessageChunkOfActivity,\n MessageChunkOfFlow,\n} from \"../interfaces.js\";\nimport { NodeJob } from \"./NodeJob.js\";\nimport { WrappedIcon } from \"../../shared/bricks\";\nimport { getStateDisplay } from \"./getStateDisplay.js\";\nimport { TaskContext } from \"../../shared/TaskContext\";\nimport { ICON_UP } from \"../../shared/constants\";\nimport { StreamContext } from \"../StreamContext\";\nimport { K, t } from \"../i18n\";\n\nexport interface NodeChunkProps {\n chunk: MessageChunk;\n isSubTask?: boolean;\n}\n\nexport function NodeChunk({ chunk, isSubTask }: NodeChunkProps) {\n if (chunk.type === \"job\") {\n return <NodeJob job={chunk.job} isSubTask={isSubTask} />;\n }\n\n if (chunk.type === \"error\") {\n return <div className={styles.error}>{chunk.error}</div>;\n }\n\n return <NodeTask chunk={chunk} isSubTask={isSubTask} />;\n}\n\ninterface NodeTaskProps {\n chunk: MessageChunkOfFlow | MessageChunkOfActivity;\n isSubTask?: boolean;\n}\n\nfunction NodeTask({ chunk, isSubTask }: NodeTaskProps) {\n const { conversationState, setActiveDetail, setSubActiveDetail } =\n useContext(TaskContext);\n const { setUserClosedAside, lastDetail } = useContext(StreamContext);\n const [collapsed, setCollapsed] = useState(false);\n const { type, task } = chunk;\n\n const { className, icon } = useMemo(() => {\n return getStateDisplay(\n chunk.type === \"flow\" ? \"completed\" : task.state,\n conversationState\n );\n }, [chunk.type, conversationState, task.state]);\n\n return (\n <div className={classNames({ [styles.collapsed]: collapsed })}>\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}>\n {type === \"flow\"\n ? t(K.INITIATING_SERVICE_FLOW, { name: chunk.flow.name })\n : t(K.STARTING_SERVICE_FLOW_ACTIVITY, {\n name: chunk.activity.name,\n })}\n </div>\n <WrappedIcon className={styles.caret} {...ICON_UP} />\n </div>\n <div className={styles.body}>\n <div\n className={styles.tool}\n onClick={() => {\n const detail = {\n type: chunk.type,\n id: chunk.task.id,\n };\n (isSubTask ? setSubActiveDetail : setActiveDetail)((prev) =>\n isEqual(prev, detail) ? prev : detail\n );\n if (isEqual(detail, lastDetail)) {\n setUserClosedAside(false);\n }\n }}\n >\n <WrappedIcon lib=\"lucide\" icon=\"route\" />\n {type === \"flow\"\n ? t(K.INITIATING_SERVICE_FLOW, { name: chunk.flow.name })\n : t(K.STARTING_SERVICE_FLOW_ACTIVITY, {\n name: chunk.activity.name,\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]!./HumanInTheLoop.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]!./HumanInTheLoop.module.css\";\n export default content && content.locals ? content.locals : undefined;\n","import React from \"react\";\nimport { WrappedIcon } from \"../../shared/bricks\";\nimport type { Job } from \"../../shared/interfaces\";\nimport styles from \"./HumanInTheLoop.module.css\";\nimport { RequestHumanAction } from \"../../shared/RequestHumanAction/RequestHumanAction\";\nimport { K, t } from \"../i18n\";\n\nexport interface HumanInTheLoopProps {\n job: Job;\n}\n\nexport function HumanInTheLoop({ job }: HumanInTheLoopProps) {\n return (\n <div className={styles.hil}>\n <div className={styles.content}>\n <WrappedIcon lib=\"antd\" icon=\"exclamation-circle\" />\n {t(K.HIL_TIPS, { name: job.hil!.username })}\n </div>\n {job.requestHumanAction && (\n <div className={styles.actions}>\n <RequestHumanAction action={job.requestHumanAction} ui=\"chat\" />\n </div>\n )}\n </div>\n );\n}\n","import React, { useMemo } from \"react\";\nimport styles from \"./AssistantMessage.module.css\";\nimport {\n GENERAL_DONE_STATES,\n NON_WORKING_STATES,\n} from \"../../shared/constants.js\";\nimport type {\n ConversationState,\n Job,\n JobState,\n TaskState,\n} from \"../../shared/interfaces.js\";\nimport { WrappedIcon } from \"../../shared/bricks.js\";\nimport type { MessageChunk } from \"../interfaces\";\nimport { RequestHumanAction } from \"../../shared/RequestHumanAction/RequestHumanAction\";\nimport { NodeChunk } from \"../NodeChunk/NodeChunk\";\nimport { HumanInTheLoop } from \"../HumanInTheLoop/HumanInTheLoop\";\n\nexport interface AssistantMessageProps {\n chunks?: MessageChunk[];\n scopeState?: ConversationState | TaskState | JobState | undefined;\n isLatest?: boolean;\n isSubTask?: boolean;\n finished?: boolean;\n earlyFinished?: boolean;\n}\n\nconst EARLY_FINISHED_ERROR_CHUNK: MessageChunk = {\n type: \"error\",\n error:\n \"The conversation was marked as finished early due to an unexpected issue.\\nPlease refresh the page or try again later.\",\n};\n\nexport function AssistantMessage({\n chunks,\n scopeState,\n isLatest,\n isSubTask,\n finished,\n earlyFinished,\n}: AssistantMessageProps) {\n const [working, lastJob] = useMemo(() => {\n if (!chunks || chunks.length === 0) {\n return [isLatest && !NON_WORKING_STATES.includes(scopeState!), undefined];\n }\n\n const lastChunk = chunks[chunks.length - 1];\n let lastJob: Job | undefined;\n if (lastChunk) {\n switch (lastChunk.type) {\n case \"flow\":\n case \"activity\":\n lastJob = lastChunk.task.jobs[lastChunk.task.jobs.length - 1];\n break;\n case \"job\":\n lastJob = lastChunk.job;\n break;\n default:\n return [false, undefined];\n }\n }\n\n if (!isLatest || NON_WORKING_STATES.includes(scopeState!)) {\n return [false, lastJob];\n }\n for (const chunk of chunks) {\n switch (chunk.type) {\n case \"flow\":\n case \"activity\":\n if (chunk.task.jobs.some((job) => job.state === \"input-required\")) {\n return [false, lastJob];\n }\n break;\n case \"job\":\n if (chunk.job.state === \"input-required\") {\n return [false, lastJob];\n }\n }\n }\n if (lastJob && lastJob.state === \"working\" && lastJob.toolCall) {\n return [false, lastJob];\n }\n\n return [true, lastJob];\n }, [isLatest, chunks, scopeState]);\n\n return (\n <div className={styles.assistant}>\n <WrappedIcon\n lib=\"easyops\"\n category=\"image\"\n icon=\"elevo-avatar-png\"\n className={styles.avatar}\n />\n <div className={styles.body}>\n {chunks?.map((chunk, index) => (\n <NodeChunk key={index} chunk={chunk} isSubTask={isSubTask} />\n ))}\n {working && !finished && <div className={styles.texting}></div>}\n {isLatest &&\n lastJob &&\n !GENERAL_DONE_STATES.includes(scopeState) &&\n (lastJob.state === \"working\" || lastJob.state === \"input-required\") &&\n !lastJob.humanAction &&\n (lastJob.hil ? (\n <HumanInTheLoop job={lastJob} />\n ) : (\n lastJob.requestHumanAction && (\n <RequestHumanAction\n action={lastJob.requestHumanAction}\n ui=\"chat\"\n />\n )\n ))}\n {earlyFinished && <NodeChunk chunk={EARLY_FINISHED_ERROR_CHUNK} />}\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, `.scroll-down--st4A5sQ4{position:absolute;left:50%;bottom:136px;transform:translateX(-50%);width:32px;height:32px;font-size:12px}`, \"\"]);\n// Exports\n___CSS_LOADER_EXPORT___.locals = {\n\t\"scroll-down\": `scroll-down--st4A5sQ4`\n};\nexport default ___CSS_LOADER_EXPORT___;\n"],"names":["options","styleTagTransform","setAttributes","insert","domAPI","insertStyleElement","locals","undefined","useConversationStream","conversationAvailable","state","tasks","errors","flowMap","activityMap","showHumanActions","skipActivitySubTasks","useMemo","messages","lastDetail","chunks","jobMap","getFlatChunks","prevAssistantMessage","role","chunk","type","_job$messages","job","_job$messages2","toolCall","ignoreDetails","id","length","every","msg","push","content","flatMap","parts","map","part","text","join","cmd","mentionedAiEmployeeId","fromSkippedSubTask","files","filter","file","humanAction","task","shouldAppendEmptyMessage","DONE_STATES","includes","lastMessage","___CSS_LOADER_EXPORT___","module","UserMessage","_ref","React","className","styles","user","ReadableCommand","FileList","ui","useAutoScroll","contentAvailable","scrollContainerRef","scrollContentRef","detectScrolledUpRef","useRef","manualScrolledRef","scrollable","setScrollable","useState","useEffect","scrollContainer","current","contentContainer","handleScroll","scrollTop","clientHeight","scrollHeight","timer","addEventListener","observer","ResizeObserver","scrollTo","top","behavior","clearTimeout","setTimeout","observe","disconnect","removeEventListener","scrollToBottom","useCallback","K","NS","locales","en","SWITCH_TO_CANVAS","INITIATING_SERVICE_FLOW","STARTING_SERVICE_FLOW_ACTIVITY","HIL_TIPS","zh","t","i18n","getFixedT","StreamContext","createContext","setUserClosedAside","NodeView","size","setSize","handleSizeChange","value","classNames","view","large","CreatedView","onSizeChange","getStateDisplay","conversationState","completed","icon","lib","theme","prefix","working","spinning","failed","canceled","NodeJob","_toolCall$annotations","isSubTask","toolTitle","annotations","title","name","toolName","showToolCall","setActiveDetail","setSubActiveDetail","useContext","TaskContext","toolMarkdownContent","cmdbInstanceDetails","contents","instanceDetails","forEach","message","_part$data","data","_part$data2","Object","keys","outputSchema","properties","detail","collapsed","setCollapsed","showHeading","instruction","heading","onClick","prev","WrappedIcon","_extends","caret","ICON_UP","body","tool","isEqual","main","index","_message$parts","key","sharedStyles","markdown","partIndex","EnhancedMarkdown","box","CmdbInstanceDetail","generatedView","NodeChunk","error","NodeTask","_ref2","flow","activity","HumanInTheLoop","hil","username","requestHumanAction","actions","RequestHumanAction","action","EARLY_FINISHED_ERROR_CHUNK","AssistantMessage","scopeState","isLatest","finished","earlyFinished","lastJob","NON_WORKING_STATES","lastChunk","jobs","some","assistant","category","avatar","texting","GENERAL_DONE_STATES"],"sourceRoot":""}