profclaw 2.0.0 → 2.3.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 (477) hide show
  1. package/.env.example +14 -2
  2. package/CHANGELOG.md +37 -0
  3. package/CONTRIBUTING.md +20 -0
  4. package/Dockerfile +39 -23
  5. package/README.md +174 -40
  6. package/dist/agents/agent-summary.d.ts +44 -0
  7. package/dist/agents/agent-summary.js +176 -0
  8. package/dist/agents/auto-memory.d.ts +59 -0
  9. package/dist/agents/auto-memory.js +310 -0
  10. package/dist/agents/checkpoint-manager.d.ts +76 -0
  11. package/dist/agents/checkpoint-manager.js +156 -0
  12. package/dist/agents/circuit-breaker.d.ts +54 -0
  13. package/dist/agents/circuit-breaker.js +153 -0
  14. package/dist/agents/context-compactor.d.ts +70 -0
  15. package/dist/agents/context-compactor.js +361 -0
  16. package/dist/agents/conversation-branch.d.ts +55 -0
  17. package/dist/agents/conversation-branch.js +115 -0
  18. package/dist/agents/error-recovery.d.ts +44 -0
  19. package/dist/agents/error-recovery.js +197 -0
  20. package/dist/agents/events.d.ts +76 -0
  21. package/dist/agents/events.js +8 -0
  22. package/dist/agents/executor.d.ts +35 -1
  23. package/dist/agents/executor.js +573 -124
  24. package/dist/agents/file-snapshots.d.ts +72 -0
  25. package/dist/agents/file-snapshots.js +182 -0
  26. package/dist/agents/index.d.ts +2 -0
  27. package/dist/agents/orchestrator.d.ts +183 -0
  28. package/dist/agents/orchestrator.js +495 -0
  29. package/dist/agents/permissions.d.ts +63 -0
  30. package/dist/agents/permissions.js +138 -0
  31. package/dist/agents/plan-mode.d.ts +71 -0
  32. package/dist/agents/plan-mode.js +186 -0
  33. package/dist/agents/prompt-suggestions.d.ts +33 -0
  34. package/dist/agents/prompt-suggestions.js +208 -0
  35. package/dist/agents/rate-limit-monitor.d.ts +56 -0
  36. package/dist/agents/rate-limit-monitor.js +224 -0
  37. package/dist/agents/result-store.d.ts +37 -0
  38. package/dist/agents/result-store.js +104 -0
  39. package/dist/agents/session-diff.d.ts +43 -0
  40. package/dist/agents/session-diff.js +258 -0
  41. package/dist/agents/tool-loader.d.ts +65 -0
  42. package/dist/agents/tool-loader.js +273 -0
  43. package/dist/agents/transcript.d.ts +96 -0
  44. package/dist/agents/transcript.js +267 -0
  45. package/dist/agents/worktree-manager.d.ts +80 -0
  46. package/dist/agents/worktree-manager.js +203 -0
  47. package/dist/auth/middleware.js +14 -0
  48. package/dist/chat/agentic-executor.d.ts +7 -0
  49. package/dist/chat/agentic-executor.js +253 -30
  50. package/dist/chat/conversations.d.ts +2 -0
  51. package/dist/chat/conversations.js +8 -0
  52. package/dist/chat/execution/executor.d.ts +8 -0
  53. package/dist/chat/execution/executor.js +157 -103
  54. package/dist/chat/execution/index.js +5 -1
  55. package/dist/chat/execution/tool-router.js +40 -14
  56. package/dist/chat/execution/tools/canvas.d.ts +2 -2
  57. package/dist/chat/execution/tools/code-tools.d.ts +66 -0
  58. package/dist/chat/execution/tools/code-tools.js +353 -0
  59. package/dist/chat/execution/tools/complete-task.d.ts +2 -2
  60. package/dist/chat/execution/tools/cron-tool.d.ts +26 -10
  61. package/dist/chat/execution/tools/cron-tool.js +48 -3
  62. package/dist/chat/execution/tools/decompose-task.d.ts +58 -0
  63. package/dist/chat/execution/tools/decompose-task.js +166 -0
  64. package/dist/chat/execution/tools/exec.d.ts +5 -2
  65. package/dist/chat/execution/tools/exec.js +294 -155
  66. package/dist/chat/execution/tools/feed-tools.d.ts +77 -0
  67. package/dist/chat/execution/tools/feed-tools.js +142 -0
  68. package/dist/chat/execution/tools/file-ops.d.ts +1 -1
  69. package/dist/chat/execution/tools/github.d.ts +2 -2
  70. package/dist/chat/execution/tools/index.d.ts +14 -2
  71. package/dist/chat/execution/tools/index.js +86 -12
  72. package/dist/chat/execution/tools/integrations.d.ts +8 -8
  73. package/dist/chat/execution/tools/multi-patch.d.ts +53 -0
  74. package/dist/chat/execution/tools/multi-patch.js +373 -0
  75. package/dist/chat/execution/tools/openai-image-gen.d.ts +2 -2
  76. package/dist/chat/execution/tools/plan-tools.d.ts +80 -0
  77. package/dist/chat/execution/tools/plan-tools.js +134 -0
  78. package/dist/chat/execution/tools/profclaw-ops.d.ts +6 -6
  79. package/dist/chat/execution/tools/repl-tool.d.ts +46 -0
  80. package/dist/chat/execution/tools/repl-tool.js +207 -0
  81. package/dist/chat/execution/tools/sessions-send.d.ts +2 -2
  82. package/dist/chat/execution/tools/slack-actions.d.ts +2 -2
  83. package/dist/chat/execution/tools/system.d.ts +4 -4
  84. package/dist/chat/execution/tools/todo-tool.d.ts +72 -0
  85. package/dist/chat/execution/tools/todo-tool.js +152 -0
  86. package/dist/chat/execution/tools/tool-search.d.ts +50 -0
  87. package/dist/chat/execution/tools/tool-search.js +155 -0
  88. package/dist/chat/execution/types.d.ts +21 -14
  89. package/dist/chat/execution/workflows/executor.d.ts +11 -0
  90. package/dist/chat/execution/workflows/executor.js +99 -1
  91. package/dist/chat/execution/workflows/types.d.ts +35 -2
  92. package/dist/chat/format/index.d.ts +1 -0
  93. package/dist/chat/format/index.js +1 -0
  94. package/dist/chat/format/markdown-convert.d.ts +23 -0
  95. package/dist/chat/format/markdown-convert.js +149 -0
  96. package/dist/chat/index.d.ts +1 -1
  97. package/dist/chat/index.js +1 -1
  98. package/dist/chat/message-handler.js +58 -6
  99. package/dist/chat/proactive/index.d.ts +62 -0
  100. package/dist/chat/proactive/index.js +147 -0
  101. package/dist/chat/prompt-adapter.js +2 -0
  102. package/dist/chat/providers/irc/index.d.ts +2 -2
  103. package/dist/chat/providers/telegram/index.d.ts +2 -0
  104. package/dist/chat/providers/telegram/index.js +21 -2
  105. package/dist/chat/system-prompts.d.ts +3 -3
  106. package/dist/chat/system-prompts.js +116 -61
  107. package/dist/chat/tools.d.ts +6 -6
  108. package/dist/cli/commands/auth.js +64 -1
  109. package/dist/cli/commands/chat.js +1327 -138
  110. package/dist/cli/commands/doctor.js +222 -16
  111. package/dist/cli/commands/history.d.ts +3 -0
  112. package/dist/cli/commands/history.js +138 -0
  113. package/dist/cli/commands/import.d.ts +44 -0
  114. package/dist/cli/commands/import.js +526 -0
  115. package/dist/cli/commands/init.d.ts +13 -0
  116. package/dist/cli/commands/init.js +381 -0
  117. package/dist/cli/commands/onboard.js +210 -30
  118. package/dist/cli/commands/plan.d.ts +13 -0
  119. package/dist/cli/commands/plan.js +184 -0
  120. package/dist/cli/commands/serve.d.ts +7 -0
  121. package/dist/cli/commands/serve.js +77 -18
  122. package/dist/cli/commands/setup.js +84 -3
  123. package/dist/cli/commands/status.js +54 -0
  124. package/dist/cli/commands/tools.js +13 -13
  125. package/dist/cli/commands/tui.js +26 -1
  126. package/dist/cli/index.js +19 -0
  127. package/dist/cli/ink/App.d.ts +13 -0
  128. package/dist/cli/ink/App.js +6 -0
  129. package/dist/cli/ink/ChatApp.d.ts +60 -0
  130. package/dist/cli/ink/ChatApp.js +325 -0
  131. package/dist/cli/ink/DashboardApp.d.ts +3 -0
  132. package/dist/cli/ink/DashboardApp.js +143 -0
  133. package/dist/cli/ink/components/AgentStatus.d.ts +17 -0
  134. package/dist/cli/ink/components/AgentStatus.js +33 -0
  135. package/dist/cli/ink/components/ChannelList.d.ts +17 -0
  136. package/dist/cli/ink/components/ChannelList.js +33 -0
  137. package/dist/cli/ink/components/ConnectionStatus.d.ts +19 -0
  138. package/dist/cli/ink/components/ConnectionStatus.js +50 -0
  139. package/dist/cli/ink/components/CostBar.d.ts +19 -0
  140. package/dist/cli/ink/components/CostBar.js +35 -0
  141. package/dist/cli/ink/components/HookStatus.d.ts +15 -0
  142. package/dist/cli/ink/components/HookStatus.js +7 -0
  143. package/dist/cli/ink/components/PermissionPrompt.d.ts +21 -0
  144. package/dist/cli/ink/components/PermissionPrompt.js +51 -0
  145. package/dist/cli/ink/components/PlanView.d.ts +23 -0
  146. package/dist/cli/ink/components/PlanView.js +26 -0
  147. package/dist/cli/ink/components/ProviderList.d.ts +16 -0
  148. package/dist/cli/ink/components/ProviderList.js +16 -0
  149. package/dist/cli/ink/components/SessionHeader.d.ts +15 -0
  150. package/dist/cli/ink/components/SessionHeader.js +15 -0
  151. package/dist/cli/ink/components/StreamingMessage.d.ts +20 -0
  152. package/dist/cli/ink/components/StreamingMessage.js +27 -0
  153. package/dist/cli/ink/components/SuggestionBar.d.ts +15 -0
  154. package/dist/cli/ink/components/SuggestionBar.js +28 -0
  155. package/dist/cli/ink/components/SystemHealth.d.ts +20 -0
  156. package/dist/cli/ink/components/SystemHealth.js +39 -0
  157. package/dist/cli/ink/components/TaskList.d.ts +17 -0
  158. package/dist/cli/ink/components/TaskList.js +59 -0
  159. package/dist/cli/ink/components/ToolCall.d.ts +17 -0
  160. package/dist/cli/ink/components/ToolCall.js +43 -0
  161. package/dist/cli/ink/index.d.ts +23 -0
  162. package/dist/cli/ink/index.js +15 -0
  163. package/dist/cli/ink/keybindings.d.ts +35 -0
  164. package/dist/cli/ink/keybindings.js +105 -0
  165. package/dist/cli/ink/markdown-renderer.d.ts +47 -0
  166. package/dist/cli/ink/markdown-renderer.js +380 -0
  167. package/dist/cli/ink/output-styles.d.ts +39 -0
  168. package/dist/cli/ink/output-styles.js +119 -0
  169. package/dist/cli/interactive/auto-serve.d.ts +38 -0
  170. package/dist/cli/interactive/auto-serve.js +209 -0
  171. package/dist/cli/interactive/index.d.ts +25 -0
  172. package/dist/cli/interactive/index.js +23 -0
  173. package/dist/cli/interactive/picker.d.ts +28 -0
  174. package/dist/cli/interactive/picker.js +153 -0
  175. package/dist/cli/interactive/renderer.d.ts +26 -0
  176. package/dist/cli/interactive/renderer.js +555 -0
  177. package/dist/cli/interactive/repl.d.ts +14 -0
  178. package/dist/cli/interactive/repl.js +1516 -0
  179. package/dist/cli/interactive/stream-client.d.ts +59 -0
  180. package/dist/cli/interactive/stream-client.js +506 -0
  181. package/dist/cli/interactive/types.d.ts +121 -0
  182. package/dist/cli/interactive/types.js +10 -0
  183. package/dist/cli/utils/api.d.ts +9 -0
  184. package/dist/cli/utils/api.js +58 -2
  185. package/dist/cron/natural-language.d.ts +54 -0
  186. package/dist/cron/natural-language.js +569 -0
  187. package/dist/cron/scheduler.d.ts +34 -4
  188. package/dist/cron/scheduler.js +141 -9
  189. package/dist/cron/templates.d.ts +1 -1
  190. package/dist/cron/templates.js +219 -0
  191. package/dist/feeds/feed-engine.d.ts +149 -0
  192. package/dist/feeds/feed-engine.js +600 -0
  193. package/dist/feeds/index.d.ts +9 -0
  194. package/dist/feeds/index.js +8 -0
  195. package/dist/gateway/router.js +6 -1
  196. package/dist/hooks/built-in/audit-log.d.ts +11 -0
  197. package/dist/hooks/built-in/audit-log.js +84 -0
  198. package/dist/hooks/built-in/cost-warning.d.ts +10 -0
  199. package/dist/hooks/built-in/cost-warning.js +59 -0
  200. package/dist/hooks/built-in/dangerous-tool.d.ts +32 -0
  201. package/dist/hooks/built-in/dangerous-tool.js +80 -0
  202. package/dist/hooks/built-in/index.d.ts +14 -0
  203. package/dist/hooks/built-in/index.js +20 -0
  204. package/dist/hooks/index.d.ts +3 -0
  205. package/dist/hooks/index.js +6 -0
  206. package/dist/hooks/loader.d.ts +17 -0
  207. package/dist/hooks/loader.js +142 -0
  208. package/dist/hooks/registry.d.ts +62 -0
  209. package/dist/hooks/registry.js +127 -0
  210. package/dist/integrations/web-search.js +6 -3
  211. package/dist/memory/index.d.ts +1 -0
  212. package/dist/memory/index.js +2 -0
  213. package/dist/memory/memory-service.js +14 -13
  214. package/dist/memory/observational.d.ts +62 -0
  215. package/dist/memory/observational.js +396 -0
  216. package/dist/middleware/content-filter.d.ts +22 -0
  217. package/dist/middleware/content-filter.js +69 -0
  218. package/dist/middleware/request-validator.d.ts +159 -0
  219. package/dist/middleware/request-validator.js +93 -0
  220. package/dist/plugins/sdk.d.ts +22 -0
  221. package/dist/plugins/sdk.js +17 -1
  222. package/dist/projects/types.d.ts +10 -10
  223. package/dist/providers/ai-sdk.d.ts +11 -0
  224. package/dist/providers/ai-sdk.js +78 -19
  225. package/dist/providers/core/models.js +67 -1
  226. package/dist/providers/core/types.d.ts +3 -0
  227. package/dist/providers/index.d.ts +1 -0
  228. package/dist/providers/index.js +1 -0
  229. package/dist/providers/smart-router.d.ts +118 -0
  230. package/dist/providers/smart-router.js +685 -0
  231. package/dist/providers/types.d.ts +16 -16
  232. package/dist/routes/agents.js +50 -0
  233. package/dist/routes/auth.js +8 -1
  234. package/dist/routes/chat.js +259 -14
  235. package/dist/routes/costs.js +32 -0
  236. package/dist/routes/cron.js +80 -5
  237. package/dist/routes/feeds.d.ts +10 -0
  238. package/dist/routes/feeds.js +168 -0
  239. package/dist/routes/mcp.js +21 -0
  240. package/dist/routes/memory.js +130 -0
  241. package/dist/routes/skills.js +129 -0
  242. package/dist/routes/teams.d.ts +9 -0
  243. package/dist/routes/teams.js +210 -0
  244. package/dist/routes/tools.js +14 -0
  245. package/dist/routes/users.js +2 -0
  246. package/dist/server/route-loader.js +3 -1
  247. package/dist/server/stream-bridge.d.ts +19 -0
  248. package/dist/server/stream-bridge.js +38 -0
  249. package/dist/server.js +310 -36
  250. package/dist/skills/marketplace.d.ts +87 -0
  251. package/dist/skills/marketplace.js +268 -0
  252. package/dist/storage/index.d.ts +14 -0
  253. package/dist/storage/index.js +64 -3
  254. package/dist/storage/schema.d.ts +4 -4
  255. package/dist/storage/schema.js +1 -1
  256. package/dist/teams/index.d.ts +110 -0
  257. package/dist/teams/index.js +365 -0
  258. package/dist/tickets/types.d.ts +39 -39
  259. package/dist/types/summary.d.ts +5 -5
  260. package/dist/utils/auto-update.d.ts +23 -0
  261. package/dist/utils/auto-update.js +157 -0
  262. package/dist/utils/offline-detect.d.ts +55 -0
  263. package/dist/utils/offline-detect.js +121 -0
  264. package/dist/utils/pid-file.d.ts +36 -0
  265. package/dist/utils/pid-file.js +125 -0
  266. package/dist/utils/prevent-sleep.d.ts +27 -0
  267. package/dist/utils/prevent-sleep.js +95 -0
  268. package/dist/utils/sanitizer.d.ts +57 -0
  269. package/dist/utils/sanitizer.js +174 -0
  270. package/docker-compose.yml +13 -137
  271. package/package.json +31 -6
  272. package/skills/deploy-cloudflare/SKILL.md +62 -0
  273. package/skills/deploy-vercel/SKILL.md +67 -0
  274. package/skills/docker-deploy/SKILL.md +158 -0
  275. package/skills/full-stack-builder/SKILL.md +92 -0
  276. package/skills/humanizer/SKILL.md +488 -0
  277. package/skills/profclaw-assistant/SKILL.md +85 -56
  278. package/ui/dist/assets/ActivityView-Da6HQ8ws.js +1 -0
  279. package/ui/dist/assets/AgentList-H58R0kX3.js +1 -0
  280. package/ui/dist/assets/AnalyticsDashboard-B28AeRsc.js +1 -0
  281. package/ui/dist/assets/AreaChart-DwLzeAQ8.js +1 -0
  282. package/ui/dist/assets/CartesianChart-piKQsTAR.js +36 -0
  283. package/ui/dist/assets/ChatView-Dbj8rxU5.js +10 -0
  284. package/ui/dist/assets/CostsDashboard-C6F5df0F.js +1 -0
  285. package/ui/dist/assets/EstimateSelect-wga0rUKX.js +1 -0
  286. package/ui/dist/assets/FeedDashboard-Ef6FEzEf.js +1 -0
  287. package/ui/dist/assets/FloatingChatbot-0yhkUeCq.js +2 -0
  288. package/ui/dist/assets/InviteCodeManagement-tUXfx4Bc.js +2 -0
  289. package/ui/dist/assets/KaTeX_AMS-Regular-BQhdFMY1.woff2 +0 -0
  290. package/ui/dist/assets/KaTeX_AMS-Regular-DMm9YOAa.woff +0 -0
  291. package/ui/dist/assets/KaTeX_AMS-Regular-DRggAlZN.ttf +0 -0
  292. package/ui/dist/assets/KaTeX_Caligraphic-Bold-ATXxdsX0.ttf +0 -0
  293. package/ui/dist/assets/KaTeX_Caligraphic-Bold-BEiXGLvX.woff +0 -0
  294. package/ui/dist/assets/KaTeX_Caligraphic-Bold-Dq_IR9rO.woff2 +0 -0
  295. package/ui/dist/assets/KaTeX_Caligraphic-Regular-CTRA-rTL.woff +0 -0
  296. package/ui/dist/assets/KaTeX_Caligraphic-Regular-Di6jR-x-.woff2 +0 -0
  297. package/ui/dist/assets/KaTeX_Caligraphic-Regular-wX97UBjC.ttf +0 -0
  298. package/ui/dist/assets/KaTeX_Fraktur-Bold-BdnERNNW.ttf +0 -0
  299. package/ui/dist/assets/KaTeX_Fraktur-Bold-BsDP51OF.woff +0 -0
  300. package/ui/dist/assets/KaTeX_Fraktur-Bold-CL6g_b3V.woff2 +0 -0
  301. package/ui/dist/assets/KaTeX_Fraktur-Regular-CB_wures.ttf +0 -0
  302. package/ui/dist/assets/KaTeX_Fraktur-Regular-CTYiF6lA.woff2 +0 -0
  303. package/ui/dist/assets/KaTeX_Fraktur-Regular-Dxdc4cR9.woff +0 -0
  304. package/ui/dist/assets/KaTeX_Main-Bold-Cx986IdX.woff2 +0 -0
  305. package/ui/dist/assets/KaTeX_Main-Bold-Jm3AIy58.woff +0 -0
  306. package/ui/dist/assets/KaTeX_Main-Bold-waoOVXN0.ttf +0 -0
  307. package/ui/dist/assets/KaTeX_Main-BoldItalic-DxDJ3AOS.woff2 +0 -0
  308. package/ui/dist/assets/KaTeX_Main-BoldItalic-DzxPMmG6.ttf +0 -0
  309. package/ui/dist/assets/KaTeX_Main-BoldItalic-SpSLRI95.woff +0 -0
  310. package/ui/dist/assets/KaTeX_Main-Italic-3WenGoN9.ttf +0 -0
  311. package/ui/dist/assets/KaTeX_Main-Italic-BMLOBm91.woff +0 -0
  312. package/ui/dist/assets/KaTeX_Main-Italic-NWA7e6Wa.woff2 +0 -0
  313. package/ui/dist/assets/KaTeX_Main-Regular-B22Nviop.woff2 +0 -0
  314. package/ui/dist/assets/KaTeX_Main-Regular-Dr94JaBh.woff +0 -0
  315. package/ui/dist/assets/KaTeX_Main-Regular-ypZvNtVU.ttf +0 -0
  316. package/ui/dist/assets/KaTeX_Math-BoldItalic-B3XSjfu4.ttf +0 -0
  317. package/ui/dist/assets/KaTeX_Math-BoldItalic-CZnvNsCZ.woff2 +0 -0
  318. package/ui/dist/assets/KaTeX_Math-BoldItalic-iY-2wyZ7.woff +0 -0
  319. package/ui/dist/assets/KaTeX_Math-Italic-DA0__PXp.woff +0 -0
  320. package/ui/dist/assets/KaTeX_Math-Italic-flOr_0UB.ttf +0 -0
  321. package/ui/dist/assets/KaTeX_Math-Italic-t53AETM-.woff2 +0 -0
  322. package/ui/dist/assets/KaTeX_SansSerif-Bold-CFMepnvq.ttf +0 -0
  323. package/ui/dist/assets/KaTeX_SansSerif-Bold-D1sUS0GD.woff2 +0 -0
  324. package/ui/dist/assets/KaTeX_SansSerif-Bold-DbIhKOiC.woff +0 -0
  325. package/ui/dist/assets/KaTeX_SansSerif-Italic-C3H0VqGB.woff2 +0 -0
  326. package/ui/dist/assets/KaTeX_SansSerif-Italic-DN2j7dab.woff +0 -0
  327. package/ui/dist/assets/KaTeX_SansSerif-Italic-YYjJ1zSn.ttf +0 -0
  328. package/ui/dist/assets/KaTeX_SansSerif-Regular-BNo7hRIc.ttf +0 -0
  329. package/ui/dist/assets/KaTeX_SansSerif-Regular-CS6fqUqJ.woff +0 -0
  330. package/ui/dist/assets/KaTeX_SansSerif-Regular-DDBCnlJ7.woff2 +0 -0
  331. package/ui/dist/assets/KaTeX_Script-Regular-C5JkGWo-.ttf +0 -0
  332. package/ui/dist/assets/KaTeX_Script-Regular-D3wIWfF6.woff2 +0 -0
  333. package/ui/dist/assets/KaTeX_Script-Regular-D5yQViql.woff +0 -0
  334. package/ui/dist/assets/KaTeX_Size1-Regular-C195tn64.woff +0 -0
  335. package/ui/dist/assets/KaTeX_Size1-Regular-Dbsnue_I.ttf +0 -0
  336. package/ui/dist/assets/KaTeX_Size1-Regular-mCD8mA8B.woff2 +0 -0
  337. package/ui/dist/assets/KaTeX_Size2-Regular-B7gKUWhC.ttf +0 -0
  338. package/ui/dist/assets/KaTeX_Size2-Regular-Dy4dx90m.woff2 +0 -0
  339. package/ui/dist/assets/KaTeX_Size2-Regular-oD1tc_U0.woff +0 -0
  340. package/ui/dist/assets/KaTeX_Size3-Regular-CTq5MqoE.woff +0 -0
  341. package/ui/dist/assets/KaTeX_Size3-Regular-DgpXs0kz.ttf +0 -0
  342. package/ui/dist/assets/KaTeX_Size4-Regular-BF-4gkZK.woff +0 -0
  343. package/ui/dist/assets/KaTeX_Size4-Regular-DWFBv043.ttf +0 -0
  344. package/ui/dist/assets/KaTeX_Size4-Regular-Dl5lxZxV.woff2 +0 -0
  345. package/ui/dist/assets/KaTeX_Typewriter-Regular-C0xS9mPB.woff +0 -0
  346. package/ui/dist/assets/KaTeX_Typewriter-Regular-CO6r4hn1.woff2 +0 -0
  347. package/ui/dist/assets/KaTeX_Typewriter-Regular-D3Ib7_Hf.ttf +0 -0
  348. package/ui/dist/assets/MarketplacePage-DGrLtolR.js +1 -0
  349. package/ui/dist/assets/{ProjectDetail--gPfvATB.js → ProjectDetail-BgWvA6UP.js} +2 -2
  350. package/ui/dist/assets/ProjectIcon-TDuliqwg.js +1 -0
  351. package/ui/dist/assets/ProjectList-DXgM4187.js +1 -0
  352. package/ui/dist/assets/{Settings-1kaf7VHE.js → Settings-xA8Zhi3p.js} +3 -3
  353. package/ui/dist/assets/StatusIndicator-B8vfFAxg.js +1 -0
  354. package/ui/dist/assets/{SummaryDetail-DV3AmONk.js → SummaryDetail-eedRfTtF.js} +2 -2
  355. package/ui/dist/assets/SummaryList-CLNX2P84.js +1 -0
  356. package/ui/dist/assets/TaskDetail-BtWclNiR.js +1 -0
  357. package/ui/dist/assets/TaskList-JjODAgSc.js +1 -0
  358. package/ui/dist/assets/TeamsPage-CBK5iAyx.js +1 -0
  359. package/ui/dist/assets/TicketBoard-C9aJNNYp.js +1 -0
  360. package/ui/dist/assets/TicketDetail-CV5JmL31.js +1 -0
  361. package/ui/dist/assets/TicketList-68V4lzUz.js +1 -0
  362. package/ui/dist/assets/UserManagement-DKTb6UpE.js +2 -0
  363. package/ui/dist/assets/ViewSwitcher-BvdQht2Y.js +1 -0
  364. package/ui/dist/assets/alert-dialog-O6qBOv_f.js +1 -0
  365. package/ui/dist/assets/{archive-BsLa7brF.js → archive-CX7UvZpf.js} +1 -1
  366. package/ui/dist/assets/badge-BbfnwDJP.js +1 -0
  367. package/ui/dist/assets/{bug-CmZI7jqM.js → bug-3WX0394-.js} +1 -1
  368. package/ui/dist/assets/{calendar-Bf0t2B82.js → calendar-buq77TaS.js} +1 -1
  369. package/ui/dist/assets/{chevron-up-CoUsOvZj.js → chevron-up-4ymsBJRo.js} +1 -1
  370. package/ui/dist/assets/{circle-x-Dgw11LgT.js → circle-x-ByXtwR6Y.js} +1 -1
  371. package/ui/dist/assets/constants-CVdDh7p0.js +1 -0
  372. package/ui/dist/assets/{cpu-DiPMQICV.js → cpu-CiuoCeDY.js} +1 -1
  373. package/ui/dist/assets/{database-BwTfupDi.js → database-BWXSBg5a.js} +1 -1
  374. package/ui/dist/assets/dialog-lDg4NvMV.js +1 -0
  375. package/ui/dist/assets/dollar-sign-Dmijd6DP.js +1 -0
  376. package/ui/dist/assets/{ellipsis-UJx4Xnf6.js → ellipsis-vT-5SVIp.js} +1 -1
  377. package/ui/dist/assets/{ellipsis-vertical-DoULYEKn.js → ellipsis-vertical-B4tAX_bL.js} +1 -1
  378. package/ui/dist/assets/feature-markdown-DBo5Q7uq.js +289 -0
  379. package/ui/dist/assets/{file-code-B2UrJLwi.js → file-code-ChOWdKXf.js} +1 -1
  380. package/ui/dist/assets/{folder-open-BJi577JH.js → folder-open-CkOUbIiP.js} +1 -1
  381. package/ui/dist/assets/{funnel-PkaD_HSR.js → funnel-uZkoSPP-.js} +1 -1
  382. package/ui/dist/assets/{git-branch-C_K30am0.js → git-branch-CwvUxj7C.js} +1 -1
  383. package/ui/dist/assets/{git-commit-horizontal-IT6ecxWQ.js → git-commit-horizontal-lxPzCvhD.js} +1 -1
  384. package/ui/dist/assets/{globe-f-jjCa_g.js → globe-D_WpJdsj.js} +1 -1
  385. package/ui/dist/assets/{hash-DNEv8Elo.js → hash-CA0hJ7vh.js} +1 -1
  386. package/ui/dist/assets/{history-BQSBo_1Q.js → history-CEWMLELs.js} +1 -1
  387. package/ui/dist/assets/inbox-ehtOptTV.js +1 -0
  388. package/ui/dist/assets/{index-nS3EErDg.js → index-C1rhbml4.js} +3 -3
  389. package/ui/dist/assets/index-CR8gfCHv.js +1 -0
  390. package/ui/dist/assets/index-DVXMpWai.js +1 -0
  391. package/ui/dist/assets/index-DaDJMM2v.js +1 -0
  392. package/ui/dist/assets/index-Djdq_0xu.js +1 -0
  393. package/ui/dist/assets/index-M46Gcb8K.css +1 -0
  394. package/ui/dist/assets/index-sEBN7w8J.js +109 -0
  395. package/ui/dist/assets/layers-C6Mhf8Nk.js +1 -0
  396. package/ui/dist/assets/{layout-dashboard-CcKt1hXw.js → layout-dashboard-BRUM0kpT.js} +1 -1
  397. package/ui/dist/assets/{lightbulb-Jhp7FvbU.js → lightbulb-CN2q1O5l.js} +1 -1
  398. package/ui/dist/assets/{link-2-DdO7ostF.js → link-2-CC4E28yJ.js} +1 -1
  399. package/ui/dist/assets/markdown-renderer-C6ENbB0u.js +10 -0
  400. package/ui/dist/assets/markdown-renderer-CfVKi3_s.css +1 -0
  401. package/ui/dist/assets/{message-square-CBgH65X7.js → message-square-Bbb241am.js} +1 -1
  402. package/ui/dist/assets/package-CwT3IzFx.js +1 -0
  403. package/ui/dist/assets/{pencil-CYXCEPQh.js → pencil-CDmiHzoj.js} +1 -1
  404. package/ui/dist/assets/{play-d1ONaH0-.js → play-tjy5jMQX.js} +1 -1
  405. package/ui/dist/assets/popover-CFHZf3pE.js +1 -0
  406. package/ui/dist/assets/progress-BboUHuLf.js +1 -0
  407. package/ui/dist/assets/{rocket-DhvUetsk.js → rocket--8ZHgdXJ.js} +1 -1
  408. package/ui/dist/assets/select-n108rXny.js +1 -0
  409. package/ui/dist/assets/{send-P0r5D7td.js → send-Cu7MR2Qh.js} +1 -1
  410. package/ui/dist/assets/server-DmodxZp-.js +1 -0
  411. package/ui/dist/assets/{settings-2-ocj5uHGx.js → settings-2-CkRNqkxj.js} +1 -1
  412. package/ui/dist/assets/sheet-7aUJkyzU.js +1 -0
  413. package/ui/dist/assets/{shield-check-DfVdE34l.js → shield-check-ViI3nMKE.js} +1 -1
  414. package/ui/dist/assets/{shield-off-8l0J6R-8.js → shield-off-DN3tagkn.js} +1 -1
  415. package/ui/dist/assets/skeleton-C0E1Nfro.js +1 -0
  416. package/ui/dist/assets/{smartphone-77_g3SQn.js → smartphone-5FghiXpA.js} +1 -1
  417. package/ui/dist/assets/{square-Ckzsr3Rn.js → square-DiNSx8K7.js} +1 -1
  418. package/ui/dist/assets/star-DhdFVidS.js +1 -0
  419. package/ui/dist/assets/switch-CIgVbZqQ.js +1 -0
  420. package/ui/dist/assets/table-BC56FVMV.js +1 -0
  421. package/ui/dist/assets/{tag-C35mgoEv.js → tag-CH_vQliw.js} +1 -1
  422. package/ui/dist/assets/textarea-CxDiKFXZ.js +1 -0
  423. package/ui/dist/assets/{timer-DHJBS2w1.js → timer-CdGVTb60.js} +1 -1
  424. package/ui/dist/assets/tooltip-BuW9A5UO.js +1 -0
  425. package/ui/dist/assets/{trash-2-keO5tKPE.js → trash-2-CucZJL0N.js} +1 -1
  426. package/ui/dist/assets/trending-down-BCezC1z2.js +1 -0
  427. package/ui/dist/assets/{trending-up-BBv8KbrY.js → trending-up-C5OYX2k2.js} +1 -1
  428. package/ui/dist/assets/vendor-query-C0p7b53x.js +4 -0
  429. package/ui/dist/assets/vendor-react-Mc5_kfYG.js +12 -0
  430. package/ui/dist/assets/vendor-ui-CXPAUBFv.js +51 -0
  431. package/ui/dist/assets/{wand-sparkles-BusQ52ZK.js → wand-sparkles-BaH6pJnc.js} +1 -1
  432. package/ui/dist/assets/{wrench-02YaOSiK.js → wrench-CjxjP6ok.js} +1 -1
  433. package/ui/dist/index.html +5 -2
  434. package/ui/dist/assets/ActivityView-BeshZXmE.js +0 -1
  435. package/ui/dist/assets/AgentList-QVHeldPi.js +0 -1
  436. package/ui/dist/assets/AnalyticsDashboard-C9R97dXE.js +0 -1
  437. package/ui/dist/assets/AreaChart-B73gaiVQ.js +0 -1
  438. package/ui/dist/assets/CartesianChart-CXYL2R-A.js +0 -36
  439. package/ui/dist/assets/ChatView-qjZErlrp.js +0 -10
  440. package/ui/dist/assets/CostsDashboard-O4DCLy1i.js +0 -1
  441. package/ui/dist/assets/EstimateSelect-1hQf4Osk.js +0 -1
  442. package/ui/dist/assets/FloatingChatbot-BZBzrJxd.js +0 -2
  443. package/ui/dist/assets/InviteCodeManagement-LEoGqYeA.js +0 -2
  444. package/ui/dist/assets/ProjectIcon-Chd_ofsw.js +0 -1
  445. package/ui/dist/assets/ProjectList-BvUfVB6c.js +0 -4
  446. package/ui/dist/assets/StatusIndicator-pRfkNcdV.js +0 -1
  447. package/ui/dist/assets/SummaryList-B6kXiTxL.js +0 -1
  448. package/ui/dist/assets/TaskDetail-CV6CzbOS.js +0 -1
  449. package/ui/dist/assets/TaskList-DL7brQKd.js +0 -1
  450. package/ui/dist/assets/TicketBoard-CrkkFj7C.js +0 -1
  451. package/ui/dist/assets/TicketDetail-hnnYclpD.js +0 -1
  452. package/ui/dist/assets/TicketList-CsDAyQCL.js +0 -1
  453. package/ui/dist/assets/UserManagement-BGFQyTSr.js +0 -2
  454. package/ui/dist/assets/ViewSwitcher-CnL0OqA8.js +0 -1
  455. package/ui/dist/assets/alert-dialog-SKM6Gjz4.js +0 -7
  456. package/ui/dist/assets/badge-CVHH1a-v.js +0 -1
  457. package/ui/dist/assets/brain-6o_RHVpe.js +0 -1
  458. package/ui/dist/assets/constants-Q5Zivl-a.js +0 -1
  459. package/ui/dist/assets/dialog-BUqN9Psj.js +0 -1
  460. package/ui/dist/assets/index-BUmnwPQr.js +0 -1
  461. package/ui/dist/assets/index-BfF5G4Cw.js +0 -1
  462. package/ui/dist/assets/index-C8N375c2.js +0 -1
  463. package/ui/dist/assets/index-CuxnqVVz.css +0 -1
  464. package/ui/dist/assets/index-CzMM3QOk.js +0 -1
  465. package/ui/dist/assets/index-lJlNPFVJ.js +0 -67
  466. package/ui/dist/assets/layers-jFqVrWMD.js +0 -1
  467. package/ui/dist/assets/markdown-renderer-n1ToC4XQ.js +0 -36
  468. package/ui/dist/assets/popover-CrmZgoWu.js +0 -1
  469. package/ui/dist/assets/progress-uv4SPkL5.js +0 -1
  470. package/ui/dist/assets/select-CeQ8AHGy.js +0 -1
  471. package/ui/dist/assets/server-CVHTZB72.js +0 -1
  472. package/ui/dist/assets/sheet-DuQExSho.js +0 -1
  473. package/ui/dist/assets/skeleton-TFiFJ3nB.js +0 -1
  474. package/ui/dist/assets/switch-CAePkd6k.js +0 -1
  475. package/ui/dist/assets/table-ZjAZ7hkt.js +0 -1
  476. package/ui/dist/assets/textarea-DsVPnSgR.js +0 -1
  477. package/ui/dist/assets/tooltip-BYmQ331W.js +0 -1
@@ -0,0 +1 @@
1
+ import{j as s}from"./vendor-react-Mc5_kfYG.js";import{h as l}from"./index-sEBN7w8J.js";function u({status:e,label:a,size:r="md",pulse:n=!0,showLabel:t=!0,className:d}){const o={online:{color:"bg-green-500",shadow:"shadow-[0_0_10px_oklch(0.6_0.2_150)]",defaultLabel:"Online"},processing:{color:"bg-blue-500",shadow:"shadow-[0_0_10px_oklch(0.6_0.2_250)]",defaultLabel:"Processing"},error:{color:"bg-red-500",shadow:"shadow-[0_0_10px_oklch(0.6_0.2_20)]",defaultLabel:"Error"},offline:{color:"bg-slate-400",shadow:"shadow-none",defaultLabel:"Offline"}}[e],c={sm:"h-1.5 w-1.5",md:"h-2 w-2",lg:"h-3 w-3"};return s.jsxs("div",{className:l("flex items-center gap-2",d),children:[s.jsx("div",{className:l(c[r],"rounded-full",o.color,o.shadow,n&&e!=="offline"&&"animate-pulse")}),t&&s.jsx("span",{className:l("text-[10px] font-bold uppercase tracking-widest",e==="offline"?"text-muted-foreground":"text-foreground/80"),children:a||o.defaultLabel})]})}export{u as S};
@@ -1,4 +1,4 @@
1
- import{E as k,r as $,u as L,j as e,h as o,k as u,G as S,l as j,O as T,Q as B,b as r,f as l,B as F,g as I,d as i,e as n,U as N,J as A,t as D,i as f,m as E}from"./index-lJlNPFVJ.js";import{B as d}from"./badge-CVHH1a-v.js";import{S as x}from"./skeleton-TFiFJ3nB.js";import{F as g}from"./file-code-B2UrJLwi.js";import{C as b}from"./cpu-DiPMQICV.js";import{L as W}from"./link-2-DdO7ostF.js";import{L as w}from"./lightbulb-Jhp7FvbU.js";function G(){const{id:c}=k(),[m,h]=$.useState(!1),{data:s,isLoading:y,error:v}=L({queryKey:["summaries",c],queryFn:()=>E.summaries.get(c),enabled:!!c}),C=async()=>{if(!s)return;const t=`# ${s.title}
1
+ import{l as k,r as $,j as e,L as o}from"./vendor-react-Mc5_kfYG.js";import{b as L}from"./vendor-query-C0p7b53x.js";import{i as j,r as S,j as u,x as T,y as B,b as r,f as l,B as F,g as I,d as i,e as n,z as N,E as A,t as D,h as f,k as E}from"./index-sEBN7w8J.js";import{B as d}from"./badge-BbfnwDJP.js";import{S as x}from"./skeleton-C0E1Nfro.js";import{F as g}from"./file-code-ChOWdKXf.js";import{C as b}from"./cpu-CiuoCeDY.js";import{L as W}from"./link-2-CC4E28yJ.js";import{L as w}from"./lightbulb-CN2q1O5l.js";import"./vendor-ui-CXPAUBFv.js";function J(){const{id:c}=k(),[m,h]=$.useState(!1),{data:s,isLoading:y,error:v}=L({queryKey:["summaries",c],queryFn:()=>E.summaries.get(c),enabled:!!c}),C=async()=>{if(!s)return;const t=`# ${s.title}
2
2
 
3
3
  ## What Changed
4
4
  ${s.whatChanged}
@@ -24,4 +24,4 @@ ${s.blockers.map(a=>typeof a=="string"?`- ${a}`:`- ${a.description}`).join(`
24
24
  ---
25
25
  Agent: ${s.agent}${s.model?` | Model: ${s.model}`:""}
26
26
  Created: ${new Date(s.createdAt).toLocaleString()}
27
- `;await navigator.clipboard.writeText(t),h(!0),D.success("Summary copied to clipboard"),setTimeout(()=>h(!1),2e3)};return y?e.jsxs("div",{className:"max-w-5xl mx-auto space-y-6",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(x,{className:"h-8 w-8 rounded-full skeleton-glass"}),e.jsx(x,{className:"h-4 w-32 skeleton-glass"})]}),e.jsx(x,{className:"h-48 rounded-[24px] skeleton-glass"}),e.jsxs("div",{className:"grid gap-6 md:grid-cols-2",children:[e.jsx(x,{className:"h-64 rounded-[24px] skeleton-glass"}),e.jsx(x,{className:"h-64 rounded-[24px] skeleton-glass"})]})]}):v||!s?e.jsxs("div",{className:"max-w-5xl mx-auto glass rounded-[24px] p-20 text-center",children:[e.jsx(g,{className:"h-16 w-16 mx-auto text-red-500 mb-4 opacity-20"}),e.jsx("h3",{className:"text-xl font-bold",children:"Summary Not Found"}),e.jsx("p",{className:"text-muted-foreground mb-6",children:"The summary you're looking for doesn't exist."}),e.jsx(o,{to:"/summaries",children:e.jsx(u,{variant:"outline",className:"rounded-xl px-6",children:"Back to Summaries"})})]}):e.jsxs("div",{className:"max-w-5xl mx-auto space-y-6",children:[e.jsxs("nav",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(o,{to:"/summaries",className:"p-2 hover:bg-white/5 rounded-full transition-colors group",children:e.jsx(S,{className:"h-4 w-4 group-hover:-translate-x-1 transition-transform"})}),e.jsxs("div",{className:"flex items-center gap-1.5 text-xs font-semibold uppercase tracking-widest text-muted-foreground",children:[e.jsx(o,{to:"/summaries",className:"hover:text-foreground transition-colors",children:"Summaries"}),e.jsx(j,{className:"h-3 w-3"}),e.jsx("span",{className:"text-foreground truncate max-w-[200px]",children:s.title})]})]}),e.jsxs(u,{variant:"outline",size:"sm",onClick:C,className:"rounded-xl glass border-white/5 hover:bg-white/5",children:[m?e.jsx(T,{className:"h-4 w-4 mr-2 text-green-400"}):e.jsx(B,{className:"h-4 w-4 mr-2"}),m?"Copied!":"Copy"]})]}),e.jsxs(r,{className:"glass rounded-[32px] overflow-hidden border-white/5 relative",children:[e.jsx("div",{className:"absolute -top-24 -right-24 w-64 h-64 rounded-full blur-[100px] opacity-10 bg-indigo-500"}),e.jsxs(l,{className:"p-8",children:[e.jsx("div",{className:"flex items-start justify-between mb-6",children:e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex items-center gap-3 mb-2",children:[e.jsxs(d,{className:"bg-indigo-500/10 text-indigo-400 border-indigo-500/20",children:[e.jsx(F,{className:"h-3 w-3 mr-1"}),s.agent]}),s.model&&e.jsxs(d,{variant:"outline",className:"border-white/10",children:[e.jsx(b,{className:"h-3 w-3 mr-1"}),s.model]})]}),e.jsx("h1",{className:"text-3xl font-extrabold tracking-tight leading-tight",children:s.title})]})}),e.jsxs("div",{className:"flex flex-wrap gap-4 pt-6 border-t border-white/5",children:[e.jsx(p,{icon:I,label:"Created",value:new Date(s.createdAt).toLocaleString()}),s.taskId&&e.jsx(o,{to:`/tasks/${s.taskId}`,className:"hover:opacity-80 transition-opacity",children:e.jsx(p,{icon:W,label:"Task",value:`#${s.taskId.split("-")[0]}`,isLink:!0})}),e.jsx(p,{icon:g,label:"Files",value:`${s.filesChanged.length} changed`})]})]})]}),e.jsxs(r,{className:"glass rounded-[28px] border-white/5",children:[e.jsx(i,{className:"border-b border-white/5 bg-white/[0.02]",children:e.jsxs(n,{className:"flex items-center gap-3 text-lg font-bold",children:[e.jsx("div",{className:"h-8 w-8 rounded-xl bg-blue-500/10 flex items-center justify-center",children:e.jsx(g,{className:"h-4 w-4 text-blue-400"})}),"What Changed"]})}),e.jsx(l,{className:"p-6",children:e.jsx("p",{className:"text-muted-foreground leading-relaxed whitespace-pre-wrap",children:s.whatChanged})})]}),e.jsxs("div",{className:"grid gap-6 md:grid-cols-2",children:[s.whyChanged&&e.jsxs(r,{className:"glass rounded-[28px] border-white/5",children:[e.jsx(i,{className:"border-b border-white/5 bg-white/[0.02]",children:e.jsxs(n,{className:"flex items-center gap-3 text-lg font-bold",children:[e.jsx("div",{className:"h-8 w-8 rounded-xl bg-amber-500/10 flex items-center justify-center",children:e.jsx(w,{className:"h-4 w-4 text-amber-400"})}),"Why Changed"]})}),e.jsx(l,{className:"p-6",children:e.jsx("p",{className:"text-muted-foreground leading-relaxed whitespace-pre-wrap",children:s.whyChanged})})]}),s.howChanged&&e.jsxs(r,{className:"glass rounded-[28px] border-white/5",children:[e.jsx(i,{className:"border-b border-white/5 bg-white/[0.02]",children:e.jsxs(n,{className:"flex items-center gap-3 text-lg font-bold",children:[e.jsx("div",{className:"h-8 w-8 rounded-xl bg-green-500/10 flex items-center justify-center",children:e.jsx(b,{className:"h-4 w-4 text-green-400"})}),"How Changed"]})}),e.jsx(l,{className:"p-6",children:e.jsx("p",{className:"text-muted-foreground leading-relaxed whitespace-pre-wrap",children:s.howChanged})})]})]}),s.filesChanged.length>0&&e.jsxs(r,{className:"glass rounded-[28px] border-white/5",children:[e.jsx(i,{className:"border-b border-white/5 bg-white/[0.02]",children:e.jsxs(n,{className:"flex items-center gap-3 text-lg font-bold",children:[e.jsx("div",{className:"h-8 w-8 rounded-xl bg-cyan-500/10 flex items-center justify-center",children:e.jsx(g,{className:"h-4 w-4 text-cyan-400"})}),"Files Changed",e.jsx(d,{variant:"secondary",className:"ml-auto",children:s.filesChanged.length})]})}),e.jsx(l,{className:"p-6",children:e.jsx("div",{className:"flex flex-wrap gap-2",children:s.filesChanged.map((t,a)=>e.jsx(d,{variant:"outline",className:"font-mono text-xs px-3 py-1.5 bg-white/[0.02] border-white/10 hover:bg-white/5 transition-colors",children:typeof t=="string"?t:t.path},a))})})]}),e.jsxs("div",{className:"grid gap-6 md:grid-cols-2",children:[s.decisions.length>0&&e.jsxs(r,{className:"glass rounded-[28px] border-white/5",children:[e.jsx(i,{className:"border-b border-white/5 bg-white/[0.02]",children:e.jsxs(n,{className:"flex items-center gap-3 text-lg font-bold",children:[e.jsx("div",{className:"h-8 w-8 rounded-xl bg-indigo-500/10 flex items-center justify-center",children:e.jsx(w,{className:"h-4 w-4 text-indigo-400"})}),"Key Decisions",e.jsx(d,{variant:"secondary",className:"ml-auto",children:s.decisions.length})]})}),e.jsx(l,{className:"p-6",children:e.jsx("ul",{className:"space-y-3",children:s.decisions.map((t,a)=>e.jsxs("li",{className:"flex items-start gap-3",children:[e.jsx("div",{className:"h-5 w-5 rounded-full bg-indigo-500/10 flex items-center justify-center flex-shrink-0 mt-0.5",children:e.jsx("span",{className:"text-[10px] font-bold text-indigo-400",children:a+1})}),e.jsx("span",{className:"text-muted-foreground text-sm leading-relaxed",children:typeof t=="string"?t:t.description})]},a))})})]}),s.blockers.length>0&&e.jsxs(r,{className:"glass rounded-[28px] border-white/5 border-red-500/10",children:[e.jsx(i,{className:"border-b border-white/5 bg-red-500/[0.02]",children:e.jsxs(n,{className:"flex items-center gap-3 text-lg font-bold",children:[e.jsx("div",{className:"h-8 w-8 rounded-xl bg-red-500/10 flex items-center justify-center",children:e.jsx(N,{className:"h-4 w-4 text-red-400"})}),e.jsx("span",{className:"text-red-400",children:"Blockers"}),e.jsx(d,{className:"ml-auto bg-red-500/10 text-red-400 border-red-500/20",children:s.blockers.length})]})}),e.jsx(l,{className:"p-6",children:e.jsx("ul",{className:"space-y-3",children:s.blockers.map((t,a)=>e.jsxs("li",{className:"flex items-start gap-3",children:[e.jsx(N,{className:"h-4 w-4 text-red-400 flex-shrink-0 mt-0.5"}),e.jsx("span",{className:"text-red-300 text-sm leading-relaxed",children:typeof t=="string"?t:t.description})]},a))})})]})]}),s.taskId&&e.jsx(r,{className:"glass rounded-[20px] border-white/5 hover-lift transition-liquid",children:e.jsx(o,{to:`/tasks/${s.taskId}`,className:"block p-4",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"h-10 w-10 rounded-xl bg-blue-500/10 flex items-center justify-center",children:e.jsx(A,{className:"h-5 w-5 text-blue-400"})}),e.jsxs("div",{children:[e.jsx("p",{className:"text-xs font-bold uppercase tracking-widest text-muted-foreground",children:"Related Task"}),e.jsxs("p",{className:"font-semibold",children:["View Task #",s.taskId.split("-")[0]]})]})]}),e.jsx(j,{className:"h-5 w-5 text-muted-foreground"})]})})})]})}function p({icon:c,label:m,value:h,isLink:s}){return e.jsxs("div",{className:"flex items-center gap-2 group/meta",children:[e.jsx("div",{className:"h-8 w-8 rounded-lg glass-heavy flex items-center justify-center border-white/5",children:e.jsx(c,{className:f("h-3.5 w-3.5 text-muted-foreground",s&&"group-hover/meta:text-blue-400 transition-colors")})}),e.jsxs("div",{className:"flex flex-col",children:[e.jsx("span",{className:"premium-label",children:m}),e.jsx("span",{className:f("text-[11px] font-bold truncate max-w-[120px]",s&&"text-blue-400"),children:h})]})]})}export{G as SummaryDetail};
27
+ `;await navigator.clipboard.writeText(t),h(!0),D.success("Summary copied to clipboard"),setTimeout(()=>h(!1),2e3)};return y?e.jsxs("div",{className:"max-w-5xl mx-auto space-y-6",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(x,{className:"h-8 w-8 rounded-full skeleton-glass"}),e.jsx(x,{className:"h-4 w-32 skeleton-glass"})]}),e.jsx(x,{className:"h-48 rounded-[24px] skeleton-glass"}),e.jsxs("div",{className:"grid gap-6 md:grid-cols-2",children:[e.jsx(x,{className:"h-64 rounded-[24px] skeleton-glass"}),e.jsx(x,{className:"h-64 rounded-[24px] skeleton-glass"})]})]}):v||!s?e.jsxs("div",{className:"max-w-5xl mx-auto glass rounded-[24px] p-20 text-center",children:[e.jsx(g,{className:"h-16 w-16 mx-auto text-red-500 mb-4 opacity-20"}),e.jsx("h3",{className:"text-xl font-bold",children:"Summary Not Found"}),e.jsx("p",{className:"text-muted-foreground mb-6",children:"The summary you're looking for doesn't exist."}),e.jsx(o,{to:"/summaries",children:e.jsx(j,{variant:"outline",className:"rounded-xl px-6",children:"Back to Summaries"})})]}):e.jsxs("div",{className:"max-w-5xl mx-auto space-y-6",children:[e.jsxs("nav",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(o,{to:"/summaries",className:"p-2 hover:bg-white/5 rounded-full transition-colors group",children:e.jsx(S,{className:"h-4 w-4 group-hover:-translate-x-1 transition-transform"})}),e.jsxs("div",{className:"flex items-center gap-1.5 text-xs font-semibold uppercase tracking-widest text-muted-foreground",children:[e.jsx(o,{to:"/summaries",className:"hover:text-foreground transition-colors",children:"Summaries"}),e.jsx(u,{className:"h-3 w-3"}),e.jsx("span",{className:"text-foreground truncate max-w-[200px]",children:s.title})]})]}),e.jsxs(j,{variant:"outline",size:"sm",onClick:C,className:"rounded-xl glass border-white/5 hover:bg-white/5",children:[m?e.jsx(T,{className:"h-4 w-4 mr-2 text-green-400"}):e.jsx(B,{className:"h-4 w-4 mr-2"}),m?"Copied!":"Copy"]})]}),e.jsxs(r,{className:"glass rounded-[32px] overflow-hidden border-white/5 relative",children:[e.jsx("div",{className:"absolute -top-24 -right-24 w-64 h-64 rounded-full blur-[100px] opacity-10 bg-indigo-500"}),e.jsxs(l,{className:"p-8",children:[e.jsx("div",{className:"flex items-start justify-between mb-6",children:e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex items-center gap-3 mb-2",children:[e.jsxs(d,{className:"bg-indigo-500/10 text-indigo-400 border-indigo-500/20",children:[e.jsx(F,{className:"h-3 w-3 mr-1"}),s.agent]}),s.model&&e.jsxs(d,{variant:"outline",className:"border-white/10",children:[e.jsx(b,{className:"h-3 w-3 mr-1"}),s.model]})]}),e.jsx("h1",{className:"text-3xl font-extrabold tracking-tight leading-tight",children:s.title})]})}),e.jsxs("div",{className:"flex flex-wrap gap-4 pt-6 border-t border-white/5",children:[e.jsx(p,{icon:I,label:"Created",value:new Date(s.createdAt).toLocaleString()}),s.taskId&&e.jsx(o,{to:`/tasks/${s.taskId}`,className:"hover:opacity-80 transition-opacity",children:e.jsx(p,{icon:W,label:"Task",value:`#${s.taskId.split("-")[0]}`,isLink:!0})}),e.jsx(p,{icon:g,label:"Files",value:`${s.filesChanged.length} changed`})]})]})]}),e.jsxs(r,{className:"glass rounded-[28px] border-white/5",children:[e.jsx(i,{className:"border-b border-white/5 bg-white/[0.02]",children:e.jsxs(n,{className:"flex items-center gap-3 text-lg font-bold",children:[e.jsx("div",{className:"h-8 w-8 rounded-xl bg-blue-500/10 flex items-center justify-center",children:e.jsx(g,{className:"h-4 w-4 text-blue-400"})}),"What Changed"]})}),e.jsx(l,{className:"p-6",children:e.jsx("p",{className:"text-muted-foreground leading-relaxed whitespace-pre-wrap",children:s.whatChanged})})]}),e.jsxs("div",{className:"grid gap-6 md:grid-cols-2",children:[s.whyChanged&&e.jsxs(r,{className:"glass rounded-[28px] border-white/5",children:[e.jsx(i,{className:"border-b border-white/5 bg-white/[0.02]",children:e.jsxs(n,{className:"flex items-center gap-3 text-lg font-bold",children:[e.jsx("div",{className:"h-8 w-8 rounded-xl bg-amber-500/10 flex items-center justify-center",children:e.jsx(w,{className:"h-4 w-4 text-amber-400"})}),"Why Changed"]})}),e.jsx(l,{className:"p-6",children:e.jsx("p",{className:"text-muted-foreground leading-relaxed whitespace-pre-wrap",children:s.whyChanged})})]}),s.howChanged&&e.jsxs(r,{className:"glass rounded-[28px] border-white/5",children:[e.jsx(i,{className:"border-b border-white/5 bg-white/[0.02]",children:e.jsxs(n,{className:"flex items-center gap-3 text-lg font-bold",children:[e.jsx("div",{className:"h-8 w-8 rounded-xl bg-green-500/10 flex items-center justify-center",children:e.jsx(b,{className:"h-4 w-4 text-green-400"})}),"How Changed"]})}),e.jsx(l,{className:"p-6",children:e.jsx("p",{className:"text-muted-foreground leading-relaxed whitespace-pre-wrap",children:s.howChanged})})]})]}),s.filesChanged.length>0&&e.jsxs(r,{className:"glass rounded-[28px] border-white/5",children:[e.jsx(i,{className:"border-b border-white/5 bg-white/[0.02]",children:e.jsxs(n,{className:"flex items-center gap-3 text-lg font-bold",children:[e.jsx("div",{className:"h-8 w-8 rounded-xl bg-cyan-500/10 flex items-center justify-center",children:e.jsx(g,{className:"h-4 w-4 text-cyan-400"})}),"Files Changed",e.jsx(d,{variant:"secondary",className:"ml-auto",children:s.filesChanged.length})]})}),e.jsx(l,{className:"p-6",children:e.jsx("div",{className:"flex flex-wrap gap-2",children:s.filesChanged.map((t,a)=>e.jsx(d,{variant:"outline",className:"font-mono text-xs px-3 py-1.5 bg-white/[0.02] border-white/10 hover:bg-white/5 transition-colors",children:typeof t=="string"?t:t.path},a))})})]}),e.jsxs("div",{className:"grid gap-6 md:grid-cols-2",children:[s.decisions.length>0&&e.jsxs(r,{className:"glass rounded-[28px] border-white/5",children:[e.jsx(i,{className:"border-b border-white/5 bg-white/[0.02]",children:e.jsxs(n,{className:"flex items-center gap-3 text-lg font-bold",children:[e.jsx("div",{className:"h-8 w-8 rounded-xl bg-indigo-500/10 flex items-center justify-center",children:e.jsx(w,{className:"h-4 w-4 text-indigo-400"})}),"Key Decisions",e.jsx(d,{variant:"secondary",className:"ml-auto",children:s.decisions.length})]})}),e.jsx(l,{className:"p-6",children:e.jsx("ul",{className:"space-y-3",children:s.decisions.map((t,a)=>e.jsxs("li",{className:"flex items-start gap-3",children:[e.jsx("div",{className:"h-5 w-5 rounded-full bg-indigo-500/10 flex items-center justify-center flex-shrink-0 mt-0.5",children:e.jsx("span",{className:"text-[10px] font-bold text-indigo-400",children:a+1})}),e.jsx("span",{className:"text-muted-foreground text-sm leading-relaxed",children:typeof t=="string"?t:t.description})]},a))})})]}),s.blockers.length>0&&e.jsxs(r,{className:"glass rounded-[28px] border-white/5 border-red-500/10",children:[e.jsx(i,{className:"border-b border-white/5 bg-red-500/[0.02]",children:e.jsxs(n,{className:"flex items-center gap-3 text-lg font-bold",children:[e.jsx("div",{className:"h-8 w-8 rounded-xl bg-red-500/10 flex items-center justify-center",children:e.jsx(N,{className:"h-4 w-4 text-red-400"})}),e.jsx("span",{className:"text-red-400",children:"Blockers"}),e.jsx(d,{className:"ml-auto bg-red-500/10 text-red-400 border-red-500/20",children:s.blockers.length})]})}),e.jsx(l,{className:"p-6",children:e.jsx("ul",{className:"space-y-3",children:s.blockers.map((t,a)=>e.jsxs("li",{className:"flex items-start gap-3",children:[e.jsx(N,{className:"h-4 w-4 text-red-400 flex-shrink-0 mt-0.5"}),e.jsx("span",{className:"text-red-300 text-sm leading-relaxed",children:typeof t=="string"?t:t.description})]},a))})})]})]}),s.taskId&&e.jsx(r,{className:"glass rounded-[20px] border-white/5 hover-lift transition-liquid",children:e.jsx(o,{to:`/tasks/${s.taskId}`,className:"block p-4",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"h-10 w-10 rounded-xl bg-blue-500/10 flex items-center justify-center",children:e.jsx(A,{className:"h-5 w-5 text-blue-400"})}),e.jsxs("div",{children:[e.jsx("p",{className:"text-xs font-bold uppercase tracking-widest text-muted-foreground",children:"Related Task"}),e.jsxs("p",{className:"font-semibold",children:["View Task #",s.taskId.split("-")[0]]})]})]}),e.jsx(u,{className:"h-5 w-5 text-muted-foreground"})]})})})]})}function p({icon:c,label:m,value:h,isLink:s}){return e.jsxs("div",{className:"flex items-center gap-2 group/meta",children:[e.jsx("div",{className:"h-8 w-8 rounded-lg glass-heavy flex items-center justify-center border-white/5",children:e.jsx(c,{className:f("h-3.5 w-3.5 text-muted-foreground",s&&"group-hover/meta:text-blue-400 transition-colors")})}),e.jsxs("div",{className:"flex flex-col",children:[e.jsx("span",{className:"premium-label",children:m}),e.jsx("span",{className:f("text-[11px] font-bold truncate max-w-[120px]",s&&"text-blue-400"),children:h})]})]})}export{J as SummaryDetail};
@@ -0,0 +1 @@
1
+ import{r as m,j as e,L as f}from"./vendor-react-Mc5_kfYG.js";import{b as N}from"./vendor-query-C0p7b53x.js";import{b as l,f as i,d as v,e as w,n as b,I as C,L as S,w as x,B as L,j as k,k as A}from"./index-sEBN7w8J.js";import{B as r}from"./badge-BbfnwDJP.js";import{S as F,a as y,b as B,c as I,d as h}from"./select-n108rXny.js";import{C as q}from"./cpu-CiuoCeDY.js";import"./vendor-ui-CXPAUBFv.js";import"./chevron-up-4ymsBJRo.js";function $(){const[t,u]=m.useState("all"),[a,j]=m.useState(""),{data:g,isLoading:p,error:n}=N({queryKey:["summaries",{agent:t==="all"?void 0:t,limit:50}],queryFn:()=>A.summaries.list({agent:t==="all"?void 0:t,limit:50})}),c=g?.summaries??[],d=Array.from(new Set(c.map(s=>s.agent))),o=c.filter(s=>a?s.title.toLowerCase().includes(a.toLowerCase())||s.whatChanged.toLowerCase().includes(a.toLowerCase()):!0);return n?e.jsx(l,{children:e.jsx(i,{className:"p-6",children:e.jsxs("p",{className:"text-center text-destructive",children:["Error loading summaries: ",n.message]})})}):e.jsx("div",{className:"space-y-4",children:e.jsxs(l,{children:[e.jsx(v,{children:e.jsx(w,{children:"AI Summaries"})}),e.jsxs(i,{children:[e.jsxs("div",{className:"mb-4 flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between",children:[e.jsxs("div",{className:"relative flex-1",children:[e.jsx(b,{className:"absolute left-2 top-2.5 h-4 w-4 text-muted-foreground"}),e.jsx(C,{placeholder:"Search summaries...",value:a,onChange:s=>j(s.target.value),className:"pl-8"})]}),d.length>0&&e.jsxs(F,{value:t,onValueChange:u,children:[e.jsx(y,{className:"w-[180px]",children:e.jsx(B,{placeholder:"Filter by agent"})}),e.jsxs(I,{children:[e.jsx(h,{value:"all",children:"All Agents"}),d.map(s=>e.jsx(h,{value:s,children:s},s))]})]})]}),p?e.jsx("div",{className:"flex h-40 items-center justify-center",children:e.jsx(S,{className:"h-8 w-8 animate-spin text-muted-foreground"})}):o.length===0?e.jsxs("div",{className:"flex h-40 flex-col items-center justify-center",children:[e.jsx(x,{className:"h-12 w-12 text-muted-foreground mb-2"}),e.jsx("p",{className:"text-muted-foreground",children:"No summaries found"})]}):e.jsx("div",{className:"space-y-3",children:o.map(s=>e.jsx(f,{to:`/summaries/${s.id}`,className:"block",children:e.jsx(l,{className:"glass rounded-[16px] hover-lift transition-liquid group border-white/5",children:e.jsx(i,{className:"p-4",children:e.jsxs("div",{className:"flex items-start justify-between",children:[e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[e.jsx("h3",{className:"font-semibold truncate group-hover:text-primary transition-colors",children:s.title}),e.jsxs(r,{className:"bg-indigo-500/10 text-indigo-400 border-indigo-500/20",children:[e.jsx(L,{className:"h-3 w-3 mr-1"}),s.agent]}),s.model&&e.jsxs(r,{variant:"outline",className:"text-xs border-white/10",children:[e.jsx(q,{className:"h-3 w-3 mr-1"}),s.model]})]}),e.jsx("p",{className:"text-sm text-muted-foreground line-clamp-2",children:s.whatChanged}),e.jsxs("div",{className:"flex items-center gap-2 mt-3",children:[s.filesChanged?.length>0&&e.jsxs(r,{variant:"outline",className:"text-[10px] border-white/10",children:[e.jsx(x,{className:"h-3 w-3 mr-1"}),s.filesChanged.length," files"]}),s.blockers?.length>0&&e.jsxs(r,{className:"text-[10px] bg-red-500/10 text-red-400 border-red-500/20",children:[s.blockers.length," blockers"]})]})]}),e.jsxs("div",{className:"flex items-center gap-2 ml-4",children:[e.jsx("span",{className:"text-xs text-muted-foreground whitespace-nowrap",children:new Date(s.createdAt).toLocaleDateString()}),e.jsx(k,{className:"h-4 w-4 text-muted-foreground group-hover:translate-x-1 transition-transform"})]})]})})})},s.id))})]})]})})}export{$ as SummaryList};
@@ -0,0 +1 @@
1
+ import{l as b,u as w,j as e,L as m}from"./vendor-react-Mc5_kfYG.js";import{b as k,u as y,c as g}from"./vendor-query-C0p7b53x.js";import{S as T}from"./StatusIndicator-B8vfFAxg.js";import{t as o,k as f,i as c,r as _,j as A,h as N,L as x,s as S,E as C,u as P,v as L}from"./index-sEBN7w8J.js";import{H as j}from"./hash-CA0hJ7vh.js";import{S as D}from"./square-DiNSx8K7.js";import{P as F}from"./play-tjy5jMQX.js";import{C as q}from"./calendar-buq77TaS.js";import{H as E}from"./history-CEWMLELs.js";import"./vendor-ui-CXPAUBFv.js";const I="http://localhost:3000";function M(t){return k({queryKey:["tasks",t],queryFn:async()=>{const a=await fetch(`${I}/api/tasks/${t}`);if(!a.ok)throw new Error("Task not found");return(await a.json()).task},enabled:!!t})}function G(){const{id:t}=b(),a=w(),r=y(),{data:s,isLoading:n,error:v}=M(t||""),d=g({mutationFn:()=>f.tasks.cancel(t),onSuccess:()=>{o.success("Task cancelled"),r.invalidateQueries({queryKey:["tasks"]})},onError:l=>{o.error(l.message||"Failed to cancel task")}}),i=g({mutationFn:()=>f.tasks.retry(t),onSuccess:l=>{o.success("Task queued for retry"),r.invalidateQueries({queryKey:["tasks"]}),a(`/tasks/${l.task.id}`)},onError:l=>{o.error(l.message||"Failed to retry task")}});return n?e.jsxs("div",{className:"max-w-5xl mx-auto space-y-6",children:[e.jsx("div",{className:"h-8 w-32 glass animate-pulse rounded-lg"}),e.jsx("div",{className:"h-64 glass animate-pulse rounded-[24px]"})]}):v||!s?e.jsxs("div",{className:"max-w-5xl mx-auto glass rounded-[24px] p-20 text-center",children:[e.jsx(j,{className:"h-16 w-16 mx-auto text-red-500 mb-4 opacity-20"}),e.jsx("h3",{className:"text-xl font-bold",children:"Task Not Found"}),e.jsx("p",{className:"text-muted-foreground mb-6",children:"The task you're looking for doesn't exist or has been archived."}),e.jsx(m,{to:"/tasks",children:e.jsx(c,{variant:"outline",className:"rounded-xl px-6",children:"Back to Tasks"})})]}):e.jsxs("div",{className:"max-w-6xl mx-auto flex flex-col gap-8",children:[e.jsxs("nav",{className:"flex items-center gap-2",children:[e.jsx(m,{to:"/tasks",className:"p-2 hover:bg-white/5 rounded-full transition-colors group",children:e.jsx(_,{className:"h-4 w-4 group-hover:-translate-x-1 transition-transform"})}),e.jsxs("div",{className:"flex items-center gap-1.5 text-xs font-semibold uppercase tracking-widest text-muted-foreground",children:[e.jsx(m,{to:"/tasks",className:"hover:text-foreground transition-colors",children:"Tasks"}),e.jsx(A,{className:"h-3 w-3"}),e.jsx("span",{className:"text-foreground truncate max-w-[200px]",children:s.title})]})]}),e.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-8 items-start",children:[e.jsxs("div",{className:"lg:col-span-2 space-y-8",children:[e.jsxs("div",{className:"glass rounded-[32px] p-8 relative overflow-hidden",children:[e.jsx("div",{className:N("absolute -top-24 -right-24 w-64 h-64 rounded-full blur-[100px] opacity-10",s.status==="completed"?"bg-green-500":s.status==="failed"?"bg-red-500":"bg-blue-500")}),e.jsxs("div",{className:"flex items-start justify-between mb-6",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsxs("div",{className:"flex items-center gap-3 mb-2",children:[e.jsx(T,{status:s.status==="completed"?"online":s.status==="failed"?"error":s.status==="in_progress"?"processing":"offline",label:s.status,size:"md"}),e.jsxs("span",{className:"text-xs font-mono text-muted-foreground opacity-50",children:["#",s.id.split("-")[0]]})]}),e.jsx("h1",{className:"text-3xl font-extrabold tracking-tight leading-tight",children:s.title})]}),e.jsxs("div",{className:"flex gap-2",children:[(s.status==="failed"||s.status==="completed")&&e.jsx(c,{variant:"outline",size:"icon",onClick:()=>i.mutate(),disabled:i.isPending,title:"Retry task",children:i.isPending?e.jsx(x,{className:"h-4 w-4 animate-spin"}):e.jsx(S,{className:"h-4 w-4"})}),(s.status==="in_progress"||s.status==="pending")&&e.jsxs(c,{variant:"destructive",onClick:()=>d.mutate(),disabled:d.isPending,children:[d.isPending?e.jsx(x,{className:"mr-2 h-4 w-4 animate-spin"}):e.jsx(D,{className:"mr-2 h-4 w-4 fill-current"}),"Cancel"]}),(s.status==="failed"||s.status==="completed")&&e.jsxs(c,{onClick:()=>i.mutate(),disabled:i.isPending,children:[i.isPending?e.jsx(x,{className:"mr-2 h-4 w-4 animate-spin"}):e.jsx(F,{className:"mr-2 h-4 w-4 fill-current"}),"Run Again"]})]})]}),e.jsx("p",{className:"text-muted-foreground leading-relaxed mb-6",children:s.description||"No description provided for this task."}),e.jsxs("div",{className:"flex flex-wrap gap-4 pt-6 border-t border-white/5",children:[e.jsx(u,{label:"Source",value:s.source,icon:C,...s.sourceUrl?{href:s.sourceUrl}:{}}),e.jsx(u,{label:"Priority",value:`P${s.priority}`,icon:j}),e.jsx(u,{label:"Created",value:new Date(s.createdAt).toLocaleDateString(),icon:q})]})]}),e.jsxs("div",{className:"glass rounded-[24px] overflow-hidden shadow-inner",children:[e.jsxs("div",{className:"flex items-center gap-3 px-6 py-4 bg-primary/5",children:[e.jsx("div",{className:"h-8 w-8 rounded-lg glass-heavy flex items-center justify-center shadow-sm",children:e.jsx(P,{className:"h-4 w-4 text-primary"})}),e.jsx("h3",{className:"text-sm font-black uppercase tracking-[0.2em] text-foreground/80",children:"Instruction Prompt"})]}),e.jsx("div",{className:"p-6 recessed-card font-mono text-xs leading-relaxed text-foreground/80 overflow-x-auto whitespace-pre-wrap selection:bg-primary/20",children:s.prompt})]})]}),e.jsxs("div",{className:"space-y-8",children:[e.jsxs("div",{className:"glass rounded-[28px] p-6",children:[e.jsxs("div",{className:"flex items-center gap-3 mb-6",children:[e.jsx(E,{className:"h-4 w-4 text-indigo-400"}),e.jsx("h3",{className:"text-sm font-bold uppercase tracking-widest",children:"Task Timeline"})]}),e.jsxs("div",{className:"relative pl-6 space-y-8 before:absolute before:left-[11px] before:top-2 before:bottom-2 before:w-[2px] before:bg-white/5",children:[e.jsx(p,{title:"Task Created",time:new Date(s.createdAt).toLocaleTimeString(),status:"completed"}),s.startedAt&&e.jsx(p,{title:"Optimization Started",time:new Date(s.startedAt).toLocaleTimeString(),status:"completed"}),e.jsx(p,{title:s.status==="pending"?"Queued":s.status==="in_progress"?"In Progress":s.status==="completed"?"Success":"Failed",time:s.completedAt?new Date(s.completedAt).toLocaleTimeString():"Current Step",status:s.status==="completed"?"completed":s.status==="failed"?"error":"processing"})]})]}),e.jsxs("div",{className:"glass rounded-[28px] p-6",children:[e.jsxs("div",{className:"flex items-center gap-3 mb-6",children:[e.jsx(L,{className:"h-4 w-4 text-emerald-400"}),e.jsx("h3",{className:"text-sm font-bold uppercase tracking-widest",children:"Work Metrics"})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsx(h,{label:"Status",value:s.status.toUpperCase()}),e.jsx(h,{label:"Duration",value:s.completedAt?`${((new Date(s.completedAt).getTime()-new Date(s.startedAt||s.createdAt).getTime())/1e3).toFixed(1)}s`:"--"}),e.jsx(h,{label:"Assigned Agent",value:s.assignedAgent??"Unassigned"})]})]})]})]})]})}function u({label:t,value:a,icon:r,href:s}){const n=e.jsxs("div",{className:"flex items-center gap-2 group/meta cursor-default",children:[e.jsx("div",{className:"h-8 w-8 rounded-lg glass-heavy flex items-center justify-center border-white/5",children:e.jsx(r,{className:"h-3.5 w-3.5 text-muted-foreground group-hover/meta:text-[var(--primary)] transition-colors"})}),e.jsxs("div",{className:"flex flex-col",children:[e.jsx("span",{className:"premium-label",children:t}),e.jsx("span",{className:"text-[11px] font-bold truncate max-w-[120px]",children:a})]})]});return s?e.jsx("a",{href:s,target:"_blank",rel:"noopener noreferrer",className:"hover:opacity-80 transition-opacity",children:n}):n}function p({title:t,time:a,status:r}){return e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:N("absolute -left-[23px] top-1.5 h-3.5 w-3.5 rounded-full border-2 border-background z-10",r==="completed"?"bg-green-500 shadow-[0_0_8px_oklch(0.6_0.2_150)]":r==="error"?"bg-red-500 shadow-[0_0_8px_oklch(0.6_0.2_20)]":"bg-blue-500 shadow-[0_0_8px_oklch(0.6_0.2_250)] animate-pulse")}),e.jsxs("div",{className:"flex flex-col",children:[e.jsx("span",{className:"text-[13px] font-bold",children:t}),e.jsx("span",{className:"text-[10px] text-muted-foreground font-medium",children:a})]})]})}function h({label:t,value:a}){return e.jsxs("div",{className:"flex items-center justify-between py-2 border-b border-white/5 last:border-0",children:[e.jsx("span",{className:"text-[11px] font-medium text-muted-foreground",children:t}),e.jsx("span",{className:"text-[11px] font-extrabold uppercase tracking-tight",children:a})]})}export{G as TaskDetail};
@@ -0,0 +1 @@
1
+ import{r as d,j as e,e as K,u as J}from"./vendor-react-Mc5_kfYG.js";import{u as X,c as W,b as Y}from"./vendor-query-C0p7b53x.js";import{t as D,k as Q,i as p,P as Z,l as S,I as R,m as M,n as ee,a as O,g as q,C as U,X as se,L as ae,D as te,o as re,p as le,q as ie}from"./index-sEBN7w8J.js";import{B as _}from"./badge-BbfnwDJP.js";import{S as T,a as P,b as k,c as A,d as i}from"./select-n108rXny.js";import{T as ne,a as oe,b as B,c as N,d as ce,e as b}from"./table-BC56FVMV.js";import{D as de,a as xe,b as me,c as ue,d as he,e as ge,f as pe}from"./dialog-lDg4NvMV.js";import{T as H}from"./textarea-CxDiKFXZ.js";import{P as E}from"./play-tjy5jMQX.js";import{F as je}from"./funnel-uZkoSPP-.js";import{E as fe}from"./ellipsis-vT-5SVIp.js";import"./vendor-ui-CXPAUBFv.js";import"./chevron-up-4ymsBJRo.js";function Ne(){const[m,j]=d.useState(!1),[f,r]=d.useState(""),[n,l]=d.useState(""),[t,v]=d.useState(""),[o,u]=d.useState("manual"),[c,h]=d.useState("3"),F=X(),{mutate:w,isPending:C}=W({mutationFn:a=>Q.tasks.create(a),onSuccess:()=>{D.success("Task created successfully!"),F.invalidateQueries({queryKey:["tasks"]}),j(!1),r(""),l(""),v(""),u("manual"),h("3")},onError:a=>{D.error(`Failed to create task: ${a.message}`)}}),L=a=>{if(a.preventDefault(),!f.trim()){D.error("Title is required");return}if(!t.trim()){D.error("Prompt is required");return}w({title:f,description:n||void 0,prompt:t,source:o,priority:parseInt(c),labels:[]})};return e.jsxs(de,{open:m,onOpenChange:j,children:[e.jsx(xe,{asChild:!0,children:e.jsxs(p,{children:[e.jsx(Z,{className:"mr-2 h-4 w-4"}),"Create Task"]})}),e.jsx(me,{className:"sm:max-w-[525px] glass rounded-[24px] border-white/10",children:e.jsxs("form",{onSubmit:L,children:[e.jsxs(ue,{children:[e.jsx(he,{className:"text-xl font-bold",children:"Create New Task"}),e.jsx(ge,{className:"text-muted-foreground",children:"Create a new task for the AI agents to execute"})]}),e.jsxs("div",{className:"grid gap-4 py-4",children:[e.jsxs("div",{className:"grid gap-2",children:[e.jsx(S,{htmlFor:"title",className:"text-sm font-semibold",children:"Title *"}),e.jsx(R,{id:"title",value:f,onChange:a=>r(a.target.value),placeholder:"Fix bug in authentication",className:"bg-white/5 border-white/10 rounded-xl"})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(S,{htmlFor:"description",className:"text-sm font-semibold",children:"Description"}),e.jsx(H,{id:"description",value:n,onChange:a=>l(a.target.value),placeholder:"Optional description...",rows:3,className:"bg-white/5 border-white/10 rounded-xl resize-none"})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(S,{htmlFor:"prompt",className:"text-sm font-semibold",children:"AI Prompt *"}),e.jsx(H,{id:"prompt",value:t,onChange:a=>v(a.target.value),placeholder:"Detailed instructions for the AI agent...",rows:4,className:"bg-white/5 border-white/10 rounded-xl resize-none"})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsxs("div",{className:"grid gap-2",children:[e.jsx(S,{htmlFor:"source",className:"text-sm font-semibold",children:"Source"}),e.jsxs(T,{value:o,onValueChange:u,children:[e.jsx(P,{id:"source",className:"bg-white/5 border-white/10 rounded-xl",children:e.jsx(k,{})}),e.jsxs(A,{className:"glass-heavy rounded-xl border-white/10",children:[e.jsx(i,{value:"manual",children:"Manual"}),e.jsx(i,{value:"github_issue",children:"GitHub Issue"}),e.jsx(i,{value:"jira",children:"Jira"}),e.jsx(i,{value:"linear",children:"Linear"})]})]})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(S,{htmlFor:"priority",className:"text-sm font-semibold",children:"Priority"}),e.jsxs(T,{value:c,onValueChange:h,children:[e.jsx(P,{id:"priority",className:"bg-white/5 border-white/10 rounded-xl",children:e.jsx(k,{})}),e.jsxs(A,{className:"glass-heavy rounded-xl border-white/10",children:[e.jsx(i,{value:"1",children:"Critical (P1)"}),e.jsx(i,{value:"2",children:"High (P2)"}),e.jsx(i,{value:"3",children:"Medium (P3)"}),e.jsx(i,{value:"4",children:"Low (P4)"})]})]})]})]})]}),e.jsxs(pe,{className:"gap-2",children:[e.jsx(p,{type:"button",variant:"outline",onClick:()=>j(!1),children:"Cancel"}),e.jsx(p,{type:"submit",disabled:C,children:C?"Creating...":"Create Task"})]})]})})]})}const be=[{value:"all",label:"All Status",icon:O},{value:"pending",label:"Pending",icon:q},{value:"in_progress",label:"Running",icon:E},{value:"completed",label:"Completed",icon:U},{value:"failed",label:"Failed",icon:M}],ve=["all","github","jira","linear","manual","webhook"],we=["all","openclaw","claude-code","auto"];function Oe(){const[m,j]=K(),f=J(),r=m.get("status")||"all",n=m.get("source")||"all",l=m.get("agent")||"all",[t,v]=d.useState(m.get("q")||""),[o,u]=d.useState(0),c=20,h=(s,x)=>{const g=new URLSearchParams(m);x==="all"||x===""?g.delete(s):g.set(s,x),j(g),u(0)},F=()=>{j({}),v(""),u(0)},w=r!=="all"||n!=="all"||l!=="all"||t,{data:C,isLoading:L,error:a}=Y({queryKey:["tasks",{status:r==="all"?void 0:r,limit:c,offset:o*c}],queryFn:()=>Q.tasks.list({status:r==="all"?void 0:r,limit:c,offset:o*c})}),V=C?.tasks??[],z=C?.total??0,y=d.useMemo(()=>V.filter(s=>{const x=!t||s.title.toLowerCase().includes(t.toLowerCase())||s.description?.toLowerCase().includes(t.toLowerCase()),g=n==="all"||s.source.toLowerCase()===n,I=l==="all"||s.assignedAgent?.toLowerCase()===l||l==="auto"&&!s.assignedAgent;return x&&g&&I}),[V,t,n,l]),$=s=>{const g={completed:{variant:"success",icon:U},failed:{variant:"destructive",icon:M},running:{variant:"info",icon:E},pending:{variant:"secondary",icon:q},in_progress:{variant:"info",icon:E}}[s]||{variant:"secondary",icon:q},{variant:I,icon:G}=g;return e.jsxs(_,{variant:I,className:"gap-1.5 px-2 py-0.5 font-medium",children:[e.jsx(G,{className:"h-3 w-3"}),e.jsx("span",{className:"capitalize",children:s.replace("_"," ")})]})};return a?e.jsxs("div",{className:"glass rounded-[28px] p-12 text-center",children:[e.jsx(M,{className:"h-12 w-12 mx-auto text-red-400 mb-4"}),e.jsx("p",{className:"text-lg font-bold text-red-400",children:"Error loading tasks"}),e.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:a.message})]}):e.jsxs("div",{className:"space-y-6",children:[e.jsxs("header",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-2xl font-bold tracking-tight",children:"Tasks"}),e.jsxs("p",{className:"text-muted-foreground text-sm",children:[z," total tasks • ",y.length," showing"]})]}),e.jsx(Ne,{})]}),e.jsxs("div",{className:"glass rounded-[20px] p-4",children:[e.jsxs("div",{className:"flex flex-col gap-4 lg:flex-row lg:items-center",children:[e.jsxs("div",{className:"relative flex-1",children:[e.jsx(ee,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"}),e.jsx(R,{placeholder:"Search tasks...",value:t,onChange:s=>{v(s.target.value),h("q",s.target.value)},className:"pl-10 bg-white/5 border-white/10 rounded-xl h-10"})]}),e.jsxs("div",{className:"flex flex-wrap gap-2",children:[e.jsxs(T,{value:r,onValueChange:s=>h("status",s),children:[e.jsx(P,{className:"w-[140px] bg-white/5 border-white/10 rounded-xl",children:e.jsx(k,{placeholder:"Status"})}),e.jsx(A,{className:"glass-heavy rounded-xl border-white/10",children:be.map(s=>e.jsx(i,{value:s.value,children:e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsx(s.icon,{className:"h-3.5 w-3.5"}),s.label]})},s.value))})]}),e.jsxs(T,{value:n,onValueChange:s=>h("source",s),children:[e.jsx(P,{className:"w-[130px] bg-white/5 border-white/10 rounded-xl",children:e.jsx(k,{placeholder:"Source"})}),e.jsx(A,{className:"glass-heavy rounded-xl border-white/10",children:ve.map(s=>e.jsx(i,{value:s,className:"capitalize",children:s==="all"?"All Sources":s},s))})]}),e.jsxs(T,{value:l,onValueChange:s=>h("agent",s),children:[e.jsx(P,{className:"w-[140px] bg-white/5 border-white/10 rounded-xl",children:e.jsx(k,{placeholder:"Agent"})}),e.jsx(A,{className:"glass-heavy rounded-xl border-white/10",children:we.map(s=>e.jsx(i,{value:s,className:"capitalize",children:s==="all"?"All Agents":s},s))})]}),w&&e.jsxs(p,{variant:"ghost",size:"sm",onClick:F,className:"rounded-xl text-muted-foreground hover:text-foreground",children:[e.jsx(se,{className:"h-4 w-4 mr-1"}),"Clear"]})]})]}),w&&e.jsxs("div",{className:"flex flex-wrap gap-2 mt-3 pt-3 border-t border-white/5",children:[e.jsx(je,{className:"h-4 w-4 text-muted-foreground"}),r!=="all"&&e.jsxs("span",{className:"px-2 py-0.5 rounded-lg bg-blue-500/10 text-blue-400 text-xs font-medium",children:["Status: ",r]}),n!=="all"&&e.jsxs("span",{className:"px-2 py-0.5 rounded-lg bg-indigo-500/10 text-indigo-400 text-xs font-medium capitalize",children:["Source: ",n]}),l!=="all"&&e.jsxs("span",{className:"px-2 py-0.5 rounded-lg bg-green-500/10 text-green-400 text-xs font-medium capitalize",children:["Agent: ",l]}),t&&e.jsxs("span",{className:"px-2 py-0.5 rounded-lg bg-orange-500/10 text-orange-400 text-xs font-medium",children:['Search: "',t,'"']})]})]}),e.jsx("div",{className:"glass-heavy rounded-[24px] overflow-hidden border border-white/10 shadow-float",children:L?e.jsx("div",{className:"flex items-center justify-center p-12",children:e.jsx(ae,{className:"h-8 w-8 animate-spin text-muted-foreground"})}):y.length===0?e.jsxs("div",{className:"p-12 text-center",children:[e.jsx(O,{className:"h-12 w-12 mx-auto text-muted-foreground/40 mb-4"}),e.jsx("p",{className:"text-lg font-bold text-muted-foreground",children:"No tasks found"}),e.jsx("p",{className:"text-sm text-muted-foreground/60 mt-1",children:w?"Try adjusting your filters":"Create a task to get started"})]}):e.jsxs(ne,{children:[e.jsx(oe,{className:"bg-muted/30",children:e.jsxs(B,{className:"hover:bg-transparent border-white/5",children:[e.jsx(N,{className:"w-[400px]",children:"Task"}),e.jsx(N,{className:"w-[140px]",children:"Status"}),e.jsx(N,{children:"Agent"}),e.jsx(N,{children:"Source"}),e.jsx(N,{className:"text-right",children:"Created"}),e.jsx(N,{className:"w-[50px]"})]})}),e.jsx(ce,{children:y.map(s=>e.jsxs(B,{className:"group cursor-pointer hover:bg-white/5 border-white/5",onClick:()=>f(`/tasks/${s.id}`),children:[e.jsx(b,{className:"font-medium",children:e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"p-2 rounded-lg bg-primary/10 text-primary",children:e.jsx(O,{className:"h-4 w-4"})}),e.jsxs("div",{className:"min-w-0",children:[e.jsx("div",{className:"truncate font-semibold text-foreground group-hover:text-primary transition-colors",children:s.title}),s.description&&e.jsx("div",{className:"text-xs text-muted-foreground truncate max-w-[300px]",children:s.description})]})]})}),e.jsx(b,{children:$(s.status)}),e.jsx(b,{children:s.assignedAgent?e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"h-6 w-6 rounded-full bg-gradient-to-br from-indigo-500 to-purple-500 flex items-center justify-center text-[10px] uppercase text-white font-bold",children:s.assignedAgent[0]}),e.jsx("span",{className:"text-sm capitalize",children:s.assignedAgent})]}):e.jsx("span",{className:"text-sm text-muted-foreground italic",children:"Unassigned"})}),e.jsx(b,{children:e.jsx(_,{variant:"outline",className:"capitalize bg-muted/50",children:s.source})}),e.jsx(b,{className:"text-right text-muted-foreground text-sm font-mono",children:new Date(s.createdAt).toLocaleDateString()}),e.jsx(b,{onClick:x=>x.stopPropagation(),children:e.jsxs(te,{children:[e.jsx(re,{asChild:!0,children:e.jsx(p,{variant:"ghost",size:"icon",className:"h-8 w-8 opacity-0 group-hover:opacity-100 transition-opacity",children:e.jsx(fe,{className:"h-4 w-4"})})}),e.jsx(le,{align:"end",children:e.jsx(ie,{onClick:()=>f(`/tasks/${s.id}`),children:"View Details"})})]})})]},s.id))})]})}),y.length>0&&e.jsxs("div",{className:"flex items-center justify-between border-t border-white/10 pt-4",children:[e.jsxs("p",{className:"text-sm text-muted-foreground",children:["Page ",o+1," • Showing ",Math.min(y.length,c)," of ",z]}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx(p,{variant:"outline",size:"sm",onClick:()=>u(o-1),disabled:o===0,className:"rounded-xl border-white/10",children:"Previous"}),e.jsx(p,{variant:"outline",size:"sm",onClick:()=>u(o+1),disabled:(o+1)*c>=z,className:"rounded-xl border-white/10",children:"Next"})]})]})]})}export{Oe as TaskList};
@@ -0,0 +1 @@
1
+ import{r as o,j as e}from"./vendor-react-Mc5_kfYG.js";import{u as L,b as N,c as S}from"./vendor-query-C0p7b53x.js";import{c as E,k as x,a5 as f,b as F,d as q,e as U,P as w,af as I,f as P,l as C,I as v,i as D,L as u,Z as $,Y as R,j as T,aZ as K,ag as Q}from"./index-sEBN7w8J.js";import{B as k}from"./badge-BbfnwDJP.js";import{D as Z}from"./dollar-sign-Dmijd6DP.js";import"./vendor-ui-CXPAUBFv.js";const _=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["line",{x1:"19",x2:"19",y1:"8",y2:"14",key:"1bvyxn"}],["line",{x1:"22",x2:"16",y1:"11",y2:"11",key:"1shjgl"}]],B=E("user-plus",_);function H({percent:s}){const a=s>=90?"bg-red-500":s>=70?"bg-amber-500":"bg-emerald-500";return e.jsxs("div",{className:"space-y-1",children:[e.jsxs("div",{className:"flex justify-between text-xs text-muted-foreground",children:[e.jsx("span",{children:"Budget used"}),e.jsxs("span",{className:s>=90?"text-red-500 font-semibold":s>=70?"text-amber-500 font-semibold":"",children:[s.toFixed(1),"%"]})]}),e.jsx("div",{className:"h-2 w-full rounded-full bg-muted overflow-hidden",children:e.jsx("div",{className:`h-full rounded-full transition-all ${a}`,style:{width:`${Math.min(s,100)}%`}})})]})}function z({team:s}){const[a,h]=o.useState(!1),[i,d]=o.useState(""),[m,j]=o.useState("member"),g=L(),{data:c,isLoading:r}=N({queryKey:["teams",s.id,"members"],queryFn:()=>x.teams.members(s.id),enabled:a}),{data:n,isLoading:b}=N({queryKey:["teams",s.id,"usage"],queryFn:()=>x.teams.usage(s.id),enabled:a}),p=S({mutationFn:()=>x.teams.invite(s.id,i,m,"owner"),onSuccess:()=>{g.invalidateQueries({queryKey:["teams",s.id]}),d("")}}),y=c?.members??[],l=n?.usage??null,M=l?l.budgetUsedPercent:(s.monthlyBudgetUsd>0,0);return e.jsxs(F,{className:"transition-shadow hover:shadow-md",children:[e.jsx(q,{className:"cursor-pointer select-none pb-3",onClick:()=>h(!a),children:e.jsxs("div",{className:"flex items-start justify-between gap-3",children:[e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[e.jsx(U,{className:"text-base",children:s.name}),s.smartRoutingEnabled&&e.jsxs(k,{variant:"outline",className:"gap-1 text-xs text-violet-600 border-violet-200 bg-violet-50 dark:bg-violet-950/20 dark:border-violet-800 dark:text-violet-400",children:[e.jsx($,{className:"h-3 w-3"}),"Smart Routing"]})]}),e.jsxs(I,{className:"mt-1",children:[s.memberCount," member",s.memberCount!==1?"s":""," - @",s.slug]})]}),e.jsxs("div",{className:"flex items-center gap-2 shrink-0",children:[e.jsx("div",{className:"text-right",children:e.jsxs("div",{className:"text-sm font-medium flex items-center gap-1 justify-end",children:[e.jsx(Z,{className:"h-3.5 w-3.5 text-muted-foreground"}),s.monthlyBudgetUsd>0?`${s.monthlyBudgetUsd}/mo`:"No budget"]})}),a?e.jsx(R,{className:"h-4 w-4 text-muted-foreground"}):e.jsx(T,{className:"h-4 w-4 text-muted-foreground"})]})]})}),a&&e.jsxs(P,{className:"space-y-4 border-t border-border/50 pt-4",children:[(b||l)&&e.jsx("div",{children:b?e.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[e.jsx(u,{className:"h-3 w-3 animate-spin"}),"Loading usage..."]}):l?e.jsxs("div",{className:"space-y-2",children:[e.jsx(H,{percent:M}),e.jsxs("div",{className:"flex items-center justify-between text-xs text-muted-foreground",children:[e.jsxs("span",{children:["$",l.totalSpentUsd.toFixed(2)," spent"]}),e.jsxs("span",{children:["$",l.budgetUsd.toFixed(2)," budget"]})]})]}):null}),e.jsxs("div",{children:[e.jsxs("div",{className:"text-sm font-medium mb-2 flex items-center gap-2",children:[e.jsx(f,{className:"h-4 w-4"}),"Members",r&&e.jsx(u,{className:"h-3 w-3 animate-spin"})]}),y.length===0&&!r?e.jsx("p",{className:"text-xs text-muted-foreground",children:"No members yet"}):e.jsx("div",{className:"space-y-1.5",children:y.map(t=>e.jsxs("div",{className:"flex items-center gap-2 rounded-md p-2 bg-muted/30 text-sm",children:[e.jsx("div",{className:"h-6 w-6 rounded-full bg-muted flex items-center justify-center shrink-0",children:t.role==="owner"?e.jsx(K,{className:"h-3 w-3 text-amber-500"}):e.jsx(Q,{className:"h-3 w-3 text-muted-foreground"})}),e.jsx("span",{className:"flex-1 truncate font-mono text-xs",children:t.userId}),e.jsx(k,{variant:"outline",className:"text-xs",children:t.role}),e.jsxs("span",{className:"text-xs text-muted-foreground tabular-nums",children:["$",t.totalSpentUsd.toFixed(2)]})]},t.userId))})]}),e.jsxs("div",{className:"space-y-2 pt-2 border-t border-border/30",children:[e.jsxs("div",{className:"text-sm font-medium flex items-center gap-2",children:[e.jsx(B,{className:"h-4 w-4"}),"Invite Member"]}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx(v,{placeholder:"email@example.com",value:i,onChange:t=>d(t.target.value),className:"text-sm h-8"}),e.jsxs("select",{value:m,onChange:t=>j(t.target.value),className:"h-8 rounded-md border border-input bg-background px-2 text-sm text-foreground focus:outline-none focus:ring-1 focus:ring-ring",children:[e.jsx("option",{value:"member",children:"Member"}),e.jsx("option",{value:"admin",children:"Admin"}),e.jsx("option",{value:"viewer",children:"Viewer"})]}),e.jsx(D,{size:"sm",onClick:()=>p.mutate(),disabled:!i.trim()||p.isPending,className:"h-8 shrink-0",children:p.isPending?e.jsx(u,{className:"h-3 w-3 animate-spin"}):e.jsx(B,{className:"h-3 w-3"})})]})]})]})]})}function J(){const s=L(),[a,h]=o.useState(""),[i,d]=o.useState(""),m="owner",{data:j,isLoading:g}=N({queryKey:["teams","list"],queryFn:()=>x.teams.list(m)}),c=S({mutationFn:()=>x.teams.create({name:a,ownerId:m,monthlyBudget:i?parseFloat(i):void 0}),onSuccess:()=>{s.invalidateQueries({queryKey:["teams"]}),h(""),d("")}}),r=j?.teams??[];return e.jsxs("div",{className:"space-y-6 p-6",children:[e.jsx("div",{className:"flex items-center justify-between",children:e.jsxs("div",{children:[e.jsxs("h1",{className:"text-2xl font-bold flex items-center gap-2",children:[e.jsx(f,{className:"h-6 w-6"}),"Teams"]}),e.jsx("p",{className:"text-muted-foreground mt-1",children:g?"Loading...":`${r.length} team${r.length!==1?"s":""}`})]})}),e.jsxs(F,{children:[e.jsxs(q,{className:"pb-3",children:[e.jsxs(U,{className:"flex items-center gap-2 text-base",children:[e.jsx(w,{className:"h-4 w-4"}),"Create Team"]}),e.jsx(I,{children:"Set up a new team with optional monthly budget"})]}),e.jsx(P,{children:e.jsxs("div",{className:"flex flex-col sm:flex-row gap-3",children:[e.jsxs("div",{className:"flex-1 space-y-1.5",children:[e.jsx(C,{htmlFor:"team-name",children:"Team Name"}),e.jsx(v,{id:"team-name",placeholder:"Engineering",value:a,onChange:n=>h(n.target.value)})]}),e.jsxs("div",{className:"sm:w-48 space-y-1.5",children:[e.jsx(C,{htmlFor:"team-budget",children:"Monthly Budget (USD)"}),e.jsx(v,{id:"team-budget",type:"number",min:"0",step:"0.01",placeholder:"100.00",value:i,onChange:n=>d(n.target.value)})]}),e.jsx("div",{className:"flex items-end",children:e.jsxs(D,{onClick:()=>c.mutate(),disabled:!a.trim()||c.isPending,className:"gap-2 w-full sm:w-auto",children:[c.isPending?e.jsx(u,{className:"h-4 w-4 animate-spin"}):e.jsx(w,{className:"h-4 w-4"}),"Create"]})})]})})]}),g?e.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground py-8 justify-center",children:[e.jsx(u,{className:"h-5 w-5 animate-spin"}),"Loading teams..."]}):r.length===0?e.jsxs("div",{className:"text-center py-12 text-muted-foreground",children:[e.jsx(f,{className:"h-10 w-10 mx-auto mb-3 opacity-30"}),e.jsx("p",{className:"text-sm",children:"No teams yet."}),e.jsx("p",{className:"text-xs mt-1",children:"Create your first team above."})]}):e.jsx("div",{className:"space-y-3",children:r.map(n=>e.jsx(z,{team:n},n.id))})]})}export{J as TeamsPage};
@@ -0,0 +1 @@
1
+ import{r as m,j as e,L as O,u as R,e as _}from"./vendor-react-Mc5_kfYG.js";import{u as $,b as I,c as z}from"./vendor-query-C0p7b53x.js";import{d as U,a as V}from"./element-adapter-DL0DQilL.js";import{c as G,S,C as k,h as p,B as W,k as N,Q as Y,m as H,D as J,o as X,i as E,Y as Z,p as ee,q as w,ah as B,n as se,I as re,L as P,P as ae}from"./index-sEBN7w8J.js";import{a as L,B as te}from"./bug-3WX0394-.js";import{C,I as oe}from"./inbox-ehtOptTV.js";import{L as ne}from"./layers-C6Mhf8Nk.js";import{V as ce,C as ie}from"./ViewSwitcher-BvdQht2Y.js";import{P as le}from"./play-tjy5jMQX.js";import{F as q}from"./folder-open-CkOUbIiP.js";import"./defineProperty-CoXUr7_6.js";import"./vendor-ui-CXPAUBFv.js";import"./textarea-CxDiKFXZ.js";import"./badge-BbfnwDJP.js";import"./dialog-lDg4NvMV.js";import"./select-n108rXny.js";import"./chevron-up-4ymsBJRo.js";import"./EstimateSelect-wga0rUKX.js";import"./hash-CA0hJ7vh.js";import"./wand-sparkles-BaH6pJnc.js";import"./link-2-CC4E28yJ.js";import"./lightbulb-CN2q1O5l.js";const de=[["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"}]],me=G("grip-vertical",de),M={task:{icon:k,color:"text-blue-400"},bug:{icon:te,color:"text-red-400"},feature:{icon:S,color:"text-cyan-400"},epic:{icon:ne,color:"text-orange-400"},story:{icon:L,color:"text-green-400"},subtask:{icon:C,color:"text-gray-400"},enhancement:{icon:S,color:"text-indigo-400"},documentation:{icon:L,color:"text-cyan-400"}},pe={urgent:"bg-red-500",high:"bg-orange-500",medium:"bg-yellow-500",low:"bg-blue-500",none:"bg-gray-400"};function xe({ticket:r,isDragging:i}){const l=m.useRef(null),[g,o]=m.useState(!1);m.useEffect(()=>{const n=l.current;if(n)return U({element:n,getInitialData:()=>({ticketId:r.id,status:r.status}),onDragStart:()=>o(!0),onDrop:()=>o(!1)})},[r.id,r.status]);const x=M[r.type]?.icon||C,a=M[r.type]?.color||"text-gray-400",h=r.projectKey||"PROFCLAW";return e.jsxs("div",{ref:l,className:p("group relative rounded-xl bg-[var(--card)] border border-[var(--border)] p-3 cursor-grab active:cursor-grabbing transition-all duration-200",(g||i)&&"opacity-50 scale-95 rotate-2","hover:border-[var(--primary)]/30 hover:shadow-lg hover:shadow-[var(--primary)]/5"),children:[e.jsx("div",{className:"absolute left-1 top-1/2 -translate-y-1/2 opacity-0 group-hover:opacity-50 transition-opacity",children:e.jsx(me,{className:"h-4 w-4 text-[var(--muted-foreground)]"})}),e.jsx("div",{className:p("absolute top-0 left-3 w-6 h-1 rounded-b-full",pe[r.priority]),title:r.priority}),e.jsxs(O,{to:`/tickets/${r.id}`,className:"block space-y-2",children:[e.jsxs("div",{className:"flex items-start justify-between gap-2",children:[e.jsxs("span",{className:"text-[10px] font-mono text-[var(--muted-foreground)]",children:[h,"-",r.sequence]}),e.jsx(x,{className:p("h-3.5 w-3.5 shrink-0",a)})]}),e.jsx("h4",{className:"text-sm font-medium leading-tight line-clamp-2 group-hover:text-[var(--primary)] transition-colors",children:r.title}),e.jsxs("div",{className:"flex items-center justify-between gap-2 pt-1",children:[e.jsxs("div",{className:"flex items-center gap-1.5",children:[r.assigneeAgent&&e.jsxs("span",{className:"flex items-center gap-1 text-[9px] font-bold uppercase tracking-wider text-[var(--primary)]/80 px-1.5 py-0.5 rounded bg-[var(--primary)]/10",children:[e.jsx(W,{className:"h-2.5 w-2.5"}),r.assigneeAgent]}),r.labels.slice(0,1).map(n=>e.jsx("span",{className:"text-[9px] px-1.5 py-0.5 rounded bg-[var(--muted)]/50 text-[var(--muted-foreground)] truncate max-w-[60px]",children:n},n))]}),r.createdBy==="ai"&&e.jsx("span",{className:"text-[8px] font-bold uppercase tracking-wider text-blue-400",children:"AI"})]})]})]})}const Q=[{status:"backlog",label:"Backlog",icon:oe,color:"text-gray-400",bgColor:"bg-gray-500/10"},{status:"todo",label:"Todo",icon:C,color:"text-blue-400",bgColor:"bg-blue-500/10"},{status:"in_progress",label:"In Progress",icon:le,color:"text-amber-400",bgColor:"bg-amber-500/10"},{status:"in_review",label:"In Review",icon:Y,color:"text-indigo-400",bgColor:"bg-indigo-500/10"},{status:"done",label:"Done",icon:k,color:"text-green-400",bgColor:"bg-green-500/10"}];function ue({status:r,label:i,icon:l,color:g,bgColor:o,tickets:x,onDrop:a}){const h=m.useRef(null),[n,u]=m.useState(!1);return m.useEffect(()=>{const c=h.current;if(c)return V({element:c,getData:()=>({status:r}),canDrop:({source:j})=>j.data.status!==r,onDragEnter:()=>u(!0),onDragLeave:()=>u(!1),onDrop:({source:j})=>{u(!1);const f=j.data.ticketId;f&&a(f,r)}})},[r,a]),e.jsxs("div",{ref:h,className:p("flex flex-col min-w-[280px] max-w-[320px] rounded-2xl border transition-all duration-200",n?"border-[var(--primary)] bg-[var(--primary)]/5 scale-[1.02]":"border-[var(--border)] bg-[var(--card)]/50"),children:[e.jsxs("div",{className:p("flex items-center justify-between px-4 py-3 rounded-t-2xl",o),children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(l,{className:p("h-4 w-4",g)}),e.jsx("span",{className:"text-sm font-semibold",children:i}),e.jsx("span",{className:"flex items-center justify-center h-5 min-w-5 px-1.5 rounded-full bg-[var(--background)]/50 text-[10px] font-bold",children:x.length})]}),e.jsx(E,{variant:"ghost",size:"icon",className:"h-7 w-7 rounded-lg opacity-0 group-hover:opacity-100",children:e.jsx(ae,{className:"h-3.5 w-3.5"})})]}),e.jsx("div",{className:"flex-1 p-2 space-y-2 overflow-y-auto max-h-[calc(100vh-280px)] scrollbar-thin",children:x.length===0?e.jsxs("div",{className:p("flex flex-col items-center justify-center py-8 px-4 rounded-xl border-2 border-dashed transition-colors",n?"border-[var(--primary)] bg-[var(--primary)]/5":"border-[var(--border)]/50"),children:[e.jsx(l,{className:p("h-8 w-8 mb-2 opacity-30",g)}),e.jsx("span",{className:"text-xs text-[var(--muted-foreground)]",children:n?"Drop here":"No tickets"})]}):x.map(c=>e.jsx(xe,{ticket:c},c.id))})]})}function Ae(){const r=R(),i=$(),[l,g]=_(),[o,x]=m.useState(l.get("q")||""),[a,h]=m.useState(l.get("projectId")||void 0),{data:n}=I({queryKey:["projects"],queryFn:()=>N.projects.list({limit:50})}),u=n?.projects||[],c=u.find(s=>s.id===a),j=s=>{h(s);const t=new URLSearchParams(l);s?t.set("projectId",s):t.delete("projectId"),g(t)},{data:f,isLoading:F,error:D}=I({queryKey:["tickets","board",{search:o||void 0,projectId:a}],queryFn:()=>N.tickets.list({search:o||void 0,projectId:a||void 0,limit:200})}),b=z({mutationFn:({id:s,status:t})=>N.tickets.update(s,{status:t}),onMutate:async({id:s,status:t})=>{await i.cancelQueries({queryKey:["tickets","board"]});const d=i.getQueryData(["tickets","board",{search:o||void 0,projectId:a}]);return i.setQueryData(["tickets","board",{search:o||void 0,projectId:a}],y=>y?.tickets?{...y,tickets:y.tickets.map(v=>v.id===s?{...v,status:t}:v)}:y),{previousData:d}},onError:(s,t,d)=>{d?.previousData&&i.setQueryData(["tickets","board",{search:o||void 0,projectId:a}],d.previousData)},onSettled:()=>{i.invalidateQueries({queryKey:["tickets"]})}}),A=m.useCallback((s,t)=>{b.mutate({id:s,status:t})},[b]),T=f?.tickets??[],K=Q.reduce((s,t)=>(s[t.status]=T.filter(d=>d.status===t.status).map(d=>({...d,createdBy:d.createdBy??"human"})),s),{});return D?e.jsxs("div",{className:"premium-card rounded-[28px] p-12 text-center",children:[e.jsx(H,{className:"h-12 w-12 mx-auto text-red-400 mb-4"}),e.jsx("p",{className:"text-lg font-bold text-red-400",children:"Error loading board"}),e.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:D.message})]}):e.jsxs("div",{className:"space-y-6 h-full",children:[e.jsxs("header",{className:"flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-2xl font-bold tracking-tight",children:"Ticket Board"}),e.jsx("p",{className:"text-muted-foreground text-sm",children:a?`Showing ${c?.name||"Project"} tickets`:"Showing all tickets across projects"})]}),e.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[e.jsxs(J,{children:[e.jsx(X,{asChild:!0,children:e.jsxs(E,{variant:"outline",size:"sm",className:"gap-2 h-9",children:[e.jsx(q,{className:"h-4 w-4"}),c?e.jsxs("span",{className:"flex items-center gap-1.5",children:[e.jsx("span",{children:c.icon}),e.jsx("span",{className:"max-w-[120px] truncate",children:c.name})]}):"All Projects",e.jsx(Z,{className:"h-3 w-3"})]})}),e.jsxs(ee,{align:"end",className:"w-56",children:[e.jsx(w,{onClick:()=>j(void 0),children:e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsx(q,{className:"h-4 w-4"}),"All Projects"]})}),e.jsx(B,{}),u.map(s=>e.jsxs(w,{onClick:()=>j(s.id),children:[e.jsx("span",{className:"mr-2",children:s.icon}),e.jsx("span",{className:"truncate",children:s.name}),s.id===a&&e.jsx(k,{className:"h-4 w-4 ml-auto text-primary"})]},s.id)),u.length>0&&c&&e.jsxs(e.Fragment,{children:[e.jsx(B,{}),e.jsx(w,{onClick:()=>r(`/projects/${a}`),children:e.jsx("span",{className:"text-primary",children:"Go to Project Board →"})})]})]})]}),e.jsxs("div",{className:"relative w-48 sm:w-64",children:[e.jsx(se,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"}),e.jsx(re,{placeholder:"Search tickets...",value:o,onChange:s=>x(s.target.value),className:"pl-10 h-9"})]}),e.jsx(ce,{view:"board",onChange:s=>{if(s==="list"){const t=a?`?projectId=${a}`:"";r(`/tickets${t}`)}}}),e.jsx(ie,{})]})]}),F?e.jsx("div",{className:"premium-card rounded-[28px] p-12 flex items-center justify-center",children:e.jsx(P,{className:"h-8 w-8 animate-spin text-muted-foreground"})}):e.jsx("div",{className:"flex gap-4 overflow-x-auto pb-4 -mx-4 px-4 scrollbar-thin",children:Q.map(s=>e.jsx(ue,{...s,tickets:K[s.status]??[],onDrop:A},s.status))}),b.isPending&&e.jsxs("div",{className:"fixed bottom-4 right-4 flex items-center gap-2 px-4 py-2 rounded-xl glass-heavy text-sm",children:[e.jsx(P,{className:"h-4 w-4 animate-spin"}),"Updating..."]})]})}export{Ae as TicketBoard};
@@ -0,0 +1 @@
1
+ import{r as x,j as e,L as V,l as ss,u as ts}from"./vendor-react-Mc5_kfYG.js";import{u as Ne,b as $,c as P}from"./vendor-query-C0p7b53x.js";import{c as ye,k as m,X as U,i as c,P as te,I as ve,x as as,h as H,L as w,t as r,Y as ns,j as is,y as $e,A as ke,n as ls,r as Ce,m as rs,D as ce,o as oe,p as de,q as Q,E as Se,ah as cs,ag as me,G as xe,B as ue,Q as Be,C as J,T as Te,S as Le}from"./index-sEBN7w8J.js";import{B as M}from"./badge-BbfnwDJP.js";import{T as Ae}from"./textarea-CxDiKFXZ.js";import{S as Y,a as X,b as Z,c as ee,d as y}from"./select-n108rXny.js";import{D as Ke,b as Oe,c as _e,d as ze,e as Qe,f as Ve}from"./dialog-lDg4NvMV.js";import{A as os,a as ds,b as ms,c as xs,d as us,e as hs,f as ps,g as js}from"./alert-dialog-O6qBOv_f.js";import{P as gs,a as fs,b as Ns}from"./popover-CFHZf3pE.js";import{T as He}from"./tag-CH_vQliw.js";import{a as Pe}from"./EstimateSelect-wga0rUKX.js";import{g as ys,h as vs,i as bs}from"./vendor-ui-CXPAUBFv.js";import{L as ge}from"./link-2-CC4E28yJ.js";import{P as ws}from"./pencil-CDmiHzoj.js";import{E as ks}from"./ellipsis-vertical-B4tAX_bL.js";import{T as Cs}from"./trash-2-CucZJL0N.js";import{G as De}from"./git-branch-CwvUxj7C.js";import{G as Ss}from"./git-commit-horizontal-lxPzCvhD.js";import{M as Fe}from"./message-square-Bbb241am.js";import{H as he}from"./history-CEWMLELs.js";import{S as qe}from"./send-Cu7MR2Qh.js";import{I as Ue,C as se}from"./inbox-ehtOptTV.js";import{P as fe}from"./play-tjy5jMQX.js";import{C as Ts}from"./calendar-buq77TaS.js";import{L as pe}from"./layers-C6Mhf8Nk.js";import{L as Ls}from"./lightbulb-CN2q1O5l.js";import{a as Re,B as As}from"./bug-3WX0394-.js";import"./chevron-up-4ymsBJRo.js";import"./hash-CA0hJ7vh.js";const Ps=[["path",{d:"M4.929 4.929 19.07 19.071",key:"196cmz"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],Ee=ye("ban",Ps);const Ds=[["path",{d:"M2 9V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2v-1",key:"fm4g5t"}],["path",{d:"M2 13h10",key:"pgb2dq"}],["path",{d:"m9 16 3-3-3-3",key:"6m91ic"}]],Ie=ye("folder-input",Ds);const Fs=[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",key:"1cjeqo"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",key:"19qd67"}]],je=ye("link",Fs),Me=["#EF4444","#F97316","#EAB308","#22C55E","#06B6D4","#3B82F6","#8B5CF6","#EC4899"];function qs({ticketId:i,projectId:u,selectedLabels:p=[],onChange:j,disabled:R=!1,className:T}){const[k,E]=x.useState(!1),[g,b]=x.useState(""),[B,o]=x.useState(!1),[C,l]=x.useState(""),[O,L]=x.useState(Me[0]),D=Ne(),{data:F,isLoading:z}=$({queryKey:["labels",u],queryFn:()=>m.labels.list(u,{includeGlobal:!0}),enabled:!!u}),{data:_}=$({queryKey:["ticket-labels",i],queryFn:()=>m.labels.getTicketLabels(i),enabled:!!i}),q=P({mutationFn:n=>m.labels.setTicketLabels(i,n),onSuccess:()=>{D.invalidateQueries({queryKey:["ticket-labels",i]}),D.invalidateQueries({queryKey:["tickets"]})}}),a=P({mutationFn:()=>m.labels.create(u,{name:C,color:O}),onSuccess:n=>{D.invalidateQueries({queryKey:["labels",u]});const d=n.label,A=h.map(K=>K.id);j?j([...h,d]):q.mutate([...A,d.id]),o(!1),b(""),l(""),E(!1)}}),v=F?.labels??[],h=_?.labels??p,f=new Set(h.map(n=>n.id)),S=v.filter(n=>n.name.toLowerCase().includes(g.toLowerCase())||n.description?.toLowerCase().includes(g.toLowerCase())),ne=n=>{const d=new Set(f);d.has(n.id)?d.delete(n.id):d.add(n.id);const A=v.filter(K=>d.has(K.id));j?j(A):q.mutate([...d])},I=n=>{const d=new Set(f);d.delete(n);const A=v.filter(K=>d.has(K.id));j?j(A):q.mutate([...d])};return e.jsxs("div",{className:H("flex flex-wrap items-center gap-1",T),children:[h.map(n=>e.jsxs(M,{variant:"outline",className:"gap-1 pr-1",style:{backgroundColor:`${n.color}20`,borderColor:n.color,color:n.color},children:[e.jsx("span",{className:"h-2 w-2 rounded-full",style:{backgroundColor:n.color}}),n.name,!R&&e.jsx("button",{type:"button",onClick:d=>{d.stopPropagation(),I(n.id)},className:"ml-1 rounded-full hover:bg-muted/50",children:e.jsx(U,{className:"h-3 w-3"})})]},n.id)),!R&&e.jsxs(gs,{open:k,onOpenChange:n=>{E(n),n||(o(!1),b(""))},children:[e.jsx(fs,{asChild:!0,children:e.jsxs(c,{variant:"ghost",size:"sm",className:"h-6 gap-1 px-2 text-muted-foreground hover:text-foreground",children:[e.jsx(te,{className:"h-3 w-3"}),e.jsx(He,{className:"h-3 w-3"})]})}),e.jsxs(Ns,{className:"w-64 p-0",align:"start",children:[e.jsx("div",{className:"p-2",children:e.jsx(ve,{type:"text",placeholder:"Search labels...",value:g,onChange:n=>b(n.target.value),className:"h-8 text-xs px-2"})}),e.jsx("div",{className:"max-h-64 overflow-y-auto p-1",children:z?e.jsx("div",{className:"p-2 text-center text-sm text-muted-foreground",children:"Loading..."}):S.length===0&&!g?e.jsx("div",{className:"p-2 text-center text-sm text-muted-foreground",children:"No labels found"}):e.jsxs(e.Fragment,{children:[S.map(n=>e.jsxs("button",{type:"button",onClick:()=>ne(n),className:"flex w-full items-center gap-2 rounded-sm px-2 py-1.5 text-sm hover:bg-muted",children:[e.jsx("span",{className:"h-3 w-3 rounded-full",style:{backgroundColor:n.color}}),e.jsx("span",{className:"flex-1 text-left",children:n.name}),f.has(n.id)&&e.jsx(as,{className:"h-4 w-4 text-primary"})]},n.id)),g&&e.jsx("div",{className:"mt-1 border-t pt-1",children:B?e.jsxs("div",{className:"p-2 space-y-2",children:[e.jsx("div",{className:"flex gap-1.5",children:Me.map(n=>e.jsx("button",{type:"button",onClick:()=>L(n),className:H("h-4 w-4 rounded-full transition-transform hover:scale-110",O===n&&"ring-1 ring-primary ring-offset-1 ring-offset-background"),style:{backgroundColor:n}},n))}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx(c,{size:"sm",className:"h-7 text-[10px] flex-1",onClick:()=>a.mutate(),disabled:a.isPending,children:a.isPending?e.jsx(w,{className:"h-3 w-3 animate-spin"}):"Create"}),e.jsx(c,{size:"sm",variant:"ghost",className:"h-7 text-[10px]",onClick:()=>{o(!1),b("")},children:"Cancel"})]})]}):e.jsxs("button",{type:"button",onClick:()=>{o(!0),l(g)},className:"flex w-full items-center gap-2 rounded-sm px-2 py-1.5 text-sm text-primary hover:bg-primary/5",children:[e.jsx(te,{className:"h-3 w-3"}),e.jsxs("span",{children:['Create "',g,'"']})]})})]})})]})]})]})}const Rs=ys,Es=vs,Is=bs,ae=[{value:"blocks",label:"Blocks",icon:Ee,color:"text-red-400",description:"This ticket blocks another"},{value:"blocked_by",label:"Blocked by",icon:Ee,color:"text-orange-400",description:"This ticket is blocked by another"},{value:"relates_to",label:"Relates to",icon:ge,color:"text-blue-400",description:"Related tickets"},{value:"duplicates",label:"Duplicates",icon:$e,color:"text-purple-400",description:"This ticket duplicates another"},{value:"start_before",label:"Start before",icon:ke,color:"text-cyan-400",description:"Must start before another ticket"},{value:"finish_before",label:"Finish before",icon:ke,color:"text-emerald-400",description:"Must finish before another ticket"}];function Ms(i){return ae.find(u=>u.value===i)||ae[2]}function $s({ticketId:i,relations:u=[]}){const p=Ne(),[j,R]=x.useState(!0),[T,k]=x.useState(!1),[E,g]=x.useState("relates_to"),[b,B]=x.useState(""),[o,C]=x.useState(null),{data:l,isLoading:O}=$({queryKey:["tickets-search",b],queryFn:()=>m.tickets.list({search:b,limit:10}),enabled:b.length>=2,staleTime:1e4}),L=l?.tickets?.filter(a=>a.id!==i)||[],D=P({mutationFn:({targetTicketId:a,type:v})=>m.tickets.addRelation(i,a,v),onSuccess:()=>{p.invalidateQueries({queryKey:["ticket",i]}),k(!1),B(""),C(null),r.success("Relation added")},onError:a=>{r.error(`Failed to add relation: ${a.message}`)}}),F=P({mutationFn:a=>m.tickets.removeRelation(i,a),onSuccess:()=>{p.invalidateQueries({queryKey:["ticket",i]}),r.success("Relation removed")},onError:a=>{r.error(`Failed to remove relation: ${a.message}`)}}),z=()=>{if(!o){r.error("Please select a ticket");return}D.mutate({targetTicketId:o,type:E})},_=u.reduce((a,v)=>{const h=v.relationType;return a[h]||(a[h]=[]),a[h].push(v),a},{}),q=u.length;return e.jsxs("div",{className:"glass rounded-[20px] p-4",children:[e.jsxs(Rs,{open:j,onOpenChange:R,children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx(Es,{asChild:!0,children:e.jsxs("button",{className:"flex items-center gap-2 text-sm font-semibold hover:text-primary transition-colors",children:[j?e.jsx(ns,{className:"h-4 w-4"}):e.jsx(is,{className:"h-4 w-4"}),e.jsx(ge,{className:"h-4 w-4"}),"Relations",q>0&&e.jsx(M,{variant:"secondary",className:"text-[10px] px-1.5 py-0",children:q})]})}),e.jsx(c,{variant:"ghost",size:"sm",onClick:()=>k(!0),className:"h-7 w-7 p-0 rounded-lg",children:e.jsx(te,{className:"h-4 w-4"})})]}),e.jsx(Is,{className:"pt-3 space-y-3",children:q===0?e.jsxs("div",{className:"text-center py-4",children:[e.jsx(ge,{className:"h-8 w-8 mx-auto mb-2 text-muted-foreground/40"}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"No relations"}),e.jsxs(c,{variant:"outline",size:"sm",onClick:()=>k(!0),className:"mt-2 h-7 text-xs gap-1",children:[e.jsx(te,{className:"h-3 w-3"}),"Add relation"]})]}):Object.entries(_).map(([a,v])=>{const h=Ms(a);return e.jsxs("div",{className:"space-y-1.5",children:[e.jsxs("div",{className:H("flex items-center gap-1.5 text-xs font-medium",h.color),children:[e.jsx(h.icon,{className:"h-3 w-3"}),h.label]}),e.jsx("div",{className:"space-y-1",children:v.map(f=>{const S=f.sourceTicketId===i?f.targetTicket:f.sourceTicket;return S?e.jsxs("div",{className:"flex items-center justify-between gap-2 p-2 rounded-lg bg-white/5 group",children:[e.jsx(V,{to:`/tickets/${S.id}`,className:"flex-1 min-w-0 hover:text-primary transition-colors",children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs("span",{className:"text-[10px] font-mono text-muted-foreground",children:[S.projectKey||"PROFCLAW","-",S.sequence]}),e.jsx("span",{className:"text-xs truncate",children:S.title})]})}),e.jsx(c,{variant:"ghost",size:"sm",onClick:()=>F.mutate(f.id),disabled:F.isPending,className:"h-6 w-6 p-0 opacity-0 group-hover:opacity-100 transition-opacity",children:F.isPending?e.jsx(w,{className:"h-3 w-3 animate-spin"}):e.jsx(U,{className:"h-3 w-3 text-muted-foreground hover:text-red-400"})})]},f.id):null})})]},a)})})]}),e.jsx(Ke,{open:T,onOpenChange:k,children:e.jsxs(Oe,{className:"sm:max-w-[425px]",children:[e.jsxs(_e,{children:[e.jsx(ze,{children:"Add Relation"}),e.jsx(Qe,{children:"Link this ticket to another ticket."})]}),e.jsxs("div",{className:"space-y-4 py-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx("label",{className:"text-sm font-medium",children:"Relation Type"}),e.jsxs(Y,{value:E,onValueChange:a=>g(a),children:[e.jsx(X,{children:e.jsx(Z,{})}),e.jsx(ee,{children:ae.map(a=>e.jsx(y,{value:a.value,children:e.jsxs("span",{className:H("flex items-center gap-2",a.color),children:[e.jsx(a.icon,{className:"h-4 w-4"}),a.label]})},a.value))})]}),e.jsx("p",{className:"text-xs text-muted-foreground",children:ae.find(a=>a.value===E)?.description})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx("label",{className:"text-sm font-medium",children:"Search Ticket"}),e.jsxs("div",{className:"relative",children:[e.jsx(ls,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"}),e.jsx(ve,{placeholder:"Search by title or ID...",value:b,onChange:a=>B(a.target.value),className:"pl-9"})]})]}),b.length>=2&&e.jsx("div",{className:"bg-muted/30 rounded-lg divide-y divide-border/20 max-h-48 overflow-y-auto",children:O?e.jsx("div",{className:"p-4 text-center",children:e.jsx(w,{className:"h-4 w-4 animate-spin mx-auto"})}):L.length===0?e.jsx("div",{className:"p-4 text-center text-sm text-muted-foreground",children:"No tickets found"}):L.map(a=>e.jsx("button",{type:"button",onClick:()=>C(a.id),className:H("w-full text-left p-3 hover:bg-muted/50 transition-colors",o===a.id&&"bg-primary/10"),children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs("span",{className:"text-xs font-mono text-muted-foreground",children:[a.projectKey||"PROFCLAW","-",a.sequence]}),e.jsx("span",{className:"text-sm truncate",children:a.title})]})},a.id))}),o&&e.jsxs("div",{className:"p-3 rounded-lg bg-primary/10 border border-primary/20",children:[e.jsx("p",{className:"text-xs text-muted-foreground mb-1",children:"Selected:"}),e.jsx("p",{className:"text-sm font-medium",children:L.find(a=>a.id===o)?.title||"Ticket selected"})]})]}),e.jsxs(Ve,{children:[e.jsx(c,{variant:"outline",onClick:()=>k(!1),children:"Cancel"}),e.jsxs(c,{onClick:z,disabled:!o||D.isPending,children:[D.isPending&&e.jsx(w,{className:"h-4 w-4 mr-2 animate-spin"}),"Add Relation"]})]})]})})]})}const Bs=[{value:"backlog",label:"Backlog",icon:Ue},{value:"todo",label:"Todo",icon:se},{value:"in_progress",label:"In Progress",icon:fe},{value:"in_review",label:"In Review",icon:Be},{value:"done",label:"Done",icon:J},{value:"cancelled",label:"Cancelled",icon:U}];function pt(){const{id:i}=ss(),u=ts(),p=Ne(),[j,R]=x.useState(""),[T,k]=x.useState("comments"),[E,g]=x.useState(!1),[b,B]=x.useState(!1),[o,C]=x.useState({title:"",description:"",priority:"medium",type:"task",estimate:null}),{data:l,isLoading:O,error:L}=$({queryKey:["ticket",i],queryFn:()=>m.tickets.get(i,!0),enabled:!!i}),{data:D}=$({queryKey:["projects"],queryFn:()=>m.projects.list({limit:50})}),{data:F,isLoading:z}=$({queryKey:["ticket-similar",i],queryFn:()=>m.tickets.ai.similar(i,5),enabled:!!i&&!!l}),{data:_,isLoading:q}=$({queryKey:["ticket-summary",i],queryFn:()=>m.tickets.ai.summary(i),enabled:!!i&&!!l,staleTime:3e5}),{data:a}=$({queryKey:["ai-status"],queryFn:()=>m.tickets.ai.status(),staleTime:6e4}),v=a?.available??!1,h=P({mutationFn:s=>m.tickets.transition(i,s),onSuccess:()=>{p.invalidateQueries({queryKey:["ticket",i]}),p.invalidateQueries({queryKey:["tickets"]}),r.success("Status updated")},onError:s=>{r.error(`Failed to update status: ${s.message}`)}}),f=P({mutationFn:s=>m.tickets.update(i,s),onSuccess:()=>{p.invalidateQueries({queryKey:["ticket",i]}),p.invalidateQueries({queryKey:["tickets"]}),g(!1),r.success("Ticket updated")},onError:s=>{r.error(`Failed to update ticket: ${s.message}`)}}),S=P({mutationFn:()=>m.tickets.delete(i),onSuccess:()=>{p.invalidateQueries({queryKey:["tickets"]}),r.success("Ticket deleted"),u("/tickets")},onError:s=>{r.error(`Failed to delete ticket: ${s.message}`)}}),ne=P({mutationFn:s=>m.tickets.update(i,{projectId:s}),onSuccess:()=>{p.invalidateQueries({queryKey:["ticket",i]}),p.invalidateQueries({queryKey:["tickets"]}),r.success("Ticket moved to project")},onError:s=>{r.error(`Failed to move ticket: ${s.message}`)}}),I=P({mutationFn:s=>m.tickets.addComment(i,s),onSuccess:()=>{p.invalidateQueries({queryKey:["ticket",i]}),R(""),r.success("Comment added")},onError:s=>{r.error(`Failed to add comment: ${s.message}`)}}),n=P({mutationFn:s=>m.tickets.ai.respond(i,s),onSuccess:s=>{s.posted&&s.comment?(p.invalidateQueries({queryKey:["ticket",i]}),r.success("AI response posted")):s.response?(A(s.response),G(s.confidence),r.success(`AI generated response (${Math.round(s.confidence*100)}% confidence)`)):s.skipped&&r.info(s.reason||"AI chose not to respond")},onError:s=>{r.error(`AI response failed: ${s.message}`)}}),[d,A]=x.useState(null),[K,G]=x.useState(0),Ge=async()=>{d&&(await I.mutateAsync(d),A(null),G(0))},We=()=>{j.trim()&&I.mutate(j)},Je=()=>{l&&(C({title:l.title,description:l.description||"",priority:l.priority,type:l.type,estimate:l.estimate??null}),g(!0))},Ye=()=>{f.mutate({...o,estimate:o.estimate??void 0,estimateUnit:o.estimate!==null?"points":void 0})},be=s=>{ne.mutate(s)},Xe=async()=>{if(l)try{const s=await m.tickets.create({title:`${l.title} (Copy)`,description:l.description,type:l.type,priority:l.priority,labels:l.labels,projectId:l.projectId});r.success("Ticket duplicated"),u(`/tickets/${s.ticket.id}`)}catch{r.error("Failed to duplicate ticket")}},Ze=s=>{const ie={done:{variant:"success",icon:J},cancelled:{variant:"destructive",icon:U},in_progress:{variant:"info",icon:fe},in_review:{variant:"warning",icon:Be},todo:{variant:"secondary",icon:se},backlog:{variant:"secondary",icon:Ue}}[s],{variant:le,icon:re}=ie;return e.jsxs(M,{variant:le,className:"gap-1 text-sm px-3 py-1",children:[e.jsx(re,{className:"h-4 w-4"}),s.replace("_"," ")]})},we=s=>{const ie={task:{icon:J,color:"text-blue-500"},bug:{icon:As,color:"text-red-500"},feature:{icon:Le,color:"text-cyan-500"},enhancement:{icon:Le,color:"text-indigo-500"},documentation:{icon:Re,color:"text-cyan-500"},epic:{icon:pe,color:"text-orange-500"},story:{icon:Re,color:"text-green-500"},subtask:{icon:se,color:"text-gray-500"}}[s],{icon:le,color:re}=ie;return e.jsxs("span",{className:`flex items-center gap-1.5 text-sm ${re}`,children:[e.jsx(le,{className:"h-4 w-4"}),s]})},es=s=>({urgent:"text-red-500",high:"text-orange-500",medium:"text-yellow-500",low:"text-blue-500",none:"text-gray-400"})[s]||"text-gray-400";if(O)return e.jsx("div",{className:"glass rounded-[28px] p-12 flex items-center justify-center",children:e.jsx(w,{className:"h-8 w-8 animate-spin text-muted-foreground"})});if(L||!l)return e.jsxs("div",{className:"space-y-4",children:[e.jsxs(c,{variant:"ghost",onClick:()=>u("/tickets"),className:"gap-2",children:[e.jsx(Ce,{className:"h-4 w-4"}),"Back to Tickets"]}),e.jsxs("div",{className:"glass rounded-[28px] p-12 text-center",children:[e.jsx(rs,{className:"h-12 w-12 mx-auto text-red-400 mb-4"}),e.jsx("p",{className:"text-lg font-bold text-red-400",children:L?"Error loading ticket":"Ticket not found"}),e.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:L?L.message:`No ticket found with ID: ${i}`})]})]});const t=l,W=D?.projects||[];return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs(c,{variant:"ghost",onClick:()=>u("/tickets"),className:"gap-2",children:[e.jsx(Ce,{className:"h-4 w-4"}),"Back to Tickets"]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs(c,{variant:"outline",size:"sm",onClick:Je,className:"gap-2",children:[e.jsx(ws,{className:"h-4 w-4"}),"Edit"]}),e.jsxs(ce,{children:[e.jsx(oe,{asChild:!0,children:e.jsxs(c,{variant:"outline",size:"sm",className:"gap-2",children:[e.jsx(Ie,{className:"h-4 w-4"}),"Move to Project"]})}),e.jsx(de,{align:"end",className:"w-56",children:W.length===0?e.jsx("div",{className:"px-2 py-4 text-center text-sm text-muted-foreground",children:"No projects available"}):W.map(s=>e.jsxs(Q,{onClick:()=>be(s.id),disabled:s.id===t.projectId,children:[e.jsx("span",{className:"mr-2",children:s.icon}),s.name,s.id===t.projectId&&e.jsx("span",{className:"ml-auto text-xs text-muted-foreground",children:"(current)"})]},s.id))})]}),e.jsxs(ce,{children:[e.jsx(oe,{asChild:!0,children:e.jsx(c,{variant:"outline",size:"icon",className:"h-9 w-9",children:e.jsx(ks,{className:"h-4 w-4"})})}),e.jsxs(de,{align:"end",children:[e.jsxs(Q,{onClick:Xe,children:[e.jsx($e,{className:"h-4 w-4 mr-2"}),"Duplicate Ticket"]}),e.jsxs(Q,{onClick:()=>{const s=t.externalLinks?.find(N=>N.platform==="jira");s?.externalUrl?window.open(s.externalUrl,"_blank"):r.info("No Jira link found. Link this ticket to Jira first.")},children:[e.jsx(Se,{className:"h-4 w-4 mr-2"}),"Open in Jira"]}),e.jsx(cs,{}),e.jsxs(Q,{className:"text-red-500 focus:text-red-500",onClick:()=>B(!0),children:[e.jsx(Cs,{className:"h-4 w-4 mr-2"}),"Delete Ticket"]})]})]})]})]}),e.jsx(Ke,{open:E,onOpenChange:g,children:e.jsxs(Oe,{className:"sm:max-w-[500px]",children:[e.jsxs(_e,{children:[e.jsx(ze,{children:"Edit Ticket"}),e.jsx(Qe,{children:"Make changes to the ticket details."})]}),e.jsxs("div",{className:"space-y-4 py-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx("label",{className:"text-sm font-medium",children:"Title"}),e.jsx(ve,{value:o.title,onChange:s=>C(N=>({...N,title:s.target.value})),placeholder:"Ticket title"})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx("label",{className:"text-sm font-medium",children:"Description"}),e.jsx(Ae,{value:o.description,onChange:s=>C(N=>({...N,description:s.target.value})),placeholder:"Ticket description",rows:4})]}),e.jsxs("div",{className:"grid grid-cols-3 gap-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx("label",{className:"text-sm font-medium",children:"Priority"}),e.jsxs(Y,{value:o.priority,onValueChange:s=>C(N=>({...N,priority:s})),children:[e.jsx(X,{children:e.jsx(Z,{})}),e.jsxs(ee,{children:[e.jsx(y,{value:"urgent",children:"Urgent"}),e.jsx(y,{value:"high",children:"High"}),e.jsx(y,{value:"medium",children:"Medium"}),e.jsx(y,{value:"low",children:"Low"}),e.jsx(y,{value:"none",children:"None"})]})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx("label",{className:"text-sm font-medium",children:"Type"}),e.jsxs(Y,{value:o.type,onValueChange:s=>C(N=>({...N,type:s})),children:[e.jsx(X,{children:e.jsx(Z,{})}),e.jsxs(ee,{children:[e.jsx(y,{value:"task",children:"Task"}),e.jsx(y,{value:"bug",children:"Bug"}),e.jsx(y,{value:"feature",children:"Feature"}),e.jsx(y,{value:"enhancement",children:"Enhancement"}),e.jsx(y,{value:"epic",children:"Epic"}),e.jsx(y,{value:"story",children:"Story"}),e.jsx(y,{value:"subtask",children:"Subtask"})]})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx("label",{className:"text-sm font-medium",children:"Estimate"}),e.jsx(Pe,{value:o.estimate,onChange:s=>C(N=>({...N,estimate:s})),placeholder:"Points"})]})]})]}),e.jsxs(Ve,{children:[e.jsx(c,{variant:"outline",onClick:()=>g(!1),children:"Cancel"}),e.jsxs(c,{onClick:Ye,disabled:f.isPending,children:[f.isPending&&e.jsx(w,{className:"h-4 w-4 mr-2 animate-spin"}),"Save Changes"]})]})]})}),e.jsx(os,{open:b,onOpenChange:B,children:e.jsxs(ds,{children:[e.jsxs(ms,{children:[e.jsx(xs,{children:"Delete Ticket"}),e.jsxs(us,{children:['Are you sure you want to delete "',t.title,'"? This action cannot be undone.']})]}),e.jsxs(hs,{children:[e.jsx(ps,{children:"Cancel"}),e.jsxs(js,{onClick:()=>S.mutate(),className:"bg-red-500 hover:bg-red-600",children:[S.isPending&&e.jsx(w,{className:"h-4 w-4 mr-2 animate-spin"}),"Delete"]})]})]})}),e.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-6",children:[e.jsxs("div",{className:"lg:col-span-2 space-y-6",children:[e.jsxs("div",{className:"glass rounded-[20px] p-6",children:[e.jsxs("div",{className:"flex items-start justify-between mb-4",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsxs("span",{className:"text-sm font-mono text-muted-foreground bg-white/5 px-2 py-1 rounded-md",children:[t.projectKey||"PROFCLAW","-",t.sequence]}),!t.projectId&&e.jsx("span",{className:"text-[9px] font-bold uppercase tracking-wider text-amber-400 px-1.5 py-0.5 rounded bg-amber-500/10 border border-amber-500/20",children:"No Project"}),we(t.type)]}),Ze(t.status)]}),e.jsx("h1",{className:"text-2xl font-bold mb-4",children:t.title}),t.description&&e.jsx("div",{className:"prose prose-sm prose-invert max-w-none",children:e.jsx("p",{className:"text-muted-foreground whitespace-pre-wrap",children:t.description})}),(t.linkedPRs.length>0||t.linkedCommits.length>0||t.linkedBranch)&&e.jsxs("div",{className:"flex flex-wrap gap-4 mt-4 pt-4 border-t border-white/5",children:[t.linkedBranch&&e.jsxs("span",{className:"flex items-center gap-1.5 text-xs text-muted-foreground",children:[e.jsx(De,{className:"h-3.5 w-3.5"}),t.linkedBranch]}),t.linkedPRs.length>0&&e.jsxs("span",{className:"flex items-center gap-1.5 text-xs text-muted-foreground",children:[e.jsx(De,{className:"h-3.5 w-3.5"}),t.linkedPRs.length," PR(s)"]}),t.linkedCommits.length>0&&e.jsxs("span",{className:"flex items-center gap-1.5 text-xs text-muted-foreground",children:[e.jsx(Ss,{className:"h-3.5 w-3.5"}),t.linkedCommits.length," commit(s)"]})]})]}),e.jsxs("div",{className:"glass rounded-[20px] overflow-hidden",children:[e.jsxs("div",{className:"flex border-b border-white/5",children:[e.jsxs("button",{onClick:()=>k("comments"),className:`flex items-center gap-2 px-4 py-3 text-sm font-medium transition-colors ${T==="comments"?"bg-white/5 text-foreground":"text-muted-foreground hover:text-foreground"}`,children:[e.jsx(Fe,{className:"h-4 w-4"}),"Comments (",t.comments?.length||0,")"]}),e.jsxs("button",{onClick:()=>k("history"),className:`flex items-center gap-2 px-4 py-3 text-sm font-medium transition-colors ${T==="history"?"bg-white/5 text-foreground":"text-muted-foreground hover:text-foreground"}`,children:[e.jsx(he,{className:"h-4 w-4"}),"History (",t.history?.length||0,")"]}),e.jsxs("button",{onClick:()=>k("links"),className:`flex items-center gap-2 px-4 py-3 text-sm font-medium transition-colors ${T==="links"?"bg-white/5 text-foreground":"text-muted-foreground hover:text-foreground"}`,children:[e.jsx(je,{className:"h-4 w-4"}),"Links (",t.externalLinks?.length||0,")"]})]}),e.jsxs("div",{className:"p-4",children:[T==="comments"&&e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"flex gap-3",children:[e.jsx("div",{className:"h-8 w-8 rounded-full bg-primary/20 flex items-center justify-center shrink-0",children:e.jsx(me,{className:"h-4 w-4 text-primary"})}),e.jsxs("div",{className:"flex-1",children:[e.jsx(Ae,{placeholder:"Add a comment...",value:j,onChange:s=>R(s.target.value),className:"min-h-20"}),e.jsxs("div",{className:"flex justify-end mt-2 gap-2",children:[v&&t.comments&&t.comments.length>0&&e.jsxs(c,{size:"sm",variant:"outline",onClick:()=>n.mutate({}),disabled:n.isPending,className:"gap-2",children:[n.isPending?e.jsx(w,{className:"h-4 w-4 animate-spin"}):e.jsx(xe,{className:"h-4 w-4"}),"AI Respond"]}),e.jsxs(c,{size:"sm",variant:"black",onClick:We,disabled:!j.trim()||I.isPending,className:"gap-2",children:[I.isPending?e.jsx(w,{className:"h-4 w-4 animate-spin"}):e.jsx(qe,{className:"h-4 w-4"}),"Comment"]})]})]})]}),d&&e.jsxs("div",{className:"rounded-xl bg-primary/5 border border-primary/20 p-4 space-y-3",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("span",{className:"flex items-center gap-2 text-sm font-medium text-primary",children:[e.jsx(xe,{className:"h-4 w-4"}),"AI Generated Response",e.jsxs(M,{variant:"outline",className:"text-[10px] px-1.5 py-0",children:[Math.round(K*100),"% confidence"]})]}),e.jsx(c,{variant:"ghost",size:"sm",onClick:()=>{A(null),G(0)},className:"h-6 w-6 p-0 rounded-lg",children:e.jsx(U,{className:"h-3 w-3"})})]}),e.jsx("p",{className:"text-sm text-muted-foreground whitespace-pre-wrap",children:d}),e.jsxs("div",{className:"flex justify-end gap-2",children:[e.jsx(c,{size:"sm",variant:"outline",onClick:()=>{R(d),A(null),G(0)},className:"gap-1 rounded-xl border-white/10 text-xs",children:"Edit First"}),e.jsxs(c,{size:"sm",onClick:Ge,disabled:I.isPending,className:"gap-1 rounded-xl text-xs",children:[I.isPending?e.jsx(w,{className:"h-3 w-3 animate-spin"}):e.jsx(qe,{className:"h-3 w-3"}),"Post Response"]})]})]}),t.comments&&t.comments.length>0?e.jsx("div",{className:"space-y-4 pt-4 border-t border-white/5",children:t.comments.map(s=>e.jsxs("div",{className:"flex gap-3",children:[e.jsx("div",{className:`h-8 w-8 rounded-full flex items-center justify-center flex-shrink-0 ${s.author.type==="ai","bg-blue-500/20"}`,children:s.author.type==="ai"?e.jsx(ue,{className:"h-4 w-4 text-blue-500"}):e.jsx(me,{className:"h-4 w-4 text-blue-400"})}),e.jsxs("div",{className:"flex-1",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[e.jsx("span",{className:"font-medium text-sm",children:s.author.name}),e.jsx("span",{className:"text-xs text-muted-foreground",children:new Date(s.createdAt).toLocaleString()}),s.source!=="profclaw"&&e.jsx(M,{variant:"outline",className:"text-[10px] px-1.5 py-0",children:s.source})]}),e.jsx("p",{className:"text-sm text-muted-foreground whitespace-pre-wrap",children:s.content})]})]},s.id))}):e.jsxs("div",{className:"text-center py-8 text-muted-foreground",children:[e.jsx(Fe,{className:"h-8 w-8 mx-auto mb-2 opacity-40"}),e.jsx("p",{className:"text-sm",children:"No comments yet"})]})]}),T==="history"&&e.jsx("div",{className:"space-y-3",children:t.history&&t.history.length>0?t.history.map(s=>e.jsxs("div",{className:"flex items-start gap-3 py-2",children:[e.jsx("div",{className:"h-6 w-6 rounded-full bg-white/5 flex items-center justify-center flex-shrink-0 mt-0.5",children:e.jsx(he,{className:"h-3 w-3 text-muted-foreground"})}),e.jsxs("div",{className:"flex-1",children:[e.jsxs("p",{className:"text-sm",children:[e.jsx("span",{className:"font-medium",children:s.changedBy.name}),e.jsx("span",{className:"text-muted-foreground",children:" changed "}),e.jsx("span",{className:"font-medium",children:s.field}),s.oldValue&&e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"text-muted-foreground",children:" from "}),e.jsx("span",{className:"text-red-400/80",children:s.oldValue})]}),s.newValue&&e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"text-muted-foreground",children:" to "}),e.jsx("span",{className:"text-green-400/80",children:s.newValue})]})]}),e.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:new Date(s.timestamp).toLocaleString()})]})]},s.id)):e.jsxs("div",{className:"text-center py-8 text-muted-foreground",children:[e.jsx(he,{className:"h-8 w-8 mx-auto mb-2 opacity-40"}),e.jsx("p",{className:"text-sm",children:"No history yet"})]})}),T==="links"&&e.jsx("div",{className:"space-y-3",children:t.externalLinks&&t.externalLinks.length>0?t.externalLinks.map(s=>e.jsxs("div",{className:"flex items-center justify-between p-3 rounded-xl bg-white/5",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"h-8 w-8 rounded-lg bg-white/5 flex items-center justify-center",children:e.jsx(je,{className:"h-4 w-4 text-muted-foreground"})}),e.jsxs("div",{children:[e.jsx("p",{className:"font-medium text-sm capitalize",children:s.platform}),e.jsx("p",{className:"text-xs text-muted-foreground",children:s.externalId})]})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(M,{variant:s.syncEnabled?"success":"secondary",className:"text-[10px]",children:s.syncDirection}),s.externalUrl&&e.jsx("a",{href:s.externalUrl,target:"_blank",rel:"noopener noreferrer",className:"p-2 hover:bg-white/5 rounded-lg transition-colors",children:e.jsx(Se,{className:"h-4 w-4 text-muted-foreground"})})]})]},s.id)):e.jsxs("div",{className:"text-center py-8 text-muted-foreground",children:[e.jsx(je,{className:"h-8 w-8 mx-auto mb-2 opacity-40"}),e.jsx("p",{className:"text-sm",children:"No external links yet"})]})})]})]})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"glass rounded-[20px] p-4",children:[e.jsx("h3",{className:"text-sm font-semibold mb-3",children:"Status"}),e.jsxs(Y,{value:t.status,onValueChange:s=>h.mutate(s),disabled:h.isPending,children:[e.jsx(X,{className:"w-full bg-white/5 border-white/10 rounded-xl",children:e.jsx(Z,{})}),e.jsx(ee,{className:"glass-heavy rounded-xl border-white/10",children:Bs.map(s=>e.jsx(y,{value:s.value,children:e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsx(s.icon,{className:"h-4 w-4"}),s.label]})},s.value))})]})]}),e.jsxs("div",{className:"glass rounded-[20px] p-4 space-y-4",children:[e.jsx("h3",{className:"text-sm font-semibold",children:"Details"}),e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{className:"flex justify-between items-center",children:[e.jsx("span",{className:"text-sm text-muted-foreground",children:"Project"}),t.projectId?e.jsx(V,{to:`/projects/${t.projectId}`,className:"text-sm font-medium text-primary hover:underline",children:t.projectName||t.projectKey||"View Project"}):e.jsx("span",{className:"text-sm text-muted-foreground italic",children:"No project"})]}),e.jsxs("div",{className:"flex justify-between items-center",children:[e.jsx("span",{className:"text-sm text-muted-foreground",children:"Priority"}),e.jsx("span",{className:`text-sm font-medium capitalize ${es(t.priority)}`,children:t.priority})]}),e.jsxs("div",{className:"flex justify-between items-center",children:[e.jsx("span",{className:"text-sm text-muted-foreground",children:"Type"}),we(t.type)]}),e.jsxs("div",{className:"flex justify-between items-center",children:[e.jsx("span",{className:"text-sm text-muted-foreground",children:"Created By"}),e.jsx("span",{className:"flex items-center gap-1.5 text-sm",children:t.createdBy==="ai"?e.jsxs(e.Fragment,{children:[e.jsx(ue,{className:"h-3.5 w-3.5 text-indigo-400"}),"AI"]}):e.jsxs(e.Fragment,{children:[e.jsx(me,{className:"h-3.5 w-3.5 text-blue-400"}),"Human"]})})]}),t.assigneeAgent&&e.jsxs("div",{className:"flex justify-between items-center",children:[e.jsx("span",{className:"text-sm text-muted-foreground",children:"Assigned Agent"}),e.jsxs("span",{className:"flex items-center gap-1.5 text-sm text-primary",children:[e.jsx(ue,{className:"h-3.5 w-3.5"}),t.assigneeAgent]})]}),t.aiAgent&&e.jsxs("div",{className:"flex justify-between items-center",children:[e.jsx("span",{className:"text-sm text-muted-foreground",children:"AI Agent"}),e.jsx("span",{className:"text-sm",children:t.aiAgent})]}),e.jsxs("div",{className:"flex justify-between items-center",children:[e.jsx("span",{className:"text-sm text-muted-foreground",children:"Estimate"}),e.jsx(Pe,{value:t.estimate??null,onChange:s=>{f.mutate({estimate:s??void 0,estimateUnit:s!==null?"points":void 0})},compact:!0,placeholder:"—",className:"w-[90px] h-8 text-xs"})]}),t.dueDate&&e.jsxs("div",{className:"flex justify-between items-center",children:[e.jsx("span",{className:"text-sm text-muted-foreground",children:"Due Date"}),e.jsxs("span",{className:"flex items-center gap-1.5 text-sm",children:[e.jsx(Ts,{className:"h-3.5 w-3.5"}),new Date(t.dueDate).toLocaleDateString()]})]})]})]}),e.jsxs("div",{className:"glass rounded-[20px] p-4 space-y-3",children:[e.jsxs("h3",{className:"text-sm font-semibold flex items-center gap-2",children:[e.jsx(He,{className:"h-4 w-4"}),"Labels"]}),t.projectId?e.jsx(qs,{ticketId:t.id,projectId:t.projectId}):e.jsxs("div",{className:"text-center py-3",children:[e.jsx("p",{className:"text-xs text-muted-foreground mb-2",children:"Assign to a project to add labels"}),e.jsxs(ce,{children:[e.jsx(oe,{asChild:!0,children:e.jsxs(c,{variant:"outline",size:"sm",className:"h-7 text-xs gap-1",children:[e.jsx(Ie,{className:"h-3 w-3"}),"Select Project"]})}),e.jsx(de,{align:"center",className:"w-48",children:W.length===0?e.jsx("div",{className:"px-2 py-3 text-center text-xs text-muted-foreground",children:"No projects available"}):W.map(s=>e.jsxs(Q,{onClick:()=>be(s.id),className:"text-sm",children:[e.jsx("span",{className:"mr-2",children:s.icon}),s.name]},s.id))})]})]})]}),e.jsx($s,{ticketId:t.id,relations:t.relations||[]}),t.parent&&e.jsxs("div",{className:"glass rounded-[20px] p-4 space-y-3",children:[e.jsxs("h3",{className:"text-sm font-semibold flex items-center gap-2",children:[e.jsx(pe,{className:"h-4 w-4 text-amber-400"}),"Parent Ticket"]}),e.jsxs(V,{to:`/tickets/${t.parent.id}`,className:"block p-3 rounded-xl bg-white/5 hover:bg-white/10 transition-colors group",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[e.jsxs("span",{className:"text-xs font-mono text-muted-foreground",children:[t.parent.projectKey||"PROFCLAW","-",t.parent.sequence]}),t.parent.type==="epic"&&e.jsx("span",{className:"text-[10px] px-1.5 py-0.5 rounded bg-amber-500/20 text-amber-400 font-medium",children:"EPIC"})]}),e.jsx("p",{className:"text-sm font-medium group-hover:text-primary transition-colors",children:t.parent.title})]})]}),t.children&&t.children.length>0&&e.jsxs("div",{className:"glass rounded-[20px] p-4 space-y-3",children:[e.jsxs("h3",{className:"text-sm font-semibold flex items-center gap-2",children:[e.jsx(pe,{className:"h-4 w-4 text-primary"}),"Child Tickets (",t.children.length,")",e.jsxs("span",{className:"ml-auto text-xs text-muted-foreground",children:[t.children.filter(s=>s.status==="done").length,"/",t.children.length," done"]})]}),e.jsx("div",{className:"h-2 bg-muted rounded-full overflow-hidden",children:e.jsx("div",{className:"h-full bg-gradient-to-r from-green-500 to-emerald-400 transition-all",style:{width:`${t.children.filter(s=>s.status==="done").length/t.children.length*100}%`}})}),e.jsx("div",{className:"space-y-2 max-h-[300px] overflow-y-auto",children:t.children.map(s=>e.jsxs(V,{to:`/tickets/${s.id}`,className:"flex items-center gap-3 p-2 rounded-lg bg-white/5 hover:bg-white/10 transition-colors group",children:[e.jsx("div",{className:`flex-shrink-0 ${s.status==="done"?"text-green-500":s.status==="in_progress"?"text-blue-500":"text-muted-foreground"}`,children:s.status==="done"?e.jsx(J,{className:"h-4 w-4"}):s.status==="in_progress"?e.jsx(fe,{className:"h-4 w-4"}):e.jsx(se,{className:"h-4 w-4"})}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("p",{className:"text-xs font-mono text-muted-foreground mb-0.5",children:[s.projectKey||"PROFCLAW","-",s.sequence]}),e.jsx("p",{className:`text-sm truncate group-hover:text-primary transition-colors ${s.status==="done"?"line-through text-muted-foreground":""}`,children:s.title})]}),e.jsx("span",{className:"text-[10px] text-muted-foreground capitalize",children:s.type})]},s.id))})]}),e.jsxs("div",{className:"glass rounded-[20px] p-4 space-y-3",children:[e.jsx("h3",{className:"text-sm font-semibold",children:"Timestamps"}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex justify-between items-center",children:[e.jsx("span",{className:"text-xs text-muted-foreground",children:"Created"}),e.jsx("span",{className:"text-xs",children:new Date(t.createdAt).toLocaleString()})]}),e.jsxs("div",{className:"flex justify-between items-center",children:[e.jsx("span",{className:"text-xs text-muted-foreground",children:"Updated"}),e.jsx("span",{className:"text-xs",children:new Date(t.updatedAt).toLocaleString()})]}),t.startedAt&&e.jsxs("div",{className:"flex justify-between items-center",children:[e.jsx("span",{className:"text-xs text-muted-foreground",children:"Started"}),e.jsx("span",{className:"text-xs",children:new Date(t.startedAt).toLocaleString()})]}),t.completedAt&&e.jsxs("div",{className:"flex justify-between items-center",children:[e.jsx("span",{className:"text-xs text-muted-foreground",children:"Completed"}),e.jsx("span",{className:"text-xs",children:new Date(t.completedAt).toLocaleString()})]})]})]}),v&&e.jsxs("div",{className:"glass rounded-[20px] p-4 space-y-3",children:[e.jsxs("h3",{className:"text-sm font-semibold flex items-center gap-2",children:[e.jsx(Ls,{className:"h-4 w-4 text-primary"}),"AI Summary"]}),q?e.jsxs("div",{className:"flex items-center gap-2 text-xs text-muted-foreground",children:[e.jsx(w,{className:"h-3 w-3 animate-spin"}),"Generating summary..."]}):_?.summary?e.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed",children:_.summary}):e.jsx("p",{className:"text-xs text-muted-foreground italic",children:"Summary not available"})]}),e.jsxs("div",{className:"glass rounded-[20px] p-4 space-y-3",children:[e.jsxs("h3",{className:"text-sm font-semibold flex items-center gap-2",children:[e.jsx(xe,{className:"h-4 w-4 text-primary"}),"Similar Tickets"]}),z?e.jsxs("div",{className:"flex items-center gap-2 text-xs text-muted-foreground",children:[e.jsx(w,{className:"h-3 w-3 animate-spin"}),"Finding similar tickets..."]}):F?.similar&&F.similar.length>0?e.jsx("div",{className:"space-y-2",children:F.similar.map(s=>e.jsxs(V,{to:`/tickets/${s.id}`,className:"block p-2 rounded-lg bg-white/5 hover:bg-white/10 transition-colors group",children:[e.jsxs("div",{className:"flex items-start justify-between gap-2",children:[e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-1.5 mb-0.5",children:[e.jsx(Te,{className:"h-3 w-3 text-muted-foreground"}),e.jsxs("span",{className:"text-[10px] font-mono text-muted-foreground",children:[s.projectKey||"PROFCLAW","-",s.sequence]})]}),e.jsx("p",{className:"text-xs font-medium truncate group-hover:text-primary transition-colors",children:s.title})]}),e.jsxs(M,{variant:"outline",className:"text-[10px] px-1.5 py-0 flex-shrink-0 tabular-nums",children:[Math.round(s.similarity*100),"%"]})]}),e.jsxs("div",{className:"flex items-center gap-1.5 mt-1",children:[e.jsx(M,{variant:s.status==="done"?"success":s.status==="in_progress"?"info":"secondary",className:"text-[9px] px-1 py-0",children:s.status.replace("_"," ")}),e.jsx("span",{className:"text-[10px] text-muted-foreground capitalize",children:s.type})]})]},s.id))}):e.jsxs("div",{className:"text-center py-4 text-muted-foreground",children:[e.jsx(Te,{className:"h-6 w-6 mx-auto mb-1 opacity-40"}),e.jsx("p",{className:"text-xs",children:"No similar tickets found"})]})]})]})]})]})}export{pt as TicketDetail};
@@ -0,0 +1 @@
1
+ import{u as oe,e as ie,r as L,j as e,L as ce}from"./vendor-react-Mc5_kfYG.js";import{b as O}from"./vendor-query-C0p7b53x.js";import{m as de,n as xe,I as Q,T as k,Q as Y,C as N,X as P,S as _,F as me,ag as U,B as H,i as S,L as ue,g as pe,k as E}from"./index-sEBN7w8J.js";import{B as M}from"./badge-BbfnwDJP.js";import{S as j,a as b,b as v,c as f,d as h}from"./select-n108rXny.js";import{P as he,a as ge,b as je}from"./popover-CFHZf3pE.js";import{V as be,C as ve}from"./ViewSwitcher-BvdQht2Y.js";import{E as fe}from"./EstimateSelect-wga0rUKX.js";import{I as G,C as T}from"./inbox-ehtOptTV.js";import{P as W}from"./play-tjy5jMQX.js";import{B as X,a as q}from"./bug-3WX0394-.js";import{L as J}from"./layers-C6Mhf8Nk.js";import{T as Ne}from"./tag-CH_vQliw.js";import{F as ye}from"./funnel-uZkoSPP-.js";import"./vendor-ui-CXPAUBFv.js";import"./chevron-up-4ymsBJRo.js";import"./textarea-CxDiKFXZ.js";import"./dialog-lDg4NvMV.js";import"./wand-sparkles-BaH6pJnc.js";import"./folder-open-CkOUbIiP.js";import"./link-2-CC4E28yJ.js";import"./hash-CA0hJ7vh.js";import"./lightbulb-CN2q1O5l.js";const we=[{value:"all",label:"All Status",icon:k},{value:"backlog",label:"Backlog",icon:G},{value:"todo",label:"Todo",icon:T},{value:"in_progress",label:"In Progress",icon:W},{value:"in_review",label:"In Review",icon:Y},{value:"done",label:"Done",icon:N},{value:"cancelled",label:"Cancelled",icon:P}],Ce=[{value:"all",label:"All Types",icon:k},{value:"task",label:"Task",icon:N},{value:"bug",label:"Bug",icon:X},{value:"feature",label:"Feature",icon:_},{value:"epic",label:"Epic",icon:J},{value:"story",label:"Story",icon:q},{value:"subtask",label:"Subtask",icon:T}],Se=[{value:"all",label:"All Priorities",color:"text-muted-foreground"},{value:"urgent",label:"Urgent",color:"text-red-500"},{value:"high",label:"High",color:"text-orange-500"},{value:"medium",label:"Medium",color:"text-yellow-500"},{value:"low",label:"Low",color:"text-blue-500"},{value:"none",label:"None",color:"text-gray-500"}],Pe=[{value:"all",label:"All Authors",icon:U},{value:"human",label:"Human",icon:U},{value:"ai",label:"AI",icon:H}];function We(){const Z=oe(),[r,V]=ie(),n=r.get("status")||"all",o=r.get("type")||"all",i=r.get("priority")||"all",l=r.get("project")||"all",c=r.get("createdBy")||"all",t=r.get("label")||"",[u,z]=L.useState(r.get("q")||""),[R,y]=L.useState(""),[x,w]=L.useState(0),p=20,{data:ee}=O({queryKey:["projects-list"],queryFn:()=>E.projects.list({limit:100})}),C=ee?.projects??[],{data:ae}=O({queryKey:["labels-global"],queryFn:async()=>{const a=C[0];return a?E.labels.list(a.id,{includeGlobal:!0}):{labels:[],total:0}},enabled:C.length>0}),D=ae?.labels??[],d=(a,s)=>{const m=new URLSearchParams(r);s==="all"||s===""?m.delete(a):m.set(a,s),V(m),w(0)},se=()=>{V({}),z(""),y(""),w(0)},I=n!=="all"||o!=="all"||i!=="all"||l!=="all"||c!=="all"||t||u,{data:$,isLoading:le,error:K}=O({queryKey:["tickets",{status:n==="all"?void 0:n,type:o==="all"?void 0:o,priority:i==="all"?void 0:i,projectId:l==="all"?void 0:l,createdBy:c==="all"?void 0:c,label:t||void 0,search:u||void 0,limit:p,offset:x*p}],queryFn:()=>E.tickets.list({status:n==="all"?void 0:n,type:o==="all"?void 0:o,priority:i==="all"?void 0:i,projectId:l==="all"?void 0:l,createdBy:c==="all"?void 0:c,label:t||void 0,search:u||void 0,limit:p,offset:x*p})}),g=$?.tickets??[],B=$?.total??0,te=a=>{const m={done:{variant:"success",icon:N},cancelled:{variant:"destructive",icon:P},in_progress:{variant:"info",icon:W},in_review:{variant:"warning",icon:Y},todo:{variant:"secondary",icon:T},backlog:{variant:"secondary",icon:G}}[a]||{variant:"secondary",icon:pe},{variant:A,icon:F}=m;return e.jsxs(M,{variant:A,className:"gap-1",children:[e.jsx(F,{className:"h-3 w-3"}),a.replace("_"," ")]})},re=a=>{const m={task:{icon:N,color:"text-blue-500"},bug:{icon:X,color:"text-red-500"},feature:{icon:_,color:"text-cyan-500"},enhancement:{icon:_,color:"text-indigo-500"},documentation:{icon:q,color:"text-cyan-500"},epic:{icon:J,color:"text-orange-500"},story:{icon:q,color:"text-green-500"},subtask:{icon:T,color:"text-gray-500"}}[a]||{icon:k,color:"text-gray-500"},{icon:A,color:F}=m;return e.jsxs("span",{className:`flex items-center gap-1 text-xs ${F}`,children:[e.jsx(A,{className:"h-3 w-3"}),a]})},ne=a=>{const s={urgent:"bg-red-500",high:"bg-orange-500",medium:"bg-yellow-500",low:"bg-blue-500",none:"bg-gray-400"};return e.jsx("div",{className:`h-2 w-2 rounded-full ${s[a]}`,title:a})};return K?e.jsxs("div",{className:"premium-card rounded-[24px] p-12 text-center",children:[e.jsx(de,{className:"h-12 w-12 mx-auto text-red-400 mb-4"}),e.jsx("p",{className:"text-lg font-bold text-red-400",children:"Error loading tickets"}),e.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:K.message})]}):e.jsxs("div",{className:"space-y-6",children:[e.jsxs("header",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-2xl font-bold tracking-tight",children:"Tickets"}),e.jsxs("p",{className:"text-muted-foreground text-sm",children:[B," total tickets • ",g.length," showing"]})]}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(be,{view:"list",onChange:a=>{a==="board"&&Z("/tickets/board")}}),e.jsx(ve,{})]})]}),e.jsxs("div",{className:"premium-card rounded-[20px] p-4 bg-muted/20",children:[e.jsxs("div",{className:"flex flex-col gap-4 lg:flex-row lg:items-center",children:[e.jsxs("div",{className:"relative flex-1",children:[e.jsx(xe,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"}),e.jsx(Q,{placeholder:"Search tickets by title or description...",value:u,onChange:a=>{z(a.target.value),d("q",a.target.value)},className:"pl-10 h-10"})]}),e.jsxs("div",{className:"flex flex-wrap gap-2",children:[e.jsxs(j,{value:n,onValueChange:a=>d("status",a),children:[e.jsx(b,{className:"w-[140px]",children:e.jsx(v,{placeholder:"Status"})}),e.jsx(f,{className:"glass-heavy rounded-xl border-white/10",children:we.map(a=>e.jsx(h,{value:a.value,children:e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsx(a.icon,{className:"h-3.5 w-3.5"}),a.label]})},a.value))})]}),e.jsxs(j,{value:o,onValueChange:a=>d("type",a),children:[e.jsx(b,{className:"w-[130px]",children:e.jsx(v,{placeholder:"Type"})}),e.jsx(f,{className:"glass-heavy rounded-xl border-white/10",children:Ce.map(a=>e.jsx(h,{value:a.value,children:e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsx(a.icon,{className:"h-3.5 w-3.5"}),a.label]})},a.value))})]}),e.jsxs(j,{value:i,onValueChange:a=>d("priority",a),children:[e.jsx(b,{className:"w-[140px]",children:e.jsx(v,{placeholder:"Priority"})}),e.jsx(f,{className:"glass-heavy rounded-xl border-white/10",children:Se.map(a=>e.jsx(h,{value:a.value,children:e.jsx("span",{className:`flex items-center gap-2 ${a.color}`,children:a.label})},a.value))})]}),e.jsxs(j,{value:l,onValueChange:a=>d("project",a),children:[e.jsx(b,{className:"w-[150px]",children:e.jsx(v,{placeholder:"Project"})}),e.jsxs(f,{className:"glass-heavy rounded-xl border-white/10",children:[e.jsx(h,{value:"all",children:e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsx(me,{className:"h-3.5 w-3.5"}),"All Projects"]})}),C.map(a=>e.jsx(h,{value:a.id,children:e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsx("span",{children:a.icon}),a.name]})},a.id))]})]}),e.jsxs(j,{value:c,onValueChange:a=>d("createdBy",a),children:[e.jsx(b,{className:"w-[130px]",children:e.jsx(v,{placeholder:"Author"})}),e.jsx(f,{className:"glass-heavy rounded-xl border-white/10",children:Pe.map(a=>e.jsx(h,{value:a.value,children:e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsx(a.icon,{className:"h-3.5 w-3.5"}),a.label]})},a.value))})]}),e.jsxs(he,{children:[e.jsx(ge,{asChild:!0,children:e.jsxs(S,{variant:"outline",size:"sm",className:`w-[130px] justify-start ${t?"text-primary":""}`,children:[e.jsx(Ne,{className:"h-3.5 w-3.5 mr-2"}),t||"Label"]})}),e.jsxs(je,{className:"w-64 p-0 glass-heavy rounded-xl border-white/10",align:"start",children:[e.jsx("div",{className:"p-2 border-b border-white/5",children:e.jsx(Q,{placeholder:"Search labels...",value:R,onChange:a=>y(a.target.value),className:"h-8 bg-transparent border-white/10"})}),e.jsxs("div",{className:"max-h-64 overflow-y-auto p-1",children:[e.jsxs("button",{type:"button",onClick:()=>{d("label",""),y("")},className:"flex w-full items-center gap-2 rounded-lg px-2 py-1.5 text-sm hover:bg-white/5",children:[e.jsx(P,{className:"h-3.5 w-3.5 text-muted-foreground"}),e.jsx("span",{children:"Clear label filter"})]}),D.filter(a=>a.name.toLowerCase().includes(R.toLowerCase())).map(a=>e.jsxs("button",{type:"button",onClick:()=>{d("label",a.name),y("")},className:`flex w-full items-center gap-2 rounded-lg px-2 py-1.5 text-sm hover:bg-white/5 ${t===a.name?"bg-primary/10":""}`,children:[e.jsx("span",{className:"h-3 w-3 rounded-full shrink-0",style:{backgroundColor:a.color}}),e.jsx("span",{className:"truncate",children:a.name}),t===a.name&&e.jsx(N,{className:"h-3.5 w-3.5 ml-auto text-primary"})]},a.id)),D.length===0&&e.jsx("p",{className:"p-2 text-sm text-muted-foreground text-center",children:"No labels available"})]})]})]}),I&&e.jsxs(S,{variant:"ghost",size:"sm",onClick:se,className:"rounded-xl text-muted-foreground hover:text-foreground",children:[e.jsx(P,{className:"h-4 w-4 mr-1"}),"Clear"]})]})]}),I&&e.jsxs("div",{className:"flex flex-wrap gap-2 mt-3 pt-3 border-t border-white/5",children:[e.jsx(ye,{className:"h-4 w-4 text-muted-foreground"}),n!=="all"&&e.jsxs("span",{className:"px-2 py-0.5 rounded-lg bg-blue-500/10 text-blue-400 text-xs font-medium",children:["Status: ",n]}),o!=="all"&&e.jsxs("span",{className:"px-2 py-0.5 rounded-lg bg-indigo-500/10 text-indigo-400 text-xs font-medium capitalize",children:["Type: ",o]}),i!=="all"&&e.jsxs("span",{className:"px-2 py-0.5 rounded-lg bg-orange-500/10 text-orange-400 text-xs font-medium capitalize",children:["Priority: ",i]}),l!=="all"&&e.jsxs("span",{className:"px-2 py-0.5 rounded-lg bg-indigo-500/10 text-indigo-400 text-xs font-medium",children:["Project: ",C.find(a=>a.id===l)?.name||l]}),c!=="all"&&e.jsxs("span",{className:"px-2 py-0.5 rounded-lg bg-cyan-500/10 text-cyan-400 text-xs font-medium capitalize",children:["Author: ",c]}),t&&e.jsxs("span",{className:"px-2 py-0.5 rounded-lg bg-pink-500/10 text-pink-400 text-xs font-medium",children:["Label: ",t]}),u&&e.jsxs("span",{className:"px-2 py-0.5 rounded-lg bg-green-500/10 text-green-400 text-xs font-medium",children:['Search: "',u,'"']})]})]}),le?e.jsx("div",{className:"premium-card rounded-[28px] p-12 flex items-center justify-center",children:e.jsx(ue,{className:"h-8 w-8 animate-spin text-muted-foreground"})}):g.length===0?e.jsxs("div",{className:"premium-card rounded-[24px] p-12 text-center",children:[e.jsx(k,{className:"h-12 w-12 mx-auto text-muted-foreground/40 mb-4"}),e.jsx("p",{className:"text-lg font-bold text-muted-foreground",children:"No tickets found"}),e.jsx("p",{className:"text-sm text-muted-foreground/60 mt-1",children:I?"Try adjusting your filters":"Create a ticket to get started"})]}):e.jsx("div",{className:"space-y-2",children:g.map(a=>e.jsx(ce,{to:`/tickets/${a.id}`,className:"block premium-card border-none hover:bg-muted/30 transition-all group",children:e.jsx("div",{className:"flex items-start justify-between gap-4",children:e.jsxs("div",{className:"flex items-start gap-3 flex-1 min-w-0",children:[e.jsx("div",{className:"pt-1",children:ne(a.priority)}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-3 mb-1",children:[e.jsxs("span",{className:"text-xs font-mono text-muted-foreground",children:[a.projectKey||"PROFCLAW","-",a.sequence]}),!a.projectId&&e.jsx("span",{className:"text-[9px] font-bold uppercase tracking-wider text-amber-400 px-1.5 py-0.5 rounded bg-amber-500/10 border border-amber-500/20",children:"No Project"}),e.jsx("h3",{className:"font-semibold truncate group-hover:text-primary transition-colors",children:a.title})]}),a.description&&e.jsx("p",{className:"text-sm text-muted-foreground line-clamp-1 mb-2",children:a.description}),e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[re(a.type),te(a.status),a.assigneeAgent&&e.jsxs("span",{className:"flex items-center gap-1 text-[10px] font-bold uppercase tracking-wider text-primary/80 px-2 py-0.5 rounded-md bg-primary/10",children:[e.jsx(H,{className:"h-3 w-3"}),a.assigneeAgent]}),a.createdBy==="ai"&&e.jsx("span",{className:"text-[10px] font-bold uppercase tracking-wider text-blue-400 px-2 py-0.5 rounded-md bg-blue-500/10",children:"AI Created"}),a.labels.slice(0,3).map(s=>e.jsx(M,{variant:"outline",className:"text-[10px] px-1.5 py-0",children:s},s)),a.estimate!=null&&e.jsx(fe,{value:a.estimate}),e.jsx("span",{className:"text-[10px] text-muted-foreground/50 ml-auto",children:new Date(a.createdAt).toLocaleDateString()})]})]})]})})},a.id))}),g.length>0&&e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("p",{className:"text-sm text-muted-foreground",children:["Page ",x+1," • Showing ",Math.min(g.length,p)," of ",B]}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx(S,{variant:"outline",size:"sm",onClick:()=>w(x-1),disabled:x===0,className:"rounded-xl border-white/10",children:"Previous"}),e.jsx(S,{variant:"outline",size:"sm",onClick:()=>w(x+1),disabled:(x+1)*p>=B,className:"rounded-xl border-white/10",children:"Next"})]})]})]})}export{We as TicketList};
@@ -0,0 +1,2 @@
1
+ import{r as l,j as e}from"./vendor-react-Mc5_kfYG.js";import{u as J,b as Z,c as w}from"./vendor-query-C0p7b53x.js";import{t as a,z as U,a5 as _,i as r,R as G,h as N,n as V,L as T,aZ as W,C as R,D as Y,o as ee,p as se,aX as te,ah as v,q as m,K as ae,ab as E,x as F,y as P}from"./index-sEBN7w8J.js";import{A as re,a as le,b as ne,c as de,d as ie,e as oe,f as ce,g as me}from"./alert-dialog-O6qBOv_f.js";import{C as M}from"./circle-x-ByXtwR6Y.js";import{E as xe}from"./ellipsis-vT-5SVIp.js";import{S as ue}from"./shield-off-DN3tagkn.js";import{T as he}from"./trash-2-CucZJL0N.js";import"./vendor-ui-CXPAUBFv.js";const x="http://localhost:3000";function Ce(){const u=J(),[h,L]=l.useState(""),[n,q]=l.useState(null),[$,p]=l.useState(!1),[d,b]=l.useState(null),[y,C]=l.useState(null),[i,j]=l.useState(null),{data:o,isLoading:g,error:S,refetch:Q}=Z({queryKey:["admin","users"],queryFn:async()=>{const s=await fetch(`${x}/api/users/admin/list`,{credentials:"include"});if(!s.ok)throw s.status===403?new Error("Admin access required"):new Error("Failed to fetch users");return s.json()}}),k=w({mutationFn:async({userId:s,updates:t})=>{const c=await fetch(`${x}/api/users/admin/${s}`,{method:"PATCH",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify(t)});if(!c.ok)throw new Error("Failed to update user");return c.json()},onSuccess:()=>{u.invalidateQueries({queryKey:["admin","users"]}),a.success("User updated")},onError:()=>a.error("Failed to update user")}),f=w({mutationFn:async s=>{const t=await fetch(`${x}/api/users/admin/${s}/reset-password`,{method:"POST",credentials:"include"});if(!t.ok)throw new Error("Failed to reset password");return t.json()},onSuccess:s=>{b({password:s.temporaryPassword,codes:s.recoveryCodes}),u.invalidateQueries({queryKey:["admin","users"]}),a.success("Password reset successfully")},onError:()=>a.error("Failed to reset password")}),I=w({mutationFn:async s=>{const t=await fetch(`${x}/api/users/admin/${s}`,{method:"DELETE",credentials:"include"});if(!t.ok){const c=await t.json().catch(()=>({error:"Failed to delete user"}));throw new Error(c.error||"Failed to delete user")}return t.json()},onSuccess:()=>{u.invalidateQueries({queryKey:["admin","users"]}),a.success("User deleted")},onError:s=>a.error(s.message)}),A=(s,t)=>{navigator.clipboard.writeText(s),C(t),setTimeout(()=>C(null),2e3),a.success(`${t} copied`)},D=o?.users?.filter(s=>s.name.toLowerCase().includes(h.toLowerCase())||s.email.toLowerCase().includes(h.toLowerCase()))||[],K=s=>{const t=s.role==="admin"?"user":"admin";k.mutate({userId:s.id,updates:{role:t}})},z=s=>{const t=s.status==="active"?"suspended":"active";k.mutate({userId:s.id,updates:{status:t}})},O=s=>{q(s),p(!0),b(null)},B=()=>{n&&f.mutate(n.id)},H=s=>{j(s)},X=()=>{i&&(I.mutate(i.id),j(null))};return S?e.jsx("div",{className:"p-6",children:e.jsxs("div",{className:"flex flex-col items-center justify-center py-16 text-center",children:[e.jsx(U,{className:"h-12 w-12 text-destructive mb-4"}),e.jsx("h2",{className:"text-xl font-semibold mb-2",children:"Access Denied"}),e.jsx("p",{className:"text-muted-foreground",children:S.message})]})}):e.jsxs("div",{className:"p-6 space-y-6",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsxs("h1",{className:"text-2xl font-bold flex items-center gap-3",children:[e.jsx(_,{className:"h-6 w-6"}),"User Management"]}),e.jsx("p",{className:"text-muted-foreground mt-1",children:"Manage user accounts, roles, and permissions"})]}),e.jsxs(r,{variant:"outline",onClick:()=>Q(),disabled:g,className:"rounded-xl",children:[e.jsx(G,{className:N("h-4 w-4 mr-2",g&&"animate-spin")}),"Refresh"]})]}),e.jsxs("div",{className:"relative max-w-md",children:[e.jsx(V,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"}),e.jsx("input",{type:"text",placeholder:"Search users...",value:h,onChange:s=>L(s.target.value),className:"w-full pl-10 pr-4 py-2 field-lg"})]}),e.jsx("div",{className:"rounded-2xl glass shadow-lg overflow-hidden",children:e.jsx("div",{className:"overflow-x-auto",children:e.jsxs("table",{className:"w-full",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"border-b border-white/5 bg-muted/30",children:[e.jsx("th",{className:"text-left p-4 text-xs font-semibold uppercase tracking-wider text-muted-foreground",children:"User"}),e.jsx("th",{className:"text-left p-4 text-xs font-semibold uppercase tracking-wider text-muted-foreground",children:"Role"}),e.jsx("th",{className:"text-left p-4 text-xs font-semibold uppercase tracking-wider text-muted-foreground",children:"Status"}),e.jsx("th",{className:"text-left p-4 text-xs font-semibold uppercase tracking-wider text-muted-foreground",children:"Created"}),e.jsx("th",{className:"text-right p-4 text-xs font-semibold uppercase tracking-wider text-muted-foreground",children:"Actions"})]})}),e.jsx("tbody",{children:g?e.jsx("tr",{children:e.jsx("td",{colSpan:5,className:"p-8 text-center",children:e.jsx(T,{className:"h-6 w-6 animate-spin mx-auto text-muted-foreground"})})}):D.length===0?e.jsx("tr",{children:e.jsx("td",{colSpan:5,className:"p-8 text-center text-muted-foreground",children:"No users found"})}):D.map(s=>e.jsxs("tr",{className:"border-b border-white/5 last:border-0 hover:bg-muted/20 transition-colors",children:[e.jsx("td",{className:"p-4",children:e.jsxs("div",{className:"flex items-center gap-3",children:[s.avatarUrl?e.jsx("img",{src:s.avatarUrl,alt:s.name,className:"h-10 w-10 rounded-full ring-1 ring-white/10"}):e.jsx("div",{className:"h-10 w-10 rounded-full bg-gradient-to-br from-primary to-primary/60 ring-1 ring-white/10 flex items-center justify-center text-sm font-medium text-white",children:s.name.charAt(0).toUpperCase()}),e.jsxs("div",{children:[e.jsx("p",{className:"font-medium",children:s.name}),e.jsx("p",{className:"text-sm text-muted-foreground",children:s.email})]})]})}),e.jsx("td",{className:"p-4",children:e.jsxs("span",{className:N("inline-flex items-center gap-1.5 px-2.5 py-1 rounded-full text-xs font-semibold",s.role==="admin"?"bg-red-500/10 text-red-500":"bg-blue-500/10 text-blue-500"),children:[s.role==="admin"&&e.jsx(W,{className:"h-3 w-3"}),s.role]})}),e.jsx("td",{className:"p-4",children:e.jsxs("span",{className:N("inline-flex items-center gap-1.5 px-2.5 py-1 rounded-full text-xs font-semibold",s.status==="active"?"bg-green-500/10 text-green-500":"bg-amber-500/10 text-amber-500"),children:[s.status==="active"?e.jsx(R,{className:"h-3 w-3"}):e.jsx(M,{className:"h-3 w-3"}),s.status]})}),e.jsx("td",{className:"p-4 text-sm text-muted-foreground",children:new Date(s.createdAt).toLocaleDateString()}),e.jsx("td",{className:"p-4",children:e.jsx("div",{className:"flex items-center justify-end gap-2",children:e.jsxs(Y,{children:[e.jsx(ee,{asChild:!0,children:e.jsx(r,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0 rounded-lg",children:e.jsx(xe,{className:"h-4 w-4"})})}),e.jsxs(se,{align:"end",className:"w-48",children:[e.jsx(te,{children:"Actions"}),e.jsx(v,{}),e.jsx(m,{onClick:()=>K(s),children:s.role==="admin"?e.jsxs(e.Fragment,{children:[e.jsx(ue,{className:"h-4 w-4 mr-2"}),"Remove Admin"]}):e.jsxs(e.Fragment,{children:[e.jsx(ae,{className:"h-4 w-4 mr-2"}),"Make Admin"]})}),e.jsx(m,{onClick:()=>z(s),children:s.status==="active"?e.jsxs(e.Fragment,{children:[e.jsx(M,{className:"h-4 w-4 mr-2"}),"Suspend User"]}):e.jsxs(e.Fragment,{children:[e.jsx(R,{className:"h-4 w-4 mr-2"}),"Activate User"]})}),e.jsx(v,{}),e.jsxs(m,{onClick:()=>O(s),children:[e.jsx(E,{className:"h-4 w-4 mr-2"}),"Reset Password"]}),e.jsx(v,{}),e.jsxs(m,{onClick:()=>H(s),className:"text-destructive focus:text-destructive",children:[e.jsx(he,{className:"h-4 w-4 mr-2"}),"Delete User"]})]})]})})})]},s.id))})]})})}),e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-4",children:[e.jsxs("div",{className:"p-4 rounded-2xl glass shadow-lg",children:[e.jsx("p",{className:"text-sm text-muted-foreground",children:"Total Users"}),e.jsx("p",{className:"text-2xl font-bold",children:o?.total||0})]}),e.jsxs("div",{className:"p-4 rounded-2xl glass shadow-lg",children:[e.jsx("p",{className:"text-sm text-muted-foreground",children:"Admins"}),e.jsx("p",{className:"text-2xl font-bold text-red-500",children:o?.users?.filter(s=>s.role==="admin").length||0})]}),e.jsxs("div",{className:"p-4 rounded-2xl glass shadow-lg",children:[e.jsx("p",{className:"text-sm text-muted-foreground",children:"Active"}),e.jsx("p",{className:"text-2xl font-bold text-green-500",children:o?.users?.filter(s=>s.status==="active").length||0})]})]}),e.jsx(re,{open:!!i,onOpenChange:s=>!s&&j(null),children:e.jsxs(le,{children:[e.jsxs(ne,{children:[e.jsx(de,{children:"Delete User"}),e.jsxs(ie,{children:["Are you sure you want to delete ",e.jsx("strong",{children:i?.name}),"? This action cannot be undone and will remove all associated data."]})]}),e.jsxs(oe,{children:[e.jsx(ce,{className:"rounded-xl",children:"Cancel"}),e.jsx(me,{onClick:X,className:"rounded-xl bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"Delete User"})]})]})}),$&&n&&e.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50 backdrop-blur-sm",children:e.jsxs("div",{className:"glass-heavy rounded-2xl shadow-2xl w-full max-w-md mx-4 p-6",children:[e.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[e.jsx("div",{className:"h-12 w-12 rounded-full bg-amber-500/10 flex items-center justify-center",children:e.jsx(E,{className:"h-6 w-6 text-amber-500"})}),e.jsxs("div",{children:[e.jsx("h3",{className:"font-semibold",children:"Reset Password"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:n.name})]})]}),d?e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"p-4 rounded-xl bg-muted/30",children:[e.jsx("p",{className:"text-xs text-muted-foreground mb-1",children:"Temporary Password"}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("code",{className:"flex-1 font-mono text-sm",children:d.password}),e.jsx(r,{size:"sm",variant:"ghost",className:"h-8 w-8 p-0",onClick:()=>A(d.password,"Password"),children:y==="Password"?e.jsx(F,{className:"h-4 w-4 text-green-500"}):e.jsx(P,{className:"h-4 w-4"})})]})]}),e.jsxs("div",{className:"p-4 rounded-xl bg-muted/30",children:[e.jsx("p",{className:"text-xs text-muted-foreground mb-2",children:"Recovery Codes"}),e.jsx("div",{className:"grid grid-cols-2 gap-2",children:d.codes.map((s,t)=>e.jsx("code",{className:"text-xs font-mono bg-background px-2 py-1 rounded",children:s},t))}),e.jsxs(r,{size:"sm",variant:"outline",className:"w-full mt-3 rounded-xl",onClick:()=>A(d.codes.join(`
2
+ `),"Codes"),children:[y==="Codes"?e.jsx(F,{className:"h-4 w-4 mr-2 text-green-500"}):e.jsx(P,{className:"h-4 w-4 mr-2"}),"Copy All Codes"]})]}),e.jsxs("p",{className:"text-xs text-amber-500 flex items-start gap-2",children:[e.jsx(U,{className:"h-4 w-4 flex-shrink-0 mt-0.5"}),"Share these credentials securely. The user must change their password on next login."]}),e.jsx(r,{className:"w-full rounded-xl",onClick:()=>p(!1),children:"Done"})]}):e.jsxs("div",{className:"space-y-4",children:[e.jsxs("p",{className:"text-sm text-muted-foreground",children:["This will generate a new temporary password and recovery codes for"," ",e.jsx("strong",{children:n.email}),". All existing sessions will be revoked."]}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx(r,{variant:"outline",className:"flex-1 rounded-xl",onClick:()=>p(!1),children:"Cancel"}),e.jsx(r,{className:"flex-1 rounded-xl",onClick:B,disabled:f.isPending,children:f.isPending?e.jsx(T,{className:"h-4 w-4 animate-spin"}):"Reset Password"})]})]})]})})]})}export{Ce as UserManagement};
@@ -0,0 +1 @@
1
+ import{r as a,j as e}from"./vendor-react-Mc5_kfYG.js";import{u as xe,b as E,c as B}from"./vendor-query-C0p7b53x.js";import{c as se,t as n,k as m,i as l,P as X,G as ue,l as c,I as J,L as N,h as V,C as he,S as ge,X as pe,x as q}from"./index-sEBN7w8J.js";import{T as je}from"./textarea-CxDiKFXZ.js";import{B as O}from"./badge-BbfnwDJP.js";import{D as fe,a as Ne,b as be,c as ve,d as ye,e as we,f as ke}from"./dialog-lDg4NvMV.js";import{S as b,a as v,b as y,c as w,d as x}from"./select-n108rXny.js";import{a as Ce}from"./EstimateSelect-wga0rUKX.js";import{W as Z}from"./wand-sparkles-BaH6pJnc.js";import{F as Se}from"./folder-open-CkOUbIiP.js";import{L as _e}from"./link-2-CC4E28yJ.js";import{L as te}from"./layers-C6Mhf8Nk.js";import{a as ae,B as ze}from"./bug-3WX0394-.js";import{C as Ie}from"./inbox-ehtOptTV.js";import{H as Ae}from"./hash-CA0hJ7vh.js";import{L as ee}from"./lightbulb-CN2q1O5l.js";const Te=[["path",{d:"M5 3v14",key:"9nsxs2"}],["path",{d:"M12 3v8",key:"1h2ygw"}],["path",{d:"M19 3v18",key:"1sk56x"}]],Le=se("kanban",Te);const Pe=[["path",{d:"M3 5h.01",key:"18ugdj"}],["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 19h.01",key:"noohij"}],["path",{d:"M8 5h13",key:"1pao27"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 19h13",key:"m83p4d"}]],Fe=se("list",Pe),Me=[{value:"task",label:"Task",icon:he},{value:"bug",label:"Bug",icon:ze},{value:"feature",label:"Feature",icon:ge},{value:"epic",label:"Epic",icon:te},{value:"story",label:"Story",icon:ae},{value:"subtask",label:"Subtask",icon:Ie}],De=[{value:"urgent",label:"Urgent",color:"text-red-500"},{value:"high",label:"High",color:"text-orange-500"},{value:"medium",label:"Medium",color:"text-yellow-500"},{value:"low",label:"Low",color:"text-blue-500"},{value:"none",label:"None",color:"text-gray-500"}];function Ze({defaultProjectId:u,defaultParentId:h}={}){const[K,R]=a.useState(!1),[i,k]=a.useState(""),[g,C]=a.useState(""),[S,_]=a.useState("task"),[$,z]=a.useState("medium"),[H,p]=a.useState(""),[I,W]=a.useState(null),[j,Q]=a.useState(u),[G,A]=a.useState(h),[T,L]=a.useState(null),[t,U]=a.useState(null),[ie,P]=a.useState(!1),re=xe(),{data:ne}=E({queryKey:["ai-status"],queryFn:()=>m.tickets.ai.status(),staleTime:6e4}),{data:le}=E({queryKey:["projects"],queryFn:()=>m.projects.list({limit:50})}),{data:ce}=E({queryKey:["tickets","parents",j],queryFn:()=>m.tickets.list({projectId:j||void 0,type:["epic","story"],limit:50}),enabled:K}),oe=le?.projects||[],f=ce?.tickets||[],o=ne?.available??!1,d=B({mutationFn:()=>m.tickets.ai.categorize(i,g||void 0),onSuccess:s=>{s.categorization?(L(s.categorization),_(s.categorization.type),z(s.categorization.priority),s.categorization.labels.length>0&&p(s.categorization.labels.join(", ")),n.success(`AI categorized with ${Math.round(s.categorization.confidence*100)}% confidence`)):n.error("AI could not categorize this ticket")},onError:()=>{n.error("AI categorization failed")}}),F=B({mutationFn:()=>m.tickets.ai.suggest(i,g||void 0,S),onSuccess:s=>{s.suggestions?(U(s.suggestions),P(!0)):n.error("AI could not generate suggestions")},onError:()=>{n.error("AI suggestion failed")}});a.useEffect(()=>{if(o&&i.length>=10&&!T&&!d.isPending){const s=setTimeout(()=>{d.mutate()},1e3);return()=>clearTimeout(s)}},[i,o]);const M=(s,r)=>{s==="title"&&typeof r=="string"?k(r):s==="description"&&typeof r=="string"?C(r):s==="suggestedLabels"&&Array.isArray(r)&&p(r.join(", ")),n.success(`Applied AI suggestion for ${s}`)},D=B({mutationFn:s=>m.tickets.create(s),onSuccess:s=>{re.invalidateQueries({queryKey:["tickets"]}),n.success(`Ticket PROFCLAW-${s.ticket.sequence} created`),Y()},onError:s=>{n.error(`Failed to create ticket: ${s.message}`)}}),Y=()=>{R(!1),k(""),C(""),_("task"),z("medium"),p(""),W(null),Q(u),A(h),L(null),U(null),P(!1)},de=s=>{if(s.preventDefault(),!i.trim()){n.error("Title is required");return}const r=H.split(",").map(me=>me.trim()).filter(Boolean);D.mutate({title:i.trim(),description:g.trim()||void 0,type:S,priority:$,labels:r.length>0?r:void 0,estimate:I??void 0,estimateUnit:I!==null?"points":void 0,projectId:j||void 0,parentId:G||void 0,createdBy:"human"})};return e.jsxs(fe,{open:K,onOpenChange:R,children:[e.jsx(Ne,{asChild:!0,children:e.jsxs(l,{className:"gap-2 rounded-xl",children:[e.jsx(X,{className:"h-4 w-4"}),"Create Ticket"]})}),e.jsx(be,{className:"glass-heavy rounded-[20px] border-white/10 sm:max-w-[500px]",children:e.jsxs("form",{onSubmit:de,children:[e.jsxs(ve,{children:[e.jsxs(ye,{className:"flex items-center gap-2",children:["Create Ticket",o&&e.jsxs(O,{variant:"outline",className:"text-xs font-normal gap-1 border-primary/30 text-primary",children:[e.jsx(ue,{className:"h-3 w-3"}),"AI Assist"]})]}),e.jsxs(we,{children:["Create a new ticket for your project. ",o?"AI will help categorize and suggest improvements.":"AI agents can pick this up and work on it."]})]}),e.jsxs("div",{className:"grid gap-4 py-4",children:[e.jsxs("div",{className:"grid gap-2",children:[e.jsx(c,{htmlFor:"title",children:"Title *"}),e.jsx(J,{id:"title",placeholder:"Brief description of the ticket...",value:i,onChange:s=>{k(s.target.value),L(null)},className:"bg-white/5 border-white/10 rounded-xl",autoFocus:!0}),o&&i.length>=10&&e.jsx("div",{className:"flex items-center gap-2 text-xs",children:d.isPending?e.jsxs("span",{className:"flex items-center gap-1 text-muted-foreground",children:[e.jsx(N,{className:"h-3 w-3 animate-spin"}),"AI analyzing..."]}):T?e.jsxs("span",{className:"flex items-center gap-1 text-green-400",children:[e.jsx(Z,{className:"h-3 w-3"}),"AI categorized (",Math.round(T.confidence*100),"% confidence)"]}):null})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(c,{htmlFor:"description",children:"Description"}),e.jsx(je,{id:"description",placeholder:"Detailed description, acceptance criteria, etc...",value:g,onChange:s=>C(s.target.value),className:"bg-white/5 border-white/10 rounded-xl min-h-[100px] resize-none"})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsxs("div",{className:"grid gap-2",children:[e.jsxs(c,{className:"flex items-center gap-1.5",children:[e.jsx(Se,{className:"h-3.5 w-3.5 text-muted-foreground"}),"Project"]}),e.jsxs(b,{value:j||"__none__",onValueChange:s=>{Q(s==="__none__"?void 0:s),A(void 0)},children:[e.jsx(v,{className:"bg-white/5 border-white/10 rounded-xl",children:e.jsx(y,{placeholder:"Select project..."})}),e.jsxs(w,{className:"glass-heavy rounded-xl border-white/10",children:[e.jsx(x,{value:"__none__",children:e.jsx("span",{className:"text-muted-foreground",children:"No project"})}),oe.map(s=>e.jsx(x,{value:s.id,children:e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsx("span",{children:s.icon}),e.jsx("span",{className:"truncate",children:s.name}),e.jsx("span",{className:"text-[10px] font-mono text-muted-foreground",children:s.key})]})},s.id))]})]})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsxs(c,{className:"flex items-center gap-1.5",children:[e.jsx(_e,{className:"h-3.5 w-3.5 text-muted-foreground"}),"Parent (Epic/Story)"]}),e.jsxs(b,{value:G||"__none__",onValueChange:s=>A(s==="__none__"?void 0:s),disabled:f.length===0,children:[e.jsx(v,{className:V("bg-white/5 border-white/10 rounded-xl",f.length===0&&"opacity-50"),children:e.jsx(y,{placeholder:f.length===0?"No epics/stories":"Select parent..."})}),e.jsxs(w,{className:"glass-heavy rounded-xl border-white/10 max-h-[200px]",children:[e.jsx(x,{value:"__none__",children:e.jsx("span",{className:"text-muted-foreground",children:"No parent"})}),f.map(s=>e.jsx(x,{value:s.id,children:e.jsxs("span",{className:"flex items-center gap-2",children:[s.type==="epic"?e.jsx(te,{className:"h-3.5 w-3.5 text-amber-400"}):e.jsx(ae,{className:"h-3.5 w-3.5 text-cyan-400"}),e.jsxs("span",{className:"text-[10px] font-mono text-muted-foreground",children:[s.projectKey||"PROFCLAW","-",s.sequence]}),e.jsx("span",{className:"truncate max-w-[140px]",children:s.title})]})},s.id))]})]})]})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsxs("div",{className:"grid gap-2",children:[e.jsx(c,{children:"Type"}),e.jsxs(b,{value:S,onValueChange:s=>_(s),children:[e.jsx(v,{className:"bg-white/5 border-white/10 rounded-xl",children:e.jsx(y,{})}),e.jsx(w,{className:"glass-heavy rounded-xl border-white/10",children:Me.map(s=>e.jsx(x,{value:s.value,children:e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsx(s.icon,{className:"h-4 w-4"}),s.label]})},s.value))})]})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(c,{children:"Priority"}),e.jsxs(b,{value:$,onValueChange:s=>z(s),children:[e.jsx(v,{className:"bg-white/5 border-white/10 rounded-xl",children:e.jsx(y,{})}),e.jsx(w,{className:"glass-heavy rounded-xl border-white/10",children:De.map(s=>e.jsx(x,{value:s.value,children:e.jsx("span",{className:`flex items-center gap-2 ${s.color}`,children:s.label})},s.value))})]})]})]}),e.jsxs("div",{className:"grid grid-cols-3 gap-4",children:[e.jsxs("div",{className:"col-span-2 grid gap-2",children:[e.jsx(c,{htmlFor:"labels",children:"Labels"}),e.jsx(J,{id:"labels",placeholder:"Comma-separated labels (e.g., frontend, auth)",value:H,onChange:s=>p(s.target.value),className:"bg-white/5 border-white/10 rounded-xl"})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsxs(c,{className:"flex items-center gap-1.5",children:[e.jsx(Ae,{className:"h-3.5 w-3.5 text-muted-foreground"}),"Estimate"]}),e.jsx(Ce,{value:I,onChange:W,placeholder:"Points"})]})]}),o&&i.length>=5&&e.jsxs("div",{className:"flex gap-2",children:[e.jsxs(l,{type:"button",variant:"outline",size:"sm",onClick:()=>d.mutate(),disabled:d.isPending,className:"flex-1 gap-1 rounded-xl border-white/10 text-xs",children:[d.isPending?e.jsx(N,{className:"h-3 w-3 animate-spin"}):e.jsx(Z,{className:"h-3 w-3"}),"Re-categorize"]}),e.jsxs(l,{type:"button",variant:"outline",size:"sm",onClick:()=>F.mutate(),disabled:F.isPending,className:"flex-1 gap-1 rounded-xl border-white/10 text-xs",children:[F.isPending?e.jsx(N,{className:"h-3 w-3 animate-spin"}):e.jsx(ee,{className:"h-3 w-3"}),"Get AI Suggestions"]})]}),ie&&t&&e.jsxs("div",{className:"rounded-xl bg-primary/5 border border-primary/20 p-3 space-y-3",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("span",{className:"flex items-center gap-1 text-sm font-medium text-primary",children:[e.jsx(ee,{className:"h-4 w-4"}),"AI Suggestions"]}),e.jsx(l,{type:"button",variant:"ghost",size:"sm",onClick:()=>P(!1),className:"h-6 w-6 p-0 rounded-lg",children:e.jsx(pe,{className:"h-3 w-3"})})]}),t.title&&t.title!==i&&e.jsxs("div",{className:"flex items-start justify-between gap-2",children:[e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("p",{className:"text-xs text-muted-foreground mb-1",children:"Improved title:"}),e.jsx("p",{className:"text-sm truncate",children:t.title})]}),e.jsx(l,{type:"button",variant:"ghost",size:"sm",onClick:()=>M("title",t.title),className:"h-6 px-2 rounded-lg text-xs text-green-400 hover:text-green-300",children:e.jsx(q,{className:"h-3 w-3"})})]}),t.description&&e.jsxs("div",{className:"flex items-start justify-between gap-2",children:[e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("p",{className:"text-xs text-muted-foreground mb-1",children:"Suggested description:"}),e.jsx("p",{className:"text-sm line-clamp-2",children:t.description})]}),e.jsx(l,{type:"button",variant:"ghost",size:"sm",onClick:()=>M("description",t.description),className:"h-6 px-2 rounded-lg text-xs text-green-400 hover:text-green-300",children:e.jsx(q,{className:"h-3 w-3"})})]}),t.acceptanceCriteria&&t.acceptanceCriteria.length>0&&e.jsxs("div",{children:[e.jsx("p",{className:"text-xs text-muted-foreground mb-1",children:"Acceptance criteria:"}),e.jsx("ul",{className:"text-xs space-y-0.5 text-muted-foreground",children:t.acceptanceCriteria.slice(0,3).map((s,r)=>e.jsxs("li",{className:"flex items-start gap-1",children:[e.jsx("span",{className:"text-primary",children:"-"}),s]},r))})]}),t.suggestedLabels&&t.suggestedLabels.length>0&&e.jsxs("div",{className:"flex items-center justify-between gap-2",children:[e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("p",{className:"text-xs text-muted-foreground mb-1",children:"Suggested labels:"}),e.jsx("div",{className:"flex flex-wrap gap-1",children:t.suggestedLabels.map(s=>e.jsx(O,{variant:"secondary",className:"text-[10px] px-1.5 py-0",children:s},s))})]}),e.jsx(l,{type:"button",variant:"ghost",size:"sm",onClick:()=>M("suggestedLabels",t.suggestedLabels),className:"h-6 px-2 rounded-lg text-xs text-green-400 hover:text-green-300",children:e.jsx(q,{className:"h-3 w-3"})})]}),t.estimatedEffort&&e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("p",{className:"text-xs text-muted-foreground",children:"Estimated effort:"}),e.jsx(O,{variant:"outline",className:"text-[10px] capitalize",children:t.estimatedEffort})]})]})]}),e.jsxs(ke,{children:[e.jsx(l,{type:"button",variant:"ghost",onClick:Y,className:"rounded-xl",children:"Cancel"}),e.jsx(l,{type:"submit",disabled:!i.trim()||D.isPending,className:"gap-2 rounded-xl",children:D.isPending?e.jsxs(e.Fragment,{children:[e.jsx(N,{className:"h-4 w-4 animate-spin"}),"Creating..."]}):e.jsxs(e.Fragment,{children:[e.jsx(X,{className:"h-4 w-4"}),"Create Ticket"]})})]})]})})]})}function es({view:u,onChange:h}){return e.jsxs("div",{className:"flex items-center gap-1 p-1 rounded-xl bg-[var(--muted)]/30 border border-[var(--border)]",children:[e.jsxs("button",{onClick:()=>h("list"),className:V("flex items-center gap-2 px-3 py-1.5 rounded-lg text-sm font-medium transition-all",u==="list"?"bg-[var(--background)] text-[var(--foreground)] shadow-sm":"text-[var(--muted-foreground)] hover:text-[var(--foreground)]"),children:[e.jsx(Fe,{className:"h-4 w-4"}),e.jsx("span",{className:"hidden sm:inline",children:"List"})]}),e.jsxs("button",{onClick:()=>h("board"),className:V("flex items-center gap-2 px-3 py-1.5 rounded-lg text-sm font-medium transition-all",u==="board"?"bg-[var(--background)] text-[var(--foreground)] shadow-sm":"text-[var(--muted-foreground)] hover:text-[var(--foreground)]"),children:[e.jsx(Le,{className:"h-4 w-4"}),e.jsx("span",{className:"hidden sm:inline",children:"Board"})]})]})}export{Ze as C,es as V};
@@ -0,0 +1 @@
1
+ import{r as l,j as s}from"./vendor-react-Mc5_kfYG.js";import{a0 as x,a1 as g,a2 as i,a3 as d,a4 as r,a5 as n,a6 as m,a7 as c,a8 as N}from"./vendor-ui-CXPAUBFv.js";import{h as o,a_ as f}from"./index-sEBN7w8J.js";const C=x,T=N,y=g,p=l.forwardRef(({className:a,...e},t)=>s.jsx(c,{className:o("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",a),...e,ref:t}));p.displayName=c.displayName;const u=l.forwardRef(({className:a,...e},t)=>s.jsxs(y,{children:[s.jsx(p,{}),s.jsx(i,{ref:t,className:o("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 p-6 shadow-2xl modal-glass duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-2xl",a),...e})]}));u.displayName=i.displayName;const A=({className:a,...e})=>s.jsx("div",{className:o("flex flex-col space-y-2 text-center sm:text-left",a),...e});A.displayName="AlertDialogHeader";const D=({className:a,...e})=>s.jsx("div",{className:o("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",a),...e});D.displayName="AlertDialogFooter";const j=l.forwardRef(({className:a,...e},t)=>s.jsx(d,{ref:t,className:o("text-lg font-semibold",a),...e}));j.displayName=d.displayName;const w=l.forwardRef(({className:a,...e},t)=>s.jsx(r,{ref:t,className:o("text-sm text-muted-foreground",a),...e}));w.displayName=r.displayName;const R=l.forwardRef(({className:a,...e},t)=>s.jsx(m,{ref:t,className:o(f(),a),...e}));R.displayName=m.displayName;const v=l.forwardRef(({className:a,...e},t)=>s.jsx(n,{ref:t,className:o(f({variant:"outline"}),"mt-2 sm:mt-0",a),...e}));v.displayName=n.displayName;export{C as A,u as a,A as b,j as c,w as d,D as e,v as f,R as g,T as h};
@@ -1 +1 @@
1
- import{c as e}from"./index-lJlNPFVJ.js";const c=[["rect",{width:"20",height:"5",x:"2",y:"3",rx:"1",key:"1wp1u1"}],["path",{d:"M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8",key:"1s80jp"}],["path",{d:"M10 12h4",key:"a56b0p"}]],a=e("archive",c);export{a as A};
1
+ import{c as e}from"./index-sEBN7w8J.js";const c=[["rect",{width:"20",height:"5",x:"2",y:"3",rx:"1",key:"1wp1u1"}],["path",{d:"M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8",key:"1s80jp"}],["path",{d:"M10 12h4",key:"a56b0p"}]],a=e("archive",c);export{a as A};
@@ -0,0 +1 @@
1
+ import{j as n}from"./vendor-react-Mc5_kfYG.js";import{h as o,b0 as s}from"./index-sEBN7w8J.js";const a=s("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-[var(--ring)] focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground shadow-sm hover:brightness-110",secondary:"border-transparent bg-secondary text-secondary-foreground",destructive:"border-transparent bg-destructive text-destructive-foreground shadow-sm",outline:"border-border text-foreground hover:bg-muted/50",success:"border-transparent bg-success/10 text-success border border-success/20",warning:"border-transparent bg-warning/10 text-warning border border-warning/20",info:"border-transparent bg-info/10 text-info border border-info/20"}},defaultVariants:{variant:"default"}});function b({className:r,variant:e,...t}){return n.jsx("div",{className:o(a({variant:e}),r),...t})}export{b as B};
@@ -1 +1 @@
1
- import{c as a}from"./index-lJlNPFVJ.js";const t=[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]],p=a("book-open",t);const e=[["path",{d:"M12 20v-9",key:"1qisl0"}],["path",{d:"M14 7a4 4 0 0 1 4 4v3a6 6 0 0 1-12 0v-3a4 4 0 0 1 4-4z",key:"uouzyp"}],["path",{d:"M14.12 3.88 16 2",key:"qol33r"}],["path",{d:"M21 21a4 4 0 0 0-3.81-4",key:"1b0z45"}],["path",{d:"M21 5a4 4 0 0 1-3.55 3.97",key:"5cxbf6"}],["path",{d:"M22 13h-4",key:"1jl80f"}],["path",{d:"M3 21a4 4 0 0 1 3.81-4",key:"1fjd4g"}],["path",{d:"M3 5a4 4 0 0 0 3.55 3.97",key:"1d7oge"}],["path",{d:"M6 13H2",key:"82j7cp"}],["path",{d:"m8 2 1.88 1.88",key:"fmnt4t"}],["path",{d:"M9 7.13V6a3 3 0 1 1 6 0v1.13",key:"1vgav8"}]],d=a("bug",e);export{d as B,p as a};
1
+ import{c as a}from"./index-sEBN7w8J.js";const t=[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]],p=a("book-open",t);const e=[["path",{d:"M12 20v-9",key:"1qisl0"}],["path",{d:"M14 7a4 4 0 0 1 4 4v3a6 6 0 0 1-12 0v-3a4 4 0 0 1 4-4z",key:"uouzyp"}],["path",{d:"M14.12 3.88 16 2",key:"qol33r"}],["path",{d:"M21 21a4 4 0 0 0-3.81-4",key:"1b0z45"}],["path",{d:"M21 5a4 4 0 0 1-3.55 3.97",key:"5cxbf6"}],["path",{d:"M22 13h-4",key:"1jl80f"}],["path",{d:"M3 21a4 4 0 0 1 3.81-4",key:"1fjd4g"}],["path",{d:"M3 5a4 4 0 0 0 3.55 3.97",key:"1d7oge"}],["path",{d:"M6 13H2",key:"82j7cp"}],["path",{d:"m8 2 1.88 1.88",key:"fmnt4t"}],["path",{d:"M9 7.13V6a3 3 0 1 1 6 0v1.13",key:"1vgav8"}]],d=a("bug",e);export{d as B,p as a};
@@ -1 +1 @@
1
- import{c as e}from"./index-lJlNPFVJ.js";const t=[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]],a=e("calendar",t);export{a as C};
1
+ import{c as e}from"./index-sEBN7w8J.js";const t=[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]],a=e("calendar",t);export{a as C};
@@ -1 +1 @@
1
- import{c as o}from"./index-lJlNPFVJ.js";const c=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],n=o("chevron-up",c);export{n as C};
1
+ import{c as o}from"./index-sEBN7w8J.js";const c=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],n=o("chevron-up",c);export{n as C};
@@ -1 +1 @@
1
- import{c}from"./index-lJlNPFVJ.js";const e=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],o=c("circle-x",e);export{o as C};
1
+ import{c}from"./index-sEBN7w8J.js";const e=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],o=c("circle-x",e);export{o as C};
@@ -0,0 +1 @@
1
+ import{c as e,ag as s,av as i,S as l,ab as r,G as c,K as p,a8 as n,am as d,an as u,ap as m,aq as g,aw as y,ax as h,ay as k,as as L,ar as b,az as v,aA as A,aB as M,aC as f,aD as I,aE as x,aF as w,aG as U,at as S,ao as C,aH as P,au as _,aI as G,aJ as z,aK as N,aL as T,aM as R,aN as V,aO as B,aP as q,aQ as D,aR as E,aS as O,aT as H,aU as F,aV as K}from"./index-sEBN7w8J.js";import{S as W}from"./settings-2-CkRNqkxj.js";import{T as Q}from"./tag-CH_vQliw.js";import{S as $}from"./smartphone-5FghiXpA.js";import{W as j}from"./wrench-CjxjP6ok.js";import{D as X}from"./database-BWXSBg5a.js";import{G as Z}from"./globe-D_WpJdsj.js";import{C as J}from"./cpu-CiuoCeDY.js";const Y=[["path",{d:"m18 16 4-4-4-4",key:"1inbqp"}],["path",{d:"m6 8-4 4 4 4",key:"15zrgr"}],["path",{d:"m14.5 4-5 16",key:"e7oirm"}]],Me=e("code-xml",Y);const ee=[["path",{d:"M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719",key:"1sd12s"}]],oe=e("message-circle",ee);const ae=[["path",{d:"M12 19v3",key:"npa21l"}],["path",{d:"M19 10v2a7 7 0 0 1-14 0v-2",key:"1vc78b"}],["rect",{x:"9",y:"2",width:"6",height:"13",rx:"3",key:"s6n7sd"}]],te=e("mic",ae);const se=[["path",{d:"M18 8V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v7a2 2 0 0 0 2 2h8",key:"10dyio"}],["path",{d:"M10 19v-3.96 3.15",key:"1irgej"}],["path",{d:"M7 19h5",key:"qswx4l"}],["rect",{width:"6",height:"10",x:"16",y:"12",rx:"2",key:"1egngj"}]],ie=e("monitor-smartphone",se);const le=[["path",{d:"M12 22v-5",key:"1ega77"}],["path",{d:"M15 8V2",key:"18g5xt"}],["path",{d:"M17 8a1 1 0 0 1 1 1v4a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V9a1 1 0 0 1 1-1z",key:"1xoxul"}],["path",{d:"M9 8V2",key:"14iosj"}]],re=e("plug",le);const ce=[["path",{d:"M15.39 4.39a1 1 0 0 0 1.68-.474 2.5 2.5 0 1 1 3.014 3.015 1 1 0 0 0-.474 1.68l1.683 1.682a2.414 2.414 0 0 1 0 3.414L19.61 15.39a1 1 0 0 1-1.68-.474 2.5 2.5 0 1 0-3.014 3.015 1 1 0 0 1 .474 1.68l-1.683 1.682a2.414 2.414 0 0 1-3.414 0L8.61 19.61a1 1 0 0 0-1.68.474 2.5 2.5 0 1 1-3.014-3.015 1 1 0 0 0 .474-1.68l-1.683-1.682a2.414 2.414 0 0 1 0-3.414L4.39 8.61a1 1 0 0 1 1.68.474 2.5 2.5 0 1 0 3.014-3.015 1 1 0 0 1-.474-1.68l1.683-1.682a2.414 2.414 0 0 1 3.414 0z",key:"w46dr5"}]],pe=e("puzzle",ce);const ne=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M12 16h.01",key:"1drbdi"}]],fe=e("shield-alert",ne);const de=[["path",{d:"M14.5 2v17.5c0 1.4-1.1 2.5-2.5 2.5c-1.4 0-2.5-1.1-2.5-2.5V2",key:"125lnx"}],["path",{d:"M8.5 2h7",key:"csnxdl"}],["path",{d:"M14.5 16h-5",key:"1ox875"}]],Ie=e("test-tube",de);const ue=[["path",{d:"M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z",key:"uqj9uw"}],["path",{d:"M16 9a5 5 0 0 1 0 6",key:"1q6k2b"}],["path",{d:"M19.364 18.364a9 9 0 0 0 0-12.728",key:"ijwkga"}]],xe=e("volume-2",ue),we=[{id:"general",label:"General",icon:W,description:"Appearance and preferences"},{id:"account",label:"Account",icon:s,description:"Profile and recovery codes"},{id:"notifications",label:"Notifications",icon:i,description:"Alert preferences"},{id:"ai-providers",label:"AI Providers",icon:l,description:"Configure AI models"},{id:"labels",label:"Labels",icon:Q,description:"Manage project labels"},{id:"integrations",label:"Integrations",icon:r,description:"API keys and services"},{id:"messaging",label:"Messaging",icon:oe,description:"Telegram, Discord, WhatsApp"},{id:"devices",label:"Devices",icon:$,description:"Manage paired devices"},{id:"memory",label:"Memory",icon:c,description:"Semantic memory system"},{id:"skills",label:"Skills",icon:pe,description:"Modular AI capabilities"},{id:"tools",label:"Tools",icon:j,description:"AI tool configuration"},{id:"security",label:"Security",icon:p,description:"Tool execution security"},{id:"plugins",label:"Plugins & MCP",icon:re,description:"Extensions and MCP"},{id:"marketplace",label:"Marketplace",icon:n,description:"Browse and install plugins & skills"},{id:"storage",label:"Storage",icon:X,description:"Data and backup"},{id:"voice",label:"Voice",icon:te,description:"Speech recognition and synthesis"},{id:"pwa",label:"App & Notifications",icon:ie,description:"Install app, push notifications"},{id:"tunnels",label:"Tunnels",icon:Z,description:"Remote access via Tailscale or Cloudflare"},{id:"system",label:"System",icon:J,description:"Advanced settings"}],Ue=[{type:"anthropic",name:"Anthropic",description:"Claude Opus, Sonnet, Haiku",Logo:d,setupUrl:"https://console.anthropic.com/settings/keys",placeholder:"sk-ant-...",category:"cloud",models:[]},{type:"openai",name:"OpenAI",description:"GPT-4.5, o1, o3-mini",Logo:u,setupUrl:"https://platform.openai.com/api-keys",placeholder:"sk-...",category:"cloud",models:[]},{type:"google",name:"Google AI",description:"Gemini 2.5 Pro, Flash",Logo:m,setupUrl:"https://makersuite.google.com/app/apikey",placeholder:"AIza...",category:"cloud",models:[]},{type:"xai",name:"xAI (Grok)",description:"Grok 2, Grok 3 models",Logo:g,setupUrl:"https://console.x.ai/",placeholder:"xai-...",category:"cloud",models:[]},{type:"mistral",name:"Mistral AI",description:"Mistral Large, Medium, Codestral",Logo:y,setupUrl:"https://console.mistral.ai/api-keys/",placeholder:"your-key...",category:"cloud",models:[]},{type:"cohere",name:"Cohere",description:"Command R, R+",Logo:h,setupUrl:"https://dashboard.cohere.com/api-keys",placeholder:"your-key...",category:"cloud",models:[]},{type:"perplexity",name:"Perplexity",description:"Sonar models with search",Logo:k,setupUrl:"https://www.perplexity.ai/settings/api",placeholder:"pplx-...",category:"cloud",models:[]},{type:"deepseek",name:"DeepSeek",description:"DeepSeek Chat, Coder, R1",Logo:L,setupUrl:"https://platform.deepseek.com/api_keys",placeholder:"sk-...",category:"cloud",models:[]},{type:"groq",name:"Groq",description:"Ultra-fast Llama & Mixtral",Logo:b,setupUrl:"https://console.groq.com/keys",placeholder:"gsk_...",category:"cloud",models:[]},{type:"together",name:"Together AI",description:"Fast open-source models",Logo:v,setupUrl:"https://api.together.xyz/settings/api-keys",placeholder:"your-key...",category:"cloud",models:[]},{type:"cerebras",name:"Cerebras",description:"Fastest Llama inference",Logo:A,setupUrl:"https://cloud.cerebras.ai/",placeholder:"csk-...",category:"cloud",models:[]},{type:"fireworks",name:"Fireworks",description:"Fast serverless inference",Logo:M,setupUrl:"https://fireworks.ai/account/api-keys",placeholder:"fw-...",category:"cloud",models:[]},{type:"replicate",name:"Replicate",description:"Hosted open-source models (Llama, Mixtral)",Logo:f,setupUrl:"https://replicate.com/account/api-tokens",placeholder:"r8_...",category:"cloud",models:[],status:"beta"},{type:"github-models",name:"GitHub Models",description:"GPT-4o, Phi-4, Llama via GitHub",Logo:I,setupUrl:"https://github.com/marketplace/models",placeholder:"ghp_...",category:"cloud",models:[],status:"beta"},{type:"zhipu",name:"Zhipu AI",description:"GLM-5, GLM-4.7, GLM-4 series",Logo:x,setupUrl:"https://open.bigmodel.cn/usercenter/apikeys",placeholder:"your-key...",category:"cloud",models:[],status:"beta"},{type:"moonshot",name:"Moonshot (Kimi)",description:"Long-context Kimi models (1M tokens)",Logo:w,setupUrl:"https://platform.moonshot.cn/console/api-keys",placeholder:"sk-...",category:"cloud",models:[],status:"beta"},{type:"qwen",name:"Qwen (Alibaba)",description:"Qwen-Max, Qwen-Plus, Qwen-Turbo",Logo:U,setupUrl:"https://dashscope.console.aliyun.com/apiKey",placeholder:"sk-...",category:"cloud",models:[],status:"beta"},{type:"openrouter",name:"OpenRouter",description:"300+ models via one API",Logo:S,setupUrl:"https://openrouter.ai/keys",placeholder:"sk-or-...",category:"cloud",models:[]},{type:"azure",name:"Azure OpenAI",description:"Enterprise GPT-4 via Azure / Foundry",Logo:C,setupUrl:"https://portal.azure.com/",placeholder:"your-key...",category:"enterprise",models:[],requiresBaseUrl:!0},{type:"bedrock",name:"AWS Bedrock",description:"Claude, Llama, Mistral via AWS",Logo:P,setupUrl:"https://console.aws.amazon.com/bedrock/",placeholder:"AKIA...",category:"enterprise",models:[],status:"stable"},{type:"ollama",name:"Ollama (Local)",description:"Run models locally - free",Logo:_,setupUrl:"https://ollama.ai/download",placeholder:"http://localhost:11434",category:"local",models:[],requiresBaseUrl:!0},{type:"copilot",name:"GitHub Copilot",description:"Use your Copilot subscription (experimental)",Logo:G,setupUrl:"https://github.com/ericc-ch/copilot-api",placeholder:"http://localhost:4141",category:"local",models:[],requiresBaseUrl:!0,status:"experimental"},{type:"volcengine",name:"Volcengine Doubao",description:"Bytedance Doubao Pro/Lite models",Logo:z,setupUrl:"https://console.volcengine.com/ark/region:ark+cn-beijing/apiKey",placeholder:"your-key...",category:"cloud",models:[],status:"beta"},{type:"byteplus",name:"BytePlus",description:"International Bytedance AI models",Logo:N,setupUrl:"https://console.byteplus.com/",placeholder:"your-key...",category:"cloud",models:[],status:"beta"},{type:"qianfan",name:"Baidu Qianfan",description:"ERNIE Bot 4.0, ERNIE Speed",Logo:T,setupUrl:"https://console.bce.baidu.com/qianfan/ais/console/applicationConsole/application",placeholder:"your-key...",category:"cloud",models:[],status:"beta"},{type:"modelstudio",name:"ModelStudio",description:"Alibaba DashScope compatible mode",Logo:R,setupUrl:"https://dashscope.console.aliyun.com/apiKey",placeholder:"sk-...",category:"cloud",models:[],status:"experimental"},{type:"minimax",name:"Minimax",description:"abab6.5, abab5.5 models (245k context)",Logo:V,setupUrl:"https://www.minimaxi.com/user-center/basic-information/interface-key",placeholder:"your-key...",category:"cloud",models:[],status:"beta"},{type:"xiaomi",name:"Xiaomi MiLM",description:"Xiaomi AI language models",Logo:B,setupUrl:"https://ai.xiaomi.com/",placeholder:"your-key...",category:"cloud",models:[],status:"experimental"},{type:"huggingface",name:"HuggingFace",description:"Llama, Mistral, and 1000s of open models",Logo:q,setupUrl:"https://huggingface.co/settings/tokens",placeholder:"hf_...",category:"cloud",models:[],status:"beta"},{type:"nvidia-nim",name:"NVIDIA NIM",description:"Llama 3.1 405B, Mixtral via NVIDIA",Logo:D,setupUrl:"https://build.nvidia.com/explore/discover",placeholder:"nvapi-...",category:"cloud",models:[],status:"beta"},{type:"venice",name:"Venice AI",description:"Privacy-preserving AI inference",Logo:E,setupUrl:"https://venice.ai/settings/api",placeholder:"your-key...",category:"cloud",models:[],status:"experimental"},{type:"kilocode",name:"Kilocode",description:"AI-powered code assistance",Logo:O,setupUrl:"https://kilocode.ai/",placeholder:"your-key...",category:"cloud",models:[],status:"experimental"},{type:"vercel-ai",name:"Vercel AI Gateway",description:"Unified gateway for multiple AI providers",Logo:H,setupUrl:"https://vercel.com/docs/ai/gateway",placeholder:"your-key...",category:"cloud",models:[],status:"beta"},{type:"cloudflare-ai",name:"Cloudflare AI Gateway",description:"Route AI calls via Cloudflare Workers AI",Logo:F,setupUrl:"https://dash.cloudflare.com/?to=/:account/ai/ai-gateway",placeholder:"your-token...",category:"cloud",models:[],requiresBaseUrl:!0,status:"beta"},{type:"watsonx",name:"IBM Watsonx",description:"Granite enterprise AI models",Logo:K,setupUrl:"https://dataplatform.cloud.ibm.com/wx/home",placeholder:"your-key...",category:"enterprise",models:[],status:"stable"}],Se=[{value:"2024-10-21",label:"2024-10-21 (Recommended - Stable)"},{value:"2024-12-01-preview",label:"2024-12-01-preview (For o1/o1-mini)"},{value:"2025-01-01-preview",label:"2025-01-01-preview (Latest Preview)"},{value:"2024-08-01-preview",label:"2024-08-01-preview"},{value:"2024-02-15-preview",label:"2024-02-15-preview (Legacy)"}];function Ce(o){if(!o)return{valid:!0};try{if(!new URL(o).protocol.startsWith("https"))return{valid:!1,message:"Must use HTTPS"};const a=o.includes("openai.azure.com"),t=o.includes("cognitive.microsoft.com")||o.includes("cognitiveservices.azure.com");return a||t?{valid:!0}:{valid:!1,message:"Must be an Azure endpoint (e.g., https://your-resource.openai.azure.com or https://eastus.api.cognitive.microsoft.com)"}}catch{return{valid:!1,message:"Invalid URL format"}}}const Pe="http://localhost:3000";export{Se as A,Me as C,te as M,pe as P,fe as S,Ie as T,xe as V,Ue as a,Pe as b,re as c,we as d,oe as e,Ce as v};
@@ -1 +1 @@
1
- import{c as h}from"./index-lJlNPFVJ.js";const t=[["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M17 20v2",key:"1rnc9c"}],["path",{d:"M17 2v2",key:"11trls"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M2 17h2",key:"7oei6x"}],["path",{d:"M2 7h2",key:"asdhe0"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"M20 17h2",key:"1fpfkl"}],["path",{d:"M20 7h2",key:"1o8tra"}],["path",{d:"M7 20v2",key:"4gnj0m"}],["path",{d:"M7 2v2",key:"1i4yhu"}],["rect",{x:"4",y:"4",width:"16",height:"16",rx:"2",key:"1vbyd7"}],["rect",{x:"8",y:"8",width:"8",height:"8",rx:"1",key:"z9xiuo"}]],d=h("cpu",t);export{d as C};
1
+ import{c as h}from"./index-sEBN7w8J.js";const t=[["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M17 20v2",key:"1rnc9c"}],["path",{d:"M17 2v2",key:"11trls"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M2 17h2",key:"7oei6x"}],["path",{d:"M2 7h2",key:"asdhe0"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"M20 17h2",key:"1fpfkl"}],["path",{d:"M20 7h2",key:"1o8tra"}],["path",{d:"M7 20v2",key:"4gnj0m"}],["path",{d:"M7 2v2",key:"1i4yhu"}],["rect",{x:"4",y:"4",width:"16",height:"16",rx:"2",key:"1vbyd7"}],["rect",{x:"8",y:"8",width:"8",height:"8",rx:"1",key:"z9xiuo"}]],d=h("cpu",t);export{d as C};
@@ -1 +1 @@
1
- import{c as e}from"./index-lJlNPFVJ.js";const a=[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]],s=e("database",a);export{s as D};
1
+ import{c as e}from"./index-sEBN7w8J.js";const a=[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]],s=e("database",a);export{s as D};
@@ -0,0 +1 @@
1
+ import{r as l,j as t}from"./vendor-react-Mc5_kfYG.js";import{c as f,G as p,d as g,e as i,D as x,E as d,F as n,O as r}from"./vendor-ui-CXPAUBFv.js";import{X as u,h as o}from"./index-sEBN7w8J.js";const k=f,z=p,y=g,c=l.forwardRef(({className:a,...e},s)=>t.jsx(r,{ref:s,className:o("fixed inset-0 z-50 bg-black/40 backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",a),...e}));c.displayName=r.displayName;const N=l.forwardRef(({className:a,children:e,...s},m)=>t.jsxs(y,{children:[t.jsx(c,{}),t.jsxs(i,{ref:m,className:o("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 p-6 shadow-2xl modal-glass duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-2xl",a),...s,children:[e,t.jsxs(x,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-[var(--background)] transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-[var(--ring)] focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-[var(--accent)] data-[state=open]:text-[var(--muted-foreground)]",children:[t.jsx(u,{className:"h-4 w-4"}),t.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));N.displayName=i.displayName;const D=({className:a,...e})=>t.jsx("div",{className:o("flex flex-col space-y-1.5 text-center sm:text-left",a),...e});D.displayName="DialogHeader";const j=({className:a,...e})=>t.jsx("div",{className:o("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",a),...e});j.displayName="DialogFooter";const v=l.forwardRef(({className:a,...e},s)=>t.jsx(d,{ref:s,className:o("text-lg font-semibold leading-none tracking-tight",a),...e}));v.displayName=d.displayName;const b=l.forwardRef(({className:a,...e},s)=>t.jsx(n,{ref:s,className:o("text-sm text-[var(--muted-foreground)]",a),...e}));b.displayName=n.displayName;export{k as D,z as a,N as b,D as c,v as d,b as e,j as f};
@@ -0,0 +1 @@
1
+ import{c as o}from"./index-sEBN7w8J.js";const e=[["line",{x1:"12",x2:"12",y1:"2",y2:"22",key:"7eqyqh"}],["path",{d:"M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6",key:"1b0p4s"}]],c=o("dollar-sign",e);export{c as D};
@@ -1 +1 @@
1
- import{c}from"./index-lJlNPFVJ.js";const e=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]],r=c("ellipsis",e);export{r as E};
1
+ import{c}from"./index-sEBN7w8J.js";const e=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]],r=c("ellipsis",e);export{r as E};
@@ -1 +1 @@
1
- import{c}from"./index-lJlNPFVJ.js";const e=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"12",cy:"5",r:"1",key:"gxeob9"}],["circle",{cx:"12",cy:"19",r:"1",key:"lyex9k"}]],r=c("ellipsis-vertical",e);export{r as E};
1
+ import{c}from"./index-sEBN7w8J.js";const e=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"12",cy:"5",r:"1",key:"gxeob9"}],["circle",{cx:"12",cy:"19",r:"1",key:"lyex9k"}]],r=c("ellipsis-vertical",e);export{r as E};