@tickernelz/wardmote-ui 2026.1117.2 → 2026.1117.3

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 (827) hide show
  1. package/dist/assets/AccessSelectIdentity-C-iVX_EX.js +1 -0
  2. package/dist/assets/AdapterManager-C59AKY0f.js +1 -0
  3. package/dist/assets/AdvancedToolsRoute-Bg4KowJU.js +39 -0
  4. package/dist/assets/AgentActionButtons-BBhJXLbY.js +1 -0
  5. package/dist/assets/AgentAvatar-BZiiDlCN.js +1 -0
  6. package/dist/assets/AgentBubbleActionRow-Dqrx638X.js +1 -0
  7. package/dist/assets/AgentCharacter-DAAMv7-c.js +2 -0
  8. package/dist/assets/AgentChat--rcr73Ls.js +1 -0
  9. package/dist/assets/AgentChats-56CMlXmb.js +1 -0
  10. package/dist/assets/AgentDefaults-C0WFwQky.js +1 -0
  11. package/dist/assets/AgentDetail-NfA1gamX.js +38 -0
  12. package/dist/assets/AgentIconPicker-BJerBmcL.js +1 -0
  13. package/dist/assets/AgentIdentity-DBHRFgMM.js +1 -0
  14. package/dist/assets/AgentMailCredentialField-DNclWIul.js +1 -0
  15. package/dist/assets/AgentMultiSelect-BlUaNdZZ.js +1 -0
  16. package/dist/assets/AgentRoleEditor-DnibPmmw.js +1 -0
  17. package/dist/assets/AgentSetupPrompt-CaafK5_w.js +30 -0
  18. package/dist/assets/AgentTodoCard-CGUyYht3.js +1 -0
  19. package/dist/assets/Agents-BjPLaL-p.js +3 -0
  20. package/dist/assets/AppDetail-CwyYWsvw.js +8 -0
  21. package/dist/assets/AppLogo-BLq8BpKi.js +1 -0
  22. package/dist/assets/AppNotConnected-DzDZR0-8.js +1 -0
  23. package/dist/assets/ApprovalCard-DyxP9tMM.js +1 -0
  24. package/dist/assets/ApprovalDetail-Cxhx_U0d.js +1 -0
  25. package/dist/assets/ApprovalPayload-C7jnoOLa.js +1 -0
  26. package/dist/assets/Approvals-CF4K0bD1.js +1 -0
  27. package/dist/assets/AppsConnect-D7l2xnv-.js +1 -0
  28. package/dist/assets/AppsReview-Chv6Jms5.js +1 -0
  29. package/dist/assets/ArtifactCard-CAlD_gkp.js +1 -0
  30. package/dist/assets/Artifacts-47GmGXVx.js +1 -0
  31. package/dist/assets/AssistantConnection-BCrEgmJR.js +1 -0
  32. package/dist/assets/AttentionInteractionResolver-DUg8FwhJ.js +1 -0
  33. package/dist/assets/AuditHub-DNmGrEzV.js +1 -0
  34. package/dist/assets/Auth-D0lGuVnd.js +3 -0
  35. package/dist/assets/BoardChat-BenJSqr6.js +18 -0
  36. package/dist/assets/BoardClaim-CbYY66Qd.js +1 -0
  37. package/dist/assets/BootstrapSetupUxLab-DO03bmwI.js +1 -0
  38. package/dist/assets/BreadcrumbContext-DNbB7zWn.js +1 -0
  39. package/dist/assets/Browse-gMVDtSCz.js +1 -0
  40. package/dist/assets/BudgetPolicyCard-CbkwslmQ.js +1 -0
  41. package/dist/assets/CaseDetail-k79_F25A.js +2 -0
  42. package/dist/assets/CaseIdentifierKey-CIGzqAfo.js +1 -0
  43. package/dist/assets/Cases-C5IE_YuB.js +2 -0
  44. package/dist/assets/ChatEndpointDetail-DPiCCvto.js +5 -0
  45. package/dist/assets/ChatEndpointSetup-CTntfzjg.js +1 -0
  46. package/dist/assets/ChatIdentityConfirm-Dc4AnYX8.js +1 -0
  47. package/dist/assets/ChoiceControls-CzMMk2Iy.js +1 -0
  48. package/dist/assets/CliAuth-CatEsBxW.js +1 -0
  49. package/dist/assets/CommentAttributionChip-BdllZVtJ.js +1 -0
  50. package/dist/assets/Companies-Cr0mZy2B.js +1 -0
  51. package/dist/assets/CompanyAccess-BQZD0MZf.js +1 -0
  52. package/dist/assets/CompanyActivity-BhNtXl8c.js +1 -0
  53. package/dist/assets/CompanyConnections-BwCkXXZK.js +1 -0
  54. package/dist/assets/CompanyContext-fQCNWI_f.js +1 -0
  55. package/dist/assets/CompanyEnvironments-CyrghjsN.js +3 -0
  56. package/dist/assets/CompanyExport-BlQuIvDU.js +4 -0
  57. package/dist/assets/CompanyImport-5M7yWHR-.js +1 -0
  58. package/dist/assets/CompanySettings-C6FNik3j.js +1 -0
  59. package/dist/assets/CompanySettingsPluginPage-DPHNF4sp.js +1 -0
  60. package/dist/assets/CompanySkills-DsgjKlp7.js +10 -0
  61. package/dist/assets/ComposerAddMenu-BPPkbm0o.js +3 -0
  62. package/dist/assets/ConfigureBuiltInAgentModal-reyr1Tds.js +1 -0
  63. package/dist/assets/ConnectionSetupFlow-g6asOGFg.js +40 -0
  64. package/dist/assets/CopyText-BbOm2I6t.js +1 -0
  65. package/dist/assets/CopyableGatewayUrl-B4EYBk9t.js +1 -0
  66. package/dist/assets/CrossIssueCollaborationUxLab-D2bB9GTl.js +1 -0
  67. package/dist/assets/Dashboard-B0JjQSAg.js +2 -0
  68. package/dist/assets/DecisionDateChips-BaRZkOU2.js +1 -0
  69. package/dist/assets/DecisionModelSettings-HEZJ0E6n.js +1 -0
  70. package/dist/assets/DecisionQueuePage-DtzH_oQI.js +1 -0
  71. package/dist/assets/DesignGuide-CXHLyL_C.js +23 -0
  72. package/dist/assets/DocumentFrameHeader-B8A6eaJb.js +1 -0
  73. package/dist/assets/EmailConnectionAccess-BcI7_br0.js +1 -0
  74. package/dist/assets/EmailEndpointSetup-hb_Hewoa.js +1 -0
  75. package/dist/assets/EnforcementBanner-qtVCLyJo.js +1 -0
  76. package/dist/assets/EntityRow-B24YmFE7.js +1 -0
  77. package/dist/assets/ExecutionWorkspaceDetail-BxA_kWKs.js +19 -0
  78. package/dist/assets/FilterBar-CIPYvHzR.js +1 -0
  79. package/dist/assets/FoldCurtain-H4DNjYLl.js +1 -0
  80. package/dist/assets/FolderControls-DI7QVvPv.js +1 -0
  81. package/dist/assets/GatewayDetail-CUcpw4Hj.js +2 -0
  82. package/dist/assets/GatewaysList-Ad1dZuwC.js +1 -0
  83. package/dist/assets/GoalDetail-C-uH9eNu.js +1 -0
  84. package/dist/assets/GoalTree-BZUt4xZ3.js +1 -0
  85. package/dist/assets/Goals-UrfBAjOT.js +1 -0
  86. package/dist/assets/Identity-8eG_HXAH.js +1 -0
  87. package/dist/assets/ImageGalleryModal-D3SH_FYj.js +1 -0
  88. package/dist/assets/Inbox-BzkFmAxU.js +2 -0
  89. package/dist/assets/InlineBanner-DYx7A02D.js +1 -0
  90. package/dist/assets/InlineEditor-BJTE1pyF.js +1 -0
  91. package/dist/assets/InlineEntitySelector-BboofK18.js +1 -0
  92. package/dist/assets/InstanceAccess-D4ZbGCeK.js +1 -0
  93. package/dist/assets/InstanceAdvanced-DYZ50o97.js +1 -0
  94. package/dist/assets/InstanceFeatures-C1eqcxDI.js +1 -0
  95. package/dist/assets/InviteLanding-Bqp1ulQV.js +1 -0
  96. package/dist/assets/IssueChatLongThreadPerf-BJ_Hr2PT.js +2 -0
  97. package/dist/assets/IssueChatThread-qDc-9yA9.js +40 -0
  98. package/dist/assets/IssueDetail-C0hCFL-i.js +9 -0
  99. package/dist/assets/IssueDocumentAnnotations-DjcRXcEw.js +2 -0
  100. package/dist/assets/IssueOutputSection-D7QbMiqq.js +1 -0
  101. package/dist/assets/IssueRecoveryActionCard-DeJbfGm1.js +1 -0
  102. package/dist/assets/IssueReferencePill-BTH42QmE.js +1 -0
  103. package/dist/assets/IssueThreadInteractionCard-D9QAYhuJ.js +9 -0
  104. package/dist/assets/IssueWriteDenialNotice-Bf0ZFSBV.js +1 -0
  105. package/dist/assets/Issues-DtYFX9i_.js +5 -0
  106. package/dist/assets/JoinRequestQueue-DyPP4DL2.js +1 -0
  107. package/dist/assets/JsonSchemaForm-Dkh3zdL9.js +1 -0
  108. package/dist/assets/LiveNowTodoLine-IsmhMx5O.js +1 -0
  109. package/dist/assets/ManagedAiConnectionDetails-BrX9Q9t2.js +1 -0
  110. package/dist/assets/MarkdownBody-D7qCQaU_.js +16 -0
  111. package/dist/assets/MarkdownEditor-ubJimjUH.js +85 -0
  112. package/dist/assets/McpConnect-BYYMfbhs.js +1 -0
  113. package/dist/assets/MembershipAction-Esk0pndF.js +1 -0
  114. package/dist/assets/MetricCard-DlcBTKQs.js +1 -0
  115. package/dist/assets/MissingPluginTabPlaceholder-l1R-Q4nh.js +1 -0
  116. package/dist/assets/ModelsAndProviders-C7VZHvPR.js +1 -0
  117. package/dist/assets/MootMark-BZOhYsK8.js +1 -0
  118. package/dist/assets/NewAgent-BzZI-FBE.js +1 -0
  119. package/dist/assets/OmpAllSettings-DTJLATQL.js +1 -0
  120. package/dist/assets/OpenwaGatewayManager-BQpxxJOa.js +2 -0
  121. package/dist/assets/PathInstructionsModal-BJAqF7vQ.js +1 -0
  122. package/dist/assets/PipelineSettings-BgfMR73P.js +2 -0
  123. package/dist/assets/Pipelines-DAuqtVqc.js +1 -0
  124. package/dist/assets/PixelsOffice-CaQYQilp.js +2 -0
  125. package/dist/assets/PluginManager-DkADWuR8.js +1 -0
  126. package/dist/assets/PluginPage-C-W3lTd9.js +1 -0
  127. package/dist/assets/PluginSettings-D365WG22.js +1 -0
  128. package/dist/assets/ProfileDetailRoute-YzeVN0Ko.js +1 -0
  129. package/dist/assets/ProfileSettings-BLh9EdSK.js +1 -0
  130. package/dist/assets/ProfileWizardRoute-DvOWuvrG.js +1 -0
  131. package/dist/assets/ProjectDetail-OirlXEA4.js +1 -0
  132. package/dist/assets/ProjectWorkspaceDetail-C9_liq4q.js +29 -0
  133. package/dist/assets/ProjectWorkspacesContent-DRAIVofy.js +1 -0
  134. package/dist/assets/Projects-B6UgAQ3Z.js +1 -0
  135. package/dist/assets/PublicIssueSharePage-Cg0GqSVM.js +1 -0
  136. package/dist/assets/QuestionForm-DF6R7lYE.js +7 -0
  137. package/dist/assets/QuotaBar-Ch_rM0X1.js +1 -0
  138. package/dist/assets/RepositoryEditor-BuV4JRgV.js +1 -0
  139. package/dist/assets/ResponsibleUserDenialNotice-dXyOLtYP.js +1 -0
  140. package/dist/assets/ResponsibleUserDenialUxLab-DGWo-GoD.js +1 -0
  141. package/dist/assets/ReviewQueueCard-MNEVuxSA.js +1 -0
  142. package/dist/assets/RichWorkProductCard-D4Qq1gRh.js +1 -0
  143. package/dist/assets/RoutineActivityRow-D16b-qFh.js +1 -0
  144. package/dist/assets/RoutineDetail-DPzql29w.js +2 -0
  145. package/dist/assets/RoutineRunVariablesDialog-C8OHcazq.js +1 -0
  146. package/dist/assets/RoutineVariablesEditor-CHogduM9.js +1 -0
  147. package/dist/assets/Routines-pnhQk9RN.js +1 -0
  148. package/dist/assets/ScrollToBottom-C_k4p-hC.js +1 -0
  149. package/dist/assets/Search-DjpKZIsB.js +1 -0
  150. package/dist/assets/SearchableSelect-BbuRtdzg.js +1 -0
  151. package/dist/assets/Secrets-BOZydXaY.js +4 -0
  152. package/dist/assets/SetupWizard-92wVRG6Y.js +1 -0
  153. package/dist/assets/SidebarContext-bEtg0ItG.js +1 -0
  154. package/dist/assets/SidebarNavItem-afEXEFeo.js +1 -0
  155. package/dist/assets/SkillBinaryFile-N7sK2ZTh.js +1 -0
  156. package/dist/assets/SkillCardIcon-Byzb3JuD.js +2 -0
  157. package/dist/assets/SkillSourceTree-Cuv3EWpo.js +2 -0
  158. package/dist/assets/SkillSources-CYYp9Mds.js +2 -0
  159. package/dist/assets/SkillStudio-Dl28fokd.js +9 -0
  160. package/dist/assets/SourceTrustBadge-BYpC1Kw9.js +1 -0
  161. package/dist/assets/StatusCards-Bqkb18QJ.js +1 -0
  162. package/dist/assets/StatusIcon-Bx4H7RuA.js +1 -0
  163. package/dist/assets/SummarySlotCard-DlwG6iRT.js +1 -0
  164. package/dist/assets/TaskChatComposerTakeoverContext-C68QVO36.js +1 -0
  165. package/dist/assets/TaskChatLab-vnFP7gcJ.js +11 -0
  166. package/dist/assets/TaskChatMarker-KUR-n-7D.js +2 -0
  167. package/dist/assets/TaskChatProtocolCard-CuyApwWM.js +1 -0
  168. package/dist/assets/TaskChatThreadView-B2LR9geW.js +4 -0
  169. package/dist/assets/TaskTreeControls-CRzAjVlt.js +3 -0
  170. package/dist/assets/Terminal-YAhWrMv9.js +1 -0
  171. package/dist/assets/TerminalView-7diHxQOx.js +58 -0
  172. package/dist/assets/ThemeContext-Ca30E6O4.js +1 -0
  173. package/dist/assets/ThemeToggle-BzQNYD1J.js +1 -0
  174. package/dist/assets/ToastContext-DyVJ6bCh.js +1 -0
  175. package/dist/assets/ToolsAdminGate-C5dQpL4C.js +1 -0
  176. package/dist/assets/TrustPresetSection-DCiCKRh0.js +1 -0
  177. package/dist/assets/UserProfile-CEpSKMzS.js +1 -0
  178. package/dist/assets/WebhookUrlWarning-CbkWHsPb.js +1 -0
  179. package/dist/assets/WhatNeedsMe-D0yh5L5H.js +1 -0
  180. package/dist/assets/WorkspaceRuntimeControls-Cp5E1FME.js +1 -0
  181. package/dist/assets/Workspaces-uDkUYVN3.js +1 -0
  182. package/dist/assets/access-DhB95qNC.js +1 -0
  183. package/dist/assets/activity-BwGRpduS.js +1 -0
  184. package/dist/assets/activity-CudcEDwO.js +1 -0
  185. package/dist/assets/activity-format-CYYHRbLo.js +1 -0
  186. package/dist/assets/adapter-display-registry-9qBBJi9B.js +1 -0
  187. package/dist/assets/adapters-D3NHXckp.js +1 -0
  188. package/dist/assets/agent-avatar-url-BSxCmIBZ.js +1 -0
  189. package/dist/assets/agent-config-primitives-BJlDiwaH.js +1 -0
  190. package/dist/assets/agentChats-C8o51WiF.js +1 -0
  191. package/dist/assets/agents-B8n-p0aX.js +1 -0
  192. package/dist/assets/alert-dialog-DNbnZgRz.js +1 -0
  193. package/dist/assets/app-connect-policy-DqQf5knn.js +1 -0
  194. package/dist/assets/archive-CvT6i844.js +1 -0
  195. package/dist/assets/archive-restore-tP0pyaei.js +1 -0
  196. package/dist/assets/arrow-down-C_oYEUXL.js +1 -0
  197. package/dist/assets/arrow-down-left-B8lHKNrs.js +1 -0
  198. package/dist/assets/arrow-left-CnGEiANj.js +1 -0
  199. package/dist/assets/arrow-right-W0iJ_-Zs.js +1 -0
  200. package/dist/assets/arrow-up-BMN1ZnS1.js +1 -0
  201. package/dist/assets/arrow-up-down-Ci6AcwB0.js +1 -0
  202. package/dist/assets/arrow-up-right-CFNgVoQj.js +1 -0
  203. package/dist/assets/artifacts-4t_LL-lA.js +1 -0
  204. package/dist/assets/assets-BOhIBphq.js +1 -0
  205. package/dist/assets/attachment-icon-_1iz_saB.js +1 -0
  206. package/dist/assets/avatar-qO_h93F8.js +1 -0
  207. package/dist/assets/badge-check-BNLpGDnd.js +1 -0
  208. package/dist/assets/badge-jeXr866I.js +1 -0
  209. package/dist/assets/book-open-i_DxEUXC.js +1 -0
  210. package/dist/assets/bot-kSfD9MPZ.js +1 -0
  211. package/dist/assets/boxes-DVB7wdRh.js +1 -0
  212. package/dist/assets/braces-CpXTT0w9.js +1 -0
  213. package/dist/assets/browser-use-BwBUHG71.js +1 -0
  214. package/dist/assets/budgets-C2LtVWph.js +1 -0
  215. package/dist/assets/button-DI4w5WP7.js +1 -0
  216. package/dist/assets/calendar-clock-CXtB0BA2.js +1 -0
  217. package/dist/assets/card-BVZvs7aX.js +1 -0
  218. package/dist/assets/cases-lkyebfpY.js +1 -0
  219. package/dist/assets/chatEndpoints-Bj-keCuw.js +1 -0
  220. package/dist/assets/check-Bis3vECb.js +1 -0
  221. package/dist/assets/checkbox-Cf2_HXDG.js +1 -0
  222. package/dist/assets/chevron-down-nRcQ7bok.js +1 -0
  223. package/dist/assets/chevron-left-DnUVccc_.js +1 -0
  224. package/dist/assets/chevron-right-BP8JjEC_.js +1 -0
  225. package/dist/assets/chevron-up-C1TOE3pP.js +1 -0
  226. package/dist/assets/chip-yHjfSD46.js +1 -0
  227. package/dist/assets/circle-DCDVf2v0.js +1 -0
  228. package/dist/assets/circle-alert-C7T1cdKm.js +1 -0
  229. package/dist/assets/circle-dot-EfQ00xK3.js +1 -0
  230. package/dist/assets/circle-question-mark-CasEGiDp.js +1 -0
  231. package/dist/assets/circle-slash-DP3-64k6.js +1 -0
  232. package/dist/assets/circle-x-oLE71NY3.js +1 -0
  233. package/dist/assets/clipboard-paste-B7AvxL_k.js +1 -0
  234. package/dist/assets/clock-D2UFngg7.js +1 -0
  235. package/dist/assets/cloud-DX1fkQ6i.js +1 -0
  236. package/dist/assets/code-xml-CZhhm_-P.js +1 -0
  237. package/dist/assets/coins-DeD2KB8A.js +1 -0
  238. package/dist/assets/collapsible-D_rwONtV.js +1 -0
  239. package/dist/assets/columns-3-CsveFAYd.js +1 -0
  240. package/dist/assets/command-BnJHDVFJ.js +5 -0
  241. package/dist/assets/companies-query-BEdFiAhG.js +1 -0
  242. package/dist/assets/connection-identity-ch7QDvun.js +1 -0
  243. package/dist/assets/connection-owner-rjoh3jce.js +1 -0
  244. package/dist/assets/copy-C1cfcpxY.js +1 -0
  245. package/dist/assets/createLucideIcon-CgrPXnTY.js +94 -0
  246. package/dist/assets/decision-models-DBtkxtYF.js +1 -0
  247. package/dist/assets/dialog-CeH7rDcv.js +1 -0
  248. package/dist/assets/dist--9cFpXne.js +1 -0
  249. package/dist/assets/dist-9zjsMxaY.js +1 -0
  250. package/dist/assets/dist-BJ09fDjD.js +1 -0
  251. package/dist/assets/dist-BdDa0b16.js +1 -0
  252. package/dist/assets/dist-Bn32UOVm.js +1 -0
  253. package/dist/assets/dist-C48HB-LT.js +1 -0
  254. package/dist/assets/dist-CEXsZ2vP.js +1 -0
  255. package/dist/assets/dist-Cfwg8Fpq.js +1 -0
  256. package/dist/assets/dist-DMGv3m4L.js +1 -0
  257. package/dist/assets/dist-DW0z82oc.js +1 -0
  258. package/dist/assets/dist-DYoIyA63.js +1 -0
  259. package/dist/assets/dist-JmBbJxI1.js +1 -0
  260. package/dist/assets/dist-Kk1Xaco5.js +1 -0
  261. package/dist/assets/dropdown-menu-rUbU8QKw.js +1 -0
  262. package/dist/assets/ellipsis-DyXbAp4P.js +1 -0
  263. package/dist/assets/ellipsis-vertical-DzWImTnI.js +1 -0
  264. package/dist/assets/email-hX48MODm.js +1 -0
  265. package/dist/assets/environment-variables-editor-D6Ylcd74.js +1 -0
  266. package/dist/assets/environments-xuhuvnTt.js +1 -0
  267. package/dist/assets/es2015-I559Yimy.js +41 -0
  268. package/dist/assets/external-link-BIcMNNSN.js +1 -0
  269. package/dist/assets/eye-D8HiVtuU.js +1 -0
  270. package/dist/assets/eye-off-DTXvEIMp.js +1 -0
  271. package/dist/assets/fast-responses-B5vx8axv.js +1 -0
  272. package/dist/assets/file-CcVMTQhg.js +1 -0
  273. package/dist/assets/file-code-corner-CwcL9g2p.js +1 -0
  274. package/dist/assets/file-question-mark-BCVjQ2mM.js +1 -0
  275. package/dist/assets/file-search-Ccb88q3t.js +1 -0
  276. package/dist/assets/file-text-CsPKrMTp.js +1 -0
  277. package/dist/assets/flag-i_D610oD.js +1 -0
  278. package/dist/assets/flask-conical-BxspRG7d.js +1 -0
  279. package/dist/assets/folder-git-2-igHQBSOf.js +1 -0
  280. package/dist/assets/folder-open-Dkshp3J4.js +1 -0
  281. package/dist/assets/folder-search-B_Hz17IO.js +1 -0
  282. package/dist/assets/funnel-BoiZeTWw.js +1 -0
  283. package/dist/assets/git-pull-request-DXoACxvx.js +1 -0
  284. package/dist/assets/github-icon-Cf0axVvi.js +1 -0
  285. package/dist/assets/health-Cn-5LIwb.js +1 -0
  286. package/dist/assets/heartbeats-D96c9g2n.js +1 -0
  287. package/dist/assets/inbox-BbL3s2C7.js +1 -0
  288. package/dist/assets/inboxArchiveCache-CxaLM1R8.js +1 -0
  289. package/dist/assets/index-BcwxLap4.js +67 -0
  290. package/dist/assets/index-BrXf-544.css +2 -0
  291. package/dist/assets/info-Clx4FKz9.js +1 -0
  292. package/dist/assets/input-BBNGmECW.js +1 -0
  293. package/dist/assets/instanceSettings-D1nNVWU0.js +1 -0
  294. package/dist/assets/interaction-audience-B74UGNaN.js +1 -0
  295. package/dist/assets/interaction-card-visibility-CUHRz7le.js +1 -0
  296. package/dist/assets/issue-blockers-t3wlvg4M.js +1 -0
  297. package/dist/assets/issue-output-BM-lLts2.js +1 -0
  298. package/dist/assets/issue-properties-D64PIhST.js +4 -0
  299. package/dist/assets/issue-share-W3K_cYZY.js +1 -0
  300. package/dist/assets/issue-workspace-selection-BY0sBaN6.js +1 -0
  301. package/dist/assets/key-round-CGxQxRtN.js +1 -0
  302. package/dist/assets/label-B707hSFt.js +1 -0
  303. package/dist/assets/layout-dashboard-CGcwI_3-.js +1 -0
  304. package/dist/assets/link-0uKX-OmT.js +1 -0
  305. package/dist/assets/link-2-Cn4f4xsG.js +1 -0
  306. package/dist/assets/list-filter-BjVYqW16.js +1 -0
  307. package/dist/assets/list-todo-DfkI9JDS.js +1 -0
  308. package/dist/assets/log-in-C4giPkVk.js +1 -0
  309. package/dist/assets/maximize-2-c8H5WcEB.js +1 -0
  310. package/dist/assets/mention-chips-COg-185l.js +17 -0
  311. package/dist/assets/message-square-plus-BQNp2QTu.js +1 -0
  312. package/dist/assets/minus-BttANimQ.js +1 -0
  313. package/dist/assets/model-fallback-CwykjJWn.js +1 -0
  314. package/dist/assets/model-picker-fields-D_I_l2UI.js +1 -0
  315. package/dist/assets/network-D_6qRf8m.js +1 -0
  316. package/dist/assets/octagon-alert-BGGMATMK.js +1 -0
  317. package/dist/assets/octagon-x-ZKE_ZOe_.js +1 -0
  318. package/dist/assets/omp-settings-model-B06pdqQR.js +1 -0
  319. package/dist/assets/package-G5arH6JJ.js +1 -0
  320. package/dist/assets/pause-B6AkvDer.js +1 -0
  321. package/dist/assets/pen-line-CKsWWDy2.js +1 -0
  322. package/dist/assets/pipeline-stage-presentation-DDdch-G7.js +2 -0
  323. package/dist/assets/pipelines-0Lb8D7gt.js +1 -0
  324. package/dist/assets/play-Czm7OCYh.js +1 -0
  325. package/dist/assets/plug-UFf0xCI3.js +1 -0
  326. package/dist/assets/plugins-C7Akvi81.js +1 -0
  327. package/dist/assets/plus-CwNlqadt.js +1 -0
  328. package/dist/assets/popover-CWlBonqy.js +1 -0
  329. package/dist/assets/power-CJfOYd7k.js +1 -0
  330. package/dist/assets/presentation-mode-ZjtUUsSS.js +1 -0
  331. package/dist/assets/profile-summary-BwdvqPGE.js +1 -0
  332. package/dist/assets/projects-l3kQxnTp.js +1 -0
  333. package/dist/assets/proposal-review-D9ye_2Px.js +1 -0
  334. package/dist/assets/queryClient-CojHFSot.js +1 -0
  335. package/dist/assets/queryKeys-BzT8CD34.js +1 -0
  336. package/dist/assets/radio-BqjASC1E.js +1 -0
  337. package/dist/assets/radio-card-DCobJXTD.js +1 -0
  338. package/dist/assets/recent-agent-chats-BUso0Smv.js +1 -0
  339. package/dist/assets/refresh-cw-CfzWP9se.js +1 -0
  340. package/dist/assets/repeat-DzPORJjX.js +1 -0
  341. package/dist/assets/resizable-panels-DkafPiQi.js +1 -0
  342. package/dist/assets/review-policy-B1PowuVV.js +1 -0
  343. package/dist/assets/rotate-ccw-DpzLJhXT.js +1 -0
  344. package/dist/assets/rotate-cw-D1cKBtZK.js +1 -0
  345. package/dist/assets/router-BKzUF9uf.js +1 -0
  346. package/dist/assets/routines-DteAuK7S.js +1 -0
  347. package/dist/assets/runRetryState-p_i4Mh7u.js +1 -0
  348. package/dist/assets/save-Blub8a14.js +1 -0
  349. package/dist/assets/schema-config-fields-B8ha5h4A.js +1 -0
  350. package/dist/assets/scroll-area-Ci3PubY2.js +1 -0
  351. package/dist/assets/scroll-text-DfBz82Kz.js +1 -0
  352. package/dist/assets/search-CgZSuGC8.js +1 -0
  353. package/dist/assets/secrets-D17QEm13.js +1 -0
  354. package/dist/assets/segmented-tuNVx49H.js +1 -0
  355. package/dist/assets/select-DNiRU1d9.js +1 -0
  356. package/dist/assets/send-DfQbMfo9.js +1 -0
  357. package/dist/assets/separator-6cvFqhvW.js +1 -0
  358. package/dist/assets/server-NjSlblAR.js +1 -0
  359. package/dist/assets/server-cog-cefxr54v.js +1 -0
  360. package/dist/assets/settings-DuRZr7gk.js +1 -0
  361. package/dist/assets/shared-BjSrBoPt.js +1 -0
  362. package/dist/assets/sheet-D5sUsyfT.js +1 -0
  363. package/dist/assets/shield-DC6LuDUy.js +1 -0
  364. package/dist/assets/shield-alert-BAXWoBTh.js +1 -0
  365. package/dist/assets/shield-check-RPyaLAc-.js +1 -0
  366. package/dist/assets/shield-question-mark-Dl8dxzUU.js +1 -0
  367. package/dist/assets/shield-x-DaFG-JUd.js +1 -0
  368. package/dist/assets/sidebarPreferences-CIMvMX-W.js +1 -0
  369. package/dist/assets/skeleton-BAAoD7cz.js +1 -0
  370. package/dist/assets/slots-DZ1hj5sG.js +49 -0
  371. package/dist/assets/smoke-lab-matrix-Cjauo09x.js +1 -0
  372. package/dist/assets/square-CDo6rOf8.js +1 -0
  373. package/dist/assets/star-eem0qj3E.js +15 -0
  374. package/dist/assets/sun-2LJX7Tad.js +1 -0
  375. package/dist/assets/system-notice-comment-DPCHQ4-Y.js +1 -0
  376. package/dist/assets/tabs-CjHzZxtD.js +1 -0
  377. package/dist/assets/task-chat-attachments-DNPQ-jOG.js +10 -0
  378. package/dist/assets/terminal-i6UlT3R6.js +1 -0
  379. package/dist/assets/textarea-CTx68BDs.js +1 -0
  380. package/dist/assets/thumbs-down-BVZskfHA.js +1 -0
  381. package/dist/assets/thumbs-up-Cqj30fzj.js +1 -0
  382. package/dist/assets/toggle-switch-Dj5GORxn.js +1 -0
  383. package/dist/assets/tools-MhVvhrz_.js +1 -0
  384. package/dist/assets/tooltip-CW50mEoC.js +1 -0
  385. package/dist/assets/transcript-adapter-C1RGcJFu.js +5 -0
  386. package/dist/assets/trash-QxFF084e.js +1 -0
  387. package/dist/assets/triangle-alert-CnHMpmva.js +1 -0
  388. package/dist/assets/upload-Dk7oXJof.js +1 -0
  389. package/dist/assets/use-adapter-capabilities-BNfGiTEP.js +1 -0
  390. package/dist/assets/use-copy-action-DFzauB4H.js +1 -0
  391. package/dist/assets/useAgentChatEnabled-DMbd4JDE.js +1 -0
  392. package/dist/assets/useAutosaveIndicator-D3owckCV.js +1 -0
  393. package/dist/assets/useHiddenSettings-D0HL2tkE.js +1 -0
  394. package/dist/assets/useInfiniteQuery-DTEIZ1gz.js +1 -0
  395. package/dist/assets/useInstanceFeatureSettings-1h06E3Mh.js +1 -0
  396. package/dist/assets/useManagedSandboxOnly-KE5BJrr7.js +1 -0
  397. package/dist/assets/useMobileEntityPickerViewportStyle-BG2vZMIz.js +1 -0
  398. package/dist/assets/usePrefersReducedMotion-BLkUT2m6.js +1 -0
  399. package/dist/assets/useProfilesData-Bs6IpD6I.js +1 -0
  400. package/dist/assets/useQueries-K6OPYBvC.js +1 -0
  401. package/dist/assets/useSecondTick-BRYNTPNI.js +1 -0
  402. package/dist/assets/useSharedPolling-CFeiZe2t.js +1 -0
  403. package/dist/assets/useSummaryDraftStream-DOcsGLEm.js +3 -0
  404. package/dist/assets/user-D5V640s5.js +1 -0
  405. package/dist/assets/user-check-DcbSRa0r.js +1 -0
  406. package/dist/assets/user-minus-DSZK8_9n.js +1 -0
  407. package/dist/assets/user-round-B87hENhM.js +1 -0
  408. package/dist/assets/user-x-CZ1ImNac.js +1 -0
  409. package/dist/assets/users-CEZ1U5q9.js +1 -0
  410. package/dist/assets/wand-sparkles-CONrztQy.js +1 -0
  411. package/dist/assets/webhook-nurKUWEn.js +1 -0
  412. package/dist/assets/x-6E1yeU3Q.js +1 -0
  413. package/dist/index.html +193 -193
  414. package/dist/sw.js +1 -1
  415. package/package.json +1 -1
  416. package/dist/assets/AccessSelectIdentity-DT_buzXu.js +0 -1
  417. package/dist/assets/AdapterManager-D60L5cdo.js +0 -1
  418. package/dist/assets/AdvancedToolsRoute-CTTIaGDV.js +0 -39
  419. package/dist/assets/AgentActionButtons-CSDLZSMZ.js +0 -1
  420. package/dist/assets/AgentAvatar-Dui4nRtK.js +0 -1
  421. package/dist/assets/AgentBubbleActionRow-DSmdb3Li.js +0 -1
  422. package/dist/assets/AgentCharacter-D8CErloh.js +0 -2
  423. package/dist/assets/AgentChat-D3dO5D25.js +0 -1
  424. package/dist/assets/AgentChats-BlMX0riv.js +0 -1
  425. package/dist/assets/AgentDefaults-BRMPOQ-f.js +0 -1
  426. package/dist/assets/AgentDetail-CWdw5kRB.js +0 -38
  427. package/dist/assets/AgentIconPicker-Dub7R1_d.js +0 -1
  428. package/dist/assets/AgentIdentity-DoJBo59l.js +0 -1
  429. package/dist/assets/AgentMailCredentialField-qDnOhzgT.js +0 -1
  430. package/dist/assets/AgentMultiSelect-CEZ1NuIU.js +0 -1
  431. package/dist/assets/AgentRoleEditor-yyBT_XYK.js +0 -1
  432. package/dist/assets/AgentSetupPrompt-B44EEYgo.js +0 -30
  433. package/dist/assets/AgentTodoCard-BHWOqSEn.js +0 -1
  434. package/dist/assets/Agents-0yi6xFaj.js +0 -3
  435. package/dist/assets/AppDetail-CqWalFA3.js +0 -8
  436. package/dist/assets/AppLogo-C6tetlB_.js +0 -1
  437. package/dist/assets/AppNotConnected-CzQcETOO.js +0 -1
  438. package/dist/assets/ApprovalCard-BIquGj06.js +0 -1
  439. package/dist/assets/ApprovalDetail-hUlU9KPS.js +0 -1
  440. package/dist/assets/ApprovalPayload-CZTySb8R.js +0 -1
  441. package/dist/assets/Approvals-DSt7iLh6.js +0 -1
  442. package/dist/assets/AppsConnect-C1ilHYgy.js +0 -1
  443. package/dist/assets/AppsReview-CdjVNMBY.js +0 -1
  444. package/dist/assets/ArtifactCard-CheT3r1Y.js +0 -1
  445. package/dist/assets/Artifacts-Cp_CLB8P.js +0 -1
  446. package/dist/assets/AssistantConnection-D7MGE_yN.js +0 -1
  447. package/dist/assets/AttentionInteractionResolver-BUB3AfZH.js +0 -1
  448. package/dist/assets/AuditHub-DiWa6PDF.js +0 -1
  449. package/dist/assets/Auth-7ZwKR47T.js +0 -3
  450. package/dist/assets/BoardChat-BtB-0sW_.js +0 -18
  451. package/dist/assets/BoardClaim-Dj03nG8V.js +0 -1
  452. package/dist/assets/BootstrapSetupUxLab-ARs-PdM-.js +0 -1
  453. package/dist/assets/BreadcrumbContext-B9JUzLr5.js +0 -1
  454. package/dist/assets/Browse-B5mbrNri.js +0 -1
  455. package/dist/assets/BudgetPolicyCard-D31Qlv4T.js +0 -1
  456. package/dist/assets/CaseDetail-kLu_fI6z.js +0 -2
  457. package/dist/assets/CaseIdentifierKey-BFHk8T39.js +0 -1
  458. package/dist/assets/Cases-B-LfED0v.js +0 -2
  459. package/dist/assets/ChatEndpointDetail-DMGq_bkC.js +0 -5
  460. package/dist/assets/ChatEndpointSetup-BIxcZyIt.js +0 -1
  461. package/dist/assets/ChatIdentityConfirm-vsNMn_wj.js +0 -1
  462. package/dist/assets/ChoiceControls-CLtKmk2I.js +0 -1
  463. package/dist/assets/CliAuth-BrGRdrjs.js +0 -1
  464. package/dist/assets/CommentAttributionChip-CnhotPjn.js +0 -1
  465. package/dist/assets/Companies-BMVhOFzV.js +0 -1
  466. package/dist/assets/CompanyAccess-BlUM6hbW.js +0 -1
  467. package/dist/assets/CompanyActivity-5OGh6LZ6.js +0 -1
  468. package/dist/assets/CompanyConnections-Q1zAAePy.js +0 -1
  469. package/dist/assets/CompanyContext-Cx4B566r.js +0 -1
  470. package/dist/assets/CompanyEnvironments-BW9JgMNj.js +0 -3
  471. package/dist/assets/CompanyExport-CDSYD5mi.js +0 -4
  472. package/dist/assets/CompanyImport-B7Y99lni.js +0 -1
  473. package/dist/assets/CompanySettings-EcYnaTrR.js +0 -1
  474. package/dist/assets/CompanySettingsPluginPage-D3Vts52M.js +0 -1
  475. package/dist/assets/CompanySkills-CJp4nZix.js +0 -10
  476. package/dist/assets/ComposerAddMenu-lqbjcizN.js +0 -3
  477. package/dist/assets/ConfigureBuiltInAgentModal-C5RpKaFX.js +0 -1
  478. package/dist/assets/ConnectionSetupFlow-BFexB8UB.js +0 -40
  479. package/dist/assets/CopyText-Z_7ZP24v.js +0 -1
  480. package/dist/assets/CopyableGatewayUrl-BAIPUo7r.js +0 -1
  481. package/dist/assets/CrossIssueCollaborationUxLab-BbToOV2g.js +0 -1
  482. package/dist/assets/Dashboard-B_807CNK.js +0 -2
  483. package/dist/assets/DecisionDateChips-CM9496e0.js +0 -1
  484. package/dist/assets/DecisionModelSettings-DyZC9rU1.js +0 -1
  485. package/dist/assets/DecisionQueuePage-BRbIttBU.js +0 -1
  486. package/dist/assets/DesignGuide-bh4XX4nv.js +0 -23
  487. package/dist/assets/DocumentFrameHeader-lPIe9r6i.js +0 -1
  488. package/dist/assets/EmailConnectionAccess-BfEW3sUV.js +0 -1
  489. package/dist/assets/EmailEndpointSetup-BOhC9uiR.js +0 -1
  490. package/dist/assets/EnforcementBanner-CvthijpR.js +0 -1
  491. package/dist/assets/EntityRow-DbXjGhVW.js +0 -1
  492. package/dist/assets/ExecutionWorkspaceDetail-D4v1WZZf.js +0 -19
  493. package/dist/assets/FilterBar-CDIOkdDy.js +0 -1
  494. package/dist/assets/FoldCurtain-SSKlbSjO.js +0 -1
  495. package/dist/assets/FolderControls-Bhry3Vd2.js +0 -1
  496. package/dist/assets/GatewayDetail-BzSIBC84.js +0 -2
  497. package/dist/assets/GatewaysList-CZP6UIqo.js +0 -1
  498. package/dist/assets/GoalDetail-Ct08uwQw.js +0 -1
  499. package/dist/assets/GoalTree-DxU1Hv7E.js +0 -1
  500. package/dist/assets/Goals-BT9hCHnP.js +0 -1
  501. package/dist/assets/Identity-Jt9hiBbb.js +0 -1
  502. package/dist/assets/ImageGalleryModal-tTRmXGM4.js +0 -1
  503. package/dist/assets/Inbox-6vKVEJVu.js +0 -2
  504. package/dist/assets/InlineBanner-BWitMSzj.js +0 -1
  505. package/dist/assets/InlineEditor-DJB_QvGc.js +0 -1
  506. package/dist/assets/InlineEntitySelector-h-mVM8ny.js +0 -1
  507. package/dist/assets/InstanceAccess-CWtKVMDd.js +0 -1
  508. package/dist/assets/InstanceAdvanced-Bb4mtcMA.js +0 -1
  509. package/dist/assets/InstanceFeatures-CkqItnLP.js +0 -1
  510. package/dist/assets/InviteLanding-BnL6CX0t.js +0 -1
  511. package/dist/assets/IssueChatLongThreadPerf-VX9bG-bM.js +0 -2
  512. package/dist/assets/IssueChatThread-RwT_ZjCz.js +0 -40
  513. package/dist/assets/IssueDetail-DuaqjKFa.js +0 -9
  514. package/dist/assets/IssueDocumentAnnotations-CwAOcRXe.js +0 -2
  515. package/dist/assets/IssueOutputSection-CWIabX5_.js +0 -1
  516. package/dist/assets/IssueRecoveryActionCard-BH_n5kJ0.js +0 -1
  517. package/dist/assets/IssueReferencePill-Bx19xBTT.js +0 -1
  518. package/dist/assets/IssueThreadInteractionCard-CwQx5QmL.js +0 -9
  519. package/dist/assets/IssueWriteDenialNotice-DntH-qXu.js +0 -1
  520. package/dist/assets/Issues-Cn7D_2T3.js +0 -5
  521. package/dist/assets/JoinRequestQueue-DDbAcL7h.js +0 -1
  522. package/dist/assets/JsonSchemaForm-CukFZxO5.js +0 -1
  523. package/dist/assets/LiveNowTodoLine-CeGqy3iK.js +0 -1
  524. package/dist/assets/ManagedAiConnectionDetails-GCRA__HT.js +0 -1
  525. package/dist/assets/MarkdownBody-Dtjq3Ln7.js +0 -16
  526. package/dist/assets/MarkdownEditor-GCKumUHH.js +0 -85
  527. package/dist/assets/McpConnect-Cv3wvage.js +0 -1
  528. package/dist/assets/MembershipAction-B1Rkn6Ya.js +0 -1
  529. package/dist/assets/MetricCard-CWsDw6PQ.js +0 -1
  530. package/dist/assets/MissingPluginTabPlaceholder-BBTNbYkG.js +0 -1
  531. package/dist/assets/ModelsAndProviders-DhjeUdj-.js +0 -1
  532. package/dist/assets/MootMark-Djv4Cqoj.js +0 -1
  533. package/dist/assets/NewAgent-BTrIjdLI.js +0 -1
  534. package/dist/assets/OmpAllSettings-D7HFc1wr.js +0 -1
  535. package/dist/assets/OpenwaGatewayManager-CZ-1AWGM.js +0 -2
  536. package/dist/assets/PathInstructionsModal-Ch_Y_h-W.js +0 -1
  537. package/dist/assets/PipelineSettings-CEOXJLey.js +0 -2
  538. package/dist/assets/Pipelines-Dqr4RIMe.js +0 -1
  539. package/dist/assets/PixelsOffice-Dc-hTwL6.js +0 -2
  540. package/dist/assets/PluginManager-BHDvd2Kk.js +0 -1
  541. package/dist/assets/PluginPage-DGJsTGb4.js +0 -1
  542. package/dist/assets/PluginSettings-DSb7ReBz.js +0 -1
  543. package/dist/assets/ProfileDetailRoute-DWOiwLnB.js +0 -1
  544. package/dist/assets/ProfileSettings-BDPwbFPA.js +0 -1
  545. package/dist/assets/ProfileWizardRoute-CyY9cBXn.js +0 -1
  546. package/dist/assets/ProjectDetail-tbNc2eqO.js +0 -1
  547. package/dist/assets/ProjectWorkspaceDetail-CE3uadEz.js +0 -29
  548. package/dist/assets/ProjectWorkspacesContent-C-UY0h-1.js +0 -1
  549. package/dist/assets/Projects-IJU6fKzh.js +0 -1
  550. package/dist/assets/PublicIssueSharePage-D2-mjx5c.js +0 -1
  551. package/dist/assets/QuestionForm-CNI1aaPv.js +0 -7
  552. package/dist/assets/QuotaBar-BHpsGZ_M.js +0 -1
  553. package/dist/assets/RepositoryEditor-sn0h55E-.js +0 -1
  554. package/dist/assets/ResponsibleUserDenialNotice-O-ehIhIk.js +0 -1
  555. package/dist/assets/ResponsibleUserDenialUxLab-CwOtm-H_.js +0 -1
  556. package/dist/assets/ReviewQueueCard-DK0sDiGs.js +0 -1
  557. package/dist/assets/RichWorkProductCard-ButSFwSp.js +0 -1
  558. package/dist/assets/RoutineActivityRow-C0vIpaP_.js +0 -1
  559. package/dist/assets/RoutineDetail-CWWdWsrO.js +0 -2
  560. package/dist/assets/RoutineRunVariablesDialog-CRGon2Hg.js +0 -1
  561. package/dist/assets/RoutineVariablesEditor-C_rNpv3C.js +0 -1
  562. package/dist/assets/Routines-GiNr76nw.js +0 -1
  563. package/dist/assets/ScrollToBottom-BYgXnYon.js +0 -1
  564. package/dist/assets/Search-SUbPfqq4.js +0 -1
  565. package/dist/assets/SearchableSelect-Dl3Lshyy.js +0 -1
  566. package/dist/assets/Secrets--ch95iPv.js +0 -4
  567. package/dist/assets/SetupWizard-BhEuzmUv.js +0 -1
  568. package/dist/assets/SidebarContext-BHJMHrvt.js +0 -1
  569. package/dist/assets/SidebarNavItem-Dr2h0yiK.js +0 -1
  570. package/dist/assets/SkillBinaryFile-Datjq2Oi.js +0 -1
  571. package/dist/assets/SkillCardIcon-C430BaPr.js +0 -2
  572. package/dist/assets/SkillSourceTree-CR0E52D2.js +0 -2
  573. package/dist/assets/SkillSources-DeBOYCiw.js +0 -2
  574. package/dist/assets/SkillStudio-C3XaNFS3.js +0 -9
  575. package/dist/assets/SourceTrustBadge-D9HGGRtv.js +0 -1
  576. package/dist/assets/StatusCards-D2X-8hFz.js +0 -1
  577. package/dist/assets/StatusIcon-Byea8cPq.js +0 -1
  578. package/dist/assets/SummarySlotCard-CxnwG1r2.js +0 -1
  579. package/dist/assets/TaskChatComposerTakeoverContext-DCrczoPx.js +0 -1
  580. package/dist/assets/TaskChatLab-BvlnYRNe.js +0 -11
  581. package/dist/assets/TaskChatMarker-2V0Oo3xV.js +0 -2
  582. package/dist/assets/TaskChatProtocolCard-CgwNmmaw.js +0 -1
  583. package/dist/assets/TaskChatThreadView-BSU2dzE7.js +0 -4
  584. package/dist/assets/TaskTreeControls-DaAFj1E9.js +0 -3
  585. package/dist/assets/Terminal-Byg7O1p2.js +0 -1
  586. package/dist/assets/TerminalView-CsrRCoNX.js +0 -58
  587. package/dist/assets/ThemeContext-Bj-WoVL8.js +0 -1
  588. package/dist/assets/ThemeToggle-_Eipcr9P.js +0 -1
  589. package/dist/assets/ToastContext-BCfjPRi1.js +0 -1
  590. package/dist/assets/ToolsAdminGate-B6k3SrGU.js +0 -1
  591. package/dist/assets/TrustPresetSection-DSCmQxlJ.js +0 -1
  592. package/dist/assets/UserProfile-BYBUYHyM.js +0 -1
  593. package/dist/assets/WebhookUrlWarning-DeNhQ5SI.js +0 -1
  594. package/dist/assets/WhatNeedsMe-I9wfO12c.js +0 -1
  595. package/dist/assets/WorkspaceRuntimeControls-ByOvZ2To.js +0 -1
  596. package/dist/assets/Workspaces-Db99D3YB.js +0 -1
  597. package/dist/assets/access-BqSI2EWX.js +0 -1
  598. package/dist/assets/activity-CV1ib_N4.js +0 -1
  599. package/dist/assets/activity-DjXPM70-.js +0 -1
  600. package/dist/assets/activity-format-z4x2U1UL.js +0 -1
  601. package/dist/assets/adapter-display-registry-BwL8TUEJ.js +0 -1
  602. package/dist/assets/adapters-BDzUkPiY.js +0 -1
  603. package/dist/assets/agent-avatar-url-D6FtNk3V.js +0 -1
  604. package/dist/assets/agent-config-primitives-BpUNyayv.js +0 -1
  605. package/dist/assets/agentChats-B3DxYJ0s.js +0 -1
  606. package/dist/assets/agents-PFXnjEjH.js +0 -1
  607. package/dist/assets/alert-dialog-Bu032Tf4.js +0 -1
  608. package/dist/assets/app-connect-policy-C0ySFS-g.js +0 -1
  609. package/dist/assets/archive-BHg7Yq0H.js +0 -1
  610. package/dist/assets/archive-restore-BtX-2MA_.js +0 -1
  611. package/dist/assets/arrow-down-CDBD_UhE.js +0 -1
  612. package/dist/assets/arrow-down-left-tUS9EGQ5.js +0 -1
  613. package/dist/assets/arrow-left-CRfeAefI.js +0 -1
  614. package/dist/assets/arrow-right-898_TY3T.js +0 -1
  615. package/dist/assets/arrow-up-down-CIDQ-7ap.js +0 -1
  616. package/dist/assets/arrow-up-lSEksryM.js +0 -1
  617. package/dist/assets/arrow-up-right-CiL52_C-.js +0 -1
  618. package/dist/assets/artifacts-BmsoVCdJ.js +0 -1
  619. package/dist/assets/assets-lhKNSpON.js +0 -1
  620. package/dist/assets/attachment-icon-g4YAkuZ8.js +0 -1
  621. package/dist/assets/avatar-C4Ssxg9Y.js +0 -1
  622. package/dist/assets/badge-Dvh7HNMN.js +0 -1
  623. package/dist/assets/badge-check-B-GkuMC-.js +0 -1
  624. package/dist/assets/book-open-Ccq-Ea-W.js +0 -1
  625. package/dist/assets/bot-CPZa9Nhm.js +0 -1
  626. package/dist/assets/boxes-PkWx_5hs.js +0 -1
  627. package/dist/assets/braces-DovVxLjW.js +0 -1
  628. package/dist/assets/browser-use-DzHGNDA8.js +0 -1
  629. package/dist/assets/budgets-BieJJ3WD.js +0 -1
  630. package/dist/assets/button-CB8r2Tmh.js +0 -1
  631. package/dist/assets/calendar-clock-CeIy5aD9.js +0 -1
  632. package/dist/assets/card-DANCDyBy.js +0 -1
  633. package/dist/assets/cases-DiL3ys5G.js +0 -1
  634. package/dist/assets/chatEndpoints-BR_dsxeU.js +0 -1
  635. package/dist/assets/check-ByoSzjU8.js +0 -1
  636. package/dist/assets/checkbox-D9x1Kpmi.js +0 -1
  637. package/dist/assets/chevron-down-BY8r8lEv.js +0 -1
  638. package/dist/assets/chevron-left-Bh6cfiU3.js +0 -1
  639. package/dist/assets/chevron-right-B9tyGqmZ.js +0 -1
  640. package/dist/assets/chevron-up-Y_THiwqt.js +0 -1
  641. package/dist/assets/chip-CPztosQ8.js +0 -1
  642. package/dist/assets/circle-Dov4MVoe.js +0 -1
  643. package/dist/assets/circle-alert-Dw0yL22E.js +0 -1
  644. package/dist/assets/circle-dot-W_Fv5sI-.js +0 -1
  645. package/dist/assets/circle-question-mark-Bs7m2809.js +0 -1
  646. package/dist/assets/circle-slash-BrrkGL_C.js +0 -1
  647. package/dist/assets/circle-x-haVgjs_m.js +0 -1
  648. package/dist/assets/clipboard-paste-CbrlOJuv.js +0 -1
  649. package/dist/assets/clock-DynbfDi4.js +0 -1
  650. package/dist/assets/cloud-BL3mJ3Zk.js +0 -1
  651. package/dist/assets/code-xml-DnMtzyzg.js +0 -1
  652. package/dist/assets/coins-op-yocyK.js +0 -1
  653. package/dist/assets/collapsible-CK4bkaKD.js +0 -1
  654. package/dist/assets/columns-3-h7a-cGgB.js +0 -1
  655. package/dist/assets/command-DnT_Dqx6.js +0 -5
  656. package/dist/assets/companies-query-CEvXdXle.js +0 -1
  657. package/dist/assets/connection-identity-BFnwnJ1m.js +0 -1
  658. package/dist/assets/connection-owner-a9FWzn0p.js +0 -1
  659. package/dist/assets/copy-BzAUsLd3.js +0 -1
  660. package/dist/assets/createLucideIcon-DpXjCQRS.js +0 -94
  661. package/dist/assets/decision-models-BJo87qdY.js +0 -1
  662. package/dist/assets/dialog-Bj8Y6BBR.js +0 -1
  663. package/dist/assets/dist-3Dez14jq.js +0 -1
  664. package/dist/assets/dist-B0zvydXD.js +0 -1
  665. package/dist/assets/dist-BHjJYMl9.js +0 -1
  666. package/dist/assets/dist-BdR2FnFe.js +0 -1
  667. package/dist/assets/dist-BmMF5JdA.js +0 -1
  668. package/dist/assets/dist-BvZdGtYE.js +0 -1
  669. package/dist/assets/dist-CL5YXBl1.js +0 -1
  670. package/dist/assets/dist-C_1hhiPG.js +0 -1
  671. package/dist/assets/dist-CvnnLM1v.js +0 -1
  672. package/dist/assets/dist-DGPm9z2w.js +0 -1
  673. package/dist/assets/dist-DIKPg1Zq.js +0 -1
  674. package/dist/assets/dist-hTXDV8BS.js +0 -1
  675. package/dist/assets/dist-qP8xhvXd.js +0 -1
  676. package/dist/assets/dropdown-menu-COuwCVD4.js +0 -1
  677. package/dist/assets/ellipsis-ClhaIBYZ.js +0 -1
  678. package/dist/assets/ellipsis-vertical-BLqWWVnI.js +0 -1
  679. package/dist/assets/email-X-ZvOMfe.js +0 -1
  680. package/dist/assets/environment-variables-editor-DuAdYQbc.js +0 -1
  681. package/dist/assets/environments-C7Tx6OHp.js +0 -1
  682. package/dist/assets/es2015-D1VPo3R2.js +0 -41
  683. package/dist/assets/external-link--KkXYRPz.js +0 -1
  684. package/dist/assets/eye-kZn_xPie.js +0 -1
  685. package/dist/assets/eye-off-CIggBtC5.js +0 -1
  686. package/dist/assets/fast-responses-BxWwvpML.js +0 -1
  687. package/dist/assets/file-DpimbHnE.js +0 -1
  688. package/dist/assets/file-code-corner-CTt6xXKc.js +0 -1
  689. package/dist/assets/file-question-mark-BdUx7roP.js +0 -1
  690. package/dist/assets/file-search-DKDwHcZ2.js +0 -1
  691. package/dist/assets/file-text-Dpnp6o-I.js +0 -1
  692. package/dist/assets/flag-DL-0fBPJ.js +0 -1
  693. package/dist/assets/flask-conical-qqfS8te7.js +0 -1
  694. package/dist/assets/folder-git-2-D8yyJVTc.js +0 -1
  695. package/dist/assets/folder-open-fbJID1cC.js +0 -1
  696. package/dist/assets/folder-search-D89U3Z-T.js +0 -1
  697. package/dist/assets/funnel-B2ism2sD.js +0 -1
  698. package/dist/assets/git-pull-request-DQkSlyfL.js +0 -1
  699. package/dist/assets/github-icon-CbU9rpKT.js +0 -1
  700. package/dist/assets/health-CHjyy9Zt.js +0 -1
  701. package/dist/assets/heartbeats-Cy4hqsrt.js +0 -1
  702. package/dist/assets/inbox-WZDW93BL.js +0 -1
  703. package/dist/assets/inboxArchiveCache-CoY_V35O.js +0 -1
  704. package/dist/assets/index-B6ALXjXD.js +0 -67
  705. package/dist/assets/index-gXKvahZk.css +0 -2
  706. package/dist/assets/info-BqXpbzV2.js +0 -1
  707. package/dist/assets/input-tD3qR9Gq.js +0 -1
  708. package/dist/assets/instanceSettings-DIXpSGRh.js +0 -1
  709. package/dist/assets/interaction-audience-CXUDNI1a.js +0 -1
  710. package/dist/assets/interaction-card-visibility-DTtQkm6u.js +0 -1
  711. package/dist/assets/issue-blockers-KTmO2cng.js +0 -1
  712. package/dist/assets/issue-output-BzlPk1Fq.js +0 -1
  713. package/dist/assets/issue-properties-CmEBhjZa.js +0 -4
  714. package/dist/assets/issue-share-0nHxp5nx.js +0 -1
  715. package/dist/assets/issue-workspace-selection-DxIMVIPY.js +0 -1
  716. package/dist/assets/key-round-Bzc86YKh.js +0 -1
  717. package/dist/assets/label-CUFCL9Te.js +0 -1
  718. package/dist/assets/layout-dashboard-CQUo0zqq.js +0 -1
  719. package/dist/assets/link-2-DdeL2ffb.js +0 -1
  720. package/dist/assets/link-BTk9LQnG.js +0 -1
  721. package/dist/assets/list-filter-BIvVZUS2.js +0 -1
  722. package/dist/assets/list-todo-ByybdFTG.js +0 -1
  723. package/dist/assets/log-in-C5qjuUlB.js +0 -1
  724. package/dist/assets/maximize-2-pkU0hBkw.js +0 -1
  725. package/dist/assets/mention-chips-D3m3O_ko.js +0 -17
  726. package/dist/assets/message-square-plus-DaOHWEpG.js +0 -1
  727. package/dist/assets/minus-ymsuVafu.js +0 -1
  728. package/dist/assets/model-fallback-5DsUzAM5.js +0 -1
  729. package/dist/assets/model-picker-fields-jLfT-wsr.js +0 -1
  730. package/dist/assets/network-DtO4s1Xo.js +0 -1
  731. package/dist/assets/octagon-alert-Do2mnwTI.js +0 -1
  732. package/dist/assets/octagon-x-7Om5soqi.js +0 -1
  733. package/dist/assets/omp-settings-model-BVsTwU6j.js +0 -1
  734. package/dist/assets/package-Cvq1waTm.js +0 -1
  735. package/dist/assets/pause-BNtKkOA6.js +0 -1
  736. package/dist/assets/pen-line-DJnffu7P.js +0 -1
  737. package/dist/assets/pipeline-stage-presentation-DvjVVsAD.js +0 -2
  738. package/dist/assets/pipelines-B_5RdgB1.js +0 -1
  739. package/dist/assets/play-BEkcNe5A.js +0 -1
  740. package/dist/assets/plug-vBXQGAOC.js +0 -1
  741. package/dist/assets/plugins-CaoL00gm.js +0 -1
  742. package/dist/assets/plus-Ci4fWNMH.js +0 -1
  743. package/dist/assets/popover-C9GvGhqf.js +0 -1
  744. package/dist/assets/power-czY3YlJl.js +0 -1
  745. package/dist/assets/presentation-mode-3-5_ozCU.js +0 -1
  746. package/dist/assets/profile-summary-Bhu05QwC.js +0 -1
  747. package/dist/assets/projects-C-sNYR8y.js +0 -1
  748. package/dist/assets/proposal-review-Cww0NzU2.js +0 -1
  749. package/dist/assets/queryClient-CLuei5YE.js +0 -1
  750. package/dist/assets/queryKeys-Bwpi9du8.js +0 -1
  751. package/dist/assets/radio-Bbj2qILX.js +0 -1
  752. package/dist/assets/radio-card-CEpISzBw.js +0 -1
  753. package/dist/assets/recent-agent-chats-xm5DHAP2.js +0 -1
  754. package/dist/assets/refresh-cw-BoKHCT9Q.js +0 -1
  755. package/dist/assets/repeat-CxiYIeqH.js +0 -1
  756. package/dist/assets/resizable-panels-CAJWzqPj.js +0 -1
  757. package/dist/assets/review-policy-BroUuOnH.js +0 -1
  758. package/dist/assets/rotate-ccw-DP1fSRXE.js +0 -1
  759. package/dist/assets/rotate-cw-BIJjXmtM.js +0 -1
  760. package/dist/assets/router-DvYg2TPj.js +0 -1
  761. package/dist/assets/routines-DRJ8glz2.js +0 -1
  762. package/dist/assets/runRetryState-BQtnYsCT.js +0 -1
  763. package/dist/assets/save-TS82wH4U.js +0 -1
  764. package/dist/assets/schema-config-fields-CKfJ_1Bc.js +0 -1
  765. package/dist/assets/scroll-area-CSkajMX4.js +0 -1
  766. package/dist/assets/scroll-text-BtyjTPat.js +0 -1
  767. package/dist/assets/search-C7RvqPDh.js +0 -1
  768. package/dist/assets/secrets-Bow-lhgm.js +0 -1
  769. package/dist/assets/segmented-B9WQFRdU.js +0 -1
  770. package/dist/assets/select-BILzRqwR.js +0 -1
  771. package/dist/assets/send-Cq6oLC65.js +0 -1
  772. package/dist/assets/separator-Cc_zxQfG.js +0 -1
  773. package/dist/assets/server-D14pf6xr.js +0 -1
  774. package/dist/assets/server-cog-Dd0WwTxo.js +0 -1
  775. package/dist/assets/settings-_MxMwkB3.js +0 -1
  776. package/dist/assets/shared-C9rdRvrI.js +0 -1
  777. package/dist/assets/sheet-CXi-joPR.js +0 -1
  778. package/dist/assets/shield-B35HbBPD.js +0 -1
  779. package/dist/assets/shield-alert-DoI68Irt.js +0 -1
  780. package/dist/assets/shield-check-BkZhOxSV.js +0 -1
  781. package/dist/assets/shield-question-mark-DJ1-iT-R.js +0 -1
  782. package/dist/assets/shield-x-IA54_BG9.js +0 -1
  783. package/dist/assets/sidebarPreferences-RlJwFW7E.js +0 -1
  784. package/dist/assets/skeleton-D5GfoYPy.js +0 -1
  785. package/dist/assets/slots-B-bF0j6o.js +0 -49
  786. package/dist/assets/smoke-lab-matrix-ChxKoFnA.js +0 -1
  787. package/dist/assets/square-BSbamBKn.js +0 -1
  788. package/dist/assets/star-vweB_JDI.js +0 -15
  789. package/dist/assets/sun-t5pkwxql.js +0 -1
  790. package/dist/assets/system-notice-comment-BzIsx8nv.js +0 -1
  791. package/dist/assets/tabs-BruQLBag.js +0 -1
  792. package/dist/assets/task-chat-attachments-COZdrQRo.js +0 -10
  793. package/dist/assets/terminal-BSPCPTKd.js +0 -1
  794. package/dist/assets/textarea-BQh3frGz.js +0 -1
  795. package/dist/assets/thumbs-down-Db03Y3rC.js +0 -1
  796. package/dist/assets/thumbs-up-hfQ2kjmZ.js +0 -1
  797. package/dist/assets/toggle-switch-CCZLW1ZV.js +0 -1
  798. package/dist/assets/tools-VxBq3Bni.js +0 -1
  799. package/dist/assets/tooltip-DhA8eGCr.js +0 -1
  800. package/dist/assets/transcript-adapter-CEuUrDAp.js +0 -5
  801. package/dist/assets/trash-Blp_H70m.js +0 -1
  802. package/dist/assets/triangle-alert-BbGTCcEH.js +0 -1
  803. package/dist/assets/upload-D1pDAAji.js +0 -1
  804. package/dist/assets/use-adapter-capabilities-DVcxB6B0.js +0 -1
  805. package/dist/assets/use-copy-action-DOl9yp4g.js +0 -1
  806. package/dist/assets/useAgentChatEnabled-BIG72pQN.js +0 -1
  807. package/dist/assets/useAutosaveIndicator-Bb6JV7mP.js +0 -1
  808. package/dist/assets/useHiddenSettings-C5OX_C_M.js +0 -1
  809. package/dist/assets/useInfiniteQuery-aicMPSfT.js +0 -1
  810. package/dist/assets/useInstanceFeatureSettings-1CM1woTZ.js +0 -1
  811. package/dist/assets/useManagedSandboxOnly-DENpzhcY.js +0 -1
  812. package/dist/assets/useMobileEntityPickerViewportStyle-l3SLJAQb.js +0 -1
  813. package/dist/assets/usePrefersReducedMotion-z1zTAoVk.js +0 -1
  814. package/dist/assets/useProfilesData-D_CamlCc.js +0 -1
  815. package/dist/assets/useQueries-DVLf9RKa.js +0 -1
  816. package/dist/assets/useSecondTick-CQantaP_.js +0 -1
  817. package/dist/assets/useSharedPolling-CfP23_kt.js +0 -1
  818. package/dist/assets/useSummaryDraftStream-Cce3cGNj.js +0 -3
  819. package/dist/assets/user-RgiS0rQH.js +0 -1
  820. package/dist/assets/user-check-NQX3Jxil.js +0 -1
  821. package/dist/assets/user-minus-DFmQKqPK.js +0 -1
  822. package/dist/assets/user-round-cSiRkcc8.js +0 -1
  823. package/dist/assets/user-x-BydVKgYM.js +0 -1
  824. package/dist/assets/users-CjaVMVjO.js +0 -1
  825. package/dist/assets/wand-sparkles-wj238ghx.js +0 -1
  826. package/dist/assets/webhook-CrpXuiI8.js +0 -1
  827. package/dist/assets/x-B9UP51U4.js +0 -1
@@ -1,11 +0,0 @@
1
- var G=Object.defineProperty;var l=(t,d)=>G(t,"name",{value:d,configurable:!0});import{i as q}from"./rolldown-runtime-ZpX3ckPj.js";import{l as C,la as H,t as U,ua as $}from"./createLucideIcon-DpXjCQRS.js";import{t as Y}from"./check-ByoSzjU8.js";import{t as W}from"./circle-Dov4MVoe.js";import{t as X}from"./copy-BzAUsLd3.js";import{r as J}from"./button-CB8r2Tmh.js";import{t as Q}from"./minus-ymsuVafu.js";import{t as Z}from"./pause-BNtKkOA6.js";import{t as ee}from"./play-BEkcNe5A.js";import{t as te}from"./plus-Ci4fWNMH.js";import{t as B}from"./rotate-ccw-DP1fSRXE.js";import{a as N,i as M,l as ae,o as I,s as O,t as se}from"./TaskChatThreadView-BSU2dzE7.js";import{t as ne}from"./use-copy-action-DOl9yp4g.js";import{n as K}from"./segmented-B9WQFRdU.js";var F={name:"grip-horizontal",size:24,node:[["circle",{cx:"12",cy:"9",r:"1",key:"124mty"}],["circle",{cx:"19",cy:"9",r:"1",key:"1ruzo2"}],["circle",{cx:"5",cy:"9",r:"1",key:"1a8b28"}],["circle",{cx:"12",cy:"15",r:"1",key:"1e56xg"}],["circle",{cx:"19",cy:"15",r:"1",key:"1a92ep"}],["circle",{cx:"5",cy:"15",r:"1",key:"5r1jwy"}]]};F.node;var re=U(F),o=q($(),1),ie=["session-start","human-message","agent-message","thinking","responding","responding-burst","tool-call","diff","working","running","completed","activity-phases","awaiting-approval","plan-todo","interrupted","refused","truncated","live-token-cost"],oe={"session-start":{id:"session-start",label:"Session start",tier:"live",surface:"thread",protocol:'acpx.session → TranscriptEntry kind:"init"'},"human-message":{id:"human-message",label:"Human message",tier:"live",surface:"thread",protocol:'IssueComment authorType:"user"'},"agent-message":{id:"agent-message",label:"Final response",tier:"live",surface:"thread",protocol:'PRP item.delta kind:"agentMessage" channel:"final"'},thinking:{id:"thinking",label:"Thinking",tier:"live",surface:"thread",protocol:"text_delta stream:thought (ACP agent_thought_chunk)"},responding:{id:"responding",label:"Progress update (streaming)",tier:"live",surface:"thread",protocol:'PRP item.delta kind:"agentMessage" channel:"progress"'},"responding-burst":{id:"responding-burst",label:"Progress update burst",tier:"live",surface:"thread",protocol:"text_delta stream:output ×N, tool calls between (PAP-368 dwell)"},"tool-call":{id:"tool-call",label:"Tool call",tier:"live",surface:"thread",protocol:"acpx.tool_call (ACP tool_call / tool_call_update)"},diff:{id:"diff",label:"Diff",tier:"live",surface:"thread",protocol:'ToolCallContent type:"diff" → TranscriptEntry kind:"diff"'},working:{id:"working",label:"Working",tier:"live",surface:"thread",protocol:"heartbeat.run.progress + acpx.status"},running:{id:"running",label:"Running",tier:"live",surface:"thread",protocol:'message.status.type === "running"'},completed:{id:"completed",label:"Completed (collapsed)",tier:"live",surface:"thread",protocol:"acpx.result (StopReason in subtype)"},"activity-phases":{id:"activity-phases",label:"Long-run activity phases",tier:"live",surface:"thread",protocol:"assistant boundaries + chronological tool calls"},"awaiting-approval":{id:"awaiting-approval",label:"Awaiting approval",tier:"tier-b",surface:"thread",protocol:"ACP RequestPermissionRequest + PermissionOptionKind"},"plan-todo":{id:"plan-todo",label:"Plan / todo",tier:"tier-b",surface:"plan",protocol:"ACP Plan { entries: PlanEntry[] }, PlanEntryStatus"},interrupted:{id:"interrupted",label:"Interrupted",tier:"tier-b",surface:"thread",protocol:'AcpRuntimeTurnResult.status:"cancelled" / StopReason "cancelled"'},refused:{id:"refused",label:"Refused",tier:"tier-b",surface:"thread",protocol:'StopReason "refusal"'},truncated:{id:"truncated",label:"Truncated",tier:"tier-b",surface:"thread",protocol:'StopReason "max_tokens" | "max_turn_requests"'},"live-token-cost":{id:"live-token-cost",label:"Live token / cost",tier:"tier-b",surface:"thread",protocol:"ACP UsageUpdate { used, size, cost }"}},L=ie.map(t=>oe[t]),j="Atlas";function b(){return[{id:"m-user-1",kind:"message",author:"human",text:"Add a rate limiter to the login route.",timestamp:"2:31 PM"}]}l(b,"exchangePrefix");var le={revision:2,updatedAt:"2:33 PM",entries:[{id:"p1",content:"Read the login route and existing middleware",status:"completed",priority:"medium"},{id:"p2",content:"Add a token-bucket rate limiter util",status:"in_progress",priority:"high"},{id:"p3",content:"Wire the limiter into POST /login",status:"pending",priority:"high"},{id:"p4",content:"Add tests for the limit + reset window",status:"pending",priority:"low"}]};function de(t){switch(t){case"session-start":return{surface:"thread",items:[{id:"mk-start",kind:"marker",variant:"session_start",label:"Session started",detail:"claude · Auto mode"},...b()]};case"human-message":return{surface:"thread",items:b()};case"agent-message":return{surface:"thread",items:[...b(),{id:"m-agent-1",kind:"message",author:"agent",authorName:j,agentIcon:"bot",text:"On it — I'll add a token-bucket limiter and wire it into the login route.",timestamp:"2:31 PM"}]};case"thinking":return{surface:"thread",items:[...b(),{id:"turn-thinking",kind:"turn",settled:!1,summary:{toolCount:1,added:0,removed:0},liveStatus:{id:"st-thinking",kind:"status",status:"running",label:"Thinking",startedAtMs:Date.now()-6100,tokens:{used:18240,size:2e5}},items:[{id:"th-grep",kind:"tool",name:"Grep",target:"rateLimit",toolKind:"search",status:"completed"}]}]};case"responding":return{surface:"thread",items:[...b(),{id:"turn-responding",kind:"turn",settled:!1,summary:{toolCount:1,added:0,removed:0},liveStatus:{id:"st-responding",kind:"status",status:"running",label:"Responding",startedAtMs:Date.now()-9300,tokens:{used:18240,size:2e5},selfTalk:"I found an existing ipRateLimit helper, so I'll extend it with a per-account token bucket keyed on the email address instead of adding a second limiter. The bucket refills at six requests a minute, matching the lockout policy the auth spec documents, and failed attempts drain it twice as fast so brute-force runs hit the ceiling quickly while a fat-fingered password barely registers."},items:[{id:"resp-read",kind:"tool",name:"Read",target:"server/src/routes/auth.ts",toolKind:"read",status:"completed"}]}]};case"responding-burst":return{surface:"thread",items:[...b(),{id:"turn-responding-burst",kind:"turn",settled:!1,summary:{toolCount:2,added:0,removed:0},liveStatus:{id:"st-responding-burst",kind:"status",status:"running",label:"Responding",startedAtMs:Date.now()-21400,tokens:{used:18240,size:2e5},selfTalk:`Found the existing ipRateLimit helper — extending it beats adding a second limiter.
2
-
3
- Wiring a per-account token bucket keyed on the email address, refilling at six requests a minute per the auth spec.
4
-
5
- Failed attempts drain the bucket twice as fast, so brute-force runs hit the ceiling while a fat-fingered password barely registers.
6
-
7
- Now updating the login route to consume from the bucket before the password check and adding tests for the lockout path.`},items:[{id:"burst-read",kind:"tool",name:"Read",target:"server/src/routes/auth.ts",toolKind:"read",status:"completed"},{id:"burst-grep",kind:"tool",name:"Grep",target:"ipRateLimit",toolKind:"search",status:"completed"}]}]};case"tool-call":return{surface:"thread",items:[{id:"tool-1",kind:"tool",name:"Read",target:"server/src/routes/auth.ts",toolKind:"read",status:"in_progress"}]};case"diff":return{surface:"thread",items:[{id:"tool-diff",kind:"tool",name:"Edit",target:"server/src/routes/auth.ts",toolKind:"edit",status:"completed",decision:"allowed",diff:{path:"server/src/routes/auth.ts",added:3,removed:1,lines:[{kind:"context",text:"router.post('/login', async (req, res) => {"},{kind:"remove",text:" const ok = await checkPassword(req.body);"},{kind:"add",text:" await rateLimiter.consume(req.body.email);"},{kind:"add",text:" const ok = await checkPassword(req.body);"},{kind:"add",text:" if (!ok) return res.status(401).end();"}]}}]};case"working":return{surface:"thread",items:[...b(),{id:"turn-working",kind:"turn",settled:!1,summary:{toolCount:2,added:0,removed:0},liveStatus:{id:"st-working",kind:"status",status:"working",label:"Editing files",detail:"Edit · server/src/routes/auth.ts",toolName:"Edit",startedAtMs:Date.now()-4200},items:[{id:"w-read",kind:"tool",name:"Read",target:"server/src/routes/auth.ts",toolKind:"read",status:"completed"},{id:"w-edit",kind:"tool",name:"Edit",target:"server/src/routes/auth.ts",toolKind:"edit",status:"in_progress"}]}]};case"running":return{surface:"thread",items:[...b(),{id:"turn-running",kind:"turn",settled:!1,summary:{toolCount:1,added:0,removed:0},liveStatus:{id:"st-running",kind:"status",status:"running",label:"Running",detail:"no output for 3s — still running",startedAtMs:Date.now()-12e3,tokens:{used:18240,size:2e5}},items:[{id:"r-grep",kind:"tool",name:"Grep",target:"rateLimit",toolKind:"search",status:"completed"}]}]};case"completed":return{surface:"thread",items:[...b(),{id:"m-done",kind:"message",author:"agent",authorName:j,agentIcon:"bot",text:"Done — added a per-account token-bucket limiter and wired it into the login route. Tests pass.",timestamp:"2:34 PM",attachedTurn:{id:"turn-done",kind:"turn",settled:!0,summary:{durationLabel:"38s",toolCount:2,added:34,removed:3,tokensLabel:"12.3k tokens"},items:[{id:"tool-done-1",kind:"tool",name:"Read",target:"server/src/routes/auth.ts",toolKind:"read",status:"completed"},{id:"tool-done-2",kind:"tool",name:"Edit",target:"server/src/routes/auth.ts",toolKind:"edit",status:"completed",diff:{path:"server/src/routes/auth.ts",added:34,removed:3}}]}}]};case"awaiting-approval":return{surface:"thread",items:[{id:"st-approval",kind:"status",status:"awaiting_approval",label:"Approve running a command?",detail:"npm run migrate — modifies the database",approval:{toolName:"execute",options:[{id:"reject",label:"Deny",kind:"reject_once"},{id:"allow-always",label:"Always allow",kind:"allow_always"},{id:"allow",label:"Allow once",kind:"allow_once"}]}}]};case"activity-phases":{const d=l((n,m,i,p)=>({id:n,kind:"activity_phase",active:i,interstitial:m?{id:`${n}:message`,kind:"message",author:"agent",authorName:j,text:m,interstitial:!0}:void 0,items:p.filter(h=>h.kind==="tool"||h.kind==="usage"),summary:i?"Ran 1 command, called 1 tool":n.endsWith("opening")?"Called 2 tools":"Read 3 files, edited 1 file"}),"phase");return{surface:"thread",items:[...b(),{id:"turn-long-run",kind:"turn",settled:!1,summary:{toolCount:8,added:4,removed:1},liveStatus:{id:"long-status",kind:"status",status:"working",label:"Running tests",detail:"Bash · vitest",toolName:"Bash",startedAtMs:Date.now()-48e3},items:[d("phase-opening",void 0,!1,[{id:"generic-1",kind:"tool",name:"Tool",rawName:"tool call",status:"completed"},{id:"generic-2",kind:"tool",name:"Tool",rawName:"acp_tool",status:"failed",detail:"Adapter interrupted"}]),d("phase-read","I found the relevant adapter and am tracing its render boundary.",!1,[{id:"read-1",kind:"tool",name:"Read",status:"completed",target:"ui/src/components/task-chat/transcript-adapter.ts"},{id:"read-2",kind:"tool",name:"Read",status:"completed",target:"ui/src/components/task-chat/TaskChatTurn.tsx"},{id:"read-3",kind:"tool",name:"Read",status:"completed",target:"ui/src/components/task-chat/TaskChatThreadView.tsx"},{id:"edit-1",kind:"tool",name:"Edit",status:"completed",target:"ui/src/components/task-chat/task-chat-model.ts"}]),d("phase-active","The grouping is wired; I’m running focused checks now.",!0,[{id:"bash-1",kind:"tool",name:"Bash",status:"in_progress",target:"vitest task-chat"},{id:"mcp-1",kind:"tool",name:"Search",rawName:"mcp__docs__search",status:"completed"}])]}]}}case"plan-todo":return{surface:"plan",items:[],plan:le};case"interrupted":return{surface:"thread",items:[{id:"m-int",kind:"message",author:"agent",authorName:j,text:"Starting the migration now…"},{id:"mk-int",kind:"marker",variant:"interrupted",label:"Interrupted",detail:"stopped by you at 2:35 PM"}]};case"refused":return{surface:"thread",items:[{id:"st-refused",kind:"status",status:"refused",label:"Turn ended: refusal",detail:"The agent declined to complete this request."}]};case"truncated":return{surface:"thread",items:[{id:"st-trunc",kind:"status",status:"truncated",label:"Turn ended: max tokens",detail:"Output was cut off — continue to resume.",tokens:{used:199120,size:2e5}}]};case"live-token-cost":return{surface:"thread",items:[{id:"usage-1",kind:"usage",usage:{used:42800,size:2e5,inputTokens:38200,outputTokens:4600,costUsd:.1284}}]};default:return t}}l(de,"buildScenario");var e=q(H(),1),ce={completed:{Icon:Y,spin:!1,tone:"text-(--status-task-icon-done)"},in_progress:{Icon:J,spin:!0,tone:"text-(--status-agent-running)"},pending:{Icon:W,spin:!1,tone:"text-ink-3"}},ue={high:"text-bad",medium:"text-(--status-agent-paused)",low:"text-ink-3"};function me({plan:t}){const d=t.entries.filter(n=>n.status==="completed").length;return(0,e.jsxs)("div",{className:"flex flex-col gap-2 py-2",children:[(0,e.jsxs)("div",{className:"flex items-center gap-2 px-1 text-xs text-ink-3",children:[(0,e.jsx)("span",{className:"font-medium text-ink",children:"Plan"}),(0,e.jsxs)("span",{children:["· rev ",t.revision]}),(0,e.jsxs)("span",{className:"ml-auto",children:[d,"/",t.entries.length," done"]})]}),(0,e.jsx)("ul",{className:"flex flex-col gap-1",children:t.entries.map((n,m)=>{const{Icon:i,spin:p,tone:h}=ce[n.status];return(0,e.jsxs)("li",{className:"tc-enter-plan-entry flex items-start gap-2 rounded-md border border-line bg-bg-2/50 px-2.5 py-1.5 text-sm",style:{animationDelay:`calc(var(--motion-plan-entry-stagger) * ${m})`},children:[(0,e.jsx)(i,{className:C("mt-0.5 h-4 w-4 shrink-0",h,p&&"animate-spin")}),(0,e.jsx)("span",{className:C("min-w-0 flex-1",n.status==="completed"&&"text-ink-3 line-through"),children:n.content}),(0,e.jsx)("span",{className:C("shrink-0 text-(length:--text-nano) uppercase tracking-wide",ue[n.priority]),children:n.priority})]},n.id)})})]})}l(me,"TaskChatPlanView");var z="tc-tweak-pos",_="tc-tweak-overrides";function P(t){return typeof document>"u"?"":getComputedStyle(document.documentElement).getPropertyValue(t).trim()}l(P,"readComputed");function D(t,d){try{const n=sessionStorage.getItem(t);return n?JSON.parse(n):d}catch{return d}}l(D,"loadSession");function A(t,d){try{sessionStorage.setItem(t,JSON.stringify(d))}catch{}}l(A,"saveSession");function pe(){const[t,d]=(0,o.useState)(()=>D(z,{x:24,y:24})),[n,m]=(0,o.useState)(!1),[i,p]=(0,o.useState)({}),[h,x]=(0,o.useState)(()=>D(_,{})),[k,r]=(0,o.useState)(null),g=ne(),f=(0,o.useRef)(null);(0,o.useEffect)(()=>{const s={};for(const a of N)s[a.name]=P(a.name);for(const[a,u]of Object.entries(h))document.documentElement.style.setProperty(a,u),s[a]=u;p(s)},[]);const y=(0,o.useCallback)((s,a)=>{document.documentElement.style.setProperty(s,a),p(u=>({...u,[s]:a})),x(u=>{const E={...u,[s]:a};return A(_,E),E})},[]),w=(0,o.useCallback)(()=>{for(const a of Object.keys(h))document.documentElement.style.removeProperty(a);x({}),A(_,{});const s={};for(const a of N)s[a.name]=P(a.name);p(s)},[h]),T=(0,o.useCallback)(s=>{s.target.setPointerCapture(s.pointerId),f.current={dx:s.clientX-t.x,dy:s.clientY-t.y}},[t]),c=(0,o.useCallback)(s=>{if(!f.current)return;const a={x:s.clientX-f.current.dx,y:s.clientY-f.current.dy};d(a)},[]),v=(0,o.useCallback)(()=>{f.current&&(f.current=null,A(z,t))},[t]),S=(0,o.useCallback)(()=>{const s=N.map(a=>{const u=i[a.name]||P(a.name);return` ${a.name}: ${u};`});r(`:root {
8
- ${s.join(`
9
- `)}
10
- }
11
- `)},[i]),V=(0,o.useMemo)(()=>{const s={};for(const a of I)s[a]=[];for(const a of N)s[a.group].push(a);return s},[]);return(0,e.jsxs)("div",{className:"fixed z-50 w-72 select-none rounded-lg border border-line bg-bg-2 text-ink shadow-lg",style:{left:t.x,top:t.y},"data-testid":"task-chat-tweak-panel",children:[(0,e.jsxs)("div",{className:"flex cursor-grab items-center gap-2 rounded-t-lg border-b border-line bg-bg-3/50 px-2 py-1.5 text-xs font-medium active:cursor-grabbing",onPointerDown:T,onPointerMove:c,onPointerUp:v,children:[(0,e.jsx)(re,{className:"h-3.5 w-3.5 text-ink-3"}),(0,e.jsx)("span",{children:"Motion tweak panel"}),(0,e.jsxs)("div",{className:"ml-auto flex items-center gap-1",children:[(0,e.jsx)("button",{type:"button",title:"Reset all",onClick:w,className:"rounded p-0.5 hover:bg-bg-3",children:(0,e.jsx)(B,{className:"h-3.5 w-3.5"})}),(0,e.jsx)("button",{type:"button",title:n?"Expand":"Minimize",onClick:l(()=>m(s=>!s),"onClick"),className:"rounded p-0.5 hover:bg-bg-3",children:n?(0,e.jsx)(te,{className:"h-3.5 w-3.5"}):(0,e.jsx)(Q,{className:"h-3.5 w-3.5"})})]})]}),n?null:(0,e.jsxs)("div",{className:"max-h-(--sz-tweak-panel-max) overflow-y-auto p-2",children:[I.map(s=>(0,e.jsxs)("div",{className:"mb-3",children:[(0,e.jsx)("p",{className:"mb-1 text-(length:--text-nano) font-semibold uppercase tracking-wide text-ink-3",children:s}),(0,e.jsx)("div",{className:"flex flex-col gap-2",children:V[s].map(a=>(0,e.jsxs)("div",{"data-token":a.name,className:"flex flex-col gap-1",children:[(0,e.jsxs)("div",{className:"flex items-center justify-between text-(length:--text-micro)",children:[(0,e.jsx)("span",{className:"truncate font-mono text-ink-3",children:a.name.replace("--motion-","")}),(0,e.jsx)("span",{className:"ml-2 shrink-0 tabular-nums",children:a.kind==="time"?`${Math.round(O(i[a.name]??"0"))}ms`:""})]}),a.kind==="time"?(0,e.jsx)("input",{type:"range","aria-label":a.name,min:a.min??0,max:a.max??1e3,step:a.step??10,value:Math.round(O(i[a.name]??"0")),onChange:l(u=>y(a.name,`${u.target.value}ms`),"onChange"),className:"h-1.5 w-full"}):(0,e.jsxs)("select",{"aria-label":a.name,value:i[a.name]??"",onChange:l(u=>y(a.name,u.target.value),"onChange"),className:"w-full rounded border border-line bg-bg px-1 py-0.5 text-(length:--text-micro)",children:[M.every(u=>u.value!==(i[a.name]??""))&&i[a.name]?(0,e.jsx)("option",{value:i[a.name],children:i[a.name]}):null,M.map(u=>(0,e.jsx)("option",{value:u.value,children:u.label},u.value))]})]},a.name))})]},s)),(0,e.jsx)("div",{className:"mt-1 flex gap-2",children:(0,e.jsxs)("button",{type:"button",onClick:S,className:"flex flex-1 items-center justify-center gap-1 rounded border border-line px-2 py-1 text-xs hover:bg-bg-3",children:[(0,e.jsx)(X,{className:"h-3.5 w-3.5"}),"Copy as @theme"]})}),k?(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("textarea",{readOnly:!0,"data-testid":"task-chat-tweak-export",className:"mt-2 h-32 w-full resize-none rounded border border-line bg-bg-3/40 p-2 font-mono text-(length:--text-nano)",value:k,onFocus:l(s=>{s.currentTarget.select(),g.copy(k)},"onFocus")}),(0,e.jsx)("p",{className:"mt-1 text-(length:--text-nano) text-ink-3","aria-live":"polite",children:g.copied?"Copied to clipboard":g.failed?"Copy failed — select the text and copy it manually":"Click the box to copy"})]}):null]})]})}l(pe,"TweakPanel");function he(t){return t.author!=="agent"||t.optimistic?null:(0,e.jsx)(ae,{copyText:t.text,feedback:{activeVote:null,sharingPreference:"allowed",termsUrl:null,onVote:l(async()=>{},"onVote")}})}l(he,"labMessageActions");var R=30;function ge(t){return t.split(/\n{2,}/).map(d=>d.trim()).filter(Boolean)}l(ge,"selfTalkSegments");function fe(t,d){let n=d;for(let m=0;m<t.length;m++){const i=t[m];if(n<=i.length)return i.slice(0,n)||void 0;if(n-=i.length,m===t.length-1||n<=R)return;n-=R}}l(fe,"selfTalkAtTick");function xe(t,d,n){const[m,i]=(0,o.useState)(Number.MAX_SAFE_INTEGER),p=t.findIndex(r=>r.kind==="message"&&r.streaming||r.kind==="turn"&&!r.settled&&r.liveStatus?.selfTalk!=null),h=t[p]?.kind==="turn",x=(0,o.useMemo)(()=>{const r=t[p];return r?r.kind==="message"?r.text:r.kind==="turn"?r.liveStatus?.selfTalk??"":"":""},[t,p]),k=(0,o.useMemo)(()=>h?ge(x):[],[h,x]);return(0,o.useEffect)(()=>{if(p<0){i(Number.MAX_SAFE_INTEGER);return}i(0);let r=0;const g=h?k.reduce((y,w)=>y+w.length,0)+R*Math.max(0,k.length-1)+1:x.length,f=window.setInterval(()=>{r+=1,i(r),r>=g&&window.clearInterval(f)},Math.max(4,24/d));return()=>window.clearInterval(f)},[p,x,h,k,d,n]),p<0?t:t.map((r,g)=>{if(g!==p)return r;const f=x.slice(0,m),y=m>=x.length;return r.kind==="message"?{...r,text:f,streaming:!y}:r.kind==="turn"&&r.liveStatus?{...r,liveStatus:{...r.liveStatus,selfTalk:fe(k,m)}}:r})}l(xe,"useStreamingReplay");var ke=[{id:"",label:"Chosen · C · On bg"},{id:"former",label:"Former"},{id:"darker",label:"A · Darker"},{id:"hairline",label:"B · Hairline"}];function Ie(){const[t,d]=(0,o.useState)("agent-message"),[n,m]=(0,o.useState)(""),[i,p]=(0,o.useState)(1),[h,x]=(0,o.useState)(!0),[k,r]=(0,o.useState)(0),g=(0,o.useMemo)(()=>de(t),[t]),f=xe(g.items,i,k),y=h?f:g.items,w=(0,o.useRef)(null),T=L.find(c=>c.id===t);return(0,e.jsxs)("div",{className:"flex h-full min-h-0 flex-col",children:[(0,e.jsxs)("header",{className:"border-b border-line px-4 py-2",children:[(0,e.jsx)("h1",{className:"text-sm font-semibold",children:"Task Chat Lab"}),(0,e.jsx)("p",{className:"text-xs text-ink-3",children:"Synthetic harness for the task chat redesign · every state renders here with no live agent."})]}),(0,e.jsxs)("div",{className:"flex min-h-0 flex-1",children:[(0,e.jsx)("nav",{className:"w-56 shrink-0 overflow-y-auto border-r border-line p-2","aria-label":"States",children:["live","tier-b"].map(c=>(0,e.jsxs)("div",{className:"mb-3",children:[(0,e.jsx)("p",{className:"mb-1 px-1 text-(length:--text-nano) font-semibold uppercase tracking-wide text-ink-3",children:c==="live"?"Live states":"Tier-B (synthetic)"}),(0,e.jsx)("ul",{className:"flex flex-col gap-0.5",children:L.filter(v=>v.tier===c).map(v=>(0,e.jsx)("li",{children:(0,e.jsx)(K,{selected:t===v.id,"data-state-id":v.id,onClick:l(()=>{d(v.id),r(S=>S+1)},"onClick"),children:v.label})},v.id))})]},c))}),(0,e.jsxs)("main",{className:"flex min-h-0 flex-1 flex-col",children:[(0,e.jsxs)("div",{className:"flex items-center gap-3 border-b border-line px-4 py-2 text-xs",children:[(0,e.jsxs)("button",{type:"button",onClick:l(()=>x(c=>!c),"onClick"),className:"flex items-center gap-1 rounded border border-line px-2 py-1 hover:bg-bg-3",children:[h?(0,e.jsx)(Z,{className:"h-3.5 w-3.5"}):(0,e.jsx)(ee,{className:"h-3.5 w-3.5"}),h?"Pause":"Play"]}),(0,e.jsxs)("button",{type:"button",onClick:l(()=>r(c=>c+1),"onClick"),className:"flex items-center gap-1 rounded border border-line px-2 py-1 hover:bg-bg-3",children:[(0,e.jsx)(B,{className:"h-3.5 w-3.5"}),"Replay"]}),(0,e.jsxs)("label",{className:"flex items-center gap-2",children:[(0,e.jsx)("span",{className:"text-ink-3",children:"Speed"}),(0,e.jsx)("input",{type:"range",min:.1,max:10,step:.1,value:i,onChange:l(c=>p(parseFloat(c.target.value)),"onChange"),"aria-label":"Streaming speed",className:"w-32"}),(0,e.jsxs)("span",{className:"w-10 tabular-nums",children:[i.toFixed(1),"×"]})]}),(0,e.jsxs)("div",{className:"ml-auto flex items-center gap-2",children:[(0,e.jsx)("span",{className:"text-ink-3",children:"Agent bubble"}),(0,e.jsx)("div",{className:"flex items-center gap-0.5 rounded border border-line p-0.5",role:"group","aria-label":"Agent bubble treatment",children:ke.map(c=>(0,e.jsx)(K,{selected:n===c.id,"data-bubble-variant-id":c.id||"current",onClick:l(()=>m(c.id),"onClick"),children:c.label},c.id||"current"))}),(0,e.jsx)("span",{className:"font-mono text-(length:--text-micro) text-ink-3",children:T.protocol})]})]}),(0,e.jsx)("div",{ref:w,className:"flex min-h-0 flex-1 flex-col","data-testid":"task-chat-stage","data-bubble-variant":n||void 0,children:g.surface==="plan"&&g.plan?(0,e.jsx)("div",{className:"mx-auto max-w-2xl px-4",children:(0,e.jsx)(me,{plan:g.plan})}):(0,e.jsx)("div",{className:"mx-auto flex min-h-0 w-full max-w-2xl flex-1 flex-col",children:(0,e.jsx)(se,{items:y,renderMessageActions:he})})})]})]}),(0,e.jsx)(pe,{})]})}l(Ie,"TaskChatLab");export{Ie as TaskChatLab,Ie as default};
@@ -1,2 +0,0 @@
1
- var ae=Object.defineProperty;var o=(e,a)=>ae(e,"name",{value:a,configurable:!0});import{i as E}from"./rolldown-runtime-ZpX3ckPj.js";import{l as m,la as ne,t as S,ua as se}from"./createLucideIcon-DpXjCQRS.js";import{i as re}from"./star-vweB_JDI.js";import{_t as B,at as ie,on as le,ot as H,t as w,tt as oe,vt as $}from"./router-DvYg2TPj.js";import{t as ce}from"./book-open-Ccq-Ea-W.js";import{t as z}from"./bot-CPZa9Nhm.js";import{t as de}from"./check-ByoSzjU8.js";import{t as ue}from"./chevron-down-BY8r8lEv.js";import{t as _}from"./chevron-right-B9tyGqmZ.js";import{t as pe}from"./circle-dot-W_Fv5sI-.js";import{t as I}from"./circle-Dov4MVoe.js";import{o as fe,t as T}from"./MarkdownBody-Dtjq3Ln7.js";import{t as D}from"./external-link--KkXYRPz.js";import{t as W}from"./file-text-Dpnp6o-I.js";import{t as he}from"./flag-DL-0fBPJ.js";import{t as me}from"./info-BqXpbzV2.js";import{t as xe}from"./key-round-Bzc86YKh.js";import{r as ge,t as v}from"./button-CB8r2Tmh.js";import{t as be}from"./octagon-x-7Om5soqi.js";import{r as ve}from"./TaskChatProtocolCard-CgwNmmaw.js";import{t as L}from"./search-C7RvqPDh.js";import{t as ke}from"./shield-check-BkZhOxSV.js";import{t as we}from"./square-BSbamBKn.js";import{t as je}from"./triangle-alert-BbGTCcEH.js";import{t as k}from"./users-CjaVMVjO.js";import{t as ye}from"./x-B9UP51U4.js";import{n as Le}from"./presentation-mode-3-5_ozCU.js";import{$a as Ne,Aa as Ce,B as F,U as j,Ua as Se,V as _e,Xa as Te,to as O,z as N}from"./index-B6ALXjXD.js";var U={name:"file-check-corner",size:24,node:[["path",{d:"M10.5 22H6a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.706.706l3.588 3.588A2.4 2.4 0 0 1 20 8v6",key:"g5mvt7"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"m14 20 2 2 4-4",key:"15kota"}]],aliases:["file-check-2"]};U.node;var P=S(U),q={name:"folder-kanban",size:24,node:[["path",{d:"M4 20h16a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.93a2 2 0 0 1-1.66-.9l-.82-1.2A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13c0 1.1.9 2 2 2Z",key:"1fr9dc"}],["path",{d:"M8 10v4",key:"tgpxqk"}],["path",{d:"M12 10v2",key:"hh53o1"}],["path",{d:"M16 10v6",key:"1d6xys"}]]};q.node;var Re=S(q),V={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"}]]};V.node;var R=S(V),h=E(se(),1),Ae=(0,h.createContext)(null);function It(e){const[a,n]=(0,h.useState)(()=>({issueId:e,memory:new Map}));if(a.issueId===e)return a.memory;const s={issueId:e,memory:new Map};return n(s),s.memory}o(It,"useIssueExpansionMemory");function A(e,a){const n=(0,h.useContext)(Ae),[s,c]=(0,h.useState)(()=>n?.get(e));return[s??n?.get(e)??a,(0,h.useCallback)(u=>{c(r=>{const p=r??n?.get(e)??a,d=typeof u=="function"?u(p):u;return n?.set(e,d),d})},[e,n,a])]}o(A,"useTaskChatExpansion");var t=E(ne(),1);function $e({item:e}){const{used:a,size:n,inputTokens:s,outputTokens:c,costUsd:u}=e.usage,r=typeof n=="number"&&n>0?n:null,p=r?Math.min(100,Math.round(a/r*100)):0;return(0,t.jsxs)("div",{className:"flex flex-col gap-1 px-1 py-1 text-(length:--text-micro) text-ink-3",children:[(0,t.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,t.jsx)(R,{className:"h-3 w-3"}),e.label?(0,t.jsx)("span",{className:"font-medium",children:e.label}):null,r?(0,t.jsxs)("span",{children:[a.toLocaleString(),"/",r.toLocaleString()," ctx (",p,"%)"]}):null,s!=null||c!=null?(0,t.jsxs)("span",{children:["· ↑",(s??0).toLocaleString()," ↓",(c??0).toLocaleString()]}):null,u!=null?(0,t.jsxs)("span",{children:["· $",u.toFixed(4)]}):null]}),e.detail?(0,t.jsx)("div",{children:e.detail}):null,r?(0,t.jsx)("div",{className:"h-1 w-full overflow-hidden rounded-full bg-line",children:(0,t.jsx)("div",{className:m("h-full rounded-full bg-(--status-agent-running)"),style:{width:`${p}%`}})}):null]})}o($e,"TaskChatUsageReadout");function G(e){const a=e.details.find(n=>n.label==="Severity")?.value;return e.status==="failed"||a==="error"?"error":a==="info"?"info":"warning"}o(G,"providerNoticeSeverity");function x(e,...a){return e.details.find(n=>a.includes(n.label))?.value}o(x,"providerDetail");function C(e){if(!(!e||F(e)||/^tool(?:\s+|_)call\b/i.test(e)))return e}o(C,"meaningfulToolDetail");function ze(e){const a=e.summary??x(e,"Query","URL","Target","Name","Reference","Reason","Summary");switch(e.family){case"research":{const n=x(e,"Action")?.toLowerCase();return n==="open_page"?{icon:L,runningLabel:"Opening a web page",completedLabel:"Opened a web page",failedLabel:"Couldn’t open the web page",interruptedLabel:"Stopped opening the web page",detail:a}:n==="find_in_page"?{icon:L,runningLabel:"Searching the page",completedLabel:"Searched the page",failedLabel:"Page search failed",interruptedLabel:"Page search stopped",detail:a}:{icon:L,runningLabel:"Searching the web",completedLabel:"Searched the web",failedLabel:"Web search failed",interruptedLabel:"Web search stopped",detail:a}}case"tool_execution":{const n=x(e,"Name"),s=x(e,"Target"),c=x(e,"Progress"),u=j({name:n,transport:x(e,"Transport"),namespace:x(e,"Namespace"),operation:x(e,"Operation"),target:s,progress:c}),r=C(e.summary)??C(c)??C(s),p=!!(r&&n&&N(r)===N(n)),d=n?_e(n)?.name??n:u.displayName,i=u.sourceLabel?`${u.sourceLabel} · ${d}`:n&&!F(n)&&N(n)!==u.runningLabel.replace(/^Running /,"")?n:void 0;return{icon:u.icon,runningLabel:u.runningLabel,completedLabel:u.completedLabel,failedLabel:u.failedLabel,interruptedLabel:u.interruptedLabel,detail:[p?void 0:r,i].filter(Boolean).join(" · ")||void 0}}case"plan":return{icon:Se,runningLabel:"Updating the plan",completedLabel:"Updated the plan",failedLabel:"Plan update failed",interruptedLabel:"Plan update stopped",detail:a};case"delegation":{const n=x(e,"Action")?.toLowerCase();return n==="message"?{icon:k,runningLabel:"Messaging a subagent",completedLabel:"Messaged a subagent",failedLabel:"Subagent message failed",interruptedLabel:"Subagent message stopped",detail:a}:n==="resume"?{icon:k,runningLabel:"Resuming a subagent",completedLabel:"Resumed a subagent",failedLabel:"Couldn’t resume the subagent",interruptedLabel:"Subagent resume stopped",detail:a}:n==="close"?{icon:k,runningLabel:"Closing a subagent",completedLabel:"Closed a subagent",failedLabel:"Couldn’t close the subagent",interruptedLabel:"Subagent close stopped",detail:a}:n==="wait"?{icon:k,runningLabel:"Waiting for subagents",completedLabel:"Finished waiting for subagents",failedLabel:"Subagent wait failed",interruptedLabel:"Stopped waiting for subagents",detail:a}:{icon:k,runningLabel:"Starting a subagent",completedLabel:"Started a subagent",failedLabel:"Subagent start failed",interruptedLabel:"Subagent start stopped",detail:a}}case"model_identity":return e.eventType==="model.route.changed"?{icon:z,runningLabel:"Switching models",completedLabel:"Switched models",failedLabel:"Model switch failed",interruptedLabel:"Model switch stopped",detail:a}:{icon:z,runningLabel:"Verifying the model",completedLabel:"Verified the model",failedLabel:"Model verification failed",interruptedLabel:"Model verification stopped",detail:a};case"context":return{icon:re,runningLabel:"Compacting context",completedLabel:"Compacted context",failedLabel:"Context compaction failed",interruptedLabel:"Context compaction stopped",detail:a};case"artifact":return e.eventType==="artifact.viewed"?{icon:$,runningLabel:"Viewing an artifact",completedLabel:"Viewed an artifact",failedLabel:"Couldn’t view the artifact",interruptedLabel:"Artifact view stopped",detail:a}:{icon:$,runningLabel:"Generating an artifact",completedLabel:"Generated an artifact",failedLabel:"Artifact generation failed",interruptedLabel:"Artifact generation stopped",detail:a};case"review":return x(e,"State")?.toLowerCase()==="exited"?{icon:P,runningLabel:"Leaving review mode",completedLabel:"Left review mode",failedLabel:"Couldn’t leave review mode",interruptedLabel:"Review-mode change stopped",detail:a}:{icon:P,runningLabel:"Entering review mode",completedLabel:"Entered review mode",failedLabel:"Couldn’t enter review mode",interruptedLabel:"Review-mode change stopped",detail:a};case"hook":return{icon:H,runningLabel:"Running a hook",completedLabel:"Ran a hook",failedLabel:"Hook failed",interruptedLabel:"Hook stopped",detail:a};case"memory":return{icon:ce,runningLabel:"Checking memory",completedLabel:"Referenced memory",failedLabel:"Memory lookup failed",interruptedLabel:"Memory lookup stopped",detail:a};case"safety":return{icon:ke,runningLabel:"Reviewing safety",completedLabel:"Reviewed safety",failedLabel:"Safety review failed",interruptedLabel:"Safety review stopped",detail:a};case"terminal":return{icon:Ce,runningLabel:"Sending terminal input",completedLabel:"Sent terminal input",failedLabel:"Terminal input failed",interruptedLabel:"Terminal input stopped",detail:a};case"wait":return{icon:Ne,runningLabel:"Waiting",completedLabel:"Finished waiting",failedLabel:"Wait failed",interruptedLabel:"Wait stopped",detail:a};case"provider_notice":return{icon:G(e)==="info"?me:je,runningLabel:"Provider notice",completedLabel:"Provider notice",failedLabel:"Provider error",interruptedLabel:"Provider notice",detail:a}}}o(ze,"providerActivityPresentation");function Ie(e){const a=e.totals.files||e.files.length,n=a>0?`${a} ${a===1?"file":"files"}`:void 0;return{icon:Te,runningLabel:"Editing files",completedLabel:"Edited files",detail:n}}o(Ie,"workspaceChangePresentation");function Pe(e){return{icon:W,runningLabel:"Referencing a file",completedLabel:"Referenced a file",detail:e.line==null?e.path:`${e.path}:${e.line}`}}o(Pe,"workspaceFilePresentation");function Me(e){return{icon:e.resourceKind==="document"?W:ve,runningLabel:"Saving a resource",completedLabel:e.resourceKind==="document"?"Added a document":"Added a deliverable",detail:e.title}}o(Me,"resourcePresentation");function K(e){switch(e.surface){case"provider_activity":return ze(e);case"workspace_change":return Ie(e);case"workspace_file":return Pe(e);case"resource":return Me(e);case"runtime_request":case"run_result":case"run_terminal":return null}}o(K,"protocolActivityPresentation");function X(e){return e.surface==="provider_activity"?e.status==="running":e.surface==="workspace_change"?!e.complete:!1}o(X,"protocolActivityIsRunning");function Ee(e,a){return e.surface!=="provider_activity"?X(e)?a.runningLabel:a.completedLabel:e.status==="failed"?a.failedLabel??`${a.completedLabel} · failed`:e.status==="interrupted"?a.interruptedLabel??`${a.completedLabel} · interrupted`:e.status==="running"?a.runningLabel:a.completedLabel}o(Ee,"protocolActivityLabel");var Be={terminal:"Ran commands",grep:"Searched files",search:"Searched files",read:"Read files",edit:"Edited files",web:"Searched the web",plan:"Worked on a plan",question:"Requested input",agent:"Worked with agents",safety:"Reviewed safety",image:"Worked with images",wait:"Waited",mcp:"Used connected tools",other:"Used tools"};function He(e){const a=new Map,n=o((i,l,f=0)=>{const g=a.get(i);(!g||f<g.order)&&a.set(i,{label:i,icon:l,order:f})},"add"),s=[],c=[];for(const[i,l]of e.entries())if(l.kind==="tool"){const f=j({name:l.rawName??l.name,target:l.target});s.push({...f,order:i,completed:l.status==="completed"})}else if(l.kind==="protocol")if(l.surface==="provider_activity"&&l.family==="tool_execution"){const f=o(b=>l.details.find(y=>y.label===b)?.value,"value"),g=j({name:f("Name"),operation:f("Operation"),transport:f("Transport"),namespace:f("Namespace"),target:f("Target")});s.push({...g,order:i,completed:l.status==="completed"})}else{const f=K(l);if(!f)continue;if(l.surface==="provider_activity"&&l.family==="provider_notice"){const g=l.summary?.trim()||l.details.find(b=>b.label==="Summary")?.value.trim();c.push({summary:g,severity:G(l),icon:f.icon,order:i});continue}n({research:"Searched the web",plan:"Worked on a plan",delegation:"Worked with agents",artifact:"Worked with artifacts",context:"Managed context",memory:"Checked memory",model_identity:"Checked model settings",review:"Worked in review mode",hook:"Ran hooks",safety:"Reviewed safety",terminal:"Ran commands",wait:"Waited",workspace_change:"Worked on files",workspace_file:"Referenced files",resource:"Added resources"}[l.surface==="provider_activity"?l.family:l.surface]??"Used tools",f.icon,i)}if(c.length){const i=c.find(l=>l.severity==="error")??c.find(l=>l.severity==="warning")??c[0];n(c.length===1?i.summary||"Received a provider update":i.severity==="error"?"Provider error reported":i.severity==="warning"?"Provider warning reported":"Received provider updates",i.icon,i.severity==="info"?c[0].order:-1)}const u=new Set(s.filter(i=>i.completed).map(i=>i.family));for(const i of s){const l=u.has(i.family);n(i.family==="read"&&!l?"Checked files":i.family==="edit"&&!l?"Worked on files":Be[i.family],i.icon,i.order)}a.size||(e.some(i=>i.kind==="thinking")?n("Thought through the task",B):e.some(i=>i.kind==="marker")?n("Activity stopped",O):n("Recorded usage",R));const r=[...a.values()].sort((i,l)=>i.order-l.order),p=o(i=>i.map((l,f)=>f?l.charAt(0).toLowerCase()+l.slice(1):l).join(", "),"join"),d=p(r.map(i=>i.label));return{label:r.length>3?`${p(r.slice(0,2).map(i=>i.label))}, and more`:d,fullLabel:d,icon:r.length===1?r[0].icon:oe}}o(He,"completedActivitySummary");var M=5,De=8;function We(e,a=!1){return a&&(e==="blocked"||e==="failed")?(0,t.jsx)(I,{className:"h-3 w-3 text-ink-3","aria-hidden":!0}):e==="in_progress"?(0,t.jsx)(ge,{className:"h-3 w-3 animate-spin text-(--status-agent-running)","aria-hidden":!0}):e==="completed"?(0,t.jsx)(de,{className:"h-3 w-3 text-(--status-task-icon-done)","aria-hidden":!0}):e==="blocked"||e==="failed"?(0,t.jsx)(ye,{className:"h-3 w-3 text-bad","aria-hidden":!0}):(0,t.jsx)(I,{className:"h-3 w-3 text-ink-3","aria-hidden":!0})}o(We,"stepStatusIcon");function Q({details:e}){return e.length===0?null:(0,t.jsx)("dl",{className:"flex min-w-0 flex-col gap-1.5","data-testid":"task-chat-provider-detail-list",children:e.map(a=>(0,t.jsxs)("div",{className:"grid min-w-0 grid-cols-1 gap-0.5 sm:grid-cols-(--gtc-task-chat-details) sm:gap-3",children:[(0,t.jsx)("dt",{className:"text-ink-3",children:a.label}),(0,t.jsx)("dd",{className:m("min-w-0 break-words text-ink",a.mono&&"font-mono"),children:a.value})]},`${a.label}:${a.value}`))})}o(Q,"DetailList");function Fe(e){try{return new URL(e).hostname.replace(/^www\./,"")}catch{return e}}o(Fe,"sourceHostname");function Oe({item:e}){const[a,n]=(0,h.useState)(!1),s=e.details.find(p=>p.label.toLowerCase()==="query"),c=e.details.filter(p=>!["action","query","status"].includes(p.label.toLowerCase())),u=a?e.links:e.links.slice(0,M),r=e.links.length-u.length;return(0,t.jsxs)("div",{className:"flex min-w-0 flex-col gap-2.5",children:[s?(0,t.jsxs)("div",{className:"min-w-0 rounded-sm bg-bg-3/40 px-2.5 py-2","data-testid":"task-chat-research-query",children:[(0,t.jsx)("p",{className:"text-(length:--text-nano) font-medium uppercase tracking-wide text-ink-3",children:"Query"}),(0,t.jsx)("p",{className:"mt-0.5 min-w-0 break-words font-mono text-(length:--text-micro) text-ink",children:s.value})]}):null,e.links.length>0?(0,t.jsxs)("div",{className:"min-w-0",children:[(0,t.jsxs)("p",{className:"mb-1 text-(length:--text-nano) font-medium uppercase tracking-wide text-ink-3",children:[e.links.length," ",e.links.length===1?"result":"results"]}),(0,t.jsx)("ol",{className:"divide-y divide-line/60","aria-label":"Research sources",children:u.map((p,d)=>(0,t.jsxs)("li",{className:"min-w-0 py-1.5 first:pt-0 last:pb-0",children:[(0,t.jsxs)("a",{className:"flex min-w-0 items-center gap-1 font-medium text-ink hover:underline",href:p.href,target:"_blank",rel:"noreferrer",children:[(0,t.jsx)("span",{className:"truncate",children:p.label}),(0,t.jsx)(D,{className:"h-3 w-3 shrink-0","aria-hidden":!0})]}),(0,t.jsxs)("p",{className:"mt-0.5 flex min-w-0 gap-2 text-ink-3",children:[(0,t.jsx)("span",{className:"shrink-0",children:Fe(p.href)}),p.description?(0,t.jsx)("span",{className:"min-w-0 truncate",children:p.description}):null]})]},`${p.href}:${d}`))}),r>0?(0,t.jsxs)("button",{type:"button",className:"mt-1.5 text-ink-3 hover:text-ink",onClick:o(()=>n(!0),"onClick"),children:["Show ",r," more ",r===1?"result":"results"]}):a&&e.links.length>M?(0,t.jsx)("button",{type:"button",className:"mt-1.5 text-ink-3 hover:text-ink",onClick:o(()=>n(!1),"onClick"),children:"Show fewer results"}):null]}):null,(0,t.jsx)(Q,{details:c}),e.output||e.outputTruncated?(0,t.jsx)("p",{className:"text-ink-3",children:"Additional provider output is available in Runner Inspector."}):null]})}o(Oe,"ResearchDetails");function Ue({item:e,neutral:a=!1}){return e.family==="research"?(0,t.jsx)(Oe,{item:e}):(0,t.jsxs)("div",{className:"flex min-w-0 flex-col gap-2",children:[e.steps.length>0?(0,t.jsx)("ol",{className:"flex flex-col gap-1","aria-label":"Plan steps",children:e.steps.map(n=>(0,t.jsxs)("li",{className:"flex min-w-0 items-start gap-2",children:[(0,t.jsx)("span",{className:"mt-0.5 shrink-0",children:We(n.status,a)}),(0,t.jsx)("span",{className:m("min-w-0",n.status==="completed"&&"text-ink-3 line-through"),children:n.label})]},n.id))}):null,e.links.length>0?(0,t.jsx)("ul",{className:"flex flex-col gap-1.5","aria-label":"Research sources",children:e.links.map(n=>(0,t.jsxs)("li",{children:[(0,t.jsxs)("a",{className:"inline-flex min-w-0 items-center gap-1 font-medium text-accent hover:underline",href:n.href,target:"_blank",rel:"noreferrer",children:[(0,t.jsx)("span",{className:"truncate",children:n.label}),(0,t.jsx)(D,{className:"h-3 w-3 shrink-0","aria-hidden":!0})]}),n.description?(0,t.jsx)("p",{className:"mt-0.5 text-ink-3",children:n.description}):null]},n.href))}):null,e.children.length>0?(0,t.jsx)("ul",{className:"flex flex-col gap-1.5","aria-label":"Delegated agents",children:e.children.map(n=>(0,t.jsxs)("li",{className:"flex min-w-0 flex-col gap-0.5",children:[(0,t.jsxs)("span",{className:"flex min-w-0 items-center gap-2",children:[(0,t.jsx)("span",{className:"font-medium text-ink",children:n.title}),(0,t.jsx)("span",{className:"capitalize text-ink-3",children:n.status}),n.metadata?(0,t.jsx)("span",{className:"min-w-0 truncate font-mono text-(length:--text-micro)",children:n.metadata}):null]}),n.summary?(0,t.jsx)("span",{className:"text-ink-3",children:n.summary}):null]},n.id))}):null,e.details.length>0?(0,t.jsx)(Q,{details:e.details}):null,e.output?(0,t.jsx)("pre",{className:"max-h-(--sz-64) overflow-auto whitespace-pre-wrap rounded-sm bg-bg-3/50 p-2 font-mono text-(length:--text-micro) text-ink",children:e.output}):null,e.outputTruncated?(0,t.jsx)("p",{className:"text-ink-3",children:"Output truncated to 8 KiB."}):null]})}o(Ue,"ProviderDetails");function qe({item:e}){if(e.files.length===0)return(0,t.jsx)("p",{className:"text-ink-3",children:"No changed-file details were reported."});const a=e.files.slice(0,De),n=e.files.length-a.length;return(0,t.jsxs)("div",{className:"min-w-0","data-testid":"task-chat-workspace-change-details",children:[(0,t.jsx)("ul",{className:"flex min-w-0 flex-col divide-y divide-line/60","aria-label":"Changed files",children:a.map(s=>(0,t.jsxs)("li",{className:"flex min-w-0 items-center gap-2 py-1.5 first:pt-0 last:pb-0",children:[(0,t.jsx)("span",{className:"min-w-0 flex-1 truncate font-mono text-ink",title:s.previousPath?`${s.previousPath} → ${s.path}`:s.path,children:s.previousPath?`${s.previousPath} → ${s.path}`:s.path}),(0,t.jsx)("span",{className:"shrink-0 capitalize text-ink-3",children:s.operation.replaceAll("_"," ")}),s.additions!=null||s.deletions!=null?(0,t.jsxs)("span",{className:"shrink-0 font-mono text-(length:--text-micro) text-ink-3",children:[s.additions==null?"":`+${s.additions}`," ",s.deletions==null?"":`−${s.deletions}`]}):null]},`${s.operation}:${s.path}`))}),n>0?(0,t.jsxs)("p",{className:"mt-1.5 text-ink-3",children:[n," more ",n===1?"file":"files"," not shown"]}):null]})}o(qe,"WorkspaceChangeDetails");function Ve({item:e}){const a={path:e.path,resourceKind:"file",line:e.line,column:null,raw:e.path};return(0,t.jsxs)("div",{className:"flex min-w-0 flex-col gap-2",children:[(0,t.jsx)(fe,{workspaceFileRef:a,label:e.path}),e.preview?e.presentation==="document"?(0,t.jsx)("div",{className:"max-h-(--sz-64) overflow-auto rounded-sm bg-bg-3/30 p-2 text-ink",children:(0,t.jsx)(T,{children:e.preview})}):(0,t.jsx)("pre",{className:"max-h-(--sz-64) overflow-auto whitespace-pre-wrap rounded-sm bg-bg-3/50 p-2 font-mono text-(length:--text-micro) text-ink",children:e.preview}):(0,t.jsx)("p",{className:"text-ink-3",children:"Preview unavailable."}),e.previewTruncated?(0,t.jsx)("p",{className:"text-ink-3",children:"Preview truncated by the runner."}):null]})}o(Ve,"WorkspaceFileDetails");function Z(e,a=!1){switch(e.surface){case"provider_activity":return e.details.length>0||e.steps.length>0||e.links.length>0||e.children.length>0||e.output||e.outputTruncated?(0,t.jsx)(Ue,{item:e,neutral:a}):null;case"workspace_change":return(0,t.jsx)(qe,{item:e});case"workspace_file":return(0,t.jsx)(Ve,{item:e});case"resource":case"runtime_request":case"run_result":case"run_terminal":return null}}o(Z,"detailContent");function J(e){if(e)try{const a=new URL(e,"https://wardmote.invalid");return a.protocol==="https:"||a.protocol==="http:"?e:void 0}catch{return}}o(J,"safeActivityHref");function Ge(e){return e.surface==="resource"?!!J(e.href):Z(e)!==null||e.surface==="provider_activity"&&!!e.summary?.trim()}o(Ge,"hasTaskChatProtocolActivityDetails");function Ke({item:e,neutral:a=!1}){const n=Z(e,a);if(e.surface==="resource"){const s=J(e.href);return s?(0,t.jsx)("a",{href:s,className:"text-ink underline",children:e.title}):(0,t.jsx)("p",{children:e.title})}return(0,t.jsxs)(t.Fragment,{children:[e.surface==="provider_activity"&&e.summary?(0,t.jsx)("p",{className:"whitespace-pre-wrap break-words",children:e.summary}):null,n]})}o(Ke,"TaskChatProtocolActivityDetails");function Y(e,a){if(e.kind==="tool"){const d=j({name:e.rawName??e.name,target:e.target}),i=a&&(e.status==="pending"||e.status==="in_progress");return{icon:d.icon,label:e.status==="failed"?d.failedLabel:e.status==="interrupted"?d.interruptedLabel:i?d.runningLabel:d.completedLabel,target:e.target,mono:!0,running:i}}if(e.kind==="thinking"){const d=a&&!!e.streaming;return{icon:B,label:d?"Thinking":"Thought",target:e.lines.filter(i=>i.trim()).at(-1)?.trim(),mono:!1,running:d}}if(e.kind==="protocol"){const d=K(e);return d?{icon:d.icon,label:Ee(e,d),target:d.detail,mono:!0,running:a&&X(e)}:null}if(e.kind==="marker")return{icon:O,label:e.label,target:e.detail,mono:!1,running:!1};const{used:n,size:s,inputTokens:c,outputTokens:u,costUsd:r}=e.usage,p=[s>0?`${n.toLocaleString()}/${s.toLocaleString()} ctx`:void 0,c!=null||u!=null?`↑${(c??0).toLocaleString()} ↓${(u??0).toLocaleString()}`:void 0,r!=null?`$${r.toFixed(4)}`:void 0].filter(Boolean).join(" · ");return{icon:R,label:e.label??"Token usage",target:p||e.detail,mono:!1,running:!1}}o(Y,"presentation");function Xe({item:e,active:a}){const n=Y(e,a);if(!n)return null;const s=n.icon;return(0,t.jsxs)("span",{className:"flex min-w-0 flex-1 items-center gap-2","data-activity-row":e.id,"data-activity-family":e.kind==="protocol"?e.surface==="provider_activity"?e.family:e.surface:void 0,children:[(0,t.jsx)("span",{className:"flex size-5 shrink-0 items-center justify-center","data-activity-icon":!0,children:(0,t.jsx)(s,{className:"size-3.5","aria-hidden":"true"})}),(0,t.jsxs)("span",{className:"flex min-w-0 flex-1 items-center gap-2 overflow-hidden whitespace-nowrap",children:[(0,t.jsx)("span",{className:m("max-w-full shrink-0 truncate text-xs",n.running&&"text-ink"),children:n.label}),n.target?(0,t.jsx)("span",{title:n.target,className:m("truncate text-xs text-ink-3",n.mono&&"font-mono"),children:n.target}):null]})]})}o(Xe,"ActivityContent");function Qe({item:e}){return e.kind==="thinking"?(0,t.jsx)(T,{softBreaks:!0,children:e.lines.join(`
2
- `)}):e.kind==="usage"?(0,t.jsx)($e,{item:e}):e.kind==="protocol"?(0,t.jsx)(Ke,{item:e,neutral:!0}):e.kind==="marker"?(0,t.jsx)("p",{className:"whitespace-pre-wrap break-words",children:e.detail??e.label}):(0,t.jsxs)(t.Fragment,{children:[e.target?(0,t.jsx)("p",{className:"break-all font-mono",children:e.target}):null,e.detail?(0,t.jsx)("pre",{className:"whitespace-pre-wrap break-words font-mono",children:e.detail}):null,e.decision?(0,t.jsxs)("p",{children:["Permission ",e.decision]}):null,e.diff?(0,t.jsxs)("p",{className:"break-all font-mono",children:[e.diff.path," · +",e.diff.added," −",e.diff.removed]}):null]})}o(Qe,"ActivityDetails");function Ze(e){return e.kind==="protocol"?Ge(e):e.kind==="thinking"?e.lines.some(a=>a.trim()):e.kind==="tool"?!!(e.target?.trim()||e.detail?.trim()||e.diff||e.decision):e.kind==="marker"?!!e.detail?.trim():!!(e.detail||e.usage.size>0||e.usage.inputTokens!=null||e.usage.outputTokens!=null||e.usage.costUsd!=null)}o(Ze,"hasActivityDetails");var Je=24;function Ye(e){const a=(0,h.useRef)(null),n=(0,h.useRef)(e),s=(0,h.useRef)(0),c=(0,h.useCallback)(()=>{const r=a.current;r&&(n.current=!0,r.scrollTop=r.scrollHeight,s.current=r.scrollTop)},[]),u=(0,h.useCallback)(()=>{const r=a.current;if(!r)return;const p=r.scrollTop,d=p-s.current;if(s.current=p,d<-24){n.current=!1;return}d>0&&r.scrollHeight-p-r.clientHeight<=Je&&(n.current=!0)},[]);return(0,h.useLayoutEffect)(()=>{e&&c()},[e,c]),(0,h.useEffect)(()=>{const r=a.current;if(!r||typeof ResizeObserver>"u")return;const p=new ResizeObserver(()=>{n.current&&(r.scrollTop=r.scrollHeight,s.current=r.scrollTop)});for(const d of r.children)p.observe(d);return()=>p.disconnect()},[]),{ref:a,onScroll:u}}o(Ye,"useFollowDetailBottom");var et=new Set;function ee(e){return e.items.filter(a=>Y(a,!1)!==null)}o(ee,"visibleActivities");function tt(e){const a=e.flatMap(n=>ee(n).map(s=>s.id));return new Set(a.slice(-3))}o(tt,"newestActivityIds");function te({item:e,active:a,auto:n,current:s=!1}){const[c,u]=A(`runner-detail:${e.id}`,n),[r,p]=(0,h.useState)(c),d=Ye(c&&s===!0);c&&!r&&p(!0);const i=(0,h.useId)(),l=Ze(e),f=(0,t.jsx)(Xe,{item:e,active:a});return(0,t.jsxs)("li",{className:"min-w-0","data-activity-item-id":e.id,"data-activity-open":l?c:void 0,"data-testid":s?"task-chat-activity-current":void 0,children:[l?(0,t.jsxs)("button",{type:"button",className:"flex h-8 w-full min-w-0 items-center gap-2 rounded-sm text-left text-ink-3 hover:text-ink focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus",onClick:o(()=>u(!c),"onClick"),"aria-expanded":c,"aria-controls":r?i:void 0,children:[f,(0,t.jsx)(_,{className:m("size-3.5 shrink-0",c&&"rotate-90"),"aria-hidden":"true"})]}):(0,t.jsx)("div",{className:"flex h-8 w-full min-w-0 items-center gap-2 text-ink-3",children:f}),l&&r?(0,t.jsx)("div",{id:i,hidden:!c,ref:d.ref,onScroll:d.onScroll,className:"flex max-h-(--sz-64) min-w-0 flex-col gap-2 overflow-y-auto rounded-md bg-bg-3/40 p-3 text-xs leading-relaxed text-ink-3 [&>*]:shrink-0","data-testid":"task-chat-runner-activity-detail",children:(0,t.jsx)("div",{className:"flex min-w-0 flex-col gap-2","data-testid":"task-chat-runner-activity-body",children:(0,t.jsx)(Qe,{item:e})})}):null]})}o(te,"ExpandedActivity");function at({phaseId:e,activities:a,openIds:n,active:s}){const[c,u]=A(`runner-earlier:${e}`,!1),r=(0,h.useId)(),p=a.at(-1),d=a.filter(l=>!n.has(l.id)).length,i=a.filter(l=>c||n.has(l.id));return(0,t.jsxs)("div",{className:"flex min-w-0 flex-col gap-1",children:[d>0?(0,t.jsxs)("button",{type:"button",className:"flex h-8 w-full min-w-0 items-center gap-2 rounded-sm text-left text-xs text-ink-3 hover:text-ink focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus","data-testid":"task-chat-activity-earlier-toggle",onClick:o(()=>u(!c),"onClick"),"aria-expanded":c,"aria-controls":r,children:[(0,t.jsx)("span",{className:"flex size-5 shrink-0 items-center justify-center",children:(0,t.jsx)(_,{className:m("size-3.5",c&&"rotate-90"),"aria-hidden":"true"})}),(0,t.jsx)("span",{children:c?`Hide ${d} earlier`:`+${d} earlier`})]}):null,(0,t.jsx)("ol",{id:r,className:"flex min-w-0 flex-col gap-1","aria-label":"Activity history","data-testid":"task-chat-runner-activity-list",children:i.map(l=>(0,t.jsx)(te,{item:l,active:s&&l===p,auto:n.has(l.id),current:l===p},l.id))})]})}o(at,"LiveActivities");function nt({phaseId:e,activities:a}){const[n,s]=A(e,!1),c=(0,h.useId)(),u=He(a),r=u.icon,p=`${a.length} ${a.length===1?"activity":"activities"}`;return(0,t.jsxs)("div",{className:"min-w-0",children:[(0,t.jsxs)("button",{type:"button",className:"flex min-h-8 w-full min-w-0 items-center gap-2 rounded-sm text-left text-ink-3 hover:text-ink focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus","data-testid":"task-chat-activity-phase-toggle",onClick:o(()=>s(!n),"onClick"),"aria-expanded":n,"aria-controls":n?c:void 0,"aria-label":`${n?"Collapse":"Expand"} ${u.fullLabel.toLowerCase()} (${p})`,children:[(0,t.jsxs)("span",{className:"flex h-8 min-w-0 flex-1 items-center gap-2 text-xs","data-completed-summary":!0,children:[(0,t.jsx)("span",{className:"flex size-5 shrink-0 items-center justify-center",children:(0,t.jsx)(r,{className:"size-3.5","aria-hidden":"true"})}),(0,t.jsx)("span",{className:"truncate",title:u.fullLabel,children:u.label})]}),(0,t.jsxs)("span",{className:"flex shrink-0 items-center gap-1 text-xs",children:[n?p:null,(0,t.jsx)(_,{className:m("size-3.5",n&&"rotate-90"),"aria-hidden":"true"})]})]}),n?(0,t.jsx)("ol",{id:c,className:"flex min-w-0 flex-col gap-1","aria-label":"Activity history","data-testid":"task-chat-runner-activity-list",children:a.map(d=>(0,t.jsx)(te,{item:d,active:!1,auto:!1},d.id))}):null]})}o(nt,"SettledActivities");function Pt({item:e,openActivityIds:a}){const n=ee(e),s=a??(e.active?tt([e]):et),c=n.some(u=>s.has(u.id));return(0,t.jsxs)("section",{className:"flex min-w-0 flex-col gap-2","data-testid":"task-chat-activity-phase","data-activity-group":e.id,"data-activity-mode":c?"live":"settled",children:[e.interstitial?(0,t.jsx)("div",{className:"min-w-0 px-1 text-sm text-ink/90","data-testid":"task-chat-phase-interstitial",children:(0,t.jsx)(T,{softBreaks:!0,linkIssueReferences:!0,children:e.interstitial.text})}):null,c?(0,t.jsx)(at,{phaseId:e.id,activities:n,openIds:s,active:e.active}):n.length>0?(0,t.jsx)(nt,{phaseId:e.id,activities:n}):null]})}o(Pt,"TaskChatRunnerActivityGroup");function Mt({browser:e,label:a="Browser",onOpen:n}){const s=e.status==="closed"||e.status==="failed";return(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-2 py-1 text-sm","aria-label":`${a} session`,children:[(0,t.jsx)(ie,{className:"size-4 shrink-0 text-ink-3","aria-hidden":!0}),(0,t.jsx)("span",{children:a}),(0,t.jsxs)("span",{className:"text-ink-3",children:["· ",e.status]}),n&&(0,t.jsx)(v,{variant:"ghost",size:"sm",onClick:o(()=>n(e.id),"onClick"),children:s?"View session":"Open browser"})]})}o(Mt,"TaskBrowserActivity");function Et({item:e}){return(0,t.jsx)("article",{className:"rounded-lg border border-line bg-bg-2 p-3","aria-label":`Project created: ${e.name}`,children:(0,t.jsxs)("div",{className:"flex items-start gap-3",children:[(0,t.jsx)(Re,{className:"mt-0.5 size-4 shrink-0 text-ink-3","aria-hidden":!0}),(0,t.jsxs)("div",{className:"min-w-0 flex-1 space-y-1",children:[(0,t.jsx)("p",{className:"text-xs text-ink-3",children:"Project created"}),(0,t.jsx)(w,{to:`/projects/${e.projectId}`,className:"break-words text-sm font-medium hover:underline focus-visible:underline",children:e.name}),e.description&&(0,t.jsx)("p",{className:"line-clamp-3 text-sm text-ink-3",children:e.description}),e.repositories.length>0&&(0,t.jsx)("ul",{className:"space-y-1 pt-1",children:e.repositories.map(a=>(0,t.jsxs)("li",{className:"flex min-w-0 items-center gap-2 text-xs text-ink-3",children:[(0,t.jsx)(H,{className:"size-3 shrink-0","aria-hidden":!0}),(0,t.jsx)("a",{className:"truncate hover:underline focus-visible:underline",href:a.url,target:"_blank",rel:"noreferrer",children:a.name})]},a.id))})]})]})})}o(Et,"TaskChatProjectCreatedCard");var st={session_start:pe,interrupted:be,turn_boundary:he};function Bt({item:e,onTryAgain:a,tryAgainPending:n=!1}){const[s,c]=(0,h.useState)(!1),u=(0,h.useId)(),r=Le(),p=e.tone==="neutral"?we:st[e.variant],d=e.variant==="interrupted"&&e.tone!=="neutral",i=e.createdAtIso?le(e.createdAtIso):void 0,l=o(()=>{Promise.resolve().then(()=>a?.()).catch(()=>{})},"handleTryAgain");if(e.credentialAccess){const{agentName:f,credentialName:g,deniedUser:b,settingsHref:y}=e.credentialAccess;return(0,t.jsxs)("div",{role:"alert","data-testid":"task-chat-credential-access-notice",className:"tc-enter-marker flex w-full items-start gap-3 rounded-lg border border-bad/40 bg-bad/10 p-4 text-sm",children:[(0,t.jsx)(xe,{className:"mt-0.5 size-5 shrink-0 text-bad","aria-hidden":!0}),(0,t.jsxs)("div",{className:"flex min-w-0 flex-1 flex-col gap-2",children:[(0,t.jsxs)("p",{className:"font-semibold text-bad",children:[f," couldn’t start"]}),(0,t.jsxs)("p",{className:"break-words font-medium text-ink",children:[f," is configured to use ",g||"an AI credential",", but ",b==="you"?"you don’t":`${b} doesn’t`," have access to that credential."]}),(0,t.jsxs)("p",{className:"text-ink-3",children:["Choose an AI connection ",b==="you"?"you can":`${b} can`," use, or ask an administrator to update ",f,"’s connection. Then try again."]}),(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-2 pt-1",children:[(0,t.jsx)(v,{asChild:!0,variant:"secondary",size:"sm",children:(0,t.jsx)(w,{to:y,children:"Change AI connection"})}),e.runHref&&(0,t.jsx)(v,{asChild:!0,variant:"ghost",size:"sm",children:(0,t.jsx)(w,{to:e.runHref,children:"View run"})})]})]})]})}return e.collapsible?(0,t.jsxs)("div",{className:"tc-enter-marker flex flex-col items-start py-1 text-xs text-ink-3","data-testid":"task-chat-collapsible-marker",children:[(0,t.jsxs)("div",{className:"flex max-w-(--pct-85) items-center gap-1.5",children:[(0,t.jsxs)("button",{type:"button",onClick:o(()=>c(f=>!f),"onClick"),"aria-expanded":s,"aria-controls":u,className:m("flex min-w-0 items-center gap-1.5 rounded-md px-2 py-0.5",d?"text-bad":"text-ink-3","hover:bg-bg-3/50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus/50"),children:[(0,t.jsx)(p,{className:"h-3.5 w-3.5 shrink-0","aria-hidden":!0}),(0,t.jsx)("span",{className:"truncate font-medium",children:e.label}),i?(0,t.jsxs)("span",{className:"shrink-0 text-ink-3/70",children:["· ",i]}):null,(0,t.jsx)(ue,{className:m("tc-notice-chevron h-3.5 w-3.5 shrink-0 transition-transform",s&&"rotate-180"),"aria-hidden":!0})]}),a&&!s?(0,t.jsx)(v,{type:"button",variant:"secondary",size:"xs",onClick:l,disabled:n,"data-testid":"task-chat-run-failed-try-again",children:n?"Trying again...":"Try again"}):null]}),s?(0,t.jsxs)("div",{id:u,"data-testid":"task-chat-collapsible-marker-details",className:"mt-1 w-full max-w-(--pct-85) overflow-hidden rounded-lg border border-line bg-bg-3/25 text-left text-sm dark:bg-bg-3/15",children:[e.detail?(0,t.jsx)("div",{className:"px-3 py-2.5 text-ink/90",children:e.detail}):null,e.runHref||e.planHref||a?(0,t.jsxs)("div",{className:"flex items-center justify-end gap-2 border-t border-line/70 bg-bg/50 px-3 py-2 dark:bg-bg/30",children:[e.planHref?(0,t.jsx)(v,{asChild:!0,variant:"ghost",size:"xs",children:(0,t.jsx)(w,{to:e.planHref,children:"View saved plan"})}):null,e.runHref?(0,t.jsx)(v,{asChild:!0,variant:"ghost",size:"xs",children:(0,t.jsx)(w,{to:e.runHref,children:"View run"})}):null,a?(0,t.jsx)(v,{type:"button",size:"xs",onClick:l,disabled:n,"data-testid":"task-chat-run-failed-try-again",children:n?"Trying again...":"Try again"}):null]}):null]}):null]}):(0,t.jsxs)("div",{className:"tc-enter-marker flex items-center gap-2 py-1 text-xs text-ink-3",role:r?"separator":void 0,"aria-label":r?e.label:void 0,children:[(0,t.jsx)("span",{className:m("h-px flex-1",d?"border-t border-dashed border-bad/50":"bg-line")}),(0,t.jsxs)("span",{className:m("flex items-center gap-1.5",d&&"text-bad"),children:[(0,t.jsx)(p,{className:"h-3.5 w-3.5"}),(0,t.jsx)("span",{className:"font-medium",children:e.label}),e.detail?(0,t.jsxs)("span",{className:"text-ink-3",children:["· ",e.detail]}):null,a?(0,t.jsx)(v,{type:"button",variant:"secondary",size:"xs",onClick:l,disabled:n,"data-testid":"task-chat-run-failed-try-again",children:n?"Trying again...":"Try again"}):null]}),(0,t.jsx)("span",{className:m("h-px flex-1",d?"border-t border-dashed border-bad/50":"bg-line")})]})}o(Bt,"TaskChatMarker");export{tt as a,It as c,Pt as i,A as l,Et as n,$e as o,Mt as r,Ae as s,Bt as t};
@@ -1 +0,0 @@
1
- var L=Object.defineProperty;var l=(e,a)=>L(e,"name",{value:a,configurable:!0});import{i as P}from"./rolldown-runtime-ZpX3ckPj.js";import{l as u,la as O,t as V,ua as H}from"./createLucideIcon-DpXjCQRS.js";import{ot as C}from"./router-DvYg2TPj.js";import{t as T}from"./bot-CPZa9Nhm.js";import{t as G}from"./check-ByoSzjU8.js";import{t as U}from"./chevron-down-BY8r8lEv.js";import{t as X}from"./chevron-right-B9tyGqmZ.js";import{t as Y}from"./circle-question-mark-Bs7m2809.js";import{t as J}from"./circle-Dov4MVoe.js";import{o as Z,t as K}from"./MarkdownBody-Dtjq3Ln7.js";import{t as ee}from"./external-link--KkXYRPz.js";import{t as I}from"./file-code-corner-CTt6xXKc.js";import{t as S}from"./file-text-Dpnp6o-I.js";import{t as se}from"./RichWorkProductCard-ButSFwSp.js";import{n as te,t as z}from"./QuestionForm-CNI1aaPv.js";import{r as ne,t as p}from"./button-CB8r2Tmh.js";import{t as q}from"./shield-check-BkZhOxSV.js";import{t as ae}from"./triangle-alert-BbGTCcEH.js";import{t as le}from"./x-B9UP51U4.js";import{a as F,n as A,s as W,t as B}from"./dialog-Bj8Y6BBR.js";import{t as re}from"./textarea-BQh3frGz.js";import{_ as ie,a as oe,f as ce,r as de}from"./TaskChatComposerTakeoverContext-DCrczoPx.js";import{$a as ue,Aa as _}from"./index-B6ALXjXD.js";var Q={name:"package-check",size:24,node:[["path",{d:"M12 22V12",key:"d0xqtd"}],["path",{d:"m16 17 2 2 4-4",key:"uh5qu3"}],["path",{d:"M21 11.127V8a2 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.729l7 4a2 2 0 0 0 2 .001l1.32-.753",key:"kpkbpo"}],["path",{d:"M3.29 7 12 12l8.71-5",key:"19ckod"}],["path",{d:"m7.5 4.27 8.997 5.148",key:"9yrvtv"}]]};Q.node;var w=V(Q),x=P(H(),1),s=P(O(),1),xe={plan:C,tool_execution:_,research:S,delegation:T,model_identity:T,context:w,artifact:w,review:q,hook:C,memory:S,safety:q,terminal:_,wait:ue,provider_notice:ae};function g(e){return["failed","blocked","denied","cancelled","interrupted"].includes(e)?"text-bad":["running","pending","in_progress","waiting"].includes(e)?"text-(--status-agent-running)":["completed","done","succeeded","passed","resolved"].includes(e)?"text-(--status-task-icon-done)":"text-ink-3"}l(g,"statusTone");function N({status:e,className:a}){return["running","pending","in_progress","waiting"].includes(e)?(0,s.jsx)(ne,{"aria-hidden":!0,className:u("h-4 w-4 animate-spin",g(e),a)}):["failed","blocked","denied","cancelled","interrupted"].includes(e)?(0,s.jsx)(le,{"aria-hidden":!0,className:u("h-4 w-4",g(e),a)}):["completed","done","succeeded","passed","resolved"].includes(e)?(0,s.jsx)(G,{"aria-hidden":!0,className:u("h-4 w-4",g(e),a)}):(0,s.jsx)(J,{"aria-hidden":!0,className:u("h-4 w-4",g(e),a)})}l(N,"StatusIcon");function j({icon:e,title:a,status:t,summary:n,children:c,testId:o,presentation:k="timeline"}){const h=(0,s.jsxs)("div",{className:"flex min-w-0 items-center gap-2",children:[(0,s.jsx)(e,{"aria-hidden":!0,className:"h-4 w-4 shrink-0 text-ink-3"}),(0,s.jsx)("strong",{className:"min-w-0 truncate text-sm font-medium text-ink",children:a}),t&&t!=="pending"?(0,s.jsxs)("span",{className:u("inline-flex shrink-0 items-center gap-1 text-xs capitalize",g(t)),children:[(0,s.jsx)(N,{status:t,className:"h-3.5 w-3.5"}),t.replaceAll("_"," ")]}):null]});return k==="takeover"?(0,s.jsxs)("article",{className:"overflow-hidden","data-testid":o,children:[(0,s.jsx)(de,{children:h}),n?(0,s.jsx)("p",{className:u("text-sm text-ink-3",!!c&&"mb-3"),children:n}):null,c]}):(0,s.jsxs)("article",{className:u("overflow-hidden",k==="timeline"&&"rounded-md border border-line bg-bg-2/60"),"data-testid":o,children:[(0,s.jsxs)("header",{className:"flex min-w-0 items-start gap-2 px-3 py-2.5",children:[(0,s.jsx)(e,{"aria-hidden":!0,className:"mt-0.5 h-4 w-4 shrink-0 text-ink-3"}),(0,s.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,s.jsxs)("div",{className:"flex min-w-0 flex-wrap items-center gap-x-2 gap-y-1",children:[(0,s.jsx)("strong",{className:"text-sm font-medium text-ink",children:a}),t?(0,s.jsxs)("span",{className:u("inline-flex items-center gap-1 text-xs capitalize",g(t)),children:[(0,s.jsx)(N,{status:t,className:"h-3.5 w-3.5"}),t.replaceAll("_"," ")]}):null]}),n?(0,s.jsx)("p",{className:"mt-1 text-sm text-ink-3",children:n}):null]})]}),c?(0,s.jsx)("div",{className:"border-t border-line/70 px-3 py-2.5",children:c}):null]})}l(j,"CardShell");function pe({steps:e}){return e.length===0?null:(0,s.jsx)("ol",{className:"flex flex-col gap-1.5","aria-label":"Plan steps",children:e.map(a=>(0,s.jsxs)("li",{className:"flex items-start gap-2 text-sm",children:[(0,s.jsx)(N,{status:a.status,className:"mt-0.5 shrink-0"}),(0,s.jsx)("span",{className:u("min-w-0 flex-1",a.status==="completed"&&"text-ink-3 line-through"),children:a.label})]},a.id))})}l(pe,"PlanSteps");function he({item:e}){const a=xe[e.family],t=e.details.length>0||e.links.length>0||e.children.length>0||!!e.output;return(0,s.jsxs)(j,{icon:a,title:e.title,status:e.status,summary:e.summary,testId:`task-chat-provider-${e.family}`,children:[e.steps.length>0?(0,s.jsx)(pe,{steps:e.steps}):null,e.children.length>0?(0,s.jsx)("ul",{className:"flex flex-col gap-2","aria-label":"Delegated agents",children:e.children.map(n=>(0,s.jsxs)("li",{className:"rounded-sm bg-bg-3/40 px-2.5 py-2 text-sm",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)(N,{status:n.status,className:"shrink-0"}),(0,s.jsx)("strong",{className:"font-medium",children:n.title}),(0,s.jsx)("span",{className:u("ml-auto text-xs capitalize",g(n.status)),children:n.status})]}),n.metadata?(0,s.jsx)("p",{className:"mt-1 text-xs text-ink-3",children:n.metadata}):null,n.summary?(0,s.jsx)("p",{className:"mt-1 text-sm text-ink-3",children:n.summary}):null]},n.id))}):null,e.links.length>0?(0,s.jsx)("ul",{className:"flex flex-col gap-2","aria-label":"Research sources",children:e.links.map(n=>(0,s.jsxs)("li",{children:[(0,s.jsxs)("a",{className:"inline-flex items-center gap-1 text-sm font-medium text-accent hover:underline",href:n.href,target:"_blank",rel:"noreferrer",children:[n.label,(0,s.jsx)(ee,{"aria-hidden":!0,className:"h-3.5 w-3.5"})]}),n.description?(0,s.jsx)("p",{className:"text-xs text-ink-3",children:n.description}):null]},n.href))}):null,t?(0,s.jsxs)("details",{className:u((e.steps.length>0||e.links.length>0||e.children.length>0)&&"mt-2"),children:[(0,s.jsxs)("summary",{className:"flex cursor-pointer list-none items-center gap-1 text-xs font-medium text-ink-3",children:[(0,s.jsx)(U,{"aria-hidden":!0,className:"h-3.5 w-3.5"})," Details"]}),e.details.length>0?(0,s.jsx)("dl",{className:"mt-2 flex min-w-0 flex-col gap-1.5 text-xs",children:e.details.map(n=>(0,s.jsxs)("div",{className:"grid min-w-0 grid-cols-1 gap-0.5 sm:grid-cols-(--gtc-task-chat-details) sm:gap-3",children:[(0,s.jsx)("dt",{className:"text-ink-3",children:n.label}),(0,s.jsx)("dd",{className:u("min-w-0 break-words text-ink",n.mono&&"font-mono"),children:n.value})]},`${n.label}:${n.value}`))}):null,e.output?(0,s.jsx)("pre",{className:"mt-2 max-h-(--sz-64) overflow-auto whitespace-pre-wrap rounded-sm bg-bg-3/50 p-2 font-mono text-xs text-ink",children:e.output}):null,e.outputTruncated?(0,s.jsx)("p",{className:"mt-1 text-xs text-ink-3",children:"Output truncated to 8 KiB."}):null]}):null]})}l(he,"ProviderActivityCard");function me(e){return(0,s.jsxs)("span",{className:"shrink-0 font-mono text-xs text-ink-3",children:[e.additions==null?"":`+${e.additions}`,e.additions!=null&&e.deletions!=null?" ":"",e.deletions==null?"":`−${e.deletions}`]})}l(me,"diffStats");function fe({item:e}){const[a,t]=(0,x.useState)(null),[n,c]=(0,x.useState)(!1),o=e.files.find(i=>i.path===a)??null,k=n?e.files:e.files.slice(0,3),h=e.totals.files||e.files.length,m=`${h} ${h===1?"file":"files"}`,b=[e.totals.additions==null?null:`+${e.totals.additions}`,e.totals.deletions==null?null:`−${e.totals.deletions}`].filter(Boolean).join(" "),d=e.complete?`${m} changed${b?` · ${b}`:""}`:"Workspace changes in progress";return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(j,{icon:C,title:"Workspace changes",status:e.complete?"completed":"running",summary:d,testId:"task-chat-workspace-change",children:[(0,s.jsx)("div",{className:"flex flex-col gap-1",children:k.map(i=>(0,s.jsxs)("button",{type:"button",className:"flex min-w-0 items-center gap-2 rounded-sm px-2 py-1.5 text-left text-sm hover:bg-bg-3/60",onClick:l(()=>t(i.path),"onClick"),children:[(0,s.jsxs)("span",{className:"min-w-0 flex-1",children:[(0,s.jsx)("span",{className:"block truncate font-mono",children:i.previousPath?`${i.previousPath} → ${i.path}`:i.path}),(0,s.jsxs)("span",{className:"text-xs capitalize text-ink-3",children:[i.binary?"binary · ":"",i.operation.replaceAll("_"," ")]})]}),me(i)]},`${i.operation}:${i.path}`))}),(0,s.jsxs)("div",{className:"mt-2 flex flex-wrap items-center gap-2",children:[e.files.length>3?(0,s.jsx)(p,{type:"button",size:"sm",variant:"ghost",onClick:l(()=>c(i=>!i),"onClick"),children:n?"Show fewer files":`Show ${e.files.length-3} more files`}):null,e.files.length>0?(0,s.jsx)(p,{type:"button",size:"sm",variant:"secondary",onClick:l(()=>t(e.files[0].path),"onClick"),children:"Review diff"}):null]})]}),(0,s.jsx)(B,{open:o!==null,onOpenChange:l(i=>{i||t(null)},"onOpenChange"),children:(0,s.jsxs)(A,{className:"w-full max-w-(--pct-90) overflow-hidden",children:[(0,s.jsx)(F,{children:(0,s.jsx)(W,{className:"font-mono text-sm",children:o?.path??"Workspace diff"})}),e.files.length>1?(0,s.jsx)("div",{className:"flex max-w-full gap-1 overflow-x-auto pb-1","aria-label":"Changed files",children:e.files.map(i=>(0,s.jsx)(p,{type:"button",size:"sm",variant:i.path===o?.path?"secondary":"ghost",onClick:l(()=>t(i.path),"onClick"),children:i.path},i.path))}):null,o?.binary?(0,s.jsx)("p",{className:"rounded-sm bg-bg-3/50 p-3 text-sm text-ink-3",children:"Binary file; text diff is unavailable."}):o?.diff?(0,s.jsx)("pre",{className:"max-h-(--sz-70vh) overflow-auto whitespace-pre rounded-sm bg-bg-3/50 p-3 font-mono text-xs",children:o.diff}):(0,s.jsx)("p",{className:"rounded-sm bg-bg-3/50 p-3 text-sm text-ink-3",children:"No inline patch was recorded for this file."})]})})]})}l(fe,"WorkspaceChangeCard");function ge({item:e}){const[a,t]=(0,x.useState)(!1),n=e.displayName.includes(".")?e.displayName.split(".").at(-1)?.toUpperCase():"FILE",c=e.presentation==="generic"?"File":je(e.presentation),o=(0,x.useMemo)(()=>({path:e.path,resourceKind:"file",line:e.line,column:null,raw:e.path}),[e.line,e.path]);return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(j,{icon:I,title:e.displayName,status:e.source==="runner_verified"?"completed":"informational",summary:`${c} · ${n}${e.line?` · line ${e.line}`:""}`,testId:"task-chat-workspace-file",children:(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,s.jsx)(Z,{workspaceFileRef:o,label:e.path}),(0,s.jsx)(p,{className:"ml-auto",type:"button",size:"sm",variant:"secondary",onClick:l(()=>t(!0),"onClick"),children:"Preview"})]})}),(0,s.jsx)(B,{open:a,onOpenChange:t,children:(0,s.jsxs)(A,{className:"w-full max-w-(--pct-90) overflow-hidden",children:[(0,s.jsx)(F,{children:(0,s.jsx)(W,{children:e.displayName})}),(0,s.jsx)("p",{className:"font-mono text-xs text-ink-3",children:e.path}),e.preview==null?(0,s.jsx)("p",{className:"rounded-sm bg-bg-3/50 p-3 text-sm text-ink-3",children:"Preview unavailable. The verified workspace reference is still available above."}):e.presentation==="document"?(0,s.jsx)("div",{className:"max-h-(--sz-70vh) overflow-auto rounded-sm bg-bg-3/30 p-3",children:(0,s.jsx)(K,{children:e.preview})}):e.presentation==="image"&&e.mediaType?.startsWith("image/")&&e.preview.startsWith("data:")?(0,s.jsx)("img",{className:"max-h-(--sz-70vh) max-w-full object-contain",alt:e.displayName,src:e.preview}):(0,s.jsx)("pre",{className:"max-h-(--sz-70vh) overflow-auto whitespace-pre-wrap rounded-sm bg-bg-3/50 p-3 font-mono text-xs",children:e.preview}),e.previewTruncated?(0,s.jsx)("p",{className:"text-xs text-ink-3",children:"Preview truncated by the runner."}):null]})})]})}l(ge,"WorkspaceFileCard");function je(e){return e.replaceAll("_"," ").replace(/\b\w/g,a=>a.toUpperCase())}l(je,"titleCaseKey");function E({item:e}){const a=e.questionSet;return a?(0,s.jsx)("div",{className:"flex flex-col gap-2","data-testid":"task-chat-runtime-request-history",children:e.response?(0,s.jsx)(te,{questionSet:a,response:e.response}):(0,s.jsxs)("div",{className:"flex flex-col gap-2 text-sm",children:[a.questions.map(t=>(0,s.jsxs)("div",{children:[t.header?(0,s.jsx)("p",{className:"text-xs font-medium text-ink-3",children:t.header}):null,(0,s.jsx)("p",{className:"text-ink",children:t.prompt})]},t.id)),(0,s.jsx)("p",{className:"text-xs text-ink-3",children:e.status==="resolved"?"Answer details were not recorded by this older runtime.":`No answers were submitted; this request was ${e.status}.`})]})}):null}l(E,"RuntimeQuestionHistory");function ke({item:e}){const a=e.status==="resolved"?"Questions answered":e.status==="cancelled"?"Questions cancelled":e.status==="expired"?"Questions expired":"Questions resolved";return(0,s.jsxs)("details",{className:"group","data-testid":"task-chat-runtime-request",children:[(0,s.jsxs)("summary",{className:"flex min-h-8 cursor-pointer list-none items-center gap-2 rounded-sm px-1 py-1.5 text-sm leading-5 text-ink-3 transition-colors hover:text-ink focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus",children:[(0,s.jsx)("span",{className:"flex w-6 shrink-0 items-center justify-center","data-testid":"task-chat-runtime-request-icon-slot",children:(0,s.jsx)(Y,{"aria-hidden":!0,className:"h-3.5 w-3.5 shrink-0 text-ink-3","data-testid":"task-chat-runtime-request-icon"})}),(0,s.jsx)("span",{children:a}),(0,s.jsx)(X,{"aria-hidden":!0,className:"ml-auto h-3 w-3 shrink-0 text-ink-3 opacity-0 transition-[opacity,transform] group-hover:opacity-70 group-focus-visible:opacity-70 group-open:rotate-90","data-testid":"task-chat-runtime-request-caret"})]}),(0,s.jsxs)("div",{className:"pb-3 pl-7 pr-1",children:[(0,s.jsxs)("div",{className:"mb-3",children:[(0,s.jsx)("p",{className:"text-sm font-medium text-ink",children:e.questionSet?.title??"Runtime input"}),(0,s.jsx)("p",{className:"mt-1 text-sm text-ink-3",children:e.prompt})]}),(0,s.jsx)(E,{item:e})]})]})}l(ke,"RuntimeQuestionReceipt");function be({item:e,onDecision:a,presentation:t,draftKey:n,imageUploadHandler:c,mentions:o}){const k=e.questionSet?.title??(e.requestType==="permission"?"Runtime permission":"Runtime input"),h=e.fields.length>0?e.fields:[{name:"answer",label:"Response",placeholder:null}],[m,b]=(0,x.useState)(()=>n?ce(n,{}):{}),[d,i]=(0,x.useState)(!1),[$,y]=(0,x.useState)(null);if((0,x.useEffect)(()=>{n||b({}),i(!1),y(null)},[n,e.requestId,e.status]),(0,x.useEffect)(()=>{n&&ie(n,m)},[n,m]),t==="timeline"&&e.requestType==="input"&&e.status!=="pending"&&e.questionSet)return(0,s.jsx)(ke,{item:e});const f=l(async r=>{if(!(!a||e.status!=="pending"||d)){i(!0),y(null);try{await a(e,r),n&&oe(n)}catch(v){i(!1),y(v instanceof Error?v.message:"The runtime request could not be resolved.")}}},"submit"),R=h.some(r=>(m[r.name]??"").trim().length>0);return t==="takeover"&&e.requestType==="input"&&e.status==="pending"&&e.questionSet?(0,s.jsx)(z,{id:e.id,questionSet:e.questionSet,draftKey:n,disabled:!a||d,imageUploadHandler:c,mentions:o,onSubmit:l(r=>f({action:"submit",response:r}),"onSubmit")}):(0,s.jsxs)(j,{icon:q,title:k,status:e.status,summary:e.prompt,testId:"task-chat-runtime-request",presentation:t,children:[e.requestType==="input"&&e.status==="pending"&&e.questionSet?(0,s.jsx)(z,{id:e.id,questionSet:e.questionSet,draftKey:n,disabled:!a||d,imageUploadHandler:c,mentions:o,onSubmit:l(r=>f({action:"submit",response:r}),"onSubmit"),onCancel:t==="timeline"?()=>f({action:"cancel"}):void 0}):e.requestType==="input"&&e.status!=="pending"&&e.questionSet?(0,s.jsx)(E,{item:e}):e.requestType==="input"&&e.status==="pending"?(0,s.jsxs)("form",{className:"flex flex-col gap-3",onSubmit:l(r=>{r.preventDefault(),R&&f({action:"submit",values:m})},"onSubmit"),children:[h.map(r=>{const v=`${e.id}:${r.name}`;return(0,s.jsxs)("label",{className:"flex flex-col gap-1.5 text-sm",htmlFor:v,children:[(0,s.jsx)("span",{className:"font-medium text-ink",children:r.label}),(0,s.jsx)(re,{id:v,value:m[r.name]??"",placeholder:r.placeholder??void 0,disabled:!a||d,rows:2,className:"resize-y border-0 bg-bg-3/35 shadow-none focus-visible:ring-0 focus-visible:ring-offset-0",onChange:l(M=>b(D=>({...D,[r.name]:M.target.value})),"onChange")})]},r.name)}),(0,s.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,s.jsx)(p,{type:"submit",size:"sm",disabled:!a||d||!R,children:d?"Submitting…":"Submit response"}),e.choices.some(r=>r.key==="decline")?(0,s.jsx)(p,{type:"button",size:"sm",variant:"secondary",disabled:!a||d,onClick:l(()=>{f({action:"decline"})},"onClick"),children:"Deny"}):null,t==="timeline"?(0,s.jsx)(p,{type:"button",size:"sm",variant:"secondary",disabled:!a||d,onClick:l(()=>{f({action:"cancel"})},"onClick"),children:"Cancel"}):null]})]}):e.status==="pending"&&e.choices.length>0?(0,s.jsx)("div",{className:"flex flex-wrap gap-2",children:e.choices.filter(r=>t==="timeline"||r.key!=="cancel").map(r=>(0,s.jsx)(p,{type:"button",size:"sm",variant:"secondary",disabled:e.status!=="pending"||!a||d,onClick:l(()=>{(r.key==="accept"||r.key==="accept_for_session"||r.key==="decline"||r.key==="cancel")&&f({action:r.key})},"onClick"),children:d?"Submitting…":r.label},r.key))}):null,e.status==="pending"&&!a?(0,s.jsx)("p",{className:"mt-2 text-xs text-ink-3",children:"Resolve this request in the active runtime session."}):null,$?(0,s.jsx)("p",{className:"mt-2 text-xs text-bad",role:"alert",children:$}):null]})}l(be,"RuntimeRequestCard");function ve({item:e}){const a=e.verification.length>0||e.remainingWork.length>0||e.artifacts.length>0||e.blocker;return(0,s.jsx)(j,{icon:w,title:"Run result",status:e.disposition,summary:e.summary,testId:"task-chat-run-result",children:a?(0,s.jsxs)("div",{className:"flex flex-col gap-3 text-sm",children:[e.blocker?(0,s.jsxs)("div",{className:"rounded-sm bg-bg-3/50 p-2",children:[(0,s.jsxs)("strong",{children:["Blocked: ",e.blocker.reasonCode]}),(0,s.jsx)("p",{className:"mt-1 text-ink-3",children:e.blocker.unblockAction})]}):null,e.verification.length>0?(0,s.jsx)("ul",{className:"flex flex-col gap-1","aria-label":"Verification results",children:e.verification.map((t,n)=>(0,s.jsxs)("li",{className:"flex items-start gap-2",children:[(0,s.jsx)(N,{status:t.status,className:"mt-0.5 shrink-0"}),(0,s.jsxs)("span",{children:[(0,s.jsx)("span",{className:"font-mono text-xs",children:t.commandOrCheck}),t.detail?(0,s.jsx)("span",{className:"block text-xs text-ink-3",children:t.detail}):null]})]},`${t.commandOrCheck}:${n}`))}):null,e.remainingWork.length>0?(0,s.jsx)("ul",{className:"list-disc space-y-1 pl-5 text-ink-3",children:e.remainingWork.map((t,n)=>(0,s.jsxs)("li",{children:[t.description,t.blocksCompletion?" · blocks completion":""]},`${t.description}:${n}`))}):null,e.artifacts.length>0?(0,s.jsx)("div",{className:"flex flex-wrap gap-2",children:e.artifacts.map(t=>(0,s.jsx)("span",{className:"rounded-sm border border-line px-2 py-1 font-mono text-xs",children:t.title??t.ref},`${t.kind}:${t.ref}`))}):null]}):null})}l(ve,"ResultCard");function Ne({item:e}){return(0,s.jsx)(j,{icon:_,title:"Run ended",status:e.runState,summary:[e.disposition.replaceAll("_"," "),e.stopReason].filter(Boolean).join(" · "),testId:"task-chat-run-terminal"})}l(Ne,"TerminalCard");function we({item:e}){if(e.resourceKind==="deliverable"&&e.workProduct)return(0,s.jsx)(se,{workProduct:e.workProduct,href:e.href});const a=e.resourceKind==="document"?S:e.resourceKind==="attachment"?I:w,t=(0,s.jsx)(j,{icon:a,title:e.title,status:null,summary:e.subtitle,testId:`task-chat-resource-${e.resourceKind}`});return e.href?(0,s.jsx)("a",{className:"block rounded-md focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus",href:e.href,children:t}):t}l(we,"ResourceCard");function Ue({item:e,onRuntimeRequestDecision:a,presentation:t="timeline",draftKey:n,imageUploadHandler:c,mentions:o}){switch(e.surface){case"provider_activity":return(0,s.jsx)(he,{item:e});case"workspace_change":return(0,s.jsx)(fe,{item:e});case"workspace_file":return(0,s.jsx)(ge,{item:e});case"runtime_request":return(0,s.jsx)(be,{item:e,onDecision:a,presentation:t,draftKey:n,imageUploadHandler:c,mentions:o});case"run_result":return(0,s.jsx)(ve,{item:e});case"run_terminal":return(0,s.jsx)(Ne,{item:e});case"resource":return(0,s.jsx)(we,{item:e});default:return e}}l(Ue,"TaskChatProtocolCard");export{Ue as n,w as r,N as t};
@@ -1,4 +0,0 @@
1
- var ve=Object.defineProperty;var l=(e,n)=>ve(e,"name",{value:n,configurable:!0});import{i as de}from"./rolldown-runtime-ZpX3ckPj.js";import{l as v,la as we,t as je,ua as ye}from"./createLucideIcon-DpXjCQRS.js";import{a as Ne,o as Se}from"./star-vweB_JDI.js";import{n as Ce}from"./ArtifactCard-CheT3r1Y.js";import{G as Te,_t as V,et as Ie,on as Re}from"./router-DvYg2TPj.js";import{o as _e,r as Ae,t as Me}from"./popover-C9GvGhqf.js";import{t as Ee}from"./arrow-down-CDBD_UhE.js";import{t as U}from"./check-ByoSzjU8.js";import{t as Le}from"./chevron-down-BY8r8lEv.js";import{t as G}from"./chevron-right-B9tyGqmZ.js";import{t as P}from"./MarkdownBody-Dtjq3Ln7.js";import{t as $e}from"./copy-BzAUsLd3.js";import{_ as Oe,a as Pe,c as He,f as ze,g as De,h as Be,l as Fe,m as We,n as Ke,o as te,p as Ue,r as Ge,s as F,t as Ve}from"./task-chat-attachments-COZdrQRo.js";import{i as qe,l as Xe,n as Ye,o as Je,r as Qe,t as Ze}from"./TaskChatMarker-2V0Oo3xV.js";import{i as et}from"./RichWorkProductCard-ButSFwSp.js";import{t as Y}from"./info-BqXpbzV2.js";import{t as tt}from"./list-todo-ByybdFTG.js";import{r as H,t as J}from"./button-CB8r2Tmh.js";import{t as nt}from"./maximize-2-pkU0hBkw.js";import{t as at}from"./octagon-alert-Do2mnwTI.js";import{t as st}from"./octagon-x-7Om5soqi.js";import{n as rt}from"./TaskChatProtocolCard-CgwNmmaw.js";import{t as it}from"./shield-check-BkZhOxSV.js";import{t as lt}from"./shield-question-mark-DJ1-iT-R.js";import{t as ot}from"./shield-x-IA54_BG9.js";import{t as ct}from"./triangle-alert-BbGTCcEH.js";import{t as z}from"./x-B9UP51U4.js";import{t as dt}from"./Identity-Jt9hiBbb.js";import{t as ut}from"./AgentAvatar-Dui4nRtK.js";import{n as D}from"./presentation-mode-3-5_ozCU.js";import{t as mt}from"./use-copy-action-DOl9yp4g.js";import{H as ht,W as ue}from"./index-B6ALXjXD.js";import{_ as pt,c as xt,d as ft,h as gt,i as kt,n as bt,o as vt,p as wt}from"./system-notice-comment-BzIsx8nv.js";import{d as jt,s as yt,t as Nt}from"./ImageGalleryModal-tTRmXGM4.js";import{b as St,s as Ct}from"./transcript-adapter-CEuUrDAp.js";import{s as ne}from"./issue-output-BzlPk1Fq.js";import{n as Tt}from"./AgentBubbleActionRow-DSmdb3Li.js";var me={name:"scissors",size:24,node:[["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M8.12 8.12 12 12",key:"1alkpv"}],["path",{d:"M20 4 8.12 15.88",key:"xgtan2"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M14.8 14.8 20 20",key:"ptml3r"}]]};me.node;var It=je(me),c=de(ye(),1),t=de(we(),1);function Rt(e,n,a){for(const r of e.querySelectorAll("[data-thread-anchor]")){const i=r.getBoundingClientRect();if(i.height>0&&i.bottom>n&&i.top<a)return{id:r.dataset.threadAnchor,top:i.top-n}}return null}l(Rt,"readThreadScrollAnchor");function he(e,n,a){if(!n)return 0;for(const r of e.querySelectorAll("[data-thread-anchor]"))if(r.dataset.threadAnchor===n.id)return r.getBoundingClientRect().top-a-n.top;return 0}l(he,"threadScrollAnchorDelta");var _t=(0,c.createContext)(null),At=(0,c.createContext)(!0);function aa(e){const n=e.state&&typeof e.state=="object"&&"taskDocumentScrollEntry"in e.state?e.state.taskDocumentScrollEntry:null;return n&&typeof n=="object"&&"key"in n&&"hash"in n&&"pathname"in n&&n.pathname===e.pathname&&typeof n.key=="string"&&typeof n.hash=="string"?{key:n.key,hash:n.hash,pathname:e.pathname}:{key:e.key,hash:e.hash,pathname:e.pathname}}l(aa,"taskChatScrollEntry");var $=new Map;function Mt(){const e=(0,c.useContext)(_t),n=(0,c.useContext)(At),a=e?JSON.stringify([e.key,e.hash]):null;return{key:e?.key,hash:e?.hash,ready:n,initialPosition(r,i,m){if(!e)return null;if(e.restore&&a&&$.has(a)){const d=$.get(a);return d.anchor&&[...r.querySelectorAll("[data-thread-anchor]")].some(u=>u.dataset.threadAnchor===d.anchor?.id)?m+he(r,d.anchor,i):d.top}if(e.hash){let d;try{d=decodeURIComponent(e.hash.slice(1))}catch{return null}const u=document.getElementById(d);if(u&&r.contains(u))return m+u.getBoundingClientRect().top-i}return null},remember(r,i){!a||!n||($.set(a,{top:r,anchor:i}),$.size>100&&$.delete($.keys().next().value))}}}l(Mt,"useTaskChatScrollNavigation");var Et={pending:{Icon:H,spin:!1,tone:"text-ink-3"},in_progress:{Icon:H,spin:!0,tone:"text-(--status-agent-running)"},completed:{Icon:U,spin:!1,tone:"text-ink-3"},failed:{Icon:z,spin:!1,tone:"text-bad"},interrupted:{Icon:z,spin:!1,tone:"text-ink-3"}};function Lt({item:e}){const{Icon:n,spin:a,tone:r}=Et[e.status],i=ue(e.rawName??e.name).icon,[m,d]=Xe(e.id,!1),u=!!(e.target||e.detail||e.diff);return(0,t.jsxs)("div",{"data-testid":"task-chat-tool-card",className:"flex min-w-0 max-w-full flex-col text-xs",children:[(0,t.jsxs)("button",{type:"button",onClick:u?()=>d(g=>!g):void 0,"aria-expanded":u?m:void 0,className:v("group/tool -mx-1.5 flex min-h-6 w-full min-w-0 max-w-full items-center gap-2 overflow-hidden rounded-sm px-1.5 py-1 text-left leading-none text-ink-3",u?"cursor-pointer transition-colors hover:bg-bg-3/60 hover:text-ink":"cursor-default"),children:[(0,t.jsx)("span",{className:"flex w-5 shrink-0 items-center justify-center",children:(0,t.jsx)(i,{className:"h-3.5 w-3.5 shrink-0","aria-hidden":!0,"data-testid":"task-chat-tool-icon"})}),(0,t.jsxs)("span",{className:"flex min-w-0 flex-1 items-baseline gap-2 overflow-hidden",children:[(0,t.jsx)("span",{className:"shrink-0 font-medium leading-4",children:e.name}),e.target?(0,t.jsx)("span",{className:"task-chat-collapsed-line-fade min-w-0 flex-1 font-mono text-(length:--text-micro) leading-4",children:e.target}):null]}),(0,t.jsxs)("span",{className:"ml-auto flex shrink-0 items-center gap-2",children:[e.decision?(0,t.jsxs)("span",{className:v("flex items-center gap-1 text-(length:--text-micro)",e.decision==="allowed"?"text-(--status-task-icon-done)":"text-bad"),children:[e.decision==="allowed"?(0,t.jsx)(it,{className:"h-3 w-3"}):(0,t.jsx)(ot,{className:"h-3 w-3"}),e.decision]}):null,u?(0,t.jsx)(G,{className:v("h-3 w-3 opacity-0 transition-[opacity,transform] group-hover/tool:opacity-80",m?"rotate-90":null),"aria-hidden":!0}):null,(0,t.jsx)(n,{className:v("h-3.5 w-3.5",r,a&&"animate-spin"),"aria-hidden":!0}),e.status==="interrupted"?(0,t.jsx)("span",{className:"text-(length:--text-micro) text-ink-3",children:"Interrupted"}):null]})]}),e.target&&m?(0,t.jsx)("div",{className:"task-chat-expanded-line-wrap ml-1.5 mt-0.5 min-w-0 max-w-full overflow-hidden border-l-2 border-line py-1 pl-2.5 font-mono text-(length:--text-micro) leading-relaxed text-ink-3","data-testid":"task-chat-tool-target-detail",children:e.target}):null,e.detail&&m?(0,t.jsx)("pre",{className:"task-chat-expanded-line-wrap ml-1.5 mt-0.5 min-w-0 max-w-full overflow-hidden whitespace-pre-wrap border-l-2 border-line py-1 pl-2.5 font-mono text-(length:--text-micro) leading-relaxed text-ink-3",children:e.detail}):null,e.diff&&m?(0,t.jsx)("div",{className:"ml-1.5 mt-0.5 border-l-2 border-line py-1 pl-2.5","data-testid":"task-chat-tool-change-summary",children:(0,t.jsxs)("div",{className:"flex min-w-0 items-center gap-2 text-(length:--text-micro) text-ink-3",children:[(0,t.jsx)("span",{className:"shrink-0",children:"Changed"}),e.diff.path?(0,t.jsx)("span",{className:"min-w-0 truncate font-mono text-ink",children:e.diff.path}):null,(0,t.jsxs)("span",{className:"ml-auto shrink-0 font-mono",children:["+",e.diff.added," −",e.diff.removed]})]})}):null]})}l(Lt,"TaskChatToolCard");function $t({item:e,defaultOpen:n,rowClassName:a,active:r=!!e.streaming}){const[i,m]=(0,c.useState)(n??!1),d=e.lines.join(`
2
- `).trim(),u=Ct(d),g=e.channel==="detail"?"Reasoning detail":"Reasoning",h=r?d?`${g}…`:"Thinking…":e.summaryLabel??(d?g:"Thought");return d&&!r?(0,t.jsxs)("div",{className:v("flex min-w-0 items-start gap-1.5 px-1 py-0.5 text-xs font-normal text-ink-3",a),"data-testid":"task-chat-thinking","data-state":"settled",children:[(0,t.jsx)("span",{className:"flex w-5 shrink-0 items-center justify-center",children:(0,t.jsx)(V,{className:"mt-0.5 h-3.5 w-3.5 shrink-0 text-ink-3/50","aria-hidden":!0,"data-testid":"task-chat-thinking-icon"})}),(0,t.jsx)("div",{className:"min-w-0 flex-1","data-testid":"task-chat-thinking-text",children:(0,t.jsx)(P,{softBreaks:!0,linkIssueReferences:!0,children:d})})]}):d?(0,t.jsxs)("div",{className:"flex min-w-0 max-w-full flex-col overflow-hidden text-xs font-normal","data-testid":"task-chat-thinking",children:[(0,t.jsxs)("button",{type:"button","aria-expanded":i,"aria-label":`${i?"Collapse":"Expand"} ${g.toLowerCase()}: ${u}`,onClick:l(()=>m(p=>!p),"onClick"),className:v("group/thinking -mx-1.5 flex w-full min-w-0 max-w-full items-center gap-2 overflow-hidden rounded-sm px-1.5 py-0.5 text-left font-normal text-ink-3 transition-colors hover:text-ink focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus",a),children:[(0,t.jsx)("span",{className:"flex w-5 shrink-0 items-center justify-center",children:(0,t.jsx)(V,{className:v("h-3.5 w-3.5 shrink-0",r&&"text-(--status-agent-running)"),"aria-hidden":!0,"data-testid":"task-chat-thinking-icon"})}),r?(0,t.jsx)("span",{className:"shimmer-text shimmer-text-muted shrink-0",children:h}):null,i?null:(0,t.jsx)("span",{className:"task-chat-collapsed-line-fade min-w-0 flex-1","data-testid":"task-chat-thinking-preview",children:u}),(0,t.jsx)(G,{className:v("tc-hover-disclosure-caret h-3 w-3 shrink-0 transition-[opacity,transform] group-hover/thinking:opacity-80 group-focus-visible/thinking:opacity-80",i?"rotate-90 opacity-80":"opacity-0"),"aria-hidden":!0})]}),i?(0,t.jsx)("div",{className:"task-chat-expanded-line-wrap ml-2.5 mt-1 min-w-0 max-w-full overflow-hidden border-l-2 border-line pl-2.5 text-xs font-normal text-ink-3",children:(0,t.jsx)(P,{className:"task-chat-reasoning-markdown",softBreaks:!0,linkIssueReferences:!0,children:d})}):null]}):(0,t.jsxs)("div",{className:v("-mx-1.5 flex min-w-0 items-center gap-2 px-1.5 py-0.5 text-xs font-normal text-ink-3",a),"data-testid":"task-chat-thinking",children:[(0,t.jsx)("span",{className:"flex w-5 shrink-0 items-center justify-center",children:(0,t.jsx)(V,{className:v("h-3.5 w-3.5 shrink-0",r&&"text-(--status-agent-running)"),"aria-hidden":!0,"data-testid":"task-chat-thinking-icon"})}),(0,t.jsx)("span",{className:v(r&&"shimmer-text shimmer-text-muted"),children:h})]})}l($t,"TaskChatThinking");var Ot={in_progress:{Icon:H,spin:!0,tone:"text-(--status-agent-running)",label:"running"},completed:{Icon:U,spin:!1,tone:"text-ink-3",label:"done"},failed:{Icon:z,spin:!1,tone:"text-bad",label:"failed"}};function Pt({item:e}){const n=(0,c.useId)(),a=St(e),{Icon:r,spin:i,tone:m,label:d}=Ot[e.status],u=e.status==="failed"?e.error:void 0;return(0,t.jsxs)("div",{role:"note","aria-label":`${a} (${d})`,"aria-describedby":u?n:void 0,"data-testid":"task-chat-todo-row","data-todo-status":e.status,className:"-mx-1.5 flex min-w-0 max-w-full flex-col overflow-hidden px-1.5 py-1 text-xs text-ink-3",children:[(0,t.jsxs)("div",{className:"flex min-h-4 min-w-0 items-center gap-2 leading-none",children:[(0,t.jsx)("span",{className:"flex w-5 shrink-0 items-center justify-center",children:(0,t.jsx)(tt,{className:"h-3.5 w-3.5 shrink-0","aria-hidden":!0})}),(0,t.jsx)("span",{className:"task-chat-collapsed-line-fade min-w-0 flex-1 truncate leading-4",title:a,children:a}),(0,t.jsx)(r,{"aria-hidden":!0,className:v("h-3.5 w-3.5 shrink-0",m,i&&"animate-spin")})]}),u?(0,t.jsx)("p",{id:n,"data-testid":"task-chat-todo-error",className:"mt-0.5 line-clamp-3 whitespace-pre-wrap break-words pl-7 leading-4 text-bad",title:u,children:u}):null]})}l(Pt,"TaskChatTodoRow");var Ht="System update",zt=80;function Dt(e){const n=e.match(/Latest retry failure: `([^`]+)`/);return n?n[1]:null}l(Dt,"retryFailureCode");function Bt(e){const n=e.match(/Recovery owner: \[([^\]]+)\]\(/)?.[1]?.trim();return n&&n.length>0?n:null}l(Bt,"recoveryOwnerName");function Ft(e){const n=e.split(`
3
- `).map(i=>i.trim()).find(i=>i.length>0);if(!n)return;const a=n.search(/[.!?](\s|$)/),r=a>=0?n.slice(0,a+1):n;return r.length<=zt?r:`${r.slice(0,79).trimEnd()}…`}l(Ft,"firstSentence");function Wt(e){const n=e.presentation?.title?.trim(),a=e.presentation?.tone;if(n)return{title:n,tone:a??"neutral"};const r=e.body??"",i=Dt(r);if(i==="claude_auth_required")return{title:"Task paused — Claude needs re-authentication",tone:a??"warning"};if(i==="configuration_incomplete"||r.includes("secret/env bindings are missing"))return{title:"Task paused — a secret/config binding is missing",tone:a??"warning"};if(i==="workspace_validation_failed"||r.includes("workspace failed validation"))return{title:"Task paused — workspace problem",tone:a??"warning"};if(r.includes("no live execution path")){const m=Bt(r);return{title:m?`Task paused — waiting on ${m}`:"Task paused — waiting on a recovery owner",tone:a??"warning"}}return{title:Ht,tone:a??"neutral",detail:Ft(r)}}l(Wt,"humanizeSystemNotice");var Kt={neutral:Y,info:Y,success:Ne,warning:ct,danger:at},Ut={neutral:"text-ink-3",info:"text-(--status-task-icon-in_progress)",success:"text-(--status-task-icon-done)",warning:"text-(--status-task-icon-todo)",danger:"text-(--status-task-icon-blocked)"};function Gt({item:e,onTryAgainNoLiveExecutionPath:n,tryAgainNoLiveExecutionPathPending:a=!1}){const r=gt(e.metadata),i=pt(e.metadata),m=D(),[d,u]=(0,c.useState)(!!e.presentation?.detailsDefaultOpen),g=(0,c.useId)(),{title:h,tone:p,detail:k}=Wt({body:e.text,presentation:e.presentation}),x=bt(e.metadata,{runAgentId:e.runAgentId}),w=!(e.presentation?.kind==="system_notice"&&e.presentation.title?.trim().toLowerCase().startsWith("workspace ready")===!0&&x.some(b=>b.title?.trim().toLowerCase()==="workspace")),C=Kt[p],N=e.createdAtIso?Re(e.createdAtIso):void 0,f=!!n&&(e.presentation?.title?.trim()==="No live execution path"||e.text.toLowerCase().includes("no live execution path")),S=l(()=>{Promise.resolve().then(()=>n?.()).catch(()=>{})},"handleTryAgain");return e.author==="system"&&i?(0,t.jsx)(kt,{...i.props},`${i.actionId}:${i.runId}`):e.author==="system"&&r?(0,t.jsx)(wt,{snapshot:r,createdAt:e.createdAtIso,defaultExpanded:e.presentation?.detailsDefaultOpen}):(0,t.jsxs)("div",{className:v("tc-enter-bubble flex flex-col items-start",m?"py-0.5":"py-1"),"data-testid":"task-chat-system-notice","data-tone":m?p:void 0,role:m?"group":void 0,"aria-label":m?`System update: ${h}`:void 0,children:[(0,t.jsxs)("div",{className:"flex max-w-(--pct-85) items-center gap-1.5",children:[(0,t.jsxs)("button",{type:"button",onClick:l(()=>u(b=>!b),"onClick"),"aria-expanded":d,"aria-controls":g,className:v("flex min-w-0 items-center gap-1.5 rounded-md px-2 py-0.5 text-xs text-ink-3","hover:bg-bg-3/50 hover:text-ink","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus/50"),children:[(0,t.jsx)(C,{className:v("h-3.5 w-3.5 shrink-0",Ut[p]),"aria-hidden":!0}),(0,t.jsx)("span",{className:"truncate font-medium",children:h}),k?(0,t.jsxs)("span",{className:"hidden truncate sm:inline",children:["· ",k]}):null,N?(0,t.jsxs)("span",{className:"shrink-0 text-ink-3/70",children:["· ",N]}):null,(0,t.jsx)(Le,{className:v("tc-notice-chevron h-3.5 w-3.5 shrink-0 transition-transform",d&&"rotate-180"),"aria-hidden":!0})]}),f&&!d?(0,t.jsx)(J,{type:"button",variant:"secondary",size:"xs",onClick:S,disabled:a,"data-testid":"task-chat-no-live-path-try-again",children:a?"Trying again...":"Try again"}):null]}),d?(0,t.jsxs)("div",{id:g,"data-testid":"task-chat-system-notice-details",className:"mt-1 w-full max-w-(--pct-85) overflow-hidden rounded-lg border border-line bg-bg-3/25 text-left text-sm dark:bg-bg-3/15",children:[w?(0,t.jsx)("div",{className:"px-3 py-2.5 text-ink/90",children:(0,t.jsx)(P,{softBreaks:!0,linkIssueReferences:!0,children:e.text})}):null,x.length>0?(0,t.jsx)("div",{className:v("bg-bg/50 dark:bg-bg/30",w&&"border-t border-line/70"),children:(0,t.jsx)(vt,{sections:x,tone:p})}):null,f?(0,t.jsx)("div",{className:"flex justify-end border-t border-line/70 bg-bg/50 px-3 py-2 dark:bg-bg/30",children:(0,t.jsx)(J,{type:"button",size:"xs",onClick:S,disabled:a,"data-testid":"task-chat-no-live-path-try-again",children:a?"Trying again...":"Try again"})}):null]}):null]})}l(Gt,"TaskChatSystemNotice");function pe({agentName:e,agentIcon:n,agent:a}){return(0,t.jsxs)("span",{className:"flex items-center gap-2 px-1","data-testid":"task-chat-agent-identity",children:[(0,t.jsx)("span",{"data-testid":"task-chat-agent-avatar",children:(0,t.jsx)(ut,{agent:a,name:e,size:24})}),(0,t.jsx)("span",{className:"text-sm font-semibold text-ink",children:e})]})}l(pe,"TaskChatAgentIdentity");function ae(e,n,a){return{id:a?.id??e,contentPath:a?.openPath??e,openPath:a?.openPath,downloadPath:a?.downloadPath,contentType:a?.contentType??"",originalFilename:n?.trim()?n:"image"}}l(ae,"galleryItemForMedia");function se(e){return e.filter((n,a)=>e.findIndex(r=>n.id&&r.id===n.id||r.url===n.url)===a)}l(se,"uniqueAttachmentRefs");function Vt(e){return ft(e.item.id)??(0,t.jsx)(qt,{...e})}l(Vt,"TaskChatBubble");function qt({item:e,animateEntry:n=!0,queuedAction:a,attachedTurn:r,beforeTurn:i,hideAgentIdentity:m=!1,actions:d,attachments:u=[],onTryAgainNoLiveExecutionPath:g,tryAgainNoLiveExecutionPathPending:h}){const p=D(),k=(0,c.useContext)(jt),x=(0,c.useContext)(et),[w,C]=(0,c.useState)(null),N=(0,c.useCallback)(o=>{x?.(o)||C(o)},[x]);if(e.interstitial)return null;if(e.author==="system")return(0,t.jsx)(Gt,{item:e,onTryAgainNoLiveExecutionPath:g,tryAgainNoLiveExecutionPathPending:h});const f=e.author==="human",S=f&&e.isCurrentUser===!0,b=f&&e.sourceChannel==="imessage-photon",{refs:I,text:T}=Ve(e.text),j=Ke(T),_=He(T),A=te(I,u),L=te(j,u),R=u.filter(o=>o.issueCommentId===e.id).map(o=>({id:o.id,name:o.originalFilename?.trim()||"attachment",url:o.contentPath,contentType:o.contentType,byteSize:o.byteSize,openPath:o.openPath,downloadPath:o.downloadPath})),s=se([...L,...A.filter(F),...R.filter(F)]),y=se([...A.filter(o=>!F(o)),...R.filter(o=>!F(o))]),M=[...s,...y.filter(o=>ne(o.contentType,o.name))],ke=w!==null&&!M.some(o=>o.url===w)?[ae(w)]:M.map(o=>ae(o.url,o.name,o)),Z=w===null?-1:Math.max(0,M.findIndex(o=>o.url===w));return(0,t.jsxs)("div",{className:v("flex w-full flex-col gap-1",n&&"tc-enter-bubble",S?"items-end":"items-start"),children:[i?(0,t.jsx)("div",{className:"w-full pb-1",children:i}):null,f&&!e.isCurrentUser&&e.authorName?(0,t.jsx)("span",{className:"px-1 text-sm font-semibold text-ink","data-testid":"task-chat-human-identity","data-author-user-id":e.authorUserId,children:(0,t.jsx)(dt,{name:e.authorName,avatarUrl:xt(e.authorAvatarUrl),size:"default",className:"gap-2"})}):null,!f&&e.authorName&&!m?(0,t.jsx)(pe,{agentName:e.authorName,agentIcon:e.agentIcon,agent:e.agent}):null,_.length>0?(0,t.jsx)("div",{"data-testid":f?"task-chat-human-bubble":"task-chat-agent-bubble",className:v("break-words py-2 text-sm",S?"max-w-(--pct-85) rounded-2xl rounded-br-sm bg-(--liveness-blue) px-3.5 text-white":"w-full bg-transparent px-1 text-ink"),children:(0,t.jsx)(P,{className:S?"wardmote-markdown-on-accent":void 0,softBreaks:!0,linkIssueReferences:!0,onImageClick:N,children:_})}):null,s.length>0?(0,t.jsxs)("div",{className:"flex max-w-(--pct-85) flex-col gap-2","data-testid":"task-chat-bubble-media",children:[(0,t.jsxs)("span",{className:"text-xs text-ink-3",children:["Images · ",s.length]}),(0,t.jsxs)("div",{className:"grid grid-cols-4 gap-2",children:[s.slice(0,s.length>4?3:4).map((o,E)=>(0,t.jsx)("button",{type:"button",className:"group aspect-video min-w-0 overflow-hidden rounded-md bg-bg-3 outline-none focus-visible:ring-2 focus-visible:ring-focus","aria-label":`Open ${o.name||`image ${E+1}`}`,onClick:l(()=>N(o.url),"onClick"),children:(0,t.jsx)("img",{src:o.openPath??o.url,alt:o.name,loading:"lazy",className:"h-full w-full object-cover transition-transform group-hover:scale-(--s-1_02)"})},o.url)),s.length>4?(0,t.jsxs)("button",{type:"button",className:"aspect-video min-w-0 rounded-md bg-bg-3 text-sm font-semibold text-ink outline-none focus-visible:ring-2 focus-visible:ring-focus","aria-label":`Open ${s.length-3} more screenshots`,onClick:l(()=>N(s[3].url),"onClick"),children:["+",s.length-3]}):null]}),(0,t.jsx)("span",{className:"truncate text-xs text-ink-3",children:s.map(o=>o.name||"image").join(" · ")})]}):null,y.length>0?(0,t.jsxs)("div",{className:"flex max-w-(--pct-85) flex-col gap-2",children:[(0,t.jsxs)("span",{className:"text-xs text-ink-3",children:["Files · ",y.length]}),(0,t.jsx)(We,{"data-testid":"task-chat-bubble-attachments",children:y.map(o=>{const E=Ge(o),be=E.icon,ee=Pe(o.byteSize),B=ne(o.contentType,o.name);return(0,t.jsxs)(Fe,{size:"sm",children:[(0,t.jsx)(Be,{className:B?"aspect-video group-data-[size=sm]/attachment:w-20":void 0,children:B?(0,t.jsx)(Ce,{artifact:{title:o.name,contentPath:o.openPath??o.url,mediaKind:"video"}}):(0,t.jsx)(be,{"aria-hidden":!0})}),(0,t.jsxs)(ze,{children:[(0,t.jsx)(De,{className:"max-w-48",children:o.name}),(0,t.jsx)(Ue,{className:"max-w-48",children:ee?`${E.label} · ${ee}`:E.label})]}),(0,t.jsx)(Oe,{"aria-label":`Open ${o.name}`,onClick:B?()=>N(o.url):void 0,render:B?(0,t.jsx)("button",{type:"button"}):(0,t.jsx)("a",{href:o.openPath??o.url,onClick:l(O=>{k&&o.id&&yt({contentType:o.contentType??"",originalFilename:o.name})&&!O.metaKey&&!O.ctrlKey&&!O.shiftKey&&!O.altKey&&(O.preventDefault(),k(o.id,o.name))},"onClick"),target:"_blank",rel:"noreferrer"})})]},o.url)})})]}):null,!f&&e.verificationCaveats?.length?(0,t.jsxs)("div",{className:"mx-1 w-(--sz-calc-7) rounded-md border border-amber-500/25 bg-amber-500/5 px-3 py-2 text-xs","data-testid":"task-chat-verification-caveats",children:[(0,t.jsx)("p",{className:"font-medium text-amber-800 dark:text-amber-200",children:"Verification caveat"}),(0,t.jsx)("ul",{className:"mt-1 space-y-1 text-ink-3",children:e.verificationCaveats.map((o,E)=>(0,t.jsxs)("li",{children:[(0,t.jsx)("span",{className:"font-mono text-ink",children:o.commandOrCheck}),o.reasonCode?` · ${o.reasonCode.replaceAll("_"," ")}`:"",o.detail?(0,t.jsx)("span",{className:"block",children:o.detail}):null]},`${o.commandOrCheck}:${E}`))})]}):null,e.optimistic?(0,t.jsxs)("span",{className:"flex items-center gap-1 px-1 text-(length:--text-micro) text-ink-3",children:[(0,t.jsx)("span",{children:e.optimistic==="queued"?"Queued":"Sending…"}),e.optimistic==="queued"?a:null]}):r?(0,t.jsx)("div",{className:"self-stretch","data-testid":"task-chat-bubble-attached-turn",children:r}):d?p?(0,t.jsxs)("div",{className:"flex w-full items-center justify-between gap-2 px-1",children:[e.timestamp||b?(0,t.jsxs)("span",{className:"text-(length:--text-micro) text-ink-3",children:[b?"Sent from iMessage":null,b&&e.timestamp?" · ":null,e.timestamp]}):null,d]}):(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[d,e.timestamp||b?(0,t.jsxs)("span",{className:"px-1 text-(length:--text-micro) text-ink-3",children:[b?"Sent from iMessage":null,b&&e.timestamp?" · ":null,e.timestamp]}):null]}):e.timestamp||b?(0,t.jsxs)("span",{className:"px-1 text-(length:--text-micro) text-ink-3",children:[b?"Sent from iMessage":null,b&&e.timestamp?" · ":null,e.timestamp]}):null,w!==null&&Z>=0?(0,t.jsx)(Nt,{items:ke,initialIndex:Z,open:!0,onOpenChange:l(o=>{o||C(null)},"onOpenChange")}):null]})}l(qt,"TaskChatBubbleContent");function sa({copyText:e,feedback:n,fastResponse:a}){const{copied:r,failed:i,copy:m}=mt(2e3),d=i?"Couldn’t copy message":"Copy message";return(0,t.jsxs)("div",{className:"flex items-center gap-0.5","data-testid":"task-chat-bubble-actions",children:[(0,t.jsx)("button",{type:"button",className:"inline-flex h-7 w-7 items-center justify-center rounded-md text-ink-3 transition-colors hover:bg-bg-3 hover:text-ink",title:d,"aria-label":d,onClick:l(()=>{m(e)},"onClick"),children:r?(0,t.jsx)(U,{className:"h-3.5 w-3.5"}):i?(0,t.jsx)(z,{className:"h-3.5 w-3.5 text-bad"}):(0,t.jsx)($e,{className:"h-3.5 w-3.5"})}),a&&(0,t.jsxs)(Me,{children:[(0,t.jsx)(_e,{asChild:!0,children:(0,t.jsx)("button",{type:"button","aria-label":"Message details",title:"Message details",className:"inline-flex h-7 w-7 items-center justify-center rounded-md text-ink-3 hover:bg-bg-3 hover:text-ink",children:(0,t.jsx)(Y,{className:"h-3.5 w-3.5"})})}),(0,t.jsx)(Ae,{className:"text-xs",children:"Platform-generated acknowledgement. The agent’s substantive response follows separately."})]}),n?(0,t.jsx)(Tt,{activeVote:n.activeVote,sharingPreference:n.sharingPreference,termsUrl:n.termsUrl,onVote:n.onVote}):null]})}l(sa,"TaskChatBubbleActions");var xe=3;function Xt(e){const n=e.split(`
4
- `).map(r=>r.trim()).filter(Boolean),a=n.findIndex(r=>/^#\s+/.test(r));return{title:a>=0?n[a].replace(/^#\s+/,"").trim():"Plan",preview:n.filter((r,i)=>i!==a&&!/^(```|~~~|---+$|\*\*\*+$|___+$)/.test(r)).map(r=>r.replace(/^#{1,6}\s+/,"").replace(/^[-*+]\s+/,"").replace(/^\d+[.)]\s+/,"").replace(/^>\s*/,"").replace(/`([^`]+)`/g,"$1").replace(/\*\*([^*]+)\*\*/g,"$1").replace(/__([^_]+)__/g,"$1").replace(/\[([^\]]+)]\([^)]*\)/g,"$1").trim()).filter(Boolean).slice(0,xe)}}l(Xt,"planPreviewContent");function Yt(e){const n=e.title.trim()&&e.title.trim().toLowerCase()!=="plan"?e.title.trim():"Plan",a=e.steps.map(r=>r.label.trim()).filter(Boolean).slice(0,xe);return a.length===0&&e.summary?.trim()&&a.push(e.summary.trim()),{title:n,preview:a}}l(Yt,"livePlanContent");function Jt(e){if(e.kind==="saved")return e.revision??e.document?.latestRevisionNumber??null;const n=e.activity.details.find(({label:r})=>r==="Revision"||r==="Document Revision");if(!n)return null;const a=Number.parseInt(n.value,10);return Number.isFinite(a)?a:null}l(Jt,"planRevision");function Qt({source:e,href:n=e.kind==="saved"?"#document-plan":null,ariaLabel:a,testId:r="task-chat-plan-preview",className:i}){const m=Jt(e),d=e.kind==="saved"&&e.document?Xt(e.document.body):e.kind==="saved"?{title:e.fallbackTitle?.trim()||"Plan",preview:[]}:Yt(e.activity),u=e.kind==="live",g=m==null?null:`rev ${m}`,h=(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 border-b border-line/70 px-3 py-2.5 text-sm text-ink-3",children:[(0,t.jsx)(Ie,{"aria-hidden":!0,className:v("h-4 w-4 shrink-0",u&&"text-(--status-agent-running)")}),(0,t.jsx)("span",{className:v("font-medium",u&&"shimmer-text shimmer-text-muted"),"data-testid":u?"task-chat-plan-streaming-status":void 0,children:u?"Writing plan":"Plan"}),g?(0,t.jsxs)("span",{className:v("text-xs",u&&"shimmer-text shimmer-text-muted"),children:["· ",g]}):null,n?(0,t.jsx)(nt,{"aria-hidden":!0,className:"ml-auto h-4 w-4 transition-transform group-hover:scale-105 group-hover:text-ink"}):null]}),(0,t.jsxs)("div",{className:"relative max-h-36 overflow-hidden px-4 py-3",children:[(0,t.jsx)("h3",{className:"text-base font-semibold leading-6 text-ink",children:d.title}),d.preview.length>0?(0,t.jsx)("ul",{className:"mt-2 space-y-1.5 text-sm leading-5 text-ink-3",children:d.preview.map((k,x)=>(0,t.jsxs)("li",{className:"flex gap-2",children:[(0,t.jsx)("span",{"aria-hidden":!0,className:"shrink-0 text-ink-3/60",children:"•"}),(0,t.jsx)("span",{className:"line-clamp-1",children:k})]},`${x}-${k}`))}):(0,t.jsx)("p",{className:"mt-1 text-sm text-ink-3",children:u?"Waiting for the first plan step…":"Open the synchronized plan to review it."}),(0,t.jsx)("div",{className:"pointer-events-none absolute inset-x-0 bottom-0 h-8 bg-linear-to-b from-transparent to-bg-2/95"})]})]}),p=v("group block w-full overflow-hidden rounded-md border border-line bg-bg-3/25 text-left",n&&"transition-colors hover:border-ink/25 hover:bg-bg-3/40 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus",i);return n?(0,t.jsx)("a",{href:n,"data-testid":r,"aria-label":a??`Open Plan${m==null?"":` revision ${m}`}`,className:p,children:h}):(0,t.jsx)("section",{"aria-label":a??"Streaming Plan preview","data-testid":r,className:p,children:h})}l(Qt,"TaskChatPlanPreviewCard");function Zt({item:e,onOpen:n}){return(0,t.jsx)("article",{className:"rounded-lg border border-line bg-bg-2 p-3","aria-label":`Skill created: ${e.name}`,children:(0,t.jsxs)("button",{type:"button",className:"flex w-full items-start gap-3 text-left",onClick:l(()=>n?.(e.skillId,e.name),"onClick"),children:[(0,t.jsx)(Te,{className:"mt-0.5 size-4 shrink-0 text-ink-3","aria-hidden":!0}),(0,t.jsxs)("span",{className:"min-w-0 flex-1 space-y-1",children:[(0,t.jsx)("span",{className:"block text-xs text-ink-3",children:"Skill created"}),(0,t.jsx)("span",{className:"block break-words text-sm font-medium hover:underline focus-visible:underline",children:e.name}),e.description?(0,t.jsx)("span",{className:"block line-clamp-3 text-sm text-ink-3",children:e.description}):null]})]})})}l(Zt,"TaskChatSkillCreatedCard");var q=["Clipping","Organizing","Sorting","Synthesizing","Analyzing","Filing","Collating","Stapling","Indexing","Annotating","Drafting","Proofreading","Alphabetizing","Photocopying","Laminating","Hole-punching","Bookmarking","Highlighting","Typing","Trimming","Aligning","Combining","Whiteboarding","Diagramming","Sketching","Labeling","Sticky-noting"],X=["Brewing","Tinkering","Distilling","Deliberating"],re=(()=>{const e=[],n=Math.max(q.length,X.length);for(let a=0;a<n;a++)a<q.length&&e.push(q[a]),a<X.length&&e.push(X[a]);return e})(),en=1e4;function tn(e){const n=(e??"").trim().toLowerCase();return n==="running"||n==="working"}l(tn,"isGenericStatusLabel");function nn(e){let n=2166136261;for(let a=0;a<e.length;a++)n^=e.charCodeAt(a),n=Math.imul(n,16777619);return n>>>0}l(nn,"fnv1a");function an(e,n=0){const a=Math.floor(Math.max(0,n)/en);return re[(nn(e)+a)%re.length]}l(an,"whimsyWord");var sn=[{name:"--motion-ease-out-expo",group:"Easing",kind:"easing"},{name:"--motion-ease-standard",group:"Easing",kind:"easing"},{name:"--motion-ease-out",group:"Easing",kind:"easing"},{name:"--motion-ease-scroll-pill-in",group:"Easing",kind:"easing"},{name:"--motion-ease-scroll-pill-out",group:"Easing",kind:"easing"},{name:"--motion-ease-in",group:"Easing",kind:"easing"},{name:"--motion-duration-instant",group:"Durations",kind:"time",min:0,max:1e3,step:10},{name:"--motion-duration-fast",group:"Durations",kind:"time",min:0,max:1e3,step:10},{name:"--motion-duration-base",group:"Durations",kind:"time",min:0,max:1e3,step:10},{name:"--motion-duration-slow",group:"Durations",kind:"time",min:0,max:1500,step:10},{name:"--motion-duration-deliberate",group:"Durations",kind:"time",min:0,max:2e3,step:10},{name:"--motion-duration-enter",group:"Durations",kind:"time",min:0,max:1e3,step:10},{name:"--motion-duration-exit",group:"Durations",kind:"time",min:0,max:1e3,step:10},{name:"--motion-duration-swap",group:"Durations",kind:"time",min:0,max:1e3,step:10},{name:"--motion-marker-enter",group:"States",kind:"time",min:0,max:1500,step:10},{name:"--motion-bubble-enter",group:"States",kind:"time",min:0,max:1500,step:10},{name:"--motion-cot-line-stagger",group:"States",kind:"time",min:0,max:300,step:5},{name:"--motion-cot-collapse",group:"States",kind:"time",min:0,max:1500,step:10},{name:"--motion-tool-enter",group:"States",kind:"time",min:0,max:1500,step:10},{name:"--motion-diff-reveal",group:"States",kind:"time",min:0,max:1500,step:10},{name:"--motion-status-enter",group:"States",kind:"time",min:0,max:1500,step:10},{name:"--motion-status-exit",group:"States",kind:"time",min:0,max:1500,step:10},{name:"--motion-approval-pulse",group:"States",kind:"time",min:0,max:3e3,step:20},{name:"--motion-plan-entry-stagger",group:"States",kind:"time",min:0,max:300,step:5},{name:"--motion-plan-check",group:"States",kind:"time",min:0,max:1500,step:10},{name:"--motion-question-page-enter",group:"States",kind:"time",min:0,max:1e3,step:10},{name:"--motion-count-tween",group:"States",kind:"time",min:0,max:1500,step:10},{name:"--motion-streaming-cursor-blink",group:"States",kind:"time",min:0,max:3e3,step:20},{name:"--motion-turn-fold",group:"States",kind:"time",min:0,max:1500,step:10},{name:"--motion-turn-meta",group:"States",kind:"time",min:0,max:1500,step:10},{name:"--motion-line-scroll",group:"States",kind:"time",min:0,max:1500,step:10},{name:"--motion-interstitial-dwell",group:"States",kind:"time",min:0,max:1e4,step:100},{name:"--motion-scroll-pill-enter",group:"States",kind:"time",min:0,max:1500,step:10},{name:"--motion-scroll-pill-exit",group:"States",kind:"time",min:0,max:1500,step:10},{name:"--motion-mobile-nav-enter",group:"States",kind:"time",min:0,max:1500,step:10},{name:"--motion-mobile-nav-exit",group:"States",kind:"time",min:0,max:1500,step:10},{name:"--motion-scrollbar-idle-delay",group:"States",kind:"time",min:0,max:2e3,step:10},{name:"--motion-pane-glide",group:"States",kind:"time",min:0,max:1500,step:10},{name:"--motion-side-panel-tab",group:"States",kind:"time",min:0,max:1500,step:10},{name:"--motion-live-now-breathe",group:"States",kind:"time",min:0,max:5e3,step:100}],ra=[{label:"ease-out-expo (house)",value:"cubic-bezier(0.16, 1, 0.3, 1)"},{label:"standard (house)",value:"cubic-bezier(0.4, 0, 0.2, 1)"},{label:"ease-out",value:"cubic-bezier(0, 0, 0.2, 1)"},{label:"ease-in-out",value:"cubic-bezier(0.42, 0, 0.58, 1)"},{label:"linear",value:"linear"}],ia=Array.from(new Set(sn.map(e=>e.group)));function fe(e){const n=e.trim();if(n.endsWith("ms"))return parseFloat(n);if(n.endsWith("s"))return parseFloat(n)*1e3;const a=parseFloat(n);return Number.isFinite(a)?a:0}l(fe,"parseCssTimeMs");function rn(e){if(e==null)return null;const n=Math.round(e/1e3);return n<60?`${n}s`:`${Math.floor(n/60)}m ${n%60}s`}l(rn,"elapsedLabel");function ln(e){if(e==null)return null;const n=Math.max(0,e)/1e3;return n<60?`${n.toFixed(1)}s`:`${Math.floor(n/60)}m ${(n%60).toFixed(1)}s`}l(ln,"liveElapsedLabel");function on(e,n){const[a,r]=(0,c.useState)(()=>Date.now());return(0,c.useEffect)(()=>{if(e==null||!n)return;const i=window.setInterval(()=>r(Date.now()),100);return()=>window.clearInterval(i)},[e,n]),e==null?void 0:Math.max(0,a-e)}l(on,"useLiveElapsedMs");function cn(e,n){return!Number.isFinite(e)||!Number.isFinite(n)||n<=0?0:Math.max(0,Math.round(e/n)-1)}l(cn,"lineScrollOffset");function W(e){const n=getComputedStyle(document.documentElement).getPropertyValue(e),a=fe(n);return Number.isFinite(a)?a:0}l(W,"motionTokenMs");function dn({text:e,streaming:n,leaving:a}){const r=(0,c.useRef)(null),[i,m]=(0,c.useState)(0),[d,u]=(0,c.useState)(!1),[g,h]=(0,c.useState)(!1);(0,c.useLayoutEffect)(()=>{const k=r.current;if(!k)return;const x=l(()=>{const C=parseFloat(window.getComputedStyle(k).lineHeight);m(cn(k.scrollHeight,C))},"measure");if(x(),typeof ResizeObserver>"u")return;const w=new ResizeObserver(x);return w.observe(k),()=>w.disconnect()},[e,n]),(0,c.useEffect)(()=>{const k=requestAnimationFrame(()=>u(!0)),x=window.setTimeout(()=>h(!0),W("--motion-line-scroll"));return()=>{cancelAnimationFrame(k),window.clearTimeout(x)}},[]);const p=d?a?-1:n?-i:0:1;return(0,t.jsx)("span",{className:"tc-line-scroll min-w-0 flex-1","data-testid":"task-chat-live-self-talk","data-streaming":n||void 0,"data-leaving":a||void 0,children:(0,t.jsx)("span",{ref:r,className:v("tc-line-scroll-inner block",!n&&"truncate"),style:{transform:p!==0?`translateY(calc(${p} * 1lh))`:void 0,transition:g&&!a?"none":void 0},children:e})})}l(dn,"LiveSelfTalkLine");function un(e,n){const[a,r]=(0,c.useState)(null),i=(0,c.useRef)(a),m=(0,c.useRef)(null),d=(0,c.useRef)(e),u=(0,c.useRef)(0),g=(0,c.useRef)(null),h=(0,c.useRef)(null),p=(0,c.useRef)(null);return d.current=e,(0,c.useEffect)(()=>{const k=l(f=>{f.current!=null&&(window.clearTimeout(f.current),f.current=null)},"clear"),x=l(f=>{i.current=f,r(f)},"show"),w=l(()=>{k(h),k(p),h.current=window.setTimeout(()=>{if(h.current=null,m.current!=null)return;const f=i.current;f==null||f.streaming||(x({...f,leaving:!0}),p.current=window.setTimeout(()=>{p.current=null,i.current?.leaving&&x(null)},W("--motion-line-scroll")))},W("--motion-interstitial-dwell"))},"scheduleLeave"),C=l((f,S)=>{k(h),k(p),u.current=Date.now(),x({text:f,streaming:S,swapKey:(i.current?.swapKey??0)+1}),S||w()},"swapIn");if(!n){k(g),k(h),k(p),m.current=null,i.current&&x(null);return}const N=i.current;if(e==null){N?.streaming&&(x({...N,streaming:!1}),w());return}if(N==null){C(e,!0);return}if(N.streaming){N.text!==e&&x({...N,text:e});return}if(m.current=e,g.current==null){const f=W("--motion-interstitial-dwell"),S=Math.max(0,u.current+f-Date.now());g.current=window.setTimeout(()=>{g.current=null;const b=m.current;m.current=null,b!=null&&C(b,d.current!=null)},S)}},[e,n]),(0,c.useEffect)(()=>()=>{g.current!=null&&window.clearTimeout(g.current),h.current!=null&&window.clearTimeout(h.current),p.current!=null&&window.clearTimeout(p.current)},[]),a}l(un,"useHeldSelfTalk");var mn={running:{Icon:H,spin:!0,tone:"text-(--status-agent-running)"},working:{Icon:H,spin:!0,tone:"text-(--status-agent-running)"},awaiting_approval:{Icon:lt,spin:!1,tone:"text-accent"},interrupted:{Icon:st,spin:!1,tone:"text-bad"},refused:{Icon:Se,spin:!1,tone:"text-bad"},truncated:{Icon:It,spin:!1,tone:"text-(--status-agent-paused)"}};function ge({item:e,onApprovalDecision:n,chevronOpen:a,onToggle:r}){const{Icon:i,spin:m,tone:d}=mn[e.status],u=e.status==="awaiting_approval",g=e.status==="running"||e.status==="working",h=on(e.startedAtMs,g),p=un(g?e.selfTalk:void 0,g),k=rn(e.elapsedMs);if(g){const x=ln(h??e.elapsedMs),w=e.selfTalk!=null,C=e.toolName?ue(e.toolName).icon:w?null:ht(e.label),N=w||tn(e.label)?an(e.id,h??e.elapsedMs??0):e.label,f=(0,t.jsxs)("div",{className:"tc-enter-status flex items-center gap-2 py-0.5 text-xs text-ink-3",children:[a!==void 0?(0,t.jsx)("span",{className:"flex h-3.5 w-3.5 shrink-0 items-center justify-center","data-testid":"task-chat-status-caret-slot",children:(0,t.jsx)(G,{className:v("h-3 w-3 transition-transform",a?"rotate-90":null),"aria-hidden":!0})}):null,(0,t.jsx)("span",{className:"flex h-3.5 w-3.5 shrink-0 items-center justify-center","data-testid":"task-chat-status-dot-slot",children:(0,t.jsx)("span",{"aria-hidden":!0,className:"h-2 w-2 animate-pulse rounded-full bg-(--status-agent-running)"})}),C?(0,t.jsx)(C,{className:"h-3.5 w-3.5 shrink-0","aria-hidden":!0}):null,(0,t.jsxs)("span",{className:"flex min-w-0 flex-1 items-baseline gap-2",children:[(0,t.jsxs)("span",{className:"shimmer-text shimmer-text-muted shrink-0 font-medium",children:[N,"…"]}),x?(0,t.jsx)("span",{className:"shrink-0 font-mono tabular-nums text-(length:--text-micro)",children:x}):null,e.detail?(0,t.jsx)("span",{className:"min-w-0 truncate font-mono text-(length:--text-micro)",children:e.detail}):null,e.tokens?(0,t.jsxs)("span",{className:"ml-auto shrink-0 font-mono text-(length:--text-micro)",children:[e.tokens.used.toLocaleString(),"/",e.tokens.size.toLocaleString()," ctx"]}):null]})]});return(0,t.jsxs)("div",{className:"flex flex-col",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 py-0.5 text-xs text-ink-3","data-testid":"task-chat-interstitial-row",children:[(0,t.jsx)("span",{"aria-hidden":!0,className:"h-3.5 w-3.5 shrink-0"}),p?(0,t.jsx)(dn,{text:p.text,streaming:p.streaming,leaving:p.leaving},p.swapKey):(0,t.jsx)("span",{"aria-hidden":!0,className:"tc-line-scroll min-w-0 flex-1"})]}),r?(0,t.jsx)("button",{type:"button",onClick:r,"aria-expanded":a,className:"-mx-1.5 block w-full rounded-sm px-1.5 text-left transition-colors hover:bg-bg-3/60","data-testid":"task-chat-live-turn",children:f}):f]})}return(0,t.jsxs)("div",{className:v("tc-enter-status flex flex-col gap-2 rounded-lg border px-3 py-2 text-sm",u?"tc-approval border-accent/40 bg-accent/5":"border-line bg-bg-3/40"),children:[(0,t.jsxs)("div",{className:"flex min-w-0 items-center gap-2",children:[(0,t.jsx)(i,{className:v("h-4 w-4 shrink-0",d,m&&"animate-spin")}),(0,t.jsx)("span",{className:"min-w-0 truncate font-medium",children:e.label}),(0,t.jsxs)("span",{className:"ml-auto flex shrink-0 items-center gap-2 text-xs text-ink-3",children:[k?(0,t.jsx)("span",{children:k}):null,e.tokens?(0,t.jsxs)("span",{children:[e.tokens.used.toLocaleString(),"/",e.tokens.size.toLocaleString()," ctx"]}):null]})]}),e.detail?(0,t.jsx)("p",{className:"text-xs text-ink-3",children:e.detail}):null,u&&e.approval?(0,t.jsx)("div",{className:"flex flex-wrap justify-end gap-2 pt-1",children:e.approval.options.map(x=>{const w=x.kind.startsWith("reject");return(0,t.jsx)(J,{variant:w?"secondary":"primary",size:"xs",type:"button",onClick:l(()=>n?.(x.id),"onClick"),children:x.label},x.id)})}):null]})}l(ge,"TaskChatStatusPill");function ie(e){const n=[];return e.durationLabel&&n.push(e.durationLabel),e.toolCount>0&&n.push(`${e.toolCount} tool${e.toolCount===1?"":"s"}`),(e.added>0||e.removed>0)&&n.push(`+${e.added} −${e.removed}`),e.tokensLabel&&n.push(e.tokensLabel),n.join(" · ")}l(ie,"turnSummaryMetrics");function le({item:e,renderChild:n,timestampPrefix:a,leading:r}){const i=D(),m=!e.settled&&e.liveStatus!=null;if(e.standaloneHeader)return(0,t.jsxs)("div",{"data-testid":"task-chat-turn","data-settled":e.settled?"true":"false",children:[e.agentName||!e.historical?(0,t.jsxs)("div",{className:"flex min-h-8 w-full min-w-0 items-center gap-2 pb-1 pt-1.5 text-sm text-ink-3","data-testid":"task-chat-turn-summary","data-turn-position":"identity",children:[e.agentName?(0,t.jsx)(pe,{agentName:e.agentName,agentIcon:e.agentIcon,agent:e.agent}):null,e.historical?null:(0,t.jsxs)("span",{className:"min-w-0 truncate",children:[e.continuedAfterSteering?"Continued after steering · ":"",e.summary.durationLabel?`${e.summary.failed?"Stopped":"Worked"} for ${e.summary.durationLabel}`:e.summary.failed?"Stopped":"Worked"]})]}):null,e.items.length>0?(0,t.jsx)("div",{className:"flex min-w-0 flex-col gap-2 py-1","data-testid":"task-chat-turn-timeline",children:e.items.map(j=>(0,t.jsx)("div",{className:"min-w-0","data-testid":"task-chat-turn-timeline-row","data-timeline-row-id":j.id,"data-thread-anchor":j.id,children:n(j)},j.id))}):null,e.finalResponse?(0,t.jsx)("div",{className:"w-full","data-testid":"task-chat-final-response",children:(0,t.jsx)("div",{className:"break-words px-1 py-2 text-sm text-ink","data-testid":"task-chat-agent-bubble",children:(0,t.jsx)(P,{softBreaks:!0,linkIssueReferences:!0,children:e.finalResponse.text})})}):null]});const d=e.settled?e.items.filter(j=>j.kind==="protocol"&&j.surface==="runtime_request"):[],u=new Set(d.map(j=>j.id)),g=d.length>0?e.items.filter(j=>!u.has(j.id)):e.items,[h,p]=(0,c.useState)(()=>!e.settled&&e.liveStatus==null),[k,x]=(0,c.useState)(h);h&&!k&&x(!0);const[w,C]=(0,c.useState)(e.settled),[N,f]=(0,c.useState)(m);m&&!N&&f(!0),e.settled!==w&&(C(e.settled),e.settled&&!N&&p(!1));const S=g.length>0,b=(e.settled||m)&&!h,I=e.summary.failed?z:U,T=e.settled&&(!e.historical||S)?(0,t.jsxs)("button",{type:"button",onClick:l(()=>p(j=>!j),"onClick"),"aria-expanded":h,className:v("group flex w-full items-center gap-2 px-1 text-ink-3 transition-colors hover:text-ink",e.standaloneHeader?"border-b border-line/70 py-2 text-sm":"py-0.5 text-xs",i&&"min-w-0"),"data-testid":"task-chat-turn-summary",children:[a?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:"text-(length:--text-micro)",children:a}),(0,t.jsx)("span",{"aria-hidden":!0,className:"text-(length:--text-micro)",children:"·"})]}):null,!e.standaloneHeader&&!e.historical?(0,t.jsx)(I,{className:"h-3.5 w-3.5 shrink-0"}):null,(0,t.jsx)("span",{children:e.historical?"Activity":e.standaloneHeader&&e.summary.durationLabel?`${e.summary.failed?"Stopped":"Worked"} for ${e.summary.durationLabel}`:e.summary.failed?"Stopped":"Worked"}),!e.standaloneHeader&&ie(e.summary)?(0,t.jsx)("span",{className:"tc-turn-metrics","data-visible":h?"true":"false",children:(0,t.jsx)("span",{className:"min-w-0 overflow-hidden whitespace-nowrap font-mono text-(length:--text-micro)",children:ie(e.summary)})}):null,(0,t.jsx)(G,{className:v("h-3 w-3 shrink-0 transition-transform",e.standaloneHeader&&"ml-auto",h?"rotate-90":null),"aria-hidden":!0})]}):m?(0,t.jsx)(ge,{item:e.liveStatus,chevronOpen:S?h:void 0,onToggle:S?()=>p(j=>!j):void 0}):null;return(0,t.jsxs)("div",{"data-testid":"task-chat-turn","data-settled":e.settled?"true":"false",children:[r?i?(0,t.jsxs)("div",{className:"flex w-full items-center justify-between gap-2",children:[(0,t.jsx)("div",{className:"min-w-0",children:T}),(0,t.jsx)("div",{className:"shrink-0",children:r})]}):(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[r,T]}):T,(0,t.jsx)("div",{className:"tc-turn-fold","data-folded":b?"true":"false","aria-hidden":b,children:(0,t.jsx)("div",{children:(0,t.jsx)("div",{className:"flex flex-col gap-2 pt-1",children:k&&g.map(j=>(0,t.jsx)("div",{children:n(j)},j.id))})})}),d.length>0?(0,t.jsx)("div",{className:"flex flex-col gap-2 pt-2","data-testid":"task-chat-turn-persistent-history",children:d.map(j=>(0,t.jsx)("div",{children:n(j)},j.id))}):null]})}l(le,"TaskChatTurn");function hn({children:e,className:n}){return(0,t.jsx)("div",{"data-slot":"task-chat-sticky-header-actions",className:v("sticky top-[calc(var(--mobile-topbar-h,0.5rem)+0.5rem)] z-10 h-0",n),children:(0,t.jsx)("div",{className:"absolute right-0 top-0 rounded-md bg-bg/90 backdrop-blur-sm",children:e})})}l(hn,"TaskChatStickyHeaderActions");var pn=48;function oe(){return typeof window>"u"||typeof window.matchMedia!="function"?!0:window.matchMedia("(prefers-reduced-motion: reduce)").matches}l(oe,"motionDisabled");function xn({children:e,contentKey:n,className:a}){const r=D(),i=Mt(),m=(0,c.useRef)(!1),d=(0,c.useRef)({key:i.key,hash:i.hash}),u=(0,c.useRef)(null),g=(0,c.useRef)(null),h=(0,c.useRef)(!0),p=(0,c.useRef)(!1),k=(0,c.useRef)(null),x=(0,c.useRef)(null),w=(0,c.useRef)(null),[C,N]=(0,c.useState)("hidden"),f=(0,c.useCallback)(()=>{const s=u.current;if(!s)return;s.dataset.scrollActive="true",x.current!==null&&window.clearTimeout(x.current);const y=w.current??fe(getComputedStyle(document.documentElement).getPropertyValue("--motion-scrollbar-idle-delay"));w.current=y,x.current=window.setTimeout(()=>{delete s.dataset.scrollActive,x.current=null,w.current=null},y)},[]),S=(0,c.useCallback)(()=>{N("in")},[]),b=(0,c.useCallback)(()=>{N(s=>s==="hidden"?s:oe()?"hidden":"out")},[]),I=(0,c.useCallback)(()=>{const s=u.current;return s?s.scrollHeight-s.scrollTop-s.clientHeight<=pn:!0},[]),T=(0,c.useCallback)(()=>{const s=u.current;s&&(s.scrollTop=s.scrollHeight)},[]),j=(0,c.useCallback)(()=>{const s=u.current;if(!s)return!1;const y=k.current,M=s.clientHeight;return k.current=M,y==null||y<=0||y===M||!h.current?!1:(T(),!0)},[T]),_=(0,c.useCallback)(()=>{const s=u.current;if(!s)return;const y=s.getBoundingClientRect();g.current=Rt(s,y.top,y.bottom),m.current&&i.remember(s.scrollTop,g.current)},[i.key,i.hash,i.ready]),A=(0,c.useCallback)(()=>{const s=u.current;if(s){if(p.current&&(p.current=!1,h.current=!0,b()),h.current)T();else{const y=he(s,g.current,s.getBoundingClientRect().top);y&&(s.scrollTop+=y)}_()}},[_,T,b]),L=(0,c.useCallback)(()=>{if(_(),f(),j()){b();return}const s=I();if(p.current){s&&(p.current=!1,h.current=!0,b());return}h.current=s,s?b():S()},[_,j,I,b,S,f]),R=(0,c.useCallback)(()=>{const s=u.current;if(s){if(I()){h.current=!0,b();return}p.current=!0,typeof s.scrollTo=="function"&&!oe()?s.scrollTo({top:s.scrollHeight,behavior:"smooth"}):(s.scrollTop=s.scrollHeight,p.current=!1,h.current=!0,b())}},[I,b]);return(0,c.useEffect)(()=>{const s=u.current;if(!s)return;const y=l(()=>{p.current&&(p.current=!1,h.current=!1,S())},"cancelEasing");return s.addEventListener("wheel",y,{passive:!0}),s.addEventListener("touchstart",y,{passive:!0}),()=>{s.removeEventListener("wheel",y),s.removeEventListener("touchstart",y)}},[S]),(0,c.useEffect)(()=>()=>{x.current!==null&&window.clearTimeout(x.current)},[]),(0,c.useLayoutEffect)(()=>{const s=u.current;if(!s||(k.current=s.clientHeight,typeof ResizeObserver>"u"))return;const y=new ResizeObserver(()=>{j()&&b(),A()});return y.observe(s),s.firstElementChild&&y.observe(s.firstElementChild),()=>y.disconnect()},[j,b,A]),(0,c.useLayoutEffect)(()=>{const s=u.current;if((d.current.key!==i.key||d.current.hash!==i.hash)&&(d.current={key:i.key,hash:i.hash},m.current=!1),s&&i.ready&&!m.current){const y=i.initialPosition(s,s.getBoundingClientRect().top,s.scrollTop);y!==null&&(s.scrollTop=y,h.current=I(),_()),m.current=!0}A()},[n,A,i.key,i.hash,i.ready]),(0,t.jsxs)("div",{className:"relative min-h-0 flex-1",children:[(0,t.jsx)("div",{ref:u,onScroll:L,className:v("task-chat-scroll-viewport scrollbar-while-scrolling absolute inset-y-0 left-0 overflow-y-auto",r?"-right-4 overflow-x-hidden pr-4 md:-right-6 md:pr-6":"right-0",a),"data-testid":"task-chat-scroller",children:e}),C!=="hidden"?(0,t.jsx)("button",{type:"button","aria-label":"Scroll to latest",onClick:R,onAnimationEnd:l(()=>{C==="out"&&N("hidden")},"onAnimationEnd"),className:v("absolute left-1/2 flex size-8 items-center justify-center rounded-full border border-line bg-bg shadow-sm hover:bg-bg-3",r?"bottom-7":"bottom-3",C==="out"?"tc-scroll-pill-out":"tc-scroll-pill-in"),children:(0,t.jsx)(Ee,{className:"h-4 w-4"})}):null]})}l(xn,"TaskMessageScroller");var fn=[];function K(e,n,a,r,i,m,d,u="classic",g,h=!1,p,k,x,w=[],C,N){switch(e.kind){case"browser":return(0,t.jsx)(Qe,{browser:e.browser,label:e.label,onOpen:N});case"project_created":return(0,t.jsx)(Ye,{item:e});case"skill_created":return(0,t.jsx)(Zt,{item:e,onOpen:C});case"message":{const f=i?.(e),S=e.attachedTurn?.standaloneHeader?{...e.attachedTurn,agentName:e.attachedTurn.agentName??e.authorName,agentIcon:e.attachedTurn.agentIcon??e.agentIcon,agent:e.attachedTurn.agent??e.agent}:e.attachedTurn,b=S?(0,t.jsx)(le,{item:S,timestampPrefix:S.standaloneHeader?void 0:e.timestamp,leading:S.standaloneHeader?void 0:f,renderChild:l(I=>K(I,n,void 0,void 0,void 0,void 0,d,e.attachedTurn?.standaloneHeader?"runner":"classic",void 0,!1,void 0,void 0,void 0,w,C,N),"renderChild")}):void 0;return(0,t.jsx)(Vt,{item:e,animateEntry:!1,actions:e.attachedTurn?.standaloneHeader?f:e.attachedTurn?void 0:f,queuedAction:m?.(e),beforeTurn:e.attachedTurn?.standaloneHeader?b:void 0,attachedTurn:e.attachedTurn?.standaloneHeader?void 0:b,hideAgentIdentity:!!e.attachedTurn?.standaloneHeader,onTryAgainNoLiveExecutionPath:g,tryAgainNoLiveExecutionPathPending:h,attachments:w})}case"marker":return(0,t.jsx)(Ze,{item:e,onTryAgain:e.id===p&&e.retryable!==!1?e.runId&&k?()=>k(e.runId):g:void 0,tryAgainPending:e.runId?x===e.runId:h});case"thinking":return(0,t.jsx)($t,{item:e});case"tool":return(0,t.jsx)(Lt,{item:e});case"status":return(0,t.jsx)(ge,{item:e,onApprovalDecision:l(f=>n?.(e.id,f),"onApprovalDecision")});case"usage":return(0,t.jsx)(Je,{item:e});case"activity_phase":return(0,t.jsx)(qe,{item:e});case"interaction":return a?a(e):null;case"plan_document":return(0,t.jsx)(Qt,{source:{kind:"saved",document:e.document},testId:e.placement==="fallback"?"task-chat-plan-preview-fallback":"task-chat-plan-preview"});case"todo":return(0,t.jsx)(Pt,{item:e});case"brief":return r?r():null;case"turn":return(0,t.jsx)(le,{item:e,renderChild:l(f=>K(f,n,void 0,void 0,void 0,void 0,d,e.standaloneHeader?"runner":"classic",void 0,!1,void 0,void 0,void 0,w,C,N),"renderChild")});case"protocol":return(0,t.jsx)(rt,{item:e,onRuntimeRequestDecision:d});default:return e}}l(K,"renderItem");function ce(e){return e.kind==="marker"||e.kind==="message"&&e.author==="system"}l(ce,"isSystemLikeItem");function gn(e,n){if(!n)return;const a=ce(e),r=ce(n);return a&&r?"mt-2":a||r||e.kind==="turn"||n.kind==="turn"?"mt-3":e.kind==="interaction"||n.kind==="interaction"?"mt-4":"mt-6"}l(gn,"taskChatItemSpacingClass");function la({items:e,header:n,headerActions:a,onApprovalDecision:r,onRuntimeRequestDecision:i,renderInteraction:m,renderBrief:d,renderMessageActions:u,renderQueuedAction:g,onTryAgainNoLiveExecutionPath:h,tryAgainNoLiveExecutionPathPending:p=!1,onRetryFailedRun:k,retryFailedRunId:x=null,tail:w,contentKey:C,className:N,scroll:f=!0,attachments:S=fn,onOpenSkill:b,onOpenBrowser:I}){const T=D();let j;if(k||h)for(let R=e.length-1;R>=0;R-=1){const s=e[R];if(s.kind==="marker"&&s.variant==="interrupted"&&(s.label==="Run failed"||s.label==="Usage limit reached")){j=s.id;break}}const _=(0,c.useMemo)(()=>{const R=T?e.map(s=>({item:s,content:K(s,r,m,d,u,g,i,"classic",h,p,j,k,x,S,b,I)})).filter(s=>s.content!==null):[];return(0,t.jsx)(t.Fragment,{children:T?R.map(({item:s,content:y},M)=>(0,t.jsx)("div",{"data-thread-anchor":s.kind==="message"?s.renderKey??s.id:s.id,id:s.kind==="message"?`comment-${s.id}`:void 0,className:gn(s,R[M-1]?.item??null),"data-thread-item-kind":s.kind==="message"?s.author:s.kind,children:y},s.kind==="message"?s.renderKey??s.id:s.id)):e.map((s,y)=>(0,t.jsx)("div",{"data-thread-anchor":s.kind==="message"?s.renderKey??s.id:s.id,id:s.kind==="message"?`comment-${s.id}`:void 0,className:v(y>0&&s.kind==="interaction"&&s.interaction.status!=="pending"&&"-mt-3"),children:K(s,r,m,d,u,g,i,"classic",h,p,j,k,x,S,b,I)},s.kind==="message"?s.renderKey??s.id:s.id))})},[e,T,r,i,m,d,u,g,h,p,j,k,x,S,b,I]),A=(0,c.useMemo)(()=>kn(e),[e]),L=(0,t.jsxs)("div",{className:v("wardmote-mobile-thread mx-auto flex w-full max-w-(--tc-shell-max-w) flex-col px-1 py-3 md:px-4 md:py-4",T?"md:px-0":"gap-5",N),children:[a?(0,t.jsx)(hn,{className:T?void 0:"-mb-5",children:a}):null,n?(0,t.jsx)("div",{className:v("flex flex-col gap-6",T?"pb-4":"pb-2"),"data-testid":"task-chat-thread-header",children:n}):null,_,w?T?(0,t.jsx)("div",{className:"mt-4",children:w}):w:null]});return f?(0,t.jsx)(xn,{contentKey:C??A,children:L}):L}l(la,"TaskChatThreadView");function Q(e){if(e.kind==="message")return e.text.length+(e.attachedTurn?1:0);if(e.kind==="thinking")return e.lines.reduce((n,a)=>n+a.length,0);if(e.kind==="tool")return(e.diff?.lines?.length??0)+(e.status==="completed"?1:0);if(e.kind==="plan_document")return e.document.body.length+e.document.latestRevisionNumber;if(e.kind==="todo")return(e.status==="in_progress"?0:1)+(e.counts?.completed??0);if(e.kind==="turn"){if(e.settled)return 1+(e.finalResponse?.text.length??0);const n=e.liveStatus?e.liveStatus.label.length+(e.liveStatus.detail?.length??0)+(e.liveStatus.selfTalk?.length??0):0;return e.items.reduce((a,r)=>a+Q(r),e.items.length+n+(e.finalResponse?.text.length??0))}return e.kind==="activity_phase"?e.items.reduce((n,a)=>n+Q(a),e.summary.length+(e.interstitial?.text.length??0)):1}l(Q,"signatureOf");function kn(e){return e.reduce((n,a)=>n+Q(a),e.length)}l(kn,"taskChatContentKey");export{aa as _,sn as a,he as b,Qt as c,Vt as d,Pt as f,At as g,_t as h,ra as i,sa as l,Lt as m,kn as n,ia as o,$t as p,hn as r,fe as s,la as t,pe as u,Mt as v,Rt as y};
@@ -1,3 +0,0 @@
1
- var z=Object.defineProperty;var o=(s,t)=>z(s,"name",{value:t,configurable:!0});import{i as B}from"./rolldown-runtime-ZpX3ckPj.js";import{C as q,bt as M,l as O,la as K,ua as V}from"./createLucideIcon-DpXjCQRS.js";import{t as U,v as T}from"./queryKeys-Bwpi9du8.js";import{Jt as X,Ut as H,ot as W,t as F,zt as G}from"./router-DvYg2TPj.js";import{n as J,r as Q,t as Y}from"./collapsible-CK4bkaKD.js";import{a as Z,c as k,d as ee,f as se,i as N,o as te,p as ae,r as re,s as D,t as ne,u as ie}from"./dropdown-menu-COuwCVD4.js";import{n as le}from"./PathInstructionsModal-Ch_Y_h-W.js";import{t as oe}from"./arrow-up-right-CiL52_C-.js";import{t as ce}from"./chevron-right-B9tyGqmZ.js";import{t as de}from"./circle-x-haVgjs_m.js";import{t as me}from"./MarkdownBody-Dtjq3Ln7.js";import{t as he}from"./code-xml-DnMtzyzg.js";import{t as xe}from"./ellipsis-ClhaIBYZ.js";import{t as ue}from"./eye-kZn_xPie.js";import{r as pe,t as f}from"./button-CB8r2Tmh.js";import{t as fe}from"./refresh-cw-BoKHCT9Q.js";import{t as je}from"./repeat-CxiYIeqH.js";import{t as we}from"./square-BSbamBKn.js";import{t as ge}from"./x-B9UP51U4.js";import{i as R,n as E,t as $}from"./tooltip-DhA8eGCr.js";import{a as be,i as ve,n as ke,r as Ne,s as ye,t as Ce}from"./dialog-Bj8Y6BBR.js";import{u as _}from"./issue-filters-Ce8v1l6U.js";import{$a as P,Za as De,eo as Se,to as Me}from"./index-B6ALXjXD.js";import{l as Te,n as Re,o as Ee,s as $e,u as _e}from"./ImageGalleryModal-tTRmXGM4.js";import{a as Pe,i as Le,n as Ie}from"./IssueReferencePill-Bx19xBTT.js";var e=B(K(),1);function Be({createdFrom:s,issueLinkState:t,className:n}){if(!s)return null;const{issue:a,agent:i}=s,r=a.identifier??a.id;return(0,e.jsxs)("p",{"data-testid":"issue-created-from",className:O("flex min-w-0 items-center gap-1 text-xs text-ink-3",n),children:[(0,e.jsx)(W,{"aria-hidden":!0,className:"h-3 w-3 shrink-0"}),(0,e.jsx)("span",{className:"shrink-0",children:"Created from"}),(0,e.jsx)(F,{to:H(r),state:t,onClickCapture:o(()=>X(r,t),"onClickCapture"),className:"min-w-0 truncate hover:text-ink transition-colors",title:a.title,children:a.identifier?`${a.identifier} ${a.title}`:a.title}),i&&(0,e.jsxs)("span",{className:"shrink-0",children:["by ",i.name]})]})}o(Be,"IssueCreatedFromNote");function y({name:s,projectPath:t,children:n}){return(0,e.jsx)(Y,{defaultOpen:!0,asChild:!0,children:(0,e.jsxs)("section",{"aria-label":s,children:[(0,e.jsxs)("div",{className:"group/header flex items-center gap-1 rounded-md hover:bg-bg-3/50",children:[(0,e.jsx)("h2",{children:(0,e.jsxs)(Q,{className:"group flex items-center gap-1 rounded-md py-1 text-left text-sm font-medium focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus",children:[(0,e.jsx)("span",{children:s}),(0,e.jsx)("span",{"aria-hidden":!0,className:"flex w-3.5 items-center justify-center opacity-0 transition-opacity duration-(--motion-duration-fast) ease-(--motion-ease-standard) group-hover/header:opacity-100 group-focus-within/header:opacity-100",children:(0,e.jsx)(ce,{className:"h-3.5 w-3.5 text-ink-3 transition-transform duration-(--motion-duration-fast) ease-(--motion-ease-standard) group-data-[state=open]:rotate-90"})})]})}),t&&(0,e.jsx)(F,{to:t,"aria-label":`Go to ${s} project`,title:`Go to ${s} project`,className:"ml-auto inline-flex h-6 w-6 shrink-0 items-center justify-center rounded-md text-ink-3 opacity-0 transition-opacity duration-(--motion-duration-fast) ease-(--motion-ease-standard) hover:bg-bg-3 hover:text-ink group-hover/header:opacity-100 group-focus-within/header:opacity-100 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus",children:(0,e.jsx)(oe,{"aria-hidden":!0,className:"h-3.5 w-3.5"})})]}),(0,e.jsx)(J,{className:"pt-2",children:n})]})})}o(y,"TaskGroup");function ws({ancestors:s=[],createdFrom:t=null,subtasks:n,createdTasks:a,projects:i,isLoading:r,hasError:c,onRetry:l,issueLinkState:d}){const m=L(n),p=new Map;for(const h of L(a)){const x=h.projectId??"no-project",g=h.projectId?i.find(w=>w.id===h.projectId)??h.project:null,u=p.get(x)??{name:g?.name??(h.projectId?"Project":"No project"),path:h.projectId?`/projects/${q(g??{id:h.projectId})}/issues`:void 0,tasks:[]};u.tasks.push(h),p.set(x,u)}return(0,e.jsxs)("section",{className:"flex flex-col gap-6","aria-label":"Related tasks",children:[t&&(0,e.jsx)(y,{name:"Created from",children:(0,e.jsx)(Be,{createdFrom:t,issueLinkState:d,className:"px-2 text-sm"})}),s.length>0&&(0,e.jsx)(y,{name:"Ancestors",children:(0,e.jsx)(Ie,{items:[...s].reverse(),emptyMessage:"",ariaLabel:"Ancestor tasks, root to parent",issueLinkState:d})}),m.length>0&&(0,e.jsx)(y,{name:"Subtasks",children:(0,e.jsx)(Le,{items:m,issueLinkState:d})}),[...p.entries()].sort(([,h],[,x])=>h.name.localeCompare(x.name)).map(([h,x])=>(0,e.jsx)(y,{name:x.name,projectPath:x.path,children:(0,e.jsx)(Pe,{items:x.tasks,ariaLabel:`${x.name} tasks`,issueLinkState:d})},h)),r&&(0,e.jsx)("p",{role:"status",className:"text-sm text-ink-3",children:"Loading tasks…"}),c&&(0,e.jsxs)("div",{role:"alert",className:"flex items-center gap-2 text-sm text-bad",children:[(0,e.jsx)("span",{children:"Could not load all tasks."}),l&&(0,e.jsx)(f,{variant:"ghost",size:"sm",onClick:l,children:"Retry"})]}),!r&&!c&&!t&&s.length===0&&n.length===0&&a.length===0&&(0,e.jsx)("p",{className:"py-6 text-center text-sm text-ink-3",children:"No tasks yet."})]})}o(ws,"TaskDetailTasksPanel");function L(s){return[...new Map(s.map(t=>[t.id,t])).values()].sort((t,n)=>_.indexOf(t.status)-_.indexOf(n.status))}o(L,"sortTasks");var C=B(V(),1);function Fe(s,t=""){return/\.csv$/i.test(s)||t.split(";")[0].trim().toLowerCase()==="text/csv"}o(Fe,"isCsvFile");function Ae(s){const t=s.replace(/^\uFEFF/,"");if(!t)return[];const n=[];let a=[],i="",r=!1;for(let c=0;c<t.length;c++){const l=t[c];l==='"'?r&&t[c+1]==='"'?(i+='"',c++):r||i===""?r=!r:i+=l:!r&&l===","?(a.push(i),i=""):!r&&(l===`
2
- `||l==="\r")?(a.push(i),n.push(a),a=[],i="",l==="\r"&&t[c+1]===`
3
- `&&c++):i+=l}if(r)throw new Error("A quoted field is incomplete. Switch to raw view to inspect the file.");return(i!==""||a.length||!/[\r\n]$/.test(t))&&(a.push(i),n.push(a)),n}o(Ae,"parseCsv");var S=500,I=100;function ze({text:s,title:t}){const n=(0,C.useMemo)(()=>{try{return{rows:Ae(s),error:null}}catch(l){return{rows:[],error:l.message}}},[s]);if(n.error)return(0,e.jsx)("p",{role:"alert",className:"p-4 text-sm text-ink-3",children:n.error});if(!n.rows.length)return(0,e.jsx)("p",{className:"p-4 text-sm text-ink-3",children:"File is empty."});const[a,...i]=n.rows,r=n.rows.reduce((l,d)=>Math.max(l,d.length),0),c=Array.from({length:Math.min(r,I)},(l,d)=>d);return(0,e.jsxs)("div",{className:"flex min-h-0 flex-1 flex-col bg-bg",children:[(0,e.jsxs)("div",{className:"flex flex-wrap items-center gap-2 border-b border-line px-4 py-2 text-xs text-ink-3",role:"status",children:[(0,e.jsx)("span",{className:"font-medium text-ink",children:"CSV preview"}),(0,e.jsxs)("span",{children:[i.length.toLocaleString()," ",i.length===1?"row":"rows"]}),(0,e.jsxs)("span",{children:[r.toLocaleString()," ",r===1?"column":"columns"]}),(i.length>S||r>I)&&(0,e.jsxs)("span",{children:["Showing the first ",Math.min(i.length,S)," rows and ",c.length," columns. Download for the complete file."]})]}),(0,e.jsx)("div",{className:"min-h-0 flex-1 overflow-auto focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus focus-visible:ring-inset",role:"region","aria-label":`${t} CSV table`,tabIndex:0,children:(0,e.jsxs)("table",{className:"w-full border-collapse text-sm",children:[(0,e.jsxs)("caption",{className:"sr-only",children:[t," — first record used as column headers"]}),(0,e.jsx)("thead",{className:"sticky top-0 z-10 bg-bg-3",children:(0,e.jsxs)("tr",{children:[(0,e.jsxs)("th",{scope:"col",className:"w-10 border-b border-line px-3 py-3 text-right font-mono text-xs text-ink-3",children:[(0,e.jsx)("span",{className:"sr-only",children:"Row"}),"#"]}),c.map(l=>(0,e.jsx)("th",{scope:"col",className:"whitespace-nowrap border-b border-line px-4 py-3 text-left font-medium",children:a[l]||`Column ${l+1}`},l))]})}),(0,e.jsx)("tbody",{children:i.slice(0,S).map((l,d)=>(0,e.jsxs)("tr",{className:"even:bg-bg-3/30 hover:bg-bg-3/50",children:[(0,e.jsx)("th",{scope:"row",className:"border-b border-line/50 px-3 py-2 text-right font-mono text-xs font-normal text-ink-3",children:d+1}),c.map(m=>(0,e.jsx)("td",{className:"whitespace-pre-wrap border-b border-line/50 px-4 py-2 align-top",children:l[m]??""},m))]},d))})]})})]})}o(ze,"CsvPreview");function qe({html:s,title:t}){const n=(0,C.useMemo)(()=>Te(s),[s]);return(0,e.jsx)("iframe",{title:`${t} rendered HTML`,srcDoc:n,sandbox:"allow-scripts",referrerPolicy:"no-referrer",allow:"camera 'none'; microphone 'none'; geolocation 'none'; clipboard-read 'none'; clipboard-write 'none'; fullscreen 'none'",className:"block h-full min-h-0 w-full flex-1 border-0 bg-bg"})}o(qe,"HtmlArtifactPreview");function Oe({mode:s,onChange:t,label:n}){return(0,e.jsxs)("div",{className:"flex gap-1",role:"group","aria-label":n,children:[(0,e.jsx)(f,{type:"button",size:"icon-sm",variant:s==="rendered"?"secondary":"ghost","aria-label":"Rendered",title:"Rendered","aria-pressed":s==="rendered",onClick:o(()=>t("rendered"),"onClick"),children:(0,e.jsx)(ue,{"aria-hidden":!0})}),(0,e.jsx)(f,{type:"button",size:"icon-sm",variant:s==="raw"?"secondary":"ghost","aria-label":"Raw",title:"Raw","aria-pressed":s==="raw",onClick:o(()=>t("raw"),"onClick"),children:(0,e.jsx)(he,{"aria-hidden":!0})})]})}o(Oe,"FilePreviewModeToggle");async function Ke(s){if(!s.ok)throw new Error(`Could not load file (${s.status}).`);if(!s.body)throw new Error("The file response is empty.");const t=s.body.getReader(),n=new TextDecoder("utf-8",{fatal:!0});let a=0,i="";try{for(;;){const r=await t.read();if(r.done)break;if(a+=r.value.byteLength,a>524288)throw new Error("This file is too large to preview. Download it instead.");i+=n.decode(r.value,{stream:!0})}if(i+=n.decode(),i.includes("\0"))throw new Error("This file contains binary data. Download it instead.");return i}finally{await t.cancel(),t.releaseLock()}}o(Ke,"readTextPreview");function Ve({title:s,text:t,markdown:n,html:a=!1,csv:i=!1,downloadUrl:r}){const[c,l]=(0,C.useState)("rendered");(0,C.useEffect)(()=>l("rendered"),[s]);const d=i&&c==="rendered"&&t.length>0,m=a&&c==="rendered"&&t.length>0;return(0,e.jsxs)("div",{className:"flex h-full min-h-0 flex-col",children:[(0,e.jsxs)("header",{className:"flex items-center gap-2 border-b border-line px-3 py-2",children:[(0,e.jsx)("h2",{className:"min-w-0 flex-1 truncate text-sm font-medium",title:s,children:s}),n||a||i?(0,e.jsx)(Oe,{mode:c,onChange:l,label:a?"HTML view":i?"CSV view":"Markdown view"}):null,(0,e.jsx)(f,{asChild:!0,variant:"ghost",size:"icon-sm",children:(0,e.jsx)("a",{href:r,download:!0,"aria-label":`Download ${s}`,title:`Download ${s}`,children:(0,e.jsx)(De,{"aria-hidden":!0})})})]}),(0,e.jsx)("div",{className:m||d?"flex min-h-0 flex-1 flex-col overflow-hidden":"min-h-0 flex-1 overflow-auto p-4",children:t.length===0?(0,e.jsx)("p",{className:"text-sm text-ink-3",children:"File is empty."}):d?(0,e.jsx)(ze,{text:t,title:s}):m?(0,e.jsx)(qe,{html:t,title:s}):n&&c==="rendered"?(0,e.jsx)(me,{mediaMode:"reference",children:t}):(0,e.jsx)("pre",{className:"whitespace-pre-wrap break-words font-mono text-sm","aria-label":`${s} raw text`,children:t})})]})}o(Ve,"TextAttachmentPreview");function gs({issueId:s,attachmentId:t}){const n=T({queryKey:U.issues.attachments(s),queryFn:o(()=>G.listAttachments(s),"queryFn")}),a=n.data?.find(l=>l.id===t),i=a&&$e(a)&&a.byteSize<=524288,r=T({queryKey:["task-text-attachment",s,t],queryFn:o(async({signal:l})=>Ke(await fetch(`/api/attachments/${encodeURIComponent(t)}/content`,{signal:l,credentials:"same-origin"})),"queryFn"),enabled:!!i,retry:!1});if(n.isLoading)return(0,e.jsx)("p",{className:"p-4 text-sm",role:"status",children:"Loading file…"});if(n.isError)return(0,e.jsxs)("div",{className:"p-4",role:"alert",children:["Could not load attachment details. ",(0,e.jsx)(f,{onClick:o(()=>{n.refetch()},"onClick"),children:"Retry"})]});if(!a)return(0,e.jsx)("p",{className:"p-4 text-sm",role:"status",children:"File no longer available. Close this tab or choose another file."});const c=Re(a);return!i||r.isError?(0,e.jsxs)("div",{className:"space-y-3 p-4",role:"alert",children:[(0,e.jsx)("p",{className:"text-sm",children:r.isError?"Could not preview this file. Retry or download it.":"This file is too large or is not supported for text preview. Download it instead."}),i?(0,e.jsx)(f,{onClick:o(()=>{r.refetch()},"onClick"),children:"Retry"}):null,(0,e.jsx)(f,{asChild:!0,variant:"secondary",children:(0,e.jsx)("a",{href:c,download:!0,children:"Download file"})})]}):r.data===void 0?(0,e.jsx)("p",{className:"p-4 text-sm",role:"status",children:"Loading file…"}):(0,e.jsx)(Ve,{title:a.originalFilename??a.id,text:r.data,csv:Fe(a.originalFilename??"",a.contentType),markdown:Ee(a),html:_e(a.contentType,a.originalFilename),downloadUrl:c},a.id)}o(gs,"TaskAttachmentPanel");function bs({browser:s,now:t,disabled:n=!1,onControl:a,onReconnect:i,viewport:r="fit",controlledElsewhere:c=!1,resizing:l=!1,resizeAvailable:d=!0,onResize:m}){const p=s.status==="running"||s.status==="idle",h=s.expiresAt?Date.parse(s.expiresAt):1/0,x=s.idleDeadline?Date.parse(s.idleDeadline):1/0,g=Math.min(x,h),u=Math.max(0,Math.ceil((g-t)/1e3)),w=s.status==="idle"&&u<=300,b=s.status==="idle"&&h>x&&g>t,v=`${Math.floor(u/60)}:${String(u%60).padStart(2,"0")}`,A=r==="fit"?"Fit to pane":M.find(j=>j.id===r)?.label??"Default";return p?(0,e.jsxs)("footer",{"aria-label":"Browser session",className:"flex shrink-0 flex-wrap items-center gap-x-3 gap-y-1 border-t px-3 py-2 text-xs text-ink-3",children:[w&&(0,e.jsxs)("span",{role:"timer","aria-live":"off",className:"flex items-center gap-1 whitespace-nowrap",children:[(0,e.jsx)(P,{className:"size-3","aria-hidden":"true"}),u>0?(0,e.jsxs)(e.Fragment,{children:["Closes in"," ",(0,e.jsx)("span",{className:"font-mono tabular-nums",children:v})]}):"Closing…"]}),c&&r==="fit"&&(0,e.jsx)("span",{children:"Size follows another viewer"}),l?(0,e.jsxs)("span",{role:"status",className:"flex items-center gap-1",children:[(0,e.jsx)(pe,{className:"size-3 animate-spin motion-reduce:animate-none","aria-hidden":"true"}),"Resizing…"]}):s.status==="running"&&(0,e.jsx)("span",{children:"Browsing"}),(0,e.jsxs)("div",{className:"ml-auto flex items-center gap-1",children:[w&&b&&(0,e.jsxs)($,{children:[(0,e.jsx)(R,{asChild:!0,children:(0,e.jsx)(f,{size:"xs",variant:"ghost",disabled:n,onClick:o(()=>a("keep_open"),"onClick"),children:"Keep browsing"})}),(0,e.jsxs)(E,{children:["Keep this browser open for up to ",6e5/6e4," ","more minutes."]})]}),s.status==="running"&&(0,e.jsxs)($,{children:[(0,e.jsx)(R,{asChild:!0,children:(0,e.jsxs)(f,{size:"xs",variant:"ghost",disabled:n,onClick:o(()=>a("cancel"),"onClick"),children:[(0,e.jsx)(we,{"aria-hidden":"true"})," Stop browsing"]})}),(0,e.jsx)(E,{children:"Stop the agent’s browser work and leave the browser open."})]}),p&&(0,e.jsxs)(ne,{children:[(0,e.jsx)(ae,{asChild:!0,children:(0,e.jsx)(f,{size:"icon-xs",variant:"ghost","aria-label":"Browser options",disabled:n,children:(0,e.jsx)(xe,{"aria-hidden":"true"})})}),(0,e.jsxs)(re,{side:"top",align:"end",className:"w-64",children:[(0,e.jsxs)(ie,{children:[(0,e.jsxs)(se,{disabled:l||!d,children:[(0,e.jsx)(le,{"aria-hidden":"true"}),(0,e.jsx)("span",{children:"Browser size"}),(0,e.jsx)("span",{className:"ml-auto text-xs text-ink-3",children:A})]}),(0,e.jsxs)(ee,{className:"w-64",children:[(0,e.jsx)(Z,{children:"Browser size"}),(0,e.jsxs)(te,{value:r,onValueChange:o(j=>m(j),"onValueChange"),children:[(0,e.jsx)(D,{value:"fit",onSelect:o(()=>{r==="fit"&&m("fit")},"onSelect"),children:"Fit to pane"}),c&&(0,e.jsx)(N,{onSelect:o(()=>m("fit"),"onSelect"),children:"Fit to this pane instead"}),(0,e.jsx)(k,{}),(0,e.jsx)(D,{value:"default",onSelect:o(()=>{r==="default"&&m("default")},"onSelect"),children:"Browser default"}),(0,e.jsx)(k,{}),M.map(j=>(0,e.jsxs)(D,{value:j.id,onSelect:o(()=>{r===j.id&&m(j.id)},"onSelect"),children:[(0,e.jsx)("span",{children:j.label}),(0,e.jsxs)("span",{className:"ml-auto font-mono text-xs tabular-nums text-ink-3",children:[j.width," × ",j.height]})]},j.id))]})]})]}),(0,e.jsx)(k,{}),(0,e.jsxs)(N,{onSelect:i,className:"items-start",children:[(0,e.jsx)(fe,{className:"mt-0.5","aria-hidden":"true"}),(0,e.jsxs)("span",{className:"flex flex-col gap-1",children:[(0,e.jsx)("span",{children:"Reconnect view"}),(0,e.jsx)("span",{className:"text-xs font-normal text-ink-3",children:"Reload the live view. Browser work keeps running."})]})]}),b&&(0,e.jsxs)(N,{onSelect:o(()=>a("keep_open"),"onSelect"),className:"items-start",children:[(0,e.jsx)(P,{className:"mt-0.5","aria-hidden":"true"}),(0,e.jsxs)("span",{className:"flex flex-col gap-1",children:[(0,e.jsx)("span",{children:"Keep browser open"}),(0,e.jsx)("span",{className:"text-xs font-normal text-ink-3",children:"Keep it open for up to 10 more minutes."})]})]}),(0,e.jsx)(k,{}),(0,e.jsxs)(N,{variant:"destructive",onSelect:o(()=>a("end"),"onSelect"),className:"items-start",children:[(0,e.jsx)(ge,{className:"mt-0.5","aria-hidden":"true"}),(0,e.jsxs)("span",{className:"flex flex-col gap-1",children:[(0,e.jsx)("span",{children:"Close browser"}),(0,e.jsx)("span",{className:"text-xs font-normal text-ink-3",children:"End this browser and stop any browsing."})]})]})]})]})]})]}):null}o(bs,"TaskBrowserFooter");function vs({scope:s,canPause:t,canResume:n,canCancel:a,canRestore:i,pending:r,onPause:c,onResume:l,onCancel:d,onRestore:m}){const p="flex items-center gap-2 w-full px-2 py-1.5 text-xs rounded hover:bg-bg-3/50 disabled:opacity-50 disabled:pointer-events-none";return(0,e.jsxs)(e.Fragment,{children:[t?(0,e.jsxs)("button",{disabled:r,className:p,onClick:c,children:[(0,e.jsx)(Me,{className:"h-3 w-3"}),s==="leaf"?"Pause work":"Pause subtree"]}):null,n?(0,e.jsxs)("button",{disabled:r,className:p,onClick:l,children:[(0,e.jsx)(Se,{className:"h-3 w-3"}),s==="leaf"?"Resume work":"Resume subtree"]}):null,a?(0,e.jsxs)("button",{disabled:r,className:`${p} text-bad`,onClick:d,children:[(0,e.jsx)(de,{className:"h-3 w-3"}),"Cancel subtree..."]}):null,i?(0,e.jsxs)("button",{disabled:r,className:p,onClick:m,children:[(0,e.jsx)(je,{className:"h-3 w-3"}),"Restore subtree..."]}):null]})}o(vs,"TaskTreeControlMenuItems");function ks({open:s,onOpenChange:t,mode:n,scope:a,affectedCount:i,affectedAgentCount:r,loading:c,error:l,pending:d,valid:m,wakeAgents:p,onWakeAgentsChange:h,onRetry:x,onApply:g}){const u=n==="cancel",w=`${i} task${i===1?"":"s"}`,b=u?"Cancel subtree?":n==="restore"?"Restore subtree":a==="leaf"?"Resume work":"Resume subtree";return(0,e.jsx)(Ce,{open:s,onOpenChange:o(v=>{d||t(v)},"onOpenChange"),children:(0,e.jsxs)(ke,{showCloseButton:!d,className:"max-h-(--sz-calc-18) overflow-y-auto sm:max-w-sm",children:[(0,e.jsxs)(be,{children:[(0,e.jsx)(ye,{children:b}),(0,e.jsx)(Ne,{children:c?"Loading…":u?`${w} will be cancelled.`:`${w} will ${n==="restore"?"be restored":"resume"}.`})]}),l?(0,e.jsxs)("div",{className:"space-y-2",children:[(0,e.jsx)("p",{role:"alert",className:"text-sm text-bad",children:l}),(0,e.jsx)(f,{size:"sm",variant:"secondary",disabled:d,onClick:x,children:"Retry preview"})]}):null,u?null:(0,e.jsxs)("label",{className:"flex items-center gap-2 text-sm",children:[(0,e.jsx)("input",{type:"checkbox",checked:p,disabled:d||c||r===0,onChange:o(v=>h(v.target.checked),"onChange")}),"Wake affected agents (",r,")"]}),(0,e.jsxs)(ve,{children:[(0,e.jsx)(f,{variant:"secondary",disabled:d,onClick:o(()=>t(!1),"onClick"),children:u?"Keep tasks":"Close"}),(0,e.jsx)(f,{variant:u?"danger":"primary",disabled:d||c||!!l||!m,onClick:g,children:d?"Applying…":u?`Cancel ${w}`:n==="restore"?`Restore ${w}`:b})]})]})})}o(ks,"TaskTreeControlDialog");export{Ve as a,ze as c,gs as i,Fe as l,vs as n,Oe as o,bs as r,qe as s,ks as t,ws as u};
@@ -1 +0,0 @@
1
- var Nt=Object.defineProperty;var s=(t,r)=>Nt(t,"name",{value:r,configurable:!0});import{i as tt}from"./rolldown-runtime-ZpX3ckPj.js";import{l as R,la as St,t as st,ua as Ct}from"./createLucideIcon-DpXjCQRS.js";import{a as wt,n as At}from"./star-vweB_JDI.js";import{X as nt,_ as U,t as Ve,v as pe}from"./queryKeys-Bwpi9du8.js";import{a as z,i as Et,n as K,r as V,t as Ht}from"./TerminalView-CsrRCoNX.js";import{n as Mt}from"./CompanyContext-Cx4B566r.js";import{t as Kt}from"./router-DvYg2TPj.js";import{n as Tt,r as zt,t as Pt}from"./collapsible-CK4bkaKD.js";import{t as _t}from"./label-CUFCL9Te.js";import{t as $t}from"./check-ByoSzjU8.js";import{t as Ft}from"./chevron-down-BY8r8lEv.js";import{t as Lt}from"./circle-x-haVgjs_m.js";import{t as Ot}from"./cloud-BL3mJ3Zk.js";import{t as Rt}from"./copy-BzAUsLd3.js";import{t as We}from"./key-round-Bzc86YKh.js";import{r as de,t as g}from"./button-CB8r2Tmh.js";import{t as at}from"./plus-Ci4fWNMH.js";import{t as ee}from"./server-D14pf6xr.js";import{t as Dt}from"./shield-question-mark-DJ1-iT-R.js";import{t as Bt}from"./triangle-alert-BbGTCcEH.js";import{t as qt}from"./x-B9UP51U4.js";import{a as it,i as Qt,n as rt,r as ot,s as lt,t as ct}from"./dialog-Bj8Y6BBR.js";import{t as Q}from"./input-tD3qR9Gq.js";import{t as Zt}from"./access-BqSI2EWX.js";import{n as Jt}from"./BreadcrumbContext-B9JUzLr5.js";import{a as Ut,i as Ce,o as Te,r as Vt,s as Wt,t as Xt}from"./command-DnT_Dqx6.js";import{t as Yt}from"./textarea-BQh3frGz.js";import{t as Xe}from"./select-BILzRqwR.js";import{t as Gt}from"./environments-C7Tx6OHp.js";import{t as It}from"./use-copy-action-DOl9yp4g.js";import{n as es,t as ts}from"./segmented-B9WQFRdU.js";import{Aa as Fe,La as ss}from"./index-B6ALXjXD.js";import{n as ns,r as as,t as is}from"./resizable-panels-CAJWzqPj.js";var dt={name:"arrow-right-left",size:24,node:[["path",{d:"m16 3 4 4-4 4",key:"1x1c3m"}],["path",{d:"M20 7H4",key:"zbl0bi"}],["path",{d:"m8 21-4-4 4-4",key:"h9nckh"}],["path",{d:"M4 17h16",key:"g4d7ey"}]]};dt.node;var rs=st(dt),ut={name:"columns-2",size:24,node:[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M12 3v18",key:"108xh3"}]],aliases:["columns"]};ut.node;var os=st(ut),u=tt(Ct(),1),mt=5;function ht(t){return`wardmote:terminal-ssh-recent:v1:${t}`}s(ht,"recentKey");function Re(t){return`wardmote:terminal-ssh-tests:v1:${t}`}s(Re,"testsKey");function xt(t){try{return JSON.parse(window.localStorage.getItem(t)??"null")}catch{return null}}s(xt,"read");function De(t,r){try{window.localStorage.setItem(t,JSON.stringify(r))}catch{return}}s(De,"write");function pt(t){const r=xt(ht(t));return Array.isArray(r)?r.filter(l=>typeof l=="string").slice(0,mt):[]}s(pt,"recentSshTargets");function ls(t,r){const l=[r,...pt(t).filter(i=>i!==r)].slice(0,mt);return De(ht(t),l),l}s(ls,"rememberSshTarget");function ge(t){const r=xt(Re(t));return!r||typeof r!="object"||Array.isArray(r)?{}:Object.fromEntries(Object.entries(r).filter(l=>typeof l[1]?.status=="string"&&typeof l[1]?.at=="string"))}s(ge,"rememberedTests");function cs(t,r,l,i=new Date){De(Re(t),{...ge(t),[r]:{status:l,at:i.toISOString()}})}s(cs,"rememberTest");function Ye(t,r){const{[r]:l,...i}=ge(t);De(Re(t),i)}s(Ye,"forgetTest");var e=tt(St(),1),ds=/^[A-Za-z0-9_][A-Za-z0-9._-]{0,62}$/,us=/^(?:[A-Za-z0-9_](?:[A-Za-z0-9_-]{0,61}[A-Za-z0-9_])?)(?:\.[A-Za-z0-9_](?:[A-Za-z0-9_-]{0,61}[A-Za-z0-9_])?)*$/,ms=/^(?=.*:)[0-9A-Fa-f:.]{2,45}$/,hs=/^[A-Za-z0-9_][A-Za-z0-9._-]{0,63}$/,xs=/^[A-Za-z0-9_][A-Za-z0-9._-]{0,63}$/,ze="Use letters, digits, dots, dashes or underscores.";function Le(t){return t.trim().replace(/[^A-Za-z0-9._-]+/g,"-").replace(/^[^A-Za-z0-9_]+/,"").slice(0,63)||"host"}s(Le,"aliasFromName");function Ge(t){const r=t.destination.lastIndexOf("@");return{alias:Le(t.name),hostName:r>=0?t.destination.slice(r+1):t.destination,user:r>=0?t.destination.slice(0,r):null,port:t.port,identityFile:null,proxyJump:null,serverAliveInterval:null,serverAliveCountMax:null}}s(Ge,"settingsFromSavedHost");function Pe(t,r,l){const i=t.trim();if(!i)return null;if(!/^[0-9]+$/.test(i))return;const m=Number(i);return m>=r&&m<=l?m:void 0}s(Pe,"wholeNumber");function ps({text:t,label:r}){const{status:l,copy:i}=It(2e3);return(0,e.jsxs)(g,{type:"button",variant:"secondary",size:"xs",onClick:s(()=>{i(t)},"onClick"),children:[l==="copied"?(0,e.jsx)($t,{"aria-hidden":!0}):(0,e.jsx)(Rt,{"aria-hidden":!0}),(0,e.jsx)("span",{"aria-live":"polite",children:l==="copied"?"Copied":l==="failed"?"Copy failed":r})]})}s(ps,"CopyButton");function $({id:t,label:r,hint:l,error:i,children:m,className:v}){return(0,e.jsxs)("div",{className:R("flex min-w-0 flex-col gap-1.5",v),children:[(0,e.jsx)(_t,{htmlFor:t,children:r}),m,i?(0,e.jsx)("p",{id:`${t}-error`,className:"text-xs text-bad",children:i}):l?(0,e.jsx)("p",{id:`${t}-hint`,className:"text-xs text-ink-3",children:l}):null]})}s($,"Field");function fs({keyInfo:t,highlight:r}){return t.publicKey?(0,e.jsxs)("div",{className:R("flex flex-col gap-2 rounded-md border p-3",r?"border-accent/40 bg-accent/5":"border-line bg-bg-2"),children:[(0,e.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[(0,e.jsx)("p",{className:"text-xs font-medium text-ink",children:r?"Add this public key to ~/.ssh/authorized_keys on the server":"Public key"}),(0,e.jsx)(ps,{text:t.publicKey,label:"Copy public key"})]}),(0,e.jsx)("code",{className:"block max-h-(--sz-64) overflow-auto break-all rounded-sm bg-bg px-2 py-1.5 font-mono text-xs text-ink-2",children:t.publicKey})]}):(0,e.jsx)("p",{className:"text-xs text-ink-3",children:"No public key file next to this key, so it cannot be shown."})}s(fs,"PublicKeyBox");function gs({result:t,trusting:r,onTrust:l}){const i=t.status==="ok",m=t.status==="host_key_unknown",v=i?wt:m?Dt:Lt;return(0,e.jsxs)("div",{className:R("flex flex-col gap-2 rounded-md border p-3 text-sm",i?"border-ok/40 bg-ok-soft":m?"border-warn/40 bg-warn-soft":"border-bad/40 bg-bad-soft"),"data-testid":"ssh-test-result",children:[(0,e.jsxs)("p",{className:"flex items-start gap-2 text-ink",children:[(0,e.jsx)(v,{className:R("mt-0.5 size-4 shrink-0",i?"text-ok":m?"text-warn":"text-bad"),"aria-hidden":!0}),(0,e.jsx)("span",{children:t.message})]}),m&&t.hostKeys.length>0?(0,e.jsxs)("div",{className:"flex flex-col gap-2 pl-6",children:[(0,e.jsx)("ul",{className:"flex flex-col gap-1",children:t.hostKeys.map(b=>(0,e.jsxs)("li",{className:"break-all font-mono text-xs text-ink-2",children:[b.type," ",b.fingerprint]},b.fingerprint))}),(0,e.jsxs)("p",{className:"text-xs text-ink-3",children:["Compare it with ",(0,e.jsx)("code",{className:"font-mono",children:"ssh-keygen -lf /etc/ssh/ssh_host_*_key.pub"})," on the server."]}),(0,e.jsx)("div",{children:(0,e.jsxs)(g,{type:"button",size:"xs",onClick:l,disabled:r,children:[r?(0,e.jsx)(de,{className:"animate-spin motion-reduce:animate-none","aria-hidden":!0}):null,"Trust this host and test again"]})})]}):null,t.detail?(0,e.jsxs)("details",{className:"pl-6 text-xs text-ink-3",children:[(0,e.jsx)("summary",{className:"cursor-pointer select-none",children:"ssh output"}),(0,e.jsx)("pre",{className:"mt-1 whitespace-pre-wrap break-all font-mono",children:t.detail})]}):null]})}s(gs,"TestResult");function vs({companyId:t,open:r,onOpenChange:l,mode:i,configHosts:m,onSaved:v,onRemoved:b}){const w=nt(),P=(0,u.useId)(),h=i.kind==="add"?null:i.settings,[N,ue]=(0,u.useState)(h?.alias??""),[y,D]=(0,u.useState)(h?.hostName??""),[C,F]=(0,u.useState)(h?.user??""),[_,W]=(0,u.useState)(h?.port===null||h?.port===void 0?"":String(h.port)),[j,X]=(0,u.useState)(i.kind==="add"||h?.identityFile?"existing":"default"),[A,E]=(0,u.useState)(h?.identityFile??""),[Z,o]=(0,u.useState)(null),[M,T]=(0,u.useState)(""),[B,be]=(0,u.useState)(null),[Ae,te]=(0,u.useState)(null),[se,ne]=(0,u.useState)(h?.proxyJump??""),[Y,me]=(0,u.useState)(h?.serverAliveInterval===null||h?.serverAliveInterval===void 0?"":String(h.serverAliveInterval)),[ae,Ee]=(0,u.useState)(h?.serverAliveCountMax===null||h?.serverAliveCountMax===void 0?"":String(h.serverAliveCountMax)),[ie,ye]=(0,u.useState)(!!(h?.proxyJump||h?.serverAliveInterval||h?.serverAliveCountMax)),[J,re]=(0,u.useState)(!1),[G,he]=(0,u.useState)(null),[je,L]=(0,u.useState)(null),[oe,He]=(0,u.useState)(!1),ke=(0,u.useRef)(null);(0,u.useEffect)(()=>{G&&ke.current?.scrollIntoView({block:"nearest"})},[G]);const I=pe({queryKey:V.sshKeys(t),queryFn:s(()=>K.listKeys(t),"queryFn"),enabled:r}),O=I.data?.keys??[],n=O.find(a=>a.path===A)??null,d=`wardmote_${Le(N||"host")}`,c=(j==="paste"?B:Z)??d,p=new Set(m.filter(a=>!(i.kind==="edit"&&a.name===i.settings.alias)).map(a=>a.name.toLowerCase())),f=N.trim(),q=y.trim(),Be=Pe(_,1,65535),qe=Pe(Y,0,86400),Qe=Pe(ae,1,1e3),S={alias:f?ds.test(f)?p.has(f.toLowerCase())?"A host with this name already exists.":null:ze:"Enter a name, for example prod-web.",hostName:q?us.test(q)||ms.test(q)?null:"Enter a host name like example.com or an IP address.":"Enter the server's host name or IP address.",user:C.trim()&&!hs.test(C.trim())?ze:null,port:Be===void 0?"Port must be a number from 1 to 65535.":null,key:j==="existing"&&!A?"Pick a key, or choose another option.":j==="generate"||j==="paste"?"Create or save the key first.":null,keyName:!xs.test(c)||c.endsWith(".pub")?ze:null,keepAlive:qe===void 0?"Use whole seconds from 0 to 86400.":null,countMax:Qe===void 0?"Use a whole number from 1 to 1000.":null},Ze=!!(S.alias||S.hostName||S.user||S.port||S.key||S.keepAlive||S.countMax),H=s((a,k)=>J||k.trim()?S[a]:null,"show"),Me=s(()=>({alias:f,hostName:q,user:C.trim()||null,port:Be??null,identityFile:j==="existing"&&A?A:null,proxyJump:se||null,serverAliveInterval:qe??null,serverAliveCountMax:Qe??null}),"settings"),vt=s(()=>w.invalidateQueries({queryKey:V.sshKeys(t)}),"refreshKeys"),le=U({mutationFn:s(a=>K.createKey(t,a),"mutationFn"),onSuccess:s(async a=>{L(null),T(""),te(a.path),w.setQueryData(V.sshKeys(t),k=>k&&{...k,keys:[...k.keys.filter(kt=>kt.path!==a.path),a]}),E(a.path),X("existing"),await vt()},"onSuccess"),onError:s(a=>L(z(a,"The key could not be saved.")),"onError")}),ce=U({mutationFn:s(a=>K.testConnection(t,{host:a}),"mutationFn"),onSuccess:s((a,k)=>{L(null),he(a),cs(t,k.alias,a.status)},"onSuccess"),onError:s(a=>L(z(a,"The connection test could not run.")),"onError")}),Ke=U({mutationFn:s(async a=>(await K.trustHostKey(t,{target:{host:a},fingerprints:(G?.hostKeys??[]).map(k=>k.fingerprint)}),a),"mutationFn"),onSuccess:s(a=>ce.mutate(a),"onSuccess"),onError:s(a=>L(z(a,"The host key could not be trusted.")),"onError")}),Ne=U({mutationFn:s(async a=>(i.kind==="edit"?await K.updateConfigHost(t,i.settings.alias,a.settings):i.kind==="move"?await K.moveSshHostToConfig(t,i.saved.id,a.settings):await K.addConfigHost(t,a.settings),a),"mutationFn"),onSuccess:s(async a=>{L(null),i.kind==="edit"&&i.settings.alias!==a.settings.alias&&Ye(t,i.settings.alias),await w.invalidateQueries({queryKey:V.sshHosts(t)}),v(a.settings,a.openTerminal)},"onSuccess"),onError:s(a=>L(z(a,"The host could not be saved.")),"onError")}),Je=U({mutationFn:s(a=>K.removeConfigHost(t,a),"mutationFn"),onSuccess:s(async(a,k)=>{Ye(t,k),await w.invalidateQueries({queryKey:V.sshHosts(t)}),b?.(k)},"onSuccess"),onError:s(a=>L(z(a,"The host could not be removed.")),"onError")}),Ue=s(a=>{re(!0),!Ze&&Ne.mutate({settings:Me(),openTerminal:a})},"submit"),bt=s(()=>{re(!0),!Ze&&(he(null),ce.mutate(Me()))},"runTest"),xe=Ne.isPending||Je.isPending,yt=i.kind==="edit"?`Edit ${i.settings.alias}`:i.kind==="move"?`Move ${i.saved.name} to ssh config`:"Add SSH host",jt=m.filter(a=>a.name!==f&&(i.kind!=="edit"||a.name!==i.settings.alias)),x=s(a=>`${P}-${a}`,"fieldId"),Se=s((a,k)=>k?`${x(a)}-error`:void 0,"describedBy");return(0,e.jsx)(ct,{open:r,onOpenChange:l,children:(0,e.jsxs)(rt,{className:"max-h-(--sz-85vh) gap-0 overflow-y-auto p-0 sm:max-w-2xl","data-testid":"ssh-host-form",children:[(0,e.jsxs)(it,{className:"border-b border-line px-5 pt-5 pb-4 text-left",children:[(0,e.jsx)(lt,{children:yt}),(0,e.jsxs)(ot,{children:["Saved to ~/.ssh/config on the Wardmote server. Agents that run on this server can then use"," ",(0,e.jsxs)("code",{className:"font-mono text-ink-2",children:["ssh ",f||"<name>"]}),". Agents in a sandbox or on an SSH environment run elsewhere and do not see it."]})]}),(0,e.jsxs)("form",{className:"flex flex-col gap-5 px-5 py-4",onSubmit:s(a=>{a.preventDefault(),Ue(i.kind!=="edit")},"onSubmit"),noValidate:!0,children:[(0,e.jsxs)("div",{className:"grid gap-4 sm:grid-cols-2",children:[(0,e.jsx)($,{id:x("alias"),label:"Name",hint:(0,e.jsxs)(e.Fragment,{children:["Used as ",(0,e.jsx)("code",{className:"font-mono",children:"ssh name"}),"."]}),error:H("alias",N),children:(0,e.jsx)(Q,{id:x("alias"),value:N,onChange:s(a=>ue(a.target.value),"onChange"),placeholder:"prod-web",autoComplete:"off",spellCheck:!1,autoFocus:!0,"aria-invalid":!!H("alias",N),"aria-describedby":Se("alias",H("alias",N))})}),(0,e.jsx)($,{id:x("host"),label:"Host or IP address",error:H("hostName",y),children:(0,e.jsx)(Q,{id:x("host"),value:y,onChange:s(a=>D(a.target.value),"onChange"),placeholder:"203.0.113.10",autoComplete:"off",spellCheck:!1,inputMode:"url","aria-invalid":!!H("hostName",y),"aria-describedby":Se("host",H("hostName",y))})}),(0,e.jsx)($,{id:x("user"),label:"User",hint:"Leave empty to use your local user name.",error:H("user",C),children:(0,e.jsx)(Q,{id:x("user"),value:C,onChange:s(a=>F(a.target.value),"onChange"),placeholder:"root",autoComplete:"off",spellCheck:!1,"aria-invalid":!!H("user",C),"aria-describedby":Se("user",H("user",C))})}),(0,e.jsx)($,{id:x("port"),label:"Port",hint:"Leave empty for 22.",error:H("port",_),children:(0,e.jsx)(Q,{id:x("port"),value:_,onChange:s(a=>W(a.target.value),"onChange"),placeholder:"22",inputMode:"numeric",autoComplete:"off","aria-invalid":!!H("port",_),"aria-describedby":Se("port",H("port",_))})})]}),(0,e.jsxs)("fieldset",{className:"flex min-w-0 flex-col gap-3",children:[(0,e.jsxs)("legend",{className:"mb-2 flex items-center gap-2 text-sm font-medium text-ink",children:[(0,e.jsx)(We,{className:"size-4 text-ink-3","aria-hidden":!0}),"Key"]}),(0,e.jsx)(ts,{"aria-label":"How to sign in",className:"grid w-full grid-cols-2 sm:flex sm:w-fit",children:[["existing","Key in ~/.ssh"],["generate","Create new key"],["paste","Paste a key"],["default","ssh defaults"]].map(([a,k])=>(0,e.jsx)(es,{selected:j===a,onClick:s(()=>X(a),"onClick"),children:k},a))}),j==="existing"?(0,e.jsxs)("div",{className:"flex flex-col gap-2",children:[I.isLoading?(0,e.jsx)("p",{className:"text-sm text-ink-3",children:"Loading keys…"}):I.isError?(0,e.jsx)("p",{className:"text-sm text-bad",children:z(I.error,"Keys could not be listed.")}):O.length===0?(0,e.jsxs)("p",{className:"text-sm text-ink-3",children:["No private keys in ~/.ssh yet."," ",(0,e.jsx)(g,{type:"button",variant:"link",size:"xs",className:"h-auto px-0",onClick:s(()=>X("generate"),"onClick"),children:"Create one"})]}):(0,e.jsx)($,{id:x("key"),label:"Key file",error:J?S.key:null,children:(0,e.jsxs)(Xe,{id:x("key"),value:A,onChange:s(a=>{E(a.target.value),te(null)},"onChange"),"aria-invalid":!!(J&&S.key),children:[(0,e.jsx)("option",{value:"",children:"Choose a key…"}),O.map(a=>(0,e.jsxs)("option",{value:a.path,children:[a.name,a.type?` · ${a.type.replace(/^ssh-/,"")}`:"",a.fingerprint?` · ${a.fingerprint.slice(7,19)}…`:"",a.encrypted?" · passphrase":""]},a.path))]})}),n?(0,e.jsxs)(e.Fragment,{children:[n.fingerprint?(0,e.jsx)("p",{className:"break-all font-mono text-xs text-ink-3",children:n.fingerprint}):null,n.encrypted?(0,e.jsxs)("p",{className:"flex items-start gap-2 rounded-md bg-warn-soft p-2 text-xs text-ink",children:[(0,e.jsx)(Bt,{className:"mt-0.5 size-3.5 shrink-0 text-warn","aria-hidden":!0}),"This key has a passphrase. Agents can only use it while ssh-agent on the server holds it unlocked."]}):null,(0,e.jsx)(fs,{keyInfo:n,highlight:Ae===n.path})]}):null]}):null,j==="generate"?(0,e.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-end",children:[(0,e.jsx)($,{id:x("new-key"),label:"New key file name",error:S.keyName,className:"flex-1",children:(0,e.jsx)(Q,{id:x("new-key"),value:c,onChange:s(a=>o(a.target.value),"onChange"),autoComplete:"off",spellCheck:!1})}),(0,e.jsxs)(g,{type:"button",variant:"secondary",disabled:le.isPending||!!S.keyName,onClick:s(()=>le.mutate({mode:"generate",name:c,comment:`${Le(N||"host")}@wardmote`}),"onClick"),children:[le.isPending?(0,e.jsx)(de,{className:"animate-spin motion-reduce:animate-none","aria-hidden":!0}):(0,e.jsx)(We,{"aria-hidden":!0}),"Create ed25519 key"]})]}):null,j==="paste"?(0,e.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,e.jsx)($,{id:x("paste-name"),label:"Save as",error:S.keyName,children:(0,e.jsx)(Q,{id:x("paste-name"),value:c,onChange:s(a=>be(a.target.value),"onChange"),autoComplete:"off",spellCheck:!1})}),(0,e.jsx)($,{id:x("paste-key"),label:"Private key",hint:"Stored as ~/.ssh/<name> with mode 600. Wardmote never shows it again.",children:(0,e.jsx)(Yt,{id:x("paste-key"),value:M,onChange:s(a=>T(a.target.value),"onChange"),placeholder:"-----BEGIN OPENSSH PRIVATE KEY-----",className:"min-h-32 font-mono text-xs md:text-xs",autoComplete:"off",spellCheck:!1})}),(0,e.jsx)("div",{children:(0,e.jsxs)(g,{type:"button",variant:"secondary",disabled:le.isPending||!M.trim()||!!S.keyName,onClick:s(()=>le.mutate({mode:"import",name:c,privateKey:M}),"onClick"),children:[le.isPending?(0,e.jsx)(de,{className:"animate-spin motion-reduce:animate-none","aria-hidden":!0}):null,"Save key"]})})]}):null,j==="default"?(0,e.jsxs)("p",{className:"text-sm text-ink-3",children:["ssh tries the server's default keys and ssh-agent, as a plain ",(0,e.jsx)("code",{className:"font-mono",children:"ssh"})," would."]}):null,J&&S.key&&!(j==="existing"&&O.length>0)?(0,e.jsx)("p",{className:"text-xs text-bad",children:S.key}):null]}),(0,e.jsxs)(Pt,{open:ie,onOpenChange:ye,children:[(0,e.jsx)(zt,{asChild:!0,children:(0,e.jsxs)(g,{type:"button",variant:"ghost",size:"sm",className:"-ml-2 w-fit text-ink-2",children:[(0,e.jsx)(Ft,{className:R("transition-transform motion-reduce:transition-none",ie&&"rotate-180"),"aria-hidden":!0}),"More options"]})}),(0,e.jsxs)(Tt,{className:"grid gap-4 pt-3 sm:grid-cols-3",children:[(0,e.jsx)($,{id:x("jump"),label:"Connect via",hint:"Reach this host through another host (ProxyJump).",children:(0,e.jsxs)(Xe,{id:x("jump"),value:se,onChange:s(a=>ne(a.target.value),"onChange"),children:[(0,e.jsx)("option",{value:"",children:"Direct"}),jt.map(a=>(0,e.jsx)("option",{value:a.name,children:a.name},a.id))]})}),(0,e.jsx)($,{id:x("keepalive"),label:"Keep-alive (seconds)",hint:"Ping the server so idle sessions stay open.",error:H("keepAlive",Y),children:(0,e.jsx)(Q,{id:x("keepalive"),value:Y,onChange:s(a=>me(a.target.value),"onChange"),placeholder:"30",inputMode:"numeric",autoComplete:"off"})}),(0,e.jsx)($,{id:x("countmax"),label:"Missed pings before giving up",error:H("countMax",ae),children:(0,e.jsx)(Q,{id:x("countmax"),value:ae,onChange:s(a=>Ee(a.target.value),"onChange"),placeholder:"3",inputMode:"numeric",autoComplete:"off"})})]})]}),(0,e.jsxs)("div",{className:"flex flex-col gap-3 border-t border-line pt-4",children:[(0,e.jsxs)("div",{className:"flex flex-wrap items-center gap-3",children:[(0,e.jsxs)(g,{type:"button",variant:"secondary",onClick:bt,disabled:ce.isPending||Ke.isPending,children:[ce.isPending?(0,e.jsx)(de,{className:"animate-spin motion-reduce:animate-none","aria-hidden":!0}):null,ce.isPending?"Testing…":"Test connection"]}),(0,e.jsx)("p",{className:"text-xs text-ink-3",children:"Runs ssh from the server in batch mode. Nothing is saved."})]}),(0,e.jsx)("div",{"aria-live":"polite",ref:ke,className:"scroll-mb-4",children:G?(0,e.jsx)(gs,{result:G,trusting:Ke.isPending||ce.isPending,onTrust:s(()=>Ke.mutate(Me()),"onTrust")}):null})]}),je?(0,e.jsx)("p",{className:"rounded-md border border-bad/30 bg-bad/5 px-3 py-2 text-sm text-bad",role:"alert",children:je}):null,(0,e.jsxs)(Qt,{className:"gap-2 sm:items-center sm:justify-between",children:[(0,e.jsx)("div",{className:"flex",children:i.kind==="edit"?(0,e.jsx)(g,{type:"button",variant:oe?"delete":"danger",size:"sm",disabled:xe,onClick:s(()=>oe?Je.mutate(i.settings.alias):He(!0),"onClick"),children:oe?"Click again to remove":"Remove host"}):null}),(0,e.jsxs)("div",{className:"flex flex-col-reverse gap-2 sm:flex-row",children:[(0,e.jsx)(g,{type:"button",variant:"ghost",onClick:s(()=>l(!1),"onClick"),disabled:xe,children:"Cancel"}),i.kind==="edit"?(0,e.jsxs)(g,{type:"submit",disabled:xe,children:[Ne.isPending?(0,e.jsx)(de,{className:"animate-spin motion-reduce:animate-none","aria-hidden":!0}):null,"Save changes"]}):(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(g,{type:"button",variant:"secondary",disabled:xe,onClick:s(()=>Ue(!1),"onClick"),children:"Save"}),(0,e.jsxs)(g,{type:"submit",disabled:xe,children:[Ne.isPending?(0,e.jsx)(de,{className:"animate-spin motion-reduce:animate-none","aria-hidden":!0}):null,"Save and connect"]})]})]})]})]})]})})}s(vs,"SshHostForm");function ve(t){return`host:${t.id}`}s(ve,"hostTargetKey");function we(t){return`env:${t.id}`}s(we,"environmentTargetKey");var bs={ok:{label:"Connected",tone:"bg-ok"},host_key_unknown:{label:"Host not trusted yet",tone:"bg-warn"}};function ys({test:t}){if(!t)return null;const r=bs[t.status]??{label:"Last test failed",tone:"bg-bad"},l=new Date(t.at),i=`${r.label} · tested ${Number.isNaN(l.getTime())?"":l.toLocaleString()}`;return(0,e.jsxs)("span",{className:"flex shrink-0 items-center gap-1 text-xs text-ink-3",title:i,children:[(0,e.jsx)("span",{className:R("size-2 rounded-full",r.tone),"aria-hidden":!0}),(0,e.jsx)("span",{className:"sr-only sm:not-sr-only",children:r.label})]})}s(ys,"TestDot");function _e({icon:t,name:r,detail:l,badge:i,trailing:m,mono:v=!0}){return(0,e.jsxs)(e.Fragment,{children:[t,(0,e.jsxs)("span",{className:"flex min-w-0 flex-1 flex-col",children:[(0,e.jsxs)("span",{className:"flex min-w-0 items-center gap-2",children:[(0,e.jsx)("span",{className:"truncate font-medium text-ink",children:r}),i?(0,e.jsx)("span",{className:"shrink-0 rounded-sm border border-line px-1 text-xs text-ink-3",children:i}):null]}),l?(0,e.jsx)("span",{className:R("truncate text-xs text-ink-3",v&&"font-mono"),children:l}):null]}),m]})}s(_e,"HostRow");function Ie(t){return t.port===null?t.destination:`${t.destination}:${t.port}`}s(Ie,"hostDetail");function js(t){const{open:r,onOpenChange:l,localAllowed:i,hosts:m,hostsLoading:v,hostsError:b,configError:w,environments:P,environmentsLoading:h,recent:N,tests:ue,busy:y}=t,D=(0,u.useRef)(null),C=m.filter(o=>o.source==="config"),F=m.filter(o=>o.source==="saved"),_=new Map;for(const o of C)_.set(ve(o),{kind:"host",host:o});for(const o of P)_.set(we(o),{kind:"env",environment:o});const W=N.map(o=>({key:o,entry:_.get(o)})).filter(o=>o.entry!==void 0),j=new Set(W.map(o=>o.key)),X=!v&&!h&&C.length===0&&P.length===0&&F.length===0,A=s(o=>{o.key!=="/"||o.target===D.current||(o.preventDefault(),D.current?.focus())},"onKeyDown"),E=s((o,M)=>{const T=!!(o.managed&&o.settings);return(0,e.jsx)(Te,{value:`${M}${o.id}`,keywords:[o.name,o.destination],disabled:y,onSelect:s(()=>t.onOpenHost(o),"onSelect"),className:"min-h-12 gap-3",children:(0,e.jsx)(_e,{icon:(0,e.jsx)(ee,{"aria-hidden":!0}),name:o.name,detail:Ie(o),badge:o.managed?T?null:"edited by hand":"~/.ssh/config",trailing:(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(ys,{test:ue[o.name]}),T?(0,e.jsx)(g,{type:"button",variant:"ghost",size:"icon-xs","aria-label":`Edit ${o.name}`,title:"Edit",onClick:s(B=>{B.stopPropagation(),t.onEditHost(o)},"onClick"),children:(0,e.jsx)(ss,{"aria-hidden":!0})}):null]})})},`${M}${o.id}`)},"configHostItem"),Z=s((o,M)=>(0,e.jsx)(Te,{value:`${M}${o.id}`,keywords:[o.name,"environment"],disabled:y,onSelect:s(()=>t.onOpenEnvironment(o),"onSelect"),className:"min-h-12 gap-3",children:(0,e.jsx)(_e,{icon:(0,e.jsx)(Ot,{"aria-hidden":!0}),name:o.name,detail:"SSH environment",mono:!1})},`${M}${o.id}`),"environmentItem");return(0,e.jsx)(ct,{open:r,onOpenChange:l,children:(0,e.jsxs)(rt,{className:"gap-0 overflow-hidden p-0 sm:max-w-xl",onKeyDown:A,children:[(0,e.jsxs)(it,{className:"border-b border-line px-4 pt-4 pb-3 text-left",children:[(0,e.jsx)(lt,{children:"Open an SSH terminal"}),(0,e.jsx)(ot,{children:i?"Pick a host from the server's ~/.ssh/config or an SSH environment.":"Pick an SSH environment. Hosts in the server's ~/.ssh/config are for instance admins."})]}),(0,e.jsxs)(Xt,{loop:!0,className:"rounded-none bg-bg",children:[(0,e.jsx)(Ut,{ref:D,placeholder:"Search hosts… (press / to search)","aria-label":"Search hosts"}),(0,e.jsxs)(Wt,{className:"max-h-(--sz-70vh) min-h-(--sz-64)","aria-busy":v||h,children:[v||h?(0,e.jsx)("p",{className:"px-4 py-3 text-sm text-ink-3",children:"Loading hosts…"}):null,b?(0,e.jsx)("p",{className:"px-4 py-3 text-sm text-bad",role:"alert",children:b}):null,w?(0,e.jsx)("p",{className:"px-4 py-2 text-xs text-ink-3",children:w}):null,X?(0,e.jsxs)("div",{className:"flex flex-col items-center gap-2 px-6 py-8 text-center",children:[(0,e.jsx)(ee,{className:"size-6 text-ink-3","aria-hidden":!0}),(0,e.jsx)("p",{className:"text-sm font-medium text-ink",children:"No SSH hosts yet"}),(0,e.jsx)("p",{className:"max-w-sm text-sm text-ink-3",children:i?"Add a host once and it lands in ~/.ssh/config, ready for this terminal and for agents on this server.":"Ask an instance admin to add an SSH environment you can use."})]}):(0,e.jsx)(Vt,{children:(0,e.jsx)("span",{className:"text-ink-3",children:"No host matches your search."})}),W.length>0?(0,e.jsx)(Ce,{heading:"Recent",children:W.map(({entry:o})=>o.kind==="host"?E(o.host,"recent-"):Z(o.environment,"recent-"))}):null,C.some(o=>!j.has(ve(o)))?(0,e.jsx)(Ce,{heading:"SSH hosts",children:C.filter(o=>!j.has(ve(o))).map(o=>E(o,""))}):null,P.some(o=>!j.has(we(o)))?(0,e.jsx)(Ce,{heading:"Environments",children:P.filter(o=>!j.has(we(o))).map(o=>Z(o,""))}):null,F.length>0?(0,e.jsxs)(Ce,{heading:"Saved in Wardmote only (not visible to agents)",children:[F.map(o=>(0,e.jsx)(Te,{value:o.id,keywords:[o.name,o.destination],disabled:y,onSelect:s(()=>t.onOpenHost(o),"onSelect"),className:"min-h-12 gap-3",children:(0,e.jsx)(_e,{icon:(0,e.jsx)(ee,{"aria-hidden":!0}),name:o.name,detail:Ie(o),trailing:(0,e.jsxs)(g,{type:"button",variant:"secondary",size:"xs",onClick:s(M=>{M.stopPropagation(),t.onMoveSaved(o)},"onClick"),children:[(0,e.jsx)(rs,{"aria-hidden":!0}),"Move to ssh config"]})})},o.id)),F.length>1?(0,e.jsx)("div",{className:"flex justify-end px-2 pb-1",children:(0,e.jsxs)(g,{type:"button",variant:"link",size:"xs",disabled:y,onClick:t.onMoveAllSaved,children:["Move all ",F.length," to ssh config"]})}):null]}):null]})]}),(0,e.jsxs)("div",{className:"flex flex-col gap-2 border-t border-line px-4 py-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,e.jsx)("p",{className:"text-xs text-ink-3",children:i?(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(Kt,{to:"/company/settings/instance/environments",className:"text-ink-2 underline underline-offset-2 hover:text-ink",children:"SSH environments"})," ","connect with a key stored in Wardmote."]}):"Only instance admins can add hosts."}),i?(0,e.jsxs)(g,{type:"button",size:"sm",onClick:t.onAddHost,disabled:y,children:[(0,e.jsx)(at,{"aria-hidden":!0}),"Add host"]}):null]})]})})}s(js,"SshHostPicker");function et({icon:t,title:r,description:l,note:i,disabled:m,onClick:v,testId:b}){return(0,e.jsxs)("button",{type:"button",onClick:v,disabled:m,"aria-describedby":i?`${b}-note`:void 0,"data-testid":b,className:R("group flex min-h-36 flex-col items-start gap-3 rounded-lg border border-line bg-bg-2 p-5 text-left transition-colors motion-reduce:transition-none","outline-none focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-focus",m?"cursor-not-allowed opacity-70":"hover:border-line-strong hover:bg-bg-3"),children:[(0,e.jsx)("span",{className:"flex size-10 items-center justify-center rounded-md border border-line bg-bg text-ink-2 group-hover:text-ink",children:t}),(0,e.jsxs)("span",{className:"flex flex-col gap-1",children:[(0,e.jsx)("span",{className:"text-base font-medium text-ink",children:r}),(0,e.jsx)("span",{className:"text-sm text-ink-3",children:l})]}),i?(0,e.jsxs)("span",{id:`${b}-note`,className:"mt-auto flex items-center gap-1.5 text-xs text-ink-3",children:[(0,e.jsx)(At,{className:"size-3","aria-hidden":!0}),i]}):null]})}s(et,"StartOption");function ks({localAllowed:t,creating:r,onLocal:l,onSsh:i,recentHosts:m,onOpenHost:v}){return(0,e.jsx)("div",{className:"flex flex-1 items-start justify-center overflow-y-auto p-4 sm:items-center sm:p-8","data-testid":"terminal-start",children:(0,e.jsxs)("div",{className:"flex w-full max-w-2xl flex-col gap-5",children:[(0,e.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,e.jsx)("h2",{className:"text-lg font-semibold text-ink",children:"Open a terminal"}),(0,e.jsx)("p",{className:"text-sm text-ink-3",children:"Choose where the shell runs. You can open more later from the toolbar."})]}),(0,e.jsxs)("div",{className:"grid gap-3 sm:grid-cols-2",children:[(0,e.jsx)(et,{testId:"terminal-start-local",icon:(0,e.jsx)(Fe,{className:"size-5","aria-hidden":!0}),title:"Local terminal",description:"A shell on the Wardmote server, as the user that runs Wardmote.",note:t?null:"Needs instance admin access.",disabled:!t||r,onClick:l}),(0,e.jsx)(et,{testId:"terminal-start-ssh",icon:(0,e.jsx)(ee,{className:"size-5","aria-hidden":!0}),title:"SSH terminal",description:t?"Connect to a host from ~/.ssh/config or an SSH environment, or add a new host.":"Connect to an SSH environment registered for this company.",disabled:r,onClick:i})]}),m.length>0?(0,e.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,e.jsx)("span",{className:"text-xs text-ink-3",children:"Recent"}),m.map(b=>(0,e.jsxs)(g,{type:"button",variant:"secondary",size:"xs",disabled:r,onClick:s(()=>v(b),"onClick"),children:[(0,e.jsx)(ee,{"aria-hidden":!0}),b.name]},b.id))]}):null]})})}s(ks,"TerminalStartScreen");var fe=2;function ft(t){return`wardmote:terminal-layout:v1:${t}`}s(ft,"layoutKey");function Oe(t){return`wardmote:terminal-titles:v1:${t}`}s(Oe,"titlesKey");function gt(t){try{return JSON.parse(window.localStorage.getItem(t)??"null")}catch{return null}}s(gt,"readJson");function $e(t,r){try{window.localStorage.setItem(t,JSON.stringify(r))}catch{return}}s($e,"writeJson");function Ns(t){const r=gt(ft(t)),l=Array.isArray(r?.panes)?r.panes.filter(i=>typeof i=="string").slice(0,fe):[];return{panes:l,focused:typeof r?.focused=="number"&&r.focused>=0&&r.focused<l.length?r.focused:0}}s(Ns,"readLayout");function Ss(t){const r=gt(Oe(t));return!r||typeof r!="object"||Array.isArray(r)?{}:Object.fromEntries(Object.entries(r).filter(l=>typeof l[1]=="string"))}s(Ss,"readTitles");function Cs(t,r){const l=new Set(r.map(m=>m.id)),i=t.panes.filter((m,v)=>l.has(m)&&t.panes.indexOf(m)===v);return i.length===0&&r.length>0&&i.push(r[0].id),{panes:i,focused:Math.min(t.focused,Math.max(0,i.length-1))}}s(Cs,"reconcileLayout");function ws(t,r){return t.focused===r.focused&&t.panes.length===r.panes.length&&t.panes.every((l,i)=>l===r.panes[i])}s(ws,"sameLayout");function As({companyId:t}){const r=nt(),l=V.sessions(t),[i,m]=(0,u.useState)(()=>Ns(t)),[v,b]=(0,u.useState)(()=>Ss(t)),[w,P]=(0,u.useState)(null),[h,N]=(0,u.useState)(null),[ue,y]=(0,u.useState)(!1),[D,C]=(0,u.useState)(null),[F,_]=(0,u.useState)(()=>pt(t)),[W,j]=(0,u.useState)(()=>ge(t)),X=pe({queryKey:Ve.access.currentBoardAccess,queryFn:s(()=>Zt.getCurrentBoardAccess(),"queryFn")}),A=Et(X.data),E=pe({queryKey:l,queryFn:s(()=>K.list(t),"queryFn")}),Z=pe({queryKey:Ve.environments.list(t),queryFn:s(()=>Gt.list(t),"queryFn"),enabled:E.isSuccess}),o=(0,u.useMemo)(()=>E.data??[],[E.data]),M=(0,u.useMemo)(()=>(Z.data??[]).filter(n=>n.driver==="ssh"),[Z.data]),T=pe({queryKey:V.sshHosts(t),queryFn:s(()=>K.listSshHosts(t),"queryFn"),enabled:A}),B=(0,u.useMemo)(()=>T.data?.hosts??[],[T.data]),be=(0,u.useMemo)(()=>B.filter(n=>n.source==="config"),[B]),Ae=(0,u.useMemo)(()=>B.filter(n=>n.source==="saved"),[B]);(0,u.useEffect)(()=>{E.isSuccess&&m(n=>{const d=Cs(n,o);return ws(n,d)?n:d})},[o,E.isSuccess]),(0,u.useEffect)(()=>{$e(ft(t),i)},[t,i]);const te=(0,u.useCallback)(n=>{r.setQueryData(l,(d=[])=>d.some(c=>c.id===n.id)?d.map(c=>c.id===n.id?n:c):[...d,n])},[r,l]),se=(0,u.useCallback)((n,d)=>{m(c=>{const p=c.panes.indexOf(n);if(p>=0)return{...c,focused:p};const f=d??c.focused,q=[...c.panes];return f>=q.length?q.push(n):q[f]=n,{panes:q.slice(0,fe),focused:Math.min(f,1)}})},[]),ne=U({mutationFn:s(n=>K.create(t,n.body),"mutationFn"),onSuccess:s((n,d)=>{N(null),te(n),se(n.id,d.pane)},"onSuccess"),onError:s(n=>N(z(n,"Could not open a terminal session.")),"onError")}),Y=U({mutationFn:s(n=>K.remove(t,n),"mutationFn"),onSuccess:s((n,d)=>{N(null),r.setQueryData(l,(c=[])=>c.filter(p=>p.id!==d)),m(c=>{const p=c.panes.filter(f=>f!==d);return{panes:p,focused:Math.min(c.focused,Math.max(0,p.length-1))}}),b(c=>{if(!(d in c))return c;const{[d]:p,...f}=c;return $e(Oe(t),f),f})},"onSuccess"),onError:s(n=>N(z(n,"Could not close the terminal session.")),"onError")}),me=s(n=>ne.mutate({body:{kind:"local"},pane:n}),"createLocal"),ae=s(n=>_(ls(t,n)),"remember"),Ee=s(n=>{y(!1),ae(we(n)),ne.mutate({body:{kind:"ssh",environmentId:n.id,title:n.name}})},"openEnvironment"),ie=s(n=>{y(!1),n.source==="config"&&ae(ve(n)),ne.mutate({body:{kind:"local",sshHostId:n.id,title:n.name}})},"openHost"),ye=s(()=>{j(ge(t)),y(!0)},"openPicker"),J=s(n=>{y(!1),C({mode:n,key:Date.now()})},"openForm"),re=s(()=>{C(null),j(ge(t))},"closeForm"),G=s((n,d)=>{if(re(),!d){y(!0);return}const c={id:`config:${n.alias}`,source:"config",name:n.alias,destination:n.user?`${n.user}@${n.hostName}`:n.hostName,port:n.port};ie(c)},"onHostSaved"),he=U({mutationFn:s(async n=>{const d=[];for(const c of n)try{await K.moveSshHostToConfig(t,c.id,Ge(c))}catch(p){d.push(`${c.name}: ${z(p,"could not be moved")}`)}return d},"mutationFn"),onSettled:s(()=>r.invalidateQueries({queryKey:V.sshHosts(t)}),"onSettled"),onSuccess:s(n=>N(n.length===0?null:`Some saved hosts were not moved. Open them one by one to fix: ${n.join("; ")}`),"onSuccess"),onError:s(n=>N(z(n,"Saved hosts could not be moved.")),"onError")}),je=s(()=>{if(i.panes.length>=fe){const d=i.panes[i.focused]??i.panes[0];m({panes:[d],focused:0});return}const n=o.find(d=>!i.panes.includes(d.id));n?se(n.id,i.panes.length):A&&me(i.panes.length)},"toggleSplit"),L=s(n=>v[n.id]??n.title,"titleOf"),oe=s(()=>{if(!w)return;const n=w.value.trim();b(d=>{const{[w.id]:c,...p}=d,f=n?{...p,[w.id]:n}:p;return $e(Oe(t),f),f}),P(null)},"commitRename"),He=s(n=>{n.key==="Enter"?(n.preventDefault(),oe()):n.key==="Escape"&&(n.preventDefault(),P(null))},"onRenameKeyDown");if(E.isLoading)return(0,e.jsx)("p",{className:"p-4 text-sm text-ink-3",children:"Loading terminal sessions…"});if(E.isError)return(0,e.jsxs)("div",{className:"flex h-full min-h-(--sz-60vh) flex-col items-center justify-center gap-2 p-6 text-center","data-testid":"terminal-access-error",children:[(0,e.jsx)(Fe,{className:"size-6 text-ink-3","aria-hidden":!0}),(0,e.jsx)("p",{className:"text-sm font-medium text-ink",children:"Terminal unavailable"}),(0,e.jsx)("p",{className:"max-w-md text-sm text-ink-3",children:z(E.error,"Terminal sessions could not be loaded.")})]});const ke=i.panes[i.focused]??null,I=new Map(o.map(n=>[n.id,n])),O=ne.isPending;return(0,e.jsxs)("div",{className:"flex h-full min-h-(--sz-60vh) flex-col overflow-hidden rounded-md border border-line","data-testid":"terminal-workspace",children:[(0,e.jsxs)("div",{className:"flex shrink-0 items-center gap-1 border-b border-line px-2 py-1",children:[(0,e.jsx)("div",{role:"tablist","aria-label":"Terminal sessions",className:"flex min-w-0 flex-1 items-center gap-1 overflow-x-auto",children:o.map(n=>{const d=n.id===ke,c=i.panes.includes(n.id),p=L(n);return(0,e.jsxs)("div",{className:R("group flex shrink-0 items-center gap-1 rounded-md border px-2 py-1 text-xs",d?"border-focus bg-bg-3 text-ink":c?"border-line text-ink":"border-transparent text-ink-3 hover:bg-bg-3"),children:[n.kind==="ssh"||n.sshHost?(0,e.jsx)(ee,{className:"size-3","aria-hidden":!0}):(0,e.jsx)(Fe,{className:"size-3","aria-hidden":!0}),w?.id===n.id?(0,e.jsx)(Q,{autoFocus:!0,value:w.value,"aria-label":"Session title",onChange:s(f=>P({id:n.id,value:f.target.value}),"onChange"),onKeyDown:He,onBlur:oe,className:"h-6 w-32 px-1 text-xs md:text-xs"}):(0,e.jsxs)("button",{type:"button",role:"tab","aria-selected":d,title:"Double-click to rename",className:"max-w-48 truncate outline-none focus-visible:underline",onClick:s(()=>se(n.id),"onClick"),onDoubleClick:s(()=>P({id:n.id,value:p}),"onDoubleClick"),children:[p,n.status==="exited"?(0,e.jsx)("span",{className:"ml-1 text-ink-3",children:"(ended)"}):null]}),(0,e.jsx)("button",{type:"button","aria-label":`Close ${p}`,className:"rounded-sm text-ink-3 hover:text-ink",disabled:Y.isPending&&Y.variables===n.id,onClick:s(()=>Y.mutate(n.id),"onClick"),children:(0,e.jsx)(qt,{className:"size-3","aria-hidden":!0})})]},n.id)})}),A?(0,e.jsxs)(g,{type:"button",variant:"ghost",size:"xs",onClick:s(()=>me(),"onClick"),disabled:O,children:[(0,e.jsx)(at,{"aria-hidden":!0}),"Local"]}):null,(0,e.jsxs)(g,{type:"button",variant:"ghost",size:"xs",onClick:ye,disabled:O,"aria-haspopup":"dialog",children:[(0,e.jsx)(ee,{"aria-hidden":!0}),"SSH"]}),(0,e.jsx)(g,{type:"button",variant:"ghost",size:"icon-xs","aria-label":i.panes.length>=fe?"Close split":"Split terminal","aria-pressed":i.panes.length>=fe,onClick:je,disabled:O||i.panes.length===0,children:(0,e.jsx)(os,{"aria-hidden":!0})})]}),(0,e.jsx)(js,{open:ue,onOpenChange:y,localAllowed:A,hosts:B,hostsLoading:A&&T.isLoading,hostsError:T.isError?z(T.error,"SSH hosts could not be loaded."):null,configError:T.data?.configError??null,environments:M,environmentsLoading:Z.isLoading,recent:F,tests:W,busy:O||he.isPending,onOpenHost:ie,onOpenEnvironment:Ee,onAddHost:s(()=>J({kind:"add"}),"onAddHost"),onEditHost:s(n=>{n.settings&&J({kind:"edit",settings:n.settings})},"onEditHost"),onMoveSaved:s(n=>J({kind:"move",saved:n,settings:Ge(n)}),"onMoveSaved"),onMoveAllSaved:s(()=>he.mutate(Ae),"onMoveAllSaved")}),D?(0,e.jsx)(vs,{companyId:t,open:!0,onOpenChange:s(n=>{n||re()},"onOpenChange"),mode:D.mode,configHosts:be,onSaved:G,onRemoved:s(()=>{re(),y(!0)},"onRemoved")},D.key):null,h?(0,e.jsx)("p",{className:"shrink-0 border-b border-line px-3 py-1 text-xs text-bad",role:"alert",children:h}):null,i.panes.length===0?(0,e.jsx)(ks,{localAllowed:A,creating:O,onLocal:s(()=>me(),"onLocal"),onSsh:ye,recentHosts:F.map(n=>be.find(d=>ve(d)===n)??null).filter(n=>n!==null).slice(0,3),onOpenHost:ie}):(0,e.jsx)(as,{className:"min-h-0 flex-1",children:i.panes.map((n,d)=>(0,e.jsxs)(u.Fragment,{children:[d>0?(0,e.jsx)(is,{}):null,(0,e.jsx)(ns,{id:`terminal-pane-${d}`,minSize:"20%",children:(0,e.jsx)("div",{className:R("h-full min-h-0",i.panes.length>1&&d===i.focused&&"ring-1 ring-inset ring-focus"),onFocusCapture:s(()=>m(c=>c.focused===d?c:{...c,focused:d}),"onFocusCapture"),onMouseDown:s(()=>m(c=>c.focused===d?c:{...c,focused:d}),"onMouseDown"),"data-testid":`terminal-pane-${d}`,children:(0,e.jsx)(Ht,{companyId:t,sessionId:n,active:d===i.focused,onSessionChange:s(c=>{I.has(c.id)&&te(c)},"onSessionChange"),onExit:s(c=>{const p=I.get(n);p&&te({...p,status:"exited",exitCode:c.exitCode})},"onExit")})})})]},n))})]})}s(As,"TerminalWorkspace");function cn(){const{selectedCompanyId:t}=Mt(),{setBreadcrumbs:r}=Jt();return(0,u.useEffect)(()=>{r([{label:"Terminal"}])},[r]),t?(0,e.jsx)(As,{companyId:t},t):(0,e.jsx)("p",{className:"text-sm text-ink-3",children:"Select a company to open a terminal."})}s(cn,"Terminal");export{cn as Terminal};