@pheem49/mint 1.16.0 → 1.18.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Cargo.lock +6 -6
- package/Cargo.toml +2 -2
- package/README.md +8 -2
- package/Release_Note.md +222 -72
- package/apps/mint-companion/src-tauri/src/compact.rs +69 -0
- package/apps/mint-companion/src-tauri/src/main.rs +218 -11
- package/apps/mint-companion/vite.config.ts +2 -1
- package/crates/mint-cli/src/agent/diff_render.rs +66 -44
- package/crates/mint-cli/src/agent/live_status.rs +64 -6
- package/crates/mint-cli/src/agent/markdown_render.rs +342 -5
- package/crates/mint-cli/src/agent.rs +202 -47
- package/crates/mint-cli/src/commands/agent.rs +223 -117
- package/crates/mint-cli/src/commands/browser.rs +114 -0
- package/crates/mint-cli/src/commands/config.rs +14 -1
- package/crates/mint-cli/src/commands/integrations.rs +3 -3
- package/crates/mint-cli/src/commands/knowledge.rs +16 -2
- package/crates/mint-cli/src/commands/mod.rs +15 -4
- package/crates/mint-cli/src/commands/tailnet_web.rs +3 -7
- package/crates/mint-cli/src/companion_navigation.rs +268 -0
- package/crates/mint-cli/src/interactive/chat_tui/dialog.rs +572 -0
- package/crates/mint-cli/src/interactive/chat_tui/mod.rs +1427 -0
- package/crates/mint-cli/src/interactive/chat_tui/render.rs +1524 -0
- package/crates/mint-cli/src/interactive/chat_tui/selection.rs +401 -0
- package/crates/mint-cli/src/interactive/chat_tui/state.rs +1833 -0
- package/crates/mint-cli/src/interactive/chat_tui/tests.rs +3414 -0
- package/crates/mint-cli/src/interactive/chat_tui/thought.rs +202 -0
- package/crates/mint-cli/src/interactive/chat_tui/transcript.rs +728 -0
- package/crates/mint-cli/src/interactive/chat_tui/watermark.rs +148 -0
- package/crates/mint-cli/src/interactive/command_ui.rs +92 -5
- package/crates/mint-cli/src/interactive/composer.rs +186 -0
- package/crates/mint-cli/src/interactive/format.rs +78 -3
- package/crates/mint-cli/src/interactive/input_box.rs +61 -1
- package/crates/mint-cli/src/interactive/resume_picker.rs +367 -25
- package/crates/mint-cli/src/interactive/slash_commands.rs +758 -373
- package/crates/mint-cli/src/interactive/tool_activity.rs +468 -56
- package/crates/mint-cli/src/interactive.rs +74 -5
- package/crates/mint-cli/src/main.rs +26 -2
- package/crates/mint-cli/src/markdown.rs +2 -37
- package/crates/mint-cli/src/onboard.rs +3897 -1321
- package/crates/mint-cli/src/setup.rs +1342 -624
- package/crates/mint-cli/src/terminal_theme.rs +159 -35
- package/crates/mint-cli/tests/library_intake.rs +1 -0
- package/crates/mint-cli/tests/mods_testing.rs +5 -1
- package/crates/mint-companion-protocol/src/lib.rs +113 -0
- package/crates/mint-core/src/agent/chat/anthropic.rs +318 -0
- package/crates/mint-core/src/agent/chat/custom.rs +149 -0
- package/crates/mint-core/src/agent/chat/gemini.rs +518 -0
- package/crates/mint-core/src/agent/chat/mod.rs +857 -0
- package/crates/mint-core/src/agent/chat/ollama.rs +321 -0
- package/crates/mint-core/src/agent/chat/openai.rs +582 -0
- package/crates/mint-core/src/agent/chat/streaming.rs +469 -0
- package/crates/mint-core/src/agent/chat/tests.rs +1479 -0
- package/crates/mint-core/src/agent/memory.rs +129 -8
- package/crates/mint-core/src/agent/safety.rs +56 -4
- package/crates/mint-core/src/agent/skill_inventory.rs +3 -1
- package/crates/mint-core/src/agent/skills.rs +1 -0
- package/crates/mint-core/src/agent/tasks.rs +2 -2
- package/crates/mint-core/src/api_server/routes/auth.rs +1 -4
- package/crates/mint-core/src/api_server/routes/chat.rs +53 -17
- package/crates/mint-core/src/api_server/routes/gemini_live.rs +14 -1
- package/crates/mint-core/src/api_server/routes/html_preview.rs +1 -8
- package/crates/mint-core/src/api_server/routes/misc.rs +116 -0
- package/crates/mint-core/src/api_server/routes/profile_oauth.rs +43 -26
- package/crates/mint-core/src/api_server/routes/sessions.rs +114 -76
- package/crates/mint-core/src/api_server/routes/skills_subagents.rs +11 -7
- package/crates/mint-core/src/api_server/routes/status_health.rs +18 -8
- package/crates/mint-core/src/api_server.rs +211 -65
- package/crates/mint-core/src/avatar_bridge.rs +5 -24
- package/crates/mint-core/src/browser/cdp.rs +92 -30
- package/crates/mint-core/src/browser/headless.rs +582 -0
- package/crates/mint-core/src/browser/input.rs +7 -62
- package/crates/mint-core/src/browser/interact.rs +0 -14
- package/crates/mint-core/src/browser/mod.rs +10 -30
- package/crates/mint-core/src/browser/navigate.rs +83 -44
- package/crates/mint-core/src/browser/runtime.rs +282 -0
- package/crates/mint-core/src/browser/session.rs +240 -400
- package/crates/mint-core/src/browser/workflow.rs +496 -0
- package/crates/mint-core/src/companion/navigation.rs +115 -0
- package/crates/mint-core/src/companion.rs +109 -1
- package/crates/mint-core/src/cron/store.rs +2 -2
- package/crates/mint-core/src/integrations/mcp.rs +6 -8
- package/crates/mint-core/src/integrations/mcp_result.rs +45 -0
- package/crates/mint-core/src/lib.rs +10 -11
- package/crates/mint-core/src/media/gemini_live.rs +636 -86
- package/crates/mint-core/src/media/image_proxy.rs +563 -0
- package/crates/mint-core/src/media/library/migration.rs +26 -0
- package/crates/mint-core/src/media/library/tests.rs +1 -1
- package/crates/mint-core/src/media/library/thumbnails.rs +8 -2
- package/crates/mint-core/src/media/pictures.rs +1 -1
- package/crates/mint-core/src/media/tool_images.rs +287 -0
- package/crates/mint-core/src/media/tts/playback.rs +609 -0
- package/crates/mint-core/src/media/tts.rs +1 -0
- package/crates/mint-core/src/media.rs +2 -0
- package/crates/mint-core/src/mods/manager.rs +101 -35
- package/crates/mint-core/src/orchestration/context_render.rs +878 -44
- package/crates/mint-core/src/orchestration/decision_parsing.rs +536 -39
- package/crates/mint-core/src/orchestration/diagnostics.rs +307 -0
- package/crates/mint-core/src/orchestration/full_skill_result_tests.rs +12 -0
- package/crates/mint-core/src/orchestration/image_regressions.rs +379 -0
- package/crates/mint-core/src/orchestration/loop_guard.rs +479 -0
- package/crates/mint-core/src/orchestration/mcp_outcome_tests.rs +864 -0
- package/crates/mint-core/src/orchestration/memory_skill.rs +88 -28
- package/crates/mint-core/src/orchestration/mod.rs +859 -4244
- package/crates/mint-core/src/orchestration/reliability.rs +581 -0
- package/crates/mint-core/src/orchestration/repeated_failures.rs +8 -0
- package/crates/mint-core/src/orchestration/review_regressions.rs +179 -28
- package/crates/mint-core/src/orchestration/tests.rs +1665 -0
- package/crates/mint-core/src/orchestration/tools/dispatch.rs +967 -0
- package/crates/mint-core/src/orchestration/tools/files.rs +32 -3
- package/crates/mint-core/src/orchestration/tools/mod.rs +5 -1
- package/crates/mint-core/src/orchestration/tools/planning.rs +102 -42
- package/crates/mint-core/src/orchestration/tools/plugins_mcp.rs +19 -4
- package/crates/mint-core/src/orchestration/tools/project.rs +1 -1
- package/crates/mint-core/src/orchestration/tools/shell.rs +157 -62
- package/crates/mint-core/src/orchestration/tools/web.rs +5 -1
- package/crates/mint-core/src/orchestration/trajectory_schema.rs +353 -0
- package/crates/mint-core/src/orchestration/truncation.rs +368 -0
- package/crates/mint-core/src/orchestration/types.rs +648 -0
- package/crates/mint-core/src/orchestration/verification.rs +36 -9
- package/crates/mint-core/src/orchestration/workspace_helpers.rs +76 -27
- package/crates/mint-core/src/prompts/agent.rs +69 -102
- package/crates/mint-core/src/prompts/tool_catalog.rs +104 -153
- package/crates/mint-core/src/search/files.rs +20 -0
- package/crates/mint-core/src/search/web_search.rs +44 -3
- package/crates/mint-core/src/slash/mod.rs +481 -55
- package/crates/mint-core/src/slash/models.rs +6 -1
- package/crates/mint-core/src/swarm/batch.rs +643 -0
- package/crates/mint-core/src/swarm/dossier.rs +152 -0
- package/crates/mint-core/src/swarm/labels.rs +100 -0
- package/crates/mint-core/src/swarm/mod.rs +158 -0
- package/crates/mint-core/src/swarm/permissions.rs +167 -0
- package/crates/mint-core/src/system/auth.rs +156 -7
- package/crates/mint-core/src/system/bg_shell.rs +78 -9
- package/crates/mint-core/src/system/config.rs +266 -35
- package/crates/mint-core/src/system/mint_web.rs +33 -12
- package/crates/mint-core/src/system/shell.rs +179 -10
- package/crates/mint-core/src/system/workspace.rs +204 -0
- package/crates/mint-core/tests/background_retention.rs +1 -1
- package/crates/mint-core/tests/memory_persistence.rs +27 -0
- package/crates/mint-mod-runtime/src/lib.rs +37 -23
- package/out/web/assets/ArtifactPreviewPanel-Cx6BVOOF.js +2 -0
- package/out/web/assets/ArtifactPreviewPanel-DAT_Y7i0.css +1 -0
- package/out/web/assets/CalculationCard-D2E74u5q.js +1 -0
- package/out/web/assets/CliSessionsView-ZbdtSjvK.css +1 -0
- package/out/web/assets/CliSessionsView-z5i6qGyb.js +1 -0
- package/out/web/assets/CodeReviewPage-BK2bOScd.css +1 -0
- package/out/web/assets/CodeReviewPage-Dp6zHuHu.js +2 -0
- package/out/web/assets/CommandPalette-DaKlzbKs.js +1 -0
- package/out/web/assets/ImageGenCard-BMCJHP9O.js +1 -0
- package/out/web/assets/ImageSearchCard-Cld_SOUg.js +1 -0
- package/out/web/assets/ImageStudioPanel-B5N7TjeB.js +1 -0
- package/out/web/assets/LibraryPage-CMB89rJ0.css +1 -0
- package/out/web/assets/LibraryPage-DbZEi4W_.js +2 -0
- package/out/web/assets/LinkedFoldersView-9B9DIPoZ.js +1 -0
- package/out/web/assets/McpRegistryPicker-DnXPlzI7.js +1 -0
- package/out/web/assets/McpServersView-CiNBNUl4.js +1 -0
- package/out/web/assets/MermaidCard-BBDNEXbY.js +2 -0
- package/out/web/assets/MintDashboard-C_UYPoNV.js +119 -0
- package/out/web/assets/MintDashboard-DTd8C_c8.css +1 -0
- package/out/web/assets/PlanCard-C2x5pajq.js +1 -0
- package/out/web/assets/PluginsView-DoTg9MVa.js +1 -0
- package/out/web/assets/RewindModal-B5oowrR0.js +1 -0
- package/out/web/assets/ScheduledTasksView-BD5DVPkZ.js +1 -0
- package/out/web/assets/SelectField-Cy6CghrU.js +1 -0
- package/out/web/assets/SelectField-lFEkkWCU.css +1 -0
- package/out/web/assets/SettingsWindow-BYl_oCFh.js +4 -0
- package/out/web/assets/SettingsWindow-Ckcgnjt8.css +1 -0
- package/out/web/assets/SkillsView-CIeWwq5z.js +2 -0
- package/out/web/assets/StockCard-DxUciKyp.js +1 -0
- package/out/web/assets/ToolSurfacePage-qBgs_VHq.css +1 -0
- package/out/web/assets/ToolSurfacePage-saVbVrkE.js +38 -0
- package/out/web/assets/UiFeatureCard-CdY0hGWy.js +1 -0
- package/out/web/assets/UiGridCard-BBK3I5hC.js +1 -0
- package/out/web/assets/UiMockupWidget-CpR9EDuc.js +1 -0
- package/out/web/assets/{VeoStudioPanel-DOj7_WR3.css → VeoStudioPanel-9kU9YLEN.css} +1 -1
- package/out/web/assets/VeoStudioPanel-Co6-wEWM.js +4 -0
- package/out/web/assets/WeatherCard-Buzi7Vfu.js +1 -0
- package/out/web/assets/WorkspacePanel-BfHKkulU.js +1 -0
- package/out/web/assets/WorkspacePdfPreview-Bi8Zzyir.js +2 -0
- package/out/web/assets/abnfDiagram-VCTEODGH-CMfR95N2.js +1 -0
- package/out/web/assets/architecture-7GRP2DOG-DhAM4HyO.js +1 -0
- package/out/web/assets/architectureDiagram-5GKGNRK7-Yk3TUJ_F.js +36 -0
- package/out/web/assets/{blockDiagram-NRAW4CY4-BrrqzHW5.js → blockDiagram-I7D4REHJ-X9fBgJik.js} +4 -4
- package/out/web/assets/c4Diagram-7LVT6UL2-Bk9x7N-8.js +38 -0
- package/out/web/assets/chunk-2Q5K7J3B-D2JLPQzF.js +1 -0
- package/out/web/assets/{chunk-TEH6E4GO-G4Cdlyrt.js → chunk-4HAMMTFA-Dx5fk1_0.js} +3 -3
- package/out/web/assets/{chunk-5VM5RSS4-BiPuE0io.js → chunk-5VM5RSS4-BZ2oBPYQ.js} +1 -1
- package/out/web/assets/chunk-75Z2AOVW-BszTQoM4.js +2 -0
- package/out/web/assets/chunk-DU6HZSFF-DK-As3rk.js +128 -0
- package/out/web/assets/chunk-F27PBJKO-LmncZZIS.js +1 -0
- package/out/web/assets/chunk-FOHPRMQF-JXEeeJ9r.js +161 -0
- package/out/web/assets/{chunk-GMAD6QVW-BuhEcgHq.js → chunk-GMAD6QVW-DSQ_sDRJ.js} +12 -12
- package/out/web/assets/chunk-GVQU2GXP-Cno3ulje.js +1 -0
- package/out/web/assets/chunk-IMKFNOWR-bIzfY9Jc.js +231 -0
- package/out/web/assets/chunk-JWPE2WC7-BeEMUFDw.js +1 -0
- package/out/web/assets/chunk-L3NEJ4N5-Dl6eOa0D.js +1 -0
- package/out/web/assets/chunk-OSK3NFVY-BaUGJ-cM.js +10 -0
- package/out/web/assets/chunk-P2QGCYS3-_066ndhH.js +1 -0
- package/out/web/assets/chunk-POPQ4Y6H-YT1AKhTv.js +1 -0
- package/out/web/assets/chunk-PWAF6VOD-CrEgDsxh.js +1 -0
- package/out/web/assets/chunk-SHT3W25Y-_KwaRLOl.js +168 -0
- package/out/web/assets/{chunk-SVP7TREG-Bu_yYb-V.js → chunk-SVP7TREG-BQ1qb32L.js} +1 -1
- package/out/web/assets/{chunk-LCL6LL3I-BhXV9zyH.js → chunk-TICWLB2K-BDyehCtg.js} +4 -4
- package/out/web/assets/chunk-XXDRQBXY-B9YlhOkE.js +1 -0
- package/out/web/assets/chunk-Y2CYZVJY-BxCWjNVG.js +1 -0
- package/out/web/assets/classDiagram-ZZMXUADV-BoSpzRCJ.js +1 -0
- package/out/web/assets/classDiagram-v2-VYDZK3BY-BoSpzRCJ.js +1 -0
- package/out/web/assets/config-2suVFPZg.css +1 -0
- package/out/web/assets/config-CkRCdkxn.js +2 -0
- package/out/web/assets/core-Mi3s5D4_.js +1 -0
- package/out/web/assets/cose-bilkent-JH36ORCC-qlna31ty.js +1 -0
- package/out/web/assets/cynefin-OW5HDTMX-Dl_31aaN.js +1 -0
- package/out/web/assets/cynefinDiagram-5FMLGOSQ-Bpir8jha.js +62 -0
- package/out/web/assets/cytoscape.esm-DWtAUG0r.js +321 -0
- package/out/web/assets/dagre-CnWJJM5f.js +1 -0
- package/out/web/assets/dagre-GXQ25YYZ-D9xu3nsq.js +4 -0
- package/out/web/assets/diagram-S7CK7UJ4-DeveoEeB.js +30 -0
- package/out/web/assets/diagram-UQ7AKVKN-p4xWRESV.js +41 -0
- package/out/web/assets/{diagram-VSXAHHWV-BJ86Ov2Y.js → diagram-VSXAHHWV-C7qz9NDF.js} +1 -1
- package/out/web/assets/diagram-VX7I27RA-DRiCa3Vd.js +24 -0
- package/out/web/assets/diagram-Z3DM3KII-Bt7zduQX.js +24 -0
- package/out/web/assets/dist-9ISJ7r-g.js +1 -0
- package/out/web/assets/dist-js-BV3mI7uw.js +1 -0
- package/out/web/assets/ebnfDiagram-PWID7BFC-DV9WpwdR.js +1 -0
- package/out/web/assets/{erDiagram-SSCWMZ5O-CzzmnZWT.js → erDiagram-RLTQ6QDP-BJ_nwG2m.js} +3 -3
- package/out/web/assets/event-D7D-EBy9.js +1 -0
- package/out/web/assets/eventmodeling-NTZA5JFV-BTBMrfVa.js +1 -0
- package/out/web/assets/flowDiagram-HODETNUW-Cdlq3cJL.js +1 -0
- package/out/web/assets/ganttDiagram-EL5Y4UJY-DQLdsXrC.js +292 -0
- package/out/web/assets/gitGraph-4MIJSDKK-CL1OEOQ_.js +1 -0
- package/out/web/assets/gitGraphDiagram-WWUBYQGX-8cSi42H7.js +106 -0
- package/out/web/assets/graphlib-Bh9gHply.js +1 -0
- package/out/web/assets/index-BocxnrDG.js +168 -0
- package/out/web/assets/index-yeh_r55a.css +1 -0
- package/out/web/assets/info-A6RAGUB7-C1zsX5sc.js +1 -0
- package/out/web/assets/infoDiagram-27XIBGKW-DsRYtIyI.js +2 -0
- package/out/web/assets/{ishikawaDiagram-5VMMS53U-s38yo28y.js → ishikawaDiagram-5VMMS53U-B2crwIXj.js} +4 -4
- package/out/web/assets/journeyDiagram-3NMN7TZE-BTH-GyVR.js +139 -0
- package/out/web/assets/jsx-runtime-DmUwWVTj.js +1 -0
- package/out/web/assets/{kanban-definition-3QL26DDD-DodjgySL.js → kanban-definition-UXKFOSKX-BeRfCnuA.js} +6 -6
- package/out/web/assets/katex-MCdQaEAD.js +257 -0
- package/out/web/assets/mermaid-parser.core-BJwgCBBc.js +7 -0
- package/out/web/assets/mermaid.core-CsDDodN8.js +44 -0
- package/out/web/assets/{mindmap-definition-FBJOCRG2-260WBDxZ.js → mindmap-definition-YA3MSWOX-B42efOQ1.js} +4 -4
- package/out/web/assets/modelManager-B3ZFMh8v.js +2 -0
- package/out/web/assets/oauthManager-Ch5Du2fF.js +1 -0
- package/out/web/assets/packet-AYTQ26CC-B6xUyE6r.js +1 -0
- package/out/web/assets/pdf-Bcahc2yC.js +56 -0
- package/out/web/assets/pdf.worker.min-Dkey6ZUl.mjs +27 -0
- package/out/web/assets/pegDiagram-XKGWAZYB-1LabVycL.js +1 -0
- package/out/web/assets/pie-WAS4IAKB-DJwo-nf_.js +1 -0
- package/out/web/assets/pieDiagram-E7YTZNPT-icmAqzy4.js +39 -0
- package/out/web/assets/{quadrantDiagram-AXDQQJYC-B8D3gU5d.js → quadrantDiagram-AXDQQJYC-CZ-wEx41.js} +4 -4
- package/out/web/assets/radar-RG4KPBEZ-D7d-Xriw.js +1 -0
- package/out/web/assets/railroad-74A4TZTK-viuhdYbs.js +1 -0
- package/out/web/assets/railroad-abnf-HS5TGJTU-DNXiCNea.js +1 -0
- package/out/web/assets/railroad-ebnf-LZEXJU2U-nkSu1-0C.js +1 -0
- package/out/web/assets/railroad-peg-WCYAUIDC-BhbMeQzz.js +1 -0
- package/out/web/assets/railroadDiagram-O6MQD6OU-CLpG1jUX.js +1 -0
- package/out/web/assets/{requirementDiagram-EFPCY7ZU-D2X-Ewik.js → requirementDiagram-BXWQKSXE-kRDrvWrc.js} +3 -3
- package/out/web/assets/rolldown-runtime-CNOWq4Kh.js +1 -0
- package/out/web/assets/rough.esm-CNnFptCR.js +1 -0
- package/out/web/assets/sankeyDiagram-P5KCCOFB-DxAwmq4x.js +40 -0
- package/out/web/assets/sequenceDiagram-WJ2MYXX4-aLgY-6Wz.js +162 -0
- package/out/web/assets/sizeCapture-INFHLROL-C8Q8DbV5.js +1 -0
- package/out/web/assets/src-CRDfRlHM.js +1 -0
- package/out/web/assets/stateDiagram-D77RDMKH-D5QWfOhp.js +1 -0
- package/out/web/assets/stateDiagram-v2-MP3YSRHH-D6OiZoAP.js +1 -0
- package/out/web/assets/studio-BBZQ_-QK.js +1 -0
- package/out/web/assets/swimlanes-42K2YHIH-CRs5UyA-.js +1 -0
- package/out/web/assets/swimlanesDiagram-VR7AAH4N-UgEXIsV0.js +8 -0
- package/out/web/assets/syntaxHighlight-C-wAGT84.js +3 -0
- package/out/web/assets/timeline-definition-24CTP7MA-Denqd9qb.js +120 -0
- package/out/web/assets/treeView-Q6P3EWNA-0my3Z3s4.js +1 -0
- package/out/web/assets/treemap-WGGIJYW6-B_EjkLYq.js +1 -0
- package/out/web/assets/vennDiagram-4TSXK5OY-DxVg3Ewr.js +34 -0
- package/out/web/assets/wardley-WFR3VGLG-CGD-Tj4p.js +1 -0
- package/out/web/assets/{wardleyDiagram-VM6X3IG4-DAdXELbQ.js → wardleyDiagram-VM6X3IG4-CmfS39Xm.js} +35 -35
- package/out/web/assets/window-CkUOP7t0.js +1 -0
- package/out/web/assets/workspaces-SYPrmbgC.js +1 -0
- package/out/web/assets/{xychartDiagram-S5SC5T6Z-IZIXf3Vo.js → xychartDiagram-S5SC5T6Z-BVM9bKis.js} +4 -4
- package/out/web/index-web.html +4 -4
- package/out/web/index.html +4 -4
- package/out/web/pdfjs/cmaps/78-EUC-H.bcmap +0 -0
- package/out/web/pdfjs/cmaps/78-EUC-V.bcmap +0 -0
- package/out/web/pdfjs/cmaps/78-H.bcmap +0 -0
- package/out/web/pdfjs/cmaps/78-RKSJ-H.bcmap +0 -0
- package/out/web/pdfjs/cmaps/78-RKSJ-V.bcmap +0 -0
- package/out/web/pdfjs/cmaps/78-V.bcmap +0 -0
- package/out/web/pdfjs/cmaps/78ms-RKSJ-H.bcmap +0 -0
- package/out/web/pdfjs/cmaps/78ms-RKSJ-V.bcmap +0 -0
- package/out/web/pdfjs/cmaps/83pv-RKSJ-H.bcmap +0 -0
- package/out/web/pdfjs/cmaps/90ms-RKSJ-H.bcmap +0 -0
- package/out/web/pdfjs/cmaps/90ms-RKSJ-V.bcmap +0 -0
- package/out/web/pdfjs/cmaps/90msp-RKSJ-H.bcmap +0 -0
- package/out/web/pdfjs/cmaps/90msp-RKSJ-V.bcmap +0 -0
- package/out/web/pdfjs/cmaps/90pv-RKSJ-H.bcmap +0 -0
- package/out/web/pdfjs/cmaps/90pv-RKSJ-V.bcmap +0 -0
- package/out/web/pdfjs/cmaps/Add-H.bcmap +0 -0
- package/out/web/pdfjs/cmaps/Add-RKSJ-H.bcmap +0 -0
- package/out/web/pdfjs/cmaps/Add-RKSJ-V.bcmap +0 -0
- package/out/web/pdfjs/cmaps/Add-V.bcmap +0 -0
- package/out/web/pdfjs/cmaps/Adobe-CNS1-0.bcmap +0 -0
- package/out/web/pdfjs/cmaps/Adobe-CNS1-1.bcmap +0 -0
- package/out/web/pdfjs/cmaps/Adobe-CNS1-2.bcmap +0 -0
- package/out/web/pdfjs/cmaps/Adobe-CNS1-3.bcmap +0 -0
- package/out/web/pdfjs/cmaps/Adobe-CNS1-4.bcmap +0 -0
- package/out/web/pdfjs/cmaps/Adobe-CNS1-5.bcmap +0 -0
- package/out/web/pdfjs/cmaps/Adobe-CNS1-6.bcmap +0 -0
- package/out/web/pdfjs/cmaps/Adobe-CNS1-UCS2.bcmap +0 -0
- package/out/web/pdfjs/cmaps/Adobe-GB1-0.bcmap +0 -0
- package/out/web/pdfjs/cmaps/Adobe-GB1-1.bcmap +0 -0
- package/out/web/pdfjs/cmaps/Adobe-GB1-2.bcmap +0 -0
- package/out/web/pdfjs/cmaps/Adobe-GB1-3.bcmap +0 -0
- package/out/web/pdfjs/cmaps/Adobe-GB1-4.bcmap +0 -0
- package/out/web/pdfjs/cmaps/Adobe-GB1-5.bcmap +0 -0
- package/out/web/pdfjs/cmaps/Adobe-GB1-UCS2.bcmap +0 -0
- package/out/web/pdfjs/cmaps/Adobe-Japan1-0.bcmap +0 -0
- package/out/web/pdfjs/cmaps/Adobe-Japan1-1.bcmap +0 -0
- package/out/web/pdfjs/cmaps/Adobe-Japan1-2.bcmap +0 -0
- package/out/web/pdfjs/cmaps/Adobe-Japan1-3.bcmap +0 -0
- package/out/web/pdfjs/cmaps/Adobe-Japan1-4.bcmap +0 -0
- package/out/web/pdfjs/cmaps/Adobe-Japan1-5.bcmap +0 -0
- package/out/web/pdfjs/cmaps/Adobe-Japan1-6.bcmap +0 -0
- package/out/web/pdfjs/cmaps/Adobe-Japan1-UCS2.bcmap +0 -0
- package/out/web/pdfjs/cmaps/Adobe-Korea1-0.bcmap +0 -0
- package/out/web/pdfjs/cmaps/Adobe-Korea1-1.bcmap +0 -0
- package/out/web/pdfjs/cmaps/Adobe-Korea1-2.bcmap +0 -0
- package/out/web/pdfjs/cmaps/Adobe-Korea1-UCS2.bcmap +0 -0
- package/out/web/pdfjs/cmaps/B5-H.bcmap +0 -0
- package/out/web/pdfjs/cmaps/B5-V.bcmap +0 -0
- package/out/web/pdfjs/cmaps/B5pc-H.bcmap +0 -0
- package/out/web/pdfjs/cmaps/B5pc-V.bcmap +0 -0
- package/out/web/pdfjs/cmaps/CNS-EUC-H.bcmap +0 -0
- package/out/web/pdfjs/cmaps/CNS-EUC-V.bcmap +0 -0
- package/out/web/pdfjs/cmaps/CNS1-H.bcmap +0 -0
- package/out/web/pdfjs/cmaps/CNS1-V.bcmap +0 -0
- package/out/web/pdfjs/cmaps/CNS2-H.bcmap +0 -0
- package/out/web/pdfjs/cmaps/CNS2-V.bcmap +3 -0
- package/out/web/pdfjs/cmaps/ETHK-B5-H.bcmap +0 -0
- package/out/web/pdfjs/cmaps/ETHK-B5-V.bcmap +0 -0
- package/out/web/pdfjs/cmaps/ETen-B5-H.bcmap +0 -0
- package/out/web/pdfjs/cmaps/ETen-B5-V.bcmap +0 -0
- package/out/web/pdfjs/cmaps/ETenms-B5-H.bcmap +3 -0
- package/out/web/pdfjs/cmaps/ETenms-B5-V.bcmap +0 -0
- package/out/web/pdfjs/cmaps/EUC-H.bcmap +0 -0
- package/out/web/pdfjs/cmaps/EUC-V.bcmap +0 -0
- package/out/web/pdfjs/cmaps/Ext-H.bcmap +0 -0
- package/out/web/pdfjs/cmaps/Ext-RKSJ-H.bcmap +0 -0
- package/out/web/pdfjs/cmaps/Ext-RKSJ-V.bcmap +0 -0
- package/out/web/pdfjs/cmaps/Ext-V.bcmap +0 -0
- package/out/web/pdfjs/cmaps/GB-EUC-H.bcmap +0 -0
- package/out/web/pdfjs/cmaps/GB-EUC-V.bcmap +0 -0
- package/out/web/pdfjs/cmaps/GB-H.bcmap +4 -0
- package/out/web/pdfjs/cmaps/GB-V.bcmap +0 -0
- package/out/web/pdfjs/cmaps/GBK-EUC-H.bcmap +0 -0
- package/out/web/pdfjs/cmaps/GBK-EUC-V.bcmap +0 -0
- package/out/web/pdfjs/cmaps/GBK2K-H.bcmap +0 -0
- package/out/web/pdfjs/cmaps/GBK2K-V.bcmap +0 -0
- package/out/web/pdfjs/cmaps/GBKp-EUC-H.bcmap +0 -0
- package/out/web/pdfjs/cmaps/GBKp-EUC-V.bcmap +0 -0
- package/out/web/pdfjs/cmaps/GBT-EUC-H.bcmap +0 -0
- package/out/web/pdfjs/cmaps/GBT-EUC-V.bcmap +0 -0
- package/out/web/pdfjs/cmaps/GBT-H.bcmap +0 -0
- package/out/web/pdfjs/cmaps/GBT-V.bcmap +0 -0
- package/out/web/pdfjs/cmaps/GBTpc-EUC-H.bcmap +0 -0
- package/out/web/pdfjs/cmaps/GBTpc-EUC-V.bcmap +0 -0
- package/out/web/pdfjs/cmaps/GBpc-EUC-H.bcmap +0 -0
- package/out/web/pdfjs/cmaps/GBpc-EUC-V.bcmap +0 -0
- package/out/web/pdfjs/cmaps/H.bcmap +0 -0
- package/out/web/pdfjs/cmaps/HKdla-B5-H.bcmap +0 -0
- package/out/web/pdfjs/cmaps/HKdla-B5-V.bcmap +0 -0
- package/out/web/pdfjs/cmaps/HKdlb-B5-H.bcmap +0 -0
- package/out/web/pdfjs/cmaps/HKdlb-B5-V.bcmap +0 -0
- package/out/web/pdfjs/cmaps/HKgccs-B5-H.bcmap +0 -0
- package/out/web/pdfjs/cmaps/HKgccs-B5-V.bcmap +0 -0
- package/out/web/pdfjs/cmaps/HKm314-B5-H.bcmap +0 -0
- package/out/web/pdfjs/cmaps/HKm314-B5-V.bcmap +0 -0
- package/out/web/pdfjs/cmaps/HKm471-B5-H.bcmap +0 -0
- package/out/web/pdfjs/cmaps/HKm471-B5-V.bcmap +0 -0
- package/out/web/pdfjs/cmaps/HKscs-B5-H.bcmap +0 -0
- package/out/web/pdfjs/cmaps/HKscs-B5-V.bcmap +0 -0
- package/out/web/pdfjs/cmaps/Hankaku.bcmap +0 -0
- package/out/web/pdfjs/cmaps/Hiragana.bcmap +0 -0
- package/out/web/pdfjs/cmaps/KSC-EUC-H.bcmap +0 -0
- package/out/web/pdfjs/cmaps/KSC-EUC-V.bcmap +0 -0
- package/out/web/pdfjs/cmaps/KSC-H.bcmap +0 -0
- package/out/web/pdfjs/cmaps/KSC-Johab-H.bcmap +0 -0
- package/out/web/pdfjs/cmaps/KSC-Johab-V.bcmap +0 -0
- package/out/web/pdfjs/cmaps/KSC-V.bcmap +0 -0
- package/out/web/pdfjs/cmaps/KSCms-UHC-H.bcmap +0 -0
- package/out/web/pdfjs/cmaps/KSCms-UHC-HW-H.bcmap +0 -0
- package/out/web/pdfjs/cmaps/KSCms-UHC-HW-V.bcmap +0 -0
- package/out/web/pdfjs/cmaps/KSCms-UHC-V.bcmap +0 -0
- package/out/web/pdfjs/cmaps/KSCpc-EUC-H.bcmap +0 -0
- package/out/web/pdfjs/cmaps/KSCpc-EUC-V.bcmap +0 -0
- package/out/web/pdfjs/cmaps/Katakana.bcmap +0 -0
- package/out/web/pdfjs/cmaps/LICENSE +36 -0
- package/out/web/pdfjs/cmaps/NWP-H.bcmap +0 -0
- package/out/web/pdfjs/cmaps/NWP-V.bcmap +0 -0
- package/out/web/pdfjs/cmaps/RKSJ-H.bcmap +0 -0
- package/out/web/pdfjs/cmaps/RKSJ-V.bcmap +0 -0
- package/out/web/pdfjs/cmaps/Roman.bcmap +0 -0
- package/out/web/pdfjs/cmaps/UniCNS-UCS2-H.bcmap +0 -0
- package/out/web/pdfjs/cmaps/UniCNS-UCS2-V.bcmap +0 -0
- package/out/web/pdfjs/cmaps/UniCNS-UTF16-H.bcmap +0 -0
- package/out/web/pdfjs/cmaps/UniCNS-UTF16-V.bcmap +0 -0
- package/out/web/pdfjs/cmaps/UniCNS-UTF32-H.bcmap +0 -0
- package/out/web/pdfjs/cmaps/UniCNS-UTF32-V.bcmap +0 -0
- package/out/web/pdfjs/cmaps/UniCNS-UTF8-H.bcmap +0 -0
- package/out/web/pdfjs/cmaps/UniCNS-UTF8-V.bcmap +0 -0
- package/out/web/pdfjs/cmaps/UniGB-UCS2-H.bcmap +0 -0
- package/out/web/pdfjs/cmaps/UniGB-UCS2-V.bcmap +0 -0
- package/out/web/pdfjs/cmaps/UniGB-UTF16-H.bcmap +0 -0
- package/out/web/pdfjs/cmaps/UniGB-UTF16-V.bcmap +0 -0
- package/out/web/pdfjs/cmaps/UniGB-UTF32-H.bcmap +0 -0
- package/out/web/pdfjs/cmaps/UniGB-UTF32-V.bcmap +0 -0
- package/out/web/pdfjs/cmaps/UniGB-UTF8-H.bcmap +0 -0
- package/out/web/pdfjs/cmaps/UniGB-UTF8-V.bcmap +0 -0
- package/out/web/pdfjs/cmaps/UniJIS-UCS2-H.bcmap +0 -0
- package/out/web/pdfjs/cmaps/UniJIS-UCS2-HW-H.bcmap +0 -0
- package/out/web/pdfjs/cmaps/UniJIS-UCS2-HW-V.bcmap +0 -0
- package/out/web/pdfjs/cmaps/UniJIS-UCS2-V.bcmap +0 -0
- package/out/web/pdfjs/cmaps/UniJIS-UTF16-H.bcmap +0 -0
- package/out/web/pdfjs/cmaps/UniJIS-UTF16-V.bcmap +0 -0
- package/out/web/pdfjs/cmaps/UniJIS-UTF32-H.bcmap +0 -0
- package/out/web/pdfjs/cmaps/UniJIS-UTF32-V.bcmap +0 -0
- package/out/web/pdfjs/cmaps/UniJIS-UTF8-H.bcmap +0 -0
- package/out/web/pdfjs/cmaps/UniJIS-UTF8-V.bcmap +0 -0
- package/out/web/pdfjs/cmaps/UniJIS2004-UTF16-H.bcmap +0 -0
- package/out/web/pdfjs/cmaps/UniJIS2004-UTF16-V.bcmap +0 -0
- package/out/web/pdfjs/cmaps/UniJIS2004-UTF32-H.bcmap +0 -0
- package/out/web/pdfjs/cmaps/UniJIS2004-UTF32-V.bcmap +0 -0
- package/out/web/pdfjs/cmaps/UniJIS2004-UTF8-H.bcmap +0 -0
- package/out/web/pdfjs/cmaps/UniJIS2004-UTF8-V.bcmap +0 -0
- package/out/web/pdfjs/cmaps/UniJISPro-UCS2-HW-V.bcmap +0 -0
- package/out/web/pdfjs/cmaps/UniJISPro-UCS2-V.bcmap +0 -0
- package/out/web/pdfjs/cmaps/UniJISPro-UTF8-V.bcmap +0 -0
- package/out/web/pdfjs/cmaps/UniJISX0213-UTF32-H.bcmap +0 -0
- package/out/web/pdfjs/cmaps/UniJISX0213-UTF32-V.bcmap +0 -0
- package/out/web/pdfjs/cmaps/UniJISX02132004-UTF32-H.bcmap +0 -0
- package/out/web/pdfjs/cmaps/UniJISX02132004-UTF32-V.bcmap +0 -0
- package/out/web/pdfjs/cmaps/UniKS-UCS2-H.bcmap +0 -0
- package/out/web/pdfjs/cmaps/UniKS-UCS2-V.bcmap +0 -0
- package/out/web/pdfjs/cmaps/UniKS-UTF16-H.bcmap +0 -0
- package/out/web/pdfjs/cmaps/UniKS-UTF16-V.bcmap +0 -0
- package/out/web/pdfjs/cmaps/UniKS-UTF32-H.bcmap +0 -0
- package/out/web/pdfjs/cmaps/UniKS-UTF32-V.bcmap +0 -0
- package/out/web/pdfjs/cmaps/UniKS-UTF8-H.bcmap +0 -0
- package/out/web/pdfjs/cmaps/UniKS-UTF8-V.bcmap +0 -0
- package/out/web/pdfjs/cmaps/V.bcmap +0 -0
- package/out/web/pdfjs/cmaps/WP-Symbol.bcmap +0 -0
- package/out/web/pdfjs/standard_fonts/FoxitDingbats.pfb +0 -0
- package/out/web/pdfjs/standard_fonts/FoxitFixed.pfb +0 -0
- package/out/web/pdfjs/standard_fonts/FoxitFixedBold.pfb +0 -0
- package/out/web/pdfjs/standard_fonts/FoxitFixedBoldItalic.pfb +0 -0
- package/out/web/pdfjs/standard_fonts/FoxitFixedItalic.pfb +0 -0
- package/out/web/pdfjs/standard_fonts/FoxitSerif.pfb +0 -0
- package/out/web/pdfjs/standard_fonts/FoxitSerifBold.pfb +0 -0
- package/out/web/pdfjs/standard_fonts/FoxitSerifBoldItalic.pfb +0 -0
- package/out/web/pdfjs/standard_fonts/FoxitSerifItalic.pfb +0 -0
- package/out/web/pdfjs/standard_fonts/FoxitSymbol.pfb +0 -0
- package/out/web/pdfjs/standard_fonts/LICENSE_FOXIT +27 -0
- package/out/web/pdfjs/standard_fonts/LICENSE_LIBERATION +363 -0
- package/out/web/pdfjs/standard_fonts/LiberationSans-Bold.ttf +0 -0
- package/out/web/pdfjs/standard_fonts/LiberationSans-BoldItalic.ttf +0 -0
- package/out/web/pdfjs/standard_fonts/LiberationSans-Italic.ttf +0 -0
- package/out/web/pdfjs/standard_fonts/LiberationSans-Regular.ttf +0 -0
- package/out/web/pdfjs/wasm/LICENSE_JBIG2 +196 -0
- package/out/web/pdfjs/wasm/LICENSE_OPENJPEG +39 -0
- package/out/web/pdfjs/wasm/LICENSE_PDFJS_JBIG2 +13 -0
- package/out/web/pdfjs/wasm/LICENSE_PDFJS_OPENJPEG +22 -0
- package/out/web/pdfjs/wasm/LICENSE_PDFJS_QCMS +19 -0
- package/out/web/pdfjs/wasm/LICENSE_QCMS +21 -0
- package/out/web/pdfjs/wasm/jbig2.wasm +0 -0
- package/out/web/pdfjs/wasm/jbig2_nowasm_fallback.js +15 -0
- package/out/web/pdfjs/wasm/openjpeg.wasm +0 -0
- package/out/web/pdfjs/wasm/openjpeg_nowasm_fallback.js +17 -0
- package/out/web/pdfjs/wasm/qcms_bg.wasm +0 -0
- package/out/web/pdfjs/wasm/quickjs-eval.js +16 -0
- package/out/web/pdfjs/wasm/quickjs-eval.wasm +0 -0
- package/package.json +6 -4
- package/shared-modules/CODEOWNERS +3 -3
- package/shared-modules/SDL2/SDL2_mixer.json +27 -0
- package/shared-modules/appstream/README.md +13 -0
- package/shared-modules/appstream/appstream-compose.json +111 -0
- package/shared-modules/dbus-glib/dbus-glib.json +2 -2
- package/shared-modules/libportal/libportal.json +23 -0
- package/shared-modules/linux-audio/fluidsynth2-static.json +2 -2
- package/shared-modules/linux-audio/fluidsynth2.json +2 -2
- package/shared-modules/linux-audio/libinstpatch.json +2 -2
- package/shared-modules/linux-audio/liblo-static.json +3 -0
- package/shared-modules/luajit/luajit.json +2 -2
- package/shared-modules/squashfs-tools/squashfs-tools.json +0 -3
- package/slash-commands.json +14 -3
- package/src/bin/index.js +4 -1
- package/src/bin/pdfjs-assets.mjs +31 -0
- package/src/renderer/node_modules/.vite/vitest/CACHEDIR.TAG +3 -0
- package/src/renderer/node_modules/.vite/vitest/da39a3ee5e6b4b0d3255bfef95601890afd80709/results.json +1 -1
- package/src/renderer/shared/agentProgress.ts +62 -5
- package/src/renderer/shared/components/Settings/AgentsTab.tsx +70 -6
- package/src/renderer/shared/components/Settings/AudioTab.tsx +1 -1
- package/src/renderer/shared/components/Settings/AutomationTab.tsx +32 -29
- package/src/renderer/shared/components/Settings/AvatarCropModal.tsx +32 -12
- package/src/renderer/shared/components/Settings/CustomProviderLogoPicker.test.tsx +65 -0
- package/src/renderer/shared/components/Settings/CustomProviderLogoPicker.tsx +456 -0
- package/src/renderer/shared/components/Settings/GeneralTab.tsx +65 -94
- package/src/renderer/shared/components/Settings/PluginsTab.tsx +101 -24
- package/src/renderer/shared/components/Settings/ProfileTab.tsx +1 -1
- package/src/renderer/shared/components/Settings/SettingsWindow.tsx +796 -0
- package/src/renderer/shared/components/Settings/ThemeTab.test.tsx +45 -0
- package/src/renderer/shared/components/Settings/ThemeTab.tsx +119 -4
- package/src/renderer/shared/components/activity/AgentActivityDrawer.tsx +270 -0
- package/src/renderer/shared/components/activity/AgentActivityTable.tsx +582 -0
- package/src/renderer/shared/components/activity/AskUserActivityCard.test.tsx +122 -0
- package/src/renderer/shared/components/activity/AskUserActivityCard.tsx +70 -0
- package/src/renderer/shared/components/{McpToolResults.tsx → activity/McpToolResults.tsx} +69 -13
- package/src/renderer/shared/components/{PlanChecklistWidget.tsx → activity/PlanChecklistWidget.tsx} +2 -2
- package/src/renderer/shared/components/activity/RunSummaryDashboard.test.tsx +127 -0
- package/src/renderer/shared/components/activity/RunSummaryDashboard.tsx +222 -0
- package/src/renderer/shared/components/activity/SubagentDagView.test.ts +123 -0
- package/src/renderer/shared/components/{SubagentDagView.tsx → activity/SubagentDagView.tsx} +104 -50
- package/src/renderer/shared/components/activity/SubagentStatusStrip.test.tsx +82 -0
- package/src/renderer/shared/components/activity/SubagentStatusStrip.tsx +107 -0
- package/src/renderer/shared/components/activity/ViewedImages.tsx +179 -0
- package/src/renderer/shared/components/{AuthGate.tsx → app/AuthGate.tsx} +3 -3
- package/src/renderer/shared/components/{ChunkErrorBoundary.tsx → app/ChunkErrorBoundary.tsx} +13 -13
- package/src/renderer/shared/components/{CommandPalette.tsx → app/CommandPalette.tsx} +30 -30
- package/src/renderer/shared/components/{DashboardSidebar.tsx → app/DashboardSidebar.tsx} +7 -5
- package/src/renderer/shared/components/{DesktopTitlebar.tsx → app/DesktopTitlebar.tsx} +9 -26
- package/src/renderer/shared/components/{ErrorNotice.tsx → app/ErrorNotice.tsx} +1 -1
- package/src/renderer/shared/components/{MintDashboard.tsx → app/MintDashboard.tsx} +217 -228
- package/src/renderer/shared/components/{ModalErrorBoundary.tsx → app/ModalErrorBoundary.tsx} +8 -8
- package/src/renderer/shared/components/{CalculationCard.tsx → cards/CalculationCard.tsx} +16 -30
- package/src/renderer/shared/components/{ImageGenCard.tsx → cards/ImageGenCard.tsx} +11 -24
- package/src/renderer/shared/components/{ImageSearchCard.tsx → cards/ImageSearchCard.tsx} +11 -24
- package/src/renderer/shared/components/{MermaidCard.tsx → cards/MermaidCard.tsx} +38 -22
- package/src/renderer/shared/components/cards/PlanCard.test.tsx +41 -0
- package/src/renderer/shared/components/cards/PlanCard.tsx +32 -0
- package/src/renderer/shared/components/cards/ReleaseNotesCard.test.tsx +29 -0
- package/src/renderer/shared/components/cards/ReleaseNotesCard.tsx +137 -0
- package/src/renderer/shared/components/{StockCard.tsx → cards/StockCard.tsx} +22 -38
- package/src/renderer/shared/components/cards/ToolResultCards.tsx +94 -0
- package/src/renderer/shared/components/{UiFeatureCard.tsx → cards/UiFeatureCard.tsx} +6 -6
- package/src/renderer/shared/components/{UiGridCard.tsx → cards/UiGridCard.tsx} +3 -3
- package/src/renderer/shared/components/{UiMockupWidget.tsx → cards/UiMockupWidget.tsx} +4 -4
- package/src/renderer/shared/components/{WeatherCard.tsx → cards/WeatherCard.tsx} +6 -6
- package/src/renderer/shared/components/{ApprovalCard.test.tsx → chat/ApprovalCard.test.tsx} +12 -1
- package/src/renderer/shared/components/{ApprovalCard.tsx → chat/ApprovalCard.tsx} +26 -7
- package/src/renderer/shared/components/chat/ArtifactCards.test.tsx +69 -0
- package/src/renderer/shared/components/chat/ArtifactCards.tsx +238 -0
- package/src/renderer/shared/components/chat/AttachedDocumentCard.test.tsx +39 -0
- package/src/renderer/shared/components/chat/AttachedDocumentCard.tsx +220 -0
- package/src/renderer/shared/components/chat/ChatCodeBlock.test.tsx +33 -0
- package/src/renderer/shared/components/{ChatCodeBlock.tsx → chat/ChatCodeBlock.tsx} +16 -2
- package/src/renderer/shared/components/chat/ChatMessageItem.test.tsx +183 -0
- package/src/renderer/shared/components/chat/ChatMessageItem.tsx +388 -0
- package/src/renderer/shared/components/chat/ChatModeSelector.css +227 -0
- package/src/renderer/shared/components/chat/ChatModeSelector.test.tsx +45 -0
- package/src/renderer/shared/components/chat/ChatModeSelector.tsx +198 -0
- package/src/renderer/shared/components/chat/ChatPanel.test.tsx +53 -0
- package/src/renderer/shared/components/{ChatPanel.tsx → chat/ChatPanel.tsx} +462 -537
- package/src/renderer/shared/components/{CollapsiblePasteInput.tsx → chat/CollapsiblePasteInput.tsx} +2 -2
- package/src/renderer/shared/components/{DiffReviewModal.tsx → chat/DiffReviewModal.tsx} +44 -44
- package/src/renderer/shared/components/chat/GeminiLiveOverlay.test.tsx +165 -0
- package/src/renderer/shared/components/{GeminiLiveOverlay.tsx → chat/GeminiLiveOverlay.tsx} +47 -5
- package/src/renderer/shared/components/{ModelSelectorPopover.tsx → chat/ModelSelectorPopover.tsx} +44 -16
- package/src/renderer/shared/components/chat/QueuedMessagesBanner.test.tsx +89 -0
- package/src/renderer/shared/components/chat/QueuedMessagesBanner.tsx +201 -0
- package/src/renderer/shared/components/{RewindModal.tsx → chat/RewindModal.tsx} +14 -14
- package/src/renderer/shared/components/{SlashChoicePanel.tsx → chat/SlashChoicePanel.tsx} +2 -2
- package/src/renderer/shared/components/{SlashSuggestions.test.tsx → chat/SlashSuggestions.test.tsx} +14 -0
- package/src/renderer/shared/components/{SlashSuggestions.tsx → chat/SlashSuggestions.tsx} +4 -4
- package/src/renderer/shared/components/chat/SourcesBlock.test.tsx +53 -0
- package/src/renderer/shared/components/{SourcesBlock.tsx → chat/SourcesBlock.tsx} +262 -123
- package/src/renderer/shared/components/{ThinkingBlock.tsx → chat/ThinkingBlock.tsx} +1 -1
- package/src/renderer/shared/components/chat/TurnFileChanges.test.tsx +130 -0
- package/src/renderer/shared/components/chat/TurnFileChanges.tsx +463 -0
- package/src/renderer/shared/components/{VoicePill.css → chat/VoicePill.css} +1 -1
- package/src/renderer/shared/components/{VoicePill.jsx → chat/VoicePill.jsx} +3 -2
- package/src/renderer/shared/components/{CliSessionsView.test.tsx → extensions/CliSessionsView.test.tsx} +2 -2
- package/src/renderer/shared/components/{CliSessionsView.tsx → extensions/CliSessionsView.tsx} +19 -16
- package/src/renderer/shared/components/{LinkedFoldersView.tsx → extensions/LinkedFoldersView.tsx} +3 -3
- package/src/renderer/shared/components/{McpRegistryPicker.tsx → extensions/McpRegistryPicker.tsx} +6 -6
- package/src/renderer/shared/components/{McpServersView.tsx → extensions/McpServersView.tsx} +105 -36
- package/src/renderer/shared/components/{McpToolAllowlist.tsx → extensions/McpToolAllowlist.tsx} +2 -2
- package/src/renderer/shared/components/{ModUi.test.tsx → extensions/ModUi.test.tsx} +9 -4
- package/src/renderer/shared/components/{ModsPanel.tsx → extensions/ModsPanel.tsx} +59 -7
- package/src/renderer/shared/components/{PluginsView.tsx → extensions/PluginsView.tsx} +6 -6
- package/src/renderer/shared/components/{ScheduledTasksView.tsx → extensions/ScheduledTasksView.tsx} +5 -5
- package/src/renderer/shared/components/extensions/SkillsView.test.tsx +31 -0
- package/src/renderer/shared/components/{SkillsView.tsx → extensions/SkillsView.tsx} +20 -4
- package/src/renderer/shared/components/{ImageStudioPanel.tsx → studio/ImageStudioPanel.tsx} +6 -6
- package/src/renderer/shared/components/{LibraryItemCard.tsx → studio/LibraryItemCard.tsx} +2 -2
- package/src/renderer/shared/components/{LibraryPage.tsx → studio/LibraryPage.tsx} +53 -10
- package/src/renderer/shared/components/{LibraryPreview.tsx → studio/LibraryPreview.tsx} +2 -2
- package/src/renderer/shared/components/{VeoStudioPanel.tsx → studio/VeoStudioPanel.tsx} +7 -7
- package/src/renderer/shared/components/{GlideSelect.css → ui/GlideSelect.css} +7 -6
- package/src/renderer/shared/components/ui/ProviderBrandIcon.test.tsx +67 -0
- package/src/renderer/shared/components/ui/ProviderBrandIcon.tsx +167 -0
- package/src/renderer/shared/components/ui/SelectField.tsx +506 -0
- package/src/renderer/shared/components/ui/error-recovery.css +10 -10
- package/src/renderer/shared/components/ui/error-recovery.tsx +1 -1
- package/src/renderer/shared/components/{ArtifactPreviewPanel.tsx → workspace/ArtifactPreviewPanel.tsx} +374 -118
- package/src/renderer/shared/components/workspace/BackgroundTerminals.test.tsx +63 -0
- package/src/renderer/shared/components/{BackgroundTerminals.tsx → workspace/BackgroundTerminals.tsx} +40 -9
- package/src/renderer/shared/components/workspace/CodeReviewPage.test.tsx +50 -0
- package/src/renderer/shared/components/{CodeReviewPage.tsx → workspace/CodeReviewPage.tsx} +124 -24
- package/src/renderer/shared/components/{GitBranchSelector.tsx → workspace/GitBranchSelector.tsx} +80 -24
- package/src/renderer/shared/components/workspace/SessionSources.tsx +113 -0
- package/src/renderer/shared/components/{TerminalDock.tsx → workspace/TerminalDock.tsx} +5 -2
- package/src/renderer/shared/components/workspace/ToolSurfacePage.test.tsx +81 -0
- package/src/renderer/shared/components/{ToolSurfacePage.tsx → workspace/ToolSurfacePage.tsx} +361 -90
- package/src/renderer/shared/components/{ToolsPanelToggle.tsx → workspace/ToolsPanelToggle.tsx} +1 -1
- package/src/renderer/shared/components/workspace/WorkspaceFileInfo.tsx +28 -0
- package/src/renderer/shared/components/workspace/WorkspaceMediaPreview.tsx +17 -0
- package/src/renderer/shared/components/{WorkspacePaneResizer.tsx → workspace/WorkspacePaneResizer.tsx} +1 -1
- package/src/renderer/shared/components/workspace/WorkspacePdfPreview.tsx +308 -0
- package/src/renderer/shared/components/workspace/WorkspacePreviewActions.test.tsx +101 -0
- package/src/renderer/shared/components/{WorkspacePreviewActions.tsx → workspace/WorkspacePreviewActions.tsx} +3 -3
- package/src/renderer/shared/components/{WorkspaceSelector.tsx → workspace/WorkspaceSelector.tsx} +99 -7
- package/src/renderer/shared/components/{background-terminals.css → workspace/background-terminals.css} +11 -11
- package/src/renderer/shared/components/{workspace-selector.css → workspace/workspace-selector.css} +84 -2
- package/src/renderer/shared/constants/config.ts +6 -3
- package/src/renderer/shared/constants/models.test.ts +51 -0
- package/src/renderer/shared/constants/models.ts +139 -32
- package/src/renderer/shared/conversation/coordinator.test.ts +46 -0
- package/src/renderer/shared/conversation/coordinator.ts +50 -2
- package/src/renderer/shared/conversation/lifecycle.test.ts +254 -4
- package/src/renderer/shared/conversation/lifecycle.ts +268 -12
- package/src/renderer/shared/conversation/progressiveStream.test.ts +83 -0
- package/src/renderer/shared/conversation/progressiveStream.ts +219 -0
- package/src/renderer/shared/conversation/projectNavigation.test.ts +18 -0
- package/src/renderer/shared/conversation/projectNavigation.ts +11 -0
- package/src/renderer/shared/conversation/transport.test.ts +20 -0
- package/src/renderer/shared/conversation/transport.ts +51 -9
- package/src/renderer/shared/conversation/useConversationCoordinator.ts +42 -12
- package/src/renderer/shared/css/agent-observability.css +205 -11
- package/src/renderer/shared/css/chat-ui-cards.css +48 -48
- package/src/renderer/shared/css/code-review.css +139 -110
- package/src/renderer/shared/css/code-sessions.css +56 -27
- package/src/renderer/shared/css/collapsed-paste.css +1 -1
- package/src/renderer/shared/css/error-notice.css +1 -1
- package/src/renderer/shared/css/file-changes.css +298 -51
- package/src/renderer/shared/css/library.css +105 -10
- package/src/renderer/shared/css/management-views.css +79 -38
- package/src/renderer/shared/css/mcp-results.css +48 -5
- package/src/renderer/shared/css/model-selector.css +18 -18
- package/src/renderer/shared/css/mods.css +7 -7
- package/src/renderer/shared/css/notification-notice.css +2 -2
- package/src/renderer/shared/css/queued-messages.css +221 -0
- package/src/renderer/shared/css/session-sources.css +12 -7
- package/src/renderer/shared/css/settings/agents.css +2 -2
- package/src/renderer/{src → shared}/css/settings/base.css +101 -107
- package/src/renderer/shared/css/settings/general.css +397 -100
- package/src/renderer/shared/css/settings/plugins.css +8 -8
- package/src/renderer/shared/css/settings/profile.css +5 -5
- package/src/renderer/shared/css/settings/theme.css +49 -37
- package/src/renderer/shared/css/slash-choice.css +2 -2
- package/src/renderer/shared/css/slash-suggestions.css +3 -3
- package/src/renderer/shared/css/sources-block.css +41 -2
- package/src/renderer/shared/css/tools-panel.css +2 -2
- package/src/renderer/shared/css/ui-tailwind.css +10 -2
- package/src/renderer/shared/css/veo-studio.css +2 -2
- package/src/renderer/shared/css/viewed-images.css +93 -4
- package/src/renderer/shared/css/workspace-file-info.css +12 -0
- package/src/renderer/shared/css/workspace-media-preview.css +13 -0
- package/src/renderer/shared/env.d.ts +9 -0
- package/src/renderer/shared/platform.test.ts +143 -0
- package/src/renderer/shared/platform.ts +12 -5
- package/src/renderer/shared/speech/player.ts +160 -0
- package/src/renderer/shared/speech/types.ts +11 -0
- package/src/renderer/shared/theme/themeManager.test.ts +37 -0
- package/src/renderer/shared/theme/themeManager.ts +24 -5
- package/src/renderer/shared/theme/themes.ts +71 -4
- package/src/renderer/shared/theme/tokens.css +452 -53
- package/src/renderer/shared/types.ts +57 -2
- package/src/renderer/shared/utils/agentActivity.test.ts +633 -8
- package/src/renderer/shared/utils/agentActivity.ts +776 -59
- package/src/renderer/shared/utils/artifactBrowser.test.ts +37 -32
- package/src/renderer/shared/utils/artifactBrowser.ts +18 -20
- package/src/renderer/shared/utils/artifacts.ts +55 -0
- package/src/renderer/shared/utils/attachedDocument.test.ts +73 -0
- package/src/renderer/shared/utils/attachedDocument.ts +49 -0
- package/src/renderer/shared/utils/contextCompaction.test.tsx +1 -1
- package/src/renderer/shared/utils/externalLinks.ts +91 -0
- package/src/renderer/shared/utils/fileIcons.test.ts +59 -0
- package/src/renderer/shared/utils/fileIcons.ts +149 -16
- package/src/renderer/shared/utils/lazyWithRetry.ts +13 -0
- package/src/renderer/shared/utils/markdown.tsx +238 -51
- package/src/renderer/shared/utils/markdown.webImages.test.tsx +140 -2
- package/src/renderer/shared/utils/mcpResults.test.tsx +53 -1
- package/src/renderer/shared/utils/pdfRange.ts +16 -0
- package/src/renderer/shared/utils/previewObjectUrls.ts +20 -0
- package/src/renderer/shared/utils/sessionSources.test.ts +41 -1
- package/src/renderer/shared/utils/sessionSources.ts +2 -0
- package/src/renderer/shared/utils/slashCommandProcessor.ts +7 -1
- package/src/renderer/shared/utils/speech.ts +18 -4
- package/src/renderer/shared/utils/syntaxHighlight.test.tsx +11 -1
- package/src/renderer/shared/utils/syntaxHighlight.tsx +51 -3
- package/src/renderer/shared/utils/useGeminiLiveVoice.ts +324 -51
- package/src/renderer/shared/utils/useNativeVoiceInput.ts +19 -5
- package/src/renderer/shared/utils/useSessionSources.ts +4 -0
- package/src/renderer/shared/utils/viewedImages.test.ts +129 -0
- package/src/renderer/shared/utils/viewedImages.ts +81 -10
- package/src/renderer/shared/utils/workspaceDrag.test.ts +153 -0
- package/src/renderer/shared/utils/workspaceDrag.ts +172 -0
- package/src/renderer/shared/utils/workspaceImage.ts +17 -0
- package/src/renderer/shared/utils/workspaceListPreferences.test.ts +64 -0
- package/src/renderer/shared/utils/workspaceListPreferences.ts +54 -0
- package/src/renderer/shared/utils/workspaceMedia.ts +49 -0
- package/src/renderer/shared/utils/workspacePreview.test.ts +147 -2
- package/src/renderer/shared/utils/workspacePreview.ts +34 -3
- package/src/renderer/shared/utils/workspaces.ts +3 -2
- package/src/renderer/src/App.tsx +20 -16
- package/src/renderer/src/agentProgress.ts +1 -0
- package/src/renderer/src/components/ChatPanel.tsx +1 -1
- package/src/renderer/src/components/DashboardSidebar.tsx +2 -2
- package/src/renderer/src/components/ImageStudioPanel.tsx +1 -1
- package/src/renderer/src/components/LiveTranslateControls.tsx +1 -1
- package/src/renderer/src/components/MintDashboard.tsx +1 -1
- package/src/renderer/src/components/ProactiveGlow.tsx +1 -1
- package/src/renderer/src/components/ScreenPicker.css +1 -1
- package/src/renderer/src/components/ScreenPicker.tsx +1 -1
- package/src/renderer/src/components/SettingsWindow.tsx +6 -830
- package/src/renderer/src/components/SpotlightWindow.tsx +4 -32
- package/src/renderer/src/components/VeoStudioPanel.tsx +1 -1
- package/src/renderer/src/components/WorkspacePanel.tsx +49 -15
- package/src/renderer/src/components/browser-suggestions-popup.css +8 -8
- package/src/renderer/src/css/app-shell.css +26 -106
- package/src/renderer/src/css/chat.css +1499 -292
- package/src/renderer/src/css/desktop-tools.css +17 -348
- package/src/renderer/src/css/sidebar-workspace.css +22 -2
- package/src/renderer/src/css/spotlight.css +2 -2
- package/src/renderer/src/css/tool-surfaces.css +335 -65
- package/src/renderer/src/css/widget.css +6 -5
- package/src/renderer/src/env.d.ts +13 -0
- package/src/renderer/src/index.css +53 -83
- package/src/renderer/src/tauri.ts +99 -13
- package/src/renderer/src/voiceInput.ts +3 -1
- package/src/renderer/src-web/App.tsx +20 -8
- package/src/renderer/src-web/agentProgress.ts +1 -0
- package/src/renderer/src-web/components/ChatPanel.tsx +1 -1
- package/src/renderer/src-web/components/DashboardSidebar.tsx +2 -2
- package/src/renderer/src-web/components/ImageStudioPanel.tsx +1 -1
- package/src/renderer/src-web/components/MintDashboard.tsx +1 -1
- package/src/renderer/src-web/components/SettingsWindow.tsx +6 -851
- package/src/renderer/src-web/components/VeoStudioPanel.tsx +1 -1
- package/src/renderer/src-web/css/app-shell.css +20 -104
- package/src/renderer/src-web/css/chat.css +1536 -261
- package/src/renderer/src-web/css/mobile.css +29 -13
- package/src/renderer/src-web/css/settings/mobile.css +2 -2
- package/src/renderer/src-web/css/sidebar-workspace.css +21 -1
- package/src/renderer/src-web/env.d.ts +14 -0
- package/src/renderer/src-web/index.css +53 -83
- package/src/renderer/src-web/tauri.ts +93 -15
- package/src/renderer/tests/browserArtifacts.browser.html +1 -0
- package/src/renderer/tests/browserArtifacts.browser.tsx +68 -0
- package/src/renderer/tests/chatEscape.browser.html +1 -0
- package/src/renderer/tests/chatEscape.browser.tsx +25 -0
- package/src/renderer/tests/chatPerformance.browser.html +1 -1
- package/src/renderer/tests/collapsedPaste.browser.html +1 -1
- package/src/renderer/tests/composerMenus.browser.html +3 -3
- package/src/renderer/tests/contextCompaction.browser.html +1 -1
- package/src/renderer/tests/errorRecovery.browser.html +1 -1
- package/src/renderer/tests/fixtures/preview.webm +0 -0
- package/src/renderer/tests/glideSelect.browser.html +1 -2
- package/src/renderer/tests/glideSelect.preview.html +1 -1
- package/src/renderer/tests/library.browser.tsx +4 -1
- package/src/renderer/tests/liveOrb.browser.html +1 -1
- package/src/renderer/tests/liveVoice.browser.html +1 -0
- package/src/renderer/tests/mediaFixtures.ts +32 -0
- package/src/renderer/tests/modInput.browser.html +1 -1
- package/src/renderer/tests/sessionSources.browser.tsx +76 -15
- package/src/renderer/tests/toolsPanel.browser.tsx +5 -5
- package/src/renderer/tests/viewedImages.browser.tsx +3 -3
- package/src/renderer/tests/voiceDictation.browser.html +101 -0
- package/src/renderer/tests/voicePill.browser.html +3 -3
- package/src/renderer/tests/voicePill.preview.html +1 -1
- package/src/renderer/tests/webSources.browser.tsx +2 -98
- package/src/renderer/tests/workspaceDrop.browser.html +1 -0
- package/src/renderer/tests/workspaceDrop.browser.tsx +183 -0
- package/src/renderer/tests/workspaceExpansion.browser.html +1 -0
- package/src/renderer/tests/workspaceExpansion.browser.tsx +66 -0
- package/src/renderer/tests/workspaceRemoval.browser.html +66 -0
- package/src/renderer/tests/workspaceUndo.browser.html +10 -2
- package/src-tauri/src/app/lifecycle.rs +45 -15
- package/src-tauri/src/background/headless.rs +14 -8
- package/src-tauri/src/commands/conversation.rs +137 -73
- package/src-tauri/src/commands/integrations.rs +7 -1
- package/src-tauri/src/commands/media.rs +7 -0
- package/src-tauri/src/commands/workspace.rs +38 -0
- package/src-tauri/src/native/mod.rs +0 -1
- package/src-tauri/src/native/system.rs +4 -47
- package/tsconfig.json +15 -1
- package/vite.config.ts +2 -1
- package/vite.config.web.ts +2 -0
- package/crates/mint-cli/src/interactive/chat_tui.rs +0 -7853
- package/crates/mint-core/src/agent/chat.rs +0 -4155
- package/crates/mint-core/src/browser/lifecycle.rs +0 -191
- package/crates/mint-core/src/browser/logging.rs +0 -20
- package/crates/mint-core/src/orchestration/tools/browser.rs +0 -31
- package/out/web/assets/CliSessionsView-CtzUJpK_.css +0 -1
- package/out/web/assets/CliSessionsView-D7hw0Mgj.js +0 -1
- package/out/web/assets/CodeReviewPage-C7bEOJfd.js +0 -4
- package/out/web/assets/CodeReviewPage-Dte9uLiL.css +0 -1
- package/out/web/assets/CommandPalette-0RrF-AOT.js +0 -1
- package/out/web/assets/ImageStudioPanel-CdxkAf_r.js +0 -1
- package/out/web/assets/LibraryPage--Qfisp6D.js +0 -2
- package/out/web/assets/LibraryPage-DAxUTAg7.css +0 -1
- package/out/web/assets/LinkedFoldersView-2nfZbDgN.js +0 -1
- package/out/web/assets/McpRegistryPicker-h9uS8_wT.js +0 -1
- package/out/web/assets/McpServersView-slfQJzNB.js +0 -1
- package/out/web/assets/MintDashboard-BSR5XpXh.js +0 -25
- package/out/web/assets/MintDashboard-CWUcCGhd.css +0 -1
- package/out/web/assets/PluginsView-l7LSm503.js +0 -1
- package/out/web/assets/ScheduledTasksView-CttmLbq1.js +0 -1
- package/out/web/assets/SettingsWindow-BCMLYvEV.js +0 -4
- package/out/web/assets/SettingsWindow-DcMVmU9u.css +0 -1
- package/out/web/assets/SkillsView-rNs1qr_U.js +0 -2
- package/out/web/assets/ToolSurfacePage-B9DzEPWN.js +0 -37
- package/out/web/assets/ToolSurfacePage-CTfgggF2.css +0 -1
- package/out/web/assets/VeoStudioPanel-DiJs_Cg2.js +0 -4
- package/out/web/assets/WorkspacePanel-CbJ1PFoZ.js +0 -1
- package/out/web/assets/WorkspaceSelector-B2xIp04D.js +0 -1
- package/out/web/assets/WorkspaceSelector-Ca8uJOsS.css +0 -1
- package/out/web/assets/abnfDiagram-VCTEODGH-CD0CjoGl.js +0 -1
- package/out/web/assets/architecture-7GRP2DOG-RKV83OeZ.js +0 -1
- package/out/web/assets/architectureDiagram-5GKGNRK7-nN_HAFct.js +0 -36
- package/out/web/assets/c4Diagram-UCG6FXSJ-DTdV8_zE.js +0 -38
- package/out/web/assets/chunk-2Q5K7J3B-Dmqrq8Tp.js +0 -1
- package/out/web/assets/chunk-75Z2AOVW-_M0z5olV.js +0 -2
- package/out/web/assets/chunk-CKBBP62Z-BpQEgeHF.js +0 -2
- package/out/web/assets/chunk-CLGD4ZFX-D54yGvGS.js +0 -1
- package/out/web/assets/chunk-CacB07dV.js +0 -1
- package/out/web/assets/chunk-DSNCTWBM-C-gvT2ru.js +0 -2
- package/out/web/assets/chunk-DU6HZSFF-CnFngIhW.js +0 -128
- package/out/web/assets/chunk-F27PBJKO-BqtWrnEO.js +0 -1
- package/out/web/assets/chunk-FOHPRMQF-BaVC1uA7.js +0 -161
- package/out/web/assets/chunk-G27WJ6UU-Ckoq5mi2.js +0 -231
- package/out/web/assets/chunk-JQ64N6SF-CF8T7GiZ.js +0 -1
- package/out/web/assets/chunk-JWPE2WC7-BwtYOHqU.js +0 -1
- package/out/web/assets/chunk-LNGE3PJU-AdBoOWw2.js +0 -34
- package/out/web/assets/chunk-OBVCFTLP-CRIkunUB.js +0 -1
- package/out/web/assets/chunk-P2QGCYS3-UFEU6BxZ.js +0 -1
- package/out/web/assets/chunk-POPQ4Y6H-CQcrNbjr.js +0 -1
- package/out/web/assets/chunk-PWAF6VOD-Cc2uVDsG.js +0 -1
- package/out/web/assets/chunk-R7TYR2AO-DiCxzdAY.js +0 -10
- package/out/web/assets/chunk-RHFEMEQ7-b7hnPmrR.js +0 -168
- package/out/web/assets/chunk-XXDRQBXY-DnJkbUaw.js +0 -1
- package/out/web/assets/chunk-Y2CYZVJY-C9o-s6OY.js +0 -1
- package/out/web/assets/classDiagram-DTDB5LWJ-RnC2mYO4.js +0 -1
- package/out/web/assets/classDiagram-v2-JRS7N3AN-RnC2mYO4.js +0 -1
- package/out/web/assets/config-CnvCChUM.js +0 -2
- package/out/web/assets/config-DM6oIVO3.css +0 -1
- package/out/web/assets/core-DsKkQ7ig.js +0 -1
- package/out/web/assets/cose-bilkent-JH36ORCC--UN4aw5-.js +0 -1
- package/out/web/assets/cynefin-OW5HDTMX-CnzQfOGp.js +0 -1
- package/out/web/assets/cynefinDiagram-5FMLGOSQ-DVtQnfpm.js +0 -62
- package/out/web/assets/cytoscape.esm-Df1UN4Y1.js +0 -321
- package/out/web/assets/dagre-3AP2YEHR-DG76_k5_.js +0 -4
- package/out/web/assets/dagre-BWadQu2F.js +0 -1
- package/out/web/assets/diagram-S7CK7UJ4-CaouUoze.js +0 -30
- package/out/web/assets/diagram-UQ7AKVKN-B4bEc26B.js +0 -41
- package/out/web/assets/diagram-VX7I27RA-7hH5IPYf.js +0 -24
- package/out/web/assets/diagram-Z3DM3KII-CCM4clo8.js +0 -24
- package/out/web/assets/dist-BoTOASLF.js +0 -1
- package/out/web/assets/dist-js-BkYNznHX.js +0 -1
- package/out/web/assets/ebnfDiagram-PWID7BFC-Da7WAM3k.js +0 -1
- package/out/web/assets/event-Cdt7Byyj.js +0 -1
- package/out/web/assets/eventmodeling-NTZA5JFV-xcfsA0XD.js +0 -1
- package/out/web/assets/flowDiagram-A5DVABFB-JdtH1673.js +0 -1
- package/out/web/assets/ganttDiagram-EL5Y4UJY-B3ClFGmL.js +0 -292
- package/out/web/assets/gitGraph-4MIJSDKK-BZ_y_cDU.js +0 -1
- package/out/web/assets/gitGraphDiagram-WWUBYQGX-drhRSYm3.js +0 -106
- package/out/web/assets/graphlib-CTR5ZhLf.js +0 -1
- package/out/web/assets/index-BZ9xgmMP.css +0 -1
- package/out/web/assets/index-Ca8cCS4h.js +0 -168
- package/out/web/assets/info-A6RAGUB7-B7I3K0F1.js +0 -1
- package/out/web/assets/infoDiagram-RXCK75RN-deX_1MPh.js +0 -2
- package/out/web/assets/journeyDiagram-EYS64GPL-CZn2kB8b.js +0 -139
- package/out/web/assets/jsx-runtime-DN4NhQUK.js +0 -1
- package/out/web/assets/katex-O3jvqgnU.js +0 -257
- package/out/web/assets/markdown-CMhYIcWB.js +0 -39
- package/out/web/assets/mermaid-parser.core-Whu2rlJC.js +0 -7
- package/out/web/assets/mermaid.core-CKyPo8VH.js +0 -11
- package/out/web/assets/modelManager-CUaGWMWu.js +0 -2
- package/out/web/assets/oauthManager-DlNhXJr6.js +0 -1
- package/out/web/assets/packet-AYTQ26CC-CEeIRKRG.js +0 -1
- package/out/web/assets/pegDiagram-XKGWAZYB-BYadI-KO.js +0 -1
- package/out/web/assets/pie-WAS4IAKB-D8uf4dh5.js +0 -1
- package/out/web/assets/pieDiagram-E7YTZNPT-CjSDy4hO.js +0 -39
- package/out/web/assets/radar-RG4KPBEZ-DZJxnokY.js +0 -1
- package/out/web/assets/railroad-74A4TZTK-DBysUiUi.js +0 -1
- package/out/web/assets/railroad-abnf-HS5TGJTU-CHWxoJYg.js +0 -1
- package/out/web/assets/railroad-ebnf-LZEXJU2U-DDv7X6bY.js +0 -1
- package/out/web/assets/railroad-peg-WCYAUIDC-DpfcYYNJ.js +0 -1
- package/out/web/assets/railroadDiagram-O6MQD6OU-CYtyv0t3.js +0 -1
- package/out/web/assets/rough.esm-DFbTUy8a.js +0 -1
- package/out/web/assets/sankeyDiagram-P5KCCOFB-Bn2x6C4Y.js +0 -40
- package/out/web/assets/sequenceDiagram-WJ2MYXX4-BvFLKtPd.js +0 -162
- package/out/web/assets/sizeCapture-X5ZJPWSS-DKeOCaN2.js +0 -1
- package/out/web/assets/src-DnfeXQPr.js +0 -1
- package/out/web/assets/stateDiagram-HBIQ2CUA-Bx0GWeaY.js +0 -1
- package/out/web/assets/stateDiagram-v2-4QOOHH4V--hol1yg_.js +0 -1
- package/out/web/assets/studio-B1mk40wD.js +0 -1
- package/out/web/assets/swimlanes-XN3QIQJK-CCma0T7L.js +0 -1
- package/out/web/assets/swimlanesDiagram-VK2B7HYN-BkohoVsU.js +0 -8
- package/out/web/assets/timeline-definition-24CTP7MA-iCRhhJ7C.js +0 -120
- package/out/web/assets/treeView-Q6P3EWNA-DZ-y08qp.js +0 -1
- package/out/web/assets/treemap-WGGIJYW6-De0CxzMx.js +0 -1
- package/out/web/assets/vennDiagram-4TSXK5OY-w_7aZ6xe.js +0 -34
- package/out/web/assets/wardley-WFR3VGLG-DT0y0xJ4.js +0 -1
- package/out/web/assets/window-BJCVtyET.js +0 -1
- package/shared-modules/libsecret/libsecret.json +0 -23
- package/shared-modules/libusb/libusb.json +0 -27
- package/shared-modules/lzo/lzo.json +0 -27
- package/src/renderer/shared/components/AgentActivityDrawer.tsx +0 -204
- package/src/renderer/shared/components/AgentActivityTable.tsx +0 -301
- package/src/renderer/shared/components/ChatMessageItem.test.tsx +0 -68
- package/src/renderer/shared/components/ChatMessageItem.tsx +0 -326
- package/src/renderer/shared/components/ChatPanel.test.tsx +0 -21
- package/src/renderer/shared/components/FormattedMessage.tsx +0 -11
- package/src/renderer/shared/components/GeminiLiveOverlay.test.tsx +0 -24
- package/src/renderer/shared/components/GlideSelect.d.ts +0 -31
- package/src/renderer/shared/components/GlideSelect.jsx +0 -266
- package/src/renderer/shared/components/InlineThoughtNote.tsx +0 -27
- package/src/renderer/shared/components/ModSessionControls.tsx +0 -8
- package/src/renderer/shared/components/ModUi.tsx +0 -26
- package/src/renderer/shared/components/ProgressActivity.tsx +0 -17
- package/src/renderer/shared/components/ReviewHistory.tsx +0 -42
- package/src/renderer/shared/components/RunSummaryDashboard.tsx +0 -143
- package/src/renderer/shared/components/SelectField.tsx +0 -38
- package/src/renderer/shared/components/SessionSources.tsx +0 -48
- package/src/renderer/shared/components/SessionSourcesPopover.tsx +0 -61
- package/src/renderer/shared/components/ToolSurfacePage.test.tsx +0 -32
- package/src/renderer/shared/components/ViewedImages.tsx +0 -36
- package/src/renderer/shared/components/WorkspaceContextPopover.tsx +0 -138
- package/src/renderer/shared/components/WorkspacePreviewActions.test.tsx +0 -44
- package/src/renderer/shared/components/ui/demo.tsx +0 -26
- package/src/renderer/shared/css/session-sources-popover.css +0 -9
- package/src/renderer/src/components/BrowserShell.tsx +0 -108
- package/src/renderer/src/components/BrowserSuggestionsPopup.tsx +0 -91
- package/src/renderer/src/components/CalculationCard.tsx +0 -3
- package/src/renderer/src/components/ImageGenCard.tsx +0 -2
- package/src/renderer/src/components/ImageSearchCard.tsx +0 -2
- package/src/renderer/src/components/MermaidCard.tsx +0 -1
- package/src/renderer/src/components/PicturesLibrary.tsx +0 -2
- package/src/renderer/src/components/Settings/AgentsTab.tsx +0 -4
- package/src/renderer/src/components/Settings/AudioTab.tsx +0 -3
- package/src/renderer/src/components/Settings/AutomationTab.tsx +0 -3
- package/src/renderer/src/components/Settings/GeneralTab.tsx +0 -3
- package/src/renderer/src/components/Settings/MemoryTab.tsx +0 -3
- package/src/renderer/src/components/Settings/PluginsTab.tsx +0 -3
- package/src/renderer/src/components/Settings/ProfileTab.tsx +0 -3
- package/src/renderer/src/components/Settings/ShortcutsTab.tsx +0 -3
- package/src/renderer/src/components/Settings/ThemeTab.tsx +0 -3
- package/src/renderer/src/components/StockCard.tsx +0 -3
- package/src/renderer/src/components/WeatherCard.tsx +0 -3
- package/src/renderer/src/components/browser-shell.css +0 -185
- package/src/renderer/src/css/pictures.css +0 -2
- package/src/renderer/src-web/components/PicturesLibrary.tsx +0 -2
- package/src/renderer/src-web/components/Settings/AgentsTab.tsx +0 -4
- package/src/renderer/src-web/components/Settings/AudioTab.tsx +0 -3
- package/src/renderer/src-web/components/Settings/AutomationTab.tsx +0 -3
- package/src/renderer/src-web/components/Settings/GeneralTab.tsx +0 -3
- package/src/renderer/src-web/components/Settings/MemoryTab.tsx +0 -3
- package/src/renderer/src-web/components/Settings/PluginsTab.tsx +0 -3
- package/src/renderer/src-web/components/Settings/ProfileTab.tsx +0 -3
- package/src/renderer/src-web/components/Settings/ShortcutsTab.tsx +0 -3
- package/src/renderer/src-web/components/Settings/ThemeTab.tsx +0 -3
- package/src/renderer/src-web/css/pictures.css +0 -2
- package/src/renderer/src-web/css/settings/base.css +0 -1266
- package/src/renderer/src-web/css/spotlight.css +0 -102
- package/src/renderer/src-web/css/widget.css +0 -213
- package/src-tauri/src/native/browser.rs +0 -252
- /package/src/renderer/shared/components/{ContextCompactionStatus.tsx → chat/ContextCompactionStatus.tsx} +0 -0
- /package/src/renderer/shared/components/{GeminiLiveOverlay.css → chat/GeminiLiveOverlay.css} +0 -0
- /package/src/renderer/shared/components/{VirtualChatHistory.tsx → chat/VirtualChatHistory.tsx} +0 -0
- /package/src/renderer/shared/components/{VoicePill.d.ts → chat/VoicePill.d.ts} +0 -0
- /package/src/renderer/shared/components/{VoicePill.test.tsx → chat/VoicePill.test.tsx} +0 -0
- /package/src/renderer/shared/components/{ScreenCaptureDialog.css → studio/ScreenCaptureDialog.css} +0 -0
- /package/src/renderer/shared/components/{ScreenCaptureDialog.tsx → studio/ScreenCaptureDialog.tsx} +0 -0
- /package/src/renderer/shared/components/{SelectField.test.tsx → ui/SelectField.test.tsx} +0 -0
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import{i as e,n as t}from"./rolldown-runtime-CNOWq4Kh.js";import{n,t as r}from"./jsx-runtime-DmUwWVTj.js";import{A as i,E as a,L as o,O as s,T as c,Xr as l,a as u,c as d,j as f,l as p,n as m,o as h,r as g,s as _,t as v,u as y,w as b}from"./index-BocxnrDG.js";import{B as x,C as S,D as C,E as w,F as T,G as ee,H as te,I as E,J as D,K as O,L as ne,M as k,N as re,O as ie,P as ae,R as oe,S as se,T as ce,U as le,V as ue,W as de,X as fe,Z as pe,_ as me,a as he,b as ge,c as _e,d as ve,f as ye,ft as be,g as xe,h as Se,i as Ce,j as we,k as Te,l as Ee,m as De,n as Oe,o as ke,p as Ae,q as A,r as je,s as Me,st as Ne,t as Pe,tt as Fe,u as Ie,v as Le,x as Re,y as ze,z as Be}from"./config-CkRCdkxn.js";import{n as j,t as M}from"./SelectField-Cy6CghrU.js";import{i as Ve,n as N,r as He,t as Ue}from"./McpRegistryPicker-DnXPlzI7.js";import{a as We,c as Ge,i as Ke,n as qe,o as Je,r as Ye,s as Xe,t as Ze}from"./oauthManager-Ch5Du2fF.js";import{n as Qe,r as $e}from"./modelManager-B3ZFMh8v.js";var et=t((()=>{})),tt=t((()=>{})),nt=t((()=>{})),rt=t((()=>{})),it=t((()=>{})),at=t((()=>{})),ot=t((()=>{})),st=t((()=>{})),ct=t((()=>{}));function lt(e){let t=e.trim().toLowerCase(),n=oe[t===`gemini`||t===`google`?`nanobanana`:t===`flux`?`bfl`:t===`openai`?`dalle`:t];return n?[...n]:[]}function ut(e,t){let[n,r]=(0,dt.useState)(()=>lt(e)),[i,a]=(0,dt.useState)(!1),o=(0,dt.useRef)(0);return(0,dt.useEffect)(()=>{let n=lt(e);r(n);let i=++o.current;a(!0),g(e,t).then(e=>{if(i===o.current&&e&&e.length>0){let t=new Map;for(let e of n)t.set(e.value,e.label);let i=[],a=new Set;for(let n of e)a.has(n)||(a.add(n),i.push({value:n,label:t.get(n)??n}));for(let e of n)a.has(e.value)||(a.add(e.value),i.push(e));r(i)}}).catch(()=>{}).finally(()=>{i===o.current&&a(!1)})},[e,t]),{options:n,models:n.map(e=>e.value),loading:i}}var dt,ft=t((()=>{dt=e(n()),A(),_()}));function pt(e){let t=e.trim().toLowerCase(),n=de[t===`gemini`||t===`google`?`veo`:t];return n?[...n]:[]}function mt(e,t){let[n,r]=(0,ht.useState)(()=>pt(e)),[i,a]=(0,ht.useState)(!1),o=(0,ht.useRef)(0);return(0,ht.useEffect)(()=>{let n=pt(e);r(n);let i=++o.current;a(!0),u(e,t).then(e=>{if(i===o.current&&e&&e.length>0){let t=new Map;for(let e of n)t.set(e.value,e.label);let i=[],a=new Set;for(let n of e)a.has(n)||(a.add(n),i.push({value:n,label:t.get(n)??n}));for(let e of n)a.has(e.value)||(a.add(e.value),i.push(e));r(i)}}).catch(()=>{}).finally(()=>{i===o.current&&a(!1)})},[e,t]),{options:n,models:n.map(e=>e.value),loading:i}}var ht,gt=t((()=>{ht=e(n()),A(),_()})),_t=t((()=>{}));function vt({settings:e,onChange:t}){let n=Te(e),[r,i]=(0,yt.useState)(`Checking…`),[a,o]=(0,yt.useState)(!1),[s,c]=(0,yt.useState)(``);(0,yt.useEffect)(()=>{let e=!1,t=()=>{ie().then(t=>{e||i(t)}).catch(()=>{e||i(`Could not check permission`)})};return t(),window.addEventListener(`focus`,t),()=>{e=!0,window.removeEventListener(`focus`,t)}},[]);let l=async e=>{o(!0),c(``);try{let t=await ie(!0);i(t),t===`granted`?e&&(await window.api.notifyAiResponse(`Your Mint notifications are working.`),c(`Test notification sent. If it does not appear, check your system’s Do Not Disturb setting.`)):c(t===`unsupported`?`Notifications are unavailable in this browser.`:`Allow notifications in your browser or system settings, then check permission again.`)}catch(e){c(e instanceof Error?e.message:String(e))}finally{o(!1)}},u=(e,r,i)=>(0,P.jsxs)(`div`,{className:`toggle-row`,children:[(0,P.jsxs)(`div`,{children:[(0,P.jsx)(`label`,{htmlFor:`notifications-`+e,children:r}),(0,P.jsx)(`p`,{className:`hint`,children:i})]}),(0,P.jsxs)(`label`,{className:`settings-toggle-switch`,children:[(0,P.jsx)(`input`,{id:`notifications-`+e,type:`checkbox`,"aria-label":r,checked:n[e],disabled:e!==`enabled`&&!n.enabled,onChange:r=>t({...n,[e]:r.target.checked})}),(0,P.jsx)(`span`,{className:`settings-toggle-slider`})]})]},e);return(0,P.jsxs)(`div`,{className:`tab-pane active notifications-tab`,children:[(0,P.jsxs)(`section`,{className:`setting-section`,children:[(0,P.jsx)(`div`,{className:`section-heading`,children:(0,P.jsxs)(`div`,{children:[(0,P.jsx)(`p`,{className:`section-kicker`,children:`Stay informed`}),(0,P.jsx)(`h2`,{className:`section-title`,children:`Notifications`})]})}),(0,P.jsx)(`p`,{className:`hint`,children:`Choose what Mint shows in Desktop and Web. Select Save Settings to apply your changes.`}),(0,P.jsx)(`div`,{className:`toggle-card`,children:u(`enabled`,`Enable notifications`,`Turn Mint notifications on or off.`)})]}),(0,P.jsxs)(`section`,{className:`setting-section`,children:[(0,P.jsx)(`h3`,{children:`Notification types`}),(0,P.jsxs)(`div`,{className:`toggle-card`,children:[u(`replies`,`AI replies`,`Notify when a response finishes while Mint is in the background.`),u(`approvals`,`Approval requests`,`Notify when Mint needs your approval or an answer while in the background.`),u(`system`,`System & background tasks`,`Battery, connection changes, and queued task updates on Desktop.`)]})]}),(0,P.jsxs)(`section`,{className:`setting-section`,children:[(0,P.jsx)(`h3`,{children:`Where notifications appear`}),(0,P.jsxs)(`div`,{className:`toggle-card`,children:[u(`os`,`System notifications`,`Show an operating system popup while Mint is in the background.`),u(`inApp`,`In-app notices`,`Show system and background task updates inside Mint.`)]})]}),(0,P.jsxs)(`section`,{className:`setting-section notifications-permission`,children:[(0,P.jsx)(`h3`,{children:`Notification permission`}),(0,P.jsx)(`p`,{className:`hint`,children:`Permission is specific to this browser or Desktop installation.`}),(0,P.jsxs)(`p`,{className:`notifications-permission-state`,role:`status`,children:[`Status: `,(0,P.jsx)(`strong`,{children:r})]}),r===`denied`&&(0,P.jsx)(`p`,{className:`hint`,children:`Notifications are blocked. Allow them in your browser or system settings.`}),(0,P.jsxs)(`div`,{className:`notifications-actions`,children:[(0,P.jsx)(`button`,{type:`button`,className:`btn-secondary`,disabled:a||r===`unsupported`,onClick:()=>void l(!1),children:`Check permission`}),(0,P.jsx)(`button`,{type:`button`,className:`btn-secondary`,disabled:a||!n.enabled||!n.os||r===`unsupported`,onClick:()=>void l(!0),children:`Send test notification`})]}),s&&(0,P.jsx)(`p`,{className:`notifications-feedback`,role:`status`,children:s})]})]})}var yt,P,bt=t((()=>{yt=e(n()),C(),_t(),P=r()}));function F({value:e,onChange:t,placeholder:n,className:r}){let[i,a]=(0,xt.useState)(!1);return(0,St.jsxs)(`div`,{className:`api-key-field`,children:[(0,St.jsx)(`input`,{type:i?`text`:`password`,className:r,value:e,onChange:e=>t(e.target.value),placeholder:n}),(0,St.jsx)(`button`,{type:`button`,className:`api-key-toggle`,onClick:()=>a(e=>!e),"aria-label":i?`Hide API key`:`Show API key`,title:i?`Hide API key`:`Show API key`,children:i?(0,St.jsxs)(`svg`,{width:`15`,height:`15`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,St.jsx)(`path`,{d:`M17.94 17.94A10.94 10.94 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19m-6.72-1.07a3 3 0 1 1-4.24-4.24`}),(0,St.jsx)(`line`,{x1:`1`,y1:`1`,x2:`23`,y2:`23`})]}):(0,St.jsxs)(`svg`,{width:`15`,height:`15`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,St.jsx)(`path`,{d:`M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z`}),(0,St.jsx)(`circle`,{cx:`12`,cy:`12`,r:`3`})]})})]})}var xt,St,Ct=t((()=>{xt=e(n()),St=r()}));function wt({value:e,models:t,onChange:n,onCustomChange:r,customValue:i,placeholder:a=`Select or search OpenRouter model...`}){let[o,s]=(0,I.useState)(!1),[c,l]=(0,I.useState)(``),[u,d]=(0,I.useState)(0),[f,p]=(0,I.useState)(!1),m=(0,I.useRef)(null),h=(0,I.useRef)(null),g=(0,I.useRef)(null);(0,I.useEffect)(()=>{o&&(l(``),d(0),setTimeout(()=>{h.current?.focus()},50))},[o]),(0,I.useEffect)(()=>{let e=e=>{m.current&&!m.current.contains(e.target)&&s(!1)};return o?document.addEventListener(`mousedown`,e):p(!1),()=>{document.removeEventListener(`mousedown`,e)}},[o]);let{popularList:_,otherList:v}=(0,I.useMemo)(()=>{let e=new Set(le),n=[];for(let e of le)t.includes(e)&&n.push(e);return{popularList:n,otherList:t.filter(t=>!e.has(t))}},[t]),{filteredPopular:y,filteredOther:b}=(0,I.useMemo)(()=>{let e=c.trim().toLowerCase();return e?{filteredPopular:_.filter(t=>t.toLowerCase().includes(e)),filteredOther:v.filter(t=>t.toLowerCase().includes(e))}:{filteredPopular:_,filteredOther:v}},[_,v,c]),x=!!c.trim()||f,S=(0,I.useMemo)(()=>{let e=[];for(let t of y)e.push({type:`model`,value:t,label:t});if(x)for(let t of b)e.push({type:`model`,value:t,label:t});return e.push({type:`custom`,value:`custom`,label:`Custom Model...`}),e},[y,b,x]);(0,I.useEffect)(()=>{if(!o||!g.current)return;let e=g.current.querySelector(`[data-combobox-idx="${u}"]`);e&&e.scrollIntoView({block:`nearest`})},[u,o]);let C=e=>{n(e),s(!1)},w=()=>{let e=c.trim();e&&(r&&r(e),n(`custom`),s(!1))},T=e=>{if(!o)(e.key===`Enter`||e.key===`ArrowDown`||e.key===` `)&&(e.preventDefault(),s(!0));else if(e.key===`Escape`)e.preventDefault(),s(!1);else if(e.key===`ArrowDown`)e.preventDefault(),d(e=>e+1<S.length?e+1:0);else if(e.key===`ArrowUp`)e.preventDefault(),d(e=>e-1>=0?e-1:S.length-1);else if(e.key===`Enter`){e.preventDefault();let t=S[u];t&&C(t.value)}},ee=(0,I.useMemo)(()=>e===`custom`?i?`Custom: ${i}`:`Custom Model...`:e||a,[e,i,a]),te=D(e===`custom`?i||``:e),E=0;return(0,L.jsxs)(`div`,{className:`model-combobox-container`,ref:m,children:[(0,L.jsxs)(`button`,{type:`button`,className:`model-combobox-trigger ${o?`is-open`:``}`,onClick:()=>s(!o),onKeyDown:T,"aria-haspopup":`listbox`,"aria-expanded":o,children:[(0,L.jsxs)(`div`,{className:`model-combobox-trigger-content`,children:[(0,L.jsx)(`span`,{className:`model-combobox-trigger-text`,children:ee}),te&&(0,L.jsx)(`span`,{className:`model-tag-badge badge-free`,children:`Free`})]}),(0,L.jsx)(`svg`,{className:`model-combobox-chevron ${o?`is-open`:``}`,width:`14`,height:`14`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2.2`,strokeLinecap:`round`,strokeLinejoin:`round`,children:(0,L.jsx)(`polyline`,{points:`6 9 12 15 18 9`})})]}),o&&(0,L.jsxs)(`div`,{className:`model-combobox-dropdown`,onKeyDown:T,children:[(0,L.jsxs)(`div`,{className:`model-combobox-search-box`,children:[(0,L.jsxs)(`svg`,{className:`combobox-search-icon`,width:`13`,height:`13`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2.2`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,L.jsx)(`circle`,{cx:`11`,cy:`11`,r:`8`}),(0,L.jsx)(`line`,{x1:`21`,y1:`21`,x2:`16.65`,y2:`16.65`})]}),(0,L.jsx)(`input`,{ref:h,type:`text`,className:`model-combobox-search-input`,placeholder:`Search 300+ models or type to filter...`,value:c,onChange:e=>{l(e.target.value),d(0)}}),c&&(0,L.jsx)(`button`,{type:`button`,className:`combobox-clear-btn`,onClick:()=>{l(``),d(0)},title:`Clear`,children:(0,L.jsxs)(`svg`,{width:`12`,height:`12`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2.2`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,L.jsx)(`line`,{x1:`18`,y1:`6`,x2:`6`,y2:`18`}),(0,L.jsx)(`line`,{x1:`6`,y1:`6`,x2:`18`,y2:`18`})]})})]}),(0,L.jsxs)(`div`,{className:`model-combobox-list`,ref:g,role:`listbox`,children:[c.trim()&&!t.includes(c.trim())&&(0,L.jsxs)(`div`,{className:`model-combobox-item custom-query-item`,onClick:w,role:`option`,"aria-selected":!1,children:[(0,L.jsx)(`div`,{className:`combobox-item-left`,children:(0,L.jsxs)(`span`,{className:`combobox-item-name`,children:[`Use custom model: `,(0,L.jsx)(`strong`,{children:c.trim()})]})}),(0,L.jsx)(`span`,{className:`combobox-custom-badge`,children:`Enter`})]}),y.length>0&&(0,L.jsxs)(`div`,{className:`model-combobox-group`,children:[(0,L.jsx)(`div`,{className:`model-combobox-group-title`,children:(0,L.jsx)(`span`,{children:`★ Popular & Recommended`})}),y.map(t=>{let n=E++,r=e===t,i=u===n,a=D(t);return(0,L.jsxs)(`div`,{"data-combobox-idx":n,className:`model-combobox-item ${r?`is-selected`:``} ${i?`is-highlighted`:``}`,onClick:()=>C(t),onMouseEnter:()=>d(n),role:`option`,"aria-selected":r,children:[(0,L.jsxs)(`div`,{className:`combobox-item-left`,children:[(0,L.jsxs)(`div`,{className:`combobox-item-row`,children:[(0,L.jsx)(`span`,{className:`combobox-item-name`,children:t.split(`/`).pop()||t}),a&&(0,L.jsx)(`span`,{className:`model-tag-badge badge-free`,children:`Free`})]}),t.includes(`/`)&&(0,L.jsx)(`span`,{className:`combobox-item-repo`,children:t})]}),r&&(0,L.jsx)(`svg`,{className:`combobox-check-icon`,width:`14`,height:`14`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2.5`,strokeLinecap:`round`,strokeLinejoin:`round`,children:(0,L.jsx)(`polyline`,{points:`20 6 9 17 4 12`})})]},t)})]}),b.length>0&&(0,L.jsxs)(`div`,{className:`model-combobox-group`,children:[(0,L.jsx)(`div`,{className:`model-combobox-group-title`,children:(0,L.jsxs)(`span`,{children:[`Other models (`,b.length,`)`]})}),x?(0,L.jsxs)(L.Fragment,{children:[b.map(t=>{let n=E++,r=e===t,i=u===n,a=D(t);return(0,L.jsxs)(`div`,{"data-combobox-idx":n,className:`model-combobox-item ${r?`is-selected`:``} ${i?`is-highlighted`:``}`,onClick:()=>C(t),onMouseEnter:()=>d(n),role:`option`,"aria-selected":r,children:[(0,L.jsxs)(`div`,{className:`combobox-item-left`,children:[(0,L.jsxs)(`div`,{className:`combobox-item-row`,children:[(0,L.jsx)(`span`,{className:`combobox-item-name`,children:t.split(`/`).pop()||t}),a&&(0,L.jsx)(`span`,{className:`model-tag-badge badge-free`,children:`Free`})]}),t.includes(`/`)&&(0,L.jsx)(`span`,{className:`combobox-item-repo`,children:t})]}),r&&(0,L.jsx)(`svg`,{className:`combobox-check-icon`,width:`14`,height:`14`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2.5`,strokeLinecap:`round`,strokeLinejoin:`round`,children:(0,L.jsx)(`polyline`,{points:`20 6 9 17 4 12`})})]},t)}),!c.trim()&&(0,L.jsx)(`div`,{className:`combobox-see-more-wrap`,style:{marginTop:`4px`},children:(0,L.jsxs)(`button`,{type:`button`,className:`combobox-see-more-btn collapse-btn`,onClick:()=>p(!1),children:[(0,L.jsx)(`svg`,{width:`13`,height:`13`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2.2`,strokeLinecap:`round`,strokeLinejoin:`round`,children:(0,L.jsx)(`polyline`,{points:`18 15 12 9 6 15`})}),(0,L.jsx)(`span`,{children:`Collapse other models`})]})})]}):(0,L.jsx)(`div`,{className:`combobox-see-more-wrap`,children:(0,L.jsxs)(`button`,{type:`button`,className:`combobox-see-more-btn`,onClick:()=>p(!0),children:[(0,L.jsx)(`svg`,{width:`13`,height:`13`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2.2`,strokeLinecap:`round`,strokeLinejoin:`round`,children:(0,L.jsx)(`polyline`,{points:`6 9 12 15 18 9`})}),(0,L.jsxs)(`span`,{children:[`Show all `,b.length,` other models`]})]})})]}),y.length===0&&b.length===0&&!c.trim()&&(0,L.jsx)(`div`,{className:`model-combobox-empty`,children:(0,L.jsx)(`span`,{children:`No models available`})}),(()=>{let t=E++,n=e===`custom`;return(0,L.jsxs)(`div`,{"data-combobox-idx":t,className:`model-combobox-item custom-option-item ${n?`is-selected`:``} ${u===t?`is-highlighted`:``}`,onClick:()=>C(`custom`),onMouseEnter:()=>d(t),role:`option`,"aria-selected":n,children:[(0,L.jsxs)(`div`,{className:`combobox-item-left`,children:[(0,L.jsx)(`span`,{className:`combobox-item-name`,children:`Custom...`}),(0,L.jsx)(`span`,{className:`combobox-item-repo`,children:`Enter a custom model identifier manually`})]}),n&&(0,L.jsx)(`svg`,{className:`combobox-check-icon`,width:`14`,height:`14`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2.5`,strokeLinecap:`round`,strokeLinejoin:`round`,children:(0,L.jsx)(`polyline`,{points:`20 6 9 17 4 12`})})]})})()]})]})]})}var I,L,Tt=t((()=>{I=e(n()),A(),L=r()})),Et,Dt=t((()=>{Et=`<svg fill="currentColor" fill-rule="evenodd" height="1em" style="flex:none;line-height:1" viewBox="0 0 24 24" width="1em" xmlns="http://www.w3.org/2000/svg"><title>Anthropic</title><path d="M13.827 3.52h3.603L24 20h-3.603l-6.57-16.48zm-7.258 0h3.767L16.906 20h-3.674l-1.343-3.461H5.017l-1.344 3.46H0L6.57 3.522zm4.132 9.959L8.453 7.687 6.205 13.48H10.7z"></path></svg>`})),Ot,kt=t((()=>{Ot=`<svg height="1em" style="flex:none;line-height:1" viewBox="0 0 24 24" width="1em" xmlns="http://www.w3.org/2000/svg"><title>DeepSeek</title><path d="M23.748 4.482c-.254-.124-.364.113-.512.234-.051.039-.094.09-.137.136-.372.397-.806.657-1.373.626-.829-.046-1.537.214-2.163.848-.133-.782-.575-1.248-1.247-1.548-.352-.156-.708-.311-.955-.65-.172-.241-.219-.51-.305-.774-.055-.16-.11-.323-.293-.35-.2-.031-.278.136-.356.276-.313.572-.434 1.202-.422 1.84.027 1.436.633 2.58 1.838 3.393.137.093.172.187.129.323-.082.28-.18.552-.266.833-.055.179-.137.217-.329.14a5.526 5.526 0 01-1.736-1.18c-.857-.828-1.631-1.742-2.597-2.458a11.365 11.365 0 00-.689-.471c-.985-.957.13-1.743.388-1.836.27-.098.093-.432-.779-.428-.872.004-1.67.295-2.687.684a3.055 3.055 0 01-.465.137 9.597 9.597 0 00-2.883-.102c-1.885.21-3.39 1.102-4.497 2.623C.082 8.606-.231 10.684.152 12.85c.403 2.284 1.569 4.175 3.36 5.653 1.858 1.533 3.997 2.284 6.438 2.14 1.482-.085 3.133-.284 4.994-1.86.47.234.962.327 1.78.397.63.059 1.236-.03 1.705-.128.735-.156.684-.837.419-.961-2.155-1.004-1.682-.595-2.113-.926 1.096-1.296 2.746-2.642 3.392-7.003.05-.347.007-.565 0-.845-.004-.17.035-.237.23-.256a4.173 4.173 0 001.545-.475c1.396-.763 1.96-2.015 2.093-3.517.02-.23-.004-.467-.247-.588zM11.581 18c-2.089-1.642-3.102-2.183-3.52-2.16-.392.024-.321.471-.235.763.09.288.207.486.371.739.114.167.192.416-.113.603-.673.416-1.842-.14-1.897-.167-1.361-.802-2.5-1.86-3.301-3.307-.774-1.393-1.224-2.887-1.298-4.482-.02-.386.093-.522.477-.592a4.696 4.696 0 011.529-.039c2.132.312 3.946 1.265 5.468 2.774.868.86 1.525 1.887 2.202 2.891.72 1.066 1.494 2.082 2.48 2.914.348.292.625.514.891.677-.802.09-2.14.11-3.054-.614zm1-6.44a.306.306 0 01.415-.287.302.302 0 01.2.288.306.306 0 01-.31.307.303.303 0 01-.304-.308zm3.11 1.596c-.2.081-.399.151-.59.16a1.245 1.245 0 01-.798-.254c-.274-.23-.47-.358-.552-.758a1.73 1.73 0 01.016-.588c.07-.327-.008-.537-.239-.727-.187-.156-.426-.199-.688-.199a.559.559 0 01-.254-.078c-.11-.054-.2-.19-.114-.358.028-.054.16-.186.192-.21.356-.202.767-.136 1.146.016.352.144.618.408 1.001.782.391.451.462.576.685.914.176.265.336.537.445.848.067.195-.019.354-.25.452z" fill="#4D6BFE"></path></svg>`})),At,jt=t((()=>{At=`<svg height="1em" style="flex:none;line-height:1" viewBox="0 0 24 24" width="1em" xmlns="http://www.w3.org/2000/svg"><title>Gemini</title><path d="M20.616 10.835a14.147 14.147 0 01-4.45-3.001 14.111 14.111 0 01-3.678-6.452.503.503 0 00-.975 0 14.134 14.134 0 01-3.679 6.452 14.155 14.155 0 01-4.45 3.001c-.65.28-1.318.505-2.002.678a.502.502 0 000 .975c.684.172 1.35.397 2.002.677a14.147 14.147 0 014.45 3.001 14.112 14.112 0 013.679 6.453.502.502 0 00.975 0c.172-.685.397-1.351.677-2.003a14.145 14.145 0 013.001-4.45 14.113 14.113 0 016.453-3.678.503.503 0 000-.975 13.245 13.245 0 01-2.003-.678z" fill="#3186FF"></path><path d="M20.616 10.835a14.147 14.147 0 01-4.45-3.001 14.111 14.111 0 01-3.678-6.452.503.503 0 00-.975 0 14.134 14.134 0 01-3.679 6.452 14.155 14.155 0 01-4.45 3.001c-.65.28-1.318.505-2.002.678a.502.502 0 000 .975c.684.172 1.35.397 2.002.677a14.147 14.147 0 014.45 3.001 14.112 14.112 0 013.679 6.453.502.502 0 00.975 0c.172-.685.397-1.351.677-2.003a14.145 14.145 0 013.001-4.45 14.113 14.113 0 016.453-3.678.503.503 0 000-.975 13.245 13.245 0 01-2.003-.678z" fill="url(#lobe-icons-gemini-0-_R_0_)"></path><path d="M20.616 10.835a14.147 14.147 0 01-4.45-3.001 14.111 14.111 0 01-3.678-6.452.503.503 0 00-.975 0 14.134 14.134 0 01-3.679 6.452 14.155 14.155 0 01-4.45 3.001c-.65.28-1.318.505-2.002.678a.502.502 0 000 .975c.684.172 1.35.397 2.002.677a14.147 14.147 0 014.45 3.001 14.112 14.112 0 013.679 6.453.502.502 0 00.975 0c.172-.685.397-1.351.677-2.003a14.145 14.145 0 013.001-4.45 14.113 14.113 0 016.453-3.678.503.503 0 000-.975 13.245 13.245 0 01-2.003-.678z" fill="url(#lobe-icons-gemini-1-_R_0_)"></path><path d="M20.616 10.835a14.147 14.147 0 01-4.45-3.001 14.111 14.111 0 01-3.678-6.452.503.503 0 00-.975 0 14.134 14.134 0 01-3.679 6.452 14.155 14.155 0 01-4.45 3.001c-.65.28-1.318.505-2.002.678a.502.502 0 000 .975c.684.172 1.35.397 2.002.677a14.147 14.147 0 014.45 3.001 14.112 14.112 0 013.679 6.453.502.502 0 00.975 0c.172-.685.397-1.351.677-2.003a14.145 14.145 0 013.001-4.45 14.113 14.113 0 016.453-3.678.503.503 0 000-.975 13.245 13.245 0 01-2.003-.678z" fill="url(#lobe-icons-gemini-2-_R_0_)"></path><defs><linearGradient gradientUnits="userSpaceOnUse" id="lobe-icons-gemini-0-_R_0_" x1="7" x2="11" y1="15.5" y2="12"><stop stop-color="#08B962"></stop><stop offset="1" stop-color="#08B962" stop-opacity="0"></stop></linearGradient><linearGradient gradientUnits="userSpaceOnUse" id="lobe-icons-gemini-1-_R_0_" x1="8" x2="11.5" y1="5.5" y2="11"><stop stop-color="#F94543"></stop><stop offset="1" stop-color="#F94543" stop-opacity="0"></stop></linearGradient><linearGradient gradientUnits="userSpaceOnUse" id="lobe-icons-gemini-2-_R_0_" x1="3.5" x2="17.5" y1="13.5" y2="12"><stop stop-color="#FABC12"></stop><stop offset=".46" stop-color="#FABC12" stop-opacity="0"></stop></linearGradient></defs></svg>`})),Mt,Nt=t((()=>{Mt=`<svg fill="currentColor" fill-rule="evenodd" height="1em" style="flex:none;line-height:1" viewBox="0 0 24 24" width="1em" xmlns="http://www.w3.org/2000/svg"><title>Groq</title><path d="M12.036 2c-3.853-.035-7 3-7.036 6.781-.035 3.782 3.055 6.872 6.908 6.907h2.42v-2.566h-2.292c-2.407.028-4.38-1.866-4.408-4.23-.029-2.362 1.901-4.298 4.308-4.326h.1c2.407 0 4.358 1.915 4.365 4.278v6.305c0 2.342-1.944 4.25-4.323 4.279a4.375 4.375 0 01-3.033-1.252l-1.851 1.818A7 7 0 0012.029 22h.092c3.803-.056 6.858-3.083 6.879-6.816v-6.5C18.907 4.963 15.817 2 12.036 2z"></path></svg>`})),Pt,Ft=t((()=>{Pt=`<svg height="1em" style="flex:none;line-height:1" viewBox="0 0 24 24" width="1em" xmlns="http://www.w3.org/2000/svg"><title>HuggingFace</title><path d="M2.25 11.535c0-3.407 1.847-6.554 4.844-8.258a9.822 9.822 0 019.687 0c2.997 1.704 4.844 4.851 4.844 8.258 0 5.266-4.337 9.535-9.687 9.535S2.25 16.8 2.25 11.535z" fill="#FF9D0B"></path><path d="M11.938 20.086c4.797 0 8.687-3.829 8.687-8.551 0-4.722-3.89-8.55-8.687-8.55-4.798 0-8.688 3.828-8.688 8.55 0 4.722 3.89 8.55 8.688 8.55z" fill="#FFD21E"></path><path d="M11.875 15.113c2.457 0 3.25-2.156 3.25-3.263 0-.576-.393-.394-1.023-.089-.582.283-1.365.675-2.224.675-1.798 0-3.25-1.693-3.25-.586 0 1.107.79 3.263 3.25 3.263h-.003z" fill="#FF323D"></path><path d="M14.76 9.21c.32.108.445.753.767.585.447-.233.707-.708.659-1.204a1.235 1.235 0 00-.879-1.059 1.262 1.262 0 00-1.33.394c-.322.384-.377.92-.14 1.36.153.283.638-.177.925-.079l-.002.003zm-5.887 0c-.32.108-.448.753-.768.585a1.226 1.226 0 01-.658-1.204c.048-.495.395-.913.878-1.059a1.262 1.262 0 011.33.394c.322.384.377.92.14 1.36-.152.283-.64-.177-.925-.079l.003.003zm1.12 5.34a2.166 2.166 0 011.325-1.106c.07-.02.144.06.219.171l.192.306c.069.1.139.175.209.175.074 0 .15-.074.223-.172l.205-.302c.08-.11.157-.188.234-.165.537.168.986.536 1.25 1.026.932-.724 1.275-1.905 1.275-2.633 0-.508-.306-.426-.81-.19l-.616.296c-.52.24-1.148.48-1.824.48-.676 0-1.302-.24-1.823-.48l-.589-.283c-.52-.248-.838-.342-.838.177 0 .703.32 1.831 1.187 2.56l.18.14z" fill="#3A3B45"></path><path d="M17.812 10.366a.806.806 0 00.813-.8c0-.441-.364-.8-.813-.8a.806.806 0 00-.812.8c0 .442.364.8.812.8zm-11.624 0a.806.806 0 00.812-.8c0-.441-.364-.8-.812-.8a.806.806 0 00-.813.8c0 .442.364.8.813.8zM4.515 13.073c-.405 0-.765.162-1.017.46a1.455 1.455 0 00-.333.925 1.801 1.801 0 00-.485-.074c-.387 0-.737.146-.985.409a1.41 1.41 0 00-.2 1.722 1.302 1.302 0 00-.447.694c-.06.222-.12.69.2 1.166a1.267 1.267 0 00-.093 1.236c.238.533.81.958 1.89 1.405l.24.096c.768.3 1.473.492 1.478.494.89.243 1.808.375 2.732.394 1.465 0 2.513-.443 3.115-1.314.93-1.342.842-2.575-.274-3.763l-.151-.154c-.692-.684-1.155-1.69-1.25-1.912-.195-.655-.71-1.383-1.562-1.383-.46.007-.889.233-1.15.605-.25-.31-.495-.553-.715-.694a1.87 1.87 0 00-.993-.312zm14.97 0c.405 0 .767.162 1.017.46.216.262.333.588.333.925.158-.047.322-.071.487-.074.388 0 .738.146.985.409a1.41 1.41 0 01.2 1.722c.22.178.377.422.445.694.06.222.12.69-.2 1.166.244.37.279.836.093 1.236-.238.533-.81.958-1.889 1.405l-.239.096c-.77.3-1.475.492-1.48.494-.89.243-1.808.375-2.732.394-1.465 0-2.513-.443-3.115-1.314-.93-1.342-.842-2.575.274-3.763l.151-.154c.695-.684 1.157-1.69 1.252-1.912.195-.655.708-1.383 1.56-1.383.46.007.889.233 1.15.605.25-.31.495-.553.718-.694.244-.162.523-.265.814-.3l.176-.012z" fill="#FF9D0B"></path><path d="M9.785 20.132c.688-.994.638-1.74-.305-2.667-.945-.928-1.495-2.288-1.495-2.288s-.205-.788-.672-.714c-.468.074-.81 1.25.17 1.971.977.721-.195 1.21-.573.534-.375-.677-1.405-2.416-1.94-2.751-.532-.332-.907-.148-.782.541.125.687 2.357 2.35 2.14 2.707-.218.362-.983-.42-.983-.42S2.953 14.9 2.43 15.46c-.52.558.398 1.026 1.7 1.803 1.308.778 1.41.985 1.225 1.28-.187.295-3.07-2.1-3.34-1.083-.27 1.011 2.943 1.304 2.745 2.006-.2.7-2.265-1.324-2.685-.537-.425.79 2.913 1.718 2.94 1.725 1.075.276 3.813.859 4.77-.522zm4.432 0c-.687-.994-.64-1.74.305-2.667.943-.928 1.493-2.288 1.493-2.288s.205-.788.675-.714c.465.074.807 1.25-.17 1.971-.98.721.195 1.21.57.534.377-.677 1.407-2.416 1.94-2.751.532-.332.91-.148.782.541-.125.687-2.355 2.35-2.137 2.707.215.362.98-.42.98-.42S21.05 14.9 21.57 15.46c.52.558-.395 1.026-1.7 1.803-1.308.778-1.408.985-1.225 1.28.187.295 3.07-2.1 3.34-1.083.27 1.011-2.94 1.304-2.743 2.006.2.7 2.263-1.324 2.685-.537.423.79-2.912 1.718-2.94 1.725-1.077.276-3.815.859-4.77-.522z" fill="#FFD21E"></path></svg>`})),It,Lt=t((()=>{It=`<svg fill="currentColor" fill-rule="evenodd" height="1em" style="flex:none;line-height:1" viewBox="0 0 24 24" width="1em" xmlns="http://www.w3.org/2000/svg"><title>LM Studio</title><path d="M2.84 2a1.273 1.273 0 100 2.547h14.107a1.273 1.273 0 100-2.547H2.84zM7.935 5.33a1.273 1.273 0 000 2.548H22.04a1.274 1.274 0 000-2.547H7.935zM3.624 9.935c0-.704.57-1.274 1.274-1.274h14.106a1.274 1.274 0 010 2.547H4.898c-.703 0-1.274-.57-1.274-1.273zM1.273 12.188a1.273 1.273 0 100 2.547H15.38a1.274 1.274 0 000-2.547H1.273zM3.624 16.792c0-.704.57-1.274 1.274-1.274h14.106a1.273 1.273 0 110 2.547H4.898c-.703 0-1.274-.57-1.274-1.273zM13.029 18.849a1.273 1.273 0 100 2.547h9.698a1.273 1.273 0 100-2.547h-9.698z" fill-opacity=".3"></path><path d="M2.84 2a1.273 1.273 0 100 2.547h10.287a1.274 1.274 0 000-2.547H2.84zM7.935 5.33a1.273 1.273 0 000 2.548H18.22a1.274 1.274 0 000-2.547H7.935zM3.624 9.935c0-.704.57-1.274 1.274-1.274h10.286a1.273 1.273 0 010 2.547H4.898c-.703 0-1.274-.57-1.274-1.273zM1.273 12.188a1.273 1.273 0 100 2.547H11.56a1.274 1.274 0 000-2.547H1.273zM3.624 16.792c0-.704.57-1.274 1.274-1.274h10.286a1.273 1.273 0 110 2.547H4.898c-.703 0-1.274-.57-1.274-1.273zM13.029 18.849a1.273 1.273 0 100 2.547h5.78a1.273 1.273 0 100-2.547h-5.78z"></path></svg>`})),Rt,zt=t((()=>{Rt=`<svg height="1em" style="flex:none;line-height:1" viewBox="0 0 24 24" width="1em" xmlns="http://www.w3.org/2000/svg"><title>Mistral</title><path d="M3.428 3.4h3.429v3.428H3.428V3.4zm13.714 0h3.43v3.428h-3.43V3.4z" fill="gold"></path><path d="M3.428 6.828h6.857v3.429H3.429V6.828zm10.286 0h6.857v3.429h-6.857V6.828z" fill="#FFAF00"></path><path d="M3.428 10.258h17.144v3.428H3.428v-3.428z" fill="#FF8205"></path><path d="M3.428 13.686h3.429v3.428H3.428v-3.428zm6.858 0h3.429v3.428h-3.429v-3.428zm6.856 0h3.43v3.428h-3.43v-3.428z" fill="#FA500F"></path><path d="M0 17.114h10.286v3.429H0v-3.429zm13.714 0H24v3.429H13.714v-3.429z" fill="#E10500"></path></svg>`})),Bt,Vt=t((()=>{Bt=`<svg fill="currentColor" fill-rule="evenodd" height="1em" style="flex:none;line-height:1" viewBox="0 0 24 24" width="1em" xmlns="http://www.w3.org/2000/svg"><title>Ollama</title><path d="M7.905 1.09c.216.085.411.225.588.41.295.306.544.744.734 1.263.191.522.315 1.1.362 1.68a5.054 5.054 0 012.049-.636l.051-.004c.87-.07 1.73.087 2.48.474.101.053.2.11.297.17.05-.569.172-1.134.36-1.644.19-.52.439-.957.733-1.264a1.67 1.67 0 01.589-.41c.257-.1.53-.118.796-.042.401.114.745.368 1.016.737.248.337.434.769.561 1.287.23.934.27 2.163.115 3.645l.053.04.026.019c.757.576 1.284 1.397 1.563 2.35.435 1.487.216 3.155-.534 4.088l-.018.021.002.003c.417.762.67 1.567.724 2.4l.002.03c.064 1.065-.2 2.137-.814 3.19l-.007.01.01.024c.472 1.157.62 2.322.438 3.486l-.006.039a.651.651 0 01-.747.536.648.648 0 01-.54-.742c.167-1.033.01-2.069-.48-3.123a.643.643 0 01.04-.617l.004-.006c.604-.924.854-1.83.8-2.72-.046-.779-.325-1.544-.8-2.273a.644.644 0 01.18-.886l.009-.006c.243-.159.467-.565.58-1.12a4.229 4.229 0 00-.095-1.974c-.205-.7-.58-1.284-1.105-1.683-.595-.454-1.383-.673-2.38-.61a.653.653 0 01-.632-.371c-.314-.665-.772-1.141-1.343-1.436a3.288 3.288 0 00-1.772-.332c-1.245.099-2.343.801-2.67 1.686a.652.652 0 01-.61.425c-1.067.002-1.893.252-2.497.703-.522.39-.878.935-1.066 1.588a4.07 4.07 0 00-.068 1.886c.112.558.331 1.02.582 1.269l.008.007c.212.207.257.53.109.785-.36.622-.629 1.549-.673 2.44-.05 1.018.186 1.902.719 2.536l.016.019a.643.643 0 01.095.69c-.576 1.236-.753 2.252-.562 3.052a.652.652 0 01-1.269.298c-.243-1.018-.078-2.184.473-3.498l.014-.035-.008-.012a4.339 4.339 0 01-.598-1.309l-.005-.019a5.764 5.764 0 01-.177-1.785c.044-.91.278-1.842.622-2.59l.012-.026-.002-.002c-.293-.418-.51-.953-.63-1.545l-.005-.024a5.352 5.352 0 01.093-2.49c.262-.915.777-1.701 1.536-2.269.06-.045.123-.09.186-.132-.159-1.493-.119-2.73.112-3.67.127-.518.314-.95.562-1.287.27-.368.614-.622 1.015-.737.266-.076.54-.059.797.042zm4.116 9.09c.936 0 1.8.313 2.446.855.63.527 1.005 1.235 1.005 1.94 0 .888-.406 1.58-1.133 2.022-.62.375-1.451.557-2.403.557-1.009 0-1.871-.259-2.493-.734-.617-.47-.963-1.13-.963-1.845 0-.707.398-1.417 1.056-1.946.668-.537 1.55-.849 2.485-.849zm0 .896a3.07 3.07 0 00-1.916.65c-.461.37-.722.835-.722 1.25 0 .428.21.829.61 1.134.455.347 1.124.548 1.943.548.799 0 1.473-.147 1.932-.426.463-.28.7-.686.7-1.257 0-.423-.246-.89-.683-1.256-.484-.405-1.14-.643-1.864-.643zm.662 1.21l.004.004c.12.151.095.37-.056.49l-.292.23v.446a.375.375 0 01-.376.373.375.375 0 01-.376-.373v-.46l-.271-.218a.347.347 0 01-.052-.49.353.353 0 01.494-.051l.215.172.22-.174a.353.353 0 01.49.051zm-5.04-1.919c.478 0 .867.39.867.871a.87.87 0 01-.868.871.87.87 0 01-.867-.87.87.87 0 01.867-.872zm8.706 0c.48 0 .868.39.868.871a.87.87 0 01-.868.871.87.87 0 01-.867-.87.87.87 0 01.867-.872zM7.44 2.3l-.003.002a.659.659 0 00-.285.238l-.005.006c-.138.189-.258.467-.348.832-.17.692-.216 1.631-.124 2.782.43-.128.899-.208 1.404-.237l.01-.001.019-.034c.046-.082.095-.161.148-.239.123-.771.022-1.692-.253-2.444-.134-.364-.297-.65-.453-.813a.628.628 0 00-.107-.09L7.44 2.3zm9.174.04l-.002.001a.628.628 0 00-.107.09c-.156.163-.32.45-.453.814-.29.794-.387 1.776-.23 2.572l.058.097.008.014h.03a5.184 5.184 0 011.466.212c.086-1.124.038-2.043-.128-2.722-.09-.365-.21-.643-.349-.832l-.004-.006a.659.659 0 00-.285-.239h-.004z"></path></svg>`})),Ht,Ut=t((()=>{Ht=`<svg fill="currentColor" fill-rule="evenodd" height="1em" style="flex:none;line-height:1" viewBox="0 0 24 24" width="1em" xmlns="http://www.w3.org/2000/svg"><title>OpenAI</title><path d="M9.205 8.658v-2.26c0-.19.072-.333.238-.428l4.543-2.616c.619-.357 1.356-.523 2.117-.523 2.854 0 4.662 2.212 4.662 4.566 0 .167 0 .357-.024.547l-4.71-2.759a.797.797 0 00-.856 0l-5.97 3.473zm10.609 8.8V12.06c0-.333-.143-.57-.429-.737l-5.97-3.473 1.95-1.118a.433.433 0 01.476 0l4.543 2.617c1.309.76 2.189 2.378 2.189 3.948 0 1.808-1.07 3.473-2.76 4.163zM7.802 12.703l-1.95-1.142c-.167-.095-.239-.238-.239-.428V5.899c0-2.545 1.95-4.472 4.591-4.472 1 0 1.927.333 2.712.928L8.23 5.067c-.285.166-.428.404-.428.737v6.898zM12 15.128l-2.795-1.57v-3.33L12 8.658l2.795 1.57v3.33L12 15.128zm1.796 7.23c-1 0-1.927-.332-2.712-.927l4.686-2.712c.285-.166.428-.404.428-.737v-6.898l1.974 1.142c.167.095.238.238.238.428v5.233c0 2.545-1.974 4.472-4.614 4.472zm-5.637-5.303l-4.544-2.617c-1.308-.761-2.188-2.378-2.188-3.948A4.482 4.482 0 014.21 6.327v5.423c0 .333.143.571.428.738l5.947 3.449-1.95 1.118a.432.432 0 01-.476 0zm-.262 3.9c-2.688 0-4.662-2.021-4.662-4.519 0-.19.024-.38.047-.57l4.686 2.71c.286.167.571.167.856 0l5.97-3.448v2.26c0 .19-.07.333-.237.428l-4.543 2.616c-.619.357-1.356.523-2.117.523zm5.899 2.83a5.947 5.947 0 005.827-4.756C22.287 18.339 24 15.84 24 13.296c0-1.665-.713-3.282-1.998-4.448.119-.5.19-.999.19-1.498 0-3.401-2.759-5.947-5.946-5.947-.642 0-1.26.095-1.88.31A5.962 5.962 0 0010.205 0a5.947 5.947 0 00-5.827 4.757C1.713 5.447 0 7.945 0 10.49c0 1.666.713 3.283 1.998 4.448-.119.5-.19 1-.19 1.499 0 3.401 2.759 5.946 5.946 5.946.642 0 1.26-.095 1.88-.309a5.96 5.96 0 004.162 1.713z"></path></svg>`})),Wt,Gt=t((()=>{Wt=`<svg height="1em" style="flex:none;line-height:1" viewBox="0 0 24 24" width="1em" xmlns="http://www.w3.org/2000/svg"><title>OpenRouter</title><path d="M18.654 3.87a5.087 5.087 0 110 10.174L23.7 19.09c.64.641.187 1.737-.72 1.737H8.48a8.479 8.479 0 010-16.958h10.175zM8.479 7.26a5.087 5.087 0 100 10.176 5.087 5.087 0 000-10.175z" fill="#C8FF00"></path></svg>`})),Kt,qt=t((()=>{Kt=`<svg height="1em" style="flex:none;line-height:1" viewBox="0 0 24 24" width="1em" xmlns="http://www.w3.org/2000/svg"><title>Perplexity</title><path d="M19.785 0v7.272H22.5V17.62h-2.935V24l-7.037-6.194v6.145h-1.091v-6.152L4.392 24v-6.465H1.5V7.188h2.884V0l7.053 6.494V.19h1.09v6.49L19.786 0zm-7.257 9.044v7.319l5.946 5.234V14.44l-5.946-5.397zm-1.099-.08l-5.946 5.398v7.235l5.946-5.234V8.965zm8.136 7.58h1.844V8.349H13.46l6.105 5.54v2.655zm-8.982-8.28H2.59v8.195h1.8v-2.576l6.192-5.62zM5.475 2.476v4.71h5.115l-5.115-4.71zm13.219 0l-5.115 4.71h5.115v-4.71z" fill="#22B8CD" fill-rule="nonzero"></path></svg>`})),Jt,Yt=t((()=>{Jt=`<svg height="1em" style="flex:none;line-height:1" viewBox="0 0 24 24" width="1em" xmlns="http://www.w3.org/2000/svg"><title>Qwen</title><path d="M12.604 1.34c.393.69.784 1.382 1.174 2.075a.18.18 0 00.157.091h5.552c.174 0 .322.11.446.327l1.454 2.57c.19.337.24.478.024.837-.26.43-.513.864-.76 1.3l-.367.658c-.106.196-.223.28-.04.512l2.652 4.637c.172.301.111.494-.043.77-.437.785-.882 1.564-1.335 2.34-.159.272-.352.375-.68.37-.777-.016-1.552-.01-2.327.016a.099.099 0 00-.081.05 575.097 575.097 0 01-2.705 4.74c-.169.293-.38.363-.725.364-.997.003-2.002.004-3.017.002a.537.537 0 01-.465-.271l-1.335-2.323a.09.09 0 00-.083-.049H4.982c-.285.03-.553-.001-.805-.092l-1.603-2.77a.543.543 0 01-.002-.54l1.207-2.12a.198.198 0 000-.197 550.951 550.951 0 01-1.875-3.272l-.79-1.395c-.16-.31-.173-.496.095-.965.465-.813.927-1.625 1.387-2.436.132-.234.304-.334.584-.335a338.3 338.3 0 012.589-.001.124.124 0 00.107-.063l2.806-4.895a.488.488 0 01.422-.246c.524-.001 1.053 0 1.583-.006L11.704 1c.341-.003.724.032.9.34zm-3.432.403a.06.06 0 00-.052.03L6.254 6.788a.157.157 0 01-.135.078H3.253c-.056 0-.07.025-.041.074l5.81 10.156c.025.042.013.062-.034.063l-2.795.015a.218.218 0 00-.2.116l-1.32 2.31c-.044.078-.021.118.068.118l5.716.008c.046 0 .08.02.104.061l1.403 2.454c.046.081.092.082.139 0l5.006-8.76.783-1.382a.055.055 0 01.096 0l1.424 2.53a.122.122 0 00.107.062l2.763-.02a.04.04 0 00.035-.02.041.041 0 000-.04l-2.9-5.086a.108.108 0 010-.113l.293-.507 1.12-1.977c.024-.041.012-.062-.035-.062H9.2c-.059 0-.073-.026-.043-.077l1.434-2.505a.107.107 0 000-.114L9.225 1.774a.06.06 0 00-.053-.031zm6.29 8.02c.046 0 .058.02.034.06l-.832 1.465-2.613 4.585a.056.056 0 01-.05.029.058.058 0 01-.05-.029L8.498 9.841c-.02-.034-.01-.052.028-.054l.216-.012 6.722-.012z" fill="url(#lobe-icons-qwen-_R_0_)" fill-rule="nonzero"></path><defs><linearGradient id="lobe-icons-qwen-_R_0_" x1="0%" x2="100%" y1="0%" y2="0%"><stop offset="0%" stop-color="#6336E7" stop-opacity=".84"></stop><stop offset="100%" stop-color="#6F69F7" stop-opacity=".84"></stop></linearGradient></defs></svg>`})),Xt,Zt=t((()=>{Xt=`<svg height="1em" style="flex:none;line-height:1" viewBox="0 0 24 24" width="1em" xmlns="http://www.w3.org/2000/svg"><title>together.ai</title><path d="M23.197 4.503A6 6 0 0015 2.307a5.973 5.973 0 00-2.995 4.933l5.996.008v.515h-5.996c.039.937.298 1.87.8 2.74a6 6 0 1010.39-6z" fill="#EF2CC1"></path><path d="M.805 4.5A6 6 0 003 12.697a5.972 5.972 0 005.77.127L5.779 7.627l.446-.257 2.997 5.192A6 6 0 10.804 4.5z" fill="#CAAEF5"></path><path d="M12 23.894a6 6 0 005.999-6c0-2.13-1.1-3.996-2.775-5.06l-3.005 5.189-.444-.258 2.997-5.192A6 6 0 1012 23.894z" fill="#FC4C02"></path></svg>`}));function R(e){let t=e.trim();return t.includes(`xmlns=`)||(t=t.replace(`<svg`,`<svg xmlns="http://www.w3.org/2000/svg"`)),`data:image/svg+xml;utf8,${encodeURIComponent(t)}`}function Qt(e){let t=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 40 40"><text x="50%" y="54%" dominant-baseline="middle" text-anchor="middle" font-size="28">${e}</text></svg>`;return`data:image/svg+xml;utf8,${encodeURIComponent(t)}`}function $t({value:e,onChange:t,providerName:n,onRequestCrop:r,defaultExpanded:i=!1}){let[a,o]=(0,en.useState)(i),[s,c]=(0,en.useState)(`presets`),[l,u]=(0,en.useState)(``),[d,f]=(0,en.useState)(``),[p,m]=(0,en.useState)(!1),[h,g]=(0,en.useState)(null),_=(0,en.useRef)(null),v=(0,en.useMemo)(()=>{if(!e)return null;let t=tn.find(t=>t.dataUrl===e);return t?t.id:null},[e]),y=async e=>{g(null);let n=e.type===`image/svg+xml`||e.name.toLowerCase().endsWith(`.svg`),i=[`image/png`,`image/jpeg`,`image/webp`].includes(e.type)||/\.(png|jpe?g|webp)$/i.test(e.name);if(!n&&!i){g(`Please choose a PNG, JPEG, WebP, or SVG file.`);return}if(n){let n=new FileReader;n.onload=()=>{typeof n.result==`string`&&t(R(n.result))},n.onerror=()=>g(`Could not read this SVG file.`),n.readAsText(e);return}let a=new FileReader;a.onload=()=>{let n=a.result;r?r(n,e.name):t(n)},a.onerror=()=>g(`Could not read image file.`),a.readAsDataURL(e)},b=()=>{let e=l.trim();e&&(!/^https?:\/\//i.test(e)&&!e.startsWith(`data:image/`)?g(`URL must start with http://, https://, or data:image/`):(g(null),t(e),u(``)))},x=e=>{g(null),t(Qt(e))};return(0,z.jsxs)(`div`,{className:`custom-provider-logo-card ${a?`is-expanded`:`is-collapsed`}`,children:[(0,z.jsxs)(`div`,{className:`custom-provider-logo-header`,onClick:()=>o(!a),role:`button`,tabIndex:0,"aria-expanded":a,onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),o(!a))},children:[(0,z.jsxs)(`div`,{className:`custom-provider-logo-avatar-wrap`,children:[(0,z.jsx)(`div`,{className:`custom-provider-logo-avatar`,"aria-label":`Logo preview`,children:e?(0,z.jsx)(`img`,{src:e,alt:``}):(0,z.jsx)(`span`,{className:`custom-provider-logo-fallback`,children:n?n.slice(0,2).toUpperCase():`AI`})}),(0,z.jsxs)(`div`,{className:`custom-provider-logo-meta`,children:[(0,z.jsx)(`span`,{className:`custom-provider-logo-title`,children:e?`Custom logo active`:`No logo selected`}),(0,z.jsx)(`span`,{className:`custom-provider-logo-subtitle`,children:e?v?`Preset: ${tn.find(e=>e.id===v)?.name}`:`Custom image / icon`:`Using fallback default mark`})]})]}),(0,z.jsxs)(`div`,{className:`custom-provider-logo-top-actions`,onClick:e=>e.stopPropagation(),children:[e&&r&&!v&&!e.includes(`data:image/svg+xml`)&&(0,z.jsx)(`button`,{type:`button`,className:`btn btn-secondary btn-xs`,onClick:()=>r(e,`provider-logo.png`),title:`Crop & rotate current logo`,children:`Crop / Rotate`}),e&&(0,z.jsx)(`button`,{type:`button`,className:`btn btn-secondary btn-xs btn-danger-hover`,onClick:()=>t(void 0),title:`Remove logo and use default`,children:`Remove`}),(0,z.jsxs)(`button`,{type:`button`,className:`btn btn-secondary btn-xs custom-provider-toggle-btn`,onClick:()=>o(!a),"aria-expanded":a,title:a?`Collapse logo options`:`Expand logo options`,children:[(0,z.jsx)(`span`,{children:a?`Hide`:e?`Change logo`:`Choose logo`}),(0,z.jsx)(`svg`,{className:`custom-provider-toggle-chevron ${a?`open`:``}`,width:`13`,height:`13`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2.4`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,children:(0,z.jsx)(`polyline`,{points:`6 9 12 15 18 9`})})]})]})]}),a&&(0,z.jsxs)(`div`,{className:`custom-provider-expanded-wrap animate-fade-in`,children:[(0,z.jsxs)(`div`,{className:`custom-provider-tabs`,role:`tablist`,children:[(0,z.jsxs)(`button`,{type:`button`,role:`tab`,"aria-selected":s===`presets`,className:`custom-provider-tab ${s===`presets`?`active`:``}`,onClick:()=>c(`presets`),children:[(0,z.jsx)(`svg`,{width:`14`,height:`14`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,children:(0,z.jsx)(`polygon`,{points:`12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2`})}),`AI Presets`]}),(0,z.jsxs)(`button`,{type:`button`,role:`tab`,"aria-selected":s===`upload`,className:`custom-provider-tab ${s===`upload`?`active`:``}`,onClick:()=>c(`upload`),children:[(0,z.jsxs)(`svg`,{width:`14`,height:`14`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,children:[(0,z.jsx)(`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`}),(0,z.jsx)(`polyline`,{points:`17 8 12 3 7 8`}),(0,z.jsx)(`line`,{x1:`12`,y1:`3`,x2:`12`,y2:`15`})]}),`Upload / Crop`]}),(0,z.jsxs)(`button`,{type:`button`,role:`tab`,"aria-selected":s===`url_emoji`,className:`custom-provider-tab ${s===`url_emoji`?`active`:``}`,onClick:()=>c(`url_emoji`),children:[(0,z.jsxs)(`svg`,{width:`14`,height:`14`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,children:[(0,z.jsx)(`circle`,{cx:`12`,cy:`12`,r:`10`}),(0,z.jsx)(`line`,{x1:`2`,y1:`12`,x2:`22`,y2:`12`}),(0,z.jsx)(`path`,{d:`M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z`})]}),`URL / Emoji`]})]}),(0,z.jsxs)(`div`,{className:`custom-provider-tab-content`,children:[s===`presets`&&(0,z.jsxs)(`div`,{className:`custom-provider-presets-panel`,children:[(0,z.jsx)(`p`,{className:`custom-provider-section-desc`,children:`Select an official vector mark for your provider:`}),(0,z.jsx)(`div`,{className:`custom-provider-presets-grid`,role:`radiogroup`,"aria-label":`Popular AI Presets`,children:tn.map(n=>{let r=e===n.dataUrl;return(0,z.jsxs)(`button`,{type:`button`,role:`radio`,"aria-checked":r,className:`custom-provider-preset-btn ${r?`selected`:``}`,onClick:()=>t(n.dataUrl),title:n.name,children:[(0,z.jsx)(`div`,{className:`custom-provider-preset-icon`,children:(0,z.jsx)(`img`,{src:n.dataUrl,alt:n.name})}),(0,z.jsx)(`span`,{className:`custom-provider-preset-label`,children:n.name}),r&&(0,z.jsx)(`span`,{className:`custom-provider-preset-check`,children:`✓`})]},n.id)})})]}),s===`upload`&&(0,z.jsxs)(`div`,{className:`custom-provider-upload-panel`,children:[(0,z.jsx)(`input`,{ref:_,type:`file`,accept:`.svg,image/svg+xml,image/png,image/jpeg,image/webp`,style:{display:`none`},onChange:e=>{let t=e.currentTarget.files?.[0];t&&y(t),e.currentTarget.value=``}}),(0,z.jsxs)(`div`,{className:`custom-provider-dropzone ${p?`dragging`:``}`,onClick:()=>_.current?.click(),onDragOver:e=>{e.preventDefault(),m(!0)},onDragLeave:e=>{e.preventDefault(),m(!1)},onDrop:e=>{e.preventDefault(),m(!1);let t=e.dataTransfer.files?.[0];t&&y(t)},children:[(0,z.jsx)(`div`,{className:`custom-provider-dropzone-icon`,children:(0,z.jsxs)(`svg`,{width:`28`,height:`28`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,children:[(0,z.jsx)(`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`}),(0,z.jsx)(`polyline`,{points:`17 8 12 3 7 8`}),(0,z.jsx)(`line`,{x1:`12`,y1:`3`,x2:`12`,y2:`15`})]})}),(0,z.jsxs)(`p`,{className:`custom-provider-dropzone-text`,children:[(0,z.jsx)(`strong`,{children:`Click to browse`}),` or drag & drop image here`]}),(0,z.jsx)(`p`,{className:`custom-provider-dropzone-hint`,children:`Supports SVG, PNG, WebP, JPEG · Auto-resize & Crop included`})]})]}),s===`url_emoji`&&(0,z.jsxs)(`div`,{className:`custom-provider-url-emoji-panel`,children:[(0,z.jsxs)(`div`,{className:`custom-provider-field-group`,children:[(0,z.jsx)(`label`,{className:`custom-provider-field-label`,children:`Image Web URL`}),(0,z.jsxs)(`div`,{className:`custom-provider-url-row`,children:[(0,z.jsx)(`input`,{type:`url`,value:l,onChange:e=>u(e.target.value),onKeyDown:e=>{e.key===`Enter`&&(e.preventDefault(),b())},placeholder:`https://example.com/logo.png`,className:`custom-provider-url-input`}),(0,z.jsx)(`button`,{type:`button`,className:`btn btn-secondary btn-small`,onClick:b,disabled:!l.trim(),children:`Apply URL`})]})]}),(0,z.jsxs)(`div`,{className:`custom-provider-field-group`,children:[(0,z.jsx)(`label`,{className:`custom-provider-field-label`,children:`Or pick an Emoji badge`}),(0,z.jsx)(`div`,{className:`custom-provider-emoji-grid`,children:nn.map(e=>(0,z.jsx)(`button`,{type:`button`,className:`custom-provider-emoji-btn`,onClick:()=>x(e),title:`Use ${e}`,children:e},e))})]}),(0,z.jsxs)(`div`,{className:`custom-provider-field-group`,children:[(0,z.jsx)(`label`,{className:`custom-provider-field-label`,children:`Or enter custom emoji`}),(0,z.jsxs)(`div`,{className:`custom-provider-url-row`,children:[(0,z.jsx)(`input`,{type:`text`,maxLength:4,value:d,onChange:e=>f(e.target.value),placeholder:`e.g. 🐉`,className:`custom-provider-url-input custom-provider-emoji-input`}),(0,z.jsx)(`button`,{type:`button`,className:`btn btn-secondary btn-small`,onClick:()=>{d.trim()&&(x(d.trim()),f(``))},disabled:!d.trim(),children:`Apply Emoji`})]})]})]}),h&&(0,z.jsxs)(`div`,{className:`custom-provider-error-banner`,role:`alert`,children:[(0,z.jsxs)(`svg`,{width:`14`,height:`14`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2.2`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,children:[(0,z.jsx)(`circle`,{cx:`12`,cy:`12`,r:`10`}),(0,z.jsx)(`line`,{x1:`12`,y1:`8`,x2:`12`,y2:`12`}),(0,z.jsx)(`line`,{x1:`12`,y1:`16`,x2:`12.01`,y2:`16`})]}),(0,z.jsx)(`span`,{children:h})]})]})]})]})}var en,z,tn,nn,rn=t((()=>{en=e(n()),Dt(),kt(),jt(),Nt(),Ft(),Lt(),zt(),Vt(),Ut(),Gt(),qt(),Yt(),Zt(),z=r(),tn=[{id:`deepseek`,name:`DeepSeek`,dataUrl:R(Ot)},{id:`ollama`,name:`Ollama`,dataUrl:R(Bt)},{id:`openrouter`,name:`OpenRouter`,dataUrl:R(Wt)},{id:`groq`,name:`Groq`,dataUrl:R(Mt)},{id:`mistral`,name:`Mistral AI`,dataUrl:R(Rt)},{id:`together`,name:`Together AI`,dataUrl:R(Xt)},{id:`perplexity`,name:`Perplexity`,dataUrl:R(Kt)},{id:`lmstudio`,name:`LM Studio`,dataUrl:R(It)},{id:`huggingface`,name:`Hugging Face`,dataUrl:R(Pt)},{id:`openai`,name:`OpenAI`,dataUrl:R(Ht)},{id:`anthropic`,name:`Anthropic`,dataUrl:R(Et)},{id:`gemini`,name:`Gemini`,dataUrl:R(At)},{id:`qwen`,name:`Qwen`,dataUrl:R(Jt)}],nn=[`🤖`,`🧠`,`⚡`,`🐋`,`🦙`,`🚀`,`🔮`,`🌐`,`💡`,`💎`,`🛠️`,`🦉`,`✨`,`🔥`,`🎯`,`🦄`]}));function an({imageSrc:e,fileName:t,onClose:n,onConfirm:r,title:i,outputFormat:a=`image/png`,circular:o=!0}){let[s,c]=(0,B.useState)(1),[l,u]=(0,B.useState)(0),[d,f]=(0,B.useState)({x:0,y:0}),[p,m]=(0,B.useState)(!1),[h,g]=(0,B.useState)({width:0,height:0}),_=(0,B.useRef)(!1),v=(0,B.useRef)({x:0,y:0}),y=(0,B.useRef)(null),b=(0,B.useRef)(1),x=(0,B.useRef)(null);(0,B.useEffect)(()=>{let t=new Image;t.onload=()=>{g({width:t.naturalWidth,height:t.naturalHeight})},t.src=e},[e]);let S=!h.width||!h.height?1:Math.max(on/h.width,on/h.height),C=(0,B.useRef)(s);C.current=s;let w=(0,B.useRef)(l);w.current=l;let T=(0,B.useCallback)((e,t,n)=>{if(!h.width||!h.height)return e;let r=n%180!=0,i=r?h.height:h.width,a=r?h.width:h.height,o=i*S*t,s=a*S*t,c=Math.max(0,(o-on)/2),l=Math.max(0,(s-on)/2);return{x:Math.min(Math.max(e.x,-c),c),y:Math.min(Math.max(e.y,-l),l)}},[h.width,h.height,S]),ee=e=>{e.preventDefault(),_.current=!0,v.current={x:e.clientX-d.x,y:e.clientY-d.y}},te=(0,B.useCallback)(e=>{if(!_.current)return;let t=e.clientX-v.current.x,n=e.clientY-v.current.y;f(T({x:t,y:n},C.current,w.current))},[T]),E=(0,B.useCallback)(()=>{_.current=!1},[]);(0,B.useEffect)(()=>(window.addEventListener(`mousemove`,te),window.addEventListener(`mouseup`,E),()=>{window.removeEventListener(`mousemove`,te),window.removeEventListener(`mouseup`,E)}),[te,E]);let D=e=>{if(e.touches.length===1)_.current=!0,v.current={x:e.touches[0].clientX-d.x,y:e.touches[0].clientY-d.y};else if(e.touches.length===2){_.current=!1;let t=Math.hypot(e.touches[0].clientX-e.touches[1].clientX,e.touches[0].clientY-e.touches[1].clientY);y.current=t,b.current=s}},O=e=>{if(e.touches.length===1&&_.current){let t=e.touches[0].clientX-v.current.x,n=e.touches[0].clientY-v.current.y;f(T({x:t,y:n},s,l))}else if(e.touches.length===2&&y.current){let t=Math.hypot(e.touches[0].clientX-e.touches[1].clientX,e.touches[0].clientY-e.touches[1].clientY)/y.current,n=Math.min(Math.max(b.current*t,1),3.5);c(n),f(e=>T(e,n,l))}},ne=()=>{_.current=!1,y.current=null},k=e=>{let t=Math.min(Math.max(e,1),3.5);c(t),f(e=>T(e,t,l))};return(0,V.jsx)(`div`,{className:`crop-modal-overlay`,onClick:n,children:(0,V.jsxs)(`div`,{className:`crop-modal-card`,onClick:e=>e.stopPropagation(),children:[(0,V.jsxs)(`div`,{className:`crop-modal-header`,children:[(0,V.jsx)(`button`,{type:`button`,className:`crop-modal-back-btn`,onClick:n,"aria-label":`Back`,title:`Back / Cancel`,children:(0,V.jsxs)(`svg`,{width:`20`,height:`20`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2.2`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,V.jsx)(`line`,{x1:`19`,y1:`12`,x2:`5`,y2:`12`}),(0,V.jsx)(`polyline`,{points:`12 19 5 12 12 5`})]})}),(0,V.jsx)(`h3`,{className:`crop-modal-title`,children:i||`Crop & Rotate`}),(0,V.jsx)(`button`,{type:`button`,className:`crop-modal-reset-btn`,onClick:()=>{c(1),u(0),f({x:0,y:0})},title:`Reset position and rotation`,children:`Reset`})]}),(0,V.jsxs)(`div`,{className:`crop-modal-stage`,children:[(0,V.jsxs)(`div`,{className:`crop-viewport`,style:{width:`${on}px`,height:`${on}px`},onMouseDown:ee,onTouchStart:D,onTouchMove:O,onTouchEnd:ne,onWheel:e=>{e.preventDefault();let t=e.deltaY<0?.08:-.08;k(s+t)},children:[e&&(0,V.jsx)(`img`,{ref:x,src:e,alt:`Crop preview`,className:`crop-image`,draggable:!1,style:{transform:`translate(calc(-50% + ${d.x}px), calc(-50% + ${d.y}px)) rotate(${l}deg) scale(${S*s})`}}),(0,V.jsx)(`div`,{className:`crop-mask-circle`}),(0,V.jsx)(`div`,{className:`crop-bracket crop-bracket-tl`}),(0,V.jsx)(`div`,{className:`crop-bracket crop-bracket-tr`}),(0,V.jsx)(`div`,{className:`crop-bracket crop-bracket-bl`}),(0,V.jsx)(`div`,{className:`crop-bracket crop-bracket-br`})]}),(0,V.jsx)(`p`,{className:`crop-hint-drag`,children:`Drag to reposition · Scroll wheel to zoom`})]}),(0,V.jsxs)(`div`,{className:`crop-modal-controls`,children:[(0,V.jsxs)(`div`,{className:`crop-zoom-row`,children:[(0,V.jsx)(`button`,{type:`button`,className:`crop-zoom-btn`,onClick:()=>k(s-.15),title:`Zoom out`,disabled:s<=1,children:(0,V.jsx)(`svg`,{width:`14`,height:`14`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2.5`,strokeLinecap:`round`,strokeLinejoin:`round`,children:(0,V.jsx)(`line`,{x1:`5`,y1:`12`,x2:`19`,y2:`12`})})}),(0,V.jsx)(`input`,{type:`range`,min:`1`,max:`3`,step:`0.01`,value:s,onChange:e=>k(parseFloat(e.target.value)),className:`crop-zoom-slider range-slider`,"aria-label":`Zoom`}),(0,V.jsx)(`button`,{type:`button`,className:`crop-zoom-btn`,onClick:()=>k(s+.15),title:`Zoom in`,disabled:s>=3,children:(0,V.jsxs)(`svg`,{width:`14`,height:`14`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2.5`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,V.jsx)(`line`,{x1:`12`,y1:`5`,x2:`12`,y2:`19`}),(0,V.jsx)(`line`,{x1:`5`,y1:`12`,x2:`19`,y2:`12`})]})})]}),(0,V.jsx)(`div`,{className:`crop-rotate-row`,children:(0,V.jsxs)(`button`,{type:`button`,className:`crop-rotate-btn`,onClick:()=>{let e=(l+90)%360;u(e),f(t=>T(t,s,e))},title:`Rotate 90 degrees`,children:[(0,V.jsx)(`div`,{className:`crop-rotate-icon`,children:(0,V.jsx)(`svg`,{width:`20`,height:`20`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,children:(0,V.jsx)(`path`,{d:`M21.5 2v6h-6M21.34 15.57a10 10 0 1 1-.57-8.38l5.67-5.67`})})}),(0,V.jsx)(`span`,{className:`crop-rotate-label`,children:`Rotate`})]})}),(0,V.jsxs)(`div`,{className:`crop-actions-row`,children:[(0,V.jsx)(`button`,{type:`button`,className:`btn-secondary crop-btn-cancel`,onClick:n,disabled:p,children:`Cancel`}),(0,V.jsx)(`button`,{type:`button`,className:`btn-primary crop-btn-confirm`,onClick:async()=>{if(h.width&&h.height){m(!0);try{let t=new Image;t.crossOrigin=`anonymous`,await new Promise((n,r)=>{t.onload=()=>n(),t.onerror=r,t.src=e});let n=document.createElement(`canvas`);n.width=sn,n.height=sn;let i=n.getContext(`2d`);if(!i)throw Error(`Could not get canvas context`);i.imageSmoothingEnabled=!0,i.imageSmoothingQuality=`high`,o&&(i.save(),i.beginPath(),i.arc(sn/2,sn/2,sn/2,0,Math.PI*2),i.closePath(),i.clip());let c=sn/on;i.translate(sn/2+d.x*c,sn/2+d.y*c),i.rotate(l*Math.PI/180);let u=S*s*c;i.scale(u,u),i.drawImage(t,-h.width/2,-h.height/2,h.width,h.height),o&&i.restore(),await r(a===`image/png`?n.toDataURL(`image/png`):n.toDataURL(a,.95))}catch(e){console.error(`Failed to crop image:`,e),alert(`Failed to process image.`)}finally{m(!1)}}},disabled:p,children:p?`Saving…`:`Done`})]})]})]})})}var B,V,on,sn,cn=t((()=>{B=e(n()),V=r(),on=280,sn=512}));function ln({provider:e}){let t=fn[e];return t?t.color?(0,H.jsx)(`span`,{className:`settings-provider-logo is-monochrome`,"aria-hidden":`true`,style:{"--provider-brand-color":t.color,maskImage:`url("${t.src}")`,WebkitMaskImage:`url("${t.src}")`}}):(0,H.jsx)(`img`,{className:`settings-provider-logo`,src:t.src,alt:``,"aria-hidden":`true`}):null}function un({config:e,updateField:t,customGemini:n,setCustomGemini:r,customOpenAI:i,setCustomOpenAI:a,customOpenRouter:o,setCustomOpenRouter:s,customDeepSeek:c,setCustomDeepSeek:l,customAnthropic:u,setCustomAnthropic:d,customHF:f,setCustomHF:p,customLocal:m,setCustomLocal:h,customOllama:g,setCustomOllama:_,dynamicOllamaModels:v,dynamicGeminiModels:y=[...T],dynamicAnthropicModels:b=[...we],dynamicOpenAIModels:x=[...ue],dynamicOpenRouterModels:S=[...te],dynamicDeepSeekModels:C=[...k],dynamicLocalModels:D=[...Be],dynamicImageModels:re,dynamicVideoModels:ie,updateAvailable:ae,updateMessage:se,handleCheckUpdates:ce,handleInstallUpdate:le,isDesktopApp:fe=!0,onSaveWithoutClosing:pe}){let[me,he]=dn.useState(null),[ge,_e]=dn.useState(null),[ve,ye]=dn.useState({ai_routing:!0,search:!1,productivity:!1,image_gen:!1,video_gen:!1,custom_providers:!1,desktop_updates:!1,assistant_presence:!1}),be=e=>{ye(t=>({...t,[e]:!t[e]}))},xe=e=>{ye({ai_routing:e,search:e,productivity:e,image_gen:e,video_gen:e,custom_providers:e,desktop_updates:e,assistant_presence:e})},Se=async e=>{pe&&(await pe(),he(e),setTimeout(()=>he(null),2e3))},Ce=(e,t,n,r,i,a,o)=>{let s=ve[e]??!1;return(0,H.jsxs)(`section`,{className:`setting-section collapsible-section ${s?`is-open`:`is-collapsed`}`,children:[(0,H.jsxs)(`div`,{className:`section-heading-collapsible`,onClick:()=>be(e),role:`button`,"aria-expanded":s,"aria-label":`${s?`Collapse`:`Expand`} ${n}`,children:[(0,H.jsxs)(`div`,{children:[(0,H.jsxs)(`p`,{className:`section-kicker`,children:[t,a]}),(0,H.jsxs)(`h2`,{className:`section-title`,children:[o,n]})]}),(0,H.jsx)(`svg`,{className:`section-chevron`,width:`18`,height:`18`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2.5`,strokeLinecap:`round`,strokeLinejoin:`round`,children:(0,H.jsx)(`polyline`,{points:`6 9 12 15 18 9`})})]}),s&&(0,H.jsx)(`div`,{className:`section-collapsible-body`,children:i})]})},Te=e.aiProvider.startsWith(`custom:`)?(e.customProviders??[]).find(t=>`custom:${t.id}`===e.aiProvider)?.displayName||`Custom`:w(e.aiProvider),Ee=hn[e.searchProvider]??e.searchProvider,De=gn[e.imageGenProvider]??e.imageGenProvider,Oe=_n[e.videoGenProvider]??e.videoGenProvider,ke=(e.customProviders??[]).length;return(0,H.jsxs)(`div`,{className:`tab-pane active`,children:[(0,H.jsxs)(`div`,{className:`accordion-controls`,children:[(0,H.jsx)(`button`,{type:`button`,onClick:()=>xe(!0),children:`Expand all`}),(0,H.jsx)(`button`,{type:`button`,onClick:()=>xe(!1),children:`Collapse all`})]}),Ce(`ai_routing`,`AI routing`,`Provider & Model`,`Choose which AI backend Mint uses, then set the default model.`,(0,H.jsxs)(H.Fragment,{children:[(0,H.jsxs)(`div`,{className:`form-grid compact`,children:[(0,H.jsxs)(`div`,{className:`setting-row stacked`,children:[(0,H.jsx)(`label`,{children:`Active provider`}),(0,H.jsx)(`div`,{className:`pill-segmented`,role:`radiogroup`,"aria-label":`Active provider`,children:[{id:`gemini`,label:w(`gemini`),title:`Google Gemini (Cloud)`},{id:`anthropic`,label:w(`anthropic`),title:`Anthropic Claude`},{id:`openai`,label:w(`openai`),title:`OpenAI`},{id:`openrouter`,label:w(`openrouter`),title:`OpenRouter`},{id:`deepseek`,label:w(`deepseek`),title:`DeepSeek`},{id:`ollama`,label:w(`ollama`),title:`Ollama (Local / Private)`},{id:`huggingface`,label:w(`huggingface`),title:`Hugging Face (Inference API)`},{id:`local_openai`,label:w(`local_openai`),title:`Local (LM Studio / OpenAI Compatible)`},...(e.customProviders??[]).map(e=>({id:`custom:${e.id}`,label:e.displayName||e.id,title:`${e.displayName||e.id} (Custom)`}))].map(n=>(0,H.jsx)(`button`,{type:`button`,role:`radio`,"aria-checked":e.aiProvider===n.id,title:n.title,className:`pill-segmented-btn ${e.aiProvider===n.id?`active`:``}`,onClick:()=>t(`aiProvider`,n.id),children:n.label},n.id))})]}),e.aiProvider.startsWith(`custom:`)&&(()=>{let n=e.aiProvider.replace(/^custom:/,``),r=(e.customProviders??[]).find(e=>e.id===n);if(!r||r.models.length===0)return null;let i=(e.customModelSelections??{})[n]??r.models[0]?.modelId??``;return(0,H.jsxs)(`div`,{className:`setting-row wide`,children:[(0,H.jsx)(`label`,{children:`Active model`}),(0,H.jsx)(M,{"aria-label":`Active model`,value:i,onValueChange:r=>t(`customModelSelections`,{...e.customModelSelections??{},[n]:r}),children:r.models.map(e=>(0,H.jsx)(`option`,{value:e.modelId,children:e.displayName||e.modelId},e.modelId))})]})})(),(()=>{let n=(e.aiProvider===`gemini`?e.geminiModel:e.aiProvider===`openai`?e.openaiModel:e.aiProvider===`anthropic`?e.anthropicModel:e.aiProvider===`deepseek`?e.deepseekModel:e.aiProvider===`ollama`?e.ollamaModel:e.aiProvider===`openrouter`?e.openrouterModel:e.aiProvider===`huggingface`?e.hfModel:e.aiProvider===`local_openai`?e.localModelName:e.aiProvider?.startsWith(`custom:`)?(e.customModelSelections??{})[e.aiProvider.replace(/^custom:/,``)]??``:``)||``,r=n.toLowerCase(),i=(e.aiProvider===`openai`||e.aiProvider===`openrouter`||e.aiProvider===`local_openai`)&&(r.startsWith(`o1`)||r.startsWith(`o3`)),a=e.aiProvider===`deepseek`||r.includes(`deepseek`)||r.includes(`qwq`)||r.includes(`thinking`)||r.includes(`reasoner`)||r.includes(`r1`),o=r.includes(`codestral`),s=a?.6:o?.1:.2,c=e.modelTemperatures??{},l=n?c[n]:void 0,u=l!==void 0,d=e.temperature!==null&&e.temperature!==void 0,f=u||d,p=u?l:d?e.temperature:s,m=(()=>{if(!n)return``;let e=n.trim(),t=e.includes(`/`)?e.split(`/`).pop():e,r=t.includes(`:`)?t.split(`:`)[0]:t,i=r.toLowerCase(),a={"deepseek-v4-flash":`DeepSeek V4 Flash`,"deepseek-v4-pro":`DeepSeek V4 Pro`,"deepseek-chat":`DeepSeek Chat`,"deepseek-reasoner":`DeepSeek Reasoner`,"claude-sonnet-5":`Claude Sonnet 5`,"claude-opus-5":`Claude Opus 5`,"claude-sonnet-4.6":`Claude Sonnet 4.6`,"claude-haiku-4.5":`Claude Haiku 4.5`,"gemini-2.5-flash":`Gemini 2.5 Flash`,"gemini-3.5-flash":`Gemini 3.5 Flash`,"gemini-3.6-flash":`Gemini 3.6 Flash`,"gpt-5.6-luna":`GPT-5.6 Luna`,"gpt-5.6-terra":`GPT-5.6 Terra`,"gpt-5.6-sol":`GPT-5.6 Sol`,"gpt-4o":`GPT-4o`,"gpt-4o-mini":`GPT-4o Mini`,llama3:`Llama 3`};return a[i]?a[i]:r.split(/[-_]/).filter(Boolean).map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(` `)})(),h=i?`Auto (Omitted for ${m||`Reasoning`})`:a?`Auto (0.60 for Reasoning)`:o?`Auto (0.10 for Codestral)`:`Auto (0.20 for Coding)`;u?`${m||n}${l.toFixed(2)}`:d&&`${e.temperature.toFixed(2)}`;let g=()=>{if(n&&c[n]!==void 0){let e={...c};delete e[n],t(`modelTemperatures`,e)}e.temperature!==null&&e.temperature!==void 0&&t(`temperature`,null)},_=e=>{n?t(`modelTemperatures`,{...c,[n]:e}):t(`temperature`,e)};return(0,H.jsxs)(`div`,{className:`setting-row stacked setting-feature-card`,children:[(0,H.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,marginBottom:`0.35rem`},children:[(0,H.jsxs)(`label`,{style:{margin:0,fontWeight:600,display:`flex`,alignItems:`baseline`,gap:`0.45rem`},children:[(0,H.jsx)(`span`,{children:`Model temperature`}),m&&(0,H.jsxs)(`span`,{style:{fontSize:`0.8rem`,fontWeight:500,color:`var(--text-muted)`},children:[`· `,m]})]}),(0,H.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:`0.5rem`},children:[(0,H.jsx)(`span`,{className:`section-current-badge`,style:{fontSize:`0.75rem`},children:u?`Custom (${l.toFixed(2)})`:d?`Custom Global (${e.temperature.toFixed(2)})`:h}),f&&(0,H.jsx)(`button`,{type:`button`,className:`btn-secondary btn-small`,style:{padding:`0.15rem 0.45rem`,fontSize:`0.75rem`},onClick:g,title:`Reset ${m||n||`model`} to smart default`,children:`Reset to Auto`})]})]}),(0,H.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:`0.75rem`},children:[(0,H.jsx)(`input`,{type:`range`,min:`0`,max:`1.5`,step:`0.05`,value:p,onChange:e=>_(parseFloat(e.target.value)),style:{flex:1,accentColor:`var(--accent, #10b981)`,cursor:`pointer`}}),(0,H.jsx)(`span`,{style:{fontSize:`0.85rem`,minWidth:`2.5rem`,textAlign:`right`,fontFamily:`monospace`,fontWeight:600},children:p.toFixed(2)})]}),(0,H.jsxs)(`span`,{style:{fontSize:`0.75rem`,color:`var(--text-muted)`,marginTop:`0.35rem`,lineHeight:1.4},children:[`Controls sampling entropy for `,(0,H.jsx)(`strong`,{children:m||n}),`. `,i?`Reasoning models (o1/o3) automatically omit this parameter.`:a?`Smart default is 0.60 to prevent repetitive reasoning loops.`:o?`Smart default is 0.10 for deterministic code completion.`:`Smart default is 0.20 for general coding and tool execution.`]})]})})(),(()=>{let n=e.aiProvider===`gemini`?e.geminiModel||`gemini-2.5-flash`:e.aiProvider===`anthropic`?e.anthropicModel||`claude-sonnet-5`:e.aiProvider===`openai`?e.openaiModel||`gpt-5.6-luna`:e.aiProvider===`openrouter`?e.openrouterModel||`openai/gpt-5.6-terra`:e.aiProvider===`deepseek`?e.deepseekModel||`deepseek-chat`:e.aiProvider===`local_openai`?e.localModelName||`local-model`:e.aiProvider===`ollama`?e.ollamaModel||`llama3`:e.aiProvider===`huggingface`?e.hfModel||`Qwen/Qwen3.6-27B`:``,r=ee(n,e.aiProvider),i=O(n,e.aiProvider),a=e.modelThinkingConfigs??{},o=n?a[n]:void 0,s=o!==void 0,c=r.supportsThinking,l=c?o?.enabled===void 0?i?e.thinkingEnabled??!0:!1:o.enabled:!1,u=(o?.effort||e.thinkingEffort||`medium`).toLowerCase(),d=()=>{if(n&&a[n]!==void 0){let e={...a};delete e[n],t(`modelThinkingConfigs`,e)}},f=e=>{n&&t(`modelThinkingConfigs`,{...a,[n]:{enabled:e,effort:u}}),t(`thinkingEnabled`,e)},p=e=>{n&&t(`modelThinkingConfigs`,{...a,[n]:{enabled:l,effort:e}}),t(`thinkingEffort`,e)},m={low:`Low`,medium:`Medium`,high:`High`,extra_high:`Extra High`};return(0,H.jsxs)(`div`,{className:`setting-row stacked setting-feature-card`,children:[(0,H.jsxs)(`div`,{className:`thinking-card-header`,style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,marginBottom:`0.5rem`},children:[(0,H.jsxs)(`label`,{className:`thinking-card-title`,style:{margin:0,fontWeight:600,display:`flex`,alignItems:`center`,gap:`0.45rem`},children:[(0,H.jsxs)(`svg`,{width:`15`,height:`15`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,style:{color:`var(--interactive-fg)`},children:[(0,H.jsx)(`path`,{d:`M12 2a7 7 0 0 1 7 7c0 2.38-1.19 4.47-3 5.74V17a2 2 0 0 1-2 2h-4a2 2 0 0 1-2-2v-2.26C6.19 13.47 5 11.38 5 9a7 7 0 0 1 7-7z`}),(0,H.jsx)(`path`,{d:`M9 21h6`})]}),(0,H.jsx)(`span`,{children:`Thinking / Reasoning`}),n&&(0,H.jsxs)(`span`,{style:{fontSize:`0.8rem`,fontWeight:500,color:`var(--text-muted)`},children:[`· `,n.split(`/`).pop()]})]}),(0,H.jsxs)(`div`,{className:`thinking-card-status`,style:{display:`flex`,alignItems:`center`,gap:`0.5rem`},children:[(0,H.jsx)(`span`,{className:`section-current-badge`,style:{fontSize:`0.75rem`},children:c?l?`Thinking ON (${m[u]||`Medium`})${i?``:` · Prompted CoT`}`:`Thinking OFF`:`Unavailable (Non-Text Model)`}),s&&(0,H.jsx)(`button`,{type:`button`,className:`btn-secondary btn-small`,style:{padding:`0.15rem 0.45rem`,fontSize:`0.75rem`},onClick:d,title:`Reset ${n} thinking configuration`,children:`Reset`})]})]}),(0,H.jsxs)(`div`,{className:`thinking-card-toggle-row`,style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,padding:`0.4rem 0`},children:[(0,H.jsxs)(`div`,{children:[(0,H.jsx)(`span`,{style:{fontSize:`0.82rem`,fontWeight:500},children:`Enable thinking`}),(0,H.jsx)(`p`,{style:{margin:`2px 0 0 0`,fontSize:`0.73rem`,color:`var(--text-muted)`},children:c?i?`Uses the provider’s native Reasoning API (thinkingBudget / reasoning_effort / thinking).`:`Uses Prompted Chain-of-Thought (<think>...</think>) so the model reasons step-by-step before answering.`:`Image, audio, and embedding models do not support Chain-of-Thought reasoning.`})]}),(0,H.jsxs)(`label`,{className:`settings-toggle-switch`,style:c?void 0:{opacity:.45,cursor:`not-allowed`},children:[(0,H.jsx)(`input`,{type:`checkbox`,disabled:!c,checked:l,onChange:e=>{c&&f(e.target.checked)}}),(0,H.jsx)(`span`,{className:`settings-toggle-slider`})]})]}),c&&l&&(0,H.jsx)(`div`,{style:{marginTop:`0.5rem`,paddingTop:`0.5rem`,borderTop:`1px solid var(--border)`},children:(0,H.jsxs)(`div`,{className:`thinking-card-effort-row`,style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`},children:[(0,H.jsx)(`span`,{style:{fontSize:`0.78rem`,fontWeight:600,color:`var(--text-muted)`,textTransform:`none`,letterSpacing:`0.04em`},children:`Reasoning Effort`}),(0,H.jsx)(`div`,{className:`thinking-card-effort-options`,style:{display:`flex`,gap:`4px`},children:[`low`,`medium`,`high`,`extra_high`].map(e=>(0,H.jsx)(`button`,{type:`button`,className:`btn-secondary btn-small ${u===e?`active`:``}`,style:{padding:`0.2rem 0.6rem`,fontSize:`0.75rem`,fontWeight:u===e?600:400,background:u===e?`var(--accent-subtle)`:void 0,borderColor:u===e?`var(--accent)`:void 0,color:u===e?`var(--interactive-fg)`:void 0},onClick:()=>p(e),children:m[e]},e))})]})})]})})()]}),(0,H.jsxs)(`div`,{className:`provider-cards-container`,children:[(0,H.jsxs)(`div`,{className:`provider-card ${e.aiProvider===`gemini`?`active-provider`:``}`,children:[(0,H.jsxs)(`div`,{className:`provider-card-header`,children:[(0,H.jsxs)(`div`,{className:`provider-card-title`,children:[(0,H.jsx)(ln,{provider:`gemini`}),`Google Gemini (Cloud)`]}),(0,H.jsx)(`div`,{className:`provider-card-actions`,children:e.aiProvider===`gemini`?(0,H.jsx)(`span`,{className:`provider-active-badge`,children:`Active`}):(0,H.jsx)(`button`,{type:`button`,className:`btn-secondary btn-small`,onClick:()=>t(`aiProvider`,`gemini`),children:`Set active`})})]}),(0,H.jsxs)(`div`,{className:`provider-card-body`,children:[(0,H.jsxs)(`div`,{className:`setting-row`,children:[(0,H.jsx)(`label`,{children:`Gemini model`}),(0,H.jsxs)(M,{"aria-label":`Gemini model`,value:y.includes(e.geminiModel)?e.geminiModel:`custom`,onValueChange:e=>t(`geminiModel`,e),children:[y.map(e=>(0,H.jsx)(`option`,{value:e,children:e},e)),(0,H.jsx)(`option`,{value:`custom`,children:`Custom...`})]})]}),(!y.includes(e.geminiModel)||e.geminiModel===`custom`)&&(0,H.jsxs)(`div`,{className:`setting-row`,children:[(0,H.jsx)(`label`,{children:`Custom Gemini model`}),(0,H.jsx)(`input`,{type:`text`,value:n,onChange:e=>{r(e.target.value),t(`geminiModel`,`custom`)},placeholder:`e.g. gemini-3.1-flash-lite-preview`})]}),(0,H.jsxs)(`div`,{className:`setting-row`,children:[(0,H.jsx)(`label`,{children:`Gemini API Key`}),(0,H.jsx)(F,{value:e.apiKey,onChange:e=>t(`apiKey`,e),placeholder:`Enter Gemini API Key...`})]})]})]}),(0,H.jsxs)(`div`,{className:`provider-card ${e.aiProvider===`anthropic`?`active-provider`:``}`,children:[(0,H.jsxs)(`div`,{className:`provider-card-header`,children:[(0,H.jsxs)(`div`,{className:`provider-card-title`,children:[(0,H.jsx)(ln,{provider:`anthropic`}),`Anthropic Claude`]}),(0,H.jsx)(`div`,{className:`provider-card-actions`,children:e.aiProvider===`anthropic`?(0,H.jsx)(`span`,{className:`provider-active-badge`,children:`Active`}):(0,H.jsx)(`button`,{type:`button`,className:`btn-secondary btn-small`,onClick:()=>t(`aiProvider`,`anthropic`),children:`Set active`})})]}),(0,H.jsxs)(`div`,{className:`provider-card-body`,children:[(0,H.jsxs)(`div`,{className:`setting-row`,children:[(0,H.jsx)(`label`,{children:`Anthropic model`}),(0,H.jsxs)(M,{"aria-label":`Anthropic model`,value:b.includes(e.anthropicModel)?e.anthropicModel:`custom`,onValueChange:e=>t(`anthropicModel`,e),children:[b.map(e=>(0,H.jsx)(`option`,{value:e,children:e},e)),(0,H.jsx)(`option`,{value:`custom`,children:`Custom...`})]})]}),(!b.includes(e.anthropicModel)||e.anthropicModel===`custom`)&&(0,H.jsxs)(`div`,{className:`setting-row`,children:[(0,H.jsx)(`label`,{children:`Custom Anthropic model`}),(0,H.jsx)(`input`,{type:`text`,value:u,onChange:e=>{d(e.target.value),t(`anthropicModel`,`custom`)},placeholder:`e.g. claude-3-5-sonnet-latest`})]}),(0,H.jsxs)(`div`,{className:`setting-row`,children:[(0,H.jsx)(`label`,{children:`Anthropic API Key`}),(0,H.jsx)(F,{value:e.anthropicApiKey,onChange:e=>t(`anthropicApiKey`,e),placeholder:`Enter Anthropic API Key...`})]})]})]}),(0,H.jsxs)(`div`,{className:`provider-card ${e.aiProvider===`openai`?`active-provider`:``}`,children:[(0,H.jsxs)(`div`,{className:`provider-card-header`,children:[(0,H.jsxs)(`div`,{className:`provider-card-title`,children:[(0,H.jsx)(ln,{provider:`openai`}),`OpenAI`]}),(0,H.jsx)(`div`,{className:`provider-card-actions`,children:e.aiProvider===`openai`?(0,H.jsx)(`span`,{className:`provider-active-badge`,children:`Active`}):(0,H.jsx)(`button`,{type:`button`,className:`btn-secondary btn-small`,onClick:()=>t(`aiProvider`,`openai`),children:`Set active`})})]}),(0,H.jsxs)(`div`,{className:`provider-card-body`,children:[(0,H.jsxs)(`div`,{className:`setting-row`,children:[(0,H.jsx)(`label`,{children:`OpenAI Model`}),(0,H.jsxs)(M,{"aria-label":`OpenAI Model`,value:x.includes(e.openaiModel)?e.openaiModel:`custom`,onValueChange:e=>t(`openaiModel`,e),children:[x.map(e=>(0,H.jsx)(`option`,{value:e,children:e},e)),(0,H.jsx)(`option`,{value:`custom`,children:`Custom...`})]})]}),(!x.includes(e.openaiModel)||e.openaiModel===`custom`)&&(0,H.jsxs)(`div`,{className:`setting-row`,children:[(0,H.jsx)(`label`,{children:`Custom OpenAI model`}),(0,H.jsx)(`input`,{type:`text`,value:i,onChange:e=>{a(e.target.value),t(`openaiModel`,`custom`)},placeholder:`e.g. gpt-4o`})]}),(0,H.jsxs)(`div`,{className:`setting-row`,children:[(0,H.jsx)(`label`,{children:`OpenAI API Key`}),(0,H.jsx)(F,{value:e.openaiApiKey,onChange:e=>t(`openaiApiKey`,e),placeholder:`Enter OpenAI API Key...`})]})]})]}),(0,H.jsxs)(`div`,{className:`provider-card ${e.aiProvider===`openrouter`?`active-provider`:``}`,children:[(0,H.jsxs)(`div`,{className:`provider-card-header`,children:[(0,H.jsxs)(`div`,{className:`provider-card-title`,children:[(0,H.jsx)(ln,{provider:`openrouter`}),`OpenRouter`]}),(0,H.jsx)(`div`,{className:`provider-card-actions`,children:e.aiProvider===`openrouter`?(0,H.jsx)(`span`,{className:`provider-active-badge`,children:`Active`}):(0,H.jsx)(`button`,{type:`button`,className:`btn-secondary btn-small`,onClick:()=>t(`aiProvider`,`openrouter`),children:`Set active`})})]}),(0,H.jsxs)(`div`,{className:`provider-card-body`,children:[(0,H.jsxs)(`div`,{className:`setting-row`,children:[(0,H.jsx)(`label`,{children:`OpenRouter Model`}),(0,H.jsx)(wt,{value:S.includes(e.openrouterModel)?e.openrouterModel:`custom`,models:S,onChange:e=>t(`openrouterModel`,e),onCustomChange:e=>{s(e),t(`openrouterModel`,`custom`)},customValue:o,placeholder:`Select or search OpenRouter model...`})]}),(!S.includes(e.openrouterModel)||e.openrouterModel===`custom`)&&(0,H.jsxs)(`div`,{className:`setting-row`,children:[(0,H.jsx)(`label`,{children:`Custom OpenRouter model`}),(0,H.jsx)(`input`,{type:`text`,value:o,onChange:e=>{s(e.target.value),t(`openrouterModel`,`custom`)},placeholder:`e.g. anthropic/claude-3.5-sonnet`})]}),(0,H.jsxs)(`div`,{className:`setting-row`,children:[(0,H.jsx)(`label`,{children:`OpenRouter API Key`}),(0,H.jsx)(F,{value:e.openrouterApiKey,onChange:e=>t(`openrouterApiKey`,e),placeholder:`Enter OpenRouter API Key...`})]})]})]}),(0,H.jsxs)(`div`,{className:`provider-card ${e.aiProvider===`deepseek`?`active-provider`:``}`,children:[(0,H.jsxs)(`div`,{className:`provider-card-header`,children:[(0,H.jsxs)(`div`,{className:`provider-card-title`,children:[(0,H.jsx)(ln,{provider:`deepseek`}),`DeepSeek`]}),(0,H.jsx)(`div`,{className:`provider-card-actions`,children:e.aiProvider===`deepseek`?(0,H.jsx)(`span`,{className:`provider-active-badge`,children:`Active`}):(0,H.jsx)(`button`,{type:`button`,className:`btn-secondary btn-small`,onClick:()=>t(`aiProvider`,`deepseek`),children:`Set active`})})]}),(0,H.jsxs)(`div`,{className:`provider-card-body`,children:[(0,H.jsxs)(`div`,{className:`setting-row`,children:[(0,H.jsx)(`label`,{children:`DeepSeek Model`}),(0,H.jsxs)(M,{"aria-label":`DeepSeek Model`,value:C.includes(e.deepseekModel)?e.deepseekModel:`custom`,onValueChange:e=>t(`deepseekModel`,e),children:[C.map(e=>(0,H.jsx)(`option`,{value:e,children:e},e)),(0,H.jsx)(`option`,{value:`custom`,children:`Custom...`})]})]}),(!C.includes(e.deepseekModel)||e.deepseekModel===`custom`)&&(0,H.jsxs)(`div`,{className:`setting-row`,children:[(0,H.jsx)(`label`,{children:`Custom DeepSeek model`}),(0,H.jsx)(`input`,{type:`text`,value:c,onChange:e=>{l(e.target.value),t(`deepseekModel`,`custom`)},placeholder:`e.g. deepseek-v4-pro`})]}),(0,H.jsxs)(`div`,{className:`setting-row`,children:[(0,H.jsx)(`label`,{children:`DeepSeek API Key`}),(0,H.jsx)(F,{value:e.deepseekApiKey,onChange:e=>t(`deepseekApiKey`,e),placeholder:`Enter DeepSeek API Key...`})]})]})]}),(0,H.jsxs)(`div`,{className:`provider-card ${e.aiProvider===`huggingface`?`active-provider`:``}`,children:[(0,H.jsxs)(`div`,{className:`provider-card-header`,children:[(0,H.jsxs)(`div`,{className:`provider-card-title`,children:[(0,H.jsx)(ln,{provider:`huggingface`}),`Hugging Face (Inference API)`]}),(0,H.jsx)(`div`,{className:`provider-card-actions`,children:e.aiProvider===`huggingface`?(0,H.jsx)(`span`,{className:`provider-active-badge`,children:`Active`}):(0,H.jsx)(`button`,{type:`button`,className:`btn-secondary btn-small`,onClick:()=>t(`aiProvider`,`huggingface`),children:`Set active`})})]}),(0,H.jsxs)(`div`,{className:`provider-card-body`,children:[(0,H.jsxs)(`div`,{className:`setting-row`,children:[(0,H.jsx)(`label`,{children:`Hugging Face model`}),(0,H.jsxs)(M,{"aria-label":`Hugging Face model`,value:E.includes(e.hfModel)?e.hfModel:`custom`,onValueChange:e=>t(`hfModel`,e),children:[E.map(e=>(0,H.jsx)(`option`,{value:e,children:e},e)),(0,H.jsx)(`option`,{value:`custom`,children:`Custom...`})]})]}),(!E.includes(e.hfModel)||e.hfModel===`custom`)&&(0,H.jsxs)(`div`,{className:`setting-row`,children:[(0,H.jsx)(`label`,{children:`Custom Hugging Face model`}),(0,H.jsx)(`input`,{type:`text`,value:f,onChange:e=>{p(e.target.value),t(`hfModel`,`custom`)},placeholder:`e.g. meta-llama/Meta-Llama-3-8B-Instruct`})]}),(0,H.jsxs)(`div`,{className:`setting-row`,children:[(0,H.jsx)(`label`,{children:`Hugging Face API key`}),(0,H.jsx)(F,{value:e.hfApiKey,onChange:e=>t(`hfApiKey`,e),placeholder:`Enter Hugging Face API key...`})]})]})]}),(0,H.jsxs)(`div`,{className:`provider-card ${e.aiProvider===`local_openai`?`active-provider`:``}`,children:[(0,H.jsxs)(`div`,{className:`provider-card-header`,children:[(0,H.jsxs)(`div`,{className:`provider-card-title`,children:[(0,H.jsx)(ln,{provider:`local_openai`}),`LM Studio / Local OpenAI`]}),(0,H.jsx)(`div`,{className:`provider-card-actions`,children:e.aiProvider===`local_openai`?(0,H.jsx)(`span`,{className:`provider-active-badge`,children:`Active`}):(0,H.jsx)(`button`,{type:`button`,className:`btn-secondary btn-small`,onClick:()=>t(`aiProvider`,`local_openai`),children:`Set active`})})]}),(0,H.jsxs)(`div`,{className:`provider-card-body`,children:[(0,H.jsxs)(`div`,{className:`setting-row`,children:[(0,H.jsx)(`label`,{children:`LM Studio Model`}),(0,H.jsxs)(M,{"aria-label":`LM Studio Model`,value:D.includes(e.localModelName)?e.localModelName:`custom`,onValueChange:e=>t(`localModelName`,e),children:[D.map(e=>(0,H.jsx)(`option`,{value:e,children:e},e)),(0,H.jsx)(`option`,{value:`custom`,children:`Custom...`})]})]}),(!D.includes(e.localModelName)||e.localModelName===`custom`)&&(0,H.jsxs)(`div`,{className:`setting-row`,children:[(0,H.jsx)(`label`,{children:`Custom LM Studio Model`}),(0,H.jsx)(`input`,{type:`text`,value:m,onChange:e=>{h(e.target.value),t(`localModelName`,`custom`)},placeholder:`e.g. local-model`})]}),(0,H.jsxs)(`div`,{className:`setting-row`,children:[(0,H.jsx)(`label`,{children:`LM Studio Base URL`}),(0,H.jsx)(`input`,{type:`text`,value:e.localApiBaseUrl,onChange:e=>t(`localApiBaseUrl`,e.target.value),placeholder:`e.g. http://localhost:1234/v1`})]})]})]}),(0,H.jsxs)(`div`,{className:`provider-card ${e.aiProvider===`ollama`?`active-provider`:``}`,children:[(0,H.jsxs)(`div`,{className:`provider-card-header`,children:[(0,H.jsxs)(`div`,{className:`provider-card-title`,children:[(0,H.jsx)(ln,{provider:`ollama`}),`Ollama (Local)`]}),(0,H.jsx)(`div`,{className:`provider-card-actions`,children:e.aiProvider===`ollama`?(0,H.jsx)(`span`,{className:`provider-active-badge`,children:`Active`}):(0,H.jsx)(`button`,{type:`button`,className:`btn-secondary btn-small`,onClick:()=>t(`aiProvider`,`ollama`),children:`Set active`})})]}),(0,H.jsxs)(`div`,{className:`provider-card-body`,children:[(0,H.jsxs)(`div`,{className:`setting-row`,children:[(0,H.jsx)(`label`,{children:`Ollama model`}),(0,H.jsxs)(M,{"aria-label":`Ollama model`,value:v.includes(e.ollamaModel)?e.ollamaModel:`custom`,onValueChange:e=>t(`ollamaModel`,e),children:[v.map(e=>(0,H.jsx)(`option`,{value:e,children:e},e)),!v.includes(e.ollamaModel)&&e.ollamaModel&&e.ollamaModel!==`custom`&&(0,H.jsx)(`option`,{value:e.ollamaModel,children:e.ollamaModel}),(0,H.jsx)(`option`,{value:`custom`,children:`Custom...`})]})]}),(!v.includes(e.ollamaModel)||e.ollamaModel===`custom`)&&(0,H.jsxs)(`div`,{className:`setting-row`,children:[(0,H.jsx)(`label`,{children:`Custom Ollama model`}),(0,H.jsx)(`input`,{type:`text`,value:g,onChange:e=>{_(e.target.value),t(`ollamaModel`,`custom`)},placeholder:`e.g. llama3:latest`})]}),(0,H.jsxs)(`div`,{className:`setting-row`,children:[(0,H.jsx)(`label`,{children:`Ollama host`}),(0,H.jsx)(`input`,{type:`text`,value:e.ollamaHost,onChange:e=>t(`ollamaHost`,e.target.value),placeholder:`e.g. http://localhost:11434`})]})]})]})]})]}),(0,H.jsx)(`span`,{className:`section-current-badge`,children:Te})),Ce(`search`,`Web search`,`Search Provider`,`Choose which search API Mint uses when performing web lookups.`,(0,H.jsxs)(`div`,{className:`provider-cards-container`,children:[(0,H.jsxs)(`div`,{className:`provider-card ${e.searchProvider===`brave`?`active-provider`:``}`,children:[(0,H.jsxs)(`div`,{className:`provider-card-header`,children:[(0,H.jsxs)(`div`,{className:`provider-card-title`,children:[(0,H.jsx)(`svg`,{width:`14`,height:`14`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2.5`,strokeLinecap:`round`,strokeLinejoin:`round`,children:(0,H.jsx)(`path`,{d:`M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z`})}),`Brave Search API`]}),(0,H.jsx)(`div`,{className:`provider-card-actions`,children:e.searchProvider===`brave`?(0,H.jsx)(`span`,{className:`provider-active-badge`,children:`Active`}):(0,H.jsx)(`button`,{type:`button`,className:`btn-secondary btn-small`,onClick:()=>t(`searchProvider`,`brave`),children:`Set active`})})]}),(0,H.jsx)(`div`,{className:`provider-card-body`,children:(0,H.jsxs)(`div`,{className:`setting-row`,children:[(0,H.jsx)(`label`,{children:`Brave Search API key`}),(0,H.jsx)(F,{value:e.braveSearchApiKey,onChange:e=>t(`braveSearchApiKey`,e),placeholder:`Enter Brave Search API key...`})]})})]}),(0,H.jsxs)(`div`,{className:`provider-card ${e.searchProvider===`google`?`active-provider`:``}`,children:[(0,H.jsxs)(`div`,{className:`provider-card-header`,children:[(0,H.jsxs)(`div`,{className:`provider-card-title`,children:[(0,H.jsxs)(`svg`,{width:`14`,height:`14`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2.5`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,H.jsx)(`circle`,{cx:`11`,cy:`11`,r:`8`}),(0,H.jsx)(`line`,{x1:`21`,y1:`21`,x2:`16.65`,y2:`16.65`})]}),`Google Search API`]}),(0,H.jsx)(`div`,{className:`provider-card-actions`,children:e.searchProvider===`google`?(0,H.jsx)(`span`,{className:`provider-active-badge`,children:`Active`}):(0,H.jsx)(`button`,{type:`button`,className:`btn-secondary btn-small`,onClick:()=>t(`searchProvider`,`google`),children:`Set active`})})]}),(0,H.jsxs)(`div`,{className:`provider-card-body`,children:[(0,H.jsxs)(`div`,{className:`setting-row`,children:[(0,H.jsx)(`label`,{children:`Google Search API key`}),(0,H.jsx)(F,{value:e.googleSearchApiKey,onChange:e=>t(`googleSearchApiKey`,e),placeholder:`Enter Google Search API key...`})]}),(0,H.jsxs)(`div`,{className:`setting-row`,children:[(0,H.jsx)(`label`,{children:`Google Search engine ID (CX)`}),(0,H.jsx)(`input`,{type:`text`,value:e.googleSearchCx,onChange:e=>t(`googleSearchCx`,e.target.value),placeholder:`Enter Google Custom Search Engine ID (CX)...`})]})]})]}),(0,H.jsxs)(`div`,{className:`provider-card ${e.searchProvider===`searxng`?`active-provider`:``}`,children:[(0,H.jsxs)(`div`,{className:`provider-card-header`,children:[(0,H.jsxs)(`div`,{className:`provider-card-title`,children:[(0,H.jsxs)(`svg`,{width:`14`,height:`14`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2.5`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,H.jsx)(`circle`,{cx:`11`,cy:`11`,r:`8`}),(0,H.jsx)(`line`,{x1:`21`,y1:`21`,x2:`16.65`,y2:`16.65`})]}),`SearXNG (self-hosted)`]}),(0,H.jsx)(`div`,{className:`provider-card-actions`,children:e.searchProvider===`searxng`?(0,H.jsx)(`span`,{className:`provider-active-badge`,children:`Active`}):(0,H.jsx)(`button`,{type:`button`,className:`btn-secondary btn-small`,onClick:()=>t(`searchProvider`,`searxng`),children:`Set active`})})]}),(0,H.jsxs)(`div`,{className:`provider-card-body`,children:[(0,H.jsxs)(`div`,{className:`setting-row`,children:[(0,H.jsx)(`label`,{children:`SearXNG Instance URL`}),(0,H.jsx)(`input`,{type:`text`,value:e.searxngBaseUrl,onChange:e=>t(`searxngBaseUrl`,e.target.value),placeholder:`e.g. https://searx.example.com`})]}),(0,H.jsx)(`p`,{className:`hint`,children:`Self-hosted, no API key needed. The instance must have JSON output enabled (search.formats in settings.yml).`})]})]})]}),(0,H.jsx)(`span`,{className:`section-current-badge`,children:Ee})),Ce(`image_gen`,`AI image creation`,`Image Generation`,`Choose which image generation provider Mint uses.`,(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(`div`,{className:`form-grid compact`,children:(0,H.jsxs)(`div`,{className:`setting-row stacked`,children:[(0,H.jsx)(`label`,{children:`Active provider`}),(0,H.jsx)(`div`,{className:`pill-segmented`,role:`radiogroup`,"aria-label":`Image Provider`,children:pn.map(n=>(0,H.jsx)(`button`,{type:`button`,role:`radio`,"aria-checked":e.imageGenProvider===n.id,title:n.cardTitle,className:`pill-segmented-btn ${e.imageGenProvider===n.id?`active`:``}`,onClick:()=>t(`imageGenProvider`,n.id),children:n.label},n.id))})]})}),(0,H.jsx)(`div`,{className:`provider-cards-container`,children:pn.map(n=>{let r=ne[n.id],i=r?oe[r.listKey]??[]:[],a=r&&re?.[r.listKey]||i,o=r?.configField,s=o&&(e[o]||a[0]?.value)||``;return(0,H.jsxs)(`div`,{className:`provider-card ${e.imageGenProvider===n.id?`active-provider`:``}`,children:[(0,H.jsxs)(`div`,{className:`provider-card-header`,children:[(0,H.jsxs)(`div`,{className:`provider-card-title`,children:[mn,n.cardTitle]}),(0,H.jsx)(`div`,{className:`provider-card-actions`,children:e.imageGenProvider===n.id?(0,H.jsx)(`span`,{className:`provider-active-badge`,children:`Active`}):(0,H.jsx)(`button`,{type:`button`,className:`btn-secondary btn-small`,onClick:()=>t(`imageGenProvider`,n.id),children:`Set active`})})]}),(0,H.jsxs)(`div`,{className:`provider-card-body`,children:[o&&a.length>0&&(0,H.jsxs)(`div`,{className:`setting-row`,children:[(0,H.jsxs)(`label`,{children:[n.label,` Model`]}),(0,H.jsxs)(M,{"aria-label":`Model`,value:s,onValueChange:e=>t(o,e),children:[a.map(e=>(0,H.jsx)(`option`,{value:e.value,children:e.label},e.value)),s&&!a.some(e=>e.value===s)&&(0,H.jsx)(`option`,{value:s,children:s},s)]})]}),n.keyField?(0,H.jsxs)(`div`,{className:`setting-row`,children:[(0,H.jsxs)(`label`,{children:[n.label,` API Key`]}),(0,H.jsx)(F,{value:e[n.keyField]||``,onChange:e=>t(n.keyField,e),placeholder:`Enter ${n.label} API Key...`})]}):(0,H.jsxs)(`p`,{className:`hint`,children:[`Uses your `,n.sharedKey,` API key — no extra key needed.`]})]})]},n.id)})})]}),(0,H.jsx)(`span`,{className:`section-current-badge`,children:De})),Ce(`video_gen`,`AI video creation`,`Video Generation`,`Choose which video generation provider Mint uses.`,(0,H.jsx)(`div`,{className:`provider-cards-container`,children:(0,H.jsxs)(`div`,{className:`provider-card ${e.videoGenProvider===`veo`?`active-provider`:``}`,children:[(0,H.jsxs)(`div`,{className:`provider-card-header`,children:[(0,H.jsxs)(`div`,{className:`provider-card-title`,children:[(0,H.jsxs)(`svg`,{width:`14`,height:`14`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2.5`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,H.jsx)(`polygon`,{points:`23 7 16 12 23 17 23 7`}),(0,H.jsx)(`rect`,{x:`1`,y:`5`,width:`15`,height:`14`,rx:`2`,ry:`2`})]}),`Google Veo (Gemini Videos)`]}),(0,H.jsx)(`div`,{className:`provider-card-actions`,children:e.videoGenProvider===`veo`?(0,H.jsx)(`span`,{className:`provider-active-badge`,children:`Active`}):(0,H.jsx)(`button`,{type:`button`,className:`btn-secondary btn-small`,onClick:()=>t(`videoGenProvider`,`veo`),children:`Set active`})})]}),(0,H.jsxs)(`div`,{className:`provider-card-body`,children:[(0,H.jsx)(`p`,{className:`hint`,children:`Uses your Gemini API key — no extra key needed.`}),(0,H.jsxs)(`div`,{className:`setting-row`,children:[(0,H.jsx)(`label`,{children:`Default Veo model`}),(()=>{let n=ie?.veo||de.veo||[],r=e.veoModel||`veo-3.1-generate-preview`;return(0,H.jsxs)(M,{"aria-label":`Default Veo model`,value:r,onValueChange:e=>{t(`veoModel`,e),$e(`veoModel`,e,`video`)},children:[n.map(e=>(0,H.jsx)(`option`,{value:e.value,children:e.label},e.value)),r&&!n.some(e=>e.value===r)&&(0,H.jsx)(`option`,{value:r,children:r},r)]})})()]})]})]})}),(0,H.jsx)(`span`,{className:`section-current-badge`,children:Oe})),Ce(`custom_providers`,`Custom AI Routing`,`Custom Providers`,`Add any OpenAI-compatible endpoint as a custom provider. Configure its models and optional headers.`,(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(`div`,{className:`provider-cards-container`,children:(e.customProviders??[]).map((n,r)=>{let i=e.aiProvider===`custom:${n.id}`,a=n=>{t(`customProviders`,(e.customProviders??[]).map((e,t)=>t===r?{...e,...n}:e))},o=()=>{t(`customProviders`,(e.customProviders??[]).filter((e,t)=>t!==r)),e.aiProvider===`custom:${n.id}`&&t(`aiProvider`,`gemini`)},s=(e,t)=>{let r=n.models.map((n,r)=>r===e?{...n,...t}:n);a({models:r})},c=e=>{a({models:n.models.filter((t,n)=>n!==e)})},l=()=>{a({models:[...n.models,{modelId:``,displayName:``}]})},u=(e,t)=>{let r=n.headers.map((n,r)=>r===e?{...n,...t}:n);a({headers:r})},d=e=>{a({headers:n.headers.filter((t,n)=>n!==e)})};return(0,H.jsxs)(`div`,{className:`provider-card ${i?`active-provider`:``}`,children:[(0,H.jsxs)(`div`,{className:`provider-card-header`,children:[(0,H.jsxs)(`div`,{className:`provider-card-title`,children:[n.logoDataUrl?(0,H.jsx)(`img`,{className:`settings-provider-logo custom-provider-logo`,src:n.logoDataUrl,alt:``}):(0,H.jsxs)(`svg`,{width:`14`,height:`14`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2.5`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,children:[(0,H.jsx)(`circle`,{cx:`12`,cy:`12`,r:`3`}),(0,H.jsx)(`path`,{d:`M19.07 4.93a10 10 0 0 1 0 14.14M4.93 4.93a10 10 0 0 0 0 14.14`})]}),n.displayName||n.id||`Unnamed Provider`]}),(0,H.jsxs)(`div`,{className:`provider-card-actions`,children:[i?(0,H.jsx)(`span`,{className:`provider-active-badge`,children:`Active`}):(0,H.jsx)(`button`,{type:`button`,className:`btn-secondary btn-small`,onClick:()=>t(`aiProvider`,`custom:${n.id}`),children:`Set active`}),(0,H.jsx)(`button`,{className:`btn btn-primary btn-xs`,onClick:()=>Se(n.id),title:`Save this provider settings`,children:me===n.id?`Saved! ✓`:`Save`}),(0,H.jsx)(`button`,{className:`btn btn-danger btn-xs`,onClick:o,title:`Delete this provider`,children:`Delete`})]})]}),(0,H.jsxs)(`div`,{className:`provider-card-body`,children:[(0,H.jsxs)(`div`,{className:`setting-row`,children:[(0,H.jsx)(`label`,{children:`Name`}),(0,H.jsx)(`input`,{type:`text`,value:n.displayName,onChange:e=>{let t=e.target.value,n=t.toLowerCase().replace(/[^a-z0-9_-]/g,`-`).replace(/-+/g,`-`).replace(/^-|-$/g,``)||`provider-${r+1}`;a({displayName:t,id:n})},placeholder:`e.g. DeepSeek`})]}),(0,H.jsxs)(`div`,{className:`setting-row stacked`,children:[(0,H.jsx)(`label`,{children:`Provider logo (optional)`}),(0,H.jsx)($t,{value:n.logoDataUrl,onChange:e=>a({logoDataUrl:e}),providerName:n.displayName||n.id,onRequestCrop:(e,t)=>{_e({imageSrc:e,fileName:t,onConfirm:e=>{a({logoDataUrl:e})}})}})]}),(0,H.jsxs)(`div`,{className:`setting-row`,children:[(0,H.jsx)(`label`,{children:`Base URL`}),(0,H.jsx)(`input`,{type:`text`,value:n.baseUrl,onChange:e=>a({baseUrl:e.target.value}),placeholder:`https://api.myprovider.com/v1`})]}),(0,H.jsxs)(`div`,{className:`setting-row`,children:[(0,H.jsx)(`label`,{children:`API Key`}),(0,H.jsx)(F,{value:n.apiKey,onChange:e=>a({apiKey:e}),placeholder:`Optional. Leave empty if you manage auth via headers.`})]}),(0,H.jsxs)(`div`,{children:[(0,H.jsx)(`label`,{className:`provider-sublist-label`,children:`Model list`}),n.models.map((e,t)=>(0,H.jsxs)(`div`,{className:`provider-sublist-row`,children:[(0,H.jsx)(`input`,{type:`text`,value:e.modelId,onChange:e=>s(t,{modelId:e.target.value,displayName:e.target.value}),placeholder:`e.g. llama-3.1-8b`}),(0,H.jsx)(`button`,{className:`btn btn-danger btn-xs`,onClick:()=>c(t),title:`Remove model`,children:`🗑`})]},t)),(0,H.jsx)(`button`,{className:`btn btn-secondary btn-xs sublist-add`,onClick:l,children:`+ Add model`})]}),(0,H.jsxs)(`div`,{children:[(0,H.jsx)(`label`,{className:`provider-sublist-label`,children:`Headers (optional)`}),n.headers.map((e,t)=>(0,H.jsxs)(`div`,{className:`provider-sublist-row`,children:[(0,H.jsx)(`input`,{type:`text`,value:e.name,onChange:e=>u(t,{name:e.target.value}),placeholder:`Header-Name`}),(0,H.jsx)(`input`,{type:`text`,value:e.value,onChange:e=>u(t,{value:e.target.value}),placeholder:`value`}),(0,H.jsx)(`button`,{className:`btn btn-danger btn-xs`,onClick:()=>d(t),title:`Remove header`,children:`🗑`})]},t)),(0,H.jsx)(`button`,{className:`btn btn-secondary btn-xs sublist-add`,onClick:()=>{a({headers:[...n.headers,{name:``,value:``}]})},children:`+ Add header`})]})]})]},r)})}),(0,H.jsx)(`div`,{className:`setting-actions`,children:(0,H.jsx)(`button`,{className:`btn btn-secondary`,onClick:()=>{let n=`provider-${(e.customProviders??[]).length+1}`;t(`customProviders`,[...e.customProviders??[],{id:n,displayName:``,baseUrl:``,apiKey:``,models:[],headers:[]}])},children:`+ Add custom provider`})})]}),(0,H.jsx)(`span`,{className:`section-current-badge`,children:ke>0?`${ke} added`:`None`})),fe&&Ce(`desktop_updates`,`Desktop updates`,`Signed Tauri Channel`,`Check and explicitly install signed Tauri releases from your configured update channel.`,(0,H.jsxs)(H.Fragment,{children:[(0,H.jsxs)(`div`,{className:`toggle-row`,children:[(0,H.jsxs)(`div`,{children:[(0,H.jsx)(`label`,{children:`Check signed update channel`}),(0,H.jsx)(`p`,{className:`hint`,children:`This flag does not install updates automatically.`})]}),(0,H.jsxs)(`label`,{className:`settings-toggle-switch`,children:[(0,H.jsx)(`input`,{type:`checkbox`,checked:e.enableAutoUpdate,onChange:e=>t(`enableAutoUpdate`,e.target.checked)}),(0,H.jsx)(`span`,{className:`settings-toggle-slider`})]})]}),(0,H.jsxs)(`div`,{className:`form-grid single`,children:[(0,H.jsxs)(`div`,{className:`setting-row`,children:[(0,H.jsx)(`label`,{children:`Updater endpoint`}),(0,H.jsx)(`input`,{type:`text`,value:e.updaterEndpoint,onChange:e=>t(`updaterEndpoint`,e.target.value),placeholder:`https://updates.example.com/latest.json`})]}),(0,H.jsxs)(`div`,{className:`setting-row`,children:[(0,H.jsx)(`label`,{children:`Updater public key`}),(0,H.jsx)(`textarea`,{value:e.updaterPublicKey,onChange:e=>t(`updaterPublicKey`,e.target.value),placeholder:`Minisign public key`})]})]}),(0,H.jsxs)(`div`,{className:`setting-actions`,children:[(0,H.jsx)(`button`,{type:`button`,className:`btn-connect`,onClick:ce,children:`Check for updates`}),ae&&(0,H.jsx)(`button`,{type:`button`,className:`btn-primary`,onClick:le,children:`Install signed update`})]}),se&&(0,H.jsx)(`p`,{className:`hint`,children:se})]}),(0,H.jsx)(`span`,{className:`section-current-badge`,children:e.enableAutoUpdate?`On`:`Off`})),fe&&Ce(`assistant_presence`,`Desktop`,`Assistant Presence`,`Configure the mini AI character desktop presence widget.`,(0,H.jsxs)(`div`,{className:`toggle-row`,children:[(0,H.jsxs)(`div`,{children:[(0,H.jsx)(`label`,{children:`Show Desktop AI candidate`}),(0,H.jsx)(`p`,{className:`hint`,children:`Show the mini AI character on your desktop.`})]}),(0,H.jsxs)(`label`,{className:`settings-toggle-switch`,children:[(0,H.jsx)(`input`,{type:`checkbox`,checked:e.showDesktopWidget,onChange:e=>t(`showDesktopWidget`,e.target.checked)}),(0,H.jsx)(`span`,{className:`settings-toggle-slider`})]})]}),(0,H.jsx)(`span`,{className:`section-current-badge`,children:e.showDesktopWidget?`On`:`Off`})),ge&&(0,H.jsx)(an,{imageSrc:ge.imageSrc,fileName:ge.fileName,title:`Crop Provider Logo`,outputFormat:`image/png`,onClose:()=>_e(null),onConfirm:e=>{ge.onConfirm(e),_e(null)}})]})}var dn,H,fn,pn,mn,hn,gn,_n,vn=t((()=>{j(),dn=e(n()),A(),Qe(),ce(),Ct(),Tt(),rn(),cn(),S(),Re(),ze(),me(),De(),ye(),Ie(),_e(),H=r(),fn={anthropic:{src:se,color:`#d97757`},deepseek:{src:ge},gemini:{src:Le},huggingface:{src:xe},local_openai:{src:Se,color:`#8b5cf6`},ollama:{src:Ae,color:`#f3f4f6`},openai:{src:ve,color:`#10a37f`},openrouter:{src:Ee}},pn=[{id:`gemini`,label:`NanoBanana`,cardTitle:`Google NanoBanana (Gemini Images)`,sharedKey:`Gemini`},{id:`dalle`,label:`DALL·E`,cardTitle:`OpenAI DALL·E`,sharedKey:`OpenAI`},{id:`stability`,label:`Stability AI`,cardTitle:`Stability AI (Stable Diffusion)`,keyField:`stabilityApiKey`},{id:`ideogram`,label:`Ideogram`,cardTitle:`Ideogram`,keyField:`ideogramApiKey`},{id:`replicate`,label:`Replicate`,cardTitle:`Replicate (FLUX / SDXL / custom)`,keyField:`replicateApiKey`},{id:`bfl`,label:`Black Forest Labs`,cardTitle:`Black Forest Labs (FLUX API)`,keyField:`bflApiKey`}],mn=(0,H.jsxs)(`svg`,{width:`14`,height:`14`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2.5`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,H.jsx)(`rect`,{x:`3`,y:`3`,width:`18`,height:`18`,rx:`2`,ry:`2`}),(0,H.jsx)(`circle`,{cx:`8.5`,cy:`8.5`,r:`1.5`}),(0,H.jsx)(`polyline`,{points:`21 15 16 10 5 21`})]}),hn={brave:`Brave`,google:`Google`,searxng:`SearXNG`},gn={gemini:`NanoBanana`,dalle:`DALL·E`,stability:`Stability`,ideogram:`Ideogram`,replicate:`Replicate`,bfl:`FLUX`},_n={veo:`Veo`}}));function yn({name:e,setName:t,imageUrl:n,setImageUrl:r}){let{user:i,avatarUrl:o,refreshUser:s}=c(),[l,u]=(0,bn.useState)(!1),[d,f]=(0,bn.useState)(null),[p,m]=(0,bn.useState)(null),h=(0,bn.useRef)(null);return i?(0,U.jsxs)(`div`,{className:`tab-pane active animate-fade-in`,style:{display:`flex`,flexDirection:`column`,gap:`24px`},children:[(0,U.jsxs)(`section`,{className:`setting-section`,children:[(0,U.jsx)(`div`,{className:`section-heading`,children:(0,U.jsxs)(`div`,{children:[(0,U.jsx)(`p`,{className:`section-kicker`,children:`Account`}),(0,U.jsx)(`h2`,{className:`section-title`,children:`Profile`})]})}),(0,U.jsxs)(`div`,{className:`profile-header-card`,children:[(0,U.jsx)(`input`,{type:`file`,ref:h,accept:`image/*`,style:{display:`none`},onChange:async e=>{let t=e.target.files?.[0];if(e.target.value=``,t){if(!t.type.startsWith(`image/`))f(`Please select a valid image file.`);else{f(null);try{let e=await new Promise((e,n)=>{let r=new FileReader;r.onload=()=>e(r.result),r.onerror=n,r.readAsDataURL(t)});m({imageSrc:e,fileName:t.name})}catch(e){console.error(`Failed to read image file:`,e),f(`Failed to read selected image.`)}}}}}),(0,U.jsx)(`div`,{className:`profile-avatar profile-avatar-lg`,onClick:()=>h.current?.click(),children:o?(0,U.jsx)(`img`,{src:o,alt:e||`User`}):(e?.[0]||i.email?.[0]||`U`).toUpperCase()}),(0,U.jsxs)(`div`,{className:`profile-header-meta`,children:[(0,U.jsx)(`p`,{className:`profile-header-name`,children:e||i.email||`User`}),i.email&&(0,U.jsx)(`p`,{className:`profile-header-email`,children:i.email}),(0,U.jsxs)(`div`,{className:`profile-header-actions`,children:[(0,U.jsx)(`button`,{type:`button`,className:`btn-secondary btn-small`,onClick:()=>h.current?.click(),disabled:l,children:l?`Uploading…`:`Upload Photo`}),(0,U.jsx)(`span`,{className:`hint`,children:`Click the picture or use the button to change it. Uploads are saved immediately.`})]}),d&&(0,U.jsx)(`p`,{className:`profile-message-error`,children:d})]})]}),(0,U.jsxs)(`div`,{className:`form-grid single`,children:[(0,U.jsxs)(`div`,{className:`setting-row`,children:[(0,U.jsx)(`label`,{children:`Display name`}),(0,U.jsx)(`div`,{className:`memory-field-container`,children:(0,U.jsx)(`input`,{type:`text`,value:e,onChange:e=>t(e.target.value),placeholder:`Enter your name`})})]}),(0,U.jsxs)(`div`,{className:`setting-row`,children:[(0,U.jsx)(`label`,{children:`Profile image URL`}),(0,U.jsx)(`div`,{className:`memory-field-container`,children:(0,U.jsx)(`input`,{type:`text`,value:n,onChange:e=>r(e.target.value),placeholder:`https://example.com/avatar.png or /api/avatar?key=...`})})]})]})]}),p&&(0,U.jsx)(an,{imageSrc:p.imageSrc,fileName:p.fileName,onClose:()=>m(null),onConfirm:async e=>{if(p){u(!0),f(null);try{let t=await a.authUploadAvatar(e,p.fileName);r(t.image||``),s(t),m(null)}catch(e){console.error(`Avatar upload error:`,e),f(`Failed to upload image.`)}finally{u(!1)}}}})]}):(0,U.jsx)(`div`,{className:`tab-pane active animate-fade-in`,children:(0,U.jsx)(`section`,{className:`setting-section`,children:(0,U.jsx)(`p`,{className:`section-description`,children:`Sign in to manage your profile.`})})})}var bn,U,xn=t((()=>{bn=e(n()),b(),f(),cn(),U=r()})),Sn=t((()=>{}));function Cn({userName:e,setUserName:t,userPreferences:n,setUserPreferences:r}){let i=(0,wn.useId)(),[a,o]=(0,wn.useState)(!1),s=(0,wn.useRef)(null),c=!!n.trim();return(0,W.jsxs)(`div`,{className:`tab-pane active memory-tab`,children:[(0,W.jsxs)(`header`,{className:`memory-intro`,children:[(0,W.jsx)(`p`,{className:`section-kicker`,children:`Across all sessions and projects`}),(0,W.jsx)(`h2`,{children:`What Mint remembers about you`}),(0,W.jsx)(`p`,{children:`Your name and response preferences follow you in CLI, Web, and Desktop.`})]}),(0,W.jsxs)(`section`,{className:`memory-name-section`,"aria-labelledby":`${i}-name-label`,children:[(0,W.jsx)(`label`,{id:`${i}-name-label`,htmlFor:`${i}-name`,children:`What should Mint call you?`}),(0,W.jsx)(`input`,{id:`${i}-name`,type:`text`,autoComplete:`nickname`,value:e,onChange:e=>t(e.target.value),placeholder:`Your name or nickname`,"aria-describedby":`${i}-name-hint`}),(0,W.jsx)(`p`,{id:`${i}-name-hint`,className:`memory-helper`,children:`The name Mint uses when talking with you.`})]}),(0,W.jsxs)(`section`,{className:`memory-instructions-section`,"aria-labelledby":`${i}-instructions-heading`,children:[(0,W.jsxs)(`div`,{className:`memory-section-heading`,children:[(0,W.jsxs)(`div`,{children:[(0,W.jsx)(`h3`,{id:`${i}-instructions-heading`,children:`How Mint should respond`}),(0,W.jsx)(`p`,{className:`memory-helper`,children:`Your preferred language, tone, and everyday instructions.`})]}),(0,W.jsx)(`button`,{ref:s,type:`button`,className:`btn-secondary memory-mode-button`,"aria-controls":`${i}-instructions`,onClick:()=>{o(!a),a&&s.current?.focus()},children:a?`Reading view`:c?`Edit instructions`:`Add instructions`})]}),(0,W.jsx)(`div`,{id:`${i}-instructions`,className:`memory-instructions-content`,children:a?(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(`label`,{className:`memory-editor-label`,htmlFor:`${i}-editor`,children:`Response preferences & instructions`}),(0,W.jsx)(`textarea`,{id:`${i}-editor`,className:`memory-editor`,autoFocus:!0,rows:10,value:n,onChange:e=>r(e.target.value),placeholder:`Talk in Thai.
|
|
2
|
+
Keep explanations concise.
|
|
3
|
+
Explain coding concepts step by step.`,"aria-describedby":`${i}-edit-hint`}),(0,W.jsx)(`p`,{id:`${i}-edit-hint`,className:`memory-helper`,children:`Write one instruction per line for easier reading. Select Save Settings to save your changes.`})]}):c?(0,W.jsx)(`div`,{className:`memory-reading-frame`,tabIndex:0,role:`region`,"aria-label":`Response preferences and instructions`,children:n}):(0,W.jsxs)(`div`,{className:`memory-empty`,children:[(0,W.jsx)(`p`,{children:`No response preferences added yet.`}),(0,W.jsx)(`p`,{className:`memory-helper`,children:`Add the language, tone, or habits you want Mint to remember.`})]})})]}),(0,W.jsxs)(`aside`,{className:`memory-scope-note`,"aria-label":`About this memory`,children:[(0,W.jsx)(`strong`,{children:`About this memory`}),(0,W.jsx)(`p`,{children:`This page contains your shared profile and preferences. Saved facts, project memory, and conversation history are stored separately.`})]})]})}var wn,W,Tn=t((()=>{wn=e(n()),Sn(),W=r()}));function En(e){let[t,n]=(0,Dn.useState)(On),[r,i]=(0,Dn.useState)(!1),a=(0,Dn.useRef)(0);return(0,Dn.useEffect)(()=>{if(n(On),!e.trim())return;let t=++a.current;i(!0),m(e).then(e=>{if(t===a.current&&e&&e.length>0){let t=[...e];for(let e of On)t.includes(e)||t.push(e);n(t)}}).catch(()=>{}).finally(()=>{t===a.current&&i(!1)})},[e]),{models:t,loading:r}}var Dn,On,kn=t((()=>{Dn=e(n()),A(),_(),On=[...re]}));function An({config:e,updateField:t,apiKey:n}){let[r,i]=(0,jn.useState)(!1),{models:a,loading:o}=En(n),s=r||!a.includes(e.geminiLiveModel);return(0,G.jsx)(`div`,{className:`tab-pane active`,children:(0,G.jsxs)(`section`,{className:`setting-section`,children:[(0,G.jsx)(`div`,{className:`section-heading`,children:(0,G.jsxs)(`div`,{children:[(0,G.jsx)(`p`,{className:`section-kicker`,children:`Speech`}),(0,G.jsx)(`h2`,{className:`section-title`,children:`Voice reply`})]})}),(0,G.jsx)(`div`,{className:`toggle-card`,children:(0,G.jsxs)(`div`,{className:`toggle-row`,children:[(0,G.jsxs)(`div`,{children:[(0,G.jsx)(`label`,{children:`Enable voice reply`}),(0,G.jsx)(`p`,{className:`hint`,children:`Speaks responses out loud when enabled.`})]}),(0,G.jsxs)(`label`,{className:`settings-toggle-switch`,children:[(0,G.jsx)(`input`,{type:`checkbox`,checked:e.enableVoiceReply,onChange:e=>t(`enableVoiceReply`,e.target.checked)}),(0,G.jsx)(`span`,{className:`settings-toggle-slider`})]})]})}),(0,G.jsxs)(`div`,{className:`setting-row`,children:[(0,G.jsx)(`label`,{children:`Voice engine`}),(0,G.jsx)(`div`,{className:`pill-segmented`,role:`radiogroup`,"aria-label":`Voice engine`,children:[{id:`google`,label:`Google Cloud`,title:`Google Cloud (Natural, Auto Lang)`},{id:`native`,label:`OS Native`,title:`OS Native (Supports Pitch)`}].map(n=>(0,G.jsx)(`button`,{type:`button`,role:`radio`,"aria-checked":e.ttsProvider===n.id,title:n.title,className:`pill-segmented-btn ${e.ttsProvider===n.id?`active`:``}`,onClick:()=>t(`ttsProvider`,n.id),children:n.label},n.id))})]}),(0,G.jsx)(`div`,{className:`toggle-card`,children:(0,G.jsxs)(`div`,{className:`toggle-row`,children:[(0,G.jsxs)(`div`,{children:[(0,G.jsx)(`label`,{children:`Enable Gemini Live (beta)`}),(0,G.jsx)(`p`,{className:`hint`,children:`Adds real-time voice conversation with Gemini, including running Mint's tools by voice. Requires a Gemini API key.`})]}),(0,G.jsxs)(`label`,{className:`settings-toggle-switch`,children:[(0,G.jsx)(`input`,{type:`checkbox`,checked:e.voiceMode===`geminiLive`,onChange:e=>t(`voiceMode`,e.target.checked?`geminiLive`:`legacy`)}),(0,G.jsx)(`span`,{className:`settings-toggle-slider`})]})]})}),e.voiceMode===`geminiLive`&&(0,G.jsxs)(`div`,{className:`form-grid single`,children:[(0,G.jsxs)(`div`,{className:`setting-row`,children:[(0,G.jsxs)(`label`,{children:[`Real-time model`,o&&(0,G.jsx)(`span`,{style:{marginLeft:6,opacity:.5,fontSize:`0.8em`},children:`loading…`})]}),(0,G.jsxs)(M,{"aria-label":`Real-time model`,value:s?`custom`:e.geminiLiveModel,onValueChange:e=>{e===`custom`?i(!0):(i(!1),t(`geminiLiveModel`,e))},children:[a.map(e=>(0,G.jsx)(`option`,{value:e,children:e},e)),(0,G.jsx)(`option`,{value:`custom`,children:`Custom...`})]}),(0,G.jsx)(`p`,{className:`hint`,children:`The model Gemini Live uses for realtime voice conversations. "gemini-3.1-flash-live-preview" requires requesting allowlist access from Google first — if it connects but never responds, try the 2.5 model instead.`})]}),s&&(0,G.jsxs)(`div`,{className:`setting-row`,children:[(0,G.jsx)(`label`,{children:`Custom real-time model`}),(0,G.jsx)(`input`,{type:`text`,value:e.geminiLiveModel,onChange:e=>t(`geminiLiveModel`,e.target.value),placeholder:`e.g. gemini-2.5-flash-native-audio-preview-12-2025`})]}),(0,G.jsxs)(`div`,{className:`setting-row`,children:[(0,G.jsx)(`label`,{children:`Live voice`}),(0,G.jsx)(M,{"aria-label":`Live voice`,value:e.geminiLiveVoice,onValueChange:e=>t(`geminiLiveVoice`,e),children:ae.map(e=>(0,G.jsx)(`option`,{value:e,children:e},e))}),(0,G.jsx)(`p`,{className:`hint`,children:`The voice Gemini Live speaks with. Can also be changed mid-call from the Live overlay itself.`})]})]}),(0,G.jsxs)(`div`,{className:`slider-stack`,children:[(0,G.jsxs)(`div`,{className:`setting-row`,children:[(0,G.jsx)(`label`,{children:`Volume`}),(0,G.jsxs)(`div`,{className:`slider-group`,children:[(0,G.jsx)(`input`,{type:`range`,min:`0`,max:`1`,step:`0.1`,value:e.ttsVolume,onChange:e=>t(`ttsVolume`,parseFloat(e.target.value)),className:`range-slider`}),(0,G.jsxs)(`span`,{className:`range-value`,children:[Math.round(e.ttsVolume*100),`%`]})]})]}),(0,G.jsxs)(`div`,{className:`setting-row`,children:[(0,G.jsx)(`label`,{children:`Speed`}),(0,G.jsxs)(`div`,{className:`slider-group`,children:[(0,G.jsx)(`input`,{type:`range`,min:`0.5`,max:`2`,step:`0.1`,value:e.ttsSpeed,onChange:e=>t(`ttsSpeed`,parseFloat(e.target.value)),className:`range-slider`}),(0,G.jsxs)(`span`,{className:`range-value`,children:[parseFloat(String(e.ttsSpeed)).toFixed(1),`x`]})]})]}),(0,G.jsxs)(`div`,{className:`setting-row`,children:[(0,G.jsx)(`label`,{children:`Pitch`}),(0,G.jsxs)(`div`,{className:`slider-group`,children:[(0,G.jsx)(`input`,{type:`range`,min:`0`,max:`2`,step:`0.1`,value:e.ttsPitch,onChange:e=>t(`ttsPitch`,parseFloat(e.target.value)),className:`range-slider`}),(0,G.jsx)(`span`,{className:`range-value`,children:parseFloat(String(e.ttsPitch)).toFixed(1)})]}),(0,G.jsx)(`p`,{className:`hint`,children:`Pitch applies to OS native voice only.`})]})]})]})})}var jn,G,Mn=t((()=>{j(),jn=e(n()),A(),kn(),G=r()}));function Nn({config:e,updateField:t}){return(0,K.jsxs)(`div`,{className:`tab-pane active`,children:[(0,K.jsxs)(`section`,{className:`setting-section`,children:[(0,K.jsx)(`div`,{className:`section-heading`,children:(0,K.jsxs)(`div`,{children:[(0,K.jsx)(`p`,{className:`section-kicker`,children:`Browser`}),(0,K.jsxs)(`h2`,{className:`section-title`,style:{display:`flex`,alignItems:`center`,gap:`8px`},children:[(0,K.jsxs)(`svg`,{width:`18`,height:`18`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2.5`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,K.jsx)(`rect`,{x:`2`,y:`3`,width:`20`,height:`14`,rx:`2`,ry:`2`}),(0,K.jsx)(`line`,{x1:`8`,y1:`21`,x2:`16`,y2:`21`}),(0,K.jsx)(`line`,{x1:`12`,y1:`17`,x2:`12`,y2:`21`})]}),`Automation Engine`]})]})}),(0,K.jsx)(`div`,{className:`form-grid single`,children:(0,K.jsxs)(`div`,{className:`setting-row`,children:[(0,K.jsx)(`label`,{children:`Chromium executable`}),(0,K.jsx)(`input`,{type:`text`,value:e.browserExecutable,placeholder:`Auto-detect Chrome / Chromium / Edge`,onChange:e=>t(`browserExecutable`,e.target.value)}),(0,K.jsx)(`p`,{className:`hint`,children:"Optional executable path for headless Chromium operations and CLI browser workflows (`mint browser run`). Firefox is not supported by this engine."})]})})]}),(0,K.jsxs)(`section`,{className:`setting-section`,children:[(0,K.jsx)(`div`,{className:`section-heading`,children:(0,K.jsxs)(`div`,{children:[(0,K.jsx)(`p`,{className:`section-kicker`,children:`Behavior`}),(0,K.jsx)(`h2`,{className:`section-title`,children:`Agent behavior`})]})}),(0,K.jsxs)(`div`,{className:`toggle-card`,children:[(0,K.jsxs)(`div`,{className:`toggle-row`,children:[(0,K.jsxs)(`div`,{children:[(0,K.jsx)(`label`,{children:`Process queued tasks automatically`}),(0,K.jsx)(`p`,{className:`hint`,children:`Runs pending tasks in the background every 15 seconds.`})]}),(0,K.jsxs)(`label`,{className:`settings-toggle-switch`,children:[(0,K.jsx)(`input`,{type:`checkbox`,checked:e.enableHeadlessTaskQueue,onChange:e=>t(`enableHeadlessTaskQueue`,e.target.checked)}),(0,K.jsx)(`span`,{className:`settings-toggle-slider`})]})]}),(0,K.jsxs)(`div`,{className:`toggle-row`,children:[(0,K.jsxs)(`div`,{children:[(0,K.jsx)(`label`,{children:`Suggest a skill after finishing a hard task`}),(0,K.jsx)(`p`,{className:`hint`,children:`Proposes reusable instructions after a multi-step task. Review and approve each change before it is saved.`})]}),(0,K.jsxs)(`label`,{className:`settings-toggle-switch`,children:[(0,K.jsx)(`input`,{type:`checkbox`,checked:e.autoSkillWriting,onChange:e=>t(`autoSkillWriting`,e.target.checked)}),(0,K.jsx)(`span`,{className:`settings-toggle-slider`})]})]}),(0,K.jsxs)(`div`,{className:`toggle-row`,style:{alignItems:`center`},children:[(0,K.jsxs)(`div`,{children:[(0,K.jsx)(`label`,{children:`Agent step limit`}),(0,K.jsx)(`p`,{className:`hint`,children:`Maximum tool execution steps per agent turn (10 to 200, default: 40). Warns 5 steps before limit and enforces graceful wrap-up on the final step.`})]}),(0,K.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:`10px`},children:[(0,K.jsx)(`input`,{type:`range`,min:10,max:200,step:5,value:e.agentMaxSteps??40,onChange:e=>t(`agentMaxSteps`,parseInt(e.target.value,10)),style:{width:`120px`,accentColor:`var(--accent-color, #10b981)`}}),(0,K.jsx)(`input`,{type:`number`,min:10,max:200,className:`bridge-input`,value:e.agentMaxSteps??40,onChange:e=>{let n=parseInt(e.target.value,10);isNaN(n)||t(`agentMaxSteps`,Math.max(10,Math.min(200,n)))},style:{width:`64px`,textAlign:`center`,padding:`4px 6px`}})]})]})]})]}),(0,K.jsxs)(`section`,{className:`setting-section`,children:[(0,K.jsx)(`div`,{className:`section-heading`,children:(0,K.jsxs)(`div`,{children:[(0,K.jsx)(`p`,{className:`section-kicker`,children:`Messaging`}),(0,K.jsx)(`h2`,{className:`section-title`,children:`Native channel bridges`})]})}),(0,K.jsxs)(`div`,{className:`bridge-card ${e.enableBridgeAckNotification===!1?``:`active`}`,style:{marginBottom:`16px`},children:[(0,K.jsxs)(`div`,{className:`bridge-card-header`,children:[(0,K.jsxs)(`div`,{className:`bridge-info`,children:[(0,K.jsx)(`div`,{className:`bridge-icon-badge`,style:{background:`linear-gradient(135deg, #10b981 0%, #059669 100%)`},children:(0,K.jsx)(`svg`,{width:`20`,height:`20`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,children:(0,K.jsx)(`polygon`,{points:`13 2 3 14 12 14 11 22 21 10 12 10 13 2`})})}),(0,K.jsxs)(`div`,{className:`bridge-title-group`,children:[(0,K.jsxs)(`span`,{className:`bridge-title`,children:[`Instant Remote Acknowledgement`,(0,K.jsx)(`span`,{className:`bridge-status-pill ${e.enableBridgeAckNotification===!1?`inactive`:`active`}`,children:e.enableBridgeAckNotification===!1?`Disabled`:`Enabled`})]}),(0,K.jsx)(`span`,{className:`bridge-subtitle`,children:`Send instant feedback/typing status when remote commands arrive`})]})]}),(0,K.jsxs)(`label`,{className:`settings-toggle-switch`,children:[(0,K.jsx)(`input`,{type:`checkbox`,checked:e.enableBridgeAckNotification!==!1,onChange:e=>t(`enableBridgeAckNotification`,e.target.checked)}),(0,K.jsx)(`span`,{className:`settings-toggle-slider`})]})]}),e.enableBridgeAckNotification!==!1&&(0,K.jsx)(`div`,{className:`bridge-inputs`,children:(0,K.jsx)(`input`,{type:`text`,className:`bridge-input`,placeholder:`Instant Ack Message (default: [Mint Agent] Remote command received, processing...)`,value:e.bridgeAckMessage||``,onChange:e=>t(`bridgeAckMessage`,e.target.value)})})]}),(0,K.jsxs)(`div`,{className:`bridge-cards-container`,children:[(0,K.jsxs)(`div`,{className:`bridge-card ${e.enableTelegramBridge?`active`:``}`,children:[(0,K.jsxs)(`div`,{className:`bridge-card-header`,children:[(0,K.jsxs)(`div`,{className:`bridge-info`,children:[(0,K.jsx)(`div`,{className:`bridge-icon-badge bridge-icon-telegram`,children:(0,K.jsx)(`svg`,{width:`20`,height:`20`,viewBox:`0 0 24 24`,fill:`currentColor`,children:(0,K.jsx)(`path`,{d:`M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm4.64 6.8c-.15 1.58-.8 5.42-1.13 7.19-.14.75-.42 1-.68 1.03-.58.05-1.02-.38-1.58-.75-.88-.58-1.38-.94-2.23-1.5-.99-.65-.35-1.01.22-1.59.15-.15 2.71-2.48 2.76-2.69.01-.03.01-.14-.07-.2-.08-.06-.19-.04-.27-.02-.12.02-1.96 1.25-5.54 3.69-.52.36-1 .54-1.42.53-.47-.01-1.37-.26-2.03-.48-.82-.27-1.47-.42-1.42-.88.03-.25.38-.51 1.07-.78 4.18-1.82 6.97-3.02 8.37-3.61 3.98-1.66 4.81-1.95 5.35-1.96.12 0 .38.03.55.17.14.12.18.28.2.4.02.11.02.26.01.39z`})})}),(0,K.jsxs)(`div`,{className:`bridge-title-group`,children:[(0,K.jsxs)(`span`,{className:`bridge-title`,children:[`Telegram Bot API`,(0,K.jsx)(`span`,{className:`bridge-status-pill ${e.enableTelegramBridge?`active`:`inactive`}`,children:e.enableTelegramBridge?`Active`:`Disabled`})]}),(0,K.jsx)(`span`,{className:`bridge-subtitle`,children:`Long polling engine (getUpdates)`})]})]}),(0,K.jsxs)(`label`,{className:`settings-toggle-switch`,children:[(0,K.jsx)(`input`,{type:`checkbox`,checked:e.enableTelegramBridge,onChange:e=>t(`enableTelegramBridge`,e.target.checked)}),(0,K.jsx)(`span`,{className:`settings-toggle-slider`})]})]}),(0,K.jsx)(`div`,{className:`bridge-inputs`,children:(0,K.jsx)(F,{className:`bridge-input`,placeholder:`Telegram Bot Token (from @BotFather)`,value:e.telegramBotToken,onChange:e=>t(`telegramBotToken`,e)})})]}),(0,K.jsxs)(`div`,{className:`bridge-card ${e.enableDiscordBridge?`active`:``}`,children:[(0,K.jsxs)(`div`,{className:`bridge-card-header`,children:[(0,K.jsxs)(`div`,{className:`bridge-info`,children:[(0,K.jsx)(`div`,{className:`bridge-icon-badge bridge-icon-discord`,children:(0,K.jsx)(`svg`,{width:`20`,height:`20`,viewBox:`0 0 24 24`,fill:`currentColor`,children:(0,K.jsx)(`path`,{d:`M20.317 4.37a19.791 19.791 0 0 0-4.885-1.515.074.074 0 0 0-.079.037c-.21.375-.444.864-.608 1.25a18.27 18.27 0 0 0-5.487 0 12.64 12.64 0 0 0-.617-1.25.077.077 0 0 0-.079-.037A19.736 19.736 0 0 0 3.677 4.37a.07.07 0 0 0-.032.027C.533 9.046-.32 13.58.099 18.057a.082.082 0 0 0 .031.057 19.9 19.9 0 0 0 5.993 3.03.078.078 0 0 0 .084-.028 14.09 14.09 0 0 0 1.226-1.994.076.076 0 0 0-.041-.106 13.107 13.107 0 0 1-1.872-.892.077.077 0 0 1-.008-.128 10.2 10.2 0 0 0 .372-.292.074.074 0 0 1 .077-.01c3.928 1.793 8.18 1.793 12.061 0a.074.074 0 0 1 .078.01c.12.098.246.198.373.292a.077.077 0 0 1-.006.127 12.299 12.299 0 0 1-1.873.893.077.077 0 0 0-.041.107c.36.698.772 1.362 1.225 1.993a.076.076 0 0 0 .084.028 19.839 19.839 0 0 0 6.002-3.03.077.077 0 0 0 .032-.054c.5-5.177-.838-9.674-3.549-13.66a.061.061 0 0 0-.031-.028zM8.02 15.33c-1.183 0-2.157-1.085-2.157-2.419 0-1.333.956-2.419 2.157-2.419 1.21 0 2.176 1.096 2.157 2.42 0 1.333-.956 2.418-2.157 2.418zm7.975 0c-1.183 0-2.157-1.085-2.157-2.419 0-1.333.955-2.419 2.157-2.419 1.21 0 2.176 1.096 2.157 2.42 0 1.333-.946 2.418-2.157 2.418z`})})}),(0,K.jsxs)(`div`,{className:`bridge-title-group`,children:[(0,K.jsxs)(`span`,{className:`bridge-title`,children:[`Discord Gateway`,(0,K.jsx)(`span`,{className:`bridge-status-pill ${e.enableDiscordBridge?`active`:`inactive`}`,children:e.enableDiscordBridge?`Active`:`Disabled`})]}),(0,K.jsx)(`span`,{className:`bridge-subtitle`,children:`WebSocket Gateway (wss://gateway.discord.gg)`})]})]}),(0,K.jsxs)(`label`,{className:`settings-toggle-switch`,children:[(0,K.jsx)(`input`,{type:`checkbox`,checked:e.enableDiscordBridge,onChange:e=>t(`enableDiscordBridge`,e.target.checked)}),(0,K.jsx)(`span`,{className:`settings-toggle-slider`})]})]}),(0,K.jsxs)(`div`,{className:`bridge-inputs`,children:[(0,K.jsx)(F,{className:`bridge-input`,placeholder:`Discord Bot Token`,value:e.discordBotToken,onChange:e=>t(`discordBotToken`,e)}),(0,K.jsx)(`input`,{type:`text`,className:`bridge-input`,placeholder:`Discord Application ID (for Rich Presence)`,value:e.discordApplicationId,onChange:e=>t(`discordApplicationId`,e.target.value)})]})]}),(0,K.jsxs)(`div`,{className:`bridge-card ${e.enableSlackBridge?`active`:``}`,children:[(0,K.jsxs)(`div`,{className:`bridge-card-header`,children:[(0,K.jsxs)(`div`,{className:`bridge-info`,children:[(0,K.jsx)(`div`,{className:`bridge-icon-badge bridge-icon-slack`,children:(0,K.jsx)(`svg`,{width:`20`,height:`20`,viewBox:`0 0 24 24`,fill:`currentColor`,children:(0,K.jsx)(`path`,{d:`M6 15a2.5 2.5 0 0 1-2.5-2.5A2.5 2.5 0 0 1 6 10h2.5v2.5A2.5 2.5 0 0 1 6 15zm0-8.5A2.5 2.5 0 0 1 3.5 4 2.5 2.5 0 0 1 6 1.5 2.5 2.5 0 0 1 8.5 4v2.5H6zm8.5 0A2.5 2.5 0 0 1 12 4a2.5 2.5 0 0 1 2.5-2.5A2.5 2.5 0 0 1 17 4v2.5h-2.5zm0 8.5a2.5 2.5 0 0 1 2.5 2.5 2.5 2.5 0 0 1-2.5 2.5A2.5 2.5 0 0 1 12 17.5V15h2.5zm-8.5 2.5A2.5 2.5 0 0 1 6 20a2.5 2.5 0 0 1-2.5-2.5 2.5 2.5 0 0 1 2.5-2.5H8.5V17.5zm8.5-8.5A2.5 2.5 0 0 1 17 6.5 2.5 2.5 0 0 1 19.5 9 2.5 2.5 0 0 1 17 11.5H14.5V9zm-2.5-2.5a2.5 2.5 0 0 1-2.5-2.5A2.5 2.5 0 0 1 12 1.5a2.5 2.5 0 0 1 2.5 2.5V6.5H12z`})})}),(0,K.jsxs)(`div`,{className:`bridge-title-group`,children:[(0,K.jsxs)(`span`,{className:`bridge-title`,children:[`Slack Socket Mode`,(0,K.jsx)(`span`,{className:`bridge-status-pill ${e.enableSlackBridge?`active`:`inactive`}`,children:e.enableSlackBridge?`Active`:`Disabled`})]}),(0,K.jsx)(`span`,{className:`bridge-subtitle`,children:`WebSocket Socket Mode API`})]})]}),(0,K.jsxs)(`label`,{className:`settings-toggle-switch`,children:[(0,K.jsx)(`input`,{type:`checkbox`,checked:e.enableSlackBridge,onChange:e=>t(`enableSlackBridge`,e.target.checked)}),(0,K.jsx)(`span`,{className:`settings-toggle-slider`})]})]}),(0,K.jsxs)(`div`,{className:`bridge-inputs`,children:[(0,K.jsx)(F,{className:`bridge-input`,placeholder:`Slack Bot Token (xoxb-...)`,value:e.slackBotToken,onChange:e=>t(`slackBotToken`,e)}),(0,K.jsx)(F,{className:`bridge-input`,placeholder:`Slack App Token (xapp-...)`,value:e.slackAppToken,onChange:e=>t(`slackAppToken`,e)})]})]}),(0,K.jsxs)(`div`,{className:`bridge-card ${e.enableLineBridge?`active`:``}`,children:[(0,K.jsxs)(`div`,{className:`bridge-card-header`,children:[(0,K.jsxs)(`div`,{className:`bridge-info`,children:[(0,K.jsx)(`div`,{className:`bridge-icon-badge bridge-icon-line`,children:(0,K.jsx)(`svg`,{width:`20`,height:`20`,viewBox:`0 0 24 24`,fill:`currentColor`,children:(0,K.jsx)(`path`,{d:`M19.365 9.863c.349 0 .63.285.63.631 0 .345-.281.63-.63.63h-2.286v1.442h2.286c.349 0 .63.285.63.63 0 .346-.281.63-.63.63h-2.917c-.349 0-.63-.284-.63-.63V8.581c0-.346.281-.63.63-.63h2.917c.349 0 .63.284.63.63 0 .346-.281.63-.63.63h-2.286V9.86h2.286zm-5.631 4.156c0 .248-.146.472-.371.57-.083.036-.172.054-.26.054-.154 0-.306-.056-.425-.165l-2.481-3.238v2.783c0 .346-.28.63-.63.63-.348 0-.63-.284-.63-.63V8.581c0-.248.146-.472.371-.57.225-.098.486-.051.664.12l2.48 3.237V8.581c0-.346.28-.63.63-.63.349 0 .63.284.63.63v5.438zm-6.843 0c0 .346-.28.63-.63.63-.349 0-.63-.284-.63-.63V8.581c0-.346.281-.63.63-.63.35 0 .63.284.63.63v5.438zm-2.434 0c0 .346-.28.63-.63.63h-2.417c-.349 0-.63-.284-.63-.63V8.581c0-.346.281-.63.63-.63.349 0 .63.284.63.63v4.808h1.787c.349 0 .63.285.63.63zM24 10.617C24 4.754 18.627 0 12 0S0 4.754 0 10.617c0 5.247 4.264 9.61 10.02 10.435.39.084.922.257 1.057.592.121.3.079.77.039 1.074l-.17.994c-.052.304-.247 1.191 1.044.649 1.292-.542 6.974-4.107 9.513-7.032C23.013 15.602 24 13.23 24 10.617z`})})}),(0,K.jsxs)(`div`,{className:`bridge-title-group`,children:[(0,K.jsxs)(`span`,{className:`bridge-title`,children:[`LINE Messaging Webhook`,(0,K.jsx)(`span`,{className:`bridge-status-pill ${e.enableLineBridge?`active`:`inactive`}`,children:e.enableLineBridge?`Active`:`Disabled`})]}),(0,K.jsx)(`span`,{className:`bridge-subtitle`,children:`HTTP Webhook Listener (Callback)`})]})]}),(0,K.jsxs)(`label`,{className:`settings-toggle-switch`,children:[(0,K.jsx)(`input`,{type:`checkbox`,checked:e.enableLineBridge,onChange:e=>t(`enableLineBridge`,e.target.checked)}),(0,K.jsx)(`span`,{className:`settings-toggle-slider`})]})]}),(0,K.jsxs)(`div`,{className:`bridge-inputs`,children:[(0,K.jsx)(F,{className:`bridge-input`,placeholder:`LINE Channel Access Token`,value:e.lineChannelAccessToken,onChange:e=>t(`lineChannelAccessToken`,e)}),(0,K.jsx)(F,{className:`bridge-input`,placeholder:`LINE Channel Secret`,value:e.lineChannelSecret,onChange:e=>t(`lineChannelSecret`,e)}),(0,K.jsxs)(`div`,{className:`bridge-input-row`,children:[(0,K.jsx)(`input`,{type:`text`,className:`bridge-input`,placeholder:`Webhook Host (default: 127.0.0.1)`,value:e.lineWebhookHost||``,onChange:e=>t(`lineWebhookHost`,e.target.value)}),(0,K.jsx)(`input`,{type:`number`,className:`bridge-input`,placeholder:`Port`,value:e.lineWebhookPort||3e3,onChange:e=>t(`lineWebhookPort`,parseInt(e.target.value)||3e3),style:{width:`120px`}})]})]})]}),(0,K.jsxs)(`div`,{className:`bridge-card ${e.enableWhatsappBridge?`active`:``}`,children:[(0,K.jsxs)(`div`,{className:`bridge-card-header`,children:[(0,K.jsxs)(`div`,{className:`bridge-info`,children:[(0,K.jsx)(`div`,{className:`bridge-icon-badge bridge-icon-whatsapp`,children:(0,K.jsx)(`svg`,{width:`20`,height:`20`,viewBox:`0 0 24 24`,fill:`currentColor`,children:(0,K.jsx)(`path`,{d:`M.057 24l1.687-6.163c-1.041-1.804-1.588-3.849-1.587-5.946.003-6.556 5.338-11.891 11.893-11.891 3.181.001 6.167 1.24 8.413 3.488 2.245 2.248 3.481 5.236 3.48 8.414-.003 6.557-5.338 11.892-11.893 11.892-1.99-.001-3.951-.5-5.688-1.448l-6.305 1.654zm6.597-3.807c1.676.995 3.276 1.591 5.392 1.592 5.448 0 9.886-4.434 9.889-9.885.002-5.462-4.415-9.89-9.881-9.892-5.452 0-9.887 4.434-9.889 9.884-.001 2.225.651 3.891 1.746 5.634l-.999 3.648 3.742-.981zm11.387-5.464c-.301-.15-1.785-.881-2.062-.982-.276-.101-.477-.15-.677.15-.199.301-.776.982-.952 1.182-.175.201-.351.226-.652.076-.301-.15-1.27-.468-2.42-1.494-.897-.8-1.502-1.788-1.678-2.09-.175-.301-.019-.464.131-.613.136-.135.301-.351.451-.526.15-.176.2-.301.3-.502.1-.201.05-.376-.025-.526-.075-.15-.677-1.631-.928-2.235-.244-.587-.492-.507-.676-.517-.175-.008-.376-.01-.576-.01-.201 0-.526.075-.802.376-.276.301-1.053 1.029-1.053 2.509 0 1.48 1.078 2.909 1.229 3.11.15.201 2.122 3.241 5.141 4.544.718.31 1.279.495 1.716.634.721.229 1.377.197 1.896.12.578-.086 1.785-.729 2.036-1.431.25-.702.25-1.304.175-1.431-.075-.127-.276-.201-.577-.352z`})})}),(0,K.jsxs)(`div`,{className:`bridge-title-group`,children:[(0,K.jsxs)(`span`,{className:`bridge-title`,children:[`WhatsApp Cloud API`,(0,K.jsx)(`span`,{className:`bridge-status-pill ${e.enableWhatsappBridge?`active`:`inactive`}`,children:e.enableWhatsappBridge?`Active`:`Disabled`})]}),(0,K.jsx)(`span`,{className:`bridge-subtitle`,children:`Meta Cloud API webhook listener`})]})]}),(0,K.jsxs)(`label`,{className:`settings-toggle-switch`,children:[(0,K.jsx)(`input`,{type:`checkbox`,checked:e.enableWhatsappBridge,onChange:e=>t(`enableWhatsappBridge`,e.target.checked)}),(0,K.jsx)(`span`,{className:`settings-toggle-slider`})]})]}),(0,K.jsxs)(`div`,{className:`bridge-inputs`,children:[(0,K.jsx)(F,{className:`bridge-input`,placeholder:`WhatsApp Cloud Access Token`,value:e.whatsappCloudAccessToken,onChange:e=>t(`whatsappCloudAccessToken`,e)}),(0,K.jsx)(`input`,{type:`text`,className:`bridge-input`,placeholder:`WhatsApp Phone Number ID`,value:e.whatsappPhoneNumberId,onChange:e=>t(`whatsappPhoneNumberId`,e.target.value)}),(0,K.jsx)(F,{className:`bridge-input`,placeholder:`WhatsApp Verify Token`,value:e.whatsappVerifyToken,onChange:e=>t(`whatsappVerifyToken`,e)}),(0,K.jsx)(F,{className:`bridge-input`,placeholder:`WhatsApp App Secret (optional HMAC validation)`,value:e.whatsappAppSecret,onChange:e=>t(`whatsappAppSecret`,e)}),(0,K.jsxs)(`div`,{className:`bridge-input-row`,children:[(0,K.jsx)(`input`,{type:`text`,className:`bridge-input`,placeholder:`Webhook Host (default: 127.0.0.1)`,value:e.whatsappWebhookHost||``,onChange:e=>t(`whatsappWebhookHost`,e.target.value)}),(0,K.jsx)(`input`,{type:`number`,className:`bridge-input`,placeholder:`Port`,value:e.whatsappWebhookPort||3001,onChange:e=>t(`whatsappWebhookPort`,parseInt(e.target.value)||3001),style:{width:`120px`}})]})]})]})]})]})]})}var K,Pn=t((()=>{n(),Ct(),K=r()})),Fn,In,Ln,Rn=t((()=>{Fn=[{id:`mint`,name:`Mint`,color:`#10b981`,contrastText:`#ffffff`,description:`Emerald brand signature`},{id:`cyan`,name:`Cyan`,color:`#06b6d4`,contrastText:`#ffffff`,description:`Electric tech cyan`},{id:`indigo`,name:`Indigo`,color:`#6366f1`,contrastText:`#ffffff`,description:`Refined violet blue`},{id:`amber`,name:`Amber`,color:`#f59e0b`,contrastText:`#0a0a0b`,description:`Warm solar gold`},{id:`rose`,name:`Rose`,color:`#f43f5e`,contrastText:`#ffffff`,description:`Vivid energized berry`},{id:`monochrome`,name:`Monochrome`,color:`#ffffff`,contrastText:`#09090b`,description:`Minimalist black & white`}],In=[{id:`white`,name:`Pure White`,color:`#ffffff`,contrastText:`#09090b`,description:`Crisp classic bright white`},{id:`green`,name:`Cyber Green`,color:`#86efac`,contrastText:`#09090b`,description:`Phosphor terminal matrix green`},{id:`cyan`,name:`Electric Cyan`,color:`#67e8f9`,contrastText:`#09090b`,description:`Sci-fi holographic ice cyan`},{id:`amber`,name:`Retro Amber`,color:`#fde047`,contrastText:`#09090b`,description:`Warm CRT phosphor amber gold`},{id:`lavender`,name:`Pastel Lilac`,color:`#d8b4fe`,contrastText:`#09090b`,description:`Soft dreamy violet lavender`},{id:`coral`,name:`Soft Coral`,color:`#fda4af`,contrastText:`#09090b`,description:`Warm energetic pastel rose coral`}],Ln=[{id:`preset-dark-mint`,name:`Dark Mint`,description:`Black background · Mint green & slate gray elements`,theme:`dark`,accentColor:`#10b981`,systemTextColor:`#f8fafc`,chatTextColor:`#f8fafc`,bgPreview:`#0a0a0c`,panelPreview:`#18181b`,accentPreview:`#10b981`,textPreview:`#f8fafc`},{id:`preset-light-mint`,name:`Light Mint`,description:`Soft gray background · Green elements · High-contrast text`,theme:`light`,accentColor:`#10b981`,systemTextColor:`#0f172a`,chatTextColor:`#0f172a`,bgPreview:`#f0f2f5`,panelPreview:`#ffffff`,accentPreview:`#10b981`,textPreview:`#0f172a`},{id:`preset-studio-dark`,name:`Studio Dark`,description:`#101010 canvas · #1c1c1c surfaces · #323232 active`,theme:`studio`,accentColor:`#10b981`,systemTextColor:`#e1e1e1`,chatTextColor:`#e1e1e1`,bgPreview:`#101010`,panelPreview:`#161616`,accentPreview:`#10b981`,textPreview:`#e1e1e1`},{id:`preset-dark-mono`,name:`Dark Monochrome`,description:`Black background · Slate gray surfaces · White text`,theme:`dark`,accentColor:`#ffffff`,systemTextColor:`#f8fafc`,chatTextColor:`#f8fafc`,bgPreview:`#0a0a0c`,panelPreview:`#18181b`,accentPreview:`#ffffff`,textPreview:`#f8fafc`}]}));function zn({config:e,updateField:t,updateFields:n}){let[r,i]=(0,Bn.useState)(!1),[a,o]=(0,Bn.useState)(!1),s=t=>e.theme===t.theme&&(e.accentColor||``).toLowerCase()===t.accentColor.toLowerCase(),c=e=>{let r={theme:e.theme,accentColor:e.accentColor,textColor:e.textColor||e.systemTextColor,systemTextColor:e.systemTextColor,chatTextColor:e.chatTextColor,surfaceStyle:e.theme===`light`?`opaque`:`glass`};n?n(r):(t(`theme`,e.theme),t(`accentColor`,e.accentColor),t(`textColor`,r.textColor),t(`systemTextColor`,e.systemTextColor),t(`chatTextColor`,e.chatTextColor),t(`surfaceStyle`,r.surfaceStyle))},l=e=>{n?n({accentColor:e.color}):t(`accentColor`,e.color)},u=e=>{n?n({textColor:e.color,systemTextColor:e.color,chatTextColor:e.color}):(t(`textColor`,e.color),t(`systemTextColor`,e.color),t(`chatTextColor`,e.color))},d=[{id:`system`,name:`System`,description:`Auto-sync with OS`,icon:(0,q.jsxs)(`svg`,{width:`18`,height:`18`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,q.jsx)(`rect`,{x:`2`,y:`3`,width:`20`,height:`14`,rx:`2`,ry:`2`}),(0,q.jsx)(`line`,{x1:`8`,y1:`21`,x2:`16`,y2:`21`}),(0,q.jsx)(`line`,{x1:`12`,y1:`17`,x2:`12`,y2:`21`})]})},{id:`dark`,name:`Dark`,description:`Deep slate comfort`,icon:(0,q.jsx)(`svg`,{width:`18`,height:`18`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,children:(0,q.jsx)(`path`,{d:`M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z`})})},{id:`light`,name:`Light`,description:`Crisp daylight clarity`,icon:(0,q.jsxs)(`svg`,{width:`18`,height:`18`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,q.jsx)(`circle`,{cx:`12`,cy:`12`,r:`5`}),(0,q.jsx)(`line`,{x1:`12`,y1:`1`,x2:`12`,y2:`3`}),(0,q.jsx)(`line`,{x1:`12`,y1:`21`,x2:`12`,y2:`23`}),(0,q.jsx)(`line`,{x1:`4.22`,y1:`4.22`,x2:`5.64`,y2:`5.64`}),(0,q.jsx)(`line`,{x1:`18.36`,y1:`18.36`,x2:`19.78`,y2:`19.78`}),(0,q.jsx)(`line`,{x1:`1`,y1:`12`,x2:`3`,y2:`12`}),(0,q.jsx)(`line`,{x1:`21`,y1:`12`,x2:`23`,y2:`12`}),(0,q.jsx)(`line`,{x1:`4.22`,y1:`19.78`,x2:`5.64`,y2:`18.36`}),(0,q.jsx)(`line`,{x1:`18.36`,y1:`5.64`,x2:`19.78`,y2:`4.22`})]})},{id:`midnight`,name:`Midnight`,description:`OLED pure black`,icon:(0,q.jsx)(`svg`,{width:`18`,height:`18`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,children:(0,q.jsx)(`polygon`,{points:`12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2`})})},{id:`studio`,name:`Studio Dark`,description:`#101010 neutral`,icon:(0,q.jsxs)(`svg`,{width:`18`,height:`18`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,q.jsx)(`rect`,{x:`3`,y:`3`,width:`18`,height:`18`,rx:`2`,ry:`2`}),(0,q.jsx)(`line`,{x1:`3`,y1:`9`,x2:`21`,y2:`9`}),(0,q.jsx)(`line`,{x1:`9`,y1:`21`,x2:`9`,y2:`9`})]})}],f=(e.accentColor||``).toLowerCase(),p=(e.textColor||e.systemTextColor||`#f8fafc`).toLowerCase();return(0,q.jsxs)(`div`,{className:`tab-pane active`,children:[(0,q.jsxs)(`section`,{className:`setting-section`,children:[(0,q.jsx)(`div`,{className:`section-heading`,children:(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`p`,{className:`section-kicker`,children:`Appearance`}),(0,q.jsx)(`h2`,{className:`section-title`,children:`Theme presets`}),(0,q.jsx)(`p`,{className:`section-subtitle`,children:`Curated, complete visual profiles ready in one click`})]})}),(0,q.jsx)(`div`,{className:`theme-preset-grid`,role:`radiogroup`,"aria-label":`Theme presets`,children:Ln.map((e,t)=>{let n=s(e);return(0,q.jsxs)(`button`,{type:`button`,role:`radio`,"aria-checked":n,className:`theme-preset-card ${n?`active`:``}`,onClick:()=>c(e),children:[(0,q.jsx)(`div`,{className:`theme-preset-preview`,style:{background:e.bgPreview},children:(0,q.jsxs)(`div`,{className:`preset-mini-window`,style:{background:e.panelPreview},children:[(0,q.jsxs)(`div`,{className:`preset-mini-header`,children:[(0,q.jsx)(`span`,{className:`preset-mini-dot dot-red`}),(0,q.jsx)(`span`,{className:`preset-mini-dot dot-yellow`}),(0,q.jsx)(`span`,{className:`preset-mini-dot dot-green`}),(0,q.jsx)(`span`,{className:`preset-mini-pill`,style:{background:e.accentPreview,color:e.accentPreview===`#ffffff`?`#0a0a0b`:`#ffffff`},children:`Mint`})]}),(0,q.jsxs)(`div`,{className:`preset-mini-body`,children:[(0,q.jsx)(`div`,{className:`preset-mini-text`,style:{color:e.textPreview},children:`Aa`}),(0,q.jsxs)(`div`,{className:`preset-mini-lines`,children:[(0,q.jsx)(`span`,{className:`preset-mini-line-main`,style:{background:e.textPreview,opacity:.85}}),(0,q.jsx)(`span`,{className:`preset-mini-line-accent`,style:{background:e.accentPreview}})]})]})]})}),(0,q.jsxs)(`div`,{className:`theme-preset-meta`,children:[(0,q.jsxs)(`div`,{className:`theme-preset-title-row`,children:[(0,q.jsxs)(`span`,{className:`theme-preset-number`,children:[t+1,`.`]}),(0,q.jsx)(`span`,{className:`theme-preset-title`,children:e.name}),n&&(0,q.jsx)(`span`,{className:`theme-preset-active-check`,title:`Active preset`,children:(0,q.jsx)(`svg`,{width:`12`,height:`12`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`3`,strokeLinecap:`round`,strokeLinejoin:`round`,children:(0,q.jsx)(`polyline`,{points:`20 6 9 17 4 12`})})})]}),(0,q.jsx)(`p`,{className:`theme-preset-desc`,children:e.description})]})]},e.id)})})]}),(0,q.jsxs)(`section`,{className:`setting-section`,children:[(0,q.jsx)(`div`,{className:`section-heading`,children:(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`p`,{className:`section-kicker`,children:`Core system`}),(0,q.jsx)(`h2`,{className:`section-title`,children:`Color mode & accent`})]})}),(0,q.jsxs)(`div`,{className:`form-grid`,children:[(0,q.jsxs)(`div`,{className:`setting-row stacked`,children:[(0,q.jsx)(`label`,{children:`Color mode`}),(0,q.jsx)(`div`,{className:`color-mode-grid`,role:`radiogroup`,"aria-label":`Color mode`,children:d.map(r=>{let i=(e.theme||`dark`)===r.id;return(0,q.jsxs)(`button`,{type:`button`,role:`radio`,"aria-checked":i,className:`color-mode-card ${i?`active`:``}`,onClick:()=>{if(r.id===`light`)n?n({theme:`light`,surfaceStyle:`opaque`,textColor:`#0f172a`,systemTextColor:`#0f172a`,chatTextColor:`#0f172a`}):(t(`theme`,`light`),t(`surfaceStyle`,`opaque`),t(`textColor`,`#0f172a`),t(`systemTextColor`,`#0f172a`),t(`chatTextColor`,`#0f172a`));else{let i=e.theme===`light`,a=i?`#f8fafc`:e.textColor||`#f8fafc`;n?n({theme:r.id,...i?{textColor:a,systemTextColor:a,chatTextColor:a}:{}}):(t(`theme`,r.id),i&&(t(`textColor`,a),t(`systemTextColor`,a),t(`chatTextColor`,a)))}},children:[(0,q.jsx)(`div`,{className:`mode-card-icon`,children:r.icon}),(0,q.jsxs)(`div`,{className:`mode-card-text`,children:[(0,q.jsx)(`span`,{className:`mode-card-title`,children:r.name}),(0,q.jsx)(`span`,{className:`mode-card-desc`,children:r.description})]}),i&&(0,q.jsx)(`span`,{className:`mode-card-badge`,children:(0,q.jsx)(`svg`,{width:`10`,height:`10`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`3`,strokeLinecap:`round`,strokeLinejoin:`round`,children:(0,q.jsx)(`polyline`,{points:`20 6 9 17 4 12`})})})]},r.id)})})]}),(0,q.jsxs)(`div`,{className:`setting-row stacked`,children:[(0,q.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`},children:[(0,q.jsx)(`label`,{children:`Accent flavor`}),(0,q.jsx)(`button`,{type:`button`,className:`custom-accent-toggle`,onClick:()=>i(!r),children:r?`Use Curated Flavors`:`Custom Hex...`})]}),r?(0,q.jsxs)(`div`,{className:`custom-accent-box`,children:[(0,q.jsx)(`input`,{type:`color`,value:e.accentColor||`#10b981`,onChange:e=>t(`accentColor`,e.target.value),className:`custom-accent-input`}),(0,q.jsx)(`span`,{className:`custom-accent-value`,children:e.accentColor||`#10b981`})]}):(0,q.jsx)(`div`,{className:`flavor-grid`,role:`radiogroup`,"aria-label":`Accent flavors`,children:Fn.map(e=>{let t=f===e.color.toLowerCase(),n=e.color.toLowerCase()===`#ffffff`;return(0,q.jsxs)(`button`,{type:`button`,role:`radio`,"aria-checked":t,className:`flavor-card ${t?`active`:``}`,onClick:()=>l(e),title:e.description,children:[(0,q.jsx)(`span`,{className:`flavor-swatch`,style:{background:e.color,border:n?`1px solid rgba(0,0,0,0.2)`:`none`},children:t&&(0,q.jsx)(`svg`,{width:`12`,height:`12`,viewBox:`0 0 24 24`,fill:`none`,stroke:e.contrastText,strokeWidth:`3.5`,strokeLinecap:`round`,strokeLinejoin:`round`,children:(0,q.jsx)(`polyline`,{points:`20 6 9 17 4 12`})})}),(0,q.jsx)(`span`,{className:`flavor-name`,children:e.name})]},e.id)})})]}),(0,q.jsxs)(`div`,{className:`setting-row stacked`,children:[(0,q.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`},children:[(0,q.jsx)(`label`,{children:`Text color`}),(0,q.jsx)(`button`,{type:`button`,className:`custom-accent-toggle`,onClick:()=>o(!a),children:a?`Use Curated Flavors`:`Custom Hex...`})]}),a?(0,q.jsxs)(`div`,{className:`custom-accent-box`,children:[(0,q.jsx)(`input`,{type:`color`,value:e.textColor||e.systemTextColor||`#f8fafc`,onChange:e=>{let r=e.target.value;n?n({textColor:r,systemTextColor:r,chatTextColor:r}):(t(`textColor`,r),t(`systemTextColor`,r),t(`chatTextColor`,r))},className:`custom-accent-input`}),(0,q.jsx)(`span`,{className:`custom-accent-value`,children:e.textColor||e.systemTextColor||`#f8fafc`})]}):(0,q.jsx)(`div`,{className:`flavor-grid`,role:`radiogroup`,"aria-label":`Text colors`,children:In.map(e=>{let t=p===e.color.toLowerCase()||e.id===`white`&&(p===`#ffffff`||p===`#f8fafc`),n=e.color.toLowerCase()===`#ffffff`;return(0,q.jsxs)(`button`,{type:`button`,role:`radio`,"aria-checked":t,className:`flavor-card ${t?`active`:``}`,onClick:()=>u(e),title:e.description,children:[(0,q.jsx)(`span`,{className:`flavor-swatch`,style:{background:e.color,border:n?`1px solid rgba(255,255,255,0.2)`:`none`},children:t&&(0,q.jsx)(`svg`,{width:`12`,height:`12`,viewBox:`0 0 24 24`,fill:`none`,stroke:e.contrastText,strokeWidth:`3.5`,strokeLinecap:`round`,strokeLinejoin:`round`,children:(0,q.jsx)(`polyline`,{points:`20 6 9 17 4 12`})})}),(0,q.jsx)(`span`,{className:`flavor-name`,children:e.name})]},e.id)})})]}),(0,q.jsxs)(`div`,{className:`toggle-row reduced-effects-row`,children:[(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`label`,{id:`reduced-effects-label`,htmlFor:`reduced-effects`,children:`Reduce effects`}),(0,q.jsx)(`p`,{className:`hint`,children:`Keep the background and orb still. Also follows your system’s reduced motion preference.`})]}),(0,q.jsxs)(`label`,{className:`settings-toggle-switch`,children:[(0,q.jsx)(`input`,{id:`reduced-effects`,type:`checkbox`,role:`switch`,"aria-labelledby":`reduced-effects-label`,checked:e.reducedEffects===!0,onChange:e=>t(`reducedEffects`,e.target.checked)}),(0,q.jsx)(`span`,{className:`settings-toggle-slider`,"aria-hidden":`true`})]})]}),(0,q.jsxs)(`div`,{className:`setting-row stacked`,children:[(0,q.jsx)(`label`,{children:`Surface style`}),(0,q.jsxs)(`div`,{className:`surface-style-grid`,role:`radiogroup`,"aria-label":`Surface style`,children:[(0,q.jsxs)(`button`,{type:`button`,role:`radio`,"aria-checked":(e.surfaceStyle||`glass`)===`opaque`||e.glassBlur===`none`,className:`surface-card ${e.surfaceStyle===`opaque`||e.glassBlur===`none`?`active`:``}`,onClick:()=>{n?n({surfaceStyle:`opaque`,glassBlur:`none`}):(t(`surfaceStyle`,`opaque`),t(`glassBlur`,`none`))},children:[(0,q.jsx)(`span`,{className:`surface-card-title`,children:`Opaque`}),(0,q.jsx)(`span`,{className:`surface-card-desc`,children:`Solid surfaces, maximal readability & zero bleed-through`})]}),(0,q.jsxs)(`button`,{type:`button`,role:`radio`,"aria-checked":(e.surfaceStyle||`glass`)===`glass`&&e.glassBlur!==`none`,className:`surface-card ${e.surfaceStyle!==`opaque`&&e.glassBlur!==`none`?`active`:``}`,onClick:()=>{n?n({surfaceStyle:`glass`,glassBlur:`blur(16px)`}):(t(`surfaceStyle`,`glass`),t(`glassBlur`,`blur(16px)`))},children:[(0,q.jsx)(`span`,{className:`surface-card-title`,children:`Glassmorphism`}),(0,q.jsx)(`span`,{className:`surface-card-desc`,children:`Frosted translucent panels with protected modal overlays`})]})]})]}),e.surfaceStyle!==`opaque`&&e.glassBlur!==`none`&&(0,q.jsxs)(`div`,{className:`setting-row`,children:[(0,q.jsx)(`label`,{children:`Blur intensity`}),(0,q.jsx)(`div`,{className:`pill-segmented`,role:`radiogroup`,"aria-label":`Glass Blur intensity`,children:[{id:`blur(4px)`,label:`Low`},{id:`blur(16px)`,label:`Medium`},{id:`blur(32px)`,label:`High`}].map(n=>(0,q.jsx)(`button`,{type:`button`,role:`radio`,"aria-checked":e.glassBlur===n.id,className:`pill-segmented-btn ${e.glassBlur===n.id?`active`:``}`,onClick:()=>t(`glassBlur`,n.id),children:n.label},n.id))})]})]})]}),(0,q.jsxs)(`section`,{className:`setting-section`,children:[(0,q.jsx)(`div`,{className:`section-heading`,children:(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`p`,{className:`section-kicker`,children:`Terminal`}),(0,q.jsx)(`h2`,{className:`section-title`,children:`TUI theme`}),(0,q.jsx)(`p`,{className:`section-subtitle`,children:`Choose the appearance of Mint Agent in your terminal independently of Web and Desktop.`})]})}),(0,q.jsx)(`div`,{className:`tui-theme-grid`,role:`radiogroup`,"aria-label":`TUI theme`,children:[{id:`system`,name:`Auto`,description:`Use terminal colors`},{id:`dark`,name:`Dark`,description:`Dark terminal palette`},{id:`light`,name:`Light`,description:`Light terminal palette`}].map(n=>{let r=e.tuiTheme===n.id;return(0,q.jsxs)(`button`,{type:`button`,role:`radio`,"aria-checked":r,className:`tui-theme-card ${r?`active`:``}`,onClick:()=>t(`tuiTheme`,n.id),children:[(0,q.jsxs)(`span`,{className:`tui-theme-preview`,"data-tui-theme":n.id,"aria-hidden":`true`,children:[(0,q.jsxs)(`span`,{className:`tui-theme-code-row`,children:[(0,q.jsx)(`span`,{className:`tui-theme-code-gutter`,children:`1\xA0\xA0`}),(0,q.jsx)(`span`,{className:`tui-theme-code-keyword`,children:`fn`}),` greet() {`]}),(0,q.jsxs)(`span`,{className:`tui-theme-code-row tui-theme-code-removed`,children:[(0,q.jsx)(`span`,{className:`tui-theme-code-gutter`,children:`2 -`}),` println!("Hello, World!");`]}),(0,q.jsxs)(`span`,{className:`tui-theme-code-row tui-theme-code-added`,children:[(0,q.jsx)(`span`,{className:`tui-theme-code-gutter`,children:`2 +`}),` println!("Hello, Mint!");`]}),(0,q.jsxs)(`span`,{className:`tui-theme-code-row`,children:[(0,q.jsx)(`span`,{className:`tui-theme-code-gutter`,children:`3\xA0\xA0`}),`}`]})]}),(0,q.jsxs)(`span`,{className:`tui-theme-card-label`,children:[n.name,r&&(0,q.jsx)(`span`,{"aria-hidden":`true`,children:` ✓`})]}),(0,q.jsx)(`span`,{className:`tui-theme-card-description`,children:n.description})]},n.id)})}),(0,q.jsx)(`p`,{className:`tui-theme-hint`,children:`A new TUI session uses this setting. In an open session, use /theme to change it immediately.`})]}),(0,q.jsxs)(`section`,{className:`setting-section`,children:[(0,q.jsx)(`div`,{className:`section-heading`,children:(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`p`,{className:`section-kicker`,children:`Typography`}),(0,q.jsx)(`h2`,{className:`section-title`,children:`Font & Scale`})]})}),(0,q.jsxs)(`div`,{className:`form-grid`,children:[(0,q.jsxs)(`div`,{className:`setting-row`,children:[(0,q.jsx)(`label`,{children:`Font family`}),(0,q.jsxs)(M,{"aria-label":`Font family`,value:e.fontFamily,onValueChange:e=>t(`fontFamily`,e),children:[(0,q.jsx)(`option`,{value:`'IBM Plex Sans Thai', 'Noto Sans Thai', 'Inter', ui-sans-serif, system-ui, sans-serif`,children:`IBM Plex Sans Thai (Default)`}),(0,q.jsx)(`option`,{value:`'Inter', 'Noto Sans Thai', ui-sans-serif, system-ui, sans-serif`,children:`Inter + Noto Sans Thai`}),(0,q.jsx)(`option`,{value:`'Noto Sans Thai', 'Inter', ui-sans-serif, system-ui, sans-serif`,children:`Noto Sans Thai`}),(0,q.jsx)(`option`,{value:`'Fira Code', monospace`,children:`Fira Code (developer code font)`})]})]}),(0,q.jsxs)(`div`,{className:`setting-row`,children:[(0,q.jsx)(`label`,{children:`Font size`}),(0,q.jsx)(`div`,{className:`pill-segmented`,role:`radiogroup`,"aria-label":`Font size`,children:[{id:`14px`,label:`Compact`},{id:`16px`,label:`Default`},{id:`18px`,label:`Large`},{id:`22px`,label:`XL`},{id:`26px`,label:`XXL`},{id:`30px`,label:`XXXL`}].map(n=>(0,q.jsx)(`button`,{type:`button`,role:`radio`,"aria-checked":e.fontSize===n.id,className:`pill-segmented-btn ${e.fontSize===n.id?`active`:``}`,onClick:()=>t(`fontSize`,n.id),children:n.label},n.id))})]})]})]})]})}var Bn,q,Vn=t((()=>{j(),Bn=e(n()),Rn(),q=r()}));function Hn(e){return!!(e.is_workspace||e.location===`workspace`)}function Un({config:e,updateField:t,updateFields:n,mcpName:r,setMcpName:i,mcpCmd:a,setMcpCmd:o,mcpArgs:s,setMcpArgs:c,mcpEnv:l,setMcpEnv:u,mcpIcon:d,setMcpIcon:f,handleAddMcpServer:p,handleRemoveMcpServer:m,handleConnectPlugin:h}){let[g,_]=(0,J.useState)(``),[v,y]=(0,J.useState)(``),[b,x]=(0,J.useState)(``),[S,C]=(0,J.useState)(``),[w,T]=(0,J.useState)(``),ee=r??g,te=i??_,E=a??v,D=o??y,O=s??b,ne=c??x,k=l??S,re=u??C,ie=d??w,ae=f??T,oe=r=>{if(p){p(r);return}if(!ee.trim()||!E.trim()){alert(`Please provide at least a server name and command.`);return}let i={};if(k.trim())try{i=JSON.parse(k)}catch{alert(`Invalid JSON in Environment variable field.`);return}let a=ee.trim(),o=O.split(/\s+/).filter(Boolean),s={...e.mcpServers,[a]:{command:E.trim(),args:o,env:i,icon:ie.trim()||void 0}};n?n({mcpServers:s,...r?{allowedMcpTools:{...e.allowedMcpTools||{},[a]:[`*`]}}:{}}):(t(`mcpServers`,s),r&&t(`allowedMcpTools`,{...e.allowedMcpTools||{},[a]:[`*`]})),te(``),D(``),ne(``),re(``),ae(``)},se=n=>{if(m){m(n);return}let r={...e.mcpServers};delete r[n],t(`mcpServers`,r)},[ce,le]=(0,J.useState)([]),[ue,de]=(0,J.useState)(``),[pe,me]=(0,J.useState)(``),[he,ge]=(0,J.useState)(!1),[_e,ve]=(0,J.useState)(``),[ye,be]=(0,J.useState)({docker:!1,git:!1,gh:!1,node:!1}),[xe,Se]=(0,J.useState)(!1),[Ce,we]=(0,J.useState)([]),[Te,Ee]=(0,J.useState)(null),[De,Oe]=(0,J.useState)(null),[ke,Ae]=(0,J.useState)(null),[A,je]=(0,J.useState)(!1);(0,J.useEffect)(()=>{Ie(),Le(),Me();let e=We(()=>{Me()});return()=>{e()}},[]);let Me=async()=>{try{let e=await Ze();we(e)}catch(e){console.error(`Failed to fetch OAuth statuses:`,e)}},Ne=async(t,n)=>{if(t===`spotify`&&!e.spotifyClientId?.trim())Oe(n||`spotify`),alert(`Please click "Configure" below and enter your Spotify Client ID before signing in (Get it from developer.spotify.com/dashboard)`);else if(t===`github`&&!e.githubClientId?.trim()&&!e.githubToken?.trim())Oe(n||`github`),alert(`Please click "Configure" below and enter your GitHub Client ID (or Personal Access Token) before signing in.`);else if(t===`vercel`&&!e.vercelClientId?.trim()&&!e.vercelToken?.trim())Oe(n||`vercel`),alert(`Please click "Configure" below and enter your Vercel Client ID (or Access Token) before signing in.`);else if((t===`google`||t===`gmail`||t===`google_calendar`)&&!e.gmailClientId?.trim()&&!e.googleCalendarClientId?.trim())Oe(n||`gmail`),alert(`Please click "Configure" below and enter your Google Client ID before signing in.`);else{Ee(t);try{await Ke(t)}catch(e){console.error(`OAuth login error for ${t}:`,e)}finally{Ee(null),Me()}}},Pe=async e=>{try{await Ye(e),await Me()}catch(t){console.error(`OAuth revoke error for ${e}:`,t)}},Ie=async()=>{ge(!0),ve(``);try{let e=window.localStorage.getItem(`mint:last-workspace-path`)||void 0,t=await Wn(e);le(t)}catch(e){console.error(`Failed to fetch learned skills:`,e),ve(`Failed to load learned skills`)}finally{ge(!1)}},Le=async()=>{Se(!0);try{let e=await qn();be(e)}catch(e){console.error(`Failed to detect system tools:`,e)}finally{Se(!1)}},Re=async e=>{if(e.preventDefault(),ue.trim()&&pe.trim())try{await Gn(ue.trim(),pe.trim()),de(``),me(``),Ie()}catch(e){console.error(`Failed to add learned skill:`,e),alert(`Error saving skill`)}},ze=async e=>{if(confirm(`Are you sure you want to forget skill "${e}"?`))try{await Kn(e),Ie()}catch(e){console.error(`Failed to delete skill:`,e),alert(`Error deleting skill`)}},Be=(n,r,i)=>{let a={...e.mcpServers||{}};a[n]&&(a[n]={...a[n],[r]:i},t(`mcpServers`,a))},j=e=>{Oe(t=>t===e?null:e)},M=fe,Ve=(n,r,i,a)=>{let o={...e.mcpServers||{}};o[n]?o[n]={...o[n],disabled:!r}:r&&i&&(o[n]={command:i,args:a||[],env:{},disabled:!1}),t(`mcpServers`,o)},N=[];return Object.entries(e.mcpServers||{}).forEach(([e,t])=>{let n=`🔌`;e===`docker`&&(n=`🐳`),(e===`git`||e===`github`)&&(n=`🐙`),N.push({name:e,command:t.command,args:t.args||[],icon:n,customIcon:t.icon,isEnabled:t?.disabled!==!0,isConfigured:!0,description:`Command: ${t.command} ${(t.args||[]).join(` `)}`})}),ye.docker&&!e.mcpServers?.docker&&N.push({name:`docker`,command:`npx`,args:[`-y`,`@proxeus/mcp-docker-server`],icon:`🐳`,isEnabled:!1,isConfigured:!1,description:`Docker MCP Server (Discovered)`}),ye.git&&!e.mcpServers?.git&&N.push({name:`git`,command:`npx`,args:[`-y`,`@modelcontextprotocol/server-git`],icon:`🐙`,isEnabled:!1,isConfigured:!1,description:`Git MCP Server (Discovered)`}),(0,Y.jsxs)(`div`,{className:`tab-pane active`,children:[(0,Y.jsxs)(`section`,{className:`setting-section`,children:[(0,Y.jsx)(`div`,{className:`section-heading`,children:(0,Y.jsxs)(`div`,{children:[(0,Y.jsx)(`p`,{className:`section-kicker`,children:`Knowledge base`}),(0,Y.jsx)(`h2`,{className:`section-title`,children:`Learned AI Skills`})]})}),ce.length===0?(0,Y.jsxs)(`div`,{className:`empty-skills-notice`,children:[`No learned skills found. Teach Mint a skill below or run `,(0,Y.jsx)(`code`,{children:`/learn`}),` in chat.`]}):(0,Y.jsx)(`div`,{className:`skills-list`,children:ce.map(e=>(0,Y.jsxs)(`div`,{className:`skill-card`,children:[(0,Y.jsxs)(`div`,{className:`skill-card-body`,children:[(0,Y.jsxs)(`div`,{className:`plugin-name-row`,children:[(0,Y.jsx)(`span`,{className:`plugin-tag accent`,children:e.name}),(0,Y.jsx)(`span`,{className:`plugin-tag ${Hn(e)?`ok`:`info`}`,children:Hn(e)?`Workspace`:`Global`})]}),(0,Y.jsx)(`p`,{className:`skill-card-desc`,children:e.description||e.content})]}),(0,Y.jsx)(`button`,{className:`btn-danger btn-sm`,onClick:()=>ze(e.name),children:`Forget`})]},e.name))}),(0,Y.jsxs)(`form`,{className:`add-skill-box`,onSubmit:Re,children:[(0,Y.jsx)(`h3`,{children:`Teach new skill`}),_e&&(0,Y.jsx)(`p`,{className:`profile-message-error`,children:_e}),(0,Y.jsxs)(`div`,{className:`setting-row stacked`,children:[(0,Y.jsx)(`label`,{children:`Skill name (e.g. coding-guidelines)`}),(0,Y.jsx)(`input`,{type:`text`,placeholder:`e.g. angular-standard`,value:ue,onChange:e=>de(e.target.value)})]}),(0,Y.jsxs)(`div`,{className:`setting-row stacked`,children:[(0,Y.jsx)(`label`,{children:`Skill instructions / content`}),(0,Y.jsx)(`textarea`,{placeholder:`# Instructions
|
|
4
|
+
Write only clean TypeScript. Use async/await.`,value:pe,onChange:e=>me(e.target.value),rows:5})]}),(0,Y.jsx)(`button`,{type:`submit`,className:`btn-primary btn-full`,disabled:he,children:he?`Learning...`:`Teach Skill`})]})]}),(0,Y.jsxs)(`section`,{className:`setting-section`,children:[(0,Y.jsx)(`div`,{className:`section-heading`,children:(0,Y.jsxs)(`div`,{children:[(0,Y.jsx)(`p`,{className:`section-kicker`,children:`External tools`}),(0,Y.jsx)(`h2`,{className:`section-title`,children:`MCP servers`}),(0,Y.jsxs)(`p`,{className:`section-desc`,style:{opacity:.7,fontSize:`0.85rem`},children:[`Add, edit, enable/disable a server and choose which of its tools the agent may call. The same manager opens full-screen with `,(0,Y.jsx)(`code`,{children:`/mcp`}),` in chat.`]})]})}),(0,Y.jsx)(`div`,{className:`mcp-list`,children:N.length===0?(0,Y.jsx)(`div`,{className:`mcp-empty-notice`,children:`No MCP servers configured or discovered.`}):N.map(n=>{let r=ke===n.name,i=e.mcpServers?.[n.name]||{command:n.command,args:n.args,env:{},icon:n.customIcon};return(0,Y.jsxs)(`div`,{className:`plugin-card-wrapper${r?` active-plugin-card`:``}${n.isConfigured?``:` is-discovered`}`,children:[(0,Y.jsxs)(`div`,{className:`plugin-card`,children:[(0,Y.jsxs)(`div`,{className:`plugin-card-main`,children:[(0,Y.jsx)(`div`,{className:`plugin-icon`,children:Fe(n.name,n.customIcon)}),(0,Y.jsxs)(`div`,{className:`plugin-info`,children:[(0,Y.jsxs)(`div`,{className:`plugin-name plugin-name-row`,children:[n.name,!n.isConfigured&&(0,Y.jsx)(`span`,{className:`plugin-tag ok`,children:`Discovered`})]}),(0,Y.jsx)(`div`,{className:`plugin-desc mono`,children:n.description})]})]}),(0,Y.jsxs)(`div`,{className:`plugin-actions`,children:[n.isConfigured&&(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(`button`,{type:`button`,className:`btn-icon${r?` is-active`:``}`,onClick:()=>Ae(r?null:n.name),title:`Edit MCP server settings`,children:(0,Y.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`16`,height:`16`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,Y.jsx)(`path`,{d:`M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7`}),(0,Y.jsx)(`path`,{d:`M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z`})]})}),(0,Y.jsx)(`button`,{type:`button`,className:`btn-icon danger`,onClick:()=>se(n.name),title:`Delete MCP server`,children:(0,Y.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`18`,height:`18`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,Y.jsx)(`polyline`,{points:`3 6 5 6 21 6`}),(0,Y.jsx)(`path`,{d:`M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2`}),(0,Y.jsx)(`line`,{x1:`10`,y1:`11`,x2:`10`,y2:`17`}),(0,Y.jsx)(`line`,{x1:`14`,y1:`11`,x2:`14`,y2:`17`})]})})]}),(0,Y.jsxs)(`label`,{className:`settings-toggle-switch`,children:[(0,Y.jsx)(`input`,{type:`checkbox`,checked:n.isEnabled,onChange:e=>{Ve(n.name,e.target.checked,n.command,n.args)}}),(0,Y.jsx)(`span`,{className:`settings-toggle-slider`})]})]})]}),n.isConfigured&&r&&(0,Y.jsxs)(`div`,{className:`plugin-config-panel`,children:[(0,Y.jsxs)(`h4`,{children:[`Edit settings for `,n.name]}),(0,Y.jsxs)(`div`,{className:`form-grid two-col`,children:[(0,Y.jsxs)(`div`,{className:`setting-row stacked`,children:[(0,Y.jsx)(`label`,{children:`Command`}),(0,Y.jsx)(`input`,{type:`text`,value:i.command||``,onChange:e=>Be(n.name,`command`,e.target.value)})]}),(0,Y.jsxs)(`div`,{className:`setting-row stacked`,children:[(0,Y.jsx)(`label`,{children:`Icon (Optional)`}),(0,Y.jsx)(`input`,{type:`text`,placeholder:`SVG code, URL, or preset: search/database/cloud/code/api`,value:i.icon||``,onChange:e=>Be(n.name,`icon`,e.target.value)})]})]}),(0,Y.jsxs)(`div`,{className:`setting-row stacked`,children:[(0,Y.jsx)(`label`,{children:`Arguments (Space separated)`}),(0,Y.jsx)(`input`,{type:`text`,value:(i.args||[]).join(` `),onChange:e=>Be(n.name,`args`,e.target.value.split(/\s+/).filter(Boolean))})]}),(0,Y.jsxs)(`div`,{className:`setting-row stacked`,children:[(0,Y.jsx)(`label`,{children:`Environment variables (JSON format)`}),(0,Y.jsx)(`textarea`,{value:typeof i.env==`object`?JSON.stringify(i.env,null,2):i.env||``,onChange:e=>{try{let t=JSON.parse(e.target.value);Be(n.name,`env`,t)}catch{}},rows:3})]}),(0,Y.jsx)(He,{serverName:n.name,config:e,updateField:t,listServerTools:Jn})]})]},n.name)})}),(0,Y.jsxs)(`div`,{className:`add-mcp-box`,children:[(0,Y.jsx)(`h3`,{children:`Add MCP Server`}),(0,Y.jsx)(Ue,{configuredNames:Object.keys(e.mcpServers||{}),onPick:(e,t,n)=>{te(e.key),D(e.command),ne([...e.args||[],...t].join(` `)),re(Object.keys(n).length?JSON.stringify(n,null,2):``),ae&&ae(e.icon||``)}}),(0,Y.jsxs)(`div`,{className:`form-grid two-col`,children:[(0,Y.jsxs)(`div`,{className:`setting-row stacked`,children:[(0,Y.jsx)(`label`,{children:`Server name`}),(0,Y.jsx)(`input`,{type:`text`,placeholder:`e.g. google-search`,value:ee,onChange:e=>te(e.target.value)})]}),(0,Y.jsxs)(`div`,{className:`setting-row stacked`,children:[(0,Y.jsx)(`label`,{children:`Command`}),(0,Y.jsx)(`input`,{type:`text`,placeholder:`e.g. npx`,value:E,onChange:e=>D(e.target.value)})]})]}),(0,Y.jsxs)(`div`,{className:`setting-row stacked`,children:[(0,Y.jsx)(`label`,{children:`Arguments`}),(0,Y.jsx)(`input`,{type:`text`,placeholder:`e.g. -y @modelcontextprotocol/server-brave-search`,value:O,onChange:e=>ne(e.target.value)})]}),(0,Y.jsxs)(`div`,{className:`setting-row stacked`,children:[(0,Y.jsx)(`label`,{children:`Icon (Optional)`}),(0,Y.jsx)(`input`,{type:`text`,placeholder:`SVG code, URL, or preset: search/database/cloud/code/api`,value:ie,onChange:e=>ae&&ae(e.target.value)})]}),(0,Y.jsxs)(`div`,{className:`setting-row stacked`,children:[(0,Y.jsx)(`label`,{children:`Environment variables (JSON)`}),(0,Y.jsx)(`textarea`,{placeholder:`e.g. {"BRAVE_API_KEY": "your_key_here"}`,value:k,onChange:e=>re(e.target.value),rows:3})]}),(0,Y.jsxs)(`label`,{className:`mcp-allow-all-row`,style:{marginTop:10,marginBottom:12},children:[(0,Y.jsx)(`input`,{type:`checkbox`,className:`mint-custom-checkbox`,checked:A,onChange:e=>je(e.target.checked)}),(0,Y.jsxs)(`span`,{className:`mcp-allow-all-text`,children:[(0,Y.jsx)(`span`,{className:`mcp-allow-all-title`,children:`Allow the agent to call all of this server’s tools (*)`}),(0,Y.jsx)(`span`,{className:`mcp-allow-all-desc`,children:`Leave off to approve tools one by one afterwards.`})]})]}),(0,Y.jsx)(`button`,{className:`btn-primary btn-full`,onClick:()=>{oe(A),je(!1)},children:`Add MCP Server`})]})]}),(0,Y.jsxs)(`section`,{className:`setting-section`,children:[(0,Y.jsx)(`div`,{className:`section-heading`,children:(0,Y.jsxs)(`div`,{children:[(0,Y.jsx)(`p`,{className:`section-kicker`,children:`Integrations`}),(0,Y.jsx)(`h2`,{className:`section-title`,children:`Plugins & Integrations`})]})}),(0,Y.jsx)(`div`,{className:`plugin-list`,children:M.map(n=>{let r=Ge(e,n),i=De===n.key;return(0,Y.jsxs)(`div`,{className:`plugin-card-wrapper${r?` active-plugin-card`:``}`,children:[(0,Y.jsxs)(`div`,{className:`plugin-card`,children:[(0,Y.jsxs)(`div`,{className:`plugin-card-main`,children:[(0,Y.jsx)(`div`,{className:`plugin-icon`,children:Fe(n.key)}),(0,Y.jsxs)(`div`,{className:`plugin-info`,children:[(0,Y.jsxs)(`div`,{className:`plugin-name plugin-name-row`,children:[n.name,n.isOAuth&&(()=>{let e=Ce.find(e=>e.provider===n.oauthProvider),t=e?.connected;return(0,Y.jsx)(`span`,{className:`plugin-status${t?` connected`:``}`,children:t?`Connected ${e.accountEmail?`(${e.accountEmail})`:``}`:`Not connected`})})()]}),(0,Y.jsx)(`div`,{className:`plugin-desc`,children:n.desc})]})]}),(0,Y.jsxs)(`div`,{className:`plugin-actions`,children:[n.isOAuth&&(Ce.find(e=>e.provider===n.oauthProvider)?.connected?(0,Y.jsx)(`button`,{className:`btn-danger btn-sm`,onClick:()=>Pe(n.oauthProvider),children:`Disconnect`}):(0,Y.jsx)(`button`,{className:`btn-primary btn-sm`,onClick:()=>Ne(n.oauthProvider,n.key),disabled:Te===n.oauthProvider,children:Te===n.oauthProvider?`Signing In...`:`Sign In`})),n.hasCredentials&&(0,Y.jsx)(`button`,{className:`btn-secondary btn-sm`,onClick:()=>j(n.key),children:i?`Hide Config`:`Configure`}),n.key===`discord`&&r&&(0,Y.jsx)(`button`,{className:`btn-secondary btn-sm`,onClick:()=>h(`discord`),children:`Update RPC`}),(0,Y.jsxs)(`label`,{className:`settings-toggle-switch`,children:[(0,Y.jsx)(`input`,{type:`checkbox`,checked:r,onChange:r=>{Je(e,n,r.target.checked,t)}}),(0,Y.jsx)(`span`,{className:`settings-toggle-slider`})]})]})]}),n.hasCredentials&&i&&(0,Y.jsxs)(`div`,{className:`plugin-config-panel`,children:[(0,Y.jsx)(`h4`,{children:`Credentials`}),(0,Y.jsx)(`div`,{className:`form-grid compact`,children:n.fields?.map(n=>(0,Y.jsxs)(`div`,{className:`setting-row stacked`,children:[(0,Y.jsx)(`label`,{children:n.label}),(0,Y.jsx)(`input`,{type:n.type,placeholder:n.placeholder,value:e[n.field]||``,onChange:e=>t(n.field,e.target.value)})]},n.field))})]})]},n.key)})})]})]})}var J,Y,Wn,Gn,Kn,qn,Jn,Yn=t((()=>{J=e(n()),f(),Ve(),N(),qe(),pe(),Xe(),Y=r(),{listLearnedSkills:Wn,addLearnedSkill:Gn,deleteLearnedSkill:Kn,detectSystemTools:qn,listMcpServerTools:Jn}=s}));function Xn({config:e,updateField:t,dynamicOllamaModels:n=[],providerModels:r}){let i=e.agents||[],[a,o]=(0,X.useState)(null),[s,c]=(0,X.useState)(``),[l,u]=(0,X.useState)(`gemini`),[d,f]=(0,X.useState)(`gemini-2.5-flash`),[p,m]=(0,X.useState)(``),[h,g]=(0,X.useState)(``),[_,v]=(0,X.useState)(!1),y=t=>{if(u(t),t===`gemini`)f(e.geminiModel||r.gemini[0]||``);else if(t===`openai`)f(e.openaiModel||r.openai[0]||``);else if(t===`openrouter`)f(e.openrouterModel||r.openrouter[0]||``);else if(t===`deepseek`)f(e.deepseekModel||r.deepseek[0]||``);else if(t===`anthropic`)f(e.anthropicModel||r.anthropic[0]||``);else if(t===`huggingface`)f(e.hfModel||E[0]);else if(t===`local_openai`)f(e.localModelName||r.local_openai[0]||``);else if(t===`ollama`)f(e.ollamaModel||n[0]||``);else if(t.startsWith(`custom:`)){let n=t.replace(/^custom:/,``),r=(e.customProviders??[]).find(e=>e.id===n);f(r?.models[0]?.modelId??``)}},b=e=>{o(e),c(e.name),u(e.provider),f(e.model),m(e.apiKey||``),g(e.systemInstruction||e.systemPrompt||``),v(!0)},x=()=>{if(!s.trim()){alert(`Please enter an agent name.`);return}let e=[];if(a)e=i.map(e=>e.id===a.id?{...e,name:s,provider:l,model:d,apiKey:p||void 0,systemInstruction:h,systemPrompt:h,enabled:e.enabled??!0}:e);else{let t={id:`agent-${Date.now()}`,name:s,provider:l,model:d,apiKey:p||void 0,systemInstruction:h,systemPrompt:h,enabled:!0};e=[...i,t]}t(`agents`,e),T()},S=e=>{confirm(`Are you sure you want to delete this agent?`)&&t(`agents`,i.filter(t=>t.id!==e))},C=(e,n)=>{t(`agents`,i.map(t=>t.id===e?{...t,enabled:n}:t))},w=()=>{t(`agents`,i.map(e=>({...e,enabled:!1})))},T=()=>{o(null),c(``),u(`gemini`),f(`gemini-2.5-flash`),m(``),g(``),v(!1)},ee=()=>{o(null),c(``),u(`gemini`),f(`gemini-2.5-flash`),m(``),g(``),v(!0)},te=[{value:`gemini`,label:`Google Gemini`,hasKey:!0},{value:`openai`,label:`OpenAI`,hasKey:!!e.openaiApiKey},{value:`anthropic`,label:`Anthropic Claude`,hasKey:!!e.anthropicApiKey},{value:`openrouter`,label:`OpenRouter`,hasKey:!!e.openrouterApiKey},{value:`deepseek`,label:`DeepSeek`,hasKey:!!e.deepseekApiKey},{value:`huggingface`,label:`Hugging Face`,hasKey:!!e.hfApiKey},{value:`local_openai`,label:`Local OpenAI`,hasKey:!!e.localApiBaseUrl},{value:`ollama`,label:`Ollama (Local)`,hasKey:!!e.ollamaHost},...(e.customProviders??[]).filter(e=>e.baseUrl.trim().length>0).map(e=>({value:`custom:${e.id}`,label:`${e.displayName||e.id} (Custom)`,hasKey:!0}))].filter(e=>e.hasKey),D=[],O=``;if(l===`gemini`)D=r.gemini,O=e.geminiModel;else if(l===`openai`)D=r.openai,O=e.openaiModel;else if(l===`openrouter`)D=r.openrouter,O=e.openrouterModel;else if(l===`deepseek`)D=r.deepseek,O=e.deepseekModel;else if(l===`anthropic`)D=r.anthropic,O=e.anthropicModel;else if(l===`huggingface`)D=E,O=e.hfModel;else if(l===`local_openai`)D=r.local_openai,O=e.localModelName;else if(l===`ollama`)D=n,O=e.ollamaModel;else if(l.startsWith(`custom:`)){let t=l.replace(/^custom:/,``);D=(e.customProviders??[]).find(e=>e.id===t)?.models.map(e=>e.modelId)??[],O=D[0]??``}let ne=O?[O,...D.filter(e=>e!==O)]:D,k=!ne.includes(d);return(0,Z.jsxs)(`div`,{className:`tab-pane active animate-fade-in`,style:{display:`flex`,flexDirection:`column`,gap:`24px`},children:[(0,Z.jsxs)(`section`,{className:`setting-section`,children:[(0,Z.jsxs)(`div`,{className:`section-heading`,style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`},children:[(0,Z.jsxs)(`div`,{children:[(0,Z.jsx)(`p`,{className:`section-kicker`,children:`Multi-Agent System`}),(0,Z.jsx)(`h2`,{className:`section-title`,children:`Agent collaboration settings`})]}),!_&&(0,Z.jsxs)(`div`,{style:{display:`flex`,gap:`10px`,height:`fit-content`,flexShrink:0},children:[(0,Z.jsx)(`button`,{className:`btn btn-secondary`,onClick:w,style:{whiteSpace:`nowrap`},children:`Disable All`}),(0,Z.jsx)(`button`,{className:`btn btn-primary`,onClick:ee,style:{whiteSpace:`nowrap`},children:`+ Add Custom Agent`})]})]}),(0,Z.jsx)(`div`,{className:`toggle-card`,style:{margin:`4px 0 24px 0`},children:(0,Z.jsxs)(`div`,{className:`toggle-row`,children:[(0,Z.jsxs)(`div`,{children:[(0,Z.jsx)(`label`,{children:`Enable multi-agent collaboration`}),(0,Z.jsx)(`p`,{className:`hint`,children:`Allow multiple specialized agents to collaborate sequentially (Planner → Coder → Reviewer).`})]}),(0,Z.jsxs)(`label`,{className:`settings-toggle-switch`,children:[(0,Z.jsx)(`input`,{type:`checkbox`,checked:e.enableAgentCollaboration,onChange:e=>t(`enableAgentCollaboration`,e.target.checked)}),(0,Z.jsx)(`span`,{className:`settings-toggle-slider`})]})]})}),_?(0,Z.jsxs)(`div`,{className:`form-grid single`,style:{background:`var(--panel-soft)`,padding:`20px`,borderRadius:`8px`,border:`1px solid var(--panel-raised)`,marginTop:`10px`},children:[(0,Z.jsx)(`h3`,{style:{margin:`0 0 16px 0`,fontSize:`18px`,color:`var(--interactive-fg)`},children:a?`Edit Agent: ${a.name}`:`Create New Agent`}),(0,Z.jsxs)(`div`,{className:`setting-row`,children:[(0,Z.jsx)(`label`,{children:`Agent name`}),(0,Z.jsx)(`input`,{type:`text`,value:s,onChange:e=>c(e.target.value),placeholder:`e.g. Code Reviewer`})]}),(0,Z.jsxs)(`div`,{className:`setting-row`,children:[(0,Z.jsx)(`label`,{children:`AI provider`}),(0,Z.jsx)(M,{"aria-label":`AI provider`,value:l,onValueChange:e=>y(e),children:te.map(e=>(0,Z.jsx)(`option`,{value:e.value,children:e.label},e.value))})]}),(0,Z.jsxs)(`div`,{className:`setting-row`,children:[(0,Z.jsx)(`label`,{children:`Model name`}),(0,Z.jsxs)(M,{"aria-label":`Model name`,value:k?`custom`:d,onValueChange:e=>{let t=e;f(t===`custom`?``:t)},children:[ne.map(e=>(0,Z.jsx)(`option`,{value:e,children:e},e)),(0,Z.jsx)(`option`,{value:`custom`,children:`Custom...`})]})]}),k&&(0,Z.jsxs)(`div`,{className:`setting-row`,children:[(0,Z.jsx)(`label`,{children:`Custom model name`}),(0,Z.jsx)(`input`,{type:`text`,value:d,onChange:e=>f(e.target.value),placeholder:`Enter custom model name...`})]}),(0,Z.jsxs)(`div`,{className:`setting-row`,children:[(0,Z.jsx)(`label`,{children:`Custom API Key (Optional)`}),(0,Z.jsx)(F,{value:p,onChange:e=>m(e),placeholder:`Leave blank to use global provider API key`})]}),(0,Z.jsxs)(`div`,{className:`setting-row`,children:[(0,Z.jsx)(`label`,{children:`System instructions / role`}),(0,Z.jsx)(`textarea`,{value:h,onChange:e=>g(e.target.value),placeholder:`Describe this agent's goal, instructions, and personality...`,style:{minHeight:`120px`,resize:`vertical`}})]}),(0,Z.jsxs)(`div`,{style:{display:`flex`,gap:`10px`,marginTop:`16px`,justifyContent:`flex-end`},children:[(0,Z.jsx)(`button`,{className:`btn btn-secondary`,onClick:T,children:`Cancel`}),(0,Z.jsx)(`button`,{className:`btn btn-primary`,onClick:x,children:`Save agent`})]})]}):(0,Z.jsxs)(`div`,{className:`entity-list`,style:{marginTop:`16px`},children:[i.map(e=>(0,Z.jsxs)(`div`,{className:`entity-card`,children:[(0,Z.jsxs)(`div`,{className:`entity-card-header`,children:[(0,Z.jsxs)(`div`,{className:`entity-card-header-left`,children:[(0,Z.jsx)(`strong`,{className:`entity-card-name`,children:e.name}),(0,Z.jsxs)(`span`,{className:`entity-card-badge`,children:[e.provider,` (`,e.model,`)`]})]}),(0,Z.jsxs)(`div`,{className:`entity-card-header-actions`,children:[(0,Z.jsxs)(`label`,{className:`settings-toggle-switch`,children:[(0,Z.jsx)(`input`,{type:`checkbox`,checked:e.enabled,onChange:t=>C(e.id,t.target.checked)}),(0,Z.jsx)(`span`,{className:`settings-toggle-slider`})]}),(0,Z.jsx)(`button`,{className:`btn btn-secondary`,style:{padding:`4px 8px`,fontSize:`12px`},onClick:()=>b(e),children:`Edit`}),![`planner`,`coder`,`reviewer`].includes(e.id)&&(0,Z.jsx)(`button`,{className:`btn btn-danger`,style:{padding:`4px 8px`,fontSize:`12px`},onClick:()=>S(e.id),children:`Delete`})]})]}),(0,Z.jsxs)(`p`,{className:`entity-card-desc`,children:[`"`,e.systemInstruction,`"`]})]},e.id)),i.length===0&&(0,Z.jsx)(`div`,{className:`entity-empty`,children:`No agents configured. Click "+ Add Custom Agent" to get started.`})]})]}),(0,Z.jsx)(Zn,{swarmMaxParallel:e.swarmMaxParallel??4,onUpdateSwarmMaxParallel:e=>t(`swarmMaxParallel`,e),agentMaxSteps:e.agentMaxSteps??40,onUpdateAgentMaxSteps:e=>t(`agentMaxSteps`,e)})]})}function Zn({swarmMaxParallel:e=4,onUpdateSwarmMaxParallel:t,agentMaxSteps:n=40,onUpdateAgentMaxSteps:r}){let[i,a]=(0,X.useState)([]),[o,s]=(0,X.useState)(!0),[c,l]=(0,X.useState)(``),[u,d]=(0,X.useState)(!1),[f,p]=(0,X.useState)(null),[m,h]=(0,X.useState)(nr),g=typeof window<`u`&&window.localStorage.getItem(`mint:last-workspace-path`)||void 0,_=async()=>{s(!0),l(``);try{a(await Qn(g))}catch(e){l(e instanceof Error?e.message:`Failed to load subagents.`)}finally{s(!1)}};(0,X.useEffect)(()=>{_()},[]);let v=()=>{d(!1),p(null),h(nr)},y=()=>{p(null),h({...nr,scope:g?`workspace`:`global`}),d(!0)},b=e=>{p(e.sourcePath),h({name:e.name,description:e.description,tools:e.tools?.join(`, `)??``,model:e.model??``,provider:e.provider??``,systemPrompt:e.systemPrompt,scope:tr(e.sourcePath)?`workspace`:`global`}),d(!0)},x=async()=>{if(!m.name.trim()){alert(`Please enter a subagent name.`);return}if(!m.systemPrompt.trim()){alert(`Please describe what this subagent should do (its system prompt).`);return}let e={name:m.name.trim(),description:m.description.trim(),tools:m.tools.trim()?m.tools.split(`,`).map(e=>e.trim()).filter(Boolean):null,model:m.model.trim()||null,provider:m.provider.trim()||null,systemPrompt:m.systemPrompt,scope:m.scope,previousSourcePath:f};try{await $n(e,g),v(),await _()}catch(e){alert(e instanceof Error?e.message:`Failed to save subagent.`)}},S=async e=>{if(confirm(`Delete subagent "${e.name}"?`))try{await er(e.sourcePath),await _()}catch(e){alert(e instanceof Error?e.message:`Failed to delete subagent.`)}};return(0,Z.jsxs)(`section`,{className:`setting-section`,children:[(0,Z.jsxs)(`div`,{className:`section-heading`,style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`},children:[(0,Z.jsxs)(`div`,{children:[(0,Z.jsx)(`p`,{className:`section-kicker`,children:`dispatch_agents`}),(0,Z.jsx)(`h2`,{className:`section-title`,children:`Subagents & Swarm Execution`})]}),!u&&(0,Z.jsx)(`button`,{className:`btn btn-primary`,onClick:y,style:{whiteSpace:`nowrap`},children:`+ Add Subagent`})]}),(0,Z.jsx)(`p`,{className:`hint`,style:{margin:`4px 0 16px 0`},children:`Focused workers the agent can delegate sub-tasks to in parallel mid-conversation. Each runs its own isolated conversation — only its final summary comes back, so exploring, reading files, or running tools doesn't bloat the main context.`}),(0,Z.jsx)(`div`,{style:{marginBottom:`20px`,padding:`12px 16px`,background:`var(--panel-soft, rgba(255,255,255,0.03))`,borderRadius:`8px`,border:`1px solid var(--border-subtle, rgba(255,255,255,0.08))`},children:(0,Z.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`},children:[(0,Z.jsxs)(`div`,{children:[(0,Z.jsx)(`strong`,{style:{fontSize:`14px`,color:`var(--text-primary)`},children:`Max Parallel Subagents`}),(0,Z.jsx)(`p`,{className:`hint`,style:{margin:`2px 0 0 0`,fontSize:`12px`},children:`Maximum number of read-only subagents allowed to run concurrently in parallel (1 to 8).`})]}),(0,Z.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:`8px`},children:[(0,Z.jsx)(`input`,{type:`range`,min:1,max:8,value:e,onChange:e=>t?.(parseInt(e.target.value,10)),style:{width:`100px`,accentColor:`var(--accent-color, #10b981)`}}),(0,Z.jsx)(`span`,{style:{fontWeight:600,minWidth:`24px`,textAlign:`center`,color:`var(--text-primary)`},children:e})]})]})}),(0,Z.jsx)(`div`,{style:{marginBottom:`20px`,padding:`12px 16px`,background:`var(--panel-soft, rgba(255,255,255,0.03))`,borderRadius:`8px`,border:`1px solid var(--border-subtle, rgba(255,255,255,0.08))`},children:(0,Z.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`},children:[(0,Z.jsxs)(`div`,{children:[(0,Z.jsx)(`strong`,{style:{fontSize:`14px`,color:`var(--text-primary)`},children:`Agent Step Limit`}),(0,Z.jsx)(`p`,{className:`hint`,style:{margin:`2px 0 0 0`,fontSize:`12px`},children:`Maximum tool execution steps per turn (10 to 200, default 40). Warns 5 steps before limit and enforces graceful wrap-up on the final step.`})]}),(0,Z.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:`8px`},children:[(0,Z.jsx)(`input`,{type:`range`,min:10,max:200,step:5,value:n,onChange:e=>r?.(parseInt(e.target.value,10)),style:{width:`100px`,accentColor:`var(--accent-color, #10b981)`}}),(0,Z.jsx)(`span`,{style:{fontWeight:600,minWidth:`28px`,textAlign:`center`,color:`var(--text-primary)`},children:n})]})]})}),u?(0,Z.jsxs)(`div`,{className:`form-grid single`,style:{background:`var(--panel-soft)`,padding:`20px`,borderRadius:`8px`,border:`1px solid var(--panel-raised)`},children:[(0,Z.jsx)(`h3`,{style:{margin:`0 0 16px 0`,fontSize:`18px`,color:`var(--interactive-fg)`},children:f?`Edit Subagent: ${m.name}`:`Create New Subagent`}),(0,Z.jsxs)(`div`,{className:`setting-row`,children:[(0,Z.jsx)(`label`,{children:`Name`}),(0,Z.jsx)(`input`,{type:`text`,value:m.name,onChange:e=>h({...m,name:e.target.value}),placeholder:`e.g. code-reviewer`})]}),(0,Z.jsxs)(`div`,{className:`setting-row`,children:[(0,Z.jsx)(`label`,{children:`Description`}),(0,Z.jsx)(`input`,{type:`text`,value:m.description,onChange:e=>h({...m,description:e.target.value}),placeholder:`One line: when should the agent reach for this subagent?`})]}),(0,Z.jsxs)(`div`,{className:`setting-row`,children:[(0,Z.jsx)(`label`,{children:`System prompt`}),(0,Z.jsx)(`textarea`,{value:m.systemPrompt,onChange:e=>h({...m,systemPrompt:e.target.value}),placeholder:`You are a focused code-review subagent. Read the diff and report bugs concisely...`,style:{minHeight:`120px`,resize:`vertical`}})]}),(0,Z.jsxs)(`div`,{className:`setting-row`,children:[(0,Z.jsx)(`label`,{children:`Allowed tools (optional)`}),(0,Z.jsx)(`input`,{type:`text`,value:m.tools,onChange:e=>h({...m,tools:e.target.value}),placeholder:`e.g. read_file, search_code, git_diff (leave blank for the full toolset)`})]}),(0,Z.jsxs)(`div`,{className:`setting-row`,children:[(0,Z.jsx)(`label`,{children:`Model override (optional)`}),(0,Z.jsx)(`input`,{type:`text`,value:m.model,onChange:e=>h({...m,model:e.target.value}),placeholder:`Leave blank to use the active model`})]}),(0,Z.jsxs)(`div`,{className:`setting-row`,children:[(0,Z.jsx)(`label`,{children:`Provider override (optional)`}),(0,Z.jsx)(`input`,{type:`text`,value:m.provider,onChange:e=>h({...m,provider:e.target.value}),placeholder:`e.g. gemini, openai, anthropic — leave blank to use the active provider`})]}),(0,Z.jsxs)(`div`,{className:`setting-row`,children:[(0,Z.jsx)(`label`,{children:`Scope`}),(0,Z.jsx)(`div`,{className:`pill-segmented`,role:`radiogroup`,"aria-label":`Scope`,children:[{id:`workspace`,label:`This workspace`},{id:`global`,label:`Global`}].map(e=>(0,Z.jsx)(`button`,{type:`button`,role:`radio`,"aria-checked":m.scope===e.id,disabled:e.id===`workspace`&&!g,className:`pill-segmented-btn ${m.scope===e.id?`active`:``}`,onClick:()=>h({...m,scope:e.id}),children:e.label},e.id))}),(0,Z.jsxs)(`p`,{className:`hint`,children:[`Workspace agents live in `,(0,Z.jsx)(`code`,{children:`.agents/subagents/`}),` and load only there; global agents are available everywhere.`,g?``:` Open a workspace to use this option.`]})]}),(0,Z.jsxs)(`div`,{style:{display:`flex`,gap:`10px`,marginTop:`16px`,justifyContent:`flex-end`},children:[(0,Z.jsx)(`button`,{className:`btn btn-secondary`,onClick:v,children:`Cancel`}),(0,Z.jsx)(`button`,{className:`btn btn-primary`,onClick:x,children:`Save subagent`})]})]}):(0,Z.jsxs)(`div`,{className:`entity-list`,children:[c&&(0,Z.jsx)(`div`,{style:{color:`var(--danger, #ef4444)`},children:c}),o?(0,Z.jsx)(`div`,{style:{textAlign:`center`,padding:`32px`,color:`var(--text-soft)`},children:`Loading...`}):(0,Z.jsxs)(Z.Fragment,{children:[i.map(e=>(0,Z.jsxs)(`div`,{className:`entity-card`,children:[(0,Z.jsxs)(`div`,{className:`entity-card-header`,children:[(0,Z.jsxs)(`div`,{className:`entity-card-header-left`,children:[(0,Z.jsx)(`strong`,{className:`entity-card-name`,children:e.name}),(0,Z.jsx)(`span`,{className:`entity-card-badge ${tr(e.sourcePath)?`scope-workspace`:`scope-global`}`,children:tr(e.sourcePath)?`Workspace`:`Global`}),(e.provider||e.model)&&(0,Z.jsx)(`span`,{className:`entity-card-badge`,children:[e.provider,e.model].filter(Boolean).join(` / `)})]}),(0,Z.jsxs)(`div`,{className:`entity-card-header-actions`,children:[(0,Z.jsx)(`button`,{className:`btn btn-secondary`,style:{padding:`4px 8px`,fontSize:`12px`},onClick:()=>b(e),children:`Edit`}),(0,Z.jsx)(`button`,{className:`btn btn-danger`,style:{padding:`4px 8px`,fontSize:`12px`},onClick:()=>S(e),children:`Delete`})]})]}),e.description&&(0,Z.jsxs)(`p`,{className:`entity-card-desc`,children:[`"`,e.description,`"`]}),e.tools&&(0,Z.jsxs)(`p`,{className:`entity-card-meta`,children:[`Tools: `,e.tools.join(`, `)]})]},e.sourcePath)),i.length===0&&(0,Z.jsx)(`div`,{className:`entity-empty`,children:`No subagents yet. Click "+ Add Subagent" to create one.`})]})]})]})}var X,Z,Qn,$n,er,tr,nr,rr=t((()=>{j(),X=e(n()),A(),f(),Ct(),Z=r(),{listSubagents:Qn,saveSubagent:$n,deleteSubagent:er}=s,tr=e=>!e.includes(`mint-agents`),nr={name:``,description:``,tools:``,model:``,provider:``,systemPrompt:``,scope:`workspace`}})),ir,ar,or,sr,cr,lr,ur,dr,fr,pr,mr,hr,gr,_r,vr,yr,br,xr=t((()=>{ir=`@pheem49/mint`,ar=`1.18.0`,or=`A native Tauri desktop AI assistant with a Rust backend and React UI.`,sr={"dev:web":`vite --config vite.config.web.ts`,"preview:web":`vite preview --config vite.config.web.ts`,web:`cargo run -p mint-cli -- web`,typecheck:`tsc --noEmit`,"build:web":`vite build --config vite.config.web.ts && cp out/web/index-web.html out/web/index.html`,"dev:desktop":`npm run dev:desktop:ui`,"build:desktop:ui":`vite build`,"build:desktop":`node src/bin/desktop.js build`,"build:desktop:fast":`node src/bin/desktop.js build --fast`,"build:desktop:bundle":`npm run package --`,"build:cli":`cargo build -p mint-cli --release`,"cli:rebuild":`npm run build:cli && node src/bin/index.js`,"cli:dev":`cargo run -p mint-cli --`,"install:cli":`cargo install --path crates/mint-cli --locked`,"build:all":`npm run build:web && npm run build:desktop && npm run build:cli`,tauri:`tauri`,"tauri:dev":`npm run dev --`,"tauri:build":`npm run package --`,package:`node src/bin/desktop.js package`,"rust:cli":`cargo run -p mint-cli --`,"rust:test":`cargo test -p mint-mod-runtime -p mint-core -p mint-cli`,dev:`tauri dev`,build:`npm run build:ui`,preview:`vite preview`,start:`node src/bin/desktop.js start`,"start:release":`npm start -- --release`,launch:`npm start --`,"start:rebuild":`npm start -- --rebuild`,test:`npm run test:launchers && npm run test:interfaces && npm run test:styles && npm run test:device && npm run test:companion && cargo test -p mint-mod-runtime -p mint-core -p mint-cli -p mint-companion-protocol -p mint-companion`,"test:launchers":`node --test src/bin/web.test.js src/bin/index.test.js src/bin/desktop.test.js src/bin/package.test.js src/bin/release-notes.test.js`,"test:interfaces":`vitest run src/renderer/shared/components/extensions/SkillsView.test.tsx src/renderer/shared/components/chat/ChatPanel.test.tsx src/renderer/shared/library/controller.test.ts src/renderer/shared/library/transport.test.ts src/renderer/shared/utils/sessionSources.test.ts src/renderer/shared/components/workspace/ToolSurfacePage.test.tsx src/renderer/shared/components/chat/SlashSuggestions.test.tsx src/renderer/shared/components/chat/ApprovalCard.test.tsx src/renderer/shared/utils/notificationSettings.test.ts src/renderer/shared/components/Settings/NotificationsTab.test.tsx src/renderer/shared/utils/notifications.test.ts src/renderer/shared/utils/contextCompaction.test.tsx src/renderer/shared/platform.test.ts src/renderer/shared/conversation/coordinator.test.ts src/renderer/shared/conversation/lifecycle.test.ts src/renderer/shared/conversation/transport.test.ts src/renderer/shared/conversation/syncView.test.ts src/renderer/shared/utils/cardJson.test.ts src/renderer/shared/utils/agentActivity.test.ts src/renderer/shared/components/extensions/CliSessionsView.test.tsx src/renderer/shared/utils/workspaceListPreferences.test.ts src/renderer/shared/components/Settings/MemoryTab.test.tsx src/renderer/shared/theme/themeManager.test.ts src/renderer/shared/components/ui/SelectField.test.tsx src/renderer/shared/components/chat/VoicePill.test.tsx src/renderer/shared/utils/nativeRecordingSession.test.ts src/renderer/shared/components/chat/GeminiLiveOverlay.test.tsx src/renderer/shared/utils/mcpResults.test.tsx src/renderer/shared/conversation/projectNavigation.test.ts src/renderer/shared/components/workspace/WorkspacePreviewActions.test.tsx src/renderer/shared/utils/workspacePreview.test.ts src/renderer/shared/utils/artifactBrowser.test.ts src/renderer/shared/utils/workspacePane.test.ts src/renderer/shared/utils/workspaceSnapshot.test.ts src/renderer/shared/utils/syntaxHighlight.test.tsx src/renderer/shared/utils/progressCache.test.ts src/renderer/shared/components/chat/ChatMessageItem.test.tsx src/renderer/shared/components/extensions/ModUi.test.tsx src/renderer/shared/utils/pastedText.test.ts src/renderer/shared/components/workspace/BackgroundTerminals.test.tsx src/renderer/shared/utils/workspaceDrag.test.ts src/renderer/shared/components/chat/ArtifactCards.test.tsx`,cli:`node src/bin/index.js`,prepublishOnly:`npm run build:web`,postinstall:`cargo build -p mint-cli --release`,"dev:desktop:ui":`vite`,"build:ui":`npm run build:desktop:ui && npm run build:web`,"test:device":`node --test examples/device-mcp/server.test.mjs`,"dev:companion":`npm run dev --workspace @mint/companion --`,"build:companion":`npm run build --workspace @mint/companion --`,"package:companion":`npm run package --workspace @mint/companion --`,"test:companion":`vitest run --root . apps/mint-companion/src/state.test.ts apps/mint-companion/src/radial-layout.test.ts apps/mint-companion/src/tracking.test.ts apps/mint-companion/src/speech.test.ts`,"typecheck:companion":`npm run typecheck --workspace @mint/companion`,"test:styles":`node --test src/bin/styles.test.js`},cr=[`mint`,`tauri`,`ai`,`assistant`,`desktop`,`cli`,`rust`,`react`,`agent`],lr={type:`git`,url:`git+https://github.com/Pheem49/Mint.git`},ur={url:`https://github.com/Pheem49/Mint/issues`},dr=`https://github.com/Pheem49/Mint#readme`,fr={name:`Pheem49`,email:`killerpheem13@gmail.com`},pr=`commonjs`,mr={mint:`src/bin/index.js`,"mint-web":`src/bin/web.js`},hr={"@fontsource/fira-code":`^5.3.0`,"@fontsource/inter":`^5.3.0`,"@fontsource/kanit":`^5.3.0`,"@fontsource/mali":`^5.3.0`,"@fontsource/mitr":`^5.3.0`,"@fontsource/noto-sans-thai":`^5.3.0`,"@fontsource/outfit":`^5.3.0`,"@fontsource/prompt":`^5.3.0`,"@fontsource/sarabun":`^5.3.0`,"@hugeicons/core-free-icons":`^4.3.5`,"@hugeicons/react":`^1.1.10`,"@lobehub/icons-static-svg":`^1.95.0`,"@radix-ui/react-slot":`^1.4.0`,"@tailwindcss/vite":`^4.3.3`,"@tanstack/react-virtual":`^3.14.14`,"@tauri-apps/api":`^2.0.0`,"@tauri-apps/plugin-dialog":`^2.7.2`,"@tauri-apps/plugin-notification":`^2.3.3`,"@vitejs/plugin-react":`^6.0.1`,"@xterm/addon-fit":`^0.11.0`,"@xterm/xterm":`^6.0.0`,"@xyflow/react":`^12.11.1`,"class-variance-authority":`^0.7.1`,clsx:`^2.1.1`,"lucide-react":`^1.28.0`,luxon:`^3.7.2`,"material-icon-theme":`5.34.0`,mermaid:`^11.17.0`,ogl:`^1.0.11`,"pdfjs-dist":`^6.4.299`,react:`^19.2.5`,"react-dom":`^19.2.5`,"react-markdown":`^10.1.0`,"remark-gfm":`^4.0.1`,"tailwind-merge":`^3.7.0`,tailwindcss:`^4.3.3`,typescript:`^6.0.3`,vite:`^8.0.16`},gr={"@tauri-apps/cli":`^2.0.0`,"@types/luxon":`^3.7.4`,vitest:`^5.0.1`},_r={"gh-pages":`^5.0.0`,"@modelcontextprotocol/sdk":`^1.24.0`,nodemailer:`^9.0.0`,uuid:`^11.1.1`,"brace-expansion":`^5.0.12`,"@hono/node-server":`^2.0.5`,katex:`^0.19.1`},vr=[`apps/mint-companion`],yr=[`src`,`crates`,`scripts`,`examples`,`docs/mods`,`shared-modules`,`out/web`,`Cargo.toml`,`Cargo.lock`,`Release_Note.md`,`slash-commands.json`,`mcp-registry.json`,`README.md`,`LICENSE`,`vite.config.ts`,`vite.config.web.ts`,`tsconfig.json`,`tsconfig.node.json`,`components.json`,`src-tauri/Cargo.toml`,`src-tauri/src`,`src-tauri/build.rs`,`apps/mint-companion/src-tauri/Cargo.toml`,`apps/mint-companion/src-tauri/src`,`apps/mint-companion/src-tauri/build.rs`],br={name:ir,version:ar,description:or,scripts:sr,keywords:cr,repository:lr,bugs:ur,homepage:dr,author:fr,license:`MIT`,type:pr,bin:mr,dependencies:hr,devDependencies:gr,overrides:_r,workspaces:vr,files:yr}})),Sr,Cr=t((()=>{xr(),Sr=br.version}));function wr(){let[e,t]=(0,Q.useState)(`sect-general`),[n,r]=(0,Q.useState)(``),[a,o]=(0,Q.useState)(Pe),[s,l]=(0,Q.useState)(``),[u,f]=(0,Q.useState)(``),{user:m,refreshUser:g}=c(),[_,b]=(0,Q.useState)(``),[S,C]=(0,Q.useState)(``),w=(0,Q.useRef)(!1);(0,Q.useEffect)(()=>{m&&!w.current&&(b(m.name||``),C(m.image||``),w.current=!0)},[m]);let[ee,D]=(0,Q.useState)(``),[O,ne]=(0,Q.useState)(``),[re,ie]=(0,Q.useState)(``),[ae,oe]=(0,Q.useState)(``),[se,ce]=(0,Q.useState)(``),[le,de]=(0,Q.useState)(``),[fe,pe]=(0,Q.useState)(``),[me,ge]=(0,Q.useState)(``),[_e,ve]=(0,Q.useState)(x),{models:ye}=Me(`gemini`,a.apiKey),{models:be}=Me(`anthropic`,a.anthropicApiKey),{models:xe}=Me(`openai`,a.openaiApiKey),{models:Se}=Me(`openrouter`,a.openrouterApiKey),{models:Te}=Me(`deepseek`,a.deepseekApiKey),{models:Ee}=Me(`local_openai`,``,a.localApiBaseUrl),{options:De}=ut(`nanobanana`,a.apiKey),{options:Oe}=ut(`dalle`,a.openaiApiKey),{options:ke}=ut(`replicate`,a.replicateApiKey),{options:Ae}=ut(`stability`,a.stabilityApiKey),{options:A}=ut(`ideogram`,a.ideogramApiKey),{options:Fe}=ut(`bfl`,a.bflApiKey),Ie=Q.useMemo(()=>({nanobanana:De,dalle:Oe,replicate:ke,stability:Ae,ideogram:A,bfl:Fe}),[De,Oe,ke,Ae,A,Fe]),{options:Le}=mt(`veo`,a.apiKey),Re=Q.useMemo(()=>({veo:Le}),[Le]),[ze,j]=(0,Q.useState)(``),[M,Ve]=(0,Q.useState)(!1),N=d();(0,Q.useEffect)(()=>{async function e(){try{let e=null;if(window.settingsApi)e=await window.settingsApi.getSettings();else{let t=await h(`user-settings`);t&&(e=JSON.parse(t))}if(e){let t={...Pe,...Ce(he(je(e)))};o(t),t.geminiModel&&!T.includes(t.geminiModel)&&D(t.geminiModel),t.openaiModel&&!ue.includes(t.openaiModel)&&ne(t.openaiModel),t.openrouterModel&&!te.includes(t.openrouterModel)&&ie(t.openrouterModel),t.deepseekModel&&!k.includes(t.deepseekModel)&&oe(t.deepseekModel),t.anthropicModel&&!we.includes(t.anthropicModel)&&ce(t.anthropicModel),t.hfModel&&!E.includes(t.hfModel)&&de(t.hfModel),t.localModelName&&!Be.includes(t.localModelName)&&pe(t.localModelName),t.ollamaModel&&!x.includes(t.ollamaModel)&&ge(t.ollamaModel),Ne(t)}let t=await h(`name`);t&&l(t);let n=await h(`preferences`);n&&f(n)}catch(e){console.error(`Failed to load settings:`,e)}}e()},[]),(0,Q.useEffect)(()=>{(async()=>{let e=(a.ollamaHost||`http://127.0.0.1:11434`).replace(/\/$/,``);try{let t=await fetch(`${e}/api/tags`);if(t.ok){let e=await t.json();if(e&&Array.isArray(e.models)){let t=e.models.map(e=>e.name);ve(t);return}}}catch(e){console.warn(`Failed to fetch local Ollama models:`,e)}ve(x)})()},[a.ollamaHost]);let He=()=>{let e={...a};return a.geminiModel===`custom`&&(e.geminiModel=ee||`gemini-2.5-flash`),a.openaiModel===`custom`&&(e.openaiModel=O||`gpt-4o`),a.openrouterModel===`custom`&&(e.openrouterModel=re||`openai/gpt-4o-mini`),a.deepseekModel===`custom`&&(e.deepseekModel=ae||`deepseek-v4-flash`),a.anthropicModel===`custom`&&(e.anthropicModel=se||`claude-3-5-sonnet-latest`),a.hfModel===`custom`&&(e.hfModel=le||`meta-llama/Meta-Llama-3-8B-Instruct`),a.localModelName===`custom`&&(e.localModelName=fe||`local-model`),a.ollamaModel===`custom`&&(e.ollamaModel=me||`llama3:latest`),e},Ue=async()=>{let e=He();try{await y(`name`,s),await y(`preferences`,u)}catch(e){console.error(`Failed to save user profile memory:`,e)}try{let e=await v(_,S);g(e)}catch(e){console.error(`Failed to save account profile:`,e)}let t=(e,t)=>{switch(e){case`gemini`:return t.geminiModel;case`openai`:return t.openaiModel;case`openrouter`:return t.openrouterModel;case`deepseek`:return t.deepseekModel;case`anthropic`:return t.anthropicModel;case`huggingface`:return t.hfModel;case`local_openai`:return t.localModelName;case`ollama`:return t.ollamaModel;default:return``}},n=t(a.aiProvider,a),r=t(e.aiProvider,e);if((a.aiProvider!==e.aiProvider||n!==r)&&p(e.aiProvider,r).catch(()=>{}),window.settingsApi)await window.settingsApi.saveSettings(e),Ne(e),window.settingsApi.closeSettings();else try{await y(`user-settings`,JSON.stringify(e)),Ne(e)}catch(e){console.error(`Failed to save user settings:`,e)}},We=async()=>{let e=He();try{await y(`name`,s),await y(`preferences`,u)}catch(e){console.error(`Failed to save user profile memory:`,e)}if(window.settingsApi)await window.settingsApi.saveSettings(e),Ne(e);else try{await y(`user-settings`,JSON.stringify(e)),Ne(e)}catch(e){console.error(`Failed to save user settings:`,e)}},Ge=async()=>{if(confirm(`Reset all settings to default?`)){o(Pe),D(``),ne(``),ce(``),de(``),pe(``),ge(``),l(``),f(``);try{await y(`name`,``),await y(`preferences`,``)}catch(e){console.error(`Failed to reset profile memory:`,e)}Ne(Pe)}},Ke=()=>{window.settingsApi?.closeSettings()},qe=(e,t)=>{e.preventDefault(),window.settingsApi?.openExternal?window.settingsApi.openExternal(t):window.open(t,`_blank`,`noopener,noreferrer`)},Je=async e=>{if(!N&&e===`discord`)alert(`Discord Rich Presence requires the desktop app.`);else if(e===`discord`)try{await window.api.executeProactiveAction({type:`plugin`,pluginName:`discord`,target:``}),alert(`Discord Rich Presence updated.`)}catch(e){alert(String(e))}else alert(`Configure ${e} credentials, then invoke the plugin from Mint chat.`)},Ye=async()=>{if(!N)j(`Desktop updates are only available in the Tauri app.`);else try{let e=await window.settingsApi.checkForUpdates();Ve(!!e.available),j(e.available?`Mint ${e.version} is available.`:`Mint is up to date.`)}catch(e){j(String(e))}},Xe=async()=>{if(!N)j(`Desktop updates are only available in the Tauri app.`);else if(confirm(`Install the signed Mint update now?`))try{j(await window.settingsApi.installAvailableUpdate()),Ve(!1)}catch(e){j(String(e))}},Ze=(e,t)=>{o(n=>{let r={...n,[e]:t};return Ne(r),e===`showDesktopWidget`&&window.settingsApi&&window.settingsApi.saveSettings(r).catch(e=>{console.error(`Failed to save Assistant Presence setting:`,e)}),r})},Qe=e=>{o(t=>{let n={...t,...e};return Ne(n),window.settingsApi&&window.settingsApi.saveSettings(n).catch(e=>{console.error(`Failed to save live theme settings:`,e)}),n})};return(0,$.jsxs)(`div`,{className:`settings-container`,children:[(0,$.jsxs)(`header`,{className:`settings-header drag-region`,children:[(0,$.jsxs)(`div`,{className:`header-left`,children:[(0,$.jsx)(`span`,{className:`settings-icon`,children:(0,$.jsxs)(`svg`,{width:`16`,height:`16`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2.5`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,$.jsx)(`circle`,{cx:`12`,cy:`12`,r:`3`}),(0,$.jsx)(`path`,{d:`M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 1 1-2.83 2.83l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-4 0v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 1 1-2.83-2.83l.06.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1 0-4h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 1 1 2.83-2.83l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 4 0v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 1 1 2.83 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 0 4h-.09a1.65 1.65 0 0 0-1.51 1z`})]})}),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`h1`,{children:`Settings`}),(0,$.jsx)(`p`,{children:N?`Configure Mint assistant behavior and integrations.`:`Web settings through Local API: ${i()}`})]})]}),(0,$.jsx)(`button`,{className:`close-btn`,onClick:Ke,"aria-label":`Close`,children:(0,$.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`16`,height:`16`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,$.jsx)(`line`,{x1:`18`,y1:`6`,x2:`6`,y2:`18`}),(0,$.jsx)(`line`,{x1:`6`,y1:`6`,x2:`18`,y2:`18`})]})})]}),(0,$.jsxs)(`main`,{className:`settings-body`,children:[(0,$.jsxs)(`nav`,{className:`settings-sidebar`,"aria-label":`Settings sections`,children:[(0,$.jsxs)(`div`,{className:`settings-nav-search`,children:[(0,$.jsxs)(`svg`,{width:`14`,height:`14`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2.5`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,children:[(0,$.jsx)(`circle`,{cx:`11`,cy:`11`,r:`8`}),(0,$.jsx)(`line`,{x1:`21`,y1:`21`,x2:`16.65`,y2:`16.65`})]}),(0,$.jsx)(`input`,{type:`text`,placeholder:`Search`,value:n,onChange:e=>r(e.target.value),"aria-label":`Search settings`})]}),(0,$.jsx)(`div`,{className:`settings-nav-scroll`,children:Er.map(r=>{let i=Tr.filter(e=>e.group===r&&e.label.toLowerCase().includes(n.trim().toLowerCase()));return i.length?(0,$.jsxs)(`div`,{className:`settings-nav-group`,children:[(0,$.jsx)(`p`,{className:`settings-nav-group-label`,children:r}),i.map(n=>(0,$.jsxs)(`button`,{className:`tab-btn ${e===n.id?`active`:``}`,onClick:()=>t(n.id),children:[(0,$.jsx)(`span`,{style:{display:`inline-flex`,alignItems:`center`},children:n.icon}),(0,$.jsx)(`strong`,{children:n.label})]},n.id))]},r):null})})]}),(0,$.jsxs)(`div`,{className:`settings-content`,children:[!N&&(0,$.jsxs)(`div`,{className:`web-safe-notice`,children:[(0,$.jsx)(`strong`,{children:`Web mode`}),(0,$.jsx)(`span`,{children:`Desktop-only controls are hidden or disabled here. Settings are saved through the Local API server.`})]}),e===`sect-general`&&(0,$.jsx)(un,{config:a,updateField:Ze,customGemini:ee,setCustomGemini:D,customOpenAI:O,setCustomOpenAI:ne,customOpenRouter:re,setCustomOpenRouter:ie,customDeepSeek:ae,setCustomDeepSeek:oe,customAnthropic:se,setCustomAnthropic:ce,customHF:le,setCustomHF:de,customLocal:fe,setCustomLocal:pe,customOllama:me,setCustomOllama:ge,dynamicOllamaModels:_e,dynamicGeminiModels:ye,dynamicAnthropicModels:be,dynamicOpenAIModels:xe,dynamicOpenRouterModels:Se,dynamicDeepSeekModels:Te,dynamicLocalModels:Ee,dynamicImageModels:Ie,dynamicVideoModels:Re,updateAvailable:M,updateMessage:ze,handleCheckUpdates:Ye,handleInstallUpdate:Xe,isDesktopApp:N,onSaveWithoutClosing:We}),e===`sect-notifications`&&(0,$.jsx)(vt,{settings:a.notificationSettings,onChange:e=>Ze(`notificationSettings`,e)}),e===`sect-profile`&&(0,$.jsx)(yn,{name:_,setName:b,imageUrl:S,setImageUrl:C}),e===`sect-memory`&&(0,$.jsx)(Cn,{userName:s,setUserName:l,userPreferences:u,setUserPreferences:f}),e===`sect-audio`&&(0,$.jsx)(An,{config:a,updateField:Ze,apiKey:a.apiKey}),e===`sect-automation`&&(0,$.jsx)(Nn,{config:a,updateField:Ze}),e===`sect-theme`&&(0,$.jsx)(zn,{config:a,updateField:Ze,updateFields:Qe}),e===`sect-plugins`&&(0,$.jsx)(Un,{config:a,updateField:Ze,updateFields:Qe,handleConnectPlugin:Je}),e===`sect-agents`&&(0,$.jsx)(Xn,{config:a,updateField:Ze,dynamicOllamaModels:_e,providerModels:{gemini:ye,anthropic:be,openai:xe,openrouter:Se,deepseek:Te,local_openai:Ee}})]})]}),(0,$.jsxs)(`footer`,{className:`settings-footer`,children:[(0,$.jsxs)(`div`,{className:`settings-footer-meta`,children:[(0,$.jsxs)(`span`,{className:`settings-footer-version`,children:[`Version: `,Sr]}),(0,$.jsxs)(`div`,{className:`settings-footer-links`,children:[(0,$.jsxs)(`a`,{href:`https://github.com/Pheem49/Mint`,target:`_blank`,rel:`noopener noreferrer`,onClick:e=>qe(e,`https://github.com/Pheem49/Mint`),className:`settings-footer-link`,title:`https://github.com/Pheem49/Mint`,children:[`GitHub`,(0,$.jsxs)(`svg`,{width:`11`,height:`11`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,children:[(0,$.jsx)(`path`,{d:`M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6`}),(0,$.jsx)(`polyline`,{points:`15 3 21 3 21 9`}),(0,$.jsx)(`line`,{x1:`10`,y1:`14`,x2:`21`,y2:`3`})]})]}),(0,$.jsx)(`span`,{className:`settings-footer-separator`,children:`•`}),(0,$.jsxs)(`a`,{href:`https://mint.aemeth.xyz/`,target:`_blank`,rel:`noopener noreferrer`,onClick:e=>qe(e,`https://mint.aemeth.xyz/`),className:`settings-footer-link`,title:`https://mint.aemeth.xyz/`,children:[`Website`,(0,$.jsxs)(`svg`,{width:`11`,height:`11`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,children:[(0,$.jsx)(`path`,{d:`M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6`}),(0,$.jsx)(`polyline`,{points:`15 3 21 3 21 9`}),(0,$.jsx)(`line`,{x1:`10`,y1:`14`,x2:`21`,y2:`3`})]})]})]})]}),(0,$.jsxs)(`div`,{className:`footer-actions`,children:[(0,$.jsxs)(`button`,{type:`button`,className:`btn-secondary`,onClick:Ge,style:{display:`inline-flex`,alignItems:`center`,gap:`6px`},children:[(0,$.jsxs)(`svg`,{width:`14`,height:`14`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2.5`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,$.jsx)(`polyline`,{points:`1 4 1 10 7 10`}),(0,$.jsx)(`path`,{d:`M3.51 15a9 9 0 1 0 2.13-9.36L1 10`})]}),`Reset Defaults`]}),(0,$.jsxs)(`button`,{type:`button`,className:`btn-primary`,onClick:e=>{e.preventDefault(),Ue()},style:{display:`inline-flex`,alignItems:`center`,gap:`6px`},children:[(0,$.jsxs)(`svg`,{width:`14`,height:`14`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2.5`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,$.jsx)(`path`,{d:`M19 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11l5 5v11a2 2 0 0 1-2 2z`}),(0,$.jsx)(`polyline`,{points:`17 21 17 13 7 13 7 21`}),(0,$.jsx)(`polyline`,{points:`7 3 7 8 15 8`})]}),`Save Settings`]})]})]})]})}var Q,$,Tr,Er,Dr=t((()=>{o(),Q=e(n()),tt(),nt(),rt(),it(),at(),ot(),st(),ct(),f(),_(),b(),ke(),ft(),gt(),bt(),vn(),xn(),Tn(),Mn(),Pn(),Vn(),Yn(),rr(),A(),Oe(),$=r(),be(),Cr(),Tr=[{id:`sect-general`,label:`General`,group:`Workspace`,icon:(0,$.jsxs)(`svg`,{width:`14`,height:`14`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2.5`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,$.jsx)(`circle`,{cx:`12`,cy:`12`,r:`3`}),(0,$.jsx)(`path`,{d:`M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 1 1-2.83 2.83l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-4 0v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 1 1-2.83-2.83l.06.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1 0-4h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 1 1 2.83-2.83l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 4 0v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 1 1 2.83 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 0 4h-.09a1.65 1.65 0 0 0-1.51 1z`})]})},{id:`sect-notifications`,label:`Notifications`,group:`Workspace`,icon:(0,$.jsx)(l,{size:14,"aria-hidden":`true`})},{id:`sect-profile`,label:`Profile`,group:`Account`,icon:(0,$.jsxs)(`svg`,{width:`14`,height:`14`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2.5`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,$.jsx)(`path`,{d:`M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2`}),(0,$.jsx)(`circle`,{cx:`12`,cy:`7`,r:`4`})]})},{id:`sect-automation`,label:`Automation`,group:`Workspace`,icon:(0,$.jsxs)(`svg`,{width:`14`,height:`14`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2.5`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,$.jsx)(`rect`,{x:`2`,y:`3`,width:`20`,height:`14`,rx:`2`,ry:`2`}),(0,$.jsx)(`line`,{x1:`8`,y1:`21`,x2:`16`,y2:`21`}),(0,$.jsx)(`line`,{x1:`12`,y1:`17`,x2:`12`,y2:`21`})]})},{id:`sect-theme`,label:`Theme & UI`,group:`Appearance`,icon:(0,$.jsxs)(`svg`,{width:`14`,height:`14`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2.5`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,$.jsx)(`circle`,{cx:`12`,cy:`12`,r:`5`}),(0,$.jsx)(`line`,{x1:`12`,y1:`1`,x2:`12`,y2:`3`}),(0,$.jsx)(`line`,{x1:`12`,y1:`21`,x2:`12`,y2:`23`}),(0,$.jsx)(`line`,{x1:`4.22`,y1:`4.22`,x2:`5.64`,y2:`5.64`}),(0,$.jsx)(`line`,{x1:`18.36`,y1:`18.36`,x2:`19.78`,y2:`19.78`}),(0,$.jsx)(`line`,{x1:`1`,y1:`12`,x2:`3`,y2:`12`}),(0,$.jsx)(`line`,{x1:`21`,y1:`12`,x2:`23`,y2:`12`}),(0,$.jsx)(`line`,{x1:`4.22`,y1:`19.78`,x2:`5.64`,y2:`18.36`}),(0,$.jsx)(`line`,{x1:`18.36`,y1:`5.64`,x2:`19.78`,y2:`4.22`})]})},{id:`sect-memory`,label:`Personal Memory`,group:`Account`,icon:(0,$.jsx)(`svg`,{width:`14`,height:`14`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2.5`,strokeLinecap:`round`,strokeLinejoin:`round`,children:(0,$.jsx)(`path`,{d:`M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z`})})},{id:`sect-audio`,label:`Audio & Voice`,group:`Appearance`,icon:(0,$.jsxs)(`svg`,{width:`14`,height:`14`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2.5`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,$.jsx)(`polygon`,{points:`11 5 6 9 2 9 2 15 6 15 11 19 11 5`}),(0,$.jsx)(`path`,{d:`M19.07 4.93a10 10 0 0 1 0 14.14M15.54 8.46a5 5 0 0 1 0 7.07`})]})},{id:`sect-plugins`,label:`Plugins`,group:`Advanced`,icon:(0,$.jsxs)(`svg`,{width:`14`,height:`14`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2.5`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,$.jsx)(`polygon`,{points:`12 2 2 7 12 12 22 7 12 2`}),(0,$.jsx)(`polyline`,{points:`2 17 12 22 22 17`}),(0,$.jsx)(`polyline`,{points:`2 12 12 17 22 12`})]})},{id:`sect-agents`,label:`Multi-Agent (Beta)`,group:`Workspace`,icon:(0,$.jsxs)(`svg`,{width:`14`,height:`14`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2.5`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,$.jsx)(`path`,{d:`M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2`}),(0,$.jsx)(`circle`,{cx:`9`,cy:`7`,r:`4`}),(0,$.jsx)(`path`,{d:`M23 21v-2a4 4 0 0 0-3-3.87`}),(0,$.jsx)(`path`,{d:`M16 3.13a4 4 0 0 1 0 7.75`})]})}],Er=[`Account`,`Workspace`,`Appearance`,`Advanced`]})),Or=t((()=>{et(),Dr()}));A(),Oe(),Or();export{we as ANTHROPIC_MODELS,k as DEEPSEEK_MODELS,Pe as DEFAULT_CONFIG,T as GEMINI_MODELS,E as HF_MODELS,Be as LOCAL_MODELS,x as OLLAMA_MODELS,ue as OPENAI_MODELS,te as OPENROUTER_MODELS,wr as default};
|