@customize-agent/server 4.0.13 → 4.0.14

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 (31) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/build-manifest.json +3 -3
  3. package/.next/prerender-manifest.json +3 -3
  4. package/.next/server/middleware-build-manifest.js +1 -1
  5. package/.next/server/pages/404.html +1 -1
  6. package/.next/server/pages/500.html +1 -1
  7. package/.next/server/pages/api/prompt.js +2 -2
  8. package/.next/server/pages/asset-library.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/document-roles.html +1 -1
  12. package/.next/server/pages/document-specs.html +1 -1
  13. package/.next/server/pages/documents.html +1 -1
  14. package/.next/server/pages/guide.html +1 -1
  15. package/.next/server/pages/index.html +1 -1
  16. package/.next/server/pages/knowledge/file-detail.html +1 -1
  17. package/.next/server/pages/knowledge/files.html +1 -1
  18. package/.next/server/pages/knowledge/manage.html +1 -1
  19. package/.next/server/pages/knowledge/search.html +1 -1
  20. package/.next/server/pages/knowledge.html +1 -1
  21. package/.next/server/pages/models.html +1 -1
  22. package/.next/server/pages/overview.html +1 -1
  23. package/.next/server/pages/prompt.html +1 -1
  24. package/.next/server/pages/settings.html +1 -1
  25. package/.next/server/pages/system/logs.html +1 -1
  26. package/.next/server/pages-manifest.json +27 -27
  27. package/.next/static/{PX_HvTfaeaO_XvVebsmTM → 8eU3KpI2OMNgfQb1_1boq}/_buildManifest.js +1 -1
  28. package/.next/static/chunks/pages/prompt-6471e4a055131b2a.js +1 -0
  29. package/package.json +2 -2
  30. package/.next/static/chunks/pages/prompt-4cf07545f8388d85.js +0 -1
  31. /package/.next/static/{PX_HvTfaeaO_XvVebsmTM → 8eU3KpI2OMNgfQb1_1boq}/_ssgManifest.js +0 -0
@@ -1,61 +1,61 @@
1
1
  {
2
2
  "/_error": "pages/_error.js",
3
- "/_app": "pages/_app.js",
4
3
  "/api/assets/generated": "pages/api/assets/generated.js",
4
+ "/_app": "pages/_app.js",
5
5
  "/api/assets/generated/preview": "pages/api/assets/generated/preview.js",
6
6
  "/api/config/embedding/healthCheck": "pages/api/config/embedding/healthCheck.js",
7
7
  "/api/config/models": "pages/api/config/models.js",
8
- "/api/context": "pages/api/context.js",
9
- "/api/documents/drafts": "pages/api/documents/drafts.js",
10
8
  "/api/documents/chapter/regenerate": "pages/api/documents/chapter/regenerate.js",
9
+ "/api/documents/drafts": "pages/api/documents/drafts.js",
10
+ "/api/context": "pages/api/context.js",
11
11
  "/api/documents/generate": "pages/api/documents/generate.js",
12
- "/api/documents/specs": "pages/api/documents/specs.js",
13
- "/api/documents/generated/[id]": "pages/api/documents/generated/[id].js",
14
12
  "/api/documents/roles": "pages/api/documents/roles.js",
15
13
  "/api/documents/generated": "pages/api/documents/generated.js",
16
14
  "/api/documents/templates": "pages/api/documents/templates.js",
15
+ "/api/documents/specs": "pages/api/documents/specs.js",
17
16
  "/api/health": "pages/api/health.js",
18
- "/api/jobs/[id]": "pages/api/jobs/[id].js",
19
17
  "/api/jobs": "pages/api/jobs.js",
20
- "/api/kb/duplicates": "pages/api/kb/duplicates.js",
21
- "/api/kb/categories": "pages/api/kb/categories.js",
18
+ "/api/documents/generated/[id]": "pages/api/documents/generated/[id].js",
22
19
  "/api/kb/features": "pages/api/kb/features.js",
20
+ "/api/kb/categories": "pages/api/kb/categories.js",
21
+ "/api/kb/duplicates": "pages/api/kb/duplicates.js",
22
+ "/api/jobs/[id]": "pages/api/jobs/[id].js",
23
+ "/api/kb/files/open": "pages/api/kb/files/open.js",
23
24
  "/api/kb/files": "pages/api/kb/files.js",
24
- "/api/kb/ignore": "pages/api/kb/ignore.js",
25
- "/api/kb/operations": "pages/api/kb/operations.js",
26
25
  "/api/kb/files/reindex": "pages/api/kb/files/reindex.js",
26
+ "/api/kb/operations": "pages/api/kb/operations.js",
27
+ "/api/kb/reindex": "pages/api/kb/reindex.js",
27
28
  "/api/kb/search": "pages/api/kb/search.js",
28
- "/api/kb/files/detail": "pages/api/kb/files/detail.js",
29
+ "/api/kb/tags": "pages/api/kb/tags.js",
29
30
  "/api/kb/stats": "pages/api/kb/stats.js",
30
- "/api/kb/reindex": "pages/api/kb/reindex.js",
31
- "/api/kb/files/open": "pages/api/kb/files/open.js",
32
31
  "/api/kb/upload/progress": "pages/api/kb/upload/progress.js",
33
- "/api/kb/tags": "pages/api/kb/tags.js",
34
- "/api/system/stats": "pages/api/system/stats.js",
35
- "/api/prompt": "pages/api/prompt.js",
32
+ "/api/system/logs": "pages/api/system/logs.js",
33
+ "/api/kb/files/detail": "pages/api/kb/files/detail.js",
36
34
  "/context/long-term": "pages/context/long-term.html",
37
- "/context/short-term": "pages/context/short-term.html",
35
+ "/api/prompt": "pages/api/prompt.js",
36
+ "/asset-library": "pages/asset-library.html",
37
+ "/api/system/stats": "pages/api/system/stats.js",
38
38
  "/document-roles": "pages/document-roles.html",
39
- "/documents": "pages/documents.html",
40
39
  "/document-specs": "pages/document-specs.html",
40
+ "/context/short-term": "pages/context/short-term.html",
41
+ "/documents": "pages/documents.html",
41
42
  "/": "pages/index.html",
42
- "/asset-library": "pages/asset-library.html",
43
+ "/api/kb/ignore": "pages/api/kb/ignore.js",
43
44
  "/guide": "pages/guide.html",
44
- "/api/system/logs": "pages/api/system/logs.js",
45
- "/knowledge": "pages/knowledge.html",
46
- "/knowledge/files": "pages/knowledge/files.html",
47
- "/knowledge/manage": "pages/knowledge/manage.html",
48
45
  "/knowledge/file-detail": "pages/knowledge/file-detail.html",
46
+ "/knowledge/manage": "pages/knowledge/manage.html",
49
47
  "/knowledge/search": "pages/knowledge/search.html",
48
+ "/knowledge": "pages/knowledge.html",
49
+ "/overview": "pages/overview.html",
50
50
  "/models": "pages/models.html",
51
- "/prompt": "pages/prompt.html",
51
+ "/knowledge/files": "pages/knowledge/files.html",
52
52
  "/api/config/providers/[provider]": "pages/api/config/providers/[provider].js",
53
- "/api/config/healthCheck": "pages/api/config/healthCheck.js",
54
- "/overview": "pages/overview.html",
53
+ "/settings": "pages/settings.html",
55
54
  "/api/config/embedding": "pages/api/config/embedding.js",
56
55
  "/system/logs": "pages/system/logs.html",
57
- "/settings": "pages/settings.html",
58
56
  "/api/config/providers": "pages/api/config/providers.js",
57
+ "/prompt": "pages/prompt.html",
58
+ "/api/config/healthCheck": "pages/api/config/healthCheck.js",
59
59
  "/api/kb/files/preview-pdf-page": "pages/api/kb/files/preview-pdf-page.js",
60
60
  "/api/documents/export": "pages/api/documents/export.js",
61
61
  "/api/kb/upload": "pages/api/kb/upload.js",
@@ -1 +1 @@
1
- self.__BUILD_MANIFEST=function(s,e,t,c,a,n,d,i,o,u,r,k,f,g,l,h,b){return{__rewrites:{afterFiles:[],beforeFiles:[],fallback:[]},__routerFilterStatic:{numItems:0,errorRate:1e-4,numBits:0,numHashes:g,bitArray:[]},__routerFilterDynamic:{numItems:o,errorRate:1e-4,numBits:o,numHashes:g,bitArray:[]},"/":["static/chunks/pages/index-c5e0758e6b31deee.js"],"/_error":["static/chunks/pages/_error-282257fbdcc167b4.js"],"/asset-library":[s,e,n,"static/chunks/749-dcb0cd85d1455f34.js","static/chunks/pages/asset-library-e9ddfe1cbaac42d9.js"],"/context/long-term":[s,e,t,c,a,n,d,i,l,"static/chunks/pages/context/long-term-2e6a30a8f879df47.js"],"/context/short-term":[s,e,t,c,a,n,d,i,l,"static/chunks/pages/context/short-term-730211234fa3add6.js"],"/document-roles":[s,e,t,c,d,"static/chunks/698-625f34d5d0052e87.js","static/chunks/pages/document-roles-7197641736843503.js"],"/document-specs":[s,e,t,c,d,r,"static/chunks/265-c3a46cef96364aac.js","static/chunks/pages/document-specs-033d848b03b54df3.js"],"/documents":[s,e,t,c,d,u,h,"static/chunks/447-772df02993a8609b.js","static/chunks/pages/documents-3b2f23e2d6b27f1b.js"],"/guide":[s,e,h,"static/chunks/20-23d24b40b69faf0f.js","static/chunks/pages/guide-cdf68a096918c979.js"],"/knowledge":["static/chunks/pages/knowledge-905248d8dcb15453.js"],"/knowledge/file-detail":[s,e,t,a,n,i,u,b,k,"static/chunks/pages/knowledge/file-detail-0a5e267f77f4e8b3.js"],"/knowledge/files":[s,e,t,a,n,i,k,"static/chunks/pages/knowledge/files-a1727a21113f99cd.js"],"/knowledge/manage":[s,e,u,"static/chunks/788-f74cda5d27cf4390.js","static/chunks/pages/knowledge/manage-25eb1a993b155450.js"],"/knowledge/search":[s,e,t,u,r,k,"static/chunks/pages/knowledge/search-2cee4e8b8792170c.js"],"/models":[s,e,t,c,a,d,r,"static/chunks/pages/models-b5f68c4c70257495.js"],"/overview":[s,e,"static/chunks/131-96749f5b6e1460d1.js","static/chunks/pages/overview-28c7ceeca56e6a78.js"],"/prompt":[s,e,t,c,a,"static/chunks/pages/prompt-4cf07545f8388d85.js"],"/settings":[s,e,"static/chunks/pages/settings-fa9d6a56898ba678.js"],"/system/logs":[s,t,c,a,n,i,b,"static/chunks/pages/system/logs-f4e222140dc7b30c.js"],sortedPages:["/","/_app","/_error","/asset-library","/context/long-term","/context/short-term","/document-roles","/document-specs","/documents","/guide","/knowledge","/knowledge/file-detail","/knowledge/files","/knowledge/manage","/knowledge/search","/models","/overview","/prompt","/settings","/system/logs"]}}("static/chunks/433-ef3d7675b81826a9.js","static/chunks/787-196a2bed7b11745a.js","static/chunks/576-679ab6348b33b960.js","static/chunks/195-9f2e4c67a9deff05.js","static/chunks/985-da0b1f68e59d1e76.js","static/chunks/150-a7b953a600cbd7e0.js","static/chunks/455-9e1e1c7e96845347.js","static/chunks/289-36c210992d5009d5.js",0,"static/chunks/506-b97aadd3e451b379.js","static/chunks/938-0063785681203bb5.js","static/css/09be1fdeab8595ab.css",1e-4,NaN,"static/chunks/932-823e1ae10dd43b8b.js","static/chunks/412-b9c854c6a76db67d.js","static/chunks/512-e2813c7e9454d53c.js"),self.__BUILD_MANIFEST_CB&&self.__BUILD_MANIFEST_CB();
1
+ self.__BUILD_MANIFEST=function(s,e,t,c,a,n,d,i,o,u,r,k,f,g,l,h,b){return{__rewrites:{afterFiles:[],beforeFiles:[],fallback:[]},__routerFilterStatic:{numItems:0,errorRate:1e-4,numBits:0,numHashes:g,bitArray:[]},__routerFilterDynamic:{numItems:o,errorRate:1e-4,numBits:o,numHashes:g,bitArray:[]},"/":["static/chunks/pages/index-c5e0758e6b31deee.js"],"/_error":["static/chunks/pages/_error-282257fbdcc167b4.js"],"/asset-library":[s,e,n,"static/chunks/749-dcb0cd85d1455f34.js","static/chunks/pages/asset-library-e9ddfe1cbaac42d9.js"],"/context/long-term":[s,e,t,c,a,n,d,i,l,"static/chunks/pages/context/long-term-2e6a30a8f879df47.js"],"/context/short-term":[s,e,t,c,a,n,d,i,l,"static/chunks/pages/context/short-term-730211234fa3add6.js"],"/document-roles":[s,e,t,c,d,"static/chunks/698-625f34d5d0052e87.js","static/chunks/pages/document-roles-7197641736843503.js"],"/document-specs":[s,e,t,c,d,r,"static/chunks/265-c3a46cef96364aac.js","static/chunks/pages/document-specs-033d848b03b54df3.js"],"/documents":[s,e,t,c,d,u,h,"static/chunks/447-772df02993a8609b.js","static/chunks/pages/documents-3b2f23e2d6b27f1b.js"],"/guide":[s,e,h,"static/chunks/20-23d24b40b69faf0f.js","static/chunks/pages/guide-cdf68a096918c979.js"],"/knowledge":["static/chunks/pages/knowledge-905248d8dcb15453.js"],"/knowledge/file-detail":[s,e,t,a,n,i,u,b,k,"static/chunks/pages/knowledge/file-detail-0a5e267f77f4e8b3.js"],"/knowledge/files":[s,e,t,a,n,i,k,"static/chunks/pages/knowledge/files-a1727a21113f99cd.js"],"/knowledge/manage":[s,e,u,"static/chunks/788-f74cda5d27cf4390.js","static/chunks/pages/knowledge/manage-25eb1a993b155450.js"],"/knowledge/search":[s,e,t,u,r,k,"static/chunks/pages/knowledge/search-2cee4e8b8792170c.js"],"/models":[s,e,t,c,a,d,r,"static/chunks/pages/models-b5f68c4c70257495.js"],"/overview":[s,e,"static/chunks/131-96749f5b6e1460d1.js","static/chunks/pages/overview-28c7ceeca56e6a78.js"],"/prompt":[s,e,t,c,a,"static/chunks/pages/prompt-6471e4a055131b2a.js"],"/settings":[s,e,"static/chunks/pages/settings-fa9d6a56898ba678.js"],"/system/logs":[s,t,c,a,n,i,b,"static/chunks/pages/system/logs-f4e222140dc7b30c.js"],sortedPages:["/","/_app","/_error","/asset-library","/context/long-term","/context/short-term","/document-roles","/document-specs","/documents","/guide","/knowledge","/knowledge/file-detail","/knowledge/files","/knowledge/manage","/knowledge/search","/models","/overview","/prompt","/settings","/system/logs"]}}("static/chunks/433-ef3d7675b81826a9.js","static/chunks/787-196a2bed7b11745a.js","static/chunks/576-679ab6348b33b960.js","static/chunks/195-9f2e4c67a9deff05.js","static/chunks/985-da0b1f68e59d1e76.js","static/chunks/150-a7b953a600cbd7e0.js","static/chunks/455-9e1e1c7e96845347.js","static/chunks/289-36c210992d5009d5.js",0,"static/chunks/506-b97aadd3e451b379.js","static/chunks/938-0063785681203bb5.js","static/css/09be1fdeab8595ab.css",1e-4,NaN,"static/chunks/932-823e1ae10dd43b8b.js","static/chunks/412-b9c854c6a76db67d.js","static/chunks/512-e2813c7e9454d53c.js"),self.__BUILD_MANIFEST_CB&&self.__BUILD_MANIFEST_CB();
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[26],{12887:(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"}},23830:(e,t)=>{"use strict";t.A={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M880 298.4H521L403.7 186.2a8.15 8.15 0 00-5.5-2.2H144c-17.7 0-32 14.3-32 32v592c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V330.4c0-17.7-14.3-32-32-32zM840 768H184V256h188.5l119.6 114.4H840V768z"}}]},name:"folder",theme:"outlined"}},26631:(e,t,r)=>{"use strict";r.d(t,{A:()=>l});var n=r(97109),o=r(12887),i=r(88483);function a(){return(a=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}let l=n.forwardRef((e,t)=>n.createElement(i.A,a({},e,{ref:t,icon:o.A})))},27549:(e,t,r)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/prompt",function(){return r(49940)}])},29606:(e,t,r)=>{"use strict";r.d(t,{A:()=>l});var n=r(97109),o=r(23830),i=r(88483);function a(){return(a=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}let l=n.forwardRef((e,t)=>n.createElement(i.A,a({},e,{ref:t,icon:o.A})))},49940:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>M});var n=r(65321),o=r(97109),i=r(79059),a=r(17807),l=r(88762),c=r(68787),s=r(33442),d=r(11702),p=r(57271),h=r(85114),u=r(84253),f=r(56985),m=r(26171),y=r(34052),g=r(7576),x=r(29606),j=r(53707),v=r(88483);function w(){return(w=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}let A=o.forwardRef((e,t)=>o.createElement(v.A,w({},e,{ref:t,icon:j.A})));var b=r(81668),S=r(54746),O=r(26631),z=r(99650),C=r(58209);async function k(){let e=await fetch("/api/prompt");if(!e.ok)throw Error("Failed");return e.json()}async function T(e,t,r){let n=await fetch("/api/prompt",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({filePath:e,content:t,name:r})});if(!n.ok)throw Error("Failed");return n.json()}async function N(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 H(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 E(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 R(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()}function F(e){return e.id.startsWith("builtin:")}function P(e){return e.id.startsWith("custom:")}function M(){let e=(0,i.Vr)(),{message:t}=a.A.useApp(),[r,j]=(0,o.useState)(!0),[v,w]=(0,o.useState)([]),[M,B]=(0,o.useState)(!1),[_,V]=(0,o.useState)(null),[I,J]=(0,o.useState)(""),[L,U]=(0,o.useState)(""),[W,D]=(0,o.useState)(!1),[X,Z]=(0,o.useState)(!1),[$,q]=(0,o.useState)("custom"),[G,K]=(0,o.useState)(!1),Q=(0,o.useRef)(null),Y=async()=>{j(!0);try{w(await k())}catch(r){t.error(e("common.error"))}finally{j(!1)}};(0,o.useEffect)(()=>{Y()},[]);let ee=r=>{if(null==r?void 0:r.projectRoot)return void N(r.projectRoot).then(()=>{t.success(e("common.success")),Y()}).catch(()=>t.error(e("common.error")));V(null),Z(!0),U(""),J(""),B(!0)},et=async()=>{if(!L.trim())return void t.error("请输入名称");D(!0);try{_?await T(_.customizePath,I,P(_)?L.trim():void 0):await H(L.trim(),I||"# ".concat(L.trim(),"\n")),t.success(e("common.success")),B(!1),await Y()}catch(r){t.error(e("common.error"))}finally{D(!1)}},er=async(r,n)=>{let o=n?Array.from(new Set([...v.filter(e=>e.selected).map(e=>e.id),r.id])):v.filter(e=>e.selected&&e.id!==r.id).map(e=>e.id);try{await E(o),w(e=>e.map(e=>({...e,selected:o.includes(e.id)})))}catch(r){t.error(e("common.error"))}},en=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")),await Y()}catch(r){t.error(e("common.error"))}},eo=async e=>{if(e){K(!0);try{let r=await e.text(),n=JSON.parse(r),o=await R(n);t.success("已导入 ".concat(o.imported," 条提示词")),await Y()}catch(e){t.error("导入失败,请确认 JSON 文件格式正确")}finally{K(!1),Q.current&&(Q.current.value="")}}},ei=v.find(e=>e.isCurrent),ea=v.filter(F),el=v.filter(P),ec=v.filter(e=>!F(e)&&!P(e)),es="all"===$?v:"builtin"===$?ea:"custom"===$?el:ec;return r?(0,n.jsxs)("div",{className:"space-y-5 animateFadeIn",children:[(0,n.jsx)(l.A,{active:!0,title:!0,paragraph:{rows:1}}),(0,n.jsx)("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(300px, 1fr))",gap:12},children:Array.from({length:4}).map((e,t)=>(0,n.jsx)(c.A,{size:"small",children:(0,n.jsx)(l.A,{active:!0,paragraph:{rows:4}})},t))})]}):(0,n.jsxs)("div",{className:"space-y-5 animateFadeIn",children:[(0,n.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",flexWrap:"wrap",gap:12},children:[(0,n.jsxs)("div",{children:[(0,n.jsx)("h1",{className:"pageTitle",children:e("nav.promptManagement")}),(0,n.jsx)("p",{className:"pageDesc",children:e("prompt.description")})]}),(0,n.jsxs)(s.A,{children:[ei&&(0,n.jsxs)(d.A,{color:"green",style:{lineHeight:"22px"},children:[(0,n.jsx)(x.A,{})," ",ei.projectRoot]}),(0,n.jsx)(p.A,{value:$,onChange:q,style:{width:160},options:[{label:"全部 (".concat(v.length,")"),value:"all"},{label:"我的提示词 (".concat(el.length,")"),value:"custom"},{label:"项目提示词 (".concat(ec.length,")"),value:"project"},{label:"内置示例 (".concat(ea.length,")"),value:"builtin"}]}),(0,n.jsx)("input",{ref:Q,type:"file",accept:"application/json,.json",style:{display:"none"},onChange:e=>{var t;eo(null==(t=e.target.files)?void 0:t[0])}}),(0,n.jsx)(h.Ay,{icon:(0,n.jsx)(A,{}),loading:G,onClick:()=>{var e;return null==(e=Q.current)?void 0:e.click()},children:"导入"}),(0,n.jsx)(h.Ay,{icon:(0,n.jsx)(b.A,{}),disabled:0===el.length,onClick:()=>{let e=el.map(e=>({name:e.projectName,content:e.content,selected:e.selected}));!function(e,t){let r=new Blob([JSON.stringify(t,null,2)],{type:"application/json;charset=utf-8"}),n=URL.createObjectURL(r),o=document.createElement("a");o.href=n,o.download=e,o.click(),URL.revokeObjectURL(n)}("customize-prompts-".concat(new Date().toISOString().slice(0,10),".json"),{version:1,exportedAt:new Date().toISOString(),prompts:e}),t.success("已导出 ".concat(e.length," 条我的提示词"))},children:"导出"}),(0,n.jsx)(h.Ay,{type:"primary",icon:(0,n.jsx)(S.A,{}),onClick:()=>ee(),children:"创建提示词"})]})]}),0===es.length?(0,n.jsx)(u.A,{description:e("prompt.noProjects")}):(0,n.jsx)("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(300px, 1fr))",gap:12},children:es.map(e=>{let r=e.hasFile&&e.content?e.content.replace(/^#.*$/gm,"").replace(/\n{3,}/g,"\n\n").trim():"";return(0,n.jsxs)(c.A,{size:"small",hoverable:!0,styles:{body:{display:"flex",flexDirection:"column",height:"100%"}},children:[(0,n.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:6,marginBottom:8},children:[(0,n.jsx)(O.A,{style:{color:e.isCurrent?"var(--colorOk)":"var(--colorAccent)",fontSize:14,flexShrink:0}}),(0,n.jsx)("span",{style:{fontWeight:600,fontSize:13,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",flex:1},children:e.projectName}),!e.hasFile&&e.projectRoot&&(0,n.jsx)(h.Ay,{size:"small",icon:(0,n.jsx)(S.A,{}),onClick:()=>ee(e)})]}),e.projectRoot&&(0,n.jsxs)("div",{style:{fontSize:11,color:"var(--colorTextSecondary)",marginBottom:6,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:[(0,n.jsx)(x.A,{style:{marginRight:4}}),e.projectRoot]}),(0,n.jsxs)("div",{style:{display:"flex",flexWrap:"wrap",gap:4,marginBottom:8},children:[e.isCurrent&&(0,n.jsx)(d.A,{color:"green",style:{margin:0,fontSize:10,lineHeight:"16px"},children:"当前项目"}),F(e)&&(0,n.jsx)(d.A,{color:"gold",style:{margin:0,fontSize:10,lineHeight:"16px"},children:"内置示例"}),P(e)&&(0,n.jsx)(d.A,{color:"cyan",style:{margin:0,fontSize:10,lineHeight:"16px"},children:"我的提示词"}),!F(e)&&!P(e)&&(0,n.jsx)(d.A,{color:"blue",style:{margin:0,fontSize:10,lineHeight:"16px"},children:"项目提示词"}),e.selected&&(0,n.jsx)(d.A,{color:"purple",style:{margin:0,fontSize:10,lineHeight:"16px"},children:"已选中"}),e.hasFile?(0,n.jsx)(d.A,{color:"blue",style:{margin:0,fontSize:10,lineHeight:"16px"},children:"有文件"}):(0,n.jsx)(d.A,{color:"default",style:{margin:0,fontSize:10,lineHeight:"16px"},children:"无文件"})]}),r&&(0,n.jsxs)("div",{style:{padding:8,background:"var(--colorFillAlter)",borderRadius:6,fontSize:11,maxHeight:80,overflow:"hidden",color:"var(--colorTextSecondary)",whiteSpace:"pre-wrap",fontFamily:"monospace",marginBottom:8,lineHeight:1.5},children:[r.slice(0,180),r.length>180?"...":""]}),(0,n.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:4,paddingTop:8,borderTop:"1px solid var(--colorBorderSecondary)",marginTop:"auto"},children:[e.hasFile?(0,n.jsx)(f.A,{checked:e.selected,onChange:t=>{er(e,t.target.checked)},style:{fontSize:12},children:"选中"}):(0,n.jsx)("span",{}),(0,n.jsx)("div",{style:{flex:1}}),e.hasFile&&(0,n.jsx)(h.Ay,{size:"small",icon:(0,n.jsx)(z.A,{}),onClick:()=>(e=>{if(F(e)){V(null),Z(!0),U(e.projectName.replace(/^内置|/,"")+" Copy"),J(e.content||""),B(!0),t.info("内置提示词不可直接编辑,已为你创建副本");return}V(e),Z(!1),U(e.projectName),J(e.content||""),B(!0)})(e),children:F(e)?"复制":"编辑"}),(0,n.jsx)(m.A,{title:F(e)?"删除内置提示词?":P(e)?"删除自定义提示词?":"删除项目记录及文件?",disabled:F(e),onConfirm:()=>{en(e)},children:(0,n.jsx)(h.Ay,{size:"small",danger:!0,icon:(0,n.jsx)(C.A,{}),disabled:F(e)})})]})]},e.id)})}),(0,n.jsxs)(y.A,{title:X?"创建提示词":_&&P(_)?"编辑我的提示词 — ".concat(L||_.projectName):"编辑项目提示词 — ".concat((null==_?void 0:_.projectName)||""),open:M,onClose:()=>B(!1),width:800,maskClosable:!1,style:{borderRadius:"12px 0 0 12px"},styles:{body:{padding:"16px 24px"},header:{borderRadius:"12px 0 0 0",borderBottom:"1px solid var(--colorBorderSecondary)"}},extra:(0,n.jsxs)(s.A,{children:[(0,n.jsx)(h.Ay,{onClick:()=>B(!1),children:e("common.cancel")}),(0,n.jsx)(h.Ay,{type:"primary",loading:W,onClick:()=>{et()},children:e("common.save")})]}),children:[(0,n.jsx)("div",{style:{marginBottom:12},children:X||_&&P(_)?(0,n.jsxs)(s.A,{direction:"vertical",size:6,style:{width:"100%"},children:[(0,n.jsx)(g.A,{placeholder:"提示词名称",value:L,onChange:e=>U(e.target.value),style:{maxWidth:400}}),!X&&(0,n.jsx)("div",{style:{fontSize:12,color:"var(--colorTextSecondary)"},children:null==_?void 0:_.customizePath})]}):(0,n.jsx)("div",{style:{fontSize:12,color:"var(--colorTextSecondary)"},children:null==_?void 0:_.customizePath})}),(0,n.jsx)(g.A.TextArea,{value:I,onChange:e=>J(e.target.value),rows:25,style:{fontFamily:"SF Mono, Monaco, Consolas, monospace",fontSize:13}})]})]})}},53707:(e,t)=>{"use strict";t.A={icon:{tag:"svg",attrs:{"fill-rule":"evenodd",viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M880 912H144c-17.7 0-32-14.3-32-32V144c0-17.7 14.3-32 32-32h360c4.4 0 8 3.6 8 8v56c0 4.4-3.6 8-8 8H184v656h656V520c0-4.4 3.6-8 8-8h56c4.4 0 8 3.6 8 8v360c0 17.7-14.3 32-32 32zM653.3 424.6l52.2 52.2a8.01 8.01 0 01-4.7 13.6l-179.4 21c-5.1.6-9.5-3.7-8.9-8.9l21-179.4c.8-6.6 8.9-9.4 13.6-4.7l52.4 52.4 256.2-256.2c3.1-3.1 8.2-3.1 11.3 0l42.4 42.4c3.1 3.1 3.1 8.2 0 11.3L653.3 424.6z"}}]},name:"import",theme:"outlined"}},81668:(e,t,r)=>{"use strict";r.d(t,{A:()=>l});var n=r(97109),o=r(96724),i=r(88483);function a(){return(a=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}let l=n.forwardRef((e,t)=>n.createElement(i.A,a({},e,{ref:t,icon:o.A})))},96724:(e,t)=>{"use strict";t.A={icon:{tag:"svg",attrs:{"fill-rule":"evenodd",viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M880 912H144c-17.7 0-32-14.3-32-32V144c0-17.7 14.3-32 32-32h360c4.4 0 8 3.6 8 8v56c0 4.4-3.6 8-8 8H184v656h656V520c0-4.4 3.6-8 8-8h56c4.4 0 8 3.6 8 8v360c0 17.7-14.3 32-32 32zM770.87 199.13l-52.2-52.2a8.01 8.01 0 014.7-13.6l179.4-21c5.1-.6 9.5 3.7 8.9 8.9l-21 179.4c-.8 6.6-8.9 9.4-13.6 4.7l-52.4-52.4-256.2 256.2a8.03 8.03 0 01-11.3 0l-42.4-42.4a8.03 8.03 0 010-11.3l256.1-256.3z"}}]},name:"export",theme:"outlined"}}},e=>{e.O(0,[433,787,576,195,985,636,593,792],()=>e(e.s=27549)),_N_E=e.O()}]);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@customize-agent/server",
3
- "version": "4.0.13",
3
+ "version": "4.0.14",
4
4
  "description": "Customize Agent Web 管理控制台",
5
5
  "exports": {
6
6
  "./package.json": "./package.json"
@@ -48,8 +48,8 @@
48
48
  "react-dom": "19.2.7",
49
49
  "tesseract.js": "^7.0.0",
50
50
  "xlsx": "^0.18.5",
51
- "@customize-agent/llm": "^3.0.4",
52
51
  "@customize-agent/knowledge": "^4.0.7",
52
+ "@customize-agent/llm": "^3.0.4",
53
53
  "@customize-agent/runtime": "^3.0.6"
54
54
  },
55
55
  "devDependencies": {
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[26],{12887:(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"}},23830:(e,t)=>{"use strict";t.A={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M880 298.4H521L403.7 186.2a8.15 8.15 0 00-5.5-2.2H144c-17.7 0-32 14.3-32 32v592c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V330.4c0-17.7-14.3-32-32-32zM840 768H184V256h188.5l119.6 114.4H840V768z"}}]},name:"folder",theme:"outlined"}},26631:(e,t,r)=>{"use strict";r.d(t,{A:()=>l});var o=r(97109),i=r(12887),n=r(88483);function a(){return(a=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e}).apply(this,arguments)}let l=o.forwardRef((e,t)=>o.createElement(n.A,a({},e,{ref:t,icon:i.A})))},27549:(e,t,r)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/prompt",function(){return r(34508)}])},29606:(e,t,r)=>{"use strict";r.d(t,{A:()=>l});var o=r(97109),i=r(23830),n=r(88483);function a(){return(a=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e}).apply(this,arguments)}let l=o.forwardRef((e,t)=>o.createElement(n.A,a({},e,{ref:t,icon:i.A})))},34508:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>H});var o=r(65321),i=r(97109),n=r(79059),a=r(17807),l=r(88762),s=r(68787),c=r(33442),d=r(11702),p=r(57271),h=r(85114),m=r(84253),u=r(56985),f=r(26171),y=r(34052),x=r(7576),g=r(29606),j=r(54746),v=r(26631),w=r(99650),A=r(58209);async function S(){let e=await fetch("/api/prompt");if(!e.ok)throw Error("Failed");return e.json()}async function b(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 z(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 C(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 T(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()}function O(e){return e.id.startsWith("builtin:")}function k(e){return e.id.startsWith("custom:")}function H(){let e=(0,n.Vr)(),{message:t}=a.A.useApp(),[r,H]=(0,i.useState)(!0),[N,E]=(0,i.useState)([]),[F,P]=(0,i.useState)(!1),[R,_]=(0,i.useState)(null),[B,M]=(0,i.useState)(""),[I,V]=(0,i.useState)(""),[W,J]=(0,i.useState)(!1),[L,D]=(0,i.useState)(!1),[U,X]=(0,i.useState)("custom"),Z=async()=>{H(!0);try{E(await S())}catch(r){t.error(e("common.error"))}finally{H(!1)}};(0,i.useEffect)(()=>{Z()},[]);let $=r=>{if(null==r?void 0:r.projectRoot)return void z(r.projectRoot).then(()=>{t.success(e("common.success")),Z()}).catch(()=>t.error(e("common.error")));_(null),D(!0),V(""),M(""),P(!0)},q=async()=>{if(!I.trim())return void t.error("请输入名称");J(!0);try{R?await b(R.customizePath,B,k(R)?I.trim():void 0):await C(I.trim(),B||"# ".concat(I.trim(),"\n")),t.success(e("common.success")),P(!1),await Z()}catch(r){t.error(e("common.error"))}finally{J(!1)}},G=async(r,o)=>{let i=o?Array.from(new Set([...N.filter(e=>e.selected).map(e=>e.id),r.id])):N.filter(e=>e.selected&&e.id!==r.id).map(e=>e.id);try{await T(i),E(e=>e.map(e=>({...e,selected:i.includes(e.id)})))}catch(r){t.error(e("common.error"))}},K=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")),await Z()}catch(r){t.error(e("common.error"))}},Q=N.find(e=>e.isCurrent),Y=N.filter(O),ee=N.filter(k),et=N.filter(e=>!O(e)&&!k(e)),er="all"===U?N:"builtin"===U?Y:"custom"===U?ee:et;return r?(0,o.jsxs)("div",{className:"space-y-5 animateFadeIn",children:[(0,o.jsx)(l.A,{active:!0,title:!0,paragraph:{rows:1}}),(0,o.jsx)("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(300px, 1fr))",gap:12},children:Array.from({length:4}).map((e,t)=>(0,o.jsx)(s.A,{size:"small",children:(0,o.jsx)(l.A,{active:!0,paragraph:{rows:4}})},t))})]}):(0,o.jsxs)("div",{className:"space-y-5 animateFadeIn",children:[(0,o.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",flexWrap:"wrap",gap:12},children:[(0,o.jsxs)("div",{children:[(0,o.jsx)("h1",{className:"pageTitle",children:e("nav.promptManagement")}),(0,o.jsx)("p",{className:"pageDesc",children:e("prompt.description")})]}),(0,o.jsxs)(c.A,{children:[Q&&(0,o.jsxs)(d.A,{color:"green",style:{lineHeight:"22px"},children:[(0,o.jsx)(g.A,{})," ",Q.projectRoot]}),(0,o.jsx)(p.A,{value:U,onChange:X,style:{width:160},options:[{label:"全部 (".concat(N.length,")"),value:"all"},{label:"我的提示词 (".concat(ee.length,")"),value:"custom"},{label:"项目提示词 (".concat(et.length,")"),value:"project"},{label:"内置示例 (".concat(Y.length,")"),value:"builtin"}]}),(0,o.jsx)(h.Ay,{type:"primary",icon:(0,o.jsx)(j.A,{}),onClick:()=>$(),children:"创建提示词"})]})]}),0===er.length?(0,o.jsx)(m.A,{description:e("prompt.noProjects")}):(0,o.jsx)("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(300px, 1fr))",gap:12},children:er.map(e=>{let r=e.hasFile&&e.content?e.content.replace(/^#.*$/gm,"").replace(/\n{3,}/g,"\n\n").trim():"";return(0,o.jsxs)(s.A,{size:"small",hoverable:!0,styles:{body:{display:"flex",flexDirection:"column",height:"100%"}},children:[(0,o.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:6,marginBottom:8},children:[(0,o.jsx)(v.A,{style:{color:e.isCurrent?"var(--colorOk)":"var(--colorAccent)",fontSize:14,flexShrink:0}}),(0,o.jsx)("span",{style:{fontWeight:600,fontSize:13,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",flex:1},children:e.projectName}),!e.hasFile&&e.projectRoot&&(0,o.jsx)(h.Ay,{size:"small",icon:(0,o.jsx)(j.A,{}),onClick:()=>$(e)})]}),e.projectRoot&&(0,o.jsxs)("div",{style:{fontSize:11,color:"var(--colorTextSecondary)",marginBottom:6,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:[(0,o.jsx)(g.A,{style:{marginRight:4}}),e.projectRoot]}),(0,o.jsxs)("div",{style:{display:"flex",flexWrap:"wrap",gap:4,marginBottom:8},children:[e.isCurrent&&(0,o.jsx)(d.A,{color:"green",style:{margin:0,fontSize:10,lineHeight:"16px"},children:"当前项目"}),O(e)&&(0,o.jsx)(d.A,{color:"gold",style:{margin:0,fontSize:10,lineHeight:"16px"},children:"内置示例"}),k(e)&&(0,o.jsx)(d.A,{color:"cyan",style:{margin:0,fontSize:10,lineHeight:"16px"},children:"我的提示词"}),!O(e)&&!k(e)&&(0,o.jsx)(d.A,{color:"blue",style:{margin:0,fontSize:10,lineHeight:"16px"},children:"项目提示词"}),e.selected&&(0,o.jsx)(d.A,{color:"purple",style:{margin:0,fontSize:10,lineHeight:"16px"},children:"已选中"}),e.hasFile?(0,o.jsx)(d.A,{color:"blue",style:{margin:0,fontSize:10,lineHeight:"16px"},children:"有文件"}):(0,o.jsx)(d.A,{color:"default",style:{margin:0,fontSize:10,lineHeight:"16px"},children:"无文件"})]}),r&&(0,o.jsxs)("div",{style:{padding:8,background:"var(--colorFillAlter)",borderRadius:6,fontSize:11,maxHeight:80,overflow:"hidden",color:"var(--colorTextSecondary)",whiteSpace:"pre-wrap",fontFamily:"monospace",marginBottom:8,lineHeight:1.5},children:[r.slice(0,180),r.length>180?"...":""]}),(0,o.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:4,paddingTop:8,borderTop:"1px solid var(--colorBorderSecondary)",marginTop:"auto"},children:[e.hasFile?(0,o.jsx)(u.A,{checked:e.selected,onChange:t=>{G(e,t.target.checked)},style:{fontSize:12},children:"选中"}):(0,o.jsx)("span",{}),(0,o.jsx)("div",{style:{flex:1}}),e.hasFile&&(0,o.jsx)(h.Ay,{size:"small",icon:(0,o.jsx)(w.A,{}),onClick:()=>(e=>{if(O(e)){_(null),D(!0),V(e.projectName.replace(/^内置|/,"")+" Copy"),M(e.content||""),P(!0),t.info("内置提示词不可直接编辑,已为你创建副本");return}_(e),D(!1),V(e.projectName),M(e.content||""),P(!0)})(e),children:O(e)?"复制":"编辑"}),(0,o.jsx)(f.A,{title:O(e)?"删除内置提示词?":k(e)?"删除自定义提示词?":"删除项目记录及文件?",disabled:O(e),onConfirm:()=>{K(e)},children:(0,o.jsx)(h.Ay,{size:"small",danger:!0,icon:(0,o.jsx)(A.A,{}),disabled:O(e)})})]})]},e.id)})}),(0,o.jsxs)(y.A,{title:L?"创建提示词":R&&k(R)?"编辑我的提示词 — ".concat(I||R.projectName):"编辑项目提示词 — ".concat((null==R?void 0:R.projectName)||""),open:F,onClose:()=>P(!1),width:800,maskClosable:!1,style:{borderRadius:"12px 0 0 12px"},styles:{body:{padding:"16px 24px"},header:{borderRadius:"12px 0 0 0",borderBottom:"1px solid var(--colorBorderSecondary)"}},extra:(0,o.jsxs)(c.A,{children:[(0,o.jsx)(h.Ay,{onClick:()=>P(!1),children:e("common.cancel")}),(0,o.jsx)(h.Ay,{type:"primary",loading:W,onClick:()=>{q()},children:e("common.save")})]}),children:[(0,o.jsx)("div",{style:{marginBottom:12},children:L||R&&k(R)?(0,o.jsxs)(c.A,{direction:"vertical",size:6,style:{width:"100%"},children:[(0,o.jsx)(x.A,{placeholder:"提示词名称",value:I,onChange:e=>V(e.target.value),style:{maxWidth:400}}),!L&&(0,o.jsx)("div",{style:{fontSize:12,color:"var(--colorTextSecondary)"},children:null==R?void 0:R.customizePath})]}):(0,o.jsx)("div",{style:{fontSize:12,color:"var(--colorTextSecondary)"},children:null==R?void 0:R.customizePath})}),(0,o.jsx)(x.A.TextArea,{value:B,onChange:e=>M(e.target.value),rows:25,style:{fontFamily:"SF Mono, Monaco, Consolas, monospace",fontSize:13}})]})]})}}},e=>{e.O(0,[433,787,576,195,985,636,593,792],()=>e(e.s=27549)),_N_E=e.O()}]);