@pheem49/mint 1.17.0 ā 1.18.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Cargo.lock +6 -6
- package/Cargo.toml +2 -2
- package/README.md +8 -2
- package/Release_Note.md +222 -71
- package/crates/mint-cli/src/agent/diff_render.rs +66 -44
- package/crates/mint-cli/src/agent/live_status.rs +21 -4
- package/crates/mint-cli/src/agent/markdown_render.rs +342 -5
- package/crates/mint-cli/src/agent.rs +25 -10
- package/crates/mint-cli/src/commands/agent.rs +4 -92
- package/crates/mint-cli/src/commands/browser.rs +2 -15
- package/crates/mint-cli/src/commands/integrations.rs +3 -3
- package/crates/mint-cli/src/commands/mod.rs +0 -3
- package/crates/mint-cli/src/commands/tailnet_web.rs +1 -0
- package/crates/mint-cli/src/interactive/chat_tui/dialog.rs +572 -0
- package/crates/mint-cli/src/interactive/chat_tui/mod.rs +1427 -0
- package/crates/mint-cli/src/interactive/chat_tui/render.rs +1524 -0
- package/crates/mint-cli/src/interactive/chat_tui/selection.rs +401 -0
- package/crates/mint-cli/src/interactive/chat_tui/state.rs +1833 -0
- package/crates/mint-cli/src/interactive/chat_tui/tests.rs +3414 -0
- package/crates/mint-cli/src/interactive/chat_tui/thought.rs +202 -0
- package/crates/mint-cli/src/interactive/chat_tui/transcript.rs +728 -0
- package/crates/mint-cli/src/interactive/chat_tui/watermark.rs +148 -0
- package/crates/mint-cli/src/interactive/command_ui.rs +53 -5
- package/crates/mint-cli/src/interactive/composer.rs +186 -0
- package/crates/mint-cli/src/interactive/format.rs +78 -3
- package/crates/mint-cli/src/interactive/input_box.rs +61 -1
- package/crates/mint-cli/src/interactive/resume_picker.rs +367 -25
- package/crates/mint-cli/src/interactive/slash_commands.rs +648 -371
- package/crates/mint-cli/src/interactive/tool_activity.rs +93 -20
- package/crates/mint-cli/src/interactive.rs +37 -0
- package/crates/mint-cli/src/main.rs +6 -3
- package/crates/mint-cli/src/markdown.rs +2 -37
- package/crates/mint-cli/src/onboard.rs +700 -282
- package/crates/mint-cli/src/setup.rs +1342 -624
- package/crates/mint-cli/src/terminal_theme.rs +159 -35
- package/crates/mint-cli/tests/library_intake.rs +1 -0
- package/crates/mint-core/src/agent/chat/anthropic.rs +318 -0
- package/crates/mint-core/src/agent/chat/custom.rs +149 -0
- package/crates/mint-core/src/agent/chat/gemini.rs +518 -0
- package/crates/mint-core/src/agent/chat/mod.rs +857 -0
- package/crates/mint-core/src/agent/chat/ollama.rs +321 -0
- package/crates/mint-core/src/agent/chat/openai.rs +582 -0
- package/crates/mint-core/src/agent/chat/streaming.rs +469 -0
- package/crates/mint-core/src/agent/chat/tests.rs +1479 -0
- package/crates/mint-core/src/agent/memory.rs +56 -2
- package/crates/mint-core/src/agent/tasks.rs +2 -2
- package/crates/mint-core/src/api_server/routes/chat.rs +24 -2
- package/crates/mint-core/src/api_server/routes/gemini_live.rs +14 -1
- package/crates/mint-core/src/api_server/routes/html_preview.rs +1 -8
- package/crates/mint-core/src/api_server/routes/sessions.rs +21 -0
- package/crates/mint-core/src/avatar_bridge.rs +0 -22
- package/crates/mint-core/src/browser/cdp.rs +10 -4
- package/crates/mint-core/src/browser/headless.rs +582 -0
- package/crates/mint-core/src/browser/input.rs +7 -62
- package/crates/mint-core/src/browser/interact.rs +0 -14
- package/crates/mint-core/src/browser/mod.rs +8 -29
- package/crates/mint-core/src/browser/navigate.rs +2 -36
- package/crates/mint-core/src/browser/runtime.rs +2 -4
- package/crates/mint-core/src/browser/session.rs +50 -466
- package/crates/mint-core/src/browser/workflow.rs +142 -32
- package/crates/mint-core/src/cron/store.rs +2 -2
- package/crates/mint-core/src/integrations/mcp.rs +6 -8
- package/crates/mint-core/src/lib.rs +0 -5
- package/crates/mint-core/src/media/gemini_live.rs +636 -86
- package/crates/mint-core/src/media/library/migration.rs +26 -0
- package/crates/mint-core/src/media/library/tests.rs +1 -1
- package/crates/mint-core/src/media/library/thumbnails.rs +8 -2
- package/crates/mint-core/src/media/pictures.rs +1 -1
- package/crates/mint-core/src/media/tool_images.rs +92 -1
- package/crates/mint-core/src/mods/manager.rs +101 -35
- package/crates/mint-core/src/orchestration/context_render.rs +441 -24
- package/crates/mint-core/src/orchestration/decision_parsing.rs +531 -16
- package/crates/mint-core/src/orchestration/full_skill_result_tests.rs +12 -0
- package/crates/mint-core/src/orchestration/loop_guard.rs +145 -0
- package/crates/mint-core/src/orchestration/mcp_outcome_tests.rs +864 -0
- package/crates/mint-core/src/orchestration/memory_skill.rs +88 -28
- package/crates/mint-core/src/orchestration/mod.rs +320 -4249
- package/crates/mint-core/src/orchestration/reliability.rs +67 -27
- package/crates/mint-core/src/orchestration/review_regressions.rs +5 -0
- package/crates/mint-core/src/orchestration/tests.rs +1665 -0
- package/crates/mint-core/src/orchestration/tools/dispatch.rs +967 -0
- package/crates/mint-core/src/orchestration/tools/files.rs +1 -0
- package/crates/mint-core/src/orchestration/tools/mod.rs +5 -1
- package/crates/mint-core/src/orchestration/tools/planning.rs +102 -42
- package/crates/mint-core/src/orchestration/tools/shell.rs +129 -58
- package/crates/mint-core/src/orchestration/truncation.rs +170 -13
- package/crates/mint-core/src/orchestration/types.rs +648 -0
- package/crates/mint-core/src/orchestration/verification.rs +0 -3
- package/crates/mint-core/src/orchestration/workspace_helpers.rs +24 -6
- package/crates/mint-core/src/prompts/agent.rs +52 -76
- package/crates/mint-core/src/prompts/tool_catalog.rs +8 -151
- package/crates/mint-core/src/search/files.rs +20 -0
- package/crates/mint-core/src/slash/mod.rs +228 -265
- package/crates/mint-core/src/slash/models.rs +6 -1
- package/crates/mint-core/src/system/bg_shell.rs +1 -0
- package/crates/mint-core/src/system/config.rs +176 -34
- package/crates/mint-mod-runtime/src/lib.rs +37 -23
- package/out/web/assets/ArtifactPreviewPanel-Cx6BVOOF.js +2 -0
- package/out/web/assets/CalculationCard-D2E74u5q.js +1 -0
- package/out/web/assets/CliSessionsView-ZbdtSjvK.css +1 -0
- package/out/web/assets/{CliSessionsView-MI8kXMAb.js ā CliSessionsView-z5i6qGyb.js} +1 -1
- package/out/web/assets/CodeReviewPage-BK2bOScd.css +1 -0
- package/out/web/assets/CodeReviewPage-Dp6zHuHu.js +2 -0
- package/out/web/assets/{CommandPalette-BD8SlTE5.js ā CommandPalette-DaKlzbKs.js} +1 -1
- package/out/web/assets/ImageGenCard-BMCJHP9O.js +1 -0
- package/out/web/assets/ImageSearchCard-Cld_SOUg.js +1 -0
- package/out/web/assets/{ImageStudioPanel-BP7N4rLr.js ā ImageStudioPanel-B5N7TjeB.js} +1 -1
- package/out/web/assets/LibraryPage-CMB89rJ0.css +1 -0
- package/out/web/assets/LibraryPage-DbZEi4W_.js +2 -0
- package/out/web/assets/LinkedFoldersView-9B9DIPoZ.js +1 -0
- package/out/web/assets/{McpRegistryPicker-CoS83vtc.js ā McpRegistryPicker-DnXPlzI7.js} +1 -1
- package/out/web/assets/McpServersView-CiNBNUl4.js +1 -0
- package/out/web/assets/MermaidCard-BBDNEXbY.js +2 -0
- package/out/web/assets/MintDashboard-C_UYPoNV.js +119 -0
- package/out/web/assets/MintDashboard-DTd8C_c8.css +1 -0
- package/out/web/assets/PlanCard-C2x5pajq.js +1 -0
- package/out/web/assets/{PluginsView-jBYmcKh4.js ā PluginsView-DoTg9MVa.js} +1 -1
- package/out/web/assets/RewindModal-B5oowrR0.js +1 -0
- package/out/web/assets/{ScheduledTasksView-5uw9-V9H.js ā ScheduledTasksView-BD5DVPkZ.js} +1 -1
- package/out/web/assets/{SelectField-DXBQtrUK.js ā SelectField-Cy6CghrU.js} +1 -1
- package/out/web/assets/SettingsWindow-BYl_oCFh.js +4 -0
- package/out/web/assets/SettingsWindow-Ckcgnjt8.css +1 -0
- package/out/web/assets/{SkillsView-C-gp9J7m.js ā SkillsView-CIeWwq5z.js} +1 -1
- package/out/web/assets/StockCard-DxUciKyp.js +1 -0
- package/out/web/assets/ToolSurfacePage-qBgs_VHq.css +1 -0
- package/out/web/assets/ToolSurfacePage-saVbVrkE.js +38 -0
- package/out/web/assets/{UiFeatureCard-6BwxTOCe.js ā UiFeatureCard-CdY0hGWy.js} +1 -1
- package/out/web/assets/{UiGridCard-DvZcLNxb.js ā UiGridCard-BBK3I5hC.js} +1 -1
- package/out/web/assets/UiMockupWidget-CpR9EDuc.js +1 -0
- package/out/web/assets/{VeoStudioPanel-DOj7_WR3.css ā VeoStudioPanel-9kU9YLEN.css} +1 -1
- package/out/web/assets/{VeoStudioPanel-DfsOJKv0.js ā VeoStudioPanel-Co6-wEWM.js} +2 -2
- package/out/web/assets/WeatherCard-Buzi7Vfu.js +1 -0
- package/out/web/assets/WorkspacePdfPreview-Bi8Zzyir.js +2 -0
- package/out/web/assets/{abnfDiagram-VCTEODGH-BOo3Ckng.js ā abnfDiagram-VCTEODGH-CMfR95N2.js} +1 -1
- package/out/web/assets/{architecture-7GRP2DOG-ZOwheW3n.js ā architecture-7GRP2DOG-DhAM4HyO.js} +1 -1
- package/out/web/assets/{architectureDiagram-5GKGNRK7-DC2FDzVd.js ā architectureDiagram-5GKGNRK7-Yk3TUJ_F.js} +1 -1
- package/out/web/assets/{blockDiagram-I7D4REHJ-BrKFWdAH.js ā blockDiagram-I7D4REHJ-X9fBgJik.js} +1 -1
- package/out/web/assets/{c4Diagram-7LVT6UL2-BHTHK1Yd.js ā c4Diagram-7LVT6UL2-Bk9x7N-8.js} +1 -1
- package/out/web/assets/{chunk-4HAMMTFA-BYFkZwNj.js ā chunk-4HAMMTFA-Dx5fk1_0.js} +1 -1
- package/out/web/assets/{chunk-75Z2AOVW-BSKfSKSA.js ā chunk-75Z2AOVW-BszTQoM4.js} +1 -1
- package/out/web/assets/{chunk-DU6HZSFF-vIhsiW6n.js ā chunk-DU6HZSFF-DK-As3rk.js} +1 -1
- package/out/web/assets/{chunk-F27PBJKO-BlYpW9xq.js ā chunk-F27PBJKO-LmncZZIS.js} +1 -1
- package/out/web/assets/{chunk-GMAD6QVW-BIBz_Ug5.js ā chunk-GMAD6QVW-DSQ_sDRJ.js} +1 -1
- package/out/web/assets/{chunk-GVQU2GXP-NPSHxeqC.js ā chunk-GVQU2GXP-Cno3ulje.js} +1 -1
- package/out/web/assets/{chunk-IMKFNOWR-YlJK8_Fp.js ā chunk-IMKFNOWR-bIzfY9Jc.js} +1 -1
- package/out/web/assets/{chunk-L3NEJ4N5-DMYi4-af.js ā chunk-L3NEJ4N5-Dl6eOa0D.js} +1 -1
- package/out/web/assets/{chunk-OSK3NFVY-Begd3-jA.js ā chunk-OSK3NFVY-BaUGJ-cM.js} +1 -1
- package/out/web/assets/{chunk-P2QGCYS3-D1I4xFHN.js ā chunk-P2QGCYS3-_066ndhH.js} +1 -1
- package/out/web/assets/{chunk-POPQ4Y6H-CafZZzNE.js ā chunk-POPQ4Y6H-YT1AKhTv.js} +1 -1
- package/out/web/assets/{chunk-PWAF6VOD-Dwh6_Lnt.js ā chunk-PWAF6VOD-CrEgDsxh.js} +1 -1
- package/out/web/assets/{chunk-SHT3W25Y-B0XrCSEb.js ā chunk-SHT3W25Y-_KwaRLOl.js} +1 -1
- package/out/web/assets/{chunk-SVP7TREG-CxLsddxC.js ā chunk-SVP7TREG-BQ1qb32L.js} +1 -1
- package/out/web/assets/{chunk-TICWLB2K-y156QInb.js ā chunk-TICWLB2K-BDyehCtg.js} +1 -1
- package/out/web/assets/classDiagram-ZZMXUADV-BoSpzRCJ.js +1 -0
- package/out/web/assets/classDiagram-v2-VYDZK3BY-BoSpzRCJ.js +1 -0
- package/out/web/assets/{config-DqXJXeZM.css ā config-2suVFPZg.css} +1 -1
- package/out/web/assets/config-CkRCdkxn.js +2 -0
- package/out/web/assets/{cynefin-OW5HDTMX-SMVvrLf-.js ā cynefin-OW5HDTMX-Dl_31aaN.js} +1 -1
- package/out/web/assets/{cynefinDiagram-5FMLGOSQ-rZznN24T.js ā cynefinDiagram-5FMLGOSQ-Bpir8jha.js} +1 -1
- package/out/web/assets/{dagre-GXQ25YYZ-BOToydFu.js ā dagre-GXQ25YYZ-D9xu3nsq.js} +1 -1
- package/out/web/assets/{diagram-S7CK7UJ4-TMVaGQEJ.js ā diagram-S7CK7UJ4-DeveoEeB.js} +1 -1
- package/out/web/assets/{diagram-UQ7AKVKN-C2JK-GP2.js ā diagram-UQ7AKVKN-p4xWRESV.js} +1 -1
- package/out/web/assets/{diagram-VSXAHHWV-Cw8VSi2K.js ā diagram-VSXAHHWV-C7qz9NDF.js} +1 -1
- package/out/web/assets/{diagram-VX7I27RA-DXp4fKk9.js ā diagram-VX7I27RA-DRiCa3Vd.js} +1 -1
- package/out/web/assets/{diagram-Z3DM3KII-CzSicYiW.js ā diagram-Z3DM3KII-Bt7zduQX.js} +1 -1
- package/out/web/assets/{ebnfDiagram-PWID7BFC-Dqj-zqPu.js ā ebnfDiagram-PWID7BFC-DV9WpwdR.js} +1 -1
- package/out/web/assets/{erDiagram-RLTQ6QDP-DZwFZAuD.js ā erDiagram-RLTQ6QDP-BJ_nwG2m.js} +1 -1
- package/out/web/assets/{eventmodeling-NTZA5JFV-C0O-Lvgp.js ā eventmodeling-NTZA5JFV-BTBMrfVa.js} +1 -1
- package/out/web/assets/flowDiagram-HODETNUW-Cdlq3cJL.js +1 -0
- package/out/web/assets/{ganttDiagram-EL5Y4UJY-Da4ULXTl.js ā ganttDiagram-EL5Y4UJY-DQLdsXrC.js} +1 -1
- package/out/web/assets/{gitGraph-4MIJSDKK-B9wNFZIP.js ā gitGraph-4MIJSDKK-CL1OEOQ_.js} +1 -1
- package/out/web/assets/{gitGraphDiagram-WWUBYQGX-RjrhB0MP.js ā gitGraphDiagram-WWUBYQGX-8cSi42H7.js} +1 -1
- package/out/web/assets/index-BocxnrDG.js +168 -0
- package/out/web/assets/index-yeh_r55a.css +1 -0
- package/out/web/assets/{info-A6RAGUB7-B3dfCpeY.js ā info-A6RAGUB7-C1zsX5sc.js} +1 -1
- package/out/web/assets/{infoDiagram-27XIBGKW-QVWkLVx7.js ā infoDiagram-27XIBGKW-DsRYtIyI.js} +1 -1
- package/out/web/assets/{ishikawaDiagram-5VMMS53U-CLFNIRI9.js ā ishikawaDiagram-5VMMS53U-B2crwIXj.js} +1 -1
- package/out/web/assets/{journeyDiagram-3NMN7TZE-fgOQadYF.js ā journeyDiagram-3NMN7TZE-BTH-GyVR.js} +1 -1
- package/out/web/assets/{kanban-definition-UXKFOSKX-G3Q_9g9O.js ā kanban-definition-UXKFOSKX-BeRfCnuA.js} +1 -1
- package/out/web/assets/{mermaid-parser.core-v3Jm7nco.js ā mermaid-parser.core-BJwgCBBc.js} +3 -3
- package/out/web/assets/{mermaid.core-DTEjLUA1.js ā mermaid.core-CsDDodN8.js} +4 -4
- package/out/web/assets/{mindmap-definition-YA3MSWOX-C_D42_fF.js ā mindmap-definition-YA3MSWOX-B42efOQ1.js} +1 -1
- package/out/web/assets/{modelManager-BPLycQrN.js ā modelManager-B3ZFMh8v.js} +2 -2
- package/out/web/assets/{oauthManager-BUK7ic7q.js ā oauthManager-Ch5Du2fF.js} +1 -1
- package/out/web/assets/{packet-AYTQ26CC-B-R-SHlF.js ā packet-AYTQ26CC-B6xUyE6r.js} +1 -1
- package/out/web/assets/{pegDiagram-XKGWAZYB-Da2q_giz.js ā pegDiagram-XKGWAZYB-1LabVycL.js} +1 -1
- package/out/web/assets/{pie-WAS4IAKB-BC8F0N7-.js ā pie-WAS4IAKB-DJwo-nf_.js} +1 -1
- package/out/web/assets/{pieDiagram-E7YTZNPT-Iy9REJNC.js ā pieDiagram-E7YTZNPT-icmAqzy4.js} +1 -1
- package/out/web/assets/{quadrantDiagram-AXDQQJYC-ztsiYw7h.js ā quadrantDiagram-AXDQQJYC-CZ-wEx41.js} +1 -1
- package/out/web/assets/{radar-RG4KPBEZ-B_1P8Z_z.js ā radar-RG4KPBEZ-D7d-Xriw.js} +1 -1
- package/out/web/assets/{railroad-74A4TZTK-DuTqczSo.js ā railroad-74A4TZTK-viuhdYbs.js} +1 -1
- package/out/web/assets/{railroad-abnf-HS5TGJTU-Df29WLmp.js ā railroad-abnf-HS5TGJTU-DNXiCNea.js} +1 -1
- package/out/web/assets/{railroad-ebnf-LZEXJU2U-ePFMo-qp.js ā railroad-ebnf-LZEXJU2U-nkSu1-0C.js} +1 -1
- package/out/web/assets/{railroad-peg-WCYAUIDC-DYXLW4_E.js ā railroad-peg-WCYAUIDC-BhbMeQzz.js} +1 -1
- package/out/web/assets/{railroadDiagram-O6MQD6OU-LStnZf2S.js ā railroadDiagram-O6MQD6OU-CLpG1jUX.js} +1 -1
- package/out/web/assets/{requirementDiagram-BXWQKSXE-DmzonMH-.js ā requirementDiagram-BXWQKSXE-kRDrvWrc.js} +1 -1
- package/out/web/assets/{sankeyDiagram-P5KCCOFB-B8vjmUU1.js ā sankeyDiagram-P5KCCOFB-DxAwmq4x.js} +1 -1
- package/out/web/assets/{sequenceDiagram-WJ2MYXX4-CTnplOAX.js ā sequenceDiagram-WJ2MYXX4-aLgY-6Wz.js} +1 -1
- package/out/web/assets/{stateDiagram-D77RDMKH-BFrIaLdI.js ā stateDiagram-D77RDMKH-D5QWfOhp.js} +1 -1
- package/out/web/assets/stateDiagram-v2-MP3YSRHH-D6OiZoAP.js +1 -0
- package/out/web/assets/{swimlanes-42K2YHIH-BXGngUNU.js ā swimlanes-42K2YHIH-CRs5UyA-.js} +1 -1
- package/out/web/assets/swimlanesDiagram-VR7AAH4N-UgEXIsV0.js +8 -0
- package/out/web/assets/syntaxHighlight-C-wAGT84.js +3 -0
- package/out/web/assets/{timeline-definition-24CTP7MA-CegH7n43.js ā timeline-definition-24CTP7MA-Denqd9qb.js} +1 -1
- package/out/web/assets/{treeView-Q6P3EWNA-DTpJv2Tw.js ā treeView-Q6P3EWNA-0my3Z3s4.js} +1 -1
- package/out/web/assets/{treemap-WGGIJYW6-i8M9iJU6.js ā treemap-WGGIJYW6-B_EjkLYq.js} +1 -1
- package/out/web/assets/{vennDiagram-4TSXK5OY-Dpzo1S8U.js ā vennDiagram-4TSXK5OY-DxVg3Ewr.js} +1 -1
- package/out/web/assets/{wardley-WFR3VGLG-BrNsgtfw.js ā wardley-WFR3VGLG-CGD-Tj4p.js} +1 -1
- package/out/web/assets/{wardleyDiagram-VM6X3IG4-lQ92LFE1.js ā wardleyDiagram-VM6X3IG4-CmfS39Xm.js} +1 -1
- package/out/web/assets/{xychartDiagram-S5SC5T6Z-BaOaEoBd.js ā xychartDiagram-S5SC5T6Z-BVM9bKis.js} +1 -1
- package/out/web/index-web.html +2 -2
- package/out/web/index.html +2 -2
- package/package.json +2 -2
- package/shared-modules/CODEOWNERS +3 -3
- package/shared-modules/SDL2/SDL2_mixer.json +27 -0
- package/shared-modules/appstream/README.md +13 -0
- package/shared-modules/appstream/appstream-compose.json +111 -0
- package/shared-modules/dbus-glib/dbus-glib.json +2 -2
- package/shared-modules/libportal/libportal.json +23 -0
- package/shared-modules/linux-audio/fluidsynth2-static.json +2 -2
- package/shared-modules/linux-audio/fluidsynth2.json +2 -2
- package/shared-modules/linux-audio/libinstpatch.json +2 -2
- package/shared-modules/linux-audio/liblo-static.json +3 -0
- package/shared-modules/luajit/luajit.json +2 -2
- package/shared-modules/squashfs-tools/squashfs-tools.json +0 -3
- package/slash-commands.json +7 -2
- package/src/renderer/node_modules/.vite/vitest/da39a3ee5e6b4b0d3255bfef95601890afd80709/results.json +1 -1
- package/src/renderer/shared/agentProgress.ts +51 -3
- package/src/renderer/shared/components/Settings/AutomationTab.tsx +2 -56
- package/src/renderer/shared/components/Settings/AvatarCropModal.tsx +15 -1
- package/src/renderer/shared/components/Settings/GeneralTab.tsx +25 -12
- package/src/renderer/shared/components/Settings/ThemeTab.test.tsx +45 -0
- package/src/renderer/shared/components/Settings/ThemeTab.tsx +106 -3
- package/src/renderer/shared/components/activity/AgentActivityDrawer.tsx +67 -17
- package/src/renderer/shared/components/activity/AgentActivityTable.tsx +376 -134
- package/src/renderer/shared/components/activity/AskUserActivityCard.test.tsx +122 -0
- package/src/renderer/shared/components/activity/AskUserActivityCard.tsx +70 -0
- package/src/renderer/shared/components/activity/McpToolResults.tsx +39 -2
- package/src/renderer/shared/components/activity/SubagentDagView.tsx +7 -7
- package/src/renderer/shared/components/activity/ViewedImages.tsx +41 -2
- package/src/renderer/shared/components/app/ChunkErrorBoundary.tsx +3 -3
- package/src/renderer/shared/components/app/CommandPalette.tsx +7 -7
- package/src/renderer/shared/components/app/DesktopTitlebar.tsx +2 -2
- package/src/renderer/shared/components/app/MintDashboard.tsx +27 -17
- package/src/renderer/shared/components/app/ModalErrorBoundary.tsx +3 -3
- package/src/renderer/shared/components/cards/CalculationCard.tsx +3 -3
- package/src/renderer/shared/components/cards/ImageGenCard.tsx +2 -2
- package/src/renderer/shared/components/cards/ImageSearchCard.tsx +2 -2
- package/src/renderer/shared/components/cards/MermaidCard.tsx +1 -1
- package/src/renderer/shared/components/cards/PlanCard.test.tsx +41 -0
- package/src/renderer/shared/components/cards/PlanCard.tsx +32 -0
- package/src/renderer/shared/components/cards/ReleaseNotesCard.test.tsx +29 -0
- package/src/renderer/shared/components/cards/ReleaseNotesCard.tsx +137 -0
- package/src/renderer/shared/components/cards/StockCard.tsx +7 -7
- package/src/renderer/shared/components/cards/ToolResultCards.tsx +11 -3
- package/src/renderer/shared/components/cards/UiMockupWidget.tsx +4 -4
- package/src/renderer/shared/components/cards/WeatherCard.tsx +5 -5
- package/src/renderer/shared/components/chat/ApprovalCard.test.tsx +11 -0
- package/src/renderer/shared/components/chat/ApprovalCard.tsx +21 -2
- package/src/renderer/shared/components/chat/ArtifactCards.test.tsx +69 -0
- package/src/renderer/shared/components/chat/ArtifactCards.tsx +238 -0
- package/src/renderer/shared/components/chat/AttachedDocumentCard.test.tsx +39 -0
- package/src/renderer/shared/components/chat/AttachedDocumentCard.tsx +220 -0
- package/src/renderer/shared/components/chat/ChatCodeBlock.test.tsx +33 -0
- package/src/renderer/shared/components/chat/ChatCodeBlock.tsx +15 -1
- package/src/renderer/shared/components/chat/ChatMessageItem.test.tsx +40 -2
- package/src/renderer/shared/components/chat/ChatMessageItem.tsx +180 -34
- package/src/renderer/shared/components/chat/ChatModeSelector.css +227 -0
- package/src/renderer/shared/components/chat/ChatModeSelector.test.tsx +45 -0
- package/src/renderer/shared/components/chat/ChatModeSelector.tsx +198 -0
- package/src/renderer/shared/components/chat/ChatPanel.test.tsx +22 -0
- package/src/renderer/shared/components/chat/ChatPanel.tsx +227 -53
- package/src/renderer/shared/components/chat/DiffReviewModal.tsx +6 -6
- package/src/renderer/shared/components/chat/GeminiLiveOverlay.test.tsx +142 -1
- package/src/renderer/shared/components/chat/GeminiLiveOverlay.tsx +45 -3
- package/src/renderer/shared/components/chat/ModelSelectorPopover.tsx +42 -14
- package/src/renderer/shared/components/chat/RewindModal.tsx +10 -10
- package/src/renderer/shared/components/chat/SlashSuggestions.test.tsx +14 -0
- package/src/renderer/shared/components/chat/SourcesBlock.test.tsx +53 -0
- package/src/renderer/shared/components/chat/SourcesBlock.tsx +236 -90
- package/src/renderer/shared/components/chat/TurnFileChanges.test.tsx +45 -1
- package/src/renderer/shared/components/chat/TurnFileChanges.tsx +202 -169
- package/src/renderer/shared/components/extensions/CliSessionsView.tsx +5 -4
- package/src/renderer/shared/components/extensions/McpRegistryPicker.tsx +3 -3
- package/src/renderer/shared/components/studio/LibraryPage.tsx +48 -5
- package/src/renderer/shared/components/workspace/ArtifactPreviewPanel.tsx +125 -13
- package/src/renderer/shared/components/workspace/CodeReviewPage.test.tsx +50 -0
- package/src/renderer/shared/components/workspace/CodeReviewPage.tsx +77 -16
- package/src/renderer/shared/components/workspace/GitBranchSelector.tsx +78 -22
- package/src/renderer/shared/components/workspace/ToolSurfacePage.test.tsx +13 -0
- package/src/renderer/shared/components/workspace/ToolSurfacePage.tsx +48 -28
- package/src/renderer/shared/components/workspace/WorkspacePdfPreview.tsx +266 -47
- package/src/renderer/shared/components/workspace/WorkspacePreviewActions.test.tsx +18 -6
- package/src/renderer/shared/components/workspace/background-terminals.css +11 -11
- package/src/renderer/shared/constants/config.ts +1 -5
- package/src/renderer/shared/constants/models.test.ts +51 -0
- package/src/renderer/shared/constants/models.ts +139 -32
- package/src/renderer/shared/conversation/lifecycle.test.ts +91 -3
- package/src/renderer/shared/conversation/lifecycle.ts +104 -5
- package/src/renderer/shared/conversation/progressiveStream.test.ts +83 -0
- package/src/renderer/shared/conversation/progressiveStream.ts +219 -0
- package/src/renderer/shared/css/agent-observability.css +133 -0
- package/src/renderer/shared/css/chat-ui-cards.css +13 -13
- package/src/renderer/shared/css/code-review.css +63 -34
- package/src/renderer/shared/css/code-sessions.css +47 -18
- package/src/renderer/shared/css/collapsed-paste.css +1 -1
- package/src/renderer/shared/css/error-notice.css +1 -1
- package/src/renderer/shared/css/file-changes.css +165 -80
- package/src/renderer/shared/css/library.css +105 -10
- package/src/renderer/shared/css/management-views.css +1 -1
- package/src/renderer/shared/css/mcp-results.css +5 -5
- package/src/renderer/shared/css/model-selector.css +18 -18
- package/src/renderer/shared/css/mods.css +7 -7
- package/src/renderer/shared/css/notification-notice.css +2 -2
- package/src/renderer/shared/css/queued-messages.css +5 -5
- package/src/renderer/shared/css/settings/general.css +18 -13
- package/src/renderer/shared/css/settings/profile.css +5 -5
- package/src/renderer/shared/css/settings/theme.css +5 -5
- package/src/renderer/shared/css/slash-choice.css +2 -2
- package/src/renderer/shared/css/slash-suggestions.css +3 -3
- package/src/renderer/shared/css/sources-block.css +41 -2
- package/src/renderer/shared/css/tools-panel.css +2 -2
- package/src/renderer/shared/css/ui-tailwind.css +8 -0
- package/src/renderer/shared/css/veo-studio.css +2 -2
- package/src/renderer/shared/css/viewed-images.css +7 -7
- package/src/renderer/shared/platform.ts +2 -1
- package/src/renderer/shared/theme/themeManager.test.ts +17 -0
- package/src/renderer/shared/theme/themeManager.ts +21 -4
- package/src/renderer/shared/theme/themes.ts +54 -0
- package/src/renderer/shared/theme/tokens.css +6 -4
- package/src/renderer/shared/types.ts +1 -1
- package/src/renderer/shared/utils/agentActivity.test.ts +468 -2
- package/src/renderer/shared/utils/agentActivity.ts +602 -35
- package/src/renderer/shared/utils/artifactBrowser.test.ts +37 -32
- package/src/renderer/shared/utils/artifactBrowser.ts +17 -19
- package/src/renderer/shared/utils/attachedDocument.test.ts +73 -0
- package/src/renderer/shared/utils/attachedDocument.ts +49 -0
- package/src/renderer/shared/utils/fileIcons.test.ts +59 -0
- package/src/renderer/shared/utils/fileIcons.ts +149 -16
- package/src/renderer/shared/utils/markdown.tsx +72 -19
- package/src/renderer/shared/utils/markdown.webImages.test.tsx +16 -0
- package/src/renderer/shared/utils/mcpResults.test.tsx +29 -0
- package/src/renderer/shared/utils/slashCommandProcessor.ts +4 -1
- package/src/renderer/shared/utils/syntaxHighlight.test.tsx +11 -1
- package/src/renderer/shared/utils/syntaxHighlight.tsx +51 -3
- package/src/renderer/shared/utils/useGeminiLiveVoice.ts +324 -51
- package/src/renderer/shared/utils/workspaceDrag.test.ts +153 -0
- package/src/renderer/shared/utils/workspaceDrag.ts +142 -0
- package/src/renderer/shared/utils/workspaceMedia.ts +10 -2
- package/src/renderer/src/App.tsx +14 -8
- package/src/renderer/src/agentProgress.ts +1 -0
- package/src/renderer/src/components/ScreenPicker.css +1 -1
- package/src/renderer/src/components/WorkspacePanel.tsx +6 -5
- package/src/renderer/src/css/app-shell.css +4 -4
- package/src/renderer/src/css/chat.css +1261 -241
- package/src/renderer/src/css/desktop-tools.css +11 -11
- package/src/renderer/src/css/sidebar-workspace.css +2 -2
- package/src/renderer/src/css/tool-surfaces.css +12 -12
- package/src/renderer/src/index.css +38 -20
- package/src/renderer/src/tauri.ts +22 -2
- package/src/renderer/src-web/App.tsx +14 -0
- package/src/renderer/src-web/agentProgress.ts +1 -0
- package/src/renderer/src-web/css/app-shell.css +4 -4
- package/src/renderer/src-web/css/chat.css +1278 -190
- package/src/renderer/src-web/css/mobile.css +29 -13
- package/src/renderer/src-web/css/settings/mobile.css +2 -2
- package/src/renderer/src-web/css/sidebar-workspace.css +1 -1
- package/src/renderer/src-web/index.css +38 -20
- package/src/renderer/src-web/tauri.ts +22 -2
- package/src/renderer/tests/browserArtifacts.browser.tsx +1 -1
- package/src/renderer/tests/library.browser.tsx +3 -0
- package/src/renderer/tests/liveVoice.browser.html +1 -0
- package/src/renderer/tests/workspaceDrop.browser.tsx +1 -1
- package/src-tauri/src/app/lifecycle.rs +1 -14
- package/src-tauri/src/background/headless.rs +14 -8
- package/src-tauri/src/commands/conversation.rs +38 -0
- package/src-tauri/src/native/mod.rs +0 -1
- package/src-tauri/src/native/system.rs +4 -47
- package/crates/mint-cli/src/interactive/chat_tui.rs +0 -8855
- package/crates/mint-core/src/agent/chat.rs +0 -4394
- package/crates/mint-core/src/browser/lifecycle.rs +0 -291
- package/crates/mint-core/src/browser/logging.rs +0 -20
- package/crates/mint-core/src/orchestration/tools/browser.rs +0 -31
- package/out/web/assets/ArtifactPreviewPanel-S0dPfYFx.js +0 -2
- package/out/web/assets/CalculationCard-CRjP3E1j.js +0 -1
- package/out/web/assets/CliSessionsView-C3Br2v5Y.css +0 -1
- package/out/web/assets/CodeReviewPage-CUJceQme.css +0 -1
- package/out/web/assets/CodeReviewPage-VCUgPla_.js +0 -2
- package/out/web/assets/ImageGenCard-BCXxkVJX.js +0 -1
- package/out/web/assets/ImageSearchCard-N3yQOr8Z.js +0 -1
- package/out/web/assets/LibraryPage-DAxUTAg7.css +0 -1
- package/out/web/assets/LibraryPage-WlviRdR8.js +0 -2
- package/out/web/assets/LinkedFoldersView-CKRgroWK.js +0 -1
- package/out/web/assets/McpServersView-D3wHnuHg.js +0 -1
- package/out/web/assets/MermaidCard-NqrHdyJW.js +0 -2
- package/out/web/assets/MintDashboard-B2DJsDDO.css +0 -1
- package/out/web/assets/MintDashboard-COw_xol7.js +0 -63
- package/out/web/assets/RewindModal-DempuDod.js +0 -1
- package/out/web/assets/SettingsWindow-2YP3yj7s.js +0 -4
- package/out/web/assets/SettingsWindow-Dz8LQVgD.css +0 -1
- package/out/web/assets/StockCard-BDMCe7mx.js +0 -1
- package/out/web/assets/ToolSurfacePage-B0J_q0Jl.js +0 -38
- package/out/web/assets/ToolSurfacePage-CRIQ1owD.css +0 -1
- package/out/web/assets/UiMockupWidget-DD73QWg1.js +0 -1
- package/out/web/assets/WeatherCard-CPucIfq8.js +0 -1
- package/out/web/assets/WorkspacePdfPreview-Dx_lkjNu.js +0 -2
- package/out/web/assets/classDiagram-ZZMXUADV-BgJ5WtSp.js +0 -1
- package/out/web/assets/classDiagram-v2-VYDZK3BY-BgJ5WtSp.js +0 -1
- package/out/web/assets/config-CvIO5hkn.js +0 -2
- package/out/web/assets/flowDiagram-HODETNUW-uqCHJond.js +0 -1
- package/out/web/assets/index-BmpulIkg.js +0 -168
- package/out/web/assets/index-CkvBwhX_.css +0 -1
- package/out/web/assets/stateDiagram-v2-MP3YSRHH-uf3kdNW4.js +0 -1
- package/out/web/assets/swimlanesDiagram-VR7AAH4N-Y8q5bQce.js +0 -8
- package/shared-modules/libsecret/libsecret.json +0 -23
- package/shared-modules/libusb/libusb.json +0 -27
- package/shared-modules/lzo/lzo.json +0 -27
- package/src/renderer/src/components/BrowserShell.tsx +0 -108
- package/src/renderer/src/components/BrowserSuggestionsPopup.tsx +0 -91
- package/src/renderer/src/components/browser-shell.css +0 -185
- package/src-tauri/src/native/browser.rs +0 -252
|
@@ -60,14 +60,16 @@
|
|
|
60
60
|
--indigo-600: #4f46e5;
|
|
61
61
|
|
|
62
62
|
/* Base Radii */
|
|
63
|
+
--radius-2xs: 4px;
|
|
63
64
|
--radius-xs: 6px;
|
|
64
65
|
--radius-sm: 8px;
|
|
65
|
-
--radius-md:
|
|
66
|
+
--radius-md: 10px;
|
|
66
67
|
--radius-lg: 14px;
|
|
67
|
-
--radius-xl:
|
|
68
|
-
--radius-2xl:
|
|
69
|
-
--radius-3xl:
|
|
68
|
+
--radius-xl: 18px;
|
|
69
|
+
--radius-2xl: 22px;
|
|
70
|
+
--radius-3xl: 26px;
|
|
70
71
|
--radius-full: 9999px;
|
|
72
|
+
--radius-composer: 24px;
|
|
71
73
|
|
|
72
74
|
/* Default Accent (Mint) */
|
|
73
75
|
--accent-default: var(--mint-500);
|
|
@@ -140,7 +140,7 @@ export type AgentProgress =
|
|
|
140
140
|
| { type: 'ThinkingDelta'; data: { id: string; delta: string; elapsed_ms: number } }
|
|
141
141
|
| { type: 'ExtendedThinking'; data: { id?: string; thought: string; elapsed_ms?: number } }
|
|
142
142
|
| { type: 'ToolStart'; data: { action: string; input: Record<string, unknown>; subagent?: string; callId?: string } }
|
|
143
|
-
| { type: 'ToolEnd'; data: { action: string; input: Record<string, unknown>; result: string; subagent?: string; callId?: string; status?: ToolStatus } }
|
|
143
|
+
| { type: 'ToolEnd'; data: { action: string; input: Record<string, unknown>; result: string; subagent?: string; callId?: string; status?: ToolStatus; elapsed_ms?: number; elapsedMs?: number } }
|
|
144
144
|
| { type: 'PlanUpdated'; data: { plan: ActivePlan } }
|
|
145
145
|
| { type: 'RunCompleted'; data: { summary: RunTelemetrySummary } }
|
|
146
146
|
| { type: 'SubagentStarted'; data: { subagent: string; profile: string; task: string } }
|
|
@@ -1,7 +1,23 @@
|
|
|
1
1
|
import { describe, expect, it } from 'vitest'
|
|
2
|
-
import {
|
|
2
|
+
import {
|
|
3
|
+
describeTool,
|
|
4
|
+
activitiesFrom,
|
|
5
|
+
generateNaturalActivitySummary,
|
|
6
|
+
formatDurationText,
|
|
7
|
+
groupActivities,
|
|
8
|
+
isMarkdownContent,
|
|
9
|
+
cleanMarkdownOutput,
|
|
10
|
+
cleanCommandOutput,
|
|
11
|
+
formatFileSize,
|
|
12
|
+
formatDirectoryListing,
|
|
13
|
+
parseDirectoryEntries,
|
|
14
|
+
summarizeDirectoryListing,
|
|
15
|
+
activityKind,
|
|
16
|
+
isAskUserActivity,
|
|
17
|
+
extractAskUserQuestions,
|
|
18
|
+
} from './agentActivity'
|
|
3
19
|
import { viewedImagesFrom } from './viewedImages'
|
|
4
|
-
import { reduceLiveAgentProgress } from '../agentProgress'
|
|
20
|
+
import { reduceLiveAgentProgress, compactAgentProgressForPersistence, hasAgentDrawerActivity } from '../agentProgress'
|
|
5
21
|
import type { AgentProgress } from '../types'
|
|
6
22
|
|
|
7
23
|
describe('skill reading activity', () => {
|
|
@@ -231,4 +247,454 @@ describe('live progress retention across multi-step turns', () => {
|
|
|
231
247
|
})
|
|
232
248
|
})
|
|
233
249
|
|
|
250
|
+
describe('modern semantic activity timeline metadata', () => {
|
|
251
|
+
it('extracts Analyzed verb and line range for read_file', () => {
|
|
252
|
+
const tool = describeTool('read_file', { path: 'src/App.tsx', startLine: 25, endLine: 50 })
|
|
253
|
+
expect(tool.semanticVerb).toBe('Analyzed')
|
|
254
|
+
expect(tool.lineRange).toBe('#L25-50')
|
|
255
|
+
})
|
|
256
|
+
|
|
257
|
+
it('extracts Edited verb and diff stats for edit_file', () => {
|
|
258
|
+
const tool = describeTool('edit_file', {
|
|
259
|
+
Path: 'src/App.tsx',
|
|
260
|
+
Target: 'line1\nline2',
|
|
261
|
+
Replacement: 'line1\nline2\nline3\nline4',
|
|
262
|
+
})
|
|
263
|
+
expect(tool.kind).toBe('file')
|
|
264
|
+
expect(tool.semanticVerb).toBe('Edited')
|
|
265
|
+
expect(tool.diffStats).toEqual({ additions: 4, deletions: 2 })
|
|
266
|
+
})
|
|
267
|
+
|
|
268
|
+
it('classifies edit_file, write_file, read_file and apply_code_edits as file kind', () => {
|
|
269
|
+
expect(activityKind('edit_file', 'src/main.py')).toBe('file')
|
|
270
|
+
expect(activityKind('write_file', 'src/main.py')).toBe('file')
|
|
271
|
+
expect(activityKind('read_file', 'src/main.py')).toBe('file')
|
|
272
|
+
expect(activityKind('apply_code_edits', 'src/main.py')).toBe('file')
|
|
273
|
+
})
|
|
274
|
+
|
|
275
|
+
it('extracts Ran verb and toolSummary intent for run_command', () => {
|
|
276
|
+
const tool = describeTool('run_command', {
|
|
277
|
+
CommandLine: 'npm run build:ui',
|
|
278
|
+
toolSummary: 'Build UI for Desktop and Web',
|
|
279
|
+
})
|
|
280
|
+
expect(tool.semanticVerb).toBe('Ran')
|
|
281
|
+
expect(tool.intentTitle).toBe('Build UI for Desktop and Web')
|
|
282
|
+
})
|
|
283
|
+
|
|
284
|
+
it('generates natural composite activity summary', () => {
|
|
285
|
+
const view = activitiesFrom([
|
|
286
|
+
{ type: 'ToolStart', data: { action: 'read_file', input: { path: 'a.ts' } } },
|
|
287
|
+
{ type: 'ToolEnd', data: { action: 'read_file', input: { path: 'a.ts' }, result: 'ok' } },
|
|
288
|
+
{ type: 'ToolStart', data: { action: 'run_shell', input: { command: 'cargo check' } } },
|
|
289
|
+
{ type: 'ToolEnd', data: { action: 'run_shell', input: { command: 'cargo check' }, result: 'ok' } },
|
|
290
|
+
{ type: 'ToolStart', data: { action: 'write_file', input: { path: 'b.ts', content: 'hello' } } },
|
|
291
|
+
{ type: 'ToolEnd', data: { action: 'write_file', input: { path: 'b.ts' }, result: 'ok' } },
|
|
292
|
+
])
|
|
293
|
+
expect(view.naturalSummary).toBe('Explored files, ran commands, edited files')
|
|
294
|
+
})
|
|
295
|
+
|
|
296
|
+
it('formats duration cleanly', () => {
|
|
297
|
+
expect(formatDurationText(14)).toBe('14s')
|
|
298
|
+
expect(formatDurationText(120)).toBe('2m')
|
|
299
|
+
expect(formatDurationText(75)).toBe('1m 15s')
|
|
300
|
+
})
|
|
301
|
+
|
|
302
|
+
it('assigns semantic verbs and clean titles to grouped activities', () => {
|
|
303
|
+
const items = [
|
|
304
|
+
describeTool('run_shell', { command: 'echo 1' }),
|
|
305
|
+
describeTool('run_shell', { command: 'echo 2' }),
|
|
306
|
+
]
|
|
307
|
+
const groups = groupActivities(items)
|
|
308
|
+
expect(groups).toHaveLength(1)
|
|
309
|
+
expect(groups[0].semanticVerb).toBe('Ran')
|
|
310
|
+
expect(groups[0].title).toBe('2 commands')
|
|
311
|
+
})
|
|
312
|
+
|
|
313
|
+
it('detects markdown content for skill and doc reads', () => {
|
|
314
|
+
expect(isMarkdownContent('read_file', 'SKILL.md', '# Skill content')).toBe(true)
|
|
315
|
+
expect(isMarkdownContent('read_file', 'README.md', 'Hello world')).toBe(true)
|
|
316
|
+
expect(isMarkdownContent('read_file', 'a.ts', '[Loaded skill: ffmpeg]')).toBe(true)
|
|
317
|
+
expect(isMarkdownContent('run_shell', 'npm test', 'PASS 1 test')).toBe(false)
|
|
318
|
+
expect(isMarkdownContent('read_file', 'src/App.tsx', 'const x = 1;')).toBe(false)
|
|
319
|
+
})
|
|
320
|
+
|
|
321
|
+
it('cleans loaded skill frontmatter into readable markdown callout', () => {
|
|
322
|
+
const raw = `[Loaded skill: ffmpeg-frame-extractor]
|
|
323
|
+
---
|
|
324
|
+
description: Extract video frames without distortion
|
|
325
|
+
revisions: 1
|
|
326
|
+
---
|
|
327
|
+
|
|
328
|
+
# Extracting frames
|
|
329
|
+
## Usage
|
|
330
|
+
- Run command`
|
|
331
|
+
const cleaned = cleanMarkdownOutput(raw)
|
|
332
|
+
expect(cleaned).toContain('**Skill: ffmpeg-frame-extractor**')
|
|
333
|
+
expect(cleaned).toContain('> Extract video frames without distortion')
|
|
334
|
+
expect(cleaned).toContain('# Extracting frames')
|
|
335
|
+
expect(cleaned).not.toContain('---')
|
|
336
|
+
})
|
|
337
|
+
|
|
338
|
+
describe('ask_user activities', () => {
|
|
339
|
+
it('correctly creates an ask_user activity with single query', () => {
|
|
340
|
+
const act = describeTool('ask_user', { query: 'Which database should we use?' })
|
|
341
|
+
expect(isAskUserActivity(act)).toBe(true)
|
|
342
|
+
expect(act.semanticVerb).toBe('Asked')
|
|
343
|
+
expect(act.askUserData?.questions).toHaveLength(1)
|
|
344
|
+
expect(act.askUserData?.questions[0].question).toBe('Which database should we use?')
|
|
345
|
+
})
|
|
346
|
+
|
|
347
|
+
it('correctly creates an ask_user activity with multiple questions', () => {
|
|
348
|
+
const act = describeTool('ask_user', {
|
|
349
|
+
header: 'Architecture Choices',
|
|
350
|
+
questions: [
|
|
351
|
+
{ question: 'Q1: Language?', answer: 'Rust' },
|
|
352
|
+
{ question: 'Q2: Database?', answer: 'PostgreSQL' },
|
|
353
|
+
],
|
|
354
|
+
})
|
|
355
|
+
expect(isAskUserActivity(act)).toBe(true)
|
|
356
|
+
expect(act.askUserData?.header).toBe('Architecture Choices')
|
|
357
|
+
expect(act.askUserData?.questions).toHaveLength(2)
|
|
358
|
+
expect(act.askUserData?.questions[0].question).toBe('Q1: Language?')
|
|
359
|
+
expect(act.askUserData?.questions[0].answer).toBe('Rust')
|
|
360
|
+
})
|
|
361
|
+
|
|
362
|
+
it('attaches answer from ToolEnd event in activitiesFrom', () => {
|
|
363
|
+
const view = activitiesFrom([
|
|
364
|
+
{
|
|
365
|
+
type: 'ToolStart',
|
|
366
|
+
data: {
|
|
367
|
+
action: 'ask_user',
|
|
368
|
+
input: { query: 'Choose a port:' },
|
|
369
|
+
},
|
|
370
|
+
},
|
|
371
|
+
{
|
|
372
|
+
type: 'ToolEnd',
|
|
373
|
+
data: {
|
|
374
|
+
action: 'ask_user',
|
|
375
|
+
result: 'User answered: 8080',
|
|
376
|
+
},
|
|
377
|
+
},
|
|
378
|
+
])
|
|
379
|
+
|
|
380
|
+
expect(view.items).toHaveLength(1)
|
|
381
|
+
const act = view.items[0]
|
|
382
|
+
expect(act.state).toBe('done')
|
|
383
|
+
const questions = extractAskUserQuestions(act)
|
|
384
|
+
expect(questions).toHaveLength(1)
|
|
385
|
+
expect(questions[0].question).toBe('Choose a port:')
|
|
386
|
+
expect(questions[0].answer).toBe('8080')
|
|
387
|
+
})
|
|
388
|
+
|
|
389
|
+
it('extracts questions from legacy (Answered: "...") format in target', () => {
|
|
390
|
+
const legacyAct = {
|
|
391
|
+
label: 'ask_user',
|
|
392
|
+
action: 'ask_user',
|
|
393
|
+
target: '(Answered: "Python 3.11") Which Python version to use?',
|
|
394
|
+
kind: 'tool' as const,
|
|
395
|
+
state: 'done' as const,
|
|
396
|
+
}
|
|
397
|
+
expect(isAskUserActivity(legacyAct)).toBe(true)
|
|
398
|
+
const extracted = extractAskUserQuestions(legacyAct)
|
|
399
|
+
expect(extracted).toHaveLength(1)
|
|
400
|
+
expect(extracted[0].question).toBe('Which Python version to use?')
|
|
401
|
+
expect(extracted[0].answer).toBe('Python 3.11')
|
|
402
|
+
})
|
|
403
|
+
})
|
|
404
|
+
|
|
405
|
+
describe('plan activities and PlanUpdated progress folding', () => {
|
|
406
|
+
it('describes create_plan and update_plan with Planned semantic verb and summary/step count', () => {
|
|
407
|
+
const created = describeTool('create_plan', {
|
|
408
|
+
summary: 'Ship Native Streaming',
|
|
409
|
+
steps: ['Step 1', 'Step 2', 'Step 3'],
|
|
410
|
+
})
|
|
411
|
+
expect(created.semanticVerb).toBe('Planned')
|
|
412
|
+
expect(created.target).toBe('Ship Native Streaming (3 steps)')
|
|
413
|
+
|
|
414
|
+
const updated = describeTool('update_plan', {
|
|
415
|
+
steps: ['done: Step 1', 'in_progress: Step 2'],
|
|
416
|
+
})
|
|
417
|
+
expect(updated.semanticVerb).toBe('Planned')
|
|
418
|
+
expect(updated.target).toBe('2 steps')
|
|
419
|
+
})
|
|
420
|
+
|
|
421
|
+
it('replaces earlier PlanUpdated snapshots in live and persisted progress', () => {
|
|
422
|
+
let progress: AgentProgress[] = []
|
|
423
|
+
progress = reduceLiveAgentProgress(progress, {
|
|
424
|
+
type: 'PlanUpdated',
|
|
425
|
+
data: {
|
|
426
|
+
plan: {
|
|
427
|
+
objective: 'Ship Native Streaming',
|
|
428
|
+
tasks: [{ id: 'step-1', title: 'Write test', status: 'in_progress' }],
|
|
429
|
+
},
|
|
430
|
+
},
|
|
431
|
+
})
|
|
432
|
+
progress = reduceLiveAgentProgress(progress, {
|
|
433
|
+
type: 'PlanUpdated',
|
|
434
|
+
data: {
|
|
435
|
+
plan: {
|
|
436
|
+
objective: 'Ship Native Streaming',
|
|
437
|
+
tasks: [{ id: 'step-1', title: 'Write test', status: 'completed' }],
|
|
438
|
+
},
|
|
439
|
+
},
|
|
440
|
+
})
|
|
441
|
+
|
|
442
|
+
const planEvents = progress.filter((e) => e.type === 'PlanUpdated')
|
|
443
|
+
expect(planEvents).toHaveLength(1)
|
|
444
|
+
expect(planEvents[0].data.plan.tasks[0].status).toBe('completed')
|
|
445
|
+
|
|
446
|
+
const compacted = compactAgentProgressForPersistence([
|
|
447
|
+
{
|
|
448
|
+
type: 'PlanUpdated',
|
|
449
|
+
data: {
|
|
450
|
+
plan: {
|
|
451
|
+
objective: 'Ship Native Streaming',
|
|
452
|
+
tasks: [{ id: 'step-1', title: 'Write test', status: 'in_progress' }],
|
|
453
|
+
},
|
|
454
|
+
},
|
|
455
|
+
},
|
|
456
|
+
{
|
|
457
|
+
type: 'PlanUpdated',
|
|
458
|
+
data: {
|
|
459
|
+
plan: {
|
|
460
|
+
objective: 'Ship Native Streaming',
|
|
461
|
+
tasks: [{ id: 'step-1', title: 'Write test', status: 'completed' }],
|
|
462
|
+
},
|
|
463
|
+
},
|
|
464
|
+
},
|
|
465
|
+
])
|
|
466
|
+
expect(compacted.filter((e) => e.type === 'PlanUpdated')).toHaveLength(1)
|
|
467
|
+
})
|
|
468
|
+
|
|
469
|
+
it('distinguishes pure thinking turns (!agentMode) from turns with agent drawer activity', () => {
|
|
470
|
+
const thinkingOnly: AgentProgress[] = [
|
|
471
|
+
{
|
|
472
|
+
type: 'ThinkingDelta',
|
|
473
|
+
data: { id: 'step-1', delta: 'Let me think...', elapsed_ms: 400 },
|
|
474
|
+
},
|
|
475
|
+
{
|
|
476
|
+
type: 'ExtendedThinking',
|
|
477
|
+
data: { id: 'step-1', thought: 'Let me think carefully.', elapsed_ms: 800 },
|
|
478
|
+
},
|
|
479
|
+
]
|
|
480
|
+
expect(hasAgentDrawerActivity(thinkingOnly)).toBe(false)
|
|
481
|
+
|
|
482
|
+
const withTool: AgentProgress[] = [
|
|
483
|
+
...thinkingOnly,
|
|
484
|
+
{
|
|
485
|
+
type: 'ToolStart',
|
|
486
|
+
data: { call_id: 'c1', action: 'read_file', input: { path: 'README.md' } },
|
|
487
|
+
},
|
|
488
|
+
]
|
|
489
|
+
expect(hasAgentDrawerActivity(withTool)).toBe(true)
|
|
490
|
+
|
|
491
|
+
const withRunSummary: AgentProgress[] = [
|
|
492
|
+
...thinkingOnly,
|
|
493
|
+
{
|
|
494
|
+
type: 'RunCompleted',
|
|
495
|
+
data: {
|
|
496
|
+
summary: {
|
|
497
|
+
outcome: 'completed',
|
|
498
|
+
durationSecs: 1.2,
|
|
499
|
+
stepsExecuted: 1,
|
|
500
|
+
toolCallsTotal: 0,
|
|
501
|
+
toolCallsSucceeded: 0,
|
|
502
|
+
toolCallsFailed: 0,
|
|
503
|
+
filesModified: [],
|
|
504
|
+
filesCreated: [],
|
|
505
|
+
verificationStatus: 'none',
|
|
506
|
+
},
|
|
507
|
+
},
|
|
508
|
+
},
|
|
509
|
+
]
|
|
510
|
+
expect(hasAgentDrawerActivity(withRunSummary)).toBe(true)
|
|
511
|
+
})
|
|
512
|
+
})
|
|
513
|
+
|
|
514
|
+
describe('cleanCommandOutput filter', () => {
|
|
515
|
+
it('strips bookkeeping envelope lines and returns clean stdout', () => {
|
|
516
|
+
const raw = `exit: 0
|
|
517
|
+
mode: mutating
|
|
518
|
+
sandboxed: true
|
|
519
|
+
stdout:
|
|
520
|
+
PDF generated successfully.
|
|
521
|
+
|
|
522
|
+
stderr:
|
|
523
|
+
`
|
|
524
|
+
expect(cleanCommandOutput(raw)).toBe('PDF generated successfully.')
|
|
525
|
+
})
|
|
526
|
+
|
|
527
|
+
it('cleans file listings with readOnly mode', () => {
|
|
528
|
+
const raw = `exit: 0
|
|
529
|
+
mode: readOnly
|
|
530
|
+
sandboxed: true
|
|
531
|
+
stdout:
|
|
532
|
+
-rw-rw-r-- 1 pheem49 pheem49 9175 ąø.ąø¢. 3 17:45 Harness_Presentation.pdf
|
|
533
|
+
|
|
534
|
+
stderr:
|
|
535
|
+
`
|
|
536
|
+
expect(cleanCommandOutput(raw)).toBe('-rw-rw-r-- 1 pheem49 pheem49 9175 ąø.ąø¢. 3 17:45 Harness_Presentation.pdf')
|
|
537
|
+
})
|
|
538
|
+
|
|
539
|
+
it('returns clean stderr when command fails with no stdout', () => {
|
|
540
|
+
const raw = `exit: 1
|
|
541
|
+
mode: mutating
|
|
542
|
+
sandboxed: true
|
|
543
|
+
stdout:
|
|
544
|
+
|
|
545
|
+
stderr:
|
|
546
|
+
ModuleNotFoundError: No module named 'reportlab'
|
|
547
|
+
`
|
|
548
|
+
expect(cleanCommandOutput(raw)).toBe("ModuleNotFoundError: No module named 'reportlab'")
|
|
549
|
+
})
|
|
550
|
+
|
|
551
|
+
it('strips empty trailing stderr from unstructured output', () => {
|
|
552
|
+
const raw = `Downloading reportlab-5.1.0.whl
|
|
553
|
+
Successfully installed reportlab
|
|
554
|
+
|
|
555
|
+
stderr:
|
|
556
|
+
`
|
|
557
|
+
expect(cleanCommandOutput(raw)).toBe(`Downloading reportlab-5.1.0.whl
|
|
558
|
+
Successfully installed reportlab`)
|
|
559
|
+
})
|
|
560
|
+
|
|
561
|
+
it('handles empty stdout and stderr gracefully', () => {
|
|
562
|
+
const raw = `exit: 0
|
|
563
|
+
mode: mutating
|
|
564
|
+
sandboxed: true
|
|
565
|
+
stdout:
|
|
566
|
+
|
|
567
|
+
stderr:
|
|
568
|
+
`
|
|
569
|
+
expect(cleanCommandOutput(raw)).toBe('(no output)')
|
|
570
|
+
})
|
|
571
|
+
})
|
|
572
|
+
|
|
573
|
+
describe('list_files exploration and directory formatting', () => {
|
|
574
|
+
it('describes list_files as Explored workspace when path is .', () => {
|
|
575
|
+
const activity = describeTool('list_files', { path: '.' })
|
|
576
|
+
expect(activity.semanticVerb).toBe('Explored')
|
|
577
|
+
expect(activity.target).toBe('workspace')
|
|
578
|
+
expect(activity.kind).toBe('folder')
|
|
579
|
+
})
|
|
580
|
+
|
|
581
|
+
it('describes list_files as Explored workspace when path is empty or ./', () => {
|
|
582
|
+
expect(describeTool('list_files', { path: './' }).target).toBe('workspace')
|
|
583
|
+
expect(describeTool('list_files', {}).target).toBe('workspace')
|
|
584
|
+
})
|
|
585
|
+
|
|
586
|
+
it('describes list_files with specific subfolder target', () => {
|
|
587
|
+
const activity = describeTool('list_files', { path: 'src/renderer' })
|
|
588
|
+
expect(activity.semanticVerb).toBe('Explored')
|
|
589
|
+
expect(activity.target).toBe('src/renderer')
|
|
590
|
+
expect(activity.kind).toBe('folder')
|
|
591
|
+
})
|
|
592
|
+
|
|
593
|
+
it('formats file sizes accurately', () => {
|
|
594
|
+
expect(formatFileSize(0)).toBe('0 B')
|
|
595
|
+
expect(formatFileSize(500)).toBe('500 B')
|
|
596
|
+
expect(formatFileSize(1024)).toBe('1 KB')
|
|
597
|
+
expect(formatFileSize(1536)).toBe('1.5 KB')
|
|
598
|
+
expect(formatFileSize(3939)).toBe('3.8 KB')
|
|
599
|
+
expect(formatFileSize(258814)).toBe('252.7 KB')
|
|
600
|
+
expect(formatFileSize(10485760)).toBe('10 MB')
|
|
601
|
+
expect(formatFileSize(null)).toBe('')
|
|
602
|
+
expect(formatFileSize(undefined)).toBe('')
|
|
603
|
+
})
|
|
604
|
+
|
|
605
|
+
it('formats directory listing JSON into clean icons, names and sizes', () => {
|
|
606
|
+
const json = JSON.stringify([
|
|
607
|
+
{ name: 'Cargo.toml', path: '/repo/Cargo.toml', kind: 'file', size: 3939 },
|
|
608
|
+
{ name: 'src', path: '/repo/src', kind: 'directory', size: null },
|
|
609
|
+
{ name: 'crates', path: '/repo/crates', kind: 'directory', size: null },
|
|
610
|
+
{ name: '.gitignore', path: '/repo/.gitignore', kind: 'file', size: 120 },
|
|
611
|
+
])
|
|
612
|
+
const formatted = formatDirectoryListing(json)
|
|
613
|
+
expect(formatted).toBe(
|
|
614
|
+
'š crates/\n' +
|
|
615
|
+
'š src/\n' +
|
|
616
|
+
'š .gitignore (120 B)\n' +
|
|
617
|
+
'š Cargo.toml (3.8 KB)'
|
|
618
|
+
)
|
|
619
|
+
})
|
|
620
|
+
|
|
621
|
+
it('summarizes directory listings cleanly for inline pill previews', () => {
|
|
622
|
+
const json = JSON.stringify([
|
|
623
|
+
{ name: 'crates', kind: 'directory' },
|
|
624
|
+
{ name: 'src', kind: 'directory' },
|
|
625
|
+
{ name: 'Cargo.toml', kind: 'file', size: 100 },
|
|
626
|
+
])
|
|
627
|
+
expect(summarizeDirectoryListing(json)).toBe('3 items (2 folders, 1 file)')
|
|
628
|
+
|
|
629
|
+
const onlyFiles = JSON.stringify([
|
|
630
|
+
{ name: 'a.txt', kind: 'file' },
|
|
631
|
+
{ name: 'b.txt', kind: 'file' },
|
|
632
|
+
])
|
|
633
|
+
expect(summarizeDirectoryListing(onlyFiles)).toBe('2 files')
|
|
634
|
+
|
|
635
|
+
const empty = JSON.stringify([])
|
|
636
|
+
expect(summarizeDirectoryListing(empty)).toBe('empty folder')
|
|
637
|
+
})
|
|
638
|
+
|
|
639
|
+
it('cleanCommandOutput formats directory JSON directly and inside envelopes', () => {
|
|
640
|
+
const json = JSON.stringify([
|
|
641
|
+
{ name: 'src', kind: 'directory', size: null },
|
|
642
|
+
{ name: 'Cargo.toml', kind: 'file', size: 3939 },
|
|
643
|
+
])
|
|
644
|
+
const cleanedDirect = cleanCommandOutput(json)
|
|
645
|
+
expect(cleanedDirect).toBe('š src/\nš Cargo.toml (3.8 KB)')
|
|
646
|
+
|
|
647
|
+
const enveloped = `exit: 0
|
|
648
|
+
mode: readOnly
|
|
649
|
+
sandboxed: true
|
|
650
|
+
stdout:
|
|
651
|
+
${json}
|
|
652
|
+
|
|
653
|
+
stderr:
|
|
654
|
+
`
|
|
655
|
+
const cleanedEnveloped = cleanCommandOutput(enveloped)
|
|
656
|
+
expect(cleanedEnveloped).toBe('š src/\nš Cargo.toml (3.8 KB)')
|
|
657
|
+
})
|
|
658
|
+
|
|
659
|
+
it('natural summary reflects Explored workspace', () => {
|
|
660
|
+
const items = [describeTool('list_files', { path: '.' })]
|
|
661
|
+
expect(generateNaturalActivitySummary(items)).toBe('Explored workspace')
|
|
662
|
+
|
|
663
|
+
const itemsWithCommand = [
|
|
664
|
+
describeTool('list_files', { path: '.' }),
|
|
665
|
+
describeTool('run_shell', { command: 'cargo build' }),
|
|
666
|
+
]
|
|
667
|
+
expect(generateNaturalActivitySummary(itemsWithCommand)).toBe('Explored workspace, ran commands')
|
|
668
|
+
})
|
|
669
|
+
|
|
670
|
+
it('parseDirectoryEntries parses raw JSON and envelopes correctly', () => {
|
|
671
|
+
const json = JSON.stringify([
|
|
672
|
+
{ name: 'b.txt', kind: 'file', size: 20 },
|
|
673
|
+
{ name: 'src', kind: 'directory', size: null },
|
|
674
|
+
{ name: 'a.txt', kind: 'file', size: 10 },
|
|
675
|
+
])
|
|
676
|
+
const entries = parseDirectoryEntries(json)
|
|
677
|
+
expect(entries).not.toBeNull()
|
|
678
|
+
expect(entries).toHaveLength(3)
|
|
679
|
+
// Directories first, then files sorted
|
|
680
|
+
expect(entries![0].name).toBe('src')
|
|
681
|
+
expect(entries![0].kind).toBe('directory')
|
|
682
|
+
expect(entries![1].name).toBe('a.txt')
|
|
683
|
+
expect(entries![2].name).toBe('b.txt')
|
|
684
|
+
|
|
685
|
+
const enveloped = `exit: 0
|
|
686
|
+
mode: readOnly
|
|
687
|
+
sandboxed: true
|
|
688
|
+
stdout:
|
|
689
|
+
${json}
|
|
690
|
+
|
|
691
|
+
stderr:
|
|
692
|
+
`
|
|
693
|
+
const envelopedEntries = parseDirectoryEntries(enveloped)
|
|
694
|
+
expect(envelopedEntries).toHaveLength(3)
|
|
695
|
+
expect(envelopedEntries![0].name).toBe('src')
|
|
696
|
+
})
|
|
697
|
+
})
|
|
698
|
+
})
|
|
699
|
+
|
|
234
700
|
|