@pheem49/mint 1.16.0 → 1.17.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Cargo.lock +6 -6
- package/Cargo.toml +1 -1
- package/README.md +1 -1
- package/Release_Note.md +71 -72
- package/apps/mint-companion/src-tauri/src/compact.rs +69 -0
- package/apps/mint-companion/src-tauri/src/main.rs +218 -11
- package/apps/mint-companion/vite.config.ts +2 -1
- package/crates/mint-cli/src/agent/live_status.rs +43 -2
- package/crates/mint-cli/src/agent.rs +178 -38
- package/crates/mint-cli/src/commands/agent.rs +225 -31
- package/crates/mint-cli/src/commands/browser.rs +127 -0
- package/crates/mint-cli/src/commands/config.rs +14 -1
- package/crates/mint-cli/src/commands/knowledge.rs +16 -2
- package/crates/mint-cli/src/commands/mod.rs +15 -1
- package/crates/mint-cli/src/commands/tailnet_web.rs +2 -7
- package/crates/mint-cli/src/companion_navigation.rs +268 -0
- package/crates/mint-cli/src/interactive/chat_tui.rs +1065 -63
- package/crates/mint-cli/src/interactive/command_ui.rs +39 -0
- package/crates/mint-cli/src/interactive/slash_commands.rs +114 -6
- package/crates/mint-cli/src/interactive/tool_activity.rs +375 -36
- package/crates/mint-cli/src/interactive.rs +37 -5
- package/crates/mint-cli/src/main.rs +23 -2
- package/crates/mint-cli/src/onboard.rs +3494 -1336
- package/crates/mint-cli/tests/mods_testing.rs +5 -1
- package/crates/mint-companion-protocol/src/lib.rs +113 -0
- package/crates/mint-core/src/agent/chat.rs +240 -1
- package/crates/mint-core/src/agent/memory.rs +73 -6
- package/crates/mint-core/src/agent/safety.rs +56 -4
- package/crates/mint-core/src/agent/skill_inventory.rs +3 -1
- package/crates/mint-core/src/agent/skills.rs +1 -0
- package/crates/mint-core/src/api_server/routes/auth.rs +1 -4
- package/crates/mint-core/src/api_server/routes/chat.rs +29 -15
- package/crates/mint-core/src/api_server/routes/misc.rs +116 -0
- package/crates/mint-core/src/api_server/routes/profile_oauth.rs +43 -26
- package/crates/mint-core/src/api_server/routes/sessions.rs +93 -76
- package/crates/mint-core/src/api_server/routes/skills_subagents.rs +11 -7
- package/crates/mint-core/src/api_server/routes/status_health.rs +18 -8
- package/crates/mint-core/src/api_server.rs +211 -65
- package/crates/mint-core/src/avatar_bridge.rs +5 -2
- package/crates/mint-core/src/browser/cdp.rs +82 -26
- package/crates/mint-core/src/browser/lifecycle.rs +143 -43
- package/crates/mint-core/src/browser/mod.rs +5 -4
- package/crates/mint-core/src/browser/navigate.rs +82 -9
- package/crates/mint-core/src/browser/runtime.rs +284 -0
- package/crates/mint-core/src/browser/session.rs +263 -7
- package/crates/mint-core/src/browser/workflow.rs +386 -0
- package/crates/mint-core/src/companion/navigation.rs +115 -0
- package/crates/mint-core/src/companion.rs +109 -1
- package/crates/mint-core/src/integrations/mcp_result.rs +45 -0
- package/crates/mint-core/src/lib.rs +10 -6
- package/crates/mint-core/src/media/image_proxy.rs +563 -0
- package/crates/mint-core/src/media/tool_images.rs +196 -0
- package/crates/mint-core/src/media/tts/playback.rs +609 -0
- package/crates/mint-core/src/media/tts.rs +1 -0
- package/crates/mint-core/src/media.rs +2 -0
- package/crates/mint-core/src/orchestration/context_render.rs +450 -33
- package/crates/mint-core/src/orchestration/decision_parsing.rs +5 -23
- package/crates/mint-core/src/orchestration/diagnostics.rs +307 -0
- package/crates/mint-core/src/orchestration/image_regressions.rs +379 -0
- package/crates/mint-core/src/orchestration/loop_guard.rs +334 -0
- package/crates/mint-core/src/orchestration/mod.rs +1104 -560
- package/crates/mint-core/src/orchestration/reliability.rs +541 -0
- package/crates/mint-core/src/orchestration/repeated_failures.rs +8 -0
- package/crates/mint-core/src/orchestration/review_regressions.rs +174 -28
- package/crates/mint-core/src/orchestration/tools/files.rs +31 -3
- package/crates/mint-core/src/orchestration/tools/plugins_mcp.rs +19 -4
- package/crates/mint-core/src/orchestration/tools/project.rs +1 -1
- package/crates/mint-core/src/orchestration/tools/shell.rs +29 -5
- package/crates/mint-core/src/orchestration/tools/web.rs +5 -1
- package/crates/mint-core/src/orchestration/trajectory_schema.rs +353 -0
- package/crates/mint-core/src/orchestration/truncation.rs +211 -0
- package/crates/mint-core/src/orchestration/verification.rs +36 -6
- package/crates/mint-core/src/orchestration/workspace_helpers.rs +54 -23
- package/crates/mint-core/src/prompts/agent.rs +31 -40
- package/crates/mint-core/src/prompts/tool_catalog.rs +134 -40
- package/crates/mint-core/src/search/web_search.rs +44 -3
- package/crates/mint-core/src/slash/mod.rs +464 -1
- package/crates/mint-core/src/swarm/batch.rs +643 -0
- package/crates/mint-core/src/swarm/dossier.rs +152 -0
- package/crates/mint-core/src/swarm/labels.rs +100 -0
- package/crates/mint-core/src/swarm/mod.rs +158 -0
- package/crates/mint-core/src/swarm/permissions.rs +167 -0
- package/crates/mint-core/src/system/auth.rs +156 -7
- package/crates/mint-core/src/system/bg_shell.rs +77 -9
- package/crates/mint-core/src/system/config.rs +92 -3
- package/crates/mint-core/src/system/mint_web.rs +33 -12
- package/crates/mint-core/src/system/shell.rs +179 -10
- package/crates/mint-core/src/system/workspace.rs +204 -0
- package/crates/mint-core/tests/background_retention.rs +1 -1
- package/crates/mint-core/tests/memory_persistence.rs +27 -0
- package/out/web/assets/ArtifactPreviewPanel-DAT_Y7i0.css +1 -0
- package/out/web/assets/ArtifactPreviewPanel-S0dPfYFx.js +2 -0
- package/out/web/assets/CalculationCard-CRjP3E1j.js +1 -0
- package/out/web/assets/{CliSessionsView-CtzUJpK_.css → CliSessionsView-C3Br2v5Y.css} +1 -1
- package/out/web/assets/CliSessionsView-MI8kXMAb.js +1 -0
- package/out/web/assets/CodeReviewPage-CUJceQme.css +1 -0
- package/out/web/assets/CodeReviewPage-VCUgPla_.js +2 -0
- package/out/web/assets/CommandPalette-BD8SlTE5.js +1 -0
- package/out/web/assets/ImageGenCard-BCXxkVJX.js +1 -0
- package/out/web/assets/ImageSearchCard-N3yQOr8Z.js +1 -0
- package/out/web/assets/ImageStudioPanel-BP7N4rLr.js +1 -0
- package/out/web/assets/LibraryPage-WlviRdR8.js +2 -0
- package/out/web/assets/LinkedFoldersView-CKRgroWK.js +1 -0
- package/out/web/assets/McpRegistryPicker-CoS83vtc.js +1 -0
- package/out/web/assets/McpServersView-D3wHnuHg.js +1 -0
- package/out/web/assets/MermaidCard-NqrHdyJW.js +2 -0
- package/out/web/assets/MintDashboard-B2DJsDDO.css +1 -0
- package/out/web/assets/MintDashboard-COw_xol7.js +63 -0
- package/out/web/assets/PluginsView-jBYmcKh4.js +1 -0
- package/out/web/assets/RewindModal-DempuDod.js +1 -0
- package/out/web/assets/ScheduledTasksView-5uw9-V9H.js +1 -0
- package/out/web/assets/SelectField-DXBQtrUK.js +1 -0
- package/out/web/assets/SelectField-lFEkkWCU.css +1 -0
- package/out/web/assets/SettingsWindow-2YP3yj7s.js +4 -0
- package/out/web/assets/SettingsWindow-Dz8LQVgD.css +1 -0
- package/out/web/assets/SkillsView-C-gp9J7m.js +2 -0
- package/out/web/assets/StockCard-BDMCe7mx.js +1 -0
- package/out/web/assets/ToolSurfacePage-B0J_q0Jl.js +38 -0
- package/out/web/assets/ToolSurfacePage-CRIQ1owD.css +1 -0
- package/out/web/assets/UiFeatureCard-6BwxTOCe.js +1 -0
- package/out/web/assets/UiGridCard-DvZcLNxb.js +1 -0
- package/out/web/assets/UiMockupWidget-DD73QWg1.js +1 -0
- package/out/web/assets/VeoStudioPanel-DfsOJKv0.js +4 -0
- package/out/web/assets/WeatherCard-CPucIfq8.js +1 -0
- package/out/web/assets/WorkspacePanel-BfHKkulU.js +1 -0
- package/out/web/assets/WorkspacePdfPreview-Dx_lkjNu.js +2 -0
- package/out/web/assets/abnfDiagram-VCTEODGH-BOo3Ckng.js +1 -0
- package/out/web/assets/architecture-7GRP2DOG-ZOwheW3n.js +1 -0
- package/out/web/assets/architectureDiagram-5GKGNRK7-DC2FDzVd.js +36 -0
- package/out/web/assets/{blockDiagram-NRAW4CY4-BrrqzHW5.js → blockDiagram-I7D4REHJ-BrKFWdAH.js} +4 -4
- package/out/web/assets/c4Diagram-7LVT6UL2-BHTHK1Yd.js +38 -0
- package/out/web/assets/chunk-2Q5K7J3B-D2JLPQzF.js +1 -0
- package/out/web/assets/{chunk-TEH6E4GO-G4Cdlyrt.js → chunk-4HAMMTFA-BYFkZwNj.js} +3 -3
- package/out/web/assets/{chunk-5VM5RSS4-BiPuE0io.js → chunk-5VM5RSS4-BZ2oBPYQ.js} +1 -1
- package/out/web/assets/chunk-75Z2AOVW-BSKfSKSA.js +2 -0
- package/out/web/assets/chunk-DU6HZSFF-vIhsiW6n.js +128 -0
- package/out/web/assets/chunk-F27PBJKO-BlYpW9xq.js +1 -0
- package/out/web/assets/chunk-FOHPRMQF-JXEeeJ9r.js +161 -0
- package/out/web/assets/{chunk-GMAD6QVW-BuhEcgHq.js → chunk-GMAD6QVW-BIBz_Ug5.js} +12 -12
- package/out/web/assets/chunk-GVQU2GXP-NPSHxeqC.js +1 -0
- package/out/web/assets/chunk-IMKFNOWR-YlJK8_Fp.js +231 -0
- package/out/web/assets/chunk-JWPE2WC7-BeEMUFDw.js +1 -0
- package/out/web/assets/chunk-L3NEJ4N5-DMYi4-af.js +1 -0
- package/out/web/assets/chunk-OSK3NFVY-Begd3-jA.js +10 -0
- package/out/web/assets/chunk-P2QGCYS3-D1I4xFHN.js +1 -0
- package/out/web/assets/chunk-POPQ4Y6H-CafZZzNE.js +1 -0
- package/out/web/assets/chunk-PWAF6VOD-Dwh6_Lnt.js +1 -0
- package/out/web/assets/chunk-SHT3W25Y-B0XrCSEb.js +168 -0
- package/out/web/assets/{chunk-SVP7TREG-Bu_yYb-V.js → chunk-SVP7TREG-CxLsddxC.js} +1 -1
- package/out/web/assets/{chunk-LCL6LL3I-BhXV9zyH.js → chunk-TICWLB2K-y156QInb.js} +4 -4
- package/out/web/assets/chunk-XXDRQBXY-B9YlhOkE.js +1 -0
- package/out/web/assets/chunk-Y2CYZVJY-BxCWjNVG.js +1 -0
- package/out/web/assets/classDiagram-ZZMXUADV-BgJ5WtSp.js +1 -0
- package/out/web/assets/classDiagram-v2-VYDZK3BY-BgJ5WtSp.js +1 -0
- package/out/web/assets/config-CvIO5hkn.js +2 -0
- package/out/web/assets/config-DqXJXeZM.css +1 -0
- package/out/web/assets/core-Mi3s5D4_.js +1 -0
- package/out/web/assets/cose-bilkent-JH36ORCC-qlna31ty.js +1 -0
- package/out/web/assets/cynefin-OW5HDTMX-SMVvrLf-.js +1 -0
- package/out/web/assets/cynefinDiagram-5FMLGOSQ-rZznN24T.js +62 -0
- package/out/web/assets/cytoscape.esm-DWtAUG0r.js +321 -0
- package/out/web/assets/dagre-CnWJJM5f.js +1 -0
- package/out/web/assets/dagre-GXQ25YYZ-BOToydFu.js +4 -0
- package/out/web/assets/diagram-S7CK7UJ4-TMVaGQEJ.js +30 -0
- package/out/web/assets/diagram-UQ7AKVKN-C2JK-GP2.js +41 -0
- package/out/web/assets/{diagram-VSXAHHWV-BJ86Ov2Y.js → diagram-VSXAHHWV-Cw8VSi2K.js} +1 -1
- package/out/web/assets/diagram-VX7I27RA-DXp4fKk9.js +24 -0
- package/out/web/assets/diagram-Z3DM3KII-CzSicYiW.js +24 -0
- package/out/web/assets/dist-9ISJ7r-g.js +1 -0
- package/out/web/assets/dist-js-BV3mI7uw.js +1 -0
- package/out/web/assets/ebnfDiagram-PWID7BFC-Dqj-zqPu.js +1 -0
- package/out/web/assets/{erDiagram-SSCWMZ5O-CzzmnZWT.js → erDiagram-RLTQ6QDP-DZwFZAuD.js} +3 -3
- package/out/web/assets/event-D7D-EBy9.js +1 -0
- package/out/web/assets/eventmodeling-NTZA5JFV-C0O-Lvgp.js +1 -0
- package/out/web/assets/flowDiagram-HODETNUW-uqCHJond.js +1 -0
- package/out/web/assets/ganttDiagram-EL5Y4UJY-Da4ULXTl.js +292 -0
- package/out/web/assets/gitGraph-4MIJSDKK-B9wNFZIP.js +1 -0
- package/out/web/assets/gitGraphDiagram-WWUBYQGX-RjrhB0MP.js +106 -0
- package/out/web/assets/graphlib-Bh9gHply.js +1 -0
- package/out/web/assets/index-BmpulIkg.js +168 -0
- package/out/web/assets/index-CkvBwhX_.css +1 -0
- package/out/web/assets/info-A6RAGUB7-B3dfCpeY.js +1 -0
- package/out/web/assets/infoDiagram-27XIBGKW-QVWkLVx7.js +2 -0
- package/out/web/assets/{ishikawaDiagram-5VMMS53U-s38yo28y.js → ishikawaDiagram-5VMMS53U-CLFNIRI9.js} +4 -4
- package/out/web/assets/journeyDiagram-3NMN7TZE-fgOQadYF.js +139 -0
- package/out/web/assets/jsx-runtime-DmUwWVTj.js +1 -0
- package/out/web/assets/{kanban-definition-3QL26DDD-DodjgySL.js → kanban-definition-UXKFOSKX-G3Q_9g9O.js} +6 -6
- package/out/web/assets/katex-MCdQaEAD.js +257 -0
- package/out/web/assets/mermaid-parser.core-v3Jm7nco.js +7 -0
- package/out/web/assets/mermaid.core-DTEjLUA1.js +44 -0
- package/out/web/assets/{mindmap-definition-FBJOCRG2-260WBDxZ.js → mindmap-definition-YA3MSWOX-C_D42_fF.js} +4 -4
- package/out/web/assets/modelManager-BPLycQrN.js +2 -0
- package/out/web/assets/oauthManager-BUK7ic7q.js +1 -0
- package/out/web/assets/packet-AYTQ26CC-B-R-SHlF.js +1 -0
- package/out/web/assets/pdf-Bcahc2yC.js +56 -0
- package/out/web/assets/pdf.worker.min-Dkey6ZUl.mjs +27 -0
- package/out/web/assets/pegDiagram-XKGWAZYB-Da2q_giz.js +1 -0
- package/out/web/assets/pie-WAS4IAKB-BC8F0N7-.js +1 -0
- package/out/web/assets/pieDiagram-E7YTZNPT-Iy9REJNC.js +39 -0
- package/out/web/assets/{quadrantDiagram-AXDQQJYC-B8D3gU5d.js → quadrantDiagram-AXDQQJYC-ztsiYw7h.js} +4 -4
- package/out/web/assets/radar-RG4KPBEZ-B_1P8Z_z.js +1 -0
- package/out/web/assets/railroad-74A4TZTK-DuTqczSo.js +1 -0
- package/out/web/assets/railroad-abnf-HS5TGJTU-Df29WLmp.js +1 -0
- package/out/web/assets/railroad-ebnf-LZEXJU2U-ePFMo-qp.js +1 -0
- package/out/web/assets/railroad-peg-WCYAUIDC-DYXLW4_E.js +1 -0
- package/out/web/assets/railroadDiagram-O6MQD6OU-LStnZf2S.js +1 -0
- package/out/web/assets/{requirementDiagram-EFPCY7ZU-D2X-Ewik.js → requirementDiagram-BXWQKSXE-DmzonMH-.js} +3 -3
- package/out/web/assets/rolldown-runtime-CNOWq4Kh.js +1 -0
- package/out/web/assets/rough.esm-CNnFptCR.js +1 -0
- package/out/web/assets/sankeyDiagram-P5KCCOFB-B8vjmUU1.js +40 -0
- package/out/web/assets/sequenceDiagram-WJ2MYXX4-CTnplOAX.js +162 -0
- package/out/web/assets/sizeCapture-INFHLROL-C8Q8DbV5.js +1 -0
- package/out/web/assets/src-CRDfRlHM.js +1 -0
- package/out/web/assets/stateDiagram-D77RDMKH-BFrIaLdI.js +1 -0
- package/out/web/assets/stateDiagram-v2-MP3YSRHH-uf3kdNW4.js +1 -0
- package/out/web/assets/studio-BBZQ_-QK.js +1 -0
- package/out/web/assets/swimlanes-42K2YHIH-BXGngUNU.js +1 -0
- package/out/web/assets/swimlanesDiagram-VR7AAH4N-Y8q5bQce.js +8 -0
- package/out/web/assets/timeline-definition-24CTP7MA-CegH7n43.js +120 -0
- package/out/web/assets/treeView-Q6P3EWNA-DTpJv2Tw.js +1 -0
- package/out/web/assets/treemap-WGGIJYW6-i8M9iJU6.js +1 -0
- package/out/web/assets/vennDiagram-4TSXK5OY-Dpzo1S8U.js +34 -0
- package/out/web/assets/wardley-WFR3VGLG-BrNsgtfw.js +1 -0
- package/out/web/assets/{wardleyDiagram-VM6X3IG4-DAdXELbQ.js → wardleyDiagram-VM6X3IG4-lQ92LFE1.js} +35 -35
- package/out/web/assets/window-CkUOP7t0.js +1 -0
- package/out/web/assets/workspaces-SYPrmbgC.js +1 -0
- package/out/web/assets/{xychartDiagram-S5SC5T6Z-IZIXf3Vo.js → xychartDiagram-S5SC5T6Z-BaOaEoBd.js} +4 -4
- package/out/web/index-web.html +4 -4
- package/out/web/index.html +4 -4
- package/out/web/pdfjs/cmaps/78-EUC-H.bcmap +0 -0
- package/out/web/pdfjs/cmaps/78-EUC-V.bcmap +0 -0
- package/out/web/pdfjs/cmaps/78-H.bcmap +0 -0
- package/out/web/pdfjs/cmaps/78-RKSJ-H.bcmap +0 -0
- package/out/web/pdfjs/cmaps/78-RKSJ-V.bcmap +0 -0
- package/out/web/pdfjs/cmaps/78-V.bcmap +0 -0
- package/out/web/pdfjs/cmaps/78ms-RKSJ-H.bcmap +0 -0
- package/out/web/pdfjs/cmaps/78ms-RKSJ-V.bcmap +0 -0
- package/out/web/pdfjs/cmaps/83pv-RKSJ-H.bcmap +0 -0
- package/out/web/pdfjs/cmaps/90ms-RKSJ-H.bcmap +0 -0
- package/out/web/pdfjs/cmaps/90ms-RKSJ-V.bcmap +0 -0
- package/out/web/pdfjs/cmaps/90msp-RKSJ-H.bcmap +0 -0
- package/out/web/pdfjs/cmaps/90msp-RKSJ-V.bcmap +0 -0
- package/out/web/pdfjs/cmaps/90pv-RKSJ-H.bcmap +0 -0
- package/out/web/pdfjs/cmaps/90pv-RKSJ-V.bcmap +0 -0
- package/out/web/pdfjs/cmaps/Add-H.bcmap +0 -0
- package/out/web/pdfjs/cmaps/Add-RKSJ-H.bcmap +0 -0
- package/out/web/pdfjs/cmaps/Add-RKSJ-V.bcmap +0 -0
- package/out/web/pdfjs/cmaps/Add-V.bcmap +0 -0
- package/out/web/pdfjs/cmaps/Adobe-CNS1-0.bcmap +0 -0
- package/out/web/pdfjs/cmaps/Adobe-CNS1-1.bcmap +0 -0
- package/out/web/pdfjs/cmaps/Adobe-CNS1-2.bcmap +0 -0
- package/out/web/pdfjs/cmaps/Adobe-CNS1-3.bcmap +0 -0
- package/out/web/pdfjs/cmaps/Adobe-CNS1-4.bcmap +0 -0
- package/out/web/pdfjs/cmaps/Adobe-CNS1-5.bcmap +0 -0
- package/out/web/pdfjs/cmaps/Adobe-CNS1-6.bcmap +0 -0
- package/out/web/pdfjs/cmaps/Adobe-CNS1-UCS2.bcmap +0 -0
- package/out/web/pdfjs/cmaps/Adobe-GB1-0.bcmap +0 -0
- package/out/web/pdfjs/cmaps/Adobe-GB1-1.bcmap +0 -0
- package/out/web/pdfjs/cmaps/Adobe-GB1-2.bcmap +0 -0
- package/out/web/pdfjs/cmaps/Adobe-GB1-3.bcmap +0 -0
- package/out/web/pdfjs/cmaps/Adobe-GB1-4.bcmap +0 -0
- package/out/web/pdfjs/cmaps/Adobe-GB1-5.bcmap +0 -0
- package/out/web/pdfjs/cmaps/Adobe-GB1-UCS2.bcmap +0 -0
- package/out/web/pdfjs/cmaps/Adobe-Japan1-0.bcmap +0 -0
- package/out/web/pdfjs/cmaps/Adobe-Japan1-1.bcmap +0 -0
- package/out/web/pdfjs/cmaps/Adobe-Japan1-2.bcmap +0 -0
- package/out/web/pdfjs/cmaps/Adobe-Japan1-3.bcmap +0 -0
- package/out/web/pdfjs/cmaps/Adobe-Japan1-4.bcmap +0 -0
- package/out/web/pdfjs/cmaps/Adobe-Japan1-5.bcmap +0 -0
- package/out/web/pdfjs/cmaps/Adobe-Japan1-6.bcmap +0 -0
- package/out/web/pdfjs/cmaps/Adobe-Japan1-UCS2.bcmap +0 -0
- package/out/web/pdfjs/cmaps/Adobe-Korea1-0.bcmap +0 -0
- package/out/web/pdfjs/cmaps/Adobe-Korea1-1.bcmap +0 -0
- package/out/web/pdfjs/cmaps/Adobe-Korea1-2.bcmap +0 -0
- package/out/web/pdfjs/cmaps/Adobe-Korea1-UCS2.bcmap +0 -0
- package/out/web/pdfjs/cmaps/B5-H.bcmap +0 -0
- package/out/web/pdfjs/cmaps/B5-V.bcmap +0 -0
- package/out/web/pdfjs/cmaps/B5pc-H.bcmap +0 -0
- package/out/web/pdfjs/cmaps/B5pc-V.bcmap +0 -0
- package/out/web/pdfjs/cmaps/CNS-EUC-H.bcmap +0 -0
- package/out/web/pdfjs/cmaps/CNS-EUC-V.bcmap +0 -0
- package/out/web/pdfjs/cmaps/CNS1-H.bcmap +0 -0
- package/out/web/pdfjs/cmaps/CNS1-V.bcmap +0 -0
- package/out/web/pdfjs/cmaps/CNS2-H.bcmap +0 -0
- package/out/web/pdfjs/cmaps/CNS2-V.bcmap +3 -0
- package/out/web/pdfjs/cmaps/ETHK-B5-H.bcmap +0 -0
- package/out/web/pdfjs/cmaps/ETHK-B5-V.bcmap +0 -0
- package/out/web/pdfjs/cmaps/ETen-B5-H.bcmap +0 -0
- package/out/web/pdfjs/cmaps/ETen-B5-V.bcmap +0 -0
- package/out/web/pdfjs/cmaps/ETenms-B5-H.bcmap +3 -0
- package/out/web/pdfjs/cmaps/ETenms-B5-V.bcmap +0 -0
- package/out/web/pdfjs/cmaps/EUC-H.bcmap +0 -0
- package/out/web/pdfjs/cmaps/EUC-V.bcmap +0 -0
- package/out/web/pdfjs/cmaps/Ext-H.bcmap +0 -0
- package/out/web/pdfjs/cmaps/Ext-RKSJ-H.bcmap +0 -0
- package/out/web/pdfjs/cmaps/Ext-RKSJ-V.bcmap +0 -0
- package/out/web/pdfjs/cmaps/Ext-V.bcmap +0 -0
- package/out/web/pdfjs/cmaps/GB-EUC-H.bcmap +0 -0
- package/out/web/pdfjs/cmaps/GB-EUC-V.bcmap +0 -0
- package/out/web/pdfjs/cmaps/GB-H.bcmap +4 -0
- package/out/web/pdfjs/cmaps/GB-V.bcmap +0 -0
- package/out/web/pdfjs/cmaps/GBK-EUC-H.bcmap +0 -0
- package/out/web/pdfjs/cmaps/GBK-EUC-V.bcmap +0 -0
- package/out/web/pdfjs/cmaps/GBK2K-H.bcmap +0 -0
- package/out/web/pdfjs/cmaps/GBK2K-V.bcmap +0 -0
- package/out/web/pdfjs/cmaps/GBKp-EUC-H.bcmap +0 -0
- package/out/web/pdfjs/cmaps/GBKp-EUC-V.bcmap +0 -0
- package/out/web/pdfjs/cmaps/GBT-EUC-H.bcmap +0 -0
- package/out/web/pdfjs/cmaps/GBT-EUC-V.bcmap +0 -0
- package/out/web/pdfjs/cmaps/GBT-H.bcmap +0 -0
- package/out/web/pdfjs/cmaps/GBT-V.bcmap +0 -0
- package/out/web/pdfjs/cmaps/GBTpc-EUC-H.bcmap +0 -0
- package/out/web/pdfjs/cmaps/GBTpc-EUC-V.bcmap +0 -0
- package/out/web/pdfjs/cmaps/GBpc-EUC-H.bcmap +0 -0
- package/out/web/pdfjs/cmaps/GBpc-EUC-V.bcmap +0 -0
- package/out/web/pdfjs/cmaps/H.bcmap +0 -0
- package/out/web/pdfjs/cmaps/HKdla-B5-H.bcmap +0 -0
- package/out/web/pdfjs/cmaps/HKdla-B5-V.bcmap +0 -0
- package/out/web/pdfjs/cmaps/HKdlb-B5-H.bcmap +0 -0
- package/out/web/pdfjs/cmaps/HKdlb-B5-V.bcmap +0 -0
- package/out/web/pdfjs/cmaps/HKgccs-B5-H.bcmap +0 -0
- package/out/web/pdfjs/cmaps/HKgccs-B5-V.bcmap +0 -0
- package/out/web/pdfjs/cmaps/HKm314-B5-H.bcmap +0 -0
- package/out/web/pdfjs/cmaps/HKm314-B5-V.bcmap +0 -0
- package/out/web/pdfjs/cmaps/HKm471-B5-H.bcmap +0 -0
- package/out/web/pdfjs/cmaps/HKm471-B5-V.bcmap +0 -0
- package/out/web/pdfjs/cmaps/HKscs-B5-H.bcmap +0 -0
- package/out/web/pdfjs/cmaps/HKscs-B5-V.bcmap +0 -0
- package/out/web/pdfjs/cmaps/Hankaku.bcmap +0 -0
- package/out/web/pdfjs/cmaps/Hiragana.bcmap +0 -0
- package/out/web/pdfjs/cmaps/KSC-EUC-H.bcmap +0 -0
- package/out/web/pdfjs/cmaps/KSC-EUC-V.bcmap +0 -0
- package/out/web/pdfjs/cmaps/KSC-H.bcmap +0 -0
- package/out/web/pdfjs/cmaps/KSC-Johab-H.bcmap +0 -0
- package/out/web/pdfjs/cmaps/KSC-Johab-V.bcmap +0 -0
- package/out/web/pdfjs/cmaps/KSC-V.bcmap +0 -0
- package/out/web/pdfjs/cmaps/KSCms-UHC-H.bcmap +0 -0
- package/out/web/pdfjs/cmaps/KSCms-UHC-HW-H.bcmap +0 -0
- package/out/web/pdfjs/cmaps/KSCms-UHC-HW-V.bcmap +0 -0
- package/out/web/pdfjs/cmaps/KSCms-UHC-V.bcmap +0 -0
- package/out/web/pdfjs/cmaps/KSCpc-EUC-H.bcmap +0 -0
- package/out/web/pdfjs/cmaps/KSCpc-EUC-V.bcmap +0 -0
- package/out/web/pdfjs/cmaps/Katakana.bcmap +0 -0
- package/out/web/pdfjs/cmaps/LICENSE +36 -0
- package/out/web/pdfjs/cmaps/NWP-H.bcmap +0 -0
- package/out/web/pdfjs/cmaps/NWP-V.bcmap +0 -0
- package/out/web/pdfjs/cmaps/RKSJ-H.bcmap +0 -0
- package/out/web/pdfjs/cmaps/RKSJ-V.bcmap +0 -0
- package/out/web/pdfjs/cmaps/Roman.bcmap +0 -0
- package/out/web/pdfjs/cmaps/UniCNS-UCS2-H.bcmap +0 -0
- package/out/web/pdfjs/cmaps/UniCNS-UCS2-V.bcmap +0 -0
- package/out/web/pdfjs/cmaps/UniCNS-UTF16-H.bcmap +0 -0
- package/out/web/pdfjs/cmaps/UniCNS-UTF16-V.bcmap +0 -0
- package/out/web/pdfjs/cmaps/UniCNS-UTF32-H.bcmap +0 -0
- package/out/web/pdfjs/cmaps/UniCNS-UTF32-V.bcmap +0 -0
- package/out/web/pdfjs/cmaps/UniCNS-UTF8-H.bcmap +0 -0
- package/out/web/pdfjs/cmaps/UniCNS-UTF8-V.bcmap +0 -0
- package/out/web/pdfjs/cmaps/UniGB-UCS2-H.bcmap +0 -0
- package/out/web/pdfjs/cmaps/UniGB-UCS2-V.bcmap +0 -0
- package/out/web/pdfjs/cmaps/UniGB-UTF16-H.bcmap +0 -0
- package/out/web/pdfjs/cmaps/UniGB-UTF16-V.bcmap +0 -0
- package/out/web/pdfjs/cmaps/UniGB-UTF32-H.bcmap +0 -0
- package/out/web/pdfjs/cmaps/UniGB-UTF32-V.bcmap +0 -0
- package/out/web/pdfjs/cmaps/UniGB-UTF8-H.bcmap +0 -0
- package/out/web/pdfjs/cmaps/UniGB-UTF8-V.bcmap +0 -0
- package/out/web/pdfjs/cmaps/UniJIS-UCS2-H.bcmap +0 -0
- package/out/web/pdfjs/cmaps/UniJIS-UCS2-HW-H.bcmap +0 -0
- package/out/web/pdfjs/cmaps/UniJIS-UCS2-HW-V.bcmap +0 -0
- package/out/web/pdfjs/cmaps/UniJIS-UCS2-V.bcmap +0 -0
- package/out/web/pdfjs/cmaps/UniJIS-UTF16-H.bcmap +0 -0
- package/out/web/pdfjs/cmaps/UniJIS-UTF16-V.bcmap +0 -0
- package/out/web/pdfjs/cmaps/UniJIS-UTF32-H.bcmap +0 -0
- package/out/web/pdfjs/cmaps/UniJIS-UTF32-V.bcmap +0 -0
- package/out/web/pdfjs/cmaps/UniJIS-UTF8-H.bcmap +0 -0
- package/out/web/pdfjs/cmaps/UniJIS-UTF8-V.bcmap +0 -0
- package/out/web/pdfjs/cmaps/UniJIS2004-UTF16-H.bcmap +0 -0
- package/out/web/pdfjs/cmaps/UniJIS2004-UTF16-V.bcmap +0 -0
- package/out/web/pdfjs/cmaps/UniJIS2004-UTF32-H.bcmap +0 -0
- package/out/web/pdfjs/cmaps/UniJIS2004-UTF32-V.bcmap +0 -0
- package/out/web/pdfjs/cmaps/UniJIS2004-UTF8-H.bcmap +0 -0
- package/out/web/pdfjs/cmaps/UniJIS2004-UTF8-V.bcmap +0 -0
- package/out/web/pdfjs/cmaps/UniJISPro-UCS2-HW-V.bcmap +0 -0
- package/out/web/pdfjs/cmaps/UniJISPro-UCS2-V.bcmap +0 -0
- package/out/web/pdfjs/cmaps/UniJISPro-UTF8-V.bcmap +0 -0
- package/out/web/pdfjs/cmaps/UniJISX0213-UTF32-H.bcmap +0 -0
- package/out/web/pdfjs/cmaps/UniJISX0213-UTF32-V.bcmap +0 -0
- package/out/web/pdfjs/cmaps/UniJISX02132004-UTF32-H.bcmap +0 -0
- package/out/web/pdfjs/cmaps/UniJISX02132004-UTF32-V.bcmap +0 -0
- package/out/web/pdfjs/cmaps/UniKS-UCS2-H.bcmap +0 -0
- package/out/web/pdfjs/cmaps/UniKS-UCS2-V.bcmap +0 -0
- package/out/web/pdfjs/cmaps/UniKS-UTF16-H.bcmap +0 -0
- package/out/web/pdfjs/cmaps/UniKS-UTF16-V.bcmap +0 -0
- package/out/web/pdfjs/cmaps/UniKS-UTF32-H.bcmap +0 -0
- package/out/web/pdfjs/cmaps/UniKS-UTF32-V.bcmap +0 -0
- package/out/web/pdfjs/cmaps/UniKS-UTF8-H.bcmap +0 -0
- package/out/web/pdfjs/cmaps/UniKS-UTF8-V.bcmap +0 -0
- package/out/web/pdfjs/cmaps/V.bcmap +0 -0
- package/out/web/pdfjs/cmaps/WP-Symbol.bcmap +0 -0
- package/out/web/pdfjs/standard_fonts/FoxitDingbats.pfb +0 -0
- package/out/web/pdfjs/standard_fonts/FoxitFixed.pfb +0 -0
- package/out/web/pdfjs/standard_fonts/FoxitFixedBold.pfb +0 -0
- package/out/web/pdfjs/standard_fonts/FoxitFixedBoldItalic.pfb +0 -0
- package/out/web/pdfjs/standard_fonts/FoxitFixedItalic.pfb +0 -0
- package/out/web/pdfjs/standard_fonts/FoxitSerif.pfb +0 -0
- package/out/web/pdfjs/standard_fonts/FoxitSerifBold.pfb +0 -0
- package/out/web/pdfjs/standard_fonts/FoxitSerifBoldItalic.pfb +0 -0
- package/out/web/pdfjs/standard_fonts/FoxitSerifItalic.pfb +0 -0
- package/out/web/pdfjs/standard_fonts/FoxitSymbol.pfb +0 -0
- package/out/web/pdfjs/standard_fonts/LICENSE_FOXIT +27 -0
- package/out/web/pdfjs/standard_fonts/LICENSE_LIBERATION +363 -0
- package/out/web/pdfjs/standard_fonts/LiberationSans-Bold.ttf +0 -0
- package/out/web/pdfjs/standard_fonts/LiberationSans-BoldItalic.ttf +0 -0
- package/out/web/pdfjs/standard_fonts/LiberationSans-Italic.ttf +0 -0
- package/out/web/pdfjs/standard_fonts/LiberationSans-Regular.ttf +0 -0
- package/out/web/pdfjs/wasm/LICENSE_JBIG2 +196 -0
- package/out/web/pdfjs/wasm/LICENSE_OPENJPEG +39 -0
- package/out/web/pdfjs/wasm/LICENSE_PDFJS_JBIG2 +13 -0
- package/out/web/pdfjs/wasm/LICENSE_PDFJS_OPENJPEG +22 -0
- package/out/web/pdfjs/wasm/LICENSE_PDFJS_QCMS +19 -0
- package/out/web/pdfjs/wasm/LICENSE_QCMS +21 -0
- package/out/web/pdfjs/wasm/jbig2.wasm +0 -0
- package/out/web/pdfjs/wasm/jbig2_nowasm_fallback.js +15 -0
- package/out/web/pdfjs/wasm/openjpeg.wasm +0 -0
- package/out/web/pdfjs/wasm/openjpeg_nowasm_fallback.js +17 -0
- package/out/web/pdfjs/wasm/qcms_bg.wasm +0 -0
- package/out/web/pdfjs/wasm/quickjs-eval.js +16 -0
- package/out/web/pdfjs/wasm/quickjs-eval.wasm +0 -0
- package/package.json +6 -4
- package/slash-commands.json +8 -2
- package/src/bin/index.js +4 -1
- package/src/bin/pdfjs-assets.mjs +31 -0
- package/src/renderer/node_modules/.vite/vitest/CACHEDIR.TAG +3 -0
- package/src/renderer/node_modules/.vite/vitest/da39a3ee5e6b4b0d3255bfef95601890afd80709/results.json +1 -1
- package/src/renderer/shared/agentProgress.ts +11 -2
- package/src/renderer/shared/components/Settings/AgentsTab.tsx +70 -6
- package/src/renderer/shared/components/Settings/AudioTab.tsx +1 -1
- package/src/renderer/shared/components/Settings/AutomationTab.tsx +57 -0
- package/src/renderer/shared/components/Settings/AvatarCropModal.tsx +18 -12
- package/src/renderer/shared/components/Settings/CustomProviderLogoPicker.test.tsx +65 -0
- package/src/renderer/shared/components/Settings/CustomProviderLogoPicker.tsx +456 -0
- package/src/renderer/shared/components/Settings/GeneralTab.tsx +40 -82
- package/src/renderer/shared/components/Settings/PluginsTab.tsx +101 -24
- package/src/renderer/shared/components/Settings/ProfileTab.tsx +1 -1
- package/src/renderer/shared/components/Settings/SettingsWindow.tsx +796 -0
- package/src/renderer/shared/components/Settings/ThemeTab.tsx +13 -1
- package/src/renderer/shared/components/{AgentActivityDrawer.tsx → activity/AgentActivityDrawer.tsx} +77 -61
- package/src/renderer/shared/components/{AgentActivityTable.tsx → activity/AgentActivityTable.tsx} +46 -7
- package/src/renderer/shared/components/{McpToolResults.tsx → activity/McpToolResults.tsx} +32 -13
- package/src/renderer/shared/components/{PlanChecklistWidget.tsx → activity/PlanChecklistWidget.tsx} +2 -2
- package/src/renderer/shared/components/activity/RunSummaryDashboard.test.tsx +127 -0
- package/src/renderer/shared/components/activity/RunSummaryDashboard.tsx +222 -0
- package/src/renderer/shared/components/activity/SubagentDagView.test.ts +123 -0
- package/src/renderer/shared/components/{SubagentDagView.tsx → activity/SubagentDagView.tsx} +97 -43
- package/src/renderer/shared/components/activity/SubagentStatusStrip.test.tsx +82 -0
- package/src/renderer/shared/components/activity/SubagentStatusStrip.tsx +107 -0
- package/src/renderer/shared/components/activity/ViewedImages.tsx +140 -0
- package/src/renderer/shared/components/{AuthGate.tsx → app/AuthGate.tsx} +3 -3
- package/src/renderer/shared/components/{ChunkErrorBoundary.tsx → app/ChunkErrorBoundary.tsx} +10 -10
- package/src/renderer/shared/components/{CommandPalette.tsx → app/CommandPalette.tsx} +25 -25
- package/src/renderer/shared/components/{DashboardSidebar.tsx → app/DashboardSidebar.tsx} +7 -5
- package/src/renderer/shared/components/{DesktopTitlebar.tsx → app/DesktopTitlebar.tsx} +7 -24
- package/src/renderer/shared/components/{ErrorNotice.tsx → app/ErrorNotice.tsx} +1 -1
- package/src/renderer/shared/components/{MintDashboard.tsx → app/MintDashboard.tsx} +191 -212
- package/src/renderer/shared/components/{ModalErrorBoundary.tsx → app/ModalErrorBoundary.tsx} +5 -5
- package/src/renderer/shared/components/{CalculationCard.tsx → cards/CalculationCard.tsx} +13 -27
- package/src/renderer/shared/components/{ImageGenCard.tsx → cards/ImageGenCard.tsx} +9 -22
- package/src/renderer/shared/components/{ImageSearchCard.tsx → cards/ImageSearchCard.tsx} +9 -22
- package/src/renderer/shared/components/{MermaidCard.tsx → cards/MermaidCard.tsx} +37 -21
- package/src/renderer/shared/components/{StockCard.tsx → cards/StockCard.tsx} +15 -31
- package/src/renderer/shared/components/cards/ToolResultCards.tsx +86 -0
- package/src/renderer/shared/components/{UiFeatureCard.tsx → cards/UiFeatureCard.tsx} +6 -6
- package/src/renderer/shared/components/{UiGridCard.tsx → cards/UiGridCard.tsx} +3 -3
- package/src/renderer/shared/components/{WeatherCard.tsx → cards/WeatherCard.tsx} +1 -1
- package/src/renderer/shared/components/{ApprovalCard.test.tsx → chat/ApprovalCard.test.tsx} +1 -1
- package/src/renderer/shared/components/{ApprovalCard.tsx → chat/ApprovalCard.tsx} +5 -5
- package/src/renderer/shared/components/{ChatCodeBlock.tsx → chat/ChatCodeBlock.tsx} +1 -1
- package/src/renderer/shared/components/{ChatMessageItem.test.tsx → chat/ChatMessageItem.test.tsx} +92 -15
- package/src/renderer/shared/components/{ChatMessageItem.tsx → chat/ChatMessageItem.tsx} +73 -157
- package/src/renderer/shared/components/chat/ChatPanel.test.tsx +31 -0
- package/src/renderer/shared/components/{ChatPanel.tsx → chat/ChatPanel.tsx} +244 -493
- package/src/renderer/shared/components/{CollapsiblePasteInput.tsx → chat/CollapsiblePasteInput.tsx} +2 -2
- package/src/renderer/shared/components/{DiffReviewModal.tsx → chat/DiffReviewModal.tsx} +40 -40
- package/src/renderer/shared/components/{GeminiLiveOverlay.tsx → chat/GeminiLiveOverlay.tsx} +2 -2
- package/src/renderer/shared/components/{ModelSelectorPopover.tsx → chat/ModelSelectorPopover.tsx} +3 -3
- package/src/renderer/shared/components/chat/QueuedMessagesBanner.test.tsx +89 -0
- package/src/renderer/shared/components/chat/QueuedMessagesBanner.tsx +201 -0
- package/src/renderer/shared/components/{RewindModal.tsx → chat/RewindModal.tsx} +4 -4
- package/src/renderer/shared/components/{SlashChoicePanel.tsx → chat/SlashChoicePanel.tsx} +2 -2
- package/src/renderer/shared/components/{SlashSuggestions.tsx → chat/SlashSuggestions.tsx} +4 -4
- package/src/renderer/shared/components/{SourcesBlock.tsx → chat/SourcesBlock.tsx} +30 -37
- package/src/renderer/shared/components/{ThinkingBlock.tsx → chat/ThinkingBlock.tsx} +1 -1
- package/src/renderer/shared/components/chat/TurnFileChanges.test.tsx +86 -0
- package/src/renderer/shared/components/chat/TurnFileChanges.tsx +430 -0
- package/src/renderer/shared/components/{VoicePill.css → chat/VoicePill.css} +1 -1
- package/src/renderer/shared/components/{VoicePill.jsx → chat/VoicePill.jsx} +3 -2
- package/src/renderer/shared/components/{CliSessionsView.test.tsx → extensions/CliSessionsView.test.tsx} +2 -2
- package/src/renderer/shared/components/{CliSessionsView.tsx → extensions/CliSessionsView.tsx} +14 -12
- package/src/renderer/shared/components/{LinkedFoldersView.tsx → extensions/LinkedFoldersView.tsx} +3 -3
- package/src/renderer/shared/components/{McpRegistryPicker.tsx → extensions/McpRegistryPicker.tsx} +3 -3
- package/src/renderer/shared/components/{McpServersView.tsx → extensions/McpServersView.tsx} +105 -36
- package/src/renderer/shared/components/{McpToolAllowlist.tsx → extensions/McpToolAllowlist.tsx} +2 -2
- package/src/renderer/shared/components/{ModUi.test.tsx → extensions/ModUi.test.tsx} +9 -4
- package/src/renderer/shared/components/{ModsPanel.tsx → extensions/ModsPanel.tsx} +59 -7
- package/src/renderer/shared/components/{PluginsView.tsx → extensions/PluginsView.tsx} +6 -6
- package/src/renderer/shared/components/{ScheduledTasksView.tsx → extensions/ScheduledTasksView.tsx} +5 -5
- package/src/renderer/shared/components/extensions/SkillsView.test.tsx +31 -0
- package/src/renderer/shared/components/{SkillsView.tsx → extensions/SkillsView.tsx} +20 -4
- package/src/renderer/shared/components/{ImageStudioPanel.tsx → studio/ImageStudioPanel.tsx} +6 -6
- package/src/renderer/shared/components/{LibraryItemCard.tsx → studio/LibraryItemCard.tsx} +2 -2
- package/src/renderer/shared/components/{LibraryPage.tsx → studio/LibraryPage.tsx} +5 -5
- package/src/renderer/shared/components/{LibraryPreview.tsx → studio/LibraryPreview.tsx} +2 -2
- package/src/renderer/shared/components/{VeoStudioPanel.tsx → studio/VeoStudioPanel.tsx} +7 -7
- package/src/renderer/shared/components/{GlideSelect.css → ui/GlideSelect.css} +7 -6
- package/src/renderer/shared/components/ui/ProviderBrandIcon.test.tsx +67 -0
- package/src/renderer/shared/components/ui/ProviderBrandIcon.tsx +167 -0
- package/src/renderer/shared/components/ui/SelectField.tsx +506 -0
- package/src/renderer/shared/components/ui/error-recovery.css +10 -10
- package/src/renderer/shared/components/ui/error-recovery.tsx +1 -1
- package/src/renderer/shared/components/{ArtifactPreviewPanel.tsx → workspace/ArtifactPreviewPanel.tsx} +256 -112
- package/src/renderer/shared/components/workspace/BackgroundTerminals.test.tsx +63 -0
- package/src/renderer/shared/components/{BackgroundTerminals.tsx → workspace/BackgroundTerminals.tsx} +40 -9
- package/src/renderer/shared/components/{CodeReviewPage.tsx → workspace/CodeReviewPage.tsx} +47 -8
- package/src/renderer/shared/components/{GitBranchSelector.tsx → workspace/GitBranchSelector.tsx} +2 -2
- package/src/renderer/shared/components/workspace/SessionSources.tsx +113 -0
- package/src/renderer/shared/components/{TerminalDock.tsx → workspace/TerminalDock.tsx} +5 -2
- package/src/renderer/shared/components/workspace/ToolSurfacePage.test.tsx +68 -0
- package/src/renderer/shared/components/{ToolSurfacePage.tsx → workspace/ToolSurfacePage.tsx} +322 -71
- package/src/renderer/shared/components/{ToolsPanelToggle.tsx → workspace/ToolsPanelToggle.tsx} +1 -1
- package/src/renderer/shared/components/workspace/WorkspaceFileInfo.tsx +28 -0
- package/src/renderer/shared/components/workspace/WorkspaceMediaPreview.tsx +17 -0
- package/src/renderer/shared/components/{WorkspacePaneResizer.tsx → workspace/WorkspacePaneResizer.tsx} +1 -1
- package/src/renderer/shared/components/workspace/WorkspacePdfPreview.tsx +89 -0
- package/src/renderer/shared/components/{WorkspacePreviewActions.test.tsx → workspace/WorkspacePreviewActions.test.tsx} +48 -3
- package/src/renderer/shared/components/{WorkspacePreviewActions.tsx → workspace/WorkspacePreviewActions.tsx} +3 -3
- package/src/renderer/shared/components/{WorkspaceSelector.tsx → workspace/WorkspaceSelector.tsx} +99 -7
- package/src/renderer/shared/components/{workspace-selector.css → workspace/workspace-selector.css} +84 -2
- package/src/renderer/shared/constants/config.ts +7 -0
- package/src/renderer/shared/conversation/coordinator.test.ts +46 -0
- package/src/renderer/shared/conversation/coordinator.ts +50 -2
- package/src/renderer/shared/conversation/lifecycle.test.ts +163 -1
- package/src/renderer/shared/conversation/lifecycle.ts +164 -7
- package/src/renderer/shared/conversation/projectNavigation.test.ts +18 -0
- package/src/renderer/shared/conversation/projectNavigation.ts +11 -0
- package/src/renderer/shared/conversation/transport.test.ts +20 -0
- package/src/renderer/shared/conversation/transport.ts +51 -9
- package/src/renderer/shared/conversation/useConversationCoordinator.ts +42 -12
- package/src/renderer/shared/css/agent-observability.css +72 -11
- package/src/renderer/shared/css/chat-ui-cards.css +35 -35
- package/src/renderer/shared/css/code-review.css +86 -86
- package/src/renderer/shared/css/code-sessions.css +10 -10
- package/src/renderer/shared/css/file-changes.css +167 -5
- package/src/renderer/shared/css/management-views.css +78 -37
- package/src/renderer/shared/css/mcp-results.css +46 -3
- package/src/renderer/shared/css/queued-messages.css +221 -0
- package/src/renderer/shared/css/session-sources.css +12 -7
- package/src/renderer/shared/css/settings/agents.css +2 -2
- package/src/renderer/{src-web → shared}/css/settings/base.css +101 -107
- package/src/renderer/shared/css/settings/general.css +384 -92
- package/src/renderer/shared/css/settings/plugins.css +8 -8
- package/src/renderer/shared/css/settings/theme.css +44 -32
- package/src/renderer/shared/css/ui-tailwind.css +2 -2
- package/src/renderer/shared/css/viewed-images.css +89 -0
- package/src/renderer/shared/css/workspace-file-info.css +12 -0
- package/src/renderer/shared/css/workspace-media-preview.css +13 -0
- package/src/renderer/shared/env.d.ts +9 -0
- package/src/renderer/shared/platform.test.ts +143 -0
- package/src/renderer/shared/platform.ts +10 -4
- package/src/renderer/shared/speech/player.ts +160 -0
- package/src/renderer/shared/speech/types.ts +11 -0
- package/src/renderer/shared/theme/themeManager.test.ts +20 -0
- package/src/renderer/shared/theme/themeManager.ts +3 -1
- package/src/renderer/shared/theme/themes.ts +17 -4
- package/src/renderer/shared/theme/tokens.css +448 -51
- package/src/renderer/shared/types.ts +56 -1
- package/src/renderer/shared/utils/agentActivity.test.ts +165 -6
- package/src/renderer/shared/utils/agentActivity.ts +181 -31
- package/src/renderer/shared/utils/artifactBrowser.ts +1 -1
- package/src/renderer/shared/utils/artifacts.ts +55 -0
- package/src/renderer/shared/utils/contextCompaction.test.tsx +1 -1
- package/src/renderer/shared/utils/externalLinks.ts +91 -0
- package/src/renderer/shared/utils/lazyWithRetry.ts +13 -0
- package/src/renderer/shared/utils/markdown.tsx +169 -35
- package/src/renderer/shared/utils/markdown.webImages.test.tsx +124 -2
- package/src/renderer/shared/utils/mcpResults.test.tsx +24 -1
- package/src/renderer/shared/utils/pdfRange.ts +16 -0
- package/src/renderer/shared/utils/previewObjectUrls.ts +20 -0
- package/src/renderer/shared/utils/sessionSources.test.ts +41 -1
- package/src/renderer/shared/utils/sessionSources.ts +2 -0
- package/src/renderer/shared/utils/slashCommandProcessor.ts +4 -1
- package/src/renderer/shared/utils/speech.ts +18 -4
- package/src/renderer/shared/utils/useNativeVoiceInput.ts +19 -5
- package/src/renderer/shared/utils/useSessionSources.ts +4 -0
- package/src/renderer/shared/utils/viewedImages.test.ts +129 -0
- package/src/renderer/shared/utils/viewedImages.ts +81 -10
- package/src/renderer/shared/utils/workspaceDrag.ts +30 -0
- package/src/renderer/shared/utils/workspaceImage.ts +17 -0
- package/src/renderer/shared/utils/workspaceListPreferences.test.ts +64 -0
- package/src/renderer/shared/utils/workspaceListPreferences.ts +54 -0
- package/src/renderer/shared/utils/workspaceMedia.ts +41 -0
- package/src/renderer/shared/utils/workspacePreview.test.ts +147 -2
- package/src/renderer/shared/utils/workspacePreview.ts +34 -3
- package/src/renderer/shared/utils/workspaces.ts +3 -2
- package/src/renderer/src/App.tsx +6 -8
- package/src/renderer/src/components/ChatPanel.tsx +1 -1
- package/src/renderer/src/components/DashboardSidebar.tsx +2 -2
- package/src/renderer/src/components/ImageStudioPanel.tsx +1 -1
- package/src/renderer/src/components/LiveTranslateControls.tsx +1 -1
- package/src/renderer/src/components/MintDashboard.tsx +1 -1
- package/src/renderer/src/components/ProactiveGlow.tsx +1 -1
- package/src/renderer/src/components/ScreenPicker.tsx +1 -1
- package/src/renderer/src/components/SettingsWindow.tsx +6 -830
- package/src/renderer/src/components/SpotlightWindow.tsx +4 -32
- package/src/renderer/src/components/VeoStudioPanel.tsx +1 -1
- package/src/renderer/src/components/WorkspacePanel.tsx +45 -12
- package/src/renderer/src/components/browser-shell.css +26 -26
- package/src/renderer/src/components/browser-suggestions-popup.css +8 -8
- package/src/renderer/src/css/app-shell.css +22 -102
- package/src/renderer/src/css/chat.css +221 -34
- package/src/renderer/src/css/desktop-tools.css +6 -337
- package/src/renderer/src/css/sidebar-workspace.css +20 -0
- package/src/renderer/src/css/spotlight.css +2 -2
- package/src/renderer/src/css/tool-surfaces.css +328 -58
- package/src/renderer/src/css/widget.css +6 -5
- package/src/renderer/src/env.d.ts +13 -0
- package/src/renderer/src/index.css +15 -63
- package/src/renderer/src/tauri.ts +77 -11
- package/src/renderer/src/voiceInput.ts +3 -1
- package/src/renderer/src-web/App.tsx +6 -8
- package/src/renderer/src-web/components/ChatPanel.tsx +1 -1
- package/src/renderer/src-web/components/DashboardSidebar.tsx +2 -2
- package/src/renderer/src-web/components/ImageStudioPanel.tsx +1 -1
- package/src/renderer/src-web/components/MintDashboard.tsx +1 -1
- package/src/renderer/src-web/components/SettingsWindow.tsx +6 -851
- package/src/renderer/src-web/components/VeoStudioPanel.tsx +1 -1
- package/src/renderer/src-web/css/app-shell.css +16 -100
- package/src/renderer/src-web/css/chat.css +221 -34
- package/src/renderer/src-web/css/sidebar-workspace.css +20 -0
- package/src/renderer/src-web/env.d.ts +14 -0
- package/src/renderer/src-web/index.css +15 -63
- package/src/renderer/src-web/tauri.ts +71 -13
- package/src/renderer/tests/browserArtifacts.browser.html +1 -0
- package/src/renderer/tests/browserArtifacts.browser.tsx +68 -0
- package/src/renderer/tests/chatEscape.browser.html +1 -0
- package/src/renderer/tests/chatEscape.browser.tsx +25 -0
- package/src/renderer/tests/chatPerformance.browser.html +1 -1
- package/src/renderer/tests/collapsedPaste.browser.html +1 -1
- package/src/renderer/tests/composerMenus.browser.html +3 -3
- package/src/renderer/tests/contextCompaction.browser.html +1 -1
- package/src/renderer/tests/errorRecovery.browser.html +1 -1
- package/src/renderer/tests/fixtures/preview.webm +0 -0
- package/src/renderer/tests/glideSelect.browser.html +1 -2
- package/src/renderer/tests/glideSelect.preview.html +1 -1
- package/src/renderer/tests/library.browser.tsx +1 -1
- package/src/renderer/tests/liveOrb.browser.html +1 -1
- package/src/renderer/tests/mediaFixtures.ts +32 -0
- package/src/renderer/tests/modInput.browser.html +1 -1
- package/src/renderer/tests/sessionSources.browser.tsx +76 -15
- package/src/renderer/tests/toolsPanel.browser.tsx +5 -5
- package/src/renderer/tests/viewedImages.browser.tsx +3 -3
- package/src/renderer/tests/voiceDictation.browser.html +101 -0
- package/src/renderer/tests/voicePill.browser.html +3 -3
- package/src/renderer/tests/voicePill.preview.html +1 -1
- package/src/renderer/tests/webSources.browser.tsx +2 -98
- package/src/renderer/tests/workspaceDrop.browser.html +1 -0
- package/src/renderer/tests/workspaceDrop.browser.tsx +183 -0
- package/src/renderer/tests/workspaceExpansion.browser.html +1 -0
- package/src/renderer/tests/workspaceExpansion.browser.tsx +66 -0
- package/src/renderer/tests/workspaceRemoval.browser.html +66 -0
- package/src/renderer/tests/workspaceUndo.browser.html +10 -2
- package/src-tauri/src/app/lifecycle.rs +44 -1
- package/src-tauri/src/commands/conversation.rs +99 -73
- package/src-tauri/src/commands/integrations.rs +7 -1
- package/src-tauri/src/commands/media.rs +7 -0
- package/src-tauri/src/commands/workspace.rs +38 -0
- package/tsconfig.json +15 -1
- package/vite.config.ts +2 -1
- package/vite.config.web.ts +2 -0
- package/out/web/assets/CliSessionsView-D7hw0Mgj.js +0 -1
- package/out/web/assets/CodeReviewPage-C7bEOJfd.js +0 -4
- package/out/web/assets/CodeReviewPage-Dte9uLiL.css +0 -1
- package/out/web/assets/CommandPalette-0RrF-AOT.js +0 -1
- package/out/web/assets/ImageStudioPanel-CdxkAf_r.js +0 -1
- package/out/web/assets/LibraryPage--Qfisp6D.js +0 -2
- package/out/web/assets/LinkedFoldersView-2nfZbDgN.js +0 -1
- package/out/web/assets/McpRegistryPicker-h9uS8_wT.js +0 -1
- package/out/web/assets/McpServersView-slfQJzNB.js +0 -1
- package/out/web/assets/MintDashboard-BSR5XpXh.js +0 -25
- package/out/web/assets/MintDashboard-CWUcCGhd.css +0 -1
- package/out/web/assets/PluginsView-l7LSm503.js +0 -1
- package/out/web/assets/ScheduledTasksView-CttmLbq1.js +0 -1
- package/out/web/assets/SettingsWindow-BCMLYvEV.js +0 -4
- package/out/web/assets/SettingsWindow-DcMVmU9u.css +0 -1
- package/out/web/assets/SkillsView-rNs1qr_U.js +0 -2
- package/out/web/assets/ToolSurfacePage-B9DzEPWN.js +0 -37
- package/out/web/assets/ToolSurfacePage-CTfgggF2.css +0 -1
- package/out/web/assets/VeoStudioPanel-DiJs_Cg2.js +0 -4
- package/out/web/assets/WorkspacePanel-CbJ1PFoZ.js +0 -1
- package/out/web/assets/WorkspaceSelector-B2xIp04D.js +0 -1
- package/out/web/assets/WorkspaceSelector-Ca8uJOsS.css +0 -1
- package/out/web/assets/abnfDiagram-VCTEODGH-CD0CjoGl.js +0 -1
- package/out/web/assets/architecture-7GRP2DOG-RKV83OeZ.js +0 -1
- package/out/web/assets/architectureDiagram-5GKGNRK7-nN_HAFct.js +0 -36
- package/out/web/assets/c4Diagram-UCG6FXSJ-DTdV8_zE.js +0 -38
- package/out/web/assets/chunk-2Q5K7J3B-Dmqrq8Tp.js +0 -1
- package/out/web/assets/chunk-75Z2AOVW-_M0z5olV.js +0 -2
- package/out/web/assets/chunk-CKBBP62Z-BpQEgeHF.js +0 -2
- package/out/web/assets/chunk-CLGD4ZFX-D54yGvGS.js +0 -1
- package/out/web/assets/chunk-CacB07dV.js +0 -1
- package/out/web/assets/chunk-DSNCTWBM-C-gvT2ru.js +0 -2
- package/out/web/assets/chunk-DU6HZSFF-CnFngIhW.js +0 -128
- package/out/web/assets/chunk-F27PBJKO-BqtWrnEO.js +0 -1
- package/out/web/assets/chunk-FOHPRMQF-BaVC1uA7.js +0 -161
- package/out/web/assets/chunk-G27WJ6UU-Ckoq5mi2.js +0 -231
- package/out/web/assets/chunk-JQ64N6SF-CF8T7GiZ.js +0 -1
- package/out/web/assets/chunk-JWPE2WC7-BwtYOHqU.js +0 -1
- package/out/web/assets/chunk-LNGE3PJU-AdBoOWw2.js +0 -34
- package/out/web/assets/chunk-OBVCFTLP-CRIkunUB.js +0 -1
- package/out/web/assets/chunk-P2QGCYS3-UFEU6BxZ.js +0 -1
- package/out/web/assets/chunk-POPQ4Y6H-CQcrNbjr.js +0 -1
- package/out/web/assets/chunk-PWAF6VOD-Cc2uVDsG.js +0 -1
- package/out/web/assets/chunk-R7TYR2AO-DiCxzdAY.js +0 -10
- package/out/web/assets/chunk-RHFEMEQ7-b7hnPmrR.js +0 -168
- package/out/web/assets/chunk-XXDRQBXY-DnJkbUaw.js +0 -1
- package/out/web/assets/chunk-Y2CYZVJY-C9o-s6OY.js +0 -1
- package/out/web/assets/classDiagram-DTDB5LWJ-RnC2mYO4.js +0 -1
- package/out/web/assets/classDiagram-v2-JRS7N3AN-RnC2mYO4.js +0 -1
- package/out/web/assets/config-CnvCChUM.js +0 -2
- package/out/web/assets/config-DM6oIVO3.css +0 -1
- package/out/web/assets/core-DsKkQ7ig.js +0 -1
- package/out/web/assets/cose-bilkent-JH36ORCC--UN4aw5-.js +0 -1
- package/out/web/assets/cynefin-OW5HDTMX-CnzQfOGp.js +0 -1
- package/out/web/assets/cynefinDiagram-5FMLGOSQ-DVtQnfpm.js +0 -62
- package/out/web/assets/cytoscape.esm-Df1UN4Y1.js +0 -321
- package/out/web/assets/dagre-3AP2YEHR-DG76_k5_.js +0 -4
- package/out/web/assets/dagre-BWadQu2F.js +0 -1
- package/out/web/assets/diagram-S7CK7UJ4-CaouUoze.js +0 -30
- package/out/web/assets/diagram-UQ7AKVKN-B4bEc26B.js +0 -41
- package/out/web/assets/diagram-VX7I27RA-7hH5IPYf.js +0 -24
- package/out/web/assets/diagram-Z3DM3KII-CCM4clo8.js +0 -24
- package/out/web/assets/dist-BoTOASLF.js +0 -1
- package/out/web/assets/dist-js-BkYNznHX.js +0 -1
- package/out/web/assets/ebnfDiagram-PWID7BFC-Da7WAM3k.js +0 -1
- package/out/web/assets/event-Cdt7Byyj.js +0 -1
- package/out/web/assets/eventmodeling-NTZA5JFV-xcfsA0XD.js +0 -1
- package/out/web/assets/flowDiagram-A5DVABFB-JdtH1673.js +0 -1
- package/out/web/assets/ganttDiagram-EL5Y4UJY-B3ClFGmL.js +0 -292
- package/out/web/assets/gitGraph-4MIJSDKK-BZ_y_cDU.js +0 -1
- package/out/web/assets/gitGraphDiagram-WWUBYQGX-drhRSYm3.js +0 -106
- package/out/web/assets/graphlib-CTR5ZhLf.js +0 -1
- package/out/web/assets/index-BZ9xgmMP.css +0 -1
- package/out/web/assets/index-Ca8cCS4h.js +0 -168
- package/out/web/assets/info-A6RAGUB7-B7I3K0F1.js +0 -1
- package/out/web/assets/infoDiagram-RXCK75RN-deX_1MPh.js +0 -2
- package/out/web/assets/journeyDiagram-EYS64GPL-CZn2kB8b.js +0 -139
- package/out/web/assets/jsx-runtime-DN4NhQUK.js +0 -1
- package/out/web/assets/katex-O3jvqgnU.js +0 -257
- package/out/web/assets/markdown-CMhYIcWB.js +0 -39
- package/out/web/assets/mermaid-parser.core-Whu2rlJC.js +0 -7
- package/out/web/assets/mermaid.core-CKyPo8VH.js +0 -11
- package/out/web/assets/modelManager-CUaGWMWu.js +0 -2
- package/out/web/assets/oauthManager-DlNhXJr6.js +0 -1
- package/out/web/assets/packet-AYTQ26CC-CEeIRKRG.js +0 -1
- package/out/web/assets/pegDiagram-XKGWAZYB-BYadI-KO.js +0 -1
- package/out/web/assets/pie-WAS4IAKB-D8uf4dh5.js +0 -1
- package/out/web/assets/pieDiagram-E7YTZNPT-CjSDy4hO.js +0 -39
- package/out/web/assets/radar-RG4KPBEZ-DZJxnokY.js +0 -1
- package/out/web/assets/railroad-74A4TZTK-DBysUiUi.js +0 -1
- package/out/web/assets/railroad-abnf-HS5TGJTU-CHWxoJYg.js +0 -1
- package/out/web/assets/railroad-ebnf-LZEXJU2U-DDv7X6bY.js +0 -1
- package/out/web/assets/railroad-peg-WCYAUIDC-DpfcYYNJ.js +0 -1
- package/out/web/assets/railroadDiagram-O6MQD6OU-CYtyv0t3.js +0 -1
- package/out/web/assets/rough.esm-DFbTUy8a.js +0 -1
- package/out/web/assets/sankeyDiagram-P5KCCOFB-Bn2x6C4Y.js +0 -40
- package/out/web/assets/sequenceDiagram-WJ2MYXX4-BvFLKtPd.js +0 -162
- package/out/web/assets/sizeCapture-X5ZJPWSS-DKeOCaN2.js +0 -1
- package/out/web/assets/src-DnfeXQPr.js +0 -1
- package/out/web/assets/stateDiagram-HBIQ2CUA-Bx0GWeaY.js +0 -1
- package/out/web/assets/stateDiagram-v2-4QOOHH4V--hol1yg_.js +0 -1
- package/out/web/assets/studio-B1mk40wD.js +0 -1
- package/out/web/assets/swimlanes-XN3QIQJK-CCma0T7L.js +0 -1
- package/out/web/assets/swimlanesDiagram-VK2B7HYN-BkohoVsU.js +0 -8
- package/out/web/assets/timeline-definition-24CTP7MA-iCRhhJ7C.js +0 -120
- package/out/web/assets/treeView-Q6P3EWNA-DZ-y08qp.js +0 -1
- package/out/web/assets/treemap-WGGIJYW6-De0CxzMx.js +0 -1
- package/out/web/assets/vennDiagram-4TSXK5OY-w_7aZ6xe.js +0 -34
- package/out/web/assets/wardley-WFR3VGLG-DT0y0xJ4.js +0 -1
- package/out/web/assets/window-BJCVtyET.js +0 -1
- package/src/renderer/shared/components/ChatPanel.test.tsx +0 -21
- package/src/renderer/shared/components/FormattedMessage.tsx +0 -11
- package/src/renderer/shared/components/GlideSelect.d.ts +0 -31
- package/src/renderer/shared/components/GlideSelect.jsx +0 -266
- package/src/renderer/shared/components/InlineThoughtNote.tsx +0 -27
- package/src/renderer/shared/components/ModSessionControls.tsx +0 -8
- package/src/renderer/shared/components/ModUi.tsx +0 -26
- package/src/renderer/shared/components/ProgressActivity.tsx +0 -17
- package/src/renderer/shared/components/ReviewHistory.tsx +0 -42
- package/src/renderer/shared/components/RunSummaryDashboard.tsx +0 -143
- package/src/renderer/shared/components/SelectField.tsx +0 -38
- package/src/renderer/shared/components/SessionSources.tsx +0 -48
- package/src/renderer/shared/components/SessionSourcesPopover.tsx +0 -61
- package/src/renderer/shared/components/ToolSurfacePage.test.tsx +0 -32
- package/src/renderer/shared/components/ViewedImages.tsx +0 -36
- package/src/renderer/shared/components/WorkspaceContextPopover.tsx +0 -138
- package/src/renderer/shared/components/ui/demo.tsx +0 -26
- package/src/renderer/shared/css/session-sources-popover.css +0 -9
- package/src/renderer/src/components/CalculationCard.tsx +0 -3
- package/src/renderer/src/components/ImageGenCard.tsx +0 -2
- package/src/renderer/src/components/ImageSearchCard.tsx +0 -2
- package/src/renderer/src/components/MermaidCard.tsx +0 -1
- package/src/renderer/src/components/PicturesLibrary.tsx +0 -2
- package/src/renderer/src/components/Settings/AgentsTab.tsx +0 -4
- package/src/renderer/src/components/Settings/AudioTab.tsx +0 -3
- package/src/renderer/src/components/Settings/AutomationTab.tsx +0 -3
- package/src/renderer/src/components/Settings/GeneralTab.tsx +0 -3
- package/src/renderer/src/components/Settings/MemoryTab.tsx +0 -3
- package/src/renderer/src/components/Settings/PluginsTab.tsx +0 -3
- package/src/renderer/src/components/Settings/ProfileTab.tsx +0 -3
- package/src/renderer/src/components/Settings/ShortcutsTab.tsx +0 -3
- package/src/renderer/src/components/Settings/ThemeTab.tsx +0 -3
- package/src/renderer/src/components/StockCard.tsx +0 -3
- package/src/renderer/src/components/WeatherCard.tsx +0 -3
- package/src/renderer/src/css/pictures.css +0 -2
- package/src/renderer/src/css/settings/base.css +0 -1266
- package/src/renderer/src-web/components/PicturesLibrary.tsx +0 -2
- package/src/renderer/src-web/components/Settings/AgentsTab.tsx +0 -4
- package/src/renderer/src-web/components/Settings/AudioTab.tsx +0 -3
- package/src/renderer/src-web/components/Settings/AutomationTab.tsx +0 -3
- package/src/renderer/src-web/components/Settings/GeneralTab.tsx +0 -3
- package/src/renderer/src-web/components/Settings/MemoryTab.tsx +0 -3
- package/src/renderer/src-web/components/Settings/PluginsTab.tsx +0 -3
- package/src/renderer/src-web/components/Settings/ProfileTab.tsx +0 -3
- package/src/renderer/src-web/components/Settings/ShortcutsTab.tsx +0 -3
- package/src/renderer/src-web/components/Settings/ThemeTab.tsx +0 -3
- package/src/renderer/src-web/css/pictures.css +0 -2
- package/src/renderer/src-web/css/spotlight.css +0 -102
- package/src/renderer/src-web/css/widget.css +0 -213
- /package/src/renderer/shared/components/{UiMockupWidget.tsx → cards/UiMockupWidget.tsx} +0 -0
- /package/src/renderer/shared/components/{ContextCompactionStatus.tsx → chat/ContextCompactionStatus.tsx} +0 -0
- /package/src/renderer/shared/components/{GeminiLiveOverlay.css → chat/GeminiLiveOverlay.css} +0 -0
- /package/src/renderer/shared/components/{GeminiLiveOverlay.test.tsx → chat/GeminiLiveOverlay.test.tsx} +0 -0
- /package/src/renderer/shared/components/{SlashSuggestions.test.tsx → chat/SlashSuggestions.test.tsx} +0 -0
- /package/src/renderer/shared/components/{VirtualChatHistory.tsx → chat/VirtualChatHistory.tsx} +0 -0
- /package/src/renderer/shared/components/{VoicePill.d.ts → chat/VoicePill.d.ts} +0 -0
- /package/src/renderer/shared/components/{VoicePill.test.tsx → chat/VoicePill.test.tsx} +0 -0
- /package/src/renderer/shared/components/{ScreenCaptureDialog.css → studio/ScreenCaptureDialog.css} +0 -0
- /package/src/renderer/shared/components/{ScreenCaptureDialog.tsx → studio/ScreenCaptureDialog.tsx} +0 -0
- /package/src/renderer/shared/components/{SelectField.test.tsx → ui/SelectField.test.tsx} +0 -0
- /package/src/renderer/shared/components/{background-terminals.css → workspace/background-terminals.css} +0 -0
|
@@ -1,18 +1,53 @@
|
|
|
1
|
-
import React, { useState, useEffect, useCallback, useMemo, useRef } from 'react'
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import React, { lazy, Suspense, useState, useEffect, useCallback, useMemo, useRef } from 'react'
|
|
2
|
+
import {
|
|
3
|
+
Image as ImageIcon,
|
|
4
|
+
FileCode,
|
|
5
|
+
FileText,
|
|
6
|
+
Globe,
|
|
7
|
+
Music,
|
|
8
|
+
Video,
|
|
9
|
+
File,
|
|
10
|
+
Eye,
|
|
11
|
+
} from 'lucide-react'
|
|
12
|
+
import { openArtifactInMintBrowser } from '../../utils/artifactBrowser'
|
|
13
|
+
import { runtimePlatform } from '../../platform'
|
|
14
|
+
import { renderFormattedMessage } from '../../utils/markdown'
|
|
15
|
+
import { ChatCodeBlock } from '../chat/ChatCodeBlock'
|
|
16
|
+
import WorkspaceFileInfo from './WorkspaceFileInfo'
|
|
17
|
+
import WorkspaceMediaPreview from './WorkspaceMediaPreview'
|
|
6
18
|
|
|
7
|
-
|
|
8
|
-
export type ViewportMode = 'desktop' | 'tablet' | 'mobile'
|
|
19
|
+
const WorkspacePdfPreview = lazy(() => import('./WorkspacePdfPreview'))
|
|
9
20
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
21
|
+
import {
|
|
22
|
+
type ArtifactFile,
|
|
23
|
+
type ArtifactType,
|
|
24
|
+
type ViewportMode,
|
|
25
|
+
detectArtifactType,
|
|
26
|
+
getFileLanguage,
|
|
27
|
+
} from '../../utils/artifacts'
|
|
28
|
+
|
|
29
|
+
export type { ArtifactFile, ArtifactType, ViewportMode }
|
|
30
|
+
export { detectArtifactType, getFileLanguage }
|
|
31
|
+
|
|
32
|
+
function renderArtifactTypeIcon(type: ArtifactType) {
|
|
33
|
+
switch (type) {
|
|
34
|
+
case 'image':
|
|
35
|
+
return <ImageIcon size={13} strokeWidth={2.2} aria-hidden="true" />
|
|
36
|
+
case 'html':
|
|
37
|
+
return <Globe size={13} strokeWidth={2.2} aria-hidden="true" />
|
|
38
|
+
case 'svg':
|
|
39
|
+
case 'code':
|
|
40
|
+
return <FileCode size={13} strokeWidth={2.2} aria-hidden="true" />
|
|
41
|
+
case 'markdown':
|
|
42
|
+
case 'pdf':
|
|
43
|
+
return <FileText size={13} strokeWidth={2.2} aria-hidden="true" />
|
|
44
|
+
case 'audio':
|
|
45
|
+
return <Music size={13} strokeWidth={2.2} aria-hidden="true" />
|
|
46
|
+
case 'video':
|
|
47
|
+
return <Video size={13} strokeWidth={2.2} aria-hidden="true" />
|
|
48
|
+
default:
|
|
49
|
+
return <File size={13} strokeWidth={2.2} aria-hidden="true" />
|
|
50
|
+
}
|
|
16
51
|
}
|
|
17
52
|
|
|
18
53
|
interface Props {
|
|
@@ -21,38 +56,25 @@ interface Props {
|
|
|
21
56
|
workspacePath?: string
|
|
22
57
|
}
|
|
23
58
|
|
|
24
|
-
export function
|
|
25
|
-
const
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
}
|
|
59
|
+
export function ArtifactPreviewPanel({ artifact, onClose, workspacePath }: Props) {
|
|
60
|
+
const filePath = artifact?.path || ''
|
|
61
|
+
const fileName = useMemo(() => {
|
|
62
|
+
if (!filePath) return ''
|
|
63
|
+
const parts = filePath.replace(/\\/g, '/').split('/')
|
|
64
|
+
return parts[parts.length - 1] || filePath
|
|
65
|
+
}, [filePath])
|
|
32
66
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
jsx: 'javascript',
|
|
38
|
-
ts: 'typescript',
|
|
39
|
-
tsx: 'typescript',
|
|
40
|
-
html: 'html',
|
|
41
|
-
htm: 'html',
|
|
42
|
-
css: 'css',
|
|
43
|
-
json: 'json',
|
|
44
|
-
rs: 'rust',
|
|
45
|
-
py: 'python',
|
|
46
|
-
svg: 'xml',
|
|
47
|
-
md: 'markdown',
|
|
48
|
-
}
|
|
49
|
-
return map[ext] || ext || 'plaintext'
|
|
50
|
-
}
|
|
67
|
+
const artifactType: ArtifactType = useMemo(() => {
|
|
68
|
+
if (artifact?.type) return artifact.type
|
|
69
|
+
return detectArtifactType(filePath)
|
|
70
|
+
}, [artifact, filePath])
|
|
51
71
|
|
|
52
|
-
|
|
53
|
-
|
|
72
|
+
const isDualMode = artifactType === 'html' || artifactType === 'svg' || artifactType === 'markdown'
|
|
73
|
+
|
|
74
|
+
const [activeTab, setActiveTab] = useState<'preview' | 'code'>(artifactType === 'code' ? 'code' : 'preview')
|
|
54
75
|
const [viewport, setViewport] = useState<ViewportMode>('desktop')
|
|
55
76
|
const [content, setContent] = useState<string>(artifact?.content || '')
|
|
77
|
+
const [imageUrl, setImageUrl] = useState(artifact?.url || '')
|
|
56
78
|
const [loading, setLoading] = useState<boolean>(false)
|
|
57
79
|
const [error, setError] = useState<string | null>(null)
|
|
58
80
|
const [openingBrowser, setOpeningBrowser] = useState(false)
|
|
@@ -61,33 +83,70 @@ export function ArtifactPreviewPanel({ artifact, onClose, workspacePath }: Props
|
|
|
61
83
|
const currentArtifact = useRef(artifact)
|
|
62
84
|
currentArtifact.current = artifact
|
|
63
85
|
const [copied, setCopied] = useState<boolean>(false)
|
|
86
|
+
const [imageDimensions, setImageDimensions] = useState<{ width: number; height: number } | null>(null)
|
|
64
87
|
|
|
65
88
|
const [reloadRevision, setReloadRevision] = useState(0)
|
|
66
89
|
const requestRevision = useRef(0)
|
|
67
90
|
const sourceWorkspace = artifact?.workspacePath ?? workspacePath
|
|
68
91
|
|
|
69
|
-
const
|
|
70
|
-
const
|
|
71
|
-
if (!filePath) return ''
|
|
72
|
-
const parts = filePath.replace(/\\/g, '/').split('/')
|
|
73
|
-
return parts[parts.length - 1] || filePath
|
|
74
|
-
}, [filePath])
|
|
92
|
+
const language = useMemo(() => getFileLanguage(filePath), [filePath])
|
|
93
|
+
const mediaPreview = artifactType === 'pdf' || artifactType === 'audio' || artifactType === 'video'
|
|
75
94
|
|
|
76
|
-
const
|
|
77
|
-
if (
|
|
78
|
-
|
|
79
|
-
|
|
95
|
+
const imageFormatLabel = useMemo(() => {
|
|
96
|
+
if (artifactType !== 'image') return 'Image'
|
|
97
|
+
const ext = filePath.split('.').pop()?.toUpperCase() || ''
|
|
98
|
+
if (ext === 'JPG') return 'JPEG'
|
|
99
|
+
if (['PNG', 'JPEG', 'WEBP', 'GIF', 'SVG', 'ICO', 'AVIF', 'BMP', 'TIFF'].includes(ext)) {
|
|
100
|
+
return ext
|
|
101
|
+
}
|
|
102
|
+
return 'IMAGE'
|
|
103
|
+
}, [artifactType, filePath])
|
|
80
104
|
|
|
81
|
-
const
|
|
105
|
+
const codeLabel = useMemo(() => {
|
|
106
|
+
if (!language || language === 'plaintext') return 'Code'
|
|
107
|
+
const customNames: Record<string, string> = {
|
|
108
|
+
javascript: 'JavaScript',
|
|
109
|
+
typescript: 'TypeScript',
|
|
110
|
+
python: 'Python',
|
|
111
|
+
rust: 'Rust',
|
|
112
|
+
json: 'JSON',
|
|
113
|
+
html: 'HTML',
|
|
114
|
+
css: 'CSS',
|
|
115
|
+
cpp: 'C++',
|
|
116
|
+
csharp: 'C#',
|
|
117
|
+
php: 'PHP',
|
|
118
|
+
ruby: 'Ruby',
|
|
119
|
+
shell: 'Shell',
|
|
120
|
+
bash: 'Bash',
|
|
121
|
+
sql: 'SQL',
|
|
122
|
+
yaml: 'YAML',
|
|
123
|
+
xml: 'XML',
|
|
124
|
+
toml: 'TOML',
|
|
125
|
+
markdown: 'Markdown',
|
|
126
|
+
}
|
|
127
|
+
return customNames[language.toLowerCase()] || (language.charAt(0).toUpperCase() + language.slice(1))
|
|
128
|
+
}, [language])
|
|
82
129
|
|
|
83
|
-
const fetchContent = useCallback(async () => {
|
|
130
|
+
const fetchContent = useCallback(async (refreshImage = false) => {
|
|
84
131
|
const revision = ++requestRevision.current
|
|
85
132
|
setError(null)
|
|
133
|
+
setImageDimensions(null)
|
|
86
134
|
setReloadRevision((value) => value + 1)
|
|
87
135
|
if (!filePath) return
|
|
136
|
+
if (refreshImage && activeTab === 'preview' && (artifactType === 'image' || artifactType === 'svg') && artifact?.url?.startsWith('data:image/') && sourceWorkspace) {
|
|
137
|
+
setLoading(true)
|
|
138
|
+
try {
|
|
139
|
+
const url = await runtimePlatform.readWorkspaceImage(filePath, sourceWorkspace)
|
|
140
|
+
if (requestRevision.current === revision) setImageUrl(url)
|
|
141
|
+
} catch (reason) {
|
|
142
|
+
if (requestRevision.current === revision) setError(reason instanceof Error ? reason.message : String(reason))
|
|
143
|
+
} finally { if (requestRevision.current === revision) setLoading(false) }
|
|
144
|
+
return
|
|
145
|
+
}
|
|
88
146
|
// Served previews load directly. Text is only needed when their Code tab is selected.
|
|
89
|
-
if (artifactType === 'image' || (artifact?.url && activeTab === 'preview')) {
|
|
147
|
+
if (mediaPreview || artifactType === 'file' || artifactType === 'image' || (artifact?.url && activeTab === 'preview')) {
|
|
90
148
|
setLoading(false)
|
|
149
|
+
if (mediaPreview && !artifact?.url) setError('No media preview source is available')
|
|
91
150
|
if (artifactType === 'image' && !artifact?.url) setError('No image preview URL is available')
|
|
92
151
|
return
|
|
93
152
|
}
|
|
@@ -102,24 +161,26 @@ export function ArtifactPreviewPanel({ artifact, onClose, workspacePath }: Props
|
|
|
102
161
|
} finally {
|
|
103
162
|
if (requestRevision.current === revision) setLoading(false)
|
|
104
163
|
}
|
|
105
|
-
}, [filePath, sourceWorkspace, artifact, artifactType, activeTab])
|
|
164
|
+
}, [filePath, sourceWorkspace, artifact, artifactType, activeTab, mediaPreview])
|
|
106
165
|
|
|
107
166
|
useEffect(() => {
|
|
108
|
-
setActiveTab('preview')
|
|
167
|
+
setActiveTab(artifactType === 'code' ? 'code' : 'preview')
|
|
109
168
|
setBrowserError(null)
|
|
110
169
|
setContent(artifact?.content ?? '')
|
|
170
|
+
setImageUrl(artifact?.url ?? '')
|
|
171
|
+
setImageDimensions(null)
|
|
111
172
|
setError(null)
|
|
112
|
-
}, [artifact])
|
|
173
|
+
}, [artifact, artifactType])
|
|
113
174
|
|
|
114
175
|
useEffect(() => {
|
|
115
|
-
if (artifact?.content !== undefined && activeTab === 'preview') {
|
|
176
|
+
if (artifact?.content !== undefined && (activeTab === 'preview' || !filePath)) {
|
|
116
177
|
setLoading(false)
|
|
117
178
|
setError(null)
|
|
118
179
|
} else {
|
|
119
180
|
void fetchContent()
|
|
120
181
|
}
|
|
121
182
|
return () => { requestRevision.current += 1 }
|
|
122
|
-
}, [artifact, activeTab, fetchContent])
|
|
183
|
+
}, [artifact, activeTab, filePath, fetchContent])
|
|
123
184
|
|
|
124
185
|
const handleCopyPath = async () => {
|
|
125
186
|
if (!filePath) return
|
|
@@ -192,12 +253,12 @@ export function ArtifactPreviewPanel({ artifact, onClose, workspacePath }: Props
|
|
|
192
253
|
borderRadius: 'var(--radius-xs, 4px)',
|
|
193
254
|
background: 'color-mix(in srgb, var(--accent) 15%, transparent)',
|
|
194
255
|
color: 'var(--interactive-fg)',
|
|
195
|
-
fontSize: '0.68rem',
|
|
196
|
-
fontWeight: 700,
|
|
197
256
|
flexShrink: 0,
|
|
198
257
|
}}
|
|
258
|
+
title={artifactType.toUpperCase()}
|
|
259
|
+
aria-label={`${artifactType} artifact`}
|
|
199
260
|
>
|
|
200
|
-
{artifactType
|
|
261
|
+
{renderArtifactTypeIcon(artifactType)}
|
|
201
262
|
</span>
|
|
202
263
|
<div style={{ minWidth: 0, display: 'flex', flexDirection: 'column' }}>
|
|
203
264
|
<span
|
|
@@ -236,51 +297,114 @@ export function ArtifactPreviewPanel({ artifact, onClose, workspacePath }: Props
|
|
|
236
297
|
|
|
237
298
|
{/* Center: Tabs & Viewport */}
|
|
238
299
|
<div style={{ display: 'flex', alignItems: 'center', gap: '6px' }}>
|
|
239
|
-
{/* Preview vs Code
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
display: 'inline-flex',
|
|
243
|
-
padding: '2px',
|
|
244
|
-
background: 'color-mix(in srgb, var(--text-main) 6%, transparent)',
|
|
245
|
-
borderRadius: 'var(--radius-sm, 6px)',
|
|
246
|
-
border: '1px solid var(--border)',
|
|
247
|
-
}}
|
|
248
|
-
>
|
|
249
|
-
<button
|
|
250
|
-
type="button"
|
|
251
|
-
onClick={() => setActiveTab('preview')}
|
|
252
|
-
style={{
|
|
253
|
-
background: activeTab === 'preview' ? 'var(--accent)' : 'transparent',
|
|
254
|
-
color: activeTab === 'preview' ? '#ffffff' : 'var(--text-muted)',
|
|
255
|
-
border: 'none',
|
|
256
|
-
borderRadius: 'var(--radius-xs, 4px)',
|
|
257
|
-
padding: '3px 9px',
|
|
258
|
-
fontSize: '0.75rem',
|
|
259
|
-
fontWeight: 500,
|
|
260
|
-
cursor: 'pointer',
|
|
261
|
-
transition: 'all 0.15s ease',
|
|
262
|
-
}}
|
|
263
|
-
>
|
|
264
|
-
Preview
|
|
265
|
-
</button>
|
|
266
|
-
{artifactType !== 'image' && <button
|
|
267
|
-
type="button"
|
|
268
|
-
onClick={() => setActiveTab('code')}
|
|
300
|
+
{/* Dual-mode (Preview vs Code): Only for HTML, SVG, and Markdown */}
|
|
301
|
+
{isDualMode ? (
|
|
302
|
+
<div
|
|
269
303
|
style={{
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
borderRadius: 'var(--radius-
|
|
274
|
-
|
|
275
|
-
fontSize: '0.75rem',
|
|
276
|
-
fontWeight: 500,
|
|
277
|
-
cursor: 'pointer',
|
|
278
|
-
transition: 'all 0.15s ease',
|
|
304
|
+
display: 'inline-flex',
|
|
305
|
+
padding: '2px',
|
|
306
|
+
background: 'color-mix(in srgb, var(--text-main) 6%, transparent)',
|
|
307
|
+
borderRadius: 'var(--radius-sm, 6px)',
|
|
308
|
+
border: '1px solid var(--border)',
|
|
279
309
|
}}
|
|
280
310
|
>
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
311
|
+
<button
|
|
312
|
+
type="button"
|
|
313
|
+
onClick={() => setActiveTab('preview')}
|
|
314
|
+
style={{
|
|
315
|
+
background: activeTab === 'preview' ? 'var(--accent)' : 'transparent',
|
|
316
|
+
color: activeTab === 'preview' ? 'var(--text-on-accent)' : 'var(--text-muted)',
|
|
317
|
+
border: 'none',
|
|
318
|
+
borderRadius: 'var(--radius-xs, 4px)',
|
|
319
|
+
padding: '3px 9px',
|
|
320
|
+
fontSize: '0.75rem',
|
|
321
|
+
fontWeight: 500,
|
|
322
|
+
cursor: 'pointer',
|
|
323
|
+
transition: 'all 0.15s ease',
|
|
324
|
+
}}
|
|
325
|
+
>
|
|
326
|
+
Preview
|
|
327
|
+
</button>
|
|
328
|
+
<button
|
|
329
|
+
type="button"
|
|
330
|
+
onClick={() => setActiveTab('code')}
|
|
331
|
+
style={{
|
|
332
|
+
background: activeTab === 'code' ? 'var(--accent)' : 'transparent',
|
|
333
|
+
color: activeTab === 'code' ? 'var(--text-on-accent)' : 'var(--text-muted)',
|
|
334
|
+
border: 'none',
|
|
335
|
+
borderRadius: 'var(--radius-xs, 4px)',
|
|
336
|
+
padding: '3px 9px',
|
|
337
|
+
fontSize: '0.75rem',
|
|
338
|
+
fontWeight: 500,
|
|
339
|
+
cursor: 'pointer',
|
|
340
|
+
transition: 'all 0.15s ease',
|
|
341
|
+
}}
|
|
342
|
+
>
|
|
343
|
+
Code
|
|
344
|
+
</button>
|
|
345
|
+
</div>
|
|
346
|
+
) : (
|
|
347
|
+
<div style={{ display: 'inline-flex', alignItems: 'center', gap: '6px' }}>
|
|
348
|
+
<div
|
|
349
|
+
style={{
|
|
350
|
+
display: 'inline-flex',
|
|
351
|
+
alignItems: 'center',
|
|
352
|
+
gap: '5px',
|
|
353
|
+
padding: '3px 10px',
|
|
354
|
+
background:
|
|
355
|
+
artifactType === 'image' || artifactType === 'code'
|
|
356
|
+
? 'color-mix(in srgb, var(--accent) 10%, transparent)'
|
|
357
|
+
: 'color-mix(in srgb, var(--text-main) 6%, transparent)',
|
|
358
|
+
borderRadius: '9999px',
|
|
359
|
+
border:
|
|
360
|
+
artifactType === 'image' || artifactType === 'code'
|
|
361
|
+
? '1px solid color-mix(in srgb, var(--accent) 25%, transparent)'
|
|
362
|
+
: '1px solid var(--border)',
|
|
363
|
+
color: artifactType === 'image' || artifactType === 'code' ? 'var(--accent)' : 'var(--text-muted)',
|
|
364
|
+
fontSize: '0.72rem',
|
|
365
|
+
fontWeight: 500,
|
|
366
|
+
letterSpacing: '0.01em',
|
|
367
|
+
}}
|
|
368
|
+
>
|
|
369
|
+
{artifactType === 'code' ? (
|
|
370
|
+
<FileCode size={12} strokeWidth={2.2} aria-hidden="true" />
|
|
371
|
+
) : artifactType === 'image' ? (
|
|
372
|
+
<ImageIcon size={12} strokeWidth={2.2} aria-hidden="true" />
|
|
373
|
+
) : (
|
|
374
|
+
<Eye size={12} strokeWidth={2.2} aria-hidden="true" />
|
|
375
|
+
)}
|
|
376
|
+
<span>
|
|
377
|
+
{artifactType === 'code'
|
|
378
|
+
? codeLabel
|
|
379
|
+
: artifactType === 'image'
|
|
380
|
+
? imageFormatLabel
|
|
381
|
+
: artifactType === 'file'
|
|
382
|
+
? 'Details'
|
|
383
|
+
: 'Preview'}
|
|
384
|
+
</span>
|
|
385
|
+
</div>
|
|
386
|
+
{artifactType === 'image' && imageDimensions && (
|
|
387
|
+
<div
|
|
388
|
+
style={{
|
|
389
|
+
display: 'inline-flex',
|
|
390
|
+
alignItems: 'center',
|
|
391
|
+
padding: '3px 9px',
|
|
392
|
+
borderRadius: '9999px',
|
|
393
|
+
background: 'color-mix(in srgb, var(--text-main) 6%, transparent)',
|
|
394
|
+
border: '1px solid var(--border)',
|
|
395
|
+
fontSize: '0.7rem',
|
|
396
|
+
color: 'var(--text-muted)',
|
|
397
|
+
fontFamily: 'var(--font-mono, monospace)',
|
|
398
|
+
letterSpacing: '0.01em',
|
|
399
|
+
whiteSpace: 'nowrap',
|
|
400
|
+
}}
|
|
401
|
+
title="Image dimensions (width × height)"
|
|
402
|
+
>
|
|
403
|
+
{imageDimensions.width} × {imageDimensions.height} px
|
|
404
|
+
</div>
|
|
405
|
+
)}
|
|
406
|
+
</div>
|
|
407
|
+
)}
|
|
284
408
|
|
|
285
409
|
{/* Viewport switcher for HTML */}
|
|
286
410
|
{activeTab === 'preview' && artifactType === 'html' && (
|
|
@@ -347,9 +471,9 @@ export function ArtifactPreviewPanel({ artifact, onClose, workspacePath }: Props
|
|
|
347
471
|
|
|
348
472
|
{/* Right actions */}
|
|
349
473
|
<div style={{ display: 'flex', alignItems: 'center', gap: '4px' }}>
|
|
350
|
-
<button
|
|
474
|
+
{!mediaPreview && <button
|
|
351
475
|
type="button"
|
|
352
|
-
onClick={fetchContent}
|
|
476
|
+
onClick={() => { void fetchContent(true) }}
|
|
353
477
|
disabled={loading}
|
|
354
478
|
title="Reload content from file"
|
|
355
479
|
style={{
|
|
@@ -378,9 +502,9 @@ export function ArtifactPreviewPanel({ artifact, onClose, workspacePath }: Props
|
|
|
378
502
|
<polyline points="1 20 1 14 7 14" />
|
|
379
503
|
<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" />
|
|
380
504
|
</svg>
|
|
381
|
-
</button>
|
|
505
|
+
</button>}
|
|
382
506
|
|
|
383
|
-
<button
|
|
507
|
+
{artifactType === 'html' && <button
|
|
384
508
|
type="button"
|
|
385
509
|
onClick={() => { void handleOpenInMintBrowser() }}
|
|
386
510
|
disabled={openingBrowser}
|
|
@@ -403,7 +527,7 @@ export function ArtifactPreviewPanel({ artifact, onClose, workspacePath }: Props
|
|
|
403
527
|
<polyline points="15 3 21 3 21 9" />
|
|
404
528
|
<line x1="10" y1="14" x2="21" y2="3" />
|
|
405
529
|
</svg>
|
|
406
|
-
</button>
|
|
530
|
+
</button>}
|
|
407
531
|
|
|
408
532
|
<button
|
|
409
533
|
type="button"
|
|
@@ -453,7 +577,7 @@ export function ArtifactPreviewPanel({ artifact, onClose, workspacePath }: Props
|
|
|
453
577
|
<p style={{ fontSize: '0.8rem', opacity: 0.8 }}>{error}</p>
|
|
454
578
|
<button
|
|
455
579
|
type="button"
|
|
456
|
-
onClick={fetchContent}
|
|
580
|
+
onClick={() => { void fetchContent(true) }}
|
|
457
581
|
style={{
|
|
458
582
|
marginTop: '12px',
|
|
459
583
|
padding: '4px 12px',
|
|
@@ -468,6 +592,12 @@ export function ArtifactPreviewPanel({ artifact, onClose, workspacePath }: Props
|
|
|
468
592
|
Retry
|
|
469
593
|
</button>
|
|
470
594
|
</div>
|
|
595
|
+
) : artifactType === 'file' ? (
|
|
596
|
+
<WorkspaceFileInfo key={`${sourceWorkspace}:${filePath}`} path={filePath} root={sourceWorkspace} />
|
|
597
|
+
) : artifactType === 'pdf' && artifact.url ? (
|
|
598
|
+
<Suspense fallback={<p role="status">Loading PDF viewer…</p>}><WorkspacePdfPreview key={artifact.url} url={artifact.url} path={filePath} root={sourceWorkspace} byteLength={artifact.byteLength} range={artifact.range} /></Suspense>
|
|
599
|
+
) : (artifactType === 'audio' || artifactType === 'video') && artifact.url ? (
|
|
600
|
+
<WorkspaceMediaPreview key={artifact.url} kind={artifactType} url={artifact.url} path={filePath} root={sourceWorkspace} mimeType={artifact.mimeType} />
|
|
471
601
|
) : activeTab === 'code' ? (
|
|
472
602
|
<div style={{ width: '100%', height: '100%', overflow: 'auto', padding: '12px' }}>
|
|
473
603
|
<ChatCodeBlock code={content} language={language} />
|
|
@@ -505,10 +635,24 @@ export function ArtifactPreviewPanel({ artifact, onClose, workspacePath }: Props
|
|
|
505
635
|
<div style={{ width: '100%', height: '100%', padding: '24px', display: 'flex', alignItems: 'center', justifyContent: 'center', overflow: 'hidden' }}>
|
|
506
636
|
<img
|
|
507
637
|
key={reloadRevision}
|
|
508
|
-
|
|
638
|
+
ref={(el) => {
|
|
639
|
+
if (el && el.complete && el.naturalWidth && el.naturalHeight) {
|
|
640
|
+
setImageDimensions((prev) => {
|
|
641
|
+
if (prev?.width === el.naturalWidth && prev?.height === el.naturalHeight) return prev
|
|
642
|
+
return { width: el.naturalWidth, height: el.naturalHeight }
|
|
643
|
+
})
|
|
644
|
+
}
|
|
645
|
+
}}
|
|
646
|
+
src={imageUrl || artifact.url}
|
|
509
647
|
alt={fileName}
|
|
510
648
|
style={{ width: '100%', height: '100%', objectFit: 'contain' }}
|
|
511
|
-
|
|
649
|
+
onLoad={(e) => {
|
|
650
|
+
const img = e.currentTarget
|
|
651
|
+
if (img.naturalWidth && img.naturalHeight) {
|
|
652
|
+
setImageDimensions({ width: img.naturalWidth, height: img.naturalHeight })
|
|
653
|
+
}
|
|
654
|
+
}}
|
|
655
|
+
onError={() => setError('Unable to load image. Reload the preview or check that the file is still available.')}
|
|
512
656
|
/>
|
|
513
657
|
</div>
|
|
514
658
|
) : artifactType === 'svg' ? (
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { describe, expect, it } from 'vitest'
|
|
2
|
+
import { backgroundPollIntervalMs, filterScopedJobs } from './BackgroundTerminals'
|
|
3
|
+
import { shouldPollSessionSources } from '../../utils/useSessionSources'
|
|
4
|
+
import type { BackgroundJob } from '../../types'
|
|
5
|
+
|
|
6
|
+
describe('BackgroundTerminals scoping and polling optimization', () => {
|
|
7
|
+
const sampleJobs: BackgroundJob[] = [
|
|
8
|
+
{
|
|
9
|
+
id: 'job-1',
|
|
10
|
+
command: 'npm run dev',
|
|
11
|
+
workspacePath: '/home/user/project-a',
|
|
12
|
+
status: 'running',
|
|
13
|
+
createdAt: '2026-10-21T00:00:00Z',
|
|
14
|
+
exitCode: null,
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
id: 'job-2',
|
|
18
|
+
command: 'cargo build',
|
|
19
|
+
workspacePath: '/home/user/project-b',
|
|
20
|
+
status: 'completed',
|
|
21
|
+
createdAt: '2026-10-21T00:00:00Z',
|
|
22
|
+
exitCode: 0,
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
id: 'job-3',
|
|
26
|
+
command: 'vite preview',
|
|
27
|
+
workspacePath: '/home/user/project-a',
|
|
28
|
+
status: 'running',
|
|
29
|
+
createdAt: '2026-10-21T00:00:00Z',
|
|
30
|
+
exitCode: null,
|
|
31
|
+
},
|
|
32
|
+
]
|
|
33
|
+
|
|
34
|
+
it('filters scoped jobs in memory without needing a second API request', () => {
|
|
35
|
+
const scopedA = filterScopedJobs(sampleJobs, '/home/user/project-a')
|
|
36
|
+
expect(scopedA.map(j => j.id)).toEqual(['job-1', 'job-3'])
|
|
37
|
+
|
|
38
|
+
const scopedB = filterScopedJobs(sampleJobs, '/home/user/project-b')
|
|
39
|
+
expect(scopedB.map(j => j.id)).toEqual(['job-2'])
|
|
40
|
+
})
|
|
41
|
+
|
|
42
|
+
it('returns empty array when workspacePath is null or undefined', () => {
|
|
43
|
+
expect(filterScopedJobs(sampleJobs, null)).toEqual([])
|
|
44
|
+
expect(filterScopedJobs(sampleJobs, undefined)).toEqual([])
|
|
45
|
+
expect(filterScopedJobs(sampleJobs, '')).toEqual([])
|
|
46
|
+
})
|
|
47
|
+
|
|
48
|
+
it('uses adaptive polling interval when background panel is closed and no jobs are running', () => {
|
|
49
|
+
const idleJobs = sampleJobs.filter(j => j.status === 'completed')
|
|
50
|
+
expect(backgroundPollIntervalMs(false, [])).toBe(10000)
|
|
51
|
+
expect(backgroundPollIntervalMs(false, idleJobs)).toBe(10000)
|
|
52
|
+
expect(backgroundPollIntervalMs(true, idleJobs)).toBe(3000)
|
|
53
|
+
expect(backgroundPollIntervalMs(false, sampleJobs)).toBe(3000)
|
|
54
|
+
})
|
|
55
|
+
|
|
56
|
+
it('polls session sources only when the Tools launcher or Sources tab is active', () => {
|
|
57
|
+
expect(shouldPollSessionSources(false, null)).toBe(false)
|
|
58
|
+
expect(shouldPollSessionSources(true, null)).toBe(true)
|
|
59
|
+
expect(shouldPollSessionSources(true, 'sources')).toBe(true)
|
|
60
|
+
expect(shouldPollSessionSources(true, 'term-1')).toBe(false)
|
|
61
|
+
expect(shouldPollSessionSources(true, 'review:1')).toBe(false)
|
|
62
|
+
})
|
|
63
|
+
})
|
package/src/renderer/shared/components/{BackgroundTerminals.tsx → workspace/BackgroundTerminals.tsx}
RENAMED
|
@@ -1,20 +1,30 @@
|
|
|
1
1
|
import { useEffect, useRef, useState } from 'react'
|
|
2
2
|
import { createPortal } from 'react-dom'
|
|
3
3
|
import { Trash2, X } from 'lucide-react'
|
|
4
|
-
import { backgroundPlatform, runtimePlatform } from '
|
|
5
|
-
import type { BackgroundJob, BackgroundJobOutput } from '
|
|
4
|
+
import { backgroundPlatform, runtimePlatform } from '../../platform'
|
|
5
|
+
import type { BackgroundJob, BackgroundJobOutput } from '../../types'
|
|
6
6
|
import './background-terminals.css'
|
|
7
7
|
|
|
8
8
|
const active = (job: BackgroundJob) => job.status === 'running' || job.status === 'stopping'
|
|
9
9
|
const elapsed = (seconds: number) => `${Math.floor(seconds / 60).toString().padStart(2, '0')}:${(seconds % 60).toString().padStart(2, '0')}`
|
|
10
10
|
const workspaceName = (path: string) => path.split(/[\\/]/).filter(Boolean).pop() || path
|
|
11
11
|
|
|
12
|
+
export const filterScopedJobs = (jobs: BackgroundJob[], workspacePath?: string | null): BackgroundJob[] =>
|
|
13
|
+
workspacePath ? jobs.filter(job => job.workspacePath === workspacePath) : []
|
|
14
|
+
|
|
15
|
+
export const backgroundPollIntervalMs = (open: boolean, jobs: BackgroundJob[]): number =>
|
|
16
|
+
open || jobs.some(active) ? 3000 : 10000
|
|
17
|
+
|
|
12
18
|
export function BackgroundTerminals({ workspacePath, panelTarget, onCountChange }: {
|
|
13
19
|
workspacePath?: string | null; panelTarget: HTMLElement | null; onCountChange: (count: number) => void
|
|
14
20
|
}) {
|
|
15
21
|
const [jobs, setJobs] = useState<BackgroundJob[]>([])
|
|
16
22
|
const [scope, setScope] = useState<{ workspace: string | null | undefined; ids: Set<string> }>({ workspace: undefined, ids: new Set() })
|
|
17
23
|
const open = Boolean(panelTarget)
|
|
24
|
+
const openRef = useRef(open)
|
|
25
|
+
openRef.current = open
|
|
26
|
+
const jobsRef = useRef(jobs)
|
|
27
|
+
jobsRef.current = jobs
|
|
18
28
|
const [all, setAll] = useState(false)
|
|
19
29
|
const [selected, setSelected] = useState<string | null>(null)
|
|
20
30
|
const [output, setOutput] = useState<BackgroundJobOutput | null>(null)
|
|
@@ -30,13 +40,25 @@ export function BackgroundTerminals({ workspacePath, panelTarget, onCountChange
|
|
|
30
40
|
useEffect(() => {
|
|
31
41
|
let disposed = false
|
|
32
42
|
let busy = false
|
|
43
|
+
let timer: ReturnType<typeof window.setTimeout> | undefined
|
|
33
44
|
setLoading(true)
|
|
45
|
+
const scheduleNext = (latestJobs: BackgroundJob[]) => {
|
|
46
|
+
if (disposed) return
|
|
47
|
+
if (timer !== undefined) window.clearTimeout(timer)
|
|
48
|
+
timer = window.setTimeout(() => void refresh(), backgroundPollIntervalMs(openRef.current, latestJobs))
|
|
49
|
+
}
|
|
34
50
|
const refresh = async () => {
|
|
35
|
-
if (busy || document.hidden)
|
|
51
|
+
if (busy || document.hidden) {
|
|
52
|
+
scheduleNext(jobsRef.current)
|
|
53
|
+
return
|
|
54
|
+
}
|
|
36
55
|
busy = true
|
|
56
|
+
let latestJobs = jobsRef.current
|
|
37
57
|
try {
|
|
38
|
-
const
|
|
58
|
+
const next = await backgroundPlatform.list()
|
|
39
59
|
if (disposed) return
|
|
60
|
+
latestJobs = next
|
|
61
|
+
const scoped = filterScopedJobs(next, workspacePath)
|
|
40
62
|
let message = ''
|
|
41
63
|
for (const job of next) {
|
|
42
64
|
const previous = statuses.current.get(job.id)
|
|
@@ -53,16 +75,25 @@ export function BackgroundTerminals({ workspacePath, panelTarget, onCountChange
|
|
|
53
75
|
if (!disposed) {
|
|
54
76
|
const message = String(cause)
|
|
55
77
|
setError(`Status unavailable · ${message}`)
|
|
56
|
-
if (/401:|403:/.test(message)) { setJobs([]); setOutput(null); statuses.current.clear() }
|
|
78
|
+
if (/401:|403:/.test(message)) { latestJobs = []; setJobs([]); setOutput(null); statuses.current.clear() }
|
|
57
79
|
}
|
|
58
|
-
} finally {
|
|
80
|
+
} finally {
|
|
81
|
+
busy = false
|
|
82
|
+
if (!disposed) {
|
|
83
|
+
setLoading(false)
|
|
84
|
+
scheduleNext(latestJobs)
|
|
85
|
+
}
|
|
86
|
+
}
|
|
59
87
|
}
|
|
60
88
|
void refresh()
|
|
61
|
-
const timer = window.setInterval(() => void refresh(), 1000)
|
|
62
89
|
const resume = () => { if (!document.hidden) void refresh() }
|
|
63
90
|
document.addEventListener('visibilitychange', resume)
|
|
64
|
-
return () => {
|
|
65
|
-
|
|
91
|
+
return () => {
|
|
92
|
+
disposed = true
|
|
93
|
+
if (timer !== undefined) window.clearTimeout(timer)
|
|
94
|
+
document.removeEventListener('visibilitychange', resume)
|
|
95
|
+
}
|
|
96
|
+
}, [workspacePath, open])
|
|
66
97
|
|
|
67
98
|
useEffect(() => {
|
|
68
99
|
if (!open || !selected) { setOutput(null); return }
|