@customize-agent/server 4.2.4 → 4.2.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.next/BUILD_ID +1 -1
- package/.next/build-manifest.json +65 -47
- package/.next/prerender-manifest.json +3 -3
- package/.next/routes-manifest.json +6 -0
- package/.next/server/chunks/1936.js +1 -1
- package/.next/server/chunks/208.js +61 -0
- package/.next/server/chunks/2405.js +87 -0
- package/.next/server/chunks/2484.js +1 -0
- package/.next/server/chunks/4680.js +48 -0
- package/.next/server/chunks/5284.js +36 -154
- package/.next/server/chunks/8204.js +1 -1
- package/.next/server/chunks/8661.js +1 -1
- package/.next/server/chunks/9227.js +1 -0
- package/.next/server/middleware-build-manifest.js +1 -1
- package/.next/server/pages/404.html +1 -1
- package/.next/server/pages/500.html +1 -1
- package/.next/server/pages/api/assets/generated/preview.js +1 -1
- package/.next/server/pages/api/assets/generated/preview.js.nft.json +1 -1
- package/.next/server/pages/api/assets/generated.js +1 -1
- package/.next/server/pages/api/assets/generated.js.nft.json +1 -1
- package/.next/server/pages/api/config/embedding/healthCheck.js.nft.json +1 -1
- package/.next/server/pages/api/documents/chapter/regenerate.js +1 -1
- package/.next/server/pages/api/documents/chapter/regenerate.js.nft.json +1 -1
- package/.next/server/pages/api/documents/export.js +3 -3
- package/.next/server/pages/api/documents/export.js.nft.json +1 -1
- package/.next/server/pages/api/documents/generate.js +2 -2
- package/.next/server/pages/api/documents/generate.js.nft.json +1 -1
- package/.next/server/pages/api/documents/generated/[id].js +1 -1
- package/.next/server/pages/api/documents/generated/[id].js.nft.json +1 -1
- package/.next/server/pages/api/documents/generated.js +1 -1
- package/.next/server/pages/api/documents/generated.js.nft.json +1 -1
- package/.next/server/pages/api/documents/templates.js +1 -1
- package/.next/server/pages/api/documents/templates.js.nft.json +1 -1
- package/.next/server/pages/api/jobs/[id].js +3 -3
- package/.next/server/pages/api/jobs/[id].js.nft.json +1 -1
- package/.next/server/pages/api/jobs.js +3 -3
- package/.next/server/pages/api/jobs.js.nft.json +1 -1
- package/.next/server/pages/api/kb/categories.js +2 -2
- package/.next/server/pages/api/kb/categories.js.nft.json +1 -1
- package/.next/server/pages/api/kb/duplicates.js +2 -2
- package/.next/server/pages/api/kb/duplicates.js.nft.json +1 -1
- package/.next/server/pages/api/kb/evaluate.js +2 -2
- package/.next/server/pages/api/kb/evaluate.js.nft.json +1 -1
- package/.next/server/pages/api/kb/files/detail.js +3 -3
- package/.next/server/pages/api/kb/files/detail.js.nft.json +1 -1
- package/.next/server/pages/api/kb/files/open.js +2 -2
- package/.next/server/pages/api/kb/files/open.js.nft.json +1 -1
- package/.next/server/pages/api/kb/files/preview-pdf-page.js +2 -2
- package/.next/server/pages/api/kb/files/preview-pdf-page.js.nft.json +1 -1
- package/.next/server/pages/api/kb/files/reindex.js +1 -1
- package/.next/server/pages/api/kb/files/reindex.js.nft.json +1 -1
- package/.next/server/pages/api/kb/files/search.js +2 -2
- package/.next/server/pages/api/kb/files/search.js.nft.json +1 -1
- package/.next/server/pages/api/kb/files/tree.js +2 -2
- package/.next/server/pages/api/kb/files/tree.js.nft.json +1 -1
- package/.next/server/pages/api/kb/files.js +3 -3
- package/.next/server/pages/api/kb/files.js.nft.json +1 -1
- package/.next/server/pages/api/kb/ignore.js +2 -2
- package/.next/server/pages/api/kb/ignore.js.nft.json +1 -1
- package/.next/server/pages/api/kb/intelligence.js +1 -1
- package/.next/server/pages/api/kb/intelligence.js.nft.json +1 -1
- package/.next/server/pages/api/kb/operations.js +3 -3
- package/.next/server/pages/api/kb/operations.js.nft.json +1 -1
- package/.next/server/pages/api/kb/reindex.js +1 -1
- package/.next/server/pages/api/kb/reindex.js.nft.json +1 -1
- package/.next/server/pages/api/kb/search.js +2 -2
- package/.next/server/pages/api/kb/search.js.nft.json +1 -1
- package/.next/server/pages/api/kb/stats.js +2 -2
- package/.next/server/pages/api/kb/stats.js.nft.json +1 -1
- package/.next/server/pages/api/kb/tags.js +2 -2
- package/.next/server/pages/api/kb/tags.js.nft.json +1 -1
- package/.next/server/pages/api/kb/upload/complete.js +1 -1
- package/.next/server/pages/api/kb/upload/complete.js.nft.json +1 -1
- package/.next/server/pages/api/kb/upload/progress.js +3 -3
- package/.next/server/pages/api/kb/upload/progress.js.nft.json +1 -1
- package/.next/server/pages/api/kb/upload.js +1 -1
- package/.next/server/pages/api/kb/upload.js.nft.json +1 -1
- package/.next/server/pages/api/prompt.js +1 -1
- package/.next/server/pages/api/prompt.js.nft.json +1 -1
- package/.next/server/pages/api/template-references.js +1 -0
- package/.next/server/pages/api/template-references.js.nft.json +1 -0
- package/.next/server/pages/asset-library.html +1 -1
- package/.next/server/pages/document-roles.html +1 -1
- package/.next/server/pages/documents.html +1 -1
- package/.next/server/pages/guide.html +1 -1
- package/.next/server/pages/index.html +1 -1
- package/.next/server/pages/knowledge/file-detail.html +1 -1
- package/.next/server/pages/knowledge/files.html +1 -1
- package/.next/server/pages/knowledge/manage.html +1 -1
- package/.next/server/pages/knowledge.html +1 -1
- package/.next/server/pages/models.html +1 -1
- package/.next/server/pages/overview.html +1 -1
- package/.next/server/pages/prompt.html +1 -1
- package/.next/server/pages/settings.html +1 -1
- package/.next/server/pages/system/logs.html +1 -1
- package/.next/server/pages/template-references.html +1 -0
- package/.next/server/pages/template-references.js.nft.json +1 -0
- package/.next/server/pages-manifest.json +28 -26
- package/.next/static/XgGKtqmwpahXYicc2ieXW/_buildManifest.js +1 -0
- package/.next/static/chunks/102-881dcc464f983c89.js +41 -0
- package/.next/static/chunks/{7-20bcc985742a9ae1.js → 224-790cf01fcf6820ee.js} +2 -2
- package/.next/static/chunks/260-244c94eacd903620.js +1 -0
- package/.next/static/chunks/289-42781fb699646699.js +38 -0
- package/.next/static/chunks/592-c667dfd191c1ea0c.js +24 -0
- package/.next/static/chunks/69-34d57b77fd2eed20.js +1 -0
- package/.next/static/chunks/700-5d29b0475311f590.js +1 -0
- package/.next/static/chunks/788-e98701da4d6ca319.js +1 -0
- package/.next/static/chunks/{795-cd94e8d4e9768eb9.js → 795-61fe67c7203b6001.js} +1 -1
- package/.next/static/chunks/930-0436dcaa92fb41f6.js +1 -0
- package/.next/static/chunks/986-771dc425e7b25964.js +8 -0
- package/.next/static/chunks/pages/{_app-1511aa64f9299003.js → _app-55467a8f660aa065.js} +17 -17
- package/.next/static/chunks/pages/{asset-library-a1047694e888e655.js → asset-library-f6319fc04559e43d.js} +1 -1
- package/.next/static/chunks/pages/document-roles-4ccb2db16dc4b63c.js +1 -0
- package/.next/static/chunks/pages/documents-f9880371363a534c.js +1 -0
- package/.next/static/chunks/pages/guide-a73d8eea2cba97e1.js +1 -0
- package/.next/static/chunks/pages/knowledge/{file-detail-02cd5d87cd1d1c5d.js → file-detail-3a04722f7720abf5.js} +1 -1
- package/.next/static/chunks/pages/knowledge/files-3ba329d8e6335929.js +1 -0
- package/.next/static/chunks/pages/knowledge/manage-558987c599dc4cd5.js +1 -0
- package/.next/static/chunks/pages/{models-aa250428e72433df.js → models-e6f755b68bff8515.js} +1 -1
- package/.next/static/chunks/pages/prompt-839287c514595765.js +1 -0
- package/.next/static/chunks/pages/{settings-810eb1a6cf1a6b02.js → settings-17632b1471b4862f.js} +1 -1
- package/.next/static/chunks/pages/system/logs-2e849bcdf371d791.js +1 -0
- package/.next/static/chunks/pages/template-references-68b9bd99fc910922.js +1 -0
- package/.next/static/css/10c378422f47671a.css +1 -0
- package/messages/en-US.json +57 -1
- package/messages/zh-CN.json +57 -1
- package/package.json +10 -11
- package/scripts/kb-index-worker.cjs +8 -90
- package/.next/package.json +0 -1
- package/.next/server/chunks/6071.js +0 -69
- package/.next/static/QO5Rc5Wqv5M0mKhed3tM3/_buildManifest.js +0 -1
- package/.next/static/chunks/187-358527d7061417bf.js +0 -1
- package/.next/static/chunks/230-8184e70eae35f2bb.js +0 -1
- package/.next/static/chunks/289-35ac595388bbd018.js +0 -78
- package/.next/static/chunks/563-b12f299d34bb9e44.js +0 -1
- package/.next/static/chunks/665-88e20299084b9e73.js +0 -1
- package/.next/static/chunks/788-3afeb069ed706ac0.js +0 -1
- package/.next/static/chunks/957-7c7f05f1c2ccfb96.js +0 -8
- package/.next/static/chunks/pages/document-roles-5620a98d6312f81c.js +0 -1
- package/.next/static/chunks/pages/documents-a2ccb31a69a78d98.js +0 -1
- package/.next/static/chunks/pages/guide-b847733a9a832c2c.js +0 -1
- package/.next/static/chunks/pages/knowledge/files-0d9a0d407b38a0a3.js +0 -1
- package/.next/static/chunks/pages/knowledge/manage-a00bb7fc6a76f820.js +0 -1
- package/.next/static/chunks/pages/prompt-224af05519ef8304.js +0 -1
- package/.next/static/chunks/pages/system/logs-6f45ef8d862759a2.js +0 -1
- package/.next/static/css/3f9e41b5c0ba95f7.css +0 -1
- /package/.next/static/{QO5Rc5Wqv5M0mKhed3tM3 → XgGKtqmwpahXYicc2ieXW}/_ssgManifest.js +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[46],{77305:(e,a,r)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/models",function(){return r(82744)}])},82744:(e,a,r)=>{"use strict";r.r(a),r.d(a,{default:()=>z});var l=r(65321),s=r(97109),o=r(48321),t=r(35292),i=r(33442);let{Title:c,Text:n}=t.A;function d(e){let{title:a,description:r,extra:s,bottomContent:o}=e;return(0,l.jsxs)("div",{className:"mb-6 animateFadeIn",children:[(0,l.jsxs)("div",{className:"flex flex-col sm:flex-row sm:items-end justify-between gap-4",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)(c,{level:4,style:{margin:0,fontWeight:700,letterSpacing:"-0.01em"},children:a}),r&&(0,l.jsx)(n,{type:"secondary",className:"mt-1 block text-sm",children:r})]}),s&&(0,l.jsx)(i.A,{className:"w-full sm:w-auto overflow-x-auto pb-1 sm:pb-0",size:"middle",wrap:!1,children:s})]}),o&&(0,l.jsx)("div",{className:"mt-4",children:o})]})}var m=r(17807),x=r(88762),p=r(85114),v=r(26171),b=r(11702),h=r(50883),u=r(7576),g=r(94992),y=r(34052),j=r(63455),f=r(56985),N=r(44534),A=r(54746),w=r(29071),k=r(59188),C=r(4216),T=r(13114),S=r(99650),K=r(58209),B=r(76981),P=r(61825),E=r(6578);let I=[{labelKey:"models.openAICompatible",value:"openai"},{labelKey:"models.anthropic",value:"anthropic"},{labelKey:"models.google",value:"google"},{labelKey:"models.ollama",value:"ollama"},{labelKey:"models.openRouter",value:"openrouter"}],H=[{key:"reader",labelKey:"models.tierReader",descKey:"models.tierReaderDesc"},{key:"reasoning",labelKey:"models.tierReasoning",descKey:"models.tierReasoningDesc"},{key:"action",labelKey:"models.tierAction",descKey:"models.tierActionDesc"}],U=[{key:"imageGeneration",labelKey:"models.imageGeneration"},{key:"imageUnderstanding",labelKey:"models.imageUnderstanding"},{key:"fileUnderstanding",labelKey:"models.fileUnderstanding"},{key:"audio",labelKey:"models.audioCapability"},{key:"video",labelKey:"models.videoCapability"}],_={enabled:!1,allowProjectFacts:!1,maxQueriesPerChapter:2,maxResultsPerQuery:3,trustedDomains:[]};function z(){let e=(0,o.Vr)(),{message:a}=m.A.useApp(),[r,t]=(0,s.useState)(!0),[c,n]=(0,s.useState)([]),[z,F]=(0,s.useState)(null),[R,D]=(0,s.useState)({provider:"transformers-local",model:"BAAI/bge-small-zh-v1.5",dimensions:512}),[M,O]=(0,s.useState)(_),[G,Q]=(0,s.useState)(!1),[q,L]=(0,s.useState)(!1),[X,Z]=(0,s.useState)(!1),[V,W]=(0,s.useState)(null),[J,Y]=(0,s.useState)(null),[$,ee]=(0,s.useState)({}),[ea,er]=(0,s.useState)(!1),[el,es]=(0,s.useState)(!1),[eo,et]=(0,s.useState)(""),[ei,ec]=(0,s.useState)(""),[en,ed]=(0,s.useState)(""),[em,ex]=(0,s.useState)(""),[ep,ev]=(0,s.useState)("openai"),[eb,eh]=(0,s.useState)(!1),[eu,eg]=(0,s.useState)({}),[ey,ej]=(0,s.useState)(!1),[ef,eN]=(0,s.useState)(!1),eA=async()=>{t(!0);try{let[e,a,r,l]=await Promise.all([(0,E.Z3)().catch(()=>[]),(0,E.zr)().catch(()=>null),(0,E.II)().catch(()=>({provider:"transformers-local",model:"BAAI/bge-small-zh-v1.5",dimensions:512})),(0,E.jQ)().catch(()=>_)]);n(e),F(a),D(r),O(l)}catch(r){a.error(e("common.error"))}finally{t(!1)}};(0,s.useEffect)(()=>{eA()},[]);let ew=async e=>{var a,r;es(!0),et(e.name),ec(e.name),ed(""),ex(e.baseUrl||""),ev(e.protocol||e.detectedProtocol||"openai"),eg(e.capabilities||{}),ej(!!(null==(a=e.capabilities)?void 0:a.webSearch));try{let a=await (0,E.Bh)(e.name);ed(a.apiKey?"••••••••":""),ex(a.baseUrl||""),eg(a.capabilities||{}),ej(!!(null==(r=a.capabilities)?void 0:r.webSearch))}catch(e){}er(!0)},ek=async()=>{if(ei.trim()){eN(!0);try{let r=el&&en.includes("•")?void 0:en||void 0,l={...eu,webSearch:ey};await (0,E._m)(ei.trim(),{oldName:el?eo:void 0,apiKey:r,baseUrl:em||void 0,protocol:ep,directEndpoint:eb,capabilities:l}),er(!1),await eA(),a.success(e("common.success"))}catch(r){a.error(e("common.error"))}finally{eN(!1)}}},eC=async r=>{try{await (0,E.h1)(r),await eA(),a.success(e("common.success"))}catch(r){a.error(e("common.error"))}},eT=async r=>{Y(r);try{let l=await (0,E.bZ)(r);ee(e=>({...e,[r]:l.success}));let s=l.success?e("models.connected"):"".concat(e("models.connectionFailed")).concat(l.message?":".concat(l.message):"").concat(l.requestId?" (".concat(l.requestId,")"):"");a[l.success?"success":"error"](s)}catch(l){ee(e=>({...e,[r]:!1})),a.error(l instanceof Error?l.message:e("models.connectionFailed"))}finally{Y(null)}},eS=async(r,l)=>{if(!z)return;let s={...z},o=s[r];if(!l){o.active="",F(s);try{await (0,E.aP)(s)}catch(r){a.error(e("common.error"))}return}let[t,i]=l.includes(":")?l.split(":"):[l,l];o.active=i,o.list.some(e=>e.name===i&&e.provider===t)||o.list.push({name:i,provider:t}),F(s);try{await (0,E.aP)(s)}catch(r){a.error(e("common.error"))}},eK=async()=>{L(!0);try{let r=await (0,E.dd)(R);D(r),W(null),a.success(e("common.success"))}catch(r){a.error(e("common.error"))}finally{L(!1)}},eB=async()=>{Z(!0);try{let r=await (0,E.u6)();W(r.success),a[r.success?"success":"error"](r.message||(r.success?e("models.connected"):e("models.connectionFailed")))}catch(e){W(!1)}finally{Z(!1)}};return r?(0,l.jsxs)("div",{className:"space-y-6",children:[(0,l.jsx)(x.A,{active:!0,title:!0,paragraph:{rows:1}}),(0,l.jsx)("div",{className:"p-4 bg-[var(--colorBgHover)] rounded-xl border border-[var(--borderColor)]",children:(0,l.jsx)(x.A,{active:!0,paragraph:{rows:6}})}),(0,l.jsx)("div",{className:"p-4 bg-[var(--colorBgHover)] rounded-xl border border-[var(--borderColor)]",children:(0,l.jsx)(x.A,{active:!0,paragraph:{rows:4}})}),(0,l.jsx)("div",{className:"p-4 bg-[var(--colorBgHover)] rounded-xl border border-[var(--borderColor)]",children:(0,l.jsx)(x.A,{active:!0,paragraph:{rows:3}})})]}):(0,l.jsxs)("div",{className:"space-y-6",children:[(0,l.jsx)(d,{title:e("models.title"),description:e("models.description"),extra:(0,l.jsx)(p.Ay,{type:"primary",icon:(0,l.jsx)(A.A,{}),onClick:()=>{es(!1),et(""),ec(""),ed(""),ex(""),ev("openai"),eh(!1),eg({}),ej(!1),er(!0)},children:e("models.addModel")})}),(0,l.jsxs)("div",{children:[(0,l.jsx)("div",{className:"flex items-center justify-between mb-6",children:(0,l.jsxs)("h2",{className:"text-base font-semibold text-[var(--colorText)] tracking-wide",children:[e("models.modelList")," ",(0,l.jsxs)("span",{className:"text-[var(--colorTextTertiary)] ml-2 font-normal",children:["(",c.length,")"]})]})}),0===c.length?(0,l.jsx)("div",{className:"text-center py-12 bg-[var(--colorBgHover)] rounded-2xl border border-dashed border-[var(--borderColorStrong)] text-[var(--colorTextTertiary)] text-sm",children:e("models.noProviders")}):(0,l.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:c.map(a=>{var r;return(0,l.jsxs)("div",{className:"group p-5 rounded-2xl border border-transparent hover:border-[var(--borderColorStrong)] bg-[var(--colorBgContainer)] hover:bg-[var(--colorBgHover)] hover:shadow-sm flex flex-col cursor-pointer transition-all duration-300",children:[(0,l.jsxs)("div",{className:"flex items-start justify-between gap-3 mb-4 min-w-0",children:[(0,l.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,l.jsx)("div",{className:"font-bold text-base text-[var(--colorText)] truncate mb-1",children:a.name}),(0,l.jsxs)("div",{className:"text-xs text-[var(--colorTextTertiary)] flex items-center gap-1 uppercase tracking-wider font-semibold",children:[(0,l.jsx)(w.A,{})," ",a.protocol||a.detectedProtocol||"openai"]})]}),(0,l.jsxs)(i.A,{size:0,className:"-mr-2 opacity-0 group-hover:opacity-100 transition-opacity",children:[(0,l.jsx)(p.Ay,{type:"text",size:"small",loading:J===a.name,onClick:e=>{e.stopPropagation(),eT(a.name)},icon:!0===$[a.name]?(0,l.jsx)(k.A,{className:"text-[var(--colorOk)]"}):!1===$[a.name]?(0,l.jsx)(C.A,{className:"text-[var(--colorDanger)]"}):(0,l.jsx)(T.A,{className:"text-[var(--colorTextSecondary)]"})}),(0,l.jsx)(p.Ay,{type:"text",size:"small",icon:(0,l.jsx)(S.A,{className:"text-[var(--colorTextSecondary)]"}),onClick:e=>{e.stopPropagation(),ew(a)}}),(0,l.jsx)(v.A,{title:e("models.deleteProviderConfirm"),onConfirm:e=>{null==e||e.stopPropagation(),eC(a.name)},onCancel:e=>null==e?void 0:e.stopPropagation(),children:(0,l.jsx)(p.Ay,{type:"text",size:"small",danger:!0,icon:(0,l.jsx)(K.A,{}),onClick:e=>e.stopPropagation()})})]})]}),(0,l.jsxs)("div",{className:"flex flex-col gap-3 mt-auto pt-4 border-t border-[var(--borderColor)]",children:[(0,l.jsxs)("div",{className:"flex items-center justify-between text-xs text-[var(--colorTextSecondary)]",children:[(0,l.jsxs)("span",{className:"flex items-center gap-1",children:[(0,l.jsx)(B.A,{})," ",e("models.apiKey")]}),(0,l.jsx)("span",{className:"font-mono text-[var(--colorTextTertiary)]",children:a.hasApiKey?"••••••••":e("models.none")})]}),a.baseUrl&&(0,l.jsxs)("div",{className:"flex items-center justify-between text-xs text-[var(--colorTextSecondary)]",children:[(0,l.jsxs)("span",{className:"flex items-center gap-1",children:[(0,l.jsx)(P.A,{})," URL"]}),(0,l.jsx)("span",{className:"truncate max-w-[120px] font-mono text-[var(--colorTextTertiary)]",title:a.baseUrl,children:a.baseUrl.replace(/^https?:\/\//,"")})]}),(0,l.jsxs)("div",{className:"flex flex-wrap gap-1 mt-2",children:[U.filter(e=>{var r;return null==(r=a.capabilities)?void 0:r[e.key]}).map(a=>(0,l.jsx)(b.A,{color:"blue",bordered:!1,className:"m-0 text-[10px] bg-[var(--colorBrand)]/5 text-[var(--colorBrand)] leading-[18px]",children:e(a.labelKey)},a.key)),(null==(r=a.capabilities)?void 0:r.webSearch)&&(0,l.jsx)(b.A,{color:"green",bordered:!1,className:"m-0 text-[10px] leading-[18px]",children:e("models.webEnhancement")})]})]})]},a.name)})})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("h2",{className:"text-base font-semibold text-[var(--colorText)] tracking-wide mb-6",children:e("models.embeddingConfig")}),(0,l.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-8",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)("div",{className:"text-xs font-semibold uppercase tracking-wider mb-2 text-[var(--colorTextTertiary)]",children:e("models.embeddingProvider")}),(0,l.jsx)(h.A,{value:R.provider,className:"w-full h-10",variant:"borderless",style:{background:"var(--colorBgHover)",borderRadius:"8px"},options:[{label:e("models.localRecommended"),value:"transformers-local"},{label:e("models.externalAdvanced"),value:"openai-compatible"}],onChange:e=>D(a=>({...a,provider:e,model:"transformers-local"===e?a.model||"BAAI/bge-small-zh-v1.5":a.model,dimensions:"transformers-local"===e?512:a.dimensions||1024}))})]}),"openai-compatible"===R.provider&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("div",{children:[(0,l.jsx)("div",{className:"text-xs font-semibold uppercase tracking-wider mb-2 text-[var(--colorTextTertiary)]",children:e("models.baseUrl")}),(0,l.jsx)(u.A,{className:"h-10 px-4 bg-[var(--colorBgHover)]",value:R.baseUrl,onChange:e=>D(a=>({...a,baseUrl:e.target.value})),placeholder:"http://localhost:11434/v1"})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("div",{className:"text-xs font-semibold uppercase tracking-wider mb-2 text-[var(--colorTextTertiary)]",children:e("models.model")}),(0,l.jsx)(u.A,{className:"h-10 px-4 bg-[var(--colorBgHover)]",value:R.model,onChange:e=>D(a=>({...a,model:e.target.value})),placeholder:"bge-m3"})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("div",{className:"text-xs font-semibold uppercase tracking-wider mb-2 text-[var(--colorTextTertiary)]",children:e("models.apiKey")}),(0,l.jsx)(u.A.Password,{className:"h-10 px-4 bg-[var(--colorBgHover)]",value:R.apiKey,onFocus:()=>{var e;(null==(e=R.apiKey)?void 0:e.includes("•"))&&D(e=>({...e,apiKey:""}))},onChange:e=>D(a=>({...a,apiKey:e.target.value})),placeholder:e("models.optional")})]})]}),"transformers-local"===R.provider&&(0,l.jsxs)("div",{children:[(0,l.jsx)("div",{className:"text-xs font-semibold uppercase tracking-wider mb-2 text-[var(--colorTextTertiary)]",children:e("models.model")}),(0,l.jsx)(u.A,{className:"h-10 px-4 bg-[var(--colorBgHover)]",value:R.model,onChange:e=>D(a=>({...a,model:e.target.value})),placeholder:"BAAI/bge-small-zh-v1.5"})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("div",{className:"text-xs font-semibold uppercase tracking-wider mb-2 text-[var(--colorTextTertiary)]",children:e("models.dimensions")}),(0,l.jsx)(g.A,{className:"w-full h-10 px-2 bg-[var(--colorBgHover)] border-transparent flex items-center",min:1,value:R.dimensions,onChange:e=>D(a=>({...a,dimensions:Number(e||("transformers-local"===a.provider?512:1024))}))})]})]}),(0,l.jsxs)("div",{className:"mt-8 flex gap-3",children:[(0,l.jsx)(p.Ay,{type:"primary",className:"h-10 px-6 font-medium shadow-none",loading:q,onClick:()=>{eK()},children:e("models.saveEmbedding")}),(0,l.jsx)(p.Ay,{className:"h-10 px-6 font-medium shadow-none bg-[var(--colorBgHover)] border-transparent hover:border-[var(--borderColorStrong)]",loading:X,onClick:()=>{eB()},children:e("models.testEmbedding")}),(0,l.jsxs)("div",{className:"ml-auto flex items-center h-10 gap-2",children:[(0,l.jsx)(b.A,{color:"blue",bordered:!1,className:"m-0 bg-[var(--colorBgHover)] text-[var(--colorTextSecondary)]",children:"transformers-local"===R.provider?e("models.localEmbedding"):e("models.openAICompatible")}),!0===V&&(0,l.jsx)(b.A,{color:"success",bordered:!1,className:"m-0",icon:(0,l.jsx)(k.A,{}),children:e("models.connected")}),!1===V&&(0,l.jsx)(b.A,{color:"error",bordered:!1,className:"m-0",icon:(0,l.jsx)(C.A,{}),children:e("models.connectionFailed")})]})]})]}),z&&(0,l.jsx)(l.Fragment,{children:(0,l.jsxs)("div",{className:"mb-6",children:[(0,l.jsx)("h2",{className:"text-base font-semibold text-[var(--colorText)] tracking-wide mb-6",children:e("models.modelTiers")}),(0,l.jsx)("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-8",children:H.map(a=>{let{key:r,labelKey:s,descKey:o}=a,t=z[r],i=t.list.map(e=>({label:"".concat(e.provider," / ").concat(e.name),value:"".concat(e.provider,":").concat(e.name)})),n=c.filter(e=>!t.list.some(a=>a.provider===e.name)).map(e=>({label:e.name,value:"".concat(e.name,":").concat(e.name)})),d=t.active?t.list.find(e=>e.name===t.active):null;return(0,l.jsxs)("div",{className:"p-6 bg-[var(--colorBgHover)] rounded-xl flex flex-col transition-colors border border-transparent hover:border-[var(--borderColorStrong)]",children:[(0,l.jsx)("div",{className:"text-sm font-semibold text-[var(--colorText)] uppercase tracking-wider mb-2",children:e(s)}),(0,l.jsx)("div",{className:"text-xs text-[var(--colorTextTertiary)] mb-5 leading-relaxed flex-1",children:e(o)}),(0,l.jsx)(h.A,{value:t.active?"".concat((null==d?void 0:d.provider)||"",":").concat(t.active):void 0,onChange:e=>{eS(r,e)},allowClear:!0,placeholder:e("models.selectModelPlaceholder"),className:"w-full h-10",variant:"borderless",style:{background:"var(--colorBgElevated)",borderRadius:"8px"},options:[...i,...n]}),d&&(()=>{let a=c.find(e=>e.name===d.provider);return(0,l.jsxs)("div",{className:"mt-4 px-4 py-3 bg-[var(--colorBgElevated)] rounded-lg border border-[var(--borderColor)] flex items-center gap-3 transition-colors",children:[(0,l.jsx)(T.A,{className:"text-[var(--colorBrand)] text-base shrink-0"}),(0,l.jsx)("span",{className:"text-sm font-medium flex-1 min-w-0 truncate text-[var(--colorText)]",children:d.provider}),(null==a?void 0:a.capabilities)&&U.filter(e=>a.capabilities[e.key]).length>0&&(0,l.jsx)("div",{className:"flex gap-1 shrink-0",children:U.filter(e=>a.capabilities[e.key]).slice(0,2).map(a=>(0,l.jsx)(b.A,{color:"blue",bordered:!1,className:"m-0 text-[10px] bg-[var(--colorBrand)]/5 text-[var(--colorBrand)] leading-[18px]",children:e(a.labelKey)},a.key))}),(0,l.jsx)(b.A,{color:"success",bordered:!1,className:"m-0 text-[10px] leading-[18px] shrink-0 uppercase",children:e("models.active")})]})})()]},r)})})]})}),(0,l.jsx)(y.A,{title:el?e("models.editModel"):e("models.addModel"),open:ea,onClose:()=>er(!1),size:"large",styles:{body:{padding:"24px 32px"},header:{padding:"16px 32px",borderBottom:"1px solid var(--colorBorderSecondary)"}},extra:(0,l.jsx)(p.Ay,{type:"primary",loading:ef,onClick:()=>{ek()},children:e("common.save")}),children:(0,l.jsxs)(j.A,{layout:"vertical",children:[(0,l.jsx)(j.A.Item,{label:e("models.modelName"),children:(0,l.jsx)(u.A,{value:ei,onChange:e=>ec(e.target.value),placeholder:e("models.modelNamePlaceholder")})}),(0,l.jsx)(j.A.Item,{label:e("models.apiKey"),help:el?e("models.apiKeyEditHint"):void 0,children:(0,l.jsx)(u.A.Password,{value:en,onFocus:()=>{el&&en.includes("•")&&ed("")},onChange:e=>ed(e.target.value),placeholder:el?e("models.apiKeyEditPlaceholder"):"sk-..."})}),(0,l.jsx)(j.A.Item,{label:e("models.baseUrl"),children:(0,l.jsx)(u.A,{value:em,onChange:e=>ex(e.target.value),placeholder:"https://api.openai.com/v1"})}),(0,l.jsx)(j.A.Item,{label:e("models.protocol"),children:(0,l.jsx)(h.A,{value:ep,onChange:ev,options:I.map(a=>({label:e(a.labelKey),value:a.value}))})}),(0,l.jsx)(j.A.Item,{label:e("models.directEndpoint"),children:(0,l.jsx)(f.A,{checked:eb,onChange:e=>eh(e.target.checked),children:e("models.directEndpointDesc")})}),(0,l.jsxs)(j.A.Item,{label:e("models.webEnhancement"),children:[(0,l.jsx)(N.A,{checked:ey,onChange:ej}),(0,l.jsx)("span",{className:"ml-3 text-xs text-[var(--colorTextSecondary)]",children:e("models.webEnhancementDesc")})]}),(0,l.jsx)(j.A.Item,{label:e("models.capabilities"),children:(0,l.jsx)(f.A.Group,{value:U.filter(e=>eu[e.key]).map(e=>e.key),options:U.map(a=>({label:e(a.labelKey),value:a.key})),onChange:e=>eg(Object.fromEntries(U.map(a=>[a.key,e.includes(a.key)])))})})]})})]})}}},e=>{e.O(0,[717,883,44,195,455,827,636,593,792],()=>e(e.s=77305)),_N_E=e.O()}]);
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[46],{77305:(e,a,r)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/models",function(){return r(82744)}])},82744:(e,a,r)=>{"use strict";r.r(a),r.d(a,{default:()=>z});var l=r(65321),s=r(97109),o=r(47085),t=r(35292),i=r(33442);let{Title:c,Text:n}=t.A;function d(e){let{title:a,description:r,extra:s,bottomContent:o}=e;return(0,l.jsxs)("div",{className:"mb-6 animateFadeIn",children:[(0,l.jsxs)("div",{className:"flex flex-col sm:flex-row sm:items-end justify-between gap-4",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)(c,{level:4,style:{margin:0,fontWeight:700,letterSpacing:"-0.01em"},children:a}),r&&(0,l.jsx)(n,{type:"secondary",className:"mt-1 block text-sm",children:r})]}),s&&(0,l.jsx)(i.A,{className:"w-full sm:w-auto overflow-x-auto pb-1 sm:pb-0",size:"middle",wrap:!1,children:s})]}),o&&(0,l.jsx)("div",{className:"mt-4",children:o})]})}var m=r(17807),x=r(88762),p=r(85114),v=r(26171),b=r(11702),h=r(50883),u=r(7576),g=r(94992),y=r(34052),j=r(63455),f=r(56985),N=r(44534),A=r(54746),w=r(29071),k=r(59188),C=r(4216),T=r(13114),S=r(99650),K=r(58209),B=r(76981),P=r(61825),E=r(6578);let I=[{labelKey:"models.openAICompatible",value:"openai"},{labelKey:"models.anthropic",value:"anthropic"},{labelKey:"models.google",value:"google"},{labelKey:"models.ollama",value:"ollama"},{labelKey:"models.openRouter",value:"openrouter"}],H=[{key:"reader",labelKey:"models.tierReader",descKey:"models.tierReaderDesc"},{key:"reasoning",labelKey:"models.tierReasoning",descKey:"models.tierReasoningDesc"},{key:"action",labelKey:"models.tierAction",descKey:"models.tierActionDesc"}],U=[{key:"imageGeneration",labelKey:"models.imageGeneration"},{key:"imageUnderstanding",labelKey:"models.imageUnderstanding"},{key:"fileUnderstanding",labelKey:"models.fileUnderstanding"},{key:"audio",labelKey:"models.audioCapability"},{key:"video",labelKey:"models.videoCapability"}],_={enabled:!1,allowProjectFacts:!1,maxQueriesPerChapter:2,maxResultsPerQuery:3,trustedDomains:[]};function z(){let e=(0,o.Vr)(),{message:a}=m.A.useApp(),[r,t]=(0,s.useState)(!0),[c,n]=(0,s.useState)([]),[z,F]=(0,s.useState)(null),[R,D]=(0,s.useState)({provider:"transformers-local",model:"BAAI/bge-small-zh-v1.5",dimensions:512}),[M,O]=(0,s.useState)(_),[G,Q]=(0,s.useState)(!1),[q,L]=(0,s.useState)(!1),[X,Z]=(0,s.useState)(!1),[V,W]=(0,s.useState)(null),[J,Y]=(0,s.useState)(null),[$,ee]=(0,s.useState)({}),[ea,er]=(0,s.useState)(!1),[el,es]=(0,s.useState)(!1),[eo,et]=(0,s.useState)(""),[ei,ec]=(0,s.useState)(""),[en,ed]=(0,s.useState)(""),[em,ex]=(0,s.useState)(""),[ep,ev]=(0,s.useState)("openai"),[eb,eh]=(0,s.useState)(!1),[eu,eg]=(0,s.useState)({}),[ey,ej]=(0,s.useState)(!1),[ef,eN]=(0,s.useState)(!1),eA=async()=>{t(!0);try{let[e,a,r,l]=await Promise.all([(0,E.Z3)().catch(()=>[]),(0,E.zr)().catch(()=>null),(0,E.II)().catch(()=>({provider:"transformers-local",model:"BAAI/bge-small-zh-v1.5",dimensions:512})),(0,E.jQ)().catch(()=>_)]);n(e),F(a),D(r),O(l)}catch(r){a.error(e("common.error"))}finally{t(!1)}};(0,s.useEffect)(()=>{eA()},[]);let ew=async e=>{var a,r;es(!0),et(e.name),ec(e.name),ed(""),ex(e.baseUrl||""),ev(e.protocol||e.detectedProtocol||"openai"),eg(e.capabilities||{}),ej(!!(null==(a=e.capabilities)?void 0:a.webSearch));try{let a=await (0,E.Bh)(e.name);ed(a.apiKey?"••••••••":""),ex(a.baseUrl||""),eg(a.capabilities||{}),ej(!!(null==(r=a.capabilities)?void 0:r.webSearch))}catch(e){}er(!0)},ek=async()=>{if(ei.trim()){eN(!0);try{let r=el&&en.includes("•")?void 0:en||void 0,l={...eu,webSearch:ey};await (0,E._m)(ei.trim(),{oldName:el?eo:void 0,apiKey:r,baseUrl:em||void 0,protocol:ep,directEndpoint:eb,capabilities:l}),er(!1),await eA(),a.success(e("common.success"))}catch(r){a.error(e("common.error"))}finally{eN(!1)}}},eC=async r=>{try{await (0,E.h1)(r),await eA(),a.success(e("common.success"))}catch(r){a.error(e("common.error"))}},eT=async r=>{Y(r);try{let l=await (0,E.bZ)(r);ee(e=>({...e,[r]:l.success}));let s=l.success?e("models.connected"):"".concat(e("models.connectionFailed")).concat(l.message?":".concat(l.message):"").concat(l.requestId?" (".concat(l.requestId,")"):"");a[l.success?"success":"error"](s)}catch(l){ee(e=>({...e,[r]:!1})),a.error(l instanceof Error?l.message:e("models.connectionFailed"))}finally{Y(null)}},eS=async(r,l)=>{if(!z)return;let s={...z},o=s[r];if(!l){o.active="",F(s);try{await (0,E.aP)(s)}catch(r){a.error(e("common.error"))}return}let[t,i]=l.includes(":")?l.split(":"):[l,l];o.active=i,o.list.some(e=>e.name===i&&e.provider===t)||o.list.push({name:i,provider:t}),F(s);try{await (0,E.aP)(s)}catch(r){a.error(e("common.error"))}},eK=async()=>{L(!0);try{let r=await (0,E.dd)(R);D(r),W(null),a.success(e("common.success"))}catch(r){a.error(e("common.error"))}finally{L(!1)}},eB=async()=>{Z(!0);try{let r=await (0,E.u6)();W(r.success),a[r.success?"success":"error"](r.message||(r.success?e("models.connected"):e("models.connectionFailed")))}catch(e){W(!1)}finally{Z(!1)}};return r?(0,l.jsxs)("div",{className:"space-y-6",children:[(0,l.jsx)(x.A,{active:!0,title:!0,paragraph:{rows:1}}),(0,l.jsx)("div",{className:"p-4 bg-[var(--colorBgHover)] rounded-xl border border-[var(--borderColor)]",children:(0,l.jsx)(x.A,{active:!0,paragraph:{rows:6}})}),(0,l.jsx)("div",{className:"p-4 bg-[var(--colorBgHover)] rounded-xl border border-[var(--borderColor)]",children:(0,l.jsx)(x.A,{active:!0,paragraph:{rows:4}})}),(0,l.jsx)("div",{className:"p-4 bg-[var(--colorBgHover)] rounded-xl border border-[var(--borderColor)]",children:(0,l.jsx)(x.A,{active:!0,paragraph:{rows:3}})})]}):(0,l.jsxs)("div",{className:"space-y-6",children:[(0,l.jsx)(d,{title:e("models.title"),description:e("models.description"),extra:(0,l.jsx)(p.Ay,{type:"primary",icon:(0,l.jsx)(A.A,{}),onClick:()=>{es(!1),et(""),ec(""),ed(""),ex(""),ev("openai"),eh(!1),eg({}),ej(!1),er(!0)},children:e("models.addModel")})}),(0,l.jsxs)("div",{children:[(0,l.jsx)("div",{className:"flex items-center justify-between mb-6",children:(0,l.jsxs)("h2",{className:"text-base font-semibold text-[var(--colorText)] tracking-wide",children:[e("models.modelList")," ",(0,l.jsxs)("span",{className:"text-[var(--colorTextTertiary)] ml-2 font-normal",children:["(",c.length,")"]})]})}),0===c.length?(0,l.jsx)("div",{className:"text-center py-12 bg-[var(--colorBgHover)] rounded-2xl border border-dashed border-[var(--borderColorStrong)] text-[var(--colorTextTertiary)] text-sm",children:e("models.noProviders")}):(0,l.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:c.map(a=>{var r;return(0,l.jsxs)("div",{className:"group p-5 rounded-2xl border border-transparent hover:border-[var(--borderColorStrong)] bg-[var(--colorBgContainer)] hover:bg-[var(--colorBgHover)] hover:shadow-sm flex flex-col cursor-pointer transition-all duration-300",children:[(0,l.jsxs)("div",{className:"flex items-start justify-between gap-3 mb-4 min-w-0",children:[(0,l.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,l.jsx)("div",{className:"font-bold text-base text-[var(--colorText)] truncate mb-1",children:a.name}),(0,l.jsxs)("div",{className:"text-xs text-[var(--colorTextTertiary)] flex items-center gap-1 uppercase tracking-wider font-semibold",children:[(0,l.jsx)(w.A,{})," ",a.protocol||a.detectedProtocol||"openai"]})]}),(0,l.jsxs)(i.A,{size:0,className:"-mr-2 opacity-0 group-hover:opacity-100 transition-opacity",children:[(0,l.jsx)(p.Ay,{type:"text",size:"small",loading:J===a.name,onClick:e=>{e.stopPropagation(),eT(a.name)},icon:!0===$[a.name]?(0,l.jsx)(k.A,{className:"text-[var(--colorOk)]"}):!1===$[a.name]?(0,l.jsx)(C.A,{className:"text-[var(--colorDanger)]"}):(0,l.jsx)(T.A,{className:"text-[var(--colorTextSecondary)]"})}),(0,l.jsx)(p.Ay,{type:"text",size:"small",icon:(0,l.jsx)(S.A,{className:"text-[var(--colorTextSecondary)]"}),onClick:e=>{e.stopPropagation(),ew(a)}}),(0,l.jsx)(v.A,{title:e("models.deleteProviderConfirm"),onConfirm:e=>{null==e||e.stopPropagation(),eC(a.name)},onCancel:e=>null==e?void 0:e.stopPropagation(),children:(0,l.jsx)(p.Ay,{type:"text",size:"small",danger:!0,icon:(0,l.jsx)(K.A,{}),onClick:e=>e.stopPropagation()})})]})]}),(0,l.jsxs)("div",{className:"flex flex-col gap-3 mt-auto pt-4 border-t border-[var(--borderColor)]",children:[(0,l.jsxs)("div",{className:"flex items-center justify-between text-xs text-[var(--colorTextSecondary)]",children:[(0,l.jsxs)("span",{className:"flex items-center gap-1",children:[(0,l.jsx)(B.A,{})," ",e("models.apiKey")]}),(0,l.jsx)("span",{className:"font-mono text-[var(--colorTextTertiary)]",children:a.hasApiKey?"••••••••":e("models.none")})]}),a.baseUrl&&(0,l.jsxs)("div",{className:"flex items-center justify-between text-xs text-[var(--colorTextSecondary)]",children:[(0,l.jsxs)("span",{className:"flex items-center gap-1",children:[(0,l.jsx)(P.A,{})," URL"]}),(0,l.jsx)("span",{className:"truncate max-w-[120px] font-mono text-[var(--colorTextTertiary)]",title:a.baseUrl,children:a.baseUrl.replace(/^https?:\/\//,"")})]}),(0,l.jsxs)("div",{className:"flex flex-wrap gap-1 mt-2",children:[U.filter(e=>{var r;return null==(r=a.capabilities)?void 0:r[e.key]}).map(a=>(0,l.jsx)(b.A,{color:"blue",bordered:!1,className:"m-0 text-[10px] bg-[var(--colorBrand)]/5 text-[var(--colorBrand)] leading-[18px]",children:e(a.labelKey)},a.key)),(null==(r=a.capabilities)?void 0:r.webSearch)&&(0,l.jsx)(b.A,{color:"green",bordered:!1,className:"m-0 text-[10px] leading-[18px]",children:e("models.webEnhancement")})]})]})]},a.name)})})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("h2",{className:"text-base font-semibold text-[var(--colorText)] tracking-wide mb-6",children:e("models.embeddingConfig")}),(0,l.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-8",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)("div",{className:"text-xs font-semibold uppercase tracking-wider mb-2 text-[var(--colorTextTertiary)]",children:e("models.embeddingProvider")}),(0,l.jsx)(h.A,{value:R.provider,className:"w-full h-10",variant:"borderless",style:{background:"var(--colorBgHover)",borderRadius:"8px"},options:[{label:e("models.localRecommended"),value:"transformers-local"},{label:e("models.externalAdvanced"),value:"openai-compatible"}],onChange:e=>D(a=>({...a,provider:e,model:"transformers-local"===e?a.model||"BAAI/bge-small-zh-v1.5":a.model,dimensions:"transformers-local"===e?512:a.dimensions||1024}))})]}),"openai-compatible"===R.provider&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("div",{children:[(0,l.jsx)("div",{className:"text-xs font-semibold uppercase tracking-wider mb-2 text-[var(--colorTextTertiary)]",children:e("models.baseUrl")}),(0,l.jsx)(u.A,{className:"h-10 px-4 bg-[var(--colorBgHover)]",value:R.baseUrl,onChange:e=>D(a=>({...a,baseUrl:e.target.value})),placeholder:"http://localhost:11434/v1"})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("div",{className:"text-xs font-semibold uppercase tracking-wider mb-2 text-[var(--colorTextTertiary)]",children:e("models.model")}),(0,l.jsx)(u.A,{className:"h-10 px-4 bg-[var(--colorBgHover)]",value:R.model,onChange:e=>D(a=>({...a,model:e.target.value})),placeholder:"bge-m3"})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("div",{className:"text-xs font-semibold uppercase tracking-wider mb-2 text-[var(--colorTextTertiary)]",children:e("models.apiKey")}),(0,l.jsx)(u.A.Password,{className:"h-10 px-4 bg-[var(--colorBgHover)]",value:R.apiKey,onFocus:()=>{var e;(null==(e=R.apiKey)?void 0:e.includes("•"))&&D(e=>({...e,apiKey:""}))},onChange:e=>D(a=>({...a,apiKey:e.target.value})),placeholder:e("models.optional")})]})]}),"transformers-local"===R.provider&&(0,l.jsxs)("div",{children:[(0,l.jsx)("div",{className:"text-xs font-semibold uppercase tracking-wider mb-2 text-[var(--colorTextTertiary)]",children:e("models.model")}),(0,l.jsx)(u.A,{className:"h-10 px-4 bg-[var(--colorBgHover)]",value:R.model,onChange:e=>D(a=>({...a,model:e.target.value})),placeholder:"BAAI/bge-small-zh-v1.5"})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("div",{className:"text-xs font-semibold uppercase tracking-wider mb-2 text-[var(--colorTextTertiary)]",children:e("models.dimensions")}),(0,l.jsx)(g.A,{className:"w-full h-10 px-2 bg-[var(--colorBgHover)] border-transparent flex items-center",min:1,value:R.dimensions,onChange:e=>D(a=>({...a,dimensions:Number(e||("transformers-local"===a.provider?512:1024))}))})]})]}),(0,l.jsxs)("div",{className:"mt-8 flex gap-3",children:[(0,l.jsx)(p.Ay,{type:"primary",className:"h-10 px-6 font-medium shadow-none",loading:q,onClick:()=>{eK()},children:e("models.saveEmbedding")}),(0,l.jsx)(p.Ay,{className:"h-10 px-6 font-medium shadow-none bg-[var(--colorBgHover)] border-transparent hover:border-[var(--borderColorStrong)]",loading:X,onClick:()=>{eB()},children:e("models.testEmbedding")}),(0,l.jsxs)("div",{className:"ml-auto flex items-center h-10 gap-2",children:[(0,l.jsx)(b.A,{color:"blue",bordered:!1,className:"m-0 bg-[var(--colorBgHover)] text-[var(--colorTextSecondary)]",children:"transformers-local"===R.provider?e("models.localEmbedding"):e("models.openAICompatible")}),!0===V&&(0,l.jsx)(b.A,{color:"success",bordered:!1,className:"m-0",icon:(0,l.jsx)(k.A,{}),children:e("models.connected")}),!1===V&&(0,l.jsx)(b.A,{color:"error",bordered:!1,className:"m-0",icon:(0,l.jsx)(C.A,{}),children:e("models.connectionFailed")})]})]})]}),z&&(0,l.jsx)(l.Fragment,{children:(0,l.jsxs)("div",{className:"mb-6",children:[(0,l.jsx)("h2",{className:"text-base font-semibold text-[var(--colorText)] tracking-wide mb-6",children:e("models.modelTiers")}),(0,l.jsx)("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-8",children:H.map(a=>{let{key:r,labelKey:s,descKey:o}=a,t=z[r],i=t.list.map(e=>({label:"".concat(e.provider," / ").concat(e.name),value:"".concat(e.provider,":").concat(e.name)})),n=c.filter(e=>!t.list.some(a=>a.provider===e.name)).map(e=>({label:e.name,value:"".concat(e.name,":").concat(e.name)})),d=t.active?t.list.find(e=>e.name===t.active):null;return(0,l.jsxs)("div",{className:"p-6 bg-[var(--colorBgHover)] rounded-xl flex flex-col transition-colors border border-transparent hover:border-[var(--borderColorStrong)]",children:[(0,l.jsx)("div",{className:"text-sm font-semibold text-[var(--colorText)] uppercase tracking-wider mb-2",children:e(s)}),(0,l.jsx)("div",{className:"text-xs text-[var(--colorTextTertiary)] mb-5 leading-relaxed flex-1",children:e(o)}),(0,l.jsx)(h.A,{value:t.active?"".concat((null==d?void 0:d.provider)||"",":").concat(t.active):void 0,onChange:e=>{eS(r,e)},allowClear:!0,placeholder:e("models.selectModelPlaceholder"),className:"w-full h-10",variant:"borderless",style:{background:"var(--colorBgElevated)",borderRadius:"8px"},options:[...i,...n]}),d&&(()=>{let a=c.find(e=>e.name===d.provider);return(0,l.jsxs)("div",{className:"mt-4 px-4 py-3 bg-[var(--colorBgElevated)] rounded-lg border border-[var(--borderColor)] flex items-center gap-3 transition-colors",children:[(0,l.jsx)(T.A,{className:"text-[var(--colorBrand)] text-base shrink-0"}),(0,l.jsx)("span",{className:"text-sm font-medium flex-1 min-w-0 truncate text-[var(--colorText)]",children:d.provider}),(null==a?void 0:a.capabilities)&&U.filter(e=>a.capabilities[e.key]).length>0&&(0,l.jsx)("div",{className:"flex gap-1 shrink-0",children:U.filter(e=>a.capabilities[e.key]).slice(0,2).map(a=>(0,l.jsx)(b.A,{color:"blue",bordered:!1,className:"m-0 text-[10px] bg-[var(--colorBrand)]/5 text-[var(--colorBrand)] leading-[18px]",children:e(a.labelKey)},a.key))}),(0,l.jsx)(b.A,{color:"success",bordered:!1,className:"m-0 text-[10px] leading-[18px] shrink-0 uppercase",children:e("models.active")})]})})()]},r)})})]})}),(0,l.jsx)(y.A,{title:el?e("models.editModel"):e("models.addModel"),open:ea,onClose:()=>er(!1),size:"large",styles:{body:{padding:"24px 32px"},header:{padding:"16px 32px",borderBottom:"1px solid var(--colorBorderSecondary)"}},extra:(0,l.jsx)(p.Ay,{type:"primary",loading:ef,onClick:()=>{ek()},children:e("common.save")}),children:(0,l.jsxs)(j.A,{layout:"vertical",children:[(0,l.jsx)(j.A.Item,{label:e("models.modelName"),children:(0,l.jsx)(u.A,{value:ei,onChange:e=>ec(e.target.value),placeholder:e("models.modelNamePlaceholder")})}),(0,l.jsx)(j.A.Item,{label:e("models.apiKey"),help:el?e("models.apiKeyEditHint"):void 0,children:(0,l.jsx)(u.A.Password,{value:en,onFocus:()=>{el&&en.includes("•")&&ed("")},onChange:e=>ed(e.target.value),placeholder:el?e("models.apiKeyEditPlaceholder"):"sk-..."})}),(0,l.jsx)(j.A.Item,{label:e("models.baseUrl"),children:(0,l.jsx)(u.A,{value:em,onChange:e=>ex(e.target.value),placeholder:"https://api.openai.com/v1"})}),(0,l.jsx)(j.A.Item,{label:e("models.protocol"),children:(0,l.jsx)(h.A,{value:ep,onChange:ev,options:I.map(a=>({label:e(a.labelKey),value:a.value}))})}),(0,l.jsx)(j.A.Item,{label:e("models.directEndpoint"),children:(0,l.jsx)(f.A,{checked:eb,onChange:e=>eh(e.target.checked),children:e("models.directEndpointDesc")})}),(0,l.jsxs)(j.A.Item,{label:e("models.webEnhancement"),children:[(0,l.jsx)(N.A,{checked:ey,onChange:ej}),(0,l.jsx)("span",{className:"ml-3 text-xs text-[var(--colorTextSecondary)]",children:e("models.webEnhancementDesc")})]}),(0,l.jsx)(j.A.Item,{label:e("models.capabilities"),children:(0,l.jsx)(f.A.Group,{value:U.filter(e=>eu[e.key]).map(e=>e.key),options:U.map(a=>({label:e(a.labelKey),value:a.key})),onChange:e=>eg(Object.fromEntries(U.map(a=>[a.key,e.includes(a.key)])))})})]})})]})}}},e=>{e.O(0,[717,883,44,195,455,827,636,593,792],()=>e(e.s=77305)),_N_E=e.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[26],{27549:(e,t,r)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/prompt",function(){return r(34508)}])},34508:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>ee});var o=r(65321),l=r(97109),a=r(47085),n=r(17807),i=r(33442),s=r(11702),c=r(56985),d=r(85114),p=r(26171),m=r(88762),x=r(7576),h=r(50883),u=r(49292),g=r(84253),y=r(34052),f=r(42700),v=r(55122),j=r(54746),w=r(99650),S=r(81668),b=r(58209),A=r(26631),N=r(29606),C=r(96091),T=r(30486),k=r(46082),z=r(42758),P=r(7851),F=r(84742),B=r(33555),E=r(24810),I=r(7492);async function O(){let e=await fetch("/api/prompt");if(!e.ok)throw Error("Failed");return e.json()}async function R(e,t,r){let o=await fetch("/api/prompt",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({filePath:e,content:t,name:r})});if(!o.ok)throw Error("Failed");return o.json()}async function H(e){let t=await fetch("/api/prompt",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"previewRules",content:e})});return t.ok&&(await t.json()).preview||null}async function D(e){let t=await fetch("/api/prompt",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"create",projectRoot:e,content:"# CUSTOMIZE\n"})});if(!t.ok)throw Error("Failed");return t.json()}async function _(e,t){let r=await fetch("/api/prompt",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"createCustom",name:e,content:t})});if(!r.ok)throw Error("Failed");return r.json()}async function J(e){let t=await fetch("/api/prompt",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"select",selectedIds:e})});if(!t.ok)throw Error("Failed");return t.json()}async function M(e){let t=await fetch("/api/prompt",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"import",...e&&"object"==typeof e?e:{prompts:[]}})});if(!t.ok)throw Error(await t.text());return t.json()}async function W(){return U("",!1,60)}async function L(e){let t=await fetch("/api/kb/files/detail?relativePath=".concat(encodeURIComponent(e)));if(!t.ok)throw Error("Failed");return((await t.json()).chunks||[]).map(e=>e.content||"").filter(Boolean).join("\n\n").slice(0,12e3)}async function U(e){let t=!(arguments.length>1)||void 0===arguments[1]||arguments[1],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:30,o=new URLSearchParams({limit:String(r)});e.trim()&&o.set("q",e.trim()),t||o.set("includeContent","0");let l=await fetch("/api/kb/files/search?".concat(o));return l.ok&&(await l.json()).files||[]}async function K(e){let t=await fetch("/api/prompt/chat",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(!t.ok){let e=await t.text();try{let t=JSON.parse(e);throw Error(t.error||t.message||e||"AI 对话失败")}catch(t){throw Error(e||"AI 对话失败")}}return t.json()}function $(e,t){let r=new Blob([JSON.stringify(t,null,2)],{type:"application/json;charset=utf-8"}),o=URL.createObjectURL(r),l=document.createElement("a");l.href=o,l.download=e,l.click(),URL.revokeObjectURL(o)}function G(e){return e.id.startsWith("custom:")}function Y(e){return G(e)?"custom":e.isCurrent?"current":"project"}function X(e,t,r){return e?"customize-agent:prompt-chat:".concat(e.id,":").concat(e.customizePath||e.projectName):"customize-agent:prompt-chat:draft:".concat(r||t||"new")}function q(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:220,r=e.hasFile&&e.content?e.content.replace(/^#.*$/gm,"").replace(/\n{3,}/g,"\n\n").trim():"";return r.length>t?"".concat(r.slice(0,t),"..."):r}function Q(e){let t=Date.parse(e);return Number.isNaN(t)?"-":new Date(t).toLocaleString()}function V(e){return{type:"customize-agent.prompts",version:1,exportedAt:new Date().toISOString(),prompts:e.map(e=>({name:e.projectName,content:e.content||"",selected:e.selected,source:Y(e)}))}}function Z(e){let t=e.match(/(^|\s)@([^\s@]*)$/);return t?t[2]:null}function ee(){let e=(0,a.Vr)(),{message:t}=n.A.useApp(),[r,ee]=(0,l.useState)(!0),[et,er]=(0,l.useState)([]),[eo,el]=(0,l.useState)(!1),[ea,en]=(0,l.useState)(null),[ei,es]=(0,l.useState)(""),[ec,ed]=(0,l.useState)(""),[ep,em]=(0,l.useState)(!1),[ex,eh]=(0,l.useState)(!1),[eu,eg]=(0,l.useState)("custom"),[ey,ef]=(0,l.useState)("all"),[ev,ej]=(0,l.useState)("mtime"),[ew,eS]=(0,l.useState)("list"),[eb,eA]=(0,l.useState)(""),[eN,eC]=(0,l.useState)(null),[eT,ek]=(0,l.useState)([]),[ez,eP]=(0,l.useState)(!1),[eF,eB]=(0,l.useState)([]),[eE,eI]=(0,l.useState)(""),[eO,eR]=(0,l.useState)(""),[eH,eD]=(0,l.useState)(!1),[e_,eJ]=(0,l.useState)([]),[eM,eW]=(0,l.useState)([]),[eL,eU]=(0,l.useState)([]),[eK,e$]=(0,l.useState)(!1),[eG,eY]=(0,l.useState)(!1),[eX,eq]=(0,l.useState)(!1),[eQ,eV]=(0,l.useState)(null),[eZ,e0]=(0,l.useState)(!1),[e1,e2]=(0,l.useState)(void 0),[e4,e3]=(0,l.useState)(!1),e8=async()=>{if(e1){e3(!0);try{let r=await fetch("/api/template-references?action=paradigms&projectType=".concat(encodeURIComponent(e1))),o=await r.json();if(!o.paradigm)return void t.info(e("prompt.paradigmEmpty"));es(e=>e.trim()?"".concat(e.trim(),"\n\n").concat(o.paradigm.text):o.paradigm.text),t.success(e("prompt.paradigmInserted"))}catch(r){t.error(e("prompt.paradigmFailed"))}finally{e3(!1)}}};(0,l.useEffect)(()=>{if(!eo||!ei.trim()){eV(null),e0(!1);return}e0(!0);let e=setTimeout(()=>{H(ei).then(e=>{eV(e),e0(!1)})},500);return()=>clearTimeout(e)},[ei,eo]);let e5=(0,l.useRef)(null),e6=(0,l.useRef)(null),e7=Z(eO),e9=async()=>{ee(!0);try{er(await O())}catch(r){t.error(e("common.error"))}finally{ee(!1)}};(0,l.useEffect)(()=>{e9()},[]),(0,l.useEffect)(()=>{let e=window.localStorage.getItem("customize-agent:prompt-view-mode");("list"===e||"card"===e)&&eS(e)},[]),(0,l.useEffect)(()=>{window.localStorage.setItem("customize-agent:prompt-view-mode",ew)},[ew]),(0,l.useEffect)(()=>{let e=e6.current;e&&e.scrollTo({top:e.scrollHeight,behavior:"smooth"}),eE&&window.localStorage.setItem(eE,JSON.stringify(eF.slice(-30)))},[eF,eH,eE]),(0,l.useEffect)(()=>{!eo||e_.length>0||eK||(e$(!0),W().then(eJ).catch(()=>void 0).finally(()=>e$(!1)))},[eo,e_.length,eK]),(0,l.useEffect)(()=>{let e=null==e7?void 0:e7.trim();if(!eo||!e){eW([]),eY(!1);return}let t=!1;eY(!0);let r=window.setTimeout(()=>{U(e).then(e=>{t||eW(e)}).catch(()=>{t||eW([])}).finally(()=>{t||eY(!1)})},250);return()=>{t=!0,window.clearTimeout(r)}},[eo,e7]);let te=et.find(e=>e.isCurrent),tt=et.filter(G),tr={all:et.length,custom:et.filter(e=>"custom"===Y(e)).length,current:et.filter(e=>"current"===Y(e)).length,project:et.filter(e=>"project"===Y(e)).length,selected:et.filter(e=>e.selected).length,unselected:et.filter(e=>!e.selected).length,hasFile:et.filter(e=>e.hasFile).length,missingFile:et.filter(e=>!e.hasFile).length},to=et.filter(e=>{var t;let r=Y(e);return("all"===eu||r===eu)&&("selected"!==ey||!!e.selected)&&("unselected"!==ey||!e.selected)&&("hasFile"!==ey||!!e.hasFile)&&("missingFile"!==ey||!e.hasFile)&&(!eb.trim()||(t=eb.trim(),!!"".concat(e.projectName,"\n").concat(e.projectRoot||"","\n").concat(e.customizePath||"","\n").concat(e.content||"").toLowerCase().includes(t.toLowerCase())))}).sort((e,t)=>"name"===ev?e.projectName.localeCompare(t.projectName):"source"===ev?["custom","current","project"].indexOf(Y(e))-["custom","current","project"].indexOf(Y(t)):"selected"===ev&&Number(t.selected)-Number(e.selected)||Date.parse(t.mtime||"")-Date.parse(e.mtime||"")),tl=to.find(e=>e.id===eN)||to[0]||null,ta=eT.filter(e=>to.some(t=>t.id===e)),tn=(null==e7?void 0:e7.trim())?eM:e_,ti=(e,t,r)=>{let o=X(e,t,r);eI(o),eB(function(e){try{let t=JSON.parse(window.localStorage.getItem(e)||"[]");return Array.isArray(t)?t.filter(e=>("user"===e.role||"assistant"===e.role)&&"string"==typeof e.content).slice(-30):[]}catch(e){return[]}}(o)),eR(""),eD(!1),eU([]),eq(!1)},ts=r=>{if(null==r?void 0:r.projectRoot)return void D(r.projectRoot).then(()=>{t.success(e("common.success")),e9()}).catch(()=>t.error(e("common.error")));let o="new:".concat(Date.now());en(null),eh(!0),ed(""),es(""),ti(null,"new",o),el(!0)},tc=async()=>{if(!ec.trim())return void t.error("请输入名称");em(!0);try{if(ea)await R(ea.customizePath,ei,G(ea)?ec.trim():void 0),t.success(e("common.success"));else{let r=await _(ec.trim(),ei||"# ".concat(ec.trim(),"\n"));!function(e,t){if(!e||!t||e===t)return;let r=window.localStorage.getItem(e);r&&!window.localStorage.getItem(t)&&window.localStorage.setItem(t,r)}(eE,X({id:r.id,projectId:r.id,projectName:ec.trim(),customizePath:r.id,content:ei,mtime:"",hasFile:!0,isCurrent:!1,selected:!1,source:"custom"},ec.trim())),t.success(e("common.success"))}el(!1),await e9()}catch(r){t.error(e("common.error"))}finally{em(!1)}},td=async e=>{let t=Array.from(new Set([...eL,...e_.filter(t=>e.includes("@".concat(t.relativePath))).map(e=>e.relativePath)])).slice(0,3),r=[];for(let e of t){let t=await L(e);t&&r.push({relativePath:e,content:t})}return r},tp=async()=>{let e=eO.trim();if(!e||eH)return;let r=[...eF,{role:"user",content:e}];eB(r),eR(""),eq(!1),eD(!0);try{let t=await td(e),o=await K({name:ec||(null==ea?void 0:ea.projectName)||"未命名提示词",content:ei,message:e,history:eF,references:t});eB([...r,{role:"assistant",content:o.content||"AI 未返回内容"}])}catch(e){t.error(e instanceof Error?e.message:"AI 对话失败,请检查模型配置"),eB(r)}finally{eD(!1)}},tm=async(r,o)=>{let l=o?Array.from(new Set([...et.filter(e=>e.selected).map(e=>e.id),r.id])):et.filter(e=>e.selected&&e.id!==r.id).map(e=>e.id);try{await J(l),er(e=>e.map(e=>({...e,selected:l.includes(e.id)})))}catch(r){t.error(e("common.error"))}},tx=async r=>{let o=et.filter(e=>e.selected).map(e=>e.id),l=r?Array.from(new Set([...o,...ta])):o.filter(e=>!ta.includes(e));try{await J(l),er(e=>e.map(e=>({...e,selected:l.includes(e.id)}))),ek([]),t.success(e("common.success"))}catch(r){t.error(e("common.error"))}},th=async r=>{try{if(!(await fetch("/api/prompt",{method:"DELETE",headers:{"Content-Type":"application/json"},body:JSON.stringify({projectId:r.projectId,filePath:r.customizePath})})).ok)throw Error("Failed");t.success(e("common.success")),ek(e=>e.filter(e=>e!==r.id)),await e9()}catch(r){t.error(e("common.error"))}},tu=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"custom",r="checked"===e?et.filter(e=>ta.includes(e.id)):"filtered"===e?to:tt;$("customize-prompts-".concat(new Date().toISOString().slice(0,10),".json"),V(r)),t.success("已导出 ".concat(r.length," 条提示词"))},tg=async e=>{if(e){eP(!0);try{let r=await e.text(),o=JSON.parse(r),l=await M(o);t.success("已导入 ".concat(l.imported," 条提示词")),await e9()}catch(e){t.error("导入失败,请确认 JSON 文件格式正确")}finally{eP(!1),e5.current&&(e5.current.value="")}}},ty=t=>{let r=Y(t);return(0,o.jsxs)(i.A,{size:4,wrap:!0,children:[(0,o.jsx)(s.A,{color:"custom"===r?"cyan":"current"===r?"green":"project"===r?"blue":"default",style:{margin:0},children:e("custom"===r?"prompt.customPrompt":"current"===r?"prompt.currentProject":"project"===r?"prompt.otherProjects":"prompt.allPrompts")}),t.selected&&(0,o.jsx)(s.A,{color:"purple",style:{margin:0},children:e("prompt.selected")}),!t.hasFile&&(0,o.jsx)(s.A,{style:{margin:0},children:e("prompt.missingFileStatus")})]})},tf=r=>(0,o.jsxs)("div",{className:"flex items-center gap-1.5",children:[r.hasFile&&(0,o.jsx)(c.A,{checked:r.selected,onChange:e=>{tm(r,e.target.checked)},className:"mr-1",children:e("prompt.selected")}),!r.hasFile&&r.projectRoot&&(0,o.jsx)(d.Ay,{size:"small",icon:(0,o.jsx)(j.A,{}),onClick:()=>ts(r),children:e("common.add")}),r.hasFile&&(0,o.jsx)(d.Ay,{size:"small",icon:(0,o.jsx)(w.A,{}),onClick:()=>{en(r),eh(!1),ed(r.projectName),es(r.content||""),ti(r,r.projectName),el(!0)},children:e("common.edit")}),r.hasFile&&(0,o.jsx)(d.Ay,{size:"small",icon:(0,o.jsx)(S.A,{}),onClick:()=>{var e;return e=r,void($("customize-prompt-".concat(e.projectName.trim().replace(/[\\/:*?"<>|]/g,"-").slice(0,80)||"untitled","-").concat(new Date().toISOString().slice(0,10),".json"),V([e])),t.success("已导出 1 条提示词"))},children:"导出"}),(0,o.jsx)(p.A,{title:G(r)?"删除自定义提示词?":"删除项目记录及文件?",onConfirm:()=>{th(r)},children:(0,o.jsx)(d.Ay,{size:"small",danger:!0,icon:(0,o.jsx)(b.A,{})})})]});return r?(0,o.jsxs)("div",{className:"space-y-12",children:[(0,o.jsx)(m.A,{active:!0,title:!0,paragraph:{rows:1}}),(0,o.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-6",children:Array.from({length:4}).map((e,t)=>(0,o.jsx)("div",{className:"p-4 border border-[var(--borderColor)]",children:(0,o.jsx)(m.A,{active:!0,paragraph:{rows:4}})},t))})]}):(0,o.jsxs)("div",{className:"space-y-8 animateFadeIn",children:[(0,o.jsxs)("div",{className:"flex flex-col sm:flex-row sm:items-end justify-between gap-4 pb-6 mb-2",children:[(0,o.jsxs)("div",{children:[(0,o.jsxs)("h1",{className:"text-3xl font-extrabold tracking-tight text-[var(--colorText)] mb-2.5 flex items-center gap-2",children:[(0,o.jsx)(A.A,{className:"text-[var(--colorAccent)]"}),e("nav.promptManagement")]}),(0,o.jsx)("p",{className:"text-sm text-[var(--colorTextSecondary)]",children:e("prompt.description")})]}),(0,o.jsxs)(i.A,{wrap:!0,children:[te&&(0,o.jsxs)(s.A,{color:"green",style:{lineHeight:"22px"},className:"border-0",children:[(0,o.jsx)(N.A,{})," ",te.projectRoot]}),(0,o.jsx)("input",{ref:e5,type:"file",accept:"application/json,.json",style:{display:"none"},onChange:e=>{var t;tg(null==(t=e.target.files)?void 0:t[0])}}),(0,o.jsx)(d.Ay,{icon:(0,o.jsx)(C.A,{}),loading:ez,onClick:()=>{var e;return null==(e=e5.current)?void 0:e.click()},className:"rounded-lg",children:e("prompt.import")}),(0,o.jsx)(d.Ay,{icon:(0,o.jsx)(S.A,{}),disabled:0===to.length,onClick:()=>tu("filtered"),className:"rounded-lg",children:e("prompt.exportFiltered")}),(0,o.jsx)(d.Ay,{type:"primary",icon:(0,o.jsx)(j.A,{}),onClick:()=>ts(),className:"shadow-none rounded-lg",children:e("prompt.createPrompt")})]})]}),(0,o.jsxs)("div",{className:"flex flex-wrap items-center gap-3 bg-[var(--colorBgContainer)] p-3 rounded-xl shadow-sm mb-6",children:[(0,o.jsx)(x.A,{prefix:(0,o.jsx)(T.A,{className:"text-[var(--colorTextTertiary)]"}),allowClear:!0,placeholder:e("prompt.searchPrompt"),value:eb,onChange:e=>eA(e.target.value),style:{width:280},variant:"borderless",className:"bg-[var(--colorBgHover)] rounded-lg hover:bg-[var(--colorFillAlter)] focus:bg-[var(--colorBgElevated)] transition-colors"}),(0,o.jsx)("div",{className:"h-4 w-[1px] bg-[var(--borderColorStrong)] mx-1"}),(0,o.jsx)(h.A,{value:eu,onChange:eg,style:{width:150},variant:"borderless",options:[{label:"".concat(e("prompt.allPrompts")," (").concat(tr.all,")"),value:"all"},{label:"".concat(e("prompt.customPrompt")," (").concat(tr.custom,")"),value:"custom"},{label:"".concat(e("prompt.currentProject")," (").concat(tr.current,")"),value:"current"},{label:"".concat(e("prompt.otherProjects")," (").concat(tr.project,")"),value:"project"}]}),(0,o.jsx)(h.A,{value:ey,onChange:ef,style:{width:130},variant:"borderless",options:[{label:e("prompt.promptStatus"),value:"all"},{label:"".concat(e("prompt.selected")," (").concat(tr.selected,")"),value:"selected"},{label:"".concat(e("prompt.unselected")," (").concat(tr.unselected,")"),value:"unselected"},{label:"".concat(e("prompt.hasFileStatus")," (").concat(tr.hasFile,")"),value:"hasFile"},{label:"".concat(e("prompt.missingFileStatus")," (").concat(tr.missingFile,")"),value:"missingFile"}]}),(0,o.jsx)(h.A,{value:ev,onChange:ej,style:{width:140},variant:"borderless",options:[{label:e("prompt.sortByMtime"),value:"mtime"},{label:e("prompt.sortByName"),value:"name"},{label:e("prompt.sortBySource"),value:"source"},{label:e("prompt.sortBySelected"),value:"selected"}]}),(0,o.jsx)("div",{className:"flex-1"}),(0,o.jsx)(u.A,{value:ew,onChange:e=>eS(e),options:[{label:(0,o.jsx)(k.A,{}),value:"list"},{label:(0,o.jsx)(z.A,{}),value:"card"}],className:"bg-[var(--colorBgHover)] p-1 rounded-lg"})]}),(0,o.jsx)("div",{className:"grid grid-cols-1 gap-8 items-start",children:(0,o.jsxs)("div",{className:"min-w-0",children:[ta.length>0&&(0,o.jsxs)("div",{className:"flex items-center gap-3 flex-wrap p-4 mb-6 bg-[var(--colorBgHover)] rounded-xl shadow-sm",children:[(0,o.jsxs)("span",{className:"font-semibold text-sm",children:["已选择 ",(0,o.jsx)("span",{className:"text-[var(--colorAccent)]",children:ta.length})," 项"]}),(0,o.jsx)("div",{className:"h-4 w-[1px] bg-[var(--borderColorStrong)] mx-1"}),(0,o.jsx)(d.Ay,{size:"small",onClick:()=>{tx(!0)},children:e("prompt.batchSelect")}),(0,o.jsx)(d.Ay,{size:"small",onClick:()=>{tx(!1)},children:e("prompt.cancelSelect")}),(0,o.jsx)(d.Ay,{size:"small",icon:(0,o.jsx)(S.A,{}),onClick:()=>tu("checked"),children:e("prompt.exportSelected")}),(0,o.jsx)(d.Ay,{size:"small",danger:!0,onClick:()=>ek([]),children:e("prompt.clearSelect")})]}),0===to.length?(0,o.jsx)("div",{className:"py-32 text-center border border-dashed border-[var(--borderColor)] rounded-2xl bg-[var(--colorBgHover)]",children:(0,o.jsx)(g.A,{image:g.A.PRESENTED_IMAGE_SIMPLE,description:(0,o.jsx)("span",{className:"text-[var(--colorTextSecondary)]",children:eb||"all"!==ey?e("prompt.noMatchDesc"):e("prompt.noPromptInGroup")})})}):"list"===ew?(0,o.jsx)("div",{className:"flex flex-col gap-3",children:to.map(e=>{let t=q(e,180),r=(null==tl?void 0:tl.id)===e.id;return(0,o.jsxs)("div",{onClick:()=>eC(e.id),className:"group grid grid-cols-[28px_1fr_auto] gap-4 items-center p-4 rounded-xl transition-all cursor-pointer ".concat(r?"bg-[var(--colorBgSelected)] shadow-md":"bg-transparent hover:bg-[var(--colorBgHover)] hover:shadow-sm"),children:[(0,o.jsx)(c.A,{checked:eT.includes(e.id),onClick:e=>e.stopPropagation(),onChange:t=>ek(r=>t.target.checked?Array.from(new Set([...r,e.id])):r.filter(t=>t!==e.id))}),(0,o.jsxs)("div",{className:"min-w-0",children:[(0,o.jsxs)("div",{className:"flex items-center gap-3 mb-1.5",children:[(0,o.jsx)(A.A,{className:e.isCurrent?"text-[var(--colorOk)] text-lg":"text-[var(--colorTextSecondary)] text-lg"}),(0,o.jsx)("span",{className:"font-semibold truncate text-[var(--colorText)] text-base",children:e.projectName}),ty(e)]}),(0,o.jsxs)("div",{className:"text-xs text-[var(--colorTextTertiary)] truncate flex items-center gap-1.5 font-medium",children:[(0,o.jsx)(N.A,{})," ",e.projectRoot||e.customizePath||"本地提示词",(0,o.jsx)("span",{className:"text-[var(--colorBorderSecondary)]",children:"|"}),Q(e.mtime)]}),t&&(0,o.jsx)("div",{className:"mt-2.5 bg-[var(--colorFillAlter)] p-2.5 rounded-lg overflow-hidden",children:(0,o.jsx)("div",{className:"text-sm text-[var(--colorTextSecondary)] line-clamp-2 leading-normal",children:t})})]}),(0,o.jsx)("div",{onClick:e=>e.stopPropagation(),className:"transition-opacity flex items-center ".concat(r?"opacity-100":"opacity-0 group-hover:opacity-100"),children:tf(e)})]},e.id)})}):(0,o.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-5",children:to.map(e=>{let t=q(e,180),r=(null==tl?void 0:tl.id)===e.id;return(0,o.jsxs)("div",{onClick:()=>eC(e.id),className:"group flex flex-col p-5 rounded-2xl transition-all cursor-pointer ".concat(r?"bg-[var(--colorBgSelected)] shadow-md":"bg-[var(--colorBgContainer)] hover:bg-[var(--colorBgHover)] shadow-sm hover:shadow-md"),children:[(0,o.jsx)("div",{className:"flex items-start justify-between gap-3 mb-4 min-w-0",children:(0,o.jsxs)("div",{className:"flex items-center gap-3 min-w-0 flex-1",children:[(0,o.jsx)(c.A,{checked:eT.includes(e.id),onClick:e=>e.stopPropagation(),onChange:t=>ek(r=>t.target.checked?Array.from(new Set([...r,e.id])):r.filter(t=>t!==e.id))}),(0,o.jsx)(A.A,{className:e.isCurrent?"text-[var(--colorOk)] text-lg":"text-[var(--colorTextSecondary)] text-lg"}),(0,o.jsx)("span",{className:"font-bold text-base text-[var(--colorText)] truncate mb-1",children:e.projectName})]})}),(0,o.jsx)("div",{className:"mb-3",children:ty(e)}),(0,o.jsxs)("div",{className:"text-xs text-[var(--colorTextTertiary)] truncate flex items-center gap-1.5 mb-4 bg-[var(--colorFillAlter)] p-1.5 rounded inline-flex self-start",children:[(0,o.jsx)(N.A,{}),e.projectRoot||e.customizePath||"本地提示词"]}),(0,o.jsx)("div",{className:"flex-1 bg-[var(--colorFillAlter)] p-3 rounded-xl mb-4 overflow-hidden",children:t?(0,o.jsx)("div",{className:"text-sm text-[var(--colorTextSecondary)] line-clamp-3 leading-normal",children:t}):(0,o.jsx)("div",{className:"text-sm text-[var(--colorTextQuaternary)] italic",children:"暂无内容预览"})}),(0,o.jsxs)("div",{className:"mt-auto pt-4 flex justify-between items-center",onClick:e=>e.stopPropagation(),children:[(0,o.jsx)("span",{className:"text-xs font-medium text-[var(--colorTextTertiary)] bg-[var(--colorFillSecondary)] px-2 py-1 rounded",children:Q(e.mtime)}),(0,o.jsx)("div",{className:"transition-opacity ".concat(r?"opacity-100":"opacity-0 group-hover:opacity-100"),children:tf(e)})]})]},e.id)})})]})}),(0,o.jsxs)(y.A,{title:ex?e("prompt.createPrompt"):ea&&G(ea)?"".concat(e("prompt.customPrompt")," — ").concat(ec||ea.projectName):"".concat(e("prompt.currentProject")," — ").concat((null==ea?void 0:ea.projectName)||""),open:eo,onClose:()=>el(!1),styles:{wrapper:{width:1080},mask:{pointerEvents:"none"},body:{padding:"24px 32px",display:"grid",gridTemplateRows:"minmax(320px, 1fr) 420px",gap:24,height:"100%"},header:{borderBottom:"1px solid var(--colorBorderSecondary)",padding:"16px 32px"}},extra:(0,o.jsxs)(i.A,{children:[(0,o.jsx)(d.Ay,{onClick:()=>el(!1),children:e("common.cancel")}),(0,o.jsx)(d.Ay,{type:"primary",loading:ep,onClick:()=>{tc()},children:e("common.save")})]}),children:[(0,o.jsxs)("div",{style:{minHeight:0,display:"flex",flexDirection:"column"},children:[(0,o.jsx)("div",{style:{marginBottom:16},children:ex||ea&&G(ea)?(0,o.jsx)(x.A,{size:"large",placeholder:e("prompt.promptName"),value:ec,onChange:e=>ed(e.target.value),style:{maxWidth:"100%",fontWeight:500,fontSize:16}}):null}),(0,o.jsx)(x.A.TextArea,{value:ei,onChange:e=>es(e.target.value),style:{flex:1,minHeight:140,fontFamily:"SF Mono, Monaco, Consolas, monospace",fontSize:13,resize:"none"}}),(0,o.jsxs)("div",{style:{marginTop:12,border:"1px solid var(--colorBorderSecondary)",borderRadius:10,background:"var(--colorBgContainer)",padding:"10px 12px",maxHeight:170,overflowY:"auto"},children:[(0,o.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:6},children:[(0,o.jsxs)(i.A,{size:6,children:[(0,o.jsx)(P.A,{style:{color:"var(--colorAccent)"}}),(0,o.jsx)("span",{style:{fontWeight:600,fontSize:12},children:e("prompt.rulePreviewTitle")})]}),eZ&&(0,o.jsx)(f.A,{size:"small"})]}),eQ?eQ.recognized?(0,o.jsx)(i.A,{direction:"vertical",size:4,style:{width:"100%"},children:eQ.summary.map((e,t)=>(0,o.jsxs)("div",{style:{fontSize:12,color:"var(--colorText)",display:"flex",gap:6,lineHeight:1.6},children:[(0,o.jsx)(F.A,{style:{color:"var(--colorSuccess)",marginTop:4}}),(0,o.jsx)("span",{children:e})]},t))}):(0,o.jsx)("div",{style:{color:"var(--colorTextSecondary)",fontSize:12},children:e("prompt.rulePreviewNone")}):(0,o.jsx)("div",{style:{color:"var(--colorTextSecondary)",fontSize:12},children:ei.trim()?e("prompt.rulePreviewAnalyzing"):e("prompt.rulePreviewHint")}),(0,o.jsx)(v.A,{style:{margin:"8px 0"}}),(0,o.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8},children:[(0,o.jsx)("span",{style:{fontSize:12,color:"var(--colorTextSecondary)",whiteSpace:"nowrap"},children:e("prompt.paradigmTitle")}),(0,o.jsx)(h.A,{size:"small",allowClear:!0,placeholder:e("prompt.paradigmTypePlaceholder"),style:{minWidth:110},value:e1,onChange:e2,options:["房建","市政","公路","桥梁与隧道","水利水电","电力","机电安装","装饰装修","园林绿化","铁路","港口与航道","矿山冶金","其他"].map(e=>({value:e,label:e}))}),(0,o.jsx)(d.Ay,{size:"small",icon:(0,o.jsx)(B.A,{}),loading:e4,disabled:!e1,onClick:()=>{e8()},children:e("prompt.paradigmInsert")})]})]})]}),(0,o.jsxs)("div",{style:{minHeight:0,border:"1px solid var(--colorBorderSecondary)",borderRadius:10,background:"var(--colorBgContainer)",display:"flex",flexDirection:"column",overflow:"hidden",boxShadow:"0 8px 24px rgba(15, 23, 42, 0.06)"},children:[(0,o.jsxs)("div",{style:{padding:"10px 12px",borderBottom:"1px solid var(--colorBorderSecondary)",display:"flex",alignItems:"center",justifyContent:"space-between",gap:8},children:[(0,o.jsxs)(i.A,{size:6,children:[(0,o.jsx)(E.A,{style:{color:"var(--colorAccent)"}}),(0,o.jsx)("span",{style:{fontWeight:600},children:e("prompt.aiPromptAssistant")})]}),(0,o.jsxs)(i.A,{size:6,children:[eF.length>0&&(0,o.jsx)(d.Ay,{size:"small",onClick:()=>eB([]),children:e("prompt.clearHistory")}),eH?(0,o.jsx)(s.A,{color:"processing",style:{margin:0},children:e("prompt.generating")}):(0,o.jsx)(s.A,{color:"blue",style:{margin:0},children:e("prompt.canConverse")})]})]}),(0,o.jsx)("div",{ref:e6,style:{flex:1,minHeight:0,overflowY:"auto",padding:14,background:"var(--colorFillAlter)"},children:0!==eF.length||eH?(0,o.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:12,width:"100%"},children:[eF.map((r,l)=>{let a="user"===r.role;return(0,o.jsx)("div",{style:{display:"flex",justifyContent:a?"flex-end":"flex-start"},children:(0,o.jsxs)("div",{style:{maxWidth:"78%",padding:"10px 12px",borderRadius:12,background:a?"var(--colorFillSecondary)":"var(--colorBgContainer)",color:"var(--colorText)",border:"1px solid var(--colorBorderSecondary)",whiteSpace:"pre-wrap",lineHeight:1.7,fontSize:13,transition:"all .2s ease"},children:[r.content,!a&&(0,o.jsx)("div",{style:{display:"flex",justifyContent:"flex-end",marginTop:8},children:(0,o.jsx)(d.Ay,{size:"small",type:"primary",onClick:()=>{es(r.content),t.success("已应用到编辑内容,请确认后保存")},children:e("prompt.apply")})})]})},"".concat(r.role,"-").concat(l))}),eH&&(0,o.jsx)("div",{style:{display:"flex",justifyContent:"flex-start"},children:(0,o.jsxs)("div",{style:{padding:"10px 12px",borderRadius:12,background:"var(--colorBgContainer)",border:"1px solid var(--colorBorderSecondary)",color:"var(--colorTextSecondary)",fontSize:13},children:[(0,o.jsx)(f.A,{size:"small",style:{marginRight:8}}),e("prompt.aiAnalyzing")]})})]}):(0,o.jsx)(g.A,{image:g.A.PRESENTED_IMAGE_SIMPLE,description:e("prompt.mentionRecallHint")})}),(0,o.jsx)(v.A,{style:{margin:0}}),(0,o.jsxs)("div",{style:{padding:12},children:[eL.length>0&&(0,o.jsx)("div",{style:{display:"flex",flexWrap:"wrap",gap:4,marginBottom:8},children:eL.map(e=>(0,o.jsxs)(s.A,{closable:!0,onClose:()=>eU(t=>t.filter(t=>t!==e)),style:{margin:0,maxWidth:360,overflow:"hidden",textOverflow:"ellipsis"},children:["@",e]},e))}),eX&&(0,o.jsxs)("div",{style:{maxHeight:260,overflowY:"auto",marginBottom:8,border:"1px solid var(--colorBorderSecondary)",borderRadius:12,background:"var(--colorBgElevated, var(--colorBgContainer))",boxShadow:"0 16px 40px rgba(15, 23, 42, 0.14)"},children:[(0,o.jsxs)("div",{style:{position:"sticky",top:0,zIndex:1,padding:"10px 12px",borderBottom:"1px solid var(--colorBorderSecondary)",background:"var(--colorBgElevated, var(--colorBgContainer))",display:"flex",justifyContent:"space-between",gap:12,alignItems:"center"},children:[(0,o.jsxs)("div",{children:[(0,o.jsx)("div",{style:{color:"var(--colorText)",fontSize:13,fontWeight:700},children:e("prompt.recallKbFiles")}),(0,o.jsx)("div",{style:{color:"var(--colorTextSecondary)",fontSize:11},children:e("prompt.recallLimitHint")})]}),(0,o.jsx)(s.A,{color:e7?"blue":"default",style:{margin:0,maxWidth:240,overflow:"hidden",textOverflow:"ellipsis"},children:e7?"@".concat(e7):e("prompt.inputAtKeyword")})]}),eK?(0,o.jsxs)("div",{style:{padding:14,color:"var(--colorTextSecondary)",fontSize:12},children:[(0,o.jsx)(f.A,{size:"small",style:{marginRight:8}}),e("prompt.loadingKbFiles")]}):0===e_.length?(0,o.jsx)("div",{style:{padding:14,color:"var(--colorTextSecondary)",fontSize:12},children:e("prompt.noRecallableKbFiles")}):0===tn.length?(0,o.jsx)("div",{style:{padding:14,color:"var(--colorTextSecondary)",fontSize:12},children:eG?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(f.A,{size:"small",style:{marginRight:8}}),e("prompt.searchingKbContent")]}):e("prompt.noMatchingKbFiles")}):(0,o.jsxs)(o.Fragment,{children:[eG&&(0,o.jsxs)("div",{style:{padding:"8px 12px",color:"var(--colorTextSecondary)",fontSize:12,borderBottom:"1px solid var(--colorBorderSecondary)"},children:[(0,o.jsx)(f.A,{size:"small",style:{marginRight:8}}),e("prompt.continueSearchingKb")]}),tn.slice(0,30).map(t=>(0,o.jsxs)("div",{onMouseDown:e=>{var r;e.preventDefault(),r=t.relativePath,eU(e=>e.includes(r)?e:[...e,r]),eR(e=>e.replace(/(^|\s)@([^\s@]*)$/,"$1@".concat(r," "))),eq(!1)},style:{padding:"10px 12px",cursor:"pointer",borderBottom:"1px solid var(--colorBorderSecondary)",fontSize:12,display:"grid",gridTemplateColumns:"22px minmax(0, 1fr) auto",gap:10,alignItems:"center"},children:[(0,o.jsx)("div",{style:{width:22,height:22,borderRadius:7,background:"var(--colorFillSecondary)",display:"flex",alignItems:"center",justifyContent:"center"},children:(0,o.jsx)(A.A,{style:{color:"var(--colorAccent)"}})}),(0,o.jsxs)("div",{style:{minWidth:0},children:[(0,o.jsx)("div",{style:{color:"var(--colorText)",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",fontWeight:700},children:t.relativePath}),(0,o.jsxs)("div",{style:{color:"var(--colorTextSecondary)",fontSize:11,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:[t.category||e("prompt.unclassified")," \xb7 ",t.format||e("prompt.unknownFormat"),"number"==typeof t.score?" \xb7 score ".concat(t.score.toFixed(2)):""]})]}),(0,o.jsxs)(i.A,{size:4,children:[(0,o.jsx)(s.A,{color:"content"===t.matchedBy?"purple":"disk"===t.matchedBy?"orange":"blue",style:{margin:0},children:"content"===t.matchedBy?e("prompt.contentMatch"):"disk"===t.matchedBy?e("prompt.diskFile"):e("prompt.fileMatch")}),(0,o.jsx)(s.A,{style:{margin:0},children:t.status})]})]},t.relativePath))]})]}),(0,o.jsxs)("div",{style:{display:"flex",gap:8,alignItems:"flex-end"},children:[(0,o.jsx)(x.A.TextArea,{value:eO,onChange:e=>{let t=e.target.value;eR(t),eq(null!==Z(t))},onFocus:()=>eq(null!==Z(eO)),onPressEnter:e=>{e.shiftKey||(e.preventDefault(),tp())},disabled:eH,placeholder:e("prompt.mentionRecallPlaceholder"),autoSize:{minRows:2,maxRows:5},style:{fontSize:13,lineHeight:1.6}}),(0,o.jsx)(d.Ay,{type:"primary",icon:(0,o.jsx)(I.A,{}),loading:eH,disabled:!eO.trim(),onClick:()=>{tp()},children:e("prompt.send")})]})]})]})]})]})}}},e=>{e.O(0,[717,883,700,44,195,260,636,593,792],()=>e(e.s=27549)),_N_E=e.O()}]);
|
package/.next/static/chunks/pages/{settings-810eb1a6cf1a6b02.js → settings-17632b1471b4862f.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[199],{7368:(e,r,t)=>{"use strict";t.r(r),t.d(r,{default:()=>b});var s=t(65321),a=t(97109),o=t(48321),l=t(49759),c=t(88762),i=t(99605),n=t(73340),d=t(1278);let x=(0,d.A)("Monitor",[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]]);var v=t(56733),m=t(38300);let h=(0,d.A)("Server",[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]]);var g=t(87824);let p=(0,d.A)("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);var u=t(6578);function b(){var e,r,t,d,b,y;let j=(0,o.Vr)("settings"),{theme:N,resolvedTheme:T,setTheme:f}=(0,l.D)(),{locale:k,setLocale:w}=(0,o.x_)(),[S,C]=(0,a.useState)(null),[B,z]=(0,a.useState)(null),[A,_]=(0,a.useState)(null),[D,M]=(0,a.useState)(!0);(0,a.useEffect)(()=>{M(!0),Promise.all([(0,u.FC)().catch(()=>null),(0,u.le)().catch(()=>null),(0,u.II)().catch(()=>null)]).then(e=>{let[r,t,s]=e;C(r),z(t),_(s)}).finally(()=>M(!1))},[]);let H="system"===N?"system":T;return D?(0,s.jsxs)("div",{className:"space-y-12 animateFadeIn",children:[(0,s.jsx)(c.A,{active:!0,title:!0,paragraph:{rows:1}}),(0,s.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-8",children:Array.from({length:4}).map((e,r)=>(0,s.jsx)("div",{className:"p-6 border border-[var(--borderColor)]",children:(0,s.jsx)(c.A,{active:!0,paragraph:{rows:4}})},r))})]}):(0,s.jsxs)("div",{className:"space-y-12 animateFadeIn",children:[(0,s.jsxs)("div",{className:"pb-6 border-b border-[var(--borderColor)]",children:[(0,s.jsx)("h1",{className:"text-3xl font-extrabold tracking-tight text-[var(--colorText)] mb-2",children:j("title")}),(0,s.jsx)("p",{className:"text-sm text-[var(--colorTextSecondary)]",children:j("description")})]}),(0,s.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-x-12 gap-y-16",children:[(0,s.jsxs)("div",{children:[(0,s.jsxs)("div",{className:"flex items-center gap-3 mb-6",children:[(0,s.jsx)(n.A,{size:20,className:"text-[var(--colorTextTertiary)]"}),(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"font-semibold text-base",children:j("language")}),(0,s.jsx)("div",{className:"text-xs text-[var(--colorTextSecondary)] mt-1",children:j("languageDesc")})]})]}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)("button",{className:"px-4 py-2 text-sm font-medium rounded-md border transition-colors ".concat("zh-CN"===k?"bg-[var(--colorText)] text-[var(--colorBg)] border-transparent":"bg-transparent text-[var(--colorTextSecondary)] border-[var(--borderColor)] hover:border-[var(--colorTextTertiary)]"),onClick:()=>w("zh-CN"),children:"中文"}),(0,s.jsx)("button",{className:"px-4 py-2 text-sm font-medium rounded-md border transition-colors ".concat("en-US"===k?"bg-[var(--colorText)] text-[var(--colorBg)] border-transparent":"bg-transparent text-[var(--colorTextSecondary)] border-[var(--borderColor)] hover:border-[var(--colorTextTertiary)]"),onClick:()=>w("en-US"),children:"English"})]})]}),(0,s.jsxs)("div",{children:[(0,s.jsxs)("div",{className:"flex items-center gap-3 mb-6",children:[(0,s.jsx)(x,{size:20,className:"text-[var(--colorTextTertiary)]"}),(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"font-semibold text-base",children:j("theme")}),(0,s.jsx)("div",{className:"text-xs text-[var(--colorTextSecondary)] mt-1",children:j("themeDesc")})]})]}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsxs)("button",{className:"flex items-center gap-2 px-4 py-2 text-sm font-medium rounded-md border transition-colors ".concat("light"===H?"bg-[var(--colorText)] text-[var(--colorBg)] border-transparent":"bg-transparent text-[var(--colorTextSecondary)] border-[var(--borderColor)] hover:border-[var(--colorTextTertiary)]"),onClick:()=>f("light"),children:[(0,s.jsx)(v.A,{size:14}),j("light")]}),(0,s.jsxs)("button",{className:"flex items-center gap-2 px-4 py-2 text-sm font-medium rounded-md border transition-colors ".concat("dark"===H?"bg-[var(--colorText)] text-[var(--colorBg)] border-transparent":"bg-transparent text-[var(--colorTextSecondary)] border-[var(--borderColor)] hover:border-[var(--colorTextTertiary)]"),onClick:()=>f("dark"),children:[(0,s.jsx)(m.A,{size:14}),j("dark")]}),(0,s.jsxs)("button",{className:"flex items-center gap-2 px-4 py-2 text-sm font-medium rounded-md border transition-colors ".concat("system"===H?"bg-[var(--colorText)] text-[var(--colorBg)] border-transparent":"bg-transparent text-[var(--colorTextSecondary)] border-[var(--borderColor)] hover:border-[var(--colorTextTertiary)]"),onClick:()=>f("system"),children:[(0,s.jsx)(x,{size:14}),j("system")]})]})]}),(0,s.jsxs)("div",{children:[(0,s.jsxs)("div",{className:"flex items-center gap-3 mb-6",children:[(0,s.jsx)(h,{size:20,className:"text-[var(--colorTextTertiary)]"}),(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"font-semibold text-base",children:j("serverStatus")}),(0,s.jsx)("div",{className:"text-xs text-[var(--colorTextSecondary)] mt-1",children:j("serverStatusDesc")})]})]}),(0,s.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,s.jsxs)("div",{className:"p-4 bg-[var(--colorBgHover)] rounded-lg",children:[(0,s.jsx)("div",{className:"text-xs text-[var(--colorTextTertiary)] uppercase tracking-wider mb-2",children:j("status")}),(0,s.jsx)("div",{className:"font-semibold ".concat((null==B?void 0:B.status)==="ok"?"text-[var(--colorOk)]":"text-[var(--colorDanger)]"),children:(null==B?void 0:B.status)==="ok"?j("healthy"):j("unknown")})]}),(0,s.jsxs)("div",{className:"p-4 bg-[var(--colorBgHover)] rounded-lg",children:[(0,s.jsx)("div",{className:"text-xs text-[var(--colorTextTertiary)] uppercase tracking-wider mb-2",children:j("uptime")}),(0,s.jsx)("div",{className:"font-semibold text-[var(--colorText)]",children:B?(e=>{let r=Math.floor(e/86400),t=Math.floor(e%86400/3600),s=Math.floor(e%3600/60);return r>0?"".concat(r," ").concat(j("days")," ").concat(t," ").concat(j("hours")):t>0?"".concat(t," ").concat(j("hours")," ").concat(s," ").concat(j("minutes")):"".concat(s," ").concat(j("minutes"))})(B.uptime):"—"})]}),(0,s.jsxs)("div",{className:"col-span-2 p-4 bg-[var(--colorBgHover)] rounded-lg flex items-center gap-6",children:[(0,s.jsx)(i.A,{type:"dashboard",percent:null!=(e=null==S?void 0:S.cpu.usagePercent)?e:0,size:48,strokeColor:(null!=(r=null==S?void 0:S.cpu.usagePercent)?r:0)>80?"var(--colorDanger)":"var(--colorText)",strokeWidth:12,showInfo:!1}),(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"text-xs text-[var(--colorTextTertiary)] uppercase tracking-wider mb-1",children:j("cpu")}),(0,s.jsxs)("div",{className:"font-mono text-[var(--colorText)]",children:[S?"".concat(S.cpu.usagePercent.toFixed(1),"%"):"—"," ",(0,s.jsxs)("span",{className:"text-xs text-[var(--colorTextTertiary)] ml-1",children:["(",null!=(t=null==S?void 0:S.cpu.cores)?t:0," ",j("cores"),")"]})]})]})]}),(0,s.jsxs)("div",{className:"col-span-2 p-4 bg-[var(--colorBgHover)] rounded-lg flex items-center gap-6",children:[(0,s.jsx)(i.A,{type:"dashboard",percent:null!=(d=null==S?void 0:S.memory.usagePercent)?d:0,size:48,strokeColor:(null!=(b=null==S?void 0:S.memory.usagePercent)?b:0)>80?"var(--colorDanger)":"var(--colorTextSecondary)",strokeWidth:12,showInfo:!1}),(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"text-xs text-[var(--colorTextTertiary)] uppercase tracking-wider mb-1",children:j("memory")}),(0,s.jsxs)("div",{className:"font-mono text-[var(--colorText)]",children:[S?"".concat(S.memory.processMB," MB"):"—"," ",(0,s.jsxs)("span",{className:"text-xs text-[var(--colorTextTertiary)] ml-1",children:["/ ",null!=(y=null==S?void 0:S.memory.totalMB)?y:0," MB"]})]})]})]})]})]}),(0,s.jsxs)("div",{children:[(0,s.jsxs)("div",{className:"flex items-center gap-3 mb-6",children:[(0,s.jsx)(g.A,{size:20,className:"text-[var(--colorTextTertiary)]"}),(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"font-semibold text-base",children:j("embeddingConfig")}),(0,s.jsx)("div",{className:"text-xs text-[var(--colorTextSecondary)] mt-1",children:j("embeddingConfigDesc")})]})]}),(0,s.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,s.jsxs)("div",{className:"col-span-2 p-4 bg-[var(--colorBgHover)] rounded-lg",children:[(0,s.jsx)("div",{className:"text-xs text-[var(--colorTextTertiary)] uppercase tracking-wider mb-2",children:j("provider")}),(0,s.jsx)("div",{className:"font-mono text-sm text-[var(--colorText)]",children:(null==A?void 0:A.provider)||"—"})]}),(0,s.jsxs)("div",{className:"col-span-2 p-4 bg-[var(--colorBgHover)] rounded-lg",children:[(0,s.jsx)("div",{className:"text-xs text-[var(--colorTextTertiary)] uppercase tracking-wider mb-2",children:j("model")}),(0,s.jsx)("div",{className:"font-mono text-sm text-[var(--colorText)] truncate",children:(null==A?void 0:A.model)||"—"})]}),(0,s.jsxs)("div",{className:"p-4 bg-[var(--colorBgHover)] rounded-lg",children:[(0,s.jsx)("div",{className:"text-xs text-[var(--colorTextTertiary)] uppercase tracking-wider mb-2",children:j("apiKey")}),(0,s.jsx)("div",{className:"font-semibold ".concat((null==A?void 0:A.hasApiKey)?"text-[var(--colorOk)]":"text-[var(--colorTextSecondary)]"),children:(null==A?void 0:A.hasApiKey)?j("configured"):j("none")})]}),(0,s.jsxs)("div",{className:"p-4 bg-[var(--colorBgHover)] rounded-lg",children:[(0,s.jsx)("div",{className:"text-xs text-[var(--colorTextTertiary)] uppercase tracking-wider mb-2",children:j("dimensions")}),(0,s.jsx)("div",{className:"font-mono text-[var(--colorText)]",children:(null==A?void 0:A.dimensions)?"".concat(A.dimensions):"—"})]})]})]}),(0,s.jsxs)("div",{className:"col-span-1 md:col-span-2 pt-8 border-t border-[var(--borderColor)]",children:[(0,s.jsxs)("div",{className:"flex items-center gap-3 mb-6",children:[(0,s.jsx)(p,{size:20,className:"text-[var(--colorTextTertiary)]"}),(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"font-semibold text-base",children:j("localData")}),(0,s.jsx)("div",{className:"text-xs text-[var(--colorTextSecondary)] mt-1",children:j("localDataDesc")})]})]}),(0,s.jsx)("div",{className:"grid grid-cols-2 sm:grid-cols-4 gap-4",children:[{label:j("directory"),value:"~/.customize-agent/",mono:!0},{label:j("knowledgeBase"),value:j("localVectors")},{label:j("tasks"),value:S?S.tasks.total.toLocaleString():"—"},{label:j("tokens"),value:S?S.tokens.total.toLocaleString():"—"}].map(e=>(0,s.jsxs)("div",{className:"p-4 bg-[var(--colorBgHover)] rounded-lg",children:[(0,s.jsx)("div",{className:"text-[10px] text-[var(--colorTextTertiary)] uppercase tracking-wider mb-2",children:e.label}),(0,s.jsx)("div",{className:"text-sm ".concat(e.mono?"font-mono":"font-medium"," text-[var(--colorText)] truncate"),title:e.value,children:e.value})]},e.label))})]})]})]})}},58451:(e,r,t)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/settings",function(){return t(7368)}])}},e=>{e.O(0,[636,593,792],()=>e(e.s=58451)),_N_E=e.O()}]);
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[199],{7368:(e,r,t)=>{"use strict";t.r(r),t.d(r,{default:()=>b});var s=t(65321),a=t(97109),o=t(47085),l=t(49759),c=t(88762),i=t(99605),n=t(73340),d=t(1278);let x=(0,d.A)("Monitor",[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]]);var v=t(56733),m=t(38300);let h=(0,d.A)("Server",[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]]);var g=t(87824);let p=(0,d.A)("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);var u=t(6578);function b(){var e,r,t,d,b,y;let j=(0,o.Vr)("settings"),{theme:N,resolvedTheme:T,setTheme:f}=(0,l.D)(),{locale:k,setLocale:w}=(0,o.x_)(),[S,C]=(0,a.useState)(null),[B,z]=(0,a.useState)(null),[A,_]=(0,a.useState)(null),[D,M]=(0,a.useState)(!0);(0,a.useEffect)(()=>{M(!0),Promise.all([(0,u.FC)().catch(()=>null),(0,u.le)().catch(()=>null),(0,u.II)().catch(()=>null)]).then(e=>{let[r,t,s]=e;C(r),z(t),_(s)}).finally(()=>M(!1))},[]);let H="system"===N?"system":T;return D?(0,s.jsxs)("div",{className:"space-y-12 animateFadeIn",children:[(0,s.jsx)(c.A,{active:!0,title:!0,paragraph:{rows:1}}),(0,s.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-8",children:Array.from({length:4}).map((e,r)=>(0,s.jsx)("div",{className:"p-6 border border-[var(--borderColor)]",children:(0,s.jsx)(c.A,{active:!0,paragraph:{rows:4}})},r))})]}):(0,s.jsxs)("div",{className:"space-y-12 animateFadeIn",children:[(0,s.jsxs)("div",{className:"pb-6 border-b border-[var(--borderColor)]",children:[(0,s.jsx)("h1",{className:"text-3xl font-extrabold tracking-tight text-[var(--colorText)] mb-2",children:j("title")}),(0,s.jsx)("p",{className:"text-sm text-[var(--colorTextSecondary)]",children:j("description")})]}),(0,s.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-x-12 gap-y-16",children:[(0,s.jsxs)("div",{children:[(0,s.jsxs)("div",{className:"flex items-center gap-3 mb-6",children:[(0,s.jsx)(n.A,{size:20,className:"text-[var(--colorTextTertiary)]"}),(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"font-semibold text-base",children:j("language")}),(0,s.jsx)("div",{className:"text-xs text-[var(--colorTextSecondary)] mt-1",children:j("languageDesc")})]})]}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)("button",{className:"px-4 py-2 text-sm font-medium rounded-md border transition-colors ".concat("zh-CN"===k?"bg-[var(--colorText)] text-[var(--colorBg)] border-transparent":"bg-transparent text-[var(--colorTextSecondary)] border-[var(--borderColor)] hover:border-[var(--colorTextTertiary)]"),onClick:()=>w("zh-CN"),children:"中文"}),(0,s.jsx)("button",{className:"px-4 py-2 text-sm font-medium rounded-md border transition-colors ".concat("en-US"===k?"bg-[var(--colorText)] text-[var(--colorBg)] border-transparent":"bg-transparent text-[var(--colorTextSecondary)] border-[var(--borderColor)] hover:border-[var(--colorTextTertiary)]"),onClick:()=>w("en-US"),children:"English"})]})]}),(0,s.jsxs)("div",{children:[(0,s.jsxs)("div",{className:"flex items-center gap-3 mb-6",children:[(0,s.jsx)(x,{size:20,className:"text-[var(--colorTextTertiary)]"}),(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"font-semibold text-base",children:j("theme")}),(0,s.jsx)("div",{className:"text-xs text-[var(--colorTextSecondary)] mt-1",children:j("themeDesc")})]})]}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsxs)("button",{className:"flex items-center gap-2 px-4 py-2 text-sm font-medium rounded-md border transition-colors ".concat("light"===H?"bg-[var(--colorText)] text-[var(--colorBg)] border-transparent":"bg-transparent text-[var(--colorTextSecondary)] border-[var(--borderColor)] hover:border-[var(--colorTextTertiary)]"),onClick:()=>f("light"),children:[(0,s.jsx)(v.A,{size:14}),j("light")]}),(0,s.jsxs)("button",{className:"flex items-center gap-2 px-4 py-2 text-sm font-medium rounded-md border transition-colors ".concat("dark"===H?"bg-[var(--colorText)] text-[var(--colorBg)] border-transparent":"bg-transparent text-[var(--colorTextSecondary)] border-[var(--borderColor)] hover:border-[var(--colorTextTertiary)]"),onClick:()=>f("dark"),children:[(0,s.jsx)(m.A,{size:14}),j("dark")]}),(0,s.jsxs)("button",{className:"flex items-center gap-2 px-4 py-2 text-sm font-medium rounded-md border transition-colors ".concat("system"===H?"bg-[var(--colorText)] text-[var(--colorBg)] border-transparent":"bg-transparent text-[var(--colorTextSecondary)] border-[var(--borderColor)] hover:border-[var(--colorTextTertiary)]"),onClick:()=>f("system"),children:[(0,s.jsx)(x,{size:14}),j("system")]})]})]}),(0,s.jsxs)("div",{children:[(0,s.jsxs)("div",{className:"flex items-center gap-3 mb-6",children:[(0,s.jsx)(h,{size:20,className:"text-[var(--colorTextTertiary)]"}),(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"font-semibold text-base",children:j("serverStatus")}),(0,s.jsx)("div",{className:"text-xs text-[var(--colorTextSecondary)] mt-1",children:j("serverStatusDesc")})]})]}),(0,s.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,s.jsxs)("div",{className:"p-4 bg-[var(--colorBgHover)] rounded-lg",children:[(0,s.jsx)("div",{className:"text-xs text-[var(--colorTextTertiary)] uppercase tracking-wider mb-2",children:j("status")}),(0,s.jsx)("div",{className:"font-semibold ".concat((null==B?void 0:B.status)==="ok"?"text-[var(--colorOk)]":"text-[var(--colorDanger)]"),children:(null==B?void 0:B.status)==="ok"?j("healthy"):j("unknown")})]}),(0,s.jsxs)("div",{className:"p-4 bg-[var(--colorBgHover)] rounded-lg",children:[(0,s.jsx)("div",{className:"text-xs text-[var(--colorTextTertiary)] uppercase tracking-wider mb-2",children:j("uptime")}),(0,s.jsx)("div",{className:"font-semibold text-[var(--colorText)]",children:B?(e=>{let r=Math.floor(e/86400),t=Math.floor(e%86400/3600),s=Math.floor(e%3600/60);return r>0?"".concat(r," ").concat(j("days")," ").concat(t," ").concat(j("hours")):t>0?"".concat(t," ").concat(j("hours")," ").concat(s," ").concat(j("minutes")):"".concat(s," ").concat(j("minutes"))})(B.uptime):"—"})]}),(0,s.jsxs)("div",{className:"col-span-2 p-4 bg-[var(--colorBgHover)] rounded-lg flex items-center gap-6",children:[(0,s.jsx)(i.A,{type:"dashboard",percent:null!=(e=null==S?void 0:S.cpu.usagePercent)?e:0,size:48,strokeColor:(null!=(r=null==S?void 0:S.cpu.usagePercent)?r:0)>80?"var(--colorDanger)":"var(--colorText)",strokeWidth:12,showInfo:!1}),(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"text-xs text-[var(--colorTextTertiary)] uppercase tracking-wider mb-1",children:j("cpu")}),(0,s.jsxs)("div",{className:"font-mono text-[var(--colorText)]",children:[S?"".concat(S.cpu.usagePercent.toFixed(1),"%"):"—"," ",(0,s.jsxs)("span",{className:"text-xs text-[var(--colorTextTertiary)] ml-1",children:["(",null!=(t=null==S?void 0:S.cpu.cores)?t:0," ",j("cores"),")"]})]})]})]}),(0,s.jsxs)("div",{className:"col-span-2 p-4 bg-[var(--colorBgHover)] rounded-lg flex items-center gap-6",children:[(0,s.jsx)(i.A,{type:"dashboard",percent:null!=(d=null==S?void 0:S.memory.usagePercent)?d:0,size:48,strokeColor:(null!=(b=null==S?void 0:S.memory.usagePercent)?b:0)>80?"var(--colorDanger)":"var(--colorTextSecondary)",strokeWidth:12,showInfo:!1}),(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"text-xs text-[var(--colorTextTertiary)] uppercase tracking-wider mb-1",children:j("memory")}),(0,s.jsxs)("div",{className:"font-mono text-[var(--colorText)]",children:[S?"".concat(S.memory.processMB," MB"):"—"," ",(0,s.jsxs)("span",{className:"text-xs text-[var(--colorTextTertiary)] ml-1",children:["/ ",null!=(y=null==S?void 0:S.memory.totalMB)?y:0," MB"]})]})]})]})]})]}),(0,s.jsxs)("div",{children:[(0,s.jsxs)("div",{className:"flex items-center gap-3 mb-6",children:[(0,s.jsx)(g.A,{size:20,className:"text-[var(--colorTextTertiary)]"}),(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"font-semibold text-base",children:j("embeddingConfig")}),(0,s.jsx)("div",{className:"text-xs text-[var(--colorTextSecondary)] mt-1",children:j("embeddingConfigDesc")})]})]}),(0,s.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,s.jsxs)("div",{className:"col-span-2 p-4 bg-[var(--colorBgHover)] rounded-lg",children:[(0,s.jsx)("div",{className:"text-xs text-[var(--colorTextTertiary)] uppercase tracking-wider mb-2",children:j("provider")}),(0,s.jsx)("div",{className:"font-mono text-sm text-[var(--colorText)]",children:(null==A?void 0:A.provider)||"—"})]}),(0,s.jsxs)("div",{className:"col-span-2 p-4 bg-[var(--colorBgHover)] rounded-lg",children:[(0,s.jsx)("div",{className:"text-xs text-[var(--colorTextTertiary)] uppercase tracking-wider mb-2",children:j("model")}),(0,s.jsx)("div",{className:"font-mono text-sm text-[var(--colorText)] truncate",children:(null==A?void 0:A.model)||"—"})]}),(0,s.jsxs)("div",{className:"p-4 bg-[var(--colorBgHover)] rounded-lg",children:[(0,s.jsx)("div",{className:"text-xs text-[var(--colorTextTertiary)] uppercase tracking-wider mb-2",children:j("apiKey")}),(0,s.jsx)("div",{className:"font-semibold ".concat((null==A?void 0:A.hasApiKey)?"text-[var(--colorOk)]":"text-[var(--colorTextSecondary)]"),children:(null==A?void 0:A.hasApiKey)?j("configured"):j("none")})]}),(0,s.jsxs)("div",{className:"p-4 bg-[var(--colorBgHover)] rounded-lg",children:[(0,s.jsx)("div",{className:"text-xs text-[var(--colorTextTertiary)] uppercase tracking-wider mb-2",children:j("dimensions")}),(0,s.jsx)("div",{className:"font-mono text-[var(--colorText)]",children:(null==A?void 0:A.dimensions)?"".concat(A.dimensions):"—"})]})]})]}),(0,s.jsxs)("div",{className:"col-span-1 md:col-span-2 pt-8 border-t border-[var(--borderColor)]",children:[(0,s.jsxs)("div",{className:"flex items-center gap-3 mb-6",children:[(0,s.jsx)(p,{size:20,className:"text-[var(--colorTextTertiary)]"}),(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"font-semibold text-base",children:j("localData")}),(0,s.jsx)("div",{className:"text-xs text-[var(--colorTextSecondary)] mt-1",children:j("localDataDesc")})]})]}),(0,s.jsx)("div",{className:"grid grid-cols-2 sm:grid-cols-4 gap-4",children:[{label:j("directory"),value:"~/.customize-agent/",mono:!0},{label:j("knowledgeBase"),value:j("localVectors")},{label:j("tasks"),value:S?S.tasks.total.toLocaleString():"—"},{label:j("tokens"),value:S?S.tokens.total.toLocaleString():"—"}].map(e=>(0,s.jsxs)("div",{className:"p-4 bg-[var(--colorBgHover)] rounded-lg",children:[(0,s.jsx)("div",{className:"text-[10px] text-[var(--colorTextTertiary)] uppercase tracking-wider mb-2",children:e.label}),(0,s.jsx)("div",{className:"text-sm ".concat(e.mono?"font-mono":"font-medium"," text-[var(--colorText)] truncate"),title:e.value,children:e.value})]},e.label))})]})]})]})}},58451:(e,r,t)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/settings",function(){return t(7368)}])}},e=>{e.O(0,[636,593,792],()=>e(e.s=58451)),_N_E=e.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[979],{7225:(e,r,t)=>{"use strict";t.r(r),t.d(r,{default:()=>A});var a=t(65321),s=t(97109),o=t(35292),l=t(9137),n=t(11702),c=t(88762),i=t(7576),d=t(85114),x=t(26171),m=t(21289),g=t(84253),p=t(30486),u=t(99811),f=t(58209),h=t(12446),v=t(88483);function b(){return(b=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a])}return e}).apply(this,arguments)}let y=s.forwardRef((e,r)=>s.createElement(v.A,b({},e,{ref:r,icon:h.A})));var w=t(47085),j=t(6578);let{Text:N}=o.A;function A(){let e=(0,w.Vr)(),[r,t]=(0,s.useState)([]),[o,h]=(0,s.useState)(!0),[v,b]=(0,s.useState)(""),A=async()=>{h(!0);try{t((await (0,j.oH)(500)).logs)}catch(e){l.Ay.error(e instanceof Error?e.message:"加载日志失败")}finally{h(!1)}};(0,s.useEffect)(()=>{A()},[]);let C=(0,s.useMemo)(()=>{let e=v.trim().toLowerCase();return e?r.filter(r=>[r.id,r.level,r.source,r.functionName,r.message,r.stack].filter(Boolean).some(r=>String(r).toLowerCase().includes(e))):r},[v,r]),k=[{title:e("logs.time"),dataIndex:"createdAt",width:160,render:e=>(0,a.jsx)("span",{className:"text-xs text-[var(--colorTextSecondary)] font-mono",children:new Date(e).toLocaleString()})},{title:e("logs.level"),dataIndex:"level",width:80,render:e=>(0,a.jsx)(n.A,{color:"error"===e?"error":"warn"===e?"warning":"blue",className:"m-0 text-[10px] uppercase tracking-wider border-0",children:e})},{title:e("logs.source"),dataIndex:"source",width:220,render:e=>(0,a.jsx)("span",{className:"text-xs font-mono text-[var(--colorTextSecondary)] break-all",children:e})},{title:e("logs.message"),dataIndex:"message",render:e=>(0,a.jsx)("div",{className:"text-sm text-[var(--colorText)] max-w-3xl whitespace-normal break-words leading-relaxed",title:e,children:e})},{title:e("logs.requestId"),dataIndex:"id",width:120,render:e=>(0,a.jsx)(N,{copyable:!0,className:"text-[10px] font-mono text-[var(--colorTextTertiary)]",children:e.slice(0,8)})}];return o&&0===r.length?(0,a.jsxs)("div",{className:"space-y-8 animateFadeIn",children:[(0,a.jsx)(c.A,{active:!0,title:!0,paragraph:{rows:1}}),(0,a.jsx)(c.A,{active:!0,paragraph:{rows:12}})]}):(0,a.jsxs)("div",{className:"h-[calc(100vh-140px)] flex flex-col",children:[(0,a.jsxs)("div",{className:"flex flex-col md:flex-row md:items-center justify-between gap-4 pb-4 border-b border-[var(--borderColor)] shrink-0 animateFadeIn",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("h1",{className:"text-2xl font-bold tracking-tight text-[var(--colorText)] mb-1",children:e("nav.systemLogs")}),(0,a.jsx)("p",{className:"text-xs text-[var(--colorTextSecondary)]",children:e("logs.monitorSystem")})]}),(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)(i.A,{placeholder:e("logs.searchLogs"),prefix:(0,a.jsx)(p.A,{className:"text-[var(--colorTextTertiary)]"}),value:v,onChange:e=>b(e.target.value),allowClear:!0,className:"w-[260px] bg-[var(--colorBgHover)] border-transparent"}),(0,a.jsx)(d.Ay,{icon:(0,a.jsx)(u.A,{}),loading:o,onClick:()=>void A(),className:"shadow-none",children:e("logs.refresh")}),(0,a.jsx)(x.A,{title:e("logs.clearConfirm"),onConfirm:()=>{(async()=>{await (0,j.hH)(),l.Ay.success(e("common.success")),await A()})()},children:(0,a.jsx)(d.Ay,{danger:!0,icon:(0,a.jsx)(f.A,{}),className:"shadow-none border-transparent",children:e("logs.clear")})})]})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2 py-3 px-1 text-xs text-[var(--colorTextTertiary)] shrink-0 animateFadeIn stagger-1",children:[(0,a.jsx)(y,{})," ",e("logs.logStorageInfo")," ",(0,a.jsx)("code",{className:"bg-[var(--colorBgHover)] px-1 rounded",children:"~/.customize-agent/logs/errors.jsonl"}),". ",e("logs.maxLoaded")]}),(0,a.jsx)("div",{className:"flex-1 overflow-hidden bg-[var(--colorBg)] rounded-lg animateFadeIn stagger-2",children:(0,a.jsx)(m.A,{rowKey:"id",loading:o,dataSource:C,columns:k,size:"middle",className:"h-full modern-table",scroll:{y:"calc(100vh - 280px)"},locale:{emptyText:(0,a.jsx)(g.A,{description:e("logs.noLogsFound"),className:"py-20"})},pagination:!1,rowClassName:"hover:bg-[var(--colorBgHover)] transition-colors cursor-pointer",expandable:{expandedRowRender:r=>(0,a.jsxs)("div",{className:"flex flex-col gap-4 p-4 bg-[var(--colorBgHover)]/50 border-t border-[var(--borderColor)]",children:[r.functionName&&(0,a.jsxs)("div",{className:"text-xs text-[var(--colorTextSecondary)]",children:[(0,a.jsx)("span",{className:"font-semibold uppercase tracking-wider text-[var(--colorTextTertiary)] mr-2",children:e("logs.function")}),(0,a.jsx)("code",{className:"font-mono bg-[var(--colorBgElevated)] px-2 py-1 rounded",children:r.functionName})]}),r.request&&(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"text-[10px] font-semibold uppercase tracking-wider text-[var(--colorTextTertiary)] mb-2",children:e("logs.requestContext")}),(0,a.jsx)("pre",{className:"text-xs font-mono bg-[var(--colorBgElevated)] p-3 rounded-md border border-[var(--borderColor)] whitespace-pre-wrap break-all m-0 text-[var(--colorTextSecondary)]",children:JSON.stringify(r.request,null,2)})]}),void 0!==r.meta&&(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"text-[10px] font-semibold uppercase tracking-wider text-[var(--colorTextTertiary)] mb-2",children:e("logs.metadata")}),(0,a.jsx)("pre",{className:"text-xs font-mono bg-[var(--colorBgElevated)] p-3 rounded-md border border-[var(--borderColor)] whitespace-pre-wrap break-all m-0 text-[var(--colorTextSecondary)]",children:JSON.stringify(r.meta,null,2)})]}),r.stack&&(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"text-[10px] font-semibold uppercase tracking-wider text-[var(--colorTextTertiary)] mb-2",children:e("logs.stackTrace")}),(0,a.jsx)("pre",{className:"text-[11px] font-mono bg-[#1e1e1e] text-[#d4d4d4] p-3 rounded-md overflow-x-auto m-0 leading-relaxed",children:r.stack})]})]})}})})]})}},9137:(e,r,t)=>{"use strict";t.d(r,{Ay:()=>C});var a=t(9750),s=t(97109),o=t(42644),l=t(10252),n=t(74567),c=t(48921),i=t(98379),d=t(3638),x=t(632),m=t(34475),g=t(52093),p=t(60815),u=t(5741);let f=null,h=e=>e(),v=[],b={};function y(){let{getContainer:e,duration:r,rtl:t,maxCount:a,top:s,stack:o}=b,l=e?.()||document.body;return{getContainer:()=>l,duration:r,rtl:t,maxCount:a,top:s,stack:o}}let w=s.forwardRef((e,r)=>{let{messageConfig:t,sync:a}=e,{getPrefixCls:o}=(0,s.useContext)(n.QO),c=b.prefixCls||o("message"),i=(0,s.useContext)(l.B),[d,x]=(0,p.y)({...t,prefixCls:c,...i.message});return s.useImperativeHandle(r,()=>{let e={...d};return Object.keys(e).forEach(r=>{e[r]=(...e)=>(a(),d[r].apply(d,e))}),{instance:e,sync:a}}),x}),j=s.forwardRef((e,r)=>{let[t,a]=s.useState(y),o=()=>{a(y)};s.useEffect(o,[]);let l=(0,c.cr)(),n=l.getRootPrefixCls(),i=l.getIconPrefixCls(),d=l.getTheme(),x=s.createElement(w,{ref:r,sync:o,messageConfig:t});return s.createElement(c.Ay,{prefixCls:n,iconPrefixCls:i,theme:d},l.holderRender?l.holderRender(x):x)}),N=()=>{if(!f){let e=document.createDocumentFragment(),r={fragment:e};f=r,h(()=>{(0,o.XX)(s.createElement(j,{ref:e=>{let{instance:t,sync:a}=e||{};Promise.resolve().then(()=>{!r.instance&&t&&(r.instance=t,r.sync=a,N())})}}),e)});return}f.instance&&(v.forEach(e=>{let{type:r,skipped:t}=e;if(!t)switch(r){case"open":h(()=>{let r=f.instance.open({...b,...e.config});r?.then(e.resolve),e.setCloseFn(r)});break;case"destroy":h(()=>{f?.instance.destroy(e.key)});break;default:h(()=>{var t;let s=(t=f.instance)[r].apply(t,(0,a.A)(e.args));s?.then(e.resolve),e.setCloseFn(s)})}}),v=[])},A={open:function(e){let r=(0,u.E)(r=>{let t,a={type:"open",config:e,resolve:r,setCloseFn:e=>{t=e}};return v.push(a),()=>{t?h(()=>{t()}):a.skipped=!0}});return N(),r},destroy:e=>{v.push({type:"destroy",key:e}),N()},config:function(e){b={...b,...e},h(()=>{f?.sync?.()})},useMessage:p.A,_InternalPanelDoNotUseOrYouWillBeFired:m.Ay,_InternalListDoNotUseOrYouWillBeFired:e=>{let{items:r,classNames:t,style:a}=e,{getPrefixCls:o}=(0,n.TP)("message"),l=o("message"),c=(0,x.A)(l),[p,u]=(0,g.A)(l,c),f=`${l}-notice`,h=r.map(e=>{let{content:r,duration:t,key:a,type:s}=e,o=s?`${f}-icon-${s}`:void 0;return{key:a,duration:t,icon:(0,m.HC)(s),title:r,className:`${f}-${s}`,classNames:{wrapper:`${l}-${s}`,icon:o}}});return s.createElement(i.qb,{prefixCls:l,placement:"top",configList:h,className:(0,d.$)(p,u,c),classNames:{...t,wrapper:t?.wrapper,title:t?.title},style:a,stack:!1})}};["success","info","warning","error","loading"].forEach(e=>{A[e]=(...r)=>(function(e,r){(0,c.cr)();let t=(0,u.E)(t=>{let a,s={type:e,args:r,resolve:t,setCloseFn:e=>{a=e}};return v.push(s),()=>{a?h(()=>{a()}):s.skipped=!0}});return N(),t})(e,r)});let C=A},12446:(e,r)=>{"use strict";r.A={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attrs:{d:"M464 336a48 48 0 1096 0 48 48 0 10-96 0zm72 112h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V456c0-4.4-3.6-8-8-8z"}}]},name:"info-circle",theme:"outlined"}},14995:(e,r)=>{"use strict";r.A={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M909.1 209.3l-56.4 44.1C775.8 155.1 656.2 92 521.9 92 290 92 102.3 279.5 102 511.5 101.7 743.7 289.8 932 521.9 932c181.3 0 335.8-115 394.6-276.1 1.5-4.2-.7-8.9-4.9-10.3l-56.7-19.5a8 8 0 00-10.1 4.8c-1.8 5-3.8 10-5.9 14.9-17.3 41-42.1 77.8-73.7 109.4A344.77 344.77 0 01655.9 829c-42.3 17.9-87.4 27-133.8 27-46.5 0-91.5-9.1-133.8-27A341.5 341.5 0 01279 755.2a342.16 342.16 0 01-73.7-109.4c-17.9-42.4-27-87.4-27-133.9s9.1-91.5 27-133.9c17.3-41 42.1-77.8 73.7-109.4 31.6-31.6 68.4-56.4 109.3-73.8 42.3-17.9 87.4-27 133.8-27 46.5 0 91.5 9.1 133.8 27a341.5 341.5 0 01109.3 73.8c9.9 9.9 19.2 20.4 27.8 31.4l-60.2 47a8 8 0 003 14.1l175.6 43c5 1.2 9.9-2.6 9.9-7.7l.8-180.9c-.1-6.6-7.8-10.3-13-6.2z"}}]},name:"reload",theme:"outlined"}},39214:(e,r,t)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/system/logs",function(){return t(7225)}])},99811:(e,r,t)=>{"use strict";t.d(r,{A:()=>n});var a=t(97109),s=t(14995),o=t(88483);function l(){return(l=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a])}return e}).apply(this,arguments)}let n=a.forwardRef((e,r)=>a.createElement(o.A,l({},e,{ref:r,icon:s.A})))}},e=>{e.O(0,[717,883,69,700,44,224,102,195,289,636,593,792],()=>e(e.s=39214)),_N_E=e.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[830],{54835:(e,s,a)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/template-references",function(){return a(64373)}])},64373:(e,s,a)=>{"use strict";a.r(s),a.d(s,{default:()=>L});var r=a(65321),t=a(97109),l=a(17807),i=a(14932),n=a(85114),c=a(71102),o=a(26171),d=a(42700),x=a(68787),m=a(55184),p=a(34052),f=a(11702),u=a(99605),h=a(62934),g=a(43979),j=a(26631),v=a(89620),y=a(51430),b=a(85855),N=a(58209),T=a(4216),w=a(25171),S=a(59188),k=a(31667),A=a(47085),C=a(6578);let F=["房建","市政","公路","桥梁与隧道","水利水电","电力","机电安装","装饰装修","园林绿化","铁路","港口与航道","矿山冶金","其他"],P={房建:{base:"#1677ff"},市政:{base:"#16a34a"},公路:{base:"#ea580c"},桥梁与隧道:{base:"#dc2626"},水利水电:{base:"#0891b2"},电力:{base:"#ca8a04"},机电安装:{base:"#7c3aed"},装饰装修:{base:"#c026d3"},园林绿化:{base:"#65a30d"},铁路:{base:"#4f46e5"},港口与航道:{base:"#b45309"},矿山冶金:{base:"#db2777"},其他:{base:"#64748b"}},M=e=>(P[e]||P.其他).base;function E(e){return e>=1048576?"".concat((e/1024/1024).toFixed(1)," MB"):"".concat((e/1024).toFixed(0)," KB")}function D(e){let{value:s,label:a,accent:t}=e;return(0,r.jsxs)("div",{className:"flex items-center gap-2.5 rounded-xl border border-[var(--colorBorderSecondary)] bg-[var(--colorBgElevated)] px-4 py-2.5",children:[(0,r.jsx)("span",{className:"w-2 h-2 rounded-full shrink-0",style:{background:t}}),(0,r.jsxs)("div",{className:"leading-tight",children:[(0,r.jsx)("div",{className:"text-lg font-bold text-[var(--colorText)]",children:s}),(0,r.jsx)("div",{className:"text-[11px] text-[var(--colorTextTertiary)]",children:a})]})]})}function B(e){let{label:s,value:a,unit:t}=e;return(0,r.jsxs)("div",{className:"rounded-lg px-2 py-1.5 bg-[var(--colorFillQuaternary)] min-w-0",children:[(0,r.jsx)("div",{className:"text-[11px] text-[var(--colorTextTertiary)] truncate",children:s}),(0,r.jsxs)("div",{className:"text-sm font-bold text-[var(--colorText)] leading-tight",children:[a,t&&(0,r.jsx)("span",{className:"text-[10px] font-normal text-[var(--colorTextTertiary)] ml-0.5",children:t})]})]})}function _(e){let{active:s,color:a,label:t,onClick:l}=e;return(0,r.jsx)("button",{type:"button",onClick:l,className:"px-3 py-1.5 rounded-full text-xs font-medium border transition-all duration-150 cursor-pointer ".concat(s?"text-white shadow-sm scale-[1.03]":"hover:-translate-y-0.5 hover:shadow-sm"),style:s?{background:a,borderColor:a}:{background:"".concat(a,"14"),borderColor:"".concat(a,"33"),color:a},children:t})}function z(e){let{text:s}=e;return(0,r.jsxs)("div",{className:"flex flex-col items-center justify-center py-12 gap-3",children:[(0,r.jsx)("span",{className:"w-12 h-12 rounded-2xl flex items-center justify-center text-xl bg-[var(--colorFillSecondary)] text-[var(--colorTextTertiary)]",children:(0,r.jsx)(h.A,{})}),(0,r.jsx)("span",{className:"text-sm text-[var(--colorTextTertiary)]",children:s})]})}function R(e){let{title:s,children:a}=e;return(0,r.jsxs)("div",{className:"flex flex-col gap-2.5",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)("span",{className:"w-1 h-3.5 rounded-full bg-[var(--colorAccent)]"}),(0,r.jsx)("span",{className:"text-sm font-semibold text-[var(--colorText)]",children:s})]}),a]})}function H(e){let{label:s,range:a,kind:t}=e,l="int"===t?e=>String(Math.round(e)):"percent"===t?e=>"".concat(Math.round(100*e),"%"):e=>e.toFixed(1);return(0,r.jsxs)("div",{className:"rounded-xl px-3 py-2.5 border border-[var(--colorBorderSecondary)] bg-[var(--colorFillQuaternary)]",children:[(0,r.jsx)("div",{className:"text-[11px] text-[var(--colorTextTertiary)] mb-1 truncate",children:s}),(0,r.jsx)("div",{className:"text-sm font-bold text-[var(--colorText)]",children:l(a.avg)}),(0,r.jsxs)("div",{className:"text-[10px] text-[var(--colorTextTertiary)] mt-0.5",children:[l(a.min)," ~ ",l(a.max)]})]})}function L(){let e=(0,A.Vr)(),{message:s}=l.A.useApp(),[a,P]=(0,t.useState)([]),[L,W]=(0,t.useState)([]),[q,I]=(0,t.useState)(!0),[K,O]=(0,t.useState)(!1),[Q,U]=(0,t.useState)(void 0),[X,J]=(0,t.useState)(null),V=(0,t.useCallback)(async()=>{try{let[e,s]=await Promise.all([(0,C.BX)(),(0,C.Ej)()]);P(e.references),W(s.profiles)}catch(e){P([]),W([])}},[]);(0,t.useEffect)(()=>{V().finally(()=>I(!1))},[V]);let $=async a=>{O(!0);try{let r=await (0,C.$2)(a,Q);s.success(e("refs.uploaded")),"failed"===r.reference.status&&s.warning("".concat(r.reference.fileName,":").concat(r.reference.errorMessage||e("refs.uploadFailed"))),await V()}catch(a){s.error(a instanceof Error?a.message:e("refs.uploadFailed"))}finally{O(!1)}},G=async a=>{try{await (0,C.sB)(a.id,{isPrimary:!a.isPrimary}),await V()}catch(a){s.error(a instanceof Error?a.message:e("refs.operationFailed"))}},Y=async(a,r)=>{try{await (0,C.sB)(a.id,{projectType:r}),await V(),s.success(e("refs.typeChanged"))}catch(a){s.error(a instanceof Error?a.message:e("refs.operationFailed"))}},Z=async a=>{try{await (0,C.pJ)(a.id),await V()}catch(a){s.error(a instanceof Error?a.message:e("refs.operationFailed"))}},ee=(0,t.useMemo)(()=>a.filter(e=>"ready"===e.status).length,[a]),es=(0,t.useMemo)(()=>Q?a.filter(e=>e.projectType===Q):a,[a,Q]),ea=(0,t.useMemo)(()=>X?a.filter(e=>e.projectType===X.projectType&&"ready"===e.status):[],[a,X]),er=X?M(X.projectType):M("其他");return(0,r.jsxs)("div",{className:"p-6 max-w-7xl mx-auto",children:[(0,r.jsxs)("div",{className:"space-y-6 animateFadeIn",children:[(0,r.jsxs)("div",{className:"flex flex-col lg:flex-row lg:items-end justify-between gap-5 pb-1",children:[(0,r.jsxs)("div",{className:"max-w-3xl",children:[(0,r.jsxs)("h1",{className:"text-3xl font-extrabold tracking-tight text-[var(--colorText)] mb-2.5 flex items-center gap-2.5",children:[(0,r.jsx)("span",{className:"w-11 h-11 rounded-2xl flex items-center justify-center text-2xl bg-[var(--colorFillSecondary)]",style:{color:"var(--colorAccent)"},children:(0,r.jsx)(g.A,{})}),e("refs.title")]}),(0,r.jsx)("p",{className:"text-sm text-[var(--colorTextSecondary)] leading-relaxed",children:e("refs.description")})]}),(0,r.jsxs)("div",{className:"flex items-center gap-3 flex-wrap shrink-0",children:[(0,r.jsx)(D,{value:ee,label:e("refs.totalSamples"),accent:"#1677ff"}),(0,r.jsx)(D,{value:L.length,label:e("refs.coveredTypes"),accent:"#16a34a"}),(0,r.jsx)(D,{value:a.filter(e=>e.isPrimary).length,label:e("refs.primaryCount"),accent:"#f59e0b"})]})]}),(0,r.jsx)(x.A,{className:"rounded-2xl",styles:{body:{padding:24}},children:(0,r.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between gap-3 flex-wrap",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,r.jsx)(w.A,{className:"text-[var(--colorAccent)]"}),(0,r.jsx)("span",{className:"font-semibold text-[var(--colorText)]",children:e("refs.uploadSection")})]}),(0,r.jsxs)("span",{className:"inline-flex items-center gap-1.5 text-xs text-[var(--colorTextTertiary)]",children:[(0,r.jsx)(S.A,{style:{color:"var(--colorOk)"}}),e("refs.redLine")]})]}),(0,r.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,r.jsx)(_,{active:!Q,color:"#6366f1",label:e("refs.autoClassify"),onClick:()=>U(void 0)}),F.map(e=>(0,r.jsx)(_,{active:Q===e,color:M(e),label:e,onClick:()=>U(s=>s===e?void 0:e)},e))]}),(0,r.jsxs)(m.A.Dragger,{accept:".pdf,.docx,.doc",multiple:!1,showUploadList:!1,disabled:K,className:"!rounded-xl",customRequest:s=>{let{file:a,onSuccess:r,onError:t}=s;$(a).then(()=>null==r?void 0:r({})).catch(s=>null==t?void 0:t(s instanceof Error?s:Error(e("refs.uploadFailed"))))},children:[(0,r.jsx)("p",{className:"ant-upload-drag-icon",children:(0,r.jsx)(h.A,{})}),(0,r.jsx)("p",{className:"ant-upload-text",children:K?e("refs.uploading"):e("refs.uploadTitle")}),(0,r.jsx)("p",{className:"ant-upload-hint",children:e("refs.uploadHint")})]})]})}),(0,r.jsx)(x.A,{className:"rounded-2xl",title:(0,r.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,r.jsx)(k.A,{className:"text-[var(--colorAccent)]"}),(0,r.jsx)("span",{children:e("refs.profileTitle")}),(0,r.jsx)("span",{className:"text-xs font-normal text-[var(--colorTextTertiary)]",children:e("refs.profileSubtitle")})]}),styles:{body:{padding:24}},children:q?(0,r.jsx)(d.A,{}):0===L.length?(0,r.jsx)(z,{text:e("refs.profileNoSamples")}):(0,r.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 xl:grid-cols-3 gap-4",children:L.map(s=>{var a;let t=s.metrics,l=M(s.projectType);return(0,r.jsxs)("div",{role:"button",tabIndex:0,onClick:()=>J(s),onKeyDown:e=>{"Enter"===e.key&&J(s)},className:"group relative rounded-2xl border border-[var(--colorBorderSecondary)] bg-[var(--colorBgElevated)] overflow-hidden transition-all duration-200 hover:shadow-lg hover:-translate-y-0.5 cursor-pointer outline-none focus-visible:ring-2 focus-visible:ring-[var(--colorAccent)]",title:e("refs.profileDetail"),children:[(0,r.jsx)("div",{className:"h-1.5",style:{background:"linear-gradient(90deg, ".concat(l,", ").concat(l,"55)")}}),(0,r.jsxs)("div",{className:"p-5 flex flex-col gap-4",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2.5 min-w-0",children:[(0,r.jsx)("span",{className:"shrink-0 w-9 h-9 rounded-xl flex items-center justify-center text-base font-bold",style:{background:"".concat(l,"14"),color:l},children:s.projectType.slice(0,1)}),(0,r.jsxs)("div",{className:"min-w-0",children:[(0,r.jsx)("div",{className:"font-semibold text-[var(--colorText)] leading-tight",children:s.projectType}),(0,r.jsxs)("div",{className:"text-xs text-[var(--colorTextTertiary)] mt-0.5",children:[s.sourceCount,e("refs.profileSamples")," \xb7 ",e("refs.profileUpdated")," ",new Date(s.updatedAt).toLocaleDateString()]})]})]}),(0,r.jsx)(g.A,{className:"text-[var(--colorTextTertiary)] group-hover:text-[var(--colorAccent)] transition-colors shrink-0"})]}),(0,r.jsxs)("div",{className:"grid grid-cols-3 gap-2",children:[(0,r.jsx)(B,{label:e("refs.paramDensity"),value:t.paramDensity.avg.toFixed(1),unit:"/千字"}),(0,r.jsx)(B,{label:e("refs.arrowChain"),value:String(Math.round(100*t.arrowChainCoverage.avg)),unit:"%"}),(0,r.jsx)(B,{label:e("refs.duplication"),value:String(Math.round(100*t.duplicationRate.avg)),unit:"%"}),(0,r.jsx)(B,{label:e("refs.tables"),value:String(Math.round(t.tableCount.avg))}),(0,r.jsx)(B,{label:e("refs.sectionSubsection"),value:String(Math.round(t.sectionCount.avg)),unit:"章 \xb7 ".concat(Math.round((null==(a=t.subsectionCount)?void 0:a.avg)||0)," 节")}),(0,r.jsx)(B,{label:e("refs.words"),value:(t.avgSectionWords.avg/1e3).toFixed(1),unit:"k/章"})]}),s.typicalHeadings.length>0&&(0,r.jsx)("div",{className:"flex flex-wrap gap-1.5",children:s.typicalHeadings.slice(0,4).map(e=>(0,r.jsxs)("span",{className:"px-2 py-0.5 rounded-md text-[11px] leading-5 truncate max-w-full bg-[var(--colorFillSecondary)] text-[var(--colorTextSecondary)]",title:e.title,children:[e.title,(0,r.jsxs)("span",{className:"opacity-60 ml-1",children:[Math.round(100*e.ratio),"%"]})]},e.title))})]})]},s.projectType)})})}),(0,r.jsxs)(x.A,{className:"rounded-2xl",title:(0,r.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,r.jsx)(j.A,{className:"text-[var(--colorAccent)]"}),(0,r.jsx)("span",{children:e("refs.fileLibrary")}),(0,r.jsxs)("span",{className:"text-xs font-normal text-[var(--colorTextTertiary)]",children:[ee," / ",a.length]})]}),styles:{body:{padding:24}},children:[(0,r.jsxs)("div",{className:"flex flex-wrap gap-2 mb-5",children:[(0,r.jsx)(_,{active:!Q,color:"#6366f1",label:"".concat(e("refs.allFiles")," \xb7 ").concat(a.length),onClick:()=>U(void 0)}),F.map(e=>{let s=a.filter(s=>s.projectType===e).length;return 0===s?null:(0,r.jsx)(_,{active:Q===e,color:M(e),label:"".concat(e," \xb7 ").concat(s),onClick:()=>U(s=>s===e?void 0:e)},e)})]}),q?(0,r.jsx)(d.A,{}):0===es.length?(0,r.jsx)(z,{text:e("refs.noReferences")}):(0,r.jsx)("div",{className:"grid grid-cols-1 lg:grid-cols-2 2xl:grid-cols-3 gap-4",children:es.map(s=>{let a=s.qualityProfile,t="ready"===s.status,l=M(s.projectType);return(0,r.jsxs)("div",{className:"rounded-2xl border border-[var(--colorBorderSecondary)] bg-[var(--colorBgElevated)] transition-all duration-200 hover:shadow-md overflow-hidden",children:[(0,r.jsxs)("div",{className:"flex items-start justify-between gap-3 px-4 pt-4 pb-3",children:[(0,r.jsxs)("div",{className:"flex items-start gap-3 min-w-0",children:[(0,r.jsx)("span",{className:"shrink-0 w-9 h-9 rounded-xl flex items-center justify-center text-base",style:{background:"".concat(l,"14"),color:l},children:(0,r.jsx)(j.A,{})}),(0,r.jsxs)("div",{className:"min-w-0",children:[(0,r.jsxs)("div",{className:"flex items-center gap-1.5 min-w-0",children:[s.isPrimary&&(0,r.jsx)(v.A,{className:"text-[#faad14] text-xs shrink-0"}),(0,r.jsx)(i.A,{title:s.fileName,children:(0,r.jsx)("span",{className:"font-medium text-[var(--colorText)] truncate block",children:s.fileName})})]}),(0,r.jsxs)("div",{className:"flex items-center gap-2 mt-1 flex-wrap",children:[(0,r.jsx)("span",{className:"px-1.5 py-px rounded text-[11px] font-medium",style:{background:"".concat(l,"14"),color:l},children:s.projectType}),"auto"===s.typeSource&&(0,r.jsx)("span",{className:"text-[11px] text-[var(--colorTextTertiary)]",children:e("refs.autoClassified")}),(0,r.jsxs)("span",{className:"text-[11px] text-[var(--colorTextTertiary)]",children:[E(s.fileSize)," \xb7 ",new Date(s.uploadedAt).toLocaleDateString()]})]})]})]}),(0,r.jsxs)("div",{className:"flex items-center shrink-0",onClick:e=>e.stopPropagation(),children:[t&&(0,r.jsx)(i.A,{title:s.isPrimary?e("refs.unsetPrimary"):e("refs.setPrimary"),children:(0,r.jsx)(n.Ay,{size:"small",type:"text",className:"!w-7 !h-7 !min-w-7 flex items-center justify-center",onClick:()=>{G(s)},children:s.isPrimary?(0,r.jsx)(v.A,{style:{color:"#faad14"}}):(0,r.jsx)(y.A,{})})}),(0,r.jsx)(c.A,{menu:{items:F.filter(e=>e!==s.projectType).map(s=>({key:"type-".concat(s),label:"".concat(e("refs.changeType"),":").concat(s)})),onClick:e=>{let{key:a}=e,r=a.replace("type-","");r&&Y(s,r)}},children:(0,r.jsx)(n.Ay,{size:"small",type:"text",className:"!w-7 !h-7 !min-w-7 flex items-center justify-center",icon:(0,r.jsx)(b.A,{})})}),(0,r.jsx)(o.A,{title:e("refs.deleteConfirm"),onConfirm:()=>{Z(s)},children:(0,r.jsx)(n.Ay,{size:"small",type:"text",danger:!0,className:"!w-7 !h-7 !min-w-7 flex items-center justify-center",icon:(0,r.jsx)(N.A,{})})})]})]}),(0,r.jsxs)("div",{className:"px-4 pb-4 flex flex-col gap-3",children:["failed"===s.status&&(0,r.jsxs)("div",{className:"rounded-lg border border-red-200 bg-red-50/40 px-2.5 py-2 text-xs text-[var(--colorDanger)]",children:[(0,r.jsx)(T.A,{className:"mr-1"}),e("refs.statusFailed"),":",s.errorMessage||e("refs.uploadFailed")]}),"parsing"===s.status&&(0,r.jsxs)("div",{className:"flex items-center gap-2 text-xs text-[var(--colorTextTertiary)]",children:[(0,r.jsx)(d.A,{size:"small"}),e("refs.statusParsing")]}),t&&a&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{className:"grid grid-cols-3 gap-2",children:[(0,r.jsx)(B,{label:e("refs.paramDensity"),value:a.paramDensity.toFixed(1),unit:"/千字"}),(0,r.jsx)(B,{label:e("refs.arrowChain"),value:String(Math.round(100*a.arrowChainCoverage)),unit:"%"}),(0,r.jsx)(B,{label:e("refs.duplication"),value:String(Math.round(100*a.duplicationRate)),unit:"%"}),(0,r.jsx)(B,{label:e("refs.tables"),value:String(a.tableCount)}),(0,r.jsx)(B,{label:e("refs.sectionSubsection"),value:String(a.sectionCount),unit:"章 \xb7 ".concat(a.subsectionCount||0," 节")}),(0,r.jsx)(B,{label:e("refs.words"),value:(a.wordCount/1e4).toFixed(1),unit:"万"})]}),a.headingStructure.length>0&&(0,r.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,r.jsx)("span",{className:"text-[11px] text-[var(--colorTextTertiary)]",children:e("refs.headingPreview")}),(0,r.jsxs)("div",{className:"flex flex-wrap gap-1",children:[a.headingStructure.slice(0,4).map(e=>(0,r.jsx)("span",{className:"px-1.5 py-px rounded text-[11px] truncate max-w-full bg-[var(--colorFillSecondary)] text-[var(--colorTextSecondary)]",title:e,children:e},e)),a.headingStructure.length>4&&(0,r.jsxs)("span",{className:"text-[11px] text-[var(--colorTextTertiary)] leading-5",children:["+",a.headingStructure.length-4]})]})]})]})]})]},s.id)})})]})]}),(0,r.jsx)(p.A,{title:null,open:!!X,onClose:()=>J(null),size:600,styles:{body:{padding:0}},children:X&&(0,r.jsxs)("div",{className:"flex flex-col",children:[(0,r.jsx)("div",{className:"px-6 pt-6 pb-5",style:{background:"linear-gradient(180deg, ".concat(er,"0f, transparent)")},children:(0,r.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,r.jsxs)("div",{className:"flex items-center gap-3",children:[(0,r.jsx)("span",{className:"w-10 h-10 rounded-xl flex items-center justify-center text-lg font-bold",style:{background:"".concat(er,"1f"),color:er},children:X.projectType.slice(0,1)}),(0,r.jsxs)("div",{children:[(0,r.jsxs)("div",{className:"text-lg font-bold text-[var(--colorText)]",children:[X.projectType," \xb7 ",e("refs.profileDetailTitle")]}),(0,r.jsxs)("div",{className:"text-xs text-[var(--colorTextTertiary)] mt-0.5",children:[e("refs.profileUpdated")," ",new Date(X.updatedAt).toLocaleString()]})]})]}),(0,r.jsxs)(f.A,{className:"!m-0 shrink-0",style:{color:er,background:"".concat(er,"14"),border:"1px solid ".concat(er,"33")},children:[X.sourceCount,e("refs.profileSamples")," \xb7 ",(X.totalWords/1e4).toFixed(1)," 万字"]})]})}),(0,r.jsxs)("div",{className:"px-6 pb-8 flex flex-col gap-6",children:[(0,r.jsx)(R,{title:e("refs.profileMetrics"),children:(0,r.jsxs)("div",{className:"grid grid-cols-4 gap-2.5",children:[(0,r.jsx)(H,{label:e("refs.paramDensity"),range:X.metrics.paramDensity,kind:"perK"}),(0,r.jsx)(H,{label:e("refs.arrowChain"),range:X.metrics.arrowChainCoverage,kind:"percent"}),(0,r.jsx)(H,{label:e("refs.duplication"),range:X.metrics.duplicationRate,kind:"percent"}),(0,r.jsx)(H,{label:e("refs.tables"),range:X.metrics.tableCount,kind:"int"}),(0,r.jsx)(H,{label:e("refs.sections"),range:X.metrics.sectionCount,kind:"int"}),(0,r.jsx)(H,{label:e("refs.subsections"),range:X.metrics.subsectionCount||{avg:0,min:0,max:0},kind:"int"}),(0,r.jsx)(H,{label:e("refs.subitems"),range:X.metrics.subitemCount||{avg:0,min:0,max:0},kind:"int"}),(0,r.jsx)(H,{label:e("refs.avgSectionWords"),range:{avg:X.metrics.avgSectionWords.avg,min:X.metrics.avgSectionWords.avg,max:X.metrics.avgSectionWords.avg},kind:"int"})]})}),(0,r.jsx)(R,{title:e("refs.profileTypicalHeadings"),children:0===X.typicalHeadings.length?(0,r.jsx)("span",{className:"text-xs text-[var(--colorTextTertiary)]",children:e("refs.noReferences")}):X.typicalHeadings.map(e=>(0,r.jsxs)("div",{className:"flex items-center gap-3 rounded-lg px-2.5 py-1.5 border border-transparent hover:border-[var(--colorBorderSecondary)] transition-colors",children:[(0,r.jsx)("span",{className:"flex-1 min-w-0 text-[13px] text-[var(--colorText)] truncate",title:e.title,children:e.title}),(0,r.jsx)(u.A,{percent:Math.round(100*e.ratio),size:"small",showInfo:!1,className:"!w-24 !m-0",strokeColor:er}),(0,r.jsxs)("span",{className:"w-16 text-right text-xs text-[var(--colorTextTertiary)] shrink-0",children:[Math.round(100*e.ratio),"% \xb7 ",e.count]})]},e.title))}),(0,r.jsx)(R,{title:e("refs.profileCommonTables"),children:0===X.commonTables.length?(0,r.jsx)("span",{className:"text-xs text-[var(--colorTextTertiary)]",children:e("refs.noReferences")}):(0,r.jsx)("div",{className:"flex flex-wrap gap-1.5",children:X.commonTables.map(e=>(0,r.jsxs)("span",{className:"inline-flex items-center gap-1.5 px-2.5 py-1 rounded-full text-xs bg-[var(--colorFillSecondary)] text-[var(--colorTextSecondary)]",children:[e.title,(0,r.jsxs)("span",{className:"opacity-60",children:["\xd7",e.count]})]},e.title))})}),(0,r.jsx)(R,{title:e("refs.profileFrequentParams"),children:0===X.frequentParams.length?(0,r.jsx)("span",{className:"text-xs text-[var(--colorTextTertiary)]",children:e("refs.noReferences")}):(0,r.jsx)("div",{className:"flex flex-wrap gap-1.5",children:X.frequentParams.map(e=>(0,r.jsxs)("span",{className:"inline-flex items-center gap-1.5 px-2.5 py-1 rounded-full text-xs",style:{background:"".concat(er,"14"),color:er},children:[e.token,(0,r.jsxs)("span",{className:"opacity-60",children:["\xd7",e.count]})]},e.token))})}),(0,r.jsx)(R,{title:e("refs.profileSources"),children:ea.map(s=>(0,r.jsxs)("div",{className:"flex items-center gap-2.5 rounded-lg px-2.5 py-2 bg-[var(--colorFillQuaternary)]",children:[(0,r.jsx)(j.A,{className:"text-[var(--colorTextTertiary)] text-sm shrink-0"}),s.isPrimary&&(0,r.jsx)(v.A,{style:{color:"#faad14",fontSize:12}}),(0,r.jsx)("span",{className:"flex-1 min-w-0 text-[13px] text-[var(--colorText)] truncate",title:s.fileName,children:s.fileName}),s.isPrimary&&(0,r.jsx)(f.A,{color:"gold",className:"!m-0",children:e("refs.profilePrimaryBadge")}),(0,r.jsx)("span",{className:"text-xs text-[var(--colorTextTertiary)] shrink-0",children:E(s.fileSize)})]},s.id))})]})]})})]})}}},e=>{e.O(0,[717,69,700,787,102,195,592,636,593,792],()=>e(e.s=54835)),_N_E=e.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/*! tailwindcss v4.3.2 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,::backdrop,:after,:before{--tw-space-y-reverse:0;--tw-divide-x-reverse:0;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-duration:initial;--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0}}}@layer theme{:host,:root{--font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--color-red-50:oklch(97.1% .013 17.38);--color-red-200:oklch(88.5% .062 18.334);--color-red-500:oklch(63.7% .237 25.331);--color-red-600:oklch(57.7% .245 27.325);--color-red-900:oklch(39.6% .141 25.723);--color-yellow-50:oklch(98.7% .026 102.212);--color-yellow-200:oklch(94.5% .129 101.54);--color-green-50:oklch(98.2% .018 155.826);--color-green-200:oklch(92.5% .084 155.995);--color-green-500:oklch(72.3% .219 149.579);--color-green-600:oklch(62.7% .194 149.214);--color-green-900:oklch(39.3% .095 152.535);--color-blue-50:oklch(97% .014 254.604);--color-blue-200:oklch(88.2% .059 254.128);--color-blue-500:oklch(62.3% .214 259.815);--color-purple-50:oklch(97.7% .014 308.299);--color-purple-200:oklch(90.2% .063 306.703);--color-slate-50:oklch(98.4% .003 247.858);--color-slate-100:oklch(96.8% .007 247.896);--color-slate-500:oklch(55.4% .046 257.417);--color-black:#000;--color-white:#fff;--spacing:.25rem;--container-3xl:48rem;--container-7xl:80rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--text-sm:.875rem;--text-sm--line-height:calc(1.25 / .875);--text-base:1rem;--text-base--line-height:calc(1.5 / 1);--text-lg:1.125rem;--text-lg--line-height:calc(1.75 / 1.125);--text-xl:1.25rem;--text-xl--line-height:calc(1.75 / 1.25);--text-2xl:1.5rem;--text-2xl--line-height:calc(2 / 1.5);--text-3xl:1.875rem;--text-3xl--line-height:calc(2.25 / 1.875);--font-weight-normal:400;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--font-weight-extrabold:800;--tracking-tight:-.025em;--tracking-wide:.025em;--tracking-wider:.05em;--leading-tight:1.25;--leading-snug:1.375;--leading-normal:1.5;--leading-relaxed:1.625;--radius-md:.375rem;--radius-lg:.5rem;--radius-xl:.75rem;--radius-2xl:1rem;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4,0,.2,1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,::backdrop,:after,:before{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}:host,html{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}menu,ol,ul{list-style:none}audio,canvas,embed,iframe,img,object,svg,video{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,optgroup,select,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit,::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-hour-field,::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-millisecond-field,::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.collapse{visibility:collapse}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.sticky{position:sticky}.col-span-1{grid-column:span 1/span 1}.col-span-2{grid-column:span 2/span 2}.\!m-0{margin:0!important}.m-0{margin:0}.-mx-4{margin-inline:calc(var(--spacing) * -4)}.mx-1{margin-inline:var(--spacing)}.mx-auto{margin-inline:auto}.\!my-3{margin-block:calc(var(--spacing) * 3)!important}.mt-0\.5{margin-top:calc(var(--spacing) * .5)}.mt-1{margin-top:var(--spacing)}.mt-2{margin-top:calc(var(--spacing) * 2)}.mt-2\.5{margin-top:calc(var(--spacing) * 2.5)}.mt-3{margin-top:calc(var(--spacing) * 3)}.mt-4{margin-top:calc(var(--spacing) * 4)}.mt-8{margin-top:calc(var(--spacing) * 8)}.mt-auto{margin-top:auto}.-mr-2{margin-right:calc(var(--spacing) * -2)}.mr-1{margin-right:var(--spacing)}.mr-2{margin-right:calc(var(--spacing) * 2)}.mr-4{margin-right:calc(var(--spacing) * 4)}.\!mb-0{margin-bottom:0!important}.\!mb-1{margin-bottom:var(--spacing)!important}.\!mb-3{margin-bottom:calc(var(--spacing) * 3)!important}.\!mb-4{margin-bottom:calc(var(--spacing) * 4)!important}.mb-1{margin-bottom:var(--spacing)}.mb-1\.5{margin-bottom:calc(var(--spacing) * 1.5)}.mb-2{margin-bottom:calc(var(--spacing) * 2)}.mb-2\.5{margin-bottom:calc(var(--spacing) * 2.5)}.mb-3{margin-bottom:calc(var(--spacing) * 3)}.mb-4{margin-bottom:calc(var(--spacing) * 4)}.mb-5{margin-bottom:calc(var(--spacing) * 5)}.mb-6{margin-bottom:calc(var(--spacing) * 6)}.ml-0\.5{margin-left:calc(var(--spacing) * .5)}.ml-1{margin-left:var(--spacing)}.ml-2{margin-left:calc(var(--spacing) * 2)}.ml-3{margin-left:calc(var(--spacing) * 3)}.ml-auto{margin-left:auto}.line-clamp-2{-webkit-line-clamp:2}.line-clamp-2,.line-clamp-3{-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.line-clamp-3{-webkit-line-clamp:3}.block{display:block}.contents{display:contents}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.table{display:table}.\!h-7{height:calc(var(--spacing) * 7)!important}.h-1\.5{height:calc(var(--spacing) * 1.5)}.h-2{height:calc(var(--spacing) * 2)}.h-3{height:calc(var(--spacing) * 3)}.h-3\.5{height:calc(var(--spacing) * 3.5)}.h-4{height:calc(var(--spacing) * 4)}.h-6{height:calc(var(--spacing) * 6)}.h-8{height:calc(var(--spacing) * 8)}.h-9{height:calc(var(--spacing) * 9)}.h-10{height:calc(var(--spacing) * 10)}.h-11{height:calc(var(--spacing) * 11)}.h-12{height:calc(var(--spacing) * 12)}.h-\[calc\(100vh-140px\)\]{height:calc(100vh - 140px)}.h-auto{height:auto}.h-full{height:100%}.max-h-52{max-height:calc(var(--spacing) * 52)}.min-h-0{min-height:0}.min-h-\[44px\]{min-height:44px}.min-h-\[500px\]{min-height:500px}.\!w-7{width:calc(var(--spacing) * 7)!important}.\!w-24{width:calc(var(--spacing) * 24)!important}.w-1{width:var(--spacing)}.w-2{width:calc(var(--spacing) * 2)}.w-6{width:calc(var(--spacing) * 6)}.w-8{width:calc(var(--spacing) * 8)}.w-9{width:calc(var(--spacing) * 9)}.w-10{width:calc(var(--spacing) * 10)}.w-11{width:calc(var(--spacing) * 11)}.w-12{width:calc(var(--spacing) * 12)}.w-16{width:calc(var(--spacing) * 16)}.w-\[1px\]{width:1px}.w-\[260px\]{width:260px}.w-full{width:100%}.max-w-3xl{max-width:var(--container-3xl)}.max-w-7xl{max-width:var(--container-7xl)}.max-w-\[120px\]{max-width:120px}.max-w-\[300px\]{max-width:300px}.max-w-\[400px\]{max-width:400px}.max-w-\[520px\]{max-width:520px}.max-w-full{max-width:100%}.\!min-w-7{min-width:calc(var(--spacing) * 7)!important}.min-w-0{min-width:0}.min-w-\[72px\]{min-width:72px}.min-w-\[108px\]{min-width:108px}.flex-1{flex:1}.shrink-0{flex-shrink:0}.scale-\[1\.03\]{scale:1.03}.cursor-pointer{cursor:pointer}.resize{resize:both}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.grid-cols-\[28px_1fr_auto\]{grid-template-columns:28px 1fr auto}.flex-col{flex-direction:column}.flex-nowrap{flex-wrap:nowrap}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.gap-1{gap:var(--spacing)}.gap-1\.5{gap:calc(var(--spacing) * 1.5)}.gap-2{gap:calc(var(--spacing) * 2)}.gap-2\.5{gap:calc(var(--spacing) * 2.5)}.gap-3{gap:calc(var(--spacing) * 3)}.gap-4{gap:calc(var(--spacing) * 4)}.gap-5{gap:calc(var(--spacing) * 5)}.gap-6{gap:calc(var(--spacing) * 6)}.gap-8{gap:calc(var(--spacing) * 8)}.gap-12{gap:calc(var(--spacing) * 12)}:where(.space-y-5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 5) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-6>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 6) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 6) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-8>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 8) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 8) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-12>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 12) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 12) * calc(1 - var(--tw-space-y-reverse)))}.gap-x-4{column-gap:calc(var(--spacing) * 4)}.gap-x-12{column-gap:calc(var(--spacing) * 12)}.gap-y-2{row-gap:calc(var(--spacing) * 2)}.gap-y-8{row-gap:calc(var(--spacing) * 8)}.gap-y-16{row-gap:calc(var(--spacing) * 16)}:where(.divide-x>:not(:last-child)){--tw-divide-x-reverse:0;border-inline-style:var(--tw-border-style);border-inline-start-width:calc(1px * var(--tw-divide-x-reverse));border-inline-end-width:calc(1px * calc(1 - var(--tw-divide-x-reverse)))}:where(.divide-\[var\(--borderColor\)\]>:not(:last-child)){border-color:var(--borderColor)}.self-start{align-self:flex-start}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.\!rounded-xl{border-radius:var(--radius-xl)!important}.rounded{border-radius:.25rem}.rounded-2xl{border-radius:var(--radius-2xl)}.rounded-full{border-radius:3.40282e+38px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.rounded-xl{border-radius:var(--radius-xl)}.border{border-style:var(--tw-border-style);border-width:1px}.border-0{border-style:var(--tw-border-style);border-width:0}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-l-2{border-left-style:var(--tw-border-style);border-left-width:2px}.border-dashed{--tw-border-style:dashed;border-style:dashed}.border-\[var\(--borderColor\)\]{border-color:var(--borderColor)}.border-\[var\(--borderColorStrong\)\]{border-color:var(--borderColorStrong)}.border-\[var\(--colorBorderSecondary\)\]{border-color:var(--colorBorderSecondary)}.border-\[var\(--colorDanger\)\]\/20{border-color:var(--colorDanger)}@supports (color:color-mix(in lab,red,red)){.border-\[var\(--colorDanger\)\]\/20{border-color:color-mix(in oklab,var(--colorDanger) 20%,transparent)}}.border-\[var\(--colorPrimary\)\]{border-color:var(--colorPrimary)}.border-blue-200{border-color:var(--color-blue-200)}.border-green-200{border-color:var(--color-green-200)}.border-purple-200{border-color:var(--color-purple-200)}.border-red-200{border-color:var(--color-red-200)}.border-slate-100{border-color:var(--color-slate-100)}.border-transparent{border-color:#0000}.border-yellow-200{border-color:var(--color-yellow-200)}.bg-\[\#1e1e1e\]{background-color:#1e1e1e}.bg-\[var\(--borderColor\)\]{background-color:var(--borderColor)}.bg-\[var\(--borderColorStrong\)\]{background-color:var(--borderColorStrong)}.bg-\[var\(--colorAccent\)\]{background-color:var(--colorAccent)}.bg-\[var\(--colorBg\)\]{background-color:var(--colorBg)}.bg-\[var\(--colorBgContainer\)\]{background-color:var(--colorBgContainer)}.bg-\[var\(--colorBgElevated\)\]{background-color:var(--colorBgElevated)}.bg-\[var\(--colorBgHover\)\],.bg-\[var\(--colorBgHover\)\]\/50{background-color:var(--colorBgHover)}@supports (color:color-mix(in lab,red,red)){.bg-\[var\(--colorBgHover\)\]\/50{background-color:color-mix(in oklab,var(--colorBgHover) 50%,transparent)}}.bg-\[var\(--colorBgSecondary\)\]\/30{background-color:var(--colorBgSecondary)}@supports (color:color-mix(in lab,red,red)){.bg-\[var\(--colorBgSecondary\)\]\/30{background-color:color-mix(in oklab,var(--colorBgSecondary) 30%,transparent)}}.bg-\[var\(--colorBgSelected\)\]{background-color:var(--colorBgSelected)}.bg-\[var\(--colorBorderSecondary\)\]{background-color:var(--colorBorderSecondary)}.bg-\[var\(--colorBrand\)\]\/5{background-color:var(--colorBrand)}@supports (color:color-mix(in lab,red,red)){.bg-\[var\(--colorBrand\)\]\/5{background-color:color-mix(in oklab,var(--colorBrand) 5%,transparent)}}.bg-\[var\(--colorDanger\)\]\/10{background-color:var(--colorDanger)}@supports (color:color-mix(in lab,red,red)){.bg-\[var\(--colorDanger\)\]\/10{background-color:color-mix(in oklab,var(--colorDanger) 10%,transparent)}}.bg-\[var\(--colorFillAlter\)\]{background-color:var(--colorFillAlter)}.bg-\[var\(--colorFillQuaternary\)\]{background-color:var(--colorFillQuaternary)}.bg-\[var\(--colorFillSecondary\)\]{background-color:var(--colorFillSecondary)}.bg-\[var\(--colorFillTertiary\)\]{background-color:var(--colorFillTertiary)}.bg-\[var\(--colorText\)\]{background-color:var(--colorText)}.bg-black{background-color:var(--color-black)}.bg-blue-50\/40{background-color:#eff6ff66}@supports (color:color-mix(in lab,red,red)){.bg-blue-50\/40{background-color:color-mix(in oklab,var(--color-blue-50) 40%,transparent)}}.bg-blue-50\/50{background-color:#eff6ff80}@supports (color:color-mix(in lab,red,red)){.bg-blue-50\/50{background-color:color-mix(in oklab,var(--color-blue-50) 50%,transparent)}}.bg-green-50{background-color:var(--color-green-50)}.bg-green-50\/50{background-color:#f0fdf480}@supports (color:color-mix(in lab,red,red)){.bg-green-50\/50{background-color:color-mix(in oklab,var(--color-green-50) 50%,transparent)}}.bg-purple-50\/40{background-color:#faf5ff66}@supports (color:color-mix(in lab,red,red)){.bg-purple-50\/40{background-color:color-mix(in oklab,var(--color-purple-50) 40%,transparent)}}.bg-red-50{background-color:var(--color-red-50)}.bg-red-50\/40{background-color:#fef2f266}@supports (color:color-mix(in lab,red,red)){.bg-red-50\/40{background-color:color-mix(in oklab,var(--color-red-50) 40%,transparent)}}.bg-red-50\/50{background-color:#fef2f280}@supports (color:color-mix(in lab,red,red)){.bg-red-50\/50{background-color:color-mix(in oklab,var(--color-red-50) 50%,transparent)}}.bg-slate-50{background-color:var(--color-slate-50)}.bg-transparent{background-color:#0000}.bg-white{background-color:var(--color-white)}.bg-yellow-50\/40{background-color:#fefce866}@supports (color:color-mix(in lab,red,red)){.bg-yellow-50\/40{background-color:color-mix(in oklab,var(--color-yellow-50) 40%,transparent)}}.bg-yellow-50\/50{background-color:#fefce880}@supports (color:color-mix(in lab,red,red)){.bg-yellow-50\/50{background-color:color-mix(in oklab,var(--color-yellow-50) 50%,transparent)}}.object-cover{object-fit:cover}.p-0{padding:0}.p-1{padding:var(--spacing)}.p-1\.5{padding:calc(var(--spacing) * 1.5)}.p-2{padding:calc(var(--spacing) * 2)}.p-2\.5{padding:calc(var(--spacing) * 2.5)}.p-3{padding:calc(var(--spacing) * 3)}.p-4{padding:calc(var(--spacing) * 4)}.p-5{padding:calc(var(--spacing) * 5)}.p-6{padding:calc(var(--spacing) * 6)}.px-1{padding-inline:var(--spacing)}.px-1\.5{padding-inline:calc(var(--spacing) * 1.5)}.px-2{padding-inline:calc(var(--spacing) * 2)}.px-2\.5{padding-inline:calc(var(--spacing) * 2.5)}.px-3{padding-inline:calc(var(--spacing) * 3)}.px-4{padding-inline:calc(var(--spacing) * 4)}.px-5{padding-inline:calc(var(--spacing) * 5)}.px-6{padding-inline:calc(var(--spacing) * 6)}.py-0\.5{padding-block:calc(var(--spacing) * .5)}.py-1{padding-block:var(--spacing)}.py-1\.5{padding-block:calc(var(--spacing) * 1.5)}.py-2{padding-block:calc(var(--spacing) * 2)}.py-2\.5{padding-block:calc(var(--spacing) * 2.5)}.py-3{padding-block:calc(var(--spacing) * 3)}.py-4{padding-block:calc(var(--spacing) * 4)}.py-8{padding-block:calc(var(--spacing) * 8)}.py-12{padding-block:calc(var(--spacing) * 12)}.py-20{padding-block:calc(var(--spacing) * 20)}.py-32{padding-block:calc(var(--spacing) * 32)}.py-px{padding-block:1px}.pt-4{padding-top:calc(var(--spacing) * 4)}.pt-6{padding-top:calc(var(--spacing) * 6)}.pt-8{padding-top:calc(var(--spacing) * 8)}.pt-16{padding-top:calc(var(--spacing) * 16)}.pr-4{padding-right:calc(var(--spacing) * 4)}.pb-1{padding-bottom:var(--spacing)}.pb-3{padding-bottom:calc(var(--spacing) * 3)}.pb-4{padding-bottom:calc(var(--spacing) * 4)}.pb-5{padding-bottom:calc(var(--spacing) * 5)}.pb-6{padding-bottom:calc(var(--spacing) * 6)}.pb-8{padding-bottom:calc(var(--spacing) * 8)}.pl-4{padding-left:calc(var(--spacing) * 4)}.text-center{text-align:center}.text-left{text-align:left}.text-right{text-align:right}.align-middle{vertical-align:middle}.font-mono{font-family:var(--font-mono)}.text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.text-3xl{font-size:var(--text-3xl);line-height:var(--tw-leading,var(--text-3xl--line-height))}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-\[10px\]{font-size:10px}.text-\[11px\]{font-size:11px}.text-\[13px\]{font-size:13px}.leading-5{--tw-leading:calc(var(--spacing) * 5);line-height:calc(var(--spacing) * 5)}.leading-6{--tw-leading:calc(var(--spacing) * 6);line-height:calc(var(--spacing) * 6)}.leading-\[18px\]{--tw-leading:18px;line-height:18px}.leading-none{--tw-leading:1;line-height:1}.leading-normal{--tw-leading:var(--leading-normal);line-height:var(--leading-normal)}.leading-relaxed{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.leading-snug{--tw-leading:var(--leading-snug);line-height:var(--leading-snug)}.leading-tight{--tw-leading:var(--leading-tight);line-height:var(--leading-tight)}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-extrabold{--tw-font-weight:var(--font-weight-extrabold);font-weight:var(--font-weight-extrabold)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-normal{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-tight{--tw-tracking:var(--tracking-tight);letter-spacing:var(--tracking-tight)}.tracking-wide{--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.tracking-wider{--tw-tracking:var(--tracking-wider);letter-spacing:var(--tracking-wider)}.break-words{overflow-wrap:break-word}.break-all{word-break:break-all}.whitespace-normal{white-space:normal}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.text-\[\#d4d4d4\]{color:#d4d4d4}.text-\[\#faad14\]{color:#faad14}.text-\[var\(--colorAccent\)\]{color:var(--colorAccent)}.text-\[var\(--colorBg\)\]{color:var(--colorBg)}.text-\[var\(--colorBorderSecondary\)\]{color:var(--colorBorderSecondary)}.text-\[var\(--colorBrand\)\]{color:var(--colorBrand)}.text-\[var\(--colorDanger\)\]{color:var(--colorDanger)}.text-\[var\(--colorError\)\]{color:var(--colorError)}.text-\[var\(--colorInfo\)\]{color:var(--colorInfo)}.text-\[var\(--colorOk\)\]{color:var(--colorOk)}.text-\[var\(--colorPrimary\)\]{color:var(--colorPrimary)}.text-\[var\(--colorText\)\]{color:var(--colorText)}.text-\[var\(--colorTextQuaternary\)\]{color:var(--colorTextQuaternary)}.text-\[var\(--colorTextSecondary\)\]{color:var(--colorTextSecondary)}.text-\[var\(--colorTextTertiary\)\]{color:var(--colorTextTertiary)}.text-\[var\(--colorWarn\)\]{color:var(--colorWarn)}.text-\[var\(--colorWarning\)\]{color:var(--colorWarning)}.text-blue-500{color:var(--color-blue-500)}.text-green-600{color:var(--color-green-600)}.text-red-500{color:var(--color-red-500)}.text-red-600{color:var(--color-red-600)}.text-slate-500{color:var(--color-slate-500)}.text-white{color:var(--color-white)}.uppercase{text-transform:uppercase}.italic{font-style:italic}.ordinal{--tw-ordinal:ordinal;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.opacity-0{opacity:0}.opacity-60{opacity:.6}.opacity-100{opacity:1}.shadow-md{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a),0 2px 4px -2px var(--tw-shadow-color,#0000001a)}.shadow-md,.shadow-none{box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-none{--tw-shadow:0 0 #0000}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.filter{filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-150{--tw-duration:.15s;transition-duration:.15s}.duration-200{--tw-duration:.2s;transition-duration:.2s}.duration-300{--tw-duration:.3s;transition-duration:.3s}.outline-none{--tw-outline-style:none;outline-style:none}@media (hover:hover){.group-hover\:text-\[var\(--colorAccent\)\]:is(:where(.group):hover *){color:var(--colorAccent)}.group-hover\:opacity-100:is(:where(.group):hover *){opacity:1}.hover\:-translate-y-0\.5:hover{--tw-translate-y:calc(var(--spacing) * -.5);translate:var(--tw-translate-x) var(--tw-translate-y)}.hover\:border-\[var\(--borderColorStrong\)\]:hover{border-color:var(--borderColorStrong)}.hover\:border-\[var\(--colorBorderSecondary\)\]:hover{border-color:var(--colorBorderSecondary)}.hover\:border-\[var\(--colorBrand\)\]:hover{border-color:var(--colorBrand)}.hover\:border-\[var\(--colorTextTertiary\)\]:hover{border-color:var(--colorTextTertiary)}.hover\:bg-\[var\(--colorBgContainer\)\]:hover{background-color:var(--colorBgContainer)}.hover\:bg-\[var\(--colorBgHover\)\]:hover{background-color:var(--colorBgHover)}.hover\:bg-\[var\(--colorFillAlter\)\]:hover{background-color:var(--colorFillAlter)}.hover\:bg-transparent:hover{background-color:#0000}.hover\:text-\[var\(--colorText\)\]:hover{color:var(--colorText)}.hover\:underline:hover{text-decoration-line:underline}.hover\:shadow-lg:hover{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a),0 4px 6px -4px var(--tw-shadow-color,#0000001a)}.hover\:shadow-lg:hover,.hover\:shadow-md:hover{box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.hover\:shadow-md:hover{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a),0 2px 4px -2px var(--tw-shadow-color,#0000001a)}.hover\:shadow-sm:hover{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}}.focus\:bg-\[var\(--colorBgContainer\)\]:focus{background-color:var(--colorBgContainer)}.focus\:bg-\[var\(--colorBgElevated\)\]:focus{background-color:var(--colorBgElevated)}.focus\:bg-transparent:focus{background-color:#0000}.focus-visible\:ring-2:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus-visible\:ring-\[var\(--colorAccent\)\]:focus-visible{--tw-ring-color:var(--colorAccent)}@media (min-width:40rem){.sm\:w-auto{width:auto}.sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.sm\:flex-row{flex-direction:row}.sm\:items-end{align-items:flex-end}.sm\:pb-0{padding-bottom:0}}@media (min-width:48rem){.md\:col-span-2{grid-column:span 2/span 2}.md\:w-auto{width:auto}.md\:flex-none{flex:none}.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.md\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.md\:flex-row{flex-direction:row}.md\:items-center{align-items:center}}@media (min-width:64rem){.lg\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.lg\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.lg\:grid-cols-6{grid-template-columns:repeat(6,minmax(0,1fr))}.lg\:flex-row{flex-direction:row}.lg\:items-end{align-items:flex-end}}@media (min-width:80rem){.xl\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.xl\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}}@media (min-width:96rem){.\32 xl\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}}@media (prefers-color-scheme:dark){.dark\:bg-green-900\/20{background-color:#0d542b33}@supports (color:color-mix(in lab,red,red)){.dark\:bg-green-900\/20{background-color:color-mix(in oklab,var(--color-green-900) 20%,transparent)}}.dark\:bg-red-900\/20{background-color:#82181a33}@supports (color:color-mix(in lab,red,red)){.dark\:bg-red-900\/20{background-color:color-mix(in oklab,var(--color-red-900) 20%,transparent)}}.dark\:bg-white{background-color:var(--color-white)}.dark\:text-black{color:var(--color-black)}.dark\:text-green-500{color:var(--color-green-500)}.dark\:text-red-500{color:var(--color-red-500)}}}:root{--colorBg:#fff;--colorBgElevated:#fff;--colorBgSecondary:#fafafa;--colorBgHover:#f5f5f5;--colorBgSelected:#eff6ff;--colorText:#171717;--colorTextSecondary:#737373;--colorTextTertiary:#a3a3a3;--colorBrand:#06c;--colorBrandHover:#0052a3;--colorBrand2:#171717;--colorDanger:#e11d48;--colorOk:#16a34a;--colorWarn:#f59e0b;--colorInfo:#2563eb;--colorPrimary:#007aff;--colorAccent:#007aff;--colorSuccess:#34c759;--colorWarning:#ff9500;--colorError:#ff3b30;--colorBgContainer:#ffffffc7;--colorFillAlter:#00000005;--colorFillSecondary:#0000000a;--colorFillTertiary:#00000008;--colorFillQuaternary:#00000005;--colorBorderSecondary:#3c3c431f;--colorTextQuaternary:#3c3c432e;--colorWarningBg:#fff8e6;--colorSuccessBg:#e8f9ee;--colorInfoBg:#e8f2ff;--colorErrorBg:#ffeceb;--glassBg:#ffffffd9;--glassBlur:saturate(180%) blur(16px);--borderColor:#00000014;--borderColorStrong:#00000026;--borderColorSelected:#3b82f6;--borderSoft:#0000000f;--textSecondary:#737373;--surfaceElevated:#fff;--shadowSoft:0 4px 12px #0000000d,0 1px 2px #00000005;--shadowCard:0 0 0 1px #00000008,0 2px 12px #0000000a;--shadowButton:0 1px 2px #0000000d;--radiusSm:6px;--radiusMd:10px;--radiusLg:14px;--radiusPill:9999px;--sidebarWidth:260px;--fontSans:"Inter",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif}.dark{--colorBg:#000;--colorBgElevated:#0a0a0a;--colorBgSecondary:#121212;--colorBgHover:#1a1a1a;--colorBgSelected:#3b82f626;--colorText:#ededed;--colorTextSecondary:#a3a3a3;--colorTextTertiary:#737373;--colorBrand:#3b82f6;--colorBrandHover:#60a5fa;--colorBrand2:#d4d4d4;--colorDanger:#f43f5e;--colorOk:#22c55e;--colorWarn:#fbbf24;--colorInfo:#3b82f6;--colorPrimary:#0a84ff;--colorAccent:#0a84ff;--colorSuccess:#30d158;--colorWarning:#ff9f0a;--colorError:#ff453a;--colorBgContainer:#2c2c2ec7;--colorFillAlter:#ffffff08;--colorFillSecondary:#ffffff0f;--colorFillTertiary:#ffffff0a;--colorFillQuaternary:#ffffff08;--colorBorderSecondary:#ffffff1a;--colorTextQuaternary:#ebebf53d;--colorWarningBg:#ff9f0a1f;--colorSuccessBg:#30d1581f;--colorInfoBg:#0a84ff1f;--colorErrorBg:#ff453a1f;--glassBg:#000000d9;--borderColor:#ffffff1f;--borderColorStrong:#fff3;--borderColorSelected:#60a5fa;--borderSoft:#ffffff14;--textSecondary:#a3a3a3;--surfaceElevated:#1c1c1e;--shadowSoft:0 4px 12px #00000080,0 1px 2px #0003;--shadowCard:0 0 0 1px #ffffff14,0 4px 16px #0006;--shadowButton:0 1px 2px #0000004d}*,:after,:before{box-sizing:border-box}html{font-family:var(--fontSans);background:var(--colorBg);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.appShellPlaceholder,body{background:var(--colorBg);min-height:100vh}body{font-family:var(--fontSans);color:var(--colorText);margin:0}a{color:inherit;text-decoration:none}::-webkit-scrollbar{width:6px;height:6px}::-webkit-scrollbar-track{background:0 0}::-webkit-scrollbar-thumb{background:var(--borderColorStrong);border-radius:3px}::-webkit-scrollbar-thumb:hover{background:var(--colorTextTertiary)}@keyframes fadeIn{0%{opacity:0;transform:translateY(4px)}to{opacity:1;transform:translateY(0)}}.animateFadeIn{animation:fadeIn .4s cubic-bezier(.2,.8,.2,1) forwards}.stagger-1{animation-delay:50ms}.stagger-2{animation-delay:.1s}.stagger-3{animation-delay:.15s}.stagger-4{animation-delay:.2s}.stagger-5{animation-delay:.25s}.space-y-8>*+*{margin-top:32px}.space-y-6>*+*{margin-top:24px}.space-y-5>*+*{margin-top:20px}.space-y-4>*+*{margin-top:16px}.space-y-3>*+*{margin-top:12px}.space-y-2>*+*{margin-top:8px}.space-x-8>*+*{margin-left:32px}.space-x-6>*+*{margin-left:24px}.space-x-4>*+*{margin-left:16px}.space-x-2>*+*{margin-left:8px}.routeProgress{top:0;left:var(--sidebarWidth);z-index:1000;background:linear-gradient(90deg,var(--colorPrimary),var(--colorAccent));height:3px;animation:routeProgress .9s ease-in-out infinite;position:fixed;right:0}#nprogress{pointer-events:none}#nprogress .bar{background:var(--colorBrand);z-index:1031;width:100%;height:3px;position:fixed;top:0;left:0}#nprogress .peg{width:100px;height:100%;box-shadow:0 0 10px var(--colorBrand),0 0 5px var(--colorBrand);opacity:1;display:block;position:absolute;right:0;transform:rotate(3deg)translateY(-4px)}.routeLoadingCard{border:1px solid var(--borderSoft);color:var(--textSecondary);background:var(--surfaceElevated);border-radius:16px;margin-bottom:16px;padding:14px 16px}@keyframes routeProgress{0%{transform-origin:0;opacity:.65;transform:scaleX(.15)}50%{transform-origin:0;opacity:1;transform:scaleX(.7)}to{transform-origin:0;opacity:.35;transform:scaleX(1)}}@media (max-width:1024px){:root{--sidebarWidth:200px}}@media (max-width:860px){:root{--sidebarWidth:72px}.sidebarLogo{justify-content:center;padding:16px}.sidebarFooter,.sidebarItem span:not(.sidebarChevron),.sidebarLogoSub,.sidebarLogoTitle{display:none}.sidebarItem{justify-content:center;padding:11px}.sidebarSubmenu{padding-left:0}.sidebarSubItem{padding-left:11px}.mainInner{padding:20px 20px calc(20px + env(safe-area-inset-bottom,0px))}.topbar{margin:10px 12px 0;padding:10px 16px}}@media (max-width:640px){.sidebar{top:6px;left:6px;bottom:calc(6px + env(safe-area-inset-bottom,0px))}.mainContent{margin-left:72px}.mainInner{padding:12px 12px calc(12px + env(safe-area-inset-bottom,0px))}.topbar{border-radius:16px;margin:8px 8px 0;padding:8px 12px}}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-divide-x-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-ordinal{syntax:"*";inherits:false}@property --tw-slashed-zero{syntax:"*";inherits:false}@property --tw-numeric-figure{syntax:"*";inherits:false}@property --tw-numeric-spacing{syntax:"*";inherits:false}@property --tw-numeric-fraction{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}.sidebar{position:fixed;left:0;top:0;bottom:0;width:var(--sidebarWidth);display:flex;flex-direction:column;z-index:20;background:var(--colorBgSecondary);border-right:none;box-shadow:2px 0 8px rgba(0,0,0,.02);overflow:hidden;transition:width .3s cubic-bezier(.2,.8,.2,1),transform .3s ease}.sidebarCollapsedSelf{width:72px}.sidebarLogo{display:flex;align-items:center;gap:12px;padding:24px 20px 20px;height:68px;overflow:hidden}.sidebarCollapsedSelf .sidebarLogo{justify-content:center;padding:24px 0 20px}.sidebarCollapsedSelf .sidebarChevron,.sidebarCollapsedSelf .sidebarLabel,.sidebarCollapsedSelf .sidebarLogoTitle{display:none}.sidebarCollapsedSelf .sidebarItem{justify-content:center;padding:10px}.sidebarCollapsedSelf .sidebarCollapseWrapper{padding:12px}.sidebarLogoTitle{font-size:16px;font-weight:600;letter-spacing:-.01em;white-space:nowrap;opacity:1;transition:opacity .2s ease;color:var(--colorText)}.sidebarNav{flex:1;overflow-y:auto;overflow-x:hidden;flex-direction:column;gap:2px}.sidebarItem,.sidebarNav{padding:8px 12px;display:flex}.sidebarItem{align-items:center;gap:10px;border-radius:var(--radiusSm);font-size:13.5px;font-weight:500;color:var(--colorTextSecondary);transition:all .15s ease;cursor:pointer;white-space:nowrap}.sidebarLabel{transition:opacity .2s ease}.sidebarItem:hover{background:var(--colorBgHover);color:var(--colorText)}.sidebarItemActive,.sidebarItemActive:hover{background:var(--colorBgElevated);color:var(--colorText);box-shadow:none}.dark .sidebarItemActive,.dark .sidebarItemActive:hover{box-shadow:none}.sidebarCollapseWrapper{padding:12px;border-top:1px solid var(--borderColor);display:flex;justify-content:center}.sidebarCollapseBtn{width:100%;height:32px;border-radius:var(--radiusSm);border:1px solid transparent;background:transparent;color:var(--colorTextSecondary);display:flex;align-items:center;justify-content:center;cursor:pointer;transition:all .2s ease}.sidebarCollapseBtn:hover{background:var(--colorBgHover);color:var(--colorText)}.topbar{position:sticky;top:0;z-index:10;display:flex;align-items:center;justify-content:flex-end;gap:12px;padding:16px 32px;background:var(--glassBg);backdrop-filter:var(--glassBlur);-webkit-backdrop-filter:var(--glassBlur);border-bottom:none;box-shadow:0 1px 3px rgba(0,0,0,.02)}.topbarBtn{display:inline-flex;align-items:center;gap:8px;padding:6px;border-radius:var(--radiusSm);border:1px solid transparent;background:transparent;color:var(--colorTextSecondary);font-size:13px;font-weight:500;cursor:pointer;transition:all .15s ease;outline:none}.topbarBtn:hover{background:var(--colorBgHover);color:var(--colorText)}.mainContent{margin-left:var(--sidebarWidth);flex:1;display:flex;flex-direction:column;min-height:100vh;background:var(--colorBg);transition:margin-left .3s cubic-bezier(.2,.8,.2,1)}.sidebarCollapsed .mainContent{margin-left:68px}.mainInner{flex:1;padding:32px clamp(24px,4vw,48px) calc(32px + env(safe-area-inset-bottom, 0px));width:100%;min-width:0;overflow-x:hidden;transition:opacity .2s ease}.mainInner.pageTransitioning{opacity:.5;pointer-events:none}.pageTitle{font-size:24px;font-weight:700;letter-spacing:-.01em;color:var(--colorText);margin:0}.pageDesc{margin-top:6px;font-size:14px;color:var(--colorTextSecondary)}.ant-card{background:transparent!important;border:none!important;border-radius:0!important;box-shadow:none!important;margin-bottom:0!important}.ant-card-head{border-bottom:none!important;padding:0!important;min-height:auto!important;margin-bottom:16px}.ant-card-head-title{font-size:16px!important;font-weight:600!important;padding:0!important}.ant-card-body{padding:0!important}.ant-modal-content{background:var(--colorBgElevated)!important;border:1px solid var(--borderColor)!important;border-radius:var(--radiusLg)!important;box-shadow:var(--shadowCard)!important;padding:24px!important}.ant-modal-header{background:transparent!important;margin-bottom:24px!important}.ant-input,.ant-input-number,.ant-input-password,.ant-select-selector{border:1px solid transparent!important;background:var(--colorBgHover)!important;border-radius:var(--radiusSm)!important;box-shadow:none!important;transition:all .2s ease!important}.ant-input-focused,.ant-input-number-focused,.ant-input-number:focus,.ant-input-number:hover,.ant-input-password:focus,.ant-input-password:hover,.ant-input:focus,.ant-input:hover,.ant-select-focused .ant-select-selector,.ant-select:not(.ant-select-disabled):hover .ant-select-selector{border-color:var(--borderColorStrong)!important;background:transparent!important;box-shadow:none!important}.ant-input-affix-wrapper-outlined:focus,.ant-input-affix-wrapper-outlined:focus-within,.ant-input-number-outlined:focus,.ant-input-number-outlined:focus-within,.ant-input-outlined:focus,.ant-input-outlined:focus-within,.ant-select-outlined.ant-select-focused .ant-select-selector{box-shadow:none!important;outline:none!important;border-color:var(--borderColorStrong)!important}.modern-table .ant-table{background:transparent!important;border:none!important;border-radius:0!important}.modern-table .ant-table-container{border:none!important}.modern-table .ant-table-thead>tr>th{background:var(--colorBgSecondary)!important;border:none!important;font-size:11px!important;font-weight:600!important;color:var(--colorTextSecondary)!important;text-transform:uppercase;letter-spacing:.05em;padding:14px 16px!important}.modern-table .ant-table-thead>tr>th:first-child{border-top-left-radius:var(--radiusMd)!important;border-bottom-left-radius:var(--radiusMd)!important}.modern-table .ant-table-thead>tr>th:last-child{border-top-right-radius:var(--radiusMd)!important;border-bottom-right-radius:var(--radiusMd)!important}.modern-table .ant-table-thead>tr>th:before{display:none!important}.modern-table .ant-table-tbody>tr>td{border:none!important;background:transparent!important;padding:18px 16px!important;font-size:14px}.modern-table .ant-table-tbody>tr:last-child>td{border-bottom:none!important}.modern-table .ant-table-tbody>tr:hover>td{background:var(--colorBgHover)!important}.modern-table .ant-table-tbody>tr.ant-table-row-selected>td{background:var(--colorBgSelected)!important;border:0!important;box-shadow:none!important;outline:0!important}.ant-btn-default{border-color:var(--borderColor)!important;background:transparent!important;box-shadow:none!important}.ant-btn-default:hover{background:var(--colorBgHover)!important;border-color:var(--borderColorStrong)!important;color:var(--colorText)!important}.ant-btn-primary{background:var(--colorText)!important;color:var(--colorBg)!important;box-shadow:none!important;border:none!important}.ant-btn-primary:hover{background:var(--colorTextSecondary)!important;color:var(--colorBg)!important}.ant-row{row-gap:24px}.ant-input,.ant-input-affix-wrapper,.ant-input-number,.ant-input-password,.ant-input-search .ant-input,.ant-input-search .ant-input-group-addon .ant-btn,.ant-mentions,.ant-picker,.ant-select-selector{min-height:34px;border:1px solid var(--borderColor)!important;background:var(--colorBgSecondary)!important;border-radius:var(--radiusSm)!important;box-shadow:none!important;outline:none!important}.ant-input-affix-wrapper>input.ant-input,.ant-input-affix-wrapper>textarea.ant-input,.ant-input-number .ant-input-number-input,.ant-input-password>input.ant-input,.ant-input-search .ant-input-affix-wrapper>input.ant-input{min-height:auto;border:0!important;background:transparent!important;border-radius:0!important;box-shadow:none!important;outline:none!important}.ant-input-affix-wrapper-focused,.ant-input-affix-wrapper:focus,.ant-input-affix-wrapper:hover,.ant-input-focused,.ant-input-number-focused,.ant-input-number:hover,.ant-input-password:hover,.ant-input:focus,.ant-input:hover,.ant-picker-focused,.ant-picker:hover,.ant-select-focused .ant-select-selector,.ant-select:not(.ant-select-disabled):hover .ant-select-selector{border-color:var(--colorBrand)!important;background:var(--colorBgElevated)!important;box-shadow:none!important;outline:none!important}.ant-btn:focus-visible,.ant-input-affix-wrapper:focus-visible,.ant-input:focus-visible,.ant-picker:focus-visible,.ant-select-selector:focus-visible,button:focus-visible,input:focus-visible,textarea:focus-visible{outline:none!important;box-shadow:none!important}.ant-input-group-wrapper .ant-input-wrapper,.ant-input-search .ant-input-group{display:flex;align-items:stretch}.ant-input-search .ant-input,.ant-input-search .ant-input-affix-wrapper{border-start-end-radius:0!important;border-end-end-radius:0!important}.ant-input-search .ant-input-group-addon .ant-btn{border-start-start-radius:0!important;border-end-start-radius:0!important;border-left:0!important}.ant-input-affix-wrapper{padding-inline-start:11px!important;padding-inline-end:11px!important}.ant-input-affix-wrapper .ant-input-prefix{margin-inline-end:8px!important;color:var(--colorTextTertiary)!important}.ant-input-affix-wrapper .ant-input-suffix{margin-inline-start:8px!important}.ant-input-affix-wrapper>input.ant-input{padding-inline-start:0!important}.ant-table-wrapper,.ant-table-wrapper .ant-spin-container,.ant-table-wrapper .ant-spin-nested-loading,.ant-table-wrapper .ant-table,.ant-table-wrapper .ant-table-body,.ant-table-wrapper .ant-table-container,.ant-table-wrapper .ant-table-content{background:transparent!important;border:0!important;box-shadow:none!important}.ant-table-wrapper .ant-table-cell:before,.ant-table-wrapper .ant-table-container:after,.ant-table-wrapper .ant-table-container:before{display:none!important}.ant-table-wrapper .ant-table-thead>tr>th{height:auto!important;padding:10px 12px!important;border:0!important;background:var(--colorBgSecondary)!important;color:var(--colorTextSecondary)!important;font-size:12px!important;font-weight:600!important;line-height:1.45!important;vertical-align:middle!important}.ant-table-wrapper .ant-table-tbody>tr>td{height:auto!important;min-height:0!important;padding:11px 12px!important;border:0!important;background:transparent!important;color:var(--colorText)!important;line-height:1.5!important;vertical-align:middle!important;overflow:visible!important;white-space:normal;word-break:break-word}.ant-table-wrapper .ant-table-tbody>tr.ant-table-row:hover>td,.ant-table-wrapper .ant-table-tbody>tr:hover>td{background:var(--colorBgHover)!important}.ant-table-wrapper .ant-table-tbody>tr.ant-table-row-selected>td{background:var(--colorBgSelected)!important}.ant-table-wrapper .ant-table-expanded-row>td,.ant-table-wrapper .ant-table-placeholder>td{background:transparent!important}.ant-table-wrapper .ant-table-cell .ant-btn,.ant-table-wrapper .ant-table-cell .ant-space,.ant-table-wrapper .ant-table-cell .ant-tag{vertical-align:middle}.ant-table-wrapper .ant-table-cell .ant-typography,.ant-table-wrapper .ant-table-cell div,.ant-table-wrapper .ant-table-cell p,.ant-table-wrapper .ant-table-cell span{max-height:none;line-height:inherit}.ant-table-wrapper .ant-table-cell-ellipsis{white-space:normal!important}.ant-table-wrapper .ant-table-cell-ellipsis .ant-table-cell-content{display:block;overflow:visible;text-overflow:clip;white-space:normal}.ant-alert-description,.ant-alert-message,.ant-breadcrumb-link,.ant-btn,.ant-dropdown-menu-title-content,.ant-menu-title-content,.ant-select-selection-item,.ant-tabs-tab-btn,.ant-tag{display:inline-flex;align-items:center;gap:6px;min-width:0}.ant-btn{justify-content:center;line-height:1.2!important}.ant-btn .anticon,.ant-btn svg,.ant-menu-item svg,.ant-menu-item-icon,.ant-tabs-tab .anticon,.ant-tabs-tab svg,.ant-tag .anticon,.ant-tag svg,.anticon,.sidebarItem svg,.topbarBtn svg{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;line-height:1;vertical-align:-.125em}.ant-space{align-items:center}.ant-alert+.ant-card,.ant-card+.ant-alert,.ant-card+.ant-card,.cardGlass+.cardGlass{margin-top:16px!important}.ant-card-head{margin-bottom:14px!important}.ant-card .ant-typography,.ant-card ol,.ant-card p,.ant-card ul{line-height:1.65}.ant-card .ant-typography:last-child,.ant-card ol:last-child,.ant-card p:last-child,.ant-card ul:last-child{margin-bottom:0!important}.ant-tabs>.ant-tabs-nav,.ant-tabs>div>.ant-tabs-nav{margin:0 0 18px!important;padding:0 2px!important}.ant-tabs .ant-tabs-tab{padding:10px 12px!important;margin:0 4px 0 0!important}.ant-tabs .ant-tabs-content-holder{padding-top:2px}.ant-tabs-card>.ant-tabs-nav .ant-tabs-tab{border-radius:var(--radiusSm) var(--radiusSm) 0 0!important}.ant-form-item{margin-bottom:18px!important}.ant-form-item-label>label{align-items:center;height:auto!important;color:var(--colorText)!important;font-weight:500}.ant-form-item-explain,.ant-form-item-extra{margin-top:6px;font-size:12px}.ant-collapse-header,.ant-descriptions-item,.ant-list-item{align-items:center!important}.ant-table-wrapper.modern-table,.ant-table-wrapper.modern-table *,.modern-table.ant-table-wrapper,.modern-table.ant-table-wrapper *{border-color:transparent!important}.modern-table .ant-table,.modern-table .ant-table-body,.modern-table .ant-table-container,.modern-table .ant-table-content,.modern-table .ant-table-header,.modern-table .ant-table-tbody,.modern-table .ant-table-thead,.modern-table table{border:0!important;box-shadow:none!important;outline:0!important}.modern-table .ant-table-expanded-row>td,.modern-table .ant-table-selection-column,.modern-table .ant-table-tbody>tr>td,.modern-table .ant-table-thead>tr>th{height:auto!important;min-height:0!important;border:0!important;border-inline-end:0!important;border-bottom:0!important;box-shadow:none!important;outline:0!important;line-height:1.55!important;vertical-align:middle!important}.modern-table .ant-table-tbody>tr>td{padding:10px 12px!important;white-space:normal!important;overflow:visible!important;text-overflow:clip!important}.modern-table .ant-table-thead>tr>th{padding:9px 12px!important;border-radius:0!important}.modern-table .ant-table-cell-ellipsis,.modern-table .truncate{overflow:visible!important;text-overflow:clip!important;white-space:normal!important;max-height:none!important}.modern-table .ant-table-row-expand-icon-cell,.modern-table .ant-table-selection-column{text-align:center!important;vertical-align:middle!important;white-space:nowrap!important}.modern-table .ant-table-cell .anticon,.modern-table .ant-table-cell svg,.modern-table .ant-table-row-expand-icon{display:inline-flex!important;align-items:center!important;justify-content:center!important;vertical-align:middle!important}.modern-table .ant-table-expanded-row-fixed,.modern-table .ant-table-expanded-row>td>div{border:0!important}.modern-table .ant-table-tbody>tr{height:auto!important;min-height:44px!important}.modern-table .ant-table-cell{height:auto!important;max-height:none!important;overflow:visible!important}.modern-table .ant-table-cell .ant-tag,.modern-table .ant-table-cell .ant-typography,.modern-table .ant-table-cell a,.modern-table .ant-table-cell button,.modern-table .ant-table-cell>*{max-height:none!important;overflow:visible!important;line-height:1.45!important}.modern-table .ant-table-body{overflow-y:auto!important;overflow-x:hidden!important}.ant-card,.cardGlass,[class*=Card],[class*=card]{box-shadow:none!important}.ant-card:hover,.cardGlass:hover,.group:hover,.hover\:border-\[var\(--borderColorStrong\)\]:hover,.hover\:border-\[var\(--colorBrand\)\]:hover{border-color:transparent!important;box-shadow:none!important}.active,.ant-card.ant-card-bordered:hover,.ant-list-item-selected,.ant-list-item.active,.ant-menu-item-selected,.ant-menu-submenu-selected>.ant-menu-submenu-title,.ant-segmented-item-selected,.ant-select-item-option-selected,.ant-table-row-selected>td,.ant-tabs-tab-active,.ant-tabs-tab.ant-tabs-tab-active,.ant-tree-node-selected,.selected,[aria-selected=true],[data-selected=true]{border-color:transparent!important;box-shadow:none!important;outline:0!important}
|
package/messages/en-US.json
CHANGED
|
@@ -17,7 +17,8 @@
|
|
|
17
17
|
"models": "Model Config",
|
|
18
18
|
"settings": "Settings",
|
|
19
19
|
"promptManagement": "Prompt Management",
|
|
20
|
-
"systemLogs": "System Logs"
|
|
20
|
+
"systemLogs": "System Logs",
|
|
21
|
+
"templateReferences": "Template References"
|
|
21
22
|
},
|
|
22
23
|
"overview": {
|
|
23
24
|
"title": "System Overview",
|
|
@@ -693,5 +694,60 @@
|
|
|
693
694
|
"gb": "GB",
|
|
694
695
|
"unknown": "Unknown",
|
|
695
696
|
"never": "Never"
|
|
697
|
+
},
|
|
698
|
+
"refs": {
|
|
699
|
+
"title": "Template Reference Library",
|
|
700
|
+
"description": "Upload outstanding winning bids as quality benchmarks. The system parses quality profiles (parameter density, process chains, structure) and benchmarks generated documents by project type. References are used ONLY for quality benchmarking and structure guidance, never as project facts.",
|
|
701
|
+
"uploadTitle": "Click or drag files to upload",
|
|
702
|
+
"uploadHint": "PDF / Word supported. Upload multiple references of different project types to accumulate",
|
|
703
|
+
"uploading": "Uploading and parsing…",
|
|
704
|
+
"uploaded": "Reference added and profile parsed",
|
|
705
|
+
"uploadFailed": "Upload failed",
|
|
706
|
+
"operationFailed": "Operation failed",
|
|
707
|
+
"projectType": "Project type",
|
|
708
|
+
"autoClassify": "Auto-classify if empty",
|
|
709
|
+
"statusParsing": "Parsing…",
|
|
710
|
+
"statusFailed": "Parse failed",
|
|
711
|
+
"setPrimary": "Set as primary",
|
|
712
|
+
"unsetPrimary": "Unset primary",
|
|
713
|
+
"changeType": "Change to",
|
|
714
|
+
"typeChanged": "Type updated",
|
|
715
|
+
"delete": "Delete",
|
|
716
|
+
"deleteConfirm": "Delete this reference? The original file will also be removed",
|
|
717
|
+
"paramDensity": "Param density",
|
|
718
|
+
"arrowChain": "Process chain coverage",
|
|
719
|
+
"duplication": "Duplication rate",
|
|
720
|
+
"tables": "Tables",
|
|
721
|
+
"sections": "Sections",
|
|
722
|
+
"sectionSubsection": "Sections/Subsections",
|
|
723
|
+
"subsections": "Subsections",
|
|
724
|
+
"subitems": "Sub-items",
|
|
725
|
+
"words": "Words",
|
|
726
|
+
"more": "Expand",
|
|
727
|
+
"noReferences": "No references of this type yet",
|
|
728
|
+
"redLineTitle": "Guardrail",
|
|
729
|
+
"redLine": "References are stored in isolation, never indexed into the knowledge base, never used as generation facts.",
|
|
730
|
+
"profileTitle": "Type Profile",
|
|
731
|
+
"profileSamples": "samples",
|
|
732
|
+
"profileUpdated": "Updated at",
|
|
733
|
+
"profileDetail": "View Profile Details",
|
|
734
|
+
"profileDetailTitle": "Type Profile Details",
|
|
735
|
+
"profileMetrics": "Metric Ranges (min - avg - max)",
|
|
736
|
+
"profileTypicalHeadings": "Typical Chapter Structure (sample coverage)",
|
|
737
|
+
"profileCommonTables": "Common Tables",
|
|
738
|
+
"profileFrequentParams": "Frequent Parameters",
|
|
739
|
+
"profileSources": "Profile Source Files",
|
|
740
|
+
"profileNoSamples": "No samples yet. Upload reference files to accumulate the profile.",
|
|
741
|
+
"profilePrimaryBadge": "Primary",
|
|
742
|
+
"totalSamples": "Valid samples",
|
|
743
|
+
"coveredTypes": "Types covered",
|
|
744
|
+
"primaryCount": "Primary refs",
|
|
745
|
+
"uploadSection": "Upload References",
|
|
746
|
+
"autoClassified": "Auto-classified",
|
|
747
|
+
"fileLibrary": "File Library",
|
|
748
|
+
"allFiles": "All",
|
|
749
|
+
"profileSubtitle": "Cumulative type-level profile, enriched with every reference",
|
|
750
|
+
"headingPreview": "Chapter structure",
|
|
751
|
+
"avgSectionWords": "Avg words per section"
|
|
696
752
|
}
|
|
697
753
|
}
|