From a7398d084f8228de3d5e9136cad7d32af0f9d25c Mon Sep 17 00:00:00 2001 From: hzh97 <2976151305@qq.com> Date: Mon, 26 Feb 2024 15:51:45 +0800 Subject: [PATCH 1/6] feat: copy awel flow --- web/components/flow/flow-card.tsx | 14 ++++++-- web/pages/flow/index.tsx | 59 ++++++++++++++++++++++++++++--- web/types/flow.ts | 3 ++ 3 files changed, 69 insertions(+), 7 deletions(-) diff --git a/web/components/flow/flow-card.tsx b/web/components/flow/flow-card.tsx index ea2960f67..9e1c3abc5 100644 --- a/web/components/flow/flow-card.tsx +++ b/web/components/flow/flow-card.tsx @@ -1,6 +1,6 @@ import { apiInterceptors, deleteFlowById, newDialogue } from '@/client/api'; import { IFlow } from '@/types/flow'; -import { DeleteFilled, EditFilled, MessageFilled, WarningOutlined } from '@ant-design/icons'; +import { CopyFilled, DeleteFilled, EditFilled, MessageFilled, WarningOutlined } from '@ant-design/icons'; import { Modal } from 'antd'; import React, { useContext } from 'react'; import { useTranslation } from 'react-i18next'; @@ -13,9 +13,10 @@ import qs from 'querystring'; interface FlowCardProps { flow: IFlow; deleteCallback: (uid: string) => void; + onCopy: (flow: IFlow) => void; } -const FlowCard: React.FC = ({ flow, deleteCallback }) => { +const FlowCard: React.FC = ({ flow, onCopy, deleteCallback }) => { const { model } = useContext(ChatContext); const { t } = useTranslation(); const [modal, contextHolder] = Modal.useModal(); @@ -68,7 +69,7 @@ const FlowCard: React.FC = ({ flow, deleteCallback }) => { desc={flow.description} tags={[ { text: flow.source, border: true, color: flow.source === 'DBGPT-WEB' ? 'green' : 'blue' }, - { text: flow.editable ? 'Editable' : 'Can not Edit', color: flow.editable ? 'green' : 'gray' }, + { text: flow.editable ? 'Editable' : 'Can not Edit', color: flow.editable ? 'green' : 'gray', border: true }, ]} operations={[ { @@ -81,6 +82,13 @@ const FlowCard: React.FC = ({ flow, deleteCallback }) => { children: , onClick: cardClick, }, + { + label: t('Copy'), + children: , + onClick: () => { + onCopy(flow); + }, + }, { label: t('Delete'), children: , diff --git a/web/pages/flow/index.tsx b/web/pages/flow/index.tsx index 983c95889..24388f45d 100644 --- a/web/pages/flow/index.tsx +++ b/web/pages/flow/index.tsx @@ -1,17 +1,26 @@ -import { apiInterceptors, getFlows } from '@/client/api'; +import { addFlow, apiInterceptors, getFlows } from '@/client/api'; import MyEmpty from '@/components/common/MyEmpty'; import MuiLoading from '@/components/common/loading'; import FlowCard from '@/components/flow/flow-card'; import { IFlow } from '@/types/flow'; import { PlusOutlined } from '@ant-design/icons'; -import { Button } from 'antd'; +import { Button, Form, Input, Modal, message } from 'antd'; import Link from 'next/link'; -import React, { useEffect, useState } from 'react'; +import React, { useContext, useEffect, useRef, useState } from 'react'; +import { useTranslation } from 'react-i18next'; function Flow() { + const { t } = useTranslation(); + + const [showModal, setShowModal] = useState(false); const [loading, setLoading] = useState(false); const [flowList, setFlowList] = useState>([]); + const [messageApi, contextHolder] = message.useMessage(); + const [form] = Form.useForm>(); + + const copyFlowTemp = useRef(); + async function getFlowList() { setLoading(true); const [_, data] = await apiInterceptors(getFlows()); @@ -27,8 +36,28 @@ function Flow() { setFlowList((flows) => flows.filter((flow) => flow.uid !== uid)); } + const handleCopy = (flow: IFlow) => { + copyFlowTemp.current = flow; + form.setFieldValue('label', `${flow.label} Copy`); + form.setFieldValue('name', `${flow.name}_copy`); + setShowModal(true); + }; + + const onFinish = async (val: { name: string; label: string }) => { + if (!copyFlowTemp.current) return; + const { source, uid, dag_id, gmt_created, gmt_modified, ...params } = copyFlowTemp.current; + const data = { ...params, ...val }; + const [err] = await apiInterceptors(addFlow(data)); + if (!err) { + messageApi.success(t('save_flow_success')); + setShowModal(false); + getFlowList(); + } + }; + return (
+ {contextHolder}
@@ -39,10 +68,32 @@ function Flow() {
{flowList.map((flow) => ( - + ))} {flowList.length === 0 && }
+ { + setShowModal(false); + }} + footer={false} + > +
+ + + + + + +
+ +
+
+
); } diff --git a/web/types/flow.ts b/web/types/flow.ts index e4e8291d3..318c99f61 100644 --- a/web/types/flow.ts +++ b/web/types/flow.ts @@ -10,6 +10,9 @@ export type IFlowUpdateParam = { }; export type IFlow = { + dag_id: string; + gmt_created: string; + gmt_modified: string; uid: string; name: string; label: string; From b957ad74e3bc91faa9f41812bb8d55b1d868dc5f Mon Sep 17 00:00:00 2001 From: hzh97 <2976151305@qq.com> Date: Mon, 4 Mar 2024 10:36:34 +0800 Subject: [PATCH 2/6] style: show default knowledge icon --- web/components/knowledge/space-card.tsx | 2 +- web/public/images/knowledge-icon.jpg | Bin 0 -> 12229 bytes 2 files changed, 1 insertion(+), 1 deletion(-) create mode 100644 web/public/images/knowledge-icon.jpg diff --git a/web/components/knowledge/space-card.tsx b/web/components/knowledge/space-card.tsx index 1153897e6..140248e66 100644 --- a/web/components/knowledge/space-card.tsx +++ b/web/components/knowledge/space-card.tsx @@ -84,7 +84,7 @@ export default function SpaceCard(props: IProps) { 2_>jH0xNf}p6F zFiZ&q9UUDT6Pp4DheDW{j#>DBU9K7dTogC}4uFT?0&utxcwER;Ge8DwCL-9-zY8)1 z4jvH+0VI-w-GGDtjR=PbkAMWZnglRFJRA-@4k-89=ch1SP9pv7bAe~td+t0--<||u zl(ccOzxG`}j}lpH6IEe8+g(2TvNHa3^}zVe-}Zjgo*vn496OhLy4{W6yVeIk638&7 zDzc<#W>okGcbmX^<)M=cX^LL|Pc@LuCgBzD*<;D4^z{GK%-wr;D=sCVNv-4L7n;+* z@^DHY(`8jo?iUUK`o}FDT@oI?m--urr01}~a_l;C{^%DDo5AW?Y|C@MrzpQrVC8so z^-JDY;fD^tkQT1x?z&#+jPt)RUbb;_n$lffO%;%cVE5! zC$e%*5dGbj%68T7Ou&?dmGeObzx(<%9HumjNQ96d9F&2s zg+x&vUu@OO$wB(GExz$hQiC+KD1J^S?p|t$ZOZr))}7dI(~(C$YitMAHTsNUamB6~ z1v7-)U7eou0DvT?Fetpf$)04v2?`2XCT|B++Cdte9#H;>Z&+IjZqQI2!~%EeSWap> z)b3Z<->~np&;BqlYGc+W;?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NkixR%FEP` zQ3NPlSus)3sT^g#^6e)3Nti-PDDL~Uh__ZoBjg3;MocH`-?)~aq{AU+)e&J(XU2=OQuC6gxc=BB%~EW*jji5Yu&y=6R{ z-@x_7#q7IG3NQ8tyKeQdlAdoo%BVmPiF?!>WqF)p;6C_|DD#&Ha!uU?#>|@&kBaf- z00>RCM<1KIa-AZd`{Fz6T#sJDU^^}~wI^OopdHg*{NPfd98yJJ8445Sz4b{G6?@FG zxaNTJDJFqT6g35! zs!90AFrvRl%W9ldW8q!5P)zgJM$|B3M#Y0ONVlRfxY^9oE{(yQ{Wen~F76$Qazx4! ziV^CbsNUPbcP}5rBE1oRZ}n(G59gtsTSzb=61_+JXNgx3pQc2y_tkLi&)z7 Date: Mon, 4 Mar 2024 10:50:12 +0800 Subject: [PATCH 3/6] feat: build static web --- web/components/knowledge/space-card.tsx | 2 +- web/public/{images => models}/knowledge-icon.jpg | Bin 2 files changed, 1 insertion(+), 1 deletion(-) rename web/public/{images => models}/knowledge-icon.jpg (100%) diff --git a/web/components/knowledge/space-card.tsx b/web/components/knowledge/space-card.tsx index 140248e66..93c28d247 100644 --- a/web/components/knowledge/space-card.tsx +++ b/web/components/knowledge/space-card.tsx @@ -84,7 +84,7 @@ export default function SpaceCard(props: IProps) { Date: Mon, 4 Mar 2024 10:51:25 +0800 Subject: [PATCH 4/6] feat: build static web --- dbgpt/app/static/404.html | 2 +- dbgpt/app/static/404/index.html | 2 +- ...08f934e1ed.js => _app-c0e7db13f2431da8.js} | 2 +- .../chunks/pages/database-107b1b057ad44146.js | 2 +- .../pages/knowledge-4e10990f85629201.js | 1 + .../pages/knowledge-e6ddca71418d06d7.js | 1 - .../_buildManifest.js | 2 +- .../_ssgManifest.js | 0 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 | 923 +----------------- 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/models/knowledge-icon.jpg | Bin 0 -> 12229 bytes dbgpt/app/static/prompt/index.html | 2 +- 20 files changed, 17 insertions(+), 938 deletions(-) rename dbgpt/app/static/_next/static/chunks/pages/{_app-748b2808f934e1ed.js => _app-c0e7db13f2431da8.js} (99%) create mode 100644 dbgpt/app/static/_next/static/chunks/pages/knowledge-4e10990f85629201.js delete mode 100644 dbgpt/app/static/_next/static/chunks/pages/knowledge-e6ddca71418d06d7.js rename dbgpt/app/static/_next/static/{hIVzSTEQYXOUzqqU-69sd => vGdZqufujr2b-nicGWFy4}/_buildManifest.js (78%) rename dbgpt/app/static/_next/static/{hIVzSTEQYXOUzqqU-69sd => vGdZqufujr2b-nicGWFy4}/_ssgManifest.js (100%) create mode 100644 dbgpt/app/static/models/knowledge-icon.jpg diff --git a/dbgpt/app/static/404.html b/dbgpt/app/static/404.html index 20c1d4216..c8afc7b43 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 20c1d4216..c8afc7b43 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/chunks/pages/_app-748b2808f934e1ed.js b/dbgpt/app/static/_next/static/chunks/pages/_app-c0e7db13f2431da8.js similarity index 99% rename from dbgpt/app/static/_next/static/chunks/pages/_app-748b2808f934e1ed.js rename to dbgpt/app/static/_next/static/chunks/pages/_app-c0e7db13f2431da8.js index ae8c4274a..422c652ab 100644 --- a/dbgpt/app/static/_next/static/chunks/pages/_app-748b2808f934e1ed.js +++ b/dbgpt/app/static/_next/static/chunks/pages/_app-c0e7db13f2431da8.js @@ -158,7 +158,7 @@ if (colorScheme) { ${s}.setAttribute('${l}', colorScheme); } - } catch (e) {} })();`}},"mui-color-scheme-init")})((0,f.Z)({attribute:r,colorSchemeStorageKey:l,defaultMode:s,defaultLightColorScheme:m,defaultDarkColorScheme:g,modeStorageKey:o},e))}}({themeId:eP.Z,theme:e_.Z,attribute:"data-joy-color-scheme",modeStorageKey:"joy-mode",colorSchemeStorageKey:"joy-color-scheme",defaultColorScheme:{light:"light",dark:"dark"},resolveTheme:e=>{let t=e.colorInversion;return e.colorInversion=(0,eh.Z)({soft:(0,ej.pP)(e),solid:(0,ej.Lo)(e)},"function"==typeof t?t(e):t,{clone:!1}),e}});var eM=n(38629),eF=n(59077),eN=n(9818);let eT=(0,eF.Z)({colorSchemes:{light:{palette:{mode:"dark",primary:{...eN.Z.grey,solidBg:"#e6f4ff",solidColor:"#1677ff",solidHoverBg:"#e6f4ff"},neutral:{plainColor:"#4d4d4d",plainHoverColor:"#131318",plainHoverBg:"#EBEBEF",plainActiveBg:"#D8D8DF",plainDisabledColor:"#B9B9C6"},background:{body:"#F7F7F7",surface:"#fff"},text:{primary:"#505050"}}},dark:{palette:{mode:"light",primary:{...eN.Z.grey,softBg:"#353539",softHoverBg:"#35353978",softDisabledBg:"#353539",solidBg:"#51525beb",solidHoverBg:"#51525beb"},neutral:{plainColor:"#D8D8DF",plainHoverColor:"#F7F7F8",plainHoverBg:"#353539",plainActiveBg:"#434356",plainDisabledColor:"#434356",outlinedBorder:"#353539",outlinedHoverBorder:"#454651"},text:{primary:"#FDFDFC"},background:{body:"#151622",surface:"#51525beb"}}}},fontFamily:{body:"Josefin Sans, sans-serif",display:"Josefin Sans, sans-serif"},zIndex:{modal:1001}}),eI=(e,t)=>({...eu.default.darkAlgorithm(e,t),colorBgBase:"#232734",colorBorder:"#828282",colorBgContainer:"#232734"});function eL(e){let{children:t}=e,{mode:n}=(0,a.useContext)(l.p),{i18n:r}=(0,J.$G)(),{setMode:o}=eA();return(0,a.useEffect)(()=>{o(n)},[n]),(0,a.useEffect)(()=>{if(n){var e,t,r,o,i,a;null===(e=document.body)||void 0===e||null===(t=e.classList)||void 0===t||t.add(n),"light"===n?null===(r=document.body)||void 0===r||null===(o=r.classList)||void 0===o||o.remove("dark"):null===(i=document.body)||void 0===i||null===(a=i.classList)||void 0===a||a.remove("light")}},[n]),(0,a.useEffect)(()=>{r.changeLanguage&&r.changeLanguage(window.localStorage.getItem(c.Yl)||"en")},[r]),(0,i.jsxs)("div",{children:[(0,i.jsx)(el,{}),t]})}function eB(e){let{children:t}=e,{isMenuExpand:n,mode:r}=(0,a.useContext)(l.p),{i18n:o}=(0,J.$G)();return(0,i.jsx)(ef.ZP,{locale:"en"===o.language?ep.Z:ed.Z,theme:{token:{colorPrimary:"#0069FE",borderRadius:4},algorithm:"dark"===r?eI:void 0},children:(0,i.jsxs)("div",{className:"flex w-screen h-screen overflow-hidden",children:[(0,i.jsx)("div",{className:ec()("transition-[width]",n?"w-60":"w-20","hidden","md:block"),children:(0,i.jsx)(et,{})}),(0,i.jsx)("div",{className:"flex flex-col flex-1 relative overflow-hidden",children:t})]})})}var ez=function(e){let{Component:t,pageProps:n}=e;return(0,i.jsx)(l.R,{children:(0,i.jsx)(eM.Z,{theme:eT,children:(0,i.jsx)(eZ,{theme:eT,defaultMode:"light",children:(0,i.jsx)(eL,{children:(0,i.jsx)(eB,{children:(0,i.jsx)(t,{...n})})})})})})}},19284:function(e,t,n){"use strict";n.d(t,{Hf:function(){return r},S$:function(){return i},l3:function(){return o}});let r={proxyllm:{label:"Proxy LLM",icon:"/models/chatgpt.png"},"flan-t5-base":{label:"flan-t5-base",icon:"/models/google.png"},"vicuna-13b":{label:"vicuna-13b",icon:"/models/vicuna.jpeg"},"vicuna-7b":{label:"vicuna-7b",icon:"/models/vicuna.jpeg"},"vicuna-13b-v1.5":{label:"vicuna-13b-v1.5",icon:"/models/vicuna.jpeg"},"vicuna-7b-v1.5":{label:"vicuna-7b-v1.5",icon:"/models/vicuna.jpeg"},"codegen2-1b":{label:"codegen2-1B",icon:"/models/vicuna.jpeg"},"codet5p-2b":{label:"codet5p-2b",icon:"/models/vicuna.jpeg"},"chatglm-6b-int4":{label:"chatglm-6b-int4",icon:"/models/chatglm.png"},"chatglm-6b":{label:"chatglm-6b",icon:"/models/chatglm.png"},"chatglm2-6b":{label:"chatglm2-6b",icon:"/models/chatglm.png"},"chatglm2-6b-int4":{label:"chatglm2-6b-int4",icon:"/models/chatglm.png"},"guanaco-33b-merged":{label:"guanaco-33b-merged",icon:"/models/huggingface.svg"},"falcon-40b":{label:"falcon-40b",icon:"/models/falcon.jpeg"},"gorilla-7b":{label:"gorilla-7b",icon:"/models/gorilla.png"},"gptj-6b":{label:"ggml-gpt4all-j-v1.3-groovy.bin",icon:""},chatgpt_proxyllm:{label:"chatgpt_proxyllm",icon:"/models/chatgpt.png"},bard_proxyllm:{label:"bard_proxyllm",icon:"/models/bard.gif"},claude_proxyllm:{label:"claude_proxyllm",icon:"/models/claude.png"},wenxin_proxyllm:{label:"wenxin_proxyllm",icon:""},tongyi_proxyllm:{label:"tongyi_proxyllm",icon:"/models/qwen2.png"},zhipu_proxyllm:{label:"zhipu_proxyllm",icon:"/models/zhipu.png"},"llama-2-7b":{label:"Llama-2-7b-chat-hf",icon:"/models/llama.jpg"},"llama-2-13b":{label:"Llama-2-13b-chat-hf",icon:"/models/llama.jpg"},"llama-2-70b":{label:"Llama-2-70b-chat-hf",icon:"/models/llama.jpg"},"baichuan-13b":{label:"Baichuan-13B-Chat",icon:"/models/baichuan.png"},"baichuan-7b":{label:"baichuan-7b",icon:"/models/baichuan.png"},"baichuan2-7b":{label:"Baichuan2-7B-Chat",icon:"/models/baichuan.png"},"baichuan2-13b":{label:"Baichuan2-13B-Chat",icon:"/models/baichuan.png"},"wizardlm-13b":{label:"WizardLM-13B-V1.2",icon:"/models/wizardlm.png"},"llama-cpp":{label:"ggml-model-q4_0.bin",icon:"/models/huggingface.svg"},"internlm-7b":{label:"internlm-chat-7b-v1_1",icon:"/models/internlm.png"},"internlm-7b-8k":{label:"internlm-chat-7b-8k",icon:"/models/internlm.png"},"solar-10.7b-instruct-v1.0":{label:"solar-10.7b-instruct-v1.0",icon:"/models/solar_logo.png"}},o={Chroma:"/models/chroma-logo.png"},i={mysql:{label:"MySQL",icon:"/icons/mysql.png",desc:"Fast, reliable, scalable open-source relational database management system."},mssql:{label:"MSSQL",icon:"/icons/mssql.png",desc:"Powerful, scalable, secure relational database system by Microsoft."},duckdb:{label:"DuckDB",icon:"/icons/duckdb.png",desc:"In-memory analytical database with efficient query processing."},sqlite:{label:"Sqlite",icon:"/icons/sqlite.png",desc:"Lightweight embedded relational database with simplicity and portability."},clickhouse:{label:"ClickHouse",icon:"/icons/clickhouse.png",desc:"Columnar database for high-performance analytics and real-time queries."},oracle:{label:"Oracle",icon:"/icons/oracle.png",desc:"Robust, scalable, secure relational database widely used in enterprises."},access:{label:"Access",icon:"/icons/access.png",desc:"Easy-to-use relational database for small-scale applications by Microsoft."},mongodb:{label:"MongoDB",icon:"/icons/mongodb.png",desc:"Flexible, scalable NoSQL document database for web and mobile apps."},doris:{label:"ApacheDoris",icon:"/icons/doris.png",desc:"A new-generation open-source real-time data warehouse."},starrocks:{label:"StarRocks",icon:"/icons/starrocks.png",desc:"An Open-Source, High-Performance Analytical Database."},db2:{label:"DB2",icon:"/icons/db2.png",desc:"Scalable, secure relational database system developed by IBM."},hbase:{label:"HBase",icon:"/icons/hbase.png",desc:"Distributed, scalable NoSQL database for large structured/semi-structured data."},redis:{label:"Redis",icon:"/icons/redis.png",desc:"Fast, versatile in-memory data structure store as cache, DB, or broker."},cassandra:{label:"Cassandra",icon:"/icons/cassandra.png",desc:"Scalable, fault-tolerant distributed NoSQL database for large data."},couchbase:{label:"Couchbase",icon:"/icons/couchbase.png",desc:"High-performance NoSQL document database with distributed architecture."},postgresql:{label:"PostgreSQL",icon:"/icons/postgresql.png",desc:"Powerful open-source relational database with extensibility and SQL standards."},spark:{label:"Spark",icon:"/icons/spark.png",desc:"Unified engine for large-scale data analytics."},space:{label:"Space",icon:"/icons/knowledge.png",desc:"knowledge analytics."},hive:{label:"Hive",icon:"/icons/hive.png",desc:"A distributed fault-tolerant data warehouse system."}}},98399:function(e,t,n){"use strict";function r(){var e;let t=null!==(e=localStorage.getItem(l))&&void 0!==e?e:"";try{let e=JSON.parse(t);return e}catch(e){return null}}n.d(t,{zN:function(){return s},Hf:function(){return o.Hf},rU:function(){return l},Yl:function(){return a},he:function(){return i},S$:function(){return o.S$},a_:function(){return r}});var o=n(19284);let i="__db_gpt_theme_key",a="__db_gpt_lng_key",l="__db_gpt_im_key",s="__db_gpt_static_flow_nodes_key"},21876:function(e){!function(){var t={675:function(e,t){"use strict";t.byteLength=function(e){var t=s(e),n=t[0],r=t[1];return(n+r)*3/4-r},t.toByteArray=function(e){var t,n,i=s(e),a=i[0],l=i[1],c=new o((a+l)*3/4-l),u=0,f=l>0?a-4:a;for(n=0;n>16&255,c[u++]=t>>8&255,c[u++]=255&t;return 2===l&&(t=r[e.charCodeAt(n)]<<2|r[e.charCodeAt(n+1)]>>4,c[u++]=255&t),1===l&&(t=r[e.charCodeAt(n)]<<10|r[e.charCodeAt(n+1)]<<4|r[e.charCodeAt(n+2)]>>2,c[u++]=t>>8&255,c[u++]=255&t),c},t.fromByteArray=function(e){for(var t,r=e.length,o=r%3,i=[],a=0,l=r-o;a>18&63]+n[o>>12&63]+n[o>>6&63]+n[63&o]);return i.join("")}(e,a,a+16383>l?l:a+16383));return 1===o?i.push(n[(t=e[r-1])>>2]+n[t<<4&63]+"=="):2===o&&i.push(n[(t=(e[r-2]<<8)+e[r-1])>>10]+n[t>>4&63]+n[t<<2&63]+"="),i.join("")};for(var n=[],r=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,l=i.length;a0)throw Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");-1===n&&(n=t);var r=n===t?0:4-n%4;return[n,r]}r["-".charCodeAt(0)]=62,r["_".charCodeAt(0)]=63},72:function(e,t,n){"use strict";/*! + } catch (e) {} })();`}},"mui-color-scheme-init")})((0,f.Z)({attribute:r,colorSchemeStorageKey:l,defaultMode:s,defaultLightColorScheme:m,defaultDarkColorScheme:g,modeStorageKey:o},e))}}({themeId:eP.Z,theme:e_.Z,attribute:"data-joy-color-scheme",modeStorageKey:"joy-mode",colorSchemeStorageKey:"joy-color-scheme",defaultColorScheme:{light:"light",dark:"dark"},resolveTheme:e=>{let t=e.colorInversion;return e.colorInversion=(0,eh.Z)({soft:(0,ej.pP)(e),solid:(0,ej.Lo)(e)},"function"==typeof t?t(e):t,{clone:!1}),e}});var eM=n(38629),eF=n(59077),eN=n(9818);let eT=(0,eF.Z)({colorSchemes:{light:{palette:{mode:"dark",primary:{...eN.Z.grey,solidBg:"#e6f4ff",solidColor:"#1677ff",solidHoverBg:"#e6f4ff"},neutral:{plainColor:"#4d4d4d",plainHoverColor:"#131318",plainHoverBg:"#EBEBEF",plainActiveBg:"#D8D8DF",plainDisabledColor:"#B9B9C6"},background:{body:"#F7F7F7",surface:"#fff"},text:{primary:"#505050"}}},dark:{palette:{mode:"light",primary:{...eN.Z.grey,softBg:"#353539",softHoverBg:"#35353978",softDisabledBg:"#353539",solidBg:"#51525beb",solidHoverBg:"#51525beb"},neutral:{plainColor:"#D8D8DF",plainHoverColor:"#F7F7F8",plainHoverBg:"#353539",plainActiveBg:"#434356",plainDisabledColor:"#434356",outlinedBorder:"#353539",outlinedHoverBorder:"#454651"},text:{primary:"#FDFDFC"},background:{body:"#151622",surface:"#51525beb"}}}},fontFamily:{body:"Josefin Sans, sans-serif",display:"Josefin Sans, sans-serif"},zIndex:{modal:1001}}),eI=(e,t)=>({...eu.default.darkAlgorithm(e,t),colorBgBase:"#232734",colorBorder:"#828282",colorBgContainer:"#232734"});function eL(e){let{children:t}=e,{mode:n}=(0,a.useContext)(l.p),{i18n:r}=(0,J.$G)(),{setMode:o}=eA();return(0,a.useEffect)(()=>{o(n)},[n]),(0,a.useEffect)(()=>{if(n){var e,t,r,o,i,a;null===(e=document.body)||void 0===e||null===(t=e.classList)||void 0===t||t.add(n),"light"===n?null===(r=document.body)||void 0===r||null===(o=r.classList)||void 0===o||o.remove("dark"):null===(i=document.body)||void 0===i||null===(a=i.classList)||void 0===a||a.remove("light")}},[n]),(0,a.useEffect)(()=>{r.changeLanguage&&r.changeLanguage(window.localStorage.getItem(c.Yl)||"en")},[r]),(0,i.jsxs)("div",{children:[(0,i.jsx)(el,{}),t]})}function eB(e){let{children:t}=e,{isMenuExpand:n,mode:r}=(0,a.useContext)(l.p),{i18n:o}=(0,J.$G)();return(0,i.jsx)(ef.ZP,{locale:"en"===o.language?ep.Z:ed.Z,theme:{token:{colorPrimary:"#0069FE",borderRadius:4},algorithm:"dark"===r?eI:void 0},children:(0,i.jsxs)("div",{className:"flex w-screen h-screen overflow-hidden",children:[(0,i.jsx)("div",{className:ec()("transition-[width]",n?"w-60":"w-20","hidden","md:block"),children:(0,i.jsx)(et,{})}),(0,i.jsx)("div",{className:"flex flex-col flex-1 relative overflow-hidden",children:t})]})})}var ez=function(e){let{Component:t,pageProps:n}=e;return(0,i.jsx)(l.R,{children:(0,i.jsx)(eM.Z,{theme:eT,children:(0,i.jsx)(eZ,{theme:eT,defaultMode:"light",children:(0,i.jsx)(eL,{children:(0,i.jsx)(eB,{children:(0,i.jsx)(t,{...n})})})})})})}},19284:function(e,t,n){"use strict";n.d(t,{Hf:function(){return r},S$:function(){return i},l3:function(){return o}});let r={proxyllm:{label:"Proxy LLM",icon:"/models/chatgpt.png"},"flan-t5-base":{label:"flan-t5-base",icon:"/models/google.png"},"vicuna-13b":{label:"vicuna-13b",icon:"/models/vicuna.jpeg"},"vicuna-7b":{label:"vicuna-7b",icon:"/models/vicuna.jpeg"},"vicuna-13b-v1.5":{label:"vicuna-13b-v1.5",icon:"/models/vicuna.jpeg"},"vicuna-7b-v1.5":{label:"vicuna-7b-v1.5",icon:"/models/vicuna.jpeg"},"codegen2-1b":{label:"codegen2-1B",icon:"/models/vicuna.jpeg"},"codet5p-2b":{label:"codet5p-2b",icon:"/models/vicuna.jpeg"},"chatglm-6b-int4":{label:"chatglm-6b-int4",icon:"/models/chatglm.png"},"chatglm-6b":{label:"chatglm-6b",icon:"/models/chatglm.png"},"chatglm2-6b":{label:"chatglm2-6b",icon:"/models/chatglm.png"},"chatglm2-6b-int4":{label:"chatglm2-6b-int4",icon:"/models/chatglm.png"},"guanaco-33b-merged":{label:"guanaco-33b-merged",icon:"/models/huggingface.svg"},"falcon-40b":{label:"falcon-40b",icon:"/models/falcon.jpeg"},"gorilla-7b":{label:"gorilla-7b",icon:"/models/gorilla.png"},"gptj-6b":{label:"ggml-gpt4all-j-v1.3-groovy.bin",icon:""},chatgpt_proxyllm:{label:"chatgpt_proxyllm",icon:"/models/chatgpt.png"},bard_proxyllm:{label:"bard_proxyllm",icon:"/models/bard.gif"},claude_proxyllm:{label:"claude_proxyllm",icon:"/models/claude.png"},wenxin_proxyllm:{label:"wenxin_proxyllm",icon:""},tongyi_proxyllm:{label:"tongyi_proxyllm",icon:"/models/qwen2.png"},zhipu_proxyllm:{label:"zhipu_proxyllm",icon:"/models/zhipu.png"},"llama-2-7b":{label:"Llama-2-7b-chat-hf",icon:"/models/llama.jpg"},"llama-2-13b":{label:"Llama-2-13b-chat-hf",icon:"/models/llama.jpg"},"llama-2-70b":{label:"Llama-2-70b-chat-hf",icon:"/models/llama.jpg"},"baichuan-13b":{label:"Baichuan-13B-Chat",icon:"/models/baichuan.png"},"baichuan-7b":{label:"baichuan-7b",icon:"/models/baichuan.png"},"baichuan2-7b":{label:"Baichuan2-7B-Chat",icon:"/models/baichuan.png"},"baichuan2-13b":{label:"Baichuan2-13B-Chat",icon:"/models/baichuan.png"},"wizardlm-13b":{label:"WizardLM-13B-V1.2",icon:"/models/wizardlm.png"},"llama-cpp":{label:"ggml-model-q4_0.bin",icon:"/models/huggingface.svg"},"internlm-7b":{label:"internlm-chat-7b-v1_1",icon:"/models/internlm.png"},"internlm-7b-8k":{label:"internlm-chat-7b-8k",icon:"/models/internlm.png"},"solar-10.7b-instruct-v1.0":{label:"solar-10.7b-instruct-v1.0",icon:"/models/solar_logo.png"}},o={Chroma:"/models/chroma-logo.png"},i={mysql:{label:"MySQL",icon:"/icons/mysql.png",desc:"Fast, reliable, scalable open-source relational database management system."},mssql:{label:"MSSQL",icon:"/icons/mssql.png",desc:"Powerful, scalable, secure relational database system by Microsoft."},duckdb:{label:"DuckDB",icon:"/icons/duckdb.png",desc:"In-memory analytical database with efficient query processing."},sqlite:{label:"Sqlite",icon:"/icons/sqlite.png",desc:"Lightweight embedded relational database with simplicity and portability."},clickhouse:{label:"ClickHouse",icon:"/icons/clickhouse.png",desc:"Columnar database for high-performance analytics and real-time queries."},oracle:{label:"Oracle",icon:"/icons/oracle.png",desc:"Robust, scalable, secure relational database widely used in enterprises."},access:{label:"Access",icon:"/icons/access.png",desc:"Easy-to-use relational database for small-scale applications by Microsoft."},mongodb:{label:"MongoDB",icon:"/icons/mongodb.png",desc:"Flexible, scalable NoSQL document database for web and mobile apps."},doris:{label:"ApacheDoris",icon:"/icons/doris.png",desc:"A new-generation open-source real-time data warehouse."},starrocks:{label:"StarRocks",icon:"/icons/starrocks.png",desc:"An Open-Source, High-Performance Analytical Database."},db2:{label:"DB2",icon:"/icons/db2.png",desc:"Scalable, secure relational database system developed by IBM."},hbase:{label:"HBase",icon:"/icons/hbase.png",desc:"Distributed, scalable NoSQL database for large structured/semi-structured data."},redis:{label:"Redis",icon:"/icons/redis.png",desc:"Fast, versatile in-memory data structure store as cache, DB, or broker."},cassandra:{label:"Cassandra",icon:"/icons/cassandra.png",desc:"Scalable, fault-tolerant distributed NoSQL database for large data."},couchbase:{label:"Couchbase",icon:"/icons/couchbase.png",desc:"High-performance NoSQL document database with distributed architecture."},postgresql:{label:"PostgreSQL",icon:"/icons/postgresql.png",desc:"Powerful open-source relational database with extensibility and SQL standards."},spark:{label:"Spark",icon:"/icons/spark.png",desc:"Unified engine for large-scale data analytics."},hive:{label:"Hive",icon:"/icons/hive.png",desc:"A distributed fault-tolerant data warehouse system."},space:{label:"Space",icon:"/icons/knowledge.png",desc:"knowledge analytics."}}},98399:function(e,t,n){"use strict";function r(){var e;let t=null!==(e=localStorage.getItem(l))&&void 0!==e?e:"";try{let e=JSON.parse(t);return e}catch(e){return null}}n.d(t,{zN:function(){return s},Hf:function(){return o.Hf},rU:function(){return l},Yl:function(){return a},he:function(){return i},S$:function(){return o.S$},a_:function(){return r}});var o=n(19284);let i="__db_gpt_theme_key",a="__db_gpt_lng_key",l="__db_gpt_im_key",s="__db_gpt_static_flow_nodes_key"},21876:function(e){!function(){var t={675:function(e,t){"use strict";t.byteLength=function(e){var t=s(e),n=t[0],r=t[1];return(n+r)*3/4-r},t.toByteArray=function(e){var t,n,i=s(e),a=i[0],l=i[1],c=new o((a+l)*3/4-l),u=0,f=l>0?a-4:a;for(n=0;n>16&255,c[u++]=t>>8&255,c[u++]=255&t;return 2===l&&(t=r[e.charCodeAt(n)]<<2|r[e.charCodeAt(n+1)]>>4,c[u++]=255&t),1===l&&(t=r[e.charCodeAt(n)]<<10|r[e.charCodeAt(n+1)]<<4|r[e.charCodeAt(n+2)]>>2,c[u++]=t>>8&255,c[u++]=255&t),c},t.fromByteArray=function(e){for(var t,r=e.length,o=r%3,i=[],a=0,l=r-o;a>18&63]+n[o>>12&63]+n[o>>6&63]+n[63&o]);return i.join("")}(e,a,a+16383>l?l:a+16383));return 1===o?i.push(n[(t=e[r-1])>>2]+n[t<<4&63]+"=="):2===o&&i.push(n[(t=(e[r-2]<<8)+e[r-1])>>10]+n[t>>4&63]+n[t<<2&63]+"="),i.join("")};for(var n=[],r=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,l=i.length;a0)throw Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");-1===n&&(n=t);var r=n===t?0:4-n%4;return[n,r]}r["-".charCodeAt(0)]=62,r["_".charCodeAt(0)]=63},72:function(e,t,n){"use strict";/*! * The buffer module from node.js, for the browser. * * @author Feross Aboukhadijeh diff --git a/dbgpt/app/static/_next/static/chunks/pages/database-107b1b057ad44146.js b/dbgpt/app/static/_next/static/chunks/pages/database-107b1b057ad44146.js index 8d9621437..3515d92bf 100644 --- a/dbgpt/app/static/_next/static/chunks/pages/database-107b1b057ad44146.js +++ b/dbgpt/app/static/_next/static/chunks/pages/database-107b1b057ad44146.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5498],{55286:function(e,s,l){(window.__NEXT_P=window.__NEXT_P||[]).push(["/database",function(){return l(99473)}])},26892:function(e,s,l){"use strict";var t=l(85893),a=l(67294),r=l(66309),n=l(83062),i=l(94184),d=l.n(i),c=l(25675),o=l.n(c);s.Z=(0,a.memo)(function(e){let{icon:s,iconBorder:l=!0,title:i,desc:c,tags:m,children:u,disabled:x,operations:b,className:p,...h}=e,f=(0,a.useMemo)(()=>s?"string"==typeof s?(0,t.jsx)(o(),{className:d()("w-11 h-11 rounded-full mr-4 object-contain bg-white",{"border border-gray-200":l}),width:44,height:44,src:s,alt:i}):s:null,[s]),j=(0,a.useMemo)(()=>m&&m.length?(0,t.jsx)("div",{className:"flex items-center mt-1 flex-wrap",children:m.map((e,s)=>{var l;return"string"==typeof e?(0,t.jsx)(r.Z,{className:"text-xs",bordered:!1,color:"default",children:e},s):(0,t.jsx)(r.Z,{className:"text-xs",bordered:null!==(l=e.border)&&void 0!==l&&l,color:e.color,children:e.text},s)})}):null,[m]);return(0,t.jsxs)("div",{className:d()("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&&!!h.onClick},p),...h,children:[(0,t.jsxs)("div",{className:"p-4",children:[(0,t.jsxs)("div",{className:"flex items-center",children:[f,(0,t.jsxs)("div",{className:"flex flex-col",children:[(0,t.jsx)("h2",{className:"text-sm font-semibold",children:i}),j]})]}),c&&(0,t.jsx)(n.Z,{title:c,children:(0,t.jsx)("p",{className:"mt-2 text-sm text-gray-500 font-normal line-clamp-2",children:c})})]}),(0,t.jsxs)("div",{children:[u,b&&!!b.length&&(0,t.jsx)("div",{className:"flex flex-wrap items-center justify-center border-t border-solid border-gray-100 dark:border-theme-dark",children:b.map((e,s)=>(0,t.jsx)(n.Z,{title:e.label,children:(0,t.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:s=>{var l;s.stopPropagation(),null===(l=e.onClick)||void 0===l||l.call(e)},children:[e.children,sk(r,Z),[r,Z]);(0,a.useEffect)(()=>{l&&N.setFieldValue("db_type",l)},[l]),(0,a.useEffect)(()=>{c&&N.setFieldsValue({...c})},[c]),(0,a.useEffect)(()=>{s||N.resetFields()},[s]);let w=async e=>{let{db_host:s,db_path:l,db_port:t,...a}=e;if(!c&&o.some(e=>e===a.db_name)){i.ZP.error("The database already exists!");return}let r={db_host:g?void 0:s,db_port:g?void 0:t,file_path:g?l:void 0,...a};v(!0);try{let[e]=await(0,f.Vx)((0,f.KS)(r));if(e)return;let[s]=await(0,f.Vx)((c?f.mR:f.b_)(r));if(s){i.ZP.error(s.message);return}i.ZP.success("success"),null==u||u()}catch(e){i.ZP.error(e.message)}finally{v(!1)}},C=(0,a.useMemo)(()=>!!c||!!l,[c,l]);const isRequired=['hive'].every(item=>item!==Z);return(0,t.jsx)(n.default,{open:s,width:400,title:_(c?"Edit":"create_database"),maskClosable:!1,footer:null,onCancel:m,children:(0,t.jsxs)(x.Z,{form:N,className:"pt-2",labelCol:{span:6},labelAlign:"left",onFinish:w,children:[(0,t.jsx)(x.Z.Item,{name:"db_type",label:"DB Type",className:"mb-3",rules:[{required:!0}],children:(0,t.jsx)(b.default,{"aria-readonly":C,disabled:C,options:r})}),(0,t.jsx)(x.Z.Item,{name:"db_name",label:"DB Name",className:"mb-3",rules:[{required:!0}],children:(0,t.jsx)(p.default,{readOnly:!!c,disabled:!!c})}),!0===g&&(0,t.jsx)(x.Z.Item,{name:"db_path",label:"Path",className:"mb-3",rules:[{required:!0}],children:(0,t.jsx)(p.default,{})}),!1===g&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(x.Z.Item,{name:"db_user",label:"Username",className:"mb-3",rules:isRequired?[{required:!0}]:[],children:(0,t.jsx)(p.default,{})}),(0,t.jsx)(x.Z.Item,{name:"db_pwd",label:"Password",className:"mb-3",rules:isRequired?[{required:!0}]:[],children:(0,t.jsx)(p.default,{type:"password"})}),(0,t.jsx)(x.Z.Item,{name:"db_host",label:"Host",className:"mb-3",rules:[{required:!0}],children:(0,t.jsx)(p.default,{})}),(0,t.jsx)(x.Z.Item,{name:"db_port",label:"Port",className:"mb-3",rules:[{required:!0}],children:(0,t.jsx)(h.Z,{min:1,step:1,max:65535})})]}),(0,t.jsx)(x.Z.Item,{name:"comment",label:"Remark",className:"mb-3",children:(0,t.jsx)(p.default,{})}),(0,t.jsxs)(x.Z.Item,{className:"flex flex-row-reverse pt-1 mb-0",children:[(0,t.jsx)(d.ZP,{htmlType:"submit",type:"primary",size:"middle",className:"mr-1",loading:y,children:"Save"}),(0,t.jsx)(d.ZP,{size:"middle",onClick:m,children:"Cancel"})]})]})})},v=l(24969),_=l(36531),N=l(27704),Z=l(45247),g=l(98399),w=l(26892);function k(e,s){var l;return null===(l=e.find(e=>e.value===s))||void 0===l?void 0:l.isFileDb}var C=function(){var e;let{t:s}=(0,j.$G)(),[l,x]=(0,a.useState)([]),[b,p]=(0,a.useState)([]),[h,k]=(0,a.useState)(!1),[C,P]=(0,a.useState)({open:!1}),[E,S]=(0,a.useState)({open:!1}),F=async()=>{let[,e]=await(0,f.Vx)((0,f.Jm)());p(null!=e?e:[])},T=async()=>{k(!0);let[,e]=await(0,f.Vx)((0,f.Bw)());x(null!=e?e:[]),k(!1)},I=(0,a.useMemo)(()=>{let e=b.map(e=>{let{db_type:s,is_file_db:l}=e;return{...g.S$[s],value:s,isFileDb:l}}),s=Object.keys(g.S$).filter(s=>!e.some(e=>e.value===s)).map(e=>({...g.S$[e],value:g.S$[e].label,disabled:!0}));return[...e,...s]},[b]),D=e=>{P({open:!0,info:e})},V=e=>{n.default.confirm({title:"Tips",content:"Do you Want to delete the ".concat(e.db_name,"?"),onOk:()=>new Promise(async(s,l)=>{try{let[t]=await(0,f.Vx)((0,f.J5)(e.db_name));if(t){i.ZP.error(t.message),l();return}i.ZP.success("success"),T(),s()}catch(e){l()}})})},q=(0,a.useMemo)(()=>{let e=I.reduce((e,s)=>(e[s.value]=l.filter(e=>e.db_type===s.value),e),{});return e},[l,I]);(0,r.Z)(async()=>{await T(),await F()},[]);let M=e=>{let s=l.filter(s=>s.db_type===e.value);S({open:!0,dbList:s,name:e.label,type:e.value})};return(0,t.jsxs)("div",{className:"relative p-4 md:p-6 min-h-full overflow-y-auto",children:[(0,t.jsx)(Z.Z,{visible:h}),(0,t.jsx)("div",{className:"mb-4",children:(0,t.jsx)(d.ZP,{type:"primary",className:"flex items-center",icon:(0,t.jsx)(v.Z,{}),onClick:()=>{P({open:!0})},children:s("create")})}),(0,t.jsx)("div",{className:"flex flex-wrap gap-2 md:gap-4",children:I.map(s=>(0,t.jsx)(c.Z,{count:q[s.value].length,className:"min-h-fit",children:(0,t.jsx)(w.Z,{className:"h-full",title:s.label,desc:null!==(e=s.desc)&&void 0!==e?e:"",disabled:s.disabled,icon:s.icon,onClick:()=>{s.disabled||M(s)}})},s.value))}),(0,t.jsx)(y,{open:C.open,dbTypeList:I,choiceDBType:C.dbType,editValue:C.info,dbNames:l.map(e=>e.db_name),onSuccess:()=>{P({open:!1}),T()},onClose:()=>{P({open:!1})}}),(0,t.jsx)(o.Z,{title:E.name,placement:"right",onClose:()=>{S({open:!1})},open:E.open,children:E.type&&q[E.type]&&q[E.type].length?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(d.ZP,{type:"primary",className:"mb-4 flex items-center",icon:(0,t.jsx)(v.Z,{}),onClick:()=>{P({open:!0,dbType:E.type})},children:"Create"}),q[E.type].map(e=>(0,t.jsxs)(m.Z,{title:e.db_name,extra:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(_.Z,{className:"mr-2",style:{color:"#1b7eff"},onClick:()=>{D(e)}}),(0,t.jsx)(N.Z,{style:{color:"#ff1b2e"},onClick:()=>{V(e)}})]}),className:"mb-4",children:[e.db_path?(0,t.jsxs)("p",{children:["path: ",e.db_path]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("p",{children:["host: ",e.db_host]}),(0,t.jsxs)("p",{children:["username: ",e.db_user]}),(0,t.jsxs)("p",{children:["port: ",e.db_port]})]}),(0,t.jsxs)("p",{children:["remark: ",e.comment]})]},e.db_name))]}):(0,t.jsx)(u.Z,{image:u.Z.PRESENTED_IMAGE_DEFAULT,children:(0,t.jsx)(d.ZP,{type:"primary",className:"flex items-center mx-auto",icon:(0,t.jsx)(v.Z,{}),onClick:()=>{P({open:!0,dbType:E.type})},children:"Create Now"})})})]})}}},function(e){e.O(0,[2185,5503,9479,1009,4442,5813,411,8928,7902,9774,2888,179],function(){return e(e.s=55286)}),_N_E=e.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5498],{55286:function(e,s,l){(window.__NEXT_P=window.__NEXT_P||[]).push(["/database",function(){return l(99473)}])},26892:function(e,s,l){"use strict";var t=l(85893),a=l(67294),r=l(66309),n=l(83062),i=l(94184),d=l.n(i),c=l(25675),o=l.n(c);s.Z=(0,a.memo)(function(e){let{icon:s,iconBorder:l=!0,title:i,desc:c,tags:m,children:u,disabled:x,operations:b,className:p,...h}=e,f=(0,a.useMemo)(()=>s?"string"==typeof s?(0,t.jsx)(o(),{className:d()("w-11 h-11 rounded-full mr-4 object-contain bg-white",{"border border-gray-200":l}),width:44,height:44,src:s,alt:i}):s:null,[s]),j=(0,a.useMemo)(()=>m&&m.length?(0,t.jsx)("div",{className:"flex items-center mt-1 flex-wrap",children:m.map((e,s)=>{var l;return"string"==typeof e?(0,t.jsx)(r.Z,{className:"text-xs",bordered:!1,color:"default",children:e},s):(0,t.jsx)(r.Z,{className:"text-xs",bordered:null!==(l=e.border)&&void 0!==l&&l,color:e.color,children:e.text},s)})}):null,[m]);return(0,t.jsxs)("div",{className:d()("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&&!!h.onClick},p),...h,children:[(0,t.jsxs)("div",{className:"p-4",children:[(0,t.jsxs)("div",{className:"flex items-center",children:[f,(0,t.jsxs)("div",{className:"flex flex-col",children:[(0,t.jsx)("h2",{className:"text-sm font-semibold",children:i}),j]})]}),c&&(0,t.jsx)(n.Z,{title:c,children:(0,t.jsx)("p",{className:"mt-2 text-sm text-gray-500 font-normal line-clamp-2",children:c})})]}),(0,t.jsxs)("div",{children:[u,b&&!!b.length&&(0,t.jsx)("div",{className:"flex flex-wrap items-center justify-center border-t border-solid border-gray-100 dark:border-theme-dark",children:b.map((e,s)=>(0,t.jsx)(n.Z,{title:e.label,children:(0,t.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:s=>{var l;s.stopPropagation(),null===(l=e.onClick)||void 0===l||l.call(e)},children:[e.children,sk(r,Z),[r,Z]);(0,a.useEffect)(()=>{l&&N.setFieldValue("db_type",l)},[l]),(0,a.useEffect)(()=>{c&&N.setFieldsValue({...c})},[c]),(0,a.useEffect)(()=>{s||N.resetFields()},[s]);let w=async e=>{let{db_host:s,db_path:l,db_port:t,...a}=e;if(!c&&o.some(e=>e===a.db_name)){i.ZP.error("The database already exists!");return}let r={db_host:g?void 0:s,db_port:g?void 0:t,file_path:g?l:void 0,...a};v(!0);try{let[e]=await (0,f.Vx)((0,f.KS)(r));if(e)return;let[s]=await (0,f.Vx)((c?f.mR:f.b_)(r));if(s){i.ZP.error(s.message);return}i.ZP.success("success"),null==u||u()}catch(e){i.ZP.error(e.message)}finally{v(!1)}},C=(0,a.useMemo)(()=>!!c||!!l,[c,l]);return(0,t.jsx)(n.default,{open:s,width:400,title:_(c?"Edit":"create_database"),maskClosable:!1,footer:null,onCancel:m,children:(0,t.jsxs)(x.Z,{form:N,className:"pt-2",labelCol:{span:6},labelAlign:"left",onFinish:w,children:[(0,t.jsx)(x.Z.Item,{name:"db_type",label:"DB Type",className:"mb-3",rules:[{required:!0}],children:(0,t.jsx)(b.default,{"aria-readonly":C,disabled:C,options:r})}),(0,t.jsx)(x.Z.Item,{name:"db_name",label:"DB Name",className:"mb-3",rules:[{required:!0}],children:(0,t.jsx)(p.default,{readOnly:!!c,disabled:!!c})}),!0===g&&(0,t.jsx)(x.Z.Item,{name:"db_path",label:"Path",className:"mb-3",rules:[{required:!0}],children:(0,t.jsx)(p.default,{})}),!1===g&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(x.Z.Item,{name:"db_user",label:"Username",className:"mb-3",rules:[{required:!0}],children:(0,t.jsx)(p.default,{})}),(0,t.jsx)(x.Z.Item,{name:"db_pwd",label:"Password",className:"mb-3",rules:[{required:!0}],children:(0,t.jsx)(p.default,{type:"password"})}),(0,t.jsx)(x.Z.Item,{name:"db_host",label:"Host",className:"mb-3",rules:[{required:!0}],children:(0,t.jsx)(p.default,{})}),(0,t.jsx)(x.Z.Item,{name:"db_port",label:"Port",className:"mb-3",rules:[{required:!0}],children:(0,t.jsx)(h.Z,{min:1,step:1,max:65535})})]}),(0,t.jsx)(x.Z.Item,{name:"comment",label:"Remark",className:"mb-3",children:(0,t.jsx)(p.default,{})}),(0,t.jsxs)(x.Z.Item,{className:"flex flex-row-reverse pt-1 mb-0",children:[(0,t.jsx)(d.ZP,{htmlType:"submit",type:"primary",size:"middle",className:"mr-1",loading:y,children:"Save"}),(0,t.jsx)(d.ZP,{size:"middle",onClick:m,children:"Cancel"})]})]})})},v=l(24969),_=l(36531),N=l(27704),Z=l(45247),g=l(98399),w=l(26892);function k(e,s){var l;return null===(l=e.find(e=>e.value===s))||void 0===l?void 0:l.isFileDb}var C=function(){var e;let{t:s}=(0,j.$G)(),[l,x]=(0,a.useState)([]),[b,p]=(0,a.useState)([]),[h,k]=(0,a.useState)(!1),[C,P]=(0,a.useState)({open:!1}),[E,S]=(0,a.useState)({open:!1}),F=async()=>{let[,e]=await (0,f.Vx)((0,f.Jm)());p(null!=e?e:[])},T=async()=>{k(!0);let[,e]=await (0,f.Vx)((0,f.Bw)());x(null!=e?e:[]),k(!1)},I=(0,a.useMemo)(()=>{let e=b.map(e=>{let{db_type:s,is_file_db:l}=e;return{...g.S$[s],value:s,isFileDb:l}}),s=Object.keys(g.S$).filter(s=>!e.some(e=>e.value===s)).map(e=>({...g.S$[e],value:g.S$[e].label,disabled:!0}));return[...e,...s]},[b]),D=e=>{P({open:!0,info:e})},V=e=>{n.default.confirm({title:"Tips",content:"Do you Want to delete the ".concat(e.db_name,"?"),onOk:()=>new Promise(async(s,l)=>{try{let[t]=await (0,f.Vx)((0,f.J5)(e.db_name));if(t){i.ZP.error(t.message),l();return}i.ZP.success("success"),T(),s()}catch(e){l()}})})},q=(0,a.useMemo)(()=>{let e=I.reduce((e,s)=>(e[s.value]=l.filter(e=>e.db_type===s.value),e),{});return e},[l,I]);(0,r.Z)(async()=>{await T(),await F()},[]);let M=e=>{let s=l.filter(s=>s.db_type===e.value);S({open:!0,dbList:s,name:e.label,type:e.value})};return(0,t.jsxs)("div",{className:"relative p-4 md:p-6 min-h-full overflow-y-auto",children:[(0,t.jsx)(Z.Z,{visible:h}),(0,t.jsx)("div",{className:"mb-4",children:(0,t.jsx)(d.ZP,{type:"primary",className:"flex items-center",icon:(0,t.jsx)(v.Z,{}),onClick:()=>{P({open:!0})},children:s("create")})}),(0,t.jsx)("div",{className:"flex flex-wrap gap-2 md:gap-4",children:I.map(s=>(0,t.jsx)(c.Z,{count:q[s.value].length,className:"min-h-fit",children:(0,t.jsx)(w.Z,{className:"h-full",title:s.label,desc:null!==(e=s.desc)&&void 0!==e?e:"",disabled:s.disabled,icon:s.icon,onClick:()=>{s.disabled||M(s)}})},s.value))}),(0,t.jsx)(y,{open:C.open,dbTypeList:I,choiceDBType:C.dbType,editValue:C.info,dbNames:l.map(e=>e.db_name),onSuccess:()=>{P({open:!1}),T()},onClose:()=>{P({open:!1})}}),(0,t.jsx)(o.Z,{title:E.name,placement:"right",onClose:()=>{S({open:!1})},open:E.open,children:E.type&&q[E.type]&&q[E.type].length?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(d.ZP,{type:"primary",className:"mb-4 flex items-center",icon:(0,t.jsx)(v.Z,{}),onClick:()=>{P({open:!0,dbType:E.type})},children:"Create"}),q[E.type].map(e=>(0,t.jsxs)(m.Z,{title:e.db_name,extra:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(_.Z,{className:"mr-2",style:{color:"#1b7eff"},onClick:()=>{D(e)}}),(0,t.jsx)(N.Z,{style:{color:"#ff1b2e"},onClick:()=>{V(e)}})]}),className:"mb-4",children:[e.db_path?(0,t.jsxs)("p",{children:["path: ",e.db_path]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("p",{children:["host: ",e.db_host]}),(0,t.jsxs)("p",{children:["username: ",e.db_user]}),(0,t.jsxs)("p",{children:["port: ",e.db_port]})]}),(0,t.jsxs)("p",{children:["remark: ",e.comment]})]},e.db_name))]}):(0,t.jsx)(u.Z,{image:u.Z.PRESENTED_IMAGE_DEFAULT,children:(0,t.jsx)(d.ZP,{type:"primary",className:"flex items-center mx-auto",icon:(0,t.jsx)(v.Z,{}),onClick:()=>{P({open:!0,dbType:E.type})},children:"Create Now"})})})]})}}},function(e){e.O(0,[2185,5503,9479,1009,4442,5813,411,8928,7902,9774,2888,179],function(){return e(e.s=55286)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/dbgpt/app/static/_next/static/chunks/pages/knowledge-4e10990f85629201.js b/dbgpt/app/static/_next/static/chunks/pages/knowledge-4e10990f85629201.js new file mode 100644 index 000000000..bac4e907f --- /dev/null +++ b/dbgpt/app/static/_next/static/chunks/pages/knowledge-4e10990f85629201.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)(O.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 G=a(47207);let{confirm:L}=c.default;function H(e){let{space:t}=e,{t:a}=(0,V.$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=>{L({title:a("Tips"),icon:(0,l.jsx)(h.Z,{}),content:"".concat(a("Del_Document_Tips"),"?"),okText:"Yes",okType:"danger",cancelText:"No",async onOk(){await O(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]}))},O=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)(G.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)(R,{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,V.$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]||"/models/knowledge-icon.jpg",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,V.$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,V.$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,V.$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)(G.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,c]=(0,n.useState)(),o="";if("DOCUMENT"===a){let e=s.split(".");o=e[e.length-1]}let d=o?t.filter(e=>e.suffix.indexOf(o)>-1):t,{t:m}=(0,V.$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){c(e.target.value)},children:[(0,l.jsx)(em.ZP,{value:u.strategy,children:u.name}),d.map(e=>(0,l.jsx)(em.ZP,{value:e.strategy,children:e.name},"strategy_radio_".concat(e.strategy)))]})}),function(){if(!i)return null;if(i===u.strategy)return(0,l.jsx)("p",{className:"my-4",children:u.desc});let e=null==d?void 0:d.filter(e=>e.strategy===i)[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,V.$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,V.$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,2185,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-e6ddca71418d06d7.js b/dbgpt/app/static/_next/static/chunks/pages/knowledge-e6ddca71418d06d7.js deleted file mode 100644 index f02c48b35..000000000 --- a/dbgpt/app/static/_next/static/chunks/pages/knowledge-e6ddca71418d06d7.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 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,c]=(0,n.useState)(),o="";if("DOCUMENT"===a){let e=s.split(".");o=e[e.length-1]}let d=o?t.filter(e=>e.suffix.indexOf(o)>-1):t,{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){c(e.target.value)},children:[(0,l.jsx)(em.ZP,{value:u.strategy,children:u.name}),d.map(e=>(0,l.jsx)(em.ZP,{value:e.strategy,children:e.name},"strategy_radio_".concat(e.strategy)))]})}),function(){if(!i)return null;if(i===u.strategy)return(0,l.jsx)("p",{className:"my-4",children:u.desc});let e=null==d?void 0:d.filter(e=>e.strategy===i)[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,2185,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/hIVzSTEQYXOUzqqU-69sd/_buildManifest.js b/dbgpt/app/static/_next/static/vGdZqufujr2b-nicGWFy4/_buildManifest.js similarity index 78% rename from dbgpt/app/static/_next/static/hIVzSTEQYXOUzqqU-69sd/_buildManifest.js rename to dbgpt/app/static/_next/static/vGdZqufujr2b-nicGWFy4/_buildManifest.js index 4957b7afe..ecd72d0eb 100644 --- a/dbgpt/app/static/_next/static/hIVzSTEQYXOUzqqU-69sd/_buildManifest.js +++ b/dbgpt/app/static/_next/static/vGdZqufujr2b-nicGWFy4/_buildManifest.js @@ -1 +1 @@ -self.__BUILD_MANIFEST=function(s,c,a,e,t,n,d,b,k,f,h,i,u,j,p,o,g,l,r){return{__rewrites:{beforeFiles:[],afterFiles:[],fallback:[]},"/":[p,s,c,a,e,f,d,b,o,"static/chunks/9305-f44429d5185a9fc7.js","static/chunks/7299-cb3b5c1ad528f20a.js","static/chunks/pages/index-91ccbb17a10c967b.js"],"/_error":["static/chunks/pages/_error-8095ba9e1bf12f30.js"],"/agent":[s,c,a,t,f,n,"static/chunks/pages/agent-eca3b37b625d18b7.js"],"/app":[h,s,c,a,e,t,n,i,u,"static/chunks/7958-ed34baf152e6e252.js",j,"static/chunks/pages/app-965a0a3b7d3520ce.js"],"/chat":["static/chunks/pages/chat-b0e377e00ee18a5b.js"],"/database":[s,c,a,e,t,n,b,k,"static/chunks/7902-94d75aab69ac7c8d.js","static/chunks/pages/database-107b1b057ad44146.js"],"/flow":[h,s,c,a,i,u,j,"static/chunks/pages/flow-af8106c2d4339aca.js"],"/flow/canvas":[p,h,s,c,a,e,d,b,i,k,u,g,o,"static/chunks/4350-1896c46dd5e9afe8.js",j,"static/chunks/pages/flow/canvas-57121d2cb2bfbe1c.js"],"/knowledge":[l,s,c,a,t,f,n,b,k,r,g,"static/chunks/8660-13b381e809ea1aa1.js","static/chunks/pages/knowledge-e6ddca71418d06d7.js"],"/knowledge/chunk":[s,e,t,d,n,"static/chunks/pages/knowledge/chunk-bc057a5c02a2c123.js"],"/models":[l,s,c,a,e,k,"static/chunks/3444-30181eacc7980e66.js","static/chunks/pages/models-4a50fb0ade28ee60.js"],"/prompt":[s,c,a,e,d,r,"static/chunks/4733-cc041bf7a3d12e39.js","static/chunks/5396-3e98ef6b437678bd.js","static/chunks/pages/prompt-a25dc012271e1f81.js"],sortedPages:["/","/_app","/_error","/agent","/app","/chat","/database","/flow","/flow/canvas","/knowledge","/knowledge/chunk","/models","/prompt"]}}("static/chunks/2185-30f9d0578fa0d631.js","static/chunks/5503-c65f6d730754acc7.js","static/chunks/9479-21f588e1fd4e6b6d.js","static/chunks/1009-4b2af86bde623424.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,b,f,k,h,i,u,j,p,o,g,l,r){return{__rewrites:{beforeFiles:[],afterFiles:[],fallback:[]},"/":[p,s,c,a,e,k,d,b,o,"static/chunks/9305-f44429d5185a9fc7.js","static/chunks/7299-cb3b5c1ad528f20a.js","static/chunks/pages/index-91ccbb17a10c967b.js"],"/_error":["static/chunks/pages/_error-8095ba9e1bf12f30.js"],"/agent":[s,c,a,t,k,n,"static/chunks/pages/agent-eca3b37b625d18b7.js"],"/app":[h,s,c,a,e,t,n,i,u,"static/chunks/7958-ed34baf152e6e252.js",j,"static/chunks/pages/app-965a0a3b7d3520ce.js"],"/chat":["static/chunks/pages/chat-b0e377e00ee18a5b.js"],"/database":[s,c,a,e,t,n,b,f,"static/chunks/7902-94d75aab69ac7c8d.js","static/chunks/pages/database-107b1b057ad44146.js"],"/flow":[h,s,c,a,i,u,j,"static/chunks/pages/flow-af8106c2d4339aca.js"],"/flow/canvas":[p,h,s,c,a,e,d,b,i,f,u,g,o,"static/chunks/4350-1896c46dd5e9afe8.js",j,"static/chunks/pages/flow/canvas-57121d2cb2bfbe1c.js"],"/knowledge":[l,s,c,a,t,k,n,b,f,r,g,"static/chunks/8660-13b381e809ea1aa1.js","static/chunks/pages/knowledge-4e10990f85629201.js"],"/knowledge/chunk":[s,e,t,d,n,"static/chunks/pages/knowledge/chunk-bc057a5c02a2c123.js"],"/models":[l,s,c,a,e,f,"static/chunks/3444-30181eacc7980e66.js","static/chunks/pages/models-4a50fb0ade28ee60.js"],"/prompt":[s,c,a,e,d,r,"static/chunks/4733-cc041bf7a3d12e39.js","static/chunks/5396-3e98ef6b437678bd.js","static/chunks/pages/prompt-a25dc012271e1f81.js"],sortedPages:["/","/_app","/_error","/agent","/app","/chat","/database","/flow","/flow/canvas","/knowledge","/knowledge/chunk","/models","/prompt"]}}("static/chunks/2185-30f9d0578fa0d631.js","static/chunks/5503-c65f6d730754acc7.js","static/chunks/9479-21f588e1fd4e6b6d.js","static/chunks/1009-4b2af86bde623424.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/hIVzSTEQYXOUzqqU-69sd/_ssgManifest.js b/dbgpt/app/static/_next/static/vGdZqufujr2b-nicGWFy4/_ssgManifest.js similarity index 100% rename from dbgpt/app/static/_next/static/hIVzSTEQYXOUzqqU-69sd/_ssgManifest.js rename to dbgpt/app/static/_next/static/vGdZqufujr2b-nicGWFy4/_ssgManifest.js diff --git a/dbgpt/app/static/agent/index.html b/dbgpt/app/static/agent/index.html index d7b555b93..d52d522ae 100644 --- a/dbgpt/app/static/agent/index.html +++ b/dbgpt/app/static/agent/index.html @@ -1 +1 @@ -
\ 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 85b0477a5..bdb950191 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 bf716f8b0..aac300676 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 8e8f1f95d..a735b407d 100644 --- a/dbgpt/app/static/database/index.html +++ b/dbgpt/app/static/database/index.html @@ -1,922 +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. -

-
-
-
-
-
- -
-
-
- Hive -
-

- Hive -

-
-
-

- A distributed fault-tolerant data warehouse system. -

-
-
-
-
-
-
-
-
-
-
-
- - - - \ 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.

Hive

Hive

A distributed fault-tolerant data warehouse system.

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 ab6212785..ca19b20b8 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 fa86dec29..ef0450a03 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 6d317eea7..d7dece38f 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 fe521f754..8026fec1a 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 3e05f1ecb..13f4154ca 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 475d0dcbf..ad6dfc4bd 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/models/knowledge-icon.jpg b/dbgpt/app/static/models/knowledge-icon.jpg new file mode 100644 index 0000000000000000000000000000000000000000..312b49a118733de7df968c5a6348fd3b55bf7b98 GIT binary patch literal 12229 zcmbVy1z1%}*YG}ccS)CY3Q|gUD2_>jH0xNf}p6F zFiZ&q9UUDT6Pp4DheDW{j#>DBU9K7dTogC}4uFT?0&utxcwER;Ge8DwCL-9-zY8)1 z4jvH+0VI-w-GGDtjR=PbkAMWZnglRFJRA-@4k-89=ch1SP9pv7bAe~td+t0--<||u zl(ccOzxG`}j}lpH6IEe8+g(2TvNHa3^}zVe-}Zjgo*vn496OhLy4{W6yVeIk638&7 zDzc<#W>okGcbmX^<)M=cX^LL|Pc@LuCgBzD*<;D4^z{GK%-wr;D=sCVNv-4L7n;+* z@^DHY(`8jo?iUUK`o}FDT@oI?m--urr01}~a_l;C{^%DDo5AW?Y|C@MrzpQrVC8so z^-JDY;fD^tkQT1x?z&#+jPt)RUbb;_n$lffO%;%cVE5! zC$e%*5dGbj%68T7Ou&?dmGeObzx(<%9HumjNQ96d9F&2s zg+x&vUu@OO$wB(GExz$hQiC+KD1J^S?p|t$ZOZr))}7dI(~(C$YitMAHTsNUamB6~ z1v7-)U7eou0DvT?Fetpf$)04v2?`2XCT|B++Cdte9#H;>Z&+IjZqQI2!~%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ZV6v+sFeH(~B@bGHg3eo*tG7sS{2NkixR%FEP` zQ3NPlSus)3sT^g#^6e)3Nti-PDDL~Uh__ZoBjg3;MocH`-?)~aq{AU+)e&J(XU2=OQuC6gxc=BB%~EW*jji5Yu&y=6R{ z-@x_7#q7IG3NQ8tyKeQdlAdoo%BVmPiF?!>WqF)p;6C_|DD#&Ha!uU?#>|@&kBaf- z00>RCM<1KIa-AZd`{Fz6T#sJDU^^}~wI^OopdHg*{NPfd98yJJ8445Sz4b{G6?@FG zxaNTJDJFqT6g35! zs!90AFrvRl%W9ldW8q!5P)zgJM$|B3M#Y0ONVlRfxY^9oE{(yQ{Wen~F76$Qazx4! ziV^CbsNUPbcP}5rBE1oRZ}n(G59gtsTSzb=61_+JXNgx3pQc2y_tkLi&)z7
NameSceneSub SceneContentOperation
No data
\ No newline at end of file +
NameSceneSub SceneContentOperation
No data
\ No newline at end of file From 5787c035729d1224f768b5d3f85090ed29c0fe14 Mon Sep 17 00:00:00 2001 From: hzh97 <2976151305@qq.com> Date: Mon, 4 Mar 2024 11:18:43 +0800 Subject: [PATCH 5/6] style: remove repeat image --- web/components/knowledge/space-card.tsx | 2 +- web/public/models/knowledge-icon.jpg | Bin 12229 -> 0 bytes 2 files changed, 1 insertion(+), 1 deletion(-) delete mode 100644 web/public/models/knowledge-icon.jpg diff --git a/web/components/knowledge/space-card.tsx b/web/components/knowledge/space-card.tsx index 93c28d247..37f63f0a8 100644 --- a/web/components/knowledge/space-card.tsx +++ b/web/components/knowledge/space-card.tsx @@ -84,7 +84,7 @@ export default function SpaceCard(props: IProps) { 2_>jH0xNf}p6F zFiZ&q9UUDT6Pp4DheDW{j#>DBU9K7dTogC}4uFT?0&utxcwER;Ge8DwCL-9-zY8)1 z4jvH+0VI-w-GGDtjR=PbkAMWZnglRFJRA-@4k-89=ch1SP9pv7bAe~td+t0--<||u zl(ccOzxG`}j}lpH6IEe8+g(2TvNHa3^}zVe-}Zjgo*vn496OhLy4{W6yVeIk638&7 zDzc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uP9Q^G{}8 zWcc6A1~)dx$ZkV>n_4|A(9-*COYBqT?5Ijkq62?x@+0L2qI5>yf7&=_N{oC;;`f`j z@fIbWXkJz8-+K{H>)8}k8}*y?(U3E>lQX}j4Cu>WrjrJ3*{~|g+M(v;U+IAKFDe+`UXAD$*YxbhFQXrdEvwshiKgvZKkM`GdYkk$CMZMceVc z6*0MV5nhe}j)T#N7{4SWXk5DaEA65SuKgX9s$_pXmBt^0GxB^|E*8-T47=2)P=*ca zFGN12bZ{6n5I9NkRmP~8*;_aF&p9$SjVy;)A!i^0_=6H$f}A5qq=)-|LR zK7>*UUDB_cVN_a*=71$|vql2{9IZV6v+sFeH(~B@bGHg3eo*tG7sS{2NkixR%FEP` zQ3NPlSus)3sT^g#^6e)3Nti-PDDL~Uh__ZoBjg3;MocH`-?)~aq{AU+)e&J(XU2=OQuC6gxc=BB%~EW*jji5Yu&y=6R{ z-@x_7#q7IG3NQ8tyKeQdlAdoo%BVmPiF?!>WqF)p;6C_|DD#&Ha!uU?#>|@&kBaf- z00>RCM<1KIa-AZd`{Fz6T#sJDU^^}~wI^OopdHg*{NPfd98yJJ8445Sz4b{G6?@FG zxaNTJDJFqT6g35! zs!90AFrvRl%W9ldW8q!5P)zgJM$|B3M#Y0ONVlRfxY^9oE{(yQ{Wen~F76$Qazx4! ziV^CbsNUPbcP}5rBE1oRZ}n(G59gtsTSzb=61_+JXNgx3pQc2y_tkLi&)z7 Date: Mon, 4 Mar 2024 13:40:11 +0800 Subject: [PATCH 6/6] style: Use the knowledge base icon uniformly --- web/components/knowledge/space-card.tsx | 14 +------------- web/utils/constants.ts | 4 ---- 2 files changed, 1 insertion(+), 17 deletions(-) diff --git a/web/components/knowledge/space-card.tsx b/web/components/knowledge/space-card.tsx index 37f63f0a8..1a10ebf5a 100644 --- a/web/components/knowledge/space-card.tsx +++ b/web/components/knowledge/space-card.tsx @@ -7,7 +7,6 @@ import DocPanel from './doc-panel'; import moment from 'moment'; import { apiInterceptors, delSpace, newDialogue } from '@/client/api'; import { useTranslation } from 'react-i18next'; -import { VECTOR_ICON_MAP } from '@/utils/constants'; import GptCard from '../common/gpt-card'; interface IProps { @@ -53,17 +52,6 @@ export default function SpaceCard(props: IProps) { } }; - const renderVectorIcon = (type: string) => { - return ( - llm - ); - }; return ( 'solar-10.7b-instruct-v1.0': { label: 'solar-10.7b-instruct-v1.0', icon: '/models/solar_logo.png' }, }; -export const VECTOR_ICON_MAP: Record = { - Chroma: '/models/chroma-logo.png', -}; - export const dbMapper: Record = { mysql: { label: 'MySQL', icon: '/icons/mysql.png', desc: 'Fast, reliable, scalable open-source relational database management system.' }, mssql: { label: 'MSSQL', icon: '/icons/mssql.png', desc: 'Powerful, scalable, secure relational database system by Microsoft.' },