@glodon-aiot/agent-cli-ui 3.19.2-alpha.2 → 3.19.2-alpha.4
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
|
@@ -4912,7 +4912,7 @@ const $I = bN((M, N) => {
|
|
|
4912
4912
|
})]
|
|
4913
4913
|
})
|
|
4914
4914
|
});
|
|
4915
|
-
}), qI = "@glodon-aiot/agent-cli-ui", Mg = "3.19.2-alpha.
|
|
4915
|
+
}), qI = "@glodon-aiot/agent-cli-ui", Mg = "3.19.2-alpha.4", Ng = "./dist/es/index.mjs", eg = "./dist/lib/index.js", jg = "./dist/src/index.d.ts", tg = {
|
|
4916
4916
|
import: "./dist/es/index.mjs",
|
|
4917
4917
|
require: "./dist/lib/index.js",
|
|
4918
4918
|
types: "./dist/src/index.d.ts"
|
|
@@ -4934,9 +4934,9 @@ const $I = bN((M, N) => {
|
|
|
4934
4934
|
commit: "cz"
|
|
4935
4935
|
}, gg = {
|
|
4936
4936
|
"@ant-design/icons": "^5.3.4",
|
|
4937
|
-
"@glodon-aiot/apis": "^3.19.2-alpha.
|
|
4938
|
-
"@glodon-aiot/bot-client-sdk": "^3.19.2-alpha.
|
|
4939
|
-
"@glodon-aiot/react-components": "^3.19.2-alpha.
|
|
4937
|
+
"@glodon-aiot/apis": "^3.19.2-alpha.4",
|
|
4938
|
+
"@glodon-aiot/bot-client-sdk": "^3.19.2-alpha.4",
|
|
4939
|
+
"@glodon-aiot/react-components": "^3.19.2-alpha.4",
|
|
4940
4940
|
"@matejmazur/react-mathjax": "^0.1.10",
|
|
4941
4941
|
"@react-pdf-viewer/core": "^3.12.0",
|
|
4942
4942
|
"@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},Bz=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)}`},Hz=I.forwardRef((M,N)=>{var lt,Ct,Ot,Yt,xt,dt,wt,Et,Qt,ht,St,kt,mt,Ut;const{application:e,docViewerUrl:j="",currentSession:t,onCreateSession:D,embeddingService:z,setCurrentSession:g,networkStatus:u,setNetworkStatus:y}=M,[T,s]=I.useState([]),[A,a]=I.useState(),[c,U]=I.useState(),Q=I.useRef(null),{service:W,agentClient:d,depId:m,footer:k,transform:o,defaultInput:p,onMessage:$,onHistoryLoad:K,beforeMessageSend:Y,bodyStyle:eM,disabled:O,features:C,popupContainer:b,icon:q,sider:jM,mode:kM,silencedSeconds:G}=I.useContext(JM),[oM,GM]=I.useState(!1),iM=I.useRef(T),VM=I.useRef(void 0),[ZM,w]=I.useState(0),[J,yM]=I.useState([]),[lM,_M]=I.useState([]),[l,B]=I.useState(0),[H,x]=I.useState(!1);I.useEffect(()=>{x(l>0)},[l]);const Z=I.useRef(null),[zM,LM]=I.useState([]),[YM,mM]=I.useState(!1),[S,V]=I.useState(!1),[gM,PM]=I.useState(""),[sM,CM]=I.useState(),[QM,bM]=I.useState({}),WM=I.useRef(null),MN=I.useRef(null),pN=I.useRef(null),[fM,wM]=I.useState(!1),[qM,$M]=I.useState([]),[Ye,bN]=I.useState(!0),[cD,aD]=I.useState(!0),[et,aN]=I.useState(!1),[Dj,QN]=I.useState(!1),[jt,rD]=I.useState(!1),[IN,te]=I.useState(typeof(C==null?void 0:C.promptVariables)=="object"?C.promptVariables.default||[]:[]),[oD,lD]=I.useState(()=>{const L=typeof(C==null?void 0:C.knowledges)=="object"&&C.knowledges.default||void 0;if(L){if(Array.isArray(L)&&L.some(v=>Array.isArray(v.fileIds)&&v.fileIds.length===0))throw Error("fileIds cannot be an empty array");if(Pe(L)>kN)throw Error(`knowledges and fileIds total count cannot exceed ${kN}`)}return L}),[tt,vN]=I.useState(!1),[it,ie]=I.useState(!1),[CD,De]=I.useState(typeof(C==null?void 0:C.connectNetwork)=="object"&&typeof(C==null?void 0:C.connectNetwork.default)=="boolean"?C.connectNetwork.default:!1),[Dt,xe]=I.useState(!1),[OD,hN]=I.useState(!1),[YD,xD]=I.useState(null),[de,GN]=I.useState(!1),[zt,It]=I.useState(!1),{isSwitchingToExistingSession:gt,setIsSwitchingToExistingSession:we}=kj(),HN=I.useRef(null),[zj,dD]=I.useState("");I.useEffect(()=>{if(!G)return;let L=Bz(G);dD(L)},[G]),I.useEffect(()=>{if(xD(t),t===null)hN(!1);else if(t===void 0)hN(!0);else{if(YD===null){if(gt){hN(!0),we(!1);return}hN(!1);return}t.ready?hN(!1):hN(!0)}},[t,t==null?void 0:t.ready,gt]),I.useEffect(()=>{var E,v;t&&(iM.current=[]),s([]);const L=Q.current;if(L&&L.scrollTo({top:0}),!((E=t==null?void 0:t.data)!=null&&E.id))return;if(QN(!1),aN(!1),(v=t.messages)!=null&&v.length){const MM=[...t.messages.filter(F=>F==null?void 0:F.messageId)].reverse();iM.current=[...MM],s([...MM]),hN(!1)}const r=f=>{var MM;(MM=t==null?void 0:t.data)!=null&&MM.id&&(iM.current=[...f].reverse(),s([...f].reverse()),!f||f.length<10?ie(!1):ie(!0),hN(!1),K&&K({applicationId:e.id,sessionId:t.data.id,histories:f}))};return t.addEventListener("history:loaded",r),()=>{iM.current=[],s([]),t==null||t.removeEventListener("history:loaded",r)}},[t]),I.useEffect(()=>{const L=()=>{var r;(r=t==null?void 0:t.data)!=null&&r.id&&(t.promptVariables&&te(t.promptVariables.sort((E,v)=>E.key.localeCompare(v.key))),t.knowledges&&lD(t.knowledges),y(t.netOpen))};return t==null||t.addEventListener("data:updated",L),()=>{t==null||t.removeEventListener("data:updated",L)}},[t]),I.useEffect(()=>{var r;if(!((r=t==null?void 0:t.data)!=null&&r.id))return;const L=E=>{var v;console.error(E.message,E.cause,"e.case"),n.notification.config({getContainer:()=>(b==null?void 0:b.current)||document.body,prefixCls:"gbot-notification"}),n.notification.error({message:((v=E.cause)==null?void 0:v.message)||E.message}),n.notification.config({getContainer:void 0,prefixCls:"gbot-notification"})};return t.addEventListener("error",L),()=>{t==null||t.removeEventListener("error",L)}},[t]);const wD=()=>{var E;if(!((E=t==null?void 0:t.data)!=null&&E.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 v=new Ie("",L,_.IHistoryRole.System);v.isContext=!0,s([v,...T])})};I.useEffect(()=>{e!=null&&e.id&&(W==null||W.getRecommendQues(e.id).then(L=>{LM(L)}))},[m,e]);const Tt=L=>tM(exports,null,function*(){var TM,BM;if(O){NN("error","发送功能被禁用");return}const r=L||A;if(!(r!=null&&r.trim())){NN("error","请输入你想问的");return}if(!(IN==null?void 0:IN.every(vM=>!!(vM!=null&&vM.value))))if(o!=null&&o.promptVariables){NN("error","变量值不能为空");return}else console.error("变量值不能为空",IN==null?void 0:IN.map(vM=>!!(vM!=null&&vM.value)));if(Dj){NN("error","正在回复中");return}if(oM){NN("error","等待初始化");return}if(!Ye){NN("error","正在解析文件");return}if(H){NN("error","正在上传图片");return}yM([]),_M([]);const v=(TM=t==null?void 0:t.data)==null?void 0:TM.id;if(!v){if(de)return;GN(!0),D==null||D({netOpen:u?SN.OPEN:SN.CLOSE}).then(vM=>{var OM,rN;vN(!0),y(!!((OM=vM.data)!=null&&OM.netOpen)),De(!!((rN=vM.data)!=null&&rN.enableNetOpen)),Ij(vM).then(()=>{g==null||g(vM),vN(!1),U(r)})}).catch(vM=>{GN(!1)});return}if(de)return;GN(!0),xe(!0);const f=Aj(r,lM,QM[v],(e==null?void 0:e.type)||0);let MM;try{Y?MM=yield Y==null?void 0:Y({applicationId:e.id,sessionId:v,message:{content:f,sessionId:v,role:_.ChatMessageRole.User,files:QM[v]}}):MM=!0}catch(vM){MM=!1}if(xe(!1),MM===!1){GN(!1);return}let F=r;typeof MM=="object"&&(F=MM.content||r);const NM=yield(()=>new Promise(vM=>{te(OM=>(vM(OM),OM))}))();if(!(yield t.setPromptVariables(NM))){GN(!1);return}((BM=QM[v])==null?void 0:BM.length)>0?ED(F):gj(F)}),Ij=L=>new Promise((r,E)=>tM(exports,null,function*(){const MM=(L==null?void 0:L.promptVariables).filter(F=>F.type?!((F.type===_.PromptVariableType.User||F.type===void 0)&&F.key==="query")&&!((F.type===_.PromptVariableType.System||F.type===void 0)&&F.key==="datetime"):F.key!=="query").map(F=>{var NM;const EM=(NM=IN.find(pM=>pM.key===F.key&&pM.type===F.type))==null?void 0:NM.value;return F.value=EM||"",F});te(MM.sort((F,EM)=>F.key.localeCompare(EM.key))),yield L==null?void 0:L.setPromptVariables(MM).catch(F=>{console.error(F),NN("error",F.message)}),r()})),ED=L=>{var f,MM,F;if(bN(!1),!((f=t==null?void 0:t.data)!=null&&f.id)||!(e!=null&&e.id))return;const r=((MM=t.data)==null?void 0:MM.id)||"";let E=[],v=new Set;(F=QM[r])==null||F.forEach(EM=>{v.has(EM.id)||(E.push(EM),v.add(EM.id))}),bN(!0),gj(L,E)};I.useEffect(()=>{if(!c||!t)return;const L=c,r=()=>tM(exports,null,function*(){xe(!0);const E=Aj(L,lM,QM[t.id],(e==null?void 0:e.type)||0);let v;try{Y?v=yield Y==null?void 0:Y({applicationId:e.id,sessionId:t.id,message:{content:E,sessionId:t.id,role:_.ChatMessageRole.User,files:QM[t.id]}}):v=!0}catch(f){v=!1}if(xe(!1),v===!1){GN(!1);return}gj(L),U(void 0)});return t.ready?r():t.addEventListener("ready",r,!0),()=>{t==null||t.removeEventListener("ready",r)}},[c,t]);const gj=(L,r)=>tM(exports,null,function*(){var TM,BM,vM;const E=(TM=t==null?void 0:t.data)==null?void 0:TM.id;if(!E)return;QN(!0),aN(!0);const v=Aj(L,lM,r,(e==null?void 0:e.type)||0);let f;if(e.type===_.ApplicationTypes.Agent)f=void 0;else if(e.type===_.ApplicationTypes.Dialog&&((BM=e.arrange)!=null&&BM.length)&&e.arrange[0].visionOpen){const OM=lM&&lM.length?lM.filter(Boolean):[];f=OM.length?OM:void 0}else f=void 0;const MM=new Ie(v,E,_.IHistoryRole.User,r,f);a(void 0),CM(void 0),iM.current=[MM,...T],s(iM.current),e.id&&$&&$({applicationId:e.id,sessionId:E,message:MM});const F=new Ie("",E,_.IHistoryRole.System);F.isWaiting=!0,iM.current=[F,...iM.current],s(iM.current);const EM=(r==null?void 0:r.map(OM=>OM.id))||[],NM={stream:ue.configuration.stream,referenceFirst:!1};if(o!=null&&o.promptVariables){const OM=IN==null?void 0:IN.reduce((rN,FN)=>(rN[FN.key]=FN.value,rN),{});NM.formatValues=OM}if(o!=null&&o.knowledges){const OM=oD;NM.knowledges=OM}const pM={text:v,fileIds:EM,files:r};f&&f.length>0&&(pM.imageContent=f),yield t.send(pM,NM),bM({[E]:[]}),(vM=WM.current)==null||vM.update(),yM([]),_M([]),GN(!1)});I.useEffect(()=>{var EM;const L=(EM=t==null?void 0:t.data)==null?void 0:EM.id;if(!L)return;let r=null,E=null;const v=()=>{r=null,E&&(s([E,...iM.current]),E=null)},f=()=>{r!==null&&(cancelAnimationFrame(r),r=null,E=null)},MM=NM=>{if(!NM.sessionId||NM.sessionId&&NM.sessionId!==VM.current||NM.role===_.IHistoryRole.User)return;if(NM.index===-1&&NM.code!==200&&NM.code!==11915&&NM.code!==11916&&(f(),aN(!1),QN(!1),iM.current=iM.current.filter(BM=>!BM.isWaiting),s([...iM.current]),iM.current=[...iM.current],NM.content)){n.notification.config({getContainer:()=>(b==null?void 0:b.current)||document.body,prefixCls:"gbot-notification"}),n.notification.error({message:NM.content}),n.notification.config({getContainer:void 0,prefixCls:"gbot-notification"});return}const pM=NM.actions||[],TM=new Ie(NM.content,L,_.IHistoryRole.Robot);if(TM.messageId=NM.messageId||Le.v4(),TM.reasoningContent=NM.reasoningContent,TM.searchReference=NM.searchReference,TM.thinkingSecs=NM.thinkingSecs,TM.thinkingStatus=NM.thinkingStatus,TM.actions=pM,TM.isLoading=!0,TM.searchingStatus=NM.searchingStatus,iM.current=iM.current.filter(BM=>!BM.isWaiting).filter(BM=>!BM.isReplying),NM.index===void 0){E=TM,r===null&&(r=requestAnimationFrame(v));return}f(),(NM.code===11915||NM.code===11916)&&(aN(!1),QN(!1),TM.isLoading=!1,TM.content=NM.code===11916?"尊敬的用户您好,让我们换个话题再聊聊吧。":"请您换个问题问我吧~",TM.isSensitive=!0,s([TM,...iM.current])),NM.index===-2&&(aN(!1),QN(!1),TM.isLoading=!1,TM.content="回答已中止~",TM.isSuspend=!0,s([TM,...iM.current])),NM.index===-1&&(aN(!1),QN(!1),TM.isLoading=!1,TM.reference=NM.reference,s([TM,...iM.current]),e.id&&$&&$({applicationId:e.id,sessionId:L,message:TM})),NM.index===-3&&(aN(!1),QN(!1),TM.isLoading=!1,TM.reference=NM.reference,TM.relatedQuesion=NM.relatedQuesion,s([TM,...iM.current]))},F=()=>{t.addEventListener("message:updated",MM)};return t.ready?t.addEventListener("message:updated",MM):t.addEventListener("ready",F),()=>{f(),t==null||t.removeEventListener("message:updated",MM),t==null||t.removeEventListener("ready",F)}},[t]),I.useEffect(()=>{if(!t){GM(!1);return}const L=r=>{GM(r)};return GM(t.frozen),t.addEventListener("frozen",L),()=>{t==null||t.removeEventListener("frozen",L)}},[t]),I.useEffect(()=>{if(!d)return;const L=d.questionContextMaxLength||4e3;w(L)},[d,W]),I.useEffect(()=>{p&&CM(p.text)},[p]);const NN=(L,r,E)=>{iN(b,()=>{n.message.open({type:L,content:r,key:E})})},ut=L=>{const r=L.size;return r<=0?(NN("error","该文件为空,请重新上传"),!1):r>Lj*ve?(NN("error",`图片须小于${Lj}M`),!1):(yM(E=>E.length>=WN?(NN("warning",`图片最多上传${WN}张`),E):[...E,L]),!1)},QD=()=>{var L;return(e.type===_.ApplicationTypes.Agent&&(o==null?void 0:o.imageUpload)||e.type===_.ApplicationTypes.Dialog&&((L=e.arrange)==null?void 0:L.length)&&!!e.arrange[0].visionOpen&&(o==null?void 0:o.imageUpload))&&!O},hD=()=>!!z&&(o==null?void 0:o.fileUpload)&&(e==null?void 0:e.id)&&!O,st=L=>{var BM,vM;const r=Array.from(L||[]).filter(Boolean);if(!r.length)return;const E=QD(),v=hD(),f=[],MM=[];let F=0,EM=0,NM=0;r.forEach(OM=>{var ft,pt,bt;if(((ft=OM.type)==null?void 0:ft.startsWith("image/"))||!!Zt(OM.name)){E?f.push(OM):F++;return}const FN=(bt=(pt=OM.name)==null?void 0:pt.split(".").pop())==null?void 0:bt.toLowerCase();if(yi.includes(OM.type)||["pdf","doc","docx"].includes(FN||"")){v?MM.push(OM):EM++;return}NM++});const pM=[],TM=F+EM+NM;if(!v&&!E)TM&&pM.push(`当前不支持上传文件/图片,已忽略${TM}个文件`);else if(v&&!E){const OM=F+NM;OM&&pM.push(`仅支持上传 .doc/.docx/.pdf 文件,已忽略${OM}个其他类型文件`)}else if(!v&&E){const OM=EM+NM;OM&&pM.push(`仅支持上传图片(.jpg/.jpeg/.png/.bmp),已忽略${OM}个其他类型文件`)}else NM&&pM.push(`存在不支持的文件类型,已忽略${NM}个文件`);if(pM.length&&NN("warning",pM.join(";"),"precheck-warn"),f.length){const OM=Math.max(0,WN-J.length),rN=f.slice(0,OM);rN.forEach(FN=>ut(FN)),f.length>rN.length&&NN("warning",`最多上传${WN}张图片`)}MM.length&&((vM=(BM=WM.current)==null?void 0:BM.appendFiles)==null||vM.call(BM,MM))},nt=L=>{var E;const r=(E=L.clipboardData)==null?void 0:E.files;r&&r.length&&(L.preventDefault(),L.stopPropagation(),st(r))},Lt=L=>{L.preventDefault()},At=L=>{var E;L.preventDefault(),L.stopPropagation();const r=(E=L.dataTransfer)==null?void 0:E.files;r&&r.length&&st(r)},yt=()=>tM(exports,null,function*(){var L;return(L=t==null?void 0:t.data)!=null&&L.id?t:(HN.current||(HN.current=new Promise((r,E)=>{vN(!0),D==null||D({netOpen:u?SN.OPEN:SN.CLOSE}).then(v=>{var f,MM;g==null||g(v),vN(!1),y(!!((f=v.data)!=null&&f.netOpen)),De(!!((MM=v.data)!=null&&MM.enableNetOpen)),Ij(v),r(v)}).catch(v=>{HN.current=null,E(v)})})),HN.current)}),SD=L=>tM(exports,null,function*(){const r=yield yt();return kD(r,L)}),kD=(L,r)=>{const E=Zt(r.name);return new Promise(v=>{var MM;const f={files:[`${Le.v4()}.${E}`],isv:"minio",knowledgeId:((MM=L.data)==null?void 0:MM.id)||"",type:1};W==null||W.postTicket(f).then(F=>{W.uploadMinioFile(F.minio,r).then(()=>{var TM,BM;const EM=(TM=F.minio.endpoints)==null?void 0:TM[0],NM=F.minio.bucket,pM=(BM=F.minio.fileKeys)==null?void 0:BM[0];v(`${F.minio.useSSL?"https:":location.protocol}//${EM}/${NM}/${pM}`)}).catch(()=>{})}).catch(()=>{})})};I.useEffect(()=>{const L=Q.current;L&&!jt&&L.scrollTo({top:L.scrollHeight})},[T]);const ct=(L,r)=>new Promise(E=>{if(!r.file.url||!(e!=null&&e.id))return E();const v=XM(DM({},r.file),{type:1});W==null||W.postApplicationIdSessionKnowledgeSessionFile(e==null?void 0:e.id,L,v).finally(()=>{var f;(f=WM.current)==null||f.update().finally(E)})}),mD=()=>{var L;(L=t==null?void 0:t.data)!=null&&L.id&&(aN(!1),t.suspend())},UD=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)},fD=()=>{if(!Q.current)return;const L=Q.current.scrollTop<=-80;rD(L)},pD=_N.useMemoizedFn(L=>{var r,E;(r=Z.current)==null||r.update(L),(E=Z.current)==null||E.focus()}),bD=_N.useMemoizedFn(L=>{Tt(L)}),vD=_N.useMemoizedFn(()=>{var r;if(!((r=t==null?void 0:t.data)!=null&&r.id))return;iM.current=[...T.slice(1,T.length)],s(iM.current);const L=new Ie("",t.data.id,_.IHistoryRole.System);L.isWaiting=!0,iM.current=[L,...iM.current],s(iM.current),QN(!0),aN(!0),t.answerAgain()});I.useEffect(()=>{var L,r;VM.current=(L=t==null?void 0:t.data)==null?void 0:L.id,!tt&&((r=pN.current)==null||r.clear())},[t]);const GD=()=>{var E;if(!((E=t==null?void 0:t.data)!=null&&E.id))return;const r=T[T.length-1].messageTime;t.fetchMessages({endTime:r,pageSize:Xt}).then(v=>{const f=v||[];if(!f||!(f!=null&&f.length)){ie(!1);return}f.length<10?ie(!1):ie(!0),s([...T,...f.reverse()])})},PD=L=>tM(exports,null,function*(){var r,E;if(!((r=t==null?void 0:t.data)!=null&&r.id))y(L);else{if(yield t.setNetOpen(L),!((E=t.data)!=null&&E.id))return;y(L)}}),Tj=()=>tM(exports,null,function*(){t?t.fetchData().then(L=>{var r;(r=t==null?void 0:t.data)!=null&&r.id&&(y(L.netOpen),De(L.enableNetOpen))}):(y(typeof(C==null?void 0:C.connectNetwork)=="object"&&typeof(C==null?void 0:C.connectNetwork.default)=="boolean"?C.connectNetwork.default:!1),De(e.arrange[0].enableNetOpen))});I.useEffect(()=>{Tj()},[t]),I.useEffect(()=>{let L=null,r=null;const E=()=>{var pM,TM;if(!Q.current)return;const f=document.getElementById("chat-main"),MM=(pM=Q.current)==null?void 0:pM.querySelector(".infinite-scroll-component__outerdiv"),F=(TM=Q.current)==null?void 0:TM.querySelector(".infinite-scroll-component");if(!MM||!F||!f)return;const EM=f.offsetHeight;if(F.offsetHeight<=EM){if(MM.style.height==="100%")return;MM.style.height="100%"}else{if(MM.style.height==="auto")return;MM.style.height="auto"}},v=()=>{var F;if(typeof ResizeObserver=="undefined"||!Q.current)return;const f=document.getElementById("chat-main"),MM=(F=Q.current)==null?void 0:F.querySelector(".infinite-scroll-component");!MM||!f||(r=new ResizeObserver(()=>{E()}),r.observe(MM),r.observe(f))};return L=requestAnimationFrame(()=>{E(),v()}),()=>{L!==null&&cancelAnimationFrame(L),r==null||r.disconnect()}},[T]),I.useEffect(()=>{if(t)return;const L=()=>{const v=((d==null?void 0:d.promptVariables)||[]).filter(f=>f.type?!(f.type===_.PromptVariableType.User&&f.key==="query")&&!(f.type===_.PromptVariableType.System&&f.key==="datetime")&&f.status===1:f.key!=="query"&&f.status===1).map((f,MM)=>{var EM,NM;let F="";return typeof(C==null?void 0:C.promptVariables)=="object"&&(F=((NM=(EM=C.promptVariables.default)==null?void 0:EM.find(pM=>pM.key===f.key&&pM.type===f.type))==null?void 0:NM.value)||""),{id:MM+"",key:f.key,name:f.name,value:F,type:f.type}});te([...v].sort((f,MM)=>f.key.localeCompare(MM.key)))};return d!=null&&d.ready?L():d==null||d.addEventListener("ready",L),()=>{d==null||d.removeEventListener("ready",L)}},[t,d,C==null?void 0:C.promptVariables]);const at=()=>D==null?void 0:D({netOpen:u?SN.OPEN:SN.CLOSE}).then(L=>{var r,E;return g==null||g(L),vN(!1),y(!!((r=L.data)!=null&&r.netOpen)),De(!!((E=L.data)!=null&&E.enableNetOpen)),Ij(L),L}),rt=!!T.length,ot=I.useMemo(()=>{var L;return e.arrange&&((L=e.arrange[0])!=null&&L.openingContent)?i.jsx(ci,{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:rt,markdown:C==null?void 0:C.markdown}):null},[e==null?void 0:e.arrange,rt]);return I.useImperativeHandle(N,()=>({getCurrentInputText:()=>{var L;return(L=Z.current)==null?void 0:L.getCurrentText()}})),I.useEffect(()=>{var r;const L=(r=t==null?void 0:t.data)==null?void 0:r.id;L&&bM(E=>XM(DM({},E),{[L]:[]}))},[(lt=t==null?void 0:t.data)==null?void 0:lt.id]),i.jsxs("div",{className:"agent-chat",children:[OD?i.jsx("div",{className:"session-loading",children:i.jsx(n.Spin,{})}):i.jsxs(i.Fragment,{children:[(o==null?void 0:o.promptVariables)&&i.jsx(li,{ref:MN,appId:e.id,currentSession:t,promptVariables:IN,setPromptVariables:te,setCurrentSession:g}),i.jsxs("div",{className:"chat-main",id:"chat-main",style:eM,children:[i.jsx("div",{className:"chat-main-wrapper",id:"scrollableDiv",style:{height:"100%",overflowY:"auto",display:"flex",flexDirection:"column-reverse"},ref:Q,onScroll:fD,children:(Ct=t==null?void 0:t.data)!=null&&Ct.id&&(T!=null&&T.length)?i.jsxs(HD,{dataLength:T.length,next:GD,style:{display:"flex",flexDirection:"column-reverse",overflowX:"hidden"},inverse:!0,endMessage:T.length>Xt&&((Ot=Q.current)!=null&&Ot.scrollTop)&&((Yt=Q.current)==null?void 0:Yt.scrollTop)<-10?i.jsx(n.Divider,{plain:!0,children:"没有更多数据了"}):null,hasMore:it,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(Jz,{application:e,currentSession:t,history:L,docViewerUrl:j,isLastHistory:r===0,onRelatedClick:bD,onAgainClick:vD,onEditClick:pD,markdown:C==null?void 0:C.markdown},L.messageId+r)),!it&&ot]}):i.jsxs("div",{className:"main-empty",children:[(C==null?void 0:C.greeting)!==!1&&i.jsx(xz,{text:C!=null&&C.greeting&&typeof C.greeting=="object"&&C.greeting.text!==void 0?C.greeting.text:(xt=e.arrange)!=null&&xt.length&&((dt=e.arrange[0])!=null&&dt.greetings)?e.arrange[0].greetings:Vt.text,icon:C===void 0||C.greeting===!0||((wt=C.greeting)==null?void 0:wt.icon)===void 0?q||Vt.icon:C.greeting.icon,children:!!zM.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(ri,{ref:pN,sid:(Et=t==null?void 0:t.data)==null?void 0:Et.id,isRecommendClearing:YM,data:zM,layoutBreakpoints:typeof(C==null?void 0:C.greeting)=="object"?C.greeting.layoutBreakpoints:void 0,onItemClick:L=>{var E,v,f;if(a(L==null?void 0:L.question),CM(L==null?void 0:L.question),YM)return;L!=null&&L.id&&mM(!0);const r=(E=t==null?void 0:t.data)==null?void 0:E.id;o!=null&&o.fileUpload?(f=(v=WM.current)==null?void 0:v.clear())==null||f.then(()=>{var MM,F;L!=null&&L.id&&(r?(MM=ct(r,L))==null||MM.finally(()=>{mM(!1)}):(mM(!1),vN(!0),(F=at())==null||F.then(EM=>{var NM;(NM=ct(EM.id,L))==null||NM.finally(()=>{mM(!1)})})))}):r?mM(!1):(mM(!1),vN(!0),at())}})}),ot]})}),et&&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:()=>mD(),children:"停止回答"})}),jt&&(T==null?void 0:T.length)>0&&i.jsx("div",{className:"back-bottom",children:i.jsx(n.Button,{size:"small",onClick:()=>UD({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:[J.length>0&&i.jsx("div",{className:"input-files",children:J.map((L,r)=>i.jsx(Cz,{className:"thumb-40",file:L,actions:{upload:E=>tM(exports,null,function*(){B(v=>v+1);try{return yield SD(E)}finally{B(v=>Math.max(0,v-1))}}),remove:()=>{yM(E=>E.filter((v,f)=>f!==r)),_M(E=>E.filter((v,f)=>f!==r))}},onUrlChange:E=>{_M(v=>{const f=[...v];return f[r]=E,f})}},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===_.ApplicationTypes.Agent&&(o==null?void 0:o.imageUpload)||e.type===_.ApplicationTypes.Dialog&&((Qt=e.arrange)==null?void 0:Qt.length)&&!!e.arrange[0].visionOpen&&(o==null?void 0:o.imageUpload))&&i.jsx(n.Upload,{multiple:!0,disabled:J.length>=WN||O,accept:".jpg, .png, .jpeg,.bmp",listType:"picture-card",beforeUpload:ut,className:"footer-upload-picture",showUploadList:!1,children:J.length<WN?i.jsx(n.Tooltip,{placement:"topLeft",overlayClassName:"footer-upload-tooltip",title:i.jsx("div",{children:`支持上传.jpg .png .jpeg
|
|
10
|
-
.bmp格式的图片数据,单文件最大${Lj}M,最多${WN}张`}),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(oi,{appId:e==null?void 0:e.id,ref:WM,isFirstSession:tt,docViewerUrl:j,onStatusChange:L=>tM(exports,null,function*(){L!=="process"?(bN(!0),Tj()):bN(!1)}),createSession:()=>yt().then(L=>{var E;return((E=L.data)==null?void 0:E.id)||""}),sid:(ht=t==null?void 0:t.data)==null?void 0:ht.id,disabled:Dj||O,afterFileAdd:(L,r)=>{r&&bM(E=>{const v=E[r]||[];return{[r]:[...v,L]}})},afterFileDelete:L=>{var E;const r=(E=t==null?void 0:t.data)==null?void 0:E.id;r&&bM(v=>{const f=v[r]||[];return{[r]:f.filter(MM=>MM.id!==L)}})},onFileListChange:L=>{$M(L)},shouldContinue:cD,afterFilesClear:()=>{var r;const L=(r=t==null?void 0:t.data)==null?void 0:r.id;L&&(bM({[L]:[]}),Tj())}}):null,(o==null?void 0:o.prompt)&&(e==null?void 0:e.id)&&i.jsx(_z,{appId:e.id,list:[],search:S?gM:"",onPromptSelect:L=>{CM(L.context),a(L.context)},disabled:O})]}),i.jsxs(n.Space,{children:[(o==null?void 0:o.connectNetwork)&&e.type===_.ApplicationTypes.Dialog&&((St=e.arrange)==null?void 0:St.length)&&!!e.arrange[0].enableNetOpen&&i.jsx(vz,{sessionId:(kt=t==null?void 0:t.data)==null?void 0:kt.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):CD,disabledTip:t?void 0:"网络访问已被禁用",onNetStatusChange:L=>{PD(L)}}),(o==null?void 0:o.sessionList)&&i.jsx(Uz,{currentSessionId:(mt=t==null?void 0:t.data)==null?void 0:mt.id,onSessionChange:(L,r)=>{CM(void 0),we(!0),g==null||g(r)},disabled:O}),jM&&kM==="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:O,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(dM.PlusOutlined,{}),className:"add-btn",type:"primary",disabled:et||!t||!T.length||O,onClick:()=>{var L,r;we(!1),g==null||g(null),HN.current=null,y(!1),(L=MN.current)==null||L.clear(),(r=pN.current)==null||r.clear()},children:"新会话"})]})]}),!!zj&&i.jsx("div",{className:"remainingSeconds-mark"})]}),i.jsxs("div",{className:"footer-textarea",onPaste:nt,onPasteCapture:nt,onDrop:At,onDropCapture:At,onDragOver:Lt,onDragOverCapture:Lt,children:[i.jsx(ai,{ref:Z,maxLength:ZM,text:sM,networkStatus:!1,loading:Dt||de,disabled:oM||H||O||Dt||de,onTextSend:Tt,onChange:(L,r)=>{CM(L);const E=r.getText().replace(/[\n\s]+$/,"");a(E),PM(E),S||V(!0)},clearAction:i.jsx(n.Space,{size:0,children:i.jsx(n.Button,{type:"link",disabled:Dj||O,ghost:!0,icon:i.jsx(uM,{style:{fontSize:22},type:"icon-qingchujiyi"}),onClick:()=>wD()})})}),!!zj&&i.jsxs("div",{className:"remainingSeconds-time",children:["您之前对话触发敏感词拦截,当前处于禁言状态,暂时无法发送消息,剩余禁言时长",zj]})]})]})}),i.jsx(wz,{tips:k}),fM&&i.jsx(hz,{isvisible:fM,files:qM,sessionId:(Ut=t==null?void 0:t.data)==null?void 0:Ut.id,onClose:L=>{wM(!1),aD(!1)}})]}),zt&&i.jsx(bz,{currentSession:t,application:e,networkStatus:u,setCurrentSession:g,disabled:O,isSessionHistoryVisible:zt,setIsSessionHistoryVisible:It,onSessionChange:L=>{we(!0)}})]})});const Yi=M=>{const{disabled:N,checkedValues:e,currKnowledgeList:j,selectCount:t,onSelectChange:D}=M,[z,g]=I.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=>{g(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," 个"]})]})})})},Fz=M=>{var Q,W;const{currentSession:N,application:e,setCheckKnowledges:j}=M,{mode:t,transform:D,features:z}=I.useContext(JM),[g,u]=I.useState([]),[y,T]=I.useState(typeof(z==null?void 0:z.knowledges)=="object"?((Q=z.knowledges.default)==null?void 0:Q.map(d=>d.id))||[]:[]),[s,A]=I.useState(0),[a,c]=I.useState(!1);I.useEffect(()=>{if(!(e!=null&&e.id))return;const d=e.arrange;if(!(d!=null&&d.length))return;const k=d[0].knowledges||[];u(k);const o=typeof(z==null?void 0:z.knowledges)=="object"&&z.knowledges.default||k;if(Array.isArray(o)&&o.some(Y=>Array.isArray(Y.fileIds)&&Y.fileIds.length===0))throw Error("fileIds cannot be an empty array");if(Pe(o||[])>kN)throw Error(`knowledges and fileIds total count cannot exceed ${kN}`);if(!N){T(o.map(K=>K.id)),A(o.length),j==null||j(o);return}const $=()=>{const K=N.knowledges||o;A(K.length);const Y=K.map(eM=>eM.id);T(Y)};return $(),N.addEventListener("data:updated",$),()=>{N==null||N.removeEventListener("data:updated",$)}},[e,N]),I.useEffect(()=>{var m;if(!a||(c(!1),!(e!=null&&e.id)))return;const d=[];y==null||y.map(k=>{const o=g==null?void 0:g.find(p=>p.id===k);d.push(o)}),(m=N==null?void 0:N.data)!=null&&m.id&&N.setKnowledges(d)},[a]);const U=d=>{c(!0),T(d);const m=[];d==null||d.map(k=>{const o=g==null?void 0:g.find(p=>p.id===k);m.push(o)}),j==null||j(m),A(d.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)&&g.length!==0&&i.jsx(Yi,{disabled:typeof(z==null?void 0:z.knowledges)=="object"&&(z==null?void 0:z.knowledges.diabled)||!1,checkedValues:y,currKnowledgeList:g,selectCount:s,onSelectChange:U})]})};const Vz=I.forwardRef((M,N)=>{const{sessionId:e,appId:j,docViewerUrl:t}=M,[D,z]=I.useState(),{showHeader:g,agentClient:u,sider:y,onSessionLoad:T,features:s,mode:A}=I.useContext(JM),[a,c]=I.useState(),U=I.useRef(null),[Q,W]=I.useState(""),[d,m]=I.useState(),k=I.useRef(null),[o,p]=I.useState(!1);I.useState([]);const{setIsSwitchingToExistingSession:$}=kj();I.useEffect(()=>{var Y;p(D?!!((Y=D.data)!=null&&Y.netOpen):typeof(s==null?void 0:s.connectNetwork)=="object"&&typeof(s==null?void 0:s.connectNetwork.default)=="boolean"?s.connectNetwork.default:!1)},[D]),I.useEffect(()=>{const Y=()=>tM(exports,null,function*(){const eM=u==null?void 0:u.application;if(!(eM!=null&&eM.id))return;const O=eM==null?void 0:eM.arrange;if(!(O!=null&&O.length))return;const b=O[0].embeddingService;W(b),c(eM)});if(u!=null&&u.ready){Y();return}return u==null||u.addEventListener("ready",()=>Y()),()=>{u==null||u.removeEventListener("ready",Y)}},[u]),I.useEffect(()=>{u&&e&&(u.ready?u==null||u.getSessions().then(Y=>tM(exports,null,function*(){z==null||z(Y.find(eM=>eM.id===e))})):u.addEventListener("ready",()=>tM(exports,null,function*(){u==null||u.getSessions().then(Y=>tM(exports,null,function*(){z==null||z(Y.find(eM=>eM.id===e))}))}),!0))},[u,e]),I.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 K=Y=>{var eM;return(eM=U.current)==null?void 0:eM.create(XM(DM({},Y),{knowledges:d}))};return I.useImperativeHandle(N,()=>({createSession:Y=>K(Y),getSessionList:()=>{var eM;const Y=((eM=U.current)==null?void 0:eM.list())||[];return Promise.resolve(Y)},getCurrentInputText:()=>{var Y;return(Y=k.current)==null?void 0:Y.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(mj,{ref:U,appId:j,networkStatus:o,currentSession:D,application:a,setCurrentSession:z,checkKnowledges:d,setCheckKnowledges:g?m:void 0,sessionId:e,afterSessionClick:Y=>{var eM,O;((eM=Y.data)==null?void 0:eM.id)!==((O=D==null?void 0:D.data)==null?void 0:O.id)&&$(!0)}})}),i.jsx("div",{className:"dialog-content",children:i.jsxs("div",{className:"dialog-chat",children:[g&&i.jsx("div",{className:"dialog-chat-header",children:i.jsx(Fz,{setCheckKnowledges:m,application:a,currentSession:D})}),i.jsx("div",{className:"dialog-chat-content",children:(a==null?void 0:a.id)&&i.jsx(Hz,{setNetworkStatus:p,networkStatus:o,application:a,currentSession:D,onCreateSession:K,docViewerUrl:t,embeddingService:Q,setCurrentSession:z,ref:k})})]})})]})})}),Xz=I.forwardRef((M,N)=>{const{className:e,triggerButton:j,size:t,theme:D,icon:z,docViewerUrl:g,token:u,debug:y,env:T,plugins:s,mcp:A,footer:a,defaultInput:c,onComment:U,onSessionLoad:Q,onSessionUnload:W,onMessage:d,beforeMessageSend:m,bodyStyle:k,apiUrl:o,sessionId:p,disabled:$,transform:K,features:Y,stream:eM,agentClient:O,application:C}=M,b=I.useRef(null),[q,jM]=I.useState(!1),[kM,G]=I.useState(),[oM,GM]=I.useState(t),[iM,VM]=I.useState(M.open),ZM=I.useRef(null);I.useEffect(()=>{C&&(console.log("[AgentClientUI] token",O,C),G(C.id))},[C]),n.ConfigProvider.config({theme:D}),I.useEffect(()=>{t&&GM(t)},[t]);const w=(J,{element:yM,size:lM})=>{GM({width:Number(lM.width),height:lM.height})};return I.useImperativeHandle(N,()=>({createSession:J=>{var yM;return(yM=ZM.current)==null?void 0:yM.createSession(J)},getSessionList:()=>{var J;return(J=ZM.current)==null?void 0:J.getSessionList()},getCurrentInputText:()=>{var J;return(J=ZM.current)==null?void 0:J.getCurrentInputText()}})),i.jsx(n.ConfigProvider,{locale:Ti,children:i.jsxs(ni,{value:XM(DM({},M),{popupContainer:b,agentClient:O,footer:a,defaultInput:c,onComment:U,onSessionLoad:Q,onSessionUnload:W,onMessage:d,beforeMessageSend:m,bodyStyle:k,disabled:$,transform:K,features:Y}),children:[i.jsx(_D.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:w,handle:i.jsx("span",{className:"resize-handle-ew"}),resizeHandles:e=="float"?["w"]:[],children:i.jsxs("div",{id:"dialog-modal",className:`gbot-dialog-modal ${e} ${iM?"opened":"closed"}`,style:XM(DM({},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:b,children:[q?i.jsx("div",{className:"loading",children:i.jsx(n.Spin,{})}):kM&&O?i.jsx(fz,{children:i.jsx(Vz,{ref:ZM,appId:kM,docViewerUrl:g,bodyStyle:k,sessionId:p})}):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)&&!iM&&i.jsx(n.Button,{className:`${e}-trigger-btn open-btn`,style:j.style,icon:i.jsx("img",{src:z}),onClick:()=>VM(!0)})]})})}),$z="@glodon-aiot/agent-cli-ui",Kz="3.19.2-alpha.2",qz="./dist/es/index.mjs",MI="./dist/lib/index.js",NI="./dist/src/index.d.ts",eI={import:"./dist/es/index.mjs",require:"./dist/lib/index.js",types:"./dist/src/index.d.ts"},jI=["dist"],tI="module",iI="dist/src/index.d.ts",DI={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"},zI={"@ant-design/icons":"^5.3.4","@glodon-aiot/apis":"^3.19.2-alpha.2","@glodon-aiot/bot-client-sdk":"^3.19.2-alpha.2","@glodon-aiot/react-components":"^3.19.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"},II={"@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"},gI=[">0.2%","not dead","not op_mini all"],TI=["last 1 chrome version","last 1 firefox version","last 1 safari version"],uI={commitizen:{path:"node_modules/cz-customizable"},"cz-customizable":{config:".cz-config.cjs"}},sI={access:"public",registry:"https://registry.npmjs.org/"},nI={hooks:{"commit-msg":"validate-commit-msg"}},LI={name:$z,version:Kz,module:qz,main:MI,typings:NI,exports:eI,files:jI,type:tI,types:iI,scripts:DI,dependencies:zI,devDependencies:II,"lint-staged":{"*.{js,css,md,jsx,less,ts,tsx,json}":"prettier --write"},production:gI,development:TI,config:uI,publishConfig:sI,husky:nI};var xi=(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))(xi||{});//! moment.js
|
|
10
|
+
.bmp格式的图片数据,单文件最大${Lj}M,最多${WN}张`}),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(oi,{appId:e==null?void 0:e.id,ref:WM,isFirstSession:tt,docViewerUrl:j,onStatusChange:L=>tM(exports,null,function*(){L!=="process"?(bN(!0),Tj()):bN(!1)}),createSession:()=>yt().then(L=>{var E;return((E=L.data)==null?void 0:E.id)||""}),sid:(ht=t==null?void 0:t.data)==null?void 0:ht.id,disabled:Dj||O,afterFileAdd:(L,r)=>{r&&bM(E=>{const v=E[r]||[];return{[r]:[...v,L]}})},afterFileDelete:L=>{var E;const r=(E=t==null?void 0:t.data)==null?void 0:E.id;r&&bM(v=>{const f=v[r]||[];return{[r]:f.filter(MM=>MM.id!==L)}})},onFileListChange:L=>{$M(L)},shouldContinue:cD,afterFilesClear:()=>{var r;const L=(r=t==null?void 0:t.data)==null?void 0:r.id;L&&(bM({[L]:[]}),Tj())}}):null,(o==null?void 0:o.prompt)&&(e==null?void 0:e.id)&&i.jsx(_z,{appId:e.id,list:[],search:S?gM:"",onPromptSelect:L=>{CM(L.context),a(L.context)},disabled:O})]}),i.jsxs(n.Space,{children:[(o==null?void 0:o.connectNetwork)&&e.type===_.ApplicationTypes.Dialog&&((St=e.arrange)==null?void 0:St.length)&&!!e.arrange[0].enableNetOpen&&i.jsx(vz,{sessionId:(kt=t==null?void 0:t.data)==null?void 0:kt.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):CD,disabledTip:t?void 0:"网络访问已被禁用",onNetStatusChange:L=>{PD(L)}}),(o==null?void 0:o.sessionList)&&i.jsx(Uz,{currentSessionId:(mt=t==null?void 0:t.data)==null?void 0:mt.id,onSessionChange:(L,r)=>{CM(void 0),we(!0),g==null||g(r)},disabled:O}),jM&&kM==="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:O,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(dM.PlusOutlined,{}),className:"add-btn",type:"primary",disabled:et||!t||!T.length||O,onClick:()=>{var L,r;we(!1),g==null||g(null),HN.current=null,y(!1),(L=MN.current)==null||L.clear(),(r=pN.current)==null||r.clear()},children:"新会话"})]})]}),!!zj&&i.jsx("div",{className:"remainingSeconds-mark"})]}),i.jsxs("div",{className:"footer-textarea",onPaste:nt,onPasteCapture:nt,onDrop:At,onDropCapture:At,onDragOver:Lt,onDragOverCapture:Lt,children:[i.jsx(ai,{ref:Z,maxLength:ZM,text:sM,networkStatus:!1,loading:Dt||de,disabled:oM||H||O||Dt||de,onTextSend:Tt,onChange:(L,r)=>{CM(L);const E=r.getText().replace(/[\n\s]+$/,"");a(E),PM(E),S||V(!0)},clearAction:i.jsx(n.Space,{size:0,children:i.jsx(n.Button,{type:"link",disabled:Dj||O,ghost:!0,icon:i.jsx(uM,{style:{fontSize:22},type:"icon-qingchujiyi"}),onClick:()=>wD()})})}),!!zj&&i.jsxs("div",{className:"remainingSeconds-time",children:["您之前对话触发敏感词拦截,当前处于禁言状态,暂时无法发送消息,剩余禁言时长",zj]})]})]})}),i.jsx(wz,{tips:k}),fM&&i.jsx(hz,{isvisible:fM,files:qM,sessionId:(Ut=t==null?void 0:t.data)==null?void 0:Ut.id,onClose:L=>{wM(!1),aD(!1)}})]}),zt&&i.jsx(bz,{currentSession:t,application:e,networkStatus:u,setCurrentSession:g,disabled:O,isSessionHistoryVisible:zt,setIsSessionHistoryVisible:It,onSessionChange:L=>{we(!0)}})]})});const Yi=M=>{const{disabled:N,checkedValues:e,currKnowledgeList:j,selectCount:t,onSelectChange:D}=M,[z,g]=I.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=>{g(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," 个"]})]})})})},Fz=M=>{var Q,W;const{currentSession:N,application:e,setCheckKnowledges:j}=M,{mode:t,transform:D,features:z}=I.useContext(JM),[g,u]=I.useState([]),[y,T]=I.useState(typeof(z==null?void 0:z.knowledges)=="object"?((Q=z.knowledges.default)==null?void 0:Q.map(d=>d.id))||[]:[]),[s,A]=I.useState(0),[a,c]=I.useState(!1);I.useEffect(()=>{if(!(e!=null&&e.id))return;const d=e.arrange;if(!(d!=null&&d.length))return;const k=d[0].knowledges||[];u(k);const o=typeof(z==null?void 0:z.knowledges)=="object"&&z.knowledges.default||k;if(Array.isArray(o)&&o.some(Y=>Array.isArray(Y.fileIds)&&Y.fileIds.length===0))throw Error("fileIds cannot be an empty array");if(Pe(o||[])>kN)throw Error(`knowledges and fileIds total count cannot exceed ${kN}`);if(!N){T(o.map(K=>K.id)),A(o.length),j==null||j(o);return}const $=()=>{const K=N.knowledges||o;A(K.length);const Y=K.map(eM=>eM.id);T(Y)};return $(),N.addEventListener("data:updated",$),()=>{N==null||N.removeEventListener("data:updated",$)}},[e,N]),I.useEffect(()=>{var m;if(!a||(c(!1),!(e!=null&&e.id)))return;const d=[];y==null||y.map(k=>{const o=g==null?void 0:g.find(p=>p.id===k);d.push(o)}),(m=N==null?void 0:N.data)!=null&&m.id&&N.setKnowledges(d)},[a]);const U=d=>{c(!0),T(d);const m=[];d==null||d.map(k=>{const o=g==null?void 0:g.find(p=>p.id===k);m.push(o)}),j==null||j(m),A(d.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)&&g.length!==0&&i.jsx(Yi,{disabled:typeof(z==null?void 0:z.knowledges)=="object"&&(z==null?void 0:z.knowledges.diabled)||!1,checkedValues:y,currKnowledgeList:g,selectCount:s,onSelectChange:U})]})};const Vz=I.forwardRef((M,N)=>{const{sessionId:e,appId:j,docViewerUrl:t}=M,[D,z]=I.useState(),{showHeader:g,agentClient:u,sider:y,onSessionLoad:T,features:s,mode:A}=I.useContext(JM),[a,c]=I.useState(),U=I.useRef(null),[Q,W]=I.useState(""),[d,m]=I.useState(),k=I.useRef(null),[o,p]=I.useState(!1);I.useState([]);const{setIsSwitchingToExistingSession:$}=kj();I.useEffect(()=>{var Y;p(D?!!((Y=D.data)!=null&&Y.netOpen):typeof(s==null?void 0:s.connectNetwork)=="object"&&typeof(s==null?void 0:s.connectNetwork.default)=="boolean"?s.connectNetwork.default:!1)},[D]),I.useEffect(()=>{const Y=()=>tM(exports,null,function*(){const eM=u==null?void 0:u.application;if(!(eM!=null&&eM.id))return;const O=eM==null?void 0:eM.arrange;if(!(O!=null&&O.length))return;const b=O[0].embeddingService;W(b),c(eM)});if(u!=null&&u.ready){Y();return}return u==null||u.addEventListener("ready",()=>Y()),()=>{u==null||u.removeEventListener("ready",Y)}},[u]),I.useEffect(()=>{u&&e&&(u.ready?u==null||u.getSessions().then(Y=>tM(exports,null,function*(){z==null||z(Y.find(eM=>eM.id===e))})):u.addEventListener("ready",()=>tM(exports,null,function*(){u==null||u.getSessions().then(Y=>tM(exports,null,function*(){z==null||z(Y.find(eM=>eM.id===e))}))}),!0))},[u,e]),I.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 K=Y=>{var eM;return(eM=U.current)==null?void 0:eM.create(XM(DM({},Y),{knowledges:d}))};return I.useImperativeHandle(N,()=>({createSession:Y=>K(Y),getSessionList:()=>{var eM;const Y=((eM=U.current)==null?void 0:eM.list())||[];return Promise.resolve(Y)},getCurrentInputText:()=>{var Y;return(Y=k.current)==null?void 0:Y.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(mj,{ref:U,appId:j,networkStatus:o,currentSession:D,application:a,setCurrentSession:z,checkKnowledges:d,setCheckKnowledges:g?m:void 0,sessionId:e,afterSessionClick:Y=>{var eM,O;((eM=Y.data)==null?void 0:eM.id)!==((O=D==null?void 0:D.data)==null?void 0:O.id)&&$(!0)}})}),i.jsx("div",{className:"dialog-content",children:i.jsxs("div",{className:"dialog-chat",children:[g&&i.jsx("div",{className:"dialog-chat-header",children:i.jsx(Fz,{setCheckKnowledges:m,application:a,currentSession:D})}),i.jsx("div",{className:"dialog-chat-content",children:(a==null?void 0:a.id)&&i.jsx(Hz,{setNetworkStatus:p,networkStatus:o,application:a,currentSession:D,onCreateSession:K,docViewerUrl:t,embeddingService:Q,setCurrentSession:z,ref:k})})]})})]})})}),Xz=I.forwardRef((M,N)=>{const{className:e,triggerButton:j,size:t,theme:D,icon:z,docViewerUrl:g,token:u,debug:y,env:T,plugins:s,mcp:A,footer:a,defaultInput:c,onComment:U,onSessionLoad:Q,onSessionUnload:W,onMessage:d,beforeMessageSend:m,bodyStyle:k,apiUrl:o,sessionId:p,disabled:$,transform:K,features:Y,stream:eM,agentClient:O,application:C}=M,b=I.useRef(null),[q,jM]=I.useState(!1),[kM,G]=I.useState(),[oM,GM]=I.useState(t),[iM,VM]=I.useState(M.open),ZM=I.useRef(null);I.useEffect(()=>{C&&(console.log("[AgentClientUI] token",O,C),G(C.id))},[C]),n.ConfigProvider.config({theme:D}),I.useEffect(()=>{t&&GM(t)},[t]);const w=(J,{element:yM,size:lM})=>{GM({width:Number(lM.width),height:lM.height})};return I.useImperativeHandle(N,()=>({createSession:J=>{var yM;return(yM=ZM.current)==null?void 0:yM.createSession(J)},getSessionList:()=>{var J;return(J=ZM.current)==null?void 0:J.getSessionList()},getCurrentInputText:()=>{var J;return(J=ZM.current)==null?void 0:J.getCurrentInputText()}})),i.jsx(n.ConfigProvider,{locale:Ti,children:i.jsxs(ni,{value:XM(DM({},M),{popupContainer:b,agentClient:O,footer:a,defaultInput:c,onComment:U,onSessionLoad:Q,onSessionUnload:W,onMessage:d,beforeMessageSend:m,bodyStyle:k,disabled:$,transform:K,features:Y}),children:[i.jsx(_D.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:w,handle:i.jsx("span",{className:"resize-handle-ew"}),resizeHandles:e=="float"?["w"]:[],children:i.jsxs("div",{id:"dialog-modal",className:`gbot-dialog-modal ${e} ${iM?"opened":"closed"}`,style:XM(DM({},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:b,children:[q?i.jsx("div",{className:"loading",children:i.jsx(n.Spin,{})}):kM&&O?i.jsx(fz,{children:i.jsx(Vz,{ref:ZM,appId:kM,docViewerUrl:g,bodyStyle:k,sessionId:p})}):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)&&!iM&&i.jsx(n.Button,{className:`${e}-trigger-btn open-btn`,style:j.style,icon:i.jsx("img",{src:z}),onClick:()=>VM(!0)})]})})}),$z="@glodon-aiot/agent-cli-ui",Kz="3.19.2-alpha.4",qz="./dist/es/index.mjs",MI="./dist/lib/index.js",NI="./dist/src/index.d.ts",eI={import:"./dist/es/index.mjs",require:"./dist/lib/index.js",types:"./dist/src/index.d.ts"},jI=["dist"],tI="module",iI="dist/src/index.d.ts",DI={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"},zI={"@ant-design/icons":"^5.3.4","@glodon-aiot/apis":"^3.19.2-alpha.4","@glodon-aiot/bot-client-sdk":"^3.19.2-alpha.4","@glodon-aiot/react-components":"^3.19.2-alpha.4","@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"},II={"@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"},gI=[">0.2%","not dead","not op_mini all"],TI=["last 1 chrome version","last 1 firefox version","last 1 safari version"],uI={commitizen:{path:"node_modules/cz-customizable"},"cz-customizable":{config:".cz-config.cjs"}},sI={access:"public",registry:"https://registry.npmjs.org/"},nI={hooks:{"commit-msg":"validate-commit-msg"}},LI={name:$z,version:Kz,module:qz,main:MI,typings:NI,exports:eI,files:jI,type:tI,types:iI,scripts:DI,dependencies:zI,devDependencies:II,"lint-staged":{"*.{js,css,md,jsx,less,ts,tsx,json}":"prettier --write"},production:gI,development:TI,config:uI,publishConfig:sI,husky:nI};var xi=(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))(xi||{});//! 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.19.2-alpha.
|
|
3
|
+
"version": "3.19.2-alpha.4",
|
|
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.19.2-alpha.
|
|
35
|
-
"@glodon-aiot/bot-client-sdk": "^3.19.2-alpha.
|
|
36
|
-
"@glodon-aiot/react-components": "^3.19.2-alpha.
|
|
34
|
+
"@glodon-aiot/apis": "^3.19.2-alpha.4",
|
|
35
|
+
"@glodon-aiot/bot-client-sdk": "^3.19.2-alpha.4",
|
|
36
|
+
"@glodon-aiot/react-components": "^3.19.2-alpha.4",
|
|
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",
|