@overlordai/server 1.0.126 → 1.0.128

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 (92) hide show
  1. package/dist/adapters/help-text.d.ts.map +1 -1
  2. package/dist/adapters/help-text.js +2 -1
  3. package/dist/adapters/help-text.js.map +1 -1
  4. package/dist/notifier/notification-consumer.d.ts +1 -1
  5. package/dist/notifier/notification-consumer.d.ts.map +1 -1
  6. package/dist/notifier/notification-consumer.js +38 -14
  7. package/dist/notifier/notification-consumer.js.map +1 -1
  8. package/package.json +4 -4
  9. package/public/assets/{AccessTokensPage-Ck9KudgP.js → AccessTokensPage-BKPOeLH5.js} +1 -1
  10. package/public/assets/{AdminPage-BKWbP0n2.js → AdminPage-Bt8zsqUd.js} +1 -1
  11. package/public/assets/{AgentCliPage-Bex4ulEr.js → AgentCliPage-CvGgoJPi.js} +1 -1
  12. package/public/assets/{ApiReferencePage-CTkJqTdJ.js → ApiReferencePage-BgTKVERG.js} +1 -1
  13. package/public/assets/{ArchitecturePage-8SxZccYN.js → ArchitecturePage-B2jMT8On.js} +1 -1
  14. package/public/assets/{AuditLogPage-BLzj5y_X.js → AuditLogPage-BoB6en9-.js} +1 -1
  15. package/public/assets/{BindPlatformPage-D45esrNl.js → BindPlatformPage-GJUb4y8U.js} +1 -1
  16. package/public/assets/{BotIntegrationPage-BhDYugrQ.js → BotIntegrationPage-tvED2fvw.js} +1 -1
  17. package/public/assets/{BotManage-CbUW-s4b.js → BotManage-Bb2nQJJ0.js} +1 -1
  18. package/public/assets/{BotSetupPage-DnwaG9Z7.js → BotSetupPage-IL_UG9mQ.js} +1 -1
  19. package/public/assets/{ChangelogPage-ROnloca6.js → ChangelogPage-IqI_PvlI.js} +1 -1
  20. package/public/assets/{CliReferencePage-C-Lw0uAV.js → CliReferencePage-BK-20Xy3.js} +1 -1
  21. package/public/assets/{DeploymentPage-Cm8hl7PF.js → DeploymentPage-CTegdPV6.js} +1 -1
  22. package/public/assets/{DevWorkflowPage-DTjFXI4G.js → DevWorkflowPage-D7X6FWv1.js} +1 -1
  23. package/public/assets/{DeveloperManage-4o7ML8ff.js → DeveloperManage-D0-xLBLk.js} +1 -1
  24. package/public/assets/{DeveloperSetupPage-BQhIuXLe.js → DeveloperSetupPage-DvypSJpw.js} +1 -1
  25. package/public/assets/{DocsIndexPage-CoUUKiVh.js → DocsIndexPage-DFyZPfbE.js} +1 -1
  26. package/public/assets/{DocsLayout-Br7yGyG5.js → DocsLayout-CetUdZqe.js} +1 -1
  27. package/public/assets/{DocsPrimitives-DuiNLMTd.js → DocsPrimitives-mEubiuOB.js} +1 -1
  28. package/public/assets/{EditProjectPage-C_vbQdR2.js → EditProjectPage-DNwgYV6X.js} +1 -1
  29. package/public/assets/{EmptyState-aKMHLBhj.js → EmptyState-Oty9amb7.js} +1 -1
  30. package/public/assets/{EnvVariablesPage-gbqhCWCv.js → EnvVariablesPage-DCciQfa-.js} +1 -1
  31. package/public/assets/{HomePage-Sfw7oH7M.js → HomePage-CmLwPGXq.js} +1 -1
  32. package/public/assets/{InfoRow-BQI_KKyp.js → InfoRow-wMRXVXpM.js} +1 -1
  33. package/public/assets/{InstallationPage-Ce0qD1m-.js → InstallationPage-21iKvpOv.js} +1 -1
  34. package/public/assets/{LandingPage-1SiyCrIO.js → LandingPage-jbch85jE.js} +1 -1
  35. package/public/assets/{LocalDevelopmentPage-tuixvO86.js → LocalDevelopmentPage-CI0OCaIU.js} +1 -1
  36. package/public/assets/{LoginPage-D7C2GvH2.js → LoginPage-BlsMAD1A.js} +1 -1
  37. package/public/assets/{MetricBar-DaWuVJHZ.js → MetricBar-Bbvo0mjB.js} +1 -1
  38. package/public/assets/{NotFoundPage-B2K-657t.js → NotFoundPage-M_tndhpI.js} +1 -1
  39. package/public/assets/{OnboardingGuide-Cj_QW_kH.js → OnboardingGuide-DXiAPgIX.js} +1 -1
  40. package/public/assets/{PermissionsPage-D4ZeOpEb.js → PermissionsPage-WHjs-Xic.js} +1 -1
  41. package/public/assets/{PipelineConfigPage-DaCDhd-P.js → PipelineConfigPage-DYgMIHFl.js} +1 -1
  42. package/public/assets/{PipelineEditorPage-rM_yORd4.js → PipelineEditorPage-KR-x6zVv.js} +1 -1
  43. package/public/assets/{ProfilePage-DshUwwog.js → ProfilePage-BswRrpWP.js} +1 -1
  44. package/public/assets/{ProjectDetailPage-BMKog_vR.js → ProjectDetailPage-DK4Unf3c.js} +1 -1
  45. package/public/assets/{ProjectListPage-C5U_Q6m_.js → ProjectListPage-B1cnV_QE.js} +1 -1
  46. package/public/assets/{PtyTerminal-DJ4ToCWx.js → PtyTerminal-CAmMWJXG.js} +1 -1
  47. package/public/assets/{QuickAuth-BPSm4iQz.js → QuickAuth-9N2MyHB7.js} +1 -1
  48. package/public/assets/{RemoveMemberConfirmDialog-GYx2AH26.js → RemoveMemberConfirmDialog-eNkQp6cY.js} +1 -1
  49. package/public/assets/{Select-CvM411zU.js → Select-CyvSd8Z7.js} +1 -1
  50. package/public/assets/{SettingsPage-_cXRQuuA.js → SettingsPage-CmdqpJZQ.js} +1 -1
  51. package/public/assets/{Skeleton-qXDikSxR.js → Skeleton-VdSUQFFg.js} +1 -1
  52. package/public/assets/{SkillPage-C3wTzd5o.js → SkillPage-B8x5n4hu.js} +1 -1
  53. package/public/assets/TaskDetailPage-CSj4LhQy.js +26 -0
  54. package/public/assets/{TaskListPage-D6iQoHz7.js → TaskListPage-DeqS_f6c.js} +1 -1
  55. package/public/assets/{TaskStatusBadge-CJTrG6-l.js → TaskStatusBadge-C9OhcDPY.js} +1 -1
  56. package/public/assets/{TerminalHomePage-BFyQcEXU.js → TerminalHomePage-BLLueNK1.js} +1 -1
  57. package/public/assets/{TokenManage-C5GQ1LB8.js → TokenManage-ENzIGDT3.js} +1 -1
  58. package/public/assets/{Tooltip-DYbD-tQw.js → Tooltip-BBtFBnYK.js} +1 -1
  59. package/public/assets/{TotpSetupPage-C09YtAXD.js → TotpSetupPage-B_fa-elI.js} +1 -1
  60. package/public/assets/{WorkerDetailPage-DhtIXNEC.js → WorkerDetailPage-Dk4mhFUa.js} +1 -1
  61. package/public/assets/{WorkerListPage-B_K4x-PV.js → WorkerListPage-CWeju-3k.js} +1 -1
  62. package/public/assets/{WorkerOperationsPage-BZN-hLvH.js → WorkerOperationsPage-DG4jApiM.js} +1 -1
  63. package/public/assets/{WorkerSetupGuidePage-DNy2wbA9.js → WorkerSetupGuidePage-C48MhYel.js} +1 -1
  64. package/public/assets/{WorkerSetupPage-VBsAuhUc.js → WorkerSetupPage-gonzLiuJ.js} +1 -1
  65. package/public/assets/{arrow-left-B5R31ze1.js → arrow-left-DDL_7J7U.js} +1 -1
  66. package/public/assets/{arrow-right-C10sjQNz.js → arrow-right-D9LLcDP1.js} +1 -1
  67. package/public/assets/{bot-J2o7uWlo.js → bot-DJqdGwhw.js} +1 -1
  68. package/public/assets/{chevron-left-B5ojlwvf.js → chevron-left-CUl8YHGw.js} +1 -1
  69. package/public/assets/{chevron-right-Yoiq-SRa.js → chevron-right-F8dyj3sE.js} +1 -1
  70. package/public/assets/{copy-BpM8iA-r.js → copy-BBzWcQWg.js} +1 -1
  71. package/public/assets/{download-DMI0uxkZ.js → download-BdOW8aIg.js} +1 -1
  72. package/public/assets/{external-link-BgyHxzCy.js → external-link-C0X_bVXz.js} +1 -1
  73. package/public/assets/{git-fork-BSMVuD3x.js → git-fork-BK7Pwrv9.js} +1 -1
  74. package/public/assets/{index-XDDf1Oy_.js → index-DphtnUU4.js} +2 -2
  75. package/public/assets/{key-y6VWhViZ.js → key-ChzvW9EU.js} +1 -1
  76. package/public/assets/{loader-circle-CMxLiCu8.js → loader-circle-DqhPqgMu.js} +1 -1
  77. package/public/assets/{pencil-CUs1Ii2-.js → pencil-z_sz3N76.js} +1 -1
  78. package/public/assets/{plus-R7zuZ-Lg.js → plus-Dlq6nqWS.js} +1 -1
  79. package/public/assets/{rotate-ccw-B1uEgqoV.js → rotate-ccw-cERx2hQ-.js} +1 -1
  80. package/public/assets/{scroll-text-CL3s7j9w.js → scroll-text-UqFKmWfM.js} +1 -1
  81. package/public/assets/{settings-IoIv8DUf.js → settings-BBdnc180.js} +1 -1
  82. package/public/assets/{status-colors-JE6CIHvW.js → status-colors-BNjQYquq.js} +1 -1
  83. package/public/assets/task-constants-CxSAELU1.js +1 -0
  84. package/public/assets/{trash-2-BYatp6Y5.js → trash-2-CUymC-02.js} +1 -1
  85. package/public/assets/{useFetch-D6-vLVQP.js → useFetch-BwzlwOc3.js} +1 -1
  86. package/public/assets/{users-C3jRdgS-.js → users-JOM-3Abx.js} +1 -1
  87. package/public/assets/{wifi-B8ZV0Cuq.js → wifi-D5KFVZ3E.js} +1 -1
  88. package/public/assets/{workflow-GXjmJAuH.js → workflow-Z8lE8Hzp.js} +1 -1
  89. package/public/index.html +1 -1
  90. package/public/sw.js +1 -1
  91. package/public/assets/TaskDetailPage-BQY6iia7.js +0 -26
  92. package/public/assets/task-constants-DkWAZdpz.js +0 -1
@@ -1 +1 @@
1
- import{r as e}from"./index-XDDf1Oy_.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};
1
+ import{r as e}from"./index-DphtnUU4.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};
@@ -1,4 +1,4 @@
1
- import{c as e}from"./index-XDDf1Oy_.js";/**
1
+ import{c as e}from"./index-DphtnUU4.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-XDDf1Oy_.js";/**
1
+ import{c as e}from"./index-DphtnUU4.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-XDDf1Oy_.js";/**
1
+ import{c}from"./index-DphtnUU4.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,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-XDDf1Oy_.js"></script>
31
+ <script type="module" crossorigin src="/assets/index-DphtnUU4.js"></script>
32
32
  <link rel="stylesheet" crossorigin href="/assets/index-DMWyyiI3.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,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 u={};const o=s=>l(s,r),a={module:{uri:r},exports:u,require:o};e[r]=Promise.all(i.map(s=>a[s]||o(s))).then(s=>(n(...s),u))}}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:"ae4ea8cc78601c6719b6e3ef1b29684c"},{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-GXjmJAuH.js",revision:null},{url:"assets/wifi-B8ZV0Cuq.js",revision:null},{url:"assets/users-C3jRdgS-.js",revision:null},{url:"assets/useFetch-D6-vLVQP.js",revision:null},{url:"assets/trash-2-BYatp6Y5.js",revision:null},{url:"assets/task-constants-DkWAZdpz.js",revision:null},{url:"assets/status-colors-JE6CIHvW.js",revision:null},{url:"assets/settings-IoIv8DUf.js",revision:null},{url:"assets/scroll-text-CL3s7j9w.js",revision:null},{url:"assets/rotate-ccw-B1uEgqoV.js",revision:null},{url:"assets/plus-R7zuZ-Lg.js",revision:null},{url:"assets/pencil-CUs1Ii2-.js",revision:null},{url:"assets/password-CHk45-jw.js",revision:null},{url:"assets/loader-circle-CMxLiCu8.js",revision:null},{url:"assets/key-y6VWhViZ.js",revision:null},{url:"assets/index-XDDf1Oy_.js",revision:null},{url:"assets/index-DMWyyiI3.css",revision:null},{url:"assets/git-fork-BSMVuD3x.js",revision:null},{url:"assets/external-link-BgyHxzCy.js",revision:null},{url:"assets/download-DMI0uxkZ.js",revision:null},{url:"assets/date-RFA7-ZGs.js",revision:null},{url:"assets/copy-BpM8iA-r.js",revision:null},{url:"assets/chevron-right-Yoiq-SRa.js",revision:null},{url:"assets/chevron-left-B5ojlwvf.js",revision:null},{url:"assets/bot-J2o7uWlo.js",revision:null},{url:"assets/arrow-right-C10sjQNz.js",revision:null},{url:"assets/arrow-left-B5R31ze1.js",revision:null},{url:"assets/WorkerSetupPage-VBsAuhUc.js",revision:null},{url:"assets/WorkerSetupGuidePage-DNy2wbA9.js",revision:null},{url:"assets/WorkerOperationsPage-BZN-hLvH.js",revision:null},{url:"assets/WorkerListPage-B_K4x-PV.js",revision:null},{url:"assets/WorkerDetailPage-DhtIXNEC.js",revision:null},{url:"assets/TotpSetupPage-C09YtAXD.js",revision:null},{url:"assets/Tooltip-DYbD-tQw.js",revision:null},{url:"assets/TokenManage-C5GQ1LB8.js",revision:null},{url:"assets/TerminalHomePage-BFyQcEXU.js",revision:null},{url:"assets/TaskStatusBadge-CJTrG6-l.js",revision:null},{url:"assets/TaskListPage-D6iQoHz7.js",revision:null},{url:"assets/TaskDetailPage-BQY6iia7.js",revision:null},{url:"assets/SkillPage-C3wTzd5o.js",revision:null},{url:"assets/Skeleton-qXDikSxR.js",revision:null},{url:"assets/SettingsPage-_cXRQuuA.js",revision:null},{url:"assets/Select-CvM411zU.js",revision:null},{url:"assets/RemoveMemberConfirmDialog-GYx2AH26.js",revision:null},{url:"assets/QuickAuth-BPSm4iQz.js",revision:null},{url:"assets/PtyTerminal-DJ4ToCWx.js",revision:null},{url:"assets/PtyTerminal-Beg8tuEN.css",revision:null},{url:"assets/ProjectListPage-C5U_Q6m_.js",revision:null},{url:"assets/ProjectDetailPage-BMKog_vR.js",revision:null},{url:"assets/ProfilePage-DshUwwog.js",revision:null},{url:"assets/PipelineEditorPage-rM_yORd4.js",revision:null},{url:"assets/PipelineConfigPage-DaCDhd-P.js",revision:null},{url:"assets/PermissionsPage-D4ZeOpEb.js",revision:null},{url:"assets/OnboardingGuide-Cj_QW_kH.js",revision:null},{url:"assets/NotFoundPage-B2K-657t.js",revision:null},{url:"assets/MetricBar-DaWuVJHZ.js",revision:null},{url:"assets/LoginPage-D7C2GvH2.js",revision:null},{url:"assets/LocalDevelopmentPage-tuixvO86.js",revision:null},{url:"assets/LandingPage-1SiyCrIO.js",revision:null},{url:"assets/InstallationPage-Ce0qD1m-.js",revision:null},{url:"assets/InfoRow-BQI_KKyp.js",revision:null},{url:"assets/HomePage-Sfw7oH7M.js",revision:null},{url:"assets/EnvVariablesPage-gbqhCWCv.js",revision:null},{url:"assets/EmptyState-aKMHLBhj.js",revision:null},{url:"assets/EditProjectPage-C_vbQdR2.js",revision:null},{url:"assets/DocsPrimitives-DuiNLMTd.js",revision:null},{url:"assets/DocsLayout-Br7yGyG5.js",revision:null},{url:"assets/DocsIndexPage-CoUUKiVh.js",revision:null},{url:"assets/DeveloperSetupPage-BQhIuXLe.js",revision:null},{url:"assets/DeveloperManage-4o7ML8ff.js",revision:null},{url:"assets/DevWorkflowPage-DTjFXI4G.js",revision:null},{url:"assets/DeploymentPage-Cm8hl7PF.js",revision:null},{url:"assets/CliReferencePage-C-Lw0uAV.js",revision:null},{url:"assets/ChangelogPage-ROnloca6.js",revision:null},{url:"assets/BotSetupPage-DnwaG9Z7.js",revision:null},{url:"assets/BotManage-CbUW-s4b.js",revision:null},{url:"assets/BotIntegrationPage-BhDYugrQ.js",revision:null},{url:"assets/BindPlatformPage-D45esrNl.js",revision:null},{url:"assets/AuditLogPage-BLzj5y_X.js",revision:null},{url:"assets/ArchitecturePage-8SxZccYN.js",revision:null},{url:"assets/ApiReferencePage-CTkJqTdJ.js",revision:null},{url:"assets/AgentCliPage-Bex4ulEr.js",revision:null},{url:"assets/AdminPage-BKWbP0n2.js",revision:null},{url:"assets/AccessTokensPage-Ck9KudgP.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 u={};const a=s=>l(s,r),o={module:{uri:r},exports:u,require:a};e[r]=Promise.all(i.map(s=>o[s]||a(s))).then(s=>(n(...s),u))}}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:"dd6334732d1621fefc37e70a13c4f064"},{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-Z8lE8Hzp.js",revision:null},{url:"assets/wifi-D5KFVZ3E.js",revision:null},{url:"assets/users-JOM-3Abx.js",revision:null},{url:"assets/useFetch-BwzlwOc3.js",revision:null},{url:"assets/trash-2-CUymC-02.js",revision:null},{url:"assets/task-constants-CxSAELU1.js",revision:null},{url:"assets/status-colors-BNjQYquq.js",revision:null},{url:"assets/settings-BBdnc180.js",revision:null},{url:"assets/scroll-text-UqFKmWfM.js",revision:null},{url:"assets/rotate-ccw-cERx2hQ-.js",revision:null},{url:"assets/plus-Dlq6nqWS.js",revision:null},{url:"assets/pencil-z_sz3N76.js",revision:null},{url:"assets/password-CHk45-jw.js",revision:null},{url:"assets/loader-circle-DqhPqgMu.js",revision:null},{url:"assets/key-ChzvW9EU.js",revision:null},{url:"assets/index-DphtnUU4.js",revision:null},{url:"assets/index-DMWyyiI3.css",revision:null},{url:"assets/git-fork-BK7Pwrv9.js",revision:null},{url:"assets/external-link-C0X_bVXz.js",revision:null},{url:"assets/download-BdOW8aIg.js",revision:null},{url:"assets/date-RFA7-ZGs.js",revision:null},{url:"assets/copy-BBzWcQWg.js",revision:null},{url:"assets/chevron-right-F8dyj3sE.js",revision:null},{url:"assets/chevron-left-CUl8YHGw.js",revision:null},{url:"assets/bot-DJqdGwhw.js",revision:null},{url:"assets/arrow-right-D9LLcDP1.js",revision:null},{url:"assets/arrow-left-DDL_7J7U.js",revision:null},{url:"assets/WorkerSetupPage-gonzLiuJ.js",revision:null},{url:"assets/WorkerSetupGuidePage-C48MhYel.js",revision:null},{url:"assets/WorkerOperationsPage-DG4jApiM.js",revision:null},{url:"assets/WorkerListPage-CWeju-3k.js",revision:null},{url:"assets/WorkerDetailPage-Dk4mhFUa.js",revision:null},{url:"assets/TotpSetupPage-B_fa-elI.js",revision:null},{url:"assets/Tooltip-BBtFBnYK.js",revision:null},{url:"assets/TokenManage-ENzIGDT3.js",revision:null},{url:"assets/TerminalHomePage-BLLueNK1.js",revision:null},{url:"assets/TaskStatusBadge-C9OhcDPY.js",revision:null},{url:"assets/TaskListPage-DeqS_f6c.js",revision:null},{url:"assets/TaskDetailPage-CSj4LhQy.js",revision:null},{url:"assets/SkillPage-B8x5n4hu.js",revision:null},{url:"assets/Skeleton-VdSUQFFg.js",revision:null},{url:"assets/SettingsPage-CmdqpJZQ.js",revision:null},{url:"assets/Select-CyvSd8Z7.js",revision:null},{url:"assets/RemoveMemberConfirmDialog-eNkQp6cY.js",revision:null},{url:"assets/QuickAuth-9N2MyHB7.js",revision:null},{url:"assets/PtyTerminal-CAmMWJXG.js",revision:null},{url:"assets/PtyTerminal-Beg8tuEN.css",revision:null},{url:"assets/ProjectListPage-B1cnV_QE.js",revision:null},{url:"assets/ProjectDetailPage-DK4Unf3c.js",revision:null},{url:"assets/ProfilePage-BswRrpWP.js",revision:null},{url:"assets/PipelineEditorPage-KR-x6zVv.js",revision:null},{url:"assets/PipelineConfigPage-DYgMIHFl.js",revision:null},{url:"assets/PermissionsPage-WHjs-Xic.js",revision:null},{url:"assets/OnboardingGuide-DXiAPgIX.js",revision:null},{url:"assets/NotFoundPage-M_tndhpI.js",revision:null},{url:"assets/MetricBar-Bbvo0mjB.js",revision:null},{url:"assets/LoginPage-BlsMAD1A.js",revision:null},{url:"assets/LocalDevelopmentPage-CI0OCaIU.js",revision:null},{url:"assets/LandingPage-jbch85jE.js",revision:null},{url:"assets/InstallationPage-21iKvpOv.js",revision:null},{url:"assets/InfoRow-wMRXVXpM.js",revision:null},{url:"assets/HomePage-CmLwPGXq.js",revision:null},{url:"assets/EnvVariablesPage-DCciQfa-.js",revision:null},{url:"assets/EmptyState-Oty9amb7.js",revision:null},{url:"assets/EditProjectPage-DNwgYV6X.js",revision:null},{url:"assets/DocsPrimitives-mEubiuOB.js",revision:null},{url:"assets/DocsLayout-CetUdZqe.js",revision:null},{url:"assets/DocsIndexPage-DFyZPfbE.js",revision:null},{url:"assets/DeveloperSetupPage-DvypSJpw.js",revision:null},{url:"assets/DeveloperManage-D0-xLBLk.js",revision:null},{url:"assets/DevWorkflowPage-D7X6FWv1.js",revision:null},{url:"assets/DeploymentPage-CTegdPV6.js",revision:null},{url:"assets/CliReferencePage-BK-20Xy3.js",revision:null},{url:"assets/ChangelogPage-IqI_PvlI.js",revision:null},{url:"assets/BotSetupPage-IL_UG9mQ.js",revision:null},{url:"assets/BotManage-Bb2nQJJ0.js",revision:null},{url:"assets/BotIntegrationPage-tvED2fvw.js",revision:null},{url:"assets/BindPlatformPage-GJUb4y8U.js",revision:null},{url:"assets/AuditLogPage-BoB6en9-.js",revision:null},{url:"assets/ArchitecturePage-B2jMT8On.js",revision:null},{url:"assets/ApiReferencePage-BgTKVERG.js",revision:null},{url:"assets/AgentCliPage-CvGgoJPi.js",revision:null},{url:"assets/AdminPage-Bt8zsqUd.js",revision:null},{url:"assets/AccessTokensPage-BKPOeLH5.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,26 +0,0 @@
1
- import{c as Q,a as Y,r,h as g,j as e,M as ot,z as A,H as xt,t as J,v as ke,A as dt,f as mt,B as pt,q as ut,s as ht,k as Ke,p as D,l as We,m as ft,L as vt,X as ve,E as Xe,n as bt,x as gt,G as jt}from"./index-XDDf1Oy_.js";import{u as Nt,T as yt}from"./task-constants-DkWAZdpz.js";import{C as kt,H as He,P as Ve}from"./PtyTerminal-DJ4ToCWx.js";import{a as wt,b as _t,f as re}from"./date-RFA7-ZGs.js";import{S as Ct}from"./Select-CvM411zU.js";import{a as St}from"./status-colors-JE6CIHvW.js";import{T as Et}from"./Tooltip-DYbD-tQw.js";import{A as Tt}from"./arrow-left-B5R31ze1.js";import{R as be}from"./rotate-ccw-B1uEgqoV.js";import{G as Lt}from"./git-fork-BSMVuD3x.js";import{E as Dt}from"./external-link-BgyHxzCy.js";import{L as ge}from"./loader-circle-CMxLiCu8.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 Je=Q("Circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/**
7
- * @license lucide-react v0.469.0 - ISC
8
- *
9
- * This source code is licensed under the ISC license.
10
- * See the LICENSE file in the root directory of this source tree.
11
- */const It=Q("ListOrdered",[["path",{d:"M10 12h11",key:"6m4ad9"}],["path",{d:"M10 18h11",key:"11hvi2"}],["path",{d:"M10 6h11",key:"c7qv1k"}],["path",{d:"M4 10h2",key:"16xx2s"}],["path",{d:"M4 6h1v4",key:"cnovpq"}],["path",{d:"M6 18H4c0-1 2-2 2-3s-1-1.5-2-1",key:"m9a95d"}]]);/**
12
- * @license lucide-react v0.469.0 - ISC
13
- *
14
- * This source code is licensed under the ISC license.
15
- * See the LICENSE file in the root directory of this source tree.
16
- */const $t=Q("Maximize2",[["polyline",{points:"15 3 21 3 21 9",key:"mznyad"}],["polyline",{points:"9 21 3 21 3 15",key:"1avn1i"}],["line",{x1:"21",x2:"14",y1:"3",y2:"10",key:"ota7mn"}],["line",{x1:"3",x2:"10",y1:"21",y2:"14",key:"1atl0r"}]]);/**
17
- * @license lucide-react v0.469.0 - ISC
18
- *
19
- * This source code is licensed under the ISC license.
20
- * See the LICENSE file in the root directory of this source tree.
21
- */const Rt=Q("Minimize2",[["polyline",{points:"4 14 10 14 10 20",key:"11kfnr"}],["polyline",{points:"20 10 14 10 14 4",key:"rlmsce"}],["line",{x1:"14",x2:"21",y1:"10",y2:"3",key:"o5lafz"}],["line",{x1:"3",x2:"10",y1:"21",y2:"14",key:"1atl0r"}]]);/**
22
- * @license lucide-react v0.469.0 - ISC
23
- *
24
- * This source code is licensed under the ISC license.
25
- * See the LICENSE file in the root directory of this source tree.
26
- */const Pt=Q("SkipForward",[["polygon",{points:"5 4 15 12 5 20 5 4",key:"16p6eg"}],["line",{x1:"19",x2:"19",y1:"5",y2:"19",key:"futhcm"}]]);function Qe({isOpen:l,onClose:c,taskId:a,stageName:n,timeoutSeconds:t,onSubmitted:m}){const{t:p}=Y(),[b,u]=r.useState(t),[_,C]=r.useState(!1);r.useEffect(()=>{if(!l)return;u(t);const o=setInterval(()=>{u(j=>j<=1?(clearInterval(o),0):j-1)},1e3);return()=>clearInterval(o)},[l,t]),r.useEffect(()=>{b===0&&l&&c()},[b,l,c]);const $=r.useCallback(async o=>{C(!0);try{await g.post(`web/tasks/${a}/confirm-stage`,{json:{stageName:n,approved:o}}),m==null||m(),c()}catch{}finally{C(!1)}},[a,n,c,m]);return l?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)]"}),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.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(ot,{className:"h-4 w-4 text-[var(--accent)]"}),e.jsxs("h3",{className:"text-sm text-[var(--text-primary)]",children:["// stage: ",n]})]}),e.jsxs("span",{className:"flex items-center gap-1 text-xs text-[var(--text-muted)]",children:[e.jsx(kt,{className:"h-3.5 w-3.5"}),wt(b)]})]}),e.jsx("div",{className:"space-y-4 px-5 py-5",children:e.jsx("p",{className:"whitespace-pre-wrap text-xs text-[var(--text-primary)]",children:p("tasks.confirm_stage_message",{name:n})})}),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 disabled:opacity-50",disabled:_,onClick:()=>$(!1),children:p("tasks.reject")}),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:_,onClick:()=>$(!0),children:p(_?"tasks.stage_submitting":"tasks.confirm_and_proceed")})]})]})]}):null}function At(l,c){const a=new Date(l).getTime()-Date.now();if(a<=0)return c("tasks.tunnel_expired");const n=Math.floor(a/36e5),t=Math.floor(a%36e5/6e4);return n>0?c("tasks.tunnel_expires_hm",{h:n,m:t}):c("tasks.tunnel_expires_m",{m:t})}function Ye(l){switch(l){case"CONNECTED":return"var(--accent)";case"STARTING":return"var(--warning)";case"EXPIRED":return"var(--text-muted)";default:return"var(--text-muted)"}}function Ze(l,c){switch(l){case"IDLE":case"CLOSED":return c("tasks.tunnel_idle");case"STARTING":return c("tasks.tunnel_starting");case"CONNECTED":return c("tasks.tunnel_connected");case"EXPIRED":return c("tasks.tunnel_expired");case"CLOSING":return c("tasks.tunnel_closing");default:return String(l).toLowerCase()}}function Ft({taskId:l,taskFinished:c,compact:a}){const{t:n}=Y(),[t,m]=r.useState(A.IDLE),[p,b]=r.useState(null),[u,_]=r.useState(null),[C,$]=r.useState(""),[o,j]=r.useState(!1),[le,F]=r.useState(!1),M=r.useRef(null),R=r.useCallback(async()=>{try{const f=await g.get(`web/workspace-tunnel/${l}/status`).json();m(f.status),b(f.tunnelUrl??null),_(f.expiresAt??null),(f.status==="EXPIRED"||f.status==="IDLE"||f.status==="CLOSED")&&S()}catch{}},[l]);function ce(){S(),M.current=setInterval(R,5e3)}function S(){M.current&&(clearInterval(M.current),M.current=null)}r.useEffect(()=>{c&&(t===A.STARTING||t===A.CONNECTED)&&(m(A.IDLE),b(null),S())},[c,t]),r.useEffect(()=>{if(t!=="CONNECTED"||!u)return;const f=()=>{const E=At(u,n);$(E),E===n("tasks.tunnel_expired")&&(m(A.EXPIRED),b(null),S())};f();const I=setInterval(f,3e4);return()=>clearInterval(I)},[t,u]),r.useEffect(()=>()=>S(),[]),r.useEffect(()=>{c||R()},[R,c]);async function K(){j(!0);try{await g.post(`web/workspace-tunnel/${l}/start`),m(A.STARTING),ce()}catch(f){let I=n("tasks.tunnel_start_failed");try{if(f instanceof xt){const E=await f.response.json();E!=null&&E.error&&(I=E.error,/code.*not found|ENOENT.*code|spawn code/i.test(I)&&(I+=". "+n("tasks.tunnel_install_code_hint")))}}catch{}J.error(I)}finally{j(!1)}}async function W(){j(!0);try{await g.post(`web/workspace-tunnel/${l}/stop`),m(A.IDLE),b(null),S()}catch{}finally{j(!1)}}async function ie(){p&&(await navigator.clipboard.writeText(p),F(!0),setTimeout(()=>F(!1),2e3))}return a?e.jsxs("div",{className:"flex items-center gap-2 font-mono lowercase text-xs",children:[e.jsx("span",{className:"text-[var(--text-muted)]",children:"ide_tunnel:"}),e.jsx("span",{style:{color:Ye(t)},children:Ze(t,n)}),(t==="IDLE"||t==="CLOSED"||t==="EXPIRED")&&e.jsx("button",{onClick:K,disabled:o,className:"rounded-[4px] px-2 py-1 text-[var(--info)] disabled:opacity-50",style:{backgroundColor:"rgba(59,130,246,0.12)"},children:n(o?"tasks.tunnel_starting":"tasks.tunnel_start")}),t==="CONNECTED"&&p&&e.jsx("a",{href:p.replace(/^https?:/,"cursor:"),target:"_blank",rel:"noopener noreferrer",className:"rounded-[4px] px-2 py-1 text-[var(--info)]",style:{backgroundColor:"rgba(59,130,246,0.12)"},children:n("tasks.tunnel_open_in_cursor")})]}):e.jsxs("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-4 font-mono lowercase",children:[e.jsxs("div",{className:"mb-3 flex items-center justify-between",children:[e.jsx("span",{className:"text-xs text-[var(--text-muted)]",children:n("tasks.tunnel_header")}),e.jsxs("span",{className:"text-xs",style:{color:Ye(t)},children:["● ",Ze(t,n)]})]}),t==="CONNECTED"&&u&&e.jsxs("p",{className:"mb-2 text-xs text-[var(--text-muted)]",children:["// ",C]}),t==="CONNECTED"&&p&&e.jsxs("div",{className:"mb-3 flex items-center gap-2 rounded-[4px] border border-[var(--border)] bg-[var(--bg-primary)] px-3 py-2",children:[e.jsx("code",{className:"flex-1 truncate text-xs text-[var(--text-primary)]",children:p}),e.jsxs("button",{onClick:ie,className:"shrink-0 text-xs text-[var(--text-muted)] hover:text-[var(--text-primary)] transition-colors","aria-label":n("tasks.tunnel_copy_url"),children:["[",n("common.copy"),"]"]})]}),le&&e.jsx("p",{className:"mb-2 text-xs text-[var(--accent)]",children:n("tasks.tunnel_copied")}),t==="STARTING"&&e.jsx("p",{className:"mb-3 text-xs text-[var(--text-muted)]",children:n("tasks.tunnel_waiting")}),e.jsxs("div",{className:"flex flex-wrap items-center gap-2 text-xs",children:[(t==="IDLE"||t==="CLOSED")&&e.jsx("button",{onClick:K,disabled:o,className:"rounded-[4px] border border-[var(--accent)]/40 px-3 py-1.5 text-[var(--accent)] hover:bg-[var(--accent)]/10 transition-colors disabled:opacity-50",children:n(o?"tasks.tunnel_starting_button":"tasks.tunnel_start_button")}),t==="STARTING"&&e.jsx("button",{onClick:W,disabled:o,className:"rounded-[4px] border border-[var(--border)] px-3 py-1.5 text-[var(--text-secondary)] hover:text-[var(--text-primary)] transition-colors disabled:opacity-50",children:n(o?"tasks.tunnel_stopping":"tasks.tunnel_cancel")}),t==="CONNECTED"&&p&&e.jsxs(e.Fragment,{children:[e.jsx("a",{href:p.replace(/^https?:/,"cursor:"),target:"_blank",rel:"noopener noreferrer",className:"rounded-[4px] border border-[var(--accent)]/40 px-3 py-1.5 text-[var(--accent)] hover:bg-[var(--accent)]/10 transition-colors",children:n("tasks.tunnel_open_cursor")}),e.jsx("a",{href:p.replace(/^https?:/,"vscode:"),target:"_blank",rel:"noopener noreferrer",className:"rounded-[4px] border border-[var(--border)] px-3 py-1.5 text-[var(--text-secondary)] hover:text-[var(--text-primary)] transition-colors",children:n("tasks.tunnel_open_vscode")}),e.jsx("button",{onClick:W,disabled:o,className:"rounded-[4px] border border-[var(--destructive)]/40 px-3 py-1.5 text-[var(--destructive)] hover:bg-[var(--destructive)]/10 transition-colors disabled:opacity-50",children:n(o?"tasks.tunnel_stopping":"tasks.tunnel_stop")})]}),t==="EXPIRED"&&e.jsx("button",{onClick:K,disabled:o,className:"rounded-[4px] border border-[var(--accent)]/40 px-3 py-1.5 text-[var(--accent)] hover:bg-[var(--accent)]/10 transition-colors disabled:opacity-50",children:n(o?"tasks.tunnel_starting_button":"tasks.tunnel_restart")})]})]})}function Mt({isOpen:l,onClose:c,onConfirm:a,taskId:n,isLoading:t}){const{t:m}=Y();return e.jsx(ke,{isOpen:l,onClose:c,onConfirm:a,title:m("tasks.cancel_task_title"),message:m("tasks.cancel_task_message",{id:String(n)}),confirmLabel:m("tasks.cancel_task_confirm_label"),confirmVariant:"danger",isLoading:t})}function Ot({isOpen:l,onClose:c,onConfirm:a,taskId:n,mrUrl:t,isLoading:m,reuseWorkspace:p,onReuseWorkspaceChange:b}){const{t:u}=Y(),_=t?u("tasks.retry_message_with_mr",{id:String(n),url:t}):u("tasks.retry_message_without_mr",{id:String(n)});return e.jsx(ke,{isOpen:l,onClose:c,onConfirm:a,title:u("tasks.retry_title"),message:_,confirmLabel:u("tasks.retry_confirm_label"),confirmVariant:"accent",isLoading:m,children:e.jsxs("label",{className:"flex items-center gap-2 mt-3 text-[var(--text-muted)] text-xs cursor-pointer",children:[e.jsx("input",{type:"checkbox",checked:p,onChange:C=>b(C.target.checked),className:"w-3.5 h-3.5 cursor-pointer accent-[var(--accent)]"}),u("tasks.reuse_workspace_label")]})})}const je=["implement","test","verify","review","simplify","submit"];function ye(l){if(typeof l=="string")try{return ye(JSON.parse(l))}catch{return null}if(!l||typeof l!="object")return null;const c=l.stages;if(!Array.isArray(c)||c.length===0)return null;const a=c.map(n=>n&&typeof n=="object"?n.name:null).filter(n=>typeof n=="string"&&n.length>0);return a.length===c.length?a:null}function qt(l){if(!l.configSnapshot)return je;try{const c=JSON.parse(l.configSnapshot);return ye(c.pipeline)??ye(c)??je}catch{return je}}function Ut(l){switch(l){case"stage_change":return"text-[var(--accent)]";case"info":return"text-[var(--text-secondary)]";case"warning":return"text-[var(--warning)]";case"error":return"text-[var(--destructive)]";case"system":return"text-[var(--info)]";default:return"text-[var(--text-muted)]"}}function Ne({status:l}){const c=St(l);return e.jsxs("span",{className:"inline-flex items-center gap-1.5 rounded-[4px] px-2 py-0.5 text-xs",style:{color:c},children:[e.jsx("span",{className:"h-1.5 w-1.5 rounded-[3px]",style:{backgroundColor:c}}),l.toLowerCase()]})}function Gt(l){const c=qt(l),a=l.currentStage?c.indexOf(l.currentStage):-1;return c.map((n,t)=>{let m="pending";return l.status===D.COMPLETED?m="completed":l.status===D.FAILED&&t<=a?m=t===a?"failed":"completed":a>=0&&(t<a?m="completed":t===a&&(m="running")),{name:n,status:m}})}function ne(l,c){if(!l||!c)return null;const a=l.repoUrl.replace(/\.git$/,"").replace(/\/+$/,"");return l.gitPlatform===jt.GITLAB?`${a}/-/tree/${c}`:`${a}/tree/${c}`}function ts(){var ze,Be;const{id:l}=dt(),c=mt(),{t:a}=Y(),n=Nt(s=>s.cancelTask),[t,m]=r.useState(null),[p,b]=r.useState(null),[u,_]=r.useState([]),[C,$]=r.useState(!0),[o,j]=r.useState(null),[le,F]=r.useState(!1),[M,R]=r.useState(!1),[ce,S]=r.useState(!1),[K,W]=r.useState(!1),[ie,f]=r.useState(!1),[I,E]=r.useState(!1),[we,_e]=r.useState(""),[Ce,oe]=r.useState(!1),[Se,et]=pt(),[k,xe]=r.useState("terminal"),[Ee,Te]=r.useState([]),[Z,Le]=r.useState(0),[X,O]=r.useState(0),[H,De]=r.useState(""),[ee,tt]=r.useState(""),[st,de]=r.useState(!1),[at,Ie]=r.useState(!1),[q,me]=r.useState(null),[T,$e]=r.useState("disconnected"),[V,Re]=r.useState("auto"),U=r.useRef(null),Pe=r.useRef(null),x=Number(l),v=t?yt.includes(t.status):!1;ut(t?ht(t,100):null);const L=r.useCallback(async()=>{try{const s=await g.get(`web/tasks/${x}`).json();m(s)}catch{}},[x]),te=r.useCallback(async()=>{try{const s=await g.get(`web/tasks/${x}/logs`).json();_(s.lines)}catch{}},[x]),G=r.useCallback(async()=>{try{const s=await g.get(`web/tasks/${x}/pending-confirm`).json();j(s.confirm)}catch{j(null)}},[x]),Ae=r.useCallback(async()=>{de(!0);try{const s=new URLSearchParams;s.set("limit","50"),s.set("offset",String(X*50)),H&&s.set("type",H),ee&&s.set("search",ee);const i=await g.get(`web/tasks/${x}/events?${s}`).json();Te(i.events),Le(i.total)}catch{}finally{de(!1)}},[x,X,H,ee]);r.useEffect(()=>{k==="logs"&&Ae()},[k,Ae]),r.useEffect(()=>{k==="pipeline"&&!v&&g.get(`web/workspaces/${x}`).json().then(me).catch(()=>me(null))},[k,x,v]);const z=Ke(s=>s.lastEvent),Fe=Ke(s=>s.eventSeq);r.useEffect(()=>{$(!0),m(null),b(null),_([]),j(null),me(null),Te([]),Le(0),O(0),de(!1),Promise.all([L(),te(),G()]).finally(()=>$(!1))},[L,te,G]),r.useEffect(()=>{t!=null&&t.projectKey&&g.get(`web/projects/${t.projectKey}`).json().then(b).catch(()=>b(null))},[t==null?void 0:t.projectKey]),r.useEffect(()=>{!z||Fe===0||(z.event==="task_status_changed"&&z.taskId===x||z.event==="task_created"&&z.taskId===x)&&(L(),G())},[Fe,z,x,L,G]),r.useEffect(()=>{if(v)return;const i=setInterval(()=>{document.visibilityState!=="hidden"&&Promise.all([L(),te(),G()])},15e3);return()=>clearInterval(i)},[v,L,te,G]);const Me=r.useCallback(()=>j(null),[]),se=r.useCallback(()=>{j(null),L()},[L]),rt=(t==null?void 0:t.status)===D.FAILED||(t==null?void 0:t.status)===D.CANCELLED,pe=(t==null?void 0:t.status)===D.COMPLETED||(t==null?void 0:t.status)===D.FAILED||(t==null?void 0:t.status)===D.CANCELLED;r.useEffect(()=>{Se.get("action")==="fork"&&t&&!C&&(pe&&Oe(),et(s=>(s.delete("action"),s),{replace:!0}))},[t,C,Se,pe]);async function nt(){W(!0);try{await n(x),F(!1),await L()}finally{W(!1)}}async function lt(){f(!0);try{await g.post(`web/tasks/${x}/retry`,{json:{reuseWorkspace:Ce}}),R(!1),oe(!1),await L()}finally{f(!1)}}function Oe(){_e(""),S(!0)}async function ct(){E(!0);try{const s=await g.post(`web/tasks/${x}/fork`,{json:{description:we||void 0}}).json();S(!1),J.success(a("tasks.fork_success")),c(`/tasks/${s.task.id}`)}catch{J.error(a("tasks.fork_error"))}finally{E(!1)}}const N=r.useMemo(()=>t?Gt(t):[],[t==null?void 0:t.configSnapshot,t==null?void 0:t.currentStage,t==null?void 0:t.status]),ue=N.findIndex(s=>s.status==="running");if(C)return e.jsx("div",{className:"flex h-full items-center justify-center font-mono",children:e.jsx("p",{className:"text-sm text-[var(--text-muted)]",children:a("tasks.loading_task")})});if(!t)return e.jsxs("div",{className:"mx-auto max-w-5xl px-6 py-8 font-mono lowercase text-center",children:[e.jsx("p",{className:"text-sm text-[var(--text-secondary)]",children:a("tasks.task_not_found")}),e.jsxs("button",{onClick:()=>c("/tasks"),className:"mt-4 rounded-[4px] border border-[var(--border)] px-3 py-1.5 text-xs text-[var(--text-secondary)] hover:text-[var(--text-primary)] transition-colors",children:["< ",a("tasks.back_to_tasks")]})]});const w=t.status===D.QUEUED&&t.queuePosition!=null&&t.queueTotal!=null?{position:t.queuePosition,total:t.queueTotal}:null,y=_t(t.startedAt,t.completedAt),qe=w?e.jsxs("div",{className:"flex justify-between",children:[e.jsx("span",{className:"text-[var(--text-muted)]",children:"queue"}),e.jsxs("span",{className:"text-[var(--info)]",children:["#",w.position," / ",w.total]})]}):null,Ue=e.jsxs("div",{className:"flex items-center gap-3 border-b border-[var(--border)] bg-[var(--bg-primary)] px-4 py-3 shrink-0 md:hidden",children:[e.jsx("button",{onClick:()=>c("/tasks"),className:"shrink-0 text-[var(--text-muted)]",children:e.jsx(Tt,{className:"h-4 w-4"})}),e.jsxs("span",{className:"line-clamp-2 text-sm font-medium text-[var(--text-primary)]",title:ft(t),children:["#",t.id," ",We(t,100)]})]}),he=e.jsxs("div",{className:"hidden md:flex items-center gap-4 border-b border-[var(--border)] bg-[var(--bg-primary)] px-5 shrink-0",style:{height:44},children:[e.jsx(Ne,{status:t.status}),y&&e.jsxs("span",{className:"text-xs text-[var(--text-muted)]",children:["// time cost: ",y]}),w&&e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"text-xs text-[var(--border)]",children:"|"}),e.jsx("span",{className:"text-xs text-[var(--info)]",children:a("tasks.queue_position",{position:String(w.position),total:String(w.total)})})]}),e.jsx("span",{className:"text-xs text-[var(--border)]",children:"|"}),e.jsxs(vt,{to:`/projects/${t.projectKey}`,className:"text-xs text-[var(--text-muted)] hover:text-[var(--text-primary)] transition-colors",children:["project: ",e.jsx("span",{className:"text-[var(--text-primary)]",children:t.projectKey})]}),t.branch&&e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"text-xs text-[var(--border)]",children:"|"}),e.jsxs("span",{className:"text-xs text-[var(--text-muted)]",children:["branch: ",ne(p,t.branch)?e.jsx("a",{href:ne(p,t.branch),target:"_blank",rel:"noopener noreferrer",className:"text-[var(--text-primary)] hover:text-[var(--info)] hover:underline transition-colors",children:t.branch}):e.jsx("span",{className:"text-[var(--text-primary)]",children:t.branch})]})]}),t.mrUrl&&/^https?:\/\//.test(t.mrUrl)&&e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"text-xs text-[var(--border)]",children:"|"}),e.jsxs("a",{href:t.mrUrl,target:"_blank",rel:"noopener noreferrer",className:"text-xs text-[var(--info)] hover:underline",children:["MR: ",((ze=t.mrUrl.match(/!?\d+$/))==null?void 0:ze[0])??"view"]})]})]}),Ge=e.jsxs("div",{className:"flex items-center gap-3 border-t border-[var(--border)] bg-[var(--bg-primary)] px-4 md:px-5 shrink-0",style:{height:48},children:[!v&&e.jsxs("button",{onClick:()=>F(!0),className:"flex flex-1 md:flex-none items-center justify-center gap-1.5 rounded-[4px] bg-[var(--destructive)]/10 px-3 h-8 text-[11px] font-medium text-[var(--destructive)]",children:[e.jsx(ve,{className:"h-3 w-3"}),a("tasks.cancel_task")]}),rt&&e.jsxs("button",{onClick:()=>R(!0),className:"flex flex-1 md:flex-none items-center justify-center gap-1.5 rounded-[4px] bg-[var(--bg-card)] px-3 h-8 text-[11px] text-[var(--text-muted)] hover:text-[var(--text-primary)] hover:bg-[var(--bg-input)] transition-colors cursor-pointer",children:[e.jsx(be,{className:"h-3 w-3"}),a("tasks.retry_task")]}),pe&&e.jsxs("button",{onClick:Oe,className:"flex flex-1 md:flex-none items-center justify-center gap-1.5 rounded-[4px] bg-[var(--bg-card)] px-3 h-8 text-[11px] text-[var(--text-muted)] hover:text-[var(--text-primary)] hover:bg-[var(--bg-input)] transition-colors cursor-pointer",children:[e.jsx(Lt,{className:"h-3 w-3"}),a("tasks.fork_task")]}),t.workerId&&!v&&e.jsxs("button",{onClick:()=>{xe("pipeline"),setTimeout(()=>{var s,i;(i=(s=Pe.current)==null?void 0:s.scrollIntoView)==null||i.call(s,{behavior:"smooth",block:"center"})},50)},className:"hidden lg:flex items-center justify-center gap-1.5 rounded-[4px] px-3 h-8 text-[11px] font-medium text-[var(--info)]",style:{backgroundColor:"rgba(59,130,246,0.12)"},children:[e.jsx(Dt,{className:"h-3 w-3"}),a("tasks.cursor_tunnel")]})]}),it=e.jsxs("div",{className:"hidden w-[280px] shrink-0 flex-col gap-6 overflow-y-auto border-l border-[var(--border)] bg-[var(--bg-primary)] p-4 lg:flex",children:[e.jsxs("div",{className:"flex flex-col gap-3",children:[e.jsx("span",{className:"text-[11px] font-medium text-[var(--text-muted)]",children:a("tasks.pipeline_stages")}),N.map(s=>{const i=s.status==="completed",d=s.status==="running",h=s.status==="failed";return e.jsxs("div",{className:`flex items-center gap-2 rounded-[4px] px-2 py-1.5 ${d?"bg-[#1a1a1a]":""}`,children:[i&&e.jsx(Xe,{className:"h-3.5 w-3.5 shrink-0 text-[var(--accent)]"}),d&&e.jsx(ge,{className:"h-3.5 w-3.5 shrink-0 text-[var(--accent)]"}),h&&e.jsx(ve,{className:"h-3.5 w-3.5 shrink-0 text-[var(--destructive)]"}),s.status==="pending"&&e.jsx(Je,{className:"h-3.5 w-3.5 shrink-0 text-[#525252]"}),e.jsx("span",{className:"text-xs",style:{color:i?"var(--accent)":d?"#e5e5e5":h?"var(--destructive)":"#525252",fontWeight:d?500:400},children:d?`> ${s.name}`:s.name})]},s.name)})]}),y&&e.jsxs("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] px-3 py-2 text-[11px] text-[var(--text-secondary)]",children:["// time cost: ",y]}),e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsx("span",{className:"text-[11px] font-medium text-[var(--text-muted)]",children:a("tasks.activity_log")}),u.length>0?e.jsx("div",{className:"flex flex-col gap-1.5",children:u.slice(0,8).map((s,i)=>e.jsx("p",{className:"text-[11px] leading-relaxed text-[var(--text-muted)]",children:s},i))}):e.jsx("span",{className:"text-[11px] text-[var(--text-muted)]",children:a("tasks.no_activity")})]})]}),fe=e.jsxs(e.Fragment,{children:[e.jsx(Mt,{isOpen:le,onClose:()=>F(!1),onConfirm:nt,taskId:x,isLoading:K}),e.jsx(Ot,{isOpen:M,onClose:()=>{R(!1),oe(!1)},onConfirm:lt,taskId:x,mrUrl:t.mrUrl??void 0,isLoading:ie,reuseWorkspace:Ce,onReuseWorkspaceChange:oe}),e.jsx(ke,{isOpen:ce,onClose:()=>S(!1),onConfirm:ct,title:a("tasks.fork_task"),message:a("tasks.fork_task_desc"),confirmLabel:a("tasks.fork_task"),confirmVariant:"accent",isLoading:I,children:e.jsxs("div",{className:"mt-3 flex flex-col gap-2",children:[e.jsxs("span",{className:"text-[11px] text-[var(--text-muted)]",children:["fork of #",x]}),e.jsx("textarea",{value:we,onChange:s=>_e(s.target.value),placeholder:a("tasks.fork_description_placeholder"),rows:4,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)] outline-none focus:border-[var(--accent)] resize-none"})]})})]});return at&&k==="terminal"?e.jsxs("div",{className:"fixed inset-0 z-50 flex flex-col bg-[var(--bg-primary)] font-mono lowercase h-screen",style:{height:"100dvh",paddingTop:"env(safe-area-inset-top, 0px)",paddingBottom:"env(safe-area-inset-bottom, 0px)"},children:[he,e.jsxs("div",{className:"flex items-center justify-between border-b border-[var(--border)] px-5 shrink-0",style:{height:36,backgroundColor:"#111111"},children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("span",{className:"text-[11px] font-medium text-[var(--text-muted)]",children:a("tasks.pty_terminal")}),e.jsxs("span",{className:`inline-flex items-center gap-1 text-[11px] ${T==="connected"?"text-[var(--accent)]":T==="connecting"?"text-[var(--warning)]":"text-[var(--text-muted)]"}`,children:[e.jsx("span",{className:`h-1.5 w-1.5 rounded-full ${T==="connected"?"bg-[var(--accent)]":T==="connecting"?"bg-[var(--warning)]":"bg-[#525252]"}`}),a(`tasks.${T}`)]})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[!v&&V==="auto"&&e.jsxs("button",{onClick:()=>{var s;return(s=U.current)==null?void 0:s.requestTakeover()},className:"flex items-center gap-1.5 rounded-[4px] px-2.5 h-10 md:h-8 text-[11px] font-medium text-[var(--warning)]",style:{backgroundColor:"rgba(245,158,11,0.12)"},children:[e.jsx(He,{className:"h-3 w-3"}),a("tasks.take_over")]}),!v&&V==="manual"&&e.jsxs("button",{onClick:()=>{var s;return(s=U.current)==null?void 0:s.releaseTakeover()},className:"flex items-center gap-1.5 rounded-[4px] px-2.5 h-10 md:h-8 text-[11px] font-medium text-[var(--accent)]",style:{backgroundColor:"rgba(34,197,94,0.12)"},children:[e.jsx(be,{className:"h-3 w-3"}),a("tasks.restore_auto")]}),t.currentStage&&e.jsxs("span",{className:"text-[11px] text-[var(--accent)]",children:[a("tasks.stage"),": ",t.currentStage]}),e.jsx("button",{onClick:()=>Ie(!1),className:"flex items-center rounded-[4px] bg-[var(--bg-card)] px-2.5 py-1 text-[var(--text-muted)]",children:e.jsx(Rt,{className:"h-3 w-3"})})]})]}),e.jsx("div",{className:"min-h-0 flex-1 overflow-hidden",children:e.jsx(Ve,{ref:U,taskId:x,sessionId:t.currentSessionId??void 0,taskFinished:v,onStatusChange:$e,onTakeoverChange:Re})}),Ge,fe]}):t.status===D.SUSPENDED?e.jsxs("div",{className:"flex h-full flex-col font-mono lowercase",children:[Ue,he,e.jsx("div",{className:"flex items-center gap-2 border-b px-4 md:px-6 py-2 text-xs shrink-0",style:{backgroundColor:"rgba(245,158,11,0.08)",borderColor:"rgba(245,158,11,0.2)",color:"var(--warning)"},children:a("tasks.task_suspended_banner")}),e.jsxs("div",{className:"flex min-h-0 flex-1 flex-col md:flex-row gap-4 md:gap-6 p-4 md:p-6 overflow-y-auto",children:[e.jsxs("div",{className:"flex min-w-0 flex-1 flex-col gap-4",children:[e.jsxs("div",{className:"hidden md:flex items-center gap-3",children:[e.jsxs("span",{className:"text-xl font-bold text-[var(--text-primary)]",children:["#",t.id]}),e.jsx("span",{className:"text-base text-[var(--text-secondary)] truncate max-w-[60%]",children:e.jsx(Et,{content:bt(t),children:We(t,200)})}),e.jsx("span",{className:"rounded-[4px] px-2.5 py-1 text-[11px] font-bold text-[var(--warning)]",style:{backgroundColor:"rgba(245,158,11,0.12)"},children:a("tasks.status_suspended")})]}),e.jsx("div",{className:"flex items-center gap-2 md:hidden",children:e.jsx("span",{className:"rounded-[4px] px-2.5 py-1 text-[11px] font-bold text-[var(--warning)]",style:{backgroundColor:"rgba(245,158,11,0.12)"},children:a("tasks.status_suspended")})}),o&&e.jsxs("div",{className:"rounded-[4px] border p-4",style:{borderColor:"rgba(245,158,11,0.27)",backgroundColor:"#1a1a1a"},children:[e.jsx("p",{className:"mb-2 text-[11px] font-bold text-[var(--accent)]",children:a("tasks.pending_confirmation")}),e.jsx("p",{className:"mb-3 text-xs text-[var(--text-secondary)]",children:o.prompt??a("tasks.pipeline_requires_confirmation")}),e.jsx("div",{className:"mb-3 flex flex-col gap-1.5 text-[11px]",children:e.jsxs("div",{className:"flex justify-between",children:[e.jsx("span",{className:"text-[var(--text-muted)]",children:"stage"}),e.jsx("span",{className:"text-[var(--text-primary)]",children:o.stageName})]})}),e.jsxs("div",{className:"flex flex-col gap-2 md:flex-row md:flex-wrap md:gap-3",children:[e.jsx("button",{onClick:async()=>{try{await g.post(`web/tasks/${x}/confirm-stage`,{json:{stageName:o.stageName,approved:!0}}),se()}catch{J.error(a("tasks.confirm_failed"))}},className:"flex-1 md:flex-none rounded-[4px] bg-[var(--accent)] px-4 py-2.5 md:py-2 text-[11px] font-bold text-[#0c0c0c]",children:a("tasks.confirm_and_proceed")}),e.jsx("button",{onClick:async()=>{try{await g.post(`web/tasks/${x}/confirm-stage`,{json:{stageName:o.stageName,approved:!1}}),se()}catch{J.error(a("tasks.confirm_failed"))}},className:"flex-1 md:flex-none rounded-[4px] bg-[#1a1a1a] px-4 py-2.5 md:py-2 text-[11px] text-[var(--destructive)]",style:{border:"1px solid rgba(239,68,68,0.27)"},children:a("tasks.reject")})]})]}),e.jsxs("div",{className:"flex flex-col gap-3 rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-4 lg:hidden",children:[e.jsx("span",{className:"text-xs font-bold text-[var(--accent)]",children:a("tasks.task_info")}),e.jsxs("div",{className:"flex flex-col gap-1.5 text-[11px]",children:[e.jsxs("div",{className:"flex justify-between",children:[e.jsx("span",{className:"text-[var(--text-muted)]",children:"status"}),e.jsx("span",{className:"font-bold text-[var(--warning)]",children:"suspended"})]}),e.jsxs("div",{className:"flex justify-between",children:[e.jsx("span",{className:"text-[var(--text-muted)]",children:"project"}),e.jsx("span",{className:"text-[var(--text-primary)]",children:t.projectKey})]}),e.jsxs("div",{className:"flex justify-between",children:[e.jsx("span",{className:"text-[var(--text-muted)]",children:"worker"}),e.jsx("span",{className:"text-[var(--text-primary)]",children:t.workerName??"-"})]}),e.jsxs("div",{className:"flex justify-between",children:[e.jsx("span",{className:"text-[var(--text-muted)]",children:"created"}),e.jsx("span",{className:"text-[var(--text-primary)]",children:re(t.createdAt)})]})]})]}),e.jsx("div",{className:"hidden md:flex flex-wrap items-center gap-2 py-2",children:N.map((s,i)=>{const d=s.status==="failed",h=s.status==="completed",P=s.status==="running"&&t.status===D.SUSPENDED,B=d?"var(--destructive)":h?"var(--accent)":P?"var(--warning)":"#525252",ae=d?"rgba(239,68,68,0.12)":h?"rgba(34,197,94,0.12)":P?"rgba(245,158,11,0.12)":"transparent";return e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"rounded-[4px] px-2.5 py-1 text-[11px]",style:{color:B,backgroundColor:ae,fontWeight:P?700:400,border:P?`1px solid ${B}`:void 0},children:P?"confirm":`${s.name}${h?" ✓":d?" ✗":""}`}),i<N.length-1&&e.jsx("div",{className:"h-px w-6 bg-[var(--border)]"})]},s.name)})}),e.jsxs("div",{className:"hidden md:block min-h-[200px] flex-1 rounded-[4px] border border-[var(--border)] bg-[#0c0c0c] p-4",children:[e.jsx("p",{className:"mb-2 text-[11px] font-bold text-[var(--accent)]",children:a("tasks.pty_output")}),e.jsxs("div",{className:"flex flex-col gap-1",children:[u.slice(-10).map((s,i)=>e.jsx("p",{className:"text-[11px] leading-relaxed text-[var(--text-secondary)]",children:s},i)),u.length===0&&e.jsx("p",{className:"text-[11px] text-[var(--text-muted)]",children:a("tasks.no_output")})]})]})]}),e.jsxs("div",{className:"hidden w-[280px] shrink-0 flex-col gap-4 rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-4 lg:flex",children:[e.jsx("span",{className:"text-[13px] font-bold text-[var(--accent)]",children:a("tasks.task_info")}),e.jsxs("div",{className:"flex flex-col gap-1.5 text-[11px]",children:[e.jsxs("div",{className:"flex justify-between",children:[e.jsx("span",{className:"text-[var(--text-muted)]",children:"status"}),e.jsx("span",{className:"font-bold text-[var(--warning)]",children:"suspended"})]}),e.jsxs("div",{className:"flex justify-between",children:[e.jsx("span",{className:"text-[var(--text-muted)]",children:"project"}),e.jsx("span",{className:"text-[var(--text-primary)]",children:t.projectKey})]}),e.jsxs("div",{className:"flex justify-between",children:[e.jsx("span",{className:"text-[var(--text-muted)]",children:"worker"}),e.jsx("span",{className:"text-[var(--text-primary)]",children:t.workerName??"-"})]})]}),e.jsx("div",{className:"h-px bg-[var(--border)]"}),e.jsx("span",{className:"text-xs font-bold text-[var(--accent)]",children:a("tasks.stage_timeline")}),e.jsx("div",{className:"flex flex-col gap-2",children:N.map(s=>{const i=s.status==="completed"?"var(--info)":s.status==="failed"?"var(--destructive)":s.status==="running"?"var(--warning)":"#525252",d=s.status==="failed"?"var(--destructive)":s.status==="running"?"var(--warning)":"#a3a3a3",h=s.status==="completed"?"completed":s.status==="running"?"suspended":s.status==="failed"?"failed":"pending";return e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"h-2 w-2 shrink-0 rounded-[4px]",style:{backgroundColor:i}}),e.jsxs("span",{className:"text-[11px]",style:{color:d,fontWeight:s.status==="running"?700:400},children:[s.name," ",h]})]},s.name)})}),e.jsx("div",{className:"h-px bg-[var(--border)]"}),e.jsx("div",{className:"flex flex-col gap-1.5 text-[11px]",children:e.jsxs("div",{className:"flex justify-between",children:[e.jsx("span",{className:"text-[var(--text-muted)]",children:"created"}),e.jsx("span",{className:"text-[var(--text-primary)]",children:re(t.createdAt)})]})})]})]}),o&&e.jsx(Qe,{isOpen:!!o,onClose:Me,taskId:x,stageName:o.stageName,timeoutSeconds:Math.ceil(o.timeout/1e3),onSubmitted:se}),fe]}):e.jsxs("div",{className:"flex h-full flex-col overflow-hidden font-mono lowercase",children:[Ue,e.jsxs("div",{className:"flex flex-wrap items-center gap-3 gap-y-1 border-b border-[var(--border)] bg-[var(--bg-primary)] px-4 py-2 shrink-0 md:hidden",children:[e.jsx(Ne,{status:t.status}),y&&e.jsxs("span",{className:"shrink-0 text-[11px] text-[var(--text-muted)]",children:["// time cost: ",y]}),e.jsx("span",{className:"shrink-0 text-[11px] text-[var(--text-muted)]",children:t.projectKey}),t.workerName&&e.jsx("span",{className:"shrink-0 text-[11px] text-[var(--text-muted)]",children:t.workerName}),t.branch&&(ne(p,t.branch)?e.jsx("a",{href:ne(p,t.branch),target:"_blank",rel:"noopener noreferrer",className:"shrink-0 text-[11px] text-[var(--text-muted)] hover:text-[var(--info)] hover:underline truncate max-w-[80px] md:max-w-[120px] transition-colors",children:t.branch}):e.jsx("span",{className:"shrink-0 text-[11px] text-[var(--text-muted)] truncate max-w-[80px] md:max-w-[120px]",children:t.branch}))]}),he,t.errorMessage&&e.jsxs("div",{className:"flex items-center gap-2 border-b px-6 py-2 text-xs shrink-0 bg-[var(--destructive)]/10 text-[var(--destructive)]",style:{borderColor:"rgba(239,68,68,0.2)"},children:["// error: ",t.errorMessage]}),w&&e.jsxs("div",{className:"flex items-center gap-2 border-b px-4 md:px-6 py-2 text-xs shrink-0 text-[var(--info)]",style:{backgroundColor:"color-mix(in srgb, var(--info) 8%, transparent)",borderColor:"color-mix(in srgb, var(--info) 20%, transparent)"},children:[e.jsx(It,{className:"h-3.5 w-3.5 shrink-0"}),e.jsxs("span",{children:[a("tasks.queue_position_banner",{position:String(w.position),total:String(w.total)}),w.position>1?` — ${a("tasks.queue_ahead",{count:String(w.position-1)})}`:` — ${a("tasks.queue_next")}`]})]}),o&&e.jsx(Qe,{isOpen:!!o,onClose:Me,taskId:x,stageName:o.stageName,timeoutSeconds:Math.ceil(o.timeout/1e3),onSubmitted:se}),e.jsxs("div",{className:"flex min-h-0 flex-1 overflow-hidden",children:[e.jsxs("div",{className:"flex min-w-0 flex-1 flex-col overflow-hidden",children:[e.jsx("div",{className:"flex items-center border-b border-[var(--border)] shrink-0 overflow-x-auto no-scrollbar",children:["terminal","pipeline","logs"].map(s=>e.jsx("button",{onClick:()=>xe(s),className:`shrink-0 whitespace-nowrap px-4 py-2.5 text-xs transition-colors ${k===s?"border-b-2 border-[var(--accent)] text-[var(--accent)] font-medium":"text-[var(--text-muted)] hover:text-[var(--text-secondary)]"}`,children:a(s==="terminal"?"tasks.terminal":s==="pipeline"?"tasks.pipeline_tab":"tasks.logs")},s))}),k==="terminal"&&e.jsxs("div",{className:"flex min-h-0 flex-1 flex-col",children:[e.jsxs("div",{className:"flex items-center justify-between border-b border-[var(--border)] px-3 md:px-5 shrink-0",style:{height:36,backgroundColor:"#111111"},children:[e.jsxs("div",{className:"flex items-center gap-2 md:gap-3",children:[e.jsx("span",{className:"text-[11px] font-medium text-[var(--text-muted)]",children:a("tasks.pty_terminal")}),e.jsxs("span",{className:`inline-flex items-center gap-1 text-[11px] ${T==="connected"?"text-[var(--accent)]":T==="connecting"?"text-[var(--warning)]":"text-[var(--text-muted)]"}`,children:[e.jsx("span",{className:`h-1.5 w-1.5 rounded-full ${T==="connected"?"bg-[var(--accent)]":T==="connecting"?"bg-[var(--warning)]":"bg-[#525252]"}`}),a(`tasks.${T}`)]})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[!v&&V==="auto"&&e.jsxs("button",{onClick:()=>{var s;return(s=U.current)==null?void 0:s.requestTakeover()},className:"flex items-center gap-1.5 rounded-[4px] px-2.5 h-10 md:h-8 text-[11px] font-medium text-[var(--warning)]",style:{backgroundColor:"rgba(245,158,11,0.12)"},children:[e.jsx(He,{className:"h-3 w-3"}),a("tasks.take_over")]}),!v&&V==="manual"&&e.jsxs("button",{onClick:()=>{var s;return(s=U.current)==null?void 0:s.releaseTakeover()},className:"flex items-center gap-1.5 rounded-[4px] px-2.5 h-10 md:h-8 text-[11px] font-medium text-[var(--accent)]",style:{backgroundColor:"rgba(34,197,94,0.12)"},children:[e.jsx(be,{className:"h-3 w-3"}),a("tasks.restore_auto")]}),!v&&V==="requesting"&&e.jsxs("span",{className:"flex items-center gap-1.5 px-2.5 h-10 md:h-8 text-[11px] text-[var(--warning)]",children:[e.jsx(ge,{className:"h-3 w-3 animate-spin"}),a("tasks.requesting_takeover")]}),!v&&t.currentStage&&e.jsxs("button",{className:"hidden md:flex items-center gap-1.5 rounded-[4px] bg-[var(--bg-card)] px-2.5 h-10 md:h-8 text-[11px] text-[var(--text-muted)]",children:[e.jsx(Pt,{className:"h-3 w-3"}),a("tasks.skip_stage")]}),e.jsx("button",{onClick:()=>Ie(!0),className:"hidden md:flex items-center rounded-[4px] bg-[var(--bg-card)] px-2.5 h-10 md:h-8 text-[var(--text-muted)]",children:e.jsx($t,{className:"h-3 w-3"})})]})]}),e.jsxs("div",{className:"flex items-center gap-2 border-b border-[var(--border)] px-4 py-2 shrink-0 md:hidden",children:[e.jsx(Ne,{status:t.status}),t.workerName&&e.jsxs("span",{className:"text-[11px] text-[var(--text-muted)]",children:["on ",t.workerName]})]}),e.jsxs("div",{className:"border-b border-[var(--border)] px-4 py-3 shrink-0 md:hidden",children:[e.jsx("span",{className:"text-[11px] font-bold text-[var(--accent)]",children:a("tasks.stage_progress")}),e.jsx("div",{className:"mt-2 overflow-x-auto no-scrollbar pr-4",style:{borderRadius:0},children:e.jsx("div",{className:"flex items-center gap-1 py-0.5",children:N.map((s,i)=>{const d=s.status==="completed",h=s.status==="running",B=s.status==="failed"?"var(--destructive)":d||h?"var(--accent)":"#525252";return e.jsxs("div",{className:"flex items-center",children:[e.jsxs("span",{className:"shrink-0 text-[11px] leading-normal whitespace-nowrap",style:{color:B,fontWeight:h?600:400},children:[s.name,d?" ✓":h?" ...":""]}),i<N.length-1&&e.jsx("div",{className:"mx-1.5 h-px w-4 shrink-0",style:{backgroundColor:B}})]},s.name)})})})]}),e.jsx("div",{className:"px-4 pt-3 pb-1 shrink-0 md:hidden",children:e.jsx("span",{className:"text-[11px] font-bold text-[var(--accent)]",children:a("tasks.pty_output")})}),e.jsx("div",{className:"min-h-0 flex-1 overflow-hidden",children:e.jsx(Ve,{ref:U,taskId:x,sessionId:t.currentSessionId??void 0,taskFinished:v,onStatusChange:$e,onTakeoverChange:Re})}),Ge]}),k==="pipeline"&&e.jsxs("div",{className:"flex min-h-0 flex-1 flex-col overflow-y-auto p-4 md:p-6 lg:p-8",children:[e.jsx("div",{className:"mb-4 md:mb-5 overflow-x-auto no-scrollbar",style:{borderRadius:0},children:e.jsx("div",{className:"flex items-center py-5",children:N.map((s,i)=>{const d=s.status==="completed",h=s.status==="running",ae=s.status==="failed"?"var(--destructive)":d||h?"var(--accent)":"#525252";return e.jsxs("div",{className:"flex items-center",style:{flex:i<N.length-1?1:void 0},children:[e.jsxs("div",{className:"flex flex-col items-center gap-1.5",children:[e.jsxs("div",{className:"flex h-6 w-6 md:h-7 md:w-7 items-center justify-center rounded-full shrink-0",style:{backgroundColor:ae},children:[d&&e.jsx("span",{className:"text-[11px] md:text-xs font-semibold text-[#0c0c0c]",children:"✓"}),h&&e.jsx("span",{className:"h-2 w-2 md:h-2.5 md:w-2.5 rounded-full bg-[#0c0c0c]"})]}),e.jsx("span",{className:"text-[11px] leading-normal font-medium whitespace-nowrap",style:{color:ae},children:s.name})]}),i<N.length-1&&e.jsx("div",{className:"mx-1 md:mx-2 h-0.5 flex-1 min-w-3 rounded-full",style:{backgroundColor:i<(ue>=0?ue:0)?"var(--accent)":"#525252"}})]},s.name)})})}),t.currentStage&&e.jsxs("div",{className:"mb-4 md:mb-5 rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-3 text-xs leading-relaxed",children:[e.jsxs("p",{className:"text-[var(--text-secondary)]",children:["// stage: ",t.currentStage," (",ue+1,"/",N.length,")"]}),t.startedAt&&e.jsxs("p",{className:"text-[var(--text-secondary)]",children:["// elapsed: ",re(t.startedAt).replace(" ago","")]}),y&&e.jsxs("p",{className:"text-[var(--text-secondary)]",children:["// time cost: ",y]}),e.jsxs("p",{className:"text-[var(--text-secondary)]",children:["// retries: ",t.retryCount,"/2"]})]}),!t.currentStage&&y&&e.jsx("div",{className:"mb-4 md:mb-5 rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-3 text-xs leading-relaxed",children:e.jsxs("p",{className:"text-[var(--text-secondary)]",children:["// time cost: ",y]})}),e.jsx("button",{onClick:()=>xe("terminal"),className:"flex-1 min-h-[100px] rounded-[4px] border border-dashed border-[var(--border)] flex items-center justify-center gap-2 text-[11px] text-[var(--text-muted)] hover:border-[var(--accent)] hover:text-[var(--accent)] transition-colors",children:e.jsxs("span",{children:["// ",a("tasks.view_terminal")]})}),e.jsxs("div",{className:"mt-4 rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-4 lg:hidden",children:[e.jsx("span",{className:"text-[11px] font-bold text-[var(--accent)]",children:a("tasks.task_info")}),e.jsxs("div",{className:"mt-2 flex flex-col gap-1.5 text-[11px]",children:[e.jsxs("div",{className:"flex justify-between",children:[e.jsx("span",{className:"text-[var(--text-muted)]",children:"project"}),e.jsx("span",{className:"text-[var(--text-primary)]",children:t.projectKey})]}),e.jsxs("div",{className:"flex justify-between",children:[e.jsx("span",{className:"text-[var(--text-muted)]",children:"worker"}),e.jsx("span",{className:"text-[var(--text-primary)]",children:t.workerName??"-"})]}),e.jsxs("div",{className:"flex justify-between",children:[e.jsx("span",{className:"text-[var(--text-muted)]",children:"branch"}),e.jsx("span",{className:"text-[var(--text-primary)]",children:t.branch??"-"})]}),qe]})]}),e.jsxs("div",{className:"flex flex-col gap-6 mt-4 lg:hidden",children:[e.jsxs("div",{className:"flex flex-col gap-3",children:[e.jsx("span",{className:"text-[11px] font-medium text-[var(--text-muted)]",children:a("tasks.pipeline_stages")}),N.map(s=>{const i=s.status==="completed",d=s.status==="running",h=s.status==="failed";return e.jsxs("div",{className:`flex items-center gap-2 rounded-[4px] px-2 py-2 ${d?"bg-[var(--bg-input)]":""}`,children:[i&&e.jsx(Xe,{className:"h-3.5 w-3.5 shrink-0 text-[var(--accent)]"}),d&&e.jsx(ge,{className:"h-3.5 w-3.5 shrink-0 text-[var(--accent)]"}),h&&e.jsx(ve,{className:"h-3.5 w-3.5 shrink-0 text-[var(--destructive)]"}),s.status==="pending"&&e.jsx(Je,{className:"h-3.5 w-3.5 shrink-0 text-[#525252]"}),e.jsx("span",{className:"text-xs leading-normal",style:{color:i?"var(--accent)":d?"var(--text-primary)":h?"var(--destructive)":"#525252",fontWeight:d?500:400},children:d?`> ${s.name}`:s.name})]},s.name)})]}),e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsx("span",{className:"text-[11px] font-medium text-[var(--text-muted)]",children:a("tasks.activity_log")}),u.length>0?e.jsx("div",{className:"flex flex-col gap-1.5",children:u.slice(-12).map((s,i)=>e.jsx("p",{className:"text-[11px] leading-relaxed text-[var(--text-muted)]",children:s},i))}):e.jsx("span",{className:"text-[11px] text-[var(--text-muted)]",children:a("tasks.no_activity")})]})]})]}),k==="logs"&&e.jsxs("div",{className:"flex flex-1 flex-col gap-3 md:gap-5 overflow-y-auto p-4 md:p-6 lg:p-8",children:[e.jsx("span",{className:"text-[11px] font-bold text-[var(--accent)] md:hidden",children:a("tasks.task_logs")}),e.jsxs("div",{className:"flex flex-col gap-2 md:flex-row md:items-center md:gap-3",children:[e.jsx("div",{className:"flex items-center gap-1 overflow-x-auto no-scrollbar md:hidden",children:["","error","system"].map(s=>e.jsx("button",{onClick:()=>{De(s),O(0)},className:`shrink-0 rounded-[4px] px-2.5 py-1 text-[11px] ${H===s?"text-[var(--accent)] bg-[var(--bg-input)]":"text-[var(--text-muted)]"}`,children:s||"all"},s))}),e.jsx("div",{className:"hidden md:block",children:e.jsx(Ct,{value:H,onChange:s=>{De(s),O(0)},options:[{value:"",label:"all"},{value:"stage_change",label:"stage_change"},{value:"info",label:"info"},{value:"warning",label:"warning"},{value:"error",label:"error"},{value:"system",label:"system"}],className:"w-36"})}),e.jsxs("div",{className:"flex flex-1 items-center gap-2 rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] px-3 py-2",children:[e.jsx(gt,{className:"h-3.5 w-3.5 text-[var(--text-muted)]"}),e.jsx("input",{type:"text",placeholder:a("tasks.search_logs"),value:ee,onChange:s=>{tt(s.target.value),O(0)},className:"flex-1 bg-transparent text-xs text-[var(--text-primary)] outline-none placeholder:text-[var(--text-muted)]"})]})]}),e.jsxs("div",{className:"flex flex-col gap-0.5",children:[Ee.map((s,i)=>e.jsxs("div",{className:`flex items-start md:items-center gap-2 md:gap-4 rounded-[4px] px-2 md:px-3 py-2 text-[11px] md:text-xs ${i%2===0?"bg-[var(--bg-card)]":""}`,children:[e.jsx("span",{className:"shrink-0 text-[var(--text-muted)]",children:new Date(s.timestamp).toLocaleTimeString("en-US",{hour12:!1})}),e.jsx("span",{className:`shrink-0 font-medium ${Ut(s.type)}`,children:s.type}),e.jsx("span",{className:"min-w-0 break-words md:truncate text-[var(--text-primary)]",children:s.message})]},s.id)),Ee.length===0&&!st&&e.jsx("p",{className:"py-8 text-center text-xs text-[var(--text-muted)]",children:a("tasks.no_log_entries")})]}),Z>50&&e.jsxs("div",{className:"flex items-center justify-center gap-1",children:[Array.from({length:Math.ceil(Z/50)}).slice(0,5).map((s,i)=>e.jsx("button",{onClick:()=>O(i),className:`rounded-[4px] px-2 py-1 text-xs ${X===i?"bg-[var(--accent)] text-black font-medium":"text-[var(--text-muted)] hover:text-[var(--text-primary)]"}`,children:i+1},i)),Math.ceil(Z/50)>5&&e.jsx("button",{onClick:()=>O(X+1),disabled:X>=Math.ceil(Z/50)-1,className:"rounded-[4px] px-2 py-1 text-xs text-[var(--text-muted)] disabled:opacity-30",children:">"})]})]})]}),k==="terminal"&&it,k==="pipeline"&&e.jsxs("div",{className:"hidden w-[420px] shrink-0 flex-col gap-5 overflow-y-auto border-l border-[var(--border)] bg-[var(--bg-primary)] p-5 lg:flex",children:[e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsx("span",{className:"text-[13px] font-semibold text-[var(--accent)]",children:a("tasks.task_info")}),e.jsxs("div",{className:"flex flex-col gap-1.5 text-xs",children:[e.jsxs("div",{className:"flex justify-between",children:[e.jsx("span",{className:"text-[var(--text-muted)]",children:"project"}),e.jsx("span",{className:"text-[var(--text-primary)]",children:t.projectKey})]}),e.jsxs("div",{className:"flex justify-between",children:[e.jsx("span",{className:"text-[var(--text-muted)]",children:"creator"}),e.jsx("span",{className:"text-[var(--text-primary)]",children:t.creatorName??"-"})]}),e.jsxs("div",{className:"flex justify-between",children:[e.jsx("span",{className:"text-[var(--text-muted)]",children:"worker"}),e.jsx("span",{className:"text-[var(--text-primary)]",children:t.workerName??"-"})]}),e.jsxs("div",{className:"flex justify-between",children:[e.jsx("span",{className:"text-[var(--text-muted)]",children:a("common.created_at")}),e.jsx("span",{className:"text-[var(--text-primary)]",children:re(t.createdAt)})]}),e.jsxs("div",{className:"flex justify-between",children:[e.jsx("span",{className:"text-[var(--text-muted)]",children:a("tasks.form_agent_type")}),e.jsx("span",{className:"text-[var(--text-primary)]",children:t.agentType??"claude"})]}),y&&e.jsxs("div",{className:"flex justify-between",children:[e.jsx("span",{className:"text-[var(--text-muted)]",children:"time cost"}),e.jsx("span",{className:"text-[var(--text-primary)]",children:y})]}),qe]})]}),e.jsx("div",{className:"h-px bg-[var(--border)]"}),e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsx("span",{className:"text-[13px] font-semibold text-[var(--accent)]",children:a("tasks.workspace_section")}),e.jsxs("div",{className:"flex flex-col gap-1.5 text-xs",children:[e.jsxs("div",{className:"flex min-w-0 justify-between",children:[e.jsx("span",{className:"shrink-0 text-[var(--text-muted)]",children:"branch"}),e.jsx("span",{className:"ml-4 min-w-0 truncate text-[var(--text-primary)]",children:t.branch??(q==null?void 0:q.branch)??"-"})]}),e.jsxs("div",{className:"flex min-w-0 justify-between",children:[e.jsx("span",{className:"shrink-0 text-[var(--text-muted)]",children:"worktree"}),e.jsx("span",{className:"ml-4 min-w-0 truncate text-[var(--text-primary)]",children:(q==null?void 0:q.path)??"-"})]}),t.mrUrl&&e.jsxs("div",{className:"flex justify-between",children:[e.jsx("span",{className:"text-[var(--text-muted)]",children:a("tasks.mr_link")}),e.jsx("a",{href:t.mrUrl,target:"_blank",rel:"noopener noreferrer",className:"font-medium text-[var(--info)] hover:underline",children:((Be=t.mrUrl.match(/!?\d+$/))==null?void 0:Be[0])??"view"})]})]})]}),e.jsx("div",{className:"h-px bg-[var(--border)]"}),e.jsxs("div",{ref:Pe,className:"flex flex-col gap-2",children:[e.jsx("span",{className:"text-[13px] font-semibold text-[var(--accent)]",children:a("tasks.cursor_tunnel_section")}),t.workerId?e.jsx(Ft,{taskId:x,taskFinished:v,compact:!0}):e.jsx("span",{className:"text-xs text-[var(--text-muted)]",children:a("tasks.no_worker_assigned")})]}),e.jsx("div",{className:"h-px bg-[var(--border)]"}),e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsx("span",{className:"text-[13px] font-semibold text-[var(--accent)]",children:a("tasks.stage_timeline")}),e.jsx("div",{className:"flex flex-col gap-2 text-xs",children:N.map(s=>{const i=s.status==="completed"?"✓":s.status==="running"?"→":"·",d=s.status==="running"?"var(--accent)":s.status==="completed"?"var(--info)":s.status==="failed"?"var(--destructive)":"#525252",h=s.status==="completed"?"done":s.status==="running"?"running...":s.status==="failed"?"failed":"pending";return e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"font-semibold",style:{color:d},children:i}),e.jsx("span",{className:s.status==="running"?"font-medium":"",style:{color:d},children:s.name}),e.jsxs("span",{className:"text-[11px]",style:{color:"#525252"},children:["— ",h]})]},s.name)})})]})]})]}),fe]})}export{ts as default};
@@ -1 +0,0 @@
1
- import{o as k,h as c,p as f,F as T}from"./index-XDDf1Oy_.js";const b=k((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 n=await c.get("web/tasks",{searchParams:e,signal:o.signal}).json();if(r()._fetchTasksRequestId!==l)return;a!=null&&a.cursor?t(i=>({tasks:[...i.tasks,...n.data],nextCursor:n.nextCursor??null,_fetchTasksAbort:null})):t({tasks:n.data,nextCursor:n.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 c.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 c.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 c.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})}})),u=[f.COMPLETED,f.FAILED,f.CANCELLED],_=[{value:"feat",label:"feat"},{value:"fix",label:"fix"},{value:"refactor",label:"refactor"},{value:"docs",label:"docs"},{value:"chore",label:"chore"}],d=Object.values(T).map(t=>({value:t,label:t})),E=[{value:"",label:"default"},...d];export{E as A,d as C,u as T,_ as a,b as u};