@pheem49/mint 1.14.0 → 1.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CLAUDE.md +1 -1
- package/Cargo.lock +291 -11
- package/Cargo.toml +1 -1
- package/README.md +71 -9
- package/ROADMAP.md +30 -0
- package/Release_Note.md +579 -465
- package/crates/mint-cli/Cargo.toml +3 -1
- package/crates/mint-cli/src/agent/approval_prompts.rs +16 -3
- package/crates/mint-cli/src/agent/live_status.rs +367 -118
- package/crates/mint-cli/src/agent/markdown_render.rs +601 -61
- package/crates/mint-cli/src/agent.rs +452 -215
- package/crates/mint-cli/src/commands/agent.rs +16 -21
- package/crates/mint-cli/src/commands/eval.rs +9 -5
- package/crates/mint-cli/src/commands/git.rs +204 -0
- package/crates/mint-cli/src/commands/integrations.rs +28 -0
- package/crates/mint-cli/src/commands/knowledge.rs +1 -0
- package/crates/mint-cli/src/commands/mod.rs +37 -2
- package/crates/mint-cli/src/commands/tailnet_web.rs +235 -0
- package/crates/mint-cli/src/image.rs +26 -3
- package/crates/mint-cli/src/interactive/chat_tui.rs +4742 -0
- package/crates/mint-cli/src/interactive/command_ui.rs +477 -0
- package/crates/mint-cli/src/interactive/format.rs +8 -0
- package/crates/mint-cli/src/interactive/input_box.rs +38 -2
- package/crates/mint-cli/src/interactive/picker.rs +180 -37
- package/crates/mint-cli/src/interactive/resume_picker.rs +686 -0
- package/crates/mint-cli/src/interactive/slash_commands.rs +868 -450
- package/crates/mint-cli/src/interactive/thought_viewer.rs +286 -0
- package/crates/mint-cli/src/interactive.rs +400 -136
- package/crates/mint-cli/src/main.rs +84 -23
- package/crates/mint-cli/src/markdown.rs +12 -5
- package/crates/mint-cli/src/onboard.rs +32 -30
- package/crates/mint-cli/src/plugins_cli.rs +8 -5
- package/crates/mint-cli/src/setup.rs +10 -8
- package/crates/mint-cli/src/terminal_theme.rs +187 -0
- package/crates/mint-cli/src/updater.rs +56 -21
- package/crates/mint-core/src/agent/agent_loop.rs +1 -0
- package/crates/mint-core/src/agent/chat.rs +843 -177
- package/crates/mint-core/src/agent/code_tools.rs +83 -2
- package/crates/mint-core/src/agent/memory.rs +658 -20
- package/crates/mint-core/src/agent/skills.rs +1 -1
- package/crates/mint-core/src/api_server/routes/chat.rs +31 -5
- package/crates/mint-core/src/api_server/routes/linked_folders.rs +118 -3
- package/crates/mint-core/src/api_server/routes/misc.rs +10 -14
- package/crates/mint-core/src/api_server/routes/sessions.rs +44 -0
- package/crates/mint-core/src/api_server.rs +22 -3
- package/crates/mint-core/src/avatar_bridge.rs +2 -0
- package/crates/mint-core/src/browser/cdp.rs +74 -83
- package/crates/mint-core/src/browser/evidence.rs +260 -0
- package/crates/mint-core/src/browser/input.rs +1 -1
- package/crates/mint-core/src/browser/interact.rs +98 -124
- package/crates/mint-core/src/browser/lifecycle.rs +75 -4
- package/crates/mint-core/src/browser/mod.rs +16 -2
- package/crates/mint-core/src/browser/navigate.rs +27 -19
- package/crates/mint-core/src/browser/observe.js +40 -0
- package/crates/mint-core/src/browser/session.rs +1558 -0
- package/crates/mint-core/src/git/branches.rs +348 -0
- package/crates/mint-core/src/git/checkpoint.rs +40 -0
- package/crates/mint-core/src/git/diff.rs +206 -0
- package/crates/mint-core/src/git/mod.rs +10 -2
- package/crates/mint-core/src/integrations/channels.rs +1 -0
- package/crates/mint-core/src/lib.rs +22 -14
- package/crates/mint-core/src/live_sync.rs +28 -9
- package/crates/mint-core/src/media/auto_shorts.rs +1 -0
- package/crates/mint-core/src/media/gemini_live.rs +12 -1
- package/crates/mint-core/src/media/mic_transcribe.rs +1 -0
- package/crates/mint-core/src/media/subtitle.rs +1 -0
- package/crates/mint-core/src/orchestration/context_render.rs +1 -0
- package/crates/mint-core/src/orchestration/memory_skill.rs +6 -1
- package/crates/mint-core/src/orchestration/mod.rs +1024 -271
- package/crates/mint-core/src/orchestration/tools/browser.rs +16 -139
- package/crates/mint-core/src/orchestration/tools/misc.rs +2 -1
- package/crates/mint-core/src/orchestration/tools/web.rs +1 -1
- package/crates/mint-core/src/prompts/agent.rs +58 -29
- package/crates/mint-core/src/prompts/chat.rs +1 -1
- package/crates/mint-core/src/prompts/persona.rs +1 -1
- package/crates/mint-core/src/prompts/tool_catalog.rs +93 -25
- package/crates/mint-core/src/search/linked_folders/index.rs +732 -0
- package/crates/mint-core/src/search/linked_folders.rs +391 -130
- package/crates/mint-core/src/slash/mod.rs +470 -22
- package/crates/mint-core/src/slash/model_fetcher.rs +12 -3
- package/crates/mint-core/src/slash/models.rs +66 -10
- package/crates/mint-core/src/system/config.rs +230 -0
- package/crates/mint-core/src/system/workspace.rs +228 -0
- package/crates/mint-core/src/system.rs +1 -0
- package/crates/mint-core/tests/memory_persistence.rs +39 -0
- package/mint-presentation-demo.mp4 +0 -0
- package/out/web/assets/CliSessionsView-BxUVWEEL.js +1 -0
- package/out/web/assets/CliSessionsView-CBDTXuQv.css +1 -0
- package/out/web/assets/CodeReviewPage-DkMgfcos.css +1 -0
- package/out/web/assets/CodeReviewPage-jKlmLJwT.js +3 -0
- package/out/web/assets/CommandPalette-DnwPA5hy.js +1 -0
- package/out/web/assets/ImageStudioPanel-BR1XFwhR.js +1 -0
- package/out/web/assets/ImageStudioPanel-D0lnhQV5.css +1 -0
- package/out/web/assets/LinkedFoldersView-bi-CWQ-I.js +1 -0
- package/out/web/assets/McpRegistryPicker-D5tEFnyq.js +1 -0
- package/out/web/assets/McpServersView-BGG1dhFM.js +1 -0
- package/out/web/assets/MintDashboard-BIglDEWX.js +20 -0
- package/out/web/assets/MintDashboard-DSMywSgs.css +1 -0
- package/out/web/assets/ModelPanel-CbJ1PFoZ.js +1 -0
- package/out/web/assets/PicturesLibrary-CQP0fLP1.css +1 -0
- package/out/web/assets/PicturesLibrary-DoYN7T1p.js +1 -0
- package/out/web/assets/PluginsView-CU1HWXGk.js +1 -0
- package/out/web/assets/ScheduledTasksView-Bnl36y2N.js +1 -0
- package/out/web/assets/SettingsWindow-DhWLAn9T.css +1 -0
- package/out/web/assets/SettingsWindow-Dw8L01pw.js +2 -0
- package/out/web/assets/SkillsView-cnl8aY5p.js +2 -0
- package/out/web/assets/ToolSurfacePage-CgsQw6l5.css +1 -0
- package/out/web/assets/ToolSurfacePage-Cz2VJAPZ.js +37 -0
- package/out/web/assets/VeoStudioPanel-D4JnERWR.js +4 -0
- package/out/web/assets/VeoStudioPanel-DOj7_WR3.css +1 -0
- package/out/web/assets/WorkspacePanel-CbJ1PFoZ.js +1 -0
- package/out/web/assets/{abnfDiagram-VCTEODGH-DAOBA7ZG.js → abnfDiagram-VCTEODGH-ByMyfanq.js} +1 -1
- package/out/web/assets/{architecture-7GRP2DOG-CgSwQOPQ.js → architecture-7GRP2DOG-CLq2kEOB.js} +1 -1
- package/out/web/assets/{architectureDiagram-5GKGNRK7-CYp3yupP.js → architectureDiagram-5GKGNRK7-6PoVSmNG.js} +1 -1
- package/out/web/assets/{blockDiagram-NRAW4CY4-CyWybDWr.js → blockDiagram-NRAW4CY4-cKw9mAKi.js} +1 -1
- package/out/web/assets/{c4Diagram-UCG6FXSJ-BvY3U709.js → c4Diagram-UCG6FXSJ-Cqy8N5Ge.js} +1 -1
- package/out/web/assets/{chunk-75Z2AOVW-TLXCoZYv.js → chunk-75Z2AOVW-3qybijF5.js} +1 -1
- package/out/web/assets/chunk-CKBBP62Z-cIrXq6jN.js +2 -0
- package/out/web/assets/{chunk-CLGD4ZFX-xjsKtNS7.js → chunk-CLGD4ZFX-CndDQkww.js} +1 -1
- package/out/web/assets/chunk-DSNCTWBM-Cc4NxvgD.js +2 -0
- package/out/web/assets/chunk-DU6HZSFF-drzh6GsU.js +128 -0
- package/out/web/assets/{chunk-F27PBJKO-BFpgF55A.js → chunk-F27PBJKO-FiY35l4v.js} +1 -1
- package/out/web/assets/{chunk-G27WJ6UU-DfF7qW-C.js → chunk-G27WJ6UU-Bjt9Il4A.js} +1 -1
- package/out/web/assets/{chunk-GMAD6QVW-C-558kh_.js → chunk-GMAD6QVW-Bppi3Ctd.js} +1 -1
- package/out/web/assets/{chunk-JQ64N6SF-wJmeGKAw.js → chunk-JQ64N6SF-DGg5kcEV.js} +1 -1
- package/out/web/assets/{chunk-LCL6LL3I-C1wHD8Ie.js → chunk-LCL6LL3I-CCYcjd7p.js} +1 -1
- package/out/web/assets/{chunk-OBVCFTLP-BsRTPBqs.js → chunk-OBVCFTLP-DJeNil5M.js} +1 -1
- package/out/web/assets/{chunk-P2QGCYS3-HZIiM7Ni.js → chunk-P2QGCYS3-lRzkRjBB.js} +1 -1
- package/out/web/assets/{chunk-POPQ4Y6H-Dk9wvVb0.js → chunk-POPQ4Y6H-DouASMBW.js} +1 -1
- package/out/web/assets/{chunk-PWAF6VOD-BmjYLNbq.js → chunk-PWAF6VOD-DMmD1vVf.js} +1 -1
- package/out/web/assets/{chunk-R7TYR2AO-CaHIf-lK.js → chunk-R7TYR2AO-CYLA5UC5.js} +1 -1
- package/out/web/assets/{chunk-RHFEMEQ7-_T561hOU.js → chunk-RHFEMEQ7-BiXwEcUT.js} +1 -1
- package/out/web/assets/{chunk-SVP7TREG-CM-GGYoY.js → chunk-SVP7TREG-BV-zPslF.js} +1 -1
- package/out/web/assets/{chunk-TEH6E4GO-K2A8Vg2C.js → chunk-TEH6E4GO-B2RGEohZ.js} +1 -1
- package/out/web/assets/classDiagram-DTDB5LWJ-Dq0smRWk.js +1 -0
- package/out/web/assets/classDiagram-v2-JRS7N3AN-Dq0smRWk.js +1 -0
- package/out/web/assets/config-C-ZFtipU.css +1 -0
- package/out/web/assets/config-eEDngJXO.js +1 -0
- package/out/web/assets/core-hQ2VA9Ti.js +1 -0
- package/out/web/assets/{cynefin-OW5HDTMX-ClzaB6cc.js → cynefin-OW5HDTMX-Cas4csHM.js} +1 -1
- package/out/web/assets/{cynefinDiagram-5FMLGOSQ-D_JzZBzf.js → cynefinDiagram-5FMLGOSQ-Bbpj66Y3.js} +1 -1
- package/out/web/assets/{dagre-3AP2YEHR-BDuUeMHj.js → dagre-3AP2YEHR-B0-2RDEd.js} +1 -1
- package/out/web/assets/{diagram-S7CK7UJ4-DgtcfE8P.js → diagram-S7CK7UJ4-BdzEjUyH.js} +1 -1
- package/out/web/assets/{diagram-UQ7AKVKN-DTLoEYti.js → diagram-UQ7AKVKN-CJDwyPxF.js} +1 -1
- package/out/web/assets/{diagram-VSXAHHWV-ChGl9pXz.js → diagram-VSXAHHWV-BxaG1r_B.js} +1 -1
- package/out/web/assets/{diagram-VX7I27RA-Be8DWz0S.js → diagram-VX7I27RA-BMmUqm8f.js} +1 -1
- package/out/web/assets/{diagram-Z3DM3KII-BMXjRTOF.js → diagram-Z3DM3KII-CFtd03eE.js} +1 -1
- package/out/web/assets/dist-js-Bf2bhoku.js +1 -0
- package/out/web/assets/{ebnfDiagram-PWID7BFC-8Q9pl1CJ.js → ebnfDiagram-PWID7BFC-DwAen1hO.js} +1 -1
- package/out/web/assets/{erDiagram-SSCWMZ5O-DjH8Lnkn.js → erDiagram-SSCWMZ5O-BCZSHACj.js} +1 -1
- package/out/web/assets/event-ChBVpRy0.js +1 -0
- package/out/web/assets/{eventmodeling-NTZA5JFV-BKUH_DOp.js → eventmodeling-NTZA5JFV-XHStE4E_.js} +1 -1
- package/out/web/assets/fira-code-latin-600-normal-BmSSHshu.woff +0 -0
- package/out/web/assets/fira-code-latin-600-normal-CvYZpPHg.woff2 +0 -0
- package/out/web/assets/fira-code-symbols2-600-normal-Dvq6IQE5.woff +0 -0
- package/out/web/assets/flowDiagram-A5DVABFB-BLg7nEcd.js +1 -0
- package/out/web/assets/{ganttDiagram-EL5Y4UJY-D7fZKJNM.js → ganttDiagram-EL5Y4UJY-BAEu1Cql.js} +1 -1
- package/out/web/assets/{gitGraph-4MIJSDKK-BypWaaBU.js → gitGraph-4MIJSDKK-r32Vyper.js} +1 -1
- package/out/web/assets/{gitGraphDiagram-WWUBYQGX-DWiw_3bq.js → gitGraphDiagram-WWUBYQGX-z9o9qt6V.js} +1 -1
- package/out/web/assets/index-Btsf4L8M.css +1 -0
- package/out/web/assets/index-D8D9MeRA.js +11 -0
- package/out/web/assets/{info-A6RAGUB7-KkAUxT4j.js → info-A6RAGUB7-BvLaC2cw.js} +1 -1
- package/out/web/assets/{infoDiagram-RXCK75RN-BNb6E48y.js → infoDiagram-RXCK75RN-Be6WAXXw.js} +1 -1
- package/out/web/assets/{ishikawaDiagram-5VMMS53U-Caa-JoAK.js → ishikawaDiagram-5VMMS53U-DZjoHJHC.js} +1 -1
- package/out/web/assets/{journeyDiagram-EYS64GPL-DOrmFGz6.js → journeyDiagram-EYS64GPL-CtVkjkGm.js} +1 -1
- package/out/web/assets/{kanban-definition-3QL26DDD-BOWCYcK0.js → kanban-definition-3QL26DDD-CW5FMv1w.js} +1 -1
- package/out/web/assets/lucide-react-Ip3L6Jtn.js +1 -0
- package/out/web/assets/markdown-BSeeUbJH.js +38 -0
- package/out/web/assets/{mermaid-parser.core-BQqjCkS_.js → mermaid-parser.core-aUgCqsZ5.js} +3 -3
- package/out/web/assets/mermaid.core-D57sEiSL.js +11 -0
- package/out/web/assets/{mindmap-definition-FBJOCRG2-jTceWpr0.js → mindmap-definition-FBJOCRG2-DAmSpM3a.js} +1 -1
- package/out/web/assets/modelManager-tMVmJVAW.js +2 -0
- package/out/web/assets/oauthManager-9jxicDWJ.js +1 -0
- package/out/web/assets/{packet-AYTQ26CC-CJ5RXgol.js → packet-AYTQ26CC-DJ27iIoJ.js} +1 -1
- package/out/web/assets/{pegDiagram-XKGWAZYB-y8wMtd0y.js → pegDiagram-XKGWAZYB-Bj3ii-gS.js} +1 -1
- package/out/web/assets/{pie-WAS4IAKB-72fTBbl4.js → pie-WAS4IAKB-DG5mCUbc.js} +1 -1
- package/out/web/assets/{pieDiagram-E7YTZNPT-e0O02qWq.js → pieDiagram-E7YTZNPT-BrJLPnDA.js} +1 -1
- package/out/web/assets/prompt-latin-700-normal-BfbftDSq.woff +0 -0
- package/out/web/assets/prompt-latin-700-normal-I2gc831J.woff2 +0 -0
- package/out/web/assets/prompt-thai-700-normal-Cb5ilR-c.woff +0 -0
- package/out/web/assets/prompt-thai-700-normal-Cg4aQ0Nn.woff2 +0 -0
- package/out/web/assets/{quadrantDiagram-AXDQQJYC-C9phYLom.js → quadrantDiagram-AXDQQJYC-3x_TmF3j.js} +1 -1
- package/out/web/assets/{radar-RG4KPBEZ-BAU2hzUT.js → radar-RG4KPBEZ-CrXaTTuV.js} +1 -1
- package/out/web/assets/{railroad-74A4TZTK-B0bCAVHC.js → railroad-74A4TZTK-BpqMH9BE.js} +1 -1
- package/out/web/assets/{railroad-abnf-HS5TGJTU-WhxO7ndE.js → railroad-abnf-HS5TGJTU-DHI0uLlV.js} +1 -1
- package/out/web/assets/{railroad-ebnf-LZEXJU2U-BkA0m7-F.js → railroad-ebnf-LZEXJU2U-CQCb316y.js} +1 -1
- package/out/web/assets/{railroad-peg-WCYAUIDC-BsVpHIaj.js → railroad-peg-WCYAUIDC-Ph1giKkH.js} +1 -1
- package/out/web/assets/{railroadDiagram-O6MQD6OU-CyOLN65Q.js → railroadDiagram-O6MQD6OU-BRq6wIxx.js} +1 -1
- package/out/web/assets/{requirementDiagram-EFPCY7ZU-DQXJ7Dud.js → requirementDiagram-EFPCY7ZU-DIJj6G1g.js} +1 -1
- package/out/web/assets/{sankeyDiagram-P5KCCOFB-B2XLyIIc.js → sankeyDiagram-P5KCCOFB-DZajSryq.js} +1 -1
- package/out/web/assets/{sequenceDiagram-WJ2MYXX4-DGQY4wwm.js → sequenceDiagram-WJ2MYXX4-DxJCWyZS.js} +1 -1
- package/out/web/assets/{stateDiagram-HBIQ2CUA-DHZpDwNy.js → stateDiagram-HBIQ2CUA-k6voi8Vf.js} +1 -1
- package/out/web/assets/stateDiagram-v2-4QOOHH4V-DeEc0lGZ.js +1 -0
- package/out/web/assets/studio-B1mk40wD.js +1 -0
- package/out/web/assets/{swimlanes-XN3QIQJK-Bn_jcZz-.js → swimlanes-XN3QIQJK-igYhTjXB.js} +1 -1
- package/out/web/assets/swimlanesDiagram-VK2B7HYN-DpVik9v7.js +8 -0
- package/out/web/assets/{timeline-definition-24CTP7MA-CdTERuJZ.js → timeline-definition-24CTP7MA-Dke2p93p.js} +1 -1
- package/out/web/assets/{treeView-Q6P3EWNA-TKBKQG6R.js → treeView-Q6P3EWNA-hNELnXUs.js} +1 -1
- package/out/web/assets/{treemap-WGGIJYW6-BP7gQoiC.js → treemap-WGGIJYW6-D2B6wDsx.js} +1 -1
- package/out/web/assets/{vennDiagram-4TSXK5OY-BHUmxDuK.js → vennDiagram-4TSXK5OY-CDkW7rUP.js} +1 -1
- package/out/web/assets/{wardley-WFR3VGLG-9bct5AAN.js → wardley-WFR3VGLG-BECdXETi.js} +1 -1
- package/out/web/assets/{wardleyDiagram-VM6X3IG4-BfJwDDso.js → wardleyDiagram-VM6X3IG4-B5BycpQ4.js} +1 -1
- package/out/web/assets/window-5qYXKoW7.js +1 -0
- package/out/web/assets/{xychartDiagram-S5SC5T6Z-Dqd9Mvpo.js → xychartDiagram-S5SC5T6Z-CtJS3b--.js} +1 -1
- package/out/web/index-web.html +3 -4
- package/out/web/index.html +3 -4
- package/package.json +17 -6
- package/skills-lock.json +36 -0
- package/slash-commands.json +9 -0
- package/src/renderer/index-web.html +1 -0
- package/src/renderer/index.html +1 -0
- package/src/renderer/node_modules/.vite/vitest/da39a3ee5e6b4b0d3255bfef95601890afd80709/results.json +1 -0
- package/src/renderer/shared/agentProgress.ts +168 -3
- package/src/renderer/shared/components/AgentActivityDrawer.tsx +6 -6
- package/src/renderer/shared/components/AgentActivityTable.tsx +192 -132
- package/src/renderer/shared/components/ArtifactPreviewPanel.tsx +4 -4
- package/src/renderer/shared/components/AuthGate.tsx +4 -9
- package/src/renderer/shared/components/CalculationCard.tsx +41 -15
- package/src/renderer/shared/components/ChatMessageItem.tsx +20 -21
- package/src/renderer/shared/components/ChatPanel.tsx +432 -193
- package/src/renderer/shared/components/ChunkErrorBoundary.tsx +198 -49
- package/src/renderer/shared/components/CliSessionsView.tsx +495 -0
- package/src/renderer/shared/components/CodeReviewPage.tsx +565 -0
- package/src/renderer/shared/components/CommandPalette.tsx +8 -8
- package/src/renderer/shared/components/DashboardSidebar.tsx +862 -125
- package/src/renderer/shared/components/DesktopTitlebar.tsx +345 -0
- package/src/renderer/shared/components/DiffReviewModal.tsx +3 -3
- package/src/renderer/shared/components/GitBranchSelector.tsx +442 -0
- package/src/renderer/shared/components/ImageGenCard.tsx +31 -12
- package/src/renderer/shared/components/ImageSearchCard.tsx +59 -38
- package/src/renderer/shared/components/ImageStudioPanel.tsx +40 -41
- package/src/renderer/shared/components/InlineThoughtNote.tsx +27 -0
- package/src/renderer/shared/components/LinkedFoldersView.tsx +365 -46
- package/src/renderer/shared/components/McpRegistryPicker.tsx +1 -1
- package/src/renderer/shared/components/McpServersView.tsx +24 -22
- package/src/renderer/shared/components/MermaidCard.tsx +14 -8
- package/src/renderer/shared/components/MintDashboard.tsx +1141 -508
- package/src/renderer/shared/components/ModelSelectorPopover.tsx +535 -214
- package/src/renderer/shared/components/PlanChecklistWidget.tsx +1 -1
- package/src/renderer/shared/components/PluginsView.tsx +1 -1
- package/src/renderer/shared/components/RewindModal.tsx +6 -6
- package/src/renderer/shared/components/RunSummaryDashboard.tsx +3 -3
- package/src/renderer/shared/components/ScheduledTasksView.tsx +4 -4
- package/src/renderer/shared/components/ScreenCaptureDialog.css +221 -0
- package/src/renderer/shared/components/ScreenCaptureDialog.tsx +199 -0
- package/src/renderer/shared/components/Settings/AgentsTab.tsx +34 -39
- package/src/renderer/shared/components/Settings/AudioTab.tsx +8 -8
- package/src/renderer/shared/components/Settings/AutomationTab.tsx +8 -58
- package/src/renderer/shared/components/Settings/AvatarCropModal.tsx +368 -0
- package/src/renderer/shared/components/Settings/GeneralTab.tsx +335 -81
- package/src/renderer/shared/components/Settings/MemoryTab.tsx +3 -3
- package/src/renderer/shared/components/Settings/PluginsTab.tsx +20 -12
- package/src/renderer/shared/components/Settings/ProfileTab.tsx +29 -5
- package/src/renderer/shared/components/Settings/SearchableModelCombobox.tsx +411 -0
- package/src/renderer/shared/components/Settings/ThemeTab.tsx +401 -158
- package/src/renderer/shared/components/SkillsView.tsx +41 -16
- package/src/renderer/shared/components/SlashSuggestions.tsx +3 -2
- package/src/renderer/shared/components/SourcesBlock.tsx +44 -32
- package/src/renderer/shared/components/StockCard.tsx +58 -24
- package/src/renderer/shared/components/SubagentDagView.tsx +4 -4
- package/src/renderer/shared/components/TerminalDock.tsx +241 -0
- package/src/renderer/shared/components/ThinkingBlock.tsx +14 -8
- package/src/renderer/shared/components/ToolSurfacePage.tsx +520 -0
- package/src/renderer/shared/components/UiFeatureCard.tsx +267 -0
- package/src/renderer/shared/components/UiGridCard.tsx +188 -0
- package/src/renderer/shared/components/UiMockupWidget.tsx +149 -0
- package/src/renderer/shared/components/VeoStudioPanel.tsx +13 -29
- package/src/renderer/shared/components/WeatherCard.tsx +3 -3
- package/src/renderer/shared/components/WorkspaceContextPopover.tsx +133 -0
- package/src/renderer/shared/components/WorkspaceSelector.tsx +149 -0
- package/src/renderer/shared/constants/config.ts +28 -3
- package/src/renderer/shared/constants/models.ts +189 -2
- package/src/renderer/shared/conversation/coordinator.test.ts +27 -0
- package/src/renderer/shared/conversation/coordinator.ts +82 -0
- package/src/renderer/shared/conversation/syncView.test.ts +46 -0
- package/src/renderer/shared/conversation/syncView.ts +43 -0
- package/src/renderer/shared/conversation/useConversationCoordinator.ts +106 -0
- package/src/renderer/shared/css/agent-observability.css +35 -3
- package/src/renderer/shared/css/auth-gate.css +2 -2
- package/src/renderer/shared/css/chat-ui-cards.css +495 -0
- package/src/renderer/shared/css/code-review.css +823 -0
- package/src/renderer/shared/css/code-sessions.css +452 -0
- package/src/renderer/shared/css/file-changes.css +132 -0
- package/src/renderer/shared/css/image-studio.css +16 -16
- package/src/renderer/shared/css/management-views.css +277 -27
- package/src/renderer/shared/css/model-selector.css +442 -42
- package/src/renderer/shared/css/settings/agents.css +1 -1
- package/src/renderer/shared/css/settings/automation.css +13 -13
- package/src/renderer/shared/css/settings/general.css +526 -5
- package/src/renderer/shared/css/settings/plugins.css +5 -5
- package/src/renderer/shared/css/settings/profile.css +331 -1
- package/src/renderer/shared/css/settings/theme.css +651 -3
- package/src/renderer/shared/css/veo-studio.css +16 -15
- package/src/renderer/shared/fonts.ts +19 -37
- package/src/renderer/shared/platform.test.ts +34 -0
- package/src/renderer/shared/platform.ts +173 -6
- package/src/renderer/shared/theme/themeManager.ts +144 -0
- package/src/renderer/shared/theme/themes.ts +116 -0
- package/src/renderer/shared/theme/tokens.css +318 -0
- package/src/renderer/shared/types.ts +82 -1
- package/src/renderer/shared/utils/agentActivity.ts +126 -5
- package/src/renderer/shared/utils/cardJson.test.ts +35 -0
- package/src/renderer/shared/utils/cardJson.ts +30 -0
- package/src/renderer/shared/utils/fileIcons.ts +1 -1
- package/src/renderer/shared/utils/markdown.tsx +329 -80
- package/src/renderer/shared/utils/markdown.webImages.test.tsx +40 -0
- package/src/renderer/shared/utils/providers.ts +8 -3
- package/src/renderer/shared/utils/screenCapture.ts +43 -0
- package/src/renderer/shared/utils/slashCommandProcessor.ts +4 -1
- package/src/renderer/shared/utils/ui.ts +4 -64
- package/src/renderer/src/App.tsx +7 -0
- package/src/renderer/src/components/BrowserShell.tsx +108 -0
- package/src/renderer/src/components/BrowserSuggestionsPopup.tsx +91 -0
- package/src/renderer/src/components/Live2DStage.tsx +32 -9
- package/src/renderer/src/components/MintDashboard.tsx +4 -2
- package/src/renderer/src/components/ModelPanel.tsx +2 -1
- package/src/renderer/src/components/PicturesLibrary.tsx +3 -2
- package/src/renderer/src/components/ScreenPicker.css +190 -0
- package/src/renderer/src/components/ScreenPicker.tsx +185 -540
- package/src/renderer/src/components/SettingsWindow.tsx +40 -2
- package/src/renderer/src/components/SpotlightWindow.tsx +1 -0
- package/src/renderer/src/components/WidgetWindow.tsx +27 -3
- package/src/renderer/src/components/WorkspacePanel.tsx +61 -43
- package/src/renderer/src/components/browser-shell.css +185 -0
- package/src/renderer/src/components/browser-suggestions-popup.css +55 -0
- package/src/renderer/src/components/liveTranslateFrames.test.ts +23 -0
- package/src/renderer/src/components/liveTranslateFrames.ts +34 -0
- package/src/renderer/src/css/app-shell.css +394 -113
- package/src/renderer/src/css/chat.css +1926 -380
- package/src/renderer/src/css/dashboard.css +11 -0
- package/src/renderer/src/css/desktop-tools.css +730 -0
- package/src/renderer/src/css/misc.css +19 -22
- package/src/renderer/src/css/model.css +49 -48
- package/src/renderer/src/css/pictures.css +144 -136
- package/src/renderer/src/css/settings/base.css +357 -123
- package/src/renderer/src/css/sidebar-workspace.css +930 -291
- package/src/renderer/src/css/spotlight.css +15 -26
- package/src/renderer/src/css/tool-surfaces.css +728 -0
- package/src/renderer/src/css/widget.css +35 -7
- package/src/renderer/src/env.d.ts +3 -0
- package/src/renderer/src/hooks/useProviderModels.ts +2 -9
- package/src/renderer/src/index.css +53 -46
- package/src/renderer/src/main.tsx +11 -0
- package/src/renderer/src/tauri.ts +201 -30
- package/src/renderer/src-web/App.tsx +40 -0
- package/src/renderer/src-web/components/MintDashboard.tsx +4 -2
- package/src/renderer/src-web/components/PicturesLibrary.tsx +3 -2
- package/src/renderer/src-web/components/PullToRefresh.tsx +107 -0
- package/src/renderer/src-web/components/SettingsWindow.tsx +28 -2
- package/src/renderer/src-web/css/app-shell.css +174 -96
- package/src/renderer/src-web/css/chat.css +1519 -316
- package/src/renderer/src-web/css/dashboard.css +11 -0
- package/src/renderer/src-web/css/misc.css +17 -17
- package/src/renderer/src-web/css/mobile.css +678 -0
- package/src/renderer/src-web/css/model.css +46 -46
- package/src/renderer/src-web/css/pictures.css +81 -34
- package/src/renderer/src-web/css/pull-to-refresh.css +54 -0
- package/src/renderer/src-web/css/settings/base.css +316 -100
- package/src/renderer/src-web/css/settings/mobile.css +320 -0
- package/src/renderer/src-web/css/sidebar-workspace.css +545 -100
- package/src/renderer/src-web/css/spotlight.css +9 -26
- package/src/renderer/src-web/css/widget.css +0 -5
- package/src/renderer/src-web/env.d.ts +3 -0
- package/src/renderer/src-web/hooks/useProviderModels.ts +2 -9
- package/src/renderer/src-web/index.css +53 -96
- package/src/renderer/src-web/main.tsx +11 -0
- package/src/renderer/src-web/tauri.ts +200 -30
- package/vite.config.web.ts +1 -0
- package/out/web/assets/MintDashboard-DWSqucgb.js +0 -57
- package/out/web/assets/SettingsWindow-DFM2aj5B.js +0 -2
- package/out/web/assets/chunk-CKBBP62Z-nr1uKPj9.js +0 -2
- package/out/web/assets/chunk-DSNCTWBM-Dtj8Rqsd.js +0 -2
- package/out/web/assets/chunk-DU6HZSFF-2tv5K1wT.js +0 -128
- package/out/web/assets/classDiagram-DTDB5LWJ-BdSFArgw.js +0 -1
- package/out/web/assets/classDiagram-v2-JRS7N3AN-BdSFArgw.js +0 -1
- package/out/web/assets/core-DImejIUG.js +0 -1
- package/out/web/assets/dist-js-BxuKEVWM.js +0 -1
- package/out/web/assets/event-BNl8Zahw.js +0 -1
- package/out/web/assets/fira-code-cyrillic-400-normal-UC0NFL4U.woff2 +0 -0
- package/out/web/assets/fira-code-cyrillic-400-normal-dc1q3VD7.woff +0 -0
- package/out/web/assets/fira-code-cyrillic-500-normal-Bu7VCL72.woff +0 -0
- package/out/web/assets/fira-code-cyrillic-500-normal-CX35h3Mg.woff2 +0 -0
- package/out/web/assets/fira-code-cyrillic-ext-400-normal-Buh61xzB.woff +0 -0
- package/out/web/assets/fira-code-cyrillic-ext-400-normal-txZ9Fk_1.woff2 +0 -0
- package/out/web/assets/fira-code-cyrillic-ext-500-normal-CYRspHgm.woff2 +0 -0
- package/out/web/assets/fira-code-cyrillic-ext-500-normal-CwtLmSFD.woff +0 -0
- package/out/web/assets/fira-code-greek-400-normal-B2Gh_Y8s.woff2 +0 -0
- package/out/web/assets/fira-code-greek-400-normal-DobhaxvF.woff +0 -0
- package/out/web/assets/fira-code-greek-500-normal-CVO0IRNt.woff2 +0 -0
- package/out/web/assets/fira-code-greek-500-normal-DEXIWiey.woff +0 -0
- package/out/web/assets/fira-code-greek-ext-400-normal-DR7mBgIM.woff2 +0 -0
- package/out/web/assets/fira-code-greek-ext-400-normal-DSPUheWg.woff +0 -0
- package/out/web/assets/fira-code-greek-ext-500-normal-BO3iq16n.woff2 +0 -0
- package/out/web/assets/fira-code-greek-ext-500-normal-CMiNLXER.woff +0 -0
- package/out/web/assets/fira-code-latin-ext-400-normal-DG73JjOf.woff +0 -0
- package/out/web/assets/fira-code-latin-ext-400-normal-KSMg0QLl.woff2 +0 -0
- package/out/web/assets/fira-code-latin-ext-500-normal-CaANqXjI.woff +0 -0
- package/out/web/assets/fira-code-latin-ext-500-normal-Crd9e_oI.woff2 +0 -0
- package/out/web/assets/flowDiagram-A5DVABFB-BpnHUSU7.js +0 -1
- package/out/web/assets/index-CVRg270z.css +0 -1
- package/out/web/assets/index-DxZQr9yD.js +0 -10
- package/out/web/assets/inter-cyrillic-400-normal-HOLc17fK.woff +0 -0
- package/out/web/assets/inter-cyrillic-400-normal-obahsSVq.woff2 +0 -0
- package/out/web/assets/inter-cyrillic-500-normal-BasfLYem.woff2 +0 -0
- package/out/web/assets/inter-cyrillic-500-normal-CxZf_p3X.woff +0 -0
- package/out/web/assets/inter-cyrillic-600-normal-4D_pXhcN.woff +0 -0
- package/out/web/assets/inter-cyrillic-600-normal-CWCymEST.woff2 +0 -0
- package/out/web/assets/inter-cyrillic-ext-400-normal-BQZuk6qB.woff2 +0 -0
- package/out/web/assets/inter-cyrillic-ext-400-normal-DQukG94-.woff +0 -0
- package/out/web/assets/inter-cyrillic-ext-500-normal-B0yAr1jD.woff2 +0 -0
- package/out/web/assets/inter-cyrillic-ext-500-normal-BmqWE9Dz.woff +0 -0
- package/out/web/assets/inter-cyrillic-ext-600-normal-Bcila6Z-.woff +0 -0
- package/out/web/assets/inter-cyrillic-ext-600-normal-Dfes3d0z.woff2 +0 -0
- package/out/web/assets/inter-greek-400-normal-B4URO6DV.woff2 +0 -0
- package/out/web/assets/inter-greek-400-normal-q2sYcFCs.woff +0 -0
- package/out/web/assets/inter-greek-500-normal-BIZE56-Y.woff2 +0 -0
- package/out/web/assets/inter-greek-500-normal-Xzm54t5V.woff +0 -0
- package/out/web/assets/inter-greek-600-normal-BZpKdvQh.woff +0 -0
- package/out/web/assets/inter-greek-600-normal-plRanbMR.woff2 +0 -0
- package/out/web/assets/inter-greek-ext-400-normal-DGGRlc-M.woff2 +0 -0
- package/out/web/assets/inter-greek-ext-400-normal-KugGGMne.woff +0 -0
- package/out/web/assets/inter-greek-ext-500-normal-2j5mBUwD.woff +0 -0
- package/out/web/assets/inter-greek-ext-500-normal-C4iEst2y.woff2 +0 -0
- package/out/web/assets/inter-greek-ext-600-normal-B8X0CLgF.woff +0 -0
- package/out/web/assets/inter-greek-ext-600-normal-DRtmH8MT.woff2 +0 -0
- package/out/web/assets/inter-latin-400-normal-C38fXH4l.woff2 +0 -0
- package/out/web/assets/inter-latin-400-normal-CyCys3Eg.woff +0 -0
- package/out/web/assets/inter-latin-500-normal-BL9OpVg8.woff +0 -0
- package/out/web/assets/inter-latin-500-normal-Cerq10X2.woff2 +0 -0
- package/out/web/assets/inter-latin-600-normal-CiBQ2DWP.woff +0 -0
- package/out/web/assets/inter-latin-600-normal-LgqL8muc.woff2 +0 -0
- package/out/web/assets/inter-latin-ext-400-normal-77YHD8bZ.woff +0 -0
- package/out/web/assets/inter-latin-ext-400-normal-C1nco2VV.woff2 +0 -0
- package/out/web/assets/inter-latin-ext-500-normal-BxGbmqWO.woff +0 -0
- package/out/web/assets/inter-latin-ext-500-normal-CV4jyFjo.woff2 +0 -0
- package/out/web/assets/inter-latin-ext-600-normal-CIVaiw4L.woff +0 -0
- package/out/web/assets/inter-latin-ext-600-normal-D2bJ5OIk.woff2 +0 -0
- package/out/web/assets/inter-vietnamese-400-normal-Bbgyi5SW.woff +0 -0
- package/out/web/assets/inter-vietnamese-400-normal-DMkecbls.woff2 +0 -0
- package/out/web/assets/inter-vietnamese-500-normal-DOriooB6.woff2 +0 -0
- package/out/web/assets/inter-vietnamese-500-normal-mJboJaSs.woff +0 -0
- package/out/web/assets/inter-vietnamese-600-normal-BuLX-rYi.woff +0 -0
- package/out/web/assets/inter-vietnamese-600-normal-Cc8MFFhd.woff2 +0 -0
- package/out/web/assets/kanit-latin-400-normal-BUlsQXH3.woff2 +0 -0
- package/out/web/assets/kanit-latin-400-normal-HVZWrfev.woff +0 -0
- package/out/web/assets/kanit-latin-500-normal-CX_4XcKi.woff2 +0 -0
- package/out/web/assets/kanit-latin-500-normal-qBha86O4.woff +0 -0
- package/out/web/assets/kanit-latin-600-normal-0lS78yAd.woff2 +0 -0
- package/out/web/assets/kanit-latin-600-normal-DlacpeTg.woff +0 -0
- package/out/web/assets/kanit-latin-ext-400-normal-B2xPf58u.woff2 +0 -0
- package/out/web/assets/kanit-latin-ext-400-normal-CHvNKHHD.woff +0 -0
- package/out/web/assets/kanit-latin-ext-500-normal-BFdWrG22.woff +0 -0
- package/out/web/assets/kanit-latin-ext-500-normal-EHs3suD6.woff2 +0 -0
- package/out/web/assets/kanit-latin-ext-600-normal-BBDzoLaj.woff +0 -0
- package/out/web/assets/kanit-latin-ext-600-normal-DAX3wtuq.woff2 +0 -0
- package/out/web/assets/kanit-thai-400-normal-D2nliXKa.woff +0 -0
- package/out/web/assets/kanit-thai-400-normal-D80Pglro.woff2 +0 -0
- package/out/web/assets/kanit-thai-500-normal-BB8gri04.woff2 +0 -0
- package/out/web/assets/kanit-thai-500-normal-Iy_w0a80.woff +0 -0
- package/out/web/assets/kanit-thai-600-normal-Bj6oiaDc.woff2 +0 -0
- package/out/web/assets/kanit-thai-600-normal-wbTlPO7I.woff +0 -0
- package/out/web/assets/kanit-vietnamese-400-normal-DRI8YWyb.woff2 +0 -0
- package/out/web/assets/kanit-vietnamese-400-normal-dow6Bnto.woff +0 -0
- package/out/web/assets/kanit-vietnamese-500-normal-BzTrpCM3.woff2 +0 -0
- package/out/web/assets/kanit-vietnamese-500-normal-T1ndT7MF.woff +0 -0
- package/out/web/assets/kanit-vietnamese-600-normal-Bi7fw3I4.woff2 +0 -0
- package/out/web/assets/kanit-vietnamese-600-normal-DXCRAa_8.woff +0 -0
- package/out/web/assets/mali-latin-400-normal-ByPcZ8Gx.woff +0 -0
- package/out/web/assets/mali-latin-400-normal-Cuc6Ykl8.woff2 +0 -0
- package/out/web/assets/mali-latin-500-normal-B01M-LP6.woff2 +0 -0
- package/out/web/assets/mali-latin-500-normal-Thgqw_9f.woff +0 -0
- package/out/web/assets/mali-latin-600-normal-B9TiUNpT.woff2 +0 -0
- package/out/web/assets/mali-latin-600-normal-CycpQCwU.woff +0 -0
- package/out/web/assets/mali-latin-ext-400-normal-DUVdJQO4.woff +0 -0
- package/out/web/assets/mali-latin-ext-400-normal-iCG1ALuJ.woff2 +0 -0
- package/out/web/assets/mali-latin-ext-500-normal-BfJE4UMZ.woff2 +0 -0
- package/out/web/assets/mali-latin-ext-500-normal-FoLEyOKS.woff +0 -0
- package/out/web/assets/mali-latin-ext-600-normal-BTvIfiCp.woff2 +0 -0
- package/out/web/assets/mali-latin-ext-600-normal-DAQcLVmD.woff +0 -0
- package/out/web/assets/mali-thai-400-normal-BO7A3bLZ.woff2 +0 -0
- package/out/web/assets/mali-thai-400-normal-CX9VrjTn.woff +0 -0
- package/out/web/assets/mali-thai-500-normal-Cph2qha9.woff +0 -0
- package/out/web/assets/mali-thai-500-normal-D89rMT77.woff2 +0 -0
- package/out/web/assets/mali-thai-600-normal-DPgXT6rZ.woff +0 -0
- package/out/web/assets/mali-thai-600-normal-DlTx3OsB.woff2 +0 -0
- package/out/web/assets/mali-vietnamese-400-normal-DUKxzXaz.woff2 +0 -0
- package/out/web/assets/mali-vietnamese-400-normal-gFDLvsOK.woff +0 -0
- package/out/web/assets/mali-vietnamese-500-normal--OY07q2c.woff +0 -0
- package/out/web/assets/mali-vietnamese-500-normal-KDrNRwfW.woff2 +0 -0
- package/out/web/assets/mali-vietnamese-600-normal-CtTMUU7T.woff +0 -0
- package/out/web/assets/mali-vietnamese-600-normal-DFlJr66u.woff2 +0 -0
- package/out/web/assets/mermaid.core-DYGGlqOf.js +0 -11
- package/out/web/assets/mitr-latin-400-normal-Cb18vPmZ.woff +0 -0
- package/out/web/assets/mitr-latin-400-normal-CwbkLQ4a.woff2 +0 -0
- package/out/web/assets/mitr-latin-500-normal-B4JOhzAi.woff +0 -0
- package/out/web/assets/mitr-latin-500-normal-BmClOow2.woff2 +0 -0
- package/out/web/assets/mitr-latin-ext-400-normal-B3CPG7Yo.woff2 +0 -0
- package/out/web/assets/mitr-latin-ext-400-normal-DTx65hiC.woff +0 -0
- package/out/web/assets/mitr-latin-ext-500-normal-B_Diajz1.woff2 +0 -0
- package/out/web/assets/mitr-latin-ext-500-normal-DYOsVaVT.woff +0 -0
- package/out/web/assets/mitr-thai-400-normal-CS4Do6aM.woff +0 -0
- package/out/web/assets/mitr-thai-400-normal-CXWaAdVj.woff2 +0 -0
- package/out/web/assets/mitr-thai-500-normal-CVdBrEVH.woff2 +0 -0
- package/out/web/assets/mitr-thai-500-normal-CW_B5D-i.woff +0 -0
- package/out/web/assets/mitr-vietnamese-400-normal-CPMGWyoC.woff2 +0 -0
- package/out/web/assets/mitr-vietnamese-400-normal-Z6XhIpdY.woff +0 -0
- package/out/web/assets/mitr-vietnamese-500-normal-CDrv0585.woff2 +0 -0
- package/out/web/assets/mitr-vietnamese-500-normal-CMQWyq-Z.woff +0 -0
- package/out/web/assets/noto-sans-thai-latin-400-normal-BaWBrqFP.woff2 +0 -0
- package/out/web/assets/noto-sans-thai-latin-400-normal-Dh_FJjOB.woff +0 -0
- package/out/web/assets/noto-sans-thai-latin-500-normal-BC04jsmm.woff +0 -0
- package/out/web/assets/noto-sans-thai-latin-500-normal-fyBKClF1.woff2 +0 -0
- package/out/web/assets/noto-sans-thai-latin-600-normal-CemcjnVR.woff2 +0 -0
- package/out/web/assets/noto-sans-thai-latin-600-normal-Dbc-dNO6.woff +0 -0
- package/out/web/assets/noto-sans-thai-latin-ext-400-normal-B-1H0YkH.woff +0 -0
- package/out/web/assets/noto-sans-thai-latin-ext-400-normal-nBP59pVw.woff2 +0 -0
- package/out/web/assets/noto-sans-thai-latin-ext-500-normal-B-ZWb8SZ.woff2 +0 -0
- package/out/web/assets/noto-sans-thai-latin-ext-500-normal-CrEHO7C8.woff +0 -0
- package/out/web/assets/noto-sans-thai-latin-ext-600-normal-PkMZo0xa.woff +0 -0
- package/out/web/assets/noto-sans-thai-latin-ext-600-normal-maHHBsez.woff2 +0 -0
- package/out/web/assets/noto-sans-thai-thai-400-normal-BEOmKAI1.woff2 +0 -0
- package/out/web/assets/noto-sans-thai-thai-400-normal-Dxb_unuU.woff +0 -0
- package/out/web/assets/noto-sans-thai-thai-500-normal-BOGXO2tw.woff +0 -0
- package/out/web/assets/noto-sans-thai-thai-500-normal-CU_X86GQ.woff2 +0 -0
- package/out/web/assets/noto-sans-thai-thai-600-normal-CmgB8_JK.woff +0 -0
- package/out/web/assets/noto-sans-thai-thai-600-normal-Cs73sVjl.woff2 +0 -0
- package/out/web/assets/oauthManager-DNiwM8Rn.js +0 -2
- package/out/web/assets/oauthManager-DuamS1Av.css +0 -1
- package/out/web/assets/outfit-latin-300-normal-AWLfuCom.woff +0 -0
- package/out/web/assets/outfit-latin-300-normal-CRYTwY6m.woff2 +0 -0
- package/out/web/assets/outfit-latin-400-normal-BGsTXAXT.woff2 +0 -0
- package/out/web/assets/outfit-latin-400-normal-DMwTpYkH.woff +0 -0
- package/out/web/assets/outfit-latin-500-normal-ClnHRwRh.woff +0 -0
- package/out/web/assets/outfit-latin-500-normal-DKnIMDSk.woff2 +0 -0
- package/out/web/assets/outfit-latin-600-normal-B7SfZ07L.woff2 +0 -0
- package/out/web/assets/outfit-latin-600-normal-BEfTtDA7.woff +0 -0
- package/out/web/assets/outfit-latin-ext-300-normal-BYS6Dpvq.woff2 +0 -0
- package/out/web/assets/outfit-latin-ext-300-normal-CMIMshEd.woff +0 -0
- package/out/web/assets/outfit-latin-ext-400-normal-5tcqmc2S.woff2 +0 -0
- package/out/web/assets/outfit-latin-ext-400-normal-DHm7mdGe.woff +0 -0
- package/out/web/assets/outfit-latin-ext-500-normal-DrCvqoFD.woff +0 -0
- package/out/web/assets/outfit-latin-ext-500-normal-zeox_O30.woff2 +0 -0
- package/out/web/assets/outfit-latin-ext-600-normal-B85nYjL1.woff2 +0 -0
- package/out/web/assets/outfit-latin-ext-600-normal-CWJcPgd7.woff +0 -0
- package/out/web/assets/preload-helper-D0uHx7FM.js +0 -1
- package/out/web/assets/prompt-latin-ext-400-normal-1pHbN9uy.woff +0 -0
- package/out/web/assets/prompt-latin-ext-400-normal-DdSafGZ9.woff2 +0 -0
- package/out/web/assets/prompt-latin-ext-500-normal--EZ1um7s.woff2 +0 -0
- package/out/web/assets/prompt-latin-ext-500-normal-D-lI1EVT.woff +0 -0
- package/out/web/assets/prompt-latin-ext-600-normal-C8b50x67.woff +0 -0
- package/out/web/assets/prompt-latin-ext-600-normal-Cg9L7iJU.woff2 +0 -0
- package/out/web/assets/prompt-vietnamese-400-normal-BCPzsgPT.woff2 +0 -0
- package/out/web/assets/prompt-vietnamese-400-normal-D4pLyeNK.woff +0 -0
- package/out/web/assets/prompt-vietnamese-500-normal-DmzxmPwa.woff2 +0 -0
- package/out/web/assets/prompt-vietnamese-500-normal-w_sS_j2F.woff +0 -0
- package/out/web/assets/prompt-vietnamese-600-normal-1dyohtNh.woff +0 -0
- package/out/web/assets/prompt-vietnamese-600-normal-7QWjJBsF.woff2 +0 -0
- package/out/web/assets/sarabun-latin-400-normal-DmguIS-7.woff +0 -0
- package/out/web/assets/sarabun-latin-400-normal-URPBxl-K.woff2 +0 -0
- package/out/web/assets/sarabun-latin-500-normal-BjUTcdxu.woff2 +0 -0
- package/out/web/assets/sarabun-latin-500-normal-CJexTAnl.woff +0 -0
- package/out/web/assets/sarabun-latin-600-normal-9FonlkKx.woff +0 -0
- package/out/web/assets/sarabun-latin-600-normal-DMD3TROr.woff2 +0 -0
- package/out/web/assets/sarabun-latin-ext-400-normal-BbP7GpLL.woff2 +0 -0
- package/out/web/assets/sarabun-latin-ext-400-normal-BsmTn0SS.woff +0 -0
- package/out/web/assets/sarabun-latin-ext-500-normal-Cot16Bd2.woff +0 -0
- package/out/web/assets/sarabun-latin-ext-500-normal-DE1LysqI.woff2 +0 -0
- package/out/web/assets/sarabun-latin-ext-600-normal-0tXu9x_i.woff +0 -0
- package/out/web/assets/sarabun-latin-ext-600-normal-BRxjKUQ6.woff2 +0 -0
- package/out/web/assets/sarabun-thai-400-normal-C2DaJlKK.woff2 +0 -0
- package/out/web/assets/sarabun-thai-400-normal-CH-UbWgg.woff +0 -0
- package/out/web/assets/sarabun-thai-500-normal-BVssjame.woff2 +0 -0
- package/out/web/assets/sarabun-thai-500-normal-C3iDLEzi.woff +0 -0
- package/out/web/assets/sarabun-thai-600-normal-3dIAQ-_s.woff2 +0 -0
- package/out/web/assets/sarabun-thai-600-normal-DWKeTe6a.woff +0 -0
- package/out/web/assets/sarabun-vietnamese-400-normal-DPfkSCMy.woff +0 -0
- package/out/web/assets/sarabun-vietnamese-400-normal-igdrzAGY.woff2 +0 -0
- package/out/web/assets/sarabun-vietnamese-500-normal-CpRVvGRU.woff +0 -0
- package/out/web/assets/sarabun-vietnamese-500-normal-Dpe7Br9m.woff2 +0 -0
- package/out/web/assets/sarabun-vietnamese-600-normal-BMbOgAW-.woff +0 -0
- package/out/web/assets/sarabun-vietnamese-600-normal-DkxrOlLB.woff2 +0 -0
- package/out/web/assets/stateDiagram-v2-4QOOHH4V-s6P9g2_b.js +0 -1
- package/out/web/assets/swimlanesDiagram-VK2B7HYN-CV9fOLrV.js +0 -8
- package/out/web/assets/tauri-CNrHQ2Gb.js +0 -3
- package/out/web/assets/window-DkIhgI7B.js +0 -1
|
@@ -1,9 +1,9 @@
|
|
|
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
2
|
import { renderSkillsSvgIcon, renderMcpHubSvgIcon, renderPluginsSvgIcon, renderScheduledTasksSvgIcon, renderLinkedFoldersSvgIcon } from '../constants/plugins'
|
|
3
3
|
import { useAuthUser } from './AuthGate'
|
|
4
|
-
import {
|
|
4
|
+
import { runtimePlatform } from '../platform'
|
|
5
5
|
|
|
6
|
-
export type DashboardView = 'chat' | 'pictures' | 'model' | 'workspace' | 'imagine' | 'veo' | 'skills' | 'mcp' | 'plugins' | 'cron' | 'link'
|
|
6
|
+
export type DashboardView = 'chat' | 'pictures' | 'model' | 'workspace' | 'imagine' | 'veo' | 'skills' | 'mcp' | 'plugins' | 'cron' | 'link' | 'code'
|
|
7
7
|
|
|
8
8
|
interface ChatSessionItem {
|
|
9
9
|
id: string
|
|
@@ -11,6 +11,7 @@ interface ChatSessionItem {
|
|
|
11
11
|
kind?: string
|
|
12
12
|
createdAt?: string
|
|
13
13
|
updatedAt?: string
|
|
14
|
+
workspacePath?: string | null
|
|
14
15
|
}
|
|
15
16
|
|
|
16
17
|
interface DashboardSidebarProps {
|
|
@@ -53,6 +54,11 @@ interface DashboardSidebarProps {
|
|
|
53
54
|
onSetInteractionEnabled?: (enabled: boolean) => void
|
|
54
55
|
onSetShowInteractionGuide?: (visible: boolean) => void
|
|
55
56
|
onShowToast?: (message: string) => void
|
|
57
|
+
activeWorkspacePath?: string
|
|
58
|
+
recentWorkspacePaths?: string[]
|
|
59
|
+
onBrowseFolder?: () => Promise<string | null>
|
|
60
|
+
onUpdateSessionWorkspace?: (sessionId: string, workspacePath: string | null) => void
|
|
61
|
+
onNewChatInProject?: (workspacePath: string) => void
|
|
56
62
|
}
|
|
57
63
|
|
|
58
64
|
export default function DashboardSidebar({
|
|
@@ -86,11 +92,29 @@ export default function DashboardSidebar({
|
|
|
86
92
|
onSetSearchOpen,
|
|
87
93
|
showWorkspaceTab,
|
|
88
94
|
promoteMediaStudios,
|
|
95
|
+
activeWorkspacePath,
|
|
96
|
+
recentWorkspacePaths,
|
|
97
|
+
onBrowseFolder,
|
|
98
|
+
onUpdateSessionWorkspace,
|
|
99
|
+
onNewChatInProject,
|
|
89
100
|
}: DashboardSidebarProps) {
|
|
90
101
|
const [editingSessionId, setEditingSessionId] = useState<string | null>(null)
|
|
91
102
|
const [editTitleValue, setEditTitleValue] = useState('')
|
|
92
103
|
const [isMoreOpen, setIsMoreOpen] = useState(false)
|
|
93
104
|
const [isAccountMenuOpen, setIsAccountMenuOpen] = useState(false)
|
|
105
|
+
const [projectMenu, setProjectMenu] = useState<{ projectId: string; top: number; left: number } | null>(null)
|
|
106
|
+
const [conversationMenu, setConversationMenu] = useState<{ sessionId: string; top: number; left: number } | null>(null)
|
|
107
|
+
const [removedProjectIds, setRemovedProjectIds] = useState<string[]>(() => {
|
|
108
|
+
if (typeof window === 'undefined') return []
|
|
109
|
+
try { return JSON.parse(window.localStorage.getItem('mint_removed_sidebar_projects') || '[]') } catch { return [] }
|
|
110
|
+
})
|
|
111
|
+
const [moveMenu, setMoveMenu] = useState<{
|
|
112
|
+
sessionId: string
|
|
113
|
+
currentWorkspacePath?: string | null
|
|
114
|
+
top: number
|
|
115
|
+
left: number
|
|
116
|
+
} | null>(null)
|
|
117
|
+
const moveMenuRef = useRef<HTMLDivElement>(null)
|
|
94
118
|
const moreContainerRef = useRef<HTMLDivElement>(null)
|
|
95
119
|
const accountContainerRef = useRef<HTMLDivElement>(null)
|
|
96
120
|
const asideRef = useRef<HTMLElement>(null)
|
|
@@ -151,6 +175,11 @@ export default function DashboardSidebar({
|
|
|
151
175
|
if (accountContainerRef.current && !accountContainerRef.current.contains(event.target as Node)) {
|
|
152
176
|
setIsAccountMenuOpen(false)
|
|
153
177
|
}
|
|
178
|
+
if (moveMenuRef.current && !moveMenuRef.current.contains(event.target as Node)) {
|
|
179
|
+
setMoveMenu(null)
|
|
180
|
+
}
|
|
181
|
+
if (!(event.target as Element).closest('.sidebar-project-menu-popover, .sidebar-project-menu-trigger')) setProjectMenu(null)
|
|
182
|
+
if (!(event.target as Element).closest('.sidebar-conversation-menu-popover, .sidebar-conversation-menu-trigger')) setConversationMenu(null)
|
|
154
183
|
}
|
|
155
184
|
document.addEventListener('mousedown', handleClickOutside)
|
|
156
185
|
return () => document.removeEventListener('mousedown', handleClickOutside)
|
|
@@ -174,13 +203,258 @@ export default function DashboardSidebar({
|
|
|
174
203
|
onShowToast?.(next ? 'Enable model interaction ⦸' : 'Disable model interaction ⦸')
|
|
175
204
|
}
|
|
176
205
|
|
|
177
|
-
const conversationSessions = chatSessions.filter((session) => session.kind !== 'cli' && session.id !== 'conversation-default')
|
|
178
|
-
const
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
206
|
+
const conversationSessions = chatSessions.filter((session) => session.kind !== 'cli' && !session.id.startsWith('cli') && session.id !== 'conversation-default')
|
|
207
|
+
const cliSessions = chatSessions.filter((session) => session.kind === 'cli' || session.id.startsWith('cli'))
|
|
208
|
+
|
|
209
|
+
const [projectOrder, setProjectOrder] = useState<string[]>(() => {
|
|
210
|
+
if (typeof window === 'undefined') return []
|
|
211
|
+
try {
|
|
212
|
+
const saved = localStorage.getItem('mint_project_order')
|
|
213
|
+
return saved ? JSON.parse(saved) : []
|
|
214
|
+
} catch {
|
|
215
|
+
return []
|
|
216
|
+
}
|
|
217
|
+
})
|
|
218
|
+
const [draggedProjectId, setDraggedProjectId] = useState<string | null>(null)
|
|
219
|
+
const [dragOverProjectId, setDragOverProjectId] = useState<string | null>(null)
|
|
220
|
+
const [dropPosition, setDropPosition] = useState<'before' | 'after' | null>(null)
|
|
221
|
+
|
|
222
|
+
const handleProjectDragStart = (e: ReactDragEvent, projectId: string) => {
|
|
223
|
+
e.dataTransfer.setData('text/plain', projectId)
|
|
224
|
+
e.dataTransfer.effectAllowed = 'move'
|
|
225
|
+
setDraggedProjectId(projectId)
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
const handleProjectDragOver = (e: ReactDragEvent, targetId: string) => {
|
|
229
|
+
if (!draggedProjectId || draggedProjectId === targetId) return
|
|
230
|
+
e.preventDefault()
|
|
231
|
+
e.stopPropagation()
|
|
232
|
+
e.dataTransfer.dropEffect = 'move'
|
|
233
|
+
|
|
234
|
+
const rect = (e.currentTarget as HTMLElement).getBoundingClientRect()
|
|
235
|
+
const midY = rect.top + rect.height / 2
|
|
236
|
+
const pos = e.clientY < midY ? 'before' : 'after'
|
|
237
|
+
|
|
238
|
+
if (dragOverProjectId !== targetId || dropPosition !== pos) {
|
|
239
|
+
setDragOverProjectId(targetId)
|
|
240
|
+
setDropPosition(pos)
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
const handleProjectDragLeave = (e: ReactDragEvent, targetId: string) => {
|
|
245
|
+
e.stopPropagation()
|
|
246
|
+
if (dragOverProjectId === targetId) {
|
|
247
|
+
const related = e.relatedTarget as Node | null
|
|
248
|
+
if (!related || !(e.currentTarget as HTMLElement).contains(related)) {
|
|
249
|
+
setDragOverProjectId(null)
|
|
250
|
+
setDropPosition(null)
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
const handleProjectDrop = (e: ReactDragEvent, targetId: string) => {
|
|
256
|
+
e.preventDefault()
|
|
257
|
+
e.stopPropagation()
|
|
258
|
+
if (!draggedProjectId || draggedProjectId === targetId) {
|
|
259
|
+
setDraggedProjectId(null)
|
|
260
|
+
setDragOverProjectId(null)
|
|
261
|
+
setDropPosition(null)
|
|
262
|
+
return
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
const allIds = projectGroups.map((g) => g.id)
|
|
266
|
+
let newOrder = [...projectOrder]
|
|
267
|
+
for (const id of allIds) {
|
|
268
|
+
if (!newOrder.includes(id)) {
|
|
269
|
+
newOrder.push(id)
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
newOrder = newOrder.filter((id) => id !== draggedProjectId)
|
|
274
|
+
const targetIdx = newOrder.indexOf(targetId)
|
|
275
|
+
if (targetIdx !== -1) {
|
|
276
|
+
const insertIdx = dropPosition === 'after' ? targetIdx + 1 : targetIdx
|
|
277
|
+
newOrder.splice(insertIdx, 0, draggedProjectId)
|
|
278
|
+
} else {
|
|
279
|
+
newOrder.push(draggedProjectId)
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
setProjectOrder(newOrder)
|
|
283
|
+
try {
|
|
284
|
+
localStorage.setItem('mint_project_order', JSON.stringify(newOrder))
|
|
285
|
+
} catch (err) {
|
|
286
|
+
console.error('Failed to save project order', err)
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
setDraggedProjectId(null)
|
|
290
|
+
setDragOverProjectId(null)
|
|
291
|
+
setDropPosition(null)
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
const handleProjectDragEnd = () => {
|
|
295
|
+
setDraggedProjectId(null)
|
|
296
|
+
setDragOverProjectId(null)
|
|
297
|
+
setDropPosition(null)
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
// Group conversations by Workspace Project
|
|
301
|
+
const { projectGroups, recentSessions } = useMemo(() => {
|
|
302
|
+
const getProjectInfo = (workspacePath?: string | null): { id: string; name: string } | null => {
|
|
303
|
+
if (!workspacePath) return null
|
|
304
|
+
const clean = workspacePath.replace(/[\\/]+$/, '').trim()
|
|
305
|
+
if (!clean) return null
|
|
306
|
+
const parts = clean.split(/[\\/]/)
|
|
307
|
+
const name = parts[parts.length - 1] || clean
|
|
308
|
+
return { id: clean, name }
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
const groupsMap = new Map<string, { id: string; name: string; sessions: ChatSessionItem[] }>()
|
|
312
|
+
const recents: ChatSessionItem[] = []
|
|
313
|
+
|
|
314
|
+
// If active workspace is known, initialize its project folder
|
|
315
|
+
const activeProj = getProjectInfo(activeWorkspacePath)
|
|
316
|
+
if (activeProj && !removedProjectIds.includes(activeProj.id)) {
|
|
317
|
+
groupsMap.set(activeProj.id, { id: activeProj.id, name: activeProj.name, sessions: [] })
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
for (const session of conversationSessions) {
|
|
321
|
+
const effectivePath = session.workspacePath || null
|
|
322
|
+
const proj = getProjectInfo(effectivePath)
|
|
323
|
+
if (proj) {
|
|
324
|
+
if (removedProjectIds.includes(proj.id)) {
|
|
325
|
+
recents.push(session)
|
|
326
|
+
continue
|
|
327
|
+
}
|
|
328
|
+
if (!groupsMap.has(proj.id)) {
|
|
329
|
+
groupsMap.set(proj.id, { id: proj.id, name: proj.name, sessions: [] })
|
|
330
|
+
}
|
|
331
|
+
groupsMap.get(proj.id)!.sessions.push(session)
|
|
332
|
+
} else {
|
|
333
|
+
recents.push(session)
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
// Sort groups stably according to user custom projectOrder, fallback to name
|
|
338
|
+
const sortedGroups = Array.from(groupsMap.values()).sort((a, b) => {
|
|
339
|
+
const idxA = projectOrder.indexOf(a.id)
|
|
340
|
+
const idxB = projectOrder.indexOf(b.id)
|
|
341
|
+
if (idxA !== -1 && idxB !== -1) return idxA - idxB
|
|
342
|
+
if (idxA !== -1) return -1
|
|
343
|
+
if (idxB !== -1) return 1
|
|
344
|
+
return a.name.localeCompare(b.name)
|
|
345
|
+
})
|
|
346
|
+
|
|
347
|
+
return { projectGroups: sortedGroups, recentSessions: recents }
|
|
348
|
+
}, [conversationSessions, activeWorkspacePath, activeConversationId, projectOrder, removedProjectIds])
|
|
349
|
+
|
|
350
|
+
const availableProjects = useMemo(() => {
|
|
351
|
+
const getProjectInfo = (workspacePath?: string | null): { id: string; name: string } | null => {
|
|
352
|
+
if (!workspacePath) return null
|
|
353
|
+
const clean = workspacePath.replace(/[\\/]+$/, '').trim()
|
|
354
|
+
if (!clean) return null
|
|
355
|
+
const parts = clean.split(/[\\/]/)
|
|
356
|
+
const name = parts[parts.length - 1] || clean
|
|
357
|
+
return { id: clean, name }
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
const map = new Map<string, string>()
|
|
361
|
+
if (activeWorkspacePath && !removedProjectIds.includes(activeWorkspacePath.replace(/[\\/]+$/, '').trim())) {
|
|
362
|
+
const info = getProjectInfo(activeWorkspacePath)
|
|
363
|
+
if (info) map.set(info.id, info.name)
|
|
364
|
+
}
|
|
365
|
+
for (const g of projectGroups) {
|
|
366
|
+
if (!removedProjectIds.includes(g.id)) map.set(g.id, g.name)
|
|
367
|
+
}
|
|
368
|
+
if (recentWorkspacePaths) {
|
|
369
|
+
for (const p of recentWorkspacePaths) {
|
|
370
|
+
const info = getProjectInfo(p)
|
|
371
|
+
if (info && !removedProjectIds.includes(info.id) && !map.has(info.id)) {
|
|
372
|
+
map.set(info.id, info.name)
|
|
373
|
+
}
|
|
374
|
+
}
|
|
375
|
+
}
|
|
376
|
+
return Array.from(map.entries()).map(([path, name]) => ({ path, name }))
|
|
377
|
+
}, [projectGroups, activeWorkspacePath, recentWorkspacePaths, removedProjectIds])
|
|
378
|
+
|
|
379
|
+
const openMoveMenu = (event: ReactMouseEvent, session: ChatSessionItem) => {
|
|
380
|
+
event.stopPropagation()
|
|
381
|
+
event.preventDefault()
|
|
382
|
+
if (moveMenu?.sessionId === session.id) {
|
|
383
|
+
setMoveMenu(null)
|
|
384
|
+
return
|
|
385
|
+
}
|
|
386
|
+
const rect = (event.currentTarget as HTMLElement).getBoundingClientRect()
|
|
387
|
+
const popoverWidth = 220
|
|
388
|
+
const left = Math.min(rect.left, Math.max(10, window.innerWidth - popoverWidth - 10))
|
|
389
|
+
const top = rect.bottom + 6
|
|
390
|
+
setMoveMenu({
|
|
391
|
+
sessionId: session.id,
|
|
392
|
+
currentWorkspacePath: session.workspacePath || (session.id === activeConversationId && activeWorkspacePath ? activeWorkspacePath : null),
|
|
393
|
+
top,
|
|
394
|
+
left,
|
|
395
|
+
})
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
const [collapsedProjects, setCollapsedProjects] = useState<Record<string, boolean>>(() => {
|
|
399
|
+
if (typeof window === 'undefined') return {}
|
|
400
|
+
try {
|
|
401
|
+
const saved = localStorage.getItem('mint_collapsed_projects')
|
|
402
|
+
return saved ? JSON.parse(saved) : {}
|
|
403
|
+
} catch {
|
|
404
|
+
return {}
|
|
405
|
+
}
|
|
406
|
+
})
|
|
407
|
+
|
|
408
|
+
const [expandedShowMore, setExpandedShowMore] = useState<Record<string, boolean>>({})
|
|
409
|
+
|
|
410
|
+
const toggleProjectCollapse = (projectId: string) => {
|
|
411
|
+
setCollapsedProjects((prev) => {
|
|
412
|
+
const next = { ...prev, [projectId]: !prev[projectId] }
|
|
413
|
+
try {
|
|
414
|
+
localStorage.setItem('mint_collapsed_projects', JSON.stringify(next))
|
|
415
|
+
} catch {
|
|
416
|
+
// ignore
|
|
417
|
+
}
|
|
418
|
+
return next
|
|
419
|
+
})
|
|
420
|
+
}
|
|
421
|
+
|
|
422
|
+
const toggleShowMore = (projectId: string) => {
|
|
423
|
+
setExpandedShowMore((prev) => ({ ...prev, [projectId]: !prev[projectId] }))
|
|
424
|
+
}
|
|
425
|
+
|
|
426
|
+
const removeProjectFromSidebar = (projectId: string) => {
|
|
427
|
+
setRemovedProjectIds((previous) => {
|
|
428
|
+
const next = [...new Set([...previous, projectId])]
|
|
429
|
+
try { localStorage.setItem('mint_removed_sidebar_projects', JSON.stringify(next)) } catch { /* ignore */ }
|
|
430
|
+
return next
|
|
431
|
+
})
|
|
432
|
+
setProjectMenu(null)
|
|
182
433
|
}
|
|
183
434
|
|
|
435
|
+
// Remember the last active CLI session so it remains pinned in the sidebar
|
|
436
|
+
// even when the user navigates away to a regular conversation!
|
|
437
|
+
const [pinnedCliId, setPinnedCliId] = useState<string | null>(() => {
|
|
438
|
+
return typeof window !== 'undefined' ? localStorage.getItem('mint_last_cli_session_id') : null
|
|
439
|
+
})
|
|
440
|
+
|
|
441
|
+
useEffect(() => {
|
|
442
|
+
if (activeConversationId.startsWith('cli') || activeConversationId === 'cli') {
|
|
443
|
+
setPinnedCliId(activeConversationId)
|
|
444
|
+
try {
|
|
445
|
+
localStorage.setItem('mint_last_cli_session_id', activeConversationId)
|
|
446
|
+
} catch {
|
|
447
|
+
// ignore
|
|
448
|
+
}
|
|
449
|
+
}
|
|
450
|
+
}, [activeConversationId])
|
|
451
|
+
|
|
452
|
+
const targetCliId = (activeConversationId.startsWith('cli') || activeConversationId === 'cli')
|
|
453
|
+
? activeConversationId
|
|
454
|
+
: (pinnedCliId || cliSessions[0]?.id || null)
|
|
455
|
+
|
|
456
|
+
const pinnedCliSession = cliSessions.find((session) => session.id === targetCliId)
|
|
457
|
+
|
|
184
458
|
return (
|
|
185
459
|
<aside className={`workspace-sidebar ${isResizing ? 'is-resizing' : ''}`} ref={asideRef}>
|
|
186
460
|
{!sidebarCollapsed && (
|
|
@@ -200,31 +474,36 @@ export default function DashboardSidebar({
|
|
|
200
474
|
if (event.key === 'Enter' || event.key === ' ') onToggleSidebar()
|
|
201
475
|
}}
|
|
202
476
|
>
|
|
203
|
-
<img src={
|
|
477
|
+
<img src={runtimePlatform.appIconPath()} alt="Mint Agent Logo" className="sidebar-logo" />
|
|
204
478
|
<span className="sidebar-brand-name">Mint Agent</span>
|
|
205
479
|
</div>
|
|
480
|
+
<button type="button" className="sidebar-mobile-close" aria-label="Close navigation menu" onClick={onToggleSidebar}>
|
|
481
|
+
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" aria-hidden="true">
|
|
482
|
+
<path d="M5 5l14 14M19 5L5 19" />
|
|
483
|
+
</svg>
|
|
484
|
+
</button>
|
|
206
485
|
|
|
207
|
-
<button className="sidebar-new-chat" onClick={() => onClearHistory('New chat')}>
|
|
486
|
+
<button className="sidebar-new-chat" onClick={() => onClearHistory('New chat')} title="New chat (Ctrl+N)">
|
|
208
487
|
<span aria-hidden="true" style={{ display: 'inline-flex', alignItems: 'center' }}>
|
|
209
488
|
<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
489
|
<line x1="12" y1="5" x2="12" y2="19"></line>
|
|
211
490
|
<line x1="5" y1="12" x2="19" y2="12"></line>
|
|
212
491
|
</svg>
|
|
213
492
|
</span>
|
|
214
|
-
<span>New
|
|
493
|
+
<span>New chat</span>
|
|
215
494
|
</button>
|
|
216
495
|
|
|
217
|
-
<button className="sidebar-top-action sidebar-search-btn" onClick={() => onSetSearchOpen(true)}>
|
|
496
|
+
<button className="sidebar-top-action sidebar-search-btn" onClick={() => onSetSearchOpen(true)} title="Search chats (Ctrl+K)">
|
|
218
497
|
<span aria-hidden="true" style={{ display: 'inline-flex', alignItems: 'center' }}>
|
|
219
498
|
<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
499
|
<circle cx="11" cy="11" r="8"></circle>
|
|
221
500
|
<line x1="21" y1="21" x2="16.65" y2="16.65"></line>
|
|
222
501
|
</svg>
|
|
223
502
|
</span>
|
|
224
|
-
<span>Search
|
|
503
|
+
<span>Search chats</span>
|
|
225
504
|
</button>
|
|
226
505
|
|
|
227
|
-
<button className={`sidebar-top-action ${view === 'chat' ? 'is-active' : ''}`} onClick={() => onSetView('chat')}>
|
|
506
|
+
<button className={`sidebar-top-action ${view === 'chat' ? 'is-active' : ''}`} onClick={() => onSetView('chat')} title="Chat">
|
|
228
507
|
<span aria-hidden="true" style={{ display: 'inline-flex', alignItems: 'center' }}>
|
|
229
508
|
<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
509
|
<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,7 +512,7 @@ export default function DashboardSidebar({
|
|
|
233
512
|
<span>Chat</span>
|
|
234
513
|
</button>
|
|
235
514
|
|
|
236
|
-
<button className={`sidebar-top-action ${view === 'pictures' ? 'is-active' : ''}`} onClick={() => onSetView('pictures')}>
|
|
515
|
+
<button className={`sidebar-top-action ${view === 'pictures' ? 'is-active' : ''}`} onClick={() => onSetView('pictures')} title="Pictures">
|
|
237
516
|
<span aria-hidden="true" style={{ display: 'inline-flex', alignItems: 'center' }}>
|
|
238
517
|
<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
518
|
<rect x="3" y="3" width="18" height="18" rx="2" ry="2"></rect>
|
|
@@ -271,7 +550,7 @@ export default function DashboardSidebar({
|
|
|
271
550
|
</>
|
|
272
551
|
)}
|
|
273
552
|
{showWorkspaceTab && (
|
|
274
|
-
<button className={`sidebar-top-action ${view === 'workspace' ? 'is-active' : ''}`} onClick={() => onSetView('workspace')}>
|
|
553
|
+
<button className={`sidebar-top-action ${view === 'workspace' ? 'is-active' : ''}`} onClick={() => onSetView('workspace')} title="Workspace">
|
|
275
554
|
<span aria-hidden="true" style={{ display: 'inline-flex', alignItems: 'center' }}>
|
|
276
555
|
<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
556
|
<path d="M3 6h7l2 2h9v10a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2Z"></path>
|
|
@@ -282,19 +561,19 @@ export default function DashboardSidebar({
|
|
|
282
561
|
</button>
|
|
283
562
|
)}
|
|
284
563
|
{onToggleModel && (
|
|
285
|
-
<button className={`sidebar-top-action ${modelVisible ? 'is-active' : ''}`} onClick={onToggleModel}>
|
|
564
|
+
<button className={`sidebar-top-action ${modelVisible ? 'is-active' : ''}`} onClick={onToggleModel} title="Live2D model">
|
|
286
565
|
<span aria-hidden="true" style={{ display: 'inline-flex', alignItems: 'center' }}>
|
|
287
566
|
<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
567
|
<path d="M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"></path>
|
|
289
568
|
<circle cx="12" cy="7" r="4"></circle>
|
|
290
569
|
</svg>
|
|
291
570
|
</span>
|
|
292
|
-
<span>Live2D
|
|
571
|
+
<span>Live2D model</span>
|
|
293
572
|
</button>
|
|
294
573
|
)}
|
|
295
574
|
|
|
296
575
|
<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)}>
|
|
576
|
+
<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
577
|
<span aria-hidden="true" style={{ display: 'inline-flex', alignItems: 'center' }}>
|
|
299
578
|
<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
579
|
<circle cx="12" cy="12" r="1.5"></circle>
|
|
@@ -305,14 +584,14 @@ export default function DashboardSidebar({
|
|
|
305
584
|
<span>More</span>
|
|
306
585
|
</button>
|
|
307
586
|
{isMoreOpen && (
|
|
308
|
-
<div className="sidebar-more-popover" style={{ display: 'flex', flexDirection: 'column', gap: '4px', padding: '6px', minWidth: '160px' }}>
|
|
587
|
+
<div id="sidebar-more-menu" className="sidebar-more-popover" style={{ display: 'flex', flexDirection: 'column', gap: '4px', padding: '6px', minWidth: '160px' }}>
|
|
309
588
|
<button className={`popover-item ${view === 'skills' ? 'active' : ''}`} onClick={() => { onSetView('skills'); setIsMoreOpen(false); }}>
|
|
310
589
|
<span aria-hidden="true" style={{ display: 'inline-flex', alignItems: 'center' }}>{renderSkillsSvgIcon(15)}</span>
|
|
311
590
|
<span>Skills</span>
|
|
312
591
|
</button>
|
|
313
592
|
<button className={`popover-item ${view === 'mcp' ? 'active' : ''}`} onClick={() => { onSetView('mcp'); setIsMoreOpen(false); }}>
|
|
314
593
|
<span aria-hidden="true" style={{ display: 'inline-flex', alignItems: 'center' }}>{renderMcpHubSvgIcon(15)}</span>
|
|
315
|
-
<span>MCP
|
|
594
|
+
<span>MCP servers</span>
|
|
316
595
|
</button>
|
|
317
596
|
<button className={`popover-item ${view === 'plugins' ? 'active' : ''}`} onClick={() => { onSetView('plugins'); setIsMoreOpen(false); }}>
|
|
318
597
|
<span aria-hidden="true" style={{ display: 'inline-flex', alignItems: 'center' }}>{renderPluginsSvgIcon(15)}</span>
|
|
@@ -320,11 +599,11 @@ export default function DashboardSidebar({
|
|
|
320
599
|
</button>
|
|
321
600
|
<button className={`popover-item ${view === 'cron' ? 'active' : ''}`} onClick={() => { onSetView('cron'); setIsMoreOpen(false); }}>
|
|
322
601
|
<span aria-hidden="true" style={{ display: 'inline-flex', alignItems: 'center' }}>{renderScheduledTasksSvgIcon(15)}</span>
|
|
323
|
-
<span>Scheduled
|
|
602
|
+
<span>Scheduled tasks</span>
|
|
324
603
|
</button>
|
|
325
604
|
<button className={`popover-item ${view === 'link' ? 'active' : ''}`} onClick={() => { onSetView('link'); setIsMoreOpen(false); }}>
|
|
326
605
|
<span aria-hidden="true" style={{ display: 'inline-flex', alignItems: 'center' }}>{renderLinkedFoldersSvgIcon(15)}</span>
|
|
327
|
-
<span>Linked
|
|
606
|
+
<span>Linked folders</span>
|
|
328
607
|
</button>
|
|
329
608
|
{!promoteMediaStudios && (
|
|
330
609
|
<button className={`popover-item ${view === 'imagine' ? 'active' : ''}`} onClick={() => { onSetView('imagine'); setIsMoreOpen(false); }}>
|
|
@@ -412,124 +691,493 @@ export default function DashboardSidebar({
|
|
|
412
691
|
</div>
|
|
413
692
|
)}
|
|
414
693
|
|
|
415
|
-
|
|
416
|
-
<div className="sidebar-
|
|
694
|
+
{sidebarCollapsed ? (
|
|
695
|
+
<div className="sidebar-collapsed-sessions">
|
|
696
|
+
<button
|
|
697
|
+
type="button"
|
|
698
|
+
className={`sidebar-collapsed-item ${view === 'code' ? 'is-active' : ''}`}
|
|
699
|
+
onClick={() => onSetView('code')}
|
|
700
|
+
title="Code sessions Hub"
|
|
701
|
+
aria-label="Code sessions Hub"
|
|
702
|
+
>
|
|
703
|
+
<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">
|
|
704
|
+
<polyline points="4 17 10 11 4 5"></polyline>
|
|
705
|
+
<line x1="12" y1="19" x2="20" y2="19"></line>
|
|
706
|
+
</svg>
|
|
707
|
+
{view === 'code' && <span className="sidebar-collapsed-dot" />}
|
|
708
|
+
</button>
|
|
709
|
+
{pinnedCliSession && (
|
|
710
|
+
<button
|
|
711
|
+
type="button"
|
|
712
|
+
className={`sidebar-collapsed-item ${pinnedCliSession.id === activeConversationId && view !== 'code' ? 'is-active' : ''}`}
|
|
713
|
+
onClick={() => onSelectConversation(pinnedCliSession.id)}
|
|
714
|
+
title={pinnedCliSession.title && pinnedCliSession.title !== 'cli' ? pinnedCliSession.title : 'Terminal Session'}
|
|
715
|
+
aria-label={pinnedCliSession.title && pinnedCliSession.title !== 'cli' ? pinnedCliSession.title : 'Terminal Session'}
|
|
716
|
+
>
|
|
717
|
+
<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">
|
|
718
|
+
<polyline points="4 17 10 11 4 5"></polyline>
|
|
719
|
+
<line x1="12" y1="19" x2="20" y2="19"></line>
|
|
720
|
+
</svg>
|
|
721
|
+
{pinnedCliSession.id === activeConversationId && view !== 'code' && <span className="sidebar-collapsed-dot" />}
|
|
722
|
+
</button>
|
|
723
|
+
)}
|
|
724
|
+
{conversationSessions.slice(0, 25).map((session) => {
|
|
725
|
+
const isActive = session.id === activeConversationId && view !== 'code'
|
|
726
|
+
return (
|
|
727
|
+
<button
|
|
728
|
+
type="button"
|
|
729
|
+
key={session.id}
|
|
730
|
+
className={`sidebar-collapsed-item ${isActive ? 'is-active' : ''}`}
|
|
731
|
+
onClick={() => onSelectConversation(session.id)}
|
|
732
|
+
title={session.title || 'Chat'}
|
|
733
|
+
aria-label={session.title || 'Chat'}
|
|
734
|
+
>
|
|
735
|
+
<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">
|
|
736
|
+
<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>
|
|
737
|
+
</svg>
|
|
738
|
+
{isActive && <span className="sidebar-collapsed-dot" />}
|
|
739
|
+
</button>
|
|
740
|
+
)
|
|
741
|
+
})}
|
|
742
|
+
</div>
|
|
743
|
+
) : (
|
|
744
|
+
<div className="sidebar-section">
|
|
745
|
+
<div className="sidebar-section-title">Code</div>
|
|
417
746
|
<div className="sidebar-chat-list sidebar-cli-list">
|
|
418
747
|
<button
|
|
419
|
-
className={`sidebar-project sidebar-chat-item ${
|
|
420
|
-
onClick={() =>
|
|
421
|
-
title=
|
|
748
|
+
className={`sidebar-project sidebar-chat-item ${view === 'code' ? 'active' : ''}`}
|
|
749
|
+
onClick={() => onSetView('code')}
|
|
750
|
+
title="Code sessions Hub"
|
|
422
751
|
>
|
|
423
752
|
<span aria-hidden="true" style={{ display: 'inline-flex', alignItems: 'center' }}>
|
|
424
753
|
<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
|
-
<
|
|
754
|
+
<polyline points="4 17 10 11 4 5"></polyline>
|
|
755
|
+
<line x1="12" y1="19" x2="20" y2="19"></line>
|
|
427
756
|
</svg>
|
|
428
757
|
</span>
|
|
429
|
-
<span className="sidebar-chat-title">
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
758
|
+
<span className="sidebar-chat-title">Code hub</span>
|
|
759
|
+
<span
|
|
760
|
+
style={{
|
|
761
|
+
marginLeft: 'auto',
|
|
762
|
+
fontSize: '0.72rem',
|
|
763
|
+
fontWeight: 600,
|
|
764
|
+
padding: '1px 6px',
|
|
765
|
+
borderRadius: '10px',
|
|
766
|
+
background: 'rgba(255, 255, 255, 0.08)',
|
|
767
|
+
color: 'var(--text-muted, #94a3b8)',
|
|
768
|
+
}}
|
|
769
|
+
>
|
|
770
|
+
{cliSessions.length}
|
|
771
|
+
</span>
|
|
436
772
|
</button>
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
<div className="sidebar-chat-list">
|
|
440
|
-
{conversationSessions.map((session) => (
|
|
773
|
+
|
|
774
|
+
{pinnedCliSession && (
|
|
441
775
|
<button
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
776
|
+
className={`sidebar-project sidebar-chat-item ${pinnedCliSession.id === activeConversationId ? 'active' : ''}`}
|
|
777
|
+
onClick={() => onSelectConversation(pinnedCliSession.id)}
|
|
778
|
+
title={pinnedCliSession.title || 'Terminal Session'}
|
|
779
|
+
style={{ paddingLeft: '16px' }}
|
|
446
780
|
>
|
|
447
|
-
<span aria-hidden="true" style={{ display: 'inline-flex', alignItems: 'center' }}>
|
|
781
|
+
<span aria-hidden="true" style={{ display: 'inline-flex', alignItems: 'center', opacity: 0.85 }}>
|
|
448
782
|
<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="
|
|
783
|
+
<path d="M4 17l6-6-6-6"></path>
|
|
784
|
+
<path d="M12 19h8"></path>
|
|
450
785
|
</svg>
|
|
451
786
|
</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>
|
|
787
|
+
<span className="sidebar-chat-title">
|
|
788
|
+
{pinnedCliSession.title && pinnedCliSession.title !== 'cli'
|
|
789
|
+
? pinnedCliSession.title
|
|
790
|
+
: (pinnedCliSession.id === 'cli' ? 'Terminal Session' : `cli::${pinnedCliSession.id.replace(/^cli::/, '').slice(0, 7)}`)}
|
|
791
|
+
</span>
|
|
792
|
+
{pinnedCliSession.id === activeConversationId && sending && (
|
|
793
|
+
<span className="sidebar-generating-text">Thinking...</span>
|
|
477
794
|
)}
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
795
|
+
</button>
|
|
796
|
+
)}
|
|
797
|
+
</div>
|
|
798
|
+
{projectGroups.length > 0 && (
|
|
799
|
+
<>
|
|
800
|
+
<div className="sidebar-section-title sidebar-subsection-title">Projects</div>
|
|
801
|
+
<div className="sidebar-projects-list">
|
|
802
|
+
{projectGroups.map((group) => {
|
|
803
|
+
const isCollapsed = !!collapsedProjects[group.id]
|
|
804
|
+
const isExpanded = !!expandedShowMore[group.id]
|
|
805
|
+
const maxVisible = 3
|
|
806
|
+
const hasMore = group.sessions.length > maxVisible
|
|
807
|
+
const visibleSessions = (isExpanded || !hasMore)
|
|
808
|
+
? group.sessions
|
|
809
|
+
: group.sessions.slice(0, maxVisible)
|
|
810
|
+
|
|
811
|
+
const isDragging = draggedProjectId === group.id
|
|
812
|
+
const isDragOver = dragOverProjectId === group.id
|
|
813
|
+
|
|
814
|
+
return (
|
|
815
|
+
<div
|
|
816
|
+
key={group.id}
|
|
817
|
+
className={`sidebar-project-group ${isDragging ? 'is-dragging' : ''} ${isDragOver ? (dropPosition === 'before' ? 'drop-before' : 'drop-after') : ''}`}
|
|
818
|
+
onDragOver={(e) => handleProjectDragOver(e, group.id)}
|
|
819
|
+
onDragLeave={(e) => handleProjectDragLeave(e, group.id)}
|
|
820
|
+
onDrop={(e) => handleProjectDrop(e, group.id)}
|
|
498
821
|
>
|
|
499
|
-
<
|
|
500
|
-
|
|
501
|
-
|
|
822
|
+
<div
|
|
823
|
+
role="button"
|
|
824
|
+
tabIndex={0}
|
|
825
|
+
className="sidebar-project-group-header"
|
|
826
|
+
onClick={() => toggleProjectCollapse(group.id)}
|
|
827
|
+
onKeyDown={(e) => {
|
|
828
|
+
if (e.key === 'Enter' || e.key === ' ') {
|
|
829
|
+
e.preventDefault()
|
|
830
|
+
toggleProjectCollapse(group.id)
|
|
831
|
+
}
|
|
832
|
+
}}
|
|
833
|
+
title={`${group.name} (${group.id}) - Drag to reorder`}
|
|
834
|
+
draggable
|
|
835
|
+
onDragStart={(e) => handleProjectDragStart(e, group.id)}
|
|
836
|
+
onDragEnd={handleProjectDragEnd}
|
|
837
|
+
>
|
|
838
|
+
<span className="sidebar-project-group-left">
|
|
839
|
+
<span className="sidebar-project-drag-grip" title="Drag to reorder" aria-hidden="true">
|
|
840
|
+
<svg width="8" height="12" viewBox="0 0 8 12" fill="currentColor">
|
|
841
|
+
<circle cx="2" cy="2" r="1.2" />
|
|
842
|
+
<circle cx="6" cy="2" r="1.2" />
|
|
843
|
+
<circle cx="2" cy="6" r="1.2" />
|
|
844
|
+
<circle cx="6" cy="6" r="1.2" />
|
|
845
|
+
<circle cx="2" cy="10" r="1.2" />
|
|
846
|
+
<circle cx="6" cy="10" r="1.2" />
|
|
847
|
+
</svg>
|
|
848
|
+
</span>
|
|
849
|
+
<svg
|
|
850
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
851
|
+
width="14"
|
|
852
|
+
height="14"
|
|
853
|
+
viewBox="0 0 24 24"
|
|
854
|
+
fill="none"
|
|
855
|
+
stroke="currentColor"
|
|
856
|
+
strokeWidth="2"
|
|
857
|
+
strokeLinecap="round"
|
|
858
|
+
strokeLinejoin="round"
|
|
859
|
+
className="sidebar-project-folder-icon"
|
|
860
|
+
>
|
|
861
|
+
{!isCollapsed ? (
|
|
862
|
+
<>
|
|
863
|
+
<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>
|
|
864
|
+
<polygon points="3 20 6 10 23 10 20 20 3 20" fill="currentColor" fillOpacity="0.15"></polygon>
|
|
865
|
+
</>
|
|
866
|
+
) : (
|
|
867
|
+
<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>
|
|
868
|
+
)}
|
|
869
|
+
</svg>
|
|
870
|
+
<span className="sidebar-project-group-name">{group.name}</span>
|
|
871
|
+
</span>
|
|
872
|
+
<span className="sidebar-project-group-right">
|
|
873
|
+
<button
|
|
874
|
+
type="button"
|
|
875
|
+
className="sidebar-project-menu-trigger"
|
|
876
|
+
aria-label={`Project actions for ${group.name}`}
|
|
877
|
+
aria-haspopup="menu"
|
|
878
|
+
aria-expanded={projectMenu?.projectId === group.id}
|
|
879
|
+
onClick={(e) => {
|
|
880
|
+
e.stopPropagation()
|
|
881
|
+
const rect = e.currentTarget.getBoundingClientRect()
|
|
882
|
+
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)) })
|
|
883
|
+
}}
|
|
884
|
+
onKeyDown={(e) => e.stopPropagation()}
|
|
885
|
+
>
|
|
886
|
+
<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>
|
|
887
|
+
</button>
|
|
888
|
+
<span className="sidebar-project-group-count">{group.sessions.length}</span>
|
|
889
|
+
<span
|
|
890
|
+
className="sidebar-project-group-chevron"
|
|
891
|
+
style={{
|
|
892
|
+
transform: isCollapsed ? 'rotate(-90deg)' : 'rotate(0deg)',
|
|
893
|
+
transition: 'transform 0.18s ease'
|
|
894
|
+
}}
|
|
895
|
+
>
|
|
896
|
+
<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">
|
|
897
|
+
<polyline points="6 9 12 15 18 9"></polyline>
|
|
898
|
+
</svg>
|
|
899
|
+
</span>
|
|
900
|
+
</span>
|
|
901
|
+
</div>
|
|
902
|
+
{projectMenu?.projectId === group.id && (
|
|
903
|
+
<div className="sidebar-project-menu-popover" role="menu" style={{ top: projectMenu.top, left: projectMenu.left }} onClick={(e) => e.stopPropagation()}>
|
|
904
|
+
{onNewChatInProject && <button type="button" role="menuitem" onClick={() => { setCollapsedProjects((prev) => ({ ...prev, [group.id]: false })); onNewChatInProject(group.id); setProjectMenu(null) }}>+ <span>New chat in project</span></button>}
|
|
905
|
+
<button type="button" role="menuitem" className="is-destructive" onClick={() => removeProjectFromSidebar(group.id)}>⌫ <span>Remove from sidebar</span></button>
|
|
906
|
+
</div>
|
|
907
|
+
)}
|
|
908
|
+
{!isCollapsed && (
|
|
909
|
+
<div className="sidebar-project-sessions">
|
|
910
|
+
{visibleSessions.map((session) => (
|
|
911
|
+
<button
|
|
912
|
+
key={session.id}
|
|
913
|
+
className={`sidebar-project sidebar-chat-item is-indented ${session.id === activeConversationId ? 'active' : ''}`}
|
|
914
|
+
onClick={() => onSelectConversation(session.id)}
|
|
915
|
+
title={session.title}
|
|
916
|
+
>
|
|
917
|
+
<span aria-hidden="true" style={{ display: 'inline-flex', alignItems: 'center' }}>
|
|
918
|
+
<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">
|
|
919
|
+
<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>
|
|
920
|
+
</svg>
|
|
921
|
+
</span>
|
|
922
|
+
{editingSessionId === session.id ? (
|
|
923
|
+
<input
|
|
924
|
+
type="text"
|
|
925
|
+
className="sidebar-chat-rename-input"
|
|
926
|
+
value={editTitleValue}
|
|
927
|
+
onChange={(e) => setEditTitleValue(e.target.value)}
|
|
928
|
+
onBlur={() => handleSaveRename(session.id)}
|
|
929
|
+
onKeyDown={(e) => {
|
|
930
|
+
if (e.key === 'Enter') {
|
|
931
|
+
handleSaveRename(session.id)
|
|
932
|
+
} else if (e.key === 'Escape') {
|
|
933
|
+
setEditingSessionId(null)
|
|
934
|
+
}
|
|
935
|
+
}}
|
|
936
|
+
autoFocus
|
|
937
|
+
onClick={(e) => e.stopPropagation()}
|
|
938
|
+
/>
|
|
939
|
+
) : (
|
|
940
|
+
<span className="sidebar-chat-title">{session.title || 'New chat'}</span>
|
|
941
|
+
)}
|
|
942
|
+
{session.id === activeConversationId && sending && (
|
|
943
|
+
<span className="sidebar-generating-text">Thinking...</span>
|
|
944
|
+
)}
|
|
945
|
+
{editingSessionId !== session.id && (
|
|
946
|
+
<>
|
|
947
|
+
<span role="button" tabIndex={0} className="sidebar-conversation-menu-trigger" aria-label={`Actions for ${session.title || 'conversation'}`} onClick={(event) => {
|
|
948
|
+
event.stopPropagation()
|
|
949
|
+
const rect = event.currentTarget.getBoundingClientRect()
|
|
950
|
+
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)) })
|
|
951
|
+
}} onKeyDown={(event) => {
|
|
952
|
+
if (event.key === 'Enter' || event.key === ' ') {
|
|
953
|
+
event.preventDefault(); event.stopPropagation()
|
|
954
|
+
const rect = event.currentTarget.getBoundingClientRect()
|
|
955
|
+
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)) })
|
|
956
|
+
}
|
|
957
|
+
}}><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>
|
|
958
|
+
<span
|
|
959
|
+
className="sidebar-chat-edit"
|
|
960
|
+
role="button"
|
|
961
|
+
tabIndex={0}
|
|
962
|
+
title="Rename conversation"
|
|
963
|
+
onClick={(event) => {
|
|
964
|
+
event.stopPropagation()
|
|
965
|
+
setEditingSessionId(session.id)
|
|
966
|
+
setEditTitleValue(session.title || '')
|
|
967
|
+
}}
|
|
968
|
+
onKeyDown={(event) => {
|
|
969
|
+
if (event.key === 'Enter' || event.key === ' ') {
|
|
970
|
+
event.preventDefault()
|
|
971
|
+
event.stopPropagation()
|
|
972
|
+
setEditingSessionId(session.id)
|
|
973
|
+
setEditTitleValue(session.title || '')
|
|
974
|
+
}
|
|
975
|
+
}}
|
|
976
|
+
>
|
|
977
|
+
<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">
|
|
978
|
+
<path d="M12 20h9"></path>
|
|
979
|
+
<path d="M16.5 3.5a2.121 2.121 0 0 1 3 3L7 19l-4 1 1-4L16.5 3.5z"></path>
|
|
980
|
+
</svg>
|
|
981
|
+
</span>
|
|
982
|
+
{onUpdateSessionWorkspace && (
|
|
983
|
+
<span
|
|
984
|
+
className="sidebar-chat-edit"
|
|
985
|
+
role="button"
|
|
986
|
+
tabIndex={0}
|
|
987
|
+
title="Move conversation..."
|
|
988
|
+
onClick={(event) => openMoveMenu(event, session)}
|
|
989
|
+
onKeyDown={(event) => {
|
|
990
|
+
if (event.key === 'Enter' || event.key === ' ') {
|
|
991
|
+
event.preventDefault()
|
|
992
|
+
openMoveMenu(event as any, session)
|
|
993
|
+
}
|
|
994
|
+
}}
|
|
995
|
+
>
|
|
996
|
+
<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">
|
|
997
|
+
<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>
|
|
998
|
+
<polyline points="12 11 12 17"></polyline>
|
|
999
|
+
<polyline points="9 14 12 11 15 14"></polyline>
|
|
1000
|
+
</svg>
|
|
1001
|
+
</span>
|
|
1002
|
+
)}
|
|
1003
|
+
<span
|
|
1004
|
+
className="sidebar-chat-delete"
|
|
1005
|
+
role="button"
|
|
1006
|
+
tabIndex={0}
|
|
1007
|
+
title="Delete conversation"
|
|
1008
|
+
onClick={(event) => {
|
|
1009
|
+
event.stopPropagation()
|
|
1010
|
+
onDeleteConversation(session.id)
|
|
1011
|
+
}}
|
|
1012
|
+
onKeyDown={(event) => {
|
|
1013
|
+
if (event.key === 'Enter' || event.key === ' ') {
|
|
1014
|
+
event.preventDefault()
|
|
1015
|
+
event.stopPropagation()
|
|
1016
|
+
onDeleteConversation(session.id)
|
|
1017
|
+
}
|
|
1018
|
+
}}
|
|
1019
|
+
>
|
|
1020
|
+
<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">
|
|
1021
|
+
<polyline points="3 6 5 6 21 6"></polyline>
|
|
1022
|
+
<path d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6"></path>
|
|
1023
|
+
<path d="M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"></path>
|
|
1024
|
+
</svg>
|
|
1025
|
+
</span>
|
|
1026
|
+
</>
|
|
1027
|
+
)}
|
|
1028
|
+
</button>
|
|
1029
|
+
))}
|
|
1030
|
+
{hasMore && (
|
|
1031
|
+
<button
|
|
1032
|
+
type="button"
|
|
1033
|
+
className="sidebar-show-more-btn"
|
|
1034
|
+
onClick={() => toggleShowMore(group.id)}
|
|
1035
|
+
>
|
|
1036
|
+
{isExpanded
|
|
1037
|
+
? 'Show less ⌃'
|
|
1038
|
+
: `Show more (${group.sessions.length - maxVisible}) ⌄`}
|
|
1039
|
+
</button>
|
|
1040
|
+
)}
|
|
1041
|
+
</div>
|
|
1042
|
+
)}
|
|
1043
|
+
</div>
|
|
1044
|
+
)
|
|
1045
|
+
})}
|
|
1046
|
+
</div>
|
|
1047
|
+
</>
|
|
1048
|
+
)}
|
|
1049
|
+
|
|
1050
|
+
{(recentSessions.length > 0 || projectGroups.length === 0) && (
|
|
1051
|
+
<>
|
|
1052
|
+
<div className="sidebar-section-title sidebar-subsection-title">
|
|
1053
|
+
{projectGroups.length > 0 ? 'Recents' : 'Conversations'}
|
|
1054
|
+
</div>
|
|
1055
|
+
<div className="sidebar-chat-list">
|
|
1056
|
+
{recentSessions.map((session) => (
|
|
1057
|
+
<button
|
|
1058
|
+
key={session.id}
|
|
1059
|
+
className={`sidebar-project sidebar-chat-item ${session.id === activeConversationId ? 'active' : ''}`}
|
|
1060
|
+
onClick={() => onSelectConversation(session.id)}
|
|
1061
|
+
title={session.title}
|
|
1062
|
+
>
|
|
1063
|
+
<span aria-hidden="true" style={{ display: 'inline-flex', alignItems: 'center' }}>
|
|
1064
|
+
<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">
|
|
1065
|
+
<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
1066
|
</svg>
|
|
503
1067
|
</span>
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
1068
|
+
{editingSessionId === session.id ? (
|
|
1069
|
+
<input
|
|
1070
|
+
type="text"
|
|
1071
|
+
className="sidebar-chat-rename-input"
|
|
1072
|
+
value={editTitleValue}
|
|
1073
|
+
onChange={(e) => setEditTitleValue(e.target.value)}
|
|
1074
|
+
onBlur={() => handleSaveRename(session.id)}
|
|
1075
|
+
onKeyDown={(e) => {
|
|
1076
|
+
if (e.key === 'Enter') {
|
|
1077
|
+
handleSaveRename(session.id)
|
|
1078
|
+
} else if (e.key === 'Escape') {
|
|
1079
|
+
setEditingSessionId(null)
|
|
1080
|
+
}
|
|
1081
|
+
}}
|
|
1082
|
+
autoFocus
|
|
1083
|
+
onClick={(e) => e.stopPropagation()}
|
|
1084
|
+
/>
|
|
1085
|
+
) : (
|
|
1086
|
+
<span className="sidebar-chat-title">{session.title || 'New chat'}</span>
|
|
1087
|
+
)}
|
|
1088
|
+
{session.id === activeConversationId && sending && (
|
|
1089
|
+
<span className="sidebar-generating-text">Thinking...</span>
|
|
1090
|
+
)}
|
|
1091
|
+
{editingSessionId !== session.id && (
|
|
1092
|
+
<>
|
|
1093
|
+
<span role="button" tabIndex={0} className="sidebar-conversation-menu-trigger" aria-label={`Actions for ${session.title || 'conversation'}`} onClick={(event) => {
|
|
516
1094
|
event.stopPropagation()
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
1095
|
+
const rect = event.currentTarget.getBoundingClientRect()
|
|
1096
|
+
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)) })
|
|
1097
|
+
}} onKeyDown={(event) => {
|
|
1098
|
+
if (event.key === 'Enter' || event.key === ' ') {
|
|
1099
|
+
event.preventDefault(); event.stopPropagation()
|
|
1100
|
+
const rect = event.currentTarget.getBoundingClientRect()
|
|
1101
|
+
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)) })
|
|
1102
|
+
}
|
|
1103
|
+
}}><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>
|
|
1104
|
+
<span
|
|
1105
|
+
className="sidebar-chat-edit"
|
|
1106
|
+
role="button"
|
|
1107
|
+
tabIndex={0}
|
|
1108
|
+
title="Rename conversation"
|
|
1109
|
+
onClick={(event) => {
|
|
1110
|
+
event.stopPropagation()
|
|
1111
|
+
setEditingSessionId(session.id)
|
|
1112
|
+
setEditTitleValue(session.title || '')
|
|
1113
|
+
}}
|
|
1114
|
+
onKeyDown={(event) => {
|
|
1115
|
+
if (event.key === 'Enter' || event.key === ' ') {
|
|
1116
|
+
event.preventDefault()
|
|
1117
|
+
event.stopPropagation()
|
|
1118
|
+
setEditingSessionId(session.id)
|
|
1119
|
+
setEditTitleValue(session.title || '')
|
|
1120
|
+
}
|
|
1121
|
+
}}
|
|
1122
|
+
>
|
|
1123
|
+
<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">
|
|
1124
|
+
<path d="M12 20h9"></path>
|
|
1125
|
+
<path d="M16.5 3.5a2.121 2.121 0 0 1 3 3L7 19l-4 1 1-4L16.5 3.5z"></path>
|
|
1126
|
+
</svg>
|
|
1127
|
+
</span>
|
|
1128
|
+
{onUpdateSessionWorkspace && (
|
|
1129
|
+
<span
|
|
1130
|
+
className="sidebar-chat-edit"
|
|
1131
|
+
role="button"
|
|
1132
|
+
tabIndex={0}
|
|
1133
|
+
title="Move conversation..."
|
|
1134
|
+
onClick={(event) => openMoveMenu(event, session)}
|
|
1135
|
+
onKeyDown={(event) => {
|
|
1136
|
+
if (event.key === 'Enter' || event.key === ' ') {
|
|
1137
|
+
event.preventDefault()
|
|
1138
|
+
openMoveMenu(event as any, session)
|
|
1139
|
+
}
|
|
1140
|
+
}}
|
|
1141
|
+
>
|
|
1142
|
+
<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">
|
|
1143
|
+
<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>
|
|
1144
|
+
<polyline points="12 11 12 17"></polyline>
|
|
1145
|
+
<polyline points="9 14 12 11 15 14"></polyline>
|
|
1146
|
+
</svg>
|
|
1147
|
+
</span>
|
|
1148
|
+
)}
|
|
1149
|
+
<span
|
|
1150
|
+
className="sidebar-chat-delete"
|
|
1151
|
+
role="button"
|
|
1152
|
+
tabIndex={0}
|
|
1153
|
+
title="Delete conversation"
|
|
1154
|
+
onClick={(event) => {
|
|
1155
|
+
event.stopPropagation()
|
|
1156
|
+
onDeleteConversation(session.id)
|
|
1157
|
+
}}
|
|
1158
|
+
onKeyDown={(event) => {
|
|
1159
|
+
if (event.key === 'Enter' || event.key === ' ') {
|
|
1160
|
+
event.preventDefault()
|
|
1161
|
+
event.stopPropagation()
|
|
1162
|
+
onDeleteConversation(session.id)
|
|
1163
|
+
}
|
|
1164
|
+
}}
|
|
1165
|
+
>
|
|
1166
|
+
<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">
|
|
1167
|
+
<polyline points="3 6 5 6 21 6"></polyline>
|
|
1168
|
+
<path d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6"></path>
|
|
1169
|
+
<path d="M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"></path>
|
|
1170
|
+
</svg>
|
|
1171
|
+
</span>
|
|
1172
|
+
</>
|
|
1173
|
+
)}
|
|
1174
|
+
</button>
|
|
1175
|
+
))}
|
|
1176
|
+
</div>
|
|
1177
|
+
</>
|
|
1178
|
+
)}
|
|
532
1179
|
</div>
|
|
1180
|
+
)}
|
|
533
1181
|
|
|
534
1182
|
{user && (
|
|
535
1183
|
<div className="sidebar-account-container" ref={accountContainerRef}>
|
|
@@ -553,7 +1201,7 @@ export default function DashboardSidebar({
|
|
|
553
1201
|
</button>
|
|
554
1202
|
<button className={`popover-item ${view === 'mcp' ? 'active' : ''}`} onClick={() => { onSetView('mcp'); setIsAccountMenuOpen(false); }}>
|
|
555
1203
|
<span aria-hidden="true" style={{ display: 'inline-flex', alignItems: 'center' }}>{renderMcpHubSvgIcon(15)}</span>
|
|
556
|
-
<span>MCP
|
|
1204
|
+
<span>MCP servers</span>
|
|
557
1205
|
</button>
|
|
558
1206
|
<button className={`popover-item ${view === 'plugins' ? 'active' : ''}`} onClick={() => { onSetView('plugins'); setIsAccountMenuOpen(false); }}>
|
|
559
1207
|
<span aria-hidden="true" style={{ display: 'inline-flex', alignItems: 'center' }}>{renderPluginsSvgIcon(15)}</span>
|
|
@@ -561,11 +1209,11 @@ export default function DashboardSidebar({
|
|
|
561
1209
|
</button>
|
|
562
1210
|
<button className={`popover-item ${view === 'cron' ? 'active' : ''}`} onClick={() => { onSetView('cron'); setIsAccountMenuOpen(false); }}>
|
|
563
1211
|
<span aria-hidden="true" style={{ display: 'inline-flex', alignItems: 'center' }}>{renderScheduledTasksSvgIcon(15)}</span>
|
|
564
|
-
<span>Scheduled
|
|
1212
|
+
<span>Scheduled tasks</span>
|
|
565
1213
|
</button>
|
|
566
1214
|
<button className={`popover-item ${view === 'link' ? 'active' : ''}`} onClick={() => { onSetView('link'); setIsAccountMenuOpen(false); }}>
|
|
567
1215
|
<span aria-hidden="true" style={{ display: 'inline-flex', alignItems: 'center' }}>{renderLinkedFoldersSvgIcon(15)}</span>
|
|
568
|
-
<span>Linked
|
|
1216
|
+
<span>Linked folders</span>
|
|
569
1217
|
</button>
|
|
570
1218
|
<div className="sidebar-account-menu-divider" />
|
|
571
1219
|
<button className="popover-item" onClick={() => { setIsAccountMenuOpen(false); logout(); }}>
|
|
@@ -599,6 +1247,95 @@ export default function DashboardSidebar({
|
|
|
599
1247
|
</button>
|
|
600
1248
|
</div>
|
|
601
1249
|
)}
|
|
1250
|
+
|
|
1251
|
+
{moveMenu && (
|
|
1252
|
+
<div
|
|
1253
|
+
ref={moveMenuRef}
|
|
1254
|
+
className="sidebar-move-popover"
|
|
1255
|
+
style={{
|
|
1256
|
+
position: 'fixed',
|
|
1257
|
+
top: `${moveMenu.top}px`,
|
|
1258
|
+
left: `${moveMenu.left}px`,
|
|
1259
|
+
zIndex: 99999,
|
|
1260
|
+
}}
|
|
1261
|
+
onClick={(e) => e.stopPropagation()}
|
|
1262
|
+
>
|
|
1263
|
+
<div className="sidebar-move-header">Move to Project</div>
|
|
1264
|
+
<div className="sidebar-move-list">
|
|
1265
|
+
{availableProjects.map((p) => {
|
|
1266
|
+
const isCurrent = moveMenu.currentWorkspacePath === p.path
|
|
1267
|
+
return (
|
|
1268
|
+
<button
|
|
1269
|
+
key={p.path}
|
|
1270
|
+
type="button"
|
|
1271
|
+
className={`sidebar-move-item ${isCurrent ? 'is-current' : ''}`}
|
|
1272
|
+
onClick={() => {
|
|
1273
|
+
onUpdateSessionWorkspace?.(moveMenu.sessionId, p.path)
|
|
1274
|
+
setMoveMenu(null)
|
|
1275
|
+
}}
|
|
1276
|
+
title={p.path}
|
|
1277
|
+
>
|
|
1278
|
+
<span className="sidebar-move-item-icon">📁</span>
|
|
1279
|
+
<span className="sidebar-move-item-name">{p.name}</span>
|
|
1280
|
+
{isCurrent && <span className="sidebar-move-item-check">✓</span>}
|
|
1281
|
+
</button>
|
|
1282
|
+
)
|
|
1283
|
+
})}
|
|
1284
|
+
</div>
|
|
1285
|
+
|
|
1286
|
+
<div className="sidebar-move-divider" />
|
|
1287
|
+
|
|
1288
|
+
<button
|
|
1289
|
+
type="button"
|
|
1290
|
+
className={`sidebar-move-item ${!moveMenu.currentWorkspacePath ? 'is-current' : ''}`}
|
|
1291
|
+
onClick={() => {
|
|
1292
|
+
onUpdateSessionWorkspace?.(moveMenu.sessionId, null)
|
|
1293
|
+
setMoveMenu(null)
|
|
1294
|
+
}}
|
|
1295
|
+
>
|
|
1296
|
+
<span className="sidebar-move-item-icon">
|
|
1297
|
+
<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">
|
|
1298
|
+
<polyline points="9 14 4 9 9 4"></polyline>
|
|
1299
|
+
<path d="M20 20v-7a4 4 0 0 0-4-4H4"></path>
|
|
1300
|
+
</svg>
|
|
1301
|
+
</span>
|
|
1302
|
+
<span className="sidebar-move-item-name">Recents (No project)</span>
|
|
1303
|
+
{!moveMenu.currentWorkspacePath && <span className="sidebar-move-item-check">✓</span>}
|
|
1304
|
+
</button>
|
|
1305
|
+
|
|
1306
|
+
{onBrowseFolder && (
|
|
1307
|
+
<button
|
|
1308
|
+
type="button"
|
|
1309
|
+
className="sidebar-move-item"
|
|
1310
|
+
onClick={async () => {
|
|
1311
|
+
const picked = await onBrowseFolder()
|
|
1312
|
+
if (picked) {
|
|
1313
|
+
onUpdateSessionWorkspace?.(moveMenu.sessionId, picked)
|
|
1314
|
+
}
|
|
1315
|
+
setMoveMenu(null)
|
|
1316
|
+
}}
|
|
1317
|
+
>
|
|
1318
|
+
<span className="sidebar-move-item-icon">
|
|
1319
|
+
<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">
|
|
1320
|
+
<line x1="12" y1="5" x2="12" y2="19"></line>
|
|
1321
|
+
<line x1="5" y1="12" x2="19" y2="12"></line>
|
|
1322
|
+
</svg>
|
|
1323
|
+
</span>
|
|
1324
|
+
<span className="sidebar-move-item-name">Choose folder...</span>
|
|
1325
|
+
</button>
|
|
1326
|
+
)}
|
|
1327
|
+
</div>
|
|
1328
|
+
)}
|
|
1329
|
+
|
|
1330
|
+
{conversationMenu && (() => {
|
|
1331
|
+
const session = conversationSessions.find((item) => item.id === conversationMenu.sessionId)
|
|
1332
|
+
if (!session) return null
|
|
1333
|
+
return <div className="sidebar-conversation-menu-popover" role="menu" style={{ top: conversationMenu.top, left: conversationMenu.left }} onClick={(event) => event.stopPropagation()}>
|
|
1334
|
+
<button type="button" role="menuitem" onClick={() => { setEditingSessionId(session.id); setEditTitleValue(session.title || ''); setConversationMenu(null) }}>✎ <span>Rename</span></button>
|
|
1335
|
+
{onUpdateSessionWorkspace && <button type="button" role="menuitem" onClick={(event) => { setConversationMenu(null); openMoveMenu(event as any, session) }}>↗ <span>Move to project</span></button>}
|
|
1336
|
+
<button type="button" role="menuitem" className="is-destructive" onClick={() => { onDeleteConversation(session.id); setConversationMenu(null) }}>⌫ <span>Delete conversation</span></button>
|
|
1337
|
+
</div>
|
|
1338
|
+
})()}
|
|
602
1339
|
</aside>
|
|
603
1340
|
)
|
|
604
1341
|
}
|