@pheem49/mint 1.16.0 → 1.17.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (848) hide show
  1. package/Cargo.lock +6 -6
  2. package/Cargo.toml +1 -1
  3. package/README.md +1 -1
  4. package/Release_Note.md +71 -72
  5. package/apps/mint-companion/src-tauri/src/compact.rs +69 -0
  6. package/apps/mint-companion/src-tauri/src/main.rs +218 -11
  7. package/apps/mint-companion/vite.config.ts +2 -1
  8. package/crates/mint-cli/src/agent/live_status.rs +43 -2
  9. package/crates/mint-cli/src/agent.rs +178 -38
  10. package/crates/mint-cli/src/commands/agent.rs +225 -31
  11. package/crates/mint-cli/src/commands/browser.rs +127 -0
  12. package/crates/mint-cli/src/commands/config.rs +14 -1
  13. package/crates/mint-cli/src/commands/knowledge.rs +16 -2
  14. package/crates/mint-cli/src/commands/mod.rs +15 -1
  15. package/crates/mint-cli/src/commands/tailnet_web.rs +2 -7
  16. package/crates/mint-cli/src/companion_navigation.rs +268 -0
  17. package/crates/mint-cli/src/interactive/chat_tui.rs +1065 -63
  18. package/crates/mint-cli/src/interactive/command_ui.rs +39 -0
  19. package/crates/mint-cli/src/interactive/slash_commands.rs +114 -6
  20. package/crates/mint-cli/src/interactive/tool_activity.rs +375 -36
  21. package/crates/mint-cli/src/interactive.rs +37 -5
  22. package/crates/mint-cli/src/main.rs +23 -2
  23. package/crates/mint-cli/src/onboard.rs +3494 -1336
  24. package/crates/mint-cli/tests/mods_testing.rs +5 -1
  25. package/crates/mint-companion-protocol/src/lib.rs +113 -0
  26. package/crates/mint-core/src/agent/chat.rs +240 -1
  27. package/crates/mint-core/src/agent/memory.rs +73 -6
  28. package/crates/mint-core/src/agent/safety.rs +56 -4
  29. package/crates/mint-core/src/agent/skill_inventory.rs +3 -1
  30. package/crates/mint-core/src/agent/skills.rs +1 -0
  31. package/crates/mint-core/src/api_server/routes/auth.rs +1 -4
  32. package/crates/mint-core/src/api_server/routes/chat.rs +29 -15
  33. package/crates/mint-core/src/api_server/routes/misc.rs +116 -0
  34. package/crates/mint-core/src/api_server/routes/profile_oauth.rs +43 -26
  35. package/crates/mint-core/src/api_server/routes/sessions.rs +93 -76
  36. package/crates/mint-core/src/api_server/routes/skills_subagents.rs +11 -7
  37. package/crates/mint-core/src/api_server/routes/status_health.rs +18 -8
  38. package/crates/mint-core/src/api_server.rs +211 -65
  39. package/crates/mint-core/src/avatar_bridge.rs +5 -2
  40. package/crates/mint-core/src/browser/cdp.rs +82 -26
  41. package/crates/mint-core/src/browser/lifecycle.rs +143 -43
  42. package/crates/mint-core/src/browser/mod.rs +5 -4
  43. package/crates/mint-core/src/browser/navigate.rs +82 -9
  44. package/crates/mint-core/src/browser/runtime.rs +284 -0
  45. package/crates/mint-core/src/browser/session.rs +263 -7
  46. package/crates/mint-core/src/browser/workflow.rs +386 -0
  47. package/crates/mint-core/src/companion/navigation.rs +115 -0
  48. package/crates/mint-core/src/companion.rs +109 -1
  49. package/crates/mint-core/src/integrations/mcp_result.rs +45 -0
  50. package/crates/mint-core/src/lib.rs +10 -6
  51. package/crates/mint-core/src/media/image_proxy.rs +563 -0
  52. package/crates/mint-core/src/media/tool_images.rs +196 -0
  53. package/crates/mint-core/src/media/tts/playback.rs +609 -0
  54. package/crates/mint-core/src/media/tts.rs +1 -0
  55. package/crates/mint-core/src/media.rs +2 -0
  56. package/crates/mint-core/src/orchestration/context_render.rs +450 -33
  57. package/crates/mint-core/src/orchestration/decision_parsing.rs +5 -23
  58. package/crates/mint-core/src/orchestration/diagnostics.rs +307 -0
  59. package/crates/mint-core/src/orchestration/image_regressions.rs +379 -0
  60. package/crates/mint-core/src/orchestration/loop_guard.rs +334 -0
  61. package/crates/mint-core/src/orchestration/mod.rs +1104 -560
  62. package/crates/mint-core/src/orchestration/reliability.rs +541 -0
  63. package/crates/mint-core/src/orchestration/repeated_failures.rs +8 -0
  64. package/crates/mint-core/src/orchestration/review_regressions.rs +174 -28
  65. package/crates/mint-core/src/orchestration/tools/files.rs +31 -3
  66. package/crates/mint-core/src/orchestration/tools/plugins_mcp.rs +19 -4
  67. package/crates/mint-core/src/orchestration/tools/project.rs +1 -1
  68. package/crates/mint-core/src/orchestration/tools/shell.rs +29 -5
  69. package/crates/mint-core/src/orchestration/tools/web.rs +5 -1
  70. package/crates/mint-core/src/orchestration/trajectory_schema.rs +353 -0
  71. package/crates/mint-core/src/orchestration/truncation.rs +211 -0
  72. package/crates/mint-core/src/orchestration/verification.rs +36 -6
  73. package/crates/mint-core/src/orchestration/workspace_helpers.rs +54 -23
  74. package/crates/mint-core/src/prompts/agent.rs +31 -40
  75. package/crates/mint-core/src/prompts/tool_catalog.rs +134 -40
  76. package/crates/mint-core/src/search/web_search.rs +44 -3
  77. package/crates/mint-core/src/slash/mod.rs +464 -1
  78. package/crates/mint-core/src/swarm/batch.rs +643 -0
  79. package/crates/mint-core/src/swarm/dossier.rs +152 -0
  80. package/crates/mint-core/src/swarm/labels.rs +100 -0
  81. package/crates/mint-core/src/swarm/mod.rs +158 -0
  82. package/crates/mint-core/src/swarm/permissions.rs +167 -0
  83. package/crates/mint-core/src/system/auth.rs +156 -7
  84. package/crates/mint-core/src/system/bg_shell.rs +77 -9
  85. package/crates/mint-core/src/system/config.rs +92 -3
  86. package/crates/mint-core/src/system/mint_web.rs +33 -12
  87. package/crates/mint-core/src/system/shell.rs +179 -10
  88. package/crates/mint-core/src/system/workspace.rs +204 -0
  89. package/crates/mint-core/tests/background_retention.rs +1 -1
  90. package/crates/mint-core/tests/memory_persistence.rs +27 -0
  91. package/out/web/assets/ArtifactPreviewPanel-DAT_Y7i0.css +1 -0
  92. package/out/web/assets/ArtifactPreviewPanel-S0dPfYFx.js +2 -0
  93. package/out/web/assets/CalculationCard-CRjP3E1j.js +1 -0
  94. package/out/web/assets/{CliSessionsView-CtzUJpK_.css → CliSessionsView-C3Br2v5Y.css} +1 -1
  95. package/out/web/assets/CliSessionsView-MI8kXMAb.js +1 -0
  96. package/out/web/assets/CodeReviewPage-CUJceQme.css +1 -0
  97. package/out/web/assets/CodeReviewPage-VCUgPla_.js +2 -0
  98. package/out/web/assets/CommandPalette-BD8SlTE5.js +1 -0
  99. package/out/web/assets/ImageGenCard-BCXxkVJX.js +1 -0
  100. package/out/web/assets/ImageSearchCard-N3yQOr8Z.js +1 -0
  101. package/out/web/assets/ImageStudioPanel-BP7N4rLr.js +1 -0
  102. package/out/web/assets/LibraryPage-WlviRdR8.js +2 -0
  103. package/out/web/assets/LinkedFoldersView-CKRgroWK.js +1 -0
  104. package/out/web/assets/McpRegistryPicker-CoS83vtc.js +1 -0
  105. package/out/web/assets/McpServersView-D3wHnuHg.js +1 -0
  106. package/out/web/assets/MermaidCard-NqrHdyJW.js +2 -0
  107. package/out/web/assets/MintDashboard-B2DJsDDO.css +1 -0
  108. package/out/web/assets/MintDashboard-COw_xol7.js +63 -0
  109. package/out/web/assets/PluginsView-jBYmcKh4.js +1 -0
  110. package/out/web/assets/RewindModal-DempuDod.js +1 -0
  111. package/out/web/assets/ScheduledTasksView-5uw9-V9H.js +1 -0
  112. package/out/web/assets/SelectField-DXBQtrUK.js +1 -0
  113. package/out/web/assets/SelectField-lFEkkWCU.css +1 -0
  114. package/out/web/assets/SettingsWindow-2YP3yj7s.js +4 -0
  115. package/out/web/assets/SettingsWindow-Dz8LQVgD.css +1 -0
  116. package/out/web/assets/SkillsView-C-gp9J7m.js +2 -0
  117. package/out/web/assets/StockCard-BDMCe7mx.js +1 -0
  118. package/out/web/assets/ToolSurfacePage-B0J_q0Jl.js +38 -0
  119. package/out/web/assets/ToolSurfacePage-CRIQ1owD.css +1 -0
  120. package/out/web/assets/UiFeatureCard-6BwxTOCe.js +1 -0
  121. package/out/web/assets/UiGridCard-DvZcLNxb.js +1 -0
  122. package/out/web/assets/UiMockupWidget-DD73QWg1.js +1 -0
  123. package/out/web/assets/VeoStudioPanel-DfsOJKv0.js +4 -0
  124. package/out/web/assets/WeatherCard-CPucIfq8.js +1 -0
  125. package/out/web/assets/WorkspacePanel-BfHKkulU.js +1 -0
  126. package/out/web/assets/WorkspacePdfPreview-Dx_lkjNu.js +2 -0
  127. package/out/web/assets/abnfDiagram-VCTEODGH-BOo3Ckng.js +1 -0
  128. package/out/web/assets/architecture-7GRP2DOG-ZOwheW3n.js +1 -0
  129. package/out/web/assets/architectureDiagram-5GKGNRK7-DC2FDzVd.js +36 -0
  130. package/out/web/assets/{blockDiagram-NRAW4CY4-BrrqzHW5.js → blockDiagram-I7D4REHJ-BrKFWdAH.js} +4 -4
  131. package/out/web/assets/c4Diagram-7LVT6UL2-BHTHK1Yd.js +38 -0
  132. package/out/web/assets/chunk-2Q5K7J3B-D2JLPQzF.js +1 -0
  133. package/out/web/assets/{chunk-TEH6E4GO-G4Cdlyrt.js → chunk-4HAMMTFA-BYFkZwNj.js} +3 -3
  134. package/out/web/assets/{chunk-5VM5RSS4-BiPuE0io.js → chunk-5VM5RSS4-BZ2oBPYQ.js} +1 -1
  135. package/out/web/assets/chunk-75Z2AOVW-BSKfSKSA.js +2 -0
  136. package/out/web/assets/chunk-DU6HZSFF-vIhsiW6n.js +128 -0
  137. package/out/web/assets/chunk-F27PBJKO-BlYpW9xq.js +1 -0
  138. package/out/web/assets/chunk-FOHPRMQF-JXEeeJ9r.js +161 -0
  139. package/out/web/assets/{chunk-GMAD6QVW-BuhEcgHq.js → chunk-GMAD6QVW-BIBz_Ug5.js} +12 -12
  140. package/out/web/assets/chunk-GVQU2GXP-NPSHxeqC.js +1 -0
  141. package/out/web/assets/chunk-IMKFNOWR-YlJK8_Fp.js +231 -0
  142. package/out/web/assets/chunk-JWPE2WC7-BeEMUFDw.js +1 -0
  143. package/out/web/assets/chunk-L3NEJ4N5-DMYi4-af.js +1 -0
  144. package/out/web/assets/chunk-OSK3NFVY-Begd3-jA.js +10 -0
  145. package/out/web/assets/chunk-P2QGCYS3-D1I4xFHN.js +1 -0
  146. package/out/web/assets/chunk-POPQ4Y6H-CafZZzNE.js +1 -0
  147. package/out/web/assets/chunk-PWAF6VOD-Dwh6_Lnt.js +1 -0
  148. package/out/web/assets/chunk-SHT3W25Y-B0XrCSEb.js +168 -0
  149. package/out/web/assets/{chunk-SVP7TREG-Bu_yYb-V.js → chunk-SVP7TREG-CxLsddxC.js} +1 -1
  150. package/out/web/assets/{chunk-LCL6LL3I-BhXV9zyH.js → chunk-TICWLB2K-y156QInb.js} +4 -4
  151. package/out/web/assets/chunk-XXDRQBXY-B9YlhOkE.js +1 -0
  152. package/out/web/assets/chunk-Y2CYZVJY-BxCWjNVG.js +1 -0
  153. package/out/web/assets/classDiagram-ZZMXUADV-BgJ5WtSp.js +1 -0
  154. package/out/web/assets/classDiagram-v2-VYDZK3BY-BgJ5WtSp.js +1 -0
  155. package/out/web/assets/config-CvIO5hkn.js +2 -0
  156. package/out/web/assets/config-DqXJXeZM.css +1 -0
  157. package/out/web/assets/core-Mi3s5D4_.js +1 -0
  158. package/out/web/assets/cose-bilkent-JH36ORCC-qlna31ty.js +1 -0
  159. package/out/web/assets/cynefin-OW5HDTMX-SMVvrLf-.js +1 -0
  160. package/out/web/assets/cynefinDiagram-5FMLGOSQ-rZznN24T.js +62 -0
  161. package/out/web/assets/cytoscape.esm-DWtAUG0r.js +321 -0
  162. package/out/web/assets/dagre-CnWJJM5f.js +1 -0
  163. package/out/web/assets/dagre-GXQ25YYZ-BOToydFu.js +4 -0
  164. package/out/web/assets/diagram-S7CK7UJ4-TMVaGQEJ.js +30 -0
  165. package/out/web/assets/diagram-UQ7AKVKN-C2JK-GP2.js +41 -0
  166. package/out/web/assets/{diagram-VSXAHHWV-BJ86Ov2Y.js → diagram-VSXAHHWV-Cw8VSi2K.js} +1 -1
  167. package/out/web/assets/diagram-VX7I27RA-DXp4fKk9.js +24 -0
  168. package/out/web/assets/diagram-Z3DM3KII-CzSicYiW.js +24 -0
  169. package/out/web/assets/dist-9ISJ7r-g.js +1 -0
  170. package/out/web/assets/dist-js-BV3mI7uw.js +1 -0
  171. package/out/web/assets/ebnfDiagram-PWID7BFC-Dqj-zqPu.js +1 -0
  172. package/out/web/assets/{erDiagram-SSCWMZ5O-CzzmnZWT.js → erDiagram-RLTQ6QDP-DZwFZAuD.js} +3 -3
  173. package/out/web/assets/event-D7D-EBy9.js +1 -0
  174. package/out/web/assets/eventmodeling-NTZA5JFV-C0O-Lvgp.js +1 -0
  175. package/out/web/assets/flowDiagram-HODETNUW-uqCHJond.js +1 -0
  176. package/out/web/assets/ganttDiagram-EL5Y4UJY-Da4ULXTl.js +292 -0
  177. package/out/web/assets/gitGraph-4MIJSDKK-B9wNFZIP.js +1 -0
  178. package/out/web/assets/gitGraphDiagram-WWUBYQGX-RjrhB0MP.js +106 -0
  179. package/out/web/assets/graphlib-Bh9gHply.js +1 -0
  180. package/out/web/assets/index-BmpulIkg.js +168 -0
  181. package/out/web/assets/index-CkvBwhX_.css +1 -0
  182. package/out/web/assets/info-A6RAGUB7-B3dfCpeY.js +1 -0
  183. package/out/web/assets/infoDiagram-27XIBGKW-QVWkLVx7.js +2 -0
  184. package/out/web/assets/{ishikawaDiagram-5VMMS53U-s38yo28y.js → ishikawaDiagram-5VMMS53U-CLFNIRI9.js} +4 -4
  185. package/out/web/assets/journeyDiagram-3NMN7TZE-fgOQadYF.js +139 -0
  186. package/out/web/assets/jsx-runtime-DmUwWVTj.js +1 -0
  187. package/out/web/assets/{kanban-definition-3QL26DDD-DodjgySL.js → kanban-definition-UXKFOSKX-G3Q_9g9O.js} +6 -6
  188. package/out/web/assets/katex-MCdQaEAD.js +257 -0
  189. package/out/web/assets/mermaid-parser.core-v3Jm7nco.js +7 -0
  190. package/out/web/assets/mermaid.core-DTEjLUA1.js +44 -0
  191. package/out/web/assets/{mindmap-definition-FBJOCRG2-260WBDxZ.js → mindmap-definition-YA3MSWOX-C_D42_fF.js} +4 -4
  192. package/out/web/assets/modelManager-BPLycQrN.js +2 -0
  193. package/out/web/assets/oauthManager-BUK7ic7q.js +1 -0
  194. package/out/web/assets/packet-AYTQ26CC-B-R-SHlF.js +1 -0
  195. package/out/web/assets/pdf-Bcahc2yC.js +56 -0
  196. package/out/web/assets/pdf.worker.min-Dkey6ZUl.mjs +27 -0
  197. package/out/web/assets/pegDiagram-XKGWAZYB-Da2q_giz.js +1 -0
  198. package/out/web/assets/pie-WAS4IAKB-BC8F0N7-.js +1 -0
  199. package/out/web/assets/pieDiagram-E7YTZNPT-Iy9REJNC.js +39 -0
  200. package/out/web/assets/{quadrantDiagram-AXDQQJYC-B8D3gU5d.js → quadrantDiagram-AXDQQJYC-ztsiYw7h.js} +4 -4
  201. package/out/web/assets/radar-RG4KPBEZ-B_1P8Z_z.js +1 -0
  202. package/out/web/assets/railroad-74A4TZTK-DuTqczSo.js +1 -0
  203. package/out/web/assets/railroad-abnf-HS5TGJTU-Df29WLmp.js +1 -0
  204. package/out/web/assets/railroad-ebnf-LZEXJU2U-ePFMo-qp.js +1 -0
  205. package/out/web/assets/railroad-peg-WCYAUIDC-DYXLW4_E.js +1 -0
  206. package/out/web/assets/railroadDiagram-O6MQD6OU-LStnZf2S.js +1 -0
  207. package/out/web/assets/{requirementDiagram-EFPCY7ZU-D2X-Ewik.js → requirementDiagram-BXWQKSXE-DmzonMH-.js} +3 -3
  208. package/out/web/assets/rolldown-runtime-CNOWq4Kh.js +1 -0
  209. package/out/web/assets/rough.esm-CNnFptCR.js +1 -0
  210. package/out/web/assets/sankeyDiagram-P5KCCOFB-B8vjmUU1.js +40 -0
  211. package/out/web/assets/sequenceDiagram-WJ2MYXX4-CTnplOAX.js +162 -0
  212. package/out/web/assets/sizeCapture-INFHLROL-C8Q8DbV5.js +1 -0
  213. package/out/web/assets/src-CRDfRlHM.js +1 -0
  214. package/out/web/assets/stateDiagram-D77RDMKH-BFrIaLdI.js +1 -0
  215. package/out/web/assets/stateDiagram-v2-MP3YSRHH-uf3kdNW4.js +1 -0
  216. package/out/web/assets/studio-BBZQ_-QK.js +1 -0
  217. package/out/web/assets/swimlanes-42K2YHIH-BXGngUNU.js +1 -0
  218. package/out/web/assets/swimlanesDiagram-VR7AAH4N-Y8q5bQce.js +8 -0
  219. package/out/web/assets/timeline-definition-24CTP7MA-CegH7n43.js +120 -0
  220. package/out/web/assets/treeView-Q6P3EWNA-DTpJv2Tw.js +1 -0
  221. package/out/web/assets/treemap-WGGIJYW6-i8M9iJU6.js +1 -0
  222. package/out/web/assets/vennDiagram-4TSXK5OY-Dpzo1S8U.js +34 -0
  223. package/out/web/assets/wardley-WFR3VGLG-BrNsgtfw.js +1 -0
  224. package/out/web/assets/{wardleyDiagram-VM6X3IG4-DAdXELbQ.js → wardleyDiagram-VM6X3IG4-lQ92LFE1.js} +35 -35
  225. package/out/web/assets/window-CkUOP7t0.js +1 -0
  226. package/out/web/assets/workspaces-SYPrmbgC.js +1 -0
  227. package/out/web/assets/{xychartDiagram-S5SC5T6Z-IZIXf3Vo.js → xychartDiagram-S5SC5T6Z-BaOaEoBd.js} +4 -4
  228. package/out/web/index-web.html +4 -4
  229. package/out/web/index.html +4 -4
  230. package/out/web/pdfjs/cmaps/78-EUC-H.bcmap +0 -0
  231. package/out/web/pdfjs/cmaps/78-EUC-V.bcmap +0 -0
  232. package/out/web/pdfjs/cmaps/78-H.bcmap +0 -0
  233. package/out/web/pdfjs/cmaps/78-RKSJ-H.bcmap +0 -0
  234. package/out/web/pdfjs/cmaps/78-RKSJ-V.bcmap +0 -0
  235. package/out/web/pdfjs/cmaps/78-V.bcmap +0 -0
  236. package/out/web/pdfjs/cmaps/78ms-RKSJ-H.bcmap +0 -0
  237. package/out/web/pdfjs/cmaps/78ms-RKSJ-V.bcmap +0 -0
  238. package/out/web/pdfjs/cmaps/83pv-RKSJ-H.bcmap +0 -0
  239. package/out/web/pdfjs/cmaps/90ms-RKSJ-H.bcmap +0 -0
  240. package/out/web/pdfjs/cmaps/90ms-RKSJ-V.bcmap +0 -0
  241. package/out/web/pdfjs/cmaps/90msp-RKSJ-H.bcmap +0 -0
  242. package/out/web/pdfjs/cmaps/90msp-RKSJ-V.bcmap +0 -0
  243. package/out/web/pdfjs/cmaps/90pv-RKSJ-H.bcmap +0 -0
  244. package/out/web/pdfjs/cmaps/90pv-RKSJ-V.bcmap +0 -0
  245. package/out/web/pdfjs/cmaps/Add-H.bcmap +0 -0
  246. package/out/web/pdfjs/cmaps/Add-RKSJ-H.bcmap +0 -0
  247. package/out/web/pdfjs/cmaps/Add-RKSJ-V.bcmap +0 -0
  248. package/out/web/pdfjs/cmaps/Add-V.bcmap +0 -0
  249. package/out/web/pdfjs/cmaps/Adobe-CNS1-0.bcmap +0 -0
  250. package/out/web/pdfjs/cmaps/Adobe-CNS1-1.bcmap +0 -0
  251. package/out/web/pdfjs/cmaps/Adobe-CNS1-2.bcmap +0 -0
  252. package/out/web/pdfjs/cmaps/Adobe-CNS1-3.bcmap +0 -0
  253. package/out/web/pdfjs/cmaps/Adobe-CNS1-4.bcmap +0 -0
  254. package/out/web/pdfjs/cmaps/Adobe-CNS1-5.bcmap +0 -0
  255. package/out/web/pdfjs/cmaps/Adobe-CNS1-6.bcmap +0 -0
  256. package/out/web/pdfjs/cmaps/Adobe-CNS1-UCS2.bcmap +0 -0
  257. package/out/web/pdfjs/cmaps/Adobe-GB1-0.bcmap +0 -0
  258. package/out/web/pdfjs/cmaps/Adobe-GB1-1.bcmap +0 -0
  259. package/out/web/pdfjs/cmaps/Adobe-GB1-2.bcmap +0 -0
  260. package/out/web/pdfjs/cmaps/Adobe-GB1-3.bcmap +0 -0
  261. package/out/web/pdfjs/cmaps/Adobe-GB1-4.bcmap +0 -0
  262. package/out/web/pdfjs/cmaps/Adobe-GB1-5.bcmap +0 -0
  263. package/out/web/pdfjs/cmaps/Adobe-GB1-UCS2.bcmap +0 -0
  264. package/out/web/pdfjs/cmaps/Adobe-Japan1-0.bcmap +0 -0
  265. package/out/web/pdfjs/cmaps/Adobe-Japan1-1.bcmap +0 -0
  266. package/out/web/pdfjs/cmaps/Adobe-Japan1-2.bcmap +0 -0
  267. package/out/web/pdfjs/cmaps/Adobe-Japan1-3.bcmap +0 -0
  268. package/out/web/pdfjs/cmaps/Adobe-Japan1-4.bcmap +0 -0
  269. package/out/web/pdfjs/cmaps/Adobe-Japan1-5.bcmap +0 -0
  270. package/out/web/pdfjs/cmaps/Adobe-Japan1-6.bcmap +0 -0
  271. package/out/web/pdfjs/cmaps/Adobe-Japan1-UCS2.bcmap +0 -0
  272. package/out/web/pdfjs/cmaps/Adobe-Korea1-0.bcmap +0 -0
  273. package/out/web/pdfjs/cmaps/Adobe-Korea1-1.bcmap +0 -0
  274. package/out/web/pdfjs/cmaps/Adobe-Korea1-2.bcmap +0 -0
  275. package/out/web/pdfjs/cmaps/Adobe-Korea1-UCS2.bcmap +0 -0
  276. package/out/web/pdfjs/cmaps/B5-H.bcmap +0 -0
  277. package/out/web/pdfjs/cmaps/B5-V.bcmap +0 -0
  278. package/out/web/pdfjs/cmaps/B5pc-H.bcmap +0 -0
  279. package/out/web/pdfjs/cmaps/B5pc-V.bcmap +0 -0
  280. package/out/web/pdfjs/cmaps/CNS-EUC-H.bcmap +0 -0
  281. package/out/web/pdfjs/cmaps/CNS-EUC-V.bcmap +0 -0
  282. package/out/web/pdfjs/cmaps/CNS1-H.bcmap +0 -0
  283. package/out/web/pdfjs/cmaps/CNS1-V.bcmap +0 -0
  284. package/out/web/pdfjs/cmaps/CNS2-H.bcmap +0 -0
  285. package/out/web/pdfjs/cmaps/CNS2-V.bcmap +3 -0
  286. package/out/web/pdfjs/cmaps/ETHK-B5-H.bcmap +0 -0
  287. package/out/web/pdfjs/cmaps/ETHK-B5-V.bcmap +0 -0
  288. package/out/web/pdfjs/cmaps/ETen-B5-H.bcmap +0 -0
  289. package/out/web/pdfjs/cmaps/ETen-B5-V.bcmap +0 -0
  290. package/out/web/pdfjs/cmaps/ETenms-B5-H.bcmap +3 -0
  291. package/out/web/pdfjs/cmaps/ETenms-B5-V.bcmap +0 -0
  292. package/out/web/pdfjs/cmaps/EUC-H.bcmap +0 -0
  293. package/out/web/pdfjs/cmaps/EUC-V.bcmap +0 -0
  294. package/out/web/pdfjs/cmaps/Ext-H.bcmap +0 -0
  295. package/out/web/pdfjs/cmaps/Ext-RKSJ-H.bcmap +0 -0
  296. package/out/web/pdfjs/cmaps/Ext-RKSJ-V.bcmap +0 -0
  297. package/out/web/pdfjs/cmaps/Ext-V.bcmap +0 -0
  298. package/out/web/pdfjs/cmaps/GB-EUC-H.bcmap +0 -0
  299. package/out/web/pdfjs/cmaps/GB-EUC-V.bcmap +0 -0
  300. package/out/web/pdfjs/cmaps/GB-H.bcmap +4 -0
  301. package/out/web/pdfjs/cmaps/GB-V.bcmap +0 -0
  302. package/out/web/pdfjs/cmaps/GBK-EUC-H.bcmap +0 -0
  303. package/out/web/pdfjs/cmaps/GBK-EUC-V.bcmap +0 -0
  304. package/out/web/pdfjs/cmaps/GBK2K-H.bcmap +0 -0
  305. package/out/web/pdfjs/cmaps/GBK2K-V.bcmap +0 -0
  306. package/out/web/pdfjs/cmaps/GBKp-EUC-H.bcmap +0 -0
  307. package/out/web/pdfjs/cmaps/GBKp-EUC-V.bcmap +0 -0
  308. package/out/web/pdfjs/cmaps/GBT-EUC-H.bcmap +0 -0
  309. package/out/web/pdfjs/cmaps/GBT-EUC-V.bcmap +0 -0
  310. package/out/web/pdfjs/cmaps/GBT-H.bcmap +0 -0
  311. package/out/web/pdfjs/cmaps/GBT-V.bcmap +0 -0
  312. package/out/web/pdfjs/cmaps/GBTpc-EUC-H.bcmap +0 -0
  313. package/out/web/pdfjs/cmaps/GBTpc-EUC-V.bcmap +0 -0
  314. package/out/web/pdfjs/cmaps/GBpc-EUC-H.bcmap +0 -0
  315. package/out/web/pdfjs/cmaps/GBpc-EUC-V.bcmap +0 -0
  316. package/out/web/pdfjs/cmaps/H.bcmap +0 -0
  317. package/out/web/pdfjs/cmaps/HKdla-B5-H.bcmap +0 -0
  318. package/out/web/pdfjs/cmaps/HKdla-B5-V.bcmap +0 -0
  319. package/out/web/pdfjs/cmaps/HKdlb-B5-H.bcmap +0 -0
  320. package/out/web/pdfjs/cmaps/HKdlb-B5-V.bcmap +0 -0
  321. package/out/web/pdfjs/cmaps/HKgccs-B5-H.bcmap +0 -0
  322. package/out/web/pdfjs/cmaps/HKgccs-B5-V.bcmap +0 -0
  323. package/out/web/pdfjs/cmaps/HKm314-B5-H.bcmap +0 -0
  324. package/out/web/pdfjs/cmaps/HKm314-B5-V.bcmap +0 -0
  325. package/out/web/pdfjs/cmaps/HKm471-B5-H.bcmap +0 -0
  326. package/out/web/pdfjs/cmaps/HKm471-B5-V.bcmap +0 -0
  327. package/out/web/pdfjs/cmaps/HKscs-B5-H.bcmap +0 -0
  328. package/out/web/pdfjs/cmaps/HKscs-B5-V.bcmap +0 -0
  329. package/out/web/pdfjs/cmaps/Hankaku.bcmap +0 -0
  330. package/out/web/pdfjs/cmaps/Hiragana.bcmap +0 -0
  331. package/out/web/pdfjs/cmaps/KSC-EUC-H.bcmap +0 -0
  332. package/out/web/pdfjs/cmaps/KSC-EUC-V.bcmap +0 -0
  333. package/out/web/pdfjs/cmaps/KSC-H.bcmap +0 -0
  334. package/out/web/pdfjs/cmaps/KSC-Johab-H.bcmap +0 -0
  335. package/out/web/pdfjs/cmaps/KSC-Johab-V.bcmap +0 -0
  336. package/out/web/pdfjs/cmaps/KSC-V.bcmap +0 -0
  337. package/out/web/pdfjs/cmaps/KSCms-UHC-H.bcmap +0 -0
  338. package/out/web/pdfjs/cmaps/KSCms-UHC-HW-H.bcmap +0 -0
  339. package/out/web/pdfjs/cmaps/KSCms-UHC-HW-V.bcmap +0 -0
  340. package/out/web/pdfjs/cmaps/KSCms-UHC-V.bcmap +0 -0
  341. package/out/web/pdfjs/cmaps/KSCpc-EUC-H.bcmap +0 -0
  342. package/out/web/pdfjs/cmaps/KSCpc-EUC-V.bcmap +0 -0
  343. package/out/web/pdfjs/cmaps/Katakana.bcmap +0 -0
  344. package/out/web/pdfjs/cmaps/LICENSE +36 -0
  345. package/out/web/pdfjs/cmaps/NWP-H.bcmap +0 -0
  346. package/out/web/pdfjs/cmaps/NWP-V.bcmap +0 -0
  347. package/out/web/pdfjs/cmaps/RKSJ-H.bcmap +0 -0
  348. package/out/web/pdfjs/cmaps/RKSJ-V.bcmap +0 -0
  349. package/out/web/pdfjs/cmaps/Roman.bcmap +0 -0
  350. package/out/web/pdfjs/cmaps/UniCNS-UCS2-H.bcmap +0 -0
  351. package/out/web/pdfjs/cmaps/UniCNS-UCS2-V.bcmap +0 -0
  352. package/out/web/pdfjs/cmaps/UniCNS-UTF16-H.bcmap +0 -0
  353. package/out/web/pdfjs/cmaps/UniCNS-UTF16-V.bcmap +0 -0
  354. package/out/web/pdfjs/cmaps/UniCNS-UTF32-H.bcmap +0 -0
  355. package/out/web/pdfjs/cmaps/UniCNS-UTF32-V.bcmap +0 -0
  356. package/out/web/pdfjs/cmaps/UniCNS-UTF8-H.bcmap +0 -0
  357. package/out/web/pdfjs/cmaps/UniCNS-UTF8-V.bcmap +0 -0
  358. package/out/web/pdfjs/cmaps/UniGB-UCS2-H.bcmap +0 -0
  359. package/out/web/pdfjs/cmaps/UniGB-UCS2-V.bcmap +0 -0
  360. package/out/web/pdfjs/cmaps/UniGB-UTF16-H.bcmap +0 -0
  361. package/out/web/pdfjs/cmaps/UniGB-UTF16-V.bcmap +0 -0
  362. package/out/web/pdfjs/cmaps/UniGB-UTF32-H.bcmap +0 -0
  363. package/out/web/pdfjs/cmaps/UniGB-UTF32-V.bcmap +0 -0
  364. package/out/web/pdfjs/cmaps/UniGB-UTF8-H.bcmap +0 -0
  365. package/out/web/pdfjs/cmaps/UniGB-UTF8-V.bcmap +0 -0
  366. package/out/web/pdfjs/cmaps/UniJIS-UCS2-H.bcmap +0 -0
  367. package/out/web/pdfjs/cmaps/UniJIS-UCS2-HW-H.bcmap +0 -0
  368. package/out/web/pdfjs/cmaps/UniJIS-UCS2-HW-V.bcmap +0 -0
  369. package/out/web/pdfjs/cmaps/UniJIS-UCS2-V.bcmap +0 -0
  370. package/out/web/pdfjs/cmaps/UniJIS-UTF16-H.bcmap +0 -0
  371. package/out/web/pdfjs/cmaps/UniJIS-UTF16-V.bcmap +0 -0
  372. package/out/web/pdfjs/cmaps/UniJIS-UTF32-H.bcmap +0 -0
  373. package/out/web/pdfjs/cmaps/UniJIS-UTF32-V.bcmap +0 -0
  374. package/out/web/pdfjs/cmaps/UniJIS-UTF8-H.bcmap +0 -0
  375. package/out/web/pdfjs/cmaps/UniJIS-UTF8-V.bcmap +0 -0
  376. package/out/web/pdfjs/cmaps/UniJIS2004-UTF16-H.bcmap +0 -0
  377. package/out/web/pdfjs/cmaps/UniJIS2004-UTF16-V.bcmap +0 -0
  378. package/out/web/pdfjs/cmaps/UniJIS2004-UTF32-H.bcmap +0 -0
  379. package/out/web/pdfjs/cmaps/UniJIS2004-UTF32-V.bcmap +0 -0
  380. package/out/web/pdfjs/cmaps/UniJIS2004-UTF8-H.bcmap +0 -0
  381. package/out/web/pdfjs/cmaps/UniJIS2004-UTF8-V.bcmap +0 -0
  382. package/out/web/pdfjs/cmaps/UniJISPro-UCS2-HW-V.bcmap +0 -0
  383. package/out/web/pdfjs/cmaps/UniJISPro-UCS2-V.bcmap +0 -0
  384. package/out/web/pdfjs/cmaps/UniJISPro-UTF8-V.bcmap +0 -0
  385. package/out/web/pdfjs/cmaps/UniJISX0213-UTF32-H.bcmap +0 -0
  386. package/out/web/pdfjs/cmaps/UniJISX0213-UTF32-V.bcmap +0 -0
  387. package/out/web/pdfjs/cmaps/UniJISX02132004-UTF32-H.bcmap +0 -0
  388. package/out/web/pdfjs/cmaps/UniJISX02132004-UTF32-V.bcmap +0 -0
  389. package/out/web/pdfjs/cmaps/UniKS-UCS2-H.bcmap +0 -0
  390. package/out/web/pdfjs/cmaps/UniKS-UCS2-V.bcmap +0 -0
  391. package/out/web/pdfjs/cmaps/UniKS-UTF16-H.bcmap +0 -0
  392. package/out/web/pdfjs/cmaps/UniKS-UTF16-V.bcmap +0 -0
  393. package/out/web/pdfjs/cmaps/UniKS-UTF32-H.bcmap +0 -0
  394. package/out/web/pdfjs/cmaps/UniKS-UTF32-V.bcmap +0 -0
  395. package/out/web/pdfjs/cmaps/UniKS-UTF8-H.bcmap +0 -0
  396. package/out/web/pdfjs/cmaps/UniKS-UTF8-V.bcmap +0 -0
  397. package/out/web/pdfjs/cmaps/V.bcmap +0 -0
  398. package/out/web/pdfjs/cmaps/WP-Symbol.bcmap +0 -0
  399. package/out/web/pdfjs/standard_fonts/FoxitDingbats.pfb +0 -0
  400. package/out/web/pdfjs/standard_fonts/FoxitFixed.pfb +0 -0
  401. package/out/web/pdfjs/standard_fonts/FoxitFixedBold.pfb +0 -0
  402. package/out/web/pdfjs/standard_fonts/FoxitFixedBoldItalic.pfb +0 -0
  403. package/out/web/pdfjs/standard_fonts/FoxitFixedItalic.pfb +0 -0
  404. package/out/web/pdfjs/standard_fonts/FoxitSerif.pfb +0 -0
  405. package/out/web/pdfjs/standard_fonts/FoxitSerifBold.pfb +0 -0
  406. package/out/web/pdfjs/standard_fonts/FoxitSerifBoldItalic.pfb +0 -0
  407. package/out/web/pdfjs/standard_fonts/FoxitSerifItalic.pfb +0 -0
  408. package/out/web/pdfjs/standard_fonts/FoxitSymbol.pfb +0 -0
  409. package/out/web/pdfjs/standard_fonts/LICENSE_FOXIT +27 -0
  410. package/out/web/pdfjs/standard_fonts/LICENSE_LIBERATION +363 -0
  411. package/out/web/pdfjs/standard_fonts/LiberationSans-Bold.ttf +0 -0
  412. package/out/web/pdfjs/standard_fonts/LiberationSans-BoldItalic.ttf +0 -0
  413. package/out/web/pdfjs/standard_fonts/LiberationSans-Italic.ttf +0 -0
  414. package/out/web/pdfjs/standard_fonts/LiberationSans-Regular.ttf +0 -0
  415. package/out/web/pdfjs/wasm/LICENSE_JBIG2 +196 -0
  416. package/out/web/pdfjs/wasm/LICENSE_OPENJPEG +39 -0
  417. package/out/web/pdfjs/wasm/LICENSE_PDFJS_JBIG2 +13 -0
  418. package/out/web/pdfjs/wasm/LICENSE_PDFJS_OPENJPEG +22 -0
  419. package/out/web/pdfjs/wasm/LICENSE_PDFJS_QCMS +19 -0
  420. package/out/web/pdfjs/wasm/LICENSE_QCMS +21 -0
  421. package/out/web/pdfjs/wasm/jbig2.wasm +0 -0
  422. package/out/web/pdfjs/wasm/jbig2_nowasm_fallback.js +15 -0
  423. package/out/web/pdfjs/wasm/openjpeg.wasm +0 -0
  424. package/out/web/pdfjs/wasm/openjpeg_nowasm_fallback.js +17 -0
  425. package/out/web/pdfjs/wasm/qcms_bg.wasm +0 -0
  426. package/out/web/pdfjs/wasm/quickjs-eval.js +16 -0
  427. package/out/web/pdfjs/wasm/quickjs-eval.wasm +0 -0
  428. package/package.json +6 -4
  429. package/slash-commands.json +8 -2
  430. package/src/bin/index.js +4 -1
  431. package/src/bin/pdfjs-assets.mjs +31 -0
  432. package/src/renderer/node_modules/.vite/vitest/CACHEDIR.TAG +3 -0
  433. package/src/renderer/node_modules/.vite/vitest/da39a3ee5e6b4b0d3255bfef95601890afd80709/results.json +1 -1
  434. package/src/renderer/shared/agentProgress.ts +11 -2
  435. package/src/renderer/shared/components/Settings/AgentsTab.tsx +70 -6
  436. package/src/renderer/shared/components/Settings/AudioTab.tsx +1 -1
  437. package/src/renderer/shared/components/Settings/AutomationTab.tsx +57 -0
  438. package/src/renderer/shared/components/Settings/AvatarCropModal.tsx +18 -12
  439. package/src/renderer/shared/components/Settings/CustomProviderLogoPicker.test.tsx +65 -0
  440. package/src/renderer/shared/components/Settings/CustomProviderLogoPicker.tsx +456 -0
  441. package/src/renderer/shared/components/Settings/GeneralTab.tsx +40 -82
  442. package/src/renderer/shared/components/Settings/PluginsTab.tsx +101 -24
  443. package/src/renderer/shared/components/Settings/ProfileTab.tsx +1 -1
  444. package/src/renderer/shared/components/Settings/SettingsWindow.tsx +796 -0
  445. package/src/renderer/shared/components/Settings/ThemeTab.tsx +13 -1
  446. package/src/renderer/shared/components/{AgentActivityDrawer.tsx → activity/AgentActivityDrawer.tsx} +77 -61
  447. package/src/renderer/shared/components/{AgentActivityTable.tsx → activity/AgentActivityTable.tsx} +46 -7
  448. package/src/renderer/shared/components/{McpToolResults.tsx → activity/McpToolResults.tsx} +32 -13
  449. package/src/renderer/shared/components/{PlanChecklistWidget.tsx → activity/PlanChecklistWidget.tsx} +2 -2
  450. package/src/renderer/shared/components/activity/RunSummaryDashboard.test.tsx +127 -0
  451. package/src/renderer/shared/components/activity/RunSummaryDashboard.tsx +222 -0
  452. package/src/renderer/shared/components/activity/SubagentDagView.test.ts +123 -0
  453. package/src/renderer/shared/components/{SubagentDagView.tsx → activity/SubagentDagView.tsx} +97 -43
  454. package/src/renderer/shared/components/activity/SubagentStatusStrip.test.tsx +82 -0
  455. package/src/renderer/shared/components/activity/SubagentStatusStrip.tsx +107 -0
  456. package/src/renderer/shared/components/activity/ViewedImages.tsx +140 -0
  457. package/src/renderer/shared/components/{AuthGate.tsx → app/AuthGate.tsx} +3 -3
  458. package/src/renderer/shared/components/{ChunkErrorBoundary.tsx → app/ChunkErrorBoundary.tsx} +10 -10
  459. package/src/renderer/shared/components/{CommandPalette.tsx → app/CommandPalette.tsx} +25 -25
  460. package/src/renderer/shared/components/{DashboardSidebar.tsx → app/DashboardSidebar.tsx} +7 -5
  461. package/src/renderer/shared/components/{DesktopTitlebar.tsx → app/DesktopTitlebar.tsx} +7 -24
  462. package/src/renderer/shared/components/{ErrorNotice.tsx → app/ErrorNotice.tsx} +1 -1
  463. package/src/renderer/shared/components/{MintDashboard.tsx → app/MintDashboard.tsx} +191 -212
  464. package/src/renderer/shared/components/{ModalErrorBoundary.tsx → app/ModalErrorBoundary.tsx} +5 -5
  465. package/src/renderer/shared/components/{CalculationCard.tsx → cards/CalculationCard.tsx} +13 -27
  466. package/src/renderer/shared/components/{ImageGenCard.tsx → cards/ImageGenCard.tsx} +9 -22
  467. package/src/renderer/shared/components/{ImageSearchCard.tsx → cards/ImageSearchCard.tsx} +9 -22
  468. package/src/renderer/shared/components/{MermaidCard.tsx → cards/MermaidCard.tsx} +37 -21
  469. package/src/renderer/shared/components/{StockCard.tsx → cards/StockCard.tsx} +15 -31
  470. package/src/renderer/shared/components/cards/ToolResultCards.tsx +86 -0
  471. package/src/renderer/shared/components/{UiFeatureCard.tsx → cards/UiFeatureCard.tsx} +6 -6
  472. package/src/renderer/shared/components/{UiGridCard.tsx → cards/UiGridCard.tsx} +3 -3
  473. package/src/renderer/shared/components/{WeatherCard.tsx → cards/WeatherCard.tsx} +1 -1
  474. package/src/renderer/shared/components/{ApprovalCard.test.tsx → chat/ApprovalCard.test.tsx} +1 -1
  475. package/src/renderer/shared/components/{ApprovalCard.tsx → chat/ApprovalCard.tsx} +5 -5
  476. package/src/renderer/shared/components/{ChatCodeBlock.tsx → chat/ChatCodeBlock.tsx} +1 -1
  477. package/src/renderer/shared/components/{ChatMessageItem.test.tsx → chat/ChatMessageItem.test.tsx} +92 -15
  478. package/src/renderer/shared/components/{ChatMessageItem.tsx → chat/ChatMessageItem.tsx} +73 -157
  479. package/src/renderer/shared/components/chat/ChatPanel.test.tsx +31 -0
  480. package/src/renderer/shared/components/{ChatPanel.tsx → chat/ChatPanel.tsx} +244 -493
  481. package/src/renderer/shared/components/{CollapsiblePasteInput.tsx → chat/CollapsiblePasteInput.tsx} +2 -2
  482. package/src/renderer/shared/components/{DiffReviewModal.tsx → chat/DiffReviewModal.tsx} +40 -40
  483. package/src/renderer/shared/components/{GeminiLiveOverlay.tsx → chat/GeminiLiveOverlay.tsx} +2 -2
  484. package/src/renderer/shared/components/{ModelSelectorPopover.tsx → chat/ModelSelectorPopover.tsx} +3 -3
  485. package/src/renderer/shared/components/chat/QueuedMessagesBanner.test.tsx +89 -0
  486. package/src/renderer/shared/components/chat/QueuedMessagesBanner.tsx +201 -0
  487. package/src/renderer/shared/components/{RewindModal.tsx → chat/RewindModal.tsx} +4 -4
  488. package/src/renderer/shared/components/{SlashChoicePanel.tsx → chat/SlashChoicePanel.tsx} +2 -2
  489. package/src/renderer/shared/components/{SlashSuggestions.tsx → chat/SlashSuggestions.tsx} +4 -4
  490. package/src/renderer/shared/components/{SourcesBlock.tsx → chat/SourcesBlock.tsx} +30 -37
  491. package/src/renderer/shared/components/{ThinkingBlock.tsx → chat/ThinkingBlock.tsx} +1 -1
  492. package/src/renderer/shared/components/chat/TurnFileChanges.test.tsx +86 -0
  493. package/src/renderer/shared/components/chat/TurnFileChanges.tsx +430 -0
  494. package/src/renderer/shared/components/{VoicePill.css → chat/VoicePill.css} +1 -1
  495. package/src/renderer/shared/components/{VoicePill.jsx → chat/VoicePill.jsx} +3 -2
  496. package/src/renderer/shared/components/{CliSessionsView.test.tsx → extensions/CliSessionsView.test.tsx} +2 -2
  497. package/src/renderer/shared/components/{CliSessionsView.tsx → extensions/CliSessionsView.tsx} +14 -12
  498. package/src/renderer/shared/components/{LinkedFoldersView.tsx → extensions/LinkedFoldersView.tsx} +3 -3
  499. package/src/renderer/shared/components/{McpRegistryPicker.tsx → extensions/McpRegistryPicker.tsx} +3 -3
  500. package/src/renderer/shared/components/{McpServersView.tsx → extensions/McpServersView.tsx} +105 -36
  501. package/src/renderer/shared/components/{McpToolAllowlist.tsx → extensions/McpToolAllowlist.tsx} +2 -2
  502. package/src/renderer/shared/components/{ModUi.test.tsx → extensions/ModUi.test.tsx} +9 -4
  503. package/src/renderer/shared/components/{ModsPanel.tsx → extensions/ModsPanel.tsx} +59 -7
  504. package/src/renderer/shared/components/{PluginsView.tsx → extensions/PluginsView.tsx} +6 -6
  505. package/src/renderer/shared/components/{ScheduledTasksView.tsx → extensions/ScheduledTasksView.tsx} +5 -5
  506. package/src/renderer/shared/components/extensions/SkillsView.test.tsx +31 -0
  507. package/src/renderer/shared/components/{SkillsView.tsx → extensions/SkillsView.tsx} +20 -4
  508. package/src/renderer/shared/components/{ImageStudioPanel.tsx → studio/ImageStudioPanel.tsx} +6 -6
  509. package/src/renderer/shared/components/{LibraryItemCard.tsx → studio/LibraryItemCard.tsx} +2 -2
  510. package/src/renderer/shared/components/{LibraryPage.tsx → studio/LibraryPage.tsx} +5 -5
  511. package/src/renderer/shared/components/{LibraryPreview.tsx → studio/LibraryPreview.tsx} +2 -2
  512. package/src/renderer/shared/components/{VeoStudioPanel.tsx → studio/VeoStudioPanel.tsx} +7 -7
  513. package/src/renderer/shared/components/{GlideSelect.css → ui/GlideSelect.css} +7 -6
  514. package/src/renderer/shared/components/ui/ProviderBrandIcon.test.tsx +67 -0
  515. package/src/renderer/shared/components/ui/ProviderBrandIcon.tsx +167 -0
  516. package/src/renderer/shared/components/ui/SelectField.tsx +506 -0
  517. package/src/renderer/shared/components/ui/error-recovery.css +10 -10
  518. package/src/renderer/shared/components/ui/error-recovery.tsx +1 -1
  519. package/src/renderer/shared/components/{ArtifactPreviewPanel.tsx → workspace/ArtifactPreviewPanel.tsx} +256 -112
  520. package/src/renderer/shared/components/workspace/BackgroundTerminals.test.tsx +63 -0
  521. package/src/renderer/shared/components/{BackgroundTerminals.tsx → workspace/BackgroundTerminals.tsx} +40 -9
  522. package/src/renderer/shared/components/{CodeReviewPage.tsx → workspace/CodeReviewPage.tsx} +47 -8
  523. package/src/renderer/shared/components/{GitBranchSelector.tsx → workspace/GitBranchSelector.tsx} +2 -2
  524. package/src/renderer/shared/components/workspace/SessionSources.tsx +113 -0
  525. package/src/renderer/shared/components/{TerminalDock.tsx → workspace/TerminalDock.tsx} +5 -2
  526. package/src/renderer/shared/components/workspace/ToolSurfacePage.test.tsx +68 -0
  527. package/src/renderer/shared/components/{ToolSurfacePage.tsx → workspace/ToolSurfacePage.tsx} +322 -71
  528. package/src/renderer/shared/components/{ToolsPanelToggle.tsx → workspace/ToolsPanelToggle.tsx} +1 -1
  529. package/src/renderer/shared/components/workspace/WorkspaceFileInfo.tsx +28 -0
  530. package/src/renderer/shared/components/workspace/WorkspaceMediaPreview.tsx +17 -0
  531. package/src/renderer/shared/components/{WorkspacePaneResizer.tsx → workspace/WorkspacePaneResizer.tsx} +1 -1
  532. package/src/renderer/shared/components/workspace/WorkspacePdfPreview.tsx +89 -0
  533. package/src/renderer/shared/components/{WorkspacePreviewActions.test.tsx → workspace/WorkspacePreviewActions.test.tsx} +48 -3
  534. package/src/renderer/shared/components/{WorkspacePreviewActions.tsx → workspace/WorkspacePreviewActions.tsx} +3 -3
  535. package/src/renderer/shared/components/{WorkspaceSelector.tsx → workspace/WorkspaceSelector.tsx} +99 -7
  536. package/src/renderer/shared/components/{workspace-selector.css → workspace/workspace-selector.css} +84 -2
  537. package/src/renderer/shared/constants/config.ts +7 -0
  538. package/src/renderer/shared/conversation/coordinator.test.ts +46 -0
  539. package/src/renderer/shared/conversation/coordinator.ts +50 -2
  540. package/src/renderer/shared/conversation/lifecycle.test.ts +163 -1
  541. package/src/renderer/shared/conversation/lifecycle.ts +164 -7
  542. package/src/renderer/shared/conversation/projectNavigation.test.ts +18 -0
  543. package/src/renderer/shared/conversation/projectNavigation.ts +11 -0
  544. package/src/renderer/shared/conversation/transport.test.ts +20 -0
  545. package/src/renderer/shared/conversation/transport.ts +51 -9
  546. package/src/renderer/shared/conversation/useConversationCoordinator.ts +42 -12
  547. package/src/renderer/shared/css/agent-observability.css +72 -11
  548. package/src/renderer/shared/css/chat-ui-cards.css +35 -35
  549. package/src/renderer/shared/css/code-review.css +86 -86
  550. package/src/renderer/shared/css/code-sessions.css +10 -10
  551. package/src/renderer/shared/css/file-changes.css +167 -5
  552. package/src/renderer/shared/css/management-views.css +78 -37
  553. package/src/renderer/shared/css/mcp-results.css +46 -3
  554. package/src/renderer/shared/css/queued-messages.css +221 -0
  555. package/src/renderer/shared/css/session-sources.css +12 -7
  556. package/src/renderer/shared/css/settings/agents.css +2 -2
  557. package/src/renderer/{src-web → shared}/css/settings/base.css +101 -107
  558. package/src/renderer/shared/css/settings/general.css +384 -92
  559. package/src/renderer/shared/css/settings/plugins.css +8 -8
  560. package/src/renderer/shared/css/settings/theme.css +44 -32
  561. package/src/renderer/shared/css/ui-tailwind.css +2 -2
  562. package/src/renderer/shared/css/viewed-images.css +89 -0
  563. package/src/renderer/shared/css/workspace-file-info.css +12 -0
  564. package/src/renderer/shared/css/workspace-media-preview.css +13 -0
  565. package/src/renderer/shared/env.d.ts +9 -0
  566. package/src/renderer/shared/platform.test.ts +143 -0
  567. package/src/renderer/shared/platform.ts +10 -4
  568. package/src/renderer/shared/speech/player.ts +160 -0
  569. package/src/renderer/shared/speech/types.ts +11 -0
  570. package/src/renderer/shared/theme/themeManager.test.ts +20 -0
  571. package/src/renderer/shared/theme/themeManager.ts +3 -1
  572. package/src/renderer/shared/theme/themes.ts +17 -4
  573. package/src/renderer/shared/theme/tokens.css +448 -51
  574. package/src/renderer/shared/types.ts +56 -1
  575. package/src/renderer/shared/utils/agentActivity.test.ts +165 -6
  576. package/src/renderer/shared/utils/agentActivity.ts +181 -31
  577. package/src/renderer/shared/utils/artifactBrowser.ts +1 -1
  578. package/src/renderer/shared/utils/artifacts.ts +55 -0
  579. package/src/renderer/shared/utils/contextCompaction.test.tsx +1 -1
  580. package/src/renderer/shared/utils/externalLinks.ts +91 -0
  581. package/src/renderer/shared/utils/lazyWithRetry.ts +13 -0
  582. package/src/renderer/shared/utils/markdown.tsx +169 -35
  583. package/src/renderer/shared/utils/markdown.webImages.test.tsx +124 -2
  584. package/src/renderer/shared/utils/mcpResults.test.tsx +24 -1
  585. package/src/renderer/shared/utils/pdfRange.ts +16 -0
  586. package/src/renderer/shared/utils/previewObjectUrls.ts +20 -0
  587. package/src/renderer/shared/utils/sessionSources.test.ts +41 -1
  588. package/src/renderer/shared/utils/sessionSources.ts +2 -0
  589. package/src/renderer/shared/utils/slashCommandProcessor.ts +4 -1
  590. package/src/renderer/shared/utils/speech.ts +18 -4
  591. package/src/renderer/shared/utils/useNativeVoiceInput.ts +19 -5
  592. package/src/renderer/shared/utils/useSessionSources.ts +4 -0
  593. package/src/renderer/shared/utils/viewedImages.test.ts +129 -0
  594. package/src/renderer/shared/utils/viewedImages.ts +81 -10
  595. package/src/renderer/shared/utils/workspaceDrag.ts +30 -0
  596. package/src/renderer/shared/utils/workspaceImage.ts +17 -0
  597. package/src/renderer/shared/utils/workspaceListPreferences.test.ts +64 -0
  598. package/src/renderer/shared/utils/workspaceListPreferences.ts +54 -0
  599. package/src/renderer/shared/utils/workspaceMedia.ts +41 -0
  600. package/src/renderer/shared/utils/workspacePreview.test.ts +147 -2
  601. package/src/renderer/shared/utils/workspacePreview.ts +34 -3
  602. package/src/renderer/shared/utils/workspaces.ts +3 -2
  603. package/src/renderer/src/App.tsx +6 -8
  604. package/src/renderer/src/components/ChatPanel.tsx +1 -1
  605. package/src/renderer/src/components/DashboardSidebar.tsx +2 -2
  606. package/src/renderer/src/components/ImageStudioPanel.tsx +1 -1
  607. package/src/renderer/src/components/LiveTranslateControls.tsx +1 -1
  608. package/src/renderer/src/components/MintDashboard.tsx +1 -1
  609. package/src/renderer/src/components/ProactiveGlow.tsx +1 -1
  610. package/src/renderer/src/components/ScreenPicker.tsx +1 -1
  611. package/src/renderer/src/components/SettingsWindow.tsx +6 -830
  612. package/src/renderer/src/components/SpotlightWindow.tsx +4 -32
  613. package/src/renderer/src/components/VeoStudioPanel.tsx +1 -1
  614. package/src/renderer/src/components/WorkspacePanel.tsx +45 -12
  615. package/src/renderer/src/components/browser-shell.css +26 -26
  616. package/src/renderer/src/components/browser-suggestions-popup.css +8 -8
  617. package/src/renderer/src/css/app-shell.css +22 -102
  618. package/src/renderer/src/css/chat.css +221 -34
  619. package/src/renderer/src/css/desktop-tools.css +6 -337
  620. package/src/renderer/src/css/sidebar-workspace.css +20 -0
  621. package/src/renderer/src/css/spotlight.css +2 -2
  622. package/src/renderer/src/css/tool-surfaces.css +328 -58
  623. package/src/renderer/src/css/widget.css +6 -5
  624. package/src/renderer/src/env.d.ts +13 -0
  625. package/src/renderer/src/index.css +15 -63
  626. package/src/renderer/src/tauri.ts +77 -11
  627. package/src/renderer/src/voiceInput.ts +3 -1
  628. package/src/renderer/src-web/App.tsx +6 -8
  629. package/src/renderer/src-web/components/ChatPanel.tsx +1 -1
  630. package/src/renderer/src-web/components/DashboardSidebar.tsx +2 -2
  631. package/src/renderer/src-web/components/ImageStudioPanel.tsx +1 -1
  632. package/src/renderer/src-web/components/MintDashboard.tsx +1 -1
  633. package/src/renderer/src-web/components/SettingsWindow.tsx +6 -851
  634. package/src/renderer/src-web/components/VeoStudioPanel.tsx +1 -1
  635. package/src/renderer/src-web/css/app-shell.css +16 -100
  636. package/src/renderer/src-web/css/chat.css +221 -34
  637. package/src/renderer/src-web/css/sidebar-workspace.css +20 -0
  638. package/src/renderer/src-web/env.d.ts +14 -0
  639. package/src/renderer/src-web/index.css +15 -63
  640. package/src/renderer/src-web/tauri.ts +71 -13
  641. package/src/renderer/tests/browserArtifacts.browser.html +1 -0
  642. package/src/renderer/tests/browserArtifacts.browser.tsx +68 -0
  643. package/src/renderer/tests/chatEscape.browser.html +1 -0
  644. package/src/renderer/tests/chatEscape.browser.tsx +25 -0
  645. package/src/renderer/tests/chatPerformance.browser.html +1 -1
  646. package/src/renderer/tests/collapsedPaste.browser.html +1 -1
  647. package/src/renderer/tests/composerMenus.browser.html +3 -3
  648. package/src/renderer/tests/contextCompaction.browser.html +1 -1
  649. package/src/renderer/tests/errorRecovery.browser.html +1 -1
  650. package/src/renderer/tests/fixtures/preview.webm +0 -0
  651. package/src/renderer/tests/glideSelect.browser.html +1 -2
  652. package/src/renderer/tests/glideSelect.preview.html +1 -1
  653. package/src/renderer/tests/library.browser.tsx +1 -1
  654. package/src/renderer/tests/liveOrb.browser.html +1 -1
  655. package/src/renderer/tests/mediaFixtures.ts +32 -0
  656. package/src/renderer/tests/modInput.browser.html +1 -1
  657. package/src/renderer/tests/sessionSources.browser.tsx +76 -15
  658. package/src/renderer/tests/toolsPanel.browser.tsx +5 -5
  659. package/src/renderer/tests/viewedImages.browser.tsx +3 -3
  660. package/src/renderer/tests/voiceDictation.browser.html +101 -0
  661. package/src/renderer/tests/voicePill.browser.html +3 -3
  662. package/src/renderer/tests/voicePill.preview.html +1 -1
  663. package/src/renderer/tests/webSources.browser.tsx +2 -98
  664. package/src/renderer/tests/workspaceDrop.browser.html +1 -0
  665. package/src/renderer/tests/workspaceDrop.browser.tsx +183 -0
  666. package/src/renderer/tests/workspaceExpansion.browser.html +1 -0
  667. package/src/renderer/tests/workspaceExpansion.browser.tsx +66 -0
  668. package/src/renderer/tests/workspaceRemoval.browser.html +66 -0
  669. package/src/renderer/tests/workspaceUndo.browser.html +10 -2
  670. package/src-tauri/src/app/lifecycle.rs +44 -1
  671. package/src-tauri/src/commands/conversation.rs +99 -73
  672. package/src-tauri/src/commands/integrations.rs +7 -1
  673. package/src-tauri/src/commands/media.rs +7 -0
  674. package/src-tauri/src/commands/workspace.rs +38 -0
  675. package/tsconfig.json +15 -1
  676. package/vite.config.ts +2 -1
  677. package/vite.config.web.ts +2 -0
  678. package/out/web/assets/CliSessionsView-D7hw0Mgj.js +0 -1
  679. package/out/web/assets/CodeReviewPage-C7bEOJfd.js +0 -4
  680. package/out/web/assets/CodeReviewPage-Dte9uLiL.css +0 -1
  681. package/out/web/assets/CommandPalette-0RrF-AOT.js +0 -1
  682. package/out/web/assets/ImageStudioPanel-CdxkAf_r.js +0 -1
  683. package/out/web/assets/LibraryPage--Qfisp6D.js +0 -2
  684. package/out/web/assets/LinkedFoldersView-2nfZbDgN.js +0 -1
  685. package/out/web/assets/McpRegistryPicker-h9uS8_wT.js +0 -1
  686. package/out/web/assets/McpServersView-slfQJzNB.js +0 -1
  687. package/out/web/assets/MintDashboard-BSR5XpXh.js +0 -25
  688. package/out/web/assets/MintDashboard-CWUcCGhd.css +0 -1
  689. package/out/web/assets/PluginsView-l7LSm503.js +0 -1
  690. package/out/web/assets/ScheduledTasksView-CttmLbq1.js +0 -1
  691. package/out/web/assets/SettingsWindow-BCMLYvEV.js +0 -4
  692. package/out/web/assets/SettingsWindow-DcMVmU9u.css +0 -1
  693. package/out/web/assets/SkillsView-rNs1qr_U.js +0 -2
  694. package/out/web/assets/ToolSurfacePage-B9DzEPWN.js +0 -37
  695. package/out/web/assets/ToolSurfacePage-CTfgggF2.css +0 -1
  696. package/out/web/assets/VeoStudioPanel-DiJs_Cg2.js +0 -4
  697. package/out/web/assets/WorkspacePanel-CbJ1PFoZ.js +0 -1
  698. package/out/web/assets/WorkspaceSelector-B2xIp04D.js +0 -1
  699. package/out/web/assets/WorkspaceSelector-Ca8uJOsS.css +0 -1
  700. package/out/web/assets/abnfDiagram-VCTEODGH-CD0CjoGl.js +0 -1
  701. package/out/web/assets/architecture-7GRP2DOG-RKV83OeZ.js +0 -1
  702. package/out/web/assets/architectureDiagram-5GKGNRK7-nN_HAFct.js +0 -36
  703. package/out/web/assets/c4Diagram-UCG6FXSJ-DTdV8_zE.js +0 -38
  704. package/out/web/assets/chunk-2Q5K7J3B-Dmqrq8Tp.js +0 -1
  705. package/out/web/assets/chunk-75Z2AOVW-_M0z5olV.js +0 -2
  706. package/out/web/assets/chunk-CKBBP62Z-BpQEgeHF.js +0 -2
  707. package/out/web/assets/chunk-CLGD4ZFX-D54yGvGS.js +0 -1
  708. package/out/web/assets/chunk-CacB07dV.js +0 -1
  709. package/out/web/assets/chunk-DSNCTWBM-C-gvT2ru.js +0 -2
  710. package/out/web/assets/chunk-DU6HZSFF-CnFngIhW.js +0 -128
  711. package/out/web/assets/chunk-F27PBJKO-BqtWrnEO.js +0 -1
  712. package/out/web/assets/chunk-FOHPRMQF-BaVC1uA7.js +0 -161
  713. package/out/web/assets/chunk-G27WJ6UU-Ckoq5mi2.js +0 -231
  714. package/out/web/assets/chunk-JQ64N6SF-CF8T7GiZ.js +0 -1
  715. package/out/web/assets/chunk-JWPE2WC7-BwtYOHqU.js +0 -1
  716. package/out/web/assets/chunk-LNGE3PJU-AdBoOWw2.js +0 -34
  717. package/out/web/assets/chunk-OBVCFTLP-CRIkunUB.js +0 -1
  718. package/out/web/assets/chunk-P2QGCYS3-UFEU6BxZ.js +0 -1
  719. package/out/web/assets/chunk-POPQ4Y6H-CQcrNbjr.js +0 -1
  720. package/out/web/assets/chunk-PWAF6VOD-Cc2uVDsG.js +0 -1
  721. package/out/web/assets/chunk-R7TYR2AO-DiCxzdAY.js +0 -10
  722. package/out/web/assets/chunk-RHFEMEQ7-b7hnPmrR.js +0 -168
  723. package/out/web/assets/chunk-XXDRQBXY-DnJkbUaw.js +0 -1
  724. package/out/web/assets/chunk-Y2CYZVJY-C9o-s6OY.js +0 -1
  725. package/out/web/assets/classDiagram-DTDB5LWJ-RnC2mYO4.js +0 -1
  726. package/out/web/assets/classDiagram-v2-JRS7N3AN-RnC2mYO4.js +0 -1
  727. package/out/web/assets/config-CnvCChUM.js +0 -2
  728. package/out/web/assets/config-DM6oIVO3.css +0 -1
  729. package/out/web/assets/core-DsKkQ7ig.js +0 -1
  730. package/out/web/assets/cose-bilkent-JH36ORCC--UN4aw5-.js +0 -1
  731. package/out/web/assets/cynefin-OW5HDTMX-CnzQfOGp.js +0 -1
  732. package/out/web/assets/cynefinDiagram-5FMLGOSQ-DVtQnfpm.js +0 -62
  733. package/out/web/assets/cytoscape.esm-Df1UN4Y1.js +0 -321
  734. package/out/web/assets/dagre-3AP2YEHR-DG76_k5_.js +0 -4
  735. package/out/web/assets/dagre-BWadQu2F.js +0 -1
  736. package/out/web/assets/diagram-S7CK7UJ4-CaouUoze.js +0 -30
  737. package/out/web/assets/diagram-UQ7AKVKN-B4bEc26B.js +0 -41
  738. package/out/web/assets/diagram-VX7I27RA-7hH5IPYf.js +0 -24
  739. package/out/web/assets/diagram-Z3DM3KII-CCM4clo8.js +0 -24
  740. package/out/web/assets/dist-BoTOASLF.js +0 -1
  741. package/out/web/assets/dist-js-BkYNznHX.js +0 -1
  742. package/out/web/assets/ebnfDiagram-PWID7BFC-Da7WAM3k.js +0 -1
  743. package/out/web/assets/event-Cdt7Byyj.js +0 -1
  744. package/out/web/assets/eventmodeling-NTZA5JFV-xcfsA0XD.js +0 -1
  745. package/out/web/assets/flowDiagram-A5DVABFB-JdtH1673.js +0 -1
  746. package/out/web/assets/ganttDiagram-EL5Y4UJY-B3ClFGmL.js +0 -292
  747. package/out/web/assets/gitGraph-4MIJSDKK-BZ_y_cDU.js +0 -1
  748. package/out/web/assets/gitGraphDiagram-WWUBYQGX-drhRSYm3.js +0 -106
  749. package/out/web/assets/graphlib-CTR5ZhLf.js +0 -1
  750. package/out/web/assets/index-BZ9xgmMP.css +0 -1
  751. package/out/web/assets/index-Ca8cCS4h.js +0 -168
  752. package/out/web/assets/info-A6RAGUB7-B7I3K0F1.js +0 -1
  753. package/out/web/assets/infoDiagram-RXCK75RN-deX_1MPh.js +0 -2
  754. package/out/web/assets/journeyDiagram-EYS64GPL-CZn2kB8b.js +0 -139
  755. package/out/web/assets/jsx-runtime-DN4NhQUK.js +0 -1
  756. package/out/web/assets/katex-O3jvqgnU.js +0 -257
  757. package/out/web/assets/markdown-CMhYIcWB.js +0 -39
  758. package/out/web/assets/mermaid-parser.core-Whu2rlJC.js +0 -7
  759. package/out/web/assets/mermaid.core-CKyPo8VH.js +0 -11
  760. package/out/web/assets/modelManager-CUaGWMWu.js +0 -2
  761. package/out/web/assets/oauthManager-DlNhXJr6.js +0 -1
  762. package/out/web/assets/packet-AYTQ26CC-CEeIRKRG.js +0 -1
  763. package/out/web/assets/pegDiagram-XKGWAZYB-BYadI-KO.js +0 -1
  764. package/out/web/assets/pie-WAS4IAKB-D8uf4dh5.js +0 -1
  765. package/out/web/assets/pieDiagram-E7YTZNPT-CjSDy4hO.js +0 -39
  766. package/out/web/assets/radar-RG4KPBEZ-DZJxnokY.js +0 -1
  767. package/out/web/assets/railroad-74A4TZTK-DBysUiUi.js +0 -1
  768. package/out/web/assets/railroad-abnf-HS5TGJTU-CHWxoJYg.js +0 -1
  769. package/out/web/assets/railroad-ebnf-LZEXJU2U-DDv7X6bY.js +0 -1
  770. package/out/web/assets/railroad-peg-WCYAUIDC-DpfcYYNJ.js +0 -1
  771. package/out/web/assets/railroadDiagram-O6MQD6OU-CYtyv0t3.js +0 -1
  772. package/out/web/assets/rough.esm-DFbTUy8a.js +0 -1
  773. package/out/web/assets/sankeyDiagram-P5KCCOFB-Bn2x6C4Y.js +0 -40
  774. package/out/web/assets/sequenceDiagram-WJ2MYXX4-BvFLKtPd.js +0 -162
  775. package/out/web/assets/sizeCapture-X5ZJPWSS-DKeOCaN2.js +0 -1
  776. package/out/web/assets/src-DnfeXQPr.js +0 -1
  777. package/out/web/assets/stateDiagram-HBIQ2CUA-Bx0GWeaY.js +0 -1
  778. package/out/web/assets/stateDiagram-v2-4QOOHH4V--hol1yg_.js +0 -1
  779. package/out/web/assets/studio-B1mk40wD.js +0 -1
  780. package/out/web/assets/swimlanes-XN3QIQJK-CCma0T7L.js +0 -1
  781. package/out/web/assets/swimlanesDiagram-VK2B7HYN-BkohoVsU.js +0 -8
  782. package/out/web/assets/timeline-definition-24CTP7MA-iCRhhJ7C.js +0 -120
  783. package/out/web/assets/treeView-Q6P3EWNA-DZ-y08qp.js +0 -1
  784. package/out/web/assets/treemap-WGGIJYW6-De0CxzMx.js +0 -1
  785. package/out/web/assets/vennDiagram-4TSXK5OY-w_7aZ6xe.js +0 -34
  786. package/out/web/assets/wardley-WFR3VGLG-DT0y0xJ4.js +0 -1
  787. package/out/web/assets/window-BJCVtyET.js +0 -1
  788. package/src/renderer/shared/components/ChatPanel.test.tsx +0 -21
  789. package/src/renderer/shared/components/FormattedMessage.tsx +0 -11
  790. package/src/renderer/shared/components/GlideSelect.d.ts +0 -31
  791. package/src/renderer/shared/components/GlideSelect.jsx +0 -266
  792. package/src/renderer/shared/components/InlineThoughtNote.tsx +0 -27
  793. package/src/renderer/shared/components/ModSessionControls.tsx +0 -8
  794. package/src/renderer/shared/components/ModUi.tsx +0 -26
  795. package/src/renderer/shared/components/ProgressActivity.tsx +0 -17
  796. package/src/renderer/shared/components/ReviewHistory.tsx +0 -42
  797. package/src/renderer/shared/components/RunSummaryDashboard.tsx +0 -143
  798. package/src/renderer/shared/components/SelectField.tsx +0 -38
  799. package/src/renderer/shared/components/SessionSources.tsx +0 -48
  800. package/src/renderer/shared/components/SessionSourcesPopover.tsx +0 -61
  801. package/src/renderer/shared/components/ToolSurfacePage.test.tsx +0 -32
  802. package/src/renderer/shared/components/ViewedImages.tsx +0 -36
  803. package/src/renderer/shared/components/WorkspaceContextPopover.tsx +0 -138
  804. package/src/renderer/shared/components/ui/demo.tsx +0 -26
  805. package/src/renderer/shared/css/session-sources-popover.css +0 -9
  806. package/src/renderer/src/components/CalculationCard.tsx +0 -3
  807. package/src/renderer/src/components/ImageGenCard.tsx +0 -2
  808. package/src/renderer/src/components/ImageSearchCard.tsx +0 -2
  809. package/src/renderer/src/components/MermaidCard.tsx +0 -1
  810. package/src/renderer/src/components/PicturesLibrary.tsx +0 -2
  811. package/src/renderer/src/components/Settings/AgentsTab.tsx +0 -4
  812. package/src/renderer/src/components/Settings/AudioTab.tsx +0 -3
  813. package/src/renderer/src/components/Settings/AutomationTab.tsx +0 -3
  814. package/src/renderer/src/components/Settings/GeneralTab.tsx +0 -3
  815. package/src/renderer/src/components/Settings/MemoryTab.tsx +0 -3
  816. package/src/renderer/src/components/Settings/PluginsTab.tsx +0 -3
  817. package/src/renderer/src/components/Settings/ProfileTab.tsx +0 -3
  818. package/src/renderer/src/components/Settings/ShortcutsTab.tsx +0 -3
  819. package/src/renderer/src/components/Settings/ThemeTab.tsx +0 -3
  820. package/src/renderer/src/components/StockCard.tsx +0 -3
  821. package/src/renderer/src/components/WeatherCard.tsx +0 -3
  822. package/src/renderer/src/css/pictures.css +0 -2
  823. package/src/renderer/src/css/settings/base.css +0 -1266
  824. package/src/renderer/src-web/components/PicturesLibrary.tsx +0 -2
  825. package/src/renderer/src-web/components/Settings/AgentsTab.tsx +0 -4
  826. package/src/renderer/src-web/components/Settings/AudioTab.tsx +0 -3
  827. package/src/renderer/src-web/components/Settings/AutomationTab.tsx +0 -3
  828. package/src/renderer/src-web/components/Settings/GeneralTab.tsx +0 -3
  829. package/src/renderer/src-web/components/Settings/MemoryTab.tsx +0 -3
  830. package/src/renderer/src-web/components/Settings/PluginsTab.tsx +0 -3
  831. package/src/renderer/src-web/components/Settings/ProfileTab.tsx +0 -3
  832. package/src/renderer/src-web/components/Settings/ShortcutsTab.tsx +0 -3
  833. package/src/renderer/src-web/components/Settings/ThemeTab.tsx +0 -3
  834. package/src/renderer/src-web/css/pictures.css +0 -2
  835. package/src/renderer/src-web/css/spotlight.css +0 -102
  836. package/src/renderer/src-web/css/widget.css +0 -213
  837. /package/src/renderer/shared/components/{UiMockupWidget.tsx → cards/UiMockupWidget.tsx} +0 -0
  838. /package/src/renderer/shared/components/{ContextCompactionStatus.tsx → chat/ContextCompactionStatus.tsx} +0 -0
  839. /package/src/renderer/shared/components/{GeminiLiveOverlay.css → chat/GeminiLiveOverlay.css} +0 -0
  840. /package/src/renderer/shared/components/{GeminiLiveOverlay.test.tsx → chat/GeminiLiveOverlay.test.tsx} +0 -0
  841. /package/src/renderer/shared/components/{SlashSuggestions.test.tsx → chat/SlashSuggestions.test.tsx} +0 -0
  842. /package/src/renderer/shared/components/{VirtualChatHistory.tsx → chat/VirtualChatHistory.tsx} +0 -0
  843. /package/src/renderer/shared/components/{VoicePill.d.ts → chat/VoicePill.d.ts} +0 -0
  844. /package/src/renderer/shared/components/{VoicePill.test.tsx → chat/VoicePill.test.tsx} +0 -0
  845. /package/src/renderer/shared/components/{ScreenCaptureDialog.css → studio/ScreenCaptureDialog.css} +0 -0
  846. /package/src/renderer/shared/components/{ScreenCaptureDialog.tsx → studio/ScreenCaptureDialog.tsx} +0 -0
  847. /package/src/renderer/shared/components/{SelectField.test.tsx → ui/SelectField.test.tsx} +0 -0
  848. /package/src/renderer/shared/components/{background-terminals.css → workspace/background-terminals.css} +0 -0
@@ -1,5 +1,5 @@
1
1
  import { afterEach, describe, expect, it, vi } from 'vitest'
2
- import { createConversationLifecycle, type ConversationTransport, type ConversationEffects, type PendingApproval } from './lifecycle'
2
+ import { createConversationLifecycle, conversationPollIntervalsMs, type ConversationTransport, type ConversationEffects, type PendingApproval } from './lifecycle'
3
3
  import type { AgentProgress, ChatResponse, ConversationChanges, ConversationSnapshot, InteractionMemory, ChatSession } from '../types'
4
4
 
5
5
  function deferred<T>() {
@@ -66,6 +66,32 @@ describe('Conversation lifecycle through the renderer interface', () => {
66
66
  results[1].resolve(reply); await retried
67
67
  })
68
68
 
69
+ it('fingerprints attachments for retry deduplication without calling JSON.stringify on attachment payloads', async () => {
70
+ const received: any[] = []
71
+ const results = [deferred<ChatResponse>(), deferred<ChatResponse>(), deferred<ChatResponse>()]
72
+ const { lifecycle } = setup({ streamChatMessage: (...args) => {
73
+ received.push(args[15])
74
+ return results[received.length - 1].promise
75
+ } })
76
+ const stringifySpy = vi.spyOn(JSON, 'stringify')
77
+ const img1 = { name: 'photo.png', dataUri: 'data:image/png;base64,AAAA1111' }
78
+ const img2 = { name: 'photo.png', dataUri: 'data:image/png;base64,BBBB2222' }
79
+
80
+ const attempt1 = lifecycle.sendPrompt('Analyze', { imageAttachments: [img1] })
81
+ results[0].reject(new Error('Network error')); await attempt1
82
+
83
+ const attempt2 = lifecycle.sendPrompt('Analyze', { imageAttachments: [img1] })
84
+ results[1].reject(new Error('Network error')); await attempt2
85
+
86
+ const attempt3 = lifecycle.sendPrompt('Analyze', { imageAttachments: [img2] })
87
+ results[2].resolve(reply); await attempt3
88
+
89
+ expect(stringifySpy).not.toHaveBeenCalled()
90
+ expect(received[0]?.requestId).toBeTruthy()
91
+ expect(received[1]?.requestId).toBe(received[0]?.requestId)
92
+ expect(received[2]?.requestId).not.toBe(received[0]?.requestId)
93
+ })
94
+
69
95
  it('rejects old A snapshots after A → B → A, including an old failure', async () => {
70
96
  const reads = [deferred<ConversationSnapshot>(), deferred<ConversationSnapshot>(), deferred<ConversationSnapshot>()]
71
97
  let next = 0
@@ -360,3 +386,139 @@ it('can submit from a LAN HTTP browser without crypto.randomUUID', async()=>{
360
386
  expect(lifecycle.getSnapshot().sending).toBe(false)
361
387
  vi.unstubAllGlobals()
362
388
  })
389
+
390
+ it('exports adaptive conversation polling intervals for active and idle runs', () => {
391
+ expect(conversationPollIntervalsMs(true)).toEqual({ historyMs: 1500, sessionsMs: 5000 })
392
+ expect(conversationPollIntervalsMs(false)).toEqual({ historyMs: 5000, sessionsMs: 15000 })
393
+ })
394
+
395
+ it('adapts polling intervals between idle and active runs in watch', async () => {
396
+ vi.useFakeTimers()
397
+ let historySyncCount = 0
398
+ let sessionRefreshCount = 0
399
+ const { lifecycle, streams } = setup({
400
+ getConversationChanges: async () => { historySyncCount++; return { changes: [], cursor: 0, hasMore: false } },
401
+ listChatSessions: async () => { sessionRefreshCount++; return [] },
402
+ })
403
+ await lifecycle.refreshHistory()
404
+
405
+ const browser = {
406
+ window: { addEventListener: vi.fn(), removeEventListener: vi.fn(), setInterval, clearInterval },
407
+ document: { addEventListener: vi.fn(), removeEventListener: vi.fn(), visibilityState: 'visible' },
408
+ } as unknown as import('./lifecycle').ConversationBrowser
409
+
410
+ const stop = lifecycle.watch(browser, true)
411
+ // Initial synchronous invocation at attach
412
+ expect(historySyncCount).toBe(1)
413
+ expect(sessionRefreshCount).toBe(0)
414
+
415
+ // Idle state: history syncs every 5s, sessions every 15s
416
+ await vi.advanceTimersByTimeAsync(4900)
417
+ expect(historySyncCount).toBe(1)
418
+ await vi.advanceTimersByTimeAsync(200)
419
+ expect(historySyncCount).toBe(2)
420
+
421
+ await vi.advanceTimersByTimeAsync(9700)
422
+ expect(sessionRefreshCount).toBe(0)
423
+ await vi.advanceTimersByTimeAsync(300)
424
+ expect(sessionRefreshCount).toBe(1)
425
+
426
+ // Start an active prompt -> switches to active polling (1.5s history, 5s sessions)
427
+ const run = lifecycle.sendPrompt('test active run')
428
+ const initialHistory = historySyncCount
429
+ await vi.advanceTimersByTimeAsync(1500)
430
+ expect(historySyncCount).toBe(initialHistory + 1)
431
+
432
+ // Finish run -> returns to idle polling
433
+ streams[0].result.resolve(reply)
434
+ await run
435
+ const afterRunHistory = historySyncCount
436
+ await vi.advanceTimersByTimeAsync(1500)
437
+ // Since it returned to idle (5000ms), 1500ms shouldn't trigger another sync
438
+ expect(historySyncCount).toBe(afterRunHistory)
439
+
440
+ stop()
441
+ expect(vi.getTimerCount()).toBe(0)
442
+ })
443
+
444
+ describe('Queued messages lifecycle and steering', () => {
445
+ it('enqueues, edits, and removes queued prompts', () => {
446
+ const { lifecycle } = setup()
447
+ expect(lifecycle.getSnapshot().queuedPrompts).toEqual([])
448
+
449
+ lifecycle.queuePrompt({ text: 'Hello from queue' })
450
+ const snapshot1 = lifecycle.getSnapshot()
451
+ expect(snapshot1.queuedPrompts).toHaveLength(1)
452
+ expect(snapshot1.queuedPrompts[0].text).toBe('Hello from queue')
453
+ const promptId = snapshot1.queuedPrompts[0].id
454
+
455
+ // Edit restores text to composer and removes from queue
456
+ lifecycle.editQueuedPrompt(promptId)
457
+ const snapshot2 = lifecycle.getSnapshot()
458
+ expect(snapshot2.queuedPrompts).toHaveLength(0)
459
+ expect(snapshot2.message).toBe('Hello from queue')
460
+
461
+ // Re-queue and remove
462
+ lifecycle.queuePrompt({ text: 'To be removed' })
463
+ const promptId2 = lifecycle.getSnapshot().queuedPrompts[0].id
464
+ lifecycle.removeQueuedPrompt(promptId2)
465
+ expect(lifecycle.getSnapshot().queuedPrompts).toHaveLength(0)
466
+ })
467
+
468
+ it('automatically dispatches the next queued prompt on natural turn completion', async () => {
469
+ const { lifecycle, streams } = setup()
470
+ const run1 = lifecycle.sendPrompt('Turn 1')
471
+ expect(lifecycle.getSnapshot().sending).toBe(true)
472
+
473
+ // Queue Turn 2 while Turn 1 is running
474
+ lifecycle.queuePrompt({ text: 'Turn 2' })
475
+ expect(lifecycle.getSnapshot().queuedPrompts).toHaveLength(1)
476
+
477
+ // Turn 1 completes
478
+ streams[0].result.resolve(reply)
479
+ await run1
480
+
481
+ // Turn 2 should be automatically popped and dispatched
482
+ expect(lifecycle.getSnapshot().queuedPrompts).toHaveLength(0)
483
+ expect(streams).toHaveLength(2)
484
+ expect(lifecycle.getSnapshot().sending).toBe(true)
485
+ expect(lifecycle.getSnapshot().sendingMessage).toBe('Turn 2')
486
+
487
+ // Turn 2 completes
488
+ streams[1].result.resolve(reply)
489
+ await new Promise(r => setTimeout(r, 10))
490
+ expect(lifecycle.getSnapshot().sending).toBe(false)
491
+ })
492
+
493
+ it('pauses the queue on user cancellation and does not auto-dispatch', async () => {
494
+ const { lifecycle, streams } = setup()
495
+ lifecycle.sendPrompt('Turn 1')
496
+ lifecycle.queuePrompt({ text: 'Turn 2' })
497
+ expect(lifecycle.getSnapshot().queuePaused).toBe(false)
498
+
499
+ // User cancels Turn 1
500
+ await lifecycle.cancel()
501
+ expect(lifecycle.getSnapshot().sending).toBe(false)
502
+ expect(lifecycle.getSnapshot().queuePaused).toBe(true)
503
+ // The queued prompt must remain preserved in queue
504
+ expect(lifecycle.getSnapshot().queuedPrompts).toHaveLength(1)
505
+ expect(lifecycle.getSnapshot().queuedPrompts[0].text).toBe('Turn 2')
506
+ // No second stream should have been dispatched
507
+ expect(streams).toHaveLength(1)
508
+ })
509
+
510
+ it('interrupts running turn and steers directly to the selected queued prompt', async () => {
511
+ const { lifecycle, streams } = setup()
512
+ lifecycle.sendPrompt('Turn 1')
513
+ lifecycle.queuePrompt({ text: 'Important Urgent Turn' })
514
+ const queuedId = lifecycle.getSnapshot().queuedPrompts[0].id
515
+
516
+ // Steer queued prompt
517
+ await lifecycle.steerQueuedPrompt(queuedId)
518
+ // Turn 1 cancelled, Turn 2 steered immediately
519
+ expect(lifecycle.getSnapshot().queuedPrompts).toHaveLength(0)
520
+ expect(lifecycle.getSnapshot().sending).toBe(true)
521
+ expect(lifecycle.getSnapshot().sendingMessage).toBe('Important Urgent Turn')
522
+ expect(streams).toHaveLength(2)
523
+ })
524
+ })
@@ -3,7 +3,7 @@ import { compactAgentProgressForPersistence, mergeActivitySnapshots } from '../a
3
3
  import { requiresExplicitApproval } from '../utils/approval'
4
4
  import { navigateToProject } from './projectNavigation'
5
5
  import type { MintPlatformApi } from '../platform'
6
- import type { AgentProgress, ChatResponse, ChatSession, InteractionMemory } from '../types'
6
+ import type { AgentProgress, ChatResponse, ChatSession, InteractionMemory, QueuedPrompt } from '../types'
7
7
 
8
8
  export type ConversationTransport = Pick<MintPlatformApi,
9
9
  | 'getConversationSnapshot' | 'getConversationChanges' | 'listChatSessions'
@@ -60,6 +60,12 @@ export interface ConversationBrowser {
60
60
  document: Pick<Document, 'visibilityState' | 'addEventListener' | 'removeEventListener'>
61
61
  }
62
62
 
63
+ export function conversationPollIntervalsMs(activeRun: boolean): { historyMs: number; sessionsMs: number } {
64
+ return activeRun
65
+ ? { historyMs: 1500, sessionsMs: 5000 }
66
+ : { historyMs: 5000, sessionsMs: 15000 }
67
+ }
68
+
63
69
  /** Owns ordering and lifecycle; callers never handle generations or cursors. */
64
70
  export function createConversationLifecycle(
65
71
  conversationId: string,
@@ -82,6 +88,8 @@ export function createConversationLifecycle(
82
88
  const pendingSubmissions = new Map<string, { signature: string; requestId: string }>()
83
89
  const runs = new Map<string, Run>()
84
90
  const subscribers = new Set<() => void>()
91
+ const conversationQueuedPrompts = new Map<string, QueuedPrompt[]>()
92
+ const conversationQueuePaused = new Map<string, boolean>()
85
93
  const update = (patch: Partial<ConversationView>) => {
86
94
  state = { ...state, ...patch }
87
95
  subscribers.forEach(notify => notify())
@@ -121,8 +129,11 @@ export function createConversationLifecycle(
121
129
  session = { chatId: id }
122
130
  cursor = null
123
131
  projectSerial++
132
+ const activePrompts = conversationQueuedPrompts.get(id) || []
133
+ const activePaused = conversationQueuePaused.get(id) || false
124
134
  update({
125
135
  ...transitionConversation(state, { type: 'session_switched', draft }), conversationId: id,
136
+ queuedPrompts: activePrompts, queuePaused: activePaused,
126
137
  interactions: [], hasOlderInteractions: false, agentActivitySnapshots: {},
127
138
  streamingConversationId: null, activeTurnId: null, sessionAutoApproved: false,
128
139
  })
@@ -252,8 +263,10 @@ export function createConversationLifecycle(
252
263
  if (origin === session) effects.onError?.(error)
253
264
  } finally {
254
265
  if (approvalToken) removeApproval(origin.chatId, approvalToken)
266
+ conversationQueuePaused.set(origin.chatId, true)
255
267
  if (origin === session && !runs.has(origin.chatId)) {
256
268
  update({ ...transitionConversation(state, { type: 'run_cancelled' }),
269
+ queuePaused: true,
257
270
  streamingConversationId: null, activeTurnId: null, sessionAutoApproved: false })
258
271
  }
259
272
  }
@@ -271,7 +284,15 @@ export function createConversationLifecycle(
271
284
  update({ ...transitionConversation(state, { type: 'run_started', message: prompt, imageCount: images.length, videoCount: videos.length }),
272
285
  streamingConversationId: origin.chatId, activeTurnId: null, sessionAutoApproved: false })
273
286
  const draft = { message: state.message, images: state.imageAttachments, videos: state.videoAttachments, document: state.documentAttachment }
274
- const signature = JSON.stringify([prompt, images, videos, options.documentAttachment])
287
+ const uriFingerprint = (name: string, dataUri: string) =>
288
+ `${name}:${dataUri.length}:${dataUri.slice(0, 64)}:${dataUri.slice(-32)}`
289
+ const doc = options.documentAttachment
290
+ const signature = [
291
+ prompt,
292
+ images.map(i => uriFingerprint(i.name, i.dataUri)).join('|'),
293
+ videos.map(v => uriFingerprint(v.name, v.dataUri)).join('|'),
294
+ doc ? uriFingerprint(doc.filename, doc.dataUri) : '',
295
+ ].join('\u0000')
275
296
  let submission = pendingSubmissions.get(origin.chatId)
276
297
  if (submission?.signature !== signature) {
277
298
  submission = { signature, requestId: globalThis.crypto?.randomUUID?.() ?? `submission-${Date.now().toString(36)}-${Array.from(globalThis.crypto.getRandomValues(new Uint8Array(16)), byte => byte.toString(16).padStart(2, '0')).join('')}` }
@@ -329,10 +350,31 @@ export function createConversationLifecycle(
329
350
  } finally {
330
351
  flushProgress(run)
331
352
  if (runs.get(origin.chatId) === run) {
353
+ const isCurrent = currentRun(run)
332
354
  removeApproval(origin.chatId)
333
- if (currentRun(run)) update({ ...transitionConversation(state, { type: 'run_finished' }),
334
- streamingConversationId: null, activeTurnId: null, sessionAutoApproved: false })
335
355
  runs.delete(origin.chatId)
356
+ if (isCurrent) {
357
+ update({ ...transitionConversation(state, { type: 'run_finished' }),
358
+ streamingConversationId: null, activeTurnId: null, sessionAutoApproved: false })
359
+ } else {
360
+ subscribers.forEach(notify => notify())
361
+ }
362
+ const isPaused = conversationQueuePaused.get(origin.chatId) || false
363
+ const chatQueue = conversationQueuedPrompts.get(origin.chatId) || []
364
+ if (!isPaused && chatQueue.length > 0) {
365
+ const next = chatQueue.shift()!
366
+ conversationQueuedPrompts.set(origin.chatId, chatQueue)
367
+ if (origin === session) {
368
+ dispatch({ type: 'queued_prompt_dequeued', id: next.id })
369
+ }
370
+ void sendPrompt(next.text, {
371
+ imageAttachments: next.imageAttachments,
372
+ videoAttachments: next.videoAttachments,
373
+ documentAttachment: next.documentAttachment,
374
+ agentMode: options.agentMode,
375
+ planMode: options.planMode,
376
+ })
377
+ }
336
378
  }
337
379
  }
338
380
  }
@@ -381,29 +423,144 @@ export function createConversationLifecycle(
381
423
 
382
424
  function watch(browser: ConversationBrowser, historyVisible: boolean) {
383
425
  let active = true
426
+ let activeRun = state.sending || runs.size > 0
427
+ let historyTimer: number | undefined
428
+ let sessionsTimer: number | undefined
429
+
384
430
  const visible = () => active && browser.document.visibilityState === 'visible'
385
431
  const sync = () => { if (historyVisible && visible()) void syncHistory(visible) }
386
432
  const refresh = () => { if (visible()) void refreshSessions().catch(() => {}) }
387
433
  const focus = () => { sync(); refresh() }
434
+
435
+ const scheduleTimers = () => {
436
+ if (historyTimer !== undefined) browser.window.clearInterval(historyTimer)
437
+ if (sessionsTimer !== undefined) browser.window.clearInterval(sessionsTimer)
438
+ if (!active) return
439
+
440
+ const intervals = conversationPollIntervalsMs(activeRun)
441
+ historyTimer = historyVisible ? browser.window.setInterval(sync, intervals.historyMs) : undefined
442
+ sessionsTimer = browser.window.setInterval(refresh, intervals.sessionsMs)
443
+ }
444
+
445
+ const checkActiveRunTransition = () => {
446
+ const currentActive = state.sending || runs.size > 0
447
+ if (currentActive !== activeRun) {
448
+ activeRun = currentActive
449
+ scheduleTimers()
450
+ if (activeRun) {
451
+ sync()
452
+ refresh()
453
+ }
454
+ }
455
+ }
456
+
457
+ subscribers.add(checkActiveRunTransition)
388
458
  sync()
389
- const historyTimer = historyVisible ? browser.window.setInterval(sync, 1500) : undefined
390
- const sessionsTimer = browser.window.setInterval(refresh, 5000)
459
+ scheduleTimers()
460
+
391
461
  browser.window.addEventListener('focus', focus)
392
462
  browser.document.addEventListener('visibilitychange', focus)
393
463
  return () => {
394
464
  active = false
465
+ subscribers.delete(checkActiveRunTransition)
395
466
  if (historyTimer !== undefined) browser.window.clearInterval(historyTimer)
396
- browser.window.clearInterval(sessionsTimer)
467
+ if (sessionsTimer !== undefined) browser.window.clearInterval(sessionsTimer)
397
468
  browser.window.removeEventListener('focus', focus)
398
469
  browser.document.removeEventListener('visibilitychange', focus)
399
470
  }
400
471
  }
401
472
 
473
+ function queuePrompt(data: {
474
+ text: string
475
+ imageAttachments?: ConversationState['imageAttachments']
476
+ videoAttachments?: ConversationState['videoAttachments']
477
+ documentAttachment?: ConversationState['documentAttachment']
478
+ }) {
479
+ const id = `q-${Date.now().toString(36)}-${Math.random().toString(36).slice(2, 7)}`
480
+ const prompt: QueuedPrompt = {
481
+ id,
482
+ chatId: session.chatId,
483
+ text: data.text,
484
+ imageAttachments: data.imageAttachments && data.imageAttachments.length > 0 ? [...data.imageAttachments] : undefined,
485
+ videoAttachments: data.videoAttachments && data.videoAttachments.length > 0 ? [...data.videoAttachments] : undefined,
486
+ documentAttachment: data.documentAttachment || null,
487
+ createdAt: Date.now(),
488
+ }
489
+ const current = conversationQueuedPrompts.get(session.chatId) || []
490
+ conversationQueuedPrompts.set(session.chatId, [...current, prompt])
491
+ conversationQueuePaused.set(session.chatId, false)
492
+ dispatch({ type: 'prompt_queued', prompt })
493
+ }
494
+
495
+ function removeQueuedPrompt(id: string) {
496
+ const current = conversationQueuedPrompts.get(session.chatId) || []
497
+ conversationQueuedPrompts.set(session.chatId, current.filter(p => p.id !== id))
498
+ dispatch({ type: 'queued_prompt_removed', id })
499
+ }
500
+
501
+ function editQueuedPrompt(id: string) {
502
+ const current = conversationQueuedPrompts.get(session.chatId) || []
503
+ const found = current.find(p => p.id === id)
504
+ if (!found) return
505
+ conversationQueuedPrompts.set(session.chatId, current.filter(p => p.id !== id))
506
+ dispatch({ type: 'queued_prompt_restored_to_composer', prompt: found })
507
+ }
508
+
509
+ function clearQueuedPrompts() {
510
+ conversationQueuedPrompts.delete(session.chatId)
511
+ conversationQueuePaused.set(session.chatId, false)
512
+ dispatch({ type: 'queued_prompts_cleared' })
513
+ }
514
+
515
+ function setQueuePaused(paused: boolean) {
516
+ conversationQueuePaused.set(session.chatId, paused)
517
+ dispatch({ type: 'queue_paused_set', paused })
518
+ }
519
+
520
+ function resumeQueue() {
521
+ setQueuePaused(false)
522
+ if (!state.sending) {
523
+ const current = conversationQueuedPrompts.get(session.chatId) || []
524
+ const next = current[0]
525
+ if (next) {
526
+ conversationQueuedPrompts.set(session.chatId, current.slice(1))
527
+ dispatch({ type: 'queued_prompt_dequeued', id: next.id })
528
+ void sendPrompt(next.text, {
529
+ imageAttachments: next.imageAttachments,
530
+ videoAttachments: next.videoAttachments,
531
+ documentAttachment: next.documentAttachment,
532
+ })
533
+ }
534
+ }
535
+ }
536
+
537
+ async function steerQueuedPrompt(id: string) {
538
+ const origin = session
539
+ const current = conversationQueuedPrompts.get(origin.chatId) || []
540
+ const found = current.find(p => p.id === id)
541
+ if (!found) return
542
+ conversationQueuedPrompts.set(origin.chatId, current.filter(p => p.id !== id))
543
+ conversationQueuePaused.set(origin.chatId, false)
544
+ if (origin === session) {
545
+ dispatch({ type: 'queued_prompt_dequeued', id })
546
+ dispatch({ type: 'queue_paused_set', paused: false })
547
+ }
548
+ if (state.sending && runs.has(origin.chatId)) {
549
+ await cancel()
550
+ }
551
+ void sendPrompt(found.text, {
552
+ imageAttachments: found.imageAttachments,
553
+ videoAttachments: found.videoAttachments,
554
+ documentAttachment: found.documentAttachment,
555
+ })
556
+ }
557
+
402
558
  return {
403
559
  getSnapshot: () => state,
404
560
  subscribe: (notify: () => void) => { subscribers.add(notify); return () => { subscribers.delete(notify) } },
405
561
  activate, refreshHistory, refreshSessions, syncHistory, loadOlder, sendPrompt, cancel,
406
562
  receiveApproval, resolveApproval, clearHistory, selectProject, watch,
563
+ queuePrompt, removeQueuedPrompt, editQueuedPrompt, clearQueuedPrompts, setQueuePaused, resumeQueue, steerQueuedPrompt,
407
564
  appendInteraction: (row: Omit<InteractionMemory, 'chatId' | 'status'> & Partial<Pick<InteractionMemory, 'chatId' | 'status'>>) =>
408
565
  update({ interactions: [...state.interactions, { chatId: session.chatId, status: 'completed', ...row }] }),
409
566
  compose: (message: string) => dispatch({ type: 'compose', message }),
@@ -103,3 +103,21 @@ describe('project selection', () => {
103
103
  })
104
104
 
105
105
  })
106
+
107
+ it('handoff opens the exact saved conversation with its own workspace', async () => {
108
+ const { navigateToSavedConversation } = await import('./projectNavigation')
109
+ const target = session('cli::saved', '/projects/target', '2026-10-18T00:00:00Z', 'cli')
110
+ const { state, ports } = fixture([target])
111
+ expect(await navigateToSavedConversation(target.id, ports)).toBe(true)
112
+ expect(state.activeId).toBe('cli::saved')
113
+ expect(state.workspace).toBe('/projects/target')
114
+ expect(state.view).toBe('chat')
115
+ })
116
+ it('a missing or superseded handoff never opens a different conversation', async () => {
117
+ const { navigateToSavedConversation } = await import('./projectNavigation')
118
+ const { state, ports } = fixture([session('other', null, '2026-10-18T00:00:00Z')])
119
+ expect(await navigateToSavedConversation('deleted', ports)).toBe(false)
120
+ expect(state.activeId).toBe('conversation-origin')
121
+ expect(await navigateToSavedConversation('other', { ...ports, isCurrent: () => false })).toBe(false)
122
+ expect(state.activeId).toBe('conversation-origin')
123
+ })
@@ -37,3 +37,14 @@ export async function navigateToProject(path: string, navigation: ProjectNavigat
37
37
  await navigation.newChat(targetPath, view)
38
38
  }
39
39
  }
40
+
41
+ /** Open a persisted ID without substituting another session or its workspace. */
42
+ export async function navigateToSavedConversation(id: string, navigation: Pick<ProjectNavigation, 'listSessions' | 'openSession' | 'isCurrent'>): Promise<boolean> {
43
+ if (navigation.isCurrent?.() === false) return false
44
+ const sessions = await navigation.listSessions()
45
+ if (navigation.isCurrent?.() === false) return false
46
+ const session = sessions.find(session => session.id === id)
47
+ if (!session) return false
48
+ await navigation.openSession(session, 'chat')
49
+ return true
50
+ }
@@ -160,4 +160,24 @@ describe.each([['Desktop', desktop], ['Web', web]] as const)('%s Conversation tr
160
160
  'chat-1', undefined, true)).resolves.toEqual(response)
161
161
  expect(captured).toMatchObject({ ownerToken: 'owner-token', request: { chatId: 'chat-1', planMode: true } })
162
162
  })
163
+
164
+ it('validates the 32 MiB request limit without TextEncoder allocations or double JSON.stringify on native IPC', async () => {
165
+ const encodeSpy = vi.spyOn(TextEncoder.prototype, 'encode')
166
+ const stringifySpy = vi.spyOn(JSON, 'stringify')
167
+ ;(window as any).__TAURI_INTERNALS__ = {}
168
+ native.invoke.mockResolvedValue(response)
169
+
170
+ await expect(adapter.streamChatMessage('hello', () => {}, 'data:image/png;base64,AAAA')).resolves.toEqual(response)
171
+ expect(encodeSpy).not.toHaveBeenCalled()
172
+ expect(stringifySpy).not.toHaveBeenCalled()
173
+
174
+ const oversized = 'A'.repeat(32 * 1024 * 1024 + 64)
175
+ await expect(adapter.streamChatMessage('hello', () => {}, oversized)).rejects.toThrow(
176
+ 'Attachments exceed the 32 MiB request limit. Send fewer files at once.',
177
+ )
178
+ delete (window as any).__TAURI_INTERNALS__
179
+ await expect(adapter.streamChatMessage('hello', () => {}, oversized)).rejects.toThrow(
180
+ 'Attachments exceed the 32 MiB request limit. Send fewer files at once.',
181
+ )
182
+ })
163
183
  })
@@ -84,6 +84,29 @@ function withMediaPlaceholders(message: string, imageDataUri?: string | null, vi
84
84
  return message
85
85
  }
86
86
 
87
+ const MAX_REQUEST_BYTES = 32 * 1024 * 1024
88
+ const REQUEST_LIMIT_ERROR = 'Attachments exceed the 32 MiB request limit. Send fewer files at once.'
89
+
90
+ function utf8ByteLength(value?: string | null): number {
91
+ if (!value) return 0
92
+ if (value.length > MAX_REQUEST_BYTES) return value.length
93
+ if (value.startsWith('data:') && value.includes(';base64,')) return value.length
94
+ let bytes = value.length
95
+ for (let i = 0; i < value.length; i++) {
96
+ const code = value.charCodeAt(i)
97
+ if (code >= 0x80) {
98
+ if (code <= 0x7ff) bytes += 1
99
+ else if (code >= 0xd800 && code <= 0xdbff) {
100
+ bytes += 2
101
+ i++
102
+ } else {
103
+ bytes += 2
104
+ }
105
+ }
106
+ }
107
+ return bytes
108
+ }
109
+
87
110
  /** Shared wire contract; adapters supply runtime detection, address and authentication. */
88
111
  export function createConversationTransport(environment: TransportEnvironment): ConversationOperations {
89
112
  const requestBody = (message: string, imageDataUri?: string | null, audioDataUri?: string | null,
@@ -95,14 +118,33 @@ export function createConversationTransport(environment: TransportEnvironment):
95
118
  imageDataUri, audioDataUri, videoDataUri, documentAttachment, workspacePath, chatId, agentId, planMode, pinnedMcpServer,
96
119
  })
97
120
 
98
- const validate = (request: ReturnType<typeof requestBody>) => {
99
- const body = JSON.stringify(request)
100
- if (new TextEncoder().encode(body).byteLength > 32 * 1024 * 1024) throw new Error('Attachments exceed the 32 MiB request limit. Send fewer files at once.')
101
- return body
121
+ const assertWithinLimit = (request: ReturnType<typeof requestBody>) => {
122
+ const metadataBytes = request.attachmentMetadata
123
+ ? utf8ByteLength(request.attachmentMetadata.requestId)
124
+ + (request.attachmentMetadata.imageNames?.reduce((sum, name) => sum + utf8ByteLength(name) + 4, 0) ?? 0)
125
+ + (request.attachmentMetadata.videoNames?.reduce((sum, name) => sum + utf8ByteLength(name) + 4, 0) ?? 0)
126
+ : 0
127
+ const totalBytes = 256
128
+ + metadataBytes
129
+ + utf8ByteLength(request.message)
130
+ + utf8ByteLength(request.systemInstruction)
131
+ + utf8ByteLength(request.imageDataUri)
132
+ + utf8ByteLength(request.audioDataUri)
133
+ + utf8ByteLength(request.videoDataUri)
134
+ + utf8ByteLength(request.documentAttachment?.filename)
135
+ + utf8ByteLength(request.documentAttachment?.dataUri)
136
+ + utf8ByteLength(request.workspacePath)
137
+ + utf8ByteLength(request.chatId)
138
+ + utf8ByteLength(request.agentId)
139
+ + utf8ByteLength(request.pinnedMcpServer)
140
+ if (totalBytes > MAX_REQUEST_BYTES) throw new Error(REQUEST_LIMIT_ERROR)
141
+ }
142
+ const post = (route: string, request: ReturnType<typeof requestBody>) => {
143
+ assertWithinLimit(request)
144
+ return environment.fetch(`${environment.apiBase()}/${route}`, {
145
+ method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify(request),
146
+ })
102
147
  }
103
- const post = (route: string, request: ReturnType<typeof requestBody>) => environment.fetch(`${environment.apiBase()}/${route}`, {
104
- method: 'POST', headers: { 'Content-Type': 'application/json' }, body: validate(request),
105
- })
106
148
 
107
149
 
108
150
  return {
@@ -125,7 +167,7 @@ export function createConversationTransport(environment: TransportEnvironment):
125
167
  return { provider: 'error', model: 'error', text: `Failed to connect to Local API Server: ${error}` }
126
168
  }
127
169
  }
128
- validate(request)
170
+ assertWithinLimit(request)
129
171
  const { invoke } = await import('@tauri-apps/api/core')
130
172
  const response = await invoke<ChatResponse>('send_chat_message', { ownerToken: environment.ownerToken(), request, ...(attachmentMetadata ? { attachmentMetadata } : {}) })
131
173
  return response
@@ -145,7 +187,7 @@ export function createConversationTransport(environment: TransportEnvironment):
145
187
  }
146
188
  return readStream(response, callbacks)
147
189
  }
148
- validate(request)
190
+ assertWithinLimit(request)
149
191
  const { invoke, Channel } = await import('@tauri-apps/api/core')
150
192
  const onEvent = new Channel<StreamEvent>()
151
193
  onEvent.onmessage = event => { deliverEvent(event, callbacks) }
@@ -33,23 +33,53 @@ export function useConversationCoordinator(
33
33
  else window.localStorage.removeItem(key)
34
34
  },
35
35
  }))
36
- const conversation = useSyncExternalStore(actions.subscribe, actions.getSnapshot, actions.getSnapshot)
36
+ const dashboardSnapshotRef = useRef<ReturnType<typeof actions.getSnapshot> | null>(null)
37
+ const getDashboardSnapshot = () => {
38
+ const next = actions.getSnapshot()
39
+ const prev = dashboardSnapshotRef.current
40
+ if (prev && prev !== next) {
41
+ let onlyMessageChanged = prev.message !== next.message
42
+ if (onlyMessageChanged) {
43
+ for (const key of Object.keys(next) as Array<keyof typeof next>) {
44
+ if (key !== 'message' && prev[key] !== next[key]) {
45
+ onlyMessageChanged = false
46
+ break
47
+ }
48
+ }
49
+ }
50
+ if (onlyMessageChanged) {
51
+ return prev
52
+ }
53
+ }
54
+ dashboardSnapshotRef.current = next
55
+ return next
56
+ }
57
+
58
+ const conversation = useSyncExternalStore(actions.subscribe, getDashboardSnapshot, getDashboardSnapshot)
37
59
 
38
60
  useEffect(() => actions.watch({ window, document }, options.historyVisible),
39
61
  [actions, options.historyVisible, conversation.conversationId])
40
62
 
41
63
  useEffect(() => {
42
- const timer = window.setTimeout(() => {
43
- try {
44
- const key = `${options.draftKeyPrefix}${conversation.conversationId}`
45
- if (conversation.message) window.localStorage.setItem(key, conversation.message)
46
- else window.localStorage.removeItem(key)
47
- } catch {
48
- // Draft persistence is best-effort in private browsing modes.
49
- }
50
- }, 300)
51
- return () => window.clearTimeout(timer)
52
- }, [conversation.message, conversation.conversationId, options.draftKeyPrefix])
64
+ let timer: number | undefined
65
+ const unsubscribe = actions.subscribe(() => {
66
+ const snap = actions.getSnapshot()
67
+ if (timer !== undefined) window.clearTimeout(timer)
68
+ timer = window.setTimeout(() => {
69
+ try {
70
+ const key = `${latest.current.draftKeyPrefix}${snap.conversationId}`
71
+ if (snap.message) window.localStorage.setItem(key, snap.message)
72
+ else window.localStorage.removeItem(key)
73
+ } catch {
74
+ // Draft persistence is best-effort in private browsing modes.
75
+ }
76
+ }, 300)
77
+ })
78
+ return () => {
79
+ unsubscribe()
80
+ if (timer !== undefined) window.clearTimeout(timer)
81
+ }
82
+ }, [actions])
53
83
 
54
84
  useEffect(() => {
55
85
  try {