From 1d5b8c554eab02312b1151a77a40fe06508bb5d2 Mon Sep 17 00:00:00 2001 From: Aralhi Date: Sun, 25 Feb 2024 16:58:19 +0800 Subject: [PATCH] feat: update assets --- dbgpt/app/static/404.html | 2 +- dbgpt/app/static/404/index.html | 2 +- .../_buildManifest.js | 2 +- .../_ssgManifest.js | 0 .../{_app-2d2fe1efcb16f7f3.js => _app-607fe0bffeec4eaf.js} | 0 .../{index-60038165daa70046.js => index-018bceca9c8a4ee9.js} | 0 .../_next/static/chunks/pages/knowledge-3b36ed0feb6e3138.js | 1 - .../_next/static/chunks/pages/knowledge-7ab372de241857ba.js | 1 + ...{webpack-6d79785e1375a57a.js => webpack-27020bb4734c8351.js} | 2 +- dbgpt/app/static/agent/index.html | 2 +- dbgpt/app/static/app/index.html | 2 +- dbgpt/app/static/chat/index.html | 2 +- dbgpt/app/static/database/index.html | 2 +- dbgpt/app/static/flow/canvas/index.html | 2 +- dbgpt/app/static/flow/index.html | 2 +- dbgpt/app/static/index.html | 2 +- dbgpt/app/static/knowledge/chunk/index.html | 2 +- dbgpt/app/static/knowledge/index.html | 2 +- dbgpt/app/static/models/index.html | 2 +- dbgpt/app/static/prompt/index.html | 2 +- 20 files changed, 16 insertions(+), 16 deletions(-) rename dbgpt/app/static/_next/static/{E4AMTqSMwyceklE-SZ3cs => 75mG4qk-L3WdY4_6ojRrk}/_buildManifest.js (94%) rename dbgpt/app/static/_next/static/{E4AMTqSMwyceklE-SZ3cs => 75mG4qk-L3WdY4_6ojRrk}/_ssgManifest.js (100%) rename dbgpt/app/static/_next/static/chunks/pages/{_app-2d2fe1efcb16f7f3.js => _app-607fe0bffeec4eaf.js} (100%) rename dbgpt/app/static/_next/static/chunks/pages/{index-60038165daa70046.js => index-018bceca9c8a4ee9.js} (100%) delete mode 100644 dbgpt/app/static/_next/static/chunks/pages/knowledge-3b36ed0feb6e3138.js create mode 100644 dbgpt/app/static/_next/static/chunks/pages/knowledge-7ab372de241857ba.js rename dbgpt/app/static/_next/static/chunks/{webpack-6d79785e1375a57a.js => webpack-27020bb4734c8351.js} (63%) diff --git a/dbgpt/app/static/404.html b/dbgpt/app/static/404.html index 9048f1e20..12634909e 100644 --- a/dbgpt/app/static/404.html +++ b/dbgpt/app/static/404.html @@ -1 +1 @@ -404: This page could not be found

404

This page could not be found.

\ No newline at end of file +404: This page could not be found

404

This page could not be found.

\ No newline at end of file diff --git a/dbgpt/app/static/404/index.html b/dbgpt/app/static/404/index.html index 9048f1e20..12634909e 100644 --- a/dbgpt/app/static/404/index.html +++ b/dbgpt/app/static/404/index.html @@ -1 +1 @@ -404: This page could not be found

404

This page could not be found.

\ No newline at end of file +404: This page could not be found

404

This page could not be found.

\ No newline at end of file diff --git a/dbgpt/app/static/_next/static/E4AMTqSMwyceklE-SZ3cs/_buildManifest.js b/dbgpt/app/static/_next/static/75mG4qk-L3WdY4_6ojRrk/_buildManifest.js similarity index 94% rename from dbgpt/app/static/_next/static/E4AMTqSMwyceklE-SZ3cs/_buildManifest.js rename to dbgpt/app/static/_next/static/75mG4qk-L3WdY4_6ojRrk/_buildManifest.js index 5a01ccb58..025933b3d 100644 --- a/dbgpt/app/static/_next/static/E4AMTqSMwyceklE-SZ3cs/_buildManifest.js +++ b/dbgpt/app/static/_next/static/75mG4qk-L3WdY4_6ojRrk/_buildManifest.js @@ -1 +1 @@ -self.__BUILD_MANIFEST=function(s,c,a,e,t,n,d,f,k,b,h,i,u,j,p,o,g,l,r){return{__rewrites:{beforeFiles:[],afterFiles:[],fallback:[]},"/":[p,s,c,e,a,b,d,f,o,"static/chunks/9305-f44429d5185a9fc7.js","static/chunks/7299-cb3b5c1ad528f20a.js","static/chunks/pages/index-60038165daa70046.js"],"/_error":["static/chunks/pages/_error-8095ba9e1bf12f30.js"],"/agent":[s,c,a,t,b,n,"static/chunks/pages/agent-ce4aada0ffb26742.js"],"/app":[h,s,c,e,a,t,n,i,u,"static/chunks/7958-ed34baf152e6e252.js",j,"static/chunks/pages/app-3b436b62369b5dee.js"],"/chat":["static/chunks/pages/chat-b09234393c5f8ad7.js"],"/database":[s,c,e,a,t,n,f,k,"static/chunks/7902-94d75aab69ac7c8d.js","static/chunks/pages/database-5b649049b3adcaf7.js"],"/flow":[h,i,u,j,"static/chunks/pages/flow-c83aa1081ec293f9.js"],"/flow/canvas":[p,h,s,c,e,a,d,f,i,k,u,g,o,"static/chunks/4350-1896c46dd5e9afe8.js",j,"static/chunks/pages/flow/canvas-d313d1fe05a1d9e1.js"],"/knowledge":[l,s,c,a,t,b,n,f,k,r,g,"static/chunks/8660-25eebcb95c34109b.js","static/chunks/pages/knowledge-3b36ed0feb6e3138.js"],"/knowledge/chunk":[s,e,t,d,n,"static/chunks/pages/knowledge/chunk-148ca5920e6a3447.js"],"/models":[l,s,c,e,a,k,"static/chunks/3444-30181eacc7980e66.js","static/chunks/pages/models-a019e728f75142a1.js"],"/prompt":[s,c,e,a,d,r,"static/chunks/4733-cc041bf7a3d12e39.js","static/chunks/5396-3e98ef6b437678bd.js","static/chunks/pages/prompt-8ac6786093609ab9.js"],sortedPages:["/","/_app","/_error","/agent","/app","/chat","/database","/flow","/flow/canvas","/knowledge","/knowledge/chunk","/models","/prompt"]}}("static/chunks/7113-c0c4ee5dc30929ba.js","static/chunks/5503-c65f6d730754acc7.js","static/chunks/9479-21f588e1fd4e6b6d.js","static/chunks/1009-f20562de52b03b76.js","static/chunks/4442-2fd5fdaab894a502.js","static/chunks/5813-c6244a8eba7ef4ae.js","static/chunks/4810-1e930464030aee69.js","static/chunks/411-b5d3e7f64bee2335.js","static/chunks/8928-0e78def492052d13.js","static/chunks/4553-5a62c446efb06d63.js","static/chunks/971df74e-7436ff4085ebb785.js","static/chunks/7434-29506257e67e8077.js","static/chunks/9924-5bce555f07385e1f.js","static/css/b4846eed11c4725f.css","static/chunks/29107295-75edf0bf34e24b1e.js","static/chunks/2487-24749b0b156943d8.js","static/chunks/6485-a0f49ba464882399.js","static/chunks/75fc9c18-1d6133135d3d283c.js","static/chunks/8548-e633dfc38edeb044.js"),self.__BUILD_MANIFEST_CB&&self.__BUILD_MANIFEST_CB(); \ No newline at end of file +self.__BUILD_MANIFEST=function(s,c,a,e,t,n,d,f,k,b,h,i,u,j,p,o,g,l,r){return{__rewrites:{beforeFiles:[],afterFiles:[],fallback:[]},"/":[p,s,c,e,a,b,d,f,o,"static/chunks/9305-f44429d5185a9fc7.js","static/chunks/7299-cb3b5c1ad528f20a.js","static/chunks/pages/index-018bceca9c8a4ee9.js"],"/_error":["static/chunks/pages/_error-8095ba9e1bf12f30.js"],"/agent":[s,c,a,t,b,n,"static/chunks/pages/agent-ce4aada0ffb26742.js"],"/app":[h,s,c,e,a,t,n,i,u,"static/chunks/7958-ed34baf152e6e252.js",j,"static/chunks/pages/app-3b436b62369b5dee.js"],"/chat":["static/chunks/pages/chat-b09234393c5f8ad7.js"],"/database":[s,c,e,a,t,n,f,k,"static/chunks/7902-94d75aab69ac7c8d.js","static/chunks/pages/database-5b649049b3adcaf7.js"],"/flow":[h,i,u,j,"static/chunks/pages/flow-c83aa1081ec293f9.js"],"/flow/canvas":[p,h,s,c,e,a,d,f,i,k,u,g,o,"static/chunks/4350-1896c46dd5e9afe8.js",j,"static/chunks/pages/flow/canvas-d313d1fe05a1d9e1.js"],"/knowledge":[l,s,c,a,t,b,n,f,k,r,g,"static/chunks/8660-25eebcb95c34109b.js","static/chunks/pages/knowledge-7ab372de241857ba.js"],"/knowledge/chunk":[s,e,t,d,n,"static/chunks/pages/knowledge/chunk-148ca5920e6a3447.js"],"/models":[l,s,c,e,a,k,"static/chunks/3444-30181eacc7980e66.js","static/chunks/pages/models-a019e728f75142a1.js"],"/prompt":[s,c,e,a,d,r,"static/chunks/4733-cc041bf7a3d12e39.js","static/chunks/5396-3e98ef6b437678bd.js","static/chunks/pages/prompt-8ac6786093609ab9.js"],sortedPages:["/","/_app","/_error","/agent","/app","/chat","/database","/flow","/flow/canvas","/knowledge","/knowledge/chunk","/models","/prompt"]}}("static/chunks/7113-c0c4ee5dc30929ba.js","static/chunks/5503-c65f6d730754acc7.js","static/chunks/9479-21f588e1fd4e6b6d.js","static/chunks/1009-f20562de52b03b76.js","static/chunks/4442-2fd5fdaab894a502.js","static/chunks/5813-c6244a8eba7ef4ae.js","static/chunks/4810-1e930464030aee69.js","static/chunks/411-b5d3e7f64bee2335.js","static/chunks/8928-0e78def492052d13.js","static/chunks/4553-5a62c446efb06d63.js","static/chunks/971df74e-7436ff4085ebb785.js","static/chunks/7434-29506257e67e8077.js","static/chunks/9924-5bce555f07385e1f.js","static/css/b4846eed11c4725f.css","static/chunks/29107295-75edf0bf34e24b1e.js","static/chunks/2487-24749b0b156943d8.js","static/chunks/6485-a0f49ba464882399.js","static/chunks/75fc9c18-1d6133135d3d283c.js","static/chunks/8548-e633dfc38edeb044.js"),self.__BUILD_MANIFEST_CB&&self.__BUILD_MANIFEST_CB(); \ No newline at end of file diff --git a/dbgpt/app/static/_next/static/E4AMTqSMwyceklE-SZ3cs/_ssgManifest.js b/dbgpt/app/static/_next/static/75mG4qk-L3WdY4_6ojRrk/_ssgManifest.js similarity index 100% rename from dbgpt/app/static/_next/static/E4AMTqSMwyceklE-SZ3cs/_ssgManifest.js rename to dbgpt/app/static/_next/static/75mG4qk-L3WdY4_6ojRrk/_ssgManifest.js diff --git a/dbgpt/app/static/_next/static/chunks/pages/_app-2d2fe1efcb16f7f3.js b/dbgpt/app/static/_next/static/chunks/pages/_app-607fe0bffeec4eaf.js similarity index 100% rename from dbgpt/app/static/_next/static/chunks/pages/_app-2d2fe1efcb16f7f3.js rename to dbgpt/app/static/_next/static/chunks/pages/_app-607fe0bffeec4eaf.js diff --git a/dbgpt/app/static/_next/static/chunks/pages/index-60038165daa70046.js b/dbgpt/app/static/_next/static/chunks/pages/index-018bceca9c8a4ee9.js similarity index 100% rename from dbgpt/app/static/_next/static/chunks/pages/index-60038165daa70046.js rename to dbgpt/app/static/_next/static/chunks/pages/index-018bceca9c8a4ee9.js diff --git a/dbgpt/app/static/_next/static/chunks/pages/knowledge-3b36ed0feb6e3138.js b/dbgpt/app/static/_next/static/chunks/pages/knowledge-3b36ed0feb6e3138.js deleted file mode 100644 index e56cd91a5..000000000 --- a/dbgpt/app/static/_next/static/chunks/pages/knowledge-3b36ed0feb6e3138.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8662],{54681:function(e,t,a){(window.__NEXT_P=window.__NEXT_P||[]).push(["/knowledge",function(){return a(18671)}])},26892:function(e,t,a){"use strict";var l=a(85893),s=a(67294),n=a(66309),r=a(83062),i=a(94184),c=a.n(i),o=a(25675),d=a.n(o);t.Z=(0,s.memo)(function(e){let{icon:t,iconBorder:a=!0,title:i,desc:o,tags:m,children:u,disabled:x,operations:h,className:p,..._}=e,j=(0,s.useMemo)(()=>t?"string"==typeof t?(0,l.jsx)(d(),{className:c()("w-11 h-11 rounded-full mr-4 object-contain bg-white",{"border border-gray-200":a}),width:44,height:44,src:t,alt:i}):t:null,[t]),f=(0,s.useMemo)(()=>m&&m.length?(0,l.jsx)("div",{className:"flex items-center mt-1 flex-wrap",children:m.map((e,t)=>{var a;return"string"==typeof e?(0,l.jsx)(n.Z,{className:"text-xs",bordered:!1,color:"default",children:e},t):(0,l.jsx)(n.Z,{className:"text-xs",bordered:null!==(a=e.border)&&void 0!==a&&a,color:e.color,children:e.text},t)})}):null,[m]);return(0,l.jsxs)("div",{className:c()("group/card relative flex flex-col w-72 rounded justify-between text-black bg-white shadow-[0_8px_16px_-10px_rgba(100,100,100,.08)] hover:shadow-[0_14px_20px_-10px_rgba(100,100,100,.15)] dark:bg-[#232734] dark:text-white dark:hover:border-white transition-[transfrom_shadow] duration-300 hover:-translate-y-1 min-h-fit",{"grayscale cursor-no-drop":x,"cursor-pointer":!x&&!!_.onClick},p),..._,children:[(0,l.jsxs)("div",{className:"p-4",children:[(0,l.jsxs)("div",{className:"flex items-center",children:[j,(0,l.jsxs)("div",{className:"flex flex-col",children:[(0,l.jsx)("h2",{className:"text-sm font-semibold",children:i}),f]})]}),o&&(0,l.jsx)(r.Z,{title:o,children:(0,l.jsx)("p",{className:"mt-2 text-sm text-gray-500 font-normal line-clamp-2",children:o})})]}),(0,l.jsxs)("div",{children:[u,h&&!!h.length&&(0,l.jsx)("div",{className:"flex flex-wrap items-center justify-center border-t border-solid border-gray-100 dark:border-theme-dark",children:h.map((e,t)=>(0,l.jsx)(r.Z,{title:e.label,children:(0,l.jsxs)("div",{className:"relative flex flex-1 items-center justify-center h-11 text-gray-400 hover:text-blue-500 transition-colors duration-300 cursor-pointer",onClick:t=>{var a;t.stopPropagation(),null===(a=e.onClick)||void 0===a||a.call(e)},children:[e.children,t{let[e,a]=await (0,S.Vx)((0,S.Tu)(t.name));d(a)};(0,n.useEffect)(()=>{x()},[t.name]);let h=[{key:"Embedding",label:(0,s.jsxs)("div",{children:[(0,s.jsx)(V.Z,{}),r("Embedding")]}),children:(0,s.jsxs)(D.Z,{gutter:24,children:[(0,s.jsx)(F.Z,{span:12,offset:0,children:(0,s.jsx)(A.Z.Item,{tooltip:r("the_top_k_vectors"),rules:[{required:!0}],label:r("topk"),name:["embedding","topk"],children:(0,s.jsx)(E.default,{className:"mb-5 h-12"})})}),(0,s.jsx)(F.Z,{span:12,children:(0,s.jsx)(A.Z.Item,{tooltip:r("Set_a_threshold_score"),rules:[{required:!0}],label:r("recall_score"),name:["embedding","recall_score"],children:(0,s.jsx)(E.default,{className:"mb-5 h-12",placeholder:r("Please_input_the_owner")})})}),(0,s.jsx)(F.Z,{span:12,children:(0,s.jsx)(A.Z.Item,{tooltip:r("recall_type"),rules:[{required:!0}],label:r("recall_type"),name:["embedding","recall_type"],children:(0,s.jsx)(E.default,{className:"mb-5 h-12"})})}),(0,s.jsx)(F.Z,{span:12,children:(0,s.jsx)(A.Z.Item,{tooltip:r("A_model_used"),rules:[{required:!0}],label:r("model"),name:["embedding","model"],children:(0,s.jsx)(E.default,{className:"mb-5 h-12"})})}),(0,s.jsx)(F.Z,{span:12,children:(0,s.jsx)(A.Z.Item,{tooltip:r("The_size_of_the_data_chunks"),rules:[{required:!0}],label:r("chunk_size"),name:["embedding","chunk_size"],children:(0,s.jsx)(E.default,{className:"mb-5 h-12"})})}),(0,s.jsx)(F.Z,{span:12,children:(0,s.jsx)(A.Z.Item,{tooltip:r("The_amount_of_overlap"),rules:[{required:!0}],label:r("chunk_overlap"),name:["embedding","chunk_overlap"],children:(0,s.jsx)(E.default,{className:"mb-5 h-12",placeholder:r("Please_input_the_description")})})})]})},{key:"Prompt",label:(0,s.jsxs)("div",{children:[(0,s.jsx)(M.Z,{}),r("Prompt")]}),children:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(A.Z.Item,{tooltip:r("A_contextual_parameter"),label:r("scene"),name:["prompt","scene"],children:(0,s.jsx)(z,{rows:4,className:"mb-2"})}),(0,s.jsx)(A.Z.Item,{tooltip:r("structure_or_format"),label:r("template"),name:["prompt","template"],children:(0,s.jsx)(z,{rows:7,className:"mb-2"})}),(0,s.jsx)(A.Z.Item,{tooltip:r("The_maximum_number_of_tokens"),label:r("max_token"),name:["prompt","max_token"],children:(0,s.jsx)(E.default,{className:"mb-2"})})]})},{key:"Summary",label:(0,s.jsxs)("div",{children:[(0,s.jsx)(q.Z,{}),r("Summary")]}),children:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(A.Z.Item,{rules:[{required:!0}],label:r("max_iteration"),name:["summary","max_iteration"],children:(0,s.jsx)(E.default,{className:"mb-2"})}),(0,s.jsx)(A.Z.Item,{rules:[{required:!0}],label:r("concurrency_limit"),name:["summary","concurrency_limit"],children:(0,s.jsx)(E.default,{className:"mb-2"})})]})}],p=async e=>{u(!0);let[a,s,n]=await (0,S.Vx)((0,S.iH)(t.name,{argument:JSON.stringify(e)}));u(!1),(null==n?void 0:n.success)&&l(!1)};return(0,s.jsx)(c.default,{width:850,open:a,onCancel:()=>{l(!1)},footer:null,children:(0,s.jsx)(w.Z,{spinning:m,children:(0,s.jsxs)(A.Z,{size:"large",className:"mt-4",layout:"vertical",name:"basic",initialValues:{...o},autoComplete:"off",onFinish:p,children:[(0,s.jsx)(U.Z,{items:h}),(0,s.jsxs)("div",{className:"mt-3 mb-3",children:[(0,s.jsx)(i.ZP,{htmlType:"submit",type:"primary",className:"mr-6",children:r("Submit")}),(0,s.jsx)(i.ZP,{onClick:()=>{l(!1)},children:r("close")})]})]})})})}var R=a(47207);let{confirm:G}=c.default;function H(e){let{space:t}=e,{t:a}=(0,O.$G)(),l=(0,x.useRouter)(),[c,o]=(0,n.useState)(!1),[d,m]=(0,n.useState)([]),[u,p]=(0,n.useState)(!1),[_,j]=(0,n.useState)(0),C=(0,n.useRef)(1),E=(0,n.useMemo)(()=>d.length<_,[d.length,_]),D=e=>{G({title:a("Tips"),icon:(0,s.jsx)(h.Z,{}),content:"".concat(a("Del_Document_Tips"),"?"),okText:"Yes",okType:"danger",cancelText:"No",async onOk(){await V(e)}})};async function F(){o(!0);let[e,a]=await (0,S.Vx)((0,S._Q)(t.name,{page:C.current,page_size:18}));m(null==a?void 0:a.data),j((null==a?void 0:a.total)||0),o(!1)}let A=async()=>{if(!E)return;o(!0),C.current+=1;let[e,a]=await (0,S.Vx)((0,S._Q)(t.name,{page:C.current,page_size:18}));m([...d,...a.data]),o(!1)},U=async(e,t)=>{await (0,S.Vx)((0,S.Hx)(e,{doc_ids:[t]}))},V=async a=>{await (0,S.Vx)((0,S.n3)(t.name,{doc_name:a.doc_name})),F(),e.onDeleteDoc()},M=()=>{e.onAddDoc(t.name)},q=(e,t)=>{let a;switch(e){case"TODO":a="gold";break;case"RUNNING":a="#2db7f5";break;case"FINISHED":a="cyan";break;default:a="red"}return(0,s.jsx)(g.Z,{title:t,children:(0,s.jsx)(b.Z,{color:a,children:e})})};return(0,n.useEffect)(()=>{F()},[t]),(0,s.jsxs)("div",{className:"collapse-container pt-2 px-4",children:[(0,s.jsxs)(v.Z,{children:[(0,s.jsx)(i.ZP,{size:"middle",type:"primary",className:"flex items-center",icon:(0,s.jsx)(r.Z,{}),onClick:M,children:a("Add_Datasource")}),(0,s.jsx)(i.ZP,{size:"middle",className:"flex items-center mx-2",icon:(0,s.jsx)(P.Z,{}),onClick:()=>{p(!0)},children:"Arguments"})]}),(0,s.jsx)(y.Z,{}),(0,s.jsx)(w.Z,{spinning:c,children:(null==d?void 0:d.length)>0?(0,s.jsxs)("div",{className:"max-h-96 overflow-auto max-w-3/4",children:[(0,s.jsx)("div",{className:"mt-3 grid grid-cols-1 gap-x-6 gap-y-5 sm:grid-cols-2 lg:grid-cols-3 xl:gap-x-5",children:d.map(e=>(0,s.jsxs)(N.Z,{className:" dark:bg-[#484848] relative shrink-0 grow-0 cursor-pointer rounded-[10px] border border-gray-200 border-solid w-full",title:(0,s.jsx)(g.Z,{title:e.doc_name,children:(0,s.jsxs)("div",{className:"truncate ",children:[(0,s.jsx)(R.Z,{type:e.doc_type}),(0,s.jsx)("span",{children:e.doc_name})]})}),extra:(0,s.jsxs)("div",{className:"mx-3",children:[(0,s.jsx)(g.Z,{title:"detail",children:(0,s.jsx)(k.Z,{className:"mr-2 !text-lg",style:{color:"#1b7eff",fontSize:"20px"},onClick:()=>{l.push("/knowledge/chunk/?spaceName=".concat(t.name,"&id=").concat(e.id))}})}),(0,s.jsx)(g.Z,{title:"Sync",children:(0,s.jsx)(T.Z,{className:"mr-2 !text-lg",style:{color:"#1b7eff",fontSize:"20px"},onClick:()=>{U(t.name,e.id)}})}),(0,s.jsx)(g.Z,{title:"Delete",children:(0,s.jsx)(f.Z,{className:"text-[#ff1b2e] !text-lg",onClick:()=>{D(e)}})})]}),children:[(0,s.jsxs)("p",{className:"mt-2 font-semibold ",children:[a("Size"),":"]}),(0,s.jsxs)("p",{children:[e.chunk_size," chunks"]}),(0,s.jsxs)("p",{className:"mt-2 font-semibold ",children:[a("Last_Sync"),":"]}),(0,s.jsx)("p",{children:I()(e.last_sync).format("YYYY-MM-DD HH:MM:SS")}),(0,s.jsx)("p",{className:"mt-2 mb-2",children:q(e.status,e.result)})]},e.id))}),E&&(0,s.jsx)(y.Z,{children:(0,s.jsx)("span",{className:"cursor-pointer",onClick:A,children:a("Load_more")})})]}):(0,s.jsx)(Z.Z,{image:Z.Z.PRESENTED_IMAGE_DEFAULT,children:(0,s.jsx)(i.ZP,{type:"primary",className:"flex items-center mx-auto",icon:(0,s.jsx)(r.Z,{}),onClick:M,children:"Create Now"})})}),(0,s.jsx)(L,{space:t,argumentsShow:u,setArgumentsShow:p})]})}var Y=a(19284),X=a(26892);let{confirm:$}=c.default;function K(e){let t=(0,x.useRouter)(),{t:a}=(0,O.$G)(),{space:l,getSpaces:n}=e,r=()=>{$({title:a("Tips"),icon:(0,s.jsx)(h.Z,{}),content:"".concat(a("Del_Knowledge_Tips"),"?"),okText:"Yes",okType:"danger",cancelText:"No",async onOk(){await (0,S.Vx)((0,S.XK)({name:null==l?void 0:l.name})),n()}})},i=async()=>{let[e,a]=await (0,S.Vx)((0,S.sW)({chat_mode:"chat_knowledge"}));(null==a?void 0:a.conv_uid)&&t.push("/chat?scene=chat_knowledge&id=".concat(null==a?void 0:a.conv_uid,"&db_param=").concat(l.name))};return(0,s.jsx)(d.ZP,{theme:{components:{Popover:{zIndexPopup:90}}},children:(0,s.jsx)(m.Z,{className:"cursor-pointer",placement:"bottom",trigger:"click",content:(0,s.jsx)(H,{space:l,onAddDoc:e.onAddDoc,onDeleteDoc:function(){n()}}),children:(0,s.jsx)(u.Z,{className:"mb-4 min-w-[200px] sm:w-60 lg:w-72",count:l.docs||0,children:(0,s.jsx)(X.Z,{title:l.name,desc:l.desc,icon:Y.l3[l.vector_type]||"/LOGO_SMALL.png",iconBorder:!1,tags:[{text:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(p.Z,{className:"mr-1"}),null==l?void 0:l.owner]})},{text:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(_.Z,{className:"mr-1"}),I()(l.gmt_modified).format("YYYY-MM-DD")]})}],operations:[{label:a("Chat"),children:(0,s.jsx)(j.Z,{}),onClick:i},{label:a("Delete"),children:(0,s.jsx)(f.Z,{}),onClick:()=>{r()}}]})})})})}var W=a(84553),B=a(2453),Q=a(64082),J=a(94184),ee=a.n(J);let{Dragger:et}=W.default,{TextArea:ea}=E.default;function el(e){let{className:t,handleStepChange:a,spaceName:l,docType:r}=e,{t:c}=(0,O.$G)(),[o]=A.Z.useForm(),[d,m]=(0,n.useState)(!1),[u,x]=(0,n.useState)([]),h=async e=>{let t;let{docName:s,textSource:n,text:i,webPageUrl:c}=e;switch(m(!0),r){case"URL":[,t]=await (0,S.Vx)((0,S.H_)(l,{doc_name:s,content:c,doc_type:"URL"}));break;case"TEXT":[,t]=await (0,S.Vx)((0,S.H_)(l,{doc_name:s,source:n,content:i,doc_type:"TEXT"}))}return(m(!1),"DOCUMENT"===r&&u.length<1)?B.ZP.error("Upload failed, please re-upload."):"DOCUMENT"===r||t?void a({label:"forward",files:"DOCUMENT"===r?u:[{name:s,doc_id:t||-1}]}):B.ZP.error("Upload failed, please re-upload.")},p=e=>{let{file:t,fileList:a}=e;0===a.length&&o.setFieldValue("originFileObj",null)},_=async e=>{let{onSuccess:t,onError:a,file:s}=e,n=new FormData,r=null==s?void 0:s.name;n.append("doc_name",r),n.append("doc_file",s),n.append("doc_type","DOCUMENT");let[,i]=await (0,S.Vx)((0,S.iG)(l,n));Number.isInteger(i)?(t&&t(i||0),x(e=>(e.push({name:r,doc_id:i||-1}),e))):a&&a({name:"",message:""})},j=()=>(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(A.Z.Item,{label:"".concat(c("Name"),":"),name:"docName",rules:[{required:!0,message:c("Please_input_the_name")}],children:(0,s.jsx)(E.default,{className:"mb-5 h-12",placeholder:c("Please_input_the_name")})}),(0,s.jsx)(A.Z.Item,{label:"".concat(c("Text_Source"),":"),name:"textSource",rules:[{required:!0,message:c("Please_input_the_text_source")}],children:(0,s.jsx)(E.default,{className:"mb-5 h-12",placeholder:c("Please_input_the_text_source")})}),(0,s.jsx)(A.Z.Item,{label:"".concat(c("Text"),":"),name:"text",rules:[{required:!0,message:c("Please_input_the_description")}],children:(0,s.jsx)(ea,{rows:4})})]}),f=()=>(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(A.Z.Item,{label:"".concat(c("Name"),":"),name:"docName",rules:[{required:!0,message:c("Please_input_the_name")}],children:(0,s.jsx)(E.default,{className:"mb-5 h-12",placeholder:c("Please_input_the_name")})}),(0,s.jsx)(A.Z.Item,{label:"".concat(c("Web_Page_URL"),":"),name:"webPageUrl",rules:[{required:!0,message:c("Please_input_the_Web_Page_URL")}],children:(0,s.jsx)(E.default,{className:"mb-5 h-12",placeholder:c("Please_input_the_Web_Page_URL")})})]}),g=()=>(0,s.jsx)(s.Fragment,{children:(0,s.jsx)(A.Z.Item,{name:"originFileObj",rules:[{required:!0,message:c("Please_select_file")}],children:(0,s.jsxs)(et,{multiple:!0,onChange:p,maxCount:10,accept:".pdf,.ppt,.pptx,.xls,.xlsx,.doc,.docx,.txt,.md",customRequest:_,children:[(0,s.jsx)("p",{className:"ant-upload-drag-icon",children:(0,s.jsx)(Q.Z,{})}),(0,s.jsx)("p",{style:{color:"rgb(22, 108, 255)",fontSize:"20px"},children:c("Select_or_Drop_file")}),(0,s.jsx)("p",{className:"ant-upload-hint",style:{color:"rgb(22, 108, 255)"},children:"PDF, PowerPoint, Excel, Word, Text, Markdown,"})]})})});return(0,s.jsx)(w.Z,{spinning:d,children:(0,s.jsxs)(A.Z,{form:o,size:"large",className:ee()("mt-4",t),layout:"vertical",name:"basic",initialValues:{remember:!0},autoComplete:"off",onFinish:h,children:[(()=>{switch(r){case"URL":return f();case"DOCUMENT":return g();default:return j()}})(),(0,s.jsxs)(A.Z.Item,{children:[(0,s.jsx)(i.ZP,{onClick:()=>{a({label:"back"})},className:"mr-4",children:"".concat(c("Back"))}),(0,s.jsx)(i.ZP,{type:"primary",loading:d,htmlType:"submit",children:c("Next")})]})]})})}function es(e){let{t}=(0,O.$G)(),{handleStepChange:a}=e,[l,r]=(0,n.useState)(!1),c=async e=>{let{spaceName:t,owner:l,description:s}=e;r(!0);let[n,i,c]=await (0,S.Vx)((0,S.be)({name:t,vector_type:"Chroma",owner:l,desc:s}));r(!1),(null==c?void 0:c.success)&&a({label:"forward",spaceName:t})};return(0,s.jsx)(w.Z,{spinning:l,children:(0,s.jsxs)(A.Z,{size:"large",className:"mt-4",layout:"vertical",name:"basic",initialValues:{remember:!0},autoComplete:"off",onFinish:c,children:[(0,s.jsx)(A.Z.Item,{label:t("Knowledge_Space_Name"),name:"spaceName",rules:[{required:!0,message:t("Please_input_the_name")},()=>({validator:(e,a)=>/[^\u4e00-\u9fa50-9a-zA-Z_-]/.test(a)?Promise.reject(Error(t("the_name_can_only_contain"))):Promise.resolve()})],children:(0,s.jsx)(E.default,{className:"mb-5 h-12",placeholder:t("Please_input_the_name")})}),(0,s.jsx)(A.Z.Item,{label:t("Owner"),name:"owner",rules:[{required:!0,message:t("Please_input_the_owner")}],children:(0,s.jsx)(E.default,{className:"mb-5 h-12",placeholder:t("Please_input_the_owner")})}),(0,s.jsx)(A.Z.Item,{label:t("Description"),name:"description",rules:[{required:!0,message:t("Please_input_the_description")}],children:(0,s.jsx)(E.default,{className:"mb-5 h-12",placeholder:t("Please_input_the_description")})}),(0,s.jsx)(A.Z.Item,{children:(0,s.jsx)(i.ZP,{type:"primary",htmlType:"submit",children:t("Next")})})]})})}function en(e){let{t}=(0,O.$G)(),{handleStepChange:a}=e,l=[{type:"TEXT",title:t("Text"),subTitle:t("Fill your raw text"),iconType:"TEXT"},{type:"URL",title:t("URL"),subTitle:t("Fetch_the_content_of_a_URL"),iconType:"WEBPAGE"},{type:"DOCUMENT",title:t("Document"),subTitle:t("Upload_a_document"),iconType:"DOCUMENT"}];return(0,s.jsx)(s.Fragment,{children:l.map((e,t)=>(0,s.jsxs)(N.Z,{className:"mt-4 mb-4 cursor-pointer",onClick:()=>{a({label:"forward",docType:e.type})},children:[(0,s.jsxs)("div",{className:"font-semibold",children:[(0,s.jsx)(R.Z,{type:e.iconType}),e.title]}),(0,s.jsx)("div",{children:e.subTitle})]},t))})}var er=a(38925),ei=a(47221),ec=a(16165),eo=a(48928),ed=a(84567),em=a(78045);let{TextArea:eu}=E.default;function ex(e){let{strategies:t,docType:a,fileName:l,field:r}=e,i="";if("DOCUMENT"===a){let e=l.split(".");i=e[e.length-1]}let c=i?t.filter(e=>e.suffix.indexOf(i)>-1):t,[o,d]=(0,n.useState)(),{t:m}=(0,O.$G)(),u={strategy:"Automatic",name:m("Automatic"),desc:m("Automatic_desc")};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(A.Z.Item,{name:[r.name,"chunk_parameters","chunk_strategy"],initialValue:u.strategy,children:(0,s.jsxs)(em.ZP.Group,{style:{marginTop:16},onChange:function(e){d(e.target.value)},children:[(0,s.jsx)(em.ZP,{value:u.strategy,children:u.name}),c.map(e=>(0,s.jsx)(em.ZP,{value:e.strategy,children:e.name},"strategy_radio_".concat(e.strategy)))]})}),function(){if(!o)return null;if(o===u.name)return(0,s.jsx)("p",{className:"my-4",children:u.desc});let e=null==c?void 0:c.filter(e=>e.strategy===o)[0].parameters;return e&&e.length?(0,s.jsx)("div",{className:"mt-2",children:null==e?void 0:e.map(e=>(0,s.jsx)(A.Z.Item,{label:e.param_name,name:[r.name,"chunk_parameters",e.param_name],rules:[{required:!0,message:m("Please_input_the_name")}],initialValue:e.default_value,valuePropName:"boolean"===e.param_type?"checked":"value",tooltip:e.description,children:function(e){switch(e){case"int":return(0,s.jsx)(eo.Z,{className:"w-full",min:1});case"string":return(0,s.jsx)(eu,{className:"w-full",rows:2});case"boolean":return(0,s.jsx)(ed.Z,{})}}(e.param_type)},"param_".concat(e.param_name)))}):(0,s.jsx)(er.Z,{className:"my-2",type:"warning",message:m("No_parameter")})}()]})}var eh=a(82353);function ep(e){let{spaceName:t,docType:a,uploadFiles:r,handleStepChange:c}=e,{t:o}=(0,O.$G)(),[d]=A.Z.useForm(),[m,u]=(0,n.useState)(r),[x,h]=(0,n.useState)(),[p,_]=(0,n.useState)([]),[j,f]=(0,n.useState)("");async function g(){var e;h(!0);let[,t]=await (0,S.Vx)((0,S.iZ)());h(!1),_(null===(e=t||[])||void 0===e?void 0:e.filter(e=>e.type.indexOf(a)>-1))}(0,n.useEffect)(()=>(g(),()=>{l&&clearInterval(l)}),[]);let b=async e=>{if(function(e){let t=!0;"RUNNING"===j&&(t=!1,B.ZP.warning("The task is still running, do not submit it again."));let{fileStrategies:a}=e;return a.map(e=>{var a,l;let s=null==e?void 0:null===(a=e.chunk_parameters)||void 0===a?void 0:a.chunk_strategy;s||(B.ZP.error("Please select chunk strategy for ".concat(e.name,".")),t=!1);let n=p.filter(e=>e.strategy===s)[0],r={chunk_strategy:null==e?void 0:null===(l=e.chunk_parameters)||void 0===l?void 0:l.chunk_strategy};n&&n.parameters&&n.parameters.forEach(t=>{let a=t.param_name;r[a]=(null==e?void 0:e.chunk_parameters)[a]}),e.chunk_parameters=r}),t}(e)){var a;h(!0);let[,s]=await (0,S.Vx)((0,S.KL)(t,e.fileStrategies));if(h(!1),(null==s?void 0:s.tasks)&&(null==s?void 0:null===(a=s.tasks)||void 0===a?void 0:a.length)>0){B.ZP.success("Segemation task start successfully. task id: ".concat(null==s?void 0:s.tasks.join(","))),f("RUNNING");let t=e.fileStrategies.map(e=>e.doc_id);l=setInterval(async()=>{let e=await N(t);"FINISHED"===e&&(clearInterval(l),f("FINISHED"),B.ZP.success("Congratulation, All files sync successfully."),c({label:"finish"}))},3e3)}}};async function N(e){let[,a]=await (0,S.Vx)((0,S._Q)(t,{doc_ids:e}));if((null==a?void 0:a.data)&&(null==a?void 0:a.data.length)>0){let e=[...m];if(null==a||a.data.map(t=>{var a;let l=null===(a=null==e?void 0:e.filter(e=>e.doc_id===t.id))||void 0===a?void 0:a[0];l&&(l.status=t.status)}),u(e),null==a?void 0:a.data.every(e=>"FINISHED"===e.status||"FAILED"===e.status))return"FINISHED"}}return(0,s.jsx)(w.Z,{spinning:x,children:(0,s.jsxs)(A.Z,{labelCol:{span:6},wrapperCol:{span:18},labelAlign:"right",form:d,size:"large",className:"mt-4",layout:"horizontal",name:"basic",autoComplete:"off",initialValues:{fileStrategies:m},onFinish:b,children:[p&&p.length?(0,s.jsx)(A.Z.List,{name:"fileStrategies",children:e=>{switch(a){case"TEXT":case"URL":return null==e?void 0:e.map(e=>(0,s.jsx)(ex,{strategies:p,docType:a,fileName:m[e.name].name,field:e}));case"DOCUMENT":return(0,s.jsx)(ei.Z,{defaultActiveKey:0,size:m.length>5?"small":"middle",children:null==e?void 0:e.map(e=>(0,s.jsx)(ei.Z.Panel,{header:"".concat(e.name+1,". ").concat(m[e.name].name),extra:function(e){let t=m[e].status;switch(t){case"FINISHED":return(0,s.jsx)(ec.Z,{component:eh.qw});case"RUNNING":return(0,s.jsx)(ec.Z,{className:"animate-spin animate-infinite",component:eh.bn});case"FAILED":return(0,s.jsx)(ec.Z,{component:eh.FE});default:return(0,s.jsx)(ec.Z,{component:eh.tu})}}(e.name),children:(0,s.jsx)(ex,{strategies:p,docType:a,fileName:m[e.name].name,field:e})},e.key))})}}}):(0,s.jsx)(er.Z,{message:"Cannot find one strategy for ".concat(a," type knowledge."),type:"warning"}),(0,s.jsxs)(A.Z.Item,{className:"mt-4",children:[(0,s.jsx)(i.ZP,{onClick:()=>{c({label:"back"})},className:"mr-4",children:"".concat(o("Back"))}),(0,s.jsx)(i.ZP,{type:"primary",htmlType:"submit",loading:x||"RUNNING"===j,children:o("Process")})]})]})})}var e_=()=>{let[e,t]=(0,n.useState)([]),[a,l]=(0,n.useState)(!1),[d,m]=(0,n.useState)(0),[u,x]=(0,n.useState)(""),[h,p]=(0,n.useState)([]),[_,j]=(0,n.useState)(""),{t:f}=(0,O.$G)(),g=[{title:f("Knowledge_Space_Config")},{title:f("Choose_a_Datasource_type")},{title:f("Upload")},{title:f("Segmentation")}];async function b(){let[e,a]=await (0,S.Vx)((0,S.Vm)());t(a)}(0,n.useEffect)(()=>{b()},[]);let N=e=>{let{label:t,spaceName:a,docType:s,files:n}=e;"finish"===t?(l(!1),b(),x(""),j(""),b()):"forward"===t?(0===d&&b(),m(e=>e+1)):m(e=>e-1),n&&p(n),a&&x(a),s&&j(s)};function y(e){x(e),m(1),l(!0)}return(0,s.jsxs)("div",{className:"bg-[#FAFAFA] dark:bg-transparent w-full h-full",children:[(0,s.jsxs)("div",{className:"page-body p-4 md:p-6 h-full overflow-auto",children:[(0,s.jsx)(i.ZP,{type:"primary",className:"flex items-center",icon:(0,s.jsx)(r.Z,{}),onClick:()=>{l(!0)},children:"Create"}),(0,s.jsx)("div",{className:"flex flex-wrap mt-4 gap-2 md:gap-4",children:null==e?void 0:e.map(e=>(0,s.jsx)(K,{space:e,onAddDoc:y,getSpaces:b},e.id))})]}),(0,s.jsxs)(c.default,{title:"Add Knowledge",centered:!0,open:a,destroyOnClose:!0,onCancel:()=>{l(!1)},width:1e3,afterClose:()=>{m(0),b()},footer:null,children:[(0,s.jsx)(o.Z,{current:d,items:g}),0===d&&(0,s.jsx)(es,{handleStepChange:N}),1===d&&(0,s.jsx)(en,{handleStepChange:N}),(0,s.jsx)(el,{className:ee()({hidden:2!==d}),spaceName:u,docType:_,handleStepChange:N}),3===d&&(0,s.jsx)(ep,{spaceName:u,docType:_,uploadFiles:h,handleStepChange:N})]})]})}}},function(e){e.O(0,[4885,7113,5503,9479,4442,4553,5813,411,8928,8548,6485,8660,9774,2888,179],function(){return e(e.s=54681)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/dbgpt/app/static/_next/static/chunks/pages/knowledge-7ab372de241857ba.js b/dbgpt/app/static/_next/static/chunks/pages/knowledge-7ab372de241857ba.js new file mode 100644 index 000000000..abb0233f4 --- /dev/null +++ b/dbgpt/app/static/_next/static/chunks/pages/knowledge-7ab372de241857ba.js @@ -0,0 +1 @@ +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8662],{54681:function(e,t,a){(window.__NEXT_P=window.__NEXT_P||[]).push(["/knowledge",function(){return a(18671)}])},26892:function(e,t,a){"use strict";var s=a(85893),l=a(67294),n=a(66309),r=a(83062),i=a(94184),c=a.n(i),o=a(25675),d=a.n(o);t.Z=(0,l.memo)(function(e){let{icon:t,iconBorder:a=!0,title:i,desc:o,tags:m,children:u,disabled:x,operations:h,className:p,..._}=e,j=(0,l.useMemo)(()=>t?"string"==typeof t?(0,s.jsx)(d(),{className:c()("w-11 h-11 rounded-full mr-4 object-contain bg-white",{"border border-gray-200":a}),width:44,height:44,src:t,alt:i}):t:null,[t]),f=(0,l.useMemo)(()=>m&&m.length?(0,s.jsx)("div",{className:"flex items-center mt-1 flex-wrap",children:m.map((e,t)=>{var a;return"string"==typeof e?(0,s.jsx)(n.Z,{className:"text-xs",bordered:!1,color:"default",children:e},t):(0,s.jsx)(n.Z,{className:"text-xs",bordered:null!==(a=e.border)&&void 0!==a&&a,color:e.color,children:e.text},t)})}):null,[m]);return(0,s.jsxs)("div",{className:c()("group/card relative flex flex-col w-72 rounded justify-between text-black bg-white shadow-[0_8px_16px_-10px_rgba(100,100,100,.08)] hover:shadow-[0_14px_20px_-10px_rgba(100,100,100,.15)] dark:bg-[#232734] dark:text-white dark:hover:border-white transition-[transfrom_shadow] duration-300 hover:-translate-y-1 min-h-fit",{"grayscale cursor-no-drop":x,"cursor-pointer":!x&&!!_.onClick},p),..._,children:[(0,s.jsxs)("div",{className:"p-4",children:[(0,s.jsxs)("div",{className:"flex items-center",children:[j,(0,s.jsxs)("div",{className:"flex flex-col",children:[(0,s.jsx)("h2",{className:"text-sm font-semibold",children:i}),f]})]}),o&&(0,s.jsx)(r.Z,{title:o,children:(0,s.jsx)("p",{className:"mt-2 text-sm text-gray-500 font-normal line-clamp-2",children:o})})]}),(0,s.jsxs)("div",{children:[u,h&&!!h.length&&(0,s.jsx)("div",{className:"flex flex-wrap items-center justify-center border-t border-solid border-gray-100 dark:border-theme-dark",children:h.map((e,t)=>(0,s.jsx)(r.Z,{title:e.label,children:(0,s.jsxs)("div",{className:"relative flex flex-1 items-center justify-center h-11 text-gray-400 hover:text-blue-500 transition-colors duration-300 cursor-pointer",onClick:t=>{var a;t.stopPropagation(),null===(a=e.onClick)||void 0===a||a.call(e)},children:[e.children,t{let[e,a]=await (0,S.Vx)((0,S.Tu)(t.name));d(a)};(0,n.useEffect)(()=>{x()},[t.name]);let h=[{key:"Embedding",label:(0,l.jsxs)("div",{children:[(0,l.jsx)(V.Z,{}),r("Embedding")]}),children:(0,l.jsxs)(D.Z,{gutter:24,children:[(0,l.jsx)(F.Z,{span:12,offset:0,children:(0,l.jsx)(A.Z.Item,{tooltip:r("the_top_k_vectors"),rules:[{required:!0}],label:r("topk"),name:["embedding","topk"],children:(0,l.jsx)(E.default,{className:"mb-5 h-12"})})}),(0,l.jsx)(F.Z,{span:12,children:(0,l.jsx)(A.Z.Item,{tooltip:r("Set_a_threshold_score"),rules:[{required:!0}],label:r("recall_score"),name:["embedding","recall_score"],children:(0,l.jsx)(E.default,{className:"mb-5 h-12",placeholder:r("Please_input_the_owner")})})}),(0,l.jsx)(F.Z,{span:12,children:(0,l.jsx)(A.Z.Item,{tooltip:r("recall_type"),rules:[{required:!0}],label:r("recall_type"),name:["embedding","recall_type"],children:(0,l.jsx)(E.default,{className:"mb-5 h-12"})})}),(0,l.jsx)(F.Z,{span:12,children:(0,l.jsx)(A.Z.Item,{tooltip:r("A_model_used"),rules:[{required:!0}],label:r("model"),name:["embedding","model"],children:(0,l.jsx)(E.default,{className:"mb-5 h-12"})})}),(0,l.jsx)(F.Z,{span:12,children:(0,l.jsx)(A.Z.Item,{tooltip:r("The_size_of_the_data_chunks"),rules:[{required:!0}],label:r("chunk_size"),name:["embedding","chunk_size"],children:(0,l.jsx)(E.default,{className:"mb-5 h-12"})})}),(0,l.jsx)(F.Z,{span:12,children:(0,l.jsx)(A.Z.Item,{tooltip:r("The_amount_of_overlap"),rules:[{required:!0}],label:r("chunk_overlap"),name:["embedding","chunk_overlap"],children:(0,l.jsx)(E.default,{className:"mb-5 h-12",placeholder:r("Please_input_the_description")})})})]})},{key:"Prompt",label:(0,l.jsxs)("div",{children:[(0,l.jsx)(M.Z,{}),r("Prompt")]}),children:(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(A.Z.Item,{tooltip:r("A_contextual_parameter"),label:r("scene"),name:["prompt","scene"],children:(0,l.jsx)(z,{rows:4,className:"mb-2"})}),(0,l.jsx)(A.Z.Item,{tooltip:r("structure_or_format"),label:r("template"),name:["prompt","template"],children:(0,l.jsx)(z,{rows:7,className:"mb-2"})}),(0,l.jsx)(A.Z.Item,{tooltip:r("The_maximum_number_of_tokens"),label:r("max_token"),name:["prompt","max_token"],children:(0,l.jsx)(E.default,{className:"mb-2"})})]})},{key:"Summary",label:(0,l.jsxs)("div",{children:[(0,l.jsx)(q.Z,{}),r("Summary")]}),children:(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(A.Z.Item,{rules:[{required:!0}],label:r("max_iteration"),name:["summary","max_iteration"],children:(0,l.jsx)(E.default,{className:"mb-2"})}),(0,l.jsx)(A.Z.Item,{rules:[{required:!0}],label:r("concurrency_limit"),name:["summary","concurrency_limit"],children:(0,l.jsx)(E.default,{className:"mb-2"})})]})}],p=async e=>{u(!0);let[a,l,n]=await (0,S.Vx)((0,S.iH)(t.name,{argument:JSON.stringify(e)}));u(!1),(null==n?void 0:n.success)&&s(!1)};return(0,l.jsx)(c.default,{width:850,open:a,onCancel:()=>{s(!1)},footer:null,children:(0,l.jsx)(w.Z,{spinning:m,children:(0,l.jsxs)(A.Z,{size:"large",className:"mt-4",layout:"vertical",name:"basic",initialValues:{...o},autoComplete:"off",onFinish:p,children:[(0,l.jsx)(U.Z,{items:h}),(0,l.jsxs)("div",{className:"mt-3 mb-3",children:[(0,l.jsx)(i.ZP,{htmlType:"submit",type:"primary",className:"mr-6",children:r("Submit")}),(0,l.jsx)(i.ZP,{onClick:()=>{s(!1)},children:r("close")})]})]})})})}var R=a(47207);let{confirm:G}=c.default;function H(e){let{space:t}=e,{t:a}=(0,O.$G)(),s=(0,x.useRouter)(),[c,o]=(0,n.useState)(!1),[d,m]=(0,n.useState)([]),[u,p]=(0,n.useState)(!1),[_,j]=(0,n.useState)(0),C=(0,n.useRef)(1),E=(0,n.useMemo)(()=>d.length<_,[d.length,_]),D=e=>{G({title:a("Tips"),icon:(0,l.jsx)(h.Z,{}),content:"".concat(a("Del_Document_Tips"),"?"),okText:"Yes",okType:"danger",cancelText:"No",async onOk(){await V(e)}})};async function F(){o(!0);let[e,a]=await (0,S.Vx)((0,S._Q)(t.name,{page:C.current,page_size:18}));m(null==a?void 0:a.data),j((null==a?void 0:a.total)||0),o(!1)}let A=async()=>{if(!E)return;o(!0),C.current+=1;let[e,a]=await (0,S.Vx)((0,S._Q)(t.name,{page:C.current,page_size:18}));m([...d,...a.data]),o(!1)},U=async(e,t)=>{await (0,S.Vx)((0,S.Hx)(e,{doc_ids:[t]}))},V=async a=>{await (0,S.Vx)((0,S.n3)(t.name,{doc_name:a.doc_name})),F(),e.onDeleteDoc()},M=()=>{e.onAddDoc(t.name)},q=(e,t)=>{let a;switch(e){case"TODO":a="gold";break;case"RUNNING":a="#2db7f5";break;case"FINISHED":a="cyan";break;default:a="red"}return(0,l.jsx)(g.Z,{title:t,children:(0,l.jsx)(b.Z,{color:a,children:e})})};return(0,n.useEffect)(()=>{F()},[t]),(0,l.jsxs)("div",{className:"collapse-container pt-2 px-4",children:[(0,l.jsxs)(v.Z,{children:[(0,l.jsx)(i.ZP,{size:"middle",type:"primary",className:"flex items-center",icon:(0,l.jsx)(r.Z,{}),onClick:M,children:a("Add_Datasource")}),(0,l.jsx)(i.ZP,{size:"middle",className:"flex items-center mx-2",icon:(0,l.jsx)(P.Z,{}),onClick:()=>{p(!0)},children:"Arguments"})]}),(0,l.jsx)(y.Z,{}),(0,l.jsx)(w.Z,{spinning:c,children:(null==d?void 0:d.length)>0?(0,l.jsxs)("div",{className:"max-h-96 overflow-auto max-w-3/4",children:[(0,l.jsx)("div",{className:"mt-3 grid grid-cols-1 gap-x-6 gap-y-5 sm:grid-cols-2 lg:grid-cols-3 xl:gap-x-5",children:d.map(e=>(0,l.jsxs)(N.Z,{className:" dark:bg-[#484848] relative shrink-0 grow-0 cursor-pointer rounded-[10px] border border-gray-200 border-solid w-full",title:(0,l.jsx)(g.Z,{title:e.doc_name,children:(0,l.jsxs)("div",{className:"truncate ",children:[(0,l.jsx)(R.Z,{type:e.doc_type}),(0,l.jsx)("span",{children:e.doc_name})]})}),extra:(0,l.jsxs)("div",{className:"mx-3",children:[(0,l.jsx)(g.Z,{title:"detail",children:(0,l.jsx)(k.Z,{className:"mr-2 !text-lg",style:{color:"#1b7eff",fontSize:"20px"},onClick:()=>{s.push("/knowledge/chunk/?spaceName=".concat(t.name,"&id=").concat(e.id))}})}),(0,l.jsx)(g.Z,{title:"Sync",children:(0,l.jsx)(T.Z,{className:"mr-2 !text-lg",style:{color:"#1b7eff",fontSize:"20px"},onClick:()=>{U(t.name,e.id)}})}),(0,l.jsx)(g.Z,{title:"Delete",children:(0,l.jsx)(f.Z,{className:"text-[#ff1b2e] !text-lg",onClick:()=>{D(e)}})})]}),children:[(0,l.jsxs)("p",{className:"mt-2 font-semibold ",children:[a("Size"),":"]}),(0,l.jsxs)("p",{children:[e.chunk_size," chunks"]}),(0,l.jsxs)("p",{className:"mt-2 font-semibold ",children:[a("Last_Sync"),":"]}),(0,l.jsx)("p",{children:I()(e.last_sync).format("YYYY-MM-DD HH:MM:SS")}),(0,l.jsx)("p",{className:"mt-2 mb-2",children:q(e.status,e.result)})]},e.id))}),E&&(0,l.jsx)(y.Z,{children:(0,l.jsx)("span",{className:"cursor-pointer",onClick:A,children:a("Load_more")})})]}):(0,l.jsx)(Z.Z,{image:Z.Z.PRESENTED_IMAGE_DEFAULT,children:(0,l.jsx)(i.ZP,{type:"primary",className:"flex items-center mx-auto",icon:(0,l.jsx)(r.Z,{}),onClick:M,children:"Create Now"})})}),(0,l.jsx)(L,{space:t,argumentsShow:u,setArgumentsShow:p})]})}var Y=a(19284),X=a(26892);let{confirm:$}=c.default;function K(e){let t=(0,x.useRouter)(),{t:a}=(0,O.$G)(),{space:s,getSpaces:n}=e,r=()=>{$({title:a("Tips"),icon:(0,l.jsx)(h.Z,{}),content:"".concat(a("Del_Knowledge_Tips"),"?"),okText:"Yes",okType:"danger",cancelText:"No",async onOk(){await (0,S.Vx)((0,S.XK)({name:null==s?void 0:s.name})),n()}})},i=async()=>{let[e,a]=await (0,S.Vx)((0,S.sW)({chat_mode:"chat_knowledge"}));(null==a?void 0:a.conv_uid)&&t.push("/chat?scene=chat_knowledge&id=".concat(null==a?void 0:a.conv_uid,"&db_param=").concat(s.name))};return(0,l.jsx)(d.ZP,{theme:{components:{Popover:{zIndexPopup:90}}},children:(0,l.jsx)(m.Z,{className:"cursor-pointer",placement:"bottom",trigger:"click",content:(0,l.jsx)(H,{space:s,onAddDoc:e.onAddDoc,onDeleteDoc:function(){n()}}),children:(0,l.jsx)(u.Z,{className:"mb-4 min-w-[200px] sm:w-60 lg:w-72",count:s.docs||0,children:(0,l.jsx)(X.Z,{title:s.name,desc:s.desc,icon:Y.l3[s.vector_type]||"/LOGO_SMALL.png",iconBorder:!1,tags:[{text:(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(p.Z,{className:"mr-1"}),null==s?void 0:s.owner]})},{text:(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(_.Z,{className:"mr-1"}),I()(s.gmt_modified).format("YYYY-MM-DD")]})}],operations:[{label:a("Chat"),children:(0,l.jsx)(j.Z,{}),onClick:i},{label:a("Delete"),children:(0,l.jsx)(f.Z,{}),onClick:()=>{r()}}]})})})})}var W=a(84553),B=a(2453),Q=a(64082),J=a(94184),ee=a.n(J);let{Dragger:et}=W.default,{TextArea:ea}=E.default;function es(e){let{className:t,handleStepChange:a,spaceName:s,docType:r}=e,{t:c}=(0,O.$G)(),[o]=A.Z.useForm(),[d,m]=(0,n.useState)(!1),[u,x]=(0,n.useState)([]),h=async e=>{let t;let{docName:l,textSource:n,text:i,webPageUrl:c}=e;switch(m(!0),r){case"URL":[,t]=await (0,S.Vx)((0,S.H_)(s,{doc_name:l,content:c,doc_type:"URL"}));break;case"TEXT":[,t]=await (0,S.Vx)((0,S.H_)(s,{doc_name:l,source:n,content:i,doc_type:"TEXT"}))}return(m(!1),"DOCUMENT"===r&&u.length<1)?B.ZP.error("Upload failed, please re-upload."):"DOCUMENT"===r||t?void a({label:"forward",files:"DOCUMENT"===r?u:[{name:l,doc_id:t||-1}]}):B.ZP.error("Upload failed, please re-upload.")},p=e=>{let{file:t,fileList:a}=e;0===a.length&&o.setFieldValue("originFileObj",null)},_=async e=>{let{onSuccess:t,onError:a,file:l}=e,n=new FormData,r=null==l?void 0:l.name;n.append("doc_name",r),n.append("doc_file",l),n.append("doc_type","DOCUMENT");let[,i]=await (0,S.Vx)((0,S.iG)(s,n));Number.isInteger(i)?(t&&t(i||0),x(e=>(e.push({name:r,doc_id:i||-1}),e))):a&&a({name:"",message:""})},j=()=>(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(A.Z.Item,{label:"".concat(c("Name"),":"),name:"docName",rules:[{required:!0,message:c("Please_input_the_name")}],children:(0,l.jsx)(E.default,{className:"mb-5 h-12",placeholder:c("Please_input_the_name")})}),(0,l.jsx)(A.Z.Item,{label:"".concat(c("Text_Source"),":"),name:"textSource",rules:[{required:!0,message:c("Please_input_the_text_source")}],children:(0,l.jsx)(E.default,{className:"mb-5 h-12",placeholder:c("Please_input_the_text_source")})}),(0,l.jsx)(A.Z.Item,{label:"".concat(c("Text"),":"),name:"text",rules:[{required:!0,message:c("Please_input_the_description")}],children:(0,l.jsx)(ea,{rows:4})})]}),f=()=>(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(A.Z.Item,{label:"".concat(c("Name"),":"),name:"docName",rules:[{required:!0,message:c("Please_input_the_name")}],children:(0,l.jsx)(E.default,{className:"mb-5 h-12",placeholder:c("Please_input_the_name")})}),(0,l.jsx)(A.Z.Item,{label:"".concat(c("Web_Page_URL"),":"),name:"webPageUrl",rules:[{required:!0,message:c("Please_input_the_Web_Page_URL")}],children:(0,l.jsx)(E.default,{className:"mb-5 h-12",placeholder:c("Please_input_the_Web_Page_URL")})})]}),g=()=>(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(A.Z.Item,{name:"originFileObj",rules:[{required:!0,message:c("Please_select_file")}],children:(0,l.jsxs)(et,{multiple:!0,onChange:p,maxCount:10,accept:".pdf,.ppt,.pptx,.xls,.xlsx,.doc,.docx,.txt,.md",customRequest:_,children:[(0,l.jsx)("p",{className:"ant-upload-drag-icon",children:(0,l.jsx)(Q.Z,{})}),(0,l.jsx)("p",{style:{color:"rgb(22, 108, 255)",fontSize:"20px"},children:c("Select_or_Drop_file")}),(0,l.jsx)("p",{className:"ant-upload-hint",style:{color:"rgb(22, 108, 255)"},children:"PDF, PowerPoint, Excel, Word, Text, Markdown,"})]})})});return(0,l.jsx)(w.Z,{spinning:d,children:(0,l.jsxs)(A.Z,{form:o,size:"large",className:ee()("mt-4",t),layout:"vertical",name:"basic",initialValues:{remember:!0},autoComplete:"off",onFinish:h,children:[(()=>{switch(r){case"URL":return f();case"DOCUMENT":return g();default:return j()}})(),(0,l.jsxs)(A.Z.Item,{children:[(0,l.jsx)(i.ZP,{onClick:()=>{a({label:"back"})},className:"mr-4",children:"".concat(c("Back"))}),(0,l.jsx)(i.ZP,{type:"primary",loading:d,htmlType:"submit",children:c("Next")})]})]})})}function el(e){let{t}=(0,O.$G)(),{handleStepChange:a}=e,[s,r]=(0,n.useState)(!1),c=async e=>{let{spaceName:t,owner:s,description:l}=e;r(!0);let[n,i,c]=await (0,S.Vx)((0,S.be)({name:t,vector_type:"Chroma",owner:s,desc:l}));r(!1),(null==c?void 0:c.success)&&a({label:"forward",spaceName:t})};return(0,l.jsx)(w.Z,{spinning:s,children:(0,l.jsxs)(A.Z,{size:"large",className:"mt-4",layout:"vertical",name:"basic",initialValues:{remember:!0},autoComplete:"off",onFinish:c,children:[(0,l.jsx)(A.Z.Item,{label:t("Knowledge_Space_Name"),name:"spaceName",rules:[{required:!0,message:t("Please_input_the_name")},()=>({validator:(e,a)=>/[^\u4e00-\u9fa50-9a-zA-Z_-]/.test(a)?Promise.reject(Error(t("the_name_can_only_contain"))):Promise.resolve()})],children:(0,l.jsx)(E.default,{className:"mb-5 h-12",placeholder:t("Please_input_the_name")})}),(0,l.jsx)(A.Z.Item,{label:t("Owner"),name:"owner",rules:[{required:!0,message:t("Please_input_the_owner")}],children:(0,l.jsx)(E.default,{className:"mb-5 h-12",placeholder:t("Please_input_the_owner")})}),(0,l.jsx)(A.Z.Item,{label:t("Description"),name:"description",rules:[{required:!0,message:t("Please_input_the_description")}],children:(0,l.jsx)(E.default,{className:"mb-5 h-12",placeholder:t("Please_input_the_description")})}),(0,l.jsx)(A.Z.Item,{children:(0,l.jsx)(i.ZP,{type:"primary",htmlType:"submit",children:t("Next")})})]})})}function en(e){let{t}=(0,O.$G)(),{handleStepChange:a}=e,s=[{type:"TEXT",title:t("Text"),subTitle:t("Fill your raw text"),iconType:"TEXT"},{type:"URL",title:t("URL"),subTitle:t("Fetch_the_content_of_a_URL"),iconType:"WEBPAGE"},{type:"DOCUMENT",title:t("Document"),subTitle:t("Upload_a_document"),iconType:"DOCUMENT"}];return(0,l.jsx)(l.Fragment,{children:s.map((e,t)=>(0,l.jsxs)(N.Z,{className:"mt-4 mb-4 cursor-pointer",onClick:()=>{a({label:"forward",docType:e.type})},children:[(0,l.jsxs)("div",{className:"font-semibold",children:[(0,l.jsx)(R.Z,{type:e.iconType}),e.title]}),(0,l.jsx)("div",{children:e.subTitle})]},t))})}var er=a(38925),ei=a(47221),ec=a(16165),eo=a(48928),ed=a(84567),em=a(78045);let{TextArea:eu}=E.default;function ex(e){let{strategies:t,docType:a,fileName:s,field:r}=e,i="";if("DOCUMENT"===a){let e=s.split(".");i=e[e.length-1]}let c=i?t.filter(e=>e.suffix.indexOf(i)>-1):t,[o,d]=(0,n.useState)(),{t:m}=(0,O.$G)(),u={strategy:"Automatic",name:m("Automatic"),desc:m("Automatic_desc")};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(A.Z.Item,{name:[r.name,"chunk_parameters","chunk_strategy"],initialValue:u.strategy,children:(0,l.jsxs)(em.ZP.Group,{style:{marginTop:16},onChange:function(e){d(e.target.value)},children:[(0,l.jsx)(em.ZP,{value:u.strategy,children:u.name}),c.map(e=>(0,l.jsx)(em.ZP,{value:e.strategy,children:e.name},"strategy_radio_".concat(e.strategy)))]})}),function(){if(!o)return null;if(o===u.name)return(0,l.jsx)("p",{className:"my-4",children:u.desc});let e=null==c?void 0:c.filter(e=>e.strategy===o)[0].parameters;return e&&e.length?(0,l.jsx)("div",{className:"mt-2",children:null==e?void 0:e.map(e=>(0,l.jsx)(A.Z.Item,{label:e.param_name,name:[r.name,"chunk_parameters",e.param_name],rules:[{required:!0,message:m("Please_input_the_name")}],initialValue:e.default_value,valuePropName:"boolean"===e.param_type?"checked":"value",tooltip:e.description,children:function(e){switch(e){case"int":return(0,l.jsx)(eo.Z,{className:"w-full",min:1});case"string":return(0,l.jsx)(eu,{className:"w-full",rows:2});case"boolean":return(0,l.jsx)(ed.Z,{})}}(e.param_type)},"param_".concat(e.param_name)))}):(0,l.jsx)(er.Z,{className:"my-2",type:"warning",message:m("No_parameter")})}()]})}var eh=a(82353);function ep(e){let{spaceName:t,docType:a,uploadFiles:r,handleStepChange:c}=e,{t:o}=(0,O.$G)(),[d]=A.Z.useForm(),[m,u]=(0,n.useState)(r),[x,h]=(0,n.useState)(),[p,_]=(0,n.useState)([]),[j,f]=(0,n.useState)("");async function g(){var e;h(!0);let[,t]=await (0,S.Vx)((0,S.iZ)());h(!1),_(null===(e=t||[])||void 0===e?void 0:e.filter(e=>e.type.indexOf(a)>-1))}(0,n.useEffect)(()=>(g(),()=>{s&&clearInterval(s)}),[]);let b=async e=>{if(function(e){let t=!0;"RUNNING"===j&&(t=!1,B.ZP.warning("The task is still running, do not submit it again."));let{fileStrategies:a}=e;return a.map(e=>{var t,a;let s=null==e?void 0:null===(t=e.chunk_parameters)||void 0===t?void 0:t.chunk_strategy;s||(e.chunk_parameters={chunk_strategy:"Automatic"});let l=p.filter(e=>e.strategy===s)[0],n={chunk_strategy:null==e?void 0:null===(a=e.chunk_parameters)||void 0===a?void 0:a.chunk_strategy};l&&l.parameters&&l.parameters.forEach(t=>{let a=t.param_name;n[a]=(null==e?void 0:e.chunk_parameters)[a]}),e.chunk_parameters=n}),t}(e)){var a;h(!0);let[,l]=await (0,S.Vx)((0,S.KL)(t,e.fileStrategies));if(h(!1),(null==l?void 0:l.tasks)&&(null==l?void 0:null===(a=l.tasks)||void 0===a?void 0:a.length)>0){B.ZP.success("Segemation task start successfully. task id: ".concat(null==l?void 0:l.tasks.join(","))),f("RUNNING");let t=e.fileStrategies.map(e=>e.doc_id);s=setInterval(async()=>{let e=await N(t);"FINISHED"===e&&(clearInterval(s),f("FINISHED"),B.ZP.success("Congratulation, All files sync successfully."),c({label:"finish"}))},3e3)}}};async function N(e){let[,a]=await (0,S.Vx)((0,S._Q)(t,{doc_ids:e}));if((null==a?void 0:a.data)&&(null==a?void 0:a.data.length)>0){let e=[...m];if(null==a||a.data.map(t=>{var a;let s=null===(a=null==e?void 0:e.filter(e=>e.doc_id===t.id))||void 0===a?void 0:a[0];s&&(s.status=t.status)}),u(e),null==a?void 0:a.data.every(e=>"FINISHED"===e.status||"FAILED"===e.status))return"FINISHED"}}return(0,l.jsx)(w.Z,{spinning:x,children:(0,l.jsxs)(A.Z,{labelCol:{span:6},wrapperCol:{span:18},labelAlign:"right",form:d,size:"large",className:"mt-4",layout:"horizontal",name:"basic",autoComplete:"off",initialValues:{fileStrategies:m},onFinish:b,children:[p&&p.length?(0,l.jsx)(A.Z.List,{name:"fileStrategies",children:e=>{switch(a){case"TEXT":case"URL":return null==e?void 0:e.map(e=>(0,l.jsx)(ex,{strategies:p,docType:a,fileName:m[e.name].name,field:e}));case"DOCUMENT":return(0,l.jsx)(ei.Z,{defaultActiveKey:0,size:m.length>5?"small":"middle",children:null==e?void 0:e.map(e=>(0,l.jsx)(ei.Z.Panel,{header:"".concat(e.name+1,". ").concat(m[e.name].name),extra:function(e){let t=m[e].status;switch(t){case"FINISHED":return(0,l.jsx)(ec.Z,{component:eh.qw});case"RUNNING":return(0,l.jsx)(ec.Z,{className:"animate-spin animate-infinite",component:eh.bn});case"FAILED":return(0,l.jsx)(ec.Z,{component:eh.FE});default:return(0,l.jsx)(ec.Z,{component:eh.tu})}}(e.name),children:(0,l.jsx)(ex,{strategies:p,docType:a,fileName:m[e.name].name,field:e})},e.key))})}}}):(0,l.jsx)(er.Z,{message:"Cannot find one strategy for ".concat(a," type knowledge."),type:"warning"}),(0,l.jsxs)(A.Z.Item,{className:"mt-4",children:[(0,l.jsx)(i.ZP,{onClick:()=>{c({label:"back"})},className:"mr-4",children:"".concat(o("Back"))}),(0,l.jsx)(i.ZP,{type:"primary",htmlType:"submit",loading:x||"RUNNING"===j,children:o("Process")})]})]})})}var e_=()=>{let[e,t]=(0,n.useState)([]),[a,s]=(0,n.useState)(!1),[d,m]=(0,n.useState)(0),[u,x]=(0,n.useState)(""),[h,p]=(0,n.useState)([]),[_,j]=(0,n.useState)(""),{t:f}=(0,O.$G)(),g=[{title:f("Knowledge_Space_Config")},{title:f("Choose_a_Datasource_type")},{title:f("Upload")},{title:f("Segmentation")}];async function b(){let[e,a]=await (0,S.Vx)((0,S.Vm)());t(a)}(0,n.useEffect)(()=>{b()},[]);let N=e=>{let{label:t,spaceName:a,docType:l,files:n}=e;"finish"===t?(s(!1),b(),x(""),j(""),b()):"forward"===t?(0===d&&b(),m(e=>e+1)):m(e=>e-1),n&&p(n),a&&x(a),l&&j(l)};function y(e){x(e),m(1),s(!0)}return(0,l.jsxs)("div",{className:"bg-[#FAFAFA] dark:bg-transparent w-full h-full",children:[(0,l.jsxs)("div",{className:"page-body p-4 md:p-6 h-full overflow-auto",children:[(0,l.jsx)(i.ZP,{type:"primary",className:"flex items-center",icon:(0,l.jsx)(r.Z,{}),onClick:()=>{s(!0)},children:"Create"}),(0,l.jsx)("div",{className:"flex flex-wrap mt-4 gap-2 md:gap-4",children:null==e?void 0:e.map(e=>(0,l.jsx)(K,{space:e,onAddDoc:y,getSpaces:b},e.id))})]}),(0,l.jsxs)(c.default,{title:"Add Knowledge",centered:!0,open:a,destroyOnClose:!0,onCancel:()=>{s(!1)},width:1e3,afterClose:()=>{m(0),b()},footer:null,children:[(0,l.jsx)(o.Z,{current:d,items:g}),0===d&&(0,l.jsx)(el,{handleStepChange:N}),1===d&&(0,l.jsx)(en,{handleStepChange:N}),(0,l.jsx)(es,{className:ee()({hidden:2!==d}),spaceName:u,docType:_,handleStepChange:N}),3===d&&(0,l.jsx)(ep,{spaceName:u,docType:_,uploadFiles:h,handleStepChange:N})]})]})}}},function(e){e.O(0,[4885,7113,5503,9479,4442,4553,5813,411,8928,8548,6485,8660,9774,2888,179],function(){return e(e.s=54681)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/dbgpt/app/static/_next/static/chunks/webpack-6d79785e1375a57a.js b/dbgpt/app/static/_next/static/chunks/webpack-27020bb4734c8351.js similarity index 63% rename from dbgpt/app/static/_next/static/chunks/webpack-6d79785e1375a57a.js rename to dbgpt/app/static/_next/static/chunks/webpack-27020bb4734c8351.js index bc5439fa9..148a41231 100644 --- a/dbgpt/app/static/_next/static/chunks/webpack-6d79785e1375a57a.js +++ b/dbgpt/app/static/_next/static/chunks/webpack-27020bb4734c8351.js @@ -1 +1 @@ -!function(){"use strict";var e,t,n,r,o,u,c,i,a,f,d,s,l={},b={};function p(e){var t=b[e];if(void 0!==t)return t.exports;var n=b[e]={id:e,loaded:!1,exports:{}},r=!0;try{l[e].call(n.exports,n,n.exports,p),r=!1}finally{r&&delete b[e]}return n.loaded=!0,n.exports}p.m=l,p.amdO={},e=[],p.O=function(t,n,r,o){if(n){o=o||0;for(var u=e.length;u>0&&e[u-1][2]>o;u--)e[u]=e[u-1];e[u]=[n,r,o];return}for(var c=1/0,u=0;u=o&&Object.keys(p.O).every(function(e){return p.O[e](n[a])})?n.splice(a--,1):(i=!1,o0&&e[u-1][2]>o;u--)e[u]=e[u-1];e[u]=[n,r,o];return}for(var i=1/0,u=0;u=o&&Object.keys(p.O).every(function(e){return p.O[e](n[c])})?n.splice(c--,1):(a=!1,o
\ No newline at end of file +
\ No newline at end of file diff --git a/dbgpt/app/static/app/index.html b/dbgpt/app/static/app/index.html index 825b2bb64..22ca39460 100644 --- a/dbgpt/app/static/app/index.html +++ b/dbgpt/app/static/app/index.html @@ -1 +1 @@ -
\ No newline at end of file +
\ No newline at end of file diff --git a/dbgpt/app/static/chat/index.html b/dbgpt/app/static/chat/index.html index 57b2bf52e..072662542 100644 --- a/dbgpt/app/static/chat/index.html +++ b/dbgpt/app/static/chat/index.html @@ -1 +1 @@ -
\ No newline at end of file +
\ No newline at end of file diff --git a/dbgpt/app/static/database/index.html b/dbgpt/app/static/database/index.html index 1c57ac9ea..3b120ffcf 100644 --- a/dbgpt/app/static/database/index.html +++ b/dbgpt/app/static/database/index.html @@ -1 +1 @@ -
MySQL

MySQL

Fast, reliable, scalable open-source relational database management system.

MSSQL

MSSQL

Powerful, scalable, secure relational database system by Microsoft.

DuckDB

DuckDB

In-memory analytical database with efficient query processing.

Sqlite

Sqlite

Lightweight embedded relational database with simplicity and portability.

ClickHouse

ClickHouse

Columnar database for high-performance analytics and real-time queries.

Oracle

Oracle

Robust, scalable, secure relational database widely used in enterprises.

Access

Access

Easy-to-use relational database for small-scale applications by Microsoft.

MongoDB

MongoDB

Flexible, scalable NoSQL document database for web and mobile apps.

ApacheDoris

ApacheDoris

A new-generation open-source real-time data warehouse.

StarRocks

StarRocks

An Open-Source, High-Performance Analytical Database.

DB2

DB2

Scalable, secure relational database system developed by IBM.

HBase

HBase

Distributed, scalable NoSQL database for large structured/semi-structured data.

Redis

Redis

Fast, versatile in-memory data structure store as cache, DB, or broker.

Cassandra

Cassandra

Scalable, fault-tolerant distributed NoSQL database for large data.

Couchbase

Couchbase

High-performance NoSQL document database with distributed architecture.

PostgreSQL

PostgreSQL

Powerful open-source relational database with extensibility and SQL standards.

Spark

Spark

Unified engine for large-scale data analytics.

Space

Space

knowledge analytics.

\ No newline at end of file +
MySQL

MySQL

Fast, reliable, scalable open-source relational database management system.

MSSQL

MSSQL

Powerful, scalable, secure relational database system by Microsoft.

DuckDB

DuckDB

In-memory analytical database with efficient query processing.

Sqlite

Sqlite

Lightweight embedded relational database with simplicity and portability.

ClickHouse

ClickHouse

Columnar database for high-performance analytics and real-time queries.

Oracle

Oracle

Robust, scalable, secure relational database widely used in enterprises.

Access

Access

Easy-to-use relational database for small-scale applications by Microsoft.

MongoDB

MongoDB

Flexible, scalable NoSQL document database for web and mobile apps.

ApacheDoris

ApacheDoris

A new-generation open-source real-time data warehouse.

StarRocks

StarRocks

An Open-Source, High-Performance Analytical Database.

DB2

DB2

Scalable, secure relational database system developed by IBM.

HBase

HBase

Distributed, scalable NoSQL database for large structured/semi-structured data.

Redis

Redis

Fast, versatile in-memory data structure store as cache, DB, or broker.

Cassandra

Cassandra

Scalable, fault-tolerant distributed NoSQL database for large data.

Couchbase

Couchbase

High-performance NoSQL document database with distributed architecture.

PostgreSQL

PostgreSQL

Powerful open-source relational database with extensibility and SQL standards.

Spark

Spark

Unified engine for large-scale data analytics.

Space

Space

knowledge analytics.

\ No newline at end of file diff --git a/dbgpt/app/static/flow/canvas/index.html b/dbgpt/app/static/flow/canvas/index.html index 55ddc1793..0efa64f81 100644 --- a/dbgpt/app/static/flow/canvas/index.html +++ b/dbgpt/app/static/flow/canvas/index.html @@ -1 +1 @@ -
\ No newline at end of file +
\ No newline at end of file diff --git a/dbgpt/app/static/flow/index.html b/dbgpt/app/static/flow/index.html index 731a5646c..29abf92cd 100644 --- a/dbgpt/app/static/flow/index.html +++ b/dbgpt/app/static/flow/index.html @@ -1 +1 @@ -
\ No newline at end of file +
\ No newline at end of file diff --git a/dbgpt/app/static/index.html b/dbgpt/app/static/index.html index 325d0fd8b..c3b14fa99 100644 --- a/dbgpt/app/static/index.html +++ b/dbgpt/app/static/index.html @@ -1 +1 @@ -
\ No newline at end of file +
\ No newline at end of file diff --git a/dbgpt/app/static/knowledge/chunk/index.html b/dbgpt/app/static/knowledge/chunk/index.html index 128a3aad9..6cb4a1572 100644 --- a/dbgpt/app/static/knowledge/chunk/index.html +++ b/dbgpt/app/static/knowledge/chunk/index.html @@ -1 +1 @@ -
\ No newline at end of file +
\ No newline at end of file diff --git a/dbgpt/app/static/knowledge/index.html b/dbgpt/app/static/knowledge/index.html index b0b9ac0d2..a7d27a1b7 100644 --- a/dbgpt/app/static/knowledge/index.html +++ b/dbgpt/app/static/knowledge/index.html @@ -1 +1 @@ -
\ No newline at end of file +
\ No newline at end of file diff --git a/dbgpt/app/static/models/index.html b/dbgpt/app/static/models/index.html index e40b3d1bd..f83788b08 100644 --- a/dbgpt/app/static/models/index.html +++ b/dbgpt/app/static/models/index.html @@ -1 +1 @@ -
\ No newline at end of file +
\ No newline at end of file diff --git a/dbgpt/app/static/prompt/index.html b/dbgpt/app/static/prompt/index.html index e993f20af..819122231 100644 --- a/dbgpt/app/static/prompt/index.html +++ b/dbgpt/app/static/prompt/index.html @@ -1 +1 @@ -
NameSceneSub SceneContentOperation
No data
\ No newline at end of file +
NameSceneSub SceneContentOperation
No data
\ No newline at end of file