@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.
- package/Cargo.lock +1012 -69
- package/Cargo.toml +5 -2
- package/LICENSE +21 -654
- package/README.md +92 -817
- package/Release_Note.md +53 -560
- package/apps/mint-companion/src-tauri/Cargo.toml +20 -0
- package/apps/mint-companion/src-tauri/build.rs +3 -0
- package/apps/mint-companion/src-tauri/src/main.rs +468 -0
- package/apps/mint-companion/tsconfig.json +20 -0
- package/apps/mint-companion/vite.config.ts +3 -0
- package/components.json +19 -0
- package/crates/mint-cli/Cargo.toml +6 -0
- package/crates/mint-cli/src/agent/live_status.rs +187 -39
- package/crates/mint-cli/src/agent.rs +323 -95
- package/crates/mint-cli/src/commands/agent.rs +69 -55
- package/crates/mint-cli/src/commands/integrations.rs +7 -0
- package/crates/mint-cli/src/commands/knowledge.rs +12 -32
- package/crates/mint-cli/src/commands/mod.rs +44 -0
- package/crates/mint-cli/src/image.rs +31 -33
- package/crates/mint-cli/src/interactive/chat_tui.rs +3594 -483
- package/crates/mint-cli/src/interactive/input_box.rs +56 -6
- package/crates/mint-cli/src/interactive/slash_commands.rs +208 -56
- package/crates/mint-cli/src/interactive/tool_activity.rs +328 -0
- package/crates/mint-cli/src/interactive.rs +64 -40
- package/crates/mint-cli/src/main.rs +13 -7
- package/crates/mint-cli/src/mcp.rs +5 -0
- package/crates/mint-cli/src/mod_host.rs +6 -0
- package/crates/mint-cli/src/mods_cli.rs +62 -0
- package/crates/mint-cli/src/mods_ui.rs +187 -0
- package/crates/mint-cli/src/onboard.rs +5 -31
- package/crates/mint-cli/src/terminal_theme.rs +3 -1
- package/crates/mint-cli/src/updater.rs +56 -2
- package/crates/mint-cli/tests/library_intake.rs +77 -0
- package/crates/mint-cli/tests/mods_testing.rs +133 -0
- package/crates/mint-companion-protocol/Cargo.toml +10 -0
- package/crates/mint-companion-protocol/src/lib.rs +163 -0
- package/crates/mint-core/Cargo.toml +6 -3
- package/crates/mint-core/build.rs +26 -0
- package/crates/mint-core/src/agent/chat.rs +167 -39
- package/crates/mint-core/src/agent/code_tools.rs +15 -0
- package/crates/mint-core/src/agent/memory/sources.rs +240 -0
- package/crates/mint-core/src/agent/memory.rs +147 -13
- package/crates/mint-core/src/agent/skill_inventory.rs +325 -0
- package/crates/mint-core/src/agent/skills.rs +437 -90
- package/crates/mint-core/src/agent.rs +1 -0
- package/crates/mint-core/src/api_server/routes/background_jobs.rs +310 -0
- package/crates/mint-core/src/api_server/routes/chat.rs +216 -199
- package/crates/mint-core/src/api_server/routes/html_preview.rs +77 -0
- package/crates/mint-core/src/api_server/routes/library.rs +97 -0
- package/crates/mint-core/src/api_server/routes/media_gen.rs +10 -57
- package/crates/mint-core/src/api_server/routes/misc.rs +104 -107
- package/crates/mint-core/src/api_server/routes/mod.rs +6 -0
- package/crates/mint-core/src/api_server/routes/mods.rs +31 -0
- package/crates/mint-core/src/api_server/routes/sessions.rs +41 -0
- package/crates/mint-core/src/api_server/routes/skills_subagents.rs +12 -42
- package/crates/mint-core/src/api_server/routes/slash.rs +50 -1
- package/crates/mint-core/src/api_server/routes/sources.rs +101 -0
- package/crates/mint-core/src/api_server.rs +118 -9
- package/crates/mint-core/src/avatar_bridge.rs +11 -2
- package/crates/mint-core/src/browser/session.rs +52 -0
- package/crates/mint-core/src/companion.rs +716 -0
- package/crates/mint-core/src/cron/scheduler.rs +34 -2
- package/crates/mint-core/src/integrations/channels.rs +87 -345
- package/crates/mint-core/src/integrations/mcp.rs +397 -50
- package/crates/mint-core/src/integrations/mcp_calls.rs +823 -0
- package/crates/mint-core/src/integrations/mcp_catalog.rs +267 -0
- package/crates/mint-core/src/integrations/mcp_device.rs +319 -0
- package/crates/mint-core/src/integrations/mcp_result.rs +356 -0
- package/crates/mint-core/src/integrations/webhooks.rs +539 -0
- package/crates/mint-core/src/integrations.rs +2 -0
- package/crates/mint-core/src/lib.rs +85 -26
- package/crates/mint-core/src/media/gemini_live.rs +134 -14
- package/crates/mint-core/src/media/image_models.rs +3 -27
- package/crates/mint-core/src/media/image_workflow.rs +216 -0
- package/crates/mint-core/src/media/library/intake.rs +144 -0
- package/crates/mint-core/src/media/library/migration.rs +56 -0
- package/crates/mint-core/src/media/library/removal.rs +55 -0
- package/crates/mint-core/src/media/library/tests.rs +730 -0
- package/crates/mint-core/src/media/library/thumbnails.rs +72 -0
- package/crates/mint-core/src/media/library.rs +545 -0
- package/crates/mint-core/src/media/model_catalog.rs +375 -0
- package/crates/mint-core/src/media/pictures.rs +79 -222
- package/crates/mint-core/src/media/video_models.rs +3 -22
- package/crates/mint-core/src/media.rs +3 -0
- package/crates/mint-core/src/mods/manager.rs +1124 -0
- package/crates/mint-core/src/mods/mod.rs +569 -0
- package/crates/mint-core/src/mods/operations.rs +204 -0
- package/crates/mint-core/src/mods/session.rs +146 -0
- package/crates/mint-core/src/mods/slash.rs +59 -0
- package/crates/mint-core/src/mods/telemetry.rs +306 -0
- package/crates/mint-core/src/orchestration/approvals.rs +344 -0
- package/crates/mint-core/src/orchestration/context_render.rs +104 -0
- package/crates/mint-core/src/orchestration/mcp_review.rs +153 -0
- package/crates/mint-core/src/orchestration/memory_skill.rs +104 -32
- package/crates/mint-core/src/orchestration/mod.rs +2139 -244
- package/crates/mint-core/src/orchestration/mod_authoring_regressions.rs +209 -0
- package/crates/mint-core/src/orchestration/progress_clock.rs +80 -0
- package/crates/mint-core/src/orchestration/repeated_failures.rs +116 -0
- package/crates/mint-core/src/orchestration/review_regressions.rs +449 -0
- package/crates/mint-core/src/orchestration/run_control.rs +196 -0
- package/crates/mint-core/src/orchestration/tools/files.rs +161 -14
- package/crates/mint-core/src/orchestration/tools/media.rs +37 -41
- package/crates/mint-core/src/orchestration/tools/misc.rs +3 -2
- package/crates/mint-core/src/orchestration/tools/mod.rs +2 -0
- package/crates/mint-core/src/orchestration/tools/mods.rs +161 -0
- package/crates/mint-core/src/orchestration/tools/plugins_mcp.rs +303 -71
- package/crates/mint-core/src/orchestration/tools/shell.rs +95 -2
- package/crates/mint-core/src/orchestration/workspace_helpers.rs +4 -1
- package/crates/mint-core/src/prompts/agent.rs +17 -2
- package/crates/mint-core/src/prompts/tool_catalog.rs +28 -2
- package/crates/mint-core/src/search/knowledge.rs +7 -1
- package/crates/mint-core/src/search/linked_folders/index.rs +177 -13
- package/crates/mint-core/src/search/linked_folders.rs +83 -2
- package/crates/mint-core/src/slash/catalog.rs +1 -1
- package/crates/mint-core/src/slash/mod.rs +174 -11
- package/crates/mint-core/src/slash/mods.rs +155 -0
- package/crates/mint-core/src/system/bg_shell.rs +1129 -95
- package/crates/mint-core/src/system/config.rs +5 -10
- package/crates/mint-core/src/system/html_preview.rs +398 -0
- package/crates/mint-core/src/system/mint_web.rs +164 -0
- package/crates/mint-core/src/system/release_notes.rs +18 -0
- package/crates/mint-core/src/system/shell.rs +21 -6
- package/crates/mint-core/src/system/workspace.rs +72 -8
- package/crates/mint-core/src/system/workspace_history.rs +604 -0
- package/crates/mint-core/src/system.rs +4 -0
- package/crates/mint-core/tests/background_retention.rs +34 -0
- package/crates/mint-core/tests/background_shutdown.rs +24 -0
- package/crates/mint-core/tests/library_http.rs +209 -0
- package/crates/mint-core/tests/mcp_contract.rs +283 -0
- package/crates/mint-core/tests/mcp_stdio.rs +11 -10
- package/crates/mint-core/tests/media_model_catalog_http.rs +403 -0
- package/crates/mint-core/tests/mods_http.rs +215 -0
- package/crates/mint-core/tests/terminal_shutdown.rs +109 -0
- package/crates/mint-mod-runtime/Cargo.toml +18 -0
- package/crates/mint-mod-runtime/src/lib.rs +507 -0
- package/crates/mint-mod-runtime/src/sdk.js +56 -0
- package/crates/mint-mod-runtime/src/test_sdk.js +32 -0
- package/crates/mint-mod-runtime/src/testing.rs +94 -0
- package/crates/mint-mod-runtime/tests/runtime.rs +156 -0
- package/docs/mods/AUTHORING.md +61 -0
- package/docs/mods/README.md +139 -0
- package/docs/mods/TESTING.md +56 -0
- package/docs/mods/mint-mods.d.ts +66 -0
- package/examples/device-mcp/README.md +22 -0
- package/examples/device-mcp/contract.md +49 -0
- package/examples/device-mcp/mock-device.mjs +66 -0
- package/examples/device-mcp/server.mjs +48 -0
- package/examples/device-mcp/server.test.mjs +78 -0
- package/examples/mods/task-checklist/README.md +1 -0
- package/examples/mods/task-checklist/main.ts +17 -0
- package/examples/mods/task-checklist/manifest.json +1 -0
- package/examples/mods/task-checklist/tests/checklist.test.ts +15 -0
- package/examples/mods/token-meter/README.md +1 -0
- package/examples/mods/token-meter/main.ts +8 -0
- package/examples/mods/token-meter/manifest.json +1 -0
- package/examples/mods/tool-guard/README.md +1 -0
- package/examples/mods/tool-guard/main.ts +9 -0
- package/examples/mods/tool-guard/manifest.json +1 -0
- package/out/web/assets/CliSessionsView-CtzUJpK_.css +1 -0
- package/out/web/assets/CliSessionsView-D7hw0Mgj.js +1 -0
- package/out/web/assets/CodeReviewPage-C7bEOJfd.js +4 -0
- package/out/web/assets/CodeReviewPage-Dte9uLiL.css +1 -0
- package/out/web/assets/CommandPalette-0RrF-AOT.js +1 -0
- package/out/web/assets/ImageStudioPanel-CdxkAf_r.js +1 -0
- package/out/web/assets/LibraryPage--Qfisp6D.js +2 -0
- package/out/web/assets/LibraryPage-DAxUTAg7.css +1 -0
- package/out/web/assets/LinkedFoldersView-2nfZbDgN.js +1 -0
- package/out/web/assets/McpRegistryPicker-h9uS8_wT.js +1 -0
- package/out/web/assets/McpServersView-slfQJzNB.js +1 -0
- package/out/web/assets/MintDashboard-BSR5XpXh.js +25 -0
- package/out/web/assets/MintDashboard-CWUcCGhd.css +1 -0
- package/out/web/assets/PluginsView-l7LSm503.js +1 -0
- package/out/web/assets/ScheduledTasksView-CttmLbq1.js +1 -0
- package/out/web/assets/SettingsWindow-BCMLYvEV.js +4 -0
- package/out/web/assets/SettingsWindow-DcMVmU9u.css +1 -0
- package/out/web/assets/SkillsView-rNs1qr_U.js +2 -0
- package/out/web/assets/ToolSurfacePage-B9DzEPWN.js +37 -0
- package/out/web/assets/ToolSurfacePage-CTfgggF2.css +1 -0
- package/out/web/assets/VeoStudioPanel-DiJs_Cg2.js +4 -0
- package/out/web/assets/WorkspaceSelector-B2xIp04D.js +1 -0
- package/out/web/assets/WorkspaceSelector-Ca8uJOsS.css +1 -0
- package/out/web/assets/{abnfDiagram-VCTEODGH-ByMyfanq.js → abnfDiagram-VCTEODGH-CD0CjoGl.js} +1 -1
- package/out/web/assets/{architecture-7GRP2DOG-CLq2kEOB.js → architecture-7GRP2DOG-RKV83OeZ.js} +1 -1
- package/out/web/assets/{architectureDiagram-5GKGNRK7-6PoVSmNG.js → architectureDiagram-5GKGNRK7-nN_HAFct.js} +1 -1
- package/out/web/assets/{blockDiagram-NRAW4CY4-cKw9mAKi.js → blockDiagram-NRAW4CY4-BrrqzHW5.js} +1 -1
- package/out/web/assets/{c4Diagram-UCG6FXSJ-Cqy8N5Ge.js → c4Diagram-UCG6FXSJ-DTdV8_zE.js} +1 -1
- package/out/web/assets/{chunk-75Z2AOVW-3qybijF5.js → chunk-75Z2AOVW-_M0z5olV.js} +1 -1
- package/out/web/assets/chunk-CKBBP62Z-BpQEgeHF.js +2 -0
- package/out/web/assets/{chunk-CLGD4ZFX-CndDQkww.js → chunk-CLGD4ZFX-D54yGvGS.js} +1 -1
- package/out/web/assets/{chunk-DSNCTWBM-Cc4NxvgD.js → chunk-DSNCTWBM-C-gvT2ru.js} +1 -1
- package/out/web/assets/{chunk-DU6HZSFF-drzh6GsU.js → chunk-DU6HZSFF-CnFngIhW.js} +1 -1
- package/out/web/assets/{chunk-F27PBJKO-FiY35l4v.js → chunk-F27PBJKO-BqtWrnEO.js} +1 -1
- package/out/web/assets/{chunk-G27WJ6UU-Bjt9Il4A.js → chunk-G27WJ6UU-Ckoq5mi2.js} +1 -1
- package/out/web/assets/{chunk-GMAD6QVW-Bppi3Ctd.js → chunk-GMAD6QVW-BuhEcgHq.js} +1 -1
- package/out/web/assets/{chunk-JQ64N6SF-DGg5kcEV.js → chunk-JQ64N6SF-CF8T7GiZ.js} +1 -1
- package/out/web/assets/{chunk-LCL6LL3I-CCYcjd7p.js → chunk-LCL6LL3I-BhXV9zyH.js} +1 -1
- package/out/web/assets/{chunk-OBVCFTLP-DJeNil5M.js → chunk-OBVCFTLP-CRIkunUB.js} +1 -1
- package/out/web/assets/{chunk-P2QGCYS3-lRzkRjBB.js → chunk-P2QGCYS3-UFEU6BxZ.js} +1 -1
- package/out/web/assets/{chunk-POPQ4Y6H-DouASMBW.js → chunk-POPQ4Y6H-CQcrNbjr.js} +1 -1
- package/out/web/assets/{chunk-PWAF6VOD-DMmD1vVf.js → chunk-PWAF6VOD-Cc2uVDsG.js} +1 -1
- package/out/web/assets/{chunk-R7TYR2AO-CYLA5UC5.js → chunk-R7TYR2AO-DiCxzdAY.js} +1 -1
- package/out/web/assets/{chunk-RHFEMEQ7-BiXwEcUT.js → chunk-RHFEMEQ7-b7hnPmrR.js} +1 -1
- package/out/web/assets/{chunk-SVP7TREG-BV-zPslF.js → chunk-SVP7TREG-Bu_yYb-V.js} +1 -1
- package/out/web/assets/{chunk-TEH6E4GO-B2RGEohZ.js → chunk-TEH6E4GO-G4Cdlyrt.js} +1 -1
- package/out/web/assets/classDiagram-DTDB5LWJ-RnC2mYO4.js +1 -0
- package/out/web/assets/classDiagram-v2-JRS7N3AN-RnC2mYO4.js +1 -0
- package/out/web/assets/config-CnvCChUM.js +2 -0
- package/out/web/assets/config-DM6oIVO3.css +1 -0
- package/out/web/assets/core-DsKkQ7ig.js +1 -0
- package/out/web/assets/{cynefin-OW5HDTMX-Cas4csHM.js → cynefin-OW5HDTMX-CnzQfOGp.js} +1 -1
- package/out/web/assets/{cynefinDiagram-5FMLGOSQ-Bbpj66Y3.js → cynefinDiagram-5FMLGOSQ-DVtQnfpm.js} +1 -1
- package/out/web/assets/{dagre-3AP2YEHR-B0-2RDEd.js → dagre-3AP2YEHR-DG76_k5_.js} +1 -1
- package/out/web/assets/{diagram-S7CK7UJ4-BdzEjUyH.js → diagram-S7CK7UJ4-CaouUoze.js} +1 -1
- package/out/web/assets/{diagram-UQ7AKVKN-CJDwyPxF.js → diagram-UQ7AKVKN-B4bEc26B.js} +1 -1
- package/out/web/assets/{diagram-VSXAHHWV-BxaG1r_B.js → diagram-VSXAHHWV-BJ86Ov2Y.js} +1 -1
- package/out/web/assets/{diagram-VX7I27RA-BMmUqm8f.js → diagram-VX7I27RA-7hH5IPYf.js} +1 -1
- package/out/web/assets/{diagram-Z3DM3KII-CFtd03eE.js → diagram-Z3DM3KII-CCM4clo8.js} +1 -1
- package/out/web/assets/dist-js-BkYNznHX.js +1 -0
- package/out/web/assets/{ebnfDiagram-PWID7BFC-DwAen1hO.js → ebnfDiagram-PWID7BFC-Da7WAM3k.js} +1 -1
- package/out/web/assets/{erDiagram-SSCWMZ5O-BCZSHACj.js → erDiagram-SSCWMZ5O-CzzmnZWT.js} +1 -1
- package/out/web/assets/{event-ChBVpRy0.js → event-Cdt7Byyj.js} +1 -1
- package/out/web/assets/{eventmodeling-NTZA5JFV-XHStE4E_.js → eventmodeling-NTZA5JFV-xcfsA0XD.js} +1 -1
- package/out/web/assets/flowDiagram-A5DVABFB-JdtH1673.js +1 -0
- package/out/web/assets/{ganttDiagram-EL5Y4UJY-BAEu1Cql.js → ganttDiagram-EL5Y4UJY-B3ClFGmL.js} +1 -1
- package/out/web/assets/{gitGraph-4MIJSDKK-r32Vyper.js → gitGraph-4MIJSDKK-BZ_y_cDU.js} +1 -1
- package/out/web/assets/{gitGraphDiagram-WWUBYQGX-z9o9qt6V.js → gitGraphDiagram-WWUBYQGX-drhRSYm3.js} +1 -1
- package/out/web/assets/index-BZ9xgmMP.css +1 -0
- package/out/web/assets/index-Ca8cCS4h.js +168 -0
- package/out/web/assets/{info-A6RAGUB7-BvLaC2cw.js → info-A6RAGUB7-B7I3K0F1.js} +1 -1
- package/out/web/assets/{infoDiagram-RXCK75RN-Be6WAXXw.js → infoDiagram-RXCK75RN-deX_1MPh.js} +1 -1
- package/out/web/assets/{ishikawaDiagram-5VMMS53U-DZjoHJHC.js → ishikawaDiagram-5VMMS53U-s38yo28y.js} +1 -1
- package/out/web/assets/{journeyDiagram-EYS64GPL-CtVkjkGm.js → journeyDiagram-EYS64GPL-CZn2kB8b.js} +1 -1
- package/out/web/assets/jsx-runtime-DN4NhQUK.js +1 -0
- package/out/web/assets/{kanban-definition-3QL26DDD-CW5FMv1w.js → kanban-definition-3QL26DDD-DodjgySL.js} +1 -1
- package/out/web/assets/markdown-CMhYIcWB.js +39 -0
- package/out/web/assets/{mermaid-parser.core-aUgCqsZ5.js → mermaid-parser.core-Whu2rlJC.js} +3 -3
- package/out/web/assets/{mermaid.core-D57sEiSL.js → mermaid.core-CKyPo8VH.js} +4 -4
- package/out/web/assets/{mindmap-definition-FBJOCRG2-DAmSpM3a.js → mindmap-definition-FBJOCRG2-260WBDxZ.js} +1 -1
- package/out/web/assets/modelManager-CUaGWMWu.js +2 -0
- package/out/web/assets/{oauthManager-9jxicDWJ.js → oauthManager-DlNhXJr6.js} +1 -1
- package/out/web/assets/{packet-AYTQ26CC-DJ27iIoJ.js → packet-AYTQ26CC-CEeIRKRG.js} +1 -1
- package/out/web/assets/{pegDiagram-XKGWAZYB-Bj3ii-gS.js → pegDiagram-XKGWAZYB-BYadI-KO.js} +1 -1
- package/out/web/assets/{pie-WAS4IAKB-DG5mCUbc.js → pie-WAS4IAKB-D8uf4dh5.js} +1 -1
- package/out/web/assets/{pieDiagram-E7YTZNPT-BrJLPnDA.js → pieDiagram-E7YTZNPT-CjSDy4hO.js} +1 -1
- package/out/web/assets/{quadrantDiagram-AXDQQJYC-3x_TmF3j.js → quadrantDiagram-AXDQQJYC-B8D3gU5d.js} +1 -1
- package/out/web/assets/{radar-RG4KPBEZ-CrXaTTuV.js → radar-RG4KPBEZ-DZJxnokY.js} +1 -1
- package/out/web/assets/{railroad-74A4TZTK-BpqMH9BE.js → railroad-74A4TZTK-DBysUiUi.js} +1 -1
- package/out/web/assets/{railroad-abnf-HS5TGJTU-DHI0uLlV.js → railroad-abnf-HS5TGJTU-CHWxoJYg.js} +1 -1
- package/out/web/assets/{railroad-ebnf-LZEXJU2U-CQCb316y.js → railroad-ebnf-LZEXJU2U-DDv7X6bY.js} +1 -1
- package/out/web/assets/{railroad-peg-WCYAUIDC-Ph1giKkH.js → railroad-peg-WCYAUIDC-DpfcYYNJ.js} +1 -1
- package/out/web/assets/{railroadDiagram-O6MQD6OU-BRq6wIxx.js → railroadDiagram-O6MQD6OU-CYtyv0t3.js} +1 -1
- package/out/web/assets/{requirementDiagram-EFPCY7ZU-DIJj6G1g.js → requirementDiagram-EFPCY7ZU-D2X-Ewik.js} +1 -1
- package/out/web/assets/{sankeyDiagram-P5KCCOFB-DZajSryq.js → sankeyDiagram-P5KCCOFB-Bn2x6C4Y.js} +1 -1
- package/out/web/assets/{sequenceDiagram-WJ2MYXX4-DxJCWyZS.js → sequenceDiagram-WJ2MYXX4-BvFLKtPd.js} +1 -1
- package/out/web/assets/{stateDiagram-HBIQ2CUA-k6voi8Vf.js → stateDiagram-HBIQ2CUA-Bx0GWeaY.js} +1 -1
- package/out/web/assets/stateDiagram-v2-4QOOHH4V--hol1yg_.js +1 -0
- package/out/web/assets/{swimlanes-XN3QIQJK-igYhTjXB.js → swimlanes-XN3QIQJK-CCma0T7L.js} +1 -1
- package/out/web/assets/swimlanesDiagram-VK2B7HYN-BkohoVsU.js +8 -0
- package/out/web/assets/{timeline-definition-24CTP7MA-Dke2p93p.js → timeline-definition-24CTP7MA-iCRhhJ7C.js} +1 -1
- package/out/web/assets/{treeView-Q6P3EWNA-hNELnXUs.js → treeView-Q6P3EWNA-DZ-y08qp.js} +1 -1
- package/out/web/assets/{treemap-WGGIJYW6-D2B6wDsx.js → treemap-WGGIJYW6-De0CxzMx.js} +1 -1
- package/out/web/assets/{vennDiagram-4TSXK5OY-CDkW7rUP.js → vennDiagram-4TSXK5OY-w_7aZ6xe.js} +1 -1
- package/out/web/assets/{wardley-WFR3VGLG-BECdXETi.js → wardley-WFR3VGLG-DT0y0xJ4.js} +1 -1
- package/out/web/assets/{wardleyDiagram-VM6X3IG4-B5BycpQ4.js → wardleyDiagram-VM6X3IG4-DAdXELbQ.js} +1 -1
- package/out/web/assets/window-BJCVtyET.js +1 -0
- package/out/web/assets/{xychartDiagram-S5SC5T6Z-CtJS3b--.js → xychartDiagram-S5SC5T6Z-IZIXf3Vo.js} +1 -1
- package/out/web/index-web.html +3 -2
- package/out/web/index.html +3 -2
- package/package.json +71 -22
- package/shared-modules/.github/workflows/ci.yml +120 -0
- package/shared-modules/.github/workflows/update.yaml +28 -0
- package/slash-commands.json +7 -2
- package/src/bin/auto-build.js +66 -0
- package/src/bin/desktop.js +113 -0
- package/src/bin/desktop.test.js +113 -0
- package/src/bin/index.js +18 -25
- package/src/bin/index.test.js +89 -0
- package/src/bin/measure-effects.mjs +53 -0
- package/src/bin/package.test.js +28 -0
- package/src/bin/release-notes.test.js +84 -0
- package/src/bin/styles.test.js +20 -0
- package/src/bin/web.js +5 -0
- package/src/bin/web.test.js +39 -0
- package/src/renderer/index.html +0 -2
- package/src/renderer/node_modules/.vite/vitest/da39a3ee5e6b4b0d3255bfef95601890afd80709/results.json +1 -1
- package/src/renderer/shared/agentProgress.ts +33 -0
- package/src/renderer/shared/components/AgentActivityDrawer.tsx +3 -2
- package/src/renderer/shared/components/AgentActivityTable.tsx +1 -1
- package/src/renderer/shared/components/ApprovalCard.test.tsx +24 -0
- package/src/renderer/shared/components/ApprovalCard.tsx +10 -3
- package/src/renderer/shared/components/ArtifactPreviewPanel.tsx +88 -37
- package/src/renderer/shared/components/AuthGate.tsx +75 -39
- package/src/renderer/shared/components/BackgroundTerminals.tsx +181 -0
- package/src/renderer/shared/components/ChatCodeBlock.tsx +8 -4
- package/src/renderer/shared/components/ChatMessageItem.test.tsx +68 -0
- package/src/renderer/shared/components/ChatMessageItem.tsx +36 -16
- package/src/renderer/shared/components/ChatPanel.test.tsx +21 -0
- package/src/renderer/shared/components/ChatPanel.tsx +294 -272
- package/src/renderer/shared/components/ChunkErrorBoundary.tsx +4 -102
- package/src/renderer/shared/components/CliSessionsView.test.tsx +125 -0
- package/src/renderer/shared/components/CliSessionsView.tsx +61 -13
- package/src/renderer/shared/components/CodeReviewPage.tsx +111 -8
- package/src/renderer/shared/components/CollapsiblePasteInput.tsx +90 -0
- package/src/renderer/shared/components/ContextCompactionStatus.tsx +17 -0
- package/src/renderer/shared/components/DashboardSidebar.tsx +15 -128
- package/src/renderer/shared/components/DesktopTitlebar.tsx +45 -19
- package/src/renderer/shared/components/ErrorNotice.tsx +29 -0
- package/src/renderer/shared/components/FormattedMessage.tsx +11 -0
- package/src/renderer/shared/components/GeminiLiveOverlay.css +86 -0
- package/src/renderer/shared/components/GeminiLiveOverlay.test.tsx +24 -0
- package/src/renderer/shared/components/GeminiLiveOverlay.tsx +85 -101
- package/src/renderer/shared/components/GlideSelect.css +138 -0
- package/src/renderer/shared/components/GlideSelect.d.ts +31 -0
- package/src/renderer/shared/components/GlideSelect.jsx +266 -0
- package/src/renderer/shared/components/ImageSearchCard.tsx +46 -56
- package/src/renderer/shared/components/ImageStudioPanel.tsx +9 -8
- package/src/renderer/shared/components/LibraryItemCard.tsx +72 -0
- package/src/renderer/shared/components/LibraryPage.tsx +165 -0
- package/src/renderer/shared/components/LibraryPreview.tsx +59 -0
- package/src/renderer/shared/components/McpServersView.tsx +27 -8
- package/src/renderer/shared/components/McpToolAllowlist.tsx +2 -4
- package/src/renderer/shared/components/McpToolResults.tsx +99 -0
- package/src/renderer/shared/components/MintDashboard.tsx +308 -770
- package/src/renderer/shared/components/ModSessionControls.tsx +8 -0
- package/src/renderer/shared/components/ModUi.test.tsx +65 -0
- package/src/renderer/shared/components/ModUi.tsx +26 -0
- package/src/renderer/shared/components/ModelSelectorPopover.tsx +14 -7
- package/src/renderer/shared/components/ModsPanel.tsx +156 -0
- package/src/renderer/shared/components/ProgressActivity.tsx +17 -0
- package/src/renderer/shared/components/ReviewHistory.tsx +42 -0
- package/src/renderer/shared/components/RewindModal.tsx +5 -12
- package/src/renderer/shared/components/RunSummaryDashboard.tsx +6 -12
- package/src/renderer/shared/components/ScheduledTasksView.tsx +7 -6
- package/src/renderer/shared/components/SelectField.test.tsx +27 -0
- package/src/renderer/shared/components/SelectField.tsx +38 -0
- package/src/renderer/shared/components/SessionSources.tsx +48 -0
- package/src/renderer/shared/components/SessionSourcesPopover.tsx +61 -0
- package/src/renderer/shared/components/Settings/AgentsTab.tsx +7 -6
- package/src/renderer/shared/components/Settings/AudioTab.tsx +8 -7
- package/src/renderer/shared/components/Settings/AutomationTab.tsx +2 -2
- package/src/renderer/shared/components/Settings/GeneralTab.tsx +33 -32
- package/src/renderer/shared/components/Settings/MemoryTab.test.tsx +37 -0
- package/src/renderer/shared/components/Settings/MemoryTab.tsx +71 -31
- package/src/renderer/shared/components/Settings/NotificationsTab.test.tsx +15 -0
- package/src/renderer/shared/components/Settings/NotificationsTab.tsx +84 -0
- package/src/renderer/shared/components/Settings/ThemeTab.tsx +19 -11
- package/src/renderer/shared/components/SlashChoicePanel.tsx +88 -0
- package/src/renderer/shared/components/SlashSuggestions.test.tsx +33 -0
- package/src/renderer/shared/components/SlashSuggestions.tsx +38 -10
- package/src/renderer/shared/components/SourcesBlock.tsx +12 -20
- package/src/renderer/shared/components/ToolSurfacePage.test.tsx +32 -0
- package/src/renderer/shared/components/ToolSurfacePage.tsx +59 -11
- package/src/renderer/shared/components/ToolsPanelToggle.tsx +13 -0
- package/src/renderer/shared/components/VeoStudioPanel.tsx +9 -8
- package/src/renderer/shared/components/ViewedImages.tsx +36 -0
- package/src/renderer/shared/components/VirtualChatHistory.tsx +82 -0
- package/src/renderer/shared/components/VoicePill.css +85 -0
- package/src/renderer/shared/components/VoicePill.d.ts +12 -0
- package/src/renderer/shared/components/VoicePill.jsx +190 -0
- package/src/renderer/shared/components/VoicePill.test.tsx +22 -0
- package/src/renderer/shared/components/WorkspaceContextPopover.tsx +20 -15
- package/src/renderer/shared/components/WorkspacePaneResizer.tsx +92 -0
- package/src/renderer/shared/components/WorkspacePreviewActions.test.tsx +44 -0
- package/src/renderer/shared/components/WorkspacePreviewActions.tsx +19 -0
- package/src/renderer/shared/components/WorkspaceSelector.tsx +13 -8
- package/src/renderer/shared/components/background-terminals.css +292 -0
- package/src/renderer/shared/components/ui/README.md +52 -0
- package/src/renderer/shared/components/ui/button.tsx +37 -0
- package/src/renderer/shared/components/ui/demo.tsx +26 -0
- package/src/renderer/shared/components/ui/error-recovery.css +35 -0
- package/src/renderer/shared/components/ui/error-recovery.tsx +35 -0
- package/src/renderer/shared/components/ui/voice-powered-orb.css +6 -0
- package/src/renderer/shared/components/ui/voice-powered-orb.tsx +374 -0
- package/src/renderer/shared/components/workspace-selector.css +248 -0
- package/src/renderer/shared/constants/config.ts +30 -1
- package/src/renderer/shared/constants/slashCommands.ts +1 -1
- package/src/renderer/shared/conversation/lifecycle.test.ts +362 -0
- package/src/renderer/shared/conversation/lifecycle.ts +418 -0
- package/src/renderer/shared/conversation/projectNavigation.test.ts +105 -0
- package/src/renderer/shared/conversation/projectNavigation.ts +39 -0
- package/src/renderer/shared/conversation/sourcesTransport.ts +27 -0
- package/src/renderer/shared/conversation/syncView.test.ts +1 -34
- package/src/renderer/shared/conversation/syncView.ts +0 -37
- package/src/renderer/shared/conversation/transport.test.ts +163 -0
- package/src/renderer/shared/conversation/transport.ts +159 -0
- package/src/renderer/shared/conversation/useConversationCoordinator.ts +30 -72
- package/src/renderer/shared/css/agent-observability.css +20 -21
- package/src/renderer/shared/css/auth-gate.css +112 -13
- package/src/renderer/shared/css/code-review.css +33 -0
- package/src/renderer/shared/css/code-sessions.css +27 -0
- package/src/renderer/shared/css/collapsed-paste.css +35 -0
- package/src/renderer/shared/css/effects.css +15 -0
- package/src/renderer/shared/css/error-notice.css +60 -0
- package/src/renderer/shared/css/library.css +476 -0
- package/src/renderer/shared/css/management-views.css +138 -0
- package/src/renderer/shared/css/mcp-results.css +11 -0
- package/src/renderer/shared/css/model-selector.css +163 -105
- package/src/renderer/shared/css/mods.css +77 -0
- package/src/renderer/shared/css/notification-notice.css +28 -0
- package/src/renderer/shared/css/session-sources-popover.css +9 -0
- package/src/renderer/shared/css/session-sources.css +23 -0
- package/src/renderer/shared/css/settings/memory.css +154 -0
- package/src/renderer/shared/css/settings/notifications.css +11 -0
- package/src/renderer/shared/css/settings/theme.css +5 -0
- package/src/renderer/shared/css/slash-choice.css +95 -0
- package/src/renderer/shared/css/slash-suggestions.css +68 -0
- package/src/renderer/shared/css/sources-block.css +91 -0
- package/src/renderer/shared/css/thinking-status.css +46 -0
- package/src/renderer/shared/css/tools-panel.css +7 -0
- package/src/renderer/shared/css/ui-tailwind.css +19 -0
- package/src/renderer/shared/css/viewed-images.css +15 -0
- package/src/renderer/shared/fonts.css +46 -0
- package/src/renderer/shared/fonts.ts +3 -12
- package/src/renderer/shared/lib/utils.ts +6 -0
- package/src/renderer/shared/library/controller.test.ts +61 -0
- package/src/renderer/shared/library/controller.ts +57 -0
- package/src/renderer/shared/library/transport.test.ts +26 -0
- package/src/renderer/shared/library/transport.ts +60 -0
- package/src/renderer/shared/library/useLibraryFile.ts +38 -0
- package/src/renderer/shared/mods.ts +58 -0
- package/src/renderer/shared/platform.test.ts +57 -1
- package/src/renderer/shared/platform.ts +46 -1
- package/src/renderer/shared/theme/themeManager.test.ts +43 -0
- package/src/renderer/shared/theme/themeManager.ts +17 -4
- package/src/renderer/shared/types.ts +56 -2
- package/src/renderer/shared/utils/agentActivity.test.ts +75 -0
- package/src/renderer/shared/utils/agentActivity.ts +42 -3
- package/src/renderer/shared/utils/approval.tsx +7 -0
- package/src/renderer/shared/utils/artifactBrowser.test.ts +80 -0
- package/src/renderer/shared/utils/artifactBrowser.ts +41 -0
- package/src/renderer/shared/utils/contextCompaction.test.tsx +48 -0
- package/src/renderer/shared/utils/contextCompaction.ts +21 -0
- package/src/renderer/shared/utils/effectVisibility.ts +9 -0
- package/src/renderer/shared/utils/markdown.tsx +3 -3
- package/src/renderer/shared/utils/mcpResults.test.tsx +91 -0
- package/src/renderer/shared/utils/modViewport.ts +7 -0
- package/src/renderer/shared/utils/nativeRecordingSession.test.ts +61 -0
- package/src/renderer/shared/utils/nativeRecordingSession.ts +46 -0
- package/src/renderer/shared/utils/notificationSettings.test.ts +14 -0
- package/src/renderer/shared/utils/notificationSettings.ts +23 -0
- package/src/renderer/shared/utils/notifications.test.ts +51 -0
- package/src/renderer/shared/utils/notifications.ts +54 -0
- package/src/renderer/shared/utils/pastedText.test.ts +20 -0
- package/src/renderer/shared/utils/pastedText.ts +13 -0
- package/src/renderer/shared/utils/progressCache.test.ts +32 -0
- package/src/renderer/shared/utils/sessionSources.test.ts +31 -0
- package/src/renderer/shared/utils/sessionSources.ts +34 -0
- package/src/renderer/shared/utils/slashCommandProcessor.ts +1 -1
- package/src/renderer/shared/utils/sourceAttachments.ts +28 -0
- package/src/renderer/shared/utils/speech.ts +51 -9
- package/src/renderer/shared/utils/syntaxHighlight.test.tsx +22 -0
- package/src/renderer/shared/utils/syntaxHighlight.tsx +26 -0
- package/src/renderer/shared/utils/useGeminiLiveVoice.ts +49 -5
- package/src/renderer/shared/utils/useLatestCallback.ts +9 -0
- package/src/renderer/shared/utils/useNativeVoiceInput.ts +80 -72
- package/src/renderer/shared/utils/useSessionSources.ts +33 -0
- package/src/renderer/shared/utils/viewedImages.ts +26 -0
- package/src/renderer/shared/utils/workspacePane.test.ts +33 -0
- package/src/renderer/shared/utils/workspacePane.ts +20 -0
- package/src/renderer/shared/utils/workspacePreview.test.ts +24 -0
- package/src/renderer/shared/utils/workspacePreview.ts +16 -0
- package/src/renderer/shared/utils/workspaceSnapshot.test.ts +49 -0
- package/src/renderer/shared/utils/workspaceSnapshot.ts +26 -0
- package/src/renderer/shared/utils/workspaces.ts +10 -0
- package/src/renderer/shared/workspaceUndo.ts +88 -0
- package/src/renderer/src/App.tsx +9 -1
- package/src/renderer/src/components/LiveTranslateControls.tsx +65 -0
- package/src/renderer/src/components/PicturesLibrary.tsx +2 -288
- package/src/renderer/src/components/ScreenPicker.css +67 -30
- package/src/renderer/src/components/ScreenPicker.tsx +201 -60
- package/src/renderer/src/components/SettingsWindow.tsx +10 -5
- package/src/renderer/src/components/WorkspacePanel.tsx +222 -32
- package/src/renderer/src/components/browser-shell.css +1 -1
- package/src/renderer/src/components/browser-suggestions-popup.css +1 -1
- package/src/renderer/src/components/liveTranslateFrames.test.ts +26 -5
- package/src/renderer/src/components/liveTranslateFrames.ts +18 -7
- package/src/renderer/src/components/liveTranslateLanguage.ts +6 -0
- package/src/renderer/src/css/app-shell.css +52 -137
- package/src/renderer/src/css/chat.css +21 -495
- package/src/renderer/src/css/desktop-tools.css +199 -1
- package/src/renderer/src/css/misc.css +0 -52
- package/src/renderer/src/css/pictures.css +2 -415
- package/src/renderer/src/css/settings/base.css +50 -47
- package/src/renderer/src/css/sidebar-workspace.css +151 -94
- package/src/renderer/src/css/tool-surfaces.css +65 -9
- package/src/renderer/src/css/widget.css +1 -1
- package/src/renderer/src/env.d.ts +1 -9
- package/src/renderer/src/index.css +1 -1
- package/src/renderer/src/main.tsx +2 -1
- package/src/renderer/src/proactiveSuggestions.ts +29 -0
- package/src/renderer/src/tauri.ts +122 -330
- package/src/renderer/src/voiceInput.ts +2 -1
- package/src/renderer/src-web/components/PicturesLibrary.tsx +2 -285
- package/src/renderer/src-web/components/PullToRefresh.tsx +1 -1
- package/src/renderer/src-web/components/SettingsWindow.tsx +10 -5
- package/src/renderer/src-web/css/app-shell.css +24 -121
- package/src/renderer/src-web/css/chat.css +21 -495
- package/src/renderer/src-web/css/misc.css +0 -52
- package/src/renderer/src-web/css/mobile.css +15 -14
- package/src/renderer/src-web/css/pictures.css +2 -462
- package/src/renderer/src-web/css/settings/base.css +50 -47
- package/src/renderer/src-web/css/sidebar-workspace.css +9 -95
- package/src/renderer/src-web/css/widget.css +1 -1
- package/src/renderer/src-web/env.d.ts +1 -12
- package/src/renderer/src-web/index.css +1 -1
- package/src/renderer/src-web/main.tsx +2 -1
- package/src/renderer/src-web/proactiveSuggestions.ts +3 -0
- package/src/renderer/src-web/tauri.ts +129 -354
- package/src/renderer/tests/backgroundTerminals.browser.html +81 -0
- package/src/renderer/tests/chatPanelFixture.ts +23 -0
- package/src/renderer/tests/chatPerformance.browser.html +71 -0
- package/src/renderer/tests/cliSessions.browser.html +82 -0
- package/src/renderer/tests/collapsedPaste.browser.html +70 -0
- package/src/renderer/tests/composerMenus.browser.html +116 -0
- package/src/renderer/tests/contextCompaction.browser.html +17 -0
- package/src/renderer/tests/conversationLifecycle.browser.html +70 -0
- package/src/renderer/tests/effectsPerformance.browser.html +13 -0
- package/src/renderer/tests/errorRecovery.browser.html +21 -0
- package/src/renderer/tests/glideSelect.browser.html +71 -0
- package/src/renderer/tests/glideSelect.preview.html +27 -0
- package/src/renderer/tests/library.browser.html +1 -0
- package/src/renderer/tests/library.browser.tsx +78 -0
- package/src/renderer/tests/liveOrb.browser.html +49 -0
- package/src/renderer/tests/liveVoice.browser.html +29 -0
- package/src/renderer/tests/modInput.browser.html +22 -0
- package/src/renderer/tests/sessionSources.browser.html +1 -0
- package/src/renderer/tests/sessionSources.browser.tsx +107 -0
- package/src/renderer/tests/skills.browser.html +24 -0
- package/src/renderer/tests/toolsPanel.browser.html +1 -0
- package/src/renderer/tests/toolsPanel.browser.tsx +113 -0
- package/src/renderer/tests/viewedImages.browser.html +1 -0
- package/src/renderer/tests/viewedImages.browser.tsx +93 -0
- package/src/renderer/tests/voicePill.browser.html +80 -0
- package/src/renderer/tests/voicePill.preview.html +34 -0
- package/src/renderer/tests/webSources.browser.html +1 -0
- package/src/renderer/tests/webSources.browser.tsx +98 -0
- package/src/renderer/tests/workspaceUndo.browser.html +92 -0
- package/src-tauri/Cargo.toml +40 -0
- package/src-tauri/build.rs +3 -0
- package/src-tauri/src/app/lifecycle.rs +277 -0
- package/src-tauri/src/app/mod.rs +4 -0
- package/src-tauri/src/app/shortcuts.rs +40 -0
- package/src-tauri/src/app/tray.rs +52 -0
- package/src-tauri/src/background/events.rs +70 -0
- package/src-tauri/src/background/headless.rs +230 -0
- package/src-tauri/src/background/mod.rs +4 -0
- package/src-tauri/src/background/proactive.rs +262 -0
- package/src-tauri/src/commands/approvals.rs +20 -0
- package/src-tauri/src/commands/auth.rs +127 -0
- package/src-tauri/src/commands/conversation.rs +642 -0
- package/src-tauri/src/commands/integrations.rs +157 -0
- package/src-tauri/src/commands/media.rs +179 -0
- package/src-tauri/src/commands/mod.rs +11 -0
- package/src-tauri/src/commands/mods.rs +6 -0
- package/src-tauri/src/commands/settings.rs +141 -0
- package/src-tauri/src/commands/voice.rs +153 -0
- package/src-tauri/src/commands/workspace.rs +501 -0
- package/src-tauri/src/lib.rs +10 -0
- package/src-tauri/src/main.rs +3 -0
- package/src-tauri/src/native/actions.rs +206 -0
- package/src-tauri/src/native/browser.rs +252 -0
- package/src-tauri/src/native/capture.rs +695 -0
- package/src-tauri/src/native/discord_rpc.rs +99 -0
- package/src-tauri/src/native/integrations.rs +126 -0
- package/src-tauri/src/native/mod.rs +12 -0
- package/src-tauri/src/native/notifications.rs +51 -0
- package/src-tauri/src/native/plugins.rs +14 -0
- package/src-tauri/src/native/system.rs +250 -0
- package/src-tauri/src/native/terminal.rs +201 -0
- package/src-tauri/src/native/updater.rs +148 -0
- package/src-tauri/src/native/windows.rs +143 -0
- package/tsconfig.json +2 -0
- package/vite.config.ts +4 -1
- package/vite.config.web.ts +4 -0
- package/.cargo/config.toml +0 -13
- package/.claude/settings.local.json +0 -182
- package/.codex +0 -0
- package/CLAUDE.md +0 -102
- package/ROADMAP.md +0 -30
- package/mint-presentation-demo.mp4 +0 -0
- package/out/web/Live2DCubismCore.js +0 -9
- package/out/web/assets/CliSessionsView-BxUVWEEL.js +0 -1
- package/out/web/assets/CliSessionsView-CBDTXuQv.css +0 -1
- package/out/web/assets/CodeReviewPage-DkMgfcos.css +0 -1
- package/out/web/assets/CodeReviewPage-jKlmLJwT.js +0 -3
- package/out/web/assets/CommandPalette-DnwPA5hy.js +0 -1
- package/out/web/assets/ImageStudioPanel-BR1XFwhR.js +0 -1
- package/out/web/assets/LinkedFoldersView-bi-CWQ-I.js +0 -1
- package/out/web/assets/McpRegistryPicker-D5tEFnyq.js +0 -1
- package/out/web/assets/McpServersView-BGG1dhFM.js +0 -1
- package/out/web/assets/MintDashboard-BIglDEWX.js +0 -20
- package/out/web/assets/MintDashboard-DSMywSgs.css +0 -1
- package/out/web/assets/ModelPanel-CbJ1PFoZ.js +0 -1
- package/out/web/assets/PicturesLibrary-CQP0fLP1.css +0 -1
- package/out/web/assets/PicturesLibrary-DoYN7T1p.js +0 -1
- package/out/web/assets/PluginsView-CU1HWXGk.js +0 -1
- package/out/web/assets/ScheduledTasksView-Bnl36y2N.js +0 -1
- package/out/web/assets/SettingsWindow-DhWLAn9T.css +0 -1
- package/out/web/assets/SettingsWindow-Dw8L01pw.js +0 -2
- package/out/web/assets/SkillsView-cnl8aY5p.js +0 -2
- package/out/web/assets/ToolSurfacePage-CgsQw6l5.css +0 -1
- package/out/web/assets/ToolSurfacePage-Cz2VJAPZ.js +0 -37
- package/out/web/assets/VeoStudioPanel-D4JnERWR.js +0 -4
- package/out/web/assets/chunk-CKBBP62Z-cIrXq6jN.js +0 -2
- package/out/web/assets/classDiagram-DTDB5LWJ-Dq0smRWk.js +0 -1
- package/out/web/assets/classDiagram-v2-JRS7N3AN-Dq0smRWk.js +0 -1
- package/out/web/assets/config-C-ZFtipU.css +0 -1
- package/out/web/assets/config-eEDngJXO.js +0 -1
- package/out/web/assets/core-hQ2VA9Ti.js +0 -1
- package/out/web/assets/dist-js-Bf2bhoku.js +0 -1
- package/out/web/assets/flowDiagram-A5DVABFB-BLg7nEcd.js +0 -1
- package/out/web/assets/index-Btsf4L8M.css +0 -1
- package/out/web/assets/index-D8D9MeRA.js +0 -11
- package/out/web/assets/lucide-react-Ip3L6Jtn.js +0 -1
- package/out/web/assets/markdown-BSeeUbJH.js +0 -38
- package/out/web/assets/modelManager-tMVmJVAW.js +0 -2
- package/out/web/assets/prompt-latin-400-normal-BQ9zjSN8.woff2 +0 -0
- package/out/web/assets/prompt-latin-400-normal-CxU4ec_r.woff +0 -0
- package/out/web/assets/prompt-latin-500-normal-B1edBDQ9.woff +0 -0
- package/out/web/assets/prompt-latin-500-normal-CxzxEHZc.woff2 +0 -0
- package/out/web/assets/prompt-latin-600-normal-CSDDLorv.woff +0 -0
- package/out/web/assets/prompt-latin-600-normal-hKZWXsc1.woff2 +0 -0
- package/out/web/assets/prompt-latin-700-normal-BfbftDSq.woff +0 -0
- package/out/web/assets/prompt-latin-700-normal-I2gc831J.woff2 +0 -0
- package/out/web/assets/prompt-thai-400-normal-BrkKv8cO.woff2 +0 -0
- package/out/web/assets/prompt-thai-400-normal-DJypnfr3.woff +0 -0
- package/out/web/assets/prompt-thai-500-normal-C18pDUoL.woff2 +0 -0
- package/out/web/assets/prompt-thai-500-normal-D7YNqUJD.woff +0 -0
- package/out/web/assets/prompt-thai-600-normal-CYPViXds.woff +0 -0
- package/out/web/assets/prompt-thai-600-normal-MrdfU7zR.woff2 +0 -0
- package/out/web/assets/prompt-thai-700-normal-Cb5ilR-c.woff +0 -0
- package/out/web/assets/prompt-thai-700-normal-Cg4aQ0Nn.woff2 +0 -0
- package/out/web/assets/stateDiagram-v2-4QOOHH4V-DeEc0lGZ.js +0 -1
- package/out/web/assets/swimlanesDiagram-VK2B7HYN-DpVik9v7.js +0 -8
- package/out/web/assets/window-5qYXKoW7.js +0 -1
- package/skills-lock.json +0 -77
- package/src/renderer/public/Live2DCubismCore.js +0 -9
- package/src/renderer/src/companionWidget.ts +0 -95
- package/src/renderer/src/components/Live2DStage.tsx +0 -412
- package/src/renderer/src/components/ModelPanel.tsx +0 -155
- package/src/renderer/src/css/model.css +0 -628
- package/src/renderer/src-web/companionWidget.ts +0 -37
- package/src/renderer/src-web/components/ModelPanel.tsx +0 -12
- package/src/renderer/src-web/css/model.css +0 -628
|
@@ -1,10 +1,10 @@
|
|
|
1
|
+
import { createLibraryTransport } from '../shared/library/transport'
|
|
2
|
+
import { createSourcesTransport } from '../shared/conversation/sourcesTransport'
|
|
1
3
|
/** Returns true when running inside the Tauri webview (desktop app). */
|
|
2
4
|
export const isTauriRuntime = (): boolean =>
|
|
3
5
|
typeof window !== 'undefined' && Boolean((window as any).__TAURI_INTERNALS__)
|
|
4
6
|
|
|
5
|
-
|
|
6
|
-
* (non-Tauri) branch, so clearAiNotifications can dismiss it. */
|
|
7
|
-
let lastAiNotification: Notification | null = null
|
|
7
|
+
import { sendBrowserNotification, clearBrowserNotifications, openNotificationChat } from '../shared/utils/notifications'
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* Page-relative: Tauri loads the bundled webview assets from relative paths
|
|
@@ -26,6 +26,7 @@ export const getLocalApiBase = (): string => {
|
|
|
26
26
|
|
|
27
27
|
export * from '../shared/types'
|
|
28
28
|
import type { MintPlatformApi } from '../shared/platform'
|
|
29
|
+
import { createConversationTransport } from '../shared/conversation/transport'
|
|
29
30
|
import type {
|
|
30
31
|
|
|
31
32
|
RuntimeStatus,
|
|
@@ -57,11 +58,6 @@ import type {
|
|
|
57
58
|
} from '../shared/types'
|
|
58
59
|
|
|
59
60
|
|
|
60
|
-
type DesktopStreamEvent =
|
|
61
|
-
| { type: 'started'; interactionId: number }
|
|
62
|
-
| { type: 'chunk'; chunk: string }
|
|
63
|
-
| { type: 'progress'; progress: AgentProgress }
|
|
64
|
-
|
|
65
61
|
export type { GeminiLiveEvent } from '../shared/utils/useGeminiLiveVoice'
|
|
66
62
|
import type { GeminiLiveEvent } from '../shared/utils/useGeminiLiveVoice'
|
|
67
63
|
|
|
@@ -325,9 +321,9 @@ export async function fetchProviderModels(
|
|
|
325
321
|
return invoke<string[]>('fetch_provider_models', { provider, apiKey, baseUrl })
|
|
326
322
|
}
|
|
327
323
|
|
|
328
|
-
/** Fetch
|
|
329
|
-
*
|
|
330
|
-
*
|
|
324
|
+
/** Fetch image model choices from the shared Rust catalog.
|
|
325
|
+
* Discovered models precede missing presets; blank overrides use the saved key.
|
|
326
|
+
* Provider discovery is cached for 1 hour on the Rust side. */
|
|
331
327
|
export async function fetchImageProviderModels(
|
|
332
328
|
provider: string,
|
|
333
329
|
apiKey: string = '',
|
|
@@ -336,9 +332,9 @@ export async function fetchImageProviderModels(
|
|
|
336
332
|
return invoke<string[]>('fetch_image_provider_models', { provider, apiKey: apiKey || '' })
|
|
337
333
|
}
|
|
338
334
|
|
|
339
|
-
/** Fetch
|
|
340
|
-
*
|
|
341
|
-
*
|
|
335
|
+
/** Fetch video model choices from the shared Rust catalog.
|
|
336
|
+
* Discovered models precede missing presets; blank overrides use the saved key.
|
|
337
|
+
* Provider discovery is cached for 1 hour on the Rust side. */
|
|
342
338
|
export async function fetchVideoProviderModels(
|
|
343
339
|
provider: string,
|
|
344
340
|
apiKey: string = '',
|
|
@@ -347,10 +343,9 @@ export async function fetchVideoProviderModels(
|
|
|
347
343
|
return invoke<string[]>('fetch_video_provider_models', { provider, apiKey: apiKey || '' })
|
|
348
344
|
}
|
|
349
345
|
|
|
350
|
-
/** Fetch
|
|
351
|
-
*
|
|
352
|
-
*
|
|
353
|
-
* Results are cached for 1 hour on the Rust side. */
|
|
346
|
+
/** Fetch Gemini Live model choices from the shared Rust catalog.
|
|
347
|
+
* Discovered models precede missing presets; blank overrides use the saved key.
|
|
348
|
+
* Provider discovery is cached for 1 hour on the Rust side. */
|
|
354
349
|
export async function fetchGeminiLiveModels(apiKey: string): Promise<string[]> {
|
|
355
350
|
const { invoke } = await import('@tauri-apps/api/core')
|
|
356
351
|
return invoke<string[]>('fetch_gemini_live_models', { apiKey: apiKey || '' })
|
|
@@ -384,161 +379,12 @@ export async function uploadFile(file: File): Promise<string> {
|
|
|
384
379
|
return url;
|
|
385
380
|
}
|
|
386
381
|
|
|
387
|
-
export
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
workspacePath?: string | null,
|
|
394
|
-
chatId?: string | null,
|
|
395
|
-
agentId?: string | null,
|
|
396
|
-
planMode?: boolean,
|
|
397
|
-
): Promise<ChatResponse> {
|
|
398
|
-
const outgoingMessage = withImagePlaceholder(message, imageDataUri, videoDataUri)
|
|
399
|
-
if (!isTauriRuntime()) {
|
|
400
|
-
const API_BASE = getLocalApiBase();
|
|
401
|
-
try {
|
|
402
|
-
const res = await authFetch(`${API_BASE}/chat`, {
|
|
403
|
-
method: 'POST',
|
|
404
|
-
headers: { 'Content-Type': 'application/json' },
|
|
405
|
-
body: JSON.stringify({ message: outgoingMessage, systemInstruction: '', chatId, imageDataUri, audioDataUri, videoDataUri, documentAttachment, workspacePath, agentId })
|
|
406
|
-
});
|
|
407
|
-
const data = await res.json().catch(() => null);
|
|
408
|
-
if (!res.ok) {
|
|
409
|
-
return {
|
|
410
|
-
provider: 'error',
|
|
411
|
-
model: 'error',
|
|
412
|
-
text: data?.text || data?.message || data?.status || `Local API returned HTTP ${res.status}`,
|
|
413
|
-
};
|
|
414
|
-
}
|
|
415
|
-
if (!data || typeof data.text !== 'string') {
|
|
416
|
-
return { provider: 'error', model: 'error', text: 'Local API returned an invalid chat response.' };
|
|
417
|
-
}
|
|
418
|
-
return data;
|
|
419
|
-
} catch (e) {
|
|
420
|
-
console.error("Failed to send chat message to local server:", e);
|
|
421
|
-
return { provider: 'error', model: 'error', text: `Failed to connect to Local API Server: ${e}` };
|
|
422
|
-
}
|
|
423
|
-
}
|
|
424
|
-
const { invoke } = await import('@tauri-apps/api/core')
|
|
425
|
-
const response = await invoke<ChatResponse>('send_chat_message', {
|
|
426
|
-
request: { message: outgoingMessage, systemInstruction: '', chatId, imageDataUri, audioDataUri, videoDataUri, documentAttachment, workspacePath, agentId, planMode: planMode ?? false },
|
|
427
|
-
})
|
|
428
|
-
if (imageDataUri) {
|
|
429
|
-
await invoke('save_pictures', {
|
|
430
|
-
images: imageDataUri.split(' '),
|
|
431
|
-
source: 'chat',
|
|
432
|
-
message: outgoingMessage,
|
|
433
|
-
})
|
|
434
|
-
}
|
|
435
|
-
if (videoDataUri) {
|
|
436
|
-
await invoke('save_pictures', {
|
|
437
|
-
images: videoDataUri.split(' '),
|
|
438
|
-
source: 'chat',
|
|
439
|
-
message: outgoingMessage,
|
|
440
|
-
})
|
|
441
|
-
}
|
|
442
|
-
return response
|
|
443
|
-
}
|
|
444
|
-
|
|
445
|
-
export async function streamChatMessage(
|
|
446
|
-
message: string,
|
|
447
|
-
onChunk: (chunk: string) => void,
|
|
448
|
-
imageDataUri?: string | null,
|
|
449
|
-
audioDataUri?: string | null,
|
|
450
|
-
videoDataUri?: string | null,
|
|
451
|
-
systemInstruction = '',
|
|
452
|
-
onProgress?: (progress: AgentProgress) => void,
|
|
453
|
-
documentAttachment?: DocumentAttachment | null,
|
|
454
|
-
workspacePath?: string | null,
|
|
455
|
-
chatId?: string | null,
|
|
456
|
-
agentId?: string | null,
|
|
457
|
-
planMode?: boolean,
|
|
458
|
-
pinnedMcpServer?: string | null,
|
|
459
|
-
// Only meaningful for the non-Tauri fallback branch below — the real
|
|
460
|
-
// Tauri branch gets approvals via the separate global
|
|
461
|
-
// `listen('tool-approval-requested', ...)` event instead, independent of
|
|
462
|
-
// this function, so it ignores this parameter entirely.
|
|
463
|
-
onApprovalRequested?: (payload: { token: string; approval: any }) => void,
|
|
464
|
-
onTurnStarted?: (interactionId: number) => void,
|
|
465
|
-
): Promise<ChatResponse> {
|
|
466
|
-
if (!isTauriRuntime()) {
|
|
467
|
-
const API_BASE = getLocalApiBase();
|
|
468
|
-
const outgoingMessage = withImagePlaceholder(message, imageDataUri, videoDataUri);
|
|
469
|
-
const res = await authFetch(`${API_BASE}/chat-stream`, {
|
|
470
|
-
method: 'POST',
|
|
471
|
-
headers: { 'Content-Type': 'application/json' },
|
|
472
|
-
body: JSON.stringify({ message: outgoingMessage, systemInstruction, chatId, imageDataUri, audioDataUri, videoDataUri, documentAttachment, workspacePath, agentId, pinnedMcpServer })
|
|
473
|
-
});
|
|
474
|
-
if (!res.ok) {
|
|
475
|
-
const data = await res.json().catch(() => null);
|
|
476
|
-
throw new Error(data?.text || data?.message || `HTTP ${res.status}`);
|
|
477
|
-
}
|
|
478
|
-
const reader = res.body?.getReader();
|
|
479
|
-
if (!reader) {
|
|
480
|
-
throw new Error("No response body reader");
|
|
481
|
-
}
|
|
482
|
-
const decoder = new TextDecoder();
|
|
483
|
-
let buffer = '';
|
|
484
|
-
let finalResponse: ChatResponse | null = null;
|
|
485
|
-
while (true) {
|
|
486
|
-
const { value, done } = await reader.read();
|
|
487
|
-
if (done) break;
|
|
488
|
-
buffer += decoder.decode(value, { stream: true });
|
|
489
|
-
const lines = buffer.split('\n');
|
|
490
|
-
buffer = lines.pop() || '';
|
|
491
|
-
for (const line of lines) {
|
|
492
|
-
if (!line.trim()) continue;
|
|
493
|
-
try {
|
|
494
|
-
const event = JSON.parse(line);
|
|
495
|
-
if (event.type === 'chunk') {
|
|
496
|
-
onChunk(event.chunk);
|
|
497
|
-
} else if (event.type === 'started') {
|
|
498
|
-
onTurnStarted?.(event.interactionId);
|
|
499
|
-
} else if (event.type === 'progress') {
|
|
500
|
-
onProgress?.(event.progress);
|
|
501
|
-
} else if (event.type === 'done') {
|
|
502
|
-
finalResponse = event.response;
|
|
503
|
-
} else if (event.type === 'approval-requested') {
|
|
504
|
-
onApprovalRequested?.({ token: event.token, approval: event.approval });
|
|
505
|
-
}
|
|
506
|
-
} catch (e) {
|
|
507
|
-
console.error("Failed to parse stream line:", line, e);
|
|
508
|
-
}
|
|
509
|
-
}
|
|
510
|
-
}
|
|
511
|
-
if (finalResponse) return finalResponse;
|
|
512
|
-
throw new Error("Stream closed without a final response");
|
|
513
|
-
}
|
|
514
|
-
const { invoke, Channel } = await import('@tauri-apps/api/core')
|
|
515
|
-
const outgoingMessage = withImagePlaceholder(message, imageDataUri, videoDataUri)
|
|
516
|
-
const onEvent = new Channel<DesktopStreamEvent>()
|
|
517
|
-
onEvent.onmessage = (event) => {
|
|
518
|
-
if (event.type === 'chunk') onChunk(event.chunk)
|
|
519
|
-
else if (event.type === 'started') onTurnStarted?.(event.interactionId)
|
|
520
|
-
else onProgress?.(event.progress)
|
|
521
|
-
}
|
|
522
|
-
const response = await invoke<ChatResponse>('stream_chat_message', {
|
|
523
|
-
request: { message: outgoingMessage, systemInstruction, chatId, imageDataUri, audioDataUri, videoDataUri, documentAttachment, workspacePath, agentId, planMode: planMode ?? false, pinnedMcpServer },
|
|
524
|
-
onEvent,
|
|
525
|
-
})
|
|
526
|
-
if (imageDataUri) {
|
|
527
|
-
await invoke('save_pictures', {
|
|
528
|
-
images: imageDataUri.split(' '),
|
|
529
|
-
source: 'chat',
|
|
530
|
-
message: outgoingMessage,
|
|
531
|
-
})
|
|
532
|
-
}
|
|
533
|
-
if (videoDataUri) {
|
|
534
|
-
await invoke('save_pictures', {
|
|
535
|
-
images: videoDataUri.split(' '),
|
|
536
|
-
source: 'chat',
|
|
537
|
-
message: outgoingMessage,
|
|
538
|
-
})
|
|
539
|
-
}
|
|
540
|
-
return response
|
|
541
|
-
}
|
|
382
|
+
export const { sendChatMessage, streamChatMessage } = createConversationTransport({
|
|
383
|
+
isNative: isTauriRuntime,
|
|
384
|
+
apiBase: getLocalApiBase,
|
|
385
|
+
fetch: authFetch,
|
|
386
|
+
ownerToken: getStoredAuthToken,
|
|
387
|
+
})
|
|
542
388
|
|
|
543
389
|
/**
|
|
544
390
|
* Starts a Gemini Live realtime voice session (beta, desktop-only). Returns a session id
|
|
@@ -597,21 +443,14 @@ export async function stopMicRecordingAndTranscribe(): Promise<string> {
|
|
|
597
443
|
return invoke<string>('stop_mic_recording_and_transcribe')
|
|
598
444
|
}
|
|
599
445
|
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
if (
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
if (markers) finalMessage = `${finalMessage} ${markers}`
|
|
606
|
-
}
|
|
607
|
-
if (videoDataUri && !finalMessage.includes('[Video #1]')) {
|
|
608
|
-
const videoCount = videoDataUri.split(/\s+/).filter(Boolean).length
|
|
609
|
-
const markers = Array.from({ length: videoCount }, (_, index) => `[Video #${index + 1}]`).join(' ')
|
|
610
|
-
if (markers) finalMessage = `${finalMessage} ${markers}`
|
|
611
|
-
}
|
|
612
|
-
return finalMessage
|
|
446
|
+
/** Stops native recording and discards audio without contacting a transcription provider. */
|
|
447
|
+
export async function cancelMicRecording(): Promise<void> {
|
|
448
|
+
if (!isTauriRuntime()) return
|
|
449
|
+
const { invoke } = await import('@tauri-apps/api/core')
|
|
450
|
+
await invoke('cancel_mic_recording')
|
|
613
451
|
}
|
|
614
452
|
|
|
453
|
+
|
|
615
454
|
export async function getTtsUrls(text: string): Promise<TtsUrl[]> {
|
|
616
455
|
if (typeof window === 'undefined' || !(window as any).__TAURI_INTERNALS__) return []
|
|
617
456
|
const { invoke } = await import('@tauri-apps/api/core')
|
|
@@ -740,17 +579,16 @@ export async function listChatSessions(): Promise<ChatSession[]> {
|
|
|
740
579
|
|
|
741
580
|
export async function updateChatSessionWorkspace(chatId: string, workspacePath: string | null): Promise<void> {
|
|
742
581
|
if (!isTauriRuntime()) {
|
|
743
|
-
const
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
console.error("Failed to update chat session workspace on local server:", e);
|
|
582
|
+
const res = await authFetch(`${getLocalApiBase()}/chat-sessions/workspace`, {
|
|
583
|
+
method: 'POST',
|
|
584
|
+
headers: { 'Content-Type': 'application/json' },
|
|
585
|
+
body: JSON.stringify({ chatId, workspacePath })
|
|
586
|
+
})
|
|
587
|
+
if (!res.ok) {
|
|
588
|
+
const data = await res.json().catch(() => null)
|
|
589
|
+
throw new Error(data?.error || `Could not save conversation workspace (HTTP ${res.status})`)
|
|
752
590
|
}
|
|
753
|
-
return
|
|
591
|
+
return
|
|
754
592
|
}
|
|
755
593
|
const { invoke } = await import('@tauri-apps/api/core')
|
|
756
594
|
await invoke('update_chat_session_workspace', { chatId, workspacePath })
|
|
@@ -834,7 +672,10 @@ export async function listLearnedSkills(workspacePath?: string): Promise<Learned
|
|
|
834
672
|
if (typeof window === 'undefined' || !isTauriRuntime()) {
|
|
835
673
|
try {
|
|
836
674
|
const API_BASE = getLocalApiBase()
|
|
837
|
-
const
|
|
675
|
+
const params = new URLSearchParams()
|
|
676
|
+
if (workspacePath?.trim()) params.set('workspacePath', workspacePath)
|
|
677
|
+
const suffix = params.size ? `?${params.toString()}` : ''
|
|
678
|
+
const res = await authFetch(`${API_BASE}/learned-skills${suffix}`)
|
|
838
679
|
if (res.ok) {
|
|
839
680
|
return await res.json()
|
|
840
681
|
}
|
|
@@ -954,19 +795,20 @@ export async function deleteSubagent(sourcePath: string): Promise<void> {
|
|
|
954
795
|
|
|
955
796
|
export async function runSlashCommand(
|
|
956
797
|
input: string,
|
|
957
|
-
cwd?: string | null
|
|
798
|
+
cwd?: string | null,
|
|
799
|
+
chatId?: string | null
|
|
958
800
|
): Promise<import('../shared/platform').SlashResponse> {
|
|
959
801
|
if (!isTauriRuntime()) {
|
|
960
802
|
const res = await authFetch(`${getLocalApiBase()}/slash`, {
|
|
961
803
|
method: 'POST',
|
|
962
804
|
headers: { 'Content-Type': 'application/json' },
|
|
963
|
-
body: JSON.stringify({ input, cwd: cwd ?? null })
|
|
805
|
+
body: JSON.stringify({ input, cwd: cwd ?? null, chat_id: chatId ?? null, ownerToken: getStoredAuthToken() })
|
|
964
806
|
})
|
|
965
807
|
if (!res.ok) return { kind: 'not_handled' }
|
|
966
808
|
return res.json()
|
|
967
809
|
}
|
|
968
810
|
const { invoke } = await import('@tauri-apps/api/core')
|
|
969
|
-
return invoke('run_slash_command', { input, cwd: cwd ?? null })
|
|
811
|
+
return invoke('run_slash_command', { input, cwd: cwd ?? null, chatId: chatId ?? null, ownerToken: getStoredAuthToken() })
|
|
970
812
|
}
|
|
971
813
|
|
|
972
814
|
export async function listCronJobs(): Promise<CronJob[]> {
|
|
@@ -1352,6 +1194,21 @@ export async function deleteWorkspaceItem(operation: import('../shared/types').W
|
|
|
1352
1194
|
return invoke('delete_workspace_item', { operation })
|
|
1353
1195
|
}
|
|
1354
1196
|
|
|
1197
|
+
export async function moveWorkspaceItem(operation: import('../shared/types').WorkspaceOperation, destination: string): Promise<import('../shared/types').WorkspaceSnapshot> {
|
|
1198
|
+
const { invoke } = await import('@tauri-apps/api/core')
|
|
1199
|
+
return invoke('move_workspace_item', { operation, destination })
|
|
1200
|
+
}
|
|
1201
|
+
|
|
1202
|
+
export async function listWorkspaceHistory(root: string): Promise<import('../shared/types').WorkspaceHistoryEntry[]> {
|
|
1203
|
+
const { invoke } = await import('@tauri-apps/api/core')
|
|
1204
|
+
return invoke('list_workspace_history', { root })
|
|
1205
|
+
}
|
|
1206
|
+
|
|
1207
|
+
export async function undoWorkspaceAction(root: string, revision: number, expectedId?: string): Promise<import('../shared/types').WorkspaceSnapshot> {
|
|
1208
|
+
const { invoke } = await import('@tauri-apps/api/core')
|
|
1209
|
+
return invoke('undo_workspace_action', { root, revision, expectedId })
|
|
1210
|
+
}
|
|
1211
|
+
|
|
1355
1212
|
export async function selectWorkspaceDirectory(): Promise<string | null> {
|
|
1356
1213
|
if (typeof window === 'undefined' || !(window as any).__TAURI_INTERNALS__) {
|
|
1357
1214
|
return null
|
|
@@ -1506,13 +1363,7 @@ export function installTauriAdapters() {
|
|
|
1506
1363
|
};
|
|
1507
1364
|
|
|
1508
1365
|
(window as any).screenPickerApi = {
|
|
1509
|
-
onScreenshot: () => {},
|
|
1510
|
-
sendSelection: () => {},
|
|
1511
|
-
startContinuousTranslation: () => {},
|
|
1512
|
-
stopContinuousTranslation: () => {},
|
|
1513
|
-
onTranslationResult: () => {},
|
|
1514
1366
|
closePicker: () => {},
|
|
1515
|
-
setOverlayInteractable: () => {},
|
|
1516
1367
|
};
|
|
1517
1368
|
|
|
1518
1369
|
(window as any).api = {
|
|
@@ -1612,8 +1463,6 @@ export function installTauriAdapters() {
|
|
|
1612
1463
|
},
|
|
1613
1464
|
onSettingsChanged: () => {},
|
|
1614
1465
|
startVision: () => {},
|
|
1615
|
-
onVisionReady: async () => () => {},
|
|
1616
|
-
captureSilentScreen: async () => '',
|
|
1617
1466
|
getSmartContext: async () => {
|
|
1618
1467
|
try {
|
|
1619
1468
|
const res = await authFetch(`${API_BASE}/smart-context`);
|
|
@@ -1651,20 +1500,8 @@ export function installTauriAdapters() {
|
|
|
1651
1500
|
}
|
|
1652
1501
|
},
|
|
1653
1502
|
onSpotlightToChat: async () => () => {},
|
|
1654
|
-
notifyAiResponse:
|
|
1655
|
-
|
|
1656
|
-
let permission = Notification.permission
|
|
1657
|
-
if (permission === 'default') {
|
|
1658
|
-
permission = await Notification.requestPermission()
|
|
1659
|
-
}
|
|
1660
|
-
if (permission === 'granted') {
|
|
1661
|
-
lastAiNotification = new Notification('Mint Agent', { body: preview })
|
|
1662
|
-
}
|
|
1663
|
-
},
|
|
1664
|
-
clearAiNotifications: () => {
|
|
1665
|
-
lastAiNotification?.close()
|
|
1666
|
-
lastAiNotification = null
|
|
1667
|
-
},
|
|
1503
|
+
notifyAiResponse: (preview: string, chatId?: string) => sendBrowserNotification(preview, chatId, openNotificationChat),
|
|
1504
|
+
clearAiNotifications: clearBrowserNotifications,
|
|
1668
1505
|
getTtsUrls: async () => [],
|
|
1669
1506
|
setAiState: () => {},
|
|
1670
1507
|
};
|
|
@@ -1780,55 +1617,11 @@ export function installTauriAdapters() {
|
|
|
1780
1617
|
}
|
|
1781
1618
|
|
|
1782
1619
|
window.screenPickerApi = {
|
|
1783
|
-
onScreenshot: async (callback) => {
|
|
1784
|
-
const { invoke } = await import('@tauri-apps/api/core')
|
|
1785
|
-
try {
|
|
1786
|
-
const image = await captureSharedScreen()
|
|
1787
|
-
callback(image)
|
|
1788
|
-
} catch (reason) {
|
|
1789
|
-
console.warn('Screen share capture failed, falling back to native capture:', reason)
|
|
1790
|
-
void invoke<string>('capture_silent_screen').then(callback)
|
|
1791
|
-
}
|
|
1792
|
-
},
|
|
1793
|
-
sendSelection: async (image) => {
|
|
1794
|
-
const { invoke } = await import('@tauri-apps/api/core')
|
|
1795
|
-
return void invoke('submit_screen_selection', { image })
|
|
1796
|
-
},
|
|
1797
|
-
startContinuousTranslation: (rect) => {
|
|
1798
|
-
let translationTimer: ReturnType<typeof setInterval> | null = null
|
|
1799
|
-
const translate = async () => {
|
|
1800
|
-
const { invoke } = await import('@tauri-apps/api/core')
|
|
1801
|
-
void invoke<string>('translate_capture_region', { rect })
|
|
1802
|
-
.then((text) => window.dispatchEvent(new CustomEvent('mint-translation', { detail: text })))
|
|
1803
|
-
.catch((reason) => {
|
|
1804
|
-
window.dispatchEvent(new CustomEvent('mint-translation', { detail: String(reason) }))
|
|
1805
|
-
})
|
|
1806
|
-
}
|
|
1807
|
-
translate()
|
|
1808
|
-
translationTimer = setInterval(translate, 3000)
|
|
1809
|
-
|
|
1810
|
-
// Clean up helper attached to window if needed
|
|
1811
|
-
if ((window as any)._stopTranslate) (window as any)._stopTranslate()
|
|
1812
|
-
;(window as any)._stopTranslate = () => {
|
|
1813
|
-
if (translationTimer) clearInterval(translationTimer)
|
|
1814
|
-
}
|
|
1815
|
-
},
|
|
1816
|
-
stopContinuousTranslation: () => {
|
|
1817
|
-
if ((window as any)._stopTranslate) {
|
|
1818
|
-
(window as any)._stopTranslate()
|
|
1819
|
-
}
|
|
1820
|
-
},
|
|
1821
|
-
onTranslationResult: (callback) => {
|
|
1822
|
-
window.addEventListener('mint-translation', ((event: CustomEvent<string>) => {
|
|
1823
|
-
callback(event.detail)
|
|
1824
|
-
}) as EventListener)
|
|
1825
|
-
},
|
|
1826
1620
|
closePicker: async () => {
|
|
1827
1621
|
const { invoke } = await import('@tauri-apps/api/core')
|
|
1828
1622
|
const { getCurrentWindow } = await import('@tauri-apps/api/window')
|
|
1829
1623
|
return invoke('close_desktop_window', { label: getCurrentWindow().label })
|
|
1830
1624
|
},
|
|
1831
|
-
setOverlayInteractable: () => {},
|
|
1832
1625
|
}
|
|
1833
1626
|
|
|
1834
1627
|
window.api = {
|
|
@@ -1875,18 +1668,7 @@ export function installTauriAdapters() {
|
|
|
1875
1668
|
onSettingsChanged: settingsChanged,
|
|
1876
1669
|
startVision: async () => {
|
|
1877
1670
|
const { invoke } = await import('@tauri-apps/api/core')
|
|
1878
|
-
|
|
1879
|
-
? await invoke<string>('capture_chat_screen')
|
|
1880
|
-
: await captureSharedScreen()
|
|
1881
|
-
return invoke('start_screen_capture', { image })
|
|
1882
|
-
},
|
|
1883
|
-
onVisionReady: async (callback) => {
|
|
1884
|
-
const { listen } = await import('@tauri-apps/api/event')
|
|
1885
|
-
return listen<string>('vision-ready', (event) => callback(event.payload))
|
|
1886
|
-
},
|
|
1887
|
-
captureSilentScreen: async () => {
|
|
1888
|
-
const { invoke } = await import('@tauri-apps/api/core')
|
|
1889
|
-
return invoke('capture_silent_screen')
|
|
1671
|
+
return invoke('start_live_translate')
|
|
1890
1672
|
},
|
|
1891
1673
|
getSmartContext: async () => {
|
|
1892
1674
|
const { invoke } = await import('@tauri-apps/api/core')
|
|
@@ -1914,19 +1696,10 @@ export function installTauriAdapters() {
|
|
|
1914
1696
|
const { listen } = await import('@tauri-apps/api/event')
|
|
1915
1697
|
return listen<string>('spotlight-to-chat', (event) => callback(event.payload))
|
|
1916
1698
|
},
|
|
1917
|
-
notifyAiResponse: async (preview) => {
|
|
1918
|
-
const {
|
|
1919
|
-
|
|
1920
|
-
if (!granted) {
|
|
1921
|
-
granted = (await requestPermission()) === 'granted'
|
|
1922
|
-
}
|
|
1923
|
-
if (granted) {
|
|
1924
|
-
sendNotification({ title: 'Mint Agent', body: preview })
|
|
1925
|
-
}
|
|
1699
|
+
notifyAiResponse: async (preview, chatId) => {
|
|
1700
|
+
const { invoke } = await import('@tauri-apps/api/core')
|
|
1701
|
+
await invoke('send_mint_notification', { body: preview, chatId: chatId ?? null })
|
|
1926
1702
|
},
|
|
1927
|
-
// The plugin has no reliable cross-platform way to dismiss an
|
|
1928
|
-
// already-shown OS notification from JS — best-effort no-op; there's
|
|
1929
|
-
// simply nothing stale left for the next unfocused reply to build on.
|
|
1930
1703
|
clearAiNotifications: () => {},
|
|
1931
1704
|
getTtsUrls: async (text) => {
|
|
1932
1705
|
const { invoke } = await import('@tauri-apps/api/core')
|
|
@@ -1939,46 +1712,6 @@ export function installTauriAdapters() {
|
|
|
1939
1712
|
}
|
|
1940
1713
|
}
|
|
1941
1714
|
|
|
1942
|
-
async function captureSharedScreen(): Promise<string> {
|
|
1943
|
-
// On Linux (especially under Wayland/WebKitGTK), getDisplayMedia often returns a black screen
|
|
1944
|
-
// or fails silently. Bypass it to force fallback to native screenshot commands.
|
|
1945
|
-
if (navigator.userAgent.toLowerCase().includes('linux')) {
|
|
1946
|
-
throw new Error('Linux detected, bypassing getDisplayMedia to use native screenshot tools')
|
|
1947
|
-
}
|
|
1948
|
-
|
|
1949
|
-
if (!navigator.mediaDevices?.getDisplayMedia) {
|
|
1950
|
-
throw new Error('getDisplayMedia is not available')
|
|
1951
|
-
}
|
|
1952
|
-
|
|
1953
|
-
const stream = await navigator.mediaDevices.getDisplayMedia({
|
|
1954
|
-
video: true,
|
|
1955
|
-
audio: false,
|
|
1956
|
-
})
|
|
1957
|
-
try {
|
|
1958
|
-
const video = document.createElement('video')
|
|
1959
|
-
video.srcObject = stream
|
|
1960
|
-
video.muted = true
|
|
1961
|
-
await video.play()
|
|
1962
|
-
await new Promise<void>((resolve) => {
|
|
1963
|
-
if (video.videoWidth > 0 && video.videoHeight > 0) {
|
|
1964
|
-
resolve()
|
|
1965
|
-
} else {
|
|
1966
|
-
video.onloadedmetadata = () => resolve()
|
|
1967
|
-
}
|
|
1968
|
-
})
|
|
1969
|
-
|
|
1970
|
-
const canvas = document.createElement('canvas')
|
|
1971
|
-
canvas.width = video.videoWidth || window.screen.width
|
|
1972
|
-
canvas.height = video.videoHeight || window.screen.height
|
|
1973
|
-
const context = canvas.getContext('2d')
|
|
1974
|
-
if (!context) throw new Error('Unable to create screen capture canvas')
|
|
1975
|
-
context.drawImage(video, 0, 0, canvas.width, canvas.height)
|
|
1976
|
-
return canvas.toDataURL('image/png')
|
|
1977
|
-
} finally {
|
|
1978
|
-
stream.getTracks().forEach((track) => track.stop())
|
|
1979
|
-
}
|
|
1980
|
-
}
|
|
1981
|
-
|
|
1982
1715
|
export async function readClipboardImage(): Promise<string | null> {
|
|
1983
1716
|
if (typeof window === 'undefined' || !(window as any).__TAURI_INTERNALS__) {
|
|
1984
1717
|
return null
|
|
@@ -2404,8 +2137,28 @@ export const readWorkspaceFile = async (path: string, workspacePath?: string): P
|
|
|
2404
2137
|
return invoke('read_workspace_file', { path, workspacePath })
|
|
2405
2138
|
}
|
|
2406
2139
|
|
|
2140
|
+
export async function modsOperation(operation: import('../shared/mods').ModOperation): Promise<import('../shared/mods').ModResponse> {
|
|
2141
|
+
if (isTauriRuntime()) {
|
|
2142
|
+
const { invoke } = await import('@tauri-apps/api/core')
|
|
2143
|
+
return invoke('mods_operation', { operation })
|
|
2144
|
+
}
|
|
2145
|
+
const res = await authFetch(`${getLocalApiBase()}/mods`, { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify(operation) })
|
|
2146
|
+
const value = await res.json()
|
|
2147
|
+
if (!res.ok) throw new Error(value.error || 'Mod operation failed')
|
|
2148
|
+
return value
|
|
2149
|
+
}
|
|
2150
|
+
|
|
2151
|
+
export const { listLibrary, getLibraryItem, setLibraryTrashed, removeLibraryItem, readLibraryFile } = createLibraryTransport({ isNative: isTauriRuntime, apiBase: getLocalApiBase, fetch: authFetch })
|
|
2152
|
+
|
|
2153
|
+
export const { getConversationSources, saveSourceAttachments } = createSourcesTransport({ isNative: isTauriRuntime, apiBase: getLocalApiBase, fetch: authFetch })
|
|
2154
|
+
|
|
2407
2155
|
// Enforce compile-time check against the shared platform interface
|
|
2408
2156
|
const _apiCheck: MintPlatformApi = {
|
|
2157
|
+
listLibrary, getLibraryItem, setLibraryTrashed, removeLibraryItem, readLibraryFile,
|
|
2158
|
+
getConversationSources, saveSourceAttachments,
|
|
2159
|
+
modsOperation,
|
|
2160
|
+
readMcpArtifact,
|
|
2161
|
+
listBackgroundJobs, getBackgroundJob, stopBackgroundJob, deleteBackgroundJob,
|
|
2409
2162
|
runSlashCommand,
|
|
2410
2163
|
authRegister,
|
|
2411
2164
|
authLogin,
|
|
@@ -2452,6 +2205,10 @@ const _apiCheck: MintPlatformApi = {
|
|
|
2452
2205
|
createWorkspaceFile,
|
|
2453
2206
|
createWorkspaceFolder,
|
|
2454
2207
|
deleteWorkspaceItem,
|
|
2208
|
+
moveWorkspaceItem,
|
|
2209
|
+
listWorkspaceHistory,
|
|
2210
|
+
startHtmlPreview,
|
|
2211
|
+
undoWorkspaceAction,
|
|
2455
2212
|
selectWorkspaceDirectory,
|
|
2456
2213
|
selectLinkedFolderPath,
|
|
2457
2214
|
submitToolApproval,
|
|
@@ -2465,3 +2222,38 @@ const _apiCheck: MintPlatformApi = {
|
|
|
2465
2222
|
readWorkspaceFile,
|
|
2466
2223
|
testMcpConnection,
|
|
2467
2224
|
}
|
|
2225
|
+
|
|
2226
|
+
|
|
2227
|
+
async function backgroundRequest<T>(path: string, method = 'GET'): Promise<T> {
|
|
2228
|
+
const response = await authFetch(`${getLocalApiBase()}/background-jobs${path}`, { method })
|
|
2229
|
+
const value = await response.json()
|
|
2230
|
+
if (!response.ok) throw new Error(`${response.status}: ${value.message || 'Background terminal request failed'}`)
|
|
2231
|
+
return value as T
|
|
2232
|
+
}
|
|
2233
|
+
export async function listBackgroundJobs(workspace?: string): Promise<import('../shared/types').BackgroundJob[]> {
|
|
2234
|
+
if (isTauriRuntime()) { const { invoke } = await import('@tauri-apps/api/core'); return invoke<import('../shared/types').BackgroundJob[]>('list_background_jobs', { workspace: workspace || null, ownerToken: getStoredAuthToken() }) }
|
|
2235
|
+
const value = await backgroundRequest<{jobs: import('../shared/types').BackgroundJob[]}>(workspace ? `?workspace=${encodeURIComponent(workspace)}` : '')
|
|
2236
|
+
return value.jobs
|
|
2237
|
+
}
|
|
2238
|
+
export async function getBackgroundJob(id: string) { if (isTauriRuntime()) { const { invoke } = await import('@tauri-apps/api/core'); return invoke<import('../shared/types').BackgroundJobOutput>('get_background_job', { id, ownerToken: getStoredAuthToken() }) } return backgroundRequest<import('../shared/types').BackgroundJobOutput>(`/${encodeURIComponent(id)}`) }
|
|
2239
|
+
export async function stopBackgroundJob(id: string) { if (isTauriRuntime()) { const { invoke } = await import('@tauri-apps/api/core'); return invoke<import('../shared/types').BackgroundJob>('stop_background_job', { id, ownerToken: getStoredAuthToken() }) } return backgroundRequest<import('../shared/types').BackgroundJob>(`/${encodeURIComponent(id)}/stop`, 'POST') }
|
|
2240
|
+
export async function deleteBackgroundJob(id: string) { if (isTauriRuntime()) { const { invoke } = await import('@tauri-apps/api/core'); await invoke('remove_background_job', { id, ownerToken: getStoredAuthToken() }); return } await backgroundRequest<{deleted: boolean}>(`/${encodeURIComponent(id)}`, 'DELETE') }
|
|
2241
|
+
|
|
2242
|
+
export async function startHtmlPreview(root: string, relativePath: string, mintBrowser = false): Promise<{url: string; jobId: string}> {
|
|
2243
|
+
if (isTauriRuntime()) { const { invoke } = await import('@tauri-apps/api/core'); return invoke('start_html_preview', { root, relativePath, ownerToken: getStoredAuthToken() }) }
|
|
2244
|
+
const response = await authFetch(`${getLocalApiBase()}/html-preview`, { method: 'POST', headers: {'Content-Type':'application/json'}, body: JSON.stringify({root, relativePath, mintBrowser}) })
|
|
2245
|
+
const value = await response.json()
|
|
2246
|
+
if (!response.ok) throw new Error(value.message || 'Could not start HTML preview')
|
|
2247
|
+
return value
|
|
2248
|
+
}
|
|
2249
|
+
|
|
2250
|
+
/** Loads artifacts by ID; no server-provided filesystem path is accepted. */
|
|
2251
|
+
export async function readMcpArtifact(id: string): Promise<string> {
|
|
2252
|
+
if (isTauriRuntime()) {
|
|
2253
|
+
const { invoke } = await import('@tauri-apps/api/core')
|
|
2254
|
+
return invoke<string>('read_mcp_artifact', { id })
|
|
2255
|
+
}
|
|
2256
|
+
const response = await authFetch(`${getLocalApiBase()}/mcp-artifacts/${encodeURIComponent(id)}`)
|
|
2257
|
+
if (!response.ok) throw new Error('Artifact unavailable')
|
|
2258
|
+
return URL.createObjectURL(await response.blob())
|
|
2259
|
+
}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
// Web Speech API implementation instead — see @/voiceInput in ChatPanel.tsx.
|
|
5
5
|
import { useNativeVoiceInput } from '../shared/utils/useNativeVoiceInput'
|
|
6
6
|
import type { SpeechToTextOptions } from '../shared/utils/speech'
|
|
7
|
-
import { startMicRecording, stopMicRecordingAndTranscribe } from './tauri'
|
|
7
|
+
import { startMicRecording, stopMicRecordingAndTranscribe, cancelMicRecording } from './tauri'
|
|
8
8
|
|
|
9
9
|
export type VoiceInputOptions = SpeechToTextOptions
|
|
10
10
|
|
|
@@ -13,5 +13,6 @@ export function useVoiceInput(options: VoiceInputOptions) {
|
|
|
13
13
|
onSendVoiceMessage: options.onSendVoiceMessage,
|
|
14
14
|
startRecording: startMicRecording,
|
|
15
15
|
stopRecordingAndTranscribe: stopMicRecordingAndTranscribe,
|
|
16
|
+
cancelRecording: cancelMicRecording,
|
|
16
17
|
})
|
|
17
18
|
}
|