@mrpatronz/nexusflow 2.6.0 → 2.8.0

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 (198) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +1 -3
  3. package/dist/agent/ClaudeSdkAdapter.d.ts +18 -0
  4. package/dist/agent/ClaudeSdkAdapter.d.ts.map +1 -0
  5. package/dist/agent/ClaudeSdkAdapter.js +185 -0
  6. package/dist/agent/ClaudeSdkAdapter.js.map +1 -0
  7. package/dist/agent/ClaudeSdkAdapter.test.d.ts +2 -0
  8. package/dist/agent/ClaudeSdkAdapter.test.d.ts.map +1 -0
  9. package/dist/agent/ClaudeSdkAdapter.test.js +155 -0
  10. package/dist/agent/ClaudeSdkAdapter.test.js.map +1 -0
  11. package/dist/agent/CliAdapterBase.d.ts.map +1 -1
  12. package/dist/agent/CliAdapterBase.js +3 -0
  13. package/dist/agent/CliAdapterBase.js.map +1 -1
  14. package/dist/agent/CliAdapterBase.test.js +49 -1
  15. package/dist/agent/CliAdapterBase.test.js.map +1 -1
  16. package/dist/agent/CodexCliAdapter.d.ts +1 -1
  17. package/dist/agent/CodexCliAdapter.d.ts.map +1 -1
  18. package/dist/agent/CodexCliAdapter.js +5 -4
  19. package/dist/agent/CodexCliAdapter.js.map +1 -1
  20. package/dist/agent/CodexCliAdapter.test.js +16 -1
  21. package/dist/agent/CodexCliAdapter.test.js.map +1 -1
  22. package/dist/agent/CodexSdkAdapter.d.ts +17 -0
  23. package/dist/agent/CodexSdkAdapter.d.ts.map +1 -0
  24. package/dist/agent/CodexSdkAdapter.js +132 -0
  25. package/dist/agent/CodexSdkAdapter.js.map +1 -0
  26. package/dist/agent/CodexSdkAdapter.test.d.ts +2 -0
  27. package/dist/agent/CodexSdkAdapter.test.d.ts.map +1 -0
  28. package/dist/agent/CodexSdkAdapter.test.js +76 -0
  29. package/dist/agent/CodexSdkAdapter.test.js.map +1 -0
  30. package/dist/agent/ProviderRegistry.d.ts +7 -2
  31. package/dist/agent/ProviderRegistry.d.ts.map +1 -1
  32. package/dist/agent/ProviderRegistry.js +15 -0
  33. package/dist/agent/ProviderRegistry.js.map +1 -1
  34. package/dist/agent/ProviderRegistry.test.js +19 -0
  35. package/dist/agent/ProviderRegistry.test.js.map +1 -1
  36. package/dist/agent/adapters.d.ts.map +1 -1
  37. package/dist/agent/adapters.js +81 -0
  38. package/dist/agent/adapters.js.map +1 -1
  39. package/dist/agent/mcp-config.d.ts +16 -0
  40. package/dist/agent/mcp-config.d.ts.map +1 -0
  41. package/dist/agent/mcp-config.js +28 -0
  42. package/dist/agent/mcp-config.js.map +1 -0
  43. package/dist/agent/mcp-config.test.d.ts +2 -0
  44. package/dist/agent/mcp-config.test.d.ts.map +1 -0
  45. package/dist/agent/mcp-config.test.js +22 -0
  46. package/dist/agent/mcp-config.test.js.map +1 -0
  47. package/dist/agent/models.d.ts +10 -0
  48. package/dist/agent/models.d.ts.map +1 -0
  49. package/dist/agent/models.js +35 -0
  50. package/dist/agent/models.js.map +1 -0
  51. package/dist/agent/models.test.d.ts +2 -0
  52. package/dist/agent/models.test.d.ts.map +1 -0
  53. package/dist/agent/models.test.js +40 -0
  54. package/dist/agent/models.test.js.map +1 -0
  55. package/dist/agent/orchestrator.d.ts +65 -0
  56. package/dist/agent/orchestrator.d.ts.map +1 -0
  57. package/dist/agent/orchestrator.js +252 -0
  58. package/dist/agent/orchestrator.js.map +1 -0
  59. package/dist/agent/orchestrator.test.d.ts +2 -0
  60. package/dist/agent/orchestrator.test.d.ts.map +1 -0
  61. package/dist/agent/orchestrator.test.js +284 -0
  62. package/dist/agent/orchestrator.test.js.map +1 -0
  63. package/dist/agent/session.d.ts +1 -0
  64. package/dist/agent/session.d.ts.map +1 -1
  65. package/dist/agent/session.js +3 -2
  66. package/dist/agent/session.js.map +1 -1
  67. package/dist/agent/session.test.js +9 -0
  68. package/dist/agent/session.test.js.map +1 -1
  69. package/dist/agent/smoke-chat.test.d.ts +2 -0
  70. package/dist/agent/smoke-chat.test.d.ts.map +1 -0
  71. package/dist/agent/smoke-chat.test.js +166 -0
  72. package/dist/agent/smoke-chat.test.js.map +1 -0
  73. package/dist/commands/mcp.d.ts +7 -1
  74. package/dist/commands/mcp.d.ts.map +1 -1
  75. package/dist/commands/mcp.js +7 -2
  76. package/dist/commands/mcp.js.map +1 -1
  77. package/dist/core/locks.d.ts +4 -2
  78. package/dist/core/locks.d.ts.map +1 -1
  79. package/dist/core/locks.js +55 -7
  80. package/dist/core/locks.js.map +1 -1
  81. package/dist/core/locks.test.js +48 -0
  82. package/dist/core/locks.test.js.map +1 -1
  83. package/dist/core/scheduler.d.ts +1 -0
  84. package/dist/core/scheduler.d.ts.map +1 -1
  85. package/dist/core/scheduler.js +10 -0
  86. package/dist/core/scheduler.js.map +1 -1
  87. package/dist/core/scheduler.test.js +6 -0
  88. package/dist/core/scheduler.test.js.map +1 -1
  89. package/dist/core/workspace.create.test.js +51 -11
  90. package/dist/core/workspace.create.test.js.map +1 -1
  91. package/dist/core/workspace.d.ts.map +1 -1
  92. package/dist/core/workspace.js +123 -84
  93. package/dist/core/workspace.js.map +1 -1
  94. package/dist/gui/assets/AgentsPage-Bfyu13gc.js +3 -0
  95. package/dist/gui/assets/{CSPContext-BG7no5S_.js → CSPContext-DBUu9tE0.js} +1 -1
  96. package/dist/gui/assets/{DashboardPage-ByGTwAQa.js → DashboardPage-O5wj99kn.js} +1 -1
  97. package/dist/gui/assets/{GettingStartedPage-Xjx3M3RH.js → GettingStartedPage-DDWBueC7.js} +1 -1
  98. package/dist/gui/assets/ProjectsPage-NHkXrDM2.js +1 -0
  99. package/dist/gui/assets/ScaffoldRepoInline-Cmqg_s94.js +1 -0
  100. package/dist/gui/assets/{SettingsPage-B9iN6hsv.js → SettingsPage-Cc77HBp7.js} +1 -1
  101. package/dist/gui/assets/SkillsPage-D4CVxwrI.js +6 -0
  102. package/dist/gui/assets/StartWorkPage-RPZTN3Ui.js +1 -0
  103. package/dist/gui/assets/{StrategiesPage-DDu3jwJx.js → StrategiesPage-Dn66xfZN.js} +1 -1
  104. package/dist/gui/assets/WorkspacesPage-BgdoM5Hs.js +6 -0
  105. package/dist/gui/assets/{alert-dialog-CdqVrvZl.js → alert-dialog-BYZ7cgWA.js} +1 -1
  106. package/dist/gui/assets/index-BmH7a-Qy.css +2 -0
  107. package/dist/gui/assets/index-CoNaATPd.js +52 -0
  108. package/dist/gui/assets/isElementDisabled-uy_EOitH.js +1 -0
  109. package/dist/gui/assets/textarea-ByfoCb54.js +1 -0
  110. package/dist/gui/assets/{useAriaLabelledBy-DfRdwH8a.js → useAriaLabelledBy-ClesgjMe.js} +1 -1
  111. package/dist/gui/assets/useValueChanged-DeYvGnKs.js +1 -0
  112. package/dist/gui/assets/{vsc-D6UPv2ii.js → vsc-BTST_4ex.js} +1 -1
  113. package/dist/gui/index.html +5 -7
  114. package/dist/harness/claude.d.ts +18 -0
  115. package/dist/harness/claude.d.ts.map +1 -0
  116. package/dist/harness/claude.js +334 -0
  117. package/dist/harness/claude.js.map +1 -0
  118. package/dist/harness/codex.d.ts +20 -0
  119. package/dist/harness/codex.d.ts.map +1 -0
  120. package/dist/harness/codex.js +315 -0
  121. package/dist/harness/codex.js.map +1 -0
  122. package/dist/harness/contract.test.d.ts +2 -0
  123. package/dist/harness/contract.test.d.ts.map +1 -0
  124. package/dist/harness/contract.test.js +426 -0
  125. package/dist/harness/contract.test.js.map +1 -0
  126. package/dist/harness/harness.test.d.ts +2 -0
  127. package/dist/harness/harness.test.d.ts.map +1 -0
  128. package/dist/harness/harness.test.js +215 -0
  129. package/dist/harness/harness.test.js.map +1 -0
  130. package/dist/harness/index.d.ts +10 -0
  131. package/dist/harness/index.d.ts.map +1 -0
  132. package/dist/harness/index.js +13 -0
  133. package/dist/harness/index.js.map +1 -0
  134. package/dist/harness/interface.d.ts +42 -0
  135. package/dist/harness/interface.d.ts.map +1 -0
  136. package/dist/harness/interface.js +17 -0
  137. package/dist/harness/interface.js.map +1 -0
  138. package/dist/harness/pushable.d.ts +11 -0
  139. package/dist/harness/pushable.d.ts.map +1 -0
  140. package/dist/harness/pushable.js +32 -0
  141. package/dist/harness/pushable.js.map +1 -0
  142. package/dist/harness/types.d.ts +132 -0
  143. package/dist/harness/types.d.ts.map +1 -0
  144. package/dist/harness/types.js +12 -0
  145. package/dist/harness/types.js.map +1 -0
  146. package/dist/index.js +4 -1
  147. package/dist/index.js.map +1 -1
  148. package/dist/mcp/server.d.ts +8 -1
  149. package/dist/mcp/server.d.ts.map +1 -1
  150. package/dist/mcp/server.js +11 -6
  151. package/dist/mcp/server.js.map +1 -1
  152. package/dist/mcp/tools.d.ts +6 -2
  153. package/dist/mcp/tools.d.ts.map +1 -1
  154. package/dist/mcp/tools.js +213 -6
  155. package/dist/mcp/tools.js.map +1 -1
  156. package/dist/mcp/tools.test.js +115 -6
  157. package/dist/mcp/tools.test.js.map +1 -1
  158. package/dist/orchestration/runner.d.ts +1 -1
  159. package/dist/orchestration/runner.d.ts.map +1 -1
  160. package/dist/orchestration/runner.js +29 -14
  161. package/dist/orchestration/runner.js.map +1 -1
  162. package/dist/orchestration/runner.test.js +33 -1
  163. package/dist/orchestration/runner.test.js.map +1 -1
  164. package/dist/server.d.ts.map +1 -1
  165. package/dist/server.js +28 -7
  166. package/dist/server.js.map +1 -1
  167. package/dist/server.test.js +34 -1
  168. package/dist/server.test.js.map +1 -1
  169. package/dist/utils/git.d.ts +0 -15
  170. package/dist/utils/git.d.ts.map +1 -1
  171. package/dist/utils/git.js +4 -0
  172. package/dist/utils/git.js.map +1 -1
  173. package/dist/utils/git.test.js +33 -1
  174. package/dist/utils/git.test.js.map +1 -1
  175. package/dist/utils/multi-git.d.ts +30 -6
  176. package/dist/utils/multi-git.d.ts.map +1 -1
  177. package/dist/utils/multi-git.js +132 -12
  178. package/dist/utils/multi-git.js.map +1 -1
  179. package/dist/utils/multi-git.test.js +153 -1
  180. package/dist/utils/multi-git.test.js.map +1 -1
  181. package/dist/utils/session-finder.d.ts +3 -0
  182. package/dist/utils/session-finder.d.ts.map +1 -1
  183. package/dist/utils/session-finder.js +10 -9
  184. package/dist/utils/session-finder.js.map +1 -1
  185. package/package.json +4 -1
  186. package/dist/gui/assets/AgentsPage-YyYRodOR.js +0 -3
  187. package/dist/gui/assets/ProjectsPage-BMdhqAGs.js +0 -1
  188. package/dist/gui/assets/ScaffoldRepoInline-gXyYSIz5.js +0 -1
  189. package/dist/gui/assets/SkillsPage-CxcsbIsQ.js +0 -6
  190. package/dist/gui/assets/StartWorkPage-DPVHcdy4.js +0 -1
  191. package/dist/gui/assets/WorkspacesPage-BWRmP0mY.js +0 -2
  192. package/dist/gui/assets/index-CZoZQkeC.css +0 -2
  193. package/dist/gui/assets/index-wy68EqfB.js +0 -50
  194. package/dist/gui/assets/isElementDisabled-D_fu2zfc.js +0 -1
  195. package/dist/gui/assets/store-D5DUHbxn.js +0 -3
  196. package/dist/gui/assets/styles-CVwNuFCx.js +0 -1
  197. package/dist/gui/assets/textarea-BNRuIXNs.js +0 -1
  198. package/dist/gui/assets/useValueChanged-CStSGSsD.js +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"session-finder.js","sourceRoot":"","sources":["../../src/utils/session-finder.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,MAAM,kBAAkB,CAAC;AACvC,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAG9B,MAAM,aAAa,GAAG,iEAAiE,CAAC;AAExF,8EAA8E;AAC9E,MAAM,UAAU,mBAAmB,CAAC,SAAiB,EAAE,SAAiB;IACtE,IAAI,SAAS,KAAK,OAAO,EAAE,CAAC;QAC1B,IAAI,CAAC,gBAAgB,CAAC,SAAS,CAAC;YAAE,MAAM,IAAI,KAAK,CAAC,0BAA0B,CAAC,CAAC;QAC9E,OAAO;IACT,CAAC;IACD,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,S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AAC,SAAS,CAAU,CAAC;YAC1B,KAAK,MAAM,CAAC,IAAI,KAAK,EAAE,CAAC;gBACtB,MAAM,IAAI,GAAG,CAAC,CAAC,CAAC,YAAY,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC;gBAC3C,MAAM,aAAa,GAAG,CAAC,CAAC,CAAC,kBAAkB,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC;gBAC1D,0DAA0D;gBAC1D,IAAI,IAAI,IAAI,CAAC,qBAAqB,CAAC,IAAI,CAAC,EAAE,CAAC;oBACzC,QAAQ,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC,CAAC,SAAS,EAAE,CAAC,CAAC;gBACzE,CAAC;gBACD,IAAI,aAAa;oBAAE,QAAQ,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,CAAC,CAAC,SAAS,EAAE,CAAC,CAAC;YAC1G,CAAC;QACH,CAAC;gBAAS,CAAC;YACT,IAAI,CAAC;gBAAC,SAAS,CAAC,KAAK,EAAE,CAAC;YAAC,CAAC;YAAC,MAAM,CAAC,CAAA,CAAC;QACrC,CAAC;IACH,CAAC;IAED,OAAO,QAAQ,CAAC;AAClB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mrpatronz/nexusflow",
3
- "version": "2.6.0",
3
+ "version": "2.8.0",
4
4
  "description": "Combine multiple repos into a workspace with rich AI assistant context",
5
5
  "type": "module",
6
6
  "repository": {
@@ -29,6 +29,7 @@
29
29
  "test": "vitest run",
30
30
  "test:watch": "vitest",
31
31
  "test:gui": "npm run test:e2e --prefix gui",
32
+ "smoke:chat": "npx tsx scripts/smoke-chat-engines.ts",
32
33
  "clean": "rimraf dist",
33
34
  "prepublishOnly": "npm run build",
34
35
  "extension:install": "npm install --prefix extension",
@@ -51,12 +52,14 @@
51
52
  },
52
53
  "dependencies": {
53
54
  "@agentclientprotocol/sdk": "1.3.0",
55
+ "@anthropic-ai/claude-agent-sdk": "0.3.239",
54
56
  "@anthropic-ai/sdk": "^0.116.0",
55
57
  "@google/genai": "^2.10.0",
56
58
  "@hono/node-server": "^2.0.8",
57
59
  "@hono/node-ws": "^1.3.1",
58
60
  "@inquirer/prompts": "^8.5.2",
59
61
  "@modelcontextprotocol/sdk": "^1.29.0",
62
+ "@openai/codex-sdk": "0.149.0",
60
63
  "chalk": "^5.6.2",
61
64
  "commander": "^15.0.0",
62
65
  "execa": "^9.6.1",
@@ -1,3 +0,0 @@
1
- import{_ as e,b as t,g as n,h as r,m as i,t as a}from"./button-BDDZnIHx.js";import{n as o}from"./CSPContext-BG7no5S_.js";import{t as s}from"./bot-C2HWrAft.js";import{a as ee,c as te,i as ne,n as c,o as l,r as re,s as ie,t as ae}from"./alert-dialog-CdqVrvZl.js";import{a as oe,h as se}from"./store-D5DUHbxn.js";import{t as ce}from"./trash-2-CtR35_eF.js";import{Ft as u,H as le,Lt as ue,N as de,R as fe,Vt as pe,Y as me,a as he,c as d,d as f,f as p,j as ge,l as m,o as h,ot as _e,s as g,st as ve}from"./index-wy68EqfB.js";import{t as _}from"./badge-CAohJGj6.js";import{t as ye}from"./card-BKXzd_5L.js";import{a as v,i as be,n as y,r as b,t as x}from"./empty-BdlgbifD.js";import{t as S}from"./label-CG5exjag.js";import{t as C}from"./textarea-BNRuIXNs.js";var xe=r(`file-up`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M12 12v6`,key:`3ahymv`}],[`path`,{d:`m15 15-3-3-3 3`,key:`15xj92`}]]),w=t(e(),1),T=n(),E={id:``,name:``,category:`general`,description:``,developerInstructions:``};function D(e){return e.toLowerCase().trim().replace(/[^a-z0-9]+/g,`-`).replace(/^-+|-+$/g,``)}function O({showToast:e}){let[t,n]=(0,w.useState)(`global`),[r,O]=(0,w.useState)(``),[Se,k]=(0,w.useState)(!1),[A,j]=(0,w.useState)(!1),[M,N]=(0,w.useState)(null),[P,F]=(0,w.useState)(E),[I,L]=(0,w.useState)(``),[R,z]=(0,w.useState)(null),[B,V]=(0,w.useState)(null),{data:H=[],isLoading:Ce,isError:we}=ge(),{data:U=[]}=ve(),W=_e(t===`global`?``:t),G=me(),K=le(),q=fe(),J=de(),Y=t!==`global`,Te=U.find(e=>e.id===t),X=!Y||Te?.assistants?.includes(`codex`),Z=Y&&X&&!W.isLoading&&!W.isError&&!!W.data;(0,w.useEffect)(()=>{if(!Y){z(null);return}W.data&&z([...W.data.enabledAgents??[]])},[Y,t,W.data]);let Q=(0,w.useMemo)(()=>{let e=r.trim().toLowerCase();return e?H.filter(t=>[t.name,t.description,t.category].some(t=>t.toLowerCase().includes(e))):H},[H,r]),Ee=new Set(R??W.data?.enabledAgents??[]);function $(){N(null),F(E),k(!0)}function De(e){N(e.id),F({id:e.id,name:e.name,category:e.category,description:e.description,developerInstructions:e.developerInstructions,model:e.model,modelReasoningEffort:e.modelReasoningEffort,sandboxMode:e.sandboxMode}),k(!0)}async function Oe(){try{let t=M??D(P.name);await G.mutateAsync({...P,id:t,name:t}),k(!1),e?.(`Codex agent saved`,`success`)}catch(t){e?.(t instanceof Error?t.message:`Failed to save agent`,`error`)}}async function ke(){try{await K.mutateAsync({toml:I,category:`general`}),j(!1),L(``),e?.(`Codex agent imported`,`success`)}catch(t){e?.(t instanceof Error?t.message:`Failed to import agent`,`error`)}}async function Ae(){if(B)try{await q.mutateAsync(B.id),V(null),e?.(`Agent deleted from the personal catalog`,`info`)}catch(t){e?.(t instanceof Error?t.message:`Failed to delete agent`,`error`)}}function je(e){if(!Z||R===null)return;let t=new Set(R);t.has(e)?t.delete(e):t.add(e),z([...t])}async function Me(){if(!(!W.data||R===null))try{await J.mutateAsync({workspaceId:t,expectedRevision:W.data.revision??0,enabledSkills:W.data.enabledSkills,enabledAgents:R,enabledCategories:W.data.enabledCategories??[]}),e?.(`Agent selection saved. Refresh the workspace to apply it.`,`success`)}catch(t){e?.(t instanceof Error?t.message:`Failed to save agent selection`,`error`)}}return(0,T.jsxs)(`div`,{className:`flex h-full min-h-0 flex-col`,children:[(0,T.jsxs)(`header`,{className:`flex flex-wrap items-center justify-between gap-4 border-b border-border px-6 py-5`,children:[(0,T.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,T.jsx)(`div`,{className:`rounded-lg bg-primary/10 p-2 text-primary`,children:(0,T.jsx)(s,{className:`h-5 w-5`})}),(0,T.jsxs)(`div`,{children:[(0,T.jsx)(`h1`,{className:`text-xl font-bold tracking-tight`,children:`Codex Agent Library`}),(0,T.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Create and reuse project-scoped Codex custom agents.`})]})]}),(0,T.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,T.jsx)(a,{render:(0,T.jsx)(oe,{to:`/skills`}),variant:`outline`,size:`sm`,children:`Skills`}),(0,T.jsxs)(`div`,{className:`flex items-center gap-2 rounded-lg border border-border bg-muted/50 px-3 py-1.5`,children:[(0,T.jsx)(ue,{className:`h-4 w-4 text-muted-foreground`}),(0,T.jsx)(S,{htmlFor:`agent-scope`,className:`text-xs text-muted-foreground`,children:`Scope`}),(0,T.jsxs)(`select`,{id:`agent-scope`,value:t,onChange:e=>n(e.target.value),className:`cursor-pointer bg-transparent text-xs font-semibold text-foreground focus:outline-none`,children:[(0,T.jsx)(`option`,{value:`global`,children:`Personal catalog`}),U.map(e=>(0,T.jsx)(`option`,{value:e.id,children:e.id},e.id))]})]}),Y?(0,T.jsx)(a,{size:`sm`,onClick:Me,disabled:!Z||J.isPending,children:J.isPending?`Saving…`:`Save selection`}):(0,T.jsxs)(T.Fragment,{children:[(0,T.jsxs)(a,{variant:`outline`,size:`sm`,onClick:()=>j(!0),children:[(0,T.jsx)(xe,{className:`mr-1.5 h-4 w-4`}),`Import TOML`]}),(0,T.jsxs)(a,{size:`sm`,onClick:$,children:[(0,T.jsx)(u,{className:`mr-1.5 h-4 w-4`}),`New agent`]})]})]})]}),(0,T.jsx)(`div`,{className:`border-b border-border/60 bg-muted/20 px-6 py-3`,children:(0,T.jsxs)(`div`,{className:`relative max-w-md`,children:[(0,T.jsx)(se,{className:`absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground`}),(0,T.jsx)(o,{value:r,onChange:e=>O(e.target.value),placeholder:`Search agents…`,className:`pl-9`})]})}),(0,T.jsx)(`main`,{className:`min-h-0 flex-1 overflow-auto p-6`,children:Ce||Y&&W.isLoading?(0,T.jsx)(`div`,{className:`flex justify-center p-12`,children:(0,T.jsx)(he,{})}):we||Y&&W.isError?(0,T.jsx)(x,{className:`border border-dashed py-12`,children:(0,T.jsxs)(b,{children:[(0,T.jsx)(v,{children:`Resources could not be loaded`}),(0,T.jsx)(y,{children:`Assignment controls remain disabled to protect the saved selection.`})]})}):Y&&!X?(0,T.jsx)(x,{className:`border border-dashed py-12`,children:(0,T.jsxs)(b,{children:[(0,T.jsx)(v,{children:`Codex is not enabled for this workspace`}),(0,T.jsx)(y,{children:`Add Codex to the workspace before assigning Codex-native agents.`})]})}):Q.length===0?(0,T.jsxs)(x,{className:`border border-dashed py-12`,children:[(0,T.jsx)(be,{children:(0,T.jsx)(s,{className:`h-8 w-8 text-muted-foreground`})}),(0,T.jsxs)(b,{children:[(0,T.jsx)(v,{children:`No Codex agents found`}),(0,T.jsx)(y,{children:`Create an agent or import a native TOML definition.`})]}),!Y&&(0,T.jsxs)(a,{size:`sm`,onClick:$,children:[(0,T.jsx)(u,{className:`mr-1.5 h-4 w-4`}),`New agent`]})]}):(0,T.jsx)(`div`,{className:`mx-auto grid max-w-6xl grid-cols-1 gap-4 md:grid-cols-2 xl:grid-cols-3`,children:Q.map(e=>{let t=Ee.has(e.id);return(0,T.jsxs)(ye,{className:i(`flex flex-col gap-4 p-4`,Y&&!t&&`opacity-60`),children:[(0,T.jsxs)(`div`,{className:`flex items-start justify-between gap-3`,children:[(0,T.jsxs)(`div`,{children:[(0,T.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,T.jsx)(`h2`,{className:`font-semibold`,children:e.name}),(0,T.jsx)(_,{variant:`outline`,children:`Codex`})]}),(0,T.jsx)(`p`,{className:`mt-2 text-sm text-muted-foreground`,children:e.description})]}),Y?(0,T.jsxs)(a,{variant:t?`default`:`outline`,size:`sm`,onClick:()=>je(e.id),disabled:!Z,children:[(0,T.jsx)(pe,{className:i(`mr-1 h-3.5 w-3.5`,!t&&`opacity-0`)}),t?`Enabled`:`Disabled`]}):(0,T.jsxs)(`div`,{className:`flex gap-1`,children:[(0,T.jsx)(a,{variant:`ghost`,size:`icon`,"aria-label":`Edit ${e.name}`,onClick:()=>De(e),children:(0,T.jsx)(te,{className:`h-4 w-4`})}),(0,T.jsx)(a,{variant:`ghost`,size:`icon`,"aria-label":`Delete ${e.name}`,onClick:()=>V(e),children:(0,T.jsx)(ce,{className:`h-4 w-4`})})]})]}),(0,T.jsxs)(`div`,{className:`flex flex-wrap gap-2 text-xs text-muted-foreground`,children:[e.sandboxMode&&(0,T.jsx)(_,{variant:`secondary`,children:e.sandboxMode}),e.modelReasoningEffort&&(0,T.jsx)(_,{variant:`secondary`,children:e.modelReasoningEffort}),e.model&&(0,T.jsx)(_,{variant:`secondary`,children:e.model})]})]},e.id)})})}),(0,T.jsx)(h,{open:Se,onOpenChange:k,children:(0,T.jsxs)(f,{className:`max-w-2xl`,children:[(0,T.jsxs)(m,{children:[(0,T.jsx)(p,{children:M?`Edit Codex agent`:`Create Codex agent`}),(0,T.jsx)(g,{children:`Only the current stable native fields are managed. Omitted settings inherit from Codex.`})]}),(0,T.jsxs)(`div`,{className:`grid gap-4 py-2`,children:[(0,T.jsxs)(`div`,{className:`grid gap-2`,children:[(0,T.jsx)(S,{htmlFor:`agent-name`,children:`Name`}),(0,T.jsx)(o,{id:`agent-name`,value:P.name,disabled:!!M,onChange:e=>F({...P,name:D(e.target.value)}),placeholder:`code-reviewer`})]}),(0,T.jsxs)(`div`,{className:`grid gap-2`,children:[(0,T.jsx)(S,{htmlFor:`agent-description`,children:`Description`}),(0,T.jsx)(o,{id:`agent-description`,value:P.description,onChange:e=>F({...P,description:e.target.value}),placeholder:`Use when reviewing a fixed diff for correctness and security.`})]}),(0,T.jsxs)(`div`,{className:`grid gap-2`,children:[(0,T.jsx)(S,{htmlFor:`agent-instructions`,children:`Developer instructions`}),(0,T.jsx)(C,{id:`agent-instructions`,value:P.developerInstructions,onChange:e=>F({...P,developerInstructions:e.target.value}),className:`min-h-48 font-mono`})]}),(0,T.jsxs)(`div`,{className:`grid grid-cols-1 gap-3 sm:grid-cols-3`,children:[(0,T.jsxs)(`div`,{className:`grid gap-2`,children:[(0,T.jsx)(S,{htmlFor:`agent-model`,children:`Model override`}),(0,T.jsx)(o,{id:`agent-model`,value:P.model??``,onChange:e=>F({...P,model:e.target.value||void 0}),placeholder:`Inherit`})]}),(0,T.jsxs)(`div`,{className:`grid gap-2`,children:[(0,T.jsx)(S,{htmlFor:`agent-effort`,children:`Reasoning`}),(0,T.jsxs)(`select`,{id:`agent-effort`,value:P.modelReasoningEffort??``,onChange:e=>F({...P,modelReasoningEffort:e.target.value||void 0}),className:`h-9 rounded-md border border-input bg-background px-3 text-sm`,children:[(0,T.jsx)(`option`,{value:``,children:`Inherit`}),(0,T.jsx)(`option`,{value:`low`,children:`Low`}),(0,T.jsx)(`option`,{value:`medium`,children:`Medium`}),(0,T.jsx)(`option`,{value:`high`,children:`High`}),(0,T.jsx)(`option`,{value:`xhigh`,children:`XHigh`}),(0,T.jsx)(`option`,{value:`max`,children:`Max`}),(0,T.jsx)(`option`,{value:`ultra`,children:`Ultra`})]})]}),(0,T.jsxs)(`div`,{className:`grid gap-2`,children:[(0,T.jsx)(S,{htmlFor:`agent-sandbox`,children:`Sandbox`}),(0,T.jsxs)(`select`,{id:`agent-sandbox`,value:P.sandboxMode??``,onChange:e=>F({...P,sandboxMode:e.target.value||void 0}),className:`h-9 rounded-md border border-input bg-background px-3 text-sm`,children:[(0,T.jsx)(`option`,{value:``,children:`Inherit`}),(0,T.jsx)(`option`,{value:`read-only`,children:`Read only`}),(0,T.jsx)(`option`,{value:`workspace-write`,children:`Workspace write`})]})]})]})]}),(0,T.jsxs)(d,{children:[(0,T.jsx)(a,{variant:`outline`,onClick:()=>k(!1),children:`Cancel`}),(0,T.jsx)(a,{onClick:Oe,disabled:G.isPending||!P.name||!P.description||!P.developerInstructions,children:G.isPending?`Saving…`:`Save agent`})]})]})}),(0,T.jsx)(h,{open:A,onOpenChange:j,children:(0,T.jsxs)(f,{className:`max-w-2xl`,children:[(0,T.jsxs)(m,{children:[(0,T.jsx)(p,{children:`Import Codex agent TOML`}),(0,T.jsx)(g,{children:`The import accepts the required native fields and supported model, reasoning, and sandbox overrides.`})]}),(0,T.jsx)(C,{value:I,onChange:e=>L(e.target.value),className:`min-h-72 font-mono`,placeholder:`name = "reviewer"
2
- description = "Use for code review."
3
- developer_instructions = "Review the fixed diff."`}),(0,T.jsxs)(d,{children:[(0,T.jsx)(a,{variant:`outline`,onClick:()=>j(!1),children:`Cancel`}),(0,T.jsx)(a,{onClick:ke,disabled:K.isPending||!I.trim(),children:K.isPending?`Importing…`:`Import agent`})]})]})}),(0,T.jsx)(ae,{open:B!==null,onOpenChange:e=>!e&&V(null),children:(0,T.jsxs)(l,{children:[(0,T.jsxs)(ee,{children:[(0,T.jsxs)(ie,{children:[`Delete “`,B?.name,`”?`]}),(0,T.jsx)(re,{children:`This removes the agent from the personal catalog. Existing workspace copies remain until the workspace is refreshed.`})]}),(0,T.jsxs)(ne,{children:[(0,T.jsx)(c,{render:(0,T.jsx)(a,{variant:`outline`,children:`Cancel`})}),(0,T.jsx)(a,{variant:`destructive`,onClick:Ae,disabled:q.isPending,children:q.isPending?`Deleting…`:`Delete agent`})]})]})})]})}export{O as AgentsPage};
@@ -1 +0,0 @@
1
- import{_ as e,b as t,g as n,t as r}from"./button-BDDZnIHx.js";import{n as i}from"./CSPContext-BG7no5S_.js";import{n as a,t as o}from"./ScaffoldRepoInline-gXyYSIz5.js";import{a as s,c,i as l,n as u,o as d,r as f,s as p,t as m}from"./alert-dialog-CdqVrvZl.js";import{d as h}from"./store-D5DUHbxn.js";import{t as g}from"./trash-2-CtR35_eF.js";import{F as _,Ft as v,G as ee,It as y,J as b,Lt as x,a as S,c as C,d as w,f as T,l as E,o as D,s as O,st as k,tt as A,u as j,z as M}from"./index-wy68EqfB.js";import{t as N}from"./badge-CAohJGj6.js";import{a as P,i as F,n as I,r as L,t as te}from"./empty-BdlgbifD.js";var R=t(e(),1),z=n(),B={editingId:null,name:``,description:``,repoPaths:[]};function V(){let e=h(),t=ee(),n=b(),V=k(),H=_(),U=A(),W=M(),[G,K]=(0,R.useState)(null),[q,J]=(0,R.useState)(null),[Y,X]=(0,R.useState)(null),Z=(0,R.useMemo)(()=>{let e={};for(let t of V.data??[])t.projectId&&(e[t.projectId]=(e[t.projectId]??0)+1);return e},[V.data]),Q=()=>{J(null),K(B)},ne=e=>{J(null),K({editingId:e.id,name:e.name,description:e.description??``,repoPaths:e.repos.map(e=>e.path)})},re=e=>{K(t=>t&&{...t,repoPaths:t.repoPaths.includes(e.path)?t.repoPaths.filter(t=>t!==e.path):[...t.repoPaths,e.path]})},ie=async()=>{if(G){J(null);try{G.editingId?await U.mutateAsync({id:G.editingId,name:G.name,description:G.description||null,repos:G.repoPaths}):await H.mutateAsync({name:G.name,description:G.description||void 0,repos:G.repoPaths}),K(null)}catch(e){J(e instanceof Error?e.message:String(e))}}},ae=async()=>{if(Y)try{await W.mutateAsync(Y.id)}finally{X(null)}},oe=!!(G&&G.name.trim()&&G.repoPaths.length>0),$=H.isPending||U.isPending;return(0,z.jsxs)(`div`,{className:`mx-auto max-w-4xl animate-fade-in`,children:[(0,z.jsxs)(`header`,{className:`mb-6 flex items-center justify-between gap-4`,children:[(0,z.jsxs)(`div`,{children:[(0,z.jsx)(`h1`,{className:`text-xl font-semibold`,children:`Projects`}),(0,z.jsx)(`p`,{className:`mt-1 text-sm text-muted-foreground`,children:`Named groups of repositories you start work from. Registered once, reused for every feature.`})]}),(0,z.jsxs)(r,{onClick:Q,children:[(0,z.jsx)(v,{}),` New project`]})]}),t.isLoading?(0,z.jsx)(`div`,{className:`flex justify-center py-20`,children:(0,z.jsx)(S,{className:`size-6`})}):(t.data??[]).length===0?(0,z.jsxs)(te,{className:`border border-border border-dashed`,children:[(0,z.jsxs)(L,{children:[(0,z.jsx)(F,{variant:`icon`,children:(0,z.jsx)(x,{})}),(0,z.jsx)(P,{children:`No projects yet`}),(0,z.jsx)(I,{children:`Register your first project to start work without re-picking repositories every time.`})]}),(0,z.jsxs)(r,{onClick:Q,children:[(0,z.jsx)(v,{}),` New project`]})]}):(0,z.jsx)(`ul`,{className:`flex flex-col gap-3`,children:(t.data??[]).map(t=>(0,z.jsx)(`li`,{className:`rounded-xl border border-border bg-card p-4 transition-colors hover:border-foreground/15`,children:(0,z.jsxs)(`div`,{className:`flex items-start justify-between gap-4`,children:[(0,z.jsxs)(`div`,{className:`min-w-0`,children:[(0,z.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,z.jsx)(`h2`,{className:`truncate text-sm font-semibold`,children:t.name}),(Z[t.id]??0)>0&&(0,z.jsxs)(N,{variant:`secondary`,children:[Z[t.id],` workspace`,Z[t.id]===1?``:`s`]})]}),t.description&&(0,z.jsx)(`p`,{className:`mt-0.5 truncate text-sm text-muted-foreground`,children:t.description}),(0,z.jsx)(`ul`,{className:`mt-2 flex flex-col gap-0.5`,children:t.repos.map(e=>(0,z.jsxs)(`li`,{className:`truncate font-mono text-xs text-muted-foreground`,children:[e.path,(0,z.jsxs)(`span`,{className:`ml-2 text-muted-foreground/60`,children:[`[`,e.defaultBranch,`]`]})]},e.path))})]}),(0,z.jsxs)(`div`,{className:`flex shrink-0 items-center gap-1.5`,children:[(0,z.jsxs)(r,{size:`sm`,onClick:()=>e(`/new?project=${encodeURIComponent(t.id)}`),children:[(0,z.jsx)(y,{}),` Start work`]}),(0,z.jsx)(r,{size:`icon-sm`,variant:`ghost`,"aria-label":`Edit ${t.name}`,onClick:()=>ne(t),children:(0,z.jsx)(c,{})}),(0,z.jsx)(r,{size:`icon-sm`,variant:`ghost`,"aria-label":`Remove ${t.name}`,onClick:()=>X(t),children:(0,z.jsx)(g,{})})]})]})},t.id))}),(0,z.jsx)(D,{open:G!==null,onOpenChange:e=>!e&&K(null),children:(0,z.jsxs)(w,{className:`max-w-lg`,children:[(0,z.jsxs)(E,{children:[(0,z.jsx)(T,{children:G?.editingId?`Edit project`:`New project`}),(0,z.jsx)(O,{children:`A project is a reusable group of source repositories. Removing one later never touches disk.`})]}),(0,z.jsxs)(j,{className:`space-y-4`,children:[(0,z.jsxs)(`label`,{className:`block`,children:[(0,z.jsx)(`span`,{className:`mb-1 block text-sm font-medium`,children:`Name`}),(0,z.jsx)(i,{value:G?.name??``,onChange:e=>K(t=>t&&{...t,name:e.target.value}),placeholder:`e.g. Hogia Billing`,autoFocus:!0})]}),(0,z.jsxs)(`label`,{className:`block`,children:[(0,z.jsxs)(`span`,{className:`mb-1 block text-sm font-medium`,children:[`Description `,(0,z.jsx)(`span`,{className:`font-normal text-muted-foreground`,children:`(optional)`})]}),(0,z.jsx)(i,{value:G?.description??``,onChange:e=>K(t=>t&&{...t,description:e.target.value}),placeholder:`What this group of repos is for`})]}),(0,z.jsxs)(`div`,{children:[(0,z.jsx)(`span`,{className:`mb-1 block text-sm font-medium`,children:`Repositories`}),(0,z.jsx)(a,{repos:n.data??[],selectedPaths:G?.repoPaths??[],onToggle:re,loading:n.isLoading,emptyHint:`No repositories found in your dev directory.`}),(0,z.jsx)(o,{onCreated:e=>K(t=>t&&{...t,repoPaths:[...t.repoPaths,e.path]})})]}),q&&(0,z.jsx)(`p`,{className:`text-sm text-destructive-foreground`,children:q})]}),(0,z.jsxs)(C,{children:[(0,z.jsx)(r,{variant:`outline`,onClick:()=>K(null),children:`Cancel`}),(0,z.jsxs)(r,{onClick:ie,disabled:!oe||$,children:[$?(0,z.jsx)(S,{}):null,G?.editingId?`Save changes`:`Create project`]})]})]})}),(0,z.jsx)(m,{open:Y!==null,onOpenChange:e=>!e&&X(null),children:(0,z.jsxs)(d,{children:[(0,z.jsxs)(s,{children:[(0,z.jsxs)(p,{children:[`Remove “`,Y?.name,`”?`]}),(0,z.jsx)(f,{children:`This only removes the project from the registry — repositories and workspaces on disk are not touched.`})]}),(0,z.jsxs)(l,{children:[(0,z.jsx)(u,{render:(0,z.jsx)(r,{variant:`outline`,children:`Cancel`})}),(0,z.jsxs)(r,{variant:`destructive`,onClick:ae,disabled:W.isPending,children:[W.isPending?(0,z.jsx)(S,{}):null,`Remove project`]})]})]})})]})}export{V as ProjectsPage};
@@ -1 +0,0 @@
1
- import{_ as e,b as t,c as n,d as r,f as i,g as a,h as o,i as s,l as c,m as l,o as ee,p as u,t as d}from"./button-BDDZnIHx.js";import{$t as f,Ct as te,Jt as p,On as ne,Xt as m,Zn as h,c as re,en as g,i as ie,l as _,ln as ae,n as v,o as oe,on as se,s as ce,wt as le,yn as y,zn as ue}from"./CSPContext-BG7no5S_.js";import{h as de}from"./store-D5DUHbxn.js";import{t as fe}from"./useValueChanged-CStSGSsD.js";import{t as pe}from"./useAriaLabelledBy-DfRdwH8a.js";import{I as b,a as x}from"./index-wy68EqfB.js";var me=o(`folder-plus`,[[`path`,{d:`M12 10v6`,key:`1bos4e`}],[`path`,{d:`M9 13h6`,key:`1uhe8q`}],[`path`,{d:`M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z`,key:`1kt360`}]]),S=t(e(),1),C=S.createContext({disabled:!1});function he(){return S.useContext(C)}var w=S.createContext(void 0);function ge(e=!0){let t=S.useContext(w);if(t===void 0&&!e)throw Error(u(3));return t}function _e(e){if(!e)return null;for(let t of e.elements){let e=t.tagName;if(e===`BUTTON`||e===`INPUT`){let e=t;if(e.type===`submit`)return e}}return null}var T=function(e){return e.checked=`data-checked`,e.unchecked=`data-unchecked`,e.indeterminate=`data-indeterminate`,e.disabled=`data-disabled`,e.readonly=`data-readonly`,e.required=`data-required`,e.valid=`data-valid`,e.invalid=`data-invalid`,e.touched=`data-touched`,e.dirty=`data-dirty`,e.filled=`data-filled`,e.focused=`data-focused`,e}({});function ve(e){return S.useMemo(()=>({checked(t){return e.indeterminate?{}:t?{[T.checked]:``}:{[T.unchecked]:``}},..._}),[e.indeterminate])}var ye=S.createContext(void 0);function E(){let e=S.useContext(ye);if(e===void 0)throw Error(u(14));return e}var D=a(),be=`data-parent`,xe=S.forwardRef(function(e,t){let{checked:a,className:o,defaultChecked:l=!1,"aria-labelledby":u,disabled:d=!1,form:p,id:m,indeterminate:h=!1,inputRef:_,name:v,onCheckedChange:de,parent:b=!1,readOnly:x=!1,render:me,required:C=!1,uncheckedValue:w,value:T,nativeButton:E=!1,style:xe,...O}=e,{clearErrors:k}=ce(),{disabled:A,name:j,setDirty:Se,setFilled:M,setFocused:N,setTouched:Ce,state:P,validationMode:we,validityData:Te,validation:Ee}=re(),De=he(),{labelId:Oe,controlId:ke,registerControlId:F,getDescriptionProps:Ae}=oe(),I=ge(),L=I?.parent,R=L&&I.allValues,z=A||De.disabled||I?.disabled||d,B=j??v,V=T??B,je=g(),Me=g(),H=ke;R?H=b?Me:`${L.id}-${V}`:m&&(H=m);let U={};R&&(b?U=I.parent.getParentProps():V&&(U=I.parent.getChildProps(V)));let{checked:Ne=a,indeterminate:Pe=h,onCheckedChange:Fe,...Ie}=U,W=I?.value,Le=I?.setValue,Re=I?.defaultValue,G=S.useRef(null),K=i(()=>Symbol(`checkbox-control`)),q=S.useRef(!1),{getButtonProps:ze,buttonRef:Be}=se({disabled:z,native:E}),J=I?.validation??Ee,[Y,Ve]=ne({controlled:V&&W&&!b?W.includes(V):Ne,default:V&&Re&&!b?Re.includes(V):l,name:`Checkbox`,state:`checked`}),X=R?!!Ne:Y,Z=R&&Pe||h;ae(()=>{F!==c&&(q.current=!0,F(K.current,H))},[H,F,K]),S.useEffect(()=>{let e=K.current;return()=>{!q.current||F===c||(q.current=!1,F(e,void 0))}},[F,K]),ie(G,je,Y,void 0,!I&&!z,v);let Q=S.useRef(null),He=r(_,Q,J.inputRef,J.registerInput),Ue=pe(u,Oe,Q,!E,H??void 0);ae(()=>{Q.current&&(Q.current.indeterminate=Z,Y&&M(!0))},[Y,Z,M]),fe(Y,()=>{I||(k(B),M(Y),Se(Y!==Te.initialValue),J.change(Y))});let We=ee({checked:Y,disabled:z,form:p,name:b?void 0:B,id:E?void 0:H??void 0,required:C,ref:He,style:B?le:te,tabIndex:-1,type:`checkbox`,"aria-hidden":!0,onChange(e){if(e.nativeEvent.defaultPrevented)return;if(x){e.preventDefault();return}let t=e.currentTarget.checked,n=f(ue,e.nativeEvent);if(de?.(t,n),!n.isCanceled&&(Fe?.(t,n),!n.isCanceled&&(Ve(t),V&&W&&Le&&!b&&!R))){let e=t?[...W,V]:W.filter(e=>e!==V);Le(e,n)}},onFocus(){G.current?.focus()}},T===void 0?n:{value:(I?Y&&T:T)||``},Ae,e=>J.getValidationProps(z,e));S.useEffect(()=>{if(!L||!V)return;let e=L.disabledStatesRef.current;return e.set(V,z),()=>{e.delete(V)}},[L,z,V]);let $=S.useMemo(()=>({...P,checked:X,disabled:z,readOnly:x,required:C,indeterminate:Z}),[P,X,z,x,C,Z]),Ge=ve($),Ke=s(`span`,e,{state:$,ref:[Be,G,t,I?.registerControlRef],props:[{id:E?H??void 0:je,role:`checkbox`,"aria-checked":Z?`mixed`:X,"aria-readonly":x||void 0,"aria-required":C||void 0,"aria-labelledby":Ue,[be]:b?``:void 0,onFocus(){z||N(!0)},onBlur(){let e=Q.current;e&&(Ce(!0),N(!1),we===`onBlur`&&J.commit(I?W:e.checked))},onKeyDown(e){if(e.key!==`Enter`||(e.preventBaseUIHandler(),e.defaultPrevented))return;let t=Q.current?.form??null,n=e.currentTarget,r=e.nativeEvent,i=e.preventDefault,a=r.preventDefault,o=!1;e.preventDefault=()=>{o=!0,i.call(e)},r.preventDefault=()=>{o=!0,a.call(r)},a.call(r),y(n).queueMicrotask(()=>{e.preventDefault=i,r.preventDefault=a,o||_e(t)?.click()})},onClick(e){if(x||z)return;e.preventDefault();let t=Q.current;t&&t.dispatchEvent(new(y(t)).PointerEvent(`click`,{bubbles:!0,shiftKey:e.shiftKey,ctrlKey:e.ctrlKey,altKey:e.altKey,metaKey:e.metaKey}))}},O,Ie,ze,Ae,e=>J.getValidationProps(z,e)],stateAttributesMapping:Ge});return(0,D.jsxs)(ye.Provider,{value:$,children:[Ke,!Y&&!I&&B&&!b&&w!==void 0&&(0,D.jsx)(`input`,{type:`hidden`,form:p,name:B,value:w,disabled:z}),(0,D.jsx)(`input`,{...We,suppressHydrationWarning:!0})]})}),O=S.forwardRef(function(e,t){let{render:n,className:r,style:i,keepMounted:a=!1,...o}=e,c=E(),l=c.checked||c.indeterminate,{mounted:ee,transitionStatus:u,setMounted:d}=m(l),f=S.useRef(null),te={...c,transitionStatus:u};p({open:l,ref:f,onComplete(){l||d(!1)}});let ne={...ve(c),...h,..._},re=a||ee,g=s(`span`,e,{ref:[t,f],state:te,stateAttributesMapping:ne,props:o});return re?g:null});function k({className:e,...t}){return(0,D.jsx)(xe,{className:l(`relative inline-flex size-4.5 shrink-0 items-center justify-center rounded-[.25rem] border border-input bg-background not-dark:bg-clip-padding shadow-xs/5 outline-none ring-ring transition-shadow before:pointer-events-none before:absolute before:inset-0 before:rounded-[3px] not-data-disabled:not-data-checked:not-aria-invalid:before:shadow-[0_1px_--theme(--color-black/4%)] focus-visible:ring-2 focus-visible:ring-offset-1 focus-visible:ring-offset-background aria-invalid:border-destructive/36 focus-visible:aria-invalid:border-destructive/64 focus-visible:aria-invalid:ring-destructive/48 data-disabled:opacity-64 sm:size-4 dark:not-data-checked:bg-input/32 dark:aria-invalid:ring-destructive/24 dark:not-data-disabled:not-data-checked:not-aria-invalid:before:shadow-[0_-1px_--theme(--color-white/6%)] [[data-disabled],[data-checked],[aria-invalid]]:shadow-none`,e),"data-slot":`checkbox`,...t,children:(0,D.jsx)(O,{className:`-inset-px absolute flex items-center justify-center rounded-[.25rem] text-primary-foreground data-unchecked:hidden data-checked:bg-primary data-indeterminate:text-foreground`,"data-slot":`checkbox-indicator`,render:(e,t)=>(0,D.jsx)(`span`,{...e,children:t.indeterminate?(0,D.jsx)(`svg`,{className:`size-3.5 sm:size-3`,fill:`none`,height:`24`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`3`,viewBox:`0 0 24 24`,width:`24`,xmlns:`http://www.w3.org/2000/svg`,children:(0,D.jsx)(`path`,{d:`M5.252 12h13.496`})}):(0,D.jsx)(`svg`,{className:`size-3.5 sm:size-3`,fill:`none`,height:`24`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`3`,viewBox:`0 0 24 24`,width:`24`,xmlns:`http://www.w3.org/2000/svg`,children:(0,D.jsx)(`path`,{d:`M5.252 12.7 10.2 18.63 18.748 5.37`})})})})})}function A({repos:e,selectedPaths:t,onToggle:n,loading:r,emptyHint:i,className:a}){let[o,s]=(0,S.useState)(``),c=(0,S.useMemo)(()=>{let t=o.trim().toLowerCase();return t?e.filter(e=>e.name.toLowerCase().includes(t)||e.path.toLowerCase().includes(t)):e},[e,o]);return(0,D.jsxs)(`div`,{className:l(`flex flex-col gap-2`,a),children:[(0,D.jsxs)(`div`,{className:`relative`,children:[(0,D.jsx)(de,{className:`absolute top-1/2 left-2.5 size-4 -translate-y-1/2 text-muted-foreground`}),(0,D.jsx)(v,{value:o,onChange:e=>s(e.target.value),placeholder:`Filter repositories…`,className:`pl-8`,"aria-label":`Filter repositories`})]}),(0,D.jsx)(`div`,{className:`max-h-56 overflow-y-auto rounded-lg border border-border`,children:r?(0,D.jsx)(`p`,{className:`p-3 text-sm text-muted-foreground`,children:`Scanning for repositories…`}):c.length===0?(0,D.jsx)(`p`,{className:`p-3 text-sm text-muted-foreground`,children:i??`No repositories found.`}):(0,D.jsx)(`ul`,{className:`divide-y divide-border`,children:c.map(e=>(0,D.jsx)(`li`,{children:(0,D.jsxs)(`label`,{className:`flex cursor-pointer items-center gap-3 px-3 py-2 hover:bg-accent`,children:[(0,D.jsx)(k,{checked:t.includes(e.path),onCheckedChange:()=>n(e),"aria-label":e.name}),(0,D.jsxs)(`span`,{className:`min-w-0 flex-1`,children:[(0,D.jsx)(`span`,{className:`block truncate text-sm font-medium`,children:e.name}),(0,D.jsx)(`span`,{className:`block truncate font-mono text-xs text-muted-foreground`,children:e.path})]}),(0,D.jsx)(`span`,{className:`shrink-0 font-mono text-xs text-muted-foreground`,children:e.defaultBranch})]})},e.path))})})]})}function j({onCreated:e}){let[t,n]=(0,S.useState)(!1),[r,i]=(0,S.useState)(``),[a,o]=(0,S.useState)(null),s=b(),c=async()=>{o(null);try{let{repo:t}=await s.mutateAsync(r.trim());i(``),n(!1),e(t)}catch(e){o(e instanceof Error?e.message:String(e))}};return t?(0,D.jsxs)(`div`,{className:`mt-1.5 flex flex-col gap-1.5`,children:[(0,D.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,D.jsx)(v,{value:r,onChange:e=>i(e.target.value),onKeyDown:e=>e.key===`Enter`&&r.trim()&&c(),placeholder:`new-repo-name`,className:`h-7 font-mono text-xs`,"aria-label":`New repository name`,autoFocus:!0}),(0,D.jsxs)(d,{size:`xs`,onClick:c,disabled:!r.trim()||s.isPending,children:[s.isPending?(0,D.jsx)(x,{}):null,`Create`]}),(0,D.jsx)(d,{size:`xs`,variant:`ghost`,onClick:()=>{n(!1),o(null)},children:`Cancel`})]}),a&&(0,D.jsx)(`p`,{className:`text-xs text-destructive-foreground`,children:a})]}):(0,D.jsxs)(`button`,{type:`button`,onClick:()=>n(!0),className:`mt-1.5 inline-flex cursor-pointer items-center gap-1.5 text-xs text-muted-foreground hover:text-foreground`,children:[(0,D.jsx)(me,{className:`size-3.5`}),` Scaffold a brand-new repository`]})}export{A as n,k as r,j as t};
@@ -1,6 +0,0 @@
1
- import{_ as e,b as t,g as n,h as r,m as i,t as a}from"./button-BDDZnIHx.js";import{n as o}from"./CSPContext-BG7no5S_.js";import{t as ee}from"./chevron-down-qTL8HPug.js";import{a as s,c as te,i as ne,l as re,n as ie,o as ae,r as c,s as l,t as oe,u as se}from"./square-DlIYnlSq.js";import{t as u}from"./code-xml-jFAa3-TT.js";import{t as ce}from"./cpu-Cdwd84Jz.js";import{a as le,h as ue,m as de}from"./store-D5DUHbxn.js";import{t as d}from"./trash-2-CtR35_eF.js";import{t as f}from"./zap-CWG_Lvki.js";import{$ as fe,B as pe,Ft as p,Ht as m,Lt as me,Mt as he,N as ge,V as _e,Vt as h,X as ve,Z as ye,a as be,c as g,d as _,et as xe,f as v,jt as y,l as b,o as x,ot as Se,p as Ce,s as S,st as we}from"./index-wy68EqfB.js";import{t as C}from"./badge-CAohJGj6.js";import{t as Te}from"./card-BKXzd_5L.js";import{a as Ee,i as De,n as Oe,r as ke,t as Ae}from"./empty-BdlgbifD.js";import{t as w}from"./label-CG5exjag.js";import{t as je}from"./textarea-BNRuIXNs.js";var Me=r(`arrow-right-left`,[[`path`,{d:`m16 3 4 4-4 4`,key:`1x1c3m`}],[`path`,{d:`M20 7H4`,key:`zbl0bi`}],[`path`,{d:`m8 21-4-4 4-4`,key:`h9nckh`}],[`path`,{d:`M4 17h16`,key:`g4d7ey`}]]),Ne=r(`eye`,[[`path`,{d:`M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0`,key:`1nclc0`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]),Pe=r(`grip-vertical`,[[`circle`,{cx:`9`,cy:`12`,r:`1`,key:`1vctgf`}],[`circle`,{cx:`9`,cy:`5`,r:`1`,key:`hp0tcf`}],[`circle`,{cx:`9`,cy:`19`,r:`1`,key:`fkjjf6`}],[`circle`,{cx:`15`,cy:`12`,r:`1`,key:`1tmaij`}],[`circle`,{cx:`15`,cy:`5`,r:`1`,key:`19l28e`}],[`circle`,{cx:`15`,cy:`19`,r:`1`,key:`f4zoj3`}]]),Fe=r(`pen`,[[`path`,{d:`M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z`,key:`1a8usu`}]]),Ie=r(`wrench`,[[`path`,{d:`M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z`,key:`1ngwbx`}]]),T=t(e(),1),E=n(),D={"git-pull-request":ae,"flask-conical":l,package:ne,database:re,"shield-check":c,terminal:y,zap:f,cpu:ce,layers:s,boxes:m,code:u},Le=[{label:`Blue`,value:`#3b82f6`},{label:`Green`,value:`#10b981`},{label:`Purple`,value:`#8b5cf6`},{label:`Amber`,value:`#f59e0b`},{label:`Red`,value:`#ef4444`},{label:`Cyan`,value:`#06b6d4`},{label:`Pink`,value:`#ec4899`},{label:`Emerald`,value:`#059669`}];function O({showToast:e}){let[t,n]=(0,T.useState)(`global`),[r,s]=(0,T.useState)(``),[ne,re]=(0,T.useState)({}),[ae,c]=(0,T.useState)(!1),[l,u]=(0,T.useState)(null),[ce,f]=(0,T.useState)(!1),[y,O]=(0,T.useState)(null),[Re,k]=(0,T.useState)(!1),[A,j]=(0,T.useState)(`edit`),[ze,M]=(0,T.useState)(!1),[N,P]=(0,T.useState)(null),[Be,F]=(0,T.useState)(!1),[I,L]=(0,T.useState)(null),[R,Ve]=(0,T.useState)(null),[z,B]=(0,T.useState)(null),{data:V=[],isLoading:He}=fe(),{data:H=[],isLoading:Ue}=xe(t===`global`?void 0:t),{data:We=[]}=we(),{data:U,isLoading:Ge,isError:Ke}=Se(t===`global`?``:t),[W,G]=(0,T.useState)(null),qe=ye(),Je=_e(),K=ve(),Ye=pe(),q=ge(),J=t!==`global`,Y=new Set(W??U?.enabledSkills??[]),X=!J||!Ge&&!Ke&&!!U;(0,T.useEffect)(()=>{if(!J){G(null);return}U&&G([...U.enabledSkills])},[J,t,U]);let Xe=e=>{re(t=>({...t,[e]:!t[e]}))},Z=H.filter(e=>{if(!r.trim())return!0;let t=r.toLowerCase();return e.title?.toLowerCase().includes(t)||e.name.toLowerCase().includes(t)||e.description.toLowerCase().includes(t)||e.tags?.some(e=>e.toLowerCase().includes(t))}),Ze=V.reduce((e,t)=>(e[t.id]=Z.filter(e=>e.category===t.id),e),{}),Q=Z.filter(e=>!e.category||!V.some(t=>t.id===e.category)),Qe=e=>{u(e||{name:``,description:``,icon:`boxes`,color:`#3b82f6`,custom:!0}),c(!0)},$e=async()=>{if(!(!l||!l.name?.trim()))try{await qe.mutateAsync({id:l.id,name:l.name.trim(),description:l.description,icon:l.icon,color:l.color}),e?.(`Category saved successfully`,`success`),c(!1),u(null)}catch(t){e?.(`Failed to save category`,`error`),console.error(t)}},et=(e,t)=>{t.stopPropagation(),L({type:`category`,id:e.id,title:e.name}),F(!0)},$=(e,t)=>{O(e||{name:``,title:``,category:t||(V[0]?.id??`pull-requests`),description:``,tags:[],allowedTools:[],content:`# Skill Title
2
-
3
- Instructions and playbook for the AI assistant.
4
- `,custom:!0}),k(!!e),j(`edit`),f(!0)},tt=e=>{if(!y)return;let t={...y,title:e};!Re&&!y.id&&(t.name=e.toLowerCase().replace(/[^a-z0-9]+/g,`-`).replace(/^-+|-+$/g,``)),O(t)},nt=async()=>{if(!y||!y.name?.trim()||!y.description?.trim()||!y.content?.trim()){e?.(`Skill name, trigger description, and content are required`,`error`);return}try{await K.mutateAsync({id:y.id,name:y.name.trim(),title:y.title||y.name,category:y.category||`general`,description:y.description||``,tags:y.tags||[],allowedTools:y.allowedTools||[],content:y.content}),e?.(`Skill package saved successfully`,`success`),f(!1),O(null)}catch(t){e?.(`Failed to save skill`,`error`),console.error(t)}},rt=(e,t)=>{t.stopPropagation(),L({type:`skill`,id:e.id,title:e.title||e.name}),F(!0)},it=async()=>{if(I)try{I.type===`category`?(await Je.mutateAsync(I.id),e?.(`Category deleted`,`info`)):(await Ye.mutateAsync(I.id),e?.(`Skill package deleted`,`info`)),F(!1),L(null)}catch(t){e?.(`Failed to delete item`,`error`),console.error(t)}},at=e=>{if(!J||!X||W===null)return;let t=new Set(W);t.has(e)?t.delete(e):t.add(e),G(Array.from(t))},ot=()=>{if(!y||y.custom!==!1)return;let e=`${y.name}-copy`;O({...y,id:void 0,name:e,title:`${y.title||y.name} Copy`,allowedTools:[],custom:!0,sourcePath:void 0,references:void 0,scripts:void 0}),k(!0)},st=(e,t)=>{if(!J||!X||W===null)return;let n=Ze[e]||[],r=new Set(W);for(let e of n)t?r.add(e.id):r.delete(e.id);G(Array.from(r))},ct=async()=>{if(!(!U||W===null||!J))try{await q.mutateAsync({workspaceId:t,expectedRevision:U.revision??0,enabledSkills:W,enabledAgents:U.enabledAgents??[],enabledCategories:V.map(e=>e.id)}),e?.(`Skill selection saved. Refresh the workspace to apply it.`,`success`)}catch(t){e?.(t instanceof Error?t.message:`Failed to save skill selection`,`error`)}},lt=(e,t)=>{e.dataTransfer.setData(`text/plain`,t),e.dataTransfer.effectAllowed=`move`,Ve(t)},ut=(e,t)=>{e.preventDefault(),e.dataTransfer.dropEffect=`move`,z!==t&&B(t)},dt=()=>{B(null)},ft=async(t,n)=>{t.preventDefault(),B(null);let r=t.dataTransfer.getData(`text/plain`)||R;if(Ve(null),!r)return;let i=H.find(e=>e.id===r);!i||!i.custom||J||i.category===n||(await K.mutateAsync({id:i.id,name:i.name,title:i.title,description:i.description,tags:i.tags,allowedTools:i.allowedTools,content:i.content,category:n}),e?.(`Skill re-categorized`,`success`))},pt=(e,t)=>{t.stopPropagation(),P(e),M(!0)},mt=async t=>{if(!N||N.category===t){M(!1),P(null);return}await K.mutateAsync({id:N.id,name:N.name,title:N.title,description:N.description,tags:N.tags,allowedTools:N.allowedTools,content:N.content,category:t}),e?.(`Skill moved to category`,`success`),M(!1),P(null)};return(0,E.jsxs)(`div`,{className:`flex-1 flex flex-col h-full overflow-hidden bg-background text-foreground`,children:[(0,E.jsxs)(`div`,{className:`p-6 border-b border-border flex flex-col sm:flex-row sm:items-center justify-between gap-4 bg-card/40 backdrop-blur-sm`,children:[(0,E.jsx)(`div`,{children:(0,E.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,E.jsx)(`div`,{className:`p-2 rounded-xl bg-primary/10 text-primary`,children:(0,E.jsx)(m,{className:`h-6 w-6`})}),(0,E.jsxs)(`div`,{children:[(0,E.jsx)(`h1`,{className:`text-xl font-bold tracking-tight`,children:`Skill Library`}),(0,E.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Create, organize, and assign reusable Agent Skill packages.`})]})]})}),(0,E.jsxs)(`div`,{className:`flex items-center gap-3 flex-wrap`,children:[(0,E.jsx)(a,{render:(0,E.jsx)(le,{to:`/agents`}),variant:`outline`,size:`sm`,children:`Codex Agents`}),(0,E.jsxs)(`div`,{className:`flex items-center gap-2 bg-muted/50 rounded-lg px-3 py-1.5 border border-border`,children:[(0,E.jsx)(me,{className:`h-4 w-4 text-muted-foreground`}),(0,E.jsx)(w,{htmlFor:`skill-scope`,className:`text-xs font-medium text-muted-foreground`,children:`Scope:`}),(0,E.jsxs)(`select`,{id:`skill-scope`,value:t,onChange:e=>n(e.target.value),className:`bg-transparent text-xs font-semibold focus:outline-none cursor-pointer text-foreground`,children:[(0,E.jsx)(`option`,{value:`global`,className:`bg-popover text-popover-foreground`,children:`🌐 Global Skills Catalog`}),We.map(e=>(0,E.jsxs)(`option`,{value:e.id,className:`bg-popover text-popover-foreground`,children:[`📁 `,e.id,` (`,e.branchName,`)`]},e.id))]})]}),J&&(0,E.jsx)(a,{size:`sm`,onClick:ct,disabled:!X||q.isPending||W===null,children:q.isPending?`Saving…`:`Save selection`}),!J&&(0,E.jsxs)(E.Fragment,{children:[(0,E.jsxs)(a,{variant:`outline`,size:`sm`,onClick:()=>Qe(),className:`flex items-center gap-1.5`,children:[(0,E.jsx)(p,{className:`h-3.5 w-3.5`}),(0,E.jsx)(`span`,{children:`New Category`})]}),(0,E.jsxs)(a,{variant:`default`,size:`sm`,onClick:()=>$(),className:`flex items-center gap-1.5`,children:[(0,E.jsx)(he,{className:`h-3.5 w-3.5`}),(0,E.jsx)(`span`,{children:`New Skill`})]})]})]})]}),(0,E.jsxs)(`div`,{className:`px-6 py-3 border-b border-border/60 bg-muted/20 flex items-center justify-between gap-4`,children:[(0,E.jsxs)(`div`,{className:`relative flex-1 max-w-md`,children:[(0,E.jsx)(ue,{className:`absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground`}),(0,E.jsx)(o,{value:r,onChange:e=>s(e.target.value),placeholder:`Search skills by keyword, tag, or tool...`,className:`pl-9 pr-8 h-9 text-xs`}),r&&(0,E.jsx)(`button`,{onClick:()=>s(``),className:`absolute right-2.5 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground`,children:(0,E.jsx)(de,{className:`h-3.5 w-3.5`})})]}),(0,E.jsxs)(`div`,{className:`flex items-center gap-2 text-xs text-muted-foreground`,children:[(0,E.jsxs)(`span`,{children:[`Showing `,(0,E.jsx)(`strong`,{className:`text-foreground`,children:Z.length}),` of`,` `,(0,E.jsx)(`strong`,{className:`text-foreground`,children:H.length}),` skills`]}),J&&(0,E.jsxs)(C,{variant:`secondary`,className:`text-[10px] uppercase font-mono`,children:[`Workspace Mode (`,Y.size,` active)`]})]})]}),(0,E.jsx)(Ce,{className:`flex-1 p-6`,children:He||Ue||J&&Ge?(0,E.jsxs)(`div`,{className:`flex items-center justify-center p-12 gap-3 text-muted-foreground`,children:[(0,E.jsx)(be,{}),(0,E.jsx)(`span`,{className:`text-sm`,children:`Loading skills catalog...`})]}):J&&Ke?(0,E.jsx)(Ae,{className:`py-12 border border-dashed rounded-xl`,children:(0,E.jsxs)(ke,{children:[(0,E.jsx)(Ee,{children:`Workspace resources could not be loaded`}),(0,E.jsx)(Oe,{children:`Assignment controls are disabled so an existing selection cannot be overwritten.`})]})}):Z.length===0&&r?(0,E.jsxs)(Ae,{className:`py-12 border border-dashed rounded-xl`,children:[(0,E.jsx)(De,{children:(0,E.jsx)(ue,{className:`h-8 w-8 text-muted-foreground/60`})}),(0,E.jsxs)(ke,{children:[(0,E.jsx)(Ee,{children:`No matching skills found`}),(0,E.jsxs)(Oe,{children:[`No skills matched your search query "`,r,`".`]})]}),(0,E.jsx)(a,{variant:`outline`,size:`sm`,onClick:()=>s(``),children:`Clear Search`})]}):(0,E.jsxs)(`div`,{className:`space-y-6 max-w-7xl mx-auto pb-12`,children:[V.map(e=>{let t=D[e.icon||`boxes`]||m,n=Ze[e.id]||[],r=!!ne[e.id],o=z===e.id,s=n.length>0&&n.every(e=>Y.has(e.id));return(0,E.jsxs)(`div`,{onDragOver:t=>ut(t,e.id),onDragLeave:dt,onDrop:t=>ft(t,e.id),className:i(`border rounded-xl transition-all duration-150 overflow-hidden bg-card/60`,o?`border-primary ring-2 ring-primary/20 bg-primary/5`:`border-border`),children:[(0,E.jsxs)(`div`,{role:`button`,tabIndex:0,"aria-expanded":!r,onClick:()=>Xe(e.id),onKeyDown:t=>{(t.key===`Enter`||t.key===` `)&&(t.preventDefault(),Xe(e.id))},className:`p-4 flex items-center justify-between cursor-pointer hover:bg-muted/40 transition-colors border-b border-border/40 select-none`,children:[(0,E.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,E.jsx)(`div`,{className:`p-2 rounded-lg text-white shadow-sm flex items-center justify-center`,style:{backgroundColor:e.color||`#3b82f6`},children:(0,E.jsx)(t,{className:`h-4 w-4`})}),(0,E.jsxs)(`div`,{children:[(0,E.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,E.jsx)(`h2`,{className:`font-semibold text-sm tracking-tight`,children:e.name}),(0,E.jsxs)(C,{variant:`outline`,className:`text-[10px] px-1.5 py-0`,children:[n.length,` `,n.length===1?`skill`:`skills`]}),e.isTemplate&&!e.custom&&(0,E.jsx)(C,{variant:`secondary`,className:`text-[9px] px-1 py-0 uppercase`,children:`Template`})]}),e.description&&(0,E.jsx)(`p`,{className:`text-xs text-muted-foreground mt-0.5`,children:e.description})]})]}),(0,E.jsxs)(`div`,{className:`flex items-center gap-1`,onClick:e=>e.stopPropagation(),children:[J&&n.length>0&&(0,E.jsxs)(a,{variant:`ghost`,size:`xs`,onClick:()=>st(e.id,!s),className:`h-7 text-xs mr-2 text-muted-foreground hover:text-foreground`,title:s?`Deselect all in category`:`Select all in category`,children:[s?(0,E.jsx)(ie,{className:`h-3.5 w-3.5 mr-1 text-primary`}):(0,E.jsx)(oe,{className:`h-3.5 w-3.5 mr-1`}),(0,E.jsx)(`span`,{children:s?`Deselect All`:`Select All`})]}),!J&&(0,E.jsx)(a,{variant:`ghost`,size:`icon-xs`,onClick:()=>$(void 0,e.id),title:`Add skill to this category`,children:(0,E.jsx)(p,{className:`h-3.5 w-3.5`})}),!J&&(0,E.jsx)(a,{variant:`ghost`,size:`icon-xs`,onClick:()=>Qe(e),title:`Edit category`,children:(0,E.jsx)(Fe,{className:`h-3 w-3`})}),!J&&e.custom&&(0,E.jsx)(a,{variant:`ghost`,size:`icon-xs`,onClick:t=>et(e,t),title:`Delete category`,className:`text-destructive hover:text-destructive`,children:(0,E.jsx)(d,{className:`h-3 w-3`})}),(0,E.jsx)(`div`,{className:`p-1 text-muted-foreground`,children:r?(0,E.jsx)(se,{className:`h-4 w-4`}):(0,E.jsx)(ee,{className:`h-4 w-4`})})]})]}),!r&&(0,E.jsx)(`div`,{className:`p-4 bg-background/50`,children:n.length===0?(0,E.jsxs)(`div`,{className:`border border-dashed border-border/80 rounded-lg p-6 text-center text-xs text-muted-foreground`,children:[`No skills in this category.`,!J&&(0,E.jsxs)(E.Fragment,{children:[` `,`Drag a custom skill here, or click`,` `,(0,E.jsx)(`button`,{onClick:()=>$(void 0,e.id),className:`text-primary underline font-medium`,children:`+ Add Skill`})]})]}):(0,E.jsx)(`div`,{className:`grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-3.5`,children:n.map(e=>{let t=Y.has(e.id);return(0,E.jsxs)(Te,{draggable:!J&&!!e.custom,onDragStart:t=>{!J&&e.custom&&lt(t,e.id)},onClick:()=>$(e),role:`button`,tabIndex:0,onKeyDown:t=>{(t.key===`Enter`||t.key===` `)&&(t.preventDefault(),$(e))},className:i(`group relative cursor-pointer hover:border-primary/60 transition-all p-3.5 flex flex-col justify-between select-none shadow-sm`,J&&!t&&`opacity-60 bg-muted/20`,R===e.id&&`opacity-40 border-dashed`),children:[(0,E.jsxs)(`div`,{children:[(0,E.jsxs)(`div`,{className:`flex items-center justify-between gap-2 mb-2`,children:[(0,E.jsxs)(`div`,{className:`flex items-center gap-1.5 text-muted-foreground group-hover:text-foreground cursor-grab active:cursor-grabbing`,title:`Drag to reorder or re-categorize`,"aria-label":`Drag handle`,children:[(0,E.jsx)(Pe,{className:`h-3.5 w-3.5`}),(0,E.jsx)(`span`,{className:`font-mono text-xs font-bold text-foreground`,children:e.title||e.name})]}),J?(0,E.jsxs)(`button`,{type:`button`,onClick:t=>{t.stopPropagation(),at(e.id)},disabled:!X||q.isPending,className:i(`h-5 px-2 rounded-md flex items-center gap-1 text-[10px] font-semibold transition-colors`,t?`bg-primary text-primary-foreground`:`bg-muted text-muted-foreground hover:bg-muted/80`),children:[(0,E.jsx)(h,{className:i(`h-3 w-3`,!t&&`opacity-0`)}),(0,E.jsx)(`span`,{children:t?`Enabled`:`Disabled`})]}):(0,E.jsx)(C,{variant:`outline`,className:`text-[10px] font-mono`,children:e.custom?`Custom`:`Template`})]}),(0,E.jsx)(`p`,{className:`text-xs text-muted-foreground line-clamp-2 mb-3 leading-relaxed`,children:e.description||`No description provided.`})]}),(0,E.jsxs)(`div`,{className:`pt-2 border-t border-border/40 flex items-center justify-between gap-2`,children:[(0,E.jsxs)(`div`,{className:`flex items-center gap-1.5 flex-wrap overflow-hidden`,children:[e.tags?.slice(0,2).map(e=>(0,E.jsxs)(`span`,{className:`text-[10px] font-mono bg-muted px-1.5 py-0.5 rounded text-muted-foreground`,children:[`#`,e]},e)),e.allowedTools&&e.allowedTools.length>0&&(0,E.jsxs)(`span`,{className:`text-[10px] text-muted-foreground flex items-center gap-0.5 font-mono`,children:[(0,E.jsx)(Ie,{className:`h-2.5 w-2.5`}),e.allowedTools.length]})]}),(0,E.jsxs)(`div`,{className:`flex items-center gap-1`,onClick:e=>e.stopPropagation(),children:[!J&&e.custom&&(0,E.jsx)(a,{variant:`ghost`,size:`icon-xs`,onClick:t=>pt(e,t),title:`Move to another category`,className:`h-6 w-6 text-muted-foreground hover:text-foreground`,children:(0,E.jsx)(Me,{className:`h-3 w-3`})}),!J&&e.custom&&(0,E.jsx)(a,{variant:`ghost`,size:`icon-xs`,onClick:t=>rt(e,t),title:`Delete skill`,className:`h-6 w-6 text-destructive hover:text-destructive`,children:(0,E.jsx)(d,{className:`h-3 w-3`})})]})]})]},e.id)})})})]},e.id)}),Q.length>0&&(0,E.jsxs)(`div`,{className:`border border-border/80 rounded-xl overflow-hidden bg-card/60`,children:[(0,E.jsx)(`div`,{className:`p-4 bg-muted/30 border-b border-border/40 flex items-center justify-between`,children:(0,E.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,E.jsx)(m,{className:`h-4 w-4 text-muted-foreground`}),(0,E.jsx)(`h2`,{className:`font-semibold text-sm`,children:`Uncategorized Skills`}),(0,E.jsx)(C,{variant:`outline`,className:`text-[10px]`,children:Q.length})]})}),(0,E.jsx)(`div`,{className:`p-4 grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-3.5`,children:Q.map(e=>(0,E.jsxs)(Te,{onClick:()=>$(e),role:`button`,tabIndex:0,onKeyDown:t=>{(t.key===`Enter`||t.key===` `)&&(t.preventDefault(),$(e))},className:`p-3.5 cursor-pointer hover:border-primary/60`,children:[(0,E.jsxs)(`div`,{className:`mb-1 flex items-center justify-between gap-2`,children:[(0,E.jsx)(`div`,{className:`font-mono text-xs font-bold`,children:e.title||e.name}),J&&(0,E.jsx)(a,{size:`xs`,variant:Y.has(e.id)?`default`:`outline`,disabled:!X||q.isPending,onClick:t=>{t.stopPropagation(),at(e.id)},children:Y.has(e.id)?`Enabled`:`Disabled`})]}),(0,E.jsx)(`p`,{className:`text-xs text-muted-foreground line-clamp-2`,children:e.description})]},e.id))})]})]})}),(0,E.jsx)(x,{open:ae,onOpenChange:c,children:(0,E.jsxs)(_,{className:`sm:max-w-lg`,children:[(0,E.jsxs)(b,{children:[(0,E.jsx)(v,{children:l?.id?`Edit Skill Category`:`Create Skill Category`}),(0,E.jsx)(S,{children:`Categories group related procedural skills and agent tools into clean visual boxes.`})]}),(0,E.jsxs)(`div`,{className:`space-y-4 py-2`,children:[(0,E.jsxs)(`div`,{children:[(0,E.jsx)(w,{htmlFor:`cat-name`,className:`text-xs font-medium`,children:`Category Name`}),(0,E.jsx)(o,{id:`cat-name`,value:l?.name||``,onChange:e=>u(t=>t?{...t,name:e.target.value}:null),placeholder:`e.g. Pull Requests & Review`,className:`mt-1 text-xs`})]}),(0,E.jsxs)(`div`,{children:[(0,E.jsx)(w,{htmlFor:`cat-desc`,className:`text-xs font-medium`,children:`Description`}),(0,E.jsx)(o,{id:`cat-desc`,value:l?.description||``,onChange:e=>u(t=>t?{...t,description:e.target.value}:null),placeholder:`Brief summary of what skills belong in this box...`,className:`mt-1 text-xs`})]}),(0,E.jsxs)(`div`,{children:[(0,E.jsx)(w,{className:`text-xs font-medium`,children:`Icon`}),(0,E.jsx)(`div`,{className:`grid grid-cols-6 gap-2 mt-1.5`,children:Object.keys(D).map(e=>{let t=D[e];return(0,E.jsx)(`button`,{type:`button`,onClick:()=>u(t=>t?{...t,icon:e}:null),className:i(`p-2.5 rounded-lg border flex items-center justify-center transition-colors`,(l?.icon||`boxes`)===e?`border-primary bg-primary/10 text-primary`:`border-border hover:bg-muted text-muted-foreground`),children:(0,E.jsx)(t,{className:`h-4 w-4`})},e)})})]}),(0,E.jsxs)(`div`,{children:[(0,E.jsx)(w,{className:`text-xs font-medium`,children:`Color Accent`}),(0,E.jsx)(`div`,{className:`flex items-center gap-2 mt-1.5 flex-wrap`,children:Le.map(e=>{let t=l?.color===e.value;return(0,E.jsx)(`button`,{type:`button`,"aria-label":`Select color ${e.label}`,onClick:()=>u(t=>t?{...t,color:e.value}:null),className:i(`w-7 h-7 rounded-full transition-transform flex items-center justify-center shadow-sm`,t?`scale-110 ring-2 ring-primary ring-offset-2`:`hover:scale-105`),style:{backgroundColor:e.value},children:t&&(0,E.jsx)(h,{className:`h-3.5 w-3.5 text-white`})},e.value)})})]})]}),(0,E.jsxs)(g,{children:[(0,E.jsx)(a,{variant:`outline`,size:`sm`,onClick:()=>c(!1),children:`Cancel`}),(0,E.jsx)(a,{variant:`default`,size:`sm`,onClick:$e,disabled:!l?.name?.trim(),children:`Save Category`})]})]})}),(0,E.jsx)(x,{open:ce,onOpenChange:f,children:(0,E.jsxs)(_,{className:`sm:max-w-3xl max-h-[90vh] flex flex-col`,children:[(0,E.jsx)(b,{children:(0,E.jsxs)(`div`,{className:`flex items-center justify-between pr-6`,children:[(0,E.jsxs)(`div`,{children:[(0,E.jsx)(v,{children:y?.id?`Edit Skill Package`:`Create New Skill`}),(0,E.jsx)(S,{children:`Configure SKILL.md metadata triggers and markdown playbook instructions.`})]}),(0,E.jsxs)(`div`,{className:`flex items-center gap-1 bg-muted/60 p-1 rounded-lg border border-border text-xs`,children:[(0,E.jsxs)(`button`,{type:`button`,onClick:()=>j(`edit`),className:i(`px-2.5 py-1 rounded-md flex items-center gap-1 font-medium transition-colors`,A===`edit`?`bg-background text-foreground shadow-sm`:`text-muted-foreground hover:text-foreground`),children:[(0,E.jsx)(te,{className:`h-3.5 w-3.5`}),(0,E.jsx)(`span`,{children:`Edit`})]}),(0,E.jsxs)(`button`,{type:`button`,onClick:()=>j(`preview`),className:i(`px-2.5 py-1 rounded-md flex items-center gap-1 font-medium transition-colors`,A===`preview`?`bg-background text-foreground shadow-sm`:`text-muted-foreground hover:text-foreground`),children:[(0,E.jsx)(Ne,{className:`h-3.5 w-3.5`}),(0,E.jsx)(`span`,{children:`Preview`})]})]})]})}),(0,E.jsx)(Ce,{className:`flex-1 pr-4 py-2`,children:A===`edit`?(0,E.jsxs)(`div`,{className:`space-y-4`,children:[(0,E.jsxs)(`div`,{className:`grid grid-cols-1 sm:grid-cols-2 gap-4`,children:[(0,E.jsxs)(`div`,{children:[(0,E.jsx)(w,{htmlFor:`skill-title`,className:`text-xs font-medium`,children:`Display Title`}),(0,E.jsx)(o,{id:`skill-title`,value:y?.title||``,onChange:e=>tt(e.target.value),placeholder:`e.g. Pull Request Reviewer`,className:`mt-1 text-xs`})]}),(0,E.jsxs)(`div`,{children:[(0,E.jsx)(w,{htmlFor:`skill-name`,className:`text-xs font-medium`,children:`Identifier (Slug)`}),(0,E.jsx)(o,{id:`skill-name`,value:y?.name||``,disabled:!!y?.id,onChange:e=>{k(!0),O(t=>t?{...t,name:e.target.value}:null)},placeholder:`e.g. pr-review-toolkit`,className:`mt-1 text-xs font-mono`})]})]}),(0,E.jsxs)(`div`,{className:`grid grid-cols-1 sm:grid-cols-2 gap-4`,children:[(0,E.jsxs)(`div`,{children:[(0,E.jsx)(w,{htmlFor:`skill-cat`,className:`text-xs font-medium`,children:`Category Box`}),(0,E.jsx)(`select`,{id:`skill-cat`,value:y?.category||``,onChange:e=>O(t=>t?{...t,category:e.target.value}:null),className:`mt-1 w-full bg-background border border-border rounded-md px-3 py-2 text-xs focus:outline-none focus:ring-1 focus:ring-primary`,children:V.map(e=>(0,E.jsx)(`option`,{value:e.id,children:e.name},e.id))})]}),(0,E.jsxs)(`div`,{children:[(0,E.jsx)(w,{htmlFor:`skill-tags`,className:`text-xs font-medium`,children:`Tags (comma separated)`}),(0,E.jsx)(o,{id:`skill-tags`,value:y?.tags?.join(`, `)||``,onChange:e=>O(t=>t?{...t,tags:e.target.value.split(`,`).map(e=>e.trim()).filter(Boolean)}:null),placeholder:`e.g. git, pr, quality`,className:`mt-1 text-xs font-mono`})]})]}),(0,E.jsxs)(`div`,{children:[(0,E.jsx)(w,{htmlFor:`skill-desc`,className:`text-xs font-medium`,children:`Trigger Description (for AI Autonomous Discovery)`}),(0,E.jsx)(o,{id:`skill-desc`,value:y?.description||``,onChange:e=>O(t=>t?{...t,description:e.target.value}:null),placeholder:`e.g. Use when reviewing PR diffs or when user asks for a PR audit...`,className:`mt-1 text-xs`})]}),(0,E.jsxs)(`div`,{children:[(0,E.jsx)(w,{htmlFor:`skill-content`,className:`text-xs font-medium`,children:`Playbook Instructions (Markdown)`}),(0,E.jsx)(je,{id:`skill-content`,value:y?.content||``,onChange:e=>O(t=>t?{...t,content:e.target.value}:null),rows:12,placeholder:`# Playbook Title
5
-
6
- Detailed instructions for the AI assistant...`,className:`mt-1 font-mono text-xs leading-relaxed`})]})]}):(0,E.jsxs)(`div`,{className:`p-4 border rounded-xl bg-card/40 prose prose-sm dark:prose-invert max-w-none`,children:[(0,E.jsxs)(`div`,{className:`mb-4 pb-3 border-b`,children:[(0,E.jsx)(`h2`,{className:`text-lg font-bold m-0`,children:y?.title||y?.name}),(0,E.jsx)(`p`,{className:`text-xs text-muted-foreground m-0 mt-1`,children:y?.description})]}),(0,E.jsx)(`pre`,{className:`text-xs whitespace-pre-wrap font-sans bg-transparent p-0 border-0`,children:y?.content||`*(No playbook markdown provided)*`})]})}),(0,E.jsxs)(g,{className:`mt-4 pt-3 border-t`,children:[(0,E.jsx)(a,{variant:`outline`,size:`sm`,onClick:()=>f(!1),children:`Cancel`}),(0,E.jsx)(a,{variant:`default`,size:`sm`,onClick:y?.custom===!1?ot:nt,disabled:!y?.name?.trim()||!y?.description?.trim()||!y?.content?.trim(),children:y?.custom===!1?`Create editable copy`:`Save Skill`})]})]})}),(0,E.jsx)(x,{open:ze,onOpenChange:M,children:(0,E.jsxs)(_,{className:`sm:max-w-md`,children:[(0,E.jsxs)(b,{children:[(0,E.jsx)(v,{children:`Move Skill to Category`}),(0,E.jsxs)(S,{children:[`Select the destination category box for "`,N?.title||N?.name,`".`]})]}),(0,E.jsx)(`div`,{className:`space-y-2 py-2`,children:V.map(e=>{let t=D[e.icon||`boxes`]||m,n=N?.category===e.id;return(0,E.jsxs)(`button`,{type:`button`,onClick:()=>mt(e.id),className:i(`w-full p-3 rounded-lg border text-left flex items-center justify-between transition-colors`,n?`border-primary bg-primary/10`:`border-border hover:bg-muted/50 text-foreground`),children:[(0,E.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,E.jsx)(`div`,{className:`p-1.5 rounded text-white flex items-center justify-center`,style:{backgroundColor:e.color||`#3b82f6`},children:(0,E.jsx)(t,{className:`h-4 w-4`})}),(0,E.jsxs)(`div`,{children:[(0,E.jsx)(`div`,{className:`font-semibold text-xs`,children:e.name}),e.description&&(0,E.jsx)(`div`,{className:`text-[11px] text-muted-foreground line-clamp-1`,children:e.description})]})]}),n&&(0,E.jsx)(C,{variant:`secondary`,className:`text-[10px]`,children:`Current`})]},e.id)})}),(0,E.jsx)(g,{children:(0,E.jsx)(a,{variant:`outline`,size:`sm`,onClick:()=>M(!1),children:`Cancel`})})]})}),(0,E.jsx)(x,{open:Be,onOpenChange:F,children:(0,E.jsxs)(_,{className:`sm:max-w-md`,children:[(0,E.jsxs)(b,{children:[(0,E.jsxs)(v,{className:`text-destructive`,children:[`Delete `,I?.type===`category`?`Category`:`Skill`]}),(0,E.jsxs)(S,{children:[`Are you sure you want to delete "`,I?.title,`"? This action cannot be undone.`]})]}),(0,E.jsxs)(g,{className:`mt-4`,children:[(0,E.jsx)(a,{variant:`outline`,size:`sm`,onClick:()=>F(!1),children:`Cancel`}),(0,E.jsx)(a,{variant:`destructive`,size:`sm`,onClick:it,children:`Delete Permanently`})]})]})})]})}export{O as SkillsPage};
@@ -1 +0,0 @@
1
- import{_ as e,b as t,g as n,h as r,m as i,t as a}from"./button-BDDZnIHx.js";import{n as o}from"./CSPContext-BG7no5S_.js";import{t as s}from"./bot-C2HWrAft.js";import{t as c}from"./chevron-down-qTL8HPug.js";import{t as l}from"./code-xml-jFAa3-TT.js";import{n as u,r as d,t as f}from"./ScaffoldRepoInline-gXyYSIz5.js";import{t as p}from"./git-branch-Cfj9D8yW.js";import{a as m,d as h,f as g}from"./store-D5DUHbxn.js";import{t as _}from"./zap-CWG_Lvki.js";import{Bt as v,Ct as y,D as b,Dt as x,E as S,Et as ee,G as C,Ht as te,J as ne,Kt as w,L as T,Lt as re,M as ie,Mt as ae,O as oe,Ot as E,P as se,Pt as D,Rt as ce,St as O,T as le,Tt as ue,Vt as k,a as A,bt as de,ct as fe,d as j,et as pe,f as me,it as M,j as he,jt as N,k as ge,l as P,n as _e,nt as ve,o as ye,q as F,rt as I,s as L,t as R,u as z,wt as be,yt as B,zt as V}from"./index-wy68EqfB.js";import{t as xe}from"./badge-CAohJGj6.js";import{a as H,i as U,n as W,r as Se,t as Ce}from"./empty-BdlgbifD.js";import{t as we}from"./textarea-BNRuIXNs.js";import{n as Te,t as G}from"./vsc-D6UPv2ii.js";var Ee=r(`app-window`,[[`rect`,{x:`2`,y:`4`,width:`20`,height:`16`,rx:`2`,key:`izxlao`}],[`path`,{d:`M10 4v4`,key:`pp8u80`}],[`path`,{d:`M2 8h20`,key:`d11cs7`}],[`path`,{d:`M6 4v4`,key:`1svtjw`}]]),De=r(`orbit`,[[`path`,{d:`M20.341 6.484A10 10 0 0 1 10.266 21.85`,key:`1enhxb`}],[`path`,{d:`M3.659 17.516A10 10 0 0 1 13.74 2.152`,key:`1crzgf`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}],[`circle`,{cx:`19`,cy:`5`,r:`2`,key:`mhkx31`}],[`circle`,{cx:`5`,cy:`19`,r:`2`,key:`v8kfzx`}]]),Oe=r(`rocket`,[[`path`,{d:`M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5`,key:`qeys4`}],[`path`,{d:`M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09`,key:`u4xsad`}],[`path`,{d:`M9 12a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.4 22.4 0 0 1-4 2z`,key:`676m9`}],[`path`,{d:`M9 12H4s.55-3.03 2-4c1.62-1.08 5 .05 5 .05`,key:`92ym6u`}]]),K=t(e(),1),q={status:`idle`,steps:[]};function ke(){let[e,t]=(0,K.useState)(q),n=(0,K.useRef)(null),r=w(),i=(0,K.useCallback)(()=>{n.current?.close(),n.current=null},[]);return(0,K.useEffect)(()=>i,[i]),{progress:e,start:(0,K.useCallback)(e=>{i(),t({status:`running`,steps:[]});let a=new EventSource(`/api/workspace/create-stream/${encodeURIComponent(e)}`);n.current=a;let o=0;a.addEventListener(`progress`,n=>{o=0;try{let a=JSON.parse(n.data);t({status:a.status===`completed`||a.status===`failed`?a.status:`running`,steps:a.steps??[],error:a.error,workspacePath:a.workspacePath,workspaceId:a.feature?.id??e}),(a.status===`completed`||a.status===`failed`)&&(i(),r.invalidateQueries({queryKey:[`workspaces`]}),r.invalidateQueries({queryKey:[`workspaces-status`]}))}catch{}}),a.onerror=()=>{o+=1,!(a.readyState!==EventSource.CLOSED&&o<5)&&(t(e=>e.status===`running`?{...e,status:`failed`,error:e.error??`Lost connection to the creation stream.`}:e),i())}},[i,r]),reset:(0,K.useCallback)(()=>{i(),t(q)},[i])}}var J=n(),Y=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i,Ae={codex:E,claude:B,vscode:G,"vscode-insiders":Te,cursor:de,antigravity:De,powershell:N,cmd:N,terminal:N,intellij:O,webstorm:ue,pycharm:y,sublime:be,zed:x,windsurf:ee},X={codex:`bg-foreground text-background`,claude:`bg-[#D97757] text-white`,vscode:`bg-[#007ACC] text-white`,"vscode-insiders":`bg-[#24A148] text-white`,cursor:`bg-zinc-950 text-white dark:bg-white dark:text-zinc-950`,antigravity:`bg-violet-600 text-white`,powershell:`bg-sky-700 text-white`,cmd:`bg-zinc-800 text-amber-400`,terminal:`bg-zinc-800 text-emerald-400`,intellij:`bg-fuchsia-600 text-white`,webstorm:`bg-cyan-600 text-white`,pycharm:`bg-lime-600 text-zinc-950`,sublime:`bg-orange-500 text-white`,zed:`bg-red-600 text-white`,windsurf:`bg-teal-600 text-white`};function Z({icon:e}){let t=Ae[e]??l;return(0,J.jsx)(`span`,{className:i(`grid size-10 shrink-0 place-items-center rounded-xl shadow-sm`,X[e]),"aria-hidden":`true`,children:(0,J.jsx)(t,{className:`size-5`})})}function Q({target:e,busy:t,launching:n,preferred:r,onLaunch:a}){return(0,J.jsxs)(`button`,{type:`button`,disabled:!e.available||t,onClick:()=>a(e),"aria-label":`Open workspace in ${e.name}`,className:i(`flex min-h-20 w-full items-center gap-3 rounded-xl border p-3 text-left outline-none transition-colors`,`focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background`,`cursor-pointer border-border bg-card hover:border-primary/40 hover:bg-accent/60`),children:[(0,J.jsx)(Z,{icon:e.icon}),(0,J.jsxs)(`span`,{className:`min-w-0 flex-1`,children:[(0,J.jsxs)(`span`,{className:`flex items-center justify-between gap-2`,children:[(0,J.jsx)(`span`,{className:`font-medium text-foreground`,children:e.name}),n?(0,J.jsx)(A,{className:`size-4`}):r?(0,J.jsx)(xe,{size:`sm`,variant:`secondary`,children:`Preferred`}):null]}),(0,J.jsx)(`span`,{className:`mt-0.5 block text-xs leading-relaxed text-muted-foreground`,children:e.description})]})]})}function je({session:e,busy:t,launching:n,onResume:r}){let a=e.desktopHandoff.method===`direct`,o=a?`Codex Desktop`:`Claude Desktop`;return(0,J.jsxs)(`button`,{type:`button`,disabled:t,onClick:()=>r(e),"aria-label":a?`Resume ${e.title} in Codex Desktop`:`Move ${e.title} to Claude Desktop`,className:i(`flex min-h-20 w-full cursor-pointer items-center gap-3 rounded-xl border border-primary/25 bg-primary/5 p-3 text-left outline-none transition-colors`,`hover:border-primary/45 hover:bg-primary/10 focus-visible:ring-2 focus-visible:ring-ring`,`disabled:cursor-not-allowed disabled:opacity-65`),children:[(0,J.jsx)(Z,{icon:a?`codex`:`claude`}),(0,J.jsxs)(`span`,{className:`min-w-0 flex-1`,children:[(0,J.jsxs)(`span`,{className:`flex items-center justify-between gap-2`,children:[(0,J.jsx)(`span`,{className:`truncate font-medium text-foreground`,title:e.title,children:e.title}),n?(0,J.jsx)(A,{className:`size-4 shrink-0`}):a?(0,J.jsx)(ce,{className:`size-4 shrink-0 text-muted-foreground`}):(0,J.jsx)(V,{className:`size-4 shrink-0 text-muted-foreground`})]}),(0,J.jsxs)(`span`,{className:`mt-0.5 block text-xs leading-relaxed text-muted-foreground`,children:[a?`Open this existing task in ${o}`:`Resume in Claude Code, then type /desktop`,` · `,new Date(e.updatedAt).toLocaleString()]})]})]})}function Me({workspaceId:e,workspacePath:t,isVsCode:n=!1,className:r}){let[i,o]=(0,K.useState)(!1),[s,c]=(0,K.useState)(null),[l,u]=(0,K.useState)(null),[d,f]=(0,K.useState)(null),p=(0,K.useRef)(!1),m=I(),h=M(e,i),g=se().data?.config,_=m.data?.filter(e=>e.available)??[],v=_.filter(e=>e.kind===`ai-app`),y=g?.defaultEditor?{code:`vscode`,"code-insiders":`vscode-insiders`,cursor:`cursor`,antigravity:`antigravity`,idea:`intellij`,webstorm:`webstorm`,charm:`pycharm`,subl:`sublime`,zed:`zed`,windsurf:`windsurf`}[g.defaultEditor]:void 0,b=_.filter(e=>e.kind===`editor`).toSorted((e,t)=>Number(t.id===y)-Number(e.id===y)),x=new Set(_.map(e=>e.id)),S=(h.data??[]).filter(e=>e.desktopHandoff&&x.has(e.desktopHandoff.targetId)),ee=n||_.length>0,C=async t=>{if(!p.current){p.current=!0,u(null),f(null),c(t.id);try{await fe(`/api/workspace/${encodeURIComponent(e)}/launch`,{method:`POST`,body:JSON.stringify({targetId:t.id})}),o(!1)}catch(e){u(e instanceof Error?e.message:String(e)),await m.refetch()}finally{c(null),p.current=!1}}},te=async t=>{if(!(p.current||!t.desktopHandoff||!Y.test(t.id))){p.current=!0,u(null),f(null),c(`session:${t.id}`);try{if(t.desktopHandoff.method===`guided`){await R(`claude --resume ${t.id}`),f(`Claude resume command copied. With a Claude subscription login, run it in this workspace, then type /desktop in Claude to move the session into Claude Desktop.`);return}await fe(`/api/workspace/${encodeURIComponent(e)}/launch`,{method:`POST`,body:JSON.stringify({targetId:t.desktopHandoff.targetId,action:`resume`,sessionId:t.id})}),o(!1)}catch(e){u(e instanceof Error?e.message:String(e)),await Promise.all([m.refetch(),h.refetch()])}finally{c(null),p.current=!1}}},ne=()=>{window.parent.postMessage({type:`openWorkspaceFolder`,workspacePath:t},`*`),o(!1)},w=()=>Promise.all([m.refetch(),h.refetch()]),T=m.isFetching||h.isFetching;return(0,J.jsxs)(J.Fragment,{children:[(0,J.jsxs)(a,{variant:`outline`,className:r,onClick:()=>o(!0),children:[(0,J.jsx)(Oe,{}),`Open with…`]}),(0,J.jsx)(ye,{open:i,onOpenChange:e=>{o(e),e||(u(null),f(null))},children:(0,J.jsxs)(j,{className:`max-w-2xl`,"aria-busy":s!==null,children:[(0,J.jsxs)(P,{children:[(0,J.jsx)(me,{children:`Open workspace with…`}),(0,J.jsx)(L,{children:`Continue recent AI work or start in an installed coding app or editor. AI apps may use their own online services.`})]}),(0,J.jsxs)(z,{className:`space-y-5`,children:[l&&(0,J.jsx)(`div`,{role:`alert`,className:`rounded-lg border border-destructive/30 bg-destructive/10 px-3 py-2 text-sm text-destructive-foreground`,children:l}),d&&(0,J.jsx)(`div`,{role:`status`,className:`rounded-lg border border-primary/25 bg-primary/5 px-3 py-2 text-sm text-foreground`,children:d}),h.isLoading?(0,J.jsxs)(`div`,{className:`flex items-center gap-2 text-sm text-muted-foreground`,"aria-live":`polite`,children:[(0,J.jsx)(A,{className:`size-4`}),` Checking recent sessions…`]}):S.length>0?(0,J.jsxs)(`section`,{"aria-labelledby":`recent-sessions-heading`,children:[(0,J.jsx)(`h3`,{id:`recent-sessions-heading`,className:`mb-2 text-xs font-semibold uppercase tracking-wide text-muted-foreground`,children:`Continue recent work`}),(0,J.jsx)(`div`,{className:`grid gap-2 sm:grid-cols-2`,children:S.map(e=>(0,J.jsx)(je,{session:e,busy:s!==null,launching:s===`session:${e.id}`,onResume:te},`${e.assistant}:${e.id}`))})]}):h.isError?(0,J.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Recent sessions could not be checked. Starting new work is still available.`}):null,n&&(0,J.jsxs)(`section`,{"aria-labelledby":`current-editor-heading`,children:[(0,J.jsx)(`h3`,{id:`current-editor-heading`,className:`mb-2 text-xs font-semibold uppercase tracking-wide text-muted-foreground`,children:`Current window`}),(0,J.jsxs)(`button`,{type:`button`,disabled:s!==null,onClick:ne,className:`flex min-h-20 w-full cursor-pointer items-center gap-3 rounded-xl border border-primary/30 bg-primary/5 p-3 text-left outline-none transition-colors hover:bg-primary/10 focus-visible:ring-2 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-65`,children:[(0,J.jsx)(Z,{icon:`vscode`}),(0,J.jsxs)(`span`,{children:[(0,J.jsx)(`span`,{className:`block font-medium`,children:`Current VS Code window`}),(0,J.jsx)(`span`,{className:`mt-0.5 block text-xs text-muted-foreground`,children:`Open through the installed NexusFlow extension.`})]})]})]}),m.isLoading?(0,J.jsxs)(`div`,{className:`flex items-center gap-2 py-8 text-sm text-muted-foreground`,"aria-live":`polite`,children:[(0,J.jsx)(A,{}),` Checking apps on this computer…`]}):m.isError?(0,J.jsx)(`div`,{role:`alert`,className:`rounded-lg border border-destructive/30 bg-destructive/10 p-3 text-sm text-destructive-foreground`,children:m.error instanceof Error?m.error.message:`Could not check available apps.`}):(0,J.jsxs)(J.Fragment,{children:[v.length>0&&(0,J.jsxs)(`section`,{"aria-labelledby":`ai-apps-heading`,children:[(0,J.jsx)(`h3`,{id:`ai-apps-heading`,className:`mb-2 text-xs font-semibold uppercase tracking-wide text-muted-foreground`,children:`AI coding apps`}),(0,J.jsx)(`div`,{className:`grid gap-2 sm:grid-cols-2`,children:v.map(e=>(0,J.jsx)(Q,{target:e,busy:s!==null,launching:s===e.id,onLaunch:C},e.id))})]}),b.length>0&&(0,J.jsxs)(`section`,{"aria-labelledby":`editors-heading`,children:[(0,J.jsx)(`h3`,{id:`editors-heading`,className:`mb-2 text-xs font-semibold uppercase tracking-wide text-muted-foreground`,children:`Code editors`}),(0,J.jsx)(`div`,{className:`grid gap-2 sm:grid-cols-2`,children:b.map(e=>(0,J.jsx)(Q,{target:e,busy:s!==null,launching:s===e.id,preferred:e.id===y,onLaunch:C},e.id))})]}),!ee&&(0,J.jsx)(Ce,{className:`rounded-xl border border-dashed py-8 md:p-8`,children:(0,J.jsxs)(Se,{children:[(0,J.jsx)(U,{variant:`icon`,children:(0,J.jsx)(Ee,{})}),(0,J.jsx)(H,{className:`text-base`,children:`No compatible apps detected`}),(0,J.jsx)(W,{children:`Install a supported coding app or add its command to PATH, then recheck.`})]})})]}),(0,J.jsxs)(`div`,{className:`flex items-center justify-between gap-3 border-t border-border pt-3`,children:[(0,J.jsx)(`p`,{className:`text-xs text-muted-foreground`,"aria-live":`polite`,children:T?`Checking recent sessions and apps…`:`Can’t find your app or session? Recheck detection.`}),(0,J.jsxs)(a,{size:`sm`,variant:`ghost`,onClick:()=>void w(),disabled:T||s!==null,children:[(0,J.jsx)(D,{className:T?`animate-spin`:``}),`Recheck`]})]})]})]})})]})}var Ne=`__ad-hoc__`,Pe=new URLSearchParams(window.location.search).get(`env`)===`vscode`,Fe=[{value:`in-place`,icon:_,title:`In-place`,body:`Work directly in the source repos. No branches or worktrees — fastest start.`},{value:`worktree`,icon:p,title:`Isolated worktrees`,body:`A feature branch and worktree per repo. Your source checkouts stay untouched.`}];function Ie({repo:e,value:t,onChange:n,enabled:r}){let i=F(e.path,r),a=(0,K.useMemo)(()=>[...new Set([...i.data?.local??[],...i.data?.remote??[]])],[i.data]),s=`branches-${e.path.replace(/[^a-zA-Z0-9]/g,`-`)}`;return(0,J.jsxs)(`label`,{className:`flex items-center gap-2`,children:[(0,J.jsx)(`span`,{className:`w-40 shrink-0 truncate text-xs`,children:e.name}),(0,J.jsx)(o,{list:s,value:t,onChange:e=>n(e.target.value),placeholder:`existing branch (must exist)`,className:`h-7 font-mono text-xs`}),(0,J.jsx)(`datalist`,{id:s,children:a.map(e=>(0,J.jsx)(`option`,{value:e},e))})]})}function Le({step:e}){return(0,J.jsxs)(`li`,{className:`flex items-center gap-3 py-2`,children:[(0,J.jsx)(`span`,{className:i(`grid size-5 shrink-0 place-items-center rounded-full border`,e.status===`completed`&&`border-success bg-success/15 text-success-foreground`,e.status===`running`&&`border-primary text-primary`,e.status===`failed`&&`border-destructive bg-destructive/15 text-destructive-foreground`,e.status===`pending`&&`border-border text-muted-foreground`),children:e.status===`completed`?(0,J.jsx)(k,{className:`size-3`}):e.status===`running`?(0,J.jsx)(A,{className:`size-3`}):e.status===`failed`?(0,J.jsx)(v,{className:`size-3`}):null}),(0,J.jsxs)(`div`,{className:`min-w-0`,children:[(0,J.jsx)(`p`,{className:`text-sm font-medium`,children:e.name}),(0,J.jsx)(`p`,{className:`truncate text-xs text-muted-foreground`,children:e.message})]})]})}function Re(){let e=h(),[t]=g(),n=C(),r=ne(),l=ie(),p=ve(),_=pe(),v=he(),y=T(),{progress:x,start:ee,reset:w}=ke(),[E,se]=(0,K.useState)(t.get(`project`)??Ne),[D,ce]=(0,K.useState)(`in-place`),[O,ue]=(0,K.useState)(``),[k,de]=(0,K.useState)(``),[j,me]=(0,K.useState)(``),[M,N]=(0,K.useState)([]),[P,ye]=(0,K.useState)(!1),[F,I]=(0,K.useState)([]),[L,R]=(0,K.useState)([]),[z,be]=(0,K.useState)([]),[B,V]=(0,K.useState)(``),[H,U]=(0,K.useState)(``),[W,Se]=(0,K.useState)(!1),[Ce,Te]=(0,K.useState)(null),[G,Ee]=(0,K.useState)({}),[De,Oe]=(0,K.useState)(!1),[q,Y]=(0,K.useState)(null),Ae=(0,K.useRef)(!1);(0,K.useEffect)(()=>{!Ae.current&&l.data&&(Ae.current=!0,I(l.data.filter(e=>e.detected).map(e=>e.name)))},[l.data]);let X=(0,K.useMemo)(()=>(n.data??[]).find(e=>e.id===E)??null,[n.data,E]),Z=(0,K.useMemo)(()=>X?X.repos.map(e=>({name:_e(e.path),path:e.path,defaultBranch:e.defaultBranch})):(r.data??[]).filter(e=>M.includes(e.path)),[X,r.data,M]),Q=D===`in-place`,je=(Q?k.trim().length>0:O.trim().length>0)&&Z.length>0&&j.trim().length>0,Re=e=>{V(e),Te(null);let t=(p.data??[]).find(t=>t.id===e);U(t?.content??``)},ze=async()=>{if(!j.trim()){Y(`Describe what you are building first — the suggestion is based on it.`);return}Y(null),Se(!0);try{let e=await fe(`/api/workspace/suggest-workflow`,{method:`POST`,body:JSON.stringify({description:j,repos:Z})});V(e.suggestedWorkflowId),U(e.customInstructions),Te(e.difficulty)}catch(e){Y(e instanceof Error?e.message:String(e))}finally{Se(!1)}},$=(0,K.useRef)(!1),Be=async()=>{if($.current||y.isPending||!je)return;$.current=!0,Y(null);let e={mode:D,projectId:X?.id,...Q?{name:k.trim()}:{branchName:O.trim()},description:j.trim(),repos:Z.map(e=>({...e,existingBranch:!Q&&G[e.path]?.trim()?G[e.path].trim():void 0})),assistants:F,enabledSkills:L.length>0?L:void 0,enabledAgents:z.length>0?z:void 0,teamworkInstructions:H.trim()||void 0};try{let{jobId:t}=await y.mutateAsync(e);ee(t)}catch(e){Y(e instanceof Error?e.message:String(e))}finally{$.current=!1}};if(x.status!==`idle`){let t=x.steps.find(e=>e.status===`failed`);return(0,J.jsxs)(`div`,{className:`mx-auto max-w-xl animate-fade-in`,children:[(0,J.jsx)(`h1`,{className:`text-xl font-semibold`,children:x.status===`running`?`Setting up your workspace…`:x.status===`completed`?`Workspace ready`:`Workspace creation failed`}),(0,J.jsx)(`ul`,{"aria-live":`polite`,"aria-relevant":`additions text`,className:`mt-6 divide-y divide-border rounded-xl border border-border bg-card px-4`,children:x.steps.map(e=>(0,J.jsx)(Le,{step:e},e.id))}),x.status===`failed`&&(0,J.jsx)(`p`,{className:`mt-4 text-sm text-destructive-foreground`,children:t?.message??x.error??`Something went wrong.`}),x.status===`completed`&&x.workspacePath&&(0,J.jsx)(`p`,{className:`mt-4 truncate font-mono text-xs text-muted-foreground`,children:x.workspacePath}),q&&(0,J.jsx)(`p`,{className:`mt-2 text-sm text-destructive-foreground`,children:q}),(0,J.jsxs)(`div`,{"data-testid":`workspace-ready-actions`,className:`mt-6 flex min-w-0 flex-col gap-2 sm:flex-row sm:flex-wrap`,children:[x.status===`completed`&&x.workspaceId&&(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(a,{className:`w-full min-w-0 whitespace-normal sm:w-auto`,onClick:()=>e(`/workspaces/${encodeURIComponent(x.workspaceId)}`),children:`Open workspace`}),x.workspacePath&&(0,J.jsx)(Me,{workspaceId:x.workspaceId,workspacePath:x.workspacePath,isVsCode:Pe,className:`w-full min-w-0 whitespace-normal sm:w-auto`})]}),x.status===`failed`&&(0,J.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,J.jsx)(a,{variant:`default`,onClick:w,children:`Back to form (edit & retry)`}),(0,J.jsx)(a,{variant:`outline`,onClick:()=>window.location.reload(),children:`Start over (clear form)`})]}),x.status===`running`&&(0,J.jsxs)(`div`,{className:`flex items-center justify-between gap-4`,children:[(0,J.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`This can take a moment for large repositories.`}),(0,J.jsx)(a,{variant:`outline`,size:`sm`,onClick:w,children:`Cancel creation`})]})]})]})}return(0,J.jsxs)(`div`,{className:`mx-auto max-w-xl animate-fade-in`,children:[(0,J.jsxs)(`header`,{className:`mb-6`,children:[(0,J.jsx)(`h1`,{className:`text-xl font-semibold`,children:`Start work`}),(0,J.jsx)(`p`,{className:`mt-1 text-sm text-muted-foreground`,children:`Pick where the work happens and how isolated it should be.`})]}),(0,J.jsxs)(`div`,{className:`flex flex-col gap-6`,children:[(0,J.jsxs)(`section`,{children:[(0,J.jsx)(`span`,{className:`mb-1.5 block text-sm font-medium`,children:`Project`}),(0,J.jsxs)(le,{value:E,onValueChange:e=>typeof e==`string`&&se(e),children:[(0,J.jsx)(oe,{className:`w-full`,"aria-label":`Project`,children:(0,J.jsx)(ge,{children:X?X.name:`Ad-hoc — pick repositories manually`})}),(0,J.jsxs)(b,{alignItemWithTrigger:!1,children:[(n.data??[]).map(e=>(0,J.jsx)(S,{value:e.id,children:e.name},e.id)),(0,J.jsx)(S,{value:Ne,children:`Ad-hoc — pick repositories manually`})]})]}),X?(0,J.jsx)(`ul`,{className:`mt-2 flex flex-col gap-0.5`,children:X.repos.map(e=>(0,J.jsx)(`li`,{className:`truncate font-mono text-xs text-muted-foreground`,children:e.path},e.path))}):(0,J.jsxs)(`div`,{className:`mt-2`,children:[(0,J.jsx)(u,{repos:r.data??[],selectedPaths:M,onToggle:e=>N(t=>t.includes(e.path)?t.filter(t=>t!==e.path):[...t,e.path]),loading:r.isLoading}),(0,J.jsx)(f,{onCreated:e=>N(t=>[...t,e.path])})]}),(n.data??[]).length===0&&!n.isLoading&&(0,J.jsxs)(`p`,{className:`mt-2 text-xs text-muted-foreground`,children:[`Tip: `,(0,J.jsx)(m,{to:`/projects`,className:`text-primary hover:underline`,children:`register a project`}),` to skip repo picking next time.`]})]}),(0,J.jsxs)(`section`,{children:[(0,J.jsx)(`span`,{className:`mb-1.5 block text-sm font-medium`,children:`How do you want to work?`}),(0,J.jsx)(`div`,{role:`radiogroup`,"aria-label":`Work mode`,className:`grid gap-3 sm:grid-cols-2`,onKeyDown:e=>{if([`ArrowRight`,`ArrowDown`,`ArrowLeft`,`ArrowUp`].includes(e.key)){e.preventDefault();let t=D===`in-place`?`worktree`:`in-place`;ce(t),document.getElementById(`mode-${t}`)?.focus()}},children:Fe.map(e=>(0,J.jsxs)(`button`,{id:`mode-${e.value}`,type:`button`,role:`radio`,"aria-checked":D===e.value,tabIndex:D===e.value?0:-1,onClick:()=>ce(e.value),className:i(`cursor-pointer rounded-xl border p-4 text-left outline-none transition-colors focus-visible:ring-2 focus-visible:ring-ring`,D===e.value?`border-primary bg-primary/5 ring-1 ring-primary`:`border-border bg-card hover:border-foreground/20`),children:[(0,J.jsx)(e.icon,{className:i(`size-4`,D===e.value?`text-primary`:`text-muted-foreground`)}),(0,J.jsx)(`p`,{className:`mt-2 text-sm font-semibold`,children:e.title}),(0,J.jsx)(`p`,{className:`mt-1 text-xs text-muted-foreground`,children:e.body})]},e.value))})]}),(0,J.jsx)(`section`,{children:Q?(0,J.jsxs)(`label`,{className:`block`,children:[(0,J.jsx)(`span`,{className:`mb-1 block text-sm font-medium`,children:`Workspace name`}),(0,J.jsx)(o,{value:k,onChange:e=>de(e.target.value),placeholder:`e.g. Fix invoice rounding`})]}):(0,J.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[(0,J.jsxs)(`label`,{className:`block`,children:[(0,J.jsx)(`span`,{className:`mb-1 block text-sm font-medium`,children:`Feature branch`}),(0,J.jsx)(o,{value:O,onChange:e=>ue(e.target.value),placeholder:`e.g. feature/invoice-rounding`,className:`font-mono`})]}),Z.length>0&&(0,J.jsxs)(`details`,{className:`rounded-lg border border-border px-3 py-2`,onToggle:e=>Oe(e.target.open),children:[(0,J.jsx)(`summary`,{className:`cursor-pointer text-xs font-medium text-muted-foreground`,children:`Use an existing branch for specific repos (optional)`}),(0,J.jsx)(`div`,{className:`mt-2 flex flex-col gap-2`,children:Z.map(e=>(0,J.jsx)(Ie,{repo:e,enabled:De,value:G[e.path]??``,onChange:t=>Ee(n=>({...n,[e.path]:t}))},e.path))})]})]})}),(0,J.jsx)(`section`,{children:(0,J.jsxs)(`label`,{className:`block`,children:[(0,J.jsx)(`span`,{className:`mb-1 block text-sm font-medium`,children:`What are you building?`}),(0,J.jsx)(we,{value:j,onChange:e=>me(e.target.value),placeholder:`A short description — your AI assistant reads this to plan the work.`,rows:3})]})}),(0,J.jsxs)(`section`,{className:`rounded-xl border border-border`,children:[(0,J.jsxs)(`button`,{type:`button`,onClick:()=>ye(e=>!e),className:`flex w-full items-center justify-between px-4 py-3 text-sm font-medium hover:bg-accent`,"aria-expanded":P,children:[`Advanced`,(0,J.jsx)(c,{className:i(`size-4 text-muted-foreground transition-transform`,P&&`rotate-180`)})]}),P&&(0,J.jsxs)(`div`,{className:`flex flex-col gap-4 border-t border-border p-4`,children:[(0,J.jsxs)(`div`,{children:[(0,J.jsx)(`span`,{className:`mb-1.5 block text-sm font-medium`,children:`AI assistants`}),(0,J.jsx)(`div`,{className:`flex flex-wrap gap-3`,children:(l.data??[]).map(e=>(0,J.jsxs)(`label`,{className:i(`flex cursor-pointer items-center gap-2 rounded-lg border border-border px-3 py-1.5 text-sm`,!e.detected&&`opacity-50`),children:[(0,J.jsx)(d,{checked:F.includes(e.name),onCheckedChange:()=>I(t=>t.includes(e.name)?t.filter(t=>t!==e.name):[...t,e.name])}),e.displayName]},e.name))})]}),(0,J.jsxs)(`div`,{children:[(0,J.jsxs)(`div`,{className:`mb-1.5 flex items-center justify-between`,children:[(0,J.jsx)(`span`,{className:`text-sm font-medium`,children:`Teamwork strategy`}),(0,J.jsxs)(a,{size:`xs`,variant:`outline`,onClick:ze,disabled:W,children:[W?(0,J.jsx)(A,{}):(0,J.jsx)(ae,{}),`Suggest with AI`]})]}),(0,J.jsxs)(le,{value:B,onValueChange:e=>typeof e==`string`&&Re(e),children:[(0,J.jsx)(oe,{className:`w-full`,"aria-label":`Teamwork strategy`,children:(0,J.jsx)(ge,{children:(p.data??[]).find(e=>e.id===B)?.name??`None`})}),(0,J.jsxs)(b,{alignItemWithTrigger:!1,children:[(0,J.jsx)(S,{value:``,children:`None`}),(p.data??[]).map(e=>(0,J.jsx)(S,{value:e.id,children:e.name},e.id))]})]}),Ce&&(0,J.jsxs)(`p`,{className:`mt-1.5 text-xs text-muted-foreground`,children:[`AI classified this task as `,(0,J.jsx)(`span`,{className:`font-medium`,children:Ce}),` difficulty.`]}),(0,J.jsx)(we,{value:H,onChange:e=>U(e.target.value),placeholder:`Cooperation instructions for the agent team (editable — prefilled by the strategy pick or AI suggestion).`,rows:4,className:`mt-2 font-mono text-xs`})]}),(0,J.jsxs)(`div`,{children:[(0,J.jsxs)(`div`,{className:`mb-1.5 flex items-center justify-between`,children:[(0,J.jsxs)(`span`,{className:`text-sm font-medium flex items-center gap-1.5`,children:[(0,J.jsx)(te,{className:`size-4 text-primary`}),`Agent Skills (`,L.length,` selected)`]}),(_.data??[]).length>0&&(0,J.jsx)(a,{type:`button`,size:`xs`,variant:`ghost`,onClick:()=>{let e=(_.data??[]).map(e=>e.id);R(L.length===e.length?[]:e)},className:`text-xs text-muted-foreground hover:text-foreground h-6 px-2`,children:L.length===(_.data??[]).length&&(_.data??[]).length>0?`Deselect All`:`Select All`})]}),(0,J.jsx)(`div`,{className:`max-h-48 overflow-y-auto rounded-lg border border-border bg-card/50 p-2 space-y-1.5`,children:_.isLoading?(0,J.jsxs)(`div`,{className:`flex items-center justify-center p-4 gap-2 text-xs text-muted-foreground`,children:[(0,J.jsx)(A,{className:`size-3`}),`Loading skills...`]}):(_.data??[]).length===0?(0,J.jsx)(`p`,{className:`text-xs text-muted-foreground p-2 text-center`,children:`No skills available in catalog.`}):(_.data??[]).map(e=>{let t=L.includes(e.id);return(0,J.jsxs)(`label`,{className:i(`flex items-center justify-between gap-2 rounded-md p-2 text-xs cursor-pointer border transition-colors`,t?`border-primary/50 bg-primary/5 text-foreground`:`border-transparent hover:bg-muted/50 text-muted-foreground`),children:[(0,J.jsxs)(`div`,{className:`flex items-center gap-2 min-w-0`,children:[(0,J.jsx)(d,{checked:t,onCheckedChange:()=>R(t=>t.includes(e.id)?t.filter(t=>t!==e.id):[...t,e.id])}),(0,J.jsx)(`span`,{className:`font-mono font-medium truncate`,children:e.title||e.name})]}),(0,J.jsx)(xe,{variant:`outline`,className:`text-[9px] px-1 py-0 shrink-0`,children:e.category})]},e.id)})})]}),(v.data??[]).length>0&&(0,J.jsxs)(`div`,{children:[(0,J.jsx)(`div`,{className:`mb-1.5 flex items-center justify-between`,children:(0,J.jsxs)(`span`,{className:`text-sm font-medium flex items-center gap-1.5`,children:[(0,J.jsx)(s,{className:`size-4 text-purple-400`}),`Codex Native Agents (`,z.length,` selected)`]})}),(0,J.jsx)(`div`,{className:`flex flex-wrap gap-2`,children:(v.data??[]).map(e=>{let t=z.includes(e.id);return(0,J.jsxs)(`label`,{className:i(`flex cursor-pointer items-center gap-2 rounded-lg border border-border px-3 py-1.5 text-xs`,t?`border-purple-500/60 bg-purple-500/5 text-foreground`:`text-muted-foreground hover:bg-muted/50`),children:[(0,J.jsx)(d,{checked:t,onCheckedChange:()=>be(t=>t.includes(e.id)?t.filter(t=>t!==e.id):[...t,e.id])}),(0,J.jsx)(`span`,{className:`font-mono`,children:e.name})]},e.id)})})]})]})]}),q&&(0,J.jsx)(`p`,{className:`text-sm text-destructive-foreground`,children:q}),(0,J.jsxs)(`div`,{className:`flex items-center justify-between gap-4 border-t border-border pt-4`,children:[(0,J.jsxs)(`p`,{className:`flex items-center gap-1.5 text-xs text-muted-foreground`,children:[(0,J.jsx)(re,{className:`size-3.5`}),Z.length,` repositor`,Z.length===1?`y`:`ies`,` selected`]}),(0,J.jsxs)(a,{onClick:Be,disabled:!je||y.isPending,children:[y.isPending?(0,J.jsx)(A,{}):null,Q?`Start working`:`Create workspace`]})]})]})]})}export{Re as StartWorkPage};