@glodon-aiot/agent-cli-ui 3.20.2-alpha.1 → 3.22.2-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/es/index.mjs +4 -4
- package/dist/lib/index.js +1 -1
- package/package.json +4 -4
package/dist/es/index.mjs
CHANGED
|
@@ -4922,7 +4922,7 @@ const KI = bN((M, N) => {
|
|
|
4922
4922
|
})]
|
|
4923
4923
|
})
|
|
4924
4924
|
});
|
|
4925
|
-
}), Mg = "@glodon-aiot/agent-cli-ui", Ng = "3.
|
|
4925
|
+
}), Mg = "@glodon-aiot/agent-cli-ui", Ng = "3.22.2-alpha.2", eg = "./dist/es/index.mjs", jg = "./dist/lib/index.js", tg = "./dist/src/index.d.ts", ig = {
|
|
4926
4926
|
import: "./dist/es/index.mjs",
|
|
4927
4927
|
require: "./dist/lib/index.js",
|
|
4928
4928
|
types: "./dist/src/index.d.ts"
|
|
@@ -4944,9 +4944,9 @@ const KI = bN((M, N) => {
|
|
|
4944
4944
|
commit: "cz"
|
|
4945
4945
|
}, Tg = {
|
|
4946
4946
|
"@ant-design/icons": "^5.3.4",
|
|
4947
|
-
"@glodon-aiot/apis": "^3.
|
|
4948
|
-
"@glodon-aiot/bot-client-sdk": "^3.
|
|
4949
|
-
"@glodon-aiot/react-components": "^3.
|
|
4947
|
+
"@glodon-aiot/apis": "^3.22.2-alpha.2",
|
|
4948
|
+
"@glodon-aiot/bot-client-sdk": "^3.22.2-alpha.2",
|
|
4949
|
+
"@glodon-aiot/react-components": "^3.22.2-alpha.2",
|
|
4950
4950
|
"@matejmazur/react-mathjax": "^0.1.10",
|
|
4951
4951
|
"@react-pdf-viewer/core": "^3.12.0",
|
|
4952
4952
|
"@react-pdf-viewer/default-layout": "^3.12.0",
|
package/dist/lib/index.js
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
${t}`:t}if(N&&N.length>0){const D=N.filter(Boolean).map(z=>``).join(`
|
|
8
8
|
`);t=D?`${D}
|
|
9
9
|
${t}`:t}}return t},Hz=M=>{const N=Math.floor(M/3600),e=Math.floor(M%3600/60),j=M%60,t=D=>String(D).padStart(2,"0");return`${t(N)}:${t(e)}:${t(j)}`},Fz=g.forwardRef((M,N)=>{var Ct,Ot,Yt,xt,dt,wt,Et,Qt,ht,St,kt,mt,Ut,ft;const{application:e,docViewerUrl:j="",currentSession:t,onCreateSession:D,embeddingService:z,setCurrentSession:I,networkStatus:u,setNetworkStatus:y}=M,[T,s]=g.useState([]),[A,a]=g.useState(),[c,f]=g.useState(),Q=g.useRef(null),{service:W,agentClient:x,depId:U,footer:S,transform:o,defaultInput:b,onMessage:q,onHistoryLoad:jM,beforeMessageSend:O,bodyStyle:$,disabled:Y,features:C,popupContainer:v,icon:MM,sider:tM,mode:SM,silencedSeconds:JM}=g.useContext(BM),[oM,PM]=g.useState(!1),zM=g.useRef(T),VM=g.useRef(void 0),WM=g.useRef(new Set),[E,F]=g.useState(0),[m,CM]=g.useState([]),[bM,l]=g.useState([]),[J,B]=g.useState(0),[k,_]=g.useState(!1);g.useEffect(()=>{_(J>0)},[J]);const iM=g.useRef(null),[sM,lM]=g.useState([]),[UM,d]=g.useState(!1),[H,X]=g.useState(!1),[RM,nM]=g.useState(""),[wM,EM]=g.useState(),[fM,ZM]=g.useState({}),$M=g.useRef(null),JN=g.useRef(null),kM=g.useRef(null),[YM,MN]=g.useState(!1),[KM,Oe]=g.useState([]),[Ye,xe]=g.useState(!0),[aD,rD]=g.useState(!0),[jt,aN]=g.useState(!1),[zj,QN]=g.useState(!1),[tt,oD]=g.useState(!1),[gN,je]=g.useState(typeof(C==null?void 0:C.promptVariables)=="object"?C.promptVariables.default||[]:[]),[lD,CD]=g.useState(()=>{const L=typeof(C==null?void 0:C.knowledges)=="object"&&C.knowledges.default||void 0;if(L){if(Array.isArray(L)&&L.some(G=>Array.isArray(G.fileIds)&&G.fileIds.length===0))throw Error("fileIds cannot be an empty array");if(We(L)>kN)throw Error(`knowledges and fileIds total count cannot exceed ${kN}`)}return L}),[it,pN]=g.useState(!1),[Dt,te]=g.useState(!1),[OD,ie]=g.useState(typeof(C==null?void 0:C.connectNetwork)=="object"&&typeof(C==null?void 0:C.connectNetwork.default)=="boolean"?C.connectNetwork.default:!1),[zt,de]=g.useState(!1),[YD,hN]=g.useState(!1),[xD,dD]=g.useState(null),[we,bN]=g.useState(!1),[gt,It]=g.useState(!1),{isSwitchingToExistingSession:Tt,setIsSwitchingToExistingSession:Ee}=mj(),BN=g.useRef(null),[gj,wD]=g.useState("");g.useEffect(()=>{if(!JM)return;let L=Hz(JM);wD(L)},[JM]),g.useEffect(()=>{if(dD(t),t===null)hN(!1);else if(t===void 0)hN(!0);else{if(xD===null){if(Tt){hN(!0),Ee(!1);return}hN(!1);return}t.ready?hN(!1):hN(!0)}},[t,t==null?void 0:t.ready,Tt]),g.useEffect(()=>{var w,G;t&&(zM.current=[]),s([]);const L=Q.current;if(L&&L.scrollTo({top:0}),!((w=t==null?void 0:t.data)!=null&&w.id))return;if(QN(!1),aN(!1),(G=t.messages)!=null&&G.length){const NM=[...t.messages.filter(V=>V==null?void 0:V.messageId)].reverse();zM.current=[...NM],s([...NM]),hN(!1)}const r=p=>{var NM;(NM=t==null?void 0:t.data)!=null&&NM.id&&(zM.current=[...p].reverse(),s([...p].reverse()),!p||p.length<10?te(!1):te(!0),hN(!1),jM&&jM({applicationId:e.id,sessionId:t.data.id,histories:p}))};return t.addEventListener("history:loaded",r),()=>{zM.current=[],s([]),t==null||t.removeEventListener("history:loaded",r)}},[t]),g.useEffect(()=>{const L=()=>{var r;(r=t==null?void 0:t.data)!=null&&r.id&&(t.promptVariables&&je(t.promptVariables.sort((w,G)=>w.key.localeCompare(G.key))),t.knowledges&&CD(t.knowledges),y(t.netOpen))};return t==null||t.addEventListener("data:updated",L),()=>{t==null||t.removeEventListener("data:updated",L)}},[t]),g.useEffect(()=>{var r;if(!((r=t==null?void 0:t.data)!=null&&r.id))return;const L=w=>{var G;console.error(w.message,w.cause,"e.case"),n.notification.config({getContainer:()=>(v==null?void 0:v.current)||document.body,prefixCls:"gbot-notification"}),n.notification.error({message:((G=w.cause)==null?void 0:G.message)||w.message}),n.notification.config({getContainer:void 0,prefixCls:"gbot-notification"})};return t.addEventListener("error",L),()=>{t==null||t.removeEventListener("error",L)}},[t]);const ED=()=>{var w;if(!((w=t==null?void 0:t.data)!=null&&w.id)||!(e!=null&&e.id))return;const L=t.data.id,r=T[T.length-1];if(r&&r.isContext){NN("success","已开启新话题");return}else t.clear().then(()=>{const G=new ze("",L,R.IHistoryRole.System);G.isContext=!0,s([G,...T])})};g.useEffect(()=>{e!=null&&e.id&&(W==null||W.getRecommendQues(e.id).then(L=>{lM(L)}))},[U,e]);const ut=L=>DM(exports,null,function*(){var IM,vM;if(Y){NN("error","发送功能被禁用");return}const r=L||A;if(!(r!=null&&r.trim())){NN("error","请输入你想问的");return}if(!(gN==null?void 0:gN.every(GM=>!!(GM!=null&&GM.value))))if(o!=null&&o.promptVariables){NN("error","变量值不能为空");return}else console.error("变量值不能为空",gN==null?void 0:gN.map(GM=>!!(GM!=null&&GM.value)));if(zj){NN("error","正在回复中");return}if(oM){NN("error","等待初始化");return}if(!Ye){NN("error","正在解析文件");return}if(k){NN("error","正在上传图片");return}CM([]),l([]);const G=(IM=t==null?void 0:t.data)==null?void 0:IM.id;if(!G){if(we)return;bN(!0),D==null||D({netOpen:u?SN.OPEN:SN.CLOSE}).then(GM=>{var rM,rN;pN(!0),y(!!((rM=GM.data)!=null&&rM.netOpen)),ie(!!((rN=GM.data)!=null&&rN.enableNetOpen)),Ij(GM).then(()=>{I==null||I(GM),pN(!1),f(r)})}).catch(GM=>{bN(!1)});return}if(we)return;bN(!0),de(!0);const p=yj(r,bM,fM[G],(e==null?void 0:e.type)||0);let NM;try{O?NM=yield O==null?void 0:O({applicationId:e.id,sessionId:G,message:{content:p,sessionId:G,role:R.ChatMessageRole.User,files:fM[G]}}):NM=!0}catch(GM){NM=!1}if(de(!1),NM===!1){bN(!1);return}let V=r;typeof NM=="object"&&(V=NM.content||r);const eM=yield(()=>new Promise(GM=>{je(rM=>(GM(rM),rM))}))();if(!(yield t.setPromptVariables(eM))){bN(!1);return}((vM=fM[G])==null?void 0:vM.length)>0?QD(V):Tj(V)}),Ij=L=>new Promise((r,w)=>DM(exports,null,function*(){const NM=(L==null?void 0:L.promptVariables).filter(V=>V.type?!((V.type===R.PromptVariableType.User||V.type===void 0)&&V.key==="query")&&!((V.type===R.PromptVariableType.System||V.type===void 0)&&V.key==="datetime"):V.key!=="query").map(V=>{var eM;const dM=(eM=gN.find(pM=>pM.key===V.key&&pM.type===V.type))==null?void 0:eM.value;return V.value=dM||"",V});je(NM.sort((V,dM)=>V.key.localeCompare(dM.key))),yield L==null?void 0:L.setPromptVariables(NM).catch(V=>{console.error(V),NN("error",V.message)}),r()})),QD=L=>{var p,NM,V;if(xe(!1),!((p=t==null?void 0:t.data)!=null&&p.id)||!(e!=null&&e.id))return;const r=((NM=t.data)==null?void 0:NM.id)||"";let w=[],G=new Set;(V=fM[r])==null||V.forEach(dM=>{G.has(dM.id)||(w.push(dM),G.add(dM.id))}),xe(!0),Tj(L,w)};g.useEffect(()=>{if(!c||!t)return;const L=c,r=()=>DM(exports,null,function*(){de(!0);const w=yj(L,bM,fM[t.id],(e==null?void 0:e.type)||0);let G;try{O?G=yield O==null?void 0:O({applicationId:e.id,sessionId:t.id,message:{content:w,sessionId:t.id,role:R.ChatMessageRole.User,files:fM[t.id]}}):G=!0}catch(p){G=!1}if(de(!1),G===!1){bN(!1);return}Tj(L),f(void 0)});return t.ready?r():t.addEventListener("ready",r,!0),()=>{t==null||t.removeEventListener("ready",r)}},[c,t]);const Tj=(L,r)=>DM(exports,null,function*(){var IM,vM,GM;const w=(IM=t==null?void 0:t.data)==null?void 0:IM.id;if(!w)return;QN(!0),aN(!0);const G=yj(L,bM,r,(e==null?void 0:e.type)||0);let p;if(e.type===R.ApplicationTypes.Agent)p=void 0;else if(e.type===R.ApplicationTypes.Dialog&&((vM=e.arrange)!=null&&vM.length)&&e.arrange[0].visionOpen){const rM=bM&&bM.length?bM.filter(Boolean):[];p=rM.length?rM:void 0}else p=void 0;const NM=new ze(G,w,R.IHistoryRole.User,r,p);a(void 0),EM(void 0),zM.current=[NM,...T],s(zM.current),e.id&&q&&q({applicationId:e.id,sessionId:w,message:NM});const V=new ze("",w,R.IHistoryRole.System);V.isWaiting=!0,zM.current=[V,...zM.current],s(zM.current);const dM=(r==null?void 0:r.map(rM=>rM.id))||[],eM={stream:Te.configuration.stream,referenceFirst:!1};if(o!=null&&o.promptVariables){const rM=gN==null?void 0:gN.reduce((rN,HN)=>(rN[HN.key]=HN.value,rN),{});eM.formatValues=rM}if(o!=null&&o.knowledges){const rM=lD;eM.knowledges=rM}const pM={text:G,fileIds:dM,files:r};p&&p.length>0&&(pM.imageContent=p),t.ready||(yield new Promise(rM=>{t.addEventListener("ready",()=>rM(),!0)})),yield t.send(pM,eM),ZM({[w]:[]}),(GM=$M.current)==null||GM.update(),CM([]),l([]),bN(!1)});g.useEffect(()=>{var dM;const L=(dM=t==null?void 0:t.data)==null?void 0:dM.id;if(!L)return;let r=null,w=null;const G=()=>{r=null,w&&(s([w,...zM.current]),w=null)},p=()=>{r!==null&&(cancelAnimationFrame(r),r=null,w=null)},NM=eM=>{if(!eM.sessionId||eM.sessionId&&eM.sessionId!==VM.current||eM.role===R.IHistoryRole.User)return;if(eM.index===-1&&eM.code!==200&&eM.code!==11915&&eM.code!==11916&&(p(),aN(!1),QN(!1),zM.current=zM.current.filter(vM=>!vM.isWaiting),s([...zM.current]),zM.current=[...zM.current],eM.content)){n.notification.config({getContainer:()=>(v==null?void 0:v.current)||document.body,prefixCls:"gbot-notification"}),n.notification.error({message:eM.content}),n.notification.config({getContainer:void 0,prefixCls:"gbot-notification"});return}const pM=eM.actions||[],IM=new ze(eM.content,L,R.IHistoryRole.Robot);if(IM.messageId=eM.messageId||ne.v4(),IM.reasoningContent=eM.reasoningContent,IM.searchReference=eM.searchReference,IM.thinkingSecs=eM.thinkingSecs,IM.thinkingStatus=eM.thinkingStatus,IM.actions=pM,IM.isLoading=!0,IM.searchingStatus=eM.searchingStatus,zM.current=zM.current.filter(vM=>!vM.isWaiting).filter(vM=>!vM.isReplying),eM.index===void 0){w=IM,r===null&&(r=requestAnimationFrame(G));return}if(p(),(eM.code===11915||eM.code===11916)&&(aN(!1),QN(!1),IM.isLoading=!1,IM.content=eM.code===11916?"尊敬的用户您好,让我们换个话题再聊聊吧。":"请您换个问题问我吧~",IM.isSensitive=!0,s([IM,...zM.current])),eM.index===-2&&(aN(!1),QN(!1),IM.isLoading=!1,IM.content="回答已中止~",IM.isSuspend=!0,s([IM,...zM.current])),eM.index===-1&&(aN(!1),QN(!1),IM.isLoading=!1,IM.reference=eM.reference,s([IM,...zM.current]),e.id)){const vM=IM.messageId;WM.current.has(vM)||(WM.current.add(vM),q&&q({applicationId:e.id,sessionId:L,message:IM}))}eM.index===-3&&(aN(!1),QN(!1),IM.isLoading=!1,IM.reference=eM.reference,IM.relatedQuesion=eM.relatedQuesion,s([IM,...zM.current]))},V=()=>{t.addEventListener("message:updated",NM)};return t.ready?t.addEventListener("message:updated",NM):t.addEventListener("ready",V),()=>{p(),t==null||t.removeEventListener("message:updated",NM),t==null||t.removeEventListener("ready",V)}},[t]),g.useEffect(()=>{if(!t){PM(!1);return}const L=r=>{PM(r)};return PM(t.frozen),t.addEventListener("frozen",L),()=>{t==null||t.removeEventListener("frozen",L)}},[t]),g.useEffect(()=>{if(!x)return;const L=x.questionContextMaxLength||4e3;F(L)},[x,W]),g.useEffect(()=>{b&&EM(b.text)},[b]);const NN=(L,r,w)=>{iN(v,()=>{n.message.open({type:L,content:r,key:w})})},st=L=>{const r=L.size;return r<=0?(NN("error","该文件为空,请重新上传"),!1):r>Aj*Ge?(NN("error",`图片须小于${Aj}M`),!1):(CM(w=>w.length>=GN?(NN("warning",`图片最多上传${GN}张`),w):[...w,L]),!1)},hD=()=>{var L;return(e.type===R.ApplicationTypes.Agent&&(o==null?void 0:o.imageUpload)||e.type===R.ApplicationTypes.Dialog&&((L=e.arrange)==null?void 0:L.length)&&!!e.arrange[0].visionOpen&&(o==null?void 0:o.imageUpload))&&!Y},SD=()=>!!z&&(o==null?void 0:o.fileUpload)&&(e==null?void 0:e.id)&&!Y,nt=L=>{var vM,GM;const r=Array.from(L||[]).filter(Boolean);if(!r.length)return;const w=hD(),G=SD(),p=[],NM=[];let V=0,dM=0,eM=0;r.forEach(rM=>{var pt,bt,vt;if(((pt=rM.type)==null?void 0:pt.startsWith("image/"))||!!_t(rM.name)){w?p.push(rM):V++;return}const HN=(vt=(bt=rM.name)==null?void 0:bt.split(".").pop())==null?void 0:vt.toLowerCase();if(ci.includes(rM.type)||["pdf","doc","docx"].includes(HN||"")){G?NM.push(rM):dM++;return}eM++});const pM=[],IM=V+dM+eM;if(!G&&!w)IM&&pM.push(`当前不支持上传文件/图片,已忽略${IM}个文件`);else if(G&&!w){const rM=V+eM;rM&&pM.push(`仅支持上传 .doc/.docx/.pdf 文件,已忽略${rM}个其他类型文件`)}else if(!G&&w){const rM=dM+eM;rM&&pM.push(`仅支持上传图片(.jpg/.jpeg/.png/.bmp),已忽略${rM}个其他类型文件`)}else eM&&pM.push(`存在不支持的文件类型,已忽略${eM}个文件`);if(pM.length&&NN("warning",pM.join(";"),"precheck-warn"),p.length){const rM=Math.max(0,GN-m.length),rN=p.slice(0,rM);rN.forEach(HN=>st(HN)),p.length>rN.length&&NN("warning",`最多上传${GN}张图片`)}NM.length&&((GM=(vM=$M.current)==null?void 0:vM.appendFiles)==null||GM.call(vM,NM))},Lt=L=>{var w;const r=(w=L.clipboardData)==null?void 0:w.files;r&&r.length&&(L.preventDefault(),L.stopPropagation(),nt(r))},At=L=>{L.preventDefault()},yt=L=>{var w;L.preventDefault(),L.stopPropagation();const r=(w=L.dataTransfer)==null?void 0:w.files;r&&r.length&&nt(r)},ct=()=>DM(exports,null,function*(){var L;return(L=t==null?void 0:t.data)!=null&&L.id?t:(BN.current||(BN.current=new Promise((r,w)=>{pN(!0),D==null||D({netOpen:u?SN.OPEN:SN.CLOSE}).then(G=>{var p,NM;I==null||I(G),pN(!1),y(!!((p=G.data)!=null&&p.netOpen)),ie(!!((NM=G.data)!=null&&NM.enableNetOpen)),Ij(G),r(G)}).catch(G=>{BN.current=null,w(G)})})),BN.current)}),kD=L=>DM(exports,null,function*(){const r=yield ct();return mD(r,L)}),mD=(L,r)=>{const w=_t(r.name);return new Promise(G=>{var NM;const p={files:[`${ne.v4()}.${w}`],isv:"minio",knowledgeId:((NM=L.data)==null?void 0:NM.id)||"",type:1};W==null||W.postTicket(p).then(V=>{W.uploadMinioFile(V.minio,r).then(()=>{var IM,vM;const dM=(IM=V.minio.endpoints)==null?void 0:IM[0],eM=V.minio.bucket,pM=(vM=V.minio.fileKeys)==null?void 0:vM[0];G(`${V.minio.useSSL?"https:":location.protocol}//${dM}/${eM}/${pM}`)}).catch(()=>{})}).catch(()=>{})})};g.useEffect(()=>{const L=Q.current;L&&!tt&&L.scrollTo({top:L.scrollHeight})},[T]);const at=(L,r)=>new Promise(w=>{if(!r.file.url||!(e!=null&&e.id))return w();const G=XM(gM({},r.file),{type:1});W==null||W.postApplicationIdSessionKnowledgeSessionFile(e==null?void 0:e.id,L,G).finally(()=>{var p;(p=$M.current)==null||p.update().finally(w)})}),UD=()=>{var L;(L=t==null?void 0:t.data)!=null&&L.id&&(aN(!1),t.suspend())},fD=L=>{const r=Q.current;r&&setTimeout(()=>{r.scrollTo({top:r.scrollHeight,behavior:L==null?void 0:L.behavior})},L==null?void 0:L.ms)},pD=()=>{if(!Q.current)return;const L=Q.current.scrollTop<=-80;oD(L)},bD=RN.useMemoizedFn(L=>{var r,w;(r=iM.current)==null||r.update(L),(w=iM.current)==null||w.focus()}),vD=RN.useMemoizedFn(L=>{ut(L)}),GD=RN.useMemoizedFn(()=>{var r;if(!((r=t==null?void 0:t.data)!=null&&r.id))return;zM.current=[...T.slice(1,T.length)],s(zM.current);const L=new ze("",t.data.id,R.IHistoryRole.System);L.isWaiting=!0,zM.current=[L,...zM.current],s(zM.current),QN(!0),aN(!0),t.answerAgain()});g.useEffect(()=>{var L,r;VM.current=(L=t==null?void 0:t.data)==null?void 0:L.id,!it&&((r=kM.current)==null||r.clear())},[t]);const PD=()=>{var w;if(!((w=t==null?void 0:t.data)!=null&&w.id))return;const r=T[T.length-1].messageTime;t.fetchMessages({endTime:r,pageSize:$t}).then(G=>{const p=G||[];if(!p||!(p!=null&&p.length)){te(!1);return}p.length<10?te(!1):te(!0),s([...T,...p.reverse()])})},WD=L=>DM(exports,null,function*(){var r,w;if(!((r=t==null?void 0:t.data)!=null&&r.id))y(L);else{if(yield t.setNetOpen(L),!((w=t.data)!=null&&w.id))return;y(L)}}),uj=()=>DM(exports,null,function*(){t?t.fetchData().then(L=>{var r;(r=t==null?void 0:t.data)!=null&&r.id&&(y(L.netOpen),ie(L.enableNetOpen))}):(y(typeof(C==null?void 0:C.connectNetwork)=="object"&&typeof(C==null?void 0:C.connectNetwork.default)=="boolean"?C.connectNetwork.default:!1),ie(e.arrange[0].enableNetOpen))});g.useEffect(()=>{uj()},[t]),g.useEffect(()=>{let L=null,r=null;const w=()=>{var pM,IM;if(!Q.current)return;const p=document.getElementById("chat-main"),NM=(pM=Q.current)==null?void 0:pM.querySelector(".infinite-scroll-component__outerdiv"),V=(IM=Q.current)==null?void 0:IM.querySelector(".infinite-scroll-component");if(!NM||!V||!p)return;const dM=p.offsetHeight;if(V.offsetHeight<=dM){if(NM.style.height==="100%")return;NM.style.height="100%"}else{if(NM.style.height==="auto")return;NM.style.height="auto"}},G=()=>{var V;if(typeof ResizeObserver=="undefined"||!Q.current)return;const p=document.getElementById("chat-main"),NM=(V=Q.current)==null?void 0:V.querySelector(".infinite-scroll-component");!NM||!p||(r=new ResizeObserver(()=>{w()}),r.observe(NM),r.observe(p))};return L=requestAnimationFrame(()=>{w(),G()}),()=>{L!==null&&cancelAnimationFrame(L),r==null||r.disconnect()}},[T]),g.useEffect(()=>{if(t)return;const L=()=>{const G=((x==null?void 0:x.promptVariables)||[]).filter(p=>p.type?!(p.type===R.PromptVariableType.User&&p.key==="query")&&!(p.type===R.PromptVariableType.System&&p.key==="datetime")&&p.status===1:p.key!=="query"&&p.status===1).map((p,NM)=>{var dM,eM;let V="";return typeof(C==null?void 0:C.promptVariables)=="object"&&(V=((eM=(dM=C.promptVariables.default)==null?void 0:dM.find(pM=>pM.key===p.key&&pM.type===p.type))==null?void 0:eM.value)||""),{id:NM+"",key:p.key,name:p.name,value:V,type:p.type}});je([...G].sort((p,NM)=>p.key.localeCompare(NM.key)))};return x!=null&&x.ready?L():x==null||x.addEventListener("ready",L),()=>{x==null||x.removeEventListener("ready",L)}},[t,x,C==null?void 0:C.promptVariables]);const rt=()=>D==null?void 0:D({netOpen:u?SN.OPEN:SN.CLOSE}).then(L=>{var r,w;return I==null||I(L),pN(!1),y(!!((r=L.data)!=null&&r.netOpen)),ie(!!((w=L.data)!=null&&w.enableNetOpen)),Ij(L),L}),ot=!!T.length,lt=g.useMemo(()=>{var L;return e.arrange&&((L=e.arrange[0])!=null&&L.openingContent)?i.jsx(ai,{application:e,history:{role:1,content:e.arrange[0].openingContent,code:200,messageId:"opening-message",sessionId:"",reference:[],searchReference:[],messageTime:HM(Date.now()).format("YYYY-MM-DD HH:mm:ss"),actions:[],isLoading:!1},actions:ot,markdown:C==null?void 0:C.markdown}):null},[e==null?void 0:e.arrange,ot]);return g.useImperativeHandle(N,()=>({getCurrentInputText:()=>{var L;return(L=iM.current)==null?void 0:L.getCurrentText()}})),g.useEffect(()=>{var r;const L=(r=t==null?void 0:t.data)==null?void 0:r.id;L&&ZM(w=>XM(gM({},w),{[L]:[]}))},[(Ct=t==null?void 0:t.data)==null?void 0:Ct.id]),i.jsxs("div",{className:"agent-chat",children:[YD?i.jsx("div",{className:"session-loading",children:i.jsx(n.Spin,{})}):i.jsxs(i.Fragment,{children:[(o==null?void 0:o.promptVariables)&&i.jsx(Ci,{ref:JN,appId:e.id,currentSession:t,promptVariables:gN,setPromptVariables:je,setCurrentSession:I}),i.jsxs("div",{className:"chat-main",id:"chat-main",style:$,children:[i.jsx("div",{className:"chat-main-wrapper",id:"scrollableDiv",style:{height:"100%",overflowY:"auto",display:"flex",flexDirection:"column-reverse"},ref:Q,onScroll:pD,children:(Ot=t==null?void 0:t.data)!=null&&Ot.id&&(T!=null&&T.length)?i.jsxs(FD,{dataLength:T.length,next:PD,style:{display:"flex",flexDirection:"column-reverse",overflowX:"hidden"},inverse:!0,endMessage:T.length>$t&&((Yt=Q.current)!=null&&Yt.scrollTop)&&((xt=Q.current)==null?void 0:xt.scrollTop)<-10?i.jsx(n.Divider,{plain:!0,children:"没有更多数据了"}):null,hasMore:Dt,loader:i.jsx("div",{style:{height:"50px",textAlign:"center",overflow:"hidden"},children:i.jsx(n.Spin,{})}),scrollableTarget:"scrollableDiv",children:[T.map((L,r)=>i.jsx(Bz,{application:e,currentSession:t,history:L,docViewerUrl:j,isLastHistory:r===0,onRelatedClick:vD,onAgainClick:GD,onEditClick:bD,markdown:C==null?void 0:C.markdown},L.messageId+r)),!Dt&<]}):i.jsxs("div",{className:"main-empty",children:[(C==null?void 0:C.greeting)!==!1&&i.jsx(dz,{text:C!=null&&C.greeting&&typeof C.greeting=="object"&&C.greeting.text!==void 0?C.greeting.text:(dt=e.arrange)!=null&&dt.length&&((wt=e.arrange[0])!=null&&wt.greetings)?e.arrange[0].greetings:Xt.text,icon:C===void 0||C.greeting===!0||((Et=C.greeting)==null?void 0:Et.icon)===void 0?MM||Xt.icon:C.greeting.icon,children:!!sM.length&&(((C==null?void 0:C.greeting)===void 0||(C==null?void 0:C.greeting))===!0||typeof(C==null?void 0:C.greeting)=="object"&&C.greeting.questions!==!1)&&i.jsx(oi,{ref:kM,sid:(Qt=t==null?void 0:t.data)==null?void 0:Qt.id,isRecommendClearing:UM,data:sM,layoutBreakpoints:typeof(C==null?void 0:C.greeting)=="object"?C.greeting.layoutBreakpoints:void 0,onItemClick:L=>{var w,G,p;if(a(L==null?void 0:L.question),EM(L==null?void 0:L.question),UM)return;L!=null&&L.id&&d(!0);const r=(w=t==null?void 0:t.data)==null?void 0:w.id;o!=null&&o.fileUpload?(p=(G=$M.current)==null?void 0:G.clear())==null||p.then(()=>{var NM,V;L!=null&&L.id&&(r?(NM=at(r,L))==null||NM.finally(()=>{d(!1)}):(d(!1),pN(!0),(V=rt())==null||V.then(dM=>{var eM;(eM=at(dM.id,L))==null||eM.finally(()=>{d(!1)})})))}):r?d(!1):(d(!1),pN(!0),rt())}})}),lt]})}),jt&&i.jsx("div",{className:"session-stop",children:i.jsx(n.Button,{type:"primary",style:{background:"white"},ghost:!0,size:"small",icon:i.jsx(uM,{type:"icon-zantinghuida",style:{fontSize:16}}),onClick:()=>UD(),children:"停止回答"})}),tt&&(T==null?void 0:T.length)>0&&i.jsx("div",{className:"back-bottom",children:i.jsx(n.Button,{size:"small",onClick:()=>fD({behavior:"smooth"}),type:"link",icon:i.jsx(uM,{type:"icon-yijianhuidaodibu",style:{fontSize:24}})})})]}),i.jsx("div",{className:"chat-footer",children:i.jsxs("div",{className:"chat-footer-input",children:[m.length>0&&i.jsx("div",{className:"input-files",children:m.map((L,r)=>i.jsx(Oz,{className:"thumb-40",file:L,actions:{upload:w=>DM(exports,null,function*(){B(G=>G+1);try{return yield kD(w)}finally{B(G=>Math.max(0,G-1))}}),remove:()=>{CM(w=>w.filter((G,p)=>p!==r)),l(w=>w.filter((G,p)=>p!==r))}},onUrlChange:w=>{l(G=>{const p=[...G];return p[r]=w,p})}},r))}),i.jsxs("div",{className:"footer-upload-action-wrapper",children:[i.jsxs(n.Space,{className:"footer-upload-action",onClick:L=>L.preventDefault(),children:[i.jsxs(n.Space,{children:[(e.type===R.ApplicationTypes.Agent&&(o==null?void 0:o.imageUpload)||e.type===R.ApplicationTypes.Dialog&&((ht=e.arrange)==null?void 0:ht.length)&&!!e.arrange[0].visionOpen&&(o==null?void 0:o.imageUpload))&&i.jsx(n.Upload,{multiple:!0,disabled:m.length>=GN||Y,accept:".jpg, .png, .jpeg,.bmp",listType:"picture-card",beforeUpload:st,className:"footer-upload-picture",showUploadList:!1,children:m.length<GN?i.jsx(n.Tooltip,{placement:"topLeft",overlayClassName:"footer-upload-tooltip",title:i.jsx("div",{children:`支持上传.jpg .png .jpeg
|
|
10
|
-
.bmp格式的图片数据,单文件最大${Aj}M,最多${GN}张`}),children:i.jsx(n.Button,{type:"text",className:"camera-out-btn",style:{width:"22px",position:"relative",bottom:"-2px"},icon:i.jsx(uM,{type:"icon-shangchuantupian",className:"icon-tianjia",style:{fontSize:"22px"}})})}):i.jsx(n.Button,{type:"text",className:"camera-out-btn",style:{width:"22px",position:"relative",bottom:"-2px"},disabled:!0,icon:i.jsx(uM,{type:"icon-shangchuantupian",className:"icon-tianjia",style:{fontSize:"22px"}})})}),z&&(o!=null&&o.fileUpload)&&(e!=null&&e.id)?i.jsx(li,{appId:e==null?void 0:e.id,ref:$M,isFirstSession:it,docViewerUrl:j,onStatusChange:L=>DM(exports,null,function*(){L!=="process"?(xe(!0),uj()):xe(!1)}),createSession:()=>ct().then(L=>{var w;return((w=L.data)==null?void 0:w.id)||""}),sid:(St=t==null?void 0:t.data)==null?void 0:St.id,disabled:zj||Y,afterFileAdd:(L,r)=>{r&&ZM(w=>{const G=w[r]||[];return{[r]:[...G,L]}})},afterFileDelete:L=>{var w;const r=(w=t==null?void 0:t.data)==null?void 0:w.id;r&&ZM(G=>{const p=G[r]||[];return{[r]:p.filter(NM=>NM.id!==L)}})},onFileListChange:L=>{Oe(L)},shouldContinue:aD,afterFilesClear:()=>{var r;const L=(r=t==null?void 0:t.data)==null?void 0:r.id;L&&(ZM({[L]:[]}),uj())}}):null,(o==null?void 0:o.prompt)&&(e==null?void 0:e.id)&&i.jsx(Jz,{appId:e.id,list:[],search:H?RM:"",onPromptSelect:L=>{EM(L.context),a(L.context)},disabled:Y})]}),i.jsxs(n.Space,{children:[(o==null?void 0:o.connectNetwork)&&e.type===R.ApplicationTypes.Dialog&&((kt=e.arrange)==null?void 0:kt.length)&&!!e.arrange[0].enableNetOpen&&i.jsx(Gz,{sessionId:(mt=t==null?void 0:t.data)==null?void 0:mt.id,netStatus:u,enable:typeof(C==null?void 0:C.connectNetwork)=="object"&&typeof(C==null?void 0:C.connectNetwork.diabled)=="boolean"?!(C!=null&&C.connectNetwork.diabled):OD,disabledTip:t?void 0:"网络访问已被禁用",onNetStatusChange:L=>{WD(L)}}),(o==null?void 0:o.sessionList)&&i.jsx(fz,{currentSessionId:(Ut=t==null?void 0:t.data)==null?void 0:Ut.id,onSessionChange:(L,r)=>{EM(void 0),Ee(!0),I==null||I(r)},disabled:Y}),tM&&SM==="float"&&i.jsx("div",{className:"session-history-drawer-component",children:i.jsx(n.Popover,{placement:"topRight",showArrow:!1,overlayClassName:"session-history-overlay",overlayStyle:{padding:"4px"},getPopupContainer:L=>L.parentNode,content:"会话历史记录",children:i.jsx(n.Button,{className:"history-overlay-action",disabled:Y,type:"text",icon:i.jsx(uM,{type:"icon-lishijilu",style:{fontSize:24}}),onClick:()=>It(!0)})})}),(o==null?void 0:o.sessionOpen)&&i.jsx(n.Button,{icon:i.jsx(xM.PlusOutlined,{}),className:"add-btn",type:"primary",disabled:jt||!t||!T.length||Y,onClick:()=>{var L,r;Ee(!1),I==null||I(null),BN.current=null,y(!1),(L=JN.current)==null||L.clear(),(r=kM.current)==null||r.clear()},children:"新会话"})]})]}),!!gj&&i.jsx("div",{className:"remainingSeconds-mark"})]}),i.jsxs("div",{className:"footer-textarea",onPaste:Lt,onPasteCapture:Lt,onDrop:yt,onDropCapture:yt,onDragOver:At,onDragOverCapture:At,children:[i.jsx(ri,{ref:iM,maxLength:E,text:wM,networkStatus:!1,loading:zt||we,disabled:oM||k||Y||zt||we,onTextSend:ut,onChange:(L,r)=>{EM(L);const w=r.getText().replace(/[\n\s]+$/,"");a(w),nM(w),H||X(!0)},clearAction:i.jsx(n.Space,{size:0,children:i.jsx(n.Button,{type:"link",disabled:zj||Y,ghost:!0,icon:i.jsx(uM,{style:{fontSize:22},type:"icon-qingchujiyi"}),onClick:()=>ED()})})}),!!gj&&i.jsxs("div",{className:"remainingSeconds-time",children:["您之前对话触发敏感词拦截,当前处于禁言状态,暂时无法发送消息,剩余禁言时长",gj]})]})]})}),i.jsx(Ez,{tips:S}),YM&&i.jsx(Sz,{isvisible:YM,files:KM,sessionId:(ft=t==null?void 0:t.data)==null?void 0:ft.id,onClose:L=>{MN(!1),rD(!1)}})]}),gt&&i.jsx(vz,{currentSession:t,application:e,networkStatus:u,setCurrentSession:I,disabled:Y,isSessionHistoryVisible:gt,setIsSessionHistoryVisible:It,onSessionChange:L=>{Ee(!0)}})]})});const xi=M=>{const{disabled:N,checkedValues:e,currKnowledgeList:j,selectCount:t,onSelectChange:D}=M,[z,I]=g.useState(!1),u=i.jsx(n.Checkbox.Group,{style:{width:"100%"},onChange:D,value:e,disabled:N,children:i.jsx(n.Row,{gutter:[20,12],children:j==null?void 0:j.map(T=>i.jsx(n.Col,{span:24,children:i.jsx(n.Checkbox,{value:T.id,children:T.name})},T.id))})}),y=T=>{I(T)};return i.jsx("div",{className:"knowledge-select",style:{borderColor:z?"#9C24F2":"#84868C"},children:i.jsx(n.Popover,{className:"select-popover",placement:"bottomRight",title:null,content:u,trigger:"click",overlayStyle:{width:280},onOpenChange:y,getPopupContainer:T=>T.parentNode,children:i.jsxs("div",{className:"",onClick:T=>T.preventDefault(),children:[i.jsx(uM,{className:"select-icon",type:"icon-open"}),i.jsx("span",{className:"title",children:"参考知识库"}),i.jsxs("span",{className:"content",children:["已选 ",t," 个"]})]})})})},Vz=M=>{var Q,W;const{currentSession:N,application:e,setCheckKnowledges:j}=M,{mode:t,transform:D,features:z}=g.useContext(BM),[I,u]=g.useState([]),[y,T]=g.useState(typeof(z==null?void 0:z.knowledges)=="object"?((Q=z.knowledges.default)==null?void 0:Q.map(x=>x.id))||[]:[]),[s,A]=g.useState(0),[a,c]=g.useState(!1);g.useEffect(()=>{if(!(e!=null&&e.id))return;const x=e.arrange;if(!(x!=null&&x.length))return;const S=x[0].knowledges||[];u(S);const o=typeof(z==null?void 0:z.knowledges)=="object"&&z.knowledges.default||S;if(Array.isArray(o)&&o.some(O=>Array.isArray(O.fileIds)&&O.fileIds.length===0))throw Error("fileIds cannot be an empty array");if(We(o||[])>kN)throw Error(`knowledges and fileIds total count cannot exceed ${kN}`);if(!N){T(o.map(jM=>jM.id)),A(o.length),j==null||j(o);return}const q=()=>{const jM=N.knowledges||o;A(jM.length);const O=jM.map($=>$.id);T(O)};return q(),N.addEventListener("data:updated",q),()=>{N==null||N.removeEventListener("data:updated",q)}},[e,N]),g.useEffect(()=>{var U;if(!a||(c(!1),!(e!=null&&e.id)))return;const x=[];y==null||y.map(S=>{const o=I==null?void 0:I.find(b=>b.id===S);x.push(o)}),(U=N==null?void 0:N.data)!=null&&U.id&&N.setKnowledges(x)},[a]);const f=x=>{c(!0),T(x);const U=[];x==null||x.map(S=>{const o=I==null?void 0:I.find(b=>b.id===S);U.push(o)}),j==null||j(U),A(x.length)};return i.jsxs("div",{className:"chat-header",children:[i.jsxs(n.Space,{className:"header-title",children:[t==="inlay"&&((W=N==null?void 0:N.data)==null?void 0:W.name),t==="float"&&(e==null?void 0:e.name)]}),(D==null?void 0:D.knowledges)&&I.length!==0&&i.jsx(xi,{disabled:typeof(z==null?void 0:z.knowledges)=="object"&&(z==null?void 0:z.knowledges.diabled)||!1,checkedValues:y,currKnowledgeList:I,selectCount:s,onSelectChange:f})]})};const Xz=g.forwardRef((M,N)=>{const{sessionId:e,appId:j,docViewerUrl:t}=M,[D,z]=g.useState(),{showHeader:I,agentClient:u,sider:y,onSessionLoad:T,features:s,mode:A}=g.useContext(BM),[a,c]=g.useState(),f=g.useRef(null),[Q,W]=g.useState(""),[x,U]=g.useState(),S=g.useRef(null),[o,b]=g.useState(!1);g.useState([]);const{setIsSwitchingToExistingSession:q}=mj();g.useEffect(()=>{var O;b(D?!!((O=D.data)!=null&&O.netOpen):typeof(s==null?void 0:s.connectNetwork)=="object"&&typeof(s==null?void 0:s.connectNetwork.default)=="boolean"?s.connectNetwork.default:!1)},[D]),g.useEffect(()=>{const O=()=>DM(exports,null,function*(){const $=u==null?void 0:u.application;if(!($!=null&&$.id))return;const Y=$==null?void 0:$.arrange;if(!(Y!=null&&Y.length))return;const v=Y[0].embeddingService;W(v),c($)});if(u!=null&&u.ready){O();return}return u==null||u.addEventListener("ready",()=>O()),()=>{u==null||u.removeEventListener("ready",O)}},[u]),g.useEffect(()=>{u&&e&&(u.ready?u==null||u.getSessions().then(O=>DM(exports,null,function*(){z==null||z(O.find($=>$.id===e))})):u.addEventListener("ready",()=>DM(exports,null,function*(){u==null||u.getSessions().then(O=>DM(exports,null,function*(){z==null||z(O.find($=>$.id===e))}))}),!0))},[u,e]),g.useEffect(()=>{if(!D){T&&T({applicationId:j,sessionId:"",session:null,sessionInstance:null});return}D.data&&T&&T({applicationId:j,sessionId:D.data.id,session:D.data,sessionInstance:D}),D.addEventListener("data:loaded",()=>{D!=null&&D.data&&T&&T({applicationId:j,sessionId:D.data.id,session:D.data,sessionInstance:D})},!0)},[D]);const jM=O=>{var $;return($=f.current)==null?void 0:$.create(XM(gM({},O),{knowledges:x}))};return g.useImperativeHandle(N,()=>({createSession:O=>jM(O),getSessionList:()=>{var $;const O=(($=f.current)==null?void 0:$.list())||[];return Promise.resolve(O)},getCurrentInputText:()=>{var O;return(O=S.current)==null?void 0:O.getCurrentInputText()}})),i.jsx("div",{className:"dialog",children:i.jsxs("div",{className:"dialog-pannel",children:[i.jsx("div",{className:"dialog-sider",style:{display:y&&A==="inlay"?"block":"none"},children:i.jsx(Uj,{ref:f,appId:j,networkStatus:o,currentSession:D,application:a,setCurrentSession:z,checkKnowledges:x,setCheckKnowledges:I?U:void 0,sessionId:e,afterSessionClick:O=>{var $,Y;(($=O.data)==null?void 0:$.id)!==((Y=D==null?void 0:D.data)==null?void 0:Y.id)&&q(!0)}})}),i.jsx("div",{className:"dialog-content",children:i.jsxs("div",{className:"dialog-chat",children:[I&&i.jsx("div",{className:"dialog-chat-header",children:i.jsx(Vz,{setCheckKnowledges:U,application:a,currentSession:D})}),i.jsx("div",{className:"dialog-chat-content",children:(a==null?void 0:a.id)&&i.jsx(Fz,{setNetworkStatus:b,networkStatus:o,application:a,currentSession:D,onCreateSession:jM,docViewerUrl:t,embeddingService:Q,setCurrentSession:z,ref:S})})]})})]})})}),$z=g.forwardRef((M,N)=>{const{className:e,triggerButton:j,size:t,theme:D,icon:z,docViewerUrl:I,token:u,debug:y,env:T,plugins:s,mcp:A,footer:a,defaultInput:c,onComment:f,onSessionLoad:Q,onSessionUnload:W,onMessage:x,beforeMessageSend:U,bodyStyle:S,apiUrl:o,sessionId:b,disabled:q,transform:jM,features:O,stream:$,agentClient:Y,application:C}=M,v=g.useRef(null),[MM,tM]=g.useState(!1),[SM,JM]=g.useState(),[oM,PM]=g.useState(t),[zM,VM]=g.useState(M.open),WM=g.useRef(null);g.useEffect(()=>{C&&(console.log("[AgentClientUI] token",Y,C),JM(C.id))},[C]),n.ConfigProvider.config({theme:D}),g.useEffect(()=>{t&&PM(t)},[t]);const E=(F,{element:m,size:CM})=>{PM({width:Number(CM.width),height:CM.height})};return g.useImperativeHandle(N,()=>({createSession:F=>{var m;return(m=WM.current)==null?void 0:m.createSession(F)},getSessionList:()=>{var F;return(F=WM.current)==null?void 0:F.getSessionList()},getCurrentInputText:()=>{var F;return(F=WM.current)==null?void 0:F.getCurrentInputText()}})),i.jsx(n.ConfigProvider,{locale:ui,children:i.jsxs(Li,{value:XM(gM({},M),{popupContainer:v,agentClient:Y,footer:a,defaultInput:c,onComment:f,onSessionLoad:Q,onSessionUnload:W,onMessage:x,beforeMessageSend:U,bodyStyle:S,disabled:q,transform:jM,features:O}),children:[i.jsx(JD.Resizable,{height:(oM==null?void 0:oM.height)||"100%",width:(oM==null?void 0:oM.width)||"100%",maxConstraints:[document.body.clientWidth-45],minConstraints:[Number(t==null?void 0:t.minWidth)],onResize:E,handle:i.jsx("span",{className:"resize-handle-ew"}),resizeHandles:e=="float"?["w"]:[],children:i.jsxs("div",{id:"dialog-modal",className:`gbot-dialog-modal ${e} ${zM?"opened":"closed"}`,style:XM(gM({},t),{width:e=="float"?oM==null?void 0:oM.width:t==null?void 0:t.width,height:e==="float"?oM==null?void 0:oM.height:t==null?void 0:t.height,maxHeight:"100vh"}),ref:v,children:[MM?i.jsx("div",{className:"loading",children:i.jsx(n.Spin,{})}):SM&&Y?i.jsx(pz,{children:i.jsx(Xz,{ref:WM,appId:SM,docViewerUrl:I,bodyStyle:S,sessionId:b})}):null,(j==null?void 0:j.visible)&&i.jsx(n.Button,{className:"trigger-btn close-btn",icon:i.jsx("img",{src:z}),onClick:()=>VM(!1)})]})}),(j==null?void 0:j.visible)&&!zM&&i.jsx(n.Button,{className:`${e}-trigger-btn open-btn`,style:j.style,icon:i.jsx("img",{src:z}),onClick:()=>VM(!0)})]})})}),Kz="@glodon-aiot/agent-cli-ui",qz="3.20.2-alpha.1",Mg="./dist/es/index.mjs",Ng="./dist/lib/index.js",eg="./dist/src/index.d.ts",jg={import:"./dist/es/index.mjs",require:"./dist/lib/index.js",types:"./dist/src/index.d.ts"},tg=["dist"],ig="module",Dg="dist/src/index.d.ts",zg={dev:"vite",start:"vite",build:"tsc && node --max-old-space-size=4096 ./node_modules/vite/bin/vite.js build --mode prod && yarn build:cdn","build:pre":"tsc && node --max-old-space-size=4096 ./node_modules/vite/bin/vite.js build --mode prod","build:cdn":"tsc && vite build --mode prod --config ./vite.config.cdn.ts",preview:"vite preview",check:"yarn prettier --check .",write:"yarn prettier --write .",lint:"eslint --ext .tsx,.ts --fix ./example -c .eslintrc.js",storybook:"start-storybook -p 6006 -s public","build-storybook":"build-storybook -s public",docs:"start-storybook -p 6006",commit:"cz"},gg={"@ant-design/icons":"^5.3.4","@glodon-aiot/apis":"^3.20.2-alpha.1","@glodon-aiot/bot-client-sdk":"^3.20.2-alpha.1","@glodon-aiot/react-components":"^3.20.2-alpha.1","@matejmazur/react-mathjax":"^0.1.10","@react-pdf-viewer/core":"^3.12.0","@react-pdf-viewer/default-layout":"^3.12.0","@react-pdf-viewer/locales":"^1.0.0","@react-pdf-viewer/toolbar":"^3.12.0",ahooks:"^3.8.5",antd:"^4.24.16",axios:"0.24.0",classnames:"^2.5.1","copy-to-clipboard":"^3.3.3",dayjs:"^1.11.13",lodash:"^4.17.21","pdfjs-dist":"^3.0.279","quill-delta":"^5.1.0",react:">=17.0.0 <19.0.0","react-dom":">=17.0.0 <19.0.0","react-infinite-scroll-component":"^6.1.0","react-quill-new":"^3.6.0","react-resizable":"^3.0.5",uuid:"^11.1.0"},Ig={"@babel/core":"^7.20.12","@commitlint/cli":"^17.0.3","@commitlint/config-conventional":"^17.0.3","@rollup/plugin-babel":"^6.0.4","@rollup/plugin-commonjs":"^28.0.0","@rollup/plugin-typescript":"^11.1.6","@storybook/addon-actions":"6.3.6","@storybook/addon-essentials":"6.4.9","@storybook/addon-interactions":"^6.5.16","@storybook/addon-links":"6.3.5","@storybook/addon-postcss":"2.0.0","@storybook/builder-vite":"^0.4.0","@storybook/node-logger":"6.4.9","@storybook/react":"6.4.9","@storybook/testing-library":"^0.0.13","@types/lodash":"^4","@types/react":"^18","@types/react-dom":"^18","@typescript-eslint/eslint-plugin":"^5.35.1","@typescript-eslint/parser":"^5.35.1","@vitejs/plugin-react":"^3.1.0",antd:"^4.24.0","babel-loader":"^8.3.0","babel-plugin-import":"^1.13.8",commitizen:"^4.3.0","css-loader":"^6.7.3","cz-conventional-changelog":"^3.3.0","cz-customizable":"^7.0.0",eslint:"^8.0.1","eslint-config-prettier":"^8.5.0","eslint-config-standard-with-typescript":"^22.0.0","eslint-plugin-import":"^2.25.2","eslint-plugin-n":"^15.0.0","eslint-plugin-promise":"^6.0.0","eslint-plugin-react":"^7.31.0","eslint-plugin-storybook":"^0.6.10",husky:">=6",less:"^4.1.2","less-loader":"^11.1.0","lint-staged":">=10","postcss-loader":"^7.2.4",prettier:"2.7.1","require-from-string":"^2.0.2","rollup-plugin-visualizer":"^6.0.1","storybook-less-loader":"^0.1.0",typescript:"*",vite:"^4.1.1","vite-plugin-css-injected-by-js":"^3.5.0","vite-plugin-dts":"^4.3.0","vite-plugin-externalize-deps":"^0.9.0"},Tg=[">0.2%","not dead","not op_mini all"],ug=["last 1 chrome version","last 1 firefox version","last 1 safari version"],sg={commitizen:{path:"node_modules/cz-customizable"},"cz-customizable":{config:".cz-config.cjs"}},ng={access:"public",registry:"https://registry.npmjs.org/"},Lg={hooks:{"commit-msg":"validate-commit-msg"}},Ag={name:Kz,version:qz,module:Mg,main:Ng,typings:eg,exports:jg,files:tg,type:ig,types:Dg,scripts:zg,dependencies:gg,devDependencies:Ig,"lint-staged":{"*.{js,css,md,jsx,less,ts,tsx,json}":"prettier --write"},production:Tg,development:ug,config:sg,publishConfig:ng,husky:Lg};var di=(M=>(M.dev="https://aiot-dev.glodon.com/api/cvforcepd",M.test="https://aiot-dev.glodon.com/api/cvforce",M.prod="https://copilot.glodon.com/api/cvforce",M.local="http://localhost:3000/api/cvforcepd",M))(di||{});//! moment.js
|
|
10
|
+
.bmp格式的图片数据,单文件最大${Aj}M,最多${GN}张`}),children:i.jsx(n.Button,{type:"text",className:"camera-out-btn",style:{width:"22px",position:"relative",bottom:"-2px"},icon:i.jsx(uM,{type:"icon-shangchuantupian",className:"icon-tianjia",style:{fontSize:"22px"}})})}):i.jsx(n.Button,{type:"text",className:"camera-out-btn",style:{width:"22px",position:"relative",bottom:"-2px"},disabled:!0,icon:i.jsx(uM,{type:"icon-shangchuantupian",className:"icon-tianjia",style:{fontSize:"22px"}})})}),z&&(o!=null&&o.fileUpload)&&(e!=null&&e.id)?i.jsx(li,{appId:e==null?void 0:e.id,ref:$M,isFirstSession:it,docViewerUrl:j,onStatusChange:L=>DM(exports,null,function*(){L!=="process"?(xe(!0),uj()):xe(!1)}),createSession:()=>ct().then(L=>{var w;return((w=L.data)==null?void 0:w.id)||""}),sid:(St=t==null?void 0:t.data)==null?void 0:St.id,disabled:zj||Y,afterFileAdd:(L,r)=>{r&&ZM(w=>{const G=w[r]||[];return{[r]:[...G,L]}})},afterFileDelete:L=>{var w;const r=(w=t==null?void 0:t.data)==null?void 0:w.id;r&&ZM(G=>{const p=G[r]||[];return{[r]:p.filter(NM=>NM.id!==L)}})},onFileListChange:L=>{Oe(L)},shouldContinue:aD,afterFilesClear:()=>{var r;const L=(r=t==null?void 0:t.data)==null?void 0:r.id;L&&(ZM({[L]:[]}),uj())}}):null,(o==null?void 0:o.prompt)&&(e==null?void 0:e.id)&&i.jsx(Jz,{appId:e.id,list:[],search:H?RM:"",onPromptSelect:L=>{EM(L.context),a(L.context)},disabled:Y})]}),i.jsxs(n.Space,{children:[(o==null?void 0:o.connectNetwork)&&e.type===R.ApplicationTypes.Dialog&&((kt=e.arrange)==null?void 0:kt.length)&&!!e.arrange[0].enableNetOpen&&i.jsx(Gz,{sessionId:(mt=t==null?void 0:t.data)==null?void 0:mt.id,netStatus:u,enable:typeof(C==null?void 0:C.connectNetwork)=="object"&&typeof(C==null?void 0:C.connectNetwork.diabled)=="boolean"?!(C!=null&&C.connectNetwork.diabled):OD,disabledTip:t?void 0:"网络访问已被禁用",onNetStatusChange:L=>{WD(L)}}),(o==null?void 0:o.sessionList)&&i.jsx(fz,{currentSessionId:(Ut=t==null?void 0:t.data)==null?void 0:Ut.id,onSessionChange:(L,r)=>{EM(void 0),Ee(!0),I==null||I(r)},disabled:Y}),tM&&SM==="float"&&i.jsx("div",{className:"session-history-drawer-component",children:i.jsx(n.Popover,{placement:"topRight",showArrow:!1,overlayClassName:"session-history-overlay",overlayStyle:{padding:"4px"},getPopupContainer:L=>L.parentNode,content:"会话历史记录",children:i.jsx(n.Button,{className:"history-overlay-action",disabled:Y,type:"text",icon:i.jsx(uM,{type:"icon-lishijilu",style:{fontSize:24}}),onClick:()=>It(!0)})})}),(o==null?void 0:o.sessionOpen)&&i.jsx(n.Button,{icon:i.jsx(xM.PlusOutlined,{}),className:"add-btn",type:"primary",disabled:jt||!t||!T.length||Y,onClick:()=>{var L,r;Ee(!1),I==null||I(null),BN.current=null,y(!1),(L=JN.current)==null||L.clear(),(r=kM.current)==null||r.clear()},children:"新会话"})]})]}),!!gj&&i.jsx("div",{className:"remainingSeconds-mark"})]}),i.jsxs("div",{className:"footer-textarea",onPaste:Lt,onPasteCapture:Lt,onDrop:yt,onDropCapture:yt,onDragOver:At,onDragOverCapture:At,children:[i.jsx(ri,{ref:iM,maxLength:E,text:wM,networkStatus:!1,loading:zt||we,disabled:oM||k||Y||zt||we,onTextSend:ut,onChange:(L,r)=>{EM(L);const w=r.getText().replace(/[\n\s]+$/,"");a(w),nM(w),H||X(!0)},clearAction:i.jsx(n.Space,{size:0,children:i.jsx(n.Button,{type:"link",disabled:zj||Y,ghost:!0,icon:i.jsx(uM,{style:{fontSize:22},type:"icon-qingchujiyi"}),onClick:()=>ED()})})}),!!gj&&i.jsxs("div",{className:"remainingSeconds-time",children:["您之前对话触发敏感词拦截,当前处于禁言状态,暂时无法发送消息,剩余禁言时长",gj]})]})]})}),i.jsx(Ez,{tips:S}),YM&&i.jsx(Sz,{isvisible:YM,files:KM,sessionId:(ft=t==null?void 0:t.data)==null?void 0:ft.id,onClose:L=>{MN(!1),rD(!1)}})]}),gt&&i.jsx(vz,{currentSession:t,application:e,networkStatus:u,setCurrentSession:I,disabled:Y,isSessionHistoryVisible:gt,setIsSessionHistoryVisible:It,onSessionChange:L=>{Ee(!0)}})]})});const xi=M=>{const{disabled:N,checkedValues:e,currKnowledgeList:j,selectCount:t,onSelectChange:D}=M,[z,I]=g.useState(!1),u=i.jsx(n.Checkbox.Group,{style:{width:"100%"},onChange:D,value:e,disabled:N,children:i.jsx(n.Row,{gutter:[20,12],children:j==null?void 0:j.map(T=>i.jsx(n.Col,{span:24,children:i.jsx(n.Checkbox,{value:T.id,children:T.name})},T.id))})}),y=T=>{I(T)};return i.jsx("div",{className:"knowledge-select",style:{borderColor:z?"#9C24F2":"#84868C"},children:i.jsx(n.Popover,{className:"select-popover",placement:"bottomRight",title:null,content:u,trigger:"click",overlayStyle:{width:280},onOpenChange:y,getPopupContainer:T=>T.parentNode,children:i.jsxs("div",{className:"",onClick:T=>T.preventDefault(),children:[i.jsx(uM,{className:"select-icon",type:"icon-open"}),i.jsx("span",{className:"title",children:"参考知识库"}),i.jsxs("span",{className:"content",children:["已选 ",t," 个"]})]})})})},Vz=M=>{var Q,W;const{currentSession:N,application:e,setCheckKnowledges:j}=M,{mode:t,transform:D,features:z}=g.useContext(BM),[I,u]=g.useState([]),[y,T]=g.useState(typeof(z==null?void 0:z.knowledges)=="object"?((Q=z.knowledges.default)==null?void 0:Q.map(x=>x.id))||[]:[]),[s,A]=g.useState(0),[a,c]=g.useState(!1);g.useEffect(()=>{if(!(e!=null&&e.id))return;const x=e.arrange;if(!(x!=null&&x.length))return;const S=x[0].knowledges||[];u(S);const o=typeof(z==null?void 0:z.knowledges)=="object"&&z.knowledges.default||S;if(Array.isArray(o)&&o.some(O=>Array.isArray(O.fileIds)&&O.fileIds.length===0))throw Error("fileIds cannot be an empty array");if(We(o||[])>kN)throw Error(`knowledges and fileIds total count cannot exceed ${kN}`);if(!N){T(o.map(jM=>jM.id)),A(o.length),j==null||j(o);return}const q=()=>{const jM=N.knowledges||o;A(jM.length);const O=jM.map($=>$.id);T(O)};return q(),N.addEventListener("data:updated",q),()=>{N==null||N.removeEventListener("data:updated",q)}},[e,N]),g.useEffect(()=>{var U;if(!a||(c(!1),!(e!=null&&e.id)))return;const x=[];y==null||y.map(S=>{const o=I==null?void 0:I.find(b=>b.id===S);x.push(o)}),(U=N==null?void 0:N.data)!=null&&U.id&&N.setKnowledges(x)},[a]);const f=x=>{c(!0),T(x);const U=[];x==null||x.map(S=>{const o=I==null?void 0:I.find(b=>b.id===S);U.push(o)}),j==null||j(U),A(x.length)};return i.jsxs("div",{className:"chat-header",children:[i.jsxs(n.Space,{className:"header-title",children:[t==="inlay"&&((W=N==null?void 0:N.data)==null?void 0:W.name),t==="float"&&(e==null?void 0:e.name)]}),(D==null?void 0:D.knowledges)&&I.length!==0&&i.jsx(xi,{disabled:typeof(z==null?void 0:z.knowledges)=="object"&&(z==null?void 0:z.knowledges.diabled)||!1,checkedValues:y,currKnowledgeList:I,selectCount:s,onSelectChange:f})]})};const Xz=g.forwardRef((M,N)=>{const{sessionId:e,appId:j,docViewerUrl:t}=M,[D,z]=g.useState(),{showHeader:I,agentClient:u,sider:y,onSessionLoad:T,features:s,mode:A}=g.useContext(BM),[a,c]=g.useState(),f=g.useRef(null),[Q,W]=g.useState(""),[x,U]=g.useState(),S=g.useRef(null),[o,b]=g.useState(!1);g.useState([]);const{setIsSwitchingToExistingSession:q}=mj();g.useEffect(()=>{var O;b(D?!!((O=D.data)!=null&&O.netOpen):typeof(s==null?void 0:s.connectNetwork)=="object"&&typeof(s==null?void 0:s.connectNetwork.default)=="boolean"?s.connectNetwork.default:!1)},[D]),g.useEffect(()=>{const O=()=>DM(exports,null,function*(){const $=u==null?void 0:u.application;if(!($!=null&&$.id))return;const Y=$==null?void 0:$.arrange;if(!(Y!=null&&Y.length))return;const v=Y[0].embeddingService;W(v),c($)});if(u!=null&&u.ready){O();return}return u==null||u.addEventListener("ready",()=>O()),()=>{u==null||u.removeEventListener("ready",O)}},[u]),g.useEffect(()=>{u&&e&&(u.ready?u==null||u.getSessions().then(O=>DM(exports,null,function*(){z==null||z(O.find($=>$.id===e))})):u.addEventListener("ready",()=>DM(exports,null,function*(){u==null||u.getSessions().then(O=>DM(exports,null,function*(){z==null||z(O.find($=>$.id===e))}))}),!0))},[u,e]),g.useEffect(()=>{if(!D){T&&T({applicationId:j,sessionId:"",session:null,sessionInstance:null});return}D.data&&T&&T({applicationId:j,sessionId:D.data.id,session:D.data,sessionInstance:D}),D.addEventListener("data:loaded",()=>{D!=null&&D.data&&T&&T({applicationId:j,sessionId:D.data.id,session:D.data,sessionInstance:D})},!0)},[D]);const jM=O=>{var $;return($=f.current)==null?void 0:$.create(XM(gM({},O),{knowledges:x}))};return g.useImperativeHandle(N,()=>({createSession:O=>jM(O),getSessionList:()=>{var $;const O=(($=f.current)==null?void 0:$.list())||[];return Promise.resolve(O)},getCurrentInputText:()=>{var O;return(O=S.current)==null?void 0:O.getCurrentInputText()}})),i.jsx("div",{className:"dialog",children:i.jsxs("div",{className:"dialog-pannel",children:[i.jsx("div",{className:"dialog-sider",style:{display:y&&A==="inlay"?"block":"none"},children:i.jsx(Uj,{ref:f,appId:j,networkStatus:o,currentSession:D,application:a,setCurrentSession:z,checkKnowledges:x,setCheckKnowledges:I?U:void 0,sessionId:e,afterSessionClick:O=>{var $,Y;(($=O.data)==null?void 0:$.id)!==((Y=D==null?void 0:D.data)==null?void 0:Y.id)&&q(!0)}})}),i.jsx("div",{className:"dialog-content",children:i.jsxs("div",{className:"dialog-chat",children:[I&&i.jsx("div",{className:"dialog-chat-header",children:i.jsx(Vz,{setCheckKnowledges:U,application:a,currentSession:D})}),i.jsx("div",{className:"dialog-chat-content",children:(a==null?void 0:a.id)&&i.jsx(Fz,{setNetworkStatus:b,networkStatus:o,application:a,currentSession:D,onCreateSession:jM,docViewerUrl:t,embeddingService:Q,setCurrentSession:z,ref:S})})]})})]})})}),$z=g.forwardRef((M,N)=>{const{className:e,triggerButton:j,size:t,theme:D,icon:z,docViewerUrl:I,token:u,debug:y,env:T,plugins:s,mcp:A,footer:a,defaultInput:c,onComment:f,onSessionLoad:Q,onSessionUnload:W,onMessage:x,beforeMessageSend:U,bodyStyle:S,apiUrl:o,sessionId:b,disabled:q,transform:jM,features:O,stream:$,agentClient:Y,application:C}=M,v=g.useRef(null),[MM,tM]=g.useState(!1),[SM,JM]=g.useState(),[oM,PM]=g.useState(t),[zM,VM]=g.useState(M.open),WM=g.useRef(null);g.useEffect(()=>{C&&(console.log("[AgentClientUI] token",Y,C),JM(C.id))},[C]),n.ConfigProvider.config({theme:D}),g.useEffect(()=>{t&&PM(t)},[t]);const E=(F,{element:m,size:CM})=>{PM({width:Number(CM.width),height:CM.height})};return g.useImperativeHandle(N,()=>({createSession:F=>{var m;return(m=WM.current)==null?void 0:m.createSession(F)},getSessionList:()=>{var F;return(F=WM.current)==null?void 0:F.getSessionList()},getCurrentInputText:()=>{var F;return(F=WM.current)==null?void 0:F.getCurrentInputText()}})),i.jsx(n.ConfigProvider,{locale:ui,children:i.jsxs(Li,{value:XM(gM({},M),{popupContainer:v,agentClient:Y,footer:a,defaultInput:c,onComment:f,onSessionLoad:Q,onSessionUnload:W,onMessage:x,beforeMessageSend:U,bodyStyle:S,disabled:q,transform:jM,features:O}),children:[i.jsx(JD.Resizable,{height:(oM==null?void 0:oM.height)||"100%",width:(oM==null?void 0:oM.width)||"100%",maxConstraints:[document.body.clientWidth-45],minConstraints:[Number(t==null?void 0:t.minWidth)],onResize:E,handle:i.jsx("span",{className:"resize-handle-ew"}),resizeHandles:e=="float"?["w"]:[],children:i.jsxs("div",{id:"dialog-modal",className:`gbot-dialog-modal ${e} ${zM?"opened":"closed"}`,style:XM(gM({},t),{width:e=="float"?oM==null?void 0:oM.width:t==null?void 0:t.width,height:e==="float"?oM==null?void 0:oM.height:t==null?void 0:t.height,maxHeight:"100vh"}),ref:v,children:[MM?i.jsx("div",{className:"loading",children:i.jsx(n.Spin,{})}):SM&&Y?i.jsx(pz,{children:i.jsx(Xz,{ref:WM,appId:SM,docViewerUrl:I,bodyStyle:S,sessionId:b})}):null,(j==null?void 0:j.visible)&&i.jsx(n.Button,{className:"trigger-btn close-btn",icon:i.jsx("img",{src:z}),onClick:()=>VM(!1)})]})}),(j==null?void 0:j.visible)&&!zM&&i.jsx(n.Button,{className:`${e}-trigger-btn open-btn`,style:j.style,icon:i.jsx("img",{src:z}),onClick:()=>VM(!0)})]})})}),Kz="@glodon-aiot/agent-cli-ui",qz="3.22.2-alpha.2",Mg="./dist/es/index.mjs",Ng="./dist/lib/index.js",eg="./dist/src/index.d.ts",jg={import:"./dist/es/index.mjs",require:"./dist/lib/index.js",types:"./dist/src/index.d.ts"},tg=["dist"],ig="module",Dg="dist/src/index.d.ts",zg={dev:"vite",start:"vite",build:"tsc && node --max-old-space-size=4096 ./node_modules/vite/bin/vite.js build --mode prod && yarn build:cdn","build:pre":"tsc && node --max-old-space-size=4096 ./node_modules/vite/bin/vite.js build --mode prod","build:cdn":"tsc && vite build --mode prod --config ./vite.config.cdn.ts",preview:"vite preview",check:"yarn prettier --check .",write:"yarn prettier --write .",lint:"eslint --ext .tsx,.ts --fix ./example -c .eslintrc.js",storybook:"start-storybook -p 6006 -s public","build-storybook":"build-storybook -s public",docs:"start-storybook -p 6006",commit:"cz"},gg={"@ant-design/icons":"^5.3.4","@glodon-aiot/apis":"^3.22.2-alpha.2","@glodon-aiot/bot-client-sdk":"^3.22.2-alpha.2","@glodon-aiot/react-components":"^3.22.2-alpha.2","@matejmazur/react-mathjax":"^0.1.10","@react-pdf-viewer/core":"^3.12.0","@react-pdf-viewer/default-layout":"^3.12.0","@react-pdf-viewer/locales":"^1.0.0","@react-pdf-viewer/toolbar":"^3.12.0",ahooks:"^3.8.5",antd:"^4.24.16",axios:"0.24.0",classnames:"^2.5.1","copy-to-clipboard":"^3.3.3",dayjs:"^1.11.13",lodash:"^4.17.21","pdfjs-dist":"^3.0.279","quill-delta":"^5.1.0",react:">=17.0.0 <19.0.0","react-dom":">=17.0.0 <19.0.0","react-infinite-scroll-component":"^6.1.0","react-quill-new":"^3.6.0","react-resizable":"^3.0.5",uuid:"^11.1.0"},Ig={"@babel/core":"^7.20.12","@commitlint/cli":"^17.0.3","@commitlint/config-conventional":"^17.0.3","@rollup/plugin-babel":"^6.0.4","@rollup/plugin-commonjs":"^28.0.0","@rollup/plugin-typescript":"^11.1.6","@storybook/addon-actions":"6.3.6","@storybook/addon-essentials":"6.4.9","@storybook/addon-interactions":"^6.5.16","@storybook/addon-links":"6.3.5","@storybook/addon-postcss":"2.0.0","@storybook/builder-vite":"^0.4.0","@storybook/node-logger":"6.4.9","@storybook/react":"6.4.9","@storybook/testing-library":"^0.0.13","@types/lodash":"^4","@types/react":"^18","@types/react-dom":"^18","@typescript-eslint/eslint-plugin":"^5.35.1","@typescript-eslint/parser":"^5.35.1","@vitejs/plugin-react":"^3.1.0",antd:"^4.24.0","babel-loader":"^8.3.0","babel-plugin-import":"^1.13.8",commitizen:"^4.3.0","css-loader":"^6.7.3","cz-conventional-changelog":"^3.3.0","cz-customizable":"^7.0.0",eslint:"^8.0.1","eslint-config-prettier":"^8.5.0","eslint-config-standard-with-typescript":"^22.0.0","eslint-plugin-import":"^2.25.2","eslint-plugin-n":"^15.0.0","eslint-plugin-promise":"^6.0.0","eslint-plugin-react":"^7.31.0","eslint-plugin-storybook":"^0.6.10",husky:">=6",less:"^4.1.2","less-loader":"^11.1.0","lint-staged":">=10","postcss-loader":"^7.2.4",prettier:"2.7.1","require-from-string":"^2.0.2","rollup-plugin-visualizer":"^6.0.1","storybook-less-loader":"^0.1.0",typescript:"*",vite:"^4.1.1","vite-plugin-css-injected-by-js":"^3.5.0","vite-plugin-dts":"^4.3.0","vite-plugin-externalize-deps":"^0.9.0"},Tg=[">0.2%","not dead","not op_mini all"],ug=["last 1 chrome version","last 1 firefox version","last 1 safari version"],sg={commitizen:{path:"node_modules/cz-customizable"},"cz-customizable":{config:".cz-config.cjs"}},ng={access:"public",registry:"https://registry.npmjs.org/"},Lg={hooks:{"commit-msg":"validate-commit-msg"}},Ag={name:Kz,version:qz,module:Mg,main:Ng,typings:eg,exports:jg,files:tg,type:ig,types:Dg,scripts:zg,dependencies:gg,devDependencies:Ig,"lint-staged":{"*.{js,css,md,jsx,less,ts,tsx,json}":"prettier --write"},production:Tg,development:ug,config:sg,publishConfig:ng,husky:Lg};var di=(M=>(M.dev="https://aiot-dev.glodon.com/api/cvforcepd",M.test="https://aiot-dev.glodon.com/api/cvforce",M.prod="https://copilot.glodon.com/api/cvforce",M.local="http://localhost:3000/api/cvforcepd",M))(di||{});//! moment.js
|
|
11
11
|
//! version : 2.30.1
|
|
12
12
|
//! authors : Tim Wood, Iskren Chernev, Moment.js contributors
|
|
13
13
|
//! license : MIT
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@glodon-aiot/agent-cli-ui",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.22.2-alpha.2",
|
|
4
4
|
"module": "./dist/es/index.mjs",
|
|
5
5
|
"main": "./dist/lib/index.js",
|
|
6
6
|
"typings": "./dist/src/index.d.ts",
|
|
@@ -31,9 +31,9 @@
|
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"@ant-design/icons": "^5.3.4",
|
|
34
|
-
"@glodon-aiot/apis": "^3.
|
|
35
|
-
"@glodon-aiot/bot-client-sdk": "^3.
|
|
36
|
-
"@glodon-aiot/react-components": "^3.
|
|
34
|
+
"@glodon-aiot/apis": "^3.22.2-alpha.2",
|
|
35
|
+
"@glodon-aiot/bot-client-sdk": "^3.22.2-alpha.2",
|
|
36
|
+
"@glodon-aiot/react-components": "^3.22.2-alpha.2",
|
|
37
37
|
"@matejmazur/react-mathjax": "^0.1.10",
|
|
38
38
|
"@react-pdf-viewer/core": "^3.12.0",
|
|
39
39
|
"@react-pdf-viewer/default-layout": "^3.12.0",
|