@jiangxiaosheng/digital-agent-platform 1.0.4 → 1.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.next/BUILD_ID +1 -1
- package/.next/app-build-manifest.json +63 -59
- package/.next/app-path-routes-manifest.json +1 -1
- package/.next/build-manifest.json +2 -2
- package/.next/cache/.tsbuildinfo +1 -1
- package/.next/cache/eslint/.cache_1bmmeh3 +1 -1
- package/.next/cache/webpack/client-production/0.pack +0 -0
- package/.next/cache/webpack/client-production/1.pack +0 -0
- package/.next/cache/webpack/client-production/5.pack +0 -0
- package/.next/cache/webpack/client-production/7.pack +0 -0
- package/.next/cache/webpack/client-production/8.pack +0 -0
- package/.next/cache/webpack/client-production/9.pack +0 -0
- package/.next/cache/webpack/client-production/index.pack +0 -0
- package/.next/cache/webpack/client-production/index.pack.old +0 -0
- package/.next/cache/webpack/edge-server-production/1.pack +0 -0
- package/.next/cache/webpack/edge-server-production/index.pack +0 -0
- package/.next/cache/webpack/edge-server-production/index.pack.old +0 -0
- package/.next/cache/webpack/server-production/0.pack +0 -0
- package/.next/cache/webpack/server-production/1.pack +0 -0
- package/.next/cache/webpack/server-production/3.pack +0 -0
- package/.next/cache/webpack/server-production/4.pack +0 -0
- package/.next/cache/webpack/server-production/5.pack +0 -0
- package/.next/cache/webpack/server-production/6.pack +0 -0
- package/.next/cache/webpack/server-production/7.pack +0 -0
- package/.next/cache/webpack/server-production/8.pack +0 -0
- package/.next/cache/webpack/server-production/index.pack +0 -0
- package/.next/cache/webpack/server-production/index.pack.old +0 -0
- package/.next/next-minimal-server.js.nft.json +1 -1
- package/.next/next-server.js.nft.json +1 -1
- package/.next/prerender-manifest.json +1 -1
- package/.next/server/app/[locale]/agents/[id]/chat/page_client-reference-manifest.js +1 -1
- package/.next/server/app/[locale]/agents/[id]/edit/page.js +1 -1
- package/.next/server/app/[locale]/agents/[id]/edit/page.js.nft.json +1 -1
- package/.next/server/app/[locale]/agents/[id]/edit/page_client-reference-manifest.js +1 -1
- package/.next/server/app/[locale]/agents/new/page.js +1 -1
- package/.next/server/app/[locale]/agents/new/page.js.nft.json +1 -1
- package/.next/server/app/[locale]/agents/new/page_client-reference-manifest.js +1 -1
- package/.next/server/app/[locale]/agents/page_client-reference-manifest.js +1 -1
- package/.next/server/app/[locale]/knowledge/page_client-reference-manifest.js +1 -1
- package/.next/server/app/[locale]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/[locale]/settings/page.js +1 -1
- package/.next/server/app/[locale]/settings/page.js.nft.json +1 -1
- package/.next/server/app/[locale]/settings/page_client-reference-manifest.js +1 -1
- package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/server/app/_not-found.html +1 -1
- package/.next/server/app/_not-found.rsc +1 -1
- package/.next/server/app/api/agents/[id]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/agents/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/auth-config/test/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/bash-output/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/chat/[agentId]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/env-vars/[key]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/env-vars/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/env-vars/scan/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/file-serve/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/fs/browse/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/knowledge/[id]/documents/[docId]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/knowledge/[id]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/knowledge/[id]/upload/route.js +1 -1
- package/.next/server/app/api/knowledge/[id]/upload/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/knowledge/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/knowledge/search/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/models/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/models-config/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/models-config/test/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/sessions/[agentId]/[sessionId]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/sessions/[agentId]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/sessions/history/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/settings/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/skills/[name]/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/skills/install/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/skills/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/skills/search/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/tts/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/voice-provider/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/workspace-files/route_client-reference-manifest.js +1 -1
- package/.next/server/app/index.html +1 -1
- package/.next/server/app/index.rsc +1 -1
- package/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/server/app-paths-manifest.json +12 -12
- package/.next/server/chunks/1354.js +1 -0
- package/.next/server/chunks/7420.js +1 -0
- package/.next/server/chunks/7555.js +1 -0
- package/.next/server/chunks/9576.js +1 -0
- package/.next/server/middleware-manifest.json +4 -4
- package/.next/server/pages/404.html +1 -1
- package/.next/server/pages/500.html +1 -1
- package/.next/server/pages/_error.js +1 -1
- package/.next/static/chunks/3763-85d191447a96df85.js +1 -0
- package/.next/static/chunks/5822-2ca912318cc34b52.js +1 -0
- package/.next/static/chunks/5964-cdb47df650c9e359.js +1 -0
- package/.next/static/chunks/6009-1f2b513c3fe454c1.js +1 -0
- package/.next/static/chunks/app/[locale]/agents/[id]/edit/{page-8d0cc73c7aff7774.js → page-74a70d27b56ead9b.js} +1 -1
- package/.next/static/chunks/app/[locale]/agents/new/{page-aeaa197c0ccfd2f9.js → page-11833508212d4d80.js} +1 -1
- package/.next/static/chunks/app/[locale]/knowledge/{page-7b4b6aa0a07d7da3.js → page-4928374e08e30a81.js} +1 -1
- package/.next/static/chunks/app/[locale]/settings/page-472b2cd8df49bf94.js +1 -0
- package/.next/trace +4 -4
- package/package.json +1 -1
- package/src/app/[locale]/settings/page.tsx +3 -3
- package/src/components/agents/model-selector.tsx +6 -0
- package/.next/server/chunks/1285.js +0 -1
- package/.next/server/chunks/2112.js +0 -1
- package/.next/server/chunks/4125.js +0 -1
- package/.next/static/chunks/2733-714d0e6cd51477c7.js +0 -1
- package/.next/static/chunks/3923-e04a628626d77a16.js +0 -1
- package/.next/static/chunks/6742-ad22486f7c4c8592.js +0 -1
- package/.next/static/chunks/app/[locale]/settings/page-71d67c3b9f712584.js +0 -1
- /package/.next/static/{0f9LzcIDG_ySmdh1lmd-C → rUwWYP4-J64RRKJv93Ihp}/_buildManifest.js +0 -0
- /package/.next/static/{0f9LzcIDG_ySmdh1lmd-C → rUwWYP4-J64RRKJv93Ihp}/_ssgManifest.js +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
(()=>{var e={};e.id=2455,e.ids=[2455],e.modules={10846:e=>{"use strict";e.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},19121:e=>{"use strict";e.exports=require("next/dist/server/app-render/action-async-storage.external.js")},3295:e=>{"use strict";e.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},29294:e=>{"use strict";e.exports=require("next/dist/server/app-render/work-async-storage.external.js")},63033:e=>{"use strict";e.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},33873:e=>{"use strict";e.exports=require("path")},33989:(e,s,a)=>{"use strict";a.r(s),a.d(s,{GlobalError:()=>l.a,__next_app__:()=>x,pages:()=>c,routeModule:()=>m,tree:()=>o});var t=a(70260),r=a(28203),n=a(25155),l=a.n(n),i=a(67292),d={};for(let e in i)0>["default","tree","pages","GlobalError","__next_app__","routeModule"].indexOf(e)&&(d[e]=()=>i[e]);a.d(s,d);let o=["",{children:["[locale]",{children:["settings",{children:["__PAGE__",{},{page:[()=>Promise.resolve().then(a.bind(a,28660)),"/Users/duan/files/pi-web/digital-agent-platform/src/app/[locale]/settings/page.tsx"]}]},{}]},{layout:[()=>Promise.resolve().then(a.bind(a,51341)),"/Users/duan/files/pi-web/digital-agent-platform/src/app/[locale]/layout.tsx"]}]},{layout:[()=>Promise.resolve().then(a.bind(a,71354)),"/Users/duan/files/pi-web/digital-agent-platform/src/app/layout.tsx"],"not-found":[()=>Promise.resolve().then(a.t.bind(a,19937,23)),"next/dist/client/components/not-found-error"],forbidden:[()=>Promise.resolve().then(a.t.bind(a,69116,23)),"next/dist/client/components/forbidden-error"],unauthorized:[()=>Promise.resolve().then(a.t.bind(a,41485,23)),"next/dist/client/components/unauthorized-error"]}],c=["/Users/duan/files/pi-web/digital-agent-platform/src/app/[locale]/settings/page.tsx"],x={require:a,loadChunk:()=>Promise.resolve()},m=new t.AppPageRouteModule({definition:{kind:r.RouteKind.APP_PAGE,page:"/[locale]/settings/page",pathname:"/[locale]/settings",bundlePath:"",filename:"",appPaths:[]},userland:{loaderTree:o}})},40363:(e,s,a)=>{Promise.resolve().then(a.bind(a,28660))},16387:(e,s,a)=>{Promise.resolve().then(a.bind(a,51890))},42163:(e,s,a)=>{"use strict";a.d(s,{A:()=>t});let t=(0,a(41680).A)("ExternalLink",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]])},86235:(e,s,a)=>{"use strict";a.d(s,{A:()=>t});let t=(0,a(41680).A)("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]])},18741:(e,s,a)=>{"use strict";a.d(s,{A:()=>t});let t=(0,a(41680).A)("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]])},49656:(e,s,a)=>{"use strict";a.d(s,{A:()=>t});let t=(0,a(41680).A)("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]])},51890:(e,s,a)=>{"use strict";a.r(s),a.d(s,{default:()=>M});var t=a(45512),r=a(58009),n=a(29362),l=a(3371),i=a(79334),d=a(86235),o=a(24849),c=a(41680);let x=(0,c.A)("Save",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]);var m=a(18741),p=a(98755),u=a(99905),h=a(49656);let g=(0,c.A)("EyeOff",[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]),v=(0,c.A)("Eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]),f=(0,c.A)("CircleX",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);var j=a(92557),b=a(20169),y=a(39400),N=a(77722),k=a(52628),w=a(28712),C=a(17524),S=a(93732),A=a(78447),E=a(44195),K=a(16873),z=a(42163);let T=(0,c.A)("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]);var P=a(75002),B=a(43264);function $({enabledSkills:e,onChange:s}){let[a,n]=(0,r.useState)([]),[l,i]=(0,r.useState)(!1),[o,c]=(0,r.useState)(!1),x=(0,r.useCallback)(()=>{i(!0),fetch("/api/skills").then(e=>e.json()).then(n).finally(()=>i(!1))},[]),p=async a=>{await fetch(`/api/skills/${encodeURIComponent(a)}`,{method:"DELETE"}),n(e=>e.filter(e=>e.name!==a)),s&&e&&s(e.filter(e=>e!==a))};return(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("div",{className:"text-sm text-muted-foreground",children:["已安装 ",(0,t.jsx)("span",{className:"font-medium text-foreground",children:a.length})," 个 Skill"]}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsxs)(y.$,{variant:"ghost",size:"sm",onClick:x,disabled:l,className:"gap-1.5 h-8",children:[(0,t.jsx)(j.A,{className:(0,E.cn)("h-3.5 w-3.5",l&&"animate-spin")}),"刷新"]}),(0,t.jsxs)(y.$,{variant:"outline",size:"sm",onClick:()=>c(!0),className:"gap-1.5 h-8",children:[(0,t.jsx)(m.A,{className:"h-3.5 w-3.5"}),"安装 Skill"]})]})]}),l?(0,t.jsxs)("div",{className:"flex items-center justify-center py-10 text-muted-foreground text-sm",children:[(0,t.jsx)(d.A,{className:"h-4 w-4 animate-spin mr-2"}),"加载中…"]}):0===a.length?(0,t.jsxs)("div",{className:"rounded-xl border border-dashed p-10 text-center text-sm text-muted-foreground",children:[(0,t.jsx)("p",{className:"mb-2",children:"还没有安装任何 Skill"}),(0,t.jsxs)(y.$,{variant:"outline",size:"sm",onClick:()=>c(!0),className:"gap-1.5",children:[(0,t.jsx)(m.A,{className:"h-3.5 w-3.5"}),"安装第一个 Skill"]})]}):(0,t.jsx)("div",{className:"space-y-2",children:a.map(e=>(0,t.jsxs)("div",{className:"group flex items-start gap-3 rounded-xl border p-3.5 hover:bg-secondary/20 transition-colors",children:[(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 flex-wrap",children:[(0,t.jsx)("span",{className:"font-mono text-sm font-medium",children:e.name}),e.hasSetup&&(0,t.jsx)(A.E,{variant:"outline",className:"text-[10px] h-4 px-1.5 font-normal",children:"含 Setup"})]}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground mt-1 line-clamp-2",children:e.description||"暂无描述"}),(0,t.jsx)("p",{className:"text-[10px] text-muted-foreground/60 mt-0.5 font-mono truncate",children:e.filePath})]}),(0,t.jsx)("button",{type:"button",onClick:()=>p(e.name),title:"卸载",className:"opacity-0 group-hover:opacity-100 p-1.5 rounded-lg text-muted-foreground hover:text-destructive hover:bg-destructive/10 transition-all shrink-0",children:(0,t.jsx)(h.A,{className:"h-4 w-4"})})]},e.name))}),(0,t.jsx)(I,{open:o,onClose:()=>c(!1),onInstalled:x,installed:a})]})}function I({open:e,onClose:s,onInstalled:a,installed:n}){let l=new Set(n.map(e=>e.name)),[i,c]=(0,r.useState)("search"),[x,m]=(0,r.useState)(""),[p,u]=(0,r.useState)([]),[h,g]=(0,r.useState)(!1),[v,j]=(0,r.useState)(""),[b,w]=(0,r.useState)(null),[S,$]=(0,r.useState)({}),[I,J]=(0,r.useState)(""),[M,D]=(0,r.useState)(""),[L,R]=(0,r.useState)(""),[O,U]=(0,r.useState)("idle"),[q,_]=(0,r.useState)("");(0,r.useRef)(null),(0,r.useCallback)(async e=>{if(!e.trim()){u([]);return}g(!0),j("");try{let s=await fetch("/api/skills/search",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({query:e.trim(),limit:30})}),a=await s.json();if(!s.ok)throw Error(a.error??`HTTP ${s.status}`);u(a.results??[])}catch(e){j(String(e)),u([])}finally{g(!1)}},[]);let V=async e=>{w(e);try{let s=await fetch("/api/skills/install",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({package:e})}),t=await s.json();if(!s.ok||!t.success)throw Error(t.error??"安装失败");$(s=>({...s,[e]:"ok"})),a()}catch(s){$(s=>({...s,[e]:"err"})),console.error(s)}finally{w(null)}},F=async()=>{U("loading"),_("");try{let e="url"===i?{url:I.trim()}:{content:M.trim(),name:L.trim()},t=await fetch("/api/skills",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),r=await t.json();if(!t.ok)throw Error(r.error??"安装失败");U("ok"),a(),setTimeout(()=>{s(),X()},1200)}catch(e){U("err"),_(String(e))}},X=()=>{m(""),u([]),j(""),J(""),D(""),R(""),U("idle"),_(""),$({})};return(0,t.jsx)(B.lG,{open:e,onOpenChange:e=>{e||(s(),X())},children:(0,t.jsxs)(B.Cf,{className:"max-w-xl max-h-[85vh] flex flex-col",children:[(0,t.jsx)(B.c7,{children:(0,t.jsx)(B.L3,{children:"安装 Skill"})}),(0,t.jsxs)(C.tU,{value:i,onValueChange:e=>c(e),className:"flex-1 flex flex-col min-h-0",children:[(0,t.jsxs)(C.j7,{className:"shrink-0",children:[(0,t.jsx)(C.Xi,{value:"search",children:"\uD83D\uDD0D 社区搜索"}),(0,t.jsx)(C.Xi,{value:"url",children:"\uD83D\uDD17 URL 安装"}),(0,t.jsx)(C.Xi,{value:"paste",children:"\uD83D\uDCCB 粘贴内容"})]}),(0,t.jsxs)(C.av,{value:"search",className:"flex-1 flex flex-col min-h-0 space-y-3 mt-3",children:[(0,t.jsxs)("div",{className:"relative shrink-0",children:[(0,t.jsx)(K.A,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"}),(0,t.jsx)(N.p,{value:x,onChange:e=>m(e.target.value),placeholder:"搜索社区 Skills,例如:web search、pdf、code review…",className:"pl-9",autoFocus:!0})]}),(0,t.jsxs)("div",{className:"flex-1 overflow-y-auto min-h-0 space-y-1.5 pr-1",children:[h&&(0,t.jsxs)("div",{className:"flex items-center justify-center py-12 text-muted-foreground text-sm",children:[(0,t.jsx)(d.A,{className:"h-4 w-4 animate-spin mr-2"}),"搜索中…"]}),!h&&v&&(0,t.jsx)("div",{className:"py-8 text-center text-sm text-destructive",children:v}),!h&&!v&&x&&0===p.length&&(0,t.jsxs)("div",{className:"py-8 text-center text-sm text-muted-foreground",children:["未找到「",x,"」相关 Skill"]}),!h&&!v&&!x&&(0,t.jsxs)("div",{className:"py-8 text-center text-sm text-muted-foreground",children:["输入关键词搜索 ",(0,t.jsx)("a",{href:"https://skills.sh",target:"_blank",rel:"noopener noreferrer",className:"underline",children:"skills.sh"})," 社区 Skills"]}),p.map(e=>{let s=S[e.package],a=b===e.package,r=l.has(e.name);return(0,t.jsxs)("div",{className:(0,E.cn)("flex items-start gap-3 rounded-xl border p-3 transition-colors",r?"bg-[#57BE6B]/5 border-[#57BE6B]/30":"hover:bg-secondary/30"),children:[(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 flex-wrap",children:[(0,t.jsx)("span",{className:"font-mono text-sm font-medium",children:e.name}),r&&(0,t.jsx)(A.E,{className:"text-[10px] h-4 px-1.5 bg-[#57BE6B]/15 text-[#57BE6B] border-0 font-normal",children:"已安装"}),e.installs>0&&(0,t.jsxs)("span",{className:"text-[10px] text-muted-foreground bg-secondary px-1.5 py-0.5 rounded",children:["↓ ",e.installsDisplay]})]}),(0,t.jsx)("p",{className:"text-[11px] font-mono text-muted-foreground/70 mt-0.5",children:e.package}),(0,t.jsxs)("a",{href:e.url,target:"_blank",rel:"noopener noreferrer",className:"text-[10px] text-blue-500 hover:underline flex items-center gap-0.5 mt-0.5 w-fit",children:[(0,t.jsx)(z.A,{className:"h-2.5 w-2.5"}),"查看详情"]})]}),r?(0,t.jsxs)("div",{className:"flex items-center gap-1 h-7 px-2 text-xs text-[#57BE6B] shrink-0",children:[(0,t.jsx)(o.A,{className:"h-3.5 w-3.5"}),"已安装"]}):(0,t.jsx)(y.$,{size:"sm",variant:"ok"===s?"ghost":"outline",className:(0,E.cn)("h-7 text-xs shrink-0 gap-1 min-w-[56px]","ok"===s&&"text-green-600 dark:text-green-400"),disabled:a||"ok"===s,onClick:()=>V(e.package),children:a?(0,t.jsx)(d.A,{className:"h-3 w-3 animate-spin"}):"ok"===s?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(o.A,{className:"h-3 w-3"}),"已装"]}):"err"===s?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(f,{className:"h-3 w-3 text-destructive"}),"失败"]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(T,{className:"h-3 w-3"}),"安装"]})})]},e.package)})]})]}),(0,t.jsxs)(C.av,{value:"url",className:"space-y-3 mt-3",children:[(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsx)(k.J,{className:"text-xs text-muted-foreground",children:"SKILL.md 的原始 URL"}),(0,t.jsx)(N.p,{value:I,onChange:e=>J(e.target.value),placeholder:"https://raw.githubusercontent.com/user/repo/main/skill/SKILL.md",className:"font-mono text-sm"}),(0,t.jsx)("p",{className:"text-[11px] text-muted-foreground",children:"支持 GitHub raw 链接或任意可访问的 markdown 地址"})]}),"ok"===O&&(0,t.jsxs)("p",{className:"text-sm text-green-600 flex items-center gap-1",children:[(0,t.jsx)(o.A,{className:"h-4 w-4"}),"安装成功!"]}),"err"===O&&(0,t.jsxs)("p",{className:"text-sm text-destructive flex items-center gap-1",children:[(0,t.jsx)(f,{className:"h-4 w-4"}),q]}),(0,t.jsxs)(B.Es,{children:[(0,t.jsx)(y.$,{variant:"outline",onClick:()=>{s(),X()},children:"取消"}),(0,t.jsxs)(y.$,{onClick:F,disabled:"loading"===O||!I.trim(),children:["loading"===O&&(0,t.jsx)(d.A,{className:"mr-2 h-4 w-4 animate-spin"}),"安装"]})]})]}),(0,t.jsxs)(C.av,{value:"paste",className:"space-y-3 mt-3",children:[(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsx)(k.J,{className:"text-xs text-muted-foreground",children:"Skill 名称(slug)"}),(0,t.jsx)(N.p,{value:L,onChange:e=>R(e.target.value),placeholder:"my-skill",className:"font-mono text-sm"})]}),(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsx)(k.J,{className:"text-xs text-muted-foreground",children:"SKILL.md 内容"}),(0,t.jsx)(P.T,{value:M,onChange:e=>D(e.target.value),placeholder:"---\nname: my-skill\ndescription: 描述这个 skill 的用途\n---\n\n# My Skill\n\n...",rows:8,className:"font-mono text-xs"})]}),"ok"===O&&(0,t.jsxs)("p",{className:"text-sm text-green-600 flex items-center gap-1",children:[(0,t.jsx)(o.A,{className:"h-4 w-4"}),"安装成功!"]}),"err"===O&&(0,t.jsxs)("p",{className:"text-sm text-destructive flex items-center gap-1",children:[(0,t.jsx)(f,{className:"h-4 w-4"}),q]}),(0,t.jsxs)(B.Es,{children:[(0,t.jsx)(y.$,{variant:"outline",onClick:()=>{s(),X()},children:"取消"}),(0,t.jsxs)(y.$,{onClick:F,disabled:"loading"===O||!M.trim(),children:["loading"===O&&(0,t.jsx)(d.A,{className:"mr-2 h-4 w-4 animate-spin"}),"安装"]})]})]})]})]})})}let J=[{value:"anthropic-messages",label:"Anthropic Messages"},{value:"openai-responses",label:"OpenAI Responses"},{value:"openai-completions",label:"OpenAI Completions (Legacy)"},{value:"google-generative-ai",label:"Google Generative AI"},{value:"bedrock-converse-stream",label:"AWS Bedrock Converse"}];function M(){let e=(0,n.useTranslations)("settings"),s=(0,n.useTranslations)("common"),{theme:a,setTheme:c}=(0,l.D)(),p=(0,n.useLocale)(),u=(0,i.useRouter)(),h=(0,i.usePathname)(),[g,v]=(0,r.useState)({}),[f,j]=(0,r.useState)({providers:{}}),[b,w]=(0,r.useState)({currentProvider:"openai",providers:{}}),[A,E]=(0,r.useState)("idle"),K=(0,r.useCallback)(async()=>{E("saving"),await fetch("/api/models-config",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({auth:g,modelsConfig:f})}),await fetch("/api/voice-provider",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(b)}),E("saved"),setTimeout(()=>E("idle"),2500),await fetch("/api/models")},[g,f,b]);return(0,t.jsxs)("div",{className:"p-6 max-w-3xl mx-auto",children:[(0,t.jsxs)("div",{className:"mb-6 flex items-center justify-between p-4 rounded-xl bg-white dark:bg-slate-800/50 backdrop-blur-sm border border-gray-200 dark:border-slate-700/50 neo-card",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("h1",{className:"text-2xl font-bold text-gray-900 dark:bg-gradient-to-r dark:from-cyan-400 dark:to-blue-400 dark:bg-clip-text dark:text-transparent",children:e("title")}),(0,t.jsx)("p",{className:"text-sm text-gray-700 dark:text-gray-400 mt-1",children:e("subtitle")})]}),(0,t.jsxs)(y.$,{onClick:K,disabled:"saving"===A,className:"neo-button gap-2 bg-gradient-to-r from-blue-500 to-indigo-500 dark:from-cyan-600 dark:to-blue-600 hover:from-blue-600 hover:to-indigo-600 dark:hover:from-cyan-500 dark:hover:to-blue-500 text-white border-0 shadow-lg hover:shadow-blue-500/30 dark:hover:shadow-cyan-500/50 transition-all duration-200 hover:scale-105",children:["saving"===A?(0,t.jsx)(d.A,{className:"h-4 w-4 animate-spin"}):"saved"===A?(0,t.jsx)(o.A,{className:"h-4 w-4"}):(0,t.jsx)(x,{className:"h-4 w-4"}),"saving"===A?"保存中…":"saved"===A?"已保存":s("save")]})]}),(0,t.jsxs)(C.tU,{defaultValue:"providers",children:[(0,t.jsxs)(C.j7,{className:"mb-6 neo-card bg-gray-50 dark:bg-slate-800/50 backdrop-blur-sm border border-gray-200 dark:border-slate-700/50 p-1",children:[(0,t.jsx)(C.Xi,{value:"providers",className:"data-[state=active]:neo-card-inset data-[state=active]:bg-blue-100 data-[state=active]:text-blue-700 dark:data-[state=active]:bg-gradient-to-r dark:data-[state=active]:from-cyan-600 dark:data-[state=active]:to-blue-600 dark:data-[state=active]:text-white hover:bg-gray-100 dark:hover:bg-slate-700/50 transition-all duration-200",children:"内置提供商"}),(0,t.jsx)(C.Xi,{value:"custom",className:"data-[state=active]:neo-card-inset data-[state=active]:bg-blue-100 data-[state=active]:text-blue-700 dark:data-[state=active]:bg-gradient-to-r dark:data-[state=active]:from-cyan-600 dark:data-[state=active]:to-blue-600 dark:data-[state=active]:text-white hover:bg-gray-100 dark:hover:bg-slate-700/50 transition-all duration-200",children:"自定义提供商"}),(0,t.jsx)(C.Xi,{value:"voice",className:"data-[state=active]:neo-card-inset data-[state=active]:bg-blue-100 data-[state=active]:text-blue-700 dark:data-[state=active]:bg-gradient-to-r dark:data-[state=active]:from-cyan-600 dark:data-[state=active]:to-blue-600 dark:data-[state=active]:text-white hover:bg-gray-100 dark:hover:bg-slate-700/50 transition-all duration-200",children:"语音供应商"}),(0,t.jsx)(C.Xi,{value:"envvars",className:"data-[state=active]:neo-card-inset data-[state=active]:bg-blue-100 data-[state=active]:text-blue-700 dark:data-[state=active]:bg-gradient-to-r dark:data-[state=active]:from-cyan-600 dark:data-[state=active]:to-blue-600 dark:data-[state=active]:text-white hover:bg-gray-100 dark:hover:bg-slate-700/50 transition-all duration-200",children:"环境变量"}),(0,t.jsx)(C.Xi,{value:"skills",className:"data-[state=active]:neo-card-inset data-[state=active]:bg-blue-100 data-[state=active]:text-blue-700 dark:data-[state=active]:bg-gradient-to-r dark:data-[state=active]:from-cyan-600 dark:data-[state=active]:to-blue-600 dark:data-[state=active]:text-white hover:bg-gray-100 dark:hover:bg-slate-700/50 transition-all duration-200",children:"Skills 管理"}),(0,t.jsx)(C.Xi,{value:"appearance",className:"data-[state=active]:neo-card-inset data-[state=active]:bg-blue-100 data-[state=active]:text-blue-700 dark:data-[state=active]:bg-gradient-to-r dark:data-[state=active]:from-cyan-600 dark:data-[state=active]:to-blue-600 dark:data-[state=active]:text-white hover:bg-gray-100 dark:hover:bg-slate-700/50 transition-all duration-200",children:"外观 & 语言"})]}),(0,t.jsx)(C.av,{value:"providers",className:"space-y-4",children:(0,t.jsx)(U,{apiKeys:g,onKeysChange:v,onSave:K})}),(0,t.jsxs)(C.av,{value:"custom",className:"space-y-4",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsx)("div",{children:(0,t.jsxs)("p",{className:"text-sm text-muted-foreground",children:["添加兼容 OpenAI / Anthropic API 的自定义提供商。配置存储在"," ",(0,t.jsx)("code",{className:"font-mono text-xs bg-secondary px-1 rounded",children:"~/.pi/agent/models.json"}),"。"]})}),(0,t.jsxs)(y.$,{variant:"outline",size:"sm",className:"neo-button hover:scale-105 transition-transform",onClick:()=>{let e=`custom-provider-${Date.now()}`;j(s=>({providers:{...s.providers,[e]:{baseUrl:"",api:"openai-completions",apiKey:"",models:[]}}}))},children:[(0,t.jsx)(m.A,{className:"mr-2 h-4 w-4"}),"添加提供商"]})]}),0===Object.keys(f.providers).length?(0,t.jsx)("div",{className:"rounded-lg border border-dashed p-8 text-center text-muted-foreground text-sm",children:"暂无自定义提供商。点击「添加提供商」创建一个。"}):(0,t.jsx)("div",{className:"space-y-4",children:Object.entries(f.providers).map(([e,s])=>(0,t.jsx)(D,{name:e,provider:s,onChange:s=>j(a=>({providers:{...a.providers,[e]:s}})),onRename:s=>{s!==e&&s&&j(a=>{let{[e]:t,...r}=a.providers;return{providers:{...r,[s]:t}}})},onDelete:()=>j(s=>{let{[e]:a,...t}=s.providers;return{providers:t}})},e))})]}),(0,t.jsxs)(C.av,{value:"voice",className:"space-y-4",children:[(0,t.jsx)("div",{className:"mb-4",children:(0,t.jsxs)("p",{className:"text-sm text-muted-foreground",children:["选择一个语音供应商并配置API密钥,全局生效。配置存储在"," ",(0,t.jsx)("code",{className:"font-mono text-xs bg-secondary px-1 rounded",children:"~/.pi/agent/voice-provider.json"}),"。"]})}),(0,t.jsxs)("div",{className:"neo-card p-4 bg-white dark:bg-slate-800/50 rounded-xl",children:[(0,t.jsx)(k.J,{className:"text-sm font-medium text-gray-700 dark:text-gray-300 mb-2 block",children:"当前语音供应商"}),(0,t.jsxs)(S.l6,{value:b.currentProvider,onValueChange:e=>w(s=>({...s,currentProvider:e})),children:[(0,t.jsx)(S.bq,{className:"neo-card-inset",children:(0,t.jsx)(S.yv,{})}),(0,t.jsxs)(S.gC,{children:[(0,t.jsx)(S.eb,{value:"openai",children:"OpenAI TTS"}),(0,t.jsx)(S.eb,{value:"aliyun",children:"阿里云语音合成"}),(0,t.jsx)(S.eb,{value:"tencent",children:"腾讯云TTS"}),(0,t.jsx)(S.eb,{value:"baidu",children:"百度语音合成"})]})]})]}),"openai"===b.currentProvider&&(0,t.jsxs)("div",{className:"neo-card p-4 bg-white dark:bg-slate-800/50 rounded-xl space-y-3",children:[(0,t.jsx)("h3",{className:"text-sm font-medium text-gray-700 dark:text-gray-300",children:"OpenAI TTS 配置"}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(k.J,{className:"text-xs",children:"API Key"}),(0,t.jsx)(N.p,{type:"password",placeholder:"sk-...",value:b.providers.openai?.apiKey||"",onChange:e=>w(s=>({...s,providers:{...s.providers,openai:{...s.providers.openai,apiKey:e.target.value}}}))})]})]}),"aliyun"===b.currentProvider&&(0,t.jsxs)("div",{className:"neo-card p-4 bg-white dark:bg-slate-800/50 rounded-xl space-y-3",children:[(0,t.jsx)("h3",{className:"text-sm font-medium text-gray-700 dark:text-gray-300",children:"阿里云配置"}),(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-3",children:[(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(k.J,{className:"text-xs",children:"AppKey"}),(0,t.jsx)(N.p,{placeholder:"...",value:b.providers.aliyun?.appKey||"",onChange:e=>w(s=>({...s,providers:{...s.providers,aliyun:{...s.providers.aliyun,appKey:e.target.value,accessKeyId:s.providers.aliyun?.accessKeyId||"",accessKeySecret:s.providers.aliyun?.accessKeySecret||""}}}))})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(k.J,{className:"text-xs",children:"Access Key ID"}),(0,t.jsx)(N.p,{type:"password",placeholder:"...",value:b.providers.aliyun?.accessKeyId||"",onChange:e=>w(s=>({...s,providers:{...s.providers,aliyun:{...s.providers.aliyun,appKey:s.providers.aliyun?.appKey||"",accessKeyId:e.target.value,accessKeySecret:s.providers.aliyun?.accessKeySecret||""}}}))})]}),(0,t.jsxs)("div",{className:"space-y-2 col-span-2",children:[(0,t.jsx)(k.J,{className:"text-xs",children:"Access Key Secret"}),(0,t.jsx)(N.p,{type:"password",placeholder:"...",value:b.providers.aliyun?.accessKeySecret||"",onChange:e=>w(s=>({...s,providers:{...s.providers,aliyun:{...s.providers.aliyun,appKey:s.providers.aliyun?.appKey||"",accessKeyId:s.providers.aliyun?.accessKeyId||"",accessKeySecret:e.target.value}}}))})]})]})]}),"tencent"===b.currentProvider&&(0,t.jsxs)("div",{className:"neo-card p-4 bg-white dark:bg-slate-800/50 rounded-xl space-y-3",children:[(0,t.jsx)("h3",{className:"text-sm font-medium text-gray-700 dark:text-gray-300",children:"腾讯云配置"}),(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-3",children:[(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(k.J,{className:"text-xs",children:"Secret ID"}),(0,t.jsx)(N.p,{type:"password",placeholder:"AKID...",value:b.providers.tencent?.secretId||"",onChange:e=>w(s=>({...s,providers:{...s.providers,tencent:{...s.providers.tencent,secretId:e.target.value,secretKey:s.providers.tencent?.secretKey||""}}}))})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(k.J,{className:"text-xs",children:"Secret Key"}),(0,t.jsx)(N.p,{type:"password",placeholder:"...",value:b.providers.tencent?.secretKey||"",onChange:e=>w(s=>({...s,providers:{...s.providers,tencent:{...s.providers.tencent,secretId:s.providers.tencent?.secretId||"",secretKey:e.target.value}}}))})]})]})]}),"baidu"===b.currentProvider&&(0,t.jsxs)("div",{className:"neo-card p-4 bg-white dark:bg-slate-800/50 rounded-xl space-y-3",children:[(0,t.jsx)("h3",{className:"text-sm font-medium text-gray-700 dark:text-gray-300",children:"百度配置"}),(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-3",children:[(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(k.J,{className:"text-xs",children:"API Key"}),(0,t.jsx)(N.p,{type:"password",placeholder:"...",value:b.providers.baidu?.apiKey||"",onChange:e=>w(s=>({...s,providers:{...s.providers,baidu:{...s.providers.baidu,apiKey:e.target.value,secretKey:s.providers.baidu?.secretKey||""}}}))})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(k.J,{className:"text-xs",children:"Secret Key"}),(0,t.jsx)(N.p,{type:"password",placeholder:"...",value:b.providers.baidu?.secretKey||"",onChange:e=>w(s=>({...s,providers:{...s.providers,baidu:{...s.providers.baidu,apiKey:s.providers.baidu?.apiKey||"",secretKey:e.target.value}}}))})]})]})]})]}),(0,t.jsx)(C.av,{value:"envvars",children:(0,t.jsx)(R,{})}),(0,t.jsxs)(C.av,{value:"skills",className:"space-y-2",children:[(0,t.jsx)("div",{className:"mb-4",children:(0,t.jsxs)("p",{className:"text-sm text-muted-foreground",children:["安装、卸载 Skills。Skills 存储在"," ",(0,t.jsx)("code",{className:"font-mono text-xs bg-secondary px-1 rounded",children:"~/.pi/agent/skills/"}),", 对所有数字人共享。在数字人配置中可按需启用/禁用。"]})}),(0,t.jsx)($,{})]}),(0,t.jsxs)(C.av,{value:"appearance",className:"space-y-6",children:[(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsx)(k.J,{children:e("theme")}),(0,t.jsxs)(S.l6,{value:a,onValueChange:c,children:[(0,t.jsx)(S.bq,{className:"w-48",children:(0,t.jsx)(S.yv,{})}),(0,t.jsxs)(S.gC,{children:[(0,t.jsx)(S.eb,{value:"light",children:e("themeLight")}),(0,t.jsx)(S.eb,{value:"dark",children:e("themeDark")}),(0,t.jsx)(S.eb,{value:"system",children:e("themeSystem")})]})]})]}),(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsx)(k.J,{children:e("language")}),(0,t.jsxs)(S.l6,{value:p,onValueChange:e=>{u.push(h.replace(/^\/(zh|en)/,`/${e}`))},children:[(0,t.jsx)(S.bq,{className:"w-48",children:(0,t.jsx)(S.yv,{})}),(0,t.jsxs)(S.gC,{children:[(0,t.jsx)(S.eb,{value:"zh",children:"中文"}),(0,t.jsx)(S.eb,{value:"en",children:"English"})]})]})]})]})]})]})}function D({name:e,provider:s,onChange:a,onRename:n,onDelete:l}){let[i,d]=(0,r.useState)(!0),[c,x]=(0,r.useState)(e),[j,b]=(0,r.useState)(!1),[w,C]=(0,r.useState)({phase:"idle"}),K=(e,t)=>a({...s,[e]:t}),z=async a=>{C({phase:"testing"});try{let t=await fetch("/api/models-config/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerName:e,provider:s,model:a})}),r=await t.json();r.ok?C({phase:"success",latencyMs:r.latencyMs,responseText:r.responseText}):C({phase:"error",message:r.error,latencyMs:r.latencyMs})}catch(e){C({phase:"error",message:String(e)})}},T=(e,a,t)=>{let r=[...s.models??[]];r[e]={...r[e],[a]:t},K("models",r)},P=e=>{let a=[...s.models??[]];a.splice(e,1),K("models",a)};return(0,t.jsxs)("div",{className:"rounded-xl border bg-card overflow-hidden",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 px-4 py-3 cursor-pointer hover:bg-secondary/30 transition-colors",onClick:()=>d(!i),children:[i?(0,t.jsx)(p.A,{className:"h-4 w-4 text-muted-foreground"}):(0,t.jsx)(u.A,{className:"h-4 w-4 text-muted-foreground"}),(0,t.jsx)("span",{className:"font-mono text-sm font-medium flex-1 truncate",children:e}),(0,t.jsx)(A.E,{variant:"outline",className:"text-xs",children:s.api??"—"}),(0,t.jsxs)(A.E,{variant:"secondary",className:"text-xs",children:[s.models?.length??0," models"]}),(0,t.jsx)("button",{type:"button",onClick:e=>{e.stopPropagation(),l()},className:"ml-1 text-muted-foreground hover:text-destructive transition-colors",children:(0,t.jsx)(h.A,{className:"h-4 w-4"})})]}),i&&(0,t.jsxs)("div",{className:"px-4 pb-4 space-y-4 border-t",children:[(0,t.jsxs)("div",{className:"pt-4 space-y-1.5",children:[(0,t.jsx)(k.J,{className:"text-xs text-muted-foreground uppercase tracking-wider",children:"提供商名称(唯一标识)"}),(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsx)(N.p,{value:c,onChange:e=>x(e.target.value),className:"font-mono text-sm",placeholder:"my-custom-provider"}),c!==e&&c.trim()&&(0,t.jsx)(y.$,{size:"sm",onClick:()=>n(c.trim()),children:"重命名"})]})]}),(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsx)(k.J,{className:"text-xs text-muted-foreground uppercase tracking-wider",children:"Base URL"}),(0,t.jsx)(N.p,{value:s.baseUrl??"",onChange:e=>K("baseUrl",e.target.value||void 0),placeholder:"https://api.example.com/v1",className:"font-mono text-sm"})]}),(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsx)(k.J,{className:"text-xs text-muted-foreground uppercase tracking-wider",children:"API 协议"}),(0,t.jsxs)(S.l6,{value:s.api??"openai-completions",onValueChange:e=>K("api",e),children:[(0,t.jsx)(S.bq,{children:(0,t.jsx)(S.yv,{})}),(0,t.jsx)(S.gC,{children:J.map(e=>(0,t.jsx)(S.eb,{value:e.value,children:e.label},e.value))})]})]})]}),(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsx)(k.J,{className:"text-xs text-muted-foreground uppercase tracking-wider",children:"API Key"}),(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)(N.p,{type:j?"text":"password",value:s.apiKey??"",onChange:e=>K("apiKey",e.target.value||void 0),placeholder:"ENV_VAR_NAME, !shell-command, 或直接填写密钥",className:"pr-10 font-mono text-sm"}),(0,t.jsx)("button",{type:"button",onClick:()=>b(!j),className:"absolute right-2.5 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground",children:j?(0,t.jsx)(g,{className:"h-4 w-4"}):(0,t.jsx)(v,{className:"h-4 w-4"})})]}),(0,t.jsxs)("p",{className:"text-[11px] text-muted-foreground",children:["前缀 ",(0,t.jsx)("code",{className:"font-mono",children:"!"})," 运行 Shell 命令,或填写环境变量名(自动读取)"]})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsx)(k.J,{className:"text-xs text-muted-foreground uppercase tracking-wider",children:"模型列表"}),(0,t.jsxs)(y.$,{variant:"ghost",size:"sm",onClick:()=>{K("models",[...s.models??[],{id:"",name:"",contextWindow:128e3,maxTokens:4096,input:["text","image"],reasoning:!1,cost:{input:0,output:0}}])},className:"h-7 text-xs",children:[(0,t.jsx)(m.A,{className:"mr-1 h-3 w-3"}),"添加模型"]})]}),0===(s.models??[]).length?(0,t.jsx)("p",{className:"text-sm text-muted-foreground text-center py-4 border border-dashed rounded-lg",children:"暂无模型,点击「添加模型」"}):(0,t.jsx)("div",{className:"space-y-3",children:(s.models??[]).map((e,s)=>(0,t.jsx)(L,{model:e,onUpdate:(e,a)=>T(s,e,a),onDelete:()=>P(s),onTest:()=>z(e),testState:w},s))})]}),"idle"!==w.phase&&"testing"!==w.phase&&(0,t.jsxs)("div",{className:(0,E.cn)("flex items-start gap-2 rounded-lg px-3 py-2 text-sm","success"===w.phase?"bg-green-50 dark:bg-green-900/20 text-green-700 dark:text-green-400":"bg-red-50 dark:bg-red-900/20 text-red-700 dark:text-red-400"),children:["success"===w.phase?(0,t.jsx)(o.A,{className:"h-4 w-4 mt-0.5 shrink-0"}):(0,t.jsx)(f,{className:"h-4 w-4 mt-0.5 shrink-0"}),(0,t.jsx)("div",{children:"success"===w.phase?`连接成功 (${w.latencyMs}ms)${w.responseText?` — "${w.responseText}"`:""}`:`连接失败: ${w.message}${w.latencyMs?` (${w.latencyMs}ms)`:""}`}),(0,t.jsx)("button",{onClick:()=>C({phase:"idle"}),className:"ml-auto text-current opacity-50 hover:opacity-100",children:(0,t.jsx)(f,{className:"h-3 w-3"})})]})]})]})}function L({model:e,onUpdate:s,onDelete:a,onTest:r,testState:n}){let l="testing"===n.phase;return(0,t.jsxs)("div",{className:"rounded-lg border bg-secondary/20 p-3 space-y-3",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsxs)("div",{className:"flex-1 min-w-0 grid grid-cols-2 gap-2",children:[(0,t.jsx)(N.p,{value:e.id,onChange:e=>s("id",e.target.value),placeholder:"model-id(如 gpt-4o)",className:"font-mono text-xs h-8"}),(0,t.jsx)(N.p,{value:e.name??"",onChange:e=>s("name",e.target.value||void 0),placeholder:"显示名称(可选)",className:"text-xs h-8"})]}),(0,t.jsxs)(y.$,{variant:"ghost",size:"sm",onClick:r,disabled:!e.id||l,className:"h-8 text-xs shrink-0 gap-1",title:"测试连接",children:[l?(0,t.jsx)(d.A,{className:"h-3 w-3 animate-spin"}):(0,t.jsx)(j.A,{className:"h-3 w-3"}),"测试"]}),(0,t.jsx)("button",{type:"button",onClick:a,className:"text-muted-foreground hover:text-destructive transition-colors",children:(0,t.jsx)(h.A,{className:"h-4 w-4"})})]}),(0,t.jsxs)("div",{className:"grid grid-cols-3 gap-2",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(k.J,{className:"text-[10px] text-muted-foreground",children:"Context Window"}),(0,t.jsx)(N.p,{type:"number",value:e.contextWindow??128e3,onChange:e=>s("contextWindow",Number(e.target.value)),className:"text-xs h-7 mt-0.5"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(k.J,{className:"text-[10px] text-muted-foreground",children:"Max Output Tokens"}),(0,t.jsx)(N.p,{type:"number",value:e.maxTokens??4096,onChange:e=>s("maxTokens",Number(e.target.value)),className:"text-xs h-7 mt-0.5"})]}),(0,t.jsx)("div",{className:"flex flex-col justify-end",children:(0,t.jsxs)("div",{className:"flex items-center gap-2 h-7",children:[(0,t.jsx)(w.d,{id:`reasoning-${e.id}`,checked:e.reasoning??!1,onCheckedChange:e=>s("reasoning",e),className:"scale-75"}),(0,t.jsx)(k.J,{htmlFor:`reasoning-${e.id}`,className:"text-[11px] cursor-pointer",children:"支持 Thinking"})]})})]}),(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-2",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(k.J,{className:"text-[10px] text-muted-foreground",children:"输入价格 ($/1M tokens)"}),(0,t.jsx)(N.p,{type:"number",step:"0.01",value:e.cost?.input??0,onChange:a=>s("cost",{...e.cost,input:Number(a.target.value)}),className:"text-xs h-7 mt-0.5"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(k.J,{className:"text-[10px] text-muted-foreground",children:"输出价格 ($/1M tokens)"}),(0,t.jsx)(N.p,{type:"number",step:"0.01",value:e.cost?.output??0,onChange:a=>s("cost",{...e.cost,output:Number(a.target.value)}),className:"text-xs h-7 mt-0.5"})]})]})]})}function R(){let[e,s]=(0,r.useState)({}),[a,n]=(0,r.useState)(!0),[l,i]=(0,r.useState)(""),[c,x]=(0,r.useState)(""),[p,u]=(0,r.useState)(null),[g,v]=(0,r.useState)(""),[k,w]=(0,r.useState)(""),[C,S]=(0,r.useState)(null),[A,K]=(0,r.useState)(null),[z,T]=(0,r.useState)(!1),[P,B]=(0,r.useState)({}),$=(0,r.useCallback)(()=>{n(!0),fetch("/api/env-vars",{cache:"no-store"}).then(e=>e.json()).then(e=>{s(e),n(!1)}).catch(()=>n(!1))},[]),I=async(e=l,s=c)=>{if(w(""),!e.trim()){w("变量名不能为空");return}let a=await fetch("/api/env-vars",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({key:e.trim(),value:s})}),t=await a.json();if(!a.ok){w(t.error??"保存失败");return}e===l&&(i(""),x("")),S(e.trim()),setTimeout(()=>S(null),2500),$(),K(null)},J=async e=>{await fetch(`/api/env-vars/${encodeURIComponent(e)}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({value:g})}),u(null),S(e),setTimeout(()=>S(null),2500),$()},M=async e=>{await fetch(`/api/env-vars/${encodeURIComponent(e)}`,{method:"DELETE"}),$(),K(null)},D=async()=>{T(!0),K(await fetch("/api/env-vars/scan").then(e=>e.json())),B({}),T(!1)},L=async e=>{await I(e,P[e]??""),B(s=>{let a={...s};return delete a[e],a}),setTimeout(D,300)},R=Object.entries(e).sort(([e],[s])=>e.localeCompare(s)),O=A?.summary.filter(e=>!e.stored)??[];return(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)("div",{className:"flex items-start gap-3 rounded-xl border border-zinc-200 dark:border-zinc-700 bg-zinc-50 dark:bg-zinc-800/50 p-4",children:[(0,t.jsx)(b.A,{className:"h-5 w-5 text-zinc-500 shrink-0 mt-0.5"}),(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsx)("p",{className:"text-sm font-medium",children:"全局环境变量"}),(0,t.jsxs)("p",{className:"text-xs text-muted-foreground mt-0.5",children:["存于 ",(0,t.jsx)("code",{className:"font-mono bg-zinc-100 dark:bg-zinc-800 px-1 rounded",children:"~/.digital-agents/env.json"}),", Bash 工具执行时自动注入。"]})]}),(0,t.jsxs)(y.$,{size:"sm",variant:"outline",onClick:D,disabled:z,className:"gap-1.5 shrink-0",children:[z?(0,t.jsx)(d.A,{className:"h-3.5 w-3.5 animate-spin"}):(0,t.jsx)(j.A,{className:"h-3.5 w-3.5"}),"扫描 Skill 变量"]})]}),A&&(0,t.jsxs)("div",{className:"rounded-xl border overflow-hidden",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between px-4 py-3 border-b bg-secondary/30",children:[(0,t.jsx)("p",{className:"text-xs font-semibold uppercase tracking-wider text-muted-foreground",children:"Skill 引用的环境变量"}),(0,t.jsx)("button",{type:"button",onClick:()=>K(null),className:"text-muted-foreground hover:text-foreground text-xs",children:"关闭"})]}),(0,t.jsx)("div",{className:"p-3 space-y-2",children:0===A.summary.length?(0,t.jsx)("p",{className:"text-sm text-muted-foreground text-center py-4",children:"未发现 Skill 引用的环境变量"}):A.summary.map(e=>(0,t.jsxs)("div",{className:(0,E.cn)("flex items-center gap-2 rounded-lg border px-3 py-2.5 transition-all",e.stored?"border-[#57BE6B]/40 bg-[#57BE6B]/8 dark:bg-[#57BE6B]/10":"border-amber-300 dark:border-amber-700 bg-amber-50/50 dark:bg-amber-900/10"),children:[e.stored?(0,t.jsx)(o.A,{className:"h-4 w-4 text-[#57BE6B] shrink-0"}):(0,t.jsx)("span",{className:"h-4 w-4 rounded-full border-2 border-amber-400 shrink-0 flex items-center justify-center",children:(0,t.jsx)("span",{className:"h-1.5 w-1.5 rounded-full bg-amber-400"})}),(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsx)("code",{className:"text-xs font-mono font-semibold",children:e.name}),(0,t.jsxs)("p",{className:"text-[10px] text-muted-foreground mt-0.5",children:["引用于:",e.skills.join("、")]})]}),e.stored?(0,t.jsx)("span",{className:"text-[10px] text-[#57BE6B] shrink-0",children:"已配置"}):(0,t.jsxs)("div",{className:"flex items-center gap-1.5 shrink-0",children:[(0,t.jsx)(N.p,{value:P[e.name]??"",onChange:s=>B(a=>({...a,[e.name]:s.target.value})),onKeyDown:s=>"Enter"===s.key&&L(e.name),placeholder:"输入值...",className:"h-7 w-36 text-xs font-mono"}),(0,t.jsxs)(y.$,{size:"sm",className:"h-7 px-2 text-xs gap-1",onClick:()=>L(e.name),children:[(0,t.jsx)(m.A,{className:"h-3 w-3"}),"添加"]})]})]},e.name))}),O.length>0&&(0,t.jsx)("div",{className:"px-4 py-2.5 border-t bg-amber-50/30 dark:bg-amber-900/10",children:(0,t.jsxs)("p",{className:"text-xs text-amber-600 dark:text-amber-400",children:["⚠️ ",O.length," 个变量尚未配置 — 相关 Skill 执行时可能报错"]})})]}),(0,t.jsxs)("div",{className:"rounded-xl border p-4 space-y-3",children:[(0,t.jsx)("p",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wider",children:"手动添加变量"}),(0,t.jsxs)("div",{className:"flex gap-2 items-start",children:[(0,t.jsx)(N.p,{value:l,onChange:e=>{i(e.target.value),w("")},onKeyDown:e=>"Enter"===e.key&&I(),placeholder:"VARIABLE_NAME",className:"font-mono text-sm flex-1"}),(0,t.jsx)("span",{className:"text-muted-foreground pt-2 text-sm shrink-0",children:"="}),(0,t.jsx)(N.p,{value:c,onChange:e=>x(e.target.value),onKeyDown:e=>"Enter"===e.key&&I(),placeholder:"value",className:"font-mono text-sm flex-1"}),(0,t.jsxs)(y.$,{size:"sm",onClick:()=>I(),className:"gap-1.5 shrink-0",children:[(0,t.jsx)(m.A,{className:"h-3.5 w-3.5"}),"添加"]})]}),k&&(0,t.jsx)("p",{className:"text-xs text-destructive",children:k})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("p",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wider",children:["已配置 (",R.length,")"]}),R.length>0&&(0,t.jsx)("button",{type:"button",onClick:async()=>{confirm("确认清空所有环境变量?")&&(await fetch("/api/env-vars",{method:"DELETE"}),$(),K(null))},className:"text-xs text-destructive hover:underline",children:"清空全部"})]}),a?(0,t.jsxs)("div",{className:"flex items-center justify-center py-8 text-muted-foreground text-sm",children:[(0,t.jsx)(d.A,{className:"h-4 w-4 animate-spin mr-2"}),"加载中…"]}):0===R.length?(0,t.jsx)("div",{className:"rounded-lg border border-dashed p-8 text-center text-sm text-muted-foreground",children:"暂无环境变量。点击「扫描 Skill 变量」自动发现 Skill 所需的变量名,或手动添加。"}):R.map(([e,s])=>(0,t.jsxs)("div",{className:(0,E.cn)("group flex items-center gap-2 rounded-lg border px-3 py-2.5 transition-all",C===e?"border-[#57BE6B]/60 bg-[#57BE6B]/10":"border-border hover:border-zinc-300 dark:hover:border-zinc-600"),children:[(0,t.jsx)("code",{className:"text-xs font-mono font-semibold shrink-0 min-w-[140px] truncate",children:e}),(0,t.jsx)("span",{className:"text-muted-foreground text-xs shrink-0",children:"="}),p===e?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(N.p,{value:g,onChange:e=>v(e.target.value),onKeyDown:s=>{"Enter"===s.key&&J(e),"Escape"===s.key&&u(null)},className:"h-7 text-xs font-mono flex-1",autoFocus:!0}),(0,t.jsx)(y.$,{size:"sm",variant:"ghost",className:"h-7 px-2 text-[#57BE6B]",onClick:()=>J(e),children:(0,t.jsx)(o.A,{className:"h-3.5 w-3.5"})}),(0,t.jsx)(y.$,{size:"sm",variant:"ghost",className:"h-7 px-2",onClick:()=>u(null),children:(0,t.jsx)(f,{className:"h-3.5 w-3.5"})})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:"text-xs font-mono text-muted-foreground flex-1 truncate cursor-pointer hover:text-foreground",onClick:()=>{u(e),v(s)},title:s||"(空)",children:s||(0,t.jsx)("em",{className:"opacity-40 not-italic",children:"(空)"})}),C===e&&(0,t.jsx)("span",{className:"text-[10px] text-[#57BE6B] shrink-0",children:"已保存"}),(0,t.jsx)("button",{type:"button",className:"opacity-0 group-hover:opacity-100 text-muted-foreground hover:text-foreground transition-all",onClick:()=>{u(e),v(s)},title:"编辑",children:(0,t.jsx)(j.A,{className:"h-3.5 w-3.5"})}),(0,t.jsx)("button",{type:"button",className:"opacity-0 group-hover:opacity-100 text-muted-foreground hover:text-destructive transition-all",onClick:()=>M(e),title:"删除",children:(0,t.jsx)(h.A,{className:"h-3.5 w-3.5"})})]})]},e))]})]})}let O={anthropic:{name:"Anthropic",placeholder:"sk-ant-api03-...",color:"bg-orange-50 dark:bg-orange-900/20 border-orange-200 dark:border-orange-800"},openai:{name:"OpenAI",placeholder:"sk-proj-...",color:"bg-green-50 dark:bg-green-900/20 border-green-200 dark:border-green-800"},google:{name:"Google AI",placeholder:"AIzaSy...",color:"bg-blue-50 dark:bg-blue-900/20 border-blue-200 dark:border-blue-800"},groq:{name:"Groq",placeholder:"gsk_...",color:"bg-purple-50 dark:bg-purple-900/20 border-purple-200 dark:border-purple-800"},deepseek:{name:"DeepSeek",placeholder:"sk-...",color:"bg-cyan-50 dark:bg-cyan-900/20 border-cyan-200 dark:border-cyan-800"},xai:{name:"xAI (Grok)",placeholder:"xai-...",color:"bg-zinc-50 dark:bg-zinc-800/50 border-zinc-200 dark:border-zinc-700"},mistral:{name:"Mistral",placeholder:"...",color:"bg-yellow-50 dark:bg-yellow-900/20 border-yellow-200 dark:border-yellow-800"}};function U({apiKeys:e,onKeysChange:s,onSave:a}){let[n,l]=(0,r.useState)(""),[i,c]=(0,r.useState)(""),[x,p]=(0,r.useState)({phase:"idle"}),[u,g]=(0,r.useState)(!1),[v,b]=(0,r.useState)(null),[w,C]=(0,r.useState)(""),S=Object.entries(e).filter(([,e])=>e&&""!==e.trim()),A=Object.entries(O).filter(([s])=>!e[s]),K=async(e,s)=>{p({phase:"testing"});try{let a=await fetch("/api/auth-config/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:e,key:s})}),t=await a.json();t.ok?p({phase:"ok",ms:t.latencyMs}):p({phase:"err",msg:t.error??`HTTP ${t.status}`})}catch(e){p({phase:"err",msg:String(e)})}},z=async()=>{n&&i.trim()&&await K(n,i.trim())},T=async()=>{s({...e,[n]:i.trim()}),await a(),l(""),c(""),p({phase:"idle"}),g(!1)},P=async t=>{let r={...e};delete r[t],s(r),await a()},B=async t=>{s({...e,[t]:w.trim()}),await a(),b(null),C("")};return(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"text-sm font-medium",children:"LLM 提供商"}),(0,t.jsxs)("p",{className:"text-xs text-muted-foreground mt-0.5",children:["密钥存储于 ",(0,t.jsx)("code",{className:"font-mono bg-secondary px-1 rounded",children:"~/.pi/agent/auth.json"})]})]}),!u&&(0,t.jsxs)(y.$,{variant:"outline",size:"sm",onClick:()=>g(!0),className:"gap-1.5",disabled:0===A.length,children:[(0,t.jsx)(m.A,{className:"h-3.5 w-3.5"}),"添加提供商"]})]}),0===S.length&&!u&&(0,t.jsx)("div",{className:"rounded-xl border border-dashed p-8 text-center text-sm text-muted-foreground",children:"还没有配置任何 LLM 提供商。点击「添加提供商」开始配置。"}),(0,t.jsx)("div",{className:"space-y-2",children:S.map(([e,s])=>{let a=O[e],r=v===e;return(0,t.jsxs)("div",{className:(0,E.cn)("group flex items-center gap-3 rounded-xl border p-3.5 transition-all",a?.color??""),children:[(0,t.jsxs)("div",{className:"w-28 shrink-0",children:[(0,t.jsx)("p",{className:"text-sm font-medium",children:a?.name??e}),(0,t.jsx)("p",{className:"text-[11px] text-muted-foreground font-mono",children:e})]}),r?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(N.p,{type:"password",value:w,onChange:e=>C(e.target.value),onKeyDown:s=>{"Enter"===s.key&&B(e),"Escape"===s.key&&b(null)},placeholder:a?.placeholder??"API Key",className:"flex-1 font-mono text-xs h-8",autoFocus:!0}),(0,t.jsxs)(y.$,{size:"sm",className:"h-7 px-2 gap-1 text-xs",onClick:()=>B(e),children:[(0,t.jsx)(o.A,{className:"h-3 w-3"}),"保存"]}),(0,t.jsx)(y.$,{size:"sm",variant:"ghost",className:"h-7 px-2",onClick:()=>b(null),children:(0,t.jsx)(f,{className:"h-3.5 w-3.5"})})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:"flex-1 font-mono text-xs text-muted-foreground",children:s.startsWith("***")?s:"••••••••"+s.slice(-4)}),(0,t.jsxs)("div",{className:"flex gap-1 opacity-0 group-hover:opacity-100 transition-opacity",children:[(0,t.jsx)(y.$,{size:"sm",variant:"ghost",className:"h-7 px-2 text-xs",onClick:()=>{b(e),C(s.startsWith("***")?"":s)},children:"编辑"}),(0,t.jsx)(y.$,{size:"sm",variant:"ghost",className:"h-7 px-2 text-destructive hover:text-destructive",onClick:()=>P(e),children:(0,t.jsx)(h.A,{className:"h-3.5 w-3.5"})})]})]})]},e)})}),u&&(0,t.jsxs)("div",{className:"rounded-xl border-2 border-dashed border-[#57BE6B]/50 p-4 space-y-4",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsx)("p",{className:"text-sm font-semibold",children:"添加提供商"}),(0,t.jsx)("button",{type:"button",onClick:()=>{g(!1),p({phase:"idle"}),c(""),l("")},className:"text-muted-foreground hover:text-foreground",children:(0,t.jsx)(f,{className:"h-4 w-4"})})]}),(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-3",children:[(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsx)(k.J,{className:"text-xs text-muted-foreground",children:"提供商"}),(0,t.jsxs)("select",{value:n,onChange:e=>{l(e.target.value),p({phase:"idle"})},className:"w-full h-9 rounded-md border border-input bg-white dark:bg-zinc-800 px-3 text-sm focus:outline-none focus:ring-1 focus:ring-ring",children:[(0,t.jsx)("option",{value:"",children:"选择提供商…"}),A.map(([e,s])=>(0,t.jsx)("option",{value:e,children:s.name},e))]})]}),(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsx)(k.J,{className:"text-xs text-muted-foreground",children:"API Key"}),(0,t.jsx)(N.p,{type:"password",value:i,onChange:e=>{c(e.target.value),p({phase:"idle"})},onKeyDown:e=>"Enter"===e.key&&z(),placeholder:n?O[n]?.placeholder??"API Key":"先选择提供商",className:"font-mono text-sm",disabled:!n})]})]}),"idle"!==x.phase&&(0,t.jsxs)("div",{className:(0,E.cn)("flex items-center gap-2 rounded-lg px-3 py-2 text-sm","testing"===x.phase?"bg-secondary":"ok"===x.phase?"bg-[#57BE6B]/10 text-[#57BE6B]":"bg-red-50 dark:bg-red-900/20 text-red-600 dark:text-red-400"),children:["testing"===x.phase&&(0,t.jsx)(d.A,{className:"h-4 w-4 animate-spin"}),"ok"===x.phase&&(0,t.jsx)(o.A,{className:"h-4 w-4"}),"err"===x.phase&&(0,t.jsx)(f,{className:"h-4 w-4"}),(0,t.jsxs)("span",{children:["testing"===x.phase&&"测试连通性中…","ok"===x.phase&&`连接成功 (${x.ms}ms) — 点击「确认添加」保存`,"err"===x.phase&&`连接失败: ${x.msg}`]})]}),(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsxs)(y.$,{variant:"outline",className:"flex-1 gap-1.5",disabled:!n||!i.trim()||"testing"===x.phase,onClick:z,children:["testing"===x.phase?(0,t.jsx)(d.A,{className:"h-3.5 w-3.5 animate-spin"}):(0,t.jsx)(j.A,{className:"h-3.5 w-3.5"}),"测试连通性"]}),"ok"===x.phase&&(0,t.jsxs)(y.$,{className:"flex-1 gap-1.5 bg-[#57BE6B] hover:bg-[#4aaa5d]",onClick:T,children:[(0,t.jsx)(o.A,{className:"h-3.5 w-3.5"}),"确认添加"]})]})]})]})}},78447:(e,s,a)=>{"use strict";a.d(s,{E:()=>i});var t=a(45512);a(58009);var r=a(21643),n=a(44195);let l=(0,r.F)("inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground",secondary:"border-transparent bg-secondary text-secondary-foreground",destructive:"border-transparent bg-destructive text-destructive-foreground",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function i({className:e,variant:s,...a}){return(0,t.jsx)("div",{className:(0,n.cn)(l({variant:s}),e),...a})}},39400:(e,s,a)=>{"use strict";a.d(s,{$:()=>o});var t=a(45512),r=a(58009),n=a(12705),l=a(21643),i=a(44195);let d=(0,l.F)("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),o=r.forwardRef(({className:e,variant:s,size:a,asChild:r=!1,...l},o)=>{let c=r?n.DX:"button";return(0,t.jsx)(c,{className:(0,i.cn)(d({variant:s,size:a,className:e})),ref:o,...l})});o.displayName="Button"},43264:(e,s,a)=>{"use strict";a.d(s,{Cf:()=>m,Es:()=>u,L3:()=>h,c7:()=>p,lG:()=>d,rr:()=>g});var t=a(45512),r=a(58009),n=a(27553),l=a(44269),i=a(44195);let d=n.bL;n.l9;let o=n.ZL,c=n.bm,x=r.forwardRef(({className:e,...s},a)=>(0,t.jsx)(n.hJ,{ref:a,className:(0,i.cn)("fixed inset-0 z-50 bg-black/60 backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...s}));x.displayName=n.hJ.displayName;let m=r.forwardRef(({className:e,children:s,...a},r)=>(0,t.jsxs)(o,{children:[(0,t.jsx)(x,{}),(0,t.jsxs)(n.UC,{ref:r,className:(0,i.cn)("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 rounded-lg",e),...a,children:[s,(0,t.jsx)(c,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring disabled:pointer-events-none",children:(0,t.jsx)(l.A,{className:"h-4 w-4"})})]})]}));m.displayName=n.UC.displayName;let p=({className:e,...s})=>(0,t.jsx)("div",{className:(0,i.cn)("flex flex-col space-y-1.5 text-center sm:text-left",e),...s});p.displayName="DialogHeader";let u=({className:e,...s})=>(0,t.jsx)("div",{className:(0,i.cn)("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...s});u.displayName="DialogFooter";let h=r.forwardRef(({className:e,...s},a)=>(0,t.jsx)(n.hE,{ref:a,className:(0,i.cn)("text-lg font-semibold leading-none tracking-tight",e),...s}));h.displayName=n.hE.displayName;let g=r.forwardRef(({className:e,...s},a)=>(0,t.jsx)(n.VY,{ref:a,className:(0,i.cn)("text-sm text-muted-foreground",e),...s}));g.displayName=n.VY.displayName},77722:(e,s,a)=>{"use strict";a.d(s,{p:()=>l});var t=a(45512),r=a(58009),n=a(44195);let l=r.forwardRef(({className:e,type:s,...a},r)=>(0,t.jsx)("input",{type:s,className:(0,n.cn)("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",e),ref:r,...a}));l.displayName="Input"},52628:(e,s,a)=>{"use strict";a.d(s,{J:()=>i});var t=a(45512),r=a(58009),n=a(92405),l=a(44195);let i=r.forwardRef(({className:e,...s},a)=>(0,t.jsx)(n.b,{ref:a,className:(0,l.cn)("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",e),...s}));i.displayName=n.b.displayName},93732:(e,s,a)=>{"use strict";a.d(s,{bq:()=>x,eb:()=>p,gC:()=>m,l6:()=>o,yv:()=>c});var t=a(45512),r=a(58009),n=a(16091),l=a(98755),i=a(24849),d=a(44195);let o=n.bL;n.YJ;let c=n.WT,x=r.forwardRef(({className:e,children:s,...a},r)=>(0,t.jsxs)(n.l9,{ref:r,className:(0,d.cn)("flex h-9 w-full items-center justify-between rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50",e),...a,children:[s,(0,t.jsx)(n.In,{asChild:!0,children:(0,t.jsx)(l.A,{className:"h-4 w-4 opacity-50"})})]}));x.displayName=n.l9.displayName;let m=r.forwardRef(({className:e,children:s,position:a="popper",...r},l)=>(0,t.jsx)(n.ZL,{children:(0,t.jsx)(n.UC,{ref:l,className:(0,d.cn)("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-white dark:bg-zinc-800 text-foreground shadow-xl animate-in fade-in-0 zoom-in-95","popper"===a&&"translate-y-1",e),position:a,...r,children:(0,t.jsx)(n.LM,{className:(0,d.cn)("p-1","popper"===a&&"w-full min-w-[var(--radix-select-trigger-width)]"),children:s})})}));m.displayName=n.UC.displayName;let p=r.forwardRef(({className:e,children:s,...a},r)=>(0,t.jsxs)(n.q7,{ref:r,className:(0,d.cn)("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...a,children:[(0,t.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,t.jsx)(n.VF,{children:(0,t.jsx)(i.A,{className:"h-4 w-4"})})}),(0,t.jsx)(n.p4,{children:s})]}));p.displayName=n.q7.displayName,r.forwardRef(({className:e,...s},a)=>(0,t.jsx)(n.JU,{ref:a,className:(0,d.cn)("py-1.5 pl-8 pr-2 text-xs font-semibold",e),...s})).displayName=n.JU.displayName,r.forwardRef(({className:e,...s},a)=>(0,t.jsx)(n.wv,{ref:a,className:(0,d.cn)("-mx-1 my-1 h-px bg-muted",e),...s})).displayName=n.wv.displayName},28712:(e,s,a)=>{"use strict";a.d(s,{d:()=>i});var t=a(45512),r=a(58009),n=a(84969),l=a(44195);let i=r.forwardRef(({className:e,...s},a)=>(0,t.jsx)(n.bL,{className:(0,l.cn)("peer inline-flex h-[22px] w-10 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent","transition-colors duration-200","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2","disabled:cursor-not-allowed disabled:opacity-50","data-[state=unchecked]:bg-zinc-300 dark:data-[state=unchecked]:bg-zinc-600","data-[state=checked]:bg-[#57BE6B]",e),...s,ref:a,children:(0,t.jsx)(n.zi,{className:(0,l.cn)("pointer-events-none block h-[16px] w-[16px] rounded-full bg-white shadow-md ring-0","transition-transform duration-200","data-[state=checked]:translate-x-[18px] data-[state=unchecked]:translate-x-0")})}));i.displayName=n.bL.displayName},17524:(e,s,a)=>{"use strict";a.d(s,{Xi:()=>o,av:()=>c,j7:()=>d,tU:()=>i});var t=a(45512),r=a(58009),n=a(93607),l=a(44195);let i=n.bL,d=r.forwardRef(({className:e,...s},a)=>(0,t.jsx)(n.B8,{ref:a,className:(0,l.cn)("inline-flex h-9 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground",e),...s}));d.displayName=n.B8.displayName;let o=r.forwardRef(({className:e,...s},a)=>(0,t.jsx)(n.l9,{ref:a,className:(0,l.cn)("inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow",e),...s}));o.displayName=n.l9.displayName;let c=r.forwardRef(({className:e,...s},a)=>(0,t.jsx)(n.UC,{ref:a,className:(0,l.cn)("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",e),...s}));c.displayName=n.UC.displayName},75002:(e,s,a)=>{"use strict";a.d(s,{T:()=>l});var t=a(45512),r=a(58009),n=a(44195);let l=r.forwardRef(({className:e,...s},a)=>(0,t.jsx)("textarea",{className:(0,n.cn)("flex min-h-[60px] w-full rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",e),ref:a,...s}));l.displayName="Textarea"},28660:(e,s,a)=>{"use strict";a.r(s),a.d(s,{default:()=>t});let t=(0,a(46760).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/Users/duan/files/pi-web/digital-agent-platform/src/app/[locale]/settings/page.tsx\" from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"/Users/duan/files/pi-web/digital-agent-platform/src/app/[locale]/settings/page.tsx","default")}};var s=require("../../../webpack-runtime.js");s.C(e);var a=e=>s(s.s=e),t=s.X(0,[5994,8403,5051,763,1285,9251],()=>a(33989));module.exports=t})();
|
|
1
|
+
(()=>{var e={};e.id=2455,e.ids=[2455],e.modules={10846:e=>{"use strict";e.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},19121:e=>{"use strict";e.exports=require("next/dist/server/app-render/action-async-storage.external.js")},3295:e=>{"use strict";e.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},29294:e=>{"use strict";e.exports=require("next/dist/server/app-render/work-async-storage.external.js")},63033:e=>{"use strict";e.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},33873:e=>{"use strict";e.exports=require("path")},33989:(e,s,a)=>{"use strict";a.r(s),a.d(s,{GlobalError:()=>n.a,__next_app__:()=>x,pages:()=>o,routeModule:()=>m,tree:()=>c});var t=a(70260),r=a(28203),l=a(25155),n=a.n(l),i=a(67292),d={};for(let e in i)0>["default","tree","pages","GlobalError","__next_app__","routeModule"].indexOf(e)&&(d[e]=()=>i[e]);a.d(s,d);let c=["",{children:["[locale]",{children:["settings",{children:["__PAGE__",{},{page:[()=>Promise.resolve().then(a.bind(a,28660)),"/Users/duan/files/pi-web/digital-agent-platform/src/app/[locale]/settings/page.tsx"]}]},{}]},{layout:[()=>Promise.resolve().then(a.bind(a,51341)),"/Users/duan/files/pi-web/digital-agent-platform/src/app/[locale]/layout.tsx"]}]},{layout:[()=>Promise.resolve().then(a.bind(a,71354)),"/Users/duan/files/pi-web/digital-agent-platform/src/app/layout.tsx"],"not-found":[()=>Promise.resolve().then(a.t.bind(a,19937,23)),"next/dist/client/components/not-found-error"],forbidden:[()=>Promise.resolve().then(a.t.bind(a,69116,23)),"next/dist/client/components/forbidden-error"],unauthorized:[()=>Promise.resolve().then(a.t.bind(a,41485,23)),"next/dist/client/components/unauthorized-error"]}],o=["/Users/duan/files/pi-web/digital-agent-platform/src/app/[locale]/settings/page.tsx"],x={require:a,loadChunk:()=>Promise.resolve()},m=new t.AppPageRouteModule({definition:{kind:r.RouteKind.APP_PAGE,page:"/[locale]/settings/page",pathname:"/[locale]/settings",bundlePath:"",filename:"",appPaths:[]},userland:{loaderTree:c}})},40363:(e,s,a)=>{Promise.resolve().then(a.bind(a,28660))},16387:(e,s,a)=>{Promise.resolve().then(a.bind(a,51890))},42163:(e,s,a)=>{"use strict";a.d(s,{A:()=>t});let t=(0,a(41680).A)("ExternalLink",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]])},86235:(e,s,a)=>{"use strict";a.d(s,{A:()=>t});let t=(0,a(41680).A)("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]])},18741:(e,s,a)=>{"use strict";a.d(s,{A:()=>t});let t=(0,a(41680).A)("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]])},49656:(e,s,a)=>{"use strict";a.d(s,{A:()=>t});let t=(0,a(41680).A)("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]])},51890:(e,s,a)=>{"use strict";a.r(s),a.d(s,{default:()=>D});var t=a(45512),r=a(58009),l=a(29362),n=a(3371),i=a(79334),d=a(86235),c=a(24849),o=a(41680);let x=(0,o.A)("Save",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]);var m=a(18741),h=a(98755),p=a(99905),u=a(49656);let g=(0,o.A)("EyeOff",[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]),v=(0,o.A)("Eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]),j=(0,o.A)("CircleX",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);var y=a(92557),b=a(20169),N=a(39400),f=a(77722),k=a(52628),w=a(28712),C=a(17524),S=a(93732),A=a(78447),K=a(44195),E=a(16873),T=a(42163);let P=(0,o.A)("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]);var $=a(75002),z=a(43264);function B({enabledSkills:e,onChange:s}){let[a,l]=(0,r.useState)([]),[n,i]=(0,r.useState)(!1),[c,o]=(0,r.useState)(!1),x=(0,r.useCallback)(()=>{i(!0),fetch("/api/skills").then(e=>e.json()).then(l).finally(()=>i(!1))},[]),h=async a=>{await fetch(`/api/skills/${encodeURIComponent(a)}`,{method:"DELETE"}),l(e=>e.filter(e=>e.name!==a)),s&&e&&s(e.filter(e=>e!==a))};return(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("div",{className:"text-sm text-muted-foreground",children:["已安装 ",(0,t.jsx)("span",{className:"font-medium text-foreground",children:a.length})," 个 Skill"]}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsxs)(N.$,{variant:"ghost",size:"sm",onClick:x,disabled:n,className:"gap-1.5 h-8",children:[(0,t.jsx)(y.A,{className:(0,K.cn)("h-3.5 w-3.5",n&&"animate-spin")}),"刷新"]}),(0,t.jsxs)(N.$,{variant:"outline",size:"sm",onClick:()=>o(!0),className:"gap-1.5 h-8",children:[(0,t.jsx)(m.A,{className:"h-3.5 w-3.5"}),"安装 Skill"]})]})]}),n?(0,t.jsxs)("div",{className:"flex items-center justify-center py-10 text-muted-foreground text-sm",children:[(0,t.jsx)(d.A,{className:"h-4 w-4 animate-spin mr-2"}),"加载中…"]}):0===a.length?(0,t.jsxs)("div",{className:"rounded-xl border border-dashed p-10 text-center text-sm text-muted-foreground",children:[(0,t.jsx)("p",{className:"mb-2",children:"还没有安装任何 Skill"}),(0,t.jsxs)(N.$,{variant:"outline",size:"sm",onClick:()=>o(!0),className:"gap-1.5",children:[(0,t.jsx)(m.A,{className:"h-3.5 w-3.5"}),"安装第一个 Skill"]})]}):(0,t.jsx)("div",{className:"space-y-2",children:a.map(e=>(0,t.jsxs)("div",{className:"group flex items-start gap-3 rounded-xl border p-3.5 hover:bg-secondary/20 transition-colors",children:[(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 flex-wrap",children:[(0,t.jsx)("span",{className:"font-mono text-sm font-medium",children:e.name}),e.hasSetup&&(0,t.jsx)(A.E,{variant:"outline",className:"text-[10px] h-4 px-1.5 font-normal",children:"含 Setup"})]}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground mt-1 line-clamp-2",children:e.description||"暂无描述"}),(0,t.jsx)("p",{className:"text-[10px] text-muted-foreground/60 mt-0.5 font-mono truncate",children:e.filePath})]}),(0,t.jsx)("button",{type:"button",onClick:()=>h(e.name),title:"卸载",className:"opacity-0 group-hover:opacity-100 p-1.5 rounded-lg text-muted-foreground hover:text-destructive hover:bg-destructive/10 transition-all shrink-0",children:(0,t.jsx)(u.A,{className:"h-4 w-4"})})]},e.name))}),(0,t.jsx)(I,{open:c,onClose:()=>o(!1),onInstalled:x,installed:a})]})}function I({open:e,onClose:s,onInstalled:a,installed:l}){let n=new Set(l.map(e=>e.name)),[i,o]=(0,r.useState)("search"),[x,m]=(0,r.useState)(""),[h,p]=(0,r.useState)([]),[u,g]=(0,r.useState)(!1),[v,y]=(0,r.useState)(""),[b,w]=(0,r.useState)(null),[S,B]=(0,r.useState)({}),[I,M]=(0,r.useState)(""),[J,D]=(0,r.useState)(""),[O,L]=(0,r.useState)(""),[U,_]=(0,r.useState)("idle"),[q,R]=(0,r.useState)("");(0,r.useRef)(null),(0,r.useCallback)(async e=>{if(!e.trim()){p([]);return}g(!0),y("");try{let s=await fetch("/api/skills/search",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({query:e.trim(),limit:30})}),a=await s.json();if(!s.ok)throw Error(a.error??`HTTP ${s.status}`);p(a.results??[])}catch(e){y(String(e)),p([])}finally{g(!1)}},[]);let V=async e=>{w(e);try{let s=await fetch("/api/skills/install",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({package:e})}),t=await s.json();if(!s.ok||!t.success)throw Error(t.error??"安装失败");B(s=>({...s,[e]:"ok"})),a()}catch(s){B(s=>({...s,[e]:"err"})),console.error(s)}finally{w(null)}},F=async()=>{_("loading"),R("");try{let e="url"===i?{url:I.trim()}:{content:J.trim(),name:O.trim()},t=await fetch("/api/skills",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),r=await t.json();if(!t.ok)throw Error(r.error??"安装失败");_("ok"),a(),setTimeout(()=>{s(),G()},1200)}catch(e){_("err"),R(String(e))}},G=()=>{m(""),p([]),y(""),M(""),D(""),L(""),_("idle"),R(""),B({})};return(0,t.jsx)(z.lG,{open:e,onOpenChange:e=>{e||(s(),G())},children:(0,t.jsxs)(z.Cf,{className:"max-w-xl max-h-[85vh] flex flex-col",children:[(0,t.jsx)(z.c7,{children:(0,t.jsx)(z.L3,{children:"安装 Skill"})}),(0,t.jsxs)(C.tU,{value:i,onValueChange:e=>o(e),className:"flex-1 flex flex-col min-h-0",children:[(0,t.jsxs)(C.j7,{className:"shrink-0",children:[(0,t.jsx)(C.Xi,{value:"search",children:"\uD83D\uDD0D 社区搜索"}),(0,t.jsx)(C.Xi,{value:"url",children:"\uD83D\uDD17 URL 安装"}),(0,t.jsx)(C.Xi,{value:"paste",children:"\uD83D\uDCCB 粘贴内容"})]}),(0,t.jsxs)(C.av,{value:"search",className:"flex-1 flex flex-col min-h-0 space-y-3 mt-3",children:[(0,t.jsxs)("div",{className:"relative shrink-0",children:[(0,t.jsx)(E.A,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"}),(0,t.jsx)(f.p,{value:x,onChange:e=>m(e.target.value),placeholder:"搜索社区 Skills,例如:web search、pdf、code review…",className:"pl-9",autoFocus:!0})]}),(0,t.jsxs)("div",{className:"flex-1 overflow-y-auto min-h-0 space-y-1.5 pr-1",children:[u&&(0,t.jsxs)("div",{className:"flex items-center justify-center py-12 text-muted-foreground text-sm",children:[(0,t.jsx)(d.A,{className:"h-4 w-4 animate-spin mr-2"}),"搜索中…"]}),!u&&v&&(0,t.jsx)("div",{className:"py-8 text-center text-sm text-destructive",children:v}),!u&&!v&&x&&0===h.length&&(0,t.jsxs)("div",{className:"py-8 text-center text-sm text-muted-foreground",children:["未找到「",x,"」相关 Skill"]}),!u&&!v&&!x&&(0,t.jsxs)("div",{className:"py-8 text-center text-sm text-muted-foreground",children:["输入关键词搜索 ",(0,t.jsx)("a",{href:"https://skills.sh",target:"_blank",rel:"noopener noreferrer",className:"underline",children:"skills.sh"})," 社区 Skills"]}),h.map(e=>{let s=S[e.package],a=b===e.package,r=n.has(e.name);return(0,t.jsxs)("div",{className:(0,K.cn)("flex items-start gap-3 rounded-xl border p-3 transition-colors",r?"bg-[#57BE6B]/5 border-[#57BE6B]/30":"hover:bg-secondary/30"),children:[(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 flex-wrap",children:[(0,t.jsx)("span",{className:"font-mono text-sm font-medium",children:e.name}),r&&(0,t.jsx)(A.E,{className:"text-[10px] h-4 px-1.5 bg-[#57BE6B]/15 text-[#57BE6B] border-0 font-normal",children:"已安装"}),e.installs>0&&(0,t.jsxs)("span",{className:"text-[10px] text-muted-foreground bg-secondary px-1.5 py-0.5 rounded",children:["↓ ",e.installsDisplay]})]}),(0,t.jsx)("p",{className:"text-[11px] font-mono text-muted-foreground/70 mt-0.5",children:e.package}),(0,t.jsxs)("a",{href:e.url,target:"_blank",rel:"noopener noreferrer",className:"text-[10px] text-blue-500 hover:underline flex items-center gap-0.5 mt-0.5 w-fit",children:[(0,t.jsx)(T.A,{className:"h-2.5 w-2.5"}),"查看详情"]})]}),r?(0,t.jsxs)("div",{className:"flex items-center gap-1 h-7 px-2 text-xs text-[#57BE6B] shrink-0",children:[(0,t.jsx)(c.A,{className:"h-3.5 w-3.5"}),"已安装"]}):(0,t.jsx)(N.$,{size:"sm",variant:"ok"===s?"ghost":"outline",className:(0,K.cn)("h-7 text-xs shrink-0 gap-1 min-w-[56px]","ok"===s&&"text-green-600 dark:text-green-400"),disabled:a||"ok"===s,onClick:()=>V(e.package),children:a?(0,t.jsx)(d.A,{className:"h-3 w-3 animate-spin"}):"ok"===s?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(c.A,{className:"h-3 w-3"}),"已装"]}):"err"===s?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(j,{className:"h-3 w-3 text-destructive"}),"失败"]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(P,{className:"h-3 w-3"}),"安装"]})})]},e.package)})]})]}),(0,t.jsxs)(C.av,{value:"url",className:"space-y-3 mt-3",children:[(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsx)(k.J,{className:"text-xs text-muted-foreground",children:"SKILL.md 的原始 URL"}),(0,t.jsx)(f.p,{value:I,onChange:e=>M(e.target.value),placeholder:"https://raw.githubusercontent.com/user/repo/main/skill/SKILL.md",className:"font-mono text-sm"}),(0,t.jsx)("p",{className:"text-[11px] text-muted-foreground",children:"支持 GitHub raw 链接或任意可访问的 markdown 地址"})]}),"ok"===U&&(0,t.jsxs)("p",{className:"text-sm text-green-600 flex items-center gap-1",children:[(0,t.jsx)(c.A,{className:"h-4 w-4"}),"安装成功!"]}),"err"===U&&(0,t.jsxs)("p",{className:"text-sm text-destructive flex items-center gap-1",children:[(0,t.jsx)(j,{className:"h-4 w-4"}),q]}),(0,t.jsxs)(z.Es,{children:[(0,t.jsx)(N.$,{variant:"outline",onClick:()=>{s(),G()},children:"取消"}),(0,t.jsxs)(N.$,{onClick:F,disabled:"loading"===U||!I.trim(),children:["loading"===U&&(0,t.jsx)(d.A,{className:"mr-2 h-4 w-4 animate-spin"}),"安装"]})]})]}),(0,t.jsxs)(C.av,{value:"paste",className:"space-y-3 mt-3",children:[(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsx)(k.J,{className:"text-xs text-muted-foreground",children:"Skill 名称(slug)"}),(0,t.jsx)(f.p,{value:O,onChange:e=>L(e.target.value),placeholder:"my-skill",className:"font-mono text-sm"})]}),(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsx)(k.J,{className:"text-xs text-muted-foreground",children:"SKILL.md 内容"}),(0,t.jsx)($.T,{value:J,onChange:e=>D(e.target.value),placeholder:"---\nname: my-skill\ndescription: 描述这个 skill 的用途\n---\n\n# My Skill\n\n...",rows:8,className:"font-mono text-xs"})]}),"ok"===U&&(0,t.jsxs)("p",{className:"text-sm text-green-600 flex items-center gap-1",children:[(0,t.jsx)(c.A,{className:"h-4 w-4"}),"安装成功!"]}),"err"===U&&(0,t.jsxs)("p",{className:"text-sm text-destructive flex items-center gap-1",children:[(0,t.jsx)(j,{className:"h-4 w-4"}),q]}),(0,t.jsxs)(z.Es,{children:[(0,t.jsx)(N.$,{variant:"outline",onClick:()=>{s(),G()},children:"取消"}),(0,t.jsxs)(N.$,{onClick:F,disabled:"loading"===U||!J.trim(),children:["loading"===U&&(0,t.jsx)(d.A,{className:"mr-2 h-4 w-4 animate-spin"}),"安装"]})]})]})]})]})})}var M=a(31091);let J=[{value:"anthropic-messages",label:"Anthropic Messages"},{value:"openai-responses",label:"OpenAI Responses"},{value:"openai-completions",label:"OpenAI Completions (Legacy)"},{value:"google-generative-ai",label:"Google Generative AI"},{value:"bedrock-converse-stream",label:"AWS Bedrock Converse"}];function D(){let e=(0,l.useTranslations)("settings"),s=(0,l.useTranslations)("common"),{theme:a,setTheme:o}=(0,n.D)(),h=(0,l.useLocale)(),p=(0,i.useRouter)(),u=(0,i.usePathname)(),[g,v]=(0,r.useState)({}),[j,y]=(0,r.useState)({providers:{}}),[b,w]=(0,r.useState)({currentProvider:"openai",providers:{}}),[A,K]=(0,r.useState)("idle"),E=(0,r.useCallback)(async()=>{K("saving"),await fetch("/api/models-config",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({auth:g,modelsConfig:j})}),await fetch("/api/voice-provider",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(b)}),K("saved"),setTimeout(()=>K("idle"),2500),await fetch("/api/models"),(0,M.Pi)()},[g,j,b]);return(0,t.jsxs)("div",{className:"p-6 max-w-3xl mx-auto",children:[(0,t.jsxs)("div",{className:"mb-6 flex items-center justify-between p-4 rounded-xl bg-white dark:bg-slate-800/50 backdrop-blur-sm border border-gray-200 dark:border-slate-700/50 neo-card",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("h1",{className:"text-2xl font-bold text-gray-900 dark:bg-gradient-to-r dark:from-cyan-400 dark:to-blue-400 dark:bg-clip-text dark:text-transparent",children:e("title")}),(0,t.jsx)("p",{className:"text-sm text-gray-700 dark:text-gray-400 mt-1",children:e("subtitle")})]}),(0,t.jsxs)(N.$,{onClick:E,disabled:"saving"===A,className:"neo-button gap-2 bg-gradient-to-r from-blue-500 to-indigo-500 dark:from-cyan-600 dark:to-blue-600 hover:from-blue-600 hover:to-indigo-600 dark:hover:from-cyan-500 dark:hover:to-blue-500 text-white border-0 shadow-lg hover:shadow-blue-500/30 dark:hover:shadow-cyan-500/50 transition-all duration-200 hover:scale-105",children:["saving"===A?(0,t.jsx)(d.A,{className:"h-4 w-4 animate-spin"}):"saved"===A?(0,t.jsx)(c.A,{className:"h-4 w-4"}):(0,t.jsx)(x,{className:"h-4 w-4"}),"saving"===A?"保存中…":"saved"===A?"已保存":s("save")]})]}),(0,t.jsxs)(C.tU,{defaultValue:"providers",children:[(0,t.jsxs)(C.j7,{className:"mb-6 neo-card bg-gray-50 dark:bg-slate-800/50 backdrop-blur-sm border border-gray-200 dark:border-slate-700/50 p-1",children:[(0,t.jsx)(C.Xi,{value:"providers",className:"data-[state=active]:neo-card-inset data-[state=active]:bg-blue-100 data-[state=active]:text-blue-700 dark:data-[state=active]:bg-gradient-to-r dark:data-[state=active]:from-cyan-600 dark:data-[state=active]:to-blue-600 dark:data-[state=active]:text-white hover:bg-gray-100 dark:hover:bg-slate-700/50 transition-all duration-200",children:"内置提供商"}),(0,t.jsx)(C.Xi,{value:"custom",className:"data-[state=active]:neo-card-inset data-[state=active]:bg-blue-100 data-[state=active]:text-blue-700 dark:data-[state=active]:bg-gradient-to-r dark:data-[state=active]:from-cyan-600 dark:data-[state=active]:to-blue-600 dark:data-[state=active]:text-white hover:bg-gray-100 dark:hover:bg-slate-700/50 transition-all duration-200",children:"自定义提供商"}),(0,t.jsx)(C.Xi,{value:"voice",className:"data-[state=active]:neo-card-inset data-[state=active]:bg-blue-100 data-[state=active]:text-blue-700 dark:data-[state=active]:bg-gradient-to-r dark:data-[state=active]:from-cyan-600 dark:data-[state=active]:to-blue-600 dark:data-[state=active]:text-white hover:bg-gray-100 dark:hover:bg-slate-700/50 transition-all duration-200",children:"语音供应商"}),(0,t.jsx)(C.Xi,{value:"envvars",className:"data-[state=active]:neo-card-inset data-[state=active]:bg-blue-100 data-[state=active]:text-blue-700 dark:data-[state=active]:bg-gradient-to-r dark:data-[state=active]:from-cyan-600 dark:data-[state=active]:to-blue-600 dark:data-[state=active]:text-white hover:bg-gray-100 dark:hover:bg-slate-700/50 transition-all duration-200",children:"环境变量"}),(0,t.jsx)(C.Xi,{value:"skills",className:"data-[state=active]:neo-card-inset data-[state=active]:bg-blue-100 data-[state=active]:text-blue-700 dark:data-[state=active]:bg-gradient-to-r dark:data-[state=active]:from-cyan-600 dark:data-[state=active]:to-blue-600 dark:data-[state=active]:text-white hover:bg-gray-100 dark:hover:bg-slate-700/50 transition-all duration-200",children:"Skills 管理"}),(0,t.jsx)(C.Xi,{value:"appearance",className:"data-[state=active]:neo-card-inset data-[state=active]:bg-blue-100 data-[state=active]:text-blue-700 dark:data-[state=active]:bg-gradient-to-r dark:data-[state=active]:from-cyan-600 dark:data-[state=active]:to-blue-600 dark:data-[state=active]:text-white hover:bg-gray-100 dark:hover:bg-slate-700/50 transition-all duration-200",children:"外观 & 语言"})]}),(0,t.jsx)(C.av,{value:"providers",className:"space-y-4",children:(0,t.jsx)(q,{apiKeys:g,onKeysChange:v,onSave:E})}),(0,t.jsxs)(C.av,{value:"custom",className:"space-y-4",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsx)("div",{children:(0,t.jsxs)("p",{className:"text-sm text-muted-foreground",children:["添加兼容 OpenAI / Anthropic API 的自定义提供商。配置存储在"," ",(0,t.jsx)("code",{className:"font-mono text-xs bg-secondary px-1 rounded",children:"~/.pi/agent/models.json"}),"。"]})}),(0,t.jsxs)(N.$,{variant:"outline",size:"sm",className:"neo-button hover:scale-105 transition-transform",onClick:()=>{let e=`custom-provider-${Date.now()}`;y(s=>({providers:{...s.providers,[e]:{baseUrl:"",api:"openai-completions",apiKey:"",models:[]}}}))},children:[(0,t.jsx)(m.A,{className:"mr-2 h-4 w-4"}),"添加提供商"]})]}),0===Object.keys(j.providers).length?(0,t.jsx)("div",{className:"rounded-lg border border-dashed p-8 text-center text-muted-foreground text-sm",children:"暂无自定义提供商。点击「添加提供商」创建一个。"}):(0,t.jsx)("div",{className:"space-y-4",children:Object.entries(j.providers).map(([e,s])=>(0,t.jsx)(O,{name:e,provider:s,onChange:s=>y(a=>({providers:{...a.providers,[e]:s}})),onRename:s=>{s!==e&&s&&y(a=>{let{[e]:t,...r}=a.providers;return{providers:{...r,[s]:t}}})},onDelete:()=>y(s=>{let{[e]:a,...t}=s.providers;return{providers:t}})},e))})]}),(0,t.jsxs)(C.av,{value:"voice",className:"space-y-4",children:[(0,t.jsx)("div",{className:"mb-4",children:(0,t.jsxs)("p",{className:"text-sm text-muted-foreground",children:["选择一个语音供应商并配置API密钥,全局生效。配置存储在"," ",(0,t.jsx)("code",{className:"font-mono text-xs bg-secondary px-1 rounded",children:"~/.pi/agent/voice-provider.json"}),"。"]})}),(0,t.jsxs)("div",{className:"neo-card p-4 bg-white dark:bg-slate-800/50 rounded-xl",children:[(0,t.jsx)(k.J,{className:"text-sm font-medium text-gray-700 dark:text-gray-300 mb-2 block",children:"当前语音供应商"}),(0,t.jsxs)(S.l6,{value:b.currentProvider,onValueChange:e=>w(s=>({...s,currentProvider:e})),children:[(0,t.jsx)(S.bq,{className:"neo-card-inset",children:(0,t.jsx)(S.yv,{})}),(0,t.jsxs)(S.gC,{children:[(0,t.jsx)(S.eb,{value:"openai",children:"OpenAI TTS"}),(0,t.jsx)(S.eb,{value:"aliyun",children:"阿里云语音合成"}),(0,t.jsx)(S.eb,{value:"tencent",children:"腾讯云TTS"}),(0,t.jsx)(S.eb,{value:"baidu",children:"百度语音合成"})]})]})]}),"openai"===b.currentProvider&&(0,t.jsxs)("div",{className:"neo-card p-4 bg-white dark:bg-slate-800/50 rounded-xl space-y-3",children:[(0,t.jsx)("h3",{className:"text-sm font-medium text-gray-700 dark:text-gray-300",children:"OpenAI TTS 配置"}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(k.J,{className:"text-xs",children:"API Key"}),(0,t.jsx)(f.p,{type:"password",placeholder:"sk-...",value:b.providers.openai?.apiKey||"",onChange:e=>w(s=>({...s,providers:{...s.providers,openai:{...s.providers.openai,apiKey:e.target.value}}}))})]})]}),"aliyun"===b.currentProvider&&(0,t.jsxs)("div",{className:"neo-card p-4 bg-white dark:bg-slate-800/50 rounded-xl space-y-3",children:[(0,t.jsx)("h3",{className:"text-sm font-medium text-gray-700 dark:text-gray-300",children:"阿里云配置"}),(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-3",children:[(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(k.J,{className:"text-xs",children:"AppKey"}),(0,t.jsx)(f.p,{placeholder:"...",value:b.providers.aliyun?.appKey||"",onChange:e=>w(s=>({...s,providers:{...s.providers,aliyun:{...s.providers.aliyun,appKey:e.target.value,accessKeyId:s.providers.aliyun?.accessKeyId||"",accessKeySecret:s.providers.aliyun?.accessKeySecret||""}}}))})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(k.J,{className:"text-xs",children:"Access Key ID"}),(0,t.jsx)(f.p,{type:"password",placeholder:"...",value:b.providers.aliyun?.accessKeyId||"",onChange:e=>w(s=>({...s,providers:{...s.providers,aliyun:{...s.providers.aliyun,appKey:s.providers.aliyun?.appKey||"",accessKeyId:e.target.value,accessKeySecret:s.providers.aliyun?.accessKeySecret||""}}}))})]}),(0,t.jsxs)("div",{className:"space-y-2 col-span-2",children:[(0,t.jsx)(k.J,{className:"text-xs",children:"Access Key Secret"}),(0,t.jsx)(f.p,{type:"password",placeholder:"...",value:b.providers.aliyun?.accessKeySecret||"",onChange:e=>w(s=>({...s,providers:{...s.providers,aliyun:{...s.providers.aliyun,appKey:s.providers.aliyun?.appKey||"",accessKeyId:s.providers.aliyun?.accessKeyId||"",accessKeySecret:e.target.value}}}))})]})]})]}),"tencent"===b.currentProvider&&(0,t.jsxs)("div",{className:"neo-card p-4 bg-white dark:bg-slate-800/50 rounded-xl space-y-3",children:[(0,t.jsx)("h3",{className:"text-sm font-medium text-gray-700 dark:text-gray-300",children:"腾讯云配置"}),(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-3",children:[(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(k.J,{className:"text-xs",children:"Secret ID"}),(0,t.jsx)(f.p,{type:"password",placeholder:"AKID...",value:b.providers.tencent?.secretId||"",onChange:e=>w(s=>({...s,providers:{...s.providers,tencent:{...s.providers.tencent,secretId:e.target.value,secretKey:s.providers.tencent?.secretKey||""}}}))})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(k.J,{className:"text-xs",children:"Secret Key"}),(0,t.jsx)(f.p,{type:"password",placeholder:"...",value:b.providers.tencent?.secretKey||"",onChange:e=>w(s=>({...s,providers:{...s.providers,tencent:{...s.providers.tencent,secretId:s.providers.tencent?.secretId||"",secretKey:e.target.value}}}))})]})]})]}),"baidu"===b.currentProvider&&(0,t.jsxs)("div",{className:"neo-card p-4 bg-white dark:bg-slate-800/50 rounded-xl space-y-3",children:[(0,t.jsx)("h3",{className:"text-sm font-medium text-gray-700 dark:text-gray-300",children:"百度配置"}),(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-3",children:[(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(k.J,{className:"text-xs",children:"API Key"}),(0,t.jsx)(f.p,{type:"password",placeholder:"...",value:b.providers.baidu?.apiKey||"",onChange:e=>w(s=>({...s,providers:{...s.providers,baidu:{...s.providers.baidu,apiKey:e.target.value,secretKey:s.providers.baidu?.secretKey||""}}}))})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(k.J,{className:"text-xs",children:"Secret Key"}),(0,t.jsx)(f.p,{type:"password",placeholder:"...",value:b.providers.baidu?.secretKey||"",onChange:e=>w(s=>({...s,providers:{...s.providers,baidu:{...s.providers.baidu,apiKey:s.providers.baidu?.apiKey||"",secretKey:e.target.value}}}))})]})]})]})]}),(0,t.jsx)(C.av,{value:"envvars",children:(0,t.jsx)(U,{})}),(0,t.jsxs)(C.av,{value:"skills",className:"space-y-2",children:[(0,t.jsx)("div",{className:"mb-4",children:(0,t.jsxs)("p",{className:"text-sm text-muted-foreground",children:["安装、卸载 Skills。Skills 存储在"," ",(0,t.jsx)("code",{className:"font-mono text-xs bg-secondary px-1 rounded",children:"~/.pi/agent/skills/"}),", 对所有数字人共享。在数字人配置中可按需启用/禁用。"]})}),(0,t.jsx)(B,{})]}),(0,t.jsxs)(C.av,{value:"appearance",className:"space-y-6",children:[(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsx)(k.J,{children:e("theme")}),(0,t.jsxs)(S.l6,{value:a,onValueChange:o,children:[(0,t.jsx)(S.bq,{className:"w-48",children:(0,t.jsx)(S.yv,{})}),(0,t.jsxs)(S.gC,{children:[(0,t.jsx)(S.eb,{value:"light",children:e("themeLight")}),(0,t.jsx)(S.eb,{value:"dark",children:e("themeDark")}),(0,t.jsx)(S.eb,{value:"system",children:e("themeSystem")})]})]})]}),(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsx)(k.J,{children:e("language")}),(0,t.jsxs)(S.l6,{value:h,onValueChange:e=>{p.push(u.replace(/^\/(zh|en)/,`/${e}`))},children:[(0,t.jsx)(S.bq,{className:"w-48",children:(0,t.jsx)(S.yv,{})}),(0,t.jsxs)(S.gC,{children:[(0,t.jsx)(S.eb,{value:"zh",children:"中文"}),(0,t.jsx)(S.eb,{value:"en",children:"English"})]})]})]})]})]})]})}function O({name:e,provider:s,onChange:a,onRename:l,onDelete:n}){let[i,d]=(0,r.useState)(!0),[o,x]=(0,r.useState)(e),[y,b]=(0,r.useState)(!1),[w,C]=(0,r.useState)({phase:"idle"}),E=(e,t)=>a({...s,[e]:t}),T=async a=>{C({phase:"testing"});try{let t=await fetch("/api/models-config/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerName:e,provider:s,model:a})}),r=await t.json();r.ok?C({phase:"success",latencyMs:r.latencyMs,responseText:r.responseText}):C({phase:"error",message:r.error,latencyMs:r.latencyMs})}catch(e){C({phase:"error",message:String(e)})}},P=(e,a,t)=>{let r=[...s.models??[]];r[e]={...r[e],[a]:t},E("models",r)},$=e=>{let a=[...s.models??[]];a.splice(e,1),E("models",a)};return(0,t.jsxs)("div",{className:"rounded-xl border bg-card overflow-hidden",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 px-4 py-3 cursor-pointer hover:bg-secondary/30 transition-colors",onClick:()=>d(!i),children:[i?(0,t.jsx)(h.A,{className:"h-4 w-4 text-muted-foreground"}):(0,t.jsx)(p.A,{className:"h-4 w-4 text-muted-foreground"}),(0,t.jsx)("span",{className:"font-mono text-sm font-medium flex-1 truncate",children:e}),(0,t.jsx)(A.E,{variant:"outline",className:"text-xs",children:s.api??"—"}),(0,t.jsxs)(A.E,{variant:"secondary",className:"text-xs",children:[s.models?.length??0," models"]}),(0,t.jsx)("button",{type:"button",onClick:e=>{e.stopPropagation(),n()},className:"ml-1 text-muted-foreground hover:text-destructive transition-colors",children:(0,t.jsx)(u.A,{className:"h-4 w-4"})})]}),i&&(0,t.jsxs)("div",{className:"px-4 pb-4 space-y-4 border-t",children:[(0,t.jsxs)("div",{className:"pt-4 space-y-1.5",children:[(0,t.jsx)(k.J,{className:"text-xs text-muted-foreground uppercase tracking-wider",children:"提供商名称(唯一标识)"}),(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsx)(f.p,{value:o,onChange:e=>x(e.target.value),className:"font-mono text-sm",placeholder:"my-custom-provider"}),o!==e&&o.trim()&&(0,t.jsx)(N.$,{size:"sm",onClick:()=>l(o.trim()),children:"重命名"})]})]}),(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsx)(k.J,{className:"text-xs text-muted-foreground uppercase tracking-wider",children:"Base URL"}),(0,t.jsx)(f.p,{value:s.baseUrl??"",onChange:e=>E("baseUrl",e.target.value||void 0),placeholder:"https://api.example.com/v1",className:"font-mono text-sm"})]}),(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsx)(k.J,{className:"text-xs text-muted-foreground uppercase tracking-wider",children:"API 协议"}),(0,t.jsxs)(S.l6,{value:s.api??"openai-completions",onValueChange:e=>E("api",e),children:[(0,t.jsx)(S.bq,{children:(0,t.jsx)(S.yv,{})}),(0,t.jsx)(S.gC,{children:J.map(e=>(0,t.jsx)(S.eb,{value:e.value,children:e.label},e.value))})]})]})]}),(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsx)(k.J,{className:"text-xs text-muted-foreground uppercase tracking-wider",children:"API Key"}),(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)(f.p,{type:y?"text":"password",value:s.apiKey??"",onChange:e=>E("apiKey",e.target.value||void 0),placeholder:"ENV_VAR_NAME, !shell-command, 或直接填写密钥",className:"pr-10 font-mono text-sm"}),(0,t.jsx)("button",{type:"button",onClick:()=>b(!y),className:"absolute right-2.5 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground",children:y?(0,t.jsx)(g,{className:"h-4 w-4"}):(0,t.jsx)(v,{className:"h-4 w-4"})})]}),(0,t.jsxs)("p",{className:"text-[11px] text-muted-foreground",children:["前缀 ",(0,t.jsx)("code",{className:"font-mono",children:"!"})," 运行 Shell 命令,或填写环境变量名(自动读取)"]})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsx)(k.J,{className:"text-xs text-muted-foreground uppercase tracking-wider",children:"模型列表"}),(0,t.jsxs)(N.$,{variant:"ghost",size:"sm",onClick:()=>{E("models",[...s.models??[],{id:"",name:"",contextWindow:128e3,maxTokens:4096,input:["text","image"],reasoning:!1,cost:{input:0,output:0}}])},className:"h-7 text-xs",children:[(0,t.jsx)(m.A,{className:"mr-1 h-3 w-3"}),"添加模型"]})]}),0===(s.models??[]).length?(0,t.jsx)("p",{className:"text-sm text-muted-foreground text-center py-4 border border-dashed rounded-lg",children:"暂无模型,点击「添加模型」"}):(0,t.jsx)("div",{className:"space-y-3",children:(s.models??[]).map((e,s)=>(0,t.jsx)(L,{model:e,onUpdate:(e,a)=>P(s,e,a),onDelete:()=>$(s),onTest:()=>T(e),testState:w},s))})]}),"idle"!==w.phase&&"testing"!==w.phase&&(0,t.jsxs)("div",{className:(0,K.cn)("flex items-start gap-2 rounded-lg px-3 py-2 text-sm","success"===w.phase?"bg-green-50 dark:bg-green-900/20 text-green-700 dark:text-green-400":"bg-red-50 dark:bg-red-900/20 text-red-700 dark:text-red-400"),children:["success"===w.phase?(0,t.jsx)(c.A,{className:"h-4 w-4 mt-0.5 shrink-0"}):(0,t.jsx)(j,{className:"h-4 w-4 mt-0.5 shrink-0"}),(0,t.jsx)("div",{children:"success"===w.phase?`连接成功 (${w.latencyMs}ms)${w.responseText?` — "${w.responseText}"`:""}`:`连接失败: ${w.message}${w.latencyMs?` (${w.latencyMs}ms)`:""}`}),(0,t.jsx)("button",{onClick:()=>C({phase:"idle"}),className:"ml-auto text-current opacity-50 hover:opacity-100",children:(0,t.jsx)(j,{className:"h-3 w-3"})})]})]})]})}function L({model:e,onUpdate:s,onDelete:a,onTest:r,testState:l}){let n="testing"===l.phase;return(0,t.jsxs)("div",{className:"rounded-lg border bg-secondary/20 p-3 space-y-3",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsxs)("div",{className:"flex-1 min-w-0 grid grid-cols-2 gap-2",children:[(0,t.jsx)(f.p,{value:e.id,onChange:e=>s("id",e.target.value),placeholder:"model-id(如 gpt-4o)",className:"font-mono text-xs h-8"}),(0,t.jsx)(f.p,{value:e.name??"",onChange:e=>s("name",e.target.value||void 0),placeholder:"显示名称(可选)",className:"text-xs h-8"})]}),(0,t.jsxs)(N.$,{variant:"ghost",size:"sm",onClick:r,disabled:!e.id||n,className:"h-8 text-xs shrink-0 gap-1",title:"测试连接",children:[n?(0,t.jsx)(d.A,{className:"h-3 w-3 animate-spin"}):(0,t.jsx)(y.A,{className:"h-3 w-3"}),"测试"]}),(0,t.jsx)("button",{type:"button",onClick:a,className:"text-muted-foreground hover:text-destructive transition-colors",children:(0,t.jsx)(u.A,{className:"h-4 w-4"})})]}),(0,t.jsxs)("div",{className:"grid grid-cols-3 gap-2",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(k.J,{className:"text-[10px] text-muted-foreground",children:"Context Window"}),(0,t.jsx)(f.p,{type:"number",value:e.contextWindow??128e3,onChange:e=>s("contextWindow",Number(e.target.value)),className:"text-xs h-7 mt-0.5"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(k.J,{className:"text-[10px] text-muted-foreground",children:"Max Output Tokens"}),(0,t.jsx)(f.p,{type:"number",value:e.maxTokens??4096,onChange:e=>s("maxTokens",Number(e.target.value)),className:"text-xs h-7 mt-0.5"})]}),(0,t.jsx)("div",{className:"flex flex-col justify-end",children:(0,t.jsxs)("div",{className:"flex items-center gap-2 h-7",children:[(0,t.jsx)(w.d,{id:`reasoning-${e.id}`,checked:e.reasoning??!1,onCheckedChange:e=>s("reasoning",e),className:"scale-75"}),(0,t.jsx)(k.J,{htmlFor:`reasoning-${e.id}`,className:"text-[11px] cursor-pointer",children:"支持 Thinking"})]})})]}),(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-2",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(k.J,{className:"text-[10px] text-muted-foreground",children:"输入价格 ($/1M tokens)"}),(0,t.jsx)(f.p,{type:"number",step:"0.01",value:e.cost?.input??0,onChange:a=>s("cost",{...e.cost,input:Number(a.target.value)}),className:"text-xs h-7 mt-0.5"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)(k.J,{className:"text-[10px] text-muted-foreground",children:"输出价格 ($/1M tokens)"}),(0,t.jsx)(f.p,{type:"number",step:"0.01",value:e.cost?.output??0,onChange:a=>s("cost",{...e.cost,output:Number(a.target.value)}),className:"text-xs h-7 mt-0.5"})]})]})]})}function U(){let[e,s]=(0,r.useState)({}),[a,l]=(0,r.useState)(!0),[n,i]=(0,r.useState)(""),[o,x]=(0,r.useState)(""),[h,p]=(0,r.useState)(null),[g,v]=(0,r.useState)(""),[k,w]=(0,r.useState)(""),[C,S]=(0,r.useState)(null),[A,E]=(0,r.useState)(null),[T,P]=(0,r.useState)(!1),[$,z]=(0,r.useState)({}),B=(0,r.useCallback)(()=>{l(!0),fetch("/api/env-vars",{cache:"no-store"}).then(e=>e.json()).then(e=>{s(e),l(!1)}).catch(()=>l(!1))},[]),I=async(e=n,s=o)=>{if(w(""),!e.trim()){w("变量名不能为空");return}let a=await fetch("/api/env-vars",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({key:e.trim(),value:s})}),t=await a.json();if(!a.ok){w(t.error??"保存失败");return}e===n&&(i(""),x("")),S(e.trim()),setTimeout(()=>S(null),2500),B(),E(null)},M=async e=>{await fetch(`/api/env-vars/${encodeURIComponent(e)}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({value:g})}),p(null),S(e),setTimeout(()=>S(null),2500),B()},J=async e=>{await fetch(`/api/env-vars/${encodeURIComponent(e)}`,{method:"DELETE"}),B(),E(null)},D=async()=>{P(!0),E(await fetch("/api/env-vars/scan").then(e=>e.json())),z({}),P(!1)},O=async e=>{await I(e,$[e]??""),z(s=>{let a={...s};return delete a[e],a}),setTimeout(D,300)},L=Object.entries(e).sort(([e],[s])=>e.localeCompare(s)),U=A?.summary.filter(e=>!e.stored)??[];return(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)("div",{className:"flex items-start gap-3 rounded-xl border border-zinc-200 dark:border-zinc-700 bg-zinc-50 dark:bg-zinc-800/50 p-4",children:[(0,t.jsx)(b.A,{className:"h-5 w-5 text-zinc-500 shrink-0 mt-0.5"}),(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsx)("p",{className:"text-sm font-medium",children:"全局环境变量"}),(0,t.jsxs)("p",{className:"text-xs text-muted-foreground mt-0.5",children:["存于 ",(0,t.jsx)("code",{className:"font-mono bg-zinc-100 dark:bg-zinc-800 px-1 rounded",children:"~/.digital-agents/env.json"}),", Bash 工具执行时自动注入。"]})]}),(0,t.jsxs)(N.$,{size:"sm",variant:"outline",onClick:D,disabled:T,className:"gap-1.5 shrink-0",children:[T?(0,t.jsx)(d.A,{className:"h-3.5 w-3.5 animate-spin"}):(0,t.jsx)(y.A,{className:"h-3.5 w-3.5"}),"扫描 Skill 变量"]})]}),A&&(0,t.jsxs)("div",{className:"rounded-xl border overflow-hidden",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between px-4 py-3 border-b bg-secondary/30",children:[(0,t.jsx)("p",{className:"text-xs font-semibold uppercase tracking-wider text-muted-foreground",children:"Skill 引用的环境变量"}),(0,t.jsx)("button",{type:"button",onClick:()=>E(null),className:"text-muted-foreground hover:text-foreground text-xs",children:"关闭"})]}),(0,t.jsx)("div",{className:"p-3 space-y-2",children:0===A.summary.length?(0,t.jsx)("p",{className:"text-sm text-muted-foreground text-center py-4",children:"未发现 Skill 引用的环境变量"}):A.summary.map(e=>(0,t.jsxs)("div",{className:(0,K.cn)("flex items-center gap-2 rounded-lg border px-3 py-2.5 transition-all",e.stored?"border-[#57BE6B]/40 bg-[#57BE6B]/8 dark:bg-[#57BE6B]/10":"border-amber-300 dark:border-amber-700 bg-amber-50/50 dark:bg-amber-900/10"),children:[e.stored?(0,t.jsx)(c.A,{className:"h-4 w-4 text-[#57BE6B] shrink-0"}):(0,t.jsx)("span",{className:"h-4 w-4 rounded-full border-2 border-amber-400 shrink-0 flex items-center justify-center",children:(0,t.jsx)("span",{className:"h-1.5 w-1.5 rounded-full bg-amber-400"})}),(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsx)("code",{className:"text-xs font-mono font-semibold",children:e.name}),(0,t.jsxs)("p",{className:"text-[10px] text-muted-foreground mt-0.5",children:["引用于:",e.skills.join("、")]})]}),e.stored?(0,t.jsx)("span",{className:"text-[10px] text-[#57BE6B] shrink-0",children:"已配置"}):(0,t.jsxs)("div",{className:"flex items-center gap-1.5 shrink-0",children:[(0,t.jsx)(f.p,{value:$[e.name]??"",onChange:s=>z(a=>({...a,[e.name]:s.target.value})),onKeyDown:s=>"Enter"===s.key&&O(e.name),placeholder:"输入值...",className:"h-7 w-36 text-xs font-mono"}),(0,t.jsxs)(N.$,{size:"sm",className:"h-7 px-2 text-xs gap-1",onClick:()=>O(e.name),children:[(0,t.jsx)(m.A,{className:"h-3 w-3"}),"添加"]})]})]},e.name))}),U.length>0&&(0,t.jsx)("div",{className:"px-4 py-2.5 border-t bg-amber-50/30 dark:bg-amber-900/10",children:(0,t.jsxs)("p",{className:"text-xs text-amber-600 dark:text-amber-400",children:["⚠️ ",U.length," 个变量尚未配置 — 相关 Skill 执行时可能报错"]})})]}),(0,t.jsxs)("div",{className:"rounded-xl border p-4 space-y-3",children:[(0,t.jsx)("p",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wider",children:"手动添加变量"}),(0,t.jsxs)("div",{className:"flex gap-2 items-start",children:[(0,t.jsx)(f.p,{value:n,onChange:e=>{i(e.target.value),w("")},onKeyDown:e=>"Enter"===e.key&&I(),placeholder:"VARIABLE_NAME",className:"font-mono text-sm flex-1"}),(0,t.jsx)("span",{className:"text-muted-foreground pt-2 text-sm shrink-0",children:"="}),(0,t.jsx)(f.p,{value:o,onChange:e=>x(e.target.value),onKeyDown:e=>"Enter"===e.key&&I(),placeholder:"value",className:"font-mono text-sm flex-1"}),(0,t.jsxs)(N.$,{size:"sm",onClick:()=>I(),className:"gap-1.5 shrink-0",children:[(0,t.jsx)(m.A,{className:"h-3.5 w-3.5"}),"添加"]})]}),k&&(0,t.jsx)("p",{className:"text-xs text-destructive",children:k})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("p",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wider",children:["已配置 (",L.length,")"]}),L.length>0&&(0,t.jsx)("button",{type:"button",onClick:async()=>{confirm("确认清空所有环境变量?")&&(await fetch("/api/env-vars",{method:"DELETE"}),B(),E(null))},className:"text-xs text-destructive hover:underline",children:"清空全部"})]}),a?(0,t.jsxs)("div",{className:"flex items-center justify-center py-8 text-muted-foreground text-sm",children:[(0,t.jsx)(d.A,{className:"h-4 w-4 animate-spin mr-2"}),"加载中…"]}):0===L.length?(0,t.jsx)("div",{className:"rounded-lg border border-dashed p-8 text-center text-sm text-muted-foreground",children:"暂无环境变量。点击「扫描 Skill 变量」自动发现 Skill 所需的变量名,或手动添加。"}):L.map(([e,s])=>(0,t.jsxs)("div",{className:(0,K.cn)("group flex items-center gap-2 rounded-lg border px-3 py-2.5 transition-all",C===e?"border-[#57BE6B]/60 bg-[#57BE6B]/10":"border-border hover:border-zinc-300 dark:hover:border-zinc-600"),children:[(0,t.jsx)("code",{className:"text-xs font-mono font-semibold shrink-0 min-w-[140px] truncate",children:e}),(0,t.jsx)("span",{className:"text-muted-foreground text-xs shrink-0",children:"="}),h===e?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(f.p,{value:g,onChange:e=>v(e.target.value),onKeyDown:s=>{"Enter"===s.key&&M(e),"Escape"===s.key&&p(null)},className:"h-7 text-xs font-mono flex-1",autoFocus:!0}),(0,t.jsx)(N.$,{size:"sm",variant:"ghost",className:"h-7 px-2 text-[#57BE6B]",onClick:()=>M(e),children:(0,t.jsx)(c.A,{className:"h-3.5 w-3.5"})}),(0,t.jsx)(N.$,{size:"sm",variant:"ghost",className:"h-7 px-2",onClick:()=>p(null),children:(0,t.jsx)(j,{className:"h-3.5 w-3.5"})})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:"text-xs font-mono text-muted-foreground flex-1 truncate cursor-pointer hover:text-foreground",onClick:()=>{p(e),v(s)},title:s||"(空)",children:s||(0,t.jsx)("em",{className:"opacity-40 not-italic",children:"(空)"})}),C===e&&(0,t.jsx)("span",{className:"text-[10px] text-[#57BE6B] shrink-0",children:"已保存"}),(0,t.jsx)("button",{type:"button",className:"opacity-0 group-hover:opacity-100 text-muted-foreground hover:text-foreground transition-all",onClick:()=>{p(e),v(s)},title:"编辑",children:(0,t.jsx)(y.A,{className:"h-3.5 w-3.5"})}),(0,t.jsx)("button",{type:"button",className:"opacity-0 group-hover:opacity-100 text-muted-foreground hover:text-destructive transition-all",onClick:()=>J(e),title:"删除",children:(0,t.jsx)(u.A,{className:"h-3.5 w-3.5"})})]})]},e))]})]})}let _={anthropic:{name:"Anthropic",placeholder:"sk-ant-api03-...",color:"bg-orange-50 dark:bg-orange-900/20 border-orange-200 dark:border-orange-800"},openai:{name:"OpenAI",placeholder:"sk-proj-...",color:"bg-green-50 dark:bg-green-900/20 border-green-200 dark:border-green-800"},google:{name:"Google AI",placeholder:"AIzaSy...",color:"bg-blue-50 dark:bg-blue-900/20 border-blue-200 dark:border-blue-800"},groq:{name:"Groq",placeholder:"gsk_...",color:"bg-purple-50 dark:bg-purple-900/20 border-purple-200 dark:border-purple-800"},deepseek:{name:"DeepSeek",placeholder:"sk-...",color:"bg-cyan-50 dark:bg-cyan-900/20 border-cyan-200 dark:border-cyan-800"},xai:{name:"xAI (Grok)",placeholder:"xai-...",color:"bg-zinc-50 dark:bg-zinc-800/50 border-zinc-200 dark:border-zinc-700"},mistral:{name:"Mistral",placeholder:"...",color:"bg-yellow-50 dark:bg-yellow-900/20 border-yellow-200 dark:border-yellow-800"}};function q({apiKeys:e,onKeysChange:s,onSave:a}){let[l,n]=(0,r.useState)(""),[i,o]=(0,r.useState)(""),[x,h]=(0,r.useState)({phase:"idle"}),[p,g]=(0,r.useState)(!1),[v,b]=(0,r.useState)(null),[w,C]=(0,r.useState)(""),S=Object.entries(e).filter(([,e])=>e&&""!==e.trim()),A=Object.entries(_).filter(([s])=>!e[s]),E=async(e,s)=>{h({phase:"testing"});try{let a=await fetch("/api/auth-config/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:e,key:s})}),t=await a.json();t.ok?h({phase:"ok",ms:t.latencyMs}):h({phase:"err",msg:t.error??`HTTP ${t.status}`})}catch(e){h({phase:"err",msg:String(e)})}},T=async()=>{l&&i.trim()&&await E(l,i.trim())},P=async()=>{s({...e,[l]:i.trim()}),await a(),n(""),o(""),h({phase:"idle"}),g(!1)},$=async t=>{s({...e,[t]:""}),await a()},z=async t=>{s({...e,[t]:w.trim()}),await a(),b(null),C("")};return(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"text-sm font-medium",children:"LLM 提供商"}),(0,t.jsxs)("p",{className:"text-xs text-muted-foreground mt-0.5",children:["密钥存储于 ",(0,t.jsx)("code",{className:"font-mono bg-secondary px-1 rounded",children:"~/.pi/agent/auth.json"})]})]}),!p&&(0,t.jsxs)(N.$,{variant:"outline",size:"sm",onClick:()=>g(!0),className:"gap-1.5",disabled:0===A.length,children:[(0,t.jsx)(m.A,{className:"h-3.5 w-3.5"}),"添加提供商"]})]}),0===S.length&&!p&&(0,t.jsx)("div",{className:"rounded-xl border border-dashed p-8 text-center text-sm text-muted-foreground",children:"还没有配置任何 LLM 提供商。点击「添加提供商」开始配置。"}),(0,t.jsx)("div",{className:"space-y-2",children:S.map(([e,s])=>{let a=_[e],r=v===e;return(0,t.jsxs)("div",{className:(0,K.cn)("group flex items-center gap-3 rounded-xl border p-3.5 transition-all",a?.color??""),children:[(0,t.jsxs)("div",{className:"w-28 shrink-0",children:[(0,t.jsx)("p",{className:"text-sm font-medium",children:a?.name??e}),(0,t.jsx)("p",{className:"text-[11px] text-muted-foreground font-mono",children:e})]}),r?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(f.p,{type:"password",value:w,onChange:e=>C(e.target.value),onKeyDown:s=>{"Enter"===s.key&&z(e),"Escape"===s.key&&b(null)},placeholder:a?.placeholder??"API Key",className:"flex-1 font-mono text-xs h-8",autoFocus:!0}),(0,t.jsxs)(N.$,{size:"sm",className:"h-7 px-2 gap-1 text-xs",onClick:()=>z(e),children:[(0,t.jsx)(c.A,{className:"h-3 w-3"}),"保存"]}),(0,t.jsx)(N.$,{size:"sm",variant:"ghost",className:"h-7 px-2",onClick:()=>b(null),children:(0,t.jsx)(j,{className:"h-3.5 w-3.5"})})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:"flex-1 font-mono text-xs text-muted-foreground",children:s.startsWith("***")?s:"••••••••"+s.slice(-4)}),(0,t.jsxs)("div",{className:"flex gap-1 opacity-0 group-hover:opacity-100 transition-opacity",children:[(0,t.jsx)(N.$,{size:"sm",variant:"ghost",className:"h-7 px-2 text-xs",onClick:()=>{b(e),C(s.startsWith("***")?"":s)},children:"编辑"}),(0,t.jsx)(N.$,{size:"sm",variant:"ghost",className:"h-7 px-2 text-destructive hover:text-destructive",onClick:()=>$(e),children:(0,t.jsx)(u.A,{className:"h-3.5 w-3.5"})})]})]})]},e)})}),p&&(0,t.jsxs)("div",{className:"rounded-xl border-2 border-dashed border-[#57BE6B]/50 p-4 space-y-4",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsx)("p",{className:"text-sm font-semibold",children:"添加提供商"}),(0,t.jsx)("button",{type:"button",onClick:()=>{g(!1),h({phase:"idle"}),o(""),n("")},className:"text-muted-foreground hover:text-foreground",children:(0,t.jsx)(j,{className:"h-4 w-4"})})]}),(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-3",children:[(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsx)(k.J,{className:"text-xs text-muted-foreground",children:"提供商"}),(0,t.jsxs)("select",{value:l,onChange:e=>{n(e.target.value),h({phase:"idle"})},className:"w-full h-9 rounded-md border border-input bg-white dark:bg-zinc-800 px-3 text-sm focus:outline-none focus:ring-1 focus:ring-ring",children:[(0,t.jsx)("option",{value:"",children:"选择提供商…"}),A.map(([e,s])=>(0,t.jsx)("option",{value:e,children:s.name},e))]})]}),(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsx)(k.J,{className:"text-xs text-muted-foreground",children:"API Key"}),(0,t.jsx)(f.p,{type:"password",value:i,onChange:e=>{o(e.target.value),h({phase:"idle"})},onKeyDown:e=>"Enter"===e.key&&T(),placeholder:l?_[l]?.placeholder??"API Key":"先选择提供商",className:"font-mono text-sm",disabled:!l})]})]}),"idle"!==x.phase&&(0,t.jsxs)("div",{className:(0,K.cn)("flex items-center gap-2 rounded-lg px-3 py-2 text-sm","testing"===x.phase?"bg-secondary":"ok"===x.phase?"bg-[#57BE6B]/10 text-[#57BE6B]":"bg-red-50 dark:bg-red-900/20 text-red-600 dark:text-red-400"),children:["testing"===x.phase&&(0,t.jsx)(d.A,{className:"h-4 w-4 animate-spin"}),"ok"===x.phase&&(0,t.jsx)(c.A,{className:"h-4 w-4"}),"err"===x.phase&&(0,t.jsx)(j,{className:"h-4 w-4"}),(0,t.jsxs)("span",{children:["testing"===x.phase&&"测试连通性中…","ok"===x.phase&&`连接成功 (${x.ms}ms) — 点击「确认添加」保存`,"err"===x.phase&&`连接失败: ${x.msg}`]})]}),(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsxs)(N.$,{variant:"outline",className:"flex-1 gap-1.5",disabled:!l||!i.trim()||"testing"===x.phase,onClick:T,children:["testing"===x.phase?(0,t.jsx)(d.A,{className:"h-3.5 w-3.5 animate-spin"}):(0,t.jsx)(y.A,{className:"h-3.5 w-3.5"}),"测试连通性"]}),"ok"===x.phase&&(0,t.jsxs)(N.$,{className:"flex-1 gap-1.5 bg-[#57BE6B] hover:bg-[#4aaa5d]",onClick:P,children:[(0,t.jsx)(c.A,{className:"h-3.5 w-3.5"}),"确认添加"]})]})]})]})}},28660:(e,s,a)=>{"use strict";a.r(s),a.d(s,{default:()=>t});let t=(0,a(46760).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/Users/duan/files/pi-web/digital-agent-platform/src/app/[locale]/settings/page.tsx\" from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"/Users/duan/files/pi-web/digital-agent-platform/src/app/[locale]/settings/page.tsx","default")}};var s=require("../../../webpack-runtime.js");s.C(e);var a=e=>s(s.s=e),t=s.X(0,[5994,8403,5051,763,7555,9251,1354],()=>a(33989));module.exports=t})();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":1,"files":["../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js","../../../../../node_modules/next/dist/server/app-render/action-async-storage-instance.js","../../../../../node_modules/next/dist/server/app-render/action-async-storage.external.js","../../../../../node_modules/next/dist/server/app-render/after-task-async-storage-instance.js","../../../../../node_modules/next/dist/server/app-render/after-task-async-storage.external.js","../../../../../node_modules/next/dist/server/app-render/async-local-storage.js","../../../../../node_modules/next/dist/server/app-render/clean-async-snapshot-instance.js","../../../../../node_modules/next/dist/server/app-render/clean-async-snapshot.external.js","../../../../../node_modules/next/dist/server/app-render/work-async-storage-instance.js","../../../../../node_modules/next/dist/server/app-render/work-async-storage.external.js","../../../../../node_modules/next/dist/server/app-render/work-unit-async-storage-instance.js","../../../../../node_modules/next/dist/server/app-render/work-unit-async-storage.external.js","../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../node_modules/next/package.json","../../../../package.json","../../../chunks/
|
|
1
|
+
{"version":1,"files":["../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js","../../../../../node_modules/next/dist/server/app-render/action-async-storage-instance.js","../../../../../node_modules/next/dist/server/app-render/action-async-storage.external.js","../../../../../node_modules/next/dist/server/app-render/after-task-async-storage-instance.js","../../../../../node_modules/next/dist/server/app-render/after-task-async-storage.external.js","../../../../../node_modules/next/dist/server/app-render/async-local-storage.js","../../../../../node_modules/next/dist/server/app-render/clean-async-snapshot-instance.js","../../../../../node_modules/next/dist/server/app-render/clean-async-snapshot.external.js","../../../../../node_modules/next/dist/server/app-render/work-async-storage-instance.js","../../../../../node_modules/next/dist/server/app-render/work-async-storage.external.js","../../../../../node_modules/next/dist/server/app-render/work-unit-async-storage-instance.js","../../../../../node_modules/next/dist/server/app-render/work-unit-async-storage.external.js","../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../node_modules/next/package.json","../../../../package.json","../../../chunks/1354.js","../../../chunks/2961.js","../../../chunks/5051.js","../../../chunks/5994.js","../../../chunks/7368.js","../../../chunks/7555.js","../../../chunks/763.js","../../../chunks/8403.js","../../../chunks/9251.js","../../../webpack-runtime.js","page_client-reference-manifest.js"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
globalThis.__RSC_MANIFEST=(globalThis.__RSC_MANIFEST||{});globalThis.__RSC_MANIFEST["/[locale]/settings/page"]={"moduleLoading":{"prefix":"/_next/","crossOrigin":null},"ssrModuleMapping":{"260":{"*":{"id":"52124","name":"*","chunks":[],"async":false}},"1594":{"*":{"id":"12362","name":"*","chunks":[],"async":false}},"1724":{"*":{"id":"48157","name":"*","chunks":[],"async":false}},"2328":{"*":{"id":"57174","name":"*","chunks":[],"async":false}},"3866":{"*":{"id":"87190","name":"*","chunks":[],"async":false}},"3893":{"*":{"id":"48726","name":"*","chunks":[],"async":false}},"3927":{"*":{"id":"77413","name":"*","chunks":[],"async":false}},"4547":{"*":{"id":"33875","name":"*","chunks":[],"async":false}},"4835":{"*":{"id":"88903","name":"*","chunks":[],"async":false}},"4988":{"*":{"id":"20502","name":"*","chunks":[],"async":false}},"5244":{"*":{"id":"84178","name":"*","chunks":[],"async":false}},"6037":{"*":{"id":"87531","name":"*","chunks":[],"async":false}},"6213":{"*":{"id":"61365","name":"*","chunks":[],"async":false}},"7033":{"*":{"id":"66959","name":"*","chunks":[],"async":false}},"9789":{"*":{"id":"51890","name":"*","chunks":[],"async":false}},"9981":{"*":{"id":"12392","name":"*","chunks":[],"async":false}}},"edgeSSRModuleMapping":{},"clientModules":{"/Users/duan/files/pi-web/digital-agent-platform/node_modules/next/dist/client/components/client-page.js":{"id":7033,"name":"*","chunks":[],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/node_modules/next/dist/esm/client/components/client-page.js":{"id":7033,"name":"*","chunks":[],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/node_modules/next/dist/client/components/client-segment.js":{"id":4547,"name":"*","chunks":[],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/node_modules/next/dist/esm/client/components/client-segment.js":{"id":4547,"name":"*","chunks":[],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/node_modules/next/dist/client/components/error-boundary.js":{"id":4835,"name":"*","chunks":[],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/node_modules/next/dist/esm/client/components/error-boundary.js":{"id":4835,"name":"*","chunks":[],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/node_modules/next/dist/client/components/http-access-fallback/error-boundary.js":{"id":2328,"name":"*","chunks":[],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/node_modules/next/dist/esm/client/components/http-access-fallback/error-boundary.js":{"id":2328,"name":"*","chunks":[],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/node_modules/next/dist/client/components/layout-router.js":{"id":5244,"name":"*","chunks":[],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/node_modules/next/dist/esm/client/components/layout-router.js":{"id":5244,"name":"*","chunks":[],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/node_modules/next/dist/client/components/render-from-template-context.js":{"id":3866,"name":"*","chunks":[],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/node_modules/next/dist/esm/client/components/render-from-template-context.js":{"id":3866,"name":"*","chunks":[],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/node_modules/next/dist/lib/metadata/metadata-boundary.js":{"id":6213,"name":"*","chunks":[],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/node_modules/next/dist/esm/lib/metadata/metadata-boundary.js":{"id":6213,"name":"*","chunks":[],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/src/app/globals.css":{"id":347,"name":"*","chunks":["7177","static/chunks/app/layout-4af7a40b1f262149.js"],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/node_modules/next-intl/dist/esm/shared/NextIntlClientProvider.js":{"id":9981,"name":"*","chunks":["8313","static/chunks/8313-cd4e4ad40e185f1c.js","1868","static/chunks/1868-9f3e42aa5a6ea9d2.js","8173","static/chunks/8173-6258ed62b7084bda.js","7200","static/chunks/7200-c9c613d1b11207fb.js","8450","static/chunks/app/%5Blocale%5D/layout-48d759d6db5dd8ae.js"],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/node_modules/next/font/google/target.css?{\"path\":\"src/app/[locale]/layout.tsx\",\"import\":\"Inter\",\"arguments\":[{\"subsets\":[\"latin\"]}],\"variableName\":\"inter\"}":{"id":3127,"name":"*","chunks":["8313","static/chunks/8313-cd4e4ad40e185f1c.js","1868","static/chunks/1868-9f3e42aa5a6ea9d2.js","8173","static/chunks/8173-6258ed62b7084bda.js","7200","static/chunks/7200-c9c613d1b11207fb.js","8450","static/chunks/app/%5Blocale%5D/layout-48d759d6db5dd8ae.js"],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/src/components/layout/sidebar.tsx":{"id":4988,"name":"*","chunks":["8313","static/chunks/8313-cd4e4ad40e185f1c.js","1868","static/chunks/1868-9f3e42aa5a6ea9d2.js","8173","static/chunks/8173-6258ed62b7084bda.js","7200","static/chunks/7200-c9c613d1b11207fb.js","8450","static/chunks/app/%5Blocale%5D/layout-48d759d6db5dd8ae.js"],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/src/components/providers.tsx":{"id":1724,"name":"*","chunks":["8313","static/chunks/8313-cd4e4ad40e185f1c.js","1868","static/chunks/1868-9f3e42aa5a6ea9d2.js","8173","static/chunks/8173-6258ed62b7084bda.js","7200","static/chunks/7200-c9c613d1b11207fb.js","8450","static/chunks/app/%5Blocale%5D/layout-48d759d6db5dd8ae.js"],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/src/app/[locale]/agents/[id]/
|
|
1
|
+
globalThis.__RSC_MANIFEST=(globalThis.__RSC_MANIFEST||{});globalThis.__RSC_MANIFEST["/[locale]/settings/page"]={"moduleLoading":{"prefix":"/_next/","crossOrigin":null},"ssrModuleMapping":{"260":{"*":{"id":"52124","name":"*","chunks":[],"async":false}},"1594":{"*":{"id":"12362","name":"*","chunks":[],"async":false}},"1724":{"*":{"id":"48157","name":"*","chunks":[],"async":false}},"2328":{"*":{"id":"57174","name":"*","chunks":[],"async":false}},"3866":{"*":{"id":"87190","name":"*","chunks":[],"async":false}},"3893":{"*":{"id":"48726","name":"*","chunks":[],"async":false}},"3927":{"*":{"id":"77413","name":"*","chunks":[],"async":false}},"4547":{"*":{"id":"33875","name":"*","chunks":[],"async":false}},"4835":{"*":{"id":"88903","name":"*","chunks":[],"async":false}},"4988":{"*":{"id":"20502","name":"*","chunks":[],"async":false}},"5244":{"*":{"id":"84178","name":"*","chunks":[],"async":false}},"6037":{"*":{"id":"87531","name":"*","chunks":[],"async":false}},"6213":{"*":{"id":"61365","name":"*","chunks":[],"async":false}},"7033":{"*":{"id":"66959","name":"*","chunks":[],"async":false}},"9789":{"*":{"id":"51890","name":"*","chunks":[],"async":false}},"9981":{"*":{"id":"12392","name":"*","chunks":[],"async":false}}},"edgeSSRModuleMapping":{},"clientModules":{"/Users/duan/files/pi-web/digital-agent-platform/node_modules/next/dist/client/components/client-page.js":{"id":7033,"name":"*","chunks":[],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/node_modules/next/dist/esm/client/components/client-page.js":{"id":7033,"name":"*","chunks":[],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/node_modules/next/dist/client/components/client-segment.js":{"id":4547,"name":"*","chunks":[],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/node_modules/next/dist/esm/client/components/client-segment.js":{"id":4547,"name":"*","chunks":[],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/node_modules/next/dist/client/components/error-boundary.js":{"id":4835,"name":"*","chunks":[],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/node_modules/next/dist/esm/client/components/error-boundary.js":{"id":4835,"name":"*","chunks":[],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/node_modules/next/dist/client/components/http-access-fallback/error-boundary.js":{"id":2328,"name":"*","chunks":[],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/node_modules/next/dist/esm/client/components/http-access-fallback/error-boundary.js":{"id":2328,"name":"*","chunks":[],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/node_modules/next/dist/client/components/layout-router.js":{"id":5244,"name":"*","chunks":[],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/node_modules/next/dist/esm/client/components/layout-router.js":{"id":5244,"name":"*","chunks":[],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/node_modules/next/dist/client/components/render-from-template-context.js":{"id":3866,"name":"*","chunks":[],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/node_modules/next/dist/esm/client/components/render-from-template-context.js":{"id":3866,"name":"*","chunks":[],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/node_modules/next/dist/lib/metadata/metadata-boundary.js":{"id":6213,"name":"*","chunks":[],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/node_modules/next/dist/esm/lib/metadata/metadata-boundary.js":{"id":6213,"name":"*","chunks":[],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/src/app/globals.css":{"id":347,"name":"*","chunks":["7177","static/chunks/app/layout-4af7a40b1f262149.js"],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/node_modules/next-intl/dist/esm/shared/NextIntlClientProvider.js":{"id":9981,"name":"*","chunks":["8313","static/chunks/8313-cd4e4ad40e185f1c.js","1868","static/chunks/1868-9f3e42aa5a6ea9d2.js","8173","static/chunks/8173-6258ed62b7084bda.js","7200","static/chunks/7200-c9c613d1b11207fb.js","8450","static/chunks/app/%5Blocale%5D/layout-48d759d6db5dd8ae.js"],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/node_modules/next/font/google/target.css?{\"path\":\"src/app/[locale]/layout.tsx\",\"import\":\"Inter\",\"arguments\":[{\"subsets\":[\"latin\"]}],\"variableName\":\"inter\"}":{"id":3127,"name":"*","chunks":["8313","static/chunks/8313-cd4e4ad40e185f1c.js","1868","static/chunks/1868-9f3e42aa5a6ea9d2.js","8173","static/chunks/8173-6258ed62b7084bda.js","7200","static/chunks/7200-c9c613d1b11207fb.js","8450","static/chunks/app/%5Blocale%5D/layout-48d759d6db5dd8ae.js"],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/src/components/layout/sidebar.tsx":{"id":4988,"name":"*","chunks":["8313","static/chunks/8313-cd4e4ad40e185f1c.js","1868","static/chunks/1868-9f3e42aa5a6ea9d2.js","8173","static/chunks/8173-6258ed62b7084bda.js","7200","static/chunks/7200-c9c613d1b11207fb.js","8450","static/chunks/app/%5Blocale%5D/layout-48d759d6db5dd8ae.js"],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/src/components/providers.tsx":{"id":1724,"name":"*","chunks":["8313","static/chunks/8313-cd4e4ad40e185f1c.js","1868","static/chunks/1868-9f3e42aa5a6ea9d2.js","8173","static/chunks/8173-6258ed62b7084bda.js","7200","static/chunks/7200-c9c613d1b11207fb.js","8450","static/chunks/app/%5Blocale%5D/layout-48d759d6db5dd8ae.js"],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/src/app/[locale]/agents/[id]/edit/page.tsx":{"id":260,"name":"*","chunks":[],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/src/app/[locale]/knowledge/page.tsx":{"id":6037,"name":"*","chunks":[],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/src/app/[locale]/agents/[id]/chat/page.tsx":{"id":3927,"name":"*","chunks":[],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/src/app/[locale]/settings/page.tsx":{"id":9789,"name":"*","chunks":["8313","static/chunks/8313-cd4e4ad40e185f1c.js","1868","static/chunks/1868-9f3e42aa5a6ea9d2.js","3259","static/chunks/3259-52b0aabc8fbba4a9.js","5964","static/chunks/5964-cdb47df650c9e359.js","5822","static/chunks/5822-2ca912318cc34b52.js","2455","static/chunks/app/%5Blocale%5D/settings/page-472b2cd8df49bf94.js"],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/src/app/[locale]/agents/new/page.tsx":{"id":1594,"name":"*","chunks":[],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/src/app/[locale]/agents/page.tsx":{"id":3893,"name":"*","chunks":[],"async":false}},"entryCSSFiles":{"/Users/duan/files/pi-web/digital-agent-platform/src/":[],"/Users/duan/files/pi-web/digital-agent-platform/src/app/layout":[{"inlined":false,"path":"static/css/632ce3b5496b50af.css"}],"/Users/duan/files/pi-web/digital-agent-platform/src/app/page":[],"/Users/duan/files/pi-web/digital-agent-platform/src/app/[locale]/layout":[{"inlined":false,"path":"static/css/7e7d96b1e6991756.css"}],"/Users/duan/files/pi-web/digital-agent-platform/src/app/[locale]/page":[],"/Users/duan/files/pi-web/digital-agent-platform/src/app/[locale]/settings/page":[]},"rscModuleMapping":{"260":{"*":{"id":"98992","name":"*","chunks":[],"async":false}},"347":{"*":{"id":"61135","name":"*","chunks":[],"async":false}},"1594":{"*":{"id":"77438","name":"*","chunks":[],"async":false}},"1724":{"*":{"id":"90835","name":"*","chunks":[],"async":false}},"2328":{"*":{"id":"40802","name":"*","chunks":[],"async":false}},"3866":{"*":{"id":"48530","name":"*","chunks":[],"async":false}},"3893":{"*":{"id":"59087","name":"*","chunks":[],"async":false}},"3927":{"*":{"id":"21702","name":"*","chunks":[],"async":false}},"4547":{"*":{"id":"34863","name":"*","chunks":[],"async":false}},"4835":{"*":{"id":"25155","name":"*","chunks":[],"async":false}},"4988":{"*":{"id":"27994","name":"*","chunks":[],"async":false}},"5244":{"*":{"id":"9350","name":"*","chunks":[],"async":false}},"6037":{"*":{"id":"40729","name":"*","chunks":[],"async":false}},"6213":{"*":{"id":"88921","name":"*","chunks":[],"async":false}},"7033":{"*":{"id":"13219","name":"*","chunks":[],"async":false}},"9789":{"*":{"id":"28660","name":"*","chunks":[],"async":false}},"9981":{"*":{"id":"35387","name":"*","chunks":[],"async":false}}},"edgeRscModuleMapping":{}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
globalThis.__RSC_MANIFEST=(globalThis.__RSC_MANIFEST||{});globalThis.__RSC_MANIFEST["/_not-found/page"]={"moduleLoading":{"prefix":"/_next/","crossOrigin":null},"ssrModuleMapping":{"260":{"*":{"id":"52124","name":"*","chunks":[],"async":false}},"1594":{"*":{"id":"12362","name":"*","chunks":[],"async":false}},"1724":{"*":{"id":"48157","name":"*","chunks":[],"async":false}},"2328":{"*":{"id":"57174","name":"*","chunks":[],"async":false}},"3866":{"*":{"id":"87190","name":"*","chunks":[],"async":false}},"3893":{"*":{"id":"48726","name":"*","chunks":[],"async":false}},"3927":{"*":{"id":"77413","name":"*","chunks":[],"async":false}},"4547":{"*":{"id":"33875","name":"*","chunks":[],"async":false}},"4835":{"*":{"id":"88903","name":"*","chunks":[],"async":false}},"4988":{"*":{"id":"20502","name":"*","chunks":[],"async":false}},"5244":{"*":{"id":"84178","name":"*","chunks":[],"async":false}},"6037":{"*":{"id":"87531","name":"*","chunks":[],"async":false}},"6213":{"*":{"id":"61365","name":"*","chunks":[],"async":false}},"7033":{"*":{"id":"66959","name":"*","chunks":[],"async":false}},"9789":{"*":{"id":"51890","name":"*","chunks":[],"async":false}},"9981":{"*":{"id":"12392","name":"*","chunks":[],"async":false}}},"edgeSSRModuleMapping":{},"clientModules":{"/Users/duan/files/pi-web/digital-agent-platform/node_modules/next/dist/client/components/client-page.js":{"id":7033,"name":"*","chunks":[],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/node_modules/next/dist/esm/client/components/client-page.js":{"id":7033,"name":"*","chunks":[],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/node_modules/next/dist/client/components/client-segment.js":{"id":4547,"name":"*","chunks":[],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/node_modules/next/dist/esm/client/components/client-segment.js":{"id":4547,"name":"*","chunks":[],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/node_modules/next/dist/client/components/error-boundary.js":{"id":4835,"name":"*","chunks":[],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/node_modules/next/dist/esm/client/components/error-boundary.js":{"id":4835,"name":"*","chunks":[],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/node_modules/next/dist/client/components/http-access-fallback/error-boundary.js":{"id":2328,"name":"*","chunks":[],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/node_modules/next/dist/esm/client/components/http-access-fallback/error-boundary.js":{"id":2328,"name":"*","chunks":[],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/node_modules/next/dist/client/components/layout-router.js":{"id":5244,"name":"*","chunks":[],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/node_modules/next/dist/esm/client/components/layout-router.js":{"id":5244,"name":"*","chunks":[],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/node_modules/next/dist/client/components/render-from-template-context.js":{"id":3866,"name":"*","chunks":[],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/node_modules/next/dist/esm/client/components/render-from-template-context.js":{"id":3866,"name":"*","chunks":[],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/node_modules/next/dist/lib/metadata/metadata-boundary.js":{"id":6213,"name":"*","chunks":[],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/node_modules/next/dist/esm/lib/metadata/metadata-boundary.js":{"id":6213,"name":"*","chunks":[],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/src/app/globals.css":{"id":347,"name":"*","chunks":["7177","static/chunks/app/layout-4af7a40b1f262149.js"],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/node_modules/next-intl/dist/esm/shared/NextIntlClientProvider.js":{"id":9981,"name":"*","chunks":[],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/node_modules/next/font/google/target.css?{\"path\":\"src/app/[locale]/layout.tsx\",\"import\":\"Inter\",\"arguments\":[{\"subsets\":[\"latin\"]}],\"variableName\":\"inter\"}":{"id":3127,"name":"*","chunks":[],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/src/components/layout/sidebar.tsx":{"id":4988,"name":"*","chunks":[],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/src/components/providers.tsx":{"id":1724,"name":"*","chunks":[],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/src/app/[locale]/agents/[id]/
|
|
1
|
+
globalThis.__RSC_MANIFEST=(globalThis.__RSC_MANIFEST||{});globalThis.__RSC_MANIFEST["/_not-found/page"]={"moduleLoading":{"prefix":"/_next/","crossOrigin":null},"ssrModuleMapping":{"260":{"*":{"id":"52124","name":"*","chunks":[],"async":false}},"1594":{"*":{"id":"12362","name":"*","chunks":[],"async":false}},"1724":{"*":{"id":"48157","name":"*","chunks":[],"async":false}},"2328":{"*":{"id":"57174","name":"*","chunks":[],"async":false}},"3866":{"*":{"id":"87190","name":"*","chunks":[],"async":false}},"3893":{"*":{"id":"48726","name":"*","chunks":[],"async":false}},"3927":{"*":{"id":"77413","name":"*","chunks":[],"async":false}},"4547":{"*":{"id":"33875","name":"*","chunks":[],"async":false}},"4835":{"*":{"id":"88903","name":"*","chunks":[],"async":false}},"4988":{"*":{"id":"20502","name":"*","chunks":[],"async":false}},"5244":{"*":{"id":"84178","name":"*","chunks":[],"async":false}},"6037":{"*":{"id":"87531","name":"*","chunks":[],"async":false}},"6213":{"*":{"id":"61365","name":"*","chunks":[],"async":false}},"7033":{"*":{"id":"66959","name":"*","chunks":[],"async":false}},"9789":{"*":{"id":"51890","name":"*","chunks":[],"async":false}},"9981":{"*":{"id":"12392","name":"*","chunks":[],"async":false}}},"edgeSSRModuleMapping":{},"clientModules":{"/Users/duan/files/pi-web/digital-agent-platform/node_modules/next/dist/client/components/client-page.js":{"id":7033,"name":"*","chunks":[],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/node_modules/next/dist/esm/client/components/client-page.js":{"id":7033,"name":"*","chunks":[],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/node_modules/next/dist/client/components/client-segment.js":{"id":4547,"name":"*","chunks":[],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/node_modules/next/dist/esm/client/components/client-segment.js":{"id":4547,"name":"*","chunks":[],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/node_modules/next/dist/client/components/error-boundary.js":{"id":4835,"name":"*","chunks":[],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/node_modules/next/dist/esm/client/components/error-boundary.js":{"id":4835,"name":"*","chunks":[],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/node_modules/next/dist/client/components/http-access-fallback/error-boundary.js":{"id":2328,"name":"*","chunks":[],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/node_modules/next/dist/esm/client/components/http-access-fallback/error-boundary.js":{"id":2328,"name":"*","chunks":[],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/node_modules/next/dist/client/components/layout-router.js":{"id":5244,"name":"*","chunks":[],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/node_modules/next/dist/esm/client/components/layout-router.js":{"id":5244,"name":"*","chunks":[],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/node_modules/next/dist/client/components/render-from-template-context.js":{"id":3866,"name":"*","chunks":[],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/node_modules/next/dist/esm/client/components/render-from-template-context.js":{"id":3866,"name":"*","chunks":[],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/node_modules/next/dist/lib/metadata/metadata-boundary.js":{"id":6213,"name":"*","chunks":[],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/node_modules/next/dist/esm/lib/metadata/metadata-boundary.js":{"id":6213,"name":"*","chunks":[],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/src/app/globals.css":{"id":347,"name":"*","chunks":["7177","static/chunks/app/layout-4af7a40b1f262149.js"],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/node_modules/next-intl/dist/esm/shared/NextIntlClientProvider.js":{"id":9981,"name":"*","chunks":[],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/node_modules/next/font/google/target.css?{\"path\":\"src/app/[locale]/layout.tsx\",\"import\":\"Inter\",\"arguments\":[{\"subsets\":[\"latin\"]}],\"variableName\":\"inter\"}":{"id":3127,"name":"*","chunks":[],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/src/components/layout/sidebar.tsx":{"id":4988,"name":"*","chunks":[],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/src/components/providers.tsx":{"id":1724,"name":"*","chunks":[],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/src/app/[locale]/agents/[id]/edit/page.tsx":{"id":260,"name":"*","chunks":[],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/src/app/[locale]/knowledge/page.tsx":{"id":6037,"name":"*","chunks":[],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/src/app/[locale]/agents/[id]/chat/page.tsx":{"id":3927,"name":"*","chunks":[],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/src/app/[locale]/settings/page.tsx":{"id":9789,"name":"*","chunks":[],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/src/app/[locale]/agents/new/page.tsx":{"id":1594,"name":"*","chunks":[],"async":false},"/Users/duan/files/pi-web/digital-agent-platform/src/app/[locale]/agents/page.tsx":{"id":3893,"name":"*","chunks":[],"async":false}},"entryCSSFiles":{"/Users/duan/files/pi-web/digital-agent-platform/src/":[],"/Users/duan/files/pi-web/digital-agent-platform/src/app/layout":[{"inlined":false,"path":"static/css/632ce3b5496b50af.css"}],"/Users/duan/files/pi-web/digital-agent-platform/src/app/page":[],"/Users/duan/files/pi-web/digital-agent-platform/src/app/_not-found/page":[]},"rscModuleMapping":{"260":{"*":{"id":"98992","name":"*","chunks":[],"async":false}},"347":{"*":{"id":"61135","name":"*","chunks":[],"async":false}},"1594":{"*":{"id":"77438","name":"*","chunks":[],"async":false}},"1724":{"*":{"id":"90835","name":"*","chunks":[],"async":false}},"2328":{"*":{"id":"40802","name":"*","chunks":[],"async":false}},"3866":{"*":{"id":"48530","name":"*","chunks":[],"async":false}},"3893":{"*":{"id":"59087","name":"*","chunks":[],"async":false}},"3927":{"*":{"id":"21702","name":"*","chunks":[],"async":false}},"4547":{"*":{"id":"34863","name":"*","chunks":[],"async":false}},"4835":{"*":{"id":"25155","name":"*","chunks":[],"async":false}},"4988":{"*":{"id":"27994","name":"*","chunks":[],"async":false}},"5244":{"*":{"id":"9350","name":"*","chunks":[],"async":false}},"6037":{"*":{"id":"40729","name":"*","chunks":[],"async":false}},"6213":{"*":{"id":"88921","name":"*","chunks":[],"async":false}},"7033":{"*":{"id":"13219","name":"*","chunks":[],"async":false}},"9789":{"*":{"id":"28660","name":"*","chunks":[],"async":false}},"9981":{"*":{"id":"35387","name":"*","chunks":[],"async":false}}},"edgeRscModuleMapping":{}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="/_next/static/css/632ce3b5496b50af.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/webpack-9b9d7723f8078270.js"/><script src="/_next/static/chunks/4bd1b696-c90310bf0ab1fbc7.js" async=""></script><script src="/_next/static/chunks/1517-9c89c425ac486877.js" async=""></script><script src="/_next/static/chunks/main-app-07be5f69ef8a336a.js" async=""></script><meta name="robots" content="noindex"/><meta name="next-size-adjust" content=""/><title>404: This page could not be found.</title><title>Digital Agent Platform</title><meta name="description" content="Configure and chat with your AI digital agents"/><div style="font-family:system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding:0 23px 0 0;font-size:24px;font-weight:500;vertical-align:top;line-height:49px">404</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:49px;margin:0">This page could not be found.</h2></div></div></div><script src="/_next/static/chunks/webpack-9b9d7723f8078270.js" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:I[5244,[],\"\"]\n3:I[3866,[],\"\"]\n4:I[6213,[],\"OutletBoundary\"]\n6:I[6213,[],\"MetadataBoundary\"]\n8:I[6213,[],\"ViewportBoundary\"]\na:I[4835,[],\"\"]\n:HL[\"/_next/static/css/632ce3b5496b50af.css\",\"style\"]\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"b\":\"
|
|
1
|
+
<meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="/_next/static/css/632ce3b5496b50af.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/webpack-9b9d7723f8078270.js"/><script src="/_next/static/chunks/4bd1b696-c90310bf0ab1fbc7.js" async=""></script><script src="/_next/static/chunks/1517-9c89c425ac486877.js" async=""></script><script src="/_next/static/chunks/main-app-07be5f69ef8a336a.js" async=""></script><meta name="robots" content="noindex"/><meta name="next-size-adjust" content=""/><title>404: This page could not be found.</title><title>Digital Agent Platform</title><meta name="description" content="Configure and chat with your AI digital agents"/><div style="font-family:system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding:0 23px 0 0;font-size:24px;font-weight:500;vertical-align:top;line-height:49px">404</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:49px;margin:0">This page could not be found.</h2></div></div></div><script src="/_next/static/chunks/webpack-9b9d7723f8078270.js" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:I[5244,[],\"\"]\n3:I[3866,[],\"\"]\n4:I[6213,[],\"OutletBoundary\"]\n6:I[6213,[],\"MetadataBoundary\"]\n8:I[6213,[],\"ViewportBoundary\"]\na:I[4835,[],\"\"]\n:HL[\"/_next/static/css/632ce3b5496b50af.css\",\"style\"]\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"b\":\"rUwWYP4-J64RRKJv93Ihp\",\"p\":\"\",\"c\":[\"\",\"_not-found\"],\"i\":false,\"f\":[[[\"\",{\"children\":[\"/_not-found\",{\"children\":[\"__PAGE__\",{}]}]},\"$undefined\",\"$undefined\",true],[\"\",[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/632ce3b5496b50af.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}]],[\"$\",\"$L2\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L3\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":[[],[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":404}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]]],\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[\"/_not-found\",[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L2\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\",\"/_not-found\",\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L3\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[\"__PAGE__\",[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":\"$0:f:0:1:1:props:children:1:props:notFound:1:1:props:style\",\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":\"$0:f:0:1:1:props:children:1:props:notFound:1:1:props:children:props:children:1:props:style\",\"children\":404}],[\"$\",\"div\",null,{\"style\":\"$0:f:0:1:1:props:children:1:props:notFound:1:1:props:children:props:children:2:props:style\",\"children\":[\"$\",\"h2\",null,{\"style\":\"$0:f:0:1:1:props:children:1:props:notFound:1:1:props:children:props:children:2:props:children:props:style\",\"children\":\"This page could not be found.\"}]}]]}]}]],null,[\"$\",\"$L4\",null,{\"children\":\"$L5\"}]]}],{},null,false]},null,false]},null,false],[\"$\",\"$1\",\"h\",{\"children\":[[\"$\",\"meta\",null,{\"name\":\"robots\",\"content\":\"noindex\"}],[\"$\",\"$1\",\"Xp8vcRKlyu9xpVP0QpntI\",{\"children\":[[\"$\",\"$L6\",null,{\"children\":\"$L7\"}],[\"$\",\"$L8\",null,{\"children\":\"$L9\"}],[\"$\",\"meta\",null,{\"name\":\"next-size-adjust\",\"content\":\"\"}]]}]]}],false]],\"m\":\"$undefined\",\"G\":[\"$a\",\"$undefined\"],\"s\":false,\"S\":true}\n"])</script><script>self.__next_f.push([1,"9:[[\"$\",\"meta\",\"0\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}]]\n7:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"title\",\"1\",{\"children\":\"Digital Agent Platform\"}],[\"$\",\"meta\",\"2\",{\"name\":\"description\",\"content\":\"Configure and chat with your AI digital agents\"}]]\n"])</script><script>self.__next_f.push([1,"5:null\n"])</script></body></html>
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
8:I[6213,[],"ViewportBoundary"]
|
|
7
7
|
a:I[4835,[],""]
|
|
8
8
|
:HL["/_next/static/css/632ce3b5496b50af.css","style"]
|
|
9
|
-
0:{"P":null,"b":"
|
|
9
|
+
0:{"P":null,"b":"rUwWYP4-J64RRKJv93Ihp","p":"","c":["","_not-found"],"i":false,"f":[[["",{"children":["/_not-found",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",true],["",["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/632ce3b5496b50af.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}]],["$","$L2",null,{"parallelRouterKey":"children","segmentPath":["children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L3",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[],[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":404}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]]],"forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":["/_not-found",["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","segmentPath":["children","/_not-found","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L3",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":["__PAGE__",["$","$1","c",{"children":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":"$0:f:0:1:1:props:children:1:props:notFound:1:1:props:style","children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":"$0:f:0:1:1:props:children:1:props:notFound:1:1:props:children:props:children:1:props:style","children":404}],["$","div",null,{"style":"$0:f:0:1:1:props:children:1:props:notFound:1:1:props:children:props:children:2:props:style","children":["$","h2",null,{"style":"$0:f:0:1:1:props:children:1:props:notFound:1:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],null,["$","$L4",null,{"children":"$L5"}]]}],{},null,false]},null,false]},null,false],["$","$1","h",{"children":[["$","meta",null,{"name":"robots","content":"noindex"}],["$","$1","Xp8vcRKlyu9xpVP0QpntI",{"children":[["$","$L6",null,{"children":"$L7"}],["$","$L8",null,{"children":"$L9"}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}]]}],false]],"m":"$undefined","G":["$a","$undefined"],"s":false,"S":true}
|
|
10
10
|
9:[["$","meta","0",{"name":"viewport","content":"width=device-width, initial-scale=1"}]]
|
|
11
11
|
7:[["$","meta","0",{"charSet":"utf-8"}],["$","title","1",{"children":"Digital Agent Platform"}],["$","meta","2",{"name":"description","content":"Configure and chat with your AI digital agents"}]]
|
|
12
12
|
5:null
|