@pheem49/mint 1.14.0 → 1.15.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/CLAUDE.md +1 -1
- package/Cargo.lock +291 -11
- package/Cargo.toml +1 -1
- package/README.md +71 -9
- package/ROADMAP.md +30 -0
- package/Release_Note.md +579 -465
- package/crates/mint-cli/Cargo.toml +3 -1
- package/crates/mint-cli/src/agent/approval_prompts.rs +16 -3
- package/crates/mint-cli/src/agent/live_status.rs +367 -118
- package/crates/mint-cli/src/agent/markdown_render.rs +601 -61
- package/crates/mint-cli/src/agent.rs +452 -215
- package/crates/mint-cli/src/commands/agent.rs +16 -21
- 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 +28 -0
- package/crates/mint-cli/src/commands/knowledge.rs +1 -0
- package/crates/mint-cli/src/commands/mod.rs +37 -2
- package/crates/mint-cli/src/commands/tailnet_web.rs +235 -0
- package/crates/mint-cli/src/image.rs +26 -3
- package/crates/mint-cli/src/interactive/chat_tui.rs +4742 -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 +38 -2
- 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 +868 -450
- package/crates/mint-cli/src/interactive/thought_viewer.rs +286 -0
- package/crates/mint-cli/src/interactive.rs +400 -136
- package/crates/mint-cli/src/main.rs +84 -23
- package/crates/mint-cli/src/markdown.rs +12 -5
- package/crates/mint-cli/src/onboard.rs +32 -30
- 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 +187 -0
- package/crates/mint-cli/src/updater.rs +56 -21
- package/crates/mint-core/src/agent/agent_loop.rs +1 -0
- package/crates/mint-core/src/agent/chat.rs +843 -177
- package/crates/mint-core/src/agent/code_tools.rs +83 -2
- package/crates/mint-core/src/agent/memory.rs +658 -20
- package/crates/mint-core/src/agent/skills.rs +1 -1
- package/crates/mint-core/src/api_server/routes/chat.rs +31 -5
- package/crates/mint-core/src/api_server/routes/linked_folders.rs +118 -3
- package/crates/mint-core/src/api_server/routes/misc.rs +10 -14
- package/crates/mint-core/src/api_server/routes/sessions.rs +44 -0
- package/crates/mint-core/src/api_server.rs +22 -3
- package/crates/mint-core/src/avatar_bridge.rs +2 -0
- 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 +1558 -0
- 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 +1 -0
- package/crates/mint-core/src/lib.rs +22 -14
- 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 +12 -1
- package/crates/mint-core/src/media/mic_transcribe.rs +1 -0
- package/crates/mint-core/src/media/subtitle.rs +1 -0
- package/crates/mint-core/src/orchestration/context_render.rs +1 -0
- package/crates/mint-core/src/orchestration/memory_skill.rs +6 -1
- package/crates/mint-core/src/orchestration/mod.rs +1024 -271
- package/crates/mint-core/src/orchestration/tools/browser.rs +16 -139
- package/crates/mint-core/src/orchestration/tools/misc.rs +2 -1
- package/crates/mint-core/src/orchestration/tools/web.rs +1 -1
- package/crates/mint-core/src/prompts/agent.rs +58 -29
- 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 +93 -25
- package/crates/mint-core/src/search/linked_folders/index.rs +732 -0
- package/crates/mint-core/src/search/linked_folders.rs +391 -130
- package/crates/mint-core/src/slash/mod.rs +470 -22
- 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/system/config.rs +230 -0
- package/crates/mint-core/src/system/workspace.rs +228 -0
- package/crates/mint-core/src/system.rs +1 -0
- package/crates/mint-core/tests/memory_persistence.rs +39 -0
- package/mint-presentation-demo.mp4 +0 -0
- package/out/web/assets/CliSessionsView-BxUVWEEL.js +1 -0
- package/out/web/assets/CliSessionsView-CBDTXuQv.css +1 -0
- package/out/web/assets/CodeReviewPage-DkMgfcos.css +1 -0
- package/out/web/assets/CodeReviewPage-jKlmLJwT.js +3 -0
- package/out/web/assets/CommandPalette-DnwPA5hy.js +1 -0
- package/out/web/assets/ImageStudioPanel-BR1XFwhR.js +1 -0
- package/out/web/assets/ImageStudioPanel-D0lnhQV5.css +1 -0
- package/out/web/assets/LinkedFoldersView-bi-CWQ-I.js +1 -0
- package/out/web/assets/McpRegistryPicker-D5tEFnyq.js +1 -0
- package/out/web/assets/McpServersView-BGG1dhFM.js +1 -0
- package/out/web/assets/MintDashboard-BIglDEWX.js +20 -0
- package/out/web/assets/MintDashboard-DSMywSgs.css +1 -0
- package/out/web/assets/ModelPanel-CbJ1PFoZ.js +1 -0
- package/out/web/assets/PicturesLibrary-CQP0fLP1.css +1 -0
- package/out/web/assets/PicturesLibrary-DoYN7T1p.js +1 -0
- package/out/web/assets/PluginsView-CU1HWXGk.js +1 -0
- package/out/web/assets/ScheduledTasksView-Bnl36y2N.js +1 -0
- package/out/web/assets/SettingsWindow-DhWLAn9T.css +1 -0
- package/out/web/assets/SettingsWindow-Dw8L01pw.js +2 -0
- package/out/web/assets/SkillsView-cnl8aY5p.js +2 -0
- package/out/web/assets/ToolSurfacePage-CgsQw6l5.css +1 -0
- package/out/web/assets/ToolSurfacePage-Cz2VJAPZ.js +37 -0
- package/out/web/assets/VeoStudioPanel-D4JnERWR.js +4 -0
- package/out/web/assets/VeoStudioPanel-DOj7_WR3.css +1 -0
- package/out/web/assets/WorkspacePanel-CbJ1PFoZ.js +1 -0
- package/out/web/assets/{abnfDiagram-VCTEODGH-DAOBA7ZG.js → abnfDiagram-VCTEODGH-ByMyfanq.js} +1 -1
- package/out/web/assets/{architecture-7GRP2DOG-CgSwQOPQ.js → architecture-7GRP2DOG-CLq2kEOB.js} +1 -1
- package/out/web/assets/{architectureDiagram-5GKGNRK7-CYp3yupP.js → architectureDiagram-5GKGNRK7-6PoVSmNG.js} +1 -1
- package/out/web/assets/{blockDiagram-NRAW4CY4-CyWybDWr.js → blockDiagram-NRAW4CY4-cKw9mAKi.js} +1 -1
- package/out/web/assets/{c4Diagram-UCG6FXSJ-BvY3U709.js → c4Diagram-UCG6FXSJ-Cqy8N5Ge.js} +1 -1
- package/out/web/assets/{chunk-75Z2AOVW-TLXCoZYv.js → chunk-75Z2AOVW-3qybijF5.js} +1 -1
- package/out/web/assets/chunk-CKBBP62Z-cIrXq6jN.js +2 -0
- package/out/web/assets/{chunk-CLGD4ZFX-xjsKtNS7.js → chunk-CLGD4ZFX-CndDQkww.js} +1 -1
- package/out/web/assets/chunk-DSNCTWBM-Cc4NxvgD.js +2 -0
- package/out/web/assets/chunk-DU6HZSFF-drzh6GsU.js +128 -0
- package/out/web/assets/{chunk-F27PBJKO-BFpgF55A.js → chunk-F27PBJKO-FiY35l4v.js} +1 -1
- package/out/web/assets/{chunk-G27WJ6UU-DfF7qW-C.js → chunk-G27WJ6UU-Bjt9Il4A.js} +1 -1
- package/out/web/assets/{chunk-GMAD6QVW-C-558kh_.js → chunk-GMAD6QVW-Bppi3Ctd.js} +1 -1
- package/out/web/assets/{chunk-JQ64N6SF-wJmeGKAw.js → chunk-JQ64N6SF-DGg5kcEV.js} +1 -1
- package/out/web/assets/{chunk-LCL6LL3I-C1wHD8Ie.js → chunk-LCL6LL3I-CCYcjd7p.js} +1 -1
- package/out/web/assets/{chunk-OBVCFTLP-BsRTPBqs.js → chunk-OBVCFTLP-DJeNil5M.js} +1 -1
- package/out/web/assets/{chunk-P2QGCYS3-HZIiM7Ni.js → chunk-P2QGCYS3-lRzkRjBB.js} +1 -1
- package/out/web/assets/{chunk-POPQ4Y6H-Dk9wvVb0.js → chunk-POPQ4Y6H-DouASMBW.js} +1 -1
- package/out/web/assets/{chunk-PWAF6VOD-BmjYLNbq.js → chunk-PWAF6VOD-DMmD1vVf.js} +1 -1
- package/out/web/assets/{chunk-R7TYR2AO-CaHIf-lK.js → chunk-R7TYR2AO-CYLA5UC5.js} +1 -1
- package/out/web/assets/{chunk-RHFEMEQ7-_T561hOU.js → chunk-RHFEMEQ7-BiXwEcUT.js} +1 -1
- package/out/web/assets/{chunk-SVP7TREG-CM-GGYoY.js → chunk-SVP7TREG-BV-zPslF.js} +1 -1
- package/out/web/assets/{chunk-TEH6E4GO-K2A8Vg2C.js → chunk-TEH6E4GO-B2RGEohZ.js} +1 -1
- package/out/web/assets/classDiagram-DTDB5LWJ-Dq0smRWk.js +1 -0
- package/out/web/assets/classDiagram-v2-JRS7N3AN-Dq0smRWk.js +1 -0
- package/out/web/assets/config-C-ZFtipU.css +1 -0
- package/out/web/assets/config-eEDngJXO.js +1 -0
- package/out/web/assets/core-hQ2VA9Ti.js +1 -0
- package/out/web/assets/{cynefin-OW5HDTMX-ClzaB6cc.js → cynefin-OW5HDTMX-Cas4csHM.js} +1 -1
- package/out/web/assets/{cynefinDiagram-5FMLGOSQ-D_JzZBzf.js → cynefinDiagram-5FMLGOSQ-Bbpj66Y3.js} +1 -1
- package/out/web/assets/{dagre-3AP2YEHR-BDuUeMHj.js → dagre-3AP2YEHR-B0-2RDEd.js} +1 -1
- package/out/web/assets/{diagram-S7CK7UJ4-DgtcfE8P.js → diagram-S7CK7UJ4-BdzEjUyH.js} +1 -1
- package/out/web/assets/{diagram-UQ7AKVKN-DTLoEYti.js → diagram-UQ7AKVKN-CJDwyPxF.js} +1 -1
- package/out/web/assets/{diagram-VSXAHHWV-ChGl9pXz.js → diagram-VSXAHHWV-BxaG1r_B.js} +1 -1
- package/out/web/assets/{diagram-VX7I27RA-Be8DWz0S.js → diagram-VX7I27RA-BMmUqm8f.js} +1 -1
- package/out/web/assets/{diagram-Z3DM3KII-BMXjRTOF.js → diagram-Z3DM3KII-CFtd03eE.js} +1 -1
- package/out/web/assets/dist-js-Bf2bhoku.js +1 -0
- package/out/web/assets/{ebnfDiagram-PWID7BFC-8Q9pl1CJ.js → ebnfDiagram-PWID7BFC-DwAen1hO.js} +1 -1
- package/out/web/assets/{erDiagram-SSCWMZ5O-DjH8Lnkn.js → erDiagram-SSCWMZ5O-BCZSHACj.js} +1 -1
- package/out/web/assets/event-ChBVpRy0.js +1 -0
- package/out/web/assets/{eventmodeling-NTZA5JFV-BKUH_DOp.js → eventmodeling-NTZA5JFV-XHStE4E_.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-BLg7nEcd.js +1 -0
- package/out/web/assets/{ganttDiagram-EL5Y4UJY-D7fZKJNM.js → ganttDiagram-EL5Y4UJY-BAEu1Cql.js} +1 -1
- package/out/web/assets/{gitGraph-4MIJSDKK-BypWaaBU.js → gitGraph-4MIJSDKK-r32Vyper.js} +1 -1
- package/out/web/assets/{gitGraphDiagram-WWUBYQGX-DWiw_3bq.js → gitGraphDiagram-WWUBYQGX-z9o9qt6V.js} +1 -1
- package/out/web/assets/index-Btsf4L8M.css +1 -0
- package/out/web/assets/index-D8D9MeRA.js +11 -0
- package/out/web/assets/{info-A6RAGUB7-KkAUxT4j.js → info-A6RAGUB7-BvLaC2cw.js} +1 -1
- package/out/web/assets/{infoDiagram-RXCK75RN-BNb6E48y.js → infoDiagram-RXCK75RN-Be6WAXXw.js} +1 -1
- package/out/web/assets/{ishikawaDiagram-5VMMS53U-Caa-JoAK.js → ishikawaDiagram-5VMMS53U-DZjoHJHC.js} +1 -1
- package/out/web/assets/{journeyDiagram-EYS64GPL-DOrmFGz6.js → journeyDiagram-EYS64GPL-CtVkjkGm.js} +1 -1
- package/out/web/assets/{kanban-definition-3QL26DDD-BOWCYcK0.js → kanban-definition-3QL26DDD-CW5FMv1w.js} +1 -1
- package/out/web/assets/lucide-react-Ip3L6Jtn.js +1 -0
- package/out/web/assets/markdown-BSeeUbJH.js +38 -0
- package/out/web/assets/{mermaid-parser.core-BQqjCkS_.js → mermaid-parser.core-aUgCqsZ5.js} +3 -3
- package/out/web/assets/mermaid.core-D57sEiSL.js +11 -0
- package/out/web/assets/{mindmap-definition-FBJOCRG2-jTceWpr0.js → mindmap-definition-FBJOCRG2-DAmSpM3a.js} +1 -1
- package/out/web/assets/modelManager-tMVmJVAW.js +2 -0
- package/out/web/assets/oauthManager-9jxicDWJ.js +1 -0
- package/out/web/assets/{packet-AYTQ26CC-CJ5RXgol.js → packet-AYTQ26CC-DJ27iIoJ.js} +1 -1
- package/out/web/assets/{pegDiagram-XKGWAZYB-y8wMtd0y.js → pegDiagram-XKGWAZYB-Bj3ii-gS.js} +1 -1
- package/out/web/assets/{pie-WAS4IAKB-72fTBbl4.js → pie-WAS4IAKB-DG5mCUbc.js} +1 -1
- package/out/web/assets/{pieDiagram-E7YTZNPT-e0O02qWq.js → pieDiagram-E7YTZNPT-BrJLPnDA.js} +1 -1
- package/out/web/assets/prompt-latin-700-normal-BfbftDSq.woff +0 -0
- package/out/web/assets/prompt-latin-700-normal-I2gc831J.woff2 +0 -0
- package/out/web/assets/prompt-thai-700-normal-Cb5ilR-c.woff +0 -0
- package/out/web/assets/prompt-thai-700-normal-Cg4aQ0Nn.woff2 +0 -0
- package/out/web/assets/{quadrantDiagram-AXDQQJYC-C9phYLom.js → quadrantDiagram-AXDQQJYC-3x_TmF3j.js} +1 -1
- package/out/web/assets/{radar-RG4KPBEZ-BAU2hzUT.js → radar-RG4KPBEZ-CrXaTTuV.js} +1 -1
- package/out/web/assets/{railroad-74A4TZTK-B0bCAVHC.js → railroad-74A4TZTK-BpqMH9BE.js} +1 -1
- package/out/web/assets/{railroad-abnf-HS5TGJTU-WhxO7ndE.js → railroad-abnf-HS5TGJTU-DHI0uLlV.js} +1 -1
- package/out/web/assets/{railroad-ebnf-LZEXJU2U-BkA0m7-F.js → railroad-ebnf-LZEXJU2U-CQCb316y.js} +1 -1
- package/out/web/assets/{railroad-peg-WCYAUIDC-BsVpHIaj.js → railroad-peg-WCYAUIDC-Ph1giKkH.js} +1 -1
- package/out/web/assets/{railroadDiagram-O6MQD6OU-CyOLN65Q.js → railroadDiagram-O6MQD6OU-BRq6wIxx.js} +1 -1
- package/out/web/assets/{requirementDiagram-EFPCY7ZU-DQXJ7Dud.js → requirementDiagram-EFPCY7ZU-DIJj6G1g.js} +1 -1
- package/out/web/assets/{sankeyDiagram-P5KCCOFB-B2XLyIIc.js → sankeyDiagram-P5KCCOFB-DZajSryq.js} +1 -1
- package/out/web/assets/{sequenceDiagram-WJ2MYXX4-DGQY4wwm.js → sequenceDiagram-WJ2MYXX4-DxJCWyZS.js} +1 -1
- package/out/web/assets/{stateDiagram-HBIQ2CUA-DHZpDwNy.js → stateDiagram-HBIQ2CUA-k6voi8Vf.js} +1 -1
- package/out/web/assets/stateDiagram-v2-4QOOHH4V-DeEc0lGZ.js +1 -0
- package/out/web/assets/studio-B1mk40wD.js +1 -0
- package/out/web/assets/{swimlanes-XN3QIQJK-Bn_jcZz-.js → swimlanes-XN3QIQJK-igYhTjXB.js} +1 -1
- package/out/web/assets/swimlanesDiagram-VK2B7HYN-DpVik9v7.js +8 -0
- package/out/web/assets/{timeline-definition-24CTP7MA-CdTERuJZ.js → timeline-definition-24CTP7MA-Dke2p93p.js} +1 -1
- package/out/web/assets/{treeView-Q6P3EWNA-TKBKQG6R.js → treeView-Q6P3EWNA-hNELnXUs.js} +1 -1
- package/out/web/assets/{treemap-WGGIJYW6-BP7gQoiC.js → treemap-WGGIJYW6-D2B6wDsx.js} +1 -1
- package/out/web/assets/{vennDiagram-4TSXK5OY-BHUmxDuK.js → vennDiagram-4TSXK5OY-CDkW7rUP.js} +1 -1
- package/out/web/assets/{wardley-WFR3VGLG-9bct5AAN.js → wardley-WFR3VGLG-BECdXETi.js} +1 -1
- package/out/web/assets/{wardleyDiagram-VM6X3IG4-BfJwDDso.js → wardleyDiagram-VM6X3IG4-B5BycpQ4.js} +1 -1
- package/out/web/assets/window-5qYXKoW7.js +1 -0
- package/out/web/assets/{xychartDiagram-S5SC5T6Z-Dqd9Mvpo.js → xychartDiagram-S5SC5T6Z-CtJS3b--.js} +1 -1
- package/out/web/index-web.html +3 -4
- package/out/web/index.html +3 -4
- package/package.json +17 -6
- package/skills-lock.json +36 -0
- package/slash-commands.json +9 -0
- package/src/renderer/index-web.html +1 -0
- package/src/renderer/index.html +1 -0
- package/src/renderer/node_modules/.vite/vitest/da39a3ee5e6b4b0d3255bfef95601890afd80709/results.json +1 -0
- package/src/renderer/shared/agentProgress.ts +168 -3
- package/src/renderer/shared/components/AgentActivityDrawer.tsx +6 -6
- package/src/renderer/shared/components/AgentActivityTable.tsx +192 -132
- package/src/renderer/shared/components/ArtifactPreviewPanel.tsx +4 -4
- package/src/renderer/shared/components/AuthGate.tsx +4 -9
- package/src/renderer/shared/components/CalculationCard.tsx +41 -15
- package/src/renderer/shared/components/ChatMessageItem.tsx +20 -21
- package/src/renderer/shared/components/ChatPanel.tsx +432 -193
- package/src/renderer/shared/components/ChunkErrorBoundary.tsx +198 -49
- package/src/renderer/shared/components/CliSessionsView.tsx +495 -0
- package/src/renderer/shared/components/CodeReviewPage.tsx +565 -0
- package/src/renderer/shared/components/CommandPalette.tsx +8 -8
- package/src/renderer/shared/components/DashboardSidebar.tsx +862 -125
- package/src/renderer/shared/components/DesktopTitlebar.tsx +345 -0
- package/src/renderer/shared/components/DiffReviewModal.tsx +3 -3
- package/src/renderer/shared/components/GitBranchSelector.tsx +442 -0
- package/src/renderer/shared/components/ImageGenCard.tsx +31 -12
- package/src/renderer/shared/components/ImageSearchCard.tsx +59 -38
- package/src/renderer/shared/components/ImageStudioPanel.tsx +40 -41
- package/src/renderer/shared/components/InlineThoughtNote.tsx +27 -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 +24 -22
- package/src/renderer/shared/components/MermaidCard.tsx +14 -8
- package/src/renderer/shared/components/MintDashboard.tsx +1141 -508
- package/src/renderer/shared/components/ModelSelectorPopover.tsx +535 -214
- package/src/renderer/shared/components/PlanChecklistWidget.tsx +1 -1
- package/src/renderer/shared/components/PluginsView.tsx +1 -1
- package/src/renderer/shared/components/RewindModal.tsx +6 -6
- package/src/renderer/shared/components/RunSummaryDashboard.tsx +3 -3
- package/src/renderer/shared/components/ScheduledTasksView.tsx +4 -4
- package/src/renderer/shared/components/ScreenCaptureDialog.css +221 -0
- package/src/renderer/shared/components/ScreenCaptureDialog.tsx +199 -0
- package/src/renderer/shared/components/Settings/AgentsTab.tsx +34 -39
- package/src/renderer/shared/components/Settings/AudioTab.tsx +8 -8
- package/src/renderer/shared/components/Settings/AutomationTab.tsx +8 -58
- package/src/renderer/shared/components/Settings/AvatarCropModal.tsx +368 -0
- package/src/renderer/shared/components/Settings/GeneralTab.tsx +335 -81
- package/src/renderer/shared/components/Settings/MemoryTab.tsx +3 -3
- 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 +401 -158
- package/src/renderer/shared/components/SkillsView.tsx +41 -16
- package/src/renderer/shared/components/SlashSuggestions.tsx +3 -2
- package/src/renderer/shared/components/SourcesBlock.tsx +44 -32
- 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.tsx +520 -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 +13 -29
- package/src/renderer/shared/components/WeatherCard.tsx +3 -3
- package/src/renderer/shared/components/WorkspaceContextPopover.tsx +133 -0
- package/src/renderer/shared/components/WorkspaceSelector.tsx +149 -0
- package/src/renderer/shared/constants/config.ts +28 -3
- package/src/renderer/shared/constants/models.ts +189 -2
- package/src/renderer/shared/conversation/coordinator.test.ts +27 -0
- package/src/renderer/shared/conversation/coordinator.ts +82 -0
- package/src/renderer/shared/conversation/syncView.test.ts +46 -0
- package/src/renderer/shared/conversation/syncView.ts +43 -0
- package/src/renderer/shared/conversation/useConversationCoordinator.ts +106 -0
- package/src/renderer/shared/css/agent-observability.css +35 -3
- package/src/renderer/shared/css/auth-gate.css +2 -2
- package/src/renderer/shared/css/chat-ui-cards.css +495 -0
- package/src/renderer/shared/css/code-review.css +823 -0
- package/src/renderer/shared/css/code-sessions.css +452 -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/management-views.css +277 -27
- package/src/renderer/shared/css/model-selector.css +442 -42
- 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/plugins.css +5 -5
- package/src/renderer/shared/css/settings/profile.css +331 -1
- package/src/renderer/shared/css/settings/theme.css +651 -3
- package/src/renderer/shared/css/veo-studio.css +16 -15
- package/src/renderer/shared/fonts.ts +19 -37
- package/src/renderer/shared/platform.test.ts +34 -0
- package/src/renderer/shared/platform.ts +173 -6
- package/src/renderer/shared/theme/themeManager.ts +144 -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 +82 -1
- package/src/renderer/shared/utils/agentActivity.ts +126 -5
- package/src/renderer/shared/utils/cardJson.test.ts +35 -0
- package/src/renderer/shared/utils/cardJson.ts +30 -0
- package/src/renderer/shared/utils/fileIcons.ts +1 -1
- package/src/renderer/shared/utils/markdown.tsx +329 -80
- package/src/renderer/shared/utils/markdown.webImages.test.tsx +40 -0
- package/src/renderer/shared/utils/providers.ts +8 -3
- package/src/renderer/shared/utils/screenCapture.ts +43 -0
- package/src/renderer/shared/utils/slashCommandProcessor.ts +4 -1
- package/src/renderer/shared/utils/ui.ts +4 -64
- package/src/renderer/src/App.tsx +7 -0
- package/src/renderer/src/components/BrowserShell.tsx +108 -0
- package/src/renderer/src/components/BrowserSuggestionsPopup.tsx +91 -0
- package/src/renderer/src/components/Live2DStage.tsx +32 -9
- package/src/renderer/src/components/MintDashboard.tsx +4 -2
- package/src/renderer/src/components/ModelPanel.tsx +2 -1
- package/src/renderer/src/components/PicturesLibrary.tsx +3 -2
- package/src/renderer/src/components/ScreenPicker.css +190 -0
- package/src/renderer/src/components/ScreenPicker.tsx +185 -540
- package/src/renderer/src/components/SettingsWindow.tsx +40 -2
- 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 +61 -43
- 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 +23 -0
- package/src/renderer/src/components/liveTranslateFrames.ts +34 -0
- package/src/renderer/src/css/app-shell.css +394 -113
- package/src/renderer/src/css/chat.css +1926 -380
- package/src/renderer/src/css/dashboard.css +11 -0
- package/src/renderer/src/css/desktop-tools.css +730 -0
- package/src/renderer/src/css/misc.css +19 -22
- package/src/renderer/src/css/model.css +49 -48
- package/src/renderer/src/css/pictures.css +144 -136
- package/src/renderer/src/css/settings/base.css +357 -123
- package/src/renderer/src/css/sidebar-workspace.css +930 -291
- package/src/renderer/src/css/spotlight.css +15 -26
- package/src/renderer/src/css/tool-surfaces.css +728 -0
- package/src/renderer/src/css/widget.css +35 -7
- package/src/renderer/src/env.d.ts +3 -0
- package/src/renderer/src/hooks/useProviderModels.ts +2 -9
- package/src/renderer/src/index.css +53 -46
- package/src/renderer/src/main.tsx +11 -0
- package/src/renderer/src/tauri.ts +201 -30
- 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 +3 -2
- package/src/renderer/src-web/components/PullToRefresh.tsx +107 -0
- package/src/renderer/src-web/components/SettingsWindow.tsx +28 -2
- package/src/renderer/src-web/css/app-shell.css +174 -96
- package/src/renderer/src-web/css/chat.css +1519 -316
- package/src/renderer/src-web/css/dashboard.css +11 -0
- package/src/renderer/src-web/css/misc.css +17 -17
- package/src/renderer/src-web/css/mobile.css +678 -0
- package/src/renderer/src-web/css/model.css +46 -46
- package/src/renderer/src-web/css/pictures.css +81 -34
- package/src/renderer/src-web/css/pull-to-refresh.css +54 -0
- package/src/renderer/src-web/css/settings/base.css +316 -100
- package/src/renderer/src-web/css/settings/mobile.css +320 -0
- package/src/renderer/src-web/css/sidebar-workspace.css +545 -100
- package/src/renderer/src-web/css/spotlight.css +9 -26
- package/src/renderer/src-web/css/widget.css +0 -5
- package/src/renderer/src-web/env.d.ts +3 -0
- 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 +11 -0
- package/src/renderer/src-web/tauri.ts +200 -30
- package/vite.config.web.ts +1 -0
- 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-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-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
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{n as e}from"./chunk-CacB07dV.js";import{n as t,r as n}from"./chunk-Y2CYZVJY-C9o-s6OY.js";import{zt as r}from"./src-DnfeXQPr.js";import{j as i}from"./chunk-DU6HZSFF-2tv5K1wT.js";import{n as a}from"./chunk-PWAF6VOD-BmjYLNbq.js";import{d as o}from"./chunk-75Z2AOVW-TLXCoZYv.js";import{i as s}from"./chunk-GMAD6QVW-C-558kh_.js";import{n as c}from"./chunk-P2QGCYS3-HZIiM7Ni.js";import{r as l}from"./chunk-TEH6E4GO-K2A8Vg2C.js";import{r as u}from"./chunk-OBVCFTLP-BsRTPBqs.js";import{i as d}from"./chunk-R7TYR2AO-CaHIf-lK.js";import{l as f}from"./chunk-F27PBJKO-BFpgF55A.js";import{n as p}from"./chunk-XXDRQBXY-DnJkbUaw.js";import{t as m}from"./chunk-POPQ4Y6H-Dk9wvVb0.js";import{n as h}from"./chunk-JQ64N6SF-wJmeGKAw.js";import{n as g}from"./chunk-CKBBP62Z-nr1uKPj9.js";import{a as _,i as v,n as y,r as b,t as x}from"./chunk-G27WJ6UU-DfF7qW-C.js";var S;e((()=>{y(),p(),m(),g(),f(),h(),d(),u(),l(),c(),s(),a(),o(),i(),r(),n(),S={parser:b,get db(){return new x(2)},renderer:v,styles:_,init:t(e=>{e.state||={},e.state.arrowMarkerAbsolute=e.arrowMarkerAbsolute},`init`)}}))();export{S as diagram};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import{n as e}from"./chunk-CacB07dV.js";import{n as t,r as n}from"./chunk-Y2CYZVJY-C9o-s6OY.js";import{zt as r}from"./src-DnfeXQPr.js";import{j as i}from"./chunk-DU6HZSFF-2tv5K1wT.js";import{n as a}from"./chunk-PWAF6VOD-BmjYLNbq.js";import{d as o}from"./chunk-75Z2AOVW-TLXCoZYv.js";import{i as s}from"./chunk-GMAD6QVW-C-558kh_.js";import{n as c}from"./chunk-P2QGCYS3-HZIiM7Ni.js";import{r as l}from"./chunk-TEH6E4GO-K2A8Vg2C.js";import{r as u}from"./chunk-OBVCFTLP-BsRTPBqs.js";import{i as d}from"./chunk-R7TYR2AO-CaHIf-lK.js";import{l as f}from"./chunk-F27PBJKO-BFpgF55A.js";import{n as p}from"./chunk-XXDRQBXY-DnJkbUaw.js";import{t as m}from"./chunk-POPQ4Y6H-Dk9wvVb0.js";import{n as h}from"./chunk-JQ64N6SF-wJmeGKAw.js";import{n as g}from"./chunk-CKBBP62Z-nr1uKPj9.js";import{n as _}from"./chunk-LNGE3PJU-AdBoOWw2.js";import{i as v,r as y,t as b}from"./chunk-RHFEMEQ7-_T561hOU.js";var x;e((()=>{y(),p(),m(),_(),g(),f(),h(),d(),u(),l(),c(),s(),a(),o(),i(),r(),n(),x=b({defaultLayout:`swimlane`,styles:t(e=>`${v(e)}
|
|
2
|
-
.swimlane.cluster rect {
|
|
3
|
-
stroke: ${e.clusterBorder} !important;
|
|
4
|
-
}
|
|
5
|
-
[data-look="neo"].cluster rect {
|
|
6
|
-
filter: none;
|
|
7
|
-
}
|
|
8
|
-
`,`getStyles`)})}))();export{x as diagram};
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/core-DImejIUG.js","assets/chunk-CacB07dV.js","assets/event-BNl8Zahw.js","assets/window-DkIhgI7B.js","assets/dist-js-BxuKEVWM.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{n as e,r as t}from"./chunk-CacB07dV.js";import{n,t as r}from"./preload-helper-D0uHx7FM.js";var i=e((()=>{})),a=t({APP_ICON_PATH:()=>J,addCronJob:()=>be,addLearnedSkill:()=>pe,addLinkedFolder:()=>we,applyCodeEdits:()=>fe,authGetCurrentUser:()=>f,authLogin:()=>u,authLogout:()=>d,authRegister:()=>l,authUpdateProfile:()=>p,authUploadAvatar:()=>m,cancelChatMessage:()=>se,clearChatHistory:()=>P,convertFileSrc:()=>V,createWorkspaceFile:()=>De,createWorkspaceFolder:()=>Oe,deleteChatSession:()=>A,deleteLearnedSkill:()=>me,deleteSavedPicture:()=>I,deleteSubagent:()=>_e,deleteWorkspaceItem:()=>ke,detectSystemTools:()=>y,fetchGeminiLiveModels:()=>w,fetchImageProviderModels:()=>te,fetchProviderModels:()=>S,fetchVideoProviderModels:()=>C,generateImages:()=>L,generateVideo:()=>Ne,getImageGenProviders:()=>R,getLocalApiBase:()=>Y,getProfileValue:()=>M,getRecentInteractions:()=>O,getRuntimeStatus:()=>g,getTtsUrls:()=>ne,getVideoGenProviders:()=>Pe,getWorkspaceTree:()=>Ee,installTauriAdapters:()=>H,isTauriRuntime:()=>K,listChatSessions:()=>k,listCronJobs:()=>ye,listGitCheckpoints:()=>Xe,listLearnedSkills:()=>W,listLinkedFolders:()=>Ce,listMcpServerTools:()=>x,listSavedPictures:()=>F,listSubagents:()=>he,listen:()=>B,proposeCodeEdits:()=>de,readClipboardImage:()=>Me,readWorkspaceFile:()=>$,reauthMcpServer:()=>b,removeCronJob:()=>xe,removeLinkedFolder:()=>Te,renameChatSession:()=>j,resolveAvatarUrl:()=>h,rollbackGitCheckpoint:()=>Ze,runSlashCommand:()=>ve,saveInteractionAgentActivity:()=>le,saveSubagent:()=>ge,saveSystemInteraction:()=>ce,selectLinkedFolderPath:()=>je,selectWorkspaceDirectory:()=>Ae,sendChatMessage:()=>T,sendGeminiLiveAudioChunk:()=>ae,setActiveModel:()=>_,setCronJobEnabled:()=>Se,setDefaultImageProvider:()=>ue,setProfileValue:()=>N,speechDetectSilence:()=>We,speechTranscribe:()=>Ue,startGeminiLiveSession:()=>ie,stopGeminiLiveSession:()=>oe,streamChatMessage:()=>E,submitToolApproval:()=>z,subtitleBurn:()=>qe,subtitleGenerate:()=>Ge,subtitleTranslate:()=>Ke,testMcpConnection:()=>ee,undoGitCheckpoint:()=>Qe,uploadFile:()=>v,videoAiEdit:()=>Ye,videoExport:()=>Ve,videoExtractAudio:()=>ze,videoLoad:()=>Fe,videoMakeShorts:()=>Je,videoMerge:()=>Re,videoRemoveSilence:()=>Be,videoRenderTimeline:()=>He,videoResize:()=>Le,videoTrim:()=>Ie});function o(){if(typeof window>`u`)return null;try{return window.localStorage.getItem(Z)}catch{return null}}function s(e){if(!(typeof window>`u`))try{e?window.localStorage.setItem(Z,e):window.localStorage.removeItem(Z)}catch{}}function c(e,t={}){let n=o(),r=new Headers(t.headers);n&&!r.has(`Authorization`)&&r.set(`Authorization`,`Bearer ${n}`);let i=t.signal,a=null;if(!i&&t.timeoutMs&&typeof AbortController<`u`){let e=new AbortController;i=e.signal,a=setTimeout(()=>e.abort(Error(`Request timed out after ${t.timeoutMs}ms`)),t.timeoutMs)}let s=fetch(e,{...t,headers:r,signal:i});return a?s.finally(()=>clearTimeout(a)):s}async function l(e,t,n){if(!K()){let r=await c(`${X()}/auth/register`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({name:e,email:t,password:n})}),i=await r.json();if(!r.ok)throw Error(i.message||`Failed to register.`);return s(i.token),i.user}let{invoke:i}=await r(async()=>{let{invoke:e}=await import(`./core-DImejIUG.js`);return{invoke:e}},__vite__mapDeps([0,1]));return i(`auth_register`,{name:e,email:t,password:n})}async function u(e,t){if(!K()){let n=await c(`${X()}/auth/login`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({email:e,password:t})}),r=await n.json();if(!n.ok)throw Error(r.message||`Invalid email or password.`);return s(r.token),r.user}let{invoke:n}=await r(async()=>{let{invoke:e}=await import(`./core-DImejIUG.js`);return{invoke:e}},__vite__mapDeps([0,1]));return n(`auth_login`,{email:e,password:t})}async function d(){if(!K()){let e=o();s(null),e&&await c(`${X()}/auth/logout`,{method:`POST`,headers:{Authorization:`Bearer ${e}`}}).catch(()=>{});return}let{invoke:e}=await r(async()=>{let{invoke:e}=await import(`./core-DImejIUG.js`);return{invoke:e}},__vite__mapDeps([0,1]));await e(`auth_logout`)}async function f(){if(!K()){let e=o();if(!e)return null;try{let t=await c(`${X()}/auth/session`,{headers:{Authorization:`Bearer ${e}`},timeoutMs:5e3});return t.ok?(await t.json()).user??null:null}catch{return null}}let{invoke:e}=await r(async()=>{let{invoke:e}=await import(`./core-DImejIUG.js`);return{invoke:e}},__vite__mapDeps([0,1]));return e(`auth_current_user`)}async function p(e,t){if(!K()){let n=o();if(!n)throw Error(`Not logged in`);let r=await c(`${X()}/auth/profile`,{method:`PUT`,headers:{"Content-Type":`application/json`,Authorization:`Bearer ${n}`},body:JSON.stringify({name:e,image:t})}),i=await r.json();if(!r.ok)throw Error(i.message||`Failed to update profile.`);return i.user}let{invoke:n}=await r(async()=>{let{invoke:e}=await import(`./core-DImejIUG.js`);return{invoke:e}},__vite__mapDeps([0,1]));return n(`auth_update_profile`,{name:e,image:t})}async function m(e,t){let n=e.split(`,`)[1]??e;if(!K()){let e=o();if(!e)throw Error(`Not logged in`);let r=await c(`${X()}/auth/avatar`,{method:`POST`,headers:{"Content-Type":`application/json`,Authorization:`Bearer ${e}`},body:JSON.stringify({fileName:t,dataBase64:n})}),i=await r.json();if(!r.ok)throw Error(i.message||`Failed to upload avatar.`);return i.user}let{invoke:i}=await r(async()=>{let{invoke:e}=await import(`./core-DImejIUG.js`);return{invoke:e}},__vite__mapDeps([0,1]));return i(`auth_upload_avatar`,{fileName:t,dataBase64:n})}function h(e){if(!e)return null;if(/^https?:\/\//i.test(e))return e;let t=e.match(/[?&]key=([^&]+)/);return t?`${X()}/avatar?key=${t[1]}`:e}async function g(){if(typeof window>`u`||!K()){let e=X();try{return await(await c(`${e}/status`,{timeoutMs:5e3})).json()}catch(e){return console.error(`Failed to fetch runtime status from local server:`,e),{backend:`browser-fallback`,configPath:``,activeProvider:``,availableProviders:[],integrations:{}}}}let{invoke:e}=await r(async()=>{let{invoke:e}=await import(`./core-DImejIUG.js`);return{invoke:e}},__vite__mapDeps([0,1]));return e(`get_runtime_status`)}async function _(e,t){if(typeof window>`u`||!K()){let n=X();try{return(await(await c(`${n}/active-model`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({provider:e,model:t})})).json()).displayName||`Changed model to ${e}`}catch(t){return console.error(`Failed to set active model via API:`,t),`Changed model to ${e}`}}let{invoke:n}=await r(async()=>{let{invoke:e}=await import(`./core-DImejIUG.js`);return{invoke:e}},__vite__mapDeps([0,1]));return n(`set_active_model`,{provider:e,model:t})}async function v(e){let t=await c(`${X()}/uploads?filename=${encodeURIComponent(e.name)}`,{method:`POST`,body:e});if(!t.ok){let e=await t.json().catch(()=>null);throw Error(e?.error||`HTTP ${t.status}`)}return(await t.json()).url}async function y(){if(typeof window>`u`||!K()){let e=X();try{return await(await c(`${e}/detect-tools`)).json()}catch(e){return console.error(`Failed to detect tools from local server:`,e),{docker:!1,git:!1,gh:!1,node:!1}}}let{invoke:e}=await r(async()=>{let{invoke:e}=await import(`./core-DImejIUG.js`);return{invoke:e}},__vite__mapDeps([0,1]));return e(`detect_system_tools`)}async function b(e){if(typeof window>`u`||!K()){let t=await c(`${X()}/mcp/reauth`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({serverName:e})}),n=await t.json().catch(()=>null);if(!t.ok)throw Error(n?.error||`Re-authentication failed: HTTP ${t.status}`);return!!n?.success}let{invoke:t}=await r(async()=>{let{invoke:e}=await import(`./core-DImejIUG.js`);return{invoke:e}},__vite__mapDeps([0,1]));return t(`reauth_mcp_server`,{serverName:e})}async function x(e){if(typeof window>`u`||!K()){let t=await c(`${X()}/mcp/${encodeURIComponent(e)}/tools`),n=await t.json().catch(()=>null);if(!t.ok)throw Error(n?.error||`Could not list tools: HTTP ${t.status}`);return Array.isArray(n?.tools)?n.tools:[]}let{invoke:t}=await r(async()=>{let{invoke:e}=await import(`./core-DImejIUG.js`);return{invoke:e}},__vite__mapDeps([0,1]));return t(`list_mcp_server_tools`,{name:e})}async function ee(e,t){if(typeof window>`u`||!K()){let n=await c(`${X()}/mcp/test`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({url:e,headers:t})}),r=await n.json().catch(()=>null);return n.ok?r:{ok:!1,error:r?.error||`HTTP ${n.status}`}}let{invoke:n}=await r(async()=>{let{invoke:e}=await import(`./core-DImejIUG.js`);return{invoke:e}},__vite__mapDeps([0,1]));return n(`test_mcp_connection`,{url:e,headers:t})}async function S(e,t,n){if(typeof window>`u`||!K()){let r=new URLSearchParams({provider:e,apiKey:t});n&&r.set(`baseUrl`,n);let i=X(),a=await fetch(`${i}/models?${r.toString()}`);if(!a.ok)throw Error(`HTTP ${a.status}`);let o=await a.json().catch(()=>null);return Array.isArray(o?.models)?o.models:[]}let{invoke:i}=await r(async()=>{let{invoke:e}=await import(`./core-DImejIUG.js`);return{invoke:e}},__vite__mapDeps([0,1]));return i(`fetch_provider_models`,{provider:e,apiKey:t,baseUrl:n})}async function te(e,t=``){if(typeof window>`u`||!K()){let n=new URLSearchParams({provider:e,apiKey:t||``}),r=X(),i=await fetch(`${r}/image-models?${n.toString()}`);if(!i.ok)throw Error(`HTTP ${i.status}`);let a=await i.json().catch(()=>null);return Array.isArray(a?.models)?a.models:[]}let{invoke:n}=await r(async()=>{let{invoke:e}=await import(`./core-DImejIUG.js`);return{invoke:e}},__vite__mapDeps([0,1]));return n(`fetch_image_provider_models`,{provider:e,apiKey:t||``})}async function C(e,t=``){if(typeof window>`u`||!K()){let n=new URLSearchParams({provider:e,apiKey:t||``}),r=X(),i=await fetch(`${r}/video-models?${n.toString()}`);if(!i.ok)throw Error(`HTTP ${i.status}`);let a=await i.json().catch(()=>null);return Array.isArray(a?.models)?a.models:[]}let{invoke:n}=await r(async()=>{let{invoke:e}=await import(`./core-DImejIUG.js`);return{invoke:e}},__vite__mapDeps([0,1]));return n(`fetch_video_provider_models`,{provider:e,apiKey:t||``})}async function w(e){if(typeof window>`u`||!K()){let t=new URLSearchParams({apiKey:e||``}),n=X(),r=await fetch(`${n}/live-models?${t.toString()}`);if(!r.ok)throw Error(`HTTP ${r.status}`);let i=await r.json().catch(()=>null);return Array.isArray(i?.models)?i.models:[]}let{invoke:t}=await r(async()=>{let{invoke:e}=await import(`./core-DImejIUG.js`);return{invoke:e}},__vite__mapDeps([0,1]));return t(`fetch_gemini_live_models`,{apiKey:e||``})}async function T(e,t,n,i,a,o,s,l){let u=D(e,t,i);if(typeof window>`u`||!K()){let e=X();try{let r=await c(`${e}/chat`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({message:u,systemInstruction:``,chatId:s,imageDataUri:t,audioDataUri:n,videoDataUri:i,documentAttachment:a,workspacePath:o,agentId:l})}),d=await r.json().catch(()=>null);return r.ok?!d||typeof d.text!=`string`?{provider:`error`,model:`error`,text:`Local API returned an invalid chat response.`}:d:{provider:`error`,model:`error`,text:d?.text||d?.message||d?.status||`Local API returned HTTP ${r.status}`}}catch(e){return console.error(`Failed to send chat message to local server:`,e),{provider:`error`,model:`error`,text:`Failed to connect to Local API Server: ${e}`}}}let{invoke:d}=await r(async()=>{let{invoke:e}=await import(`./core-DImejIUG.js`);return{invoke:e}},__vite__mapDeps([0,1])),f=await d(`send_chat_message`,{request:{message:u,systemInstruction:``,chatId:s,imageDataUri:t,audioDataUri:n,videoDataUri:i,documentAttachment:a,workspacePath:o,agentId:l}});return t&&await d(`save_pictures`,{images:t.split(` `),source:`chat`,message:u}),i&&await d(`save_pictures`,{images:i.split(` `),source:`chat`,message:u}),f}async function E(e,t,n,i,a,o=``,s,l,u,d,f,p,m,h){if(typeof window>`u`||!K()){let r=X(),p=D(e,n,a),g=await c(`${r}/chat-stream`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({message:p,systemInstruction:o,chatId:d,imageDataUri:n,audioDataUri:i,videoDataUri:a,documentAttachment:l,workspacePath:u,agentId:f,pinnedMcpServer:m})});if(!g.ok){let e=await g.json().catch(()=>null);throw Error(e?.text||e?.message||`HTTP ${g.status}`)}let _=g.body?.getReader();if(!_)throw Error(`No response body reader`);let v=new TextDecoder,y=``,b=null;for(;;){let{value:e,done:n}=await _.read();if(n)break;y+=v.decode(e,{stream:!0});let r=y.split(`
|
|
3
|
-
`);y=r.pop()||``;for(let e of r)if(e.trim())try{let n=JSON.parse(e);n.type===`chunk`?t(n.chunk):n.type===`progress`?s?.(n.progress):n.type===`done`?b=n.response:n.type===`approval-requested`&&h?.({token:n.token,approval:n.approval})}catch(t){console.error(`Failed to parse stream line:`,e,t)}}if(b)return b;throw Error(`Stream closed without a final response`)}let{invoke:g,Channel:_}=await r(async()=>{let{invoke:e,Channel:t}=await import(`./core-DImejIUG.js`);return{invoke:e,Channel:t}},__vite__mapDeps([0,1])),v=D(e,n,a),y=new _;y.onmessage=e=>{e.type===`chunk`?t(e.chunk):s?.(e.progress)};let b=await g(`stream_chat_message`,{request:{message:v,systemInstruction:o,chatId:d,imageDataUri:n,audioDataUri:i,videoDataUri:a,documentAttachment:l,workspacePath:u,agentId:f,pinnedMcpServer:m},onEvent:y});return n&&await g(`save_pictures`,{images:n.split(` `),source:`chat`,message:v}),a&&await g(`save_pictures`,{images:a.split(` `),source:`chat`,message:v}),b}function D(e,t,n){let r=e;if(t&&!r.includes(`[Image #1]`)){let e=t.split(/\s+/).filter(Boolean).length,n=Array.from({length:e},(e,t)=>`[Image #${t+1}]`).join(` `);n&&(r=`${r} ${n}`)}if(n&&!r.includes(`[Video #1]`)){let e=n.split(/\s+/).filter(Boolean).length,t=Array.from({length:e},(e,t)=>`[Video #${t+1}]`).join(` `);t&&(r=`${r} ${t}`)}return r}async function ne(e){if(typeof window>`u`||!K())return[];let{invoke:t}=await r(async()=>{let{invoke:e}=await import(`./core-DImejIUG.js`);return{invoke:e}},__vite__mapDeps([0,1]));return t(`get_tts_urls`,{text:e})}function re(e){return`${Y().replace(/^http/,`ws`)}/gemini-live?${e.toString()}`}async function ie(e,t,n){let r=new URLSearchParams,i=o();i&&r.set(`token`,i),t&&r.set(`workspacePath`,t),n&&r.set(`chatId`,n);let a=`gemini-live-${Date.now()}-${Math.random().toString(36).slice(2)}`,s=new WebSocket(re(r));return new Promise((t,n)=>{let r=!1;s.onopen=()=>{r=!0,Q.set(a,s),t(a)},s.onmessage=t=>{try{e(JSON.parse(t.data))}catch(e){console.error(`Failed to parse Gemini Live event`,e)}},s.onclose=()=>{Q.delete(a),r?e({type:`closed`}):n(Error(`Failed to connect to Gemini Live (check your Gemini API key and sign-in status).`))},s.onerror=()=>{}})}async function ae(e,t){let n=Q.get(e);!n||n.readyState!==WebSocket.OPEN||n.send(JSON.stringify({type:`audio`,data:t}))}async function oe(e){let t=Q.get(e);t&&(Q.delete(e),t.close())}async function se(e){if(typeof window>`u`||!K()){await c(`${X()}/cancel-chat`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({chatId:e})});return}let{invoke:t}=await r(async()=>{let{invoke:e}=await import(`./core-DImejIUG.js`);return{invoke:e}},__vite__mapDeps([0,1]));await t(`cancel_chat_message`,{chatId:e})}async function O(e=50,t,n){if(typeof window>`u`||!K()){let r=X();try{let i=new URLSearchParams({limit:String(e)});return t&&i.set(`chatId`,t),n&&i.set(`workspacePath`,n),await(await c(`${r}/interactions?${i.toString()}`)).json()}catch(e){return console.error(`Failed to fetch chat history from local server:`,e),[]}}let{invoke:i}=await r(async()=>{let{invoke:e}=await import(`./core-DImejIUG.js`);return{invoke:e}},__vite__mapDeps([0,1]));return i(`get_recent_interactions`,{limit:e,chatId:t,workspacePath:n})}async function ce(e,t,n,i,a){if(typeof window>`u`||!K()){let r=X();try{return await(await c(`${r}/interactions`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({chatId:e,userText:t,aiText:n,provider:i,model:a})})).json()}catch(e){return console.error(`Failed to save system interaction on local server:`,e),{success:!1}}}let{invoke:o}=await r(async()=>{let{invoke:e}=await import(`./core-DImejIUG.js`);return{invoke:e}},__vite__mapDeps([0,1]));return o(`save_system_interaction`,{chatId:e,userText:t,aiText:n,provider:i,model:a})}async function le(e,t){if(typeof window>`u`||!K()){let n=X();try{let r=await c(`${n}/interactions/agent-activity`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({interactionId:e,activity:t})});if(!r.ok)throw Error(`HTTP ${r.status}`)}catch(e){console.error(`Failed to persist agent activity:`,e)}return}let{invoke:n}=await r(async()=>{let{invoke:e}=await import(`./core-DImejIUG.js`);return{invoke:e}},__vite__mapDeps([0,1]));await n(`save_interaction_agent_activity`,{interactionId:e,activity:t})}async function k(){if(typeof window>`u`||!K()){let e=X();try{let t=await(await c(`${e}/chat-sessions`)).json();return Array.isArray(t)?t:[]}catch(e){return console.error(`Failed to fetch chat sessions from local server:`,e),[]}}let{invoke:e}=await r(async()=>{let{invoke:e}=await import(`./core-DImejIUG.js`);return{invoke:e}},__vite__mapDeps([0,1]));return e(`list_chat_sessions`)}async function A(e){if(typeof window>`u`||!K()){let t=X();try{let n=await(await c(`${t}/chat-sessions/delete?${new URLSearchParams({chatId:e}).toString()}`,{method:`POST`})).json();return typeof n?.deleted==`number`?n.deleted:0}catch(e){return console.error(`Failed to delete chat session on local server:`,e),0}}let{invoke:t}=await r(async()=>{let{invoke:e}=await import(`./core-DImejIUG.js`);return{invoke:e}},__vite__mapDeps([0,1]));return t(`delete_chat_session`,{chatId:e})}async function j(e,t){if(typeof window>`u`||!K()){let n=X();try{let r=await(await c(`${n}/chat-sessions/rename`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({chatId:e,newTitle:t})})).json();return typeof r?.updated==`number`?r.updated:0}catch(e){return console.error(`Failed to rename chat session on local server:`,e),0}}let{invoke:n}=await r(async()=>{let{invoke:e}=await import(`./core-DImejIUG.js`);return{invoke:e}},__vite__mapDeps([0,1]));return n(`rename_chat_session`,{chatId:e,newTitle:t})}async function M(e){if(typeof window>`u`||!K()){let t=X();try{return(await(await c(`${t}/profile?${new URLSearchParams({key:e}).toString()}`)).json()).value||``}catch(e){return console.error(`Failed to get profile key from local server:`,e),``}}let{invoke:t}=await r(async()=>{let{invoke:e}=await import(`./core-DImejIUG.js`);return{invoke:e}},__vite__mapDeps([0,1]));return t(`get_profile_value`,{key:e}).then(e=>e||``)}async function N(e,t){if(typeof window>`u`||!K()){let n=X();try{return(await(await c(`${n}/profile`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({key:e,value:t})})).json()).status===`ok`}catch(e){return console.error(`Failed to set profile key on local server:`,e),!1}}let{invoke:n}=await r(async()=>{let{invoke:e}=await import(`./core-DImejIUG.js`);return{invoke:e}},__vite__mapDeps([0,1]));return n(`set_profile_value`,{key:e,value:t}).then(()=>!0).catch(()=>!1)}async function P(e){if(typeof window>`u`||!K()){let t=X();try{let n=new URLSearchParams;return e&&n.set(`chatId`,e),+((await(await c(`${t}/interactions/clear${n.toString()?`?${n.toString()}`:``}`,{method:`POST`})).json()).status===`ok`)}catch(e){return console.error(`Failed to clear chat history on local server:`,e),0}}let{invoke:t}=await r(async()=>{let{invoke:e}=await import(`./core-DImejIUG.js`);return{invoke:e}},__vite__mapDeps([0,1]));return t(`clear_chat_history`,{chatId:e})}async function F(){if(typeof window>`u`||!K()){let e=X();try{let t=await(await c(`${e}/pictures?_t=${Date.now()}`)).json(),n=Date.now();return Array.isArray(t)?t.map(t=>{let r=t.url?`${e.replace(`/api`,``)}${t.url}?_t=${n}`:void 0;return{...t,path:r||t.path,thumbnailPath:void 0,thumbnailUrl:r,url:r||t.url}}):[]}catch(e){return console.error(`Failed to fetch saved pictures from local server:`,e),[]}}let{invoke:e}=await r(async()=>{let{invoke:e}=await import(`./core-DImejIUG.js`);return{invoke:e}},__vite__mapDeps([0,1]));return e(`list_pictures`)}async function I(e){if(typeof window>`u`||!K()){await c(`${X()}/pictures/${encodeURIComponent(e)}`,{method:`DELETE`});return}let{invoke:t}=await r(async()=>{let{invoke:e}=await import(`./core-DImejIUG.js`);return{invoke:e}},__vite__mapDeps([0,1]));return t(`delete_picture`,{id:e})}async function L(e){if(typeof window>`u`||!K()){let t=X(),n=await c(`${t}/image-generate`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({prompt:e.prompt,negativePrompt:e.negativePrompt,aspectRatio:e.aspectRatio??`1:1`,numImages:e.numImages??1,model:e.model,provider:e.provider})});if(!n.ok){let e=await n.json().catch(()=>null);throw Error(e?.error||`Image generation failed: HTTP ${n.status}`)}let r=await n.json(),i=Array.isArray(r.images)?r.images.map(e=>{let n=e.url?`${t.replace(`/api`,``)}${e.url}`:e.url;return{...e,url:n,thumbnailUrl:n}}):[];return{...r,images:i}}let{invoke:t}=await r(async()=>{let{invoke:e}=await import(`./core-DImejIUG.js`);return{invoke:e}},__vite__mapDeps([0,1]));return t(`generate_images`,{request:e})}async function R(){if(typeof window>`u`||!K()){let e=X();try{let t=await c(`${e}/image-gen/providers`);if(t.ok)return await t.json()}catch{}return{active:`nanobanana`,available:[`nanobanana`]}}try{let{invoke:e}=await r(async()=>{let{invoke:e}=await import(`./core-DImejIUG.js`);return{invoke:e}},__vite__mapDeps([0,1])),t=await e(`get_config`),n=[];return t.api_key&&n.push(`nanobanana`),t.openai_api_key&&n.push(`dalle`),t.stability_api_key&&n.push(`stability`),t.ideogram_api_key&&n.push(`ideogram`),t.replicate_api_key&&n.push(`replicate`),n.length===0&&n.push(`nanobanana`),{active:n.includes(t.image_gen_provider)?t.image_gen_provider:n[0],available:n}}catch{return{active:`nanobanana`,available:[`nanobanana`]}}}async function ue(e){if(typeof window>`u`||!K()){let t=X();try{let n=await c(`${t}/config`);if(!n.ok)return!1;let r=await n.json();return r.image_gen_provider=e,(await c(`${t}/config`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(r)})).ok}catch{return!1}}try{let{invoke:t}=await r(async()=>{let{invoke:e}=await import(`./core-DImejIUG.js`);return{invoke:e}},__vite__mapDeps([0,1])),n=await t(`get_config`);return n.image_gen_provider=e,await t(`update_config`,{config:n}),!0}catch{return!1}}async function z(e,t,n){if(typeof window>`u`||!K()){await c(`${X()}/submit-approval`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({token:e,approved:t,answer:n})});return}let{invoke:i}=await r(async()=>{let{invoke:e}=await import(`./core-DImejIUG.js`);return{invoke:e}},__vite__mapDeps([0,1]));return i(`submit_tool_approval`,{token:e,approved:t,answer:n})}async function de(e,t){if(typeof window>`u`||!K())return{approvalRequired:!1,approvalToken:``,edits:[]};let{invoke:n}=await r(async()=>{let{invoke:e}=await import(`./core-DImejIUG.js`);return{invoke:e}},__vite__mapDeps([0,1]));return n(`propose_desktop_code_edits`,{root:e,edits:t})}async function fe(e,t,n){if(typeof window>`u`||!K())return;let{invoke:i}=await r(async()=>{let{invoke:e}=await import(`./core-DImejIUG.js`);return{invoke:e}},__vite__mapDeps([0,1]));return i(`apply_desktop_code_edits`,{root:e,edits:t,approvalToken:n})}async function B(e,t){if(typeof window>`u`||!K())return()=>{};let{listen:n}=await r(async()=>{let{listen:e}=await import(`./event-BNl8Zahw.js`);return{listen:e}},__vite__mapDeps([2,1,0]));return n(e,t)}function V(e,t=`asset`){if(!e)return``;if(e.startsWith(`http://`)||e.startsWith(`https://`)||e.startsWith(`blob:`)||e.startsWith(`data:`))return e;if(e.startsWith(`/api/`)){let t=Y().replace(/\/api\/?$/,``);return t?`${t}${e}`:e}if(e.startsWith(`/`)&&!e.startsWith(`/home/`)&&!e.startsWith(`/root/`)&&!e.startsWith(`/tmp/`)&&!e.startsWith(`/var/`)&&!e.startsWith(`/usr/`))return e;if(e.includes(`/pictures/`)||e.includes(`\\pictures\\`)){let t=e.split(/[/\\]/).pop();if(t){let e=Y();return t.endsWith(`.thumb.png`)?`${e}/thumbnails/${encodeURIComponent(t)}`:`${e}/pictures/${encodeURIComponent(t)}`}}if(typeof window>`u`||!K())return`${X()}/media?path=${encodeURIComponent(e)}`;let n=window.__TAURI_INTERNALS__;if(n&&typeof n.convertFileSrc==`function`)return n.convertFileSrc(e,t);let r=e.startsWith(`\\\\?\\`)?e.substring(4):e;return`https://asset.localhost/${encodeURIComponent(r)}`}function H(){if(typeof window>`u`||!K()){console.warn(`Not running inside Tauri. Connecting to local API server fallback at ${X()}.`);let e=X();window.settingsApi={getSettings:async()=>{try{return await(await c(`${e}/config`,{timeoutMs:5e3})).json()}catch(e){return console.error(`Failed to fetch settings from local server:`,e),{}}},getUpdaterStatus:async()=>({supported:!1,message:`Desktop updates are only available in the Tauri app.`}),checkForUpdates:async()=>({available:!1,supported:!1,message:`Desktop updates are only available in the Tauri app.`}),installAvailableUpdate:async()=>`Desktop updates are only available in the Tauri app.`,saveSettings:async t=>{try{return await(await c(`${e}/config`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(t)})).json()}catch(e){return console.error(`Failed to save settings to local server:`,e),{}}},closeSettings:()=>{window.location.hash=`#/`},quitApp:()=>void 0,openExternal:async e=>{window.open(e,`_blank`,`noopener,noreferrer`)},openFolder:async()=>({success:!1,message:`Opening local folders is only available in the desktop app.`})},window.spotlightAPI={submit:()=>{},executeAction:async t=>{try{return await(await c(`${e}/action`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(t)})).json()}catch(e){return{success:!1,message:String(e)}}},close:()=>{},hide:()=>{},resize:()=>{},getSettings:async()=>{try{return await(await c(`${e}/config`)).json()}catch{return{}}},onSettingsChanged:()=>{}},window.widgetAPI={onStateChange:()=>{}},window.screenPickerApi={onScreenshot:()=>{},sendSelection:()=>{},startContinuousTranslation:()=>{},stopContinuousTranslation:()=>{},onTranslationResult:()=>{},closePicker:()=>{},setOverlayInteractable:()=>{}},window.api={sendMessage:async(t,n,r,i)=>{try{let a=await c(`${e}/chat`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({message:t,imageDataUri:n,audioDataUri:r,documentAttachment:i})}),o=await a.json().catch(()=>null);return a.ok?!o||typeof o.text!=`string`?{provider:`error`,model:`error`,text:`Local API returned an invalid chat response.`}:o:{provider:`error`,model:`error`,text:o?.text||o?.message||o?.status||`Local API returned HTTP ${a.status}`}}catch(e){return console.error(`Failed to send message to local server:`,e),{provider:`error`,model:`error`,text:`Failed to connect to Local API Server: ${e}`}}},closeWindow:()=>{},minimizeWindow:()=>{},quitApp:()=>void 0,maximizeWindow:()=>{},resetChat:async()=>{try{return+((await(await c(`${e}/interactions/clear`,{method:`POST`})).json()).status===`ok`)}catch{return 0}},getChatHistory:async()=>{try{return await(await c(`${e}/interactions`)).json()}catch(e){return console.error(`Failed to fetch chat history from local server:`,e),[]}},listSavedPictures:F,deleteSavedPicture:I,openSettings:()=>{window.location.hash=`#/settings`},readClipboard:async()=>``,writeClipboard:async()=>{},getSystemInfo:async()=>{try{return await(await c(`${e}/status`)).json()}catch{return{backend:`browser-fallback`}}},getWeather:async t=>{try{return await(await c(`${e}/weather?city=${encodeURIComponent(t)}`)).json()}catch(e){return{error:String(e)}}},getSettings:async()=>{try{return await(await c(`${e}/config`)).json()}catch{return{}}},saveSettings:async t=>{try{return await(await c(`${e}/config`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(t)})).json()}catch{return{}}},closeSettings:async()=>{window.location.hash.includes(`settings`)&&window.history.replaceState(null,``,window.location.pathname+window.location.search)},onSettingsChanged:()=>{},startVision:()=>{},onVisionReady:async()=>()=>{},captureSilentScreen:async()=>``,getSmartContext:async()=>{try{return await(await c(`${e}/smart-context`)).json()}catch{return{}}},onProactiveSuggestion:async()=>()=>{},onProactiveNotification:async()=>()=>{},toggleProactive:()=>{},recordBehavior:()=>{},executeProactiveAction:async t=>{try{return await(await c(`${e}/action`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(t)})).json()}catch(e){return{success:!1,message:String(e)}}},executeApprovedAction:async t=>{try{return await(await c(`${e}/action`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(t)})).json()}catch(e){return{success:!1,message:String(e)}}},onSpotlightToChat:async()=>()=>{},notifyAiResponse:async e=>{if(typeof Notification>`u`)return;let t=Notification.permission;t==="default"&&(t=await Notification.requestPermission()),t===`granted`&&(q=new Notification(`Mint Agent`,{body:e}))},clearAiNotifications:()=>{q?.close(),q=null},getTtsUrls:async()=>[],setAiState:()=>{}};return}let e=async e=>{let{listen:t}=await r(async()=>{let{listen:e}=await import(`./event-BNl8Zahw.js`);return{listen:e}},__vite__mapDeps([2,1,0]));t(`settings-changed`,t=>e(t.payload))},t=async(e,t=!1)=>{let{invoke:n}=await r(async()=>{let{invoke:e}=await import(`./core-DImejIUG.js`);return{invoke:e}},__vite__mapDeps([0,1]));return e.type===`plugin`?n(`run_native_plugin`,{name:e.pluginName,instruction:e.target||``}):n(`run_desktop_action`,{action:{...e,approved:t}})};window.settingsApi={getSettings:async()=>{let{invoke:e}=await r(async()=>{let{invoke:e}=await import(`./core-DImejIUG.js`);return{invoke:e}},__vite__mapDeps([0,1]));return e(`get_config`)},getUpdaterStatus:async()=>{let{invoke:e}=await r(async()=>{let{invoke:e}=await import(`./core-DImejIUG.js`);return{invoke:e}},__vite__mapDeps([0,1]));return e(`get_updater_status`)},checkForUpdates:async()=>{let{invoke:e}=await r(async()=>{let{invoke:e}=await import(`./core-DImejIUG.js`);return{invoke:e}},__vite__mapDeps([0,1]));return e(`check_for_updates`)},installAvailableUpdate:async()=>{let{invoke:e}=await r(async()=>{let{invoke:e}=await import(`./core-DImejIUG.js`);return{invoke:e}},__vite__mapDeps([0,1]));return e(`install_available_update`,{approved:!0})},saveSettings:async e=>{let{invoke:t}=await r(async()=>{let{invoke:e}=await import(`./core-DImejIUG.js`);return{invoke:e}},__vite__mapDeps([0,1]));return t(`update_config`,{config:e})},closeSettings:async()=>{let{invoke:e}=await r(async()=>{let{invoke:e}=await import(`./core-DImejIUG.js`);return{invoke:e}},__vite__mapDeps([0,1])),{getCurrentWindow:t}=await r(async()=>{let{getCurrentWindow:e}=await import(`./window-DkIhgI7B.js`);return{getCurrentWindow:e}},__vite__mapDeps([3,1,0,2]));return e(`close_desktop_window`,{label:t().label})},quitApp:async()=>{let{invoke:e}=await r(async()=>{let{invoke:e}=await import(`./core-DImejIUG.js`);return{invoke:e}},__vite__mapDeps([0,1]));e(`exit_app`)},openExternal:async e=>{let{invoke:t}=await r(async()=>{let{invoke:e}=await import(`./core-DImejIUG.js`);return{invoke:e}},__vite__mapDeps([0,1]));return t(`run_desktop_action`,{action:{type:`open_url`,target:e}})},openFolder:async e=>{let{invoke:t}=await r(async()=>{let{invoke:e}=await import(`./core-DImejIUG.js`);return{invoke:e}},__vite__mapDeps([0,1]));return t(`open_folder`,{path:e})}},window.spotlightAPI={submit:async e=>{let{invoke:t}=await r(async()=>{let{invoke:e}=await import(`./core-DImejIUG.js`);return{invoke:e}},__vite__mapDeps([0,1]));t(`submit_spotlight`,{query:e})},executeAction:async e=>{let{invoke:t}=await r(async()=>{let{invoke:e}=await import(`./core-DImejIUG.js`);return{invoke:e}},__vite__mapDeps([0,1]));return e.type===`clipboard_write`?(await navigator.clipboard.writeText(e.target),{success:!0}):t(`run_desktop_action`,{action:e})},close:async()=>{let{invoke:e}=await r(async()=>{let{invoke:e}=await import(`./core-DImejIUG.js`);return{invoke:e}},__vite__mapDeps([0,1])),{getCurrentWindow:t}=await r(async()=>{let{getCurrentWindow:e}=await import(`./window-DkIhgI7B.js`);return{getCurrentWindow:e}},__vite__mapDeps([3,1,0,2]));return e(`close_desktop_window`,{label:t().label})},hide:async()=>{let{invoke:e}=await r(async()=>{let{invoke:e}=await import(`./core-DImejIUG.js`);return{invoke:e}},__vite__mapDeps([0,1])),{getCurrentWindow:t}=await r(async()=>{let{getCurrentWindow:e}=await import(`./window-DkIhgI7B.js`);return{getCurrentWindow:e}},__vite__mapDeps([3,1,0,2]));return e(`hide_desktop_window`,{label:t().label})},resize:async(e,t)=>{let{invoke:n}=await r(async()=>{let{invoke:e}=await import(`./core-DImejIUG.js`);return{invoke:e}},__vite__mapDeps([0,1])),{getCurrentWindow:i}=await r(async()=>{let{getCurrentWindow:e}=await import(`./window-DkIhgI7B.js`);return{getCurrentWindow:e}},__vite__mapDeps([3,1,0,2]));n(`resize_desktop_window`,{label:i().label,width:e,height:t})},getSettings:async()=>{let{invoke:e}=await r(async()=>{let{invoke:e}=await import(`./core-DImejIUG.js`);return{invoke:e}},__vite__mapDeps([0,1]));return e(`get_config`)},onSettingsChanged:e},window.widgetAPI={onStateChange:async e=>{let{listen:t}=await r(async()=>{let{listen:e}=await import(`./event-BNl8Zahw.js`);return{listen:e}},__vite__mapDeps([2,1,0]));t(`widget-state`,t=>e(t.payload))}},window.screenPickerApi={onScreenshot:async e=>{let{invoke:t}=await r(async()=>{let{invoke:e}=await import(`./core-DImejIUG.js`);return{invoke:e}},__vite__mapDeps([0,1]));try{e(await U())}catch(n){console.warn(`Screen share capture failed, falling back to native capture:`,n),t(`capture_silent_screen`).then(e)}},sendSelection:async e=>{let{invoke:t}=await r(async()=>{let{invoke:e}=await import(`./core-DImejIUG.js`);return{invoke:e}},__vite__mapDeps([0,1]));t(`submit_screen_selection`,{image:e})},startContinuousTranslation:e=>{let t=null,n=async()=>{let{invoke:t}=await r(async()=>{let{invoke:e}=await import(`./core-DImejIUG.js`);return{invoke:e}},__vite__mapDeps([0,1]));t(`translate_capture_region`,{rect:e}).then(e=>window.dispatchEvent(new CustomEvent(`mint-translation`,{detail:e}))).catch(e=>{window.dispatchEvent(new CustomEvent(`mint-translation`,{detail:String(e)}))})};n(),t=setInterval(n,3e3),window._stopTranslate&&window._stopTranslate(),window._stopTranslate=()=>{t&&clearInterval(t)}},stopContinuousTranslation:()=>{window._stopTranslate&&window._stopTranslate()},onTranslationResult:e=>{window.addEventListener(`mint-translation`,(t=>{e(t.detail)}))},closePicker:async()=>{let{invoke:e}=await r(async()=>{let{invoke:e}=await import(`./core-DImejIUG.js`);return{invoke:e}},__vite__mapDeps([0,1])),{getCurrentWindow:t}=await r(async()=>{let{getCurrentWindow:e}=await import(`./window-DkIhgI7B.js`);return{getCurrentWindow:e}},__vite__mapDeps([3,1,0,2]));return e(`close_desktop_window`,{label:t().label})},setOverlayInteractable:()=>{}},window.api={sendMessage:(e,t,n,r)=>T(e,t,n,void 0,r),closeWindow:async()=>{let{invoke:e}=await r(async()=>{let{invoke:e}=await import(`./core-DImejIUG.js`);return{invoke:e}},__vite__mapDeps([0,1])),{getCurrentWindow:t}=await r(async()=>{let{getCurrentWindow:e}=await import(`./window-DkIhgI7B.js`);return{getCurrentWindow:e}},__vite__mapDeps([3,1,0,2]));return e(`hide_desktop_window`,{label:t().label})},minimizeWindow:async()=>{let{getCurrentWindow:e}=await r(async()=>{let{getCurrentWindow:e}=await import(`./window-DkIhgI7B.js`);return{getCurrentWindow:e}},__vite__mapDeps([3,1,0,2]));e().minimize()},quitApp:async()=>{let{invoke:e}=await r(async()=>{let{invoke:e}=await import(`./core-DImejIUG.js`);return{invoke:e}},__vite__mapDeps([0,1]));e(`exit_app`)},maximizeWindow:async()=>{let{getCurrentWindow:e}=await r(async()=>{let{getCurrentWindow:e}=await import(`./window-DkIhgI7B.js`);return{getCurrentWindow:e}},__vite__mapDeps([3,1,0,2]));e().toggleMaximize()},resetChat:P,getChatHistory:()=>O(50),listSavedPictures:F,deleteSavedPicture:I,openSettings:async()=>{let{invoke:e}=await r(async()=>{let{invoke:e}=await import(`./core-DImejIUG.js`);return{invoke:e}},__vite__mapDeps([0,1]));return e(`open_window`,{kind:`settings`})},readClipboard:()=>navigator.clipboard.readText(),writeClipboard:e=>navigator.clipboard.writeText(e),getSystemInfo:async()=>({backend:`rust`}),getWeather:async e=>{let{invoke:t}=await r(async()=>{let{invoke:e}=await import(`./core-DImejIUG.js`);return{invoke:e}},__vite__mapDeps([0,1]));return t(`get_weather`,{city:e})},getSettings:async()=>{let{invoke:e}=await r(async()=>{let{invoke:e}=await import(`./core-DImejIUG.js`);return{invoke:e}},__vite__mapDeps([0,1]));return e(`get_config`)},saveSettings:async e=>{let{invoke:t}=await r(async()=>{let{invoke:e}=await import(`./core-DImejIUG.js`);return{invoke:e}},__vite__mapDeps([0,1]));return t(`update_config`,{config:e})},onSettingsChanged:e,startVision:async()=>{let{invoke:e}=await r(async()=>{let{invoke:e}=await import(`./core-DImejIUG.js`);return{invoke:e}},__vite__mapDeps([0,1]));try{let e=await U();window.localStorage.setItem(`mint:pending-screen-capture`,e)}catch(t){console.warn(`Screen share capture failed before opening picker:`,t);let n=await e(`capture_silent_screen`);window.localStorage.setItem(`mint:pending-screen-capture`,n)}return e(`start_screen_capture`)},onVisionReady:async e=>{let{listen:t}=await r(async()=>{let{listen:e}=await import(`./event-BNl8Zahw.js`);return{listen:e}},__vite__mapDeps([2,1,0]));return t(`vision-ready`,t=>e(t.payload))},captureSilentScreen:async()=>{let{invoke:e}=await r(async()=>{let{invoke:e}=await import(`./core-DImejIUG.js`);return{invoke:e}},__vite__mapDeps([0,1]));return e(`capture_silent_screen`)},getSmartContext:async()=>{let{invoke:e}=await r(async()=>{let{invoke:e}=await import(`./core-DImejIUG.js`);return{invoke:e}},__vite__mapDeps([0,1]));return e(`get_smart_context`)},onProactiveSuggestion:async e=>{let{listen:t}=await r(async()=>{let{listen:e}=await import(`./event-BNl8Zahw.js`);return{listen:e}},__vite__mapDeps([2,1,0]));return t(`proactive-suggestion`,t=>e(t.payload))},onProactiveNotification:async e=>{let{listen:t}=await r(async()=>{let{listen:e}=await import(`./event-BNl8Zahw.js`);return{listen:e}},__vite__mapDeps([2,1,0]));return t(`proactive-notification`,t=>e(t.payload))},toggleProactive:async e=>{let{invoke:t}=await r(async()=>{let{invoke:e}=await import(`./core-DImejIUG.js`);return{invoke:e}},__vite__mapDeps([0,1]));t(`toggle_proactive`,{enabled:e})},recordBehavior:async e=>{let{invoke:t}=await r(async()=>{let{invoke:e}=await import(`./core-DImejIUG.js`);return{invoke:e}},__vite__mapDeps([0,1]));t(`save_behavior_context`,{context:e})},executeProactiveAction:e=>t(e),executeApprovedAction:e=>t(e,!0),onSpotlightToChat:async e=>{let{listen:t}=await r(async()=>{let{listen:e}=await import(`./event-BNl8Zahw.js`);return{listen:e}},__vite__mapDeps([2,1,0]));return t(`spotlight-to-chat`,t=>e(t.payload))},notifyAiResponse:async e=>{let{isPermissionGranted:t,requestPermission:n,sendNotification:i}=await r(async()=>{let{isPermissionGranted:e,requestPermission:t,sendNotification:n}=await import(`./dist-js-BxuKEVWM.js`);return{isPermissionGranted:e,requestPermission:t,sendNotification:n}},__vite__mapDeps([4,1,0])),a=await t();a||=await n()===`granted`,a&&i({title:`Mint Agent`,body:e})},clearAiNotifications:()=>{},getTtsUrls:async e=>{let{invoke:t}=await r(async()=>{let{invoke:e}=await import(`./core-DImejIUG.js`);return{invoke:e}},__vite__mapDeps([0,1]));return t(`get_tts_urls`,{text:e})},setAiState:async e=>{let{invoke:t}=await r(async()=>{let{invoke:e}=await import(`./core-DImejIUG.js`);return{invoke:e}},__vite__mapDeps([0,1]));t(`set_ai_state`,{state:e})}}}async function U(){if(navigator.userAgent.toLowerCase().includes(`linux`))throw Error(`Linux detected, bypassing getDisplayMedia to use native screenshot tools`);if(!navigator.mediaDevices?.getDisplayMedia)throw Error(`getDisplayMedia is not available`);let e=await navigator.mediaDevices.getDisplayMedia({video:!0,audio:!1});try{let t=document.createElement(`video`);t.srcObject=e,t.muted=!0,await t.play(),await new Promise(e=>{t.videoWidth>0&&t.videoHeight>0?e():t.onloadedmetadata=()=>e()});let n=document.createElement(`canvas`);n.width=t.videoWidth||window.screen.width,n.height=t.videoHeight||window.screen.height;let r=n.getContext(`2d`);if(!r)throw Error(`Unable to create screen capture canvas`);return r.drawImage(t,0,0,n.width,n.height),n.toDataURL(`image/png`)}finally{e.getTracks().forEach(e=>e.stop())}}async function W(e){if(typeof window>`u`||!K())try{let e=await c(`${Y()}/learned-skills`);if(e.ok)return await e.json();let t=await M(`learned-skills-web-mock`);return t?JSON.parse(t):[]}catch(e){return console.error(`Failed to load web skills:`,e),[]}let{invoke:t}=await r(async()=>{let{invoke:e}=await import(`./core-DImejIUG.js`);return{invoke:e}},__vite__mapDeps([0,1]));return t(`list_learned_skills`,{workspacePath:e})}async function pe(e,t){if(typeof window>`u`||!K())try{let n=await W(),r={id:Date.now(),name:e,sourcePath:`ui_manual`,content:t,updatedAt:new Date().toISOString()};return n.push(r),await N(`learned-skills-web-mock`,JSON.stringify(n)),r}catch(e){throw console.error(`Failed to add web mock skill:`,e),e}let{invoke:n}=await r(async()=>{let{invoke:e}=await import(`./core-DImejIUG.js`);return{invoke:e}},__vite__mapDeps([0,1]));return n(`add_learned_skill`,{name:e,content:t})}async function me(e){if(typeof window>`u`||!K())try{let t=await W(),n=t.filter(t=>t.name!==e),r=t.length-n.length;return await N(`learned-skills-web-mock`,JSON.stringify(n)),r}catch(e){return console.error(`Failed to delete web mock skill:`,e),0}let{invoke:t}=await r(async()=>{let{invoke:e}=await import(`./core-DImejIUG.js`);return{invoke:e}},__vite__mapDeps([0,1]));return t(`delete_learned_skill`,{name:e})}async function he(e){if(typeof window>`u`||!K()){let e=await c(`${Y()}/subagents`);return e.ok?e.json():[]}let{invoke:t}=await r(async()=>{let{invoke:e}=await import(`./core-DImejIUG.js`);return{invoke:e}},__vite__mapDeps([0,1]));return t(`list_subagents`,{workspacePath:e})}async function ge(e,t){if(typeof window>`u`||!K()){let t=await c(`${Y()}/subagents`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)});if(!t.ok){let e=await t.json().catch(()=>({error:`Failed to save subagent.`}));throw Error(e.error||`Failed to save subagent.`)}return t.json()}let{invoke:n}=await r(async()=>{let{invoke:e}=await import(`./core-DImejIUG.js`);return{invoke:e}},__vite__mapDeps([0,1]));return n(`save_subagent`,{draft:e,workspacePath:t})}async function _e(e){if(typeof window>`u`||!K()){if(!(await c(`${Y()}/subagents/${encodeURIComponent(e)}`,{method:`DELETE`})).ok)throw Error(`Failed to delete subagent.`);return}let{invoke:t}=await r(async()=>{let{invoke:e}=await import(`./core-DImejIUG.js`);return{invoke:e}},__vite__mapDeps([0,1]));await t(`delete_subagent`,{sourcePath:e})}async function ve(e,t){if(typeof window>`u`||!K()){let n=await c(`${Y()}/slash`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({input:e,cwd:t??null})});return n.ok?n.json():{kind:`not_handled`}}let{invoke:n}=await r(async()=>{let{invoke:e}=await import(`./core-DImejIUG.js`);return{invoke:e}},__vite__mapDeps([0,1]));return n(`run_slash_command`,{input:e,cwd:t??null})}async function ye(){if(typeof window>`u`||!K()){let e=await c(`${Y()}/cron`);return e.ok?e.json():[]}let{invoke:e}=await r(async()=>{let{invoke:e}=await import(`./core-DImejIUG.js`);return{invoke:e}},__vite__mapDeps([0,1]));return e(`list_cron_jobs`)}async function be(e){if(typeof window>`u`||!K()){let t=await c(`${Y()}/cron`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)});if(!t.ok){let e=await t.json().catch(()=>({error:`Failed to create scheduled task.`}));throw Error(e.error||`Failed to create scheduled task.`)}return t.json()}let{invoke:t}=await r(async()=>{let{invoke:e}=await import(`./core-DImejIUG.js`);return{invoke:e}},__vite__mapDeps([0,1]));return t(`add_cron_job`,{draft:e})}async function xe(e){if(typeof window>`u`||!K()){if(!(await c(`${Y()}/cron/${encodeURIComponent(e)}`,{method:`DELETE`})).ok)throw Error(`Failed to remove scheduled task.`);return}let{invoke:t}=await r(async()=>{let{invoke:e}=await import(`./core-DImejIUG.js`);return{invoke:e}},__vite__mapDeps([0,1]));await t(`remove_cron_job`,{id:e})}async function Se(e,t){if(typeof window>`u`||!K()){let n=await c(`${Y()}/cron/${encodeURIComponent(e)}/${t?`enable`:`disable`}`,{method:`POST`});if(!n.ok)throw Error(`Failed to update scheduled task.`);return n.json()}let{invoke:n}=await r(async()=>{let{invoke:e}=await import(`./core-DImejIUG.js`);return{invoke:e}},__vite__mapDeps([0,1]));return n(`set_cron_job_enabled`,{id:e,enabled:t})}async function Ce(){if(typeof window>`u`||!K()){let e=await c(`${Y()}/linked-folders`);return e.ok?e.json():{}}let{invoke:e}=await r(async()=>{let{invoke:e}=await import(`./core-DImejIUG.js`);return{invoke:e}},__vite__mapDeps([0,1]));return e(`list_linked_folders`)}async function we(e){if(typeof window>`u`||!K()){let t=await c(`${Y()}/linked-folders`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)});if(!t.ok){let e=await t.json().catch(()=>({error:`Failed to link folder.`}));throw Error(e.error||`Failed to link folder.`)}return}let{invoke:t}=await r(async()=>{let{invoke:e}=await import(`./core-DImejIUG.js`);return{invoke:e}},__vite__mapDeps([0,1]));await t(`add_linked_folder`,{draft:e})}async function Te(e){if(typeof window>`u`||!K()){if(!(await c(`${Y()}/linked-folders/${encodeURIComponent(e)}`,{method:`DELETE`})).ok)throw Error(`Failed to unlink folder.`);return}let{invoke:t}=await r(async()=>{let{invoke:e}=await import(`./core-DImejIUG.js`);return{invoke:e}},__vite__mapDeps([0,1]));await t(`remove_linked_folder`,{name:e})}async function Ee(e){if(typeof window>`u`||!K())return{name:`Workspace`,path:`.`,kind:`directory`,children:[{name:`src`,path:`src`,kind:`directory`,children:[]},{name:`package.json`,path:`package.json`,kind:`file`,children:[]}]};let{invoke:t}=await r(async()=>{let{invoke:e}=await import(`./core-DImejIUG.js`);return{invoke:e}},__vite__mapDeps([0,1]));return t(`get_workspace_tree`,{path:e})}async function De(e){if(typeof window>`u`||!K())return;let{invoke:t}=await r(async()=>{let{invoke:e}=await import(`./core-DImejIUG.js`);return{invoke:e}},__vite__mapDeps([0,1]));return t(`create_workspace_file`,{path:e})}async function Oe(e){if(typeof window>`u`||!K())return;let{invoke:t}=await r(async()=>{let{invoke:e}=await import(`./core-DImejIUG.js`);return{invoke:e}},__vite__mapDeps([0,1]));return t(`create_workspace_folder`,{path:e})}async function ke(e){if(typeof window>`u`||!K())return;let{invoke:t}=await r(async()=>{let{invoke:e}=await import(`./core-DImejIUG.js`);return{invoke:e}},__vite__mapDeps([0,1]));return t(`delete_workspace_item`,{path:e})}async function Ae(){if(typeof window>`u`||!K())return null;let{invoke:e}=await r(async()=>{let{invoke:e}=await import(`./core-DImejIUG.js`);return{invoke:e}},__vite__mapDeps([0,1]));return await e(`select_workspace_directory`)}async function je(){if(typeof window<`u`&&K()){let{invoke:e}=await r(async()=>{let{invoke:e}=await import(`./core-DImejIUG.js`);return{invoke:e}},__vite__mapDeps([0,1]));return(await e(`select_workspace_directory`))?.trim()||null}try{let e=await c(`${Y()}/select-folder`,{method:`POST`});if(!e.ok)return null;let t=await e.json().catch(()=>null);return(t&&typeof t.path==`string`?t.path.trim():``)||null}catch{return null}}async function Me(){if(typeof window>`u`||!K())return null;let{invoke:e}=await r(async()=>{let{invoke:e}=await import(`./core-DImejIUG.js`);return{invoke:e}},__vite__mapDeps([0,1]));try{return await e(`read_clipboard_image`)}catch(e){return console.warn(`Failed to read clipboard image via Tauri command:`,e),null}}async function Ne(e){let t=await c(`${Y()}/video-generate`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)});if(!t.ok){let e=await t.json().catch(()=>({}));throw Error(e.error||`HTTP ${t.status} from API`)}return t.json()}async function Pe(){if(typeof window>`u`||!K()){let e=X();try{let t=await c(`${e}/video-gen/providers`);if(t.ok)return await t.json()}catch{}}return{active:`veo`,available:[`veo`]}}async function G(e,t){let n=await c(`${Y()}${e}`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(t)});if(!n.ok){let e=await n.json().catch(()=>({}));throw Error(e.error||`HTTP ${n.status}`)}return n.json()}async function Fe(e){return G(`/video/load`,{path:e})}async function Ie(e){return G(`/video/trim`,e)}async function Le(e){return G(`/video/resize`,e)}async function Re(e){return G(`/video/merge`,e)}async function ze(e){return G(`/video/extract-audio`,e)}async function Be(e){return G(`/video/remove-silence`,e)}async function Ve(e){return G(`/video/export`,e)}async function He(e){return G(`/video/render-timeline`,{timeline:e})}async function Ue(e){return G(`/speech/transcribe`,e)}async function We(e){return G(`/speech/detect-silence`,e)}async function Ge(e){return G(`/subtitle/generate`,{segments:e})}async function Ke(e){return G(`/subtitle/translate`,e)}async function qe(e){return G(`/subtitle/burn`,e)}async function Je(e){return G(`/video/make-shorts`,e)}async function Ye(e){return G(`/video/ai-edit`,e)}async function Xe(e){if(typeof window>`u`||!K()){let t=X();try{let n=await c(`${t}/checkpoints?chatId=${encodeURIComponent(e)}`);return n.ok?await n.json():[]}catch(e){return console.error(`Failed to list git checkpoints:`,e),[]}}let{invoke:t}=await r(async()=>{let{invoke:e}=await import(`./core-DImejIUG.js`);return{invoke:e}},__vite__mapDeps([0,1]));return t(`list_git_checkpoints`,{chatId:e})}async function Ze(e,t,n){if(typeof window>`u`||!K()){let r=X();try{return await(await c(`${r}/checkpoints/rollback`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({chatId:e,step:t,workspacePath:n})})).json()}catch(e){return console.error(`Failed to rollback git checkpoint:`,e),{status:`error`,message:e?.message||String(e)}}}let{invoke:i}=await r(async()=>{let{invoke:e}=await import(`./core-DImejIUG.js`);return{invoke:e}},__vite__mapDeps([0,1]));try{return{status:`ok`,message:await i(`rollback_git_checkpoint`,{chatId:e,step:t,workspacePath:n})}}catch(e){return{status:`error`,message:e?.message||String(e)}}}async function Qe(e){if(typeof window>`u`||!K()){let t=X();try{return await(await c(`${t}/checkpoints/undo`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({workspacePath:e})})).json()}catch(e){return console.error(`Failed to undo git checkpoint:`,e),{status:`error`,message:e?.message||String(e)}}}let{invoke:t}=await r(async()=>{let{invoke:e}=await import(`./core-DImejIUG.js`);return{invoke:e}},__vite__mapDeps([0,1]));try{return{status:`ok`,message:await t(`undo_git_checkpoint`,{workspacePath:e})}}catch(e){return{status:`error`,message:e?.message||String(e)}}}var K,q,J,Y,X,Z,Q,$,$e=e((()=>{i(),n(),K=()=>typeof window<`u`&&!!window.__TAURI_INTERNALS__,q=null,J=`/assets/icon.png`,Y=()=>typeof window<`u`&&(window.location.port===`9000`||!window.location.port||window.location.protocol===`https:`)?`/api`:`http://${typeof window<`u`?window.location.hostname:`localhost`}:3000/api`,X=Y,Z=`mint_auth_token`,Q=new Map,$=async(e,t)=>{if(!K())try{let n=`${Y()}/file/read?path=${encodeURIComponent(e)}`;t&&(n+=`&workspace=${encodeURIComponent(t)}`);let r=await fetch(n);if(!r.ok){let e=await r.json().catch(()=>null);throw Error(e?.error||`Failed to read file: ${r.statusText}`)}return(await r.json()).content||``}catch(e){throw console.error(`Failed to read workspace file:`,e),e}let{invoke:n}=await r(async()=>{let{invoke:e}=await import(`./core-DImejIUG.js`);return{invoke:e}},__vite__mapDeps([0,1]));return n(`read_workspace_file`,{path:e,workspacePath:t})}}));export{le as $,ne as A,x as B,L as C,M as D,Y as E,k as F,$ as G,he as H,ye as I,Te as J,b as K,Xe as L,$e as M,H as N,O,K as P,ve as Q,W as R,C as S,R as T,B as U,F as V,Me as W,h as X,j as Y,Ze as Z,_e as _,f as a,_ as at,te as b,l as c,ie as ct,se as d,z as dt,ge as et,P as f,a as ft,I as g,me as h,we as i,ae as it,Pe as j,g as k,p as l,oe as lt,A as m,Qe as mt,be as n,je as nt,u as o,Se as ot,V as p,ee as pt,xe as q,pe as r,Ae as rt,d as s,N as st,J as t,ce as tt,m as u,E as ut,y as v,Ne as w,S as x,w as y,Ce as z};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{n as e}from"./chunk-CacB07dV.js";import{Resource as t,SERIALIZE_TO_IPC_FN as n,invoke as r,t as i}from"./core-DImejIUG.js";import{TauriEvent as a,emit as o,emitTo as s,listen as c,once as l,t as u}from"./event-BNl8Zahw.js";var d,f,p,m,h,g,_=e((()=>{i(),d=class{constructor(...e){this.type=`Logical`,e.length===1?`Logical`in e[0]?(this.width=e[0].Logical.width,this.height=e[0].Logical.height):(this.width=e[0].width,this.height=e[0].height):(this.width=e[0],this.height=e[1])}toPhysical(e){return new f(this.width*e,this.height*e)}[n](){return{width:this.width,height:this.height}}toJSON(){return this[n]()}},f=class{constructor(...e){this.type=`Physical`,e.length===1?`Physical`in e[0]?(this.width=e[0].Physical.width,this.height=e[0].Physical.height):(this.width=e[0].width,this.height=e[0].height):(this.width=e[0],this.height=e[1])}toLogical(e){return new d(this.width/e,this.height/e)}[n](){return{width:this.width,height:this.height}}toJSON(){return this[n]()}},p=class{constructor(e){this.size=e}toLogical(e){return this.size instanceof d?this.size:this.size.toLogical(e)}toPhysical(e){return this.size instanceof f?this.size:this.size.toPhysical(e)}[n](){return{[`${this.size.type}`]:{width:this.size.width,height:this.size.height}}}toJSON(){return this[n]()}},m=class{constructor(...e){this.type=`Logical`,e.length===1?`Logical`in e[0]?(this.x=e[0].Logical.x,this.y=e[0].Logical.y):(this.x=e[0].x,this.y=e[0].y):(this.x=e[0],this.y=e[1])}toPhysical(e){return new h(this.x*e,this.y*e)}[n](){return{x:this.x,y:this.y}}toJSON(){return this[n]()}},h=class{constructor(...e){this.type=`Physical`,e.length===1?`Physical`in e[0]?(this.x=e[0].Physical.x,this.y=e[0].Physical.y):(this.x=e[0].x,this.y=e[0].y):(this.x=e[0],this.y=e[1])}toLogical(e){return new m(this.x/e,this.y/e)}[n](){return{x:this.x,y:this.y}}toJSON(){return this[n]()}},g=class{constructor(e){this.position=e}toLogical(e){return this.position instanceof m?this.position:this.position.toLogical(e)}toPhysical(e){return this.position instanceof h?this.position:this.position.toPhysical(e)}[n](){return{[`${this.position.type}`]:{x:this.position.x,y:this.position.y}}}toJSON(){return this[n]()}}}));function v(e){return e==null?null:typeof e==`string`?e:e instanceof y?e.rid:e}var y,b=e((()=>{i(),y=class e extends t{constructor(e){super(e)}static async new(t,n,i){return r(`plugin:image|new`,{rgba:v(t),width:n,height:i}).then(t=>new e(t))}static async fromBytes(t){return r(`plugin:image|from_bytes`,{bytes:v(t)}).then(t=>new e(t))}static async fromPath(t){return r(`plugin:image|from_path`,{path:t}).then(t=>new e(t))}async rgba(){return r(`plugin:image|rgba`,{rid:this.rid}).then(e=>new Uint8Array(e))}async size(){return r(`plugin:image|size`,{rid:this.rid})}}}));function x(){return new D(window.__TAURI_INTERNALS__.metadata.currentWindow.label,{skip:!0})}async function S(){return r(`plugin:window|get_all_windows`).then(e=>e.map(e=>new D(e,{skip:!0})))}var C,w,T,E,D,O,k,A,j;e((()=>{_(),u(),i(),b(),(function(e){e[e.Critical=1]=`Critical`,e[e.Informational=2]=`Informational`})(C||={}),w=class{constructor(e){this._preventDefault=!1,this.event=e.event,this.id=e.id}preventDefault(){this._preventDefault=!0}isPreventDefault(){return this._preventDefault}},(function(e){e.None=`none`,e.Normal=`normal`,e.Indeterminate=`indeterminate`,e.Paused=`paused`,e.Error=`error`})(T||={}),E=[`tauri://created`,`tauri://error`],D=class{constructor(e,t={}){this.label=e,this.listeners=Object.create(null),t?.skip||r(`plugin:window|create`,{options:{...t,parent:typeof t.parent==`string`?t.parent:t.parent?.label,label:e}}).then(async()=>this.emit(`tauri://created`)).catch(async e=>this.emit(`tauri://error`,e))}static async getByLabel(e){return(await S()).find(t=>t.label===e)??null}static getCurrent(){return x()}static async getAll(){return S()}static async getFocusedWindow(){for(let e of await S())if(await e.isFocused())return e;return null}async listen(e,t){return this._handleTauriEvent(e,t)?()=>{let n=this.listeners[e];n.splice(n.indexOf(t),1)}:c(e,t,{target:{kind:`Window`,label:this.label}})}async once(e,t){return this._handleTauriEvent(e,t)?()=>{let n=this.listeners[e];n.splice(n.indexOf(t),1)}:l(e,t,{target:{kind:`Window`,label:this.label}})}async emit(e,t){if(E.includes(e)){for(let n of this.listeners[e]||[])n({event:e,id:-1,payload:t});return}return o(e,t)}async emitTo(e,t,n){if(E.includes(t)){for(let e of this.listeners[t]||[])e({event:t,id:-1,payload:n});return}return s(e,t,n)}_handleTauriEvent(e,t){return E.includes(e)?(e in this.listeners?this.listeners[e].push(t):this.listeners[e]=[t],!0):!1}async scaleFactor(){return r(`plugin:window|scale_factor`,{label:this.label})}async innerPosition(){return r(`plugin:window|inner_position`,{label:this.label}).then(e=>new h(e))}async outerPosition(){return r(`plugin:window|outer_position`,{label:this.label}).then(e=>new h(e))}async innerSize(){return r(`plugin:window|inner_size`,{label:this.label}).then(e=>new f(e))}async outerSize(){return r(`plugin:window|outer_size`,{label:this.label}).then(e=>new f(e))}async isFullscreen(){return r(`plugin:window|is_fullscreen`,{label:this.label})}async isMinimized(){return r(`plugin:window|is_minimized`,{label:this.label})}async isMaximized(){return r(`plugin:window|is_maximized`,{label:this.label})}async isFocused(){return r(`plugin:window|is_focused`,{label:this.label})}async isDecorated(){return r(`plugin:window|is_decorated`,{label:this.label})}async isResizable(){return r(`plugin:window|is_resizable`,{label:this.label})}async isMaximizable(){return r(`plugin:window|is_maximizable`,{label:this.label})}async isMinimizable(){return r(`plugin:window|is_minimizable`,{label:this.label})}async isClosable(){return r(`plugin:window|is_closable`,{label:this.label})}async isVisible(){return r(`plugin:window|is_visible`,{label:this.label})}async title(){return r(`plugin:window|title`,{label:this.label})}async theme(){return r(`plugin:window|theme`,{label:this.label})}async isAlwaysOnTop(){return r(`plugin:window|is_always_on_top`,{label:this.label})}async activityName(){return r(`plugin:window|activity_name`,{label:this.label})}async sceneIdentifier(){return r(`plugin:window|scene_identifier`,{label:this.label})}async center(){return r(`plugin:window|center`,{label:this.label})}async requestUserAttention(e){let t=null;return e&&(t=e===C.Critical?{type:`Critical`}:{type:`Informational`}),r(`plugin:window|request_user_attention`,{label:this.label,value:t})}async setResizable(e){return r(`plugin:window|set_resizable`,{label:this.label,value:e})}async setEnabled(e){return r(`plugin:window|set_enabled`,{label:this.label,value:e})}async isEnabled(){return r(`plugin:window|is_enabled`,{label:this.label})}async setMaximizable(e){return r(`plugin:window|set_maximizable`,{label:this.label,value:e})}async setMinimizable(e){return r(`plugin:window|set_minimizable`,{label:this.label,value:e})}async setClosable(e){return r(`plugin:window|set_closable`,{label:this.label,value:e})}async setTitle(e){return r(`plugin:window|set_title`,{label:this.label,value:e})}async maximize(){return r(`plugin:window|maximize`,{label:this.label})}async unmaximize(){return r(`plugin:window|unmaximize`,{label:this.label})}async toggleMaximize(){return r(`plugin:window|toggle_maximize`,{label:this.label})}async minimize(){return r(`plugin:window|minimize`,{label:this.label})}async unminimize(){return r(`plugin:window|unminimize`,{label:this.label})}async show(){return r(`plugin:window|show`,{label:this.label})}async hide(){return r(`plugin:window|hide`,{label:this.label})}async close(){return r(`plugin:window|close`,{label:this.label})}async destroy(){return r(`plugin:window|destroy`,{label:this.label})}async setDecorations(e){return r(`plugin:window|set_decorations`,{label:this.label,value:e})}async setShadow(e){return r(`plugin:window|set_shadow`,{label:this.label,value:e})}async setEffects(e){return r(`plugin:window|set_effects`,{label:this.label,value:e})}async clearEffects(){return r(`plugin:window|set_effects`,{label:this.label,value:null})}async setAlwaysOnTop(e){return r(`plugin:window|set_always_on_top`,{label:this.label,value:e})}async setAlwaysOnBottom(e){return r(`plugin:window|set_always_on_bottom`,{label:this.label,value:e})}async setContentProtected(e){return r(`plugin:window|set_content_protected`,{label:this.label,value:e})}async setSize(e){return r(`plugin:window|set_size`,{label:this.label,value:e instanceof p?e:new p(e)})}async setMinSize(e){return r(`plugin:window|set_min_size`,{label:this.label,value:e instanceof p?e:e?new p(e):null})}async setMaxSize(e){return r(`plugin:window|set_max_size`,{label:this.label,value:e instanceof p?e:e?new p(e):null})}async setSizeConstraints(e){function t(e){return e?{Logical:e}:null}return r(`plugin:window|set_size_constraints`,{label:this.label,value:{minWidth:t(e?.minWidth),minHeight:t(e?.minHeight),maxWidth:t(e?.maxWidth),maxHeight:t(e?.maxHeight)}})}async setPosition(e){return r(`plugin:window|set_position`,{label:this.label,value:e instanceof g?e:new g(e)})}async setFullscreen(e){return r(`plugin:window|set_fullscreen`,{label:this.label,value:e})}async setSimpleFullscreen(e){return r(`plugin:window|set_simple_fullscreen`,{label:this.label,value:e})}async setFocus(){return r(`plugin:window|set_focus`,{label:this.label})}async setFocusable(e){return r(`plugin:window|set_focusable`,{label:this.label,value:e})}async setIcon(e){return r(`plugin:window|set_icon`,{label:this.label,value:v(e)})}async setSkipTaskbar(e){return r(`plugin:window|set_skip_taskbar`,{label:this.label,value:e})}async setCursorGrab(e){return r(`plugin:window|set_cursor_grab`,{label:this.label,value:e})}async setCursorVisible(e){return r(`plugin:window|set_cursor_visible`,{label:this.label,value:e})}async setCursorIcon(e){return r(`plugin:window|set_cursor_icon`,{label:this.label,value:e})}async setBackgroundColor(e){return r(`plugin:window|set_background_color`,{color:e})}async setCursorPosition(e){return r(`plugin:window|set_cursor_position`,{label:this.label,value:e instanceof g?e:new g(e)})}async setIgnoreCursorEvents(e){return r(`plugin:window|set_ignore_cursor_events`,{label:this.label,value:e})}async startDragging(){return r(`plugin:window|start_dragging`,{label:this.label})}async startResizeDragging(e){return r(`plugin:window|start_resize_dragging`,{label:this.label,value:e})}async setBadgeCount(e){return r(`plugin:window|set_badge_count`,{label:this.label,value:e})}async setBadgeLabel(e){return r(`plugin:window|set_badge_label`,{label:this.label,value:e})}async setOverlayIcon(e){return r(`plugin:window|set_overlay_icon`,{label:this.label,value:e?v(e):void 0})}async setProgressBar(e){return r(`plugin:window|set_progress_bar`,{label:this.label,value:e})}async setVisibleOnAllWorkspaces(e){return r(`plugin:window|set_visible_on_all_workspaces`,{label:this.label,value:e})}async setTitleBarStyle(e){return r(`plugin:window|set_title_bar_style`,{label:this.label,value:e})}async setTheme(e){return r(`plugin:window|set_theme`,{label:this.label,value:e})}async onResized(e){return this.listen(a.WINDOW_RESIZED,t=>{t.payload=new f(t.payload),e(t)})}async onMoved(e){return this.listen(a.WINDOW_MOVED,t=>{t.payload=new h(t.payload),e(t)})}async onCloseRequested(e){return this.listen(a.WINDOW_CLOSE_REQUESTED,async t=>{let n=new w(t);await e(n),n.isPreventDefault()||await this.destroy()})}async onDragDropEvent(e){let t=await this.listen(a.DRAG_ENTER,t=>{e({...t,payload:{type:`enter`,paths:t.payload.paths,position:new h(t.payload.position)}})}),n=await this.listen(a.DRAG_OVER,t=>{e({...t,payload:{type:`over`,position:new h(t.payload.position)}})}),r=await this.listen(a.DRAG_DROP,t=>{e({...t,payload:{type:`drop`,paths:t.payload.paths,position:new h(t.payload.position)}})}),i=await this.listen(a.DRAG_LEAVE,t=>{e({...t,payload:{type:`leave`}})});return()=>{t(),r(),n(),i()}}async onFocusChanged(e){let t=await this.listen(a.WINDOW_FOCUS,t=>{e({...t,payload:!0})}),n=await this.listen(a.WINDOW_BLUR,t=>{e({...t,payload:!1})});return()=>{t(),n()}}async onScaleChanged(e){return this.listen(a.WINDOW_SCALE_FACTOR_CHANGED,e)}async onThemeChanged(e){return this.listen(a.WINDOW_THEME_CHANGED,e)}},(function(e){e.Disabled=`disabled`,e.Throttle=`throttle`,e.Suspend=`suspend`})(O||={}),(function(e){e.Default=`default`,e.FluentOverlay=`fluentOverlay`})(k||={}),(function(e){e.AppearanceBased=`appearanceBased`,e.Light=`light`,e.Dark=`dark`,e.MediumLight=`mediumLight`,e.UltraDark=`ultraDark`,e.Titlebar=`titlebar`,e.Selection=`selection`,e.Menu=`menu`,e.Popover=`popover`,e.Sidebar=`sidebar`,e.HeaderView=`headerView`,e.Sheet=`sheet`,e.WindowBackground=`windowBackground`,e.HudWindow=`hudWindow`,e.FullScreenUI=`fullScreenUI`,e.Tooltip=`tooltip`,e.ContentBackground=`contentBackground`,e.UnderWindowBackground=`underWindowBackground`,e.UnderPageBackground=`underPageBackground`,e.Mica=`mica`,e.Blur=`blur`,e.Acrylic=`acrylic`,e.Tabbed=`tabbed`,e.TabbedDark=`tabbedDark`,e.TabbedLight=`tabbedLight`})(A||={}),(function(e){e.FollowsWindowActiveState=`followsWindowActiveState`,e.Active=`active`,e.Inactive=`inactive`})(j||={})}))();export{x as getCurrentWindow};
|