@wrongstack/webui 0.292.1 → 0.295.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (220) hide show
  1. package/dist/App.d.ts.map +1 -1
  2. package/dist/assets/AgentRosterView-y-MCHghy.js +7 -0
  3. package/dist/assets/AnalyticsDashboard-tGlXeqV5.js +1 -0
  4. package/dist/assets/AudienceMemoryPanel-D45M-Fr6.js +3 -0
  5. package/dist/assets/ChangesView-Otr6kwYr.js +1 -0
  6. package/dist/assets/ChronicleDashboard-BvsfI25e.js +1 -0
  7. package/dist/assets/CodeEditor-DtD0-wwy.js +1 -0
  8. package/dist/assets/CodeMap-CVmu16Ec.js +1 -0
  9. package/dist/assets/ConfirmModal-C7H16wDN.js +1 -0
  10. package/dist/assets/{CronJobsPanel-CVXW2Y-n.js → CronJobsPanel-CT6XRgmQ.js} +1 -1
  11. package/dist/assets/{DebugDashboard-BldwPA32.js → DebugDashboard-DZy3VUpn.js} +1 -1
  12. package/dist/assets/DesignGalleryView-CQkuFsfj.js +1 -0
  13. package/dist/assets/{GoalView-p7f1544B.js → GoalView-CTqdYc-z.js} +1 -1
  14. package/dist/assets/KanbanView-DryFcAzY.js +3 -0
  15. package/dist/assets/{LazyMarkdown-C1a0wbAZ.js → LazyMarkdown-DWlQpo_8.js} +3 -3
  16. package/dist/assets/MailboxDetailView-CsI_6HsE.js +1 -0
  17. package/dist/assets/MemoryManager-D_bjR09v.js +1 -0
  18. package/dist/assets/{ModelPicker-Cwa4UKNc.js → ModelPicker-fGNsJUXK.js} +1 -1
  19. package/dist/assets/{OfficeMapPanel-B0j4e2O1.css → OfficeMapPanel-BFIF-EMt.css} +1 -1
  20. package/dist/assets/OfficeMapPanel-KRrwpmvi.js +4 -0
  21. package/dist/assets/ProcessMonitor-BtgVvQgx.js +1 -0
  22. package/dist/assets/{QueuePanel-lUChp6xi.js → QueuePanel-BGSxmdqf.js} +1 -1
  23. package/dist/assets/{RefreshDebugView-BNa6ehdH.js → RefreshDebugView-B_wCBpFb.js} +1 -1
  24. package/dist/assets/SddHub-BryXNdFd.js +2 -0
  25. package/dist/assets/SessionsDashboard-DLOhC9JZ.js +1 -0
  26. package/dist/assets/SetupScreen-DsXgzxA1.js +1 -0
  27. package/dist/assets/SkillDetailView-ChyQLtrl.js +3 -0
  28. package/dist/assets/{SpecsView-CNqNOKqo.js → SpecsView-Dh9YG8Id.js} +1 -1
  29. package/dist/assets/TechStackView-RJGVF44_.js +1 -0
  30. package/dist/assets/{TerminalPanel-KysALyRz.js → TerminalPanel-3rZfmUfb.js} +1 -1
  31. package/dist/assets/Toaster-BzC_AdG5.js +1 -0
  32. package/dist/assets/activity-7VmgGy-T.js +5 -0
  33. package/dist/assets/activity-BzwApar4.js +5 -0
  34. package/dist/assets/activity-CCUWlVKh.js +5 -0
  35. package/dist/assets/activity-DAHFiOfU.js +5 -0
  36. package/dist/assets/activity-DkkpH2Tf.js +5 -0
  37. package/dist/assets/activity-DqsX-GMs.js +5 -0
  38. package/dist/assets/{activity-Cyx4UukM.js → activity-t0PmZ94i.js} +3 -3
  39. package/dist/assets/{button-99L74zdE.js → button-GVbauxIJ.js} +1 -1
  40. package/dist/assets/{chat-store-Cunk1nDr.js → chat-store-BEcTB7SD.js} +7 -7
  41. package/dist/assets/{codemap-activity-store-BIW6YPvC.js → codemap-activity-store-DrrI6G7M.js} +1 -1
  42. package/dist/assets/{dialog-CNwwBFw3.js → dialog-BjPQYovj.js} +1 -1
  43. package/dist/assets/empty-state-DJc37Wg1.js +1 -0
  44. package/dist/assets/{i18n-DaR2GB_4.js → i18n-c37VNlP9.js} +2 -2
  45. package/dist/assets/index-196U0qsu.js +125 -0
  46. package/dist/assets/index-n_-BWskP.css +1 -0
  47. package/dist/assets/{input-DXjUO_X9.js → input-BVi5hYQz.js} +1 -1
  48. package/dist/assets/{mailbox-store-Dq1wxCRt.js → mailbox-store-DSvN5ZEo.js} +1 -1
  49. package/dist/assets/roster-ws-BD-ATeja.js +1 -0
  50. package/dist/assets/{session-store-B8icONBU.js → session-store-K_ozfq0o.js} +1 -1
  51. package/dist/assets/{settings-llUXRsji.js → settings-24NUQrlz.js} +1 -1
  52. package/dist/assets/settings-BcyGqyX3.js +1 -0
  53. package/dist/assets/settings-BhEHLxqK.js +1 -0
  54. package/dist/assets/settings-C67tfoiy.js +1 -0
  55. package/dist/assets/settings-CvkIXOQE.js +1 -0
  56. package/dist/assets/{settings-CyzkAhwD.js → settings-DGTQ4aKo.js} +1 -1
  57. package/dist/assets/settings-i7lxRYZu.js +1 -0
  58. package/dist/assets/shared-BQ9yQXDx.js +1 -0
  59. package/dist/assets/{stores-JSLvWOQY.js → stores-DVhvmaer.js} +1 -1
  60. package/dist/assets/ui-store-DxFtiYFb.js +1 -0
  61. package/dist/assets/useWebSocket-kb2VPjLc.js +28 -0
  62. package/dist/assets/{utils-C4qVQ63O.js → utils-DvgvNCoT.js} +1 -1
  63. package/dist/assets/{vendor-Di1mdAi5.js → vendor-BmsAdDhb.js} +27 -27
  64. package/dist/assets/{view-navigation-BbHlzAQz.js → view-navigation-D8lN47bJ.js} +1 -1
  65. package/dist/assets/ws-client-BydCS6yi.js +1 -0
  66. package/dist/components/AgentOfficeView.d.ts.map +1 -1
  67. package/dist/components/AgentRosterView.d.ts +16 -0
  68. package/dist/components/AgentRosterView.d.ts.map +1 -0
  69. package/dist/components/AgentRuntimePolicyEditor.d.ts +8 -0
  70. package/dist/components/AgentRuntimePolicyEditor.d.ts.map +1 -0
  71. package/dist/components/AvailabilityCalendarEditor.d.ts +1 -1
  72. package/dist/components/AvailabilityCalendarEditor.d.ts.map +1 -1
  73. package/dist/components/ChangesView.d.ts.map +1 -1
  74. package/dist/components/ChatInput/slash-commands.d.ts.map +1 -1
  75. package/dist/components/ChatInput/slash-routing.d.ts +2 -0
  76. package/dist/components/ChatInput/slash-routing.d.ts.map +1 -1
  77. package/dist/components/ChatInput.d.ts.map +1 -1
  78. package/dist/components/ChatView/index.d.ts.map +1 -1
  79. package/dist/components/ChronicleDashboard.d.ts.map +1 -1
  80. package/dist/components/CodeEditor.d.ts.map +1 -1
  81. package/dist/components/CodeMap.d.ts.map +1 -1
  82. package/dist/components/ContextBreakdownModal.d.ts.map +1 -1
  83. package/dist/components/ContextDashboard.d.ts.map +1 -1
  84. package/dist/components/CustomRosterPanel.d.ts +38 -0
  85. package/dist/components/CustomRosterPanel.d.ts.map +1 -0
  86. package/dist/components/DesignGalleryView.d.ts.map +1 -1
  87. package/dist/components/InspectorPanel.d.ts.map +1 -1
  88. package/dist/components/KanbanView.d.ts.map +1 -1
  89. package/dist/components/MailboxDetailView.d.ts.map +1 -1
  90. package/dist/components/MailboxPanel.d.ts.map +1 -1
  91. package/dist/components/MemoryManager/MemoryDetail.d.ts +4 -4
  92. package/dist/components/MemoryManager/MemoryDetail.d.ts.map +1 -1
  93. package/dist/components/MemoryManager/MemoryEditor.d.ts.map +1 -1
  94. package/dist/components/MemoryManager/MemoryFilters.d.ts +4 -4
  95. package/dist/components/MemoryManager/MemoryFilters.d.ts.map +1 -1
  96. package/dist/components/MemoryManager/MemoryGraph.d.ts +4 -4
  97. package/dist/components/MemoryManager/MemoryGraph.d.ts.map +1 -1
  98. package/dist/components/MemoryManager/MemoryList.d.ts +3 -3
  99. package/dist/components/MemoryManager/MemoryList.d.ts.map +1 -1
  100. package/dist/components/MemoryManager/index.d.ts.map +1 -1
  101. package/dist/components/MemoryManager/shared.d.ts +15 -15
  102. package/dist/components/MemoryManager/shared.d.ts.map +1 -1
  103. package/dist/components/MessageBubble/index.d.ts +1 -1
  104. package/dist/components/MessageBubble/index.d.ts.map +1 -1
  105. package/dist/components/OfficeMapCanvas/resolve.d.ts +17 -1
  106. package/dist/components/OfficeMapCanvas/resolve.d.ts.map +1 -1
  107. package/dist/components/OfficeMapCanvas/use-recently-finished.d.ts +21 -0
  108. package/dist/components/OfficeMapCanvas/use-recently-finished.d.ts.map +1 -0
  109. package/dist/components/OfficeMapCanvas.d.ts.map +1 -1
  110. package/dist/components/ProcessMonitor.d.ts.map +1 -1
  111. package/dist/components/SettingsPanel/BrainSection.d.ts.map +1 -1
  112. package/dist/components/SettingsPanel/MCPSection.d.ts +4 -0
  113. package/dist/components/SettingsPanel/MCPSection.d.ts.map +1 -1
  114. package/dist/components/SettingsPanel/OAuthLoginSection.d.ts +13 -7
  115. package/dist/components/SettingsPanel/OAuthLoginSection.d.ts.map +1 -1
  116. package/dist/components/SettingsPanel/PluginToggleList.d.ts.map +1 -1
  117. package/dist/components/SettingsPanel/PreferenceControls.d.ts +3 -1
  118. package/dist/components/SettingsPanel/PreferenceControls.d.ts.map +1 -1
  119. package/dist/components/SettingsPanel/PreferenceToggle.d.ts +3 -1
  120. package/dist/components/SettingsPanel/PreferenceToggle.d.ts.map +1 -1
  121. package/dist/components/SettingsPanel/ProviderModelsPanel.d.ts.map +1 -1
  122. package/dist/components/SettingsPanel/ProviderSection.d.ts.map +1 -1
  123. package/dist/components/SettingsPanel/local-presets.d.ts +2 -29
  124. package/dist/components/SettingsPanel/local-presets.d.ts.map +1 -1
  125. package/dist/components/SetupScreen.d.ts.map +1 -1
  126. package/dist/components/ShortcutsOverlay.d.ts.map +1 -1
  127. package/dist/components/SidePanel/SkillsList.d.ts.map +1 -1
  128. package/dist/components/SkillDetailView.d.ts.map +1 -1
  129. package/dist/components/TechStackView/index.d.ts.map +1 -1
  130. package/dist/components/VerificationReportPanel.d.ts +15 -0
  131. package/dist/components/VerificationReportPanel.d.ts.map +1 -0
  132. package/dist/components/activity-bar/index.d.ts.map +1 -1
  133. package/dist/components/ui/api-key-display.d.ts +14 -0
  134. package/dist/components/ui/api-key-display.d.ts.map +1 -0
  135. package/dist/components/ui/empty-state.d.ts +29 -0
  136. package/dist/components/ui/empty-state.d.ts.map +1 -0
  137. package/dist/hooks/useGlobalKeyboardShortcuts.d.ts +1 -1
  138. package/dist/hooks/useGlobalKeyboardShortcuts.d.ts.map +1 -1
  139. package/dist/hooks/useWebSocket.d.ts +13 -13
  140. package/dist/hooks/useWebSocket.d.ts.map +1 -1
  141. package/dist/hooks/ws-handlers/chat-handlers.d.ts.map +1 -1
  142. package/dist/hooks/ws-handlers/fleet-handlers.d.ts.map +1 -1
  143. package/dist/hooks/ws-handlers/session-handlers.d.ts.map +1 -1
  144. package/dist/hooks/ws-handlers.d.ts +8 -7
  145. package/dist/hooks/ws-handlers.d.ts.map +1 -1
  146. package/dist/index.css +251 -0
  147. package/dist/index.css.map +2 -2
  148. package/dist/index.html +23 -24
  149. package/dist/index.js +13647 -9142
  150. package/dist/index.js.map +4 -4
  151. package/dist/lib/agent-office.d.ts +22 -0
  152. package/dist/lib/agent-office.d.ts.map +1 -1
  153. package/dist/lib/model-calendar.d.ts +1 -1
  154. package/dist/lib/model-calendar.d.ts.map +1 -1
  155. package/dist/lib/model-matrix-routes.d.ts +2 -191
  156. package/dist/lib/model-matrix-routes.d.ts.map +1 -1
  157. package/dist/lib/plugin-enablement.d.ts +1 -1
  158. package/dist/lib/plugin-enablement.d.ts.map +1 -1
  159. package/dist/lib/roster-ws.d.ts +48 -0
  160. package/dist/lib/roster-ws.d.ts.map +1 -0
  161. package/dist/lib/view-navigation.d.ts +1 -1
  162. package/dist/lib/view-navigation.d.ts.map +1 -1
  163. package/dist/lib/ws-client-utils.d.ts +1 -2
  164. package/dist/lib/ws-client-utils.d.ts.map +1 -1
  165. package/dist/lib/ws-client.d.ts +31 -23
  166. package/dist/lib/ws-client.d.ts.map +1 -1
  167. package/dist/protocol-compatibility.d.ts +12 -0
  168. package/dist/protocol-compatibility.d.ts.map +1 -0
  169. package/dist/providers.json +107 -77
  170. package/dist/stores/local-prefs.d.ts +4 -3
  171. package/dist/stores/local-prefs.d.ts.map +1 -1
  172. package/dist/stores/mailbox-store.d.ts +2 -0
  173. package/dist/stores/mailbox-store.d.ts.map +1 -1
  174. package/dist/stores/session-store.d.ts +1 -1
  175. package/dist/stores/session-store.d.ts.map +1 -1
  176. package/dist/stores/types.d.ts +1 -1
  177. package/dist/stores/types.d.ts.map +1 -1
  178. package/dist/stores/ui-store.d.ts +3 -3
  179. package/dist/stores/ui-store.d.ts.map +1 -1
  180. package/dist/stores/viz-store.d.ts.map +1 -1
  181. package/dist/types.d.ts +364 -68
  182. package/dist/types.d.ts.map +1 -1
  183. package/package.json +7 -6
  184. package/dist/assets/AnalyticsDashboard-DM8YmJuy.js +0 -1
  185. package/dist/assets/AudienceMemoryPanel-BN1qR1rz.js +0 -3
  186. package/dist/assets/ChangesView-PgFw9vKk.js +0 -1
  187. package/dist/assets/ChronicleDashboard-CtOiFCYV.js +0 -1
  188. package/dist/assets/CodeEditor-B_KwrAhN.js +0 -1
  189. package/dist/assets/CodeMap-T1dsXVRH.js +0 -1
  190. package/dist/assets/ConfirmModal-Bm9f2Pg9.js +0 -1
  191. package/dist/assets/DesignGalleryView-CUi5RBHH.js +0 -1
  192. package/dist/assets/KanbanView-CD_x5YND.js +0 -2
  193. package/dist/assets/MailboxDetailView-DQpxIh_A.js +0 -1
  194. package/dist/assets/MemoryManager-BrCVqIJK.js +0 -1
  195. package/dist/assets/OfficeMapPanel-D01rqjLt.js +0 -4
  196. package/dist/assets/ProcessMonitor-DjO7eNsN.js +0 -1
  197. package/dist/assets/SddHub-DLVIXlN6.js +0 -2
  198. package/dist/assets/SessionsDashboard-DsAc_Sx2.js +0 -1
  199. package/dist/assets/SetupScreen-KqV61-Ir.js +0 -1
  200. package/dist/assets/SkillDetailView-CK7MB8Uo.js +0 -3
  201. package/dist/assets/TechStackView-nVNj4kWJ.js +0 -1
  202. package/dist/assets/Toaster-B1idXZ-O.js +0 -1
  203. package/dist/assets/activity-AfUMXtSI.js +0 -5
  204. package/dist/assets/activity-Bd_pRifE.js +0 -5
  205. package/dist/assets/activity-Ct_QOdtL.js +0 -5
  206. package/dist/assets/activity-Dyikq8Zm.js +0 -5
  207. package/dist/assets/activity-Ukyu3lON.js +0 -5
  208. package/dist/assets/activity-gaWDc806.js +0 -5
  209. package/dist/assets/index-BwEOo8R-.css +0 -1
  210. package/dist/assets/index-Du90vd1u.js +0 -119
  211. package/dist/assets/pagination-Ktuov5iD.js +0 -1
  212. package/dist/assets/settings-4BR882HN.js +0 -1
  213. package/dist/assets/settings-B5P4V9M6.js +0 -1
  214. package/dist/assets/settings-Cjxo5UVP.js +0 -1
  215. package/dist/assets/settings-CnViO4_M.js +0 -1
  216. package/dist/assets/settings-jrfJX8W2.js +0 -1
  217. package/dist/assets/shared-aSCYBzAV.js +0 -1
  218. package/dist/assets/ui-store-BepZz9CZ.js +0 -1
  219. package/dist/assets/useWebSocket-CRYUFxmO.js +0 -27
  220. package/dist/assets/ws-client-BWO_PH_X.js +0 -1
@@ -1,13 +1,13 @@
1
- import{$i as e,Qi as t}from"./vendor-Di1mdAi5.js";import{n}from"./utils-C4qVQ63O.js";function r(e,t){if(e==null){let e=Error(t?`Expected ${t} to be defined`:`Expected value to be defined`);throw e.name=`ExpectDefinedError`,e}return e}function i(e,t){let n=e=>e.trim().replace(/\s+/g,` `).toLowerCase();return n(e)===n(t)}function a(e){return e instanceof Error?e.message:String(e)}var o=/<nextsteps\b[^>]*>\s*\n+/i,s=/^(?:(\d+)[.)]\s*|[-*•]\s*)(.+?)(\s+auto="true")?$/,c=6;function l(e,t=!1,n=!0){return n?f(e,t):d(e)}function u(e,t,n,r){e.push(r?{index:t,text:n,auto:!0}:{index:t,text:n})}function d(e){let t=e.split(`
2
- `),n=[],r=new Set;for(let e of t){let t=e.trim();if(!t)continue;let i=s.exec(t);if(!i)continue;let a=i[1],o=i[2].trim(),l;if(l=a===void 0?n.length+1:Number.parseInt(a,10),r.has(l))continue;r.add(l);let d=!!i[3]&&n.length===0&&l===1;if(u(n,l,o,d),n.length>=c)break}return{steps:n,texts:n.map(e=>e.text),stripped:e,autoTexts:n.filter(e=>e.auto).map(e=>e.text)}}function f(e,t){let n=o.exec(e);if(!n)return{steps:[],texts:[],stripped:e,autoTexts:[]};let r=n.index+n[0].length,i=e.slice(r),a=i.split(`
3
- `),l=[],d=new Set;for(let e of a){let t=e.trim();if(!t)continue;let n=s.exec(t);if(!n)break;let r=n[1],i=n[2].trim(),a;if(a=r===void 0?l.length+1:Number.parseInt(r,10),d.has(a))continue;d.add(a);let o=!!n[3]&&l.length===0&&a===1;if(u(l,a,i,o),l.length>=c)break}if(l.length===0||!i.includes(`</nextsteps>`))return{steps:[],texts:[],stripped:e,autoTexts:[]};let f=l.map(e=>e.text),m=l.filter(e=>e.auto).map(e=>e.text),h=n.index,g=n[0].length+p(i,l.length);return{steps:l,texts:f,stripped:(e.slice(0,h)+e.slice(h+g)).replace(/\n{3,}/g,`
1
+ import{ia as e,ra as t}from"./vendor-BmsAdDhb.js";import{n}from"./utils-DvgvNCoT.js";function r(e,t){if(e==null){let e=Error(t?`Expected ${t} to be defined`:`Expected value to be defined`);throw e.name=`ExpectDefinedError`,e}return e}var i=/<nextsteps\b[^>]*>\s*\n+/i,a=/^(?:(\d+)[.)]\s*|[-*•]\s*)(.+?)(\s+auto="true")?$/,o=6;function s(e,t=!1,n=!0){return n?u(e,t):l(e)}function c(e,t,n,r){e.push(r?{index:t,text:n,auto:!0}:{index:t,text:n})}function l(e){let t=e.split(`
2
+ `),n=[],r=new Set;for(let e of t){let t=e.trim();if(!t)continue;let i=a.exec(t);if(!i)continue;let s=i[1],l=i[2].trim(),u;if(u=s===void 0?n.length+1:Number.parseInt(s,10),r.has(u))continue;r.add(u);let d=!!i[3]&&n.length===0&&u===1;if(c(n,u,l,d),n.length>=o)break}return{steps:n,texts:n.map(e=>e.text),stripped:e,autoTexts:n.filter(e=>e.auto).map(e=>e.text)}}function u(e,t){let n=i.exec(e);if(!n)return{steps:[],texts:[],stripped:e,autoTexts:[]};let r=n.index+n[0].length,s=e.slice(r),l=s.split(`
3
+ `),u=[],f=new Set;for(let e of l){let t=e.trim();if(!t)continue;let n=a.exec(t);if(!n)break;let r=n[1],i=n[2].trim(),s;if(s=r===void 0?u.length+1:Number.parseInt(r,10),f.has(s))continue;f.add(s);let l=!!n[3]&&u.length===0&&s===1;if(c(u,s,i,l),u.length>=o)break}if(u.length===0||!s.includes(`</nextsteps>`))return{steps:[],texts:[],stripped:e,autoTexts:[]};let p=u.map(e=>e.text),m=u.filter(e=>e.auto).map(e=>e.text),h=n.index,g=n[0].length+d(s,u.length);return{steps:u,texts:p,stripped:(e.slice(0,h)+e.slice(h+g)).replace(/\n{3,}/g,`
4
4
 
5
- `).trim(),autoTexts:m}}function p(e,t){let n=e.indexOf(`</nextsteps>`);if(n!==-1){let t=n+12;return e[t]===`
5
+ `).trim(),autoTexts:m}}function d(e,t){let n=e.indexOf(`</nextsteps>`);if(n!==-1){let t=n+12;return e[t]===`
6
6
  `&&(t+=1),t}let r=e.split(`
7
- `),i=0,a=0;for(let e of r){let n=e.trim();if(!n||!s.exec(n))break;if(i+=e.length+1,a++,a>=t){--i;break}}return i}function m(e){return e.replace(/<next_?steps\b[^>]*>[\s\S]*?<\/next_?steps>/gi,``).replace(/<next_?steps\b[^>]*\/?>/gi,``).replace(/\n{3,}/g,`
7
+ `),i=0,o=0;for(let e of r){let n=e.trim();if(!n||!a.exec(n))break;if(i+=e.length+1,o++,o>=t){--i;break}}return i}function f(e){return e.replace(/<next_?steps\b[^>]*>[\s\S]*?<\/next_?steps>/gi,``).replace(/<next_?steps\b[^>]*\/?>/gi,``).replace(/\n{3,}/g,`
8
8
 
9
- `).trim()}function h(e){if(!e)return e;let t=e.split(/\n{2,}/),n=[];for(let e of t)n.length>0&&n[n.length-1]?.trim()===e.trim()||n.push(e);return n.map(e=>{let t=e.split(`
9
+ `).trim()}function p(e){if(!e)return e;let t=e.split(/\n{2,}/),n=[];for(let e of t)n.length>0&&n[n.length-1]?.trim()===e.trim()||n.push(e);return n.map(e=>{let t=e.split(`
10
10
  `),n=[];for(let e of t)n.length>0&&e.trim().length>0&&n[n.length-1]?.trim()===e.trim()||n.push(e);return n.join(`
11
11
  `)}).join(`
12
12
 
13
- `)}function g(e){let t=new Map;for(let n of e)n.role===`tool`&&n.toolUseId&&t.set(n.toolUseId,n.id);return t}var _=e()(t((e,t)=>({messages:[],currentAssistantMessageId:null,currentToolId:null,isLoading:!1,abortController:null,executions:new Map,toolMessageIdsByUseId:new Map,queue:[],runStart:null,refining:!1,pendingRefinement:null,thinkingBuffer:``,thinkingStartedAt:null,thinkingLogBuffer:``,thinkingLogStartedAt:null,boundSessionId:null,addMessage:t=>{let r=`msg_${Date.now()}_${n().slice(0,8)}`,i={...t,id:r,timestamp:t.timestamp??Date.now()};return e(e=>{let n={messages:[...e.messages,i],currentAssistantMessageId:t.role===`assistant`?r:e.currentAssistantMessageId};if(i.role===`tool`&&i.toolUseId){let t=new Map(e.toolMessageIdsByUseId);t.set(i.toolUseId,r),n.toolMessageIdsByUseId=t}return n}),r},setMessages:t=>{e({messages:t,currentAssistantMessageId:null,currentToolId:null,executions:new Map,toolMessageIdsByUseId:g(t),thinkingBuffer:``,thinkingStartedAt:null,thinkingLogBuffer:``,thinkingLogStartedAt:null})},updateMessage:(t,n)=>{e(e=>({messages:e.messages.map(e=>e.id===t?{...e,...n}:e)}))},appendToMessage:(t,n)=>{e(e=>({messages:e.messages.map(e=>e.id===t?{...e,content:e.content+n}:e)}))},finalizeMessage:t=>{e(e=>({messages:e.messages.map(e=>{if(e.id!==t)return e;if(e.role!==`assistant`)return{...e,content:h(e.content),streaming:!1};let n=l(e.content),r=n.steps.length>0?{steps:n.steps}:void 0;return{...e,content:h(n.stripped),streaming:!1,...r?{nextSteps:r}:{}}})}))},setToolResult:(t,n,r)=>{e(e=>({messages:e.messages.map(e=>e.id===t?{...e,toolResult:n,isError:!r,progressLines:void 0}:e)}))},appendToolProgress:(e,n)=>{t().appendToolProgressLines(e,[n])},appendToolProgressLines:(t,n)=>{n.length!==0&&e(e=>({messages:e.messages.map(e=>{if(e.id!==t)return e;let r=e.progressLines??[];return r.push(...n),r.length>30&&r.splice(0,r.length-30),{...e,progressLines:r}})}))},getToolMessageId:e=>t().toolMessageIdsByUseId.get(e),setToolResultByUseId:(e,n,r)=>{let i=t().toolMessageIdsByUseId.get(e);i&&t().setToolResult(i,n,r)},appendToolProgressLinesByUseId:(e,n)=>{let r=t().toolMessageIdsByUseId.get(e);r&&t().appendToolProgressLines(r,n)},setLoading:t=>e({isLoading:t}),setAbortController:t=>e({abortController:t}),clearMessages:()=>e({messages:[],currentAssistantMessageId:null,currentToolId:null,executions:new Map,toolMessageIdsByUseId:new Map,thinkingBuffer:``,thinkingStartedAt:null,thinkingLogBuffer:``,thinkingLogStartedAt:null,boundSessionId:null}),setBoundSessionId:t=>e({boundSessionId:t}),setCurrentAssistantMessage:t=>e({currentAssistantMessageId:t}),setCurrentToolId:t=>e({currentToolId:t}),truncateAfter:t=>e(e=>{let n=e.messages.findIndex(e=>e.id===t);if(n===-1)return e;let r=e.messages.slice(0,n+1);return{messages:r,currentAssistantMessageId:null,currentToolId:null,toolMessageIdsByUseId:g(r)}}),addExecution:t=>{e(e=>{let n=new Map(e.executions);return n.set(t.id,t),{executions:n}})},updateExecution:(t,n)=>{e(e=>{let r=new Map(e.executions),i=r.get(t);return i&&r.set(t,{...i,...n}),{executions:r}})},setRefining:t=>e({refining:t}),setPendingRefinement:(t,n)=>e({pendingRefinement:t===null?null:{text:t,images:n??[]}}),enqueue:(t,n=`queue`,r)=>e(e=>({queue:[...e.queue,{text:t,mode:n,addedAt:Date.now(),...r?.length?{images:r}:{}}]})),dequeue:()=>{let{queue:n}=t();if(n.length===0)return null;let[i,...a]=n;return e({queue:a}),r(i)},removeQueued:t=>e(e=>({queue:e.queue.filter((e,n)=>n!==t)})),clearQueue:()=>e({queue:[]}),removeMessage:t=>e(e=>{let n=e.messages.filter(e=>e.id!==t);return{messages:n,toolMessageIdsByUseId:g(n)}}),updateLastUserMessage:t=>e(e=>{let n=e.messages;for(let e=n.length-1;e>=0;e--)if(n[e].role===`user`){let r={...n[e],content:t},i=[...n];return i[e]=r,{messages:i}}return e}),setRunStart:t=>e({runStart:t}),appendThinking:t=>e(e=>({thinkingBuffer:e.thinkingBuffer+t,thinkingStartedAt:e.thinkingStartedAt??Date.now(),thinkingLogBuffer:e.thinkingLogBuffer+t,thinkingLogStartedAt:e.thinkingLogStartedAt??Date.now()})),clearThinking:()=>e({thinkingBuffer:``,thinkingStartedAt:null}),flushThinkingLog:e=>{let{thinkingLogBuffer:n,thinkingLogStartedAt:r}=t(),i=n.trim();if(!i)return;let a=r??Date.now();t().addMessage({role:`system`,content:``,thinkingLog:{iteration:e,text:i,startedAt:a,durationMs:Math.max(0,Date.now()-a)}}),t().clearThinkingLog()},clearThinkingLog:()=>e({thinkingLogBuffer:``,thinkingLogStartedAt:null})}),{name:`wrongstack-chat`,version:1,partialize:e=>({messages:e.messages.map(e=>e.attachments?.some(e=>e.dataUrl)?{...e,attachments:e.attachments.map(e=>({...e,dataUrl:void 0}))}:e),queue:e.queue.map(e=>e.images?{...e,images:void 0}:e),boundSessionId:e.boundSessionId,thinkingLogBuffer:e.thinkingLogBuffer}),migrate:(e,t)=>{if(t>1)return null;let n=e??{};return{messages:Array.isArray(n.messages)?n.messages:[],queue:Array.isArray(n.queue)?n.queue:[],boundSessionId:typeof n.boundSessionId==`string`?n.boundSessionId:null,thinkingLogBuffer:typeof n.thinkingLogBuffer==`string`?n.thinkingLogBuffer:``}},onRehydrateStorage:()=>(e,t)=>{t||typeof window<`u`&&(window.__wrongstackChatRehydrated=!0)}}));export{i as a,r as i,l as n,a as o,m as r,_ as t};
13
+ `)}function m(e){let t=new Map;for(let n of e)n.role===`tool`&&n.toolUseId&&t.set(n.toolUseId,n.id);return t}var h=e()(t((e,t)=>({messages:[],currentAssistantMessageId:null,currentToolId:null,isLoading:!1,abortController:null,executions:new Map,toolMessageIdsByUseId:new Map,queue:[],runStart:null,refining:!1,pendingRefinement:null,thinkingBuffer:``,thinkingStartedAt:null,thinkingLogBuffer:``,thinkingLogStartedAt:null,boundSessionId:null,addMessage:t=>{let r=`msg_${Date.now()}_${n().slice(0,8)}`,i={...t,id:r,timestamp:t.timestamp??Date.now()};return e(e=>{let n={messages:[...e.messages,i],currentAssistantMessageId:t.role===`assistant`?r:e.currentAssistantMessageId};if(i.role===`tool`&&i.toolUseId){let t=new Map(e.toolMessageIdsByUseId);t.set(i.toolUseId,r),n.toolMessageIdsByUseId=t}return n}),r},setMessages:t=>{e({messages:t,currentAssistantMessageId:null,currentToolId:null,executions:new Map,toolMessageIdsByUseId:m(t),thinkingBuffer:``,thinkingStartedAt:null,thinkingLogBuffer:``,thinkingLogStartedAt:null})},updateMessage:(t,n)=>{e(e=>({messages:e.messages.map(e=>e.id===t?{...e,...n}:e)}))},appendToMessage:(t,n)=>{e(e=>({messages:e.messages.map(e=>e.id===t?{...e,content:e.content+n}:e)}))},finalizeMessage:t=>{e(e=>({messages:e.messages.map(e=>{if(e.id!==t)return e;if(e.role!==`assistant`)return{...e,content:p(e.content),streaming:!1};let n=s(e.content),r=n.steps.length>0?{steps:n.steps}:void 0;return{...e,content:p(n.stripped),streaming:!1,...r?{nextSteps:r}:{}}})}))},setToolResult:(t,n,r)=>{e(e=>({messages:e.messages.map(e=>e.id===t?{...e,toolResult:n,isError:!r,progressLines:void 0}:e)}))},appendToolProgress:(e,n)=>{t().appendToolProgressLines(e,[n])},appendToolProgressLines:(t,n)=>{n.length!==0&&e(e=>({messages:e.messages.map(e=>{if(e.id!==t)return e;let r=e.progressLines??[];return r.push(...n),r.length>30&&r.splice(0,r.length-30),{...e,progressLines:r}})}))},getToolMessageId:e=>t().toolMessageIdsByUseId.get(e),setToolResultByUseId:(e,n,r)=>{let i=t().toolMessageIdsByUseId.get(e);i&&t().setToolResult(i,n,r)},appendToolProgressLinesByUseId:(e,n)=>{let r=t().toolMessageIdsByUseId.get(e);r&&t().appendToolProgressLines(r,n)},setLoading:t=>e({isLoading:t}),setAbortController:t=>e({abortController:t}),clearMessages:()=>e({messages:[],currentAssistantMessageId:null,currentToolId:null,executions:new Map,toolMessageIdsByUseId:new Map,thinkingBuffer:``,thinkingStartedAt:null,thinkingLogBuffer:``,thinkingLogStartedAt:null,boundSessionId:null}),setBoundSessionId:t=>e({boundSessionId:t}),setCurrentAssistantMessage:t=>e({currentAssistantMessageId:t}),setCurrentToolId:t=>e({currentToolId:t}),truncateAfter:t=>e(e=>{let n=e.messages.findIndex(e=>e.id===t);if(n===-1)return e;let r=e.messages.slice(0,n+1);return{messages:r,currentAssistantMessageId:null,currentToolId:null,toolMessageIdsByUseId:m(r)}}),addExecution:t=>{e(e=>{let n=new Map(e.executions);return n.set(t.id,t),{executions:n}})},updateExecution:(t,n)=>{e(e=>{let r=new Map(e.executions),i=r.get(t);return i&&r.set(t,{...i,...n}),{executions:r}})},setRefining:t=>e({refining:t}),setPendingRefinement:(t,n)=>e({pendingRefinement:t===null?null:{text:t,images:n??[]}}),enqueue:(t,n=`queue`,r)=>e(e=>({queue:[...e.queue,{text:t,mode:n,addedAt:Date.now(),...r?.length?{images:r}:{}}]})),dequeue:()=>{let{queue:n}=t();if(n.length===0)return null;let[i,...a]=n;return e({queue:a}),r(i)},removeQueued:t=>e(e=>({queue:e.queue.filter((e,n)=>n!==t)})),clearQueue:()=>e({queue:[]}),removeMessage:t=>e(e=>{let n=e.messages.filter(e=>e.id!==t);return{messages:n,toolMessageIdsByUseId:m(n)}}),updateLastUserMessage:t=>e(e=>{let n=e.messages;for(let e=n.length-1;e>=0;e--)if(n[e].role===`user`){let r={...n[e],content:t},i=[...n];return i[e]=r,{messages:i}}return e}),setRunStart:t=>e({runStart:t}),appendThinking:t=>e(e=>({thinkingBuffer:e.thinkingBuffer+t,thinkingStartedAt:e.thinkingStartedAt??Date.now(),thinkingLogBuffer:e.thinkingLogBuffer+t,thinkingLogStartedAt:e.thinkingLogStartedAt??Date.now()})),clearThinking:()=>e({thinkingBuffer:``,thinkingStartedAt:null}),flushThinkingLog:e=>{let{thinkingLogBuffer:n,thinkingLogStartedAt:r}=t(),i=n.trim();if(!i)return;let a=r??Date.now();t().addMessage({role:`system`,content:``,thinkingLog:{iteration:e,text:i,startedAt:a,durationMs:Math.max(0,Date.now()-a)}}),t().clearThinkingLog()},clearThinkingLog:()=>e({thinkingLogBuffer:``,thinkingLogStartedAt:null})}),{name:`wrongstack-chat`,version:1,partialize:e=>({messages:e.messages.map(e=>e.attachments?.some(e=>e.dataUrl)?{...e,attachments:e.attachments.map(e=>({...e,dataUrl:void 0}))}:e),queue:e.queue.map(e=>e.images?{...e,images:void 0}:e),boundSessionId:e.boundSessionId,thinkingLogBuffer:e.thinkingLogBuffer}),migrate:(e,t)=>{if(t>1)return null;let n=e??{};return{messages:Array.isArray(n.messages)?n.messages:[],queue:Array.isArray(n.queue)?n.queue:[],boundSessionId:typeof n.boundSessionId==`string`?n.boundSessionId:null,thinkingLogBuffer:typeof n.thinkingLogBuffer==`string`?n.thinkingLogBuffer:``}},onRehydrateStorage:()=>(e,t)=>{t||typeof window<`u`&&(window.__wrongstackChatRehydrated=!0)}}));export{r as i,s as n,f as r,h as t};
@@ -1 +1 @@
1
- import{$i as e}from"./vendor-Di1mdAi5.js";var t=8e3,n=2500,r=30*6e4,i=200,a=500,o={read:`read`,read_file:`read`,write:`write`,write_file:`write`,edit:`edit`,patch:`edit`,apply_patch:`edit`,replace:`edit`,delete:`delete`,delete_file:`delete`,remove:`delete`,grep:`search`,glob:`search`,search:`search`,"codebase-search":`search`,"codebase-index":`index`,remember:`memory`,forget:`memory`,memory_search:`memory`,memory_update:`memory`,memory_delete:`memory`};function s(e,t=``){return e===`rename`?`edit`:e in{read:1,write:1,edit:1,delete:1,search:1}?e:o[t]}function c(e){let t=[];for(let n of[`path`,`file`,`filePath`,`target`]){let r=e[n];typeof r==`string`&&t.push(r)}let n=e.files;if(typeof n==`string`&&t.push(n),Array.isArray(n))for(let e of n)typeof e==`string`&&t.push(e);return[...new Set(t)]}function l(e,t){let n=typeof t.old_string==`string`?t.old_string.trim():``,r=typeof t.new_string==`string`?t.new_string.trim():``;if(n||r)return`${n.replace(/\s+/g,` `).slice(0,42)||`∅`} → ${r.replace(/\s+/g,` `).slice(0,42)||`∅`}`;if(typeof t.patch==`string`){let n=d(t);return`${e} +${n?.added??0} −${n?.removed??0}`}let i=typeof t.content==`string`?t.content:void 0;if(i!==void 0){let t=i.length===0?0:i.split(/\r?\n/).length;return`${e} ${t} line${t===1?``:`s`}`}for(let e of[`query`,`pattern`,`old_string`,`new_string`,`text`,`command`]){let n=t[e];if(typeof n==`string`&&n.trim()){let t=n.trim().replace(/\s+/g,` `).slice(0,96);return e===`query`?`"${t}"`:e===`pattern`?`/${t}/`:e===`command`?`$ ${t}`:t}}return e}function u(e){return e.trim().replace(/\s+/g,` `).slice(0,72)}function d(e){let t=typeof e.old_string==`string`?e.old_string:void 0,n=typeof e.new_string==`string`?e.new_string:void 0;if(t!==void 0||n!==void 0){let e=t?t.split(/\r?\n/).length:0;return{added:n?n.split(/\r?\n/).length:0,removed:e,...t?{before:u(t)}:{},...n?{after:u(n)}:{}}}let r=typeof e.patch==`string`?e.patch:void 0;if(r){let e=r.split(/\r?\n/),t=e.filter(e=>e.startsWith(`+`)&&!e.startsWith(`+++`)),n=e.filter(e=>e.startsWith(`-`)&&!e.startsWith(`---`));return{added:t.length,removed:n.length,...n[0]?{before:u(n[0].slice(1))}:{},...t[0]?{after:u(t[0].slice(1))}:{}}}let i=typeof e.content==`string`?e.content:void 0;if(i!==void 0)return{added:i.length===0?0:i.split(/\r?\n/).length,removed:0,...i?{after:u(i)}:{}}}function f(e){let t=e.status??`observed`;return{...e,id:e.id??`${e.toolUseId??`event`}:${e.filePath}:${e.timestamp}`,status:t,source:e.source??`legacy`,agentName:e.agentName??e.agent,agent:e.agent??e.agentName}}function p(e,t){let n=e.get(t.filePath)??[];if(e.set(t.filePath,[t,...n].slice(0,i)),e.size<=a)return;let r=[...e.entries()].sort((e,t)=>(e[1][0]?.timestamp??0)-(t[1][0]?.timestamp??0))[0]?.[0];r&&e.delete(r)}function m(e){return`${e.sessionId??`unscoped`}:${e.agentId??e.agentName??e.agent??`external`}`}function h(e){let t=new Map;for(let n of e){let e=n.agentId??`external`,r=n.agentName??n.agent??`External process`,i=n.sessionId??`unscoped`,a=m(n),o=t.get(a);o?(o.operations.push(n),o.startedAt=Math.min(o.startedAt,n.timestamp)):t.set(a,{key:a,agentId:e,agentName:r,sessionId:i,operations:[n],startedAt:n.timestamp})}return[...t.values()].sort((e,t)=>e.startedAt-t.startedAt)}function g(e,t,n){let r=String(e.name??`unknown`),i=e.input&&typeof e.input==`object`?e.input:{},a=Date.now(),o=String(e.id??`${r}:${a}`),c=d(i);return(t.length>0?t:[{filePath:`(tool:${r})`,operation:`execute`}]).map((u,d)=>({id:`${o}:${d}`,toolUseId:o,filePath:u.filePath,type:u.operation===`execute`?`execute`:s(u.operation,r)??`edit`,toolName:r,summary:l(r,i),timestamp:a,status:n,source:`tool`,attribution:t.length>0?`exact`:`correlated`,...c?{change:c}:{},sessionId:typeof e.sessionId==`string`?e.sessionId:void 0,traceId:typeof e.traceId==`string`?e.traceId:void 0,agentId:typeof e.agentId==`string`?e.agentId:`leader`,agentName:typeof e.agentName==`string`?e.agentName:`LEADER`,...u.line?{line:u.line}:{},...u.endLine?{endLine:u.endLine}:{}}))}function _(e){let t=e.payload??{};if(e.type===`tool.started`||e.type===`tool.executed`||e.type===`codemap.tool_started`||e.type===`codemap.tool_executed`)return g(t,Array.isArray(t.fileTargets)?t.fileTargets:c(t.input&&typeof t.input==`object`?t.input:{}).map(e=>({filePath:e,operation:o[String(t.name??``)]??`edit`})),e.type===`tool.started`||e.type===`codemap.tool_started`?`active`:`completed`);if(e.type===`provider.response`){let e=t.blocks;if(!Array.isArray(e))return[];let n=[];for(let t of e){if(!t||typeof t!=`object`)continue;let e=t;if(e.type!==`tool_use`)continue;let r=String(e.name??``),i=o[r];if(!i)continue;let a=e.input&&typeof e.input==`object`?e.input:{},s=c(a),u=Date.now();s.length===0&&(i===`memory`||i===`search`||i===`index`)&&s.push(`(global)`);for(let e of s)n.push({filePath:e,type:i,toolName:r,summary:l(r,a),timestamp:u})}return n}if(e.type===`tool.progress`){let e=t.event&&typeof t.event==`object`?t.event:void 0;if(e?.type!==`file_changed`||typeof e.path!=`string`)return[];let n=String(e.operation??`edit`);return[{id:`${String(t.id??`progress`)}:${e.path}:${Date.now()}`,toolUseId:typeof t.id==`string`?t.id:void 0,filePath:e.path,type:s(n)??`edit`,toolName:String(t.name??`deterministic-tool`),summary:String(e.text??`tool reported file change`),timestamp:Date.now(),status:`active`,source:`deterministic`,sessionId:typeof t.sessionId==`string`?t.sessionId:void 0,traceId:typeof t.traceId==`string`?t.traceId:void 0,agentId:typeof t.agentId==`string`?t.agentId:void 0,agentName:typeof t.agentName==`string`?t.agentName:void 0,line:typeof e.line==`number`?e.line:void 0,endLine:typeof e.endLine==`number`?e.endLine:void 0,attribution:`exact`}]}if(e.type===`codemap.file_event`){let e=s(String(t.operation??`edit`))??`edit`;return typeof t.filePath==`string`?[{filePath:t.filePath,type:e,toolName:typeof t.toolName==`string`?t.toolName:String(t.source??`watcher`),summary:`${String(t.source??`external`)} ${String(t.operation??`changed`)}`,timestamp:typeof t.at==`number`?t.at:Date.now(),status:t.phase===`started`?`active`:`observed`,source:t.source??`external`,sessionId:typeof t.sessionId==`string`?t.sessionId:void 0,traceId:typeof t.traceId==`string`?t.traceId:void 0,agentId:typeof t.agentId==`string`?t.agentId:void 0,agentName:typeof t.agentName==`string`?t.agentName:void 0,toolUseId:typeof t.toolUseId==`string`?t.toolUseId:void 0,line:typeof t.line==`number`?t.line:void 0,endLine:typeof t.endLine==`number`?t.endLine:void 0}]:[]}return e.type===`file.saved`&&typeof t.filePath==`string`?[{filePath:t.filePath,type:`write`,toolName:`save`,summary:``,timestamp:Date.now(),source:`editor`}]:e.type===`memory.event`&&typeof t.event==`string`?[{filePath:`(memory)`,type:`memory`,toolName:`memory.${t.event}`,summary:String(t.memoryId??``),timestamp:Date.now()}]:[]}var v=e((e,i)=>({history:new Map,pulses:new Map,activeOperations:new Map,totalCount:0,recordActivity(n){let r=f(n);e(e=>{let n=new Map(e.history),i=new Map(e.pulses);return p(n,r),i.set(r.filePath,Date.now()+t),{history:n,pulses:i,totalCount:e.totalCount+1}})},startActivities(n){if(n.length===0)return;let r=n.map(e=>f({...e,status:`active`}));e(e=>{let n=new Map(e.history),i=new Map(e.pulses),a=new Map(e.activeOperations);for(let e of r)if(p(n,e),i.set(e.filePath,Date.now()+t),e.toolUseId){let t=a.get(e.toolUseId)??[];a.set(e.toolUseId,[...t,e])}return{history:n,pulses:i,activeOperations:a,totalCount:e.totalCount+r.length}})},finishTool(n,r){let i=r.timestamp??Date.now();e(e=>{let a=e.activeOperations.get(n)??[];if(a.length===0)return e;let o=new Map(e.history),s=new Map(e.pulses);for(let e of a){let a=o.get(e.filePath)??[];o.set(e.filePath,a.map(e=>e.toolUseId===n?{...e,status:r.ok?`completed`:`failed`,ok:r.ok,completedAt:i,durationMs:r.durationMs??i-e.timestamp}:e)),s.set(e.filePath,Date.now()+t)}let c=new Map(e.activeOperations);return c.delete(n),{history:o,pulses:s,activeOperations:c}})},recordFileEvent(r){let i=f({...r,attribution:r.attribution??(r.agentId?`exact`:`external`)});e(e=>{let r=(e.history.get(i.filePath)??[]).find(e=>e.source!==`watcher`&&e.source!==`external`&&Math.abs(i.timestamp-e.timestamp)<=n);if(r){let n=new Map(e.history);n.set(i.filePath,(n.get(i.filePath)??[]).map(e=>e.id===r.id?{...e,watcherConfirmed:e.watcherConfirmed||i.source===`watcher`||i.source===`editor`}:e));let a=new Map(e.pulses);return a.set(i.filePath,Date.now()+t),{history:n,pulses:a}}let a=i.toolUseId?e.activeOperations.get(i.toolUseId):void 0;if(a&&a.length>0){let n=a[0],r=f({...i,status:`active`,source:i.source??`deterministic`,sessionId:i.sessionId??n.sessionId,traceId:i.traceId??n.traceId,agentId:i.agentId??n.agentId,agentName:i.agentName??n.agentName,agent:i.agent??n.agent,attribution:`exact`}),o=new Map(e.history),s=new Map(e.pulses),c=new Map(e.activeOperations);return p(o,r),s.set(r.filePath,Date.now()+t),c.set(i.toolUseId,[...a,r]),{history:o,pulses:s,activeOperations:c,totalCount:e.totalCount+1}}let o=[...e.activeOperations.values()].flat().filter(e=>e.filePath.startsWith(`(tool:`)&&Math.abs(i.timestamp-e.timestamp)<=3e5);if(o.length===1){let n=o[0],r=f({...i,id:`${n.toolUseId}:${i.filePath}:${i.timestamp}`,toolUseId:n.toolUseId,toolName:n.toolName,summary:`${n.toolName} → filesystem ${i.type}`,status:`active`,source:`deterministic`,sessionId:n.sessionId,traceId:n.traceId,agentId:n.agentId,agentName:n.agentName,agent:n.agent,watcherConfirmed:!0,attribution:`correlated`}),a=new Map(e.history),s=new Map(e.pulses),c=new Map(e.activeOperations);if(p(a,r),s.set(r.filePath,Date.now()+t),r.toolUseId){let e=c.get(r.toolUseId)??[];c.set(r.toolUseId,[...e,r])}return{history:a,pulses:s,activeOperations:c,totalCount:e.totalCount+1}}let s=new Map(e.history),c=new Map(e.pulses);return p(s,i),c.set(i.filePath,Date.now()+t),{history:s,pulses:c,totalCount:e.totalCount+1}})},resolveActivitySymbol(t,n,r){e(e=>{let i=new Map(e.history);i.set(n,(i.get(n)??[]).map(e=>e.toolUseId===t?{...e,symbol:r}:e));let a=new Map(e.activeOperations),o=a.get(t);return o&&a.set(t,o.map(e=>e.filePath===n?{...e,symbol:r}:e)),{history:i,activeOperations:a}})},getActivityForFile(e){return i().history.get(e)??[]},getActiveForFile(e){return[...i().activeOperations.values()].flat().filter(t=>t.filePath===e)},getActiveOperations(){return[...i().activeOperations.values()].flat()},getAgentPresences(){return h(i().getActiveOperations())},getPulsingFiles(){return i()._sweep(),new Set(i().pulses.keys())},getPulseType(e){if(i()._sweep(),i().pulses.has(e))return i().history.get(e)?.[0]?.type},clear(){e({history:new Map,pulses:new Map,activeOperations:new Map,totalCount:0})},_sweep(){let t=Date.now(),n=[...i().pulses].filter(([,e])=>e<t).map(([e])=>e),a=[...i().activeOperations].filter(([,e])=>e.every(e=>t-e.timestamp>r)).map(([e])=>e);n.length===0&&a.length===0||e(e=>{let r=new Map(e.pulses);for(let e of n)r.delete(e);if(a.length===0)return{pulses:r};let i=new Map(e.history),o=new Map(e.activeOperations);for(let e of a){for(let n of o.get(e)??[])i.set(n.filePath,(i.get(n.filePath)??[]).map(n=>n.toolUseId===e?{...n,status:`failed`,ok:!1,completedAt:t,durationMs:t-n.timestamp,summary:`${n.summary||n.toolName} · telemetry timeout`}:n));o.delete(e)}return{pulses:r,history:i,activeOperations:o}})}}));export{v as i,_ as n,h as r,m as t};
1
+ import{ia as e}from"./vendor-BmsAdDhb.js";var t=8e3,n=2500,r=30*6e4,i=200,a=500,o={read:`read`,read_file:`read`,write:`write`,write_file:`write`,edit:`edit`,patch:`edit`,apply_patch:`edit`,replace:`edit`,delete:`delete`,delete_file:`delete`,remove:`delete`,grep:`search`,glob:`search`,search:`search`,"codebase-search":`search`,"codebase-index":`index`,remember:`memory`,forget:`memory`,memory_search:`memory`,memory_update:`memory`,memory_delete:`memory`};function s(e,t=``){return e===`rename`?`edit`:e in{read:1,write:1,edit:1,delete:1,search:1}?e:o[t]}function c(e){let t=[];for(let n of[`path`,`file`,`filePath`,`target`]){let r=e[n];typeof r==`string`&&t.push(r)}let n=e.files;if(typeof n==`string`&&t.push(n),Array.isArray(n))for(let e of n)typeof e==`string`&&t.push(e);return[...new Set(t)]}function l(e,t){let n=typeof t.old_string==`string`?t.old_string.trim():``,r=typeof t.new_string==`string`?t.new_string.trim():``;if(n||r)return`${n.replace(/\s+/g,` `).slice(0,42)||`∅`} → ${r.replace(/\s+/g,` `).slice(0,42)||`∅`}`;if(typeof t.patch==`string`){let n=d(t);return`${e} +${n?.added??0} −${n?.removed??0}`}let i=typeof t.content==`string`?t.content:void 0;if(i!==void 0){let t=i.length===0?0:i.split(/\r?\n/).length;return`${e} ${t} line${t===1?``:`s`}`}for(let e of[`query`,`pattern`,`old_string`,`new_string`,`text`,`command`]){let n=t[e];if(typeof n==`string`&&n.trim()){let t=n.trim().replace(/\s+/g,` `).slice(0,96);return e===`query`?`"${t}"`:e===`pattern`?`/${t}/`:e===`command`?`$ ${t}`:t}}return e}function u(e){return e.trim().replace(/\s+/g,` `).slice(0,72)}function d(e){let t=typeof e.old_string==`string`?e.old_string:void 0,n=typeof e.new_string==`string`?e.new_string:void 0;if(t!==void 0||n!==void 0){let e=t?t.split(/\r?\n/).length:0;return{added:n?n.split(/\r?\n/).length:0,removed:e,...t?{before:u(t)}:{},...n?{after:u(n)}:{}}}let r=typeof e.patch==`string`?e.patch:void 0;if(r){let e=r.split(/\r?\n/),t=e.filter(e=>e.startsWith(`+`)&&!e.startsWith(`+++`)),n=e.filter(e=>e.startsWith(`-`)&&!e.startsWith(`---`));return{added:t.length,removed:n.length,...n[0]?{before:u(n[0].slice(1))}:{},...t[0]?{after:u(t[0].slice(1))}:{}}}let i=typeof e.content==`string`?e.content:void 0;if(i!==void 0)return{added:i.length===0?0:i.split(/\r?\n/).length,removed:0,...i?{after:u(i)}:{}}}function f(e){let t=e.status??`observed`;return{...e,id:e.id??`${e.toolUseId??`event`}:${e.filePath}:${e.timestamp}`,status:t,source:e.source??`legacy`,agentName:e.agentName??e.agent,agent:e.agent??e.agentName}}function p(e,t){let n=e.get(t.filePath)??[];if(e.set(t.filePath,[t,...n].slice(0,i)),e.size<=a)return;let r=[...e.entries()].sort((e,t)=>(e[1][0]?.timestamp??0)-(t[1][0]?.timestamp??0))[0]?.[0];r&&e.delete(r)}function m(e){return`${e.sessionId??`unscoped`}:${e.agentId??e.agentName??e.agent??`external`}`}function h(e){let t=new Map;for(let n of e){let e=n.agentId??`external`,r=n.agentName??n.agent??`External process`,i=n.sessionId??`unscoped`,a=m(n),o=t.get(a);o?(o.operations.push(n),o.startedAt=Math.min(o.startedAt,n.timestamp)):t.set(a,{key:a,agentId:e,agentName:r,sessionId:i,operations:[n],startedAt:n.timestamp})}return[...t.values()].sort((e,t)=>e.startedAt-t.startedAt)}function g(e,t,n){let r=String(e.name??`unknown`),i=e.input&&typeof e.input==`object`?e.input:{},a=Date.now(),o=String(e.id??`${r}:${a}`),c=d(i);return(t.length>0?t:[{filePath:`(tool:${r})`,operation:`execute`}]).map((u,d)=>({id:`${o}:${d}`,toolUseId:o,filePath:u.filePath,type:u.operation===`execute`?`execute`:s(u.operation,r)??`edit`,toolName:r,summary:l(r,i),timestamp:a,status:n,source:`tool`,attribution:t.length>0?`exact`:`correlated`,...c?{change:c}:{},sessionId:typeof e.sessionId==`string`?e.sessionId:void 0,traceId:typeof e.traceId==`string`?e.traceId:void 0,agentId:typeof e.agentId==`string`?e.agentId:`leader`,agentName:typeof e.agentName==`string`?e.agentName:`LEADER`,...u.line?{line:u.line}:{},...u.endLine?{endLine:u.endLine}:{}}))}function _(e){let t=e.payload??{};if(e.type===`tool.started`||e.type===`tool.executed`||e.type===`codemap.tool_started`||e.type===`codemap.tool_executed`)return g(t,Array.isArray(t.fileTargets)?t.fileTargets:c(t.input&&typeof t.input==`object`?t.input:{}).map(e=>({filePath:e,operation:o[String(t.name??``)]??`edit`})),e.type===`tool.started`||e.type===`codemap.tool_started`?`active`:`completed`);if(e.type===`provider.response`){let e=t.blocks;if(!Array.isArray(e))return[];let n=[];for(let t of e){if(!t||typeof t!=`object`)continue;let e=t;if(e.type!==`tool_use`)continue;let r=String(e.name??``),i=o[r];if(!i)continue;let a=e.input&&typeof e.input==`object`?e.input:{},s=c(a),u=Date.now();s.length===0&&(i===`memory`||i===`search`||i===`index`)&&s.push(`(global)`);for(let e of s)n.push({filePath:e,type:i,toolName:r,summary:l(r,a),timestamp:u})}return n}if(e.type===`tool.progress`){let e=t.event&&typeof t.event==`object`?t.event:void 0;if(e?.type!==`file_changed`||typeof e.path!=`string`)return[];let n=String(e.operation??`edit`);return[{id:`${String(t.id??`progress`)}:${e.path}:${Date.now()}`,toolUseId:typeof t.id==`string`?t.id:void 0,filePath:e.path,type:s(n)??`edit`,toolName:String(t.name??`deterministic-tool`),summary:String(e.text??`tool reported file change`),timestamp:Date.now(),status:`active`,source:`deterministic`,sessionId:typeof t.sessionId==`string`?t.sessionId:void 0,traceId:typeof t.traceId==`string`?t.traceId:void 0,agentId:typeof t.agentId==`string`?t.agentId:void 0,agentName:typeof t.agentName==`string`?t.agentName:void 0,line:typeof e.line==`number`?e.line:void 0,endLine:typeof e.endLine==`number`?e.endLine:void 0,attribution:`exact`}]}if(e.type===`codemap.file_event`){let e=s(String(t.operation??`edit`))??`edit`;return typeof t.filePath==`string`?[{filePath:t.filePath,type:e,toolName:typeof t.toolName==`string`?t.toolName:String(t.source??`watcher`),summary:`${String(t.source??`external`)} ${String(t.operation??`changed`)}`,timestamp:typeof t.at==`number`?t.at:Date.now(),status:t.phase===`started`?`active`:`observed`,source:t.source??`external`,sessionId:typeof t.sessionId==`string`?t.sessionId:void 0,traceId:typeof t.traceId==`string`?t.traceId:void 0,agentId:typeof t.agentId==`string`?t.agentId:void 0,agentName:typeof t.agentName==`string`?t.agentName:void 0,toolUseId:typeof t.toolUseId==`string`?t.toolUseId:void 0,line:typeof t.line==`number`?t.line:void 0,endLine:typeof t.endLine==`number`?t.endLine:void 0}]:[]}return e.type===`file.saved`&&typeof t.filePath==`string`?[{filePath:t.filePath,type:`write`,toolName:`save`,summary:``,timestamp:Date.now(),source:`editor`}]:e.type===`memory.event`&&typeof t.event==`string`?[{filePath:`(memory)`,type:`memory`,toolName:`memory.${t.event}`,summary:String(t.memoryId??``),timestamp:Date.now()}]:[]}var v=e((e,i)=>({history:new Map,pulses:new Map,activeOperations:new Map,totalCount:0,recordActivity(n){let r=f(n);e(e=>{let n=new Map(e.history),i=new Map(e.pulses);return p(n,r),i.set(r.filePath,Date.now()+t),{history:n,pulses:i,totalCount:e.totalCount+1}})},startActivities(n){if(n.length===0)return;let r=n.map(e=>f({...e,status:`active`}));e(e=>{let n=new Map(e.history),i=new Map(e.pulses),a=new Map(e.activeOperations);for(let e of r)if(p(n,e),i.set(e.filePath,Date.now()+t),e.toolUseId){let t=a.get(e.toolUseId)??[];a.set(e.toolUseId,[...t,e])}return{history:n,pulses:i,activeOperations:a,totalCount:e.totalCount+r.length}})},finishTool(n,r){let i=r.timestamp??Date.now();e(e=>{let a=e.activeOperations.get(n)??[];if(a.length===0)return e;let o=new Map(e.history),s=new Map(e.pulses);for(let e of a){let a=o.get(e.filePath)??[];o.set(e.filePath,a.map(e=>e.toolUseId===n?{...e,status:r.ok?`completed`:`failed`,ok:r.ok,completedAt:i,durationMs:r.durationMs??i-e.timestamp}:e)),s.set(e.filePath,Date.now()+t)}let c=new Map(e.activeOperations);return c.delete(n),{history:o,pulses:s,activeOperations:c}})},recordFileEvent(r){let i=f({...r,attribution:r.attribution??(r.agentId?`exact`:`external`)});e(e=>{let r=(e.history.get(i.filePath)??[]).find(e=>e.source!==`watcher`&&e.source!==`external`&&Math.abs(i.timestamp-e.timestamp)<=n);if(r){let n=new Map(e.history);n.set(i.filePath,(n.get(i.filePath)??[]).map(e=>e.id===r.id?{...e,watcherConfirmed:e.watcherConfirmed||i.source===`watcher`||i.source===`editor`}:e));let a=new Map(e.pulses);return a.set(i.filePath,Date.now()+t),{history:n,pulses:a}}let a=i.toolUseId?e.activeOperations.get(i.toolUseId):void 0;if(a&&a.length>0){let n=a[0],r=f({...i,status:`active`,source:i.source??`deterministic`,sessionId:i.sessionId??n.sessionId,traceId:i.traceId??n.traceId,agentId:i.agentId??n.agentId,agentName:i.agentName??n.agentName,agent:i.agent??n.agent,attribution:`exact`}),o=new Map(e.history),s=new Map(e.pulses),c=new Map(e.activeOperations);return p(o,r),s.set(r.filePath,Date.now()+t),c.set(i.toolUseId,[...a,r]),{history:o,pulses:s,activeOperations:c,totalCount:e.totalCount+1}}let o=[...e.activeOperations.values()].flat().filter(e=>e.filePath.startsWith(`(tool:`)&&Math.abs(i.timestamp-e.timestamp)<=3e5);if(o.length===1){let n=o[0],r=f({...i,id:`${n.toolUseId}:${i.filePath}:${i.timestamp}`,toolUseId:n.toolUseId,toolName:n.toolName,summary:`${n.toolName} → filesystem ${i.type}`,status:`active`,source:`deterministic`,sessionId:n.sessionId,traceId:n.traceId,agentId:n.agentId,agentName:n.agentName,agent:n.agent,watcherConfirmed:!0,attribution:`correlated`}),a=new Map(e.history),s=new Map(e.pulses),c=new Map(e.activeOperations);if(p(a,r),s.set(r.filePath,Date.now()+t),r.toolUseId){let e=c.get(r.toolUseId)??[];c.set(r.toolUseId,[...e,r])}return{history:a,pulses:s,activeOperations:c,totalCount:e.totalCount+1}}let s=new Map(e.history),c=new Map(e.pulses);return p(s,i),c.set(i.filePath,Date.now()+t),{history:s,pulses:c,totalCount:e.totalCount+1}})},resolveActivitySymbol(t,n,r){e(e=>{let i=new Map(e.history);i.set(n,(i.get(n)??[]).map(e=>e.toolUseId===t?{...e,symbol:r}:e));let a=new Map(e.activeOperations),o=a.get(t);return o&&a.set(t,o.map(e=>e.filePath===n?{...e,symbol:r}:e)),{history:i,activeOperations:a}})},getActivityForFile(e){return i().history.get(e)??[]},getActiveForFile(e){return[...i().activeOperations.values()].flat().filter(t=>t.filePath===e)},getActiveOperations(){return[...i().activeOperations.values()].flat()},getAgentPresences(){return h(i().getActiveOperations())},getPulsingFiles(){return i()._sweep(),new Set(i().pulses.keys())},getPulseType(e){if(i()._sweep(),i().pulses.has(e))return i().history.get(e)?.[0]?.type},clear(){e({history:new Map,pulses:new Map,activeOperations:new Map,totalCount:0})},_sweep(){let t=Date.now(),n=[...i().pulses].filter(([,e])=>e<t).map(([e])=>e),a=[...i().activeOperations].filter(([,e])=>e.every(e=>t-e.timestamp>r)).map(([e])=>e);n.length===0&&a.length===0||e(e=>{let r=new Map(e.pulses);for(let e of n)r.delete(e);if(a.length===0)return{pulses:r};let i=new Map(e.history),o=new Map(e.activeOperations);for(let e of a){for(let n of o.get(e)??[])i.set(n.filePath,(i.get(n.filePath)??[]).map(n=>n.toolUseId===e?{...n,status:`failed`,ok:!1,completedAt:t,durationMs:t-n.timestamp,summary:`${n.summary||n.toolName} · telemetry timeout`}:n));o.delete(e)}return{pulses:r,history:i,activeOperations:o}})}}));export{v as i,_ as n,h as r,m as t};
@@ -1 +1 @@
1
- import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{B as t,F as n,I as r,L as i,P as a,R as o,aa as s,ot as c,tt as l,z as u}from"./vendor-Di1mdAi5.js";import{t as d}from"./utils-C4qVQ63O.js";var f=e(s(),1),p=l(),m=a,h=u,g=f.forwardRef(({className:e,...t},n)=>(0,p.jsx)(o,{ref:n,className:d(`fixed inset-0 z-50 bg-black/65 backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0`,e),...t}));g.displayName=o.displayName;var _=f.forwardRef(({className:e,children:t,showCloseButton:i=!0,...a},o)=>(0,p.jsxs)(h,{children:[(0,p.jsx)(g,{}),(0,p.jsxs)(r,{ref:o,className:d(`fixed left-[50%] top-[50%] z-50 grid max-h-[calc(100dvh-2rem)] w-[calc(100vw-1.5rem)] max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border border-border/70 bg-card p-5 shadow-2xl duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:p-6`,e),...a,children:[t,i&&(0,p.jsxs)(n,{className:`absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground`,children:[(0,p.jsx)(c,{className:`h-4 w-4`}),(0,p.jsx)(`span`,{className:`sr-only`,children:`Close`})]})]})]}));_.displayName=r.displayName;var v=({className:e,...t})=>(0,p.jsx)(`div`,{className:d(`flex flex-col space-y-1.5 text-center sm:text-left`,e),...t});v.displayName=`DialogHeader`;var y=({className:e,...t})=>(0,p.jsx)(`div`,{className:d(`flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2`,e),...t});y.displayName=`DialogFooter`;var b=f.forwardRef(({className:e,...n},r)=>(0,p.jsx)(t,{ref:r,className:d(`text-lg font-semibold leading-none`,e),...n}));b.displayName=t.displayName;var x=f.forwardRef(({className:e,...t},n)=>(0,p.jsx)(i,{ref:n,className:d(`text-sm text-muted-foreground`,e),...t}));x.displayName=i.displayName;export{v as a,y as i,_ as n,b as o,x as r,m as t};
1
+ import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{B as t,F as n,I as r,L as i,P as a,R as o,ot as s,tt as c,ua as l,z as u}from"./vendor-BmsAdDhb.js";import{t as d}from"./utils-DvgvNCoT.js";var f=e(l(),1),p=c(),m=a,h=u,g=f.forwardRef(({className:e,...t},n)=>(0,p.jsx)(o,{ref:n,className:d(`fixed inset-0 z-50 bg-black/65 backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0`,e),...t}));g.displayName=o.displayName;var _=f.forwardRef(({className:e,children:t,showCloseButton:i=!0,...a},o)=>(0,p.jsxs)(h,{children:[(0,p.jsx)(g,{}),(0,p.jsxs)(r,{ref:o,className:d(`fixed left-[50%] top-[50%] z-50 grid max-h-[calc(100dvh-2rem)] w-[calc(100vw-1.5rem)] max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border border-border/70 bg-card p-5 shadow-2xl duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:p-6`,e),...a,children:[t,i&&(0,p.jsxs)(n,{className:`absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground`,children:[(0,p.jsx)(s,{className:`h-4 w-4`}),(0,p.jsx)(`span`,{className:`sr-only`,children:`Close`})]})]})]}));_.displayName=r.displayName;var v=({className:e,...t})=>(0,p.jsx)(`div`,{className:d(`flex flex-col space-y-1.5 text-center sm:text-left`,e),...t});v.displayName=`DialogHeader`;var y=({className:e,...t})=>(0,p.jsx)(`div`,{className:d(`flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2`,e),...t});y.displayName=`DialogFooter`;var b=f.forwardRef(({className:e,...n},r)=>(0,p.jsx)(t,{ref:r,className:d(`text-lg font-semibold leading-none`,e),...n}));b.displayName=t.displayName;var x=f.forwardRef(({className:e,...t},n)=>(0,p.jsx)(i,{ref:n,className:d(`text-sm text-muted-foreground`,e),...t}));x.displayName=i.displayName;export{v as a,y as i,_ as n,b as o,x as r,m as t};
@@ -0,0 +1 @@
1
+ import{tt as e}from"./vendor-BmsAdDhb.js";import{t}from"./utils-DvgvNCoT.js";var n=e();function r({icon:e,title:r,description:i,action:a,className:o,panel:s=!0}){return(0,n.jsx)(`div`,{className:t(`flex min-h-0 min-w-0 flex-1 items-center justify-center p-4`,s&&`bg-[hsl(var(--surface-2)/0.45)]`,o),children:(0,n.jsxs)(`div`,{className:`ws-surface flex max-w-md flex-col items-center gap-3 rounded-xl p-6 text-center text-muted-foreground`,children:[e&&(0,n.jsx)(`span`,{className:`flex h-12 w-12 items-center justify-center rounded-lg bg-primary/10 text-primary`,children:e}),(0,n.jsxs)(`div`,{children:[(0,n.jsx)(`p`,{className:`text-base font-semibold text-foreground`,children:r}),i&&(0,n.jsx)(`p`,{className:`mt-1 text-sm`,children:i})]}),a&&(0,n.jsx)(`button`,{type:`button`,onClick:a.onClick,className:`mt-1 rounded-md border border-border/70 bg-card/70 px-4 py-2 text-sm text-foreground shadow-sm transition-colors hover:bg-accent`,children:a.label})]})})}export{r as t};
@@ -1,2 +1,2 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/activity-Cyx4UukM.js","assets/rolldown-runtime-QTnfLwEv.js","assets/chat-BJzPxfyr.js","assets/commandPalette-DpaemFux.js","assets/common-suUxW9sA.js","assets/settings-CyzkAhwD.js","assets/setup-Dr2UDb8s.js","assets/toasts-BL_8kH4B.js"])))=>i.map(i=>d[i]);
2
- import{na as e,ra as t,ta as n}from"./vendor-Di1mdAi5.js";import{a as r,o as i,r as a}from"./ui-store-BepZz9CZ.js";import{t as o}from"./activity-Cyx4UukM.js";import{t as s}from"./chat-BJzPxfyr.js";import{t as c}from"./commandPalette-DpaemFux.js";import{t as l}from"./common-suUxW9sA.js";import{t as u}from"./settings-CyzkAhwD.js";import{t as d}from"./setup-Dr2UDb8s.js";import{t as f}from"./toasts-BL_8kH4B.js";import{s as p}from"./monaco-C7izDJhg.js";var m=(e,t,n)=>{let r=t.lastIndexOf(`?`),i=e[r===-1||r<t.lastIndexOf(`/`)?t:t.slice(0,r)];return i?typeof i==`function`?i():Promise.resolve(i):new Promise((e,r)=>{(typeof queueMicrotask==`function`?queueMicrotask:setTimeout)(r.bind(null,Error(`Unknown variable dynamic import: `+t+(t.split(`/`).length===n?``:`. Note that variables only represent file names one level deep.`))))})},h=[`common`,`activity`,`chat`,`commandPalette`,`settings`,`setup`,`toasts`];function g(){try{return i(a.getState().uiLocale)}catch{return`en`}}t.use(n).use(e((e,t)=>m(Object.assign({"./locales/de/activity.json":()=>p(()=>import(`./activity-Ct_QOdtL.js`),[]),"./locales/de/chat.json":()=>p(()=>import(`./chat-Bkom8vQo.js`),[]),"./locales/de/commandPalette.json":()=>p(()=>import(`./commandPalette-aaAou3Tl.js`),[]),"./locales/de/common.json":()=>p(()=>import(`./common-C9ikgX7d.js`),[]),"./locales/de/settings.json":()=>p(()=>import(`./settings-4BR882HN.js`),[]),"./locales/de/setup.json":()=>p(()=>import(`./setup-Iyk4ncan.js`),[]),"./locales/de/toasts.json":()=>p(()=>import(`./toasts-CFzweRH5.js`),[]),"./locales/en/activity.json":()=>p(()=>import(`./activity-Cyx4UukM.js`).then(e=>e.n),__vite__mapDeps([0,1])),"./locales/en/chat.json":()=>p(()=>import(`./chat-BJzPxfyr.js`).then(e=>e.n),__vite__mapDeps([2,1])),"./locales/en/commandPalette.json":()=>p(()=>import(`./commandPalette-DpaemFux.js`).then(e=>e.n),__vite__mapDeps([3,1])),"./locales/en/common.json":()=>p(()=>import(`./common-suUxW9sA.js`).then(e=>e.n),__vite__mapDeps([4,1])),"./locales/en/settings.json":()=>p(()=>import(`./settings-CyzkAhwD.js`).then(e=>e.n),__vite__mapDeps([5,1])),"./locales/en/setup.json":()=>p(()=>import(`./setup-Dr2UDb8s.js`).then(e=>e.n),__vite__mapDeps([6,1])),"./locales/en/toasts.json":()=>p(()=>import(`./toasts-BL_8kH4B.js`).then(e=>e.n),__vite__mapDeps([7,1])),"./locales/es/activity.json":()=>p(()=>import(`./activity-gaWDc806.js`),[]),"./locales/es/chat.json":()=>p(()=>import(`./chat-Du7n7HZ7.js`),[]),"./locales/es/commandPalette.json":()=>p(()=>import(`./commandPalette-Nlxs0V7J.js`),[]),"./locales/es/common.json":()=>p(()=>import(`./common-DMM-xyW3.js`),[]),"./locales/es/settings.json":()=>p(()=>import(`./settings-jrfJX8W2.js`),[]),"./locales/es/setup.json":()=>p(()=>import(`./setup-BqoJ89VQ.js`),[]),"./locales/es/toasts.json":()=>p(()=>import(`./toasts-BwQJwYLe.js`),[]),"./locales/fr/activity.json":()=>p(()=>import(`./activity-Dyikq8Zm.js`),[]),"./locales/fr/chat.json":()=>p(()=>import(`./chat-VkTBQmmx.js`),[]),"./locales/fr/commandPalette.json":()=>p(()=>import(`./commandPalette-Dfk74u87.js`),[]),"./locales/fr/common.json":()=>p(()=>import(`./common-D29Zdkxb.js`),[]),"./locales/fr/settings.json":()=>p(()=>import(`./settings-llUXRsji.js`),[]),"./locales/fr/setup.json":()=>p(()=>import(`./setup-C4wNoopG.js`),[]),"./locales/fr/toasts.json":()=>p(()=>import(`./toasts-BCDGDcyq.js`),[]),"./locales/it/activity.json":()=>p(()=>import(`./activity-Ukyu3lON.js`),[]),"./locales/it/chat.json":()=>p(()=>import(`./chat-C7ybebfi.js`),[]),"./locales/it/commandPalette.json":()=>p(()=>import(`./commandPalette-CUh_kgfp.js`),[]),"./locales/it/common.json":()=>p(()=>import(`./common-DoUBSHRY.js`),[]),"./locales/it/settings.json":()=>p(()=>import(`./settings-CnViO4_M.js`),[]),"./locales/it/setup.json":()=>p(()=>import(`./setup-B8S3Rhsj.js`),[]),"./locales/it/toasts.json":()=>p(()=>import(`./toasts-Dm12Nq8t.js`),[]),"./locales/pt-BR/activity.json":()=>p(()=>import(`./activity-Bd_pRifE.js`),[]),"./locales/pt-BR/chat.json":()=>p(()=>import(`./chat-BRBVFl4h.js`),[]),"./locales/pt-BR/commandPalette.json":()=>p(()=>import(`./commandPalette-tFxIIhvU.js`),[]),"./locales/pt-BR/common.json":()=>p(()=>import(`./common-vdwxzODB.js`),[]),"./locales/pt-BR/settings.json":()=>p(()=>import(`./settings-B5P4V9M6.js`),[]),"./locales/pt-BR/setup.json":()=>p(()=>import(`./setup-CGWbN6bj.js`),[]),"./locales/pt-BR/toasts.json":()=>p(()=>import(`./toasts-frBt6fvE.js`),[]),"./locales/tr/activity.json":()=>p(()=>import(`./activity-AfUMXtSI.js`),[]),"./locales/tr/chat.json":()=>p(()=>import(`./chat-IRKmQ6we.js`),[]),"./locales/tr/commandPalette.json":()=>p(()=>import(`./commandPalette-CGMq-qlP.js`),[]),"./locales/tr/common.json":()=>p(()=>import(`./common-D8_r1x8x.js`),[]),"./locales/tr/settings.json":()=>p(()=>import(`./settings-Cjxo5UVP.js`),[]),"./locales/tr/setup.json":()=>p(()=>import(`./setup-BPkWK-DE.js`),[]),"./locales/tr/toasts.json":()=>p(()=>import(`./toasts-DDYQsJV8.js`),[])}),`./locales/${e}/${t}.json`,4))).init({lng:g(),fallbackLng:`en`,supportedLngs:[...r],ns:[...h],defaultNS:`common`,partialBundledLanguages:!0,resources:{en:{common:l,activity:o,chat:s,commandPalette:c,settings:u,setup:d,toasts:f}},interpolation:{escapeValue:!1},react:{useSuspense:!1},returnNull:!1});function _(e){typeof document<`u`&&(document.documentElement.lang=e)}_(t.language||`en`),a.subscribe((e,n)=>{let r=e.uiLocale;r&&r!==n.uiLocale&&r!==t.language&&t.changeLanguage(r).then(()=>_(r))});function v(){window.wrongstackDesktopHost?.onLocaleChanged?.(e=>{if(!e)return;let n=i(e);if(n===t.language)return;let r=a.getState();r.uiLocale!==n&&r.set({uiLocale:n}),t.changeLanguage(n).then(()=>_(n))})}try{v()}catch{}
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/activity-t0PmZ94i.js","assets/rolldown-runtime-QTnfLwEv.js","assets/chat-BJzPxfyr.js","assets/commandPalette-DpaemFux.js","assets/common-suUxW9sA.js","assets/settings-DGTQ4aKo.js","assets/setup-Dr2UDb8s.js","assets/toasts-BL_8kH4B.js"])))=>i.map(i=>d[i]);
2
+ import{ca as e,oa as t,sa as n}from"./vendor-BmsAdDhb.js";import{a as r,o as i,r as a}from"./ui-store-DxFtiYFb.js";import{t as o}from"./activity-t0PmZ94i.js";import{t as s}from"./chat-BJzPxfyr.js";import{t as c}from"./commandPalette-DpaemFux.js";import{t as l}from"./common-suUxW9sA.js";import{t as u}from"./settings-DGTQ4aKo.js";import{t as d}from"./setup-Dr2UDb8s.js";import{t as f}from"./toasts-BL_8kH4B.js";import{s as p}from"./monaco-C7izDJhg.js";var m=(e,t,n)=>{let r=t.lastIndexOf(`?`),i=e[r===-1||r<t.lastIndexOf(`/`)?t:t.slice(0,r)];return i?typeof i==`function`?i():Promise.resolve(i):new Promise((e,r)=>{(typeof queueMicrotask==`function`?queueMicrotask:setTimeout)(r.bind(null,Error(`Unknown variable dynamic import: `+t+(t.split(`/`).length===n?``:`. Note that variables only represent file names one level deep.`))))})},h=[`common`,`activity`,`chat`,`commandPalette`,`settings`,`setup`,`toasts`];function g(){try{return i(a.getState().uiLocale)}catch{return`en`}}e.use(t).use(n((e,t)=>m(Object.assign({"./locales/de/activity.json":()=>p(()=>import(`./activity-DkkpH2Tf.js`),[]),"./locales/de/chat.json":()=>p(()=>import(`./chat-Bkom8vQo.js`),[]),"./locales/de/commandPalette.json":()=>p(()=>import(`./commandPalette-aaAou3Tl.js`),[]),"./locales/de/common.json":()=>p(()=>import(`./common-C9ikgX7d.js`),[]),"./locales/de/settings.json":()=>p(()=>import(`./settings-C67tfoiy.js`),[]),"./locales/de/setup.json":()=>p(()=>import(`./setup-Iyk4ncan.js`),[]),"./locales/de/toasts.json":()=>p(()=>import(`./toasts-CFzweRH5.js`),[]),"./locales/en/activity.json":()=>p(()=>import(`./activity-t0PmZ94i.js`).then(e=>e.n),__vite__mapDeps([0,1])),"./locales/en/chat.json":()=>p(()=>import(`./chat-BJzPxfyr.js`).then(e=>e.n),__vite__mapDeps([2,1])),"./locales/en/commandPalette.json":()=>p(()=>import(`./commandPalette-DpaemFux.js`).then(e=>e.n),__vite__mapDeps([3,1])),"./locales/en/common.json":()=>p(()=>import(`./common-suUxW9sA.js`).then(e=>e.n),__vite__mapDeps([4,1])),"./locales/en/settings.json":()=>p(()=>import(`./settings-DGTQ4aKo.js`).then(e=>e.n),__vite__mapDeps([5,1])),"./locales/en/setup.json":()=>p(()=>import(`./setup-Dr2UDb8s.js`).then(e=>e.n),__vite__mapDeps([6,1])),"./locales/en/toasts.json":()=>p(()=>import(`./toasts-BL_8kH4B.js`).then(e=>e.n),__vite__mapDeps([7,1])),"./locales/es/activity.json":()=>p(()=>import(`./activity-7VmgGy-T.js`),[]),"./locales/es/chat.json":()=>p(()=>import(`./chat-Du7n7HZ7.js`),[]),"./locales/es/commandPalette.json":()=>p(()=>import(`./commandPalette-Nlxs0V7J.js`),[]),"./locales/es/common.json":()=>p(()=>import(`./common-DMM-xyW3.js`),[]),"./locales/es/settings.json":()=>p(()=>import(`./settings-BhEHLxqK.js`),[]),"./locales/es/setup.json":()=>p(()=>import(`./setup-BqoJ89VQ.js`),[]),"./locales/es/toasts.json":()=>p(()=>import(`./toasts-BwQJwYLe.js`),[]),"./locales/fr/activity.json":()=>p(()=>import(`./activity-CCUWlVKh.js`),[]),"./locales/fr/chat.json":()=>p(()=>import(`./chat-VkTBQmmx.js`),[]),"./locales/fr/commandPalette.json":()=>p(()=>import(`./commandPalette-Dfk74u87.js`),[]),"./locales/fr/common.json":()=>p(()=>import(`./common-D29Zdkxb.js`),[]),"./locales/fr/settings.json":()=>p(()=>import(`./settings-24NUQrlz.js`),[]),"./locales/fr/setup.json":()=>p(()=>import(`./setup-C4wNoopG.js`),[]),"./locales/fr/toasts.json":()=>p(()=>import(`./toasts-BCDGDcyq.js`),[]),"./locales/it/activity.json":()=>p(()=>import(`./activity-DAHFiOfU.js`),[]),"./locales/it/chat.json":()=>p(()=>import(`./chat-C7ybebfi.js`),[]),"./locales/it/commandPalette.json":()=>p(()=>import(`./commandPalette-CUh_kgfp.js`),[]),"./locales/it/common.json":()=>p(()=>import(`./common-DoUBSHRY.js`),[]),"./locales/it/settings.json":()=>p(()=>import(`./settings-CvkIXOQE.js`),[]),"./locales/it/setup.json":()=>p(()=>import(`./setup-B8S3Rhsj.js`),[]),"./locales/it/toasts.json":()=>p(()=>import(`./toasts-Dm12Nq8t.js`),[]),"./locales/pt-BR/activity.json":()=>p(()=>import(`./activity-DqsX-GMs.js`),[]),"./locales/pt-BR/chat.json":()=>p(()=>import(`./chat-BRBVFl4h.js`),[]),"./locales/pt-BR/commandPalette.json":()=>p(()=>import(`./commandPalette-tFxIIhvU.js`),[]),"./locales/pt-BR/common.json":()=>p(()=>import(`./common-vdwxzODB.js`),[]),"./locales/pt-BR/settings.json":()=>p(()=>import(`./settings-i7lxRYZu.js`),[]),"./locales/pt-BR/setup.json":()=>p(()=>import(`./setup-CGWbN6bj.js`),[]),"./locales/pt-BR/toasts.json":()=>p(()=>import(`./toasts-frBt6fvE.js`),[]),"./locales/tr/activity.json":()=>p(()=>import(`./activity-BzwApar4.js`),[]),"./locales/tr/chat.json":()=>p(()=>import(`./chat-IRKmQ6we.js`),[]),"./locales/tr/commandPalette.json":()=>p(()=>import(`./commandPalette-CGMq-qlP.js`),[]),"./locales/tr/common.json":()=>p(()=>import(`./common-D8_r1x8x.js`),[]),"./locales/tr/settings.json":()=>p(()=>import(`./settings-BcyGqyX3.js`),[]),"./locales/tr/setup.json":()=>p(()=>import(`./setup-BPkWK-DE.js`),[]),"./locales/tr/toasts.json":()=>p(()=>import(`./toasts-DDYQsJV8.js`),[])}),`./locales/${e}/${t}.json`,4))).init({lng:g(),fallbackLng:`en`,supportedLngs:[...r],ns:[...h],defaultNS:`common`,partialBundledLanguages:!0,resources:{en:{common:l,activity:o,chat:s,commandPalette:c,settings:u,setup:d,toasts:f}},interpolation:{escapeValue:!1},react:{useSuspense:!1},returnNull:!1});function _(e){typeof document<`u`&&(document.documentElement.lang=e)}_(e.language||`en`),a.subscribe((t,n)=>{let r=t.uiLocale;r&&r!==n.uiLocale&&r!==e.language&&e.changeLanguage(r).then(()=>_(r))});function v(){window.wrongstackDesktopHost?.onLocaleChanged?.(t=>{if(!t)return;let n=i(t);if(n===e.language)return;let r=a.getState();r.uiLocale!==n&&r.set({uiLocale:n}),e.changeLanguage(n).then(()=>_(n))})}try{v()}catch{}