@customize-agent/server 3.0.0 → 3.0.1

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.
Files changed (30) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/build-manifest.json +22 -22
  3. package/.next/package.json +1 -0
  4. package/.next/prerender-manifest.json +3 -3
  5. package/.next/server/chunks/270.js +1 -1
  6. package/.next/server/middleware-build-manifest.js +1 -1
  7. package/.next/server/pages/404.html +1 -1
  8. package/.next/server/pages/500.html +1 -1
  9. package/.next/server/pages/context/long-term.html +1 -1
  10. package/.next/server/pages/context/short-term.html +1 -1
  11. package/.next/server/pages/index.html +1 -1
  12. package/.next/server/pages/knowledge/file-detail.html +1 -1
  13. package/.next/server/pages/knowledge/files.html +1 -1
  14. package/.next/server/pages/knowledge/manage.html +1 -1
  15. package/.next/server/pages/knowledge/search.html +1 -1
  16. package/.next/server/pages/knowledge.html +1 -1
  17. package/.next/server/pages/models.html +1 -1
  18. package/.next/server/pages/overview.html +1 -1
  19. package/.next/server/pages/prompt.html +1 -1
  20. package/.next/server/pages/settings.html +1 -1
  21. package/.next/server/pages-manifest.json +13 -13
  22. package/.next/static/chunks/{15-fed70feebb38d5ae.js → 15-341041188dc9798c.js} +1 -1
  23. package/.next/static/chunks/{576-642eb5cede35ba19.js → 576-0038f3c58d5478e8.js} +1 -1
  24. package/.next/static/chunks/{796-db4afcb27cb903b9.js → 796-fa388065af432ff1.js} +1 -1
  25. package/.next/static/chunks/pages/knowledge/{files-7ce51dd9b261aea2.js → files-562933a68be26f4b.js} +1 -1
  26. package/.next/static/chunks/pages/{overview-da401b76cd3ec331.js → overview-7ae2897685a7f503.js} +1 -1
  27. package/.next/static/chunks/pages/{prompt-048fe74855c6514b.js → prompt-1142500eccfa3fb6.js} +1 -1
  28. package/.next/static/{HIdBlqc4OSurll-8LjOWl → f3FFPlZaHcb77vhOvTQKs}/_buildManifest.js +1 -1
  29. package/package.json +5 -4
  30. /package/.next/static/{HIdBlqc4OSurll-8LjOWl → f3FFPlZaHcb77vhOvTQKs}/_ssgManifest.js +0 -0
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[28],{426:(e,t,a)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/knowledge/files",function(){return a(5505)}])},4569:e=>{e.exports={featureLabel:"style_featureLabel__XFSTX",featureValue:"style_featureValue__I_wMP",filterInput:"style_filterInput__4_Elu",filterSelect:"style_filterSelect__vUBJ9",statusCardWrap:"style_statusCardWrap__DrPY1",statusCard:"style_statusCard__H7Mee",statusExtra:"style_statusExtra__YklEh",statusEmpty:"style_statusEmpty__8LWzH",statusSummary:"style_statusSummary__7KavF",statusSummaryActive:"style_statusSummaryActive__GpgjO",statusList:"style_statusList__FpNgC",statusItem:"style_statusItem__uzO80",statusHeader:"style_statusHeader__o9q_b",statusMain:"style_statusMain__tl2rq",statusDesc:"style_statusDesc__XiWFa",statusMetaRow:"style_statusMetaRow__6V4k_",statusPath:"style_statusPath__Udxvv",statusMeta:"style_statusMeta__XukHt",searchResultList:"style_searchResultList__cVKZg",searchResultItem:"style_searchResultItem__boj6D",searchResultHeader:"style_searchResultHeader__meVdJ",searchContent:"style_searchContent__XbUVk",pdfPreviewStrip:"style_pdfPreviewStrip__94_eG",drawingPreview:"style_drawingPreview__lkk_L"}},5505:(e,t,a)=>{"use strict";a.r(t),a.d(t,{default:()=>T});var n=a(5321),s=a(7109),r=a(9018),i=a(3220),o=a.n(i),c=a(4986),l=a(7807),u=a(5258),d=a(3442),h=a(1702),p=a(5114),y=a(7576),m=a(7271),g=a(1053),f=a(8787),x=a(9605),v=a(8584),_=a(6631),w=a(8209),j=a(486),S=a(5171),b=a(6578),C=a(5551),k=a(4569),P=a.n(k);let N=["document","spreadsheet","image","cad","code","data","web","diagram","archive","other"];function T(){let e=(0,r.Vr)("knowledge"),{locale:t}=(0,r.x_)(),{message:a}=l.A.useApp(),i=(0,c.useSearchParams)().get("category")||"",[k,T]=(0,s.useState)([]),[A,L]=(0,s.useState)(!0),[R,M]=(0,s.useState)(""),[E,I]=(0,s.useState)(i),[O,U]=(0,s.useState)(!1),[J,D]=(0,s.useState)([]),[z,H]=(0,s.useState)("processing"),[B,F]=(0,s.useState)([]),[W,V]=(0,s.useState)(1),X=(0,s.useRef)(E);(0,s.useEffect)(()=>{X.current=E},[E]);let q=(0,s.useCallback)(async e=>{let t=null!=e?e:X.current;L(!0);try{let e=await (0,b.HT)({category:t||void 0,limit:200});T(e.files||[])}catch(e){T([])}finally{L(!1)}},[]);(0,s.useEffect)(()=>{q(E)},[E,q]);let K=e=>({type:e.type,title:e.title,description:e.message,status:e.status,percent:e.percent,filePath:e.filePath,chunkCount:e.chunkCount,textLength:e.textLength,extractionMode:e.extractionMode}),Q=(0,s.useCallback)(async()=>{try{let e=await (0,b.Qx)();D(e.operations.map(K))}catch(e){}},[]);(0,s.useEffect)(()=>{Q()},[Q]);let G=async e=>{U(!0),D(t=>[{type:"upload",title:"上传 ".concat(e.name),description:"等待上传、解析、切片和入库",status:"processing",percent:10},...t].slice(0,50));let t="".concat(Date.now(),"-").concat(Math.random().toString(36).slice(2)),n=setInterval(()=>{(0,b.QT)(t).then(t=>{D(a=>[{type:"upload",title:"上传 ".concat(e.name),description:"".concat(t.message).concat(t.chunkCount?",".concat(t.chunkCount," 个切片"):""),status:"error"===t.stage?"warning":"processing",percent:t.percent},...a.filter(t=>t.title!=="上传 ".concat(e.name))].slice(0,50))}).catch(()=>void 0)},500);try{var s,r;let i=await (0,b.pF)(e,void 0,t);clearInterval(n),(null==(s=i.vectorStatus)?void 0:s.status)==="error"?a.info("文件已上传,正在后台入库"):a.success("上传成功"),M(""),I(""),F([]),V(1),X.current="";let o=null==(r=i.files)?void 0:r.find(e=>e.relativePath===i.relativePath),c=(e=>{if(!e)return{};let t={};try{t=e.metadataJson?JSON.parse(e.metadataJson):{}}catch(e){}let a="object"==typeof t.extraction&&t.extraction?t.extraction:t;return{textLength:"number"==typeof a.textLength?a.textLength:void 0,extractionMode:"string"==typeof a.extractionMode?a.extractionMode:void 0}})(o);await Q(),D(t=>[{type:"upload",title:"上传完成 ".concat(e.name),description:o?"解析、分块和入库流程已完成":"文件已上传",status:(null==o?void 0:o.chunkCount)===1?"warning":"success",filePath:null==o?void 0:o.relativePath,chunkCount:null==o?void 0:o.chunkCount,textLength:c.textLength,extractionMode:c.extractionMode},...t.filter(t=>t.title!=="上传 ".concat(e.name))].slice(0,50)),Array.isArray(i.files)?T(i.files):(await (0,b.H1)(),await q(""),await Q())}catch(t){a.error("上传失败"),D(t=>[{type:"error",title:"上传失败 ".concat(e.name),description:"请重试或检查文件格式",status:"error"},...t].slice(0,50))}finally{clearInterval(n),U(!1)}return!1},Z=R?k.filter(e=>e.relativePath.toLowerCase().includes(R.toLowerCase())):k,Y=J.reduce((e,t)=>(e[t.status]+=1,e),{success:0,processing:0,warning:0,error:0}),$=J.filter(e=>"abnormal"===z?"warning"===e.status||"error"===e.status:e.status===z).slice(0,2),ee=[{title:e("fileName"),dataIndex:"relativePath",key:"name",render:e=>(0,n.jsxs)(d.A,{children:[(0,n.jsx)(_.A,{}),(0,n.jsx)(o(),{className:"truncate max-w-[400px] inline-block",href:"/knowledge/file-detail?relativePath=".concat(encodeURIComponent(e)),children:e})]})},{title:e("fileCategory"),dataIndex:"category",key:"cat",width:120,render:e=>(0,n.jsx)(h.A,{children:(0,C.Jm)(e,t)})},{title:e("fileSize"),dataIndex:"fileSize",key:"size",width:100,render:e=>(0,C.z3)(e)},{title:"切片",dataIndex:"chunkCount",key:"chunks",width:90,render:e=>(0,n.jsx)(h.A,{color:e>1?"green":"orange",children:e})},{title:"解析状态",dataIndex:"status",key:"status",width:110,render:(e,t)=>(0,n.jsx)(h.A,{color:"active"===e?"green":"red",children:t.errorMessage||e})},{title:e("fileDate"),dataIndex:"mtime",key:"date",width:140,render:e=>e?new Date(e).toLocaleDateString(t):"—"},{title:"",key:"act",width:60,render:(t,s)=>(0,n.jsx)(p.Ay,{type:"text",danger:!0,size:"small",icon:(0,n.jsx)(w.A,{}),onClick:()=>{u.A.confirm({title:e("delete"),content:e("deleteConfirm"),okText:"确认",cancelText:"取消",okButtonProps:{danger:!0},onOk:async()=>{D(e=>[{type:"delete",title:"删除 ".concat(s.relativePath),description:"正在删除文件记录",status:"processing"},...e].slice(0,50));try{await (0,b.xq)(s.relativePath),a.success("已删除"),D(e=>[{type:"delete",title:"删除完成 ".concat(s.relativePath),description:"文件和索引记录已移除",status:"success"},...e].slice(0,50)),await q(),await Q()}catch(e){a.error("删除失败"),D(e=>[{type:"error",title:"删除失败 ".concat(s.relativePath),description:"请重试",status:"error"},...e].slice(0,50))}}})}})}];return(0,n.jsxs)("div",{className:"space-y-5 animateFadeIn",children:[(0,n.jsx)("div",{className:"pageHero",children:(0,n.jsx)("div",{children:(0,n.jsx)("h2",{className:"pageTitle",children:e("fileList")})})}),(0,n.jsxs)("div",{className:"fileToolbar",children:[(0,n.jsx)(y.A,{placeholder:e("searchPlaceholder"),prefix:(0,n.jsx)(j.A,{}),value:R,onChange:e=>{M(e.target.value),V(1)},allowClear:!0,className:P().filterInput}),(0,n.jsx)(m.A,{value:E||void 0,onChange:e=>{I(e||""),V(1)},placeholder:e("filterCategory"),allowClear:!0,className:P().filterSelect,options:[{label:e("allCategories"),value:""},...N.map(e=>({label:(0,C.Jm)(e,t),value:e}))]}),(0,n.jsx)(g.A,{showUploadList:!1,beforeUpload:e=>(G(e),!1),children:(0,n.jsx)(p.Ay,{type:"primary",icon:(0,n.jsx)(S.A,{}),loading:O,children:O?e("uploading"):e("upload")})})]}),(0,n.jsx)("div",{className:P().statusCardWrap,children:(0,n.jsx)(f.A,{size:"small",className:P().statusCard,title:(0,n.jsxs)(d.A,{size:6,children:[(0,n.jsx)(_.A,{}),"文件任务状态"]}),extra:J.length>$.length?(0,n.jsxs)("span",{className:P().statusExtra,children:["最近 ",$.length," / ",J.length]}):void 0,children:0===J.length?(0,n.jsx)("div",{className:P().statusEmpty,children:"暂无文件任务。上传、删除、解析、分块和入库结果会显示在这里。"}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("div",{className:P().statusSummary,children:[(0,n.jsxs)("button",{type:"button",className:"processing"===z?P().statusSummaryActive:void 0,onClick:()=>H("processing"),children:[(0,n.jsx)("b",{children:Y.processing})," 处理中"]}),(0,n.jsxs)("button",{type:"button",className:"success"===z?P().statusSummaryActive:void 0,onClick:()=>H("success"),children:[(0,n.jsx)("b",{children:Y.success})," 完成"]}),(0,n.jsxs)("button",{type:"button",className:"abnormal"===z?P().statusSummaryActive:void 0,onClick:()=>H("abnormal"),children:[(0,n.jsx)("b",{children:Y.warning+Y.error})," 异常"]})]}),(0,n.jsx)("div",{className:P().statusList,children:0===$.length?(0,n.jsx)("div",{className:P().statusEmpty,children:"当前状态暂无任务"}):$.map((e,a)=>(0,n.jsxs)("div",{className:P().statusItem,children:[(0,n.jsxs)("div",{className:P().statusHeader,children:[(0,n.jsxs)("div",{className:P().statusMain,children:[(0,n.jsx)(h.A,{color:"success"===e.status?"green":"error"===e.status?"red":"warning"===e.status?"orange":"blue",children:"upload"===e.type?"上传":"delete"===e.type?"删除":"reindex"===e.type?"重建":"失败"}),(0,n.jsx)("strong",{children:e.title})]}),(0,n.jsx)(h.A,{color:"success"===e.status?"success":"processing"===e.status?"processing":"warning"===e.status?"warning":"error",children:"success"===e.status?"完成":"processing"===e.status?"处理中":"warning"===e.status?"异常":"失败"})]}),(0,n.jsxs)("div",{className:P().statusMetaRow,children:[e.filePath&&(0,n.jsx)("span",{className:P().statusPath,children:e.filePath}),(0,n.jsxs)("span",{className:P().statusMeta,children:["number"==typeof e.chunkCount&&(0,n.jsxs)("span",{children:["切片 ",(0,n.jsx)("b",{children:e.chunkCount})]}),"number"==typeof e.textLength&&(0,n.jsxs)("span",{children:["正文 ",(0,n.jsx)("b",{children:e.textLength.toLocaleString(t)})]}),e.extractionMode&&(0,n.jsxs)("span",{children:["解析 ",(0,n.jsx)("b",{children:e.extractionMode})]})]})]}),"number"==typeof e.percent&&"processing"===e.status&&(0,n.jsx)(x.A,{percent:e.percent,size:"small",showInfo:!1})]},"".concat(e.title,"-").concat(a)))})]})})}),(0,n.jsx)(f.A,{children:(0,n.jsx)(v.A,{rowKey:"relativePath",columns:ee,dataSource:Z,loading:A,size:"middle",locale:{emptyText:R?e("emptySearch"):e("noFiles")},pagination:{current:W,pageSize:50,showSizeChanger:!1,onChange:V},rowSelection:{selectedRowKeys:B,onChange:F}})})]})}},5551:(e,t,a)=>{"use strict";function n(e){if(0===e)return"0 B";let t=Math.floor(Math.log(e)/Math.log(1024)),a=e/Math.pow(1024,t);return"".concat(a.toFixed(+(0!==t))," ").concat(["B","KB","MB","GB","TB"][t])}function s(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"zh-CN";if(!e||e<=0)return"en-US"===t?"Never":"从未";let a=Math.floor(Math.floor((Date.now()-e)/1e3)/60),n=Math.floor(a/60),s=Math.floor(n/24);return s>30?new Date(e).toLocaleDateString(t):"en-US"===t?s>0?"".concat(s,"d ago"):n>0?"".concat(n,"h ago"):a>0?"".concat(a,"m ago"):"Just now":s>0?"".concat(s," 天前"):n>0?"".concat(n," 小时前"):a>0?"".concat(a," 分钟前"):"刚刚"}a.d(t,{Jm:()=>o,fw:()=>s,z3:()=>n});let r={document:"文档",spreadsheet:"表格",image:"图片",cad:"图纸",code:"代码",data:"数据",web:"网页",diagram:"图表",archive:"压缩包",other:"其他"},i={document:"Document",spreadsheet:"Spreadsheet",image:"Image",cad:"CAD",code:"Code",data:"Data",web:"Web",diagram:"Diagram",archive:"Archive",other:"Other"};function o(e){var t;let a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"zh-CN";return null!=(t=("en-US"===a?i:r)[e])?t:e}},6578:(e,t,a)=>{"use strict";async function n(e,t){let a=await fetch(e,t);if(!a.ok){let e=await a.text(),t=e||"HTTP ".concat(a.status);try{let a=JSON.parse(e);t=a.error||a.message||t}catch(e){}throw Error(t)}return a.json()}async function s(e){let t=e?"?projectRoot=".concat(encodeURIComponent(e)):"";return n("/api/kb/stats".concat(t))}async function r(e){var t,a;let s=new URLSearchParams;return(null==e?void 0:e.projectRoot)&&s.set("projectRoot",e.projectRoot),(null==e?void 0:e.category)&&s.set("category",e.category),(null==e?void 0:e.page)&&s.set("page",String(null!=(t=e.page)?t:1)),(null==e?void 0:e.limit)&&s.set("limit",String(null!=(a=e.limit)?a:50)),n("/api/kb/files?".concat(s))}async function i(e,t){let a=new URLSearchParams({relativePath:e});return t&&a.set("projectRoot",t),n("/api/kb/files/detail?".concat(a))}async function o(e,t){return n("/api/kb/files/reindex",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({relativePath:e,projectRoot:t})})}async function c(e,t,a){return n("/api/kb/files/open",{method:"POST",body:JSON.stringify({relativePath:e,target:t,projectRoot:a})})}async function l(e,t,a){let s=await new Promise((t,a)=>{let n=new FileReader;n.onload=()=>{let e=n.result,a=e.indexOf(",");t(a>=0?e.slice(a+1):e)},n.onerror=a,n.readAsDataURL(e)});return n("/api/kb/upload",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({fileName:e.name,fileData:s,projectRoot:t,uploadId:a})})}async function u(e){return n("/api/kb/upload/progress?id=".concat(encodeURIComponent(e)))}async function d(e){let t=new URLSearchParams({limit:"50"});return e&&t.set("projectRoot",e),n("/api/kb/operations?".concat(t))}async function h(e,t){return n("/api/kb/files",{method:"DELETE",headers:{"Content-Type":"application/json"},body:JSON.stringify({relativePath:e,projectRoot:t})})}async function p(e){return n("/api/kb/reindex",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({projectRoot:e})})}async function y(){return n("/api/kb/features")}async function m(e,t){var a,s,r,i,o;let c=new URLSearchParams({q:e});return(null==t?void 0:t.projectRoot)&&c.set("projectRoot",t.projectRoot),(null==t?void 0:t.category)&&c.set("category",t.category),(null==t?void 0:t.limit)&&c.set("limit",String(null!=(o=t.limit)?o:20)),(null==t||null==(a=t.weights)?void 0:a.keyword)!=null&&c.set("keywordWeight",String(t.weights.keyword)),(null==t||null==(s=t.weights)?void 0:s.vector)!=null&&c.set("vectorWeight",String(t.weights.vector)),(null==t||null==(r=t.weights)?void 0:r.rewrite)!=null&&c.set("rewriteWeight",String(t.weights.rewrite)),(null==t||null==(i=t.weights)?void 0:i.hybridBonus)!=null&&c.set("hybridBonus",String(t.weights.hybridBonus)),n("/api/kb/search?".concat(c))}async function g(){return n("/api/config/providers")}async function f(e,t){return n("/api/config/providers",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:e,...t})})}async function x(e){return n("/api/config/providers/".concat(encodeURIComponent(e)),{method:"DELETE"})}async function v(){return n("/api/config/models")}async function _(e){return n("/api/config/models",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})}async function w(e){return n("/api/config/healthCheck",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:e})})}async function j(){return n("/api/system/stats")}async function S(e,t){let a=t?"?type=".concat(e,"&search=").concat(encodeURIComponent(t)):"?type=".concat(e);return n("/api/context".concat(a))}async function b(e){return n("/api/context?type=".concat(e,"&stats=1"))}async function C(e){return n("/api/context",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"compress",type:e})})}async function k(e){return n("/api/context",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"clear",type:e})})}async function P(e){return n("/api/context?id=".concat(encodeURIComponent(e)),{method:"DELETE"})}async function N(e,t){return n("/api/context",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:e,...t})})}async function T(e){return n("/api/config/providers/".concat(encodeURIComponent(e)))}a.d(t,{Bh:()=>T,E:()=>k,FC:()=>j,H1:()=>p,HC:()=>o,HT:()=>r,PH:()=>C,QT:()=>u,Qx:()=>d,VW:()=>y,W2:()=>m,Z3:()=>g,_m:()=>f,aP:()=>_,bZ:()=>w,h1:()=>x,hc:()=>s,hn:()=>S,p:()=>b,pF:()=>l,tn:()=>c,xC:()=>i,xq:()=>h,xw:()=>P,zo:()=>N,zr:()=>v})}},e=>{e.O(0,[260,167,796,740,576,700,446,584,15,252,636,593,792],()=>e(e.s=426)),_N_E=e.O()}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[28],{426:(e,t,a)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/knowledge/files",function(){return a(5505)}])},4569:e=>{e.exports={featureLabel:"style_featureLabel__XFSTX",featureValue:"style_featureValue__I_wMP",filterInput:"style_filterInput__4_Elu",filterSelect:"style_filterSelect__vUBJ9",statusCardWrap:"style_statusCardWrap__DrPY1",statusCard:"style_statusCard__H7Mee",statusExtra:"style_statusExtra__YklEh",statusEmpty:"style_statusEmpty__8LWzH",statusSummary:"style_statusSummary__7KavF",statusSummaryActive:"style_statusSummaryActive__GpgjO",statusList:"style_statusList__FpNgC",statusItem:"style_statusItem__uzO80",statusHeader:"style_statusHeader__o9q_b",statusMain:"style_statusMain__tl2rq",statusDesc:"style_statusDesc__XiWFa",statusMetaRow:"style_statusMetaRow__6V4k_",statusPath:"style_statusPath__Udxvv",statusMeta:"style_statusMeta__XukHt",searchResultList:"style_searchResultList__cVKZg",searchResultItem:"style_searchResultItem__boj6D",searchResultHeader:"style_searchResultHeader__meVdJ",searchContent:"style_searchContent__XbUVk",pdfPreviewStrip:"style_pdfPreviewStrip__94_eG",drawingPreview:"style_drawingPreview__lkk_L"}},5505:(e,t,a)=>{"use strict";a.r(t),a.d(t,{default:()=>T});var n=a(5321),s=a(7109),r=a(9018),i=a(3220),o=a.n(i),c=a(4986),l=a(7807),u=a(5258),d=a(3442),h=a(1702),p=a(5114),y=a(7576),m=a(7271),g=a(1053),f=a(8787),x=a(9605),v=a(8584),_=a(9012),w=a(8209),j=a(486),S=a(5171),b=a(6578),C=a(5551),k=a(4569),P=a.n(k);let N=["document","spreadsheet","image","cad","code","data","web","diagram","archive","other"];function T(){let e=(0,r.Vr)("knowledge"),{locale:t}=(0,r.x_)(),{message:a}=l.A.useApp(),i=(0,c.useSearchParams)().get("category")||"",[k,T]=(0,s.useState)([]),[A,L]=(0,s.useState)(!0),[R,M]=(0,s.useState)(""),[E,I]=(0,s.useState)(i),[O,U]=(0,s.useState)(!1),[J,D]=(0,s.useState)([]),[z,H]=(0,s.useState)("processing"),[B,F]=(0,s.useState)([]),[W,V]=(0,s.useState)(1),X=(0,s.useRef)(E);(0,s.useEffect)(()=>{X.current=E},[E]);let q=(0,s.useCallback)(async e=>{let t=null!=e?e:X.current;L(!0);try{let e=await (0,b.HT)({category:t||void 0,limit:200});T(e.files||[])}catch(e){T([])}finally{L(!1)}},[]);(0,s.useEffect)(()=>{q(E)},[E,q]);let K=e=>({type:e.type,title:e.title,description:e.message,status:e.status,percent:e.percent,filePath:e.filePath,chunkCount:e.chunkCount,textLength:e.textLength,extractionMode:e.extractionMode}),Q=(0,s.useCallback)(async()=>{try{let e=await (0,b.Qx)();D(e.operations.map(K))}catch(e){}},[]);(0,s.useEffect)(()=>{Q()},[Q]);let G=async e=>{U(!0),D(t=>[{type:"upload",title:"上传 ".concat(e.name),description:"等待上传、解析、切片和入库",status:"processing",percent:10},...t].slice(0,50));let t="".concat(Date.now(),"-").concat(Math.random().toString(36).slice(2)),n=setInterval(()=>{(0,b.QT)(t).then(t=>{D(a=>[{type:"upload",title:"上传 ".concat(e.name),description:"".concat(t.message).concat(t.chunkCount?",".concat(t.chunkCount," 个切片"):""),status:"error"===t.stage?"warning":"processing",percent:t.percent},...a.filter(t=>t.title!=="上传 ".concat(e.name))].slice(0,50))}).catch(()=>void 0)},500);try{var s,r;let i=await (0,b.pF)(e,void 0,t);clearInterval(n),(null==(s=i.vectorStatus)?void 0:s.status)==="error"?a.info("文件已上传,正在后台入库"):a.success("上传成功"),M(""),I(""),F([]),V(1),X.current="";let o=null==(r=i.files)?void 0:r.find(e=>e.relativePath===i.relativePath),c=(e=>{if(!e)return{};let t={};try{t=e.metadataJson?JSON.parse(e.metadataJson):{}}catch(e){}let a="object"==typeof t.extraction&&t.extraction?t.extraction:t;return{textLength:"number"==typeof a.textLength?a.textLength:void 0,extractionMode:"string"==typeof a.extractionMode?a.extractionMode:void 0}})(o);await Q(),D(t=>[{type:"upload",title:"上传完成 ".concat(e.name),description:o?"解析、分块和入库流程已完成":"文件已上传",status:(null==o?void 0:o.chunkCount)===1?"warning":"success",filePath:null==o?void 0:o.relativePath,chunkCount:null==o?void 0:o.chunkCount,textLength:c.textLength,extractionMode:c.extractionMode},...t.filter(t=>t.title!=="上传 ".concat(e.name))].slice(0,50)),Array.isArray(i.files)?T(i.files):(await (0,b.H1)(),await q(""),await Q())}catch(t){a.error("上传失败"),D(t=>[{type:"error",title:"上传失败 ".concat(e.name),description:"请重试或检查文件格式",status:"error"},...t].slice(0,50))}finally{clearInterval(n),U(!1)}return!1},Z=R?k.filter(e=>e.relativePath.toLowerCase().includes(R.toLowerCase())):k,Y=J.reduce((e,t)=>(e[t.status]+=1,e),{success:0,processing:0,warning:0,error:0}),$=J.filter(e=>"abnormal"===z?"warning"===e.status||"error"===e.status:e.status===z).slice(0,2),ee=[{title:e("fileName"),dataIndex:"relativePath",key:"name",render:e=>(0,n.jsxs)(d.A,{children:[(0,n.jsx)(_.A,{}),(0,n.jsx)(o(),{className:"truncate max-w-[400px] inline-block",href:"/knowledge/file-detail?relativePath=".concat(encodeURIComponent(e)),children:e})]})},{title:e("fileCategory"),dataIndex:"category",key:"cat",width:120,render:e=>(0,n.jsx)(h.A,{children:(0,C.Jm)(e,t)})},{title:e("fileSize"),dataIndex:"fileSize",key:"size",width:100,render:e=>(0,C.z3)(e)},{title:"切片",dataIndex:"chunkCount",key:"chunks",width:90,render:e=>(0,n.jsx)(h.A,{color:e>1?"green":"orange",children:e})},{title:"解析状态",dataIndex:"status",key:"status",width:110,render:(e,t)=>(0,n.jsx)(h.A,{color:"active"===e?"green":"red",children:t.errorMessage||e})},{title:e("fileDate"),dataIndex:"mtime",key:"date",width:140,render:e=>e?new Date(e).toLocaleDateString(t):"—"},{title:"",key:"act",width:60,render:(t,s)=>(0,n.jsx)(p.Ay,{type:"text",danger:!0,size:"small",icon:(0,n.jsx)(w.A,{}),onClick:()=>{u.A.confirm({title:e("delete"),content:e("deleteConfirm"),okText:"确认",cancelText:"取消",okButtonProps:{danger:!0},onOk:async()=>{D(e=>[{type:"delete",title:"删除 ".concat(s.relativePath),description:"正在删除文件记录",status:"processing"},...e].slice(0,50));try{await (0,b.xq)(s.relativePath),a.success("已删除"),D(e=>[{type:"delete",title:"删除完成 ".concat(s.relativePath),description:"文件和索引记录已移除",status:"success"},...e].slice(0,50)),await q(),await Q()}catch(e){a.error("删除失败"),D(e=>[{type:"error",title:"删除失败 ".concat(s.relativePath),description:"请重试",status:"error"},...e].slice(0,50))}}})}})}];return(0,n.jsxs)("div",{className:"space-y-5 animateFadeIn",children:[(0,n.jsx)("div",{className:"pageHero",children:(0,n.jsx)("div",{children:(0,n.jsx)("h2",{className:"pageTitle",children:e("fileList")})})}),(0,n.jsxs)("div",{className:"fileToolbar",children:[(0,n.jsx)(y.A,{placeholder:e("searchPlaceholder"),prefix:(0,n.jsx)(j.A,{}),value:R,onChange:e=>{M(e.target.value),V(1)},allowClear:!0,className:P().filterInput}),(0,n.jsx)(m.A,{value:E||void 0,onChange:e=>{I(e||""),V(1)},placeholder:e("filterCategory"),allowClear:!0,className:P().filterSelect,options:[{label:e("allCategories"),value:""},...N.map(e=>({label:(0,C.Jm)(e,t),value:e}))]}),(0,n.jsx)(g.A,{showUploadList:!1,beforeUpload:e=>(G(e),!1),children:(0,n.jsx)(p.Ay,{type:"primary",icon:(0,n.jsx)(S.A,{}),loading:O,children:O?e("uploading"):e("upload")})})]}),(0,n.jsx)("div",{className:P().statusCardWrap,children:(0,n.jsx)(f.A,{size:"small",className:P().statusCard,title:(0,n.jsxs)(d.A,{size:6,children:[(0,n.jsx)(_.A,{}),"文件任务状态"]}),extra:J.length>$.length?(0,n.jsxs)("span",{className:P().statusExtra,children:["最近 ",$.length," / ",J.length]}):void 0,children:0===J.length?(0,n.jsx)("div",{className:P().statusEmpty,children:"暂无文件任务。上传、删除、解析、分块和入库结果会显示在这里。"}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("div",{className:P().statusSummary,children:[(0,n.jsxs)("button",{type:"button",className:"processing"===z?P().statusSummaryActive:void 0,onClick:()=>H("processing"),children:[(0,n.jsx)("b",{children:Y.processing})," 处理中"]}),(0,n.jsxs)("button",{type:"button",className:"success"===z?P().statusSummaryActive:void 0,onClick:()=>H("success"),children:[(0,n.jsx)("b",{children:Y.success})," 完成"]}),(0,n.jsxs)("button",{type:"button",className:"abnormal"===z?P().statusSummaryActive:void 0,onClick:()=>H("abnormal"),children:[(0,n.jsx)("b",{children:Y.warning+Y.error})," 异常"]})]}),(0,n.jsx)("div",{className:P().statusList,children:0===$.length?(0,n.jsx)("div",{className:P().statusEmpty,children:"当前状态暂无任务"}):$.map((e,a)=>(0,n.jsxs)("div",{className:P().statusItem,children:[(0,n.jsxs)("div",{className:P().statusHeader,children:[(0,n.jsxs)("div",{className:P().statusMain,children:[(0,n.jsx)(h.A,{color:"success"===e.status?"green":"error"===e.status?"red":"warning"===e.status?"orange":"blue",children:"upload"===e.type?"上传":"delete"===e.type?"删除":"reindex"===e.type?"重建":"失败"}),(0,n.jsx)("strong",{children:e.title})]}),(0,n.jsx)(h.A,{color:"success"===e.status?"success":"processing"===e.status?"processing":"warning"===e.status?"warning":"error",children:"success"===e.status?"完成":"processing"===e.status?"处理中":"warning"===e.status?"异常":"失败"})]}),(0,n.jsxs)("div",{className:P().statusMetaRow,children:[e.filePath&&(0,n.jsx)("span",{className:P().statusPath,children:e.filePath}),(0,n.jsxs)("span",{className:P().statusMeta,children:["number"==typeof e.chunkCount&&(0,n.jsxs)("span",{children:["切片 ",(0,n.jsx)("b",{children:e.chunkCount})]}),"number"==typeof e.textLength&&(0,n.jsxs)("span",{children:["正文 ",(0,n.jsx)("b",{children:e.textLength.toLocaleString(t)})]}),e.extractionMode&&(0,n.jsxs)("span",{children:["解析 ",(0,n.jsx)("b",{children:e.extractionMode})]})]})]}),"number"==typeof e.percent&&"processing"===e.status&&(0,n.jsx)(x.A,{percent:e.percent,size:"small",showInfo:!1})]},"".concat(e.title,"-").concat(a)))})]})})}),(0,n.jsx)(f.A,{children:(0,n.jsx)(v.A,{rowKey:"relativePath",columns:ee,dataSource:Z,loading:A,size:"middle",locale:{emptyText:R?e("emptySearch"):e("noFiles")},pagination:{current:W,pageSize:50,showSizeChanger:!1,onChange:V},rowSelection:{selectedRowKeys:B,onChange:F}})})]})}},5551:(e,t,a)=>{"use strict";function n(e){if(0===e)return"0 B";let t=Math.floor(Math.log(e)/Math.log(1024)),a=e/Math.pow(1024,t);return"".concat(a.toFixed(+(0!==t))," ").concat(["B","KB","MB","GB","TB"][t])}function s(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"zh-CN";if(!e||e<=0)return"en-US"===t?"Never":"从未";let a=Math.floor(Math.floor((Date.now()-e)/1e3)/60),n=Math.floor(a/60),s=Math.floor(n/24);return s>30?new Date(e).toLocaleDateString(t):"en-US"===t?s>0?"".concat(s,"d ago"):n>0?"".concat(n,"h ago"):a>0?"".concat(a,"m ago"):"Just now":s>0?"".concat(s," 天前"):n>0?"".concat(n," 小时前"):a>0?"".concat(a," 分钟前"):"刚刚"}a.d(t,{Jm:()=>o,fw:()=>s,z3:()=>n});let r={document:"文档",spreadsheet:"表格",image:"图片",cad:"图纸",code:"代码",data:"数据",web:"网页",diagram:"图表",archive:"压缩包",other:"其他"},i={document:"Document",spreadsheet:"Spreadsheet",image:"Image",cad:"CAD",code:"Code",data:"Data",web:"Web",diagram:"Diagram",archive:"Archive",other:"Other"};function o(e){var t;let a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"zh-CN";return null!=(t=("en-US"===a?i:r)[e])?t:e}},6578:(e,t,a)=>{"use strict";async function n(e,t){let a=await fetch(e,t);if(!a.ok){let e=await a.text(),t=e||"HTTP ".concat(a.status);try{let a=JSON.parse(e);t=a.error||a.message||t}catch(e){}throw Error(t)}return a.json()}async function s(e){let t=e?"?projectRoot=".concat(encodeURIComponent(e)):"";return n("/api/kb/stats".concat(t))}async function r(e){var t,a;let s=new URLSearchParams;return(null==e?void 0:e.projectRoot)&&s.set("projectRoot",e.projectRoot),(null==e?void 0:e.category)&&s.set("category",e.category),(null==e?void 0:e.page)&&s.set("page",String(null!=(t=e.page)?t:1)),(null==e?void 0:e.limit)&&s.set("limit",String(null!=(a=e.limit)?a:50)),n("/api/kb/files?".concat(s))}async function i(e,t){let a=new URLSearchParams({relativePath:e});return t&&a.set("projectRoot",t),n("/api/kb/files/detail?".concat(a))}async function o(e,t){return n("/api/kb/files/reindex",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({relativePath:e,projectRoot:t})})}async function c(e,t,a){return n("/api/kb/files/open",{method:"POST",body:JSON.stringify({relativePath:e,target:t,projectRoot:a})})}async function l(e,t,a){let s=await new Promise((t,a)=>{let n=new FileReader;n.onload=()=>{let e=n.result,a=e.indexOf(",");t(a>=0?e.slice(a+1):e)},n.onerror=a,n.readAsDataURL(e)});return n("/api/kb/upload",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({fileName:e.name,fileData:s,projectRoot:t,uploadId:a})})}async function u(e){return n("/api/kb/upload/progress?id=".concat(encodeURIComponent(e)))}async function d(e){let t=new URLSearchParams({limit:"50"});return e&&t.set("projectRoot",e),n("/api/kb/operations?".concat(t))}async function h(e,t){return n("/api/kb/files",{method:"DELETE",headers:{"Content-Type":"application/json"},body:JSON.stringify({relativePath:e,projectRoot:t})})}async function p(e){return n("/api/kb/reindex",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({projectRoot:e})})}async function y(){return n("/api/kb/features")}async function m(e,t){var a,s,r,i,o;let c=new URLSearchParams({q:e});return(null==t?void 0:t.projectRoot)&&c.set("projectRoot",t.projectRoot),(null==t?void 0:t.category)&&c.set("category",t.category),(null==t?void 0:t.limit)&&c.set("limit",String(null!=(o=t.limit)?o:20)),(null==t||null==(a=t.weights)?void 0:a.keyword)!=null&&c.set("keywordWeight",String(t.weights.keyword)),(null==t||null==(s=t.weights)?void 0:s.vector)!=null&&c.set("vectorWeight",String(t.weights.vector)),(null==t||null==(r=t.weights)?void 0:r.rewrite)!=null&&c.set("rewriteWeight",String(t.weights.rewrite)),(null==t||null==(i=t.weights)?void 0:i.hybridBonus)!=null&&c.set("hybridBonus",String(t.weights.hybridBonus)),n("/api/kb/search?".concat(c))}async function g(){return n("/api/config/providers")}async function f(e,t){return n("/api/config/providers",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:e,...t})})}async function x(e){return n("/api/config/providers/".concat(encodeURIComponent(e)),{method:"DELETE"})}async function v(){return n("/api/config/models")}async function _(e){return n("/api/config/models",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})}async function w(e){return n("/api/config/healthCheck",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:e})})}async function j(){return n("/api/system/stats")}async function S(e,t){let a=t?"?type=".concat(e,"&search=").concat(encodeURIComponent(t)):"?type=".concat(e);return n("/api/context".concat(a))}async function b(e){return n("/api/context?type=".concat(e,"&stats=1"))}async function C(e){return n("/api/context",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"compress",type:e})})}async function k(e){return n("/api/context",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"clear",type:e})})}async function P(e){return n("/api/context?id=".concat(encodeURIComponent(e)),{method:"DELETE"})}async function N(e,t){return n("/api/context",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:e,...t})})}async function T(e){return n("/api/config/providers/".concat(encodeURIComponent(e)))}a.d(t,{Bh:()=>T,E:()=>k,FC:()=>j,H1:()=>p,HC:()=>o,HT:()=>r,PH:()=>C,QT:()=>u,Qx:()=>d,VW:()=>y,W2:()=>m,Z3:()=>g,_m:()=>f,aP:()=>_,bZ:()=>w,h1:()=>x,hc:()=>s,hn:()=>S,p:()=>b,pF:()=>l,tn:()=>c,xC:()=>i,xq:()=>h,xw:()=>P,zo:()=>N,zr:()=>v})}},e=>{e.O(0,[260,167,796,740,576,700,446,584,15,252,636,593,792],()=>e(e.s=426)),_N_E=e.O()}]);
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[449],{3139:(e,n,t)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/overview",function(){return t(7795)}])},6578:(e,n,t)=>{"use strict";async function s(e,n){let t=await fetch(e,n);if(!t.ok){let e=await t.text(),n=e||"HTTP ".concat(t.status);try{let t=JSON.parse(e);n=t.error||t.message||n}catch(e){}throw Error(n)}return t.json()}async function i(e){let n=e?"?projectRoot=".concat(encodeURIComponent(e)):"";return s("/api/kb/stats".concat(n))}async function o(e){var n,t;let i=new URLSearchParams;return(null==e?void 0:e.projectRoot)&&i.set("projectRoot",e.projectRoot),(null==e?void 0:e.category)&&i.set("category",e.category),(null==e?void 0:e.page)&&i.set("page",String(null!=(n=e.page)?n:1)),(null==e?void 0:e.limit)&&i.set("limit",String(null!=(t=e.limit)?t:50)),s("/api/kb/files?".concat(i))}async function r(e,n){let t=new URLSearchParams({relativePath:e});return n&&t.set("projectRoot",n),s("/api/kb/files/detail?".concat(t))}async function a(e,n){return s("/api/kb/files/reindex",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({relativePath:e,projectRoot:n})})}async function l(e,n,t){return s("/api/kb/files/open",{method:"POST",body:JSON.stringify({relativePath:e,target:n,projectRoot:t})})}async function c(e,n,t){let i=await new Promise((n,t)=>{let s=new FileReader;s.onload=()=>{let e=s.result,t=e.indexOf(",");n(t>=0?e.slice(t+1):e)},s.onerror=t,s.readAsDataURL(e)});return s("/api/kb/upload",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({fileName:e.name,fileData:i,projectRoot:n,uploadId:t})})}async function d(e){return s("/api/kb/upload/progress?id=".concat(encodeURIComponent(e)))}async function u(e){let n=new URLSearchParams({limit:"50"});return e&&n.set("projectRoot",e),s("/api/kb/operations?".concat(n))}async function p(e,n){return s("/api/kb/files",{method:"DELETE",headers:{"Content-Type":"application/json"},body:JSON.stringify({relativePath:e,projectRoot:n})})}async function h(e){return s("/api/kb/reindex",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({projectRoot:e})})}async function m(){return s("/api/kb/features")}async function y(e,n){var t,i,o,r,a;let l=new URLSearchParams({q:e});return(null==n?void 0:n.projectRoot)&&l.set("projectRoot",n.projectRoot),(null==n?void 0:n.category)&&l.set("category",n.category),(null==n?void 0:n.limit)&&l.set("limit",String(null!=(a=n.limit)?a:20)),(null==n||null==(t=n.weights)?void 0:t.keyword)!=null&&l.set("keywordWeight",String(n.weights.keyword)),(null==n||null==(i=n.weights)?void 0:i.vector)!=null&&l.set("vectorWeight",String(n.weights.vector)),(null==n||null==(o=n.weights)?void 0:o.rewrite)!=null&&l.set("rewriteWeight",String(n.weights.rewrite)),(null==n||null==(r=n.weights)?void 0:r.hybridBonus)!=null&&l.set("hybridBonus",String(n.weights.hybridBonus)),s("/api/kb/search?".concat(l))}async function v(){return s("/api/config/providers")}async function x(e,n){return s("/api/config/providers",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:e,...n})})}async function g(e){return s("/api/config/providers/".concat(encodeURIComponent(e)),{method:"DELETE"})}async function j(){return s("/api/config/models")}async function f(e){return s("/api/config/models",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})}async function w(e){return s("/api/config/healthCheck",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:e})})}async function k(){return s("/api/system/stats")}async function A(e,n){let t=n?"?type=".concat(e,"&search=").concat(encodeURIComponent(n)):"?type=".concat(e);return s("/api/context".concat(t))}async function N(e){return s("/api/context?type=".concat(e,"&stats=1"))}async function T(e){return s("/api/context",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"compress",type:e})})}async function C(e){return s("/api/context",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"clear",type:e})})}async function b(e){return s("/api/context?id=".concat(encodeURIComponent(e)),{method:"DELETE"})}async function S(e,n){return s("/api/context",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:e,...n})})}async function P(e){return s("/api/config/providers/".concat(encodeURIComponent(e)))}t.d(n,{Bh:()=>P,E:()=>C,FC:()=>k,H1:()=>h,HC:()=>a,HT:()=>o,PH:()=>T,QT:()=>d,Qx:()=>u,VW:()=>m,W2:()=>y,Z3:()=>v,_m:()=>x,aP:()=>f,bZ:()=>w,h1:()=>g,hc:()=>i,hn:()=>A,p:()=>N,pF:()=>c,tn:()=>l,xC:()=>r,xq:()=>p,xw:()=>b,zo:()=>S,zr:()=>j})},7795:(e,n,t)=>{"use strict";t.r(n),t.d(n,{default:()=>T});var s=t(5321),i=t(7109),o=t(9018),r=t(2700),a=t(5114),l=t(2256),c=t(8770),d=t(8787),u=t(9605),p=t(4849),h=t(3442),m=t(1702),y=t(6109),v=t(2192),x=t(520),g=t(933),j=t(3114),f=t(9071),w=t(6631),k=t(4742),A=t(6381),N=t(6578);function T(){var e,n,t,T,C,b,S,P,O,R,E,U;let z=(0,o.Vr)(),_=(0,y.useRouter)(),[I,J]=(0,i.useState)(null),[M,D]=(0,i.useState)(!0),[B,F]=(0,i.useState)(0),L=(0,i.useCallback)(async()=>{D(!0);try{let[e,n]=await Promise.all([(0,N.FC)(),(0,N.Z3)().catch(()=>[])]);J(e),F(Array.isArray(n)?n.length:0)}catch(e){}finally{D(!1)}},[]);if((0,i.useEffect)(()=>{L();let e=setInterval(()=>{L()},1e4);return()=>clearInterval(e)},[L]),M&&!I)return(0,s.jsx)("div",{className:"flex justify-center py-16",children:(0,s.jsx)(r.A,{size:"large"})});let W=(null!=(n=null==I?void 0:I.cpu.usagePercent)?n:0)>80?"var(--colorDanger)":(null!=(t=null==I?void 0:I.cpu.usagePercent)?t:0)>50?"var(--colorWarning)":"var(--colorOk)",H=(null!=(T=null==I?void 0:I.memory.usagePercent)?T:0)>80?"var(--colorDanger)":(null!=(C=null==I?void 0:I.memory.usagePercent)?C:0)>50?"var(--colorWarning)":"var(--colorOk)",q=(null==I?void 0:I.tasks.total)?Math.round(I.tasks.success/I.tasks.total*100):0,Z=null==I||null==(e=I.models)?void 0:e[0];return(0,s.jsxs)("div",{className:"space-y-6 animateFadeIn",children:[(0,s.jsxs)("div",{className:"pageHero",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("h1",{className:"pageTitle",children:z("overview.title")}),(0,s.jsx)("p",{className:"pageDesc",children:z("overview.description")})]}),(0,s.jsx)("div",{className:"pageActions",children:(0,s.jsx)(a.Ay,{icon:(0,s.jsx)(v.A,{spin:M}),loading:M,onClick:()=>{L()},children:z("common.retry")})})]}),(0,s.jsxs)(l.A,{gutter:[18,18],children:[(0,s.jsx)(c.A,{xs:24,sm:12,children:(0,s.jsx)(d.A,{className:"metricPanel",size:"small",title:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(x.A,{})," CPU"]}),children:(0,s.jsxs)("div",{className:"centerMetric",children:[(0,s.jsx)(u.A,{type:"circle",percent:null!=(b=null==I?void 0:I.cpu.usagePercent)?b:0,size:120,strokeColor:W,format:e=>"".concat(null==e?void 0:e.toFixed(1),"%")}),(0,s.jsxs)("div",{className:"subtleText",children:[null!=(S=null==I?void 0:I.cpu.cores)?S:0," ",z("overview.cores")]})]})})}),(0,s.jsx)(c.A,{xs:24,sm:12,children:(0,s.jsx)(d.A,{className:"metricPanel",size:"small",title:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(g.A,{})," ",z("overview.memory")]}),children:(0,s.jsxs)("div",{className:"centerMetric",children:[(0,s.jsx)(u.A,{type:"circle",percent:null!=(P=null==I?void 0:I.memory.usagePercent)?P:0,size:120,strokeColor:H,format:e=>"".concat(e,"%")}),(0,s.jsxs)("div",{className:"subtleText",children:[null!=(O=null==I?void 0:I.memory.processMB)?O:0," MB / ",null!=(R=null==I?void 0:I.memory.totalMB)?R:0," MB"]})]})})})]}),(0,s.jsxs)("div",{className:"kpiGrid",children:[(0,s.jsx)(d.A,{className:"kpiCard",size:"small",children:(0,s.jsx)(p.A,{title:z("overview.providersCount"),value:B,prefix:(0,s.jsx)(j.A,{})})}),(0,s.jsx)(d.A,{className:"kpiCard",size:"small",children:(0,s.jsx)(p.A,{title:z("overview.tokensUsed"),value:null!=(E=null==I?void 0:I.tokens.total)?E:0,prefix:(0,s.jsx)(f.A,{})})}),(0,s.jsx)(d.A,{className:"kpiCard",size:"small",children:(0,s.jsx)(p.A,{title:z("overview.tasksTotal"),value:null!=(U=null==I?void 0:I.tasks.total)?U:0,prefix:(0,s.jsx)(w.A,{})})}),(0,s.jsx)(d.A,{className:"kpiCard",size:"small",children:(0,s.jsx)(p.A,{title:z("overview.successRate"),value:q,suffix:"%",prefix:q>80?(0,s.jsx)(k.A,{className:"okIcon"}):(0,s.jsx)(A.A,{className:"dangerIcon"})})})]}),(0,s.jsxs)(l.A,{gutter:[18,18],children:[(0,s.jsx)(c.A,{xs:24,sm:12,children:(0,s.jsx)(d.A,{size:"small",title:z("overview.topModel"),children:Z?(0,s.jsxs)("div",{className:"insightRow",children:[(0,s.jsx)("div",{className:"insightIcon",children:(0,s.jsx)(j.A,{})}),(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"insightTitle",children:Z.model}),(0,s.jsxs)("div",{className:"insightMeta",children:["@",Z.provider," — ",Z.count," ",z("overview.calls")]})]})]}):(0,s.jsx)("span",{className:"subtleText",children:z("common.noData")})})}),(0,s.jsx)(c.A,{xs:24,sm:12,children:(0,s.jsx)(d.A,{size:"small",title:z("overview.taskTypes"),children:(null==I?void 0:I.tasks.types)&&Object.keys(I.tasks.types).length>0?(0,s.jsx)(h.A,{wrap:!0,children:Object.entries(I.tasks.types).map(e=>{let[n,t]=e;return(0,s.jsxs)(m.A,{children:[n.slice(0,30),": ",t]},n)})}):(0,s.jsx)("span",{className:"subtleText",children:z("common.noData")})})})]}),(0,s.jsx)(d.A,{title:z("overview.quickActions"),size:"small",children:(0,s.jsxs)(h.A,{wrap:!0,children:[(0,s.jsx)(a.Ay,{onClick:()=>{_.push("/knowledge/manage")},children:z("overview.goToKnowledge")}),(0,s.jsx)(a.Ay,{onClick:()=>{_.push("/models")},children:z("overview.goToModels")}),(0,s.jsx)(a.Ay,{onClick:()=>{_.push("/settings")},children:z("overview.goToSettings")}),(0,s.jsx)(a.Ay,{onClick:()=>{_.push("/prompt")},children:z("nav.promptManagement")}),(0,s.jsx)(a.Ay,{onClick:()=>{_.push("/context/long-term")},children:z("nav.contextEngineering")})]})})]})}}},e=>{e.O(0,[260,167,700,15,860,636,593,792],()=>e(e.s=3139)),_N_E=e.O()}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[449],{3139:(e,n,t)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/overview",function(){return t(7795)}])},6578:(e,n,t)=>{"use strict";async function s(e,n){let t=await fetch(e,n);if(!t.ok){let e=await t.text(),n=e||"HTTP ".concat(t.status);try{let t=JSON.parse(e);n=t.error||t.message||n}catch(e){}throw Error(n)}return t.json()}async function i(e){let n=e?"?projectRoot=".concat(encodeURIComponent(e)):"";return s("/api/kb/stats".concat(n))}async function o(e){var n,t;let i=new URLSearchParams;return(null==e?void 0:e.projectRoot)&&i.set("projectRoot",e.projectRoot),(null==e?void 0:e.category)&&i.set("category",e.category),(null==e?void 0:e.page)&&i.set("page",String(null!=(n=e.page)?n:1)),(null==e?void 0:e.limit)&&i.set("limit",String(null!=(t=e.limit)?t:50)),s("/api/kb/files?".concat(i))}async function r(e,n){let t=new URLSearchParams({relativePath:e});return n&&t.set("projectRoot",n),s("/api/kb/files/detail?".concat(t))}async function a(e,n){return s("/api/kb/files/reindex",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({relativePath:e,projectRoot:n})})}async function l(e,n,t){return s("/api/kb/files/open",{method:"POST",body:JSON.stringify({relativePath:e,target:n,projectRoot:t})})}async function c(e,n,t){let i=await new Promise((n,t)=>{let s=new FileReader;s.onload=()=>{let e=s.result,t=e.indexOf(",");n(t>=0?e.slice(t+1):e)},s.onerror=t,s.readAsDataURL(e)});return s("/api/kb/upload",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({fileName:e.name,fileData:i,projectRoot:n,uploadId:t})})}async function d(e){return s("/api/kb/upload/progress?id=".concat(encodeURIComponent(e)))}async function u(e){let n=new URLSearchParams({limit:"50"});return e&&n.set("projectRoot",e),s("/api/kb/operations?".concat(n))}async function p(e,n){return s("/api/kb/files",{method:"DELETE",headers:{"Content-Type":"application/json"},body:JSON.stringify({relativePath:e,projectRoot:n})})}async function h(e){return s("/api/kb/reindex",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({projectRoot:e})})}async function m(){return s("/api/kb/features")}async function y(e,n){var t,i,o,r,a;let l=new URLSearchParams({q:e});return(null==n?void 0:n.projectRoot)&&l.set("projectRoot",n.projectRoot),(null==n?void 0:n.category)&&l.set("category",n.category),(null==n?void 0:n.limit)&&l.set("limit",String(null!=(a=n.limit)?a:20)),(null==n||null==(t=n.weights)?void 0:t.keyword)!=null&&l.set("keywordWeight",String(n.weights.keyword)),(null==n||null==(i=n.weights)?void 0:i.vector)!=null&&l.set("vectorWeight",String(n.weights.vector)),(null==n||null==(o=n.weights)?void 0:o.rewrite)!=null&&l.set("rewriteWeight",String(n.weights.rewrite)),(null==n||null==(r=n.weights)?void 0:r.hybridBonus)!=null&&l.set("hybridBonus",String(n.weights.hybridBonus)),s("/api/kb/search?".concat(l))}async function v(){return s("/api/config/providers")}async function x(e,n){return s("/api/config/providers",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:e,...n})})}async function g(e){return s("/api/config/providers/".concat(encodeURIComponent(e)),{method:"DELETE"})}async function j(){return s("/api/config/models")}async function f(e){return s("/api/config/models",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})}async function w(e){return s("/api/config/healthCheck",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:e})})}async function k(){return s("/api/system/stats")}async function A(e,n){let t=n?"?type=".concat(e,"&search=").concat(encodeURIComponent(n)):"?type=".concat(e);return s("/api/context".concat(t))}async function N(e){return s("/api/context?type=".concat(e,"&stats=1"))}async function T(e){return s("/api/context",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"compress",type:e})})}async function C(e){return s("/api/context",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"clear",type:e})})}async function b(e){return s("/api/context?id=".concat(encodeURIComponent(e)),{method:"DELETE"})}async function S(e,n){return s("/api/context",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:e,...n})})}async function P(e){return s("/api/config/providers/".concat(encodeURIComponent(e)))}t.d(n,{Bh:()=>P,E:()=>C,FC:()=>k,H1:()=>h,HC:()=>a,HT:()=>o,PH:()=>T,QT:()=>d,Qx:()=>u,VW:()=>m,W2:()=>y,Z3:()=>v,_m:()=>x,aP:()=>f,bZ:()=>w,h1:()=>g,hc:()=>i,hn:()=>A,p:()=>N,pF:()=>c,tn:()=>l,xC:()=>r,xq:()=>p,xw:()=>b,zo:()=>S,zr:()=>j})},7795:(e,n,t)=>{"use strict";t.r(n),t.d(n,{default:()=>T});var s=t(5321),i=t(7109),o=t(9018),r=t(2700),a=t(5114),l=t(2256),c=t(8770),d=t(8787),u=t(9605),p=t(4849),h=t(3442),m=t(1702),y=t(6109),v=t(2192),x=t(520),g=t(933),j=t(3114),f=t(9071),w=t(9012),k=t(4742),A=t(6381),N=t(6578);function T(){var e,n,t,T,C,b,S,P,O,R,E,U;let z=(0,o.Vr)(),_=(0,y.useRouter)(),[I,J]=(0,i.useState)(null),[M,D]=(0,i.useState)(!0),[B,F]=(0,i.useState)(0),L=(0,i.useCallback)(async()=>{D(!0);try{let[e,n]=await Promise.all([(0,N.FC)(),(0,N.Z3)().catch(()=>[])]);J(e),F(Array.isArray(n)?n.length:0)}catch(e){}finally{D(!1)}},[]);if((0,i.useEffect)(()=>{L();let e=setInterval(()=>{L()},1e4);return()=>clearInterval(e)},[L]),M&&!I)return(0,s.jsx)("div",{className:"flex justify-center py-16",children:(0,s.jsx)(r.A,{size:"large"})});let W=(null!=(n=null==I?void 0:I.cpu.usagePercent)?n:0)>80?"var(--colorDanger)":(null!=(t=null==I?void 0:I.cpu.usagePercent)?t:0)>50?"var(--colorWarning)":"var(--colorOk)",H=(null!=(T=null==I?void 0:I.memory.usagePercent)?T:0)>80?"var(--colorDanger)":(null!=(C=null==I?void 0:I.memory.usagePercent)?C:0)>50?"var(--colorWarning)":"var(--colorOk)",q=(null==I?void 0:I.tasks.total)?Math.round(I.tasks.success/I.tasks.total*100):0,Z=null==I||null==(e=I.models)?void 0:e[0];return(0,s.jsxs)("div",{className:"space-y-6 animateFadeIn",children:[(0,s.jsxs)("div",{className:"pageHero",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("h1",{className:"pageTitle",children:z("overview.title")}),(0,s.jsx)("p",{className:"pageDesc",children:z("overview.description")})]}),(0,s.jsx)("div",{className:"pageActions",children:(0,s.jsx)(a.Ay,{icon:(0,s.jsx)(v.A,{spin:M}),loading:M,onClick:()=>{L()},children:z("common.retry")})})]}),(0,s.jsxs)(l.A,{gutter:[18,18],children:[(0,s.jsx)(c.A,{xs:24,sm:12,children:(0,s.jsx)(d.A,{className:"metricPanel",size:"small",title:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(x.A,{})," CPU"]}),children:(0,s.jsxs)("div",{className:"centerMetric",children:[(0,s.jsx)(u.A,{type:"circle",percent:null!=(b=null==I?void 0:I.cpu.usagePercent)?b:0,size:120,strokeColor:W,format:e=>"".concat(null==e?void 0:e.toFixed(1),"%")}),(0,s.jsxs)("div",{className:"subtleText",children:[null!=(S=null==I?void 0:I.cpu.cores)?S:0," ",z("overview.cores")]})]})})}),(0,s.jsx)(c.A,{xs:24,sm:12,children:(0,s.jsx)(d.A,{className:"metricPanel",size:"small",title:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(g.A,{})," ",z("overview.memory")]}),children:(0,s.jsxs)("div",{className:"centerMetric",children:[(0,s.jsx)(u.A,{type:"circle",percent:null!=(P=null==I?void 0:I.memory.usagePercent)?P:0,size:120,strokeColor:H,format:e=>"".concat(e,"%")}),(0,s.jsxs)("div",{className:"subtleText",children:[null!=(O=null==I?void 0:I.memory.processMB)?O:0," MB / ",null!=(R=null==I?void 0:I.memory.totalMB)?R:0," MB"]})]})})})]}),(0,s.jsxs)("div",{className:"kpiGrid",children:[(0,s.jsx)(d.A,{className:"kpiCard",size:"small",children:(0,s.jsx)(p.A,{title:z("overview.providersCount"),value:B,prefix:(0,s.jsx)(j.A,{})})}),(0,s.jsx)(d.A,{className:"kpiCard",size:"small",children:(0,s.jsx)(p.A,{title:z("overview.tokensUsed"),value:null!=(E=null==I?void 0:I.tokens.total)?E:0,prefix:(0,s.jsx)(f.A,{})})}),(0,s.jsx)(d.A,{className:"kpiCard",size:"small",children:(0,s.jsx)(p.A,{title:z("overview.tasksTotal"),value:null!=(U=null==I?void 0:I.tasks.total)?U:0,prefix:(0,s.jsx)(w.A,{})})}),(0,s.jsx)(d.A,{className:"kpiCard",size:"small",children:(0,s.jsx)(p.A,{title:z("overview.successRate"),value:q,suffix:"%",prefix:q>80?(0,s.jsx)(k.A,{className:"okIcon"}):(0,s.jsx)(A.A,{className:"dangerIcon"})})})]}),(0,s.jsxs)(l.A,{gutter:[18,18],children:[(0,s.jsx)(c.A,{xs:24,sm:12,children:(0,s.jsx)(d.A,{size:"small",title:z("overview.topModel"),children:Z?(0,s.jsxs)("div",{className:"insightRow",children:[(0,s.jsx)("div",{className:"insightIcon",children:(0,s.jsx)(j.A,{})}),(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"insightTitle",children:Z.model}),(0,s.jsxs)("div",{className:"insightMeta",children:["@",Z.provider," — ",Z.count," ",z("overview.calls")]})]})]}):(0,s.jsx)("span",{className:"subtleText",children:z("common.noData")})})}),(0,s.jsx)(c.A,{xs:24,sm:12,children:(0,s.jsx)(d.A,{size:"small",title:z("overview.taskTypes"),children:(null==I?void 0:I.tasks.types)&&Object.keys(I.tasks.types).length>0?(0,s.jsx)(h.A,{wrap:!0,children:Object.entries(I.tasks.types).map(e=>{let[n,t]=e;return(0,s.jsxs)(m.A,{children:[n.slice(0,30),": ",t]},n)})}):(0,s.jsx)("span",{className:"subtleText",children:z("common.noData")})})})]}),(0,s.jsx)(d.A,{title:z("overview.quickActions"),size:"small",children:(0,s.jsxs)(h.A,{wrap:!0,children:[(0,s.jsx)(a.Ay,{onClick:()=>{_.push("/knowledge/manage")},children:z("overview.goToKnowledge")}),(0,s.jsx)(a.Ay,{onClick:()=>{_.push("/models")},children:z("overview.goToModels")}),(0,s.jsx)(a.Ay,{onClick:()=>{_.push("/settings")},children:z("overview.goToSettings")}),(0,s.jsx)(a.Ay,{onClick:()=>{_.push("/prompt")},children:z("nav.promptManagement")}),(0,s.jsx)(a.Ay,{onClick:()=>{_.push("/context/long-term")},children:z("nav.contextEngineering")})]})})]})}}},e=>{e.O(0,[260,167,700,15,860,636,593,792],()=>e(e.s=3139)),_N_E=e.O()}]);
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[26],{697:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>k});var a=r(5321),c=r(7109),s=r(9018),o=r(7807),n=r(5114),i=r(8787),l=r(4253),p=r(6985),d=r(6171),m=r(1702),h=r(5258),u=r(7576),j=r(3455),f=r(7271),x=r(4746),v=r(7715),y=r(8483);function g(){return(g=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e}).apply(this,arguments)}let A=c.forwardRef((e,t)=>c.createElement(y.A,g({},e,{ref:t,icon:v.A})));var w=r(6631),b=r(9650),N=r(8209),C=r(9606),P=r(8740);async function O(){let e=await fetch("/api/prompt");if(!e.ok)throw Error("Failed");return e.json()}async function T(e,t){let r=await fetch("/api/prompt",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({filePath:e,content:t})});if(!r.ok)throw Error("Failed");return r.json()}async function z(e,t){if(!(await fetch("/api/prompt",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"select",selectedIds:e,prompts:t})})).ok)throw Error("Failed")}async function S(e,t,r){if(!(await fetch("/api/prompt",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"create",name:e,content:t,projectRoot:r})})).ok)throw Error("Failed")}function k(){let e=(0,s.Vr)(),{message:t}=o.A.useApp(),[r,v]=(0,c.useState)(!0),[y,g]=(0,c.useState)([]),[k,E]=(0,c.useState)(""),[I,M]=(0,c.useState)([]),[_,F]=(0,c.useState)(!1),[H,R]=(0,c.useState)(null),[V,L]=(0,c.useState)(""),[B,D]=(0,c.useState)(!1),[J,X]=(0,c.useState)(!1),[q,G]=(0,c.useState)(""),[U,K]=(0,c.useState)(""),[Q,W]=(0,c.useState)(),[Y,Z]=(0,c.useState)(!1),$=async()=>{v(!0);try{let e=await O();g(e.projects),M(e.selectedIds),E(e.currentProjectRoot)}catch(r){t.error(e("common.error"))}finally{v(!1)}};(0,c.useEffect)(()=>{$()},[]);let ee=(0,c.useMemo)(()=>y.filter(e=>"project"===e.type).map(e=>({label:"".concat(e.projectName," — ").concat(e.projectRoot),value:e.projectRoot})),[y]),et=async()=>{if(H){D(!0);try{await T(H.customizePath,V),t.success(e("common.success")),F(!1),await $()}catch(r){t.error(e("common.error"))}finally{D(!1)}}},er=async(r,a)=>{let c=a?[...I,r]:I.filter(e=>e!==r);M(c);try{await z(c,y)}catch(r){t.error(e("common.error"))}},ea=async()=>{if(q.trim()){Z(!0);try{await S(q.trim(),U,Q),X(!1),G(""),K(""),W(void 0),t.success(e("common.success")),await $()}catch(r){t.error(e("common.error"))}finally{Z(!1)}}},ec=async r=>{try{if(!(await fetch("/api/prompt",{method:"DELETE",headers:{"Content-Type":"application/json"},body:JSON.stringify({projectId:r.projectId,filePath:r.customizePath,type:r.type})})).ok)throw Error("Failed");t.success(e("common.success")),await $()}catch(r){t.error(e("common.error"))}};return(0,a.jsxs)("div",{className:"space-y-6 animateFadeIn",children:[(0,a.jsxs)("div",{className:"pageHero",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("h1",{className:"pageTitle",children:e("nav.promptManagement")}),(0,a.jsx)("p",{className:"pageDesc",children:e("prompt.description")})]}),(0,a.jsx)("div",{className:"pageActions",children:(0,a.jsx)(n.Ay,{type:"primary",icon:(0,a.jsx)(x.A,{}),onClick:()=>X(!0),children:e("prompt.createCustom")})})]}),(0,a.jsx)(i.A,{size:"small",title:(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(A,{})," ",e("prompt.currentDirectory")]}),children:(0,a.jsx)("div",{className:"mutedPath",children:k||"—"})}),0!==y.length||r?null:(0,a.jsx)(l.A,{}),(0,a.jsx)("div",{className:"surfaceGrid",children:r?Array.from({length:3}).map((e,t)=>(0,a.jsx)(i.A,{loading:!0,size:"small"},t)):y.map(t=>(0,a.jsx)(i.A,{size:"small",title:(0,a.jsxs)("span",{className:"cardTitleInline",children:[(0,a.jsx)(w.A,{})," ",(0,a.jsx)("span",{className:"cardTitleText",children:t.projectName})]}),extra:(0,a.jsxs)("span",{className:"actionInline",children:[(0,a.jsx)(p.A,{checked:I.includes(t.projectId),onChange:e=>{er(t.projectId,e.target.checked)}}),(0,a.jsx)(n.Ay,{size:"small",type:"text",icon:(0,a.jsx)(b.A,{}),onClick:()=>{R(t),L(t.content||""),F(!0)}}),(0,a.jsx)(d.A,{title:e("prompt.deleteConfirm"),onConfirm:()=>{ec(t)},children:(0,a.jsx)(n.Ay,{size:"small",type:"text",danger:!0,icon:(0,a.jsx)(N.A,{})})})]}),children:(0,a.jsxs)("div",{className:"promptCardBody",children:[(0,a.jsxs)("div",{className:"subtleText breakText",children:[(0,a.jsx)(C.A,{})," ","custom"===t.type?t.customizePath:t.projectRoot]}),t.boundProjectRoot&&(0,a.jsxs)("div",{className:"subtleText breakText",children:[e("prompt.boundProject"),": ",t.boundProjectRoot]}),(0,a.jsxs)("div",{className:"subtleText",children:[(0,a.jsx)(P.A,{})," ",t.mtime?new Date(t.mtime).toLocaleString():e("common.never")]}),(0,a.jsxs)("div",{children:[(0,a.jsx)(m.A,{color:"custom"===t.type?"purple":"blue",children:"custom"===t.type?e("prompt.customPrompt"):e("prompt.projectPrompt")}),t.hasFile?(0,a.jsx)(m.A,{color:"green",children:e("prompt.hasFile")}):(0,a.jsx)(m.A,{color:"default",children:e("prompt.noFile")}),I.includes(t.projectId)&&(0,a.jsx)(m.A,{color:"processing",children:e("prompt.selected")})]}),t.content&&(0,a.jsxs)("div",{className:"codePreview",children:[t.content.slice(0,200),t.content.length>200?"...":""]})]})},t.projectId))}),0===y.length&&(0,a.jsx)(i.A,{size:"small",children:(0,a.jsx)("span",{className:"subtleText",children:e("prompt.noProjects")})}),(0,a.jsxs)(h.A,{title:"".concat(e("common.edit")," — ").concat((null==H?void 0:H.projectName)||""),open:_,width:800,onCancel:()=>F(!1),onOk:()=>{et()},confirmLoading:B,children:[(0,a.jsx)("div",{className:"modalMeta",children:null==H?void 0:H.customizePath}),(0,a.jsx)(u.A.TextArea,{className:"monoEditor",value:V,onChange:e=>L(e.target.value),rows:25})]}),(0,a.jsx)(h.A,{title:e("prompt.createCustom"),open:J,width:800,onCancel:()=>X(!1),onOk:()=>{ea()},confirmLoading:Y,children:(0,a.jsxs)(j.A,{layout:"vertical",children:[(0,a.jsx)(j.A.Item,{label:e("prompt.customName"),required:!0,children:(0,a.jsx)(u.A,{value:q,onChange:e=>G(e.target.value)})}),(0,a.jsx)(j.A.Item,{label:e("prompt.bindProject"),children:(0,a.jsx)(f.A,{allowClear:!0,value:Q,onChange:W,options:ee})}),(0,a.jsx)(j.A.Item,{label:e("prompt.content"),children:(0,a.jsx)(u.A.TextArea,{value:U,onChange:e=>K(e.target.value),rows:18})})]})})]})}},2887:(e,t)=>{"use strict";t.A={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0042 42h216v494zM504 618H320c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h184c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8zM312 490v48c0 4.4 3.6 8 8 8h384c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H320c-4.4 0-8 3.6-8 8z"}}]},name:"file-text",theme:"outlined"}},4084:(e,t)=>{"use strict";t.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:"M686.7 638.6L544.1 535.5V288c0-4.4-3.6-8-8-8H488c-4.4 0-8 3.6-8 8v275.4c0 2.6 1.2 5 3.3 6.5l165.4 120.6c3.6 2.6 8.6 1.8 11.2-1.7l28.6-39c2.6-3.7 1.8-8.7-1.8-11.2z"}}]},name:"clock-circle",theme:"outlined"}},6631:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});var a=r(7109),c=r(2887),s=r(8483);function o(){return(o=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e}).apply(this,arguments)}let n=a.forwardRef((e,t)=>a.createElement(s.A,o({},e,{ref:t,icon:c.A})))},7549:(e,t,r)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/prompt",function(){return r(697)}])},7715:(e,t)=>{"use strict";t.A={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M952 474H829.8C812.5 327.6 696.4 211.5 550 194.2V72c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v122.2C327.6 211.5 211.5 327.6 194.2 474H72c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h122.2C211.5 696.4 327.6 812.5 474 829.8V952c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V829.8C696.4 812.5 812.5 696.4 829.8 550H952c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8zM512 756c-134.8 0-244-109.2-244-244s109.2-244 244-244 244 109.2 244 244-109.2 244-244 244z"}},{tag:"path",attrs:{d:"M512 392c-32.1 0-62.1 12.4-84.8 35.2-22.7 22.7-35.2 52.7-35.2 84.8s12.5 62.1 35.2 84.8C449.9 619.4 480 632 512 632s62.1-12.5 84.8-35.2C619.4 574.1 632 544 632 512s-12.5-62.1-35.2-84.8A118.57 118.57 0 00512 392z"}}]},name:"aim",theme:"outlined"}},8740:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});var a=r(7109),c=r(4084),s=r(8483);function o(){return(o=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e}).apply(this,arguments)}let n=a.forwardRef((e,t)=>a.createElement(s.A,o({},e,{ref:t,icon:c.A})))}},e=>{e.O(0,[260,167,796,740,576,446,519,636,593,792],()=>e(e.s=7549)),_N_E=e.O()}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[26],{697:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>k});var a=r(5321),c=r(7109),s=r(9018),o=r(7807),n=r(5114),i=r(8787),l=r(4253),p=r(6985),d=r(6171),m=r(1702),h=r(5258),u=r(7576),j=r(3455),f=r(7271),x=r(4746),v=r(7715),y=r(8483);function g(){return(g=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e}).apply(this,arguments)}let A=c.forwardRef((e,t)=>c.createElement(y.A,g({},e,{ref:t,icon:v.A})));var w=r(9012),b=r(9650),N=r(8209),C=r(9606),P=r(8740);async function O(){let e=await fetch("/api/prompt");if(!e.ok)throw Error("Failed");return e.json()}async function T(e,t){let r=await fetch("/api/prompt",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({filePath:e,content:t})});if(!r.ok)throw Error("Failed");return r.json()}async function z(e,t){if(!(await fetch("/api/prompt",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"select",selectedIds:e,prompts:t})})).ok)throw Error("Failed")}async function S(e,t,r){if(!(await fetch("/api/prompt",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"create",name:e,content:t,projectRoot:r})})).ok)throw Error("Failed")}function k(){let e=(0,s.Vr)(),{message:t}=o.A.useApp(),[r,v]=(0,c.useState)(!0),[y,g]=(0,c.useState)([]),[k,E]=(0,c.useState)(""),[I,M]=(0,c.useState)([]),[_,F]=(0,c.useState)(!1),[H,R]=(0,c.useState)(null),[V,L]=(0,c.useState)(""),[B,D]=(0,c.useState)(!1),[J,X]=(0,c.useState)(!1),[q,G]=(0,c.useState)(""),[U,K]=(0,c.useState)(""),[Q,W]=(0,c.useState)(),[Y,Z]=(0,c.useState)(!1),$=async()=>{v(!0);try{let e=await O();g(e.projects),M(e.selectedIds),E(e.currentProjectRoot)}catch(r){t.error(e("common.error"))}finally{v(!1)}};(0,c.useEffect)(()=>{$()},[]);let ee=(0,c.useMemo)(()=>y.filter(e=>"project"===e.type).map(e=>({label:"".concat(e.projectName," — ").concat(e.projectRoot),value:e.projectRoot})),[y]),et=async()=>{if(H){D(!0);try{await T(H.customizePath,V),t.success(e("common.success")),F(!1),await $()}catch(r){t.error(e("common.error"))}finally{D(!1)}}},er=async(r,a)=>{let c=a?[...I,r]:I.filter(e=>e!==r);M(c);try{await z(c,y)}catch(r){t.error(e("common.error"))}},ea=async()=>{if(q.trim()){Z(!0);try{await S(q.trim(),U,Q),X(!1),G(""),K(""),W(void 0),t.success(e("common.success")),await $()}catch(r){t.error(e("common.error"))}finally{Z(!1)}}},ec=async r=>{try{if(!(await fetch("/api/prompt",{method:"DELETE",headers:{"Content-Type":"application/json"},body:JSON.stringify({projectId:r.projectId,filePath:r.customizePath,type:r.type})})).ok)throw Error("Failed");t.success(e("common.success")),await $()}catch(r){t.error(e("common.error"))}};return(0,a.jsxs)("div",{className:"space-y-6 animateFadeIn",children:[(0,a.jsxs)("div",{className:"pageHero",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("h1",{className:"pageTitle",children:e("nav.promptManagement")}),(0,a.jsx)("p",{className:"pageDesc",children:e("prompt.description")})]}),(0,a.jsx)("div",{className:"pageActions",children:(0,a.jsx)(n.Ay,{type:"primary",icon:(0,a.jsx)(x.A,{}),onClick:()=>X(!0),children:e("prompt.createCustom")})})]}),(0,a.jsx)(i.A,{size:"small",title:(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(A,{})," ",e("prompt.currentDirectory")]}),children:(0,a.jsx)("div",{className:"mutedPath",children:k||"—"})}),0!==y.length||r?null:(0,a.jsx)(l.A,{}),(0,a.jsx)("div",{className:"surfaceGrid",children:r?Array.from({length:3}).map((e,t)=>(0,a.jsx)(i.A,{loading:!0,size:"small"},t)):y.map(t=>(0,a.jsx)(i.A,{size:"small",title:(0,a.jsxs)("span",{className:"cardTitleInline",children:[(0,a.jsx)(w.A,{})," ",(0,a.jsx)("span",{className:"cardTitleText",children:t.projectName})]}),extra:(0,a.jsxs)("span",{className:"actionInline",children:[(0,a.jsx)(p.A,{checked:I.includes(t.projectId),onChange:e=>{er(t.projectId,e.target.checked)}}),(0,a.jsx)(n.Ay,{size:"small",type:"text",icon:(0,a.jsx)(b.A,{}),onClick:()=>{R(t),L(t.content||""),F(!0)}}),(0,a.jsx)(d.A,{title:e("prompt.deleteConfirm"),onConfirm:()=>{ec(t)},children:(0,a.jsx)(n.Ay,{size:"small",type:"text",danger:!0,icon:(0,a.jsx)(N.A,{})})})]}),children:(0,a.jsxs)("div",{className:"promptCardBody",children:[(0,a.jsxs)("div",{className:"subtleText breakText",children:[(0,a.jsx)(C.A,{})," ","custom"===t.type?t.customizePath:t.projectRoot]}),t.boundProjectRoot&&(0,a.jsxs)("div",{className:"subtleText breakText",children:[e("prompt.boundProject"),": ",t.boundProjectRoot]}),(0,a.jsxs)("div",{className:"subtleText",children:[(0,a.jsx)(P.A,{})," ",t.mtime?new Date(t.mtime).toLocaleString():e("common.never")]}),(0,a.jsxs)("div",{children:[(0,a.jsx)(m.A,{color:"custom"===t.type?"purple":"blue",children:"custom"===t.type?e("prompt.customPrompt"):e("prompt.projectPrompt")}),t.hasFile?(0,a.jsx)(m.A,{color:"green",children:e("prompt.hasFile")}):(0,a.jsx)(m.A,{color:"default",children:e("prompt.noFile")}),I.includes(t.projectId)&&(0,a.jsx)(m.A,{color:"processing",children:e("prompt.selected")})]}),t.content&&(0,a.jsxs)("div",{className:"codePreview",children:[t.content.slice(0,200),t.content.length>200?"...":""]})]})},t.projectId))}),0===y.length&&(0,a.jsx)(i.A,{size:"small",children:(0,a.jsx)("span",{className:"subtleText",children:e("prompt.noProjects")})}),(0,a.jsxs)(h.A,{title:"".concat(e("common.edit")," — ").concat((null==H?void 0:H.projectName)||""),open:_,width:800,onCancel:()=>F(!1),onOk:()=>{et()},confirmLoading:B,children:[(0,a.jsx)("div",{className:"modalMeta",children:null==H?void 0:H.customizePath}),(0,a.jsx)(u.A.TextArea,{className:"monoEditor",value:V,onChange:e=>L(e.target.value),rows:25})]}),(0,a.jsx)(h.A,{title:e("prompt.createCustom"),open:J,width:800,onCancel:()=>X(!1),onOk:()=>{ea()},confirmLoading:Y,children:(0,a.jsxs)(j.A,{layout:"vertical",children:[(0,a.jsx)(j.A.Item,{label:e("prompt.customName"),required:!0,children:(0,a.jsx)(u.A,{value:q,onChange:e=>G(e.target.value)})}),(0,a.jsx)(j.A.Item,{label:e("prompt.bindProject"),children:(0,a.jsx)(f.A,{allowClear:!0,value:Q,onChange:W,options:ee})}),(0,a.jsx)(j.A.Item,{label:e("prompt.content"),children:(0,a.jsx)(u.A.TextArea,{value:U,onChange:e=>K(e.target.value),rows:18})})]})})]})}},2887:(e,t)=>{"use strict";t.A={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0042 42h216v494zM504 618H320c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h184c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8zM312 490v48c0 4.4 3.6 8 8 8h384c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H320c-4.4 0-8 3.6-8 8z"}}]},name:"file-text",theme:"outlined"}},4084:(e,t)=>{"use strict";t.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:"M686.7 638.6L544.1 535.5V288c0-4.4-3.6-8-8-8H488c-4.4 0-8 3.6-8 8v275.4c0 2.6 1.2 5 3.3 6.5l165.4 120.6c3.6 2.6 8.6 1.8 11.2-1.7l28.6-39c2.6-3.7 1.8-8.7-1.8-11.2z"}}]},name:"clock-circle",theme:"outlined"}},7549:(e,t,r)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/prompt",function(){return r(697)}])},7715:(e,t)=>{"use strict";t.A={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M952 474H829.8C812.5 327.6 696.4 211.5 550 194.2V72c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v122.2C327.6 211.5 211.5 327.6 194.2 474H72c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h122.2C211.5 696.4 327.6 812.5 474 829.8V952c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V829.8C696.4 812.5 812.5 696.4 829.8 550H952c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8zM512 756c-134.8 0-244-109.2-244-244s109.2-244 244-244 244 109.2 244 244-109.2 244-244 244z"}},{tag:"path",attrs:{d:"M512 392c-32.1 0-62.1 12.4-84.8 35.2-22.7 22.7-35.2 52.7-35.2 84.8s12.5 62.1 35.2 84.8C449.9 619.4 480 632 512 632s62.1-12.5 84.8-35.2C619.4 574.1 632 544 632 512s-12.5-62.1-35.2-84.8A118.57 118.57 0 00512 392z"}}]},name:"aim",theme:"outlined"}},8740:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});var a=r(7109),c=r(4084),s=r(8483);function o(){return(o=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e}).apply(this,arguments)}let n=a.forwardRef((e,t)=>a.createElement(s.A,o({},e,{ref:t,icon:c.A})))},9012:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});var a=r(7109),c=r(2887),s=r(8483);function o(){return(o=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e}).apply(this,arguments)}let n=a.forwardRef((e,t)=>a.createElement(s.A,o({},e,{ref:t,icon:c.A})))}},e=>{e.O(0,[260,167,796,740,576,446,519,636,593,792],()=>e(e.s=7549)),_N_E=e.O()}]);
@@ -1 +1 @@
1
- self.__BUILD_MANIFEST=function(e,s,t,c,a,n,d,i,f,r,k,o,u,l,g,h){return{__rewrites:{afterFiles:[],beforeFiles:[],fallback:[]},__routerFilterStatic:{numItems:0,errorRate:1e-4,numBits:0,numHashes:u,bitArray:[]},__routerFilterDynamic:{numItems:f,errorRate:1e-4,numBits:f,numHashes:u,bitArray:[]},"/":["static/chunks/pages/index-505bd438c95ec0e8.js"],"/_error":["static/chunks/pages/_error-18decb9cd478883d.js"],"/context/long-term":[e,s,t,c,a,n,d,i,r,l,"static/chunks/pages/context/long-term-b431347893a69969.js"],"/context/short-term":[e,s,t,c,a,n,d,i,r,l,"static/chunks/pages/context/short-term-f0c420388a050e28.js"],"/knowledge":["static/chunks/pages/knowledge-b3ef77e79801287c.js"],"/knowledge/file-detail":[e,s,t,c,a,n,d,i,g,"static/chunks/517-c6a8c0e680dafa46.js",k,"static/chunks/pages/knowledge/file-detail-328ce1d9c6ce907e.js"],"/knowledge/files":[e,s,t,c,a,n,d,i,h,"static/chunks/252-a9d7774c3009dcda.js",k,"static/chunks/pages/knowledge/files-7ce51dd9b261aea2.js"],"/knowledge/manage":[e,s,t,c,n,d,i,"static/chunks/38-e3671099d80db91b.js","static/chunks/pages/knowledge/manage-813a1635240f38df.js"],"/knowledge/search":[e,s,t,a,n,g,"static/chunks/992-8a06ec9aa4b1e3b3.js",k,"static/chunks/pages/knowledge/search-9da46d3cee5b7517.js"],"/models":[e,s,t,c,a,r,"static/css/d7ad5d9b207a29f0.css","static/chunks/pages/models-2146abd3aa3da947.js"],"/overview":[e,s,n,h,"static/chunks/860-55753e4c8eba4bb3.js","static/chunks/pages/overview-da401b76cd3ec331.js"],"/prompt":[e,s,t,c,a,d,r,"static/chunks/pages/prompt-048fe74855c6514b.js"],"/settings":[e,"static/css/cbbe2355765ea112.css","static/chunks/pages/settings-4f97b4ec26c324fc.js"],sortedPages:["/","/_app","/_error","/context/long-term","/context/short-term","/knowledge","/knowledge/file-detail","/knowledge/files","/knowledge/manage","/knowledge/search","/models","/overview","/prompt","/settings"]}}("static/chunks/260-03f19eaee776f7fa.js","static/chunks/167-0be293a3c58a8577.js","static/chunks/796-db4afcb27cb903b9.js","static/chunks/740-b61ebb053ec9426a.js","static/chunks/576-642eb5cede35ba19.js","static/chunks/700-8a90f86277a335de.js","static/chunks/446-3bb2f94b52176cb1.js","static/chunks/584-ce8dbed7354f3644.js",0,"static/chunks/519-709ba3df6e549125.js","static/css/d28c22ed67198de0.css",1e-4,NaN,"static/chunks/257-c71f52e4adae1e38.js","static/chunks/840-717f0706d50fcb82.js","static/chunks/15-fed70feebb38d5ae.js"),self.__BUILD_MANIFEST_CB&&self.__BUILD_MANIFEST_CB();
1
+ self.__BUILD_MANIFEST=function(e,s,t,c,a,n,i,d,r,k,o,f,u,l,g,h){return{__rewrites:{afterFiles:[],beforeFiles:[],fallback:[]},__routerFilterStatic:{numItems:0,errorRate:1e-4,numBits:0,numHashes:u,bitArray:[]},__routerFilterDynamic:{numItems:r,errorRate:1e-4,numBits:r,numHashes:u,bitArray:[]},"/":["static/chunks/pages/index-505bd438c95ec0e8.js"],"/_error":["static/chunks/pages/_error-18decb9cd478883d.js"],"/context/long-term":[e,s,t,c,a,n,i,d,k,l,"static/chunks/pages/context/long-term-b431347893a69969.js"],"/context/short-term":[e,s,t,c,a,n,i,d,k,l,"static/chunks/pages/context/short-term-f0c420388a050e28.js"],"/knowledge":["static/chunks/pages/knowledge-b3ef77e79801287c.js"],"/knowledge/file-detail":[e,s,t,c,a,n,i,d,g,"static/chunks/517-c6a8c0e680dafa46.js",o,"static/chunks/pages/knowledge/file-detail-328ce1d9c6ce907e.js"],"/knowledge/files":[e,s,t,c,a,n,i,d,h,"static/chunks/252-a9d7774c3009dcda.js",o,"static/chunks/pages/knowledge/files-562933a68be26f4b.js"],"/knowledge/manage":[e,s,t,c,n,i,d,"static/chunks/38-e3671099d80db91b.js","static/chunks/pages/knowledge/manage-813a1635240f38df.js"],"/knowledge/search":[e,s,t,a,n,g,"static/chunks/992-8a06ec9aa4b1e3b3.js",o,"static/chunks/pages/knowledge/search-9da46d3cee5b7517.js"],"/models":[e,s,t,c,a,k,"static/css/d7ad5d9b207a29f0.css","static/chunks/pages/models-2146abd3aa3da947.js"],"/overview":[e,s,n,h,"static/chunks/860-55753e4c8eba4bb3.js","static/chunks/pages/overview-7ae2897685a7f503.js"],"/prompt":[e,s,t,c,a,i,k,"static/chunks/pages/prompt-1142500eccfa3fb6.js"],"/settings":[e,"static/css/cbbe2355765ea112.css","static/chunks/pages/settings-4f97b4ec26c324fc.js"],sortedPages:["/","/_app","/_error","/context/long-term","/context/short-term","/knowledge","/knowledge/file-detail","/knowledge/files","/knowledge/manage","/knowledge/search","/models","/overview","/prompt","/settings"]}}("static/chunks/260-03f19eaee776f7fa.js","static/chunks/167-0be293a3c58a8577.js","static/chunks/796-fa388065af432ff1.js","static/chunks/740-b61ebb053ec9426a.js","static/chunks/576-0038f3c58d5478e8.js","static/chunks/700-8a90f86277a335de.js","static/chunks/446-3bb2f94b52176cb1.js","static/chunks/584-ce8dbed7354f3644.js",0,"static/chunks/519-709ba3df6e549125.js","static/css/d28c22ed67198de0.css",1e-4,NaN,"static/chunks/257-c71f52e4adae1e38.js","static/chunks/840-717f0706d50fcb82.js","static/chunks/15-341041188dc9798c.js"),self.__BUILD_MANIFEST_CB&&self.__BUILD_MANIFEST_CB();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@customize-agent/server",
3
- "version": "3.0.0",
3
+ "version": "3.0.1",
4
4
  "description": "Customize Agent Web 管理控制台",
5
5
  "type": "module",
6
6
  "exports": {
@@ -8,6 +8,7 @@
8
8
  },
9
9
  "files": [
10
10
  ".next/BUILD_ID",
11
+ ".next/package.json",
11
12
  ".next/app-build-manifest.json",
12
13
  ".next/build-manifest.json",
13
14
  ".next/fallback-build-manifest.json",
@@ -42,9 +43,9 @@
42
43
  "react-dom": "^19.0.0",
43
44
  "tesseract.js": "^7.0.0",
44
45
  "xlsx": "^0.18.5",
45
- "@customize-agent/knowledge": "^3.0.0",
46
- "@customize-agent/llm": "^3.0.0",
47
- "@customize-agent/runtime": "^3.0.0"
46
+ "@customize-agent/knowledge": "^3.0.1",
47
+ "@customize-agent/llm": "^3.0.1",
48
+ "@customize-agent/runtime": "^3.0.1"
48
49
  },
49
50
  "devDependencies": {
50
51
  "@tailwindcss/postcss": "^4.3.2",