@glodon-aiot/agent-cli-ui 3.20.1 → 3.20.2-alpha.0
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
|
@@ -4916,7 +4916,7 @@ const KI = bN((M, N) => {
|
|
|
4916
4916
|
})]
|
|
4917
4917
|
})
|
|
4918
4918
|
});
|
|
4919
|
-
}), Mg = "@glodon-aiot/agent-cli-ui", Ng = "3.20.
|
|
4919
|
+
}), Mg = "@glodon-aiot/agent-cli-ui", Ng = "3.20.2-alpha.0", eg = "./dist/es/index.mjs", jg = "./dist/lib/index.js", tg = "./dist/src/index.d.ts", ig = {
|
|
4920
4920
|
import: "./dist/es/index.mjs",
|
|
4921
4921
|
require: "./dist/lib/index.js",
|
|
4922
4922
|
types: "./dist/src/index.d.ts"
|
|
@@ -4938,9 +4938,9 @@ const KI = bN((M, N) => {
|
|
|
4938
4938
|
commit: "cz"
|
|
4939
4939
|
}, Tg = {
|
|
4940
4940
|
"@ant-design/icons": "^5.3.4",
|
|
4941
|
-
"@glodon-aiot/apis": "^3.20.
|
|
4942
|
-
"@glodon-aiot/bot-client-sdk": "^3.20.
|
|
4943
|
-
"@glodon-aiot/react-components": "^3.20.
|
|
4941
|
+
"@glodon-aiot/apis": "^3.20.2-alpha.0",
|
|
4942
|
+
"@glodon-aiot/bot-client-sdk": "^3.20.2-alpha.0",
|
|
4943
|
+
"@glodon-aiot/react-components": "^3.20.2-alpha.0",
|
|
4944
4944
|
"@matejmazur/react-mathjax": "^0.1.10",
|
|
4945
4945
|
"@react-pdf-viewer/core": "^3.12.0",
|
|
4946
4946
|
"@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=I.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:g,networkStatus:u,setNetworkStatus:y}=M,[T,s]=I.useState([]),[A,a]=I.useState(),[c,U]=I.useState(),h=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(BM),[lM,PM]=I.useState(!1),iM=I.useRef(T),VM=I.useRef(void 0),WM=I.useRef(new Set),[E,H]=I.useState(0),[AM,CM]=I.useState([]),[bM,l]=I.useState([]),[J,B]=I.useState(0),[x,_]=I.useState(!1);I.useEffect(()=>{_(J>0)},[J]);const DM=I.useRef(null),[LM,YM]=I.useState([]),[JM,Q]=I.useState(!1),[V,TM]=I.useState(!1),[RM,sM]=I.useState(""),[EM,QM]=I.useState(),[fM,ZM]=I.useState({}),$M=I.useRef(null),JN=I.useRef(null),mM=I.useRef(null),[xM,MN]=I.useState(!1),[KM,Oe]=I.useState([]),[Ye,xe]=I.useState(!0),[aD,rD]=I.useState(!0),[jt,aN]=I.useState(!1),[zj,QN]=I.useState(!1),[tt,oD]=I.useState(!1),[IN,je]=I.useState(typeof(C==null?void 0:C.promptVariables)=="object"?C.promptVariables.default||[]:[]),[lD,CD]=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(We(L)>kN)throw Error(`knowledges and fileIds total count cannot exceed ${kN}`)}return L}),[it,pN]=I.useState(!1),[Dt,te]=I.useState(!1),[OD,ie]=I.useState(typeof(C==null?void 0:C.connectNetwork)=="object"&&typeof(C==null?void 0:C.connectNetwork.default)=="boolean"?C.connectNetwork.default:!1),[zt,de]=I.useState(!1),[YD,hN]=I.useState(!1),[xD,dD]=I.useState(null),[we,bN]=I.useState(!1),[It,gt]=I.useState(!1),{isSwitchingToExistingSession:Tt,setIsSwitchingToExistingSession:Ee}=mj(),BN=I.useRef(null),[Ij,wD]=I.useState("");I.useEffect(()=>{if(!G)return;let L=Hz(G);wD(L)},[G]),I.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]),I.useEffect(()=>{var w,v;t&&(iM.current=[]),s([]);const L=h.current;if(L&&L.scrollTo({top:0}),!((w=t==null?void 0:t.data)!=null&&w.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?te(!1):te(!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&&je(t.promptVariables.sort((w,v)=>w.key.localeCompare(v.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]),I.useEffect(()=>{var r;if(!((r=t==null?void 0:t.data)!=null&&r.id))return;const L=w=>{var v;console.error(w.message,w.cause,"e.case"),n.notification.config({getContainer:()=>(b==null?void 0:b.current)||document.body,prefixCls:"gbot-notification"}),n.notification.error({message:((v=w.cause)==null?void 0:v.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 v=new ze("",L,Z.IHistoryRole.System);v.isContext=!0,s([v,...T])})};I.useEffect(()=>{e!=null&&e.id&&(W==null||W.getRecommendQues(e.id).then(L=>{YM(L)}))},[m,e]);const ut=L=>tM(exports,null,function*(){var IM,vM;if(O){NN("error","发送功能被禁用");return}const r=L||A;if(!(r!=null&&r.trim())){NN("error","请输入你想问的");return}if(!(IN==null?void 0:IN.every(GM=>!!(GM!=null&&GM.value))))if(o!=null&&o.promptVariables){NN("error","变量值不能为空");return}else console.error("变量值不能为空",IN==null?void 0:IN.map(GM=>!!(GM!=null&&GM.value)));if(zj){NN("error","正在回复中");return}if(lM){NN("error","等待初始化");return}if(!Ye){NN("error","正在解析文件");return}if(x){NN("error","正在上传图片");return}CM([]),l([]);const v=(IM=t==null?void 0:t.data)==null?void 0:IM.id;if(!v){if(we)return;bN(!0),D==null||D({netOpen:u?SN.OPEN:SN.CLOSE}).then(GM=>{var oM,rN;pN(!0),y(!!((oM=GM.data)!=null&&oM.netOpen)),ie(!!((rN=GM.data)!=null&&rN.enableNetOpen)),gj(GM).then(()=>{g==null||g(GM),pN(!1),U(r)})}).catch(GM=>{bN(!1)});return}if(we)return;bN(!0),de(!0);const f=yj(r,bM,fM[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:Z.ChatMessageRole.User,files:fM[v]}}):MM=!0}catch(GM){MM=!1}if(de(!1),MM===!1){bN(!1);return}let F=r;typeof MM=="object"&&(F=MM.content||r);const NM=yield(()=>new Promise(GM=>{je(oM=>(GM(oM),oM))}))();if(!(yield t.setPromptVariables(NM))){bN(!1);return}((vM=fM[v])==null?void 0:vM.length)>0?QD(F):Tj(F)}),gj=L=>new Promise((r,w)=>tM(exports,null,function*(){const MM=(L==null?void 0:L.promptVariables).filter(F=>F.type?!((F.type===Z.PromptVariableType.User||F.type===void 0)&&F.key==="query")&&!((F.type===Z.PromptVariableType.System||F.type===void 0)&&F.key==="datetime"):F.key!=="query").map(F=>{var NM;const wM=(NM=IN.find(pM=>pM.key===F.key&&pM.type===F.type))==null?void 0:NM.value;return F.value=wM||"",F});je(MM.sort((F,wM)=>F.key.localeCompare(wM.key))),yield L==null?void 0:L.setPromptVariables(MM).catch(F=>{console.error(F),NN("error",F.message)}),r()})),QD=L=>{var f,MM,F;if(xe(!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 w=[],v=new Set;(F=fM[r])==null||F.forEach(wM=>{v.has(wM.id)||(w.push(wM),v.add(wM.id))}),xe(!0),Tj(L,w)};I.useEffect(()=>{if(!c||!t)return;const L=c,r=()=>tM(exports,null,function*(){de(!0);const w=yj(L,bM,fM[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:w,sessionId:t.id,role:Z.ChatMessageRole.User,files:fM[t.id]}}):v=!0}catch(f){v=!1}if(de(!1),v===!1){bN(!1);return}Tj(L),U(void 0)});return t.ready?r():t.addEventListener("ready",r,!0),()=>{t==null||t.removeEventListener("ready",r)}},[c,t]);const Tj=(L,r)=>tM(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 v=yj(L,bM,r,(e==null?void 0:e.type)||0);let f;if(e.type===Z.ApplicationTypes.Agent)f=void 0;else if(e.type===Z.ApplicationTypes.Dialog&&((vM=e.arrange)!=null&&vM.length)&&e.arrange[0].visionOpen){const oM=bM&&bM.length?bM.filter(Boolean):[];f=oM.length?oM:void 0}else f=void 0;const MM=new ze(v,w,Z.IHistoryRole.User,r,f);a(void 0),QM(void 0),iM.current=[MM,...T],s(iM.current),e.id&&$&&$({applicationId:e.id,sessionId:w,message:MM});const F=new ze("",w,Z.IHistoryRole.System);F.isWaiting=!0,iM.current=[F,...iM.current],s(iM.current);const wM=(r==null?void 0:r.map(oM=>oM.id))||[],NM={stream:Te.configuration.stream,referenceFirst:!1};if(o!=null&&o.promptVariables){const oM=IN==null?void 0:IN.reduce((rN,HN)=>(rN[HN.key]=HN.value,rN),{});NM.formatValues=oM}if(o!=null&&o.knowledges){const oM=lD;NM.knowledges=oM}const pM={text:v,fileIds:wM,files:r};f&&f.length>0&&(pM.imageContent=f),t.ready||(yield new Promise(oM=>{t.addEventListener("ready",()=>oM(),!0)})),yield t.send(pM,NM),ZM({[w]:[]}),(GM=$M.current)==null||GM.update(),CM([]),l([]),bN(!1)});I.useEffect(()=>{var wM;const L=(wM=t==null?void 0:t.data)==null?void 0:wM.id;if(!L)return;let r=null,w=null;const v=()=>{r=null,w&&(s([w,...iM.current]),w=null)},f=()=>{r!==null&&(cancelAnimationFrame(r),r=null,w=null)},MM=NM=>{if(!NM.sessionId||NM.sessionId&&NM.sessionId!==VM.current||NM.role===Z.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(vM=>!vM.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||[],IM=new ze(NM.content,L,Z.IHistoryRole.Robot);if(IM.messageId=NM.messageId||ne.v4(),IM.reasoningContent=NM.reasoningContent,IM.searchReference=NM.searchReference,IM.thinkingSecs=NM.thinkingSecs,IM.thinkingStatus=NM.thinkingStatus,IM.actions=pM,IM.isLoading=!0,IM.searchingStatus=NM.searchingStatus,iM.current=iM.current.filter(vM=>!vM.isWaiting).filter(vM=>!vM.isReplying),NM.index===void 0){w=IM,r===null&&(r=requestAnimationFrame(v));return}if(f(),(NM.code===11915||NM.code===11916)&&(aN(!1),QN(!1),IM.isLoading=!1,IM.content=NM.code===11916?"尊敬的用户您好,让我们换个话题再聊聊吧。":"请您换个问题问我吧~",IM.isSensitive=!0,s([IM,...iM.current])),NM.index===-2&&(aN(!1),QN(!1),IM.isLoading=!1,IM.content="回答已中止~",IM.isSuspend=!0,s([IM,...iM.current])),NM.index===-1&&(aN(!1),QN(!1),IM.isLoading=!1,IM.reference=NM.reference,s([IM,...iM.current]),e.id)){const vM=IM.messageId;WM.current.has(vM)||(WM.current.add(vM),$&&$({applicationId:e.id,sessionId:L,message:IM}))}NM.index===-3&&(aN(!1),QN(!1),IM.isLoading=!1,IM.reference=NM.reference,IM.relatedQuesion=NM.relatedQuesion,s([IM,...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){PM(!1);return}const L=r=>{PM(r)};return PM(t.frozen),t.addEventListener("frozen",L),()=>{t==null||t.removeEventListener("frozen",L)}},[t]),I.useEffect(()=>{if(!d)return;const L=d.questionContextMaxLength||4e3;H(L)},[d,W]),I.useEffect(()=>{p&&QM(p.text)},[p]);const NN=(L,r,w)=>{iN(b,()=>{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===Z.ApplicationTypes.Agent&&(o==null?void 0:o.imageUpload)||e.type===Z.ApplicationTypes.Dialog&&((L=e.arrange)==null?void 0:L.length)&&!!e.arrange[0].visionOpen&&(o==null?void 0:o.imageUpload))&&!O},SD=()=>!!z&&(o==null?void 0:o.fileUpload)&&(e==null?void 0:e.id)&&!O,nt=L=>{var vM,GM;const r=Array.from(L||[]).filter(Boolean);if(!r.length)return;const w=hD(),v=SD(),f=[],MM=[];let F=0,wM=0,NM=0;r.forEach(oM=>{var pt,bt,vt;if(((pt=oM.type)==null?void 0:pt.startsWith("image/"))||!!_t(oM.name)){w?f.push(oM):F++;return}const HN=(vt=(bt=oM.name)==null?void 0:bt.split(".").pop())==null?void 0:vt.toLowerCase();if(ci.includes(oM.type)||["pdf","doc","docx"].includes(HN||"")){v?MM.push(oM):wM++;return}NM++});const pM=[],IM=F+wM+NM;if(!v&&!w)IM&&pM.push(`当前不支持上传文件/图片,已忽略${IM}个文件`);else if(v&&!w){const oM=F+NM;oM&&pM.push(`仅支持上传 .doc/.docx/.pdf 文件,已忽略${oM}个其他类型文件`)}else if(!v&&w){const oM=wM+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,GN-AM.length),rN=f.slice(0,oM);rN.forEach(HN=>st(HN)),f.length>rN.length&&NN("warning",`最多上传${GN}张图片`)}MM.length&&((GM=(vM=$M.current)==null?void 0:vM.appendFiles)==null||GM.call(vM,MM))},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=()=>tM(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(v=>{var f,MM;g==null||g(v),pN(!1),y(!!((f=v.data)!=null&&f.netOpen)),ie(!!((MM=v.data)!=null&&MM.enableNetOpen)),gj(v),r(v)}).catch(v=>{BN.current=null,w(v)})})),BN.current)}),kD=L=>tM(exports,null,function*(){const r=yield ct();return mD(r,L)}),mD=(L,r)=>{const w=_t(r.name);return new Promise(v=>{var MM;const f={files:[`${ne.v4()}.${w}`],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 IM,vM;const wM=(IM=F.minio.endpoints)==null?void 0:IM[0],NM=F.minio.bucket,pM=(vM=F.minio.fileKeys)==null?void 0:vM[0];v(`${F.minio.useSSL?"https:":location.protocol}//${wM}/${NM}/${pM}`)}).catch(()=>{})}).catch(()=>{})})};I.useEffect(()=>{const L=h.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 v=XM(zM({},r.file),{type:1});W==null||W.postApplicationIdSessionKnowledgeSessionFile(e==null?void 0:e.id,L,v).finally(()=>{var f;(f=$M.current)==null||f.update().finally(w)})}),UD=()=>{var L;(L=t==null?void 0:t.data)!=null&&L.id&&(aN(!1),t.suspend())},fD=L=>{const r=h.current;r&&setTimeout(()=>{r.scrollTo({top:r.scrollHeight,behavior:L==null?void 0:L.behavior})},L==null?void 0:L.ms)},pD=()=>{if(!h.current)return;const L=h.current.scrollTop<=-80;oD(L)},bD=RN.useMemoizedFn(L=>{var r,w;(r=DM.current)==null||r.update(L),(w=DM.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;iM.current=[...T.slice(1,T.length)],s(iM.current);const L=new ze("",t.data.id,Z.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,!it&&((r=mM.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(v=>{const f=v||[];if(!f||!(f!=null&&f.length)){te(!1);return}f.length<10?te(!1):te(!0),s([...T,...f.reverse()])})},WD=L=>tM(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=()=>tM(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))});I.useEffect(()=>{uj()},[t]),I.useEffect(()=>{let L=null,r=null;const w=()=>{var pM,IM;if(!h.current)return;const f=document.getElementById("chat-main"),MM=(pM=h.current)==null?void 0:pM.querySelector(".infinite-scroll-component__outerdiv"),F=(IM=h.current)==null?void 0:IM.querySelector(".infinite-scroll-component");if(!MM||!F||!f)return;const wM=f.offsetHeight;if(F.offsetHeight<=wM){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"||!h.current)return;const f=document.getElementById("chat-main"),MM=(F=h.current)==null?void 0:F.querySelector(".infinite-scroll-component");!MM||!f||(r=new ResizeObserver(()=>{w()}),r.observe(MM),r.observe(f))};return L=requestAnimationFrame(()=>{w(),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===Z.PromptVariableType.User&&f.key==="query")&&!(f.type===Z.PromptVariableType.System&&f.key==="datetime")&&f.status===1:f.key!=="query"&&f.status===1).map((f,MM)=>{var wM,NM;let F="";return typeof(C==null?void 0:C.promptVariables)=="object"&&(F=((NM=(wM=C.promptVariables.default)==null?void 0:wM.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}});je([...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 rt=()=>D==null?void 0:D({netOpen:u?SN.OPEN:SN.CLOSE}).then(L=>{var r,w;return g==null||g(L),pN(!1),y(!!((r=L.data)!=null&&r.netOpen)),ie(!!((w=L.data)!=null&&w.enableNetOpen)),gj(L),L}),ot=!!T.length,lt=I.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 I.useImperativeHandle(N,()=>({getCurrentInputText:()=>{var L;return(L=DM.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&&ZM(w=>XM(zM({},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:IN,setPromptVariables:je,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:h,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=h.current)!=null&&Yt.scrollTop)&&((xt=h.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?q||Xt.icon:C.greeting.icon,children:!!LM.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:mM,sid:(Qt=t==null?void 0:t.data)==null?void 0:Qt.id,isRecommendClearing:JM,data:LM,layoutBreakpoints:typeof(C==null?void 0:C.greeting)=="object"?C.greeting.layoutBreakpoints:void 0,onItemClick:L=>{var w,v,f;if(a(L==null?void 0:L.question),QM(L==null?void 0:L.question),JM)return;L!=null&&L.id&&Q(!0);const r=(w=t==null?void 0:t.data)==null?void 0:w.id;o!=null&&o.fileUpload?(f=(v=$M.current)==null?void 0:v.clear())==null||f.then(()=>{var MM,F;L!=null&&L.id&&(r?(MM=at(r,L))==null||MM.finally(()=>{Q(!1)}):(Q(!1),pN(!0),(F=rt())==null||F.then(wM=>{var NM;(NM=at(wM.id,L))==null||NM.finally(()=>{Q(!1)})})))}):r?Q(!1):(Q(!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:[AM.length>0&&i.jsx("div",{className:"input-files",children:AM.map((L,r)=>i.jsx(Oz,{className:"thumb-40",file:L,actions:{upload:w=>tM(exports,null,function*(){B(v=>v+1);try{return yield kD(w)}finally{B(v=>Math.max(0,v-1))}}),remove:()=>{CM(w=>w.filter((v,f)=>f!==r)),l(w=>w.filter((v,f)=>f!==r))}},onUrlChange:w=>{l(v=>{const f=[...v];return f[r]=w,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===Z.ApplicationTypes.Agent&&(o==null?void 0:o.imageUpload)||e.type===Z.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:AM.length>=GN||O,accept:".jpg, .png, .jpeg,.bmp",listType:"picture-card",beforeUpload:st,className:"footer-upload-picture",showUploadList:!1,children:AM.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=>tM(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||O,afterFileAdd:(L,r)=>{r&&ZM(w=>{const v=w[r]||[];return{[r]:[...v,L]}})},afterFileDelete:L=>{var w;const r=(w=t==null?void 0:t.data)==null?void 0:w.id;r&&ZM(v=>{const f=v[r]||[];return{[r]:f.filter(MM=>MM.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:V?RM:"",onPromptSelect:L=>{QM(L.context),a(L.context)},disabled:O})]}),i.jsxs(n.Space,{children:[(o==null?void 0:o.connectNetwork)&&e.type===Z.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)=>{QM(void 0),Ee(!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:()=>gt(!0)})})}),(o==null?void 0:o.sessionOpen)&&i.jsx(n.Button,{icon:i.jsx(dM.PlusOutlined,{}),className:"add-btn",type:"primary",disabled:jt||!t||!T.length||O,onClick:()=>{var L,r;Ee(!1),g==null||g(null),BN.current=null,y(!1),(L=JN.current)==null||L.clear(),(r=mM.current)==null||r.clear()},children:"新会话"})]})]}),!!Ij&&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:DM,maxLength:E,text:EM,networkStatus:!1,loading:zt||we,disabled:lM||x||O||zt||we,onTextSend:ut,onChange:(L,r)=>{QM(L);const w=r.getText().replace(/[\n\s]+$/,"");a(w),sM(w),V||TM(!0)},clearAction:i.jsx(n.Space,{size:0,children:i.jsx(n.Button,{type:"link",disabled:zj||O,ghost:!0,icon:i.jsx(uM,{style:{fontSize:22},type:"icon-qingchujiyi"}),onClick:()=>ED()})})}),!!Ij&&i.jsxs("div",{className:"remainingSeconds-time",children:["您之前对话触发敏感词拦截,当前处于禁言状态,暂时无法发送消息,剩余禁言时长",Ij]})]})]})}),i.jsx(Ez,{tips:k}),xM&&i.jsx(Sz,{isvisible:xM,files:KM,sessionId:(ft=t==null?void 0:t.data)==null?void 0:ft.id,onClose:L=>{MN(!1),rD(!1)}})]}),It&&i.jsx(vz,{currentSession:t,application:e,networkStatus:u,setCurrentSession:g,disabled:O,isSessionHistoryVisible:It,setIsSessionHistoryVisible:gt,onSessionChange:L=>{Ee(!0)}})]})});const xi=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," 个"]})]})})})},Vz=M=>{var h,W;const{currentSession:N,application:e,setCheckKnowledges:j}=M,{mode:t,transform:D,features:z}=I.useContext(BM),[g,u]=I.useState([]),[y,T]=I.useState(typeof(z==null?void 0:z.knowledges)=="object"?((h=z.knowledges.default)==null?void 0:h.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(We(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(xi,{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 Xz=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(BM),[a,c]=I.useState(),U=I.useRef(null),[h,W]=I.useState(""),[d,m]=I.useState(),k=I.useRef(null),[o,p]=I.useState(!1);I.useState([]);const{setIsSwitchingToExistingSession:$}=mj();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(zM({},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(Uj,{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(Vz,{setCheckKnowledges:m,application:a,currentSession:D})}),i.jsx("div",{className:"dialog-chat-content",children:(a==null?void 0:a.id)&&i.jsx(Fz,{setNetworkStatus:p,networkStatus:o,application:a,currentSession:D,onCreateSession:K,docViewerUrl:t,embeddingService:h,setCurrentSession:z,ref:k})})]})})]})})}),$z=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:h,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(),[lM,PM]=I.useState(t),[iM,VM]=I.useState(M.open),WM=I.useRef(null);I.useEffect(()=>{C&&(console.log("[AgentClientUI] token",O,C),G(C.id))},[C]),n.ConfigProvider.config({theme:D}),I.useEffect(()=>{t&&PM(t)},[t]);const E=(H,{element:AM,size:CM})=>{PM({width:Number(CM.width),height:CM.height})};return I.useImperativeHandle(N,()=>({createSession:H=>{var AM;return(AM=WM.current)==null?void 0:AM.createSession(H)},getSessionList:()=>{var H;return(H=WM.current)==null?void 0:H.getSessionList()},getCurrentInputText:()=>{var H;return(H=WM.current)==null?void 0:H.getCurrentInputText()}})),i.jsx(n.ConfigProvider,{locale:ui,children:i.jsxs(Li,{value:XM(zM({},M),{popupContainer:b,agentClient:O,footer:a,defaultInput:c,onComment:U,onSessionLoad:h,onSessionUnload:W,onMessage:d,beforeMessageSend:m,bodyStyle:k,disabled:$,transform:K,features:Y}),children:[i.jsx(JD.Resizable,{height:(lM==null?void 0:lM.height)||"100%",width:(lM==null?void 0:lM.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} ${iM?"opened":"closed"}`,style:XM(zM({},t),{width:e=="float"?lM==null?void 0:lM.width:t==null?void 0:t.width,height:e==="float"?lM==null?void 0:lM.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(pz,{children:i.jsx(Xz,{ref:WM,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)})]})})}),Kz="@glodon-aiot/agent-cli-ui",qz="3.20.1",MI="./dist/es/index.mjs",NI="./dist/lib/index.js",eI="./dist/src/index.d.ts",jI={import:"./dist/es/index.mjs",require:"./dist/lib/index.js",types:"./dist/src/index.d.ts"},tI=["dist"],iI="module",DI="dist/src/index.d.ts",zI={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"},II={"@ant-design/icons":"^5.3.4","@glodon-aiot/apis":"^3.20.1","@glodon-aiot/bot-client-sdk":"^3.20.1","@glodon-aiot/react-components":"^3.20.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"},gI={"@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"},TI=[">0.2%","not dead","not op_mini all"],uI=["last 1 chrome version","last 1 firefox version","last 1 safari version"],sI={commitizen:{path:"node_modules/cz-customizable"},"cz-customizable":{config:".cz-config.cjs"}},nI={access:"public",registry:"https://registry.npmjs.org/"},LI={hooks:{"commit-msg":"validate-commit-msg"}},AI={name:Kz,version:qz,module:MI,main:NI,typings:eI,exports:jI,files:tI,type:iI,types:DI,scripts:zI,dependencies:II,devDependencies:gI,"lint-staged":{"*.{js,css,md,jsx,less,ts,tsx,json}":"prettier --write"},production:TI,development:uI,config:sI,publishConfig:nI,husky:LI};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=>tM(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||O,afterFileAdd:(L,r)=>{r&&ZM(w=>{const v=w[r]||[];return{[r]:[...v,L]}})},afterFileDelete:L=>{var w;const r=(w=t==null?void 0:t.data)==null?void 0:w.id;r&&ZM(v=>{const f=v[r]||[];return{[r]:f.filter(MM=>MM.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:V?RM:"",onPromptSelect:L=>{QM(L.context),a(L.context)},disabled:O})]}),i.jsxs(n.Space,{children:[(o==null?void 0:o.connectNetwork)&&e.type===Z.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)=>{QM(void 0),Ee(!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:()=>gt(!0)})})}),(o==null?void 0:o.sessionOpen)&&i.jsx(n.Button,{icon:i.jsx(dM.PlusOutlined,{}),className:"add-btn",type:"primary",disabled:jt||!t||!T.length||O,onClick:()=>{var L,r;Ee(!1),g==null||g(null),BN.current=null,y(!1),(L=JN.current)==null||L.clear(),(r=mM.current)==null||r.clear()},children:"新会话"})]})]}),!!Ij&&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:DM,maxLength:E,text:EM,networkStatus:!1,loading:zt||we,disabled:lM||x||O||zt||we,onTextSend:ut,onChange:(L,r)=>{QM(L);const w=r.getText().replace(/[\n\s]+$/,"");a(w),sM(w),V||TM(!0)},clearAction:i.jsx(n.Space,{size:0,children:i.jsx(n.Button,{type:"link",disabled:zj||O,ghost:!0,icon:i.jsx(uM,{style:{fontSize:22},type:"icon-qingchujiyi"}),onClick:()=>ED()})})}),!!Ij&&i.jsxs("div",{className:"remainingSeconds-time",children:["您之前对话触发敏感词拦截,当前处于禁言状态,暂时无法发送消息,剩余禁言时长",Ij]})]})]})}),i.jsx(Ez,{tips:k}),xM&&i.jsx(Sz,{isvisible:xM,files:KM,sessionId:(ft=t==null?void 0:t.data)==null?void 0:ft.id,onClose:L=>{MN(!1),rD(!1)}})]}),It&&i.jsx(vz,{currentSession:t,application:e,networkStatus:u,setCurrentSession:g,disabled:O,isSessionHistoryVisible:It,setIsSessionHistoryVisible:gt,onSessionChange:L=>{Ee(!0)}})]})});const xi=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," 个"]})]})})})},Vz=M=>{var h,W;const{currentSession:N,application:e,setCheckKnowledges:j}=M,{mode:t,transform:D,features:z}=I.useContext(BM),[g,u]=I.useState([]),[y,T]=I.useState(typeof(z==null?void 0:z.knowledges)=="object"?((h=z.knowledges.default)==null?void 0:h.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(We(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(xi,{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 Xz=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(BM),[a,c]=I.useState(),U=I.useRef(null),[h,W]=I.useState(""),[d,m]=I.useState(),k=I.useRef(null),[o,p]=I.useState(!1);I.useState([]);const{setIsSwitchingToExistingSession:$}=mj();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(zM({},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(Uj,{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(Vz,{setCheckKnowledges:m,application:a,currentSession:D})}),i.jsx("div",{className:"dialog-chat-content",children:(a==null?void 0:a.id)&&i.jsx(Fz,{setNetworkStatus:p,networkStatus:o,application:a,currentSession:D,onCreateSession:K,docViewerUrl:t,embeddingService:h,setCurrentSession:z,ref:k})})]})})]})})}),$z=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:h,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(),[lM,PM]=I.useState(t),[iM,VM]=I.useState(M.open),WM=I.useRef(null);I.useEffect(()=>{C&&(console.log("[AgentClientUI] token",O,C),G(C.id))},[C]),n.ConfigProvider.config({theme:D}),I.useEffect(()=>{t&&PM(t)},[t]);const E=(H,{element:AM,size:CM})=>{PM({width:Number(CM.width),height:CM.height})};return I.useImperativeHandle(N,()=>({createSession:H=>{var AM;return(AM=WM.current)==null?void 0:AM.createSession(H)},getSessionList:()=>{var H;return(H=WM.current)==null?void 0:H.getSessionList()},getCurrentInputText:()=>{var H;return(H=WM.current)==null?void 0:H.getCurrentInputText()}})),i.jsx(n.ConfigProvider,{locale:ui,children:i.jsxs(Li,{value:XM(zM({},M),{popupContainer:b,agentClient:O,footer:a,defaultInput:c,onComment:U,onSessionLoad:h,onSessionUnload:W,onMessage:d,beforeMessageSend:m,bodyStyle:k,disabled:$,transform:K,features:Y}),children:[i.jsx(JD.Resizable,{height:(lM==null?void 0:lM.height)||"100%",width:(lM==null?void 0:lM.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} ${iM?"opened":"closed"}`,style:XM(zM({},t),{width:e=="float"?lM==null?void 0:lM.width:t==null?void 0:t.width,height:e==="float"?lM==null?void 0:lM.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(pz,{children:i.jsx(Xz,{ref:WM,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)})]})})}),Kz="@glodon-aiot/agent-cli-ui",qz="3.20.2-alpha.0",MI="./dist/es/index.mjs",NI="./dist/lib/index.js",eI="./dist/src/index.d.ts",jI={import:"./dist/es/index.mjs",require:"./dist/lib/index.js",types:"./dist/src/index.d.ts"},tI=["dist"],iI="module",DI="dist/src/index.d.ts",zI={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"},II={"@ant-design/icons":"^5.3.4","@glodon-aiot/apis":"^3.20.2-alpha.0","@glodon-aiot/bot-client-sdk":"^3.20.2-alpha.0","@glodon-aiot/react-components":"^3.20.2-alpha.0","@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"},gI={"@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"},TI=[">0.2%","not dead","not op_mini all"],uI=["last 1 chrome version","last 1 firefox version","last 1 safari version"],sI={commitizen:{path:"node_modules/cz-customizable"},"cz-customizable":{config:".cz-config.cjs"}},nI={access:"public",registry:"https://registry.npmjs.org/"},LI={hooks:{"commit-msg":"validate-commit-msg"}},AI={name:Kz,version:qz,module:MI,main:NI,typings:eI,exports:jI,files:tI,type:iI,types:DI,scripts:zI,dependencies:II,devDependencies:gI,"lint-staged":{"*.{js,css,md,jsx,less,ts,tsx,json}":"prettier --write"},production:TI,development:uI,config:sI,publishConfig:nI,husky:LI};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.20.
|
|
3
|
+
"version": "3.20.2-alpha.0",
|
|
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.20.
|
|
35
|
-
"@glodon-aiot/bot-client-sdk": "^3.20.
|
|
36
|
-
"@glodon-aiot/react-components": "^3.20.
|
|
34
|
+
"@glodon-aiot/apis": "^3.20.2-alpha.0",
|
|
35
|
+
"@glodon-aiot/bot-client-sdk": "^3.20.2-alpha.0",
|
|
36
|
+
"@glodon-aiot/react-components": "^3.20.2-alpha.0",
|
|
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",
|