@pheem49/mint 1.15.0 → 1.17.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Cargo.lock +1012 -69
- package/Cargo.toml +5 -2
- package/LICENSE +21 -654
- package/README.md +92 -817
- package/Release_Note.md +71 -579
- package/apps/mint-companion/src-tauri/Cargo.toml +20 -0
- package/apps/mint-companion/src-tauri/build.rs +3 -0
- package/apps/mint-companion/src-tauri/src/compact.rs +69 -0
- package/apps/mint-companion/src-tauri/src/main.rs +675 -0
- package/apps/mint-companion/tsconfig.json +20 -0
- package/apps/mint-companion/vite.config.ts +4 -0
- package/components.json +19 -0
- package/crates/mint-cli/Cargo.toml +6 -0
- package/crates/mint-cli/src/agent/live_status.rs +230 -41
- package/crates/mint-cli/src/agent.rs +476 -108
- package/crates/mint-cli/src/commands/agent.rs +294 -86
- package/crates/mint-cli/src/commands/browser.rs +127 -0
- package/crates/mint-cli/src/commands/config.rs +14 -1
- package/crates/mint-cli/src/commands/integrations.rs +7 -0
- package/crates/mint-cli/src/commands/knowledge.rs +28 -34
- package/crates/mint-cli/src/commands/mod.rs +59 -1
- package/crates/mint-cli/src/commands/tailnet_web.rs +2 -7
- package/crates/mint-cli/src/companion_navigation.rs +268 -0
- package/crates/mint-cli/src/image.rs +31 -33
- package/crates/mint-cli/src/interactive/chat_tui.rs +4977 -864
- package/crates/mint-cli/src/interactive/command_ui.rs +39 -0
- package/crates/mint-cli/src/interactive/input_box.rs +56 -6
- package/crates/mint-cli/src/interactive/slash_commands.rs +321 -61
- package/crates/mint-cli/src/interactive/tool_activity.rs +667 -0
- package/crates/mint-cli/src/interactive.rs +93 -37
- package/crates/mint-cli/src/main.rs +36 -9
- package/crates/mint-cli/src/mcp.rs +5 -0
- package/crates/mint-cli/src/mod_host.rs +6 -0
- package/crates/mint-cli/src/mods_cli.rs +62 -0
- package/crates/mint-cli/src/mods_ui.rs +187 -0
- package/crates/mint-cli/src/onboard.rs +3492 -1360
- package/crates/mint-cli/src/terminal_theme.rs +3 -1
- package/crates/mint-cli/src/updater.rs +56 -2
- package/crates/mint-cli/tests/library_intake.rs +77 -0
- package/crates/mint-cli/tests/mods_testing.rs +137 -0
- package/crates/mint-companion-protocol/Cargo.toml +10 -0
- package/crates/mint-companion-protocol/src/lib.rs +276 -0
- package/crates/mint-core/Cargo.toml +6 -3
- package/crates/mint-core/build.rs +26 -0
- package/crates/mint-core/src/agent/chat.rs +406 -39
- package/crates/mint-core/src/agent/code_tools.rs +15 -0
- package/crates/mint-core/src/agent/memory/sources.rs +240 -0
- package/crates/mint-core/src/agent/memory.rs +220 -19
- package/crates/mint-core/src/agent/safety.rs +56 -4
- package/crates/mint-core/src/agent/skill_inventory.rs +327 -0
- package/crates/mint-core/src/agent/skills.rs +438 -90
- package/crates/mint-core/src/agent.rs +1 -0
- package/crates/mint-core/src/api_server/routes/auth.rs +1 -4
- package/crates/mint-core/src/api_server/routes/background_jobs.rs +310 -0
- package/crates/mint-core/src/api_server/routes/chat.rs +245 -214
- package/crates/mint-core/src/api_server/routes/html_preview.rs +77 -0
- package/crates/mint-core/src/api_server/routes/library.rs +97 -0
- package/crates/mint-core/src/api_server/routes/media_gen.rs +10 -57
- package/crates/mint-core/src/api_server/routes/misc.rs +220 -107
- package/crates/mint-core/src/api_server/routes/mod.rs +6 -0
- package/crates/mint-core/src/api_server/routes/mods.rs +31 -0
- package/crates/mint-core/src/api_server/routes/profile_oauth.rs +43 -26
- package/crates/mint-core/src/api_server/routes/sessions.rs +127 -69
- package/crates/mint-core/src/api_server/routes/skills_subagents.rs +16 -42
- package/crates/mint-core/src/api_server/routes/slash.rs +50 -1
- package/crates/mint-core/src/api_server/routes/sources.rs +101 -0
- package/crates/mint-core/src/api_server/routes/status_health.rs +18 -8
- package/crates/mint-core/src/api_server.rs +327 -72
- package/crates/mint-core/src/avatar_bridge.rs +15 -3
- package/crates/mint-core/src/browser/cdp.rs +82 -26
- package/crates/mint-core/src/browser/lifecycle.rs +143 -43
- package/crates/mint-core/src/browser/mod.rs +5 -4
- package/crates/mint-core/src/browser/navigate.rs +82 -9
- package/crates/mint-core/src/browser/runtime.rs +284 -0
- package/crates/mint-core/src/browser/session.rs +315 -7
- package/crates/mint-core/src/browser/workflow.rs +386 -0
- package/crates/mint-core/src/companion/navigation.rs +115 -0
- package/crates/mint-core/src/companion.rs +824 -0
- package/crates/mint-core/src/cron/scheduler.rs +34 -2
- package/crates/mint-core/src/integrations/channels.rs +87 -345
- package/crates/mint-core/src/integrations/mcp.rs +397 -50
- package/crates/mint-core/src/integrations/mcp_calls.rs +823 -0
- package/crates/mint-core/src/integrations/mcp_catalog.rs +267 -0
- package/crates/mint-core/src/integrations/mcp_device.rs +319 -0
- package/crates/mint-core/src/integrations/mcp_result.rs +401 -0
- package/crates/mint-core/src/integrations/webhooks.rs +539 -0
- package/crates/mint-core/src/integrations.rs +2 -0
- package/crates/mint-core/src/lib.rs +95 -32
- package/crates/mint-core/src/media/gemini_live.rs +134 -14
- package/crates/mint-core/src/media/image_models.rs +3 -27
- package/crates/mint-core/src/media/image_proxy.rs +563 -0
- package/crates/mint-core/src/media/image_workflow.rs +216 -0
- package/crates/mint-core/src/media/library/intake.rs +144 -0
- package/crates/mint-core/src/media/library/migration.rs +56 -0
- package/crates/mint-core/src/media/library/removal.rs +55 -0
- package/crates/mint-core/src/media/library/tests.rs +730 -0
- package/crates/mint-core/src/media/library/thumbnails.rs +72 -0
- package/crates/mint-core/src/media/library.rs +545 -0
- package/crates/mint-core/src/media/model_catalog.rs +375 -0
- package/crates/mint-core/src/media/pictures.rs +79 -222
- package/crates/mint-core/src/media/tool_images.rs +196 -0
- package/crates/mint-core/src/media/tts/playback.rs +609 -0
- package/crates/mint-core/src/media/tts.rs +1 -0
- package/crates/mint-core/src/media/video_models.rs +3 -22
- package/crates/mint-core/src/media.rs +5 -0
- package/crates/mint-core/src/mods/manager.rs +1124 -0
- package/crates/mint-core/src/mods/mod.rs +569 -0
- package/crates/mint-core/src/mods/operations.rs +204 -0
- package/crates/mint-core/src/mods/session.rs +146 -0
- package/crates/mint-core/src/mods/slash.rs +59 -0
- package/crates/mint-core/src/mods/telemetry.rs +306 -0
- package/crates/mint-core/src/orchestration/approvals.rs +344 -0
- package/crates/mint-core/src/orchestration/context_render.rs +553 -32
- package/crates/mint-core/src/orchestration/decision_parsing.rs +5 -23
- package/crates/mint-core/src/orchestration/diagnostics.rs +307 -0
- package/crates/mint-core/src/orchestration/image_regressions.rs +379 -0
- package/crates/mint-core/src/orchestration/loop_guard.rs +334 -0
- package/crates/mint-core/src/orchestration/mcp_review.rs +153 -0
- package/crates/mint-core/src/orchestration/memory_skill.rs +104 -32
- package/crates/mint-core/src/orchestration/mod.rs +3194 -755
- package/crates/mint-core/src/orchestration/mod_authoring_regressions.rs +209 -0
- package/crates/mint-core/src/orchestration/progress_clock.rs +80 -0
- package/crates/mint-core/src/orchestration/reliability.rs +541 -0
- package/crates/mint-core/src/orchestration/repeated_failures.rs +124 -0
- package/crates/mint-core/src/orchestration/review_regressions.rs +595 -0
- package/crates/mint-core/src/orchestration/run_control.rs +196 -0
- package/crates/mint-core/src/orchestration/tools/files.rs +191 -16
- package/crates/mint-core/src/orchestration/tools/media.rs +37 -41
- package/crates/mint-core/src/orchestration/tools/misc.rs +3 -2
- package/crates/mint-core/src/orchestration/tools/mod.rs +2 -0
- package/crates/mint-core/src/orchestration/tools/mods.rs +161 -0
- package/crates/mint-core/src/orchestration/tools/plugins_mcp.rs +321 -74
- package/crates/mint-core/src/orchestration/tools/project.rs +1 -1
- package/crates/mint-core/src/orchestration/tools/shell.rs +124 -7
- package/crates/mint-core/src/orchestration/tools/web.rs +5 -1
- package/crates/mint-core/src/orchestration/trajectory_schema.rs +353 -0
- package/crates/mint-core/src/orchestration/truncation.rs +211 -0
- package/crates/mint-core/src/orchestration/verification.rs +36 -6
- package/crates/mint-core/src/orchestration/workspace_helpers.rs +57 -23
- package/crates/mint-core/src/prompts/agent.rs +47 -41
- package/crates/mint-core/src/prompts/tool_catalog.rs +158 -38
- package/crates/mint-core/src/search/knowledge.rs +7 -1
- package/crates/mint-core/src/search/linked_folders/index.rs +177 -13
- package/crates/mint-core/src/search/linked_folders.rs +83 -2
- package/crates/mint-core/src/search/web_search.rs +44 -3
- package/crates/mint-core/src/slash/catalog.rs +1 -1
- package/crates/mint-core/src/slash/mod.rs +638 -12
- package/crates/mint-core/src/slash/mods.rs +155 -0
- 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 +1197 -95
- package/crates/mint-core/src/system/config.rs +97 -13
- package/crates/mint-core/src/system/html_preview.rs +398 -0
- package/crates/mint-core/src/system/mint_web.rs +185 -0
- package/crates/mint-core/src/system/release_notes.rs +18 -0
- package/crates/mint-core/src/system/shell.rs +200 -16
- package/crates/mint-core/src/system/workspace.rs +276 -8
- package/crates/mint-core/src/system/workspace_history.rs +604 -0
- package/crates/mint-core/src/system.rs +4 -0
- package/crates/mint-core/tests/background_retention.rs +34 -0
- package/crates/mint-core/tests/background_shutdown.rs +24 -0
- package/crates/mint-core/tests/library_http.rs +209 -0
- package/crates/mint-core/tests/mcp_contract.rs +283 -0
- package/crates/mint-core/tests/mcp_stdio.rs +11 -10
- package/crates/mint-core/tests/media_model_catalog_http.rs +403 -0
- package/crates/mint-core/tests/memory_persistence.rs +27 -0
- package/crates/mint-core/tests/mods_http.rs +215 -0
- package/crates/mint-core/tests/terminal_shutdown.rs +109 -0
- package/crates/mint-mod-runtime/Cargo.toml +18 -0
- package/crates/mint-mod-runtime/src/lib.rs +507 -0
- package/crates/mint-mod-runtime/src/sdk.js +56 -0
- package/crates/mint-mod-runtime/src/test_sdk.js +32 -0
- package/crates/mint-mod-runtime/src/testing.rs +94 -0
- package/crates/mint-mod-runtime/tests/runtime.rs +156 -0
- package/docs/mods/AUTHORING.md +61 -0
- package/docs/mods/README.md +139 -0
- package/docs/mods/TESTING.md +56 -0
- package/docs/mods/mint-mods.d.ts +66 -0
- package/examples/device-mcp/README.md +22 -0
- package/examples/device-mcp/contract.md +49 -0
- package/examples/device-mcp/mock-device.mjs +66 -0
- package/examples/device-mcp/server.mjs +48 -0
- package/examples/device-mcp/server.test.mjs +78 -0
- package/examples/mods/task-checklist/README.md +1 -0
- package/examples/mods/task-checklist/main.ts +17 -0
- package/examples/mods/task-checklist/manifest.json +1 -0
- package/examples/mods/task-checklist/tests/checklist.test.ts +15 -0
- package/examples/mods/token-meter/README.md +1 -0
- package/examples/mods/token-meter/main.ts +8 -0
- package/examples/mods/token-meter/manifest.json +1 -0
- package/examples/mods/tool-guard/README.md +1 -0
- package/examples/mods/tool-guard/main.ts +9 -0
- package/examples/mods/tool-guard/manifest.json +1 -0
- package/out/web/assets/ArtifactPreviewPanel-DAT_Y7i0.css +1 -0
- package/out/web/assets/ArtifactPreviewPanel-S0dPfYFx.js +2 -0
- package/out/web/assets/CalculationCard-CRjP3E1j.js +1 -0
- package/out/web/assets/CliSessionsView-C3Br2v5Y.css +1 -0
- package/out/web/assets/CliSessionsView-MI8kXMAb.js +1 -0
- package/out/web/assets/CodeReviewPage-CUJceQme.css +1 -0
- package/out/web/assets/CodeReviewPage-VCUgPla_.js +2 -0
- package/out/web/assets/CommandPalette-BD8SlTE5.js +1 -0
- package/out/web/assets/ImageGenCard-BCXxkVJX.js +1 -0
- package/out/web/assets/ImageSearchCard-N3yQOr8Z.js +1 -0
- package/out/web/assets/ImageStudioPanel-BP7N4rLr.js +1 -0
- package/out/web/assets/LibraryPage-DAxUTAg7.css +1 -0
- package/out/web/assets/LibraryPage-WlviRdR8.js +2 -0
- package/out/web/assets/LinkedFoldersView-CKRgroWK.js +1 -0
- package/out/web/assets/McpRegistryPicker-CoS83vtc.js +1 -0
- package/out/web/assets/McpServersView-D3wHnuHg.js +1 -0
- package/out/web/assets/MermaidCard-NqrHdyJW.js +2 -0
- package/out/web/assets/MintDashboard-B2DJsDDO.css +1 -0
- package/out/web/assets/MintDashboard-COw_xol7.js +63 -0
- package/out/web/assets/PluginsView-jBYmcKh4.js +1 -0
- package/out/web/assets/RewindModal-DempuDod.js +1 -0
- package/out/web/assets/ScheduledTasksView-5uw9-V9H.js +1 -0
- package/out/web/assets/SelectField-DXBQtrUK.js +1 -0
- package/out/web/assets/SelectField-lFEkkWCU.css +1 -0
- package/out/web/assets/SettingsWindow-2YP3yj7s.js +4 -0
- package/out/web/assets/SettingsWindow-Dz8LQVgD.css +1 -0
- package/out/web/assets/SkillsView-C-gp9J7m.js +2 -0
- package/out/web/assets/StockCard-BDMCe7mx.js +1 -0
- package/out/web/assets/ToolSurfacePage-B0J_q0Jl.js +38 -0
- package/out/web/assets/ToolSurfacePage-CRIQ1owD.css +1 -0
- package/out/web/assets/UiFeatureCard-6BwxTOCe.js +1 -0
- package/out/web/assets/UiGridCard-DvZcLNxb.js +1 -0
- package/out/web/assets/UiMockupWidget-DD73QWg1.js +1 -0
- package/out/web/assets/VeoStudioPanel-DfsOJKv0.js +4 -0
- package/out/web/assets/WeatherCard-CPucIfq8.js +1 -0
- package/out/web/assets/WorkspacePanel-BfHKkulU.js +1 -0
- package/out/web/assets/WorkspacePdfPreview-Dx_lkjNu.js +2 -0
- package/out/web/assets/abnfDiagram-VCTEODGH-BOo3Ckng.js +1 -0
- package/out/web/assets/architecture-7GRP2DOG-ZOwheW3n.js +1 -0
- package/out/web/assets/architectureDiagram-5GKGNRK7-DC2FDzVd.js +36 -0
- package/out/web/assets/blockDiagram-I7D4REHJ-BrKFWdAH.js +129 -0
- package/out/web/assets/c4Diagram-7LVT6UL2-BHTHK1Yd.js +38 -0
- package/out/web/assets/chunk-2Q5K7J3B-D2JLPQzF.js +1 -0
- package/out/web/assets/chunk-4HAMMTFA-BYFkZwNj.js +62 -0
- package/out/web/assets/chunk-5VM5RSS4-BZ2oBPYQ.js +15 -0
- package/out/web/assets/chunk-75Z2AOVW-BSKfSKSA.js +2 -0
- package/out/web/assets/chunk-DU6HZSFF-vIhsiW6n.js +128 -0
- package/out/web/assets/chunk-F27PBJKO-BlYpW9xq.js +1 -0
- package/out/web/assets/chunk-FOHPRMQF-JXEeeJ9r.js +161 -0
- package/out/web/assets/chunk-GMAD6QVW-BIBz_Ug5.js +72 -0
- package/out/web/assets/chunk-GVQU2GXP-NPSHxeqC.js +1 -0
- package/out/web/assets/chunk-IMKFNOWR-YlJK8_Fp.js +231 -0
- package/out/web/assets/chunk-JWPE2WC7-BeEMUFDw.js +1 -0
- package/out/web/assets/chunk-L3NEJ4N5-DMYi4-af.js +1 -0
- package/out/web/assets/chunk-OSK3NFVY-Begd3-jA.js +10 -0
- package/out/web/assets/chunk-P2QGCYS3-D1I4xFHN.js +1 -0
- package/out/web/assets/chunk-POPQ4Y6H-CafZZzNE.js +1 -0
- package/out/web/assets/chunk-PWAF6VOD-Dwh6_Lnt.js +1 -0
- package/out/web/assets/chunk-SHT3W25Y-B0XrCSEb.js +168 -0
- package/out/web/assets/chunk-SVP7TREG-CxLsddxC.js +88 -0
- package/out/web/assets/chunk-TICWLB2K-y156QInb.js +206 -0
- package/out/web/assets/chunk-XXDRQBXY-B9YlhOkE.js +1 -0
- package/out/web/assets/chunk-Y2CYZVJY-BxCWjNVG.js +1 -0
- package/out/web/assets/classDiagram-ZZMXUADV-BgJ5WtSp.js +1 -0
- package/out/web/assets/classDiagram-v2-VYDZK3BY-BgJ5WtSp.js +1 -0
- package/out/web/assets/config-CvIO5hkn.js +2 -0
- package/out/web/assets/config-DqXJXeZM.css +1 -0
- package/out/web/assets/core-Mi3s5D4_.js +1 -0
- package/out/web/assets/cose-bilkent-JH36ORCC-qlna31ty.js +1 -0
- package/out/web/assets/cynefin-OW5HDTMX-SMVvrLf-.js +1 -0
- package/out/web/assets/cynefinDiagram-5FMLGOSQ-rZznN24T.js +62 -0
- package/out/web/assets/cytoscape.esm-DWtAUG0r.js +321 -0
- package/out/web/assets/dagre-CnWJJM5f.js +1 -0
- package/out/web/assets/dagre-GXQ25YYZ-BOToydFu.js +4 -0
- package/out/web/assets/diagram-S7CK7UJ4-TMVaGQEJ.js +30 -0
- package/out/web/assets/diagram-UQ7AKVKN-C2JK-GP2.js +41 -0
- package/out/web/assets/diagram-VSXAHHWV-Cw8VSi2K.js +3 -0
- package/out/web/assets/diagram-VX7I27RA-DXp4fKk9.js +24 -0
- package/out/web/assets/diagram-Z3DM3KII-CzSicYiW.js +24 -0
- package/out/web/assets/dist-9ISJ7r-g.js +1 -0
- package/out/web/assets/dist-js-BV3mI7uw.js +1 -0
- package/out/web/assets/ebnfDiagram-PWID7BFC-Dqj-zqPu.js +1 -0
- package/out/web/assets/erDiagram-RLTQ6QDP-DZwFZAuD.js +99 -0
- package/out/web/assets/event-D7D-EBy9.js +1 -0
- package/out/web/assets/eventmodeling-NTZA5JFV-C0O-Lvgp.js +1 -0
- package/out/web/assets/flowDiagram-HODETNUW-uqCHJond.js +1 -0
- package/out/web/assets/ganttDiagram-EL5Y4UJY-Da4ULXTl.js +292 -0
- package/out/web/assets/gitGraph-4MIJSDKK-B9wNFZIP.js +1 -0
- package/out/web/assets/gitGraphDiagram-WWUBYQGX-RjrhB0MP.js +106 -0
- package/out/web/assets/graphlib-Bh9gHply.js +1 -0
- package/out/web/assets/index-BmpulIkg.js +168 -0
- package/out/web/assets/index-CkvBwhX_.css +1 -0
- package/out/web/assets/info-A6RAGUB7-B3dfCpeY.js +1 -0
- package/out/web/assets/infoDiagram-27XIBGKW-QVWkLVx7.js +2 -0
- package/out/web/assets/ishikawaDiagram-5VMMS53U-CLFNIRI9.js +70 -0
- package/out/web/assets/journeyDiagram-3NMN7TZE-fgOQadYF.js +139 -0
- package/out/web/assets/jsx-runtime-DmUwWVTj.js +1 -0
- package/out/web/assets/kanban-definition-UXKFOSKX-G3Q_9g9O.js +89 -0
- package/out/web/assets/katex-MCdQaEAD.js +257 -0
- package/out/web/assets/mermaid-parser.core-v3Jm7nco.js +7 -0
- package/out/web/assets/mermaid.core-DTEjLUA1.js +44 -0
- package/out/web/assets/mindmap-definition-YA3MSWOX-C_D42_fF.js +96 -0
- package/out/web/assets/modelManager-BPLycQrN.js +2 -0
- package/out/web/assets/oauthManager-BUK7ic7q.js +1 -0
- package/out/web/assets/packet-AYTQ26CC-B-R-SHlF.js +1 -0
- package/out/web/assets/pdf-Bcahc2yC.js +56 -0
- package/out/web/assets/pdf.worker.min-Dkey6ZUl.mjs +27 -0
- package/out/web/assets/pegDiagram-XKGWAZYB-Da2q_giz.js +1 -0
- package/out/web/assets/pie-WAS4IAKB-BC8F0N7-.js +1 -0
- package/out/web/assets/pieDiagram-E7YTZNPT-Iy9REJNC.js +39 -0
- package/out/web/assets/quadrantDiagram-AXDQQJYC-ztsiYw7h.js +7 -0
- package/out/web/assets/radar-RG4KPBEZ-B_1P8Z_z.js +1 -0
- package/out/web/assets/railroad-74A4TZTK-DuTqczSo.js +1 -0
- package/out/web/assets/railroad-abnf-HS5TGJTU-Df29WLmp.js +1 -0
- package/out/web/assets/railroad-ebnf-LZEXJU2U-ePFMo-qp.js +1 -0
- package/out/web/assets/railroad-peg-WCYAUIDC-DYXLW4_E.js +1 -0
- package/out/web/assets/railroadDiagram-O6MQD6OU-LStnZf2S.js +1 -0
- package/out/web/assets/requirementDiagram-BXWQKSXE-DmzonMH-.js +84 -0
- package/out/web/assets/rolldown-runtime-CNOWq4Kh.js +1 -0
- package/out/web/assets/rough.esm-CNnFptCR.js +1 -0
- package/out/web/assets/sankeyDiagram-P5KCCOFB-B8vjmUU1.js +40 -0
- package/out/web/assets/sequenceDiagram-WJ2MYXX4-CTnplOAX.js +162 -0
- package/out/web/assets/sizeCapture-INFHLROL-C8Q8DbV5.js +1 -0
- package/out/web/assets/src-CRDfRlHM.js +1 -0
- package/out/web/assets/stateDiagram-D77RDMKH-BFrIaLdI.js +1 -0
- package/out/web/assets/stateDiagram-v2-MP3YSRHH-uf3kdNW4.js +1 -0
- package/out/web/assets/studio-BBZQ_-QK.js +1 -0
- package/out/web/assets/swimlanes-42K2YHIH-BXGngUNU.js +1 -0
- package/out/web/assets/swimlanesDiagram-VR7AAH4N-Y8q5bQce.js +8 -0
- package/out/web/assets/timeline-definition-24CTP7MA-CegH7n43.js +120 -0
- package/out/web/assets/treeView-Q6P3EWNA-DTpJv2Tw.js +1 -0
- package/out/web/assets/treemap-WGGIJYW6-i8M9iJU6.js +1 -0
- package/out/web/assets/vennDiagram-4TSXK5OY-Dpzo1S8U.js +34 -0
- package/out/web/assets/wardley-WFR3VGLG-BrNsgtfw.js +1 -0
- package/out/web/assets/wardleyDiagram-VM6X3IG4-lQ92LFE1.js +78 -0
- package/out/web/assets/window-CkUOP7t0.js +1 -0
- package/out/web/assets/workspaces-SYPrmbgC.js +1 -0
- package/out/web/assets/xychartDiagram-S5SC5T6Z-BaOaEoBd.js +7 -0
- package/out/web/index-web.html +4 -3
- package/out/web/index.html +4 -3
- 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 +74 -23
- package/shared-modules/.github/workflows/ci.yml +120 -0
- package/shared-modules/.github/workflows/update.yaml +28 -0
- package/slash-commands.json +14 -3
- package/src/bin/auto-build.js +66 -0
- package/src/bin/desktop.js +113 -0
- package/src/bin/desktop.test.js +113 -0
- package/src/bin/index.js +21 -25
- package/src/bin/index.test.js +89 -0
- package/src/bin/measure-effects.mjs +53 -0
- package/src/bin/package.test.js +28 -0
- package/src/bin/pdfjs-assets.mjs +31 -0
- package/src/bin/release-notes.test.js +84 -0
- package/src/bin/styles.test.js +20 -0
- package/src/bin/web.js +5 -0
- package/src/bin/web.test.js +39 -0
- package/src/renderer/index.html +0 -2
- package/src/renderer/node_modules/.vite/vitest/CACHEDIR.TAG +3 -0
- package/src/renderer/node_modules/.vite/vitest/da39a3ee5e6b4b0d3255bfef95601890afd80709/results.json +1 -1
- package/src/renderer/shared/agentProgress.ts +42 -0
- package/src/renderer/shared/components/Settings/AgentsTab.tsx +76 -11
- package/src/renderer/shared/components/Settings/AudioTab.tsx +8 -7
- package/src/renderer/shared/components/Settings/AutomationTab.tsx +59 -2
- package/src/renderer/shared/components/Settings/AvatarCropModal.tsx +18 -12
- package/src/renderer/shared/components/Settings/CustomProviderLogoPicker.test.tsx +65 -0
- package/src/renderer/shared/components/Settings/CustomProviderLogoPicker.tsx +456 -0
- package/src/renderer/shared/components/Settings/GeneralTab.tsx +72 -113
- package/src/renderer/shared/components/Settings/MemoryTab.test.tsx +37 -0
- package/src/renderer/shared/components/Settings/MemoryTab.tsx +71 -31
- package/src/renderer/shared/components/Settings/NotificationsTab.test.tsx +15 -0
- package/src/renderer/shared/components/Settings/NotificationsTab.tsx +84 -0
- package/src/renderer/shared/components/Settings/PluginsTab.tsx +101 -24
- package/src/renderer/shared/components/Settings/ProfileTab.tsx +1 -1
- package/src/renderer/shared/components/Settings/SettingsWindow.tsx +796 -0
- package/src/renderer/shared/components/Settings/ThemeTab.tsx +31 -11
- package/src/renderer/shared/components/activity/AgentActivityDrawer.tsx +220 -0
- package/src/renderer/shared/components/activity/AgentActivityTable.tsx +340 -0
- package/src/renderer/shared/components/activity/McpToolResults.tsx +118 -0
- package/src/renderer/shared/components/activity/PlanChecklistWidget.tsx +77 -0
- 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/activity/SubagentDagView.tsx +420 -0
- package/src/renderer/shared/components/activity/SubagentStatusStrip.test.tsx +82 -0
- package/src/renderer/shared/components/activity/SubagentStatusStrip.tsx +107 -0
- package/src/renderer/shared/components/activity/ViewedImages.tsx +140 -0
- package/src/renderer/shared/components/app/AuthGate.tsx +227 -0
- package/src/renderer/shared/components/app/ChunkErrorBoundary.tsx +186 -0
- package/src/renderer/shared/components/app/CommandPalette.tsx +593 -0
- package/src/renderer/shared/components/app/DashboardSidebar.tsx +1230 -0
- package/src/renderer/shared/components/app/DesktopTitlebar.tsx +354 -0
- package/src/renderer/shared/components/app/ErrorNotice.tsx +29 -0
- package/src/renderer/shared/components/app/MintDashboard.tsx +2182 -0
- package/src/renderer/shared/components/app/ModalErrorBoundary.tsx +127 -0
- package/src/renderer/shared/components/cards/CalculationCard.tsx +86 -0
- package/src/renderer/shared/components/cards/ImageGenCard.tsx +146 -0
- package/src/renderer/shared/components/cards/ImageSearchCard.tsx +145 -0
- package/src/renderer/shared/components/cards/MermaidCard.tsx +283 -0
- package/src/renderer/shared/components/cards/StockCard.tsx +152 -0
- package/src/renderer/shared/components/cards/ToolResultCards.tsx +86 -0
- package/src/renderer/shared/components/cards/UiFeatureCard.tsx +267 -0
- package/src/renderer/shared/components/cards/UiGridCard.tsx +188 -0
- package/src/renderer/shared/components/cards/WeatherCard.tsx +224 -0
- package/src/renderer/shared/components/chat/ApprovalCard.test.tsx +24 -0
- package/src/renderer/shared/components/chat/ApprovalCard.tsx +347 -0
- package/src/renderer/shared/components/chat/ChatCodeBlock.tsx +109 -0
- package/src/renderer/shared/components/chat/ChatMessageItem.test.tsx +145 -0
- package/src/renderer/shared/components/chat/ChatMessageItem.tsx +242 -0
- package/src/renderer/shared/components/chat/ChatPanel.test.tsx +31 -0
- package/src/renderer/shared/components/chat/ChatPanel.tsx +1999 -0
- package/src/renderer/shared/components/chat/CollapsiblePasteInput.tsx +90 -0
- package/src/renderer/shared/components/chat/ContextCompactionStatus.tsx +17 -0
- package/src/renderer/shared/components/chat/DiffReviewModal.tsx +565 -0
- package/src/renderer/shared/components/chat/GeminiLiveOverlay.css +86 -0
- package/src/renderer/shared/components/chat/GeminiLiveOverlay.test.tsx +24 -0
- package/src/renderer/shared/components/chat/GeminiLiveOverlay.tsx +112 -0
- package/src/renderer/shared/components/chat/ModelSelectorPopover.tsx +936 -0
- 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/chat/RewindModal.tsx +414 -0
- package/src/renderer/shared/components/chat/SlashChoicePanel.tsx +88 -0
- package/src/renderer/shared/components/chat/SlashSuggestions.test.tsx +33 -0
- package/src/renderer/shared/components/chat/SlashSuggestions.tsx +346 -0
- package/src/renderer/shared/components/chat/SourcesBlock.tsx +435 -0
- package/src/renderer/shared/components/chat/ThinkingBlock.tsx +102 -0
- package/src/renderer/shared/components/chat/TurnFileChanges.test.tsx +86 -0
- package/src/renderer/shared/components/chat/TurnFileChanges.tsx +430 -0
- package/src/renderer/shared/components/chat/VirtualChatHistory.tsx +82 -0
- package/src/renderer/shared/components/chat/VoicePill.css +85 -0
- package/src/renderer/shared/components/chat/VoicePill.d.ts +12 -0
- package/src/renderer/shared/components/chat/VoicePill.jsx +191 -0
- package/src/renderer/shared/components/chat/VoicePill.test.tsx +22 -0
- package/src/renderer/shared/components/extensions/CliSessionsView.test.tsx +125 -0
- package/src/renderer/shared/components/extensions/CliSessionsView.tsx +545 -0
- package/src/renderer/shared/components/extensions/LinkedFoldersView.tsx +614 -0
- package/src/renderer/shared/components/extensions/McpRegistryPicker.tsx +302 -0
- package/src/renderer/shared/components/extensions/McpServersView.tsx +1040 -0
- package/src/renderer/shared/components/extensions/McpToolAllowlist.tsx +182 -0
- package/src/renderer/shared/components/extensions/ModUi.test.tsx +70 -0
- package/src/renderer/shared/components/extensions/ModsPanel.tsx +208 -0
- package/src/renderer/shared/components/extensions/PluginsView.tsx +325 -0
- package/src/renderer/shared/components/extensions/ScheduledTasksView.tsx +614 -0
- package/src/renderer/shared/components/extensions/SkillsView.test.tsx +31 -0
- package/src/renderer/shared/components/extensions/SkillsView.tsx +363 -0
- package/src/renderer/shared/components/studio/ImageStudioPanel.tsx +740 -0
- package/src/renderer/shared/components/studio/LibraryItemCard.tsx +72 -0
- package/src/renderer/shared/components/studio/LibraryPage.tsx +165 -0
- package/src/renderer/shared/components/studio/LibraryPreview.tsx +59 -0
- package/src/renderer/shared/components/studio/VeoStudioPanel.tsx +708 -0
- package/src/renderer/shared/components/ui/GlideSelect.css +139 -0
- 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/README.md +52 -0
- package/src/renderer/shared/components/ui/SelectField.test.tsx +27 -0
- package/src/renderer/shared/components/ui/SelectField.tsx +506 -0
- package/src/renderer/shared/components/ui/button.tsx +37 -0
- package/src/renderer/shared/components/ui/error-recovery.css +35 -0
- package/src/renderer/shared/components/ui/error-recovery.tsx +35 -0
- package/src/renderer/shared/components/ui/voice-powered-orb.css +6 -0
- package/src/renderer/shared/components/ui/voice-powered-orb.tsx +374 -0
- package/src/renderer/shared/components/workspace/ArtifactPreviewPanel.tsx +700 -0
- package/src/renderer/shared/components/workspace/BackgroundTerminals.test.tsx +63 -0
- package/src/renderer/shared/components/workspace/BackgroundTerminals.tsx +212 -0
- package/src/renderer/shared/components/workspace/CodeReviewPage.tsx +707 -0
- package/src/renderer/shared/components/workspace/GitBranchSelector.tsx +442 -0
- package/src/renderer/shared/components/workspace/SessionSources.tsx +113 -0
- package/src/renderer/shared/components/workspace/TerminalDock.tsx +244 -0
- package/src/renderer/shared/components/workspace/ToolSurfacePage.test.tsx +68 -0
- package/src/renderer/shared/components/workspace/ToolSurfacePage.tsx +819 -0
- package/src/renderer/shared/components/workspace/ToolsPanelToggle.tsx +13 -0
- 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/workspace/WorkspacePaneResizer.tsx +92 -0
- package/src/renderer/shared/components/workspace/WorkspacePdfPreview.tsx +89 -0
- package/src/renderer/shared/components/workspace/WorkspacePreviewActions.test.tsx +89 -0
- package/src/renderer/shared/components/workspace/WorkspacePreviewActions.tsx +19 -0
- package/src/renderer/shared/components/workspace/WorkspaceSelector.tsx +246 -0
- package/src/renderer/shared/components/workspace/background-terminals.css +292 -0
- package/src/renderer/shared/components/workspace/workspace-selector.css +330 -0
- package/src/renderer/shared/constants/config.ts +37 -1
- package/src/renderer/shared/constants/slashCommands.ts +1 -1
- 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 +524 -0
- package/src/renderer/shared/conversation/lifecycle.ts +575 -0
- package/src/renderer/shared/conversation/projectNavigation.test.ts +123 -0
- package/src/renderer/shared/conversation/projectNavigation.ts +50 -0
- package/src/renderer/shared/conversation/sourcesTransport.ts +27 -0
- package/src/renderer/shared/conversation/syncView.test.ts +1 -34
- package/src/renderer/shared/conversation/syncView.ts +0 -37
- package/src/renderer/shared/conversation/transport.test.ts +183 -0
- package/src/renderer/shared/conversation/transport.ts +201 -0
- package/src/renderer/shared/conversation/useConversationCoordinator.ts +67 -79
- package/src/renderer/shared/css/agent-observability.css +90 -30
- package/src/renderer/shared/css/auth-gate.css +112 -13
- package/src/renderer/shared/css/chat-ui-cards.css +35 -35
- package/src/renderer/shared/css/code-review.css +119 -86
- package/src/renderer/shared/css/code-sessions.css +37 -10
- package/src/renderer/shared/css/collapsed-paste.css +35 -0
- package/src/renderer/shared/css/effects.css +15 -0
- package/src/renderer/shared/css/error-notice.css +60 -0
- package/src/renderer/shared/css/file-changes.css +167 -5
- package/src/renderer/shared/css/library.css +476 -0
- package/src/renderer/shared/css/management-views.css +216 -37
- package/src/renderer/shared/css/mcp-results.css +54 -0
- package/src/renderer/shared/css/model-selector.css +163 -105
- package/src/renderer/shared/css/mods.css +77 -0
- package/src/renderer/shared/css/notification-notice.css +28 -0
- package/src/renderer/shared/css/queued-messages.css +221 -0
- package/src/renderer/shared/css/session-sources.css +28 -0
- package/src/renderer/shared/css/settings/agents.css +2 -2
- package/src/renderer/shared/css/settings/base.css +1260 -0
- package/src/renderer/shared/css/settings/general.css +384 -92
- package/src/renderer/shared/css/settings/memory.css +154 -0
- package/src/renderer/shared/css/settings/notifications.css +11 -0
- package/src/renderer/shared/css/settings/plugins.css +8 -8
- package/src/renderer/shared/css/settings/theme.css +49 -32
- package/src/renderer/shared/css/slash-choice.css +95 -0
- package/src/renderer/shared/css/slash-suggestions.css +68 -0
- package/src/renderer/shared/css/sources-block.css +91 -0
- package/src/renderer/shared/css/thinking-status.css +46 -0
- package/src/renderer/shared/css/tools-panel.css +7 -0
- package/src/renderer/shared/css/ui-tailwind.css +19 -0
- package/src/renderer/shared/css/viewed-images.css +104 -0
- package/src/renderer/shared/css/workspace-file-info.css +12 -0
- package/src/renderer/shared/css/workspace-media-preview.css +13 -0
- package/src/renderer/shared/env.d.ts +9 -0
- package/src/renderer/shared/fonts.css +46 -0
- package/src/renderer/shared/fonts.ts +3 -12
- package/src/renderer/shared/lib/utils.ts +6 -0
- package/src/renderer/shared/library/controller.test.ts +61 -0
- package/src/renderer/shared/library/controller.ts +57 -0
- package/src/renderer/shared/library/transport.test.ts +26 -0
- package/src/renderer/shared/library/transport.ts +60 -0
- package/src/renderer/shared/library/useLibraryFile.ts +38 -0
- package/src/renderer/shared/mods.ts +58 -0
- package/src/renderer/shared/platform.test.ts +200 -1
- package/src/renderer/shared/platform.ts +55 -4
- package/src/renderer/shared/speech/player.ts +160 -0
- package/src/renderer/shared/speech/types.ts +11 -0
- package/src/renderer/shared/theme/themeManager.test.ts +63 -0
- package/src/renderer/shared/theme/themeManager.ts +20 -5
- package/src/renderer/shared/theme/themes.ts +17 -4
- package/src/renderer/shared/theme/tokens.css +448 -51
- package/src/renderer/shared/types.ts +111 -2
- package/src/renderer/shared/utils/agentActivity.test.ts +234 -0
- package/src/renderer/shared/utils/agentActivity.ts +221 -32
- package/src/renderer/shared/utils/approval.tsx +7 -0
- package/src/renderer/shared/utils/artifactBrowser.test.ts +80 -0
- package/src/renderer/shared/utils/artifactBrowser.ts +41 -0
- package/src/renderer/shared/utils/artifacts.ts +55 -0
- package/src/renderer/shared/utils/contextCompaction.test.tsx +48 -0
- package/src/renderer/shared/utils/contextCompaction.ts +21 -0
- package/src/renderer/shared/utils/effectVisibility.ts +9 -0
- package/src/renderer/shared/utils/externalLinks.ts +91 -0
- package/src/renderer/shared/utils/lazyWithRetry.ts +13 -0
- package/src/renderer/shared/utils/markdown.tsx +172 -38
- package/src/renderer/shared/utils/markdown.webImages.test.tsx +124 -2
- package/src/renderer/shared/utils/mcpResults.test.tsx +114 -0
- package/src/renderer/shared/utils/modViewport.ts +7 -0
- package/src/renderer/shared/utils/nativeRecordingSession.test.ts +61 -0
- package/src/renderer/shared/utils/nativeRecordingSession.ts +46 -0
- package/src/renderer/shared/utils/notificationSettings.test.ts +14 -0
- package/src/renderer/shared/utils/notificationSettings.ts +23 -0
- package/src/renderer/shared/utils/notifications.test.ts +51 -0
- package/src/renderer/shared/utils/notifications.ts +54 -0
- package/src/renderer/shared/utils/pastedText.test.ts +20 -0
- package/src/renderer/shared/utils/pastedText.ts +13 -0
- package/src/renderer/shared/utils/pdfRange.ts +16 -0
- package/src/renderer/shared/utils/previewObjectUrls.ts +20 -0
- package/src/renderer/shared/utils/progressCache.test.ts +32 -0
- package/src/renderer/shared/utils/sessionSources.test.ts +71 -0
- package/src/renderer/shared/utils/sessionSources.ts +36 -0
- package/src/renderer/shared/utils/slashCommandProcessor.ts +5 -2
- package/src/renderer/shared/utils/sourceAttachments.ts +28 -0
- package/src/renderer/shared/utils/speech.ts +65 -9
- package/src/renderer/shared/utils/syntaxHighlight.test.tsx +22 -0
- package/src/renderer/shared/utils/syntaxHighlight.tsx +26 -0
- package/src/renderer/shared/utils/useGeminiLiveVoice.ts +49 -5
- package/src/renderer/shared/utils/useLatestCallback.ts +9 -0
- package/src/renderer/shared/utils/useNativeVoiceInput.ts +95 -73
- package/src/renderer/shared/utils/useSessionSources.ts +37 -0
- package/src/renderer/shared/utils/viewedImages.test.ts +129 -0
- package/src/renderer/shared/utils/viewedImages.ts +97 -0
- package/src/renderer/shared/utils/workspaceDrag.ts +30 -0
- package/src/renderer/shared/utils/workspaceImage.ts +17 -0
- package/src/renderer/shared/utils/workspaceListPreferences.test.ts +64 -0
- package/src/renderer/shared/utils/workspaceListPreferences.ts +54 -0
- package/src/renderer/shared/utils/workspaceMedia.ts +41 -0
- package/src/renderer/shared/utils/workspacePane.test.ts +33 -0
- package/src/renderer/shared/utils/workspacePane.ts +20 -0
- package/src/renderer/shared/utils/workspacePreview.test.ts +169 -0
- package/src/renderer/shared/utils/workspacePreview.ts +47 -0
- package/src/renderer/shared/utils/workspaceSnapshot.test.ts +49 -0
- package/src/renderer/shared/utils/workspaceSnapshot.ts +26 -0
- package/src/renderer/shared/utils/workspaces.ts +11 -0
- package/src/renderer/shared/workspaceUndo.ts +88 -0
- package/src/renderer/src/App.tsx +15 -9
- 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 +65 -0
- 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 +67 -30
- package/src/renderer/src/components/ScreenPicker.tsx +201 -60
- package/src/renderer/src/components/SettingsWindow.tsx +6 -825
- 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 +261 -38
- package/src/renderer/src/components/browser-shell.css +27 -27
- package/src/renderer/src/components/browser-suggestions-popup.css +9 -9
- package/src/renderer/src/components/liveTranslateFrames.test.ts +26 -5
- package/src/renderer/src/components/liveTranslateFrames.ts +18 -7
- package/src/renderer/src/components/liveTranslateLanguage.ts +6 -0
- package/src/renderer/src/css/app-shell.css +69 -234
- package/src/renderer/src/css/chat.css +207 -494
- package/src/renderer/src/css/desktop-tools.css +6 -139
- package/src/renderer/src/css/misc.css +0 -52
- package/src/renderer/src/css/sidebar-workspace.css +171 -94
- package/src/renderer/src/css/spotlight.css +2 -2
- package/src/renderer/src/css/tool-surfaces.css +387 -61
- package/src/renderer/src/css/widget.css +7 -6
- package/src/renderer/src/env.d.ts +14 -9
- package/src/renderer/src/index.css +16 -64
- package/src/renderer/src/main.tsx +2 -1
- package/src/renderer/src/proactiveSuggestions.ts +29 -0
- package/src/renderer/src/tauri.ts +195 -337
- package/src/renderer/src/voiceInput.ts +5 -2
- package/src/renderer/src-web/App.tsx +6 -8
- package/src/renderer/src-web/components/ChatPanel.tsx +1 -1
- package/src/renderer/src-web/components/DashboardSidebar.tsx +2 -2
- package/src/renderer/src-web/components/ImageStudioPanel.tsx +1 -1
- package/src/renderer/src-web/components/MintDashboard.tsx +1 -1
- package/src/renderer/src-web/components/PullToRefresh.tsx +1 -1
- package/src/renderer/src-web/components/SettingsWindow.tsx +6 -846
- package/src/renderer/src-web/components/VeoStudioPanel.tsx +1 -1
- package/src/renderer/src-web/css/app-shell.css +40 -221
- package/src/renderer/src-web/css/chat.css +207 -494
- package/src/renderer/src-web/css/misc.css +0 -52
- package/src/renderer/src-web/css/mobile.css +15 -14
- package/src/renderer/src-web/css/sidebar-workspace.css +29 -95
- package/src/renderer/src-web/env.d.ts +15 -12
- package/src/renderer/src-web/index.css +16 -64
- package/src/renderer/src-web/main.tsx +2 -1
- package/src/renderer/src-web/proactiveSuggestions.ts +3 -0
- package/src/renderer/src-web/tauri.ts +194 -361
- package/src/renderer/tests/backgroundTerminals.browser.html +81 -0
- 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/chatPanelFixture.ts +23 -0
- package/src/renderer/tests/chatPerformance.browser.html +71 -0
- package/src/renderer/tests/cliSessions.browser.html +82 -0
- package/src/renderer/tests/collapsedPaste.browser.html +70 -0
- package/src/renderer/tests/composerMenus.browser.html +116 -0
- package/src/renderer/tests/contextCompaction.browser.html +17 -0
- package/src/renderer/tests/conversationLifecycle.browser.html +70 -0
- package/src/renderer/tests/effectsPerformance.browser.html +13 -0
- package/src/renderer/tests/errorRecovery.browser.html +21 -0
- package/src/renderer/tests/fixtures/preview.webm +0 -0
- package/src/renderer/tests/glideSelect.browser.html +70 -0
- package/src/renderer/tests/glideSelect.preview.html +27 -0
- package/src/renderer/tests/library.browser.html +1 -0
- package/src/renderer/tests/library.browser.tsx +78 -0
- package/src/renderer/tests/liveOrb.browser.html +49 -0
- package/src/renderer/tests/liveVoice.browser.html +29 -0
- package/src/renderer/tests/mediaFixtures.ts +32 -0
- package/src/renderer/tests/modInput.browser.html +22 -0
- package/src/renderer/tests/sessionSources.browser.html +1 -0
- package/src/renderer/tests/sessionSources.browser.tsx +168 -0
- package/src/renderer/tests/skills.browser.html +24 -0
- package/src/renderer/tests/toolsPanel.browser.html +1 -0
- package/src/renderer/tests/toolsPanel.browser.tsx +113 -0
- package/src/renderer/tests/viewedImages.browser.html +1 -0
- package/src/renderer/tests/viewedImages.browser.tsx +93 -0
- package/src/renderer/tests/voiceDictation.browser.html +101 -0
- package/src/renderer/tests/voicePill.browser.html +80 -0
- package/src/renderer/tests/voicePill.preview.html +34 -0
- package/src/renderer/tests/webSources.browser.html +1 -0
- package/src/renderer/tests/webSources.browser.tsx +2 -0
- 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 +100 -0
- package/src-tauri/Cargo.toml +40 -0
- package/src-tauri/build.rs +3 -0
- package/src-tauri/src/app/lifecycle.rs +320 -0
- package/src-tauri/src/app/mod.rs +4 -0
- package/src-tauri/src/app/shortcuts.rs +40 -0
- package/src-tauri/src/app/tray.rs +52 -0
- package/src-tauri/src/background/events.rs +70 -0
- package/src-tauri/src/background/headless.rs +230 -0
- package/src-tauri/src/background/mod.rs +4 -0
- package/src-tauri/src/background/proactive.rs +262 -0
- package/src-tauri/src/commands/approvals.rs +20 -0
- package/src-tauri/src/commands/auth.rs +127 -0
- package/src-tauri/src/commands/conversation.rs +668 -0
- package/src-tauri/src/commands/integrations.rs +163 -0
- package/src-tauri/src/commands/media.rs +186 -0
- package/src-tauri/src/commands/mod.rs +11 -0
- package/src-tauri/src/commands/mods.rs +6 -0
- package/src-tauri/src/commands/settings.rs +141 -0
- package/src-tauri/src/commands/voice.rs +153 -0
- package/src-tauri/src/commands/workspace.rs +539 -0
- package/src-tauri/src/lib.rs +10 -0
- package/src-tauri/src/main.rs +3 -0
- package/src-tauri/src/native/actions.rs +206 -0
- package/src-tauri/src/native/browser.rs +252 -0
- package/src-tauri/src/native/capture.rs +695 -0
- package/src-tauri/src/native/discord_rpc.rs +99 -0
- package/src-tauri/src/native/integrations.rs +126 -0
- package/src-tauri/src/native/mod.rs +12 -0
- package/src-tauri/src/native/notifications.rs +51 -0
- package/src-tauri/src/native/plugins.rs +14 -0
- package/src-tauri/src/native/system.rs +250 -0
- package/src-tauri/src/native/terminal.rs +201 -0
- package/src-tauri/src/native/updater.rs +148 -0
- package/src-tauri/src/native/windows.rs +143 -0
- package/tsconfig.json +17 -1
- package/vite.config.ts +5 -1
- package/vite.config.web.ts +6 -0
- package/.cargo/config.toml +0 -13
- package/.claude/settings.local.json +0 -182
- package/.codex +0 -0
- package/CLAUDE.md +0 -102
- package/ROADMAP.md +0 -30
- package/mint-presentation-demo.mp4 +0 -0
- package/out/web/Live2DCubismCore.js +0 -9
- package/out/web/assets/CliSessionsView-BxUVWEEL.js +0 -1
- package/out/web/assets/CliSessionsView-CBDTXuQv.css +0 -1
- package/out/web/assets/CodeReviewPage-DkMgfcos.css +0 -1
- package/out/web/assets/CodeReviewPage-jKlmLJwT.js +0 -3
- package/out/web/assets/CommandPalette-DnwPA5hy.js +0 -1
- package/out/web/assets/ImageStudioPanel-BR1XFwhR.js +0 -1
- package/out/web/assets/LinkedFoldersView-bi-CWQ-I.js +0 -1
- package/out/web/assets/McpRegistryPicker-D5tEFnyq.js +0 -1
- package/out/web/assets/McpServersView-BGG1dhFM.js +0 -1
- package/out/web/assets/MintDashboard-BIglDEWX.js +0 -20
- package/out/web/assets/MintDashboard-DSMywSgs.css +0 -1
- package/out/web/assets/ModelPanel-CbJ1PFoZ.js +0 -1
- package/out/web/assets/PicturesLibrary-CQP0fLP1.css +0 -1
- package/out/web/assets/PicturesLibrary-DoYN7T1p.js +0 -1
- package/out/web/assets/PluginsView-CU1HWXGk.js +0 -1
- package/out/web/assets/ScheduledTasksView-Bnl36y2N.js +0 -1
- package/out/web/assets/SettingsWindow-DhWLAn9T.css +0 -1
- package/out/web/assets/SettingsWindow-Dw8L01pw.js +0 -2
- package/out/web/assets/SkillsView-cnl8aY5p.js +0 -2
- package/out/web/assets/ToolSurfacePage-CgsQw6l5.css +0 -1
- package/out/web/assets/ToolSurfacePage-Cz2VJAPZ.js +0 -37
- package/out/web/assets/VeoStudioPanel-D4JnERWR.js +0 -4
- package/out/web/assets/WorkspacePanel-CbJ1PFoZ.js +0 -1
- package/out/web/assets/abnfDiagram-VCTEODGH-ByMyfanq.js +0 -1
- package/out/web/assets/architecture-7GRP2DOG-CLq2kEOB.js +0 -1
- package/out/web/assets/architectureDiagram-5GKGNRK7-6PoVSmNG.js +0 -36
- package/out/web/assets/blockDiagram-NRAW4CY4-cKw9mAKi.js +0 -129
- package/out/web/assets/c4Diagram-UCG6FXSJ-Cqy8N5Ge.js +0 -38
- package/out/web/assets/chunk-2Q5K7J3B-Dmqrq8Tp.js +0 -1
- package/out/web/assets/chunk-5VM5RSS4-BiPuE0io.js +0 -15
- package/out/web/assets/chunk-75Z2AOVW-3qybijF5.js +0 -2
- package/out/web/assets/chunk-CKBBP62Z-cIrXq6jN.js +0 -2
- package/out/web/assets/chunk-CLGD4ZFX-CndDQkww.js +0 -1
- package/out/web/assets/chunk-CacB07dV.js +0 -1
- package/out/web/assets/chunk-DSNCTWBM-Cc4NxvgD.js +0 -2
- package/out/web/assets/chunk-DU6HZSFF-drzh6GsU.js +0 -128
- package/out/web/assets/chunk-F27PBJKO-FiY35l4v.js +0 -1
- package/out/web/assets/chunk-FOHPRMQF-BaVC1uA7.js +0 -161
- package/out/web/assets/chunk-G27WJ6UU-Bjt9Il4A.js +0 -231
- package/out/web/assets/chunk-GMAD6QVW-Bppi3Ctd.js +0 -72
- package/out/web/assets/chunk-JQ64N6SF-DGg5kcEV.js +0 -1
- package/out/web/assets/chunk-JWPE2WC7-BwtYOHqU.js +0 -1
- package/out/web/assets/chunk-LCL6LL3I-CCYcjd7p.js +0 -206
- package/out/web/assets/chunk-LNGE3PJU-AdBoOWw2.js +0 -34
- package/out/web/assets/chunk-OBVCFTLP-DJeNil5M.js +0 -1
- package/out/web/assets/chunk-P2QGCYS3-lRzkRjBB.js +0 -1
- package/out/web/assets/chunk-POPQ4Y6H-DouASMBW.js +0 -1
- package/out/web/assets/chunk-PWAF6VOD-DMmD1vVf.js +0 -1
- package/out/web/assets/chunk-R7TYR2AO-CYLA5UC5.js +0 -10
- package/out/web/assets/chunk-RHFEMEQ7-BiXwEcUT.js +0 -168
- package/out/web/assets/chunk-SVP7TREG-BV-zPslF.js +0 -88
- package/out/web/assets/chunk-TEH6E4GO-B2RGEohZ.js +0 -62
- 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-Dq0smRWk.js +0 -1
- package/out/web/assets/classDiagram-v2-JRS7N3AN-Dq0smRWk.js +0 -1
- package/out/web/assets/config-C-ZFtipU.css +0 -1
- package/out/web/assets/config-eEDngJXO.js +0 -1
- package/out/web/assets/core-hQ2VA9Ti.js +0 -1
- package/out/web/assets/cose-bilkent-JH36ORCC--UN4aw5-.js +0 -1
- package/out/web/assets/cynefin-OW5HDTMX-Cas4csHM.js +0 -1
- package/out/web/assets/cynefinDiagram-5FMLGOSQ-Bbpj66Y3.js +0 -62
- package/out/web/assets/cytoscape.esm-Df1UN4Y1.js +0 -321
- package/out/web/assets/dagre-3AP2YEHR-B0-2RDEd.js +0 -4
- package/out/web/assets/dagre-BWadQu2F.js +0 -1
- package/out/web/assets/diagram-S7CK7UJ4-BdzEjUyH.js +0 -30
- package/out/web/assets/diagram-UQ7AKVKN-CJDwyPxF.js +0 -41
- package/out/web/assets/diagram-VSXAHHWV-BxaG1r_B.js +0 -3
- package/out/web/assets/diagram-VX7I27RA-BMmUqm8f.js +0 -24
- package/out/web/assets/diagram-Z3DM3KII-CFtd03eE.js +0 -24
- package/out/web/assets/dist-BoTOASLF.js +0 -1
- package/out/web/assets/dist-js-Bf2bhoku.js +0 -1
- package/out/web/assets/ebnfDiagram-PWID7BFC-DwAen1hO.js +0 -1
- package/out/web/assets/erDiagram-SSCWMZ5O-BCZSHACj.js +0 -99
- package/out/web/assets/event-ChBVpRy0.js +0 -1
- package/out/web/assets/eventmodeling-NTZA5JFV-XHStE4E_.js +0 -1
- package/out/web/assets/flowDiagram-A5DVABFB-BLg7nEcd.js +0 -1
- package/out/web/assets/ganttDiagram-EL5Y4UJY-BAEu1Cql.js +0 -292
- package/out/web/assets/gitGraph-4MIJSDKK-r32Vyper.js +0 -1
- package/out/web/assets/gitGraphDiagram-WWUBYQGX-z9o9qt6V.js +0 -106
- package/out/web/assets/graphlib-CTR5ZhLf.js +0 -1
- package/out/web/assets/index-Btsf4L8M.css +0 -1
- package/out/web/assets/index-D8D9MeRA.js +0 -11
- package/out/web/assets/info-A6RAGUB7-BvLaC2cw.js +0 -1
- package/out/web/assets/infoDiagram-RXCK75RN-Be6WAXXw.js +0 -2
- package/out/web/assets/ishikawaDiagram-5VMMS53U-DZjoHJHC.js +0 -70
- package/out/web/assets/journeyDiagram-EYS64GPL-CtVkjkGm.js +0 -139
- package/out/web/assets/kanban-definition-3QL26DDD-CW5FMv1w.js +0 -89
- package/out/web/assets/katex-O3jvqgnU.js +0 -257
- package/out/web/assets/lucide-react-Ip3L6Jtn.js +0 -1
- package/out/web/assets/markdown-BSeeUbJH.js +0 -38
- package/out/web/assets/mermaid-parser.core-aUgCqsZ5.js +0 -7
- package/out/web/assets/mermaid.core-D57sEiSL.js +0 -11
- package/out/web/assets/mindmap-definition-FBJOCRG2-DAmSpM3a.js +0 -96
- package/out/web/assets/modelManager-tMVmJVAW.js +0 -2
- package/out/web/assets/oauthManager-9jxicDWJ.js +0 -1
- package/out/web/assets/packet-AYTQ26CC-DJ27iIoJ.js +0 -1
- package/out/web/assets/pegDiagram-XKGWAZYB-Bj3ii-gS.js +0 -1
- package/out/web/assets/pie-WAS4IAKB-DG5mCUbc.js +0 -1
- package/out/web/assets/pieDiagram-E7YTZNPT-BrJLPnDA.js +0 -39
- package/out/web/assets/prompt-latin-400-normal-BQ9zjSN8.woff2 +0 -0
- package/out/web/assets/prompt-latin-400-normal-CxU4ec_r.woff +0 -0
- package/out/web/assets/prompt-latin-500-normal-B1edBDQ9.woff +0 -0
- package/out/web/assets/prompt-latin-500-normal-CxzxEHZc.woff2 +0 -0
- package/out/web/assets/prompt-latin-600-normal-CSDDLorv.woff +0 -0
- package/out/web/assets/prompt-latin-600-normal-hKZWXsc1.woff2 +0 -0
- package/out/web/assets/prompt-latin-700-normal-BfbftDSq.woff +0 -0
- package/out/web/assets/prompt-latin-700-normal-I2gc831J.woff2 +0 -0
- package/out/web/assets/prompt-thai-400-normal-BrkKv8cO.woff2 +0 -0
- package/out/web/assets/prompt-thai-400-normal-DJypnfr3.woff +0 -0
- package/out/web/assets/prompt-thai-500-normal-C18pDUoL.woff2 +0 -0
- package/out/web/assets/prompt-thai-500-normal-D7YNqUJD.woff +0 -0
- package/out/web/assets/prompt-thai-600-normal-CYPViXds.woff +0 -0
- package/out/web/assets/prompt-thai-600-normal-MrdfU7zR.woff2 +0 -0
- package/out/web/assets/prompt-thai-700-normal-Cb5ilR-c.woff +0 -0
- package/out/web/assets/prompt-thai-700-normal-Cg4aQ0Nn.woff2 +0 -0
- package/out/web/assets/quadrantDiagram-AXDQQJYC-3x_TmF3j.js +0 -7
- package/out/web/assets/radar-RG4KPBEZ-CrXaTTuV.js +0 -1
- package/out/web/assets/railroad-74A4TZTK-BpqMH9BE.js +0 -1
- package/out/web/assets/railroad-abnf-HS5TGJTU-DHI0uLlV.js +0 -1
- package/out/web/assets/railroad-ebnf-LZEXJU2U-CQCb316y.js +0 -1
- package/out/web/assets/railroad-peg-WCYAUIDC-Ph1giKkH.js +0 -1
- package/out/web/assets/railroadDiagram-O6MQD6OU-BRq6wIxx.js +0 -1
- package/out/web/assets/requirementDiagram-EFPCY7ZU-DIJj6G1g.js +0 -84
- package/out/web/assets/rough.esm-DFbTUy8a.js +0 -1
- package/out/web/assets/sankeyDiagram-P5KCCOFB-DZajSryq.js +0 -40
- package/out/web/assets/sequenceDiagram-WJ2MYXX4-DxJCWyZS.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-k6voi8Vf.js +0 -1
- package/out/web/assets/stateDiagram-v2-4QOOHH4V-DeEc0lGZ.js +0 -1
- package/out/web/assets/studio-B1mk40wD.js +0 -1
- package/out/web/assets/swimlanes-XN3QIQJK-igYhTjXB.js +0 -1
- package/out/web/assets/swimlanesDiagram-VK2B7HYN-DpVik9v7.js +0 -8
- package/out/web/assets/timeline-definition-24CTP7MA-Dke2p93p.js +0 -120
- package/out/web/assets/treeView-Q6P3EWNA-hNELnXUs.js +0 -1
- package/out/web/assets/treemap-WGGIJYW6-D2B6wDsx.js +0 -1
- package/out/web/assets/vennDiagram-4TSXK5OY-CDkW7rUP.js +0 -34
- package/out/web/assets/wardley-WFR3VGLG-BECdXETi.js +0 -1
- package/out/web/assets/wardleyDiagram-VM6X3IG4-B5BycpQ4.js +0 -78
- package/out/web/assets/window-5qYXKoW7.js +0 -1
- package/out/web/assets/xychartDiagram-S5SC5T6Z-CtJS3b--.js +0 -7
- package/skills-lock.json +0 -77
- package/src/renderer/public/Live2DCubismCore.js +0 -9
- package/src/renderer/shared/components/AgentActivityDrawer.tsx +0 -203
- package/src/renderer/shared/components/AgentActivityTable.tsx +0 -301
- package/src/renderer/shared/components/ApprovalCard.tsx +0 -340
- package/src/renderer/shared/components/ArtifactPreviewPanel.tsx +0 -505
- package/src/renderer/shared/components/AuthGate.tsx +0 -191
- package/src/renderer/shared/components/CalculationCard.tsx +0 -100
- package/src/renderer/shared/components/ChatCodeBlock.tsx +0 -105
- package/src/renderer/shared/components/ChatMessageItem.tsx +0 -306
- package/src/renderer/shared/components/ChatPanel.tsx +0 -2226
- package/src/renderer/shared/components/ChunkErrorBoundary.tsx +0 -284
- package/src/renderer/shared/components/CliSessionsView.tsx +0 -495
- package/src/renderer/shared/components/CodeReviewPage.tsx +0 -565
- package/src/renderer/shared/components/CommandPalette.tsx +0 -593
- package/src/renderer/shared/components/DashboardSidebar.tsx +0 -1341
- package/src/renderer/shared/components/DesktopTitlebar.tsx +0 -345
- package/src/renderer/shared/components/DiffReviewModal.tsx +0 -565
- package/src/renderer/shared/components/GeminiLiveOverlay.tsx +0 -128
- package/src/renderer/shared/components/GitBranchSelector.tsx +0 -442
- package/src/renderer/shared/components/ImageGenCard.tsx +0 -159
- package/src/renderer/shared/components/ImageSearchCard.tsx +0 -168
- package/src/renderer/shared/components/ImageStudioPanel.tsx +0 -739
- package/src/renderer/shared/components/InlineThoughtNote.tsx +0 -27
- package/src/renderer/shared/components/LinkedFoldersView.tsx +0 -614
- package/src/renderer/shared/components/McpRegistryPicker.tsx +0 -302
- package/src/renderer/shared/components/McpServersView.tsx +0 -952
- package/src/renderer/shared/components/McpToolAllowlist.tsx +0 -184
- package/src/renderer/shared/components/MermaidCard.tsx +0 -267
- package/src/renderer/shared/components/MintDashboard.tsx +0 -2665
- package/src/renderer/shared/components/ModalErrorBoundary.tsx +0 -127
- package/src/renderer/shared/components/ModelSelectorPopover.tsx +0 -929
- package/src/renderer/shared/components/PlanChecklistWidget.tsx +0 -77
- package/src/renderer/shared/components/PluginsView.tsx +0 -325
- package/src/renderer/shared/components/RewindModal.tsx +0 -421
- package/src/renderer/shared/components/RunSummaryDashboard.tsx +0 -149
- package/src/renderer/shared/components/ScheduledTasksView.tsx +0 -613
- package/src/renderer/shared/components/SkillsView.tsx +0 -347
- package/src/renderer/shared/components/SlashSuggestions.tsx +0 -318
- package/src/renderer/shared/components/SourcesBlock.tsx +0 -450
- package/src/renderer/shared/components/StockCard.tsx +0 -168
- package/src/renderer/shared/components/SubagentDagView.tsx +0 -366
- package/src/renderer/shared/components/TerminalDock.tsx +0 -241
- package/src/renderer/shared/components/ThinkingBlock.tsx +0 -102
- package/src/renderer/shared/components/ToolSurfacePage.tsx +0 -520
- package/src/renderer/shared/components/UiFeatureCard.tsx +0 -267
- package/src/renderer/shared/components/UiGridCard.tsx +0 -188
- package/src/renderer/shared/components/VeoStudioPanel.tsx +0 -707
- package/src/renderer/shared/components/WeatherCard.tsx +0 -224
- package/src/renderer/shared/components/WorkspaceContextPopover.tsx +0 -133
- package/src/renderer/shared/components/WorkspaceSelector.tsx +0 -149
- package/src/renderer/src/companionWidget.ts +0 -95
- 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/Live2DStage.tsx +0 -412
- package/src/renderer/src/components/MermaidCard.tsx +0 -1
- package/src/renderer/src/components/ModelPanel.tsx +0 -155
- package/src/renderer/src/components/PicturesLibrary.tsx +0 -288
- package/src/renderer/src/components/Settings/AgentsTab.tsx +0 -4
- package/src/renderer/src/components/Settings/AudioTab.tsx +0 -3
- package/src/renderer/src/components/Settings/AutomationTab.tsx +0 -3
- package/src/renderer/src/components/Settings/GeneralTab.tsx +0 -3
- package/src/renderer/src/components/Settings/MemoryTab.tsx +0 -3
- package/src/renderer/src/components/Settings/PluginsTab.tsx +0 -3
- package/src/renderer/src/components/Settings/ProfileTab.tsx +0 -3
- package/src/renderer/src/components/Settings/ShortcutsTab.tsx +0 -3
- package/src/renderer/src/components/Settings/ThemeTab.tsx +0 -3
- package/src/renderer/src/components/StockCard.tsx +0 -3
- package/src/renderer/src/components/WeatherCard.tsx +0 -3
- package/src/renderer/src/css/model.css +0 -628
- package/src/renderer/src/css/pictures.css +0 -415
- package/src/renderer/src/css/settings/base.css +0 -1263
- package/src/renderer/src-web/companionWidget.ts +0 -37
- package/src/renderer/src-web/components/ModelPanel.tsx +0 -12
- package/src/renderer/src-web/components/PicturesLibrary.tsx +0 -285
- 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/model.css +0 -628
- package/src/renderer/src-web/css/pictures.css +0 -462
- package/src/renderer/src-web/css/settings/base.css +0 -1263
- package/src/renderer/src-web/css/spotlight.css +0 -102
- package/src/renderer/src-web/css/widget.css +0 -213
- /package/src/renderer/shared/components/{UiMockupWidget.tsx → cards/UiMockupWidget.tsx} +0 -0
- /package/src/renderer/shared/components/{ScreenCaptureDialog.css → studio/ScreenCaptureDialog.css} +0 -0
- /package/src/renderer/shared/components/{ScreenCaptureDialog.tsx → studio/ScreenCaptureDialog.tsx} +0 -0
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{i as e,n as t}from"./chunk-CacB07dV.js";import{_ as n,a as r,b as i,c as a,d as o,f as s,i as c,k as l,l as u,p as d,s as f,t as p,u as m,v as h,w as g,x as _,y as v}from"./index-D8D9MeRA.js";import{$ as y,B as b,D as x,G as S,H as C,J as w,K as T,M as E,O as D,Q as O,R as k,S as A,T as j,U as ee,V as te,W as ne,X as re,Y as ie,Z as ae,_ as oe,a as se,b as ce,c as M,d as le,et as N,f as ue,g as de,h as fe,l as P,m as pe,n as me,o as he,ot as ge,p as _e,q as ve,r as ye,s as be,t as xe,tt as F,u as Se,v as Ce,w as we,x as Te,y as Ee,z as De}from"./config-eEDngJXO.js";import{i as Oe,n as ke,r as Ae,t as je}from"./McpRegistryPicker-D5tEFnyq.js";import{a as Me,c as Ne,i as Pe,n as Fe,o as Ie,r as Le,s as Re,t as ze}from"./oauthManager-9jxicDWJ.js";import{n as Be,r as Ve}from"./modelManager-tMVmJVAW.js";var He=t((()=>{})),Ue=t((()=>{})),We=t((()=>{})),Ge=t((()=>{})),Ke=t((()=>{})),qe=t((()=>{})),Je=t((()=>{})),Ye=t((()=>{})),Xe=t((()=>{}));function Ze(e){let t=e.trim().toLowerCase(),n=S[t===`gemini`||t===`google`?`nanobanana`:t===`flux`?`bfl`:t===`openai`?`dalle`:t];return n?[...n]:[]}function Qe(e,t){let[n,i]=(0,$e.useState)(()=>Ze(e)),[a,o]=(0,$e.useState)(!1),s=(0,$e.useRef)(0);return(0,$e.useEffect)(()=>{let n=Ze(e);i(n);let a=++s.current;o(!0),r(e,t).then(e=>{if(a===s.current&&e&&e.length>0){let t=new Map;for(let e of n)t.set(e.value,e.label);let r=[],a=new Set;for(let n of e)a.has(n)||(a.add(n),r.push({value:n,label:t.get(n)??n}));for(let e of n)a.has(e.value)||(a.add(e.value),r.push(e));i(r)}}).catch(()=>{}).finally(()=>{a===s.current&&o(!1)})},[e,t]),{options:n,models:n.map(e=>e.value),loading:a}}var $e,et=t((()=>{$e=e(l()),y(),m()}));function tt(e){let t=e.trim().toLowerCase(),n=ae[t===`gemini`||t===`google`?`veo`:t];return n?[...n]:[]}function nt(e,t){let[n,r]=(0,rt.useState)(()=>tt(e)),[i,a]=(0,rt.useState)(!1),o=(0,rt.useRef)(0);return(0,rt.useEffect)(()=>{let n=tt(e);r(n);let i=++o.current;a(!0),f(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 rt,it=t((()=>{rt=e(l()),y(),m()}));function I({value:e,onChange:t,placeholder:n,className:r}){let[i,a]=(0,at.useState)(!1);return(0,L.jsxs)(`div`,{className:`api-key-field`,children:[(0,L.jsx)(`input`,{type:i?`text`:`password`,className:r,value:e,onChange:e=>t(e.target.value),placeholder:n}),(0,L.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,L.jsxs)(`svg`,{width:`15`,height:`15`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,L.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,L.jsx)(`line`,{x1:`1`,y1:`1`,x2:`23`,y2:`23`})]}):(0,L.jsxs)(`svg`,{width:`15`,height:`15`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,L.jsx)(`path`,{d:`M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z`}),(0,L.jsx)(`circle`,{cx:`12`,cy:`12`,r:`3`})]})})]})}var at,L,ot=t((()=>{at=e(l()),L=v()}));function st({value:e,models:t,onChange:n,onCustomChange:r,customValue:i,placeholder:a=`Select or search OpenRouter model...`}){let[o,s]=(0,R.useState)(!1),[c,l]=(0,R.useState)(``),[u,d]=(0,R.useState)(0),[f,p]=(0,R.useState)(!1),m=(0,R.useRef)(null),h=(0,R.useRef)(null),g=(0,R.useRef)(null);(0,R.useEffect)(()=>{o&&(l(``),d(0),setTimeout(()=>{h.current?.focus()},50))},[o]),(0,R.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,R.useMemo)(()=>{let e=new Set(re),n=[];for(let e of re)t.includes(e)&&n.push(e);return{popularList:n,otherList:t.filter(t=>!e.has(t))}},[t]),{filteredPopular:y,filteredOther:b}=(0,R.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,R.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,R.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));return}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)}},E=(0,R.useMemo)(()=>e===`custom`?i?`Custom: ${i}`:`Custom Model...`:e||a,[e,i,a]),D=N(e===`custom`?i||``:e),O=0;return(0,z.jsxs)(`div`,{className:`model-combobox-container`,ref:m,children:[(0,z.jsxs)(`button`,{type:`button`,className:`model-combobox-trigger ${o?`is-open`:``}`,onClick:()=>s(!o),onKeyDown:T,"aria-haspopup":`listbox`,"aria-expanded":o,children:[(0,z.jsxs)(`div`,{className:`model-combobox-trigger-content`,children:[(0,z.jsx)(`span`,{className:`model-combobox-trigger-text`,children:E}),D&&(0,z.jsx)(`span`,{className:`model-tag-badge badge-free`,children:`Free`})]}),(0,z.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,z.jsx)(`polyline`,{points:`6 9 12 15 18 9`})})]}),o&&(0,z.jsxs)(`div`,{className:`model-combobox-dropdown`,onKeyDown:T,children:[(0,z.jsxs)(`div`,{className:`model-combobox-search-box`,children:[(0,z.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,z.jsx)(`circle`,{cx:`11`,cy:`11`,r:`8`}),(0,z.jsx)(`line`,{x1:`21`,y1:`21`,x2:`16.65`,y2:`16.65`})]}),(0,z.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,z.jsx)(`button`,{type:`button`,className:`combobox-clear-btn`,onClick:()=>{l(``),d(0)},title:`Clear`,children:(0,z.jsxs)(`svg`,{width:`12`,height:`12`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2.2`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,z.jsx)(`line`,{x1:`18`,y1:`6`,x2:`6`,y2:`18`}),(0,z.jsx)(`line`,{x1:`6`,y1:`6`,x2:`18`,y2:`18`})]})})]}),(0,z.jsxs)(`div`,{className:`model-combobox-list`,ref:g,role:`listbox`,children:[c.trim()&&!t.includes(c.trim())&&(0,z.jsxs)(`div`,{className:`model-combobox-item custom-query-item`,onClick:w,role:`option`,"aria-selected":!1,children:[(0,z.jsx)(`div`,{className:`combobox-item-left`,children:(0,z.jsxs)(`span`,{className:`combobox-item-name`,children:[`Use custom model: `,(0,z.jsx)(`strong`,{children:c.trim()})]})}),(0,z.jsx)(`span`,{className:`combobox-custom-badge`,children:`Enter`})]}),y.length>0&&(0,z.jsxs)(`div`,{className:`model-combobox-group`,children:[(0,z.jsx)(`div`,{className:`model-combobox-group-title`,children:(0,z.jsx)(`span`,{children:`★ Popular & Recommended`})}),y.map(t=>{let n=O++,r=e===t,i=u===n,a=N(t);return(0,z.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,z.jsxs)(`div`,{className:`combobox-item-left`,children:[(0,z.jsxs)(`div`,{className:`combobox-item-row`,children:[(0,z.jsx)(`span`,{className:`combobox-item-name`,children:t.split(`/`).pop()||t}),a&&(0,z.jsx)(`span`,{className:`model-tag-badge badge-free`,children:`Free`})]}),t.includes(`/`)&&(0,z.jsx)(`span`,{className:`combobox-item-repo`,children:t})]}),r&&(0,z.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,z.jsx)(`polyline`,{points:`20 6 9 17 4 12`})})]},t)})]}),b.length>0&&(0,z.jsxs)(`div`,{className:`model-combobox-group`,children:[(0,z.jsx)(`div`,{className:`model-combobox-group-title`,children:(0,z.jsxs)(`span`,{children:[`Other models (`,b.length,`)`]})}),x?(0,z.jsxs)(z.Fragment,{children:[b.map(t=>{let n=O++,r=e===t,i=u===n,a=N(t);return(0,z.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,z.jsxs)(`div`,{className:`combobox-item-left`,children:[(0,z.jsxs)(`div`,{className:`combobox-item-row`,children:[(0,z.jsx)(`span`,{className:`combobox-item-name`,children:t.split(`/`).pop()||t}),a&&(0,z.jsx)(`span`,{className:`model-tag-badge badge-free`,children:`Free`})]}),t.includes(`/`)&&(0,z.jsx)(`span`,{className:`combobox-item-repo`,children:t})]}),r&&(0,z.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,z.jsx)(`polyline`,{points:`20 6 9 17 4 12`})})]},t)}),!c.trim()&&(0,z.jsx)(`div`,{className:`combobox-see-more-wrap`,style:{marginTop:`4px`},children:(0,z.jsxs)(`button`,{type:`button`,className:`combobox-see-more-btn collapse-btn`,onClick:()=>p(!1),children:[(0,z.jsx)(`svg`,{width:`13`,height:`13`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2.2`,strokeLinecap:`round`,strokeLinejoin:`round`,children:(0,z.jsx)(`polyline`,{points:`18 15 12 9 6 15`})}),(0,z.jsx)(`span`,{children:`Collapse other models`})]})})]}):(0,z.jsx)(`div`,{className:`combobox-see-more-wrap`,children:(0,z.jsxs)(`button`,{type:`button`,className:`combobox-see-more-btn`,onClick:()=>p(!0),children:[(0,z.jsx)(`svg`,{width:`13`,height:`13`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2.2`,strokeLinecap:`round`,strokeLinejoin:`round`,children:(0,z.jsx)(`polyline`,{points:`6 9 12 15 18 9`})}),(0,z.jsxs)(`span`,{children:[`Show all `,b.length,` other models`]})]})})]}),y.length===0&&b.length===0&&!c.trim()&&(0,z.jsx)(`div`,{className:`model-combobox-empty`,children:(0,z.jsx)(`span`,{children:`No models available`})}),(()=>{let t=O++,n=e===`custom`;return(0,z.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,z.jsxs)(`div`,{className:`combobox-item-left`,children:[(0,z.jsx)(`span`,{className:`combobox-item-name`,children:`Custom...`}),(0,z.jsx)(`span`,{className:`combobox-item-repo`,children:`Enter a custom model identifier manually`})]}),n&&(0,z.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,z.jsx)(`polyline`,{points:`20 6 9 17 4 12`})})]})})()]})]})]})}var R,z,ct=t((()=>{R=e(l()),y(),z=v()}));function lt({provider:e}){let t=ft[e];return t?t.color?(0,B.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,B.jsx)(`img`,{className:`settings-provider-logo`,src:t.src,alt:``,"aria-hidden":`true`}):null}function ut({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=[...C],dynamicAnthropicModels:b=[...k],dynamicOpenAIModels:x=[...w],dynamicOpenRouterModels:E=[...ie],dynamicDeepSeekModels:D=[...De],dynamicLocalModels:A=[...T],dynamicImageModels:te,dynamicVideoModels:re,updateAvailable:oe,updateMessage:se,handleCheckUpdates:ce,handleInstallUpdate:M,isDesktopApp:le=!0,onSaveWithoutClosing:N}){let[ue,de]=dt.useState(null),[fe,P]=dt.useState({}),[pe,me]=dt.useState({ai_routing:!0,search:!1,productivity:!1,image_gen:!1,video_gen:!1,custom_providers:!1,desktop_updates:!1,assistant_presence:!1}),he=e=>{me(t=>({...t,[e]:!t[e]}))},ge=e=>{me({ai_routing:e,search:e,productivity:e,image_gen:e,video_gen:e,custom_providers:e,desktop_updates:e,assistant_presence:e})},_e=async e=>{N&&(await N(),de(e),setTimeout(()=>de(null),2e3))},ve=(n,r)=>{if(!r)return;if(![`image/png`,`image/jpeg`,`image/webp`].includes(r.type)){P(e=>({...e,[n]:`Choose a PNG, JPEG, or WebP image.`}));return}if(r.size>256*1024){P(e=>({...e,[n]:`The logo must be 256 KB or smaller.`}));return}let i=new FileReader;i.onload=()=>{if(typeof i.result!=`string`){P(e=>({...e,[n]:`Could not read this image.`}));return}(e.customProviders??[]).find(e=>e.id===n)&&(t(`customProviders`,(e.customProviders??[]).map(e=>e.id===n?{...e,logoDataUrl:i.result}:e)),P(e=>{let t={...e};return delete t[n],t}))},i.onerror=()=>{P(e=>({...e,[n]:`Could not read this image.`}))},i.readAsDataURL(r)},ye=(e,t,n,r,i,a,o)=>{let s=pe[e]??!1;return(0,B.jsxs)(`section`,{className:`setting-section collapsible-section ${s?`is-open`:`is-collapsed`}`,children:[(0,B.jsxs)(`div`,{className:`section-heading-collapsible`,onClick:()=>he(e),role:`button`,"aria-expanded":s,"aria-label":`${s?`Collapse`:`Expand`} ${n}`,children:[(0,B.jsxs)(`div`,{children:[(0,B.jsxs)(`p`,{className:`section-kicker`,children:[t,a]}),(0,B.jsxs)(`h2`,{className:`section-title`,children:[o,n]})]}),(0,B.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,B.jsx)(`polyline`,{points:`6 9 12 15 18 9`})})]}),s&&(0,B.jsx)(`div`,{className:`section-collapsible-body`,children:i})]})},be=e.aiProvider.startsWith(`custom:`)?(e.customProviders??[]).find(t=>`custom:${t.id}`===e.aiProvider)?.displayName||`Custom`:j(e.aiProvider),xe=ht[e.searchProvider]??e.searchProvider,F=gt[e.imageGenProvider]??e.imageGenProvider,Se=_t[e.videoGenProvider]??e.videoGenProvider,Ce=(e.customProviders??[]).length;return(0,B.jsxs)(`div`,{className:`tab-pane active`,children:[(0,B.jsxs)(`div`,{className:`accordion-controls`,children:[(0,B.jsx)(`button`,{type:`button`,onClick:()=>ge(!0),children:`Expand all`}),(0,B.jsx)(`button`,{type:`button`,onClick:()=>ge(!1),children:`Collapse all`})]}),ye(`ai_routing`,`AI routing`,`Provider & Model`,`Choose which AI backend Mint uses, then set the default model.`,(0,B.jsxs)(B.Fragment,{children:[(0,B.jsxs)(`div`,{className:`form-grid compact`,children:[(0,B.jsxs)(`div`,{className:`setting-row stacked`,children:[(0,B.jsx)(`label`,{children:`Active provider`}),(0,B.jsx)(`div`,{className:`pill-segmented`,role:`radiogroup`,"aria-label":`Active provider`,children:[{id:`gemini`,label:j(`gemini`),title:`Google Gemini (Cloud)`},{id:`anthropic`,label:j(`anthropic`),title:`Anthropic Claude`},{id:`openai`,label:j(`openai`),title:`OpenAI`},{id:`openrouter`,label:j(`openrouter`),title:`OpenRouter`},{id:`deepseek`,label:j(`deepseek`),title:`DeepSeek`},{id:`ollama`,label:j(`ollama`),title:`Ollama (Local / Private)`},{id:`huggingface`,label:j(`huggingface`),title:`Hugging Face (Inference API)`},{id:`local_openai`,label:j(`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,B.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,B.jsxs)(`div`,{className:`setting-row wide`,children:[(0,B.jsx)(`label`,{children:`Active model`}),(0,B.jsx)(`select`,{value:i,onChange:r=>t(`customModelSelections`,{...e.customModelSelections??{},[n]:r.target.value}),children:r.models.map(e=>(0,B.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,B.jsxs)(`div`,{className:`setting-row stacked setting-feature-card`,children:[(0,B.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,marginBottom:`0.35rem`},children:[(0,B.jsxs)(`label`,{style:{margin:0,fontWeight:600,display:`flex`,alignItems:`baseline`,gap:`0.45rem`},children:[(0,B.jsx)(`span`,{children:`Model temperature`}),m&&(0,B.jsxs)(`span`,{style:{fontSize:`0.8rem`,fontWeight:500,color:`var(--text-muted)`},children:[`· `,m]})]}),(0,B.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:`0.5rem`},children:[(0,B.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,B.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,B.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:`0.75rem`},children:[(0,B.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,B.jsx)(`span`,{style:{fontSize:`0.85rem`,minWidth:`2.5rem`,textAlign:`right`,fontFamily:`monospace`,fontWeight:600},children:p.toFixed(2)})]}),(0,B.jsxs)(`span`,{style:{fontSize:`0.75rem`,color:`var(--text-muted)`,marginTop:`0.35rem`,lineHeight:1.4},children:[`Controls sampling entropy for `,(0,B.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=O(n,e.aiProvider),i=e.modelThinkingConfigs??{},a=n?i[n]:void 0,o=a!==void 0,s=r.supportsThinking,c=a?.enabled===void 0?e.thinkingEnabled??!0:a.enabled,l=(a?.effort||e.thinkingEffort||`medium`).toLowerCase(),u=()=>{if(n&&i[n]!==void 0){let e={...i};delete e[n],t(`modelThinkingConfigs`,e)}},d=e=>{n&&t(`modelThinkingConfigs`,{...i,[n]:{enabled:e,effort:l}}),t(`thinkingEnabled`,e)},f=e=>{n&&t(`modelThinkingConfigs`,{...i,[n]:{enabled:c,effort:e}}),t(`thinkingEffort`,e)},p={low:`Low`,medium:`Medium`,high:`High`,extra_high:`Extra High`};return(0,B.jsxs)(`div`,{className:`setting-row stacked setting-feature-card`,children:[(0,B.jsxs)(`div`,{className:`thinking-card-header`,style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,marginBottom:`0.5rem`},children:[(0,B.jsxs)(`label`,{className:`thinking-card-title`,style:{margin:0,fontWeight:600,display:`flex`,alignItems:`center`,gap:`0.45rem`},children:[(0,B.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,B.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,B.jsx)(`path`,{d:`M9 21h6`})]}),(0,B.jsx)(`span`,{children:`Thinking / Reasoning`}),n&&(0,B.jsxs)(`span`,{style:{fontSize:`0.8rem`,fontWeight:500,color:`var(--text-muted)`},children:[`· `,n.split(`/`).pop()]})]}),(0,B.jsxs)(`div`,{className:`thinking-card-status`,style:{display:`flex`,alignItems:`center`,gap:`0.5rem`},children:[(0,B.jsx)(`span`,{className:`section-current-badge`,style:{fontSize:`0.75rem`},children:c?`Thinking ON (${p[l]||`Medium`})${s?``:` · Force`}`:`Thinking OFF`}),o&&(0,B.jsx)(`button`,{type:`button`,className:`btn-secondary btn-small`,style:{padding:`0.15rem 0.45rem`,fontSize:`0.75rem`},onClick:u,title:`Reset ${n} thinking configuration`,children:`Reset`})]})]}),(0,B.jsxs)(`div`,{className:`thinking-card-toggle-row`,style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,padding:`0.4rem 0`},children:[(0,B.jsxs)(`div`,{children:[(0,B.jsx)(`span`,{style:{fontSize:`0.82rem`,fontWeight:500},children:`Enable thinking`}),(0,B.jsx)(`p`,{style:{margin:`2px 0 0 0`,fontSize:`0.73rem`,color:`var(--text-muted)`},children:s?`Allow model to output chain-of-thought tokens.`:c?`Chain-of-thought token generation enabled (force toggle).`:`Model not flagged as reasoning by default — toggle on to force enable.`})]}),(0,B.jsxs)(`label`,{className:`settings-toggle-switch`,children:[(0,B.jsx)(`input`,{type:`checkbox`,checked:c,onChange:e=>d(e.target.checked)}),(0,B.jsx)(`span`,{className:`settings-toggle-slider`})]})]}),c&&(0,B.jsx)(`div`,{style:{marginTop:`0.5rem`,paddingTop:`0.5rem`,borderTop:`1px solid var(--border)`},children:(0,B.jsxs)(`div`,{className:`thinking-card-effort-row`,style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`},children:[(0,B.jsx)(`span`,{style:{fontSize:`0.78rem`,fontWeight:600,color:`var(--text-muted)`,textTransform:`none`,letterSpacing:`0.04em`},children:`Reasoning Effort`}),(0,B.jsx)(`div`,{className:`thinking-card-effort-options`,style:{display:`flex`,gap:`4px`},children:[`low`,`medium`,`high`,`extra_high`].map(e=>(0,B.jsx)(`button`,{type:`button`,className:`btn-secondary btn-small ${l===e?`active`:``}`,style:{padding:`0.2rem 0.6rem`,fontSize:`0.75rem`,fontWeight:l===e?600:400,background:l===e?`rgba(16, 185, 129, 0.15)`:void 0,borderColor:l===e?`var(--accent, #10b981)`:void 0,color:l===e?`var(--accent, #10b981)`:void 0},onClick:()=>f(e),children:p[e]},e))})]})})]})})()]}),(0,B.jsxs)(`div`,{className:`provider-cards-container`,children:[(0,B.jsxs)(`div`,{className:`provider-card ${e.aiProvider===`gemini`?`active-provider`:``}`,children:[(0,B.jsxs)(`div`,{className:`provider-card-header`,children:[(0,B.jsxs)(`div`,{className:`provider-card-title`,children:[(0,B.jsx)(lt,{provider:`gemini`}),`Google Gemini (Cloud)`]}),(0,B.jsx)(`div`,{className:`provider-card-actions`,children:e.aiProvider===`gemini`?(0,B.jsx)(`span`,{className:`provider-active-badge`,children:`Active`}):(0,B.jsx)(`button`,{type:`button`,className:`btn-secondary btn-small`,onClick:()=>t(`aiProvider`,`gemini`),children:`Set active`})})]}),(0,B.jsxs)(`div`,{className:`provider-card-body`,children:[(0,B.jsxs)(`div`,{className:`setting-row`,children:[(0,B.jsx)(`label`,{children:`Gemini model`}),(0,B.jsxs)(`select`,{value:y.includes(e.geminiModel)?e.geminiModel:`custom`,onChange:e=>t(`geminiModel`,e.target.value),children:[y.map(e=>(0,B.jsx)(`option`,{value:e,children:e},e)),(0,B.jsx)(`option`,{value:`custom`,children:`Custom...`})]})]}),(!y.includes(e.geminiModel)||e.geminiModel===`custom`)&&(0,B.jsxs)(`div`,{className:`setting-row`,children:[(0,B.jsx)(`label`,{children:`Custom Gemini model`}),(0,B.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,B.jsxs)(`div`,{className:`setting-row`,children:[(0,B.jsx)(`label`,{children:`Gemini API Key`}),(0,B.jsx)(I,{value:e.apiKey,onChange:e=>t(`apiKey`,e),placeholder:`Enter Gemini API Key...`})]})]})]}),(0,B.jsxs)(`div`,{className:`provider-card ${e.aiProvider===`anthropic`?`active-provider`:``}`,children:[(0,B.jsxs)(`div`,{className:`provider-card-header`,children:[(0,B.jsxs)(`div`,{className:`provider-card-title`,children:[(0,B.jsx)(lt,{provider:`anthropic`}),`Anthropic Claude`]}),(0,B.jsx)(`div`,{className:`provider-card-actions`,children:e.aiProvider===`anthropic`?(0,B.jsx)(`span`,{className:`provider-active-badge`,children:`Active`}):(0,B.jsx)(`button`,{type:`button`,className:`btn-secondary btn-small`,onClick:()=>t(`aiProvider`,`anthropic`),children:`Set active`})})]}),(0,B.jsxs)(`div`,{className:`provider-card-body`,children:[(0,B.jsxs)(`div`,{className:`setting-row`,children:[(0,B.jsx)(`label`,{children:`Anthropic model`}),(0,B.jsxs)(`select`,{value:b.includes(e.anthropicModel)?e.anthropicModel:`custom`,onChange:e=>t(`anthropicModel`,e.target.value),children:[b.map(e=>(0,B.jsx)(`option`,{value:e,children:e},e)),(0,B.jsx)(`option`,{value:`custom`,children:`Custom...`})]})]}),(!b.includes(e.anthropicModel)||e.anthropicModel===`custom`)&&(0,B.jsxs)(`div`,{className:`setting-row`,children:[(0,B.jsx)(`label`,{children:`Custom Anthropic model`}),(0,B.jsx)(`input`,{type:`text`,value:u,onChange:e=>{d(e.target.value),t(`anthropicModel`,`custom`)},placeholder:`e.g. claude-3-5-sonnet-latest`})]}),(0,B.jsxs)(`div`,{className:`setting-row`,children:[(0,B.jsx)(`label`,{children:`Anthropic API Key`}),(0,B.jsx)(I,{value:e.anthropicApiKey,onChange:e=>t(`anthropicApiKey`,e),placeholder:`Enter Anthropic API Key...`})]})]})]}),(0,B.jsxs)(`div`,{className:`provider-card ${e.aiProvider===`openai`?`active-provider`:``}`,children:[(0,B.jsxs)(`div`,{className:`provider-card-header`,children:[(0,B.jsxs)(`div`,{className:`provider-card-title`,children:[(0,B.jsx)(lt,{provider:`openai`}),`OpenAI`]}),(0,B.jsx)(`div`,{className:`provider-card-actions`,children:e.aiProvider===`openai`?(0,B.jsx)(`span`,{className:`provider-active-badge`,children:`Active`}):(0,B.jsx)(`button`,{type:`button`,className:`btn-secondary btn-small`,onClick:()=>t(`aiProvider`,`openai`),children:`Set active`})})]}),(0,B.jsxs)(`div`,{className:`provider-card-body`,children:[(0,B.jsxs)(`div`,{className:`setting-row`,children:[(0,B.jsx)(`label`,{children:`OpenAI Model`}),(0,B.jsxs)(`select`,{value:x.includes(e.openaiModel)?e.openaiModel:`custom`,onChange:e=>t(`openaiModel`,e.target.value),children:[x.map(e=>(0,B.jsx)(`option`,{value:e,children:e},e)),(0,B.jsx)(`option`,{value:`custom`,children:`Custom...`})]})]}),(!x.includes(e.openaiModel)||e.openaiModel===`custom`)&&(0,B.jsxs)(`div`,{className:`setting-row`,children:[(0,B.jsx)(`label`,{children:`Custom OpenAI model`}),(0,B.jsx)(`input`,{type:`text`,value:i,onChange:e=>{a(e.target.value),t(`openaiModel`,`custom`)},placeholder:`e.g. gpt-4o`})]}),(0,B.jsxs)(`div`,{className:`setting-row`,children:[(0,B.jsx)(`label`,{children:`OpenAI API Key`}),(0,B.jsx)(I,{value:e.openaiApiKey,onChange:e=>t(`openaiApiKey`,e),placeholder:`Enter OpenAI API Key...`})]})]})]}),(0,B.jsxs)(`div`,{className:`provider-card ${e.aiProvider===`openrouter`?`active-provider`:``}`,children:[(0,B.jsxs)(`div`,{className:`provider-card-header`,children:[(0,B.jsxs)(`div`,{className:`provider-card-title`,children:[(0,B.jsx)(lt,{provider:`openrouter`}),`OpenRouter`]}),(0,B.jsx)(`div`,{className:`provider-card-actions`,children:e.aiProvider===`openrouter`?(0,B.jsx)(`span`,{className:`provider-active-badge`,children:`Active`}):(0,B.jsx)(`button`,{type:`button`,className:`btn-secondary btn-small`,onClick:()=>t(`aiProvider`,`openrouter`),children:`Set active`})})]}),(0,B.jsxs)(`div`,{className:`provider-card-body`,children:[(0,B.jsxs)(`div`,{className:`setting-row`,children:[(0,B.jsx)(`label`,{children:`OpenRouter Model`}),(0,B.jsx)(st,{value:E.includes(e.openrouterModel)?e.openrouterModel:`custom`,models:E,onChange:e=>t(`openrouterModel`,e),onCustomChange:e=>{s(e),t(`openrouterModel`,`custom`)},customValue:o,placeholder:`Select or search OpenRouter model...`})]}),(!E.includes(e.openrouterModel)||e.openrouterModel===`custom`)&&(0,B.jsxs)(`div`,{className:`setting-row`,children:[(0,B.jsx)(`label`,{children:`Custom OpenRouter model`}),(0,B.jsx)(`input`,{type:`text`,value:o,onChange:e=>{s(e.target.value),t(`openrouterModel`,`custom`)},placeholder:`e.g. anthropic/claude-3.5-sonnet`})]}),(0,B.jsxs)(`div`,{className:`setting-row`,children:[(0,B.jsx)(`label`,{children:`OpenRouter API Key`}),(0,B.jsx)(I,{value:e.openrouterApiKey,onChange:e=>t(`openrouterApiKey`,e),placeholder:`Enter OpenRouter API Key...`})]})]})]}),(0,B.jsxs)(`div`,{className:`provider-card ${e.aiProvider===`deepseek`?`active-provider`:``}`,children:[(0,B.jsxs)(`div`,{className:`provider-card-header`,children:[(0,B.jsxs)(`div`,{className:`provider-card-title`,children:[(0,B.jsx)(lt,{provider:`deepseek`}),`DeepSeek`]}),(0,B.jsx)(`div`,{className:`provider-card-actions`,children:e.aiProvider===`deepseek`?(0,B.jsx)(`span`,{className:`provider-active-badge`,children:`Active`}):(0,B.jsx)(`button`,{type:`button`,className:`btn-secondary btn-small`,onClick:()=>t(`aiProvider`,`deepseek`),children:`Set active`})})]}),(0,B.jsxs)(`div`,{className:`provider-card-body`,children:[(0,B.jsxs)(`div`,{className:`setting-row`,children:[(0,B.jsx)(`label`,{children:`DeepSeek Model`}),(0,B.jsxs)(`select`,{value:D.includes(e.deepseekModel)?e.deepseekModel:`custom`,onChange:e=>t(`deepseekModel`,e.target.value),children:[D.map(e=>(0,B.jsx)(`option`,{value:e,children:e},e)),(0,B.jsx)(`option`,{value:`custom`,children:`Custom...`})]})]}),(!D.includes(e.deepseekModel)||e.deepseekModel===`custom`)&&(0,B.jsxs)(`div`,{className:`setting-row`,children:[(0,B.jsx)(`label`,{children:`Custom DeepSeek model`}),(0,B.jsx)(`input`,{type:`text`,value:c,onChange:e=>{l(e.target.value),t(`deepseekModel`,`custom`)},placeholder:`e.g. deepseek-v4-pro`})]}),(0,B.jsxs)(`div`,{className:`setting-row`,children:[(0,B.jsx)(`label`,{children:`DeepSeek API Key`}),(0,B.jsx)(I,{value:e.deepseekApiKey,onChange:e=>t(`deepseekApiKey`,e),placeholder:`Enter DeepSeek API Key...`})]})]})]}),(0,B.jsxs)(`div`,{className:`provider-card ${e.aiProvider===`huggingface`?`active-provider`:``}`,children:[(0,B.jsxs)(`div`,{className:`provider-card-header`,children:[(0,B.jsxs)(`div`,{className:`provider-card-title`,children:[(0,B.jsx)(lt,{provider:`huggingface`}),`Hugging Face (Inference API)`]}),(0,B.jsx)(`div`,{className:`provider-card-actions`,children:e.aiProvider===`huggingface`?(0,B.jsx)(`span`,{className:`provider-active-badge`,children:`Active`}):(0,B.jsx)(`button`,{type:`button`,className:`btn-secondary btn-small`,onClick:()=>t(`aiProvider`,`huggingface`),children:`Set active`})})]}),(0,B.jsxs)(`div`,{className:`provider-card-body`,children:[(0,B.jsxs)(`div`,{className:`setting-row`,children:[(0,B.jsx)(`label`,{children:`Hugging Face model`}),(0,B.jsxs)(`select`,{value:ee.includes(e.hfModel)?e.hfModel:`custom`,onChange:e=>t(`hfModel`,e.target.value),children:[ee.map(e=>(0,B.jsx)(`option`,{value:e,children:e},e)),(0,B.jsx)(`option`,{value:`custom`,children:`Custom...`})]})]}),(!ee.includes(e.hfModel)||e.hfModel===`custom`)&&(0,B.jsxs)(`div`,{className:`setting-row`,children:[(0,B.jsx)(`label`,{children:`Custom Hugging Face model`}),(0,B.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,B.jsxs)(`div`,{className:`setting-row`,children:[(0,B.jsx)(`label`,{children:`Hugging Face API key`}),(0,B.jsx)(I,{value:e.hfApiKey,onChange:e=>t(`hfApiKey`,e),placeholder:`Enter Hugging Face API key...`})]})]})]}),(0,B.jsxs)(`div`,{className:`provider-card ${e.aiProvider===`local_openai`?`active-provider`:``}`,children:[(0,B.jsxs)(`div`,{className:`provider-card-header`,children:[(0,B.jsxs)(`div`,{className:`provider-card-title`,children:[(0,B.jsx)(lt,{provider:`local_openai`}),`LM Studio / Local OpenAI`]}),(0,B.jsx)(`div`,{className:`provider-card-actions`,children:e.aiProvider===`local_openai`?(0,B.jsx)(`span`,{className:`provider-active-badge`,children:`Active`}):(0,B.jsx)(`button`,{type:`button`,className:`btn-secondary btn-small`,onClick:()=>t(`aiProvider`,`local_openai`),children:`Set active`})})]}),(0,B.jsxs)(`div`,{className:`provider-card-body`,children:[(0,B.jsxs)(`div`,{className:`setting-row`,children:[(0,B.jsx)(`label`,{children:`LM Studio Model`}),(0,B.jsxs)(`select`,{value:A.includes(e.localModelName)?e.localModelName:`custom`,onChange:e=>t(`localModelName`,e.target.value),children:[A.map(e=>(0,B.jsx)(`option`,{value:e,children:e},e)),(0,B.jsx)(`option`,{value:`custom`,children:`Custom...`})]})]}),(!A.includes(e.localModelName)||e.localModelName===`custom`)&&(0,B.jsxs)(`div`,{className:`setting-row`,children:[(0,B.jsx)(`label`,{children:`Custom LM Studio Model`}),(0,B.jsx)(`input`,{type:`text`,value:m,onChange:e=>{h(e.target.value),t(`localModelName`,`custom`)},placeholder:`e.g. local-model`})]}),(0,B.jsxs)(`div`,{className:`setting-row`,children:[(0,B.jsx)(`label`,{children:`LM Studio Base URL`}),(0,B.jsx)(`input`,{type:`text`,value:e.localApiBaseUrl,onChange:e=>t(`localApiBaseUrl`,e.target.value),placeholder:`e.g. http://localhost:1234/v1`})]})]})]}),(0,B.jsxs)(`div`,{className:`provider-card ${e.aiProvider===`ollama`?`active-provider`:``}`,children:[(0,B.jsxs)(`div`,{className:`provider-card-header`,children:[(0,B.jsxs)(`div`,{className:`provider-card-title`,children:[(0,B.jsx)(lt,{provider:`ollama`}),`Ollama (Local)`]}),(0,B.jsx)(`div`,{className:`provider-card-actions`,children:e.aiProvider===`ollama`?(0,B.jsx)(`span`,{className:`provider-active-badge`,children:`Active`}):(0,B.jsx)(`button`,{type:`button`,className:`btn-secondary btn-small`,onClick:()=>t(`aiProvider`,`ollama`),children:`Set active`})})]}),(0,B.jsxs)(`div`,{className:`provider-card-body`,children:[(0,B.jsxs)(`div`,{className:`setting-row`,children:[(0,B.jsx)(`label`,{children:`Ollama model`}),(0,B.jsxs)(`select`,{value:v.includes(e.ollamaModel)?e.ollamaModel:`custom`,onChange:e=>t(`ollamaModel`,e.target.value),children:[v.map(e=>(0,B.jsx)(`option`,{value:e,children:e},e)),!v.includes(e.ollamaModel)&&e.ollamaModel&&e.ollamaModel!==`custom`&&(0,B.jsx)(`option`,{value:e.ollamaModel,children:e.ollamaModel}),(0,B.jsx)(`option`,{value:`custom`,children:`Custom...`})]})]}),(!v.includes(e.ollamaModel)||e.ollamaModel===`custom`)&&(0,B.jsxs)(`div`,{className:`setting-row`,children:[(0,B.jsx)(`label`,{children:`Custom Ollama model`}),(0,B.jsx)(`input`,{type:`text`,value:g,onChange:e=>{_(e.target.value),t(`ollamaModel`,`custom`)},placeholder:`e.g. llama3:latest`})]}),(0,B.jsxs)(`div`,{className:`setting-row`,children:[(0,B.jsx)(`label`,{children:`Ollama host`}),(0,B.jsx)(`input`,{type:`text`,value:e.ollamaHost,onChange:e=>t(`ollamaHost`,e.target.value),placeholder:`e.g. http://localhost:11434`})]})]})]})]})]}),(0,B.jsx)(`span`,{className:`section-current-badge`,children:be})),ye(`search`,`Web search`,`Search Provider`,`Choose which search API Mint uses when performing web lookups.`,(0,B.jsxs)(`div`,{className:`provider-cards-container`,children:[(0,B.jsxs)(`div`,{className:`provider-card ${e.searchProvider===`brave`?`active-provider`:``}`,children:[(0,B.jsxs)(`div`,{className:`provider-card-header`,children:[(0,B.jsxs)(`div`,{className:`provider-card-title`,children:[(0,B.jsx)(`svg`,{width:`14`,height:`14`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2.5`,strokeLinecap:`round`,strokeLinejoin:`round`,children:(0,B.jsx)(`path`,{d:`M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z`})}),`Brave Search API`]}),(0,B.jsx)(`div`,{className:`provider-card-actions`,children:e.searchProvider===`brave`?(0,B.jsx)(`span`,{className:`provider-active-badge`,children:`Active`}):(0,B.jsx)(`button`,{type:`button`,className:`btn-secondary btn-small`,onClick:()=>t(`searchProvider`,`brave`),children:`Set active`})})]}),(0,B.jsx)(`div`,{className:`provider-card-body`,children:(0,B.jsxs)(`div`,{className:`setting-row`,children:[(0,B.jsx)(`label`,{children:`Brave Search API key`}),(0,B.jsx)(I,{value:e.braveSearchApiKey,onChange:e=>t(`braveSearchApiKey`,e),placeholder:`Enter Brave Search API key...`})]})})]}),(0,B.jsxs)(`div`,{className:`provider-card ${e.searchProvider===`google`?`active-provider`:``}`,children:[(0,B.jsxs)(`div`,{className:`provider-card-header`,children:[(0,B.jsxs)(`div`,{className:`provider-card-title`,children:[(0,B.jsxs)(`svg`,{width:`14`,height:`14`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2.5`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,B.jsx)(`circle`,{cx:`11`,cy:`11`,r:`8`}),(0,B.jsx)(`line`,{x1:`21`,y1:`21`,x2:`16.65`,y2:`16.65`})]}),`Google Search API`]}),(0,B.jsx)(`div`,{className:`provider-card-actions`,children:e.searchProvider===`google`?(0,B.jsx)(`span`,{className:`provider-active-badge`,children:`Active`}):(0,B.jsx)(`button`,{type:`button`,className:`btn-secondary btn-small`,onClick:()=>t(`searchProvider`,`google`),children:`Set active`})})]}),(0,B.jsxs)(`div`,{className:`provider-card-body`,children:[(0,B.jsxs)(`div`,{className:`setting-row`,children:[(0,B.jsx)(`label`,{children:`Google Search API key`}),(0,B.jsx)(I,{value:e.googleSearchApiKey,onChange:e=>t(`googleSearchApiKey`,e),placeholder:`Enter Google Search API key...`})]}),(0,B.jsxs)(`div`,{className:`setting-row`,children:[(0,B.jsx)(`label`,{children:`Google Search engine ID (CX)`}),(0,B.jsx)(`input`,{type:`text`,value:e.googleSearchCx,onChange:e=>t(`googleSearchCx`,e.target.value),placeholder:`Enter Google Custom Search Engine ID (CX)...`})]})]})]}),(0,B.jsxs)(`div`,{className:`provider-card ${e.searchProvider===`searxng`?`active-provider`:``}`,children:[(0,B.jsxs)(`div`,{className:`provider-card-header`,children:[(0,B.jsxs)(`div`,{className:`provider-card-title`,children:[(0,B.jsxs)(`svg`,{width:`14`,height:`14`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2.5`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,B.jsx)(`circle`,{cx:`11`,cy:`11`,r:`8`}),(0,B.jsx)(`line`,{x1:`21`,y1:`21`,x2:`16.65`,y2:`16.65`})]}),`SearXNG (self-hosted)`]}),(0,B.jsx)(`div`,{className:`provider-card-actions`,children:e.searchProvider===`searxng`?(0,B.jsx)(`span`,{className:`provider-active-badge`,children:`Active`}):(0,B.jsx)(`button`,{type:`button`,className:`btn-secondary btn-small`,onClick:()=>t(`searchProvider`,`searxng`),children:`Set active`})})]}),(0,B.jsxs)(`div`,{className:`provider-card-body`,children:[(0,B.jsxs)(`div`,{className:`setting-row`,children:[(0,B.jsx)(`label`,{children:`SearXNG Instance URL`}),(0,B.jsx)(`input`,{type:`text`,value:e.searxngBaseUrl,onChange:e=>t(`searxngBaseUrl`,e.target.value),placeholder:`e.g. https://searx.example.com`})]}),(0,B.jsx)(`p`,{className:`hint`,children:`Self-hosted, no API key needed. The instance must have JSON output enabled (search.formats in settings.yml).`})]})]})]}),(0,B.jsx)(`span`,{className:`section-current-badge`,children:xe})),ye(`image_gen`,`AI image creation`,`Image Generation`,`Choose which image generation provider Mint uses.`,(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(`div`,{className:`form-grid compact`,children:(0,B.jsxs)(`div`,{className:`setting-row stacked`,children:[(0,B.jsx)(`label`,{children:`Active provider`}),(0,B.jsx)(`div`,{className:`pill-segmented`,role:`radiogroup`,"aria-label":`Image Provider`,children:pt.map(n=>(0,B.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,B.jsx)(`div`,{className:`provider-cards-container`,children:pt.map(n=>{let r=ne[n.id],i=r?S[r.listKey]??[]:[],a=r&&te?.[r.listKey]||i,o=r?.configField,s=o&&(e[o]||a[0]?.value)||``;return(0,B.jsxs)(`div`,{className:`provider-card ${e.imageGenProvider===n.id?`active-provider`:``}`,children:[(0,B.jsxs)(`div`,{className:`provider-card-header`,children:[(0,B.jsxs)(`div`,{className:`provider-card-title`,children:[mt,n.cardTitle]}),(0,B.jsx)(`div`,{className:`provider-card-actions`,children:e.imageGenProvider===n.id?(0,B.jsx)(`span`,{className:`provider-active-badge`,children:`Active`}):(0,B.jsx)(`button`,{type:`button`,className:`btn-secondary btn-small`,onClick:()=>t(`imageGenProvider`,n.id),children:`Set active`})})]}),(0,B.jsxs)(`div`,{className:`provider-card-body`,children:[o&&a.length>0&&(0,B.jsxs)(`div`,{className:`setting-row`,children:[(0,B.jsxs)(`label`,{children:[n.label,` Model`]}),(0,B.jsxs)(`select`,{value:s,onChange:e=>t(o,e.target.value),children:[a.map(e=>(0,B.jsx)(`option`,{value:e.value,children:e.label},e.value)),s&&!a.some(e=>e.value===s)&&(0,B.jsx)(`option`,{value:s,children:s},s)]})]}),n.keyField?(0,B.jsxs)(`div`,{className:`setting-row`,children:[(0,B.jsxs)(`label`,{children:[n.label,` API Key`]}),(0,B.jsx)(I,{value:e[n.keyField]||``,onChange:e=>t(n.keyField,e),placeholder:`Enter ${n.label} API Key...`})]}):(0,B.jsxs)(`p`,{className:`hint`,children:[`Uses your `,n.sharedKey,` API key — no extra key needed.`]})]})]},n.id)})})]}),(0,B.jsx)(`span`,{className:`section-current-badge`,children:F})),ye(`video_gen`,`AI video creation`,`Video Generation`,`Choose which video generation provider Mint uses.`,(0,B.jsx)(`div`,{className:`provider-cards-container`,children:(0,B.jsxs)(`div`,{className:`provider-card ${e.videoGenProvider===`veo`?`active-provider`:``}`,children:[(0,B.jsxs)(`div`,{className:`provider-card-header`,children:[(0,B.jsxs)(`div`,{className:`provider-card-title`,children:[(0,B.jsxs)(`svg`,{width:`14`,height:`14`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2.5`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,B.jsx)(`polygon`,{points:`23 7 16 12 23 17 23 7`}),(0,B.jsx)(`rect`,{x:`1`,y:`5`,width:`15`,height:`14`,rx:`2`,ry:`2`})]}),`Google Veo (Gemini Videos)`]}),(0,B.jsx)(`div`,{className:`provider-card-actions`,children:e.videoGenProvider===`veo`?(0,B.jsx)(`span`,{className:`provider-active-badge`,children:`Active`}):(0,B.jsx)(`button`,{type:`button`,className:`btn-secondary btn-small`,onClick:()=>t(`videoGenProvider`,`veo`),children:`Set active`})})]}),(0,B.jsxs)(`div`,{className:`provider-card-body`,children:[(0,B.jsx)(`p`,{className:`hint`,children:`Uses your Gemini API key — no extra key needed.`}),(0,B.jsxs)(`div`,{className:`setting-row`,children:[(0,B.jsx)(`label`,{children:`Default Veo model`}),(()=>{let n=re?.veo||ae.veo||[],r=e.veoModel||`veo-3.1-generate-preview`;return(0,B.jsxs)(`select`,{value:r,onChange:e=>{t(`veoModel`,e.target.value),Ve(`veoModel`,e.target.value,`video`)},children:[n.map(e=>(0,B.jsx)(`option`,{value:e.value,children:e.label},e.value)),r&&!n.some(e=>e.value===r)&&(0,B.jsx)(`option`,{value:r,children:r},r)]})})()]})]})]})}),(0,B.jsx)(`span`,{className:`section-current-badge`,children:Se})),ye(`custom_providers`,`Custom AI Routing`,`Custom Providers`,`Add any OpenAI-compatible endpoint as a custom provider. Configure its models and optional headers.`,(0,B.jsxs)(B.Fragment,{children:[(0,B.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)=>{a({models:n.models.map((n,r)=>r===e?{...n,...t}:n)})},c=e=>{a({models:n.models.filter((t,n)=>n!==e)})},l=()=>{a({models:[...n.models,{modelId:``,displayName:``}]})},u=(e,t)=>{a({headers:n.headers.map((n,r)=>r===e?{...n,...t}:n)})},d=e=>{a({headers:n.headers.filter((t,n)=>n!==e)})};return(0,B.jsxs)(`div`,{className:`provider-card ${i?`active-provider`:``}`,children:[(0,B.jsxs)(`div`,{className:`provider-card-header`,children:[(0,B.jsxs)(`div`,{className:`provider-card-title`,children:[n.logoDataUrl?(0,B.jsx)(`img`,{className:`settings-provider-logo custom-provider-logo`,src:n.logoDataUrl,alt:``}):(0,B.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,B.jsx)(`circle`,{cx:`12`,cy:`12`,r:`3`}),(0,B.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,B.jsxs)(`div`,{className:`provider-card-actions`,children:[i?(0,B.jsx)(`span`,{className:`provider-active-badge`,children:`Active`}):(0,B.jsx)(`button`,{type:`button`,className:`btn-secondary btn-small`,onClick:()=>t(`aiProvider`,`custom:${n.id}`),children:`Set active`}),(0,B.jsx)(`button`,{className:`btn btn-primary btn-xs`,onClick:()=>_e(n.id),title:`Save this provider settings`,children:ue===n.id?`Saved! ✓`:`Save`}),(0,B.jsx)(`button`,{className:`btn btn-danger btn-xs`,onClick:o,title:`Delete this provider`,children:`Delete`})]})]}),(0,B.jsxs)(`div`,{className:`provider-card-body`,children:[(0,B.jsxs)(`div`,{className:`setting-row`,children:[(0,B.jsx)(`label`,{children:`Name`}),(0,B.jsx)(`input`,{type:`text`,value:n.displayName,onChange:e=>{let t=e.target.value;a({displayName:t,id:t.toLowerCase().replace(/[^a-z0-9_-]/g,`-`).replace(/-+/g,`-`).replace(/^-|-$/g,``)||`provider-${r+1}`})},placeholder:`e.g. DeepSeek`})]}),(0,B.jsxs)(`div`,{className:`setting-row`,children:[(0,B.jsx)(`label`,{children:`Provider logo (optional)`}),(0,B.jsxs)(`div`,{className:`custom-provider-logo-picker`,children:[(0,B.jsx)(`div`,{className:`custom-provider-logo-preview`,"aria-hidden":`true`,children:n.logoDataUrl?(0,B.jsx)(`img`,{src:n.logoDataUrl,alt:``}):(0,B.jsx)(`span`,{children:`Logo`})}),(0,B.jsxs)(`label`,{className:`btn btn-secondary btn-xs custom-provider-logo-select`,children:[n.logoDataUrl?`Change image`:`Choose image`,(0,B.jsx)(`input`,{type:`file`,accept:`image/png,image/jpeg,image/webp`,onChange:e=>{ve(n.id,e.currentTarget.files?.[0]),e.currentTarget.value=``}})]}),n.logoDataUrl&&(0,B.jsx)(`button`,{type:`button`,className:`btn btn-secondary btn-xs`,onClick:()=>{a({logoDataUrl:void 0}),P(e=>{let t={...e};return delete t[n.id],t})},children:`Remove`}),(0,B.jsx)(`span`,{className:`custom-provider-logo-help`,children:`PNG, JPEG, or WebP · max 256 KB`}),fe[n.id]&&(0,B.jsx)(`span`,{className:`custom-provider-logo-error`,role:`alert`,children:fe[n.id]})]})]}),(0,B.jsxs)(`div`,{className:`setting-row`,children:[(0,B.jsx)(`label`,{children:`Base URL`}),(0,B.jsx)(`input`,{type:`text`,value:n.baseUrl,onChange:e=>a({baseUrl:e.target.value}),placeholder:`https://api.myprovider.com/v1`})]}),(0,B.jsxs)(`div`,{className:`setting-row`,children:[(0,B.jsx)(`label`,{children:`API Key`}),(0,B.jsx)(I,{value:n.apiKey,onChange:e=>a({apiKey:e}),placeholder:`Optional. Leave empty if you manage auth via headers.`})]}),(0,B.jsxs)(`div`,{children:[(0,B.jsx)(`label`,{className:`provider-sublist-label`,children:`Model list`}),n.models.map((e,t)=>(0,B.jsxs)(`div`,{className:`provider-sublist-row`,children:[(0,B.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,B.jsx)(`button`,{className:`btn btn-danger btn-xs`,onClick:()=>c(t),title:`Remove model`,children:`🗑`})]},t)),(0,B.jsx)(`button`,{className:`btn btn-secondary btn-xs sublist-add`,onClick:l,children:`+ Add model`})]}),(0,B.jsxs)(`div`,{children:[(0,B.jsx)(`label`,{className:`provider-sublist-label`,children:`Headers (optional)`}),n.headers.map((e,t)=>(0,B.jsxs)(`div`,{className:`provider-sublist-row`,children:[(0,B.jsx)(`input`,{type:`text`,value:e.name,onChange:e=>u(t,{name:e.target.value}),placeholder:`Header-Name`}),(0,B.jsx)(`input`,{type:`text`,value:e.value,onChange:e=>u(t,{value:e.target.value}),placeholder:`value`}),(0,B.jsx)(`button`,{className:`btn btn-danger btn-xs`,onClick:()=>d(t),title:`Remove header`,children:`🗑`})]},t)),(0,B.jsx)(`button`,{className:`btn btn-secondary btn-xs sublist-add`,onClick:()=>{a({headers:[...n.headers,{name:``,value:``}]})},children:`+ Add header`})]})]})]},r)})}),(0,B.jsx)(`div`,{className:`setting-actions`,children:(0,B.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,B.jsx)(`span`,{className:`section-current-badge`,children:Ce>0?`${Ce} added`:`None`})),le&&ye(`desktop_updates`,`Desktop updates`,`Signed Tauri Channel`,`Check and explicitly install signed Tauri releases from your configured update channel.`,(0,B.jsxs)(B.Fragment,{children:[(0,B.jsxs)(`div`,{className:`toggle-row`,children:[(0,B.jsxs)(`div`,{children:[(0,B.jsx)(`label`,{children:`Check signed update channel`}),(0,B.jsx)(`p`,{className:`hint`,children:`This flag does not install updates automatically.`})]}),(0,B.jsxs)(`label`,{className:`settings-toggle-switch`,children:[(0,B.jsx)(`input`,{type:`checkbox`,checked:e.enableAutoUpdate,onChange:e=>t(`enableAutoUpdate`,e.target.checked)}),(0,B.jsx)(`span`,{className:`settings-toggle-slider`})]})]}),(0,B.jsxs)(`div`,{className:`form-grid single`,children:[(0,B.jsxs)(`div`,{className:`setting-row`,children:[(0,B.jsx)(`label`,{children:`Updater endpoint`}),(0,B.jsx)(`input`,{type:`text`,value:e.updaterEndpoint,onChange:e=>t(`updaterEndpoint`,e.target.value),placeholder:`https://updates.example.com/latest.json`})]}),(0,B.jsxs)(`div`,{className:`setting-row`,children:[(0,B.jsx)(`label`,{children:`Updater public key`}),(0,B.jsx)(`textarea`,{value:e.updaterPublicKey,onChange:e=>t(`updaterPublicKey`,e.target.value),placeholder:`Minisign public key`})]})]}),(0,B.jsxs)(`div`,{className:`setting-actions`,children:[(0,B.jsx)(`button`,{type:`button`,className:`btn-connect`,onClick:ce,children:`Check for updates`}),oe&&(0,B.jsx)(`button`,{type:`button`,className:`btn-primary`,onClick:M,children:`Install signed update`})]}),se&&(0,B.jsx)(`p`,{className:`hint`,children:se})]}),(0,B.jsx)(`span`,{className:`section-current-badge`,children:e.enableAutoUpdate?`On`:`Off`})),le&&ye(`assistant_presence`,`Desktop`,`Assistant Presence`,`Configure the mini AI character desktop presence widget.`,(0,B.jsxs)(`div`,{className:`toggle-row`,children:[(0,B.jsxs)(`div`,{children:[(0,B.jsx)(`label`,{children:`Show Desktop AI candidate`}),(0,B.jsx)(`p`,{className:`hint`,children:`Show the mini AI character on your desktop.`})]}),(0,B.jsxs)(`label`,{className:`settings-toggle-switch`,children:[(0,B.jsx)(`input`,{type:`checkbox`,checked:e.showDesktopWidget,onChange:e=>t(`showDesktopWidget`,e.target.checked)}),(0,B.jsx)(`span`,{className:`settings-toggle-slider`})]})]}),(0,B.jsx)(`span`,{className:`section-current-badge`,children:e.showDesktopWidget?`On`:`Off`}))]})}var dt,B,ft,pt,mt,ht,gt,_t,vt=t((()=>{dt=e(l()),y(),Be(),we(),ot(),ct(),ce(),Ce(),de(),pe(),le(),P(),be(),se(),B=v(),ft={anthropic:{src:Ee,color:`#d97757`},deepseek:{src:oe},gemini:{src:fe},huggingface:{src:_e},local_openai:{src:ue,color:`#8b5cf6`},ollama:{src:Se,color:`#f3f4f6`},openai:{src:M,color:`#10a37f`},openrouter:{src:he}},pt=[{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`}],mt=(0,B.jsxs)(`svg`,{width:`14`,height:`14`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2.5`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,B.jsx)(`rect`,{x:`3`,y:`3`,width:`18`,height:`18`,rx:`2`,ry:`2`}),(0,B.jsx)(`circle`,{cx:`8.5`,cy:`8.5`,r:`1.5`}),(0,B.jsx)(`polyline`,{points:`21 15 16 10 5 21`})]}),ht={brave:`Brave`,google:`Google`,searxng:`SearXNG`},gt={gemini:`NanoBanana`,dalle:`DALL·E`,stability:`Stability`,ideogram:`Ideogram`,replicate:`Replicate`,bfl:`FLUX`},_t={veo:`Veo`}})),yt=t((()=>{vt()}));function bt({imageSrc:e,fileName:t,onClose:n,onConfirm:r}){let[i,a]=(0,V.useState)(1),[o,s]=(0,V.useState)(0),[c,l]=(0,V.useState)({x:0,y:0}),[u,d]=(0,V.useState)(!1),[f,p]=(0,V.useState)({width:0,height:0}),m=(0,V.useRef)(!1),h=(0,V.useRef)({x:0,y:0}),g=(0,V.useRef)(null),_=(0,V.useRef)(1),v=(0,V.useRef)(null);(0,V.useEffect)(()=>{let t=new Image;t.onload=()=>{p({width:t.naturalWidth,height:t.naturalHeight})},t.src=e},[e]);let y=!f.width||!f.height?1:Math.max(xt/f.width,xt/f.height),b=(0,V.useRef)(i);b.current=i;let x=(0,V.useRef)(o);x.current=o;let S=(0,V.useCallback)((e,t,n)=>{if(!f.width||!f.height)return e;let r=n%180!=0,i=r?f.height:f.width,a=r?f.width:f.height,o=i*y*t,s=a*y*t,c=Math.max(0,(o-xt)/2),l=Math.max(0,(s-xt)/2);return{x:Math.min(Math.max(e.x,-c),c),y:Math.min(Math.max(e.y,-l),l)}},[f.width,f.height,y]),C=e=>{e.preventDefault(),m.current=!0,h.current={x:e.clientX-c.x,y:e.clientY-c.y}},w=(0,V.useCallback)(e=>{m.current&&l(S({x:e.clientX-h.current.x,y:e.clientY-h.current.y},b.current,x.current))},[S]),T=(0,V.useCallback)(()=>{m.current=!1},[]);(0,V.useEffect)(()=>(window.addEventListener(`mousemove`,w),window.addEventListener(`mouseup`,T),()=>{window.removeEventListener(`mousemove`,w),window.removeEventListener(`mouseup`,T)}),[w,T]);let E=e=>{e.touches.length===1?(m.current=!0,h.current={x:e.touches[0].clientX-c.x,y:e.touches[0].clientY-c.y}):e.touches.length===2&&(m.current=!1,g.current=Math.hypot(e.touches[0].clientX-e.touches[1].clientX,e.touches[0].clientY-e.touches[1].clientY),_.current=i)},D=e=>{if(e.touches.length===1&&m.current)l(S({x:e.touches[0].clientX-h.current.x,y:e.touches[0].clientY-h.current.y},i,o));else if(e.touches.length===2&&g.current){let t=Math.hypot(e.touches[0].clientX-e.touches[1].clientX,e.touches[0].clientY-e.touches[1].clientY)/g.current,n=Math.min(Math.max(_.current*t,1),3.5);a(n),l(e=>S(e,n,o))}},O=()=>{m.current=!1,g.current=null},k=e=>{let t=Math.min(Math.max(e,1),3.5);a(t),l(e=>S(e,t,o))};return(0,H.jsx)(`div`,{className:`crop-modal-overlay`,onClick:n,children:(0,H.jsxs)(`div`,{className:`crop-modal-card`,onClick:e=>e.stopPropagation(),children:[(0,H.jsxs)(`div`,{className:`crop-modal-header`,children:[(0,H.jsx)(`button`,{type:`button`,className:`crop-modal-back-btn`,onClick:n,"aria-label":`Back`,title:`ย้อนกลับ / ยกเลิก`,children:(0,H.jsxs)(`svg`,{width:`20`,height:`20`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2.2`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,H.jsx)(`line`,{x1:`19`,y1:`12`,x2:`5`,y2:`12`}),(0,H.jsx)(`polyline`,{points:`12 19 5 12 12 5`})]})}),(0,H.jsx)(`h3`,{className:`crop-modal-title`,children:`ครอบตัดและหมุน`}),(0,H.jsx)(`button`,{type:`button`,className:`crop-modal-reset-btn`,onClick:()=>{a(1),s(0),l({x:0,y:0})},title:`รีเซ็ตตำแหน่งและการหมุน`,children:`รีเซ็ต`})]}),(0,H.jsxs)(`div`,{className:`crop-modal-stage`,children:[(0,H.jsxs)(`div`,{className:`crop-viewport`,style:{width:`${xt}px`,height:`${xt}px`},onMouseDown:C,onTouchStart:E,onTouchMove:D,onTouchEnd:O,onWheel:e=>{e.preventDefault(),k(i+(e.deltaY<0?.08:-.08))},children:[e&&(0,H.jsx)(`img`,{ref:v,src:e,alt:`Crop preview`,className:`crop-image`,draggable:!1,style:{transform:`translate(calc(-50% + ${c.x}px), calc(-50% + ${c.y}px)) rotate(${o}deg) scale(${y*i})`}}),(0,H.jsx)(`div`,{className:`crop-mask-circle`}),(0,H.jsx)(`div`,{className:`crop-bracket crop-bracket-tl`}),(0,H.jsx)(`div`,{className:`crop-bracket crop-bracket-tr`}),(0,H.jsx)(`div`,{className:`crop-bracket crop-bracket-bl`}),(0,H.jsx)(`div`,{className:`crop-bracket crop-bracket-br`})]}),(0,H.jsx)(`p`,{className:`crop-hint-drag`,children:`ลากเพื่อเลื่อนตำแหน่ง · เลื่อนล้อเมาส์เพื่อซูม`})]}),(0,H.jsxs)(`div`,{className:`crop-modal-controls`,children:[(0,H.jsxs)(`div`,{className:`crop-zoom-row`,children:[(0,H.jsx)(`button`,{type:`button`,className:`crop-zoom-btn`,onClick:()=>k(i-.15),title:`ซูมออก`,disabled:i<=1,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)(`line`,{x1:`5`,y1:`12`,x2:`19`,y2:`12`})})}),(0,H.jsx)(`input`,{type:`range`,min:`1`,max:`3`,step:`0.01`,value:i,onChange:e=>k(parseFloat(e.target.value)),className:`crop-zoom-slider range-slider`,"aria-label":`Zoom`}),(0,H.jsx)(`button`,{type:`button`,className:`crop-zoom-btn`,onClick:()=>k(i+.15),title:`ซูมเข้า`,disabled:i>=3,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)(`line`,{x1:`12`,y1:`5`,x2:`12`,y2:`19`}),(0,H.jsx)(`line`,{x1:`5`,y1:`12`,x2:`19`,y2:`12`})]})})]}),(0,H.jsx)(`div`,{className:`crop-rotate-row`,children:(0,H.jsxs)(`button`,{type:`button`,className:`crop-rotate-btn`,onClick:()=>{let e=(o+90)%360;s(e),l(t=>S(t,i,e))},title:`หมุน 90 องศา`,children:[(0,H.jsx)(`div`,{className:`crop-rotate-icon`,children:(0,H.jsx)(`svg`,{width:`20`,height:`20`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,children:(0,H.jsx)(`path`,{d:`M21.5 2v6h-6M21.34 15.57a10 10 0 1 1-.57-8.38l5.67-5.67`})})}),(0,H.jsx)(`span`,{className:`crop-rotate-label`,children:`หมุน`})]})}),(0,H.jsxs)(`div`,{className:`crop-actions-row`,children:[(0,H.jsx)(`button`,{type:`button`,className:`btn-secondary crop-btn-cancel`,onClick:n,disabled:u,children:`ยกเลิก`}),(0,H.jsx)(`button`,{type:`button`,className:`btn-primary crop-btn-confirm`,onClick:async()=>{if(!(!f.width||!f.height)){d(!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=St,n.height=St;let a=n.getContext(`2d`);if(!a)throw Error(`Could not get canvas context`);a.imageSmoothingEnabled=!0,a.imageSmoothingQuality=`high`;let s=St/xt;a.translate(St/2+c.x*s,St/2+c.y*s),a.rotate(o*Math.PI/180);let l=y*i*s;a.scale(l,l),a.drawImage(t,-f.width/2,-f.height/2,f.width,f.height),await r(n.toDataURL(`image/jpeg`,.95))}catch(e){console.error(`Failed to crop image:`,e),alert(`Failed to process image.`)}finally{d(!1)}}},disabled:u,children:u?`กำลังบันทึก…`:`ถัดไป`})]})]})]})})}var V,H,xt,St,Ct=t((()=>{V=e(l()),H=v(),xt=280,St=512}));function wt({name:e,setName:t,imageUrl:n,setImageUrl:r}){let{user:a,avatarUrl:o,refreshUser:s}=h(),[c,l]=(0,Tt.useState)(!1),[u,d]=(0,Tt.useState)(null),[f,p]=(0,Tt.useState)(null),m=(0,Tt.useRef)(null);return a?(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:m,accept:`image/*`,style:{display:`none`},onChange:async e=>{let t=e.target.files?.[0];if(e.target.value=``,t){if(!t.type.startsWith(`image/`)){d(`Please select a valid image file.`);return}d(null);try{p({imageSrc:await new Promise((e,n)=>{let r=new FileReader;r.onload=()=>e(r.result),r.onerror=n,r.readAsDataURL(t)}),fileName:t.name})}catch(e){console.error(`Failed to read image file:`,e),d(`Failed to read selected image.`)}}}}),(0,U.jsx)(`div`,{className:`profile-avatar profile-avatar-lg`,onClick:()=>m.current?.click(),children:o?(0,U.jsx)(`img`,{src:o,alt:e||`User`}):(e?.[0]||a.email?.[0]||`U`).toUpperCase()}),(0,U.jsxs)(`div`,{className:`profile-header-meta`,children:[(0,U.jsx)(`p`,{className:`profile-header-name`,children:e||a.email||`User`}),a.email&&(0,U.jsx)(`p`,{className:`profile-header-email`,children:a.email}),(0,U.jsxs)(`div`,{className:`profile-header-actions`,children:[(0,U.jsx)(`button`,{type:`button`,className:`btn-secondary btn-small`,onClick:()=>m.current?.click(),disabled:c,children:c?`Uploading…`:`Upload Photo`}),(0,U.jsx)(`span`,{className:`hint`,children:`Click the picture or use the button to change it. Uploads are saved immediately.`})]}),u&&(0,U.jsx)(`p`,{className:`profile-message-error`,children:u})]})]}),(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=...`})})]})]})]}),f&&(0,U.jsx)(bt,{imageSrc:f.imageSrc,fileName:f.fileName,onClose:()=>p(null),onConfirm:async e=>{if(f){l(!0),d(null);try{let t=await i.authUploadAvatar(e,f.fileName);r(t.image||``),s(t),p(null)}catch(e){console.error(`Avatar upload error:`,e),d(`Failed to upload image.`)}finally{l(!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 Tt,U,Et=t((()=>{Tt=e(l()),n(),g(),Ct(),U=v()})),Dt=t((()=>{Et()}));function Ot({userName:e,setUserName:t,userPreferences:n,setUserPreferences:r}){return(0,W.jsx)(`div`,{className:`tab-pane active animate-fade-in`,style:{display:`flex`,flexDirection:`column`,gap:`24px`},children:(0,W.jsxs)(`section`,{className:`setting-section`,children:[(0,W.jsx)(`div`,{className:`section-heading`,children:(0,W.jsxs)(`div`,{children:[(0,W.jsx)(`p`,{className:`section-kicker`,children:`Cross-session Memory`}),(0,W.jsx)(`h2`,{className:`section-title`,children:`User profile & preferences`})]})}),(0,W.jsxs)(`div`,{className:`form-grid single`,children:[(0,W.jsxs)(`div`,{className:`setting-row`,children:[(0,W.jsx)(`label`,{children:`Your name / nickname`}),(0,W.jsxs)(`div`,{className:`memory-field-container`,children:[(0,W.jsx)(`input`,{type:`text`,value:e,onChange:e=>t(e.target.value),placeholder:`e.g. Pheem, Jane`}),(0,W.jsx)(`p`,{className:`hint`,children:`Used by the assistant to address you in conversation.`})]})]}),(0,W.jsxs)(`div`,{className:`setting-row`,children:[(0,W.jsx)(`label`,{children:`Custom instructions & preferences`}),(0,W.jsxs)(`div`,{className:`memory-field-container`,children:[(0,W.jsx)(`textarea`,{value:n,onChange:e=>r(e.target.value),placeholder:`e.g. Explain coding concepts step-by-step. Prefer TypeScript. Talk in Thai. Keep explanations concise.`,style:{minHeight:`120px`,resize:`vertical`}}),(0,W.jsx)(`p`,{className:`hint`,children:`Preferences, guidelines, or persona instructions for the assistant.`})]})]})]})]})})}var W,kt=t((()=>{l(),W=v()})),At=t((()=>{kt()}));function jt(e){let[t,n]=(0,Mt.useState)(Nt),[r,i]=(0,Mt.useState)(!1),a=(0,Mt.useRef)(0);return(0,Mt.useEffect)(()=>{if(n(Nt),!e.trim())return;let t=++a.current;i(!0),c(e).then(e=>{if(t===a.current&&e&&e.length>0){let t=[...e];for(let e of Nt)t.includes(e)||t.push(e);n(t)}}).catch(()=>{}).finally(()=>{t===a.current&&i(!1)})},[e]),{models:t,loading:r}}var Mt,Nt,Pt=t((()=>{Mt=e(l()),y(),m(),Nt=[...b]}));function Ft({config:e,updateField:t,apiKey:n}){let[r,i]=(0,It.useState)(!1),{models:a,loading:o}=jt(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)(`select`,{value:s?`custom`:e.geminiLiveModel,onChange:e=>{e.target.value===`custom`?i(!0):(i(!1),t(`geminiLiveModel`,e.target.value))},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)(`select`,{value:e.geminiLiveVoice,onChange:e=>t(`geminiLiveVoice`,e.target.value),children:te.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 It,G,Lt=t((()=>{It=e(l()),y(),Pt(),G=v()})),Rt=t((()=>{Lt()}));function zt({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.jsxs)(`div`,{className:`form-grid single`,children:[(0,K.jsxs)(`div`,{className:`setting-row`,children:[(0,K.jsx)(`label`,{children:`Browser engine`}),(0,K.jsx)(`div`,{className:`pill-segmented`,role:`radiogroup`,"aria-label":`Browser engine`,children:[{id:`chromium`,label:`Chromium`},{id:`/usr/bin/firefox`,label:`Firefox`}].map(n=>(0,K.jsx)(`button`,{type:`button`,role:`radio`,"aria-checked":e.automationBrowser===n.id,className:`pill-segmented-btn ${e.automationBrowser===n.id?`active`:``}`,onClick:()=>t(`automationBrowser`,n.id),children:n.label},n.id))}),(0,K.jsx)(`p`,{className:`hint`,children:`Chromium is bundled; Firefox uses your system install (Linux).`})]}),(0,K.jsxs)(`div`,{className:`setting-row`,children:[(0,K.jsx)(`label`,{children:`Chromium DevTools endpoint`}),(0,K.jsx)(`input`,{type:`text`,value:e.browserDebugUrl,onChange:e=>t(`browserDebugUrl`,e.target.value)}),(0,K.jsx)(`p`,{className:`hint`,children:`Required for native tab reading and selector clicks.`})]}),(0,K.jsxs)(`div`,{className:`setting-row`,children:[(0,K.jsx)(`label`,{children:`Browser extension context endpoint`}),(0,K.jsx)(`input`,{type:`text`,value:e.browserExtensionContextUrl,onChange:e=>t(`browserExtensionContextUrl`,e.target.value)}),(0,K.jsx)(`p`,{className:`hint`,children:`Fallback endpoint used when Chromium remote debugging is unavailable.`})]})]})]}),(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:`Write a skill after finishing a hard task`}),(0,K.jsx)(`p`,{className:`hint`,children:`Saves a reusable skill after a multi-step task, so it won't have to re-derive the solution next time.`})]}),(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)(`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)(I,{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)(I,{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)(I,{className:`bridge-input`,placeholder:`Slack Bot Token (xoxb-...)`,value:e.slackBotToken,onChange:e=>t(`slackBotToken`,e)}),(0,K.jsx)(I,{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)(I,{className:`bridge-input`,placeholder:`LINE Channel Access Token`,value:e.lineChannelAccessToken,onChange:e=>t(`lineChannelAccessToken`,e)}),(0,K.jsx)(I,{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)(I,{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)(I,{className:`bridge-input`,placeholder:`WhatsApp Verify Token`,value:e.whatsappVerifyToken,onChange:e=>t(`whatsappVerifyToken`,e)}),(0,K.jsx)(I,{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,Bt=t((()=>{l(),ot(),K=v()})),Vt=t((()=>{Bt()})),Ht,Ut,Wt=t((()=>{Ht=[{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`}],Ut=[{id:`preset-dark-mint`,name:`Dark Mint`,description:`Black background · Green elements · White text`,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-dark-mono`,name:`Dark Monochrome`,description:`Black background · White elements · White text`,theme:`dark`,accentColor:`#ffffff`,systemTextColor:`#f8fafc`,chatTextColor:`#f8fafc`,bgPreview:`#0a0a0c`,panelPreview:`#18181b`,accentPreview:`#ffffff`,textPreview:`#f8fafc`}]}));function Gt({config:e,updateField:t,updateFields:n}){let[r,i]=(0,Kt.useState)(!1),a=t=>e.theme===t.theme?(e.accentColor||``).toLowerCase()===t.accentColor.toLowerCase():!1,o=e=>{let r={theme:e.theme,accentColor:e.accentColor,systemTextColor:e.systemTextColor,chatTextColor:e.chatTextColor,surfaceStyle:e.theme===`light`?`opaque`:`glass`};n?n(r):(t(`theme`,e.theme),t(`accentColor`,e.accentColor),t(`systemTextColor`,e.systemTextColor),t(`chatTextColor`,e.chatTextColor),t(`surfaceStyle`,r.surfaceStyle))},s=e=>{n?n({accentColor:e.color}):t(`accentColor`,e.color)},c=[{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`})})}],l=(e.accentColor||``).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:Ut.map((e,t)=>{let n=a(e);return(0,q.jsxs)(`button`,{type:`button`,role:`radio`,"aria-checked":n,className:`theme-preset-card ${n?`active`:``}`,onClick:()=>o(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:c.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:()=>{r.id===`light`?n?n({theme:`light`,surfaceStyle:`opaque`}):(t(`theme`,`light`),t(`surfaceStyle`,`opaque`)):t(`theme`,r.id)},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:Ht.map(e=>{let t=l===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:()=>s(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.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)(`select`,{value:e.fontFamily,onChange:e=>t(`fontFamily`,e.target.value),children:[(0,q.jsx)(`option`,{value:`'Prompt', sans-serif`,children:`Prompt (Thai & Latin - Default)`}),(0,q.jsx)(`option`,{value:`'Outfit', sans-serif`,children:`Outfit (Geometric Modern)`}),(0,q.jsx)(`option`,{value:`'Inter', sans-serif`,children:`Inter (Clean Sans-Serif)`}),(0,q.jsx)(`option`,{value:`'Prompt', sans-serif`,children:`Prompt (Modern Thai)`}),(0,q.jsx)(`option`,{value:`'Noto Sans Thai', sans-serif`,children:`Noto Sans Thai (clean Thai)`}),(0,q.jsx)(`option`,{value:`'Sarabun', sans-serif`,children:`Sarabun (Formal Thai)`}),(0,q.jsx)(`option`,{value:`'Kanit', sans-serif`,children:`Kanit (Trendy Thai)`}),(0,q.jsx)(`option`,{value:`'Mitr', sans-serif`,children:`Mitr (Friendly Thai)`}),(0,q.jsx)(`option`,{value:`'Mali', cursive`,children:`Mali (Cute Thai Font)`}),(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 Kt,q,qt=t((()=>{Kt=e(l()),Wt(),q=v()})),Jt=t((()=>{qt()}));function Yt(e){return!!(e.is_workspace||e.location===`workspace`)}function Xt({config:e,updateField:t,mcpName:n,setMcpName:r,mcpCmd:i,setMcpCmd:a,mcpArgs:o,setMcpArgs:s,mcpEnv:c,setMcpEnv:l,mcpIcon:u=``,setMcpIcon:d,handleAddMcpServer:f,handleRemoveMcpServer:p,handleConnectPlugin:m}){let[h,g]=(0,J.useState)([]),[_,v]=(0,J.useState)(``),[y,b]=(0,J.useState)(``),[S,C]=(0,J.useState)(!1),[w,T]=(0,J.useState)(``),[D,O]=(0,J.useState)({docker:!1,git:!1,gh:!1,node:!1}),[k,A]=(0,J.useState)(!1),[j,ee]=(0,J.useState)([]),[te,ne]=(0,J.useState)(null),[re,ie]=(0,J.useState)(null),[ae,oe]=(0,J.useState)(null),[se,ce]=(0,J.useState)(!1);(0,J.useEffect)(()=>{ue(),de(),M();let e=Me(()=>{M()});return()=>{e()}},[]);let M=async()=>{try{ee(await ze())}catch(e){console.error(`Failed to fetch OAuth statuses:`,e)}},le=async(t,n)=>{if(t===`spotify`&&!e.spotifyClientId?.trim()){ie(n||`spotify`),alert(`Please click "Configure" below and enter your Spotify Client ID before signing in (Get it from developer.spotify.com/dashboard)`);return}if(t===`github`&&!e.githubClientId?.trim()&&!e.githubToken?.trim()){ie(n||`github`),alert(`Please click "Configure" below and enter your GitHub Client ID (or Personal Access Token) before signing in.`);return}if(t===`vercel`&&!e.vercelClientId?.trim()&&!e.vercelToken?.trim()){ie(n||`vercel`),alert(`Please click "Configure" below and enter your Vercel Client ID (or Access Token) before signing in.`);return}if((t===`google`||t===`gmail`||t===`google_calendar`)&&!e.gmailClientId?.trim()&&!e.googleCalendarClientId?.trim()){ie(n||`gmail`),alert(`Please click "Configure" below and enter your Google Client ID before signing in.`);return}ne(t);try{await Pe(t)}catch(e){console.error(`OAuth login error for ${t}:`,e)}finally{ne(null),M()}},N=async e=>{try{await Le(e),await M()}catch(t){console.error(`OAuth revoke error for ${e}:`,t)}},ue=async()=>{C(!0),T(``);try{g(await Zt(window.localStorage.getItem(`mint:last-workspace-path`)||void 0))}catch(e){console.error(`Failed to fetch learned skills:`,e),T(`Failed to load learned skills`)}finally{C(!1)}},de=async()=>{A(!0);try{O(await en())}catch(e){console.error(`Failed to detect system tools:`,e)}finally{A(!1)}},fe=async e=>{if(e.preventDefault(),!(!_.trim()||!y.trim()))try{await Qt(_.trim(),y.trim()),v(``),b(``),ue()}catch(e){console.error(`Failed to add learned skill:`,e),alert(`Error saving skill`)}},P=async e=>{if(confirm(`Are you sure you want to forget skill "${e}"?`))try{await $t(e),ue()}catch(e){console.error(`Failed to delete skill:`,e),alert(`Error deleting skill`)}},pe=(n,r,i)=>{let a={...e.mcpServers||{}};a[n]&&(a[n]={...a[n],[r]:i},t(`mcpServers`,a))},me=e=>{ie(t=>t===e?null:e)},he=x,ge=(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)},_e=[];return Object.entries(e.mcpServers||{}).forEach(([e,t])=>{let n=`🔌`;e===`docker`&&(n=`🐳`),(e===`git`||e===`github`)&&(n=`🐙`),_e.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(` `)}`})}),D.docker&&!e.mcpServers?.docker&&_e.push({name:`docker`,command:`npx`,args:[`-y`,`@proxeus/mcp-docker-server`],icon:`🐳`,isEnabled:!1,isConfigured:!1,description:`Docker MCP Server (Discovered)`}),D.git&&!e.mcpServers?.git&&_e.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`})]})}),h.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:h.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 ${Yt(e)?`ok`:`info`}`,children:Yt(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:()=>P(e.name),children:`Forget`})]},e.name))}),(0,Y.jsxs)(`form`,{className:`add-skill-box`,onSubmit:fe,children:[(0,Y.jsx)(`h3`,{children:`Teach new skill`}),w&&(0,Y.jsx)(`p`,{className:`profile-message-error`,children:w}),(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:_,onChange:e=>v(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
|
|
2
|
-
Write only clean TypeScript. Use async/await.`,value:y,onChange:e=>b(e.target.value),rows:5})]}),(0,Y.jsx)(`button`,{type:`submit`,className:`btn-primary btn-full`,disabled:S,children:S?`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:_e.length===0?(0,Y.jsx)(`div`,{className:`mcp-empty-notice`,children:`No MCP servers configured or discovered.`}):_e.map(n=>{let r=ae===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:E(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:()=>oe(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:()=>p(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=>{ge(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=>pe(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=>pe(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=>pe(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);pe(n.name,`env`,t)}catch{}},rows:3})]}),(0,Y.jsx)(Ae,{serverName:n.name,config:e,updateField:t,listServerTools:tn})]})]},n.name)})}),(0,Y.jsxs)(`div`,{className:`add-mcp-box`,children:[(0,Y.jsx)(`h3`,{children:`Add MCP Server`}),(0,Y.jsx)(je,{configuredNames:Object.keys(e.mcpServers||{}),onPick:(e,t,n)=>{r(e.key),a(e.command),s([...e.args||[],...t].join(` `)),l(Object.keys(n).length?JSON.stringify(n,null,2):``),d&&d(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:n,onChange:e=>r(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:i,onChange:e=>a(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=>s(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:u,onChange:e=>d&&d(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:c,onChange:e=>l(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:se,onChange:e=>ce(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:()=>{f(se),ce(!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:he.map(n=>{let r=Ne(e,n),i=re===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:E(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=j.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&&(j.find(e=>e.provider===n.oauthProvider)?.connected?(0,Y.jsx)(`button`,{className:`btn-danger btn-sm`,onClick:()=>N(n.oauthProvider),children:`Disconnect`}):(0,Y.jsx)(`button`,{className:`btn-primary btn-sm`,onClick:()=>le(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:()=>me(n.key),children:i?`Hide Config`:`Configure`}),n.key===`discord`&&r&&(0,Y.jsx)(`button`,{className:`btn-secondary btn-sm`,onClick:()=>m(`discord`),children:`Update RPC`}),(0,Y.jsxs)(`label`,{className:`settings-toggle-switch`,children:[(0,Y.jsx)(`input`,{type:`checkbox`,checked:r,onChange:r=>{Ie(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,Zt,Qt,$t,en,tn,nn=t((()=>{J=e(l()),g(),Oe(),ke(),Fe(),D(),Re(),Y=v(),{listLearnedSkills:Zt,addLearnedSkill:Qt,deleteLearnedSkill:$t,detectSystemTools:en,listMcpServerTools:tn}=_})),rn=t((()=>{nn()}));function an({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||ee[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:/,``);f((e.customProviders??[]).find(e=>e.id===n)?.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)},E=()=>{o(null),c(``),u(`gemini`),f(`gemini-2.5-flash`),m(``),g(``),v(!0)},D=[{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),O=[],k=``;if(l===`gemini`)O=r.gemini,k=e.geminiModel;else if(l===`openai`)O=r.openai,k=e.openaiModel;else if(l===`openrouter`)O=r.openrouter,k=e.openrouterModel;else if(l===`deepseek`)O=r.deepseek,k=e.deepseekModel;else if(l===`anthropic`)O=r.anthropic,k=e.anthropicModel;else if(l===`huggingface`)O=ee,k=e.hfModel;else if(l===`local_openai`)O=r.local_openai,k=e.localModelName;else if(l===`ollama`)O=n,k=e.ollamaModel;else if(l.startsWith(`custom:`)){let t=l.replace(/^custom:/,``);O=(e.customProviders??[]).find(e=>e.id===t)?.models.map(e=>e.modelId)??[],k=O[0]??``}let A=k?[k,...O.filter(e=>e!==k)]:O,j=!A.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:E,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)(`select`,{value:l,onChange:e=>y(e.target.value),children:D.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)(`select`,{value:j?`custom`:d,onChange:e=>{let t=e.target.value;f(t===`custom`?``:t)},children:[A.map(e=>(0,Z.jsx)(`option`,{value:e,children:e},e)),(0,Z.jsx)(`option`,{value:`custom`,children:`Custom...`})]})]}),j&&(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)(I,{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)(on,{})]})}function on(){let[e,t]=(0,X.useState)([]),[n,r]=(0,X.useState)(!0),[i,a]=(0,X.useState)(``),[o,s]=(0,X.useState)(!1),[c,l]=(0,X.useState)(null),[u,d]=(0,X.useState)(dn),f=typeof window<`u`&&window.localStorage.getItem(`mint:last-workspace-path`)||void 0,p=async()=>{r(!0),a(``);try{t(await sn(f))}catch(e){a(e instanceof Error?e.message:`Failed to load subagents.`)}finally{r(!1)}};(0,X.useEffect)(()=>{p()},[]);let m=()=>{s(!1),l(null),d(dn)},h=()=>{l(null),d({...dn,scope:f?`workspace`:`global`}),s(!0)},g=e=>{l(e.sourcePath),d({name:e.name,description:e.description,tools:e.tools?.join(`, `)??``,model:e.model??``,provider:e.provider??``,systemPrompt:e.systemPrompt,scope:un(e.sourcePath)?`workspace`:`global`}),s(!0)},_=async()=>{if(!u.name.trim()){alert(`Please enter a subagent name.`);return}if(!u.systemPrompt.trim()){alert(`Please describe what this subagent should do (its system prompt).`);return}let e={name:u.name.trim(),description:u.description.trim(),tools:u.tools.trim()?u.tools.split(`,`).map(e=>e.trim()).filter(Boolean):null,model:u.model.trim()||null,provider:u.provider.trim()||null,systemPrompt:u.systemPrompt,scope:u.scope,previousSourcePath:c};try{await cn(e,f),m(),await p()}catch(e){alert(e instanceof Error?e.message:`Failed to save subagent.`)}},v=async e=>{if(confirm(`Delete subagent "${e.name}"?`))try{await ln(e.sourcePath),await p()}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_subagent`}),(0,Z.jsx)(`h2`,{className:`section-title`,children:`Subagents`})]}),!o&&(0,Z.jsx)(`button`,{className:`btn btn-primary`,onClick:h,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 a sub-task to 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.`}),o?(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:c?`Edit Subagent: ${u.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:u.name,onChange:e=>d({...u,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:u.description,onChange:e=>d({...u,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:u.systemPrompt,onChange:e=>d({...u,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:u.tools,onChange:e=>d({...u,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:u.model,onChange:e=>d({...u,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:u.provider,onChange:e=>d({...u,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":u.scope===e.id,disabled:e.id===`workspace`&&!f,className:`pill-segmented-btn ${u.scope===e.id?`active`:``}`,onClick:()=>d({...u,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.`,f?``:` 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:m,children:`Cancel`}),(0,Z.jsx)(`button`,{className:`btn btn-primary`,onClick:_,children:`Save subagent`})]})]}):(0,Z.jsxs)(`div`,{className:`entity-list`,children:[i&&(0,Z.jsx)(`div`,{style:{color:`var(--danger, #ef4444)`},children:i}),n?(0,Z.jsx)(`div`,{style:{textAlign:`center`,padding:`32px`,color:`var(--text-soft)`},children:`Loading...`}):(0,Z.jsxs)(Z.Fragment,{children:[e.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 ${un(e.sourcePath)?`scope-workspace`:`scope-global`}`,children:un(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:()=>g(e),children:`Edit`}),(0,Z.jsx)(`button`,{className:`btn btn-danger`,style:{padding:`4px 8px`,fontSize:`12px`},onClick:()=>v(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)),e.length===0&&(0,Z.jsx)(`div`,{className:`entity-empty`,children:`No subagents yet. Click "+ Add Subagent" to create one.`})]})]})]})}var X,Z,sn,cn,ln,un,dn,fn=t((()=>{X=e(l()),y(),g(),ot(),Z=v(),{listSubagents:sn,saveSubagent:cn,deleteSubagent:ln}=_,un=e=>!e.includes(`mint-agents`),dn={name:``,description:``,tools:``,model:``,provider:``,systemPrompt:``,scope:`workspace`}})),pn=t((()=>{fn()})),mn,hn,gn,_n,vn,yn,bn,xn,Sn,Cn,wn,Tn,En,Dn,On,kn,An=t((()=>{mn=`@pheem49/mint`,hn=`1.15.0`,gn=`A native Tauri desktop AI assistant with a Rust backend and React UI.`,_n={"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":`vite`,"build:desktop:ui":`vite build`,"build:desktop":`tauri build --no-bundle`,"build:desktop:fast":`CARGO_PROFILE_RELEASE_LTO=false CARGO_PROFILE_RELEASE_CODEGEN_UNITS=8 tauri build --no-bundle`,"build:desktop:bundle":`tauri build && mkdir -p target/release/mint-desktop-portable && cp target/release/mint-desktop target/release/mint-desktop-portable/mint-desktop && mkdir -p target/release/bundle/tar && tar -czf target/release/bundle/tar/mint-agent.tar.gz -C target/release mint-desktop-portable && rm -rf target/release/mint-desktop-portable && mv target/release/bundle/deb/Mint_*_amd64.deb target/release/bundle/deb/mint-agent_amd64.deb`,"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":`tauri dev`,"tauri:build":`tauri build && mkdir -p target/release/mint-desktop-portable && cp target/release/mint-desktop target/release/mint-desktop-portable/mint-desktop && mkdir -p target/release/bundle/tar && tar -czf target/release/bundle/tar/mint-agent.tar.gz -C target/release mint-desktop-portable && rm -rf target/release/mint-desktop-portable && mv target/release/bundle/deb/Mint_*_amd64.deb target/release/bundle/deb/mint-agent_amd64.deb`,package:`tauri build && mkdir -p target/release/mint-desktop-portable && cp target/release/mint-desktop target/release/mint-desktop-portable/mint-desktop && mkdir -p target/release/bundle/tar && tar -czf target/release/bundle/tar/mint-agent.tar.gz -C target/release mint-desktop-portable && rm -rf target/release/mint-desktop-portable && mv target/release/bundle/deb/Mint_*_amd64.deb target/release/bundle/deb/mint-agent_amd64.deb`,"rust:cli":`cargo run -p mint-cli --`,"rust:test":`cargo test -p mint-core -p mint-cli`,dev:`tauri dev`,build:`npm run build:desktop:ui && npm run build:web`,preview:`vite preview`,start:`test -x target/release/mint-desktop || npm run build:desktop:fast || exit $?; ./target/release/mint-desktop`,"start:release":`npm run build:desktop && ./target/release/mint-desktop`,launch:`./target/release/mint-desktop`,"start:rebuild":`npm run build:desktop:fast && ./target/release/mint-desktop`,test:`npm run test:interfaces && cargo test -p mint-core -p mint-cli`,"test:interfaces":`vitest run src/renderer/shared/platform.test.ts src/renderer/shared/conversation/coordinator.test.ts src/renderer/shared/conversation/syncView.test.ts src/renderer/shared/utils/cardJson.test.ts`,cli:`node src/bin/index.js`,prepublishOnly:`npm run build:web`,postinstall:`cargo build -p mint-cli --release`},vn=[`mint`,`tauri`,`ai`,`assistant`,`desktop`,`cli`,`rust`,`react`,`agent`],yn={type:`git`,url:`git+https://github.com/Pheem49/Mint.git`},bn={url:`https://github.com/Pheem49/Mint/issues`},xn=`https://github.com/Pheem49/Mint#readme`,Sn={name:`Pheem49`,email:`killerpheem13@gmail.com`},Cn=`AGPL-3.0-only`,wn=`commonjs`,Tn={mint:`src/bin/index.js`},En={"@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`,"@lobehub/icons-static-svg":`^1.95.0`,"@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`,"lucide-react":`^1.28.0`,luxon:`^3.7.2`,"material-icon-theme":`5.34.0`,mermaid:`^11.17.0`,"pixi-live2d-display":`^0.4.0`,"pixi.js":`^6.5.10`,react:`^19.2.5`,"react-dom":`^19.2.5`,"react-markdown":`^10.1.0`,"remark-gfm":`^4.0.1`,typescript:`^6.0.3`,vite:`^8.0.16`},Dn={"@tauri-apps/cli":`^2.0.0`,"@types/luxon":`^3.7.4`,vitest:`^5.0.1`},On={"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`},kn={name:mn,version:hn,description:gn,scripts:_n,keywords:vn,repository:yn,bugs:bn,homepage:xn,author:Sn,license:Cn,type:wn,bin:Tn,dependencies:En,devDependencies:Dn,overrides:On}})),jn,Mn=t((()=>{An(),jn=kn.version}));function Nn(){let[e,t]=(0,Q.useState)(`sect-general`),[n,r]=(0,Q.useState)(``),[i,c]=(0,Q.useState)(xe),[l,f]=(0,Q.useState)(``),[m,g]=(0,Q.useState)(``),{user:_,refreshUser:v}=h(),[y,b]=(0,Q.useState)(``),[x,S]=(0,Q.useState)(``),E=(0,Q.useRef)(!1);(0,Q.useEffect)(()=>{_&&!E.current&&(b(_.name||``),S(_.image||``),E.current=!0)},[_]);let[D,O]=(0,Q.useState)(``),[j,te]=(0,Q.useState)(``),[ne,re]=(0,Q.useState)(``),[ae,oe]=(0,Q.useState)(``),[se,ce]=(0,Q.useState)(``),[M,le]=(0,Q.useState)(``),[N,ue]=(0,Q.useState)(``),[de,fe]=(0,Q.useState)(``),[P,pe]=(0,Q.useState)(ve),{models:me}=A(`gemini`,i.apiKey),{models:he}=A(`anthropic`,i.anthropicApiKey),{models:ge}=A(`openai`,i.openaiApiKey),{models:_e}=A(`openrouter`,i.openrouterApiKey),{models:be}=A(`deepseek`,i.deepseekApiKey),{models:Se}=A(`local_openai`,``,i.localApiBaseUrl),{options:Ce}=Qe(`nanobanana`,i.apiKey),{options:we}=Qe(`dalle`,i.openaiApiKey),{options:Te}=Qe(`replicate`,i.replicateApiKey),{options:Ee}=Qe(`stability`,i.stabilityApiKey),{options:Oe}=Qe(`ideogram`,i.ideogramApiKey),{options:ke}=Qe(`bfl`,i.bflApiKey),Ae=Q.useMemo(()=>({nanobanana:Ce,dalle:we,replicate:Te,stability:Ee,ideogram:Oe,bfl:ke}),[Ce,we,Te,Ee,Oe,ke]),{options:je}=nt(`veo`,i.apiKey),Me=Q.useMemo(()=>({veo:je}),[je]),[Ne,Pe]=(0,Q.useState)(``),[Fe,Ie]=(0,Q.useState)(``),[Le,Re]=(0,Q.useState)(``),[ze,Be]=(0,Q.useState)(``),[Ve,He]=(0,Q.useState)(``),[Ue,We]=(0,Q.useState)(``),[Ge,Ke]=(0,Q.useState)(!1),qe=o();(0,Q.useEffect)(()=>{async function e(){try{let e=null;if(window.settingsApi)e=await window.settingsApi.getSettings();else{let t=await u(`user-settings`);t&&(e=JSON.parse(t))}if(e){let t={...xe,...ye(e)};c(t),t.geminiModel&&!C.includes(t.geminiModel)&&O(t.geminiModel),t.openaiModel&&!w.includes(t.openaiModel)&&te(t.openaiModel),t.openrouterModel&&!ie.includes(t.openrouterModel)&&re(t.openrouterModel),t.deepseekModel&&!De.includes(t.deepseekModel)&&oe(t.deepseekModel),t.anthropicModel&&!k.includes(t.anthropicModel)&&ce(t.anthropicModel),t.hfModel&&!ee.includes(t.hfModel)&&le(t.hfModel),t.localModelName&&!T.includes(t.localModelName)&&ue(t.localModelName),t.ollamaModel&&!ve.includes(t.ollamaModel)&&fe(t.ollamaModel),F(t)}let t=await u(`name`);t&&f(t);let n=await u(`preferences`);n&&g(n)}catch(e){console.error(`Failed to load settings:`,e)}}e()},[]),(0,Q.useEffect)(()=>{(async()=>{let e=(i.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)){pe(e.models.map(e=>e.name));return}}}catch(e){console.warn(`Failed to fetch local Ollama models:`,e)}pe(ve)})()},[i.ollamaHost]);let Je=async()=>{let e={...i};i.geminiModel===`custom`&&(e.geminiModel=D||`gemini-2.5-flash`),i.openaiModel===`custom`&&(e.openaiModel=j||`gpt-4o`),i.openrouterModel===`custom`&&(e.openrouterModel=ne||`openai/gpt-4o-mini`),i.deepseekModel===`custom`&&(e.deepseekModel=ae||`deepseek-v4-flash`),i.anthropicModel===`custom`&&(e.anthropicModel=se||`claude-3-5-sonnet-latest`),i.hfModel===`custom`&&(e.hfModel=M||`meta-llama/Meta-Llama-3-8B-Instruct`),i.localModelName===`custom`&&(e.localModelName=N||`local-model`),i.ollamaModel===`custom`&&(e.ollamaModel=de||`llama3:latest`);try{await d(`name`,l),await d(`preferences`,m)}catch(e){console.error(`Failed to save user profile memory:`,e)}try{v(await p(y,x))}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(i.aiProvider,i),r=t(e.aiProvider,e);if((i.aiProvider!==e.aiProvider||n!==r)&&s(e.aiProvider,r).catch(()=>{}),window.settingsApi)await window.settingsApi.saveSettings(e),F(e),window.settingsApi.closeSettings();else try{await d(`user-settings`,JSON.stringify(e)),F(e)}catch(e){console.error(`Failed to save user settings:`,e)}},Ye=async()=>{let e={...i};i.geminiModel===`custom`&&(e.geminiModel=D||`gemini-2.5-flash`),i.openaiModel===`custom`&&(e.openaiModel=j||`gpt-4o`),i.openrouterModel===`custom`&&(e.openrouterModel=ne||`openai/gpt-4o-mini`),i.deepseekModel===`custom`&&(e.deepseekModel=ae||`deepseek-v4-flash`),i.anthropicModel===`custom`&&(e.anthropicModel=se||`claude-3-5-sonnet-latest`),i.hfModel===`custom`&&(e.hfModel=M||`meta-llama/Meta-Llama-3-8B-Instruct`),i.localModelName===`custom`&&(e.localModelName=N||`local-model`),i.ollamaModel===`custom`&&(e.ollamaModel=de||`llama3:latest`);try{await d(`name`,l),await d(`preferences`,m)}catch(e){console.error(`Failed to save user profile memory:`,e)}if(window.settingsApi)await window.settingsApi.saveSettings(e),F(e);else try{await d(`user-settings`,JSON.stringify(e)),F(e)}catch(e){console.error(`Failed to save user settings:`,e)}},Xe=async()=>{if(confirm(`Reset all settings to default?`)){c(xe),O(``),te(``),ce(``),le(``),ue(``),fe(``),f(``),g(``);try{await d(`name`,``),await d(`preferences`,``)}catch(e){console.error(`Failed to reset profile memory:`,e)}F(xe)}},Ze=()=>{window.settingsApi?.closeSettings()},$e=(e,t)=>{e.preventDefault(),window.settingsApi?.openExternal?window.settingsApi.openExternal(t):window.open(t,`_blank`,`noopener,noreferrer`)},et=e=>{if(!Ne.trim()||!Fe.trim()){alert(`Please provide at least a server name and command.`);return}let t={};if(ze.trim())try{t=JSON.parse(ze)}catch{alert(`Invalid JSON in Environment variable field.`);return}let n=Ne.trim(),r=Le.split(/\s+/).filter(Boolean),a={...i.mcpServers,[n]:{command:Fe.trim(),args:r,env:t,icon:Ve.trim()||void 0}};c({...i,mcpServers:a,...e?{allowedMcpTools:{...i.allowedMcpTools||{},[n]:[`*`]}}:{}}),Pe(``),Ie(``),Re(``),Be(``),He(``)},tt=e=>{let t={...i.mcpServers};delete t[e],c({...i,mcpServers:t})},rt=async e=>{if(!qe&&e===`discord`){alert(`Discord Rich Presence requires the desktop app.`);return}if(e===`discord`){try{await window.api.executeProactiveAction({type:`plugin`,pluginName:`discord`,target:``}),alert(`Discord Rich Presence updated.`)}catch(e){alert(String(e))}return}alert(`Configure ${e} credentials, then invoke the plugin from Mint chat.`)},it=async()=>{if(!qe){We(`Desktop updates are only available in the Tauri app.`);return}try{let e=await window.settingsApi.checkForUpdates();Ke(!!e.available),We(e.available?`Mint ${e.version} is available.`:`Mint is up to date.`)}catch(e){We(String(e))}},I=async()=>{if(!qe){We(`Desktop updates are only available in the Tauri app.`);return}if(confirm(`Install the signed Mint update now?`))try{We(await window.settingsApi.installAvailableUpdate()),Ke(!1)}catch(e){We(String(e))}},at=(e,t)=>{let n={...i,[e]:t};c(n),F(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:qe?`Configure Mint assistant behavior and integrations.`:`Web settings through Local API: ${a()}`})]})]}),(0,$.jsx)(`button`,{className:`close-btn`,onClick:Ze,"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:Fn.map(r=>{let i=Pn.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:[!qe&&(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)(ut,{config:i,updateField:at,customGemini:D,setCustomGemini:O,customOpenAI:j,setCustomOpenAI:te,customOpenRouter:ne,setCustomOpenRouter:re,customDeepSeek:ae,setCustomDeepSeek:oe,customAnthropic:se,setCustomAnthropic:ce,customHF:M,setCustomHF:le,customLocal:N,setCustomLocal:ue,customOllama:de,setCustomOllama:fe,dynamicOllamaModels:P,dynamicGeminiModels:me,dynamicAnthropicModels:he,dynamicOpenAIModels:ge,dynamicOpenRouterModels:_e,dynamicDeepSeekModels:be,dynamicLocalModels:Se,dynamicImageModels:Ae,dynamicVideoModels:Me,updateAvailable:Ge,updateMessage:Ue,handleCheckUpdates:it,handleInstallUpdate:I,isDesktopApp:qe,onSaveWithoutClosing:Ye}),e===`sect-profile`&&(0,$.jsx)(wt,{name:y,setName:b,imageUrl:x,setImageUrl:S}),e===`sect-memory`&&(0,$.jsx)(Ot,{userName:l,setUserName:f,userPreferences:m,setUserPreferences:g}),e===`sect-audio`&&(0,$.jsx)(Ft,{config:i,updateField:at,apiKey:i.apiKey}),e===`sect-automation`&&(0,$.jsx)(zt,{config:i,updateField:at}),e===`sect-theme`&&(0,$.jsx)(Gt,{config:i,updateField:at,updateFields:e=>{let t={...i,...e};c(t),F(t)}}),e===`sect-plugins`&&(0,$.jsx)(Xt,{config:i,updateField:at,mcpName:Ne,setMcpName:Pe,mcpCmd:Fe,setMcpCmd:Ie,mcpArgs:Le,setMcpArgs:Re,mcpEnv:ze,setMcpEnv:Be,mcpIcon:Ve,setMcpIcon:He,handleAddMcpServer:et,handleRemoveMcpServer:tt,handleConnectPlugin:rt}),e===`sect-agents`&&(0,$.jsx)(an,{config:i,updateField:at,dynamicOllamaModels:P,providerModels:{gemini:me,anthropic:he,openai:ge,openrouter:_e,deepseek:be,local_openai:Se}})]})]}),(0,$.jsxs)(`footer`,{className:`settings-footer`,children:[(0,$.jsxs)(`div`,{className:`settings-footer-meta`,children:[(0,$.jsxs)(`span`,{className:`settings-footer-version`,children:[`Version: `,jn]}),(0,$.jsxs)(`div`,{className:`settings-footer-links`,children:[(0,$.jsxs)(`a`,{href:`https://github.com/Pheem49/Mint`,target:`_blank`,rel:`noopener noreferrer`,onClick:e=>$e(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=>$e(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:Xe,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(),Je()},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,$,Pn,Fn;t((()=>{Q=e(l()),He(),Ue(),We(),Ge(),Ke(),qe(),Je(),Ye(),Xe(),m(),n(),Te(),et(),it(),yt(),Dt(),At(),Rt(),Vt(),Jt(),rn(),pn(),y(),me(),$=v(),ge(),Mn(),Pn=[{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-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:`Memory & Profile`,group:`Workspace`,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`})]})}],Fn=[`Account`,`Workspace`,`Appearance`,`Advanced`]}))();export{k as ANTHROPIC_MODELS,De as DEEPSEEK_MODELS,xe as DEFAULT_CONFIG,C as GEMINI_MODELS,ee as HF_MODELS,T as LOCAL_MODELS,ve as OLLAMA_MODELS,w as OPENAI_MODELS,ie as OPENROUTER_MODELS,Nn as default};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{i as e,n as t}from"./chunk-CacB07dV.js";import{k as n,y as r}from"./index-D8D9MeRA.js";import{E as i,F as a,I as o,O as s}from"./config-eEDngJXO.js";import{a as c,n as l}from"./markdown-BSeeUbJH.js";function u(e){if(e.description?.trim())return e.description.trim();let t=e.content.trimStart().split(/\r?\n/);if(t[0]?.trim()===`---`){let e=t.findIndex((e,t)=>t>0&&e.trim()===`---`);if(e>0){let n=t.slice(1,e).find(e=>/^description\s*:/i.test(e.trim()));if(n){let e=n.replace(/^\s*description\s*:\s*/i,``).trim();if(e&&e!==`>`&&e!==`|`)return e.replace(/^("([\s\S]*)"|'([\s\S]*)')$/,(e,t,n,r)=>n??r)}t.splice(0,e+1)}}return t.map(e=>e.replace(/^#+\s*/,``).trim()).find(Boolean)||``}function d(e){return!!(e.is_workspace||e.location===`workspace`)}var f,p,m;t((()=>{f=e(n()),s(),l(),i(),p=r(),m=f.memo(function({listSkills:e,addSkill:t,deleteSkill:n,workspacePath:r}){let[i,s]=(0,f.useState)([]),[l,m]=(0,f.useState)(!1),[h,g]=(0,f.useState)(``),[_,v]=(0,f.useState)(``),[y,b]=(0,f.useState)(`all`),[x,S]=(0,f.useState)(``),[C,w]=(0,f.useState)(``),[T,E]=(0,f.useState)(!1),[D,O]=(0,f.useState)(!1),[k,A]=(0,f.useState)(null),j=async()=>{m(!0),g(``);try{s(await e(r))}catch(e){console.error(`Failed to fetch skills:`,e),g(`Failed to load learned skills`)}finally{m(!1)}};(0,f.useEffect)(()=>{j()},[r]);let M=async e=>{if(e.preventDefault(),!(!x.trim()||!C.trim())){E(!0);try{await t(x.trim(),C.trim()),S(``),w(``),O(!1),j()}catch(e){console.error(`Failed to add learned skill:`,e),alert(`Error saving skill`)}finally{E(!1)}}},N=async e=>{if(window.confirm(`Are you sure you want to forget skill "${e}"?`))try{await n(e),A(t=>t?.name===e?null:t),j()}catch(e){console.error(`Failed to delete skill:`,e),alert(`Error deleting skill`)}},P=i.filter(e=>e.name.toLowerCase().includes(_.toLowerCase())||(e.description||``).toLowerCase().includes(_.toLowerCase())||e.content.toLowerCase().includes(_.toLowerCase())?y===`workspace`?d(e):y===`global`?!d(e):!0:!1);return(0,p.jsxs)(`div`,{className:`management-container`,children:[(0,p.jsxs)(`div`,{className:`management-header`,children:[(0,p.jsxs)(`div`,{className:`management-title-group`,children:[(0,p.jsxs)(`h1`,{className:`management-title`,children:[(0,p.jsx)(`span`,{className:`management-title-icon`,style:{display:`inline-flex`,alignItems:`center`},children:o(22,`var(--accent)`)}),`Skills`]}),(0,p.jsx)(`p`,{className:`management-subtitle`,children:`Instructions Mint follows automatically, reviewed before every prompt.`})]}),(0,p.jsxs)(`button`,{type:`button`,className:`management-primary-btn`,onClick:()=>O(!0),children:[(0,p.jsxs)(`svg`,{width:`16`,height:`16`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2.5`,children:[(0,p.jsx)(`line`,{x1:`12`,y1:`5`,x2:`12`,y2:`19`}),(0,p.jsx)(`line`,{x1:`5`,y1:`12`,x2:`19`,y2:`12`})]}),`Teach new skill`]})]}),(0,p.jsxs)(`div`,{className:`management-control-bar`,children:[(0,p.jsxs)(`div`,{className:`management-search-wrapper`,children:[(0,p.jsx)(`input`,{type:`text`,className:`management-search-input`,placeholder:`Search skills by name or instructions...`,value:_,onChange:e=>v(e.target.value)}),(0,p.jsxs)(`svg`,{className:`management-search-icon`,width:`16`,height:`16`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,children:[(0,p.jsx)(`circle`,{cx:`11`,cy:`11`,r:`8`}),(0,p.jsx)(`line`,{x1:`21`,y1:`21`,x2:`16.65`,y2:`16.65`})]})]}),(0,p.jsx)(`div`,{className:`management-filter-pills`,children:[`all`,`workspace`,`global`].map(e=>(0,p.jsx)(`button`,{type:`button`,className:`management-pill-btn ${y===e?`active`:``}`,onClick:()=>b(e),children:e},e))})]}),h&&(0,p.jsx)(`div`,{className:`management-error-banner`,children:h}),l?(0,p.jsx)(`div`,{className:`mgmt-empty`,children:`Loading…`}):P.length===0?(0,p.jsxs)(`div`,{className:`mgmt-empty`,children:[(0,p.jsx)(`p`,{children:_||y!==`all`?`No skills match.`:`No skills yet.`}),!_&&y===`all`&&(0,p.jsxs)(`p`,{children:[`Teach one above, or run `,(0,p.jsx)(`code`,{children:`/learn`}),` in chat.`]})]}):(0,p.jsx)(`div`,{className:`mgmt-list`,children:P.map(e=>(0,p.jsxs)(`div`,{className:`mgmt-row`,onClick:()=>A(e),children:[(0,p.jsxs)(`div`,{className:`mgmt-row-main`,children:[(0,p.jsx)(`div`,{className:`mgmt-row-title`,children:e.name}),(0,p.jsx)(`div`,{className:`mgmt-row-sub`,children:u(e)})]}),(0,p.jsx)(`span`,{className:`management-tag ${d(e)?`workspace`:`global`}`,children:d(e)?`Workspace`:`Global`})]},e.name))}),k&&(0,p.jsx)(`div`,{className:`management-modal-overlay`,onClick:()=>A(null),children:(0,p.jsxs)(`div`,{className:`management-modal`,onClick:e=>e.stopPropagation(),children:[(0,p.jsxs)(`div`,{className:`management-modal-header`,children:[(0,p.jsxs)(`div`,{className:`management-card-title-group`,children:[a(44),(0,p.jsx)(`h2`,{className:`management-modal-title`,children:k.name})]}),(0,p.jsx)(`button`,{type:`button`,className:`management-modal-close`,onClick:()=>A(null),children:`✕`})]}),(0,p.jsxs)(`div`,{className:`management-modal-body`,children:[(0,p.jsx)(`span`,{className:`management-tag ${d(k)?`workspace`:`global`}`,children:d(k)?`Workspace`:`Global`}),k.description&&(0,p.jsx)(`p`,{style:{color:`var(--text-soft, #d1d1d4)`,lineHeight:1.55,margin:0},children:k.description}),(0,p.jsx)(`div`,{className:`mgmt-prose`,children:c(k.content)})]}),(0,p.jsxs)(`div`,{className:`management-modal-footer`,children:[(0,p.jsx)(`span`,{style:{fontSize:`0.8rem`,color:`var(--text-muted, #64748b)`},children:k.updatedAt?new Date(k.updatedAt).toLocaleDateString():`Learned`}),(0,p.jsx)(`button`,{type:`button`,className:`management-action-btn danger`,onClick:()=>N(k.name),children:`Forget`})]})]})}),D&&(0,p.jsx)(`div`,{className:`management-modal-overlay`,children:(0,p.jsxs)(`div`,{className:`management-modal`,children:[(0,p.jsxs)(`div`,{className:`management-modal-header`,children:[(0,p.jsx)(`h2`,{className:`management-modal-title`,children:`Teach new skill to Mint`}),(0,p.jsx)(`button`,{type:`button`,className:`management-modal-close`,onClick:()=>O(!1),children:`✕`})]}),(0,p.jsxs)(`form`,{onSubmit:M,children:[(0,p.jsxs)(`div`,{className:`management-modal-body`,children:[(0,p.jsxs)(`div`,{className:`management-form-group`,children:[(0,p.jsx)(`label`,{className:`management-label`,children:`Skill name (e.g. typescript-standards)`}),(0,p.jsx)(`input`,{type:`text`,className:`management-input-field`,placeholder:`e.g. angular-standard`,value:x,onChange:e=>S(e.target.value),required:!0})]}),(0,p.jsxs)(`div`,{className:`management-form-group`,children:[(0,p.jsx)(`label`,{className:`management-label`,children:`Skill instructions / content (Markdown supported)`}),(0,p.jsx)(`textarea`,{className:`management-textarea-field`,placeholder:`# Guidelines
|
|
2
|
-
Always write modular React code using TypeScript.`,value:C,onChange:e=>w(e.target.value),required:!0,rows:6})]})]}),(0,p.jsxs)(`div`,{className:`management-modal-footer`,children:[(0,p.jsx)(`button`,{type:`button`,className:`management-action-btn`,onClick:()=>O(!1),children:`Cancel`}),(0,p.jsx)(`button`,{type:`submit`,disabled:T,className:`management-primary-btn`,children:T?`Saving...`:`Save Skill`})]})]})]})})]})})}))();export{m as SkillsView,m as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.tool-surface-page{z-index:260;width:var(--tool-surface-width,clamp(360px, 42vw, 620px));background:var(--bg-surface,#18191c);border-left:1px solid var(--border-subtle,#ffffff14);flex-direction:column;min-width:0;min-height:0;display:flex;position:absolute;inset:0 0 0 auto;overflow:visible;box-shadow:-16px 0 40px #00000073}.tool-surface-page.is-entering{will-change:transform, opacity;animation:.28s cubic-bezier(.16,1,.3,1) forwards toolSurfaceSlideIn}.tool-surface-page.is-resizing{-webkit-user-select:none!important;user-select:none!important;transition:none!important}.tool-surface-page.is-resizing .tool-surface-content{pointer-events:none!important}body.is-tool-resizing .assistant-workspace{-webkit-user-select:none!important;user-select:none!important;transition:none!important}.tool-surface-page.is-maximized{z-index:280;box-shadow:none;border-left:0;animation:none;width:auto!important;left:var(--sidebar-expanded-width,264px)!important;right:0!important}.app-body.sidebar-collapsed .tool-surface-page.is-maximized{left:calc(var(--sidebar-collapsed-width,56px) + var(--sidebar-content-gap,10px))!important}.tool-surface-page.is-maximized .tool-surface-resize-handle{display:none!important}@keyframes toolSurfaceSlideIn{0%{opacity:.4;transform:translate(100%)}to{opacity:1;transform:translate(0)}}.tool-surface-resize-handle{z-index:500;cursor:col-resize;touch-action:none;width:16px;position:absolute;top:0;bottom:0;left:-8px}.tool-surface-resize-handle:after{content:"";background:0 0;width:2px;transition:background-color .12s;position:absolute;top:0;bottom:0;left:7px}.tool-surface-resize-handle:hover:after,.tool-surface-resize-handle:focus-visible:after,.tool-surface-resize-handle.is-resizing:after{background:var(--accent,#10b981)}.app-body.sidebar-collapsed .tool-surface-page{left:auto}.assistant-workspace{transition:margin-right .28s cubic-bezier(.16,1,.3,1)}.app-body.tool-surface-active .assistant-workspace{margin-right:var(--tool-surface-width,clamp(360px, 42vw, 620px))}.tool-surface-tabs{z-index:300;background:color-mix(in srgb, var(--chrome-bg,#1b1c20) 92%, transparent);border-bottom:1px solid var(--border-subtle,#ffffff1a);align-items:stretch;gap:8px;min-height:48px;padding:7px 12px 0;display:flex;position:relative}.tool-surface-launcher-header{z-index:300;min-height:48px;color:var(--text-muted,#9ca3af);background:color-mix(in srgb, var(--chrome-bg,#1b1c20) 92%, transparent);border-bottom:1px solid var(--border-subtle,#ffffff1a);justify-content:space-between;align-items:center;padding:7px 12px;font-size:.78rem;font-weight:600;display:flex;position:relative}.tool-surface-launcher-header button{border-radius:var(--radius-xs,6px);width:30px;height:30px;color:var(--text-muted,#9ca3af);background:0 0;border:1px solid #0000;justify-content:center;align-items:center;display:inline-flex}.tool-surface-launcher-header button:hover,.tool-surface-launcher-header button:focus-visible{color:var(--text-main,#f1f5f9);background:var(--surface-bg,#ffffff14);border-color:var(--border-subtle,#ffffff1f);outline:none}.tool-surface-launcher-header svg{fill:none;stroke:currentColor;stroke-width:1.7px;stroke-linecap:round;stroke-linejoin:round;width:16px;height:16px}.tool-surface-switcher{border-radius:var(--radius-xs,6px);width:30px;height:30px;color:var(--text-muted,#9ca3af);background:0 0;border:1px solid #0000;flex:none;justify-content:center;align-items:center;display:inline-flex}.tool-surface-switcher svg{fill:none;stroke:currentColor;stroke-width:1.7px;stroke-linecap:round;width:15px;height:15px}.tool-surface-switcher:hover,.tool-surface-switcher:focus-visible{color:var(--text-main,#f1f5f9);background:var(--surface-bg,#ffffff14);border-color:var(--border-subtle,#ffffff1f);outline:none}.tool-surface-new-tab-wrap{border-radius:var(--radius-xs,6px);border:1px solid var(--border-subtle,#ffffff1a);background:#ffffff0a;flex:none;align-self:center;align-items:center;margin-left:6px;margin-right:4px;display:inline-flex;position:relative}.tool-surface-new-tab-wrap:hover{border-color:var(--border-subtle,#ffffff2e);background:#ffffff14}.tool-surface-switch-menu{z-index:600;border:1px solid var(--border-default,#ffffff24);border-radius:var(--radius-md,10px);background:var(--bg-surface,#20232a);width:175px;max-width:calc(100vw - 24px);padding:5px;position:absolute;top:calc(100% + 6px);left:0;right:auto;box-shadow:0 12px 32px #0000008c}.tool-surface-switch-menu.is-align-right{left:auto;right:0}.tool-surface-switch-menu .tool-surface-launcher{gap:2px;width:100%}.tool-surface-switch-menu .tool-surface-launcher-item{border-radius:var(--radius-xs,6px);min-height:32px;box-shadow:none;white-space:nowrap;background:0 0;border:0;gap:8px;padding:0 10px;font-size:.82rem}.tool-surface-switch-menu .tool-surface-launcher-item:hover,.tool-surface-switch-menu .tool-surface-launcher-item:focus-visible{background:var(--bg-surface-hover,#ffffff14);box-shadow:none;border-color:#0000;transform:none}.tool-surface-menu-icon{width:20px;height:20px;color:var(--text-muted,#94a3b8);flex-shrink:0;justify-content:center;align-items:center;transition:color .15s,transform .15s;display:inline-flex}.tool-surface-menu-icon svg{stroke:currentColor;width:18px;height:18px}.tool-surface-launcher-item:hover .tool-surface-menu-icon,.tool-surface-launcher-item:focus-visible .tool-surface-menu-icon{color:#f1f5f9;transform:scale(1.04)}.tool-surface-tabs-container{flex:0 auto;align-items:center;gap:2px;min-width:0;max-width:calc(100% - 130px);display:flex;position:relative}.tool-surface-tab-scroll-btn{border:1px solid var(--border-subtle,#ffffff1f);border-radius:var(--radius-xs,4px);width:20px;height:24px;color:var(--text-muted,#9ca3af);cursor:pointer;z-index:10;background:#ffffff0f;flex:none;justify-content:center;align-self:center;align-items:center;margin-bottom:4px;padding:0;transition:all .12s;display:inline-flex}.tool-surface-tab-scroll-btn:hover,.tool-surface-tab-scroll-btn:focus-visible{color:var(--text-main,#f1f5f9);border-color:var(--border-subtle,#ffffff38);background:#ffffff24;outline:none}.tool-surface-tab-list{scrollbar-width:none;scroll-behavior:smooth;flex:auto;align-items:stretch;gap:4px;min-width:0;display:flex;overflow-x:auto}.tool-surface-tab-list::-webkit-scrollbar{display:none}.tool-surface-tab{border-radius:var(--radius-sm,8px) var(--radius-sm,8px) 0 0;min-width:132px;max-width:260px;color:var(--text-muted,#9ca3af);background:0 0;border:1px solid #0000;border-bottom:0;align-items:center;display:flex}.tool-surface-tab.is-active{color:var(--text-main,#f1f5f9);background:var(--panel-bg,#1e1e20);border-color:var(--border-subtle,#ffffff1f)}.tool-surface-tab>button:first-child{min-width:0;height:100%;color:inherit;text-align:left;background:0 0;border:0;flex:1;align-items:center;gap:8px;padding:0 8px 0 11px;display:flex}.tool-surface-tab-icon{color:var(--interactive-fg);flex:none;justify-content:center;align-items:center;font:600 .72rem ui-monospace,SFMono-Regular,Menlo,monospace;display:inline-flex}.tool-surface-tab-icon.is-review{color:#8ab4ff}.tool-surface-tab-icon.is-terminal{color:#10b981}.tool-surface-new-tab-btn{width:26px;height:26px;color:var(--text-muted,#9ca3af);cursor:pointer;background:0 0;border:0;border-radius:5px 0 0 5px;flex:none;justify-content:center;align-items:center;transition:all .12s;display:inline-flex}.tool-surface-new-tab-btn:hover,.tool-surface-new-tab-btn:focus-visible{color:var(--text-main,#f1f5f9);background:#ffffff1a;outline:none}.tool-surface-dropdown-btn{border:0;border-left:1px solid var(--border-subtle,#ffffff14);width:18px;height:26px;color:var(--text-muted,#9ca3af);cursor:pointer;background:0 0;border-radius:0 5px 5px 0;flex:none;justify-content:center;align-items:center;transition:all .12s;display:inline-flex}.tool-surface-dropdown-btn:hover,.tool-surface-dropdown-btn:focus-visible,.tool-surface-dropdown-btn.is-active{color:var(--text-main,#f1f5f9);background:#ffffff1a;outline:none}.tool-surface-tab-title{text-overflow:ellipsis;white-space:nowrap;font-size:.78rem;overflow:hidden}.tool-surface-tab-close,.tool-surface-close-all{color:var(--text-muted,#9ca3af);cursor:pointer;background:0 0;border:0;flex:none;justify-content:center;align-items:center;display:inline-flex}.tool-surface-tab-close{border-radius:var(--radius-xs,6px);width:28px;height:28px;margin-right:3px;font-size:1rem}.tool-surface-tab{position:relative}.tool-surface-tab-menu{z-index:1000;border:1px solid var(--border-default,#ffffff24);border-radius:var(--radius-sm,8px);background:var(--bg-surface,#20232a);width:170px;padding:5px;position:absolute;top:calc(100% - 2px);right:28px;box-shadow:0 16px 42px #0000008c}.tool-surface-tab-menu.is-floating{z-index:1100;margin:0;position:fixed;top:auto;right:auto}.tool-surface-tab-menu>button{border-radius:var(--radius-xs,5px);width:100%;min-height:32px;color:var(--text-main,#e5e7eb);text-align:left;cursor:pointer;background:0 0;border:0;padding:0 10px;font-size:.8rem;transition:all .12s;display:block}.tool-surface-tab-menu>button:hover,.tool-surface-tab-menu>button:focus-visible{background:var(--bg-surface-hover,#ffffff14);color:#fff;outline:none}.tool-surface-tab-close:hover{color:var(--hover-delete,#fca5a5);background:var(--hover-delete-bg,#f871711f)}.tool-surface-header-right{flex-shrink:0;align-items:center;gap:10px;margin-left:auto;padding-bottom:7px;display:flex}.tool-surface-cwd-badge{border:1px solid var(--border-subtle,#ffffff14);max-width:clamp(140px,20vw,320px);color:var(--text-muted,#94a3b8);-webkit-user-select:none;user-select:none;background:#ffffff09;border-radius:9999px;align-items:center;gap:6px;padding:3px 9px;font:500 .72rem ui-monospace,SFMono-Regular,Menlo,monospace;display:inline-flex}.tool-surface-cwd-dot{background:#10b981;border-radius:50%;flex-shrink:0;width:6px;height:6px;box-shadow:0 0 6px #10b98173}.tool-surface-cwd-text{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.tool-surface-header-actions{align-items:center;gap:4px;display:flex}.tool-surface-action-btn{border-radius:var(--radius-xs,6px);width:28px;height:28px;color:var(--text-muted,#9ca3af);cursor:pointer;background:0 0;border:1px solid #0000;justify-content:center;align-items:center;transition:all .14s;display:inline-flex}.tool-surface-action-btn:hover,.tool-surface-action-btn:focus-visible{color:var(--text-main,#f1f5f9);background:var(--surface-bg,#ffffff14);border-color:var(--border-subtle,#ffffff1f);outline:none}.tool-surface-action-btn.is-active{color:var(--accent,#10b981);background:#10b9811f;border-color:#10b98140}.tool-surface-action-btn.is-close:hover{color:var(--hover-delete,#fca5a5);background:var(--hover-delete-bg,#f871711f);border-color:#f8717133}.tool-surface-content{background:var(--panel-bg,#1e1e20);flex:1;min-height:0;overflow:hidden}.tool-surface-content.is-launcher{justify-content:center;align-items:center;display:flex}.tool-surface-launcher{flex-direction:column;gap:8px;width:min(540px,100% - 36px);display:flex}.tool-surface-launcher-item{border:1px solid var(--border-subtle,#ffffff14);min-height:48px;color:var(--text-main,#e2e8f0);text-align:left;cursor:pointer;background:#ffffff09;border-radius:12px;align-items:center;gap:12px;padding:0 16px;font-size:.88rem;font-weight:500;transition:background-color .16s cubic-bezier(.16,1,.3,1),border-color .16s cubic-bezier(.16,1,.3,1),transform .16s cubic-bezier(.16,1,.3,1),box-shadow .16s cubic-bezier(.16,1,.3,1);display:flex;box-shadow:0 2px 6px #00000040}.tool-surface-launcher-item:hover,.tool-surface-launcher-item:focus-visible{color:#fff;background:#ffffff13;border-color:#ffffff29;outline:none;transform:translateY(-1px);box-shadow:0 6px 16px #0006}.tool-surface-launcher-item:active{transform:translateY(0)}.tool-surface-launcher-item kbd{border:1px solid var(--border-subtle,#ffffff17);color:var(--text-muted,#94a3b8);white-space:nowrap;background:#ffffff0d;border-radius:6px;margin-left:auto;padding:3px 8px;font:500 .72rem ui-monospace,SFMono-Regular,Menlo,monospace}.tool-surface-launcher-item:hover kbd{color:#e2e8f0;background:#ffffff14;border-color:#ffffff26}.tool-surface-content.is-launcher .tool-surface-launcher-item{animation:.3s cubic-bezier(.16,1,.3,1) backwards toolLauncherCardSlide}.tool-surface-content.is-launcher .tool-surface-launcher-item:first-child{animation-delay:40ms}.tool-surface-content.is-launcher .tool-surface-launcher-item:nth-child(2){animation-delay:80ms}.tool-surface-content.is-launcher .tool-surface-launcher-item:nth-child(3){animation-delay:.12s}.tool-surface-content.is-launcher .tool-surface-launcher-item:nth-child(4){animation-delay:.16s}.tool-surface-content.is-launcher .tool-surface-launcher-item:nth-child(5){animation-delay:.2s}@keyframes toolLauncherCardSlide{0%{opacity:0;transform:translate(20px)}to{opacity:1;transform:translate(0)}}.tool-surface-content>.artifact-preview-panel,.tool-surface-content>.code-review-page{border:0!important;width:100%!important;min-width:0!important;max-width:none!important;height:100%!important}.terminal-dock.is-page{opacity:1;visibility:visible;pointer-events:auto;width:100%;height:100%;box-shadow:none;border:0;padding:0;position:relative;inset:auto;transform:none}.terminal-dock.is-page:not(.is-open),.terminal-dock.is-page .terminal-dock-header{display:none}.terminal-dock.is-page .terminal-dock-surface{background:#111318;border:0;border-radius:0;height:100%;padding:8px 12px}@media (width<=760px){.tool-surface-page,.app-body.sidebar-collapsed .tool-surface-page{width:100%;left:0}.app-body.tool-surface-active .assistant-workspace{margin-bottom:0;margin-right:0}.tool-surface-resize-handle{display:none}.tool-surface-tabs{padding-inline:8px}.tool-surface-tab{min-width:116px}}.xterm{cursor:text;-webkit-user-select:none;user-select:none;position:relative}.xterm.focus,.xterm:focus{outline:none}.xterm .xterm-helpers{z-index:5;position:absolute;top:0}.xterm .xterm-helper-textarea{opacity:0;z-index:-5;white-space:nowrap;resize:none;border:0;width:0;height:0;margin:0;padding:0;position:absolute;top:0;left:-9999em;overflow:hidden}.xterm .composition-view{color:#fff;white-space:nowrap;z-index:1;background:#000;display:none;position:absolute}.xterm .composition-view.active{display:block}.xterm .xterm-viewport{cursor:default;background-color:#000;position:absolute;inset:0;overflow-y:scroll}.xterm .xterm-screen{position:relative}.xterm .xterm-screen canvas{position:absolute;top:0;left:0}.xterm-char-measure-element{visibility:hidden;line-height:normal;display:inline-block;position:absolute;top:0;left:-9999em}.xterm.enable-mouse-events{cursor:default}.xterm.xterm-cursor-pointer,.xterm .xterm-cursor-pointer{cursor:pointer}.xterm.column-select.focus{cursor:crosshair}.xterm .xterm-accessibility:not(.debug),.xterm .xterm-message{z-index:10;color:#0000;pointer-events:none;position:absolute;inset:0}.xterm .xterm-accessibility-tree:not(.debug) ::selection{color:#0000}.xterm .xterm-accessibility-tree{-webkit-user-select:text;user-select:text;white-space:pre;font-family:monospace}.xterm .xterm-accessibility-tree>div{transform-origin:0;width:fit-content}.xterm .live-region{width:1px;height:1px;position:absolute;left:-9999px;overflow:hidden}.xterm-dim{opacity:1!important}.xterm-underline-1{text-decoration:underline}.xterm-underline-2{-webkit-text-decoration:underline double;text-decoration:underline double}.xterm-underline-3{-webkit-text-decoration:underline wavy;text-decoration:underline wavy}.xterm-underline-4{-webkit-text-decoration:underline dotted;text-decoration:underline dotted}.xterm-underline-5{-webkit-text-decoration:underline dashed;text-decoration:underline dashed}.xterm-overline{text-decoration:overline}.xterm-overline.xterm-underline-1{text-decoration:underline overline}.xterm-overline.xterm-underline-2{-webkit-text-decoration:overline double underline;text-decoration:overline double underline}.xterm-overline.xterm-underline-3{-webkit-text-decoration:overline wavy underline;text-decoration:overline wavy underline}.xterm-overline.xterm-underline-4{-webkit-text-decoration:overline dotted underline;text-decoration:overline dotted underline}.xterm-overline.xterm-underline-5{-webkit-text-decoration:overline dashed underline;text-decoration:overline dashed underline}.xterm-strikethrough{text-decoration:line-through}.xterm-screen .xterm-decoration-container .xterm-decoration{z-index:6;position:absolute}.xterm-screen .xterm-decoration-container .xterm-decoration.xterm-decoration-top-layer{z-index:7}.xterm-decoration-overview-ruler{z-index:8;pointer-events:none;position:absolute;top:0;right:0}.xterm-decoration-top{z-index:2;position:relative}.xterm .xterm-scrollable-element>.scrollbar{cursor:default}.xterm .xterm-scrollable-element>.scrollbar>.scra{cursor:pointer;font-size:11px!important}.xterm .xterm-scrollable-element>.visible{opacity:1;z-index:11;background:0 0;transition:opacity .1s linear}.xterm .xterm-scrollable-element>.invisible{opacity:0;pointer-events:none}.xterm .xterm-scrollable-element>.invisible.fade{transition:opacity .8s linear}.xterm .xterm-scrollable-element>.shadow{display:none;position:absolute}.xterm .xterm-scrollable-element>.shadow.top{width:100%;height:3px;box-shadow:var(--vscode-scrollbar-shadow,#000) 0 6px 6px -6px inset;display:block;top:0;left:3px}.xterm .xterm-scrollable-element>.shadow.left{width:3px;height:100%;box-shadow:var(--vscode-scrollbar-shadow,#000) 6px 0 6px -6px inset;display:block;top:3px;left:0}.xterm .xterm-scrollable-element>.shadow.top-left-corner{width:3px;height:3px;display:block;top:0;left:0}.xterm .xterm-scrollable-element>.shadow.top.left{box-shadow:var(--vscode-scrollbar-shadow,#000) 6px 0 6px -6px inset}
|