@mcpc-tech/unplugin-dev-inspector-mcp 0.1.25 → 0.1.26
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/client/dist/PromptParamsDialog-CtCaLYaq.js +5218 -0
- package/client/dist/{_basePickBy-VajNci9y.js → _basePickBy-CO2jbuKs.js} +1 -1
- package/client/dist/{_baseUniq-CDC7r2eu.js → _baseUniq-DrKsbT7-.js} +1 -1
- package/client/dist/angular-html-B_cenFSN.js +1 -0
- package/client/dist/{angular-html-CYi310U8.js → angular-html-Cth2LqBf.js} +1 -1
- package/client/dist/{angular-ts-CqnqKzvX.js → angular-ts-D6GgngEL.js} +1 -1
- package/client/dist/{apl-DkPJsNcI.js → apl-8Q3duBRO.js} +1 -1
- package/client/dist/{arc-DQdfxxUS.js → arc-1IuUEc3l.js} +1 -1
- package/client/dist/architecture-U656AL7Q-BbnkeEk-.js +1 -0
- package/client/dist/{architectureDiagram-VXUJARFQ-CMr0m5it.js → architectureDiagram-VXUJARFQ-mTEFN4g1.js} +1 -1
- package/client/dist/{astro-BCO6O3oM.js → astro-CEzd2gSX.js} +1 -1
- package/client/dist/{blade-BGI2i8dn.js → blade-BiESHVEE.js} +1 -1
- package/client/dist/{blockDiagram-VD42YOAC-DB4rjLow.js → blockDiagram-VD42YOAC-DuZyDGXz.js} +1 -1
- package/client/dist/{bsl-fQRX_jWV.js → bsl-CgIWHY2F.js} +1 -1
- package/client/dist/c-C71qyMdz.js +1 -0
- package/client/dist/{c4Diagram-YG6GDRKO-C-OvxJNF.js → c4Diagram-YG6GDRKO-GpSiJ-09.js} +1 -1
- package/client/dist/{cairo-3ac5zVq8.js → cairo-DeB79q5_.js} +1 -1
- package/client/dist/channel-DU5N8yz4.js +1 -0
- package/client/dist/{chunk-4BX2VUAB-Di4LZGaH.js → chunk-4BX2VUAB-CnDqYS75.js} +1 -1
- package/client/dist/{chunk-55IACEB6-C41LdCQI.js → chunk-55IACEB6-Cno6J5VV.js} +1 -1
- package/client/dist/{chunk-76Q3JFCE-Cx-JYVsg.js → chunk-76Q3JFCE-naB4GsSN.js} +1 -1
- package/client/dist/{chunk-ABZYJK2D-CjFwXoDd.js → chunk-ABZYJK2D-B-uQQBad.js} +2 -2
- package/client/dist/{chunk-ATLVNIR6-iDd5WiFs.js → chunk-ATLVNIR6-06VCvgCA.js} +1 -1
- package/client/dist/{chunk-B4BG7PRW-B1LszEWJ.js → chunk-B4BG7PRW-CaYT2kjb.js} +1 -1
- package/client/dist/{chunk-CVBHYZKI-CUI-n_Tq.js → chunk-CVBHYZKI-C8bYjiGm.js} +1 -1
- package/client/dist/{chunk-DI55MBZ5-LZJU-R6o.js → chunk-DI55MBZ5-4NKIyaAY.js} +1 -1
- package/client/dist/chunk-EXTU4WIE-hA6kjEor.js +1 -0
- package/client/dist/{chunk-FMBD7UC4-DfDwyPfJ.js → chunk-FMBD7UC4-z8oIKcMh.js} +1 -1
- package/client/dist/{chunk-FPAJGGOC-Br6MAcFg.js → chunk-FPAJGGOC-_ax7LrI6.js} +1 -1
- package/client/dist/{chunk-FWNWRKHM-BVtcM6yk.js → chunk-FWNWRKHM-DESdnxaO.js} +1 -1
- package/client/dist/{chunk-HN2XXSSU-BYdnnbel.js → chunk-HN2XXSSU-CwOdrF1j.js} +1 -1
- package/client/dist/{chunk-JA3XYJ7Z-B_pLt1VO.js → chunk-JA3XYJ7Z-B2ggvruF.js} +1 -1
- package/client/dist/{chunk-JZLCHNYA-4gstbahU.js → chunk-JZLCHNYA-CkNAdoyb.js} +1 -1
- package/client/dist/{chunk-LBM3YZW2-g1Vy7H47.js → chunk-LBM3YZW2-D1UaPZ0s.js} +1 -1
- package/client/dist/{chunk-LHMN2FUI-DwRziK7j.js → chunk-LHMN2FUI-DvMeDi1w.js} +1 -1
- package/client/dist/{chunk-MI3HLSF2-DYwJlrsV.js → chunk-MI3HLSF2-C6Pm8cQC.js} +1 -1
- package/client/dist/{chunk-N4CR4FBY-Cx9rvJkZ.js → chunk-N4CR4FBY-CESp_hlr.js} +1 -1
- package/client/dist/{chunk-O7ZBX7Z2-D79B2A-4.js → chunk-O7ZBX7Z2-CzEL6GEY.js} +1 -1
- package/client/dist/{chunk-QN33PNHL-DhA65vkt.js → chunk-QN33PNHL-O3aN_XUL.js} +1 -1
- package/client/dist/{chunk-QXUST7PY-Wnp3VURs.js → chunk-QXUST7PY-BHpud-vy.js} +1 -1
- package/client/dist/chunk-QZHKN3VN-Cor-573y.js +1 -0
- package/client/dist/{chunk-S3R3BYOJ-DoqDNp4C.js → chunk-S3R3BYOJ-CQpHdWQs.js} +1 -1
- package/client/dist/{chunk-S6J4BHB3-EUOFpaV8.js → chunk-S6J4BHB3-dkKq153Y.js} +1 -1
- package/client/dist/{chunk-T53DSG4Q-CO1WsO85.js → chunk-T53DSG4Q-m8YxcxT5.js} +1 -1
- package/client/dist/{chunk-TZMSLE5B-e9hcNU0P.js → chunk-TZMSLE5B-KitBzjA6.js} +1 -1
- package/client/dist/classDiagram-2ON5EDUG-CG9xuA-s.js +1 -0
- package/client/dist/classDiagram-v2-WZHVMYZB-BqQco41Z.js +1 -0
- package/client/dist/clone-DaCWoOD3.js +1 -0
- package/client/dist/{cobol-Bh5O3QYW.js → cobol-CtnoUhpi.js} +1 -1
- package/client/dist/{coffee-CibAxXBQ.js → coffee-D63VVNN6.js} +1 -1
- package/client/dist/{cose-bilkent-S5V4N54A-BN6AIcys.js → cose-bilkent-S5V4N54A-DAl-qmUx.js} +1 -1
- package/client/dist/{cpp-C1RL7g4a.js → cpp-BXPFxrHd.js} +1 -1
- package/client/dist/cpp-Cb8PUfPp.js +1 -0
- package/client/dist/{crystal-COtPWwkm.js → crystal-qpW1qy1j.js} +1 -1
- package/client/dist/css-D_BsqRYw.js +1 -0
- package/client/dist/{dagre-6UL2VRFP-RxjSyDlS.js → dagre-6UL2VRFP-BzQ9vB_e.js} +1 -1
- package/client/dist/{dagre-DWEIVqUm.js → dagre-DLEkL_Zs.js} +1 -1
- package/client/dist/{diagram-PSM6KHXK-SZBdSkvQ.js → diagram-PSM6KHXK-BxJGiGPe.js} +1 -1
- package/client/dist/{diagram-QEK2KX5R-CLGGdlpf.js → diagram-QEK2KX5R-DYp7ZFqv.js} +1 -1
- package/client/dist/{diagram-S2PKOQOG-BRCVMVaG.js → diagram-S2PKOQOG-DJkha_WW.js} +1 -1
- package/client/dist/{edge-gnkqOgnq.js → edge-CP_fR0O2.js} +1 -1
- package/client/dist/{elixir-DkJ5dmQi.js → elixir-DMAcWBTu.js} +1 -1
- package/client/dist/{elm-DbERawtE.js → elm-CbfCFGpu.js} +1 -1
- package/client/dist/{erDiagram-Q2GNP2WA-Crx5hK6P.js → erDiagram-Q2GNP2WA-6XtwsRni.js} +1 -1
- package/client/dist/{erb-Ba5ePOhy.js → erb-tgtMjjw7.js} +1 -1
- package/client/dist/{erlang-DvggRTyY.js → erlang-B0ruUFZX.js} +1 -1
- package/client/dist/{flowDiagram-NV44I4VS-Dgft2jlf.js → flowDiagram-NV44I4VS-CelHIHjn.js} +1 -1
- package/client/dist/{fortran-fixed-form-V47soKQs.js → fortran-fixed-form-axN74ijH.js} +1 -1
- package/client/dist/{fsharp-BGnN6XqY.js → fsharp-BbXO1JyA.js} +1 -1
- package/client/dist/{ganttDiagram-LVOFAZNH-CeMyq5ly.js → ganttDiagram-LVOFAZNH-Cvj1uEfB.js} +1 -1
- package/client/dist/{gdresource-CTqCmzm8.js → gdresource-Cloq6T1D.js} +1 -1
- package/client/dist/{git-commit-D--jujpE.js → git-commit-CPVxcpY7.js} +1 -1
- package/client/dist/{git-rebase-ew-n6N0S.js → git-rebase-D69XtsSv.js} +1 -1
- package/client/dist/gitGraph-F6HP7TQM-KAtjK5Ox.js +1 -0
- package/client/dist/{gitGraphDiagram-NY62KEGX-D_IQEgv3.js → gitGraphDiagram-NY62KEGX-Cr6_VXUM.js} +1 -1
- package/client/dist/{glimmer-js-CvHkyQW8.js → glimmer-js-CoeADt6M.js} +1 -1
- package/client/dist/{glimmer-ts-yUPvOhqX.js → glimmer-ts-BlmV-Y9-.js} +1 -1
- package/client/dist/glsl-BTo0Z16q.js +1 -0
- package/client/dist/{glsl-BFy28U-g.js → glsl-Biu0K-6p.js} +1 -1
- package/client/dist/{graphlib-DHCf1ZPq.js → graphlib-CScjOeSi.js} +1 -1
- package/client/dist/graphql-DN6CkYdl.js +1 -0
- package/client/dist/{graphql-CHCDiMKU.js → graphql-hAKdRMip.js} +1 -1
- package/client/dist/{hack-Dfku4leT.js → hack-D1duHfqL.js} +1 -1
- package/client/dist/{haml-Bt-cM6Kf.js → haml-CiZU0d5H.js} +1 -1
- package/client/dist/haml-DPWY5s1M.js +1 -0
- package/client/dist/{handlebars-D4Rqe7kb.js → handlebars-Dp_cDcAt.js} +1 -1
- package/client/dist/{html-BIgIDTTk.js → html-BT5um7nF.js} +1 -1
- package/client/dist/html-C31JlaJ-.js +1 -0
- package/client/dist/{html-derivative-Cr3u945w.js → html-derivative-Cx1PsJxD.js} +1 -1
- package/client/dist/html-derivative-wg2-hYIg.js +1 -0
- package/client/dist/{http-GGX7qjOU.js → http-BW75yjvO.js} +1 -1
- package/client/dist/{hurl-DK4p4h12.js → hurl-DrbkG80a.js} +1 -1
- package/client/dist/{hxml-ChVmPQtH.js → hxml-VlQN6FkD.js} +1 -1
- package/client/dist/info-NVLQJR56-DiZxlu_o.js +1 -0
- package/client/dist/infoDiagram-ER5ION4S-CtrGb0So.js +2 -0
- package/client/dist/inspector.css +212 -0
- package/client/dist/inspector.js +35 -5035
- package/client/dist/{isEmpty-CAzzI-9E.js → isEmpty-CokRQ2Nu.js} +1 -1
- package/client/dist/java-H4bqYiqZ.js +1 -0
- package/client/dist/javascript-DH63jrE3.js +1 -0
- package/client/dist/{jinja-BatEiZah.js → jinja-CHSC99qg.js} +1 -1
- package/client/dist/{jison-5s-QNhI1.js → jison-DqMkPOAC.js} +1 -1
- package/client/dist/{journeyDiagram-XKPGCS4Q-Dep3D8p0.js → journeyDiagram-XKPGCS4Q-CdZJjun-.js} +1 -1
- package/client/dist/json-DOslWoX1.js +1 -0
- package/client/dist/jsx-CjK28ufS.js +1 -0
- package/client/dist/{julia-hmN1VBxQ.js → julia-cA-yAml8.js} +1 -1
- package/client/dist/{kanban-definition-3W4ZIXB7-DaDrLIUQ.js → kanban-definition-3W4ZIXB7-B3nQllvM.js} +1 -1
- package/client/dist/katex-D7PU7xG4.js +1 -0
- package/client/dist/{latex-B2ZV4OQ3.js → latex-CbkKCm2d.js} +1 -1
- package/client/dist/{line-BUOKh-HE.js → line-D9fEXxLg.js} +1 -1
- package/client/dist/{linear-BMBwG6lD.js → linear-CFKbUwXk.js} +1 -1
- package/client/dist/{liquid-tVoFpvBO.js → liquid-BpMC_Fqt.js} +1 -1
- package/client/dist/{lua-C4zcr4Rq.js → lua-C77CXP4F.js} +1 -1
- package/client/dist/lua-CRueSYXF.js +1 -0
- package/client/dist/{marko-DsvPyZf5.js → marko-CrC0ANF-.js} +1 -1
- package/client/dist/{mdc-CzHGal8T.js → mdc-NdIm27xk.js} +1 -1
- package/client/dist/{mermaid-parser.core-ow7sqQkB.js → mermaid-parser.core-lVkskdol.js} +1 -1
- package/client/dist/{mermaid.core-DbNkaVXi.js → mermaid.core-DfenwpGd.js} +2 -2
- package/client/dist/{mindmap-definition-VGOIOE7T-DVRq1RYX.js → mindmap-definition-VGOIOE7T-E51zBHdA.js} +1 -1
- package/client/dist/{nginx-DellYz9Y.js → nginx-BQI27kLq.js} +1 -1
- package/client/dist/{nim-B-AWUKTE.js → nim-qigkNB2O.js} +1 -1
- package/client/dist/{ordinal-A1CyKHQ4.js → ordinal-NoUKjW5R.js} +1 -1
- package/client/dist/packet-BFZMPI3H-Co0kmFAY.js +1 -0
- package/client/dist/{perl-pXXQBt-A.js → perl-CWZ9Tx7Z.js} +1 -1
- package/client/dist/{php-DOGKACDF.js → php-C_izhi_N.js} +1 -1
- package/client/dist/pie-7BOR55EZ-27A0zi3z.js +1 -0
- package/client/dist/{pieDiagram-ADFJNKIX-5wOv-Sou.js → pieDiagram-ADFJNKIX-10ENr3pD.js} +1 -1
- package/client/dist/{pug-BEuydwIY.js → pug-DiALhKYN.js} +1 -1
- package/client/dist/{qml-6blpd43-.js → qml-C9j4g26c.js} +1 -1
- package/client/dist/{quadrantDiagram-AYHSOK5B-BHjR7ccN.js → quadrantDiagram-AYHSOK5B-lMjtU4jB.js} +1 -1
- package/client/dist/r-BIGEI86X.js +1 -0
- package/client/dist/radar-NHE76QYJ-BNuOm017.js +1 -0
- package/client/dist/{razor-DszTWfYs.js → razor-A0q1Asj9.js} +1 -1
- package/client/dist/regexp-oqAv1t88.js +1 -0
- package/client/dist/{requirementDiagram-UZGBJVZJ-DUqqAwgE.js → requirementDiagram-UZGBJVZJ-BANZB6Iz.js} +1 -1
- package/client/dist/{rst-DHsi4jEF.js → rst-Cev6-qlZ.js} +1 -1
- package/client/dist/{ruby-Br8kAlMV.js → ruby-CcAYYGRU.js} +1 -1
- package/client/dist/{sankeyDiagram-TZEHDZUN-CxJnP2LU.js → sankeyDiagram-TZEHDZUN-C6vl5I45.js} +1 -1
- package/client/dist/{sas-Fm1ez35-.js → sas-BGlfoPrs.js} +1 -1
- package/client/dist/{scss--EPB2qJk.js → scss-A6Xwb3sB.js} +1 -1
- package/client/dist/scss-CZuLwQ6L.js +1 -0
- package/client/dist/{sequenceDiagram-WL72ISMW-Bqy7huq2.js → sequenceDiagram-WL72ISMW-DnnKpwi7.js} +1 -1
- package/client/dist/{shaderlab-mRjR82Iw.js → shaderlab-CMErLCd1.js} +1 -1
- package/client/dist/shellscript-XfxS4mi1.js +1 -0
- package/client/dist/{shellsession-BwWJX0k2.js → shellsession-QiegSG75.js} +1 -1
- package/client/dist/sidebar.css +4736 -0
- package/client/dist/sidebar.js +1 -0
- package/client/dist/{soy-ZvAEekaL.js → soy-BoMAIRkx.js} +1 -1
- package/client/dist/{sparql-DUJ_UkED.js → sparql-DhHvB3Dp.js} +1 -1
- package/client/dist/sql-Dga86kBP.js +1 -0
- package/client/dist/{stata-B4dQ_ds2.js → stata-CIv2IgqT.js} +1 -1
- package/client/dist/{stateDiagram-FKZM4ZOC-BDuxTD97.js → stateDiagram-FKZM4ZOC-iYM8j2jN.js} +1 -1
- package/client/dist/stateDiagram-v2-4FDKWEC3-CzW1Ir10.js +1 -0
- package/client/dist/{svelte-DP3P9hTU.js → svelte-BPdTtTW_.js} +1 -1
- package/client/dist/{templ-DzU4X84Z.js → templ-Bu1xjVjb.js} +1 -1
- package/client/dist/{tex-DmK8sLqk.js → tex-BrGV_a00.js} +1 -1
- package/client/dist/{timeline-definition-IT6M3QCI-X2Zr6sAz.js → timeline-definition-IT6M3QCI-DVa8bOe8.js} +1 -1
- package/client/dist/treemap-KMMF4GRG-Cs32ogTY.js +1 -0
- package/client/dist/{ts-tags-DQicFPeT.js → ts-tags-C2KZ65Bb.js} +1 -1
- package/client/dist/tsx-Dy5oGylO.js +1 -0
- package/client/dist/{twig-DMpkralp.js → twig-CAdzRXFv.js} +1 -1
- package/client/dist/typescript-BCL2cVvE.js +1 -0
- package/client/dist/{vue-html-D8cmRA9A.js → vue-html-ClbUAPY3.js} +1 -1
- package/client/dist/{vue-CXnTHxsh.js → vue-m_9UuRcq.js} +1 -1
- package/client/dist/{vue-vine-DKxJMTV4.js → vue-vine-BhY0kO3x.js} +1 -1
- package/client/dist/{xml-DdBhobiL.js → xml-BCPOgRQ8.js} +1 -1
- package/client/dist/xml-LiQIKAk-.js +1 -0
- package/client/dist/{xsl-rnFMNj5T.js → xsl-CiacnBum.js} +1 -1
- package/client/dist/{xychartDiagram-PRI3JC2R-Bkdy-d61.js → xychartDiagram-PRI3JC2R-CSHRJA-w.js} +1 -1
- package/client/dist/yaml-x21mtn6r.js +1 -0
- package/dist/cli.cjs +135 -129
- package/dist/cli.js +135 -129
- package/dist/config-updater.cjs +84 -0
- package/dist/config-updater.js +84 -0
- package/dist/index.d.cts +4 -4
- package/dist/react/react.d.ts +203 -0
- package/dist/react/react.js +1177 -0
- package/package.json +9 -2
- package/client/dist/angular-html-d0m67Y5J.js +0 -1
- package/client/dist/architecture-U656AL7Q-MgtP82yP.js +0 -1
- package/client/dist/c-3wGWaCKl.js +0 -1
- package/client/dist/channel-Dq37Efc1.js +0 -1
- package/client/dist/chunk-EXTU4WIE-ChqGChCy.js +0 -1
- package/client/dist/chunk-QZHKN3VN-DdT5lUD2.js +0 -1
- package/client/dist/classDiagram-2ON5EDUG-C7nmW2OD.js +0 -1
- package/client/dist/classDiagram-v2-WZHVMYZB-D1OZs5dX.js +0 -1
- package/client/dist/clone-CmMu9STX.js +0 -1
- package/client/dist/cpp-BnxWAOSJ.js +0 -1
- package/client/dist/css-D_nzbeA8.js +0 -1
- package/client/dist/gitGraph-F6HP7TQM-DYc7wArC.js +0 -1
- package/client/dist/glsl-CGxWHcVc.js +0 -1
- package/client/dist/graphql-565U4wbG.js +0 -1
- package/client/dist/haml-BHYOha9I.js +0 -1
- package/client/dist/html-CYUobRUD.js +0 -1
- package/client/dist/html-derivative-DgGbkyuK.js +0 -1
- package/client/dist/info-NVLQJR56-Bvqp73xD.js +0 -1
- package/client/dist/infoDiagram-ER5ION4S-BDBCikE4.js +0 -2
- package/client/dist/java-DmkKjtyZ.js +0 -1
- package/client/dist/javascript-CkCLGt8x.js +0 -1
- package/client/dist/json-C3HKuiPJ.js +0 -1
- package/client/dist/jsx-Cb_Ywdgo.js +0 -1
- package/client/dist/katex-BQxtjXbf.js +0 -1
- package/client/dist/lua-BL1jjzZD.js +0 -1
- package/client/dist/packet-BFZMPI3H-BGenTAod.js +0 -1
- package/client/dist/pie-7BOR55EZ-Clb9mYfc.js +0 -1
- package/client/dist/r-FsqRuzNL.js +0 -1
- package/client/dist/radar-NHE76QYJ-DKi0Armo.js +0 -1
- package/client/dist/regexp-BTE6Swxv.js +0 -1
- package/client/dist/scss-Cmb4RaIv.js +0 -1
- package/client/dist/shellscript-DuJfYg8R.js +0 -1
- package/client/dist/sql-D5NpKK-X.js +0 -1
- package/client/dist/stateDiagram-v2-4FDKWEC3-BxmkJjbP.js +0 -1
- package/client/dist/treemap-KMMF4GRG-BJ7jSaqo.js +0 -1
- package/client/dist/tsx-QMnwGbeN.js +0 -1
- package/client/dist/typescript-JBzxF6Qj.js +0 -1
- package/client/dist/xml-BzQ8r2Jc.js +0 -1
- package/client/dist/yaml-DF6vsW46.js +0 -1
- /package/client/dist/{abap-BdPhiG-3.js → abap-BUoW4mq0.js} +0 -0
- /package/client/dist/{actionscript-3-4lsAJric.js → actionscript-3-CDsNmykd.js} +0 -0
- /package/client/dist/{ada-DcGdSDNe.js → ada-EgRVL2g9.js} +0 -0
- /package/client/dist/{andromeeda-D4fdrr4S.js → andromeeda-GPgN43QN.js} +0 -0
- /package/client/dist/{apache-BfNtzv3H.js → apache-C_ty8NzZ.js} +0 -0
- /package/client/dist/{apex-COUYbqxw.js → apex-BO_xUY2-.js} +0 -0
- /package/client/dist/{applescript-DZy9r0Tx.js → applescript-DQAS9zcd.js} +0 -0
- /package/client/dist/{ara-BuNu-Hkp.js → ara-DIjuS0gF.js} +0 -0
- /package/client/dist/{array-Dz4ZVbz2.js → array-BgcdGrkc.js} +0 -0
- /package/client/dist/{asciidoc-CRgFazCG.js → asciidoc-BxG7ZQrc.js} +0 -0
- /package/client/dist/{asm-DMOLEIzq.js → asm-PnON5mRP.js} +0 -0
- /package/client/dist/{aurora-x-CMrxRU0F.js → aurora-x-CqQ7QmKq.js} +0 -0
- /package/client/dist/{awk-CsRJBxn5.js → awk-BVO8fiUv.js} +0 -0
- /package/client/dist/{ayu-dark-y6Bf9zzc.js → ayu-dark-n_FrPZjA.js} +0 -0
- /package/client/dist/{ballerina-DaMt4nBf.js → ballerina-BJsKgOB8.js} +0 -0
- /package/client/dist/{bat-DFR5wrFi.js → bat-DRIwbK7_.js} +0 -0
- /package/client/dist/{beancount-BrwuSNB3.js → beancount-BTo4XwaG.js} +0 -0
- /package/client/dist/{berry-DRXw-ZNq.js → berry-B5o92twl.js} +0 -0
- /package/client/dist/{bibtex-CQd7fyYH.js → bibtex-DuLtVC8l.js} +0 -0
- /package/client/dist/{bicep-B14cKy0e.js → bicep-BfIj04_h.js} +0 -0
- /package/client/dist/{c-Cu5Jn1Jp.js → c-BL138DB5.js} +0 -0
- /package/client/dist/{cadence-B7jHVQ8u.js → cadence-CnLw1Pon.js} +0 -0
- /package/client/dist/{catppuccin-frappe-BMyWp_6O.js → catppuccin-frappe-D7hlMtXo.js} +0 -0
- /package/client/dist/{catppuccin-latte-nZzsPBPu.js → catppuccin-latte-D2-cwLAh.js} +0 -0
- /package/client/dist/{catppuccin-macchiato-BzBCE9F0.js → catppuccin-macchiato-Dt-n4vTY.js} +0 -0
- /package/client/dist/{catppuccin-mocha-DbBzL313.js → catppuccin-mocha-pJ9gr9o9.js} +0 -0
- /package/client/dist/{chunk-6MN3ZHY7-Bw7GUOel.js → chunk-6MN3ZHY7-B86W-RmZ.js} +0 -0
- /package/client/dist/{clarity-BaaRo_dO.js → clarity-B1loWXVz.js} +0 -0
- /package/client/dist/{clojure-Cryf_rtB.js → clojure-BuPCnGPH.js} +0 -0
- /package/client/dist/{cmake-Drlfezq0.js → cmake-fD9kB-N_.js} +0 -0
- /package/client/dist/{codeowners-Bhm5vPJA.js → codeowners-C_VH6Ljx.js} +0 -0
- /package/client/dist/{codeql-eIV9UcRt.js → codeql-DhWjL8Kq.js} +0 -0
- /package/client/dist/{common-lisp-Dends_YH.js → common-lisp-CruE29WJ.js} +0 -0
- /package/client/dist/{coq-KkkUzLyU.js → coq-Bx_cXDWL.js} +0 -0
- /package/client/dist/{csharp-CPdyP2VR.js → csharp-BGiDklkX.js} +0 -0
- /package/client/dist/{css-B5e7W8LB.js → css-D3eCZIjt.js} +0 -0
- /package/client/dist/{csv-DYwX6NEn.js → csv-TlCvaDUb.js} +0 -0
- /package/client/dist/{cue-DW0ynfCq.js → cue-CMZTYgU5.js} +0 -0
- /package/client/dist/{cypher-Bmq5NZ59.js → cypher-BMGc7dGe.js} +0 -0
- /package/client/dist/{cytoscape.esm-5hlfDxlN.js → cytoscape.esm-COkX_sb7.js} +0 -0
- /package/client/dist/{d-BTh8oGLC.js → d-CZehDVN6.js} +0 -0
- /package/client/dist/{dark-plus-DzCrhcx4.js → dark-plus-CGcVEdxm.js} +0 -0
- /package/client/dist/{dart-B45K8wV9.js → dart-BfQboB_J.js} +0 -0
- /package/client/dist/{dax-BdHYj1Ue.js → dax-Bba5a30x.js} +0 -0
- /package/client/dist/{defaultLocale-wBfqlpfB.js → defaultLocale-S7fGF81p.js} +0 -0
- /package/client/dist/{desktop-BMuYANPV.js → desktop-DyR7Z7D7.js} +0 -0
- /package/client/dist/{diff-BxwcTI8k.js → diff-CWN81QQV.js} +0 -0
- /package/client/dist/{dist-DDGIHxz4.js → dist-Bz_xenUc.js} +0 -0
- /package/client/dist/{docker-CSoMkU3O.js → docker-Dv8_2ppU.js} +0 -0
- /package/client/dist/{dotenv-i_QlcFUp.js → dotenv-DCISGmUs.js} +0 -0
- /package/client/dist/{dracula-BTpR5_Te.js → dracula-D76yIU1-.js} +0 -0
- /package/client/dist/{dracula-soft-D_6f0jsH.js → dracula-soft-txtzq0a7.js} +0 -0
- /package/client/dist/{dream-maker-DtVNo9em.js → dream-maker-DA4WbaAF.js} +0 -0
- /package/client/dist/{emacs-lisp-BnCZgkUr.js → emacs-lisp-tzsjo5DB.js} +0 -0
- /package/client/dist/{everforest-dark-BB8iY9dl.js → everforest-dark-CJDH8s0z.js} +0 -0
- /package/client/dist/{everforest-light-BG7kqcrd.js → everforest-light-C6xhm1QL.js} +0 -0
- /package/client/dist/{fennel-B3HXE7FJ.js → fennel-DA_rS4S7.js} +0 -0
- /package/client/dist/{fish-ogOvUHoU.js → fish-BrLZQvoa.js} +0 -0
- /package/client/dist/{fluent-B4l8qlbd.js → fluent-DntAoeEC.js} +0 -0
- /package/client/dist/{fortran-free-form-BA0vVvYt.js → fortran-free-form-c4So7WT8.js} +0 -0
- /package/client/dist/{gdscript-BA3jq6mQ.js → gdscript-Djzzged5.js} +0 -0
- /package/client/dist/{gdshader-dB9N4Ao3.js → gdshader-CJeNXdA2.js} +0 -0
- /package/client/dist/{genie-CZngrDjU.js → genie-C9fU7PiA.js} +0 -0
- /package/client/dist/{gherkin-BzRYJufi.js → gherkin-DDlBNjNG.js} +0 -0
- /package/client/dist/{github-dark-CRKj4hAt.js → github-dark-Ckt6nlQx.js} +0 -0
- /package/client/dist/{github-dark-default-DIQY-h5g.js → github-dark-default-DfCBMOYz.js} +0 -0
- /package/client/dist/{github-dark-dimmed-BEpLsuRj.js → github-dark-dimmed-BKiErX1j.js} +0 -0
- /package/client/dist/{github-dark-high-contrast-CVTJFdKj.js → github-dark-high-contrast-DVxoJyHI.js} +0 -0
- /package/client/dist/{github-light-CpZwDIg7.js → github-light-BZC_cQ4W.js} +0 -0
- /package/client/dist/{github-light-default-DHtzD_-y.js → github-light-default-BY0m_WyP.js} +0 -0
- /package/client/dist/{github-light-high-contrast-CaLb5Zh9.js → github-light-high-contrast-DcWq4z9I.js} +0 -0
- /package/client/dist/{gleam-C6DPFaBN.js → gleam-cWmrDEMg.js} +0 -0
- /package/client/dist/{gnuplot-CdwpsLMX.js → gnuplot-BHRhuGLx.js} +0 -0
- /package/client/dist/{go-BEgA9rS0.js → go-BaSASZlM.js} +0 -0
- /package/client/dist/{groovy-DKhzsnBi.js → groovy-BjidEaDx.js} +0 -0
- /package/client/dist/{gruvbox-dark-hard-B34oe0Ej.js → gruvbox-dark-hard-gIGwkeSY.js} +0 -0
- /package/client/dist/{gruvbox-dark-medium-D5sKuUU6.js → gruvbox-dark-medium-V93T0amg.js} +0 -0
- /package/client/dist/{gruvbox-dark-soft-FrQ3F5LW.js → gruvbox-dark-soft-DWvGTPhe.js} +0 -0
- /package/client/dist/{gruvbox-light-hard-DtpNIMu0.js → gruvbox-light-hard-CDR7jAaS.js} +0 -0
- /package/client/dist/{gruvbox-light-medium-DXqc1yk8.js → gruvbox-light-medium-BH05YZpj.js} +0 -0
- /package/client/dist/{gruvbox-light-soft-CBWPsdg8.js → gruvbox-light-soft-_FpHi3hq.js} +0 -0
- /package/client/dist/{haskell-COHrgR9O.js → haskell-D6diK_o1.js} +0 -0
- /package/client/dist/{haxe-Bl1c-ZNb.js → haxe-B5pmXmLa.js} +0 -0
- /package/client/dist/{hcl-awf4jn86.js → hcl-BPPiC6Ub.js} +0 -0
- /package/client/dist/{hjson-DfFUNltF.js → hjson-BYqpFKnP.js} +0 -0
- /package/client/dist/{hlsl-CtcTTmYG.js → hlsl-BjNae5So.js} +0 -0
- /package/client/dist/{houston-CNv85-6f.js → houston-CTP0HFka.js} +0 -0
- /package/client/dist/{hy-CshaiMZE.js → hy-DkwVZxUW.js} +0 -0
- /package/client/dist/{imba-C2bpAlb9.js → imba-pxRlZERz.js} +0 -0
- /package/client/dist/{ini-BMqmGKBw.js → ini-B_rjZOXj.js} +0 -0
- /package/client/dist/{init-CyS92-Wc.js → init-BnPQj6aR.js} +0 -0
- /package/client/dist/{isArrayLikeObject-BtcNYc4X.js → isArrayLikeObject-CgiDz5DP.js} +0 -0
- /package/client/dist/{java-CvxUKxx6.js → java-DeUXjYQU.js} +0 -0
- /package/client/dist/{javascript-BIsIt0kc.js → javascript-DpvUI8vq.js} +0 -0
- /package/client/dist/{json-h7zTKPSW.js → json-cDpc1bY6.js} +0 -0
- /package/client/dist/{json5-CDsqIwN6.js → json5-D1op8XDc.js} +0 -0
- /package/client/dist/{jsonc-C_H6KdCM.js → jsonc-TsBL8Zw4.js} +0 -0
- /package/client/dist/{jsonl-CYEL_JbB.js → jsonl-VehePL7r.js} +0 -0
- /package/client/dist/{jsonnet-DvezpFew.js → jsonnet-gOuuHn0J.js} +0 -0
- /package/client/dist/{jssm-DGCQVTMl.js → jssm-Ccle0HAR.js} +0 -0
- /package/client/dist/{jsx-B3fSgSFr.js → jsx-aZzZib73.js} +0 -0
- /package/client/dist/{kanagawa-dragon-C9NBfuIt.js → kanagawa-dragon-CSKAbSka.js} +0 -0
- /package/client/dist/{kanagawa-lotus-B_6UdT6p.js → kanagawa-lotus-DN7DspOm.js} +0 -0
- /package/client/dist/{kanagawa-wave-C2OIICwW.js → kanagawa-wave-Dberk7yB.js} +0 -0
- /package/client/dist/{katex-BnRKOLw6.js → katex-C3zESuch.js} +0 -0
- /package/client/dist/{katex.min-DRkgVcya.css → katex.min-DkVKOBvG.css} +0 -0
- /package/client/dist/{katex.min-DidvNX82.js → katex.min-RTO9ag3H.js} +0 -0
- /package/client/dist/{kdl-BkuYp80m.js → kdl-ghIqIEqx.js} +0 -0
- /package/client/dist/{kotlin-D1eKjLwq.js → kotlin-CGg4-W_M.js} +0 -0
- /package/client/dist/{kusto-CvOu21Cj.js → kusto-DCV3owQ6.js} +0 -0
- /package/client/dist/{laserwave-DQxwrmJt.js → laserwave-DHr_OdQx.js} +0 -0
- /package/client/dist/{lean-IA1_MsWd.js → lean-981kZEaB.js} +0 -0
- /package/client/dist/{less-B7zZlgJh.js → less-BsrVljrL.js} +0 -0
- /package/client/dist/{light-plus-Cy89fA56.js → light-plus-Bc9BLT5A.js} +0 -0
- /package/client/dist/{llvm-CAuHI5e8.js → llvm-DyE_X-oq.js} +0 -0
- /package/client/dist/{log-tguHOLzV.js → log-CJNm4UbC.js} +0 -0
- /package/client/dist/{logo-4FQxpkt4.js → logo-DKbdyqt-.js} +0 -0
- /package/client/dist/{luau-sRWHo1Up.js → luau-MmBwuyT2.js} +0 -0
- /package/client/dist/{make-DkNT42IA.js → make-D1C6Tiwy.js} +0 -0
- /package/client/dist/{markdown-CzS3ZP7I.js → markdown-DBA3Mmim.js} +0 -0
- /package/client/dist/{marked.esm-CTdAAA_v.js → marked.esm-DUB0uiru.js} +0 -0
- /package/client/dist/{material-theme-BfWYt0TZ.js → material-theme-Bv8yLSP0.js} +0 -0
- /package/client/dist/{material-theme-darker-DtkmIcAA.js → material-theme-darker-1AqpNdZt.js} +0 -0
- /package/client/dist/{material-theme-lighter-BH0j90Oh.js → material-theme-lighter-DPdC5l8C.js} +0 -0
- /package/client/dist/{material-theme-ocean-DmKabesL.js → material-theme-ocean-37Kook8Q.js} +0 -0
- /package/client/dist/{material-theme-palenight-DZ7uHLju.js → material-theme-palenight-C27iD4SF.js} +0 -0
- /package/client/dist/{math-CBcHHeVd.js → math-XICenNyA.js} +0 -0
- /package/client/dist/{matlab-CpkpzR_d.js → matlab-Ck3HEU2k.js} +0 -0
- /package/client/dist/{mdx-CKC34rlC.js → mdx-C1PRejio.js} +0 -0
- /package/client/dist/{mermaid-Ct_09yAh.js → mermaid-BckVcVXX.js} +0 -0
- /package/client/dist/{min-dark-iCM7syk7.js → min-dark-anAUOToK.js} +0 -0
- /package/client/dist/{min-light-C8rThYym.js → min-light-CvG_iQWP.js} +0 -0
- /package/client/dist/{mipsasm-Cty6G9T2.js → mipsasm-BM_FQj2A.js} +0 -0
- /package/client/dist/{mojo-Xauqc8AX.js → mojo-BR-LqNeT.js} +0 -0
- /package/client/dist/{monokai-Bjch1Bhl.js → monokai-DYv3rk-A.js} +0 -0
- /package/client/dist/{move-CXMREC6M.js → move-m3_5UNfo.js} +0 -0
- /package/client/dist/{narrat-BaBjazI9.js → narrat-DYFj8Q6-.js} +0 -0
- /package/client/dist/{nextflow-_c6uqgsv.js → nextflow-ZIzFDe2m.js} +0 -0
- /package/client/dist/{night-owl-BJrjdpga.js → night-owl-DkBbLKGE.js} +0 -0
- /package/client/dist/{nix-DrpzwZYz.js → nix-17F0HB0G.js} +0 -0
- /package/client/dist/{nord-D0Fqg42Q.js → nord-Be97_T58.js} +0 -0
- /package/client/dist/{nushell-PwLzyrh4.js → nushell-njEJEBNK.js} +0 -0
- /package/client/dist/{objective-c-B316WMPD.js → objective-c-DcpJ0eV7.js} +0 -0
- /package/client/dist/{objective-cpp-sh3AkVQi.js → objective-cpp-CXgpfRIb.js} +0 -0
- /package/client/dist/{ocaml-CT2O122u.js → ocaml-RYuU9VTm.js} +0 -0
- /package/client/dist/{one-dark-pro-CWCqr3AC.js → one-dark-pro-Ci-bUEIf.js} +0 -0
- /package/client/dist/{one-light-DTgkXOoh.js → one-light-BtoBaJgF.js} +0 -0
- /package/client/dist/{pascal-BfdV161T.js → pascal-HLRSlJ2v.js} +0 -0
- /package/client/dist/{path-Dqo4FhGl.js → path-CoY9QgOk.js} +0 -0
- /package/client/dist/{pkl-CIdtaeNd.js → pkl-D0LsOQD5.js} +0 -0
- /package/client/dist/{plastic-CLpeNc9-.js → plastic-BHBVdpN4.js} +0 -0
- /package/client/dist/{plsql-BuKM571s.js → plsql-Ckotkn8G.js} +0 -0
- /package/client/dist/{po-Dxsk_XzY.js → po-Qix2N2fA.js} +0 -0
- /package/client/dist/{poimandres-CoZ0vKOg.js → poimandres-DCZ4zCH5.js} +0 -0
- /package/client/dist/{polar-DTkh7YGI.js → polar-DHAM8Rqb.js} +0 -0
- /package/client/dist/{postcss-BoVDzDIq.js → postcss-8wrDfWlb.js} +0 -0
- /package/client/dist/{powerquery-C7UUl55u.js → powerquery-sXjCytsm.js} +0 -0
- /package/client/dist/{powershell-7fisTB1Z.js → powershell-Br9y9LlC.js} +0 -0
- /package/client/dist/{prisma-CKBKGf6P.js → prisma-COBUUaqE.js} +0 -0
- /package/client/dist/{prolog-DEUEVLMg.js → prolog-BbJTvtA-.js} +0 -0
- /package/client/dist/{proto-BI7m_T-K.js → proto-Dn7PeVbf.js} +0 -0
- /package/client/dist/{puppet-1QKvlfLG.js → puppet-CNdK406T.js} +0 -0
- /package/client/dist/{purescript-BeTyiTEN.js → purescript-Cgw06S43.js} +0 -0
- /package/client/dist/{python-BY6XMItz.js → python-DioJsT9z.js} +0 -0
- /package/client/dist/{qmldir-BJRdxGUb.js → qmldir-tOWyMniz.js} +0 -0
- /package/client/dist/{qss-CgpUCiqI.js → qss-CQ_tB_vx.js} +0 -0
- /package/client/dist/{r-DO0FNojz.js → r-omh8Ou_K.js} +0 -0
- /package/client/dist/{racket-DOfMsQ-m.js → racket-xM_JlWdJ.js} +0 -0
- /package/client/dist/{raku-BpVGnEOk.js → raku-CsjbV0q-.js} +0 -0
- /package/client/dist/{red-Dtjys_cC.js → red-B8qD19HM.js} +0 -0
- /package/client/dist/{reg-BFwQ42iU.js → reg-CDO-JwKW.js} +0 -0
- /package/client/dist/{regexp-71-eZjwK.js → regexp-ZL8WsoEe.js} +0 -0
- /package/client/dist/{rel-DgV0LP0F.js → rel-Lnk3efq_.js} +0 -0
- /package/client/dist/{riscv-CMDCoJxM.js → riscv-B6rT4cSG.js} +0 -0
- /package/client/dist/{rose-pine-BXrntRdT.js → rose-pine-Dh-EMol0.js} +0 -0
- /package/client/dist/{rose-pine-dawn-tFiW2rRe.js → rose-pine-dawn-BqC-N8fL.js} +0 -0
- /package/client/dist/{rose-pine-moon-DrIxqQYd.js → rose-pine-moon-vcuVc4Xx.js} +0 -0
- /package/client/dist/{rosmsg-Cewq0GIU.js → rosmsg-CkrEKNqZ.js} +0 -0
- /package/client/dist/{rust-DUqlQOJa.js → rust-BJsQV1yN.js} +0 -0
- /package/client/dist/{sass-B6etFGcc.js → sass-DUMhS7Ul.js} +0 -0
- /package/client/dist/{scala-DO7Y6ZnG.js → scala-QIWWuOfJ.js} +0 -0
- /package/client/dist/{scheme-DRfbr32a.js → scheme-DUaTpimf.js} +0 -0
- /package/client/dist/{sdbl-Cwj938jR.js → sdbl-ByziAReF.js} +0 -0
- /package/client/dist/{shellscript-6ddxflCk.js → shellscript-C_4ahoKK.js} +0 -0
- /package/client/dist/{slack-dark-MJ2tXQFU.js → slack-dark-BStzxS3X.js} +0 -0
- /package/client/dist/{slack-ochin-JiV8dnc5.js → slack-ochin-2x4WQR0g.js} +0 -0
- /package/client/dist/{smalltalk-n98K00NG.js → smalltalk-BgOCST23.js} +0 -0
- /package/client/dist/{snazzy-light-Diadm8ds.js → snazzy-light-D0wXjU0P.js} +0 -0
- /package/client/dist/{solarized-dark-E9lKu8O9.js → solarized-dark-YpFNWaFw.js} +0 -0
- /package/client/dist/{solarized-light-DUxZ3u6U.js → solarized-light-7a4AqvZ7.js} +0 -0
- /package/client/dist/{solidity-TIGR-FLA.js → solidity-oQ4hiwc0.js} +0 -0
- /package/client/dist/{splunk-BQx3McES.js → splunk-C8Rf4xma.js} +0 -0
- /package/client/dist/{sql-Dmd5GQHa.js → sql-5h2ZDb6r.js} +0 -0
- /package/client/dist/{src-DyiU8SPu.js → src-CoWzf9ks.js} +0 -0
- /package/client/dist/{ssh-config-fbfk9ZS-.js → ssh-config-BK2cOZ3H.js} +0 -0
- /package/client/dist/{stylus-BojZhyRk.js → stylus-y5-4LTjW.js} +0 -0
- /package/client/dist/{swift-BQSJcvSP.js → swift-BgxBD2YR.js} +0 -0
- /package/client/dist/{synthwave-84-JxbjaS25.js → synthwave-84-BkPcWg5x.js} +0 -0
- /package/client/dist/{system-verilog-B92pMEOF.js → system-verilog--HBRY74c.js} +0 -0
- /package/client/dist/{systemd-Ce42yWog.js → systemd-CEGf-MNr.js} +0 -0
- /package/client/dist/{talonscript-DJHwn0Oo.js → talonscript-DxfF5wgQ.js} +0 -0
- /package/client/dist/{tasl-CjWGKv7Q.js → tasl-Bs3WmVDT.js} +0 -0
- /package/client/dist/{tcl-nr6oYQi-.js → tcl-sj44Uys6.js} +0 -0
- /package/client/dist/{terraform-BmtGXZe8.js → terraform-Dk3Frx3Z.js} +0 -0
- /package/client/dist/{tokyo-night-gi5ylZcS.js → tokyo-night-jks_2THM.js} +0 -0
- /package/client/dist/{toml-BJ91txE7.js → toml-58T5lJMb.js} +0 -0
- /package/client/dist/{tsv-DptZ_IAJ.js → tsv-Be6q89a5.js} +0 -0
- /package/client/dist/{tsx-zaCZdc_j.js → tsx-S_sG4GSd.js} +0 -0
- /package/client/dist/{turtle-KObLSigr.js → turtle-D3vlU2OK.js} +0 -0
- /package/client/dist/{typescript-BK0CyBaL.js → typescript-DCWwSN3O.js} +0 -0
- /package/client/dist/{typespec-Dixzl_0-.js → typespec-DOAqMqZd.js} +0 -0
- /package/client/dist/{typst-Ca21Y7Pn.js → typst-eQZesfAU.js} +0 -0
- /package/client/dist/{v-Bw8_1WxQ.js → v-CjxftokX.js} +0 -0
- /package/client/dist/{vala-Da3xMxIP.js → vala-BY4gOu9x.js} +0 -0
- /package/client/dist/{vb-DT5W8f2u.js → vb-jHsx6ydV.js} +0 -0
- /package/client/dist/{verilog-B1qcJjpT.js → verilog-uRed-ROJ.js} +0 -0
- /package/client/dist/{vesper-v8GRJVTp.js → vesper-IPbSDcY9.js} +0 -0
- /package/client/dist/{vhdl-BbOu44s9.js → vhdl-BpuKDOPO.js} +0 -0
- /package/client/dist/{viml-rl1TVVjI.js → viml-CVGu2R7N.js} +0 -0
- /package/client/dist/{vitesse-black-D6O93llO.js → vitesse-black-CvxMZcbe.js} +0 -0
- /package/client/dist/{vitesse-dark-BGTXnHSp.js → vitesse-dark-BO9bSnXr.js} +0 -0
- /package/client/dist/{vitesse-light-B8rxnpw3.js → vitesse-light-UtuwVwQJ.js} +0 -0
- /package/client/dist/{vyper-CCGDUHkP.js → vyper-DBdOKuCY.js} +0 -0
- /package/client/dist/{wasm-D9kcNmzo.js → wasm-Ded3y1Or.js} +0 -0
- /package/client/dist/{wasm-60TGlqXX.js → wasm-Dxuep-_m.js} +0 -0
- /package/client/dist/{wenyan-BBpTXpp6.js → wenyan-DsdZPJPl.js} +0 -0
- /package/client/dist/{wgsl-C3K1t-VI.js → wgsl-DkPKK0zn.js} +0 -0
- /package/client/dist/{wikitext-IKeinUQo.js → wikitext-C2JOdtm0.js} +0 -0
- /package/client/dist/{wit-DjseqtIO.js → wit-BFX5-EUh.js} +0 -0
- /package/client/dist/{wolfram-2yhZCbpX.js → wolfram-DkXQ7ZMv.js} +0 -0
- /package/client/dist/{yaml-CIUMmuno.js → yaml-ZSEnqUIp.js} +0 -0
- /package/client/dist/{zenscript--Fzj1TA1.js → zenscript-ITj6Wa64.js} +0 -0
- /package/client/dist/{zig-DSc-j2rQ.js → zig-1Mlf-trN.js} +0 -0
|
@@ -0,0 +1,1177 @@
|
|
|
1
|
+
import { Client } from "@modelcontextprotocol/sdk/client";
|
|
2
|
+
import { SSEClientTransport } from "@modelcontextprotocol/sdk/client/sse.js";
|
|
3
|
+
import { useCallback, useEffect, useMemo, useRef, useState } from "react";
|
|
4
|
+
import { createClientExecClient } from "@mcpc-tech/cmcp";
|
|
5
|
+
import { ListPromptsResultSchema, PromptListChangedNotificationSchema } from "@modelcontextprotocol/sdk/types.js";
|
|
6
|
+
|
|
7
|
+
//#region src/tool-schemas.ts
|
|
8
|
+
/**
|
|
9
|
+
* Shared tool schemas for MCP inspector tools
|
|
10
|
+
* Used by both server and client implementations
|
|
11
|
+
*/
|
|
12
|
+
const TOOL_SCHEMAS = {
|
|
13
|
+
capture_element_context: {
|
|
14
|
+
name: "capture_element_context",
|
|
15
|
+
description: `Capture element context for troubleshooting.
|
|
16
|
+
|
|
17
|
+
**Default (automated=false)**: Manual mode - activates visual selector for user interaction.
|
|
18
|
+
|
|
19
|
+
**Automated (automated=true)**: AI controls capture by clicking elements programmatically. Only set to true when user needs automation.
|
|
20
|
+
|
|
21
|
+
Returns: source location, DOM hierarchy, computed styles, dimensions, and user notes. Use \`list_inspections\` to view all captured elements.`,
|
|
22
|
+
inputSchema: {
|
|
23
|
+
type: "object",
|
|
24
|
+
properties: { automated: {
|
|
25
|
+
type: "boolean",
|
|
26
|
+
description: "Set to true ONLY when user explicitly requests automated capture. Default is false (manual mode)."
|
|
27
|
+
} }
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
list_inspections: {
|
|
31
|
+
name: "list_inspections",
|
|
32
|
+
description: "List all captured inspections with ID, element details, source location, notes, and status (pending/in-progress/completed/failed). Use with chrome_devtools for additional context (Console.getMessages, Network.getHAR, Performance.getMetrics).",
|
|
33
|
+
inputSchema: {
|
|
34
|
+
type: "object",
|
|
35
|
+
properties: {}
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
update_inspection_status: {
|
|
39
|
+
name: "update_inspection_status",
|
|
40
|
+
description: "Update inspection status with optional progress tracking.\n\n**Parameters**:\n- inspectionId: Optional (auto-detects if omitted)\n- status: 'in-progress' | 'completed' | 'failed' | 'deleted'\n- progress: Optional steps array [{id, title, status}]\n- message: REQUIRED for 'completed'/'failed' status\n\n**Example**:\n```javascript\nupdate_inspection_status({\n status: 'completed',\n message: 'Fixed: pointer-events: none blocking clicks'\n});\n// Or delete an inspection\nupdate_inspection_status({\n status: 'deleted'\n});\n```",
|
|
41
|
+
inputSchema: {
|
|
42
|
+
type: "object",
|
|
43
|
+
properties: {
|
|
44
|
+
inspectionId: {
|
|
45
|
+
type: "string",
|
|
46
|
+
description: "Optional inspection ID. If not provided, uses the current active inspection."
|
|
47
|
+
},
|
|
48
|
+
status: {
|
|
49
|
+
type: "string",
|
|
50
|
+
enum: [
|
|
51
|
+
"in-progress",
|
|
52
|
+
"completed",
|
|
53
|
+
"failed",
|
|
54
|
+
"deleted"
|
|
55
|
+
],
|
|
56
|
+
description: "Current status: 'in-progress' for updates, 'completed' when resolved, 'failed' if unresolvable, 'deleted' to remove inspection"
|
|
57
|
+
},
|
|
58
|
+
progress: {
|
|
59
|
+
type: "object",
|
|
60
|
+
properties: { steps: {
|
|
61
|
+
type: "array",
|
|
62
|
+
items: {
|
|
63
|
+
type: "object",
|
|
64
|
+
properties: {
|
|
65
|
+
id: { type: "number" },
|
|
66
|
+
title: { type: "string" },
|
|
67
|
+
status: {
|
|
68
|
+
type: "string",
|
|
69
|
+
enum: [
|
|
70
|
+
"pending",
|
|
71
|
+
"in-progress",
|
|
72
|
+
"completed",
|
|
73
|
+
"failed"
|
|
74
|
+
]
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
required: [
|
|
78
|
+
"id",
|
|
79
|
+
"title",
|
|
80
|
+
"status"
|
|
81
|
+
]
|
|
82
|
+
}
|
|
83
|
+
} },
|
|
84
|
+
description: "Optional step-by-step progress tracking"
|
|
85
|
+
},
|
|
86
|
+
message: {
|
|
87
|
+
type: "string",
|
|
88
|
+
description: "Summary of findings or resolution. REQUIRED when status is 'completed' or 'failed'"
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
required: ["status"]
|
|
92
|
+
}
|
|
93
|
+
},
|
|
94
|
+
execute_page_script: {
|
|
95
|
+
name: "execute_page_script",
|
|
96
|
+
description: "Execute JavaScript in browser context (synchronous only, must return value). Access: window, document, DOM APIs, React/Vue instances, localStorage. For deeper diagnostics, use chrome_devtools MCP (Network.getHAR, Console.getMessages, Performance.getMetrics, Debugger, HeapProfiler).",
|
|
97
|
+
inputSchema: {
|
|
98
|
+
type: "object",
|
|
99
|
+
properties: { code: {
|
|
100
|
+
type: "string",
|
|
101
|
+
description: "JavaScript code to execute in page context. Must return a value for diagnostic output."
|
|
102
|
+
} },
|
|
103
|
+
required: ["code"]
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
};
|
|
107
|
+
|
|
108
|
+
//#endregion
|
|
109
|
+
//#region client/constants/icons/claude-color.svg?raw
|
|
110
|
+
var claude_color_default = "<svg height=\"1em\" style=\"flex:none;line-height:1\" viewBox=\"0 0 24 24\" width=\"1em\" xmlns=\"http://www.w3.org/2000/svg\"><title>Claude</title><path d=\"M4.709 15.955l4.72-2.647.08-.23-.08-.128H9.2l-.79-.048-2.698-.073-2.339-.097-2.266-.122-.571-.121L0 11.784l.055-.352.48-.321.686.06 1.52.103 2.278.158 1.652.097 2.449.255h.389l.055-.157-.134-.098-.103-.097-2.358-1.596-2.552-1.688-1.336-.972-.724-.491-.364-.462-.158-1.008.656-.722.881.06.225.061.893.686 1.908 1.476 2.491 1.833.365.304.145-.103.019-.073-.164-.274-1.355-2.446-1.446-2.49-.644-1.032-.17-.619a2.97 2.97 0 01-.104-.729L6.283.134 6.696 0l.996.134.42.364.62 1.414 1.002 2.229 1.555 3.03.456.898.243.832.091.255h.158V9.01l.128-1.706.237-2.095.23-2.695.08-.76.376-.91.747-.492.584.28.48.685-.067.444-.286 1.851-.559 2.903-.364 1.942h.212l.243-.242.985-1.306 1.652-2.064.73-.82.85-.904.547-.431h1.033l.76 1.129-.34 1.166-1.064 1.347-.881 1.142-1.264 1.7-.79 1.36.073.11.188-.02 2.856-.606 1.543-.28 1.841-.315.833.388.091.395-.328.807-1.969.486-2.309.462-3.439.813-.042.03.049.061 1.549.146.662.036h1.622l3.02.225.79.522.474.638-.079.485-1.215.62-1.64-.389-3.829-.91-1.312-.329h-.182v.11l1.093 1.068 2.006 1.81 2.509 2.33.127.578-.322.455-.34-.049-2.205-1.657-.851-.747-1.926-1.62h-.128v.17l.444.649 2.345 3.521.122 1.08-.17.353-.608.213-.668-.122-1.374-1.925-1.415-2.167-1.143-1.943-.14.08-.674 7.254-.316.37-.729.28-.607-.461-.322-.747.322-1.476.389-1.924.315-1.53.286-1.9.17-.632-.012-.042-.14.018-1.434 1.967-2.18 2.945-1.726 1.845-.414.164-.717-.37.067-.662.401-.589 2.388-3.036 1.44-1.882.93-1.086-.006-.158h-.055L4.132 18.56l-1.13.146-.487-.456.061-.746.231-.243 1.908-1.312-.006.006z\" fill=\"#D97757\" fill-rule=\"nonzero\"></path></svg>";
|
|
111
|
+
|
|
112
|
+
//#endregion
|
|
113
|
+
//#region client/constants/icons/openai.svg?raw
|
|
114
|
+
var openai_default = "<svg fill=\"currentColor\" fill-rule=\"evenodd\" height=\"1em\" style=\"flex:none;line-height:1\" viewBox=\"0 0 24 24\" width=\"1em\" xmlns=\"http://www.w3.org/2000/svg\"><title>OpenAI</title><path d=\"M21.55 10.004a5.416 5.416 0 00-.478-4.501c-1.217-2.09-3.662-3.166-6.05-2.66A5.59 5.59 0 0010.831 1C8.39.995 6.224 2.546 5.473 4.838A5.553 5.553 0 001.76 7.496a5.487 5.487 0 00.691 6.5 5.416 5.416 0 00.477 4.502c1.217 2.09 3.662 3.165 6.05 2.66A5.586 5.586 0 0013.168 23c2.443.006 4.61-1.546 5.361-3.84a5.553 5.553 0 003.715-2.66 5.488 5.488 0 00-.693-6.497v.001zm-8.381 11.558a4.199 4.199 0 01-2.675-.954c.034-.018.093-.05.132-.074l4.44-2.53a.71.71 0 00.364-.623v-6.176l1.877 1.069c.02.01.033.029.036.05v5.115c-.003 2.274-1.87 4.118-4.174 4.123zM4.192 17.78a4.059 4.059 0 01-.498-2.763c.032.02.09.055.131.078l4.44 2.53c.225.13.504.13.73 0l5.42-3.088v2.138a.068.068 0 01-.027.057L9.9 19.288c-1.999 1.136-4.552.46-5.707-1.51h-.001zM3.023 8.216A4.15 4.15 0 015.198 6.41l-.002.151v5.06a.711.711 0 00.364.624l5.42 3.087-1.876 1.07a.067.067 0 01-.063.005l-4.489-2.559c-1.995-1.14-2.679-3.658-1.53-5.63h.001zm15.417 3.54l-5.42-3.088L14.896 7.6a.067.067 0 01.063-.006l4.489 2.557c1.998 1.14 2.683 3.662 1.529 5.633a4.163 4.163 0 01-2.174 1.807V12.38a.71.71 0 00-.363-.623zm1.867-2.773a6.04 6.04 0 00-.132-.078l-4.44-2.53a.731.731 0 00-.729 0l-5.42 3.088V7.325a.068.068 0 01.027-.057L14.1 4.713c2-1.137 4.555-.46 5.707 1.513.487.833.664 1.809.499 2.757h.001zm-11.741 3.81l-1.877-1.068a.065.065 0 01-.036-.051V6.559c.001-2.277 1.873-4.122 4.181-4.12.976 0 1.92.338 2.671.954-.034.018-.092.05-.131.073l-4.44 2.53a.71.71 0 00-.365.623l-.003 6.173v.002zm1.02-2.168L12 9.25l2.414 1.375v2.75L12 14.75l-2.415-1.375v-2.75z\"></path></svg>";
|
|
115
|
+
|
|
116
|
+
//#endregion
|
|
117
|
+
//#region client/constants/icons/gemini-color.svg?raw
|
|
118
|
+
var gemini_color_default = "<svg height=\"1em\" style=\"flex:none;line-height:1\" viewBox=\"0 0 24 24\" width=\"1em\" xmlns=\"http://www.w3.org/2000/svg\"><title>Gemini</title><path d=\"M20.616 10.835a14.147 14.147 0 01-4.45-3.001 14.111 14.111 0 01-3.678-6.452.503.503 0 00-.975 0 14.134 14.134 0 01-3.679 6.452 14.155 14.155 0 01-4.45 3.001c-.65.28-1.318.505-2.002.678a.502.502 0 000 .975c.684.172 1.35.397 2.002.677a14.147 14.147 0 014.45 3.001 14.112 14.112 0 013.679 6.453.502.502 0 00.975 0c.172-.685.397-1.351.677-2.003a14.145 14.145 0 013.001-4.45 14.113 14.113 0 016.453-3.678.503.503 0 000-.975 13.245 13.245 0 01-2.003-.678z\" fill=\"#3186FF\"></path><path d=\"M20.616 10.835a14.147 14.147 0 01-4.45-3.001 14.111 14.111 0 01-3.678-6.452.503.503 0 00-.975 0 14.134 14.134 0 01-3.679 6.452 14.155 14.155 0 01-4.45 3.001c-.65.28-1.318.505-2.002.678a.502.502 0 000 .975c.684.172 1.35.397 2.002.677a14.147 14.147 0 014.45 3.001 14.112 14.112 0 013.679 6.453.502.502 0 00.975 0c.172-.685.397-1.351.677-2.003a14.145 14.145 0 013.001-4.45 14.113 14.113 0 016.453-3.678.503.503 0 000-.975 13.245 13.245 0 01-2.003-.678z\" fill=\"url(#lobe-icons-gemini-fill-0)\"></path><path d=\"M20.616 10.835a14.147 14.147 0 01-4.45-3.001 14.111 14.111 0 01-3.678-6.452.503.503 0 00-.975 0 14.134 14.134 0 01-3.679 6.452 14.155 14.155 0 01-4.45 3.001c-.65.28-1.318.505-2.002.678a.502.502 0 000 .975c.684.172 1.35.397 2.002.677a14.147 14.147 0 014.45 3.001 14.112 14.112 0 013.679 6.453.502.502 0 00.975 0c.172-.685.397-1.351.677-2.003a14.145 14.145 0 013.001-4.45 14.113 14.113 0 016.453-3.678.503.503 0 000-.975 13.245 13.245 0 01-2.003-.678z\" fill=\"url(#lobe-icons-gemini-fill-1)\"></path><path d=\"M20.616 10.835a14.147 14.147 0 01-4.45-3.001 14.111 14.111 0 01-3.678-6.452.503.503 0 00-.975 0 14.134 14.134 0 01-3.679 6.452 14.155 14.155 0 01-4.45 3.001c-.65.28-1.318.505-2.002.678a.502.502 0 000 .975c.684.172 1.35.397 2.002.677a14.147 14.147 0 014.45 3.001 14.112 14.112 0 013.679 6.453.502.502 0 00.975 0c.172-.685.397-1.351.677-2.003a14.145 14.145 0 013.001-4.45 14.113 14.113 0 016.453-3.678.503.503 0 000-.975 13.245 13.245 0 01-2.003-.678z\" fill=\"url(#lobe-icons-gemini-fill-2)\"></path><defs><linearGradient gradientUnits=\"userSpaceOnUse\" id=\"lobe-icons-gemini-fill-0\" x1=\"7\" x2=\"11\" y1=\"15.5\" y2=\"12\"><stop stop-color=\"#08B962\"></stop><stop offset=\"1\" stop-color=\"#08B962\" stop-opacity=\"0\"></stop></linearGradient><linearGradient gradientUnits=\"userSpaceOnUse\" id=\"lobe-icons-gemini-fill-1\" x1=\"8\" x2=\"11.5\" y1=\"5.5\" y2=\"11\"><stop stop-color=\"#F94543\"></stop><stop offset=\"1\" stop-color=\"#F94543\" stop-opacity=\"0\"></stop></linearGradient><linearGradient gradientUnits=\"userSpaceOnUse\" id=\"lobe-icons-gemini-fill-2\" x1=\"3.5\" x2=\"17.5\" y1=\"13.5\" y2=\"12\"><stop stop-color=\"#FABC12\"></stop><stop offset=\".46\" stop-color=\"#FABC12\" stop-opacity=\"0\"></stop></linearGradient></defs></svg>";
|
|
119
|
+
|
|
120
|
+
//#endregion
|
|
121
|
+
//#region client/constants/icons/moonshot.svg?raw
|
|
122
|
+
var moonshot_default = "<svg fill=\"currentColor\" fill-rule=\"evenodd\" height=\"1em\" style=\"flex:none;line-height:1\" viewBox=\"0 0 24 24\" width=\"1em\" xmlns=\"http://www.w3.org/2000/svg\"><title>MoonshotAI</title><path d=\"M1.052 16.916l9.539 2.552a21.007 21.007 0 00.06 2.033l5.956 1.593a11.997 11.997 0 01-5.586.865l-.18-.016-.044-.004-.084-.009-.094-.01a11.605 11.605 0 01-.157-.02l-.107-.014-.11-.016a11.962 11.962 0 01-.32-.051l-.042-.008-.075-.013-.107-.02-.07-.015-.093-.019-.075-.016-.095-.02-.097-.023-.094-.022-.068-.017-.088-.022-.09-.024-.095-.025-.082-.023-.109-.03-.062-.02-.084-.025-.093-.028-.105-.034-.058-.019-.08-.026-.09-.031-.066-.024a6.293 6.293 0 01-.044-.015l-.068-.025-.101-.037-.057-.022-.08-.03-.087-.035-.088-.035-.079-.032-.095-.04-.063-.028-.063-.027a5.655 5.655 0 01-.041-.018l-.066-.03-.103-.047-.052-.024-.096-.046-.062-.03-.084-.04-.086-.044-.093-.047-.052-.027-.103-.055-.057-.03-.058-.032a6.49 6.49 0 01-.046-.026l-.094-.053-.06-.034-.051-.03-.072-.041-.082-.05-.093-.056-.052-.032-.084-.053-.061-.039-.079-.05-.07-.047-.053-.035a7.785 7.785 0 01-.054-.036l-.044-.03-.044-.03a6.066 6.066 0 01-.04-.028l-.057-.04-.076-.054-.069-.05-.074-.054-.056-.042-.076-.057-.076-.059-.086-.067-.045-.035-.064-.052-.074-.06-.089-.073-.046-.039-.046-.039a7.516 7.516 0 01-.043-.037l-.045-.04-.061-.053-.07-.062-.068-.06-.062-.058-.067-.062-.053-.05-.088-.084a13.28 13.28 0 01-.099-.097l-.029-.028-.041-.042-.069-.07-.05-.051-.05-.053a6.457 6.457 0 01-.168-.179l-.08-.088-.062-.07-.071-.08-.042-.049-.053-.062-.058-.068-.046-.056a7.175 7.175 0 01-.027-.033l-.045-.055-.066-.082-.041-.052-.05-.064-.02-.025a11.99 11.99 0 01-1.44-2.402zm-1.02-5.794l11.353 3.037a20.468 20.468 0 00-.469 2.011l10.817 2.894a12.076 12.076 0 01-1.845 2.005L.657 15.923l-.016-.046-.035-.104a11.965 11.965 0 01-.05-.153l-.007-.023a11.896 11.896 0 01-.207-.741l-.03-.126-.018-.08-.021-.097-.018-.081-.018-.09-.017-.084-.018-.094c-.026-.141-.05-.283-.071-.426l-.017-.118-.011-.083-.013-.102a12.01 12.01 0 01-.019-.161l-.005-.047a12.12 12.12 0 01-.034-2.145zm1.593-5.15l11.948 3.196c-.368.605-.705 1.231-1.01 1.875l11.295 3.022c-.142.82-.368 1.612-.668 2.365l-11.55-3.09L.124 10.26l.015-.1.008-.049.01-.067.015-.087.018-.098c.026-.148.056-.295.088-.442l.028-.124.02-.085.024-.097c.022-.09.045-.18.07-.268l.028-.102.023-.083.03-.1.025-.082.03-.096.026-.082.031-.095a11.896 11.896 0 011.01-2.232zm4.442-4.4L17.352 4.59a20.77 20.77 0 00-1.688 1.721l7.823 2.093c.267.852.442 1.744.513 2.665L2.106 5.213l.045-.065.027-.04.04-.055.046-.065.055-.076.054-.072.064-.086.05-.065.057-.073.055-.07.06-.074.055-.069.065-.077.054-.066.066-.077.053-.06.072-.082.053-.06.067-.074.054-.058.073-.078.058-.06.063-.067.168-.17.1-.098.059-.056.076-.071a12.084 12.084 0 012.272-1.677zM12.017 0h.097l.082.001.069.001.054.002.068.002.046.001.076.003.047.002.06.003.054.002.087.005.105.007.144.011.088.007.044.004.077.008.082.008.047.005.102.012.05.006.108.014.081.01.042.006.065.01.207.032.07.012.065.011.14.026.092.018.11.022.046.01.075.016.041.01L14.7.3l.042.01.065.015.049.012.071.017.096.024.112.03.113.03.113.032.05.015.07.02.078.024.073.023.05.016.05.016.076.025.099.033.102.036.048.017.064.023.093.034.11.041.116.045.1.04.047.02.06.024.041.018.063.026.04.018.057.025.11.048.1.046.074.035.075.036.06.028.092.046.091.045.102.052.053.028.049.026.046.024.06.033.041.022.052.029.088.05.106.06.087.051.057.034.053.032.096.059.088.055.098.062.036.024.064.041.084.056.04.027.062.042.062.043.023.017c.054.037.108.075.161.114l.083.06.065.048.056.043.086.065.082.064.04.03.05.041.086.069.079.065.085.071c.712.6 1.353 1.283 1.909 2.031L7.222.994l.062-.027.065-.028.081-.034.086-.035c.113-.045.227-.09.341-.131l.096-.035.093-.033.084-.03.096-.031c.087-.03.176-.058.264-.085l.091-.027.086-.025.102-.03.085-.023.1-.026L9.04.37l.09-.023.091-.022.095-.022.09-.02.098-.021.091-.02.095-.018.092-.018.1-.018.091-.016.098-.017.092-.014.097-.015.092-.013.102-.013.091-.012.105-.012.09-.01.105-.01c.093-.01.186-.018.28-.024l.106-.008.09-.005.11-.006.093-.004.1-.004.097-.002.099-.002.197-.002z\"></path></svg>";
|
|
123
|
+
|
|
124
|
+
//#endregion
|
|
125
|
+
//#region client/constants/icons/goose.svg?raw
|
|
126
|
+
var goose_default = "<svg fill=\"currentColor\" fill-rule=\"evenodd\" height=\"1em\" style=\"flex:none;line-height:1\" viewBox=\"0 0 24 24\" width=\"1em\" xmlns=\"http://www.w3.org/2000/svg\"><title>Goose</title><path d=\"M21.595 23.61c1.167-.254 2.405-.944 2.405-.944l-2.167-1.784a12.124 12.124 0 01-2.695-3.131 12.127 12.127 0 00-3.97-4.049l-.794-.462a1.115 1.115 0 01-.488-.815.844.844 0 01.154-.575c.413-.582 2.548-3.115 2.94-3.44.503-.416 1.065-.762 1.586-1.159.074-.056.148-.112.221-.17.003-.002.007-.004.009-.007.167-.131.325-.272.45-.438.453-.524.563-.988.59-1.193-.061-.197-.244-.639-.753-1.148.319.02.705.272 1.056.569.235-.376.481-.773.727-1.171.165-.266-.08-.465-.086-.471h-.001V3.22c-.007-.007-.206-.25-.471-.086-.567.35-1.134.702-1.639 1.021 0 0-.597-.012-1.305.599a2.464 2.464 0 00-.438.45l-.007.009c-.058.072-.114.147-.17.221-.397.521-.743 1.083-1.16 1.587-.323.391-2.857 2.526-3.44 2.94a.842.842 0 01-.574.153 1.115 1.115 0 01-.815-.488l-.462-.794a12.123 12.123 0 00-4.049-3.97 12.133 12.133 0 01-3.13-2.695L1.332 0S.643 1.238.39 2.405c.352.428 1.27 1.49 2.34 2.302C1.58 4.167.73 3.75.06 3.4c-.103.765-.063 1.92.043 2.816.726.317 1.961.806 3.219 1.066-1.006.236-2.11.278-2.961.262.15.554.358 1.119.64 1.688.119.263.25.52.39.77.452.125 2.222.383 3.164.171l-2.51.897a27.776 27.776 0 002.544 2.726c2.031-1.092 2.494-1.241 4.018-2.238-2.467 2.008-3.108 2.828-3.8 3.67l-.483.678c-.25.351-.469.725-.65 1.117-.61 1.31-1.47 4.1-1.47 4.1-.154.486.202.842.674.674 0 0 2.79-.861 4.1-1.47.392-.182.766-.4 1.118-.65l.677-.483c.227-.187.453-.37.701-.586 0 0 1.705 2.02 3.458 3.349l.896-2.511c-.211.942.046 2.712.17 3.163.252.142.509.272.772.392.569.28 1.134.49 1.688.64-.016-.853.026-1.956.261-2.962.26 1.258.75 2.493 1.067 3.219.895.106 2.051.146 2.816.043a73.87 73.87 0 01-1.308-2.67c.811 1.07 1.874 1.988 2.302 2.34h-.001z\"></path></svg>";
|
|
127
|
+
|
|
128
|
+
//#endregion
|
|
129
|
+
//#region client/constants/icons/cursor.svg?raw
|
|
130
|
+
var cursor_default = "<svg fill=\"currentColor\" fill-rule=\"evenodd\" height=\"1em\" style=\"flex:none;line-height:1\" viewBox=\"0 0 24 24\" width=\"1em\" xmlns=\"http://www.w3.org/2000/svg\"><title>Cursor</title><path d=\"M22.106 5.68L12.5.135a.998.998 0 00-.998 0L1.893 5.68a.84.84 0 00-.419.726v11.186c0 .3.16.577.42.727l9.607 5.547a.999.999 0 00.998 0l9.608-5.547a.84.84 0 00.42-.727V6.407a.84.84 0 00-.42-.726zm-.603 1.176L12.228 22.92c-.063.108-.228.064-.228-.061V12.34a.59.59 0 00-.295-.51l-9.11-5.26c-.107-.062-.063-.228.062-.228h18.55c.264 0 .428.286.296.514z\"></path></svg>";
|
|
131
|
+
|
|
132
|
+
//#endregion
|
|
133
|
+
//#region client/constants/icons/codebuddy.svg?raw
|
|
134
|
+
var codebuddy_default = "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"32\" height=\"32\" viewBox=\"0 0 32 32\" fill=\"none\"><g clip-path=\"url(#clip0_830_6638)\"><rect width=\"32\" height=\"32\" rx=\"6.90526\" fill=\"url(#paint0_linear_830_6638)\"></rect><g filter=\"url(#filter0_f_830_6638)\"><circle cx=\"10.0861\" cy=\"27.9835\" r=\"11.2648\" fill=\"#28B894\" fill-opacity=\"0.4\"></circle></g><g filter=\"url(#filter1_f_830_6638)\"><circle cx=\"26.6723\" cy=\"34.895\" r=\"10.2963\" fill=\"#28B894\"></circle></g><path d=\"M24.4736 2.50224C24.7872 2.22094 24.8063 2.20926 25.0362 2.19546C25.4089 2.16822 25.7503 2.34741 26.3314 2.87637C27.6892 4.11019 29.5803 6.64682 30.7558 8.81306L31.2096 9.65385L31.8518 9.9732C32.4712 10.2862 33.4867 10.9279 33.9109 11.272C34.1027 11.4306 34.13 11.4338 34.3294 11.3562C35.2298 11.0056 36.5196 11.4703 37.6573 12.5618C38.6815 13.5434 39.6628 15.2201 40.0386 16.6199C40.0935 16.8452 40.1656 17.3298 40.1921 17.6905C40.2778 18.9568 39.8722 19.9685 39.0902 20.4264C38.9304 20.5186 38.9197 20.5434 38.9242 20.9417C38.9603 22.8383 38.4489 24.7316 37.4219 26.5778C36.2625 28.6509 34.1977 30.7958 31.4037 32.8162C29.9032 33.9081 26.3539 35.9762 24.7491 36.7022C20.9046 38.4331 17.8221 39.0965 15.145 38.7685C13.5483 38.5749 11.7415 37.9516 10.6721 37.2282C10.3906 37.0336 10.3455 37.0216 10.1305 37.0831C8.98558 37.412 7.48603 36.7359 6.21222 35.3219C5.70416 34.7565 4.88467 33.3691 4.61888 32.6266C4.00401 30.8887 4.1254 29.3203 4.94436 28.3837C5.15595 28.1425 5.16291 28.1326 5.11671 27.7272C5.04038 27.0631 5.00615 26.0799 5.04102 25.4457L5.06891 24.8533L4.17863 23.2801C2.80144 20.8296 1.92687 18.7717 1.58932 17.1996C1.41119 16.3377 1.42249 15.9551 1.64114 15.6721C1.77434 15.5012 2.21128 15.3234 2.73792 15.2261C4.06379 14.9934 6.95525 15.2039 10.1717 15.7718L10.5056 15.8305L11.2401 15.1809C12.459 14.1012 13.2686 13.4957 14.7613 12.5649C16.3172 11.5914 18.0733 10.7902 20.0507 10.1561L20.6856 9.95303L21.034 9.03695C22.2826 5.74089 23.5617 3.31103 24.4736 2.50224ZM14.0131 19.394C12.6022 20.2085 11.897 20.6164 11.3785 21.0729C9.27869 22.922 8.49391 25.8508 9.38789 28.502C9.60867 29.1567 10.0158 29.8629 10.8305 31.2742C11.6451 32.6851 12.053 33.3903 12.5095 33.9087C14.3585 36.0086 17.2873 36.7933 19.9386 35.8994C20.5931 35.6786 21.299 35.2718 22.7099 34.4572L30.8289 29.7697C32.2401 28.955 32.9458 28.5468 33.4643 28.0903C35.5641 26.2412 36.3489 23.3124 35.4549 20.6612C35.2342 20.0066 34.8273 19.3008 34.0128 17.8899C33.198 16.4787 32.7899 15.773 32.3333 15.2545C30.4843 13.1546 27.5555 12.3699 24.9042 13.2638C24.2496 13.4846 23.5433 13.8917 22.1321 14.7065L14.0131 19.394Z\" fill=\"url(#paint1_linear_830_6638)\"></path><rect x=\"14.7959\" y=\"25.0674\" width=\"3.20723\" height=\"6.66117\" rx=\"1.60361\" transform=\"rotate(-30 14.7959 25.0674)\" fill=\"white\"></rect><rect x=\"23.4492\" y=\"20.0713\" width=\"3.20723\" height=\"6.66117\" rx=\"1.60361\" transform=\"rotate(-30 23.4492 20.0713)\" fill=\"white\"></rect></g><defs><filter id=\"filter0_f_830_6638\" x=\"-11.9327\" y=\"5.96479\" width=\"44.0372\" height=\"44.0372\" filterUnits=\"userSpaceOnUse\" color-interpolation-filters=\"sRGB\"><feFlood flood-opacity=\"0\" result=\"BackgroundImageFix\"></feFlood><feBlend mode=\"normal\" in=\"SourceGraphic\" in2=\"BackgroundImageFix\" result=\"shape\"></feBlend><feGaussianBlur stdDeviation=\"5.37698\" result=\"effect1_foregroundBlur_830_6638\"></feGaussianBlur></filter><filter id=\"filter1_f_830_6638\" x=\"7.57568\" y=\"15.7983\" width=\"38.1934\" height=\"38.1934\" filterUnits=\"userSpaceOnUse\" color-interpolation-filters=\"sRGB\"><feFlood flood-opacity=\"0\" result=\"BackgroundImageFix\"></feFlood><feBlend mode=\"normal\" in=\"SourceGraphic\" in2=\"BackgroundImageFix\" result=\"shape\"></feBlend><feGaussianBlur stdDeviation=\"4.40015\" result=\"effect1_foregroundBlur_830_6638\"></feGaussianBlur></filter><linearGradient id=\"paint0_linear_830_6638\" x1=\"16\" y1=\"0\" x2=\"16\" y2=\"32\" gradientUnits=\"userSpaceOnUse\"><stop stop-color=\"#6C4DFF\"></stop><stop offset=\"1\" stop-color=\"#583ED3\"></stop></linearGradient><linearGradient id=\"paint1_linear_830_6638\" x1=\"13.3307\" y1=\"8.86225\" x2=\"28.3004\" y2=\"34.7904\" gradientUnits=\"userSpaceOnUse\"><stop stop-color=\"white\" stop-opacity=\"0.8\"></stop><stop offset=\"0.437689\" stop-color=\"white\"></stop></linearGradient><clipPath id=\"clip0_830_6638\"><rect width=\"32\" height=\"32\" rx=\"6.90526\" fill=\"white\"></rect></clipPath></defs></svg>";
|
|
135
|
+
|
|
136
|
+
//#endregion
|
|
137
|
+
//#region client/constants/icons/droid.svg?raw
|
|
138
|
+
var droid_default = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 20 20\" fill=\"currentColor\" width=\"1em\" height=\"1em\" style=\"flex:none;line-height:1\">\n <path d=\"M13.9062 3.20484C13.8706 3.19623 13.8373 3.18019 13.8086 3.15788C13.7799 3.13552 13.7565 3.10743 13.74 3.07546C13.7234 3.04349 13.7142 3.00841 13.7128 2.97263C13.7115 2.93682 13.7181 2.90121 13.7322 2.86815C14.2188 1.71337 14.4334 0.789376 14.087 0.402562C13.1693 -0.623688 9.48933 1.41705 8.31598 2.10822C8.28457 2.12665 8.24942 2.13825 8.21299 2.14222C8.17656 2.14618 8.13967 2.14242 8.10486 2.13122C8.07004 2.12003 8.03809 2.10163 8.01123 2.0773C7.98437 2.05297 7.96323 2.02326 7.94918 1.99024C7.45597 0.83788 6.93748 0.036362 6.41194 0.00160127C5.01894 -0.0913635 3.89616 3.88951 3.56749 5.18697C3.5587 5.22173 3.54233 5.25423 3.5195 5.2822C3.49662 5.31021 3.46781 5.33305 3.43507 5.34918C3.40233 5.3653 3.36639 5.37432 3.32971 5.37561C3.29307 5.37694 3.25656 5.37052 3.22266 5.35677C2.03854 4.88225 1.09066 4.67288 0.694439 5.01078C-0.35788 5.90567 1.73432 9.49452 2.44305 10.6388C2.462 10.6694 2.47393 10.7037 2.47804 10.7392C2.48214 10.7748 2.47833 10.8108 2.46684 10.8447C2.45536 10.8787 2.43646 10.9099 2.41147 10.9361C2.38648 10.9623 2.35598 10.9828 2.32203 10.9965C1.14081 11.4775 0.318936 11.9831 0.282878 12.4956C0.187966 13.8541 4.26959 14.9491 5.60043 15.2696C5.63599 15.2783 5.66919 15.2943 5.69783 15.3167C5.72642 15.339 5.7498 15.3671 5.76625 15.399C5.78275 15.4309 5.79199 15.4659 5.79332 15.5016C5.79469 15.5373 5.78814 15.5729 5.77409 15.6059C5.28751 16.7607 5.07282 17.6851 5.41931 18.0715C6.33693 19.0977 10.0173 17.0574 11.1907 16.3662C11.2221 16.3477 11.2573 16.3361 11.2937 16.3321C11.3302 16.3281 11.3671 16.3318 11.4019 16.343C11.4368 16.3542 11.4687 16.3727 11.4955 16.397C11.5224 16.4214 11.5435 16.4511 11.5575 16.4842C12.0507 17.6362 12.5688 18.4377 13.0947 18.4729C14.4877 18.5654 15.6105 14.5849 15.9388 13.2871C15.9476 13.2524 15.9641 13.2199 15.987 13.192C16.0099 13.164 16.0388 13.1412 16.0716 13.1251C16.1043 13.1091 16.1403 13.1001 16.177 13.0988C16.2136 13.0975 16.2502 13.1039 16.284 13.1177C17.4681 13.5922 18.4156 13.8012 18.8122 13.4637C19.8646 12.5688 17.7719 8.97953 17.0632 7.83525C17.0444 7.80462 17.0326 7.77034 17.0286 7.73485C17.0245 7.69932 17.0284 7.66335 17.0399 7.62944C17.0514 7.59549 17.0702 7.56436 17.0951 7.53817C17.12 7.51198 17.1504 7.49129 17.1842 7.47758C18.3659 6.99659 19.1877 6.4909 19.2234 5.97838C19.3187 4.61989 15.2367 3.52497 13.9062 3.20484ZM12.3081 1.90249C12.5758 2.37055 11.1961 5.48935 10.1699 7.67079C10.1527 7.70725 10.1245 7.73772 10.0891 7.75809C10.0536 7.77847 10.0126 7.78776 9.97155 7.78473C9.93052 7.7817 9.8914 7.76646 9.85952 7.74112C9.82761 7.71573 9.80444 7.68146 9.79313 7.64286C9.37866 6.22454 8.90493 4.55809 8.39805 3.14341C8.37815 3.08787 8.37915 3.02724 8.40087 2.97239C8.42258 2.9175 8.46361 2.87195 8.51658 2.84386C9.78235 2.16966 11.9483 1.27437 12.3081 1.90249ZM6.24201 2.28849C6.77045 2.43481 8.05612 5.59161 8.91198 7.84176C8.92628 7.87935 8.92839 7.9203 8.91811 7.95914C8.90779 7.99794 8.88558 8.03274 8.85441 8.0589C8.8232 8.08505 8.78457 8.10126 8.74367 8.10534C8.70276 8.10946 8.66156 8.10126 8.62559 8.08185C7.30304 7.36603 5.76082 6.51318 4.37652 5.86242C4.32231 5.83676 4.27921 5.79322 4.25483 5.73947C4.23046 5.68575 4.22644 5.62532 4.24348 5.56898C4.65089 4.22058 5.53204 2.09246 6.24201 2.28849ZM2.23251 6.74474C2.71204 6.48363 5.91044 7.82923 8.14688 8.83002C8.18431 8.84675 8.21556 8.87424 8.23645 8.90884C8.25734 8.94339 8.26687 8.98341 8.26376 9.02343C8.26061 9.06344 8.24503 9.10156 8.219 9.13268C8.19301 9.16376 8.15787 9.1864 8.11828 9.19743C6.66435 9.60162 4.95511 10.0636 3.50449 10.558C3.44763 10.5772 3.38554 10.5762 3.32938 10.555C3.27322 10.5339 3.22655 10.4939 3.19779 10.4423C2.50771 9.2079 1.58802 7.09558 2.23251 6.74474ZM2.62832 12.6606C2.77794 12.1452 6.0153 10.8914 8.32261 10.0567C8.36116 10.0428 8.40319 10.0407 8.44297 10.0508C8.4828 10.0608 8.51849 10.0825 8.5453 10.1129C8.57208 10.1433 8.58874 10.181 8.59293 10.2209C8.59711 10.2607 8.5887 10.3009 8.56881 10.336C7.83438 11.6258 6.95986 13.1298 6.29258 14.4794C6.26651 14.5325 6.22187 14.5747 6.16671 14.5986C6.11158 14.6224 6.04954 14.6263 5.99168 14.6096C4.60903 14.2147 2.42689 13.353 2.62832 12.6606ZM7.19776 16.5707C6.92961 16.1031 8.30977 12.9839 9.33597 10.8029C9.35313 10.7664 9.38136 10.7359 9.41679 10.7155C9.45227 10.6952 9.49326 10.6859 9.53429 10.6889C9.57537 10.6919 9.61445 10.7072 9.64632 10.7325C9.67824 10.7579 9.7014 10.7922 9.71272 10.8308C10.1272 12.2487 10.6009 13.9156 11.1078 15.3303C11.1276 15.3858 11.1265 15.4463 11.1047 15.5011C11.0829 15.5559 11.0418 15.6014 10.9888 15.6294C9.7235 16.3023 7.5571 17.1993 7.19901 16.5707H7.19776ZM13.2638 16.1847C12.735 16.0388 11.4493 12.8817 10.5935 10.6315C10.5791 10.5938 10.5769 10.5528 10.5872 10.5139C10.5975 10.475 10.6198 10.4401 10.6511 10.414C10.6823 10.3878 10.7211 10.3716 10.762 10.3676C10.803 10.3635 10.8443 10.3719 10.8803 10.3914C12.2024 11.1072 13.745 11.9605 15.1289 12.6113C15.1832 12.6368 15.2264 12.6803 15.2508 12.7341C15.2752 12.7878 15.2792 12.8483 15.262 12.9047C14.855 14.2551 13.9738 16.3811 13.2638 16.1847ZM17.2733 11.7285C16.7934 11.99 13.5954 10.644 11.3586 9.64322C11.3211 9.62648 11.2899 9.599 11.269 9.5644C11.2481 9.52984 11.2386 9.48983 11.2417 9.44981C11.2448 9.40979 11.2604 9.37168 11.2864 9.34056C11.3124 9.30947 11.3476 9.28688 11.3871 9.27584C12.8415 8.87165 14.5503 8.40962 16.0009 7.91529C16.0579 7.89601 16.1201 7.89706 16.1763 7.91832C16.2326 7.93958 16.2793 7.97963 16.3081 8.03133C16.9977 9.26534 17.9174 11.378 17.2733 11.7285ZM16.8775 5.81266C16.7275 6.32842 13.4905 7.58227 11.1832 8.41693C11.1446 8.43092 11.1025 8.43302 11.0627 8.42299C11.0228 8.41293 10.987 8.39122 10.9602 8.36075C10.9334 8.33027 10.9168 8.29248 10.9126 8.2525C10.9085 8.21257 10.917 8.17231 10.937 8.13719C11.6711 6.84781 12.5456 5.3434 13.2129 3.99379C13.2391 3.94088 13.2837 3.8988 13.3389 3.87504C13.394 3.85127 13.456 3.84735 13.5138 3.86404C14.8964 4.26096 17.0785 5.12028 16.8775 5.81266Z\" fill=\"currentColor\" style=\"translate: none; rotate: none; scale: none; transform-origin: 0px 0px 0px; filter: drop-shadow(rgb(255, 255, 255) 0px 0px 0px); opacity: 1;\" data-svg-origin=\"9.75314524769783 9.237242697738111\" transform=\"matrix(1,0,0,1,0,0)\"></path>\n</svg>\n";
|
|
139
|
+
|
|
140
|
+
//#endregion
|
|
141
|
+
//#region client/constants/icons/opencode.png?png
|
|
142
|
+
var opencode_default = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAADWklEQVR4nGKRktJjGEyAaaAdgA5GHUQIjDqIEBh1ECEw6iBCYNRBhMCgcxALkeoc7C3zchK5ubnIsOP48bMNzf1EKmYkprYXEhI4enA9Hx/PxUvXDh859f//f+JdE+jvwcvLraXnTKR6okKoqCCVj4/n/v1HAUEpv37/Jt41/Hy8oSE+fRNmE6+FcBpSU1WKjQ5mYGC4fPUmSa5hYGCoqy188eLV/IWriNdCOIQa6gpZWJhJcgcE2NmaBwW4e/jE/f37j2oOcnW2tbezwCrFz8+XEB8qyM+HS6+Pj8uPHz8jw/0YYEnu379/O3YdOHX6IvkOqq7MxSU1a3q7srLC2nXbfvz4iVXB0mXr0UT0dDWXLJxkYOLx7dt3chzEwcGuqqqIVSrA393czNDVI+r2nQd4TEADQoL8ly/sERTgx+MgfImakZERqzg3N2dNVd6yFRtJcg0DAwMxiYmEklpIkB/CyMtJ4uPlmTBxDkmuIRIQW1IzMDBYWZqkpURdvnIjLSX6zNmLIiJCIiJCBHX9Z2C4d+/hz5+/iLQFX0nNyclx58ZhZJF/IPD/P8P////+MzD8hwEoC5chp05fCA5Lh5ST1y7vM7P0ffrsBS5LiQ2hHz9+5hfVb9+xn6RChYGBYeWyaSRVNfgchJyoG5r6tmzdS5JTGBgYHB0sLcwN3b1iiNdCVKJet3774qXrSHUNGxtrU33xvAUrb9y8CxFhZmYCpyp8AYYvhP7+/csADu2qmk40KStLYxNj/M0ERhtrUyUlee0Xr/NyEiFChgY6//79//zpC5kO+vnz17adB7w8HPfsXP7l61dkKSVFudNnLl2/cRuP9us3bkMUCAsLMjAw8HBzu7nYXrl26/OXr/j8gb89xMjIaKCvxcrKiizY1lz29dv3oNBUkhK4sLDg2ZPbCoobNmzciUcZgVz2////8xeuIosE+LvLykq5ekaTmt0a6grPX7iC3zWkFYwMDAwiwoItjSWNzRMePXpKkkZrKxN/P3dv3ziCKklzUFFh2rdvP46fPKugIEu8LilJ8e6O6tWrt1y+cpPKDrp+/ba7q926VbNI0vXnz9+jx07XNfYSo5ioRj49waDrl406iBAYdRAhMOogQmDUQYTAqIMIgUHnIEAAAAD//xjiMCmHkZcfAAAAAElFTkSuQmCC";
|
|
143
|
+
|
|
144
|
+
//#endregion
|
|
145
|
+
//#region client/constants/icons.ts
|
|
146
|
+
const AGENT_ICONS = {
|
|
147
|
+
claude: claude_color_default,
|
|
148
|
+
openai: openai_default,
|
|
149
|
+
gemini: gemini_color_default,
|
|
150
|
+
moonshot: moonshot_default,
|
|
151
|
+
goose: goose_default,
|
|
152
|
+
cursor: cursor_default,
|
|
153
|
+
droid: droid_default,
|
|
154
|
+
opencode: opencode_default,
|
|
155
|
+
codebuddy: codebuddy_default
|
|
156
|
+
};
|
|
157
|
+
function svgToDataUri(svg) {
|
|
158
|
+
return `data:image/svg+xml,${encodeURIComponent(svg)}`;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
//#endregion
|
|
162
|
+
//#region client/constants/agents.ts
|
|
163
|
+
const AVAILABLE_AGENTS = [
|
|
164
|
+
{
|
|
165
|
+
name: "Claude Code",
|
|
166
|
+
command: "npx",
|
|
167
|
+
args: ["-y", "@zed-industries/claude-code-acp"],
|
|
168
|
+
env: [{
|
|
169
|
+
key: "ANTHROPIC_API_KEY",
|
|
170
|
+
required: false
|
|
171
|
+
}, {
|
|
172
|
+
key: "ANTHROPIC_BASE_URL",
|
|
173
|
+
required: false
|
|
174
|
+
}],
|
|
175
|
+
configHint: "Anthropic's official CLI agent via Zed adapter",
|
|
176
|
+
configLink: "https://github.com/zed-industries/claude-code-acp",
|
|
177
|
+
npmPackage: "@zed-industries/claude-code-acp",
|
|
178
|
+
npmArgs: [],
|
|
179
|
+
meta: { icon: svgToDataUri(AGENT_ICONS.claude) }
|
|
180
|
+
},
|
|
181
|
+
{
|
|
182
|
+
name: "Codex CLI",
|
|
183
|
+
command: "npx",
|
|
184
|
+
args: ["-y", "@zed-industries/codex-acp"],
|
|
185
|
+
env: [{
|
|
186
|
+
key: "OPENAI_API_KEY",
|
|
187
|
+
required: false
|
|
188
|
+
}],
|
|
189
|
+
configHint: "OpenAI Codex CLI via Zed adapter",
|
|
190
|
+
configLink: "https://github.com/zed-industries/codex-acp",
|
|
191
|
+
npmPackage: "@zed-industries/codex-acp",
|
|
192
|
+
npmArgs: [],
|
|
193
|
+
meta: { icon: svgToDataUri(AGENT_ICONS.openai) }
|
|
194
|
+
},
|
|
195
|
+
{
|
|
196
|
+
name: "Gemini CLI",
|
|
197
|
+
command: "gemini",
|
|
198
|
+
args: ["--experimental-acp"],
|
|
199
|
+
env: [{
|
|
200
|
+
key: "GEMINI_API_KEY",
|
|
201
|
+
required: false
|
|
202
|
+
}],
|
|
203
|
+
authMethodId: "gemini-api-key",
|
|
204
|
+
configHint: "Official Google Gemini CLI with ACP support",
|
|
205
|
+
configLink: "https://github.com/google-gemini/gemini-cli",
|
|
206
|
+
meta: { icon: svgToDataUri(AGENT_ICONS.gemini) }
|
|
207
|
+
},
|
|
208
|
+
{
|
|
209
|
+
name: "Kimi CLI",
|
|
210
|
+
command: "kimi",
|
|
211
|
+
args: ["--acp"],
|
|
212
|
+
env: [],
|
|
213
|
+
configHint: "Moonshot AI's CLI with built-in ACP support",
|
|
214
|
+
configLink: "https://github.com/MoonshotAI/kimi-cli",
|
|
215
|
+
installCommand: "uv tool install --python 3.13 kimi-cli",
|
|
216
|
+
meta: { icon: svgToDataUri(AGENT_ICONS.moonshot) }
|
|
217
|
+
},
|
|
218
|
+
{
|
|
219
|
+
name: "Goose",
|
|
220
|
+
command: "goose",
|
|
221
|
+
args: ["acp"],
|
|
222
|
+
env: [],
|
|
223
|
+
configHint: "Block's open-source agent with ACP support",
|
|
224
|
+
configLink: "https://block.github.io/goose/docs/guides/acp-clients",
|
|
225
|
+
installCommand: "pipx install goose-ai",
|
|
226
|
+
meta: { icon: svgToDataUri(AGENT_ICONS.goose) }
|
|
227
|
+
},
|
|
228
|
+
{
|
|
229
|
+
name: "Opencode",
|
|
230
|
+
command: "opencode",
|
|
231
|
+
args: ["acp"],
|
|
232
|
+
env: [],
|
|
233
|
+
configHint: "SST's open source agent with ACP support",
|
|
234
|
+
configLink: "https://github.com/sst/opencode",
|
|
235
|
+
meta: { icon: AGENT_ICONS.opencode }
|
|
236
|
+
},
|
|
237
|
+
{
|
|
238
|
+
name: "Cursor Agent",
|
|
239
|
+
command: "npx",
|
|
240
|
+
args: ["@blowmage/cursor-agent-acp"],
|
|
241
|
+
env: [],
|
|
242
|
+
configHint: "Unofficial ACP adapter for Cursor's agent",
|
|
243
|
+
configLink: "https://github.com/blowmage/cursor-agent-acp",
|
|
244
|
+
npmPackage: "@blowmage/cursor-agent-acp",
|
|
245
|
+
npmArgs: [],
|
|
246
|
+
meta: { icon: svgToDataUri(AGENT_ICONS.cursor) }
|
|
247
|
+
},
|
|
248
|
+
{
|
|
249
|
+
name: "Droid (Experimental)",
|
|
250
|
+
command: "npx",
|
|
251
|
+
args: ["-y", "@yaonyan/droid-acp"],
|
|
252
|
+
env: [{
|
|
253
|
+
key: "FACTORY_API_KEY",
|
|
254
|
+
required: false
|
|
255
|
+
}],
|
|
256
|
+
configHint: "Unofficial ACP adapter for Droid CLI",
|
|
257
|
+
configLink: "https://github.com/yaonyan/droid-acp",
|
|
258
|
+
npmPackage: "@yaonyan/droid-acp",
|
|
259
|
+
npmArgs: [],
|
|
260
|
+
meta: { icon: svgToDataUri(AGENT_ICONS.droid) }
|
|
261
|
+
},
|
|
262
|
+
{
|
|
263
|
+
name: "CodeBuddy Code",
|
|
264
|
+
command: "codebuddy",
|
|
265
|
+
args: ["--acp"],
|
|
266
|
+
env: [{
|
|
267
|
+
key: "CODEBUDDY_API_KEY",
|
|
268
|
+
required: false
|
|
269
|
+
}, {
|
|
270
|
+
key: "CODEBUDDY_INTERNET_ENVIRONMENT",
|
|
271
|
+
required: false
|
|
272
|
+
}],
|
|
273
|
+
configHint: "Tencent Cloud's coding assistant",
|
|
274
|
+
configLink: "https://copilot.tencent.com/docs/cli/acp",
|
|
275
|
+
meta: { icon: svgToDataUri(AGENT_ICONS.codebuddy) },
|
|
276
|
+
acpDelay: 2e3
|
|
277
|
+
}
|
|
278
|
+
];
|
|
279
|
+
const DEFAULT_AGENT = "Claude Code";
|
|
280
|
+
|
|
281
|
+
//#endregion
|
|
282
|
+
//#region client/utils/config-loader.ts
|
|
283
|
+
let configCache = null;
|
|
284
|
+
let configPromise = null;
|
|
285
|
+
/**
|
|
286
|
+
* Get the dev server base URL from injected config.
|
|
287
|
+
* Uses __DEV_INSPECTOR_CONFIG__ set by the plugin at build time.
|
|
288
|
+
* Falls back to window.location.origin for sidebar pages.
|
|
289
|
+
*/
|
|
290
|
+
function getDevServerBaseUrl() {
|
|
291
|
+
const injectedConfig = window.__DEV_INSPECTOR_CONFIG__;
|
|
292
|
+
const base = injectedConfig?.base || "/";
|
|
293
|
+
if (injectedConfig?.baseUrl && typeof injectedConfig.baseUrl === "string") return injectedConfig.baseUrl.replace(/\/$/, "");
|
|
294
|
+
if (injectedConfig?.host && injectedConfig?.port) return `http://${injectedConfig.host}:${injectedConfig.port}${base}`.replace(/\/$/, "");
|
|
295
|
+
if (typeof window !== "undefined" && window.location?.origin) return window.location.origin;
|
|
296
|
+
return `http://localhost:5137`;
|
|
297
|
+
}
|
|
298
|
+
/**
|
|
299
|
+
* Merge custom agent with default agent properties
|
|
300
|
+
* If a custom agent has the same name as a default agent, fill in missing properties
|
|
301
|
+
*/
|
|
302
|
+
function mergeAgentWithDefaults(customAgent) {
|
|
303
|
+
const defaultAgent = AVAILABLE_AGENTS.find((a) => a.name === customAgent.name);
|
|
304
|
+
if (!defaultAgent) return customAgent;
|
|
305
|
+
return {
|
|
306
|
+
...defaultAgent,
|
|
307
|
+
...customAgent,
|
|
308
|
+
meta: customAgent.meta || defaultAgent.meta,
|
|
309
|
+
env: customAgent.env || defaultAgent.env
|
|
310
|
+
};
|
|
311
|
+
}
|
|
312
|
+
/**
|
|
313
|
+
* Load configuration from the server
|
|
314
|
+
*/
|
|
315
|
+
async function loadConfig() {
|
|
316
|
+
if (configCache) return configCache;
|
|
317
|
+
if (configPromise) return configPromise;
|
|
318
|
+
const baseUrl = getDevServerBaseUrl();
|
|
319
|
+
configPromise = fetch(`${baseUrl}/__inspector__/config.json`).then((res) => res.json()).then((config) => {
|
|
320
|
+
configCache = config;
|
|
321
|
+
return config;
|
|
322
|
+
}).catch((err) => {
|
|
323
|
+
console.warn("[Inspector] Failed to load config:", err);
|
|
324
|
+
configCache = {};
|
|
325
|
+
return {};
|
|
326
|
+
}).finally(() => {
|
|
327
|
+
configPromise = null;
|
|
328
|
+
});
|
|
329
|
+
return configPromise;
|
|
330
|
+
}
|
|
331
|
+
/**
|
|
332
|
+
* Get available agents (merged with custom configuration and filtered by visibleAgents)
|
|
333
|
+
*/
|
|
334
|
+
async function getAvailableAgents() {
|
|
335
|
+
const config = await loadConfig();
|
|
336
|
+
let agents;
|
|
337
|
+
if (config.agents && config.agents.length > 0) agents = config.agents.map(mergeAgentWithDefaults);
|
|
338
|
+
else agents = AVAILABLE_AGENTS;
|
|
339
|
+
if (config.visibleAgents && config.visibleAgents.length > 0) agents = agents.filter((agent) => config.visibleAgents.includes(agent.name));
|
|
340
|
+
return agents;
|
|
341
|
+
}
|
|
342
|
+
/**
|
|
343
|
+
* Get the default agent name
|
|
344
|
+
* Falls back to DEFAULT_AGENT_NAME if configured agent doesn't exist
|
|
345
|
+
*/
|
|
346
|
+
async function getDefaultAgent() {
|
|
347
|
+
const name = (await loadConfig()).defaultAgent;
|
|
348
|
+
if (name && AVAILABLE_AGENTS.some((a) => a.name === name)) return name;
|
|
349
|
+
return DEFAULT_AGENT;
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
//#endregion
|
|
353
|
+
//#region client/hooks/useMcp.ts
|
|
354
|
+
const STORAGE_KEY = "inspector-inspection-items";
|
|
355
|
+
const INSPECTION_ID_KEY = "inspector-current-inspection-id";
|
|
356
|
+
const TIMEOUT_MS = 6e5;
|
|
357
|
+
let pendingResolve = null;
|
|
358
|
+
let pendingReject = null;
|
|
359
|
+
function clearPendingRequest() {
|
|
360
|
+
pendingResolve = null;
|
|
361
|
+
pendingReject = null;
|
|
362
|
+
}
|
|
363
|
+
function cancelPendingRequest(reason) {
|
|
364
|
+
if (pendingReject) {
|
|
365
|
+
pendingReject(new Error(reason));
|
|
366
|
+
clearPendingRequest();
|
|
367
|
+
}
|
|
368
|
+
}
|
|
369
|
+
function activateInspector() {
|
|
370
|
+
window.dispatchEvent(new CustomEvent("activate-inspector"));
|
|
371
|
+
return { success: true };
|
|
372
|
+
}
|
|
373
|
+
function createTextContent(text) {
|
|
374
|
+
return { content: [{
|
|
375
|
+
type: "text",
|
|
376
|
+
text
|
|
377
|
+
}] };
|
|
378
|
+
}
|
|
379
|
+
function createImageContent(dataUrl) {
|
|
380
|
+
return {
|
|
381
|
+
type: "image",
|
|
382
|
+
data: dataUrl.replace(/^data:image\/\w+;base64,/, ""),
|
|
383
|
+
mimeType: "image/png"
|
|
384
|
+
};
|
|
385
|
+
}
|
|
386
|
+
function formatElementInfoSimple(elementInfo) {
|
|
387
|
+
if (!elementInfo) return "";
|
|
388
|
+
const { tagName, textContent, className, id: elemId } = elementInfo;
|
|
389
|
+
return `\n**DOM Element**: \`<${tagName}${elemId ? ` id="${elemId}"` : ""}${className ? ` class="${className}"` : ""}>\` - ${textContent || "(empty)"}\n`;
|
|
390
|
+
}
|
|
391
|
+
function getAllFeedbacks() {
|
|
392
|
+
try {
|
|
393
|
+
const saved = localStorage.getItem(STORAGE_KEY);
|
|
394
|
+
const items = saved ? JSON.parse(saved) : [];
|
|
395
|
+
if (items.length === 0) return createTextContent("# No Inspection Items\n\nThe queue is empty. Use 'capture_element_context' to capture elements for investigation.");
|
|
396
|
+
const feedbackList = items.map((item, index) => {
|
|
397
|
+
const { id, sourceInfo, description, status, progress, result } = item;
|
|
398
|
+
const statusText = status === "loading" && progress ? `LOADING (${progress.completed}/${progress.total} steps)` : status.toUpperCase();
|
|
399
|
+
return `## ${index + 1}. Feedback ID: \`${id}\`
|
|
400
|
+
|
|
401
|
+
**Status**: ${statusText}
|
|
402
|
+
**File**: ${sourceInfo.file}
|
|
403
|
+
**Line**: ${sourceInfo.line}
|
|
404
|
+
**Component**: ${sourceInfo.component}
|
|
405
|
+
${formatElementInfoSimple(sourceInfo.elementInfo)}
|
|
406
|
+
**User Request**:
|
|
407
|
+
${description}
|
|
408
|
+
|
|
409
|
+
${result ? `**Result**: ${result}\n` : ""}---`;
|
|
410
|
+
}).join("\n\n");
|
|
411
|
+
const content = [{
|
|
412
|
+
type: "text",
|
|
413
|
+
text: `# Inspection Queue (${items.length} items)\n\n${feedbackList}
|
|
414
|
+
|
|
415
|
+
## How to Update
|
|
416
|
+
|
|
417
|
+
Use \`update_inspection_status\` tool to update any inspection:
|
|
418
|
+
|
|
419
|
+
\`\`\`
|
|
420
|
+
update_inspection_status({
|
|
421
|
+
inspectionId: "feedback-xxx", // Copy from above
|
|
422
|
+
status: "completed",
|
|
423
|
+
message: "Your findings here"
|
|
424
|
+
})
|
|
425
|
+
\`\`\``
|
|
426
|
+
}];
|
|
427
|
+
items.forEach((item) => {
|
|
428
|
+
if (item.selectedContext?.screenshot) content.push(createImageContent(item.selectedContext.screenshot));
|
|
429
|
+
});
|
|
430
|
+
return { content };
|
|
431
|
+
} catch {
|
|
432
|
+
return createTextContent("# Error\n\nFailed to load inspection items.");
|
|
433
|
+
}
|
|
434
|
+
}
|
|
435
|
+
function formatResult(sourceInfo, description, selectedContext) {
|
|
436
|
+
const { file, line, component, elementInfo } = sourceInfo;
|
|
437
|
+
let output = `# Element Inspection Result
|
|
438
|
+
|
|
439
|
+
## Source Code
|
|
440
|
+
- **File**: ${file}
|
|
441
|
+
- **Line**: ${line}
|
|
442
|
+
- **Component**: ${component}
|
|
443
|
+
`;
|
|
444
|
+
const includeElement = selectedContext?.includeElement !== false;
|
|
445
|
+
const includeStyles = selectedContext?.includeStyles !== false;
|
|
446
|
+
const domInfo = elementInfo && includeElement ? `
|
|
447
|
+
## DOM Element
|
|
448
|
+
\`\`\`
|
|
449
|
+
Tag: <${elementInfo.tagName}${elementInfo.id ? ` id="${elementInfo.id}"` : ""}${elementInfo.className ? ` class="${elementInfo.className}"` : ""}>
|
|
450
|
+
Text: ${elementInfo.textContent || "(empty)"}
|
|
451
|
+
DOM Path: ${elementInfo.domPath || "N/A"}
|
|
452
|
+
\`\`\`
|
|
453
|
+
|
|
454
|
+
### Position & Size
|
|
455
|
+
${elementInfo.boundingBox ? `
|
|
456
|
+
- **Position**: (${Math.round(elementInfo.boundingBox.x)}, ${Math.round(elementInfo.boundingBox.y)})
|
|
457
|
+
- **Size**: ${Math.round(elementInfo.boundingBox.width)}px × ${Math.round(elementInfo.boundingBox.height)}px
|
|
458
|
+
` : ""}
|
|
459
|
+
|
|
460
|
+
${includeStyles && elementInfo.computedStyles ? `### Computed Styles (Key Properties)
|
|
461
|
+
|
|
462
|
+
**Layout**:
|
|
463
|
+
- display: ${elementInfo.computedStyles.layout.display}
|
|
464
|
+
- position: ${elementInfo.computedStyles.layout.position}
|
|
465
|
+
- z-index: ${elementInfo.computedStyles.layout.zIndex}
|
|
466
|
+
|
|
467
|
+
**Typography**:
|
|
468
|
+
- font: ${elementInfo.computedStyles.typography.fontSize} ${elementInfo.computedStyles.typography.fontFamily}
|
|
469
|
+
- color: ${elementInfo.computedStyles.typography.color}
|
|
470
|
+
- text-align: ${elementInfo.computedStyles.typography.textAlign}
|
|
471
|
+
|
|
472
|
+
**Spacing**:
|
|
473
|
+
- padding: ${elementInfo.computedStyles.spacing.padding}
|
|
474
|
+
- margin: ${elementInfo.computedStyles.spacing.margin}
|
|
475
|
+
|
|
476
|
+
**Background & Border**:
|
|
477
|
+
- background: ${elementInfo.computedStyles.background.backgroundColor}
|
|
478
|
+
- border: ${elementInfo.computedStyles.border.border}
|
|
479
|
+
- border-radius: ${elementInfo.computedStyles.border.borderRadius}
|
|
480
|
+
|
|
481
|
+
**Effects**:
|
|
482
|
+
- opacity: ${elementInfo.computedStyles.effects.opacity}
|
|
483
|
+
- box-shadow: ${elementInfo.computedStyles.effects.boxShadow || "none"}
|
|
484
|
+
- transform: ${elementInfo.computedStyles.effects.transform || "none"}
|
|
485
|
+
` : includeStyles && elementInfo.styles ? `### Legacy Styles:
|
|
486
|
+
\`\`\`css
|
|
487
|
+
display: ${elementInfo.styles?.display}
|
|
488
|
+
color: ${elementInfo.styles?.color}
|
|
489
|
+
background: ${elementInfo.styles?.backgroundColor}
|
|
490
|
+
font-size: ${elementInfo.styles?.fontSize}
|
|
491
|
+
padding: ${elementInfo.styles?.padding}
|
|
492
|
+
margin: ${elementInfo.styles?.margin}
|
|
493
|
+
\`\`\`
|
|
494
|
+
` : ""}
|
|
495
|
+
` : "";
|
|
496
|
+
output += domInfo;
|
|
497
|
+
output += `## User Request
|
|
498
|
+
${description}
|
|
499
|
+
|
|
500
|
+
`;
|
|
501
|
+
if (selectedContext?.consoleMessages && selectedContext.consoleMessages.length > 0) {
|
|
502
|
+
const messages = selectedContext.consoleMessages.map((msg) => {
|
|
503
|
+
return `- ${msg.level === "error" ? "❌" : msg.level === "warn" ? "⚠️" : "📝"} [${msg.level}] ${msg.text}`;
|
|
504
|
+
}).join("\n");
|
|
505
|
+
output += `## Console Messages (${selectedContext.consoleMessages.length})
|
|
506
|
+
${messages}
|
|
507
|
+
|
|
508
|
+
`;
|
|
509
|
+
}
|
|
510
|
+
if (selectedContext?.networkRequests && selectedContext.networkRequests.length > 0) {
|
|
511
|
+
const requests = selectedContext.networkRequests.map((req) => {
|
|
512
|
+
let entry = `### ${req.method} ${req.url}
|
|
513
|
+
- **Status**: ${req.status}
|
|
514
|
+
`;
|
|
515
|
+
if (req.details && req.details !== "(expand request to load details)") entry += `
|
|
516
|
+
#### Details
|
|
517
|
+
\`\`\`
|
|
518
|
+
${req.details}
|
|
519
|
+
\`\`\`
|
|
520
|
+
`;
|
|
521
|
+
return entry;
|
|
522
|
+
}).join("\n");
|
|
523
|
+
output += `## Network Requests (${selectedContext.networkRequests.length})
|
|
524
|
+
${requests}
|
|
525
|
+
|
|
526
|
+
`;
|
|
527
|
+
}
|
|
528
|
+
output += `## Your Task
|
|
529
|
+
1. Investigate the issue using 'chrome_devtools' tool (check console logs, network requests, performance)
|
|
530
|
+
2. Use 'execute_page_script' to query element state if needed
|
|
531
|
+
3. Update status with 'update_inspection_status':
|
|
532
|
+
- "in-progress" with progress details while investigating
|
|
533
|
+
- "completed" with findings when done
|
|
534
|
+
- "failed" if unresolvable`;
|
|
535
|
+
const content = [{
|
|
536
|
+
type: "text",
|
|
537
|
+
text: output
|
|
538
|
+
}];
|
|
539
|
+
if (selectedContext?.screenshot) content.push(createImageContent(selectedContext.screenshot));
|
|
540
|
+
return { content };
|
|
541
|
+
}
|
|
542
|
+
function patchContext(args) {
|
|
543
|
+
const { code } = args;
|
|
544
|
+
if (!code || typeof code !== "string") return createTextContent("Error: Missing or invalid \"code\" parameter. Please provide JavaScript code to execute.");
|
|
545
|
+
try {
|
|
546
|
+
const result = new Function(code)();
|
|
547
|
+
let formattedResult;
|
|
548
|
+
if (result === void 0) formattedResult = "(undefined)";
|
|
549
|
+
else if (result === null) formattedResult = "(null)";
|
|
550
|
+
else if (typeof result === "object") try {
|
|
551
|
+
formattedResult = JSON.stringify(result, null, 2);
|
|
552
|
+
} catch {
|
|
553
|
+
formattedResult = `[Object: ${Object.prototype.toString.call(result)}]`;
|
|
554
|
+
}
|
|
555
|
+
else formattedResult = String(result);
|
|
556
|
+
return createTextContent(`${formattedResult}`);
|
|
557
|
+
} catch (error) {
|
|
558
|
+
const errorMessage = error instanceof Error ? error.message : String(error);
|
|
559
|
+
const errorStack = error instanceof Error ? error.stack : "";
|
|
560
|
+
return createTextContent(`## Error\n\`\`\`\n${errorMessage}\n\`\`\`\n\n${errorStack ? `## Stack Trace\n\`\`\`\n${errorStack}\n\`\`\`\n` : ""}\n## Suggestions\n- Check syntax errors\n- Verify element selectors exist\n- Ensure code returns a value\n- Check browser console for additional errors`);
|
|
561
|
+
}
|
|
562
|
+
}
|
|
563
|
+
function updateInspectionStatus(args) {
|
|
564
|
+
const { inspectionId: providedId, status, progress, message } = args;
|
|
565
|
+
let inspectionId = providedId || sessionStorage.getItem(INSPECTION_ID_KEY) || "";
|
|
566
|
+
if (!inspectionId) try {
|
|
567
|
+
const saved = localStorage.getItem(STORAGE_KEY);
|
|
568
|
+
const loadingItem = (saved ? JSON.parse(saved) : []).find((item) => item.status === "in-progress");
|
|
569
|
+
if (loadingItem) {
|
|
570
|
+
inspectionId = loadingItem.id;
|
|
571
|
+
sessionStorage.setItem(INSPECTION_ID_KEY, inspectionId);
|
|
572
|
+
} else return createTextContent("Error: No active inspection item found. Please use 'list_inspections' to see the queue, then provide the inspectionId parameter.");
|
|
573
|
+
} catch {
|
|
574
|
+
return createTextContent("Error: No active inspection item");
|
|
575
|
+
}
|
|
576
|
+
if (status === "deleted") try {
|
|
577
|
+
const saved = localStorage.getItem(STORAGE_KEY);
|
|
578
|
+
const filteredItems = (saved ? JSON.parse(saved) : []).filter((item) => item.id !== inspectionId);
|
|
579
|
+
localStorage.setItem(STORAGE_KEY, JSON.stringify(filteredItems));
|
|
580
|
+
sessionStorage.removeItem(INSPECTION_ID_KEY);
|
|
581
|
+
window.dispatchEvent(new CustomEvent("inspection-deleted", { detail: { inspectionId } }));
|
|
582
|
+
return createTextContent(`Inspection ${inspectionId} deleted successfully.`);
|
|
583
|
+
} catch {
|
|
584
|
+
return createTextContent("Error: Failed to delete inspection");
|
|
585
|
+
}
|
|
586
|
+
if (progress) window.dispatchEvent(new CustomEvent("plan-progress-reported", { detail: {
|
|
587
|
+
plan: { steps: progress.steps },
|
|
588
|
+
inspectionId,
|
|
589
|
+
timestamp: (/* @__PURE__ */ new Date()).toISOString()
|
|
590
|
+
} }));
|
|
591
|
+
if (status === "completed" || status === "failed") {
|
|
592
|
+
sessionStorage.removeItem(INSPECTION_ID_KEY);
|
|
593
|
+
const resultMessage = message || (status === "completed" ? "Task completed" : "Task failed");
|
|
594
|
+
window.dispatchEvent(new CustomEvent("inspection-result-received", { detail: {
|
|
595
|
+
status,
|
|
596
|
+
result: { message: resultMessage },
|
|
597
|
+
inspectionId
|
|
598
|
+
} }));
|
|
599
|
+
return createTextContent(`Inspection marked as ${status}.`);
|
|
600
|
+
} else if (status === "in-progress" && message && !progress) window.dispatchEvent(new CustomEvent("inspection-status-updated", { detail: {
|
|
601
|
+
status: "in-progress",
|
|
602
|
+
message,
|
|
603
|
+
inspectionId
|
|
604
|
+
} }));
|
|
605
|
+
return createTextContent("Status updated");
|
|
606
|
+
}
|
|
607
|
+
function useMcp() {
|
|
608
|
+
const clientRef = useRef(null);
|
|
609
|
+
const [isClientReady, setIsClientReady] = useState(false);
|
|
610
|
+
const isAutomated = navigator.webdriver;
|
|
611
|
+
useEffect(() => {
|
|
612
|
+
if (clientRef.current) return;
|
|
613
|
+
const client = createClientExecClient(new Client({
|
|
614
|
+
name: "inspector",
|
|
615
|
+
version: "0.1.0"
|
|
616
|
+
}, { capabilities: { tools: {} } }), "inspector");
|
|
617
|
+
async function inspectElement(args) {
|
|
618
|
+
if (args?.automated) {
|
|
619
|
+
activateInspector();
|
|
620
|
+
if (isAutomated) return createTextContent(`Inspector activated. Click the target element to auto-capture.
|
|
621
|
+
|
|
622
|
+
**Available tools**:
|
|
623
|
+
- chrome_take_snapshot: See the page visually
|
|
624
|
+
- chrome_click: Click element via browser automation
|
|
625
|
+
|
|
626
|
+
After clicking, use \`list_inspections\` to view the captured element with full context (DOM, styles, source).`);
|
|
627
|
+
else return createTextContent(`Inspector activated. Click the target element to auto-capture.
|
|
628
|
+
|
|
629
|
+
**Available tool**:
|
|
630
|
+
- execute_page_script: Find the target element on the page, then trigger a click programmatically
|
|
631
|
+
|
|
632
|
+
After clicking, use \`list_inspections\` to view the captured element with full context (DOM, styles, source).`);
|
|
633
|
+
}
|
|
634
|
+
cancelPendingRequest("New inspect request started");
|
|
635
|
+
activateInspector();
|
|
636
|
+
return new Promise((resolve, reject) => {
|
|
637
|
+
pendingResolve = resolve;
|
|
638
|
+
pendingReject = reject;
|
|
639
|
+
setTimeout(() => {
|
|
640
|
+
if (pendingReject === reject) {
|
|
641
|
+
clearPendingRequest();
|
|
642
|
+
reject(/* @__PURE__ */ new Error("Timeout: No element selected"));
|
|
643
|
+
}
|
|
644
|
+
}, TIMEOUT_MS);
|
|
645
|
+
});
|
|
646
|
+
}
|
|
647
|
+
function handleElementInspected(event) {
|
|
648
|
+
if (!pendingResolve) return;
|
|
649
|
+
const { inspections } = event.detail;
|
|
650
|
+
if (!inspections || !Array.isArray(inspections) || inspections.length === 0) {
|
|
651
|
+
pendingReject?.(/* @__PURE__ */ new Error("No inspections received"));
|
|
652
|
+
clearPendingRequest();
|
|
653
|
+
return;
|
|
654
|
+
}
|
|
655
|
+
const lastInspection = inspections[inspections.length - 1];
|
|
656
|
+
sessionStorage.setItem(INSPECTION_ID_KEY, lastInspection.id);
|
|
657
|
+
const results = inspections.map((item) => formatResult(item.sourceInfo, item.description, item.selectedContext));
|
|
658
|
+
if (results.length === 1) pendingResolve(results[0]);
|
|
659
|
+
else {
|
|
660
|
+
const combinedText = inspections.map((item, index) => {
|
|
661
|
+
const { sourceInfo, description } = item;
|
|
662
|
+
return `## Inspection ${index + 1}\n\n**File**: ${sourceInfo.file}:${sourceInfo.line}:${sourceInfo.column}\n**Component**: ${sourceInfo.component}\n\n**User Request**:\n${description}\n\n${formatElementInfoSimple(sourceInfo.elementInfo)}`;
|
|
663
|
+
}).join("\n\n---\n\n");
|
|
664
|
+
pendingResolve(createTextContent(`# ${inspections.length} Elements Inspected\n\n${combinedText}`));
|
|
665
|
+
}
|
|
666
|
+
clearPendingRequest();
|
|
667
|
+
}
|
|
668
|
+
function handleInspectorCancelled() {
|
|
669
|
+
sessionStorage.removeItem(INSPECTION_ID_KEY);
|
|
670
|
+
cancelPendingRequest("Inspector cancelled by user");
|
|
671
|
+
}
|
|
672
|
+
const eventHandlers = [{
|
|
673
|
+
event: "element-inspected",
|
|
674
|
+
handler: handleElementInspected
|
|
675
|
+
}, {
|
|
676
|
+
event: "inspector-cancelled",
|
|
677
|
+
handler: handleInspectorCancelled
|
|
678
|
+
}];
|
|
679
|
+
eventHandlers.forEach(({ event, handler }) => {
|
|
680
|
+
window.addEventListener(event, handler);
|
|
681
|
+
});
|
|
682
|
+
const builtInTools = [
|
|
683
|
+
{
|
|
684
|
+
...TOOL_SCHEMAS.list_inspections,
|
|
685
|
+
implementation: getAllFeedbacks
|
|
686
|
+
},
|
|
687
|
+
{
|
|
688
|
+
...TOOL_SCHEMAS.capture_element_context,
|
|
689
|
+
implementation: inspectElement
|
|
690
|
+
},
|
|
691
|
+
{
|
|
692
|
+
...TOOL_SCHEMAS.update_inspection_status,
|
|
693
|
+
implementation: updateInspectionStatus
|
|
694
|
+
},
|
|
695
|
+
{
|
|
696
|
+
...TOOL_SCHEMAS.execute_page_script,
|
|
697
|
+
implementation: patchContext
|
|
698
|
+
}
|
|
699
|
+
];
|
|
700
|
+
const getCustomTools = () => {
|
|
701
|
+
const getTools = window.__getInspectorTools;
|
|
702
|
+
if (!getTools) return [];
|
|
703
|
+
return getTools().map((tool) => ({
|
|
704
|
+
name: tool.name,
|
|
705
|
+
description: tool.description,
|
|
706
|
+
inputSchema: tool.inputSchema,
|
|
707
|
+
implementation: async (args) => {
|
|
708
|
+
try {
|
|
709
|
+
const result = await tool.implementation(args);
|
|
710
|
+
if (result === void 0 || result === null) return createTextContent("(no result)");
|
|
711
|
+
if (typeof result === "object") {
|
|
712
|
+
if ("content" in result && Array.isArray(result.content)) return result;
|
|
713
|
+
return createTextContent(JSON.stringify(result, null, 2));
|
|
714
|
+
}
|
|
715
|
+
return createTextContent(String(result));
|
|
716
|
+
} catch (error) {
|
|
717
|
+
const errorMessage = error instanceof Error ? error.message : String(error);
|
|
718
|
+
const errorStack = error instanceof Error ? error.stack : "";
|
|
719
|
+
return createTextContent(`# Error executing ${tool.name}\n\n\`\`\`\n${errorMessage}\n\`\`\`\n\n${errorStack ? `## Stack Trace\n\`\`\`\n${errorStack}\n\`\`\`\n` : ""}`);
|
|
720
|
+
}
|
|
721
|
+
}
|
|
722
|
+
}));
|
|
723
|
+
};
|
|
724
|
+
const customTools = getCustomTools();
|
|
725
|
+
const allTools = [...builtInTools, ...customTools];
|
|
726
|
+
client.registerTools(allTools);
|
|
727
|
+
if (customTools.length > 0) console.log(`[dev-inspector] Registered ${customTools.length} custom tool(s):`, customTools.map((t) => t.name).join(", "));
|
|
728
|
+
const transport = new SSEClientTransport(new URL(`/__mcp__/sse?clientId=inspector&isAutomated=${isAutomated}`, getDevServerBaseUrl()));
|
|
729
|
+
client.connect(transport).then(() => {
|
|
730
|
+
clientRef.current = client;
|
|
731
|
+
setIsClientReady(true);
|
|
732
|
+
}).catch((err) => {
|
|
733
|
+
console.error("MCP connection error:", err);
|
|
734
|
+
});
|
|
735
|
+
return () => {
|
|
736
|
+
eventHandlers.forEach(({ event, handler }) => {
|
|
737
|
+
window.removeEventListener(event, handler);
|
|
738
|
+
});
|
|
739
|
+
transport.close?.();
|
|
740
|
+
};
|
|
741
|
+
}, []);
|
|
742
|
+
return {
|
|
743
|
+
client: clientRef.current,
|
|
744
|
+
isClientReady
|
|
745
|
+
};
|
|
746
|
+
}
|
|
747
|
+
|
|
748
|
+
//#endregion
|
|
749
|
+
//#region client/hooks/useAgent.ts
|
|
750
|
+
const AGENT_STORAGE_KEY = "AI_SELECTED_AGENT";
|
|
751
|
+
const useAgent = (defaultAgent) => {
|
|
752
|
+
const [agent, setAgentState] = useState(() => {
|
|
753
|
+
if (typeof window !== "undefined") {
|
|
754
|
+
const saved = localStorage.getItem(AGENT_STORAGE_KEY);
|
|
755
|
+
if (saved) return saved;
|
|
756
|
+
}
|
|
757
|
+
return defaultAgent;
|
|
758
|
+
});
|
|
759
|
+
const [isReady, setIsReady] = useState(false);
|
|
760
|
+
useEffect(() => {
|
|
761
|
+
if (typeof window !== "undefined") getDefaultAgent().then((configDefault) => {
|
|
762
|
+
if (configDefault && configDefault !== DEFAULT_AGENT) setAgentState(configDefault);
|
|
763
|
+
}).finally(() => {
|
|
764
|
+
setIsReady(true);
|
|
765
|
+
});
|
|
766
|
+
else setIsReady(true);
|
|
767
|
+
}, []);
|
|
768
|
+
const setAgent = (newAgent) => {
|
|
769
|
+
setAgentState(newAgent);
|
|
770
|
+
if (typeof window === "undefined") return;
|
|
771
|
+
if (newAgent?.trim()) localStorage.setItem(AGENT_STORAGE_KEY, newAgent);
|
|
772
|
+
else localStorage.removeItem(AGENT_STORAGE_KEY);
|
|
773
|
+
};
|
|
774
|
+
return {
|
|
775
|
+
agent,
|
|
776
|
+
setAgent,
|
|
777
|
+
isReady
|
|
778
|
+
};
|
|
779
|
+
};
|
|
780
|
+
|
|
781
|
+
//#endregion
|
|
782
|
+
//#region client/hooks/usePrompts.ts
|
|
783
|
+
function usePrompts(mcpClient) {
|
|
784
|
+
const [prompts, setPrompts] = useState([]);
|
|
785
|
+
const [isLoading, setIsLoading] = useState(false);
|
|
786
|
+
useEffect(() => {
|
|
787
|
+
let mounted = true;
|
|
788
|
+
const fetchPrompts = async () => {
|
|
789
|
+
if (!mcpClient) {
|
|
790
|
+
if (mounted) setPrompts([]);
|
|
791
|
+
return;
|
|
792
|
+
}
|
|
793
|
+
setIsLoading(true);
|
|
794
|
+
try {
|
|
795
|
+
const result = await mcpClient.request({ method: "prompts/list" }, ListPromptsResultSchema);
|
|
796
|
+
if (mounted && result.prompts) setPrompts(result.prompts);
|
|
797
|
+
} catch (err) {
|
|
798
|
+
console.error("[usePrompts] Error loading prompts:", err);
|
|
799
|
+
} finally {
|
|
800
|
+
if (mounted) setIsLoading(false);
|
|
801
|
+
}
|
|
802
|
+
};
|
|
803
|
+
fetchPrompts();
|
|
804
|
+
if (mcpClient) mcpClient.setNotificationHandler(PromptListChangedNotificationSchema, async () => {
|
|
805
|
+
console.log("[usePrompts] Received prompts/list_changed notification");
|
|
806
|
+
await fetchPrompts();
|
|
807
|
+
});
|
|
808
|
+
return () => {
|
|
809
|
+
mounted = false;
|
|
810
|
+
try {
|
|
811
|
+
if (mcpClient) mcpClient.removeNotificationHandler("notifications/prompts/list_changed");
|
|
812
|
+
} catch (e) {}
|
|
813
|
+
};
|
|
814
|
+
}, [mcpClient]);
|
|
815
|
+
return {
|
|
816
|
+
prompts,
|
|
817
|
+
isLoading
|
|
818
|
+
};
|
|
819
|
+
}
|
|
820
|
+
|
|
821
|
+
//#endregion
|
|
822
|
+
//#region client/hooks/useContextData.ts
|
|
823
|
+
/**
|
|
824
|
+
* Hook to fetch and manage context data from chrome_devtools MCP tool
|
|
825
|
+
* @param client - MCP client instance (passed from useMcp hook in parent component)
|
|
826
|
+
* @param isClientReady - whether the client is ready
|
|
827
|
+
* @param isEnabled - whether to enable data fetching (default: true)
|
|
828
|
+
*/
|
|
829
|
+
function useContextData(client, isClientReady, isEnabled = true) {
|
|
830
|
+
const [data, setData] = useState({
|
|
831
|
+
consoleMessages: [],
|
|
832
|
+
networkRequests: [],
|
|
833
|
+
stdioMessages: [],
|
|
834
|
+
loading: false,
|
|
835
|
+
error: null
|
|
836
|
+
});
|
|
837
|
+
const fetchContextData = useCallback(async () => {
|
|
838
|
+
if (!isEnabled) return;
|
|
839
|
+
if (!client || !isClientReady) {
|
|
840
|
+
setData((prev) => ({
|
|
841
|
+
...prev,
|
|
842
|
+
error: "MCP client not ready"
|
|
843
|
+
}));
|
|
844
|
+
return;
|
|
845
|
+
}
|
|
846
|
+
setData((prev) => ({
|
|
847
|
+
...prev,
|
|
848
|
+
loading: true,
|
|
849
|
+
error: null
|
|
850
|
+
}));
|
|
851
|
+
try {
|
|
852
|
+
let consoleText = "";
|
|
853
|
+
let networkText = "";
|
|
854
|
+
let stdioMessagesOrEmpty = [];
|
|
855
|
+
try {
|
|
856
|
+
const consoleResult = await client.callTool({
|
|
857
|
+
name: "chrome_devtools",
|
|
858
|
+
arguments: {
|
|
859
|
+
useTool: "chrome_list_console_messages",
|
|
860
|
+
hasDefinitions: ["chrome_list_console_messages"],
|
|
861
|
+
chrome_list_console_messages: {}
|
|
862
|
+
}
|
|
863
|
+
});
|
|
864
|
+
const networkResult = await client.callTool({
|
|
865
|
+
name: "chrome_devtools",
|
|
866
|
+
arguments: {
|
|
867
|
+
useTool: "chrome_list_network_requests",
|
|
868
|
+
hasDefinitions: ["chrome_list_network_requests"],
|
|
869
|
+
chrome_list_network_requests: {}
|
|
870
|
+
}
|
|
871
|
+
});
|
|
872
|
+
consoleText = (consoleResult?.content)?.map((item) => item.text).join("\n") || "";
|
|
873
|
+
networkText = (networkResult?.content)?.map((item) => item.text).join("\n") || "";
|
|
874
|
+
} catch (e) {
|
|
875
|
+
try {
|
|
876
|
+
const consolePrompt = await client.getPrompt({ name: "get_console_messages" });
|
|
877
|
+
const networkPrompt = await client.getPrompt({ name: "get_network_requests" });
|
|
878
|
+
const consoleMsg = consolePrompt.messages[0]?.content;
|
|
879
|
+
const networkMsg = networkPrompt.messages[0]?.content;
|
|
880
|
+
const fullText = (consoleMsg?.type === "text" ? consoleMsg.text : "") + "\n" + (networkMsg?.type === "text" ? networkMsg.text : "");
|
|
881
|
+
consoleText = fullText;
|
|
882
|
+
networkText = fullText;
|
|
883
|
+
} catch (promptError) {
|
|
884
|
+
console.error("[useContextData] Prompts fallback failed:", promptError);
|
|
885
|
+
throw e;
|
|
886
|
+
}
|
|
887
|
+
}
|
|
888
|
+
try {
|
|
889
|
+
const config = typeof window !== "undefined" ? window.__DEV_INSPECTOR_CONFIG__ : null;
|
|
890
|
+
let baseUrl = "";
|
|
891
|
+
if (config) {
|
|
892
|
+
baseUrl = config.baseUrl || `http://${config.host}:${config.port}${config.base || "/"}`;
|
|
893
|
+
if (baseUrl.endsWith("/")) baseUrl = baseUrl.slice(0, -1);
|
|
894
|
+
}
|
|
895
|
+
const res = await fetch(`${baseUrl}/__inspector__/stdio`);
|
|
896
|
+
if (res.ok) stdioMessagesOrEmpty = (await res.json()).map((log) => ({
|
|
897
|
+
stdioid: log.id,
|
|
898
|
+
stream: log.stream,
|
|
899
|
+
data: log.data
|
|
900
|
+
})).reverse();
|
|
901
|
+
} catch (e) {
|
|
902
|
+
console.warn("[useContextData] Failed to fetch stdio messages:", e);
|
|
903
|
+
}
|
|
904
|
+
setData({
|
|
905
|
+
consoleMessages: parseConsoleMessages(consoleText),
|
|
906
|
+
networkRequests: parseNetworkRequests(networkText),
|
|
907
|
+
stdioMessages: stdioMessagesOrEmpty,
|
|
908
|
+
loading: false,
|
|
909
|
+
error: null
|
|
910
|
+
});
|
|
911
|
+
} catch (error) {
|
|
912
|
+
console.error("[useContextData] Failed to fetch context data:", error);
|
|
913
|
+
setData((prev) => ({
|
|
914
|
+
...prev,
|
|
915
|
+
loading: false,
|
|
916
|
+
error: error instanceof Error ? error.message : String(error)
|
|
917
|
+
}));
|
|
918
|
+
}
|
|
919
|
+
}, [client, isClientReady]);
|
|
920
|
+
return {
|
|
921
|
+
...data,
|
|
922
|
+
refresh: fetchContextData
|
|
923
|
+
};
|
|
924
|
+
}
|
|
925
|
+
/**
|
|
926
|
+
* Parse console messages from MCP response text
|
|
927
|
+
* Format: msgid=123 [level] message text
|
|
928
|
+
*/
|
|
929
|
+
function parseConsoleMessages(text) {
|
|
930
|
+
if (!text) return [];
|
|
931
|
+
const messages = [];
|
|
932
|
+
const lines = text.split("\n");
|
|
933
|
+
for (const line of lines) {
|
|
934
|
+
const match = line.match(/msgid=(\d+)\s+\[([^\]]+)\]\s+(.+)/);
|
|
935
|
+
if (match) {
|
|
936
|
+
const [, msgid, level, messageText] = match;
|
|
937
|
+
messages.push({
|
|
938
|
+
msgid: parseInt(msgid),
|
|
939
|
+
level,
|
|
940
|
+
text: messageText
|
|
941
|
+
});
|
|
942
|
+
}
|
|
943
|
+
}
|
|
944
|
+
return messages;
|
|
945
|
+
}
|
|
946
|
+
/**
|
|
947
|
+
* Parse network requests from MCP response text
|
|
948
|
+
* Format: reqid=123 METHOD url [status]
|
|
949
|
+
*/
|
|
950
|
+
function parseNetworkRequests(text) {
|
|
951
|
+
if (!text) return [];
|
|
952
|
+
const requests = [];
|
|
953
|
+
const lines = text.split("\n");
|
|
954
|
+
for (const line of lines) {
|
|
955
|
+
const match = line.match(/reqid=(\d+)\s+(GET|POST|PUT|DELETE|PATCH)\s+([^\s]+)\s+\[([^\]]+)\]/);
|
|
956
|
+
if (match) {
|
|
957
|
+
const [, reqid, method, url, status] = match;
|
|
958
|
+
requests.push({
|
|
959
|
+
reqid: parseInt(reqid),
|
|
960
|
+
method,
|
|
961
|
+
url,
|
|
962
|
+
status: normalizeStatus(status)
|
|
963
|
+
});
|
|
964
|
+
}
|
|
965
|
+
}
|
|
966
|
+
return requests;
|
|
967
|
+
}
|
|
968
|
+
/**
|
|
969
|
+
* Normalize status text for display - extract only the status code
|
|
970
|
+
* KISS: Show "304" instead of "failed - 304"
|
|
971
|
+
*/
|
|
972
|
+
function normalizeStatus(status) {
|
|
973
|
+
const codeMatch = status.match(/\b(\d{3})\b/);
|
|
974
|
+
return codeMatch ? codeMatch[1] : status;
|
|
975
|
+
}
|
|
976
|
+
|
|
977
|
+
//#endregion
|
|
978
|
+
//#region client/utils/messageProcessor.ts
|
|
979
|
+
/**
|
|
980
|
+
* Extract display text from a message
|
|
981
|
+
*/
|
|
982
|
+
function extractDisplayText(message) {
|
|
983
|
+
let text = "";
|
|
984
|
+
if ("parts" in message && Array.isArray(message.parts)) {
|
|
985
|
+
for (const messagePart of message.parts) if (messagePart.type === "text" && "text" in messagePart && typeof messagePart.text === "string") text += messagePart.text;
|
|
986
|
+
} else if ("content" in message && typeof message.content === "string") text = message.content;
|
|
987
|
+
else if ("text" in message && typeof message.text === "string") text = message.text;
|
|
988
|
+
return text;
|
|
989
|
+
}
|
|
990
|
+
/**
|
|
991
|
+
* Extract tool output/result from a message
|
|
992
|
+
* Only returns tool output if it's the most recent content (no text after it)
|
|
993
|
+
*/
|
|
994
|
+
function extractToolOutput(message) {
|
|
995
|
+
if (!("parts" in message) || !Array.isArray(message.parts)) return null;
|
|
996
|
+
let toolOutput = null;
|
|
997
|
+
let hasTextAfterTool = false;
|
|
998
|
+
for (const part of message.parts) {
|
|
999
|
+
if (toolOutput && part.type === "text" && "text" in part && typeof part.text === "string" && part.text.trim()) {
|
|
1000
|
+
hasTextAfterTool = true;
|
|
1001
|
+
toolOutput = null;
|
|
1002
|
+
break;
|
|
1003
|
+
}
|
|
1004
|
+
if (part.type === "tool-result" && "result" in part) {
|
|
1005
|
+
const result = part.result;
|
|
1006
|
+
if (typeof result === "string") {
|
|
1007
|
+
toolOutput = result;
|
|
1008
|
+
continue;
|
|
1009
|
+
}
|
|
1010
|
+
if (result && typeof result === "object") {
|
|
1011
|
+
if ("text" in result && typeof result.text === "string") {
|
|
1012
|
+
toolOutput = result.text;
|
|
1013
|
+
continue;
|
|
1014
|
+
}
|
|
1015
|
+
if (Array.isArray(result) && result.length > 0) {
|
|
1016
|
+
const firstItem = result[0];
|
|
1017
|
+
if (firstItem && typeof firstItem === "object" && "content" in firstItem) {
|
|
1018
|
+
const content = firstItem.content;
|
|
1019
|
+
if (content && typeof content === "object" && "text" in content && typeof content.text === "string") {
|
|
1020
|
+
toolOutput = content.text;
|
|
1021
|
+
continue;
|
|
1022
|
+
}
|
|
1023
|
+
}
|
|
1024
|
+
}
|
|
1025
|
+
}
|
|
1026
|
+
}
|
|
1027
|
+
if (part.type === "tool-acp.acp_provider_agent_dynamic_tool" && "output" in part && Array.isArray(part.output)) {
|
|
1028
|
+
const output = part.output;
|
|
1029
|
+
if (output.length > 0) {
|
|
1030
|
+
const firstItem = output[0];
|
|
1031
|
+
if (firstItem && typeof firstItem === "object" && "content" in firstItem) {
|
|
1032
|
+
const content = firstItem.content;
|
|
1033
|
+
if (content && typeof content === "object" && "text" in content && typeof content.text === "string") {
|
|
1034
|
+
toolOutput = content.text;
|
|
1035
|
+
continue;
|
|
1036
|
+
}
|
|
1037
|
+
}
|
|
1038
|
+
}
|
|
1039
|
+
}
|
|
1040
|
+
}
|
|
1041
|
+
return hasTextAfterTool ? null : toolOutput;
|
|
1042
|
+
}
|
|
1043
|
+
/**
|
|
1044
|
+
* Extract tool call name from a message
|
|
1045
|
+
* Returns the LAST active tool (input-available state) found in the message parts
|
|
1046
|
+
* Returns null if there's text content after the tool (indicating tool is done)
|
|
1047
|
+
*/
|
|
1048
|
+
function extractToolCall(message, currentTool) {
|
|
1049
|
+
if ("parts" in message && Array.isArray(message.parts)) {
|
|
1050
|
+
let foundActiveToolCall = null;
|
|
1051
|
+
let lastToolIndex = -1;
|
|
1052
|
+
for (let i = message.parts.length - 1; i >= 0; i--) {
|
|
1053
|
+
const part = message.parts[i];
|
|
1054
|
+
if (part.type === "tool-acp.acp_provider_agent_dynamic_tool") {
|
|
1055
|
+
if (("state" in part ? part.state : null) === "input-available") {
|
|
1056
|
+
if ("input" in part && typeof part.input === "object" && part.input !== null && "toolName" in part.input) {
|
|
1057
|
+
foundActiveToolCall = part.input.toolName;
|
|
1058
|
+
lastToolIndex = i;
|
|
1059
|
+
}
|
|
1060
|
+
}
|
|
1061
|
+
break;
|
|
1062
|
+
}
|
|
1063
|
+
if (part.type === "tool-call" && "toolName" in part && typeof part.toolName === "string") {
|
|
1064
|
+
foundActiveToolCall = part.toolName;
|
|
1065
|
+
lastToolIndex = i;
|
|
1066
|
+
break;
|
|
1067
|
+
}
|
|
1068
|
+
}
|
|
1069
|
+
if (foundActiveToolCall && lastToolIndex !== -1) {
|
|
1070
|
+
for (let i = lastToolIndex + 1; i < message.parts.length; i++) {
|
|
1071
|
+
const part = message.parts[i];
|
|
1072
|
+
if (part.type === "text" && "text" in part && typeof part.text === "string" && part.text.trim()) return null;
|
|
1073
|
+
if (part.type === "tool-result") return null;
|
|
1074
|
+
}
|
|
1075
|
+
return foundActiveToolCall;
|
|
1076
|
+
}
|
|
1077
|
+
return null;
|
|
1078
|
+
}
|
|
1079
|
+
if (currentTool) return currentTool;
|
|
1080
|
+
if ("toolInvocations" in message && Array.isArray(message.toolInvocations) && message.toolInvocations.length > 0) {
|
|
1081
|
+
const lastTool = message.toolInvocations[message.toolInvocations.length - 1];
|
|
1082
|
+
if (typeof lastTool === "object" && lastTool !== null && "toolName" in lastTool && typeof lastTool.toolName === "string") return lastTool.toolName;
|
|
1083
|
+
}
|
|
1084
|
+
return null;
|
|
1085
|
+
}
|
|
1086
|
+
/**
|
|
1087
|
+
* Extract the LATEST tool name from the message components.
|
|
1088
|
+
* Returns null if the latest component is non-empty text (indicating the tool is done or text is more recent).
|
|
1089
|
+
*/
|
|
1090
|
+
function extractLatestToolName(message) {
|
|
1091
|
+
if (!("parts" in message) || !Array.isArray(message.parts)) return null;
|
|
1092
|
+
for (let i = message.parts.length - 1; i >= 0; i--) {
|
|
1093
|
+
const part = message.parts[i];
|
|
1094
|
+
if (part.type === "tool-call" && "toolName" in part && typeof part.toolName === "string") return part.toolName;
|
|
1095
|
+
if (typeof part.type === "string" && part.type.startsWith("tool-")) {
|
|
1096
|
+
if ("input" in part && typeof part.input === "object" && part.input !== null && "toolName" in part.input && typeof part.input.toolName === "string") return part.input.toolName;
|
|
1097
|
+
if ("toolName" in part && typeof part.toolName === "string") return part.toolName;
|
|
1098
|
+
}
|
|
1099
|
+
if (part.type === "text" && "text" in part && typeof part.text === "string") {
|
|
1100
|
+
if (part.text.trim().length > 0) return null;
|
|
1101
|
+
continue;
|
|
1102
|
+
}
|
|
1103
|
+
if (part.type === "tool-result") return null;
|
|
1104
|
+
}
|
|
1105
|
+
return null;
|
|
1106
|
+
}
|
|
1107
|
+
/**
|
|
1108
|
+
* Process a message and extract all relevant information
|
|
1109
|
+
*/
|
|
1110
|
+
function processMessage(message, currentTool) {
|
|
1111
|
+
return {
|
|
1112
|
+
displayText: extractDisplayText(message),
|
|
1113
|
+
toolOutput: extractToolOutput(message),
|
|
1114
|
+
toolCall: extractToolCall(message, currentTool)
|
|
1115
|
+
};
|
|
1116
|
+
}
|
|
1117
|
+
|
|
1118
|
+
//#endregion
|
|
1119
|
+
//#region client/hooks/useIslandState.ts
|
|
1120
|
+
/**
|
|
1121
|
+
* Derives the Dynamic Island state from AI SDK messages and status
|
|
1122
|
+
*/
|
|
1123
|
+
function useIslandState(messages, status, isExpanded) {
|
|
1124
|
+
return useMemo(() => {
|
|
1125
|
+
const lastMessage = messages[messages.length - 1];
|
|
1126
|
+
const isStreaming = status === "streaming";
|
|
1127
|
+
let toolName = null;
|
|
1128
|
+
let displayText = "";
|
|
1129
|
+
if (lastMessage && lastMessage.role === "assistant") {
|
|
1130
|
+
displayText = processMessage(lastMessage).displayText;
|
|
1131
|
+
toolName = extractLatestToolName(lastMessage);
|
|
1132
|
+
}
|
|
1133
|
+
return {
|
|
1134
|
+
uiState: isExpanded ? "expanded" : "collapsed",
|
|
1135
|
+
chatStatus: status,
|
|
1136
|
+
toolName,
|
|
1137
|
+
displayText,
|
|
1138
|
+
isStreaming,
|
|
1139
|
+
lastMessage
|
|
1140
|
+
};
|
|
1141
|
+
}, [
|
|
1142
|
+
messages,
|
|
1143
|
+
status,
|
|
1144
|
+
isExpanded
|
|
1145
|
+
]);
|
|
1146
|
+
}
|
|
1147
|
+
|
|
1148
|
+
//#endregion
|
|
1149
|
+
//#region client/hooks/usePageInfo.ts
|
|
1150
|
+
/**
|
|
1151
|
+
* Hook to capture current page information
|
|
1152
|
+
* KISS: Captures only essential page context (URL, title, viewport, language)
|
|
1153
|
+
*/
|
|
1154
|
+
function usePageInfo() {
|
|
1155
|
+
const [pageInfo, setPageInfo] = useState(null);
|
|
1156
|
+
useEffect(() => {
|
|
1157
|
+
const capturePageInfo = () => ({
|
|
1158
|
+
url: window.location.href,
|
|
1159
|
+
title: document.title,
|
|
1160
|
+
viewport: {
|
|
1161
|
+
width: window.innerWidth,
|
|
1162
|
+
height: window.innerHeight
|
|
1163
|
+
},
|
|
1164
|
+
language: document.documentElement.lang || navigator.language
|
|
1165
|
+
});
|
|
1166
|
+
setPageInfo(capturePageInfo());
|
|
1167
|
+
const handleResize = () => setPageInfo(capturePageInfo());
|
|
1168
|
+
window.addEventListener("resize", handleResize);
|
|
1169
|
+
return () => {
|
|
1170
|
+
window.removeEventListener("resize", handleResize);
|
|
1171
|
+
};
|
|
1172
|
+
}, []);
|
|
1173
|
+
return pageInfo;
|
|
1174
|
+
}
|
|
1175
|
+
|
|
1176
|
+
//#endregion
|
|
1177
|
+
export { getAvailableAgents, getDevServerBaseUrl, useAgent, useContextData, useIslandState, useMcp, usePageInfo, usePrompts };
|