@pheem49/mint 1.15.0 → 1.16.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 (644) hide show
  1. package/Cargo.lock +1012 -69
  2. package/Cargo.toml +5 -2
  3. package/LICENSE +21 -654
  4. package/README.md +92 -817
  5. package/Release_Note.md +53 -560
  6. package/apps/mint-companion/src-tauri/Cargo.toml +20 -0
  7. package/apps/mint-companion/src-tauri/build.rs +3 -0
  8. package/apps/mint-companion/src-tauri/src/main.rs +468 -0
  9. package/apps/mint-companion/tsconfig.json +20 -0
  10. package/apps/mint-companion/vite.config.ts +3 -0
  11. package/components.json +19 -0
  12. package/crates/mint-cli/Cargo.toml +6 -0
  13. package/crates/mint-cli/src/agent/live_status.rs +187 -39
  14. package/crates/mint-cli/src/agent.rs +323 -95
  15. package/crates/mint-cli/src/commands/agent.rs +69 -55
  16. package/crates/mint-cli/src/commands/integrations.rs +7 -0
  17. package/crates/mint-cli/src/commands/knowledge.rs +12 -32
  18. package/crates/mint-cli/src/commands/mod.rs +44 -0
  19. package/crates/mint-cli/src/image.rs +31 -33
  20. package/crates/mint-cli/src/interactive/chat_tui.rs +3594 -483
  21. package/crates/mint-cli/src/interactive/input_box.rs +56 -6
  22. package/crates/mint-cli/src/interactive/slash_commands.rs +208 -56
  23. package/crates/mint-cli/src/interactive/tool_activity.rs +328 -0
  24. package/crates/mint-cli/src/interactive.rs +64 -40
  25. package/crates/mint-cli/src/main.rs +13 -7
  26. package/crates/mint-cli/src/mcp.rs +5 -0
  27. package/crates/mint-cli/src/mod_host.rs +6 -0
  28. package/crates/mint-cli/src/mods_cli.rs +62 -0
  29. package/crates/mint-cli/src/mods_ui.rs +187 -0
  30. package/crates/mint-cli/src/onboard.rs +5 -31
  31. package/crates/mint-cli/src/terminal_theme.rs +3 -1
  32. package/crates/mint-cli/src/updater.rs +56 -2
  33. package/crates/mint-cli/tests/library_intake.rs +77 -0
  34. package/crates/mint-cli/tests/mods_testing.rs +133 -0
  35. package/crates/mint-companion-protocol/Cargo.toml +10 -0
  36. package/crates/mint-companion-protocol/src/lib.rs +163 -0
  37. package/crates/mint-core/Cargo.toml +6 -3
  38. package/crates/mint-core/build.rs +26 -0
  39. package/crates/mint-core/src/agent/chat.rs +167 -39
  40. package/crates/mint-core/src/agent/code_tools.rs +15 -0
  41. package/crates/mint-core/src/agent/memory/sources.rs +240 -0
  42. package/crates/mint-core/src/agent/memory.rs +147 -13
  43. package/crates/mint-core/src/agent/skill_inventory.rs +325 -0
  44. package/crates/mint-core/src/agent/skills.rs +437 -90
  45. package/crates/mint-core/src/agent.rs +1 -0
  46. package/crates/mint-core/src/api_server/routes/background_jobs.rs +310 -0
  47. package/crates/mint-core/src/api_server/routes/chat.rs +216 -199
  48. package/crates/mint-core/src/api_server/routes/html_preview.rs +77 -0
  49. package/crates/mint-core/src/api_server/routes/library.rs +97 -0
  50. package/crates/mint-core/src/api_server/routes/media_gen.rs +10 -57
  51. package/crates/mint-core/src/api_server/routes/misc.rs +104 -107
  52. package/crates/mint-core/src/api_server/routes/mod.rs +6 -0
  53. package/crates/mint-core/src/api_server/routes/mods.rs +31 -0
  54. package/crates/mint-core/src/api_server/routes/sessions.rs +41 -0
  55. package/crates/mint-core/src/api_server/routes/skills_subagents.rs +12 -42
  56. package/crates/mint-core/src/api_server/routes/slash.rs +50 -1
  57. package/crates/mint-core/src/api_server/routes/sources.rs +101 -0
  58. package/crates/mint-core/src/api_server.rs +118 -9
  59. package/crates/mint-core/src/avatar_bridge.rs +11 -2
  60. package/crates/mint-core/src/browser/session.rs +52 -0
  61. package/crates/mint-core/src/companion.rs +716 -0
  62. package/crates/mint-core/src/cron/scheduler.rs +34 -2
  63. package/crates/mint-core/src/integrations/channels.rs +87 -345
  64. package/crates/mint-core/src/integrations/mcp.rs +397 -50
  65. package/crates/mint-core/src/integrations/mcp_calls.rs +823 -0
  66. package/crates/mint-core/src/integrations/mcp_catalog.rs +267 -0
  67. package/crates/mint-core/src/integrations/mcp_device.rs +319 -0
  68. package/crates/mint-core/src/integrations/mcp_result.rs +356 -0
  69. package/crates/mint-core/src/integrations/webhooks.rs +539 -0
  70. package/crates/mint-core/src/integrations.rs +2 -0
  71. package/crates/mint-core/src/lib.rs +85 -26
  72. package/crates/mint-core/src/media/gemini_live.rs +134 -14
  73. package/crates/mint-core/src/media/image_models.rs +3 -27
  74. package/crates/mint-core/src/media/image_workflow.rs +216 -0
  75. package/crates/mint-core/src/media/library/intake.rs +144 -0
  76. package/crates/mint-core/src/media/library/migration.rs +56 -0
  77. package/crates/mint-core/src/media/library/removal.rs +55 -0
  78. package/crates/mint-core/src/media/library/tests.rs +730 -0
  79. package/crates/mint-core/src/media/library/thumbnails.rs +72 -0
  80. package/crates/mint-core/src/media/library.rs +545 -0
  81. package/crates/mint-core/src/media/model_catalog.rs +375 -0
  82. package/crates/mint-core/src/media/pictures.rs +79 -222
  83. package/crates/mint-core/src/media/video_models.rs +3 -22
  84. package/crates/mint-core/src/media.rs +3 -0
  85. package/crates/mint-core/src/mods/manager.rs +1124 -0
  86. package/crates/mint-core/src/mods/mod.rs +569 -0
  87. package/crates/mint-core/src/mods/operations.rs +204 -0
  88. package/crates/mint-core/src/mods/session.rs +146 -0
  89. package/crates/mint-core/src/mods/slash.rs +59 -0
  90. package/crates/mint-core/src/mods/telemetry.rs +306 -0
  91. package/crates/mint-core/src/orchestration/approvals.rs +344 -0
  92. package/crates/mint-core/src/orchestration/context_render.rs +104 -0
  93. package/crates/mint-core/src/orchestration/mcp_review.rs +153 -0
  94. package/crates/mint-core/src/orchestration/memory_skill.rs +104 -32
  95. package/crates/mint-core/src/orchestration/mod.rs +2139 -244
  96. package/crates/mint-core/src/orchestration/mod_authoring_regressions.rs +209 -0
  97. package/crates/mint-core/src/orchestration/progress_clock.rs +80 -0
  98. package/crates/mint-core/src/orchestration/repeated_failures.rs +116 -0
  99. package/crates/mint-core/src/orchestration/review_regressions.rs +449 -0
  100. package/crates/mint-core/src/orchestration/run_control.rs +196 -0
  101. package/crates/mint-core/src/orchestration/tools/files.rs +161 -14
  102. package/crates/mint-core/src/orchestration/tools/media.rs +37 -41
  103. package/crates/mint-core/src/orchestration/tools/misc.rs +3 -2
  104. package/crates/mint-core/src/orchestration/tools/mod.rs +2 -0
  105. package/crates/mint-core/src/orchestration/tools/mods.rs +161 -0
  106. package/crates/mint-core/src/orchestration/tools/plugins_mcp.rs +303 -71
  107. package/crates/mint-core/src/orchestration/tools/shell.rs +95 -2
  108. package/crates/mint-core/src/orchestration/workspace_helpers.rs +4 -1
  109. package/crates/mint-core/src/prompts/agent.rs +17 -2
  110. package/crates/mint-core/src/prompts/tool_catalog.rs +28 -2
  111. package/crates/mint-core/src/search/knowledge.rs +7 -1
  112. package/crates/mint-core/src/search/linked_folders/index.rs +177 -13
  113. package/crates/mint-core/src/search/linked_folders.rs +83 -2
  114. package/crates/mint-core/src/slash/catalog.rs +1 -1
  115. package/crates/mint-core/src/slash/mod.rs +174 -11
  116. package/crates/mint-core/src/slash/mods.rs +155 -0
  117. package/crates/mint-core/src/system/bg_shell.rs +1129 -95
  118. package/crates/mint-core/src/system/config.rs +5 -10
  119. package/crates/mint-core/src/system/html_preview.rs +398 -0
  120. package/crates/mint-core/src/system/mint_web.rs +164 -0
  121. package/crates/mint-core/src/system/release_notes.rs +18 -0
  122. package/crates/mint-core/src/system/shell.rs +21 -6
  123. package/crates/mint-core/src/system/workspace.rs +72 -8
  124. package/crates/mint-core/src/system/workspace_history.rs +604 -0
  125. package/crates/mint-core/src/system.rs +4 -0
  126. package/crates/mint-core/tests/background_retention.rs +34 -0
  127. package/crates/mint-core/tests/background_shutdown.rs +24 -0
  128. package/crates/mint-core/tests/library_http.rs +209 -0
  129. package/crates/mint-core/tests/mcp_contract.rs +283 -0
  130. package/crates/mint-core/tests/mcp_stdio.rs +11 -10
  131. package/crates/mint-core/tests/media_model_catalog_http.rs +403 -0
  132. package/crates/mint-core/tests/mods_http.rs +215 -0
  133. package/crates/mint-core/tests/terminal_shutdown.rs +109 -0
  134. package/crates/mint-mod-runtime/Cargo.toml +18 -0
  135. package/crates/mint-mod-runtime/src/lib.rs +507 -0
  136. package/crates/mint-mod-runtime/src/sdk.js +56 -0
  137. package/crates/mint-mod-runtime/src/test_sdk.js +32 -0
  138. package/crates/mint-mod-runtime/src/testing.rs +94 -0
  139. package/crates/mint-mod-runtime/tests/runtime.rs +156 -0
  140. package/docs/mods/AUTHORING.md +61 -0
  141. package/docs/mods/README.md +139 -0
  142. package/docs/mods/TESTING.md +56 -0
  143. package/docs/mods/mint-mods.d.ts +66 -0
  144. package/examples/device-mcp/README.md +22 -0
  145. package/examples/device-mcp/contract.md +49 -0
  146. package/examples/device-mcp/mock-device.mjs +66 -0
  147. package/examples/device-mcp/server.mjs +48 -0
  148. package/examples/device-mcp/server.test.mjs +78 -0
  149. package/examples/mods/task-checklist/README.md +1 -0
  150. package/examples/mods/task-checklist/main.ts +17 -0
  151. package/examples/mods/task-checklist/manifest.json +1 -0
  152. package/examples/mods/task-checklist/tests/checklist.test.ts +15 -0
  153. package/examples/mods/token-meter/README.md +1 -0
  154. package/examples/mods/token-meter/main.ts +8 -0
  155. package/examples/mods/token-meter/manifest.json +1 -0
  156. package/examples/mods/tool-guard/README.md +1 -0
  157. package/examples/mods/tool-guard/main.ts +9 -0
  158. package/examples/mods/tool-guard/manifest.json +1 -0
  159. package/out/web/assets/CliSessionsView-CtzUJpK_.css +1 -0
  160. package/out/web/assets/CliSessionsView-D7hw0Mgj.js +1 -0
  161. package/out/web/assets/CodeReviewPage-C7bEOJfd.js +4 -0
  162. package/out/web/assets/CodeReviewPage-Dte9uLiL.css +1 -0
  163. package/out/web/assets/CommandPalette-0RrF-AOT.js +1 -0
  164. package/out/web/assets/ImageStudioPanel-CdxkAf_r.js +1 -0
  165. package/out/web/assets/LibraryPage--Qfisp6D.js +2 -0
  166. package/out/web/assets/LibraryPage-DAxUTAg7.css +1 -0
  167. package/out/web/assets/LinkedFoldersView-2nfZbDgN.js +1 -0
  168. package/out/web/assets/McpRegistryPicker-h9uS8_wT.js +1 -0
  169. package/out/web/assets/McpServersView-slfQJzNB.js +1 -0
  170. package/out/web/assets/MintDashboard-BSR5XpXh.js +25 -0
  171. package/out/web/assets/MintDashboard-CWUcCGhd.css +1 -0
  172. package/out/web/assets/PluginsView-l7LSm503.js +1 -0
  173. package/out/web/assets/ScheduledTasksView-CttmLbq1.js +1 -0
  174. package/out/web/assets/SettingsWindow-BCMLYvEV.js +4 -0
  175. package/out/web/assets/SettingsWindow-DcMVmU9u.css +1 -0
  176. package/out/web/assets/SkillsView-rNs1qr_U.js +2 -0
  177. package/out/web/assets/ToolSurfacePage-B9DzEPWN.js +37 -0
  178. package/out/web/assets/ToolSurfacePage-CTfgggF2.css +1 -0
  179. package/out/web/assets/VeoStudioPanel-DiJs_Cg2.js +4 -0
  180. package/out/web/assets/WorkspaceSelector-B2xIp04D.js +1 -0
  181. package/out/web/assets/WorkspaceSelector-Ca8uJOsS.css +1 -0
  182. package/out/web/assets/{abnfDiagram-VCTEODGH-ByMyfanq.js → abnfDiagram-VCTEODGH-CD0CjoGl.js} +1 -1
  183. package/out/web/assets/{architecture-7GRP2DOG-CLq2kEOB.js → architecture-7GRP2DOG-RKV83OeZ.js} +1 -1
  184. package/out/web/assets/{architectureDiagram-5GKGNRK7-6PoVSmNG.js → architectureDiagram-5GKGNRK7-nN_HAFct.js} +1 -1
  185. package/out/web/assets/{blockDiagram-NRAW4CY4-cKw9mAKi.js → blockDiagram-NRAW4CY4-BrrqzHW5.js} +1 -1
  186. package/out/web/assets/{c4Diagram-UCG6FXSJ-Cqy8N5Ge.js → c4Diagram-UCG6FXSJ-DTdV8_zE.js} +1 -1
  187. package/out/web/assets/{chunk-75Z2AOVW-3qybijF5.js → chunk-75Z2AOVW-_M0z5olV.js} +1 -1
  188. package/out/web/assets/chunk-CKBBP62Z-BpQEgeHF.js +2 -0
  189. package/out/web/assets/{chunk-CLGD4ZFX-CndDQkww.js → chunk-CLGD4ZFX-D54yGvGS.js} +1 -1
  190. package/out/web/assets/{chunk-DSNCTWBM-Cc4NxvgD.js → chunk-DSNCTWBM-C-gvT2ru.js} +1 -1
  191. package/out/web/assets/{chunk-DU6HZSFF-drzh6GsU.js → chunk-DU6HZSFF-CnFngIhW.js} +1 -1
  192. package/out/web/assets/{chunk-F27PBJKO-FiY35l4v.js → chunk-F27PBJKO-BqtWrnEO.js} +1 -1
  193. package/out/web/assets/{chunk-G27WJ6UU-Bjt9Il4A.js → chunk-G27WJ6UU-Ckoq5mi2.js} +1 -1
  194. package/out/web/assets/{chunk-GMAD6QVW-Bppi3Ctd.js → chunk-GMAD6QVW-BuhEcgHq.js} +1 -1
  195. package/out/web/assets/{chunk-JQ64N6SF-DGg5kcEV.js → chunk-JQ64N6SF-CF8T7GiZ.js} +1 -1
  196. package/out/web/assets/{chunk-LCL6LL3I-CCYcjd7p.js → chunk-LCL6LL3I-BhXV9zyH.js} +1 -1
  197. package/out/web/assets/{chunk-OBVCFTLP-DJeNil5M.js → chunk-OBVCFTLP-CRIkunUB.js} +1 -1
  198. package/out/web/assets/{chunk-P2QGCYS3-lRzkRjBB.js → chunk-P2QGCYS3-UFEU6BxZ.js} +1 -1
  199. package/out/web/assets/{chunk-POPQ4Y6H-DouASMBW.js → chunk-POPQ4Y6H-CQcrNbjr.js} +1 -1
  200. package/out/web/assets/{chunk-PWAF6VOD-DMmD1vVf.js → chunk-PWAF6VOD-Cc2uVDsG.js} +1 -1
  201. package/out/web/assets/{chunk-R7TYR2AO-CYLA5UC5.js → chunk-R7TYR2AO-DiCxzdAY.js} +1 -1
  202. package/out/web/assets/{chunk-RHFEMEQ7-BiXwEcUT.js → chunk-RHFEMEQ7-b7hnPmrR.js} +1 -1
  203. package/out/web/assets/{chunk-SVP7TREG-BV-zPslF.js → chunk-SVP7TREG-Bu_yYb-V.js} +1 -1
  204. package/out/web/assets/{chunk-TEH6E4GO-B2RGEohZ.js → chunk-TEH6E4GO-G4Cdlyrt.js} +1 -1
  205. package/out/web/assets/classDiagram-DTDB5LWJ-RnC2mYO4.js +1 -0
  206. package/out/web/assets/classDiagram-v2-JRS7N3AN-RnC2mYO4.js +1 -0
  207. package/out/web/assets/config-CnvCChUM.js +2 -0
  208. package/out/web/assets/config-DM6oIVO3.css +1 -0
  209. package/out/web/assets/core-DsKkQ7ig.js +1 -0
  210. package/out/web/assets/{cynefin-OW5HDTMX-Cas4csHM.js → cynefin-OW5HDTMX-CnzQfOGp.js} +1 -1
  211. package/out/web/assets/{cynefinDiagram-5FMLGOSQ-Bbpj66Y3.js → cynefinDiagram-5FMLGOSQ-DVtQnfpm.js} +1 -1
  212. package/out/web/assets/{dagre-3AP2YEHR-B0-2RDEd.js → dagre-3AP2YEHR-DG76_k5_.js} +1 -1
  213. package/out/web/assets/{diagram-S7CK7UJ4-BdzEjUyH.js → diagram-S7CK7UJ4-CaouUoze.js} +1 -1
  214. package/out/web/assets/{diagram-UQ7AKVKN-CJDwyPxF.js → diagram-UQ7AKVKN-B4bEc26B.js} +1 -1
  215. package/out/web/assets/{diagram-VSXAHHWV-BxaG1r_B.js → diagram-VSXAHHWV-BJ86Ov2Y.js} +1 -1
  216. package/out/web/assets/{diagram-VX7I27RA-BMmUqm8f.js → diagram-VX7I27RA-7hH5IPYf.js} +1 -1
  217. package/out/web/assets/{diagram-Z3DM3KII-CFtd03eE.js → diagram-Z3DM3KII-CCM4clo8.js} +1 -1
  218. package/out/web/assets/dist-js-BkYNznHX.js +1 -0
  219. package/out/web/assets/{ebnfDiagram-PWID7BFC-DwAen1hO.js → ebnfDiagram-PWID7BFC-Da7WAM3k.js} +1 -1
  220. package/out/web/assets/{erDiagram-SSCWMZ5O-BCZSHACj.js → erDiagram-SSCWMZ5O-CzzmnZWT.js} +1 -1
  221. package/out/web/assets/{event-ChBVpRy0.js → event-Cdt7Byyj.js} +1 -1
  222. package/out/web/assets/{eventmodeling-NTZA5JFV-XHStE4E_.js → eventmodeling-NTZA5JFV-xcfsA0XD.js} +1 -1
  223. package/out/web/assets/flowDiagram-A5DVABFB-JdtH1673.js +1 -0
  224. package/out/web/assets/{ganttDiagram-EL5Y4UJY-BAEu1Cql.js → ganttDiagram-EL5Y4UJY-B3ClFGmL.js} +1 -1
  225. package/out/web/assets/{gitGraph-4MIJSDKK-r32Vyper.js → gitGraph-4MIJSDKK-BZ_y_cDU.js} +1 -1
  226. package/out/web/assets/{gitGraphDiagram-WWUBYQGX-z9o9qt6V.js → gitGraphDiagram-WWUBYQGX-drhRSYm3.js} +1 -1
  227. package/out/web/assets/index-BZ9xgmMP.css +1 -0
  228. package/out/web/assets/index-Ca8cCS4h.js +168 -0
  229. package/out/web/assets/{info-A6RAGUB7-BvLaC2cw.js → info-A6RAGUB7-B7I3K0F1.js} +1 -1
  230. package/out/web/assets/{infoDiagram-RXCK75RN-Be6WAXXw.js → infoDiagram-RXCK75RN-deX_1MPh.js} +1 -1
  231. package/out/web/assets/{ishikawaDiagram-5VMMS53U-DZjoHJHC.js → ishikawaDiagram-5VMMS53U-s38yo28y.js} +1 -1
  232. package/out/web/assets/{journeyDiagram-EYS64GPL-CtVkjkGm.js → journeyDiagram-EYS64GPL-CZn2kB8b.js} +1 -1
  233. package/out/web/assets/jsx-runtime-DN4NhQUK.js +1 -0
  234. package/out/web/assets/{kanban-definition-3QL26DDD-CW5FMv1w.js → kanban-definition-3QL26DDD-DodjgySL.js} +1 -1
  235. package/out/web/assets/markdown-CMhYIcWB.js +39 -0
  236. package/out/web/assets/{mermaid-parser.core-aUgCqsZ5.js → mermaid-parser.core-Whu2rlJC.js} +3 -3
  237. package/out/web/assets/{mermaid.core-D57sEiSL.js → mermaid.core-CKyPo8VH.js} +4 -4
  238. package/out/web/assets/{mindmap-definition-FBJOCRG2-DAmSpM3a.js → mindmap-definition-FBJOCRG2-260WBDxZ.js} +1 -1
  239. package/out/web/assets/modelManager-CUaGWMWu.js +2 -0
  240. package/out/web/assets/{oauthManager-9jxicDWJ.js → oauthManager-DlNhXJr6.js} +1 -1
  241. package/out/web/assets/{packet-AYTQ26CC-DJ27iIoJ.js → packet-AYTQ26CC-CEeIRKRG.js} +1 -1
  242. package/out/web/assets/{pegDiagram-XKGWAZYB-Bj3ii-gS.js → pegDiagram-XKGWAZYB-BYadI-KO.js} +1 -1
  243. package/out/web/assets/{pie-WAS4IAKB-DG5mCUbc.js → pie-WAS4IAKB-D8uf4dh5.js} +1 -1
  244. package/out/web/assets/{pieDiagram-E7YTZNPT-BrJLPnDA.js → pieDiagram-E7YTZNPT-CjSDy4hO.js} +1 -1
  245. package/out/web/assets/{quadrantDiagram-AXDQQJYC-3x_TmF3j.js → quadrantDiagram-AXDQQJYC-B8D3gU5d.js} +1 -1
  246. package/out/web/assets/{radar-RG4KPBEZ-CrXaTTuV.js → radar-RG4KPBEZ-DZJxnokY.js} +1 -1
  247. package/out/web/assets/{railroad-74A4TZTK-BpqMH9BE.js → railroad-74A4TZTK-DBysUiUi.js} +1 -1
  248. package/out/web/assets/{railroad-abnf-HS5TGJTU-DHI0uLlV.js → railroad-abnf-HS5TGJTU-CHWxoJYg.js} +1 -1
  249. package/out/web/assets/{railroad-ebnf-LZEXJU2U-CQCb316y.js → railroad-ebnf-LZEXJU2U-DDv7X6bY.js} +1 -1
  250. package/out/web/assets/{railroad-peg-WCYAUIDC-Ph1giKkH.js → railroad-peg-WCYAUIDC-DpfcYYNJ.js} +1 -1
  251. package/out/web/assets/{railroadDiagram-O6MQD6OU-BRq6wIxx.js → railroadDiagram-O6MQD6OU-CYtyv0t3.js} +1 -1
  252. package/out/web/assets/{requirementDiagram-EFPCY7ZU-DIJj6G1g.js → requirementDiagram-EFPCY7ZU-D2X-Ewik.js} +1 -1
  253. package/out/web/assets/{sankeyDiagram-P5KCCOFB-DZajSryq.js → sankeyDiagram-P5KCCOFB-Bn2x6C4Y.js} +1 -1
  254. package/out/web/assets/{sequenceDiagram-WJ2MYXX4-DxJCWyZS.js → sequenceDiagram-WJ2MYXX4-BvFLKtPd.js} +1 -1
  255. package/out/web/assets/{stateDiagram-HBIQ2CUA-k6voi8Vf.js → stateDiagram-HBIQ2CUA-Bx0GWeaY.js} +1 -1
  256. package/out/web/assets/stateDiagram-v2-4QOOHH4V--hol1yg_.js +1 -0
  257. package/out/web/assets/{swimlanes-XN3QIQJK-igYhTjXB.js → swimlanes-XN3QIQJK-CCma0T7L.js} +1 -1
  258. package/out/web/assets/swimlanesDiagram-VK2B7HYN-BkohoVsU.js +8 -0
  259. package/out/web/assets/{timeline-definition-24CTP7MA-Dke2p93p.js → timeline-definition-24CTP7MA-iCRhhJ7C.js} +1 -1
  260. package/out/web/assets/{treeView-Q6P3EWNA-hNELnXUs.js → treeView-Q6P3EWNA-DZ-y08qp.js} +1 -1
  261. package/out/web/assets/{treemap-WGGIJYW6-D2B6wDsx.js → treemap-WGGIJYW6-De0CxzMx.js} +1 -1
  262. package/out/web/assets/{vennDiagram-4TSXK5OY-CDkW7rUP.js → vennDiagram-4TSXK5OY-w_7aZ6xe.js} +1 -1
  263. package/out/web/assets/{wardley-WFR3VGLG-BECdXETi.js → wardley-WFR3VGLG-DT0y0xJ4.js} +1 -1
  264. package/out/web/assets/{wardleyDiagram-VM6X3IG4-B5BycpQ4.js → wardleyDiagram-VM6X3IG4-DAdXELbQ.js} +1 -1
  265. package/out/web/assets/window-BJCVtyET.js +1 -0
  266. package/out/web/assets/{xychartDiagram-S5SC5T6Z-CtJS3b--.js → xychartDiagram-S5SC5T6Z-IZIXf3Vo.js} +1 -1
  267. package/out/web/index-web.html +3 -2
  268. package/out/web/index.html +3 -2
  269. package/package.json +71 -22
  270. package/shared-modules/.github/workflows/ci.yml +120 -0
  271. package/shared-modules/.github/workflows/update.yaml +28 -0
  272. package/slash-commands.json +7 -2
  273. package/src/bin/auto-build.js +66 -0
  274. package/src/bin/desktop.js +113 -0
  275. package/src/bin/desktop.test.js +113 -0
  276. package/src/bin/index.js +18 -25
  277. package/src/bin/index.test.js +89 -0
  278. package/src/bin/measure-effects.mjs +53 -0
  279. package/src/bin/package.test.js +28 -0
  280. package/src/bin/release-notes.test.js +84 -0
  281. package/src/bin/styles.test.js +20 -0
  282. package/src/bin/web.js +5 -0
  283. package/src/bin/web.test.js +39 -0
  284. package/src/renderer/index.html +0 -2
  285. package/src/renderer/node_modules/.vite/vitest/da39a3ee5e6b4b0d3255bfef95601890afd80709/results.json +1 -1
  286. package/src/renderer/shared/agentProgress.ts +33 -0
  287. package/src/renderer/shared/components/AgentActivityDrawer.tsx +3 -2
  288. package/src/renderer/shared/components/AgentActivityTable.tsx +1 -1
  289. package/src/renderer/shared/components/ApprovalCard.test.tsx +24 -0
  290. package/src/renderer/shared/components/ApprovalCard.tsx +10 -3
  291. package/src/renderer/shared/components/ArtifactPreviewPanel.tsx +88 -37
  292. package/src/renderer/shared/components/AuthGate.tsx +75 -39
  293. package/src/renderer/shared/components/BackgroundTerminals.tsx +181 -0
  294. package/src/renderer/shared/components/ChatCodeBlock.tsx +8 -4
  295. package/src/renderer/shared/components/ChatMessageItem.test.tsx +68 -0
  296. package/src/renderer/shared/components/ChatMessageItem.tsx +36 -16
  297. package/src/renderer/shared/components/ChatPanel.test.tsx +21 -0
  298. package/src/renderer/shared/components/ChatPanel.tsx +294 -272
  299. package/src/renderer/shared/components/ChunkErrorBoundary.tsx +4 -102
  300. package/src/renderer/shared/components/CliSessionsView.test.tsx +125 -0
  301. package/src/renderer/shared/components/CliSessionsView.tsx +61 -13
  302. package/src/renderer/shared/components/CodeReviewPage.tsx +111 -8
  303. package/src/renderer/shared/components/CollapsiblePasteInput.tsx +90 -0
  304. package/src/renderer/shared/components/ContextCompactionStatus.tsx +17 -0
  305. package/src/renderer/shared/components/DashboardSidebar.tsx +15 -128
  306. package/src/renderer/shared/components/DesktopTitlebar.tsx +45 -19
  307. package/src/renderer/shared/components/ErrorNotice.tsx +29 -0
  308. package/src/renderer/shared/components/FormattedMessage.tsx +11 -0
  309. package/src/renderer/shared/components/GeminiLiveOverlay.css +86 -0
  310. package/src/renderer/shared/components/GeminiLiveOverlay.test.tsx +24 -0
  311. package/src/renderer/shared/components/GeminiLiveOverlay.tsx +85 -101
  312. package/src/renderer/shared/components/GlideSelect.css +138 -0
  313. package/src/renderer/shared/components/GlideSelect.d.ts +31 -0
  314. package/src/renderer/shared/components/GlideSelect.jsx +266 -0
  315. package/src/renderer/shared/components/ImageSearchCard.tsx +46 -56
  316. package/src/renderer/shared/components/ImageStudioPanel.tsx +9 -8
  317. package/src/renderer/shared/components/LibraryItemCard.tsx +72 -0
  318. package/src/renderer/shared/components/LibraryPage.tsx +165 -0
  319. package/src/renderer/shared/components/LibraryPreview.tsx +59 -0
  320. package/src/renderer/shared/components/McpServersView.tsx +27 -8
  321. package/src/renderer/shared/components/McpToolAllowlist.tsx +2 -4
  322. package/src/renderer/shared/components/McpToolResults.tsx +99 -0
  323. package/src/renderer/shared/components/MintDashboard.tsx +308 -770
  324. package/src/renderer/shared/components/ModSessionControls.tsx +8 -0
  325. package/src/renderer/shared/components/ModUi.test.tsx +65 -0
  326. package/src/renderer/shared/components/ModUi.tsx +26 -0
  327. package/src/renderer/shared/components/ModelSelectorPopover.tsx +14 -7
  328. package/src/renderer/shared/components/ModsPanel.tsx +156 -0
  329. package/src/renderer/shared/components/ProgressActivity.tsx +17 -0
  330. package/src/renderer/shared/components/ReviewHistory.tsx +42 -0
  331. package/src/renderer/shared/components/RewindModal.tsx +5 -12
  332. package/src/renderer/shared/components/RunSummaryDashboard.tsx +6 -12
  333. package/src/renderer/shared/components/ScheduledTasksView.tsx +7 -6
  334. package/src/renderer/shared/components/SelectField.test.tsx +27 -0
  335. package/src/renderer/shared/components/SelectField.tsx +38 -0
  336. package/src/renderer/shared/components/SessionSources.tsx +48 -0
  337. package/src/renderer/shared/components/SessionSourcesPopover.tsx +61 -0
  338. package/src/renderer/shared/components/Settings/AgentsTab.tsx +7 -6
  339. package/src/renderer/shared/components/Settings/AudioTab.tsx +8 -7
  340. package/src/renderer/shared/components/Settings/AutomationTab.tsx +2 -2
  341. package/src/renderer/shared/components/Settings/GeneralTab.tsx +33 -32
  342. package/src/renderer/shared/components/Settings/MemoryTab.test.tsx +37 -0
  343. package/src/renderer/shared/components/Settings/MemoryTab.tsx +71 -31
  344. package/src/renderer/shared/components/Settings/NotificationsTab.test.tsx +15 -0
  345. package/src/renderer/shared/components/Settings/NotificationsTab.tsx +84 -0
  346. package/src/renderer/shared/components/Settings/ThemeTab.tsx +19 -11
  347. package/src/renderer/shared/components/SlashChoicePanel.tsx +88 -0
  348. package/src/renderer/shared/components/SlashSuggestions.test.tsx +33 -0
  349. package/src/renderer/shared/components/SlashSuggestions.tsx +38 -10
  350. package/src/renderer/shared/components/SourcesBlock.tsx +12 -20
  351. package/src/renderer/shared/components/ToolSurfacePage.test.tsx +32 -0
  352. package/src/renderer/shared/components/ToolSurfacePage.tsx +59 -11
  353. package/src/renderer/shared/components/ToolsPanelToggle.tsx +13 -0
  354. package/src/renderer/shared/components/VeoStudioPanel.tsx +9 -8
  355. package/src/renderer/shared/components/ViewedImages.tsx +36 -0
  356. package/src/renderer/shared/components/VirtualChatHistory.tsx +82 -0
  357. package/src/renderer/shared/components/VoicePill.css +85 -0
  358. package/src/renderer/shared/components/VoicePill.d.ts +12 -0
  359. package/src/renderer/shared/components/VoicePill.jsx +190 -0
  360. package/src/renderer/shared/components/VoicePill.test.tsx +22 -0
  361. package/src/renderer/shared/components/WorkspaceContextPopover.tsx +20 -15
  362. package/src/renderer/shared/components/WorkspacePaneResizer.tsx +92 -0
  363. package/src/renderer/shared/components/WorkspacePreviewActions.test.tsx +44 -0
  364. package/src/renderer/shared/components/WorkspacePreviewActions.tsx +19 -0
  365. package/src/renderer/shared/components/WorkspaceSelector.tsx +13 -8
  366. package/src/renderer/shared/components/background-terminals.css +292 -0
  367. package/src/renderer/shared/components/ui/README.md +52 -0
  368. package/src/renderer/shared/components/ui/button.tsx +37 -0
  369. package/src/renderer/shared/components/ui/demo.tsx +26 -0
  370. package/src/renderer/shared/components/ui/error-recovery.css +35 -0
  371. package/src/renderer/shared/components/ui/error-recovery.tsx +35 -0
  372. package/src/renderer/shared/components/ui/voice-powered-orb.css +6 -0
  373. package/src/renderer/shared/components/ui/voice-powered-orb.tsx +374 -0
  374. package/src/renderer/shared/components/workspace-selector.css +248 -0
  375. package/src/renderer/shared/constants/config.ts +30 -1
  376. package/src/renderer/shared/constants/slashCommands.ts +1 -1
  377. package/src/renderer/shared/conversation/lifecycle.test.ts +362 -0
  378. package/src/renderer/shared/conversation/lifecycle.ts +418 -0
  379. package/src/renderer/shared/conversation/projectNavigation.test.ts +105 -0
  380. package/src/renderer/shared/conversation/projectNavigation.ts +39 -0
  381. package/src/renderer/shared/conversation/sourcesTransport.ts +27 -0
  382. package/src/renderer/shared/conversation/syncView.test.ts +1 -34
  383. package/src/renderer/shared/conversation/syncView.ts +0 -37
  384. package/src/renderer/shared/conversation/transport.test.ts +163 -0
  385. package/src/renderer/shared/conversation/transport.ts +159 -0
  386. package/src/renderer/shared/conversation/useConversationCoordinator.ts +30 -72
  387. package/src/renderer/shared/css/agent-observability.css +20 -21
  388. package/src/renderer/shared/css/auth-gate.css +112 -13
  389. package/src/renderer/shared/css/code-review.css +33 -0
  390. package/src/renderer/shared/css/code-sessions.css +27 -0
  391. package/src/renderer/shared/css/collapsed-paste.css +35 -0
  392. package/src/renderer/shared/css/effects.css +15 -0
  393. package/src/renderer/shared/css/error-notice.css +60 -0
  394. package/src/renderer/shared/css/library.css +476 -0
  395. package/src/renderer/shared/css/management-views.css +138 -0
  396. package/src/renderer/shared/css/mcp-results.css +11 -0
  397. package/src/renderer/shared/css/model-selector.css +163 -105
  398. package/src/renderer/shared/css/mods.css +77 -0
  399. package/src/renderer/shared/css/notification-notice.css +28 -0
  400. package/src/renderer/shared/css/session-sources-popover.css +9 -0
  401. package/src/renderer/shared/css/session-sources.css +23 -0
  402. package/src/renderer/shared/css/settings/memory.css +154 -0
  403. package/src/renderer/shared/css/settings/notifications.css +11 -0
  404. package/src/renderer/shared/css/settings/theme.css +5 -0
  405. package/src/renderer/shared/css/slash-choice.css +95 -0
  406. package/src/renderer/shared/css/slash-suggestions.css +68 -0
  407. package/src/renderer/shared/css/sources-block.css +91 -0
  408. package/src/renderer/shared/css/thinking-status.css +46 -0
  409. package/src/renderer/shared/css/tools-panel.css +7 -0
  410. package/src/renderer/shared/css/ui-tailwind.css +19 -0
  411. package/src/renderer/shared/css/viewed-images.css +15 -0
  412. package/src/renderer/shared/fonts.css +46 -0
  413. package/src/renderer/shared/fonts.ts +3 -12
  414. package/src/renderer/shared/lib/utils.ts +6 -0
  415. package/src/renderer/shared/library/controller.test.ts +61 -0
  416. package/src/renderer/shared/library/controller.ts +57 -0
  417. package/src/renderer/shared/library/transport.test.ts +26 -0
  418. package/src/renderer/shared/library/transport.ts +60 -0
  419. package/src/renderer/shared/library/useLibraryFile.ts +38 -0
  420. package/src/renderer/shared/mods.ts +58 -0
  421. package/src/renderer/shared/platform.test.ts +57 -1
  422. package/src/renderer/shared/platform.ts +46 -1
  423. package/src/renderer/shared/theme/themeManager.test.ts +43 -0
  424. package/src/renderer/shared/theme/themeManager.ts +17 -4
  425. package/src/renderer/shared/types.ts +56 -2
  426. package/src/renderer/shared/utils/agentActivity.test.ts +75 -0
  427. package/src/renderer/shared/utils/agentActivity.ts +42 -3
  428. package/src/renderer/shared/utils/approval.tsx +7 -0
  429. package/src/renderer/shared/utils/artifactBrowser.test.ts +80 -0
  430. package/src/renderer/shared/utils/artifactBrowser.ts +41 -0
  431. package/src/renderer/shared/utils/contextCompaction.test.tsx +48 -0
  432. package/src/renderer/shared/utils/contextCompaction.ts +21 -0
  433. package/src/renderer/shared/utils/effectVisibility.ts +9 -0
  434. package/src/renderer/shared/utils/markdown.tsx +3 -3
  435. package/src/renderer/shared/utils/mcpResults.test.tsx +91 -0
  436. package/src/renderer/shared/utils/modViewport.ts +7 -0
  437. package/src/renderer/shared/utils/nativeRecordingSession.test.ts +61 -0
  438. package/src/renderer/shared/utils/nativeRecordingSession.ts +46 -0
  439. package/src/renderer/shared/utils/notificationSettings.test.ts +14 -0
  440. package/src/renderer/shared/utils/notificationSettings.ts +23 -0
  441. package/src/renderer/shared/utils/notifications.test.ts +51 -0
  442. package/src/renderer/shared/utils/notifications.ts +54 -0
  443. package/src/renderer/shared/utils/pastedText.test.ts +20 -0
  444. package/src/renderer/shared/utils/pastedText.ts +13 -0
  445. package/src/renderer/shared/utils/progressCache.test.ts +32 -0
  446. package/src/renderer/shared/utils/sessionSources.test.ts +31 -0
  447. package/src/renderer/shared/utils/sessionSources.ts +34 -0
  448. package/src/renderer/shared/utils/slashCommandProcessor.ts +1 -1
  449. package/src/renderer/shared/utils/sourceAttachments.ts +28 -0
  450. package/src/renderer/shared/utils/speech.ts +51 -9
  451. package/src/renderer/shared/utils/syntaxHighlight.test.tsx +22 -0
  452. package/src/renderer/shared/utils/syntaxHighlight.tsx +26 -0
  453. package/src/renderer/shared/utils/useGeminiLiveVoice.ts +49 -5
  454. package/src/renderer/shared/utils/useLatestCallback.ts +9 -0
  455. package/src/renderer/shared/utils/useNativeVoiceInput.ts +80 -72
  456. package/src/renderer/shared/utils/useSessionSources.ts +33 -0
  457. package/src/renderer/shared/utils/viewedImages.ts +26 -0
  458. package/src/renderer/shared/utils/workspacePane.test.ts +33 -0
  459. package/src/renderer/shared/utils/workspacePane.ts +20 -0
  460. package/src/renderer/shared/utils/workspacePreview.test.ts +24 -0
  461. package/src/renderer/shared/utils/workspacePreview.ts +16 -0
  462. package/src/renderer/shared/utils/workspaceSnapshot.test.ts +49 -0
  463. package/src/renderer/shared/utils/workspaceSnapshot.ts +26 -0
  464. package/src/renderer/shared/utils/workspaces.ts +10 -0
  465. package/src/renderer/shared/workspaceUndo.ts +88 -0
  466. package/src/renderer/src/App.tsx +9 -1
  467. package/src/renderer/src/components/LiveTranslateControls.tsx +65 -0
  468. package/src/renderer/src/components/PicturesLibrary.tsx +2 -288
  469. package/src/renderer/src/components/ScreenPicker.css +67 -30
  470. package/src/renderer/src/components/ScreenPicker.tsx +201 -60
  471. package/src/renderer/src/components/SettingsWindow.tsx +10 -5
  472. package/src/renderer/src/components/WorkspacePanel.tsx +222 -32
  473. package/src/renderer/src/components/browser-shell.css +1 -1
  474. package/src/renderer/src/components/browser-suggestions-popup.css +1 -1
  475. package/src/renderer/src/components/liveTranslateFrames.test.ts +26 -5
  476. package/src/renderer/src/components/liveTranslateFrames.ts +18 -7
  477. package/src/renderer/src/components/liveTranslateLanguage.ts +6 -0
  478. package/src/renderer/src/css/app-shell.css +52 -137
  479. package/src/renderer/src/css/chat.css +21 -495
  480. package/src/renderer/src/css/desktop-tools.css +199 -1
  481. package/src/renderer/src/css/misc.css +0 -52
  482. package/src/renderer/src/css/pictures.css +2 -415
  483. package/src/renderer/src/css/settings/base.css +50 -47
  484. package/src/renderer/src/css/sidebar-workspace.css +151 -94
  485. package/src/renderer/src/css/tool-surfaces.css +65 -9
  486. package/src/renderer/src/css/widget.css +1 -1
  487. package/src/renderer/src/env.d.ts +1 -9
  488. package/src/renderer/src/index.css +1 -1
  489. package/src/renderer/src/main.tsx +2 -1
  490. package/src/renderer/src/proactiveSuggestions.ts +29 -0
  491. package/src/renderer/src/tauri.ts +122 -330
  492. package/src/renderer/src/voiceInput.ts +2 -1
  493. package/src/renderer/src-web/components/PicturesLibrary.tsx +2 -285
  494. package/src/renderer/src-web/components/PullToRefresh.tsx +1 -1
  495. package/src/renderer/src-web/components/SettingsWindow.tsx +10 -5
  496. package/src/renderer/src-web/css/app-shell.css +24 -121
  497. package/src/renderer/src-web/css/chat.css +21 -495
  498. package/src/renderer/src-web/css/misc.css +0 -52
  499. package/src/renderer/src-web/css/mobile.css +15 -14
  500. package/src/renderer/src-web/css/pictures.css +2 -462
  501. package/src/renderer/src-web/css/settings/base.css +50 -47
  502. package/src/renderer/src-web/css/sidebar-workspace.css +9 -95
  503. package/src/renderer/src-web/css/widget.css +1 -1
  504. package/src/renderer/src-web/env.d.ts +1 -12
  505. package/src/renderer/src-web/index.css +1 -1
  506. package/src/renderer/src-web/main.tsx +2 -1
  507. package/src/renderer/src-web/proactiveSuggestions.ts +3 -0
  508. package/src/renderer/src-web/tauri.ts +129 -354
  509. package/src/renderer/tests/backgroundTerminals.browser.html +81 -0
  510. package/src/renderer/tests/chatPanelFixture.ts +23 -0
  511. package/src/renderer/tests/chatPerformance.browser.html +71 -0
  512. package/src/renderer/tests/cliSessions.browser.html +82 -0
  513. package/src/renderer/tests/collapsedPaste.browser.html +70 -0
  514. package/src/renderer/tests/composerMenus.browser.html +116 -0
  515. package/src/renderer/tests/contextCompaction.browser.html +17 -0
  516. package/src/renderer/tests/conversationLifecycle.browser.html +70 -0
  517. package/src/renderer/tests/effectsPerformance.browser.html +13 -0
  518. package/src/renderer/tests/errorRecovery.browser.html +21 -0
  519. package/src/renderer/tests/glideSelect.browser.html +71 -0
  520. package/src/renderer/tests/glideSelect.preview.html +27 -0
  521. package/src/renderer/tests/library.browser.html +1 -0
  522. package/src/renderer/tests/library.browser.tsx +78 -0
  523. package/src/renderer/tests/liveOrb.browser.html +49 -0
  524. package/src/renderer/tests/liveVoice.browser.html +29 -0
  525. package/src/renderer/tests/modInput.browser.html +22 -0
  526. package/src/renderer/tests/sessionSources.browser.html +1 -0
  527. package/src/renderer/tests/sessionSources.browser.tsx +107 -0
  528. package/src/renderer/tests/skills.browser.html +24 -0
  529. package/src/renderer/tests/toolsPanel.browser.html +1 -0
  530. package/src/renderer/tests/toolsPanel.browser.tsx +113 -0
  531. package/src/renderer/tests/viewedImages.browser.html +1 -0
  532. package/src/renderer/tests/viewedImages.browser.tsx +93 -0
  533. package/src/renderer/tests/voicePill.browser.html +80 -0
  534. package/src/renderer/tests/voicePill.preview.html +34 -0
  535. package/src/renderer/tests/webSources.browser.html +1 -0
  536. package/src/renderer/tests/webSources.browser.tsx +98 -0
  537. package/src/renderer/tests/workspaceUndo.browser.html +92 -0
  538. package/src-tauri/Cargo.toml +40 -0
  539. package/src-tauri/build.rs +3 -0
  540. package/src-tauri/src/app/lifecycle.rs +277 -0
  541. package/src-tauri/src/app/mod.rs +4 -0
  542. package/src-tauri/src/app/shortcuts.rs +40 -0
  543. package/src-tauri/src/app/tray.rs +52 -0
  544. package/src-tauri/src/background/events.rs +70 -0
  545. package/src-tauri/src/background/headless.rs +230 -0
  546. package/src-tauri/src/background/mod.rs +4 -0
  547. package/src-tauri/src/background/proactive.rs +262 -0
  548. package/src-tauri/src/commands/approvals.rs +20 -0
  549. package/src-tauri/src/commands/auth.rs +127 -0
  550. package/src-tauri/src/commands/conversation.rs +642 -0
  551. package/src-tauri/src/commands/integrations.rs +157 -0
  552. package/src-tauri/src/commands/media.rs +179 -0
  553. package/src-tauri/src/commands/mod.rs +11 -0
  554. package/src-tauri/src/commands/mods.rs +6 -0
  555. package/src-tauri/src/commands/settings.rs +141 -0
  556. package/src-tauri/src/commands/voice.rs +153 -0
  557. package/src-tauri/src/commands/workspace.rs +501 -0
  558. package/src-tauri/src/lib.rs +10 -0
  559. package/src-tauri/src/main.rs +3 -0
  560. package/src-tauri/src/native/actions.rs +206 -0
  561. package/src-tauri/src/native/browser.rs +252 -0
  562. package/src-tauri/src/native/capture.rs +695 -0
  563. package/src-tauri/src/native/discord_rpc.rs +99 -0
  564. package/src-tauri/src/native/integrations.rs +126 -0
  565. package/src-tauri/src/native/mod.rs +12 -0
  566. package/src-tauri/src/native/notifications.rs +51 -0
  567. package/src-tauri/src/native/plugins.rs +14 -0
  568. package/src-tauri/src/native/system.rs +250 -0
  569. package/src-tauri/src/native/terminal.rs +201 -0
  570. package/src-tauri/src/native/updater.rs +148 -0
  571. package/src-tauri/src/native/windows.rs +143 -0
  572. package/tsconfig.json +2 -0
  573. package/vite.config.ts +4 -1
  574. package/vite.config.web.ts +4 -0
  575. package/.cargo/config.toml +0 -13
  576. package/.claude/settings.local.json +0 -182
  577. package/.codex +0 -0
  578. package/CLAUDE.md +0 -102
  579. package/ROADMAP.md +0 -30
  580. package/mint-presentation-demo.mp4 +0 -0
  581. package/out/web/Live2DCubismCore.js +0 -9
  582. package/out/web/assets/CliSessionsView-BxUVWEEL.js +0 -1
  583. package/out/web/assets/CliSessionsView-CBDTXuQv.css +0 -1
  584. package/out/web/assets/CodeReviewPage-DkMgfcos.css +0 -1
  585. package/out/web/assets/CodeReviewPage-jKlmLJwT.js +0 -3
  586. package/out/web/assets/CommandPalette-DnwPA5hy.js +0 -1
  587. package/out/web/assets/ImageStudioPanel-BR1XFwhR.js +0 -1
  588. package/out/web/assets/LinkedFoldersView-bi-CWQ-I.js +0 -1
  589. package/out/web/assets/McpRegistryPicker-D5tEFnyq.js +0 -1
  590. package/out/web/assets/McpServersView-BGG1dhFM.js +0 -1
  591. package/out/web/assets/MintDashboard-BIglDEWX.js +0 -20
  592. package/out/web/assets/MintDashboard-DSMywSgs.css +0 -1
  593. package/out/web/assets/ModelPanel-CbJ1PFoZ.js +0 -1
  594. package/out/web/assets/PicturesLibrary-CQP0fLP1.css +0 -1
  595. package/out/web/assets/PicturesLibrary-DoYN7T1p.js +0 -1
  596. package/out/web/assets/PluginsView-CU1HWXGk.js +0 -1
  597. package/out/web/assets/ScheduledTasksView-Bnl36y2N.js +0 -1
  598. package/out/web/assets/SettingsWindow-DhWLAn9T.css +0 -1
  599. package/out/web/assets/SettingsWindow-Dw8L01pw.js +0 -2
  600. package/out/web/assets/SkillsView-cnl8aY5p.js +0 -2
  601. package/out/web/assets/ToolSurfacePage-CgsQw6l5.css +0 -1
  602. package/out/web/assets/ToolSurfacePage-Cz2VJAPZ.js +0 -37
  603. package/out/web/assets/VeoStudioPanel-D4JnERWR.js +0 -4
  604. package/out/web/assets/chunk-CKBBP62Z-cIrXq6jN.js +0 -2
  605. package/out/web/assets/classDiagram-DTDB5LWJ-Dq0smRWk.js +0 -1
  606. package/out/web/assets/classDiagram-v2-JRS7N3AN-Dq0smRWk.js +0 -1
  607. package/out/web/assets/config-C-ZFtipU.css +0 -1
  608. package/out/web/assets/config-eEDngJXO.js +0 -1
  609. package/out/web/assets/core-hQ2VA9Ti.js +0 -1
  610. package/out/web/assets/dist-js-Bf2bhoku.js +0 -1
  611. package/out/web/assets/flowDiagram-A5DVABFB-BLg7nEcd.js +0 -1
  612. package/out/web/assets/index-Btsf4L8M.css +0 -1
  613. package/out/web/assets/index-D8D9MeRA.js +0 -11
  614. package/out/web/assets/lucide-react-Ip3L6Jtn.js +0 -1
  615. package/out/web/assets/markdown-BSeeUbJH.js +0 -38
  616. package/out/web/assets/modelManager-tMVmJVAW.js +0 -2
  617. package/out/web/assets/prompt-latin-400-normal-BQ9zjSN8.woff2 +0 -0
  618. package/out/web/assets/prompt-latin-400-normal-CxU4ec_r.woff +0 -0
  619. package/out/web/assets/prompt-latin-500-normal-B1edBDQ9.woff +0 -0
  620. package/out/web/assets/prompt-latin-500-normal-CxzxEHZc.woff2 +0 -0
  621. package/out/web/assets/prompt-latin-600-normal-CSDDLorv.woff +0 -0
  622. package/out/web/assets/prompt-latin-600-normal-hKZWXsc1.woff2 +0 -0
  623. package/out/web/assets/prompt-latin-700-normal-BfbftDSq.woff +0 -0
  624. package/out/web/assets/prompt-latin-700-normal-I2gc831J.woff2 +0 -0
  625. package/out/web/assets/prompt-thai-400-normal-BrkKv8cO.woff2 +0 -0
  626. package/out/web/assets/prompt-thai-400-normal-DJypnfr3.woff +0 -0
  627. package/out/web/assets/prompt-thai-500-normal-C18pDUoL.woff2 +0 -0
  628. package/out/web/assets/prompt-thai-500-normal-D7YNqUJD.woff +0 -0
  629. package/out/web/assets/prompt-thai-600-normal-CYPViXds.woff +0 -0
  630. package/out/web/assets/prompt-thai-600-normal-MrdfU7zR.woff2 +0 -0
  631. package/out/web/assets/prompt-thai-700-normal-Cb5ilR-c.woff +0 -0
  632. package/out/web/assets/prompt-thai-700-normal-Cg4aQ0Nn.woff2 +0 -0
  633. package/out/web/assets/stateDiagram-v2-4QOOHH4V-DeEc0lGZ.js +0 -1
  634. package/out/web/assets/swimlanesDiagram-VK2B7HYN-DpVik9v7.js +0 -8
  635. package/out/web/assets/window-5qYXKoW7.js +0 -1
  636. package/skills-lock.json +0 -77
  637. package/src/renderer/public/Live2DCubismCore.js +0 -9
  638. package/src/renderer/src/companionWidget.ts +0 -95
  639. package/src/renderer/src/components/Live2DStage.tsx +0 -412
  640. package/src/renderer/src/components/ModelPanel.tsx +0 -155
  641. package/src/renderer/src/css/model.css +0 -628
  642. package/src/renderer/src-web/companionWidget.ts +0 -37
  643. package/src/renderer/src-web/components/ModelPanel.tsx +0 -12
  644. package/src/renderer/src-web/css/model.css +0 -628
@@ -1,3 +0,0 @@
1
- import{i as e,n as t}from"./chunk-CacB07dV.js";import{D as n,E as r,k as i,w as a,y as o}from"./index-D8D9MeRA.js";import{a as s,n as c,v as l,y as u}from"./markdown-BSeeUbJH.js";function d(e){let t=e.toLowerCase();return t.endsWith(`.html`)||t.endsWith(`.htm`)?`html`:t.endsWith(`.svg`)?`svg`:t.endsWith(`.md`)||t.endsWith(`.markdown`)?`markdown`:`code`}function f(e){let t=e.split(`.`).pop()?.toLowerCase()||``;return{js:`javascript`,jsx:`javascript`,ts:`typescript`,tsx:`typescript`,html:`html`,htm:`html`,css:`css`,json:`json`,rs:`rust`,py:`python`,svg:`xml`,md:`markdown`}[t]||t||`plaintext`}function p({artifact:e,onClose:t,workspacePath:n}){let[i,a]=(0,m.useState)(`preview`),[o,c]=(0,m.useState)(`desktop`),[u,p]=(0,m.useState)(e?.content||``),[g,_]=(0,m.useState)(!1),[v,y]=(0,m.useState)(null),[b,x]=(0,m.useState)(!1),S=e?.path||``,C=(0,m.useMemo)(()=>{if(!S)return``;let e=S.replace(/\\/g,`/`).split(`/`);return e[e.length-1]||S},[S]),w=(0,m.useMemo)(()=>e?.type?e.type:d(S),[e,S]),T=(0,m.useMemo)(()=>f(S),[S]),E=(0,m.useCallback)(async()=>{if(S){_(!0),y(null);try{p(await r.readWorkspaceFile(S,n))}catch(t){e?.content?p(e.content):y(t?.message||`Unable to read file content`)}finally{_(!1)}}},[S,n,e]);return(0,m.useEffect)(()=>{e?.content?p(e.content):E()},[e,E]),e?(0,h.jsxs)(`aside`,{className:`artifact-preview-panel`,style:{display:`flex`,flexDirection:`column`,width:`var(--preview-width, 50%)`,minWidth:`280px`,maxWidth:`none`,height:`100%`,background:`var(--panel-bg, #1e1e20)`,color:`var(--text-main, #e8e8ea)`,position:`relative`,zIndex:10,overflow:`hidden`},children:[(0,h.jsxs)(`header`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,padding:`10px 14px`,borderBottom:`1px solid var(--border)`,background:`var(--surface-bg, #252527)`,gap:`8px`,flexShrink:0},children:[(0,h.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:`8px`,minWidth:0},children:[(0,h.jsx)(`span`,{style:{display:`inline-flex`,alignItems:`center`,justifyContent:`center`,width:`24px`,height:`24px`,borderRadius:`var(--radius-xs, 4px)`,background:`color-mix(in srgb, var(--accent) 15%, transparent)`,color:`var(--interactive-fg)`,fontSize:`0.68rem`,fontWeight:700,flexShrink:0},children:w.toUpperCase().slice(0,3)}),(0,h.jsxs)(`div`,{style:{minWidth:0,display:`flex`,flexDirection:`column`},children:[(0,h.jsx)(`span`,{style:{fontWeight:600,fontSize:`0.86rem`,color:`var(--text-main)`,overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`},title:S,children:C}),(0,h.jsx)(`button`,{type:`button`,onClick:async()=>{if(S)try{await navigator.clipboard.writeText(S),x(!0),setTimeout(()=>x(!1),1800)}catch{}},style:{background:`none`,border:`none`,color:b?`var(--accent)`:`var(--text-muted)`,fontSize:`0.7rem`,padding:0,cursor:`pointer`,textAlign:`left`,display:`inline-flex`,alignItems:`center`,gap:`4px`},children:b?`Path Copied`:`Copy path`})]})]}),(0,h.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:`6px`},children:[(0,h.jsxs)(`div`,{style:{display:`inline-flex`,padding:`2px`,background:`color-mix(in srgb, var(--text-main) 6%, transparent)`,borderRadius:`var(--radius-sm, 6px)`,border:`1px solid var(--border)`},children:[(0,h.jsx)(`button`,{type:`button`,onClick:()=>a(`preview`),style:{background:i===`preview`?`var(--accent)`:`transparent`,color:i===`preview`?`#ffffff`:`var(--text-muted)`,border:`none`,borderRadius:`var(--radius-xs, 4px)`,padding:`3px 9px`,fontSize:`0.75rem`,fontWeight:500,cursor:`pointer`,transition:`all 0.15s ease`},children:`Preview`}),(0,h.jsx)(`button`,{type:`button`,onClick:()=>a(`code`),style:{background:i===`code`?`var(--accent)`:`transparent`,color:i===`code`?`#ffffff`:`var(--text-muted)`,border:`none`,borderRadius:`var(--radius-xs, 4px)`,padding:`3px 9px`,fontSize:`0.75rem`,fontWeight:500,cursor:`pointer`,transition:`all 0.15s ease`},children:`Code`})]}),i===`preview`&&w===`html`&&(0,h.jsxs)(`div`,{style:{display:`inline-flex`,padding:`2px`,background:`color-mix(in srgb, var(--text-main) 6%, transparent)`,borderRadius:`var(--radius-sm, 6px)`,border:`1px solid var(--border)`},children:[(0,h.jsx)(`button`,{type:`button`,onClick:()=>c(`desktop`),title:`Desktop 100%`,style:{background:o===`desktop`?`color-mix(in srgb, var(--text-main) 12%, transparent)`:`transparent`,color:o===`desktop`?`var(--text-main)`:`var(--text-muted)`,border:`none`,borderRadius:`var(--radius-xs, 4px)`,padding:`3px 7px`,cursor:`pointer`,fontSize:`0.72rem`},children:`Desktop`}),(0,h.jsx)(`button`,{type:`button`,onClick:()=>c(`tablet`),title:`Tablet (768px)`,style:{background:o===`tablet`?`color-mix(in srgb, var(--text-main) 12%, transparent)`:`transparent`,color:o===`tablet`?`var(--text-main)`:`var(--text-muted)`,border:`none`,borderRadius:`var(--radius-xs, 4px)`,padding:`3px 7px`,cursor:`pointer`,fontSize:`0.72rem`},children:`Tablet`}),(0,h.jsx)(`button`,{type:`button`,onClick:()=>c(`mobile`),title:`Mobile (375px)`,style:{background:o===`mobile`?`color-mix(in srgb, var(--text-main) 12%, transparent)`:`transparent`,color:o===`mobile`?`var(--text-main)`:`var(--text-muted)`,border:`none`,borderRadius:`var(--radius-xs, 4px)`,padding:`3px 7px`,cursor:`pointer`,fontSize:`0.72rem`},children:`Mobile`})]})]}),(0,h.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:`4px`},children:[(0,h.jsx)(`button`,{type:`button`,onClick:E,disabled:g,title:`Reload content from file`,style:{background:`none`,border:`none`,color:`var(--text-muted)`,padding:`5px`,borderRadius:`var(--radius-xs, 4px)`,cursor:`pointer`,display:`inline-flex`,alignItems:`center`},children:(0,h.jsxs)(`svg`,{width:`14`,height:`14`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,style:{animation:g?`spin 1s linear infinite`:`none`},children:[(0,h.jsx)(`polyline`,{points:`23 4 23 10 17 10`}),(0,h.jsx)(`polyline`,{points:`1 20 1 14 7 14`}),(0,h.jsx)(`path`,{d:`M3.51 9a9 9 0 0 1 14.85-3.36L23 10M1 14l4.64 4.36A9 9 0 0 0 20.49 15`})]})}),(0,h.jsx)(`button`,{type:`button`,onClick:()=>{if(!u)return;let e=new Blob([u],{type:`${w===`html`?`text/html`:w===`svg`?`image/svg+xml`:w===`markdown`?`text/markdown`:`text/plain`};charset=utf-8`}),t=URL.createObjectURL(e);window.open(t,`_blank`)},title:`Open preview in new window`,style:{background:`none`,border:`none`,color:`var(--text-muted)`,padding:`5px`,borderRadius:`var(--radius-xs, 4px)`,cursor:`pointer`,display:`inline-flex`,alignItems:`center`},children:(0,h.jsxs)(`svg`,{width:`14`,height:`14`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,h.jsx)(`path`,{d:`M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6`}),(0,h.jsx)(`polyline`,{points:`15 3 21 3 21 9`}),(0,h.jsx)(`line`,{x1:`10`,y1:`14`,x2:`21`,y2:`3`})]})}),(0,h.jsx)(`button`,{type:`button`,onClick:t,title:`Close preview Panel`,style:{background:`none`,border:`none`,color:`var(--text-muted)`,padding:`5px`,borderRadius:`var(--radius-xs, 4px)`,cursor:`pointer`,display:`inline-flex`,alignItems:`center`},children:(0,h.jsxs)(`svg`,{width:`16`,height:`16`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,h.jsx)(`line`,{x1:`18`,y1:`6`,x2:`6`,y2:`18`}),(0,h.jsx)(`line`,{x1:`6`,y1:`6`,x2:`18`,y2:`18`})]})})]})]}),(0,h.jsx)(`div`,{style:{flex:1,overflow:`auto`,display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`flex-start`,background:i===`preview`&&w===`html`?`var(--input-bg, #0a0a0b)`:`transparent`,padding:i===`preview`&&w===`html`?`16px`:`0`},children:v?(0,h.jsxs)(`div`,{style:{padding:`24px`,textAlign:`center`,color:`var(--status-error, #f87171)`},children:[(0,h.jsx)(`p`,{style:{fontWeight:600,marginBottom:`8px`},children:`Error loading preview`}),(0,h.jsx)(`p`,{style:{fontSize:`0.8rem`,opacity:.8},children:v}),(0,h.jsx)(`button`,{type:`button`,onClick:E,style:{marginTop:`12px`,padding:`4px 12px`,borderRadius:`var(--radius-xs, 4px)`,background:`var(--hover-delete-bg, rgba(239, 68, 68, 0.15))`,color:`var(--status-error, #f87171)`,border:`1px solid color-mix(in srgb, var(--status-error, #ef4444) 30%, transparent)`,cursor:`pointer`,fontSize:`0.78rem`},children:`Retry`})]}):i===`code`?(0,h.jsx)(`div`,{style:{width:`100%`,height:`100%`,overflow:`auto`,padding:`12px`},children:(0,h.jsx)(l,{code:u,language:T})}):w===`html`?(0,h.jsx)(`div`,{style:{width:o===`mobile`?`375px`:o===`tablet`?`768px`:`100%`,maxWidth:`100%`,height:`100%`,background:`#ffffff`,borderRadius:o===`desktop`?`0px`:`var(--radius-md, 8px)`,overflow:`hidden`,boxShadow:o===`desktop`?`none`:`var(--shadow-md, 0 10px 25px rgba(0,0,0,0.5))`,border:o===`desktop`?`none`:`1px solid var(--border)`,transition:`width 0.25s cubic-bezier(0.4, 0, 0.2, 1)`},children:(0,h.jsx)(`iframe`,{title:C,srcDoc:u,sandbox:`allow-scripts allow-forms allow-modals`,style:{width:`100%`,height:`100%`,border:`none`,background:`#ffffff`}})}):w===`svg`?(0,h.jsx)(`div`,{style:{width:`100%`,height:`100%`,display:`flex`,alignItems:`center`,justifyContent:`center`,padding:`24px`,backgroundImage:`linear-gradient(45deg, color-mix(in srgb, var(--text-main) 4%, transparent) 25%, transparent 25%), linear-gradient(-45deg, color-mix(in srgb, var(--text-main) 4%, transparent) 25%, transparent 25%), linear-gradient(45deg, transparent 75%, color-mix(in srgb, var(--text-main) 4%, transparent) 75%), linear-gradient(-45deg, transparent 75%, color-mix(in srgb, var(--text-main) 4%, transparent) 75%)`,backgroundSize:`20px 20px`,backgroundPosition:`0 0, 0 10px, 10px -10px, -10px 0px`,overflow:`auto`},children:(0,h.jsx)(`div`,{style:{maxWidth:`90%`,maxHeight:`90%`,display:`flex`,alignItems:`center`,justifyContent:`center`},dangerouslySetInnerHTML:{__html:u}})}):w===`markdown`?(0,h.jsx)(`div`,{style:{width:`100%`,height:`100%`,overflow:`auto`,padding:`20px 24px`,lineHeight:1.6,color:`var(--text-chat, var(--text-main))`},children:s(u)}):(0,h.jsx)(`div`,{style:{width:`100%`,height:`100%`,overflow:`auto`,padding:`12px`},children:(0,h.jsx)(l,{code:u,language:T})})})]}):null}var m,h,g=t((()=>{m=e(i()),a(),c(),u(),h=o()}));function _(e){return e instanceof Error?e.message:typeof e==`string`?e:`Git could not complete that action.`}function v({workspacePath:e,disabled:t=!1,onBranchChanged:r}){let[i,a]=(0,y.useState)(null),[o,s]=(0,y.useState)(!1),[c,l]=(0,y.useState)(``),[u,d]=(0,y.useState)(``),[f,p]=(0,y.useState)(``),[m,h]=(0,y.useState)(`branches`),[g,v]=(0,y.useState)(``),[x,S]=(0,y.useState)([]),[C,w]=(0,y.useState)(!1),[T,E]=(0,y.useState)(`up`),[ee,D]=(0,y.useState)(`left`),[O,k]=(0,y.useState)(480),A=(0,y.useRef)(null),j=(0,y.useRef)(null),M=(0,y.useRef)(t),N=(0,y.useCallback)(async()=>{if(!e.trim()){a(null);return}try{a(await n.getGitBranchInfo(e)),d(``)}catch(e){a(null),d(_(e))}},[e]);(0,y.useEffect)(()=>{let t=!1;if(!e.trim()){a(null),s(!1);return}return n.getGitBranchInfo(e).then(e=>{t||(a(e),d(``))}).catch(e=>{t||(a(null),d(_(e)))}),()=>{t=!0}},[e]),(0,y.useEffect)(()=>{if(!o)return;let e=e=>{A.current?.contains(e.target)||s(!1)},t=e=>{e.key===`Escape`&&(s(!1),j.current?.focus())};return document.addEventListener(`mousedown`,e),window.addEventListener(`keydown`,t),()=>{document.removeEventListener(`mousedown`,e),window.removeEventListener(`keydown`,t)}},[o]),(0,y.useEffect)(()=>{let e=()=>N();return window.addEventListener(`focus`,e),()=>window.removeEventListener(`focus`,e)},[N]),(0,y.useEffect)(()=>{t?s(!1):M.current&&N(),M.current=t},[t,N]);let P=(0,y.useMemo)(()=>{if(!i)return[];let e=c.trim().toLocaleLowerCase();return[...e?i.branches.filter(t=>t.toLocaleLowerCase().includes(e)):i.branches].sort((e,t)=>e===i.currentBranch?-1:t===i.currentBranch?1:e.localeCompare(t))},[i,c]),F=(0,y.useMemo)(()=>{if(!i)return[];let e=c.trim().toLocaleLowerCase();return i.remoteBranches.filter(t=>{let n=t.split(`/`).slice(1).join(`/`);return i.branches.includes(n)?!1:!e||t.toLocaleLowerCase().includes(e)})},[i,c]);if(!i?.isRepository)return u?(0,b.jsx)(`div`,{className:`git-branch-selector is-error`,children:(0,b.jsx)(`button`,{type:`button`,className:`git-branch-trigger`,onClick:N,title:`${u} Select to retry.`,"aria-label":`Git branch unavailable. Retry`,children:(0,b.jsx)(`span`,{className:`git-branch-name`,children:`Git unavailable`})})}):null;let I=i.currentBranch||(i.detachedHead?`Detached ${i.detachedHead}`:`No branch`),L=e=>{a(e),s(!1),l(``),h(`branches`)},R=async(e,t)=>{let n=await t(!1);if(n.status===`confirmation_required`){if(!window.confirm(`This workspace has uncommitted changes. ${e} Git will stop if the changes conflict.`))return;n=await t(!0)}if(n.status===`confirmation_required`)throw Error(`Workspace confirmation was not accepted.`);L(n.info),r?.()},z=async t=>{if(t===i.currentBranch||f){s(!1);return}try{d(``),p(t),await R(`Switch from ${I} to ${t}?`,r=>n.switchGitBranch(e,t,r))}catch(e){d(_(e))}finally{p(``)}},te=async t=>{if(!f)try{d(``),p(t),await R(`Check out ${t}?`,r=>n.checkoutRemoteGitBranch(e,t,r))}catch(e){d(_(e))}finally{p(``)}},B=async t=>{t.preventDefault();let r=g.trim();if(!(!r||f))try{d(``),p(r),await R(`Create and switch to ${r}?`,t=>n.createGitBranch(e,r,t)),v(``)}catch(e){d(_(e))}finally{p(``)}},V=async()=>{try{d(``),w(!0),S(await n.getGitGraph(e))}catch(e){S([]),d(_(e))}finally{w(!1)}},H=(e,t=320)=>{let n=j.current?.getBoundingClientRect();if(!n)return;let r=A.current?.closest(`.conversation-panel`)?.getBoundingClientRect(),i=Math.max(16,r?.left??16),a=Math.min(window.innerWidth-16,r?.right??window.innerWidth-16),o=Math.max(0,a-n.left),s=Math.max(0,n.right-i);D(o>=Math.min(t,window.innerWidth-32)||o>=s?`left`:`right`);let c=Math.max(0,n.top-16),l=Math.max(0,window.innerHeight-n.bottom-16),u=c>=e||c>=l?`up`:`down`;E(u),k(Math.max(180,u===`up`?c:l))};return(0,b.jsxs)(`div`,{className:`git-branch-selector`,ref:A,children:[(0,b.jsxs)(`button`,{ref:j,type:`button`,className:`git-branch-trigger`,onClick:()=>{s(e=>(e||H(360),!e)),l(``),d(``),h(`branches`)},disabled:t||!!f,"aria-haspopup":`dialog`,"aria-expanded":o,"aria-controls":`workspace-branch-menu`,title:`${I}${i.isDirty?` — uncommitted changes`:``}`,children:[(0,b.jsxs)(`svg`,{className:`git-branch-icon`,width:`15`,height:`15`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.8`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,children:[(0,b.jsx)(`circle`,{cx:`6`,cy:`5`,r:`2`}),(0,b.jsx)(`circle`,{cx:`18`,cy:`6`,r:`2`}),(0,b.jsx)(`circle`,{cx:`6`,cy:`19`,r:`2`}),(0,b.jsx)(`path`,{d:`M6 7v10M8 7c2 4 8 1 8-1`})]}),(0,b.jsx)(`span`,{className:`git-branch-name`,children:f||I}),i.isDirty&&(0,b.jsx)(`span`,{className:`git-branch-dirty`,"aria-label":`Uncommitted changes`}),(0,b.jsx)(`svg`,{className:`git-branch-chevron`,width:`12`,height:`12`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,children:(0,b.jsx)(`path`,{d:`m6 9 6 6 6-6`})})]}),o&&(0,b.jsxs)(`div`,{className:`git-branch-menu ${m===`graph`?`is-graph`:``} ${T===`down`?`opens-down`:``} ${ee===`right`?`align-right`:``}`,id:`workspace-branch-menu`,role:`dialog`,style:{maxHeight:`${O}px`},"aria-label":m===`graph`?`Git graph`:m===`create`?`Create branch`:`Choose branch`,children:[m===`branches`&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)(`label`,{className:`git-branch-search`,children:[(0,b.jsxs)(`svg`,{width:`14`,height:`14`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,"aria-hidden":`true`,children:[(0,b.jsx)(`circle`,{cx:`11`,cy:`11`,r:`7`}),(0,b.jsx)(`path`,{d:`m20 20-4-4`})]}),(0,b.jsx)(`input`,{autoFocus:!0,"aria-label":`Search branches`,value:c,onChange:e=>l(e.target.value),placeholder:`Search branches`})]}),(0,b.jsx)(`div`,{className:`git-branch-menu-heading`,children:`Local branches`}),(0,b.jsx)(`div`,{className:`git-branch-list`,role:`listbox`,"aria-label":`Local branches`,children:P.map(e=>{let t=e===i.currentBranch;return(0,b.jsxs)(`button`,{type:`button`,className:`git-branch-option`,role:`option`,"aria-selected":t,disabled:!!f,onClick:()=>z(e),children:[(0,b.jsx)(`span`,{className:`git-branch-option-icon`,"aria-hidden":`true`,children:`⑂`}),(0,b.jsx)(`span`,{children:e}),t&&(0,b.jsx)(`svg`,{width:`14`,height:`14`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,children:(0,b.jsx)(`path`,{d:`m5 12 4 4L19 6`})})]},e)})}),F.length>0&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(`div`,{className:`git-branch-menu-heading`,children:`Remote branches`}),(0,b.jsx)(`div`,{className:`git-branch-list is-remote`,role:`listbox`,"aria-label":`Remote branches`,children:F.map(e=>(0,b.jsxs)(`button`,{type:`button`,className:`git-branch-option`,role:`option`,"aria-selected":`false`,disabled:!!f,onClick:()=>te(e),title:`Create a local tracking branch from ${e}`,children:[(0,b.jsx)(`span`,{className:`git-branch-option-icon`,"aria-hidden":`true`,children:`⇄`}),(0,b.jsx)(`span`,{children:e}),(0,b.jsx)(`span`,{className:`git-branch-track-label`,children:`Track`})]},e))})]}),P.length===0&&F.length===0&&(0,b.jsx)(`div`,{className:`git-branch-empty`,children:`No matching branches`}),(0,b.jsxs)(`div`,{className:`git-branch-actions`,children:[(0,b.jsxs)(`button`,{type:`button`,onClick:()=>{h(`create`),d(``)},children:[(0,b.jsx)(`span`,{"aria-hidden":`true`,children:`+`}),`Create branch`]}),(0,b.jsxs)(`button`,{type:`button`,onClick:()=>{H(420,window.innerWidth<=1100?320:540),h(`graph`),V()},children:[(0,b.jsx)(`span`,{"aria-hidden":`true`,children:`⑂`}),`Git graph`]})]})]}),m===`create`&&(0,b.jsxs)(`form`,{className:`git-branch-create`,onSubmit:B,children:[(0,b.jsxs)(`div`,{className:`git-branch-view-header`,children:[(0,b.jsx)(`button`,{type:`button`,onClick:()=>{h(`branches`),d(``)},"aria-label":`Back to branches`,children:`←`}),(0,b.jsx)(`strong`,{children:`Create branch`})]}),(0,b.jsx)(`label`,{htmlFor:`new-git-branch-name`,children:`Branch name`}),(0,b.jsx)(`input`,{id:`new-git-branch-name`,autoFocus:!0,value:g,onChange:e=>v(e.target.value),placeholder:`feature/branch-name`,spellCheck:`false`,autoComplete:`off`}),(0,b.jsxs)(`p`,{children:[`Creates the branch from `,(0,b.jsx)(`strong`,{children:I}),` and switches to it.`]}),(0,b.jsx)(`button`,{className:`git-branch-create-submit`,type:`submit`,disabled:!g.trim()||!!f,children:f?`Creating…`:`Create and switch`})]}),m===`graph`&&(0,b.jsxs)(`div`,{className:`git-graph-view`,children:[(0,b.jsxs)(`div`,{className:`git-branch-view-header`,children:[(0,b.jsx)(`button`,{type:`button`,onClick:()=>{h(`branches`),d(``)},"aria-label":`Back to branches`,children:`←`}),(0,b.jsx)(`strong`,{children:`Git graph`}),(0,b.jsx)(`button`,{type:`button`,className:`git-graph-refresh`,onClick:V,disabled:C,children:`Refresh`})]}),C?(0,b.jsx)(`div`,{className:`git-graph-state`,children:`Reading repository history…`}):u?null:x.length>0?(0,b.jsx)(`pre`,{className:`git-graph-output`,tabIndex:0,children:x.join(`
2
- `)}):(0,b.jsx)(`div`,{className:`git-graph-state`,children:`No commits yet`})]}),u&&(0,b.jsxs)(`div`,{className:`git-branch-error`,role:`alert`,children:[(0,b.jsx)(`span`,{children:u}),m===`graph`&&(0,b.jsx)(`button`,{type:`button`,onClick:V,children:`Retry`})]})]})]})}var y,b,x=t((()=>{y=e(i()),a(),b=o()})),S,C=t((()=>{S=`data:image/svg+xml,%3csvg%20viewBox='0%200%2016%2016'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='m6.922%203.768-.644-.536A1%201%200%200%200%205.638%203H2a1%201%200%200%200-1%201v8a1%201%200%200%200%201%201h12a1%201%200%200%200%201-1V5a1%201%200%200%200-1-1H7.562a1%201%200%200%201-.64-.232'%20fill='%2390a4ae'%20/%3e%3c/svg%3e`})),w,T=t((()=>{w=`data:image/svg+xml,%3csvg%20viewBox='0%200%2016%2016'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M14.483%206H4.721a1%201%200%200%200-.949.684L2%2012V5h12a1%201%200%200%200-1-1H7.562a1%201%200%200%201-.64-.232l-.644-.536A1%201%200%200%200%205.638%203H2a1%201%200%200%200-1%201v8a1%201%200%200%200%201%201h11l2.403-5.606A1%201%200%200%200%2014.483%206'%20fill='%2390a4ae'%20/%3e%3c/svg%3e`})),E,ee=t((()=>{E=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2032%2032'%3e%3cpath%20fill='%23c0ca33'%20d='m13.844%207.536-1.288-1.072A2%202%200%200%200%2011.276%206H4a2%202%200%200%200-2%202v16a2%202%200%200%200%202%202h24a2%202%200%200%200%202-2V10a2%202%200%200%200-2-2H15.124a2%202%200%200%201-1.28-.464'/%3e%3cpath%20fill='%23f0f4c3'%20d='M12%2020h8v8h-8zm10%200h8v8h-8zM12%2010h8v8h-8zm8.343%204L26%208.343%2031.657%2014%2026%2019.657z'/%3e%3c/svg%3e`})),D,O=t((()=>{D=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2032%2032'%3e%3cpath%20fill='%23c0ca33'%20d='M28.967%2012H9.442a2%202%200%200%200-1.898%201.368L4%2024V10h24a2%202%200%200%200-2-2H15.124a2%202%200%200%201-1.28-.464l-1.288-1.072A2%202%200%200%200%2011.276%206H4a2%202%200%200%200-2%202v16a2%202%200%200%200%202%202h22l4.805-11.212A2%202%200%200%200%2028.967%2012'/%3e%3cpath%20fill='%23f0f4c3'%20d='M12%2020h8v8h-8zm10%200h8v8h-8zM12%2010h8v8h-8zm8.343%204L26%208.343%2031.657%2014%2026%2019.657z'/%3e%3c/svg%3e`})),k,A=t((()=>{k=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2032%2032'%3e%3cpath%20fill='%23e57373'%20d='m13.844%207.536-1.288-1.072A2%202%200%200%200%2011.276%206H4a2%202%200%200%200-2%202v16a2%202%200%200%200%202%202h24a2%202%200%200%200%202-2V10a2%202%200%200%200-2-2H15.124a2%202%200%200%201-1.28-.464'/%3e%3cpath%20fill='%23ffcdd2'%20d='M30%2014h-4v-2l-2-2h-4l-2%202v2h-4a2%202%200%200%200-2%202v10a2%202%200%200%200%202%202h16a2%202%200%200%200%202-2V16a2%202%200%200%200-2-2m-10%200v-2h4v2Z'/%3e%3c/svg%3e`})),j,M=t((()=>{j=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2032%2032'%3e%3cpath%20fill='%23e57373'%20d='M28.967%2012H9.442a2%202%200%200%200-1.898%201.368L4%2024V10h24a2%202%200%200%200-2-2H15.124a2%202%200%200%201-1.28-.464l-1.288-1.072A2%202%200%200%200%2011.276%206H4a2%202%200%200%200-2%202v16a2%202%200%200%200%202%202h22l4.805-11.212A2%202%200%200%200%2028.967%2012'/%3e%3cpath%20fill='%23ffcdd2'%20d='M30%2014h-4v-2l-2-2h-4l-2%202v2h-4a2%202%200%200%200-2%202v10a2%202%200%200%200%202%202h16a2%202%200%200%200%202-2V16a2%202%200%200%200-2-2m-10%200v-2h4v2Z'/%3e%3c/svg%3e`})),N,P=t((()=>{N=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2032%2032'%3e%3cpath%20fill='%230277bd'%20d='m13.844%207.536-1.288-1.072A2%202%200%200%200%2011.276%206H4a2%202%200%200%200-2%202v16a2%202%200%200%200%202%202h24a2%202%200%200%200%202-2V10a2%202%200%200%200-2-2H15.124a2%202%200%200%201-1.28-.464'/%3e%3cpath%20fill='%23b3e5fc'%20d='M24%2010h-7a1%201%200%200%200-1%201v16a1%201%200%200%200%201%201h12a1%201%200%200%200%201-1V16Zm0%2016h-6v-2h6Zm4-4H18v-2h10Zm-4.828-5.172V12L28%2016.828Z'/%3e%3c/svg%3e`})),F,I=t((()=>{F=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2032%2032'%3e%3cpath%20fill='%230277bd'%20d='M28.967%2012H9.442a2%202%200%200%200-1.898%201.368L4%2024V10h24a2%202%200%200%200-2-2H15.124a2%202%200%200%201-1.28-.464l-1.288-1.072A2%202%200%200%200%2011.276%206H4a2%202%200%200%200-2%202v16a2%202%200%200%200%202%202h22l4.805-11.212A2%202%200%200%200%2028.967%2012'/%3e%3cpath%20fill='%23b3e5fc'%20d='M24%2010h-7a1%201%200%200%200-1%201v16a1%201%200%200%200%201%201h12a1%201%200%200%200%201-1V16Zm0%2016h-6v-2h6Zm4-4H18v-2h10Zm-4.828-5.172V12L28%2016.828Z'/%3e%3c/svg%3e`})),L,R=t((()=>{L=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2032%2032'%3e%3cpath%20fill='%23ff7043'%20d='m13.844%207.536-1.288-1.072A2%202%200%200%200%2011.276%206H4a2%202%200%200%200-2%202v16a2%202%200%200%200%202%202h24a2%202%200%200%200%202-2V10a2%202%200%200%200-2-2H15.124a2%202%200%200%201-1.28-.464'/%3e%3cpath%20fill='%23ffccbc'%20d='m12.593%2018.589%205.784-5.794%201.692%201.7a1.98%201.98%200%200%200%20.93%202.233v5.544a1.99%201.99%200%200%200-1%201.731%202.002%202.002%200%200%200%204.003%200A1.99%201.99%200%200%200%2023%2022.272v-4.864l2.071%202.092a1.2%201.2%200%200%200-.07.5%202.002%202.002%200%201%200%202.002-2.002%201.2%201.2%200%200%200-.5.07l-2.573-2.571a1.98%201.98%200%200%200-1.15-2.342%202.1%202.1%200%200%200-1.281-.09l-1.702-1.692.791-.78a1.975%201.975%200%200%201%202.822%200l7.996%207.996a1.975%201.975%200%200%201%200%202.822l-7.996%207.996a1.975%201.975%200%200%201-2.822%200l-7.996-7.996a1.975%201.975%200%200%201%200-2.822Z'/%3e%3c/svg%3e`})),z,te=t((()=>{z=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2032%2032'%3e%3cpath%20fill='%23ff7043'%20d='M28.967%2012H9.442a2%202%200%200%200-1.898%201.368L4%2024V10h24a2%202%200%200%200-2-2H15.124a2%202%200%200%201-1.28-.464l-1.288-1.072A2%202%200%200%200%2011.276%206H4a2%202%200%200%200-2%202v16a2%202%200%200%200%202%202h22l4.805-11.212A2%202%200%200%200%2028.967%2012'/%3e%3cpath%20fill='%23ffccbc'%20d='m12.593%2018.589%205.784-5.794%201.692%201.7a1.98%201.98%200%200%200%20.93%202.233v5.544a1.99%201.99%200%200%200-1%201.731%202.002%202.002%200%200%200%204.003%200A1.99%201.99%200%200%200%2023%2022.272v-4.864l2.071%202.092a1.2%201.2%200%200%200-.07.5%202.002%202.002%200%201%200%202.002-2.002%201.2%201.2%200%200%200-.5.07l-2.573-2.571a1.98%201.98%200%200%200-1.15-2.342%202.1%202.1%200%200%200-1.281-.09l-1.702-1.692.791-.78a1.975%201.975%200%200%201%202.822%200l7.996%207.996a1.975%201.975%200%200%201%200%202.822l-7.996%207.996a1.975%201.975%200%200%201-2.822%200l-7.996-7.996a1.975%201.975%200%200%201%200-2.822Z'/%3e%3c/svg%3e`})),B,V=t((()=>{B=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2032%2032'%3e%3cpath%20fill='%23546e7a'%20d='m13.844%207.536-1.288-1.072A2%202%200%200%200%2011.276%206H4a2%202%200%200%200-2%202v16a2%202%200%200%200%202%202h24a2%202%200%200%200%202-2V10a2%202%200%200%200-2-2H15.124a2%202%200%200%201-1.28-.464'/%3e%3cpath%20fill='%23eceff1'%20d='M23%2010a9.03%209.03%200%200%200-9%209.063%209.08%209.08%200%200%200%206.157%208.609c.45.072.593-.21.593-.453v-1.532c-2.493.544-3.024-1.214-3.024-1.214a2.42%202.42%200%200%200-.998-1.333c-.82-.561.062-.544.062-.544a1.9%201.9%200%200%201%201.377.933%201.925%201.925%200%200%200%202.62.754%201.96%201.96%200%200%201%20.566-1.215c-1.998-.227-4.094-1.007-4.094-4.459a3.52%203.52%200%200%201%20.927-2.456%203.26%203.26%200%200%201%20.09-2.392s.754-.245%202.474.924a8.6%208.6%200%200%201%204.5%200c1.718-1.169%202.476-.924%202.476-.924a3.26%203.26%200%200%201%20.088%202.392%203.52%203.52%200%200%201%20.927%202.456c0%203.462-2.105%204.223-4.112%204.45a2.17%202.17%200%200%201%20.622%201.676v2.484c0%20.244.143.533.602.453A9.08%209.08%200%200%200%2023%2010'/%3e%3c/svg%3e`})),H,ne=t((()=>{H=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2032%2032'%3e%3cpath%20fill='%23546e7a'%20d='M28.967%2012H9.442a2%202%200%200%200-1.898%201.368L4%2024V10h24a2%202%200%200%200-2-2H15.124a2%202%200%200%201-1.28-.464l-1.288-1.072A2%202%200%200%200%2011.276%206H4a2%202%200%200%200-2%202v16a2%202%200%200%200%202%202h22l4.805-11.212A2%202%200%200%200%2028.967%2012'/%3e%3cpath%20fill='%23eceff1'%20d='M23%2010a9.03%209.03%200%200%200-9%209.063%209.08%209.08%200%200%200%206.157%208.609c.45.072.593-.21.593-.453v-1.532c-2.493.544-3.024-1.214-3.024-1.214a2.42%202.42%200%200%200-.998-1.333c-.82-.561.062-.544.062-.544a1.9%201.9%200%200%201%201.377.933%201.925%201.925%200%200%200%202.62.754%201.96%201.96%200%200%201%20.566-1.215c-1.998-.227-4.094-1.007-4.094-4.459a3.52%203.52%200%200%201%20.927-2.456%203.26%203.26%200%200%201%20.09-2.392s.754-.245%202.474.924a8.6%208.6%200%200%201%204.5%200c1.718-1.169%202.476-.924%202.476-.924a3.26%203.26%200%200%201%20.088%202.392%203.52%203.52%200%200%201%20.927%202.456c0%203.462-2.105%204.223-4.112%204.45a2.17%202.17%200%200%201%20.622%201.676v2.484c0%20.244.143.533.602.453A9.08%209.08%200%200%200%2023%2010'/%3e%3c/svg%3e`})),re,ie=t((()=>{re=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2032%2032'%3e%3cpath%20fill='%23009688'%20d='m13.844%207.536-1.288-1.072A2%202%200%200%200%2011.276%206H4a2%202%200%200%200-2%202v16a2%202%200%200%200%202%202h24a2%202%200%200%200%202-2V10a2%202%200%200%200-2-2H15.124a2%202%200%200%201-1.28-.464'/%3e%3cpath%20fill='%23b2dfdb'%20d='M24%2010h-7a1%201%200%200%200-1%201v16a1%201%200%200%200%201%201h12a1%201%200%200%200%201-1V16Zm-4%206a2%202%200%201%201-2%202%202.01%202.01%200%200%201%202-2m8%2010H18l4-4%202%202%204-4Zm-4.828-9.172V12L28%2016.828Z'/%3e%3c/svg%3e`})),ae,oe=t((()=>{ae=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2032%2032'%3e%3cpath%20fill='%23009688'%20d='M28.967%2012H9.442a2%202%200%200%200-1.898%201.368L4%2024V10h24a2%202%200%200%200-2-2H15.124a2%202%200%200%201-1.28-.464l-1.288-1.072A2%202%200%200%200%2011.276%206H4a2%202%200%200%200-2%202v16a2%202%200%200%200%202%202h22l4.805-11.212A2%202%200%200%200%2028.967%2012'/%3e%3cpath%20fill='%23b2dfdb'%20d='M24%2010h-7a1%201%200%200%200-1%201v16a1%201%200%200%200%201%201h12a1%201%200%200%200%201-1V16Zm-4%206a2%202%200%201%201-2%202%202.01%202.01%200%200%201%202-2m8%2010H18l4-4%202%202%204-4Zm-4.828-9.172V12L28%2016.828Z'/%3e%3c/svg%3e`})),se,ce=t((()=>{se=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2032%2032'%3e%3cpath%20fill='%23afb42b'%20d='m13.844%207.536-1.288-1.072A2%202%200%200%200%2011.276%206H4a2%202%200%200%200-2%202v16a2%202%200%200%200%202%202h24a2%202%200%200%200%202-2V10a2%202%200%200%200-2-2H15.124a2%202%200%200%201-1.28-.464'/%3e%3cpath%20fill='%23afb42b'%20d='M20%2014h8v2h-8zm0%204h8v2h-8zm0%204h6v2h-6z'/%3e%3cpath%20fill='%23f0f4c3'%20d='M30.337%2014H17.663A1.663%201.663%200%200%200%2016%2015.663v10.674A1.663%201.663%200%200%200%2017.663%2028h12.674A1.663%201.663%200%200%200%2032%2026.337V15.663A1.663%201.663%200%200%200%2030.337%2014M26%2026h-6v-2h6Zm2-4h-8v-2h8Zm0-4h-8v-2h8Z'/%3e%3c/svg%3e`})),le,ue=t((()=>{le=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2032%2032'%3e%3cpath%20fill='%23afb42b'%20d='M28.967%2012H9.442a2%202%200%200%200-1.898%201.368L4%2024V10h24a2%202%200%200%200-2-2H15.124a2%202%200%200%201-1.28-.464l-1.288-1.072A2%202%200%200%200%2011.276%206H4a2%202%200%200%200-2%202v16a2%202%200%200%200%202%202h22l4.805-11.212A2%202%200%200%200%2028.967%2012'/%3e%3cpath%20fill='%23f0f4c3'%20d='M30.337%2014H17.663A1.663%201.663%200%200%200%2016%2015.663v10.674A1.663%201.663%200%200%200%2017.663%2028h12.674A1.663%201.663%200%200%200%2032%2026.337V15.663A1.663%201.663%200%200%200%2030.337%2014M26%2026h-6v-2h6Zm2-4h-8v-2h8Zm0-4h-8v-2h8Z'/%3e%3c/svg%3e`})),de,fe=t((()=>{de=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2032%2032'%3e%3cpath%20fill='%238bc34a'%20d='m13.844%207.536-1.288-1.072A2%202%200%200%200%2011.276%206H4a2%202%200%200%200-2%202v16a2%202%200%200%200%202%202h24a2%202%200%200%200%202-2V10a2%202%200%200%200-2-2H15.124a2%202%200%200%201-1.28-.464'/%3e%3cpath%20fill='%23dcedc8'%20d='m25%2012-7%204.072v7.854L25%2028l7-4.074v-7.854Z'/%3e%3c/svg%3e`})),pe,me=t((()=>{pe=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2032%2032'%3e%3cpath%20fill='%238bc34a'%20d='M28.967%2012H9.442a2%202%200%200%200-1.898%201.368L4%2024V10h24a2%202%200%200%200-2-2H15.124a2%202%200%200%201-1.28-.464l-1.288-1.072A2%202%200%200%200%2011.276%206H4a2%202%200%200%200-2%202v16a2%202%200%200%200%202%202h22l4.805-11.212A2%202%200%200%200%2028.967%2012'/%3e%3cpath%20fill='%23dcedc8'%20d='m25%2012-7%204.072v7.854L25%2028l7-4.074v-7.854Z'/%3e%3c/svg%3e`})),he,ge=t((()=>{he=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2032%2032'%3e%3cpath%20fill='%23039be5'%20d='m13.844%207.536-1.288-1.072A2%202%200%200%200%2011.276%206H4a2%202%200%200%200-2%202v16a2%202%200%200%200%202%202h24a2%202%200%200%200%202-2V10a2%202%200%200%200-2-2H15.124a2%202%200%200%201-1.28-.464'/%3e%3cpath%20fill='%23b3e5fc'%20d='M22%2010a10%2010%200%201%200%2010%2010%2010%2010%200%200%200-10-10m6.918%206H25.96a15.8%2015.8%200%200%200-1.342-3.54%208.04%208.04%200%200%201%204.3%203.54M22%2012a14.1%2014.1%200%200%201%201.89%204h-3.78A14.1%2014.1%200%200%201%2022%2012m-2.618.46A15.8%2015.8%200%200%200%2018.04%2016h-2.958a8.04%208.04%200%200%201%204.3-3.54M14.263%2022a7.7%207.7%200%200%201%200-4h3.407a15.5%2015.5%200%200%200%200%204Zm.82%202h2.957a15.8%2015.8%200%200%200%201.342%203.54%208.04%208.04%200%200%201-4.3-3.54ZM22%2028a14.1%2014.1%200%200%201-1.89-4h3.78A14.1%2014.1%200%200%201%2022%2028m2.31-6h-4.62a13.4%2013.4%200%200%201%200-4h4.62a13.4%2013.4%200%200%201%200%204m.308%205.54A15.8%2015.8%200%200%200%2025.96%2024h2.958a8.04%208.04%200%200%201-4.3%203.54M29.737%2022H26.33a15.5%2015.5%200%200%200%200-4h3.407a7.7%207.7%200%200%201%200%204'/%3e%3c/svg%3e`})),_e,ve=t((()=>{_e=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2032%2032'%3e%3cpath%20fill='%23039be5'%20d='M28.967%2012H9.442a2%202%200%200%200-1.898%201.368L4%2024V10h24a2%202%200%200%200-2-2H15.124a2%202%200%200%201-1.28-.464l-1.288-1.072A2%202%200%200%200%2011.276%206H4a2%202%200%200%200-2%202v16a2%202%200%200%200%202%202h22l4.805-11.212A2%202%200%200%200%2028.967%2012'/%3e%3cpath%20fill='%23b3e5fc'%20d='M22%2010a10%2010%200%201%200%2010%2010%2010%2010%200%200%200-10-10m6.918%206H25.96a15.8%2015.8%200%200%200-1.342-3.54%208.04%208.04%200%200%201%204.3%203.54M22%2012a14.1%2014.1%200%200%201%201.89%204h-3.78A14.1%2014.1%200%200%201%2022%2012m-2.618.46A15.8%2015.8%200%200%200%2018.04%2016h-2.958a8.04%208.04%200%200%201%204.3-3.54M14.263%2022a7.7%207.7%200%200%201%200-4h3.407a15.5%2015.5%200%200%200%200%204Zm.82%202h2.957a15.8%2015.8%200%200%200%201.342%203.54%208.04%208.04%200%200%201-4.3-3.54ZM22%2028a14.1%2014.1%200%200%201-1.89-4h3.78A14.1%2014.1%200%200%201%2022%2028m2.31-6h-4.62a13.4%2013.4%200%200%201%200-4h4.62a13.4%2013.4%200%200%201%200%204m.308%205.54A15.8%2015.8%200%200%200%2025.96%2024h2.958a8.04%208.04%200%200%201-4.3%203.54M29.737%2022H26.33a15.5%2015.5%200%200%200%200-4h3.407a7.7%207.7%200%200%201%200%204'/%3e%3c/svg%3e`})),U,ye=t((()=>{U=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2032%2032'%3e%3cpath%20fill='%23ff7043'%20d='m13.844%207.536-1.288-1.072A2%202%200%200%200%2011.276%206H4a2%202%200%200%200-2%202v16a2%202%200%200%200%202%202h24a2%202%200%200%200%202-2V10a2%202%200%200%200-2-2H15.124a2%202%200%200%201-1.28-.464'/%3e%3cpath%20fill='%23ffccbc'%20d='M30%2024v1a1%201%200%200%201-2%200v-1a2%202%200%200%200-2-2%203%203%200%200%200%202.996-3.16A3.115%203.114%200%200%200%2025.83%2016H14v2h2v8h-2v2h8v-2h-2v-2h4c.82.819.297%202.308%201.179%203.37a1.89%201.89%200%200%200%201.46.63H32v-4zm-6-4h-4v-2h4a1%201%200%200%201%200%202'/%3e%3c/svg%3e`})),W,be=t((()=>{W=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2032%2032'%3e%3cpath%20fill='%23ff7043'%20d='M28.967%2012H9.442a2%202%200%200%200-1.898%201.368L4%2024V10h24a2%202%200%200%200-2-2H15.124a2%202%200%200%201-1.28-.464l-1.288-1.072A2%202%200%200%200%2011.276%206H4a2%202%200%200%200-2%202v16a2%202%200%200%200%202%202h22l4.805-11.212A2%202%200%200%200%2028.967%2012'/%3e%3cpath%20fill='%23ffccbc'%20d='M30%2024v1a1%201%200%200%201-2%200v-1a2%202%200%200%200-2-2%203%203%200%200%200%202.996-3.16A3.115%203.114%200%200%200%2025.83%2016H14v2h2v8h-2v2h8v-2h-2v-2h4c.82.819.297%202.308%201.179%203.37a1.89%201.89%200%200%200%201.46.63H32v-4zm-6-4h-4v-2h4a1%201%200%200%201%200%202'/%3e%3c/svg%3e`})),xe,Se=t((()=>{xe=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2032%2032'%3e%3cpath%20fill='%23546e7a'%20d='m13.844%207.536-1.288-1.072A2%202%200%200%200%2011.276%206H4a2%202%200%200%200-2%202v16a2%202%200%200%200%202%202h24a2%202%200%200%200%202-2V10a2%202%200%200%200-2-2H15.124a2%202%200%200%201-1.28-.464'/%3e%3cpath%20fill='%23cfd8dc'%20d='M28%2012h-6a4%204%200%200%200-4%204v8h2v-8h8v9.893a2.074%202.074%200%200%201-1.664%202.08A2%202%200%200%201%2024%2026h-8a4%204%200%200%200%204%204h6a4%204%200%200%200%204-4V16h2a4%204%200%200%200-4-4'/%3e%3c/svg%3e`})),Ce,we=t((()=>{Ce=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2032%2032'%3e%3cpath%20fill='%23546e7a'%20d='M28.967%2012H9.442a2%202%200%200%200-1.898%201.368L4%2024V10h24a2%202%200%200%200-2-2H15.124a2%202%200%200%201-1.28-.464l-1.288-1.072A2%202%200%200%200%2011.276%206H4a2%202%200%200%200-2%202v16a2%202%200%200%200%202%202h22l4.805-11.212A2%202%200%200%200%2028.967%2012'/%3e%3cpath%20fill='%23cfd8dc'%20d='M28%2012h-6a4%204%200%200%200-4%204v8h2v-8h8v9.893a2.074%202.074%200%200%201-1.664%202.08A2%202%200%200%201%2024%2026h-8a4%204%200%200%200%204%204h6a4%204%200%200%200%204-4V16h2a4%204%200%200%200-4-4'/%3e%3c/svg%3e`})),Te,Ee=t((()=>{Te=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2032%2032'%3e%3cpath%20fill='%234caf50'%20d='m13.844%207.536-1.288-1.072A2%202%200%200%200%2011.276%206H4a2%202%200%200%200-2%202v16a2%202%200%200%200%202%202h24a2%202%200%200%200%202-2V10a2%202%200%200%200-2-2H15.124a2%202%200%200%201-1.28-.464'/%3e%3cpath%20fill='%23c8e6c9'%20d='M18.435%2030a1%201%200%200%201-.238-.028%201.137%201.137%200%200%201-.828-1.323l3.093-15.744a1.13%201.13%200%200%201%20.507-.744%201.06%201.06%200%200%201%20.8-.134%201.14%201.14%200%200%201%20.828%201.324l-3.1%2015.744a1.12%201.12%200%200%201-.505.743%201.06%201.06%200%200%201-.557.162m6.2-2h-.077a1.08%201.08%200%200%201-.762-.412%201.164%201.164%200%200%201%20.113-1.548l5.32-4.967-5.297-4.623a1.165%201.165%200%200%201-.162-1.544%201.08%201.08%200%200%201%20.754-.437%201.06%201.06%200%200%201%20.81.258l6.244%205.455a1.156%201.156%200%200%201%20.004%201.723l-6.22%205.808a1.07%201.07%200%200%201-.728.289Zm-9.31%200a1.07%201.07%200%200%201-.728-.292l-6.225-5.811a1.16%201.16%200%200%201-.01-1.692l.02-.018%206.246-5.454a1.03%201.03%200%200%201%20.8-.26%201.08%201.08%200%200%201%20.758.436%201.165%201.165%200%200%201-.16%201.547l-5.293%204.62%205.32%204.964a1.156%201.156%200%200%201%20.112%201.548%201.07%201.07%200%200%201-.762.412Z'/%3e%3c/svg%3e`})),De,Oe=t((()=>{De=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2032%2032'%3e%3cpath%20fill='%234caf50'%20d='M28.967%2012H9.442a2%202%200%200%200-1.898%201.368L4%2024V10h24a2%202%200%200%200-2-2H15.124a2%202%200%200%201-1.28-.464l-1.288-1.072A2%202%200%200%200%2011.276%206H4a2%202%200%200%200-2%202v16a2%202%200%200%200%202%202h22l4.805-11.212A2%202%200%200%200%2028.967%2012'/%3e%3cpath%20fill='%23c8e6c9'%20d='M18.473%2030a1%201%200%200%201-.238-.028%201.137%201.137%200%200%201-.828-1.323L20.5%2012.905a1.13%201.13%200%200%201%20.507-.744%201.06%201.06%200%200%201%20.8-.134%201.14%201.14%200%200%201%20.828%201.324l-3.101%2015.744a1.12%201.12%200%200%201-.504.743%201.06%201.06%200%200%201-.557.162m6.2-2h-.077a1.08%201.08%200%200%201-.762-.412%201.164%201.164%200%200%201%20.113-1.548l5.319-4.967-5.296-4.623a1.165%201.165%200%200%201-.162-1.544%201.08%201.08%200%200%201%20.754-.437%201.06%201.06%200%200%201%20.81.258l6.244%205.455a1.156%201.156%200%200%201%20.003%201.723l-6.218%205.808a1.07%201.07%200%200%201-.729.289Zm-9.31%200a1.07%201.07%200%200%201-.728-.292l-6.226-5.811a1.16%201.16%200%200%201-.01-1.692l.02-.018%206.246-5.454a1.03%201.03%200%200%201%20.8-.26%201.08%201.08%200%200%201%20.76.436%201.165%201.165%200%200%201-.16%201.547l-5.294%204.62%205.32%204.964a1.156%201.156%200%200%201%20.112%201.548%201.07%201.07%200%200%201-.762.412Z'/%3e%3c/svg%3e`})),ke,Ae=t((()=>{ke=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2032%2032'%3e%3cpath%20fill='%23455a64'%20d='m13.843%207.536-1.288-1.072A2%202%200%200%200%2011.275%206H3.999a2%202%200%200%200-2%202v16a2%202%200%200%200%202%202h24a2%202%200%200%200%202-2V10a2%202%200%200%200-2-2H15.123a2%202%200%200%201-1.28-.464'/%3e%3cpath%20fill='%23ffca28'%20d='M27.157%2016.551c0%201.319-1.43%202.143-2.573%201.483a1.7%201.7%200%200%201-.355-.271c-.934-.933-.506-2.525.768-2.867a1.716%201.716%200%200%201%202.16%201.655'/%3e%3cpath%20fill='%2326c6da'%20d='M22.556%2019.744c-.947%200-1.715.767-1.715%201.712%200%20.946.768%201.713%201.715%201.713.949%200%201.717-.767%201.717-1.713%200-.945-.768-1.712-1.717-1.712'/%3e%3cpath%20fill='%23ffca28'%20d='M28.996%2022.041a6.6%206.6%200%200%201-2.261.918%204.6%204.6%200%200%200%20.226-2.07%204.593%204.593%200%200%200%20.521-8.455%204.6%204.6%200%200%200-5.775%201.44%207.6%207.6%200%200%200-2.51.731%206.55%206.55%200%200%201%2012.798%202.191%206.54%206.54%200%200%201-2.999%205.245m-9.722-6.245%201.607.195a4.6%204.6%200%200%201%20.203-.911%206.6%206.6%200%200%200-1.81.716'%20clip-rule='evenodd'/%3e%3cpath%20fill='%2326c6da'%20d='M18.995%2015.967a6.6%206.6%200%200%201%202.276-.926%204.6%204.6%200%200%200-.257%202.079%204.6%204.6%200%200%200-2.863%203.005c-.893%202.969%201.352%205.951%204.454%205.916a4.6%204.6%200%200%200%203.687-1.914%207.7%207.7%200%200%200%202.509-.724%206.553%206.553%200%200%201-10.212%203.266c-3.617-2.742-3.41-8.24.406-10.702m9.72%206.245-.03.016z'%20clip-rule='evenodd'/%3e%3c/svg%3e`})),je,Me=t((()=>{je=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2032%2032'%3e%3cpath%20fill='%23455a64'%20d='M28.967%2012H9.442a2%202%200%200%200-1.898%201.368L4%2024V10h24a2%202%200%200%200-2-2H15.124c-.468%200-.921-.164-1.28-.464l-1.288-1.072A2%202%200%200%200%2011.276%206H4a2%202%200%200%200-2%202v16a2%202%200%200%200%202%202h22l4.805-11.212A2%202%200%200%200%2028.967%2012'/%3e%3cpath%20fill='%23ffca28'%20d='M27.163%2016.551c0%201.319-1.428%202.143-2.57%201.483a1.6%201.6%200%200%201-.354-.271%201.714%201.714%200%201%201%202.924-1.212'/%3e%3cpath%20fill='%2326c6da'%20d='M22.568%2019.744a1.713%201.713%200%201%200%200%203.426%201.713%201.713%200%200%200%200-3.426'/%3e%3cpath%20fill='%23ffca28'%20d='M29%2022.041a6.6%206.6%200%200%201-2.259.918%204.6%204.6%200%200%200%20.226-2.07%204.596%204.596%200%200%200%20.521-8.455%204.594%204.594%200%200%200-5.768%201.44%207.6%207.6%200%200%200-2.507.731%206.54%206.54%200%200%201%207.351-4.511A6.542%206.542%200%200%201%2029%2022.041m-9.71-6.245%201.605.195a4.7%204.7%200%200%201%20.202-.911%206.5%206.5%200%200%200-1.807.716'%20clip-rule='evenodd'/%3e%3cpath%20fill='%2326c6da'%20d='M19.011%2015.967a6.5%206.5%200%200%201%202.273-.926%204.6%204.6%200%200%200-.257%202.079%204.6%204.6%200%200%200-2.859%203.005c-.892%202.969%201.35%205.951%204.449%205.916a4.6%204.6%200%200%200%203.682-1.914%207.7%207.7%200%200%200%202.506-.724%206.54%206.54%200%200%201-10.2%203.266c-3.612-2.742-3.405-8.24.406-10.702m9.708%206.245-.03.016z'%20clip-rule='evenodd'/%3e%3c/svg%3e`})),Ne,Pe=t((()=>{Ne=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2032%2032'%3e%3cpath%20fill='%2300bfa5'%20d='m13.844%207.536-1.288-1.072A2%202%200%200%200%2011.276%206H4a2%202%200%200%200-2%202v16a2%202%200%200%200%202%202h24a2%202%200%200%200%202-2V10a2%202%200%200%200-2-2H15.124a2%202%200%200%201-1.28-.464'/%3e%3cpath%20fill='%23a7ffeb'%20d='M16%2012v2h2v12a4%204%200%200%200%208%200V14h2v-2Zm5%2014a1%201%200%201%201%201-1%201%201%200%200%201-1%201m2-4a1%201%200%201%201%201-1%201%201%200%200%201-1%201m1-4h-4v-4h4Z'/%3e%3c/svg%3e`})),Fe,Ie=t((()=>{Fe=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2032%2032'%3e%3cpath%20fill='%2300bfa5'%20d='M28.967%2012H9.442a2%202%200%200%200-1.898%201.368L4%2024V10h24a2%202%200%200%200-2-2H15.124a2%202%200%200%201-1.28-.464l-1.288-1.072A2%202%200%200%200%2011.276%206H4a2%202%200%200%200-2%202v16a2%202%200%200%200%202%202h22l4.805-11.212A2%202%200%200%200%2028.967%2012'/%3e%3cpath%20fill='%23a7ffeb'%20d='M16%2012v2h2v12a4%204%200%200%200%208%200V14h2v-2Zm5%2014a1%201%200%201%201%201-1%201%201%200%200%201-1%201m2-4a1%201%200%201%201%201-1%201%201%200%200%201-1%201m1-4h-4v-4h4Z'/%3e%3c/svg%3e`})),G,Le=t((()=>{G=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2032%2032'%3e%3cpath%20fill='%23ab47bc'%20d='m13.844%207.536-1.288-1.072A2%202%200%200%200%2011.276%206H4a2%202%200%200%200-2%202v16a2%202%200%200%200%202%202h24a2%202%200%200%200%202-2V10a2%202%200%200%200-2-2H15.124a2%202%200%200%201-1.28-.464'/%3e%3cpath%20fill='%23e1bee7'%20d='M16%2014h16v6H16zm0%208h6v6h-6zm8%200h8v6h-8z'/%3e%3c/svg%3e`})),K,Re=t((()=>{K=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2032%2032'%3e%3cpath%20fill='%23ab47bc'%20d='M28.967%2012H9.442a2%202%200%200%200-1.898%201.368L4%2024V10h24a2%202%200%200%200-2-2H15.124a2%202%200%200%201-1.28-.464l-1.288-1.072A2%202%200%200%200%2011.276%206H4a2%202%200%200%200-2%202v16a2%202%200%200%200%202%202h22l4.805-11.212A2%202%200%200%200%2028.967%2012'/%3e%3cpath%20fill='%23e1bee7'%20d='M16%2014h16v6H16zm0%208h6v6h-6zm8%200h8v6h-8z'/%3e%3c/svg%3e`})),ze,Be=t((()=>{ze=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2032%2032'%3e%3cpath%20fill='%237cb342'%20d='m13.844%207.536-1.288-1.072A2%202%200%200%200%2011.276%206H4a2%202%200%200%200-2%202v16a2%202%200%200%200%202%202h24a2%202%200%200%200%202-2V10a2%202%200%200%200-2-2H15.124a2%202%200%200%201-1.28-.464'/%3e%3cpath%20fill='%23dcedc8'%20d='M31%2012H19a1%201%200%200%200-1%201v12a1%201%200%200%200%201%201h12a1%201%200%200%200%201-1V13a1%201%200%200%200-1-1m-1%208h-4v4h-2v-4h-4v-2h4v-4h2v4h4Z'/%3e%3cpath%20fill='%23dcedc8'%20d='M16%2028V16h-2v13a1%201%200%200%200%201%201h13v-2Z'/%3e%3c/svg%3e`})),Ve,He=t((()=>{Ve=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2032%2032'%3e%3cpath%20fill='%237cb342'%20d='M28.967%2012H9.442a2%202%200%200%200-1.898%201.368L4%2024V10h24a2%202%200%200%200-2-2H15.124a2%202%200%200%201-1.28-.464l-1.288-1.072A2%202%200%200%200%2011.276%206H4a2%202%200%200%200-2%202v16a2%202%200%200%200%202%202h22l4.805-11.212A2%202%200%200%200%2028.967%2012'/%3e%3cpath%20fill='%23dcedc8'%20d='M31%2012H19a1%201%200%200%200-1%201v12a1%201%200%200%200%201%201h12a1%201%200%200%200%201-1V13a1%201%200%200%200-1-1m-1%208h-4v4h-2v-4h-4v-2h4v-4h2v4h4Z'/%3e%3cpath%20fill='%23dcedc8'%20d='M16%2028V16h-2v13a1%201%200%200%200%201%201h13v-2Z'/%3e%3c/svg%3e`})),Ue,We=t((()=>{Ue=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2032%2032'%3e%3cpath%20fill='%237e57c2'%20d='M20%2018h-2v-2h-2v2c0%20.193%200%20.703%201.254%201.033A3.345%203.345%200%200%201%2020%2022h2v2h2v-2c0-.388-.562-.851-1.254-1.034C20.356%2020.34%2020%2018.84%2020%2018m-3.254%202.966C14.356%2020.34%2014%2018.84%2014%2018h-2v-2h-2v8h2v-2h4v2h2v-2c0-.388-.562-.851-1.254-1.034'/%3e%3cpath%20fill='%237e57c2'%20d='M24%204H4v20a4%204%200%200%200%204%204h16.16A3.84%203.84%200%200%200%2028%2024.16V8a4%204%200%200%200-4-4m2%2014h-2v-2h-2v2c0%20.193%200%20.703%201.254%201.033A3.345%203.345%200%200%201%2026%2022v2a2%202%200%200%201-2%202h-2a2%202%200%200%201-2-2%202%202%200%200%201-2%202h-2a2%202%200%200%201-2-2%202%202%200%200%201-2%202h-2a2%202%200%200%201-2-2v-8a2%202%200%200%201%202-2h2a2%202%200%200%201%202%202%202%202%200%200%201%202-2h2a2%202%200%200%201%202%202%202%202%200%200%201%202-2h2a2%202%200%200%201%202%202Z'/%3e%3c/svg%3e`})),Ge=t((()=>{})),Ke,qe=t((()=>{Ke=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2032%2032'%3e%3cpath%20fill='%23e65100'%20d='m4%204%202%2022%2010%202%2010-2%202-22Zm19.72%207H11.28l.29%203h11.86l-.802%209.335L15.99%2025l-6.635-1.646L8.93%2019h3.02l.19%202%203.86.77%203.84-.77.29-4H8.84L8%208h16Z'/%3e%3c/svg%3e`})),q,Je=t((()=>{q=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2016%2016'%3e%3cpath%20fill='%2326a69a'%20d='M8.5%206h4l-4-4zM3.875%201H9.5l4%204v8.6c0%20.773-.616%201.4-1.375%201.4h-8.25c-.76%200-1.375-.627-1.375-1.4V2.4c0-.777.612-1.4%201.375-1.4M4%2013.6h8V8l-2.625%202.8L8%209.4zm1.25-7.7c-.76%200-1.375.627-1.375%201.4s.616%201.4%201.375%201.4c.76%200%201.375-.627%201.375-1.4S6.009%205.9%205.25%205.9'/%3e%3c/svg%3e`})),Ye,Xe=t((()=>{Ye=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2016%2016'%3e%3cpath%20fill='%23ffca28'%20d='M2%202v12h12V2zm6%206h1v4a1.003%201.003%200%200%201-1%201H7a1.003%201.003%200%200%201-1-1v-1h1v1h1zm3%200h2v1h-2v1h1a1.003%201.003%200%200%201%201%201v1a1.003%201.003%200%200%201-1%201h-2v-1h2v-1h-1a1.003%201.003%200%200%201-1-1V9a1.003%201.003%200%200%201%201-1'/%3e%3c/svg%3e`})),Ze,Qe=t((()=>{Ze=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%20-960%20960%20960'%3e%3cpath%20fill='%23f9a825'%20d='M560-160v-80h120q17%200%2028.5-11.5T720-280v-80q0-38%2022-69t58-44v-14q-36-13-58-44t-22-69v-80q0-17-11.5-28.5T680-720H560v-80h120q50%200%2085%2035t35%2085v80q0%2017%2011.5%2028.5T840-560h40v160h-40q-17%200-28.5%2011.5T800-360v80q0%2050-35%2085t-85%2035zm-280%200q-50%200-85-35t-35-85v-80q0-17-11.5-28.5T120-400H80v-160h40q17%200%2028.5-11.5T160-600v-80q0-50%2035-85t85-35h120v80H280q-17%200-28.5%2011.5T240-680v80q0%2038-22%2069t-58%2044v14q36%2013%2058%2044t22%2069v80q0%2017%2011.5%2028.5T280-240h120v80z'/%3e%3c/svg%3e`})),$e,et=t((()=>{$e=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2032%2032'%3e%3cpath%20fill='%23ffd54f'%20d='M25%2012h-3V8a6%206%200%200%200-12%200v4H7a1%201%200%200%200-1%201v16a1%201%200%200%200%201%201h18a1%201%200%200%200%201-1V13a1%201%200%200%200-1-1M14%208a2%202%200%200%201%204%200v4h-4Zm2%2017a4%204%200%201%201%204-4%204%204%200%200%201-4%204'/%3e%3c/svg%3e`})),tt,nt=t((()=>{tt=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20fill='none'%20viewBox='0%200%2024%2024'%3e%3cpath%20d='M0%200h24v24H0z'/%3e%3cpath%20fill='%23afb42b'%20d='M19%205v9h-5v5H5V5zm0-2H5c-1.1%200-2%20.9-2%202v14c0%201.1.9%202%202%202h10l6-6V5c0-1.1-.9-2-2-2m-7%2011H7v-2h5zm5-4H7V8h10z'/%3e%3c/svg%3e`})),rt,it=t((()=>{rt=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2032%2032'%3e%3cpath%20fill='%2342a5f5'%20d='m14%2010-4%203.5L6%2010H4v12h4v-6l2%202%202-2v6h4V10zm12%206v-6h-4v6h-4l6%208%206-8z'/%3e%3c/svg%3e`})),J,at=t((()=>{J=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2032%2032'%3e%3cpath%20fill='%23e53935'%20d='M4%204v24h24V4Zm20%2020h-4V12h-4v12H8V8h16Z'/%3e%3c/svg%3e`})),ot,st=t((()=>{ot=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2032%2032'%3e%3cpath%20fill='%2300bcd4'%20d='M16%2012c7.444%200%2012%202.59%2012%204s-4.556%204-12%204-12-2.59-12-4%204.556-4%2012-4m0-2c-7.732%200-14%202.686-14%206s6.268%206%2014%206%2014-2.686%2014-6-6.268-6-14-6'/%3e%3cpath%20fill='%2300bcd4'%20d='M16%2014a2%202%200%201%200%202%202%202%202%200%200%200-2-2'/%3e%3cpath%20fill='%2300bcd4'%20d='M10.458%205.507c2.017%200%205.937%203.177%209.006%208.493%203.722%206.447%203.757%2011.687%202.536%2012.392a.9.9%200%200%201-.457.1c-2.017%200-5.938-3.176-9.007-8.492C8.814%2011.553%208.779%206.313%2010%205.608a.9.9%200%200%201%20.458-.1m-.001-2A2.87%202.87%200%200%200%209%203.875C6.13%205.532%206.938%2012.304%2010.804%2019c3.284%205.69%207.72%209.493%2010.74%209.493A2.87%202.87%200%200%200%2023%2028.124c2.87-1.656%202.062-8.428-1.804-15.124-3.284-5.69-7.72-9.493-10.74-9.493Z'/%3e%3cpath%20fill='%2300bcd4'%20d='M21.543%205.507a.9.9%200%200%201%20.457.1c1.221.706%201.186%205.946-2.536%2012.393-3.07%205.316-6.99%208.493-9.007%208.493a.9.9%200%200%201-.457-.1C8.779%2025.686%208.814%2020.446%2012.536%2014c3.07-5.316%206.99-8.493%209.007-8.493m0-2c-3.02%200-7.455%203.804-10.74%209.493C6.939%2019.696%206.13%2026.468%209%2028.124a2.87%202.87%200%200%200%201.457.369c3.02%200%207.455-3.804%2010.74-9.493C25.061%2012.304%2025.87%205.532%2023%203.876a2.87%202.87%200%200%200-1.457-.369'/%3e%3c/svg%3e`})),Y,ct=t((()=>{Y=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2032%2032'%3e%3cpath%20fill='%230288d1'%20d='M16%2012c7.444%200%2012%202.59%2012%204s-4.556%204-12%204-12-2.59-12-4%204.556-4%2012-4m0-2c-7.732%200-14%202.686-14%206s6.268%206%2014%206%2014-2.686%2014-6-6.268-6-14-6'/%3e%3cpath%20fill='%230288d1'%20d='M16%2014a2%202%200%201%200%202%202%202%202%200%200%200-2-2'/%3e%3cpath%20fill='%230288d1'%20d='M10.458%205.507c2.017%200%205.937%203.177%209.006%208.493%203.722%206.447%203.757%2011.687%202.536%2012.392a.9.9%200%200%201-.457.1c-2.017%200-5.938-3.176-9.007-8.492C8.814%2011.553%208.779%206.313%2010%205.608a.9.9%200%200%201%20.458-.1m-.001-2A2.87%202.87%200%200%200%209%203.875C6.13%205.532%206.938%2012.304%2010.804%2019c3.284%205.69%207.72%209.493%2010.74%209.493A2.87%202.87%200%200%200%2023%2028.124c2.87-1.656%202.062-8.428-1.804-15.124-3.284-5.69-7.72-9.493-10.74-9.493Z'/%3e%3cpath%20fill='%230288d1'%20d='M21.543%205.507a.9.9%200%200%201%20.457.1c1.221.706%201.186%205.946-2.536%2012.393-3.07%205.316-6.99%208.493-9.007%208.493a.9.9%200%200%201-.457-.1C8.779%2025.686%208.814%2020.446%2012.536%2014c3.07-5.316%206.99-8.493%209.007-8.493m0-2c-3.02%200-7.455%203.804-10.74%209.493C6.939%2019.696%206.13%2026.468%209%2028.124a2.87%202.87%200%200%200%201.457.369c3.02%200%207.455-3.804%2010.74-9.493C25.061%2012.304%2025.87%205.532%2023%203.876a2.87%202.87%200%200%200-1.457-.369'/%3e%3c/svg%3e`})),lt,ut=t((()=>{lt=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2032%2032'%3e%3cpath%20fill='%23ff7043'%20d='m30%2012-4-2V6h-4l-2-4-4%202-4-2-2%204H6v4l-4%202%202%204-2%204%204%202v4h4l2%204%204-2%204%202%202-4h4v-4l4-2-2-4ZM6%2016a9.9%209.9%200%200%201%20.842-4H10v8H6.842A9.9%209.9%200%200%201%206%2016m10%2010a9.98%209.98%200%200%201-7.978-4H16v-2h-2v-2h4c.819.819.297%202.308%201.179%203.37a1.89%201.89%200%200%200%201.46.63h3.34A9.98%209.98%200%200%201%2016%2026m-2-12v-2h4a1%201%200%200%201%200%202Zm11.158%206H24a2.006%202.006%200%200%201-2-2%202%202%200%200%200-2-2%203%203%200%200%200%203-3q0-.08-.004-.161A3.115%203.115%200%200%200%2019.83%2010H8.022a9.986%209.986%200%200%201%2017.136%2010'/%3e%3c/svg%3e`})),dt,ft=t((()=>{dt=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20fill='none'%20viewBox='0%200%2024%2024'%3e%3cpath%20d='M0%200h24v24H0z'/%3e%3cpath%20fill='%2342a5f5'%20d='M19.43%2012.98c.04-.32.07-.64.07-.98s-.03-.66-.07-.98l2.11-1.65c.19-.15.24-.42.12-.64l-2-3.46a.5.5%200%200%200-.61-.22l-2.49%201c-.52-.4-1.08-.73-1.69-.98l-.38-2.65A.49.49%200%200%200%2014%202h-4c-.25%200-.46.18-.49.42l-.38%202.65c-.61.25-1.17.59-1.69.98l-2.49-1a.6.6%200%200%200-.18-.03c-.17%200-.34.09-.43.25l-2%203.46c-.13.22-.07.49.12.64l2.11%201.65c-.04.32-.07.65-.07.98s.03.66.07.98l-2.11%201.65c-.19.15-.24.42-.12.64l2%203.46a.5.5%200%200%200%20.61.22l2.49-1c.52.4%201.08.73%201.69.98l.38%202.65c.03.24.24.42.49.42h4c.25%200%20.46-.18.49-.42l.38-2.65c.61-.25%201.17-.59%201.69-.98l2.49%201q.09.03.18.03c.17%200%20.34-.09.43-.25l2-3.46c.12-.22.07-.49-.12-.64zm-1.98-1.71c.04.31.05.52.05.73s-.02.43-.05.73l-.14%201.13.89.7%201.08.84-.7%201.21-1.27-.51-1.04-.42-.9.68c-.43.32-.84.56-1.25.73l-1.06.43-.16%201.13-.2%201.35h-1.4l-.19-1.35-.16-1.13-1.06-.43c-.43-.18-.83-.41-1.23-.71l-.91-.7-1.06.43-1.27.51-.7-1.21%201.08-.84.89-.7-.14-1.13c-.03-.31-.05-.54-.05-.74s.02-.43.05-.73l.14-1.13-.89-.7-1.08-.84.7-1.21%201.27.51%201.04.42.9-.68c.43-.32.84-.56%201.25-.73l1.06-.43.16-1.13.2-1.35h1.39l.19%201.35.16%201.13%201.06.43c.43.18.83.41%201.23.71l.91.7%201.06-.43%201.27-.51.7%201.21-1.07.85-.89.7zM12%208c-2.21%200-4%201.79-4%204s1.79%204%204%204%204-1.79%204-4-1.79-4-4-4m0%206c-1.1%200-2-.9-2-2s.9-2%202-2%202%20.9%202%202-.9%202-2%202'/%3e%3c/svg%3e`})),pt,mt=t((()=>{pt=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20256%20256'%3e%3cpath%20fill='%23ffca28'%20d='M165.09%2099.183a20.153%2020.153%200%200%201-34.401%2014.25%2020.152%2020.152%200%201%201%2034.4-14.25z'/%3e%3cpath%20fill='%2326c6da'%20d='M111.04%20136.74c-11.13%200-20.152%209.022-20.152%2020.151%200%2011.13%209.022%2020.152%2020.152%2020.152%2011.129%200%2020.152-9.022%2020.152-20.152%200-11.129-9.023-20.15-20.152-20.15z'/%3e%3cpath%20fill='%23ffca28'%20d='M186.7%20163.76a77%2077%200%200%201-26.564%2010.81%2054.04%2054.04%200%200%200%202.657-24.366%2054.05%2054.05%200%200%200%2033.856-35.246%2054.04%2054.04%200%200%200-27.73-64.21%2054.044%2054.044%200%200%200-67.863%2016.927%2089.8%2089.8%200%200%200-29.495%208.61%2076.94%2076.94%200%200%201%2086.49-53.058%2076.94%2076.94%200%200%201%2063.888%2078.829%2076.94%2076.94%200%200%201-35.24%2061.706zM72.48%2090.298l18.869%202.29a54%2054%200%200%201%202.381-10.717%2077%2077%200%200%200-21.25%208.427'%20clip-rule='evenodd'/%3e%3cpath%20fill='%2326c6da'%20d='M69.182%2092.314a76.9%2076.9%200%200%201%2026.747-10.9%2053.95%2053.95%200%200%200-3.023%2024.457%2054.05%2054.05%200%200%200-33.64%2035.358%2054.04%2054.04%200%200%200%2052.354%2069.6%2054.04%2054.04%200%200%200%2043.298-22.52%2089.8%2089.8%200%200%200%2029.495-8.518%2076.94%2076.94%200%200%201-50.002%2050.423%2076.94%2076.94%200%200%201-69.992-11.992A76.944%2076.944%200%200%201%2069.18%2092.315zm114.22%2073.462-.366.183z'%20clip-rule='evenodd'/%3e%3c/svg%3e`})),ht,gt=t((()=>{ht=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2016%2016'%3e%3cpath%20fill='%23cfd8dc'%20d='M4%206V4h8v2H9v7H7V6z'/%3e%3cpath%20fill='%23ef5350'%20d='M4%201v1H2v12h2v1H1V1zm8%200v1h2v12h-2v1h3V1z'/%3e%3c/svg%3e`})),_t,vt=t((()=>{_t=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xml:space='preserve'%20viewBox='0%200%2016%2016'%3e%3cpath%20fill='%230288d1'%20d='M2%202v12h12V2zm4%206h3v1H8v4H7V9H6zm5%200h2v1h-2v1h1a1.003%201.003%200%200%201%201%201v1a1.003%201.003%200%200%201-1%201h-2v-1h2v-1h-1a1.003%201.003%200%200%201-1-1V9a1.003%201.003%200%200%201%201-1'/%3e%3c/svg%3e`})),X,yt=t((()=>{X=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2032%2032'%3e%3cpath%20fill='%23a0f'%20d='M29.313%2012h-6.664a1.427%201.427%200%200%201-1.1-2.24l4.398-6.676A.703.703%200%200%200%2025.397%202H8.428a.62.62%200%200%200-.55.289l-5.77%208.627A.703.703%200%200%200%202.658%2012h8.175a1.427%201.427%200%200%201%201.099%202.24l-4.48%206.676A.702.702%200%200%200%208%2022l6.695.002A1.34%201.34%200%200%201%2016%2023.375v5.934a.652.652%200%200%200%201.168.433l12.694-16.586a.725.725%200%200%200-.55-1.156'/%3e%3c/svg%3e`})),Z,bt=t((()=>{Z=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%3e%3cpath%20fill='%23ff5252'%20d='M13%209h5.5L13%203.5zM6%202h8l6%206v12c0%201.1-.9%202-2%202H6c-1.1%200-2-.9-2-2V4c0-1.1.9-2%202-2m12%2016v-2H9v2zm-4-4v-2H6v2z'/%3e%3c/svg%3e`}));function xt(e){let t=e.lastIndexOf(`.`);return t===-1?``:e.slice(t+1).toLowerCase()}function St(e,t){let n=wt[e]||wt[e.toLowerCase()];return n?t?n.open:n.closed:t?w:S}function Ct(e,t){return e.endsWith(`.config.ts`)||e.endsWith(`.config.js`)?dt:e.endsWith(`.tsx`)?Y:e.endsWith(`.jsx`)?ot:Et[e.toLowerCase()]||Tt[t]||`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20fill='none'%20viewBox='0%200%2024%2024'%3e%3cpath%20d='M0%200h24v24H0z'/%3e%3cpath%20fill='%2342a5f5'%20d='M8%2016h8v2H8zm0-4h8v2H8zm6-10H6c-1.1%200-2%20.9-2%202v16c0%201.1.89%202%201.99%202H18c1.1%200%202-.9%202-2V8zm4%2018H6V4h7v5h5z'/%3e%3c/svg%3e`}var wt,Tt,Et,Dt=t((()=>{C(),T(),ee(),O(),A(),M(),P(),I(),R(),te(),V(),ne(),ie(),oe(),ce(),ue(),fe(),me(),ge(),ve(),ye(),be(),Se(),we(),Ee(),Oe(),Ae(),Me(),Pe(),Ie(),Le(),Re(),Be(),He(),We(),Ge(),qe(),Je(),Xe(),Qe(),et(),nt(),it(),at(),st(),ct(),ut(),ft(),mt(),gt(),vt(),yt(),bt(),wt={".cargo_home":{closed:U,open:W},".github":{closed:B,open:H},".git":{closed:L,open:z},".rustup":{closed:U,open:W},".rustup_copy":{closed:U,open:W},".rustup_home":{closed:U,open:W},assets:{closed:re,open:ae},components:{closed:E,open:D},crates:{closed:U,open:W},css:{closed:G,open:K},dist:{closed:k,open:j},docs:{closed:N,open:F},logs:{closed:se,open:le},node_modules:{closed:de,open:pe},out:{closed:k,open:j},public:{closed:he,open:_e},renderer:{closed:G,open:K},scripts:{closed:xe,open:Ce},src:{closed:Te,open:De},"src-tauri":{closed:ke,open:je},tests:{closed:Ne,open:Fe},utils:{closed:ze,open:Ve}},Tt={css:Ue,html:Ke,jpeg:q,jpg:q,js:Ye,json:Ze,lock:$e,log:tt,md:rt,png:q,rs:lt,svg:q,toml:ht,ts:_t,tsx:Y,yaml:Z,yml:Z},Et={"package-lock.json":J,"package.json":J,"tauri.conf.json":pt,"vite.config.ts":X,"vite.config.web.ts":X}})),Ot=t((()=>{}));function kt(e){return e?e.replace(/\n$/,``).split(`
3
- `):[]}function At(e){let t={};for(let n of e){let e=n.path.split(`/`).filter(Boolean),r=t,i=``;for(let t=0;t<e.length;t++){let a=e[t];i=i?`${i}/${a}`:a;let o=t===e.length-1;r[a]||(r[a]={name:a,path:i,isDir:!o,children:o?void 0:{},change:o?n:void 0}),o||(r=r[a].children)}}function n(e){return Object.values(e).map(e=>e.isDir&&e.children?{...e,children:n(e.children)}:e)}return n(t)}function jt({changes:e,workspacePath:t,onBack:r,onOpenFiles:i}){let[a,o]=(0,Q.useState)([]),[s,c]=(0,Q.useState)(!1),[l,u]=(0,Q.useState)(null),d=!!(e&&e.length>0),[f,p]=(0,Q.useState)(d?`agent`:`workspace`),[m,h]=(0,Q.useState)(``),[g,_]=(0,Q.useState)({}),y=(0,Q.useCallback)(async()=>{if(t){c(!0);try{let[e,r]=await Promise.all([n.getWorkspaceGitDiff(t),n.getGitBranchInfo(t).catch(()=>null)]);o(e||[]),r&&u(r)}catch(e){console.error(`Failed to load workspace git diff:`,e)}finally{c(!1)}}},[t]);(0,Q.useEffect)(()=>{y()},[y]);let b=(0,Q.useMemo)(()=>f===`agent`&&d?e:a.length>0?a:d?e:[],[f,d,e,a]),x=(0,Q.useMemo)(()=>{if(!m.trim())return b;let e=m.toLowerCase();return b.filter(t=>t.path.toLowerCase().includes(e))},[b,m]),[S,C]=(0,Q.useState)(x[0]?.path??``);(0,Q.useEffect)(()=>{x.length>0&&!x.some(e=>e.path===S)&&C(x[0].path)},[x,S]);let w=Math.max(0,x.findIndex(e=>e.path===S)),T=x[w]||x[0],E=b.reduce((e,t)=>e+t.additions,0),ee=b.reduce((e,t)=>e+t.deletions,0),D=(0,Q.useMemo)(()=>At(x),[x]),O=(0,Q.useRef)(null),[k,A]=(0,Q.useState)(250),[j,M]=(0,Q.useState)(!1),[N,P]=(0,Q.useState)(!1),F=e=>{if(e.pointerType===`mouse`&&e.button!==0)return;e.preventDefault(),M(!0);let t=e.clientX,n=N?0:k,r=O.current?.getBoundingClientRect().width??600,i=e=>{let i=n+(t-e.clientX);if(i<70)P(!0);else{P(!1);let e=Math.max(100,r-100);A(Math.round(Math.max(100,Math.min(e,i))))}},a=()=>{M(!1),window.removeEventListener(`pointermove`,i),window.removeEventListener(`pointerup`,a)};window.addEventListener(`pointermove`,i),window.addEventListener(`pointerup`,a,{once:!0})},I=()=>{N?(P(!1),A(250)):A(k===250?320:250)},L=e=>{e.key===`ArrowLeft`?(P(!1),A(e=>Math.min(500,e+20))):e.key===`ArrowRight`?A(e=>e<=110?(P(!0),100):Math.max(100,e-20)):(e.key===`Enter`||e.key===` `)&&I()},R=e=>{_(t=>({...t,[e]:!t[e]}))},z=()=>{w>0&&C(x[w-1].path)},te=()=>{w<x.length-1&&C(x[w+1].path)},B=(e,t=0)=>e.map(e=>{if(e.isDir){let n=!!g[e.path],r=St(e.name,!n)||(n?`data:image/svg+xml,%3csvg%20viewBox='0%200%2016%2016'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='m6.922%203.768-.644-.536A1%201%200%200%200%205.638%203H2a1%201%200%200%200-1%201v8a1%201%200%200%200%201%201h12a1%201%200%200%200%201-1V5a1%201%200%200%200-1-1H7.562a1%201%200%200%201-.64-.232'%20fill='%2390a4ae'%20/%3e%3c/svg%3e`:`data:image/svg+xml,%3csvg%20viewBox='0%200%2016%2016'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M14.483%206H4.721a1%201%200%200%200-.949.684L2%2012V5h12a1%201%200%200%200-1-1H7.562a1%201%200%200%201-.64-.232l-.644-.536A1%201%200%200%200%205.638%203H2a1%201%200%200%200-1%201v8a1%201%200%200%200%201%201h11l2.403-5.606A1%201%200%200%200%2014.483%206'%20fill='%2390a4ae'%20/%3e%3c/svg%3e`);return(0,$.jsxs)(`div`,{className:`code-review-tree-folder`,children:[(0,$.jsxs)(`button`,{type:`button`,className:`code-review-tree-folder-btn`,style:{paddingLeft:`${t*14+10}px`},onClick:()=>R(e.path),"aria-expanded":!n,children:[(0,$.jsx)(`span`,{className:`code-review-chevron`,children:n?`›`:`⌄`}),(0,$.jsx)(`span`,{className:`code-review-tree-icon material-icon folder`,"aria-hidden":`true`,children:r&&(0,$.jsx)(`img`,{src:r,alt:``,draggable:!1})}),(0,$.jsx)(`span`,{className:`code-review-folder-name`,children:e.name}),(0,$.jsx)(`span`,{className:`code-review-mod-dot`,title:`Modified in this folder`,"aria-hidden":`true`,children:`•`})]}),!n&&e.children&&(0,$.jsx)(`div`,{className:`code-review-tree-sub`,children:B(e.children,t+1)})]},e.path)}let n=e.path===S,r=xt(e.name),i=Ct(e.name,r)||`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20fill='none'%20viewBox='0%200%2024%2024'%3e%3cpath%20d='M0%200h24v24H0z'/%3e%3cpath%20fill='%2342a5f5'%20d='M8%2016h8v2H8zm0-4h8v2H8zm6-10H6c-1.1%200-2%20.9-2%202v16c0%201.1.89%202%201.99%202H18c1.1%200%202-.9%202-2V8zm4%2018H6V4h7v5h5z'/%3e%3c/svg%3e`,a=!!e.change?.created;return(0,$.jsxs)(`button`,{type:`button`,className:`code-review-tree-file${n?` is-selected`:``}`,style:{paddingLeft:`${t*14+12}px`},onClick:()=>C(e.path),title:e.path,children:[(0,$.jsx)(`span`,{className:`code-review-tree-icon material-icon file`,"aria-hidden":`true`,children:i&&(0,$.jsx)(`img`,{src:i,alt:``,draggable:!1})}),(0,$.jsx)(`span`,{className:`code-review-tree-file-name`,children:e.name}),(0,$.jsx)(`span`,{className:`code-review-file-status-icon ${a?`is-created`:`is-modified`}`,"aria-hidden":`true`,children:a?`A`:`M`})]},e.path)});return(0,$.jsxs)(`main`,{className:`code-review-page`,children:[(0,$.jsxs)(`header`,{className:`code-review-top-bar`,children:[(0,$.jsxs)(`div`,{className:`code-review-branch-group`,children:[t?(0,$.jsx)(v,{workspacePath:t,onBranchChanged:y}):(0,$.jsx)(`span`,{className:`code-review-branch-static`,children:l?.currentBranch||`Review`}),(0,$.jsxs)(`span`,{className:`code-review-branch-stat-add`,children:[`+`,E.toLocaleString()]}),(0,$.jsxs)(`span`,{className:`code-review-branch-stat-del`,children:[`-`,ee.toLocaleString()]})]}),(0,$.jsxs)(`div`,{className:`code-review-top-actions`,children:[(0,$.jsx)(`button`,{type:`button`,className:`code-review-icon-btn`,onClick:y,disabled:s,title:`Refresh changes`,"aria-label":`Refresh changes`,children:(0,$.jsx)(`svg`,{className:s?`code-review-spin`:``,width:`15`,height:`15`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,children:(0,$.jsx)(`path`,{d:`M21.5 2v6h-6M21.34 15.57a10 10 0 1 1-.57-8.38l5.67-5.67`})})}),i&&(0,$.jsx)(`button`,{type:`button`,className:`code-review-icon-btn`,onClick:i,title:`Open workspace files (Ctrl+P)`,"aria-label":`Open workspace files`,children:(0,$.jsxs)(`svg`,{width:`15`,height:`15`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2.2`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,$.jsx)(`path`,{d:`M3 6h7l2 2h9v10a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2Z`}),(0,$.jsx)(`path`,{d:`M3 6v12`})]})}),(0,$.jsx)(`button`,{type:`button`,className:`code-review-icon-btn ${N?``:`is-active`}`,onClick:()=>P(e=>!e),"aria-label":N?`Show file tree`:`Hide file tree`,title:N?`Show file tree`:`Hide file tree`,children:(0,$.jsxs)(`svg`,{width:`15`,height:`15`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.8`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,$.jsx)(`rect`,{x:`3`,y:`3`,width:`18`,height:`18`,rx:`2`}),(0,$.jsx)(`path`,{d:`M15 3v18`})]})}),(0,$.jsx)(`button`,{type:`button`,className:`code-review-close-btn`,onClick:r,"aria-label":`Close review`,title:`Close review`,children:`×`})]})]}),(0,$.jsxs)(`div`,{className:`code-review-banner`,children:[(0,$.jsxs)(`div`,{className:`code-review-banner-left`,children:[(0,$.jsxs)(`svg`,{className:`code-review-banner-info-icon`,width:`16`,height:`16`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,children:[(0,$.jsx)(`circle`,{cx:`12`,cy:`12`,r:`10`}),(0,$.jsx)(`path`,{d:`M12 16v-4M12 8h.01`})]}),d&&a.length>0?(0,$.jsxs)(`div`,{className:`code-review-scope-group`,children:[(0,$.jsxs)(`button`,{type:`button`,className:`code-review-scope-btn ${f===`workspace`?`is-active`:``}`,onClick:()=>p(`workspace`),children:[`Workspace Git (`,a.length,`)`]}),(0,$.jsxs)(`button`,{type:`button`,className:`code-review-scope-btn ${f===`agent`?`is-active`:``}`,onClick:()=>p(`agent`),children:[`AI Edits (`,e?.length||0,`)`]})]}):(0,$.jsx)(`span`,{children:s?`Scanning workspace Git changes...`:x.length>0?`${x.length} changed file${x.length===1?``:`s`} in workspace`:`Working tree is clean · No uncommitted changes`})]}),x.length>1&&(0,$.jsxs)(`div`,{className:`code-review-pagination`,children:[(0,$.jsx)(`button`,{type:`button`,className:`code-review-page-arrow`,onClick:z,disabled:w<=0,"aria-label":`Previous file`,title:`Previous file`,children:`‹`}),(0,$.jsx)(`button`,{type:`button`,className:`code-review-page-arrow`,onClick:te,disabled:w>=x.length-1,"aria-label":`Next file`,title:`Next file`,children:`›`})]})]}),(0,$.jsxs)(`div`,{className:`code-review-split ${j?`is-resizing`:``}`,ref:O,children:[(0,$.jsx)(`section`,{className:`code-review-diff-pane`,"aria-label":`Diff viewer`,children:T?(0,$.jsxs)(`article`,{className:`code-review-file-view`,children:[(0,$.jsxs)(`div`,{className:`code-review-file-bar`,children:[(0,$.jsx)(`span`,{className:`code-review-tree-icon material-icon file`,"aria-hidden":`true`,children:(0,$.jsx)(`img`,{src:Ct(T.path.split(`/`).pop()||``,xt(T.path))||`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20fill='none'%20viewBox='0%200%2024%2024'%3e%3cpath%20d='M0%200h24v24H0z'/%3e%3cpath%20fill='%2342a5f5'%20d='M8%2016h8v2H8zm0-4h8v2H8zm6-10H6c-1.1%200-2%20.9-2%202v16c0%201.1.89%202%201.99%202H18c1.1%200%202-.9%202-2V8zm4%2018H6V4h7v5h5z'/%3e%3c/svg%3e`,alt:``,draggable:!1})}),(0,$.jsx)(`span`,{className:`code-review-file-bar-status ${T.created?`is-created`:`is-modified`}`,children:T.created?`A`:`M`}),(0,$.jsx)(`span`,{className:`code-review-file-bar-path`,title:T.path,children:T.path}),(0,$.jsxs)(`span`,{className:`code-review-file-bar-stat-add`,children:[`+`,T.additions]}),(0,$.jsxs)(`span`,{className:`code-review-file-bar-stat-del`,children:[`-`,T.deletions]})]}),(0,$.jsx)(`div`,{className:`code-review-code-container`,children:T.hunks&&T.hunks.length>0?T.hunks.map((e,t)=>{let n=kt(e.oldText),r=kt(e.newText),i=1;return(0,$.jsxs)(`div`,{className:`code-review-hunk-block`,children:[n.map((e,t)=>(0,$.jsxs)(`div`,{className:`code-review-line is-del`,children:[(0,$.jsx)(`span`,{className:`code-review-gutter`,children:i++}),(0,$.jsx)(`span`,{className:`code-review-sign`,children:`−`}),(0,$.jsx)(`code`,{className:`code-review-code-text`,children:e||` `})]},`del-${t}`)),r.map((e,t)=>(0,$.jsxs)(`div`,{className:`code-review-line is-add`,children:[(0,$.jsx)(`span`,{className:`code-review-gutter`,children:i++}),(0,$.jsx)(`span`,{className:`code-review-sign`,children:`+`}),(0,$.jsx)(`code`,{className:`code-review-code-text`,children:e||` `})]},`add-${t}`))]},`${T.path}-hunk-${t}`)}):(0,$.jsx)(`div`,{className:`code-review-empty-diff`,children:`No diff hunks available for this file.`})})]},T.path):(0,$.jsxs)(`div`,{className:`code-review-clean-state`,children:[(0,$.jsxs)(`svg`,{width:`44`,height:`44`,viewBox:`0 0 24 24`,fill:`none`,stroke:`#22c55e`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,children:[(0,$.jsx)(`path`,{d:`M22 11.08V12a10 10 0 1 1-5.93-9.14`}),(0,$.jsx)(`polyline`,{points:`22 4 12 14.01 9 11.01`})]}),(0,$.jsx)(`h3`,{children:`Working tree is clean`}),(0,$.jsx)(`p`,{children:`No uncommitted changes found in this workspace.`}),(0,$.jsx)(`button`,{type:`button`,className:`code-review-clean-refresh-btn`,onClick:y,children:`↻ Refresh Git status`})]})}),x.length>0&&(0,$.jsxs)(`div`,{className:`code-review-resizer ${j?`is-dragging`:``} ${N?`is-collapsed`:``}`,onPointerDown:F,onDoubleClick:I,onKeyDown:L,role:`separator`,tabIndex:0,"aria-orientation":`vertical`,"aria-valuenow":N?0:k,"aria-label":`Resize panel divider`,title:N?`Drag or double-click to expand file list`:`Drag to resize file list / Double click to reset`,children:[(0,$.jsx)(`div`,{className:`code-review-resizer-line`}),(0,$.jsx)(`div`,{className:`code-review-resizer-handle`})]}),x.length>0&&!N&&(0,$.jsxs)(`aside`,{className:`code-review-tree-pane`,style:{width:`${k}px`},"aria-label":`Changed files tree`,children:[(0,$.jsxs)(`div`,{className:`code-review-search-wrap`,children:[(0,$.jsxs)(`svg`,{className:`code-review-search-icon`,width:`14`,height:`14`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,children:[(0,$.jsx)(`circle`,{cx:`11`,cy:`11`,r:`8`}),(0,$.jsx)(`path`,{d:`m21 21-4.3-4.3`})]}),(0,$.jsx)(`input`,{type:`text`,className:`code-review-search-input`,placeholder:`Filter files...`,value:m,onChange:e=>h(e.target.value),spellCheck:!1}),(0,$.jsx)(`button`,{type:`button`,className:`code-review-tree-collapse-btn`,onClick:()=>P(!0),title:`Collapse file list`,"aria-label":`Collapse file list`,children:`›`})]}),(0,$.jsx)(`div`,{className:`code-review-tree-list`,role:`tree`,children:B(D)})]})]})]})}var Q,$,Mt=t((()=>{Q=e(i()),a(),x(),Dt(),Ot(),$=o()}));export{Ct as a,x as c,Dt as i,p as l,Mt as n,St as o,xt as r,v as s,jt as t,g as u};
@@ -1 +0,0 @@
1
- import{i as e,n as t}from"./chunk-CacB07dV.js";import{k as n,y as r}from"./index-D8D9MeRA.js";function i({isOpen:e,onClose:t,onSelectChat:n,onNewChat:r,onSelectWorkspace:i,onOpenSettings:s,onChangeView:c,onChangeModel:l,onChangeProvider:u,onExecuteSlash:d,chatSessions:f,currentChatId:p,workspacePath:m}){let[h,g]=(0,a.useState)(``),[_,v]=(0,a.useState)(0),y=(0,a.useRef)(null),b=(0,a.useRef)(null);(0,a.useEffect)(()=>{e&&(g(``),v(0),setTimeout(()=>y.current?.focus(),50))},[e]);let x=(0,a.useMemo)(()=>{let e=[];e.push({id:`cmd-new-chat`,title:`New chat`,subtitle:`Start a clean conversation session`,category:`Commands`,icon:`+`,action:()=>{r(),t()}}),d&&(e.push({id:`cmd-rewind`,title:`/rewind - Git Checkpoint Time Machine`,subtitle:`Roll back workspace to a previous checkpoint`,category:`Commands`,icon:`↺`,action:()=>{d(`/rewind`),t()}}),e.push({id:`cmd-repomap`,title:`/repomap - Codebase AST Map`,subtitle:`Generate hierarchical tree-sitter map of workspace`,category:`Commands`,icon:`AST`,action:()=>{d(`/repomap`),t()}}),e.push({id:`cmd-init`,title:`/init - Initialize AGENTS.md`,subtitle:`Generate project instructions and guidelines file`,category:`Commands`,icon:`DOC`,action:()=>{d(`/init`),t()}})),c&&(e.push({id:`cmd-skills`,title:`Manage Skills (/skills)`,subtitle:`Browse and customize agent skills`,category:`Commands`,icon:`SKL`,action:()=>{c(`skills`),t()}}),e.push({id:`cmd-mcp`,title:`MCP catalog & Tools (/mcp)`,subtitle:`Configure Model Context Protocol servers`,category:`Commands`,icon:`MCP`,action:()=>{c(`mcp`),t()}}),e.push({id:`cmd-cron`,title:`Scheduled tasks (/cron)`,subtitle:`View and manage recurring background tasks`,category:`Commands`,icon:`CRN`,action:()=>{c(`cron`),t()}}),e.push({id:`cmd-link`,title:`Linked folders (/link)`,subtitle:`Connect external notes and doc directories`,category:`Commands`,icon:`DIR`,action:()=>{c(`link`),t()}})),s&&e.push({id:`cmd-settings`,title:`Settings`,subtitle:`Configure API keys, models, and preferences`,category:`Commands`,icon:`SET`,action:()=>{s(),t()}}),i&&e.push({id:`ws-switch`,title:`Switch Workspace Directory`,subtitle:m?`Current: ${m}`:`Select a project folder`,category:`Workspace`,icon:`DIR`,action:()=>{i(),t()}}),u&&l&&(e.push({id:`model-claude-37`,title:`Claude 3.7 Sonnet`,subtitle:`Anthropic • Hybrid reasoning and fast coding`,category:`Models`,icon:`CL`,action:()=>{u(`anthropic`),l(`claude-3-7-sonnet-20250219`),t()}}),e.push({id:`model-claude-35`,title:`Claude 3.5 Sonnet`,subtitle:`Anthropic • High precision coding agent`,category:`Models`,icon:`CL`,action:()=>{u(`anthropic`),l(`claude-3-5-sonnet-20240620`),t()}}),e.push({id:`model-deepseek-v3`,title:`DeepSeek-V3`,subtitle:`DeepSeek • Fast reasoning and cost efficiency`,category:`Models`,icon:`DS`,action:()=>{u(`deepseek`),l(`deepseek-chat`),t()}}),e.push({id:`model-gpt-4o`,title:`GPT-4o`,subtitle:`OpenAI • Multimodal flagship model`,category:`Models`,icon:`AI`,action:()=>{u(`openai`),l(`gpt-4o`),t()}}),e.push({id:`model-gemini-flash`,title:`Gemini 2.0 Flash`,subtitle:`Google • Ultra-fast multi-turn assistant`,category:`Models`,icon:`GM`,action:()=>{u(`gemini`),l(`gemini-2.0-flash`),t()}}),e.push({id:`model-gemini-pro`,title:`Gemini 1.5 Pro`,subtitle:`Google • 2M token deep context reasoning`,category:`Models`,icon:`GM`,action:()=>{u(`gemini`),l(`gemini-1.5-pro`),t()}}),e.push({id:`model-ollama`,title:`Local Ollama model`,subtitle:`Ollama • 100% offline private inference`,category:`Models`,icon:`OL`,action:()=>{u(`ollama`),t()}}));for(let r of f||[])e.push({id:`chat-${r.id}`,title:r.title||`Untitled Chat`,subtitle:`Chat session • ${r.id===p?`Active`:`Previous`}`,category:`Chats`,icon:`#`,action:()=>{n(r.id),t()}});return e},[r,t,d,c,s,i,m,u,l,f,p,n]),S=(0,a.useMemo)(()=>{let e=h.trim().toLowerCase();return e?x.filter(t=>{let n=t.title.toLowerCase().includes(e),r=t.subtitle?t.subtitle.toLowerCase().includes(e):!1,i=t.category.toLowerCase().includes(e);return n||r||i}):x},[x,h]);(0,a.useEffect)(()=>{v(0)},[S]);let C=e=>{if(e.key===`ArrowDown`)e.preventDefault(),v(e=>e+1<S.length?e+1:0);else if(e.key===`ArrowUp`)e.preventDefault(),v(e=>e-1>=0?e-1:S.length-1);else if(e.key===`Enter`){e.preventDefault();let t=S[_];t&&t.action()}else e.key===`Escape`&&(e.preventDefault(),t())};if((0,a.useEffect)(()=>{if(b.current){let e=b.current.querySelector(`.palette-item.is-selected`);e&&e.scrollIntoView({block:`nearest`})}},[_]),!e)return null;let w=S.reduce((e,t)=>(e[t.category]||(e[t.category]=[]),e[t.category].push(t),e),{}),T=0;return(0,o.jsx)(`div`,{className:`command-palette-backdrop`,onClick:t,style:{position:`fixed`,top:0,left:0,right:0,bottom:0,background:`rgba(5, 7, 12, 0.72)`,backdropFilter:`blur(8px)`,zIndex:9999,display:`flex`,alignItems:`flex-start`,justifyContent:`center`,paddingTop:`12vh`},children:(0,o.jsxs)(`div`,{className:`command-palette-dialog`,onClick:e=>e.stopPropagation(),style:{width:`100%`,maxWidth:`620px`,background:`var(--bg-primary, #111317)`,border:`1px solid var(--border-color, #232730)`,borderRadius:`14px`,boxShadow:`0 24px 60px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(255, 255, 255, 0.08)`,overflow:`hidden`,display:`flex`,flexDirection:`column`,maxHeight:`70vh`,animation:`paletteIn 0.15s cubic-bezier(0.16, 1, 0.3, 1)`},children:[(0,o.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,padding:`14px 18px`,borderBottom:`1px solid var(--border-color, #232730)`,gap:`12px`,background:`var(--bg-secondary, #181a20)`},children:[(0,o.jsxs)(`svg`,{width:`18`,height:`18`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2.5`,strokeLinecap:`round`,strokeLinejoin:`round`,style:{color:`var(--interactive-fg)`,flexShrink:0},children:[(0,o.jsx)(`circle`,{cx:`11`,cy:`11`,r:`8`}),(0,o.jsx)(`line`,{x1:`21`,y1:`21`,x2:`16.65`,y2:`16.65`})]}),(0,o.jsx)(`input`,{ref:y,type:`text`,placeholder:`Type a command, model, chat, or / for slash actions...`,value:h,onChange:e=>g(e.target.value),onKeyDown:C,style:{flex:1,background:`transparent`,border:`none`,outline:`none`,color:`#f3f4f6`,fontSize:`1rem`,fontWeight:500}}),(0,o.jsx)(`kbd`,{style:{padding:`2px 7px`,borderRadius:`4px`,background:`rgba(255, 255, 255, 0.08)`,color:`var(--text-muted, #9ca3af)`,fontSize:`0.7rem`,fontWeight:600,border:`1px solid rgba(255, 255, 255, 0.1)`},children:`ESC`})]}),(0,o.jsx)(`div`,{ref:b,style:{flex:1,overflowY:`auto`,padding:`10px`,display:`flex`,flexDirection:`column`,gap:`6px`},children:S.length===0?(0,o.jsx)(`div`,{style:{padding:`32px 16px`,textAlign:`center`,color:`#9ca3af`,fontSize:`0.88rem`},children:`No matching commands, models, or chats found`}):Object.entries(w).map(([e,t])=>(0,o.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:`2px`},children:[(0,o.jsx)(`div`,{style:{fontSize:`0.68rem`,fontWeight:700,textTransform:`none`,letterSpacing:`0.06em`,color:`var(--text-muted, #6b7280)`,padding:`8px 10px 4px 10px`},children:e}),t.map(e=>{let t=T++,n=t===_;return(0,o.jsxs)(`div`,{className:`palette-item ${n?`is-selected`:``}`,onClick:()=>e.action(),onMouseEnter:()=>v(t),style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,padding:`9px 12px`,borderRadius:`8px`,cursor:`pointer`,background:n?`rgba(16, 185, 129, 0.12)`:`transparent`,border:`1px solid ${n?`rgba(16, 185, 129, 0.3)`:`transparent`}`,transition:`all 0.1s ease`},children:[(0,o.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:`10px`,minWidth:0},children:[(0,o.jsx)(`span`,{style:{fontSize:`0.68rem`,fontWeight:700,padding:`2px 5px`,borderRadius:`4px`,background:`rgba(255, 255, 255, 0.08)`,color:n?`#10b981`:`#94a3b8`,fontFamily:`monospace`,flexShrink:0,minWidth:`22px`,textAlign:`center`},children:e.icon}),(0,o.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,minWidth:0},children:[(0,o.jsx)(`span`,{style:{fontSize:`0.85rem`,fontWeight:600,color:n?`#ffffff`:`#e2e8f0`,overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`},children:e.title}),e.subtitle&&(0,o.jsx)(`span`,{style:{fontSize:`0.72rem`,color:`#94a3b8`,overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`},children:e.subtitle})]})]}),n&&(0,o.jsx)(`span`,{style:{fontSize:`0.7rem`,color:`#10b981`,fontWeight:600,padding:`2px 6px`,borderRadius:`4px`,background:`rgba(16, 185, 129, 0.15)`},children:`↵ Select`})]},e.id)})]},e))}),(0,o.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,padding:`8px 16px`,borderTop:`1px solid var(--border-color, #232730)`,background:`var(--bg-secondary, #181a20)`,fontSize:`0.72rem`,color:`#94a3b8`},children:[(0,o.jsxs)(`div`,{style:{display:`flex`,gap:`12px`},children:[(0,o.jsxs)(`span`,{children:[(0,o.jsx)(`kbd`,{style:{background:`rgba(255,255,255,0.1)`,padding:`1px 4px`,borderRadius:`3px`},children:`↑`}),` `,(0,o.jsx)(`kbd`,{style:{background:`rgba(255,255,255,0.1)`,padding:`1px 4px`,borderRadius:`3px`},children:`↓`}),` to navigate`]}),(0,o.jsxs)(`span`,{children:[(0,o.jsx)(`kbd`,{style:{background:`rgba(255,255,255,0.1)`,padding:`1px 4px`,borderRadius:`3px`},children:`↵`}),` to select`]})]}),(0,o.jsx)(`span`,{children:`Universal command palette`})]})]})})}var a,o;t((()=>{a=e(n()),o=r()}))();export{i as CommandPalette};
@@ -1 +0,0 @@
1
- import{i as e,n as t}from"./chunk-CacB07dV.js";import{T as n,k as r,w as i,y as a}from"./index-D8D9MeRA.js";import{$ as o,G as s}from"./config-eEDngJXO.js";import{a as c,n as l,t as u}from"./studio-B1mk40wD.js";var d=t((()=>{}));function f(e){return E[e]??e}function p(e){let t=e.url?.trim();return t&&(/^https?:\/\//i.test(t)||t.startsWith(`/api/`))?t:e.path||t||``}function m(e){return T[e]?.[0]?.value??``}function ee(){return(0,_.jsx)(`div`,{className:`img-studio-skeleton`,children:(0,_.jsx)(`div`,{className:`img-studio-skeleton-shine`})})}function h({view:e,onRefreshPictures:t,onSendToChat:n}){let[r,i]=(0,g.useState)(``),[a,o]=(0,g.useState)(``),[s,c]=(0,g.useState)(!1),[l,u]=(0,g.useState)(`1:1`),[d,h]=(0,g.useState)(1),[E,D]=(0,g.useState)(!1),[O,k]=(0,g.useState)(``),[A,j]=(0,g.useState)(null),[M,te]=(0,g.useState)([]),[N,ne]=(0,g.useState)([]),P=(0,g.useCallback)(async()=>{try{let e=await S(),t=[`nanobanana`,`dalle`,`stability`,`ideogram`,`replicate`,`image_gen`];ne([...e.filter(e=>e.source&&t.includes(e.source.toLowerCase()))].sort((e,t)=>{let n=e.createdAt?new Date(e.createdAt).getTime():0;return(t.createdAt?new Date(t.createdAt).getTime():0)-n||t.filename.localeCompare(e.filename)}))}catch(e){console.error(`Failed to load history pictures:`,e)}},[]),[F,I]=(0,g.useState)({active:`nanobanana`,available:[`nanobanana`]}),[L,R]=(0,g.useState)(`nanobanana`),[z,B]=(0,g.useState)(m(`nanobanana`)),[V,H]=(0,g.useState)(``),[U,re]=(0,g.useState)({}),W=(0,g.useRef)(null);(0,g.useEffect)(()=>{let e=!1;return y().then(t=>{e||(I(t),R(t.active),B(m(t.active)))}).catch(()=>{}),P(),()=>{e=!0}},[P]),(0,g.useEffect)(()=>{let e=!1;return b(L).then(t=>{if(e||!t||t.length===0)return;let n=T[L]??[],r=new Map;for(let e of n)r.set(e.value,e.label);let i=[],a=new Set;for(let e of t)a.has(e)||(a.add(e),i.push({value:e,label:r.get(e)??e}));for(let e of n)a.has(e.value)||(a.add(e.value),i.push(e));re(e=>({...e,[L]:i}))}).catch(()=>{}),()=>{e=!0}},[L]);let ie=e=>{R(e),B(m(e)),H(``)},G=z===`custom`?V.trim():z,[K,q]=(0,g.useState)(null),[J,Y]=(0,g.useState)(!1),X=(0,g.useRef)(null),ae=e=>{let t=e.target.files?.[0];if(!t)return;let n=new FileReader;n.onload=e=>{typeof e.target?.result==`string`&&q(e.target.result)},n.readAsDataURL(t)},oe=e=>{e.preventDefault(),Y(!1);let t=e.dataTransfer.files?.[0];if(!t||!t.type.startsWith(`image/`))return;let n=new FileReader;n.onload=e=>{typeof e.target?.result==`string`&&q(e.target.result)},n.readAsDataURL(t)},Z=(0,g.useCallback)(async()=>{let e=r.trim();if(!e||E)return;D(!0),k(``),j(null);let n={prompt:e,negativePrompt:a.trim()||void 0,aspectRatio:l,numImages:d,model:G||void 0,provider:L,imageDataUri:K||void 0,mode:K?`edit`:`generate`};try{j(await v(n)),te(t=>[e,...t.filter(t=>t!==e)].slice(0,8)),t?.(),P()}catch(e){k(e instanceof Error?e.message:String(e))}finally{D(!1)}},[r,a,l,d,E,t,L,G,K]),se=e=>{(e.metaKey||e.ctrlKey)&&e.key===`Enter`&&(e.preventDefault(),Z())},Q=(e,t)=>{let n=document.createElement(`a`);n.href=e.url||e.path,n.download=`mint-imagine-${t+1}.png`,document.body.appendChild(n),n.click(),document.body.removeChild(n)},$=U[L]??T[L]??[];return(0,_.jsxs)(`div`,{className:`img-studio ${e===`imagine`?`is-visible`:``}`,id:`image-studio-panel`,role:`main`,"aria-label":`Image Studio`,"aria-hidden":e!==`imagine`,children:[(0,_.jsxs)(`header`,{className:`img-studio-header`,children:[(0,_.jsxs)(`div`,{className:`img-studio-header-title`,children:[(0,_.jsx)(`svg`,{width:`20`,height:`20`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,children:(0,_.jsx)(`polygon`,{points:`12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2`})}),(0,_.jsx)(`h1`,{children:`Image Studio`}),(0,_.jsx)(`span`,{className:`img-studio-badge`,children:f(L)})]}),(0,_.jsxs)(`p`,{className:`img-studio-subtitle`,children:[`Generate images with`,` `,F.available.length>1?`${F.available.length} configured providers`:f(L)]})]}),(0,_.jsxs)(`div`,{className:`img-studio-content`,children:[(0,_.jsxs)(`section`,{className:`img-studio-controls`,"aria-label":`Generation settings`,children:[(0,_.jsxs)(`div`,{className:`img-studio-field`,style:{display:`flex`,gap:`10px`,width:`100%`},children:[(0,_.jsxs)(`div`,{style:{flex:1,display:`flex`,flexDirection:`column`,gap:`4px`},children:[(0,_.jsx)(`label`,{className:`img-studio-label`,htmlFor:`img-studio-provider`,style:{display:`flex`,alignItems:`center`,width:`100%`,height:`18px`},children:(0,_.jsx)(`span`,{children:`Provider`})}),(0,_.jsx)(`select`,{id:`img-studio-provider`,className:`img-studio-textarea`,style:{padding:`8px 10px`,height:`38px`,cursor:`pointer`},value:L,onChange:e=>ie(e.target.value),disabled:E,children:F.available.map(e=>(0,_.jsx)(`option`,{value:e,children:f(e).replace(/^[^a-zA-Z0-9]+/,``)},e))})]}),(0,_.jsxs)(`div`,{style:{flex:1,display:`flex`,flexDirection:`column`,gap:`4px`},children:[(0,_.jsx)(`label`,{className:`img-studio-label`,htmlFor:`img-studio-model`,style:{display:`flex`,alignItems:`center`,height:`18px`},children:`Model`}),(0,_.jsxs)(`select`,{id:`img-studio-model`,className:`img-studio-textarea`,style:{padding:`8px 10px`,height:`38px`,cursor:`pointer`},value:z,onChange:e=>B(e.target.value),disabled:E,children:[$.map(({value:e,label:t})=>(0,_.jsx)(`option`,{value:e,children:t},e)),z&&z!==`custom`&&!$.some(e=>e.value===z)&&(0,_.jsx)(`option`,{value:z,children:z},z),(0,_.jsx)(`option`,{value:`custom`,children:`Custom model ID…`})]})]})]}),z===`custom`&&(0,_.jsx)(`div`,{className:`img-studio-field`,style:{marginTop:`-8px`},children:(0,_.jsx)(`input`,{type:`text`,className:`img-studio-textarea img-studio-textarea--sm`,placeholder:L===`replicate`?`e.g. owner/model-name`:L===`dalle`?`e.g. dall-e-3`:`e.g. sd3.5-large`,value:V,onChange:e=>H(e.target.value),disabled:E})}),(0,_.jsxs)(`div`,{className:`img-studio-field`,children:[(0,_.jsxs)(`label`,{className:`img-studio-label`,children:[`Source image (optional for image editing)`,(0,_.jsx)(`span`,{className:`img-studio-label-hint`,children:`Upload an image to edit / inpaint`})]}),K?(0,_.jsxs)(`div`,{className:`img-studio-preview-card`,children:[(0,_.jsx)(`img`,{src:K,alt:`Input source`,className:`img-studio-preview-thumb`}),(0,_.jsxs)(`div`,{className:`img-studio-preview-info`,children:[(0,_.jsx)(`div`,{className:`img-studio-preview-title`,children:(0,_.jsx)(`span`,{children:`Source image attached`})}),(0,_.jsx)(`div`,{className:`img-studio-preview-subtitle`,children:`Ready for image editing`})]}),(0,_.jsx)(`button`,{type:`button`,className:`img-studio-preview-remove`,onClick:()=>q(null),children:`✕ Remove image`})]}):(0,_.jsxs)(`div`,{className:`img-studio-dropzone ${J?`is-dragging`:``}`,onClick:()=>X.current?.click(),onDragOver:e=>{e.preventDefault(),Y(!0)},onDragLeave:()=>Y(!1),onDrop:oe,children:[(0,_.jsx)(`input`,{ref:X,type:`file`,accept:`image/*`,onChange:ae,disabled:E,style:{display:`none`}}),(0,_.jsxs)(`svg`,{className:`img-studio-dropzone-icon`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,_.jsx)(`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`}),(0,_.jsx)(`polyline`,{points:`17 8 12 3 7 8`}),(0,_.jsx)(`line`,{x1:`12`,y1:`3`,x2:`12`,y2:`15`})]}),(0,_.jsx)(`div`,{className:`img-studio-dropzone-text`,children:`Click to choose an image or drag it here`}),(0,_.jsx)(`div`,{className:`img-studio-dropzone-subtext`,children:`PNG, JPG, WEBP up to 10MB`})]})]}),(0,_.jsxs)(`div`,{className:`img-studio-field`,children:[(0,_.jsxs)(`label`,{className:`img-studio-label`,htmlFor:`img-studio-prompt`,children:[K?`Editing instructions`:`Prompt`,(0,_.jsx)(`span`,{className:`img-studio-label-hint`,children:K?`Describe what to edit or remove`:`Describe the image you want`})]}),(0,_.jsx)(`textarea`,{id:`img-studio-prompt`,ref:W,className:`img-studio-textarea`,value:r,onChange:e=>i(e.target.value),onKeyDown:se,placeholder:`a dragon flying over Bangkok at sunset, golden hour, ultra-detailed...`,rows:4,disabled:E,"aria-required":`true`}),(0,_.jsx)(`div`,{className:`img-studio-prompt-hint`,children:`⌘+Enter to generate`})]}),(0,_.jsxs)(`div`,{className:`img-studio-field`,children:[(0,_.jsx)(`span`,{className:`img-studio-label`,children:`Style suggestions`}),(0,_.jsx)(`div`,{className:`img-studio-chips`,role:`group`,"aria-label":`Style suggestions`,children:w.map(e=>(0,_.jsx)(`button`,{type:`button`,className:`img-studio-chip`,onClick:()=>i(t=>t.trim()?`${t.trim()}, ${e}`:e),disabled:E,title:`Add "${e}" to prompt`,children:e},e))})]}),(0,_.jsxs)(`div`,{className:`img-studio-field`,children:[(0,_.jsxs)(`button`,{type:`button`,className:`img-studio-toggle`,onClick:()=>c(e=>!e),"aria-expanded":s,"aria-controls":`img-studio-negative-wrap`,children:[(0,_.jsx)(`svg`,{width:`12`,height:`12`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2.5`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,style:{transform:s?`rotate(90deg)`:`none`,transition:`transform 0.2s`},children:(0,_.jsx)(`polyline`,{points:`9 18 15 12 9 6`})}),`Negative prompt`,a.trim()&&(0,_.jsx)(`span`,{className:`img-studio-badge-dot`,"aria-label":`has content`})]}),s&&(0,_.jsx)(`div`,{id:`img-studio-negative-wrap`,children:(0,_.jsx)(`textarea`,{id:`img-studio-negative`,className:`img-studio-textarea img-studio-textarea--sm`,value:a,onChange:e=>o(e.target.value),placeholder:`blurry, low quality, distorted, text, watermark...`,rows:2,disabled:E})})]}),(0,_.jsxs)(`div`,{className:`img-studio-field`,children:[(0,_.jsx)(`span`,{className:`img-studio-label`,children:`Aspect ratio`}),(0,_.jsx)(`div`,{className:`img-studio-aspect-group`,role:`radiogroup`,"aria-label":`Aspect ratio`,children:C.map(({value:e,label:t,icon:n})=>(0,_.jsxs)(`button`,{type:`button`,role:`radio`,"aria-checked":l===e,className:`img-studio-aspect-btn ${l===e?`is-active`:``}`,onClick:()=>u(e),disabled:E,id:`img-studio-aspect-${e.replace(`:`,`x`)}`,children:[(0,_.jsx)(`span`,{className:`img-studio-aspect-icon`,"aria-hidden":`true`,children:n}),(0,_.jsx)(`span`,{children:t})]},e))})]}),(0,_.jsxs)(`div`,{className:`img-studio-field`,children:[(0,_.jsxs)(`span`,{className:`img-studio-label`,children:[`Number of images`,L===`dalle`&&(G===`dall-e-3`||G===`gpt-image-1`)&&(0,_.jsx)(`span`,{className:`img-studio-label-hint`,children:` (DALL·E 3 / GPT-Image-1: max 1)`})]}),(0,_.jsx)(`div`,{className:`img-studio-count-group`,role:`radiogroup`,"aria-label":`Image count`,children:[1,2,3,4].map(e=>(0,_.jsx)(`button`,{type:`button`,role:`radio`,"aria-checked":d===e,className:`img-studio-count-btn ${d===e?`is-active`:``}`,onClick:()=>h(e),disabled:E||L===`dalle`&&(G===`dall-e-3`||G===`gpt-image-1`)&&e>1,id:`img-studio-count-${e}`,children:e},e))})]}),(0,_.jsx)(`button`,{id:`img-studio-generate-btn`,type:`button`,className:`img-studio-generate-btn ${E?`is-loading`:``}`,onClick:Z,disabled:!r.trim()||E,"aria-busy":E,children:E?(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(`span`,{className:`img-studio-spinner`,"aria-hidden":`true`}),`Generating…`]}):(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(`svg`,{width:`16`,height:`16`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,children:(0,_.jsx)(`polygon`,{points:`12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2`})}),`Generate image`]})}),O&&(0,_.jsxs)(`div`,{className:`img-studio-error`,role:`alert`,children:[(0,_.jsxs)(`svg`,{width:`14`,height:`14`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,children:[(0,_.jsx)(`circle`,{cx:`12`,cy:`12`,r:`10`}),(0,_.jsx)(`line`,{x1:`12`,y1:`8`,x2:`12`,y2:`12`}),(0,_.jsx)(`line`,{x1:`12`,y1:`16`,x2:`12.01`,y2:`16`})]}),(0,_.jsx)(`span`,{children:O}),(0,_.jsx)(`button`,{type:`button`,onClick:()=>k(``),"aria-label":`Dismiss error`,children:`×`})]}),M.length>0&&(0,_.jsxs)(`div`,{className:`img-studio-field`,children:[(0,_.jsx)(`span`,{className:`img-studio-label`,children:`Recent prompts`}),(0,_.jsx)(`div`,{className:`img-studio-history`,children:M.map(e=>(0,_.jsxs)(`button`,{type:`button`,className:`img-studio-history-item`,onClick:()=>{i(e),W.current?.focus()},disabled:E,title:e,children:[(0,_.jsxs)(`svg`,{width:`11`,height:`11`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,children:[(0,_.jsx)(`circle`,{cx:`12`,cy:`12`,r:`10`}),(0,_.jsx)(`polyline`,{points:`12 6 12 12 16 14`})]}),(0,_.jsx)(`span`,{children:e})]},e))})]})]}),(0,_.jsxs)(`section`,{className:`img-studio-results`,"aria-label":`Generated images`,"aria-live":`polite`,children:[(0,_.jsxs)(`div`,{className:`img-studio-active-workspace`,children:[E&&(0,_.jsxs)(`div`,{className:`img-studio-skeleton-grid`,children:[Array.from({length:d}).map((e,t)=>(0,_.jsx)(ee,{},t)),(0,_.jsxs)(`p`,{className:`img-studio-generating-label`,"aria-live":`assertive`,children:[`Creating `,d,` image`,d>1?`s`:``,` with `,f(L),` — this may take a few seconds…`]})]}),!E&&A&&(0,_.jsxs)(_.Fragment,{children:[A.description&&(0,_.jsx)(`p`,{className:`img-studio-description`,children:A.description}),(0,_.jsx)(`div`,{className:`img-studio-grid`,style:{"--img-count":A.images.length},children:A.images.map((e,t)=>(0,_.jsxs)(`article`,{className:`img-studio-card`,"aria-label":`Generated image ${t+1}`,children:[(0,_.jsx)(`div`,{className:`img-studio-card-img-wrap`,children:(0,_.jsx)(`img`,{src:x(e.url||e.path),alt:e.message||r,className:`img-studio-card-img`,loading:`eager`,decoding:`async`})}),(0,_.jsxs)(`div`,{className:`img-studio-card-actions`,children:[(0,_.jsxs)(`button`,{type:`button`,className:`img-studio-action-btn`,onClick:()=>Q(e,t),title:`Download image`,id:`img-studio-download-${t}`,children:[(0,_.jsxs)(`svg`,{width:`13`,height:`13`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,children:[(0,_.jsx)(`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`}),(0,_.jsx)(`polyline`,{points:`7 10 12 15 17 10`}),(0,_.jsx)(`line`,{x1:`12`,y1:`15`,x2:`12`,y2:`3`})]}),`Download`]}),n&&(0,_.jsxs)(`button`,{type:`button`,className:`img-studio-action-btn img-studio-action-btn--primary`,onClick:()=>n(p(e),r),title:`Send to chat`,id:`img-studio-send-${t}`,children:[(0,_.jsxs)(`svg`,{width:`13`,height:`13`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,children:[(0,_.jsx)(`line`,{x1:`22`,y1:`2`,x2:`11`,y2:`13`}),(0,_.jsx)(`polygon`,{points:`22 2 15 22 11 13 2 9 22 2`})]}),`Send to chat`]})]})]},e.id))}),(0,_.jsxs)(`p`,{className:`img-studio-meta`,children:[`Provider: `,(0,_.jsx)(`strong`,{children:f(A.provider)}),` · Model: `,(0,_.jsx)(`strong`,{children:A.model}),` · `,A.images.length,` image`,A.images.length>1?`s`:``,` · Saved to gallery`]})]}),!E&&!A&&(0,_.jsxs)(`div`,{className:`img-studio-active-empty`,children:[(0,_.jsx)(`div`,{className:`img-studio-empty-icon`,"aria-hidden":`true`,children:(0,_.jsx)(`svg`,{width:`48`,height:`48`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`1`,strokeLinecap:`round`,strokeLinejoin:`round`,children:(0,_.jsx)(`polygon`,{points:`12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2`})})}),(0,_.jsx)(`p`,{children:`No active generation`}),(0,_.jsx)(`span`,{children:`Enter a prompt on the left pane and generate new images.`})]})]}),(0,_.jsx)(`div`,{className:`img-studio-history-header`,children:(0,_.jsxs)(`div`,{className:`img-studio-history-title`,children:[(0,_.jsxs)(`svg`,{width:`16`,height:`16`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,_.jsx)(`rect`,{x:`3`,y:`3`,width:`18`,height:`18`,rx:`2`,ry:`2`}),(0,_.jsx)(`circle`,{cx:`8.5`,cy:`8.5`,r:`1.5`}),(0,_.jsx)(`polyline`,{points:`21 15 16 10 5 21`})]}),(0,_.jsx)(`span`,{children:`Gallery & history`}),(0,_.jsx)(`span`,{className:`img-studio-history-badge`,children:(()=>{let e=new Set(A?.images.map(e=>e.id)||[]);return N.filter(t=>!e.has(t.id)).length})()})]})}),(0,_.jsx)(`div`,{className:`img-studio-history-gallery`,children:(()=>{let e=new Set(A?.images.map(e=>e.id)||[]),t=N.filter(t=>!e.has(t.id));return t.length===0?(0,_.jsxs)(`div`,{className:`img-studio-gallery-empty`,children:[(0,_.jsx)(`p`,{children:`Your saved gallery is empty`}),(0,_.jsx)(`span`,{children:`Generated images will be stored here automatically.`})]}):(0,_.jsx)(`div`,{className:`img-studio-grid`,children:t.map((e,t)=>(0,_.jsxs)(`article`,{className:`img-studio-card`,"aria-label":`Saved image ${t+1}`,children:[(0,_.jsx)(`div`,{className:`img-studio-card-img-wrap`,children:(0,_.jsx)(`img`,{src:x(e.thumbnailPath||e.thumbnailUrl||e.url||e.path),alt:e.message||`Generated image`,className:`img-studio-card-img`,loading:`lazy`,decoding:`async`,onError:t=>{let n=t.currentTarget;if(n.dataset.fallback)return;n.dataset.fallback=`true`;let r=e.path||e.url;r&&(n.src=x(r))}})}),(0,_.jsxs)(`div`,{className:`img-studio-card-actions`,children:[(0,_.jsxs)(`button`,{type:`button`,className:`img-studio-action-btn`,onClick:()=>Q(e,t),title:`Download image`,id:`img-studio-gallery-download-${t}`,children:[(0,_.jsxs)(`svg`,{width:`13`,height:`13`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,children:[(0,_.jsx)(`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`}),(0,_.jsx)(`polyline`,{points:`7 10 12 15 17 10`}),(0,_.jsx)(`line`,{x1:`12`,y1:`15`,x2:`12`,y2:`3`})]}),`Download`]}),n&&(0,_.jsxs)(`button`,{type:`button`,className:`img-studio-action-btn img-studio-action-btn--primary`,onClick:()=>n(p(e),e.message||``),title:`Send to chat`,id:`img-studio-gallery-send-${t}`,children:[(0,_.jsxs)(`svg`,{width:`13`,height:`13`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,children:[(0,_.jsx)(`line`,{x1:`22`,y1:`2`,x2:`11`,y2:`13`}),(0,_.jsx)(`polygon`,{points:`22 2 15 22 11 13 2 9 22 2`})]}),`Send to chat`]})]})]},e.id))})})()})]})]})]})}var g,_,v,y,b,x,S,C,w,T,E;t((()=>{g=e(r()),d(),i(),_=a(),c(),o(),{generateImages:v,getImageGenProviders:y,fetchImageProviderModels:b,convertFileSrc:x,listSavedPictures:S}=n,C=u,w=l,T=s,E={nanobanana:`✦ NanoBanana (Gemini)`,bfl:`⚡ Black Forest Labs (FLUX API)`,dalle:`⬡ DALL·E (OpenAI)`,stability:`◈ Stability AI`,ideogram:`◉ Ideogram`,replicate:`⬢ Replicate`}}))();export{h as default};
@@ -1 +0,0 @@
1
- import{i as e,n as t}from"./chunk-CacB07dV.js";import{k as n,y as r}from"./index-D8D9MeRA.js";import{A as i,E as a,O as o,k as ee}from"./config-eEDngJXO.js";var s,c,l;t((()=>{s=e(n()),o(),a(),c=r(),l=s.memo(function({listLinkedFolders:e,addLinkedFolder:t,removeLinkedFolder:n,linkedFolderStatus:r,refreshLinkedFolder:a,listLinkedFolderNotes:o,readLinkedFolderNote:l,openLinkedFolderNote:te,canOpenNote:ne,selectFolder:u}){let[d,re]=(0,s.useState)([]),[ie,f]=(0,s.useState)(!1),[p,ae]=(0,s.useState)(``),[oe,se]=(0,s.useState)(``),[m,h]=(0,s.useState)(``),[g,_]=(0,s.useState)(``),[v,y]=(0,s.useState)(``),[b,x]=(0,s.useState)(!1),[S,C]=(0,s.useState)(!1),[w,T]=(0,s.useState)({}),[ce,E]=(0,s.useState)(!1),le=(0,s.useRef)(null),ue=(0,s.useRef)(null),D=(0,s.useRef)(null),O=(0,s.useRef)(null),k=(0,s.useRef)(null),A=(0,s.useRef)(null),[j,M]=(0,s.useState)(null),[N,P]=(0,s.useState)(null),[F,I]=(0,s.useState)([]),[L,R]=(0,s.useState)(``),[z,B]=(0,s.useState)(null),[de,V]=(0,s.useState)(!1),H=(0,s.useRef)(0),[U,W]=(0,s.useState)(``),[G,K]=(0,s.useState)(!1),[q,J]=(0,s.useState)(null),[fe,Y]=(0,s.useState)({}),[pe,me]=(0,s.useState)({}),[he,X]=(0,s.useState)({}),Z=async()=>{f(!0),ae(``);try{let t=await e();re(Object.values(t||{}))}catch(e){console.error(`Failed to fetch linked folders:`,e),ae(`Failed to load linked folders`)}finally{f(!1)}};(0,s.useEffect)(()=>{Z()},[]);let ge=d.map(e=>`${e.name}\u0000${e.path}`).join(``),_e=(e,t)=>{if(e.key!==`Tab`||!t)return;let n=Array.from(t.querySelectorAll(`button:not(:disabled), input:not(:disabled), textarea:not(:disabled), [tabindex]:not([tabindex="-1"])`));if(n.length===0)return;let r=n[0],i=n[n.length-1];e.shiftKey&&(document.activeElement===r||!t.contains(document.activeElement))?(e.preventDefault(),i.focus()):!e.shiftKey&&(document.activeElement===i||!t.contains(document.activeElement))&&(e.preventDefault(),r.focus())};(0,s.useEffect)(()=>{if(d.length===0)return;let e=!0,t=!1,n=async()=>{if(!t){t=!0;try{let t=await Promise.all(d.map(async e=>{let[t,n]=await Promise.allSettled([r(e.name),o(e.name)]);return{name:e.name,statusResult:t,notesResult:n}}));if(!e)return;let n={},i={},a={};for(let e of t)e.statusResult.status===`fulfilled`?n[e.name]=e.statusResult.value:a[e.name]=`Could not load folder status`,e.notesResult.status===`fulfilled`?i[e.name]=e.notesResult.value:a[e.name]=`Could not load recent notes`;Y(n),me(i),X(a)}finally{t=!1}}};n();let i=window.setInterval(n,15e3);return()=>{e=!1,window.clearInterval(i)}},[ge,r,o]),(0,s.useEffect)(()=>{S&&le.current?.focus()},[S]),(0,s.useEffect)(()=>{if(!S)return;let e=e=>{e.key===`Escape`&&!b&&Q(),_e(e,D.current)};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[S,b]);let ve=()=>{ue.current=document.activeElement instanceof HTMLElement?document.activeElement:null,T({}),C(!0)},Q=()=>{C(!1),T({}),window.requestAnimationFrame(()=>ue.current?.focus())},ye=e=>{O.current=document.activeElement instanceof HTMLElement?document.activeElement:null,W(``),M(e)},$=()=>{M(null),window.requestAnimationFrame(()=>O.current?.focus())};(0,s.useEffect)(()=>{if(!j)return;k.current?.focus();let e=e=>{e.key===`Escape`&&$(),_e(e,A.current)};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[j?.name]),(0,s.useEffect)(()=>{if(!j)return;P(null),I([]),R(``),B(null),V(!1),H.current+=1;let e=!0,t=async()=>{try{let[t,n]=await Promise.all([r(j.name),o(j.name)]);e&&(P(t),I(n),W(``))}catch(t){e&&W(t?.message||`Failed to load linked folder details`)}};t();let n=window.setInterval(t,1e4);return()=>{e=!1,window.clearInterval(n)}},[j?.name,r,o]);let be=async()=>{if(j){K(!0);try{let e=await a(j.name);P(e),Y(t=>({...t,[j.name]:e})),W(``)}catch(e){W(e?.message||`Could not refresh folder`)}finally{K(!1)}}},xe=async e=>{if(z===e.id){H.current+=1,B(null),R(``),V(!1);return}let t=++H.current;B(e.id),R(``),V(!0);try{let n=await l(e.folder,e.id);t===H.current&&(R(n),W(``))}catch(e){t===H.current&&W(e?.message||`Could not read note`)}finally{t===H.current&&V(!1)}},Se=async e=>{try{if(navigator.clipboard?.writeText)await navigator.clipboard.writeText(e);else{let t=document.createElement(`textarea`);t.value=e,t.style.position=`fixed`,t.style.opacity=`0`,document.body.appendChild(t),t.select();let n=document.execCommand(`copy`);if(t.remove(),!n)throw Error(`Could not copy path`)}W(``)}catch(e){W(e?.message||`Could not copy path`)}},Ce=async e=>{e.preventDefault();let n={};if(m.trim()?d.some(e=>e.name===m.trim())&&(n.name=`This name is already linked. Choose another name.`):n.name=`Enter a name for this folder.`,g.trim()||(n.path=`Choose or enter a folder path.`),Object.keys(n).length){T(n);return}T({}),x(!0);try{await t({name:m.trim(),path:g.trim(),description:v.trim()||void 0}),h(``),_(``),y(``),E(!1),Q(),await Z()}catch(e){console.error(`Failed to add linked folder:`,e),T({form:e?.message||`Could not link folder. Check that the path exists and Mint can access it.`})}finally{x(!1)}},we=async()=>{if(u)try{let e=await u();e&&(_(e),T(e=>({...e,path:void 0,form:void 0})),(!m.trim()||ce)&&(h(e.replace(/[\\/]+$/,``).split(/[\\/]/).pop()||``),E(!0),T(e=>({...e,name:void 0}))))}catch(e){console.error(`Failed to open folder picker:`,e),T(t=>({...t,path:e?.message||`Could not open folder picker.`}))}},Te=async e=>{J(e);try{let t=await a(e);Y(n=>({...n,[e]:t})),X(t=>({...t,[e]:``}))}catch(t){X(n=>({...n,[e]:t?.message||`Could not refresh folder.`}))}finally{J(null)}},Ee=async e=>{if(window.confirm(`Unlink folder "${e}"? (The folder and its notes are not deleted.)`))try{await n(e),j?.name===e&&$(),Z()}catch(e){console.error(`Failed to remove linked folder:`,e),alert(`Error unlinking folder`)}},De=d.filter(e=>{let t=oe.toLowerCase();return e.name.toLowerCase().includes(t)||e.path.toLowerCase().includes(t)||(e.description||``).toLowerCase().includes(t)});return(0,c.jsxs)(`div`,{className:`management-container`,children:[(0,c.jsxs)(`div`,{className:`management-header`,children:[(0,c.jsxs)(`div`,{className:`management-title-group`,children:[(0,c.jsxs)(`h1`,{className:`management-title`,children:[(0,c.jsx)(`span`,{className:`management-title-icon`,style:{display:`inline-flex`,alignItems:`center`},children:i(22,`var(--accent)`)}),`Linked folders`]}),(0,c.jsxs)(`p`,{className:`management-subtitle`,children:[`Mint reads linked folder files to find relevant chats and saves useful notes into `,(0,c.jsx)(`code`,{children:`mint-notes/`}),`.`]})]}),(0,c.jsxs)(`button`,{type:`button`,className:`management-primary-btn`,onClick:ve,children:[(0,c.jsxs)(`svg`,{width:`16`,height:`16`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2.5`,children:[(0,c.jsx)(`line`,{x1:`12`,y1:`5`,x2:`12`,y2:`19`}),(0,c.jsx)(`line`,{x1:`5`,y1:`12`,x2:`19`,y2:`12`})]}),`Link a Folder`]})]}),d.length>0&&(0,c.jsx)(`div`,{className:`management-control-bar`,children:(0,c.jsxs)(`div`,{className:`management-search-wrapper`,children:[(0,c.jsx)(`input`,{type:`text`,className:`management-search-input`,"aria-label":`Search linked folders`,placeholder:`Search linked folders...`,value:oe,onChange:e=>se(e.target.value)}),(0,c.jsxs)(`svg`,{className:`management-search-icon`,width:`16`,height:`16`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,children:[(0,c.jsx)(`circle`,{cx:`11`,cy:`11`,r:`8`}),(0,c.jsx)(`line`,{x1:`21`,y1:`21`,x2:`16.65`,y2:`16.65`})]})]})}),p&&d.length>0&&(0,c.jsx)(`div`,{className:`management-error-banner`,role:`alert`,children:p}),ie?(0,c.jsx)(`div`,{className:`mgmt-empty`,children:`Loading…`}):p&&d.length===0?(0,c.jsxs)(`div`,{className:`linked-load-error`,role:`alert`,children:[(0,c.jsx)(`p`,{children:`Could not load linked folders.`}),(0,c.jsx)(`button`,{type:`button`,className:`management-action-btn`,onClick:()=>void Z(),children:`Try again`})]}):d.length===0?(0,c.jsxs)(`section`,{className:`linked-empty`,"aria-labelledby":`linked-empty-title`,children:[(0,c.jsx)(`div`,{className:`linked-empty-icon`,"aria-hidden":`true`,children:i(30,`var(--accent)`)}),(0,c.jsx)(`h2`,{id:`linked-empty-title`,children:`Give a folder a place in your conversations`}),(0,c.jsx)(`p`,{children:`Link a folder so Mint can use its supported files to find relevant context and save useful notes from your chats.`}),(0,c.jsxs)(`div`,{className:`linked-empty-steps`,"aria-label":`How linked folders work`,children:[(0,c.jsxs)(`div`,{children:[(0,c.jsx)(`strong`,{children:`1 · Choose a folder`}),(0,c.jsx)(`span`,{children:`Mint reads supported files in it and its subfolders.`})]}),(0,c.jsxs)(`div`,{children:[(0,c.jsx)(`strong`,{children:`2 · Chat as usual`}),(0,c.jsx)(`span`,{children:`Mint uses relevant content when a conversation matches.`})]}),(0,c.jsxs)(`div`,{children:[(0,c.jsx)(`strong`,{children:`3 · Find your notes`}),(0,c.jsxs)(`span`,{children:[`Saved notes appear inside that folder’s `,(0,c.jsx)(`code`,{children:`mint-notes/`}),`.`]})]})]}),(0,c.jsx)(`button`,{type:`button`,className:`management-primary-btn`,onClick:ve,children:`Link a Folder`}),(0,c.jsxs)(`p`,{className:`linked-empty-cli`,children:[`You can also run `,(0,c.jsx)(`code`,{children:`mint link add`}),` in your terminal.`]})]}):De.length===0?(0,c.jsx)(`div`,{className:`mgmt-empty`,children:`No linked folders match your search.`}):(0,c.jsx)(`div`,{className:`mgmt-list linked-folder-list`,children:De.map(e=>{let t=fe[e.name],n=pe[e.name]?.find(e=>e.status===`saved`),r=he[e.name]||t?.indexError,i=r?`Needs attention`:t?t.indexedAt?`Ready`:`Reading files…`:`Checking…`;return(0,c.jsxs)(`div`,{className:`mgmt-row linked-folder-row`,children:[(0,c.jsxs)(`div`,{className:`mgmt-row-main`,children:[(0,c.jsxs)(`div`,{className:`linked-folder-heading`,children:[(0,c.jsx)(`span`,{className:`mgmt-row-title`,children:e.name}),(0,c.jsx)(`span`,{className:`mgmt-status ${r?`failed`:t?.indexedAt?`ok`:`running`}`,role:`status`,children:i})]}),(0,c.jsx)(`div`,{className:`mgmt-row-sub`,title:e.path,children:e.path}),e.description&&(0,c.jsx)(`div`,{className:`linked-folder-description`,children:e.description}),(0,c.jsxs)(`div`,{className:`linked-folder-meta`,children:[(0,c.jsx)(`span`,{children:t?`${t.indexedFiles} files indexed`:`Checking files…`}),(0,c.jsx)(`span`,{"aria-hidden":`true`,children:`·`}),(0,c.jsx)(`span`,{children:n?`Last note ${new Date(n.createdAt).toLocaleString()}`:`No notes yet`})]}),n&&(0,c.jsx)(`p`,{className:`linked-folder-note-snippet`,children:n.content.slice(0,180)}),r&&(0,c.jsx)(`p`,{className:`linked-folder-error`,role:`alert`,children:r})]}),(0,c.jsxs)(`div`,{className:`linked-folder-actions`,children:[(0,c.jsx)(`button`,{type:`button`,className:`management-action-btn`,onClick:()=>ye(e),children:`View notes`}),(0,c.jsx)(`button`,{type:`button`,className:`management-action-btn`,disabled:q===e.name,onClick:()=>void Te(e.name),children:q===e.name?`Refreshing…`:`Refresh`})]})]},e.name)})}),j&&(0,c.jsx)(`div`,{className:`management-modal-overlay`,onClick:$,children:(0,c.jsxs)(`div`,{ref:A,className:`management-modal linked-detail-modal`,role:`dialog`,"aria-modal":`true`,"aria-labelledby":`linked-detail-title`,onClick:e=>e.stopPropagation(),children:[(0,c.jsxs)(`div`,{className:`management-modal-header`,children:[(0,c.jsxs)(`div`,{className:`management-card-title-group`,children:[ee(44),(0,c.jsx)(`h2`,{id:`linked-detail-title`,className:`management-modal-title`,children:j.name})]}),(0,c.jsx)(`button`,{type:`button`,className:`management-modal-close`,ref:k,"aria-label":`Close folder details`,onClick:$,children:`✕`})]}),(0,c.jsxs)(`div`,{className:`management-modal-body`,children:[(0,c.jsx)(`p`,{style:{color:`var(--text-soft, #d1d1d4)`,lineHeight:1.55,margin:0},children:j.description||`No description`}),(0,c.jsxs)(`div`,{className:`mgmt-detail-grid`,children:[(0,c.jsx)(`span`,{children:`Path`}),(0,c.jsx)(`code`,{children:j.path}),(0,c.jsx)(`span`,{children:`Notes`}),(0,c.jsxs)(`code`,{children:[j.path.replace(/\/$/,``),`/mint-notes/`]}),(0,c.jsx)(`span`,{children:`Indexed files`}),(0,c.jsx)(`span`,{children:N?N.indexedFiles:`Indexing…`}),(0,c.jsx)(`span`,{children:`Last indexed`}),(0,c.jsx)(`span`,{children:N?.indexedAt?new Date(N.indexedAt).toLocaleString():`Pending`}),(0,c.jsx)(`span`,{children:`Background notes (all folders)`}),(0,c.jsx)(`span`,{children:N?`${N.pendingJobs} pending · ${N.failedJobs} failed`:`Loading…`})]}),N?.indexError&&(0,c.jsx)(`p`,{role:`status`,className:`management-error-banner`,children:N.indexError}),N?.lastJobError&&(0,c.jsxs)(`p`,{role:`status`,className:`management-error-banner`,children:[`Last note error: `,N.lastJobError]}),U&&(0,c.jsx)(`p`,{role:`alert`,className:`management-error-banner`,children:U}),(0,c.jsx)(`button`,{type:`button`,className:`management-action-btn`,onClick:be,disabled:G,children:G?`Refreshing…`:`Refresh file index`}),(0,c.jsx)(`h3`,{children:`Recent notes`}),F.length===0?(0,c.jsx)(`p`,{children:`No notes saved yet.`}):(0,c.jsx)(`div`,{className:`mgmt-list`,children:F.map(e=>(0,c.jsx)(`div`,{className:`mgmt-row linked-note-row`,children:(0,c.jsxs)(`div`,{className:`mgmt-row-main`,children:[(0,c.jsxs)(`div`,{className:`mgmt-row-title`,children:[new Date(e.createdAt).toLocaleString(),` · `,e.status]}),(0,c.jsx)(`div`,{className:`mgmt-row-sub`,children:e.content.slice(0,160)}),e.error&&(0,c.jsx)(`p`,{role:`status`,children:e.error}),(0,c.jsx)(`button`,{type:`button`,className:`management-action-btn`,disabled:e.status!==`saved`,"aria-expanded":z===e.id,onClick:()=>void xe(e),children:z===e.id?`Hide note`:`View note`}),ne&&(0,c.jsx)(`button`,{type:`button`,className:`management-action-btn`,disabled:e.status!==`saved`,onClick:()=>void te(e.folder,e.id).catch(e=>W(String(e))),children:`Open file`}),(0,c.jsx)(`button`,{type:`button`,className:`management-action-btn`,onClick:()=>void Se(e.path),children:`Copy path`}),z===e.id&&(0,c.jsx)(`div`,{className:`linked-note-preview`,role:`region`,"aria-label":`Note file for ${new Date(e.createdAt).toLocaleString()}`,children:de?(0,c.jsx)(`p`,{children:`Loading note…`}):L?(0,c.jsx)(`pre`,{children:L}):(0,c.jsx)(`p`,{children:`Could not show this note.`})})]})},e.id))})]}),(0,c.jsxs)(`div`,{className:`management-modal-footer`,children:[(0,c.jsx)(`span`,{}),(0,c.jsx)(`button`,{type:`button`,className:`management-action-btn danger`,onClick:()=>Ee(j.name),children:`Unlink`})]})]})}),S&&(0,c.jsx)(`div`,{className:`management-modal-overlay`,children:(0,c.jsxs)(`div`,{ref:D,className:`management-modal linked-add-modal`,role:`dialog`,"aria-modal":`true`,"aria-labelledby":`linked-add-title`,children:[(0,c.jsxs)(`div`,{className:`management-modal-header`,children:[(0,c.jsx)(`h2`,{id:`linked-add-title`,className:`management-modal-title`,children:`Link a Folder`}),(0,c.jsx)(`button`,{type:`button`,className:`management-modal-close`,"aria-label":`Close`,disabled:b,onClick:Q,children:`✕`})]}),(0,c.jsxs)(`form`,{onSubmit:Ce,noValidate:!0,children:[(0,c.jsxs)(`div`,{className:`management-modal-body`,children:[(0,c.jsxs)(`div`,{className:`management-form-group`,children:[(0,c.jsx)(`label`,{className:`management-label`,htmlFor:`linked-folder-name`,children:`Name`}),(0,c.jsx)(`input`,{ref:le,id:`linked-folder-name`,type:`text`,className:`management-input-field`,placeholder:`e.g. Food`,value:m,"aria-invalid":!!w.name,"aria-describedby":w.name?`linked-name-error`:void 0,onChange:e=>{h(e.target.value),E(!1),T(e=>({...e,name:void 0,form:void 0}))},required:!0}),w.name&&(0,c.jsx)(`span`,{id:`linked-name-error`,className:`linked-field-error`,role:`alert`,children:w.name})]}),(0,c.jsxs)(`div`,{className:`management-form-group`,children:[(0,c.jsx)(`label`,{className:`management-label`,htmlFor:`linked-folder-path`,children:`Folder path`}),(0,c.jsxs)(`div`,{className:`linked-path-row`,children:[(0,c.jsx)(`input`,{id:`linked-folder-path`,type:`text`,className:`management-input-field`,placeholder:`~/notes/food`,value:g,"aria-invalid":!!w.path,"aria-describedby":w.path?`linked-path-error`:void 0,onChange:e=>{_(e.target.value),T(e=>({...e,path:void 0,form:void 0}))},required:!0}),u&&(0,c.jsx)(`button`,{type:`button`,className:`management-action-btn`,onClick:we,children:`Browse...`})]}),w.path&&(0,c.jsx)(`span`,{id:`linked-path-error`,className:`linked-field-error`,role:`alert`,children:w.path})]}),(0,c.jsxs)(`div`,{className:`management-form-group`,children:[(0,c.jsxs)(`label`,{className:`management-label`,htmlFor:`linked-folder-description`,children:[`What should Mint remember here? `,(0,c.jsx)(`span`,{className:`linked-optional`,children:`Optional`})]}),(0,c.jsx)(`textarea`,{id:`linked-folder-description`,className:`management-textarea-field`,placeholder:`e.g. Restaurant reviews, recipes, and places I want to try`,value:v,onChange:e=>y(e.target.value),rows:3}),(0,c.jsx)(`p`,{className:`linked-field-hint`,children:`Describe the topics that belong in this folder. Mint uses this when deciding where a chat note belongs.`})]}),(0,c.jsxs)(`p`,{className:`linked-scope-note`,children:[`Mint reads supported files in this folder and its subfolders (such as Markdown, PDF, Word, spreadsheets and code), then saves useful chat notes in `,(0,c.jsx)(`code`,{children:`mint-notes/`}),` inside the folder.`]}),w.form&&(0,c.jsx)(`p`,{className:`management-error-banner`,role:`alert`,children:w.form})]}),(0,c.jsxs)(`div`,{className:`management-modal-footer`,children:[(0,c.jsx)(`button`,{type:`button`,className:`management-action-btn`,disabled:b,onClick:Q,children:`Cancel`}),(0,c.jsx)(`button`,{type:`submit`,disabled:b,className:`management-primary-btn`,children:b?`Linking...`:`Link Folder`})]})]})]})})]})})}))();export{l as LinkedFoldersView,l as default};
@@ -1 +0,0 @@
1
- import{i as e,n as t}from"./chunk-CacB07dV.js";import{k as n,y as r}from"./index-D8D9MeRA.js";import{E as i,M as a,O as o}from"./config-eEDngJXO.js";function s(e,t){let n=e?.allowedMcpTools?.[t];return Array.isArray(n)?n.filter(e=>typeof e==`string`):[]}var c,l,u,d=t((()=>{c=e(n()),i(),l=r(),u=({serverName:e,config:t,updateField:n,listServerTools:r})=>{let i=s(t,e),a=i.includes(`*`),[o,u]=(0,c.useState)(``),[d,f]=(0,c.useState)(null),[p,m]=(0,c.useState)(!1),[h,g]=(0,c.useState)(null),_=r=>{let i={...t?.allowedMcpTools||{}};r.length===0?delete i[e]:i[e]=r,n(`allowedMcpTools`,i)},v=e=>{let t=e.trim();if(t){if(t===`*`)return _([`*`]);a||i.includes(t)||_([...i,t])}},y=e=>_(i.filter(t=>t!==e));return(0,l.jsxs)(`div`,{style:{marginTop:16},children:[(0,l.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,marginBottom:8},children:[(0,l.jsx)(`span`,{className:`management-label`,style:{margin:0},children:`Allowed tools`}),(0,l.jsxs)(`label`,{style:{display:`flex`,alignItems:`center`,gap:6,marginLeft:`auto`,fontSize:`0.85rem`,cursor:`pointer`,userSelect:`none`},children:[(0,l.jsx)(`input`,{type:`checkbox`,className:`mint-custom-checkbox`,checked:a,onChange:()=>_(a?[]:[`*`])}),`Allow all (*)`]})]}),a?(0,l.jsxs)(`p`,{className:`management-plugin-desc`,style:{whiteSpace:`normal`,margin:`4px 0`},children:[`The agent may call every tool on `,(0,l.jsx)(`code`,{children:e}),`.`]}):i.length===0?(0,l.jsx)(`p`,{className:`management-plugin-desc`,style:{whiteSpace:`normal`,margin:`4px 0`},children:`No tools allowed yet — the agent can’t call this server.`}):(0,l.jsx)(`div`,{style:{display:`flex`,flexWrap:`wrap`,gap:6,marginBottom:8},children:i.map(e=>(0,l.jsxs)(`span`,{className:`management-tag`,style:{display:`inline-flex`,alignItems:`center`,gap:4},children:[e,(0,l.jsx)(`button`,{type:`button`,onClick:()=>y(e),"aria-label":`Disallow ${e}`,style:{background:`none`,border:`none`,cursor:`pointer`,color:`inherit`,opacity:.7,padding:0,lineHeight:1},children:`✕`})]},e))}),!a&&(0,l.jsxs)(`div`,{style:{display:`flex`,gap:8,marginBottom:8,flexWrap:`wrap`},children:[(0,l.jsx)(`input`,{type:`text`,className:`management-input-field`,placeholder:`tool name`,value:o,onChange:e=>u(e.target.value),onKeyDown:e=>{e.key===`Enter`&&(e.preventDefault(),v(o),u(``))},style:{flex:`1 1 160px`,minWidth:140}}),(0,l.jsx)(`button`,{type:`button`,className:`management-action-btn`,onClick:()=>{v(o),u(``)},children:`Add`}),r&&(0,l.jsx)(`button`,{type:`button`,className:`management-action-btn`,onClick:async()=>{if(r){m(!0),g(null);try{f(await r(e))}catch(e){g(e?.message||`Could not reach the server`)}finally{m(!1)}}},disabled:p,children:p?`Discovering…`:`Discover tools`})]}),h&&(0,l.jsx)(`p`,{className:`management-plugin-desc`,style:{whiteSpace:`normal`,color:`#f87171`,margin:`4px 0`},children:h}),!a&&d&&(0,l.jsxs)(`div`,{style:{display:`flex`,flexWrap:`wrap`,gap:6},children:[d.length===0&&(0,l.jsx)(`span`,{className:`management-plugin-desc`,children:`Server reported no tools.`}),d.map(e=>{let t=i.includes(e);return(0,l.jsxs)(`button`,{type:`button`,className:`management-action-btn`,onClick:()=>t?y(e):v(e),style:{opacity:t?1:.65},children:[t?`✓ `:`+ `,e]},e)})]})]})}})),f,p=t((()=>{f=[{key:`filesystem`,name:`Filesystem`,desc:`Read and write files under a chosen directory.`,icon:`📁`,command:`npx`,args:[`-y`,`@modelcontextprotocol/server-filesystem`],argInputs:[{label:`Directory`,placeholder:`/home/me/project`}],docs:`https://github.com/modelcontextprotocol/servers/tree/main/src/filesystem`},{key:`memory`,name:`Memory`,desc:`A local knowledge-graph the agent can store and recall facts in.`,icon:`🧠`,command:`npx`,args:[`-y`,`@modelcontextprotocol/server-memory`],docs:`https://github.com/modelcontextprotocol/servers/tree/main/src/memory`},{key:`sequential-thinking`,name:`Sequential Thinking`,desc:`A scratchpad tool for step-by-step reasoning on hard problems.`,icon:`🪜`,command:`npx`,args:[`-y`,`@modelcontextprotocol/server-sequential-thinking`],docs:`https://github.com/modelcontextprotocol/servers/tree/main/src/sequentialthinking`},{key:`everything`,name:`Everything (demo)`,desc:`The reference server — exercises every MCP feature. Good for testing.`,icon:`🧪`,command:`npx`,args:[`-y`,`@modelcontextprotocol/server-everything`],docs:`https://github.com/modelcontextprotocol/servers/tree/main/src/everything`},{key:`fetch`,name:`Fetch`,desc:`Fetch a URL and return its content as Markdown.`,icon:`🌐`,command:`uvx`,args:[`mcp-server-fetch`],docs:`https://github.com/modelcontextprotocol/servers/tree/main/src/fetch`},{key:`git`,name:`Git`,desc:`Inspect and operate on a local git repository.`,icon:`🌿`,command:`uvx`,args:[`mcp-server-git`,`--repository`],argInputs:[{label:`Repository path`,placeholder:`/home/me/project`}],docs:`https://github.com/modelcontextprotocol/servers/tree/main/src/git`},{key:`time`,name:`Time`,desc:`Current time and timezone conversions.`,icon:`🕐`,command:`uvx`,args:[`mcp-server-time`],docs:`https://github.com/modelcontextprotocol/servers/tree/main/src/time`},{key:`sqlite`,name:`SQLite`,desc:`Query and explore a local SQLite database.`,icon:`🗄️`,command:`uvx`,args:[`mcp-server-sqlite`,`--db-path`],argInputs:[{label:`Database file`,placeholder:`/home/me/data.db`}],docs:`https://github.com/modelcontextprotocol/servers/tree/main/src/sqlite`},{key:`github`,name:`GitHub`,desc:`Repositories, issues, pull requests, and code search.`,icon:`🐙`,command:`npx`,args:[`-y`,`@modelcontextprotocol/server-github`],requiredEnv:[{key:`GITHUB_PERSONAL_ACCESS_TOKEN`,label:`GitHub personal access token`,help:`https://github.com/settings/tokens`}],docs:`https://github.com/modelcontextprotocol/servers/tree/main/src/github`},{key:`gitlab`,name:`GitLab`,desc:`Projects, issues, and merge requests.`,icon:`🦊`,command:`npx`,args:[`-y`,`@modelcontextprotocol/server-gitlab`],requiredEnv:[{key:`GITLAB_PERSONAL_ACCESS_TOKEN`,label:`GitLab personal access token`,help:`https://gitlab.com/-/user_settings/personal_access_tokens`}],docs:`https://github.com/modelcontextprotocol/servers/tree/main/src/gitlab`},{key:`slack`,name:`Slack`,desc:`Read channels and post messages in a Slack workspace.`,icon:`💬`,command:`npx`,args:[`-y`,`@modelcontextprotocol/server-slack`],requiredEnv:[{key:`SLACK_BOT_TOKEN`,label:`Slack bot token (xoxb-…)`,help:`https://api.slack.com/apps`},{key:`SLACK_TEAM_ID`,label:`Slack team ID (T…)`}],docs:`https://github.com/modelcontextprotocol/servers/tree/main/src/slack`},{key:`brave-search`,name:`Brave Search`,desc:`Web and local search via the Brave Search API.`,icon:`🔍`,command:`npx`,args:[`-y`,`@modelcontextprotocol/server-brave-search`],requiredEnv:[{key:`BRAVE_API_KEY`,label:`Brave Search API key`,help:`https://brave.com/search/api/`}],docs:`https://github.com/modelcontextprotocol/servers/tree/main/src/brave-search`},{key:`postgres`,name:`PostgreSQL`,desc:`Read-only SQL queries against a Postgres database.`,icon:`🐘`,command:`npx`,args:[`-y`,`@modelcontextprotocol/server-postgres`],argInputs:[{label:`Connection string`,placeholder:`postgresql://user:pass@localhost:5432/db`}],docs:`https://github.com/modelcontextprotocol/servers/tree/main/src/postgres`},{key:`puppeteer`,name:`Puppeteer`,desc:`Drive a headless Chrome — navigate, click, screenshot, scrape.`,icon:`🎭`,command:`npx`,args:[`-y`,`@modelcontextprotocol/server-puppeteer`],docs:`https://github.com/modelcontextprotocol/servers/tree/main/src/puppeteer`}]})),m,h=t((()=>{p(),m=f})),g,_,v,y=t((()=>{g=e(n()),i(),h(),o(),_=r(),v=({configuredNames:e,onPick:t,showManualHint:n=!0,defaultViewMode:r})=>{let[i,o]=(0,g.useState)(``),[s,c]=(0,g.useState)(null),[l,u]=(0,g.useState)([]),[d,f]=(0,g.useState)(()=>{if(r)return r;try{let e=localStorage.getItem(`mint:mcp-catalog-view`);if(e===`list`||e===`grid`)return e}catch{}return`grid`}),p=e=>{f(e);try{localStorage.setItem(`mint:mcp-catalog-view`,e)}catch{}},h=new Set(e),v=m.filter(e=>e.name.toLowerCase().includes(i.toLowerCase())||e.key.toLowerCase().includes(i.toLowerCase())||(e.desc||``).toLowerCase().includes(i.toLowerCase())),y=m.find(e=>e.key===s)||null,b=e=>{c(e.key),u((e.argInputs||[]).map(()=>``))},x=()=>{if(!y)return;let e={};for(let t of y.requiredEnv||[])e[t.key]=``;t(y,l,e),c(null),u([]),o(``)},S=!y||(y.argInputs||[]).every((e,t)=>l[t]?.trim());return(0,_.jsxs)(`div`,{children:[(0,_.jsxs)(`div`,{className:`management-control-bar`,style:{marginBottom:14},children:[(0,_.jsxs)(`div`,{className:`management-search-wrapper`,children:[(0,_.jsx)(`input`,{type:`text`,className:`management-search-input`,placeholder:`Search servers...`,value:i,onChange:e=>o(e.target.value)}),(0,_.jsxs)(`svg`,{className:`management-search-icon`,width:`16`,height:`16`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,children:[(0,_.jsx)(`circle`,{cx:`11`,cy:`11`,r:`8`}),(0,_.jsx)(`line`,{x1:`21`,y1:`21`,x2:`16.65`,y2:`16.65`})]})]}),(0,_.jsxs)(`div`,{className:`management-filter-pills`,style:{display:`inline-flex`,gap:2,padding:3,flexShrink:0},children:[(0,_.jsxs)(`button`,{type:`button`,className:`management-pill-btn ${d===`grid`?`active`:``}`,onClick:()=>p(`grid`),title:`Grid view (แนวนอน)`,style:{padding:`6px 10px`,display:`inline-flex`,alignItems:`center`,gap:6},children:[(0,_.jsxs)(`svg`,{width:`14`,height:`14`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,children:[(0,_.jsx)(`rect`,{x:`3`,y:`3`,width:`7`,height:`7`,rx:`1`}),(0,_.jsx)(`rect`,{x:`14`,y:`3`,width:`7`,height:`7`,rx:`1`}),(0,_.jsx)(`rect`,{x:`14`,y:`14`,width:`7`,height:`7`,rx:`1`}),(0,_.jsx)(`rect`,{x:`3`,y:`14`,width:`7`,height:`7`,rx:`1`})]}),(0,_.jsx)(`span`,{style:{fontSize:`0.78rem`},children:`Grid`})]}),(0,_.jsxs)(`button`,{type:`button`,className:`management-pill-btn ${d===`list`?`active`:``}`,onClick:()=>p(`list`),title:`List view (แนวตั้ง)`,style:{padding:`6px 10px`,display:`inline-flex`,alignItems:`center`,gap:6},children:[(0,_.jsxs)(`svg`,{width:`14`,height:`14`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,children:[(0,_.jsx)(`line`,{x1:`8`,y1:`6`,x2:`21`,y2:`6`}),(0,_.jsx)(`line`,{x1:`8`,y1:`12`,x2:`21`,y2:`12`}),(0,_.jsx)(`line`,{x1:`8`,y1:`18`,x2:`21`,y2:`18`}),(0,_.jsx)(`line`,{x1:`3`,y1:`6`,x2:`3.01`,y2:`6`,strokeWidth:`3`}),(0,_.jsx)(`line`,{x1:`3`,y1:`12`,x2:`3.01`,y2:`12`,strokeWidth:`3`}),(0,_.jsx)(`line`,{x1:`3`,y1:`18`,x2:`3.01`,y2:`18`,strokeWidth:`3`})]}),(0,_.jsx)(`span`,{style:{fontSize:`0.78rem`},children:`List`})]})]})]}),(0,_.jsxs)(`div`,{className:d===`grid`?`mcp-catalog-grid`:`mgmt-row-stack`,style:{maxHeight:380,overflowY:`auto`},children:[v.map(e=>{let t=h.has(e.key),n=s===e.key;return d===`grid`?(0,_.jsxs)(`button`,{type:`button`,disabled:t,onClick:()=>b(e),className:`mcp-catalog-card ${n?`selected`:``}`,style:{opacity:t?.55:1,cursor:t?`default`:`pointer`,borderColor:n?`var(--accent, #10b981)`:void 0},children:[(0,_.jsxs)(`div`,{className:`mcp-catalog-card-header`,children:[(0,_.jsx)(`div`,{className:`management-card-icon`,style:{width:34,height:34,fontSize:`1.1rem`},children:a(e.key,e.icon)}),(0,_.jsxs)(`div`,{className:`mcp-catalog-card-title`,children:[(0,_.jsx)(`span`,{className:`name-text`,children:e.name}),t&&(0,_.jsx)(`span`,{className:`management-tag`,children:`Added`}),(e.requiredEnv?.length??0)>0&&!t&&(0,_.jsx)(`span`,{className:`management-tag`,style:{fontSize:`0.65rem`},children:`needs key`})]})]}),(0,_.jsx)(`div`,{className:`mcp-catalog-card-desc`,children:e.desc})]},e.key):(0,_.jsxs)(`button`,{type:`button`,disabled:t,onClick:()=>b(e),className:`management-plugin-row`,style:{width:`100%`,textAlign:`left`,opacity:t?.55:1,cursor:t?`default`:`pointer`,borderColor:n?`var(--accent, #10b981)`:void 0},children:[(0,_.jsx)(`div`,{className:`management-card-icon`,children:a(e.key,e.icon)}),(0,_.jsxs)(`div`,{className:`management-plugin-info`,children:[(0,_.jsxs)(`div`,{className:`management-plugin-name`,children:[e.name,t&&(0,_.jsx)(`span`,{className:`management-tag`,children:`Added`}),(e.requiredEnv?.length??0)>0&&!t&&(0,_.jsx)(`span`,{className:`management-tag`,children:`needs API key`})]}),(0,_.jsx)(`div`,{className:`management-plugin-desc`,children:e.desc})]})]},e.key)}),v.length===0&&(0,_.jsx)(`div`,{className:`mgmt-empty`,style:{gridColumn:`1 / -1`,padding:`32px 16px`},children:(0,_.jsx)(`p`,{children:`No matching MCP servers found.`})})]}),y&&(0,_.jsxs)(`div`,{style:{marginTop:12,padding:`14px 16px`,border:`1px solid var(--border, rgba(255, 255, 255, 0.08))`,borderRadius:`var(--radius-xl, 14px)`,background:`var(--surface-bg, rgba(30, 41, 59, 0.45))`},children:[(0,_.jsxs)(`div`,{className:`management-card-title-group`,style:{marginBottom:10},children:[(0,_.jsx)(`div`,{className:`management-card-icon`,children:a(y.key,y.icon)}),(0,_.jsxs)(`h3`,{className:`management-card-title`,style:{fontSize:`1rem`},children:[y.name,y.docs&&(0,_.jsx)(`a`,{href:y.docs,target:`_blank`,rel:`noreferrer`,style:{marginLeft:8,fontSize:`0.8rem`,fontWeight:400},children:`docs ↗`})]})]}),(y.argInputs||[]).map((e,t)=>(0,_.jsxs)(`div`,{className:`management-form-group`,children:[(0,_.jsx)(`label`,{className:`management-label`,children:e.label}),(0,_.jsx)(`input`,{type:`text`,className:`management-input-field`,placeholder:e.placeholder||``,value:l[t]||``,onChange:e=>{let n=[...l];n[t]=e.target.value,u(n)}})]},e.label)),(y.requiredEnv||[]).length>0&&(0,_.jsxs)(`p`,{className:`management-plugin-desc`,style:{whiteSpace:`normal`,marginTop:4},children:[`You’ll fill in`,` `,(y.requiredEnv||[]).map((e,t)=>(0,_.jsxs)(g.Fragment,{children:[t>0&&`, `,(0,_.jsx)(`code`,{children:e.key}),e.help&&(0,_.jsx)(`a`,{href:e.help,target:`_blank`,rel:`noreferrer`,style:{marginLeft:4},children:`get key ↗`})]},e.key)),` `,`below.`]}),(0,_.jsxs)(`div`,{style:{display:`flex`,gap:8,marginTop:10},children:[(0,_.jsx)(`button`,{type:`button`,className:`management-primary-btn`,onClick:x,disabled:!S,children:`Use this server`}),(0,_.jsx)(`button`,{type:`button`,className:`management-action-btn`,onClick:()=>c(null),children:`Cancel`})]})]}),n&&(0,_.jsx)(`div`,{className:`management-section-title`,style:{margin:`16px 0 4px`,textAlign:`center`,opacity:.5,fontWeight:400},children:`— or add manually —`})]})}}));export{d as i,y as n,u as r,v as t};
@@ -1 +0,0 @@
1
- import{i as e,n as t}from"./chunk-CacB07dV.js";import{k as n,w as r,x as i,y as a}from"./index-D8D9MeRA.js";import{E as o,M as s,O as c,j as l}from"./config-eEDngJXO.js";import{i as u,n as d,r as f,t as ee}from"./McpRegistryPicker-D5tEFnyq.js";import{M as te,S as ne,bt as p,cn as re,mn as ie,n as ae,nt as m,t as h}from"./lucide-react-Ip3L6Jtn.js";var g,_,v,y;t((()=>{g=e(n()),o(),c(),u(),d(),r(),h(),_=a(),{testMcpConnection:v}=i,y=g.memo(function({config:e,updateField:t,mcpName:n,setMcpName:r,mcpCmd:i,setMcpCmd:a,mcpArgs:o,setMcpArgs:c,mcpEnv:u,setMcpEnv:d,mcpIcon:h=``,setMcpIcon:y,handleAddMcpServer:oe,handleRemoveMcpServer:b,detectTools:x,onReauth:S,listServerTools:se}){let[C,ce]=(0,g.useState)({docker:!1,git:!1,gh:!1,node:!1}),[w,T]=(0,g.useState)(null),[le,E]=(0,g.useState)(!1),[ue,D]=(0,g.useState)(!1),[O,k]=(0,g.useState)(!1),[A,j]=(0,g.useState)(``),[M,N]=(0,g.useState)({}),[P,F]=(0,g.useState)(`url`),[I,L]=(0,g.useState)(``),[R,de]=(0,g.useState)(`none`),[z,B]=(0,g.useState)(``),[V,H]=(0,g.useState)(``),[U,W]=(0,g.useState)(`idle`),[G,K]=(0,g.useState)(``),[q,J]=(0,g.useState)(!1);(0,g.useEffect)(()=>{x&&x().then(e=>e&&ce(e)).catch(()=>{})},[x]);let Y=(n,r,i,a)=>{let o={...e.mcpServers||{}};o[n]?o[n]={...o[n],disabled:!r}:r&&i&&(o[n]={command:i,args:a||[],env:{},disabled:!1}),t(`mcpServers`,o)},X=(n,r,i)=>{let a={...e.mcpServers||{}};a[n]&&(a[n]={...a[n],[r]:i},t(`mcpServers`,a))},Z=[];Object.entries(e.mcpServers||{}).forEach(([e,t])=>{let n=`plug`;e===`docker`&&(n=`docker`),(e===`git`||e===`github`)&&(n=`git`),t.url&&(n=`globe`);let r=!!t.url,i=r?`URL: ${t.url}`:`Command: ${t.command} ${(t.args||[]).join(` `)}`;Z.push({name:e,command:t.command||``,args:t.args||[],icon:n,customIcon:t.icon,isEnabled:t?.disabled!==!0,isConfigured:!0,isRemote:r,url:t.url,description:i})}),C.docker&&!e.mcpServers?.docker&&Z.push({name:`docker`,command:`npx`,args:[`-y`,`@proxeus/mcp-docker-server`],icon:`🐳`,isEnabled:!1,isConfigured:!1,isRemote:!1,description:`Docker MCP Server (Auto Discovered)`}),C.git&&!e.mcpServers?.git&&Z.push({name:`git`,command:`npx`,args:[`-y`,`@modelcontextprotocol/server-git`],icon:`🐙`,isEnabled:!1,isConfigured:!1,isRemote:!1,description:`Git MCP Server (Auto Discovered)`});let Q=Z.filter(e=>e.name.toLowerCase().includes(A.toLowerCase())||e.command.toLowerCase().includes(A.toLowerCase())||(e.url||``).toLowerCase().includes(A.toLowerCase())||(e.description||``).toLowerCase().includes(A.toLowerCase())),$=Z.filter(e=>e.isEnabled),fe=async e=>{if(S){N(t=>({...t,[e]:`running`}));try{let t=await S(e);N(n=>({...n,[e]:t?`success`:`error`}))}catch{N(t=>({...t,[e]:`error`}))}finally{setTimeout(()=>{N(t=>({...t,[e]:`idle`}))},2500)}}};return(0,_.jsxs)(`div`,{className:`management-container`,children:[(0,_.jsxs)(`div`,{className:`management-header`,children:[(0,_.jsxs)(`div`,{className:`management-title-group`,children:[(0,_.jsxs)(`h1`,{className:`management-title`,children:[(0,_.jsx)(`span`,{className:`management-title-icon`,style:{display:`inline-flex`,alignItems:`center`},children:l(22,`var(--accent)`)}),`MCP servers`]}),(0,_.jsx)(`p`,{className:`management-subtitle`,children:`Connect external tool servers.`})]}),(0,_.jsxs)(`div`,{style:{display:`flex`,gap:8},children:[(0,_.jsxs)(`button`,{type:`button`,className:`management-action-btn`,onClick:()=>D(!0),children:[(0,_.jsxs)(`svg`,{width:`16`,height:`16`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2.5`,children:[(0,_.jsx)(`line`,{x1:`12`,y1:`5`,x2:`12`,y2:`19`}),(0,_.jsx)(`line`,{x1:`5`,y1:`12`,x2:`19`,y2:`12`})]}),`MCP catalog`]}),(0,_.jsxs)(`button`,{type:`button`,className:`management-primary-btn`,onClick:()=>E(!0),children:[(0,_.jsxs)(`svg`,{width:`16`,height:`16`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2.5`,children:[(0,_.jsx)(`line`,{x1:`12`,y1:`5`,x2:`12`,y2:`19`}),(0,_.jsx)(`line`,{x1:`5`,y1:`12`,x2:`19`,y2:`12`})]}),`Add MCP Server`]})]})]}),(0,_.jsx)(`div`,{className:`management-control-bar`,children:(0,_.jsxs)(`div`,{className:`management-search-wrapper`,style:{maxWidth:`400px`},children:[(0,_.jsx)(`input`,{type:`text`,className:`management-search-input`,placeholder:`Search MCP servers...`,value:A,onChange:e=>j(e.target.value)}),(0,_.jsxs)(`svg`,{className:`management-search-icon`,width:`16`,height:`16`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,children:[(0,_.jsx)(`circle`,{cx:`11`,cy:`11`,r:`8`}),(0,_.jsx)(`line`,{x1:`21`,y1:`21`,x2:`16.65`,y2:`16.65`})]})]})}),$.length>0&&(0,_.jsxs)(`div`,{className:`management-installed-section`,children:[(0,_.jsx)(`h2`,{className:`management-section-title`,children:`Installed`}),(0,_.jsx)(`div`,{className:`management-installed-row`,children:$.map(e=>(0,_.jsx)(`button`,{type:`button`,className:`management-plugin-avatar`,title:e.name,onClick:()=>T(e.name),children:s(e.name,e.customIcon)},e.name))})]}),(0,_.jsx)(`h2`,{className:`management-section-title`,children:`All servers`}),Q.length===0?(0,_.jsxs)(`div`,{className:`mgmt-empty`,children:[(0,_.jsx)(`p`,{children:A?`No MCP servers match your search.`:`No MCP servers yet.`}),!A&&(0,_.jsxs)(`p`,{children:[`Add one above, or run `,(0,_.jsx)(`code`,{children:`mint mcp add`}),` in a terminal.`]})]}):(0,_.jsx)(`div`,{className:`mgmt-row-stack`,children:Q.map(e=>(0,_.jsxs)(`div`,{className:`management-plugin-row`,onClick:()=>T(e.name),children:[(0,_.jsx)(`div`,{className:`management-card-icon`,style:{background:`rgba(255, 255, 255, 0.06)`,borderColor:`rgba(255, 255, 255, 0.08)`},children:s(e.name,e.customIcon)}),(0,_.jsxs)(`div`,{className:`management-plugin-info`,children:[(0,_.jsxs)(`div`,{className:`management-plugin-name`,children:[e.name,e.isRemote&&(0,_.jsxs)(`span`,{className:`management-badge remote`,style:{fontSize:`0.72rem`,padding:`2px 7px`,display:`inline-flex`,alignItems:`center`,gap:`4px`},children:[(0,_.jsx)(p,{size:11}),` Remote`]}),(0,_.jsx)(`span`,{className:`management-dot ${e.isEnabled?`connected`:``}`,title:e.isEnabled?`Active`:`Inactive`})]}),(0,_.jsx)(`div`,{className:`management-plugin-desc`,style:{fontFamily:`monospace`},children:e.description})]}),e.isEnabled?(0,_.jsx)(`button`,{type:`button`,className:`management-plugin-icon-btn`,title:`View details`,onClick:t=>{t.stopPropagation(),T(e.name)},children:(0,_.jsxs)(`svg`,{width:`16`,height:`16`,viewBox:`0 0 24 24`,fill:`currentColor`,children:[(0,_.jsx)(`circle`,{cx:`5`,cy:`12`,r:`2`}),(0,_.jsx)(`circle`,{cx:`12`,cy:`12`,r:`2`}),(0,_.jsx)(`circle`,{cx:`19`,cy:`12`,r:`2`})]})}):(0,_.jsx)(`button`,{type:`button`,className:`management-plugin-icon-btn`,title:`Enable`,onClick:t=>{t.stopPropagation(),Y(e.name,!0,e.command,e.args),T(e.name)},children:(0,_.jsxs)(`svg`,{width:`16`,height:`16`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2.5`,strokeLinecap:`round`,children:[(0,_.jsx)(`line`,{x1:`12`,y1:`5`,x2:`12`,y2:`19`}),(0,_.jsx)(`line`,{x1:`5`,y1:`12`,x2:`19`,y2:`12`})]})})]},e.name))}),w&&(()=>{let n=Z.find(e=>e.name===w);if(!n)return null;let r=e.mcpServers?.[n.name]||{command:n.command,args:n.args,env:{},icon:n.customIcon};return(0,_.jsx)(`div`,{className:`management-modal-overlay`,onClick:()=>T(null),children:(0,_.jsxs)(`div`,{className:`management-modal`,onClick:e=>e.stopPropagation(),children:[(0,_.jsxs)(`div`,{className:`management-modal-header`,children:[(0,_.jsxs)(`div`,{className:`management-card-title-group`,children:[(0,_.jsx)(`div`,{className:`management-card-icon`,style:{width:44,height:44,background:`rgba(255, 255, 255, 0.06)`,borderColor:`rgba(255, 255, 255, 0.08)`},children:s(n.name,n.customIcon)}),(0,_.jsx)(`h2`,{className:`management-modal-title`,children:n.name})]}),(0,_.jsx)(`button`,{type:`button`,className:`management-modal-close`,onClick:()=>T(null),children:`✕`})]}),(0,_.jsxs)(`div`,{className:`management-modal-body`,children:[(0,_.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:`12px`,flexWrap:`wrap`},children:[(0,_.jsxs)(`label`,{className:`settings-toggle-switch`,title:n.isEnabled?`Disable server`:`Enable server`,children:[(0,_.jsx)(`input`,{type:`checkbox`,checked:n.isEnabled,onChange:e=>Y(n.name,e.target.checked,n.command,n.args)}),(0,_.jsx)(`span`,{className:`settings-toggle-slider`})]}),(0,_.jsx)(`span`,{style:{fontSize:`0.85rem`,color:`var(--text-muted, #94a3b8)`},children:n.isEnabled?`Enabled`:`Disabled`}),!n.isConfigured&&(0,_.jsx)(`span`,{className:`management-tag workspace`,style:{marginLeft:`auto`},children:`Discovered`})]}),n.isConfigured&&(0,_.jsxs)(`div`,{style:{marginTop:`20px`,paddingTop:`16px`,borderTop:`1px solid var(--border, rgba(255, 255, 255, 0.08))`},children:[(0,_.jsx)(`h4`,{style:{fontSize:`0.8rem`,fontWeight:600,color:`var(--interactive-fg)`,textTransform:`none`,letterSpacing:`0.5px`,margin:`0 0 12px`},children:`Server Config`}),r.url?(0,_.jsxs)(`div`,{style:{display:`grid`,gap:`12px`},children:[(0,_.jsxs)(`div`,{className:`management-form-group`,children:[(0,_.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8},children:[(0,_.jsx)(`label`,{className:`management-label`,children:`Server URL`}),(0,_.jsx)(`span`,{className:`management-badge remote`,style:{fontSize:`0.7rem`},children:`SSE Transport`})]}),(0,_.jsx)(`input`,{type:`text`,className:`management-input-field`,value:r.url||``,onChange:e=>X(n.name,`url`,e.target.value)})]}),(0,_.jsxs)(`div`,{className:`management-form-group`,children:[(0,_.jsx)(`label`,{className:`management-label`,children:`Custom headers (JSON)`}),(0,_.jsx)(`textarea`,{className:`management-textarea-field`,value:typeof r.headers==`object`?JSON.stringify(r.headers,null,2):r.headers||``,onChange:e=>{try{let t=JSON.parse(e.target.value);X(n.name,`headers`,t)}catch{}},rows:3,placeholder:`{"Authorization": "Bearer ..."}`})]}),(0,_.jsxs)(`div`,{className:`management-form-group`,children:[(0,_.jsx)(`label`,{className:`management-label`,children:`Icon (preset / URL / SVG)`}),(0,_.jsx)(`input`,{type:`text`,className:`management-input-field`,placeholder:`e.g. globe, search, database`,value:r.icon||``,onChange:e=>X(n.name,`icon`,e.target.value)})]})]}):(0,_.jsxs)(`div`,{style:{display:`grid`,gap:`12px`},children:[(0,_.jsxs)(`div`,{className:`management-form-group`,children:[(0,_.jsx)(`label`,{className:`management-label`,children:`Command`}),(0,_.jsx)(`input`,{type:`text`,className:`management-input-field`,value:r.command||``,onChange:e=>X(n.name,`command`,e.target.value)})]}),(0,_.jsxs)(`div`,{className:`management-form-group`,children:[(0,_.jsx)(`label`,{className:`management-label`,children:`Arguments (space-separated)`}),(0,_.jsx)(`input`,{type:`text`,className:`management-input-field`,value:(r.args||[]).join(` `),onChange:e=>X(n.name,`args`,e.target.value.split(/\s+/).filter(Boolean))})]}),(0,_.jsxs)(`div`,{className:`management-form-group`,children:[(0,_.jsx)(`label`,{className:`management-label`,children:`Icon (preset / URL / SVG)`}),(0,_.jsx)(`input`,{type:`text`,className:`management-input-field`,placeholder:`e.g. search, database, code`,value:r.icon||``,onChange:e=>X(n.name,`icon`,e.target.value)})]}),(0,_.jsxs)(`div`,{className:`management-form-group`,children:[(0,_.jsx)(`label`,{className:`management-label`,children:`Environment variables (JSON)`}),(0,_.jsx)(`textarea`,{className:`management-textarea-field`,value:typeof r.env==`object`?JSON.stringify(r.env,null,2):r.env||``,onChange:e=>{try{let t=JSON.parse(e.target.value);X(n.name,`env`,t)}catch{}},rows:3})]})]}),(0,_.jsx)(f,{serverName:n.name,config:e,updateField:t,listServerTools:se})]})]}),(0,_.jsxs)(`div`,{className:`management-modal-footer`,children:[n.isConfigured&&S?(0,_.jsxs)(`span`,{style:{fontSize:`0.8rem`,color:`var(--text-muted, #94a3b8)`},children:[M[n.name]===`success`&&`Done ✓`,M[n.name]===`error`&&`Re-authentication failed`]}):(0,_.jsx)(`span`,{}),(0,_.jsxs)(`div`,{style:{display:`flex`,gap:`8px`},children:[n.isConfigured&&S&&(0,_.jsx)(`button`,{type:`button`,className:`management-action-btn`,disabled:M[n.name]===`running`,onClick:()=>fe(n.name),children:M[n.name]===`running`?`Re-authenticating...`:`Re-authenticate`}),n.isConfigured&&(0,_.jsx)(`button`,{type:`button`,className:`management-action-btn danger`,onClick:()=>{b(n.name),T(null)},children:`Remove`})]})]})]})})})(),le&&(0,_.jsx)(`div`,{className:`management-modal-overlay`,onClick:()=>E(!1),children:(0,_.jsxs)(`div`,{className:`management-modal`,onClick:e=>e.stopPropagation(),children:[(0,_.jsxs)(`div`,{className:`management-modal-header`,children:[(0,_.jsx)(`h2`,{className:`management-modal-title`,children:`Add new MCP server`}),(0,_.jsx)(`button`,{type:`button`,className:`management-modal-close`,onClick:()=>E(!1),children:`✕`})]}),(0,_.jsxs)(`form`,{onSubmit:i=>{if(i.preventDefault(),P===`url`){if(!n.trim()||!I.trim()){alert(`Please provide a server name and URL.`);return}if(!q){alert(`Please acknowledge the security risks of connecting to a custom remote MCP server.`);return}let i;if(R===`bearer`&&z.trim())i={Authorization:z.trim().startsWith(`Bearer `)?z.trim():`Bearer ${z.trim()}`};else if(R===`custom`&&V.trim())try{i=JSON.parse(V.trim())}catch{alert(`Invalid JSON in Custom headers field.`);return}let a=n.trim(),o={...e.mcpServers||{}};o[a]={url:I.trim(),headers:i,transport:`sse`,disabled:!1,icon:h?.trim()||void 0},t(`mcpServers`,o),O&&t(`allowedMcpTools`,{...e.allowedMcpTools||{},[a]:[`*`]}),r(``),L(``),B(``),H(``),W(`idle`),K(``),J(!1),k(!1),E(!1)}else oe(O),k(!1),E(!1)},children:[(0,_.jsxs)(`div`,{className:`management-modal-body`,children:[(0,_.jsxs)(`div`,{className:`mcp-server-type-toggle`,children:[(0,_.jsxs)(`button`,{type:`button`,className:`mcp-toggle-btn ${P===`url`?`active`:``}`,onClick:()=>{F(`url`),W(`idle`),K(``)},children:[(0,_.jsx)(p,{size:15}),` Remote server (URL / SSE)`]}),(0,_.jsxs)(`button`,{type:`button`,className:`mcp-toggle-btn ${P===`command`?`active`:``}`,onClick:()=>{F(`command`),W(`idle`),K(``)},children:[(0,_.jsx)(ne,{size:15}),` Local command (stdio)`]})]}),P===`url`?(0,_.jsxs)(_.Fragment,{children:[(0,_.jsxs)(`div`,{style:{display:`grid`,gridTemplateColumns:`1fr 1fr`,gap:`12px`},children:[(0,_.jsxs)(`div`,{className:`management-form-group`,children:[(0,_.jsx)(`label`,{className:`management-label`,children:`Server name`}),(0,_.jsx)(`input`,{type:`text`,className:`management-input-field`,placeholder:`e.g. cloud-mcp`,value:n,onChange:e=>r(e.target.value),required:!0})]}),(0,_.jsxs)(`div`,{className:`management-form-group`,children:[(0,_.jsx)(`label`,{className:`management-label`,children:`Authentication`}),(0,_.jsxs)(`select`,{className:`management-input-field`,value:R,onChange:e=>{de(e.target.value),W(`idle`),K(``)},style:{cursor:`pointer`},children:[(0,_.jsx)(`option`,{value:`none`,children:`None (Public)`}),(0,_.jsx)(`option`,{value:`bearer`,children:`Bearer token`}),(0,_.jsx)(`option`,{value:`custom`,children:`Custom headers (JSON)`})]})]})]}),(0,_.jsxs)(`div`,{className:`management-form-group`,children:[(0,_.jsx)(`label`,{className:`management-label`,children:`Server URL`}),(0,_.jsx)(`input`,{type:`url`,className:`management-input-field`,placeholder:`https://example.com/sse or http://localhost:8000/sse`,value:I,onChange:e=>{L(e.target.value),W(`idle`),K(``)},required:!0})]}),R===`bearer`&&(0,_.jsxs)(`div`,{className:`management-form-group`,children:[(0,_.jsx)(`label`,{className:`management-label`,children:`Bearer token`}),(0,_.jsx)(`input`,{type:`password`,className:`management-input-field`,placeholder:`Paste API token or JWT...`,value:z,onChange:e=>{B(e.target.value),W(`idle`),K(``)}})]}),R===`custom`&&(0,_.jsxs)(`div`,{className:`management-form-group`,children:[(0,_.jsx)(`label`,{className:`management-label`,children:`Custom HTTP Headers (JSON)`}),(0,_.jsx)(`textarea`,{className:`management-textarea-field`,placeholder:`{"Authorization": "Bearer ...", "X-Custom-Auth": "secret"}`,value:V,onChange:e=>{H(e.target.value),W(`idle`),K(``)},rows:3})]}),(0,_.jsxs)(`div`,{className:`management-form-group`,children:[(0,_.jsx)(`label`,{className:`management-label`,children:`Icon (Optional)`}),(0,_.jsx)(`input`,{type:`text`,className:`management-input-field`,placeholder:`e.g. globe, cloud, database, search`,value:h,onChange:e=>y&&y(e.target.value)})]}),(0,_.jsxs)(`div`,{className:`mcp-test-row`,children:[(0,_.jsx)(`button`,{type:`button`,className:`mcp-test-btn`,onClick:async()=>{if(!I.trim()){W(`error`),K(`Please enter a server URL first.`);return}let e;if(R===`bearer`)z.trim()&&(e={Authorization:z.trim().startsWith(`Bearer `)?z.trim():`Bearer ${z.trim()}`});else if(R===`custom`&&V.trim())try{e=JSON.parse(V.trim())}catch{W(`error`),K(`Invalid JSON in Custom headers field.`);return}W(`testing`),K(`Connecting to MCP server...`);try{let t=await v(I.trim(),e);t.ok?(W(`success`),K(`Connected: ${t.server_info?.name||`Remote server`} (${t.tools_count??0} tools discovered)`)):(W(`error`),K(`Connection failed: ${t.error||`Server unreachable`}`))}catch(e){W(`error`),K(`Connection failed: ${e?.message||String(e)}`)}},disabled:U===`testing`||!I.trim(),children:U===`testing`?(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(m,{size:13,className:`mcp-spin`}),` Testing...`]}):(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(ae,{size:13}),` Test connection`]})}),G&&(0,_.jsxs)(`span`,{className:`mcp-test-status ${U}`,children:[U===`success`&&(0,_.jsx)(ie,{size:13}),U===`error`&&(0,_.jsx)(re,{size:13}),G]})]}),(0,_.jsxs)(`div`,{className:`mcp-security-notice`,children:[(0,_.jsxs)(`div`,{className:`mcp-security-header`,children:[(0,_.jsx)(te,{size:16,className:`mcp-security-icon`}),(0,_.jsx)(`span`,{children:`Custom MCP servers introduce security risks`})]}),(0,_.jsx)(`div`,{className:`mcp-security-body`,children:(0,_.jsxs)(`label`,{className:`mcp-security-ack`,children:[(0,_.jsx)(`input`,{type:`checkbox`,className:`mint-custom-checkbox`,checked:q,onChange:e=>J(e.target.checked)}),(0,_.jsxs)(`span`,{className:`mcp-security-ack-text`,children:[(0,_.jsx)(`strong`,{children:`I understand the risks and wish to proceed`}),(0,_.jsx)(`span`,{className:`mcp-security-subtext`,children:`External endpoints can execute tools and receive prompt context. Malicious servers could attempt to access sensitive information or trigger unintended actions. Only connect to endpoints you trust.`})]})]})})]})]}):(0,_.jsxs)(_.Fragment,{children:[(0,_.jsxs)(`div`,{style:{display:`grid`,gridTemplateColumns:`1fr 1fr`,gap:`12px`},children:[(0,_.jsxs)(`div`,{className:`management-form-group`,children:[(0,_.jsx)(`label`,{className:`management-label`,children:`Server name`}),(0,_.jsx)(`input`,{type:`text`,className:`management-input-field`,placeholder:`e.g. google-search`,value:n,onChange:e=>r(e.target.value),required:!0})]}),(0,_.jsxs)(`div`,{className:`management-form-group`,children:[(0,_.jsx)(`label`,{className:`management-label`,children:`Command`}),(0,_.jsx)(`input`,{type:`text`,className:`management-input-field`,placeholder:`e.g. npx`,value:i,onChange:e=>a(e.target.value),required:!0})]})]}),(0,_.jsxs)(`div`,{className:`management-form-group`,children:[(0,_.jsx)(`label`,{className:`management-label`,children:`Arguments`}),(0,_.jsx)(`input`,{type:`text`,className:`management-input-field`,placeholder:`e.g. -y @modelcontextprotocol/server-brave-search`,value:o,onChange:e=>c(e.target.value)})]}),(0,_.jsxs)(`div`,{className:`management-form-group`,children:[(0,_.jsx)(`label`,{className:`management-label`,children:`Icon (Optional)`}),(0,_.jsx)(`input`,{type:`text`,className:`management-input-field`,placeholder:`e.g. search, database, cloud, code`,value:h,onChange:e=>y&&y(e.target.value)})]}),(0,_.jsxs)(`div`,{className:`management-form-group`,children:[(0,_.jsx)(`label`,{className:`management-label`,children:`Environment variables (JSON)`}),(0,_.jsx)(`textarea`,{className:`management-textarea-field`,placeholder:`e.g. {"BRAVE_API_KEY": "your_key_here"}`,value:u,onChange:e=>d(e.target.value),rows:3})]})]}),(0,_.jsxs)(`label`,{className:`mcp-allow-all-row`,children:[(0,_.jsx)(`input`,{type:`checkbox`,className:`mint-custom-checkbox`,checked:O,onChange:e=>k(e.target.checked)}),(0,_.jsxs)(`span`,{className:`mcp-allow-all-text`,children:[(0,_.jsx)(`span`,{className:`mcp-allow-all-title`,children:`Allow the agent to call all of this server’s tools (*)`}),(0,_.jsx)(`span`,{className:`mcp-allow-all-desc`,children:`Leave off to approve tools one by one afterwards.`})]})]})]}),(0,_.jsxs)(`div`,{className:`management-modal-footer`,children:[(0,_.jsx)(`button`,{type:`button`,className:`management-action-btn`,onClick:()=>E(!1),children:`Cancel`}),(0,_.jsx)(`button`,{type:`submit`,className:`management-primary-btn`,disabled:P===`url`&&!q,children:`Add Server`})]})]})]})}),ue&&(0,_.jsx)(`div`,{className:`management-modal-overlay`,onClick:()=>D(!1),children:(0,_.jsxs)(`div`,{className:`management-modal mcp-catalog-modal`,onClick:e=>e.stopPropagation(),children:[(0,_.jsxs)(`div`,{className:`management-modal-header`,children:[(0,_.jsx)(`h2`,{className:`management-modal-title`,children:`MCP catalog`}),(0,_.jsx)(`button`,{type:`button`,className:`management-modal-close`,onClick:()=>D(!1),children:`✕`})]}),(0,_.jsx)(`div`,{className:`management-modal-body`,children:(0,_.jsx)(ee,{configuredNames:Object.keys(e.mcpServers||{}),onPick:(e,t,n)=>{F(`command`),r(e.key),a(e.command),c([...e.args||[],...t].join(` `)),d(Object.keys(n).length?JSON.stringify(n,null,2):``),y&&y(e.icon||``),D(!1),E(!0)},showManualHint:!1})}),(0,_.jsxs)(`div`,{className:`management-modal-footer`,children:[(0,_.jsx)(`span`,{}),(0,_.jsx)(`button`,{type:`button`,className:`management-action-btn`,onClick:()=>{D(!1),E(!0)},children:`Add manually instead`})]})]})})]})})}))();export{y as McpServersView,y as default};