@ai-development-environment/server 0.0.137 → 0.0.138

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 (369) hide show
  1. package/package.json +1 -1
  2. package/standalone/.next/BUILD_ID +1 -1
  3. package/standalone/.next/build-manifest.json +3 -3
  4. package/standalone/.next/prerender-manifest.json +3 -3
  5. package/standalone/.next/server/app/[locale]/(auth)/register/page.js.nft.json +1 -1
  6. package/standalone/.next/server/app/[locale]/(auth)/register/page_client-reference-manifest.js +1 -1
  7. package/standalone/.next/server/app/[locale]/(auth)/sign-in/page.js.nft.json +1 -1
  8. package/standalone/.next/server/app/[locale]/(auth)/sign-in/page_client-reference-manifest.js +1 -1
  9. package/standalone/.next/server/app/[locale]/(dashboard)/ai/costs/page.js.nft.json +1 -1
  10. package/standalone/.next/server/app/[locale]/(dashboard)/ai/costs/page_client-reference-manifest.js +1 -1
  11. package/standalone/.next/server/app/[locale]/(dashboard)/ai/drafts/new/page.js.nft.json +1 -1
  12. package/standalone/.next/server/app/[locale]/(dashboard)/ai/drafts/new/page_client-reference-manifest.js +1 -1
  13. package/standalone/.next/server/app/[locale]/(dashboard)/ai/drafts/page.js.nft.json +1 -1
  14. package/standalone/.next/server/app/[locale]/(dashboard)/ai/drafts/page_client-reference-manifest.js +1 -1
  15. package/standalone/.next/server/app/[locale]/(dashboard)/ai/plans/[runId]/page.js.nft.json +1 -1
  16. package/standalone/.next/server/app/[locale]/(dashboard)/ai/plans/[runId]/page_client-reference-manifest.js +1 -1
  17. package/standalone/.next/server/app/[locale]/(dashboard)/ai/plans/page.js.nft.json +1 -1
  18. package/standalone/.next/server/app/[locale]/(dashboard)/ai/plans/page_client-reference-manifest.js +1 -1
  19. package/standalone/.next/server/app/[locale]/(dashboard)/ai/sessions/[runId]/page.js.nft.json +1 -1
  20. package/standalone/.next/server/app/[locale]/(dashboard)/ai/sessions/[runId]/page_client-reference-manifest.js +1 -1
  21. package/standalone/.next/server/app/[locale]/(dashboard)/ai/sessions/page.js.nft.json +1 -1
  22. package/standalone/.next/server/app/[locale]/(dashboard)/ai/sessions/page_client-reference-manifest.js +1 -1
  23. package/standalone/.next/server/app/[locale]/(dashboard)/ai/skills/[skillId]/page.js.nft.json +1 -1
  24. package/standalone/.next/server/app/[locale]/(dashboard)/ai/skills/[skillId]/page_client-reference-manifest.js +1 -1
  25. package/standalone/.next/server/app/[locale]/(dashboard)/ai/skills/groups/[groupId]/page.js.nft.json +1 -1
  26. package/standalone/.next/server/app/[locale]/(dashboard)/ai/skills/groups/[groupId]/page_client-reference-manifest.js +1 -1
  27. package/standalone/.next/server/app/[locale]/(dashboard)/ai/skills/groups/page.js.nft.json +1 -1
  28. package/standalone/.next/server/app/[locale]/(dashboard)/ai/skills/groups/page_client-reference-manifest.js +1 -1
  29. package/standalone/.next/server/app/[locale]/(dashboard)/ai/skills/page.js.nft.json +1 -1
  30. package/standalone/.next/server/app/[locale]/(dashboard)/ai/skills/page_client-reference-manifest.js +1 -1
  31. package/standalone/.next/server/app/[locale]/(dashboard)/ai/skills/sync/[runId]/page.js.nft.json +1 -1
  32. package/standalone/.next/server/app/[locale]/(dashboard)/ai/skills/sync/[runId]/page_client-reference-manifest.js +1 -1
  33. package/standalone/.next/server/app/[locale]/(dashboard)/ai/usage/page.js.nft.json +1 -1
  34. package/standalone/.next/server/app/[locale]/(dashboard)/ai/usage/page_client-reference-manifest.js +1 -1
  35. package/standalone/.next/server/app/[locale]/(dashboard)/dashboard/action-center/page.js.nft.json +1 -1
  36. package/standalone/.next/server/app/[locale]/(dashboard)/dashboard/action-center/page_client-reference-manifest.js +1 -1
  37. package/standalone/.next/server/app/[locale]/(dashboard)/dashboard/agents/[id]/page.js.nft.json +1 -1
  38. package/standalone/.next/server/app/[locale]/(dashboard)/dashboard/agents/[id]/page_client-reference-manifest.js +1 -1
  39. package/standalone/.next/server/app/[locale]/(dashboard)/dashboard/agents/page.js.nft.json +1 -1
  40. package/standalone/.next/server/app/[locale]/(dashboard)/dashboard/agents/page_client-reference-manifest.js +1 -1
  41. package/standalone/.next/server/app/[locale]/(dashboard)/dashboard/apps/[appId]/page.js.nft.json +1 -1
  42. package/standalone/.next/server/app/[locale]/(dashboard)/dashboard/apps/[appId]/page_client-reference-manifest.js +1 -1
  43. package/standalone/.next/server/app/[locale]/(dashboard)/dashboard/apps/page.js.nft.json +1 -1
  44. package/standalone/.next/server/app/[locale]/(dashboard)/dashboard/apps/page_client-reference-manifest.js +1 -1
  45. package/standalone/.next/server/app/[locale]/(dashboard)/dashboard/builds/[buildId]/coverage/page.js.nft.json +1 -1
  46. package/standalone/.next/server/app/[locale]/(dashboard)/dashboard/builds/[buildId]/coverage/page_client-reference-manifest.js +1 -1
  47. package/standalone/.next/server/app/[locale]/(dashboard)/dashboard/builds/[buildId]/output/route.js.nft.json +1 -1
  48. package/standalone/.next/server/app/[locale]/(dashboard)/dashboard/builds/[buildId]/page.js.nft.json +1 -1
  49. package/standalone/.next/server/app/[locale]/(dashboard)/dashboard/builds/[buildId]/page_client-reference-manifest.js +1 -1
  50. package/standalone/.next/server/app/[locale]/(dashboard)/dashboard/builds/configurations/[configurationId]/page.js.nft.json +1 -1
  51. package/standalone/.next/server/app/[locale]/(dashboard)/dashboard/builds/configurations/[configurationId]/page_client-reference-manifest.js +1 -1
  52. package/standalone/.next/server/app/[locale]/(dashboard)/dashboard/builds/page.js.nft.json +1 -1
  53. package/standalone/.next/server/app/[locale]/(dashboard)/dashboard/builds/page_client-reference-manifest.js +1 -1
  54. package/standalone/.next/server/app/[locale]/(dashboard)/dashboard/changes/page.js.nft.json +1 -1
  55. package/standalone/.next/server/app/[locale]/(dashboard)/dashboard/changes/page_client-reference-manifest.js +1 -1
  56. package/standalone/.next/server/app/[locale]/(dashboard)/dashboard/codebases/[codebaseId]/page.js.nft.json +1 -1
  57. package/standalone/.next/server/app/[locale]/(dashboard)/dashboard/codebases/[codebaseId]/page_client-reference-manifest.js +1 -1
  58. package/standalone/.next/server/app/[locale]/(dashboard)/dashboard/codebases/page.js.nft.json +1 -1
  59. package/standalone/.next/server/app/[locale]/(dashboard)/dashboard/codebases/page_client-reference-manifest.js +1 -1
  60. package/standalone/.next/server/app/[locale]/(dashboard)/dashboard/codebases/repositories/[repositoryId]/page.js.nft.json +1 -1
  61. package/standalone/.next/server/app/[locale]/(dashboard)/dashboard/codebases/repositories/[repositoryId]/page_client-reference-manifest.js +1 -1
  62. package/standalone/.next/server/app/[locale]/(dashboard)/dashboard/commands/[commandId]/edit/page.js.nft.json +1 -1
  63. package/standalone/.next/server/app/[locale]/(dashboard)/dashboard/commands/[commandId]/edit/page_client-reference-manifest.js +1 -1
  64. package/standalone/.next/server/app/[locale]/(dashboard)/dashboard/commands/new/page.js.nft.json +1 -1
  65. package/standalone/.next/server/app/[locale]/(dashboard)/dashboard/commands/new/page_client-reference-manifest.js +1 -1
  66. package/standalone/.next/server/app/[locale]/(dashboard)/dashboard/commands/page.js.nft.json +1 -1
  67. package/standalone/.next/server/app/[locale]/(dashboard)/dashboard/commands/page_client-reference-manifest.js +1 -1
  68. package/standalone/.next/server/app/[locale]/(dashboard)/dashboard/commands/runs/[runId]/output/route.js.nft.json +1 -1
  69. package/standalone/.next/server/app/[locale]/(dashboard)/dashboard/commands/runs/[runId]/page.js.nft.json +1 -1
  70. package/standalone/.next/server/app/[locale]/(dashboard)/dashboard/commands/runs/[runId]/page_client-reference-manifest.js +1 -1
  71. package/standalone/.next/server/app/[locale]/(dashboard)/dashboard/jobs/[jobId]/page.js.nft.json +1 -1
  72. package/standalone/.next/server/app/[locale]/(dashboard)/dashboard/jobs/[jobId]/page_client-reference-manifest.js +1 -1
  73. package/standalone/.next/server/app/[locale]/(dashboard)/dashboard/notifications/page.js.nft.json +1 -1
  74. package/standalone/.next/server/app/[locale]/(dashboard)/dashboard/notifications/page_client-reference-manifest.js +1 -1
  75. package/standalone/.next/server/app/[locale]/(dashboard)/dashboard/workflows/[workflowId]/edit/page.js.nft.json +1 -1
  76. package/standalone/.next/server/app/[locale]/(dashboard)/dashboard/workflows/[workflowId]/edit/page_client-reference-manifest.js +1 -1
  77. package/standalone/.next/server/app/[locale]/(dashboard)/dashboard/workflows/[workflowId]/page.js.nft.json +1 -1
  78. package/standalone/.next/server/app/[locale]/(dashboard)/dashboard/workflows/[workflowId]/page_client-reference-manifest.js +1 -1
  79. package/standalone/.next/server/app/[locale]/(dashboard)/dashboard/workflows/new/page.js.nft.json +1 -1
  80. package/standalone/.next/server/app/[locale]/(dashboard)/dashboard/workflows/new/page_client-reference-manifest.js +1 -1
  81. package/standalone/.next/server/app/[locale]/(dashboard)/dashboard/workflows/page.js.nft.json +1 -1
  82. package/standalone/.next/server/app/[locale]/(dashboard)/dashboard/workflows/page_client-reference-manifest.js +1 -1
  83. package/standalone/.next/server/app/[locale]/(dashboard)/dashboard/workflows/runs/[runId]/page.js.nft.json +1 -1
  84. package/standalone/.next/server/app/[locale]/(dashboard)/dashboard/workflows/runs/[runId]/page_client-reference-manifest.js +1 -1
  85. package/standalone/.next/server/app/[locale]/(dashboard)/dashboard/worktrees/[worktreeId]/page.js.nft.json +1 -1
  86. package/standalone/.next/server/app/[locale]/(dashboard)/dashboard/worktrees/[worktreeId]/page_client-reference-manifest.js +1 -1
  87. package/standalone/.next/server/app/[locale]/(dashboard)/dashboard/worktrees/page.js.nft.json +1 -1
  88. package/standalone/.next/server/app/[locale]/(dashboard)/dashboard/worktrees/page_client-reference-manifest.js +1 -1
  89. package/standalone/.next/server/app/[locale]/(dashboard)/debugging/analytics-events/page.js.nft.json +1 -1
  90. package/standalone/.next/server/app/[locale]/(dashboard)/debugging/analytics-events/page_client-reference-manifest.js +1 -1
  91. package/standalone/.next/server/app/[locale]/(dashboard)/debugging/console-logs/page.js.nft.json +1 -1
  92. package/standalone/.next/server/app/[locale]/(dashboard)/debugging/console-logs/page_client-reference-manifest.js +1 -1
  93. package/standalone/.next/server/app/[locale]/(dashboard)/debugging/crashes/[crashId]/page.js.nft.json +1 -1
  94. package/standalone/.next/server/app/[locale]/(dashboard)/debugging/crashes/[crashId]/page_client-reference-manifest.js +1 -1
  95. package/standalone/.next/server/app/[locale]/(dashboard)/debugging/crashes/dsyms/[dsymId]/page.js.nft.json +1 -1
  96. package/standalone/.next/server/app/[locale]/(dashboard)/debugging/crashes/dsyms/[dsymId]/page_client-reference-manifest.js +1 -1
  97. package/standalone/.next/server/app/[locale]/(dashboard)/debugging/crashes/dsyms/page.js.nft.json +1 -1
  98. package/standalone/.next/server/app/[locale]/(dashboard)/debugging/crashes/dsyms/page_client-reference-manifest.js +1 -1
  99. package/standalone/.next/server/app/[locale]/(dashboard)/debugging/crashes/page.js.nft.json +1 -1
  100. package/standalone/.next/server/app/[locale]/(dashboard)/debugging/crashes/page_client-reference-manifest.js +1 -1
  101. package/standalone/.next/server/app/[locale]/(dashboard)/debugging/push-notifications/page.js.nft.json +1 -1
  102. package/standalone/.next/server/app/[locale]/(dashboard)/debugging/push-notifications/page_client-reference-manifest.js +1 -1
  103. package/standalone/.next/server/app/[locale]/(dashboard)/debugging/sse/[endpointId]/mocks/page.js.nft.json +1 -1
  104. package/standalone/.next/server/app/[locale]/(dashboard)/debugging/sse/[endpointId]/mocks/page_client-reference-manifest.js +1 -1
  105. package/standalone/.next/server/app/[locale]/(dashboard)/debugging/sse/[endpointId]/page.js.nft.json +1 -1
  106. package/standalone/.next/server/app/[locale]/(dashboard)/debugging/sse/[endpointId]/page_client-reference-manifest.js +1 -1
  107. package/standalone/.next/server/app/[locale]/(dashboard)/debugging/sse/breakpoints/page.js.nft.json +1 -1
  108. package/standalone/.next/server/app/[locale]/(dashboard)/debugging/sse/breakpoints/page_client-reference-manifest.js +1 -1
  109. package/standalone/.next/server/app/[locale]/(dashboard)/debugging/sse/history/[requestId]/page.js.nft.json +1 -1
  110. package/standalone/.next/server/app/[locale]/(dashboard)/debugging/sse/history/[requestId]/page_client-reference-manifest.js +1 -1
  111. package/standalone/.next/server/app/[locale]/(dashboard)/debugging/sse/history/page.js.nft.json +1 -1
  112. package/standalone/.next/server/app/[locale]/(dashboard)/debugging/sse/history/page_client-reference-manifest.js +1 -1
  113. package/standalone/.next/server/app/[locale]/(dashboard)/debugging/sse/new/page.js.nft.json +1 -1
  114. package/standalone/.next/server/app/[locale]/(dashboard)/debugging/sse/new/page_client-reference-manifest.js +1 -1
  115. package/standalone/.next/server/app/[locale]/(dashboard)/debugging/sse/page.js.nft.json +1 -1
  116. package/standalone/.next/server/app/[locale]/(dashboard)/debugging/sse/page_client-reference-manifest.js +1 -1
  117. package/standalone/.next/server/app/[locale]/(dashboard)/debugging/sse/storage/page.js.nft.json +1 -1
  118. package/standalone/.next/server/app/[locale]/(dashboard)/debugging/sse/storage/page_client-reference-manifest.js +1 -1
  119. package/standalone/.next/server/app/[locale]/(dashboard)/debugging/unified-events/page.js.nft.json +1 -1
  120. package/standalone/.next/server/app/[locale]/(dashboard)/debugging/unified-events/page_client-reference-manifest.js +1 -1
  121. package/standalone/.next/server/app/[locale]/(dashboard)/github/actions/page.js.nft.json +1 -1
  122. package/standalone/.next/server/app/[locale]/(dashboard)/github/actions/page_client-reference-manifest.js +1 -1
  123. package/standalone/.next/server/app/[locale]/(dashboard)/github/actions-cache/page.js.nft.json +1 -1
  124. package/standalone/.next/server/app/[locale]/(dashboard)/github/actions-cache/page_client-reference-manifest.js +1 -1
  125. package/standalone/.next/server/app/[locale]/(dashboard)/github/cache/entries/[id]/page.js.nft.json +1 -1
  126. package/standalone/.next/server/app/[locale]/(dashboard)/github/cache/entries/[id]/page_client-reference-manifest.js +1 -1
  127. package/standalone/.next/server/app/[locale]/(dashboard)/github/cache/page.js.nft.json +1 -1
  128. package/standalone/.next/server/app/[locale]/(dashboard)/github/cache/page_client-reference-manifest.js +1 -1
  129. package/standalone/.next/server/app/[locale]/(dashboard)/github/comments/page.js.nft.json +1 -1
  130. package/standalone/.next/server/app/[locale]/(dashboard)/github/comments/page_client-reference-manifest.js +1 -1
  131. package/standalone/.next/server/app/[locale]/(dashboard)/github/pull-requests/[owner]/[repository]/[number]/page.js.nft.json +1 -1
  132. package/standalone/.next/server/app/[locale]/(dashboard)/github/pull-requests/[owner]/[repository]/[number]/page_client-reference-manifest.js +1 -1
  133. package/standalone/.next/server/app/[locale]/(dashboard)/github/pull-requests/page.js.nft.json +1 -1
  134. package/standalone/.next/server/app/[locale]/(dashboard)/github/pull-requests/page_client-reference-manifest.js +1 -1
  135. package/standalone/.next/server/app/[locale]/(dashboard)/github/webhooks/page.js.nft.json +1 -1
  136. package/standalone/.next/server/app/[locale]/(dashboard)/github/webhooks/page_client-reference-manifest.js +1 -1
  137. package/standalone/.next/server/app/[locale]/(dashboard)/gitlab/cache/page.js.nft.json +1 -1
  138. package/standalone/.next/server/app/[locale]/(dashboard)/gitlab/cache/page_client-reference-manifest.js +1 -1
  139. package/standalone/.next/server/app/[locale]/(dashboard)/gitlab/comments/page.js.nft.json +1 -1
  140. package/standalone/.next/server/app/[locale]/(dashboard)/gitlab/comments/page_client-reference-manifest.js +1 -1
  141. package/standalone/.next/server/app/[locale]/(dashboard)/gitlab/merge-requests/[projectId]/[iid]/page.js.nft.json +1 -1
  142. package/standalone/.next/server/app/[locale]/(dashboard)/gitlab/merge-requests/[projectId]/[iid]/page_client-reference-manifest.js +1 -1
  143. package/standalone/.next/server/app/[locale]/(dashboard)/gitlab/merge-requests/page.js.nft.json +1 -1
  144. package/standalone/.next/server/app/[locale]/(dashboard)/gitlab/merge-requests/page_client-reference-manifest.js +1 -1
  145. package/standalone/.next/server/app/[locale]/(dashboard)/gitlab/pipelines/page.js.nft.json +1 -1
  146. package/standalone/.next/server/app/[locale]/(dashboard)/gitlab/pipelines/page_client-reference-manifest.js +1 -1
  147. package/standalone/.next/server/app/[locale]/(dashboard)/gitlab/webhooks/page.js.nft.json +1 -1
  148. package/standalone/.next/server/app/[locale]/(dashboard)/gitlab/webhooks/page_client-reference-manifest.js +1 -1
  149. package/standalone/.next/server/app/[locale]/(dashboard)/jira/cache/page.js.nft.json +1 -1
  150. package/standalone/.next/server/app/[locale]/(dashboard)/jira/cache/page_client-reference-manifest.js +1 -1
  151. package/standalone/.next/server/app/[locale]/(dashboard)/jira/cache/tickets/[issueKey]/page.js.nft.json +1 -1
  152. package/standalone/.next/server/app/[locale]/(dashboard)/jira/cache/tickets/[issueKey]/page_client-reference-manifest.js +1 -1
  153. package/standalone/.next/server/app/[locale]/(dashboard)/jira/tickets/[issueKey]/page.js.nft.json +1 -1
  154. package/standalone/.next/server/app/[locale]/(dashboard)/jira/tickets/[issueKey]/page_client-reference-manifest.js +1 -1
  155. package/standalone/.next/server/app/[locale]/(dashboard)/jira/tickets/page.js.nft.json +1 -1
  156. package/standalone/.next/server/app/[locale]/(dashboard)/jira/tickets/page_client-reference-manifest.js +1 -1
  157. package/standalone/.next/server/app/[locale]/(dashboard)/jira/webhooks/page.js.nft.json +1 -1
  158. package/standalone/.next/server/app/[locale]/(dashboard)/jira/webhooks/page_client-reference-manifest.js +1 -1
  159. package/standalone/.next/server/app/[locale]/(dashboard)/system/api-keys/page.js.nft.json +1 -1
  160. package/standalone/.next/server/app/[locale]/(dashboard)/system/api-keys/page_client-reference-manifest.js +1 -1
  161. package/standalone/.next/server/app/[locale]/(dashboard)/system/build-data/page.js.nft.json +1 -1
  162. package/standalone/.next/server/app/[locale]/(dashboard)/system/build-data/page_client-reference-manifest.js +1 -1
  163. package/standalone/.next/server/app/[locale]/(dashboard)/system/connected-applications/page.js.nft.json +1 -1
  164. package/standalone/.next/server/app/[locale]/(dashboard)/system/connected-applications/page_client-reference-manifest.js +1 -1
  165. package/standalone/.next/server/app/[locale]/(dashboard)/system/credentials/page.js.nft.json +1 -1
  166. package/standalone/.next/server/app/[locale]/(dashboard)/system/credentials/page_client-reference-manifest.js +1 -1
  167. package/standalone/.next/server/app/[locale]/(dashboard)/system/devices/[id]/page.js.nft.json +1 -1
  168. package/standalone/.next/server/app/[locale]/(dashboard)/system/devices/[id]/page_client-reference-manifest.js +1 -1
  169. package/standalone/.next/server/app/[locale]/(dashboard)/system/devices/enroll/page.js.nft.json +1 -1
  170. package/standalone/.next/server/app/[locale]/(dashboard)/system/devices/enroll/page_client-reference-manifest.js +1 -1
  171. package/standalone/.next/server/app/[locale]/(dashboard)/system/devices/page.js.nft.json +1 -1
  172. package/standalone/.next/server/app/[locale]/(dashboard)/system/devices/page_client-reference-manifest.js +1 -1
  173. package/standalone/.next/server/app/[locale]/(dashboard)/system/polling/page.js.nft.json +1 -1
  174. package/standalone/.next/server/app/[locale]/(dashboard)/system/polling/page_client-reference-manifest.js +1 -1
  175. package/standalone/.next/server/app/[locale]/(dashboard)/system/prepare/page.js.nft.json +1 -1
  176. package/standalone/.next/server/app/[locale]/(dashboard)/system/prepare/page_client-reference-manifest.js +1 -1
  177. package/standalone/.next/server/app/[locale]/(dashboard)/system/provisioning-profiles/[profileId]/page.js.nft.json +1 -1
  178. package/standalone/.next/server/app/[locale]/(dashboard)/system/provisioning-profiles/[profileId]/page_client-reference-manifest.js +1 -1
  179. package/standalone/.next/server/app/[locale]/(dashboard)/system/provisioning-profiles/page.js.nft.json +1 -1
  180. package/standalone/.next/server/app/[locale]/(dashboard)/system/provisioning-profiles/page_client-reference-manifest.js +1 -1
  181. package/standalone/.next/server/app/[locale]/(dashboard)/system/settings/page.js.nft.json +1 -1
  182. package/standalone/.next/server/app/[locale]/(dashboard)/system/settings/page_client-reference-manifest.js +1 -1
  183. package/standalone/.next/server/app/[locale]/(dashboard)/system/status/page.js.nft.json +1 -1
  184. package/standalone/.next/server/app/[locale]/(dashboard)/system/status/page_client-reference-manifest.js +1 -1
  185. package/standalone/.next/server/app/[locale]/(dashboard)/system/tailscale/page.js.nft.json +1 -1
  186. package/standalone/.next/server/app/[locale]/(dashboard)/system/tailscale/page_client-reference-manifest.js +1 -1
  187. package/standalone/.next/server/app/[locale]/(dashboard)/system/tools/page.js.nft.json +1 -1
  188. package/standalone/.next/server/app/[locale]/(dashboard)/system/tools/page_client-reference-manifest.js +1 -1
  189. package/standalone/.next/server/app/[locale]/(dashboard)/system/users/page.js.nft.json +1 -1
  190. package/standalone/.next/server/app/[locale]/(dashboard)/system/users/page_client-reference-manifest.js +1 -1
  191. package/standalone/.next/server/app/[locale]/(mcp)/mcp/consent/page.js.nft.json +1 -1
  192. package/standalone/.next/server/app/[locale]/(mcp)/mcp/consent/page_client-reference-manifest.js +1 -1
  193. package/standalone/.next/server/app/[locale]/(mcp)/mcp/sign-in/page.js.nft.json +1 -1
  194. package/standalone/.next/server/app/[locale]/(mcp)/mcp/sign-in/page_client-reference-manifest.js +1 -1
  195. package/standalone/.next/server/app/[locale]/page.js.nft.json +1 -1
  196. package/standalone/.next/server/app/[locale]/page_client-reference-manifest.js +1 -1
  197. package/standalone/.next/server/app/_global-error.html +1 -1
  198. package/standalone/.next/server/app/_global-error.rsc +1 -1
  199. package/standalone/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  200. package/standalone/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  201. package/standalone/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  202. package/standalone/.next/server/app/_not-found.html +1 -1
  203. package/standalone/.next/server/app/_not-found.rsc +1 -1
  204. package/standalone/.next/server/app/_not-found.segments/_full.segment.rsc +1 -1
  205. package/standalone/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  206. package/standalone/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
  207. package/standalone/.next/server/app/api/agent/build-artifact-transfers/[transferId]/complete/route.js +1 -1
  208. package/standalone/.next/server/app/api/agent/build-artifact-transfers/[transferId]/complete/route.js.nft.json +1 -1
  209. package/standalone/.next/server/app/api/agent/build-artifact-transfers/[transferId]/download/route.js +1 -1
  210. package/standalone/.next/server/app/api/agent/build-artifact-transfers/[transferId]/download/route.js.nft.json +1 -1
  211. package/standalone/.next/server/app/api/agent/build-artifact-transfers/[transferId]/route.js +1 -1
  212. package/standalone/.next/server/app/api/agent/build-artifact-transfers/[transferId]/route.js.nft.json +1 -1
  213. package/standalone/.next/server/app/api/agent/build-artifact-transfers/[transferId]/upload/route.js +1 -1
  214. package/standalone/.next/server/app/api/agent/build-artifact-transfers/[transferId]/upload/route.js.nft.json +1 -1
  215. package/standalone/.next/server/app/api/agent/dsyms/[dsymId]/dwarf/route.js.nft.json +1 -1
  216. package/standalone/.next/server/app/api/agent/run-attachments/[attachmentId]/route.js +1 -1
  217. package/standalone/.next/server/app/api/agent/run-attachments/[attachmentId]/route.js.nft.json +1 -1
  218. package/standalone/.next/server/app/api/build-artifact-uploads/[uploadId]/route.js +1 -1
  219. package/standalone/.next/server/app/api/build-artifact-uploads/[uploadId]/route.js.nft.json +1 -1
  220. package/standalone/.next/server/app/api/codebases/by-path/route.js.nft.json +1 -1
  221. package/standalone/.next/server/app/api/codebases/route.js.nft.json +1 -1
  222. package/standalone/.next/server/app/api/crash-files/dsyms/[dsymId]/route.js.nft.json +1 -1
  223. package/standalone/.next/server/app/api/crash-files/reports/[crashId]/route.js.nft.json +1 -1
  224. package/standalone/.next/server/app/api/dsyms/route.js.nft.json +1 -1
  225. package/standalone/.next/server/app/api/dsyms/uploads/[uploadId]/complete/route.js.nft.json +1 -1
  226. package/standalone/.next/server/app/api/dsyms/uploads/[uploadId]/route.js.nft.json +1 -1
  227. package/standalone/.next/server/app/api/dsyms/uploads/route.js.nft.json +1 -1
  228. package/standalone/.next/server/app/api/graphql/route.js +1 -1
  229. package/standalone/.next/server/app/api/graphql/route.js.nft.json +1 -1
  230. package/standalone/.next/server/app/api/ios/apns-devices/route.js +2 -2
  231. package/standalone/.next/server/app/api/ios/apns-devices/route.js.nft.json +1 -1
  232. package/standalone/.next/server/app/api/ios/devices/export.tsv/route.js.nft.json +1 -1
  233. package/standalone/.next/server/app/api/ios/enrollment/start/route.js.nft.json +1 -1
  234. package/standalone/.next/server/app/api/ios/notification-devices/route.js +2 -2
  235. package/standalone/.next/server/app/api/ios/notification-devices/route.js.nft.json +1 -1
  236. package/standalone/.next/server/app/api/mcp/route.js.nft.json +1 -1
  237. package/standalone/.next/server/app/api/openapi.json/route.js.nft.json +1 -1
  238. package/standalone/.next/server/app/api/public/builds/[buildId]/artifacts/[artifactId]/manifest.plist/route.js.nft.json +1 -1
  239. package/standalone/.next/server/app/api/public/builds/[buildId]/artifacts/[artifactId]/route.js.nft.json +1 -1
  240. package/standalone/.next/server/app/api/public/crashes/route.js.nft.json +1 -1
  241. package/standalone/.next/server/app/api/public/github/webhook/route.js.nft.json +1 -1
  242. package/standalone/.next/server/app/api/public/gitlab/webhook/route.js.nft.json +1 -1
  243. package/standalone/.next/server/app/api/public/ios/enrollment-profile/route.js.nft.json +1 -1
  244. package/standalone/.next/server/app/api/public/ios/profile-response/route.js.nft.json +1 -1
  245. package/standalone/.next/server/app/api/public/jira/webhook/route.js.nft.json +1 -1
  246. package/standalone/.next/server/app/api/public/sse/[token]/route.js.nft.json +1 -1
  247. package/standalone/.next/server/app/api/run-attachments/[attachmentId]/route.js.nft.json +1 -1
  248. package/standalone/.next/server/app/api/run-attachments/route.js.nft.json +1 -1
  249. package/standalone/.next/server/app/api/sse/history/export/route.js.nft.json +1 -1
  250. package/standalone/.next/server/app/api/telemetry/analytics-events/route.js.nft.json +1 -1
  251. package/standalone/.next/server/app/api/telemetry/console-logs/route.js.nft.json +1 -1
  252. package/standalone/.next/server/app/api/telemetry/export/route.js.nft.json +1 -1
  253. package/standalone/.next/server/app/api/tools/call/route.js.nft.json +1 -1
  254. package/standalone/.next/server/app/api/tools/catalog/route.js.nft.json +1 -1
  255. package/standalone/.next/server/app/api/worktrees/[worktreeId]/diff-image/route.js.nft.json +1 -1
  256. package/standalone/.next/server/chunks/{[root-of-the-server]__013jjy8_tp5xo._.js → [root-of-the-server]__00iwkfurpc0x0._.js} +1 -1
  257. package/standalone/.next/server/chunks/{[root-of-the-server]__06f1gskg4t5ra._.js → [root-of-the-server]__085kh_xzq74pi._.js} +1 -1
  258. package/standalone/.next/server/chunks/{[root-of-the-server]__0ls_xfg-o69ws._.js → [root-of-the-server]__0b95wr93hpccm._.js} +1 -1
  259. package/standalone/.next/server/chunks/{[root-of-the-server]__0dy3_w5i5avqu._.js → [root-of-the-server]__0dqcl3ne9jy6j._.js} +1 -1
  260. package/standalone/.next/server/chunks/{[root-of-the-server]__0ihief9wd15j-._.js → [root-of-the-server]__0ernvc_drsyur._.js} +1 -1
  261. package/standalone/.next/server/chunks/{[root-of-the-server]__0nazqxkz69cb-._.js → [root-of-the-server]__0gdpss1ozbpj6._.js} +1 -1
  262. package/standalone/.next/server/chunks/{[root-of-the-server]__0fdv7ezffrnb8._.js → [root-of-the-server]__0n0aoxk6qal2q._.js} +1 -1
  263. package/standalone/.next/server/chunks/{[root-of-the-server]__103-o8iatm04o._.js → [root-of-the-server]__0pb0of35lhv4r._.js} +2 -2
  264. package/standalone/.next/server/chunks/{[root-of-the-server]__0jo85vtp06p8k._.js → [root-of-the-server]__0pb4bln2irwf1._.js} +1 -1
  265. package/standalone/.next/server/chunks/{[root-of-the-server]__0mf1u6efc98j1._.js → [root-of-the-server]__0q_f0b_y6m06s._.js} +1 -1
  266. package/standalone/.next/server/chunks/{[root-of-the-server]__0867t3wdit4oo._.js → [root-of-the-server]__0r5hav-f6hg4y._.js} +2 -2
  267. package/standalone/.next/server/chunks/{[root-of-the-server]__0te36hr8zjt5a._.js → [root-of-the-server]__0rfsymbgl5zmz._.js} +2 -2
  268. package/standalone/.next/server/chunks/{[root-of-the-server]__0mjmd0-g6img6._.js → [root-of-the-server]__0twikyj29lh-8._.js} +1 -1
  269. package/standalone/.next/server/chunks/{[root-of-the-server]__0jqrn7hnkezim._.js → [root-of-the-server]__0uj03p6vvvoox._.js} +1 -1
  270. package/standalone/.next/server/chunks/{[root-of-the-server]__02w866s8cv03o._.js → [root-of-the-server]__0vqqb799ovs3f._.js} +2 -2
  271. package/standalone/.next/server/chunks/{[root-of-the-server]__0o0xdssylq9hn._.js → [root-of-the-server]__0wpet49k-mtfs._.js} +2 -2
  272. package/standalone/.next/server/chunks/[root-of-the-server]__0zdbzx4i-waj1._.js +3 -0
  273. package/standalone/.next/server/chunks/{[root-of-the-server]__064yhuqdlomcc._.js → [root-of-the-server]__0zo4-ogstcigk._.js} +1 -1
  274. package/standalone/.next/server/chunks/{[root-of-the-server]__02inw6-w863p6._.js → [root-of-the-server]__1-80xb-l8bnx8._.js} +1 -1
  275. package/standalone/.next/server/chunks/[root-of-the-server]__10hjc82wl2rrg._.js +3 -0
  276. package/standalone/.next/server/chunks/[root-of-the-server]__13a6nglsddnmp._.js +3 -0
  277. package/standalone/.next/server/chunks/{[root-of-the-server]__016k_dvgtq4np._.js → [root-of-the-server]__15rnf_muhindu._.js} +2 -2
  278. package/standalone/.next/server/chunks/{[root-of-the-server]__01uprimny6xf6._.js → [root-of-the-server]__17e3j_fplgxlt._.js} +1 -1
  279. package/standalone/.next/server/chunks/{[root-of-the-server]__0lfp2twrecdmg._.js → [root-of-the-server]__18549u75hk0zc._.js} +1 -1
  280. package/standalone/.next/server/chunks/{[root-of-the-server]__0q00u15k45x_y._.js → [root-of-the-server]__1aktlm6bxadr9._.js} +1 -1
  281. package/standalone/.next/server/chunks/[root-of-the-server]__1cdu86kwjpucp._.js +3 -0
  282. package/standalone/.next/server/chunks/[root-of-the-server]__1fyo1xks_hnke._.js +3 -0
  283. package/standalone/.next/server/chunks/[root-of-the-server]__1h19tyu2_us3g._.js +3 -0
  284. package/standalone/.next/server/chunks/[root-of-the-server]__1jv6n33tz33mq._.js +3 -0
  285. package/standalone/.next/server/chunks/[root-of-the-server]__1nz79np-vsmai._.js +3 -0
  286. package/standalone/.next/server/chunks/[root-of-the-server]__1p7-v5i6_c02i._.js +3 -0
  287. package/standalone/.next/server/chunks/[root-of-the-server]__1qkmdb5cuuvm2._.js +3 -0
  288. package/standalone/.next/server/chunks/[root-of-the-server]__1w7ym0rrtb0i-._.js +3 -0
  289. package/standalone/.next/server/chunks/[root-of-the-server]__1ymepgwm4cf20._.js +3 -0
  290. package/standalone/.next/server/chunks/[root-of-the-server]__20in07t-hzagn._.js +3 -0
  291. package/standalone/.next/server/chunks/_00m3rl49dioc5._.js +2 -2
  292. package/standalone/.next/server/chunks/_01xc_0zvoyeyx._.js +34 -6
  293. package/standalone/.next/server/chunks/_02hp9azf0wdup._.js +1 -1
  294. package/standalone/.next/server/chunks/_093bw72t0qhum._.js +1 -1
  295. package/standalone/.next/server/chunks/_0d-5v8n_htaud._.js +1 -1
  296. package/standalone/.next/server/chunks/_0d7kp9zewgzo1._.js +2 -2
  297. package/standalone/.next/server/chunks/_0dudkod891pw5._.js +3 -3
  298. package/standalone/.next/server/chunks/_0j7luifqpmd6_._.js +2 -2
  299. package/standalone/.next/server/chunks/_0locehugaxjku._.js +2 -2
  300. package/standalone/.next/server/chunks/_0w3t6yq0vzl4e._.js +1 -1
  301. package/standalone/.next/server/chunks/_0y5_6jpmf7x6s._.js +29 -1
  302. package/standalone/.next/server/chunks/_0zco7_ov6mcxo._.js +2 -2
  303. package/standalone/.next/server/chunks/_115xin0kz2fip._.js +3 -3
  304. package/standalone/.next/server/chunks/_12hy44_5ttvdf._.js +1 -1
  305. package/standalone/.next/server/chunks/_16ok4m6i7ixom._.js +1 -1
  306. package/standalone/.next/server/chunks/_19p9fduxrv2k5._.js +1 -1
  307. package/standalone/.next/server/chunks/_1_s18hw5f5luk._.js +1 -1
  308. package/standalone/.next/server/chunks/_1f-fkpn7r9h91._.js +3 -3
  309. package/standalone/.next/server/chunks/_1l_e477qf2_nl._.js +2 -2
  310. package/standalone/.next/server/chunks/_1m_66q0249ksj._.js +34 -6
  311. package/standalone/.next/server/chunks/_1tf-vrjf16ebm._.js +1 -1
  312. package/standalone/.next/server/chunks/_1uio0t8zcf1gc._.js +1 -1
  313. package/standalone/.next/server/chunks/_1wrauglm0po8g._.js +2 -2
  314. package/standalone/.next/server/chunks/_20mbq9d_-vcjz._.js +1 -1
  315. package/standalone/.next/server/chunks/src_services_0shipcub2yhy6._.js +1 -1
  316. package/standalone/.next/server/chunks/ssr/_0-efhkzh6ytuc._.js +4 -1
  317. package/standalone/.next/server/chunks/ssr/_01tmqlwi5urdh._.js +4 -1
  318. package/standalone/.next/server/chunks/ssr/_05hrnr_dqieci._.js +4 -1
  319. package/standalone/.next/server/chunks/ssr/_09frr_x9sj064._.js +5 -5
  320. package/standalone/.next/server/chunks/ssr/_0b_41u6xr2bpb._.js +4 -1
  321. package/standalone/.next/server/chunks/ssr/_0wpoapzcyfgyq._.js +5 -5
  322. package/standalone/.next/server/chunks/ssr/_0x-yk4-j0jzr_._.js +5 -5
  323. package/standalone/.next/server/chunks/ssr/_10ljfb0azxzug._.js +4 -1
  324. package/standalone/.next/server/chunks/ssr/_18-1310mrai6k._.js +1 -1
  325. package/standalone/.next/server/chunks/ssr/messages_de_json_[json]_cjs_1uig1ud36h5oz._.js +1 -1
  326. package/standalone/.next/server/chunks/ssr/messages_en_json_[json]_cjs_206072-e4clp3._.js +1 -1
  327. package/standalone/.next/server/chunks/ssr/messages_es_json_[json]_cjs_082yukd_h99n8._.js +1 -1
  328. package/standalone/.next/server/chunks/ssr/messages_fr_json_[json]_cjs_0j6-w0ix_w_ac._.js +1 -1
  329. package/standalone/.next/server/chunks/ssr/src_components_github_merge-pull-request-button_tsx_0ie9278wjani8._.js +4 -4
  330. package/standalone/.next/server/chunks/ssr/src_components_runs_run-detail-page_tsx_0eje87-gx_hru._.js +1 -1
  331. package/standalone/.next/server/chunks/ssr/src_components_telemetry_telemetry-page_tsx_0yzdpy67zpdxv._.js +12 -12
  332. package/standalone/.next/server/middleware-build-manifest.js +3 -3
  333. package/standalone/.next/server/pages/404.html +1 -1
  334. package/standalone/.next/server/pages/500.html +1 -1
  335. package/standalone/.next/server/preview-props.json +3 -3
  336. package/standalone/.next/server/server-reference-manifest.js +1 -1
  337. package/standalone/.next/server/server-reference-manifest.json +1 -1
  338. package/standalone/.next/static/chunks/0ntk3pefienee.js +74 -0
  339. package/standalone/.next/static/chunks/{3_jy_qgwcgmn3.js → 14kti20ptdk3_.js} +1 -1
  340. package/standalone/.next/static/chunks/19qk_mg79rhyl.css +1 -0
  341. package/standalone/.next/static/chunks/{3_zfruxk01zuz.js → 1e332a5q9nxel.js} +5 -2
  342. package/standalone/.next/static/chunks/28saicmp1_h9d.js +6 -0
  343. package/standalone/.next/static/chunks/{0-5ysfaxu6aan.js → 2d07_4-p-edmw.js} +8 -5
  344. package/standalone/.next/static/chunks/{32mx1gp4arbt_.js → 2efwkyl82sglw.js} +5 -5
  345. package/standalone/.next/static/chunks/{42k7pln5sl3oz.js → 2yh26beqzug_m.js} +4 -1
  346. package/standalone/.next/static/chunks/{2r8eetg_rh89t.js → 2za-zornp6w1i.js} +7 -4
  347. package/standalone/.next/static/chunks/{0uyjb26ic9ght.js → 3_q7pq1wb2d40.js} +8 -5
  348. package/standalone/.next/static/chunks/{0j0ja7mw0m3um.js → 3kdlr1xpqonpk.js} +4 -4
  349. package/standalone/packages/agent-contract/src/runs.test.ts +85 -1
  350. package/standalone/packages/agent-contract/src/runs.ts +71 -0
  351. package/standalone/.next/server/chunks/[root-of-the-server]__0yel_6ygv-b1q._.js +0 -3
  352. package/standalone/.next/server/chunks/[root-of-the-server]__11maut7kzgbir._.js +0 -3
  353. package/standalone/.next/server/chunks/[root-of-the-server]__13gc7j8v7vuh0._.js +0 -3
  354. package/standalone/.next/server/chunks/[root-of-the-server]__1a8-wn63eojbf._.js +0 -3
  355. package/standalone/.next/server/chunks/[root-of-the-server]__1ezzodrqye_k8._.js +0 -3
  356. package/standalone/.next/server/chunks/[root-of-the-server]__1iz-2u-1z1_wl._.js +0 -3
  357. package/standalone/.next/server/chunks/[root-of-the-server]__1j1n2lzndr33r._.js +0 -3
  358. package/standalone/.next/server/chunks/[root-of-the-server]__1muq_0k53s3ch._.js +0 -3
  359. package/standalone/.next/server/chunks/[root-of-the-server]__1p4d5mk5s-hn3._.js +0 -3
  360. package/standalone/.next/server/chunks/[root-of-the-server]__1qlb8l11-wp5b._.js +0 -3
  361. package/standalone/.next/server/chunks/[root-of-the-server]__1qpqa-yffw6l1._.js +0 -3
  362. package/standalone/.next/server/chunks/[root-of-the-server]__1r8sh0sbv66af._.js +0 -3
  363. package/standalone/.next/server/chunks/[root-of-the-server]__1rvzmcinwhc9f._.js +0 -3
  364. package/standalone/.next/static/chunks/0nab6cwtymfd9.js +0 -6
  365. package/standalone/.next/static/chunks/2sxkr-ertr4d-.js +0 -74
  366. package/standalone/.next/static/chunks/3x93y46q6oe51.css +0 -1
  367. /package/standalone/.next/static/{QCl5bKQ9cBiF-g9fxs6IK → _Jso-9p3y6xgFDkMzfmcW}/_buildManifest.js +0 -0
  368. /package/standalone/.next/static/{QCl5bKQ9cBiF-g9fxs6IK → _Jso-9p3y6xgFDkMzfmcW}/_clientMiddlewareManifest.js +0 -0
  369. /package/standalone/.next/static/{QCl5bKQ9cBiF-g9fxs6IK → _Jso-9p3y6xgFDkMzfmcW}/_ssgManifest.js +0 -0
@@ -1,4 +1,4 @@
1
- (()=>{"use strict";(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,876561,e=>{var t=e.i(456420);let a={name:"archive",size:24,node:[["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.node;let r=(0,t.f)(a);e.s(["f",0,r],876561)},837817,e=>{var t=e.i(456420);let a={name:"undo-2",size:24,node:[["path",{d:"M9 14 4 9l5-5",key:"102s5s"}],["path",{d:"M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11",key:"f3b9sd"}]]};a.node;let r=(0,t.f)(a);e.s(["f",0,r],837817)},373725,e=>{var t=e.i(843476),a=e.i(257428);e.s(["f",0,function({ids:e,label:r,onChange:s,selected:i}){let n=e.length>0&&e.every(e=>i.has(e)),l=!n&&e.some(e=>i.has(e));return(0,t.jsx)(a.f,{"aria-label":r,checked:!!n||!!l&&"indeterminate",disabled:!e.length,onCheckedChange:t=>{let a=new Set(i);for(let r of e)!0===t?a.add(r):a.delete(r);s(a)}})}])},340953,e=>{var t=e.i(843476),a=e.i(271645),r=e.i(30030),s=e.i(820783),i=e.i(326999),n=e.i(981140),l=Object.defineProperty,o=(e,t)=>l(e,"name",{value:t,configurable:!0}),[d,c]=(0,r.f)("AlertDialog",[i.createDialogScope]),u=(0,i.createDialogScope)(),f=o(e=>{let{__scopeAlertDialog:a,...r}=e,s=u(a);return(0,t.jsx)(i.Root,{...s,...r,modal:!0})},"AlertDialog"),h=a.forwardRef(o(function(e,a){let{__scopeAlertDialog:r,...s}=e,n=u(r);return(0,t.jsx)(i.Trigger,{...n,...s,ref:a})},"AlertDialogTrigger")),m=o(e=>{let{__scopeAlertDialog:a,...r}=e,s=u(a);return(0,t.jsx)(i.Portal,{...s,...r})},"AlertDialogPortal"),x=a.forwardRef(o(function(e,a){let{__scopeAlertDialog:r,...s}=e,n=u(r);return(0,t.jsx)(i.Overlay,{...n,...s,ref:a})},"AlertDialogOverlay")),[p,g]=d("AlertDialogContent"),j=a.forwardRef(o(function(e,r){let{__scopeAlertDialog:l,children:o,...d}=e,c=u(l),f=a.useRef(null),h=(0,s.j)(r,f),m=a.useRef(null);return(0,t.jsx)(p,{scope:l,cancelRef:m,children:(0,t.jsx)(i.Content,{role:"alertdialog",...c,...d,ref:h,onOpenAutoFocus:(0,n.f)(d.onOpenAutoFocus,e=>{e.preventDefault(),m.current?.focus({preventScroll:!0})}),onPointerDownOutside:e=>e.preventDefault(),onInteractOutside:e=>e.preventDefault(),children:o})})},"AlertDialogContent")),v=a.forwardRef(o(function(e,a){let{__scopeAlertDialog:r,...s}=e,n=u(r);return(0,t.jsx)(i.Title,{...n,...s,ref:a})},"AlertDialogTitle")),b=a.forwardRef(o(function(e,a){let{__scopeAlertDialog:r,...s}=e,n=u(r);return(0,t.jsx)(i.Description,{...n,...s,ref:a})},"AlertDialogDescription")),w=a.forwardRef(o(function(e,a){let{__scopeAlertDialog:r,...s}=e,n=u(r);return(0,t.jsx)(i.Close,{...n,...s,ref:a})},"AlertDialogAction")),k=a.forwardRef(o(function(e,a){let{__scopeAlertDialog:r,...n}=e,{cancelRef:l}=g("AlertDialogCancel",r),o=u(r),d=(0,s.j)(a,l);return(0,t.jsx)(i.Close,{...o,...n,ref:d})},"AlertDialogCancel"));e.s(["Action",0,w,"Cancel",0,k,"Content",0,j,"Description",0,b,"Overlay",0,x,"Portal",0,m,"Root",0,f,"Title",0,v,"Trigger",0,h],691162);var A=e.i(691162),A=A,C=A,N=A,y=A,D=A,T=A,S=A,R=A,z=A,I=e.i(975157),$=e.i(519455);function P({...e}){return(0,t.jsx)(A.Root,{"data-slot":"alert-dialog",...e})}function E({...e}){return(0,t.jsx)(C.Trigger,{"data-slot":"alert-dialog-trigger",...e})}function V({...e}){return(0,t.jsx)(N.Portal,{"data-slot":"alert-dialog-portal",...e})}function O({className:e,...a}){return(0,t.jsx)(y.Overlay,{"data-slot":"alert-dialog-overlay",className:(0,I.f)("fixed inset-0 z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0",e),...a})}function K({className:e,size:a="default",...r}){return(0,t.jsxs)(V,{children:[(0,t.jsx)(O,{}),(0,t.jsx)(D.Content,{"data-slot":"alert-dialog-content","data-size":a,className:(0,I.f)("group/alert-dialog-content fixed top-1/2 left-1/2 z-50 grid w-full -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl bg-popover p-4 text-popover-foreground ring-1 ring-foreground/10 duration-100 outline-none data-[size=default]:max-w-xs data-[size=sm]:max-w-xs data-[size=default]:sm:max-w-sm data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",e),...r})]})}function M({className:e,...a}){return(0,t.jsx)("div",{"data-slot":"alert-dialog-header",className:(0,I.f)("grid grid-rows-[auto_1fr] place-items-center gap-1.5 text-center has-data-[slot=alert-dialog-media]:grid-rows-[auto_auto_1fr] has-data-[slot=alert-dialog-media]:gap-x-4 sm:group-data-[size=default]/alert-dialog-content:place-items-start sm:group-data-[size=default]/alert-dialog-content:text-left sm:group-data-[size=default]/alert-dialog-content:has-data-[slot=alert-dialog-media]:grid-rows-[auto_1fr]",e),...a})}function q({className:e,...a}){return(0,t.jsx)("div",{"data-slot":"alert-dialog-footer",className:(0,I.f)("-mx-4 -mb-4 flex flex-col-reverse gap-2 rounded-b-xl border-t bg-muted/50 p-4 group-data-[size=sm]/alert-dialog-content:grid group-data-[size=sm]/alert-dialog-content:grid-cols-2 sm:flex-row sm:justify-end",e),...a})}function U({className:e,...a}){return(0,t.jsx)(T.Title,{"data-slot":"alert-dialog-title",className:(0,I.f)("font-heading text-base font-medium sm:group-data-[size=default]/alert-dialog-content:group-has-data-[slot=alert-dialog-media]/alert-dialog-content:col-start-2",e),...a})}function L({className:e,...a}){return(0,t.jsx)(S.Description,{"data-slot":"alert-dialog-description",className:(0,I.f)("text-sm text-balance text-muted-foreground md:text-pretty *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground",e),...a})}function W({className:e,variant:a="default",size:r="default",...s}){return(0,t.jsx)($.K,{variant:a,size:r,asChild:!0,children:(0,t.jsx)(R.Action,{"data-slot":"alert-dialog-action",className:(0,I.f)(e),...s})})}function _({className:e,variant:a="outline",size:r="default",...s}){return(0,t.jsx)($.K,{variant:a,size:r,asChild:!0,children:(0,t.jsx)(z.Cancel,{"data-slot":"alert-dialog-cancel",className:(0,I.f)(e),...s})})}e.s(["f",0,function({actionLabel:e,cancelLabel:a,description:r,onConfirm:s,onOpenChange:i,open:n,title:l,trigger:o}){return(0,t.jsxs)(P,{onOpenChange:i,open:n,children:[o&&(0,t.jsx)(E,{asChild:!0,children:o}),(0,t.jsxs)(K,{children:[(0,t.jsxs)(M,{children:[(0,t.jsx)(U,{children:l}),(0,t.jsx)(L,{children:r})]}),(0,t.jsxs)(q,{children:[(0,t.jsx)(_,{children:a}),(0,t.jsx)(W,{onClick:()=>void s(),variant:"destructive",children:e})]})]})]})}],340953)},995454,e=>{var t=e.i(843476),a=e.i(271645),r=e.i(876561),s=e.i(259911),i=e.i(77071),n=e.i(566595),l=e.i(759659),o=e.i(837817),d=e.i(861745),c=e.i(948148),u=e.i(340953),f=e.i(816484),h=e.i(373725),m=e.i(929592),x=e.i(487486),p=e.i(519455),g=e.i(515288),j=e.i(257428),v=e.i(793479),b=e.i(967489),w=e.i(987968),k=e.i(784774),A=e.i(520133),C=e.i(637611),N=e.i(360583),y=e.i(767648),D=e.i(37332),T=e.i(975157),S=e.i(171502),R=e.i(42629);e.s(["DraftsPage",0,function(){let e=(0,c.f)("runs"),z=(0,d.X)(),I=(0,A.U)(),[$,P]=(0,a.useState)([]),[E,V]=(0,a.useState)(""),[O,K]=(0,a.useState)("ACTIVE"),[M,q]=(0,a.useState)(new Set),[U,L]=(0,a.useState)(!1),[W,_]=(0,a.useState)([]),[F,H]=(0,a.useState)(!0),[B,G]=(0,a.useState)(!1),[J,X]=(0,a.useState)(null),[Q,Y]=(0,a.useState)(null),[Z,ee]=(0,a.useState)(0),et=(0,a.useRef)(null),ea=(0,a.useCallback)(async()=>{try{let e=await (0,C.W)(`query RunDrafts($search: String, $archive: String!) { runDrafts(search: $search, archive: $archive, first: 100) { items { ${R.T} } nextCursor totalCount } }`,{search:E.trim()||null,archive:O});P(e.runDrafts.items),Y(e.runDrafts.nextCursor),ee(e.runDrafts.totalCount),X(null)}catch(e){X(e instanceof Error?e.message:String(e))}finally{H(!1)}},[O,E]);(0,a.useEffect)(()=>{let e=window.setTimeout(()=>void ea(),150);return()=>window.clearTimeout(e)},[ea]);let er=(0,a.useCallback)(async()=>{if(Q){G(!0);try{let e=await (0,C.W)(`query MoreRunDrafts($search: String, $archive: String!, $after: ID!) { runDrafts(search: $search, archive: $archive, first: 100, after: $after) { items { ${R.T} } nextCursor totalCount } }`,{search:E.trim()||null,archive:O,after:Q});P(t=>[...t,...e.runDrafts.items.filter(e=>!t.some(({id:t})=>t===e.id))]),Y(e.runDrafts.nextCursor),ee(e.runDrafts.totalCount)}catch(e){X(e instanceof Error?e.message:String(e))}finally{G(!1)}}},[O,Q,E]);(0,a.useEffect)(()=>{if(!Q||F||B||J)return;let e=et.current;if(!e)return;let t=new IntersectionObserver(e=>{e.some(e=>e.isIntersecting)&&er()},{rootMargin:"400px 0px"});return t.observe(e),()=>t.disconnect()},[J,er,F,B,Q]);let es=(0,a.useMemo)(()=>{let e=[];for(let t of $){let a=(0,N.x)(t.updatedAt)??t.updatedAt,r=e.at(-1);r?.key===a?r.items.push(t):e.push({key:a,value:t.updatedAt,items:[t]})}return e},[$]),ei=async(e,t)=>{try{await (0,C.W)(e,t),q(new Set),await ea()}catch(e){X(e instanceof Error?e.message:String(e))}},en=(e,t)=>ei("mutation ArchiveDrafts($ids: [ID!]!, $archived: Boolean!) { archiveRunDrafts(ids: $ids, archived: $archived) }",{ids:e,archived:t});return(0,t.jsxs)("section",{className:"mx-auto flex w-full max-w-[1500px] flex-col gap-6",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-start justify-between gap-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("h1",{className:"text-2xl font-semibold tracking-tight",children:e("drafts")}),(0,t.jsx)("p",{className:"mt-1 text-sm text-muted-foreground",children:e("draftsDescription")})]}),(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsxs)(p.K,{onClick:()=>L(e=>!e),variant:"outline",children:[(0,t.jsx)(s.f,{})," ",U?e("done"):e("edit")]}),(0,t.jsx)(p.K,{asChild:!0,children:(0,t.jsxs)(A.L,{href:"/ai/drafts/new",children:[(0,t.jsx)(i.f,{})," ",e("newDraft")]})})]})]}),(0,t.jsx)(g.N,{children:(0,t.jsxs)(g.O,{className:"space-y-4",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,t.jsxs)("div",{className:"relative w-full md:mr-auto md:w-auto md:min-w-56 md:flex-1",children:[(0,t.jsx)(n.f,{className:"absolute top-2.5 left-3 size-4 text-muted-foreground"}),(0,t.jsx)(v.f,{"aria-label":e("searchDrafts"),className:"pl-9",onChange:e=>V(e.target.value),placeholder:e("searchDrafts"),value:E})]}),(0,t.jsxs)(b.d,{onValueChange:e=>K(e??"ACTIVE"),value:O,children:[(0,t.jsx)(b.P,{"aria-label":e("archiveFilter"),children:(0,t.jsx)(b.U,{})}),(0,t.jsxs)(b.r,{children:[(0,t.jsx)(b.T,{value:"ACTIVE",children:e("active")}),(0,t.jsx)(b.T,{value:"ARCHIVED",children:e("archived")}),(0,t.jsx)(b.T,{value:"ALL",children:e("all")})]})]})]}),U&&M.size>0&&(0,t.jsxs)("div",{className:"flex gap-2 rounded-lg border p-3",children:[(0,t.jsx)("span",{className:"mr-auto text-sm text-muted-foreground",children:e("selected",{count:M.size})}),(0,t.jsxs)(p.K,{onClick:()=>void en([...M],"ARCHIVED"!==O),size:"sm",variant:"outline",children:["ARCHIVED"===O?(0,t.jsx)(o.f,{}):(0,t.jsx)(r.f,{})," ","ARCHIVED"===O?e("restore"):e("archive")]}),(0,t.jsxs)(p.K,{onClick:()=>_([...M]),size:"sm",variant:"destructive",children:[(0,t.jsx)(l.f,{})," ",e("delete")]})]}),J&&(0,t.jsx)(m.J,{variant:"destructive",children:(0,t.jsx)(m.p,{children:J})})]})}),F?(0,t.jsxs)("p",{className:"flex gap-2 text-muted-foreground",children:[(0,t.jsx)(w.f,{})," ",e("loading")]}):$.length?(0,t.jsx)(g.N,{className:"gap-0 overflow-hidden py-0",children:(0,t.jsxs)(k.s,{children:[(0,t.jsx)(k.E,{children:(0,t.jsxs)(k.N,{children:[U&&(0,t.jsx)(k.V,{className:"w-10",children:(0,t.jsx)(h.f,{ids:$.map(({id:e})=>e),label:e("selectAll"),onChange:q,selected:M})}),(0,t.jsx)(k.V,{children:e("mode")}),(0,t.jsx)(k.V,{children:e("worktree")}),(0,t.jsx)(k.V,{children:e("ticket")}),(0,t.jsx)(k.V,{children:e("prompt")}),(0,t.jsx)(k.V,{children:e("tool")}),(0,t.jsx)(k.V,{children:e("attachments")}),(0,t.jsx)(k.V,{children:e("age")}),(0,t.jsx)(k.V,{})]})}),(0,t.jsx)(k.z,{children:es.map(s=>(0,t.jsxs)(a.Fragment,{children:[(0,t.jsxs)(k.N,{className:"bg-muted/20 hover:bg-muted/20",children:[U&&(0,t.jsx)(k.d,{className:"py-1.5",children:(0,t.jsx)(h.f,{ids:s.items.map(({id:e})=>e),label:e("selectDay",{day:(0,N.l)(s.value,"long",{locale:z,showTime:!1})}),onChange:q,selected:M})}),(0,t.jsx)(k.d,{className:"py-1.5 text-xs font-normal text-muted-foreground",colSpan:8,children:(0,N.l)(s.value,"long",{locale:z,showTime:!1})})]}),s.items.map(a=>(0,t.jsxs)(k.N,{className:(0,T.f)("cursor-pointer",a.worktree?.highlightColor&&S.x[a.worktree.highlightColor]),onClick:e=>{if((0,D.p)(e))if(U){let e;e=a.id,q(t=>{let a=new Set(t);return a.has(e)?a.delete(e):a.add(e),a})}else I.push(`/ai/drafts/new?draft=${a.id}`)},children:[U&&(0,t.jsx)(k.d,{children:(0,t.jsx)(j.f,{"aria-label":e("selectDraft"),checked:M.has(a.id),onCheckedChange:e=>q(t=>{let r=new Set(t);return e?r.add(a.id):r.delete(a.id),r})})}),(0,t.jsx)(k.d,{children:(0,t.jsx)(x.f,{children:"PLAN"===a.kind?e("plan"):e("session")})}),(0,t.jsx)(k.d,{children:a.worktree?(0,t.jsxs)(A.L,{className:(0,T.f)(D.E,"block min-w-0"),href:`/dashboard/worktrees/${a.worktree.id}`,title:a.worktree.folder,children:[(0,t.jsx)("span",{className:"block truncate",children:a.worktree.branch??"—"}),(0,t.jsx)("span",{className:"block max-w-56 truncate font-mono text-xs text-muted-foreground",children:a.worktree.folder})]}):(0,t.jsx)("p",{children:"—"})}),(0,t.jsx)(k.d,{children:a.jiraIssueKey??"—"}),(0,t.jsx)(k.d,{children:(0,t.jsx)(A.L,{className:(0,T.f)(D.E,"block max-w-96 truncate"),href:`/ai/drafts/new?draft=${a.id}`,title:a.prompt,children:a.prompt})}),(0,t.jsxs)(k.d,{children:[(0,y.G)(a.provider)," · ",a.model]}),(0,t.jsx)(k.d,{children:a.attachments.length}),(0,t.jsx)(k.d,{children:(0,t.jsx)(f.f,{kind:"relative",value:a.updatedAt})}),(0,t.jsx)(k.d,{children:(0,t.jsxs)("div",{className:"flex justify-end gap-1",children:[(0,t.jsx)(p.K,{"aria-label":a.archivedAt?e("restore"):e("archive"),onClick:()=>void en([a.id],!a.archivedAt),size:"icon-sm",variant:"ghost",children:a.archivedAt?(0,t.jsx)(o.f,{}):(0,t.jsx)(r.f,{})}),(0,t.jsx)(p.K,{"aria-label":e("delete"),onClick:()=>_([a.id]),size:"icon-sm",variant:"destructive",children:(0,t.jsx)(l.f,{})})]})})]},a.id))]},s.key))})]})}):(0,t.jsx)("p",{className:"rounded-lg border p-12 text-center text-muted-foreground",children:e("noDrafts")}),$.length>0&&(0,t.jsxs)("div",{className:"flex flex-col items-center justify-center gap-3",children:[(0,t.jsx)("span",{className:"text-sm text-muted-foreground",children:e("showingCount",{count:$.length,total:Z})}),Q&&(0,t.jsx)("div",{className:"flex min-h-10 items-center justify-center gap-2 text-sm text-muted-foreground",ref:et,role:"status",children:B&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(w.f,{})," ",e("loadingMore")]})})]}),(0,t.jsx)(u.f,{actionLabel:e("delete"),cancelLabel:e("cancel"),description:e("deleteDraftDescription"),onConfirm:()=>{ei("mutation DeleteDrafts($ids: [ID!]!) { deleteRunDrafts(ids: $ids) }",{ids:W})},onOpenChange:e=>{e||_([])},open:W.length>0,title:e("deleteDraftTitle")})]})}])},42629,e=>{let t=`
1
+ (()=>{"use strict";(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,876561,e=>{var t=e.i(456420);let a={name:"archive",size:24,node:[["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.node;let r=(0,t.f)(a);e.s(["f",0,r],876561)},837817,e=>{var t=e.i(456420);let a={name:"undo-2",size:24,node:[["path",{d:"M9 14 4 9l5-5",key:"102s5s"}],["path",{d:"M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11",key:"f3b9sd"}]]};a.node;let r=(0,t.f)(a);e.s(["f",0,r],837817)},373725,e=>{var t=e.i(843476),a=e.i(257428);e.s(["f",0,function({ids:e,label:r,onChange:s,selected:i}){let n=e.length>0&&e.every(e=>i.has(e)),l=!n&&e.some(e=>i.has(e));return(0,t.jsx)(a.f,{"aria-label":r,checked:!!n||!!l&&"indeterminate",disabled:!e.length,onCheckedChange:t=>{let a=new Set(i);for(let r of e)!0===t?a.add(r):a.delete(r);s(a)}})}])},340953,e=>{var t=e.i(843476),a=e.i(271645),r=e.i(30030),s=e.i(820783),i=e.i(326999),n=e.i(981140),l=Object.defineProperty,o=(e,t)=>l(e,"name",{value:t,configurable:!0}),[d,c]=(0,r.f)("AlertDialog",[i.createDialogScope]),u=(0,i.createDialogScope)(),f=o(e=>{let{__scopeAlertDialog:a,...r}=e,s=u(a);return(0,t.jsx)(i.Root,{...s,...r,modal:!0})},"AlertDialog"),h=a.forwardRef(o(function(e,a){let{__scopeAlertDialog:r,...s}=e,n=u(r);return(0,t.jsx)(i.Trigger,{...n,...s,ref:a})},"AlertDialogTrigger")),m=o(e=>{let{__scopeAlertDialog:a,...r}=e,s=u(a);return(0,t.jsx)(i.Portal,{...s,...r})},"AlertDialogPortal"),x=a.forwardRef(o(function(e,a){let{__scopeAlertDialog:r,...s}=e,n=u(r);return(0,t.jsx)(i.Overlay,{...n,...s,ref:a})},"AlertDialogOverlay")),[p,g]=d("AlertDialogContent"),j=a.forwardRef(o(function(e,r){let{__scopeAlertDialog:l,children:o,...d}=e,c=u(l),f=a.useRef(null),h=(0,s.j)(r,f),m=a.useRef(null);return(0,t.jsx)(p,{scope:l,cancelRef:m,children:(0,t.jsx)(i.Content,{role:"alertdialog",...c,...d,ref:h,onOpenAutoFocus:(0,n.f)(d.onOpenAutoFocus,e=>{e.preventDefault(),m.current?.focus({preventScroll:!0})}),onPointerDownOutside:e=>e.preventDefault(),onInteractOutside:e=>e.preventDefault(),children:o})})},"AlertDialogContent")),v=a.forwardRef(o(function(e,a){let{__scopeAlertDialog:r,...s}=e,n=u(r);return(0,t.jsx)(i.Title,{...n,...s,ref:a})},"AlertDialogTitle")),b=a.forwardRef(o(function(e,a){let{__scopeAlertDialog:r,...s}=e,n=u(r);return(0,t.jsx)(i.Description,{...n,...s,ref:a})},"AlertDialogDescription")),w=a.forwardRef(o(function(e,a){let{__scopeAlertDialog:r,...s}=e,n=u(r);return(0,t.jsx)(i.Close,{...n,...s,ref:a})},"AlertDialogAction")),k=a.forwardRef(o(function(e,a){let{__scopeAlertDialog:r,...n}=e,{cancelRef:l}=g("AlertDialogCancel",r),o=u(r),d=(0,s.j)(a,l);return(0,t.jsx)(i.Close,{...o,...n,ref:d})},"AlertDialogCancel"));e.s(["Action",0,w,"Cancel",0,k,"Content",0,j,"Description",0,b,"Overlay",0,x,"Portal",0,m,"Root",0,f,"Title",0,v,"Trigger",0,h],691162);var A=e.i(691162),A=A,C=A,N=A,y=A,D=A,T=A,S=A,R=A,I=A,z=e.i(975157),P=e.i(519455);function $({...e}){return(0,t.jsx)(A.Root,{"data-slot":"alert-dialog",...e})}function E({...e}){return(0,t.jsx)(C.Trigger,{"data-slot":"alert-dialog-trigger",...e})}function V({...e}){return(0,t.jsx)(N.Portal,{"data-slot":"alert-dialog-portal",...e})}function O({className:e,...a}){return(0,t.jsx)(y.Overlay,{"data-slot":"alert-dialog-overlay",className:(0,z.f)("fixed inset-0 z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0",e),...a})}function K({className:e,size:a="default",...r}){return(0,t.jsxs)(V,{children:[(0,t.jsx)(O,{}),(0,t.jsx)(D.Content,{"data-slot":"alert-dialog-content","data-size":a,className:(0,z.f)("group/alert-dialog-content fixed top-1/2 left-1/2 z-50 grid w-full -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl bg-popover p-4 text-popover-foreground ring-1 ring-foreground/10 duration-100 outline-none data-[size=default]:max-w-xs data-[size=sm]:max-w-xs data-[size=default]:sm:max-w-sm data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",e),...r})]})}function M({className:e,...a}){return(0,t.jsx)("div",{"data-slot":"alert-dialog-header",className:(0,z.f)("grid grid-rows-[auto_1fr] place-items-center gap-1.5 text-center has-data-[slot=alert-dialog-media]:grid-rows-[auto_auto_1fr] has-data-[slot=alert-dialog-media]:gap-x-4 sm:group-data-[size=default]/alert-dialog-content:place-items-start sm:group-data-[size=default]/alert-dialog-content:text-left sm:group-data-[size=default]/alert-dialog-content:has-data-[slot=alert-dialog-media]:grid-rows-[auto_1fr]",e),...a})}function q({className:e,...a}){return(0,t.jsx)("div",{"data-slot":"alert-dialog-footer",className:(0,z.f)("-mx-4 -mb-4 flex flex-col-reverse gap-2 rounded-b-xl border-t bg-muted/50 p-4 group-data-[size=sm]/alert-dialog-content:grid group-data-[size=sm]/alert-dialog-content:grid-cols-2 sm:flex-row sm:justify-end",e),...a})}function L({className:e,...a}){return(0,t.jsx)(T.Title,{"data-slot":"alert-dialog-title",className:(0,z.f)("font-heading text-base font-medium sm:group-data-[size=default]/alert-dialog-content:group-has-data-[slot=alert-dialog-media]/alert-dialog-content:col-start-2",e),...a})}function U({className:e,...a}){return(0,t.jsx)(S.Description,{"data-slot":"alert-dialog-description",className:(0,z.f)("text-sm text-balance text-muted-foreground md:text-pretty *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground",e),...a})}function W({className:e,variant:a="default",size:r="default",...s}){return(0,t.jsx)(P.K,{variant:a,size:r,asChild:!0,children:(0,t.jsx)(R.Action,{"data-slot":"alert-dialog-action",className:(0,z.f)(e),...s})})}function _({className:e,variant:a="outline",size:r="default",...s}){return(0,t.jsx)(P.K,{variant:a,size:r,asChild:!0,children:(0,t.jsx)(I.Cancel,{"data-slot":"alert-dialog-cancel",className:(0,z.f)(e),...s})})}e.s(["f",0,function({actionLabel:e,cancelLabel:a,description:r,onConfirm:s,onOpenChange:i,open:n,title:l,trigger:o}){return(0,t.jsxs)($,{onOpenChange:i,open:n,children:[o&&(0,t.jsx)(E,{asChild:!0,children:o}),(0,t.jsxs)(K,{children:[(0,t.jsxs)(M,{children:[(0,t.jsx)(L,{children:l}),(0,t.jsx)(U,{children:r})]}),(0,t.jsxs)(q,{children:[(0,t.jsx)(_,{children:a}),(0,t.jsx)(W,{onClick:()=>void s(),variant:"destructive",children:e})]})]})]})}],340953)},995454,e=>{var t=e.i(843476),a=e.i(271645),r=e.i(876561),s=e.i(259911),i=e.i(77071),n=e.i(566595),l=e.i(759659),o=e.i(837817),d=e.i(861745),c=e.i(948148),u=e.i(340953),f=e.i(816484),h=e.i(373725),m=e.i(929592),x=e.i(487486),p=e.i(519455),g=e.i(515288),j=e.i(257428),v=e.i(793479),b=e.i(967489),w=e.i(987968),k=e.i(784774),A=e.i(520133),C=e.i(637611),N=e.i(360583),y=e.i(767648),D=e.i(37332),T=e.i(975157),S=e.i(171502),R=e.i(42629);e.s(["DraftsPage",0,function(){let e=(0,c.f)("runs"),I=(0,d.X)(),z=(0,A.U)(),[P,$]=(0,a.useState)([]),[E,V]=(0,a.useState)(""),[O,K]=(0,a.useState)("ACTIVE"),[M,q]=(0,a.useState)(new Set),[L,U]=(0,a.useState)(!1),[W,_]=(0,a.useState)([]),[F,H]=(0,a.useState)(!0),[B,G]=(0,a.useState)(!1),[J,X]=(0,a.useState)(null),[Q,Y]=(0,a.useState)(null),[Z,ee]=(0,a.useState)(0),et=(0,a.useRef)(null),ea=(0,a.useCallback)(async()=>{try{let e=await (0,C.W)(`query RunDrafts($search: String, $archive: String!) { runDrafts(search: $search, archive: $archive, first: 100) { items { ${R.T} } nextCursor totalCount } }`,{search:E.trim()||null,archive:O});$(e.runDrafts.items),Y(e.runDrafts.nextCursor),ee(e.runDrafts.totalCount),X(null)}catch(e){X(e instanceof Error?e.message:String(e))}finally{H(!1)}},[O,E]);(0,a.useEffect)(()=>{let e=window.setTimeout(()=>void ea(),150);return()=>window.clearTimeout(e)},[ea]);let er=(0,a.useCallback)(async()=>{if(Q){G(!0);try{let e=await (0,C.W)(`query MoreRunDrafts($search: String, $archive: String!, $after: ID!) { runDrafts(search: $search, archive: $archive, first: 100, after: $after) { items { ${R.T} } nextCursor totalCount } }`,{search:E.trim()||null,archive:O,after:Q});$(t=>[...t,...e.runDrafts.items.filter(e=>!t.some(({id:t})=>t===e.id))]),Y(e.runDrafts.nextCursor),ee(e.runDrafts.totalCount)}catch(e){X(e instanceof Error?e.message:String(e))}finally{G(!1)}}},[O,Q,E]);(0,a.useEffect)(()=>{if(!Q||F||B||J)return;let e=et.current;if(!e)return;let t=new IntersectionObserver(e=>{e.some(e=>e.isIntersecting)&&er()},{rootMargin:"400px 0px"});return t.observe(e),()=>t.disconnect()},[J,er,F,B,Q]);let es=(0,a.useMemo)(()=>{let e=[];for(let t of P){let a=(0,N.x)(t.updatedAt)??t.updatedAt,r=e.at(-1);r?.key===a?r.items.push(t):e.push({key:a,value:t.updatedAt,items:[t]})}return e},[P]),ei=async(e,t)=>{try{await (0,C.W)(e,t),q(new Set),await ea()}catch(e){X(e instanceof Error?e.message:String(e))}},en=(e,t)=>ei("mutation ArchiveDrafts($ids: [ID!]!, $archived: Boolean!) { archiveRunDrafts(ids: $ids, archived: $archived) }",{ids:e,archived:t});return(0,t.jsxs)("section",{className:"mx-auto flex w-full max-w-[1500px] flex-col gap-6",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-start justify-between gap-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("h1",{className:"text-2xl font-semibold tracking-tight",children:e("drafts")}),(0,t.jsx)("p",{className:"mt-1 text-sm text-muted-foreground",children:e("draftsDescription")})]}),(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsxs)(p.K,{onClick:()=>U(e=>!e),variant:"outline",children:[(0,t.jsx)(s.f,{})," ",L?e("done"):e("edit")]}),(0,t.jsx)(p.K,{asChild:!0,children:(0,t.jsxs)(A.L,{href:"/ai/drafts/new",children:[(0,t.jsx)(i.f,{})," ",e("newDraft")]})})]})]}),(0,t.jsx)(g.N,{children:(0,t.jsxs)(g.O,{className:"space-y-4",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,t.jsxs)("div",{className:"relative w-full md:mr-auto md:w-auto md:min-w-56 md:flex-1",children:[(0,t.jsx)(n.f,{className:"absolute top-2.5 left-3 size-4 text-muted-foreground"}),(0,t.jsx)(v.f,{"aria-label":e("searchDrafts"),className:"pl-9",onChange:e=>V(e.target.value),placeholder:e("searchDrafts"),value:E})]}),(0,t.jsxs)(b.d,{onValueChange:e=>K(e??"ACTIVE"),value:O,children:[(0,t.jsx)(b.P,{"aria-label":e("archiveFilter"),children:(0,t.jsx)(b.U,{})}),(0,t.jsxs)(b.r,{children:[(0,t.jsx)(b.T,{value:"ACTIVE",children:e("active")}),(0,t.jsx)(b.T,{value:"ARCHIVED",children:e("archived")}),(0,t.jsx)(b.T,{value:"ALL",children:e("all")})]})]})]}),L&&M.size>0&&(0,t.jsxs)("div",{className:"flex gap-2 rounded-lg border p-3",children:[(0,t.jsx)("span",{className:"mr-auto text-sm text-muted-foreground",children:e("selected",{count:M.size})}),(0,t.jsxs)(p.K,{onClick:()=>void en([...M],"ARCHIVED"!==O),size:"sm",variant:"outline",children:["ARCHIVED"===O?(0,t.jsx)(o.f,{}):(0,t.jsx)(r.f,{})," ","ARCHIVED"===O?e("restore"):e("archive")]}),(0,t.jsxs)(p.K,{onClick:()=>_([...M]),size:"sm",variant:"destructive",children:[(0,t.jsx)(l.f,{})," ",e("delete")]})]}),J&&(0,t.jsx)(m.J,{variant:"destructive",children:(0,t.jsx)(m.p,{children:J})})]})}),F?(0,t.jsxs)("p",{className:"flex gap-2 text-muted-foreground",children:[(0,t.jsx)(w.f,{})," ",e("loading")]}):P.length?(0,t.jsx)(g.N,{className:"gap-0 overflow-hidden py-0",children:(0,t.jsxs)(k.s,{children:[(0,t.jsx)(k.E,{children:(0,t.jsxs)(k.N,{children:[L&&(0,t.jsx)(k.V,{className:"w-10",children:(0,t.jsx)(h.f,{ids:P.map(({id:e})=>e),label:e("selectAll"),onChange:q,selected:M})}),(0,t.jsx)(k.V,{children:e("mode")}),(0,t.jsx)(k.V,{children:e("worktree")}),(0,t.jsx)(k.V,{children:e("ticket")}),(0,t.jsx)(k.V,{children:e("prompt")}),(0,t.jsx)(k.V,{children:e("tool")}),(0,t.jsx)(k.V,{children:e("attachments")}),(0,t.jsx)(k.V,{children:e("age")}),(0,t.jsx)(k.V,{})]})}),(0,t.jsx)(k.z,{children:es.map(s=>(0,t.jsxs)(a.Fragment,{children:[(0,t.jsxs)(k.N,{className:"bg-muted/20 hover:bg-muted/20",children:[L&&(0,t.jsx)(k.d,{className:"py-1.5",children:(0,t.jsx)(h.f,{ids:s.items.map(({id:e})=>e),label:e("selectDay",{day:(0,N.l)(s.value,"long",{locale:I,showTime:!1})}),onChange:q,selected:M})}),(0,t.jsx)(k.d,{className:"py-1.5 text-xs font-normal text-muted-foreground",colSpan:8,children:(0,N.l)(s.value,"long",{locale:I,showTime:!1})})]}),s.items.map(a=>(0,t.jsxs)(k.N,{className:(0,T.f)("cursor-pointer",a.worktree?.highlightColor&&S.x[a.worktree.highlightColor]),onClick:e=>{if((0,D.p)(e))if(L){let e;e=a.id,q(t=>{let a=new Set(t);return a.has(e)?a.delete(e):a.add(e),a})}else z.push(`/ai/drafts/new?draft=${a.id}`)},children:[L&&(0,t.jsx)(k.d,{children:(0,t.jsx)(j.f,{"aria-label":e("selectDraft"),checked:M.has(a.id),onCheckedChange:e=>q(t=>{let r=new Set(t);return e?r.add(a.id):r.delete(a.id),r})})}),(0,t.jsx)(k.d,{children:(0,t.jsx)(x.f,{children:"PLAN"===a.kind?e("plan"):e("session")})}),(0,t.jsx)(k.d,{children:a.worktree?(0,t.jsxs)(A.L,{className:(0,T.f)(D.E,"block min-w-0"),href:`/dashboard/worktrees/${a.worktree.id}`,title:a.worktree.folder,children:[(0,t.jsx)("span",{className:"block truncate",children:a.worktree.branch??"—"}),(0,t.jsx)("span",{className:"block max-w-56 truncate font-mono text-xs text-muted-foreground",children:a.worktree.folder})]}):(0,t.jsx)("p",{children:"—"})}),(0,t.jsx)(k.d,{children:a.jiraIssueKey??"—"}),(0,t.jsx)(k.d,{children:(0,t.jsx)(A.L,{className:(0,T.f)(D.E,"block max-w-96 truncate"),href:`/ai/drafts/new?draft=${a.id}`,title:a.prompt,children:a.prompt})}),(0,t.jsxs)(k.d,{children:[(0,y.G)(a.provider)," · ",a.model]}),(0,t.jsx)(k.d,{children:a.attachments.length}),(0,t.jsx)(k.d,{children:(0,t.jsx)(f.f,{kind:"relative",value:a.updatedAt})}),(0,t.jsx)(k.d,{children:(0,t.jsxs)("div",{className:"flex justify-end gap-1",children:[(0,t.jsx)(p.K,{"aria-label":a.archivedAt?e("restore"):e("archive"),onClick:()=>void en([a.id],!a.archivedAt),size:"icon-sm",variant:"ghost",children:a.archivedAt?(0,t.jsx)(o.f,{}):(0,t.jsx)(r.f,{})}),(0,t.jsx)(p.K,{"aria-label":e("delete"),onClick:()=>_([a.id]),size:"icon-sm",variant:"destructive",children:(0,t.jsx)(l.f,{})})]})})]},a.id))]},s.key))})]})}):(0,t.jsx)("p",{className:"rounded-lg border p-12 text-center text-muted-foreground",children:e("noDrafts")}),P.length>0&&(0,t.jsxs)("div",{className:"flex flex-col items-center justify-center gap-3",children:[(0,t.jsx)("span",{className:"text-sm text-muted-foreground",children:e("showingCount",{count:P.length,total:Z})}),Q&&(0,t.jsx)("div",{className:"flex min-h-10 items-center justify-center gap-2 text-sm text-muted-foreground",ref:et,role:"status",children:B&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(w.f,{})," ",e("loadingMore")]})})]}),(0,t.jsx)(u.f,{actionLabel:e("delete"),cancelLabel:e("cancel"),description:e("deleteDraftDescription"),onConfirm:()=>{ei("mutation DeleteDrafts($ids: [ID!]!) { deleteRunDrafts(ids: $ids) }",{ids:W})},onOpenChange:e=>{e||_([])},open:W.length>0,title:e("deleteDraftTitle")})]})}])},42629,e=>{let t=`
2
2
  id kind displayNumber status provider followUpMode
3
3
  `,a=`
4
4
  id kind displayNumber status phase origin provider providerVersion
@@ -15,7 +15,10 @@
15
15
  cacheReadTokens cacheWriteTokens toolCallCount parentRunId parentRunNumber
16
16
  parentRun { ${t} }
17
17
  followUps { ${t} }
18
- attempts { id generation nativeId status resumeStrategy startedAt finishedAt supersededAt }
18
+ attempts {
19
+ id generation nativeId status resumeStrategy startedAt finishedAt supersededAt
20
+ sessionInfo { nativeTranscriptPath activityLogPath workingDirectory }
21
+ }
19
22
  inputs {
20
23
  id sequence kind prompt createdAt
21
24
  attachments { id filename contentType size sha256 downloadPath createdAt }
@@ -0,0 +1,6 @@
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,662663,e=>{"use strict";var t=e.i(843476);class s extends Error{code;fieldKey;constructor(e,t){super(`Invalid form answer (${e}): ${t}`),this.code=e,this.fieldKey=t}}function a(e){if(!e||"object"!=typeof e||Array.isArray(e))throw Error("Invalid form object");return e}function n(e,t){return"external"===e.type||!e.when||e.when.every(e=>{let s=t[e.key];if(void 0===s)return!1;let a=Array.isArray(s)?s.includes(String(e.value)):s===e.value;return"eq"===e.op?a:!a})}var r=e.i(948148),l=e.i(257428),i=e.i(793479),o=e.i(624687),d=e.i(967489);function u(e,t){let s=Object.create(null);for(let a of e){if(!n(a,s))continue;let e=Object.hasOwn(t,a.key)?t[a.key]:"external"!==a.type?a.default:void 0;void 0!==e&&(s[a.key]=e)}return s}function c({fields:e,draft:s,onChange:a,readOnly:p=!1}){let h=(0,r.f)("runs.form"),m=u(e,p?Object.assign(Object.fromEntries(e.map(e=>[e.key,void 0])),s):s),f=(e,t)=>a({...s,[e]:t});return(0,t.jsx)("div",{className:"space-y-5",children:e.map(e=>{if("hidden"in e&&e.hidden||!n(e,m))return null;let s=m[e.key],a=e.title||e.key,r="required"in e&&e.required,u="options"in e?e.options:void 0,c=Array.isArray(s)?s:[],x=`native-field-${e.key}`;return(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("label",{className:"block font-medium",htmlFor:x,children:[a,r?` (${h("required")})`:""]}),e.description&&(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:e.description}),p?(0,t.jsx)("p",{className:"whitespace-pre-wrap text-sm",children:void 0===s?"—":"boolean"==typeof s?h(s?"yes":"no"):Array.isArray(s)?s.map(e=>u?.find(t=>t.value===e)?.label??e).join(", "):u?.find(e=>e.value===s)?.label??String(s)}):"external"===e.type?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("a",{className:"text-primary underline",href:e.url,target:"_blank",rel:"noopener noreferrer",children:h("openLink")}),(0,t.jsxs)("label",{className:"flex items-center gap-2",children:[(0,t.jsx)(l.f,{id:x,checked:!0===s,onCheckedChange:t=>f(e.key,!0===t||void 0)}),h("acknowledge")]})]}):"boolean"===e.type?(0,t.jsxs)(d.d,{value:"boolean"==typeof s?String(s):"",onValueChange:t=>f(e.key,"unset"===t?void 0:"true"===t),children:[(0,t.jsx)(d.P,{id:x,"aria-label":a,children:(0,t.jsx)(d.U,{placeholder:h("choose")})}),(0,t.jsxs)(d.r,{children:[!r&&(0,t.jsx)(d.T,{value:"unset",children:h("unanswered")}),(0,t.jsx)(d.T,{value:"true",children:h("yes")}),(0,t.jsx)(d.T,{value:"false",children:h("no")})]})]}):"number"===e.type||"integer"===e.type?(0,t.jsx)(i.f,{id:x,"aria-label":a,type:"number",step:"integer"===e.type?1:"any",min:e.minimum,max:e.maximum,required:r,value:"number"==typeof s?s:"",onChange:t=>f(e.key,""===t.target.value?void 0:Number(t.target.value))}):"multiselect"===e.type?(0,t.jsxs)(t.Fragment,{children:[e.options.map(s=>(0,t.jsxs)("label",{className:"flex items-start gap-3 rounded-lg border p-3",children:[(0,t.jsx)(l.f,{checked:c.includes(s.value),onCheckedChange:t=>f(e.key,t?[...c,s.value]:c.filter(e=>e!==s.value))}),(0,t.jsxs)("span",{children:[(0,t.jsx)("span",{className:"block font-medium",children:s.label}),s.description&&(0,t.jsx)("span",{className:"text-sm text-muted-foreground",children:s.description})]})]},s.value)),e.custom&&(0,t.jsx)(o.f,{"aria-label":h("custom"),placeholder:h("customMultiple"),value:c.filter(t=>!e.options.some(e=>e.value===t)).join("\n"),onChange:t=>f(e.key,[...c.filter(t=>e.options.some(e=>e.value===t)),...t.target.value.split("\n").filter(Boolean)])})]}):"string"===e.type?(0,t.jsxs)(t.Fragment,{children:[e.options?.map(a=>(0,t.jsxs)("label",{className:"flex items-start gap-3 rounded-lg border p-3",children:[(0,t.jsx)(l.f,{checked:s===a.value,onCheckedChange:t=>f(e.key,t?a.value:void 0)}),(0,t.jsxs)("span",{children:[(0,t.jsx)("span",{className:"block font-medium",children:a.label}),a.description&&(0,t.jsx)("span",{className:"text-sm text-muted-foreground",children:a.description})]})]},a.value)),(!e.options||e.custom)&&(0,t.jsx)(i.f,{id:x,"aria-label":a,required:r,type:"email"===e.format?"email":"uri"===e.format?"url":"date"===e.format?"date":"text",placeholder:e.placeholder??(e.options?h("custom"):void 0),minLength:e.minLength,maxLength:e.maxLength,pattern:e.pattern,value:"string"!=typeof s||e.options?.some(e=>e.value===s)?"":s,onChange:t=>f(e.key,t.target.value||void 0)})]}):null]},e.key)})})}var p=e.i(724913),h=e.i(944887),m=e.i(271645),f=e.i(853138),x=e.i(876561),v=e.i(489002),g=e.i(55677),j=e.i(762368),b=e.i(829600),y=e.i(120283),w=e.i(328523),k=e.i(515281),N=e.i(21357),S=e.i(395925),C=e.i(566595),A=e.i(730274),$=e.i(759659),I=e.i(861745),R=e.i(340953),E=e.i(816484);e.i(983632);var T=e.i(26692),D=e.i(142811),O=e.i(929592),M=e.i(487486),P=e.i(519455),L=e.i(515288),_=e.i(776639),q=e.i(755146),F=e.i(110204),U=e.i(677572),W=e.i(987968),z=e.i(784774),B=e.i(520133),K=e.i(637611),V=e.i(767648),J=e.i(266136),G=e.i(975157),Y=e.i(171502),H=e.i(42629),X=e.i(689664),Q=e.i(716327),Z=e.i(452330),ee=e.i(508734),et=e.i(462777),es=e.i(779432),ea=e.i(271567),en=e.i(456420);let er={name:"brain",size:24,node:[["path",{d:"M12 18V5",key:"adv99a"}],["path",{d:"M15 13a4.17 4.17 0 01-3-4 4.17 4.17 0 01-3 4",key:"5nuw1p"}],["path",{d:"M17.707 6.294A3 3 0 1012 5a3 3 0 10-5.707 1.294",key:"18ldcf"}],["path",{d:"M17.996 5.125a4 4 0 012.526 5.77",key:"1sdu8q"}],["path",{d:"M18 18a4 4 0 002-7.465",key:"7xqqvr"}],["path",{d:"M19.967 17.482a4 4 0 11-7.967.517 4 4 0 11-7.967-.517",key:"t46ysz"}],["path",{d:"M6 18a4 4 0 01-2-7.465",key:"1y2m15"}],["path",{d:"M6.004 5.125a4 4 0 00-2.526 5.77",key:"3cw1ss"}]]};er.node;let el=(0,en.f)(er);var ei=e.i(551757),eo=e.i(559092),ed=e.i(235056);let eu={name:"file-diff",size:24,node:[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M9 10h6",key:"9gxzsh"}],["path",{d:"M12 13V7",key:"h0r20n"}],["path",{d:"M9 17h6",key:"r8uit2"}]]};eu.node;let ec=(0,en.f)(eu);var ep=e.i(671028),eh=e.i(91511);let em={name:"info",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]};em.node;let ef=(0,en.f)(em),ex={name:"list-checks",size:24,node:[["path",{d:"M13 5h8",key:"a7qcls"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 19h8",key:"c3s6r1"}],["path",{d:"m3 17 2 2 4-4",key:"1jhpwq"}],["path",{d:"m3 7 2 2 4-4",key:"1obspn"}]]};ex.node;let ev=(0,en.f)(ex),eg={name:"message-square",size:24,node:[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}]]};eg.node;let ej=(0,en.f)(eg);var eb=e.i(869309),ey=e.i(841220),ew=e.i(250832),ek=e.i(604139),eN=e.i(594831),eS=e.i(747925);function eC(e){return e&&"object"==typeof e&&!Array.isArray(e)?e:{}}function eA(e){return"string"==typeof e&&e.trim()?e:null}function e$(e){return"number"==typeof e&&Number.isFinite(e)?e:null}function eI(e){return eC(e.raw)}function eR(e){let t=eI(e).method;return"string"==typeof t&&t.length?t:null}function eE(e){return eC(eI(e).params)}function eT(e){let t=eI(e),s=eA(t.type);return s&&t.properties?s:null}function eD(e){return eC(eI(e).properties)}function eO(e){let t=eI(e),s=eA(t.type);return!s||eT(e)||eR(e)?null:(void 0!==t.session_id||void 0!==t.uuid||void 0!==t.message||void 0!==t.subtype)&&["system","user","assistant","result"].includes(s)?t:null}function eM(e){return e.split(/[/._-]/).flatMap(e=>e.replace(/([a-z0-9])([A-Z])/g,"$1 $2").replace(/([A-Za-z])([0-9])/g,"$1 $2").replace(/([A-Z]+)([A-Z][a-z])/g,"$1 $2").split(" ")).filter(e=>/[a-z0-9]/i.test(e)).map(e=>e[0].toUpperCase()+e.slice(1)).join(" ")}function eP(e){let t=eA(e);return t?(t.includes("-")?t.split("-").pop():t).slice(0,8):""}function eL(e){return e.replace(/\.0$/,"")}function e_(e){return e<1e3?`${Math.round(e)}ms`:e<6e4?`${eL((e/1e3).toFixed(1))}s`:`${eL((e/6e4).toFixed(1))}m`}function eq(e){let t=e>0&&e<.01?6:2;return`$${e.toFixed(t).replace(/0+$/,"").replace(/\.$/,"")}`}function eF(e,t=180){let s=e.replace(/\s+/g," ").trim();return s.length>t?`${s.slice(0,t-1)}…`:s}function eU(e){let t=eA(e);if(t)return t;if("number"==typeof e&&Number.isFinite(e))return String(e);if("boolean"==typeof e)return e?"Yes":"No";if(Array.isArray(e)&&e.length)return e.map(e=>eA(e)??eY(e,240)).filter(Boolean).join(", ");let s=eC(e);return Object.keys(s).length?eY(s,500):null}function eW(e){return eA(eC(eE(e).item).type)}let ez=[[/reason|think/i,el],[/command|exec|shell|bash|terminal/i,ek.f],[/file|patch|edit|diff|apply/i,ec],[/websearch|web_search|search/i,eh.f],[/todo|plan/i,ev],[/mcp|tool/i,eS.f],[/message/i,ej],[/error|fail/i,f.f]],eB=[[/tokenusage/i,ep.f],[/mcpserver/i,ey.f],[/settings/i,ew.f],[/^turn\/started/i,N.f],[/^turn\/completed/i,ei.f],[/status/i,es.f],[/requestuserinput|question/i,ed.f],[/disconnect/i,eN.f],[/serverconnect|connected/i,eb.f],[/plan/i,g.f]],eK=[[/question/i,ed.f],[/command|terminal|exec|bash/i,ek.f],[/tool/i,eS.f],[/file|diff|patch|edit/i,ec],[/reason|think/i,el],[/usage|token|cost/i,ep.f],[/status/i,es.f],[/web|search/i,eh.f],[/plan/i,g.f],[/result|complete|success|finish/i,ei.f],[/user/i,ej],[/assistant|agent|message|text/i,ea.f],[/error|fail/i,f.f],[/system|init|hook/i,ef]];function eV(e,t){for(let[s,a]of e)if(s.test(t))return a;return null}function eJ(e){let t=(Array.isArray(e.commandActions)?e.commandActions.map(eC):[]).map(e=>eA(e.command)).find(e=>!!e),s=eA(e.text)??t??eA(e.command)??eA(e.message)??eG(e.summary)??eG(e.content);if(s)return s.replace(/\s+/g," ").trim();let a=eA(e.type);return a?eM(a):""}function eG(e){if(!Array.isArray(e))return null;for(let t of e){let e=eA(t);if(e)return e;let s=eC(t),a=eA(s.text)??eA(s.content);if(a)return a}return null}function eY(e,t=160){let s;try{s=JSON.stringify(e)??""}catch{s=String(e)}return"{}"===(s=s.replace(/\s+/g," ").trim())||"null"===s||""===s?"":s.length>t?`${s.slice(0,t-1)}…`:s}function eH(e,t=new Set){let s=[];for(let[a,n]of Object.entries(e))if(!t.has(a))if("string"==typeof n){let e=n.trim();e&&s.push({label:eM(a),value:e})}else"number"==typeof n&&Number.isFinite(n)?s.push({label:eM(a),value:String(n)}):"boolean"==typeof n&&s.push({label:eM(a),value:n?"Yes":"No"});return s}function eX(e,t,s){for(let[a,n]of[["Total tokens",t.total??t.total_tokens],["Input tokens",t.input??t.input_tokens],["Output tokens",t.output??t.output_tokens],["Reasoning tokens",t.reasoning??t.reasoning_tokens],["Cache read tokens",eC(t.cache).read??t.cache_read_input_tokens],["Cache write tokens",eC(t.cache).write??t.cache_creation_input_tokens]]){let t=e$(n);null!==t&&e.push({label:a,value:s(t)})}}function eQ(e){let t=eC(e.message).content;return Array.isArray(t)?t.map(eC):[]}function eZ(e,t){let s=function(e){let t=eR(e);if(t){let s=eW(e);return s?eV(ez,s)??eo.f:eV(eB,t)??ea.f}let s=eT(e);if(s){let t=eD(e);if("message.part.updated"===s){let e=eC(t.part),s=eA(e.type)??"";if("tool"===s){let t=eA(e.tool)??"";return eV(ez,t)??eV(eK,t)??eS.f}return eV(eK,s)??eo.f}return"message.updated"===s?"user"===(eA(eC(t.info).role)??"message")?ej:ea.f:eV(eK,s)??ea.f}let a=eO(e);if(a){let t=eA(a.type)??e.type,s=eA(a.subtype)??"";return"result"===t?!0===a.is_error?f.f:ei.f:"user"===t&&void 0!==eC(a.tool_use_result).stdout?ek.f:"system"===t&&"init"===s?ew.f:"system"===t&&"hook_response"===s?"success"===a.outcome?ei.f:f.f:eV(eK,`${t} ${s}`)??ea.f}return eV(eK,e.type)??ea.f}(e),a=eR(e),n=new Intl.NumberFormat(t??"en-US"),r=e=>n.format(e);if(a){let t=function(e,t,s){if(/tokenusage/i.test(e)){let e,a=eC(t.tokenUsage??t.usage),n=eC(a.total??a),r=e$(n.inputTokens)??0,l=e$(n.outputTokens)??0,i=e$(n.totalTokens)??r+l,o=e$(n.cachedInputTokens),d=e$(n.reasoningOutputTokens),u=e$(a.modelContextWindow),c=[`↑${s(r)}`,`↓${s(l)}`,s(i)];u&&c.push(`${(e=Math.abs(u))>=1e6?`${eL((u/1e6).toFixed(1))}M`:e>=1e3?`${eL((u/1e3).toFixed(1))}K`:String(u)} ctx`);let p=[{label:"Total",value:s(i)},{label:"Input",value:s(r)},{label:"Output",value:s(l)}];return null!==o&&p.push({label:"Cached",value:s(o)}),null!==d&&p.push({label:"Reasoning",value:s(d)}),null!==u&&p.push({label:"Context window",value:s(u)}),{line:c.join(" · "),detailRows:p}}if(/^thread\/status/i.test(e)){let e=eC(t.status),s=eA(e.type)??"",a=Array.isArray(e.activeFlags)?e.activeFlags.map(e=>eM(String(e))):[],n=[eM(s),...a].filter(Boolean).join(" · "),r=s?[{label:"Status",value:eM(s)}]:[];return a.length&&r.push({label:"Flags",value:a.join(", ")}),{line:n,detailRows:r}}if("turn/diff/updated"===e){let e,a,n,r,l,i,o=eA(t.diff)??"";return o?(e=[...o.matchAll(/^diff --git a\/(.+) b\/(.+)$/gm)].map(e=>e[2]),n=(a=o.split("\n")).filter(e=>e.startsWith("+")&&!e.startsWith("+++")).length,r=a.filter(e=>e.startsWith("-")&&!e.startsWith("---")).length,l=`${s(e.length)} ${1===e.length?"file":"files"} changed`,i=[{label:"Files",value:e.length?e.join("\n"):"Unknown"},{label:"Additions",value:s(n)},{label:"Deletions",value:s(r)}],{line:`${l} \xb7 +${s(n)} -${s(r)}`,detailRows:i}):{line:"No file changes",detailRows:[]}}if(/^turn\//i.test(e)){let e=eC(t.turn),s=eA(e.status),a=e$(e.durationMs),n=[eP(e.id)];s&&n.push(eM(s)),a&&n.push(e_(a));let r=[];return e.id&&r.push({label:"Turn",value:eP(e.id)}),s&&r.push({label:"Status",value:eM(s)}),null!==a&&r.push({label:"Duration",value:e_(a)}),eA(e.error)&&r.push({label:"Error",value:eA(e.error)}),{line:n.filter(Boolean).join(" · "),detailRows:r}}if(/settings/i.test(e)){let e=eC(t.threadSettings??t.settings),s=eC(e.sandboxPolicy),a=eC(e.collaborationMode),n=eA(e.model),r=eA(e.effort),l=eA(a.mode),i=[n,r,l].filter(Boolean).join(" · "),o=[];return n&&o.push({label:"Model",value:n}),eA(e.modelProvider)&&o.push({label:"Provider",value:eA(e.modelProvider)}),r&&o.push({label:"Effort",value:eM(r)}),l&&o.push({label:"Mode",value:eM(l)}),eA(e.approvalPolicy)&&o.push({label:"Approval",value:eM(eA(e.approvalPolicy))}),eA(s.type)&&o.push({label:"Sandbox",value:eM(eA(s.type))}),"boolean"==typeof s.networkAccess&&o.push({label:"Network access",value:s.networkAccess?"Yes":"No"}),eA(e.personality)&&o.push({label:"Personality",value:eM(eA(e.personality))}),eA(e.cwd)&&o.push({label:"Working directory",value:eA(e.cwd)}),{line:i,detailRows:o}}if(/mcpserver/i.test(e)){let e=eA(t.name)??"",s=eA(t.status)??"",a=eA(t.failureReason)??eA(t.error),n=[e,eM(s),a].filter(Boolean).join(" · "),r=[];return e&&r.push({label:"Server",value:e}),s&&r.push({label:"Status",value:eM(s)}),a&&r.push({label:"Failure",value:a}),{line:n,detailRows:r}}if(/\/delta$/i.test(e))return{line:(eA(t.delta)??"").replace(/\s+/g," ").trim(),detailRows:[]};if(e.startsWith("item/")&&t.item){let e=eC(t.item);if("commandExecution"===e.type){let t=eJ(e),a=eA(e.status),n=e$(e.exitCode),r=e$(e.durationMs),l=[];return a&&l.push({label:"Status",value:eM(a)}),null!==n&&l.push({label:"Exit code",value:s(n)}),null!==r&&l.push({label:"Duration",value:e_(r)}),eA(e.cwd)&&l.push({label:"Working directory",value:eA(e.cwd)}),t&&l.push({label:"Command",value:t}),eA(e.aggregatedOutput)&&l.push({label:"Output",value:eA(e.aggregatedOutput)}),{line:t,detailRows:l}}if("fileChange"===e.type){let t=Array.isArray(e.changes)?e.changes:[],a=t.map(e=>{let t=eC(e),s=eC(t.kind);return{label:eA(t.path)??"File",value:eM(eA(s.type)??"changed")}});return eA(e.status)&&a.unshift({label:"Status",value:eM(eA(e.status))}),{line:`${s(t.length)} ${1===t.length?"file":"files"} changed`,detailRows:a}}let a=eH(e,new Set(["id"]));return{line:eJ(e),detailRows:a}}if(/disconnect/i.test(e)){let e=eA(t.message)??"";return{line:e,detailRows:e?[{label:"Message",value:e}]:[]}}return null}(a,eE(e),r),n=t?.line||eY(eE(e))||e.summary||"";return{icon:s,methodTitle:eM(a),line:n,detailRows:t?.detailRows??[]}}let l=eT(e);if(l)return{icon:s,...function(e,t,s){let a=eD(e);if("session.status"===t){let e=eA(eC(a.status).type)??"Unknown";return{methodTitle:"Session Status",line:eM(e),detailRows:[{label:"Status",value:eM(e)}]}}if("session.diff"===t){let e=Array.isArray(a.diff)?a.diff:[],t=0,n=0,r=[];for(let[a,l]of e.entries()){let e=eC(l);t+=e$(e.additions)??0,n+=e$(e.deletions)??0;let i=eA(e.file)??eA(e.path)??`File ${a+1}`,o=[null!==e$(e.additions)?`+${s(e$(e.additions))}`:null,null!==e$(e.deletions)?`-${s(e$(e.deletions))}`:null,eA(e.status)?eM(eA(e.status)):null].filter(Boolean).join(" · ");r.push({label:i,value:o||"Changed"})}return{methodTitle:"Session Diff",line:e.length?`${s(e.length)} ${1===e.length?"file":"files"} \xb7 +${s(t)} -${s(n)}`:"No file changes",detailRows:r}}if("session.updated"===t){let e=eC(a.info),t=eC(e.model),n=eC(e.tokens),r=eA(e.title),l=eA(t.id),i=eA(e.agent),o=e$(e.cost),d=[];return r&&d.push({label:"Title",value:r}),eA(e.slug)&&d.push({label:"Slug",value:eA(e.slug)}),l&&d.push({label:"Model",value:l}),eA(t.providerID)&&d.push({label:"Provider",value:eA(t.providerID)}),eA(t.variant)&&d.push({label:"Variant",value:eA(t.variant)}),i&&d.push({label:"Agent",value:i}),eA(e.version)&&d.push({label:"OpenCode version",value:eA(e.version)}),eA(e.directory)&&d.push({label:"Working directory",value:eA(e.directory)}),eX(d,n,s),null!==o&&d.push({label:"Reported cost",value:eq(o)}),{methodTitle:"Session Updated",line:[r,l,i,o?eq(o):null].filter(Boolean).join(" · "),detailRows:d}}if("message.updated"===t){let e=eC(a.info),t=eA(e.role)??"message",n=eC(e.model),r=eA(e.modelID)??eA(n.modelID),l=eA(e.providerID)??eA(n.providerID),i=eA(e.finish),o=eA(e.agent),d=eC(e.tokens),u=e$(d.total),c=e$(e.cost),p=eC(e.error),h=eA(e.error)??eA(p.message)??eA(eC(p.data).message),m=[{label:"Role",value:eM(t)}];return r&&m.push({label:"Model",value:r}),l&&m.push({label:"Provider",value:l}),o&&m.push({label:"Agent",value:o}),eA(e.mode)&&m.push({label:"Mode",value:eM(eA(e.mode))}),i&&m.push({label:"Finish reason",value:eM(i)}),eX(m,d,s),null!==c&&m.push({label:"Reported cost",value:eq(c)}),h&&m.push({label:"Error",value:h}),{methodTitle:`${eM(t)} Message`,line:[r,o,h?"Failed":i?eM(i):"Started",null!==u&&u>0?`${s(u)} tokens`:null,c?eq(c):null].filter(Boolean).join(" · "),detailRows:m}}if("message.part.delta"===t){let e=eA(a.delta)??"",t=eA(a.field),s=[];return t&&s.push({label:"Field",value:eM(t)}),e&&s.push({label:"Text",value:e}),{methodTitle:"Message Text Delta",line:eF(e),detailRows:s}}if("message.part.updated"===t){let t=eC(a.part),n=eA(t.type)??"part";if("text"===n||"reasoning"===n){let s=eA(t.text)??e.detailMarkdown??e.summary;return{methodTitle:eM(n),line:eF(s),detailRows:s?[{label:"Text",value:s}]:[]}}if("tool"===n){let e=eA(t.tool)??"Tool",a=eC(t.state),n=eC(a.input),r=eC(a.metadata),l=eC(a.time),i=eA(a.status),o=eA(n.command),d=eA(a.title)??o,u=e$(l.start),c=e$(l.end),p=null!==u&&null!==c?c-u:null,h=e$(r.exit),m=eA(a.output)??eA(r.output),f=[{label:"Tool",value:eM(e)}];i&&f.push({label:"Status",value:eM(i)}),d&&f.push({label:"Title",value:d}),o&&o!==d&&f.push({label:"Command",value:o}),null!==p&&f.push({label:"Duration",value:e_(p)}),null!==h&&f.push({label:"Exit code",value:s(h)});let x=eU(n);return x&&!o&&f.push({label:"Input",value:x}),m&&f.push({label:"Output",value:m}),{methodTitle:`${eM(e)} Tool`,line:[d??eM(e),i?eM(i):null,null!==p?e_(p):null,null!==h?`exit ${s(h)}`:null].filter(Boolean).join(" · "),detailRows:f}}if("step-start"===n){let e=eP(t.snapshot);return{methodTitle:"Step Started",line:e?`Snapshot ${e}`:"Started",detailRows:e?[{label:"Snapshot",value:eA(t.snapshot)}]:[]}}if("step-finish"===n){let e=eA(t.reason),a=eC(t.tokens),n=e$(a.input),r=e$(a.output),l=e$(a.reasoning),i=e$(t.cost),o=[];return e&&o.push({label:"Finish reason",value:eM(e)}),eX(o,a,s),null!==i&&o.push({label:"Reported cost",value:eq(i)}),eA(t.snapshot)&&o.push({label:"Snapshot",value:eA(t.snapshot)}),{methodTitle:"Step Finished",line:[e?eM(e):"Finished",null!==n?`↑${s(n)}`:null,null!==r?`↓${s(r)}`:null,l?`${s(l)} reasoning`:null,i?eq(i):null].filter(Boolean).join(" · "),detailRows:o}}return{methodTitle:eM(n),line:eM(n),detailRows:eH(t,new Set(["id","messageID","sessionID"]))}}return{methodTitle:eM(t),line:eY(a)||e.summary||"",detailRows:eH(a)}}(e,l,r)};let i=eO(e);return i?{icon:s,...function(e,t,s){let a=eA(t.type)??e.type.toLowerCase(),n=eA(t.subtype);if("system"===a&&"init"===n){let e=Array.isArray(t.mcp_servers)?t.mcp_servers:[],a=Array.isArray(t.tools)?t.tools:[],n=Array.isArray(t.agents)?t.agents:[],r=Array.isArray(t.skills)?t.skills:[],l=Array.isArray(t.plugins)?t.plugins:[],i=eA(t.model),o=eA(t.claude_code_version),d=eA(t.permissionMode),u=[];return i&&u.push({label:"Model",value:i}),o&&u.push({label:"Claude Code version",value:o}),d&&u.push({label:"Permission mode",value:eM(d)}),eA(t.cwd)&&u.push({label:"Working directory",value:eA(t.cwd)}),a.length&&u.push({label:"Tools",value:`${s(a.length)} available`}),n.length&&u.push({label:"Agents",value:n.map(String).join(", ")}),r.length&&u.push({label:"Skills",value:`${s(r.length)} loaded`}),l.length&&u.push({label:"Plugins",value:`${s(l.length)} loaded`}),e.length&&u.push({label:"MCP servers",value:e.map(e=>{let t=eC(e);return[eA(t.name),eA(t.status)&&eM(eA(t.status))].filter(Boolean).join(" · ")}).join(", ")}),{methodTitle:"Claude Initialization",line:[i,o?`v${o}`:null,d&&eM(d)].filter(Boolean).join(" · "),detailRows:u}}if("system"===a&&n?.startsWith("hook_")){let e=eA(t.hook_name)??eA(t.hook_event)??"Hook",a=eA(t.outcome),r=e$(t.exit_code),l="hook_started"===n?"Started":a?eM(a):"Response",i=[{label:"Hook",value:e},{label:"Status",value:l}];return eA(t.hook_event)&&i.push({label:"Event",value:eM(eA(t.hook_event))}),null!==r&&i.push({label:"Exit code",value:s(r)}),eA(t.stdout)&&i.push({label:"Output",value:eA(t.stdout)}),eA(t.stderr)&&i.push({label:"Error output",value:eA(t.stderr)}),{methodTitle:"hook_started"===n?"Hook Started":"Hook Response",line:[e,l,null!==r?`exit ${s(r)}`:null].filter(Boolean).join(" · "),detailRows:i}}if("system"===a&&"status"===n){let e=eA(t.status)??"Unknown";return{methodTitle:"Claude Status",line:eM(e),detailRows:[{label:"Status",value:eM(e)}]}}if("user"===a){let s=eQ(t).find(e=>"tool_result"===eA(e.type)),a=eC(t.tool_use_result);if(s||Object.keys(a).length){let t=eA(a.stdout)??eA(s?.content)??e.summary,n=eA(a.stderr),r=s?.is_error===!0||!!n,l=[];return eA(s?.tool_use_id)&&l.push({label:"Tool call",value:eP(s?.tool_use_id)}),l.push({label:"Status",value:r?"Failed":"Completed"}),t&&l.push({label:"Output",value:t}),n&&l.push({label:"Error output",value:n}),"boolean"==typeof a.interrupted&&l.push({label:"Interrupted",value:a.interrupted?"Yes":"No"}),{methodTitle:"Tool Result",line:eF(t||(r?"Tool failed":"Tool completed")),detailRows:l}}}if("assistant"===a){let a=eC(t.message),n=eQ(t),r=n.find(e=>"tool_use"===eA(e.type)),l=n.find(e=>"text"===eA(e.type)),i=eC(a.usage),o=[];if(eA(a.model)&&o.push({label:"Model",value:eA(a.model)}),eX(o,i,s),r){let e=eA(r.name)??"Tool",t=eU(r.input);return t&&o.push({label:"Input",value:t}),{methodTitle:`${eM(e)} Tool Call`,line:[e,t].filter(Boolean).join(" · "),detailRows:o}}return{methodTitle:"Assistant Message",line:eF(eA(l?.text)??e.summary),detailRows:o}}if("result"===a){let e=eC(t.usage),a=e$(t.duration_ms),n=e$(t.duration_api_ms),r=e$(t.ttft_ms),l=e$(t.num_turns),i=e$(t.total_cost_usd),o=!0===t.is_error?"Failed":eM(eA(t.subtype)??"Completed"),d=[{label:"Status",value:o}];return null!==a&&d.push({label:"Duration",value:e_(a)}),null!==n&&d.push({label:"API duration",value:e_(n)}),null!==r&&d.push({label:"Time to first token",value:e_(r)}),null!==l&&d.push({label:"Turns",value:s(l)}),eA(t.stop_reason)&&d.push({label:"Stop reason",value:eM(eA(t.stop_reason))}),eX(d,e,s),null!==i&&d.push({label:"Reported cost",value:eq(i)}),{methodTitle:"Result",line:[o,null!==a?e_(a):null,null!==l?`${s(l)} ${1===l?"turn":"turns"}`:null,null!==i?eq(i):null].filter(Boolean).join(" · "),detailRows:d}}return{methodTitle:n?eM(`Claude ${n}`):null,line:eF(e.summary||eY(t)),detailRows:eH(t,new Set(["uuid","session_id"]))}}(e,i,r)}:{icon:s,methodTitle:null,line:e.summary??"",detailRows:[]}}function e0(e){return eC(eD(e).part)}function e1(e){return"message.part.delta"===eT(e)?eA(eD(e).partID):eA(e0(e).id)}function e2(e){return eA(eD(e).messageID)??eA(e0(e).messageID)}function e4(e,t){let s=e.children.map(e=>eA(eD(e).delta)??"").join("");return{...e.head,type:t,summary:s,detailMarkdown:s,raw:e.children.map(e=>e.raw)}}var e3=e.i(569936),e7=e.i(772382),e5=e.i(918789),e6=e.i(742531);function e8({value:e,copy:s=!1,showActions:a=!0,raw:n,onRawChange:r}){let[l,i]=(0,m.useState)(!1),o=n??l;return(0,t.jsxs)("div",{className:"space-y-3",children:[a&&(0,t.jsx)(e9,{copy:s,onRawChange:r??i,raw:o,value:e}),o?(0,t.jsx)("pre",{className:"max-h-[36rem] overflow-auto rounded-lg border bg-muted/40 p-4 text-xs whitespace-pre-wrap",children:e}):(0,t.jsx)("div",{className:"prose prose-sm dark:prose-invert max-w-none overflow-hidden rounded-lg border p-4 break-words [&_pre]:max-w-full [&_pre]:overflow-x-auto [&_table]:block [&_table]:max-w-full [&_table]:overflow-x-auto",children:(0,t.jsx)(e5.f,{remarkPlugins:[e6.f],children:e})})]})}function e9({value:e,copy:s=!1,raw:a,onRawChange:n}){let[r,l]=(0,m.useState)(!1);return(0,t.jsxs)("div",{className:"flex justify-end gap-2",children:[(0,t.jsxs)(P.K,{onClick:()=>n(!a),size:"sm",type:"button",variant:"outline",children:[a?(0,t.jsx)(e7.f,{}):(0,t.jsx)(Z.f,{})," ",a?"Rendered":"Raw"]}),s&&(0,t.jsxs)(P.K,{onClick:()=>{navigator.clipboard.writeText(e).then(()=>{l(!0),window.setTimeout(()=>l(!1),1500)})},size:"sm",type:"button",variant:"outline",children:[r?(0,t.jsx)(X.f,{}):(0,t.jsx)(e3.f,{})," ",r?"Copied":"Copy"]})]})}var te=e.i(11037);let tt="bg-muted/10 px-4 py-3 align-top break-words whitespace-normal";function ts(e,t){let s=new Set(e);return s.has(t)?s.delete(t):s.add(t),s}function ta({value:e,action:s}){let a=(0,r.f)("runs"),[n,l]=(0,m.useState)(!1),i=JSON.stringify(e,null,2);return(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[s,(0,t.jsxs)(P.K,{onClick:()=>void(0,et.d)(i).then(()=>{l(!0),window.setTimeout(()=>l(!1),1500)}),size:"xs",type:"button",variant:"outline",children:[n?(0,t.jsx)(X.f,{}):(0,t.jsx)(ee.f,{})," ",a(n?"copied":"copy")]})]}),(0,t.jsx)("pre",{className:"max-h-96 overflow-auto rounded bg-muted p-3 text-xs break-words whitespace-pre-wrap",children:i})]})}function tn({rows:e}){return e.length>=3?(0,t.jsx)("div",{className:"overflow-hidden rounded-md border",children:(0,t.jsx)("table",{className:"w-full table-fixed text-xs",children:(0,t.jsx)("tbody",{className:"divide-y",children:e.map((e,s)=>(0,t.jsxs)("tr",{className:"align-top",children:[(0,t.jsx)("th",{className:"w-40 bg-muted/30 px-3 py-2 text-left font-medium break-words text-muted-foreground",children:e.label}),(0,t.jsx)("td",{className:"min-w-0 px-3 py-2 break-words whitespace-pre-wrap",children:e.value})]},`${e.label}:${s}`))})})}):(0,t.jsx)("dl",{className:"grid grid-cols-[minmax(6rem,auto)_1fr] gap-x-4 gap-y-1 text-xs",children:e.map((e,s)=>(0,t.jsxs)(m.Fragment,{children:[(0,t.jsx)("dt",{className:"break-words text-muted-foreground",children:e.label}),(0,t.jsx)("dd",{className:"min-w-0 break-words whitespace-pre-wrap",children:e.value})]},`${e.label}:${s}`))})}function tr({event:e,showRaw:s,onToggleRaw:a}){let n=(0,r.f)("runs"),l=eZ(e,(0,I.X)()).detailRows,i=e.detailMarkdown?.trim()?e.detailMarkdown:null,o=l.length>0||!!i,d=null!==e.raw&&void 0!==e.raw;if(!o&&!d)return(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:n("noDetail")});if(!o)return(0,t.jsx)(ta,{value:e.raw});let u=d?(0,t.jsxs)(P.K,{onClick:a,size:"xs",type:"button",variant:"outline",children:[(0,t.jsx)(Z.f,{})," ",n(s?"rendered":"raw")]}):null;return(0,t.jsx)("div",{className:"space-y-2",children:s&&d?(0,t.jsx)(ta,{action:u,value:e.raw}):(0,t.jsxs)(t.Fragment,{children:[u,(0,t.jsxs)("div",{className:"space-y-3",children:[l.length>0&&(0,t.jsx)(tn,{rows:l}),i&&(0,t.jsx)(e8,{showActions:!1,value:i})]})]})})}function tl({event:e,title:s,line:a,indent:n=!1,expanded:r,onToggle:l,showRaw:i,onToggleRaw:o}){let d=eZ(e,(0,I.X)()).icon;return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(z.N,{"aria-expanded":r,className:(0,G.f)("cursor-pointer",e.supersededAt&&"opacity-60"),onClick:l,children:[(0,t.jsx)(z.d,{className:"h-8 py-1",children:(0,t.jsxs)("span",{className:(0,G.f)("flex items-center gap-1",n&&"pl-5"),children:[(0,t.jsx)(Q.f,{className:(0,G.f)("size-3 transition-transform",r&&"rotate-180")}),(0,t.jsx)(d,{className:"size-3.5 shrink-0"})]})}),(0,t.jsx)(z.d,{className:"h-8 max-w-0 py-1 text-xs",children:(0,t.jsx)("span",{className:"block min-w-0 truncate",children:a})}),(0,t.jsx)(z.d,{className:"h-8 overflow-hidden py-1",children:(0,t.jsx)(M.f,{className:"h-5 max-w-full text-[10px]",variant:"outline",children:(0,t.jsx)("span",{className:"min-w-0 truncate",children:s})})}),(0,t.jsx)(z.d,{className:"h-8 py-1",children:(0,t.jsx)(E.f,{className:"text-xs",kind:"time",value:e.createdAt})})]}),r&&(0,t.jsx)(z.N,{className:"hover:bg-transparent",children:(0,t.jsx)(z.d,{className:tt,colSpan:4,children:(0,t.jsx)("div",{className:(0,G.f)("w-full min-w-0 space-y-2 break-words",n&&"pl-5"),children:(0,t.jsx)(tr,{event:e,onToggleRaw:o,showRaw:i})})})})]})}function ti({events:e}){let s=(0,r.f)("runs"),a=(0,I.X)(),n=(0,te.f)(),l=(0,m.useMemo)(()=>(function(e){let t=[],s=new Map,a=new Map,n=new Map,r=new Map,l=new Map,i=new Set;for(let t of e){if("thread/tokenUsage/updated"===eR(t)){let e=eE(t),s=eA(e.turnId)??eA(e.threadId)??"thread";l.set(s,t.id)}let e=eT(t);if("message.part.delta"===e){let e=e2(t),s=e1(t);if(e&&s){let t=n.get(e)??[];t.includes(s)||t.push(s),n.set(e,t)}}else if("message.updated"===e){let e=eC(eD(t).info),s=eA(e.id),a=eA(e.finish);s&&a&&r.set(s,a)}}for(let o of e){let e=eR(o);if("thread/tokenUsage/updated"===e){let e=eE(o),t=eA(e.turnId)??eA(e.threadId)??"thread";if(l.get(t)!==o.id)continue}if("turn/diff/updated"===e){let e=eE(o),t=`${eA(e.turnId)??"turn"}\0${eA(e.diff)??""}`;if(i.has(t))continue;i.add(t)}let d=e?.startsWith("item/")?function(e){let t=eE(e);return eA(eC(t.item).id)??eA(t.itemId)}(o):null;if("item/started"===e&&d){let e={kind:"group",key:`group:${o.id}`,head:o,representative:o,children:[o],detailMode:"representative"};t.push(e),s.set(d,e);continue}if(d&&s.has(d)){let t=s.get(d);t.children.push(o),"item/completed"===e&&(t.representative=o,s.delete(d));continue}let u=eT(o),c=e1(o),p="message.part.delta"===u,h="message.part.updated"===u&&"tool"===eA(e0(o).type);if(c&&(p||h)){let e=a.get(c);if(e){if(e.children.push(o),p){let t=e2(o),s=t?n.get(t)??[]:[],a=t?r.get(t):null;e.representative=e4(e,"tool-calls"!==a&&1===s.length&&a||s.length>1&&s.at(-1)===c?"ASSISTANT_MESSAGE":"REASONING")}else e.representative=o;continue}let s={kind:"group",key:`opencode:${c}`,head:o,representative:o,children:[o],detailMode:"representative"};if(p){let e=e2(o),t=e?n.get(e)??[]:[],a=e?r.get(e):null;s.representative=e4(s,"tool-calls"!==a&&1===t.length&&a||t.length>1&&t.at(-1)===c?"ASSISTANT_MESSAGE":"REASONING")}t.push(s),a.set(c,s);continue}t.push({kind:"single",key:o.id,event:o})}return t.filter(e=>{if("group"!==e.kind)return!0;let t=eC(eE(e.representative).item);return!!("reasoning"!==t.type||eG(t.summary)||eG(t.content))||e.children.some(e=>eA(eE(e).delta))})})(e),[e]),[i,o]=(0,m.useState)(new Set),[d,u]=(0,m.useState)(new Set),c=e=>o(t=>ts(t,e)),p=e=>u(t=>ts(t,e));return e.length?(0,t.jsx)(t.Fragment,{children:l.map(e=>{if("single"===e.kind){let s=eZ(e.event,a);return(0,t.jsx)(tl,{event:e.event,expanded:i.has(e.key),line:s.line||e.event.summary,onToggle:()=>c(e.key),onToggleRaw:()=>p(e.event.id),showRaw:d.has(e.event.id),title:s.methodTitle??n.eventType(e.event.type)},e.key)}let s=eZ(e.representative,a),r=i.has(e.key),l=s.icon;return(0,t.jsxs)(m.Fragment,{children:[(0,t.jsxs)(z.N,{"aria-expanded":r,className:"cursor-pointer",onClick:()=>c(e.key),children:[(0,t.jsx)(z.d,{className:"h-8 py-1",children:(0,t.jsxs)("span",{className:"flex items-center gap-1",children:[(0,t.jsx)(Q.f,{className:(0,G.f)("size-3 transition-transform",r&&"rotate-180")}),(0,t.jsx)(l,{className:"size-3.5 shrink-0"})]})}),(0,t.jsx)(z.d,{className:"h-8 max-w-0 py-1 text-xs",children:(0,t.jsxs)("span",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{className:"min-w-0 truncate",children:s.line||e.representative.summary}),"children"===e.detailMode&&(0,t.jsx)("span",{className:"shrink-0 text-muted-foreground",children:e.children.length})]})}),(0,t.jsx)(z.d,{className:"h-8 overflow-hidden py-1",children:(0,t.jsx)(M.f,{className:"h-5 max-w-full text-[10px]",variant:"outline",children:(0,t.jsx)("span",{className:"min-w-0 truncate",children:function(e){let t=eW(e);if("agentMessage"===t){let t=eA(eC(eE(e).item).phase);if("commentary"===t)return"Commentary";if("final_answer"===t)return"Final Answer"}if(t)return eM(t);if("message.part.updated"===eT(e)){let t=eC(eD(e).part),s=eA(t.type);if("tool"===s)return`${eM(eA(t.tool)??"Tool")} Tool`;if(s)return eM(s)}let s=eR(e);return s?eM(s):(0,V.B)(e.type)}(e.representative)})})}),(0,t.jsx)(z.d,{className:"h-8 py-1",children:(0,t.jsx)(E.f,{className:"text-xs",kind:"time",value:e.head.createdAt})})]}),r&&"representative"===e.detailMode&&(0,t.jsx)(z.N,{className:"hover:bg-transparent",children:(0,t.jsx)(z.d,{className:tt,colSpan:4,children:(0,t.jsx)("div",{className:"w-full min-w-0 space-y-2 break-words",children:(0,t.jsx)(tr,{event:e.representative,onToggleRaw:()=>p(e.key),showRaw:d.has(e.key)})})})}),r&&"children"===e.detailMode&&e.children.map(e=>{let s=eZ(e,a);return(0,t.jsx)(tl,{event:e,expanded:i.has(e.id),indent:!0,line:s.line||e.summary,onToggle:()=>c(e.id),onToggleRaw:()=>p(e.id),showRaw:d.has(e.id),title:s.methodTitle??n.eventType(e.type)},e.id)})]},e.key)})}):(0,t.jsx)(z.N,{children:(0,t.jsx)(z.d,{className:"h-20 text-center text-muted-foreground",colSpan:4,children:s("noActivity")})})}var to=e.i(867927);function td(e){return e&&"object"==typeof e&&!Array.isArray(e)?e:{}}function tu({calls:e}){let s=(0,r.f)("runs"),a=(0,I.X)(),n=(0,te.f)(),l=(0,m.useMemo)(()=>{let t=new Map;for(let s of e){let e=function(e){let t=td(e.input),s=td(td(t.params).item);if("string"==typeof s.type)return s.type;let a=td(td(t.properties).part),n=td(t.message).content,r=Array.isArray(n)?n.map(td).find(e=>"tool_use"===e.type):void 0,l=String(a.tool??r?.name??t.name??e.name);return/^mcp[_.]/i.test(l)?"mcpToolCall":/^(bash|shell|terminal|commandExecution|exec_command|write_stdin)$/i.test(l)?"commandExecution":/^(edit|write|multiedit|apply_patch|patch|fileChange)$/i.test(l)?"fileChange":/^(read|read_file|fileRead)$/i.test(l)?"fileRead":/^(glob|grep|fileSearch)$/i.test(l)?"fileSearch":/^(websearch|web_search|webfetch|web_fetch)$/i.test(l)?"webSearch":l}(s),a=t.get(e)??[];a.push(s),t.set(e,a)}return[...t]},[e]);return(0,t.jsx)("div",{className:"min-w-0 max-w-full space-y-2",children:l.map(([e,r])=>(0,t.jsxs)("details",{className:"group/tool-type min-w-0 max-w-full overflow-hidden rounded-lg border",children:[(0,t.jsxs)("summary",{className:"flex min-w-0 cursor-pointer list-none items-center gap-2 p-3 [&::-webkit-details-marker]:hidden",children:[(0,t.jsx)(to.f,{className:"size-4 shrink-0 transition-transform group-open/tool-type:rotate-90"}),(0,t.jsx)(eS.f,{className:"size-4 shrink-0 text-muted-foreground"}),(0,t.jsx)("span",{className:"min-w-0 flex-1 break-words font-medium [overflow-wrap:anywhere]",children:s.has(`toolCallTypes.${e}`)?s(`toolCallTypes.${e}`):eM(e)}),(0,t.jsx)(M.f,{className:"shrink-0 tabular-nums",variant:"secondary",children:r.length.toLocaleString(a)})]}),(0,t.jsx)("div",{className:"min-w-0 space-y-2 border-t p-3",children:r.map(a=>{let r=function(e,t){let s=/^(agent|task)$/i.test(t);if(!s&&!["webSearch","commandExecution","fileChange","fileRead"].includes(t))return e.name;let a=td(e.input),n=td(td(a.params).item),r=td(td(a.properties).part),l=td(a.message).content,i=Array.isArray(l)?l.map(td).find(e=>"tool_use"===e.type):void 0,o="commandExecution"===t?["command","cmd"]:"fileChange"===t||"fileRead"===t?["file_path","filePath","path"]:s?["prompt"]:[];for(let e of[td(n.action),n,td(td(r.state).input),td(i?.input),td(a.input),a]){for(let t of o){let s=e[t];if("string"==typeof s&&s.trim())return s.trim()}if("webSearch"!==t)continue;let s=Array.isArray(e.queries)?e.queries.filter(e=>"string"==typeof e&&!!e.trim()):[];if(s.length)return s.map(e=>e.trim()).join(" · ");if("string"==typeof e.query&&e.query.trim())return e.query.trim()}return e.name}(a,e),l=/^(agent|task)$/i.test(e)&&r!==a.name?`${r.replace(/\s+/g," ").slice(0,160).trimEnd()}…`:r;return(0,t.jsxs)("details",{className:(0,G.f)("group/tool-call min-w-0 max-w-full overflow-hidden rounded-lg border",a.supersededAt&&"opacity-60"),children:[(0,t.jsxs)("summary",{className:"flex min-w-0 cursor-pointer list-none flex-wrap items-center gap-2 p-3 [&::-webkit-details-marker]:hidden",children:[(0,t.jsx)(to.f,{className:"size-4 shrink-0 transition-transform group-open/tool-call:rotate-90"}),(0,t.jsx)("span",{className:"min-w-0 flex-1 truncate",title:r,children:l}),(0,t.jsx)(M.f,{className:"shrink-0",variant:"outline",children:n.toolCallStatus(a.status)}),a.supersededAt&&(0,t.jsx)(M.f,{className:"shrink-0",variant:"outline",children:s("superseded")})]}),(0,t.jsx)("pre",{className:"m-3 max-h-96 min-w-0 max-w-full overflow-auto rounded bg-muted p-3 text-xs whitespace-pre-wrap [overflow-wrap:anywhere]",children:JSON.stringify({name:a.name,input:a.input,output:a.output,error:a.error},null,2)})]},a.id)})})]},e))})}var tc=e.i(95417),tp=e.i(441621),th=e.i(482022),tm=e.i(747047),tf=e.i(653269),tx=e.i(320228),tv=e.i(501416),tg=e.i(547),tj=e.i(940276),tb=e.i(474040),ty=e.i(145634);function tw({worktreeId:e}){let s=(0,r.f)("runs"),a=(0,r.f)("worktrees"),n=(0,r.f)("worktreeDetail"),[l,i]=(0,m.useState)(null),[o,d]=(0,m.useState)([]),[u,c]=(0,m.useState)(null),[p,f]=(0,m.useState)(!0),[x,v]=(0,m.useState)(!1),[g,j]=(0,m.useState)(null),b=(0,m.useRef)(50),y=(0,m.useRef)(null),w=(0,m.useRef)(null),k=(0,m.useCallback)(()=>w.current?.refresh()??Promise.resolve(),[]),N=(0,m.useCallback)(async t=>{y.current?.abort(),y.current=null,v(!1);try{let s=await (0,K.W)(tg.WORKTREE_DETAIL_OVERVIEW_QUERY,{worktreeId:e,buildFirst:Math.min(200,b.current),includeCoverage:!1,includeQueue:!1},{signal:t});if(t.aborted)return;let a=await (0,tp.f)(e,s.builds??{items:[],nextCursor:null},b.current,t);if(t.aborted)return;i(s.worktreeOverview),d(a.items),c(a.nextCursor),j(null)}catch(e){if(t.aborted)return;j(e instanceof Error?e.message:String(e))}finally{t.aborted||f(!1)}},[e]),S=(0,m.useCallback)(async()=>{if(!u||y.current)return;let t=new AbortController;y.current=t,v(!0);try{let s=await (0,K.W)(`query RunWorktreeBuilds($worktreeId: ID!, $after: ID!) {
2
+ builds(first: 50, after: $after, worktreeId: $worktreeId) {
3
+ items { ${tm.f} }
4
+ nextCursor
5
+ }
6
+ }`,{worktreeId:e,after:u},{signal:t.signal});if(t.signal.aborted)return;d(e=>{let t=new Set(e.map(e=>e.id)),a=[...e,...s.builds.items.filter(e=>!t.has(e.id))];return b.current=Math.max(50,a.length),a}),c(s.builds.nextCursor),j(null)}catch(e){if(t.signal.aborted)return;j(e instanceof Error?e.message:String(e))}finally{y.current===t&&(y.current=null),t.signal.aborted||v(!1)}},[u,e]);(0,m.useEffect)(()=>{b.current=50;let e=(0,h.f)(N);w.current=e;let t=(0,K.g)(()=>void e.refresh());return()=>{e.dispose(),t(),y.current?.abort(),y.current=null,w.current===e&&(w.current=null)}},[N]),(0,m.useEffect)(()=>{let t=window.setTimeout(()=>void k(),0),s=window.setInterval(()=>void k(),3e4),a=(0,K.p)(),n=a.subscribe({query:"subscription RunWorktreeChanged { worktreeOverviewChanged { worktreeId } }"},{next:t=>{let s=t.data?.worktreeOverviewChanged;s&&s.worktreeId&&s.worktreeId!==e||k()},error:()=>void 0,complete:()=>void 0}),r=a.subscribe({query:"subscription RunWorktreeBuildsChanged($worktreeId: ID!) { buildsChanged(worktreeId: $worktreeId) { id } }",variables:{worktreeId:e}},{next:()=>void k(),error:()=>void 0,complete:()=>void 0});return()=>{window.clearTimeout(t),window.clearInterval(s),n(),r()}},[k,e]);let C=(0,m.useMemo)(()=>l?(0,tj.j)(l,e):null,[l,e]);if(p&&!C)return null;if(!C)return g?(0,t.jsx)(O.J,{children:(0,t.jsx)(O.p,{children:s("worktreeDataUnavailable")})}):null;let{agentGroup:A,group:$,worktree:I}=C,R=!I.hasStagedChanges&&!I.hasUnstagedChanges,E=async()=>void await k();return(0,t.jsxs)(t.Fragment,{children:[g&&(0,t.jsx)(O.J,{children:(0,t.jsx)(O.p,{children:g})}),(0,t.jsxs)(L.N,{children:[(0,t.jsx)(L.Y,{children:(0,t.jsx)(L.v,{children:n("actions")})}),(0,t.jsxs)(L.O,{className:"space-y-3",children:[(0,t.jsx)(tb.E,{group:$,onCompleted:E,overview:l,worktree:I}),(0,t.jsx)(tv.f,{sessionData:{worktree:{id:I.id,path:I.folder,branch:I.branch,baseBranch:I.baseBranch,headSha:I.headSha},codebase:{id:$.codebase.id,folder:$.codebase.folder},repo:{id:$.repository.id,name:$.repository.name,url:$.repository.displayOrigin,displayOrigin:$.repository.displayOrigin}},workflows:$.quickActions??[],worktreeId:I.id}),(0,t.jsx)(tf.f,{agentCapabilities:A.agent.capabilities,worktreeId:I.id})]})]}),(0,t.jsxs)(L.N,{children:[(0,t.jsxs)(L.Y,{className:"flex-row items-center justify-between gap-3",children:[(0,t.jsx)(L.v,{children:s("worktreeStatus")}),(0,t.jsx)(P.K,{asChild:!0,size:"sm",variant:"outline",children:(0,t.jsxs)(B.L,{href:(0,tj.P)(I.id),children:[(0,t.jsx)(th.f,{})," ",s("openWorktree")]})})]}),(0,t.jsxs)(L.O,{className:"space-y-4",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,t.jsx)(M.f,{variant:R?"secondary":"destructive",children:a(R?"clean":"dirty")}),(0,t.jsx)(tb._,{worktree:I}),(0,t.jsx)(M.f,{variant:"AVAILABLE"===I.availability?"outline":"destructive",children:I.availability})]}),(0,t.jsxs)(tx.X,{className:"grid-cols-1 md:grid-cols-2 xl:grid-cols-3",children:[(0,t.jsx)(tx.v,{label:a("branch"),mono:!0,children:I.branch??a("detached")}),(0,t.jsx)(tx.v,{label:a("baseBranch"),mono:!0,children:I.baseBranchOverride??I.baseBranch??"—"}),(0,t.jsx)(tx.v,{label:a("path"),mono:!0,children:(0,ty.f)(I.folder,A.agent.baseRepoDirectory)}),(0,t.jsx)(tx.v,{label:n("upstream"),mono:!0,children:I.upstream??"—"}),(0,t.jsx)(tx.v,{label:n("head"),mono:!0,children:I.headSha??"—"}),(0,t.jsxs)(tx.v,{label:n("agent"),children:[A.agent.name," · ",A.agent.hostname]}),(0,t.jsx)(tx.v,{label:n("baseStatus"),children:(0,t.jsx)(tb.s,{worktree:I})}),(0,t.jsx)(tx.v,{className:"md:col-span-2",label:a("pullRequest"),children:(0,t.jsx)("span",{className:"flex flex-wrap items-center gap-2",children:(0,t.jsx)(tb.f,{onPipelinesChanged:E,worktree:I})})})]})]})]}),(0,t.jsx)(tg.WorktreeBuildTable,{builds:o,loadingMore:x,nextCursor:u,onError:j,onLoadMore:S,onReload:E})]})}function tk({label:e,value:s,copy:a=!1,children:n}){let l=(0,r.f)("runs.info"),[i,o]=(0,m.useState)(null),[d,u]=(0,m.useState)(!1),c=!!(s&&i===s);return(0,t.jsxs)("div",{className:"min-w-0 space-y-1",children:[(0,t.jsx)("dt",{className:"text-xs text-muted-foreground",children:e}),(0,t.jsxs)("dd",{className:"flex min-w-0 items-start gap-2 text-sm",children:[(0,t.jsx)("span",{className:a&&s?"min-w-0 font-mono text-xs wrap-anywhere":"min-w-0 wrap-anywhere",children:n??s??l("unavailable")}),a&&s&&(0,t.jsx)(P.K,{"aria-label":l("copyValue",{label:e}),className:"size-6 shrink-0",onClick:async()=>{try{await navigator.clipboard.writeText(s),o(s),u(!1)}catch{o(null),u(!0)}},size:"icon",type:"button",variant:"ghost",children:c?(0,t.jsx)(X.f,{className:"size-3"}):(0,t.jsx)(ee.f,{className:"size-3"})})]}),(0,t.jsx)("div",{"aria-live":"polite",className:"text-xs text-muted-foreground",children:d?l("copyFailed"):c?l("copied"):null})]})}function tN({run:e}){let s=(0,r.f)("runs"),a=(0,r.f)("runs.info"),n=e.attempts.filter(({supersededAt:e})=>!e).reduce((e,t)=>!e||t.generation>e.generation?t:e,null),l=n?.sessionInfo,i=[["createdAt",e.createdAt],["startedAt",e.startedAt],["finishedAt",e.finishedAt],["updatedAt",e.updatedAt]];return(0,t.jsxs)(L.N,{className:"min-w-0",children:[(0,t.jsxs)(L.Y,{children:[(0,t.jsx)(L.v,{children:a("PLAN"===e.kind?"planTitle":"sessionTitle")}),(0,t.jsx)(L.u,{children:a("description")})]}),(0,t.jsx)(L.O,{children:(0,t.jsxs)("dl",{className:"grid min-w-0 gap-x-6 gap-y-4 sm:grid-cols-2",children:[(0,t.jsx)(tk,{label:s("provider"),value:(0,V.G)(e.provider)}),(0,t.jsx)(tk,{label:a("providerVersion"),value:e.providerVersion}),(0,t.jsx)(tk,{label:s("origin"),value:s("IMPORTED"===e.origin?"imported":"managed")}),(0,t.jsx)(tk,{label:a("nativeSessionId"),value:n?.nativeId,copy:!0}),(0,t.jsx)(tk,{label:a("nativeTranscriptPath"),value:"OPENCODE"===e.provider?null:l?.nativeTranscriptPath,copy:!0,children:"OPENCODE"===e.provider?a("noStandaloneFile"):void 0}),(0,t.jsx)(tk,{label:a("activityLogPath"),value:"IMPORTED"===e.origin?null:l?.activityLogPath,copy:!0,children:"IMPORTED"===e.origin?a("noImportedActivityLog"):void 0}),(0,t.jsx)(tk,{label:a("workingDirectory"),value:l?.workingDirectory,copy:!0}),(0,t.jsx)(tk,{label:a("agentId"),value:e.agentId,copy:!0}),(0,t.jsx)(tk,{label:a("repository"),value:e.repositoryName}),(0,t.jsx)(tk,{label:a("branch"),value:e.branch}),(0,t.jsx)(tk,{label:s("model"),value:e.model}),(0,t.jsx)(tk,{label:s("effort"),value:e.effort}),i.map(([e,s])=>(0,t.jsx)(tk,{label:a(e),children:(0,t.jsx)(E.f,{value:s,fallback:a("unavailable")})},e))]})})]})}var tS=e.i(814760);let tC=["CLAUDE","CODEX","OPENCODE"],tA=["CLAUDE","CODEX"];function t$(e,t){let s=URL.createObjectURL(e),a=document.createElement("a");a.href=s,a.download=t,document.body.appendChild(a),a.click(),a.remove(),URL.revokeObjectURL(s)}function tI({value:e}){let s=(0,te.f)(),a=`/ai/${"PLAN"===e.kind?"plans":"sessions"}/${e.id}`;return(0,t.jsxs)(B.L,{className:"flex items-center gap-2 rounded-lg border p-3 hover:bg-muted/50",href:a,children:[(0,t.jsx)(y.f,{className:"size-4"}),(0,t.jsxs)("span",{className:"font-mono",children:["PLAN"===e.kind?"Plan":"Session"," #",e.displayNumber]}),e.followUpMode&&(0,t.jsx)(M.f,{variant:"outline",children:s.followUpMode(e.followUpMode)}),(0,t.jsx)(M.f,{className:"ml-auto",variant:"secondary",children:s.status(e.status)})]})}function tR(e){return!e||"object"!=typeof e||Array.isArray(e)?{}:Object.fromEntries(Object.entries(e).map(([e,t])=>{let s=t&&"object"==typeof t&&!Array.isArray(t)?t:{};return[e,Array.isArray(s.answers)?s.answers.map(String):"string"==typeof s.answer?[s.answer]:[]]}))}function tE(e,t=[]){return!e||"object"!=typeof e||Array.isArray(e)?{}:Object.fromEntries([...t.map(e=>[e.key,void 0]),...Object.entries(e).flatMap(([e,t])=>t&&"object"==typeof t&&"value"in t?[[e,t.value]]:[])])}function tT({batch:e,editable:o,onAnswered:d}){let p=(0,r.f)("runs"),h=(0,D.F)(),x=(0,B.U)(),[v,g]=(0,m.useState)({}),[j,b]=(0,m.useState)(()=>tE(e.answerRevisions.at(-1)?.answers,e.questions.flatMap(e=>e.field?[e.field]:[]))),[y,w]=(0,m.useState)({}),[N,C]=(0,m.useState)(!1),[$,I]=(0,m.useState)(null),[R,q]=(0,m.useState)(!1),[U,z]=(0,m.useState)(!1),[V,J]=(0,m.useState)(!1),[G,Y]=(0,m.useState)(!0),H=e.questions.flatMap(e=>e.field?[e.field]:[]),X=()=>{let e=Object.fromEntries(Object.entries(u(H,j)).map(([e,t])=>[e,{value:t}]));return Object.fromEntries(Object.entries(function(e,t){let r=a(t),l=new Set(e.map(e=>e.key));if(l.size!==e.length)throw Error("Duplicate form field key");for(let e of Object.keys(r))if(!l.has(e))throw new s("unknown",e);let i=Object.create(null),o=new Set;for(let t of e){if("external"!==t.type){for(let e of t.when??[])if(!o.has(e.key))throw Error("Form conditions must reference an earlier field")}let e=Object.hasOwn(r,t.key),l=e?a(r[t.key]).value:void 0;if(n(t,i))!function(e,t){let a=t=>{throw new s(t,e.key)};if("external"===e.type){!0!==t&&a("external");return}if(void 0===t){e.required&&a("required");return}if("string"===e.type){if("string"!=typeof t)return a("type");if(e.required&&!t.length&&a("required"),void 0!==e.minLength&&t.length<e.minLength&&a("minLength"),void 0!==e.maxLength&&t.length>e.maxLength&&a("maxLength"),void 0!==e.pattern){let s=!1;try{s=new RegExp(e.pattern).test(t)}catch{}s||a("pattern")}"email"!==e.format||/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(t)||a("format"),"uri"!==e.format||URL.canParse(t)||a("format"),"date"===e.format&&(!/^\d{4}-\d{2}-\d{2}$/.test(t)||Number.isNaN(Date.parse(t))||new Date(t).toISOString().slice(0,10)!==t)&&a("format"),"date-time"===e.format&&Number.isNaN(Date.parse(t))&&a("format"),!e.options||e.custom||e.options.some(e=>e.value===t)||a("option")}else if("number"===e.type||"integer"===e.type){if("number"!=typeof t||!Number.isFinite(t)||"integer"===e.type&&!Number.isInteger(t))return a("type");void 0!==e.minimum&&t<e.minimum&&a("minimum"),void 0!==e.maximum&&t>e.maximum&&a("maximum")}else if("boolean"===e.type)"boolean"!=typeof t&&a("type");else if("multiselect"===e.type){if(!Array.isArray(t)||!t.every(e=>"string"==typeof e))return a("type");e.required&&!t.length&&a("required"),void 0!==e.minItems&&t.length<e.minItems&&a("minItems"),void 0!==e.maxItems&&t.length>e.maxItems&&a("maxItems"),!e.custom&&t.some(t=>!e.options.some(e=>e.value===t))&&a("option")}}(t,l),void 0!==l&&(i[t.key]=l);else if(e)throw new s("inactive",t.key);o.add(t.key)}return i}(H,e)).map(([e,t])=>[e,{value:t}]))},Q=e=>e instanceof s?p("form.invalidAnswer",{field:H.find(t=>t.key===e.fieldKey)?.title??e.fieldKey,reason:p(`form.errors.${e.code}`)}):e instanceof Error?e.message:String(e),Z=async()=>{C(!0),I(null);try{await (0,K.W)("mutation CancelForm($batchId: ID!) { cancelRunQuestion(batchId: $batchId) { id } }",{batchId:e.id}),await d()}catch(e){I(Q(e))}finally{C(!1)}},ee=async()=>{C(!0),I(null);try{let t=H.length?X():Object.fromEntries(e.questions.map(e=>{let t=[...v[e.id]??[]];return y[e.id]?.trim()&&t.push(y[e.id].trim()),[e.id,{answers:t}]}));await (0,K.W)("mutation AnswerQuestion($batchId: ID!, $answers: JSON!) { answerRunQuestion(batchId: $batchId, answers: $answers) { id } }",{batchId:e.id,answers:t}),await d()}catch(e){I(Q(e))}finally{C(!1)}},et=e.answerRevisions.at(-1);(0,m.useEffect)(()=>{if(!R)return;if(e.revisionPreparedAt){let t=window.setTimeout(()=>{let t=tR(et?.answers),s={},a={};for(let n of e.questions){let e=new Set(n.options.map(({label:e})=>e));s[n.id]=(t[n.id]??[]).filter(t=>e.has(t)),a[n.id]=(t[n.id]??[]).filter(t=>!e.has(t)).join("\n")}g(s),w(a),b(tE(et?.answers,e.questions.flatMap(e=>e.field?[e.field]:[]))),q(!1),z(!0)},0);return()=>window.clearTimeout(t)}let t=window.setInterval(()=>void d(),1e3);return()=>window.clearInterval(t)},[e.questions,e.revisionPreparedAt,et?.answers,d,R]);let es=async()=>{q(!0),I(null);try{await (0,K.W)("mutation PrepareAnswerRevision($batchId: ID!) { prepareRunAnswerRevision(batchId: $batchId) { id } }",{batchId:e.id}),await d()}catch(e){q(!1),I(e instanceof Error?e.message:String(e))}},ea=async()=>{C(!0),I(null);try{let t=H.length?X():Object.fromEntries(e.questions.map(e=>{let t=[...v[e.id]??[]];return y[e.id]?.trim()&&t.push(y[e.id].trim()),[e.id,{answers:t}]})),s=await (0,K.W)("mutation ReviseAnswer($batchId: ID!, $answers: JSON!, $stash: Boolean!, $rollback: Boolean!) { reviseRunAnswer(batchId: $batchId, answers: $answers, stash: $stash, rollback: $rollback) { id kind } }",{batchId:e.id,answers:t,stash:G&&V,rollback:G});z(!1),x.push(`/ai/${"PLAN"===s.reviseRunAnswer.kind?"plans":"sessions"}/${s.reviseRunAnswer.id}`)}catch(e){I(Q(e))}finally{C(!1)}},en=H.length?(0,t.jsx)(c,{fields:H,draft:j,onChange:b}):e.questions.map(e=>(0,t.jsxs)("div",{className:"space-y-3",children:[e.header&&(0,t.jsx)(M.f,{variant:"outline",children:e.header}),(0,t.jsx)("p",{className:"font-medium",children:e.prompt}),(0,t.jsx)("div",{className:"space-y-2",children:e.options.map(s=>{let a=v[e.id]?.includes(s.label)??!1;return(0,t.jsxs)("label",{className:"flex items-start gap-3 rounded-lg border p-3",children:[(0,t.jsx)(l.f,{checked:a,onCheckedChange:t=>g(a=>{let n=new Set(a[e.id]??[]);return e.multiSelect||n.clear(),t?n.add(s.label):n.delete(s.label),{...a,[e.id]:[...n]}})}),(0,t.jsxs)("span",{children:[(0,t.jsx)("span",{className:"block font-medium",children:s.label}),s.description&&(0,t.jsx)("span",{className:"text-sm text-muted-foreground",children:s.description})]})]},s.id)})}),e.allowCustom&&(0,t.jsx)(i.f,{"aria-label":p("customAnswer"),onChange:t=>w(s=>({...s,[e.id]:t.target.value})),placeholder:p("customAnswer"),value:y[e.id]??""})]},e.id)),er=tR(et?.answers);return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(L.N,{className:"PENDING"===e.status?"border-primary/50":void 0,children:[(0,t.jsx)(L.Y,{children:(0,t.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(L.v,{className:"flex items-center gap-2 text-base",children:"CANCELLED"===e.status?p("form.cancelled"):"PENDING"===e.status?p("answerNeeded"):p("answeredQuestions")}),(0,t.jsx)(L.u,{children:(0,t.jsx)(E.f,{value:e.createdAt})})]}),"ANSWERED"===e.status&&o&&(0,t.jsxs)(P.K,{disabled:R,onClick:()=>void es(),size:"sm",variant:"outline",children:[R?(0,t.jsx)(W.f,{}):(0,t.jsx)(k.f,{})," ",R?p("prepareRevision"):p("editAnswer")]})]})}),(0,t.jsxs)(L.O,{className:"space-y-5",children:[($||e.error)&&(0,t.jsx)(O.J,{variant:"destructive",children:(0,t.jsx)(O.p,{children:$||e.error})}),"PENDING"===e.status?en:H.length?(0,t.jsx)(c,{fields:H,draft:tE(et?.answers,H),onChange:()=>void 0,readOnly:!0}):(0,t.jsx)("div",{className:"divide-y rounded-lg border",children:e.questions.map(e=>(0,t.jsxs)("div",{className:"space-y-2 p-3",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[e.header&&(0,t.jsx)(M.f,{variant:"outline",children:e.header}),(0,t.jsx)("p",{className:"font-medium",children:e.prompt})]}),(0,t.jsx)("div",{className:"space-y-1.5",children:(er[e.id]??[]).length?er[e.id].map(s=>{let a=e.options.find(e=>e.label===s)?.description;return(0,t.jsxs)("p",{className:"text-sm",children:[(0,t.jsx)("span",{className:"mr-2 text-xs font-medium uppercase tracking-wide text-muted-foreground",children:p("answer")}),(0,t.jsx)("span",{className:"font-semibold",children:s}),a&&(0,t.jsxs)("span",{className:"text-muted-foreground",children:[" — ",a]})]},s)}):(0,t.jsx)("span",{className:"text-sm text-muted-foreground",children:"—"})})]},e.id))}),"PENDING"===e.status&&(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsxs)(P.K,{disabled:N,onClick:()=>void ee(),children:[N?(0,t.jsx)(W.f,{}):(0,t.jsx)(A.f,{})," ",p("submitAnswers")]}),!!H.length&&(0,t.jsx)(P.K,{disabled:N,variant:"outline",onClick:()=>void Z(),children:p("form.cancel")})]})]})]}),(0,t.jsx)(_.N,{onOpenChange:z,open:U,children:(0,t.jsxs)(_.d,{className:"sm:max-w-3xl",children:[(0,t.jsxs)(_.s,{children:[(0,t.jsx)(_.F,{children:p("editAnswer")}),(0,t.jsx)(_.C,{children:G?p("revisionDescription"):p("revisionDescriptionNoRollback")})]}),G&&e.pushedCommitWarning&&(0,t.jsxs)(O.J,{variant:"destructive",children:[(0,t.jsx)(f.f,{}),(0,t.jsx)(O.p,{children:e.pushedCommitWarning})]}),(0,t.jsxs)("label",{className:"flex items-start gap-3 rounded-lg border p-3",children:[(0,t.jsx)(l.f,{checked:G,className:"mt-0.5",onCheckedChange:e=>Y(!!e)}),(0,t.jsxs)("span",{children:[(0,t.jsx)("span",{className:"block font-medium",children:p("rollbackChanges")}),(0,t.jsx)("span",{className:"text-sm text-muted-foreground",children:p("rollbackChangesHint")})]})]}),G&&(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(F.f,{children:p("rollbackDiff")}),e.rollbackPatch?(0,t.jsx)(T.f,{className:"max-h-64 overflow-y-auto",labels:h,patch:e.rollbackPatch}):(0,t.jsx)("p",{className:"rounded-lg border p-3 text-sm text-muted-foreground",children:p("noRollbackChanges")})]}),(0,t.jsx)("div",{className:"space-y-5",children:en}),G&&(0,t.jsxs)("label",{className:"flex items-center gap-3 rounded-lg border p-3",children:[(0,t.jsx)(l.f,{checked:V,onCheckedChange:e=>J(!!e)}),(0,t.jsx)("span",{children:p("stashBeforeRollback")})]}),(0,t.jsx)(_.c,{showCloseButton:!0,children:(0,t.jsxs)(P.K,{disabled:N,onClick:()=>void ea(),variant:G?"destructive":"default",children:[N?(0,t.jsx)(W.f,{}):G?(0,t.jsx)(S.f,{}):(0,t.jsx)(A.f,{})," ",p("confirmRevision")]})})]})})]})}e.s(["RunDetailPage",0,function({children:e,runId:s}){let a=(0,r.f)("runs"),n=(0,r.f)("common"),u=(0,te.f)(),c=(0,D.F)(),k=(0,I.X)(),X=(0,B.U)(),[Q,Z]=(0,m.useState)(null);(0,p.S)(["ai",Q?.kind==="PLAN"?"plans":"sessions",Q?.id],Q?`${"PLAN"===Q.kind?a("plan"):a("session")} #${Q.displayNumber}`:void 0);let[ee,et]=(0,m.useState)([]),[es,ea]=(0,m.useState)(""),en=(0,m.useRef)(es);(0,m.useEffect)(()=>{en.current=es},[es]);let er=(0,m.useRef)([]),el=(0,m.useRef)(new Map),ei=(0,m.useRef)(null),eo=(0,m.useRef)(null),ed=(0,m.useRef)(null),eu=(0,m.useRef)(null),[ec,ep]=(0,m.useState)(!1),[eh,em]=(0,m.useState)(!1),ef=(0,m.useRef)(0),ex=(0,m.useRef)(-1),ev=(0,m.useRef)(0),[eg,ej]=(0,m.useState)(!1),[eb,ey]=(0,m.useState)(!1),[ew,ek]=(0,m.useState)(null),[eN,eS]=(0,m.useState)(!0);(0,p.F)(["ai","plans",s],!!ew||!eN&&!Q),(0,p.F)(["ai","sessions",s],!!ew||!eN&&!Q);let[eC,eA]=(0,m.useState)(null),[e$,eI]=(0,m.useState)(""),[eR,eE]=(0,m.useState)([]),[eT,eD]=(0,m.useState)("RESUME"),[eO,eM]=(0,m.useState)(""),[eP,eL]=(0,m.useState)(""),e_=(0,m.useRef)(null),[eq,eF]=(0,m.useState)(""),[eU,eW]=(0,m.useState)("auto"),[ez,eB]=(0,m.useState)(!1),[eK,eV]=(0,m.useState)([]),[eJ,eG]=(0,m.useState)([]),[eY,eH]=(0,m.useState)([]),[eX,eQ]=(0,m.useState)("NORMALIZED"),[eZ,e0]=(0,m.useState)(!1),[e1,e2]=(0,m.useState)(!1),[e4,e3]=(0,m.useState)(!1),[e7,e5]=(0,m.useState)([]),e6=(0,m.useRef)(null),tt=(0,m.useRef)(!0),ts=(0,m.useCallback)(()=>{let e=e6.current;e&&(tt.current=e.scrollHeight-e.scrollTop-e.clientHeight<=24)},[]);(0,m.useEffect)(()=>{let e=e6.current;e&&tt.current&&(e.scrollTop=e.scrollHeight)},[ee]);let ta=(0,m.useCallback)(async e=>{let t,a,n,r=[],l=-1;for(;;){let e=(await (0,K.W)(`query RunActivityExport($runId: ID!, $afterSequence: Int!) { runEvents(runId: $runId, afterSequence: $afterSequence, first: 500, includeSuperseded: true) { ${H.q} } }`,{runId:s,afterSequence:l})).runEvents;if(r.push(...e),e.length<500)break;l=e[e.length-1].sequence}let i=new Date().toISOString().replace(/[:.]/g,"-"),o=`run-${s}-activity-${i}`;"json"===e?(t=JSON.stringify(r.map(e=>({id:e.id,sequence:e.sequence,type:e.type,summary:e.summary,detailMarkdown:e.detailMarkdown,raw:e.raw,createdAt:e.createdAt,supersededAt:e.supersededAt})),null,2),a="application/json",n=`${o}.json`):"jsonl"===e?(t=r.filter(e=>null!==e.raw&&void 0!==e.raw).map(e=>JSON.stringify(e.raw)).join("\n"),a="application/x-ndjson",n=`run-${s}-session-${i}.jsonl`):(t=r.map(e=>{let t=[`## ${e.summary}`,"",`- **Type:** ${e.type}`,`- **Time:** ${e.createdAt}`];return e.supersededAt&&t.push(`- **Superseded:** ${e.supersededAt}`),e.detailMarkdown&&t.push("",e.detailMarkdown),null!==e.raw&&void 0!==e.raw&&t.push("","```json",JSON.stringify(e.raw,null,2),"```"),t.join("\n")}).join("\n\n---\n\n"),a="text/markdown",n=`${o}.md`),t$(new Blob([t],{type:a}),n)},[s]),tn=(0,m.useCallback)(async()=>{let{filename:e,contentBase64:t}=(await (0,K.W)("query RunNativeSessionFile($runId: ID!) { runNativeSessionFile(runId: $runId) { filename contentBase64 } }",{runId:s})).runNativeSessionFile,a=atob(t),n=new Uint8Array(a.length);for(let e=0;e<a.length;e+=1)n[e]=a.charCodeAt(e);t$(new Blob([n],{type:"application/x-ndjson"}),e)},[s]),tr=(0,m.useCallback)(()=>eo.current?.refresh()??Promise.resolve(),[]),tl=(0,m.useCallback)(()=>ei.current?.refresh()??Promise.resolve(),[]),to=(0,m.useCallback)(async e=>{let t=ev.current,a=ef.current,n=ex.current!==a;try{let r=await (0,K.W)(`query AgentRunDetail($id: ID!, $includeCatalog: Boolean!) { agentRun(id: $id) { ${H.b} } runProviderCatalog(runId: $id) @include(if: $includeCatalog) { key label available supportsWebSearch supportsPause supportsSteering supportsResume supportsNativeDelete models { id label efforts group } } }`,{id:s,includeCatalog:n},{signal:e});if(e.aborted)return;t===ev.current&&Z(r.agentRun),n&&(eH(r.runProviderCatalog),ex.current=a),r.agentRun&&e_.current!==s&&(e_.current=s,eL(r.agentRun.provider),eF(r.agentRun.model),eW(r.agentRun.effort??"auto"),eB(r.agentRun.webSearchEnabled)),ek(null)}catch(t){e.aborted||ek(t instanceof Error?t.message:String(t))}finally{e.aborted||eS(!1)}},[s]),td=(0,m.useCallback)(e=>{er.current=[...new Map(e.map(e=>[e.id,e])).values()].sort((e,t)=>e.sequence-t.sequence),et(er.current)},[]),tp=(0,m.useCallback)(async e=>{let t=JSON.stringify([s,es.trim()]),a=ed.current!==t;a&&(er.current=[],el.current.clear());let n=[],r=a?-1:(er.current[0]?.sequence??0)-1,l=er.current[0]?.sequence;el.current.clear();try{for(;;){let t=await (0,K.W)(`query RunActivity($runId: ID!, $search: String, $afterSequence: Int!, $first: Int!, $latest: Boolean!) { runEvents(runId: $runId, search: $search, afterSequence: $afterSequence, first: $first, latest: $latest) { ${H.q} } }`,{runId:s,search:es.trim()||null,afterSequence:r,first:a?200:500,latest:a},{signal:e});if(e.aborted)return;let l=t.runEvents;if(n.push(...l),a||l.length<500)break;let i=l.at(-1).sequence;if(i<=r)break;r=i}if(!a&&void 0!==l&&(er.current[0]?.sequence??l)<l)return void tl();a&&ep(200===n.length&&n[0].sequence>0),ed.current=t,td([...n,...el.current.values()])}catch(t){e.aborted||ek(t instanceof Error?t.message:String(t))}},[td,tl,s,es]),th=async()=>{if(eu.current||!er.current.length)return;let e=new AbortController;eu.current=e,em(!0);try{let t=await (0,K.W)(`query RunActivityOlder($runId: ID!, $search: String, $before: Int!) { runEvents(runId: $runId, search: $search, beforeSequence: $before, first: 200) { ${H.q} } }`,{runId:s,search:es.trim()||null,before:er.current[0].sequence},{signal:e.signal});if(e.signal.aborted)return;tt.current=!1,td([...er.current,...t.runEvents]),ep(200===t.runEvents.length&&t.runEvents[0].sequence>0)}catch(t){e.signal.aborted||ek(t instanceof Error?t.message:String(t))}finally{eu.current===e&&(eu.current=null),e.signal.aborted||em(!1)}};(0,m.useEffect)(()=>{ex.current=-1;let e=(0,h.f)(to);eo.current=e;let t=window.setTimeout(()=>void e.refresh(),0),s=(0,K.g)(()=>{++ef.current,e.refresh()});return()=>{window.clearTimeout(t),e.dispose(),s(),eo.current===e&&(eo.current=null)}},[to]),(0,m.useEffect)(()=>{let e=(0,h.f)(tp);ei.current=e;let t=window.setTimeout(()=>void e.refresh(),150),s=()=>{"hidden"!==document.visibilityState&&e.refresh()},a=(0,K.g)(s);return window.addEventListener("focus",s),document.addEventListener("visibilitychange",s),()=>{window.clearTimeout(t),e.dispose(),a(),eu.current?.abort(),eu.current=null,window.removeEventListener("focus",s),document.removeEventListener("visibilitychange",s),ei.current===e&&(ei.current=null)}},[tp]),(0,m.useEffect)(()=>{let e=(0,K.p)(),t=e.subscribe({query:`subscription RunChanged($runId: ID!) { agentRunChanged(runId: $runId) { ${H.b} } }`,variables:{runId:s}},{next:e=>{let t=e.data?.agentRunChanged;t&&(++ev.current,Z(t))},error:()=>void 0,complete:()=>void 0}),a=e.subscribe({query:`subscription RunEvent($runId: ID!) { runEventAdded(runId: $runId) { ${H.q} } }`,variables:{runId:s}},{next:e=>{let t=e.data?.runEventAdded;t&&(en.current.trim()?tl():(el.current.set(t.id,t),td([...(ed.current===JSON.stringify([s,""])?er.current:[]).filter(e=>e.id!==t.id),t])))},error:()=>void 0,complete:()=>void 0}),n=e.subscribe({query:"subscription RunQuestion($runId: ID!) { runQuestionChanged(runId: $runId) { id } }",variables:{runId:s}},{next:()=>void tr(),error:()=>void 0,complete:()=>void 0});return()=>{t(),a(),n()}},[td,tr,tl,s]);let tm=async e=>{eA(e);try{let t="play"===e?"mutation Play($id: ID!, $mcpPresetIds: [ID!]!) { playPlan(planId: $id, mcpPresetIds: $mcpPresetIds) { id } }":`mutation Lifecycle($id: ID!) { ${e}AgentRun(id: $id) { id } }`;await (0,K.W)(t,{id:s,..."play"===e?{mcpPresetIds:e7}:{}}),await tr(),"play"===e&&(e3(!1),e5([]))}catch(e){ek(e instanceof Error?e.message:String(e))}finally{eA(null)}},tf=async(e,t)=>{if(e.length){eA("upload");try{let s=[];for(let t of e){let e=await fetch("/api/run-attachments",{method:"POST",headers:{"content-type":t.type||"application/octet-stream","x-attachment-filename":encodeURIComponent(t.name)},body:t}),n=await e.json();if(!e.ok)throw Error(n.error||a("uploadFailed"));s.push({...n,downloadPath:`/api/run-attachments/${n.id}`,createdAt:new Date().toISOString()})}t(e=>[...e,...s])}catch(e){ek(e instanceof Error?e.message:String(e))}finally{eA(null)}}},tx=async()=>{eA("steer");try{await (0,K.W)("mutation Steer($id: ID!, $prompt: String!, $attachments: [ID!]!) { steerAgentRun(id: $id, prompt: $prompt, attachmentIds: $attachments) { id } }",{id:s,prompt:e$,attachments:eR.map(({id:e})=>e)}),eI(""),eE([]),await tr()}catch(e){ek(e instanceof Error?e.message:String(e))}finally{eA(null)}},tv=async()=>{if(Q?.worktreeId){eA("follow");try{let e="RESEND"!==eT||eO.trim()?eO:Q.initialPrompt,t=await (0,K.W)("mutation FollowUp($sourceId: ID!, $input: RunConfigurationInput!) { createRunFollowUp(sourceId: $sourceId, input: $input) { id kind } }",{sourceId:Q.id,input:{kind:Q.kind,worktreeId:Q.worktreeId,jiraIssueKey:Q.jiraIssueKey,provider:eP,model:eq,effort:"auto"===eU?null:eU,webSearchEnabled:ez,prompt:e,attachmentIds:eJ.map(({id:e})=>e),mcpPresetIds:eK,followUpMode:eT,contextMode:eP===Q.provider?"NATIVE":eX}});X.push(`/ai/${"PLAN"===t.createRunFollowUp.kind?"plans":"sessions"}/${t.createRunFollowUp.id}`)}catch(e){ek(e instanceof Error?e.message:String(e))}finally{eA(null),e2(!1)}}},tg=async()=>{try{await (0,K.W)("mutation DeleteRun($id: ID!) { deleteAgentRuns(ids: [$id]) }",{id:s}),X.push(Q?.kind==="PLAN"?"/ai/plans":"/ai/sessions")}catch(e){ek(e instanceof Error?e.message:String(e))}},tj=(0,m.useMemo)(()=>Q?[Q.sourcePlan,Q.parentRun,Q.playedSession,...Q.followUps].filter(e=>!!e&&e.id!==Q.id):[],[Q]);if(eN)return(0,t.jsxs)("p",{className:"flex gap-2 text-muted-foreground",children:[(0,t.jsx)(W.f,{})," ",a("loading")]});if(!Q)return(0,t.jsx)(O.J,{variant:"destructive",children:(0,t.jsx)(O.p,{children:ew??a("runNotFound")})});let tb=Q.worktree?.highlightColor,ty=new Intl.NumberFormat(k,{style:"currency",currency:"USD",maximumFractionDigits:4}),tk=["COMPLETED","CANCELLED","FAILED"].includes(Q.status),tR=[!Q.sourcePlan&&null!==Q.sourcePlanNumber?`${a("plan")} #${Q.sourcePlanNumber}`:null,!Q.parentRun&&null!==Q.parentRunNumber?`${a("parentRun")} #${Q.parentRunNumber}`:null,"PLAN"===Q.kind&&!Q.playedSession&&null!==Q.playedSessionNumber?`${a("session")} #${Q.playedSessionNumber}`:null].filter(e=>!!e),tE=function(e){for(let t=e.length-1;t>=0;t-=1){let s=e[t];if("FINAL"===s.kind)return s}return null}(Q.checkpoints),tD=tE?.diffPatch,tO=eY.find(({key:e})=>e===eP),tM=eY.find(({key:e})=>e===Q.provider),tP=e=>null===e?"—":`≈${ty.format(e)}`,tL=[!1,!0].map(e=>Q.modelUsage.filter(t=>t.superseded===e).reduce((t,s)=>({input:t.input+s.inputTokens,output:t.output+s.outputTokens,cacheRead:t.cacheRead+s.cacheReadTokens,cacheWrite:t.cacheWrite+s.cacheWriteTokens,reported:t.reported+(s.estimatedCost??0),catalog:t.catalog+(s.catalogCost??0),hasReported:t.hasReported||null!==s.estimatedCost,hasCatalog:t.hasCatalog||null!==s.catalogCost,superseded:e}),{input:0,output:0,cacheRead:0,cacheWrite:0,reported:0,catalog:0,hasReported:!1,hasCatalog:!1,superseded:e}));return(0,t.jsxs)("div",{className:"min-w-0 space-y-5",children:[(0,t.jsxs)("div",{className:(0,G.f)("space-y-4",tb&&"rounded-lg border-l-4 p-4",tb&&Y.x[tb],tb&&Y._[tb]),children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-start justify-between gap-3",children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,t.jsxs)("h1",{className:"text-2xl font-semibold",children:["PLAN"===Q.kind?a("plan"):a("session")," ",(0,t.jsxs)("span",{className:"font-mono",children:["#",Q.displayNumber]})]}),(0,t.jsx)(M.f,{children:u.status(Q.status)}),(0,t.jsx)(M.f,{variant:"outline",children:u.phase(Q.phase)}),(0,t.jsx)(M.f,{variant:"secondary",children:(0,V.G)(Q.provider)}),"IMPORTED"===Q.origin&&(0,t.jsx)(M.f,{variant:"outline",children:a("imported")})]}),(0,t.jsxs)("p",{className:"mt-1 text-sm text-muted-foreground",children:[Q.repositoryName," · ",Q.branch??a("detached")," ·"," ",(0,t.jsx)(E.f,{value:Q.createdAt})]})]}),(0,t.jsxs)("div",{className:"flex flex-wrap gap-2",children:["MANAGED"===Q.origin&&"IN_PROGRESS"===Q.status&&tM?.supportsPause&&(0,t.jsxs)(P.K,{disabled:!!eC,onClick:()=>void tm("pause"),variant:"outline",children:["pause"===eC?(0,t.jsx)(W.f,{}):(0,t.jsx)(w.f,{})," ",a("pause")]}),"MANAGED"===Q.origin&&"PAUSED"===Q.status&&(0,t.jsxs)(P.K,{disabled:!!eC,onClick:()=>void tm("continue"),children:[(0,t.jsx)(S.f,{})," ",a("continue")]}),"MANAGED"===Q.origin&&!tk&&(0,t.jsxs)(P.K,{disabled:!!eC,onClick:()=>void tm("cancel"),variant:"destructive",children:[(0,t.jsx)(v.f,{})," ",a("cancel")]}),"PLAN"===Q.kind&&"COMPLETED"===Q.status&&!Q.playedAt&&(0,t.jsxs)(P.K,{disabled:!!eC||!Q.finalOutput,onClick:()=>{e5([]),e3(!0)},children:[(0,t.jsx)(N.f,{})," ",a("play")]}),(0,t.jsxs)(P.K,{onClick:()=>void(0,K.W)("mutation Archive($id: ID!, $archived: Boolean!) { archiveAgentRuns(ids: [$id], archived: $archived) }",{id:Q.id,archived:!Q.archivedAt}).then(tr),variant:"outline",children:[(0,t.jsx)(x.f,{})," ",Q.archivedAt?a("restore"):a("archive")]}),(0,t.jsxs)(P.K,{disabled:!tM?.supportsNativeDelete,onClick:()=>e0(!0),variant:"destructive",children:[(0,t.jsx)($.f,{})," ",a("delete")]})]})]}),ew&&(0,t.jsx)(O.J,{variant:"destructive",children:(0,t.jsx)(O.p,{children:ew})}),Q.error&&(0,t.jsxs)(O.J,{variant:"destructive",children:[(0,t.jsx)(f.f,{}),(0,t.jsx)(O.p,{children:Q.error})]}),"IMPORTED_ACTIVE_COLLISION"===Q.phase&&(0,t.jsxs)(O.J,{variant:"destructive",children:[(0,t.jsx)(f.f,{}),(0,t.jsx)(O.p,{children:a("importedCollisionWarning")})]})]}),e,(tj.length>0||tR.length>0)&&(0,t.jsxs)(L.N,{children:[(0,t.jsxs)(L.Y,{children:[(0,t.jsx)(L.v,{children:a("linkedItems")}),(0,t.jsx)(L.u,{children:a("linkedItemsDescription")})]}),(0,t.jsxs)(L.O,{className:"grid gap-2 md:grid-cols-2",children:[tj.map(e=>(0,t.jsx)(tI,{value:e},e.id)),tR.map(e=>(0,t.jsxs)("div",{className:"flex items-center gap-2 rounded-lg border border-dashed p-3 text-muted-foreground",children:[(0,t.jsx)(y.f,{className:"size-4"}),(0,t.jsx)("span",{className:"font-mono",children:e}),(0,t.jsx)(M.f,{className:"ml-auto",variant:"outline",children:a("deleted")})]},e))]})]}),(0,t.jsxs)(L.N,{children:[(0,t.jsx)(L.Y,{children:(0,t.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,t.jsx)(L.v,{children:a("prompt")}),(0,t.jsx)(e9,{copy:!0,onRawChange:ej,raw:eg,value:Q.initialPrompt})]})}),(0,t.jsxs)(L.O,{className:"space-y-4",children:[(0,t.jsx)(e8,{onRawChange:ej,raw:eg,showActions:!1,value:Q.initialPrompt}),Q.inputs[0]?.attachments.length?(0,t.jsx)("div",{className:"flex flex-wrap gap-2",children:Q.inputs[0].attachments.map(e=>(0,t.jsx)(P.K,{asChild:!0,size:"sm",variant:"outline",children:(0,t.jsxs)("a",{download:!0,href:e.downloadPath,children:[(0,t.jsx)(b.f,{})," ",e.filename]})},e.id))}):null]})]}),(0,t.jsxs)(L.N,{className:"min-w-0",children:[(0,t.jsxs)(L.Y,{children:[(0,t.jsx)(L.v,{children:a("usageCost")}),(0,t.jsx)(L.u,{children:a("estimatedCost")})]}),(0,t.jsxs)(L.O,{className:"min-w-0 space-y-4",children:[(0,t.jsx)("div",{className:"grid gap-3 sm:grid-cols-2 lg:grid-cols-4",children:[[a("reportedCost"),tP(Q.estimatedCost)],[a("catalogCost"),tP(Q.catalogCost)],[a("inputTokens"),Q.inputTokens.toLocaleString(k)],[a("outputTokens"),Q.outputTokens.toLocaleString(k)],[a("cacheReadTokens"),Q.cacheReadTokens.toLocaleString(k)],[a("cacheWriteTokens"),Q.cacheWriteTokens.toLocaleString(k)],[a("reasoningTokens"),Q.reasoningTokens.toLocaleString(k)],[a("toolCalls"),Q.toolCallCount.toLocaleString(k)]].map(([e,s])=>(0,t.jsxs)("div",{className:"rounded-lg border p-3",children:[(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:e}),(0,t.jsx)("p",{className:"mt-1 text-xl font-semibold tabular-nums",children:s})]},e))}),Q.modelUsage.some(({superseded:e})=>e)&&(0,t.jsxs)(z.s,{children:[(0,t.jsx)(z.E,{children:(0,t.jsxs)(z.N,{children:[(0,t.jsx)(z.V,{children:a("usageState")}),(0,t.jsx)(z.V,{children:a("inputTokens")}),(0,t.jsx)(z.V,{children:a("outputTokens")}),(0,t.jsx)(z.V,{children:a("cacheReadTokens")}),(0,t.jsx)(z.V,{children:a("cacheWriteTokens")}),(0,t.jsx)(z.V,{children:a("reportedCost")}),(0,t.jsx)(z.V,{children:a("catalogCost")})]})}),(0,t.jsx)(z.z,{children:tL.map(e=>(0,t.jsxs)(z.N,{children:[(0,t.jsx)(z.d,{children:e.superseded?a("superseded"):a("activeUsage")}),(0,t.jsx)(z.d,{children:e.input.toLocaleString(k)}),(0,t.jsx)(z.d,{children:e.output.toLocaleString(k)}),(0,t.jsx)(z.d,{children:e.cacheRead.toLocaleString(k)}),(0,t.jsx)(z.d,{children:e.cacheWrite.toLocaleString(k)}),(0,t.jsx)(z.d,{children:tP(e.hasReported?e.reported:null)}),(0,t.jsx)(z.d,{children:tP(e.hasCatalog?e.catalog:null)})]},String(e.superseded)))})]}),Q.modelUsage.length>0&&(0,t.jsxs)(z.s,{children:[(0,t.jsx)(z.E,{children:(0,t.jsxs)(z.N,{children:[(0,t.jsx)(z.V,{children:a("model")}),(0,t.jsx)(z.V,{children:a("inputTokens")}),(0,t.jsx)(z.V,{children:a("outputTokens")}),(0,t.jsx)(z.V,{children:a("cacheReadTokens")}),(0,t.jsx)(z.V,{children:a("cacheWriteTokens")}),(0,t.jsx)(z.V,{children:a("reportedCost")}),(0,t.jsx)(z.V,{children:a("catalogCost")})]})}),(0,t.jsx)(z.z,{children:Q.modelUsage.map(e=>(0,t.jsxs)(z.N,{children:[(0,t.jsxs)(z.d,{children:[e.model,e.superseded&&(0,t.jsx)(M.f,{className:"ml-2",variant:"outline",children:a("superseded")})]}),(0,t.jsx)(z.d,{children:e.inputTokens.toLocaleString(k)}),(0,t.jsx)(z.d,{children:e.outputTokens.toLocaleString(k)}),(0,t.jsx)(z.d,{children:e.cacheReadTokens.toLocaleString(k)}),(0,t.jsx)(z.d,{children:e.cacheWriteTokens.toLocaleString(k)}),(0,t.jsx)(z.d,{children:tP(e.estimatedCost)}),(0,t.jsx)(z.d,{children:tP(e.catalogCost)})]},e.id))})]}),Q.toolCalls.length>0&&(0,t.jsxs)("div",{className:"min-w-0",children:[(0,t.jsx)("h3",{className:"mb-2 font-medium",children:a("toolCalls")}),(0,t.jsx)(tu,{calls:Q.toolCalls})]})]})]}),(0,t.jsxs)(L.N,{className:"gap-0 overflow-hidden py-0",children:[(0,t.jsx)(L.Y,{className:"border-b py-3",children:(0,t.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(L.v,{children:a("activity")}),(0,t.jsx)(L.u,{children:a("activityDescription")})]}),(0,t.jsxs)("div",{className:"flex w-full items-center gap-2 sm:w-auto",children:[(0,t.jsxs)("div",{className:"relative w-full sm:w-64",children:[(0,t.jsx)(C.f,{className:"absolute top-1.5 left-2.5 size-4 text-muted-foreground"}),(0,t.jsx)(i.f,{"aria-label":a("searchActivity"),className:"h-7 pl-8 text-xs",onChange:e=>ea(e.target.value),placeholder:a("searchActivity"),value:es})]}),(0,t.jsxs)(q.G,{children:[(0,t.jsx)(q.X,{asChild:!0,children:(0,t.jsxs)(P.K,{className:"shrink-0",size:"xs",variant:"outline",children:[(0,t.jsx)(j.f,{})," ",a("export")]})}),(0,t.jsxs)(q.L,{align:"end",className:"w-72",children:[(0,t.jsx)(q.r,{onClick:()=>void ta("json").catch(e=>ek(e instanceof Error?e.message:String(e))),children:a("exportJson")}),(0,t.jsx)(q.r,{onClick:()=>void ta("markdown").catch(e=>ek(e instanceof Error?e.message:String(e))),children:a("exportMarkdown")}),Q&&tC.includes(Q.provider)&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(q.U,{}),(0,t.jsx)(q.r,{onClick:()=>void ta("jsonl").catch(e=>ek(e instanceof Error?e.message:String(e))),children:a("exportSession",{tool:(0,V.G)(Q.provider)})}),tA.includes(Q.provider)&&Q.agentId&&(0,t.jsx)(q.r,{onClick:()=>void tn().catch(e=>ek(e instanceof Error?e.message:String(e))),children:a("exportSessionFile",{tool:(0,V.G)(Q.provider)})})]})]})]})]})]})}),ec&&(0,t.jsxs)(P.K,{disabled:eh,onClick:()=>void th(),size:"sm",variant:"ghost",children:[eh&&(0,t.jsx)(W.f,{}),n("loadMore")]}),(0,t.jsx)("div",{className:"h-[24rem] overflow-y-auto",onScroll:ts,ref:e6,children:(0,t.jsxs)(z.s,{className:"table-fixed",children:[(0,t.jsx)(z.E,{className:"sticky top-0 z-10 bg-card",children:(0,t.jsxs)(z.N,{children:[(0,t.jsx)(z.V,{className:"h-7 w-10"}),(0,t.jsx)(z.V,{className:"h-7",children:a("activity")}),(0,t.jsx)(z.V,{className:"h-7 w-40",children:a("status")}),(0,t.jsx)(z.V,{className:"h-7 w-24",children:a("age")})]})}),(0,t.jsx)(z.z,{children:(0,t.jsx)(ti,{events:ee})})]})})]}),Q.finalOutput&&tk&&(0,t.jsxs)(L.N,{children:[(0,t.jsx)(L.Y,{children:(0,t.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,t.jsx)(L.v,{children:"PLAN"===Q.kind?a("plan"):a("summary")}),(0,t.jsx)(e9,{copy:!0,onRawChange:ey,raw:eb,value:Q.finalOutput})]})}),(0,t.jsx)(L.O,{children:(0,t.jsx)(e8,{onRawChange:ey,raw:eb,showActions:!1,value:Q.finalOutput})})]}),"MANAGED"===Q.origin&&"IN_PROGRESS"===Q.status&&tM?.supportsSteering&&(0,t.jsxs)(L.N,{children:[(0,t.jsxs)(L.Y,{children:[(0,t.jsx)(L.v,{children:a("steer")}),(0,t.jsx)(L.u,{children:a("steerDescription")})]}),(0,t.jsxs)(L.O,{className:"space-y-3",children:[(0,t.jsx)(o.f,{onChange:e=>eI(e.target.value),placeholder:a("steerPlaceholder"),value:e$}),(0,t.jsx)(tc.f,{attachments:eR,compact:!0,onFiles:e=>tf(e,eE),onRemove:e=>eE(t=>t.filter(t=>t.id!==e)),uploading:"upload"===eC}),(0,t.jsx)("div",{className:"flex justify-end",children:(0,t.jsxs)(P.K,{disabled:!e$.trim()||!!eC,onClick:()=>void tx(),children:["steer"===eC?(0,t.jsx)(W.f,{}):(0,t.jsx)(A.f,{})," ",a("send")]})})]})]}),Q.questionBatches.map(e=>(0,t.jsx)(tT,{batch:e,editable:"MANAGED"===Q.origin&&!e.supersededAt&&!!e.checkpoint,onAnswered:tr},e.id)),(0,t.jsxs)(L.N,{children:[(0,t.jsxs)(L.Y,{children:[(0,t.jsx)(L.v,{children:a("followUp")}),(0,t.jsx)(L.u,{children:a("followUpDescription")})]}),(0,t.jsxs)(L.O,{className:"space-y-4",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-3",children:[(0,t.jsx)(U.i,{onValueChange:e=>{let t=e??"RESUME";eD(t),"RESEND"===t&&eM(Q.initialPrompt)},value:eT,children:(0,t.jsxs)(U.U,{"aria-label":a("followUp"),children:[(0,t.jsx)(U.k,{disabled:eP===Q.provider&&!tO?.supportsResume,value:"RESUME",children:a("resume")}),(0,t.jsx)(U.k,{value:"FRESH",children:a("fresh")}),(0,t.jsx)(U.k,{value:"RESEND",children:a("resend")})]})}),(0,t.jsx)("div",{className:"min-w-0 flex-1",children:(0,t.jsx)(tS.f,{catalog:eY,effort:eU,model:eq,onEffortChange:eW,onModelChange:eF,onProviderChange:e=>{let t=eY.find(({key:t})=>t===e);eL(e),eF(""),eW("auto"),eB(!!t?.supportsWebSearch)},provider:eP})})]}),"RESUME"===eT&&eP!==Q.provider&&(0,t.jsx)(O.J,{children:(0,t.jsxs)(O.p,{className:"flex flex-wrap items-center gap-3",children:[(0,t.jsxs)(d.d,{onValueChange:e=>eQ(e??"NORMALIZED"),value:eX,children:[(0,t.jsx)(d.P,{className:"w-56 shrink-0",children:(0,t.jsx)(d.U,{})}),(0,t.jsxs)(d.r,{children:[(0,t.jsx)(d.T,{value:"NORMALIZED",children:a("normalizedContext")}),(0,t.jsx)(d.T,{value:"SUMMARY",children:a("summaryOnly")})]})]}),(0,t.jsx)("span",{className:"min-w-0 flex-1",children:a("crossProviderWarning")})]})}),(0,t.jsx)(o.f,{className:"min-h-28",onChange:e=>eM(e.target.value),placeholder:"RESEND"===eT?a("resendPrompt"):a("followUpPrompt"),value:eO}),(0,t.jsx)(tc.f,{attachments:eJ,compact:!0,onFiles:e=>tf(e,eG),onRemove:e=>eG(t=>t.filter(t=>t.id!==e)),uploading:"upload"===eC}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(F.f,{children:a("mcpPresets")}),(0,t.jsx)(J.S,{kind:Q.kind,onChange:eV,selectedIds:eK})]}),(0,t.jsxs)("div",{className:"flex flex-wrap items-center justify-end gap-4",children:[(0,t.jsxs)("label",{className:"flex items-center gap-2",children:[(0,t.jsx)(l.f,{checked:ez,disabled:!tO?.supportsWebSearch,onCheckedChange:e=>eB(!!e)}),a("webSearch")]}),(0,t.jsxs)(P.K,{disabled:!eO.trim()||!!eC||!eq||!tO?.available,onClick:()=>"PAUSED"===Q.status&&"SESSION"===Q.kind?e2(!0):void tv(),children:["follow"===eC?(0,t.jsx)(W.f,{}):(0,t.jsx)(y.f,{})," ",a("startFollowUp")]})]})]})]}),Q.worktreeId&&(0,t.jsx)(tw,{worktreeId:Q.worktreeId}),Q.checkpoints.length>0&&(0,t.jsxs)(L.N,{children:[(0,t.jsxs)(L.Y,{children:[(0,t.jsx)(L.v,{children:a("changesSnapshots")}),(0,t.jsx)(L.u,{children:a("changesSnapshotsDescription")})]}),(0,t.jsxs)(L.O,{className:"space-y-3",children:["PLAN"===Q.kind&&tD&&(0,t.jsxs)(O.J,{variant:"destructive",children:[(0,t.jsx)(f.f,{}),(0,t.jsx)(O.p,{children:a("planMutationWarning")})]}),tD&&(0,t.jsx)(T.f,{labels:c,patch:tD}),tE&&!tD&&(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:a("noFinalChanges")}),Q.checkpoints.map(e=>(0,t.jsxs)("details",{className:"rounded-lg border p-3",children:[(0,t.jsxs)("summary",{className:"cursor-pointer",children:[(0,t.jsx)(g.f,{className:"mr-2 inline size-4"}),u.checkpointKind(e.kind)," ·"," ",(0,t.jsx)(E.f,{value:e.createdAt}),e.branch&&(0,t.jsx)(M.f,{className:"ml-2",variant:"outline",children:e.branch})]}),(0,t.jsxs)("div",{className:"mt-3 space-y-2 text-sm",children:[(0,t.jsxs)("p",{className:"font-mono text-xs",children:["HEAD ",e.headSha??"—"]}),e.diffPatch?(0,t.jsx)(T.f,{labels:c,patch:e.diffPatch}):e.diffSummary?(0,t.jsx)("pre",{className:"overflow-auto rounded bg-muted p-3 text-xs whitespace-pre-wrap",children:e.diffSummary}):(0,t.jsx)("p",{className:"text-muted-foreground",children:a("noFinalChanges")}),e.stashRef&&(0,t.jsxs)("p",{className:"font-mono text-xs",children:[a("stashCreated"),": ",e.stashRef]}),e.refName&&(0,t.jsx)("p",{className:"font-mono text-xs text-muted-foreground",children:e.refName})]})]},e.id))]})]}),(0,t.jsx)(tN,{run:Q}),(0,t.jsx)(R.f,{actionLabel:a("delete"),cancelLabel:a("cancel"),description:a("deleteDescription"),onConfirm:tg,onOpenChange:e0,open:eZ,title:a("deleteTitle")}),(0,t.jsx)(_.N,{onOpenChange:e=>{e3(e),e||e5([])},open:e4,children:(0,t.jsxs)(_.d,{className:"sm:max-w-2xl",children:[(0,t.jsxs)(_.s,{children:[(0,t.jsx)(_.F,{children:a("playPlan")}),(0,t.jsx)(_.C,{children:a("playPlanDescription")})]}),(0,t.jsx)(J.S,{kind:"SESSION",onChange:e5,selectedIds:e7}),(0,t.jsxs)(_.c,{children:[(0,t.jsx)(P.K,{onClick:()=>e3(!1),variant:"outline",children:a("cancel")}),(0,t.jsxs)(P.K,{disabled:!!eC,onClick:()=>void tm("play"),children:["play"===eC?(0,t.jsx)(W.f,{}):(0,t.jsx)(N.f,{})," ",a("play")]})]})]})}),(0,t.jsx)(R.f,{actionLabel:a("cancelAndTransfer"),cancelLabel:a("cancel"),description:a("pausedFollowUpDescription"),onConfirm:tv,onOpenChange:e2,open:e1,title:a("pausedFollowUpTitle")})]})}],662663)}]);
@@ -1,4 +1,4 @@
1
- (()=>{"use strict";(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,636162,e=>{var t=e.i(456420);let a={name:"apple",size:24,node:[["path",{d:"M12 6.528V3a1 1 0 0 1 1-1h0",key:"11qiee"}],["path",{d:"M18.237 21A15 15 0 0 0 22 11a6 6 0 0 0-10-4.472A6 6 0 0 0 2 11a15.1 15.1 0 0 0 3.763 10 3 3 0 0 0 3.648.648 5.5 5.5 0 0 1 5.178 0A3 3 0 0 0 18.237 21",key:"110c12"}]]};a.node;let s=(0,t.f)(a);e.s(["f",0,s],636162)},876561,e=>{var t=e.i(456420);let a={name:"archive",size:24,node:[["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.node;let s=(0,t.f)(a);e.s(["f",0,s],876561)},39287,e=>{var t=e.i(456420);let a={name:"code-xml",size:24,node:[["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"}]],aliases:["code-2"]};a.node;let s=(0,t.f)(a);e.s(["f",0,s])},452330,e=>{var t=e.i(39287);e.s(["f",()=>t.f])},837817,e=>{var t=e.i(456420);let a={name:"undo-2",size:24,node:[["path",{d:"M9 14 4 9l5-5",key:"102s5s"}],["path",{d:"M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11",key:"f3b9sd"}]]};a.node;let s=(0,t.f)(a);e.s(["f",0,s],837817)},688194,e=>{let t=["BUILD","ANALYZE","ARCHIVE","BUILD_FOR_TESTING"];e.s(["q",0,["BUILD","TEST","ANALYZE","ARCHIVE","BUILD_FOR_TESTING","TEST_WITHOUT_BUILDING"],"H",0,["apple","app-window","archive","beaker","box","bug","code","gauge","hammer","layers","package","play","rocket","shield","smartphone","sparkles","terminal","test-tube","wrench"],"r",0,["DEBUGGING","RELEASE_TESTING","ENTERPRISE","APP_STORE_CONNECT"],"$",0,{DEBUGGING:"DEVELOPMENT",RELEASE_TESTING:"AD_HOC",ENTERPRISE:"ENTERPRISE",APP_STORE_CONNECT:"APP_STORE"},"G",0,function(e){if(!t.includes(e))return[];let a={type:"PHYSICAL_DEVICE",id:"generic-ios",name:"Any Physical iOS Device",platform:"iOS",osVersion:null,state:null,generic:!0};return"ARCHIVE"===e?[a]:[{type:"SIMULATOR",id:"generic-ios-simulator",name:"Any iOS Simulator",platform:"iOS Simulator",osVersion:null,state:null,generic:!0},a]},"U",0,function(e,t){return"*"===e||(e.endsWith(".*")?t.startsWith(e.slice(0,-1)):e===t)}])},513969,e=>{var t=e.i(843476),a=e.i(948148),s=e.i(983913),r=e.i(975157),i=e.i(763267);let n="__all_agents__";e.s(["G",0,n,"j",0,function({value:e,onValueChange:l,options:d,ariaLabel:o,className:c}){let u=(0,a.f)("activeAgent"),{activeAgentId:h,activeAgent:m,agents:p,ready:f}=(0,i.q)(),x=d??p.map(e=>({value:e.id,label:e.name,keywords:e.hostname})),g=h??e,v=[{value:n,label:u("allAgents")},...x];return g===n||x.some(({value:e})=>e===g)||v.push({value:g,label:m?.name??u("unavailable")}),(0,t.jsxs)("div",{className:(0,r.f)("w-full sm:w-64",c),children:[(0,t.jsx)(s.f,{ariaLabel:o??u("filterLabel"),disabled:!f||!!h,emptyMessage:u("empty"),onValueChange:l,options:v,placeholder:u("allAgents"),searchPlaceholder:u("search"),value:g}),h&&(0,t.jsx)("p",{className:"mt-1 text-xs text-muted-foreground",children:u("controlled")})]})}])},687862,671028,e=>{var t=e.i(843476);e.i(688194);var a=e.i(636162),s=e.i(456420);let r={name:"app-window",size:24,node:[["rect",{x:"2",y:"4",width:"20",height:"16",rx:"2",key:"izxlao"}],["path",{d:"M10 4v4",key:"pp8u80"}],["path",{d:"M2 8h20",key:"d11cs7"}],["path",{d:"M6 4v4",key:"1svtjw"}]]};r.node;let i=(0,s.f)(r);var n=e.i(876561);let l={name:"beaker",size:24,node:[["path",{d:"M4.5 3h15",key:"c7n0jr"}],["path",{d:"M6 3v16a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2V3",key:"m1uhx7"}],["path",{d:"M6 14h12",key:"4cwo0f"}]]};l.node;let d=(0,s.f)(l),o={name:"box",size:24,node:[["path",{d:"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",key:"hh9hay"}],["path",{d:"m3.3 7 8.7 5 8.7-5",key:"g66t2b"}],["path",{d:"M12 22V12",key:"d0xqtd"}]]};o.node;let c=(0,s.f)(o);var u=e.i(579411),h=e.i(452330);let m={name:"gauge",size:24,node:[["path",{d:"m12 14 4-4",key:"9kzdfg"}],["path",{d:"M3.34 19a10 10 0 1 1 17.32 0",key:"19p75a"}]]};m.node;let p=(0,s.f)(m);e.s(["f",0,p],671028);var f=e.i(93384);let x={name:"layers",size:24,node:[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]],aliases:["layers-3"]};x.node;let g=(0,s.f)(x),v={name:"package",size:24,node:[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["polyline",{points:"3.29 7 12 12 20.71 7",key:"ousv84"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]]};v.node;let j=(0,s.f)(v);var y=e.i(21357);let w={name:"rocket",size:24,node:[["path",{d:"M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5",key:"qeys4"}],["path",{d:"M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09",key:"u4xsad"}],["path",{d:"M9 12a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.4 22.4 0 0 1-4 2z",key:"676m9"}],["path",{d:"M9 12H4s.55-3.03 2-4c1.62-1.08 5 .05 5 .05",key:"92ym6u"}]]};w.node;let k=(0,s.f)(w);var N=e.i(584026),b=e.i(986206),A=e.i(328623),C=e.i(604139);let E={name:"test-tube",size:24,node:[["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"}]]};E.node;let S=(0,s.f)(E);var I=e.i(747925);let T={apple:a.f,"app-window":i,archive:n.f,beaker:d,box:c,bug:u.f,code:h.f,gauge:p,hammer:f.f,layers:g,package:j,play:y.f,rocket:k,shield:N.f,smartphone:b.f,sparkles:A.f,terminal:C.f,"test-tube":S,wrench:I.f};e.s(["f",0,function({iconKey:e}){if(!e)return null;let a=T[e];return a?(0,t.jsx)(a,{"aria-hidden":!0,className:"size-4"}):null}],687862)},373725,e=>{var t=e.i(843476),a=e.i(257428);e.s(["f",0,function({ids:e,label:s,onChange:r,selected:i}){let n=e.length>0&&e.every(e=>i.has(e)),l=!n&&e.some(e=>i.has(e));return(0,t.jsx)(a.f,{"aria-label":s,checked:!!n||!!l&&"indeterminate",disabled:!e.length,onCheckedChange:t=>{let a=new Set(i);for(let s of e)!0===t?a.add(s):a.delete(s);r(a)}})}])},633785,555291,e=>{var t,a,s,r=e.i(843476),i=e.i(397142),n=e.i(975157);let l=["low","medium","high","xhigh","max","ultra"],d=["#38bdf8","#818cf8","#a78bfa","#e879f9","#fb7185","#fb923c"];e.s(["f",0,function({className:e,effort:t,efforts:a}){let s=t?.toLowerCase()??"auto",o=(a??l).map(e=>e.toLowerCase()).filter(e=>"auto"!==e),c=o.indexOf(s)+1;if(!c)return(0,r.jsx)(i.f,{"aria-hidden":"true",className:(0,n.f)("h-4 w-5 shrink-0",e)});let u=o.length-1,h=Math.min(5,(17-u)/o.length),m=(20-(o.length*h+ +u))/2,p=Math.max(2.5,12.5/(o.length+1));return(0,r.jsx)("svg",{"aria-hidden":"true",className:(0,n.f)("h-4 w-5 shrink-0",e),viewBox:"0 0 20 16",xmlns:"http://www.w3.org/2000/svg",children:o.map((e,t)=>{let a=u?p+(12.5-p)*t/u:12.5,i=t<c;return(0,r.jsx)("rect",{fill:i&&"ultra"===s?d[Math.round(t/(u||1)*(d.length-1))]:"currentColor",height:a,opacity:i?1:.25,rx:.6,width:h,x:m+t*(h+1),y:14-a},e)})})}],633785);var o=e.i(271645);function c(){return(c=Object.assign.bind()).apply(null,arguments)}function u(){return(u=Object.assign.bind()).apply(null,arguments)}function h(){return(h=Object.assign.bind()).apply(null,arguments)}let m={CODEX:function(e){return o.createElement("svg",u({xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"currentColor",fillRule:"evenodd",style:{flex:"none",lineHeight:1},viewBox:"0 0 24 24"},e),a||(a=o.createElement("path",{d:"M9.205 8.658v-2.26c0-.19.072-.333.238-.428l4.543-2.616c.619-.357 1.356-.523 2.117-.523 2.854 0 4.662 2.212 4.662 4.566 0 .167 0 .357-.024.547l-4.71-2.759a.8.8 0 0 0-.856 0zm10.609 8.8V12.06c0-.333-.143-.57-.429-.737l-5.97-3.473 1.95-1.118a.43.43 0 0 1 .476 0l4.543 2.617c1.309.76 2.189 2.378 2.189 3.948 0 1.808-1.07 3.473-2.76 4.163zM7.802 12.703l-1.95-1.142a.45.45 0 0 1-.239-.428V5.899c0-2.545 1.95-4.472 4.591-4.472 1 0 1.927.333 2.712.928L8.23 5.067c-.285.166-.428.404-.428.737zM12 15.128l-2.795-1.57v-3.33L12 8.658l2.795 1.57v3.33zm1.796 7.23c-1 0-1.927-.332-2.712-.927l4.686-2.712c.285-.166.428-.404.428-.737v-6.898l1.974 1.142c.167.095.238.238.238.428v5.233c0 2.545-1.974 4.472-4.614 4.472zm-5.637-5.303-4.544-2.617c-1.308-.761-2.188-2.378-2.188-3.948A4.48 4.48 0 0 1 4.21 6.327v5.423c0 .333.143.571.428.738l5.947 3.449-1.95 1.118a.43.43 0 0 1-.476 0m-.262 3.9c-2.688 0-4.662-2.021-4.662-4.519 0-.19.024-.38.047-.57l4.686 2.71a.79.79 0 0 0 .856 0l5.97-3.448v2.26c0 .19-.07.333-.237.428l-4.543 2.616c-.619.357-1.356.523-2.117.523m5.899 2.83a5.95 5.95 0 0 0 5.827-4.756C22.287 18.339 24 15.84 24 13.296c0-1.665-.713-3.282-1.998-4.448.119-.5.19-.999.19-1.498 0-3.401-2.759-5.947-5.946-5.947a5.7 5.7 0 0 0-1.88.31A5.96 5.96 0 0 0 10.205 0a5.95 5.95 0 0 0-5.827 4.757C1.713 5.447 0 7.945 0 10.49c0 1.666.713 3.283 1.998 4.448-.119.5-.19 1-.19 1.499 0 3.401 2.759 5.946 5.946 5.946.642 0 1.26-.095 1.88-.309a5.96 5.96 0 0 0 4.162 1.713z"})))},CLAUDE:function(e){return o.createElement("svg",c({xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"currentColor",fillRule:"evenodd",style:{flex:"none",lineHeight:1},viewBox:"0 0 24 24"},e),t||(t=o.createElement("path",{d:"M20.998 10.949H24v3.102h-3v3.028h-1.487V20H18v-2.921h-1.487V20H15v-2.921H9V20H7.488v-2.921H6V20H4.487v-2.921H3V14.05H0v-3.1h3V5h17.998zM6 10.949h1.488V8.102H6zm10.51 0H18V8.102h-1.49z",clipRule:"evenodd"})))},OPENCODE:function(e){return o.createElement("svg",h({xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"currentColor",fillRule:"evenodd",style:{flex:"none",lineHeight:1},viewBox:"0 0 24 24"},e),s||(s=o.createElement("path",{d:"M16 6H8v12h8zm4 16H4V2h16z"})))}};e.s(["f",0,function({className:e,provider:t}){let a=m[t];return a?(0,r.jsx)(a,{"aria-hidden":"true",className:(0,n.f)("size-4 shrink-0",e)}):null}],555291)},42629,e=>{let t=`
1
+ (()=>{"use strict";(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,636162,e=>{var t=e.i(456420);let a={name:"apple",size:24,node:[["path",{d:"M12 6.528V3a1 1 0 0 1 1-1h0",key:"11qiee"}],["path",{d:"M18.237 21A15 15 0 0 0 22 11a6 6 0 0 0-10-4.472A6 6 0 0 0 2 11a15.1 15.1 0 0 0 3.763 10 3 3 0 0 0 3.648.648 5.5 5.5 0 0 1 5.178 0A3 3 0 0 0 18.237 21",key:"110c12"}]]};a.node;let s=(0,t.f)(a);e.s(["f",0,s],636162)},876561,e=>{var t=e.i(456420);let a={name:"archive",size:24,node:[["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.node;let s=(0,t.f)(a);e.s(["f",0,s],876561)},39287,e=>{var t=e.i(456420);let a={name:"code-xml",size:24,node:[["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"}]],aliases:["code-2"]};a.node;let s=(0,t.f)(a);e.s(["f",0,s])},452330,e=>{var t=e.i(39287);e.s(["f",()=>t.f])},837817,e=>{var t=e.i(456420);let a={name:"undo-2",size:24,node:[["path",{d:"M9 14 4 9l5-5",key:"102s5s"}],["path",{d:"M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11",key:"f3b9sd"}]]};a.node;let s=(0,t.f)(a);e.s(["f",0,s],837817)},688194,e=>{let t=["BUILD","ANALYZE","ARCHIVE","BUILD_FOR_TESTING"];e.s(["q",0,["BUILD","TEST","ANALYZE","ARCHIVE","BUILD_FOR_TESTING","TEST_WITHOUT_BUILDING"],"H",0,["apple","app-window","archive","beaker","box","bug","code","gauge","hammer","layers","package","play","rocket","shield","smartphone","sparkles","terminal","test-tube","wrench"],"r",0,["DEBUGGING","RELEASE_TESTING","ENTERPRISE","APP_STORE_CONNECT"],"$",0,{DEBUGGING:"DEVELOPMENT",RELEASE_TESTING:"AD_HOC",ENTERPRISE:"ENTERPRISE",APP_STORE_CONNECT:"APP_STORE"},"G",0,function(e){if(!t.includes(e))return[];let a={type:"PHYSICAL_DEVICE",id:"generic-ios",name:"Any Physical iOS Device",platform:"iOS",osVersion:null,state:null,generic:!0};return"ARCHIVE"===e?[a]:[{type:"SIMULATOR",id:"generic-ios-simulator",name:"Any iOS Simulator",platform:"iOS Simulator",osVersion:null,state:null,generic:!0},a]},"U",0,function(e,t){return"*"===e||(e.endsWith(".*")?t.startsWith(e.slice(0,-1)):e===t)}])},513969,e=>{var t=e.i(843476),a=e.i(948148),s=e.i(983913),r=e.i(975157),i=e.i(763267);let n="__all_agents__";e.s(["G",0,n,"j",0,function({value:e,onValueChange:l,options:d,ariaLabel:o,className:c}){let u=(0,a.f)("activeAgent"),{activeAgentId:h,activeAgent:m,agents:p,ready:f}=(0,i.q)(),x=d??p.map(e=>({value:e.id,label:e.name,keywords:e.hostname})),g=h??e,v=[{value:n,label:u("allAgents")},...x];return g===n||x.some(({value:e})=>e===g)||v.push({value:g,label:m?.name??u("unavailable")}),(0,t.jsxs)("div",{className:(0,r.f)("w-full sm:w-64",c),children:[(0,t.jsx)(s.f,{ariaLabel:o??u("filterLabel"),disabled:!f||!!h,emptyMessage:u("empty"),onValueChange:l,options:v,placeholder:u("allAgents"),searchPlaceholder:u("search"),value:g}),h&&(0,t.jsx)("p",{className:"mt-1 text-xs text-muted-foreground",children:u("controlled")})]})}])},687862,671028,e=>{var t=e.i(843476);e.i(688194);var a=e.i(636162),s=e.i(456420);let r={name:"app-window",size:24,node:[["rect",{x:"2",y:"4",width:"20",height:"16",rx:"2",key:"izxlao"}],["path",{d:"M10 4v4",key:"pp8u80"}],["path",{d:"M2 8h20",key:"d11cs7"}],["path",{d:"M6 4v4",key:"1svtjw"}]]};r.node;let i=(0,s.f)(r);var n=e.i(876561);let l={name:"beaker",size:24,node:[["path",{d:"M4.5 3h15",key:"c7n0jr"}],["path",{d:"M6 3v16a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2V3",key:"m1uhx7"}],["path",{d:"M6 14h12",key:"4cwo0f"}]]};l.node;let d=(0,s.f)(l),o={name:"box",size:24,node:[["path",{d:"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",key:"hh9hay"}],["path",{d:"m3.3 7 8.7 5 8.7-5",key:"g66t2b"}],["path",{d:"M12 22V12",key:"d0xqtd"}]]};o.node;let c=(0,s.f)(o);var u=e.i(579411),h=e.i(452330);let m={name:"gauge",size:24,node:[["path",{d:"m12 14 4-4",key:"9kzdfg"}],["path",{d:"M3.34 19a10 10 0 1 1 17.32 0",key:"19p75a"}]]};m.node;let p=(0,s.f)(m);e.s(["f",0,p],671028);var f=e.i(93384);let x={name:"layers",size:24,node:[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]],aliases:["layers-3"]};x.node;let g=(0,s.f)(x),v={name:"package",size:24,node:[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["polyline",{points:"3.29 7 12 12 20.71 7",key:"ousv84"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]]};v.node;let j=(0,s.f)(v);var y=e.i(21357);let w={name:"rocket",size:24,node:[["path",{d:"M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5",key:"qeys4"}],["path",{d:"M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09",key:"u4xsad"}],["path",{d:"M9 12a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.4 22.4 0 0 1-4 2z",key:"676m9"}],["path",{d:"M9 12H4s.55-3.03 2-4c1.62-1.08 5 .05 5 .05",key:"92ym6u"}]]};w.node;let k=(0,s.f)(w);var N=e.i(584026),b=e.i(986206),A=e.i(328623),C=e.i(604139);let E={name:"test-tube",size:24,node:[["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"}]]};E.node;let I=(0,s.f)(E);var S=e.i(747925);let T={apple:a.f,"app-window":i,archive:n.f,beaker:d,box:c,bug:u.f,code:h.f,gauge:p,hammer:f.f,layers:g,package:j,play:y.f,rocket:k,shield:N.f,smartphone:b.f,sparkles:A.f,terminal:C.f,"test-tube":I,wrench:S.f};e.s(["f",0,function({iconKey:e}){if(!e)return null;let a=T[e];return a?(0,t.jsx)(a,{"aria-hidden":!0,className:"size-4"}):null}],687862)},373725,e=>{var t=e.i(843476),a=e.i(257428);e.s(["f",0,function({ids:e,label:s,onChange:r,selected:i}){let n=e.length>0&&e.every(e=>i.has(e)),l=!n&&e.some(e=>i.has(e));return(0,t.jsx)(a.f,{"aria-label":s,checked:!!n||!!l&&"indeterminate",disabled:!e.length,onCheckedChange:t=>{let a=new Set(i);for(let s of e)!0===t?a.add(s):a.delete(s);r(a)}})}])},633785,555291,e=>{var t,a,s,r=e.i(843476),i=e.i(397142),n=e.i(975157);let l=["low","medium","high","xhigh","max","ultra"],d=["#38bdf8","#818cf8","#a78bfa","#e879f9","#fb7185","#fb923c"];e.s(["f",0,function({className:e,effort:t,efforts:a}){let s=t?.toLowerCase()??"auto",o=(a??l).map(e=>e.toLowerCase()).filter(e=>"auto"!==e),c=o.indexOf(s)+1;if(!c)return(0,r.jsx)(i.f,{"aria-hidden":"true",className:(0,n.f)("h-4 w-5 shrink-0",e)});let u=o.length-1,h=Math.min(5,(17-u)/o.length),m=(20-(o.length*h+ +u))/2,p=Math.max(2.5,12.5/(o.length+1));return(0,r.jsx)("svg",{"aria-hidden":"true",className:(0,n.f)("h-4 w-5 shrink-0",e),viewBox:"0 0 20 16",xmlns:"http://www.w3.org/2000/svg",children:o.map((e,t)=>{let a=u?p+(12.5-p)*t/u:12.5,i=t<c;return(0,r.jsx)("rect",{fill:i&&"ultra"===s?d[Math.round(t/(u||1)*(d.length-1))]:"currentColor",height:a,opacity:i?1:.25,rx:.6,width:h,x:m+t*(h+1),y:14-a},e)})})}],633785);var o=e.i(271645);function c(){return(c=Object.assign.bind()).apply(null,arguments)}function u(){return(u=Object.assign.bind()).apply(null,arguments)}function h(){return(h=Object.assign.bind()).apply(null,arguments)}let m={CODEX:function(e){return o.createElement("svg",u({xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"currentColor",fillRule:"evenodd",style:{flex:"none",lineHeight:1},viewBox:"0 0 24 24"},e),a||(a=o.createElement("path",{d:"M9.205 8.658v-2.26c0-.19.072-.333.238-.428l4.543-2.616c.619-.357 1.356-.523 2.117-.523 2.854 0 4.662 2.212 4.662 4.566 0 .167 0 .357-.024.547l-4.71-2.759a.8.8 0 0 0-.856 0zm10.609 8.8V12.06c0-.333-.143-.57-.429-.737l-5.97-3.473 1.95-1.118a.43.43 0 0 1 .476 0l4.543 2.617c1.309.76 2.189 2.378 2.189 3.948 0 1.808-1.07 3.473-2.76 4.163zM7.802 12.703l-1.95-1.142a.45.45 0 0 1-.239-.428V5.899c0-2.545 1.95-4.472 4.591-4.472 1 0 1.927.333 2.712.928L8.23 5.067c-.285.166-.428.404-.428.737zM12 15.128l-2.795-1.57v-3.33L12 8.658l2.795 1.57v3.33zm1.796 7.23c-1 0-1.927-.332-2.712-.927l4.686-2.712c.285-.166.428-.404.428-.737v-6.898l1.974 1.142c.167.095.238.238.238.428v5.233c0 2.545-1.974 4.472-4.614 4.472zm-5.637-5.303-4.544-2.617c-1.308-.761-2.188-2.378-2.188-3.948A4.48 4.48 0 0 1 4.21 6.327v5.423c0 .333.143.571.428.738l5.947 3.449-1.95 1.118a.43.43 0 0 1-.476 0m-.262 3.9c-2.688 0-4.662-2.021-4.662-4.519 0-.19.024-.38.047-.57l4.686 2.71a.79.79 0 0 0 .856 0l5.97-3.448v2.26c0 .19-.07.333-.237.428l-4.543 2.616c-.619.357-1.356.523-2.117.523m5.899 2.83a5.95 5.95 0 0 0 5.827-4.756C22.287 18.339 24 15.84 24 13.296c0-1.665-.713-3.282-1.998-4.448.119-.5.19-.999.19-1.498 0-3.401-2.759-5.947-5.946-5.947a5.7 5.7 0 0 0-1.88.31A5.96 5.96 0 0 0 10.205 0a5.95 5.95 0 0 0-5.827 4.757C1.713 5.447 0 7.945 0 10.49c0 1.666.713 3.283 1.998 4.448-.119.5-.19 1-.19 1.499 0 3.401 2.759 5.946 5.946 5.946.642 0 1.26-.095 1.88-.309a5.96 5.96 0 0 0 4.162 1.713z"})))},CLAUDE:function(e){return o.createElement("svg",c({xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"currentColor",fillRule:"evenodd",style:{flex:"none",lineHeight:1},viewBox:"0 0 24 24"},e),t||(t=o.createElement("path",{d:"M20.998 10.949H24v3.102h-3v3.028h-1.487V20H18v-2.921h-1.487V20H15v-2.921H9V20H7.488v-2.921H6V20H4.487v-2.921H3V14.05H0v-3.1h3V5h17.998zM6 10.949h1.488V8.102H6zm10.51 0H18V8.102h-1.49z",clipRule:"evenodd"})))},OPENCODE:function(e){return o.createElement("svg",h({xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"currentColor",fillRule:"evenodd",style:{flex:"none",lineHeight:1},viewBox:"0 0 24 24"},e),s||(s=o.createElement("path",{d:"M16 6H8v12h8zm4 16H4V2h16z"})))}};e.s(["f",0,function({className:e,provider:t}){let a=m[t];return a?(0,r.jsx)(a,{"aria-hidden":"true",className:(0,n.f)("size-4 shrink-0",e)}):null}],555291)},42629,e=>{let t=`
2
2
  id kind displayNumber status provider followUpMode
3
3
  `,a=`
4
4
  id kind displayNumber status phase origin provider providerVersion
@@ -15,7 +15,10 @@
15
15
  cacheReadTokens cacheWriteTokens toolCallCount parentRunId parentRunNumber
16
16
  parentRun { ${t} }
17
17
  followUps { ${t} }
18
- attempts { id generation nativeId status resumeStrategy startedAt finishedAt supersededAt }
18
+ attempts {
19
+ id generation nativeId status resumeStrategy startedAt finishedAt supersededAt
20
+ sessionInfo { nativeTranscriptPath activityLogPath workingDirectory }
21
+ }
19
22
  inputs {
20
23
  id sequence kind prompt createdAt
21
24
  attachments { id filename contentType size sha256 downloadPath createdAt }
@@ -50,12 +53,12 @@
50
53
  jiraIssueKey provider model effort webSearchEnabled mcpPresetIds prompt
51
54
  attachments { id filename contentType size sha256 downloadPath createdAt }
52
55
  archivedAt createdAt updatedAt
53
- `;e.s(["b",0,s,"T",0,i,"q",0,r,"N",0,a])},134779,e=>{var t=e.i(843476),a=e.i(271645),s=e.i(876561),r=e.i(397142),i=e.i(259911),n=e.i(456420);let l={name:"gallery-vertical-end",size:24,node:[["path",{d:"M7 2h10",key:"nczekb"}],["path",{d:"M5 6h14",key:"u2x4p"}],["rect",{width:"18",height:"12",x:"3",y:"10",rx:"2",key:"l0tzu3"}]]};l.node;let d=(0,n.f)(l);var o=e.i(21357),c=e.i(77071),u=e.i(566595),h=e.i(759659),m=e.i(837817),p=e.i(861745),f=e.i(948148),x=e.i(763267),g=e.i(513969),v=e.i(340953),j=e.i(356505),y=e.i(816484),w=e.i(373725),k=e.i(929592),N=e.i(487486),b=e.i(519455),A=e.i(515288),C=e.i(257428),E=e.i(776639),S=e.i(82612),I=e.i(793479),T=e.i(967489),P=e.i(987968),R=e.i(784774),L=e.i(746798),$=e.i(520133),M=e.i(637611),D=e.i(944887),O=e.i(445408),V=e.i(360583),z=e.i(767648),U=e.i(887126),H=e.i(37332);let _={archive:"ACTIVE",provider:"ALL",origin:"ALL"};var K=e.i(975157),q=e.i(171502),G=e.i(42629),B=e.i(633785),F=e.i(555291),W=e.i(11037),Y=e.i(266136);function X({label:e,children:a,onClick:s,disabled:r,destructive:i}){return(0,t.jsxs)(L.Tooltip,{children:[(0,t.jsx)(L.TooltipTrigger,{asChild:!0,children:(0,t.jsx)(b.K,{"aria-label":e,disabled:r,onClick:e=>{e.preventDefault(),e.stopPropagation(),s()},size:"icon-sm",variant:i?"destructive":"ghost",children:a})}),(0,t.jsx)(L.TooltipContent,{children:e})]})}e.s(["RunsPage",0,function({initialFilters:e=_,kind:n,appId:l}){let L=(0,f.f)("runs"),Z=(0,x.q)(),[J,Q]=(0,x.T)("PLAN"===n?"plans":"sessions",g.G),ee=Z.activeAgentId??(J===g.G?null:J),et=(0,W.f)(),ea=(0,p.X)(),es=(0,$.U)(),[er,ei]=(0,a.useState)([]),[en,el]=(0,a.useState)(""),[ed,eo]=(0,a.useState)(e.archive),[ec,eu]=(0,a.useState)(e.provider),[eh,em]=(0,a.useState)(e.origin),[ep,ef]=(0,a.useState)(!0),[ex,eg]=(0,a.useState)(!1),[ev,ej]=(0,a.useState)(null),[ey,ew]=(0,a.useState)(!1),[ek,eN]=(0,a.useState)(new Set),[eb,eA]=(0,a.useState)(ee);eb!==ee&&(eA(ee),eN(new Set));let[eC,eE]=(0,a.useState)([]),[eS,eI]=(0,a.useState)(null),[eT,eP]=(0,a.useState)(0),[eR,eL]=(0,a.useState)(null),[e$,eM]=(0,a.useState)(null),[eD,eO]=(0,a.useState)([]),eV=(0,a.useRef)(null);(0,a.useEffect)(()=>{var e;"u">typeof document&&(document.cookie=`ade_run_filters_${n.toLowerCase()}=${e={archive:ed,provider:ec,origin:eh},`${e.archive}.${e.provider}.${e.origin}`}; path=/; max-age=31536000`)},[ed,n,eh,ec]);let ez=(0,a.useRef)(0),eU=(0,a.useRef)(0),eH=(0,a.useRef)(null),e_=(0,a.useRef)(null),eK=(0,a.useRef)(!1);(0,a.useEffect)(()=>{ez.current=er.length},[er.length]);let eq=(0,a.useCallback)(async(e,t,a)=>(await (0,M.W)(`query AgentRuns($kind: RunKind!, $search: String, $archive: String!, $provider: String, $origin: RunOrigin, $appId: ID, $agentId: ID, $after: ID, $first: Int!) {
56
+ `;e.s(["b",0,s,"T",0,i,"q",0,r,"N",0,a])},134779,e=>{var t=e.i(843476),a=e.i(271645),s=e.i(876561),r=e.i(397142),i=e.i(259911),n=e.i(456420);let l={name:"gallery-vertical-end",size:24,node:[["path",{d:"M7 2h10",key:"nczekb"}],["path",{d:"M5 6h14",key:"u2x4p"}],["rect",{width:"18",height:"12",x:"3",y:"10",rx:"2",key:"l0tzu3"}]]};l.node;let d=(0,n.f)(l);var o=e.i(21357),c=e.i(77071),u=e.i(566595),h=e.i(759659),m=e.i(837817),p=e.i(861745),f=e.i(948148),x=e.i(763267),g=e.i(513969),v=e.i(340953),j=e.i(356505),y=e.i(816484),w=e.i(373725),k=e.i(929592),N=e.i(487486),b=e.i(519455),A=e.i(515288),C=e.i(257428),E=e.i(776639),I=e.i(82612),S=e.i(793479),T=e.i(967489),P=e.i(987968),L=e.i(784774),R=e.i(746798),$=e.i(520133),D=e.i(637611),M=e.i(944887),O=e.i(445408),V=e.i(360583),z=e.i(767648),U=e.i(887126),H=e.i(37332);let _={archive:"ACTIVE",provider:"ALL",origin:"ALL"};var K=e.i(975157),q=e.i(171502),G=e.i(42629),B=e.i(633785),F=e.i(555291),W=e.i(11037),Y=e.i(266136);function X({label:e,children:a,onClick:s,disabled:r,destructive:i}){return(0,t.jsxs)(R.Tooltip,{children:[(0,t.jsx)(R.TooltipTrigger,{asChild:!0,children:(0,t.jsx)(b.K,{"aria-label":e,disabled:r,onClick:e=>{e.preventDefault(),e.stopPropagation(),s()},size:"icon-sm",variant:i?"destructive":"ghost",children:a})}),(0,t.jsx)(R.TooltipContent,{children:e})]})}e.s(["RunsPage",0,function({initialFilters:e=_,kind:n,appId:l}){let R=(0,f.f)("runs"),Z=(0,x.q)(),[J,Q]=(0,x.T)("PLAN"===n?"plans":"sessions",g.G),ee=Z.activeAgentId??(J===g.G?null:J),et=(0,W.f)(),ea=(0,p.X)(),es=(0,$.U)(),[er,ei]=(0,a.useState)([]),[en,el]=(0,a.useState)(""),[ed,eo]=(0,a.useState)(e.archive),[ec,eu]=(0,a.useState)(e.provider),[eh,em]=(0,a.useState)(e.origin),[ep,ef]=(0,a.useState)(!0),[ex,eg]=(0,a.useState)(!1),[ev,ej]=(0,a.useState)(null),[ey,ew]=(0,a.useState)(!1),[ek,eN]=(0,a.useState)(new Set),[eb,eA]=(0,a.useState)(ee);eb!==ee&&(eA(ee),eN(new Set));let[eC,eE]=(0,a.useState)([]),[eI,eS]=(0,a.useState)(null),[eT,eP]=(0,a.useState)(0),[eL,eR]=(0,a.useState)(null),[e$,eD]=(0,a.useState)(null),[eM,eO]=(0,a.useState)([]),eV=(0,a.useRef)(null);(0,a.useEffect)(()=>{var e;"u">typeof document&&(document.cookie=`ade_run_filters_${n.toLowerCase()}=${e={archive:ed,provider:ec,origin:eh},`${e.archive}.${e.provider}.${e.origin}`}; path=/; max-age=31536000`)},[ed,n,eh,ec]);let ez=(0,a.useRef)(0),eU=(0,a.useRef)(0),eH=(0,a.useRef)(null),e_=(0,a.useRef)(null),eK=(0,a.useRef)(!1);(0,a.useEffect)(()=>{ez.current=er.length},[er.length]);let eq=(0,a.useCallback)(async(e,t,a)=>(await (0,D.W)(`query AgentRuns($kind: RunKind!, $search: String, $archive: String!, $provider: String, $origin: RunOrigin, $appId: ID, $agentId: ID, $after: ID, $first: Int!) {
54
57
  agentRuns(kind: $kind, search: $search, archive: $archive, provider: $provider, origin: $origin, appId: $appId, agentId: $agentId, after: $after, first: $first) {
55
58
  items { ${G.N} } nextCursor totalCount
56
59
  }
57
- }`,{kind:n,agentId:ee,search:en.trim()||null,archive:ed,provider:"ALL"===ec?null:ec,origin:"ALL"===eh?null:eh,appId:l??null,after:e,first:t},{signal:a})).agentRuns,[ee,l,ed,n,eh,ec,en]),eG=(0,a.useCallback)(async()=>{await e_.current?.refresh()},[]),eB=(0,a.useCallback)(async()=>{if(!eS||eH.current||eK.current)return;let e=new AbortController;eH.current=e;let t=eU.current;eg(!0);try{let a=await eq(eS,200,e.signal);if(e.signal.aborted||t!==eU.current)return;ei(e=>{let t=new Set(e.map(({id:e})=>e));return[...e,...a.items.filter(({id:e})=>!t.has(e))]}),eI(a.nextCursor),eP(a.totalCount)}catch(t){e.signal.aborted||ej(t instanceof Error?t.message:String(t))}finally{eH.current===e&&(eH.current=null),e.signal.aborted||eg(!1)}},[eS,eq]);(0,a.useEffect)(()=>{if(!eS||ep||ex||ev)return;let e=eV.current;if(!e)return;let t=new IntersectionObserver(e=>{e.some(e=>e.isIntersecting)&&eB()},{rootMargin:"400px 0px"});return t.observe(e),()=>t.disconnect()},[ev,eB,ep,ex,eS]),(0,a.useEffect)(()=>{if(!Z.ready)return;ez.current=0;let e=(0,D.f)(async e=>{let t=++eU.current;eK.current=!0,eH.current?.abort(),eH.current=null,eg(!1);try{let a=await (0,O.f)((t,a)=>eq(t,a,e),Math.max(200,ez.current),200,e=>e.id);if(e.aborted||t!==eU.current)return;ei(a.items),eI(a.nextCursor),eP(a.totalCount),ej(null)}catch(t){e.aborted||ej(t instanceof Error?t.message:String(t))}finally{t===eU.current&&(eK.current=!1),e.aborted||ef(!1)}});e_.current=e;let t=window.setTimeout(()=>void e.refresh(),150),a=(0,M.p)().subscribe({query:`subscription RunsChanged($kind: RunKind!, $appId: ID, $provider: String, $origin: RunOrigin) {
60
+ }`,{kind:n,agentId:ee,search:en.trim()||null,archive:ed,provider:"ALL"===ec?null:ec,origin:"ALL"===eh?null:eh,appId:l??null,after:e,first:t},{signal:a})).agentRuns,[ee,l,ed,n,eh,ec,en]),eG=(0,a.useCallback)(async()=>{await e_.current?.refresh()},[]),eB=(0,a.useCallback)(async()=>{if(!eI||eH.current||eK.current)return;let e=new AbortController;eH.current=e;let t=eU.current;eg(!0);try{let a=await eq(eI,200,e.signal);if(e.signal.aborted||t!==eU.current)return;ei(e=>{let t=new Set(e.map(({id:e})=>e));return[...e,...a.items.filter(({id:e})=>!t.has(e))]}),eS(a.nextCursor),eP(a.totalCount)}catch(t){e.signal.aborted||ej(t instanceof Error?t.message:String(t))}finally{eH.current===e&&(eH.current=null),e.signal.aborted||eg(!1)}},[eI,eq]);(0,a.useEffect)(()=>{if(!eI||ep||ex||ev)return;let e=eV.current;if(!e)return;let t=new IntersectionObserver(e=>{e.some(e=>e.isIntersecting)&&eB()},{rootMargin:"400px 0px"});return t.observe(e),()=>t.disconnect()},[ev,eB,ep,ex,eI]),(0,a.useEffect)(()=>{if(!Z.ready)return;ez.current=0;let e=(0,M.f)(async e=>{let t=++eU.current;eK.current=!0,eH.current?.abort(),eH.current=null,eg(!1);try{let a=await (0,O.f)((t,a)=>eq(t,a,e),Math.max(200,ez.current),200,e=>e.id);if(e.aborted||t!==eU.current)return;ei(a.items),eS(a.nextCursor),eP(a.totalCount),ej(null)}catch(t){e.aborted||ej(t instanceof Error?t.message:String(t))}finally{t===eU.current&&(eK.current=!1),e.aborted||ef(!1)}});e_.current=e;let t=window.setTimeout(()=>void e.refresh(),150),a=(0,D.p)().subscribe({query:`subscription RunsChanged($kind: RunKind!, $appId: ID, $provider: String, $origin: RunOrigin) {
58
61
  agentRunListChanged(kind: $kind, appId: $appId, provider: $provider, origin: $origin)
59
- }`,variables:{kind:n,appId:l??null,provider:"ALL"===ec?null:ec,origin:"ALL"===eh?null:eh}},{next:()=>void e.refresh(),error:()=>void 0,complete:()=>void 0}),s=(0,M.g)(()=>void e.refresh());return()=>{window.clearTimeout(t),a(),s(),e.dispose(),eH.current?.abort(),eH.current=null,e_.current===e&&(e_.current=null)}},[l,Z.ready,n,eh,ec,eq]);let eF=(0,a.useMemo)(()=>{let e=[];for(let t of(0,U.C)(er)){let a=(0,U.R)(t.status),s=(0,V.x)(t.createdAt)??t.createdAt,r=a?"priority":s,i=e.at(-1);i?.key===r?i.items.push(t):e.push({key:r,value:t.createdAt,prioritized:a,items:[t]})}return e},[er]),eW=async(e,t)=>{try{await (0,M.W)(e,t),eN(new Set),ej(null),await eG()}catch(e){ej(e instanceof Error?e.message:String(e))}},eY=async()=>{e$&&(await eW("mutation PlayPlan($id: ID!, $mcpPresetIds: [ID!]!) { playPlan(planId: $id, mcpPresetIds: $mcpPresetIds) { id } }",{id:e$,mcpPresetIds:eD}),eM(null),eO([]))},eX=(e,t)=>eW("mutation ArchiveRuns($ids: [ID!]!, $archived: Boolean!) { archiveAgentRuns(ids: $ids, archived: $archived) }",{ids:e,archived:t}),eZ="PLAN"===n?L("plans"):L("sessions"),eJ="PLAN"===n?"/ai/plans":"/ai/sessions",eQ="SESSION"===n,e0=new Intl.NumberFormat(ea,{style:"currency",currency:"USD",maximumFractionDigits:2});return(0,t.jsxs)("section",{className:"flex w-full flex-col gap-6",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-start justify-between gap-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("h1",{className:"text-2xl font-semibold tracking-tight",children:eZ}),(0,t.jsx)("p",{className:"mt-1 text-sm text-muted-foreground",children:"PLAN"===n?L("plansDescription"):L("sessionsDescription")})]}),(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsxs)(b.K,{onClick:()=>ew(e=>!e),variant:"outline",children:[(0,t.jsx)(i.f,{})," ",ey?L("done"):L("edit")]}),(0,t.jsx)(b.K,{asChild:!0,children:(0,t.jsxs)($.L,{href:`/ai/drafts/new?kind=${n.toLowerCase()}${l?`&app=${encodeURIComponent(l)}`:""}`,children:[(0,t.jsx)(c.f,{})," ",L("newRun",{kind:"PLAN"===n?L("plan"):L("session")})]})})]})]}),(0,t.jsx)(A.N,{children:(0,t.jsxs)(A.O,{className:"space-y-4",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-start gap-2",children:[(0,t.jsxs)("div",{className:"relative w-full md:mr-auto md:w-auto md:min-w-56 md:flex-1",children:[(0,t.jsx)(u.f,{className:"pointer-events-none absolute top-2.5 left-3 size-4 text-muted-foreground"}),(0,t.jsx)(I.f,{"aria-label":L("search",{kind:eZ.toLowerCase()}),className:"pl-9",onChange:e=>el(e.target.value),placeholder:L("search",{kind:eZ.toLowerCase()}),value:en})]}),(0,t.jsx)(g.j,{onValueChange:Q,value:J}),(0,t.jsxs)(T.d,{onValueChange:e=>eo(e??"ACTIVE"),value:ed,children:[(0,t.jsx)(T.P,{"aria-label":L("archiveFilter"),children:(0,t.jsx)(T.U,{})}),(0,t.jsxs)(T.r,{children:[(0,t.jsx)(T.T,{value:"ACTIVE",children:L("active")}),(0,t.jsx)(T.T,{value:"ARCHIVED",children:L("archived")}),(0,t.jsx)(T.T,{value:"ALL",children:L("all")})]})]}),(0,t.jsxs)(T.d,{onValueChange:e=>eu(e??"ALL"),value:ec,children:[(0,t.jsx)(T.P,{"aria-label":L("provider"),children:(0,t.jsx)(T.U,{})}),(0,t.jsxs)(T.r,{children:[(0,t.jsxs)(T.T,{value:"ALL",children:[(0,t.jsx)(d,{}),L("allProviders")]}),(0,t.jsxs)(T.T,{value:"CODEX",children:[(0,t.jsx)(F.f,{provider:"CODEX"}),"Codex"]}),(0,t.jsxs)(T.T,{value:"CLAUDE",children:[(0,t.jsx)(F.f,{provider:"CLAUDE"}),"Claude"]}),(0,t.jsxs)(T.T,{value:"OPENCODE",children:[(0,t.jsx)(F.f,{provider:"OPENCODE"}),"OpenCode"]})]})]}),(0,t.jsxs)(T.d,{onValueChange:e=>em(e??"ALL"),value:eh,children:[(0,t.jsx)(T.P,{"aria-label":L("origin"),children:(0,t.jsx)(T.U,{})}),(0,t.jsxs)(T.r,{children:[(0,t.jsx)(T.T,{value:"ALL",children:L("allOrigins")}),(0,t.jsx)(T.T,{value:"MANAGED",children:L("managed")}),(0,t.jsx)(T.T,{value:"IMPORTED",children:L("imported")})]})]})]}),ey&&ek.size>0&&(0,t.jsxs)("div",{className:"flex flex-wrap gap-2 rounded-lg border bg-muted/30 p-3",children:[(0,t.jsx)("span",{className:"mr-auto text-sm text-muted-foreground",children:L("selected",{count:ek.size})}),(0,t.jsxs)(b.K,{onClick:()=>void eX([...ek],"ARCHIVED"!==ed),size:"sm",variant:"outline",children:["ARCHIVED"===ed?(0,t.jsx)(m.f,{}):(0,t.jsx)(s.f,{})," ","ARCHIVED"===ed?L("restore"):L("archive")]}),(0,t.jsxs)(b.K,{onClick:()=>eE([...ek]),size:"sm",variant:"destructive",children:[(0,t.jsx)(h.f,{})," ",L("delete")]})]}),ev&&(0,t.jsx)(k.J,{variant:"destructive",children:(0,t.jsx)(k.p,{children:ev})})]})}),ep?(0,t.jsxs)("p",{className:"flex items-center gap-2 text-muted-foreground",children:[(0,t.jsx)(P.f,{})," ",L("loading")]}):er.length?(0,t.jsx)(A.N,{className:"gap-0 overflow-hidden py-0",children:(0,t.jsxs)(R.s,{className:(0,K.f)("table-fixed",ey?"min-w-[67rem]":"min-w-[64rem]"),children:[(0,t.jsx)(R.E,{children:(0,t.jsxs)(R.N,{children:[ey&&(0,t.jsx)(R.V,{className:"w-10",children:(0,t.jsx)(w.f,{ids:er.map(({id:e})=>e),label:L("selectAll"),onChange:eN,selected:ek})}),(0,t.jsx)(R.V,{className:"w-[5%]",children:L("id")}),(0,t.jsx)(R.V,{className:eQ?"w-[11%]":"w-[12%]",children:L("status")}),(0,t.jsx)(R.V,{className:eQ?"w-[18%]":"w-[19%]",children:L("repoBranch")}),(0,t.jsx)(R.V,{className:"w-[10%]",children:L("ticket")}),eQ&&(0,t.jsx)(R.V,{className:"w-[5%]",children:L("plan")}),(0,t.jsx)(R.V,{className:eQ?"w-[21%]":"w-[22%]",children:L("prompt")}),(0,t.jsx)(R.V,{className:"w-[6%] text-right",children:L("cost")}),(0,t.jsx)(R.V,{className:"w-[15%]",children:L("modelEffort")}),(0,t.jsx)(R.V,{className:(0,K.f)("text-right",eQ?"w-[9%]":"w-[11%]"),children:L("actions")})]})}),(0,t.jsx)(R.z,{children:eF.map(e=>(0,t.jsxs)(a.Fragment,{children:[(0,t.jsxs)(R.N,{className:"bg-muted/20 hover:bg-muted/20",children:[ey&&(0,t.jsx)(R.d,{className:"py-1.5",children:(0,t.jsx)(w.f,{ids:e.items.map(({id:e})=>e),label:e.prioritized?L("selectAll"):L("selectDay",{day:(0,V.l)(e.value,"long",{locale:ea,showTime:!1})}),onChange:eN,selected:ek})}),(0,t.jsx)(R.d,{className:"py-1.5 text-xs font-normal text-muted-foreground",colSpan:8+ +!!eQ,children:e.prioritized?L("active"):(0,V.l)(e.value,"long",{locale:ea,showTime:!1})})]}),e.items.map(e=>{let a=e.worktree?.highlightColor?q.x[e.worktree.highlightColor]:void 0;return(0,t.jsxs)(R.N,{className:(0,K.f)("cursor-pointer",a),onClick:t=>{if((0,H.p)(t))if(ey){let t;t=e.id,eN(e=>{let a=new Set(e);return a.has(t)?a.delete(t):a.add(t),a})}else es.push(`${eJ}/${e.id}`)},children:[ey&&(0,t.jsx)(R.d,{children:(0,t.jsx)(C.f,{"aria-label":L("selectRun",{id:e.displayNumber}),checked:ek.has(e.id),onCheckedChange:t=>eN(a=>{let s=new Set(a);return t?s.add(e.id):s.delete(e.id),s})})}),(0,t.jsx)(R.d,{children:(0,t.jsxs)($.L,{className:(0,K.f)(H.E,"inline-block font-mono font-medium"),href:`${eJ}/${e.id}`,children:["#",e.displayNumber]})}),(0,t.jsx)(R.d,{children:(0,t.jsxs)("div",{className:"flex flex-wrap gap-1",children:[(0,t.jsx)(N.f,{variant:"FAILED"===e.status?"destructive":"COMPLETED"===e.status?"success":"secondary",children:et.status(e.status)}),e.phase!==e.status&&"IMPORTED_SYNCED"!==e.phase&&(0,t.jsx)(N.f,{variant:"outline",children:et.phase(e.phase)}),"IMPORTED"===e.origin&&(0,t.jsx)(N.f,{variant:"secondary",children:L("imported")}),"PLAN"===n&&e.playedAt&&(0,t.jsx)(N.f,{variant:"default",children:L("run")})]})}),(0,t.jsx)(R.d,{children:e.worktree?(0,t.jsxs)($.L,{className:(0,K.f)(H.E,"block min-w-0"),href:`/dashboard/worktrees/${e.worktree.id}`,title:e.worktree.folder,children:[(0,t.jsx)("span",{className:"block truncate",children:e.repositoryName}),(0,t.jsx)("span",{className:"block truncate font-mono text-xs text-muted-foreground",children:e.branch??"—"})]}):(0,t.jsxs)("div",{className:"min-w-0",children:[(0,t.jsx)("p",{className:"truncate",title:e.repositoryName,children:e.repositoryName}),(0,t.jsx)("p",{className:"truncate font-mono text-xs text-muted-foreground",title:e.branch??void 0,children:e.branch??"—"})]})}),(0,t.jsx)(R.d,{children:e.jiraIssueKey?(0,t.jsx)("button",{className:(0,K.f)(H.E,"max-w-full truncate"),onClick:()=>eL(e.jiraIssueKey),type:"button",children:e.jiraIssueKey}):"—"}),eQ&&(0,t.jsx)(R.d,{children:e.sourcePlan?(0,t.jsxs)($.L,{className:(0,K.f)(H.E,"inline-block font-mono"),href:`/ai/plans/${e.sourcePlan.id}`,children:["#",e.sourcePlan.displayNumber]}):null!==e.sourcePlanNumber?(0,t.jsxs)("span",{className:"font-mono",children:["#",e.sourcePlanNumber]}):"—"}),(0,t.jsx)(R.d,{className:"whitespace-normal",children:(0,t.jsx)($.L,{className:(0,K.f)(H.E,"line-clamp-2"),href:`${eJ}/${e.id}`,title:e.initialPrompt,children:e.initialPrompt})}),(0,t.jsx)(R.d,{className:"text-right",title:L("estimatedCost"),children:(e.estimatedCost??e.catalogCost)==null?"—":e0.format(e.estimatedCost??e.catalogCost)}),(0,t.jsxs)(R.d,{children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",title:`${e.model} \xb7 ${e.effort??"auto"}`,children:[(0,t.jsx)(F.f,{provider:e.provider}),(0,t.jsx)("span",{className:"min-w-0 truncate text-xs",children:(0,z.i)(e.model)}),(0,t.jsx)(B.f,{effort:e.effort})]}),(0,t.jsx)("div",{className:"text-xs text-muted-foreground",children:(0,t.jsx)(y.f,{kind:"time",relativeToday:!0,value:e.startedAt??e.createdAt})})]}),(0,t.jsx)(R.d,{children:(0,t.jsxs)("div",{className:"flex justify-end gap-1",children:["PLAN"===n&&(0,t.jsx)(X,{disabled:"COMPLETED"!==e.status||!!e.playedAt||!e.finalOutput,label:L("play"),onClick:()=>{eO([]),eM(e.id)},children:(0,t.jsx)(o.f,{})}),(0,t.jsx)(X,{label:e.archivedAt?L("restore"):L("archive"),onClick:()=>void eX([e.id],!e.archivedAt),children:e.archivedAt?(0,t.jsx)(m.f,{}):(0,t.jsx)(s.f,{})}),(0,t.jsx)(X,{destructive:!0,label:L("delete"),onClick:()=>eE([e.id]),children:(0,t.jsx)(h.f,{})})]})})]},e.id)})]},e.key))})]})}):(0,t.jsx)(S.e,{className:"border py-12",children:(0,t.jsxs)(S.c,{children:[(0,t.jsx)(S.B,{variant:"icon",children:(0,t.jsx)(r.f,{})}),(0,t.jsx)(S.p,{children:L("empty",{kind:eZ})}),(0,t.jsx)(S.Y,{children:L("emptyDescription")})]})}),er.length>0&&(0,t.jsxs)("div",{className:"flex flex-col items-center justify-center gap-3",children:[(0,t.jsx)("span",{className:"text-sm text-muted-foreground",children:L("showingCount",{count:er.length,total:eT})}),eS&&(0,t.jsx)("div",{className:"flex min-h-10 items-center justify-center gap-2 text-sm text-muted-foreground",ref:eV,role:"status",children:ex&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(P.f,{})," ",L("loadingMore")]})})]}),(0,t.jsx)(v.f,{actionLabel:L("delete"),cancelLabel:L("cancel"),description:L("deleteDescription"),onConfirm:()=>{eW("mutation DeleteRuns($ids: [ID!]!) { deleteAgentRuns(ids: $ids) }",{ids:eC})},onOpenChange:e=>{e||eE([])},open:eC.length>0,title:L("deleteTitle")}),(0,t.jsx)(E.N,{onOpenChange:e=>{e||(eM(null),eO([]))},open:!!e$,children:(0,t.jsxs)(E.d,{className:"sm:max-w-2xl",children:[(0,t.jsxs)(E.s,{children:[(0,t.jsx)(E.F,{children:L("playPlan")}),(0,t.jsx)(E.C,{children:L("playPlanDescription")})]}),(0,t.jsx)(Y.S,{kind:"SESSION",onChange:eO,selectedIds:eD}),(0,t.jsxs)(E.c,{children:[(0,t.jsx)(b.K,{onClick:()=>eM(null),variant:"outline",children:L("cancel")}),(0,t.jsxs)(b.K,{onClick:()=>void eY(),children:[(0,t.jsx)(o.f,{})," ",L("play")]})]})]})}),(0,t.jsx)(j.f,{issueKey:eR,onClose:()=>eL(null)})]})}],134779)},266136,e=>{var t=e.i(843476),a=e.i(948148),s=e.i(271645),r=e.i(687862),i=e.i(487486),n=e.i(257428),l=e.i(987968),d=e.i(637611),o=e.i(975157);let c="id name description iconKey enabledForPlans enabledForSessions toolNames tools { source name serverId serverName } createdAt updatedAt";async function u(e){return(await (0,d.W)(`query McpToolPresets($kind: RunKind) {
62
+ }`,variables:{kind:n,appId:l??null,provider:"ALL"===ec?null:ec,origin:"ALL"===eh?null:eh}},{next:()=>void e.refresh(),error:()=>void 0,complete:()=>void 0}),s=(0,D.g)(()=>void e.refresh());return()=>{window.clearTimeout(t),a(),s(),e.dispose(),eH.current?.abort(),eH.current=null,e_.current===e&&(e_.current=null)}},[l,Z.ready,n,eh,ec,eq]);let eF=(0,a.useMemo)(()=>{let e=[];for(let t of(0,U.C)(er)){let a=(0,U.R)(t.status),s=(0,V.x)(t.createdAt)??t.createdAt,r=a?"priority":s,i=e.at(-1);i?.key===r?i.items.push(t):e.push({key:r,value:t.createdAt,prioritized:a,items:[t]})}return e},[er]),eW=async(e,t)=>{try{await (0,D.W)(e,t),eN(new Set),ej(null),await eG()}catch(e){ej(e instanceof Error?e.message:String(e))}},eY=async()=>{e$&&(await eW("mutation PlayPlan($id: ID!, $mcpPresetIds: [ID!]!) { playPlan(planId: $id, mcpPresetIds: $mcpPresetIds) { id } }",{id:e$,mcpPresetIds:eM}),eD(null),eO([]))},eX=(e,t)=>eW("mutation ArchiveRuns($ids: [ID!]!, $archived: Boolean!) { archiveAgentRuns(ids: $ids, archived: $archived) }",{ids:e,archived:t}),eZ="PLAN"===n?R("plans"):R("sessions"),eJ="PLAN"===n?"/ai/plans":"/ai/sessions",eQ="SESSION"===n,e0=new Intl.NumberFormat(ea,{style:"currency",currency:"USD",maximumFractionDigits:2});return(0,t.jsxs)("section",{className:"flex w-full flex-col gap-6",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-start justify-between gap-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("h1",{className:"text-2xl font-semibold tracking-tight",children:eZ}),(0,t.jsx)("p",{className:"mt-1 text-sm text-muted-foreground",children:"PLAN"===n?R("plansDescription"):R("sessionsDescription")})]}),(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsxs)(b.K,{onClick:()=>ew(e=>!e),variant:"outline",children:[(0,t.jsx)(i.f,{})," ",ey?R("done"):R("edit")]}),(0,t.jsx)(b.K,{asChild:!0,children:(0,t.jsxs)($.L,{href:`/ai/drafts/new?kind=${n.toLowerCase()}${l?`&app=${encodeURIComponent(l)}`:""}`,children:[(0,t.jsx)(c.f,{})," ",R("newRun",{kind:"PLAN"===n?R("plan"):R("session")})]})})]})]}),(0,t.jsx)(A.N,{children:(0,t.jsxs)(A.O,{className:"space-y-4",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-start gap-2",children:[(0,t.jsxs)("div",{className:"relative w-full md:mr-auto md:w-auto md:min-w-56 md:flex-1",children:[(0,t.jsx)(u.f,{className:"pointer-events-none absolute top-2.5 left-3 size-4 text-muted-foreground"}),(0,t.jsx)(S.f,{"aria-label":R("search",{kind:eZ.toLowerCase()}),className:"pl-9",onChange:e=>el(e.target.value),placeholder:R("search",{kind:eZ.toLowerCase()}),value:en})]}),(0,t.jsx)(g.j,{onValueChange:Q,value:J}),(0,t.jsxs)(T.d,{onValueChange:e=>eo(e??"ACTIVE"),value:ed,children:[(0,t.jsx)(T.P,{"aria-label":R("archiveFilter"),children:(0,t.jsx)(T.U,{})}),(0,t.jsxs)(T.r,{children:[(0,t.jsx)(T.T,{value:"ACTIVE",children:R("active")}),(0,t.jsx)(T.T,{value:"ARCHIVED",children:R("archived")}),(0,t.jsx)(T.T,{value:"ALL",children:R("all")})]})]}),(0,t.jsxs)(T.d,{onValueChange:e=>eu(e??"ALL"),value:ec,children:[(0,t.jsx)(T.P,{"aria-label":R("provider"),children:(0,t.jsx)(T.U,{})}),(0,t.jsxs)(T.r,{children:[(0,t.jsxs)(T.T,{value:"ALL",children:[(0,t.jsx)(d,{}),R("allProviders")]}),(0,t.jsxs)(T.T,{value:"CODEX",children:[(0,t.jsx)(F.f,{provider:"CODEX"}),"Codex"]}),(0,t.jsxs)(T.T,{value:"CLAUDE",children:[(0,t.jsx)(F.f,{provider:"CLAUDE"}),"Claude"]}),(0,t.jsxs)(T.T,{value:"OPENCODE",children:[(0,t.jsx)(F.f,{provider:"OPENCODE"}),"OpenCode"]})]})]}),(0,t.jsxs)(T.d,{onValueChange:e=>em(e??"ALL"),value:eh,children:[(0,t.jsx)(T.P,{"aria-label":R("origin"),children:(0,t.jsx)(T.U,{})}),(0,t.jsxs)(T.r,{children:[(0,t.jsx)(T.T,{value:"ALL",children:R("allOrigins")}),(0,t.jsx)(T.T,{value:"MANAGED",children:R("managed")}),(0,t.jsx)(T.T,{value:"IMPORTED",children:R("imported")})]})]})]}),ey&&ek.size>0&&(0,t.jsxs)("div",{className:"flex flex-wrap gap-2 rounded-lg border bg-muted/30 p-3",children:[(0,t.jsx)("span",{className:"mr-auto text-sm text-muted-foreground",children:R("selected",{count:ek.size})}),(0,t.jsxs)(b.K,{onClick:()=>void eX([...ek],"ARCHIVED"!==ed),size:"sm",variant:"outline",children:["ARCHIVED"===ed?(0,t.jsx)(m.f,{}):(0,t.jsx)(s.f,{})," ","ARCHIVED"===ed?R("restore"):R("archive")]}),(0,t.jsxs)(b.K,{onClick:()=>eE([...ek]),size:"sm",variant:"destructive",children:[(0,t.jsx)(h.f,{})," ",R("delete")]})]}),ev&&(0,t.jsx)(k.J,{variant:"destructive",children:(0,t.jsx)(k.p,{children:ev})})]})}),ep?(0,t.jsxs)("p",{className:"flex items-center gap-2 text-muted-foreground",children:[(0,t.jsx)(P.f,{})," ",R("loading")]}):er.length?(0,t.jsx)(A.N,{className:"gap-0 overflow-hidden py-0",children:(0,t.jsxs)(L.s,{className:(0,K.f)("table-fixed",ey?"min-w-[67rem]":"min-w-[64rem]"),children:[(0,t.jsx)(L.E,{children:(0,t.jsxs)(L.N,{children:[ey&&(0,t.jsx)(L.V,{className:"w-10",children:(0,t.jsx)(w.f,{ids:er.map(({id:e})=>e),label:R("selectAll"),onChange:eN,selected:ek})}),(0,t.jsx)(L.V,{className:"w-[5%]",children:R("id")}),(0,t.jsx)(L.V,{className:eQ?"w-[11%]":"w-[12%]",children:R("status")}),(0,t.jsx)(L.V,{className:eQ?"w-[18%]":"w-[19%]",children:R("repoBranch")}),(0,t.jsx)(L.V,{className:"w-[10%]",children:R("ticket")}),eQ&&(0,t.jsx)(L.V,{className:"w-[5%]",children:R("plan")}),(0,t.jsx)(L.V,{className:eQ?"w-[21%]":"w-[22%]",children:R("prompt")}),(0,t.jsx)(L.V,{className:"w-[6%] text-right",children:R("cost")}),(0,t.jsx)(L.V,{className:"w-[15%]",children:R("modelEffort")}),(0,t.jsx)(L.V,{className:(0,K.f)("text-right",eQ?"w-[9%]":"w-[11%]"),children:R("actions")})]})}),(0,t.jsx)(L.z,{children:eF.map(e=>(0,t.jsxs)(a.Fragment,{children:[(0,t.jsxs)(L.N,{className:"bg-muted/20 hover:bg-muted/20",children:[ey&&(0,t.jsx)(L.d,{className:"py-1.5",children:(0,t.jsx)(w.f,{ids:e.items.map(({id:e})=>e),label:e.prioritized?R("selectAll"):R("selectDay",{day:(0,V.l)(e.value,"long",{locale:ea,showTime:!1})}),onChange:eN,selected:ek})}),(0,t.jsx)(L.d,{className:"py-1.5 text-xs font-normal text-muted-foreground",colSpan:8+ +!!eQ,children:e.prioritized?R("active"):(0,V.l)(e.value,"long",{locale:ea,showTime:!1})})]}),e.items.map(e=>{let a=e.worktree?.highlightColor?q.x[e.worktree.highlightColor]:void 0;return(0,t.jsxs)(L.N,{className:(0,K.f)("cursor-pointer",a),onClick:t=>{if((0,H.p)(t))if(ey){let t;t=e.id,eN(e=>{let a=new Set(e);return a.has(t)?a.delete(t):a.add(t),a})}else es.push(`${eJ}/${e.id}`)},children:[ey&&(0,t.jsx)(L.d,{children:(0,t.jsx)(C.f,{"aria-label":R("selectRun",{id:e.displayNumber}),checked:ek.has(e.id),onCheckedChange:t=>eN(a=>{let s=new Set(a);return t?s.add(e.id):s.delete(e.id),s})})}),(0,t.jsx)(L.d,{children:(0,t.jsxs)($.L,{className:(0,K.f)(H.E,"inline-block font-mono font-medium"),href:`${eJ}/${e.id}`,children:["#",e.displayNumber]})}),(0,t.jsx)(L.d,{children:(0,t.jsxs)("div",{className:"flex flex-wrap gap-1",children:[(0,t.jsx)(N.f,{variant:"FAILED"===e.status?"destructive":"COMPLETED"===e.status?"success":"secondary",children:et.status(e.status)}),e.phase!==e.status&&"IMPORTED_SYNCED"!==e.phase&&(0,t.jsx)(N.f,{variant:"outline",children:et.phase(e.phase)}),"IMPORTED"===e.origin&&(0,t.jsx)(N.f,{variant:"secondary",children:R("imported")}),"PLAN"===n&&e.playedAt&&(0,t.jsx)(N.f,{variant:"default",children:R("run")})]})}),(0,t.jsx)(L.d,{children:e.worktree?(0,t.jsxs)($.L,{className:(0,K.f)(H.E,"block min-w-0"),href:`/dashboard/worktrees/${e.worktree.id}`,title:e.worktree.folder,children:[(0,t.jsx)("span",{className:"block truncate",children:e.repositoryName}),(0,t.jsx)("span",{className:"block truncate font-mono text-xs text-muted-foreground",children:e.branch??"—"})]}):(0,t.jsxs)("div",{className:"min-w-0",children:[(0,t.jsx)("p",{className:"truncate",title:e.repositoryName,children:e.repositoryName}),(0,t.jsx)("p",{className:"truncate font-mono text-xs text-muted-foreground",title:e.branch??void 0,children:e.branch??"—"})]})}),(0,t.jsx)(L.d,{children:e.jiraIssueKey?(0,t.jsx)("button",{className:(0,K.f)(H.E,"max-w-full truncate"),onClick:()=>eR(e.jiraIssueKey),type:"button",children:e.jiraIssueKey}):"—"}),eQ&&(0,t.jsx)(L.d,{children:e.sourcePlan?(0,t.jsxs)($.L,{className:(0,K.f)(H.E,"inline-block font-mono"),href:`/ai/plans/${e.sourcePlan.id}`,children:["#",e.sourcePlan.displayNumber]}):null!==e.sourcePlanNumber?(0,t.jsxs)("span",{className:"font-mono",children:["#",e.sourcePlanNumber]}):"—"}),(0,t.jsx)(L.d,{className:"whitespace-normal",children:(0,t.jsx)($.L,{className:(0,K.f)(H.E,"line-clamp-2"),href:`${eJ}/${e.id}`,title:e.initialPrompt,children:e.initialPrompt})}),(0,t.jsx)(L.d,{className:"text-right",title:R("estimatedCost"),children:(e.estimatedCost??e.catalogCost)==null?"—":e0.format(e.estimatedCost??e.catalogCost)}),(0,t.jsxs)(L.d,{children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",title:`${e.model} \xb7 ${e.effort??"auto"}`,children:[(0,t.jsx)(F.f,{provider:e.provider}),(0,t.jsx)("span",{className:"min-w-0 truncate text-xs",children:(0,z.i)(e.model)}),(0,t.jsx)(B.f,{effort:e.effort})]}),(0,t.jsx)("div",{className:"text-xs text-muted-foreground",children:(0,t.jsx)(y.f,{kind:"time",relativeToday:!0,value:e.startedAt??e.createdAt})})]}),(0,t.jsx)(L.d,{children:(0,t.jsxs)("div",{className:"flex justify-end gap-1",children:["PLAN"===n&&(0,t.jsx)(X,{disabled:"COMPLETED"!==e.status||!!e.playedAt||!e.finalOutput,label:R("play"),onClick:()=>{eO([]),eD(e.id)},children:(0,t.jsx)(o.f,{})}),(0,t.jsx)(X,{label:e.archivedAt?R("restore"):R("archive"),onClick:()=>void eX([e.id],!e.archivedAt),children:e.archivedAt?(0,t.jsx)(m.f,{}):(0,t.jsx)(s.f,{})}),(0,t.jsx)(X,{destructive:!0,label:R("delete"),onClick:()=>eE([e.id]),children:(0,t.jsx)(h.f,{})})]})})]},e.id)})]},e.key))})]})}):(0,t.jsx)(I.e,{className:"border py-12",children:(0,t.jsxs)(I.c,{children:[(0,t.jsx)(I.B,{variant:"icon",children:(0,t.jsx)(r.f,{})}),(0,t.jsx)(I.p,{children:R("empty",{kind:eZ})}),(0,t.jsx)(I.Y,{children:R("emptyDescription")})]})}),er.length>0&&(0,t.jsxs)("div",{className:"flex flex-col items-center justify-center gap-3",children:[(0,t.jsx)("span",{className:"text-sm text-muted-foreground",children:R("showingCount",{count:er.length,total:eT})}),eI&&(0,t.jsx)("div",{className:"flex min-h-10 items-center justify-center gap-2 text-sm text-muted-foreground",ref:eV,role:"status",children:ex&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(P.f,{})," ",R("loadingMore")]})})]}),(0,t.jsx)(v.f,{actionLabel:R("delete"),cancelLabel:R("cancel"),description:R("deleteDescription"),onConfirm:()=>{eW("mutation DeleteRuns($ids: [ID!]!) { deleteAgentRuns(ids: $ids) }",{ids:eC})},onOpenChange:e=>{e||eE([])},open:eC.length>0,title:R("deleteTitle")}),(0,t.jsx)(E.N,{onOpenChange:e=>{e||(eD(null),eO([]))},open:!!e$,children:(0,t.jsxs)(E.d,{className:"sm:max-w-2xl",children:[(0,t.jsxs)(E.s,{children:[(0,t.jsx)(E.F,{children:R("playPlan")}),(0,t.jsx)(E.C,{children:R("playPlanDescription")})]}),(0,t.jsx)(Y.S,{kind:"SESSION",onChange:eO,selectedIds:eM}),(0,t.jsxs)(E.c,{children:[(0,t.jsx)(b.K,{onClick:()=>eD(null),variant:"outline",children:R("cancel")}),(0,t.jsxs)(b.K,{onClick:()=>void eY(),children:[(0,t.jsx)(o.f,{})," ",R("play")]})]})]})}),(0,t.jsx)(j.f,{issueKey:eL,onClose:()=>eR(null)})]})}],134779)},266136,e=>{var t=e.i(843476),a=e.i(948148),s=e.i(271645),r=e.i(687862),i=e.i(487486),n=e.i(257428),l=e.i(987968),d=e.i(637611),o=e.i(975157);let c="id name description iconKey enabledForPlans enabledForSessions toolNames tools { source name serverId serverName } createdAt updatedAt";async function u(e){return(await (0,d.W)(`query McpToolPresets($kind: RunKind) {
60
63
  mcpToolPresets(kind: $kind) { ${c} }
61
64
  }`,{kind:e??null})).mcpToolPresets??[]}e.s(["f",0,c,"S",0,function({kind:e,selectedIds:d,onChange:c,disabled:h=!1,showAvailability:m=null==e,className:p}){let f=(0,a.f)("mcpPresets"),[x,g]=(0,s.useState)([]),[v,j]=(0,s.useState)(!0),[y,w]=(0,s.useState)(null);if((0,s.useEffect)(()=>{let t=!1,a=window.setTimeout(()=>{j(!0),u(e).then(e=>{t||(g(e),w(null))}).catch(e=>{t||w(e instanceof Error?e.message:String(e))}).finally(()=>{t||j(!1)})},0);return()=>{t=!0,window.clearTimeout(a)}},[e]),v&&!x.length)return(0,t.jsxs)("p",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[(0,t.jsx)(l.f,{})," ",f("loading")]});if(y)return(0,t.jsx)("p",{className:"text-sm text-destructive",children:y});if(!x.length)return(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:f("noneAvailable")});let k=new Set(d);return(0,t.jsx)("div",{className:(0,o.f)("grid gap-2 md:grid-cols-2",p),children:x.map(e=>(0,t.jsxs)("label",{className:"flex cursor-pointer items-start gap-3 rounded-lg border p-3 has-disabled:cursor-not-allowed has-aria-checked:border-primary/50",children:[(0,t.jsx)(n.f,{checked:k.has(e.id),disabled:h,onCheckedChange:t=>c(t?[...d,e.id]:d.filter(t=>t!==e.id))}),(0,t.jsxs)("span",{className:"min-w-0 flex-1",children:[(0,t.jsxs)("span",{className:"flex items-center gap-2 font-medium",children:[(0,t.jsx)(r.f,{iconKey:e.iconKey}),(0,t.jsx)("span",{className:"truncate",children:e.name})]}),e.description&&(0,t.jsx)("span",{className:"mt-1 block text-xs text-muted-foreground",children:e.description}),m&&(0,t.jsxs)("span",{className:"mt-2 flex flex-wrap gap-1",children:[e.enabledForPlans&&(0,t.jsx)(i.f,{variant:"outline",children:f("plans")}),e.enabledForSessions&&(0,t.jsx)(i.f,{variant:"outline",children:f("sessions")}),!e.enabledForPlans&&!e.enabledForSessions&&(0,t.jsx)(i.f,{variant:"secondary",children:f("directOnly")})]})]})]},e.id))})},"h",0,u])},887126,e=>{let t=new Set(["QUEUED","RUNNING","BLOCKED","PAUSED","WAITING","IN_PROGRESS"]),a=e=>t.has(e.toUpperCase());e.s(["R",0,a,"C",0,function(e){let t=[],s=[];for(let r of e)(a(r.status)?t:s).push(r);return[...t,...s]}])}])})();