@hienlh/ppm 0.19.11 → 0.20.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/CHANGELOG.md +36 -0
- package/CLAUDE.md +8 -1
- package/assets/skills/ppm/SKILL.md +1 -1
- package/assets/skills/ppm/references/http-api.md +4 -1
- package/dist/web/assets/accounts-settings-section-BQyru31C.js +1 -0
- package/dist/web/assets/{ai-resource-editor-iMqzzz5c.js → ai-resource-editor-BgYIPGVP.js} +1 -1
- package/dist/web/assets/{ai-settings-section-B-1z-PRb.js → ai-settings-section-Cywmtnps.js} +1 -1
- package/dist/web/assets/ai-settings-section-iBRCQvBR.js +1 -0
- package/dist/web/assets/{angular-html-C8nsn2VC.js → angular-html-BtJLNcMw.js} +1 -1
- package/dist/web/assets/{angular-ts-Caw9nRCH.js → angular-ts-CQiu5F_W.js} +1 -1
- package/dist/web/assets/api-client-QfreGirP.js +1 -0
- package/dist/web/assets/api-settings-D18Q4Ocp.js +1 -0
- package/dist/web/assets/{api-themes-BoOJPqwM.js → api-themes-sSv-6OLk.js} +1 -1
- package/dist/web/assets/{apl-Dhu1LORF.js → apl-CKZvgs-w.js} +1 -1
- package/dist/web/assets/{appearance-settings-section-2XZgB0mV.js → appearance-settings-section-mhu9T6Fk.js} +1 -1
- package/dist/web/assets/architecture-PBZL5I3N-DfR8k8Bc.js +1 -0
- package/dist/web/assets/{astro-DwkX9sLZ.js → astro-D0b8ssLD.js} +1 -1
- package/dist/web/assets/{audio-preview-CkGZO8Uy.js → audio-preview-B4E5_7TW.js} +1 -1
- package/dist/web/assets/{blade-D1fC9Osx.js → blade-DOIpINLw.js} +1 -1
- package/dist/web/assets/{bsl-pur-PRip.js → bsl-CJ7_JlQ8.js} +1 -1
- package/dist/web/assets/{button-2WCAS8dI.js → button-DX32ffge.js} +1 -1
- package/dist/web/assets/{cairo-DDJs9amR.js → cairo-5CpV2T1P.js} +1 -1
- package/dist/web/assets/chat-tab-Bs9OD6ss.js +15 -0
- package/dist/web/assets/{cobol-Bo0usdoM.js → cobol-BreMVrtc.js} +1 -1
- package/dist/web/assets/code-editor-Cv_pzHo7.js +7 -0
- package/dist/web/assets/{coffee-DBBsbX1e.js → coffee-D7DoKh5b.js} +1 -1
- package/dist/web/assets/{conflict-editor-BpdoTEfv.js → conflict-editor-BnWaMSEa.js} +1 -1
- package/dist/web/assets/{context-menu-C13b1uT3.js → context-menu-CJL8L98s.js} +1 -1
- package/dist/web/assets/{cpp-6CTO78A-.js → cpp-BnWeWAoE.js} +1 -1
- package/dist/web/assets/{crystal-DAlvpAP7.js → crystal-D2pJbFUn.js} +1 -1
- package/dist/web/assets/{csv-preview-C3DoHISX.js → csv-preview-DG4YAabr.js} +1 -1
- package/dist/web/assets/{data-grid-overlay-editor-iRrpAV0e.js → data-grid-overlay-editor-CbBkhhJa.js} +1 -1
- package/dist/web/assets/{database-viewer-CxZ2fdcd.js → database-viewer-B-wA2qT-.js} +1 -1
- package/dist/web/assets/diff-viewer-DRtzdfXk.js +4 -0
- package/dist/web/assets/{docx-preview-Bgw838ry.js → docx-preview-Xy7SZ7Vf.js} +1 -1
- package/dist/web/assets/{edge-D0tZrpC7.js → edge-aqGMtbY3.js} +1 -1
- package/dist/web/assets/{edit-diff-preview-DUgmjNre.js → edit-diff-preview-6tzdk7Pn.js} +1 -1
- package/dist/web/assets/{elixir-C1E6-o4G.js → elixir-CsYMBLc5.js} +1 -1
- package/dist/web/assets/{elm-BKyTfeQX.js → elm-BU8C2gFp.js} +1 -1
- package/dist/web/assets/{erb-Cdnr4BMI.js → erb-Z_E49ab8.js} +1 -1
- package/dist/web/assets/{erlang-N1237mFq.js → erlang-BRqOjXH9.js} +1 -1
- package/dist/web/assets/{esm-ClNnmD9t.js → esm-B-vXxHUd.js} +1 -1
- package/dist/web/assets/{explorer-body-Bpe6UX0b.js → explorer-body-uh8oJp6J.js} +2 -2
- package/dist/web/assets/explorer-window-content-DLn_4egF.js +1 -0
- package/dist/web/assets/{extension-manager-section-D_rKLp-o.js → extension-manager-section-C_ZGYvWf.js} +1 -1
- package/dist/web/assets/{extension-webview-kEtrZoRZ.js → extension-webview-DbFWxJpj.js} +1 -1
- package/dist/web/assets/{files-settings-section-B0wLfQ9S.js → files-settings-section-BrUbJglA.js} +1 -1
- package/dist/web/assets/{fortran-fixed-form-D_f9tVv0.js → fortran-fixed-form-CWbxmDGR.js} +1 -1
- package/dist/web/assets/{fsharp-DEJmdhc2.js → fsharp-DKMYbq6I.js} +1 -1
- package/dist/web/assets/{gdresource-Dmmrx2gP.js → gdresource-B3yFau4V.js} +1 -1
- package/dist/web/assets/{general-settings-section-DZ3xpgwh.js → general-settings-section-B9ZPZVso.js} +1 -1
- package/dist/web/assets/{git-commit-qwJ867ig.js → git-commit-BW0p3Ekk.js} +1 -1
- package/dist/web/assets/{git-log-panel-BNicD2In.js → git-log-panel-C0jnhmgC.js} +1 -1
- package/dist/web/assets/{git-rebase-Dkv8Zw86.js → git-rebase-DrvmQCS7.js} +1 -1
- package/dist/web/assets/gitGraph-HDMCJU4V-CPd78aaT.js +1 -0
- package/dist/web/assets/{glide-data-grid-CdK5dW5L.js → glide-data-grid-CZVKIum-.js} +6 -6
- package/dist/web/assets/{glimmer-js-CcrXn8lQ.js → glimmer-js-BY1XApJJ.js} +1 -1
- package/dist/web/assets/{glimmer-ts-CLab3lU7.js → glimmer-ts-DPZtxF8N.js} +1 -1
- package/dist/web/assets/{glsl-DXhkG9dU.js → glsl-DZ8G_Hvf.js} +1 -1
- package/dist/web/assets/{graphql-Cuqsx8r3.js → graphql-Ck06uCZy.js} +1 -1
- package/dist/web/assets/group-chat-tab-DnPtmbPc.js +1 -0
- package/dist/web/assets/{hack-C_CBVdBc.js → hack-pLogDwAs.js} +1 -1
- package/dist/web/assets/{haml-CBWfzZpv.js → haml-CBqeCQ2A.js} +1 -1
- package/dist/web/assets/{handlebars-4e8OR-VI.js → handlebars-B66JmVtp.js} +1 -1
- package/dist/web/assets/{html-C5X4urn_.js → html-Dk4wmfwC.js} +1 -1
- package/dist/web/assets/{html-derivative-nH-jXfsL.js → html-derivative-CJWqfN51.js} +1 -1
- package/dist/web/assets/{http-CQgaG7eu.js → http-CexhotTh.js} +1 -1
- package/dist/web/assets/{hurl-B8gidJhu.js → hurl-BScKFk3Z.js} +1 -1
- package/dist/web/assets/{hxml-BAK94GX8.js → hxml-DAle7vtu.js} +1 -1
- package/dist/web/assets/{image-preview-1kGj4W9R.js → image-preview-fuU4h2nr.js} +1 -1
- package/dist/web/assets/index-CHQAPZIX.js +52 -0
- package/dist/web/assets/index-CoaVwAF6.css +2 -0
- package/dist/web/assets/info-3K5VOQVL-BciNds6R.js +1 -0
- package/dist/web/assets/{jinja-BuAjvj8M.js → jinja-yHpyD80t.js} +1 -1
- package/dist/web/assets/{jira-watcher-section-DL_boZNh.js → jira-watcher-section-Bjldyhru.js} +1 -1
- package/dist/web/assets/{jison-Dhhs26-L.js → jison-BY6WLJVu.js} +1 -1
- package/dist/web/assets/{julia-gZavIyll.js → julia-Dd_iYQDT.js} +1 -1
- package/dist/web/assets/{just-DDHrFReO.js → just-BTuUKpxF.js} +1 -1
- package/dist/web/assets/keybindings-store-DBVXZKp8.js +1 -0
- package/dist/web/assets/{keyboard-shortcuts-section-DzQzV49E.js → keyboard-shortcuts-section-D7jaCPrv.js} +1 -1
- package/dist/web/assets/{latex-BdGZa8ov.js → latex-Dt3OUlMZ.js} +1 -1
- package/dist/web/assets/{liquid-urFfd9Fr.js → liquid-BxPJU2ix.js} +1 -1
- package/dist/web/assets/{lua-CcS6tnB5.js → lua-DEGIvn7d.js} +1 -1
- package/dist/web/assets/{markdown-renderer-BfoCOrL8.js → markdown-renderer-B4B5oxQS.js} +3 -3
- package/dist/web/assets/markdown-renderer-DwHh-jd_.js +1 -0
- package/dist/web/assets/{marko-CSQqk4oG.js → marko-BDxwBJur.js} +1 -1
- package/dist/web/assets/{mdc-CYIe80m_.js → mdc-B8aXPTg7.js} +1 -1
- package/dist/web/assets/{media-url-DBmHJRft.js → media-url-BMeBaB0q.js} +1 -1
- package/dist/web/assets/{mobile-bottom-sheet-B3uDlD79.js → mobile-bottom-sheet-CmySDB6I.js} +1 -1
- package/dist/web/assets/mobile-explorer-sheet-JJxZYWkV.js +1 -0
- package/dist/web/assets/{nextflow-C-W8vX8I.js → nextflow-DBVZnnT_.js} +1 -1
- package/dist/web/assets/{nginx-COGi5you.js → nginx-Crpyd-Do.js} +1 -1
- package/dist/web/assets/{nim-CPitYGel.js → nim-BSqTBYDj.js} +1 -1
- package/dist/web/assets/notification-store-CCWNUHsS.js +1 -0
- package/dist/web/assets/{notifications-settings-section-BXCaGBVc.js → notifications-settings-section-DbbX7-Qp.js} +1 -1
- package/dist/web/assets/{number-overlay-editor-C_eD-Bdr.js → number-overlay-editor-DRjTIcPH.js} +1 -1
- package/dist/web/assets/{overview-panel-Cm2HRtEz.js → overview-panel-DiiA3B_Z.js} +1 -1
- package/dist/web/assets/packet-RMMSAZCW-ClD3l2Bs.js +1 -0
- package/dist/web/assets/{panel-store-BRrnDO_i.js → panel-store-BmdcSBNb.js} +1 -1
- package/dist/web/assets/{pdf-preview-DbRFOtQD.js → pdf-preview-DxNjWa1v.js} +1 -1
- package/dist/web/assets/{perl-B0yW3hbb.js → perl-BU0kbB-K.js} +1 -1
- package/dist/web/assets/{php-BNMYN5Jp.js → php-D9n1ikHN.js} +1 -1
- package/dist/web/assets/pie-UPGHQEXC-PU6kD0rW.js +1 -0
- package/dist/web/assets/{postgres-viewer-BrQRqTso.js → postgres-viewer-BScvk5ev.js} +3 -3
- package/dist/web/assets/{ppmbot-settings-section-BEV23_SM.js → ppmbot-settings-section-jFA9Ncgo.js} +1 -1
- package/dist/web/assets/{process-table-CG8d5eXs.js → process-table-BexeYWQm.js} +1 -1
- package/dist/web/assets/{project-store-BuY7rxn_.js → project-store-wWZ6bjwq.js} +1 -1
- package/dist/web/assets/{proxy-settings-section-Cw0Wtsv0.js → proxy-settings-section-C_seKq56.js} +1 -1
- package/dist/web/assets/{pug-CP5fxsxD.js → pug-BOpaczDr.js} +1 -1
- package/dist/web/assets/{qml-CHGpQosY.js → qml-B-cQXhrg.js} +1 -1
- package/dist/web/assets/{query-audit-section-50B7mQal.js → query-audit-section-BWXJmPDV.js} +1 -1
- package/dist/web/assets/radar-KQ55EAFF-4LzjL0Zt.js +1 -0
- package/dist/web/assets/{razor-Cfe0AYo4.js → razor-DFB0pNCh.js} +1 -1
- package/dist/web/assets/remote-desktop-mobile-sheet-B--PeL5i.js +2 -0
- package/dist/web/assets/{remote-desktop-mobile-view-DPF_b_jd.js → remote-desktop-mobile-view-jgn8nmQa.js} +1 -1
- package/dist/web/assets/{remote-desktop-readiness-gate-J7E6355i.js → remote-desktop-readiness-gate-CjDth-W_.js} +1 -1
- package/dist/web/assets/{remote-desktop-window-content-0xsAifZH.js → remote-desktop-window-content-CrHAUA03.js} +1 -1
- package/dist/web/assets/{rst-DxSSGshb.js → rst-DAXedsgm.js} +1 -1
- package/dist/web/assets/{ruby-rbK5SsJa.js → ruby-BCO4polC.js} +1 -1
- package/dist/web/assets/{run-in-terminal-DHAvC1AG.js → run-in-terminal-wHKwAnWP.js} +1 -1
- package/dist/web/assets/{sas-DDM28fbb.js → sas-DfB5dcFC.js} +1 -1
- package/dist/web/assets/schedules-settings-section-DMFn3mYL.js +1 -0
- package/dist/web/assets/{scss-TDl-6ro4.js → scss-BknIVgn7.js} +1 -1
- package/dist/web/assets/{send-to-chat-BOyUWNKw.js → send-to-chat-BI7-fFpG.js} +1 -1
- package/dist/web/assets/{separator-BzGoTlR7.js → separator-W_hJcXPk.js} +1 -1
- package/dist/web/assets/{settings-body-CUTsPLea.js → settings-body-Dz2vPTEP.js} +2 -2
- package/dist/web/assets/settings-store-CzLnTR8p.js +2 -0
- package/dist/web/assets/settings-tab-B5QbsvS4.js +1 -0
- package/dist/web/assets/settings-window-content-iM2bPoX5.js +1 -0
- package/dist/web/assets/{shaderlab-CCvmDgGS.js → shaderlab-CPu31TpY.js} +1 -1
- package/dist/web/assets/{shellsession-BzKS9yKh.js → shellsession-CFX4c_TM.js} +1 -1
- package/dist/web/assets/{soy-QfO35nDh.js → soy-rz9hilgm.js} +1 -1
- package/dist/web/assets/{sparql-D29RDfp2.js → sparql-Bo8ZDeqE.js} +1 -1
- package/dist/web/assets/{sql-query-editor-CwOcDbp4.js → sql-query-editor-C0mGgLfX.js} +1 -1
- package/dist/web/assets/{sqlite-viewer-DYdcqZv1.js → sqlite-viewer-Bs3RKf1X.js} +1 -1
- package/dist/web/assets/{stata-Be6j_SNv.js → stata-B5J-QMyE.js} +1 -1
- package/dist/web/assets/{streaming-store-9_9j70zt.js → streaming-store-9XVmAMfV.js} +1 -1
- package/dist/web/assets/{surrealql-CykFjgNG.js → surrealql-Caw1ADnG.js} +1 -1
- package/dist/web/assets/{svelte-CdBF8z4-.js → svelte-D3oMVcxz.js} +1 -1
- package/dist/web/assets/{system-monitor-body-CugdEvdh.js → system-monitor-body-DvUmEdNe.js} +2 -2
- package/dist/web/assets/system-monitor-tab-CHZ5F_ZE.js +1 -0
- package/dist/web/assets/{system-monitor-window-content-CJfcQqc2.js → system-monitor-window-content-DjzqoeCN.js} +1 -1
- package/dist/web/assets/{tab-host-window-content-5Ga7BheG.js → tab-host-window-content-DKeAr5mD.js} +1 -1
- package/dist/web/assets/{tab-store-PZsP5ZwG.js → tab-store-1xYJb0gM.js} +1 -1
- package/dist/web/assets/team-member-sheet-Cl9ZB3dl.js +2 -0
- package/dist/web/assets/team-member-window-content-DfP7WdFD.js +1 -0
- package/dist/web/assets/{templ-BVHE2CNb.js → templ-BAdNyIOL.js} +1 -1
- package/dist/web/assets/{terminal-tab-CkxJIjii.js → terminal-tab-J1Fqa_rm.js} +2 -2
- package/dist/web/assets/{tex-C8XwrbBw.js → tex-IQ8mELOR.js} +1 -1
- package/dist/web/assets/tool-cards-DQghSuKX.js +9 -0
- package/dist/web/assets/treemap-KZPCXAKY-DiumLNMg.js +1 -0
- package/dist/web/assets/{ts-tags-BIHk5AM0.js → ts-tags-D1DDO2jl.js} +1 -1
- package/dist/web/assets/{twig-YcE6Q2Ox.js → twig-C8Fd5RvV.js} +1 -1
- package/dist/web/assets/use-accounts-data-KWcMgRlc.js +1 -0
- package/dist/web/assets/{use-blob-url-De-ZtcpX.js → use-blob-url-CrwoZJUJ.js} +1 -1
- package/dist/web/assets/use-inline-blame-C1G-_NjC.js +8 -0
- package/dist/web/assets/{use-monaco-theme-DOhDvEKJ.js → use-monaco-theme-aa4-wjKQ.js} +1 -1
- package/dist/web/assets/{use-open-team-member-DWhhWdmJ.js → use-open-team-member-CSUU7Z8N.js} +1 -1
- package/dist/web/assets/{use-remote-desktop-display-choice-B3VIBQxC.js → use-remote-desktop-display-choice-B-TpQ-Ua.js} +1 -1
- package/dist/web/assets/{use-websocket-D9MsDysx.js → use-websocket-BBslmv3D.js} +1 -1
- package/dist/web/assets/{vendor-mermaid-CKKtYuTV.js → vendor-mermaid-CfY1-PkA.js} +1 -1
- package/dist/web/assets/{video-preview-VL2Br0YM.js → video-preview-Bd0lcK3d.js} +1 -1
- package/dist/web/assets/{vue-q7m01V0h.js → vue-EvccXlkP.js} +1 -1
- package/dist/web/assets/{vue-html-D1y9feOj.js → vue-html-Dg0xUJCh.js} +1 -1
- package/dist/web/assets/{vue-vine-DrIGs03v.js → vue-vine-BdrMg72k.js} +1 -1
- package/dist/web/assets/{window-pip-registry-CSLhJfpL.js → window-pip-registry-CrCYYTTf.js} +1 -1
- package/dist/web/assets/{window-store-DGKf9rPG.js → window-store-D0HbQ1pM.js} +1 -1
- package/dist/web/assets/ws-auth-D111jj32.js +1 -0
- package/dist/web/assets/{xml-oyvc1920.js → xml-MmDclzxK.js} +1 -1
- package/dist/web/assets/{xsl-BbIGdNPF.js → xsl-DQEFs6Dd.js} +1 -1
- package/dist/web/index.html +23 -23
- package/dist/web/sw.js +1 -1
- package/docs/extension-development-guide.md +47 -0
- package/docs/project-roadmap.md +3 -1
- package/package.json +2 -2
- package/packages/ext-git-graph/package.json +23 -5
- package/packages/ext-git-graph/src/blame-parser.test.ts +154 -0
- package/packages/ext-git-graph/src/blame-parser.ts +148 -0
- package/packages/ext-git-graph/src/blame-view.ts +389 -0
- package/packages/ext-git-graph/src/commit-search.test.ts +118 -0
- package/packages/ext-git-graph/src/commit-search.ts +102 -0
- package/packages/ext-git-graph/src/compare-args.test.ts +111 -0
- package/packages/ext-git-graph/src/compare-args.ts +109 -0
- package/packages/ext-git-graph/src/compare-view.ts +343 -0
- package/packages/ext-git-graph/src/extension-integration.test.ts +6 -3
- package/packages/ext-git-graph/src/extension.ts +202 -249
- package/packages/ext-git-graph/src/file-history-parser.test.ts +102 -0
- package/packages/ext-git-graph/src/file-history-parser.ts +89 -0
- package/packages/ext-git-graph/src/file-history-view.ts +386 -0
- package/packages/ext-git-graph/src/git-exec.ts +122 -0
- package/packages/ext-git-graph/src/git-state.ts +81 -0
- package/packages/ext-git-graph/src/panel-nav.ts +65 -0
- package/packages/ext-git-graph/src/panel-registry.ts +72 -0
- package/packages/ext-git-graph/src/ppm-api.ts +48 -0
- package/packages/ext-git-graph/src/rebase-todo.test.ts +196 -0
- package/packages/ext-git-graph/src/rebase-todo.ts +119 -0
- package/packages/ext-git-graph/src/rebase-view.ts +483 -0
- package/packages/ext-git-graph/src/reflog-parser.test.ts +93 -0
- package/packages/ext-git-graph/src/reflog-parser.ts +86 -0
- package/packages/ext-git-graph/src/reflog-view.ts +375 -0
- package/packages/ext-git-graph/src/register-view-command.ts +47 -0
- package/packages/ext-git-graph/src/submodule-parser.test.ts +79 -0
- package/packages/ext-git-graph/src/submodule-parser.ts +77 -0
- package/packages/ext-git-graph/src/types.ts +10 -1
- package/packages/ext-git-graph/src/webview-html.ts +438 -3
- package/packages/ext-git-graph/src/webview-shell.ts +236 -0
- package/src/providers/claude-agent-sdk.ts +7 -0
- package/src/providers/codex-app-server/codex-provider.ts +89 -1
- package/src/server/index.ts +1 -1
- package/src/server/routes/accounts.ts +25 -1
- package/src/server/routes/chat.ts +29 -1
- package/src/server/routes/codex-accounts.ts +41 -1
- package/src/server/routes/git.ts +97 -0
- package/src/server/routes/settings.ts +1 -0
- package/src/server/routes/teams.ts +14 -3
- package/src/services/account-selector.service.ts +125 -20
- package/src/services/account.service.ts +176 -54
- package/src/services/autostart-generator.ts +12 -1
- package/src/services/codex-account.service.ts +87 -13
- package/src/services/db.service.ts +58 -3
- package/src/services/extension.service.ts +55 -5
- package/src/services/git-blame/blame-porcelain.ts +89 -0
- package/src/services/git-blame/git-blame.service.ts +90 -0
- package/src/services/git-hunks/git-hunks.service.ts +264 -0
- package/src/services/git-hunks/unified-diff.ts +359 -0
- package/src/services/picked-account-binding.ts +57 -0
- package/src/services/team-member-activity/member-transcript-tail.ts +64 -0
- package/src/shared/blame.ts +79 -0
- package/src/web/components/chat/chat-history-bar.tsx +35 -6
- package/src/web/components/chat/chat-tab.tsx +120 -3
- package/src/web/components/chat/codex-usage-panel.tsx +148 -14
- package/src/web/components/chat/team-member-window-content.tsx +8 -39
- package/src/web/components/chat/usage-badge.tsx +176 -52
- package/src/web/components/editor/code-editor.tsx +33 -1
- package/src/web/components/editor/diff-viewer.tsx +83 -8
- package/src/web/components/editor/editor-toolbar.tsx +25 -1
- package/src/web/components/git/git-status-panel.tsx +46 -0
- package/src/web/components/git/hunk-selection.ts +132 -0
- package/src/web/components/git/hunk-stage-dialog.tsx +419 -0
- package/src/web/components/settings/accounts/account-bucket-row.tsx +19 -3
- package/src/web/components/settings/accounts/account-card.tsx +153 -33
- package/src/web/components/settings/accounts/account-hint.tsx +33 -0
- package/src/web/components/settings/accounts/account-usage-format.ts +26 -0
- package/src/web/components/settings/accounts/codex-accounts-section.tsx +24 -9
- package/src/web/components/settings/accounts/codex-usage-rows.tsx +2 -2
- package/src/web/components/settings/accounts/use-accounts-data.ts +32 -2
- package/src/web/components/settings/accounts/use-codex-accounts.ts +24 -2
- package/src/web/hooks/use-chat.ts +27 -0
- package/src/web/hooks/use-inline-blame.ts +175 -0
- package/src/web/hooks/use-member-transcript-tail.ts +95 -0
- package/src/web/hooks/use-usage.ts +3 -3
- package/src/web/lib/api-settings.ts +24 -0
- package/src/web/stores/settings-store.ts +12 -0
- package/dist/web/assets/accounts-settings-section-C1YP1iCb.js +0 -1
- package/dist/web/assets/ai-settings-section-BJPgHUqk.js +0 -1
- package/dist/web/assets/api-client-BogqsFna.js +0 -1
- package/dist/web/assets/api-settings-BVfemzZW.js +0 -1
- package/dist/web/assets/architecture-PBZL5I3N-BZBxtErN.js +0 -1
- package/dist/web/assets/chat-tab-Bn4vZVZJ.js +0 -15
- package/dist/web/assets/code-editor-DN5GJXT3.js +0 -7
- package/dist/web/assets/diff-viewer-DxzD_YSO.js +0 -4
- package/dist/web/assets/explorer-window-content-DixZaLLP.js +0 -1
- package/dist/web/assets/gitGraph-HDMCJU4V-BHxJbXfV.js +0 -1
- package/dist/web/assets/group-chat-tab-D-HXdnoU.js +0 -1
- package/dist/web/assets/index-DdMq4zqb.js +0 -52
- package/dist/web/assets/index-N-pnuwFP.css +0 -2
- package/dist/web/assets/info-3K5VOQVL-DI4p3vbH.js +0 -1
- package/dist/web/assets/keybindings-store-DQkz4a35.js +0 -1
- package/dist/web/assets/markdown-renderer-C35QMvZp.js +0 -1
- package/dist/web/assets/mobile-explorer-sheet-ZHfT5IN3.js +0 -1
- package/dist/web/assets/notification-store-J1yP_Ebb.js +0 -1
- package/dist/web/assets/packet-RMMSAZCW-YNQWTi_-.js +0 -1
- package/dist/web/assets/pie-UPGHQEXC-E3Wiw76n.js +0 -1
- package/dist/web/assets/radar-KQ55EAFF-BPQJUKON.js +0 -1
- package/dist/web/assets/remote-desktop-mobile-sheet-DhcAyXE5.js +0 -2
- package/dist/web/assets/schedules-settings-section-BFzMEPTd.js +0 -1
- package/dist/web/assets/settings-store-DWUx3865.js +0 -2
- package/dist/web/assets/settings-tab-DVV26vPK.js +0 -1
- package/dist/web/assets/settings-window-content-z64J3tfm.js +0 -1
- package/dist/web/assets/system-monitor-tab-jnPQtmvK.js +0 -1
- package/dist/web/assets/team-member-sheet-8FDCVZMG.js +0 -2
- package/dist/web/assets/team-member-window-content-0JRiWRdG.js +0 -1
- package/dist/web/assets/tool-cards-DuTlfeWN.js +0 -9
- package/dist/web/assets/treemap-KZPCXAKY-C2CvKBQR.js +0 -1
- package/dist/web/assets/use-accounts-data--pdg01TI.js +0 -1
- package/dist/web/assets/ws-auth-ZSZkAT6p.js +0 -1
- /package/dist/web/assets/{abap-Cq9nYQyd.js → abap-D-o-bvtI.js} +0 -0
- /package/dist/web/assets/{actionscript-3-DL8rUIy0.js → actionscript-3-D2tIzAm8.js} +0 -0
- /package/dist/web/assets/{ada-BY8TLuhY.js → ada-DxatBcxS.js} +0 -0
- /package/dist/web/assets/{andromeeda-CyVfHsS0.js → andromeeda-D0LK9YJ3.js} +0 -0
- /package/dist/web/assets/{apache-DTQUy73x.js → apache-B7uMPNiW.js} +0 -0
- /package/dist/web/assets/{apex-CiSZngrZ.js → apex-B7GiXrAr.js} +0 -0
- /package/dist/web/assets/{api-client-oY1tC3tM.js → api-client-CEYCBt_0.js} +0 -0
- /package/dist/web/assets/{applescript-CzuRDd3h.js → applescript-D_SIFkKe.js} +0 -0
- /package/dist/web/assets/{apply-theme-r8tKDrCR.js → apply-theme-BVXAUYoN.js} +0 -0
- /package/dist/web/assets/{ara-CSFV93kR.js → ara-C3iECgdg.js} +0 -0
- /package/dist/web/assets/{asciidoc-hOQNnXhz.js → asciidoc-gc8z_MMY.js} +0 -0
- /package/dist/web/assets/{asm-DdG53NGR.js → asm-27qeoPOI.js} +0 -0
- /package/dist/web/assets/{aurora-x-DJ7ORZG6.js → aurora-x-C5J9fWe1.js} +0 -0
- /package/dist/web/assets/{awk-B3FFpX_J.js → awk-B7GBzF92.js} +0 -0
- /package/dist/web/assets/{ayu-dark-D_P1CfTe.js → ayu-dark-XlnQhuLL.js} +0 -0
- /package/dist/web/assets/{ayu-light-Cz3YLUqH.js → ayu-light-DKLLilkU.js} +0 -0
- /package/dist/web/assets/{ayu-mirage-JcMq5tgJ.js → ayu-mirage-Dv-XOprJ.js} +0 -0
- /package/dist/web/assets/{ballerina-7Hs4Rfpk.js → ballerina-DACRT-sT.js} +0 -0
- /package/dist/web/assets/{bat-COgQdnFA.js → bat-BlQCq2XE.js} +0 -0
- /package/dist/web/assets/{beancount-BJ3CutBG.js → beancount-DYDztRI0.js} +0 -0
- /package/dist/web/assets/{berry-D7so2Cui.js → berry-BE5YKqvx.js} +0 -0
- /package/dist/web/assets/{bibtex-Ct3acHa1.js → bibtex-CAm7mgEm.js} +0 -0
- /package/dist/web/assets/{bicep-jXDwCQcm.js → bicep-BKgAbfVa.js} +0 -0
- /package/dist/web/assets/{bird2-CjLD2cna.js → bird2-yrBNbW1G.js} +0 -0
- /package/dist/web/assets/{c-CdgZojnL.js → c-txZFr4RM.js} +0 -0
- /package/dist/web/assets/{c3-DtpZYego.js → c3-D_DrzBUd.js} +0 -0
- /package/dist/web/assets/{cadence-CPLkixoh.js → cadence-CUFCEgG9.js} +0 -0
- /package/dist/web/assets/{can-open-in-ppm-BntPywsy.js → can-open-in-ppm-_yqa69dV.js} +0 -0
- /package/dist/web/assets/{catppuccin-frappe-Xt0_qJa9.js → catppuccin-frappe-Dn32MuhA.js} +0 -0
- /package/dist/web/assets/{catppuccin-latte-CJnbLec5.js → catppuccin-latte-Dewo7yDf.js} +0 -0
- /package/dist/web/assets/{catppuccin-macchiato-BPHP1wYB.js → catppuccin-macchiato-D8WOWZeo.js} +0 -0
- /package/dist/web/assets/{catppuccin-mocha-ssWJodGc.js → catppuccin-mocha-b0md48XM.js} +0 -0
- /package/dist/web/assets/{clarity-DB0408F6.js → clarity-Ct3UqLBj.js} +0 -0
- /package/dist/web/assets/{clojure-dpRPlAO4.js → clojure-CwP5aPEo.js} +0 -0
- /package/dist/web/assets/{cmake-r2VkeX9y.js → cmake-D5RF49e5.js} +0 -0
- /package/dist/web/assets/{codeowners-v5nQqHiB.js → codeowners-Cl5897L_.js} +0 -0
- /package/dist/web/assets/{codeql-BSSEhKRR.js → codeql-BKh1RCg0.js} +0 -0
- /package/dist/web/assets/{common-lisp-BXb2MMMA.js → common-lisp-BhHuD6t0.js} +0 -0
- /package/dist/web/assets/{coq-BjBNi73X.js → coq-Dco3qwD8.js} +0 -0
- /package/dist/web/assets/{csharp-CdPjZRbV.js → csharp-Dpjw9ZA9.js} +0 -0
- /package/dist/web/assets/{css-BuxbQOHL.js → css-CPe4cabH.js} +0 -0
- /package/dist/web/assets/{csv-Dj-eoZwH.js → csv-BAcTN8Kt.js} +0 -0
- /package/dist/web/assets/{csv-parser-CBbALsFU.js → csv-parser-DbxGKdMG.js} +0 -0
- /package/dist/web/assets/{cue-Dz73VksN.js → cue-Cr6y60TA.js} +0 -0
- /package/dist/web/assets/{cypher-CkVkDywZ.js → cypher-DWtqXXFP.js} +0 -0
- /package/dist/web/assets/{d-oU51Pbpf.js → d-BASiTZk4.js} +0 -0
- /package/dist/web/assets/{dark-plus-DcwvjjfO.js → dark-plus-56kmnrcl.js} +0 -0
- /package/dist/web/assets/{dart-DGvu8mcX.js → dart-C5mZnjoE.js} +0 -0
- /package/dist/web/assets/{data-grid-types-B6kUrF-M.js → data-grid-types-DeY60CLU.js} +0 -0
- /package/dist/web/assets/{dax-BmbjKQ90.js → dax-B4I2e7d8.js} +0 -0
- /package/dist/web/assets/{desktop-IRBSiFfh.js → desktop-DekGg0BT.js} +0 -0
- /package/dist/web/assets/{diff-Bdik2JR8.js → diff-CWnJBd73.js} +0 -0
- /package/dist/web/assets/{dist-Bv4zQpS1.js → dist-B0J2eYBz.js} +0 -0
- /package/dist/web/assets/{dist-C8YPBIOb.js → dist-BKOM_AoT.js} +0 -0
- /package/dist/web/assets/{docker-Bgdl0H8I.js → docker-DevchDxK.js} +0 -0
- /package/dist/web/assets/{dotenv-COe5NdnA.js → dotenv-DCvtdaGJ.js} +0 -0
- /package/dist/web/assets/{dracula-DjURaSAa.js → dracula-8U6Vkk3l.js} +0 -0
- /package/dist/web/assets/{dracula-soft-Do7d0bo-.js → dracula-soft-Bfeew5Wg.js} +0 -0
- /package/dist/web/assets/{dream-maker-DYwQvJIj.js → dream-maker-DDTJVuoy.js} +0 -0
- /package/dist/web/assets/{emacs-lisp-BXjlHyDW.js → emacs-lisp-CEHJqI4m.js} +0 -0
- /package/dist/web/assets/{everforest-dark-h8Q2loiX.js → everforest-dark-CHHLt7cq.js} +0 -0
- /package/dist/web/assets/{everforest-light-CdsJiL-9.js → everforest-light-TcTbK1sM.js} +0 -0
- /package/dist/web/assets/{fennel-D0CBtOvY.js → fennel-Bh4vsA1A.js} +0 -0
- /package/dist/web/assets/{fish-DzayfrMj.js → fish-D0T0fILG.js} +0 -0
- /package/dist/web/assets/{fluent-CatjkUfx.js → fluent-CgXDXdyy.js} +0 -0
- /package/dist/web/assets/{format-bytes-BulRSULX.js → format-bytes-Bc6SqF7M.js} +0 -0
- /package/dist/web/assets/{fortran-free-form-DM04ud0b.js → fortran-free-form-CUg3Xhz4.js} +0 -0
- /package/dist/web/assets/{gdscript-BLN5iZwf.js → gdscript-Cx056p_k.js} +0 -0
- /package/dist/web/assets/{gdshader-BK-1iZQs.js → gdshader-Dj1qP4I5.js} +0 -0
- /package/dist/web/assets/{genie-BGPOFWDN.js → genie-SBt15wn7.js} +0 -0
- /package/dist/web/assets/{gherkin-CdVOJ_JY.js → gherkin-bTJiHIrB.js} +0 -0
- /package/dist/web/assets/{github-dark-B_xW8TaY.js → github-dark-BOPhyugs.js} +0 -0
- /package/dist/web/assets/{github-dark-default-h_iKq7CX.js → github-dark-default-Cktqe6NF.js} +0 -0
- /package/dist/web/assets/{github-dark-dimmed-nKDYE62T.js → github-dark-dimmed-CeWfII_B.js} +0 -0
- /package/dist/web/assets/{github-dark-high-contrast-l8I771QT.js → github-dark-high-contrast-CTx8LpdV.js} +0 -0
- /package/dist/web/assets/{github-light-DNhjkg8Z.js → github-light-DVsO5Un1.js} +0 -0
- /package/dist/web/assets/{github-light-default-DQ06uS3g.js → github-light-default-BiyPxicr.js} +0 -0
- /package/dist/web/assets/{github-light-high-contrast-qc2sZCVN.js → github-light-high-contrast-BPlnke0a.js} +0 -0
- /package/dist/web/assets/{gleam-DPPatkNH.js → gleam-CWSxvD0C.js} +0 -0
- /package/dist/web/assets/{gn-BnzGQTy5.js → gn-D7NUVJuv.js} +0 -0
- /package/dist/web/assets/{gnuplot-Ct1leoo3.js → gnuplot-c5uXmJKc.js} +0 -0
- /package/dist/web/assets/{go-qysCdbrn.js → go-CRsHi4Cw.js} +0 -0
- /package/dist/web/assets/{groovy-BkWIdrRQ.js → groovy-DpV0RA5r.js} +0 -0
- /package/dist/web/assets/{gruvbox-dark-hard-L6Iiybbl.js → gruvbox-dark-hard-DD9fguUN.js} +0 -0
- /package/dist/web/assets/{gruvbox-dark-medium-DbD3yl0b.js → gruvbox-dark-medium-BvcwpYJ-.js} +0 -0
- /package/dist/web/assets/{gruvbox-dark-soft-Ban2cHK3.js → gruvbox-dark-soft-48dCxX9M.js} +0 -0
- /package/dist/web/assets/{gruvbox-light-hard-CK_SjS3e.js → gruvbox-light-hard-CjJ994Ip.js} +0 -0
- /package/dist/web/assets/{gruvbox-light-medium-Bjgvhc2w.js → gruvbox-light-medium-DQJQZ_rV.js} +0 -0
- /package/dist/web/assets/{gruvbox-light-soft-EWnyYGUu.js → gruvbox-light-soft-AqsC9mKw.js} +0 -0
- /package/dist/web/assets/{haskell-rT1N9nYr.js → haskell-B5V7yvmh.js} +0 -0
- /package/dist/web/assets/{haxe-Bbc91axo.js → haxe-LWTKfPKr.js} +0 -0
- /package/dist/web/assets/{hcl-D-3qJA4v.js → hcl-QmNZdAtI.js} +0 -0
- /package/dist/web/assets/{hjson-DWtewcyQ.js → hjson-CboJsAzK.js} +0 -0
- /package/dist/web/assets/{hlsl-C7t6hCrO.js → hlsl-Bd-DO_WL.js} +0 -0
- /package/dist/web/assets/{horizon-zJAGUQ3j.js → horizon-CU8Bi_ss.js} +0 -0
- /package/dist/web/assets/{horizon-bright-CRNyrJy8.js → horizon-bright-iSQ3_3jP.js} +0 -0
- /package/dist/web/assets/{houston-BFKa4W1-.js → houston-CTXv3Puz.js} +0 -0
- /package/dist/web/assets/{hy-W1hNjMBM.js → hy-Cd4hTidD.js} +0 -0
- /package/dist/web/assets/{image-gallery-BycaVWOu.js → image-gallery-J8h8IY0c.js} +0 -0
- /package/dist/web/assets/{imba-CPphaV-V.js → imba-BipCHEY2.js} +0 -0
- /package/dist/web/assets/{ini-CayaZ4vW.js → ini-Dd1KkMrB.js} +0 -0
- /package/dist/web/assets/{java-BPAE_9Ej.js → java-rGr0OQD8.js} +0 -0
- /package/dist/web/assets/{javascript-C5SKIVqe.js → javascript-DHhCH2TN.js} +0 -0
- /package/dist/web/assets/{json-C-0EUYmu.js → json-CMMLBCUf.js} +0 -0
- /package/dist/web/assets/{json5-BqVetEZL.js → json5-mPOwTOsB.js} +0 -0
- /package/dist/web/assets/{jsonc-DnjIzkUB.js → jsonc-Bie0E6D3.js} +0 -0
- /package/dist/web/assets/{jsonl-rbV-3EqO.js → jsonl-CpqHmtC1.js} +0 -0
- /package/dist/web/assets/{jsonnet-9hvXw4qr.js → jsonnet-D21Ms51e.js} +0 -0
- /package/dist/web/assets/{jssm-1ifXyIhu.js → jssm-BXnl1nur.js} +0 -0
- /package/dist/web/assets/{jsx-hPumywTY.js → jsx-Chnii_vB.js} +0 -0
- /package/dist/web/assets/{kanagawa-dragon-BCPjmoMO.js → kanagawa-dragon-DhxR0UjL.js} +0 -0
- /package/dist/web/assets/{kanagawa-lotus-DN2VNjy7.js → kanagawa-lotus-fupRg5wp.js} +0 -0
- /package/dist/web/assets/{kanagawa-wave-B8RZEsgc.js → kanagawa-wave-DSWbRS9M.js} +0 -0
- /package/dist/web/assets/{kdl-CkvjWQIa.js → kdl-DirGHqUy.js} +0 -0
- /package/dist/web/assets/{kotlin-D8cnRi5o.js → kotlin-DkhUVMDC.js} +0 -0
- /package/dist/web/assets/{kusto-CmeeBEJG.js → kusto-DU7OpovF.js} +0 -0
- /package/dist/web/assets/{laserwave--rtV8Mv9.js → laserwave-iLKb1ZCT.js} +0 -0
- /package/dist/web/assets/{lean-CS-Pyi42.js → lean-Cuvh_QAP.js} +0 -0
- /package/dist/web/assets/{less-Ddi_7qGm.js → less-B5tQZOdI.js} +0 -0
- /package/dist/web/assets/{lib-DIrxSyLb.js → lib-el9rA30D.js} +0 -0
- /package/dist/web/assets/{libesm-CYLrAeW3.js → libesm-CdttTIAd.js} +0 -0
- /package/dist/web/assets/{light-plus-CrEjpkkX.js → light-plus-DiHU2KL5.js} +0 -0
- /package/dist/web/assets/{llvm-Cm7ZXmAO.js → llvm-sCBTKCKN.js} +0 -0
- /package/dist/web/assets/{log-lW2sYxtp.js → log-DtyR34Ie.js} +0 -0
- /package/dist/web/assets/{logo-B-PiRb53.js → logo-CP91aQyG.js} +0 -0
- /package/dist/web/assets/{luau-8St0pC-R.js → luau-nfGo2ulP.js} +0 -0
- /package/dist/web/assets/{make-DbNdhH54.js → make-XbDn9GHe.js} +0 -0
- /package/dist/web/assets/{markdown-CYocYSGd.js → markdown-BB1_3xLr.js} +0 -0
- /package/dist/web/assets/{material-theme-CVBF1Cbi.js → material-theme-CIx_sxAy.js} +0 -0
- /package/dist/web/assets/{material-theme-darker-HFrlNZD8.js → material-theme-darker-DsQeueDD.js} +0 -0
- /package/dist/web/assets/{material-theme-lighter-BM-uz2ft.js → material-theme-lighter-x_lMi74j.js} +0 -0
- /package/dist/web/assets/{material-theme-ocean-PbvUez8m.js → material-theme-ocean-Bkgh25P8.js} +0 -0
- /package/dist/web/assets/{material-theme-palenight-B22Ck6qd.js → material-theme-palenight-CoOjdbti.js} +0 -0
- /package/dist/web/assets/{matlab-GFFNzucw.js → matlab-D6xZas_8.js} +0 -0
- /package/dist/web/assets/{mdx-BVnJzMDx.js → mdx-Cl5_YNoz.js} +0 -0
- /package/dist/web/assets/{mermaid-BlCmSTCM.js → mermaid-8Eow4jz_.js} +0 -0
- /package/dist/web/assets/{min-dark-B0PwlAfC.js → min-dark-D4DhjgRE.js} +0 -0
- /package/dist/web/assets/{min-light-C_H2ABKu.js → min-light-DzAckd0t.js} +0 -0
- /package/dist/web/assets/{mipsasm-C3rf2fo6.js → mipsasm-zI_zu0tj.js} +0 -0
- /package/dist/web/assets/{mojo-CDRuzM3o.js → mojo-DQnGGPHf.js} +0 -0
- /package/dist/web/assets/{monokai-KiebNy_Y.js → monokai-CrFoD2VD.js} +0 -0
- /package/dist/web/assets/{moonbit-CdVUHoWl.js → moonbit-DdphIGs6.js} +0 -0
- /package/dist/web/assets/{move-Dq9iKZRY.js → move-BUlkn0xW.js} +0 -0
- /package/dist/web/assets/{narrat-7y5L5sGM.js → narrat-CbOBdtCn.js} +0 -0
- /package/dist/web/assets/{nextflow-groovy-Cwcbkcrx.js → nextflow-groovy-CeVLUTuQ.js} +0 -0
- /package/dist/web/assets/{night-owl-TBgLPzj4.js → night-owl-Bm4LhUR1.js} +0 -0
- /package/dist/web/assets/{night-owl-light-Dehb9My2.js → night-owl-light-DtcBiMEf.js} +0 -0
- /package/dist/web/assets/{nix-BKj-gzoX.js → nix-DrdwQ70g.js} +0 -0
- /package/dist/web/assets/{nord-BF_r8PeX.js → nord-B0Head1v.js} +0 -0
- /package/dist/web/assets/{nushell-CeAjk9_E.js → nushell-CmUdltKn.js} +0 -0
- /package/dist/web/assets/{objective-c-Xl1OMcDp.js → objective-c-BGDR33XN.js} +0 -0
- /package/dist/web/assets/{objective-cpp-C4ZgzrRq.js → objective-cpp-Buc1Zhd0.js} +0 -0
- /package/dist/web/assets/{ocaml-CGj8IYTq.js → ocaml-xdzl9rRD.js} +0 -0
- /package/dist/web/assets/{odin-C4veqvW2.js → odin-DiUFngnd.js} +0 -0
- /package/dist/web/assets/{one-dark-pro-gAcWejsV.js → one-dark-pro-BURxmIp3.js} +0 -0
- /package/dist/web/assets/{one-light-B7E-UUXy.js → one-light-BMRMInAj.js} +0 -0
- /package/dist/web/assets/{openscad-C-wN9BEv.js → openscad-DAgLA5J3.js} +0 -0
- /package/dist/web/assets/{pascal-C8WBtxMs.js → pascal-CoDZxcRB.js} +0 -0
- /package/dist/web/assets/{pkl-BBfF4G2A.js → pkl-DzKM6BuM.js} +0 -0
- /package/dist/web/assets/{plastic-DFOAb89P.js → plastic-vF15LmNS.js} +0 -0
- /package/dist/web/assets/{plsql-BS2CEMMV.js → plsql-C1v07teA.js} +0 -0
- /package/dist/web/assets/{po-BKJDtPmy.js → po-CLLC8BuA.js} +0 -0
- /package/dist/web/assets/{poimandres-Cg3hL13e.js → poimandres-Uq0xysxM.js} +0 -0
- /package/dist/web/assets/{polar-B9ebiXUU.js → polar-2-luY1Pc.js} +0 -0
- /package/dist/web/assets/{portal-container-context-a399Hd9F.js → portal-container-context-DKymYOY-.js} +0 -0
- /package/dist/web/assets/{postcss-B5REwNY_.js → postcss-lbFhe0rz.js} +0 -0
- /package/dist/web/assets/{powerquery-stc0Gzkf.js → powerquery-RL8O9Wie.js} +0 -0
- /package/dist/web/assets/{powershell-jgd0ahJN.js → powershell-upFWhb-b.js} +0 -0
- /package/dist/web/assets/{prisma-CWuZjRhI.js → prisma-DBtYaWFk.js} +0 -0
- /package/dist/web/assets/{prolog-D5zNFE63.js → prolog-D8jSMykJ.js} +0 -0
- /package/dist/web/assets/{proto-B-6RrU7n.js → proto-BM4eadF7.js} +0 -0
- /package/dist/web/assets/{puppet-DONP8TDR.js → puppet-BQDQ3Snu.js} +0 -0
- /package/dist/web/assets/{purescript-DDJITf-A.js → purescript-Cj2aTX4s.js} +0 -0
- /package/dist/web/assets/{python-bmWy9j1-.js → python-BYpqq6u4.js} +0 -0
- /package/dist/web/assets/{qmldir-CKDwMt7X.js → qmldir-4uiTcwAu.js} +0 -0
- /package/dist/web/assets/{qss-DptQQzBn.js → qss-D5xB-Mqo.js} +0 -0
- /package/dist/web/assets/{r-BorKpJ8r.js → r-P6Ujy8rf.js} +0 -0
- /package/dist/web/assets/{racket-BaHpYVsZ.js → racket-COKgCFuM.js} +0 -0
- /package/dist/web/assets/{raku-DFJIV4k_.js → raku-z14Q9i7K.js} +0 -0
- /package/dist/web/assets/{react-X4jUntEf.js → react-D1Yg256j.js} +0 -0
- /package/dist/web/assets/{red-70oJGrkb.js → red-ObAvgvQ5.js} +0 -0
- /package/dist/web/assets/{reg-C4g235Dv.js → reg-Qv4f0JFA.js} +0 -0
- /package/dist/web/assets/{regexp-Cw1UVmti.js → regexp-CEOVGIzy.js} +0 -0
- /package/dist/web/assets/{rel-DeLhIz5L.js → rel-cWOyTUwd.js} +0 -0
- /package/dist/web/assets/{resolve-theme-b_yGlUFQ.js → resolve-theme-CMp5xxCW.js} +0 -0
- /package/dist/web/assets/{riscv-ChnTiBRK.js → riscv-BZDwx-lv.js} +0 -0
- /package/dist/web/assets/{ron-C5IWeqDn.js → ron-BpjosPS0.js} +0 -0
- /package/dist/web/assets/{rose-pine-DCR0ohYW.js → rose-pine-DhxfJWcm.js} +0 -0
- /package/dist/web/assets/{rose-pine-dawn-DvGZs1PR.js → rose-pine-dawn-BbGt9Wy_.js} +0 -0
- /package/dist/web/assets/{rose-pine-moon-BWACHjeS.js → rose-pine-moon-dj4Zxgik.js} +0 -0
- /package/dist/web/assets/{rosmsg-CQlIVazE.js → rosmsg-EciOaHo2.js} +0 -0
- /package/dist/web/assets/{rust-DGGVzWI8.js → rust-C_eH59O_.js} +0 -0
- /package/dist/web/assets/{sass-bj1C0rFI.js → sass-Dos3R5lL.js} +0 -0
- /package/dist/web/assets/{scala-MU1tLKDi.js → scala-8lVKsTvf.js} +0 -0
- /package/dist/web/assets/{scheme-CeGXtv7t.js → scheme-Bd3VdaZj.js} +0 -0
- /package/dist/web/assets/{sdbl-D0HLSGKp.js → sdbl-C4Yrjlgh.js} +0 -0
- /package/dist/web/assets/{shellscript-DkYiDvh1.js → shellscript-OFZbPKZH.js} +0 -0
- /package/dist/web/assets/{slack-dark-YqeHiGWH.js → slack-dark-aL6vlxZs.js} +0 -0
- /package/dist/web/assets/{slack-ochin-9Oe0DljJ.js → slack-ochin-BKt1E7sL.js} +0 -0
- /package/dist/web/assets/{smalltalk-CaaxedR7.js → smalltalk-D6qVBL1U.js} +0 -0
- /package/dist/web/assets/{snazzy-light-C8s2FHNC.js → snazzy-light-BrWerT0t.js} +0 -0
- /package/dist/web/assets/{solarized-dark-0ryY6oN3.js → solarized-dark-CzxTJgVQ.js} +0 -0
- /package/dist/web/assets/{solarized-light-bltgZeNh.js → solarized-light-BecaDAnG.js} +0 -0
- /package/dist/web/assets/{solidity-DOf5HmLZ.js → solidity-C9t7pZ84.js} +0 -0
- /package/dist/web/assets/{splunk-D1u4WHDW.js → splunk-CtxfFKtF.js} +0 -0
- /package/dist/web/assets/{sql-G8uQZljX.js → sql-7FE_Duz0.js} +0 -0
- /package/dist/web/assets/{ssh-config-rbXvly7Q.js → ssh-config-3Fr37ACC.js} +0 -0
- /package/dist/web/assets/{stylus-Cii1iADy.js → stylus-BP4mE1sO.js} +0 -0
- /package/dist/web/assets/{swift-DpIgonN4.js → swift-0uqTFouD.js} +0 -0
- /package/dist/web/assets/{synthwave-84-DjGLzU2b.js → synthwave-84-DQaNM3DI.js} +0 -0
- /package/dist/web/assets/{system-verilog-_Z0M0Hs1.js → system-verilog-DUIVrZHZ.js} +0 -0
- /package/dist/web/assets/{systemd-BhyDCh9P.js → systemd-CtNo_WIh.js} +0 -0
- /package/dist/web/assets/{talonscript-CNchgCRD.js → talonscript-B0HXaCVT.js} +0 -0
- /package/dist/web/assets/{tasl-m--W7Pyr.js → tasl-Cb7RAl11.js} +0 -0
- /package/dist/web/assets/{tcl-gY-M_2BC.js → tcl-B79aC6l5.js} +0 -0
- /package/dist/web/assets/{terraform-CB6CzMwo.js → terraform-75jJDjpW.js} +0 -0
- /package/dist/web/assets/{tokyo-night-COh9oRYi.js → tokyo-night-Cz9Uh9qb.js} +0 -0
- /package/dist/web/assets/{toml-Bg2bsY-v.js → toml-CD6y9A-z.js} +0 -0
- /package/dist/web/assets/{tsv-DceGDiJC.js → tsv-CXJMbBrb.js} +0 -0
- /package/dist/web/assets/{tsx-EccDYa7i.js → tsx-BuYN0I2t.js} +0 -0
- /package/dist/web/assets/{turtle-C_l2JhvX.js → turtle-DWH-Rjse.js} +0 -0
- /package/dist/web/assets/{typescript-C1ytmMcr.js → typescript-BPd-hsrR.js} +0 -0
- /package/dist/web/assets/{typespec-De2ztzG5.js → typespec-B0wvVykx.js} +0 -0
- /package/dist/web/assets/{typst-DNcS7gSr.js → typst-DWG2c48-.js} +0 -0
- /package/dist/web/assets/{use-is-mobile-CYW3FJFE.js → use-is-mobile-D1weanbj.js} +0 -0
- /package/dist/web/assets/{use-visual-viewport-D9O48HQt.js → use-visual-viewport-Bfl3Bxxb.js} +0 -0
- /package/dist/web/assets/{utils-C9OjCrou.js → utils-IrnQujwR.js} +0 -0
- /package/dist/web/assets/{v-DSMUsdMO.js → v-Ch6E4Egd.js} +0 -0
- /package/dist/web/assets/{vala-BEazLpkO.js → vala-CGVKwbPx.js} +0 -0
- /package/dist/web/assets/{vb-CV9pEJzW.js → vb-BIEbSxyT.js} +0 -0
- /package/dist/web/assets/{vendor-xterm-cuGQmUjN.js → vendor-xterm-YQlzIWv2.js} +0 -0
- /package/dist/web/assets/{verilog-DhXkLVMk.js → verilog-A-3pYPad.js} +0 -0
- /package/dist/web/assets/{vesper-n4IltYq-.js → vesper-CK1naZAV.js} +0 -0
- /package/dist/web/assets/{vhdl-CePjFbvs.js → vhdl-CVawmgMg.js} +0 -0
- /package/dist/web/assets/{viml-ChndFsm5.js → viml-CiWjaqBY.js} +0 -0
- /package/dist/web/assets/{vitesse-black-BytVdvhC.js → vitesse-black-PYXW4-BO.js} +0 -0
- /package/dist/web/assets/{vitesse-dark-83Wech0N.js → vitesse-dark-BU5s4AuG.js} +0 -0
- /package/dist/web/assets/{vitesse-light-Xg4wbeMO.js → vitesse-light-DgkIT-N7.js} +0 -0
- /package/dist/web/assets/{vyper-eW1NC3FG.js → vyper-D8cRDPp3.js} +0 -0
- /package/dist/web/assets/{wasm-BucxKwBZ.js → wasm-C02wlRbP.js} +0 -0
- /package/dist/web/assets/{wasm-Bhucqu1z.js → wasm-ClFJgzmT.js} +0 -0
- /package/dist/web/assets/{wenyan-BJFBuXuH.js → wenyan-B8plxIr8.js} +0 -0
- /package/dist/web/assets/{wgsl-6z4FUyMK.js → wgsl-CVujtm3V.js} +0 -0
- /package/dist/web/assets/{wikitext-BoDU6teJ.js → wikitext-CmcG9B69.js} +0 -0
- /package/dist/web/assets/{wit-DerMPpgt.js → wit--gl2Jium.js} +0 -0
- /package/dist/web/assets/{wolfram-D78v0Ap-.js → wolfram-6T_1D-NS.js} +0 -0
- /package/dist/web/assets/{x-YDu4m2Iq.js → x-CxoBA0po.js} +0 -0
- /package/dist/web/assets/{yaml-C4TIgIw4.js → yaml-CIVV9uA1.js} +0 -0
- /package/dist/web/assets/{zenscript-BydW-dLC.js → zenscript-CoT4yNdA.js} +0 -0
- /package/dist/web/assets/{zig-b9lTqL5E.js → zig-BWs2Qo3G.js} +0 -0
|
@@ -0,0 +1,483 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Interactive rebase panel — drag to reorder, then reword/edit/squash/fixup/drop.
|
|
3
|
+
*
|
|
4
|
+
* See `rebase-todo.ts` for how the plan reaches git, and how a reword's message
|
|
5
|
+
* gets there without an interactive editor.
|
|
6
|
+
*/
|
|
7
|
+
import type { ExtensionContext } from "@ppm/vscode-compat";
|
|
8
|
+
import type { VscodeApi } from "./git-exec.ts";
|
|
9
|
+
import { assertValidHash, assertValidRef, spawnGit } from "./git-exec.ts";
|
|
10
|
+
import { openPanel } from "./panel-registry.ts";
|
|
11
|
+
import { registerViewCommand } from "./register-view-command.ts";
|
|
12
|
+
import { takePendingTarget } from "./panel-nav.ts";
|
|
13
|
+
import { detectMergeState } from "./git-state.ts";
|
|
14
|
+
import { FILE_HISTORY_FORMAT, parseFileHistory } from "./file-history-parser.ts";
|
|
15
|
+
import type { RebaseTodoEntry } from "./rebase-todo.ts";
|
|
16
|
+
import { SEQUENCE_EDITOR, TODO_ENV_VAR, buildRebaseTodo, isRebaseAction } from "./rebase-todo.ts";
|
|
17
|
+
import { shellHtml } from "./webview-shell.ts";
|
|
18
|
+
|
|
19
|
+
const VIEW_TYPE = "git-graph.interactiveRebase";
|
|
20
|
+
/** Interactive rebases longer than this are a sign something else is wanted. */
|
|
21
|
+
const MAX_PLAN_SIZE = 100;
|
|
22
|
+
|
|
23
|
+
export interface RebaseTarget {
|
|
24
|
+
/** Rebase the commits after this one, i.e. the base. */
|
|
25
|
+
base?: string;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export function registerRebaseView(context: ExtensionContext, vscode: VscodeApi): void {
|
|
29
|
+
registerViewCommand({
|
|
30
|
+
context,
|
|
31
|
+
vscode,
|
|
32
|
+
command: VIEW_TYPE,
|
|
33
|
+
label: "Interactive Rebase",
|
|
34
|
+
open: (projectPath, args) => {
|
|
35
|
+
const base = typeof args[1] === "string" ? args[1] : undefined;
|
|
36
|
+
openRebaseView(vscode, context, projectPath, base ? { base } : undefined);
|
|
37
|
+
},
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export function openRebaseView(
|
|
42
|
+
vscode: VscodeApi,
|
|
43
|
+
_context: ExtensionContext,
|
|
44
|
+
projectPath: string,
|
|
45
|
+
target?: RebaseTarget,
|
|
46
|
+
): void {
|
|
47
|
+
const dirName = projectPath.split(/[\\/]/).filter(Boolean).pop() || "Rebase";
|
|
48
|
+
const initialTarget = target ?? takePendingTarget<RebaseTarget>(VIEW_TYPE, projectPath);
|
|
49
|
+
|
|
50
|
+
const panel = openPanel({
|
|
51
|
+
vscode,
|
|
52
|
+
viewType: VIEW_TYPE,
|
|
53
|
+
title: `Interactive Rebase: ${dirName}`,
|
|
54
|
+
projectPath,
|
|
55
|
+
html: getRebaseHtml(),
|
|
56
|
+
onMessage: async (raw) => {
|
|
57
|
+
const msg = raw as Record<string, any>;
|
|
58
|
+
try {
|
|
59
|
+
switch (msg.command) {
|
|
60
|
+
case "ready":
|
|
61
|
+
await sendState(initialTarget?.base);
|
|
62
|
+
break;
|
|
63
|
+
|
|
64
|
+
case "requestPlan":
|
|
65
|
+
await sendState(msg.base ? String(msg.base) : undefined, msg.count);
|
|
66
|
+
break;
|
|
67
|
+
|
|
68
|
+
case "runRebase":
|
|
69
|
+
await runRebase(msg.base, msg.entries);
|
|
70
|
+
break;
|
|
71
|
+
|
|
72
|
+
case "rebaseAction": {
|
|
73
|
+
const action = String(msg.action);
|
|
74
|
+
const flag = action === "continue" ? "--continue"
|
|
75
|
+
: action === "abort" ? "--abort"
|
|
76
|
+
: action === "skip" ? "--skip"
|
|
77
|
+
: null;
|
|
78
|
+
if (!flag) throw new Error(`Unknown rebase action: ${action}`);
|
|
79
|
+
const res = await spawnGit(vscode, ["rebase", flag], projectPath, 120_000);
|
|
80
|
+
await panel.webview.postMessage({
|
|
81
|
+
command: "rebaseResult",
|
|
82
|
+
data: {
|
|
83
|
+
ok: res.exitCode === 0,
|
|
84
|
+
output: (res.stdout + res.stderr).trim(),
|
|
85
|
+
},
|
|
86
|
+
});
|
|
87
|
+
await sendState();
|
|
88
|
+
break;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
} catch (e) {
|
|
92
|
+
await panel.webview.postMessage({
|
|
93
|
+
command: "error",
|
|
94
|
+
message: e instanceof Error ? e.message : String(e),
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
},
|
|
98
|
+
});
|
|
99
|
+
|
|
100
|
+
async function sendState(base?: string, rawCount?: unknown): Promise<void> {
|
|
101
|
+
const mergeState = await detectMergeState(vscode, projectPath);
|
|
102
|
+
const inProgress = mergeState?.type ?? null;
|
|
103
|
+
const branchRes = await spawnGit(vscode, ["rev-parse", "--abbrev-ref", "HEAD"], projectPath);
|
|
104
|
+
const branch = branchRes.exitCode === 0 ? branchRes.stdout.trim() : null;
|
|
105
|
+
|
|
106
|
+
if (inProgress) {
|
|
107
|
+
await panel.webview.postMessage({
|
|
108
|
+
command: "loadState",
|
|
109
|
+
data: {
|
|
110
|
+
inProgress,
|
|
111
|
+
progress: mergeState?.progress ?? null,
|
|
112
|
+
branch,
|
|
113
|
+
commits: [],
|
|
114
|
+
base: null,
|
|
115
|
+
upstream: null,
|
|
116
|
+
},
|
|
117
|
+
});
|
|
118
|
+
return;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
// Default plan: the commits this branch has that its upstream does not —
|
|
122
|
+
// the ones that are still safe to rewrite.
|
|
123
|
+
let resolvedBase = base;
|
|
124
|
+
let upstream: string | null = null;
|
|
125
|
+
const upstreamRes = await spawnGit(
|
|
126
|
+
vscode,
|
|
127
|
+
["rev-parse", "--abbrev-ref", "--symbolic-full-name", "@{upstream}"],
|
|
128
|
+
projectPath,
|
|
129
|
+
);
|
|
130
|
+
if (upstreamRes.exitCode === 0) upstream = upstreamRes.stdout.trim() || null;
|
|
131
|
+
|
|
132
|
+
const count = Number(rawCount);
|
|
133
|
+
if (!resolvedBase && Number.isInteger(count) && count > 0) {
|
|
134
|
+
const head = await spawnGit(vscode, ["rev-parse", `HEAD~${Math.min(count, MAX_PLAN_SIZE)}`], projectPath);
|
|
135
|
+
if (head.exitCode === 0) resolvedBase = head.stdout.trim();
|
|
136
|
+
}
|
|
137
|
+
if (!resolvedBase && upstream) {
|
|
138
|
+
const mergeBase = await spawnGit(vscode, ["merge-base", "HEAD", assertValidRef(upstream, "upstream")], projectPath);
|
|
139
|
+
if (mergeBase.exitCode === 0) resolvedBase = mergeBase.stdout.trim();
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
let commits: ReturnType<typeof parseFileHistory> = [];
|
|
143
|
+
if (resolvedBase) {
|
|
144
|
+
const validBase = assertValidHash(resolvedBase);
|
|
145
|
+
const logRes = await spawnGit(vscode, [
|
|
146
|
+
"log", `--format=${FILE_HISTORY_FORMAT}`, `--max-count=${MAX_PLAN_SIZE}`,
|
|
147
|
+
`${validBase}..HEAD`,
|
|
148
|
+
], projectPath, 60_000);
|
|
149
|
+
if (logRes.exitCode === 0) commits = parseFileHistory(logRes.stdout);
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
await panel.webview.postMessage({
|
|
153
|
+
command: "loadState",
|
|
154
|
+
data: { inProgress: null, branch, upstream, base: resolvedBase ?? null, commits },
|
|
155
|
+
});
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
async function runRebase(rawBase: unknown, rawEntries: unknown): Promise<void> {
|
|
159
|
+
const base = assertValidHash(rawBase);
|
|
160
|
+
if (!Array.isArray(rawEntries) || rawEntries.length === 0) {
|
|
161
|
+
throw new Error("The rebase plan is empty.");
|
|
162
|
+
}
|
|
163
|
+
if (rawEntries.length > MAX_PLAN_SIZE) {
|
|
164
|
+
throw new Error(`This plan has ${rawEntries.length} commits; the limit is ${MAX_PLAN_SIZE}.`);
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
// The panel lists newest-first; git's todo is oldest-first.
|
|
168
|
+
const entries: RebaseTodoEntry[] = rawEntries
|
|
169
|
+
.slice()
|
|
170
|
+
.reverse()
|
|
171
|
+
.map((raw) => {
|
|
172
|
+
const e = raw as Record<string, unknown>;
|
|
173
|
+
if (!isRebaseAction(e.action)) throw new Error(`Invalid rebase action: "${String(e.action)}"`);
|
|
174
|
+
return {
|
|
175
|
+
hash: assertValidHash(e.hash),
|
|
176
|
+
action: e.action,
|
|
177
|
+
subject: typeof e.subject === "string" ? e.subject : undefined,
|
|
178
|
+
message: typeof e.message === "string" ? e.message : undefined,
|
|
179
|
+
};
|
|
180
|
+
});
|
|
181
|
+
|
|
182
|
+
const { todo, env } = buildRebaseTodo(entries);
|
|
183
|
+
|
|
184
|
+
await panel.webview.postMessage({ command: "running" });
|
|
185
|
+
const res = await spawnGit(
|
|
186
|
+
vscode,
|
|
187
|
+
["rebase", "-i", base],
|
|
188
|
+
projectPath,
|
|
189
|
+
180_000,
|
|
190
|
+
{
|
|
191
|
+
...env,
|
|
192
|
+
[TODO_ENV_VAR]: todo,
|
|
193
|
+
GIT_SEQUENCE_EDITOR: SEQUENCE_EDITOR,
|
|
194
|
+
// Any commit-message editor git reaches for during squash/fixup accepts
|
|
195
|
+
// the message git already composed. A reword supplies its message on the
|
|
196
|
+
// `exec` line instead, so nothing here ever needs human input.
|
|
197
|
+
GIT_EDITOR: "true",
|
|
198
|
+
},
|
|
199
|
+
);
|
|
200
|
+
|
|
201
|
+
await panel.webview.postMessage({
|
|
202
|
+
command: "rebaseResult",
|
|
203
|
+
data: { ok: res.exitCode === 0, output: (res.stdout + res.stderr).trim() },
|
|
204
|
+
});
|
|
205
|
+
await sendState();
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
function getRebaseHtml(): string {
|
|
210
|
+
return shellHtml({
|
|
211
|
+
toolbar: `
|
|
212
|
+
<div class="toolbar-left">
|
|
213
|
+
<span class="toolbar-title" id="branch-label"></span>
|
|
214
|
+
<span class="toolbar-sub" id="base-label"></span>
|
|
215
|
+
</div>
|
|
216
|
+
<div class="toolbar-right">
|
|
217
|
+
<label class="range-label">Last <input type="text" id="count" class="count-input" placeholder="n" inputmode="numeric" /> commits</label>
|
|
218
|
+
<button id="btn-apply-count">Load</button>
|
|
219
|
+
<button id="btn-reset">Reset plan</button>
|
|
220
|
+
<button id="btn-run" class="primary" disabled>Start rebase</button>
|
|
221
|
+
</div>`,
|
|
222
|
+
body: `
|
|
223
|
+
<div id="progress" class="banner hidden">
|
|
224
|
+
<span id="progress-text"></span>
|
|
225
|
+
<span style="flex:1"></span>
|
|
226
|
+
<button data-rb="continue">Continue</button>
|
|
227
|
+
<button data-rb="skip">Skip</button>
|
|
228
|
+
<button data-rb="abort" class="danger">Abort</button>
|
|
229
|
+
</div>
|
|
230
|
+
<div id="list" class="scroll"></div>
|
|
231
|
+
<div class="foot">
|
|
232
|
+
Drag a row to reorder. <b>squash</b> folds a commit into the one below it in this
|
|
233
|
+
list and keeps both messages; <b>fixup</b> folds it in and discards its message.
|
|
234
|
+
<b>reword</b> asks for the new message here, up front. <b>edit</b> stops the rebase at
|
|
235
|
+
that commit so you can change it — stage what you want, then press Continue.
|
|
236
|
+
</div>
|
|
237
|
+
<div id="output" class="output hidden"></div>`,
|
|
238
|
+
css: `
|
|
239
|
+
.range-label { display: flex; align-items: center; gap: 4px; font-size: 11px; color: var(--subtext); white-space: nowrap; }
|
|
240
|
+
.count-input { width: 44px; }
|
|
241
|
+
|
|
242
|
+
.rb-row { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-bottom: 1px solid var(--border); background: var(--bg); }
|
|
243
|
+
.rb-row[draggable=true] { cursor: grab; }
|
|
244
|
+
.rb-row.dragging { opacity: 0.4; }
|
|
245
|
+
.rb-row.drop-before { box-shadow: inset 0 2px 0 var(--blue); }
|
|
246
|
+
.rb-row.drop-after { box-shadow: inset 0 -2px 0 var(--blue); }
|
|
247
|
+
.rb-row.act-drop { opacity: 0.5; }
|
|
248
|
+
.rb-row.act-drop .rb-subject { text-decoration: line-through; }
|
|
249
|
+
.rb-row.act-squash, .rb-row.act-fixup { border-left: 3px solid var(--purple); }
|
|
250
|
+
.rb-row.act-reword, .rb-row.act-edit { border-left: 3px solid var(--blue); }
|
|
251
|
+
.rb-reword { padding: 6px 10px 8px 34px; border-bottom: 1px solid var(--border); background: var(--surface); }
|
|
252
|
+
.rb-reword textarea { width: 100%; box-sizing: border-box; resize: vertical; font-size: 12px; line-height: 1.4; }
|
|
253
|
+
.rb-grip { color: var(--subtle); flex-shrink: 0; user-select: none; font-size: 14px; line-height: 1; }
|
|
254
|
+
.rb-main { flex: 1; min-width: 0; }
|
|
255
|
+
.rb-subject { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
|
|
256
|
+
.rb-meta { color: var(--subtext); font-size: 10px; margin-top: 2px; display: flex; gap: 6px; align-items: center; }
|
|
257
|
+
.rb-hash { font-family: ui-monospace, monospace; }
|
|
258
|
+
.rb-action { flex-shrink: 0; }
|
|
259
|
+
.rb-move { display: flex; flex-direction: column; gap: 1px; flex-shrink: 0; }
|
|
260
|
+
.rb-move button { padding: 0 4px; min-height: 14px; min-width: 18px; font-size: 9px; line-height: 1.2; }
|
|
261
|
+
|
|
262
|
+
.foot { padding: 6px 10px; border-top: 1px solid var(--border); color: var(--subtext); font-size: 10px; flex-shrink: 0; line-height: 1.5; }
|
|
263
|
+
.output { border-top: 1px solid var(--border2); background: var(--surface); padding: 8px 10px; font-family: ui-monospace, monospace; font-size: 10px; white-space: pre-wrap; max-height: 28vh; overflow: auto; flex-shrink: 0; }
|
|
264
|
+
.output.ok { color: var(--green); }
|
|
265
|
+
.output.fail { color: var(--red); }
|
|
266
|
+
|
|
267
|
+
/* Touch devices cannot drag HTML5-style, so the arrow buttons are the path */
|
|
268
|
+
@media (pointer: coarse) { .rb-move button { min-height: 22px; min-width: 28px; font-size: 11px; } }`,
|
|
269
|
+
script: `
|
|
270
|
+
const ACTIONS = ['pick', 'reword', 'edit', 'squash', 'fixup', 'drop'];
|
|
271
|
+
const state = { base: null, branch: null, upstream: null, plan: [], inProgress: null, dragIdx: null };
|
|
272
|
+
|
|
273
|
+
const el = {
|
|
274
|
+
list: document.getElementById('list'),
|
|
275
|
+
branchLabel: document.getElementById('branch-label'),
|
|
276
|
+
baseLabel: document.getElementById('base-label'),
|
|
277
|
+
progress: document.getElementById('progress'),
|
|
278
|
+
progressText: document.getElementById('progress-text'),
|
|
279
|
+
output: document.getElementById('output'),
|
|
280
|
+
btnRun: document.getElementById('btn-run'),
|
|
281
|
+
count: document.getElementById('count'),
|
|
282
|
+
};
|
|
283
|
+
|
|
284
|
+
function render() {
|
|
285
|
+
if (state.inProgress) {
|
|
286
|
+
el.list.innerHTML = '<div class="empty">A rebase is already in progress. Resolve the conflict in the editor, then Continue — or Abort to go back.</div>';
|
|
287
|
+
el.btnRun.disabled = true;
|
|
288
|
+
return;
|
|
289
|
+
}
|
|
290
|
+
if (!state.plan.length) {
|
|
291
|
+
el.list.innerHTML = '<div class="empty">' + (state.base
|
|
292
|
+
? 'This branch has no commits above its base.'
|
|
293
|
+
: 'No upstream branch to compare against. Enter how many recent commits to rebase.') + '</div>';
|
|
294
|
+
el.btnRun.disabled = true;
|
|
295
|
+
return;
|
|
296
|
+
}
|
|
297
|
+
el.btnRun.disabled = false;
|
|
298
|
+
el.list.innerHTML = state.plan.map((c, i) =>
|
|
299
|
+
'<div class="rb-row act-' + c.action + '" draggable="true" data-idx="' + i + '">'
|
|
300
|
+
+ '<span class="rb-grip">⠿</span>'
|
|
301
|
+
+ '<div class="rb-move">'
|
|
302
|
+
+ '<button data-move="up" data-idx="' + i + '" title="Move up"' + (i === 0 ? ' disabled' : '') + '>▲</button>'
|
|
303
|
+
+ '<button data-move="down" data-idx="' + i + '" title="Move down"' + (i === state.plan.length - 1 ? ' disabled' : '') + '>▼</button>'
|
|
304
|
+
+ '</div>'
|
|
305
|
+
+ '<div class="rb-main">'
|
|
306
|
+
+ '<div class="rb-subject">' + escHtml(c.subject) + '</div>'
|
|
307
|
+
+ '<div class="rb-meta">' + avatarHtml(c.author, c.authorEmail)
|
|
308
|
+
+ '<span>' + escHtml(c.author) + '</span>'
|
|
309
|
+
+ '<span>' + escHtml(relTime(c.authorDate)) + '</span>'
|
|
310
|
+
+ '<span class="rb-hash">' + escHtml(c.hash.slice(0, 7)) + '</span>'
|
|
311
|
+
+ '</div>'
|
|
312
|
+
+ '</div>'
|
|
313
|
+
+ '<select class="rb-action" data-idx="' + i + '">'
|
|
314
|
+
+ ACTIONS.map((a) => '<option value="' + a + '"' + (a === c.action ? ' selected' : '') + '>' + a + '</option>').join('')
|
|
315
|
+
+ '</select>'
|
|
316
|
+
+ '</div>'
|
|
317
|
+
+ (c.action === 'reword'
|
|
318
|
+
? '<div class="rb-reword"><textarea data-msg="' + i + '" rows="3" placeholder="New commit message">'
|
|
319
|
+
+ escHtml(c.message === undefined ? c.subject : c.message) + '</textarea></div>'
|
|
320
|
+
: '')).join('');
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
/* --- Reordering --- */
|
|
324
|
+
function move(from, to) {
|
|
325
|
+
if (to < 0 || to >= state.plan.length) return;
|
|
326
|
+
const [item] = state.plan.splice(from, 1);
|
|
327
|
+
state.plan.splice(to, 0, item);
|
|
328
|
+
render();
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
el.list.addEventListener('click', (e) => {
|
|
332
|
+
const btn = e.target.closest('button[data-move]');
|
|
333
|
+
if (!btn) return;
|
|
334
|
+
const idx = Number(btn.dataset.idx);
|
|
335
|
+
move(idx, btn.dataset.move === 'up' ? idx - 1 : idx + 1);
|
|
336
|
+
});
|
|
337
|
+
|
|
338
|
+
el.list.addEventListener('change', (e) => {
|
|
339
|
+
const sel = e.target.closest('select.rb-action');
|
|
340
|
+
if (!sel) return;
|
|
341
|
+
const idx = Number(sel.dataset.idx);
|
|
342
|
+
if (state.plan[idx]) {
|
|
343
|
+
// Seed the box with the current subject the first time reword is chosen —
|
|
344
|
+
// most rewords are a tweak, not a rewrite.
|
|
345
|
+
if (sel.value === 'reword' && state.plan[idx].message === undefined) {
|
|
346
|
+
state.plan[idx].message = state.plan[idx].subject;
|
|
347
|
+
}
|
|
348
|
+
state.plan[idx].action = sel.value;
|
|
349
|
+
render();
|
|
350
|
+
}
|
|
351
|
+
});
|
|
352
|
+
|
|
353
|
+
// The input event, not change: a re-render on every keystroke would take the
|
|
354
|
+
// caret with it, so the state is updated without touching the DOM.
|
|
355
|
+
el.list.addEventListener('input', (e) => {
|
|
356
|
+
const box = e.target.closest('textarea[data-msg]');
|
|
357
|
+
if (!box) return;
|
|
358
|
+
const idx = Number(box.dataset.msg);
|
|
359
|
+
if (state.plan[idx]) state.plan[idx].message = box.value;
|
|
360
|
+
});
|
|
361
|
+
|
|
362
|
+
el.list.addEventListener('dragstart', (e) => {
|
|
363
|
+
const row = e.target.closest('.rb-row');
|
|
364
|
+
if (!row) return;
|
|
365
|
+
state.dragIdx = Number(row.dataset.idx);
|
|
366
|
+
row.classList.add('dragging');
|
|
367
|
+
e.dataTransfer.effectAllowed = 'move';
|
|
368
|
+
// Firefox refuses to start a drag without data set.
|
|
369
|
+
e.dataTransfer.setData('text/plain', row.dataset.idx);
|
|
370
|
+
});
|
|
371
|
+
|
|
372
|
+
el.list.addEventListener('dragover', (e) => {
|
|
373
|
+
const row = e.target.closest('.rb-row');
|
|
374
|
+
if (!row || state.dragIdx === null) return;
|
|
375
|
+
e.preventDefault();
|
|
376
|
+
const rect = row.getBoundingClientRect();
|
|
377
|
+
const after = e.clientY > rect.top + rect.height / 2;
|
|
378
|
+
for (const r of el.list.querySelectorAll('.rb-row')) r.classList.remove('drop-before', 'drop-after');
|
|
379
|
+
row.classList.add(after ? 'drop-after' : 'drop-before');
|
|
380
|
+
});
|
|
381
|
+
|
|
382
|
+
el.list.addEventListener('drop', (e) => {
|
|
383
|
+
const row = e.target.closest('.rb-row');
|
|
384
|
+
if (!row || state.dragIdx === null) return;
|
|
385
|
+
e.preventDefault();
|
|
386
|
+
const target = Number(row.dataset.idx);
|
|
387
|
+
const rect = row.getBoundingClientRect();
|
|
388
|
+
const after = e.clientY > rect.top + rect.height / 2;
|
|
389
|
+
let to = after ? target + 1 : target;
|
|
390
|
+
if (state.dragIdx < to) to -= 1;
|
|
391
|
+
move(state.dragIdx, to);
|
|
392
|
+
state.dragIdx = null;
|
|
393
|
+
});
|
|
394
|
+
|
|
395
|
+
el.list.addEventListener('dragend', () => {
|
|
396
|
+
state.dragIdx = null;
|
|
397
|
+
for (const r of el.list.querySelectorAll('.rb-row')) r.classList.remove('dragging', 'drop-before', 'drop-after');
|
|
398
|
+
});
|
|
399
|
+
|
|
400
|
+
/* --- Actions --- */
|
|
401
|
+
document.getElementById('btn-run').addEventListener('click', () => {
|
|
402
|
+
if (!state.base) { showError('No base commit resolved for this rebase.'); return; }
|
|
403
|
+
const kept = state.plan.filter((c) => c.action !== 'drop');
|
|
404
|
+
if (!kept.length) { showError('Dropping every commit would leave nothing to rebase.'); return; }
|
|
405
|
+
// Oldest kept commit is the last row here (newest-first list).
|
|
406
|
+
const oldestKept = kept[kept.length - 1];
|
|
407
|
+
if (oldestKept.action === 'squash' || oldestKept.action === 'fixup') {
|
|
408
|
+
showError('The oldest kept commit cannot be ' + oldestKept.action + ' — there is no earlier commit to fold it into.');
|
|
409
|
+
return;
|
|
410
|
+
}
|
|
411
|
+
const blank = kept.find((c) => c.action === 'reword' && !(c.message || '').trim());
|
|
412
|
+
if (blank) {
|
|
413
|
+
showError('Reword needs a new message for ' + blank.hash.slice(0, 7) + '.');
|
|
414
|
+
return;
|
|
415
|
+
}
|
|
416
|
+
clearError();
|
|
417
|
+
vscode.postMessage({
|
|
418
|
+
command: 'runRebase',
|
|
419
|
+
base: state.base,
|
|
420
|
+
entries: state.plan.map((c) => ({ hash: c.hash, action: c.action, subject: c.subject, message: c.message })),
|
|
421
|
+
});
|
|
422
|
+
});
|
|
423
|
+
|
|
424
|
+
document.getElementById('btn-reset').addEventListener('click', () => {
|
|
425
|
+
for (const c of state.plan) { c.action = 'pick'; c.message = undefined; }
|
|
426
|
+
vscode.postMessage({ command: 'requestPlan', base: state.base || undefined });
|
|
427
|
+
});
|
|
428
|
+
|
|
429
|
+
document.getElementById('btn-apply-count').addEventListener('click', () => {
|
|
430
|
+
const n = parseInt(el.count.value, 10);
|
|
431
|
+
if (!Number.isInteger(n) || n < 1) { showError('Enter how many recent commits to rebase.'); return; }
|
|
432
|
+
clearError();
|
|
433
|
+
vscode.postMessage({ command: 'requestPlan', count: n });
|
|
434
|
+
});
|
|
435
|
+
|
|
436
|
+
el.progress.addEventListener('click', (e) => {
|
|
437
|
+
const btn = e.target.closest('button[data-rb]');
|
|
438
|
+
if (btn) vscode.postMessage({ command: 'rebaseAction', action: btn.dataset.rb });
|
|
439
|
+
});
|
|
440
|
+
|
|
441
|
+
window.addEventListener('message', (event) => {
|
|
442
|
+
const msg = event.data || {};
|
|
443
|
+
switch (msg.command) {
|
|
444
|
+
case 'running':
|
|
445
|
+
clearError();
|
|
446
|
+
el.output.classList.add('hidden');
|
|
447
|
+
el.list.innerHTML = '<div class="empty"><span class="spinner"></span></div>';
|
|
448
|
+
el.btnRun.disabled = true;
|
|
449
|
+
break;
|
|
450
|
+
case 'loadState':
|
|
451
|
+
state.inProgress = msg.data.inProgress;
|
|
452
|
+
state.branch = msg.data.branch;
|
|
453
|
+
state.upstream = msg.data.upstream;
|
|
454
|
+
state.base = msg.data.base;
|
|
455
|
+
state.plan = msg.data.commits.map((c) => ({ ...c, action: 'pick' }));
|
|
456
|
+
el.branchLabel.textContent = state.branch || '(detached HEAD)';
|
|
457
|
+
el.baseLabel.textContent = state.base
|
|
458
|
+
? 'onto ' + state.base.slice(0, 7) + (state.upstream ? ' · upstream ' + state.upstream : '')
|
|
459
|
+
: '';
|
|
460
|
+
el.progress.classList.toggle('hidden', !state.inProgress);
|
|
461
|
+
if (state.inProgress) {
|
|
462
|
+
el.progressText.textContent = state.inProgress === 'rebase'
|
|
463
|
+
? 'Rebase in progress' + (msg.data.progress ? ' (' + msg.data.progress + ')' : '') + ' — resolve the conflicts, then Continue.'
|
|
464
|
+
: 'A ' + state.inProgress + ' is in progress — finish or abort it before rebasing.';
|
|
465
|
+
}
|
|
466
|
+
render();
|
|
467
|
+
break;
|
|
468
|
+
case 'rebaseResult':
|
|
469
|
+
el.output.classList.remove('hidden');
|
|
470
|
+
el.output.classList.toggle('ok', msg.data.ok);
|
|
471
|
+
el.output.classList.toggle('fail', !msg.data.ok);
|
|
472
|
+
el.output.textContent = msg.data.output || (msg.data.ok ? 'Rebase finished.' : 'Rebase failed.');
|
|
473
|
+
break;
|
|
474
|
+
case 'error':
|
|
475
|
+
showError(msg.message);
|
|
476
|
+
break;
|
|
477
|
+
}
|
|
478
|
+
});
|
|
479
|
+
|
|
480
|
+
vscode.postMessage({ command: 'ready' });
|
|
481
|
+
`,
|
|
482
|
+
});
|
|
483
|
+
}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { describe, it, expect } from "bun:test";
|
|
2
|
+
import {
|
|
3
|
+
REFLOG_FIELD_SEP, REFLOG_RECORD_SEP,
|
|
4
|
+
assertValidSelector, parseReflog, reflogKind,
|
|
5
|
+
} from "./reflog-parser.ts";
|
|
6
|
+
|
|
7
|
+
const A = "a".repeat(40);
|
|
8
|
+
const B = "b".repeat(40);
|
|
9
|
+
|
|
10
|
+
function record(fields: string[]): string {
|
|
11
|
+
return fields.join(REFLOG_FIELD_SEP) + REFLOG_RECORD_SEP;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
const STDOUT =
|
|
15
|
+
record([A, "HEAD@{0}", "commit: add the thing", "Ada", "ada@example.com", "1700000000", "add the thing"]) +
|
|
16
|
+
"\n" +
|
|
17
|
+
record([B, "HEAD@{1}", "rebase (finish): returning to refs/heads/main", "Ada", "ada@example.com", "1699999000", "earlier work"]);
|
|
18
|
+
|
|
19
|
+
describe("parseReflog", () => {
|
|
20
|
+
it("reads every field of an entry", () => {
|
|
21
|
+
const [first] = parseReflog(STDOUT);
|
|
22
|
+
|
|
23
|
+
expect(first).toEqual({
|
|
24
|
+
hash: A,
|
|
25
|
+
selector: "HEAD@{0}",
|
|
26
|
+
action: "commit: add the thing",
|
|
27
|
+
kind: "commit",
|
|
28
|
+
author: "Ada",
|
|
29
|
+
authorEmail: "ada@example.com",
|
|
30
|
+
authorDate: 1700000000,
|
|
31
|
+
subject: "add the thing",
|
|
32
|
+
});
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
it("does not let the newline between records leak into the next hash", () => {
|
|
36
|
+
// git separates records with the record byte, but the format string leaves a
|
|
37
|
+
// newline after each one; a hash that kept it would fail every later check.
|
|
38
|
+
expect(parseReflog(STDOUT)[1]!.hash).toBe(B);
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
it("takes the verb out of a parenthesised action", () => {
|
|
42
|
+
expect(parseReflog(STDOUT)[1]!.kind).toBe("rebase");
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
it("drops a record whose framing was lost rather than half-reading it", () => {
|
|
46
|
+
// A truncated record would otherwise yield a selector pointing somewhere
|
|
47
|
+
// else — and the selector is what a recovery command is handed.
|
|
48
|
+
const damaged = "not-a-hash" + REFLOG_FIELD_SEP + "HEAD@{9}" + REFLOG_RECORD_SEP + STDOUT;
|
|
49
|
+
|
|
50
|
+
expect(parseReflog(damaged).map((e) => e.hash)).toEqual([A, B]);
|
|
51
|
+
});
|
|
52
|
+
|
|
53
|
+
it("returns nothing for empty output", () => {
|
|
54
|
+
expect(parseReflog("")).toEqual([]);
|
|
55
|
+
expect(parseReflog("\n")).toEqual([]);
|
|
56
|
+
});
|
|
57
|
+
});
|
|
58
|
+
|
|
59
|
+
describe("reflogKind", () => {
|
|
60
|
+
it("reads the verb before the colon", () => {
|
|
61
|
+
expect(reflogKind("commit: add the thing")).toBe("commit");
|
|
62
|
+
expect(reflogKind("reset: moving to HEAD~2")).toBe("reset");
|
|
63
|
+
expect(reflogKind("checkout: moving from main to develop")).toBe("checkout");
|
|
64
|
+
});
|
|
65
|
+
|
|
66
|
+
it("reads the verb before a parenthesis", () => {
|
|
67
|
+
expect(reflogKind("rebase (finish): returning to refs/heads/main")).toBe("rebase");
|
|
68
|
+
expect(reflogKind("commit (amend): fix typo")).toBe("commit");
|
|
69
|
+
});
|
|
70
|
+
|
|
71
|
+
it("is empty for an empty action", () => {
|
|
72
|
+
expect(reflogKind("")).toBe("");
|
|
73
|
+
});
|
|
74
|
+
});
|
|
75
|
+
|
|
76
|
+
describe("assertValidSelector", () => {
|
|
77
|
+
it("accepts the shapes git emits", () => {
|
|
78
|
+
expect(assertValidSelector("HEAD@{0}")).toBe("HEAD@{0}");
|
|
79
|
+
expect(assertValidSelector("HEAD@{123}")).toBe("HEAD@{123}");
|
|
80
|
+
expect(assertValidSelector("refs/heads/main@{3}")).toBe("refs/heads/main@{3}");
|
|
81
|
+
expect(assertValidSelector(A)).toBe(A);
|
|
82
|
+
});
|
|
83
|
+
|
|
84
|
+
it("refuses anything that could be read as an option or a range", () => {
|
|
85
|
+
expect(() => assertValidSelector("--exec=rm -rf /")).toThrow(/Invalid reflog selector/);
|
|
86
|
+
expect(() => assertValidSelector("HEAD@{0}..HEAD@{2}")).toThrow(/Invalid reflog selector/);
|
|
87
|
+
expect(() => assertValidSelector("a..b@{1}")).toThrow(/Invalid reflog selector/);
|
|
88
|
+
expect(() => assertValidSelector("HEAD@{0}; rm -rf /")).toThrow(/Invalid reflog selector/);
|
|
89
|
+
expect(() => assertValidSelector("HEAD")).toThrow(/Invalid reflog selector/);
|
|
90
|
+
expect(() => assertValidSelector("")).toThrow(/Invalid reflog selector/);
|
|
91
|
+
expect(() => assertValidSelector(undefined)).toThrow(/Invalid reflog selector/);
|
|
92
|
+
});
|
|
93
|
+
});
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Parsing for `git reflog`, the record of everywhere HEAD has been.
|
|
3
|
+
*
|
|
4
|
+
* The reflog is what makes a bad rebase, a lost branch or a hard reset
|
|
5
|
+
* recoverable: the commits are still there, and this is the only listing that
|
|
6
|
+
* names them. So the parse has to be lossless about the *selector*
|
|
7
|
+
* (`HEAD@{7}`) — that is what a recovery command is given.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
/** Fields, in the order `REFLOG_FORMAT` requests them. */
|
|
11
|
+
export const REFLOG_FIELD_SEP = "\x1f";
|
|
12
|
+
export const REFLOG_RECORD_SEP = "\x1e";
|
|
13
|
+
export const REFLOG_FORMAT =
|
|
14
|
+
`--format=%H${REFLOG_FIELD_SEP}%gD${REFLOG_FIELD_SEP}%gs${REFLOG_FIELD_SEP}%an${REFLOG_FIELD_SEP}%ae${REFLOG_FIELD_SEP}%at${REFLOG_FIELD_SEP}%s${REFLOG_RECORD_SEP}`;
|
|
15
|
+
|
|
16
|
+
export interface ReflogEntry {
|
|
17
|
+
hash: string;
|
|
18
|
+
/** The selector git accepts back, e.g. `HEAD@{3}`. */
|
|
19
|
+
selector: string;
|
|
20
|
+
/** What moved HEAD: "commit: …", "rebase (finish)", "reset: moving to …". */
|
|
21
|
+
action: string;
|
|
22
|
+
/** The leading verb of `action`, for grouping and colour. */
|
|
23
|
+
kind: string;
|
|
24
|
+
author: string;
|
|
25
|
+
authorEmail: string;
|
|
26
|
+
/** Unix seconds. */
|
|
27
|
+
authorDate: number;
|
|
28
|
+
/** The commit's own subject, which the action text often does not repeat. */
|
|
29
|
+
subject: string;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* The verb git puts before the colon. `rebase (finish): returning to …` has no
|
|
34
|
+
* colon-delimited single word, so the parenthesised form is handled too.
|
|
35
|
+
*/
|
|
36
|
+
export function reflogKind(action: string): string {
|
|
37
|
+
const head = action.split(":")[0] ?? "";
|
|
38
|
+
const word = head.trim().split(/[\s(]/)[0] ?? "";
|
|
39
|
+
return word.toLowerCase();
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export function parseReflog(stdout: string): ReflogEntry[] {
|
|
43
|
+
const entries: ReflogEntry[] = [];
|
|
44
|
+
|
|
45
|
+
for (const record of stdout.split(REFLOG_RECORD_SEP)) {
|
|
46
|
+
const trimmed = record.replace(/^\n+/, "");
|
|
47
|
+
if (!trimmed.trim()) continue;
|
|
48
|
+
|
|
49
|
+
const fields = trimmed.split(REFLOG_FIELD_SEP);
|
|
50
|
+
const hash = fields[0] ?? "";
|
|
51
|
+
// A record that lost its framing is dropped rather than half-read: a wrong
|
|
52
|
+
// selector here would point a recovery command at the wrong commit.
|
|
53
|
+
if (!/^[0-9a-f]{7,40}$/i.test(hash)) continue;
|
|
54
|
+
|
|
55
|
+
const action = fields[2] ?? "";
|
|
56
|
+
entries.push({
|
|
57
|
+
hash,
|
|
58
|
+
selector: fields[1] ?? "",
|
|
59
|
+
action,
|
|
60
|
+
kind: reflogKind(action),
|
|
61
|
+
author: fields[3] ?? "",
|
|
62
|
+
authorEmail: fields[4] ?? "",
|
|
63
|
+
authorDate: Number(fields[5]) || 0,
|
|
64
|
+
subject: fields[6] ?? "",
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
return entries;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* The selectors git will accept back. Anything else is refused rather than
|
|
73
|
+
* passed to git, since these arrive from the webview.
|
|
74
|
+
*
|
|
75
|
+
* `HEAD@{12}` and `refs/heads/main@{3}` are the shapes `git reflog` emits for
|
|
76
|
+
* `%gD`; a bare sha is accepted too, because the panel's actions target the
|
|
77
|
+
* commit either way.
|
|
78
|
+
*/
|
|
79
|
+
export function assertValidSelector(value: unknown): string {
|
|
80
|
+
const selector = String(value ?? "");
|
|
81
|
+
if (/^[0-9a-f]{7,40}$/i.test(selector)) return selector;
|
|
82
|
+
if (/^[A-Za-z0-9._\/-]{1,255}@\{\d{1,9}\}$/.test(selector) && !selector.includes("..")) {
|
|
83
|
+
return selector;
|
|
84
|
+
}
|
|
85
|
+
throw new Error(`Invalid reflog selector: "${selector}"`);
|
|
86
|
+
}
|