@overlordai/server 1.0.107 → 1.0.109

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (88) hide show
  1. package/dist/adapters/lark/lark.controller.d.ts.map +1 -1
  2. package/dist/adapters/lark/lark.controller.js +9 -2
  3. package/dist/adapters/lark/lark.controller.js.map +1 -1
  4. package/dist/adapters/slack/slack.controller.d.ts.map +1 -1
  5. package/dist/adapters/slack/slack.controller.js +3 -0
  6. package/dist/adapters/slack/slack.controller.js.map +1 -1
  7. package/package.json +4 -4
  8. package/public/assets/{AccessTokensPage-D3vVhJ9o.js → AccessTokensPage-C2h0K0kH.js} +1 -1
  9. package/public/assets/{AdminPage-Bf5USIyb.js → AdminPage-DxrkDoXf.js} +1 -1
  10. package/public/assets/{ApiReferencePage-rP70i-cC.js → ApiReferencePage-CIYZiswD.js} +1 -1
  11. package/public/assets/{ArchitecturePage-dBVM4J-2.js → ArchitecturePage-7Y5ih2_d.js} +1 -1
  12. package/public/assets/{AuditLogPage-CyMUtVxe.js → AuditLogPage-BTmmzLgK.js} +1 -1
  13. package/public/assets/{BindPlatformPage-DIMohni0.js → BindPlatformPage-DbCsXnBI.js} +1 -1
  14. package/public/assets/{BotIntegrationPage-Btv8-BIL.js → BotIntegrationPage-DtRpsUtv.js} +1 -1
  15. package/public/assets/BotManage-BLHpJOfp.js +6 -0
  16. package/public/assets/{BotSetupPage-BnqW_hH0.js → BotSetupPage-DYBOeFfA.js} +6 -6
  17. package/public/assets/{ChangelogPage-D_Z-q2Xk.js → ChangelogPage-CjYDrTO4.js} +1 -1
  18. package/public/assets/{CliReferencePage-BIRo7DNY.js → CliReferencePage-CBBT01JY.js} +1 -1
  19. package/public/assets/{DeploymentPage-B4W9CRX3.js → DeploymentPage-Bmhoh17P.js} +1 -1
  20. package/public/assets/{DevWorkflowPage-CQmGKq5w.js → DevWorkflowPage-BdH0FPp5.js} +1 -1
  21. package/public/assets/{DeveloperManage-_3pjAISj.js → DeveloperManage-C7gxcQwD.js} +1 -1
  22. package/public/assets/{DeveloperSetupPage-CnlPQ78U.js → DeveloperSetupPage-BSTeL5Rd.js} +1 -1
  23. package/public/assets/{DocsIndexPage-TEKF85em.js → DocsIndexPage-DUUCbdOX.js} +1 -1
  24. package/public/assets/{DocsLayout-DRoWEbLH.js → DocsLayout-BkrbXbSs.js} +1 -1
  25. package/public/assets/{DocsPrimitives-CCOXPEo4.js → DocsPrimitives-DtSlBzYZ.js} +1 -1
  26. package/public/assets/EditProjectPage-CltSIUGw.js +2 -0
  27. package/public/assets/{EmptyState-qH9mjTP8.js → EmptyState-B7KGyI99.js} +1 -1
  28. package/public/assets/{EnvVariablesPage-C3s18iT9.js → EnvVariablesPage-CLFK3yuC.js} +1 -1
  29. package/public/assets/{HomePage-D4QMGbWg.js → HomePage-CUiDsXW_.js} +1 -1
  30. package/public/assets/{InfoRow-CNzmrBAT.js → InfoRow-5gGqzH3j.js} +1 -1
  31. package/public/assets/{InstallationPage-B9dHKZCT.js → InstallationPage-BlqJZLjM.js} +1 -1
  32. package/public/assets/{LandingPage-ANinQmsj.js → LandingPage-B1urdKhy.js} +1 -1
  33. package/public/assets/{LocalDevelopmentPage-D2a18Sqm.js → LocalDevelopmentPage-C4H4eeD3.js} +1 -1
  34. package/public/assets/{LoginPage-DaRwLlEK.js → LoginPage-DDIS280b.js} +1 -1
  35. package/public/assets/{MetricBar-BI1-2UnI.js → MetricBar-C9740901.js} +1 -1
  36. package/public/assets/{NotFoundPage-DlCCcK7Z.js → NotFoundPage-qsdy1mss.js} +1 -1
  37. package/public/assets/{OnboardingGuide-CAx3cSZD.js → OnboardingGuide-Dz_Qoq-F.js} +1 -1
  38. package/public/assets/{PermissionsPage-DnPETkqw.js → PermissionsPage-w7Kto8BH.js} +1 -1
  39. package/public/assets/{PipelineConfigPage-e4Cz32sl.js → PipelineConfigPage-BTMnMbNs.js} +1 -1
  40. package/public/assets/{PipelineEditorPage-C4TF57aq.js → PipelineEditorPage-Cu7Dn_bf.js} +1 -1
  41. package/public/assets/{ProfilePage-PqWvvnRQ.js → ProfilePage-uUa34lzB.js} +1 -1
  42. package/public/assets/{ProjectDetailPage-CqY3JCnd.js → ProjectDetailPage-DojggcMs.js} +1 -1
  43. package/public/assets/{ProjectListPage-BUJYxMWu.js → ProjectListPage-BRuMJzG2.js} +1 -1
  44. package/public/assets/{PtyTerminal-C4iNjcTR.js → PtyTerminal-CTD3fC09.js} +2 -2
  45. package/public/assets/{QuickAuth-VRDSG9VX.js → QuickAuth-JBik1Ezc.js} +1 -1
  46. package/public/assets/{RemoveMemberConfirmDialog-DQOAvyrC.js → RemoveMemberConfirmDialog-Cr5M3kX8.js} +1 -1
  47. package/public/assets/{Select-DmVMUBYP.js → Select-Sfe5_i7O.js} +1 -1
  48. package/public/assets/{SettingsPage-BtqtS18c.js → SettingsPage-DtrnQy7c.js} +1 -1
  49. package/public/assets/{Skeleton-CN0GLaxk.js → Skeleton-b8eEoVm4.js} +1 -1
  50. package/public/assets/{SkillPage-Cl-gL5d5.js → SkillPage-PfbPy_rm.js} +1 -1
  51. package/public/assets/{TaskDetailPage-65DmvECK.js → TaskDetailPage-BsKVvlqR.js} +1 -1
  52. package/public/assets/{TaskListPage-D5-mACwG.js → TaskListPage-Dot4avUt.js} +1 -1
  53. package/public/assets/{TaskStatusBadge-Dc6jdI5L.js → TaskStatusBadge-C6r8HwVl.js} +1 -1
  54. package/public/assets/{TerminalHomePage-D5wOz0IB.js → TerminalHomePage-C_xx5uJQ.js} +2 -2
  55. package/public/assets/{TokenManage-DDd4jBAr.js → TokenManage-Bl2bCiEb.js} +1 -1
  56. package/public/assets/{TotpSetupPage-BcYa1vPS.js → TotpSetupPage-oMVmbv99.js} +1 -1
  57. package/public/assets/{WorkerDetailPage-D78m3kjR.js → WorkerDetailPage-BWboaNsx.js} +1 -1
  58. package/public/assets/{WorkerListPage-DHvQlCsO.js → WorkerListPage-Ct0QwBxV.js} +1 -1
  59. package/public/assets/{WorkerOperationsPage-CtTFUWG5.js → WorkerOperationsPage-DCM4tx9s.js} +1 -1
  60. package/public/assets/{WorkerSetupGuidePage-BctnWaMP.js → WorkerSetupGuidePage-a1BZNEcM.js} +1 -1
  61. package/public/assets/{WorkerSetupPage-CsnfhcwG.js → WorkerSetupPage-D_-meG6o.js} +1 -1
  62. package/public/assets/{arrow-left-DstMBAfk.js → arrow-left-Dy6FYgId.js} +1 -1
  63. package/public/assets/{arrow-right-DeGBMI6T.js → arrow-right-BuVf5xrX.js} +1 -1
  64. package/public/assets/{bot-D7QLScHH.js → bot-bjQZUmE4.js} +1 -1
  65. package/public/assets/{chevron-right-D4uXRQzR.js → chevron-right-jsUl3t1F.js} +1 -1
  66. package/public/assets/{copy-Dc1cX6IX.js → copy-Bzqy0i1r.js} +1 -1
  67. package/public/assets/{download-DV4Kh1h0.js → download-C4NiiFc1.js} +1 -1
  68. package/public/assets/{external-link-C-B5369y.js → external-link-B2o9w-yf.js} +1 -1
  69. package/public/assets/{index-DPmKxmNF.css → index-D_Ub6LeZ.css} +1 -1
  70. package/public/assets/{index-cD19J97z.js → index-I34W3bvr.js} +3 -3
  71. package/public/assets/{key-Dwx1qupP.js → key-CDiB4vcN.js} +1 -1
  72. package/public/assets/{loader-circle-DR8kSH1v.js → loader-circle-BcHWUyWN.js} +1 -1
  73. package/public/assets/{pencil-Dn-XJKV1.js → pencil-B-N6brzE.js} +1 -1
  74. package/public/assets/{plus-_jiW6Lm5.js → plus-C6Sc6xJi.js} +1 -1
  75. package/public/assets/{rotate-ccw-Bg7m1k4d.js → rotate-ccw-MDBnN5i8.js} +1 -1
  76. package/public/assets/{scroll-text-BTgxJ_ef.js → scroll-text-Ce4yCIJE.js} +1 -1
  77. package/public/assets/{settings-BnGHAjei.js → settings-B5nzxYCc.js} +1 -1
  78. package/public/assets/{status-colors-B4QEmFCj.js → status-colors-CLuIPs8b.js} +1 -1
  79. package/public/assets/{task-constants-Dp2Z7Oy2.js → task-constants-DKG5xBo3.js} +1 -1
  80. package/public/assets/{trash-2-Dd56pXgX.js → trash-2-Bcn4eyUC.js} +1 -1
  81. package/public/assets/{useFetch-MXa-9JSO.js → useFetch-DU_oIUZH.js} +1 -1
  82. package/public/assets/{users-BMPck0mS.js → users-BCYHlSS3.js} +1 -1
  83. package/public/assets/{wifi-H4egMUxs.js → wifi-D2pd5rRn.js} +1 -1
  84. package/public/assets/{workflow-BBglj_Z2.js → workflow-CKxBZ5fU.js} +1 -1
  85. package/public/index.html +2 -2
  86. package/public/sw.js +1 -1
  87. package/public/assets/BotManage-PXJ_BJBk.js +0 -6
  88. package/public/assets/EditProjectPage-YWr9HIxh.js +0 -2
@@ -1,4 +1,4 @@
1
- import{c as t}from"./index-cD19J97z.js";/**
1
+ import{c as t}from"./index-I34W3bvr.js";/**
2
2
  * @license lucide-react v0.469.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1,4 +1,4 @@
1
- import{c as a}from"./index-cD19J97z.js";/**
1
+ import{c as a}from"./index-I34W3bvr.js";/**
2
2
  * @license lucide-react v0.469.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1,4 +1,4 @@
1
- import{c as a}from"./index-cD19J97z.js";/**
1
+ import{c as a}from"./index-I34W3bvr.js";/**
2
2
  * @license lucide-react v0.469.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1 +1 @@
1
- import{W as r,m as e,V as s,Y as u,I as a}from"./index-cD19J97z.js";const n={[e.QUEUED]:"var(--text-muted)",[e.ASSIGNED]:"#60a5fa",[e.RUNNING]:"var(--accent)",[e.SUSPENDED]:"var(--warning)",[e.COMPLETED]:"var(--info)",[e.FAILED]:"var(--destructive)",[e.CANCELLED]:"var(--text-muted)"};function v(t){return n[t]??"var(--text-muted)"}const o={[r.ONLINE]:"var(--accent)",[r.OFFLINE]:"var(--destructive)",[r.DRAINING]:"var(--warning)",[r.DECOMMISSIONED]:"var(--text-muted)"};function E(t){return o[t]??"var(--text-muted)"}function x(t){switch(t){case s.ACTIVE:return"text-green-400";case s.DISABLED:return"text-red-400";default:return"text-[var(--text-muted)]"}}function S(t){switch(t){case a.ACTIVE:return"text-green-400";case a.USED:return"text-blue-400";case a.REVOKED:return"text-red-400";case a.EXPIRED:return"text-[var(--text-muted)]";default:return"text-[var(--text-muted)]"}}function d(t){switch(t){case u.ACTIVE:return"text-green-400";case"error":return"text-red-400";default:return"text-[var(--text-muted)]"}}function i(t){return t>.8?"var(--destructive)":t>.6?"var(--warning)":"var(--accent)"}export{v as a,i as b,x as c,d,S as e,E as g,n as t,o as w};
1
+ import{W as r,m as e,V as s,Y as u,I as a}from"./index-I34W3bvr.js";const n={[e.QUEUED]:"var(--text-muted)",[e.ASSIGNED]:"#60a5fa",[e.RUNNING]:"var(--accent)",[e.SUSPENDED]:"var(--warning)",[e.COMPLETED]:"var(--info)",[e.FAILED]:"var(--destructive)",[e.CANCELLED]:"var(--text-muted)"};function v(t){return n[t]??"var(--text-muted)"}const o={[r.ONLINE]:"var(--accent)",[r.OFFLINE]:"var(--destructive)",[r.DRAINING]:"var(--warning)",[r.DECOMMISSIONED]:"var(--text-muted)"};function E(t){return o[t]??"var(--text-muted)"}function x(t){switch(t){case s.ACTIVE:return"text-green-400";case s.DISABLED:return"text-red-400";default:return"text-[var(--text-muted)]"}}function S(t){switch(t){case a.ACTIVE:return"text-green-400";case a.USED:return"text-blue-400";case a.REVOKED:return"text-red-400";case a.EXPIRED:return"text-[var(--text-muted)]";default:return"text-[var(--text-muted)]"}}function d(t){switch(t){case u.ACTIVE:return"text-green-400";case"error":return"text-red-400";default:return"text-[var(--text-muted)]"}}function i(t){return t>.8?"var(--destructive)":t>.6?"var(--warning)":"var(--accent)"}export{v as a,i as b,x as c,d,S as e,E as g,n as t,o as w};
@@ -1 +1 @@
1
- import{l as f,h as n,m as c,A as k}from"./index-cD19J97z.js";const b=f((t,e)=>({tasks:[],currentTask:null,loading:!1,error:null,nextCursor:null,_fetchTasksAbort:null,fetchTasks:async a=>{const s=e()._fetchTasksAbort;s&&s.abort();const o=new AbortController;t({loading:!0,error:null,_fetchTasksAbort:o});try{const r={};a!=null&&a.status&&(r.status=a.status),a!=null&&a.projectKey&&(r.projectKey=a.projectKey),a!=null&&a.cursor&&(r.cursor=a.cursor),a!=null&&a.limit&&(r.limit=String(a.limit));const l=await n.get("web/tasks",{searchParams:r,signal:o.signal}).json();a!=null&&a.cursor?t(i=>({tasks:[...i.tasks,...l.data],nextCursor:l.nextCursor??null,_fetchTasksAbort:null})):t({tasks:l.data,nextCursor:l.nextCursor??null,_fetchTasksAbort:null})}catch(r){if(r instanceof DOMException&&r.name==="AbortError")return;t({error:r instanceof Error?r.message:"Failed to fetch tasks"})}finally{t({loading:!1})}},fetchTask:async a=>{t({loading:!0,error:null});try{const s=await n.get(`web/tasks/${a}`).json();t({currentTask:s})}catch(s){t({error:s instanceof Error?s.message:"Failed to fetch task"})}finally{t({loading:!1})}},createTask:async a=>{t({error:null});try{const s=await n.post("web/tasks",{json:a}).json();return t(o=>({tasks:[s,...o.tasks]})),s}catch(s){throw t({error:s instanceof Error?s.message:"Failed to create task"}),s}},cancelTask:async a=>{t({error:null});try{await n.post(`web/tasks/${a}/cancel`);const{currentTask:s}=e();(s==null?void 0:s.id)===a&&await e().fetchTask(a)}catch(s){throw t({error:s instanceof Error?s.message:"Failed to cancel task"}),s}},reset:()=>{t({tasks:[],currentTask:null,loading:!1,error:null,nextCursor:null})}})),h=[c.COMPLETED,c.FAILED,c.CANCELLED],u=[{value:"feat",label:"feat"},{value:"fix",label:"fix"},{value:"refactor",label:"refactor"},{value:"docs",label:"docs"},{value:"chore",label:"chore"}],A=[{value:"",label:"default"},...Object.values(k).map(t=>({value:t,label:t}))];export{A,h as T,u as a,b as u};
1
+ import{l as f,h as n,m as c,A as k}from"./index-I34W3bvr.js";const b=f((t,e)=>({tasks:[],currentTask:null,loading:!1,error:null,nextCursor:null,_fetchTasksAbort:null,fetchTasks:async a=>{const s=e()._fetchTasksAbort;s&&s.abort();const o=new AbortController;t({loading:!0,error:null,_fetchTasksAbort:o});try{const r={};a!=null&&a.status&&(r.status=a.status),a!=null&&a.projectKey&&(r.projectKey=a.projectKey),a!=null&&a.cursor&&(r.cursor=a.cursor),a!=null&&a.limit&&(r.limit=String(a.limit));const l=await n.get("web/tasks",{searchParams:r,signal:o.signal}).json();a!=null&&a.cursor?t(i=>({tasks:[...i.tasks,...l.data],nextCursor:l.nextCursor??null,_fetchTasksAbort:null})):t({tasks:l.data,nextCursor:l.nextCursor??null,_fetchTasksAbort:null})}catch(r){if(r instanceof DOMException&&r.name==="AbortError")return;t({error:r instanceof Error?r.message:"Failed to fetch tasks"})}finally{t({loading:!1})}},fetchTask:async a=>{t({loading:!0,error:null});try{const s=await n.get(`web/tasks/${a}`).json();t({currentTask:s})}catch(s){t({error:s instanceof Error?s.message:"Failed to fetch task"})}finally{t({loading:!1})}},createTask:async a=>{t({error:null});try{const s=await n.post("web/tasks",{json:a}).json();return t(o=>({tasks:[s,...o.tasks]})),s}catch(s){throw t({error:s instanceof Error?s.message:"Failed to create task"}),s}},cancelTask:async a=>{t({error:null});try{await n.post(`web/tasks/${a}/cancel`);const{currentTask:s}=e();(s==null?void 0:s.id)===a&&await e().fetchTask(a)}catch(s){throw t({error:s instanceof Error?s.message:"Failed to cancel task"}),s}},reset:()=>{t({tasks:[],currentTask:null,loading:!1,error:null,nextCursor:null})}})),h=[c.COMPLETED,c.FAILED,c.CANCELLED],u=[{value:"feat",label:"feat"},{value:"fix",label:"fix"},{value:"refactor",label:"refactor"},{value:"docs",label:"docs"},{value:"chore",label:"chore"}],A=[{value:"",label:"default"},...Object.values(k).map(t=>({value:t,label:t}))];export{A,h as T,u as a,b as u};
@@ -1,4 +1,4 @@
1
- import{c as e}from"./index-cD19J97z.js";/**
1
+ import{c as e}from"./index-I34W3bvr.js";/**
2
2
  * @license lucide-react v0.469.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1 +1 @@
1
- import{r as e}from"./index-cD19J97z.js";function p(c,f){const[l,i]=e.useState(null),[d,u]=e.useState(!0),[R,a]=e.useState(null),o=e.useRef(c);o.current=c;const r=e.useRef(0),n=e.useCallback(async()=>{const s=++r.current;u(!0),a(null);try{const t=await o.current();s===r.current&&i(t)}catch(t){if(s===r.current){const g=t instanceof Error?t.message:"An unexpected error occurred";a(g)}}finally{s===r.current&&u(!1)}},f);return e.useEffect(()=>{n()},[n]),{data:l,loading:d,error:R,refetch:n}}export{p as u};
1
+ import{r as e}from"./index-I34W3bvr.js";function p(c,f){const[l,i]=e.useState(null),[d,u]=e.useState(!0),[R,a]=e.useState(null),o=e.useRef(c);o.current=c;const r=e.useRef(0),n=e.useCallback(async()=>{const s=++r.current;u(!0),a(null);try{const t=await o.current();s===r.current&&i(t)}catch(t){if(s===r.current){const g=t instanceof Error?t.message:"An unexpected error occurred";a(g)}}finally{s===r.current&&u(!1)}},f);return e.useEffect(()=>{n()},[n]),{data:l,loading:d,error:R,refetch:n}}export{p as u};
@@ -1,4 +1,4 @@
1
- import{c as e}from"./index-cD19J97z.js";/**
1
+ import{c as e}from"./index-I34W3bvr.js";/**
2
2
  * @license lucide-react v0.469.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1,4 +1,4 @@
1
- import{c as e}from"./index-cD19J97z.js";/**
1
+ import{c as e}from"./index-I34W3bvr.js";/**
2
2
  * @license lucide-react v0.469.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1,4 +1,4 @@
1
- import{c}from"./index-cD19J97z.js";/**
1
+ import{c}from"./index-I34W3bvr.js";/**
2
2
  * @license lucide-react v0.469.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
package/public/index.html CHANGED
@@ -28,8 +28,8 @@
28
28
  href="https://fonts.googleapis.com/css2?family=JetBrains+Mono:ital,wght@0,100..800;1,100..800&display=swap"
29
29
  rel="stylesheet"
30
30
  />
31
- <script type="module" crossorigin src="/assets/index-cD19J97z.js"></script>
32
- <link rel="stylesheet" crossorigin href="/assets/index-DPmKxmNF.css">
31
+ <script type="module" crossorigin src="/assets/index-I34W3bvr.js"></script>
32
+ <link rel="stylesheet" crossorigin href="/assets/index-D_Ub6LeZ.css">
33
33
  <link rel="manifest" href="/manifest.webmanifest"><script id="vite-plugin-pwa:register-sw" src="/registerSW.js"></script></head>
34
34
  <body>
35
35
  <div id="root"></div>
package/public/sw.js CHANGED
@@ -1 +1 @@
1
- if(!self.define){let s,e={};const l=(l,i)=>(l=new URL(l+".js",i).href,e[l]||new Promise(e=>{if("document"in self){const s=document.createElement("script");s.src=l,s.onload=e,document.head.appendChild(s)}else s=l,importScripts(l),e()}).then(()=>{let s=e[l];if(!s)throw new Error(`Module ${l} didn’t register its module`);return s}));self.define=(i,n)=>{const r=s||("document"in self?document.currentScript.src:"")||location.href;if(e[r])return;let a={};const o=s=>l(s,r),u={module:{uri:r},exports:a,require:o};e[r]=Promise.all(i.map(s=>u[s]||o(s))).then(s=>(n(...s),a))}}define(["./workbox-6e9b121d"],function(s){"use strict";self.skipWaiting(),s.clientsClaim(),s.precacheAndRoute([{url:"registerSW.js",revision:"1872c500de691dce40960bb85481de07"},{url:"og-image.png",revision:"f1563b4bdc7d1a4ab0aef864b0c2294e"},{url:"index.html",revision:"383366b114d61705105b790948e5dab2"},{url:"icon-maskable-512x512.png",revision:"69ada030d99c4a087bc309c00d716654"},{url:"icon-maskable-192x192.png",revision:"bf88226fe789dcb35bf89a307d3ba1af"},{url:"icon-512x512.png",revision:"74e561c3eb152bbb9cdcb333b5f1f3be"},{url:"icon-192x192.png",revision:"0bc2b74efb274c01d9eb50f717f4b7cf"},{url:"favicon.svg",revision:"e91ea32c7308cc2267ae15a5974a27f8"},{url:"apple-touch-icon-180x180.png",revision:"34c1b155ebc55bee221777f86f4612d8"},{url:"apple-touch-icon-152x152.png",revision:"8cc7ef3bc3aa19c3d8a29a58646d0636"},{url:"apple-touch-icon-120x120.png",revision:"7057fb6fb60df3fcf3cd49883db13be9"},{url:"assets/workflow-BBglj_Z2.js",revision:null},{url:"assets/wifi-H4egMUxs.js",revision:null},{url:"assets/users-BMPck0mS.js",revision:null},{url:"assets/useFetch-MXa-9JSO.js",revision:null},{url:"assets/trash-2-Dd56pXgX.js",revision:null},{url:"assets/task-constants-Dp2Z7Oy2.js",revision:null},{url:"assets/string-YaUnvj19.js",revision:null},{url:"assets/status-colors-B4QEmFCj.js",revision:null},{url:"assets/settings-BnGHAjei.js",revision:null},{url:"assets/scroll-text-BTgxJ_ef.js",revision:null},{url:"assets/rotate-ccw-Bg7m1k4d.js",revision:null},{url:"assets/plus-_jiW6Lm5.js",revision:null},{url:"assets/pencil-Dn-XJKV1.js",revision:null},{url:"assets/password-CHk45-jw.js",revision:null},{url:"assets/loader-circle-DR8kSH1v.js",revision:null},{url:"assets/key-Dwx1qupP.js",revision:null},{url:"assets/index-cD19J97z.js",revision:null},{url:"assets/index-DPmKxmNF.css",revision:null},{url:"assets/external-link-C-B5369y.js",revision:null},{url:"assets/download-DV4Kh1h0.js",revision:null},{url:"assets/date-BdNtiQTP.js",revision:null},{url:"assets/copy-Dc1cX6IX.js",revision:null},{url:"assets/chevron-right-D4uXRQzR.js",revision:null},{url:"assets/bot-D7QLScHH.js",revision:null},{url:"assets/arrow-right-DeGBMI6T.js",revision:null},{url:"assets/arrow-left-DstMBAfk.js",revision:null},{url:"assets/WorkerSetupPage-CsnfhcwG.js",revision:null},{url:"assets/WorkerSetupGuidePage-BctnWaMP.js",revision:null},{url:"assets/WorkerOperationsPage-CtTFUWG5.js",revision:null},{url:"assets/WorkerListPage-DHvQlCsO.js",revision:null},{url:"assets/WorkerDetailPage-D78m3kjR.js",revision:null},{url:"assets/TotpSetupPage-BcYa1vPS.js",revision:null},{url:"assets/TokenManage-DDd4jBAr.js",revision:null},{url:"assets/TerminalHomePage-D5wOz0IB.js",revision:null},{url:"assets/TaskStatusBadge-Dc6jdI5L.js",revision:null},{url:"assets/TaskListPage-D5-mACwG.js",revision:null},{url:"assets/TaskDetailPage-65DmvECK.js",revision:null},{url:"assets/SkillPage-Cl-gL5d5.js",revision:null},{url:"assets/Skeleton-CN0GLaxk.js",revision:null},{url:"assets/SettingsPage-BtqtS18c.js",revision:null},{url:"assets/Select-DmVMUBYP.js",revision:null},{url:"assets/RemoveMemberConfirmDialog-DQOAvyrC.js",revision:null},{url:"assets/QuickAuth-VRDSG9VX.js",revision:null},{url:"assets/PtyTerminal-C4iNjcTR.js",revision:null},{url:"assets/PtyTerminal-Beg8tuEN.css",revision:null},{url:"assets/ProjectListPage-BUJYxMWu.js",revision:null},{url:"assets/ProjectDetailPage-CqY3JCnd.js",revision:null},{url:"assets/ProfilePage-PqWvvnRQ.js",revision:null},{url:"assets/PipelineEditorPage-C4TF57aq.js",revision:null},{url:"assets/PipelineConfigPage-e4Cz32sl.js",revision:null},{url:"assets/PermissionsPage-DnPETkqw.js",revision:null},{url:"assets/OnboardingGuide-CAx3cSZD.js",revision:null},{url:"assets/NotFoundPage-DlCCcK7Z.js",revision:null},{url:"assets/MetricBar-BI1-2UnI.js",revision:null},{url:"assets/LoginPage-DaRwLlEK.js",revision:null},{url:"assets/LocalDevelopmentPage-D2a18Sqm.js",revision:null},{url:"assets/LandingPage-ANinQmsj.js",revision:null},{url:"assets/InstallationPage-B9dHKZCT.js",revision:null},{url:"assets/InfoRow-CNzmrBAT.js",revision:null},{url:"assets/HomePage-D4QMGbWg.js",revision:null},{url:"assets/EnvVariablesPage-C3s18iT9.js",revision:null},{url:"assets/EmptyState-qH9mjTP8.js",revision:null},{url:"assets/EditProjectPage-YWr9HIxh.js",revision:null},{url:"assets/DocsPrimitives-CCOXPEo4.js",revision:null},{url:"assets/DocsLayout-DRoWEbLH.js",revision:null},{url:"assets/DocsIndexPage-TEKF85em.js",revision:null},{url:"assets/DeveloperSetupPage-CnlPQ78U.js",revision:null},{url:"assets/DeveloperManage-_3pjAISj.js",revision:null},{url:"assets/DevWorkflowPage-CQmGKq5w.js",revision:null},{url:"assets/DeploymentPage-B4W9CRX3.js",revision:null},{url:"assets/CliReferencePage-BIRo7DNY.js",revision:null},{url:"assets/ChangelogPage-D_Z-q2Xk.js",revision:null},{url:"assets/BotSetupPage-BnqW_hH0.js",revision:null},{url:"assets/BotManage-PXJ_BJBk.js",revision:null},{url:"assets/BotIntegrationPage-Btv8-BIL.js",revision:null},{url:"assets/BindPlatformPage-DIMohni0.js",revision:null},{url:"assets/AuditLogPage-CyMUtVxe.js",revision:null},{url:"assets/ArchitecturePage-dBVM4J-2.js",revision:null},{url:"assets/ApiReferencePage-rP70i-cC.js",revision:null},{url:"assets/AdminPage-Bf5USIyb.js",revision:null},{url:"assets/AccessTokensPage-D3vVhJ9o.js",revision:null},{url:"apple-touch-icon-180x180.png",revision:"34c1b155ebc55bee221777f86f4612d8"},{url:"favicon.svg",revision:"e91ea32c7308cc2267ae15a5974a27f8"},{url:"icon-192x192.png",revision:"0bc2b74efb274c01d9eb50f717f4b7cf"},{url:"icon-512x512.png",revision:"74e561c3eb152bbb9cdcb333b5f1f3be"},{url:"icon-maskable-192x192.png",revision:"bf88226fe789dcb35bf89a307d3ba1af"},{url:"icon-maskable-512x512.png",revision:"69ada030d99c4a087bc309c00d716654"},{url:"manifest.webmanifest",revision:"fefa2ba09d815fe1773d1fdaaf97d9e5"}],{}),s.cleanupOutdatedCaches(),s.registerRoute(new s.NavigationRoute(s.createHandlerBoundToURL("/index.html"))),s.registerRoute(/^https:\/\/fonts\.googleapis\.com/,new s.CacheFirst({cacheName:"google-fonts-stylesheets",plugins:[]}),"GET"),s.registerRoute(/^https:\/\/fonts\.gstatic\.com/,new s.CacheFirst({cacheName:"google-fonts-webfonts",plugins:[new s.ExpirationPlugin({maxEntries:10,maxAgeSeconds:31536e3})]}),"GET")});
1
+ if(!self.define){let s,e={};const l=(l,i)=>(l=new URL(l+".js",i).href,e[l]||new Promise(e=>{if("document"in self){const s=document.createElement("script");s.src=l,s.onload=e,document.head.appendChild(s)}else s=l,importScripts(l),e()}).then(()=>{let s=e[l];if(!s)throw new Error(`Module ${l} didn’t register its module`);return s}));self.define=(i,n)=>{const r=s||("document"in self?document.currentScript.src:"")||location.href;if(e[r])return;let o={};const a=s=>l(s,r),u={module:{uri:r},exports:o,require:a};e[r]=Promise.all(i.map(s=>u[s]||a(s))).then(s=>(n(...s),o))}}define(["./workbox-6e9b121d"],function(s){"use strict";self.skipWaiting(),s.clientsClaim(),s.precacheAndRoute([{url:"registerSW.js",revision:"1872c500de691dce40960bb85481de07"},{url:"og-image.png",revision:"f1563b4bdc7d1a4ab0aef864b0c2294e"},{url:"index.html",revision:"6eb940c443dc74c9347c4a0e06a56190"},{url:"icon-maskable-512x512.png",revision:"69ada030d99c4a087bc309c00d716654"},{url:"icon-maskable-192x192.png",revision:"bf88226fe789dcb35bf89a307d3ba1af"},{url:"icon-512x512.png",revision:"74e561c3eb152bbb9cdcb333b5f1f3be"},{url:"icon-192x192.png",revision:"0bc2b74efb274c01d9eb50f717f4b7cf"},{url:"favicon.svg",revision:"e91ea32c7308cc2267ae15a5974a27f8"},{url:"apple-touch-icon-180x180.png",revision:"34c1b155ebc55bee221777f86f4612d8"},{url:"apple-touch-icon-152x152.png",revision:"8cc7ef3bc3aa19c3d8a29a58646d0636"},{url:"apple-touch-icon-120x120.png",revision:"7057fb6fb60df3fcf3cd49883db13be9"},{url:"assets/workflow-CKxBZ5fU.js",revision:null},{url:"assets/wifi-D2pd5rRn.js",revision:null},{url:"assets/users-BCYHlSS3.js",revision:null},{url:"assets/useFetch-DU_oIUZH.js",revision:null},{url:"assets/trash-2-Bcn4eyUC.js",revision:null},{url:"assets/task-constants-DKG5xBo3.js",revision:null},{url:"assets/string-YaUnvj19.js",revision:null},{url:"assets/status-colors-CLuIPs8b.js",revision:null},{url:"assets/settings-B5nzxYCc.js",revision:null},{url:"assets/scroll-text-Ce4yCIJE.js",revision:null},{url:"assets/rotate-ccw-MDBnN5i8.js",revision:null},{url:"assets/plus-C6Sc6xJi.js",revision:null},{url:"assets/pencil-B-N6brzE.js",revision:null},{url:"assets/password-CHk45-jw.js",revision:null},{url:"assets/loader-circle-BcHWUyWN.js",revision:null},{url:"assets/key-CDiB4vcN.js",revision:null},{url:"assets/index-I34W3bvr.js",revision:null},{url:"assets/index-D_Ub6LeZ.css",revision:null},{url:"assets/external-link-B2o9w-yf.js",revision:null},{url:"assets/download-C4NiiFc1.js",revision:null},{url:"assets/date-BdNtiQTP.js",revision:null},{url:"assets/copy-Bzqy0i1r.js",revision:null},{url:"assets/chevron-right-jsUl3t1F.js",revision:null},{url:"assets/bot-bjQZUmE4.js",revision:null},{url:"assets/arrow-right-BuVf5xrX.js",revision:null},{url:"assets/arrow-left-Dy6FYgId.js",revision:null},{url:"assets/WorkerSetupPage-D_-meG6o.js",revision:null},{url:"assets/WorkerSetupGuidePage-a1BZNEcM.js",revision:null},{url:"assets/WorkerOperationsPage-DCM4tx9s.js",revision:null},{url:"assets/WorkerListPage-Ct0QwBxV.js",revision:null},{url:"assets/WorkerDetailPage-BWboaNsx.js",revision:null},{url:"assets/TotpSetupPage-oMVmbv99.js",revision:null},{url:"assets/TokenManage-Bl2bCiEb.js",revision:null},{url:"assets/TerminalHomePage-C_xx5uJQ.js",revision:null},{url:"assets/TaskStatusBadge-C6r8HwVl.js",revision:null},{url:"assets/TaskListPage-Dot4avUt.js",revision:null},{url:"assets/TaskDetailPage-BsKVvlqR.js",revision:null},{url:"assets/SkillPage-PfbPy_rm.js",revision:null},{url:"assets/Skeleton-b8eEoVm4.js",revision:null},{url:"assets/SettingsPage-DtrnQy7c.js",revision:null},{url:"assets/Select-Sfe5_i7O.js",revision:null},{url:"assets/RemoveMemberConfirmDialog-Cr5M3kX8.js",revision:null},{url:"assets/QuickAuth-JBik1Ezc.js",revision:null},{url:"assets/PtyTerminal-CTD3fC09.js",revision:null},{url:"assets/PtyTerminal-Beg8tuEN.css",revision:null},{url:"assets/ProjectListPage-BRuMJzG2.js",revision:null},{url:"assets/ProjectDetailPage-DojggcMs.js",revision:null},{url:"assets/ProfilePage-uUa34lzB.js",revision:null},{url:"assets/PipelineEditorPage-Cu7Dn_bf.js",revision:null},{url:"assets/PipelineConfigPage-BTMnMbNs.js",revision:null},{url:"assets/PermissionsPage-w7Kto8BH.js",revision:null},{url:"assets/OnboardingGuide-Dz_Qoq-F.js",revision:null},{url:"assets/NotFoundPage-qsdy1mss.js",revision:null},{url:"assets/MetricBar-C9740901.js",revision:null},{url:"assets/LoginPage-DDIS280b.js",revision:null},{url:"assets/LocalDevelopmentPage-C4H4eeD3.js",revision:null},{url:"assets/LandingPage-B1urdKhy.js",revision:null},{url:"assets/InstallationPage-BlqJZLjM.js",revision:null},{url:"assets/InfoRow-5gGqzH3j.js",revision:null},{url:"assets/HomePage-CUiDsXW_.js",revision:null},{url:"assets/EnvVariablesPage-CLFK3yuC.js",revision:null},{url:"assets/EmptyState-B7KGyI99.js",revision:null},{url:"assets/EditProjectPage-CltSIUGw.js",revision:null},{url:"assets/DocsPrimitives-DtSlBzYZ.js",revision:null},{url:"assets/DocsLayout-BkrbXbSs.js",revision:null},{url:"assets/DocsIndexPage-DUUCbdOX.js",revision:null},{url:"assets/DeveloperSetupPage-BSTeL5Rd.js",revision:null},{url:"assets/DeveloperManage-C7gxcQwD.js",revision:null},{url:"assets/DevWorkflowPage-BdH0FPp5.js",revision:null},{url:"assets/DeploymentPage-Bmhoh17P.js",revision:null},{url:"assets/CliReferencePage-CBBT01JY.js",revision:null},{url:"assets/ChangelogPage-CjYDrTO4.js",revision:null},{url:"assets/BotSetupPage-DYBOeFfA.js",revision:null},{url:"assets/BotManage-BLHpJOfp.js",revision:null},{url:"assets/BotIntegrationPage-DtRpsUtv.js",revision:null},{url:"assets/BindPlatformPage-DbCsXnBI.js",revision:null},{url:"assets/AuditLogPage-BTmmzLgK.js",revision:null},{url:"assets/ArchitecturePage-7Y5ih2_d.js",revision:null},{url:"assets/ApiReferencePage-CIYZiswD.js",revision:null},{url:"assets/AdminPage-DxrkDoXf.js",revision:null},{url:"assets/AccessTokensPage-C2h0K0kH.js",revision:null},{url:"apple-touch-icon-180x180.png",revision:"34c1b155ebc55bee221777f86f4612d8"},{url:"favicon.svg",revision:"e91ea32c7308cc2267ae15a5974a27f8"},{url:"icon-192x192.png",revision:"0bc2b74efb274c01d9eb50f717f4b7cf"},{url:"icon-512x512.png",revision:"74e561c3eb152bbb9cdcb333b5f1f3be"},{url:"icon-maskable-192x192.png",revision:"bf88226fe789dcb35bf89a307d3ba1af"},{url:"icon-maskable-512x512.png",revision:"69ada030d99c4a087bc309c00d716654"},{url:"manifest.webmanifest",revision:"fefa2ba09d815fe1773d1fdaaf97d9e5"}],{}),s.cleanupOutdatedCaches(),s.registerRoute(new s.NavigationRoute(s.createHandlerBoundToURL("/index.html"))),s.registerRoute(/^https:\/\/fonts\.googleapis\.com/,new s.CacheFirst({cacheName:"google-fonts-stylesheets",plugins:[]}),"GET"),s.registerRoute(/^https:\/\/fonts\.gstatic\.com/,new s.CacheFirst({cacheName:"google-fonts-webfonts",plugins:[new s.ExpirationPlugin({maxEntries:10,maxAgeSeconds:31536e3})]}),"GET")});
@@ -1,6 +0,0 @@
1
- import{c as z,a as E,r as n,j as e,X as D,h as _,o as W,t as U}from"./index-cD19J97z.js";import{S as M}from"./Select-DmVMUBYP.js";import{C as O}from"./DocsPrimitives-CCOXPEo4.js";import{T as F}from"./trash-2-Dd56pXgX.js";import{P as q}from"./plus-_jiW6Lm5.js";import{E as R}from"./EmptyState-qH9mjTP8.js";import{T}from"./Skeleton-CN0GLaxk.js";import{u as P}from"./useFetch-MXa-9JSO.js";import{d as A}from"./status-colors-B4QEmFCj.js";import{B as H}from"./bot-D7QLScHH.js";import{P as V}from"./pencil-Dn-XJKV1.js";import"./copy-Dc1cX6IX.js";/**
2
- * @license lucide-react v0.469.0 - ISC
3
- *
4
- * This source code is licensed under the ISC license.
5
- * See the LICENSE file in the root directory of this source tree.
6
- */const X=z("Link2",[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]]),G=[{value:"lark",label:"lark_(feishu)"},{value:"slack",label:"slack"}];function J({isOpen:r,onClose:j,onCreated:f,editBot:m,onEditClose:s}){const{t}=E(),i=!!m,[C,y]=n.useState(""),[o,b]=n.useState("lark"),[g,u]=n.useState(""),[c,N]=n.useState(""),[p,h]=n.useState(""),[k,w]=n.useState(!1),[S,x]=n.useState("");n.useEffect(()=>{r&&(m?(y(m.name),b(m.platform),u(m.appId),N(""),h("")):(y(""),b("lark"),u(""),N(""),h("")),w(!1),x(""))},[m,r]);function v(){i&&s?s():j()}async function a(){if(x(""),!C.trim()||!g.trim()){x(t("admin.name_and_app_id_required"));return}if(i){if(o==="slack"&&c.trim()&&!c.trim().startsWith("xoxb-")){x(t("admin.invalid_bot_token"));return}}else{if(!c.trim()){x(t("admin.app_secret_required"));return}if(o==="slack"){if(!c.trim().startsWith("xoxb-")){x(t("admin.invalid_bot_token"));return}if(!p.trim()){x(t("admin.signing_secret_required"));return}}}const l={name:C.trim(),platform:o,appId:g.trim()};c.trim()&&(l.appSecret=c.trim()),p.trim()&&(l.webhookToken=p.trim());try{w(!0),i?await _.put(`admin/bots/${m.id}`,{json:l}).json():await _.post("admin/bots",{json:l}).json(),v(),f()}catch(B){const K=B instanceof Error?B.message:t(i?"admin.failed_to_update_bot":"admin.failed_to_create_bot");x(K)}finally{w(!1)}}if(!r)return null;const I=window.location.origin,$=[{label:t("admin.webhook_events_url"),url:`${I}/webhook/slack/events`,hint:t("admin.slack_events_hint")},{label:t("admin.webhook_interact_url"),url:`${I}/webhook/slack/interact`,hint:t("admin.slack_interact_hint")},{label:t("admin.webhook_commands_url"),url:`${I}/webhook/slack/commands`,hint:t("admin.slack_commands_hint")}],d=[{label:t("admin.webhook_request_url"),url:`${I}/webhook/lark`,hint:t("admin.webhook_config_hint_lark")}],L=o==="slack"?$:d;return e.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center",style:{backdropFilter:"blur(2px)"},children:[e.jsx("div",{className:"fixed inset-0 bg-[var(--modal-backdrop)]",onClick:v}),e.jsxs("div",{className:"relative z-10 w-full max-w-[480px] rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] font-mono",children:[e.jsxs("div",{className:"flex items-center justify-between border-b border-[var(--border)] px-5 py-4",children:[e.jsx("h3",{className:"text-sm text-[var(--text-primary)]",children:i?`// ${t("admin.edit_bot")}`:`// ${t("admin.create_bot")}`}),e.jsx("button",{type:"button",className:"rounded-[4px] p-1 text-[var(--text-muted)] hover:text-[var(--text-primary)] transition-colors",onClick:v,children:e.jsx(D,{className:"h-4 w-4"})})]}),e.jsxs("div",{className:"space-y-4 px-5 py-5",children:[S&&e.jsx("div",{className:"rounded-[4px] border border-red-500/30 bg-red-500/10 px-3 py-2 text-xs text-red-400",children:S}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1.5 block text-xs text-[var(--text-muted)]",children:t("admin.bot_name")}),e.jsx("input",{type:"text",placeholder:"e.g. overlord lark bot",value:C,onChange:l=>y(l.target.value),className:"w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-xs text-[var(--text-primary)] placeholder:text-[var(--text-muted)] focus:outline-none focus:border-[var(--accent)]"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1.5 block text-xs text-[var(--text-muted)]",children:t("admin.platform")}),e.jsx(M,{value:o,onChange:b,options:G,disabled:i})]}),e.jsxs("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-3",children:[e.jsx("div",{className:"mb-2 text-xs text-[var(--text-muted)]",children:t("admin.webhook_config")}),e.jsx("div",{className:"text-xs text-[var(--text-muted)] mb-3",children:t(o==="slack"?"admin.webhook_config_hint_slack":"admin.webhook_config_hint_lark")}),e.jsx("div",{className:"space-y-2",children:L.map(l=>e.jsxs("div",{children:[e.jsx("div",{className:"text-xs text-[var(--text-muted)] mb-1",children:l.label}),e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx("code",{className:"flex-1 rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] px-2 py-1 text-xs text-[var(--text-primary)] select-all overflow-x-auto",children:l.url}),e.jsx(O,{text:l.url})]}),e.jsx("div",{className:"mt-0.5 text-xs text-[var(--text-muted)]",children:l.hint})]},l.label))})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1.5 block text-xs text-[var(--text-muted)]",children:t("admin.app_id")}),e.jsx("div",{className:"mb-1 text-xs text-[var(--text-muted)]",children:t(o==="slack"?"admin.app_id_hint_slack":"admin.app_id_hint_lark")}),e.jsx("input",{type:"text",placeholder:"platform application id",value:g,onChange:l=>u(l.target.value),className:"w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-xs text-[var(--text-primary)] placeholder:text-[var(--text-muted)] focus:outline-none focus:border-[var(--accent)]"})]}),o==="slack"?e.jsxs(e.Fragment,{children:[e.jsxs("div",{children:[e.jsx("label",{className:"mb-1.5 block text-xs text-[var(--text-muted)]",children:t(i?"admin.bot_token_keep_current":"admin.bot_token")}),e.jsx("div",{className:"mb-1 text-xs text-[var(--text-muted)]",children:t("admin.bot_token_hint")}),e.jsx("input",{type:"password",placeholder:t("admin.bot_token_placeholder"),value:c,onChange:l=>N(l.target.value),className:"w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-xs text-[var(--text-primary)] placeholder:text-[var(--text-muted)] focus:outline-none focus:border-[var(--accent)]"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1.5 block text-xs text-[var(--text-muted)]",children:t(i?"admin.signing_secret_keep_current":"admin.signing_secret")}),e.jsx("div",{className:"mb-1 text-xs text-[var(--text-muted)]",children:t("admin.signing_secret_hint")}),e.jsx("input",{type:"password",placeholder:t("admin.signing_secret_placeholder"),value:p,onChange:l=>h(l.target.value),className:"w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-xs text-[var(--text-primary)] placeholder:text-[var(--text-muted)] focus:outline-none focus:border-[var(--accent)]"})]})]}):e.jsxs("div",{children:[e.jsx("label",{className:"mb-1.5 block text-xs text-[var(--text-muted)]",children:t(i?"admin.app_secret_keep_current":"admin.app_secret")}),e.jsx("div",{className:"mb-1 text-xs text-[var(--text-muted)]",children:t("admin.app_secret_hint_lark")}),e.jsx("input",{type:"password",placeholder:"platform application secret",value:c,onChange:l=>N(l.target.value),className:"w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-xs text-[var(--text-primary)] placeholder:text-[var(--text-muted)] focus:outline-none focus:border-[var(--accent)]"})]})]}),e.jsxs("div",{className:"flex items-center justify-end gap-2 border-t border-[var(--border)] px-5 py-4",children:[e.jsx("button",{type:"button",className:"rounded-[4px] border border-[var(--border)] px-3 py-1.5 text-xs text-[var(--text-secondary)] hover:text-[var(--text-primary)] transition-colors",onClick:v,children:t("common.cancel")}),e.jsx("button",{type:"button",className:"rounded-[4px] bg-[var(--accent)] px-3 py-1.5 text-xs text-black hover:opacity-90 transition-opacity disabled:opacity-50",disabled:k,onClick:a,children:t(k?i?"common.saving":"common.creating":i?"common.save_changes":"common.create")})]})]})]})}function Q({isOpen:r,bot:j,onClose:f,onUpdated:m}){const{t:s}=E(),[t,i]=n.useState([]),[C,y]=n.useState([]),[o,b]=n.useState(!1),[g,u]=n.useState(!1),[c,N]=n.useState(""),[p,h]=n.useState(""),[k,w]=n.useState(""),[S,x]=n.useState(""),v=n.useCallback(async()=>{try{const d=await _.get(`admin/bots/${j.id}/bindings`).json();i(d)}catch{}},[j.id]);n.useEffect(()=>{r&&v()},[r,v]);const a=n.useCallback(async()=>{try{const d=await _.get("web/projects").json();y(d)}catch{}},[]);n.useEffect(()=>{r&&a()},[r,a]);const I=async()=>{if(x(""),!c.trim()||!p.trim()||!k){x(s("admin.chat_binding_all_fields_required"));return}try{b(!0),await _.post(`admin/bots/${j.id}/bindings`,{json:{platformChatId:c.trim(),chatName:p.trim(),projectKey:k}}).json(),N(""),h(""),w(""),u(!1),m()}catch(d){const L=d instanceof Error?d.message:s("admin.failed_to_add_binding");x(L)}finally{b(!1)}},$=async d=>{try{await _.delete(`admin/bots/${j.id}/bindings`,{json:{platformChatId:d.platformChatId}}),i(L=>L.filter(l=>l.id!==d.id)),m()}catch{}};return r?e.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center",style:{backdropFilter:"blur(2px)"},children:[e.jsx("div",{className:"fixed inset-0 bg-[var(--modal-backdrop)]",onClick:f}),e.jsxs("div",{className:"relative z-10 w-full max-w-[600px] rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] font-mono",children:[e.jsxs("div",{className:"flex items-center justify-between border-b border-[var(--border)] px-5 py-4",children:[e.jsx("h3",{className:"text-sm text-[var(--text-primary)]",children:s("admin.chat_binding_title",{name:j.name})}),e.jsx("button",{type:"button",className:"rounded-[4px] p-1 text-[var(--text-muted)] hover:text-[var(--text-primary)] transition-colors",onClick:f,children:e.jsx(D,{className:"h-4 w-4"})})]}),e.jsxs("div",{className:"px-5 py-5",children:[S&&e.jsx("div",{className:"mb-4 rounded-[4px] border border-red-500/30 bg-red-500/10 px-3 py-2 text-xs text-red-400",children:S}),t.length===0&&!g?e.jsx("p",{className:"py-4 text-center text-xs text-[var(--text-muted)]",children:s("admin.chat_binding_no_bindings")}):e.jsx("div",{className:"overflow-x-auto",children:e.jsxs("table",{className:"w-full text-xs",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"border-b border-[var(--border)] text-left text-[var(--text-muted)]",children:[e.jsx("th",{className:"pb-2 pr-4 font-normal",children:s("admin.chat_name")}),e.jsx("th",{className:"pb-2 pr-4 font-normal",children:s("admin.chat_id")}),e.jsx("th",{className:"pb-2 pr-4 font-normal",children:s("admin.project")}),e.jsx("th",{className:"pb-2 font-normal",children:s("common.remove")})]})}),e.jsx("tbody",{children:t.map(d=>e.jsxs("tr",{className:"border-b border-[var(--border-row)] hover:bg-white/[0.02] transition-colors",children:[e.jsx("td",{className:"py-2.5 pr-4 text-[var(--text-primary)]",children:d.chatName}),e.jsx("td",{className:"py-2.5 pr-4 text-[var(--text-secondary)]",children:d.platformChatId}),e.jsx("td",{className:"py-2.5 pr-4 text-[var(--text-secondary)]",children:d.projectKey}),e.jsx("td",{className:"py-2.5",children:e.jsx("button",{type:"button",className:"rounded-[4px] p-1.5 text-red-400 hover:text-red-300 hover:bg-white/[0.05] transition-colors",onClick:()=>$(d),children:e.jsx(F,{className:"h-3.5 w-3.5"})})})]},d.id))})]})}),g&&e.jsxs("div",{className:"mt-4 space-y-3 rounded-[4px] border border-[var(--border)] bg-[var(--bg-primary)] p-4",children:[e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:s("admin.chat_binding_add")}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1.5 block text-xs text-[var(--text-muted)]",children:s("admin.chat_id")}),e.jsx("input",{type:"text",placeholder:s("admin.chat_binding_id_placeholder"),value:c,onChange:d=>N(d.target.value),className:"w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-xs text-[var(--text-primary)] placeholder:text-[var(--text-muted)] focus:outline-none focus:border-[var(--accent)]"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1.5 block text-xs text-[var(--text-muted)]",children:s("admin.chat_name")}),e.jsx("input",{type:"text",placeholder:s("admin.chat_binding_name_placeholder"),value:p,onChange:d=>h(d.target.value),className:"w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-xs text-[var(--text-primary)] placeholder:text-[var(--text-muted)] focus:outline-none focus:border-[var(--accent)]"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1.5 block text-xs text-[var(--text-muted)]",children:s("admin.project")}),e.jsx(M,{value:k,onChange:w,options:C.map(d=>({value:d.key,label:`${d.name} (${d.key})`})),placeholder:s("admin.chat_binding_select_project")})]}),e.jsxs("div",{className:"flex justify-end gap-2",children:[e.jsx("button",{type:"button",className:"rounded-[4px] border border-[var(--border)] px-3 py-1.5 text-xs text-[var(--text-secondary)] hover:text-[var(--text-primary)] transition-colors",onClick:()=>u(!1),children:s("common.cancel")}),e.jsx("button",{type:"button",className:"rounded-[4px] bg-[var(--accent)] px-3 py-1.5 text-xs text-black hover:opacity-90 transition-opacity disabled:opacity-50",disabled:o,onClick:I,children:s(o?"admin.chat_binding_adding":"admin.add_binding")})]})]})]}),e.jsxs("div",{className:"flex items-center justify-between border-t border-[var(--border)] px-5 py-4",children:[e.jsx("div",{children:!g&&e.jsxs("button",{type:"button",className:"flex items-center gap-1 rounded-[4px] border border-[var(--border)] px-2.5 py-1.5 text-xs text-[var(--text-secondary)] hover:text-[var(--text-primary)] hover:border-[var(--accent)] transition-colors",onClick:()=>u(!0),children:[e.jsx(q,{className:"h-3.5 w-3.5"}),s("admin.add_binding")]})}),e.jsx("button",{type:"button",className:"rounded-[4px] border border-[var(--border)] px-3 py-1.5 text-xs text-[var(--text-secondary)] hover:text-[var(--text-primary)] transition-colors",onClick:f,children:s("common.close")})]})]})]}):null}function ce(){const{t:r}=E(),[j,f]=n.useState(!1),[m,s]=n.useState(null),[t,i]=n.useState(null),[C,y]=n.useState(!1),[o,b]=n.useState(null),[g,u]=n.useState(!1),{data:c,loading:N,refetch:p}=P(()=>_.get("admin/bots").json(),[]),{data:h,loading:k,refetch:w}=P(()=>_.get("admin/bots/all-bindings").json(),[]);async function S(){if(o){u(!0);try{await _.delete(`admin/bots/${o.id}`),y(!1),b(null),p()}catch{U.error(r("admin.failed_to_delete_bot"))}finally{u(!1)}}}function x(a){switch(a){case"lark":return"text-blue-400";case"slack":return"text-yellow-400";default:return"text-[var(--text-secondary)]"}}function v(a){return e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx("button",{type:"button",className:"rounded-[4px] p-2.5 md:p-1.5 text-[var(--text-secondary)] hover:text-[var(--text-primary)] hover:bg-white/[0.05] transition-colors",title:r("common.edit"),onClick:()=>s(a),children:e.jsx(V,{className:"h-3.5 w-3.5"})}),e.jsx("button",{type:"button",className:"rounded-[4px] p-2.5 md:p-1.5 text-[var(--text-secondary)] hover:text-[var(--text-primary)] hover:bg-white/[0.05] transition-colors",title:r("admin.chat_bindings"),onClick:()=>i(a),children:e.jsx(X,{className:"h-3.5 w-3.5"})}),e.jsx("button",{type:"button",className:"rounded-[4px] p-2.5 md:p-1.5 text-red-400 hover:text-red-300 hover:bg-white/[0.05] transition-colors",title:r("common.delete"),onClick:()=>{b(a),y(!0)},children:e.jsx(F,{className:"h-3.5 w-3.5"})})]})}return e.jsxs("div",{className:"font-mono",children:[e.jsxs("div",{className:"mb-6 flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-sm text-[var(--text-primary)]",children:r("admin.bots_title")}),e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:r("admin.bots_subtitle")})]}),e.jsxs("button",{type:"button",className:"flex items-center gap-1.5 rounded-[4px] bg-[var(--accent)] px-3 py-1.5 text-xs text-black hover:opacity-90 transition-opacity",onClick:()=>{s(null),f(!0)},children:[e.jsx(q,{className:"h-3.5 w-3.5"}),r("admin.create_bot")]})]}),N?e.jsx("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-4",children:e.jsx(T,{rows:3})}):!c||c.length===0?e.jsx(R,{icon:H,title:r("admin.no_bots_configured"),description:r("admin.add_bot_desc"),actionLabel:r("admin.create_bot"),onAction:()=>{s(null),f(!0)}}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"hidden md:block overflow-x-auto",children:e.jsxs("table",{className:"w-full text-xs",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"border-b border-[var(--border)] text-left text-[var(--text-muted)]",children:[e.jsx("th",{className:"pb-2 pr-4 font-normal",children:r("admin.bot_name")}),e.jsx("th",{className:"pb-2 pr-4 font-normal",children:r("admin.platform")}),e.jsx("th",{className:"pb-2 pr-4 font-normal",children:r("admin.app_id")}),e.jsx("th",{className:"pb-2 pr-4 font-normal",children:r("admin.status")}),e.jsx("th",{className:"pb-2 pr-4 font-normal",children:r("common.created_at")}),e.jsx("th",{className:"pb-2 font-normal",children:r("common.actions")})]})}),e.jsx("tbody",{children:c.map(a=>e.jsxs("tr",{className:"border-b border-[var(--border-row)] hover:bg-white/[0.02] transition-colors",children:[e.jsx("td",{className:"py-2.5 pr-4 text-[var(--text-primary)]",children:a.name}),e.jsx("td",{className:"py-2.5 pr-4",children:e.jsx("span",{className:x(a.platform),children:a.platform})}),e.jsx("td",{className:"py-2.5 pr-4 text-[var(--text-secondary)]",children:a.appId}),e.jsx("td",{className:"py-2.5 pr-4",children:e.jsx("span",{className:A(a.status),children:a.status})}),e.jsx("td",{className:"py-2.5 pr-4 text-[var(--text-muted)]",children:new Date(a.createdAt).toLocaleDateString()}),e.jsx("td",{className:"py-2.5",children:v(a)})]},a.id))})]})}),e.jsx("div",{className:"md:hidden space-y-3",children:c.map(a=>e.jsxs("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-3",children:[e.jsxs("div",{className:"flex items-center justify-between mb-2",children:[e.jsx("span",{className:"text-xs text-[var(--text-primary)] font-medium",children:a.name}),v(a)]}),e.jsxs("div",{className:"flex items-center gap-3 text-[11px]",children:[e.jsx("span",{className:x(a.platform),children:a.platform}),e.jsx("span",{className:A(a.status),children:a.status})]}),e.jsx("div",{className:"mt-1 text-[11px] text-[var(--text-secondary)] truncate",children:a.appId})]},a.id))})]}),e.jsx(J,{isOpen:j||!!m,onClose:()=>{f(!1),s(null)},onCreated:p,editBot:m,onEditClose:()=>s(null)}),t&&e.jsx(Q,{isOpen:!!t,bot:t,onClose:()=>i(null),onUpdated:()=>{p(),w()}}),e.jsx(W,{isOpen:C,onClose:()=>{y(!1),b(null)},onConfirm:S,title:r("admin.delete_bot"),message:r("admin.delete_bot_confirm",{name:(o==null?void 0:o.name)??""}),confirmLabel:r("common.delete"),confirmVariant:"danger",isLoading:g}),e.jsxs("div",{className:"mt-8",children:[e.jsxs("h2",{className:"mb-4 text-sm text-[var(--text-primary)]",children:[r("admin.chat_bindings"),e.jsx("span",{className:"ml-2 text-[var(--text-muted)]",children:r("admin.chat_bindings_subtitle")})]}),k?e.jsx("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-4",children:e.jsx(T,{rows:3})}):!h||h.length===0?e.jsx("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-8 text-center",children:e.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:r("admin.no_chat_bindings")})}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"hidden md:block overflow-x-auto",children:e.jsxs("table",{className:"w-full text-xs",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"border-b border-[var(--border)] text-left text-[var(--text-muted)]",children:[e.jsx("th",{className:"pb-2 pr-4 font-normal",children:r("admin.bot")}),e.jsx("th",{className:"pb-2 pr-4 font-normal",children:r("admin.platform")}),e.jsx("th",{className:"pb-2 pr-4 font-normal",children:r("admin.chat_id")}),e.jsx("th",{className:"pb-2 pr-4 font-normal",children:r("admin.chat_name")}),e.jsx("th",{className:"pb-2 pr-4 font-normal",children:r("admin.project")}),e.jsx("th",{className:"pb-2 font-normal",children:r("common.created_at")})]})}),e.jsx("tbody",{children:h.map(a=>e.jsxs("tr",{className:"border-b border-[var(--border-row)] hover:bg-white/[0.02] transition-colors",children:[e.jsx("td",{className:"py-2.5 pr-4 text-[var(--text-primary)]",children:a.botName}),e.jsx("td",{className:"py-2.5 pr-4",children:e.jsx("span",{className:x(a.platform),children:a.platform})}),e.jsx("td",{className:"py-2.5 pr-4 text-[var(--text-secondary)]",children:a.platformChatId}),e.jsx("td",{className:"py-2.5 pr-4 text-[var(--text-secondary)]",children:a.chatName??"-"}),e.jsx("td",{className:"py-2.5 pr-4 text-[var(--text-secondary)]",children:a.projectKey??"-"}),e.jsx("td",{className:"py-2.5 text-[var(--text-muted)]",children:new Date(a.createdAt).toLocaleDateString()})]},a.id))})]})}),e.jsx("div",{className:"md:hidden space-y-3",children:h.map(a=>e.jsxs("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-3",children:[e.jsxs("div",{className:"flex items-center justify-between mb-1",children:[e.jsx("span",{className:"text-xs text-[var(--text-primary)] font-medium",children:a.botName}),e.jsx("span",{className:`text-[11px] ${x(a.platform)}`,children:a.platform})]}),e.jsx("div",{className:"text-[11px] text-[var(--text-secondary)] truncate",children:a.platformChatId}),e.jsxs("div",{className:"flex items-center gap-3 mt-1 text-[11px] text-[var(--text-muted)]",children:[e.jsx("span",{children:a.chatName??"-"}),e.jsx("span",{children:a.projectKey??"-"})]})]},a.id))})]})]})]})}export{ce as default};
@@ -1,2 +0,0 @@
1
- import{w as me,f as be,a as ve,r as s,G as j,A as p,h as i,j as e,L as je,z as ee,t as c}from"./index-cD19J97z.js";import{S as te}from"./Select-DmVMUBYP.js";import{U as he,A as ge,R as ye}from"./RemoveMemberConfirmDialog-DQOAvyrC.js";import{P as fe}from"./plus-_jiW6Lm5.js";function Ce(){const{key:n}=me(),l=be(),{t:r}=ve(),[o,re]=s.useState(null),[h,se]=s.useState([]),[ae,oe]=s.useState(!0),[C,g]=s.useState(!1),[y,S]=s.useState(""),[f,T]=s.useState(""),[M,I]=s.useState(""),[A,R]=s.useState(j.GITHUB),[P,U]=s.useState(""),[O,G]=s.useState(p.CLAUDE),[E,$]=s.useState(""),[D,L]=s.useState("50"),[B,F]=s.useState(""),[J,z]=s.useState(""),[q,H]=s.useState(""),[K,W]=s.useState("0"),[x,N]=s.useState(""),[X,k]=s.useState(null),[u,_]=s.useState(""),[Q,m]=s.useState(!1),[ne,V]=s.useState(!1),[d,w]=s.useState(null),[le,Y]=s.useState(!1),b=s.useCallback(async()=>{if(n)try{const[t,v]=await Promise.all([i.get(`web/projects/${n}`).json(),i.get(`web/projects/${n}/members`).json().catch(()=>[])]);if(re(t),se(v),k(t.gitTokenMasked??null),S(t.name),T(t.repoUrl),I(t.sshUrl??""),R(t.gitPlatform),U(t.defaultBranch),G(t.agentType),$(t.agentCommand??""),L(String(t.maxTurns)),F(t.workspaceRoot??""),z(t.setupCommands??""),H(t.testCommand??""),W(String(t.ptyOutputFilter??0)),t.pipeline)try{N(JSON.stringify(JSON.parse(t.pipeline),null,2))}catch{N(t.pipeline)}}catch{}finally{oe(!1)}},[n]);s.useEffect(()=>{b()},[b]);async function ce(t){if(t.preventDefault(),!o)return;g(!0);let v=null;if(x.trim())try{JSON.parse(x),v=x.trim()}catch{c.error(r("projects.invalid_pipeline_json")),g(!1);return}try{await i.put(`web/projects/${o.key}`,{json:{name:y,repoUrl:f,sshUrl:M||null,defaultBranch:P,gitPlatform:A,agentType:O,agentCommand:E||null,maxTurns:parseInt(D,10)||50,workspaceRoot:B||null,setupCommands:J||null,testCommand:q||null,ptyOutputFilter:parseInt(K,10)||0,pipeline:v}}),c.success(r("projects.project_saved")),l(`/projects/${o.key}`)}catch(Z){const ue=Z instanceof Error?Z.message:r("projects.failed_to_save_project");c.error(ue)}finally{g(!1)}}function de(){l(`/projects/${n}`)}async function ie(){if(!(!o||!u.trim())){m(!0);try{const t=await i.put(`web/projects/${o.key}/git-token`,{json:{token:u.trim()}}).json();k(t.gitTokenMasked),_(""),c.success(r("projects.git_token_saved"))}catch{c.error(r("projects.git_token_failed"))}finally{m(!1)}}}async function pe(){if(o){m(!0);try{await i.delete(`web/projects/${o.key}/git-token`),k(null),_(""),c.success(r("projects.git_token_cleared"))}catch{c.error(r("projects.git_token_failed"))}finally{m(!1)}}}async function xe(){if(!(!o||!d)){Y(!0);try{await i.delete(`web/projects/${o.key}/members`,{searchParams:{developerId:String(d.developerId)}}),await b()}catch{}finally{Y(!1),w(null)}}}return ae?e.jsx("div",{className:"flex justify-center py-20",children:e.jsx("div",{className:"h-8 w-8 animate-spin rounded-full border-4 border-[var(--border)] border-t-[var(--accent)]"})}):o?e.jsxs("form",{onSubmit:ce,className:"mx-auto max-w-6xl px-4 md:px-6 py-8",children:[e.jsxs("div",{className:"mb-2 text-xs text-[var(--text-muted)]",children:[e.jsx("span",{className:"cursor-pointer hover:text-[var(--text-secondary)]",onClick:()=>l("/projects"),children:r("projects.title")})," / ",e.jsx("span",{className:"cursor-pointer hover:text-[var(--text-secondary)]",onClick:()=>l(`/projects/${o.key}`),children:o.key})," / ",e.jsx("span",{className:"text-[var(--text-secondary)]",children:r("common.edit")})]}),e.jsx("h1",{className:"text-lg font-bold text-[var(--text-primary)] mb-4",children:r("projects.edit_project_title")}),e.jsxs("div",{className:"grid gap-6 lg:grid-cols-[1fr_400px]",children:[e.jsxs("div",{className:"space-y-6",children:[e.jsxs("section",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-5",children:[e.jsx("h2",{className:"mb-4 text-sm font-semibold text-[var(--accent)]",children:r("projects.basic_info")}),e.jsxs("div",{className:"space-y-3",children:[e.jsx(a,{label:r("projects.key"),children:e.jsx("input",{type:"text",value:o.key,readOnly:!0,className:"w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-xs text-[var(--text-muted)] outline-none opacity-60 cursor-not-allowed"})}),e.jsx(a,{label:r("projects.name"),children:e.jsx("input",{type:"text",value:y,onChange:t=>S(t.target.value),required:!0,className:"w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-xs text-[var(--text-primary)] outline-none focus:border-[var(--accent)]"})}),e.jsx(a,{label:r("projects.repo_url"),children:e.jsx("input",{type:"text",value:f,onChange:t=>T(t.target.value),required:!0,className:"w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-xs text-[var(--text-primary)] outline-none focus:border-[var(--accent)]"})}),e.jsxs(a,{label:r("projects.ssh_url"),children:[e.jsx("input",{type:"text",value:M,onChange:t=>I(t.target.value),placeholder:r("projects.ssh_url_placeholder"),className:"w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-xs text-[var(--text-primary)] outline-none focus:border-[var(--accent)]"}),e.jsx("p",{className:"mt-1 text-[11px] text-[var(--text-muted)]",children:r("projects.ssh_url_hint")})]}),e.jsx(a,{label:r("projects.git_platform"),children:e.jsx(te,{value:A,onChange:t=>R(t),options:[{value:j.GITHUB,label:r("projects.github")},{value:j.GITLAB,label:r("projects.gitlab")},{value:j.GITEA,label:r("projects.gitea")}]})}),e.jsx(a,{label:r("projects.default_branch"),children:e.jsx("input",{type:"text",value:P,onChange:t=>U(t.target.value),className:"w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-xs text-[var(--text-primary)] outline-none focus:border-[var(--accent)]"})})]})]}),e.jsxs("section",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-5",children:[e.jsx("h2",{className:"mb-4 text-sm font-semibold text-[var(--accent)]",children:r("projects.agent_config")}),e.jsxs("div",{className:"space-y-3",children:[e.jsx(a,{label:r("projects.agent_type"),children:e.jsx(te,{value:O,onChange:t=>G(t),options:[{value:p.CLAUDE,label:r("projects.claude")},{value:p.CURSOR,label:r("projects.cursor")},{value:p.CODEX,label:r("projects.codex")},{value:p.CUSTOM,label:r("projects.custom")}]})}),e.jsx(a,{label:r("projects.agent_command"),children:e.jsx("input",{type:"text",value:E,onChange:t=>$(t.target.value),placeholder:"custom agent command",className:"w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-xs text-[var(--text-primary)] outline-none focus:border-[var(--accent)]"})}),e.jsx(a,{label:r("projects.max_turns"),children:e.jsx("input",{type:"number",value:D,onChange:t=>L(t.target.value),min:1,className:"w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-xs text-[var(--text-primary)] outline-none focus:border-[var(--accent)]"})}),e.jsx(a,{label:r("projects.workspace_root"),children:e.jsx("input",{type:"text",value:B,onChange:t=>F(t.target.value),placeholder:"/path/to/workspace",className:"w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-xs text-[var(--text-primary)] outline-none focus:border-[var(--accent)]"})})]})]}),e.jsxs("section",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-5",children:[e.jsx("h2",{className:"mb-4 text-sm font-semibold text-[var(--accent)]",children:r("projects.environment")}),e.jsxs("div",{className:"space-y-3",children:[e.jsx(a,{label:r("projects.setup_commands"),children:e.jsx("textarea",{value:J,onChange:t=>z(t.target.value),rows:3,placeholder:`npm install
2
- npm run build`,className:"w-full resize-y rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-xs text-[var(--text-primary)] outline-none focus:border-[var(--accent)]"})}),e.jsx(a,{label:r("projects.post_command"),children:e.jsx("input",{type:"text",value:q,onChange:t=>H(t.target.value),placeholder:"npm test",className:"w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-xs text-[var(--text-primary)] outline-none focus:border-[var(--accent)]"})})]})]}),e.jsxs("section",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-5",children:[e.jsx("h2",{className:"mb-4 text-sm font-semibold text-[var(--accent)]",children:r("projects.security")}),e.jsx("div",{className:"space-y-3",children:e.jsx(a,{label:r("projects.pty_output_filter"),children:e.jsx("input",{type:"text",value:K,onChange:t=>W(t.target.value),className:"w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-xs text-[var(--text-primary)] outline-none focus:border-[var(--accent)]"})})})]})]}),e.jsxs("div",{className:"space-y-6",children:[e.jsxs("section",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-5",children:[e.jsx("h2",{className:"mb-4 text-sm font-semibold text-[var(--accent)]",children:r("projects.git_token")}),e.jsxs("div",{className:"space-y-3",children:[e.jsx(a,{label:r("projects.git_token_label"),children:e.jsx("div",{className:"flex items-center gap-2",children:e.jsx("span",{className:"text-xs text-[var(--text-secondary)]",children:X??r("common.not_set")})})}),e.jsxs(a,{label:r("projects.git_token_set"),children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("input",{type:"password",value:u,onChange:t=>_(t.target.value),placeholder:"ghp_xxxx...",className:"flex-1 rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-xs text-[var(--text-primary)] outline-none focus:border-[var(--accent)]"}),e.jsx("button",{type:"button",disabled:Q||!u.trim(),onClick:ie,className:"shrink-0 rounded-[4px] bg-[var(--accent)] px-3 py-2 text-xs font-medium text-black hover:opacity-90 transition-opacity disabled:opacity-50",children:r("common.save")})]}),e.jsx("p",{className:"mt-1 text-[11px] text-[var(--text-muted)]",children:r("projects.git_token_hint")})]}),X&&e.jsx("div",{className:"flex justify-end",children:e.jsx("button",{type:"button",disabled:Q,onClick:pe,className:"rounded-[4px] border border-[var(--destructive)] px-3 py-1.5 text-xs text-[var(--destructive)] hover:opacity-70 transition-opacity disabled:opacity-50",children:r("projects.git_token_clear")})})]})]}),e.jsxs("section",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-5",children:[e.jsxs("div",{className:"mb-4 flex items-center justify-between",children:[e.jsx("h2",{className:"text-sm font-semibold text-[var(--accent)]",children:r("projects.pipeline_section")}),e.jsx(je,{to:"/projects/"+n+"/pipeline",className:"text-xs text-[var(--accent)] hover:underline",children:r("projects.edit_pipeline")})]}),e.jsx("textarea",{value:x,onChange:t=>N(t.target.value),rows:20,spellCheck:!1,placeholder:'{"stages": []}',className:"w-full resize-y rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-xs text-[var(--text-primary)] outline-none focus:border-[var(--accent)]",style:{fontFamily:'"JetBrains Mono", monospace',textTransform:"none"}})]}),e.jsxs("section",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-5",children:[e.jsxs("div",{className:"mb-4 flex items-center justify-between",children:[e.jsx("h2",{className:"text-sm font-semibold text-[var(--accent)]",children:r("projects.members")}),e.jsxs("button",{type:"button",onClick:()=>V(!0),className:"flex items-center gap-1.5 rounded-[4px] bg-[var(--accent)] px-3 py-1.5 text-xs font-medium text-black",children:[e.jsx(fe,{className:"h-3.5 w-3.5"}),r("projects.add_member")]})]}),h.length===0?e.jsxs("div",{className:"flex flex-col items-center gap-3 py-6",children:[e.jsx("span",{className:"text-xl font-bold text-[var(--border)]",children:"[ ]"}),e.jsx("span",{className:"text-xs text-[var(--text-muted)]",children:r("projects.no_members_yet")})]}):e.jsx("div",{className:"space-y-2",children:h.map(t=>e.jsxs("div",{className:"flex items-center justify-between rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"flex h-7 w-7 items-center justify-center rounded-full bg-[var(--accent)]/20 text-xs font-bold text-[var(--accent)]",children:(t.developerName??String(t.developerId)).charAt(0).toUpperCase()}),e.jsxs("div",{children:[e.jsx("span",{className:"text-xs text-[var(--text-primary)]",children:t.developerName??`#${t.developerId}`}),e.jsx("span",{className:"ml-2 rounded-[4px] px-1.5 py-0.5 text-[11px] font-medium",style:{color:t.role===ee.MAINTAINER?"var(--warning)":"var(--text-secondary)",background:t.role===ee.MAINTAINER?"rgba(245,158,11,0.1)":"rgba(163,163,163,0.1)"},children:t.role})]})]}),e.jsx("button",{type:"button",onClick:()=>w(t),className:"text-[var(--destructive)] hover:opacity-70 transition-opacity","aria-label":r("projects.remove_member"),children:e.jsx(he,{className:"h-3.5 w-3.5"})})]},t.developerId))})]})]})]}),e.jsxs("div",{className:"mt-8 flex items-center justify-end gap-3 border-t border-[var(--border)] pt-6",children:[e.jsx("button",{type:"button",onClick:de,className:"rounded-[4px] border border-[var(--border)] bg-transparent px-4 py-2 text-xs text-[var(--text-secondary)] hover:text-[var(--text-primary)] transition-colors",children:r("common.discard")}),e.jsx("button",{type:"submit",disabled:C||!y||!f,className:"rounded-[4px] bg-[var(--accent)] px-4 py-2 text-xs font-medium text-black hover:opacity-90 transition-opacity disabled:opacity-50",children:r(C?"common.saving":"projects.save_changes")})]}),e.jsx(ge,{isOpen:ne,onClose:()=>V(!1),projectKey:o.key,existingMemberIds:h.map(t=>t.developerId),onAdded:b}),e.jsx(ye,{isOpen:!!d,onClose:()=>w(null),onConfirm:xe,memberName:d?d.developerName??`#${d.developerId}`:"",loading:le})]}):e.jsxs("div",{className:"mx-auto max-w-4xl px-4 md:px-6 py-8 text-center",children:[e.jsx("p",{className:"text-sm text-[var(--text-muted)]",children:r("projects.project_not_found")}),e.jsx("button",{onClick:()=>l("/projects"),className:"mt-4 rounded-[4px] border border-[var(--border)] bg-transparent px-4 py-2 text-xs text-[var(--text-secondary)] hover:text-[var(--text-primary)]",children:r("projects.back_to_projects")})]})}function a({label:n,children:l}){return e.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-start gap-1 sm:gap-3",children:[e.jsx("label",{className:"sm:w-36 shrink-0 sm:pt-2 text-xs text-[var(--text-muted)]",children:n}),e.jsx("div",{className:"flex-1",children:l})]})}export{Ce as default};