@pheem49/mint 1.14.0 → 1.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Cargo.lock +1258 -35
- package/Cargo.toml +5 -2
- package/LICENSE +21 -654
- package/README.md +93 -756
- package/Release_Note.md +53 -446
- package/apps/mint-companion/src-tauri/Cargo.toml +20 -0
- package/apps/mint-companion/src-tauri/build.rs +3 -0
- package/apps/mint-companion/src-tauri/src/main.rs +468 -0
- package/apps/mint-companion/tsconfig.json +20 -0
- package/apps/mint-companion/vite.config.ts +3 -0
- package/components.json +19 -0
- package/crates/mint-cli/Cargo.toml +9 -1
- package/crates/mint-cli/src/agent/approval_prompts.rs +16 -3
- package/crates/mint-cli/src/agent/live_status.rs +545 -148
- package/crates/mint-cli/src/agent/markdown_render.rs +601 -61
- package/crates/mint-cli/src/agent.rs +723 -258
- package/crates/mint-cli/src/commands/agent.rs +83 -74
- package/crates/mint-cli/src/commands/eval.rs +9 -5
- package/crates/mint-cli/src/commands/git.rs +204 -0
- package/crates/mint-cli/src/commands/integrations.rs +35 -0
- package/crates/mint-cli/src/commands/knowledge.rs +13 -32
- package/crates/mint-cli/src/commands/mod.rs +81 -2
- package/crates/mint-cli/src/commands/tailnet_web.rs +235 -0
- package/crates/mint-cli/src/image.rs +32 -11
- package/crates/mint-cli/src/interactive/chat_tui.rs +7853 -0
- package/crates/mint-cli/src/interactive/command_ui.rs +477 -0
- package/crates/mint-cli/src/interactive/format.rs +8 -0
- package/crates/mint-cli/src/interactive/input_box.rs +94 -8
- package/crates/mint-cli/src/interactive/picker.rs +180 -37
- package/crates/mint-cli/src/interactive/resume_picker.rs +686 -0
- package/crates/mint-cli/src/interactive/slash_commands.rs +1071 -501
- package/crates/mint-cli/src/interactive/thought_viewer.rs +286 -0
- package/crates/mint-cli/src/interactive/tool_activity.rs +328 -0
- package/crates/mint-cli/src/interactive.rs +454 -166
- package/crates/mint-cli/src/main.rs +93 -26
- package/crates/mint-cli/src/markdown.rs +12 -5
- package/crates/mint-cli/src/mcp.rs +5 -0
- package/crates/mint-cli/src/mod_host.rs +6 -0
- package/crates/mint-cli/src/mods_cli.rs +62 -0
- package/crates/mint-cli/src/mods_ui.rs +187 -0
- package/crates/mint-cli/src/onboard.rs +37 -61
- package/crates/mint-cli/src/plugins_cli.rs +8 -5
- package/crates/mint-cli/src/setup.rs +10 -8
- package/crates/mint-cli/src/terminal_theme.rs +189 -0
- package/crates/mint-cli/src/updater.rs +112 -23
- package/crates/mint-cli/tests/library_intake.rs +77 -0
- package/crates/mint-cli/tests/mods_testing.rs +133 -0
- package/crates/mint-companion-protocol/Cargo.toml +10 -0
- package/crates/mint-companion-protocol/src/lib.rs +163 -0
- package/crates/mint-core/Cargo.toml +6 -3
- package/crates/mint-core/build.rs +26 -0
- package/crates/mint-core/src/agent/agent_loop.rs +1 -0
- package/crates/mint-core/src/agent/chat.rs +1003 -209
- package/crates/mint-core/src/agent/code_tools.rs +98 -2
- package/crates/mint-core/src/agent/memory/sources.rs +240 -0
- package/crates/mint-core/src/agent/memory.rs +805 -33
- package/crates/mint-core/src/agent/skill_inventory.rs +325 -0
- package/crates/mint-core/src/agent/skills.rs +437 -90
- package/crates/mint-core/src/agent.rs +1 -0
- package/crates/mint-core/src/api_server/routes/background_jobs.rs +310 -0
- package/crates/mint-core/src/api_server/routes/chat.rs +233 -190
- package/crates/mint-core/src/api_server/routes/html_preview.rs +77 -0
- package/crates/mint-core/src/api_server/routes/library.rs +97 -0
- package/crates/mint-core/src/api_server/routes/linked_folders.rs +118 -3
- package/crates/mint-core/src/api_server/routes/media_gen.rs +10 -57
- package/crates/mint-core/src/api_server/routes/misc.rs +114 -121
- package/crates/mint-core/src/api_server/routes/mod.rs +6 -0
- package/crates/mint-core/src/api_server/routes/mods.rs +31 -0
- package/crates/mint-core/src/api_server/routes/sessions.rs +85 -0
- package/crates/mint-core/src/api_server/routes/skills_subagents.rs +12 -42
- package/crates/mint-core/src/api_server/routes/slash.rs +50 -1
- package/crates/mint-core/src/api_server/routes/sources.rs +101 -0
- package/crates/mint-core/src/api_server.rs +140 -12
- package/crates/mint-core/src/avatar_bridge.rs +13 -2
- package/crates/mint-core/src/browser/cdp.rs +74 -83
- package/crates/mint-core/src/browser/evidence.rs +260 -0
- package/crates/mint-core/src/browser/input.rs +1 -1
- package/crates/mint-core/src/browser/interact.rs +98 -124
- package/crates/mint-core/src/browser/lifecycle.rs +75 -4
- package/crates/mint-core/src/browser/mod.rs +16 -2
- package/crates/mint-core/src/browser/navigate.rs +27 -19
- package/crates/mint-core/src/browser/observe.js +40 -0
- package/crates/mint-core/src/browser/session.rs +1610 -0
- package/crates/mint-core/src/companion.rs +716 -0
- package/crates/mint-core/src/cron/scheduler.rs +34 -2
- package/crates/mint-core/src/git/branches.rs +348 -0
- package/crates/mint-core/src/git/checkpoint.rs +40 -0
- package/crates/mint-core/src/git/diff.rs +206 -0
- package/crates/mint-core/src/git/mod.rs +10 -2
- package/crates/mint-core/src/integrations/channels.rs +88 -345
- package/crates/mint-core/src/integrations/mcp.rs +397 -50
- package/crates/mint-core/src/integrations/mcp_calls.rs +823 -0
- package/crates/mint-core/src/integrations/mcp_catalog.rs +267 -0
- package/crates/mint-core/src/integrations/mcp_device.rs +319 -0
- package/crates/mint-core/src/integrations/mcp_result.rs +356 -0
- package/crates/mint-core/src/integrations/webhooks.rs +539 -0
- package/crates/mint-core/src/integrations.rs +2 -0
- package/crates/mint-core/src/lib.rs +107 -40
- package/crates/mint-core/src/live_sync.rs +28 -9
- package/crates/mint-core/src/media/auto_shorts.rs +1 -0
- package/crates/mint-core/src/media/gemini_live.rs +145 -14
- package/crates/mint-core/src/media/image_models.rs +3 -27
- package/crates/mint-core/src/media/image_workflow.rs +216 -0
- package/crates/mint-core/src/media/library/intake.rs +144 -0
- package/crates/mint-core/src/media/library/migration.rs +56 -0
- package/crates/mint-core/src/media/library/removal.rs +55 -0
- package/crates/mint-core/src/media/library/tests.rs +730 -0
- package/crates/mint-core/src/media/library/thumbnails.rs +72 -0
- package/crates/mint-core/src/media/library.rs +545 -0
- package/crates/mint-core/src/media/mic_transcribe.rs +1 -0
- package/crates/mint-core/src/media/model_catalog.rs +375 -0
- package/crates/mint-core/src/media/pictures.rs +79 -222
- package/crates/mint-core/src/media/subtitle.rs +1 -0
- package/crates/mint-core/src/media/video_models.rs +3 -22
- package/crates/mint-core/src/media.rs +3 -0
- package/crates/mint-core/src/mods/manager.rs +1124 -0
- package/crates/mint-core/src/mods/mod.rs +569 -0
- package/crates/mint-core/src/mods/operations.rs +204 -0
- package/crates/mint-core/src/mods/session.rs +146 -0
- package/crates/mint-core/src/mods/slash.rs +59 -0
- package/crates/mint-core/src/mods/telemetry.rs +306 -0
- package/crates/mint-core/src/orchestration/approvals.rs +344 -0
- package/crates/mint-core/src/orchestration/context_render.rs +105 -0
- package/crates/mint-core/src/orchestration/mcp_review.rs +153 -0
- package/crates/mint-core/src/orchestration/memory_skill.rs +110 -33
- package/crates/mint-core/src/orchestration/mod.rs +3129 -481
- package/crates/mint-core/src/orchestration/mod_authoring_regressions.rs +209 -0
- package/crates/mint-core/src/orchestration/progress_clock.rs +80 -0
- package/crates/mint-core/src/orchestration/repeated_failures.rs +116 -0
- package/crates/mint-core/src/orchestration/review_regressions.rs +449 -0
- package/crates/mint-core/src/orchestration/run_control.rs +196 -0
- package/crates/mint-core/src/orchestration/tools/browser.rs +16 -139
- package/crates/mint-core/src/orchestration/tools/files.rs +161 -14
- package/crates/mint-core/src/orchestration/tools/media.rs +37 -41
- package/crates/mint-core/src/orchestration/tools/misc.rs +5 -3
- package/crates/mint-core/src/orchestration/tools/mod.rs +2 -0
- package/crates/mint-core/src/orchestration/tools/mods.rs +161 -0
- package/crates/mint-core/src/orchestration/tools/plugins_mcp.rs +303 -71
- package/crates/mint-core/src/orchestration/tools/shell.rs +95 -2
- package/crates/mint-core/src/orchestration/tools/web.rs +1 -1
- package/crates/mint-core/src/orchestration/workspace_helpers.rs +4 -1
- package/crates/mint-core/src/prompts/agent.rs +75 -31
- package/crates/mint-core/src/prompts/chat.rs +1 -1
- package/crates/mint-core/src/prompts/persona.rs +1 -1
- package/crates/mint-core/src/prompts/tool_catalog.rs +121 -27
- package/crates/mint-core/src/search/knowledge.rs +7 -1
- package/crates/mint-core/src/search/linked_folders/index.rs +896 -0
- package/crates/mint-core/src/search/linked_folders.rs +473 -131
- package/crates/mint-core/src/slash/catalog.rs +1 -1
- package/crates/mint-core/src/slash/mod.rs +644 -33
- package/crates/mint-core/src/slash/model_fetcher.rs +12 -3
- package/crates/mint-core/src/slash/models.rs +66 -10
- package/crates/mint-core/src/slash/mods.rs +155 -0
- package/crates/mint-core/src/system/bg_shell.rs +1129 -95
- package/crates/mint-core/src/system/config.rs +235 -10
- package/crates/mint-core/src/system/html_preview.rs +398 -0
- package/crates/mint-core/src/system/mint_web.rs +164 -0
- package/crates/mint-core/src/system/release_notes.rs +18 -0
- package/crates/mint-core/src/system/shell.rs +21 -6
- package/crates/mint-core/src/system/workspace.rs +292 -0
- package/crates/mint-core/src/system/workspace_history.rs +604 -0
- package/crates/mint-core/src/system.rs +5 -0
- package/crates/mint-core/tests/background_retention.rs +34 -0
- package/crates/mint-core/tests/background_shutdown.rs +24 -0
- package/crates/mint-core/tests/library_http.rs +209 -0
- package/crates/mint-core/tests/mcp_contract.rs +283 -0
- package/crates/mint-core/tests/mcp_stdio.rs +11 -10
- package/crates/mint-core/tests/media_model_catalog_http.rs +403 -0
- package/crates/mint-core/tests/memory_persistence.rs +39 -0
- package/crates/mint-core/tests/mods_http.rs +215 -0
- package/crates/mint-core/tests/terminal_shutdown.rs +109 -0
- package/crates/mint-mod-runtime/Cargo.toml +18 -0
- package/crates/mint-mod-runtime/src/lib.rs +507 -0
- package/crates/mint-mod-runtime/src/sdk.js +56 -0
- package/crates/mint-mod-runtime/src/test_sdk.js +32 -0
- package/crates/mint-mod-runtime/src/testing.rs +94 -0
- package/crates/mint-mod-runtime/tests/runtime.rs +156 -0
- package/docs/mods/AUTHORING.md +61 -0
- package/docs/mods/README.md +139 -0
- package/docs/mods/TESTING.md +56 -0
- package/docs/mods/mint-mods.d.ts +66 -0
- package/examples/device-mcp/README.md +22 -0
- package/examples/device-mcp/contract.md +49 -0
- package/examples/device-mcp/mock-device.mjs +66 -0
- package/examples/device-mcp/server.mjs +48 -0
- package/examples/device-mcp/server.test.mjs +78 -0
- package/examples/mods/task-checklist/README.md +1 -0
- package/examples/mods/task-checklist/main.ts +17 -0
- package/examples/mods/task-checklist/manifest.json +1 -0
- package/examples/mods/task-checklist/tests/checklist.test.ts +15 -0
- package/examples/mods/token-meter/README.md +1 -0
- package/examples/mods/token-meter/main.ts +8 -0
- package/examples/mods/token-meter/manifest.json +1 -0
- package/examples/mods/tool-guard/README.md +1 -0
- package/examples/mods/tool-guard/main.ts +9 -0
- package/examples/mods/tool-guard/manifest.json +1 -0
- package/out/web/assets/CliSessionsView-CtzUJpK_.css +1 -0
- package/out/web/assets/CliSessionsView-D7hw0Mgj.js +1 -0
- package/out/web/assets/CodeReviewPage-C7bEOJfd.js +4 -0
- package/out/web/assets/CodeReviewPage-Dte9uLiL.css +1 -0
- package/out/web/assets/CommandPalette-0RrF-AOT.js +1 -0
- package/out/web/assets/ImageStudioPanel-CdxkAf_r.js +1 -0
- package/out/web/assets/ImageStudioPanel-D0lnhQV5.css +1 -0
- package/out/web/assets/LibraryPage--Qfisp6D.js +2 -0
- package/out/web/assets/LibraryPage-DAxUTAg7.css +1 -0
- package/out/web/assets/LinkedFoldersView-2nfZbDgN.js +1 -0
- package/out/web/assets/McpRegistryPicker-h9uS8_wT.js +1 -0
- package/out/web/assets/McpServersView-slfQJzNB.js +1 -0
- package/out/web/assets/MintDashboard-BSR5XpXh.js +25 -0
- package/out/web/assets/MintDashboard-CWUcCGhd.css +1 -0
- package/out/web/assets/PluginsView-l7LSm503.js +1 -0
- package/out/web/assets/ScheduledTasksView-CttmLbq1.js +1 -0
- package/out/web/assets/SettingsWindow-BCMLYvEV.js +4 -0
- package/out/web/assets/SettingsWindow-DcMVmU9u.css +1 -0
- package/out/web/assets/SkillsView-rNs1qr_U.js +2 -0
- package/out/web/assets/ToolSurfacePage-B9DzEPWN.js +37 -0
- package/out/web/assets/ToolSurfacePage-CTfgggF2.css +1 -0
- package/out/web/assets/VeoStudioPanel-DOj7_WR3.css +1 -0
- package/out/web/assets/VeoStudioPanel-DiJs_Cg2.js +4 -0
- package/out/web/assets/WorkspacePanel-CbJ1PFoZ.js +1 -0
- package/out/web/assets/WorkspaceSelector-B2xIp04D.js +1 -0
- package/out/web/assets/WorkspaceSelector-Ca8uJOsS.css +1 -0
- package/out/web/assets/{abnfDiagram-VCTEODGH-DAOBA7ZG.js → abnfDiagram-VCTEODGH-CD0CjoGl.js} +1 -1
- package/out/web/assets/{architecture-7GRP2DOG-CgSwQOPQ.js → architecture-7GRP2DOG-RKV83OeZ.js} +1 -1
- package/out/web/assets/{architectureDiagram-5GKGNRK7-CYp3yupP.js → architectureDiagram-5GKGNRK7-nN_HAFct.js} +1 -1
- package/out/web/assets/{blockDiagram-NRAW4CY4-CyWybDWr.js → blockDiagram-NRAW4CY4-BrrqzHW5.js} +1 -1
- package/out/web/assets/{c4Diagram-UCG6FXSJ-BvY3U709.js → c4Diagram-UCG6FXSJ-DTdV8_zE.js} +1 -1
- package/out/web/assets/{chunk-75Z2AOVW-TLXCoZYv.js → chunk-75Z2AOVW-_M0z5olV.js} +1 -1
- package/out/web/assets/chunk-CKBBP62Z-BpQEgeHF.js +2 -0
- package/out/web/assets/{chunk-CLGD4ZFX-xjsKtNS7.js → chunk-CLGD4ZFX-D54yGvGS.js} +1 -1
- package/out/web/assets/chunk-DSNCTWBM-C-gvT2ru.js +2 -0
- package/out/web/assets/chunk-DU6HZSFF-CnFngIhW.js +128 -0
- package/out/web/assets/{chunk-F27PBJKO-BFpgF55A.js → chunk-F27PBJKO-BqtWrnEO.js} +1 -1
- package/out/web/assets/{chunk-G27WJ6UU-DfF7qW-C.js → chunk-G27WJ6UU-Ckoq5mi2.js} +1 -1
- package/out/web/assets/{chunk-GMAD6QVW-C-558kh_.js → chunk-GMAD6QVW-BuhEcgHq.js} +1 -1
- package/out/web/assets/{chunk-JQ64N6SF-wJmeGKAw.js → chunk-JQ64N6SF-CF8T7GiZ.js} +1 -1
- package/out/web/assets/{chunk-LCL6LL3I-C1wHD8Ie.js → chunk-LCL6LL3I-BhXV9zyH.js} +1 -1
- package/out/web/assets/{chunk-OBVCFTLP-BsRTPBqs.js → chunk-OBVCFTLP-CRIkunUB.js} +1 -1
- package/out/web/assets/{chunk-P2QGCYS3-HZIiM7Ni.js → chunk-P2QGCYS3-UFEU6BxZ.js} +1 -1
- package/out/web/assets/{chunk-POPQ4Y6H-Dk9wvVb0.js → chunk-POPQ4Y6H-CQcrNbjr.js} +1 -1
- package/out/web/assets/{chunk-PWAF6VOD-BmjYLNbq.js → chunk-PWAF6VOD-Cc2uVDsG.js} +1 -1
- package/out/web/assets/{chunk-R7TYR2AO-CaHIf-lK.js → chunk-R7TYR2AO-DiCxzdAY.js} +1 -1
- package/out/web/assets/{chunk-RHFEMEQ7-_T561hOU.js → chunk-RHFEMEQ7-b7hnPmrR.js} +1 -1
- package/out/web/assets/{chunk-SVP7TREG-CM-GGYoY.js → chunk-SVP7TREG-Bu_yYb-V.js} +1 -1
- package/out/web/assets/{chunk-TEH6E4GO-K2A8Vg2C.js → chunk-TEH6E4GO-G4Cdlyrt.js} +1 -1
- package/out/web/assets/classDiagram-DTDB5LWJ-RnC2mYO4.js +1 -0
- package/out/web/assets/classDiagram-v2-JRS7N3AN-RnC2mYO4.js +1 -0
- package/out/web/assets/config-CnvCChUM.js +2 -0
- package/out/web/assets/config-DM6oIVO3.css +1 -0
- package/out/web/assets/core-DsKkQ7ig.js +1 -0
- package/out/web/assets/{cynefin-OW5HDTMX-ClzaB6cc.js → cynefin-OW5HDTMX-CnzQfOGp.js} +1 -1
- package/out/web/assets/{cynefinDiagram-5FMLGOSQ-D_JzZBzf.js → cynefinDiagram-5FMLGOSQ-DVtQnfpm.js} +1 -1
- package/out/web/assets/{dagre-3AP2YEHR-BDuUeMHj.js → dagre-3AP2YEHR-DG76_k5_.js} +1 -1
- package/out/web/assets/{diagram-S7CK7UJ4-DgtcfE8P.js → diagram-S7CK7UJ4-CaouUoze.js} +1 -1
- package/out/web/assets/{diagram-UQ7AKVKN-DTLoEYti.js → diagram-UQ7AKVKN-B4bEc26B.js} +1 -1
- package/out/web/assets/{diagram-VSXAHHWV-ChGl9pXz.js → diagram-VSXAHHWV-BJ86Ov2Y.js} +1 -1
- package/out/web/assets/{diagram-VX7I27RA-Be8DWz0S.js → diagram-VX7I27RA-7hH5IPYf.js} +1 -1
- package/out/web/assets/{diagram-Z3DM3KII-BMXjRTOF.js → diagram-Z3DM3KII-CCM4clo8.js} +1 -1
- package/out/web/assets/dist-js-BkYNznHX.js +1 -0
- package/out/web/assets/{ebnfDiagram-PWID7BFC-8Q9pl1CJ.js → ebnfDiagram-PWID7BFC-Da7WAM3k.js} +1 -1
- package/out/web/assets/{erDiagram-SSCWMZ5O-DjH8Lnkn.js → erDiagram-SSCWMZ5O-CzzmnZWT.js} +1 -1
- package/out/web/assets/event-Cdt7Byyj.js +1 -0
- package/out/web/assets/{eventmodeling-NTZA5JFV-BKUH_DOp.js → eventmodeling-NTZA5JFV-xcfsA0XD.js} +1 -1
- package/out/web/assets/fira-code-latin-600-normal-BmSSHshu.woff +0 -0
- package/out/web/assets/fira-code-latin-600-normal-CvYZpPHg.woff2 +0 -0
- package/out/web/assets/fira-code-symbols2-600-normal-Dvq6IQE5.woff +0 -0
- package/out/web/assets/flowDiagram-A5DVABFB-JdtH1673.js +1 -0
- package/out/web/assets/{ganttDiagram-EL5Y4UJY-D7fZKJNM.js → ganttDiagram-EL5Y4UJY-B3ClFGmL.js} +1 -1
- package/out/web/assets/{gitGraph-4MIJSDKK-BypWaaBU.js → gitGraph-4MIJSDKK-BZ_y_cDU.js} +1 -1
- package/out/web/assets/{gitGraphDiagram-WWUBYQGX-DWiw_3bq.js → gitGraphDiagram-WWUBYQGX-drhRSYm3.js} +1 -1
- package/out/web/assets/index-BZ9xgmMP.css +1 -0
- package/out/web/assets/index-Ca8cCS4h.js +168 -0
- package/out/web/assets/{info-A6RAGUB7-KkAUxT4j.js → info-A6RAGUB7-B7I3K0F1.js} +1 -1
- package/out/web/assets/{infoDiagram-RXCK75RN-BNb6E48y.js → infoDiagram-RXCK75RN-deX_1MPh.js} +1 -1
- package/out/web/assets/{ishikawaDiagram-5VMMS53U-Caa-JoAK.js → ishikawaDiagram-5VMMS53U-s38yo28y.js} +1 -1
- package/out/web/assets/{journeyDiagram-EYS64GPL-DOrmFGz6.js → journeyDiagram-EYS64GPL-CZn2kB8b.js} +1 -1
- package/out/web/assets/jsx-runtime-DN4NhQUK.js +1 -0
- package/out/web/assets/{kanban-definition-3QL26DDD-BOWCYcK0.js → kanban-definition-3QL26DDD-DodjgySL.js} +1 -1
- package/out/web/assets/markdown-CMhYIcWB.js +39 -0
- package/out/web/assets/{mermaid-parser.core-BQqjCkS_.js → mermaid-parser.core-Whu2rlJC.js} +3 -3
- package/out/web/assets/mermaid.core-CKyPo8VH.js +11 -0
- package/out/web/assets/{mindmap-definition-FBJOCRG2-jTceWpr0.js → mindmap-definition-FBJOCRG2-260WBDxZ.js} +1 -1
- package/out/web/assets/modelManager-CUaGWMWu.js +2 -0
- package/out/web/assets/oauthManager-DlNhXJr6.js +1 -0
- package/out/web/assets/{packet-AYTQ26CC-CJ5RXgol.js → packet-AYTQ26CC-CEeIRKRG.js} +1 -1
- package/out/web/assets/{pegDiagram-XKGWAZYB-y8wMtd0y.js → pegDiagram-XKGWAZYB-BYadI-KO.js} +1 -1
- package/out/web/assets/{pie-WAS4IAKB-72fTBbl4.js → pie-WAS4IAKB-D8uf4dh5.js} +1 -1
- package/out/web/assets/{pieDiagram-E7YTZNPT-e0O02qWq.js → pieDiagram-E7YTZNPT-CjSDy4hO.js} +1 -1
- package/out/web/assets/{quadrantDiagram-AXDQQJYC-C9phYLom.js → quadrantDiagram-AXDQQJYC-B8D3gU5d.js} +1 -1
- package/out/web/assets/{radar-RG4KPBEZ-BAU2hzUT.js → radar-RG4KPBEZ-DZJxnokY.js} +1 -1
- package/out/web/assets/{railroad-74A4TZTK-B0bCAVHC.js → railroad-74A4TZTK-DBysUiUi.js} +1 -1
- package/out/web/assets/{railroad-abnf-HS5TGJTU-WhxO7ndE.js → railroad-abnf-HS5TGJTU-CHWxoJYg.js} +1 -1
- package/out/web/assets/{railroad-ebnf-LZEXJU2U-BkA0m7-F.js → railroad-ebnf-LZEXJU2U-DDv7X6bY.js} +1 -1
- package/out/web/assets/{railroad-peg-WCYAUIDC-BsVpHIaj.js → railroad-peg-WCYAUIDC-DpfcYYNJ.js} +1 -1
- package/out/web/assets/{railroadDiagram-O6MQD6OU-CyOLN65Q.js → railroadDiagram-O6MQD6OU-CYtyv0t3.js} +1 -1
- package/out/web/assets/{requirementDiagram-EFPCY7ZU-DQXJ7Dud.js → requirementDiagram-EFPCY7ZU-D2X-Ewik.js} +1 -1
- package/out/web/assets/{sankeyDiagram-P5KCCOFB-B2XLyIIc.js → sankeyDiagram-P5KCCOFB-Bn2x6C4Y.js} +1 -1
- package/out/web/assets/{sequenceDiagram-WJ2MYXX4-DGQY4wwm.js → sequenceDiagram-WJ2MYXX4-BvFLKtPd.js} +1 -1
- package/out/web/assets/{stateDiagram-HBIQ2CUA-DHZpDwNy.js → stateDiagram-HBIQ2CUA-Bx0GWeaY.js} +1 -1
- package/out/web/assets/stateDiagram-v2-4QOOHH4V--hol1yg_.js +1 -0
- package/out/web/assets/studio-B1mk40wD.js +1 -0
- package/out/web/assets/{swimlanes-XN3QIQJK-Bn_jcZz-.js → swimlanes-XN3QIQJK-CCma0T7L.js} +1 -1
- package/out/web/assets/swimlanesDiagram-VK2B7HYN-BkohoVsU.js +8 -0
- package/out/web/assets/{timeline-definition-24CTP7MA-CdTERuJZ.js → timeline-definition-24CTP7MA-iCRhhJ7C.js} +1 -1
- package/out/web/assets/{treeView-Q6P3EWNA-TKBKQG6R.js → treeView-Q6P3EWNA-DZ-y08qp.js} +1 -1
- package/out/web/assets/{treemap-WGGIJYW6-BP7gQoiC.js → treemap-WGGIJYW6-De0CxzMx.js} +1 -1
- package/out/web/assets/{vennDiagram-4TSXK5OY-BHUmxDuK.js → vennDiagram-4TSXK5OY-w_7aZ6xe.js} +1 -1
- package/out/web/assets/{wardley-WFR3VGLG-9bct5AAN.js → wardley-WFR3VGLG-DT0y0xJ4.js} +1 -1
- package/out/web/assets/{wardleyDiagram-VM6X3IG4-BfJwDDso.js → wardleyDiagram-VM6X3IG4-DAdXELbQ.js} +1 -1
- package/out/web/assets/window-BJCVtyET.js +1 -0
- package/out/web/assets/{xychartDiagram-S5SC5T6Z-Dqd9Mvpo.js → xychartDiagram-S5SC5T6Z-IZIXf3Vo.js} +1 -1
- package/out/web/index-web.html +4 -4
- package/out/web/index.html +4 -4
- package/package.json +80 -20
- package/shared-modules/.github/workflows/ci.yml +120 -0
- package/shared-modules/.github/workflows/update.yaml +28 -0
- package/slash-commands.json +16 -2
- package/src/bin/auto-build.js +66 -0
- package/src/bin/desktop.js +113 -0
- package/src/bin/desktop.test.js +113 -0
- package/src/bin/index.js +18 -25
- package/src/bin/index.test.js +89 -0
- package/src/bin/measure-effects.mjs +53 -0
- package/src/bin/package.test.js +28 -0
- package/src/bin/release-notes.test.js +84 -0
- package/src/bin/styles.test.js +20 -0
- package/src/bin/web.js +5 -0
- package/src/bin/web.test.js +39 -0
- package/src/renderer/index-web.html +1 -0
- package/src/renderer/index.html +1 -2
- package/src/renderer/node_modules/.vite/vitest/da39a3ee5e6b4b0d3255bfef95601890afd80709/results.json +1 -0
- package/src/renderer/shared/agentProgress.ts +201 -3
- package/src/renderer/shared/components/AgentActivityDrawer.tsx +9 -8
- package/src/renderer/shared/components/AgentActivityTable.tsx +193 -133
- package/src/renderer/shared/components/ApprovalCard.test.tsx +24 -0
- package/src/renderer/shared/components/ApprovalCard.tsx +10 -3
- package/src/renderer/shared/components/ArtifactPreviewPanel.tsx +91 -40
- package/src/renderer/shared/components/AuthGate.tsx +79 -48
- package/src/renderer/shared/components/BackgroundTerminals.tsx +181 -0
- package/src/renderer/shared/components/CalculationCard.tsx +41 -15
- package/src/renderer/shared/components/ChatCodeBlock.tsx +8 -4
- package/src/renderer/shared/components/ChatMessageItem.test.tsx +68 -0
- package/src/renderer/shared/components/ChatMessageItem.tsx +52 -33
- package/src/renderer/shared/components/ChatPanel.test.tsx +21 -0
- package/src/renderer/shared/components/ChatPanel.tsx +676 -415
- package/src/renderer/shared/components/ChunkErrorBoundary.tsx +115 -64
- package/src/renderer/shared/components/CliSessionsView.test.tsx +125 -0
- package/src/renderer/shared/components/CliSessionsView.tsx +543 -0
- package/src/renderer/shared/components/CodeReviewPage.tsx +668 -0
- package/src/renderer/shared/components/CollapsiblePasteInput.tsx +90 -0
- package/src/renderer/shared/components/CommandPalette.tsx +8 -8
- package/src/renderer/shared/components/ContextCompactionStatus.tsx +17 -0
- package/src/renderer/shared/components/DashboardSidebar.tsx +853 -229
- package/src/renderer/shared/components/DesktopTitlebar.tsx +371 -0
- package/src/renderer/shared/components/DiffReviewModal.tsx +3 -3
- package/src/renderer/shared/components/ErrorNotice.tsx +29 -0
- package/src/renderer/shared/components/FormattedMessage.tsx +11 -0
- package/src/renderer/shared/components/GeminiLiveOverlay.css +86 -0
- package/src/renderer/shared/components/GeminiLiveOverlay.test.tsx +24 -0
- package/src/renderer/shared/components/GeminiLiveOverlay.tsx +85 -101
- package/src/renderer/shared/components/GitBranchSelector.tsx +442 -0
- package/src/renderer/shared/components/GlideSelect.css +138 -0
- package/src/renderer/shared/components/GlideSelect.d.ts +31 -0
- package/src/renderer/shared/components/GlideSelect.jsx +266 -0
- package/src/renderer/shared/components/ImageGenCard.tsx +31 -12
- package/src/renderer/shared/components/ImageSearchCard.tsx +76 -65
- package/src/renderer/shared/components/ImageStudioPanel.tsx +49 -49
- package/src/renderer/shared/components/InlineThoughtNote.tsx +27 -0
- package/src/renderer/shared/components/LibraryItemCard.tsx +72 -0
- package/src/renderer/shared/components/LibraryPage.tsx +165 -0
- package/src/renderer/shared/components/LibraryPreview.tsx +59 -0
- package/src/renderer/shared/components/LinkedFoldersView.tsx +365 -46
- package/src/renderer/shared/components/McpRegistryPicker.tsx +1 -1
- package/src/renderer/shared/components/McpServersView.tsx +51 -30
- package/src/renderer/shared/components/McpToolAllowlist.tsx +2 -4
- package/src/renderer/shared/components/McpToolResults.tsx +99 -0
- package/src/renderer/shared/components/MermaidCard.tsx +14 -8
- package/src/renderer/shared/components/MintDashboard.tsx +1002 -831
- package/src/renderer/shared/components/ModSessionControls.tsx +8 -0
- package/src/renderer/shared/components/ModUi.test.tsx +65 -0
- package/src/renderer/shared/components/ModUi.tsx +26 -0
- package/src/renderer/shared/components/ModelSelectorPopover.tsx +547 -219
- package/src/renderer/shared/components/ModsPanel.tsx +156 -0
- package/src/renderer/shared/components/PlanChecklistWidget.tsx +1 -1
- package/src/renderer/shared/components/PluginsView.tsx +1 -1
- package/src/renderer/shared/components/ProgressActivity.tsx +17 -0
- package/src/renderer/shared/components/ReviewHistory.tsx +42 -0
- package/src/renderer/shared/components/RewindModal.tsx +11 -18
- package/src/renderer/shared/components/RunSummaryDashboard.tsx +8 -14
- package/src/renderer/shared/components/ScheduledTasksView.tsx +11 -10
- package/src/renderer/shared/components/ScreenCaptureDialog.css +221 -0
- package/src/renderer/shared/components/ScreenCaptureDialog.tsx +199 -0
- package/src/renderer/shared/components/SelectField.test.tsx +27 -0
- package/src/renderer/shared/components/SelectField.tsx +38 -0
- package/src/renderer/shared/components/SessionSources.tsx +48 -0
- package/src/renderer/shared/components/SessionSourcesPopover.tsx +61 -0
- package/src/renderer/shared/components/Settings/AgentsTab.tsx +41 -45
- package/src/renderer/shared/components/Settings/AudioTab.tsx +16 -15
- package/src/renderer/shared/components/Settings/AutomationTab.tsx +10 -60
- package/src/renderer/shared/components/Settings/AvatarCropModal.tsx +368 -0
- package/src/renderer/shared/components/Settings/GeneralTab.tsx +368 -113
- package/src/renderer/shared/components/Settings/MemoryTab.test.tsx +37 -0
- package/src/renderer/shared/components/Settings/MemoryTab.tsx +71 -31
- package/src/renderer/shared/components/Settings/NotificationsTab.test.tsx +15 -0
- package/src/renderer/shared/components/Settings/NotificationsTab.tsx +84 -0
- package/src/renderer/shared/components/Settings/PluginsTab.tsx +20 -12
- package/src/renderer/shared/components/Settings/ProfileTab.tsx +29 -5
- package/src/renderer/shared/components/Settings/SearchableModelCombobox.tsx +411 -0
- package/src/renderer/shared/components/Settings/ThemeTab.tsx +416 -165
- package/src/renderer/shared/components/SkillsView.tsx +41 -16
- package/src/renderer/shared/components/SlashChoicePanel.tsx +88 -0
- package/src/renderer/shared/components/SlashSuggestions.test.tsx +33 -0
- package/src/renderer/shared/components/SlashSuggestions.tsx +41 -12
- package/src/renderer/shared/components/SourcesBlock.tsx +55 -51
- package/src/renderer/shared/components/StockCard.tsx +58 -24
- package/src/renderer/shared/components/SubagentDagView.tsx +4 -4
- package/src/renderer/shared/components/TerminalDock.tsx +241 -0
- package/src/renderer/shared/components/ThinkingBlock.tsx +14 -8
- package/src/renderer/shared/components/ToolSurfacePage.test.tsx +32 -0
- package/src/renderer/shared/components/ToolSurfacePage.tsx +568 -0
- package/src/renderer/shared/components/ToolsPanelToggle.tsx +13 -0
- package/src/renderer/shared/components/UiFeatureCard.tsx +267 -0
- package/src/renderer/shared/components/UiGridCard.tsx +188 -0
- package/src/renderer/shared/components/UiMockupWidget.tsx +149 -0
- package/src/renderer/shared/components/VeoStudioPanel.tsx +22 -37
- package/src/renderer/shared/components/ViewedImages.tsx +36 -0
- package/src/renderer/shared/components/VirtualChatHistory.tsx +82 -0
- package/src/renderer/shared/components/VoicePill.css +85 -0
- package/src/renderer/shared/components/VoicePill.d.ts +12 -0
- package/src/renderer/shared/components/VoicePill.jsx +190 -0
- package/src/renderer/shared/components/VoicePill.test.tsx +22 -0
- package/src/renderer/shared/components/WeatherCard.tsx +3 -3
- package/src/renderer/shared/components/WorkspaceContextPopover.tsx +138 -0
- package/src/renderer/shared/components/WorkspacePaneResizer.tsx +92 -0
- package/src/renderer/shared/components/WorkspacePreviewActions.test.tsx +44 -0
- package/src/renderer/shared/components/WorkspacePreviewActions.tsx +19 -0
- package/src/renderer/shared/components/WorkspaceSelector.tsx +154 -0
- package/src/renderer/shared/components/background-terminals.css +292 -0
- package/src/renderer/shared/components/ui/README.md +52 -0
- package/src/renderer/shared/components/ui/button.tsx +37 -0
- package/src/renderer/shared/components/ui/demo.tsx +26 -0
- package/src/renderer/shared/components/ui/error-recovery.css +35 -0
- package/src/renderer/shared/components/ui/error-recovery.tsx +35 -0
- package/src/renderer/shared/components/ui/voice-powered-orb.css +6 -0
- package/src/renderer/shared/components/ui/voice-powered-orb.tsx +374 -0
- package/src/renderer/shared/components/workspace-selector.css +248 -0
- package/src/renderer/shared/constants/config.ts +57 -3
- package/src/renderer/shared/constants/models.ts +189 -2
- package/src/renderer/shared/constants/slashCommands.ts +1 -1
- package/src/renderer/shared/conversation/coordinator.test.ts +27 -0
- package/src/renderer/shared/conversation/coordinator.ts +82 -0
- package/src/renderer/shared/conversation/lifecycle.test.ts +362 -0
- package/src/renderer/shared/conversation/lifecycle.ts +418 -0
- package/src/renderer/shared/conversation/projectNavigation.test.ts +105 -0
- package/src/renderer/shared/conversation/projectNavigation.ts +39 -0
- package/src/renderer/shared/conversation/sourcesTransport.ts +27 -0
- package/src/renderer/shared/conversation/syncView.test.ts +13 -0
- package/src/renderer/shared/conversation/syncView.ts +6 -0
- package/src/renderer/shared/conversation/transport.test.ts +163 -0
- package/src/renderer/shared/conversation/transport.ts +159 -0
- package/src/renderer/shared/conversation/useConversationCoordinator.ts +64 -0
- package/src/renderer/shared/css/agent-observability.css +46 -15
- package/src/renderer/shared/css/auth-gate.css +114 -15
- package/src/renderer/shared/css/chat-ui-cards.css +495 -0
- package/src/renderer/shared/css/code-review.css +856 -0
- package/src/renderer/shared/css/code-sessions.css +479 -0
- package/src/renderer/shared/css/collapsed-paste.css +35 -0
- package/src/renderer/shared/css/effects.css +15 -0
- package/src/renderer/shared/css/error-notice.css +60 -0
- package/src/renderer/shared/css/file-changes.css +132 -0
- package/src/renderer/shared/css/image-studio.css +16 -16
- package/src/renderer/shared/css/library.css +476 -0
- package/src/renderer/shared/css/management-views.css +415 -27
- package/src/renderer/shared/css/mcp-results.css +11 -0
- package/src/renderer/shared/css/model-selector.css +543 -85
- package/src/renderer/shared/css/mods.css +77 -0
- package/src/renderer/shared/css/notification-notice.css +28 -0
- package/src/renderer/shared/css/session-sources-popover.css +9 -0
- package/src/renderer/shared/css/session-sources.css +23 -0
- package/src/renderer/shared/css/settings/agents.css +1 -1
- package/src/renderer/shared/css/settings/automation.css +13 -13
- package/src/renderer/shared/css/settings/general.css +526 -5
- package/src/renderer/shared/css/settings/memory.css +154 -0
- package/src/renderer/shared/css/settings/notifications.css +11 -0
- package/src/renderer/shared/css/settings/plugins.css +5 -5
- package/src/renderer/shared/css/settings/profile.css +331 -1
- package/src/renderer/shared/css/settings/theme.css +656 -3
- package/src/renderer/shared/css/slash-choice.css +95 -0
- package/src/renderer/shared/css/slash-suggestions.css +68 -0
- package/src/renderer/shared/css/sources-block.css +91 -0
- package/src/renderer/shared/css/thinking-status.css +46 -0
- package/src/renderer/shared/css/tools-panel.css +7 -0
- package/src/renderer/shared/css/ui-tailwind.css +19 -0
- package/src/renderer/shared/css/veo-studio.css +16 -15
- package/src/renderer/shared/css/viewed-images.css +15 -0
- package/src/renderer/shared/fonts.css +46 -0
- package/src/renderer/shared/fonts.ts +10 -37
- package/src/renderer/shared/lib/utils.ts +6 -0
- package/src/renderer/shared/library/controller.test.ts +61 -0
- package/src/renderer/shared/library/controller.ts +57 -0
- package/src/renderer/shared/library/transport.test.ts +26 -0
- package/src/renderer/shared/library/transport.ts +60 -0
- package/src/renderer/shared/library/useLibraryFile.ts +38 -0
- package/src/renderer/shared/mods.ts +58 -0
- package/src/renderer/shared/platform.test.ts +90 -0
- package/src/renderer/shared/platform.ts +219 -7
- package/src/renderer/shared/theme/themeManager.test.ts +43 -0
- package/src/renderer/shared/theme/themeManager.ts +157 -0
- package/src/renderer/shared/theme/themes.ts +116 -0
- package/src/renderer/shared/theme/tokens.css +318 -0
- package/src/renderer/shared/types.ts +137 -2
- package/src/renderer/shared/utils/agentActivity.test.ts +75 -0
- package/src/renderer/shared/utils/agentActivity.ts +168 -8
- package/src/renderer/shared/utils/approval.tsx +7 -0
- package/src/renderer/shared/utils/artifactBrowser.test.ts +80 -0
- package/src/renderer/shared/utils/artifactBrowser.ts +41 -0
- package/src/renderer/shared/utils/cardJson.test.ts +35 -0
- package/src/renderer/shared/utils/cardJson.ts +30 -0
- package/src/renderer/shared/utils/contextCompaction.test.tsx +48 -0
- package/src/renderer/shared/utils/contextCompaction.ts +21 -0
- package/src/renderer/shared/utils/effectVisibility.ts +9 -0
- package/src/renderer/shared/utils/fileIcons.ts +1 -1
- package/src/renderer/shared/utils/markdown.tsx +330 -81
- package/src/renderer/shared/utils/markdown.webImages.test.tsx +40 -0
- package/src/renderer/shared/utils/mcpResults.test.tsx +91 -0
- package/src/renderer/shared/utils/modViewport.ts +7 -0
- package/src/renderer/shared/utils/nativeRecordingSession.test.ts +61 -0
- package/src/renderer/shared/utils/nativeRecordingSession.ts +46 -0
- package/src/renderer/shared/utils/notificationSettings.test.ts +14 -0
- package/src/renderer/shared/utils/notificationSettings.ts +23 -0
- package/src/renderer/shared/utils/notifications.test.ts +51 -0
- package/src/renderer/shared/utils/notifications.ts +54 -0
- package/src/renderer/shared/utils/pastedText.test.ts +20 -0
- package/src/renderer/shared/utils/pastedText.ts +13 -0
- package/src/renderer/shared/utils/progressCache.test.ts +32 -0
- package/src/renderer/shared/utils/providers.ts +8 -3
- package/src/renderer/shared/utils/screenCapture.ts +43 -0
- package/src/renderer/shared/utils/sessionSources.test.ts +31 -0
- package/src/renderer/shared/utils/sessionSources.ts +34 -0
- package/src/renderer/shared/utils/slashCommandProcessor.ts +5 -2
- package/src/renderer/shared/utils/sourceAttachments.ts +28 -0
- package/src/renderer/shared/utils/speech.ts +51 -9
- package/src/renderer/shared/utils/syntaxHighlight.test.tsx +22 -0
- package/src/renderer/shared/utils/syntaxHighlight.tsx +26 -0
- package/src/renderer/shared/utils/ui.ts +4 -64
- package/src/renderer/shared/utils/useGeminiLiveVoice.ts +49 -5
- package/src/renderer/shared/utils/useLatestCallback.ts +9 -0
- package/src/renderer/shared/utils/useNativeVoiceInput.ts +80 -72
- package/src/renderer/shared/utils/useSessionSources.ts +33 -0
- package/src/renderer/shared/utils/viewedImages.ts +26 -0
- package/src/renderer/shared/utils/workspacePane.test.ts +33 -0
- package/src/renderer/shared/utils/workspacePane.ts +20 -0
- package/src/renderer/shared/utils/workspacePreview.test.ts +24 -0
- package/src/renderer/shared/utils/workspacePreview.ts +16 -0
- package/src/renderer/shared/utils/workspaceSnapshot.test.ts +49 -0
- package/src/renderer/shared/utils/workspaceSnapshot.ts +26 -0
- package/src/renderer/shared/utils/workspaces.ts +10 -0
- package/src/renderer/shared/workspaceUndo.ts +88 -0
- package/src/renderer/src/App.tsx +16 -1
- package/src/renderer/src/components/BrowserShell.tsx +108 -0
- package/src/renderer/src/components/BrowserSuggestionsPopup.tsx +91 -0
- package/src/renderer/src/components/LiveTranslateControls.tsx +65 -0
- package/src/renderer/src/components/MintDashboard.tsx +4 -2
- package/src/renderer/src/components/PicturesLibrary.tsx +2 -287
- package/src/renderer/src/components/ScreenPicker.css +227 -0
- package/src/renderer/src/components/ScreenPicker.tsx +312 -526
- package/src/renderer/src/components/SettingsWindow.tsx +48 -5
- package/src/renderer/src/components/SpotlightWindow.tsx +1 -0
- package/src/renderer/src/components/WidgetWindow.tsx +27 -3
- package/src/renderer/src/components/WorkspacePanel.tsx +269 -61
- package/src/renderer/src/components/browser-shell.css +185 -0
- package/src/renderer/src/components/browser-suggestions-popup.css +55 -0
- package/src/renderer/src/components/liveTranslateFrames.test.ts +44 -0
- package/src/renderer/src/components/liveTranslateFrames.ts +45 -0
- package/src/renderer/src/components/liveTranslateLanguage.ts +6 -0
- package/src/renderer/src/css/app-shell.css +400 -204
- package/src/renderer/src/css/chat.css +1666 -594
- package/src/renderer/src/css/dashboard.css +11 -0
- package/src/renderer/src/css/desktop-tools.css +928 -0
- package/src/renderer/src/css/misc.css +5 -60
- package/src/renderer/src/css/pictures.css +2 -407
- package/src/renderer/src/css/settings/base.css +394 -157
- package/src/renderer/src/css/sidebar-workspace.css +1072 -376
- package/src/renderer/src/css/spotlight.css +15 -26
- package/src/renderer/src/css/tool-surfaces.css +784 -0
- package/src/renderer/src/css/widget.css +36 -8
- package/src/renderer/src/env.d.ts +4 -9
- package/src/renderer/src/hooks/useProviderModels.ts +2 -9
- package/src/renderer/src/index.css +53 -46
- package/src/renderer/src/main.tsx +12 -0
- package/src/renderer/src/proactiveSuggestions.ts +29 -0
- package/src/renderer/src/tauri.ts +302 -339
- package/src/renderer/src/voiceInput.ts +2 -1
- package/src/renderer/src-web/App.tsx +40 -0
- package/src/renderer/src-web/components/MintDashboard.tsx +4 -2
- package/src/renderer/src-web/components/PicturesLibrary.tsx +2 -284
- package/src/renderer/src-web/components/PullToRefresh.tsx +107 -0
- package/src/renderer/src-web/components/SettingsWindow.tsx +36 -5
- package/src/renderer/src-web/css/app-shell.css +188 -207
- package/src/renderer/src-web/css/chat.css +1236 -507
- package/src/renderer/src-web/css/dashboard.css +11 -0
- package/src/renderer/src-web/css/misc.css +3 -55
- package/src/renderer/src-web/css/mobile.css +679 -0
- package/src/renderer/src-web/css/pictures.css +2 -415
- package/src/renderer/src-web/css/pull-to-refresh.css +54 -0
- package/src/renderer/src-web/css/settings/base.css +353 -134
- package/src/renderer/src-web/css/settings/mobile.css +320 -0
- package/src/renderer/src-web/css/sidebar-workspace.css +546 -187
- package/src/renderer/src-web/css/spotlight.css +9 -26
- package/src/renderer/src-web/css/widget.css +1 -6
- package/src/renderer/src-web/env.d.ts +4 -12
- package/src/renderer/src-web/hooks/useProviderModels.ts +2 -9
- package/src/renderer/src-web/index.css +53 -96
- package/src/renderer/src-web/main.tsx +12 -0
- package/src/renderer/src-web/proactiveSuggestions.ts +3 -0
- package/src/renderer/src-web/tauri.ts +309 -364
- package/src/renderer/tests/backgroundTerminals.browser.html +81 -0
- package/src/renderer/tests/chatPanelFixture.ts +23 -0
- package/src/renderer/tests/chatPerformance.browser.html +71 -0
- package/src/renderer/tests/cliSessions.browser.html +82 -0
- package/src/renderer/tests/collapsedPaste.browser.html +70 -0
- package/src/renderer/tests/composerMenus.browser.html +116 -0
- package/src/renderer/tests/contextCompaction.browser.html +17 -0
- package/src/renderer/tests/conversationLifecycle.browser.html +70 -0
- package/src/renderer/tests/effectsPerformance.browser.html +13 -0
- package/src/renderer/tests/errorRecovery.browser.html +21 -0
- package/src/renderer/tests/glideSelect.browser.html +71 -0
- package/src/renderer/tests/glideSelect.preview.html +27 -0
- package/src/renderer/tests/library.browser.html +1 -0
- package/src/renderer/tests/library.browser.tsx +78 -0
- package/src/renderer/tests/liveOrb.browser.html +49 -0
- package/src/renderer/tests/liveVoice.browser.html +29 -0
- package/src/renderer/tests/modInput.browser.html +22 -0
- package/src/renderer/tests/sessionSources.browser.html +1 -0
- package/src/renderer/tests/sessionSources.browser.tsx +107 -0
- package/src/renderer/tests/skills.browser.html +24 -0
- package/src/renderer/tests/toolsPanel.browser.html +1 -0
- package/src/renderer/tests/toolsPanel.browser.tsx +113 -0
- package/src/renderer/tests/viewedImages.browser.html +1 -0
- package/src/renderer/tests/viewedImages.browser.tsx +93 -0
- package/src/renderer/tests/voicePill.browser.html +80 -0
- package/src/renderer/tests/voicePill.preview.html +34 -0
- package/src/renderer/tests/webSources.browser.html +1 -0
- package/src/renderer/tests/webSources.browser.tsx +98 -0
- package/src/renderer/tests/workspaceUndo.browser.html +92 -0
- package/src-tauri/Cargo.toml +40 -0
- package/src-tauri/build.rs +3 -0
- package/src-tauri/src/app/lifecycle.rs +277 -0
- package/src-tauri/src/app/mod.rs +4 -0
- package/src-tauri/src/app/shortcuts.rs +40 -0
- package/src-tauri/src/app/tray.rs +52 -0
- package/src-tauri/src/background/events.rs +70 -0
- package/src-tauri/src/background/headless.rs +230 -0
- package/src-tauri/src/background/mod.rs +4 -0
- package/src-tauri/src/background/proactive.rs +262 -0
- package/src-tauri/src/commands/approvals.rs +20 -0
- package/src-tauri/src/commands/auth.rs +127 -0
- package/src-tauri/src/commands/conversation.rs +642 -0
- package/src-tauri/src/commands/integrations.rs +157 -0
- package/src-tauri/src/commands/media.rs +179 -0
- package/src-tauri/src/commands/mod.rs +11 -0
- package/src-tauri/src/commands/mods.rs +6 -0
- package/src-tauri/src/commands/settings.rs +141 -0
- package/src-tauri/src/commands/voice.rs +153 -0
- package/src-tauri/src/commands/workspace.rs +501 -0
- package/src-tauri/src/lib.rs +10 -0
- package/src-tauri/src/main.rs +3 -0
- package/src-tauri/src/native/actions.rs +206 -0
- package/src-tauri/src/native/browser.rs +252 -0
- package/src-tauri/src/native/capture.rs +695 -0
- package/src-tauri/src/native/discord_rpc.rs +99 -0
- package/src-tauri/src/native/integrations.rs +126 -0
- package/src-tauri/src/native/mod.rs +12 -0
- package/src-tauri/src/native/notifications.rs +51 -0
- package/src-tauri/src/native/plugins.rs +14 -0
- package/src-tauri/src/native/system.rs +250 -0
- package/src-tauri/src/native/terminal.rs +201 -0
- package/src-tauri/src/native/updater.rs +148 -0
- package/src-tauri/src/native/windows.rs +143 -0
- package/tsconfig.json +2 -0
- package/vite.config.ts +4 -1
- package/vite.config.web.ts +5 -0
- package/.cargo/config.toml +0 -13
- package/.claude/settings.local.json +0 -182
- package/.codex +0 -0
- package/CLAUDE.md +0 -102
- package/out/web/Live2DCubismCore.js +0 -9
- package/out/web/assets/MintDashboard-DWSqucgb.js +0 -57
- package/out/web/assets/SettingsWindow-DFM2aj5B.js +0 -2
- package/out/web/assets/chunk-CKBBP62Z-nr1uKPj9.js +0 -2
- package/out/web/assets/chunk-DSNCTWBM-Dtj8Rqsd.js +0 -2
- package/out/web/assets/chunk-DU6HZSFF-2tv5K1wT.js +0 -128
- package/out/web/assets/classDiagram-DTDB5LWJ-BdSFArgw.js +0 -1
- package/out/web/assets/classDiagram-v2-JRS7N3AN-BdSFArgw.js +0 -1
- package/out/web/assets/core-DImejIUG.js +0 -1
- package/out/web/assets/dist-js-BxuKEVWM.js +0 -1
- package/out/web/assets/event-BNl8Zahw.js +0 -1
- package/out/web/assets/fira-code-cyrillic-400-normal-UC0NFL4U.woff2 +0 -0
- package/out/web/assets/fira-code-cyrillic-400-normal-dc1q3VD7.woff +0 -0
- package/out/web/assets/fira-code-cyrillic-500-normal-Bu7VCL72.woff +0 -0
- package/out/web/assets/fira-code-cyrillic-500-normal-CX35h3Mg.woff2 +0 -0
- package/out/web/assets/fira-code-cyrillic-ext-400-normal-Buh61xzB.woff +0 -0
- package/out/web/assets/fira-code-cyrillic-ext-400-normal-txZ9Fk_1.woff2 +0 -0
- package/out/web/assets/fira-code-cyrillic-ext-500-normal-CYRspHgm.woff2 +0 -0
- package/out/web/assets/fira-code-cyrillic-ext-500-normal-CwtLmSFD.woff +0 -0
- package/out/web/assets/fira-code-greek-400-normal-B2Gh_Y8s.woff2 +0 -0
- package/out/web/assets/fira-code-greek-400-normal-DobhaxvF.woff +0 -0
- package/out/web/assets/fira-code-greek-500-normal-CVO0IRNt.woff2 +0 -0
- package/out/web/assets/fira-code-greek-500-normal-DEXIWiey.woff +0 -0
- package/out/web/assets/fira-code-greek-ext-400-normal-DR7mBgIM.woff2 +0 -0
- package/out/web/assets/fira-code-greek-ext-400-normal-DSPUheWg.woff +0 -0
- package/out/web/assets/fira-code-greek-ext-500-normal-BO3iq16n.woff2 +0 -0
- package/out/web/assets/fira-code-greek-ext-500-normal-CMiNLXER.woff +0 -0
- package/out/web/assets/fira-code-latin-ext-400-normal-DG73JjOf.woff +0 -0
- package/out/web/assets/fira-code-latin-ext-400-normal-KSMg0QLl.woff2 +0 -0
- package/out/web/assets/fira-code-latin-ext-500-normal-CaANqXjI.woff +0 -0
- package/out/web/assets/fira-code-latin-ext-500-normal-Crd9e_oI.woff2 +0 -0
- package/out/web/assets/flowDiagram-A5DVABFB-BpnHUSU7.js +0 -1
- package/out/web/assets/index-CVRg270z.css +0 -1
- package/out/web/assets/index-DxZQr9yD.js +0 -10
- package/out/web/assets/inter-cyrillic-400-normal-HOLc17fK.woff +0 -0
- package/out/web/assets/inter-cyrillic-400-normal-obahsSVq.woff2 +0 -0
- package/out/web/assets/inter-cyrillic-500-normal-BasfLYem.woff2 +0 -0
- package/out/web/assets/inter-cyrillic-500-normal-CxZf_p3X.woff +0 -0
- package/out/web/assets/inter-cyrillic-600-normal-4D_pXhcN.woff +0 -0
- package/out/web/assets/inter-cyrillic-600-normal-CWCymEST.woff2 +0 -0
- package/out/web/assets/inter-cyrillic-ext-400-normal-BQZuk6qB.woff2 +0 -0
- package/out/web/assets/inter-cyrillic-ext-400-normal-DQukG94-.woff +0 -0
- package/out/web/assets/inter-cyrillic-ext-500-normal-B0yAr1jD.woff2 +0 -0
- package/out/web/assets/inter-cyrillic-ext-500-normal-BmqWE9Dz.woff +0 -0
- package/out/web/assets/inter-cyrillic-ext-600-normal-Bcila6Z-.woff +0 -0
- package/out/web/assets/inter-cyrillic-ext-600-normal-Dfes3d0z.woff2 +0 -0
- package/out/web/assets/inter-greek-400-normal-B4URO6DV.woff2 +0 -0
- package/out/web/assets/inter-greek-400-normal-q2sYcFCs.woff +0 -0
- package/out/web/assets/inter-greek-500-normal-BIZE56-Y.woff2 +0 -0
- package/out/web/assets/inter-greek-500-normal-Xzm54t5V.woff +0 -0
- package/out/web/assets/inter-greek-600-normal-BZpKdvQh.woff +0 -0
- package/out/web/assets/inter-greek-600-normal-plRanbMR.woff2 +0 -0
- package/out/web/assets/inter-greek-ext-400-normal-DGGRlc-M.woff2 +0 -0
- package/out/web/assets/inter-greek-ext-400-normal-KugGGMne.woff +0 -0
- package/out/web/assets/inter-greek-ext-500-normal-2j5mBUwD.woff +0 -0
- package/out/web/assets/inter-greek-ext-500-normal-C4iEst2y.woff2 +0 -0
- package/out/web/assets/inter-greek-ext-600-normal-B8X0CLgF.woff +0 -0
- package/out/web/assets/inter-greek-ext-600-normal-DRtmH8MT.woff2 +0 -0
- package/out/web/assets/inter-latin-400-normal-C38fXH4l.woff2 +0 -0
- package/out/web/assets/inter-latin-400-normal-CyCys3Eg.woff +0 -0
- package/out/web/assets/inter-latin-500-normal-BL9OpVg8.woff +0 -0
- package/out/web/assets/inter-latin-500-normal-Cerq10X2.woff2 +0 -0
- package/out/web/assets/inter-latin-600-normal-CiBQ2DWP.woff +0 -0
- package/out/web/assets/inter-latin-600-normal-LgqL8muc.woff2 +0 -0
- package/out/web/assets/inter-latin-ext-400-normal-77YHD8bZ.woff +0 -0
- package/out/web/assets/inter-latin-ext-400-normal-C1nco2VV.woff2 +0 -0
- package/out/web/assets/inter-latin-ext-500-normal-BxGbmqWO.woff +0 -0
- package/out/web/assets/inter-latin-ext-500-normal-CV4jyFjo.woff2 +0 -0
- package/out/web/assets/inter-latin-ext-600-normal-CIVaiw4L.woff +0 -0
- package/out/web/assets/inter-latin-ext-600-normal-D2bJ5OIk.woff2 +0 -0
- package/out/web/assets/inter-vietnamese-400-normal-Bbgyi5SW.woff +0 -0
- package/out/web/assets/inter-vietnamese-400-normal-DMkecbls.woff2 +0 -0
- package/out/web/assets/inter-vietnamese-500-normal-DOriooB6.woff2 +0 -0
- package/out/web/assets/inter-vietnamese-500-normal-mJboJaSs.woff +0 -0
- package/out/web/assets/inter-vietnamese-600-normal-BuLX-rYi.woff +0 -0
- package/out/web/assets/inter-vietnamese-600-normal-Cc8MFFhd.woff2 +0 -0
- package/out/web/assets/kanit-latin-400-normal-BUlsQXH3.woff2 +0 -0
- package/out/web/assets/kanit-latin-400-normal-HVZWrfev.woff +0 -0
- package/out/web/assets/kanit-latin-500-normal-CX_4XcKi.woff2 +0 -0
- package/out/web/assets/kanit-latin-500-normal-qBha86O4.woff +0 -0
- package/out/web/assets/kanit-latin-600-normal-0lS78yAd.woff2 +0 -0
- package/out/web/assets/kanit-latin-600-normal-DlacpeTg.woff +0 -0
- package/out/web/assets/kanit-latin-ext-400-normal-B2xPf58u.woff2 +0 -0
- package/out/web/assets/kanit-latin-ext-400-normal-CHvNKHHD.woff +0 -0
- package/out/web/assets/kanit-latin-ext-500-normal-BFdWrG22.woff +0 -0
- package/out/web/assets/kanit-latin-ext-500-normal-EHs3suD6.woff2 +0 -0
- package/out/web/assets/kanit-latin-ext-600-normal-BBDzoLaj.woff +0 -0
- package/out/web/assets/kanit-latin-ext-600-normal-DAX3wtuq.woff2 +0 -0
- package/out/web/assets/kanit-thai-400-normal-D2nliXKa.woff +0 -0
- package/out/web/assets/kanit-thai-400-normal-D80Pglro.woff2 +0 -0
- package/out/web/assets/kanit-thai-500-normal-BB8gri04.woff2 +0 -0
- package/out/web/assets/kanit-thai-500-normal-Iy_w0a80.woff +0 -0
- package/out/web/assets/kanit-thai-600-normal-Bj6oiaDc.woff2 +0 -0
- package/out/web/assets/kanit-thai-600-normal-wbTlPO7I.woff +0 -0
- package/out/web/assets/kanit-vietnamese-400-normal-DRI8YWyb.woff2 +0 -0
- package/out/web/assets/kanit-vietnamese-400-normal-dow6Bnto.woff +0 -0
- package/out/web/assets/kanit-vietnamese-500-normal-BzTrpCM3.woff2 +0 -0
- package/out/web/assets/kanit-vietnamese-500-normal-T1ndT7MF.woff +0 -0
- package/out/web/assets/kanit-vietnamese-600-normal-Bi7fw3I4.woff2 +0 -0
- package/out/web/assets/kanit-vietnamese-600-normal-DXCRAa_8.woff +0 -0
- package/out/web/assets/mali-latin-400-normal-ByPcZ8Gx.woff +0 -0
- package/out/web/assets/mali-latin-400-normal-Cuc6Ykl8.woff2 +0 -0
- package/out/web/assets/mali-latin-500-normal-B01M-LP6.woff2 +0 -0
- package/out/web/assets/mali-latin-500-normal-Thgqw_9f.woff +0 -0
- package/out/web/assets/mali-latin-600-normal-B9TiUNpT.woff2 +0 -0
- package/out/web/assets/mali-latin-600-normal-CycpQCwU.woff +0 -0
- package/out/web/assets/mali-latin-ext-400-normal-DUVdJQO4.woff +0 -0
- package/out/web/assets/mali-latin-ext-400-normal-iCG1ALuJ.woff2 +0 -0
- package/out/web/assets/mali-latin-ext-500-normal-BfJE4UMZ.woff2 +0 -0
- package/out/web/assets/mali-latin-ext-500-normal-FoLEyOKS.woff +0 -0
- package/out/web/assets/mali-latin-ext-600-normal-BTvIfiCp.woff2 +0 -0
- package/out/web/assets/mali-latin-ext-600-normal-DAQcLVmD.woff +0 -0
- package/out/web/assets/mali-thai-400-normal-BO7A3bLZ.woff2 +0 -0
- package/out/web/assets/mali-thai-400-normal-CX9VrjTn.woff +0 -0
- package/out/web/assets/mali-thai-500-normal-Cph2qha9.woff +0 -0
- package/out/web/assets/mali-thai-500-normal-D89rMT77.woff2 +0 -0
- package/out/web/assets/mali-thai-600-normal-DPgXT6rZ.woff +0 -0
- package/out/web/assets/mali-thai-600-normal-DlTx3OsB.woff2 +0 -0
- package/out/web/assets/mali-vietnamese-400-normal-DUKxzXaz.woff2 +0 -0
- package/out/web/assets/mali-vietnamese-400-normal-gFDLvsOK.woff +0 -0
- package/out/web/assets/mali-vietnamese-500-normal--OY07q2c.woff +0 -0
- package/out/web/assets/mali-vietnamese-500-normal-KDrNRwfW.woff2 +0 -0
- package/out/web/assets/mali-vietnamese-600-normal-CtTMUU7T.woff +0 -0
- package/out/web/assets/mali-vietnamese-600-normal-DFlJr66u.woff2 +0 -0
- package/out/web/assets/mermaid.core-DYGGlqOf.js +0 -11
- package/out/web/assets/mitr-latin-400-normal-Cb18vPmZ.woff +0 -0
- package/out/web/assets/mitr-latin-400-normal-CwbkLQ4a.woff2 +0 -0
- package/out/web/assets/mitr-latin-500-normal-B4JOhzAi.woff +0 -0
- package/out/web/assets/mitr-latin-500-normal-BmClOow2.woff2 +0 -0
- package/out/web/assets/mitr-latin-ext-400-normal-B3CPG7Yo.woff2 +0 -0
- package/out/web/assets/mitr-latin-ext-400-normal-DTx65hiC.woff +0 -0
- package/out/web/assets/mitr-latin-ext-500-normal-B_Diajz1.woff2 +0 -0
- package/out/web/assets/mitr-latin-ext-500-normal-DYOsVaVT.woff +0 -0
- package/out/web/assets/mitr-thai-400-normal-CS4Do6aM.woff +0 -0
- package/out/web/assets/mitr-thai-400-normal-CXWaAdVj.woff2 +0 -0
- package/out/web/assets/mitr-thai-500-normal-CVdBrEVH.woff2 +0 -0
- package/out/web/assets/mitr-thai-500-normal-CW_B5D-i.woff +0 -0
- package/out/web/assets/mitr-vietnamese-400-normal-CPMGWyoC.woff2 +0 -0
- package/out/web/assets/mitr-vietnamese-400-normal-Z6XhIpdY.woff +0 -0
- package/out/web/assets/mitr-vietnamese-500-normal-CDrv0585.woff2 +0 -0
- package/out/web/assets/mitr-vietnamese-500-normal-CMQWyq-Z.woff +0 -0
- package/out/web/assets/noto-sans-thai-latin-400-normal-BaWBrqFP.woff2 +0 -0
- package/out/web/assets/noto-sans-thai-latin-400-normal-Dh_FJjOB.woff +0 -0
- package/out/web/assets/noto-sans-thai-latin-500-normal-BC04jsmm.woff +0 -0
- package/out/web/assets/noto-sans-thai-latin-500-normal-fyBKClF1.woff2 +0 -0
- package/out/web/assets/noto-sans-thai-latin-600-normal-CemcjnVR.woff2 +0 -0
- package/out/web/assets/noto-sans-thai-latin-600-normal-Dbc-dNO6.woff +0 -0
- package/out/web/assets/noto-sans-thai-latin-ext-400-normal-B-1H0YkH.woff +0 -0
- package/out/web/assets/noto-sans-thai-latin-ext-400-normal-nBP59pVw.woff2 +0 -0
- package/out/web/assets/noto-sans-thai-latin-ext-500-normal-B-ZWb8SZ.woff2 +0 -0
- package/out/web/assets/noto-sans-thai-latin-ext-500-normal-CrEHO7C8.woff +0 -0
- package/out/web/assets/noto-sans-thai-latin-ext-600-normal-PkMZo0xa.woff +0 -0
- package/out/web/assets/noto-sans-thai-latin-ext-600-normal-maHHBsez.woff2 +0 -0
- package/out/web/assets/noto-sans-thai-thai-400-normal-BEOmKAI1.woff2 +0 -0
- package/out/web/assets/noto-sans-thai-thai-400-normal-Dxb_unuU.woff +0 -0
- package/out/web/assets/noto-sans-thai-thai-500-normal-BOGXO2tw.woff +0 -0
- package/out/web/assets/noto-sans-thai-thai-500-normal-CU_X86GQ.woff2 +0 -0
- package/out/web/assets/noto-sans-thai-thai-600-normal-CmgB8_JK.woff +0 -0
- package/out/web/assets/noto-sans-thai-thai-600-normal-Cs73sVjl.woff2 +0 -0
- package/out/web/assets/oauthManager-DNiwM8Rn.js +0 -2
- package/out/web/assets/oauthManager-DuamS1Av.css +0 -1
- package/out/web/assets/outfit-latin-300-normal-AWLfuCom.woff +0 -0
- package/out/web/assets/outfit-latin-300-normal-CRYTwY6m.woff2 +0 -0
- package/out/web/assets/outfit-latin-400-normal-BGsTXAXT.woff2 +0 -0
- package/out/web/assets/outfit-latin-400-normal-DMwTpYkH.woff +0 -0
- package/out/web/assets/outfit-latin-500-normal-ClnHRwRh.woff +0 -0
- package/out/web/assets/outfit-latin-500-normal-DKnIMDSk.woff2 +0 -0
- package/out/web/assets/outfit-latin-600-normal-B7SfZ07L.woff2 +0 -0
- package/out/web/assets/outfit-latin-600-normal-BEfTtDA7.woff +0 -0
- package/out/web/assets/outfit-latin-ext-300-normal-BYS6Dpvq.woff2 +0 -0
- package/out/web/assets/outfit-latin-ext-300-normal-CMIMshEd.woff +0 -0
- package/out/web/assets/outfit-latin-ext-400-normal-5tcqmc2S.woff2 +0 -0
- package/out/web/assets/outfit-latin-ext-400-normal-DHm7mdGe.woff +0 -0
- package/out/web/assets/outfit-latin-ext-500-normal-DrCvqoFD.woff +0 -0
- package/out/web/assets/outfit-latin-ext-500-normal-zeox_O30.woff2 +0 -0
- package/out/web/assets/outfit-latin-ext-600-normal-B85nYjL1.woff2 +0 -0
- package/out/web/assets/outfit-latin-ext-600-normal-CWJcPgd7.woff +0 -0
- package/out/web/assets/preload-helper-D0uHx7FM.js +0 -1
- package/out/web/assets/prompt-latin-400-normal-BQ9zjSN8.woff2 +0 -0
- package/out/web/assets/prompt-latin-400-normal-CxU4ec_r.woff +0 -0
- package/out/web/assets/prompt-latin-500-normal-B1edBDQ9.woff +0 -0
- package/out/web/assets/prompt-latin-500-normal-CxzxEHZc.woff2 +0 -0
- package/out/web/assets/prompt-latin-600-normal-CSDDLorv.woff +0 -0
- package/out/web/assets/prompt-latin-600-normal-hKZWXsc1.woff2 +0 -0
- package/out/web/assets/prompt-latin-ext-400-normal-1pHbN9uy.woff +0 -0
- package/out/web/assets/prompt-latin-ext-400-normal-DdSafGZ9.woff2 +0 -0
- package/out/web/assets/prompt-latin-ext-500-normal--EZ1um7s.woff2 +0 -0
- package/out/web/assets/prompt-latin-ext-500-normal-D-lI1EVT.woff +0 -0
- package/out/web/assets/prompt-latin-ext-600-normal-C8b50x67.woff +0 -0
- package/out/web/assets/prompt-latin-ext-600-normal-Cg9L7iJU.woff2 +0 -0
- package/out/web/assets/prompt-thai-400-normal-BrkKv8cO.woff2 +0 -0
- package/out/web/assets/prompt-thai-400-normal-DJypnfr3.woff +0 -0
- package/out/web/assets/prompt-thai-500-normal-C18pDUoL.woff2 +0 -0
- package/out/web/assets/prompt-thai-500-normal-D7YNqUJD.woff +0 -0
- package/out/web/assets/prompt-thai-600-normal-CYPViXds.woff +0 -0
- package/out/web/assets/prompt-thai-600-normal-MrdfU7zR.woff2 +0 -0
- package/out/web/assets/prompt-vietnamese-400-normal-BCPzsgPT.woff2 +0 -0
- package/out/web/assets/prompt-vietnamese-400-normal-D4pLyeNK.woff +0 -0
- package/out/web/assets/prompt-vietnamese-500-normal-DmzxmPwa.woff2 +0 -0
- package/out/web/assets/prompt-vietnamese-500-normal-w_sS_j2F.woff +0 -0
- package/out/web/assets/prompt-vietnamese-600-normal-1dyohtNh.woff +0 -0
- package/out/web/assets/prompt-vietnamese-600-normal-7QWjJBsF.woff2 +0 -0
- package/out/web/assets/sarabun-latin-400-normal-DmguIS-7.woff +0 -0
- package/out/web/assets/sarabun-latin-400-normal-URPBxl-K.woff2 +0 -0
- package/out/web/assets/sarabun-latin-500-normal-BjUTcdxu.woff2 +0 -0
- package/out/web/assets/sarabun-latin-500-normal-CJexTAnl.woff +0 -0
- package/out/web/assets/sarabun-latin-600-normal-9FonlkKx.woff +0 -0
- package/out/web/assets/sarabun-latin-600-normal-DMD3TROr.woff2 +0 -0
- package/out/web/assets/sarabun-latin-ext-400-normal-BbP7GpLL.woff2 +0 -0
- package/out/web/assets/sarabun-latin-ext-400-normal-BsmTn0SS.woff +0 -0
- package/out/web/assets/sarabun-latin-ext-500-normal-Cot16Bd2.woff +0 -0
- package/out/web/assets/sarabun-latin-ext-500-normal-DE1LysqI.woff2 +0 -0
- package/out/web/assets/sarabun-latin-ext-600-normal-0tXu9x_i.woff +0 -0
- package/out/web/assets/sarabun-latin-ext-600-normal-BRxjKUQ6.woff2 +0 -0
- package/out/web/assets/sarabun-thai-400-normal-C2DaJlKK.woff2 +0 -0
- package/out/web/assets/sarabun-thai-400-normal-CH-UbWgg.woff +0 -0
- package/out/web/assets/sarabun-thai-500-normal-BVssjame.woff2 +0 -0
- package/out/web/assets/sarabun-thai-500-normal-C3iDLEzi.woff +0 -0
- package/out/web/assets/sarabun-thai-600-normal-3dIAQ-_s.woff2 +0 -0
- package/out/web/assets/sarabun-thai-600-normal-DWKeTe6a.woff +0 -0
- package/out/web/assets/sarabun-vietnamese-400-normal-DPfkSCMy.woff +0 -0
- package/out/web/assets/sarabun-vietnamese-400-normal-igdrzAGY.woff2 +0 -0
- package/out/web/assets/sarabun-vietnamese-500-normal-CpRVvGRU.woff +0 -0
- package/out/web/assets/sarabun-vietnamese-500-normal-Dpe7Br9m.woff2 +0 -0
- package/out/web/assets/sarabun-vietnamese-600-normal-BMbOgAW-.woff +0 -0
- package/out/web/assets/sarabun-vietnamese-600-normal-DkxrOlLB.woff2 +0 -0
- package/out/web/assets/stateDiagram-v2-4QOOHH4V-s6P9g2_b.js +0 -1
- package/out/web/assets/swimlanesDiagram-VK2B7HYN-CV9fOLrV.js +0 -8
- package/out/web/assets/tauri-CNrHQ2Gb.js +0 -3
- package/out/web/assets/window-DkIhgI7B.js +0 -1
- package/skills-lock.json +0 -41
- package/src/renderer/public/Live2DCubismCore.js +0 -9
- package/src/renderer/src/companionWidget.ts +0 -95
- package/src/renderer/src/components/Live2DStage.tsx +0 -389
- package/src/renderer/src/components/ModelPanel.tsx +0 -154
- package/src/renderer/src/css/model.css +0 -627
- package/src/renderer/src-web/companionWidget.ts +0 -37
- package/src/renderer/src-web/components/ModelPanel.tsx +0 -12
- package/src/renderer/src-web/css/model.css +0 -628
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { useState, useEffect, useRef, type MouseEvent as ReactMouseEvent } from 'react'
|
|
1
|
+
import { useState, useEffect, useRef, useMemo, type MouseEvent as ReactMouseEvent, type DragEvent as ReactDragEvent } from 'react'
|
|
2
|
+
import { Check, ChevronDown, Folder, FolderInput, FolderMinus, Pencil, Plus, Trash2 } from 'lucide-react'
|
|
2
3
|
import { renderSkillsSvgIcon, renderMcpHubSvgIcon, renderPluginsSvgIcon, renderScheduledTasksSvgIcon, renderLinkedFoldersSvgIcon } from '../constants/plugins'
|
|
3
4
|
import { useAuthUser } from './AuthGate'
|
|
4
|
-
import {
|
|
5
|
+
import { runtimePlatform } from '../platform'
|
|
5
6
|
|
|
6
|
-
export type DashboardView = 'chat' | 'pictures' | '
|
|
7
|
+
export type DashboardView = 'chat' | 'pictures' | 'workspace' | 'imagine' | 'veo' | 'skills' | 'mcp' | 'plugins' | 'cron' | 'link' | 'code'
|
|
7
8
|
|
|
8
9
|
interface ChatSessionItem {
|
|
9
10
|
id: string
|
|
@@ -11,6 +12,7 @@ interface ChatSessionItem {
|
|
|
11
12
|
kind?: string
|
|
12
13
|
createdAt?: string
|
|
13
14
|
updatedAt?: string
|
|
15
|
+
workspacePath?: string | null
|
|
14
16
|
}
|
|
15
17
|
|
|
16
18
|
interface DashboardSidebarProps {
|
|
@@ -39,35 +41,19 @@ interface DashboardSidebarProps {
|
|
|
39
41
|
* difference between the two, not something to unify.
|
|
40
42
|
*/
|
|
41
43
|
promoteMediaStudios?: boolean
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
accessories?: string[]
|
|
48
|
-
interactionEnabled?: boolean
|
|
49
|
-
showInteractionGuide?: boolean
|
|
50
|
-
onToggleModel?: () => void
|
|
51
|
-
onSetExpressionIndex?: (index: number) => void
|
|
52
|
-
onSetAccessoryIndex?: (index: number) => void
|
|
53
|
-
onSetInteractionEnabled?: (enabled: boolean) => void
|
|
54
|
-
onSetShowInteractionGuide?: (visible: boolean) => void
|
|
55
|
-
onShowToast?: (message: string) => void
|
|
44
|
+
activeWorkspacePath?: string
|
|
45
|
+
recentWorkspacePaths?: string[]
|
|
46
|
+
onBrowseFolder?: () => Promise<string | null>
|
|
47
|
+
onUpdateSessionWorkspace?: (sessionId: string, workspacePath: string | null) => void
|
|
48
|
+
onNewChatInProject?: (workspacePath: string) => void
|
|
56
49
|
}
|
|
57
50
|
|
|
58
51
|
export default function DashboardSidebar({
|
|
59
52
|
view,
|
|
60
53
|
sidebarCollapsed,
|
|
61
|
-
modelVisible,
|
|
62
54
|
sending,
|
|
63
55
|
chatSessions,
|
|
64
56
|
activeConversationId,
|
|
65
|
-
expressionIndex = 0,
|
|
66
|
-
accessoryIndex = 0,
|
|
67
|
-
expressions = [],
|
|
68
|
-
accessories = [],
|
|
69
|
-
interactionEnabled,
|
|
70
|
-
showInteractionGuide,
|
|
71
57
|
onToggleSidebar,
|
|
72
58
|
onSidebarResize,
|
|
73
59
|
onSidebarResizeEnd,
|
|
@@ -76,21 +62,33 @@ export default function DashboardSidebar({
|
|
|
76
62
|
onDeleteConversation,
|
|
77
63
|
onRenameConversation,
|
|
78
64
|
onSetView,
|
|
79
|
-
onToggleModel,
|
|
80
|
-
onSetExpressionIndex,
|
|
81
|
-
onSetAccessoryIndex,
|
|
82
|
-
onSetInteractionEnabled,
|
|
83
|
-
onSetShowInteractionGuide,
|
|
84
|
-
onShowToast,
|
|
85
65
|
isSearchOpen,
|
|
86
66
|
onSetSearchOpen,
|
|
87
67
|
showWorkspaceTab,
|
|
88
68
|
promoteMediaStudios,
|
|
69
|
+
activeWorkspacePath,
|
|
70
|
+
recentWorkspacePaths,
|
|
71
|
+
onBrowseFolder,
|
|
72
|
+
onUpdateSessionWorkspace,
|
|
73
|
+
onNewChatInProject,
|
|
89
74
|
}: DashboardSidebarProps) {
|
|
90
75
|
const [editingSessionId, setEditingSessionId] = useState<string | null>(null)
|
|
91
76
|
const [editTitleValue, setEditTitleValue] = useState('')
|
|
92
77
|
const [isMoreOpen, setIsMoreOpen] = useState(false)
|
|
93
78
|
const [isAccountMenuOpen, setIsAccountMenuOpen] = useState(false)
|
|
79
|
+
const [projectMenu, setProjectMenu] = useState<{ projectId: string; top: number; left: number } | null>(null)
|
|
80
|
+
const [conversationMenu, setConversationMenu] = useState<{ sessionId: string; top: number; left: number } | null>(null)
|
|
81
|
+
const [removedProjectIds, setRemovedProjectIds] = useState<string[]>(() => {
|
|
82
|
+
if (typeof window === 'undefined') return []
|
|
83
|
+
try { return JSON.parse(window.localStorage.getItem('mint_removed_sidebar_projects') || '[]') } catch { return [] }
|
|
84
|
+
})
|
|
85
|
+
const [moveMenu, setMoveMenu] = useState<{
|
|
86
|
+
sessionId: string
|
|
87
|
+
currentWorkspacePath?: string | null
|
|
88
|
+
top: number
|
|
89
|
+
left: number
|
|
90
|
+
} | null>(null)
|
|
91
|
+
const moveMenuRef = useRef<HTMLDivElement>(null)
|
|
94
92
|
const moreContainerRef = useRef<HTMLDivElement>(null)
|
|
95
93
|
const accountContainerRef = useRef<HTMLDivElement>(null)
|
|
96
94
|
const asideRef = useRef<HTMLElement>(null)
|
|
@@ -151,6 +149,11 @@ export default function DashboardSidebar({
|
|
|
151
149
|
if (accountContainerRef.current && !accountContainerRef.current.contains(event.target as Node)) {
|
|
152
150
|
setIsAccountMenuOpen(false)
|
|
153
151
|
}
|
|
152
|
+
if (moveMenuRef.current && !moveMenuRef.current.contains(event.target as Node)) {
|
|
153
|
+
setMoveMenu(null)
|
|
154
|
+
}
|
|
155
|
+
if (!(event.target as Element).closest('.sidebar-project-menu-popover, .sidebar-project-menu-trigger')) setProjectMenu(null)
|
|
156
|
+
if (!(event.target as Element).closest('.sidebar-conversation-menu-popover, .sidebar-conversation-menu-trigger')) setConversationMenu(null)
|
|
154
157
|
}
|
|
155
158
|
document.addEventListener('mousedown', handleClickOutside)
|
|
156
159
|
return () => document.removeEventListener('mousedown', handleClickOutside)
|
|
@@ -162,25 +165,258 @@ export default function DashboardSidebar({
|
|
|
162
165
|
}
|
|
163
166
|
setEditingSessionId(null)
|
|
164
167
|
}
|
|
165
|
-
const
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
168
|
+
const conversationSessions = chatSessions.filter((session) => session.kind !== 'cli' && !session.id.startsWith('cli') && session.id !== 'conversation-default')
|
|
169
|
+
const cliSessions = chatSessions.filter((session) => session.kind === 'cli' || session.id.startsWith('cli'))
|
|
170
|
+
|
|
171
|
+
const [projectOrder, setProjectOrder] = useState<string[]>(() => {
|
|
172
|
+
if (typeof window === 'undefined') return []
|
|
173
|
+
try {
|
|
174
|
+
const saved = localStorage.getItem('mint_project_order')
|
|
175
|
+
return saved ? JSON.parse(saved) : []
|
|
176
|
+
} catch {
|
|
177
|
+
return []
|
|
178
|
+
}
|
|
179
|
+
})
|
|
180
|
+
const [draggedProjectId, setDraggedProjectId] = useState<string | null>(null)
|
|
181
|
+
const [dragOverProjectId, setDragOverProjectId] = useState<string | null>(null)
|
|
182
|
+
const [dropPosition, setDropPosition] = useState<'before' | 'after' | null>(null)
|
|
183
|
+
|
|
184
|
+
const handleProjectDragStart = (e: ReactDragEvent, projectId: string) => {
|
|
185
|
+
e.dataTransfer.setData('text/plain', projectId)
|
|
186
|
+
e.dataTransfer.effectAllowed = 'move'
|
|
187
|
+
setDraggedProjectId(projectId)
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
const handleProjectDragOver = (e: ReactDragEvent, targetId: string) => {
|
|
191
|
+
if (!draggedProjectId || draggedProjectId === targetId) return
|
|
192
|
+
e.preventDefault()
|
|
193
|
+
e.stopPropagation()
|
|
194
|
+
e.dataTransfer.dropEffect = 'move'
|
|
195
|
+
|
|
196
|
+
const rect = (e.currentTarget as HTMLElement).getBoundingClientRect()
|
|
197
|
+
const midY = rect.top + rect.height / 2
|
|
198
|
+
const pos = e.clientY < midY ? 'before' : 'after'
|
|
199
|
+
|
|
200
|
+
if (dragOverProjectId !== targetId || dropPosition !== pos) {
|
|
201
|
+
setDragOverProjectId(targetId)
|
|
202
|
+
setDropPosition(pos)
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
const handleProjectDragLeave = (e: ReactDragEvent, targetId: string) => {
|
|
207
|
+
e.stopPropagation()
|
|
208
|
+
if (dragOverProjectId === targetId) {
|
|
209
|
+
const related = e.relatedTarget as Node | null
|
|
210
|
+
if (!related || !(e.currentTarget as HTMLElement).contains(related)) {
|
|
211
|
+
setDragOverProjectId(null)
|
|
212
|
+
setDropPosition(null)
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
const handleProjectDrop = (e: ReactDragEvent, targetId: string) => {
|
|
218
|
+
e.preventDefault()
|
|
219
|
+
e.stopPropagation()
|
|
220
|
+
if (!draggedProjectId || draggedProjectId === targetId) {
|
|
221
|
+
setDraggedProjectId(null)
|
|
222
|
+
setDragOverProjectId(null)
|
|
223
|
+
setDropPosition(null)
|
|
224
|
+
return
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
const allIds = projectGroups.map((g) => g.id)
|
|
228
|
+
let newOrder = [...projectOrder]
|
|
229
|
+
for (const id of allIds) {
|
|
230
|
+
if (!newOrder.includes(id)) {
|
|
231
|
+
newOrder.push(id)
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
newOrder = newOrder.filter((id) => id !== draggedProjectId)
|
|
236
|
+
const targetIdx = newOrder.indexOf(targetId)
|
|
237
|
+
if (targetIdx !== -1) {
|
|
238
|
+
const insertIdx = dropPosition === 'after' ? targetIdx + 1 : targetIdx
|
|
239
|
+
newOrder.splice(insertIdx, 0, draggedProjectId)
|
|
240
|
+
} else {
|
|
241
|
+
newOrder.push(draggedProjectId)
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
setProjectOrder(newOrder)
|
|
245
|
+
try {
|
|
246
|
+
localStorage.setItem('mint_project_order', JSON.stringify(newOrder))
|
|
247
|
+
} catch (err) {
|
|
248
|
+
console.error('Failed to save project order', err)
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
setDraggedProjectId(null)
|
|
252
|
+
setDragOverProjectId(null)
|
|
253
|
+
setDropPosition(null)
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
const handleProjectDragEnd = () => {
|
|
257
|
+
setDraggedProjectId(null)
|
|
258
|
+
setDragOverProjectId(null)
|
|
259
|
+
setDropPosition(null)
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
// Group conversations by Workspace Project
|
|
263
|
+
const { projectGroups, recentSessions } = useMemo(() => {
|
|
264
|
+
const getProjectInfo = (workspacePath?: string | null): { id: string; name: string } | null => {
|
|
265
|
+
if (!workspacePath) return null
|
|
266
|
+
const clean = workspacePath.replace(/[\\/]+$/, '').trim()
|
|
267
|
+
if (!clean) return null
|
|
268
|
+
const parts = clean.split(/[\\/]/)
|
|
269
|
+
const name = parts[parts.length - 1] || clean
|
|
270
|
+
return { id: clean, name }
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
const groupsMap = new Map<string, { id: string; name: string; sessions: ChatSessionItem[] }>()
|
|
274
|
+
const recents: ChatSessionItem[] = []
|
|
275
|
+
|
|
276
|
+
// If active workspace is known, initialize its project folder
|
|
277
|
+
const activeProj = getProjectInfo(activeWorkspacePath)
|
|
278
|
+
if (activeProj && !removedProjectIds.includes(activeProj.id)) {
|
|
279
|
+
groupsMap.set(activeProj.id, { id: activeProj.id, name: activeProj.name, sessions: [] })
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
for (const session of conversationSessions) {
|
|
283
|
+
const effectivePath = session.workspacePath || null
|
|
284
|
+
const proj = getProjectInfo(effectivePath)
|
|
285
|
+
if (proj) {
|
|
286
|
+
if (removedProjectIds.includes(proj.id)) {
|
|
287
|
+
recents.push(session)
|
|
288
|
+
continue
|
|
289
|
+
}
|
|
290
|
+
if (!groupsMap.has(proj.id)) {
|
|
291
|
+
groupsMap.set(proj.id, { id: proj.id, name: proj.name, sessions: [] })
|
|
292
|
+
}
|
|
293
|
+
groupsMap.get(proj.id)!.sessions.push(session)
|
|
294
|
+
} else {
|
|
295
|
+
recents.push(session)
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
// Sort groups stably according to user custom projectOrder, fallback to name
|
|
300
|
+
const sortedGroups = Array.from(groupsMap.values()).sort((a, b) => {
|
|
301
|
+
const idxA = projectOrder.indexOf(a.id)
|
|
302
|
+
const idxB = projectOrder.indexOf(b.id)
|
|
303
|
+
if (idxA !== -1 && idxB !== -1) return idxA - idxB
|
|
304
|
+
if (idxA !== -1) return -1
|
|
305
|
+
if (idxB !== -1) return 1
|
|
306
|
+
return a.name.localeCompare(b.name)
|
|
307
|
+
})
|
|
308
|
+
|
|
309
|
+
return { projectGroups: sortedGroups, recentSessions: recents }
|
|
310
|
+
}, [conversationSessions, activeWorkspacePath, activeConversationId, projectOrder, removedProjectIds])
|
|
311
|
+
|
|
312
|
+
const availableProjects = useMemo(() => {
|
|
313
|
+
const getProjectInfo = (workspacePath?: string | null): { id: string; name: string } | null => {
|
|
314
|
+
if (!workspacePath) return null
|
|
315
|
+
const clean = workspacePath.replace(/[\\/]+$/, '').trim()
|
|
316
|
+
if (!clean) return null
|
|
317
|
+
const parts = clean.split(/[\\/]/)
|
|
318
|
+
const name = parts[parts.length - 1] || clean
|
|
319
|
+
return { id: clean, name }
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
const map = new Map<string, string>()
|
|
323
|
+
if (activeWorkspacePath && !removedProjectIds.includes(activeWorkspacePath.replace(/[\\/]+$/, '').trim())) {
|
|
324
|
+
const info = getProjectInfo(activeWorkspacePath)
|
|
325
|
+
if (info) map.set(info.id, info.name)
|
|
326
|
+
}
|
|
327
|
+
for (const g of projectGroups) {
|
|
328
|
+
if (!removedProjectIds.includes(g.id)) map.set(g.id, g.name)
|
|
329
|
+
}
|
|
330
|
+
if (recentWorkspacePaths) {
|
|
331
|
+
for (const p of recentWorkspacePaths) {
|
|
332
|
+
const info = getProjectInfo(p)
|
|
333
|
+
if (info && !removedProjectIds.includes(info.id) && !map.has(info.id)) {
|
|
334
|
+
map.set(info.id, info.name)
|
|
335
|
+
}
|
|
336
|
+
}
|
|
337
|
+
}
|
|
338
|
+
return Array.from(map.entries()).map(([path, name]) => ({ path, name }))
|
|
339
|
+
}, [projectGroups, activeWorkspacePath, recentWorkspacePaths, removedProjectIds])
|
|
340
|
+
|
|
341
|
+
const openMoveMenu = (event: ReactMouseEvent, session: ChatSessionItem) => {
|
|
342
|
+
event.stopPropagation()
|
|
343
|
+
event.preventDefault()
|
|
344
|
+
if (moveMenu?.sessionId === session.id) {
|
|
345
|
+
setMoveMenu(null)
|
|
346
|
+
return
|
|
347
|
+
}
|
|
348
|
+
const rect = (event.currentTarget as HTMLElement).getBoundingClientRect()
|
|
349
|
+
const popoverWidth = 220
|
|
350
|
+
const left = Math.min(rect.left, Math.max(10, window.innerWidth - popoverWidth - 10))
|
|
351
|
+
const top = rect.bottom + 6
|
|
352
|
+
setMoveMenu({
|
|
353
|
+
sessionId: session.id,
|
|
354
|
+
currentWorkspacePath: session.workspacePath || (session.id === activeConversationId && activeWorkspacePath ? activeWorkspacePath : null),
|
|
355
|
+
top,
|
|
356
|
+
left,
|
|
357
|
+
})
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
const [collapsedProjects, setCollapsedProjects] = useState<Record<string, boolean>>(() => {
|
|
361
|
+
if (typeof window === 'undefined') return {}
|
|
362
|
+
try {
|
|
363
|
+
const saved = localStorage.getItem('mint_collapsed_projects')
|
|
364
|
+
return saved ? JSON.parse(saved) : {}
|
|
365
|
+
} catch {
|
|
366
|
+
return {}
|
|
367
|
+
}
|
|
368
|
+
})
|
|
369
|
+
|
|
370
|
+
const [expandedShowMore, setExpandedShowMore] = useState<Record<string, boolean>>({})
|
|
371
|
+
|
|
372
|
+
const toggleProjectCollapse = (projectId: string) => {
|
|
373
|
+
setCollapsedProjects((prev) => {
|
|
374
|
+
const next = { ...prev, [projectId]: !prev[projectId] }
|
|
375
|
+
try {
|
|
376
|
+
localStorage.setItem('mint_collapsed_projects', JSON.stringify(next))
|
|
377
|
+
} catch {
|
|
378
|
+
// ignore
|
|
379
|
+
}
|
|
380
|
+
return next
|
|
381
|
+
})
|
|
169
382
|
}
|
|
170
383
|
|
|
171
|
-
const
|
|
172
|
-
|
|
173
|
-
onSetInteractionEnabled?.(next)
|
|
174
|
-
onShowToast?.(next ? 'Enable model interaction ⦸' : 'Disable model interaction ⦸')
|
|
384
|
+
const toggleShowMore = (projectId: string) => {
|
|
385
|
+
setExpandedShowMore((prev) => ({ ...prev, [projectId]: !prev[projectId] }))
|
|
175
386
|
}
|
|
176
387
|
|
|
177
|
-
const
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
388
|
+
const removeProjectFromSidebar = (projectId: string) => {
|
|
389
|
+
setRemovedProjectIds((previous) => {
|
|
390
|
+
const next = [...new Set([...previous, projectId])]
|
|
391
|
+
try { localStorage.setItem('mint_removed_sidebar_projects', JSON.stringify(next)) } catch { /* ignore */ }
|
|
392
|
+
return next
|
|
393
|
+
})
|
|
394
|
+
setProjectMenu(null)
|
|
182
395
|
}
|
|
183
396
|
|
|
397
|
+
// Remember the last active CLI session so it remains pinned in the sidebar
|
|
398
|
+
// even when the user navigates away to a regular conversation!
|
|
399
|
+
const [pinnedCliId, setPinnedCliId] = useState<string | null>(() => {
|
|
400
|
+
return typeof window !== 'undefined' ? localStorage.getItem('mint_last_cli_session_id') : null
|
|
401
|
+
})
|
|
402
|
+
|
|
403
|
+
useEffect(() => {
|
|
404
|
+
if (activeConversationId.startsWith('cli') || activeConversationId === 'cli') {
|
|
405
|
+
setPinnedCliId(activeConversationId)
|
|
406
|
+
try {
|
|
407
|
+
localStorage.setItem('mint_last_cli_session_id', activeConversationId)
|
|
408
|
+
} catch {
|
|
409
|
+
// ignore
|
|
410
|
+
}
|
|
411
|
+
}
|
|
412
|
+
}, [activeConversationId])
|
|
413
|
+
|
|
414
|
+
const targetCliId = (activeConversationId.startsWith('cli') || activeConversationId === 'cli')
|
|
415
|
+
? activeConversationId
|
|
416
|
+
: (pinnedCliId || cliSessions[0]?.id || null)
|
|
417
|
+
|
|
418
|
+
const pinnedCliSession = cliSessions.find((session) => session.id === targetCliId)
|
|
419
|
+
|
|
184
420
|
return (
|
|
185
421
|
<aside className={`workspace-sidebar ${isResizing ? 'is-resizing' : ''}`} ref={asideRef}>
|
|
186
422
|
{!sidebarCollapsed && (
|
|
@@ -200,31 +436,36 @@ export default function DashboardSidebar({
|
|
|
200
436
|
if (event.key === 'Enter' || event.key === ' ') onToggleSidebar()
|
|
201
437
|
}}
|
|
202
438
|
>
|
|
203
|
-
<img src={
|
|
439
|
+
<img src={runtimePlatform.appIconPath()} alt="Mint Agent Logo" className="sidebar-logo" />
|
|
204
440
|
<span className="sidebar-brand-name">Mint Agent</span>
|
|
205
441
|
</div>
|
|
442
|
+
<button type="button" className="sidebar-mobile-close" aria-label="Close navigation menu" onClick={onToggleSidebar}>
|
|
443
|
+
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" aria-hidden="true">
|
|
444
|
+
<path d="M5 5l14 14M19 5L5 19" />
|
|
445
|
+
</svg>
|
|
446
|
+
</button>
|
|
206
447
|
|
|
207
|
-
<button className="sidebar-new-chat" onClick={() => onClearHistory('New chat')}>
|
|
448
|
+
<button className="sidebar-new-chat" onClick={() => onClearHistory('New chat')} title="New chat (Ctrl+N)">
|
|
208
449
|
<span aria-hidden="true" style={{ display: 'inline-flex', alignItems: 'center' }}>
|
|
209
450
|
<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2.5" strokeLinecap="round" strokeLinejoin="round">
|
|
210
451
|
<line x1="12" y1="5" x2="12" y2="19"></line>
|
|
211
452
|
<line x1="5" y1="12" x2="19" y2="12"></line>
|
|
212
453
|
</svg>
|
|
213
454
|
</span>
|
|
214
|
-
<span>New
|
|
455
|
+
<span>New chat</span>
|
|
215
456
|
</button>
|
|
216
457
|
|
|
217
|
-
<button className="sidebar-top-action sidebar-search-btn" onClick={() => onSetSearchOpen(true)}>
|
|
458
|
+
<button className="sidebar-top-action sidebar-search-btn" onClick={() => onSetSearchOpen(true)} title="Search chats (Ctrl+K)">
|
|
218
459
|
<span aria-hidden="true" style={{ display: 'inline-flex', alignItems: 'center' }}>
|
|
219
460
|
<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2.5" strokeLinecap="round" strokeLinejoin="round">
|
|
220
461
|
<circle cx="11" cy="11" r="8"></circle>
|
|
221
462
|
<line x1="21" y1="21" x2="16.65" y2="16.65"></line>
|
|
222
463
|
</svg>
|
|
223
464
|
</span>
|
|
224
|
-
<span>Search
|
|
465
|
+
<span>Search chats</span>
|
|
225
466
|
</button>
|
|
226
467
|
|
|
227
|
-
<button className={`sidebar-top-action ${view === 'chat' ? 'is-active' : ''}`} onClick={() => onSetView('chat')}>
|
|
468
|
+
<button className={`sidebar-top-action ${view === 'chat' ? 'is-active' : ''}`} onClick={() => onSetView('chat')} title="Chat">
|
|
228
469
|
<span aria-hidden="true" style={{ display: 'inline-flex', alignItems: 'center' }}>
|
|
229
470
|
<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2.5" strokeLinecap="round" strokeLinejoin="round">
|
|
230
471
|
<path d="M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"></path>
|
|
@@ -233,15 +474,13 @@ export default function DashboardSidebar({
|
|
|
233
474
|
<span>Chat</span>
|
|
234
475
|
</button>
|
|
235
476
|
|
|
236
|
-
<button className={`sidebar-top-action ${view === 'pictures' ? 'is-active' : ''}`} onClick={() => onSetView('pictures')}>
|
|
477
|
+
<button className={`sidebar-top-action ${view === 'pictures' ? 'is-active' : ''}`} onClick={() => onSetView('pictures')} title="Library">
|
|
237
478
|
<span aria-hidden="true" style={{ display: 'inline-flex', alignItems: 'center' }}>
|
|
238
479
|
<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2.5" strokeLinecap="round" strokeLinejoin="round">
|
|
239
|
-
<
|
|
240
|
-
<circle cx="8.5" cy="8.5" r="1.5"></circle>
|
|
241
|
-
<polyline points="21 15 16 10 5 21"></polyline>
|
|
480
|
+
<path d="M4 4v16M8 8v12M12 6v14M16 6l4 14"></path>
|
|
242
481
|
</svg>
|
|
243
482
|
</span>
|
|
244
|
-
<span>
|
|
483
|
+
<span>Library</span>
|
|
245
484
|
</button>
|
|
246
485
|
{promoteMediaStudios && (
|
|
247
486
|
<>
|
|
@@ -271,7 +510,7 @@ export default function DashboardSidebar({
|
|
|
271
510
|
</>
|
|
272
511
|
)}
|
|
273
512
|
{showWorkspaceTab && (
|
|
274
|
-
<button className={`sidebar-top-action ${view === 'workspace' ? 'is-active' : ''}`} onClick={() => onSetView('workspace')}>
|
|
513
|
+
<button className={`sidebar-top-action ${view === 'workspace' ? 'is-active' : ''}`} onClick={() => onSetView('workspace')} title="Workspace">
|
|
275
514
|
<span aria-hidden="true" style={{ display: 'inline-flex', alignItems: 'center' }}>
|
|
276
515
|
<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2.5" strokeLinecap="round" strokeLinejoin="round">
|
|
277
516
|
<path d="M3 6h7l2 2h9v10a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2Z"></path>
|
|
@@ -281,20 +520,8 @@ export default function DashboardSidebar({
|
|
|
281
520
|
<span>Workspace</span>
|
|
282
521
|
</button>
|
|
283
522
|
)}
|
|
284
|
-
{onToggleModel && (
|
|
285
|
-
<button className={`sidebar-top-action ${modelVisible ? 'is-active' : ''}`} onClick={onToggleModel}>
|
|
286
|
-
<span aria-hidden="true" style={{ display: 'inline-flex', alignItems: 'center' }}>
|
|
287
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2.5" strokeLinecap="round" strokeLinejoin="round">
|
|
288
|
-
<path d="M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"></path>
|
|
289
|
-
<circle cx="12" cy="7" r="4"></circle>
|
|
290
|
-
</svg>
|
|
291
|
-
</span>
|
|
292
|
-
<span>Live2D Model</span>
|
|
293
|
-
</button>
|
|
294
|
-
)}
|
|
295
|
-
|
|
296
523
|
<div className="sidebar-more-container" ref={moreContainerRef}>
|
|
297
|
-
<button className={`sidebar-top-action ${isMoreOpen || (!promoteMediaStudios && (view === 'imagine' || view === 'veo')) || view === 'skills' || view === 'mcp' || view === 'plugins' || view === 'cron' || view === 'link' ? 'is-active' : ''}`} onClick={() => setIsMoreOpen(!isMoreOpen)}>
|
|
524
|
+
<button className={`sidebar-top-action ${isMoreOpen || (!promoteMediaStudios && (view === 'imagine' || view === 'veo')) || view === 'skills' || view === 'mcp' || view === 'plugins' || view === 'cron' || view === 'link' ? 'is-active' : ''}`} onClick={() => setIsMoreOpen(!isMoreOpen)} title="More" aria-expanded={isMoreOpen} aria-controls="sidebar-more-menu">
|
|
298
525
|
<span aria-hidden="true" style={{ display: 'inline-flex', alignItems: 'center' }}>
|
|
299
526
|
<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2.5" strokeLinecap="round" strokeLinejoin="round">
|
|
300
527
|
<circle cx="12" cy="12" r="1.5"></circle>
|
|
@@ -305,14 +532,14 @@ export default function DashboardSidebar({
|
|
|
305
532
|
<span>More</span>
|
|
306
533
|
</button>
|
|
307
534
|
{isMoreOpen && (
|
|
308
|
-
<div className="sidebar-more-popover" style={{ display: 'flex', flexDirection: 'column', gap: '4px', padding: '6px', minWidth: '160px' }}>
|
|
535
|
+
<div id="sidebar-more-menu" className="sidebar-more-popover" style={{ display: 'flex', flexDirection: 'column', gap: '4px', padding: '6px', minWidth: '160px' }}>
|
|
309
536
|
<button className={`popover-item ${view === 'skills' ? 'active' : ''}`} onClick={() => { onSetView('skills'); setIsMoreOpen(false); }}>
|
|
310
537
|
<span aria-hidden="true" style={{ display: 'inline-flex', alignItems: 'center' }}>{renderSkillsSvgIcon(15)}</span>
|
|
311
538
|
<span>Skills</span>
|
|
312
539
|
</button>
|
|
313
540
|
<button className={`popover-item ${view === 'mcp' ? 'active' : ''}`} onClick={() => { onSetView('mcp'); setIsMoreOpen(false); }}>
|
|
314
541
|
<span aria-hidden="true" style={{ display: 'inline-flex', alignItems: 'center' }}>{renderMcpHubSvgIcon(15)}</span>
|
|
315
|
-
<span>MCP
|
|
542
|
+
<span>MCP servers</span>
|
|
316
543
|
</button>
|
|
317
544
|
<button className={`popover-item ${view === 'plugins' ? 'active' : ''}`} onClick={() => { onSetView('plugins'); setIsMoreOpen(false); }}>
|
|
318
545
|
<span aria-hidden="true" style={{ display: 'inline-flex', alignItems: 'center' }}>{renderPluginsSvgIcon(15)}</span>
|
|
@@ -320,11 +547,11 @@ export default function DashboardSidebar({
|
|
|
320
547
|
</button>
|
|
321
548
|
<button className={`popover-item ${view === 'cron' ? 'active' : ''}`} onClick={() => { onSetView('cron'); setIsMoreOpen(false); }}>
|
|
322
549
|
<span aria-hidden="true" style={{ display: 'inline-flex', alignItems: 'center' }}>{renderScheduledTasksSvgIcon(15)}</span>
|
|
323
|
-
<span>Scheduled
|
|
550
|
+
<span>Scheduled tasks</span>
|
|
324
551
|
</button>
|
|
325
552
|
<button className={`popover-item ${view === 'link' ? 'active' : ''}`} onClick={() => { onSetView('link'); setIsMoreOpen(false); }}>
|
|
326
553
|
<span aria-hidden="true" style={{ display: 'inline-flex', alignItems: 'center' }}>{renderLinkedFoldersSvgIcon(15)}</span>
|
|
327
|
-
<span>Linked
|
|
554
|
+
<span>Linked folders</span>
|
|
328
555
|
</button>
|
|
329
556
|
{!promoteMediaStudios && (
|
|
330
557
|
<button className={`popover-item ${view === 'imagine' ? 'active' : ''}`} onClick={() => { onSetView('imagine'); setIsMoreOpen(false); }}>
|
|
@@ -352,184 +579,492 @@ export default function DashboardSidebar({
|
|
|
352
579
|
</div>
|
|
353
580
|
|
|
354
581
|
|
|
355
|
-
{
|
|
356
|
-
<div className="sidebar-
|
|
357
|
-
<button
|
|
358
|
-
className="change-expression-btn"
|
|
359
|
-
onClick={() => {
|
|
360
|
-
const next = (expressionIndex + 1) % expressions.length
|
|
361
|
-
onSetExpressionIndex?.(next)
|
|
362
|
-
onSetAccessoryIndex?.(0)
|
|
363
|
-
onShowToast?.(`Expression: ${expressions[next]}`)
|
|
364
|
-
}}
|
|
365
|
-
>
|
|
366
|
-
<span aria-hidden="true" style={{ display: 'inline-flex', alignItems: 'center' }}>
|
|
367
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2.5" strokeLinecap="round" strokeLinejoin="round">
|
|
368
|
-
<circle cx="12" cy="12" r="10"></circle>
|
|
369
|
-
<path d="M8 14s1.5 2 4 2 4-2 4-2"></path>
|
|
370
|
-
<line x1="9" y1="9" x2="9.01" y2="9"></line>
|
|
371
|
-
<line x1="15" y1="9" x2="15.01" y2="9"></line>
|
|
372
|
-
</svg>
|
|
373
|
-
</span>
|
|
374
|
-
<span>Expression</span>
|
|
375
|
-
</button>
|
|
582
|
+
{sidebarCollapsed ? (
|
|
583
|
+
<div className="sidebar-collapsed-sessions">
|
|
376
584
|
<button
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
onShowToast?.(`Accessory: ${accessories[next]}`)
|
|
383
|
-
}}
|
|
585
|
+
type="button"
|
|
586
|
+
className={`sidebar-collapsed-item ${view === 'code' ? 'is-active' : ''}`}
|
|
587
|
+
onClick={() => onSetView('code')}
|
|
588
|
+
title="Code sessions Hub"
|
|
589
|
+
aria-label="Code sessions Hub"
|
|
384
590
|
>
|
|
385
|
-
<
|
|
386
|
-
<
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
<span>Accessory</span>
|
|
391
|
-
</button>
|
|
392
|
-
<button className={`toggle-interaction-btn ${interactionEnabled ? 'active' : ''}`} onClick={toggleInteraction}>
|
|
393
|
-
<span aria-hidden="true" style={{ display: 'inline-flex', alignItems: 'center' }}>
|
|
394
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2.5" strokeLinecap="round" strokeLinejoin="round">
|
|
395
|
-
<path d="M18 11V6a2 2 0 0 0-2-2v0a2 2 0 0 0-2 2v5m-4 0V4a2 2 0 0 0-2-2v0a2 2 0 0 0-2 2v7m-4 0V5a2 2 0 0 0-2-2v0a2 2 0 0 0-2 2v9M4 22V13a3 3 0 0 1 6 0v0M4 22h14a2 2 0 0 0 2-2V11a2 2 0 0 0-2-2h-2"></path>
|
|
396
|
-
</svg>
|
|
397
|
-
</span>
|
|
398
|
-
<span className="mint-status-label">Interact</span>
|
|
591
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2.4" strokeLinecap="round" strokeLinejoin="round" aria-hidden="true">
|
|
592
|
+
<polyline points="4 17 10 11 4 5"></polyline>
|
|
593
|
+
<line x1="12" y1="19" x2="20" y2="19"></line>
|
|
594
|
+
</svg>
|
|
595
|
+
{view === 'code' && <span className="sidebar-collapsed-dot" />}
|
|
399
596
|
</button>
|
|
400
|
-
|
|
401
|
-
<
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
597
|
+
{pinnedCliSession && (
|
|
598
|
+
<button
|
|
599
|
+
type="button"
|
|
600
|
+
className={`sidebar-collapsed-item ${pinnedCliSession.id === activeConversationId && view !== 'code' ? 'is-active' : ''}`}
|
|
601
|
+
onClick={() => onSelectConversation(pinnedCliSession.id)}
|
|
602
|
+
title={pinnedCliSession.title && pinnedCliSession.title !== 'cli' ? pinnedCliSession.title : 'Terminal Session'}
|
|
603
|
+
aria-label={pinnedCliSession.title && pinnedCliSession.title !== 'cli' ? pinnedCliSession.title : 'Terminal Session'}
|
|
604
|
+
>
|
|
605
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2.4" strokeLinecap="round" strokeLinejoin="round" aria-hidden="true">
|
|
606
|
+
<polyline points="4 17 10 11 4 5"></polyline>
|
|
607
|
+
<line x1="12" y1="19" x2="20" y2="19"></line>
|
|
408
608
|
</svg>
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
609
|
+
{pinnedCliSession.id === activeConversationId && view !== 'code' && <span className="sidebar-collapsed-dot" />}
|
|
610
|
+
</button>
|
|
611
|
+
)}
|
|
612
|
+
{conversationSessions.slice(0, 25).map((session) => {
|
|
613
|
+
const isActive = session.id === activeConversationId && view !== 'code'
|
|
614
|
+
return (
|
|
615
|
+
<button
|
|
616
|
+
type="button"
|
|
617
|
+
key={session.id}
|
|
618
|
+
className={`sidebar-collapsed-item ${isActive ? 'is-active' : ''}`}
|
|
619
|
+
onClick={() => onSelectConversation(session.id)}
|
|
620
|
+
title={session.title || 'Chat'}
|
|
621
|
+
aria-label={session.title || 'Chat'}
|
|
622
|
+
>
|
|
623
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2.4" strokeLinecap="round" strokeLinejoin="round" aria-hidden="true">
|
|
624
|
+
<path d="M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"></path>
|
|
625
|
+
</svg>
|
|
626
|
+
{isActive && <span className="sidebar-collapsed-dot" />}
|
|
627
|
+
</button>
|
|
628
|
+
)
|
|
629
|
+
})}
|
|
412
630
|
</div>
|
|
413
|
-
)
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
<div className="sidebar-section-title">Conversation CLI</div>
|
|
631
|
+
) : (
|
|
632
|
+
<div className="sidebar-section">
|
|
633
|
+
<div className="sidebar-section-title">Code</div>
|
|
417
634
|
<div className="sidebar-chat-list sidebar-cli-list">
|
|
418
635
|
<button
|
|
419
|
-
className={`sidebar-project sidebar-chat-item ${
|
|
420
|
-
onClick={() =>
|
|
421
|
-
title=
|
|
636
|
+
className={`sidebar-project sidebar-chat-item ${view === 'code' ? 'active' : ''}`}
|
|
637
|
+
onClick={() => onSetView('code')}
|
|
638
|
+
title="Code sessions Hub"
|
|
422
639
|
>
|
|
423
640
|
<span aria-hidden="true" style={{ display: 'inline-flex', alignItems: 'center' }}>
|
|
424
641
|
<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2.5" strokeLinecap="round" strokeLinejoin="round">
|
|
425
|
-
<
|
|
426
|
-
<
|
|
642
|
+
<polyline points="4 17 10 11 4 5"></polyline>
|
|
643
|
+
<line x1="12" y1="19" x2="20" y2="19"></line>
|
|
427
644
|
</svg>
|
|
428
645
|
</span>
|
|
429
|
-
<span className="sidebar-chat-title">
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
646
|
+
<span className="sidebar-chat-title">Code hub</span>
|
|
647
|
+
<span
|
|
648
|
+
style={{
|
|
649
|
+
marginLeft: 'auto',
|
|
650
|
+
fontSize: '0.72rem',
|
|
651
|
+
fontWeight: 600,
|
|
652
|
+
padding: '1px 6px',
|
|
653
|
+
borderRadius: '10px',
|
|
654
|
+
background: 'rgba(255, 255, 255, 0.08)',
|
|
655
|
+
color: 'var(--text-muted, #94a3b8)',
|
|
656
|
+
}}
|
|
657
|
+
>
|
|
658
|
+
{cliSessions.length}
|
|
659
|
+
</span>
|
|
436
660
|
</button>
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
<div className="sidebar-chat-list">
|
|
440
|
-
{conversationSessions.map((session) => (
|
|
661
|
+
|
|
662
|
+
{pinnedCliSession && (
|
|
441
663
|
<button
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
664
|
+
className={`sidebar-project sidebar-chat-item ${pinnedCliSession.id === activeConversationId ? 'active' : ''}`}
|
|
665
|
+
onClick={() => onSelectConversation(pinnedCliSession.id)}
|
|
666
|
+
title={pinnedCliSession.title || 'Terminal Session'}
|
|
667
|
+
style={{ paddingLeft: '16px' }}
|
|
446
668
|
>
|
|
447
|
-
<span aria-hidden="true" style={{ display: 'inline-flex', alignItems: 'center' }}>
|
|
669
|
+
<span aria-hidden="true" style={{ display: 'inline-flex', alignItems: 'center', opacity: 0.85 }}>
|
|
448
670
|
<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2.5" strokeLinecap="round" strokeLinejoin="round">
|
|
449
|
-
<path d="
|
|
671
|
+
<path d="M4 17l6-6-6-6"></path>
|
|
672
|
+
<path d="M12 19h8"></path>
|
|
450
673
|
</svg>
|
|
451
674
|
</span>
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
onKeyDown={(e) => {
|
|
460
|
-
if (e.key === 'Enter') {
|
|
461
|
-
handleSaveRename(session.id)
|
|
462
|
-
} else if (e.key === 'Escape') {
|
|
463
|
-
setEditingSessionId(null)
|
|
464
|
-
}
|
|
465
|
-
}}
|
|
466
|
-
autoFocus
|
|
467
|
-
onClick={(e) => e.stopPropagation()}
|
|
468
|
-
/>
|
|
469
|
-
) : (
|
|
470
|
-
<span className="sidebar-chat-title">{session.title || 'New chat'}</span>
|
|
471
|
-
)}
|
|
472
|
-
{session.id === activeConversationId && (
|
|
473
|
-
<span className="mint-status-pill" data-state={sending ? "thinking" : "idle"}>
|
|
474
|
-
<span className="mint-status-dot" />
|
|
475
|
-
<span className="mint-status-label">{sending ? "Thinking" : "Idle"}</span>
|
|
476
|
-
</span>
|
|
675
|
+
<span className="sidebar-chat-title">
|
|
676
|
+
{pinnedCliSession.title && pinnedCliSession.title !== 'cli'
|
|
677
|
+
? pinnedCliSession.title
|
|
678
|
+
: (pinnedCliSession.id === 'cli' ? 'Terminal Session' : `cli::${pinnedCliSession.id.replace(/^cli::/, '').slice(0, 7)}`)}
|
|
679
|
+
</span>
|
|
680
|
+
{pinnedCliSession.id === activeConversationId && sending && (
|
|
681
|
+
<span className="sidebar-generating-text">Thinking...</span>
|
|
477
682
|
)}
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
683
|
+
</button>
|
|
684
|
+
)}
|
|
685
|
+
</div>
|
|
686
|
+
{projectGroups.length > 0 && (
|
|
687
|
+
<>
|
|
688
|
+
<div className="sidebar-section-title sidebar-subsection-title">Projects</div>
|
|
689
|
+
<div className="sidebar-projects-list">
|
|
690
|
+
{projectGroups.map((group) => {
|
|
691
|
+
const isCollapsed = !!collapsedProjects[group.id]
|
|
692
|
+
const isExpanded = !!expandedShowMore[group.id]
|
|
693
|
+
const maxVisible = 3
|
|
694
|
+
const hasMore = group.sessions.length > maxVisible
|
|
695
|
+
const visibleSessions = (isExpanded || !hasMore)
|
|
696
|
+
? group.sessions
|
|
697
|
+
: group.sessions.slice(0, maxVisible)
|
|
698
|
+
|
|
699
|
+
const isDragging = draggedProjectId === group.id
|
|
700
|
+
const isDragOver = dragOverProjectId === group.id
|
|
701
|
+
|
|
702
|
+
return (
|
|
703
|
+
<div
|
|
704
|
+
key={group.id}
|
|
705
|
+
className={`sidebar-project-group ${isDragging ? 'is-dragging' : ''} ${isDragOver ? (dropPosition === 'before' ? 'drop-before' : 'drop-after') : ''}`}
|
|
706
|
+
onDragOver={(e) => handleProjectDragOver(e, group.id)}
|
|
707
|
+
onDragLeave={(e) => handleProjectDragLeave(e, group.id)}
|
|
708
|
+
onDrop={(e) => handleProjectDrop(e, group.id)}
|
|
498
709
|
>
|
|
499
|
-
<
|
|
500
|
-
|
|
501
|
-
|
|
710
|
+
<div
|
|
711
|
+
role="button"
|
|
712
|
+
tabIndex={0}
|
|
713
|
+
className="sidebar-project-group-header"
|
|
714
|
+
onClick={() => toggleProjectCollapse(group.id)}
|
|
715
|
+
onKeyDown={(e) => {
|
|
716
|
+
if (e.key === 'Enter' || e.key === ' ') {
|
|
717
|
+
e.preventDefault()
|
|
718
|
+
toggleProjectCollapse(group.id)
|
|
719
|
+
}
|
|
720
|
+
}}
|
|
721
|
+
title={`${group.name} (${group.id}) - Drag to reorder`}
|
|
722
|
+
draggable
|
|
723
|
+
onDragStart={(e) => handleProjectDragStart(e, group.id)}
|
|
724
|
+
onDragEnd={handleProjectDragEnd}
|
|
725
|
+
>
|
|
726
|
+
<span className="sidebar-project-group-left">
|
|
727
|
+
<span className="sidebar-project-drag-grip" title="Drag to reorder" aria-hidden="true">
|
|
728
|
+
<svg width="8" height="12" viewBox="0 0 8 12" fill="currentColor">
|
|
729
|
+
<circle cx="2" cy="2" r="1.2" />
|
|
730
|
+
<circle cx="6" cy="2" r="1.2" />
|
|
731
|
+
<circle cx="2" cy="6" r="1.2" />
|
|
732
|
+
<circle cx="6" cy="6" r="1.2" />
|
|
733
|
+
<circle cx="2" cy="10" r="1.2" />
|
|
734
|
+
<circle cx="6" cy="10" r="1.2" />
|
|
735
|
+
</svg>
|
|
736
|
+
</span>
|
|
737
|
+
<svg
|
|
738
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
739
|
+
width="14"
|
|
740
|
+
height="14"
|
|
741
|
+
viewBox="0 0 24 24"
|
|
742
|
+
fill="none"
|
|
743
|
+
stroke="currentColor"
|
|
744
|
+
strokeWidth="2"
|
|
745
|
+
strokeLinecap="round"
|
|
746
|
+
strokeLinejoin="round"
|
|
747
|
+
className="sidebar-project-folder-icon"
|
|
748
|
+
>
|
|
749
|
+
{!isCollapsed ? (
|
|
750
|
+
<>
|
|
751
|
+
<path d="M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z"></path>
|
|
752
|
+
<polygon points="3 20 6 10 23 10 20 20 3 20" fill="currentColor" fillOpacity="0.15"></polygon>
|
|
753
|
+
</>
|
|
754
|
+
) : (
|
|
755
|
+
<path d="M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z"></path>
|
|
756
|
+
)}
|
|
757
|
+
</svg>
|
|
758
|
+
<span className="sidebar-project-group-name">{group.name}</span>
|
|
759
|
+
</span>
|
|
760
|
+
<span className="sidebar-project-group-right">
|
|
761
|
+
<button
|
|
762
|
+
type="button"
|
|
763
|
+
className="sidebar-project-menu-trigger"
|
|
764
|
+
aria-label={`Project actions for ${group.name}`}
|
|
765
|
+
aria-haspopup="menu"
|
|
766
|
+
aria-expanded={projectMenu?.projectId === group.id}
|
|
767
|
+
onClick={(e) => {
|
|
768
|
+
e.stopPropagation()
|
|
769
|
+
const rect = e.currentTarget.getBoundingClientRect()
|
|
770
|
+
setProjectMenu(projectMenu?.projectId === group.id ? null : { projectId: group.id, top: Math.min(rect.bottom + 4, window.innerHeight - 120), left: Math.max(8, Math.min(rect.right - 190, window.innerWidth - 198)) })
|
|
771
|
+
}}
|
|
772
|
+
onKeyDown={(e) => e.stopPropagation()}
|
|
773
|
+
>
|
|
774
|
+
<svg width="14" height="14" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><circle cx="5" cy="12" r="1.8" /><circle cx="12" cy="12" r="1.8" /><circle cx="19" cy="12" r="1.8" /></svg>
|
|
775
|
+
</button>
|
|
776
|
+
<span className="sidebar-project-group-count">{group.sessions.length}</span>
|
|
777
|
+
<span
|
|
778
|
+
className="sidebar-project-group-chevron"
|
|
779
|
+
style={{
|
|
780
|
+
transform: isCollapsed ? 'rotate(-90deg)' : 'rotate(0deg)',
|
|
781
|
+
transition: 'transform 0.18s ease'
|
|
782
|
+
}}
|
|
783
|
+
>
|
|
784
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2.5" strokeLinecap="round" strokeLinejoin="round">
|
|
785
|
+
<polyline points="6 9 12 15 18 9"></polyline>
|
|
786
|
+
</svg>
|
|
787
|
+
</span>
|
|
788
|
+
</span>
|
|
789
|
+
</div>
|
|
790
|
+
{projectMenu?.projectId === group.id && (
|
|
791
|
+
<div className="sidebar-project-menu-popover" role="menu" style={{ top: projectMenu.top, left: projectMenu.left }} onClick={(e) => e.stopPropagation()}>
|
|
792
|
+
{onNewChatInProject && <button type="button" role="menuitem" onClick={() => { setCollapsedProjects((prev) => ({ ...prev, [group.id]: false })); onNewChatInProject(group.id); setProjectMenu(null) }}><Plus className="sidebar-menu-icon" size={14} aria-hidden="true" /><span>New chat in project</span></button>}
|
|
793
|
+
<button type="button" role="menuitem" className="is-destructive" onClick={() => removeProjectFromSidebar(group.id)}><FolderMinus className="sidebar-menu-icon" size={14} aria-hidden="true" /><span>Remove from sidebar</span></button>
|
|
794
|
+
</div>
|
|
795
|
+
)}
|
|
796
|
+
{!isCollapsed && (
|
|
797
|
+
<div className="sidebar-project-sessions">
|
|
798
|
+
{visibleSessions.map((session) => (
|
|
799
|
+
<button
|
|
800
|
+
key={session.id}
|
|
801
|
+
className={`sidebar-project sidebar-chat-item is-indented ${session.id === activeConversationId ? 'active' : ''}`}
|
|
802
|
+
onClick={() => onSelectConversation(session.id)}
|
|
803
|
+
title={session.title}
|
|
804
|
+
>
|
|
805
|
+
<span aria-hidden="true" style={{ display: 'inline-flex', alignItems: 'center' }}>
|
|
806
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="13" height="13" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2.3" strokeLinecap="round" strokeLinejoin="round">
|
|
807
|
+
<path d="M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"></path>
|
|
808
|
+
</svg>
|
|
809
|
+
</span>
|
|
810
|
+
{editingSessionId === session.id ? (
|
|
811
|
+
<input
|
|
812
|
+
type="text"
|
|
813
|
+
className="sidebar-chat-rename-input"
|
|
814
|
+
value={editTitleValue}
|
|
815
|
+
onChange={(e) => setEditTitleValue(e.target.value)}
|
|
816
|
+
onBlur={() => handleSaveRename(session.id)}
|
|
817
|
+
onKeyDown={(e) => {
|
|
818
|
+
if (e.key === 'Enter') {
|
|
819
|
+
handleSaveRename(session.id)
|
|
820
|
+
} else if (e.key === 'Escape') {
|
|
821
|
+
setEditingSessionId(null)
|
|
822
|
+
}
|
|
823
|
+
}}
|
|
824
|
+
autoFocus
|
|
825
|
+
onClick={(e) => e.stopPropagation()}
|
|
826
|
+
/>
|
|
827
|
+
) : (
|
|
828
|
+
<span className="sidebar-chat-title">{session.title || 'New chat'}</span>
|
|
829
|
+
)}
|
|
830
|
+
{session.id === activeConversationId && sending && (
|
|
831
|
+
<span className="sidebar-generating-text">Thinking...</span>
|
|
832
|
+
)}
|
|
833
|
+
{editingSessionId !== session.id && (
|
|
834
|
+
<>
|
|
835
|
+
<span role="button" tabIndex={0} className="sidebar-conversation-menu-trigger" aria-label={`Actions for ${session.title || 'conversation'}`} onClick={(event) => {
|
|
836
|
+
event.stopPropagation()
|
|
837
|
+
const rect = event.currentTarget.getBoundingClientRect()
|
|
838
|
+
setConversationMenu({ sessionId: session.id, top: Math.min(rect.bottom + 4, window.innerHeight - 120), left: Math.max(8, Math.min(rect.right - 190, window.innerWidth - 198)) })
|
|
839
|
+
}} onKeyDown={(event) => {
|
|
840
|
+
if (event.key === 'Enter' || event.key === ' ') {
|
|
841
|
+
event.preventDefault(); event.stopPropagation()
|
|
842
|
+
const rect = event.currentTarget.getBoundingClientRect()
|
|
843
|
+
setConversationMenu({ sessionId: session.id, top: Math.min(rect.bottom + 4, window.innerHeight - 120), left: Math.max(8, Math.min(rect.right - 190, window.innerWidth - 198)) })
|
|
844
|
+
}
|
|
845
|
+
}}><svg width="14" height="14" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><circle cx="5" cy="12" r="1.8" /><circle cx="12" cy="12" r="1.8" /><circle cx="19" cy="12" r="1.8" /></svg></span>
|
|
846
|
+
<span
|
|
847
|
+
className="sidebar-chat-edit"
|
|
848
|
+
role="button"
|
|
849
|
+
tabIndex={0}
|
|
850
|
+
title="Rename conversation"
|
|
851
|
+
onClick={(event) => {
|
|
852
|
+
event.stopPropagation()
|
|
853
|
+
setEditingSessionId(session.id)
|
|
854
|
+
setEditTitleValue(session.title || '')
|
|
855
|
+
}}
|
|
856
|
+
onKeyDown={(event) => {
|
|
857
|
+
if (event.key === 'Enter' || event.key === ' ') {
|
|
858
|
+
event.preventDefault()
|
|
859
|
+
event.stopPropagation()
|
|
860
|
+
setEditingSessionId(session.id)
|
|
861
|
+
setEditTitleValue(session.title || '')
|
|
862
|
+
}
|
|
863
|
+
}}
|
|
864
|
+
>
|
|
865
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="13" height="13" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2.3" strokeLinecap="round" strokeLinejoin="round">
|
|
866
|
+
<path d="M12 20h9"></path>
|
|
867
|
+
<path d="M16.5 3.5a2.121 2.121 0 0 1 3 3L7 19l-4 1 1-4L16.5 3.5z"></path>
|
|
868
|
+
</svg>
|
|
869
|
+
</span>
|
|
870
|
+
{onUpdateSessionWorkspace && (
|
|
871
|
+
<span
|
|
872
|
+
className="sidebar-chat-edit"
|
|
873
|
+
role="button"
|
|
874
|
+
tabIndex={0}
|
|
875
|
+
title="Move conversation..."
|
|
876
|
+
onClick={(event) => openMoveMenu(event, session)}
|
|
877
|
+
onKeyDown={(event) => {
|
|
878
|
+
if (event.key === 'Enter' || event.key === ' ') {
|
|
879
|
+
event.preventDefault()
|
|
880
|
+
openMoveMenu(event as any, session)
|
|
881
|
+
}
|
|
882
|
+
}}
|
|
883
|
+
>
|
|
884
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="13" height="13" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2.3" strokeLinecap="round" strokeLinejoin="round">
|
|
885
|
+
<path d="M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z"></path>
|
|
886
|
+
<polyline points="12 11 12 17"></polyline>
|
|
887
|
+
<polyline points="9 14 12 11 15 14"></polyline>
|
|
888
|
+
</svg>
|
|
889
|
+
</span>
|
|
890
|
+
)}
|
|
891
|
+
<span
|
|
892
|
+
className="sidebar-chat-delete"
|
|
893
|
+
role="button"
|
|
894
|
+
tabIndex={0}
|
|
895
|
+
title="Delete conversation"
|
|
896
|
+
onClick={(event) => {
|
|
897
|
+
event.stopPropagation()
|
|
898
|
+
onDeleteConversation(session.id)
|
|
899
|
+
}}
|
|
900
|
+
onKeyDown={(event) => {
|
|
901
|
+
if (event.key === 'Enter' || event.key === ' ') {
|
|
902
|
+
event.preventDefault()
|
|
903
|
+
event.stopPropagation()
|
|
904
|
+
onDeleteConversation(session.id)
|
|
905
|
+
}
|
|
906
|
+
}}
|
|
907
|
+
>
|
|
908
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="13" height="13" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2.3" strokeLinecap="round" strokeLinejoin="round">
|
|
909
|
+
<polyline points="3 6 5 6 21 6"></polyline>
|
|
910
|
+
<path d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6"></path>
|
|
911
|
+
<path d="M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"></path>
|
|
912
|
+
</svg>
|
|
913
|
+
</span>
|
|
914
|
+
</>
|
|
915
|
+
)}
|
|
916
|
+
</button>
|
|
917
|
+
))}
|
|
918
|
+
{hasMore && (
|
|
919
|
+
<button
|
|
920
|
+
type="button"
|
|
921
|
+
className="sidebar-show-more-btn"
|
|
922
|
+
onClick={() => toggleShowMore(group.id)}
|
|
923
|
+
>
|
|
924
|
+
<span>{isExpanded ? 'Show less' : `Show more (${group.sessions.length - maxVisible})`}</span>
|
|
925
|
+
<ChevronDown className={isExpanded ? 'is-expanded' : ''} size={13} aria-hidden="true" />
|
|
926
|
+
</button>
|
|
927
|
+
)}
|
|
928
|
+
</div>
|
|
929
|
+
)}
|
|
930
|
+
</div>
|
|
931
|
+
)
|
|
932
|
+
})}
|
|
933
|
+
</div>
|
|
934
|
+
</>
|
|
935
|
+
)}
|
|
936
|
+
|
|
937
|
+
{(recentSessions.length > 0 || projectGroups.length === 0) && (
|
|
938
|
+
<>
|
|
939
|
+
<div className="sidebar-section-title sidebar-subsection-title">
|
|
940
|
+
{projectGroups.length > 0 ? 'Recents' : 'Conversations'}
|
|
941
|
+
</div>
|
|
942
|
+
<div className="sidebar-chat-list">
|
|
943
|
+
{recentSessions.map((session) => (
|
|
944
|
+
<button
|
|
945
|
+
key={session.id}
|
|
946
|
+
className={`sidebar-project sidebar-chat-item ${session.id === activeConversationId ? 'active' : ''}`}
|
|
947
|
+
onClick={() => onSelectConversation(session.id)}
|
|
948
|
+
title={session.title}
|
|
949
|
+
>
|
|
950
|
+
<span aria-hidden="true" style={{ display: 'inline-flex', alignItems: 'center' }}>
|
|
951
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2.5" strokeLinecap="round" strokeLinejoin="round">
|
|
952
|
+
<path d="M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"></path>
|
|
502
953
|
</svg>
|
|
503
954
|
</span>
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
955
|
+
{editingSessionId === session.id ? (
|
|
956
|
+
<input
|
|
957
|
+
type="text"
|
|
958
|
+
className="sidebar-chat-rename-input"
|
|
959
|
+
value={editTitleValue}
|
|
960
|
+
onChange={(e) => setEditTitleValue(e.target.value)}
|
|
961
|
+
onBlur={() => handleSaveRename(session.id)}
|
|
962
|
+
onKeyDown={(e) => {
|
|
963
|
+
if (e.key === 'Enter') {
|
|
964
|
+
handleSaveRename(session.id)
|
|
965
|
+
} else if (e.key === 'Escape') {
|
|
966
|
+
setEditingSessionId(null)
|
|
967
|
+
}
|
|
968
|
+
}}
|
|
969
|
+
autoFocus
|
|
970
|
+
onClick={(e) => e.stopPropagation()}
|
|
971
|
+
/>
|
|
972
|
+
) : (
|
|
973
|
+
<span className="sidebar-chat-title">{session.title || 'New chat'}</span>
|
|
974
|
+
)}
|
|
975
|
+
{session.id === activeConversationId && sending && (
|
|
976
|
+
<span className="sidebar-generating-text">Thinking...</span>
|
|
977
|
+
)}
|
|
978
|
+
{editingSessionId !== session.id && (
|
|
979
|
+
<>
|
|
980
|
+
<span role="button" tabIndex={0} className="sidebar-conversation-menu-trigger" aria-label={`Actions for ${session.title || 'conversation'}`} onClick={(event) => {
|
|
516
981
|
event.stopPropagation()
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
982
|
+
const rect = event.currentTarget.getBoundingClientRect()
|
|
983
|
+
setConversationMenu({ sessionId: session.id, top: Math.min(rect.bottom + 4, window.innerHeight - 120), left: Math.max(8, Math.min(rect.right - 190, window.innerWidth - 198)) })
|
|
984
|
+
}} onKeyDown={(event) => {
|
|
985
|
+
if (event.key === 'Enter' || event.key === ' ') {
|
|
986
|
+
event.preventDefault(); event.stopPropagation()
|
|
987
|
+
const rect = event.currentTarget.getBoundingClientRect()
|
|
988
|
+
setConversationMenu({ sessionId: session.id, top: Math.min(rect.bottom + 4, window.innerHeight - 120), left: Math.max(8, Math.min(rect.right - 190, window.innerWidth - 198)) })
|
|
989
|
+
}
|
|
990
|
+
}}><svg width="14" height="14" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><circle cx="5" cy="12" r="1.8" /><circle cx="12" cy="12" r="1.8" /><circle cx="19" cy="12" r="1.8" /></svg></span>
|
|
991
|
+
<span
|
|
992
|
+
className="sidebar-chat-edit"
|
|
993
|
+
role="button"
|
|
994
|
+
tabIndex={0}
|
|
995
|
+
title="Rename conversation"
|
|
996
|
+
onClick={(event) => {
|
|
997
|
+
event.stopPropagation()
|
|
998
|
+
setEditingSessionId(session.id)
|
|
999
|
+
setEditTitleValue(session.title || '')
|
|
1000
|
+
}}
|
|
1001
|
+
onKeyDown={(event) => {
|
|
1002
|
+
if (event.key === 'Enter' || event.key === ' ') {
|
|
1003
|
+
event.preventDefault()
|
|
1004
|
+
event.stopPropagation()
|
|
1005
|
+
setEditingSessionId(session.id)
|
|
1006
|
+
setEditTitleValue(session.title || '')
|
|
1007
|
+
}
|
|
1008
|
+
}}
|
|
1009
|
+
>
|
|
1010
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="13" height="13" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2.3" strokeLinecap="round" strokeLinejoin="round">
|
|
1011
|
+
<path d="M12 20h9"></path>
|
|
1012
|
+
<path d="M16.5 3.5a2.121 2.121 0 0 1 3 3L7 19l-4 1 1-4L16.5 3.5z"></path>
|
|
1013
|
+
</svg>
|
|
1014
|
+
</span>
|
|
1015
|
+
{onUpdateSessionWorkspace && (
|
|
1016
|
+
<span
|
|
1017
|
+
className="sidebar-chat-edit"
|
|
1018
|
+
role="button"
|
|
1019
|
+
tabIndex={0}
|
|
1020
|
+
title="Move conversation..."
|
|
1021
|
+
onClick={(event) => openMoveMenu(event, session)}
|
|
1022
|
+
onKeyDown={(event) => {
|
|
1023
|
+
if (event.key === 'Enter' || event.key === ' ') {
|
|
1024
|
+
event.preventDefault()
|
|
1025
|
+
openMoveMenu(event as any, session)
|
|
1026
|
+
}
|
|
1027
|
+
}}
|
|
1028
|
+
>
|
|
1029
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="13" height="13" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2.3" strokeLinecap="round" strokeLinejoin="round">
|
|
1030
|
+
<path d="M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z"></path>
|
|
1031
|
+
<polyline points="12 11 12 17"></polyline>
|
|
1032
|
+
<polyline points="9 14 12 11 15 14"></polyline>
|
|
1033
|
+
</svg>
|
|
1034
|
+
</span>
|
|
1035
|
+
)}
|
|
1036
|
+
<span
|
|
1037
|
+
className="sidebar-chat-delete"
|
|
1038
|
+
role="button"
|
|
1039
|
+
tabIndex={0}
|
|
1040
|
+
title="Delete conversation"
|
|
1041
|
+
onClick={(event) => {
|
|
1042
|
+
event.stopPropagation()
|
|
1043
|
+
onDeleteConversation(session.id)
|
|
1044
|
+
}}
|
|
1045
|
+
onKeyDown={(event) => {
|
|
1046
|
+
if (event.key === 'Enter' || event.key === ' ') {
|
|
1047
|
+
event.preventDefault()
|
|
1048
|
+
event.stopPropagation()
|
|
1049
|
+
onDeleteConversation(session.id)
|
|
1050
|
+
}
|
|
1051
|
+
}}
|
|
1052
|
+
>
|
|
1053
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="13" height="13" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2.3" strokeLinecap="round" strokeLinejoin="round">
|
|
1054
|
+
<polyline points="3 6 5 6 21 6"></polyline>
|
|
1055
|
+
<path d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6"></path>
|
|
1056
|
+
<path d="M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"></path>
|
|
1057
|
+
</svg>
|
|
1058
|
+
</span>
|
|
1059
|
+
</>
|
|
1060
|
+
)}
|
|
1061
|
+
</button>
|
|
1062
|
+
))}
|
|
1063
|
+
</div>
|
|
1064
|
+
</>
|
|
1065
|
+
)}
|
|
532
1066
|
</div>
|
|
1067
|
+
)}
|
|
533
1068
|
|
|
534
1069
|
{user && (
|
|
535
1070
|
<div className="sidebar-account-container" ref={accountContainerRef}>
|
|
@@ -553,7 +1088,7 @@ export default function DashboardSidebar({
|
|
|
553
1088
|
</button>
|
|
554
1089
|
<button className={`popover-item ${view === 'mcp' ? 'active' : ''}`} onClick={() => { onSetView('mcp'); setIsAccountMenuOpen(false); }}>
|
|
555
1090
|
<span aria-hidden="true" style={{ display: 'inline-flex', alignItems: 'center' }}>{renderMcpHubSvgIcon(15)}</span>
|
|
556
|
-
<span>MCP
|
|
1091
|
+
<span>MCP servers</span>
|
|
557
1092
|
</button>
|
|
558
1093
|
<button className={`popover-item ${view === 'plugins' ? 'active' : ''}`} onClick={() => { onSetView('plugins'); setIsAccountMenuOpen(false); }}>
|
|
559
1094
|
<span aria-hidden="true" style={{ display: 'inline-flex', alignItems: 'center' }}>{renderPluginsSvgIcon(15)}</span>
|
|
@@ -561,11 +1096,11 @@ export default function DashboardSidebar({
|
|
|
561
1096
|
</button>
|
|
562
1097
|
<button className={`popover-item ${view === 'cron' ? 'active' : ''}`} onClick={() => { onSetView('cron'); setIsAccountMenuOpen(false); }}>
|
|
563
1098
|
<span aria-hidden="true" style={{ display: 'inline-flex', alignItems: 'center' }}>{renderScheduledTasksSvgIcon(15)}</span>
|
|
564
|
-
<span>Scheduled
|
|
1099
|
+
<span>Scheduled tasks</span>
|
|
565
1100
|
</button>
|
|
566
1101
|
<button className={`popover-item ${view === 'link' ? 'active' : ''}`} onClick={() => { onSetView('link'); setIsAccountMenuOpen(false); }}>
|
|
567
1102
|
<span aria-hidden="true" style={{ display: 'inline-flex', alignItems: 'center' }}>{renderLinkedFoldersSvgIcon(15)}</span>
|
|
568
|
-
<span>Linked
|
|
1103
|
+
<span>Linked folders</span>
|
|
569
1104
|
</button>
|
|
570
1105
|
<div className="sidebar-account-menu-divider" />
|
|
571
1106
|
<button className="popover-item" onClick={() => { setIsAccountMenuOpen(false); logout(); }}>
|
|
@@ -599,6 +1134,95 @@ export default function DashboardSidebar({
|
|
|
599
1134
|
</button>
|
|
600
1135
|
</div>
|
|
601
1136
|
)}
|
|
1137
|
+
|
|
1138
|
+
{moveMenu && (
|
|
1139
|
+
<div
|
|
1140
|
+
ref={moveMenuRef}
|
|
1141
|
+
className="sidebar-move-popover"
|
|
1142
|
+
style={{
|
|
1143
|
+
position: 'fixed',
|
|
1144
|
+
top: `${moveMenu.top}px`,
|
|
1145
|
+
left: `${moveMenu.left}px`,
|
|
1146
|
+
zIndex: 99999,
|
|
1147
|
+
}}
|
|
1148
|
+
onClick={(e) => e.stopPropagation()}
|
|
1149
|
+
>
|
|
1150
|
+
<div className="sidebar-move-header">Move to Project</div>
|
|
1151
|
+
<div className="sidebar-move-list">
|
|
1152
|
+
{availableProjects.map((p) => {
|
|
1153
|
+
const isCurrent = moveMenu.currentWorkspacePath === p.path
|
|
1154
|
+
return (
|
|
1155
|
+
<button
|
|
1156
|
+
key={p.path}
|
|
1157
|
+
type="button"
|
|
1158
|
+
className={`sidebar-move-item ${isCurrent ? 'is-current' : ''}`}
|
|
1159
|
+
onClick={() => {
|
|
1160
|
+
onUpdateSessionWorkspace?.(moveMenu.sessionId, p.path)
|
|
1161
|
+
setMoveMenu(null)
|
|
1162
|
+
}}
|
|
1163
|
+
title={p.path}
|
|
1164
|
+
>
|
|
1165
|
+
<span className="sidebar-move-item-icon"><Folder size={14} aria-hidden="true" /></span>
|
|
1166
|
+
<span className="sidebar-move-item-name">{p.name}</span>
|
|
1167
|
+
{isCurrent && <span className="sidebar-move-item-check"><Check size={14} aria-hidden="true" /></span>}
|
|
1168
|
+
</button>
|
|
1169
|
+
)
|
|
1170
|
+
})}
|
|
1171
|
+
</div>
|
|
1172
|
+
|
|
1173
|
+
<div className="sidebar-move-divider" />
|
|
1174
|
+
|
|
1175
|
+
<button
|
|
1176
|
+
type="button"
|
|
1177
|
+
className={`sidebar-move-item ${!moveMenu.currentWorkspacePath ? 'is-current' : ''}`}
|
|
1178
|
+
onClick={() => {
|
|
1179
|
+
onUpdateSessionWorkspace?.(moveMenu.sessionId, null)
|
|
1180
|
+
setMoveMenu(null)
|
|
1181
|
+
}}
|
|
1182
|
+
>
|
|
1183
|
+
<span className="sidebar-move-item-icon">
|
|
1184
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="13" height="13" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2.3" strokeLinecap="round" strokeLinejoin="round">
|
|
1185
|
+
<polyline points="9 14 4 9 9 4"></polyline>
|
|
1186
|
+
<path d="M20 20v-7a4 4 0 0 0-4-4H4"></path>
|
|
1187
|
+
</svg>
|
|
1188
|
+
</span>
|
|
1189
|
+
<span className="sidebar-move-item-name">Recents (No project)</span>
|
|
1190
|
+
{!moveMenu.currentWorkspacePath && <span className="sidebar-move-item-check"><Check size={14} aria-hidden="true" /></span>}
|
|
1191
|
+
</button>
|
|
1192
|
+
|
|
1193
|
+
{onBrowseFolder && (
|
|
1194
|
+
<button
|
|
1195
|
+
type="button"
|
|
1196
|
+
className="sidebar-move-item"
|
|
1197
|
+
onClick={async () => {
|
|
1198
|
+
const picked = await onBrowseFolder()
|
|
1199
|
+
if (picked) {
|
|
1200
|
+
onUpdateSessionWorkspace?.(moveMenu.sessionId, picked)
|
|
1201
|
+
}
|
|
1202
|
+
setMoveMenu(null)
|
|
1203
|
+
}}
|
|
1204
|
+
>
|
|
1205
|
+
<span className="sidebar-move-item-icon">
|
|
1206
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="13" height="13" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2.3" strokeLinecap="round" strokeLinejoin="round">
|
|
1207
|
+
<line x1="12" y1="5" x2="12" y2="19"></line>
|
|
1208
|
+
<line x1="5" y1="12" x2="19" y2="12"></line>
|
|
1209
|
+
</svg>
|
|
1210
|
+
</span>
|
|
1211
|
+
<span className="sidebar-move-item-name">Choose folder...</span>
|
|
1212
|
+
</button>
|
|
1213
|
+
)}
|
|
1214
|
+
</div>
|
|
1215
|
+
)}
|
|
1216
|
+
|
|
1217
|
+
{conversationMenu && (() => {
|
|
1218
|
+
const session = conversationSessions.find((item) => item.id === conversationMenu.sessionId)
|
|
1219
|
+
if (!session) return null
|
|
1220
|
+
return <div className="sidebar-conversation-menu-popover" role="menu" style={{ top: conversationMenu.top, left: conversationMenu.left }} onClick={(event) => event.stopPropagation()}>
|
|
1221
|
+
<button type="button" role="menuitem" onClick={() => { setEditingSessionId(session.id); setEditTitleValue(session.title || ''); setConversationMenu(null) }}><Pencil className="sidebar-menu-icon" size={14} aria-hidden="true" /><span>Rename</span></button>
|
|
1222
|
+
{onUpdateSessionWorkspace && <button type="button" role="menuitem" onClick={(event) => { setConversationMenu(null); openMoveMenu(event as any, session) }}><FolderInput className="sidebar-menu-icon" size={14} aria-hidden="true" /><span>Move to project</span></button>}
|
|
1223
|
+
<button type="button" role="menuitem" className="is-destructive" onClick={() => { onDeleteConversation(session.id); setConversationMenu(null) }}><Trash2 className="sidebar-menu-icon" size={14} aria-hidden="true" /><span>Delete conversation</span></button>
|
|
1224
|
+
</div>
|
|
1225
|
+
})()}
|
|
602
1226
|
</aside>
|
|
603
1227
|
)
|
|
604
1228
|
}
|