@overlordai/server 1.0.139 → 1.0.140
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/dist/adapters/command-parser.utils.js +1 -1
- package/dist/adapters/command-parser.utils.js.map +1 -1
- package/package.json +4 -4
- package/public/assets/{AccessTokensPage-DMsQKvGG.js → AccessTokensPage-D1CyjkMd.js} +1 -1
- package/public/assets/{AdminPage-DqZMqDDh.js → AdminPage-BfGgzqGY.js} +1 -1
- package/public/assets/{AgentCliPage-BR2YXUlN.js → AgentCliPage-CyYjrwq2.js} +1 -1
- package/public/assets/{ApiReferencePage-CWGvx9sZ.js → ApiReferencePage-Bclq5KsN.js} +1 -1
- package/public/assets/{ArchitecturePage-CVipZPS8.js → ArchitecturePage-BDytxAWu.js} +1 -1
- package/public/assets/{AuditLogPage-CCUK_lWo.js → AuditLogPage-BtlSABTt.js} +1 -1
- package/public/assets/{BindPlatformPage-BDisYk6H.js → BindPlatformPage-BWFCXp_B.js} +1 -1
- package/public/assets/{BotIntegrationPage-DoqcdqwE.js → BotIntegrationPage-BE63GDU0.js} +1 -1
- package/public/assets/{BotManage-DRo01WBu.js → BotManage-B4jE07jf.js} +1 -1
- package/public/assets/{BotSetupPage-nornZgmt.js → BotSetupPage-CFZ4rCsj.js} +1 -1
- package/public/assets/{ChangelogPage-Bd5TviZ8.js → ChangelogPage-Dq4Vbaek.js} +1 -1
- package/public/assets/{CliReferencePage-C6NT0ynG.js → CliReferencePage-fyRcKPES.js} +1 -1
- package/public/assets/{DeploymentPage-3YMjpAFo.js → DeploymentPage-Cl6zirj-.js} +1 -1
- package/public/assets/{DevWorkflowPage-DFQTZVP9.js → DevWorkflowPage-Le7igjcE.js} +1 -1
- package/public/assets/{DeveloperManage-BnMIj_g_.js → DeveloperManage-CEia9VDa.js} +1 -1
- package/public/assets/{DeveloperSetupPage-Cw4nLpIm.js → DeveloperSetupPage-CYbrSjhy.js} +1 -1
- package/public/assets/{DocsIndexPage-cK28EfKj.js → DocsIndexPage-Ds7FZGYL.js} +1 -1
- package/public/assets/{DocsLayout-BVtSzaqN.js → DocsLayout-Bc08wdi2.js} +1 -1
- package/public/assets/{DocsPrimitives-2csfHzW_.js → DocsPrimitives-BeRfTNWi.js} +1 -1
- package/public/assets/{EditProjectPage-D4LeLkUK.js → EditProjectPage-UQcHFFv0.js} +1 -1
- package/public/assets/{EmptyState-ADwWEXdn.js → EmptyState-BrTEmjub.js} +1 -1
- package/public/assets/{EnvVariablesPage-D7HonzNe.js → EnvVariablesPage-Cco0LY2i.js} +1 -1
- package/public/assets/HomePage-DkFq_Niq.js +1 -0
- package/public/assets/{InfoRow-CmtJW4M9.js → InfoRow-VesvmVYO.js} +1 -1
- package/public/assets/{InstallationPage-CJ-YdcrX.js → InstallationPage-Cd7Eh_1x.js} +1 -1
- package/public/assets/{LandingPage-CWdPeZv-.js → LandingPage-Cxp2IXav.js} +1 -1
- package/public/assets/{LocalDevelopmentPage-BDl2Ktyc.js → LocalDevelopmentPage-BC2x9o_F.js} +1 -1
- package/public/assets/{LoginPage-DgF9ENzx.js → LoginPage-fgYsLW4-.js} +1 -1
- package/public/assets/{MetricBar-DoUTAkIk.js → MetricBar-CFHaSbdz.js} +1 -1
- package/public/assets/{MobileTerminalShell-BSE0-T35.js → MobileTerminalShell-DvdSW-sx.js} +1 -1
- package/public/assets/{NotFoundPage-BUrnSFza.js → NotFoundPage-BxtgZYrG.js} +1 -1
- package/public/assets/{OnboardingGuide-E87DHNsp.js → OnboardingGuide-BqdyHxJS.js} +1 -1
- package/public/assets/{PermissionsPage-DKhdHNDg.js → PermissionsPage-BP5SsoMl.js} +1 -1
- package/public/assets/{PipelineConfigPage-Dn-fh0Ia.js → PipelineConfigPage-B8NayzNO.js} +1 -1
- package/public/assets/{PipelineEditorPage-DY945ZLB.js → PipelineEditorPage-BLRXg7uE.js} +1 -1
- package/public/assets/{ProfilePage-wMwqf3xq.js → ProfilePage-BY4_Kq2m.js} +1 -1
- package/public/assets/ProjectDetailPage-CGhCxrKQ.js +7 -0
- package/public/assets/ProjectListPage-2b4E2H36.js +6 -0
- package/public/assets/{QuickAuth-BsMxofrA.js → QuickAuth-DODaMzBE.js} +1 -1
- package/public/assets/{RemoveMemberConfirmDialog-Brv6Th8M.js → RemoveMemberConfirmDialog-CblKQmK2.js} +1 -1
- package/public/assets/{Select-BfjWmQST.js → Select-CatoaxSD.js} +1 -1
- package/public/assets/{SettingsPage-CZwwUAeC.js → SettingsPage-CcTEwK5L.js} +1 -1
- package/public/assets/{Skeleton-DQWHHk9G.js → Skeleton-CJVHi16l.js} +1 -1
- package/public/assets/{SkillPage-CKbqXAb6.js → SkillPage-Dl6hXkHy.js} +1 -1
- package/public/assets/{TaskDetailPage-CskFoYAc.js → TaskDetailPage-BF-G4onm.js} +1 -1
- package/public/assets/{TaskListPage-T7DWBtM3.js → TaskListPage-DKtvYTqk.js} +1 -1
- package/public/assets/{TaskStatusBadge-Cd9AKReP.js → TaskStatusBadge-BdDVC3F4.js} +1 -1
- package/public/assets/{TerminalHomePage-ClJFAaTn.js → TerminalHomePage-CR-OzAME.js} +1 -1
- package/public/assets/{TokenManage-Cj9UuqyE.js → TokenManage-DGWTDHT0.js} +1 -1
- package/public/assets/{Tooltip-1tjISJAN.js → Tooltip-BSeP698b.js} +1 -1
- package/public/assets/{TotpSetupPage-Dme4c3tv.js → TotpSetupPage-DkTKw-87.js} +1 -1
- package/public/assets/{WorkerDetailPage-CgXIs1_M.js → WorkerDetailPage-C3xgOzQ5.js} +1 -1
- package/public/assets/{WorkerListPage-CM1GqeN7.js → WorkerListPage-SzomA2Jg.js} +2 -2
- package/public/assets/{WorkerOperationsPage-uArfsFAY.js → WorkerOperationsPage-Dm1PdRDK.js} +1 -1
- package/public/assets/{WorkerSetupGuidePage-CyW_9sIh.js → WorkerSetupGuidePage-BDxh9qGL.js} +1 -1
- package/public/assets/{WorkerSetupPage-DTQvCeTf.js → WorkerSetupPage-DOjZMVtt.js} +1 -1
- package/public/assets/{agent-type-options-l4HLs4lb.js → agent-type-options-SYUwiixD.js} +1 -1
- package/public/assets/{arrow-left-D2z6WXle.js → arrow-left-B16h49gW.js} +1 -1
- package/public/assets/{arrow-right-BBWwGkdK.js → arrow-right-DxSODyV0.js} +1 -1
- package/public/assets/{bot-haRrziLf.js → bot-DvI1Z_Mw.js} +1 -1
- package/public/assets/{chevron-left-B11s6IVD.js → chevron-left-CH1J8GB-.js} +1 -1
- package/public/assets/{chevron-right-CxMAZVfy.js → chevron-right-CdPoqMfX.js} +1 -1
- package/public/assets/{copy-CukaPL3b.js → copy-DNIFSymA.js} +1 -1
- package/public/assets/{download-CtBIkCC6.js → download-DLYSP8rX.js} +1 -1
- package/public/assets/{external-link-BYaw3Ovt.js → external-link-DrZcaziN.js} +1 -1
- package/public/assets/{file-text-CwpyLWx2.js → file-text-224YYyRN.js} +1 -1
- package/public/assets/{git-fork-DjDcRdWO.js → git-fork-CsNrC-5K.js} +1 -1
- package/public/assets/{index-GPUbNOkg.js → index-BnZa648g.js} +3 -3
- package/public/assets/{key-D-EBAM_S.js → key-ChevPWu9.js} +1 -1
- package/public/assets/{loader-circle-PEOtoIoF.js → loader-circle-_p8GERRD.js} +1 -1
- package/public/assets/{pencil-BObnoNZc.js → pencil-BjrOvZ4y.js} +1 -1
- package/public/assets/{plus-JnJTWOh0.js → plus-DtE-5ICU.js} +1 -1
- package/public/assets/{rotate-ccw-9hl77Xny.js → rotate-ccw-DTMgDeUz.js} +1 -1
- package/public/assets/{scroll-text-w6v00sw0.js → scroll-text-DLDVcM9k.js} +1 -1
- package/public/assets/{settings-DqX6KTB6.js → settings-BWLb7GMU.js} +1 -1
- package/public/assets/{status-colors-C_RhLQKM.js → status-colors-CJELOkpG.js} +1 -1
- package/public/assets/{task-constants-LNckgIqT.js → task-constants-DVi4wVyB.js} +1 -1
- package/public/assets/{trash-2-BH7Uy_FR.js → trash-2-DGYLJbuV.js} +1 -1
- package/public/assets/{useFetch-C6aoI2YR.js → useFetch-BHc-EDVT.js} +1 -1
- package/public/assets/{users-N89uFOml.js → users-CXqH9m6n.js} +1 -1
- package/public/assets/{wifi-B0GLkoI5.js → wifi-CknEzeaW.js} +1 -1
- package/public/assets/{workflow-CPFrQB2p.js → workflow-BHEQEN9B.js} +1 -1
- package/public/index.html +1 -1
- package/public/sw.js +1 -1
- package/public/assets/HomePage-CFVWSe09.js +0 -1
- package/public/assets/ProjectDetailPage-Czbvi0xm.js +0 -7
- package/public/assets/ProjectListPage-qT9qvnxf.js +0 -6
|
@@ -1 +1 @@
|
|
|
1
|
-
import{W as r,p as e,a4 as s,a5 as u,$ as a}from"./index-
|
|
1
|
+
import{W as r,p as e,a4 as s,a5 as u,$ as a}from"./index-BnZa648g.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{o as i,h as n,p as c,J as k}from"./index-
|
|
1
|
+
import{o as i,h as n,p as c,J as k}from"./index-BnZa648g.js";import{a as T}from"./agent-type-options-SYUwiixD.js";const b=i((t,r)=>({tasks:[],currentTask:null,loading:!1,error:null,nextCursor:null,_fetchTasksAbort:null,_fetchTasksRequestId:0,fetchTasks:async a=>{const s=r()._fetchTasksAbort;s&&s.abort();const o=new AbortController,l=r()._fetchTasksRequestId+1;t({loading:!0,error:null,_fetchTasksAbort:o,_fetchTasksRequestId:l});try{const e={};a!=null&&a.status&&(e.status=a.status),a!=null&&a.projectKey&&(e.projectKey=a.projectKey),a!=null&&a.developerId&&(e.developerId=a.developerId),a!=null&&a.cursor&&(e.cursor=a.cursor),a!=null&&a.limit&&(e.limit=String(a.limit));const f=await n.get("web/tasks",{searchParams:e,signal:o.signal}).json();if(r()._fetchTasksRequestId!==l)return;t({tasks:f.data,nextCursor:f.nextCursor??null,_fetchTasksAbort:null})}catch(e){if(e instanceof DOMException&&e.name==="AbortError")return;r()._fetchTasksRequestId===l&&t({error:e instanceof Error?e.message:"Failed to fetch tasks"})}finally{r()._fetchTasksRequestId===l&&t({loading:!1,_fetchTasksAbort:null})}},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}=r();(s==null?void 0:s.id)===a&&await r().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,_fetchTasksAbort:null,_fetchTasksRequestId:0})}})),p=[c.COMPLETED,c.FAILED,c.CANCELLED],E=[{value:"feat",label:"feat"},{value:"fix",label:"fix"},{value:"refactor",label:"refactor"},{value:"docs",label:"docs"},{value:"chore",label:"chore"}],d=T(t=>t);[...d];function _(t){return(t??k.CLAUDE).toLowerCase()}export{p as T,E as a,_ as g,b as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e}from"./index-
|
|
1
|
+
import{r as e}from"./index-BnZa648g.js";function p(s,l){const[i,d]=e.useState(null),[R,a]=e.useState(!0),[m,o]=e.useState(null),f=e.useRef(s);f.current=s;const r=e.useRef(0),t=e.useRef(!0),u=e.useCallback(async()=>{const c=++r.current;a(!0),o(null);try{const n=await f.current();t.current&&c===r.current&&d(n)}catch(n){if(t.current&&c===r.current){const E=n instanceof Error?n.message:"An unexpected error occurred";o(E)}}finally{t.current&&c===r.current&&a(!1)}},l);return e.useEffect(()=>{u()},[u]),e.useEffect(()=>()=>{t.current=!1,r.current+=1},[]),{data:i,loading:R,error:m,refetch:u}}export{p as u};
|
package/public/index.html
CHANGED
|
@@ -28,7 +28,7 @@
|
|
|
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-
|
|
31
|
+
<script type="module" crossorigin src="/assets/index-BnZa648g.js"></script>
|
|
32
32
|
<link rel="stylesheet" crossorigin href="/assets/index-BUjb3VF-.css">
|
|
33
33
|
<link rel="manifest" href="/manifest.webmanifest"><script id="vite-plugin-pwa:register-sw" src="/registerSW.js"></script></head>
|
|
34
34
|
<body>
|
package/public/sw.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
if(!self.define){let s,e={};const l=(l,
|
|
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:"d33c43738894e9b84712989573ffda3e"},{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-BHEQEN9B.js",revision:null},{url:"assets/wifi-CknEzeaW.js",revision:null},{url:"assets/users-CXqH9m6n.js",revision:null},{url:"assets/useFetch-BHc-EDVT.js",revision:null},{url:"assets/trash-2-DGYLJbuV.js",revision:null},{url:"assets/task-constants-DVi4wVyB.js",revision:null},{url:"assets/status-colors-CJELOkpG.js",revision:null},{url:"assets/settings-BWLb7GMU.js",revision:null},{url:"assets/scroll-text-DLDVcM9k.js",revision:null},{url:"assets/rotate-ccw-DTMgDeUz.js",revision:null},{url:"assets/plus-DtE-5ICU.js",revision:null},{url:"assets/pencil-BjrOvZ4y.js",revision:null},{url:"assets/password-CHk45-jw.js",revision:null},{url:"assets/loader-circle-_p8GERRD.js",revision:null},{url:"assets/key-ChevPWu9.js",revision:null},{url:"assets/index-BnZa648g.js",revision:null},{url:"assets/index-BUjb3VF-.css",revision:null},{url:"assets/git-fork-CsNrC-5K.js",revision:null},{url:"assets/file-text-224YYyRN.js",revision:null},{url:"assets/external-link-DrZcaziN.js",revision:null},{url:"assets/download-DLYSP8rX.js",revision:null},{url:"assets/date-RFA7-ZGs.js",revision:null},{url:"assets/copy-DNIFSymA.js",revision:null},{url:"assets/chevron-right-CdPoqMfX.js",revision:null},{url:"assets/chevron-left-CH1J8GB-.js",revision:null},{url:"assets/bot-DvI1Z_Mw.js",revision:null},{url:"assets/arrow-right-DxSODyV0.js",revision:null},{url:"assets/arrow-left-B16h49gW.js",revision:null},{url:"assets/agent-type-options-SYUwiixD.js",revision:null},{url:"assets/WorkerSetupPage-DOjZMVtt.js",revision:null},{url:"assets/WorkerSetupGuidePage-BDxh9qGL.js",revision:null},{url:"assets/WorkerOperationsPage-Dm1PdRDK.js",revision:null},{url:"assets/WorkerListPage-SzomA2Jg.js",revision:null},{url:"assets/WorkerDetailPage-C3xgOzQ5.js",revision:null},{url:"assets/TotpSetupPage-DkTKw-87.js",revision:null},{url:"assets/Tooltip-BSeP698b.js",revision:null},{url:"assets/TokenManage-DGWTDHT0.js",revision:null},{url:"assets/TerminalHomePage-CR-OzAME.js",revision:null},{url:"assets/TaskStatusBadge-BdDVC3F4.js",revision:null},{url:"assets/TaskListPage-DKtvYTqk.js",revision:null},{url:"assets/TaskDetailPage-BF-G4onm.js",revision:null},{url:"assets/SkillPage-Dl6hXkHy.js",revision:null},{url:"assets/Skeleton-CJVHi16l.js",revision:null},{url:"assets/SettingsPage-CcTEwK5L.js",revision:null},{url:"assets/Select-CatoaxSD.js",revision:null},{url:"assets/RemoveMemberConfirmDialog-CblKQmK2.js",revision:null},{url:"assets/QuickAuth-DODaMzBE.js",revision:null},{url:"assets/ProjectListPage-2b4E2H36.js",revision:null},{url:"assets/ProjectDetailPage-CGhCxrKQ.js",revision:null},{url:"assets/ProfilePage-BY4_Kq2m.js",revision:null},{url:"assets/PipelineEditorPage-BLRXg7uE.js",revision:null},{url:"assets/PipelineConfigPage-B8NayzNO.js",revision:null},{url:"assets/PermissionsPage-BP5SsoMl.js",revision:null},{url:"assets/OnboardingGuide-BqdyHxJS.js",revision:null},{url:"assets/NotFoundPage-BxtgZYrG.js",revision:null},{url:"assets/MobileTerminalShell-DvdSW-sx.js",revision:null},{url:"assets/MobileTerminalShell-6GBZ9nXN.css",revision:null},{url:"assets/MetricBar-CFHaSbdz.js",revision:null},{url:"assets/LoginPage-fgYsLW4-.js",revision:null},{url:"assets/LocalDevelopmentPage-BC2x9o_F.js",revision:null},{url:"assets/LandingPage-Cxp2IXav.js",revision:null},{url:"assets/InstallationPage-Cd7Eh_1x.js",revision:null},{url:"assets/InfoRow-VesvmVYO.js",revision:null},{url:"assets/HomePage-DkFq_Niq.js",revision:null},{url:"assets/EnvVariablesPage-Cco0LY2i.js",revision:null},{url:"assets/EmptyState-BrTEmjub.js",revision:null},{url:"assets/EditProjectPage-UQcHFFv0.js",revision:null},{url:"assets/DocsPrimitives-BeRfTNWi.js",revision:null},{url:"assets/DocsLayout-Bc08wdi2.js",revision:null},{url:"assets/DocsIndexPage-Ds7FZGYL.js",revision:null},{url:"assets/DeveloperSetupPage-CYbrSjhy.js",revision:null},{url:"assets/DeveloperManage-CEia9VDa.js",revision:null},{url:"assets/DevWorkflowPage-Le7igjcE.js",revision:null},{url:"assets/DeploymentPage-Cl6zirj-.js",revision:null},{url:"assets/CliReferencePage-fyRcKPES.js",revision:null},{url:"assets/ChangelogPage-Dq4Vbaek.js",revision:null},{url:"assets/BotSetupPage-CFZ4rCsj.js",revision:null},{url:"assets/BotManage-B4jE07jf.js",revision:null},{url:"assets/BotIntegrationPage-BE63GDU0.js",revision:null},{url:"assets/BindPlatformPage-BWFCXp_B.js",revision:null},{url:"assets/AuditLogPage-BtlSABTt.js",revision:null},{url:"assets/ArchitecturePage-BDytxAWu.js",revision:null},{url:"assets/ApiReferencePage-Bclq5KsN.js",revision:null},{url:"assets/AgentCliPage-CyYjrwq2.js",revision:null},{url:"assets/AdminPage-BfGgzqGY.js",revision:null},{url:"assets/AccessTokensPage-D1CyjkMd.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:"e3100788a89f54481dbd663d57df57a6"}],{}),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 +0,0 @@
|
|
|
1
|
-
import{f as z,a as K,i as H,k as D,r as $,j as e,L as u,l as I,m as B,n as G,W as _,h as p}from"./index-GPUbNOkg.js";import{T as R}from"./TaskStatusBadge-Cd9AKReP.js";import{T as j}from"./Skeleton-DQWHHk9G.js";import{O as V}from"./OnboardingGuide-E87DHNsp.js";import{f as w}from"./date-RFA7-ZGs.js";import{g as Y}from"./status-colors-C_RhLQKM.js";import{u as h}from"./useFetch-C6aoI2YR.js";import{T as q}from"./Tooltip-1tjISJAN.js";import{A as g}from"./arrow-right-BBWwGkdK.js";import"./chevron-right-CxMAZVfy.js";const J=3e5,Q=[{type:"fraction",numerator:"active_tasks",denominator:"queued_tasks",labelKey:"dashboard.tasks_active_queued"},{type:"simple",key:"online_workers",labelKey:"dashboard.online_workers"},{type:"simple",key:"completed_today",labelKey:"dashboard.completed_all_today"},{type:"simple",key:"completed_by_user_today",labelKey:"dashboard.completed_by_you_today"}],U=["sun","mon","tue","wed","thu","fri","sat"];function X(){const n=new Date;return Array.from({length:7},(a,i)=>{const r=new Date(n);r.setDate(r.getDate()-(6-i));const o=String(r.getMonth()+1).padStart(2,"0"),l=String(r.getDate()).padStart(2,"0");return{label:U[r.getDay()],date:`${o}/${l}`}})}function Z({dailyRates:n,dailyCounts:a,overallRate:i}){const{t:r}=K(),o=X(),l=a.reduce((t,c)=>t+c,0),b=Math.max(...a,1);return e.jsxs("div",{children:[e.jsxs("div",{className:"mb-3 flex items-baseline gap-2",children:[e.jsx("span",{className:"text-2xl font-bold text-[var(--text-primary)]",children:l}),e.jsx("span",{className:"text-xs text-[var(--text-muted)]",children:r("dashboard.last_7_days")}),e.jsx("span",{className:"text-xs text-[var(--text-muted)]",children:"·"}),e.jsxs("span",{className:"text-xs text-[var(--text-muted)]",children:[r("dashboard.success_rate"),": ",i,"%"]})]}),e.jsx("div",{className:"flex gap-2",style:{height:80},children:o.map(({label:t,date:c},v)=>{const x=a[v]??0,m=n[v]??0,f=r(x===1?"dashboard.task_total":"dashboard.tasks_total"),N=b>0?Math.max(x/b*100,4):4;return e.jsxs(q,{content:`${t} ${c} — ${x} ${f} (${m}%)`,className:"flex flex-1 flex-col items-center gap-1",children:[e.jsx("div",{className:"relative w-full h-full rounded-[4px] cursor-default",style:{backgroundColor:"rgba(34,197,94,0.1)"},children:e.jsx("div",{className:"absolute bottom-0 left-0 right-0 rounded-[4px]",style:{height:`${N}%`,backgroundColor:m>=80?"var(--accent)":m>=50?"var(--warning)":"var(--destructive)"}})}),e.jsx("span",{className:"shrink-0 text-[11px] text-[var(--text-muted)]",children:t})]},t)})})]})}function ie(){const n=z(),{t:a}=K(),i=H(),r=D(s=>s.taskSeq),o=D(s=>s.workerSeq),[l,b]=$.useState(0),{data:t,loading:c}=h(()=>p.get("web/dashboard/stats",{searchParams:{tz:String(new Date().getTimezoneOffset())}}).json(),[l,r,o]),{data:v,loading:x}=h(()=>p.get("web/dashboard/recent-tasks",{searchParams:{limit:"5"}}).json(),[l,r]),{data:m,loading:f}=h(()=>p.get("web/workers").json(),[l,o]),{data:N,loading:E}=h(()=>p.get("web/projects").json(),[l]),{data:O,loading:M}=h(()=>p.get("web/dashboard/recent-activity").json(),[]);$.useEffect(()=>{const s=setInterval(()=>{b(d=>d+1)},J);return()=>clearInterval(s)},[]);const S=(t==null?void 0:t.success_rate_daily)??null,T=(t==null?void 0:t.task_count_daily)??[],W=(t==null?void 0:t.task_success_rate_7d)??0,L=v??[],y=m??[],C=N??[],A=O??[];function F(s){switch(s){case _.ONLINE:return a("dashboard.online");case _.DRAINING:return a("dashboard.idle");case _.OFFLINE:default:return a("dashboard.offline")}}function P(s){return a(s===1?"dashboard.task_total":"dashboard.tasks_total")}return e.jsxs("div",{className:"mx-auto max-w-6xl overflow-hidden px-2 py-4 md:px-4 md:py-6 font-mono",children:[e.jsx("div",{className:"mb-6 md:mb-8 grid grid-cols-2 gap-3 md:gap-4 lg:grid-cols-4",children:Q.map(s=>e.jsxs("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-3 md:p-4",children:[e.jsxs("span",{className:"text-[11px] md:text-xs text-[var(--text-muted)]",children:[a(s.labelKey),":"]}),c?e.jsx("div",{className:"mt-1 h-6 md:h-8 w-12 md:w-16 animate-pulse rounded-[4px] bg-[var(--bg-input)]"}):e.jsx("div",{className:"mt-1 flex items-baseline gap-2",children:s.type==="fraction"?e.jsxs("span",{className:"text-2xl md:text-3xl font-bold text-[var(--text-primary)]",children:[(t==null?void 0:t[s.numerator])??0,e.jsx("span",{className:"text-base md:text-lg font-normal text-[var(--text-muted)]",children:"/"}),(t==null?void 0:t[s.denominator])??0]}):e.jsx("span",{className:"text-2xl md:text-3xl font-bold text-[var(--text-primary)]",children:(t==null?void 0:t[s.key])??0})})]},s.labelKey))}),e.jsx(V,{data:{activeTasks:((t==null?void 0:t.active_tasks)??0)+((t==null?void 0:t.queued_tasks)??0),totalWorkers:y.length,totalProjects:(t==null?void 0:t.project_count)??0,totalDevelopers:(t==null?void 0:t.developer_count)??0}}),e.jsxs("div",{className:"mb-6 grid gap-6 lg:grid-cols-3 items-stretch",children:[e.jsx("div",{className:"flex flex-col gap-6 lg:col-span-2",children:e.jsxs("div",{className:"flex flex-1 flex-col rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)]",children:[e.jsx("div",{className:"border-b border-[var(--border)] px-5 py-3",children:e.jsx("h2",{className:"text-sm text-[var(--text-primary)]",children:a("dashboard.task_count")})}),e.jsx("div",{className:"flex flex-1 flex-col justify-center p-5",children:c?e.jsx("div",{className:"h-24 animate-pulse rounded-[4px] bg-[var(--bg-input)]"}):S?e.jsx(Z,{dailyRates:S,dailyCounts:T,overallRate:W}):e.jsxs("div",{className:"flex flex-col items-center gap-2 py-6",children:[e.jsx("span",{className:"text-2xl font-bold text-[var(--text-primary)]",children:T.reduce((s,d)=>s+d,0)}),e.jsx("span",{className:"text-xs text-[var(--text-muted)]",children:a("dashboard.daily_breakdown_not_available")})]})})]})}),e.jsxs("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] md:border",children:[e.jsxs("div",{className:"hidden md:flex items-center justify-between border-b border-[var(--border)] px-5 py-3",children:[e.jsx("h2",{className:"text-sm text-[var(--text-primary)]",children:a("dashboard.recent_tasks")}),e.jsxs(u,{to:"/tasks",className:"flex items-center gap-1 text-xs text-[var(--accent)] hover:underline",children:[a("common.view_all")," ",e.jsx(g,{className:"h-3 w-3"})]})]}),e.jsx("div",{className:"flex md:hidden items-center justify-between px-3 py-3",children:e.jsx("h2",{className:"text-xs font-bold text-[var(--accent)]",children:a("dashboard.recent_tasks")})}),e.jsx("div",{className:"px-3 pb-3 md:px-5 md:pb-4 md:pt-0",children:x?e.jsx(j,{rows:4}):L.length===0?e.jsxs("div",{className:"flex flex-col items-center gap-3 py-8",children:[e.jsx("span",{className:"text-xl font-bold text-[var(--border)]",children:"[ ]"}),e.jsx("span",{className:"text-xs text-[var(--text-muted)]",children:a("dashboard.no_tasks_yet")})]}):e.jsx("div",{className:"flex flex-col gap-2 md:gap-0",children:L.map(s=>e.jsxs("div",{onClick:()=>n(`/tasks/${s.id}`),className:"flex cursor-pointer items-center gap-3 rounded-[4px] border border-[var(--border)] p-3 transition-colors hover:bg-[var(--bg-input)] md:rounded-none md:border-0 md:border-b md:border-[var(--border-row)] md:p-0 md:py-2.5 last:md:border-b-0",children:[e.jsxs("div",{className:"flex-1 min-w-0 md:hidden",children:[e.jsxs("div",{className:"flex items-start justify-between gap-2",children:[e.jsxs("span",{className:"text-[11px] text-[var(--text-primary)] leading-tight line-clamp-2",title:B(s),children:["#",s.id," ",I(s)]}),e.jsx("span",{className:"shrink-0",children:e.jsx(R,{status:s.status})})]}),e.jsx("span",{className:"text-[11px] text-[var(--text-muted)] mt-1 block",children:w(s.createdAt)})]}),e.jsxs("span",{className:"hidden md:inline shrink-0 text-xs text-[var(--text-muted)]",children:["#",s.id]}),e.jsx("span",{className:"hidden md:inline flex-1 text-xs text-[var(--text-primary)] truncate",children:e.jsx(q,{content:G(s),children:I(s,40)})}),e.jsx("span",{className:"hidden md:inline",children:e.jsx(R,{status:s.status})}),e.jsx("span",{className:"hidden md:inline shrink-0 text-xs text-[var(--text-muted)]",children:w(s.createdAt)})]},s.id))})})]})]}),e.jsxs("div",{className:"grid gap-6 lg:grid-cols-2",children:[e.jsxs("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)]",children:[e.jsxs("div",{className:"flex items-center justify-between border-b border-[var(--border)] px-5 py-3",children:[e.jsx("h2",{className:"text-sm text-[var(--text-primary)]",children:a("dashboard.worker_status")}),e.jsxs(u,{to:"/workers",className:"flex items-center gap-1 text-xs text-[var(--accent)] hover:underline",children:[a("common.view_all")," ",e.jsx(g,{className:"h-3 w-3"})]})]}),e.jsx("div",{className:"p-4",children:f?e.jsx(j,{rows:3}):y.length===0?e.jsxs("div",{className:"flex flex-col items-center gap-3 py-8",children:[e.jsx("span",{className:"text-xl font-bold text-[var(--border)]",children:"[ ]"}),e.jsx("span",{className:"text-xs text-[var(--text-muted)]",children:a("dashboard.no_workers_registered")})]}):e.jsx("div",{className:"flex flex-col",children:y.map(s=>e.jsxs("div",{onClick:()=>n(`/workers/${s.id}`),className:"flex cursor-pointer items-center justify-between border-b border-[var(--border-row)] py-2.5 transition-colors hover:bg-[var(--bg-input)] last:border-b-0",children:[e.jsxs("div",{className:"min-w-0 flex-1 flex flex-col gap-0.5",children:[e.jsx("span",{className:"truncate text-xs text-[var(--text-primary)]",children:s.name}),e.jsx("span",{className:"truncate text-xs text-[var(--text-muted)]",children:s.host??"--"})]}),e.jsxs("div",{className:"shrink-0 flex items-center gap-3",children:[e.jsxs("span",{className:"text-xs text-[var(--text-secondary)]",children:[s.activeSlots,"/",s.maxSlots," ",a("dashboard.slots")]}),e.jsxs("span",{className:"inline-flex items-center gap-1 text-xs",style:{color:Y(s.status)},children:[e.jsx("span",{style:{fontSize:"0.5rem"},children:"●"}),F(s.status)]})]})]},s.id))})})]}),e.jsxs("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] md:hidden",children:[e.jsxs("div",{className:"flex items-center justify-between border-b border-[var(--border)] px-3 py-3",children:[e.jsx("h2",{className:"text-xs font-bold text-[var(--accent)]",children:a("dashboard.projects")}),e.jsxs(u,{to:"/projects",className:"flex items-center gap-1 text-[11px] text-[var(--accent)] hover:underline",children:[a("common.view_all")," ",e.jsx(g,{className:"h-3 w-3"})]})]}),e.jsx("div",{className:"p-3",children:E?e.jsx(j,{rows:3}):C.length===0?e.jsxs("div",{className:"flex flex-col items-center gap-3 py-8",children:[e.jsx("span",{className:"text-xl font-bold text-[var(--border)]",children:"[ ]"}),e.jsx("span",{className:"text-xs text-[var(--text-muted)]",children:a("projects.no_projects_yet")})]}):e.jsx("div",{className:"flex flex-col gap-2",children:C.map(s=>{const d=s.taskCount??0;return e.jsxs("div",{onClick:()=>n(`/projects/${s.key}`),className:"cursor-pointer rounded-[4px] border border-[var(--border)] p-3 transition-colors hover:bg-[var(--bg-input)]",children:[e.jsxs("div",{className:"flex items-center justify-between gap-2",children:[e.jsx("span",{className:"min-w-0 truncate text-xs font-medium text-[var(--accent)]",children:s.key}),e.jsxs("span",{className:"shrink-0 text-[11px] text-[var(--text-muted)]",children:[d," ",P(d)]})]}),e.jsx("span",{className:"mt-1 block text-[11px] text-[var(--text-primary)]",children:s.name}),e.jsx("span",{className:"mt-0.5 block text-[11px] text-[var(--text-muted)]",children:s.agentType})]},s.key)})})})]}),e.jsxs("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)]",children:[e.jsxs("div",{className:"flex items-center justify-between border-b border-[var(--border)] px-5 py-3",children:[e.jsx("h2",{className:"text-sm text-[var(--text-primary)]",children:a("dashboard.recent_activity")}),i&&e.jsxs(u,{to:"/admin/audit-logs",className:"flex items-center gap-1 text-xs text-[var(--accent)] hover:underline",children:[a("common.view_all")," ",e.jsx(g,{className:"h-3 w-3"})]})]}),e.jsx("div",{className:"p-3 md:p-4",children:M?e.jsx(j,{rows:4}):A.length===0?e.jsxs("div",{className:"flex flex-col items-center gap-3 py-8",children:[e.jsx("span",{className:"text-xl font-bold text-[var(--border)]",children:"[ ]"}),e.jsx("span",{className:"text-xs text-[var(--text-muted)]",children:a("dashboard.no_recent_activity")})]}):e.jsx("div",{className:"flex flex-col",children:A.map(s=>{const d=s.message.match(/task\s*#?(\d+)/i),k=d?d[1]:null;return e.jsxs("div",{className:`flex min-w-0 flex-col gap-1 rounded-[4px] border-b border-[var(--border-row)] px-2 py-2 transition-colors last:border-b-0 md:flex-row md:items-start md:gap-3 md:rounded-none md:px-0 ${k?"cursor-pointer hover:bg-[var(--bg-input)]":""}`,onClick:()=>k&&n(`/tasks/${k}`),children:[e.jsx("span",{className:"shrink-0 whitespace-nowrap text-[11px] text-[var(--text-muted)] md:text-xs",children:w(s.timestamp)}),e.jsx("span",{className:"min-w-0 break-words text-[11px] leading-relaxed text-[var(--text-secondary)] md:truncate md:text-xs md:leading-normal",children:s.message})]},s.id)})})})]})]})]})}export{ie as default};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import{c as F,a as I,j as e,v as U,A as E,f as R,u as q,i as K,r as x,O as A,w as B,l as H,n as J,Q,h as v}from"./index-GPUbNOkg.js";import{U as V,A as z,R as G}from"./RemoveMemberConfirmDialog-Brv6Th8M.js";import{T as X}from"./Tooltip-1tjISJAN.js";import{c as D}from"./date-RFA7-ZGs.js";import{t as Y}from"./status-colors-C_RhLQKM.js";import{I as o}from"./InfoRow-CmtJW4M9.js";import{u as Z}from"./useFetch-C6aoI2YR.js";import{P as ee}from"./pencil-BObnoNZc.js";import{T as te}from"./trash-2-BH7Uy_FR.js";import{P as re}from"./plus-JnJTWOh0.js";import"./Select-BfjWmQST.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 se=F("ArrowDown",[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]]);function ae({isOpen:n,onClose:l,onConfirm:t,projectName:m,loading:p}){const{t:j}=I();return e.jsx(U,{isOpen:n,onClose:l,onConfirm:t,title:`> ${j("projects.delete_project")}`,message:j("projects.delete_project_confirm",{name:m}),confirmLabel:j("projects.delete_project"),confirmVariant:"danger",isLoading:p})}function ve(){const{key:n}=E(),l=R(),{t}=I(),m=q(r=>r.user),p=K(),[j,f]=x.useState(!1),[P,w]=x.useState(!1),[T,k]=x.useState(!1),[c,N]=x.useState(null),[$,_]=x.useState(!1),{data:a,loading:L,error:C,refetch:y}=Z(async()=>{if(!n)throw new Error("Missing project key");const[r,g,u]=await Promise.all([v.get(`web/projects/${n}`).json(),v.get(`web/projects/${n}/members`).json().catch(()=>[]),v.get("web/tasks",{searchParams:{projectKey:n,limit:"20"}}).json().then(W=>W.data).catch(()=>[])]);let b=null;if(r.pipeline)try{b=JSON.parse(r.pipeline)}catch{}return{project:r,members:g,tasks:u,pipelineConfig:b}},[n]),s=(a==null?void 0:a.project)??null,h=(a==null?void 0:a.members)??[],M=(a==null?void 0:a.tasks)??[],d=(a==null?void 0:a.pipelineConfig)??null,i=p||h.some(r=>r.developerId===(m==null?void 0:m.id)&&r.role===A.MAINTAINER);B(x.useMemo(()=>s?e.jsxs(e.Fragment,{children:[i&&e.jsxs("button",{onClick:()=>l(`/projects/${s.key}/edit`),className:"flex items-center gap-1.5 rounded-[4px] border border-[var(--border)] bg-transparent px-3 py-1.5 text-xs text-[var(--text-secondary)] hover:text-[var(--text-primary)]",children:[e.jsx(ee,{className:"h-3 w-3"}),t("common.edit")]}),p&&e.jsxs("button",{onClick:()=>f(!0),className:"flex items-center gap-1.5 rounded-[4px] border border-[var(--destructive)] bg-transparent px-3 py-1.5 text-xs text-[var(--destructive)] hover:bg-[var(--destructive)] hover:text-white",children:[e.jsx(te,{className:"h-3 w-3"}),t("common.delete")]})]}):null,[s,i,p,l,t]));async function O(){if(s){w(!0);try{await v.delete(`admin/projects/${s.key}`),l("/projects")}catch{}finally{w(!1),f(!1)}}}async function S(){if(!(!s||!c)){_(!0);try{await v.delete(`web/projects/${s.key}/members`,{searchParams:{developerId:String(c.developerId)}}),await y()}catch{}finally{_(!1),N(null)}}}return L?e.jsx("div",{className:"flex justify-center py-20",children:e.jsx("div",{className:"h-6 w-6 animate-spin rounded-full border-2 border-[var(--border)] border-t-[var(--accent)]"})}):C?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(--destructive)]",children:C}),e.jsx("button",{onClick:()=>y(),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:t("common.retry")})]}):s?e.jsxs("div",{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:t("projects.title")})," / ",e.jsx("span",{className:"text-[var(--text-secondary)]",children:s.key})]}),e.jsxs("div",{className:"grid gap-6 lg:grid-cols-[1fr_340px]",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:t("projects.project_info")}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(o,{variant:"fixed-label",labelWidth:"w-32",label:t("projects.key"),value:s.key}),e.jsx(o,{variant:"fixed-label",labelWidth:"w-32",label:t("projects.name"),value:s.name}),e.jsx(o,{variant:"fixed-label",labelWidth:"w-32",label:t("projects.repo_url"),value:s.repoUrl,href:s.repoUrl}),s.sshUrl&&e.jsx(o,{variant:"fixed-label",labelWidth:"w-32",label:t("projects.ssh_url"),value:s.sshUrl}),e.jsx(o,{variant:"fixed-label",labelWidth:"w-32",label:t("projects.git_platform"),value:s.gitPlatform}),e.jsx(o,{variant:"fixed-label",labelWidth:"w-32",label:t("projects.default_branch"),value:s.defaultBranch}),e.jsx(o,{variant:"fixed-label",labelWidth:"w-32",label:t("projects.agent_type"),value:s.agentType}),e.jsx(o,{variant:"fixed-label",labelWidth:"w-32",label:t("projects.max_turns"),value:String(s.maxTurns)}),e.jsx(o,{variant:"fixed-label",labelWidth:"w-32",label:t("projects.allowed_tools"),value:s.allowedTools??"all"}),e.jsx(o,{variant:"fixed-label",labelWidth:"w-32",label:t("projects.default_project"),value:s.isDefault?"yes":"no"})]})]}),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:t("projects.members")}),i&&e.jsxs("button",{onClick:()=>k(!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(re,{className:"h-3.5 w-3.5"}),t("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:t("projects.no_members_yet")})]}):e.jsx("div",{className:"overflow-x-auto",children:e.jsxs("table",{className:"w-full text-sm",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"border-b border-[var(--border-row)]",children:[e.jsx("th",{className:"pb-2 text-left text-xs font-medium text-[var(--text-muted)]",children:t("projects.name")}),e.jsx("th",{className:"pb-2 text-left text-xs font-medium text-[var(--text-muted)]",children:t("projects.role")}),e.jsx("th",{className:"pb-2 text-left text-xs font-medium text-[var(--text-muted)]",children:t("projects.added_at")}),i&&e.jsx("th",{className:"pb-2 text-right text-xs font-medium text-[var(--text-muted)]",children:t("common.actions")})]})}),e.jsx("tbody",{children:h.map(r=>e.jsxs("tr",{className:"border-b border-[var(--border-row)] last:border-b-0",children:[e.jsx("td",{className:"py-2.5 text-sm text-[var(--text-primary)]",children:r.developerName??`#${r.developerId}`}),e.jsx("td",{className:"py-2.5 text-sm",style:{color:r.role===A.MAINTAINER?"var(--warning)":"var(--text-secondary)"},children:r.role}),e.jsx("td",{className:"py-2.5 text-sm text-[var(--text-secondary)]",children:D(r.createdAt)}),i&&e.jsx("td",{className:"py-2.5 text-right",children:e.jsx("button",{onClick:()=>N(r),className:"text-[var(--destructive)] hover:underline","aria-label":t("projects.remove_member"),children:e.jsx(V,{className:"h-3.5 w-3.5"})})})]},r.developerId))})]})})]}),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:t("projects.recent_tasks")}),M.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:t("projects.no_tasks_for_project")})]}):e.jsx("div",{className:"overflow-x-auto",children:e.jsxs("table",{className:"w-full text-sm",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"border-b border-[var(--border-row)]",children:[e.jsx("th",{className:"pb-2 text-left text-xs font-medium text-[var(--text-muted)]",children:t("projects.id")}),e.jsx("th",{className:"pb-2 text-left text-xs font-medium text-[var(--text-muted)]",children:t("projects.description")}),e.jsx("th",{className:"pb-2 text-left text-xs font-medium text-[var(--text-muted)]",children:t("projects.status")}),e.jsx("th",{className:"pb-2 text-left text-xs font-medium text-[var(--text-muted)]",children:t("projects.created")})]})}),e.jsx("tbody",{children:M.map(r=>e.jsxs("tr",{className:"cursor-pointer border-b border-[var(--border-row)] last:border-b-0 hover:bg-[var(--bg-input)]",onClick:()=>l(`/tasks/${r.id}`),children:[e.jsxs("td",{className:"py-2.5 text-sm text-[var(--text-secondary)]",children:["#",r.id]}),e.jsx("td",{className:"max-w-xs truncate py-2.5 text-sm text-[var(--text-primary)]",children:e.jsx(X,{content:J(r),children:H(r)})}),e.jsx("td",{className:"py-2.5 text-sm",style:{color:Y[r.status]},children:r.status}),e.jsx("td",{className:"py-2.5 text-sm text-[var(--text-secondary)]",children:D(r.createdAt)})]},r.id))})]})})]})]}),e.jsx("div",{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-[13px] font-medium text-[var(--accent)]",children:t("projects.pipeline")}),e.jsx("div",{className:"mb-3 h-px bg-[var(--border)]"}),d!=null&&d.stages&&d.stages.length>0?e.jsx("div",{className:"flex flex-col items-center",children:d.stages.map((r,g)=>{var u,b;return e.jsxs("div",{className:"w-full",children:[e.jsxs("div",{className:"flex items-center justify-between rounded-[4px] bg-[var(--bg-input)] px-3 py-2.5 cursor-pointer hover:bg-[var(--bg-secondary)]",style:{borderLeft:"3px solid var(--accent)"},onClick:()=>l(`/projects/${s.key}/pipeline`),children:[e.jsxs("div",{className:"flex flex-col gap-0.5 min-w-0",children:[e.jsx("span",{className:"text-xs font-medium text-[var(--text-primary)]",children:r.label??r.name}),r.prompt&&e.jsxs("span",{className:"text-[11px] text-[var(--text-muted)] truncate",children:["// ",r.prompt.split(`
|
|
7
|
-
`)[0].slice(0,40)]})]}),e.jsx("div",{className:"flex items-center gap-2 shrink-0",children:r.requireConfirm&&e.jsx("span",{className:"rounded-[4px] px-2 py-0.5 text-[11px] font-medium text-[var(--warning)]",style:{backgroundColor:"rgba(245,158,11,0.12)"},children:t("projects.confirm_label")})})]}),((u=r.onFailure)==null?void 0:u.goto)&&e.jsxs("div",{className:"flex items-center justify-center gap-1.5 py-1",children:[e.jsx(Q,{className:"h-3 w-3 text-[var(--warning)]"}),e.jsxs("span",{className:"text-[11px] text-[var(--warning)]",children:["onFailure.goto: ",r.onFailure.goto,", maxLoops: ",r.onFailure.maxLoops]})]}),g<d.stages.length-1&&!((b=r.onFailure)!=null&&b.goto)&&e.jsx("div",{className:"flex justify-center py-1",children:e.jsx(se,{className:"h-3.5 w-3.5 text-[var(--text-muted)]"})})]},r.name)})}):e.jsx("div",{className:"py-6 text-center text-xs text-[var(--text-muted)]",children:t("projects.no_pipeline_configured")}),i&&e.jsx("button",{onClick:()=>l(`/projects/${s.key}/pipeline`),className:"mt-3 flex w-full items-center justify-center gap-1.5 py-2 text-xs text-[var(--accent)] hover:text-[var(--accent)]",children:t("projects.add_stage")})]})})]}),e.jsx(ae,{isOpen:j,onClose:()=>f(!1),onConfirm:O,projectName:s.name,loading:P}),e.jsx(z,{isOpen:T,onClose:()=>k(!1),projectKey:s.key,existingMemberIds:h.map(r=>r.developerId),onAdded:y}),e.jsx(G,{isOpen:!!c,onClose:()=>N(null),onConfirm:S,memberName:c?c.developerName??`#${c.developerId}`:"",loading:$})]}):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:t("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:t("projects.back_to_projects")})]})}export{ve as default};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import{c as L,a as E,r as o,G as x,J as z,j as e,h as P,f as H,w as M}from"./index-GPUbNOkg.js";import{S as U}from"./Select-BfjWmQST.js";import{a as R}from"./agent-type-options-l4HLs4lb.js";import{E as J}from"./EmptyState-ADwWEXdn.js";import{T as D}from"./Skeleton-DQWHHk9G.js";import{t as O}from"./date-RFA7-ZGs.js";import{u as q}from"./useFetch-C6aoI2YR.js";import{P as W}from"./plus-JnJTWOh0.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 $=L("FolderOpen",[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]]),m={width:"100%",padding:"0.5rem 0.75rem",backgroundColor:"var(--bg-input)",border:"1px solid var(--border)",borderRadius:"4px",color:"var(--text-primary)",fontSize:"0.75rem",fontFamily:"'JetBrains Mono', monospace",outline:"none",boxSizing:"border-box"},c={display:"block",color:"var(--text-secondary)",fontSize:"0.7rem",marginBottom:"0.25rem",fontFamily:"'JetBrains Mono', monospace"};function K({isOpen:i,onClose:a,onCreated:v}){const{t:r}=E(),d=R(t=>t),[l,u]=o.useState(""),[s,b]=o.useState(""),[n,y]=o.useState(""),[f,C]=o.useState(""),[_,k]=o.useState("main"),[N,S]=o.useState(x.GITHUB),[B,T]=o.useState(z.CLAUDE),[p,w]=o.useState(!1),[F,h]=o.useState("");o.useEffect(()=>{i&&A()},[i]);function A(){u(""),b(""),y(""),C(""),k("main"),S(x.GITHUB),T(z.CLAUDE),h("")}function g(){A(),a()}async function G(t){t.preventDefault(),h(""),w(!0);try{const j=await P.post("admin/projects",{json:{name:l,key:s,repoUrl:n,sshUrl:f||void 0,defaultBranch:_,gitPlatform:N,agentType:B}}).json();v(j),g()}catch(j){const I=j instanceof Error?j.message:r("projects.failed_to_create_project");h(I)}finally{w(!1)}}return i?e.jsx("div",{onClick:g,style:{position:"fixed",inset:0,zIndex:50,display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"var(--modal-backdrop, rgba(12,12,12,0.6))",padding:"1rem"},children:e.jsxs("div",{onClick:t=>t.stopPropagation(),style:{width:"100%",maxWidth:"480px",backgroundColor:"var(--bg-card)",border:"1px solid var(--border)",borderRadius:"4px",padding:"1.5rem",fontFamily:"'JetBrains Mono', monospace"},children:[e.jsxs("div",{style:{marginBottom:"1.25rem"},children:[e.jsxs("div",{style:{color:"var(--accent)",fontSize:"0.875rem",fontWeight:600},children:["> ",r("projects.create_project")]}),e.jsx("div",{style:{color:"var(--text-muted)",fontSize:"0.7rem",marginTop:"0.25rem"},children:r("projects.add_project_desc")})]}),F&&e.jsx("div",{style:{marginBottom:"1rem",padding:"0.5rem 0.75rem",borderRadius:"4px",backgroundColor:"rgba(239, 68, 68, 0.1)",border:"1px solid rgba(239, 68, 68, 0.3)",color:"var(--destructive)",fontSize:"0.7rem"},children:F}),e.jsxs("form",{onSubmit:G,style:{display:"flex",flexDirection:"column",gap:"0.875rem"},children:[e.jsxs("div",{children:[e.jsx("label",{style:c,children:r("projects.project_name")}),e.jsx("input",{type:"text",value:l,onChange:t=>u(t.target.value),placeholder:r("projects.project_name_placeholder"),required:!0,autoFocus:!0,style:m,onFocus:t=>t.target.style.borderColor="var(--accent)",onBlur:t=>t.target.style.borderColor="var(--border)"})]}),e.jsxs("div",{children:[e.jsx("label",{style:c,children:r("projects.project_key")}),e.jsx("input",{type:"text",value:s,onChange:t=>b(t.target.value.toLowerCase().replace(/[^a-z0-9-]/g,"")),placeholder:r("projects.project_key_placeholder"),required:!0,style:m,onFocus:t=>t.target.style.borderColor="var(--accent)",onBlur:t=>t.target.style.borderColor="var(--border)"}),e.jsx("div",{style:{color:"var(--text-muted)",fontSize:"0.65rem",marginTop:"0.25rem"},children:r("projects.project_key_hint")})]}),e.jsxs("div",{children:[e.jsx("label",{style:c,children:r("projects.repo_url")}),e.jsx("input",{type:"text",value:n,onChange:t=>y(t.target.value),placeholder:r("projects.repo_url_placeholder"),required:!0,style:m,onFocus:t=>t.target.style.borderColor="var(--accent)",onBlur:t=>t.target.style.borderColor="var(--border)"})]}),e.jsxs("div",{children:[e.jsx("label",{style:c,children:r("projects.ssh_url")}),e.jsx("input",{type:"text",value:f,onChange:t=>C(t.target.value),placeholder:r("projects.ssh_url_placeholder"),style:m,onFocus:t=>t.target.style.borderColor="var(--accent)",onBlur:t=>t.target.style.borderColor="var(--border)"}),e.jsx("div",{style:{color:"var(--text-muted)",fontSize:"0.65rem",marginTop:"0.25rem"},children:r("projects.ssh_url_hint")})]}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-3",children:[e.jsxs("div",{children:[e.jsx("label",{style:c,children:r("projects.default_branch")}),e.jsx("input",{type:"text",value:_,onChange:t=>k(t.target.value),placeholder:r("projects.main"),style:m,onFocus:t=>t.target.style.borderColor="var(--accent)",onBlur:t=>t.target.style.borderColor="var(--border)"})]}),e.jsxs("div",{children:[e.jsx("label",{style:c,children:r("projects.git_platform")}),e.jsx(U,{value:N,onChange:t=>S(t),options:[{value:x.GITHUB,label:r("projects.github")},{value:x.GITLAB,label:r("projects.gitlab")},{value:x.GITEA,label:r("projects.gitea")}]})]}),e.jsxs("div",{children:[e.jsx("label",{style:c,children:r("projects.agent_type")}),e.jsx(U,{value:B,onChange:t=>T(t),options:d})]})]}),e.jsxs("div",{style:{display:"flex",gap:"0.75rem",marginTop:"0.5rem"},children:[e.jsx("button",{type:"button",onClick:g,disabled:p,style:{flex:1,padding:"0.5rem",backgroundColor:"transparent",border:"1px solid var(--border)",borderRadius:"4px",fontSize:"0.75rem",fontFamily:"'JetBrains Mono', monospace",cursor:"pointer",transition:"color 0.15s, border-color 0.15s"},className:"text-[var(--text-muted)] hover:text-[var(--text-primary)] hover:border-[var(--text-muted)]",children:r("common.cancel")}),e.jsx("button",{type:"submit",disabled:p||!l||!s||!n,style:{flex:1,padding:"0.5rem",backgroundColor:"var(--accent)",color:"#0C0C0C",border:"none",borderRadius:"4px",fontSize:"0.75rem",fontWeight:600,fontFamily:"'JetBrains Mono', monospace",cursor:p||!l||!s||!n?"not-allowed":"pointer",opacity:p||!l||!s||!n?.7:1},children:r(p?"common.creating":"common.create")})]})]})]})}):null}function se(){const i=H(),{t:a}=E(),[v,r]=o.useState(!1),{data:d,loading:l,refetch:u}=q(()=>P.get("web/projects").json(),[]);return M(o.useMemo(()=>e.jsxs("button",{onClick:()=>r(!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(W,{className:"h-3.5 w-3.5"}),a("projects.create_project")]}),[a])),e.jsxs("div",{className:"mx-auto max-w-5xl px-4 md:px-6 py-8",children:[l?e.jsx("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-4",children:e.jsx(D,{rows:4})}):!d||d.length===0?e.jsx(J,{icon:$,title:a("projects.no_projects_yet"),description:a("projects.create_first_project"),actionLabel:a("projects.create_project"),onAction:()=>r(!0)}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"flex flex-col gap-2 md:hidden",children:d.map(s=>e.jsxs("div",{onClick:()=>i(`/projects/${s.key}`),className:"cursor-pointer rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-3 transition-colors active:bg-[var(--bg-input)]",children:[e.jsxs("div",{className:"flex items-center justify-between gap-2",children:[e.jsx("span",{className:"text-xs font-medium text-[var(--accent)]",children:s.key}),e.jsxs("span",{className:"text-[11px] text-[var(--text-muted)]",children:[s.taskCount??0," tasks"]})]}),e.jsx("span",{className:"mt-1 block text-[11px] text-[var(--text-primary)]",children:s.name}),e.jsx("span",{className:"mt-0.5 block text-[11px] text-[var(--text-muted)]",children:s.agentType})]},s.key))}),e.jsxs("div",{className:"hidden md:block rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)]",children:[e.jsxs("div",{className:"grid grid-cols-[36px_90px_1fr_120px_60px_80px] gap-3 border-b border-[var(--border-row)] px-4 py-2.5 text-xs font-medium text-[var(--text-muted)]",children:[e.jsx("span",{children:"#"}),e.jsx("span",{children:a("projects.key")}),e.jsx("span",{children:a("projects.name")}),e.jsx("span",{children:a("projects.members")}),e.jsx("span",{children:a("projects.tasks_count")}),e.jsx("span",{children:a("projects.last_activity")})]}),d.map((s,b)=>e.jsxs("div",{onClick:()=>i(`/projects/${s.key}`),className:"grid cursor-pointer grid-cols-[36px_90px_1fr_120px_60px_80px] gap-3 border-b border-[var(--border-row)] px-4 py-3 last:border-b-0 hover:bg-[var(--bg-input)] transition-colors items-center",children:[e.jsx("span",{className:"text-xs text-[var(--text-muted)]",children:b+1}),e.jsx("span",{className:"truncate text-xs text-[var(--accent)]",children:s.key}),e.jsxs("div",{className:"min-w-0",children:[e.jsx("span",{className:"block truncate text-xs text-[var(--text-primary)]",children:s.name}),e.jsxs("span",{className:"block truncate text-[11px] text-[var(--text-muted)]",children:[s.agentType," · ",s.repoUrl.replace(/^https?:\/\//,"").split("/").slice(-2).join("/")]})]}),e.jsx("div",{className:"flex items-center",children:e.jsxs("div",{className:"flex -space-x-1.5",children:[(s.members??[]).map(n=>e.jsx("div",{className:"flex h-6 w-6 items-center justify-center rounded-full border-2 border-[var(--bg-card)] bg-[var(--accent)]/20 text-[11px] font-bold text-[var(--accent)]",title:n.name,children:n.name.charAt(0).toUpperCase()},n.id)),(s.memberCount??0)>5&&e.jsxs("div",{className:"flex h-6 w-6 items-center justify-center rounded-full border-2 border-[var(--bg-card)] bg-[var(--bg-input)] text-[11px] text-[var(--text-muted)]",children:["+",s.memberCount-5]})]})}),e.jsx("span",{className:"text-xs text-[var(--text-secondary)]",children:s.taskCount??0}),e.jsx("span",{className:"text-[11px] text-[var(--text-muted)]",children:O(s.lastActivity??null)})]},s.key))]})]}),e.jsx(K,{isOpen:v,onClose:()=>r(!1),onCreated:u})]})}export{se as default};
|