@glodon-aiot/agent-cli-ui 3.22.2-alpha.7 → 3.22.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/es/index.mjs +4 -4
- package/dist/lib/index.js +1 -1
- package/package.json +4 -4
package/dist/es/index.mjs
CHANGED
|
@@ -4992,7 +4992,7 @@ const jg = GN((M, N) => {
|
|
|
4992
4992
|
})]
|
|
4993
4993
|
})
|
|
4994
4994
|
});
|
|
4995
|
-
}), ig = "@glodon-aiot/agent-cli-ui", Dg = "3.22.2
|
|
4995
|
+
}), ig = "@glodon-aiot/agent-cli-ui", Dg = "3.22.2", zg = "./dist/es/index.mjs", Ig = "./dist/lib/index.js", gg = "./dist/src/index.d.ts", Tg = {
|
|
4996
4996
|
import: "./dist/es/index.mjs",
|
|
4997
4997
|
require: "./dist/lib/index.js",
|
|
4998
4998
|
types: "./dist/src/index.d.ts"
|
|
@@ -5014,9 +5014,9 @@ const jg = GN((M, N) => {
|
|
|
5014
5014
|
commit: "cz"
|
|
5015
5015
|
}, Ag = {
|
|
5016
5016
|
"@ant-design/icons": "^5.3.4",
|
|
5017
|
-
"@glodon-aiot/apis": "^3.22.2
|
|
5018
|
-
"@glodon-aiot/bot-client-sdk": "^3.22.2
|
|
5019
|
-
"@glodon-aiot/react-components": "^3.22.2
|
|
5017
|
+
"@glodon-aiot/apis": "^3.22.2",
|
|
5018
|
+
"@glodon-aiot/bot-client-sdk": "^3.22.2",
|
|
5019
|
+
"@glodon-aiot/react-components": "^3.22.2",
|
|
5020
5020
|
"@matejmazur/react-mathjax": "^0.1.10",
|
|
5021
5021
|
"@react-pdf-viewer/core": "^3.12.0",
|
|
5022
5022
|
"@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(g=>``).join(`
|
|
8
8
|
`);t=D?`${D}
|
|
9
9
|
${t}`:t}}return t},Kz=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)}`},$z=z.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:g,setCurrentSession:I,networkStatus:u,setNetworkStatus:y}=M,[T,s]=z.useState([]),[A,a]=z.useState(),[c,f]=z.useState(),h=z.useRef(null),{service:W,agentClient:d,depId:U,footer:k,transform:o,defaultInput:v,onMessage:X,onHistoryLoad:$,beforeMessageSend:x,bodyStyle:q,disabled:Y,features:O,popupContainer:b,icon:MM,sider:NM,mode:AM,silencedSeconds:WM}=z.useContext(HM),[rM,ZM]=z.useState(!1),jM=z.useRef(T),KM=z.useRef(void 0),_M=z.useRef(new Set),[Q,F]=z.useState(0),[yM,xM]=z.useState([]),[PM,C]=z.useState([]),[J,B]=z.useState(0),[m,_]=z.useState(!1);z.useEffect(()=>{_(J>0)},[J]);const tM=z.useRef(null),[nM,OM]=z.useState([]),[GM,w]=z.useState(!1),[l,iM]=z.useState(!1),[EM,zM]=z.useState(""),[CM,dM]=z.useState(),[kM,pM]=z.useState({}),JM=z.useRef(null),rN=z.useRef(null),QM=z.useRef(null),[YM,$M]=z.useState(!1),[FM,BM]=z.useState([]),[Oe,Ye]=z.useState(!0),[oD,lD]=z.useState(!0),[jt,oN]=z.useState(!1),[zj,SN]=z.useState(!1),[tt,CD]=z.useState(!1),[TN,te]=z.useState(typeof(O==null?void 0:O.promptVariables)=="object"?O.promptVariables.default||[]:[]),[OD,YD]=z.useState(()=>{const L=typeof(O==null?void 0:O.knowledges)=="object"&&O.knowledges.default||void 0;if(L){if(Array.isArray(L)&&L.some(G=>Array.isArray(G.fileIds)&&G.fileIds.length===0))throw Error("fileIds cannot be an empty array");if(Pe(L)>UN)throw Error(`knowledges and fileIds total count cannot exceed ${UN}`)}return L}),[it,vN]=z.useState(!1),[Dt,ie]=z.useState(!1),[xD,De]=z.useState(typeof(O==null?void 0:O.connectNetwork)=="object"&&typeof(O==null?void 0:O.connectNetwork.default)=="boolean"?O.connectNetwork.default:!1),[zt,xe]=z.useState(!1),[dD,kN]=z.useState(!1),[wD,ED]=z.useState(null),[de,GN]=z.useState(!1),[gt,It]=z.useState(!1),{isSwitchingToExistingSession:Tt,setIsSwitchingToExistingSession:we}=mj(),HN=z.useRef(null),[gj,QD]=z.useState("");z.useEffect(()=>{if(!WM)return;let L=Kz(WM);QD(L)},[WM]),z.useEffect(()=>{if(ED(t),t===null)kN(!1);else if(t===void 0)kN(!0);else{if(wD===null){if(Tt){kN(!0),we(!1);return}kN(!1);return}t.ready?kN(!1):kN(!0)}},[t,t==null?void 0:t.ready,Tt]),z.useEffect(()=>{var E,G;t&&(jM.current=[]),s([]);const L=h.current;if(L&&L.scrollTo({top:0}),!((E=t==null?void 0:t.data)!=null&&E.id))return;if(SN(!1),oN(!1),(G=t.messages)!=null&&G.length){const K=[...t.messages.filter(H=>H==null?void 0:H.messageId)].reverse();jM.current=[...K],s([...K]),kN(!1)}const r=p=>{var K;(K=t==null?void 0:t.data)!=null&&K.id&&(jM.current=[...p].reverse(),s([...p].reverse()),!p||p.length<10?ie(!1):ie(!0),kN(!1),$&&$({applicationId:e.id,sessionId:t.data.id,histories:p}))};return t.addEventListener("history:loaded",r),()=>{jM.current=[],s([]),t==null||t.removeEventListener("history:loaded",r)}},[t]),z.useEffect(()=>{const L=()=>{var r;(r=t==null?void 0:t.data)!=null&&r.id&&(t.promptVariables&&te(t.promptVariables.sort((E,G)=>E.key.localeCompare(G.key))),t.knowledges&&YD(t.knowledges),y(t.netOpen))};return t==null||t.addEventListener("data:updated",L),()=>{t==null||t.removeEventListener("data:updated",L)}},[t]),z.useEffect(()=>{var r;if(!((r=t==null?void 0:t.data)!=null&&r.id))return;const L=E=>{var G;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:((G=E.cause)==null?void 0:G.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 hD=()=>{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){eN("success","已开启新话题");return}else t.clear().then(()=>{const G=new ge("",L,R.IHistoryRole.System);G.isContext=!0,s([G,...T])})};z.useEffect(()=>{e!=null&&e.id&&(W==null||W.getRecommendQues(e.id).then(L=>{OM(L)}))},[U,e]);const ut=L=>DM(exports,null,function*(){var MN,gM;if(Y){eN("error","发送功能被禁用");return}const r=L||A;if(!(r!=null&&r.trim())){eN("error","请输入你想问的");return}if(!(TN==null?void 0:TN.every(bM=>!!(bM!=null&&bM.value))))if(o!=null&&o.promptVariables){eN("error","变量值不能为空");return}else console.error("变量值不能为空",TN==null?void 0:TN.map(bM=>!!(bM!=null&&bM.value)));if(zj){eN("error","正在回复中");return}if(rM){eN("error","等待初始化");return}if(!Oe){eN("error","正在解析文件");return}if(m){eN("error","正在上传图片");return}xM([]),C([]);const G=(MN=t==null?void 0:t.data)==null?void 0:MN.id;if(!G){if(de)return;GN(!0),D==null||D({netOpen:u?mN.OPEN:mN.CLOSE}).then(bM=>{var TM,lN;vN(!0),y(!!((TM=bM.data)!=null&&TM.netOpen)),De(!!((lN=bM.data)!=null&&lN.enableNetOpen)),Ij(bM).then(()=>{I==null||I(bM),vN(!1),f(r)})}).catch(bM=>{GN(!1)});return}if(de)return;GN(!0),xe(!0);const p=yj(r,PM,kM[G],(e==null?void 0:e.type)||0);let K;try{x?K=yield x==null?void 0:x({applicationId:e.id,sessionId:G,message:{content:p,sessionId:G,role:R.ChatMessageRole.User,files:kM[G]}}):K=!0}catch(bM){K=!1}if(xe(!1),K===!1){GN(!1);return}let H=r;typeof K=="object"&&(H=K.content||r);const hM=yield(()=>new Promise(bM=>{te(TM=>(bM(TM),TM))}))();if(!(yield t.setPromptVariables(hM))){GN(!1);return}((gM=kM[G])==null?void 0:gM.length)>0?SD(H):Tj(H)}),Ij=L=>new Promise((r,E)=>DM(exports,null,function*(){const K=(L==null?void 0:L.promptVariables).filter(H=>H.type?!((H.type===R.PromptVariableType.User||H.type===void 0)&&H.key==="query")&&!((H.type===R.PromptVariableType.System||H.type===void 0)&&H.key==="datetime"):H.key!=="query").map(H=>{var hM;const mM=(hM=TN.find(eM=>eM.key===H.key&&eM.type===H.type))==null?void 0:hM.value;return H.value=mM||"",H});te(K.sort((H,mM)=>H.key.localeCompare(mM.key))),yield L==null?void 0:L.setPromptVariables(K).catch(H=>{console.error(H),eN("error",H.message)}),r()})),SD=L=>{var p,K,H;if(Ye(!1),!((p=t==null?void 0:t.data)!=null&&p.id)||!(e!=null&&e.id))return;const r=((K=t.data)==null?void 0:K.id)||"";let E=[],G=new Set;(H=kM[r])==null||H.forEach(mM=>{G.has(mM.id)||(E.push(mM),G.add(mM.id))}),Ye(!0),Tj(L,E)};z.useEffect(()=>{if(!c||!t)return;const L=c,r=()=>DM(exports,null,function*(){xe(!0);const E=yj(L,PM,kM[t.id],(e==null?void 0:e.type)||0);let G;try{x?G=yield x==null?void 0:x({applicationId:e.id,sessionId:t.id,message:{content:E,sessionId:t.id,role:R.ChatMessageRole.User,files:kM[t.id]}}):G=!0}catch(p){G=!1}if(xe(!1),G===!1){GN(!1);return}Tj(L),f(void 0)});return t.ready?r():t.addEventListener("ready",r,!0),()=>{t==null||t.removeEventListener("ready",r)}},[c,t]);const Tj=(L,r)=>DM(exports,null,function*(){var MN,gM,bM;const E=(MN=t==null?void 0:t.data)==null?void 0:MN.id;if(!E)return;SN(!0),oN(!0);const G=yj(L,PM,r,(e==null?void 0:e.type)||0);let p;if(e.type===R.ApplicationTypes.Agent)p=void 0;else if(e.type===R.ApplicationTypes.Dialog&&((gM=e.arrange)!=null&&gM.length)&&e.arrange[0].visionOpen){const TM=PM&&PM.length?PM.filter(Boolean):[];p=TM.length?TM:void 0}else p=void 0;const K=new ge(G,E,R.IHistoryRole.User,r,p);a(void 0),dM(void 0),jM.current=[K,...T],s(jM.current),e.id&&X&&X({applicationId:e.id,sessionId:E,message:K});const H=new ge("",E,R.IHistoryRole.System);H.isWaiting=!0,jM.current=[H,...jM.current],s(jM.current);const mM=(r==null?void 0:r.map(TM=>TM.id))||[],hM={stream:ue.configuration.stream,referenceFirst:!1};if(o!=null&&o.promptVariables){const TM=TN==null?void 0:TN.reduce((lN,FN)=>(lN[FN.key]=FN.value,lN),{});hM.formatValues=TM}if(o!=null&&o.knowledges){const TM=OD;hM.knowledges=TM}const eM={text:G,fileIds:mM,files:r};p&&p.length>0&&(eM.imageContent=p),t.ready||(yield new Promise(TM=>{t.addEventListener("ready",()=>TM(),!0)})),yield t.send(eM,hM),pM({[E]:[]}),(bM=JM.current)==null||bM.update(),xM([]),C([]),GN(!1)});z.useEffect(()=>{var hM;const L=(hM=t==null?void 0:t.data)==null?void 0:hM.id;if(!L)return;let r=null,E=null,G="";const p=()=>{r=null,E&&(s([E,...jM.current]),E=null)},K=()=>{r!==null&&(cancelAnimationFrame(r),r=null,E=null)},H=eM=>{if(!eM.sessionId||eM.sessionId&&eM.sessionId!==KM.current||eM.role===R.IHistoryRole.User)return;if(eM.index===-1&&eM.code!==200&&eM.code!==11915&&eM.code!==11916&&(K(),oN(!1),SN(!1),jM.current=jM.current.filter(TM=>!TM.isWaiting),s([...jM.current]),jM.current=[...jM.current],eM.content)){n.notification.config({getContainer:()=>(b==null?void 0:b.current)||document.body,prefixCls:"gbot-notification"}),n.notification.error({message:eM.content}),n.notification.config({getContainer:void 0,prefixCls:"gbot-notification"});return}const MN=eM.actions||[],gM=new ge(eM.content,L,R.IHistoryRole.Robot);gM.reasoningContent=eM.reasoningContent,gM.searchReference=eM.searchReference,gM.thinkingSecs=eM.thinkingSecs,gM.thinkingStatus=eM.thinkingStatus,gM.actions=MN,gM.isLoading=!0,gM.searchingStatus=eM.searchingStatus;const bM=jM.current.some(TM=>TM.isWaiting);if(jM.current=jM.current.filter(TM=>!TM.isWaiting).filter(TM=>!TM.isReplying),bM&&(G=""),gM.renderKey=G||eM.messageId||gM.messageId,G=gM.renderKey,gM.messageId=eM.messageId||gM.renderKey,eM.index===void 0){E=gM,r===null&&(r=requestAnimationFrame(p));return}if(K(),(eM.code===11915||eM.code===11916)&&(oN(!1),SN(!1),gM.isLoading=!1,gM.content=eM.code===11916?"尊敬的用户您好,让我们换个话题再聊聊吧。":"请您换个问题问我吧~",gM.isSensitive=!0,s([gM,...jM.current])),eM.index===-2&&(oN(!1),SN(!1),gM.isLoading=!1,gM.content="回答已中止~",gM.isSuspend=!0,s([gM,...jM.current])),eM.index===-1&&(oN(!1),SN(!1),gM.isLoading=!1,gM.reference=eM.reference,s([gM,...jM.current]),e.id)){const TM=gM.messageId;_M.current.has(TM)||(_M.current.add(TM),X&&X({applicationId:e.id,sessionId:L,message:gM}))}eM.index===-3&&(oN(!1),SN(!1),gM.isLoading=!1,gM.reference=eM.reference,gM.relatedQuesion=eM.relatedQuesion,s([gM,...jM.current]))},mM=()=>{t.addEventListener("message:updated",H)};return t.ready?t.addEventListener("message:updated",H):t.addEventListener("ready",mM),()=>{K(),t==null||t.removeEventListener("message:updated",H),t==null||t.removeEventListener("ready",mM)}},[t]),z.useEffect(()=>{if(!t){ZM(!1);return}const L=r=>{ZM(r)};return ZM(t.frozen),t.addEventListener("frozen",L),()=>{t==null||t.removeEventListener("frozen",L)}},[t]),z.useEffect(()=>{if(!d)return;const L=d.questionContextMaxLength||4e3;F(L)},[d,W]),z.useEffect(()=>{v&&dM(v.text)},[v]);const eN=(L,r,E)=>{zN(b,()=>{n.message.open({type:L,content:r,key:E})})},st=L=>{const r=L.size;return r<=0?(eN("error","该文件为空,请重新上传"),!1):r>Aj*ve?(eN("error",`图片须小于${Aj}M`),!1):(xM(E=>E.length>=WN?(eN("warning",`图片最多上传${WN}张`),E):[...E,L]),!1)},kD=()=>{var L;return(e.type===R.ApplicationTypes.Agent&&(o==null?void 0:o.imageUpload)||e.type===R.ApplicationTypes.Dialog&&((L=e.arrange)==null?void 0:L.length)&&!!e.arrange[0].visionOpen&&(o==null?void 0:o.imageUpload))&&!Y},mD=()=>!!g&&(o==null?void 0:o.fileUpload)&&(e==null?void 0:e.id)&&!Y,nt=L=>{var gM,bM;const r=Array.from(L||[]).filter(Boolean);if(!r.length)return;const E=kD(),G=mD(),p=[],K=[];let H=0,mM=0,hM=0;r.forEach(TM=>{var pt,bt,vt;if(((pt=TM.type)==null?void 0:pt.startsWith("image/"))||!!_t(TM.name)){E?p.push(TM):H++;return}const FN=(vt=(bt=TM.name)==null?void 0:bt.split(".").pop())==null?void 0:vt.toLowerCase();if(ci.includes(TM.type)||["pdf","doc","docx"].includes(FN||"")){G?K.push(TM):mM++;return}hM++});const eM=[],MN=H+mM+hM;if(!G&&!E)MN&&eM.push(`当前不支持上传文件/图片,已忽略${MN}个文件`);else if(G&&!E){const TM=H+hM;TM&&eM.push(`仅支持上传 .doc/.docx/.pdf 文件,已忽略${TM}个其他类型文件`)}else if(!G&&E){const TM=mM+hM;TM&&eM.push(`仅支持上传图片(.jpg/.jpeg/.png/.bmp),已忽略${TM}个其他类型文件`)}else hM&&eM.push(`存在不支持的文件类型,已忽略${hM}个文件`);if(eM.length&&eN("warning",eM.join(";"),"precheck-warn"),p.length){const TM=Math.max(0,WN-yM.length),lN=p.slice(0,TM);lN.forEach(FN=>st(FN)),p.length>lN.length&&eN("warning",`最多上传${WN}张图片`)}K.length&&((bM=(gM=JM.current)==null?void 0:gM.appendFiles)==null||bM.call(gM,K))},Lt=L=>{var E;const r=(E=L.clipboardData)==null?void 0:E.files;r&&r.length&&(L.preventDefault(),L.stopPropagation(),nt(r))},At=L=>{L.preventDefault()},yt=L=>{var E;L.preventDefault(),L.stopPropagation();const r=(E=L.dataTransfer)==null?void 0:E.files;r&&r.length&&nt(r)},ct=()=>DM(exports,null,function*(){var L;return(L=t==null?void 0:t.data)!=null&&L.id?t:(HN.current||(HN.current=new Promise((r,E)=>{vN(!0),D==null||D({netOpen:u?mN.OPEN:mN.CLOSE}).then(G=>{var p,K;I==null||I(G),vN(!1),y(!!((p=G.data)!=null&&p.netOpen)),De(!!((K=G.data)!=null&&K.enableNetOpen)),Ij(G),r(G)}).catch(G=>{HN.current=null,E(G)})})),HN.current)}),UD=L=>DM(exports,null,function*(){const r=yield ct();return fD(r,L)}),fD=(L,r)=>{const E=_t(r.name);return new Promise(G=>{var K;const p={files:[`${Fe.v4()}.${E}`],isv:"minio",knowledgeId:((K=L.data)==null?void 0:K.id)||"",type:1};W==null||W.postTicket(p).then(H=>{W.uploadMinioFile(H.minio,r).then(()=>{var MN,gM;const mM=(MN=H.minio.endpoints)==null?void 0:MN[0],hM=H.minio.bucket,eM=(gM=H.minio.fileKeys)==null?void 0:gM[0];G(`${H.minio.useSSL?"https:":location.protocol}//${mM}/${hM}/${eM}`)}).catch(()=>{})}).catch(()=>{})})};z.useEffect(()=>{const L=h.current;L&&!tt&&L.scrollTo({top:L.scrollHeight})},[T]);const at=(L,r)=>new Promise(E=>{if(!r.file.url||!(e!=null&&e.id))return E();const G=qM(IM({},r.file),{type:1});W==null||W.postApplicationIdSessionKnowledgeSessionFile(e==null?void 0:e.id,L,G).finally(()=>{var p;(p=JM.current)==null||p.update().finally(E)})}),pD=()=>{var L;(L=t==null?void 0:t.data)!=null&&L.id&&(oN(!1),t.suspend())},bD=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)},vD=()=>{if(!h.current)return;const L=h.current.scrollTop<=-80;CD(L)},GD=_N.useMemoizedFn(L=>{var r,E;(r=tM.current)==null||r.update(L),(E=tM.current)==null||E.focus()}),PD=_N.useMemoizedFn(L=>{ut(L)}),WD=_N.useMemoizedFn(()=>{var r;if(!((r=t==null?void 0:t.data)!=null&&r.id))return;jM.current=[...T.slice(1,T.length)],s(jM.current);const L=new ge("",t.data.id,R.IHistoryRole.System);L.isWaiting=!0,jM.current=[L,...jM.current],s(jM.current),SN(!0),oN(!0),t.answerAgain()});z.useEffect(()=>{var L,r;KM.current=(L=t==null?void 0:t.data)==null?void 0:L.id,!it&&((r=QM.current)==null||r.clear())},[t]);const RD=()=>{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:Kt}).then(G=>{const p=G||[];if(!p||!(p!=null&&p.length)){ie(!1);return}p.length<10?ie(!1):ie(!0),s([...T,...p.reverse()])})},ZD=L=>DM(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)}}),uj=()=>DM(exports,null,function*(){t?t.fetchData().then(L=>{var r;(r=t==null?void 0:t.data)!=null&&r.id&&(y(L.netOpen),De(L.enableNetOpen))}):(y(typeof(O==null?void 0:O.connectNetwork)=="object"&&typeof(O==null?void 0:O.connectNetwork.default)=="boolean"?O.connectNetwork.default:!1),De(e.arrange[0].enableNetOpen))});z.useEffect(()=>{uj()},[t]),z.useEffect(()=>{let L=null,r=null;const E=()=>{var eM,MN;if(!h.current)return;const p=document.getElementById("chat-main"),K=(eM=h.current)==null?void 0:eM.querySelector(".infinite-scroll-component__outerdiv"),H=(MN=h.current)==null?void 0:MN.querySelector(".infinite-scroll-component");if(!K||!H||!p)return;const mM=p.offsetHeight;if(H.offsetHeight<=mM){if(K.style.height==="100%")return;K.style.height="100%"}else{if(K.style.height==="auto")return;K.style.height="auto"}},G=()=>{var H;if(typeof ResizeObserver=="undefined"||!h.current)return;const p=document.getElementById("chat-main"),K=(H=h.current)==null?void 0:H.querySelector(".infinite-scroll-component");!K||!p||(r=new ResizeObserver(()=>{E()}),r.observe(K),r.observe(p))};return L=requestAnimationFrame(()=>{E(),G()}),()=>{L!==null&&cancelAnimationFrame(L),r==null||r.disconnect()}},[T]),z.useEffect(()=>{if(t)return;const L=()=>{const G=((d==null?void 0:d.promptVariables)||[]).filter(p=>p.type?!(p.type===R.PromptVariableType.User&&p.key==="query")&&!(p.type===R.PromptVariableType.System&&p.key==="datetime")&&p.status===1:p.key!=="query"&&p.status===1).map((p,K)=>{var mM,hM;let H="";return typeof(O==null?void 0:O.promptVariables)=="object"&&(H=((hM=(mM=O.promptVariables.default)==null?void 0:mM.find(eM=>eM.key===p.key&&eM.type===p.type))==null?void 0:hM.value)||""),{id:K+"",key:p.key,name:p.name,value:H,type:p.type}});te([...G].sort((p,K)=>p.key.localeCompare(K.key)))};return d!=null&&d.ready?L():d==null||d.addEventListener("ready",L),()=>{d==null||d.removeEventListener("ready",L)}},[t,d,O==null?void 0:O.promptVariables]);const rt=()=>D==null?void 0:D({netOpen:u?mN.OPEN:mN.CLOSE}).then(L=>{var r,E;return I==null||I(L),vN(!1),y(!!((r=L.data)!=null&&r.netOpen)),De(!!((E=L.data)!=null&&E.enableNetOpen)),Ij(L),L}),ot=!!T.length,lt=z.useMemo(()=>{var L;return e.arrange&&((L=e.arrange[0])!=null&&L.openingContent)?i.jsx(oi,{application:e,history:{role:1,content:e.arrange[0].openingContent,code:200,messageId:"opening-message",sessionId:"",reference:[],searchReference:[],messageTime:VM(Date.now()).format("YYYY-MM-DD HH:mm:ss"),actions:[],isLoading:!1},actions:ot,markdown:O==null?void 0:O.markdown}):null},[e==null?void 0:e.arrange,ot]);return z.useImperativeHandle(N,()=>({getCurrentInputText:()=>{var L;return(L=tM.current)==null?void 0:L.getCurrentText()}})),z.useEffect(()=>{var r;const L=(r=t==null?void 0:t.data)==null?void 0:r.id;L&&pM(E=>qM(IM({},E),{[L]:[]}))},[(Ct=t==null?void 0:t.data)==null?void 0:Ct.id]),i.jsxs("div",{className:"agent-chat",children:[dD?i.jsx("div",{className:"session-loading",children:i.jsx(n.Spin,{})}):i.jsxs(i.Fragment,{children:[(o==null?void 0:o.promptVariables)&&i.jsx(Yi,{ref:rN,appId:e.id,currentSession:t,promptVariables:TN,setPromptVariables:te,setCurrentSession:I}),i.jsxs("div",{className:"chat-main",id:"chat-main",style:q,children:[i.jsx("div",{className:"chat-main-wrapper",id:"scrollableDiv",style:{height:"100%",overflowY:"auto",display:"flex",flexDirection:"column-reverse"},ref:h,onScroll:vD,children:(Ot=t==null?void 0:t.data)!=null&&Ot.id&&(T!=null&&T.length)?i.jsxs(XD,{dataLength:T.length,next:RD,style:{display:"flex",flexDirection:"column-reverse",overflowX:"hidden"},inverse:!0,endMessage:T.length>Kt&&((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(Xz,{application:e,currentSession:t,history:L,docViewerUrl:j,isLastHistory:r===0,onRelatedClick:PD,onAgainClick:WD,onEditClick:GD,markdown:O==null?void 0:O.markdown},L.renderKey||`${L.messageId}-${r}`)),!Dt&<]}):i.jsxs("div",{className:"main-empty",children:[(O==null?void 0:O.greeting)!==!1&&i.jsx(hz,{text:O!=null&&O.greeting&&typeof O.greeting=="object"&&O.greeting.text!==void 0?O.greeting.text:(dt=e.arrange)!=null&&dt.length&&((wt=e.arrange[0])!=null&&wt.greetings)?e.arrange[0].greetings:Xt.text,icon:O===void 0||O.greeting===!0||((Et=O.greeting)==null?void 0:Et.icon)===void 0?MM||Xt.icon:O.greeting.icon,children:!!nM.length&&(((O==null?void 0:O.greeting)===void 0||(O==null?void 0:O.greeting))===!0||typeof(O==null?void 0:O.greeting)=="object"&&O.greeting.questions!==!1)&&i.jsx(Ci,{ref:QM,sid:(Qt=t==null?void 0:t.data)==null?void 0:Qt.id,isRecommendClearing:GM,data:nM,layoutBreakpoints:typeof(O==null?void 0:O.greeting)=="object"?O.greeting.layoutBreakpoints:void 0,onItemClick:L=>{var E,G,p;if(a(L==null?void 0:L.question),dM(L==null?void 0:L.question),GM)return;L!=null&&L.id&&w(!0);const r=(E=t==null?void 0:t.data)==null?void 0:E.id;o!=null&&o.fileUpload?(p=(G=JM.current)==null?void 0:G.clear())==null||p.then(()=>{var K,H;L!=null&&L.id&&(r?(K=at(r,L))==null||K.finally(()=>{w(!1)}):(w(!1),vN(!0),(H=rt())==null||H.then(mM=>{var hM;(hM=at(mM.id,L))==null||hM.finally(()=>{w(!1)})})))}):r?w(!1):(w(!1),vN(!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(sM,{type:"icon-zantinghuida",style:{fontSize:16}}),onClick:()=>pD(),children:"停止回答"})}),tt&&(T==null?void 0:T.length)>0&&i.jsx("div",{className:"back-bottom",children:i.jsx(n.Button,{size:"small",onClick:()=>bD({behavior:"smooth"}),type:"link",icon:i.jsx(sM,{type:"icon-yijianhuidaodibu",style:{fontSize:24}})})})]}),i.jsx("div",{className:"chat-footer",children:i.jsxs("div",{className:"chat-footer-input",children:[yM.length>0&&i.jsx("div",{className:"input-files",children:yM.map((L,r)=>i.jsx(wz,{className:"thumb-40",file:L,actions:{upload:E=>DM(exports,null,function*(){B(G=>G+1);try{return yield UD(E)}finally{B(G=>Math.max(0,G-1))}}),remove:()=>{xM(E=>E.filter((G,p)=>p!==r)),C(E=>E.filter((G,p)=>p!==r))}},onUrlChange:E=>{C(G=>{const p=[...G];return p[r]=E,p})}},r))}),i.jsxs("div",{className:"footer-upload-action-wrapper",children:[i.jsxs(n.Space,{className:"footer-upload-action",onClick:L=>L.preventDefault(),children:[i.jsxs(n.Space,{children:[(e.type===R.ApplicationTypes.Agent&&(o==null?void 0:o.imageUpload)||e.type===R.ApplicationTypes.Dialog&&((ht=e.arrange)==null?void 0:ht.length)&&!!e.arrange[0].visionOpen&&(o==null?void 0:o.imageUpload))&&i.jsx(n.Upload,{multiple:!0,disabled:yM.length>=WN||Y,accept:".jpg, .png, .jpeg,.bmp",listType:"picture-card",beforeUpload:st,className:"footer-upload-picture",showUploadList:!1,children:yM.length<WN?i.jsx(n.Tooltip,{placement:"topLeft",overlayClassName:"footer-upload-tooltip",title:i.jsx("div",{children:`支持上传.jpg .png .jpeg
|
|
10
|
-
.bmp格式的图片数据,单文件最大${Aj}M,最多${WN}张`}),children:i.jsx(n.Button,{type:"text",className:"camera-out-btn",style:{width:"22px",position:"relative",bottom:"-2px"},icon:i.jsx(sM,{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(sM,{type:"icon-shangchuantupian",className:"icon-tianjia",style:{fontSize:"22px"}})})}),g&&(o!=null&&o.fileUpload)&&(e!=null&&e.id)?i.jsx(Oi,{appId:e==null?void 0:e.id,ref:JM,isFirstSession:it,docViewerUrl:j,onStatusChange:L=>DM(exports,null,function*(){L!=="process"?(Ye(!0),uj()):Ye(!1)}),createSession:()=>ct().then(L=>{var E;return((E=L.data)==null?void 0:E.id)||""}),sid:(St=t==null?void 0:t.data)==null?void 0:St.id,disabled:zj||Y,afterFileAdd:(L,r)=>{r&&pM(E=>{const G=E[r]||[];return{[r]:[...G,L]}})},afterFileDelete:L=>{var E;const r=(E=t==null?void 0:t.data)==null?void 0:E.id;r&&pM(G=>{const p=G[r]||[];return{[r]:p.filter(K=>K.id!==L)}})},onFileListChange:L=>{BM(L)},shouldContinue:oD,afterFilesClear:()=>{var r;const L=(r=t==null?void 0:t.data)==null?void 0:r.id;L&&(pM({[L]:[]}),uj())}}):null,(o==null?void 0:o.prompt)&&(e==null?void 0:e.id)&&i.jsx(Vz,{appId:e.id,list:[],search:l?EM:"",onPromptSelect:L=>{dM(L.context),a(L.context)},disabled:Y})]}),i.jsxs(n.Space,{children:[(o==null?void 0:o.connectNetwork)&&e.type===R.ApplicationTypes.Dialog&&((kt=e.arrange)==null?void 0:kt.length)&&!!e.arrange[0].enableNetOpen&&i.jsx(Zz,{sessionId:(mt=t==null?void 0:t.data)==null?void 0:mt.id,netStatus:u,enable:typeof(O==null?void 0:O.connectNetwork)=="object"&&typeof(O==null?void 0:O.connectNetwork.diabled)=="boolean"?!(O!=null&&O.connectNetwork.diabled):xD,disabledTip:t?void 0:"网络访问已被禁用",onNetStatusChange:L=>{ZD(L)}}),(o==null?void 0:o.sessionList)&&i.jsx(Gz,{currentSessionId:(Ut=t==null?void 0:t.data)==null?void 0:Ut.id,onSessionChange:(L,r)=>{dM(void 0),we(!0),I==null||I(r)},disabled:Y}),NM&&AM==="float"&&i.jsx("div",{className:"session-history-drawer-component",children:i.jsx(n.Popover,{placement:"topRight",showArrow:!1,overlayClassName:"session-history-overlay",overlayStyle:{padding:"4px"},getPopupContainer:L=>L.parentNode,content:"会话历史记录",children:i.jsx(n.Button,{className:"history-overlay-action",disabled:Y,type:"text",icon:i.jsx(sM,{type:"icon-lishijilu",style:{fontSize:24}}),onClick:()=>It(!0)})})}),(o==null?void 0:o.sessionOpen)&&i.jsx(n.Button,{icon:i.jsx(SM.PlusOutlined,{}),className:"add-btn",type:"primary",disabled:jt||!t||!T.length||Y,onClick:()=>{var L,r;we(!1),I==null||I(null),HN.current=null,y(!1),(L=rN.current)==null||L.clear(),(r=QM.current)==null||r.clear()},children:"新会话"})]})]}),!!gj&&i.jsx("div",{className:"remainingSeconds-mark"})]}),i.jsxs("div",{className:"footer-textarea",onPaste:Lt,onPasteCapture:Lt,onDrop:yt,onDropCapture:yt,onDragOver:At,onDragOverCapture:At,children:[i.jsx(li,{ref:tM,maxLength:Q,text:CM,networkStatus:!1,loading:zt||de,disabled:rM||m||Y||zt||de,onTextSend:ut,onChange:(L,r)=>{dM(L);const E=r.getText().replace(/[\n\s]+$/,"");a(E),zM(E),l||iM(!0)},clearAction:i.jsx(n.Space,{size:0,children:i.jsx(n.Button,{type:"link",disabled:zj||Y,ghost:!0,icon:i.jsx(sM,{style:{fontSize:22},type:"icon-qingchujiyi"}),onClick:()=>hD()})})}),!!gj&&i.jsxs("div",{className:"remainingSeconds-time",children:["您之前对话触发敏感词拦截,当前处于禁言状态,暂时无法发送消息,剩余禁言时长",gj]})]})]})}),i.jsx(kz,{tips:k}),YM&&i.jsx(fz,{isvisible:YM,files:FM,sessionId:(ft=t==null?void 0:t.data)==null?void 0:ft.id,onClose:L=>{$M(!1),lD(!1)}})]}),gt&&i.jsx(Rz,{currentSession:t,application:e,networkStatus:u,setCurrentSession:I,disabled:Y,isSessionHistoryVisible:gt,setIsSessionHistoryVisible:It,onSessionChange:L=>{we(!0)}})]})});const wi=M=>{const{disabled:N,checkedValues:e,currKnowledgeList:j,selectCount:t,onSelectChange:D}=M,[g,I]=z.useState(!1),u=i.jsx(n.Checkbox.Group,{style:{width:"100%"},onChange:D,value:e,disabled:N,children:i.jsx(n.Row,{gutter:[20,12],children:j==null?void 0:j.map(T=>i.jsx(n.Col,{span:24,children:i.jsx(n.Checkbox,{value:T.id,children:T.name})},T.id))})}),y=T=>{I(T)};return i.jsx("div",{className:"knowledge-select",style:{borderColor:g?"#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(sM,{className:"select-icon",type:"icon-open"}),i.jsx("span",{className:"title",children:"参考知识库"}),i.jsxs("span",{className:"content",children:["已选 ",t," 个"]})]})})})},qz=M=>{var h,W;const{currentSession:N,application:e,setCheckKnowledges:j}=M,{mode:t,transform:D,features:g}=z.useContext(HM),[I,u]=z.useState([]),[y,T]=z.useState(typeof(g==null?void 0:g.knowledges)=="object"?((h=g.knowledges.default)==null?void 0:h.map(d=>d.id))||[]:[]),[s,A]=z.useState(0),[a,c]=z.useState(!1);z.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(g==null?void 0:g.knowledges)=="object"&&g.knowledges.default||k;if(Array.isArray(o)&&o.some(x=>Array.isArray(x.fileIds)&&x.fileIds.length===0))throw Error("fileIds cannot be an empty array");if(Pe(o||[])>UN)throw Error(`knowledges and fileIds total count cannot exceed ${UN}`);if(!N){T(o.map($=>$.id)),A(o.length),j==null||j(o);return}const X=()=>{const $=N.knowledges||o;A($.length);const x=$.map(q=>q.id);T(x)};return X(),N.addEventListener("data:updated",X),()=>{N==null||N.removeEventListener("data:updated",X)}},[e,N]),z.useEffect(()=>{var U;if(!a||(c(!1),!(e!=null&&e.id)))return;const d=[];y==null||y.map(k=>{const o=I==null?void 0:I.find(v=>v.id===k);d.push(o)}),(U=N==null?void 0:N.data)!=null&&U.id&&N.setKnowledges(d)},[a]);const f=d=>{c(!0),T(d);const U=[];d==null||d.map(k=>{const o=I==null?void 0:I.find(v=>v.id===k);U.push(o)}),j==null||j(U),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)&&I.length!==0&&i.jsx(wi,{disabled:typeof(g==null?void 0:g.knowledges)=="object"&&(g==null?void 0:g.knowledges.diabled)||!1,checkedValues:y,currKnowledgeList:I,selectCount:s,onSelectChange:f})]})};const Mg=z.forwardRef((M,N)=>{const{sessionId:e,appId:j,docViewerUrl:t}=M,[D,g]=z.useState(),{showHeader:I,agentClient:u,sider:y,onSessionLoad:T,features:s,mode:A}=z.useContext(HM),[a,c]=z.useState(),f=z.useRef(null),[h,W]=z.useState(""),[d,U]=z.useState(),k=z.useRef(null),[o,v]=z.useState(!1);z.useState([]);const{setIsSwitchingToExistingSession:X}=mj();z.useEffect(()=>{var x;v(D?!!((x=D.data)!=null&&x.netOpen):typeof(s==null?void 0:s.connectNetwork)=="object"&&typeof(s==null?void 0:s.connectNetwork.default)=="boolean"?s.connectNetwork.default:!1)},[D]),z.useEffect(()=>{const x=()=>DM(exports,null,function*(){const q=u==null?void 0:u.application;if(!(q!=null&&q.id))return;const Y=q==null?void 0:q.arrange;if(!(Y!=null&&Y.length))return;const b=Y[0].embeddingService;W(b),c(q)});if(u!=null&&u.ready){x();return}return u==null||u.addEventListener("ready",()=>x()),()=>{u==null||u.removeEventListener("ready",x)}},[u]),z.useEffect(()=>{u&&e&&(u.ready?u==null||u.getSessions().then(x=>DM(exports,null,function*(){g==null||g(x.find(q=>q.id===e))})):u.addEventListener("ready",()=>DM(exports,null,function*(){u==null||u.getSessions().then(x=>DM(exports,null,function*(){g==null||g(x.find(q=>q.id===e))}))}),!0))},[u,e]),z.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 $=x=>{var q;return(q=f.current)==null?void 0:q.create(qM(IM({},x),{knowledges:d}))};return z.useImperativeHandle(N,()=>({createSession:x=>$(x),getSessionList:()=>{var q;const x=((q=f.current)==null?void 0:q.list())||[];return Promise.resolve(x)},getCurrentInputText:()=>{var x;return(x=k.current)==null?void 0:x.getCurrentInputText()}})),i.jsx("div",{className:"dialog",children:i.jsxs("div",{className:"dialog-pannel",children:[i.jsx("div",{className:"dialog-sider",style:{display:y&&A==="inlay"?"block":"none"},children:i.jsx(Uj,{ref:f,appId:j,networkStatus:o,currentSession:D,application:a,setCurrentSession:g,checkKnowledges:d,setCheckKnowledges:I?U:void 0,sessionId:e,afterSessionClick:x=>{var q,Y;((q=x.data)==null?void 0:q.id)!==((Y=D==null?void 0:D.data)==null?void 0:Y.id)&&X(!0)}})}),i.jsx("div",{className:"dialog-content",children:i.jsxs("div",{className:"dialog-chat",children:[I&&i.jsx("div",{className:"dialog-chat-header",children:i.jsx(qz,{setCheckKnowledges:U,application:a,currentSession:D})}),i.jsx("div",{className:"dialog-chat-content",children:(a==null?void 0:a.id)&&i.jsx($z,{setNetworkStatus:v,networkStatus:o,application:a,currentSession:D,onCreateSession:$,docViewerUrl:t,embeddingService:h,setCurrentSession:g,ref:k})})]})})]})})}),Ng=z.forwardRef((M,N)=>{const{className:e,triggerButton:j,size:t,theme:D,icon:g,docViewerUrl:I,token:u,debug:y,env:T,plugins:s,mcp:A,footer:a,defaultInput:c,onComment:f,onSessionLoad:h,onSessionUnload:W,onMessage:d,beforeMessageSend:U,bodyStyle:k,apiUrl:o,sessionId:v,disabled:X,transform:$,features:x,stream:q,agentClient:Y,application:O}=M,b=z.useRef(null),[MM,NM]=z.useState(!1),[AM,WM]=z.useState(),[rM,ZM]=z.useState(t),[jM,KM]=z.useState(M.open),_M=z.useRef(null);z.useEffect(()=>{O&&(console.log("[AgentClientUI] token",Y,O),WM(O.id))},[O]),n.ConfigProvider.config({theme:D}),z.useEffect(()=>{t&&ZM(t)},[t]);const Q=(F,{element:yM,size:xM})=>{ZM({width:Number(xM.width),height:xM.height})};return z.useImperativeHandle(N,()=>({createSession:F=>{var yM;return(yM=_M.current)==null?void 0:yM.createSession(F)},getSessionList:()=>{var F;return(F=_M.current)==null?void 0:F.getSessionList()},getCurrentInputText:()=>{var F;return(F=_M.current)==null?void 0:F.getCurrentInputText()}})),i.jsx(n.ConfigProvider,{locale:ui,children:i.jsxs(Li,{value:qM(IM({},M),{popupContainer:b,agentClient:Y,footer:a,defaultInput:c,onComment:f,onSessionLoad:h,onSessionUnload:W,onMessage:d,beforeMessageSend:U,bodyStyle:k,disabled:X,transform:$,features:x}),children:[i.jsx(HD.Resizable,{height:(rM==null?void 0:rM.height)||"100%",width:(rM==null?void 0:rM.width)||"100%",maxConstraints:[document.body.clientWidth-45],minConstraints:[Number(t==null?void 0:t.minWidth)],onResize:Q,handle:i.jsx("span",{className:"resize-handle-ew"}),resizeHandles:e=="float"?["w"]:[],children:i.jsxs("div",{id:"dialog-modal",className:`gbot-dialog-modal ${e} ${jM?"opened":"closed"}`,style:qM(IM({},t),{width:e=="float"?rM==null?void 0:rM.width:t==null?void 0:t.width,height:e==="float"?rM==null?void 0:rM.height:t==null?void 0:t.height,maxHeight:"100vh"}),ref:b,children:[MM?i.jsx("div",{className:"loading",children:i.jsx(n.Spin,{})}):AM&&Y?i.jsx(Pz,{children:i.jsx(Mg,{ref:_M,appId:AM,docViewerUrl:I,bodyStyle:k,sessionId:v})}):null,(j==null?void 0:j.visible)&&i.jsx(n.Button,{className:"trigger-btn close-btn",icon:i.jsx("img",{src:g}),onClick:()=>KM(!1)})]})}),(j==null?void 0:j.visible)&&!jM&&i.jsx(n.Button,{className:`${e}-trigger-btn open-btn`,style:j.style,icon:i.jsx("img",{src:g}),onClick:()=>KM(!0)})]})})}),eg="@glodon-aiot/agent-cli-ui",jg="3.22.2-alpha.7",tg="./dist/es/index.mjs",ig="./dist/lib/index.js",Dg="./dist/src/index.d.ts",zg={import:"./dist/es/index.mjs",require:"./dist/lib/index.js",types:"./dist/src/index.d.ts"},gg=["dist"],Ig="module",Tg="dist/src/index.d.ts",ug={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"},sg={"@ant-design/icons":"^5.3.4","@glodon-aiot/apis":"^3.22.2-alpha.7","@glodon-aiot/bot-client-sdk":"^3.22.2-alpha.7","@glodon-aiot/react-components":"^3.22.2-alpha.7","@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"},ng={"@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"},Lg=[">0.2%","not dead","not op_mini all"],Ag=["last 1 chrome version","last 1 firefox version","last 1 safari version"],yg={commitizen:{path:"node_modules/cz-customizable"},"cz-customizable":{config:".cz-config.cjs"}},cg={access:"public",registry:"https://registry.npmjs.org/"},ag={hooks:{"commit-msg":"validate-commit-msg"}},rg={name:eg,version:jg,module:tg,main:ig,typings:Dg,exports:zg,files:gg,type:Ig,types:Tg,scripts:ug,dependencies:sg,devDependencies:ng,"lint-staged":{"*.{js,css,md,jsx,less,ts,tsx,json}":"prettier --write"},production:Lg,development:Ag,config:yg,publishConfig:cg,husky:ag};var Ei=(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))(Ei||{});//! moment.js
|
|
10
|
+
.bmp格式的图片数据,单文件最大${Aj}M,最多${WN}张`}),children:i.jsx(n.Button,{type:"text",className:"camera-out-btn",style:{width:"22px",position:"relative",bottom:"-2px"},icon:i.jsx(sM,{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(sM,{type:"icon-shangchuantupian",className:"icon-tianjia",style:{fontSize:"22px"}})})}),g&&(o!=null&&o.fileUpload)&&(e!=null&&e.id)?i.jsx(Oi,{appId:e==null?void 0:e.id,ref:JM,isFirstSession:it,docViewerUrl:j,onStatusChange:L=>DM(exports,null,function*(){L!=="process"?(Ye(!0),uj()):Ye(!1)}),createSession:()=>ct().then(L=>{var E;return((E=L.data)==null?void 0:E.id)||""}),sid:(St=t==null?void 0:t.data)==null?void 0:St.id,disabled:zj||Y,afterFileAdd:(L,r)=>{r&&pM(E=>{const G=E[r]||[];return{[r]:[...G,L]}})},afterFileDelete:L=>{var E;const r=(E=t==null?void 0:t.data)==null?void 0:E.id;r&&pM(G=>{const p=G[r]||[];return{[r]:p.filter(K=>K.id!==L)}})},onFileListChange:L=>{BM(L)},shouldContinue:oD,afterFilesClear:()=>{var r;const L=(r=t==null?void 0:t.data)==null?void 0:r.id;L&&(pM({[L]:[]}),uj())}}):null,(o==null?void 0:o.prompt)&&(e==null?void 0:e.id)&&i.jsx(Vz,{appId:e.id,list:[],search:l?EM:"",onPromptSelect:L=>{dM(L.context),a(L.context)},disabled:Y})]}),i.jsxs(n.Space,{children:[(o==null?void 0:o.connectNetwork)&&e.type===R.ApplicationTypes.Dialog&&((kt=e.arrange)==null?void 0:kt.length)&&!!e.arrange[0].enableNetOpen&&i.jsx(Zz,{sessionId:(mt=t==null?void 0:t.data)==null?void 0:mt.id,netStatus:u,enable:typeof(O==null?void 0:O.connectNetwork)=="object"&&typeof(O==null?void 0:O.connectNetwork.diabled)=="boolean"?!(O!=null&&O.connectNetwork.diabled):xD,disabledTip:t?void 0:"网络访问已被禁用",onNetStatusChange:L=>{ZD(L)}}),(o==null?void 0:o.sessionList)&&i.jsx(Gz,{currentSessionId:(Ut=t==null?void 0:t.data)==null?void 0:Ut.id,onSessionChange:(L,r)=>{dM(void 0),we(!0),I==null||I(r)},disabled:Y}),NM&&AM==="float"&&i.jsx("div",{className:"session-history-drawer-component",children:i.jsx(n.Popover,{placement:"topRight",showArrow:!1,overlayClassName:"session-history-overlay",overlayStyle:{padding:"4px"},getPopupContainer:L=>L.parentNode,content:"会话历史记录",children:i.jsx(n.Button,{className:"history-overlay-action",disabled:Y,type:"text",icon:i.jsx(sM,{type:"icon-lishijilu",style:{fontSize:24}}),onClick:()=>It(!0)})})}),(o==null?void 0:o.sessionOpen)&&i.jsx(n.Button,{icon:i.jsx(SM.PlusOutlined,{}),className:"add-btn",type:"primary",disabled:jt||!t||!T.length||Y,onClick:()=>{var L,r;we(!1),I==null||I(null),HN.current=null,y(!1),(L=rN.current)==null||L.clear(),(r=QM.current)==null||r.clear()},children:"新会话"})]})]}),!!gj&&i.jsx("div",{className:"remainingSeconds-mark"})]}),i.jsxs("div",{className:"footer-textarea",onPaste:Lt,onPasteCapture:Lt,onDrop:yt,onDropCapture:yt,onDragOver:At,onDragOverCapture:At,children:[i.jsx(li,{ref:tM,maxLength:Q,text:CM,networkStatus:!1,loading:zt||de,disabled:rM||m||Y||zt||de,onTextSend:ut,onChange:(L,r)=>{dM(L);const E=r.getText().replace(/[\n\s]+$/,"");a(E),zM(E),l||iM(!0)},clearAction:i.jsx(n.Space,{size:0,children:i.jsx(n.Button,{type:"link",disabled:zj||Y,ghost:!0,icon:i.jsx(sM,{style:{fontSize:22},type:"icon-qingchujiyi"}),onClick:()=>hD()})})}),!!gj&&i.jsxs("div",{className:"remainingSeconds-time",children:["您之前对话触发敏感词拦截,当前处于禁言状态,暂时无法发送消息,剩余禁言时长",gj]})]})]})}),i.jsx(kz,{tips:k}),YM&&i.jsx(fz,{isvisible:YM,files:FM,sessionId:(ft=t==null?void 0:t.data)==null?void 0:ft.id,onClose:L=>{$M(!1),lD(!1)}})]}),gt&&i.jsx(Rz,{currentSession:t,application:e,networkStatus:u,setCurrentSession:I,disabled:Y,isSessionHistoryVisible:gt,setIsSessionHistoryVisible:It,onSessionChange:L=>{we(!0)}})]})});const wi=M=>{const{disabled:N,checkedValues:e,currKnowledgeList:j,selectCount:t,onSelectChange:D}=M,[g,I]=z.useState(!1),u=i.jsx(n.Checkbox.Group,{style:{width:"100%"},onChange:D,value:e,disabled:N,children:i.jsx(n.Row,{gutter:[20,12],children:j==null?void 0:j.map(T=>i.jsx(n.Col,{span:24,children:i.jsx(n.Checkbox,{value:T.id,children:T.name})},T.id))})}),y=T=>{I(T)};return i.jsx("div",{className:"knowledge-select",style:{borderColor:g?"#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(sM,{className:"select-icon",type:"icon-open"}),i.jsx("span",{className:"title",children:"参考知识库"}),i.jsxs("span",{className:"content",children:["已选 ",t," 个"]})]})})})},qz=M=>{var h,W;const{currentSession:N,application:e,setCheckKnowledges:j}=M,{mode:t,transform:D,features:g}=z.useContext(HM),[I,u]=z.useState([]),[y,T]=z.useState(typeof(g==null?void 0:g.knowledges)=="object"?((h=g.knowledges.default)==null?void 0:h.map(d=>d.id))||[]:[]),[s,A]=z.useState(0),[a,c]=z.useState(!1);z.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(g==null?void 0:g.knowledges)=="object"&&g.knowledges.default||k;if(Array.isArray(o)&&o.some(x=>Array.isArray(x.fileIds)&&x.fileIds.length===0))throw Error("fileIds cannot be an empty array");if(Pe(o||[])>UN)throw Error(`knowledges and fileIds total count cannot exceed ${UN}`);if(!N){T(o.map($=>$.id)),A(o.length),j==null||j(o);return}const X=()=>{const $=N.knowledges||o;A($.length);const x=$.map(q=>q.id);T(x)};return X(),N.addEventListener("data:updated",X),()=>{N==null||N.removeEventListener("data:updated",X)}},[e,N]),z.useEffect(()=>{var U;if(!a||(c(!1),!(e!=null&&e.id)))return;const d=[];y==null||y.map(k=>{const o=I==null?void 0:I.find(v=>v.id===k);d.push(o)}),(U=N==null?void 0:N.data)!=null&&U.id&&N.setKnowledges(d)},[a]);const f=d=>{c(!0),T(d);const U=[];d==null||d.map(k=>{const o=I==null?void 0:I.find(v=>v.id===k);U.push(o)}),j==null||j(U),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)&&I.length!==0&&i.jsx(wi,{disabled:typeof(g==null?void 0:g.knowledges)=="object"&&(g==null?void 0:g.knowledges.diabled)||!1,checkedValues:y,currKnowledgeList:I,selectCount:s,onSelectChange:f})]})};const Mg=z.forwardRef((M,N)=>{const{sessionId:e,appId:j,docViewerUrl:t}=M,[D,g]=z.useState(),{showHeader:I,agentClient:u,sider:y,onSessionLoad:T,features:s,mode:A}=z.useContext(HM),[a,c]=z.useState(),f=z.useRef(null),[h,W]=z.useState(""),[d,U]=z.useState(),k=z.useRef(null),[o,v]=z.useState(!1);z.useState([]);const{setIsSwitchingToExistingSession:X}=mj();z.useEffect(()=>{var x;v(D?!!((x=D.data)!=null&&x.netOpen):typeof(s==null?void 0:s.connectNetwork)=="object"&&typeof(s==null?void 0:s.connectNetwork.default)=="boolean"?s.connectNetwork.default:!1)},[D]),z.useEffect(()=>{const x=()=>DM(exports,null,function*(){const q=u==null?void 0:u.application;if(!(q!=null&&q.id))return;const Y=q==null?void 0:q.arrange;if(!(Y!=null&&Y.length))return;const b=Y[0].embeddingService;W(b),c(q)});if(u!=null&&u.ready){x();return}return u==null||u.addEventListener("ready",()=>x()),()=>{u==null||u.removeEventListener("ready",x)}},[u]),z.useEffect(()=>{u&&e&&(u.ready?u==null||u.getSessions().then(x=>DM(exports,null,function*(){g==null||g(x.find(q=>q.id===e))})):u.addEventListener("ready",()=>DM(exports,null,function*(){u==null||u.getSessions().then(x=>DM(exports,null,function*(){g==null||g(x.find(q=>q.id===e))}))}),!0))},[u,e]),z.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 $=x=>{var q;return(q=f.current)==null?void 0:q.create(qM(IM({},x),{knowledges:d}))};return z.useImperativeHandle(N,()=>({createSession:x=>$(x),getSessionList:()=>{var q;const x=((q=f.current)==null?void 0:q.list())||[];return Promise.resolve(x)},getCurrentInputText:()=>{var x;return(x=k.current)==null?void 0:x.getCurrentInputText()}})),i.jsx("div",{className:"dialog",children:i.jsxs("div",{className:"dialog-pannel",children:[i.jsx("div",{className:"dialog-sider",style:{display:y&&A==="inlay"?"block":"none"},children:i.jsx(Uj,{ref:f,appId:j,networkStatus:o,currentSession:D,application:a,setCurrentSession:g,checkKnowledges:d,setCheckKnowledges:I?U:void 0,sessionId:e,afterSessionClick:x=>{var q,Y;((q=x.data)==null?void 0:q.id)!==((Y=D==null?void 0:D.data)==null?void 0:Y.id)&&X(!0)}})}),i.jsx("div",{className:"dialog-content",children:i.jsxs("div",{className:"dialog-chat",children:[I&&i.jsx("div",{className:"dialog-chat-header",children:i.jsx(qz,{setCheckKnowledges:U,application:a,currentSession:D})}),i.jsx("div",{className:"dialog-chat-content",children:(a==null?void 0:a.id)&&i.jsx($z,{setNetworkStatus:v,networkStatus:o,application:a,currentSession:D,onCreateSession:$,docViewerUrl:t,embeddingService:h,setCurrentSession:g,ref:k})})]})})]})})}),Ng=z.forwardRef((M,N)=>{const{className:e,triggerButton:j,size:t,theme:D,icon:g,docViewerUrl:I,token:u,debug:y,env:T,plugins:s,mcp:A,footer:a,defaultInput:c,onComment:f,onSessionLoad:h,onSessionUnload:W,onMessage:d,beforeMessageSend:U,bodyStyle:k,apiUrl:o,sessionId:v,disabled:X,transform:$,features:x,stream:q,agentClient:Y,application:O}=M,b=z.useRef(null),[MM,NM]=z.useState(!1),[AM,WM]=z.useState(),[rM,ZM]=z.useState(t),[jM,KM]=z.useState(M.open),_M=z.useRef(null);z.useEffect(()=>{O&&(console.log("[AgentClientUI] token",Y,O),WM(O.id))},[O]),n.ConfigProvider.config({theme:D}),z.useEffect(()=>{t&&ZM(t)},[t]);const Q=(F,{element:yM,size:xM})=>{ZM({width:Number(xM.width),height:xM.height})};return z.useImperativeHandle(N,()=>({createSession:F=>{var yM;return(yM=_M.current)==null?void 0:yM.createSession(F)},getSessionList:()=>{var F;return(F=_M.current)==null?void 0:F.getSessionList()},getCurrentInputText:()=>{var F;return(F=_M.current)==null?void 0:F.getCurrentInputText()}})),i.jsx(n.ConfigProvider,{locale:ui,children:i.jsxs(Li,{value:qM(IM({},M),{popupContainer:b,agentClient:Y,footer:a,defaultInput:c,onComment:f,onSessionLoad:h,onSessionUnload:W,onMessage:d,beforeMessageSend:U,bodyStyle:k,disabled:X,transform:$,features:x}),children:[i.jsx(HD.Resizable,{height:(rM==null?void 0:rM.height)||"100%",width:(rM==null?void 0:rM.width)||"100%",maxConstraints:[document.body.clientWidth-45],minConstraints:[Number(t==null?void 0:t.minWidth)],onResize:Q,handle:i.jsx("span",{className:"resize-handle-ew"}),resizeHandles:e=="float"?["w"]:[],children:i.jsxs("div",{id:"dialog-modal",className:`gbot-dialog-modal ${e} ${jM?"opened":"closed"}`,style:qM(IM({},t),{width:e=="float"?rM==null?void 0:rM.width:t==null?void 0:t.width,height:e==="float"?rM==null?void 0:rM.height:t==null?void 0:t.height,maxHeight:"100vh"}),ref:b,children:[MM?i.jsx("div",{className:"loading",children:i.jsx(n.Spin,{})}):AM&&Y?i.jsx(Pz,{children:i.jsx(Mg,{ref:_M,appId:AM,docViewerUrl:I,bodyStyle:k,sessionId:v})}):null,(j==null?void 0:j.visible)&&i.jsx(n.Button,{className:"trigger-btn close-btn",icon:i.jsx("img",{src:g}),onClick:()=>KM(!1)})]})}),(j==null?void 0:j.visible)&&!jM&&i.jsx(n.Button,{className:`${e}-trigger-btn open-btn`,style:j.style,icon:i.jsx("img",{src:g}),onClick:()=>KM(!0)})]})})}),eg="@glodon-aiot/agent-cli-ui",jg="3.22.2",tg="./dist/es/index.mjs",ig="./dist/lib/index.js",Dg="./dist/src/index.d.ts",zg={import:"./dist/es/index.mjs",require:"./dist/lib/index.js",types:"./dist/src/index.d.ts"},gg=["dist"],Ig="module",Tg="dist/src/index.d.ts",ug={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"},sg={"@ant-design/icons":"^5.3.4","@glodon-aiot/apis":"^3.22.2","@glodon-aiot/bot-client-sdk":"^3.22.2","@glodon-aiot/react-components":"^3.22.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"},ng={"@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"},Lg=[">0.2%","not dead","not op_mini all"],Ag=["last 1 chrome version","last 1 firefox version","last 1 safari version"],yg={commitizen:{path:"node_modules/cz-customizable"},"cz-customizable":{config:".cz-config.cjs"}},cg={access:"public",registry:"https://registry.npmjs.org/"},ag={hooks:{"commit-msg":"validate-commit-msg"}},rg={name:eg,version:jg,module:tg,main:ig,typings:Dg,exports:zg,files:gg,type:Ig,types:Tg,scripts:ug,dependencies:sg,devDependencies:ng,"lint-staged":{"*.{js,css,md,jsx,less,ts,tsx,json}":"prettier --write"},production:Lg,development:Ag,config:yg,publishConfig:cg,husky:ag};var Ei=(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))(Ei||{});//! 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.22.2
|
|
3
|
+
"version": "3.22.2",
|
|
4
4
|
"module": "./dist/es/index.mjs",
|
|
5
5
|
"main": "./dist/lib/index.js",
|
|
6
6
|
"typings": "./dist/src/index.d.ts",
|
|
@@ -31,9 +31,9 @@
|
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"@ant-design/icons": "^5.3.4",
|
|
34
|
-
"@glodon-aiot/apis": "^3.22.2
|
|
35
|
-
"@glodon-aiot/bot-client-sdk": "^3.22.2
|
|
36
|
-
"@glodon-aiot/react-components": "^3.22.2
|
|
34
|
+
"@glodon-aiot/apis": "^3.22.2",
|
|
35
|
+
"@glodon-aiot/bot-client-sdk": "^3.22.2",
|
|
36
|
+
"@glodon-aiot/react-components": "^3.22.2",
|
|
37
37
|
"@matejmazur/react-mathjax": "^0.1.10",
|
|
38
38
|
"@react-pdf-viewer/core": "^3.12.0",
|
|
39
39
|
"@react-pdf-viewer/default-layout": "^3.12.0",
|