@wrongstack/webui 0.297.0 → 0.298.1

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 (546) hide show
  1. package/dist/assets/AgentRosterView-C26RCdot.js +11 -0
  2. package/dist/assets/{AnalyticsDashboard-CkceglT6.js → AnalyticsDashboard-CEjjV3bX.js} +1 -1
  3. package/dist/assets/AudienceMemoryPanel-CnfZC8x0.js +3 -0
  4. package/dist/assets/{ChangesView-DouwIaDk.js → ChangesView-D0BiTbs8.js} +1 -1
  5. package/dist/assets/ChronicleDashboard-BZ4XOcvf.js +1 -0
  6. package/dist/assets/CodeEditor-BlqaT56D.js +1 -0
  7. package/dist/assets/CodeMap-Bj5tjjW5.js +1 -0
  8. package/dist/assets/{CronJobsPanel-CAImDL8t.js → CronJobsPanel-F6nhZtfg.js} +1 -1
  9. package/dist/assets/DeadCodeScanPanel-C9sLNUUc.js +2 -0
  10. package/dist/assets/{DebugDashboard-DLNPZIEI.js → DebugDashboard-D8BLcLjI.js} +1 -1
  11. package/dist/assets/{DesignGalleryView-D0azMq2e.js → DesignGalleryView-B8mE5nGy.js} +1 -1
  12. package/dist/assets/GoalView-DIx7Zr4a.js +1 -0
  13. package/dist/assets/KanbanView-DshzDwq1.js +3 -0
  14. package/dist/assets/MailboxDetailView-BJXpXjtm.js +1 -0
  15. package/dist/assets/MemoryManager-B-S5oREO.js +1 -0
  16. package/dist/assets/{ModelPicker-CN-UD3lc.js → ModelPicker-CNHhT2SO.js} +1 -1
  17. package/dist/assets/OfficeMapPanel-CBN9uG80.js +4 -0
  18. package/dist/assets/{ProcessMonitor-ButM8C0T.js → ProcessMonitor-Cc8LsfTh.js} +1 -1
  19. package/dist/assets/QueuePanel-B0NXFwEt.js +1 -0
  20. package/dist/assets/{RefreshDebugView-DVvWsh9A.js → RefreshDebugView-DLst_piS.js} +1 -1
  21. package/dist/assets/SageTabs-NwMcr4Pq.js +2 -0
  22. package/dist/assets/SddHub-CpRHXmjm.js +2 -0
  23. package/dist/assets/SessionsDashboard-C5dXb0iJ.js +1 -0
  24. package/dist/assets/SetupScreen-B81fcNgP.js +1 -0
  25. package/dist/assets/SkillDetailView-BTvgE_MD.js +3 -0
  26. package/dist/assets/{SpecsView-BJs_okSx.js → SpecsView-DhuaZcOl.js} +1 -1
  27. package/dist/assets/TechStackView-BXmfl2qY.js +1 -0
  28. package/dist/assets/{TerminalPanel-W2V0X7b9.js → TerminalPanel-DjruTcb6.js} +1 -1
  29. package/dist/assets/{Toaster-CbcX_Cou.js → Toaster-BmyghnqJ.js} +1 -1
  30. package/dist/assets/{activity-CbbZyUMG.js → activity-Bo6DncWg.js} +1 -1
  31. package/dist/assets/{activity-C4z6-WoZ.js → activity-C34aPcFU.js} +1 -1
  32. package/dist/assets/{activity-B4Ngvkan.js → activity-CBdzUJQ_.js} +1 -1
  33. package/dist/assets/{activity-B8uejnae.js → activity-CLYyxeC6.js} +1 -1
  34. package/dist/assets/{activity-qoJ3grs0.js → activity-Cv_EIWjY.js} +1 -1
  35. package/dist/assets/{activity-B5MvPWYV.js → activity-Wr0_Gb8A.js} +1 -1
  36. package/dist/assets/{activity-D57y5l1T.js → activity-kCY0dGRC.js} +1 -1
  37. package/dist/assets/{button-uGqXvobk.js → button-BMECp1cg.js} +1 -1
  38. package/dist/assets/{chat-Du7n7HZ7.js → chat-CRmMDzCb.js} +1 -1
  39. package/dist/assets/{chat-VkTBQmmx.js → chat-CwnuX7tG.js} +1 -1
  40. package/dist/assets/{chat-BJzPxfyr.js → chat-DLn1hY01.js} +1 -1
  41. package/dist/assets/{chat-IRKmQ6we.js → chat-DSEq1Bdz.js} +1 -1
  42. package/dist/assets/{chat-C7ybebfi.js → chat-DxLD17ER.js} +1 -1
  43. package/dist/assets/{chat-BRBVFl4h.js → chat-DzPxYALH.js} +1 -1
  44. package/dist/assets/{chat-Bkom8vQo.js → chat-OunddzYy.js} +1 -1
  45. package/dist/assets/chat-store-B2CjP2Zl.js +17 -0
  46. package/dist/assets/{codemap-activity-store-DP3mCZu1.js → codemap-activity-store-Cz0_AHqt.js} +1 -1
  47. package/dist/assets/codemap-index-store-B-XLZpJu.js +1 -0
  48. package/dist/assets/common-BfVFjVhf.js +1 -0
  49. package/dist/assets/common-C5hY-d_0.js +1 -0
  50. package/dist/assets/{dialog-CT1PTjzK.js → dialog-BJef9ZZo.js} +1 -1
  51. package/dist/assets/{empty-state-CdyXy96A.js → empty-state-BGzRrNXI.js} +1 -1
  52. package/dist/assets/{i18n-1BkaqMgr.js → i18n-2wGPPdl_.js} +2 -2
  53. package/dist/assets/index-DeA8UyiB.css +1 -0
  54. package/dist/assets/index-x6-rLl5H.js +132 -0
  55. package/dist/assets/{input-B-VCX2sG.js → input-Bd10nfMj.js} +1 -1
  56. package/dist/assets/{mailbox-store-DVoNbOZr.js → mailbox-store-D3omLzBk.js} +1 -1
  57. package/dist/assets/markdown-sSmz-Ua_.js +44 -0
  58. package/dist/assets/progress-ring-BEULkQ1r.js +1 -0
  59. package/dist/assets/{roster-ws-DXm0krqH.js → roster-ws-BmV_3U6w.js} +1 -1
  60. package/dist/assets/session-store-ZMNU48xK.js +1 -0
  61. package/dist/assets/settings-BF0lRxlj.js +1 -0
  62. package/dist/assets/settings-CP6cwqHD.js +1 -0
  63. package/dist/assets/settings-D0rWEhMg.js +1 -0
  64. package/dist/assets/settings-DFCaP02p.js +1 -0
  65. package/dist/assets/settings-DHix1ZPL.js +1 -0
  66. package/dist/assets/{settings-DEmKlLmn.js → settings-eEzjNzsC.js} +1 -1
  67. package/dist/assets/settings-kp_aIgcX.js +1 -0
  68. package/dist/assets/{shared-jvJxtKc5.js → shared-CrX8iE-U.js} +1 -1
  69. package/dist/assets/stores-DyQOSkkD.js +7 -0
  70. package/dist/assets/ui-store-di6oY7cy.js +1 -0
  71. package/dist/assets/useWebSocket-BVFPigcY.js +28 -0
  72. package/dist/assets/{utils-CN2sfDVP.js → utils-CwJvjOcH.js} +1 -1
  73. package/dist/assets/{vendor-2VBBgNb5.js → vendor-BTTkQ9Tn.js} +28 -28
  74. package/dist/assets/{view-navigation-Cgy5xh9q.js → view-navigation-BMRzqGbq.js} +1 -1
  75. package/dist/assets/ws-client-B0-KwuTK.js +1 -0
  76. package/dist/components/ChatInput/refine-panel-host.d.ts +9 -1
  77. package/dist/components/DeadCodeScanPanel/DeadCodeScanPanel.d.ts +1 -3
  78. package/dist/components/MemoryManager/MemoryInjectorPanel.d.ts +19 -0
  79. package/dist/components/PanelSuspense.d.ts +8 -0
  80. package/dist/components/SettingsPanel/DisplaySection.d.ts +20 -0
  81. package/dist/components/SettingsPanel/PluginToggleList.d.ts +11 -1
  82. package/dist/components/ViewRouter.d.ts +12 -0
  83. package/dist/components/WorkbenchTopbar.d.ts +53 -0
  84. package/dist/components/codemap-model.d.ts +2 -0
  85. package/dist/hooks/useViewport.d.ts +38 -0
  86. package/dist/hooks/useWebSocket.d.ts +1 -0
  87. package/dist/hooks/ws-handlers/misc-handlers.d.ts +1 -0
  88. package/dist/index.html +25 -26
  89. package/dist/index.js +58857 -57378
  90. package/dist/lib/sage-block.d.ts +18 -23
  91. package/dist/lib/view-navigation.d.ts +1 -1
  92. package/dist/lib/ws-client.d.ts +16 -8
  93. package/dist/providers.json +10 -0
  94. package/dist/stores/chat-store.d.ts +36 -3
  95. package/dist/stores/config-store.d.ts +0 -2
  96. package/dist/stores/local-prefs.d.ts +22 -2
  97. package/dist/stores/session-store.d.ts +3 -0
  98. package/dist/stores/types.d.ts +2 -1
  99. package/dist/stores/ui-store.d.ts +8 -1
  100. package/dist/types/client-message.d.ts +1 -0
  101. package/dist/types/connections.d.ts +7 -1
  102. package/dist/types/server-message.d.ts +11 -0
  103. package/dist/types/system.d.ts +4 -0
  104. package/package.json +11 -9
  105. package/dist/App.d.ts.map +0 -1
  106. package/dist/assets/AgentRosterView-Cje2NBtU.js +0 -11
  107. package/dist/assets/AudienceMemoryPanel-DB-8ISNP.js +0 -3
  108. package/dist/assets/ChronicleDashboard-B4Khm6hu.js +0 -1
  109. package/dist/assets/CodeEditor-CrKbA5s8.js +0 -1
  110. package/dist/assets/CodeMap-Dz8yNlUe.js +0 -1
  111. package/dist/assets/DeadCodeScanPanel-C5ehBTQF.js +0 -2
  112. package/dist/assets/GoalView-gtQRK78W.js +0 -1
  113. package/dist/assets/KanbanView-BXKe19EI.js +0 -3
  114. package/dist/assets/LazyMarkdown-BGwFjYKr.js +0 -3
  115. package/dist/assets/MailboxDetailView-D4fXipos.js +0 -1
  116. package/dist/assets/MemoryManager-D_rquas9.js +0 -1
  117. package/dist/assets/OfficeMapPanel-CJFrTNmg.js +0 -4
  118. package/dist/assets/QueuePanel-C5oihwYM.js +0 -1
  119. package/dist/assets/SageTabs-C9vAgvCD.js +0 -2
  120. package/dist/assets/SddHub-D_nsWjuM.js +0 -2
  121. package/dist/assets/SessionsDashboard-DdwU3Ma5.js +0 -1
  122. package/dist/assets/SetupScreen-CQCfLdPI.js +0 -1
  123. package/dist/assets/SkillDetailView-mVxi-9jo.js +0 -3
  124. package/dist/assets/TechStackView-BZ4M7TYc.js +0 -1
  125. package/dist/assets/chat-store-CM1dMeuY.js +0 -17
  126. package/dist/assets/codemap-index-store-DyAe3ZYJ.js +0 -1
  127. package/dist/assets/common-D8_r1x8x.js +0 -1
  128. package/dist/assets/common-suUxW9sA.js +0 -1
  129. package/dist/assets/index-BPfIz78e.js +0 -131
  130. package/dist/assets/index-BlceaIyu.css +0 -1
  131. package/dist/assets/markdown-L6DLSM7f.js +0 -44
  132. package/dist/assets/progress-ring-CFOvGxw7.js +0 -1
  133. package/dist/assets/session-store-BsNYnfOc.js +0 -1
  134. package/dist/assets/settings-C5F2tQ7C.js +0 -1
  135. package/dist/assets/settings-Cdk8i_p6.js +0 -1
  136. package/dist/assets/settings-D6wFOw5n.js +0 -1
  137. package/dist/assets/settings-DCEOkxYE.js +0 -1
  138. package/dist/assets/settings-DsflqNn0.js +0 -1
  139. package/dist/assets/settings-skShEZ2B.js +0 -1
  140. package/dist/assets/stores-mpa0202y.js +0 -6
  141. package/dist/assets/ui-store-CS-njcmT.js +0 -1
  142. package/dist/assets/useWebSocket-Dh3aAFDE.js +0 -28
  143. package/dist/assets/ws-client-WVGn8ORh.js +0 -1
  144. package/dist/components/AgentOfficeDetails.d.ts.map +0 -1
  145. package/dist/components/AgentOfficeView/model.d.ts.map +0 -1
  146. package/dist/components/AgentOfficeView.d.ts.map +0 -1
  147. package/dist/components/AgentRosterCatalogTab.d.ts.map +0 -1
  148. package/dist/components/AgentRosterChrome.d.ts.map +0 -1
  149. package/dist/components/AgentRosterLiveTab.d.ts.map +0 -1
  150. package/dist/components/AgentRosterSelfLearningTab.d.ts.map +0 -1
  151. package/dist/components/AgentRosterView.d.ts.map +0 -1
  152. package/dist/components/AgentRuntimePolicyEditor.d.ts.map +0 -1
  153. package/dist/components/AgentTranscript.d.ts.map +0 -1
  154. package/dist/components/AgentsMonitor.d.ts.map +0 -1
  155. package/dist/components/AgentsPage/format.d.ts.map +0 -1
  156. package/dist/components/AgentsPage.d.ts.map +0 -1
  157. package/dist/components/AnalyticsDashboard.d.ts.map +0 -1
  158. package/dist/components/AudienceMemoryPanel.d.ts.map +0 -1
  159. package/dist/components/AutonomyPicker.d.ts.map +0 -1
  160. package/dist/components/AvailabilityCalendarEditor.d.ts.map +0 -1
  161. package/dist/components/BoardView.d.ts.map +0 -1
  162. package/dist/components/ChangesView.d.ts.map +0 -1
  163. package/dist/components/ChatInput/code-detect.d.ts.map +0 -1
  164. package/dist/components/ChatInput/draft-token-counter.d.ts.map +0 -1
  165. package/dist/components/ChatInput/file-mention-picker.d.ts.map +0 -1
  166. package/dist/components/ChatInput/image-attach-control.d.ts.map +0 -1
  167. package/dist/components/ChatInput/image-attachments.d.ts.map +0 -1
  168. package/dist/components/ChatInput/queued-messages.d.ts.map +0 -1
  169. package/dist/components/ChatInput/refine-panel-host.d.ts.map +0 -1
  170. package/dist/components/ChatInput/slash-commands.d.ts.map +0 -1
  171. package/dist/components/ChatInput/slash-popup.d.ts.map +0 -1
  172. package/dist/components/ChatInput/slash-routing.d.ts.map +0 -1
  173. package/dist/components/ChatInput/stop-controls.d.ts.map +0 -1
  174. package/dist/components/ChatInput/use-paste-drop.d.ts.map +0 -1
  175. package/dist/components/ChatInput.d.ts.map +0 -1
  176. package/dist/components/ChatView/ThinkingBubble.d.ts.map +0 -1
  177. package/dist/components/ChatView/index.d.ts.map +0 -1
  178. package/dist/components/ChatView/utils.d.ts.map +0 -1
  179. package/dist/components/ChatView.d.ts.map +0 -1
  180. package/dist/components/CheckpointTimeline.d.ts.map +0 -1
  181. package/dist/components/ChipMultiSelect.d.ts.map +0 -1
  182. package/dist/components/ChronicleDashboard.d.ts.map +0 -1
  183. package/dist/components/ChroniclePipelineStrip.d.ts.map +0 -1
  184. package/dist/components/CodeEditor.d.ts.map +0 -1
  185. package/dist/components/CodeMap.d.ts.map +0 -1
  186. package/dist/components/CodeMapActivityDrawer.d.ts.map +0 -1
  187. package/dist/components/CodeMapActivityHelpers.d.ts.map +0 -1
  188. package/dist/components/CodeMapActivityStreamPanel.d.ts.map +0 -1
  189. package/dist/components/CodeMapCanvasSurface.d.ts.map +0 -1
  190. package/dist/components/CodeMapCanvasToolbar.d.ts.map +0 -1
  191. package/dist/components/CodeMapConfig.d.ts.map +0 -1
  192. package/dist/components/CodeMapDirectoryTree.d.ts.map +0 -1
  193. package/dist/components/CodeMapFlowState.d.ts.map +0 -1
  194. package/dist/components/CodeMapHeader.d.ts.map +0 -1
  195. package/dist/components/CodeMapLiveOverlay.d.ts.map +0 -1
  196. package/dist/components/CodeMapRelationInspector.d.ts.map +0 -1
  197. package/dist/components/CodeMapRelations.d.ts.map +0 -1
  198. package/dist/components/CodeMapSearchResults.d.ts.map +0 -1
  199. package/dist/components/CodeMapSelectedNodeSummary.d.ts.map +0 -1
  200. package/dist/components/CodeMapTreeSidebar.d.ts.map +0 -1
  201. package/dist/components/CodeMapVisuals.d.ts.map +0 -1
  202. package/dist/components/CollabPanel.d.ts.map +0 -1
  203. package/dist/components/CommandPalette/export-utils.d.ts.map +0 -1
  204. package/dist/components/CommandPalette/index.d.ts.map +0 -1
  205. package/dist/components/CommandPalette.d.ts.map +0 -1
  206. package/dist/components/ConfirmDialog.d.ts.map +0 -1
  207. package/dist/components/ConfirmModal.d.ts.map +0 -1
  208. package/dist/components/ConnectionBanner.d.ts.map +0 -1
  209. package/dist/components/ContextBar.d.ts.map +0 -1
  210. package/dist/components/ContextBreakdownModal.d.ts.map +0 -1
  211. package/dist/components/ContextDashboard.d.ts.map +0 -1
  212. package/dist/components/ContextMemoryMonitor.d.ts.map +0 -1
  213. package/dist/components/ContextModePicker.d.ts.map +0 -1
  214. package/dist/components/CostChip.d.ts.map +0 -1
  215. package/dist/components/CronJobsPanel.d.ts.map +0 -1
  216. package/dist/components/CronTrigger.d.ts.map +0 -1
  217. package/dist/components/CustomRosterPanel.d.ts.map +0 -1
  218. package/dist/components/DeadCodeScanPanel/DeadCodeScanPanel.d.ts.map +0 -1
  219. package/dist/components/DebugDashboard.d.ts.map +0 -1
  220. package/dist/components/DependencyGraph.d.ts.map +0 -1
  221. package/dist/components/DesignGalleryView.d.ts.map +0 -1
  222. package/dist/components/DiffView.d.ts.map +0 -1
  223. package/dist/components/ErrorBoundary.d.ts.map +0 -1
  224. package/dist/components/FallbackEditor.d.ts.map +0 -1
  225. package/dist/components/FileActivityDrawer.d.ts.map +0 -1
  226. package/dist/components/FileExplorer.d.ts.map +0 -1
  227. package/dist/components/FilePicker.d.ts.map +0 -1
  228. package/dist/components/FileReferenceChip.d.ts.map +0 -1
  229. package/dist/components/FleetMonitor.d.ts.map +0 -1
  230. package/dist/components/FleetPanel.d.ts.map +0 -1
  231. package/dist/components/GoalPanel.d.ts.map +0 -1
  232. package/dist/components/GoalView.d.ts.map +0 -1
  233. package/dist/components/InspectorPanel.d.ts.map +0 -1
  234. package/dist/components/KanbanAgentRunPanel.d.ts.map +0 -1
  235. package/dist/components/KanbanBoardChrome.d.ts.map +0 -1
  236. package/dist/components/KanbanBoardSidebar.d.ts.map +0 -1
  237. package/dist/components/KanbanBoardState.d.ts.map +0 -1
  238. package/dist/components/KanbanBoundaryEditor.d.ts.map +0 -1
  239. package/dist/components/KanbanCleanerAlert.d.ts.map +0 -1
  240. package/dist/components/KanbanColumnView.d.ts.map +0 -1
  241. package/dist/components/KanbanDecompositionPanel.d.ts.map +0 -1
  242. package/dist/components/KanbanQueueHealthBar.d.ts.map +0 -1
  243. package/dist/components/KanbanRunControls.d.ts.map +0 -1
  244. package/dist/components/KanbanTaskActivityRecorder.d.ts.map +0 -1
  245. package/dist/components/KanbanTaskCompletionChecks.d.ts.map +0 -1
  246. package/dist/components/KanbanTaskFields.d.ts.map +0 -1
  247. package/dist/components/KanbanTaskInspector.d.ts.map +0 -1
  248. package/dist/components/KanbanTaskOptions.d.ts.map +0 -1
  249. package/dist/components/KanbanTaskTree.d.ts.map +0 -1
  250. package/dist/components/KanbanVerificationDashboard.d.ts.map +0 -1
  251. package/dist/components/KanbanView.d.ts.map +0 -1
  252. package/dist/components/KanbanViewModeTabs.d.ts.map +0 -1
  253. package/dist/components/MailboxDetailView.d.ts.map +0 -1
  254. package/dist/components/MailboxPanel.d.ts.map +0 -1
  255. package/dist/components/MemoryManager/DeleteMemoryDialog.d.ts.map +0 -1
  256. package/dist/components/MemoryManager/MemoryDetail.d.ts.map +0 -1
  257. package/dist/components/MemoryManager/MemoryDrawer.d.ts.map +0 -1
  258. package/dist/components/MemoryManager/MemoryEditor.d.ts.map +0 -1
  259. package/dist/components/MemoryManager/MemoryFilters.d.ts.map +0 -1
  260. package/dist/components/MemoryManager/MemoryGraph.d.ts.map +0 -1
  261. package/dist/components/MemoryManager/MemoryInjectorTrace.d.ts +0 -3
  262. package/dist/components/MemoryManager/MemoryInjectorTrace.d.ts.map +0 -1
  263. package/dist/components/MemoryManager/MemoryLifecycleTrace.d.ts.map +0 -1
  264. package/dist/components/MemoryManager/MemoryList.d.ts.map +0 -1
  265. package/dist/components/MemoryManager/MemoryManagerEmpty.d.ts.map +0 -1
  266. package/dist/components/MemoryManager/SageTabs.d.ts.map +0 -1
  267. package/dist/components/MemoryManager/index.d.ts.map +0 -1
  268. package/dist/components/MemoryManager/selectors.d.ts.map +0 -1
  269. package/dist/components/MemoryManager/shared.d.ts.map +0 -1
  270. package/dist/components/MessageBubble/AttachmentGallery.d.ts.map +0 -1
  271. package/dist/components/MessageBubble/CopyButton.d.ts.map +0 -1
  272. package/dist/components/MessageBubble/ErrorBody.d.ts.map +0 -1
  273. package/dist/components/MessageBubble/LazyMarkdown.d.ts.map +0 -1
  274. package/dist/components/MessageBubble/StreamingMarkdown.d.ts.map +0 -1
  275. package/dist/components/MessageBubble/ToolInputView.d.ts.map +0 -1
  276. package/dist/components/MessageBubble/ToolLedgerCard.d.ts.map +0 -1
  277. package/dist/components/MessageBubble/index.d.ts.map +0 -1
  278. package/dist/components/MessageBubble/utils.d.ts.map +0 -1
  279. package/dist/components/MessageBubble.d.ts.map +0 -1
  280. package/dist/components/ModePicker.d.ts.map +0 -1
  281. package/dist/components/ModelPickDialog.d.ts.map +0 -1
  282. package/dist/components/ModelPicker.d.ts.map +0 -1
  283. package/dist/components/ModelSelectDialog.d.ts.map +0 -1
  284. package/dist/components/MonacoDiffView.d.ts.map +0 -1
  285. package/dist/components/NextStepsBar.d.ts.map +0 -1
  286. package/dist/components/OfficeMapCanvas/CanvasPanels.d.ts.map +0 -1
  287. package/dist/components/OfficeMapCanvas/Hud.d.ts.map +0 -1
  288. package/dist/components/OfficeMapCanvas/Overlays.d.ts.map +0 -1
  289. package/dist/components/OfficeMapCanvas/SelectedNodeDetailPanel.d.ts.map +0 -1
  290. package/dist/components/OfficeMapCanvas/edges.d.ts.map +0 -1
  291. package/dist/components/OfficeMapCanvas/nodes.d.ts.map +0 -1
  292. package/dist/components/OfficeMapCanvas/resolve.d.ts.map +0 -1
  293. package/dist/components/OfficeMapCanvas/use-recently-finished.d.ts.map +0 -1
  294. package/dist/components/OfficeMapCanvas/utils.d.ts.map +0 -1
  295. package/dist/components/OfficeMapCanvas.d.ts.map +0 -1
  296. package/dist/components/OfficeMapPanel.d.ts.map +0 -1
  297. package/dist/components/OfficeMapSettingsPanel.d.ts.map +0 -1
  298. package/dist/components/PhasePanel.d.ts.map +0 -1
  299. package/dist/components/PlanPanel.d.ts.map +0 -1
  300. package/dist/components/ProcessMonitor.d.ts.map +0 -1
  301. package/dist/components/PromptLibraryModal.d.ts.map +0 -1
  302. package/dist/components/ProviderWaitingRoom.d.ts.map +0 -1
  303. package/dist/components/QueuePanel.d.ts.map +0 -1
  304. package/dist/components/QuickModelSwitcher.d.ts.map +0 -1
  305. package/dist/components/QuickModelSwitcher.filter.d.ts.map +0 -1
  306. package/dist/components/RefinePanel.d.ts.map +0 -1
  307. package/dist/components/RefreshDebugView.d.ts.map +0 -1
  308. package/dist/components/SageMemoryCard.d.ts +0 -19
  309. package/dist/components/SageMemoryCard.d.ts.map +0 -1
  310. package/dist/components/SddActivityFeed.d.ts.map +0 -1
  311. package/dist/components/SddBoardView.d.ts.map +0 -1
  312. package/dist/components/SddDestroyDialog.d.ts.map +0 -1
  313. package/dist/components/SddFlowGraph.d.ts.map +0 -1
  314. package/dist/components/SddHub.d.ts.map +0 -1
  315. package/dist/components/SddKanbanView.d.ts.map +0 -1
  316. package/dist/components/SddTaskDrawer.d.ts.map +0 -1
  317. package/dist/components/SddWizard.d.ts.map +0 -1
  318. package/dist/components/SearchOverlay.d.ts.map +0 -1
  319. package/dist/components/SendButton.d.ts.map +0 -1
  320. package/dist/components/SessionWatchPanel.d.ts.map +0 -1
  321. package/dist/components/SessionsDashboard.d.ts.map +0 -1
  322. package/dist/components/SettingsPanel/BasicSettingsTabs.d.ts.map +0 -1
  323. package/dist/components/SettingsPanel/BrainSection.d.ts.map +0 -1
  324. package/dist/components/SettingsPanel/ChimeraSettingsPanel.d.ts.map +0 -1
  325. package/dist/components/SettingsPanel/ClearAllowlistDialog.d.ts.map +0 -1
  326. package/dist/components/SettingsPanel/ConnectionsHealthSection.d.ts.map +0 -1
  327. package/dist/components/SettingsPanel/FallbacksSection.d.ts.map +0 -1
  328. package/dist/components/SettingsPanel/FleetSection.d.ts.map +0 -1
  329. package/dist/components/SettingsPanel/IntegrationsSection.d.ts.map +0 -1
  330. package/dist/components/SettingsPanel/MCPSection.d.ts.map +0 -1
  331. package/dist/components/SettingsPanel/ModelSection.d.ts.map +0 -1
  332. package/dist/components/SettingsPanel/OAuthLoginSection.d.ts.map +0 -1
  333. package/dist/components/SettingsPanel/PluginToggleList.d.ts.map +0 -1
  334. package/dist/components/SettingsPanel/PreferenceControls.d.ts.map +0 -1
  335. package/dist/components/SettingsPanel/PreferenceToggle.d.ts.map +0 -1
  336. package/dist/components/SettingsPanel/ProviderModelsPanel.d.ts.map +0 -1
  337. package/dist/components/SettingsPanel/ProviderModelsPanel.filter.d.ts.map +0 -1
  338. package/dist/components/SettingsPanel/ProviderSection.d.ts.map +0 -1
  339. package/dist/components/SettingsPanel/RoutingSection.d.ts.map +0 -1
  340. package/dist/components/SettingsPanel/SecuritySection.d.ts.map +0 -1
  341. package/dist/components/SettingsPanel/ShadowSection.d.ts.map +0 -1
  342. package/dist/components/SettingsPanel/ToolsSection.d.ts.map +0 -1
  343. package/dist/components/SettingsPanel/brain-section-options.d.ts.map +0 -1
  344. package/dist/components/SettingsPanel/index.d.ts.map +0 -1
  345. package/dist/components/SettingsPanel/local-presets.d.ts.map +0 -1
  346. package/dist/components/SettingsPanel/official-servers.d.ts.map +0 -1
  347. package/dist/components/SettingsPanel/settings-panel-reducers.d.ts.map +0 -1
  348. package/dist/components/SettingsPanel/undo-send-decision.d.ts.map +0 -1
  349. package/dist/components/SettingsPanel.d.ts.map +0 -1
  350. package/dist/components/SetupScreen/CustomProviderSection.d.ts.map +0 -1
  351. package/dist/components/SetupScreen/ModelEditor.d.ts.map +0 -1
  352. package/dist/components/SetupScreen/ProviderKeyCard.d.ts.map +0 -1
  353. package/dist/components/SetupScreen/key-operation.d.ts.map +0 -1
  354. package/dist/components/SetupScreen/popular-providers.d.ts.map +0 -1
  355. package/dist/components/SetupScreen/relative-time.d.ts.map +0 -1
  356. package/dist/components/SetupScreen/types.d.ts.map +0 -1
  357. package/dist/components/SetupScreen.d.ts.map +0 -1
  358. package/dist/components/ShortcutsOverlay.d.ts.map +0 -1
  359. package/dist/components/SideEffectTimeline.d.ts.map +0 -1
  360. package/dist/components/SidePanel/AgentsPanel.d.ts.map +0 -1
  361. package/dist/components/SidePanel/ChangesPanel.d.ts.map +0 -1
  362. package/dist/components/SidePanel/DesignStudioPanel.d.ts.map +0 -1
  363. package/dist/components/SidePanel/SessionList.d.ts.map +0 -1
  364. package/dist/components/SidePanel/SessionPanel.d.ts.map +0 -1
  365. package/dist/components/SidePanel/SkillsList.d.ts.map +0 -1
  366. package/dist/components/SidePanel/WorktreesPanel.d.ts.map +0 -1
  367. package/dist/components/SidePanel/index.d.ts.map +0 -1
  368. package/dist/components/SkillDetailView.d.ts.map +0 -1
  369. package/dist/components/SpecsView.d.ts.map +0 -1
  370. package/dist/components/TaskActivityTimeline.d.ts.map +0 -1
  371. package/dist/components/TaskBoard.d.ts.map +0 -1
  372. package/dist/components/TaskCard.d.ts.map +0 -1
  373. package/dist/components/TaskExecutionAttempts.d.ts.map +0 -1
  374. package/dist/components/TaskIntelligencePanel.d.ts.map +0 -1
  375. package/dist/components/TaskRiskPanel.d.ts.map +0 -1
  376. package/dist/components/TaskVerificationSection.d.ts.map +0 -1
  377. package/dist/components/TasksPanel.d.ts.map +0 -1
  378. package/dist/components/TechStackView/DependencyDetail.d.ts.map +0 -1
  379. package/dist/components/TechStackView/DependencyTable.d.ts.map +0 -1
  380. package/dist/components/TechStackView/FindingsPanel.d.ts.map +0 -1
  381. package/dist/components/TechStackView/TechStackToolbar.d.ts.map +0 -1
  382. package/dist/components/TechStackView/index.d.ts.map +0 -1
  383. package/dist/components/TechStackView/shared.d.ts.map +0 -1
  384. package/dist/components/TerminalPanel.d.ts.map +0 -1
  385. package/dist/components/ThemeProvider.d.ts.map +0 -1
  386. package/dist/components/Toaster.d.ts.map +0 -1
  387. package/dist/components/TodosPanel.d.ts.map +0 -1
  388. package/dist/components/ToolGroup.d.ts.map +0 -1
  389. package/dist/components/ToolResult.d.ts.map +0 -1
  390. package/dist/components/UpdateBanner.d.ts.map +0 -1
  391. package/dist/components/VerificationReportPanel.d.ts.map +0 -1
  392. package/dist/components/WatchMessageBubble.d.ts.map +0 -1
  393. package/dist/components/WelcomeScreen.d.ts.map +0 -1
  394. package/dist/components/WorkDashboard.d.ts.map +0 -1
  395. package/dist/components/WorkspaceDock.d.ts.map +0 -1
  396. package/dist/components/WorktreeGraph.d.ts.map +0 -1
  397. package/dist/components/WorktreeLanes.d.ts.map +0 -1
  398. package/dist/components/WorktreeOrphans.d.ts.map +0 -1
  399. package/dist/components/activity-bar/index.d.ts.map +0 -1
  400. package/dist/components/activity-bar/nav.d.ts.map +0 -1
  401. package/dist/components/agent-roster-data.d.ts.map +0 -1
  402. package/dist/components/agents/AgentDetailSection.d.ts.map +0 -1
  403. package/dist/components/agents/AgentRosterCard.d.ts.map +0 -1
  404. package/dist/components/agents/FleetSummaryBar.d.ts.map +0 -1
  405. package/dist/components/codemap-model.d.ts.map +0 -1
  406. package/dist/components/context-editor/ContextWindowEditor.d.ts.map +0 -1
  407. package/dist/components/dashboard-primitives.d.ts.map +0 -1
  408. package/dist/components/index.d.ts.map +0 -1
  409. package/dist/components/monaco-theme.d.ts.map +0 -1
  410. package/dist/components/toaster-helpers.d.ts.map +0 -1
  411. package/dist/components/ui/PickerCardList.d.ts.map +0 -1
  412. package/dist/components/ui/api-key-display.d.ts.map +0 -1
  413. package/dist/components/ui/badge.d.ts.map +0 -1
  414. package/dist/components/ui/button.d.ts.map +0 -1
  415. package/dist/components/ui/concurrency-gauge.d.ts.map +0 -1
  416. package/dist/components/ui/dialog.d.ts.map +0 -1
  417. package/dist/components/ui/dropdown-menu.d.ts.map +0 -1
  418. package/dist/components/ui/empty-state.d.ts.map +0 -1
  419. package/dist/components/ui/event-timeline.d.ts.map +0 -1
  420. package/dist/components/ui/fleet-agent-row.d.ts.map +0 -1
  421. package/dist/components/ui/index.d.ts.map +0 -1
  422. package/dist/components/ui/input.d.ts.map +0 -1
  423. package/dist/components/ui/pagination.d.ts.map +0 -1
  424. package/dist/components/ui/progress-ring.d.ts.map +0 -1
  425. package/dist/components/ui/scroll-area.d.ts.map +0 -1
  426. package/dist/components/ui/sheet.d.ts.map +0 -1
  427. package/dist/components/ui/sparkline.d.ts.map +0 -1
  428. package/dist/components/ui/tabs.d.ts.map +0 -1
  429. package/dist/components/useAgentRosterData.d.ts.map +0 -1
  430. package/dist/components/useKanbanRegistrySessionIds.d.ts.map +0 -1
  431. package/dist/hooks/index.d.ts.map +0 -1
  432. package/dist/hooks/use-ws-handlers.d.ts.map +0 -1
  433. package/dist/hooks/useDesktopBridge.d.ts.map +0 -1
  434. package/dist/hooks/useF5Resilience.d.ts.map +0 -1
  435. package/dist/hooks/useFieldKeyboardNav.d.ts.map +0 -1
  436. package/dist/hooks/useFleetPolling.d.ts.map +0 -1
  437. package/dist/hooks/useGitInfo.d.ts.map +0 -1
  438. package/dist/hooks/useGlobalKeyboardShortcuts.d.ts.map +0 -1
  439. package/dist/hooks/useHorizontalScroll.d.ts.map +0 -1
  440. package/dist/hooks/useKanbanMeta.d.ts.map +0 -1
  441. package/dist/hooks/useMemoryForFile.d.ts.map +0 -1
  442. package/dist/hooks/usePagination.d.ts.map +0 -1
  443. package/dist/hooks/useProviderModels.d.ts.map +0 -1
  444. package/dist/hooks/useScrollPosition.d.ts.map +0 -1
  445. package/dist/hooks/useWebSocket.d.ts.map +0 -1
  446. package/dist/hooks/ws-handlers/chat-handlers.d.ts.map +0 -1
  447. package/dist/hooks/ws-handlers/coordinator-handlers.d.ts.map +0 -1
  448. package/dist/hooks/ws-handlers/files-mailbox-handlers.d.ts.map +0 -1
  449. package/dist/hooks/ws-handlers/fleet-handlers.d.ts.map +0 -1
  450. package/dist/hooks/ws-handlers/misc-handlers.d.ts.map +0 -1
  451. package/dist/hooks/ws-handlers/session-handlers.d.ts.map +0 -1
  452. package/dist/hooks/ws-handlers/techstack-handlers.d.ts.map +0 -1
  453. package/dist/hooks/ws-handlers.d.ts.map +0 -1
  454. package/dist/i18n/index.d.ts.map +0 -1
  455. package/dist/i18n/languages.d.ts.map +0 -1
  456. package/dist/index.css.map +0 -7
  457. package/dist/index.js.map +0 -7
  458. package/dist/lib/accent-colors.d.ts.map +0 -1
  459. package/dist/lib/agent-office.d.ts.map +0 -1
  460. package/dist/lib/agent-status.d.ts.map +0 -1
  461. package/dist/lib/chime.d.ts.map +0 -1
  462. package/dist/lib/color.d.ts.map +0 -1
  463. package/dist/lib/completion.d.ts.map +0 -1
  464. package/dist/lib/core-browser-shim.d.ts.map +0 -1
  465. package/dist/lib/default-prompt-pools.d.ts.map +0 -1
  466. package/dist/lib/desktop-host.d.ts.map +0 -1
  467. package/dist/lib/desktop-shell.d.ts.map +0 -1
  468. package/dist/lib/fallback-ref.d.ts.map +0 -1
  469. package/dist/lib/favicon.d.ts.map +0 -1
  470. package/dist/lib/file-icons.d.ts.map +0 -1
  471. package/dist/lib/goal.d.ts.map +0 -1
  472. package/dist/lib/index.d.ts.map +0 -1
  473. package/dist/lib/kanban-cleaner.d.ts.map +0 -1
  474. package/dist/lib/kanban-metadata.d.ts.map +0 -1
  475. package/dist/lib/kanban-verification.d.ts.map +0 -1
  476. package/dist/lib/model-calendar.d.ts.map +0 -1
  477. package/dist/lib/model-matrix-routes.d.ts.map +0 -1
  478. package/dist/lib/notify.d.ts.map +0 -1
  479. package/dist/lib/plugin-enablement.d.ts.map +0 -1
  480. package/dist/lib/roster-ws.d.ts.map +0 -1
  481. package/dist/lib/sage-block.d.ts.map +0 -1
  482. package/dist/lib/sdd-theme.d.ts.map +0 -1
  483. package/dist/lib/stream-coalescer.d.ts.map +0 -1
  484. package/dist/lib/terminal-dock.d.ts.map +0 -1
  485. package/dist/lib/tool-icon.d.ts.map +0 -1
  486. package/dist/lib/tool-summary.d.ts.map +0 -1
  487. package/dist/lib/utils.d.ts.map +0 -1
  488. package/dist/lib/view-navigation.d.ts.map +0 -1
  489. package/dist/lib/ws-client-actions.d.ts.map +0 -1
  490. package/dist/lib/ws-client-contracts.d.ts.map +0 -1
  491. package/dist/lib/ws-client-helpers.d.ts.map +0 -1
  492. package/dist/lib/ws-client-utils.d.ts.map +0 -1
  493. package/dist/lib/ws-client.d.ts.map +0 -1
  494. package/dist/main.d.ts.map +0 -1
  495. package/dist/protocol-compatibility.d.ts.map +0 -1
  496. package/dist/stores/auto-submit-streak.d.ts.map +0 -1
  497. package/dist/stores/chat-store.d.ts.map +0 -1
  498. package/dist/stores/codemap-activity-store.d.ts.map +0 -1
  499. package/dist/stores/codemap-index-store.d.ts.map +0 -1
  500. package/dist/stores/config-store.d.ts.map +0 -1
  501. package/dist/stores/context-editor-store.d.ts.map +0 -1
  502. package/dist/stores/coordinator-monitor-store.d.ts.map +0 -1
  503. package/dist/stores/cron-store.d.ts.map +0 -1
  504. package/dist/stores/file-reference-store.d.ts.map +0 -1
  505. package/dist/stores/file-store.d.ts.map +0 -1
  506. package/dist/stores/fleet-store.d.ts.map +0 -1
  507. package/dist/stores/git-changes-store.d.ts.map +0 -1
  508. package/dist/stores/git-info-store.d.ts.map +0 -1
  509. package/dist/stores/goal-assess-store.d.ts.map +0 -1
  510. package/dist/stores/goal-run-store.d.ts.map +0 -1
  511. package/dist/stores/goal-state-store.d.ts.map +0 -1
  512. package/dist/stores/goal-store.d.ts.map +0 -1
  513. package/dist/stores/history-store.d.ts.map +0 -1
  514. package/dist/stores/index.d.ts.map +0 -1
  515. package/dist/stores/kanban-store.d.ts.map +0 -1
  516. package/dist/stores/local-prefs.d.ts.map +0 -1
  517. package/dist/stores/mailbox-store.d.ts.map +0 -1
  518. package/dist/stores/memory-injector-store.d.ts.map +0 -1
  519. package/dist/stores/memory-lifecycle-store.d.ts.map +0 -1
  520. package/dist/stores/monitor-store.d.ts.map +0 -1
  521. package/dist/stores/office-map-store.d.ts.map +0 -1
  522. package/dist/stores/provider-status-store.d.ts.map +0 -1
  523. package/dist/stores/sdd-board-store.d.ts.map +0 -1
  524. package/dist/stores/sdd-wizard-store.d.ts.map +0 -1
  525. package/dist/stores/session-store.d.ts.map +0 -1
  526. package/dist/stores/side-effect-store.d.ts.map +0 -1
  527. package/dist/stores/specs-store.d.ts.map +0 -1
  528. package/dist/stores/techstack-store.d.ts.map +0 -1
  529. package/dist/stores/types.d.ts.map +0 -1
  530. package/dist/stores/ui-store.d.ts.map +0 -1
  531. package/dist/stores/viz-store.d.ts.map +0 -1
  532. package/dist/stores/worktree-store.d.ts.map +0 -1
  533. package/dist/types/brain.d.ts.map +0 -1
  534. package/dist/types/chronicle.d.ts.map +0 -1
  535. package/dist/types/client-message.d.ts.map +0 -1
  536. package/dist/types/collab.d.ts.map +0 -1
  537. package/dist/types/connections.d.ts.map +0 -1
  538. package/dist/types/goal-kanban-worktree.d.ts.map +0 -1
  539. package/dist/types/protocol-core.d.ts.map +0 -1
  540. package/dist/types/runtime.d.ts.map +0 -1
  541. package/dist/types/sage.d.ts.map +0 -1
  542. package/dist/types/server-message.d.ts.map +0 -1
  543. package/dist/types/skills-design.d.ts.map +0 -1
  544. package/dist/types/system.d.ts.map +0 -1
  545. package/dist/types.d.ts.map +0 -1
  546. package/dist/types.js.map +0 -7
@@ -1,3 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/vendor-2VBBgNb5.js","assets/rolldown-runtime-QTnfLwEv.js","assets/monaco-BLUV5g0U.js","assets/monaco-Bowa0-zp.css","assets/markdown-L6DLSM7f.js","assets/vendor-BMdWcCR4.css"])))=>i.map(i=>d[i]);
2
- import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{Ar as t,Ct as n,Ii as r,Ir as ee,It as te,Kn as i,Li as ne,Sa as a,Zi as re,_a as ie,_n as ae,_r as oe,at as se,ba as o,ci as ce,cn as le,et as s,na as c,ni as ue,xn as de,zi as fe}from"./vendor-2VBBgNb5.js";import"./i18n-1BkaqMgr.js";import{n as l}from"./ui-store-CS-njcmT.js";import{s as u}from"./monaco-BLUV5g0U.js";import{t as pe}from"./useWebSocket-Dh3aAFDE.js";import{t as d}from"./utils-CN2sfDVP.js";import{o as me}from"./view-navigation-Cgy5xh9q.js";import{a as he,n as ge,o as _e,t as ve}from"./dialog-CT1PTjzK.js";import{d as f}from"./markdown-L6DLSM7f.js";import{s as p,t as m}from"./LazyMarkdown-BGwFjYKr.js";import{b as ye}from"./index-BPfIz78e.js";import{t as be}from"./empty-state-CdyXy96A.js";var h=e(a(),1),g=s(),_=(0,h.lazy)(()=>u(()=>import(`./vendor-2VBBgNb5.js`).then(e=>e.S),__vite__mapDeps([0,1,2,3,4,5])));function v(e){return e===`project`||e===`user`}function xe(e){let t=e.match(/^(.+?)\/SKILL(?:\.save)?\.md$/);return t?t[1]:null}function Se({source:e}){let{t}=ie(),n=e===`project`?`project`:e===`user`?`user`:`bundled`;return(0,g.jsx)(`span`,{className:d(`inline-flex items-center rounded-md border px-1.5 py-0.5 text-[10px] font-semibold uppercase tracking-wide`,n===`project`&&`border-success/25 bg-success/8 text-success`,n===`user`&&`border-primary/25 bg-primary/10 text-primary`,n===`bundled`&&`border-border/70 bg-muted/60 text-muted-foreground`),children:t(`activity:skillDetail.${{project:`scopeProject`,user:`scopeGlobal`,bundled:`scopeBundled`}[n]}`)})}function y({className:e}){let{t:a}=ie(),{client:s}=pe(),u=l(e=>e.skillsState),y=l(e=>e.setSkillsState),b=u.selectedSkill,x=u.navHistory,S=u.historyIndex,[C,Ce]=(0,h.useState)(null),[we,w]=(0,h.useState)(!1),[Te,T]=(0,h.useState)(null),Ee=ye(`skill-detail`,!!C),[E,D]=(0,h.useState)(!1),[O,k]=(0,h.useState)(``),[A,j]=(0,h.useState)(!1),[M,N]=(0,h.useState)(null),[P,F]=(0,h.useState)(!1),[I,De]=(0,h.useState)(null),[L,R]=(0,h.useState)(!1),z=(0,h.useRef)(``),[B,V]=(0,h.useState)(!1),[H,U]=(0,h.useState)(null),[Oe,W]=(0,h.useState)(!1),[G,K]=(0,h.useState)(null),[q,ke]=(0,h.useState)(!1),[Ae,je]=(0,h.useState)([]),J=(0,h.useRef)(u);J.current=u;let Y=(0,h.useRef)(!1),X=(0,h.useMemo)(()=>O?{lines:O.split(`
3
- `).length,words:O.trim()?O.trim().split(/\s+/).length:0,chars:O.length}:{lines:0,words:0,chars:0},[O]),Z=(0,h.useMemo)(()=>{if(!O)return null;let e=5*1024*1024,t=new Blob([O]).size;return t>=e?{level:`critical`,used:t,limit:e}:t>=4194304?{level:`warn`,used:t,limit:e}:null},[O]);(0,h.useEffect)(()=>{if(!I)return;let e=setTimeout(()=>De(null),2e3);return()=>clearTimeout(e)},[I]),(0,h.useEffect)(()=>{if(!E||!b)return;let e=setInterval(()=>{O&&O!==z.current&&(z.current=O,localStorage.setItem(`skills_draft_${b.name}`,JSON.stringify({content:O,savedAt:Date.now()})),De(Date.now()))},5e3);return()=>clearInterval(e)},[E,O,b]),(0,h.useEffect)(()=>{if(!b||!E)return;let e=localStorage.getItem(`skills_draft_${b.name}`);if(e)try{let{content:t}=JSON.parse(e);t&&t!==O&&t!==z.current&&(k(t),z.current=t,R(!0))}catch{}},[b?.name,E]),(0,h.useEffect)(()=>{if(!s||!b)return;w(!0),Ce(null),T(null);let e=setTimeout(()=>{w(!1),T(o.t(`activity:skillDetail.timeoutError`))},1e4),t=t=>{clearTimeout(e);let n=t;n.payload.error?T(n.payload.error):n.payload.name&&Ce(n.payload),w(!1)},n=e=>{let t=e;V(!1);let n=J.current;if(t.payload.success){let e={...n.knownRefs};for(let n of t.payload.updated??[])e[n.name]=n.newRef;y({...n,knownRefs:e,updateAvailableCount:0}),U({updated:t.payload.updated??[],unchanged:t.payload.unchanged??[],errors:t.payload.errors??[]}),s.send({type:`skills.list`},{echoToChat:!1})}else U({updated:[],unchanged:[],errors:[{name:``,error:t.payload.error??o.t(`activity:skillDetail.updateFailed`)}]})},r=e=>{let t=e;t.payload.skills&&je(t.payload.skills)};return s.on(`skills.content`,t),s.on(`skills.updated`,n),s.on(`skills.list`,r),s.send({type:`skills.content`,payload:{name:b.name,source:b.source}}),()=>{clearTimeout(e),s.off(`skills.content`,t),s.off(`skills.updated`,n),s.off(`skills.list`,r)}},[s,b?.name,b?.source]),(0,h.useEffect)(()=>{E&&(D(!1),k(``),N(null))},[b?.name]);let Q=(0,h.useCallback)(e=>Ae.find(t=>t.name.toLowerCase()===e.toLowerCase()),[Ae]),Me=(0,h.useCallback)(e=>{let t=Q(e);if(t){Y.current=!1;let e=x.slice(0,S+1);e.push(t),y({...J.current,selectedSkill:t,navHistory:e,historyIndex:e.length-1}),D(!1),k(``),U(null)}},[Q,x,S,y]),Ne=(0,h.useCallback)(()=>{if(S<=0)return;Y.current=!0;let e=S-1,t=x[e];y({...J.current,selectedSkill:t,historyIndex:e}),D(!1),k(``),U(null)},[S,x,y]),Pe=(0,h.useCallback)(()=>{if(S>=x.length-1)return;Y.current=!0;let e=S+1,t=x[e];y({...J.current,selectedSkill:t,historyIndex:e}),D(!1),k(``),U(null)},[S,x,y]),$=(0,h.useCallback)(()=>{me(`chat`)},[]),Fe=(0,h.useCallback)(()=>{C&&(k(C.body),z.current=C.body,R(!1),N(null),D(!0),F(!1))},[C]),Ie=(0,h.useCallback)(()=>{D(!1),k(``),N(null),F(!1),R(!1),b&&localStorage.removeItem(`skills_draft_${b.name}`)},[b]),Le=(0,h.useCallback)(()=>{!b||!C||(R(!1),k(C.body),z.current=C.body,b&&localStorage.removeItem(`skills_draft_${b.name}`))},[b,C]),Re=(0,h.useCallback)(()=>{if(!s||!b||!O.trim())return;j(!0),N(null);let e=t=>{let n=t;j(!1),n.payload.success?(z.current=``,localStorage.removeItem(`skills_draft_${b.name}`),R(!1),D(!1),s.send({type:`skills.content`,payload:{name:b.name,source:b.source}}),s.send({type:`skills.list`},{echoToChat:!1})):N(n.payload.error??o.t(`activity:skillDetail.saveFailed`)),s.off(`skills.edited`,e)};s.on(`skills.edited`,e),s.editSkill(b.name,O)},[s,b,O]),ze=(0,h.useCallback)(()=>{!s||!b||(V(!0),U(null),s.checkForUpdates(b.name,b.source===`user`))},[s,b]),Be=(0,h.useCallback)(()=>{b?.sourceUrl&&navigator.clipboard.writeText(b.sourceUrl).then(()=>{W(!0),setTimeout(()=>W(!1),2e3)})},[b]),Ve=(0,h.useCallback)(()=>{if(!C?.body)return;let e=new Blob([C.body],{type:`text/markdown`}),t=URL.createObjectURL(e),n=document.createElement(`a`);n.href=t,n.download=`${C.name.replace(/\//g,`_`)}-SKILL.md`,document.body.appendChild(n),n.click(),document.body.removeChild(n),URL.revokeObjectURL(t)},[C]),He=(0,h.useCallback)(async e=>{if(!s||!e)return;ke(!0);let t=e=>{let n=e;ke(!1),n.payload.success?(K(null),s.send({type:`skills.list`},{echoToChat:!1}),$()):N(n.payload.error??o.t(`activity:skillDetail.uninstallFailed`)),s.off(`skills.uninstalled`,t)};s.on(`skills.uninstalled`,t),s.uninstallSkill(e.name,e.source===`user`)},[s,$]);return b?(0,g.jsxs)(`div`,{className:d(`flex h-full min-h-0 min-w-0 flex-col gap-3 overflow-hidden bg-[hsl(var(--surface-2)/0.45)] p-3`,e),children:[(0,g.jsxs)(`div`,{className:`shrink-0 rounded-xl border border-border/70 bg-card/75 p-4 shadow-sm`,children:[(0,g.jsxs)(`div`,{className:`flex flex-col gap-3 lg:flex-row lg:items-start lg:justify-between`,children:[(0,g.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,g.jsxs)(`div`,{className:`flex min-w-0 flex-wrap items-center gap-2`,children:[(0,g.jsx)(`span`,{className:`flex h-8 w-8 shrink-0 items-center justify-center rounded-lg bg-primary/10 text-primary`,children:(0,g.jsx)(te,{className:`h-4 w-4`})}),(0,g.jsx)(`h1`,{className:`min-w-0 truncate text-base font-semibold`,children:b.name}),b.version&&(0,g.jsxs)(`span`,{className:`text-xs text-muted-foreground`,children:[`v`,b.version]}),(0,g.jsx)(Se,{source:b.source})]}),(0,g.jsx)(`p`,{className:`text-sm text-muted-foreground mt-1 line-clamp-2`,children:b.description||b.trigger}),b.sourceUrl&&(0,g.jsxs)(`div`,{className:`mt-2 flex min-w-0 items-center gap-1`,children:[(0,g.jsxs)(`a`,{href:`https://${b.sourceUrl.replace(`github:`,``)}`,target:`_blank`,rel:`noopener noreferrer`,className:`flex min-w-0 items-center gap-1 text-xs text-muted-foreground transition-colors hover:text-foreground`,title:a(`activity:skillDetail.openSourceRepo`),children:[(0,g.jsx)(oe,{className:`h-3 w-3 shrink-0`}),(0,g.jsx)(`span`,{className:`truncate font-mono`,children:b.sourceUrl})]}),(0,g.jsx)(`button`,{type:`button`,onClick:Be,className:`flex shrink-0 items-center text-muted-foreground transition-colors hover:text-foreground`,title:a(`activity:skillDetail.copySourceUrl`),children:Oe?(0,g.jsx)(fe,{className:`h-3 w-3 text-success`}):(0,g.jsx)(ce,{className:`h-3 w-3`})})]}),b.scope.length>0&&(0,g.jsx)(`div`,{className:`flex flex-wrap gap-1 mt-2`,children:b.scope.map(e=>(0,g.jsx)(`span`,{className:`px-1.5 py-0.5 text-[10px] rounded bg-muted text-muted-foreground`,children:e},e))}),H&&(0,g.jsxs)(`div`,{className:`mt-2 text-xs space-y-1`,children:[H.updated.length>0&&(0,g.jsx)(`div`,{className:`text-success`,children:a(`activity:skillDetail.updatedLabel`,{list:H.updated.map(e=>`${e.name} (${e.oldRef} → ${e.newRef})`).join(`, `)})}),H.unchanged.length>0&&(0,g.jsx)(`div`,{className:`text-muted-foreground`,children:a(`activity:skillDetail.upToDateLabel`,{list:H.unchanged.join(`, `)})}),H.errors.length>0&&(0,g.jsx)(`div`,{className:`text-destructive`,children:a(`activity:skillDetail.errorsLabel`,{list:H.errors.map(e=>`${e.name?`${e.name}: `:``}${e.error}`).join(`; `)})})]})]}),(0,g.jsxs)(`div`,{className:`flex flex-wrap items-center gap-1 lg:ml-auto lg:shrink-0 lg:justify-end`,children:[v(b.source)&&b.sourceUrl&&(0,g.jsx)(`button`,{type:`button`,onClick:ze,disabled:B,className:`flex h-8 w-8 items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-accent hover:text-foreground disabled:opacity-50`,title:a(`activity:skillDetail.checkUpdatesTitle`),children:B?(0,g.jsx)(i,{className:`h-3.5 w-3.5 animate-spin`}):(0,g.jsx)(le,{className:`h-3.5 w-3.5`})}),b.source!==`bundled`&&!E&&(0,g.jsx)(`button`,{type:`button`,onClick:Ve,className:`flex h-8 w-8 items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-accent hover:text-foreground`,title:a(`activity:skillDetail.exportTitle`),children:(0,g.jsx)(ue,{className:`h-3.5 w-3.5`})}),v(b.source)&&!E&&(0,g.jsx)(`button`,{type:`button`,onClick:Fe,className:`flex h-8 w-8 items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-accent hover:text-foreground`,title:a(`activity:skillDetail.editTitle`),children:(0,g.jsx)(ae,{className:`h-3.5 w-3.5`})}),v(b.source)&&(0,g.jsx)(`button`,{type:`button`,onClick:()=>K(b),className:`flex h-8 w-8 items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-destructive/10 hover:text-destructive`,title:a(`activity:skillDetail.uninstallTitle`),children:(0,g.jsx)(n,{className:`h-3.5 w-3.5`})}),(0,g.jsx)(`button`,{type:`button`,onClick:$,className:`flex h-8 w-8 items-center justify-center rounded-md text-muted-foreground hover:bg-accent hover:text-foreground`,title:a(`activity:skillDetail.closeTitle`),children:(0,g.jsx)(se,{className:`h-4 w-4`})})]})]}),x.length>1&&(0,g.jsxs)(`div`,{className:`mt-3 flex min-w-0 items-center gap-1 rounded-lg border border-border/60 bg-muted/35 px-2 py-1`,children:[(0,g.jsx)(`button`,{type:`button`,onClick:Ne,disabled:S<=0,className:d(`rounded p-1 transition-colors`,S<=0?`text-muted-foreground/65 cursor-not-allowed`:`hover:bg-accent text-muted-foreground cursor-pointer`),title:a(`activity:skillDetail.backTitle`),children:(0,g.jsx)(ne,{className:`h-4 w-4`})}),(0,g.jsx)(`button`,{type:`button`,onClick:Pe,disabled:S>=x.length-1,className:d(`rounded p-1 transition-colors`,S>=x.length-1?`text-muted-foreground/65 cursor-not-allowed`:`hover:bg-accent text-muted-foreground cursor-pointer`),title:a(`activity:skillDetail.forwardTitle`),children:(0,g.jsx)(r,{className:`h-4 w-4`})}),(0,g.jsx)(`div`,{className:`flex items-center gap-0.5 overflow-x-auto text-xs`,children:x.map((e,t)=>(0,g.jsxs)(`span`,{className:`flex items-center shrink-0`,children:[t>0&&(0,g.jsx)(r,{className:`h-3 w-3 text-muted-foreground/65 mx-0.5 shrink-0`}),(0,g.jsx)(`button`,{type:`button`,onClick:()=>{t<S&&(Y.current=!0,y({...J.current,selectedSkill:e,historyIndex:t}),D(!1),k(``),U(null))},className:d(`hover:text-primary cursor-pointer transition-colors`,t===S?`text-primary font-medium`:`text-muted-foreground`),children:e.name})]},e.name+t))})]})]}),C&&(C.relatedFiles.length>0||C.references.length>0)&&(0,g.jsxs)(`div`,{className:`shrink-0 space-y-2 rounded-xl border border-border/70 bg-card/70 px-4 py-3 shadow-sm`,children:[C.relatedFiles.length>0&&(0,g.jsxs)(`div`,{className:`flex items-center gap-2 flex-wrap`,children:[(0,g.jsxs)(`div`,{className:`flex items-center gap-1 text-[10px] text-muted-foreground`,children:[(0,g.jsx)(t,{className:`h-3 w-3`}),(0,g.jsx)(`span`,{className:`font-medium uppercase tracking-wide`,children:a(`activity:skillDetail.relatedFiles`)})]}),C.relatedFiles.map(e=>{let t=xe(e);return t&&Q(t)?(0,g.jsxs)(`button`,{type:`button`,onClick:()=>Me(t),className:`inline-flex min-w-0 items-center gap-1 rounded-md border border-border/70 bg-background/60 px-1.5 py-0.5 text-[10px] transition-colors hover:border-primary/40 hover:text-primary`,title:a(`activity:skillDetail.goToSkillTitle`,{name:t}),children:[(0,g.jsx)(c,{className:`h-2.5 w-2.5`}),e]},e):(0,g.jsx)(`span`,{className:`rounded-md border border-border/70 bg-background/60 px-1.5 py-0.5 text-[10px] text-muted-foreground`,children:e},e)})]}),C.references.length>0&&(0,g.jsxs)(`div`,{className:`flex items-center gap-2 flex-wrap`,children:[(0,g.jsxs)(`div`,{className:`flex items-center gap-1 text-[10px] text-muted-foreground`,children:[(0,g.jsx)(ee,{className:`h-3 w-3`}),(0,g.jsx)(`span`,{className:`font-medium uppercase tracking-wide`,children:a(`activity:skillDetail.references`)})]}),C.references.map(e=>{let t=xe(e)??e.replace(/\.md$/,``);return Q(t)?(0,g.jsxs)(`button`,{type:`button`,onClick:()=>Me(t),className:`inline-flex min-w-0 items-center gap-1 rounded-md border border-primary/20 bg-primary/5 px-1.5 py-0.5 text-[10px] text-primary transition-colors hover:border-primary/30 hover:bg-primary/10`,title:a(`activity:skillDetail.goToSkillTitle`,{name:t}),children:[(0,g.jsx)(c,{className:`h-2.5 w-2.5`}),t]},e):(0,g.jsx)(`span`,{className:`rounded-md bg-muted px-1.5 py-0.5 text-[10px] text-muted-foreground`,children:t},e)})]})]}),(0,g.jsx)(`div`,{className:`min-h-0 min-w-0 flex-1 overflow-hidden rounded-xl border border-border/70 bg-card/70 shadow-sm`,children:we?(0,g.jsxs)(`div`,{className:`flex h-full min-h-[16rem] flex-col items-center justify-center p-8 text-center text-muted-foreground`,children:[(0,g.jsx)(i,{className:`mx-auto mb-2 h-6 w-6 animate-spin text-primary`}),(0,g.jsx)(`p`,{children:a(`activity:skillDetail.loadingContent`)})]}):E?(0,g.jsxs)(`div`,{className:`flex h-full min-h-0 min-w-0 flex-col`,children:[(0,g.jsxs)(`div`,{className:`flex shrink-0 flex-col gap-2 border-b border-border/70 bg-muted/30 px-4 py-2 sm:flex-row sm:items-center sm:justify-between`,children:[(0,g.jsxs)(`div`,{className:`flex min-w-0 flex-wrap items-center gap-x-3 gap-y-1`,children:[(0,g.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:a(`activity:skillDetail.editingLabel`,{name:b.name})}),(0,g.jsx)(`span`,{className:`text-xs text-muted-foreground tabular-nums`,children:a(`activity:skillDetail.editStats`,{lines:X.lines,words:X.words,chars:X.chars})}),Z&&(0,g.jsx)(`span`,{className:`text-xs tabular-nums ${Z.level===`critical`?`font-medium text-destructive`:`text-warning`}`,children:a(`activity:skillDetail.charsWarningFmt`,{used:(Z.used/(1024*1024)).toFixed(1),limit:(Z.limit/(1024*1024)).toFixed(0)})}),I&&(0,g.jsx)(`span`,{className:`text-xs text-success animate-pulse`,children:a(`activity:skillDetail.draftSaved`)}),L&&(0,g.jsx)(`span`,{className:`animate-pulse text-xs text-warning`,children:a(`activity:skillDetail.draftRestored`)})]}),(0,g.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[M&&(0,g.jsx)(`span`,{className:`text-xs text-destructive`,children:M}),L&&(0,g.jsx)(`button`,{type:`button`,onClick:Le,className:`rounded-md border border-warning/35 px-2 py-1 text-[10px] text-warning transition-colors hover:bg-warning/10`,children:a(`activity:skillDetail.discardDraft`)}),(0,g.jsx)(`button`,{type:`button`,onClick:Ie,className:`rounded-md border border-border/70 px-2 py-1 text-xs transition-colors hover:bg-accent`,children:a(`common:action.cancel`)}),(0,g.jsx)(`button`,{type:`button`,onClick:()=>F(e=>!e),title:a(P?`activity:skillDetail.hidePreviewTitle`:`activity:skillDetail.splitViewTitle`),className:`rounded-md border px-2 py-1 text-xs transition-colors ${P?`border-primary/40 bg-primary/10 text-primary`:`border-border/70 text-muted-foreground hover:bg-accent`}`,children:(0,g.jsx)(de,{className:`h-3 w-3 inline`})}),(0,g.jsx)(`button`,{type:`button`,onClick:Re,disabled:A||!O.trim(),className:`rounded-md bg-primary px-3 py-1 text-xs text-primary-foreground shadow-sm shadow-primary/15 transition-colors hover:bg-primary/90 disabled:opacity-50`,children:A?(0,g.jsx)(i,{className:`h-3 w-3 animate-spin inline`}):a(`common:action.save`)})]})]}),P?(0,g.jsxs)(`div`,{className:`flex flex-1 min-h-0 gap-0.5`,children:[(0,g.jsx)(`div`,{className:`flex-1 min-w-0 flex flex-col min-h-0`,children:(0,g.jsx)(h.Suspense,{fallback:null,children:(0,g.jsx)(_,{value:O,onChange:e=>k(e.target.value??``),language:`markdown`,className:`flex-1`,style:{fontSize:12,backgroundColor:`transparent`,minHeight:0},placeholder:a(`activity:skillDetail.contentPlaceholder`)})})}),(0,g.jsx)(`div`,{className:`w-px bg-border flex-shrink-0`}),(0,g.jsx)(`div`,{className:`min-h-0 min-w-0 flex-1 overflow-y-auto overscroll-contain bg-background/45 p-4 prose prose-sm dark:prose-invert max-w-none`,children:(0,g.jsx)(m,{rehypePlugins:[f],components:p,children:O})})]}):(0,g.jsx)(h.Suspense,{fallback:null,children:(0,g.jsx)(_,{value:O,onChange:e=>k(e.target.value??``),language:`markdown`,className:`flex-1`,style:{fontSize:12,backgroundColor:`transparent`,minHeight:0},placeholder:a(`activity:skillDetail.contentPlaceholder`)})})]}):C?(0,g.jsx)(`div`,{ref:Ee,className:`h-full min-h-0 overflow-y-auto overscroll-contain p-5 sm:p-6 prose prose-sm dark:prose-invert max-w-none`,children:(0,g.jsx)(m,{rehypePlugins:[f],components:p,children:C.body})}):Te?(0,g.jsxs)(`div`,{className:`flex h-full min-h-[16rem] flex-col items-center justify-center p-8 text-center`,children:[(0,g.jsx)(`p`,{className:`text-destructive mb-2`,children:a(`activity:skillDetail.loadFailed`)}),(0,g.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:Te}),(0,g.jsx)(`button`,{type:`button`,onClick:()=>{s&&b&&(w(!0),T(null),s.send({type:`skills.content`,payload:{name:b.name,source:b.source}}))},className:`mt-4 rounded-md border border-border/70 px-3 py-1.5 text-xs transition-colors hover:bg-accent`,children:a(`common:action.retry`)})]}):(0,g.jsx)(`div`,{className:`flex h-full min-h-[16rem] items-center justify-center p-8 text-center text-muted-foreground`,children:a(`activity:skillDetail.noContent`)})}),(0,g.jsx)(ve,{open:!!G,onOpenChange:e=>{e||K(null)},children:(0,g.jsxs)(ge,{className:`flex max-h-[calc(100dvh-2rem)] w-[380px] max-w-[90vw] flex-col gap-0 overflow-hidden p-0`,showCloseButton:!1,children:[(0,g.jsxs)(he,{className:`flex shrink-0 items-center justify-between border-b border-border/70 p-4 sm:flex-row sm:justify-between sm:space-y-0`,children:[(0,g.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,g.jsx)(n,{className:`h-4 w-4 text-destructive`}),(0,g.jsx)(_e,{className:`font-semibold text-sm`,children:a(`activity:skillDetail.uninstallSkillHeading`)})]}),(0,g.jsx)(`button`,{type:`button`,onClick:()=>K(null),"aria-label":a(`common:action.close`),className:`rounded p-1 text-muted-foreground hover:bg-accent hover:text-accent-foreground`,children:(0,g.jsx)(se,{className:`h-4 w-4`})})]}),(0,g.jsxs)(`div`,{className:`min-h-0 flex-1 space-y-2 overflow-y-auto overscroll-contain p-4`,children:[(0,g.jsx)(`p`,{className:`text-sm`,children:G&&a(`activity:skillDetail.uninstallConfirm`,{name:G.name})}),(0,g.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:G&&a(`activity:skillDetail.uninstallRemovePath`,{path:G.path})})]}),(0,g.jsxs)(`div`,{className:`flex shrink-0 justify-end gap-2 border-t border-border/70 bg-muted/20 p-4`,children:[(0,g.jsx)(`button`,{type:`button`,onClick:()=>K(null),disabled:q,className:`rounded-md border border-border/70 px-3 py-1.5 text-xs transition-colors hover:bg-accent disabled:opacity-50`,children:a(`common:action.cancel`)}),(0,g.jsxs)(`button`,{type:`button`,onClick:()=>G&&He(G),disabled:q,className:`flex items-center gap-1.5 rounded-md bg-destructive px-3 py-1.5 text-xs text-destructive-foreground transition-colors hover:bg-destructive/90 disabled:cursor-not-allowed disabled:opacity-50`,children:[q&&(0,g.jsx)(i,{className:`h-3 w-3 animate-spin`}),a(`activity:skillDetail.uninstallAction`)]})]})]})})]}):(0,g.jsx)(be,{icon:(0,g.jsx)(re,{className:`h-6 w-6`}),title:a(`activity:skillDetail.noSkillSelected`),description:a(`activity:skillDetail.selectSkillHint`),action:{label:a(`activity:skillDetail.goToChat`),onClick:$},className:e})}export{y as SkillDetailView};
@@ -1 +0,0 @@
1
- import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{Bt as t,En as n,It as r,Ji as i,Kn as a,Mn as o,N as s,Sa as c,Sr as l,Tr as u,Tt as d,Zr as f,Zt as p,an as m,at as ee,cn as h,et as g,fa as _,hi as v,it as te,li as y,ni as ne,pi as b,qi as x,sa as S}from"./vendor-2VBBgNb5.js";import{t as C}from"./utils-CN2sfDVP.js";import{n as w}from"./stores-mpa0202y.js";import{t as T}from"./button-uGqXvobk.js";import{t as re}from"./input-B-VCX2sG.js";import{f as E,p as D}from"./index-BPfIz78e.js";var O=e(c(),1),k=g(),ie={current:{label:`Current`,badge:`border-success/35 bg-success/10 text-success`,dot:`bg-success`,weight:0},update_available_safe:{label:`Update available`,badge:`border-info/35 bg-info/10 text-info`,dot:`bg-info`,weight:30},update_available_breaking:{label:`Major update`,badge:`border-warning/35 bg-warning/10 text-warning`,dot:`bg-warning`,weight:50},vulnerable:{label:`Vulnerable`,badge:`border-destructive/45 bg-destructive/15 text-destructive`,dot:`bg-destructive`,weight:100},deprecated:{label:`Deprecated`,badge:`border-destructive/35 bg-destructive/10 text-destructive`,dot:`bg-destructive`,weight:70},yanked:{label:`Yanked`,badge:`border-destructive/45 bg-destructive/15 text-destructive`,dot:`bg-destructive`,weight:80},unmaintained_suspected:{label:`Unmaintained?`,badge:`border-warning/35 bg-warning/10 text-warning`,dot:`bg-warning`,weight:60},blocked_by_constraints:{label:`Blocked`,badge:`border-warning/30 bg-warning/5 text-warning`,dot:`bg-warning`,weight:40},private_or_unresolved:{label:`Private`,badge:`border-border/70 bg-muted text-muted-foreground`,dot:`bg-muted-foreground`,weight:10},local_path:{label:`Local path`,badge:`border-border/70 bg-muted text-muted-foreground`,dot:`bg-muted-foreground`,weight:5},git_dependency:{label:`Git`,badge:`border-border/70 bg-muted text-muted-foreground`,dot:`bg-muted-foreground`,weight:5},unsupported:{label:`Unsupported`,badge:`border-border/70 bg-muted text-muted-foreground`,dot:`bg-muted-foreground`,weight:5},unknown:{label:`Unknown`,badge:`border-border/70 bg-muted text-muted-foreground`,dot:`bg-muted-foreground`,weight:20}},ae={label:`Unknown`,badge:`border-border/70 bg-muted text-muted-foreground`,dot:`bg-muted-foreground`,weight:0};function A(e){return ie[e]??ae}var j={npm:{label:`npm / Node.js`,icon:n},python:{label:`Python`,icon:b},rust:{label:`Rust`,icon:t},go:{label:`Go`,icon:m},dotnet:{label:`.NET`,icon:o},php:{label:`PHP`,icon:d},dart:{label:`Dart / Flutter`,icon:y},maven:{label:`Maven`,icon:_},gradle:{label:`Gradle`,icon:i},ruby:{label:`Ruby`,icon:l},swift:{label:`Swift`,icon:te},elixir:{label:`Elixir`,icon:d},cpp:{label:`C / C++`,icon:v}},M={label:`Unknown`};function N(e){return j[e]??M}function P({ecosystem:e,className:t=`size-3.5 shrink-0`}){let n=N(e);if(!n.icon)return null;let r=n.icon;return(0,k.jsx)(r,{className:t})}function oe(e){return A(e.status).weight>=50}var F=[`critical`,`high`,`medium`,`low`,`info`],I={critical:{label:`Critical`,badge:`border-destructive/45 bg-destructive/15 text-destructive`},high:{label:`High`,badge:`border-destructive/35 bg-destructive/10 text-destructive`},medium:{label:`Medium`,badge:`border-warning/35 bg-warning/10 text-warning`},low:{label:`Low`,badge:`border-info/35 bg-info/10 text-info`},info:{label:`Info`,badge:`border-border/70 bg-muted text-muted-foreground`}},L={none:`No action`,upgrade_patch:`Patch upgrade`,upgrade_minor:`Minor upgrade`,upgrade_major:`Major upgrade`,replace:`Replace`,remove:`Remove`,investigate:`Investigate`},R={full:{label:`Full`,badge:`border-success/35 bg-success/10 text-success`,note:void 0},partial:{label:`Partial`,badge:`border-warning/35 bg-warning/10 text-warning`,note:`limited`},unsupported:{label:`Unsupported`,badge:`border-border/70 bg-muted text-muted-foreground`,note:`best-effort`}};function z(e){return R[e]??R.unsupported}function B(e){if(!e)return null;let t=/^\D*(\d+)/.exec(e);if(!t?.[1])return null;let n=Number(t[1]);return Number.isFinite(n)?n:null}function V(e){let t=B(e.locked??e.installed??e.requested),n=B(e.latestStable);if(t===null||n===null||n<=t)return{majorsBehind:0,label:null};let r=n-t;return{majorsBehind:r,label:`${r} major${r===1?``:`s`} behind`}}function H(e){return e.locked??e.installed??e.requested??null}function U(e){return e.confidence<1}function W({className:e,children:t}){return(0,k.jsx)(`span`,{className:C(`inline-flex shrink-0 items-center gap-1 border px-1.5 py-0.5 text-[10px] font-medium`,e),children:t})}function G({label:e,value:t,hint:n,tone:r=`default`}){let i={default:`text-foreground`,success:`text-success`,warning:`text-warning`,info:`text-info`,destructive:`text-destructive`}[r];return(0,k.jsxs)(`div`,{className:`border border-border/70 bg-card/55 px-3 py-2.5 shadow-[inset_0_1px_0_hsl(var(--foreground)/0.035)]`,children:[(0,k.jsx)(`p`,{className:`text-[9px] font-bold uppercase tracking-[0.16em] text-muted-foreground`,children:e}),(0,k.jsxs)(`div`,{className:`mt-1 flex items-end justify-between gap-2`,children:[(0,k.jsx)(`p`,{className:C(`font-mono text-xl font-bold tabular-nums`,i),children:t}),(0,k.jsx)(`p`,{className:`truncate text-[9px] text-muted-foreground`,children:n})]})]})}function se({dependency:e,findings:t,deepDive:n,onDeepDive:i,onBack:o,coverage:s}){let c=A(e.status),l=H(e),u=V(e),d=s?z(s).note:void 0;return(0,k.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col`,children:[(0,k.jsxs)(`header`,{className:`shrink-0 border-b border-border/70 bg-card/45 p-3`,children:[(0,k.jsxs)(`div`,{className:`flex items-start gap-2`,children:[(0,k.jsx)(T,{variant:`ghost`,size:`icon`,onClick:o,"aria-label":`Back to dependency list`,className:`shrink-0 md:hidden`,children:(0,k.jsx)(S,{className:`size-4`})}),(0,k.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,k.jsxs)(`div`,{className:`flex flex-wrap items-center gap-1.5`,children:[(0,k.jsx)(`h2`,{className:`min-w-0 truncate font-mono text-sm font-bold text-foreground`,children:e.name}),(0,k.jsx)(W,{className:c.badge,children:c.label})]}),(0,k.jsxs)(`p`,{className:`mt-0.5 truncate text-[10px] text-muted-foreground`,children:[N(e.ecosystem).label,` ·`,` `,e.direct?`direct`:`transitive`,` · `,e.scope,` ·`,` `,e.sourceType,d&&(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)(`span`,{"aria-hidden":`true`,children:` · `}),(0,k.jsx)(`span`,{className:`text-warning`,children:d})]})]})]})]}),(0,k.jsxs)(`div`,{className:`mt-2 flex flex-wrap items-baseline gap-2 font-mono text-xs`,children:[(0,k.jsx)(`span`,{className:`text-foreground`,children:l??`—`}),e.latestStable&&e.latestStable!==l&&(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)(`span`,{className:`text-muted-foreground`,children:`→`}),(0,k.jsx)(`span`,{className:`text-info`,children:e.latestStable})]}),u.label&&(0,k.jsxs)(`span`,{className:`text-[10px] text-warning`,children:[`(`,u.label,`)`]})]})]}),(0,k.jsxs)(`div`,{className:`min-h-0 flex-1 overflow-auto p-3`,children:[(0,k.jsxs)(`dl`,{className:`grid grid-cols-2 gap-px border border-border/70 bg-border/60`,children:[(0,k.jsx)(K,{label:`Constraint`,value:e.requested??`—`,mono:!0}),(0,k.jsx)(K,{label:`Locked`,value:e.locked??`—`,mono:!0}),(0,k.jsx)(K,{label:`Latest stable`,value:e.latestStable??`—`,mono:!0}),(0,k.jsx)(K,{label:`License`,value:e.license??`—`}),e.wanted&&(0,k.jsx)(K,{label:`Wanted`,value:e.wanted,mono:!0}),e.resolvable&&(0,k.jsx)(K,{label:`Resolvable`,value:e.resolvable,mono:!0}),e.purl&&(0,k.jsx)(K,{label:`PURL`,value:e.purl,mono:!0}),(0,k.jsx)(K,{label:`Registry flags`,value:[e.deprecated&&`deprecated`,e.yanked&&`yanked`].filter(Boolean).join(`, `)||`none`})]}),(0,k.jsxs)(`section`,{className:`mt-4`,children:[(0,k.jsxs)(`div`,{className:`mb-1.5 flex flex-wrap items-center justify-between gap-2`,children:[(0,k.jsx)(`h3`,{className:`text-[9px] font-bold uppercase tracking-[0.16em] text-muted-foreground`,children:`Findings`}),(0,k.jsxs)(T,{variant:`outline`,size:`sm`,onClick:()=>i(e),disabled:n.status===`loading`,className:`h-7 text-[10px]`,children:[n.status===`loading`?(0,k.jsx)(a,{className:`size-3 animate-spin`}):(0,k.jsx)(r,{className:`size-3`}),n.status===`loading`?`Researching…`:`Deep dive`]})]}),n.status===`error`&&n.error&&(0,k.jsx)(`p`,{role:`alert`,className:`mb-1.5 text-[10px] text-destructive`,children:n.error}),t.length===0?(0,k.jsx)(`p`,{className:`text-[11px] text-muted-foreground`,children:`Nothing flagged. Run a deep dive to have the model research this package against the web.`}):(0,k.jsx)(`div`,{className:`flex flex-col gap-1.5`,children:t.map(e=>(0,k.jsxs)(`div`,{className:`border border-border/70 bg-card/40 p-2`,children:[(0,k.jsxs)(`div`,{className:`flex flex-wrap items-center gap-1.5`,children:[(0,k.jsx)(W,{className:I[e.severity].badge,children:I[e.severity].label}),(0,k.jsx)(W,{className:`border-border/70 bg-muted text-muted-foreground`,children:L[e.action]??e.action}),U(e)&&(0,k.jsxs)(W,{className:`border-info/35 bg-info/10 text-info`,children:[(0,k.jsx)(r,{className:`size-2.5`}),`AI · `,Math.round(e.confidence*100),`%`]})]}),(0,k.jsx)(`p`,{className:`mt-1 text-[11px] leading-relaxed text-muted-foreground`,children:e.rationale}),e.breakingRisk&&(0,k.jsx)(`p`,{className:`mt-1 border-l-2 border-warning/40 pl-2 text-[10px] leading-relaxed text-warning`,children:e.breakingRisk})]},e.id))})]}),(0,k.jsxs)(`section`,{className:`mt-4`,children:[(0,k.jsx)(`h3`,{className:`mb-1.5 text-[9px] font-bold uppercase tracking-[0.16em] text-muted-foreground`,children:`Evidence`}),e.evidence.length===0?(0,k.jsx)(`p`,{className:`text-[11px] text-muted-foreground`,children:`No evidence recorded.`}):(0,k.jsx)(`ul`,{className:`flex flex-col gap-1`,children:e.evidence.map((t,n)=>(0,k.jsxs)(`li`,{className:`border border-border/70 bg-card/40 p-2`,children:[(0,k.jsxs)(`div`,{className:`flex flex-wrap items-center gap-1.5`,children:[(0,k.jsx)(W,{className:`border-border/70 bg-muted text-muted-foreground`,children:t.kind}),(0,k.jsx)(`span`,{className:`font-mono text-[9px] text-muted-foreground`,children:new Date(t.retrievedAt).toLocaleString()})]}),t.source.startsWith(`http`)?(0,k.jsxs)(`a`,{href:t.source,target:`_blank`,rel:`noreferrer noopener`,className:`mt-1 flex min-w-0 items-center gap-1 truncate text-[10px] text-info underline-offset-2 hover:underline`,children:[(0,k.jsx)(`span`,{className:`truncate`,children:t.source}),(0,k.jsx)(f,{className:`size-2.5 shrink-0`})]}):(0,k.jsx)(`p`,{className:`mt-1 truncate font-mono text-[10px] text-muted-foreground`,children:t.source}),t.detail&&(0,k.jsx)(`p`,{className:`mt-0.5 text-[10px] leading-relaxed text-muted-foreground`,children:t.detail})]},`${e.id}-evidence-${n}`))})]})]})]})}function K({label:e,value:t,mono:n}){return(0,k.jsxs)(`div`,{className:`bg-card/55 px-2.5 py-1.5`,children:[(0,k.jsx)(`dt`,{className:`text-[9px] font-bold uppercase tracking-[0.14em] text-muted-foreground`,children:e}),(0,k.jsx)(`dd`,{className:C(`mt-0.5 truncate text-[11px] text-foreground`,n&&`font-mono`),children:t})]})}var q=`grid grid-cols-[minmax(0,2.2fr)_minmax(0,1.6fr)_minmax(0,1.1fr)] gap-2`;function ce({dependencies:e,selectedId:t,hasDependencies:n,coverageByWorkspaceId:r,onSelect:i}){let a=D(e,30);return e.length===0?(0,k.jsx)(`div`,{className:`flex flex-1 items-center justify-center p-8 text-center`,children:(0,k.jsx)(`p`,{className:`max-w-xs text-xs text-muted-foreground`,children:n?`No dependencies match the current filters.`:`No dependencies inventoried yet. Run a scan to populate the inventory.`})}):(0,k.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col`,children:[(0,k.jsxs)(`div`,{className:C(q,`shrink-0 border-b border-border/70 bg-card/45 px-3 py-1.5 text-[9px] font-bold uppercase tracking-[0.14em] text-muted-foreground`),children:[(0,k.jsx)(`span`,{children:`Package`}),(0,k.jsx)(`span`,{children:`Installed → Latest`}),(0,k.jsx)(`span`,{children:`Status`})]}),(0,k.jsx)(`div`,{className:`min-h-0 flex-1`,children:(0,k.jsx)(s,{className:`h-full`,"aria-label":`Dependencies`,children:a.pageItems.map(e=>(0,k.jsx)(J,{dependency:e,selected:e.id===t,coverage:r?.get(e.workspaceId),onSelect:i},e.id))})}),(0,k.jsx)(E,{page:a.page,pageSize:a.pageSize,totalItems:a.totalItems,onPageChange:a.setPage,itemLabel:`dependencies`})]})}function J({dependency:e,selected:t,coverage:n,onSelect:r}){let i=A(e.status),a=H(e),o=V(e),s=n?z(n).note:void 0;return(0,k.jsxs)(`button`,{type:`button`,onClick:()=>r(e),"aria-current":t,className:C(q,`w-full items-center border-b border-border/40 px-3 py-2 text-left transition-colors hover:bg-accent/40`,t&&`bg-accent/60`),children:[(0,k.jsxs)(`div`,{className:`min-w-0`,children:[(0,k.jsxs)(`div`,{className:`flex min-w-0 items-center gap-1.5`,children:[(0,k.jsx)(`span`,{className:C(`size-1.5 shrink-0`,i.dot),"aria-hidden":`true`}),(0,k.jsx)(`span`,{className:`truncate font-mono text-xs text-foreground`,children:e.name})]}),(0,k.jsxs)(`p`,{className:`mt-0.5 truncate text-[10px] text-muted-foreground`,children:[(0,k.jsx)(P,{ecosystem:e.ecosystem,className:`mr-0.5 inline-block size-3 align-text-bottom`}),N(e.ecosystem).label,` · `,e.direct?`direct`:`transitive`,` · `,e.scope,s&&(0,k.jsxs)(k.Fragment,{children:[` · `,(0,k.jsx)(`span`,{className:`text-warning`,children:s})]})]})]}),(0,k.jsxs)(`div`,{className:`min-w-0`,children:[(0,k.jsxs)(`div`,{className:`flex min-w-0 items-baseline gap-1.5 font-mono text-[11px]`,children:[(0,k.jsx)(`span`,{className:`truncate text-foreground`,children:a??`—`}),e.latestStable&&e.latestStable!==a&&(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)(`span`,{className:`shrink-0 text-muted-foreground`,children:`→`}),(0,k.jsx)(`span`,{className:`truncate text-info`,children:e.latestStable})]})]}),o.label?(0,k.jsx)(`p`,{className:`mt-0.5 truncate text-[10px] text-warning`,children:o.label}):e.requested&&(0,k.jsx)(`p`,{className:`mt-0.5 truncate font-mono text-[10px] text-muted-foreground`,children:e.requested})]}),(0,k.jsxs)(`div`,{className:`flex min-w-0 flex-wrap items-center gap-1`,children:[(0,k.jsx)(W,{className:i.badge,children:i.label}),e.deprecated&&(0,k.jsx)(W,{className:`border-destructive/35 bg-destructive/10 text-destructive`,children:`dep`}),e.yanked&&(0,k.jsx)(W,{className:`border-destructive/45 bg-destructive/15 text-destructive`,children:`yank`})]})]})}function le({findings:e,dependenciesById:t,onSelectDependency:n}){let r=D(e,20);return e.length===0?(0,k.jsx)(`div`,{className:`flex flex-1 items-center justify-center p-8 text-center`,children:(0,k.jsxs)(`p`,{className:`max-w-sm text-xs text-muted-foreground`,children:[`No findings. Run `,(0,k.jsx)(`span`,{className:`font-mono text-foreground`,children:`Analyze`}),` to check versions and advisories against upstream registries, then interpret the results.`]})}):(0,k.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col`,children:[(0,k.jsx)(`div`,{className:`min-h-0 flex-1 overflow-auto p-3`,children:(0,k.jsx)(`div`,{className:`flex flex-col gap-4`,children:F.map(e=>[e,r.pageItems.filter(t=>t.severity===e)]).filter(([,e])=>e.length>0).map(([e,r])=>(0,k.jsxs)(`section`,{children:[(0,k.jsxs)(`div`,{className:`mb-1.5 flex items-center gap-2`,children:[(0,k.jsx)(W,{className:I[e].badge,children:I[e].label}),(0,k.jsx)(`span`,{className:`font-mono text-[10px] tabular-nums text-muted-foreground`,children:r.length})]}),(0,k.jsx)(`div`,{className:`flex flex-col gap-1.5`,children:r.map(e=>(0,k.jsx)(Y,{finding:e,dependency:t.get(e.dependencyId),onSelectDependency:n},e.id))})]},e))})}),(0,k.jsx)(E,{page:r.page,pageSize:r.pageSize,totalItems:r.totalItems,onPageChange:r.setPage,itemLabel:`findings`})]})}function Y({finding:e,dependency:t,onSelectDependency:n}){let i=U(e);return(0,k.jsxs)(`div`,{className:`border border-border/70 bg-card/40 p-2.5`,children:[(0,k.jsxs)(`div`,{className:`flex flex-wrap items-center gap-1.5`,children:[(0,k.jsx)(`button`,{type:`button`,onClick:()=>n(e.dependencyId),className:`min-w-0 truncate font-mono text-xs text-foreground underline-offset-2 hover:underline`,children:t?.name??e.dependencyId}),(0,k.jsx)(W,{className:`border-border/70 bg-muted text-muted-foreground`,children:L[e.action]??e.action}),i&&(0,k.jsxs)(W,{className:`border-info/35 bg-info/10 text-info`,children:[(0,k.jsx)(r,{className:`size-2.5`}),`AI · `,Math.round(e.confidence*100),`%`]})]}),(0,k.jsx)(`p`,{className:`mt-1.5 text-[11px] leading-relaxed text-muted-foreground`,children:e.rationale}),e.breakingRisk&&(0,k.jsx)(`p`,{className:`mt-1 border-l-2 border-warning/40 pl-2 text-[10px] leading-relaxed text-warning`,children:e.breakingRisk}),e.evidence.length>0&&(0,k.jsx)(`ul`,{className:C(`mt-1.5 flex flex-col gap-0.5`),children:e.evidence.slice(0,4).map((t,n)=>(0,k.jsx)(`li`,{className:`min-w-0 truncate text-[10px]`,children:t.source.startsWith(`http`)?(0,k.jsx)(`a`,{href:t.source,target:`_blank`,rel:`noreferrer noopener`,className:`text-info underline-offset-2 hover:underline`,children:t.detail??t.source}):(0,k.jsx)(`span`,{className:`text-muted-foreground`,children:t.detail??t.source})},`${e.id}-${n}`))})]})}function ue({searchQuery:e,ecosystemFilter:t,statusFilter:n,directOnly:r,sort:i,hasFilters:a,ecosystems:o,statuses:s,visibleCount:c,totalCount:l,onSearchChange:d,onEcosystemFilterChange:f,onStatusFilterChange:m,onToggleDirectOnly:h,onSortChange:g,onClearFilters:_}){return(0,k.jsxs)(`div`,{className:`shrink-0 space-y-2 border-b border-border/70 bg-card/45 p-3`,children:[(0,k.jsxs)(`div`,{className:`flex gap-2`,children:[(0,k.jsxs)(`div`,{className:`relative min-w-0 flex-1`,children:[(0,k.jsx)(p,{className:`pointer-events-none absolute left-3 top-1/2 size-3.5 -translate-y-1/2 text-muted-foreground`}),(0,k.jsx)(re,{"aria-label":`Search dependencies`,value:e,onChange:e=>d(e.target.value),placeholder:`Search by package name…`,className:`h-10 min-w-0 bg-background pl-9 pr-8 text-xs`}),e&&(0,k.jsx)(`button`,{type:`button`,"aria-label":`Clear search`,onClick:()=>d(``),className:`absolute right-2 top-1/2 -translate-y-1/2 p-1 text-muted-foreground hover:text-foreground`,children:(0,k.jsx)(ee,{className:`size-3.5`})})]}),(0,k.jsx)(T,{variant:r?`default`:`outline`,size:`sm`,onClick:h,"aria-pressed":r,title:`Show only dependencies this project declares itself`,className:`shrink-0`,children:`Direct only`}),a&&(0,k.jsx)(T,{variant:`ghost`,size:`icon`,onClick:_,"aria-label":`Clear all filters`,title:`Clear all filters`,className:`shrink-0`,children:(0,k.jsx)(u,{className:`size-4`})})]}),(0,k.jsxs)(`div`,{className:`grid gap-2 sm:grid-cols-3`,children:[(0,k.jsxs)(`div`,{children:[(0,k.jsx)(`label`,{className:`sr-only`,htmlFor:`techstack-ecosystem-filter`,children:`Filter by ecosystem`}),(0,k.jsxs)(`select`,{id:`techstack-ecosystem-filter`,value:t,onChange:e=>f(e.target.value),className:`h-9 w-full min-w-0 border border-input bg-background px-2 text-xs`,children:[(0,k.jsx)(`option`,{value:`all`,children:`All ecosystems`}),o.map(([e,t])=>(0,k.jsxs)(`option`,{value:e,children:[N(e).label,` · `,t]},e))]})]}),(0,k.jsxs)(`div`,{children:[(0,k.jsx)(`label`,{className:`sr-only`,htmlFor:`techstack-status-filter`,children:`Filter by status`}),(0,k.jsxs)(`select`,{id:`techstack-status-filter`,value:n,onChange:e=>m(e.target.value),className:`h-9 w-full min-w-0 border border-input bg-background px-2 text-xs`,children:[(0,k.jsx)(`option`,{value:`all`,children:`All statuses`}),s.map(([e,t])=>(0,k.jsxs)(`option`,{value:e,children:[A(e).label,` · `,t]},e))]})]}),(0,k.jsxs)(`div`,{children:[(0,k.jsx)(`label`,{className:`sr-only`,htmlFor:`techstack-sort`,children:`Sort dependencies`}),(0,k.jsxs)(`select`,{id:`techstack-sort`,value:i,onChange:e=>g(e.target.value),className:`h-9 w-full min-w-0 border border-input bg-background px-2 text-xs`,children:[(0,k.jsx)(`option`,{value:`attention`,children:`Sort: needs attention`}),(0,k.jsx)(`option`,{value:`drift`,children:`Sort: most out of date`}),(0,k.jsx)(`option`,{value:`name`,children:`Sort: name`})]})]})]}),(0,k.jsx)(`p`,{className:C(`text-[10px] text-muted-foreground`,a&&`text-info`),children:c===l?`${l} dependencies`:`${c} of ${l} dependencies`})]})}var de=[{id:`dependencies`,label:`Dependencies`},{id:`findings`,label:`Findings`},{id:`workspaces`,label:`Workspaces`},{id:`trends`,label:`Trends`},{id:`remediation`,label:`Remediation`}],X=new Set([`npm`,`python`,`rust`,`go`,`php`,`dotnet`]);function fe(){let e=w(e=>e.snapshot),t=w(e=>e.stale),n=w(e=>e.loading),i=w(e=>e.error),o=w(e=>e.activeJob),[s,c]=(0,O.useState)(`dependencies`),[l,u]=(0,O.useState)(``),[d,f]=(0,O.useState)(`all`),[p,m]=(0,O.useState)(`all`),[g,_]=(0,O.useState)(!1),[v,te]=(0,O.useState)(`attention`),[y,b]=(0,O.useState)(null),[x,S]=(0,O.useState)([]),[re,E]=(0,O.useState)({status:`idle`,error:null}),[D,ie]=(0,O.useState)(null),[ae,j]=(0,O.useState)(null),[M,N]=(0,O.useState)(new Set),[P,F]=(0,O.useState)(!1),I=(0,O.useCallback)(async()=>{let e=w.getState();e.setLoading(!0),e.setError(null);try{let t=await fetch(`/api/techstack/snapshot`);if(t.status===404){e.setSnapshot(null,!1);return}if(!t.ok)throw Error(`HTTP ${t.status}: ${t.statusText}`);let n=await t.json();e.setSnapshot(n.snapshot,n.stale)}catch(t){e.setError(t instanceof Error?t.message:String(t))}},[]),L=(0,O.useCallback)(async e=>{let t=w.getState();t.setLoading(!0),t.setError(null);try{let n=await fetch(`/api/techstack/${e}`,{method:`POST`}),r=await n.json();if(!n.ok||!r.jobId)throw Error(r.error??`HTTP ${n.status}: ${n.statusText}`);t.jobStarted(r.jobId,e)}catch(e){t.setError(e instanceof Error?e.message:String(e))}},[]),R=(0,O.useCallback)(async()=>{let e=w.getState().activeJob;if(e)try{let t=await fetch(`/api/techstack/jobs/${encodeURIComponent(e.id)}/cancel`,{method:`POST`});if(!t.ok)throw Error(`HTTP ${t.status}: ${t.statusText}`);w.getState().jobCancelled(e.id)}catch(e){w.getState().setError(e instanceof Error?e.message:String(e))}},[]),z=(0,O.useCallback)(async e=>{E({status:`loading`,error:null});try{let t=await fetch(`/api/techstack/deps/${encodeURIComponent(e.id)}/research`,{method:`POST`}),n=await t.json();if(!t.ok)throw Error(n.error??`HTTP ${t.status}`);S(n.findings??[]),E({status:`idle`,error:null})}catch(e){E({status:`error`,error:e instanceof Error?e.message:String(e)})}},[]);(0,O.useEffect)(()=>{I()},[I]),(0,O.useEffect)(()=>{s!==`trends`&&s!==`remediation`||fetch(`/api/techstack/${s===`trends`?`trends`:`remediation`}`).then(async e=>{let t=await e.json();if(!e.ok)throw Error(t.error??`HTTP ${e.status}`);t.trend&&ie(t.trend),t.plan&&j(t.plan)}).catch(e=>w.getState().setError(e instanceof Error?e.message:String(e)))},[s,e?.id]);let B=(0,O.useCallback)(async()=>{if(M.size!==0){F(!0);try{let e=await fetch(`/api/techstack/remediation/apply`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({approvedItems:[...M]})}),t=await e.json();if(!e.ok)throw Error(t.error??`HTTP ${e.status}`);N(new Set),await L(`inventory`)}catch(e){w.getState().setError(e instanceof Error?e.message:String(e))}finally{F(!1)}}},[M,L]);(0,O.useEffect)(()=>{S([]),E({status:`idle`,error:null})},[e?.id]);let H=(0,O.useMemo)(()=>e?.dependencies??[],[e]),U=(0,O.useMemo)(()=>e?.findings??[],[e]),W=(0,O.useMemo)(()=>new Map(H.map(e=>[e.id,e])),[H]),K=(0,O.useMemo)(()=>Q(H.map(e=>e.ecosystem)),[H]),q=(0,O.useMemo)(()=>Q(H.map(e=>e.status)),[H]),J=(0,O.useMemo)(()=>new Map(e?.workspaces.map(e=>[e.id,e.coverage])??[]),[e]),Y=(0,O.useMemo)(()=>{let e=l.trim().toLowerCase(),t=[...H.filter(t=>!(e&&!t.name.toLowerCase().includes(e)||d!==`all`&&t.ecosystem!==d||p!==`all`&&t.status!==p||g&&!t.direct))];return v===`name`?t.sort((e,t)=>e.name.localeCompare(t.name)):v===`drift`?t.sort((e,t)=>V(t).majorsBehind-V(e).majorsBehind||e.name.localeCompare(t.name)):t.sort((e,t)=>A(t.status).weight-A(e.status).weight||Number(t.direct)-Number(e.direct)||e.name.localeCompare(t.name)),t},[H,l,d,p,g,v]),X=y?W.get(y):void 0,fe=(0,O.useMemo)(()=>X?[...U.filter(e=>e.dependencyId===X.id),...x.filter(e=>e.dependencyId===X.id)]:[],[U,x,X]),ve=(0,O.useMemo)(()=>H.filter(oe).length,[H]),ye=(0,O.useMemo)(()=>H.filter(e=>V(e).majorsBehind>0).length,[H]),be=(0,O.useMemo)(()=>H.filter(e=>e.status===`vulnerable`).length,[H]),xe=l.trim()!==``||d!==`all`||p!==`all`||g,Se=(0,O.useCallback)(()=>{u(``),f(`all`),m(`all`),_(!1)},[]),$=!!(o&&![`completed`,`failed`,`cancelled`].includes(o.status)),Ce=(0,O.useCallback)(e=>{b(e),c(`dependencies`)},[]);return(0,k.jsxs)(`div`,{className:`flex h-full min-h-0 flex-col`,children:[(0,k.jsx)(`header`,{className:`shrink-0 border-b border-border/70 px-4 py-3`,children:(0,k.jsxs)(`div`,{className:`flex flex-wrap items-start gap-3`,children:[(0,k.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,k.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,k.jsx)(`h1`,{className:`text-base font-bold sm:text-lg`,children:`TechStack`}),(0,k.jsx)(`span`,{className:`border border-info/35 bg-info/10 px-2 py-0.5 font-mono text-[9px] font-bold uppercase text-info`,children:e?`${e.workspaces.length} workspaces`:`no scan yet`}),t&&(0,k.jsx)(`span`,{className:`border border-warning/35 bg-warning/10 px-2 py-0.5 font-mono text-[9px] font-bold uppercase text-warning`,children:`stale >24h`})]}),(0,k.jsx)(`p`,{className:`mt-0.5 truncate text-[10px] text-muted-foreground sm:text-xs`,children:e?`${e.targetRoot} · scanned ${new Date(e.createdAt).toLocaleString()}`:`Scan the open project to inventory its dependencies.`})]}),(0,k.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,k.jsxs)(T,{variant:`outline`,size:`sm`,onClick:()=>void L(`inventory`),disabled:$,title:`Offline: re-read manifests and lockfiles`,children:[(0,k.jsx)(h,{className:C(`size-3.5`,$&&`animate-spin`)}),(0,k.jsx)(`span`,{className:`hidden sm:inline`,children:`Refresh`})]}),(0,k.jsxs)(T,{size:`sm`,onClick:()=>void L(`analyze`),disabled:$,title:`Check registries and advisories, then interpret the results with the model`,children:[(0,k.jsx)(r,{className:`size-3.5`}),`Analyze`]}),$&&(0,k.jsx)(T,{variant:`ghost`,size:`icon`,onClick:()=>void R(),"aria-label":`Cancel job`,children:(0,k.jsx)(ee,{className:`size-4`})}),(0,k.jsx)(T,{variant:`ghost`,size:`icon`,onClick:()=>e&&_e(e),disabled:!e,"aria-label":`Export snapshot as JSON`,title:`Export snapshot as JSON`,children:(0,k.jsx)(ne,{className:`size-4`})})]})]})}),e&&(0,k.jsxs)(`div`,{className:`grid shrink-0 grid-cols-2 gap-px border-b border-border/70 bg-border/60 sm:grid-cols-4`,children:[(0,k.jsx)(G,{label:`Dependencies`,value:H.length,hint:`${Y.length} visible`}),(0,k.jsx)(G,{label:`Outdated`,value:ye,hint:`majors behind`,tone:ye>0?`warning`:`success`}),(0,k.jsx)(G,{label:`Vulnerable`,value:be,hint:`known advisories`,tone:be>0?`destructive`:`success`}),(0,k.jsx)(G,{label:`Findings`,value:U.length,hint:`${ve} need attention`,tone:U.length>0?`info`:`default`})]}),($||i)&&(0,k.jsxs)(`div`,{className:`shrink-0 border-b border-border/70 px-4 py-2`,"aria-live":`polite`,children:[$&&o&&(0,k.jsxs)(`div`,{role:`status`,className:`flex items-center gap-2 text-xs text-info`,children:[(0,k.jsx)(a,{className:`size-3.5 animate-spin`}),(0,k.jsx)(`span`,{className:`font-mono`,children:o.status}),o.progress&&(0,k.jsxs)(`span`,{className:`text-muted-foreground`,children:[o.progress.completed,`/`,o.progress.total]})]}),i&&(0,k.jsxs)(`div`,{role:`alert`,className:`flex items-center gap-2 text-xs text-destructive`,children:[(0,k.jsx)(`span`,{className:`min-w-0 flex-1 truncate`,children:i}),(0,k.jsx)(`button`,{type:`button`,onClick:()=>void I(),className:`underline`,children:`Retry`})]})]}),n&&!e?(0,k.jsx)(Z,{}):e?(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)(`nav`,{className:`flex shrink-0 gap-1 border-b border-border/70 px-2`,children:de.map(e=>(0,k.jsxs)(`button`,{type:`button`,onClick:()=>c(e.id),"aria-current":s===e.id,className:C(`border-b-2 px-3 py-2 text-xs font-medium transition-colors`,s===e.id?`border-primary text-foreground`:`border-transparent text-muted-foreground hover:text-foreground`),children:[e.label,e.id===`findings`&&U.length>0&&(0,k.jsx)(`span`,{className:`ml-1.5 font-mono text-[10px] tabular-nums text-muted-foreground`,children:U.length})]},e.id))}),s===`dependencies`&&(0,k.jsxs)(`div`,{className:`grid min-h-0 flex-1 md:grid-cols-[minmax(340px,1fr)_minmax(0,1.15fr)]`,children:[(0,k.jsxs)(`section`,{className:C(`min-h-0 border-r border-border/70`,X?`hidden md:flex md:flex-col`:`flex flex-col`),"aria-label":`Dependency list`,children:[(0,k.jsx)(ue,{searchQuery:l,ecosystemFilter:d,statusFilter:p,directOnly:g,sort:v,hasFilters:xe,ecosystems:K,statuses:q,visibleCount:Y.length,totalCount:H.length,onSearchChange:u,onEcosystemFilterChange:f,onStatusFilterChange:m,onToggleDirectOnly:()=>_(e=>!e),onSortChange:te,onClearFilters:Se}),(0,k.jsx)(ce,{dependencies:Y,selectedId:y,hasDependencies:H.length>0,coverageByWorkspaceId:J,onSelect:e=>b(e.id)})]}),(0,k.jsx)(`section`,{className:C(`min-h-0`,X?`flex flex-col`:`hidden md:flex md:flex-col`),"aria-label":`Dependency detail`,children:X?(0,k.jsx)(se,{dependency:X,findings:fe,deepDive:re,onDeepDive:z,onBack:()=>b(null),coverage:J.get(X.workspaceId)}):(0,k.jsx)(`div`,{className:`flex flex-1 items-center justify-center p-8 text-center`,children:(0,k.jsx)(`p`,{className:`max-w-xs text-xs text-muted-foreground`,children:`Select a dependency to see its versions, evidence, and findings.`})})})]}),s===`findings`&&(0,k.jsx)(le,{findings:U,dependenciesById:W,onSelectDependency:Ce}),s===`workspaces`&&(0,k.jsx)(he,{snapshot:e}),s===`trends`&&(0,k.jsx)(pe,{trend:D}),s===`remediation`&&(0,k.jsx)(me,{plan:ae,approved:M,applying:P,onToggle:e=>N(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n}),onApply:()=>void B()})]}):(0,k.jsx)(ge,{onScan:()=>void L(`inventory`),disabled:$})]})}function pe({trend:e}){return e?(0,k.jsxs)(`div`,{className:`min-h-0 flex-1 overflow-auto p-3`,children:[(0,k.jsxs)(`p`,{className:`mb-3 text-xs text-muted-foreground`,children:[e.snapshots,` snapshots`,e.vulnerabilityHalfLifeMs===void 0?``:` · vulnerability half-life ${(e.vulnerabilityHalfLifeMs/864e5).toFixed(1)} days`]}),(0,k.jsx)(`div`,{className:`flex flex-col gap-1.5`,children:e.points.map(e=>(0,k.jsxs)(`div`,{className:`grid grid-cols-4 border border-border/70 bg-card/40 p-2 text-xs`,children:[(0,k.jsx)(`span`,{children:new Date(e.createdAt).toLocaleDateString()}),(0,k.jsxs)(`span`,{children:[e.dependencies,` deps`]}),(0,k.jsxs)(`span`,{className:`text-warning`,children:[e.outdated,` outdated`]}),(0,k.jsxs)(`span`,{className:`text-destructive`,children:[e.vulnerable,` vulnerable`]})]},e.snapshotId))})]}):(0,k.jsx)(Z,{})}function me({plan:e,approved:t,applying:n,onToggle:r,onApply:i}){return e?(0,k.jsxs)(`div`,{className:`min-h-0 flex-1 overflow-auto p-3`,children:[(0,k.jsxs)(`div`,{className:`mb-3 flex items-center justify-between gap-3`,children:[(0,k.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:e.warning}),(0,k.jsxs)(T,{size:`sm`,disabled:t.size===0||n,onClick:i,children:[n&&(0,k.jsx)(a,{className:`size-3.5 animate-spin`}),`Apply `,t.size>0?t.size:``]})]}),(0,k.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[e.items.map(e=>{let n=`${e.workspaceId}:${e.ecosystem}:${e.dependencyName}:${e.action}`,i=e.action===`replace`||e.action===`investigate`||!X.has(e.ecosystem);return(0,k.jsxs)(`label`,{className:C(`flex gap-3 border border-border/70 bg-card/40 p-2.5`,i?`cursor-not-allowed opacity-65`:`cursor-pointer`),children:[(0,k.jsx)(`input`,{type:`checkbox`,disabled:i,checked:t.has(n),onChange:()=>r(n)}),(0,k.jsxs)(`span`,{className:`min-w-0 flex-1`,children:[(0,k.jsxs)(`span`,{className:`block font-mono text-xs`,children:[e.dependencyName,` · `,e.action]}),(0,k.jsxs)(`span`,{className:`block text-[10px] text-muted-foreground`,children:[e.currentVersion??`?`,` → `,e.targetVersion??`latest`,` · `,e.rationale]}),i&&(0,k.jsx)(`span`,{className:`block text-[10px] text-warning`,children:`Requires a manual package choice.`})]})]},n)}),e.items.length===0&&(0,k.jsx)(`p`,{className:`p-8 text-center text-xs text-muted-foreground`,children:`No remediation needed.`})]})]}):(0,k.jsx)(Z,{})}function he({snapshot:e}){let t=(0,O.useMemo)(()=>{let t=new Map;for(let n of e.dependencies)t.set(n.workspaceId,(t.get(n.workspaceId)??0)+1);return t},[e]);return e.workspaces.length===0?(0,k.jsx)(`div`,{className:`flex flex-1 items-center justify-center p-8`,children:(0,k.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`No workspaces detected.`})}):(0,k.jsx)(`div`,{className:`min-h-0 flex-1 overflow-auto p-3`,children:(0,k.jsx)(`div`,{className:`flex flex-col gap-1.5`,children:e.workspaces.map(e=>{let n=R[e.coverage];return(0,k.jsxs)(`div`,{className:`border border-border/70 bg-card/40 p-2.5`,children:[(0,k.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-2`,children:[(0,k.jsxs)(`div`,{className:`min-w-0`,children:[(0,k.jsx)(`p`,{className:`truncate font-mono text-xs text-foreground`,children:e.relativeRoot}),(0,k.jsxs)(`p`,{className:`mt-0.5 flex items-center gap-1 truncate text-[10px] text-muted-foreground`,children:[(0,k.jsx)(P,{ecosystem:e.ecosystem}),(0,k.jsx)(`span`,{children:N(e.ecosystem).label}),e.packageManager?(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)(`span`,{"aria-hidden":`true`,children:`·`}),(0,k.jsx)(`span`,{children:e.packageManager})]}):null,(0,k.jsx)(`span`,{"aria-hidden":`true`,children:`·`}),(0,k.jsxs)(`span`,{children:[t.get(e.id)??0,` deps`]})]})]}),(0,k.jsx)(`span`,{className:C(`shrink-0 border px-1.5 py-0.5 text-[10px] font-medium`,n.badge),children:n.label})]}),e.manifests.length>0&&(0,k.jsx)(`div`,{className:`mt-1.5 flex flex-wrap gap-1`,children:e.manifests.map(e=>(0,k.jsx)(`span`,{className:`border border-border/70 bg-background/45 px-1.5 py-0.5 font-mono text-[9px] text-muted-foreground`,children:e.split(/[/\\]/).pop()},e))})]},e.id)})})})}function Z(){return(0,k.jsx)(`div`,{className:`flex flex-1 items-center justify-center`,children:(0,k.jsxs)(`div`,{className:`flex flex-col items-center gap-2`,children:[(0,k.jsx)(a,{className:`size-5 animate-spin text-muted-foreground`}),(0,k.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:`Loading snapshot…`})]})})}function ge({onScan:e,disabled:t}){let n=(0,O.useMemo)(()=>Object.values(j).map(e=>e.label).join(`, `),[]);return(0,k.jsx)(`div`,{className:`flex flex-1 items-center justify-center p-8`,children:(0,k.jsxs)(`div`,{className:`flex max-w-md flex-col items-center gap-3 text-center`,children:[(0,k.jsx)(`div`,{className:`flex size-14 items-center justify-center border border-info/25 bg-info/5 text-info`,children:(0,k.jsx)(x,{className:`size-6`})}),(0,k.jsx)(`h2`,{className:`text-sm font-semibold`,children:`No inventory yet`}),(0,k.jsxs)(`p`,{className:`text-xs leading-relaxed text-muted-foreground`,children:[`TechStack reads every manifest and lockfile in the open project — `,n,` — and compares what you have against the upstream registries.`]}),(0,k.jsxs)(T,{size:`sm`,onClick:e,disabled:t,children:[(0,k.jsx)(h,{className:C(`size-3.5`,t&&`animate-spin`)}),`Scan this project`]})]})})}function Q(e){let t=new Map;for(let n of e)t.set(n,(t.get(n)??0)+1);return[...t.entries()].sort((e,t)=>t[1]-e[1]||e[0].localeCompare(t[0]))}function _e(e){let t=new Blob([JSON.stringify(e,null,2)],{type:`application/json`}),n=URL.createObjectURL(t),r=document.createElement(`a`);r.href=n,r.download=`techstack.json`,r.click(),URL.revokeObjectURL(n)}export{fe as TechStackView};
@@ -1,17 +0,0 @@
1
- import{ga as e,ha as t}from"./vendor-2VBBgNb5.js";import{n}from"./utils-CN2sfDVP.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){return e!==`tool_use`&&e!==`tool_call`}var a=/<nextsteps\b[^>]*>\s*\n+/i,o=/^(?:(\d+)[.)]\s*|[-*•]\s*)(.+?)(\s+auto="true")?$/,s=6;function c(e,t=!1,n=!0){return n?d(e,t):u(e)}function l(e,t,n,r){e.push(r?{index:t,text:n,auto:!0}:{index:t,text:n})}function u(e){let t=e.split(`
2
- `),n=[],r=new Set;for(let e of t){let t=e.trim();if(!t)continue;let i=o.exec(t);if(!i)continue;let a=i[1],c=i[2].trim(),u;if(u=a===void 0?n.length+1:Number.parseInt(a,10),r.has(u))continue;r.add(u);let d=!!i[3]&&n.length===0&&u===1;if(l(n,u,c,d),n.length>=s)break}return{steps:n,texts:n.map(e=>e.text),stripped:e,autoTexts:n.filter(e=>e.auto).map(e=>e.text)}}function d(e,t){let n=a.exec(e);if(!n)return{steps:[],texts:[],stripped:e,autoTexts:[]};let r=n.index+n[0].length,i=e.slice(r),c=i.split(`
3
- `),u=[],d=new Set;for(let e of c){let t=e.trim();if(!t)continue;let n=o.exec(t);if(!n)break;let r=n[1],i=n[2].trim(),a;if(a=r===void 0?u.length+1:Number.parseInt(r,10),d.has(a))continue;d.add(a);let c=!!n[3]&&u.length===0&&a===1;if(l(u,a,i,c),u.length>=s)break}if(u.length===0||!i.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+f(i,u.length);return{steps:u,texts:p,stripped:(e.slice(0,h)+e.slice(h+g)).replace(/\n{3,}/g,`
4
-
5
- `).trim(),autoTexts:m}}function f(e,t){let n=e.indexOf(`</nextsteps>`);if(n!==-1){let t=n+12;return e[t]===`
6
- `&&(t+=1),t}let r=e.split(`
7
- `),i=0,a=0;for(let e of r){let n=e.trim();if(!n||!o.exec(n))break;if(i+=e.length+1,a++,a>=t){--i;break}}return i}function p(e){return e.replace(/<next_?steps\b[^>]*>[\s\S]*?<\/next_?steps>/gi,``).replace(/<next_?steps\b[^>]*\/?>/gi,``).replace(/\n{3,}/g,`
8
-
9
- `).trim()}function m(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
- `),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
- `)}).join(`
12
-
13
- `)}var h=1e3,g=2*1024*1024;function _(e,t=g){if(e.length<=t)return e;if(t<=55){let n=Math.ceil(t/2);return e.slice(0,n)+e.slice(e.length-(t-n))}let n=t-55,r=Math.ceil(n/2);return e.slice(0,r)+`
14
-
15
- … [older streamed text omitted to protect memory] …
16
-
17
- `+e.slice(e.length-(n-r))}function v(e){if(e===void 0)return 0;try{return JSON.stringify(e).length*2}catch{return g*2}}function y(e,t){let n=_(e.content,t),r=e.toolResult===void 0?void 0:_(e.toolResult,t),i=e.thinkingLog?{...e.thinkingLog,text:_(e.thinkingLog.text,t)}:void 0,a=v(e.toolInput)>t*2?`[tool input omitted from live transcript to protect memory]`:e.toolInput;return n===e.content&&r===e.toolResult&&i?.text===e.thinkingLog?.text&&a===e.toolInput?e:{...e,content:n,...r===void 0?{}:{toolResult:r},...i?{thinkingLog:i}:{},...a===void 0?{}:{toolInput:a}}}function b(e){let t=384+e.content.length*2+(e.toolResult?.length??0)*2+(e.thinkingLog?.text.length??0)*2+v(e.toolInput);for(let n of e.attachments??[])t+=(n.dataUrl?.length??0)*2+192;for(let n of e.sageLines??[])t+=n.length*2;for(let n of e.progressLines??[])t+=n.length*2;return t}function x(e,t={}){let n=Math.max(1,Math.floor(t.maxMessages??h)),r=Math.max(1,Math.floor(t.maxBytes??50331648)),i=Math.max(1,Math.floor(t.maxFieldChars??2097152)),a=[],o=0;for(let t=e.length-1;t>=0&&a.length<n;--t){let n=y(e[t],i),s=b(n);if(s>r&&n.attachments?.some(e=>e.dataUrl)&&(n={...n,attachments:n.attachments.map(e=>({...e,dataUrl:void 0}))},s=b(n)),a.length>0&&o+s>r)break;a.push(n),o+=s}return a.reverse(),a}function S(e){let t=new Map;for(let n of e)n.role===`tool`&&n.toolUseId&&t.set(n.toolUseId,n.id);return t}var C=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=x([...e.messages,i]),a=S(n),o=e.executions;if(o.size>0){let e=new Map,t=!1;for(let[n,r]of o)a.has(n)?e.set(n,r):t=!0;t&&(o=e)}let s={messages:n,currentAssistantMessageId:t.role===`assistant`?r:e.currentAssistantMessageId,toolMessageIdsByUseId:a};if(i.role===`tool`&&i.toolUseId){let e=new Map(a);e.set(i.toolUseId,r),s.toolMessageIdsByUseId=e}return o!==e.executions&&(s.executions=o),s}),r},setMessages:t=>{let n=x(t);e({messages:n,currentAssistantMessageId:null,currentToolId:null,executions:new Map,toolMessageIdsByUseId:S(n),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,n)=>{let r=n?.final!==!1;e(e=>({messages:e.messages.map(e=>{if(e.id!==t)return e;if(e.role!==`assistant`)return{...e,content:m(e.content),streaming:!1};let n=c(e.content),i=r&&n.steps.length>0?{steps:n.steps}:void 0;return{...e,content:m(n.stripped),streaming:!1,...i?{nextSteps:i}:{}}})}))},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:S(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:S(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:2,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>2)return null;let n=e??{},r=Array.isArray(n.messages)?n.messages:[],i=Array.isArray(n.queue)?n.queue:[];return{messages:x(r),queue:i,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 a,p as i,i as n,c as r,C as t};
@@ -1 +0,0 @@
1
- import{ga as e}from"./vendor-2VBBgNb5.js";var t=e(e=>({generation:0,lastUpdatedAt:null,notifyIndexUpdated(t=Date.now()){e(e=>({generation:e.generation+1,lastUpdatedAt:t}))}}));export{t};
@@ -1 +0,0 @@
1
- var e={ok:`Tamam`,cancel:`İptal`,save:`Kaydet`,saved:`Kaydedildi`,close:`Kapat`,yes:`Evet`,no:`Hayır`,delete:`Sil`,remove:`Kaldır`,add:`Ekle`,edit:`Düzenle`,rename:`Yeniden adlandır`,retry:`Yeniden dene`,reset:`Sıfırla`,apply:`Uygula`,confirm:`Onayla`,back:`Geri`,next:`İleri`,done:`Bitti`,refresh:`Yenile`,copy:`Kopyala`,copied:`Kopyalandı`,copyFailed:`Kopyalanamadı — pano erişimi engellendi.`,open:`Aç`,start:`Başlat`,stop:`Durdur`,pause:`Duraklat`,resume:`Sürdür`,continue:`Devam et`,clear:`Temizle`,search:`Ara`,loading:`Yükleniyor…`,saving:`Kaydediliyor…`,searchPlaceholder:`Ara…`,always:`Her zaman`,deny:`Reddet`,undo:`Geri al`,all:`Tümü`},t={title:`Onay gerekli: {{tool}}`,descriptionEdit:`Vekil bir dosyayı değiştirmek istiyor. Aşağıdaki isteği inceleyin ve devam edip etmeyeceğinize karar verin.`,descriptionTool:`Vekil bu aracı çalıştırmak istiyor. Aşağıdaki isteği inceleyin ve devam edip etmeyeceğinize karar verin.`,fileModification:`Dosya değişikliği`,toolExecution:`Araç çalıştırma`,riskSuffix:`{{risk}} risk`,command:`Komut`,inputLabel:`Girdi:`,trustSuggestionTitle:`Güven kalıbı önerisi`,trustSuggestionHint:`Her Zaman'ı seçmek, bu proje için eşleşen çağrıları beyaz listeye alır.`,yoloDestructiveNote:`YOLO açık. Açık bir deny kuralı engellemediği sürece araç çağrıları otomatik onaylanır.`,skipApprovalsTitle:`Sonraki onayları atla`,skipApprovalsHint:`YOLO modunu etkinleştir; açık bir deny kuralı engellemediği sürece vekil izin istemeden çalışır.`,enableYoloTitle:`YOLO modunu etkinleştir (bu ve sonraki araç çağrılarını otomatik onayla)`,enableYoloBtn:`YOLO'yu etkinleştir`,denyAlways:`Her zaman reddet`,denyAlwaysTitle:`Bu ve kalıpla eşleşen tüm gelecek çağrıları reddet (d)`,noTitle:`Bu tek çağrıyı reddet (Esc / n)`,alwaysTitle:`Onayla ve kalıbı proje için hatırla (a)`,yesTitle:`Bu tek çağrıyı onayla (y)`},n={connected:`Bağlı`,disconnected:`Bağlı değil`,notConnectedRetry:`Sunucuya bağlı değil — bağlantı kurulunca tekrar deneyin.`,connecting:`Bağlanıyor…`,reconnecting:`Yeniden bağlanıyor…`,ready:`Hazır`,error:`Hata`,offline:`Çevrimdışı`,online:`Çevrimiçi`,live:`Canlı`,budgetWarning:`bütçe uyarısı`,running:`Çalışıyor`,inProgress:`Devam ediyor`,working:`çalışıyor`},r={justNow:`az önce`,secondsAgo_one:`{{count}} saniye önce`,secondsAgo_other:`{{count}} saniye önce`,minutesAgo_one:`{{count}} dakika önce`,minutesAgo_other:`{{count}} dakika önce`,hoursAgo_one:`{{count}} saat önce`,hoursAgo_other:`{{count}} saat önce`,daysAgo_one:`{{count}} gün önce`,daysAgo_other:`{{count}} gün önce`,compactSecondsAgo:`{{count}} sn önce`,compactMinutesAgo:`{{count}} dk önce`,compactHoursAgo:`{{count}} sa önce`},i={title:`Bir şeyler ters gitti`,body:`Bir oluşturma hatası oluştu. Oturumunuz sunucuda hâlâ etkin — yeniden yüklemek kaldığınız yerden devam eder.`,reload:`Sayfayı yeniden yükle`,tryAgain:`Tekrar dene`},a={noActivity:`Etkinlik yok`,noActivityYet:`Henüz etkinlik yok`,activityMax:`Etkinlik sparkline: en fazla {{count}} olay`,activityPeak:`Etkinlik sparkline — tepe {{count}} olay/kova`},o={action:e,confirm:t,status:n,time:r,error:i,sparkline:a};export{e as action,t as confirm,o as default,i as error,a as sparkline,n as status,r as time};
@@ -1 +0,0 @@
1
- import{n as e}from"./rolldown-runtime-QTnfLwEv.js";var t=e({action:()=>n,confirm:()=>r,default:()=>c,error:()=>o,sparkline:()=>s,status:()=>i,time:()=>a}),n={ok:`OK`,cancel:`Cancel`,save:`Save`,saved:`Saved`,close:`Close`,yes:`Yes`,no:`No`,delete:`Delete`,remove:`Remove`,add:`Add`,edit:`Edit`,rename:`Rename`,retry:`Retry`,reset:`Reset`,apply:`Apply`,confirm:`Confirm`,back:`Back`,next:`Next`,done:`Done`,refresh:`Refresh`,copy:`Copy`,copied:`Copied`,copyFailed:`Copy failed — clipboard access was blocked.`,open:`Open`,start:`Start`,stop:`Stop`,pause:`Pause`,resume:`Resume`,continue:`Continue`,clear:`Clear`,search:`Search`,loading:`Loading…`,saving:`Saving…`,searchPlaceholder:`Search…`,always:`Always`,deny:`Deny`,undo:`Undo`,all:`All`},r={title:`Approval required: {{tool}}`,descriptionEdit:`The agent wants to modify a file. Review the request below and decide whether to proceed.`,descriptionTool:`The agent wants to run this tool. Review the request below and decide whether to proceed.`,fileModification:`File modification`,toolExecution:`Tool execution`,riskSuffix:`{{risk}} risk`,command:`Command`,inputLabel:`Input:`,trustSuggestionTitle:`Trust pattern suggestion`,trustSuggestionHint:`Picking Always will whitelist matching calls for this project.`,yoloDestructiveNote:`YOLO is on. Tool calls are auto-approved unless an explicit deny rule blocks them.`,skipApprovalsTitle:`Skip future approvals`,skipApprovalsHint:`Enable YOLO mode and the agent runs without asking unless an explicit deny rule blocks a call.`,enableYoloTitle:`Enable YOLO mode (auto-approve this and future tool calls)`,enableYoloBtn:`Enable YOLO`,denyAlways:`Deny always`,denyAlwaysTitle:`Reject this and all future calls matching the pattern (d)`,noTitle:`Reject this single call (Esc / n)`,alwaysTitle:`Approve and remember the pattern for the project (a)`,yesTitle:`Approve this single call (y)`},i={connected:`Connected`,disconnected:`Disconnected`,notConnectedRetry:`Not connected to the server — try again once reconnected.`,connecting:`Connecting…`,reconnecting:`Reconnecting…`,ready:`Ready`,error:`Error`,offline:`Offline`,online:`Online`,live:`Live`,budgetWarning:`budget warning`,running:`Running`,inProgress:`In Progress`,working:`working`},a={justNow:`just now`,secondsAgo_one:`{{count}} second ago`,secondsAgo_other:`{{count}} seconds ago`,minutesAgo_one:`{{count}} minute ago`,minutesAgo_other:`{{count}} minutes ago`,hoursAgo_one:`{{count}} hour ago`,hoursAgo_other:`{{count}} hours ago`,daysAgo_one:`{{count}} day ago`,daysAgo_other:`{{count}} days ago`,compactSecondsAgo:`{{count}}s ago`,compactMinutesAgo:`{{count}}m ago`,compactHoursAgo:`{{count}}h ago`},o={title:`Something went wrong`,body:`A rendering error occurred. Your session is still active on the server — reloading will pick up where you left off.`,reload:`Reload page`,tryAgain:`Try again`},s={noActivity:`No activity`,noActivityYet:`No activity yet`,activityMax:`Activity sparkline: max {{count}} events`,activityPeak:`Activity sparkline — peak {{count}} events/bucket`},c={action:n,confirm:r,status:i,time:a,error:o,sparkline:s};export{t as n,c as t};