@pheem49/mint 1.14.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 +1258 -35
- package/Cargo.toml +5 -2
- package/LICENSE +21 -654
- package/README.md +93 -756
- package/Release_Note.md +53 -446
- 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 +9 -1
- package/crates/mint-cli/src/agent/approval_prompts.rs +16 -3
- package/crates/mint-cli/src/agent/live_status.rs +545 -148
- package/crates/mint-cli/src/agent/markdown_render.rs +601 -61
- package/crates/mint-cli/src/agent.rs +723 -258
- package/crates/mint-cli/src/commands/agent.rs +83 -74
- package/crates/mint-cli/src/commands/eval.rs +9 -5
- package/crates/mint-cli/src/commands/git.rs +204 -0
- package/crates/mint-cli/src/commands/integrations.rs +35 -0
- package/crates/mint-cli/src/commands/knowledge.rs +13 -32
- package/crates/mint-cli/src/commands/mod.rs +81 -2
- package/crates/mint-cli/src/commands/tailnet_web.rs +235 -0
- package/crates/mint-cli/src/image.rs +32 -11
- package/crates/mint-cli/src/interactive/chat_tui.rs +7853 -0
- package/crates/mint-cli/src/interactive/command_ui.rs +477 -0
- package/crates/mint-cli/src/interactive/format.rs +8 -0
- package/crates/mint-cli/src/interactive/input_box.rs +94 -8
- package/crates/mint-cli/src/interactive/picker.rs +180 -37
- package/crates/mint-cli/src/interactive/resume_picker.rs +686 -0
- package/crates/mint-cli/src/interactive/slash_commands.rs +1071 -501
- package/crates/mint-cli/src/interactive/thought_viewer.rs +286 -0
- package/crates/mint-cli/src/interactive/tool_activity.rs +328 -0
- package/crates/mint-cli/src/interactive.rs +454 -166
- package/crates/mint-cli/src/main.rs +93 -26
- package/crates/mint-cli/src/markdown.rs +12 -5
- 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 +37 -61
- package/crates/mint-cli/src/plugins_cli.rs +8 -5
- package/crates/mint-cli/src/setup.rs +10 -8
- package/crates/mint-cli/src/terminal_theme.rs +189 -0
- package/crates/mint-cli/src/updater.rs +112 -23
- 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/agent_loop.rs +1 -0
- package/crates/mint-core/src/agent/chat.rs +1003 -209
- package/crates/mint-core/src/agent/code_tools.rs +98 -2
- package/crates/mint-core/src/agent/memory/sources.rs +240 -0
- package/crates/mint-core/src/agent/memory.rs +805 -33
- 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 +233 -190
- 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/linked_folders.rs +118 -3
- package/crates/mint-core/src/api_server/routes/media_gen.rs +10 -57
- package/crates/mint-core/src/api_server/routes/misc.rs +114 -121
- 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 +85 -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 +140 -12
- package/crates/mint-core/src/avatar_bridge.rs +13 -2
- package/crates/mint-core/src/browser/cdp.rs +74 -83
- package/crates/mint-core/src/browser/evidence.rs +260 -0
- package/crates/mint-core/src/browser/input.rs +1 -1
- package/crates/mint-core/src/browser/interact.rs +98 -124
- package/crates/mint-core/src/browser/lifecycle.rs +75 -4
- package/crates/mint-core/src/browser/mod.rs +16 -2
- package/crates/mint-core/src/browser/navigate.rs +27 -19
- package/crates/mint-core/src/browser/observe.js +40 -0
- package/crates/mint-core/src/browser/session.rs +1610 -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/git/branches.rs +348 -0
- package/crates/mint-core/src/git/checkpoint.rs +40 -0
- package/crates/mint-core/src/git/diff.rs +206 -0
- package/crates/mint-core/src/git/mod.rs +10 -2
- package/crates/mint-core/src/integrations/channels.rs +88 -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 +107 -40
- package/crates/mint-core/src/live_sync.rs +28 -9
- package/crates/mint-core/src/media/auto_shorts.rs +1 -0
- package/crates/mint-core/src/media/gemini_live.rs +145 -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/mic_transcribe.rs +1 -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/subtitle.rs +1 -0
- 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 +105 -0
- package/crates/mint-core/src/orchestration/mcp_review.rs +153 -0
- package/crates/mint-core/src/orchestration/memory_skill.rs +110 -33
- package/crates/mint-core/src/orchestration/mod.rs +3129 -481
- 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/browser.rs +16 -139
- 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 +5 -3
- 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/tools/web.rs +1 -1
- package/crates/mint-core/src/orchestration/workspace_helpers.rs +4 -1
- package/crates/mint-core/src/prompts/agent.rs +75 -31
- package/crates/mint-core/src/prompts/chat.rs +1 -1
- package/crates/mint-core/src/prompts/persona.rs +1 -1
- package/crates/mint-core/src/prompts/tool_catalog.rs +121 -27
- package/crates/mint-core/src/search/knowledge.rs +7 -1
- package/crates/mint-core/src/search/linked_folders/index.rs +896 -0
- package/crates/mint-core/src/search/linked_folders.rs +473 -131
- package/crates/mint-core/src/slash/catalog.rs +1 -1
- package/crates/mint-core/src/slash/mod.rs +644 -33
- package/crates/mint-core/src/slash/model_fetcher.rs +12 -3
- package/crates/mint-core/src/slash/models.rs +66 -10
- 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 +235 -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 +292 -0
- package/crates/mint-core/src/system/workspace_history.rs +604 -0
- package/crates/mint-core/src/system.rs +5 -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/memory_persistence.rs +39 -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/ImageStudioPanel-D0lnhQV5.css +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-DOj7_WR3.css +1 -0
- package/out/web/assets/VeoStudioPanel-DiJs_Cg2.js +4 -0
- package/out/web/assets/WorkspacePanel-CbJ1PFoZ.js +1 -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-DAOBA7ZG.js → abnfDiagram-VCTEODGH-CD0CjoGl.js} +1 -1
- package/out/web/assets/{architecture-7GRP2DOG-CgSwQOPQ.js → architecture-7GRP2DOG-RKV83OeZ.js} +1 -1
- package/out/web/assets/{architectureDiagram-5GKGNRK7-CYp3yupP.js → architectureDiagram-5GKGNRK7-nN_HAFct.js} +1 -1
- package/out/web/assets/{blockDiagram-NRAW4CY4-CyWybDWr.js → blockDiagram-NRAW4CY4-BrrqzHW5.js} +1 -1
- package/out/web/assets/{c4Diagram-UCG6FXSJ-BvY3U709.js → c4Diagram-UCG6FXSJ-DTdV8_zE.js} +1 -1
- package/out/web/assets/{chunk-75Z2AOVW-TLXCoZYv.js → chunk-75Z2AOVW-_M0z5olV.js} +1 -1
- package/out/web/assets/chunk-CKBBP62Z-BpQEgeHF.js +2 -0
- package/out/web/assets/{chunk-CLGD4ZFX-xjsKtNS7.js → chunk-CLGD4ZFX-D54yGvGS.js} +1 -1
- package/out/web/assets/chunk-DSNCTWBM-C-gvT2ru.js +2 -0
- package/out/web/assets/chunk-DU6HZSFF-CnFngIhW.js +128 -0
- package/out/web/assets/{chunk-F27PBJKO-BFpgF55A.js → chunk-F27PBJKO-BqtWrnEO.js} +1 -1
- package/out/web/assets/{chunk-G27WJ6UU-DfF7qW-C.js → chunk-G27WJ6UU-Ckoq5mi2.js} +1 -1
- package/out/web/assets/{chunk-GMAD6QVW-C-558kh_.js → chunk-GMAD6QVW-BuhEcgHq.js} +1 -1
- package/out/web/assets/{chunk-JQ64N6SF-wJmeGKAw.js → chunk-JQ64N6SF-CF8T7GiZ.js} +1 -1
- package/out/web/assets/{chunk-LCL6LL3I-C1wHD8Ie.js → chunk-LCL6LL3I-BhXV9zyH.js} +1 -1
- package/out/web/assets/{chunk-OBVCFTLP-BsRTPBqs.js → chunk-OBVCFTLP-CRIkunUB.js} +1 -1
- package/out/web/assets/{chunk-P2QGCYS3-HZIiM7Ni.js → chunk-P2QGCYS3-UFEU6BxZ.js} +1 -1
- package/out/web/assets/{chunk-POPQ4Y6H-Dk9wvVb0.js → chunk-POPQ4Y6H-CQcrNbjr.js} +1 -1
- package/out/web/assets/{chunk-PWAF6VOD-BmjYLNbq.js → chunk-PWAF6VOD-Cc2uVDsG.js} +1 -1
- package/out/web/assets/{chunk-R7TYR2AO-CaHIf-lK.js → chunk-R7TYR2AO-DiCxzdAY.js} +1 -1
- package/out/web/assets/{chunk-RHFEMEQ7-_T561hOU.js → chunk-RHFEMEQ7-b7hnPmrR.js} +1 -1
- package/out/web/assets/{chunk-SVP7TREG-CM-GGYoY.js → chunk-SVP7TREG-Bu_yYb-V.js} +1 -1
- package/out/web/assets/{chunk-TEH6E4GO-K2A8Vg2C.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-ClzaB6cc.js → cynefin-OW5HDTMX-CnzQfOGp.js} +1 -1
- package/out/web/assets/{cynefinDiagram-5FMLGOSQ-D_JzZBzf.js → cynefinDiagram-5FMLGOSQ-DVtQnfpm.js} +1 -1
- package/out/web/assets/{dagre-3AP2YEHR-BDuUeMHj.js → dagre-3AP2YEHR-DG76_k5_.js} +1 -1
- package/out/web/assets/{diagram-S7CK7UJ4-DgtcfE8P.js → diagram-S7CK7UJ4-CaouUoze.js} +1 -1
- package/out/web/assets/{diagram-UQ7AKVKN-DTLoEYti.js → diagram-UQ7AKVKN-B4bEc26B.js} +1 -1
- package/out/web/assets/{diagram-VSXAHHWV-ChGl9pXz.js → diagram-VSXAHHWV-BJ86Ov2Y.js} +1 -1
- package/out/web/assets/{diagram-VX7I27RA-Be8DWz0S.js → diagram-VX7I27RA-7hH5IPYf.js} +1 -1
- package/out/web/assets/{diagram-Z3DM3KII-BMXjRTOF.js → diagram-Z3DM3KII-CCM4clo8.js} +1 -1
- package/out/web/assets/dist-js-BkYNznHX.js +1 -0
- package/out/web/assets/{ebnfDiagram-PWID7BFC-8Q9pl1CJ.js → ebnfDiagram-PWID7BFC-Da7WAM3k.js} +1 -1
- package/out/web/assets/{erDiagram-SSCWMZ5O-DjH8Lnkn.js → erDiagram-SSCWMZ5O-CzzmnZWT.js} +1 -1
- package/out/web/assets/event-Cdt7Byyj.js +1 -0
- package/out/web/assets/{eventmodeling-NTZA5JFV-BKUH_DOp.js → eventmodeling-NTZA5JFV-xcfsA0XD.js} +1 -1
- package/out/web/assets/fira-code-latin-600-normal-BmSSHshu.woff +0 -0
- package/out/web/assets/fira-code-latin-600-normal-CvYZpPHg.woff2 +0 -0
- package/out/web/assets/fira-code-symbols2-600-normal-Dvq6IQE5.woff +0 -0
- package/out/web/assets/flowDiagram-A5DVABFB-JdtH1673.js +1 -0
- package/out/web/assets/{ganttDiagram-EL5Y4UJY-D7fZKJNM.js → ganttDiagram-EL5Y4UJY-B3ClFGmL.js} +1 -1
- package/out/web/assets/{gitGraph-4MIJSDKK-BypWaaBU.js → gitGraph-4MIJSDKK-BZ_y_cDU.js} +1 -1
- package/out/web/assets/{gitGraphDiagram-WWUBYQGX-DWiw_3bq.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-KkAUxT4j.js → info-A6RAGUB7-B7I3K0F1.js} +1 -1
- package/out/web/assets/{infoDiagram-RXCK75RN-BNb6E48y.js → infoDiagram-RXCK75RN-deX_1MPh.js} +1 -1
- package/out/web/assets/{ishikawaDiagram-5VMMS53U-Caa-JoAK.js → ishikawaDiagram-5VMMS53U-s38yo28y.js} +1 -1
- package/out/web/assets/{journeyDiagram-EYS64GPL-DOrmFGz6.js → journeyDiagram-EYS64GPL-CZn2kB8b.js} +1 -1
- package/out/web/assets/jsx-runtime-DN4NhQUK.js +1 -0
- package/out/web/assets/{kanban-definition-3QL26DDD-BOWCYcK0.js → kanban-definition-3QL26DDD-DodjgySL.js} +1 -1
- package/out/web/assets/markdown-CMhYIcWB.js +39 -0
- package/out/web/assets/{mermaid-parser.core-BQqjCkS_.js → mermaid-parser.core-Whu2rlJC.js} +3 -3
- package/out/web/assets/mermaid.core-CKyPo8VH.js +11 -0
- package/out/web/assets/{mindmap-definition-FBJOCRG2-jTceWpr0.js → mindmap-definition-FBJOCRG2-260WBDxZ.js} +1 -1
- package/out/web/assets/modelManager-CUaGWMWu.js +2 -0
- package/out/web/assets/oauthManager-DlNhXJr6.js +1 -0
- package/out/web/assets/{packet-AYTQ26CC-CJ5RXgol.js → packet-AYTQ26CC-CEeIRKRG.js} +1 -1
- package/out/web/assets/{pegDiagram-XKGWAZYB-y8wMtd0y.js → pegDiagram-XKGWAZYB-BYadI-KO.js} +1 -1
- package/out/web/assets/{pie-WAS4IAKB-72fTBbl4.js → pie-WAS4IAKB-D8uf4dh5.js} +1 -1
- package/out/web/assets/{pieDiagram-E7YTZNPT-e0O02qWq.js → pieDiagram-E7YTZNPT-CjSDy4hO.js} +1 -1
- package/out/web/assets/{quadrantDiagram-AXDQQJYC-C9phYLom.js → quadrantDiagram-AXDQQJYC-B8D3gU5d.js} +1 -1
- package/out/web/assets/{radar-RG4KPBEZ-BAU2hzUT.js → radar-RG4KPBEZ-DZJxnokY.js} +1 -1
- package/out/web/assets/{railroad-74A4TZTK-B0bCAVHC.js → railroad-74A4TZTK-DBysUiUi.js} +1 -1
- package/out/web/assets/{railroad-abnf-HS5TGJTU-WhxO7ndE.js → railroad-abnf-HS5TGJTU-CHWxoJYg.js} +1 -1
- package/out/web/assets/{railroad-ebnf-LZEXJU2U-BkA0m7-F.js → railroad-ebnf-LZEXJU2U-DDv7X6bY.js} +1 -1
- package/out/web/assets/{railroad-peg-WCYAUIDC-BsVpHIaj.js → railroad-peg-WCYAUIDC-DpfcYYNJ.js} +1 -1
- package/out/web/assets/{railroadDiagram-O6MQD6OU-CyOLN65Q.js → railroadDiagram-O6MQD6OU-CYtyv0t3.js} +1 -1
- package/out/web/assets/{requirementDiagram-EFPCY7ZU-DQXJ7Dud.js → requirementDiagram-EFPCY7ZU-D2X-Ewik.js} +1 -1
- package/out/web/assets/{sankeyDiagram-P5KCCOFB-B2XLyIIc.js → sankeyDiagram-P5KCCOFB-Bn2x6C4Y.js} +1 -1
- package/out/web/assets/{sequenceDiagram-WJ2MYXX4-DGQY4wwm.js → sequenceDiagram-WJ2MYXX4-BvFLKtPd.js} +1 -1
- package/out/web/assets/{stateDiagram-HBIQ2CUA-DHZpDwNy.js → stateDiagram-HBIQ2CUA-Bx0GWeaY.js} +1 -1
- package/out/web/assets/stateDiagram-v2-4QOOHH4V--hol1yg_.js +1 -0
- package/out/web/assets/studio-B1mk40wD.js +1 -0
- package/out/web/assets/{swimlanes-XN3QIQJK-Bn_jcZz-.js → swimlanes-XN3QIQJK-CCma0T7L.js} +1 -1
- package/out/web/assets/swimlanesDiagram-VK2B7HYN-BkohoVsU.js +8 -0
- package/out/web/assets/{timeline-definition-24CTP7MA-CdTERuJZ.js → timeline-definition-24CTP7MA-iCRhhJ7C.js} +1 -1
- package/out/web/assets/{treeView-Q6P3EWNA-TKBKQG6R.js → treeView-Q6P3EWNA-DZ-y08qp.js} +1 -1
- package/out/web/assets/{treemap-WGGIJYW6-BP7gQoiC.js → treemap-WGGIJYW6-De0CxzMx.js} +1 -1
- package/out/web/assets/{vennDiagram-4TSXK5OY-BHUmxDuK.js → vennDiagram-4TSXK5OY-w_7aZ6xe.js} +1 -1
- package/out/web/assets/{wardley-WFR3VGLG-9bct5AAN.js → wardley-WFR3VGLG-DT0y0xJ4.js} +1 -1
- package/out/web/assets/{wardleyDiagram-VM6X3IG4-BfJwDDso.js → wardleyDiagram-VM6X3IG4-DAdXELbQ.js} +1 -1
- package/out/web/assets/window-BJCVtyET.js +1 -0
- package/out/web/assets/{xychartDiagram-S5SC5T6Z-Dqd9Mvpo.js → xychartDiagram-S5SC5T6Z-IZIXf3Vo.js} +1 -1
- package/out/web/index-web.html +4 -4
- package/out/web/index.html +4 -4
- package/package.json +80 -20
- package/shared-modules/.github/workflows/ci.yml +120 -0
- package/shared-modules/.github/workflows/update.yaml +28 -0
- package/slash-commands.json +16 -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-web.html +1 -0
- package/src/renderer/index.html +1 -2
- package/src/renderer/node_modules/.vite/vitest/da39a3ee5e6b4b0d3255bfef95601890afd80709/results.json +1 -0
- package/src/renderer/shared/agentProgress.ts +201 -3
- package/src/renderer/shared/components/AgentActivityDrawer.tsx +9 -8
- package/src/renderer/shared/components/AgentActivityTable.tsx +193 -133
- 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 +91 -40
- package/src/renderer/shared/components/AuthGate.tsx +79 -48
- package/src/renderer/shared/components/BackgroundTerminals.tsx +181 -0
- package/src/renderer/shared/components/CalculationCard.tsx +41 -15
- 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 +52 -33
- package/src/renderer/shared/components/ChatPanel.test.tsx +21 -0
- package/src/renderer/shared/components/ChatPanel.tsx +676 -415
- package/src/renderer/shared/components/ChunkErrorBoundary.tsx +115 -64
- package/src/renderer/shared/components/CliSessionsView.test.tsx +125 -0
- package/src/renderer/shared/components/CliSessionsView.tsx +543 -0
- package/src/renderer/shared/components/CodeReviewPage.tsx +668 -0
- package/src/renderer/shared/components/CollapsiblePasteInput.tsx +90 -0
- package/src/renderer/shared/components/CommandPalette.tsx +8 -8
- package/src/renderer/shared/components/ContextCompactionStatus.tsx +17 -0
- package/src/renderer/shared/components/DashboardSidebar.tsx +853 -229
- package/src/renderer/shared/components/DesktopTitlebar.tsx +371 -0
- package/src/renderer/shared/components/DiffReviewModal.tsx +3 -3
- 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/GitBranchSelector.tsx +442 -0
- 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/ImageGenCard.tsx +31 -12
- package/src/renderer/shared/components/ImageSearchCard.tsx +76 -65
- package/src/renderer/shared/components/ImageStudioPanel.tsx +49 -49
- package/src/renderer/shared/components/InlineThoughtNote.tsx +27 -0
- 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/LinkedFoldersView.tsx +365 -46
- package/src/renderer/shared/components/McpRegistryPicker.tsx +1 -1
- package/src/renderer/shared/components/McpServersView.tsx +51 -30
- package/src/renderer/shared/components/McpToolAllowlist.tsx +2 -4
- package/src/renderer/shared/components/McpToolResults.tsx +99 -0
- package/src/renderer/shared/components/MermaidCard.tsx +14 -8
- package/src/renderer/shared/components/MintDashboard.tsx +1002 -831
- 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 +547 -219
- package/src/renderer/shared/components/ModsPanel.tsx +156 -0
- package/src/renderer/shared/components/PlanChecklistWidget.tsx +1 -1
- package/src/renderer/shared/components/PluginsView.tsx +1 -1
- 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 +11 -18
- package/src/renderer/shared/components/RunSummaryDashboard.tsx +8 -14
- package/src/renderer/shared/components/ScheduledTasksView.tsx +11 -10
- package/src/renderer/shared/components/ScreenCaptureDialog.css +221 -0
- package/src/renderer/shared/components/ScreenCaptureDialog.tsx +199 -0
- 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 +41 -45
- package/src/renderer/shared/components/Settings/AudioTab.tsx +16 -15
- package/src/renderer/shared/components/Settings/AutomationTab.tsx +10 -60
- package/src/renderer/shared/components/Settings/AvatarCropModal.tsx +368 -0
- package/src/renderer/shared/components/Settings/GeneralTab.tsx +368 -113
- 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/PluginsTab.tsx +20 -12
- package/src/renderer/shared/components/Settings/ProfileTab.tsx +29 -5
- package/src/renderer/shared/components/Settings/SearchableModelCombobox.tsx +411 -0
- package/src/renderer/shared/components/Settings/ThemeTab.tsx +416 -165
- package/src/renderer/shared/components/SkillsView.tsx +41 -16
- 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 +41 -12
- package/src/renderer/shared/components/SourcesBlock.tsx +55 -51
- package/src/renderer/shared/components/StockCard.tsx +58 -24
- package/src/renderer/shared/components/SubagentDagView.tsx +4 -4
- package/src/renderer/shared/components/TerminalDock.tsx +241 -0
- package/src/renderer/shared/components/ThinkingBlock.tsx +14 -8
- package/src/renderer/shared/components/ToolSurfacePage.test.tsx +32 -0
- package/src/renderer/shared/components/ToolSurfacePage.tsx +568 -0
- package/src/renderer/shared/components/ToolsPanelToggle.tsx +13 -0
- package/src/renderer/shared/components/UiFeatureCard.tsx +267 -0
- package/src/renderer/shared/components/UiGridCard.tsx +188 -0
- package/src/renderer/shared/components/UiMockupWidget.tsx +149 -0
- package/src/renderer/shared/components/VeoStudioPanel.tsx +22 -37
- 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/WeatherCard.tsx +3 -3
- package/src/renderer/shared/components/WorkspaceContextPopover.tsx +138 -0
- 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 +154 -0
- 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 +57 -3
- package/src/renderer/shared/constants/models.ts +189 -2
- package/src/renderer/shared/constants/slashCommands.ts +1 -1
- package/src/renderer/shared/conversation/coordinator.test.ts +27 -0
- package/src/renderer/shared/conversation/coordinator.ts +82 -0
- 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 +13 -0
- package/src/renderer/shared/conversation/syncView.ts +6 -0
- 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 +64 -0
- package/src/renderer/shared/css/agent-observability.css +46 -15
- package/src/renderer/shared/css/auth-gate.css +114 -15
- package/src/renderer/shared/css/chat-ui-cards.css +495 -0
- package/src/renderer/shared/css/code-review.css +856 -0
- package/src/renderer/shared/css/code-sessions.css +479 -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/file-changes.css +132 -0
- package/src/renderer/shared/css/image-studio.css +16 -16
- package/src/renderer/shared/css/library.css +476 -0
- package/src/renderer/shared/css/management-views.css +415 -27
- package/src/renderer/shared/css/mcp-results.css +11 -0
- package/src/renderer/shared/css/model-selector.css +543 -85
- 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/agents.css +1 -1
- package/src/renderer/shared/css/settings/automation.css +13 -13
- package/src/renderer/shared/css/settings/general.css +526 -5
- 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/plugins.css +5 -5
- package/src/renderer/shared/css/settings/profile.css +331 -1
- package/src/renderer/shared/css/settings/theme.css +656 -3
- 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/veo-studio.css +16 -15
- package/src/renderer/shared/css/viewed-images.css +15 -0
- package/src/renderer/shared/fonts.css +46 -0
- package/src/renderer/shared/fonts.ts +10 -37
- 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 +90 -0
- package/src/renderer/shared/platform.ts +219 -7
- package/src/renderer/shared/theme/themeManager.test.ts +43 -0
- package/src/renderer/shared/theme/themeManager.ts +157 -0
- package/src/renderer/shared/theme/themes.ts +116 -0
- package/src/renderer/shared/theme/tokens.css +318 -0
- package/src/renderer/shared/types.ts +137 -2
- package/src/renderer/shared/utils/agentActivity.test.ts +75 -0
- package/src/renderer/shared/utils/agentActivity.ts +168 -8
- 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/cardJson.test.ts +35 -0
- package/src/renderer/shared/utils/cardJson.ts +30 -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/fileIcons.ts +1 -1
- package/src/renderer/shared/utils/markdown.tsx +330 -81
- package/src/renderer/shared/utils/markdown.webImages.test.tsx +40 -0
- 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/providers.ts +8 -3
- package/src/renderer/shared/utils/screenCapture.ts +43 -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 +5 -2
- 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/ui.ts +4 -64
- 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 +16 -1
- package/src/renderer/src/components/BrowserShell.tsx +108 -0
- package/src/renderer/src/components/BrowserSuggestionsPopup.tsx +91 -0
- package/src/renderer/src/components/LiveTranslateControls.tsx +65 -0
- package/src/renderer/src/components/MintDashboard.tsx +4 -2
- package/src/renderer/src/components/PicturesLibrary.tsx +2 -287
- package/src/renderer/src/components/ScreenPicker.css +227 -0
- package/src/renderer/src/components/ScreenPicker.tsx +312 -526
- package/src/renderer/src/components/SettingsWindow.tsx +48 -5
- package/src/renderer/src/components/SpotlightWindow.tsx +1 -0
- package/src/renderer/src/components/WidgetWindow.tsx +27 -3
- package/src/renderer/src/components/WorkspacePanel.tsx +269 -61
- package/src/renderer/src/components/browser-shell.css +185 -0
- package/src/renderer/src/components/browser-suggestions-popup.css +55 -0
- package/src/renderer/src/components/liveTranslateFrames.test.ts +44 -0
- package/src/renderer/src/components/liveTranslateFrames.ts +45 -0
- package/src/renderer/src/components/liveTranslateLanguage.ts +6 -0
- package/src/renderer/src/css/app-shell.css +400 -204
- package/src/renderer/src/css/chat.css +1666 -594
- package/src/renderer/src/css/dashboard.css +11 -0
- package/src/renderer/src/css/desktop-tools.css +928 -0
- package/src/renderer/src/css/misc.css +5 -60
- package/src/renderer/src/css/pictures.css +2 -407
- package/src/renderer/src/css/settings/base.css +394 -157
- package/src/renderer/src/css/sidebar-workspace.css +1072 -376
- package/src/renderer/src/css/spotlight.css +15 -26
- package/src/renderer/src/css/tool-surfaces.css +784 -0
- package/src/renderer/src/css/widget.css +36 -8
- package/src/renderer/src/env.d.ts +4 -9
- package/src/renderer/src/hooks/useProviderModels.ts +2 -9
- package/src/renderer/src/index.css +53 -46
- package/src/renderer/src/main.tsx +12 -0
- package/src/renderer/src/proactiveSuggestions.ts +29 -0
- package/src/renderer/src/tauri.ts +302 -339
- package/src/renderer/src/voiceInput.ts +2 -1
- package/src/renderer/src-web/App.tsx +40 -0
- package/src/renderer/src-web/components/MintDashboard.tsx +4 -2
- package/src/renderer/src-web/components/PicturesLibrary.tsx +2 -284
- package/src/renderer/src-web/components/PullToRefresh.tsx +107 -0
- package/src/renderer/src-web/components/SettingsWindow.tsx +36 -5
- package/src/renderer/src-web/css/app-shell.css +188 -207
- package/src/renderer/src-web/css/chat.css +1236 -507
- package/src/renderer/src-web/css/dashboard.css +11 -0
- package/src/renderer/src-web/css/misc.css +3 -55
- package/src/renderer/src-web/css/mobile.css +679 -0
- package/src/renderer/src-web/css/pictures.css +2 -415
- package/src/renderer/src-web/css/pull-to-refresh.css +54 -0
- package/src/renderer/src-web/css/settings/base.css +353 -134
- package/src/renderer/src-web/css/settings/mobile.css +320 -0
- package/src/renderer/src-web/css/sidebar-workspace.css +546 -187
- package/src/renderer/src-web/css/spotlight.css +9 -26
- package/src/renderer/src-web/css/widget.css +1 -6
- package/src/renderer/src-web/env.d.ts +4 -12
- package/src/renderer/src-web/hooks/useProviderModels.ts +2 -9
- package/src/renderer/src-web/index.css +53 -96
- package/src/renderer/src-web/main.tsx +12 -0
- package/src/renderer/src-web/proactiveSuggestions.ts +3 -0
- package/src/renderer/src-web/tauri.ts +309 -364
- 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 +5 -0
- package/.cargo/config.toml +0 -13
- package/.claude/settings.local.json +0 -182
- package/.codex +0 -0
- package/CLAUDE.md +0 -102
- package/out/web/Live2DCubismCore.js +0 -9
- package/out/web/assets/MintDashboard-DWSqucgb.js +0 -57
- package/out/web/assets/SettingsWindow-DFM2aj5B.js +0 -2
- package/out/web/assets/chunk-CKBBP62Z-nr1uKPj9.js +0 -2
- package/out/web/assets/chunk-DSNCTWBM-Dtj8Rqsd.js +0 -2
- package/out/web/assets/chunk-DU6HZSFF-2tv5K1wT.js +0 -128
- package/out/web/assets/classDiagram-DTDB5LWJ-BdSFArgw.js +0 -1
- package/out/web/assets/classDiagram-v2-JRS7N3AN-BdSFArgw.js +0 -1
- package/out/web/assets/core-DImejIUG.js +0 -1
- package/out/web/assets/dist-js-BxuKEVWM.js +0 -1
- package/out/web/assets/event-BNl8Zahw.js +0 -1
- package/out/web/assets/fira-code-cyrillic-400-normal-UC0NFL4U.woff2 +0 -0
- package/out/web/assets/fira-code-cyrillic-400-normal-dc1q3VD7.woff +0 -0
- package/out/web/assets/fira-code-cyrillic-500-normal-Bu7VCL72.woff +0 -0
- package/out/web/assets/fira-code-cyrillic-500-normal-CX35h3Mg.woff2 +0 -0
- package/out/web/assets/fira-code-cyrillic-ext-400-normal-Buh61xzB.woff +0 -0
- package/out/web/assets/fira-code-cyrillic-ext-400-normal-txZ9Fk_1.woff2 +0 -0
- package/out/web/assets/fira-code-cyrillic-ext-500-normal-CYRspHgm.woff2 +0 -0
- package/out/web/assets/fira-code-cyrillic-ext-500-normal-CwtLmSFD.woff +0 -0
- package/out/web/assets/fira-code-greek-400-normal-B2Gh_Y8s.woff2 +0 -0
- package/out/web/assets/fira-code-greek-400-normal-DobhaxvF.woff +0 -0
- package/out/web/assets/fira-code-greek-500-normal-CVO0IRNt.woff2 +0 -0
- package/out/web/assets/fira-code-greek-500-normal-DEXIWiey.woff +0 -0
- package/out/web/assets/fira-code-greek-ext-400-normal-DR7mBgIM.woff2 +0 -0
- package/out/web/assets/fira-code-greek-ext-400-normal-DSPUheWg.woff +0 -0
- package/out/web/assets/fira-code-greek-ext-500-normal-BO3iq16n.woff2 +0 -0
- package/out/web/assets/fira-code-greek-ext-500-normal-CMiNLXER.woff +0 -0
- package/out/web/assets/fira-code-latin-ext-400-normal-DG73JjOf.woff +0 -0
- package/out/web/assets/fira-code-latin-ext-400-normal-KSMg0QLl.woff2 +0 -0
- package/out/web/assets/fira-code-latin-ext-500-normal-CaANqXjI.woff +0 -0
- package/out/web/assets/fira-code-latin-ext-500-normal-Crd9e_oI.woff2 +0 -0
- package/out/web/assets/flowDiagram-A5DVABFB-BpnHUSU7.js +0 -1
- package/out/web/assets/index-CVRg270z.css +0 -1
- package/out/web/assets/index-DxZQr9yD.js +0 -10
- package/out/web/assets/inter-cyrillic-400-normal-HOLc17fK.woff +0 -0
- package/out/web/assets/inter-cyrillic-400-normal-obahsSVq.woff2 +0 -0
- package/out/web/assets/inter-cyrillic-500-normal-BasfLYem.woff2 +0 -0
- package/out/web/assets/inter-cyrillic-500-normal-CxZf_p3X.woff +0 -0
- package/out/web/assets/inter-cyrillic-600-normal-4D_pXhcN.woff +0 -0
- package/out/web/assets/inter-cyrillic-600-normal-CWCymEST.woff2 +0 -0
- package/out/web/assets/inter-cyrillic-ext-400-normal-BQZuk6qB.woff2 +0 -0
- package/out/web/assets/inter-cyrillic-ext-400-normal-DQukG94-.woff +0 -0
- package/out/web/assets/inter-cyrillic-ext-500-normal-B0yAr1jD.woff2 +0 -0
- package/out/web/assets/inter-cyrillic-ext-500-normal-BmqWE9Dz.woff +0 -0
- package/out/web/assets/inter-cyrillic-ext-600-normal-Bcila6Z-.woff +0 -0
- package/out/web/assets/inter-cyrillic-ext-600-normal-Dfes3d0z.woff2 +0 -0
- package/out/web/assets/inter-greek-400-normal-B4URO6DV.woff2 +0 -0
- package/out/web/assets/inter-greek-400-normal-q2sYcFCs.woff +0 -0
- package/out/web/assets/inter-greek-500-normal-BIZE56-Y.woff2 +0 -0
- package/out/web/assets/inter-greek-500-normal-Xzm54t5V.woff +0 -0
- package/out/web/assets/inter-greek-600-normal-BZpKdvQh.woff +0 -0
- package/out/web/assets/inter-greek-600-normal-plRanbMR.woff2 +0 -0
- package/out/web/assets/inter-greek-ext-400-normal-DGGRlc-M.woff2 +0 -0
- package/out/web/assets/inter-greek-ext-400-normal-KugGGMne.woff +0 -0
- package/out/web/assets/inter-greek-ext-500-normal-2j5mBUwD.woff +0 -0
- package/out/web/assets/inter-greek-ext-500-normal-C4iEst2y.woff2 +0 -0
- package/out/web/assets/inter-greek-ext-600-normal-B8X0CLgF.woff +0 -0
- package/out/web/assets/inter-greek-ext-600-normal-DRtmH8MT.woff2 +0 -0
- package/out/web/assets/inter-latin-400-normal-C38fXH4l.woff2 +0 -0
- package/out/web/assets/inter-latin-400-normal-CyCys3Eg.woff +0 -0
- package/out/web/assets/inter-latin-500-normal-BL9OpVg8.woff +0 -0
- package/out/web/assets/inter-latin-500-normal-Cerq10X2.woff2 +0 -0
- package/out/web/assets/inter-latin-600-normal-CiBQ2DWP.woff +0 -0
- package/out/web/assets/inter-latin-600-normal-LgqL8muc.woff2 +0 -0
- package/out/web/assets/inter-latin-ext-400-normal-77YHD8bZ.woff +0 -0
- package/out/web/assets/inter-latin-ext-400-normal-C1nco2VV.woff2 +0 -0
- package/out/web/assets/inter-latin-ext-500-normal-BxGbmqWO.woff +0 -0
- package/out/web/assets/inter-latin-ext-500-normal-CV4jyFjo.woff2 +0 -0
- package/out/web/assets/inter-latin-ext-600-normal-CIVaiw4L.woff +0 -0
- package/out/web/assets/inter-latin-ext-600-normal-D2bJ5OIk.woff2 +0 -0
- package/out/web/assets/inter-vietnamese-400-normal-Bbgyi5SW.woff +0 -0
- package/out/web/assets/inter-vietnamese-400-normal-DMkecbls.woff2 +0 -0
- package/out/web/assets/inter-vietnamese-500-normal-DOriooB6.woff2 +0 -0
- package/out/web/assets/inter-vietnamese-500-normal-mJboJaSs.woff +0 -0
- package/out/web/assets/inter-vietnamese-600-normal-BuLX-rYi.woff +0 -0
- package/out/web/assets/inter-vietnamese-600-normal-Cc8MFFhd.woff2 +0 -0
- package/out/web/assets/kanit-latin-400-normal-BUlsQXH3.woff2 +0 -0
- package/out/web/assets/kanit-latin-400-normal-HVZWrfev.woff +0 -0
- package/out/web/assets/kanit-latin-500-normal-CX_4XcKi.woff2 +0 -0
- package/out/web/assets/kanit-latin-500-normal-qBha86O4.woff +0 -0
- package/out/web/assets/kanit-latin-600-normal-0lS78yAd.woff2 +0 -0
- package/out/web/assets/kanit-latin-600-normal-DlacpeTg.woff +0 -0
- package/out/web/assets/kanit-latin-ext-400-normal-B2xPf58u.woff2 +0 -0
- package/out/web/assets/kanit-latin-ext-400-normal-CHvNKHHD.woff +0 -0
- package/out/web/assets/kanit-latin-ext-500-normal-BFdWrG22.woff +0 -0
- package/out/web/assets/kanit-latin-ext-500-normal-EHs3suD6.woff2 +0 -0
- package/out/web/assets/kanit-latin-ext-600-normal-BBDzoLaj.woff +0 -0
- package/out/web/assets/kanit-latin-ext-600-normal-DAX3wtuq.woff2 +0 -0
- package/out/web/assets/kanit-thai-400-normal-D2nliXKa.woff +0 -0
- package/out/web/assets/kanit-thai-400-normal-D80Pglro.woff2 +0 -0
- package/out/web/assets/kanit-thai-500-normal-BB8gri04.woff2 +0 -0
- package/out/web/assets/kanit-thai-500-normal-Iy_w0a80.woff +0 -0
- package/out/web/assets/kanit-thai-600-normal-Bj6oiaDc.woff2 +0 -0
- package/out/web/assets/kanit-thai-600-normal-wbTlPO7I.woff +0 -0
- package/out/web/assets/kanit-vietnamese-400-normal-DRI8YWyb.woff2 +0 -0
- package/out/web/assets/kanit-vietnamese-400-normal-dow6Bnto.woff +0 -0
- package/out/web/assets/kanit-vietnamese-500-normal-BzTrpCM3.woff2 +0 -0
- package/out/web/assets/kanit-vietnamese-500-normal-T1ndT7MF.woff +0 -0
- package/out/web/assets/kanit-vietnamese-600-normal-Bi7fw3I4.woff2 +0 -0
- package/out/web/assets/kanit-vietnamese-600-normal-DXCRAa_8.woff +0 -0
- package/out/web/assets/mali-latin-400-normal-ByPcZ8Gx.woff +0 -0
- package/out/web/assets/mali-latin-400-normal-Cuc6Ykl8.woff2 +0 -0
- package/out/web/assets/mali-latin-500-normal-B01M-LP6.woff2 +0 -0
- package/out/web/assets/mali-latin-500-normal-Thgqw_9f.woff +0 -0
- package/out/web/assets/mali-latin-600-normal-B9TiUNpT.woff2 +0 -0
- package/out/web/assets/mali-latin-600-normal-CycpQCwU.woff +0 -0
- package/out/web/assets/mali-latin-ext-400-normal-DUVdJQO4.woff +0 -0
- package/out/web/assets/mali-latin-ext-400-normal-iCG1ALuJ.woff2 +0 -0
- package/out/web/assets/mali-latin-ext-500-normal-BfJE4UMZ.woff2 +0 -0
- package/out/web/assets/mali-latin-ext-500-normal-FoLEyOKS.woff +0 -0
- package/out/web/assets/mali-latin-ext-600-normal-BTvIfiCp.woff2 +0 -0
- package/out/web/assets/mali-latin-ext-600-normal-DAQcLVmD.woff +0 -0
- package/out/web/assets/mali-thai-400-normal-BO7A3bLZ.woff2 +0 -0
- package/out/web/assets/mali-thai-400-normal-CX9VrjTn.woff +0 -0
- package/out/web/assets/mali-thai-500-normal-Cph2qha9.woff +0 -0
- package/out/web/assets/mali-thai-500-normal-D89rMT77.woff2 +0 -0
- package/out/web/assets/mali-thai-600-normal-DPgXT6rZ.woff +0 -0
- package/out/web/assets/mali-thai-600-normal-DlTx3OsB.woff2 +0 -0
- package/out/web/assets/mali-vietnamese-400-normal-DUKxzXaz.woff2 +0 -0
- package/out/web/assets/mali-vietnamese-400-normal-gFDLvsOK.woff +0 -0
- package/out/web/assets/mali-vietnamese-500-normal--OY07q2c.woff +0 -0
- package/out/web/assets/mali-vietnamese-500-normal-KDrNRwfW.woff2 +0 -0
- package/out/web/assets/mali-vietnamese-600-normal-CtTMUU7T.woff +0 -0
- package/out/web/assets/mali-vietnamese-600-normal-DFlJr66u.woff2 +0 -0
- package/out/web/assets/mermaid.core-DYGGlqOf.js +0 -11
- package/out/web/assets/mitr-latin-400-normal-Cb18vPmZ.woff +0 -0
- package/out/web/assets/mitr-latin-400-normal-CwbkLQ4a.woff2 +0 -0
- package/out/web/assets/mitr-latin-500-normal-B4JOhzAi.woff +0 -0
- package/out/web/assets/mitr-latin-500-normal-BmClOow2.woff2 +0 -0
- package/out/web/assets/mitr-latin-ext-400-normal-B3CPG7Yo.woff2 +0 -0
- package/out/web/assets/mitr-latin-ext-400-normal-DTx65hiC.woff +0 -0
- package/out/web/assets/mitr-latin-ext-500-normal-B_Diajz1.woff2 +0 -0
- package/out/web/assets/mitr-latin-ext-500-normal-DYOsVaVT.woff +0 -0
- package/out/web/assets/mitr-thai-400-normal-CS4Do6aM.woff +0 -0
- package/out/web/assets/mitr-thai-400-normal-CXWaAdVj.woff2 +0 -0
- package/out/web/assets/mitr-thai-500-normal-CVdBrEVH.woff2 +0 -0
- package/out/web/assets/mitr-thai-500-normal-CW_B5D-i.woff +0 -0
- package/out/web/assets/mitr-vietnamese-400-normal-CPMGWyoC.woff2 +0 -0
- package/out/web/assets/mitr-vietnamese-400-normal-Z6XhIpdY.woff +0 -0
- package/out/web/assets/mitr-vietnamese-500-normal-CDrv0585.woff2 +0 -0
- package/out/web/assets/mitr-vietnamese-500-normal-CMQWyq-Z.woff +0 -0
- package/out/web/assets/noto-sans-thai-latin-400-normal-BaWBrqFP.woff2 +0 -0
- package/out/web/assets/noto-sans-thai-latin-400-normal-Dh_FJjOB.woff +0 -0
- package/out/web/assets/noto-sans-thai-latin-500-normal-BC04jsmm.woff +0 -0
- package/out/web/assets/noto-sans-thai-latin-500-normal-fyBKClF1.woff2 +0 -0
- package/out/web/assets/noto-sans-thai-latin-600-normal-CemcjnVR.woff2 +0 -0
- package/out/web/assets/noto-sans-thai-latin-600-normal-Dbc-dNO6.woff +0 -0
- package/out/web/assets/noto-sans-thai-latin-ext-400-normal-B-1H0YkH.woff +0 -0
- package/out/web/assets/noto-sans-thai-latin-ext-400-normal-nBP59pVw.woff2 +0 -0
- package/out/web/assets/noto-sans-thai-latin-ext-500-normal-B-ZWb8SZ.woff2 +0 -0
- package/out/web/assets/noto-sans-thai-latin-ext-500-normal-CrEHO7C8.woff +0 -0
- package/out/web/assets/noto-sans-thai-latin-ext-600-normal-PkMZo0xa.woff +0 -0
- package/out/web/assets/noto-sans-thai-latin-ext-600-normal-maHHBsez.woff2 +0 -0
- package/out/web/assets/noto-sans-thai-thai-400-normal-BEOmKAI1.woff2 +0 -0
- package/out/web/assets/noto-sans-thai-thai-400-normal-Dxb_unuU.woff +0 -0
- package/out/web/assets/noto-sans-thai-thai-500-normal-BOGXO2tw.woff +0 -0
- package/out/web/assets/noto-sans-thai-thai-500-normal-CU_X86GQ.woff2 +0 -0
- package/out/web/assets/noto-sans-thai-thai-600-normal-CmgB8_JK.woff +0 -0
- package/out/web/assets/noto-sans-thai-thai-600-normal-Cs73sVjl.woff2 +0 -0
- package/out/web/assets/oauthManager-DNiwM8Rn.js +0 -2
- package/out/web/assets/oauthManager-DuamS1Av.css +0 -1
- package/out/web/assets/outfit-latin-300-normal-AWLfuCom.woff +0 -0
- package/out/web/assets/outfit-latin-300-normal-CRYTwY6m.woff2 +0 -0
- package/out/web/assets/outfit-latin-400-normal-BGsTXAXT.woff2 +0 -0
- package/out/web/assets/outfit-latin-400-normal-DMwTpYkH.woff +0 -0
- package/out/web/assets/outfit-latin-500-normal-ClnHRwRh.woff +0 -0
- package/out/web/assets/outfit-latin-500-normal-DKnIMDSk.woff2 +0 -0
- package/out/web/assets/outfit-latin-600-normal-B7SfZ07L.woff2 +0 -0
- package/out/web/assets/outfit-latin-600-normal-BEfTtDA7.woff +0 -0
- package/out/web/assets/outfit-latin-ext-300-normal-BYS6Dpvq.woff2 +0 -0
- package/out/web/assets/outfit-latin-ext-300-normal-CMIMshEd.woff +0 -0
- package/out/web/assets/outfit-latin-ext-400-normal-5tcqmc2S.woff2 +0 -0
- package/out/web/assets/outfit-latin-ext-400-normal-DHm7mdGe.woff +0 -0
- package/out/web/assets/outfit-latin-ext-500-normal-DrCvqoFD.woff +0 -0
- package/out/web/assets/outfit-latin-ext-500-normal-zeox_O30.woff2 +0 -0
- package/out/web/assets/outfit-latin-ext-600-normal-B85nYjL1.woff2 +0 -0
- package/out/web/assets/outfit-latin-ext-600-normal-CWJcPgd7.woff +0 -0
- package/out/web/assets/preload-helper-D0uHx7FM.js +0 -1
- 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-ext-400-normal-1pHbN9uy.woff +0 -0
- package/out/web/assets/prompt-latin-ext-400-normal-DdSafGZ9.woff2 +0 -0
- package/out/web/assets/prompt-latin-ext-500-normal--EZ1um7s.woff2 +0 -0
- package/out/web/assets/prompt-latin-ext-500-normal-D-lI1EVT.woff +0 -0
- package/out/web/assets/prompt-latin-ext-600-normal-C8b50x67.woff +0 -0
- package/out/web/assets/prompt-latin-ext-600-normal-Cg9L7iJU.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-vietnamese-400-normal-BCPzsgPT.woff2 +0 -0
- package/out/web/assets/prompt-vietnamese-400-normal-D4pLyeNK.woff +0 -0
- package/out/web/assets/prompt-vietnamese-500-normal-DmzxmPwa.woff2 +0 -0
- package/out/web/assets/prompt-vietnamese-500-normal-w_sS_j2F.woff +0 -0
- package/out/web/assets/prompt-vietnamese-600-normal-1dyohtNh.woff +0 -0
- package/out/web/assets/prompt-vietnamese-600-normal-7QWjJBsF.woff2 +0 -0
- package/out/web/assets/sarabun-latin-400-normal-DmguIS-7.woff +0 -0
- package/out/web/assets/sarabun-latin-400-normal-URPBxl-K.woff2 +0 -0
- package/out/web/assets/sarabun-latin-500-normal-BjUTcdxu.woff2 +0 -0
- package/out/web/assets/sarabun-latin-500-normal-CJexTAnl.woff +0 -0
- package/out/web/assets/sarabun-latin-600-normal-9FonlkKx.woff +0 -0
- package/out/web/assets/sarabun-latin-600-normal-DMD3TROr.woff2 +0 -0
- package/out/web/assets/sarabun-latin-ext-400-normal-BbP7GpLL.woff2 +0 -0
- package/out/web/assets/sarabun-latin-ext-400-normal-BsmTn0SS.woff +0 -0
- package/out/web/assets/sarabun-latin-ext-500-normal-Cot16Bd2.woff +0 -0
- package/out/web/assets/sarabun-latin-ext-500-normal-DE1LysqI.woff2 +0 -0
- package/out/web/assets/sarabun-latin-ext-600-normal-0tXu9x_i.woff +0 -0
- package/out/web/assets/sarabun-latin-ext-600-normal-BRxjKUQ6.woff2 +0 -0
- package/out/web/assets/sarabun-thai-400-normal-C2DaJlKK.woff2 +0 -0
- package/out/web/assets/sarabun-thai-400-normal-CH-UbWgg.woff +0 -0
- package/out/web/assets/sarabun-thai-500-normal-BVssjame.woff2 +0 -0
- package/out/web/assets/sarabun-thai-500-normal-C3iDLEzi.woff +0 -0
- package/out/web/assets/sarabun-thai-600-normal-3dIAQ-_s.woff2 +0 -0
- package/out/web/assets/sarabun-thai-600-normal-DWKeTe6a.woff +0 -0
- package/out/web/assets/sarabun-vietnamese-400-normal-DPfkSCMy.woff +0 -0
- package/out/web/assets/sarabun-vietnamese-400-normal-igdrzAGY.woff2 +0 -0
- package/out/web/assets/sarabun-vietnamese-500-normal-CpRVvGRU.woff +0 -0
- package/out/web/assets/sarabun-vietnamese-500-normal-Dpe7Br9m.woff2 +0 -0
- package/out/web/assets/sarabun-vietnamese-600-normal-BMbOgAW-.woff +0 -0
- package/out/web/assets/sarabun-vietnamese-600-normal-DkxrOlLB.woff2 +0 -0
- package/out/web/assets/stateDiagram-v2-4QOOHH4V-s6P9g2_b.js +0 -1
- package/out/web/assets/swimlanesDiagram-VK2B7HYN-CV9fOLrV.js +0 -8
- package/out/web/assets/tauri-CNrHQ2Gb.js +0 -3
- package/out/web/assets/window-DkIhgI7B.js +0 -1
- package/skills-lock.json +0 -41
- package/src/renderer/public/Live2DCubismCore.js +0 -9
- package/src/renderer/src/companionWidget.ts +0 -95
- package/src/renderer/src/components/Live2DStage.tsx +0 -389
- package/src/renderer/src/components/ModelPanel.tsx +0 -154
- package/src/renderer/src/css/model.css +0 -627
- 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,
|
|
@@ -34,12 +35,13 @@ import type {
|
|
|
34
35
|
DocumentAttachment,
|
|
35
36
|
AgentProgress,
|
|
36
37
|
InteractionMemory,
|
|
38
|
+
ConversationSnapshot,
|
|
39
|
+
ConversationChanges,
|
|
37
40
|
ChatSession,
|
|
38
41
|
PictureEntry,
|
|
39
42
|
ImageGenRequest,
|
|
40
43
|
ImageGenProviders,
|
|
41
44
|
ImageGenResponse,
|
|
42
|
-
WorkspaceTreeEntry,
|
|
43
45
|
CodeEdit,
|
|
44
46
|
CodeEditProposal,
|
|
45
47
|
LearnedSkill,
|
|
@@ -48,14 +50,14 @@ import type {
|
|
|
48
50
|
CronJobDraft,
|
|
49
51
|
LinkedFolder,
|
|
50
52
|
LinkedFolderDraft,
|
|
53
|
+
LinkedFolderNote,
|
|
54
|
+
LinkedFolderStatus,
|
|
51
55
|
GitCheckpoint,
|
|
56
|
+
GitBranchInfo,
|
|
57
|
+
GitBranchChangeOutcome,
|
|
52
58
|
} from '../shared/types'
|
|
53
59
|
|
|
54
60
|
|
|
55
|
-
type DesktopStreamEvent =
|
|
56
|
-
| { type: 'chunk'; chunk: string }
|
|
57
|
-
| { type: 'progress'; progress: AgentProgress }
|
|
58
|
-
|
|
59
61
|
export type { GeminiLiveEvent } from '../shared/utils/useGeminiLiveVoice'
|
|
60
62
|
import type { GeminiLiveEvent } from '../shared/utils/useGeminiLiveVoice'
|
|
61
63
|
|
|
@@ -319,9 +321,9 @@ export async function fetchProviderModels(
|
|
|
319
321
|
return invoke<string[]>('fetch_provider_models', { provider, apiKey, baseUrl })
|
|
320
322
|
}
|
|
321
323
|
|
|
322
|
-
/** Fetch
|
|
323
|
-
*
|
|
324
|
-
*
|
|
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. */
|
|
325
327
|
export async function fetchImageProviderModels(
|
|
326
328
|
provider: string,
|
|
327
329
|
apiKey: string = '',
|
|
@@ -330,9 +332,9 @@ export async function fetchImageProviderModels(
|
|
|
330
332
|
return invoke<string[]>('fetch_image_provider_models', { provider, apiKey: apiKey || '' })
|
|
331
333
|
}
|
|
332
334
|
|
|
333
|
-
/** Fetch
|
|
334
|
-
*
|
|
335
|
-
*
|
|
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. */
|
|
336
338
|
export async function fetchVideoProviderModels(
|
|
337
339
|
provider: string,
|
|
338
340
|
apiKey: string = '',
|
|
@@ -341,10 +343,9 @@ export async function fetchVideoProviderModels(
|
|
|
341
343
|
return invoke<string[]>('fetch_video_provider_models', { provider, apiKey: apiKey || '' })
|
|
342
344
|
}
|
|
343
345
|
|
|
344
|
-
/** Fetch
|
|
345
|
-
*
|
|
346
|
-
*
|
|
347
|
-
* 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. */
|
|
348
349
|
export async function fetchGeminiLiveModels(apiKey: string): Promise<string[]> {
|
|
349
350
|
const { invoke } = await import('@tauri-apps/api/core')
|
|
350
351
|
return invoke<string[]>('fetch_gemini_live_models', { apiKey: apiKey || '' })
|
|
@@ -378,157 +379,12 @@ export async function uploadFile(file: File): Promise<string> {
|
|
|
378
379
|
return url;
|
|
379
380
|
}
|
|
380
381
|
|
|
381
|
-
export
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
workspacePath?: string | null,
|
|
388
|
-
chatId?: string | null,
|
|
389
|
-
agentId?: string | null,
|
|
390
|
-
planMode?: boolean,
|
|
391
|
-
): Promise<ChatResponse> {
|
|
392
|
-
const outgoingMessage = withImagePlaceholder(message, imageDataUri, videoDataUri)
|
|
393
|
-
if (!isTauriRuntime()) {
|
|
394
|
-
const API_BASE = getLocalApiBase();
|
|
395
|
-
try {
|
|
396
|
-
const res = await authFetch(`${API_BASE}/chat`, {
|
|
397
|
-
method: 'POST',
|
|
398
|
-
headers: { 'Content-Type': 'application/json' },
|
|
399
|
-
body: JSON.stringify({ message: outgoingMessage, systemInstruction: '', chatId, imageDataUri, audioDataUri, videoDataUri, documentAttachment, workspacePath, agentId })
|
|
400
|
-
});
|
|
401
|
-
const data = await res.json().catch(() => null);
|
|
402
|
-
if (!res.ok) {
|
|
403
|
-
return {
|
|
404
|
-
provider: 'error',
|
|
405
|
-
model: 'error',
|
|
406
|
-
text: data?.text || data?.message || data?.status || `Local API returned HTTP ${res.status}`,
|
|
407
|
-
};
|
|
408
|
-
}
|
|
409
|
-
if (!data || typeof data.text !== 'string') {
|
|
410
|
-
return { provider: 'error', model: 'error', text: 'Local API returned an invalid chat response.' };
|
|
411
|
-
}
|
|
412
|
-
return data;
|
|
413
|
-
} catch (e) {
|
|
414
|
-
console.error("Failed to send chat message to local server:", e);
|
|
415
|
-
return { provider: 'error', model: 'error', text: `Failed to connect to Local API Server: ${e}` };
|
|
416
|
-
}
|
|
417
|
-
}
|
|
418
|
-
const { invoke } = await import('@tauri-apps/api/core')
|
|
419
|
-
const response = await invoke<ChatResponse>('send_chat_message', {
|
|
420
|
-
request: { message: outgoingMessage, systemInstruction: '', chatId, imageDataUri, audioDataUri, videoDataUri, documentAttachment, workspacePath, agentId, planMode: planMode ?? false },
|
|
421
|
-
})
|
|
422
|
-
if (imageDataUri) {
|
|
423
|
-
await invoke('save_pictures', {
|
|
424
|
-
images: imageDataUri.split(' '),
|
|
425
|
-
source: 'chat',
|
|
426
|
-
message: outgoingMessage,
|
|
427
|
-
})
|
|
428
|
-
}
|
|
429
|
-
if (videoDataUri) {
|
|
430
|
-
await invoke('save_pictures', {
|
|
431
|
-
images: videoDataUri.split(' '),
|
|
432
|
-
source: 'chat',
|
|
433
|
-
message: outgoingMessage,
|
|
434
|
-
})
|
|
435
|
-
}
|
|
436
|
-
return response
|
|
437
|
-
}
|
|
438
|
-
|
|
439
|
-
export async function streamChatMessage(
|
|
440
|
-
message: string,
|
|
441
|
-
onChunk: (chunk: string) => void,
|
|
442
|
-
imageDataUri?: string | null,
|
|
443
|
-
audioDataUri?: string | null,
|
|
444
|
-
videoDataUri?: string | null,
|
|
445
|
-
systemInstruction = '',
|
|
446
|
-
onProgress?: (progress: AgentProgress) => void,
|
|
447
|
-
documentAttachment?: DocumentAttachment | null,
|
|
448
|
-
workspacePath?: string | null,
|
|
449
|
-
chatId?: string | null,
|
|
450
|
-
agentId?: string | null,
|
|
451
|
-
planMode?: boolean,
|
|
452
|
-
pinnedMcpServer?: string | null,
|
|
453
|
-
// Only meaningful for the non-Tauri fallback branch below — the real
|
|
454
|
-
// Tauri branch gets approvals via the separate global
|
|
455
|
-
// `listen('tool-approval-requested', ...)` event instead, independent of
|
|
456
|
-
// this function, so it ignores this parameter entirely.
|
|
457
|
-
onApprovalRequested?: (payload: { token: string; approval: any }) => void,
|
|
458
|
-
): Promise<ChatResponse> {
|
|
459
|
-
if (!isTauriRuntime()) {
|
|
460
|
-
const API_BASE = getLocalApiBase();
|
|
461
|
-
const outgoingMessage = withImagePlaceholder(message, imageDataUri, videoDataUri);
|
|
462
|
-
const res = await authFetch(`${API_BASE}/chat-stream`, {
|
|
463
|
-
method: 'POST',
|
|
464
|
-
headers: { 'Content-Type': 'application/json' },
|
|
465
|
-
body: JSON.stringify({ message: outgoingMessage, systemInstruction, chatId, imageDataUri, audioDataUri, videoDataUri, documentAttachment, workspacePath, agentId, pinnedMcpServer })
|
|
466
|
-
});
|
|
467
|
-
if (!res.ok) {
|
|
468
|
-
const data = await res.json().catch(() => null);
|
|
469
|
-
throw new Error(data?.text || data?.message || `HTTP ${res.status}`);
|
|
470
|
-
}
|
|
471
|
-
const reader = res.body?.getReader();
|
|
472
|
-
if (!reader) {
|
|
473
|
-
throw new Error("No response body reader");
|
|
474
|
-
}
|
|
475
|
-
const decoder = new TextDecoder();
|
|
476
|
-
let buffer = '';
|
|
477
|
-
let finalResponse: ChatResponse | null = null;
|
|
478
|
-
while (true) {
|
|
479
|
-
const { value, done } = await reader.read();
|
|
480
|
-
if (done) break;
|
|
481
|
-
buffer += decoder.decode(value, { stream: true });
|
|
482
|
-
const lines = buffer.split('\n');
|
|
483
|
-
buffer = lines.pop() || '';
|
|
484
|
-
for (const line of lines) {
|
|
485
|
-
if (!line.trim()) continue;
|
|
486
|
-
try {
|
|
487
|
-
const event = JSON.parse(line);
|
|
488
|
-
if (event.type === 'chunk') {
|
|
489
|
-
onChunk(event.chunk);
|
|
490
|
-
} else if (event.type === 'progress') {
|
|
491
|
-
onProgress?.(event.progress);
|
|
492
|
-
} else if (event.type === 'done') {
|
|
493
|
-
finalResponse = event.response;
|
|
494
|
-
} else if (event.type === 'approval-requested') {
|
|
495
|
-
onApprovalRequested?.({ token: event.token, approval: event.approval });
|
|
496
|
-
}
|
|
497
|
-
} catch (e) {
|
|
498
|
-
console.error("Failed to parse stream line:", line, e);
|
|
499
|
-
}
|
|
500
|
-
}
|
|
501
|
-
}
|
|
502
|
-
if (finalResponse) return finalResponse;
|
|
503
|
-
throw new Error("Stream closed without a final response");
|
|
504
|
-
}
|
|
505
|
-
const { invoke, Channel } = await import('@tauri-apps/api/core')
|
|
506
|
-
const outgoingMessage = withImagePlaceholder(message, imageDataUri, videoDataUri)
|
|
507
|
-
const onEvent = new Channel<DesktopStreamEvent>()
|
|
508
|
-
onEvent.onmessage = (event) => {
|
|
509
|
-
if (event.type === 'chunk') onChunk(event.chunk)
|
|
510
|
-
else onProgress?.(event.progress)
|
|
511
|
-
}
|
|
512
|
-
const response = await invoke<ChatResponse>('stream_chat_message', {
|
|
513
|
-
request: { message: outgoingMessage, systemInstruction, chatId, imageDataUri, audioDataUri, videoDataUri, documentAttachment, workspacePath, agentId, planMode: planMode ?? false, pinnedMcpServer },
|
|
514
|
-
onEvent,
|
|
515
|
-
})
|
|
516
|
-
if (imageDataUri) {
|
|
517
|
-
await invoke('save_pictures', {
|
|
518
|
-
images: imageDataUri.split(' '),
|
|
519
|
-
source: 'chat',
|
|
520
|
-
message: outgoingMessage,
|
|
521
|
-
})
|
|
522
|
-
}
|
|
523
|
-
if (videoDataUri) {
|
|
524
|
-
await invoke('save_pictures', {
|
|
525
|
-
images: videoDataUri.split(' '),
|
|
526
|
-
source: 'chat',
|
|
527
|
-
message: outgoingMessage,
|
|
528
|
-
})
|
|
529
|
-
}
|
|
530
|
-
return response
|
|
531
|
-
}
|
|
382
|
+
export const { sendChatMessage, streamChatMessage } = createConversationTransport({
|
|
383
|
+
isNative: isTauriRuntime,
|
|
384
|
+
apiBase: getLocalApiBase,
|
|
385
|
+
fetch: authFetch,
|
|
386
|
+
ownerToken: getStoredAuthToken,
|
|
387
|
+
})
|
|
532
388
|
|
|
533
389
|
/**
|
|
534
390
|
* Starts a Gemini Live realtime voice session (beta, desktop-only). Returns a session id
|
|
@@ -587,21 +443,14 @@ export async function stopMicRecordingAndTranscribe(): Promise<string> {
|
|
|
587
443
|
return invoke<string>('stop_mic_recording_and_transcribe')
|
|
588
444
|
}
|
|
589
445
|
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
if (
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
if (markers) finalMessage = `${finalMessage} ${markers}`
|
|
596
|
-
}
|
|
597
|
-
if (videoDataUri && !finalMessage.includes('[Video #1]')) {
|
|
598
|
-
const videoCount = videoDataUri.split(/\s+/).filter(Boolean).length
|
|
599
|
-
const markers = Array.from({ length: videoCount }, (_, index) => `[Video #${index + 1}]`).join(' ')
|
|
600
|
-
if (markers) finalMessage = `${finalMessage} ${markers}`
|
|
601
|
-
}
|
|
602
|
-
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')
|
|
603
451
|
}
|
|
604
452
|
|
|
453
|
+
|
|
605
454
|
export async function getTtsUrls(text: string): Promise<TtsUrl[]> {
|
|
606
455
|
if (typeof window === 'undefined' || !(window as any).__TAURI_INTERNALS__) return []
|
|
607
456
|
const { invoke } = await import('@tauri-apps/api/core')
|
|
@@ -640,6 +489,29 @@ export async function getRecentInteractions(limit = 50, chatId?: string | null,
|
|
|
640
489
|
return invoke<InteractionMemory[]>('get_recent_interactions', { limit, chatId, workspacePath })
|
|
641
490
|
}
|
|
642
491
|
|
|
492
|
+
export async function getConversationSnapshot(chatId: string, beforeId?: number | null, limit = 50): Promise<ConversationSnapshot> {
|
|
493
|
+
if (!isTauriRuntime()) {
|
|
494
|
+
const params = new URLSearchParams({ chatId, limit: String(limit) })
|
|
495
|
+
if (beforeId != null) params.set('beforeId', String(beforeId))
|
|
496
|
+
const response = await authFetch(`${getLocalApiBase()}/conversation-snapshot?${params}`)
|
|
497
|
+
if (!response.ok) throw new Error(`Conversation snapshot failed: ${response.status}`)
|
|
498
|
+
return response.json()
|
|
499
|
+
}
|
|
500
|
+
const { invoke } = await import('@tauri-apps/api/core')
|
|
501
|
+
return invoke<ConversationSnapshot>('get_conversation_snapshot', { chatId, beforeId, limit })
|
|
502
|
+
}
|
|
503
|
+
|
|
504
|
+
export async function getConversationChanges(chatId: string, after: number, limit = 100): Promise<ConversationChanges> {
|
|
505
|
+
if (!isTauriRuntime()) {
|
|
506
|
+
const params = new URLSearchParams({ chatId, after: String(after), limit: String(limit) })
|
|
507
|
+
const response = await authFetch(`${getLocalApiBase()}/conversation-changes?${params}`)
|
|
508
|
+
if (!response.ok) throw new Error(`Conversation changes failed: ${response.status}`)
|
|
509
|
+
return response.json()
|
|
510
|
+
}
|
|
511
|
+
const { invoke } = await import('@tauri-apps/api/core')
|
|
512
|
+
return invoke<ConversationChanges>('get_conversation_changes', { chatId, after, limit })
|
|
513
|
+
}
|
|
514
|
+
|
|
643
515
|
export async function saveSystemInteraction(
|
|
644
516
|
chatId: string,
|
|
645
517
|
userText: string,
|
|
@@ -705,6 +577,23 @@ export async function listChatSessions(): Promise<ChatSession[]> {
|
|
|
705
577
|
return invoke<ChatSession[]>('list_chat_sessions')
|
|
706
578
|
}
|
|
707
579
|
|
|
580
|
+
export async function updateChatSessionWorkspace(chatId: string, workspacePath: string | null): Promise<void> {
|
|
581
|
+
if (!isTauriRuntime()) {
|
|
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})`)
|
|
590
|
+
}
|
|
591
|
+
return
|
|
592
|
+
}
|
|
593
|
+
const { invoke } = await import('@tauri-apps/api/core')
|
|
594
|
+
await invoke('update_chat_session_workspace', { chatId, workspacePath })
|
|
595
|
+
}
|
|
596
|
+
|
|
708
597
|
export async function deleteChatSession(chatId: string): Promise<number> {
|
|
709
598
|
if (!isTauriRuntime()) {
|
|
710
599
|
const API_BASE = getLocalApiBase();
|
|
@@ -783,7 +672,10 @@ export async function listLearnedSkills(workspacePath?: string): Promise<Learned
|
|
|
783
672
|
if (typeof window === 'undefined' || !isTauriRuntime()) {
|
|
784
673
|
try {
|
|
785
674
|
const API_BASE = getLocalApiBase()
|
|
786
|
-
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}`)
|
|
787
679
|
if (res.ok) {
|
|
788
680
|
return await res.json()
|
|
789
681
|
}
|
|
@@ -903,19 +795,20 @@ export async function deleteSubagent(sourcePath: string): Promise<void> {
|
|
|
903
795
|
|
|
904
796
|
export async function runSlashCommand(
|
|
905
797
|
input: string,
|
|
906
|
-
cwd?: string | null
|
|
798
|
+
cwd?: string | null,
|
|
799
|
+
chatId?: string | null
|
|
907
800
|
): Promise<import('../shared/platform').SlashResponse> {
|
|
908
801
|
if (!isTauriRuntime()) {
|
|
909
802
|
const res = await authFetch(`${getLocalApiBase()}/slash`, {
|
|
910
803
|
method: 'POST',
|
|
911
804
|
headers: { 'Content-Type': 'application/json' },
|
|
912
|
-
body: JSON.stringify({ input, cwd: cwd ?? null })
|
|
805
|
+
body: JSON.stringify({ input, cwd: cwd ?? null, chat_id: chatId ?? null, ownerToken: getStoredAuthToken() })
|
|
913
806
|
})
|
|
914
807
|
if (!res.ok) return { kind: 'not_handled' }
|
|
915
808
|
return res.json()
|
|
916
809
|
}
|
|
917
810
|
const { invoke } = await import('@tauri-apps/api/core')
|
|
918
|
-
return invoke('run_slash_command', { input, cwd: cwd ?? null })
|
|
811
|
+
return invoke('run_slash_command', { input, cwd: cwd ?? null, chatId: chatId ?? null, ownerToken: getStoredAuthToken() })
|
|
919
812
|
}
|
|
920
813
|
|
|
921
814
|
export async function listCronJobs(): Promise<CronJob[]> {
|
|
@@ -972,7 +865,7 @@ export async function setCronJobEnabled(id: string, enabled: boolean): Promise<C
|
|
|
972
865
|
export async function listLinkedFolders(): Promise<Record<string, LinkedFolder>> {
|
|
973
866
|
if (!isTauriRuntime()) {
|
|
974
867
|
const res = await authFetch(`${getLocalApiBase()}/linked-folders`)
|
|
975
|
-
if (!res.ok)
|
|
868
|
+
if (!res.ok) throw new Error('Failed to load linked folders')
|
|
976
869
|
return res.json()
|
|
977
870
|
}
|
|
978
871
|
const { invoke } = await import('@tauri-apps/api/core')
|
|
@@ -1008,6 +901,52 @@ export async function removeLinkedFolder(name: string): Promise<void> {
|
|
|
1008
901
|
await invoke('remove_linked_folder', { name })
|
|
1009
902
|
}
|
|
1010
903
|
|
|
904
|
+
export async function linkedFolderStatus(name: string): Promise<LinkedFolderStatus> {
|
|
905
|
+
if (!isTauriRuntime()) {
|
|
906
|
+
const res = await authFetch(`${getLocalApiBase()}/linked-folders/${encodeURIComponent(name)}/status`)
|
|
907
|
+
if (!res.ok) throw new Error('Failed to load folder status')
|
|
908
|
+
return res.json()
|
|
909
|
+
}
|
|
910
|
+
const { invoke } = await import('@tauri-apps/api/core')
|
|
911
|
+
return invoke('linked_folder_status', { name })
|
|
912
|
+
}
|
|
913
|
+
|
|
914
|
+
export async function refreshLinkedFolder(name: string): Promise<LinkedFolderStatus> {
|
|
915
|
+
if (!isTauriRuntime()) {
|
|
916
|
+
const res = await authFetch(`${getLocalApiBase()}/linked-folders/${encodeURIComponent(name)}/refresh`, { method: 'POST' })
|
|
917
|
+
if (!res.ok) throw new Error('Failed to refresh folder')
|
|
918
|
+
return res.json()
|
|
919
|
+
}
|
|
920
|
+
const { invoke } = await import('@tauri-apps/api/core')
|
|
921
|
+
return invoke('refresh_linked_folder', { name })
|
|
922
|
+
}
|
|
923
|
+
|
|
924
|
+
export async function listLinkedFolderNotes(name: string): Promise<LinkedFolderNote[]> {
|
|
925
|
+
if (!isTauriRuntime()) {
|
|
926
|
+
const res = await authFetch(`${getLocalApiBase()}/linked-folders/${encodeURIComponent(name)}/notes`)
|
|
927
|
+
if (!res.ok) throw new Error('Failed to load notes')
|
|
928
|
+
return res.json()
|
|
929
|
+
}
|
|
930
|
+
const { invoke } = await import('@tauri-apps/api/core')
|
|
931
|
+
return invoke('list_linked_folder_notes', { name })
|
|
932
|
+
}
|
|
933
|
+
|
|
934
|
+
export async function readLinkedFolderNote(name: string, id: string): Promise<string> {
|
|
935
|
+
if (!isTauriRuntime()) {
|
|
936
|
+
const res = await authFetch(`${getLocalApiBase()}/linked-folders/${encodeURIComponent(name)}/notes/${encodeURIComponent(id)}`)
|
|
937
|
+
if (!res.ok) throw new Error('Failed to read note')
|
|
938
|
+
return (await res.json()).content
|
|
939
|
+
}
|
|
940
|
+
const { invoke } = await import('@tauri-apps/api/core')
|
|
941
|
+
return invoke('read_linked_folder_note', { name, id })
|
|
942
|
+
}
|
|
943
|
+
|
|
944
|
+
export async function openLinkedFolderNote(name: string, id: string): Promise<void> {
|
|
945
|
+
if (!isTauriRuntime()) return
|
|
946
|
+
const { invoke } = await import('@tauri-apps/api/core')
|
|
947
|
+
await invoke('open_linked_folder_note', { name, id })
|
|
948
|
+
}
|
|
949
|
+
|
|
1011
950
|
export async function clearChatHistory(chatId?: string | null): Promise<number> {
|
|
1012
951
|
if (!isTauriRuntime()) {
|
|
1013
952
|
const API_BASE = getLocalApiBase();
|
|
@@ -1167,38 +1106,107 @@ export async function setDefaultImageProvider(provider: string): Promise<boolean
|
|
|
1167
1106
|
|
|
1168
1107
|
|
|
1169
1108
|
|
|
1170
|
-
export async function
|
|
1109
|
+
export async function getWorkspaceSnapshot(operation: import('../shared/types').WorkspaceOperation): Promise<import('../shared/types').WorkspaceSnapshot> {
|
|
1171
1110
|
if (typeof window === 'undefined' || !(window as any).__TAURI_INTERNALS__) {
|
|
1172
1111
|
return {
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
kind: 'directory',
|
|
1176
|
-
children: [
|
|
1177
|
-
{ name: 'src', path: 'src', kind: 'directory', children: [] },
|
|
1178
|
-
{ name: 'package.json', path: 'package.json', kind: 'file', children: [] },
|
|
1179
|
-
],
|
|
1112
|
+
path: operation.root, revision: operation.revision,
|
|
1113
|
+
git: { isRepository: false, currentBranch: null, detachedHead: null, branches: [], remoteBranches: [], isDirty: false },
|
|
1114
|
+
tree: { name: 'Workspace', path: '.', kind: 'directory', children: [] },
|
|
1180
1115
|
}
|
|
1181
1116
|
}
|
|
1182
1117
|
const { invoke } = await import('@tauri-apps/api/core')
|
|
1183
|
-
return invoke
|
|
1118
|
+
return invoke('get_workspace_snapshot', { operation })
|
|
1184
1119
|
}
|
|
1185
1120
|
|
|
1186
|
-
export async function
|
|
1187
|
-
if (typeof window === 'undefined' || !(window as any).__TAURI_INTERNALS__)
|
|
1121
|
+
export async function getWorkspaceGitDiff(workspacePath: string): Promise<import('../shared/types').FileChange[]> {
|
|
1122
|
+
if (typeof window === 'undefined' || !(window as any).__TAURI_INTERNALS__) {
|
|
1123
|
+
return []
|
|
1124
|
+
}
|
|
1188
1125
|
const { invoke } = await import('@tauri-apps/api/core')
|
|
1189
|
-
return invoke('
|
|
1126
|
+
return invoke<import('../shared/types').FileChange[]>('get_workspace_git_diff', { workspacePath })
|
|
1190
1127
|
}
|
|
1191
1128
|
|
|
1192
|
-
export async function
|
|
1193
|
-
if (typeof window === 'undefined' || !(window as any).__TAURI_INTERNALS__)
|
|
1129
|
+
export async function getGitBranchInfo(workspacePath: string): Promise<GitBranchInfo> {
|
|
1130
|
+
if (typeof window === 'undefined' || !(window as any).__TAURI_INTERNALS__) {
|
|
1131
|
+
return { isRepository: false, currentBranch: null, detachedHead: null, branches: [], remoteBranches: [], isDirty: false }
|
|
1132
|
+
}
|
|
1194
1133
|
const { invoke } = await import('@tauri-apps/api/core')
|
|
1195
|
-
return invoke('
|
|
1134
|
+
return invoke<GitBranchInfo>('get_git_branch_info', { workspacePath })
|
|
1196
1135
|
}
|
|
1197
1136
|
|
|
1198
|
-
export async function
|
|
1199
|
-
|
|
1137
|
+
export async function switchGitBranch(
|
|
1138
|
+
workspacePath: string,
|
|
1139
|
+
branch: string,
|
|
1140
|
+
confirmedDirtyWorkspace = false,
|
|
1141
|
+
): Promise<GitBranchChangeOutcome> {
|
|
1142
|
+
if (typeof window === 'undefined' || !(window as any).__TAURI_INTERNALS__) {
|
|
1143
|
+
throw new Error('Branch switching is only available in the desktop app.')
|
|
1144
|
+
}
|
|
1200
1145
|
const { invoke } = await import('@tauri-apps/api/core')
|
|
1201
|
-
return invoke('
|
|
1146
|
+
return invoke<GitBranchChangeOutcome>('switch_git_branch', { workspacePath, branch, confirmedDirtyWorkspace })
|
|
1147
|
+
}
|
|
1148
|
+
|
|
1149
|
+
export async function createGitBranch(
|
|
1150
|
+
workspacePath: string,
|
|
1151
|
+
branch: string,
|
|
1152
|
+
confirmedDirtyWorkspace = false,
|
|
1153
|
+
): Promise<GitBranchChangeOutcome> {
|
|
1154
|
+
if (typeof window === 'undefined' || !(window as any).__TAURI_INTERNALS__) {
|
|
1155
|
+
throw new Error('Branch creation is only available in the desktop app.')
|
|
1156
|
+
}
|
|
1157
|
+
const { invoke } = await import('@tauri-apps/api/core')
|
|
1158
|
+
return invoke<GitBranchChangeOutcome>('create_git_branch', { workspacePath, branch, confirmedDirtyWorkspace })
|
|
1159
|
+
}
|
|
1160
|
+
|
|
1161
|
+
export async function checkoutRemoteGitBranch(
|
|
1162
|
+
workspacePath: string,
|
|
1163
|
+
remoteBranch: string,
|
|
1164
|
+
confirmedDirtyWorkspace = false,
|
|
1165
|
+
): Promise<GitBranchChangeOutcome> {
|
|
1166
|
+
if (typeof window === 'undefined' || !(window as any).__TAURI_INTERNALS__) {
|
|
1167
|
+
throw new Error('Remote branch checkout is only available in the desktop app.')
|
|
1168
|
+
}
|
|
1169
|
+
const { invoke } = await import('@tauri-apps/api/core')
|
|
1170
|
+
return invoke<GitBranchChangeOutcome>('checkout_remote_git_branch', { workspacePath, remoteBranch, confirmedDirtyWorkspace })
|
|
1171
|
+
}
|
|
1172
|
+
|
|
1173
|
+
export async function getGitGraph(workspacePath: string): Promise<string[]> {
|
|
1174
|
+
if (typeof window === 'undefined' || !(window as any).__TAURI_INTERNALS__) return []
|
|
1175
|
+
const { invoke } = await import('@tauri-apps/api/core')
|
|
1176
|
+
return invoke<string[]>('get_git_graph', { workspacePath })
|
|
1177
|
+
}
|
|
1178
|
+
|
|
1179
|
+
export async function createWorkspaceFile(operation: import('../shared/types').WorkspaceOperation): Promise<import('../shared/types').WorkspaceSnapshot> {
|
|
1180
|
+
if (typeof window === 'undefined' || !(window as any).__TAURI_INTERNALS__) throw new Error('Workspace files are only available in the desktop app.')
|
|
1181
|
+
const { invoke } = await import('@tauri-apps/api/core')
|
|
1182
|
+
return invoke('create_workspace_file', { operation })
|
|
1183
|
+
}
|
|
1184
|
+
|
|
1185
|
+
export async function createWorkspaceFolder(operation: import('../shared/types').WorkspaceOperation): Promise<import('../shared/types').WorkspaceSnapshot> {
|
|
1186
|
+
if (typeof window === 'undefined' || !(window as any).__TAURI_INTERNALS__) throw new Error('Workspace folders are only available in the desktop app.')
|
|
1187
|
+
const { invoke } = await import('@tauri-apps/api/core')
|
|
1188
|
+
return invoke('create_workspace_folder', { operation })
|
|
1189
|
+
}
|
|
1190
|
+
|
|
1191
|
+
export async function deleteWorkspaceItem(operation: import('../shared/types').WorkspaceOperation): Promise<import('../shared/types').WorkspaceSnapshot> {
|
|
1192
|
+
if (typeof window === 'undefined' || !(window as any).__TAURI_INTERNALS__) throw new Error('Workspace files are only available in the desktop app.')
|
|
1193
|
+
const { invoke } = await import('@tauri-apps/api/core')
|
|
1194
|
+
return invoke('delete_workspace_item', { operation })
|
|
1195
|
+
}
|
|
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 })
|
|
1202
1210
|
}
|
|
1203
1211
|
|
|
1204
1212
|
export async function selectWorkspaceDirectory(): Promise<string | null> {
|
|
@@ -1349,16 +1357,13 @@ export function installTauriAdapters() {
|
|
|
1349
1357
|
|
|
1350
1358
|
(window as any).widgetAPI = {
|
|
1351
1359
|
onStateChange: () => {},
|
|
1360
|
+
openChat: async () => {},
|
|
1361
|
+
setVisible: async () => {},
|
|
1362
|
+
startDragging: async () => {},
|
|
1352
1363
|
};
|
|
1353
1364
|
|
|
1354
1365
|
(window as any).screenPickerApi = {
|
|
1355
|
-
onScreenshot: () => {},
|
|
1356
|
-
sendSelection: () => {},
|
|
1357
|
-
startContinuousTranslation: () => {},
|
|
1358
|
-
stopContinuousTranslation: () => {},
|
|
1359
|
-
onTranslationResult: () => {},
|
|
1360
1366
|
closePicker: () => {},
|
|
1361
|
-
setOverlayInteractable: () => {},
|
|
1362
1367
|
};
|
|
1363
1368
|
|
|
1364
1369
|
(window as any).api = {
|
|
@@ -1458,8 +1463,6 @@ export function installTauriAdapters() {
|
|
|
1458
1463
|
},
|
|
1459
1464
|
onSettingsChanged: () => {},
|
|
1460
1465
|
startVision: () => {},
|
|
1461
|
-
onVisionReady: async () => () => {},
|
|
1462
|
-
captureSilentScreen: async () => '',
|
|
1463
1466
|
getSmartContext: async () => {
|
|
1464
1467
|
try {
|
|
1465
1468
|
const res = await authFetch(`${API_BASE}/smart-context`);
|
|
@@ -1497,20 +1500,8 @@ export function installTauriAdapters() {
|
|
|
1497
1500
|
}
|
|
1498
1501
|
},
|
|
1499
1502
|
onSpotlightToChat: async () => () => {},
|
|
1500
|
-
notifyAiResponse:
|
|
1501
|
-
|
|
1502
|
-
let permission = Notification.permission
|
|
1503
|
-
if (permission === 'default') {
|
|
1504
|
-
permission = await Notification.requestPermission()
|
|
1505
|
-
}
|
|
1506
|
-
if (permission === 'granted') {
|
|
1507
|
-
lastAiNotification = new Notification('Mint Agent', { body: preview })
|
|
1508
|
-
}
|
|
1509
|
-
},
|
|
1510
|
-
clearAiNotifications: () => {
|
|
1511
|
-
lastAiNotification?.close()
|
|
1512
|
-
lastAiNotification = null
|
|
1513
|
-
},
|
|
1503
|
+
notifyAiResponse: (preview: string, chatId?: string) => sendBrowserNotification(preview, chatId, openNotificationChat),
|
|
1504
|
+
clearAiNotifications: clearBrowserNotifications,
|
|
1514
1505
|
getTtsUrls: async () => [],
|
|
1515
1506
|
setAiState: () => {},
|
|
1516
1507
|
};
|
|
@@ -1610,58 +1601,27 @@ export function installTauriAdapters() {
|
|
|
1610
1601
|
const { listen } = await import('@tauri-apps/api/event')
|
|
1611
1602
|
void listen<string>('widget-state', (event) => callback(event.payload))
|
|
1612
1603
|
},
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
window.screenPickerApi = {
|
|
1616
|
-
onScreenshot: async (callback) => {
|
|
1604
|
+
openChat: async () => {
|
|
1617
1605
|
const { invoke } = await import('@tauri-apps/api/core')
|
|
1618
|
-
|
|
1619
|
-
const image = await captureSharedScreen()
|
|
1620
|
-
callback(image)
|
|
1621
|
-
} catch (reason) {
|
|
1622
|
-
console.warn('Screen share capture failed, falling back to native capture:', reason)
|
|
1623
|
-
void invoke<string>('capture_silent_screen').then(callback)
|
|
1624
|
-
}
|
|
1606
|
+
await invoke('open_window', { kind: 'main' })
|
|
1625
1607
|
},
|
|
1626
|
-
|
|
1608
|
+
setVisible: async (visible) => {
|
|
1627
1609
|
const { invoke } = await import('@tauri-apps/api/core')
|
|
1628
|
-
|
|
1629
|
-
|
|
1630
|
-
startContinuousTranslation: (rect) => {
|
|
1631
|
-
let translationTimer: ReturnType<typeof setInterval> | null = null
|
|
1632
|
-
const translate = async () => {
|
|
1633
|
-
const { invoke } = await import('@tauri-apps/api/core')
|
|
1634
|
-
void invoke<string>('translate_capture_region', { rect })
|
|
1635
|
-
.then((text) => window.dispatchEvent(new CustomEvent('mint-translation', { detail: text })))
|
|
1636
|
-
.catch((reason) => {
|
|
1637
|
-
window.dispatchEvent(new CustomEvent('mint-translation', { detail: String(reason) }))
|
|
1638
|
-
})
|
|
1639
|
-
}
|
|
1640
|
-
translate()
|
|
1641
|
-
translationTimer = setInterval(translate, 3000)
|
|
1642
|
-
|
|
1643
|
-
// Clean up helper attached to window if needed
|
|
1644
|
-
if ((window as any)._stopTranslate) (window as any)._stopTranslate()
|
|
1645
|
-
;(window as any)._stopTranslate = () => {
|
|
1646
|
-
if (translationTimer) clearInterval(translationTimer)
|
|
1647
|
-
}
|
|
1610
|
+
const config = await invoke<Record<string, unknown>>('get_config')
|
|
1611
|
+
await invoke('update_config', { config: { ...config, showDesktopWidget: visible } })
|
|
1648
1612
|
},
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
}
|
|
1653
|
-
},
|
|
1654
|
-
onTranslationResult: (callback) => {
|
|
1655
|
-
window.addEventListener('mint-translation', ((event: CustomEvent<string>) => {
|
|
1656
|
-
callback(event.detail)
|
|
1657
|
-
}) as EventListener)
|
|
1613
|
+
startDragging: async () => {
|
|
1614
|
+
const { getCurrentWindow } = await import('@tauri-apps/api/window')
|
|
1615
|
+
await getCurrentWindow().startDragging()
|
|
1658
1616
|
},
|
|
1617
|
+
}
|
|
1618
|
+
|
|
1619
|
+
window.screenPickerApi = {
|
|
1659
1620
|
closePicker: async () => {
|
|
1660
1621
|
const { invoke } = await import('@tauri-apps/api/core')
|
|
1661
1622
|
const { getCurrentWindow } = await import('@tauri-apps/api/window')
|
|
1662
1623
|
return invoke('close_desktop_window', { label: getCurrentWindow().label })
|
|
1663
1624
|
},
|
|
1664
|
-
setOverlayInteractable: () => {},
|
|
1665
1625
|
}
|
|
1666
1626
|
|
|
1667
1627
|
window.api = {
|
|
@@ -1708,23 +1668,7 @@ export function installTauriAdapters() {
|
|
|
1708
1668
|
onSettingsChanged: settingsChanged,
|
|
1709
1669
|
startVision: async () => {
|
|
1710
1670
|
const { invoke } = await import('@tauri-apps/api/core')
|
|
1711
|
-
|
|
1712
|
-
const image = await captureSharedScreen()
|
|
1713
|
-
window.localStorage.setItem('mint:pending-screen-capture', image)
|
|
1714
|
-
} catch (reason) {
|
|
1715
|
-
console.warn('Screen share capture failed before opening picker:', reason)
|
|
1716
|
-
const image = await invoke<string>('capture_silent_screen')
|
|
1717
|
-
window.localStorage.setItem('mint:pending-screen-capture', image)
|
|
1718
|
-
}
|
|
1719
|
-
return invoke('start_screen_capture')
|
|
1720
|
-
},
|
|
1721
|
-
onVisionReady: async (callback) => {
|
|
1722
|
-
const { listen } = await import('@tauri-apps/api/event')
|
|
1723
|
-
return listen<string>('vision-ready', (event) => callback(event.payload))
|
|
1724
|
-
},
|
|
1725
|
-
captureSilentScreen: async () => {
|
|
1726
|
-
const { invoke } = await import('@tauri-apps/api/core')
|
|
1727
|
-
return invoke('capture_silent_screen')
|
|
1671
|
+
return invoke('start_live_translate')
|
|
1728
1672
|
},
|
|
1729
1673
|
getSmartContext: async () => {
|
|
1730
1674
|
const { invoke } = await import('@tauri-apps/api/core')
|
|
@@ -1752,19 +1696,10 @@ export function installTauriAdapters() {
|
|
|
1752
1696
|
const { listen } = await import('@tauri-apps/api/event')
|
|
1753
1697
|
return listen<string>('spotlight-to-chat', (event) => callback(event.payload))
|
|
1754
1698
|
},
|
|
1755
|
-
notifyAiResponse: async (preview) => {
|
|
1756
|
-
const {
|
|
1757
|
-
|
|
1758
|
-
if (!granted) {
|
|
1759
|
-
granted = (await requestPermission()) === 'granted'
|
|
1760
|
-
}
|
|
1761
|
-
if (granted) {
|
|
1762
|
-
sendNotification({ title: 'Mint Agent', body: preview })
|
|
1763
|
-
}
|
|
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 })
|
|
1764
1702
|
},
|
|
1765
|
-
// The plugin has no reliable cross-platform way to dismiss an
|
|
1766
|
-
// already-shown OS notification from JS — best-effort no-op; there's
|
|
1767
|
-
// simply nothing stale left for the next unfocused reply to build on.
|
|
1768
1703
|
clearAiNotifications: () => {},
|
|
1769
1704
|
getTtsUrls: async (text) => {
|
|
1770
1705
|
const { invoke } = await import('@tauri-apps/api/core')
|
|
@@ -1777,46 +1712,6 @@ export function installTauriAdapters() {
|
|
|
1777
1712
|
}
|
|
1778
1713
|
}
|
|
1779
1714
|
|
|
1780
|
-
async function captureSharedScreen(): Promise<string> {
|
|
1781
|
-
// On Linux (especially under Wayland/WebKitGTK), getDisplayMedia often returns a black screen
|
|
1782
|
-
// or fails silently. Bypass it to force fallback to native screenshot commands.
|
|
1783
|
-
if (navigator.userAgent.toLowerCase().includes('linux')) {
|
|
1784
|
-
throw new Error('Linux detected, bypassing getDisplayMedia to use native screenshot tools')
|
|
1785
|
-
}
|
|
1786
|
-
|
|
1787
|
-
if (!navigator.mediaDevices?.getDisplayMedia) {
|
|
1788
|
-
throw new Error('getDisplayMedia is not available')
|
|
1789
|
-
}
|
|
1790
|
-
|
|
1791
|
-
const stream = await navigator.mediaDevices.getDisplayMedia({
|
|
1792
|
-
video: true,
|
|
1793
|
-
audio: false,
|
|
1794
|
-
})
|
|
1795
|
-
try {
|
|
1796
|
-
const video = document.createElement('video')
|
|
1797
|
-
video.srcObject = stream
|
|
1798
|
-
video.muted = true
|
|
1799
|
-
await video.play()
|
|
1800
|
-
await new Promise<void>((resolve) => {
|
|
1801
|
-
if (video.videoWidth > 0 && video.videoHeight > 0) {
|
|
1802
|
-
resolve()
|
|
1803
|
-
} else {
|
|
1804
|
-
video.onloadedmetadata = () => resolve()
|
|
1805
|
-
}
|
|
1806
|
-
})
|
|
1807
|
-
|
|
1808
|
-
const canvas = document.createElement('canvas')
|
|
1809
|
-
canvas.width = video.videoWidth || window.screen.width
|
|
1810
|
-
canvas.height = video.videoHeight || window.screen.height
|
|
1811
|
-
const context = canvas.getContext('2d')
|
|
1812
|
-
if (!context) throw new Error('Unable to create screen capture canvas')
|
|
1813
|
-
context.drawImage(video, 0, 0, canvas.width, canvas.height)
|
|
1814
|
-
return canvas.toDataURL('image/png')
|
|
1815
|
-
} finally {
|
|
1816
|
-
stream.getTracks().forEach((track) => track.stop())
|
|
1817
|
-
}
|
|
1818
|
-
}
|
|
1819
|
-
|
|
1820
1715
|
export async function readClipboardImage(): Promise<string | null> {
|
|
1821
1716
|
if (typeof window === 'undefined' || !(window as any).__TAURI_INTERNALS__) {
|
|
1822
1717
|
return null
|
|
@@ -2242,8 +2137,28 @@ export const readWorkspaceFile = async (path: string, workspacePath?: string): P
|
|
|
2242
2137
|
return invoke('read_workspace_file', { path, workspacePath })
|
|
2243
2138
|
}
|
|
2244
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
|
+
|
|
2245
2155
|
// Enforce compile-time check against the shared platform interface
|
|
2246
2156
|
const _apiCheck: MintPlatformApi = {
|
|
2157
|
+
listLibrary, getLibraryItem, setLibraryTrashed, removeLibraryItem, readLibraryFile,
|
|
2158
|
+
getConversationSources, saveSourceAttachments,
|
|
2159
|
+
modsOperation,
|
|
2160
|
+
readMcpArtifact,
|
|
2161
|
+
listBackgroundJobs, getBackgroundJob, stopBackgroundJob, deleteBackgroundJob,
|
|
2247
2162
|
runSlashCommand,
|
|
2248
2163
|
authRegister,
|
|
2249
2164
|
authLogin,
|
|
@@ -2258,9 +2173,12 @@ const _apiCheck: MintPlatformApi = {
|
|
|
2258
2173
|
getTtsUrls,
|
|
2259
2174
|
cancelChatMessage,
|
|
2260
2175
|
getRecentInteractions,
|
|
2176
|
+
getConversationSnapshot,
|
|
2177
|
+
getConversationChanges,
|
|
2261
2178
|
saveSystemInteraction,
|
|
2262
2179
|
saveInteractionAgentActivity,
|
|
2263
2180
|
listChatSessions,
|
|
2181
|
+
updateChatSessionWorkspace,
|
|
2264
2182
|
deleteChatSession,
|
|
2265
2183
|
renameChatSession,
|
|
2266
2184
|
getProfileValue,
|
|
@@ -2277,10 +2195,20 @@ const _apiCheck: MintPlatformApi = {
|
|
|
2277
2195
|
generateImages,
|
|
2278
2196
|
getImageGenProviders,
|
|
2279
2197
|
setDefaultImageProvider,
|
|
2280
|
-
|
|
2198
|
+
getWorkspaceSnapshot,
|
|
2199
|
+
getWorkspaceGitDiff,
|
|
2200
|
+
getGitBranchInfo,
|
|
2201
|
+
switchGitBranch,
|
|
2202
|
+
createGitBranch,
|
|
2203
|
+
checkoutRemoteGitBranch,
|
|
2204
|
+
getGitGraph,
|
|
2281
2205
|
createWorkspaceFile,
|
|
2282
2206
|
createWorkspaceFolder,
|
|
2283
2207
|
deleteWorkspaceItem,
|
|
2208
|
+
moveWorkspaceItem,
|
|
2209
|
+
listWorkspaceHistory,
|
|
2210
|
+
startHtmlPreview,
|
|
2211
|
+
undoWorkspaceAction,
|
|
2284
2212
|
selectWorkspaceDirectory,
|
|
2285
2213
|
selectLinkedFolderPath,
|
|
2286
2214
|
submitToolApproval,
|
|
@@ -2294,3 +2222,38 @@ const _apiCheck: MintPlatformApi = {
|
|
|
2294
2222
|
readWorkspaceFile,
|
|
2295
2223
|
testMcpConnection,
|
|
2296
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
|
+
}
|