@mcp-use/inspector 0.22.1 → 0.22.2
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/dist/cdn/inspector.css +1 -1
- package/dist/cdn/inspector.js +26547 -26379
- package/dist/cli.js +6 -2
- package/dist/client/components/ChatTab.d.ts.map +1 -1
- package/dist/client/components/MCPAppsRenderer.d.ts.map +1 -1
- package/dist/client/components/OpenAIComponentRenderer.d.ts.map +1 -1
- package/dist/client/components/chat/ChatInput.d.ts +5 -1
- package/dist/client/components/chat/ChatInput.d.ts.map +1 -1
- package/dist/client/components/chat/ChatInputArea.d.ts +5 -1
- package/dist/client/components/chat/ChatInputArea.d.ts.map +1 -1
- package/dist/client/components/chat/ChatLandingForm.d.ts +5 -1
- package/dist/client/components/chat/ChatLandingForm.d.ts.map +1 -1
- package/dist/client/components/chat/ToolSelector.d.ts +13 -0
- package/dist/client/components/chat/ToolSelector.d.ts.map +1 -0
- package/dist/client/components/chat/useChatMessagesClientSide.d.ts +2 -1
- package/dist/client/components/chat/useChatMessagesClientSide.d.ts.map +1 -1
- package/dist/client/index.js +591 -402
- package/dist/server/{chunk-HOSWJXPT.js → chunk-IZPEEN7F.js} +6 -2
- package/dist/server/{chunk-CE5BNX35.js → chunk-JNAYXSVD.js} +1 -1
- package/dist/server/{chunk-N6DUXBZK.js → chunk-YF6BUSE7.js} +1 -1
- package/dist/server/cli.js +2 -2
- package/dist/server/index.js +3 -3
- package/dist/server/middleware.js +3 -3
- package/dist/server/server.js +2 -2
- package/dist/server/shared-routes.js +2 -2
- package/dist/server/shared-utils.d.ts.map +1 -1
- package/dist/server/shared-utils.js +1 -1
- package/dist/web/assets/{1c-CuB6KJny.js → 1c-DdyTu-k_.js} +1 -1
- package/dist/web/assets/{abnf-331NRzq6.js → abnf-C2DLuWsJ.js} +1 -1
- package/dist/web/assets/{accesslog-DPZ1SVBF.js → accesslog-BcPmBnek.js} +1 -1
- package/dist/web/assets/{actionscript-CuGZR-oV.js → actionscript-BX-T-H0r.js} +1 -1
- package/dist/web/assets/{ada-DRqvTj3B.js → ada-bFUa8rWB.js} +1 -1
- package/dist/web/assets/{angelscript-CP2_ypHm.js → angelscript--QyowWyi.js} +1 -1
- package/dist/web/assets/{apache-DP5S1Xwo.js → apache-CSPxjWTM.js} +1 -1
- package/dist/web/assets/{applescript-CLh7Bl5g.js → applescript-Beh8nYPj.js} +1 -1
- package/dist/web/assets/{arcade-L7ZIK7Vg.js → arcade-7vaiax_h.js} +1 -1
- package/dist/web/assets/{arduino-D38C-BRe.js → arduino-D67F76RP.js} +1 -1
- package/dist/web/assets/{armasm-BL0z-zkV.js → armasm-DWQZh6t7.js} +1 -1
- package/dist/web/assets/{asciidoc-BwOqzYyI.js → asciidoc-DCLwNk1M.js} +1 -1
- package/dist/web/assets/{aspectj-CsfF5uHW.js → aspectj-C7zkyhZG.js} +1 -1
- package/dist/web/assets/{autohotkey-BnfF2slP.js → autohotkey-D67jHa54.js} +1 -1
- package/dist/web/assets/{autoit-BUNufrnh.js → autoit-YshTFaZR.js} +1 -1
- package/dist/web/assets/{avrasm-BUwC6GGa.js → avrasm-QFQOAcRR.js} +1 -1
- package/dist/web/assets/{awk-BAn6DoRI.js → awk-h3G4tOxj.js} +1 -1
- package/dist/web/assets/{axapta-C5EQhsWz.js → axapta-Ck2tuXpL.js} +1 -1
- package/dist/web/assets/{bash-CXJ0QYm_.js → bash-SNro2FI9.js} +1 -1
- package/dist/web/assets/{basic-8InlTbNb.js → basic-CdFIzr_S.js} +1 -1
- package/dist/web/assets/{bnf-zpEK5Wju.js → bnf-CoDF7W_1.js} +1 -1
- package/dist/web/assets/{brainfuck-BhgAAx-v.js → brainfuck-Bt-q8Sif.js} +1 -1
- package/dist/web/assets/{c-CDPkc2Ya.js → c-CSy1LJEc.js} +1 -1
- package/dist/web/assets/{c-like-Ds21bDLY.js → c-like-CgJH8TzM.js} +1 -1
- package/dist/web/assets/{cal-DWpElLgG.js → cal-BN4ZaGC3.js} +1 -1
- package/dist/web/assets/{capnproto-96me6T8-.js → capnproto-DtQwy4ia.js} +1 -1
- package/dist/web/assets/{ceylon-Eu9VMqL5.js → ceylon-rt4387UK.js} +1 -1
- package/dist/web/assets/{clean-Bw3NaeUf.js → clean-Cyb94-bm.js} +1 -1
- package/dist/web/assets/{client-Dqtz8Ili.js → client-hyRgVCty.js} +3 -3
- package/dist/web/assets/{clojure-CcB35oPu.js → clojure-CLewI5lA.js} +1 -1
- package/dist/web/assets/{clojure-repl-UmCtFENG.js → clojure-repl-BtzgAt1p.js} +1 -1
- package/dist/web/assets/{cmake-BNsFX7mM.js → cmake-DWrK9r_0.js} +1 -1
- package/dist/web/assets/{coffeescript-BO-bY-7g.js → coffeescript-dC8dxgju.js} +1 -1
- package/dist/web/assets/{coq-DxEbCmAp.js → coq-Dx-VjjMG.js} +1 -1
- package/dist/web/assets/{core-Ca6TmLdX.js → core-l5FbiT9y.js} +1 -1
- package/dist/web/assets/{cos-D7p4YQ1F.js → cos-8hM_upPC.js} +1 -1
- package/dist/web/assets/{cpp-BfXjKrw-.js → cpp-C9q7oMVc.js} +1 -1
- package/dist/web/assets/{crmsh-Cu_wHzWI.js → crmsh-CM-iDW78.js} +1 -1
- package/dist/web/assets/{crystal-B4ffFRgA.js → crystal-B89CGmJl.js} +1 -1
- package/dist/web/assets/{csharp-F3YLadH3.js → csharp-BML5bF5U.js} +1 -1
- package/dist/web/assets/{csp-BLkoFjJ1.js → csp-BFgIYW7p.js} +1 -1
- package/dist/web/assets/{css-CBlOEu5y.js → css-Bmr2MmHJ.js} +1 -1
- package/dist/web/assets/{d-B8LLg7Ap.js → d-Bl1waUG7.js} +1 -1
- package/dist/web/assets/{dart-Bg7_Weak.js → dart-7WM1pTL7.js} +1 -1
- package/dist/web/assets/{delphi-CUFJtF08.js → delphi-BATb_6La.js} +1 -1
- package/dist/web/assets/{diff-D6IyExXS.js → diff-DQixhTxV.js} +1 -1
- package/dist/web/assets/{display-A5IEINAP-CalMK9h7.js → display-A5IEINAP-CIPa27wl.js} +2 -2
- package/dist/web/assets/{django-B-UTY01C.js → django-BaiMyL7a.js} +1 -1
- package/dist/web/assets/{dns-DfGDf7is.js → dns-B9LMXwq0.js} +1 -1
- package/dist/web/assets/{dockerfile-BYeQ3jyi.js → dockerfile-CgRRyc7d.js} +1 -1
- package/dist/web/assets/{dos-B_5-_6xr.js → dos-CUi0wmYe.js} +1 -1
- package/dist/web/assets/{dsconfig-uyDAQQAU.js → dsconfig-CtHPMV_z.js} +1 -1
- package/dist/web/assets/{dts-D75DwEM4.js → dts-Da6KiRGb.js} +1 -1
- package/dist/web/assets/{dust-JsNLCukW.js → dust-CtSB5RuR.js} +1 -1
- package/dist/web/assets/{ebnf-BP6c5l4a.js → ebnf-Civ7z3Sl.js} +1 -1
- package/dist/web/assets/{elixir-CUhtoXbR.js → elixir-BRz9w0Jz.js} +1 -1
- package/dist/web/assets/{elm-CKMhE8ah.js → elm-BLvIF2ZJ.js} +1 -1
- package/dist/web/assets/{embeddings-LX6aYruq.js → embeddings-DgQZkbYX.js} +1 -1
- package/dist/web/assets/{erb-CIx8MUO5.js → erb-yf3e-otT.js} +1 -1
- package/dist/web/assets/{erlang-repl-k7jT--Ou.js → erlang-repl-ygAXsKis.js} +1 -1
- package/dist/web/assets/{erlang-CkXPsz4M.js → erlang-u1gFvkzN.js} +1 -1
- package/dist/web/assets/{excel-C5SkgBGz.js → excel-Dr1VKgu5.js} +1 -1
- package/dist/web/assets/{fix-_4ZjoSTH.js → fix-CQ9USTvQ.js} +1 -1
- package/dist/web/assets/{flix-DnrR-dRx.js → flix-CK8VWwdt.js} +1 -1
- package/dist/web/assets/{fortran-CD6uDQX4.js → fortran-ChxBIVaA.js} +1 -1
- package/dist/web/assets/{fsharp-DTtzfUsx.js → fsharp-C2VB7uZ8.js} +1 -1
- package/dist/web/assets/{gams-CQk2cq7o.js → gams-cNOVPE3r.js} +1 -1
- package/dist/web/assets/{gauss-CtDmpxAf.js → gauss-Bqbzwh3H.js} +1 -1
- package/dist/web/assets/{gcode-B_EYK0Vg.js → gcode-CCf3GJpC.js} +1 -1
- package/dist/web/assets/{gherkin-DVcj5Cvn.js → gherkin-zMG7sQxB.js} +1 -1
- package/dist/web/assets/{glsl-BoRlfwJN.js → glsl-ChXPtZtn.js} +1 -1
- package/dist/web/assets/{gml-DwXf4s-K.js → gml-Dkbq2p7u.js} +1 -1
- package/dist/web/assets/{go-jKSz3kk6.js → go-C_rm61mN.js} +1 -1
- package/dist/web/assets/{golo-Dz5XOjjS.js → golo-BHw2HzNW.js} +1 -1
- package/dist/web/assets/{gradle-CG3C4PH5.js → gradle-dmNWlxt5.js} +1 -1
- package/dist/web/assets/{groovy-SRcDLXTF.js → groovy-BYRQ-Iq8.js} +1 -1
- package/dist/web/assets/{haml-CJsy3-F-.js → haml-CUGq_1r0.js} +1 -1
- package/dist/web/assets/{handlebars-LN8E0NSL.js → handlebars-ClqAsR9Y.js} +1 -1
- package/dist/web/assets/{haskell-ZP5N77Rb.js → haskell-D1EUHyyy.js} +1 -1
- package/dist/web/assets/{haxe-S_8gGOoI.js → haxe-D5_584-N.js} +1 -1
- package/dist/web/assets/{hsp-KqF2E7-o.js → hsp-CxOObZJt.js} +1 -1
- package/dist/web/assets/{htmlbars-Bw_UyB1p.js → htmlbars-BcxYs9JO.js} +1 -1
- package/dist/web/assets/{http-BI5U1FE3.js → http-IoGXsslz.js} +1 -1
- package/dist/web/assets/{hy-BAOLWsZC.js → hy-DOezFVYJ.js} +1 -1
- package/dist/web/assets/{index-ChIi2Veb.js → index-58vKJ_rW.js} +1 -1
- package/dist/web/assets/{index-BJOEo8tI.js → index-BQMLPync.js} +1 -1
- package/dist/web/assets/{index-DtyH_PEF.js → index-BWHJKdRK.js} +1 -1
- package/dist/web/assets/index-Br5Lp-nB.css +1 -0
- package/dist/web/assets/{index-Bmd2u1yJ.js → index-Brj1Oahm.js} +1 -1
- package/dist/web/assets/{index-Cz7z8sOR.js → index-BzCXH-MY.js} +1 -1
- package/dist/web/assets/{index-YcAOTRMN.js → index-CeFusmJF.js} +155 -155
- package/dist/web/assets/{index-DUSfaXA6.js → index-Df6PS_lJ.js} +1 -1
- package/dist/web/assets/{inform7-DgEbiTHe.js → inform7-4DkSrciU.js} +1 -1
- package/dist/web/assets/{ini-VsC63Yhp.js → ini-BAOejxzX.js} +1 -1
- package/dist/web/assets/{irpf90-BPXrE0Br.js → irpf90-CPhvVsrR.js} +1 -1
- package/dist/web/assets/{isbl-Dz4HkKrY.js → isbl-B9cEpNQ2.js} +1 -1
- package/dist/web/assets/{java-C5QDkp3s.js → java-B4D9vUuB.js} +1 -1
- package/dist/web/assets/{javascript-Qw1A7HIi.js → javascript-BUcy5JSl.js} +1 -1
- package/dist/web/assets/{jboss-cli-DjxxWoe7.js → jboss-cli-rk3boy7C.js} +1 -1
- package/dist/web/assets/{json-DwXmVB99.js → json-DMjBKfEa.js} +1 -1
- package/dist/web/assets/{julia-_UEF-d-n.js → julia-ByXC6uTj.js} +1 -1
- package/dist/web/assets/{julia-repl-BmGjKqDN.js → julia-repl-BRG6tLsN.js} +1 -1
- package/dist/web/assets/{kotlin-BGX09JNe.js → kotlin-LVfLRQA6.js} +1 -1
- package/dist/web/assets/{langfuse-U2OEF7K7-oUFfuCA2.js → langfuse-U2OEF7K7-BHNkft2N.js} +28 -28
- package/dist/web/assets/{lasso-CMKn1wD1.js → lasso-BcDeHYYs.js} +1 -1
- package/dist/web/assets/{latex-CSuZLxub.js → latex-BQLu7e0M.js} +1 -1
- package/dist/web/assets/{ldif-DtYZcb6_.js → ldif-MoWOvygf.js} +1 -1
- package/dist/web/assets/{leaf-Dm7kHn1u.js → leaf-Dc_ryT_U.js} +1 -1
- package/dist/web/assets/{less-BduOo7w1.js → less-xL-2sUOW.js} +1 -1
- package/dist/web/assets/{lisp-CTN_y443.js → lisp-CQgkxiVN.js} +1 -1
- package/dist/web/assets/{livecodeserver-Bt_3a5Le.js → livecodeserver-CnHs8DDk.js} +1 -1
- package/dist/web/assets/{livescript-fany4WHq.js → livescript-Bq3GcA8X.js} +1 -1
- package/dist/web/assets/{llms-CaZsx5qn.js → llms-DJAqua6W.js} +1 -1
- package/dist/web/assets/{llvm-BPeNPow9.js → llvm-g2SZAh5n.js} +1 -1
- package/dist/web/assets/{lsl-CUkRosfV.js → lsl-duYC8WGZ.js} +1 -1
- package/dist/web/assets/{lua-BYvWg4jg.js → lua-BKi5mh_G.js} +1 -1
- package/dist/web/assets/{makefile-oS53Vg0z.js → makefile-BqeicODu.js} +1 -1
- package/dist/web/assets/{markdown-D_B0fAXx.js → markdown-BG4LCYiF.js} +1 -1
- package/dist/web/assets/{mathematica-DKe-IuUK.js → mathematica-abL0r-fQ.js} +1 -1
- package/dist/web/assets/{matlab-D_21Tl-L.js → matlab-UvEnHOa4.js} +1 -1
- package/dist/web/assets/{maxima-DUtL1egA.js → maxima-WaftEzY-.js} +1 -1
- package/dist/web/assets/{mel-LAIz87bj.js → mel-B2MSGRGp.js} +1 -1
- package/dist/web/assets/{mercury-zYnf0BJA.js → mercury-D-B5OKnw.js} +1 -1
- package/dist/web/assets/{mipsasm-By1nFx6c.js → mipsasm-BN0bNdeJ.js} +1 -1
- package/dist/web/assets/{mizar-Bzhf-tV1.js → mizar-B9qd-OhV.js} +1 -1
- package/dist/web/assets/{mojolicious-B8QJxbI8.js → mojolicious-DojZjej7.js} +1 -1
- package/dist/web/assets/{monkey-Z_CyDrLh.js → monkey-DTUG_uUK.js} +1 -1
- package/dist/web/assets/{moonscript-CoDseIDC.js → moonscript-BxxoAw0w.js} +1 -1
- package/dist/web/assets/{n1ql-BEBUEhhE.js → n1ql-DoMSEnVI.js} +1 -1
- package/dist/web/assets/{nginx-BGCHEvnU.js → nginx-Ce5-hgf7.js} +1 -1
- package/dist/web/assets/{nim-Ctrpw--E.js → nim--cUhot81.js} +1 -1
- package/dist/web/assets/{nix-Caa5UC27.js → nix-CFzICQwT.js} +1 -1
- package/dist/web/assets/{node-repl-sr3s7jQZ.js → node-repl-8uW0BP3C.js} +1 -1
- package/dist/web/assets/{nsis-CzkCLfi2.js → nsis-D85QEHck.js} +1 -1
- package/dist/web/assets/{objectivec-jvD65_0I.js → objectivec-CO4ZKM1N.js} +1 -1
- package/dist/web/assets/{ocaml-DhDYdcp2.js → ocaml-MdZmIFP9.js} +1 -1
- package/dist/web/assets/{openscad-BqnRwGZd.js → openscad-Dd_k-u5o.js} +1 -1
- package/dist/web/assets/{oxygene-Cd0jRim3.js → oxygene-C9_JJ-Tz.js} +1 -1
- package/dist/web/assets/{parser3-BETxqEki.js → parser3--hakx1TP.js} +1 -1
- package/dist/web/assets/{perl-knvs0MzJ.js → perl-Bryi0MIt.js} +1 -1
- package/dist/web/assets/{pf-DiXaovgm.js → pf-ZaeD0XU8.js} +1 -1
- package/dist/web/assets/{pgsql-BWEvOXP5.js → pgsql-9scnk6gR.js} +1 -1
- package/dist/web/assets/{php-fyvUpIS6.js → php-Fdiy0MkS.js} +1 -1
- package/dist/web/assets/{php-template-Bvb-N_hu.js → php-template-BYeCSEy4.js} +1 -1
- package/dist/web/assets/{plaintext-Dwt8jzyJ.js → plaintext-FbFisAWv.js} +1 -1
- package/dist/web/assets/{pony-Cfelzwqf.js → pony-B0HARvcw.js} +1 -1
- package/dist/web/assets/{powershell-2b2YR7rM.js → powershell-DUssROtG.js} +1 -1
- package/dist/web/assets/{processing-CgyyQkLr.js → processing-BQZO45D3.js} +1 -1
- package/dist/web/assets/{profile-CHSonwOR.js → profile-CcGplmcc.js} +1 -1
- package/dist/web/assets/{prolog-CArpL4nb.js → prolog-B0NhCbAQ.js} +1 -1
- package/dist/web/assets/{properties-B7x5j4f3.js → properties-CWjoVJ5W.js} +1 -1
- package/dist/web/assets/{protobuf-DbZMyS9y.js → protobuf-D58gQeRM.js} +1 -1
- package/dist/web/assets/{puppet-CyK4RmCj.js → puppet-Ba9doIt2.js} +1 -1
- package/dist/web/assets/{purebasic-Bu9BNLQf.js → purebasic-BrH-D46w.js} +1 -1
- package/dist/web/assets/{python-DpcgEz0v.js → python-CjvAeSv8.js} +1 -1
- package/dist/web/assets/{python-repl-BAoj7DrU.js → python-repl-Jgv_SkQ0.js} +1 -1
- package/dist/web/assets/{q-aLpDzBqb.js → q-DgYB_ewM.js} +1 -1
- package/dist/web/assets/{qml-CF8YT9EP.js → qml-C7I-vh-W.js} +1 -1
- package/dist/web/assets/{r-DJifPsK_.js → r-DUpFDXxH.js} +1 -1
- package/dist/web/assets/{reasonml-DYlZCQtf.js → reasonml-Dxs-bF-2.js} +1 -1
- package/dist/web/assets/{rib-BWlooZzU.js → rib-CQL270qQ.js} +1 -1
- package/dist/web/assets/{roboconf-B3mKPOxb.js → roboconf-krxtbKe1.js} +1 -1
- package/dist/web/assets/{routeros-Ri82AIpo.js → routeros-BGBHdfxg.js} +1 -1
- package/dist/web/assets/{rsl-YFzXeAfb.js → rsl-CxAtY_02.js} +1 -1
- package/dist/web/assets/{ruby-CjV_PTlL.js → ruby-DJm1xcVx.js} +1 -1
- package/dist/web/assets/{ruleslanguage-DJCtPhmJ.js → ruleslanguage-BnhvTD6g.js} +1 -1
- package/dist/web/assets/{rust-T_ZZbr83.js → rust-DQe5T9WQ.js} +1 -1
- package/dist/web/assets/{sas-DnThN-QA.js → sas-6xbHPzOh.js} +1 -1
- package/dist/web/assets/{scala-CiCGCGBM.js → scala-DZlwYVr9.js} +1 -1
- package/dist/web/assets/{scheme-C81ecRNU.js → scheme-DXL_Buip.js} +1 -1
- package/dist/web/assets/{scilab-yIe92bs8.js → scilab-CKRl_kfB.js} +1 -1
- package/dist/web/assets/{scss-BGCT6i58.js → scss-jr09pBlW.js} +1 -1
- package/dist/web/assets/{shell-CtJaW7qj.js → shell-CxU4VQpG.js} +1 -1
- package/dist/web/assets/{smali-D9JxR6Ok.js → smali-BsXFpLll.js} +1 -1
- package/dist/web/assets/{smalltalk-Cc681-eJ.js → smalltalk-D2nr_49h.js} +1 -1
- package/dist/web/assets/{sml-CTRWATz0.js → sml-B16pEEUV.js} +1 -1
- package/dist/web/assets/{sqf-DSWEsa4V.js → sqf-BRaN4nE_.js} +1 -1
- package/dist/web/assets/{sql-CDB6g9ay.js → sql-CeIac2_e.js} +1 -1
- package/dist/web/assets/{sql_more-CpMC6pU4.js → sql_more-ZIMlJNGg.js} +1 -1
- package/dist/web/assets/{stan-BHnXBW_m.js → stan-DmpIhD_z.js} +1 -1
- package/dist/web/assets/{stata-84iUAWPp.js → stata-0ytqR1Ib.js} +1 -1
- package/dist/web/assets/{stdio-ZJFIZK2F-DAa98oll.js → stdio-PVTCK7WZ-C_E3pv0k.js} +1 -1
- package/dist/web/assets/{step21-DDfRrzcc.js → step21-C5gS7qwT.js} +1 -1
- package/dist/web/assets/{stylus-6UGB2DbU.js → stylus-DUzDJYfR.js} +1 -1
- package/dist/web/assets/{subunit-CI6BjWYM.js → subunit-BgugsJpP.js} +1 -1
- package/dist/web/assets/{swift-gZKjqZzX.js → swift-Cq31xV9A.js} +1 -1
- package/dist/web/assets/{taggerscript-4a4rpAZe.js → taggerscript-D6rUQ5Ju.js} +1 -1
- package/dist/web/assets/{tap-1yGDzo5T.js → tap-DkraFPBQ.js} +1 -1
- package/dist/web/assets/{tcl-Blqm3M6H.js → tcl-87kkAxdg.js} +1 -1
- package/dist/web/assets/{thrift-SCSYAnoo.js → thrift-CHkbhRQC.js} +1 -1
- package/dist/web/assets/{tp-CJiYvF2Z.js → tp-D5drOrfs.js} +1 -1
- package/dist/web/assets/{twig-CwKcbSAY.js → twig-JUSSxmsN.js} +1 -1
- package/dist/web/assets/{typescript-Dfq7Dw6S.js → typescript-DxY7tpO6.js} +1 -1
- package/dist/web/assets/{vala-CwjTTkCe.js → vala-BKhreswN.js} +1 -1
- package/dist/web/assets/{vbnet-DkyZUDFs.js → vbnet-BHYN5PHo.js} +1 -1
- package/dist/web/assets/{vbscript-D7mSa0kc.js → vbscript-eErGIKc5.js} +1 -1
- package/dist/web/assets/{vbscript-html-4muOpfOP.js → vbscript-html-BVPWl6WP.js} +1 -1
- package/dist/web/assets/{verilog-CTx73zAb.js → verilog-DbaUNZdo.js} +1 -1
- package/dist/web/assets/{vhdl-bNkZElSZ.js → vhdl-UR-HSHjG.js} +1 -1
- package/dist/web/assets/{vim-BEHLt-ak.js → vim-Dk1XUiA7.js} +1 -1
- package/dist/web/assets/{x86asm-LPghO6jq.js → x86asm-B9c_N4c6.js} +1 -1
- package/dist/web/assets/{xl-C1a1l7dp.js → xl-swOLfPCO.js} +1 -1
- package/dist/web/assets/{xml-DkVcEWrP.js → xml-BpZLXHyv.js} +1 -1
- package/dist/web/assets/{xquery-BC8Ygt24.js → xquery-RWTIln5p.js} +1 -1
- package/dist/web/assets/{yaml-dlNOCKmh.js → yaml-k20kwc4p.js} +1 -1
- package/dist/web/assets/{zephir-Bif85EPV.js → zephir-7ED-2Mm2.js} +1 -1
- package/dist/web/index.html +3 -3
- package/package.json +2 -2
- package/dist/web/assets/index-B53yBrEF.css +0 -1
package/dist/client/index.js
CHANGED
|
@@ -6280,7 +6280,7 @@ var init_module = __esm({
|
|
|
6280
6280
|
}
|
|
6281
6281
|
});
|
|
6282
6282
|
|
|
6283
|
-
// ../mcp-use/dist/chunk-
|
|
6283
|
+
// ../mcp-use/dist/chunk-BEM6RYUG.js
|
|
6284
6284
|
import { RESOURCE_MIME_TYPE } from "@modelcontextprotocol/ext-apps";
|
|
6285
6285
|
function getPackageVersion2() {
|
|
6286
6286
|
return VERSION;
|
|
@@ -6443,12 +6443,12 @@ function setTelemetrySource(source) {
|
|
|
6443
6443
|
Tel.getInstance().setSource(source);
|
|
6444
6444
|
}
|
|
6445
6445
|
var VERSION, _a6, BaseTelemetryEvent, _a7, MCPAgentExecutionEvent, _a8, ServerRunEvent, _a9, ServerInitializeEvent, _a10, ServerToolCallEvent, _a11, ServerResourceCallEvent, _a12, ServerPromptCallEvent, _a13, ServerContextEvent, _a14, MCPClientInitEvent, _a15, ConnectorInitEvent, _a16, ClientAddServerEvent, _a17, ClientRemoveServerEvent, USER_ID_STORAGE_KEY, cachedEnvironment, _a18, Telemetry2, Tel;
|
|
6446
|
-
var
|
|
6447
|
-
"../mcp-use/dist/chunk-
|
|
6446
|
+
var init_chunk_BEM6RYUG = __esm({
|
|
6447
|
+
"../mcp-use/dist/chunk-BEM6RYUG.js"() {
|
|
6448
6448
|
"use strict";
|
|
6449
6449
|
init_chunk_QWQYAQCK();
|
|
6450
6450
|
init_chunk_3GQAWCBQ();
|
|
6451
|
-
VERSION = "1.20.
|
|
6451
|
+
VERSION = "1.20.2";
|
|
6452
6452
|
__name(getPackageVersion2, "getPackageVersion");
|
|
6453
6453
|
BaseTelemetryEvent = (_a6 = class {
|
|
6454
6454
|
}, __name(_a6, "BaseTelemetryEvent"), _a6);
|
|
@@ -12528,17 +12528,17 @@ var init_langfuse_U2OEF7K7 = __esm({
|
|
|
12528
12528
|
}
|
|
12529
12529
|
});
|
|
12530
12530
|
|
|
12531
|
-
// ../mcp-use/dist/chunk-
|
|
12531
|
+
// ../mcp-use/dist/chunk-APFZRK4H.js
|
|
12532
12532
|
import {
|
|
12533
12533
|
CreateMessageRequestSchema,
|
|
12534
12534
|
ElicitRequestSchema,
|
|
12535
12535
|
ListRootsRequestSchema
|
|
12536
12536
|
} from "@modelcontextprotocol/sdk/types.js";
|
|
12537
12537
|
var _a19, BaseConnector;
|
|
12538
|
-
var
|
|
12539
|
-
"../mcp-use/dist/chunk-
|
|
12538
|
+
var init_chunk_APFZRK4H = __esm({
|
|
12539
|
+
"../mcp-use/dist/chunk-APFZRK4H.js"() {
|
|
12540
12540
|
"use strict";
|
|
12541
|
-
|
|
12541
|
+
init_chunk_BEM6RYUG();
|
|
12542
12542
|
init_chunk_QWQYAQCK();
|
|
12543
12543
|
init_chunk_3GQAWCBQ();
|
|
12544
12544
|
BaseConnector = (_a19 = class {
|
|
@@ -13048,12 +13048,12 @@ var init_chunk_PFGLTHGD = __esm({
|
|
|
13048
13048
|
}
|
|
13049
13049
|
});
|
|
13050
13050
|
|
|
13051
|
-
// ../mcp-use/dist/chunk-
|
|
13051
|
+
// ../mcp-use/dist/chunk-2D3EC6DS.js
|
|
13052
13052
|
var _a20, CodeModeConnector;
|
|
13053
|
-
var
|
|
13054
|
-
"../mcp-use/dist/chunk-
|
|
13053
|
+
var init_chunk_2D3EC6DS = __esm({
|
|
13054
|
+
"../mcp-use/dist/chunk-2D3EC6DS.js"() {
|
|
13055
13055
|
"use strict";
|
|
13056
|
-
|
|
13056
|
+
init_chunk_APFZRK4H();
|
|
13057
13057
|
init_chunk_3GQAWCBQ();
|
|
13058
13058
|
CodeModeConnector = (_a20 = class extends BaseConnector {
|
|
13059
13059
|
constructor(client) {
|
|
@@ -13281,7 +13281,7 @@ var init_chunk_GKPKUKD6 = __esm({
|
|
|
13281
13281
|
}
|
|
13282
13282
|
});
|
|
13283
13283
|
|
|
13284
|
-
// ../mcp-use/dist/chunk-
|
|
13284
|
+
// ../mcp-use/dist/chunk-LOZGE6LT.js
|
|
13285
13285
|
import {
|
|
13286
13286
|
Client
|
|
13287
13287
|
} from "@modelcontextprotocol/sdk/client/index.js";
|
|
@@ -13351,12 +13351,12 @@ function createConnectorFromConfig(serverConfig, connectorOptions) {
|
|
|
13351
13351
|
throw new Error("Cannot determine connector type from config");
|
|
13352
13352
|
}
|
|
13353
13353
|
var _a22, MCPSession, _a23, BaseMCPClient, _a24, SseConnectionManager, _a25, HttpConnector;
|
|
13354
|
-
var
|
|
13355
|
-
"../mcp-use/dist/chunk-
|
|
13354
|
+
var init_chunk_LOZGE6LT = __esm({
|
|
13355
|
+
"../mcp-use/dist/chunk-LOZGE6LT.js"() {
|
|
13356
13356
|
"use strict";
|
|
13357
13357
|
init_chunk_GKPKUKD6();
|
|
13358
|
-
|
|
13359
|
-
|
|
13358
|
+
init_chunk_APFZRK4H();
|
|
13359
|
+
init_chunk_BEM6RYUG();
|
|
13360
13360
|
init_chunk_QWQYAQCK();
|
|
13361
13361
|
init_chunk_3GQAWCBQ();
|
|
13362
13362
|
MCPSession = (_a22 = class {
|
|
@@ -34149,16 +34149,16 @@ var init_dist3 = __esm({
|
|
|
34149
34149
|
}
|
|
34150
34150
|
});
|
|
34151
34151
|
|
|
34152
|
-
// ../mcp-use/dist/chunk-
|
|
34152
|
+
// ../mcp-use/dist/chunk-CVX4S233.js
|
|
34153
34153
|
import { Client as Client2 } from "@modelcontextprotocol/sdk/client/index.js";
|
|
34154
34154
|
import process22 from "process";
|
|
34155
34155
|
import { StdioClientTransport } from "@modelcontextprotocol/sdk/client/stdio.js";
|
|
34156
34156
|
var _a28, StdioConnectionManager, _a29, StdioConnector;
|
|
34157
|
-
var
|
|
34158
|
-
"../mcp-use/dist/chunk-
|
|
34157
|
+
var init_chunk_CVX4S233 = __esm({
|
|
34158
|
+
"../mcp-use/dist/chunk-CVX4S233.js"() {
|
|
34159
34159
|
"use strict";
|
|
34160
34160
|
init_chunk_GKPKUKD6();
|
|
34161
|
-
|
|
34161
|
+
init_chunk_APFZRK4H();
|
|
34162
34162
|
init_chunk_QWQYAQCK();
|
|
34163
34163
|
init_chunk_3GQAWCBQ();
|
|
34164
34164
|
StdioConnectionManager = (_a28 = class extends ConnectionManager {
|
|
@@ -34301,24 +34301,24 @@ var init_chunk_7FCA6TQV = __esm({
|
|
|
34301
34301
|
}
|
|
34302
34302
|
});
|
|
34303
34303
|
|
|
34304
|
-
// ../mcp-use/dist/stdio-
|
|
34305
|
-
var
|
|
34306
|
-
__export(
|
|
34304
|
+
// ../mcp-use/dist/stdio-PVTCK7WZ.js
|
|
34305
|
+
var stdio_PVTCK7WZ_exports = {};
|
|
34306
|
+
__export(stdio_PVTCK7WZ_exports, {
|
|
34307
34307
|
StdioConnector: () => StdioConnector
|
|
34308
34308
|
});
|
|
34309
|
-
var
|
|
34310
|
-
"../mcp-use/dist/stdio-
|
|
34309
|
+
var init_stdio_PVTCK7WZ = __esm({
|
|
34310
|
+
"../mcp-use/dist/stdio-PVTCK7WZ.js"() {
|
|
34311
34311
|
"use strict";
|
|
34312
|
-
|
|
34312
|
+
init_chunk_CVX4S233();
|
|
34313
34313
|
init_chunk_GKPKUKD6();
|
|
34314
|
-
|
|
34315
|
-
|
|
34314
|
+
init_chunk_APFZRK4H();
|
|
34315
|
+
init_chunk_BEM6RYUG();
|
|
34316
34316
|
init_chunk_QWQYAQCK();
|
|
34317
34317
|
init_chunk_3GQAWCBQ();
|
|
34318
34318
|
}
|
|
34319
34319
|
});
|
|
34320
34320
|
|
|
34321
|
-
// ../mcp-use/dist/chunk-
|
|
34321
|
+
// ../mcp-use/dist/chunk-SUDRAJBH.js
|
|
34322
34322
|
function getVMModuleName() {
|
|
34323
34323
|
return ["node", "vm"].join(":");
|
|
34324
34324
|
}
|
|
@@ -34424,13 +34424,13 @@ function validate(params, content) {
|
|
|
34424
34424
|
}
|
|
34425
34425
|
}
|
|
34426
34426
|
var _a30, BaseCodeExecutor, _a31, E2BCodeExecutor, vm, vmCheckAttempted, _a32, VMCodeExecutor, _a33, MCPClient;
|
|
34427
|
-
var
|
|
34428
|
-
"../mcp-use/dist/chunk-
|
|
34427
|
+
var init_chunk_SUDRAJBH = __esm({
|
|
34428
|
+
"../mcp-use/dist/chunk-SUDRAJBH.js"() {
|
|
34429
34429
|
"use strict";
|
|
34430
|
-
|
|
34430
|
+
init_chunk_2D3EC6DS();
|
|
34431
34431
|
init_chunk_RPN2XO5I();
|
|
34432
|
-
|
|
34433
|
-
|
|
34432
|
+
init_chunk_LOZGE6LT();
|
|
34433
|
+
init_chunk_BEM6RYUG();
|
|
34434
34434
|
init_chunk_QWQYAQCK();
|
|
34435
34435
|
init_chunk_3GQAWCBQ();
|
|
34436
34436
|
init_fs();
|
|
@@ -35281,7 +35281,7 @@ ${shim}
|
|
|
35281
35281
|
clientInfo: serverConfig.clientInfo ?? this.config.clientInfo
|
|
35282
35282
|
};
|
|
35283
35283
|
if ("command" in merged && "args" in merged) {
|
|
35284
|
-
const { StdioConnector: StdioConnector2 } = await Promise.resolve().then(() => (
|
|
35284
|
+
const { StdioConnector: StdioConnector2 } = await Promise.resolve().then(() => (init_stdio_PVTCK7WZ(), stdio_PVTCK7WZ_exports));
|
|
35285
35285
|
const stdioConfig = merged;
|
|
35286
35286
|
return new StdioConnector2({
|
|
35287
35287
|
command: stdioConfig.command,
|
|
@@ -35533,13 +35533,13 @@ __export(client_exports, {
|
|
|
35533
35533
|
var init_client = __esm({
|
|
35534
35534
|
"../mcp-use/dist/src/client.js"() {
|
|
35535
35535
|
"use strict";
|
|
35536
|
-
|
|
35537
|
-
|
|
35536
|
+
init_chunk_SUDRAJBH();
|
|
35537
|
+
init_chunk_2D3EC6DS();
|
|
35538
35538
|
init_chunk_RPN2XO5I();
|
|
35539
|
-
|
|
35539
|
+
init_chunk_LOZGE6LT();
|
|
35540
35540
|
init_chunk_GKPKUKD6();
|
|
35541
|
-
|
|
35542
|
-
|
|
35541
|
+
init_chunk_APFZRK4H();
|
|
35542
|
+
init_chunk_BEM6RYUG();
|
|
35543
35543
|
init_chunk_QWQYAQCK();
|
|
35544
35544
|
init_chunk_3GQAWCBQ();
|
|
35545
35545
|
}
|
|
@@ -80133,7 +80133,7 @@ var init_display_A5IEINAP = __esm({
|
|
|
80133
80133
|
}
|
|
80134
80134
|
});
|
|
80135
80135
|
|
|
80136
|
-
// ../mcp-use/dist/chunk-
|
|
80136
|
+
// ../mcp-use/dist/chunk-KL25RKDY.js
|
|
80137
80137
|
import { z as z4 } from "zod";
|
|
80138
80138
|
import { StructuredTool } from "@langchain/core/tools";
|
|
80139
80139
|
import { StructuredTool as StructuredTool2 } from "@langchain/core/tools";
|
|
@@ -80365,11 +80365,11 @@ function normalizeRunOptions(queryOrOptions, maxSteps, manageConnector, external
|
|
|
80365
80365
|
};
|
|
80366
80366
|
}
|
|
80367
80367
|
var _a34, MCPServerTool, PresentActiveServerSchema, _a35, AcquireActiveMCPServerTool, _a36, AddMCPServerFromConfigTool, ConnectMCPServerSchema, _a37, ConnectMCPServerTool, EnumerateServersSchema, _a38, ListMCPServersTool, ReleaseConnectionSchema, _a39, ReleaseMCPServerConnectionTool, _a40, ServerManager, _a41, ObservabilityManager, API_CHATS_ENDPOINT, API_CHAT_EXECUTE_ENDPOINT, _a42, RemoteAgent, PROVIDER_CONFIG, DEFAULT_SYSTEM_PROMPT_TEMPLATE, SERVER_MANAGER_SYSTEM_PROMPT_TEMPLATE, _a43, MCPAgent;
|
|
80368
|
-
var
|
|
80369
|
-
"../mcp-use/dist/chunk-
|
|
80368
|
+
var init_chunk_KL25RKDY = __esm({
|
|
80369
|
+
"../mcp-use/dist/chunk-KL25RKDY.js"() {
|
|
80370
80370
|
"use strict";
|
|
80371
80371
|
init_chunk_3RU35UU4();
|
|
80372
|
-
|
|
80372
|
+
init_chunk_BEM6RYUG();
|
|
80373
80373
|
init_chunk_QWQYAQCK();
|
|
80374
80374
|
init_chunk_3GQAWCBQ();
|
|
80375
80375
|
MCPServerTool = (_a34 = class extends StructuredTool {
|
|
@@ -81178,6 +81178,8 @@ Here are the tools *currently* available to you (this list includes server manag
|
|
|
81178
81178
|
__publicField(this, "disallowedTools");
|
|
81179
81179
|
__publicField(this, "additionalTools");
|
|
81180
81180
|
__publicField(this, "toolsUsedNames", []);
|
|
81181
|
+
__publicField(this, "exposeResourcesAsTools", true);
|
|
81182
|
+
__publicField(this, "exposePromptsAsTools", true);
|
|
81181
81183
|
__publicField(this, "useServerManager");
|
|
81182
81184
|
__publicField(this, "verbose");
|
|
81183
81185
|
__publicField(this, "observe");
|
|
@@ -81280,6 +81282,8 @@ Here are the tools *currently* available to you (this list includes server manag
|
|
|
81280
81282
|
this.disallowedTools = options.disallowedTools ?? [];
|
|
81281
81283
|
this.additionalTools = options.additionalTools ?? [];
|
|
81282
81284
|
this.toolsUsedNames = options.toolsUsedNames ?? [];
|
|
81285
|
+
this.exposeResourcesAsTools = options.exposeResourcesAsTools ?? true;
|
|
81286
|
+
this.exposePromptsAsTools = options.exposePromptsAsTools ?? true;
|
|
81283
81287
|
this.useServerManager = options.useServerManager ?? false;
|
|
81284
81288
|
this.verbose = options.verbose ?? false;
|
|
81285
81289
|
this.observe = options.observe ?? true;
|
|
@@ -81422,15 +81426,12 @@ Here are the tools *currently* available to you (this list includes server manag
|
|
|
81422
81426
|
);
|
|
81423
81427
|
}
|
|
81424
81428
|
} else {
|
|
81425
|
-
const
|
|
81426
|
-
|
|
81427
|
-
);
|
|
81428
|
-
const resources = await this.adapter.createResourcesFromConnectors(
|
|
81429
|
-
Object.values(this.sessions).map((session) => session.connector)
|
|
81430
|
-
);
|
|
81431
|
-
const prompts = await this.adapter.createPromptsFromConnectors(
|
|
81432
|
-
Object.values(this.sessions).map((session) => session.connector)
|
|
81429
|
+
const connectors = Object.values(this.sessions).map(
|
|
81430
|
+
(session) => session.connector
|
|
81433
81431
|
);
|
|
81432
|
+
const tools = await this.adapter.createToolsFromConnectors(connectors);
|
|
81433
|
+
const resources = this.exposeResourcesAsTools ? await this.adapter.createResourcesFromConnectors(connectors) : [];
|
|
81434
|
+
const prompts = this.exposePromptsAsTools ? await this.adapter.createPromptsFromConnectors(connectors) : [];
|
|
81434
81435
|
this._tools = [...tools, ...resources, ...prompts];
|
|
81435
81436
|
logger.info(
|
|
81436
81437
|
`\u{1F6E0}\uFE0F Created ${this._tools.length} LangChain items from client: ${tools.length} tools, ${resources.length} resources, ${prompts.length} prompts`
|
|
@@ -82718,13 +82719,13 @@ ${formatPrompt}`
|
|
|
82718
82719
|
}
|
|
82719
82720
|
});
|
|
82720
82721
|
|
|
82721
|
-
// ../mcp-use/dist/chunk-
|
|
82722
|
+
// ../mcp-use/dist/chunk-6IKW4ZMN.js
|
|
82722
82723
|
var _a44, BrowserMCPClient;
|
|
82723
|
-
var
|
|
82724
|
-
"../mcp-use/dist/chunk-
|
|
82724
|
+
var init_chunk_6IKW4ZMN = __esm({
|
|
82725
|
+
"../mcp-use/dist/chunk-6IKW4ZMN.js"() {
|
|
82725
82726
|
"use strict";
|
|
82726
|
-
|
|
82727
|
-
|
|
82727
|
+
init_chunk_LOZGE6LT();
|
|
82728
|
+
init_chunk_BEM6RYUG();
|
|
82728
82729
|
init_chunk_QWQYAQCK();
|
|
82729
82730
|
init_chunk_3GQAWCBQ();
|
|
82730
82731
|
BrowserMCPClient = (_a44 = class extends BaseMCPClient {
|
|
@@ -83629,15 +83630,15 @@ var init_browser = __esm({
|
|
|
83629
83630
|
"../mcp-use/dist/src/browser.js"() {
|
|
83630
83631
|
"use strict";
|
|
83631
83632
|
init_chunk_LGDFGYRL();
|
|
83632
|
-
|
|
83633
|
+
init_chunk_KL25RKDY();
|
|
83633
83634
|
init_chunk_UJPHRNQP();
|
|
83634
83635
|
init_chunk_3RU35UU4();
|
|
83635
83636
|
init_chunk_RPN2XO5I();
|
|
83636
|
-
|
|
83637
|
-
|
|
83637
|
+
init_chunk_6IKW4ZMN();
|
|
83638
|
+
init_chunk_LOZGE6LT();
|
|
83638
83639
|
init_chunk_GKPKUKD6();
|
|
83639
|
-
|
|
83640
|
-
|
|
83640
|
+
init_chunk_APFZRK4H();
|
|
83641
|
+
init_chunk_BEM6RYUG();
|
|
83641
83642
|
init_chunk_QWQYAQCK();
|
|
83642
83643
|
init_chunk_6KHHFWTB();
|
|
83643
83644
|
init_chunk_3GQAWCBQ();
|
|
@@ -89103,7 +89104,7 @@ function MCPAppsRendererBase({
|
|
|
89103
89104
|
serverRef.current = server;
|
|
89104
89105
|
const [widgetCsp, setWidgetCsp] = useState10(void 0);
|
|
89105
89106
|
const [widgetPermissions, setWidgetPermissions] = useState10(void 0);
|
|
89106
|
-
const [prefersBorder, setPrefersBorder] = useState10(
|
|
89107
|
+
const [prefersBorder, setPrefersBorder] = useState10(false);
|
|
89107
89108
|
const [internalDisplayMode, setInternalDisplayMode] = useState10("inline");
|
|
89108
89109
|
const displayMode = displayModeProp ?? internalDisplayMode;
|
|
89109
89110
|
const displayModeRef = useRef6(displayMode);
|
|
@@ -89165,7 +89166,7 @@ function MCPAppsRendererBase({
|
|
|
89165
89166
|
if (Object.keys(fallback).length > 0) mcpAppsCsp = fallback;
|
|
89166
89167
|
}
|
|
89167
89168
|
const mcpAppsPermissions = mergedUiMeta?.permissions;
|
|
89168
|
-
const mcpAppsPrefersBorder = mergedUiMeta?.prefersBorder ??
|
|
89169
|
+
const mcpAppsPrefersBorder = mergedUiMeta?.prefersBorder ?? false;
|
|
89169
89170
|
const storeResponse = await fetch(
|
|
89170
89171
|
MCP_APPS_CONFIG.API_ENDPOINTS.WIDGET_STORE,
|
|
89171
89172
|
{
|
|
@@ -89275,7 +89276,7 @@ function MCPAppsRendererBase({
|
|
|
89275
89276
|
if (cancelled2) return;
|
|
89276
89277
|
const contentUiMeta = resourceResult?.contents?.[0]?._meta?.ui;
|
|
89277
89278
|
if (contentUiMeta && "prefersBorder" in contentUiMeta) {
|
|
89278
|
-
setPrefersBorder(contentUiMeta.prefersBorder ??
|
|
89279
|
+
setPrefersBorder(contentUiMeta.prefersBorder ?? false);
|
|
89279
89280
|
}
|
|
89280
89281
|
} catch {
|
|
89281
89282
|
}
|
|
@@ -89786,7 +89787,8 @@ function MCPAppsRendererBase({
|
|
|
89786
89787
|
{
|
|
89787
89788
|
className: cn(
|
|
89788
89789
|
"flex-1 w-full h-full flex justify-center items-center relative",
|
|
89789
|
-
isFullscreen && "pt-14"
|
|
89790
|
+
isFullscreen && "pt-14",
|
|
89791
|
+
!isPip && !isFullscreen && (invoking || invoked) && "pt-8"
|
|
89790
89792
|
),
|
|
89791
89793
|
children: [
|
|
89792
89794
|
showSpinner && /* @__PURE__ */ jsx30("div", { className: "flex absolute left-0 top-0 items-center justify-center w-full h-full z-10", children: /* @__PURE__ */ jsx30(Spinner, { className: "size-5" }) }),
|
|
@@ -90846,10 +90848,6 @@ function OpenAIComponentRendererBase({
|
|
|
90846
90848
|
return /* @__PURE__ */ jsx32(Wrapper, { className, noWrapper, children: /* @__PURE__ */ jsx32("div", { className: "flex absolute left-0 top-0 items-center justify-center w-full h-full", children: /* @__PURE__ */ jsx32(Spinner, { className: "size-5" }) }) });
|
|
90847
90849
|
}
|
|
90848
90850
|
return /* @__PURE__ */ jsxs16(Wrapper, { className, noWrapper, children: [
|
|
90849
|
-
displayMode === "inline" && (invoking || invoked) && /* @__PURE__ */ jsxs16("div", { className: "mb-1 px-1", children: [
|
|
90850
|
-
invoking && !toolResult && /* @__PURE__ */ jsx32(TextShimmer, { className: "text-xs", children: invoking }),
|
|
90851
|
-
invoked && toolResult && /* @__PURE__ */ jsx32("span", { className: "text-xs text-muted-foreground", children: invoked })
|
|
90852
|
-
] }),
|
|
90853
90851
|
showSkeleton && /* @__PURE__ */ jsx32("div", { className: "flex absolute left-0 top-0 items-center justify-center w-full h-full z-0", children: /* @__PURE__ */ jsx32(Spinner, { className: "size-5" }) }),
|
|
90854
90852
|
showConsole && isSameOrigin && displayMode !== "fullscreen" && displayMode !== "pip" && /* @__PURE__ */ jsx32("div", { className: "absolute top-2 right-2 z-30 flex items-center gap-2", children: /* @__PURE__ */ jsx32(
|
|
90855
90853
|
MCPAppsDebugControls,
|
|
@@ -90914,26 +90912,33 @@ function OpenAIComponentRendererBase({
|
|
|
90914
90912
|
className: cn(
|
|
90915
90913
|
"flex-1 w-full flex justify-center items-center relative z-10",
|
|
90916
90914
|
displayMode === "fullscreen" && "pt-14",
|
|
90917
|
-
centerVertically && "items-center"
|
|
90915
|
+
centerVertically && "items-center",
|
|
90916
|
+
displayMode === "inline" && (invoking || invoked) && "pt-8"
|
|
90918
90917
|
),
|
|
90919
|
-
children: /* @__PURE__ */
|
|
90920
|
-
"
|
|
90921
|
-
|
|
90922
|
-
|
|
90923
|
-
|
|
90924
|
-
|
|
90925
|
-
|
|
90926
|
-
|
|
90927
|
-
|
|
90928
|
-
|
|
90929
|
-
|
|
90930
|
-
|
|
90931
|
-
|
|
90932
|
-
|
|
90933
|
-
|
|
90934
|
-
|
|
90935
|
-
|
|
90936
|
-
|
|
90918
|
+
children: /* @__PURE__ */ jsxs16("div", { className: "relative w-full max-w-[768px]", children: [
|
|
90919
|
+
displayMode === "inline" && (invoking || invoked) && /* @__PURE__ */ jsxs16("div", { className: "absolute -top-8 left-2 z-10 whitespace-nowrap", children: [
|
|
90920
|
+
invoking && !toolResult && /* @__PURE__ */ jsx32(TextShimmer, { className: "text-xs", children: invoking }),
|
|
90921
|
+
invoked && toolResult && /* @__PURE__ */ jsx32("span", { className: "text-xs text-muted-foreground", children: invoked })
|
|
90922
|
+
] }),
|
|
90923
|
+
/* @__PURE__ */ jsx32(
|
|
90924
|
+
"iframe",
|
|
90925
|
+
{
|
|
90926
|
+
ref: iframeRef,
|
|
90927
|
+
src: widgetUrl,
|
|
90928
|
+
className: cn(
|
|
90929
|
+
displayMode === "inline" && "w-full",
|
|
90930
|
+
displayMode === "fullscreen" && "w-full h-full rounded-none",
|
|
90931
|
+
displayMode === "pip" && "w-full h-full rounded-lg"
|
|
90932
|
+
),
|
|
90933
|
+
style: {
|
|
90934
|
+
height: displayMode === "fullscreen" || displayMode === "pip" ? "100%" : `${iframeHeight}px`
|
|
90935
|
+
},
|
|
90936
|
+
sandbox: IFRAME_SANDBOX_PERMISSIONS,
|
|
90937
|
+
title: `OpenAI Component: ${toolName}`,
|
|
90938
|
+
allow: "web-share"
|
|
90939
|
+
}
|
|
90940
|
+
)
|
|
90941
|
+
] })
|
|
90937
90942
|
}
|
|
90938
90943
|
)
|
|
90939
90944
|
]
|
|
@@ -91435,7 +91440,7 @@ function ToolResultDisplay({
|
|
|
91435
91440
|
/* @__PURE__ */ jsxs18(
|
|
91436
91441
|
"div",
|
|
91437
91442
|
{
|
|
91438
|
-
className: `sticky top-0 z-
|
|
91443
|
+
className: `sticky top-0 z-40 flex items-center gap-2 px-4 pt-2 backdrop-blur-xs bg-white/50 dark:bg-black/50 ${hasMcpAppsResource || hasMcpUIResources || hasAppsSdkResource || isNonUIResult ? "border-b border-gray-200 dark:border-zinc-600 pb-2" : ""}`,
|
|
91439
91444
|
children: [
|
|
91440
91445
|
/* @__PURE__ */ jsx34("h3", { className: "text-sm font-medium hidden sm:block", children: "Response" }),
|
|
91441
91446
|
result.duration !== void 0 && /* @__PURE__ */ jsxs18("div", { className: "hidden sm:flex items-center gap-1", children: [
|
|
@@ -92013,7 +92018,13 @@ function ToolResultRenderer({
|
|
|
92013
92018
|
}
|
|
92014
92019
|
|
|
92015
92020
|
// src/client/components/ChatTab.tsx
|
|
92016
|
-
import {
|
|
92021
|
+
import {
|
|
92022
|
+
useCallback as useCallback17,
|
|
92023
|
+
useEffect as useEffect18,
|
|
92024
|
+
useMemo as useMemo13,
|
|
92025
|
+
useRef as useRef15,
|
|
92026
|
+
useState as useState23
|
|
92027
|
+
} from "react";
|
|
92017
92028
|
import { toast as toast5 } from "sonner";
|
|
92018
92029
|
|
|
92019
92030
|
// src/client/hooks/useKeyboardShortcuts.ts
|
|
@@ -93002,6 +93013,157 @@ import { Send, Square } from "lucide-react";
|
|
|
93002
93013
|
import { Image as ImageIcon, Paperclip, X as X5 } from "lucide-react";
|
|
93003
93014
|
import { useRef as useRef10 } from "react";
|
|
93004
93015
|
|
|
93016
|
+
// src/client/components/ui/checkbox.tsx
|
|
93017
|
+
import * as React9 from "react";
|
|
93018
|
+
import * as CheckboxPrimitive from "@radix-ui/react-checkbox";
|
|
93019
|
+
import { Check as Check4 } from "lucide-react";
|
|
93020
|
+
import { jsx as jsx40 } from "react/jsx-runtime";
|
|
93021
|
+
var Checkbox = React9.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx40(
|
|
93022
|
+
CheckboxPrimitive.Root,
|
|
93023
|
+
{
|
|
93024
|
+
ref,
|
|
93025
|
+
className: cn(
|
|
93026
|
+
"peer h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",
|
|
93027
|
+
className
|
|
93028
|
+
),
|
|
93029
|
+
...props,
|
|
93030
|
+
children: /* @__PURE__ */ jsx40(
|
|
93031
|
+
CheckboxPrimitive.Indicator,
|
|
93032
|
+
{
|
|
93033
|
+
className: cn("flex items-center justify-center text-current"),
|
|
93034
|
+
children: /* @__PURE__ */ jsx40(Check4, { className: "h-4 w-4" })
|
|
93035
|
+
}
|
|
93036
|
+
)
|
|
93037
|
+
}
|
|
93038
|
+
));
|
|
93039
|
+
Checkbox.displayName = CheckboxPrimitive.Root.displayName;
|
|
93040
|
+
|
|
93041
|
+
// src/client/components/chat/ToolSelector.tsx
|
|
93042
|
+
import { Wrench } from "lucide-react";
|
|
93043
|
+
import { useCallback as useCallback13, useMemo as useMemo12, useState as useState16 } from "react";
|
|
93044
|
+
import { jsx as jsx41, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
93045
|
+
function ToolSelector({
|
|
93046
|
+
tools,
|
|
93047
|
+
disabledTools,
|
|
93048
|
+
onDisabledToolsChange,
|
|
93049
|
+
disabled
|
|
93050
|
+
}) {
|
|
93051
|
+
const [open, setOpen] = useState16(false);
|
|
93052
|
+
const enabledCount = tools.length - disabledTools.size;
|
|
93053
|
+
const allEnabled = disabledTools.size === 0;
|
|
93054
|
+
const someDisabled = disabledTools.size > 0 && disabledTools.size < tools.length;
|
|
93055
|
+
const toggleTool = useCallback13(
|
|
93056
|
+
(toolName) => {
|
|
93057
|
+
const next = new Set(disabledTools);
|
|
93058
|
+
if (next.has(toolName)) {
|
|
93059
|
+
next.delete(toolName);
|
|
93060
|
+
} else {
|
|
93061
|
+
next.add(toolName);
|
|
93062
|
+
}
|
|
93063
|
+
onDisabledToolsChange(next);
|
|
93064
|
+
},
|
|
93065
|
+
[disabledTools, onDisabledToolsChange]
|
|
93066
|
+
);
|
|
93067
|
+
const toggleAll = useCallback13(() => {
|
|
93068
|
+
if (allEnabled) {
|
|
93069
|
+
onDisabledToolsChange(new Set(tools.map((t2) => t2.name)));
|
|
93070
|
+
} else {
|
|
93071
|
+
onDisabledToolsChange(/* @__PURE__ */ new Set());
|
|
93072
|
+
}
|
|
93073
|
+
}, [allEnabled, tools, onDisabledToolsChange]);
|
|
93074
|
+
const sortedTools = useMemo12(
|
|
93075
|
+
() => [...tools].sort((a2, b2) => a2.name.localeCompare(b2.name)),
|
|
93076
|
+
[tools]
|
|
93077
|
+
);
|
|
93078
|
+
if (tools.length === 0) return null;
|
|
93079
|
+
return /* @__PURE__ */ jsxs22(Popover, { open, onOpenChange: setOpen, children: [
|
|
93080
|
+
/* @__PURE__ */ jsxs22(Tooltip, { children: [
|
|
93081
|
+
/* @__PURE__ */ jsx41(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx41(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxs22(
|
|
93082
|
+
Button,
|
|
93083
|
+
{
|
|
93084
|
+
variant: "ghost",
|
|
93085
|
+
size: "sm",
|
|
93086
|
+
disabled,
|
|
93087
|
+
className: cn(
|
|
93088
|
+
"h-auto w-auto aspect-square rounded-full p-2 relative",
|
|
93089
|
+
someDisabled && "text-amber-500 dark:text-amber-400"
|
|
93090
|
+
),
|
|
93091
|
+
type: "button",
|
|
93092
|
+
"data-testid": "chat-tool-selector",
|
|
93093
|
+
children: [
|
|
93094
|
+
/* @__PURE__ */ jsx41(Wrench, { className: "h-4 w-4" }),
|
|
93095
|
+
someDisabled && /* @__PURE__ */ jsx41("span", { className: "absolute -top-0.5 -right-0.5 flex h-3.5 w-3.5 items-center justify-center rounded-full bg-amber-500 text-[9px] font-bold text-white leading-none", children: enabledCount })
|
|
93096
|
+
]
|
|
93097
|
+
}
|
|
93098
|
+
) }) }),
|
|
93099
|
+
/* @__PURE__ */ jsx41(TooltipContent, { side: "top", children: /* @__PURE__ */ jsxs22("p", { children: [
|
|
93100
|
+
"Tools (",
|
|
93101
|
+
enabledCount,
|
|
93102
|
+
"/",
|
|
93103
|
+
tools.length,
|
|
93104
|
+
")"
|
|
93105
|
+
] }) })
|
|
93106
|
+
] }),
|
|
93107
|
+
/* @__PURE__ */ jsxs22(
|
|
93108
|
+
PopoverContent,
|
|
93109
|
+
{
|
|
93110
|
+
className: "w-72 p-0",
|
|
93111
|
+
align: "start",
|
|
93112
|
+
side: "top",
|
|
93113
|
+
sideOffset: 8,
|
|
93114
|
+
children: [
|
|
93115
|
+
/* @__PURE__ */ jsxs22("div", { className: "flex items-center justify-between px-3 py-2 border-b", children: [
|
|
93116
|
+
/* @__PURE__ */ jsxs22("span", { className: "text-xs font-medium text-muted-foreground", children: [
|
|
93117
|
+
"Allowed Tools (",
|
|
93118
|
+
enabledCount,
|
|
93119
|
+
"/",
|
|
93120
|
+
tools.length,
|
|
93121
|
+
")"
|
|
93122
|
+
] }),
|
|
93123
|
+
/* @__PURE__ */ jsx41(
|
|
93124
|
+
Button,
|
|
93125
|
+
{
|
|
93126
|
+
variant: "ghost",
|
|
93127
|
+
size: "sm",
|
|
93128
|
+
className: "h-6 px-2 text-xs",
|
|
93129
|
+
onClick: toggleAll,
|
|
93130
|
+
type: "button",
|
|
93131
|
+
children: allEnabled ? "Disable All" : "Enable All"
|
|
93132
|
+
}
|
|
93133
|
+
)
|
|
93134
|
+
] }),
|
|
93135
|
+
/* @__PURE__ */ jsx41("div", { className: "max-h-64 overflow-y-auto py-1", children: sortedTools.map((tool) => {
|
|
93136
|
+
const isEnabled = !disabledTools.has(tool.name);
|
|
93137
|
+
return /* @__PURE__ */ jsxs22(
|
|
93138
|
+
"button",
|
|
93139
|
+
{
|
|
93140
|
+
type: "button",
|
|
93141
|
+
className: "flex items-center gap-2.5 w-full px-3 py-1.5 text-left hover:bg-accent/50 transition-colors cursor-pointer",
|
|
93142
|
+
onClick: () => toggleTool(tool.name),
|
|
93143
|
+
children: [
|
|
93144
|
+
/* @__PURE__ */ jsx41(
|
|
93145
|
+
Checkbox,
|
|
93146
|
+
{
|
|
93147
|
+
checked: isEnabled,
|
|
93148
|
+
className: "pointer-events-none",
|
|
93149
|
+
tabIndex: -1
|
|
93150
|
+
}
|
|
93151
|
+
),
|
|
93152
|
+
/* @__PURE__ */ jsxs22("div", { className: "min-w-0 flex-1", children: [
|
|
93153
|
+
/* @__PURE__ */ jsx41("div", { className: "text-sm font-mono truncate", children: tool.name }),
|
|
93154
|
+
tool.description && /* @__PURE__ */ jsx41("div", { className: "text-[11px] text-muted-foreground truncate", children: tool.description })
|
|
93155
|
+
] })
|
|
93156
|
+
]
|
|
93157
|
+
},
|
|
93158
|
+
tool.name
|
|
93159
|
+
);
|
|
93160
|
+
}) })
|
|
93161
|
+
]
|
|
93162
|
+
}
|
|
93163
|
+
)
|
|
93164
|
+
] });
|
|
93165
|
+
}
|
|
93166
|
+
|
|
93005
93167
|
// src/client/components/chat/utils.ts
|
|
93006
93168
|
function hashString(str) {
|
|
93007
93169
|
let hash = 0;
|
|
@@ -93073,7 +93235,7 @@ function formatFileSize(bytes) {
|
|
|
93073
93235
|
}
|
|
93074
93236
|
|
|
93075
93237
|
// src/client/components/chat/ChatInput.tsx
|
|
93076
|
-
import { jsx as
|
|
93238
|
+
import { jsx as jsx42, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
93077
93239
|
function ChatInput({
|
|
93078
93240
|
inputValue,
|
|
93079
93241
|
isConnected,
|
|
@@ -93083,6 +93245,9 @@ function ChatInput({
|
|
|
93083
93245
|
placeholder = "Ask a question",
|
|
93084
93246
|
className,
|
|
93085
93247
|
showAttachButton = true,
|
|
93248
|
+
tools,
|
|
93249
|
+
disabledTools,
|
|
93250
|
+
onDisabledToolsChange,
|
|
93086
93251
|
onInputChange,
|
|
93087
93252
|
onKeyDown,
|
|
93088
93253
|
onKeyUp,
|
|
@@ -93103,19 +93268,19 @@ function ChatInput({
|
|
|
93103
93268
|
}
|
|
93104
93269
|
};
|
|
93105
93270
|
const hasAttachments = attachments.length > 0;
|
|
93106
|
-
return /* @__PURE__ */
|
|
93107
|
-
hasAttachments && /* @__PURE__ */
|
|
93271
|
+
return /* @__PURE__ */ jsxs23("div", { className: "relative w-full", children: [
|
|
93272
|
+
hasAttachments && /* @__PURE__ */ jsx42("div", { className: "absolute top-0 left-0 right-0 z-20 p-3 flex gap-2 flex-wrap", children: attachments.map((attachment, index) => /* @__PURE__ */ jsxs23(
|
|
93108
93273
|
"div",
|
|
93109
93274
|
{
|
|
93110
93275
|
className: "relative group bg-zinc-100/90 dark:bg-zinc-900/90 backdrop-blur-sm rounded-lg p-2 flex items-center gap-2 border border-zinc-200 dark:border-zinc-700",
|
|
93111
93276
|
"data-testid": `chat-attachment-${index}`,
|
|
93112
93277
|
children: [
|
|
93113
|
-
/* @__PURE__ */
|
|
93114
|
-
/* @__PURE__ */
|
|
93115
|
-
/* @__PURE__ */
|
|
93116
|
-
attachment.size && /* @__PURE__ */
|
|
93278
|
+
/* @__PURE__ */ jsx42(ImageIcon, { className: "h-4 w-4 text-muted-foreground shrink-0" }),
|
|
93279
|
+
/* @__PURE__ */ jsxs23("div", { className: "flex flex-col min-w-0", children: [
|
|
93280
|
+
/* @__PURE__ */ jsx42("span", { className: "text-xs font-medium truncate max-w-[150px]", children: attachment.name || "Image" }),
|
|
93281
|
+
attachment.size && /* @__PURE__ */ jsx42("span", { className: "text-xs text-muted-foreground", children: formatFileSize(attachment.size) })
|
|
93117
93282
|
] }),
|
|
93118
|
-
/* @__PURE__ */
|
|
93283
|
+
/* @__PURE__ */ jsx42(
|
|
93119
93284
|
"button",
|
|
93120
93285
|
{
|
|
93121
93286
|
onClick: () => onAttachmentRemove(index),
|
|
@@ -93123,14 +93288,14 @@ function ChatInput({
|
|
|
93123
93288
|
title: "Remove attachment",
|
|
93124
93289
|
type: "button",
|
|
93125
93290
|
"data-testid": `chat-attachment-remove-${index}`,
|
|
93126
|
-
children: /* @__PURE__ */
|
|
93291
|
+
children: /* @__PURE__ */ jsx42(X5, { className: "h-3 w-3" })
|
|
93127
93292
|
}
|
|
93128
93293
|
)
|
|
93129
93294
|
]
|
|
93130
93295
|
},
|
|
93131
93296
|
index
|
|
93132
93297
|
)) }),
|
|
93133
|
-
/* @__PURE__ */
|
|
93298
|
+
/* @__PURE__ */ jsx42(
|
|
93134
93299
|
Textarea,
|
|
93135
93300
|
{
|
|
93136
93301
|
ref: textareaRef,
|
|
@@ -93149,7 +93314,7 @@ function ChatInput({
|
|
|
93149
93314
|
"data-testid": "chat-input"
|
|
93150
93315
|
}
|
|
93151
93316
|
),
|
|
93152
|
-
/* @__PURE__ */
|
|
93317
|
+
/* @__PURE__ */ jsx42(
|
|
93153
93318
|
"input",
|
|
93154
93319
|
{
|
|
93155
93320
|
ref: fileInputRef,
|
|
@@ -93161,31 +93326,42 @@ function ChatInput({
|
|
|
93161
93326
|
"aria-label": "Upload images"
|
|
93162
93327
|
}
|
|
93163
93328
|
),
|
|
93164
|
-
|
|
93165
|
-
|
|
93166
|
-
|
|
93167
|
-
|
|
93168
|
-
|
|
93169
|
-
|
|
93170
|
-
|
|
93171
|
-
|
|
93172
|
-
|
|
93173
|
-
|
|
93174
|
-
|
|
93175
|
-
|
|
93176
|
-
|
|
93177
|
-
|
|
93329
|
+
/* @__PURE__ */ jsxs23("div", { className: "absolute left-0 p-3 bottom-0 flex items-center gap-0.5", children: [
|
|
93330
|
+
showAttachButton && /* @__PURE__ */ jsx42(
|
|
93331
|
+
Button,
|
|
93332
|
+
{
|
|
93333
|
+
variant: "ghost",
|
|
93334
|
+
size: "sm",
|
|
93335
|
+
onClick: () => fileInputRef.current?.click(),
|
|
93336
|
+
disabled: !isConnected || isLoading,
|
|
93337
|
+
className: "h-auto w-auto aspect-square rounded-full p-2",
|
|
93338
|
+
title: "Attach images",
|
|
93339
|
+
type: "button",
|
|
93340
|
+
"data-testid": "chat-attach-button",
|
|
93341
|
+
children: /* @__PURE__ */ jsx42(Paperclip, { className: "h-4 w-4" })
|
|
93342
|
+
}
|
|
93343
|
+
),
|
|
93344
|
+
tools && tools.length > 0 && disabledTools && onDisabledToolsChange && /* @__PURE__ */ jsx42(
|
|
93345
|
+
ToolSelector,
|
|
93346
|
+
{
|
|
93347
|
+
tools,
|
|
93348
|
+
disabledTools,
|
|
93349
|
+
onDisabledToolsChange,
|
|
93350
|
+
disabled: !isConnected || isLoading
|
|
93351
|
+
}
|
|
93352
|
+
)
|
|
93353
|
+
] })
|
|
93178
93354
|
] });
|
|
93179
93355
|
}
|
|
93180
93356
|
|
|
93181
93357
|
// src/client/components/chat/PromptResultsList.tsx
|
|
93182
93358
|
import { MessageSquare, X as X6 } from "lucide-react";
|
|
93183
|
-
import { jsx as
|
|
93359
|
+
import { jsx as jsx43, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
93184
93360
|
function PromptResultsList({
|
|
93185
93361
|
promptResults,
|
|
93186
93362
|
onDeletePromptResult
|
|
93187
93363
|
}) {
|
|
93188
|
-
return /* @__PURE__ */
|
|
93364
|
+
return /* @__PURE__ */ jsx43(
|
|
93189
93365
|
"div",
|
|
93190
93366
|
{
|
|
93191
93367
|
className: "absolute top-4 left-4 right-4 flex gap-2 overflow-x-auto z-20 flex-nowrap",
|
|
@@ -93193,15 +93369,15 @@ function PromptResultsList({
|
|
|
93193
93369
|
scrollbarWidth: "none",
|
|
93194
93370
|
msOverflowStyle: "none"
|
|
93195
93371
|
},
|
|
93196
|
-
children: promptResults.map(({ promptName }, index) => /* @__PURE__ */
|
|
93372
|
+
children: promptResults.map(({ promptName }, index) => /* @__PURE__ */ jsxs24(
|
|
93197
93373
|
Button,
|
|
93198
93374
|
{
|
|
93199
93375
|
type: "button",
|
|
93200
93376
|
className: "flex items-center gap-2 bg-zinc-200 text-zinc-700 dark:text-zinc-300 text-[10px] px-1.5 py-0.5 dark:bg-zinc-700 rounded-lg border border-zinc-200 dark:border-zinc-300 font-medium hover:bg-zinc-300 dark:hover:bg-zinc-600",
|
|
93201
93377
|
children: [
|
|
93202
|
-
/* @__PURE__ */
|
|
93203
|
-
/* @__PURE__ */
|
|
93204
|
-
/* @__PURE__ */
|
|
93378
|
+
/* @__PURE__ */ jsx43(MessageSquare, { className: "h-3.5 w-3.5 shrink-0" }),
|
|
93379
|
+
/* @__PURE__ */ jsx43("span", { className: "truncate", title: promptName, children: promptName }),
|
|
93380
|
+
/* @__PURE__ */ jsx43(
|
|
93205
93381
|
"span",
|
|
93206
93382
|
{
|
|
93207
93383
|
className: "ml-1 h-4 w-4 rounded-full bg-zinc-400 dark:bg-zinc-600 hover:bg-zinc-500 dark:hover:bg-zinc-500 flex items-center justify-center cursor-pointer shrink-0 transition-colors",
|
|
@@ -93212,7 +93388,7 @@ function PromptResultsList({
|
|
|
93212
93388
|
title: "Remove prompt",
|
|
93213
93389
|
role: "button",
|
|
93214
93390
|
tabIndex: 0,
|
|
93215
|
-
children: /* @__PURE__ */
|
|
93391
|
+
children: /* @__PURE__ */ jsx43(X6, { className: "h-2.5 w-2.5 text-white" })
|
|
93216
93392
|
}
|
|
93217
93393
|
)
|
|
93218
93394
|
]
|
|
@@ -93226,7 +93402,7 @@ function PromptResultsList({
|
|
|
93226
93402
|
// src/client/components/chat/PromptsDropdown.tsx
|
|
93227
93403
|
import { MessageSquare as MessageSquare2 } from "lucide-react";
|
|
93228
93404
|
import { useEffect as useEffect15 } from "react";
|
|
93229
|
-
import { jsx as
|
|
93405
|
+
import { jsx as jsx44, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
93230
93406
|
function PromptsDropdown({
|
|
93231
93407
|
isOpen,
|
|
93232
93408
|
focusedIndex,
|
|
@@ -93243,15 +93419,15 @@ function PromptsDropdown({
|
|
|
93243
93419
|
}
|
|
93244
93420
|
}
|
|
93245
93421
|
}, [focusedIndex]);
|
|
93246
|
-
return /* @__PURE__ */
|
|
93422
|
+
return /* @__PURE__ */ jsx44(
|
|
93247
93423
|
"div",
|
|
93248
93424
|
{
|
|
93249
93425
|
className: "absolute bottom-full left-0 right-0 max-w-3xl w-full max-h-[300px] overflow-y-auto rounded-lg border border-zinc-200 dark:border-zinc-800 bg-white dark:bg-zinc-900 shadow-lg z-30 flex flex-col gap-2 mb-1",
|
|
93250
93426
|
"data-testid": "chat-prompts-dropdown",
|
|
93251
|
-
children: /* @__PURE__ */
|
|
93252
|
-
/* @__PURE__ */
|
|
93253
|
-
prompts.map((prompt, index) => /* @__PURE__ */
|
|
93254
|
-
/* @__PURE__ */
|
|
93427
|
+
children: /* @__PURE__ */ jsxs25("div", { className: "p-2", children: [
|
|
93428
|
+
/* @__PURE__ */ jsx44("div", { className: "text-xs font-medium text-zinc-900 dark:text-zinc-100 mb-2", children: "Prompts" }),
|
|
93429
|
+
prompts.map((prompt, index) => /* @__PURE__ */ jsxs25(Tooltip, { children: [
|
|
93430
|
+
/* @__PURE__ */ jsx44(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsxs25(
|
|
93255
93431
|
Button,
|
|
93256
93432
|
{
|
|
93257
93433
|
id: `prompt-${index}`,
|
|
@@ -93264,15 +93440,15 @@ function PromptsDropdown({
|
|
|
93264
93440
|
onClick: () => onPromptSelect(prompt),
|
|
93265
93441
|
"data-testid": `chat-prompt-option-${index}`,
|
|
93266
93442
|
children: [
|
|
93267
|
-
/* @__PURE__ */
|
|
93268
|
-
/* @__PURE__ */
|
|
93443
|
+
/* @__PURE__ */ jsx44("div", { className: "flex items-center justify-center shrink-0", children: /* @__PURE__ */ jsx44(MessageSquare2, { className: "h-4 w-4 text-zinc-600 dark:text-zinc-400" }) }),
|
|
93444
|
+
/* @__PURE__ */ jsx44("div", { className: "flex-1 min-w-0", children: /* @__PURE__ */ jsxs25("div", { className: "text-sm font-medium text-zinc-900 dark:text-zinc-100 flex items-center gap-2", children: [
|
|
93269
93445
|
prompt.name,
|
|
93270
|
-
selectedPrompt?.name === prompt.name && /* @__PURE__ */
|
|
93446
|
+
selectedPrompt?.name === prompt.name && /* @__PURE__ */ jsx44(Spinner, { className: "size-3 text-zinc-600 dark:text-zinc-400" })
|
|
93271
93447
|
] }) })
|
|
93272
93448
|
]
|
|
93273
93449
|
}
|
|
93274
93450
|
) }),
|
|
93275
|
-
/* @__PURE__ */
|
|
93451
|
+
/* @__PURE__ */ jsx44(TooltipContent, { children: prompt.description })
|
|
93276
93452
|
] }, index))
|
|
93277
93453
|
] })
|
|
93278
93454
|
}
|
|
@@ -93280,7 +93456,7 @@ function PromptsDropdown({
|
|
|
93280
93456
|
}
|
|
93281
93457
|
|
|
93282
93458
|
// src/client/components/chat/ChatInputArea.tsx
|
|
93283
|
-
import { jsx as
|
|
93459
|
+
import { jsx as jsx45, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
93284
93460
|
function ChatInputArea({
|
|
93285
93461
|
inputValue,
|
|
93286
93462
|
isConnected,
|
|
@@ -93292,6 +93468,9 @@ function ChatInputArea({
|
|
|
93292
93468
|
selectedPrompt,
|
|
93293
93469
|
promptResults,
|
|
93294
93470
|
attachments,
|
|
93471
|
+
tools,
|
|
93472
|
+
disabledTools,
|
|
93473
|
+
onDisabledToolsChange,
|
|
93295
93474
|
onInputChange,
|
|
93296
93475
|
onKeyDown,
|
|
93297
93476
|
onKeyUp,
|
|
@@ -93306,8 +93485,8 @@ function ChatInputArea({
|
|
|
93306
93485
|
onFollowupSelect
|
|
93307
93486
|
}) {
|
|
93308
93487
|
const canSend = inputValue.trim() || promptResults.length > 0 || attachments.length > 0;
|
|
93309
|
-
return /* @__PURE__ */
|
|
93310
|
-
followups.length > 0 && /* @__PURE__ */
|
|
93488
|
+
return /* @__PURE__ */ jsx45("div", { className: "w-full flex flex-col justify-center items-center p-2 sm:p-4 sm:pt-0 text-foreground", children: /* @__PURE__ */ jsxs26("div", { className: "relative w-full max-w-3xl backdrop-blur-xl", children: [
|
|
93489
|
+
followups.length > 0 && /* @__PURE__ */ jsx45("div", { className: "mb-2 flex flex-wrap gap-2", children: followups.map((followup) => /* @__PURE__ */ jsx45(
|
|
93311
93490
|
Button,
|
|
93312
93491
|
{
|
|
93313
93492
|
type: "button",
|
|
@@ -93320,7 +93499,7 @@ function ChatInputArea({
|
|
|
93320
93499
|
},
|
|
93321
93500
|
followup
|
|
93322
93501
|
)) }),
|
|
93323
|
-
/* @__PURE__ */
|
|
93502
|
+
/* @__PURE__ */ jsx45(
|
|
93324
93503
|
PromptsDropdown,
|
|
93325
93504
|
{
|
|
93326
93505
|
isOpen: promptsDropdownOpen,
|
|
@@ -93330,14 +93509,14 @@ function ChatInputArea({
|
|
|
93330
93509
|
onPromptSelect
|
|
93331
93510
|
}
|
|
93332
93511
|
),
|
|
93333
|
-
/* @__PURE__ */
|
|
93512
|
+
/* @__PURE__ */ jsx45(
|
|
93334
93513
|
PromptResultsList,
|
|
93335
93514
|
{
|
|
93336
93515
|
promptResults,
|
|
93337
93516
|
onDeletePromptResult
|
|
93338
93517
|
}
|
|
93339
93518
|
),
|
|
93340
|
-
/* @__PURE__ */
|
|
93519
|
+
/* @__PURE__ */ jsx45(
|
|
93341
93520
|
ChatInput,
|
|
93342
93521
|
{
|
|
93343
93522
|
inputValue,
|
|
@@ -93350,6 +93529,9 @@ function ChatInputArea({
|
|
|
93350
93529
|
"bg-zinc-50 z-10 focus:bg-zinc-100 dark:text-white dark:bg-black border-gray-200 dark:border-zinc-800",
|
|
93351
93530
|
promptResults.length > 0 && "pt-16"
|
|
93352
93531
|
),
|
|
93532
|
+
tools,
|
|
93533
|
+
disabledTools,
|
|
93534
|
+
onDisabledToolsChange,
|
|
93353
93535
|
onInputChange,
|
|
93354
93536
|
onKeyDown,
|
|
93355
93537
|
onKeyUp,
|
|
@@ -93358,16 +93540,16 @@ function ChatInputArea({
|
|
|
93358
93540
|
onAttachmentRemove
|
|
93359
93541
|
}
|
|
93360
93542
|
),
|
|
93361
|
-
/* @__PURE__ */
|
|
93543
|
+
/* @__PURE__ */ jsx45("div", { className: "absolute right-0 p-3 bottom-0 flex items-center gap-2", children: isLoading ? /* @__PURE__ */ jsx45(
|
|
93362
93544
|
Button,
|
|
93363
93545
|
{
|
|
93364
93546
|
className: "min-w-none h-auto w-auto aspect-square rounded-full items-center justify-center flex",
|
|
93365
93547
|
title: "Stop streaming",
|
|
93366
93548
|
type: "button",
|
|
93367
93549
|
onClick: onStopStreaming,
|
|
93368
|
-
children: /* @__PURE__ */
|
|
93550
|
+
children: /* @__PURE__ */ jsx45(Square, { className: "h-4 w-4" })
|
|
93369
93551
|
}
|
|
93370
|
-
) : /* @__PURE__ */
|
|
93552
|
+
) : /* @__PURE__ */ jsx45(
|
|
93371
93553
|
Button,
|
|
93372
93554
|
{
|
|
93373
93555
|
disabled: !canSend || !isConnected || isLoading,
|
|
@@ -93376,21 +93558,21 @@ function ChatInputArea({
|
|
|
93376
93558
|
type: "button",
|
|
93377
93559
|
onClick: onSendMessage,
|
|
93378
93560
|
"data-testid": "chat-send-button",
|
|
93379
|
-
children: /* @__PURE__ */
|
|
93561
|
+
children: /* @__PURE__ */ jsx45(Send, { className: "h-4 w-4" })
|
|
93380
93562
|
}
|
|
93381
93563
|
) })
|
|
93382
93564
|
] }) });
|
|
93383
93565
|
}
|
|
93384
93566
|
|
|
93385
93567
|
// src/client/components/ui/aurora-background.tsx
|
|
93386
|
-
import { jsx as
|
|
93568
|
+
import { jsx as jsx46, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
93387
93569
|
function AuroraBackground({
|
|
93388
93570
|
className,
|
|
93389
93571
|
children,
|
|
93390
93572
|
showRadialGradient = true,
|
|
93391
93573
|
...props
|
|
93392
93574
|
}) {
|
|
93393
|
-
return /* @__PURE__ */
|
|
93575
|
+
return /* @__PURE__ */ jsxs27(
|
|
93394
93576
|
"div",
|
|
93395
93577
|
{
|
|
93396
93578
|
className: cn(
|
|
@@ -93399,7 +93581,7 @@ function AuroraBackground({
|
|
|
93399
93581
|
),
|
|
93400
93582
|
...props,
|
|
93401
93583
|
children: [
|
|
93402
|
-
/* @__PURE__ */
|
|
93584
|
+
/* @__PURE__ */ jsx46(
|
|
93403
93585
|
"div",
|
|
93404
93586
|
{
|
|
93405
93587
|
className: "absolute inset-0 overflow-hidden dark:opacity-50 dark:contrast-200",
|
|
@@ -93416,7 +93598,7 @@ function AuroraBackground({
|
|
|
93416
93598
|
"--white": "#fff",
|
|
93417
93599
|
"--transparent": "transparent"
|
|
93418
93600
|
},
|
|
93419
|
-
children: /* @__PURE__ */
|
|
93601
|
+
children: /* @__PURE__ */ jsx46(
|
|
93420
93602
|
"div",
|
|
93421
93603
|
{
|
|
93422
93604
|
className: cn(
|
|
@@ -93436,7 +93618,7 @@ function AuroraBackground({
|
|
|
93436
93618
|
// src/client/components/ui/blur-fade.tsx
|
|
93437
93619
|
import { AnimatePresence, motion as motion2, useInView } from "motion/react";
|
|
93438
93620
|
import { useRef as useRef11 } from "react";
|
|
93439
|
-
import { jsx as
|
|
93621
|
+
import { jsx as jsx47 } from "react/jsx-runtime";
|
|
93440
93622
|
function BlurFade({
|
|
93441
93623
|
children,
|
|
93442
93624
|
className,
|
|
@@ -93466,7 +93648,7 @@ function BlurFade({
|
|
|
93466
93648
|
}
|
|
93467
93649
|
};
|
|
93468
93650
|
const combinedVariants = variant || defaultVariants;
|
|
93469
|
-
return /* @__PURE__ */
|
|
93651
|
+
return /* @__PURE__ */ jsx47(AnimatePresence, { children: /* @__PURE__ */ jsx47(
|
|
93470
93652
|
motion2.div,
|
|
93471
93653
|
{
|
|
93472
93654
|
ref,
|
|
@@ -93488,7 +93670,7 @@ function BlurFade({
|
|
|
93488
93670
|
|
|
93489
93671
|
// src/client/components/chat/ChatLandingForm.tsx
|
|
93490
93672
|
import { ArrowUp, Loader2 as Loader23 } from "lucide-react";
|
|
93491
|
-
import { jsx as
|
|
93673
|
+
import { jsx as jsx48, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
93492
93674
|
function ChatLandingForm({
|
|
93493
93675
|
mcpServerUrl,
|
|
93494
93676
|
inputValue,
|
|
@@ -93502,6 +93684,9 @@ function ChatLandingForm({
|
|
|
93502
93684
|
selectedPrompt,
|
|
93503
93685
|
promptResults,
|
|
93504
93686
|
attachments,
|
|
93687
|
+
tools,
|
|
93688
|
+
disabledTools,
|
|
93689
|
+
onDisabledToolsChange,
|
|
93505
93690
|
onInputChange,
|
|
93506
93691
|
onKeyDown,
|
|
93507
93692
|
onKeyUp,
|
|
@@ -93518,9 +93703,9 @@ function ChatLandingForm({
|
|
|
93518
93703
|
onQuickQuestionSelect
|
|
93519
93704
|
}) {
|
|
93520
93705
|
const canSend = inputValue.trim() || promptResults.length > 0 || attachments.length > 0;
|
|
93521
|
-
return /* @__PURE__ */
|
|
93522
|
-
/* @__PURE__ */
|
|
93523
|
-
/* @__PURE__ */
|
|
93706
|
+
return /* @__PURE__ */ jsx48(AuroraBackground, { children: /* @__PURE__ */ jsxs28(BlurFade, { className: "w-full max-w-4xl mx-auto px-2 sm:px-4", children: [
|
|
93707
|
+
/* @__PURE__ */ jsxs28("div", { className: "text-center mb-6 sm:mb-8", children: [
|
|
93708
|
+
/* @__PURE__ */ jsx48(
|
|
93524
93709
|
"h1",
|
|
93525
93710
|
{
|
|
93526
93711
|
className: "text-2xl sm:text-4xl font-light mb-2 dark:text-white",
|
|
@@ -93528,11 +93713,11 @@ function ChatLandingForm({
|
|
|
93528
93713
|
children: "Chat with MCP Server"
|
|
93529
93714
|
}
|
|
93530
93715
|
),
|
|
93531
|
-
!hideServerUrl && /* @__PURE__ */
|
|
93716
|
+
!hideServerUrl && /* @__PURE__ */ jsx48("p", { className: "text-xs sm:text-sm text-zinc-600 dark:text-zinc-400 font-light break-all px-2", children: mcpServerUrl })
|
|
93532
93717
|
] }),
|
|
93533
|
-
/* @__PURE__ */
|
|
93534
|
-
/* @__PURE__ */
|
|
93535
|
-
/* @__PURE__ */
|
|
93718
|
+
/* @__PURE__ */ jsxs28("form", { onSubmit, className: "space-y-6", children: [
|
|
93719
|
+
/* @__PURE__ */ jsx48("div", { className: "flex justify-center", children: /* @__PURE__ */ jsxs28("div", { className: "relative w-full max-w-2xl", children: [
|
|
93720
|
+
/* @__PURE__ */ jsx48(
|
|
93536
93721
|
PromptsDropdown,
|
|
93537
93722
|
{
|
|
93538
93723
|
prompts,
|
|
@@ -93542,14 +93727,14 @@ function ChatLandingForm({
|
|
|
93542
93727
|
onPromptSelect
|
|
93543
93728
|
}
|
|
93544
93729
|
),
|
|
93545
|
-
/* @__PURE__ */
|
|
93730
|
+
/* @__PURE__ */ jsx48(
|
|
93546
93731
|
PromptResultsList,
|
|
93547
93732
|
{
|
|
93548
93733
|
promptResults,
|
|
93549
93734
|
onDeletePromptResult
|
|
93550
93735
|
}
|
|
93551
93736
|
),
|
|
93552
|
-
/* @__PURE__ */
|
|
93737
|
+
/* @__PURE__ */ jsx48(
|
|
93553
93738
|
ChatInput,
|
|
93554
93739
|
{
|
|
93555
93740
|
inputValue,
|
|
@@ -93562,6 +93747,9 @@ function ChatLandingForm({
|
|
|
93562
93747
|
"bg-white/80 dark:text-white dark:bg-black backdrop-blur-sm border-gray-200 dark:border-zinc-800",
|
|
93563
93748
|
promptResults.length > 0 && "pt-16"
|
|
93564
93749
|
),
|
|
93750
|
+
tools,
|
|
93751
|
+
disabledTools,
|
|
93752
|
+
onDisabledToolsChange,
|
|
93565
93753
|
onInputChange,
|
|
93566
93754
|
onKeyDown,
|
|
93567
93755
|
onKeyUp,
|
|
@@ -93570,7 +93758,7 @@ function ChatLandingForm({
|
|
|
93570
93758
|
onAttachmentRemove
|
|
93571
93759
|
}
|
|
93572
93760
|
),
|
|
93573
|
-
/* @__PURE__ */
|
|
93761
|
+
/* @__PURE__ */ jsx48("div", { className: "absolute right-0 p-3 bottom-0", children: /* @__PURE__ */ jsx48(
|
|
93574
93762
|
Button,
|
|
93575
93763
|
{
|
|
93576
93764
|
type: "submit",
|
|
@@ -93582,11 +93770,11 @@ function ChatLandingForm({
|
|
|
93582
93770
|
),
|
|
93583
93771
|
disabled: isLoading || !canSend || !isConnected,
|
|
93584
93772
|
"data-testid": "chat-send-button",
|
|
93585
|
-
children: isLoading ? /* @__PURE__ */
|
|
93773
|
+
children: isLoading ? /* @__PURE__ */ jsx48(Loader23, { className: "h-4 w-4 animate-spin" }) : /* @__PURE__ */ jsx48(ArrowUp, { className: "h-4 w-4" })
|
|
93586
93774
|
}
|
|
93587
93775
|
) })
|
|
93588
93776
|
] }) }),
|
|
93589
|
-
quickQuestions.length > 0 && /* @__PURE__ */
|
|
93777
|
+
quickQuestions.length > 0 && /* @__PURE__ */ jsx48("div", { className: "flex flex-wrap items-center justify-center gap-2 px-2", children: quickQuestions.map((question) => /* @__PURE__ */ jsx48(
|
|
93590
93778
|
Button,
|
|
93591
93779
|
{
|
|
93592
93780
|
type: "button",
|
|
@@ -93599,15 +93787,15 @@ function ChatLandingForm({
|
|
|
93599
93787
|
},
|
|
93600
93788
|
question
|
|
93601
93789
|
)) }),
|
|
93602
|
-
llmConfig && !hideModelBadge && /* @__PURE__ */
|
|
93603
|
-
/* @__PURE__ */
|
|
93790
|
+
llmConfig && !hideModelBadge && /* @__PURE__ */ jsx48("div", { className: "flex justify-center mt-4", children: /* @__PURE__ */ jsxs28(Tooltip, { children: [
|
|
93791
|
+
/* @__PURE__ */ jsx48(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsxs28(
|
|
93604
93792
|
Badge,
|
|
93605
93793
|
{
|
|
93606
93794
|
variant: "secondary",
|
|
93607
93795
|
className: "pl-1 font-mono text-[11px] cursor-pointer hover:bg-secondary/80 transition-colors",
|
|
93608
93796
|
onClick: () => onConfigDialogOpenChange(true),
|
|
93609
93797
|
children: [
|
|
93610
|
-
/* @__PURE__ */
|
|
93798
|
+
/* @__PURE__ */ jsx48(
|
|
93611
93799
|
"img",
|
|
93612
93800
|
{
|
|
93613
93801
|
src: `https://inspector-cdn.mcp-use.com/providers/${llmConfig.provider}.png`,
|
|
@@ -93621,7 +93809,7 @@ function ChatLandingForm({
|
|
|
93621
93809
|
]
|
|
93622
93810
|
}
|
|
93623
93811
|
) }),
|
|
93624
|
-
/* @__PURE__ */
|
|
93812
|
+
/* @__PURE__ */ jsx48(TooltipContent, { children: /* @__PURE__ */ jsx48("p", { children: "Change API Key" }) })
|
|
93625
93813
|
] }) })
|
|
93626
93814
|
] })
|
|
93627
93815
|
] }) });
|
|
@@ -93629,21 +93817,21 @@ function ChatLandingForm({
|
|
|
93629
93817
|
|
|
93630
93818
|
// src/client/components/chat/ConfigureEmptyState.tsx
|
|
93631
93819
|
import { Key as Key2, Settings as Settings2 } from "lucide-react";
|
|
93632
|
-
import { jsx as
|
|
93820
|
+
import { jsx as jsx49, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
93633
93821
|
function ConfigureEmptyState({
|
|
93634
93822
|
onConfigureClick
|
|
93635
93823
|
}) {
|
|
93636
|
-
return /* @__PURE__ */
|
|
93637
|
-
/* @__PURE__ */
|
|
93638
|
-
/* @__PURE__ */
|
|
93639
|
-
/* @__PURE__ */
|
|
93640
|
-
/* @__PURE__ */
|
|
93824
|
+
return /* @__PURE__ */ jsxs29("div", { className: "flex flex-col items-center justify-center h-full text-center", children: [
|
|
93825
|
+
/* @__PURE__ */ jsx49(Key2, { className: "h-12 w-12 text-muted-foreground mb-4" }),
|
|
93826
|
+
/* @__PURE__ */ jsx49("h3", { className: "text-lg font-semibold mb-2", children: "Configure Your LLM Provider" }),
|
|
93827
|
+
/* @__PURE__ */ jsx49("p", { className: "text-sm text-muted-foreground mb-4 max-w-md", children: "To start chatting with the MCP server, you need to configure your LLM provider and API key. Your credentials are stored locally and used only for this chat." }),
|
|
93828
|
+
/* @__PURE__ */ jsxs29(
|
|
93641
93829
|
Button,
|
|
93642
93830
|
{
|
|
93643
93831
|
onClick: onConfigureClick,
|
|
93644
93832
|
"data-testid": "chat-configure-api-key-button",
|
|
93645
93833
|
children: [
|
|
93646
|
-
/* @__PURE__ */
|
|
93834
|
+
/* @__PURE__ */ jsx49(Settings2, { className: "h-4 w-4 mr-2" }),
|
|
93647
93835
|
"Configure API Key"
|
|
93648
93836
|
]
|
|
93649
93837
|
}
|
|
@@ -93656,43 +93844,18 @@ import { memo as memo4, useEffect as useEffect16, useRef as useRef12 } from "rea
|
|
|
93656
93844
|
|
|
93657
93845
|
// src/client/components/chat/AssistantMessage.tsx
|
|
93658
93846
|
import { Check as Check6, Copy as Copy6 } from "lucide-react";
|
|
93659
|
-
import { useState as
|
|
93847
|
+
import { useState as useState18 } from "react";
|
|
93660
93848
|
|
|
93661
93849
|
// src/client/components/shared/MarkdownRenderer.tsx
|
|
93662
93850
|
import { Check as Check5, Copy as Copy5 } from "lucide-react";
|
|
93663
93851
|
import Markdown from "markdown-to-jsx";
|
|
93664
|
-
import { useState as
|
|
93852
|
+
import { useState as useState17 } from "react";
|
|
93665
93853
|
import { Prism as SyntaxHighlighter2 } from "react-syntax-highlighter";
|
|
93666
93854
|
|
|
93667
|
-
// src/client/components/ui/checkbox.tsx
|
|
93668
|
-
import * as React10 from "react";
|
|
93669
|
-
import * as CheckboxPrimitive from "@radix-ui/react-checkbox";
|
|
93670
|
-
import { Check as Check4 } from "lucide-react";
|
|
93671
|
-
import { jsx as jsx48 } from "react/jsx-runtime";
|
|
93672
|
-
var Checkbox = React10.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx48(
|
|
93673
|
-
CheckboxPrimitive.Root,
|
|
93674
|
-
{
|
|
93675
|
-
ref,
|
|
93676
|
-
className: cn(
|
|
93677
|
-
"peer h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",
|
|
93678
|
-
className
|
|
93679
|
-
),
|
|
93680
|
-
...props,
|
|
93681
|
-
children: /* @__PURE__ */ jsx48(
|
|
93682
|
-
CheckboxPrimitive.Indicator,
|
|
93683
|
-
{
|
|
93684
|
-
className: cn("flex items-center justify-center text-current"),
|
|
93685
|
-
children: /* @__PURE__ */ jsx48(Check4, { className: "h-4 w-4" })
|
|
93686
|
-
}
|
|
93687
|
-
)
|
|
93688
|
-
}
|
|
93689
|
-
));
|
|
93690
|
-
Checkbox.displayName = CheckboxPrimitive.Root.displayName;
|
|
93691
|
-
|
|
93692
93855
|
// src/client/components/ui/table.tsx
|
|
93693
93856
|
import * as React11 from "react";
|
|
93694
|
-
import { jsx as
|
|
93695
|
-
var Table = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
93857
|
+
import { jsx as jsx50 } from "react/jsx-runtime";
|
|
93858
|
+
var Table = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx50("div", { className: "relative w-full overflow-auto", children: /* @__PURE__ */ jsx50(
|
|
93696
93859
|
"table",
|
|
93697
93860
|
{
|
|
93698
93861
|
ref,
|
|
@@ -93701,9 +93864,9 @@ var Table = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
|
93701
93864
|
}
|
|
93702
93865
|
) }));
|
|
93703
93866
|
Table.displayName = "Table";
|
|
93704
|
-
var TableHeader = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
93867
|
+
var TableHeader = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx50("thead", { ref, className: cn("[&_tr]:border-b", className), ...props }));
|
|
93705
93868
|
TableHeader.displayName = "TableHeader";
|
|
93706
|
-
var TableBody = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
93869
|
+
var TableBody = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx50(
|
|
93707
93870
|
"tbody",
|
|
93708
93871
|
{
|
|
93709
93872
|
ref,
|
|
@@ -93712,7 +93875,7 @@ var TableBody = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE_
|
|
|
93712
93875
|
}
|
|
93713
93876
|
));
|
|
93714
93877
|
TableBody.displayName = "TableBody";
|
|
93715
|
-
var TableFooter = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
93878
|
+
var TableFooter = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx50(
|
|
93716
93879
|
"tfoot",
|
|
93717
93880
|
{
|
|
93718
93881
|
ref,
|
|
@@ -93724,7 +93887,7 @@ var TableFooter = React11.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
93724
93887
|
}
|
|
93725
93888
|
));
|
|
93726
93889
|
TableFooter.displayName = "TableFooter";
|
|
93727
|
-
var TableRow = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
93890
|
+
var TableRow = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx50(
|
|
93728
93891
|
"tr",
|
|
93729
93892
|
{
|
|
93730
93893
|
ref,
|
|
@@ -93736,7 +93899,7 @@ var TableRow = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE__
|
|
|
93736
93899
|
}
|
|
93737
93900
|
));
|
|
93738
93901
|
TableRow.displayName = "TableRow";
|
|
93739
|
-
var TableHead = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
93902
|
+
var TableHead = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx50(
|
|
93740
93903
|
"th",
|
|
93741
93904
|
{
|
|
93742
93905
|
ref,
|
|
@@ -93748,7 +93911,7 @@ var TableHead = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE_
|
|
|
93748
93911
|
}
|
|
93749
93912
|
));
|
|
93750
93913
|
TableHead.displayName = "TableHead";
|
|
93751
|
-
var TableCell = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
93914
|
+
var TableCell = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx50(
|
|
93752
93915
|
"td",
|
|
93753
93916
|
{
|
|
93754
93917
|
ref,
|
|
@@ -93757,7 +93920,7 @@ var TableCell = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE_
|
|
|
93757
93920
|
}
|
|
93758
93921
|
));
|
|
93759
93922
|
TableCell.displayName = "TableCell";
|
|
93760
|
-
var TableCaption = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
93923
|
+
var TableCaption = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx50(
|
|
93761
93924
|
"caption",
|
|
93762
93925
|
{
|
|
93763
93926
|
ref,
|
|
@@ -93768,7 +93931,7 @@ var TableCaption = React11.forwardRef(({ className, ...props }, ref) => /* @__PU
|
|
|
93768
93931
|
TableCaption.displayName = "TableCaption";
|
|
93769
93932
|
|
|
93770
93933
|
// src/client/components/shared/MarkdownRenderer.tsx
|
|
93771
|
-
import { Fragment as Fragment9, jsx as
|
|
93934
|
+
import { Fragment as Fragment9, jsx as jsx51, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
93772
93935
|
function CodeBlock({
|
|
93773
93936
|
children,
|
|
93774
93937
|
className
|
|
@@ -93783,27 +93946,27 @@ function CodeBlock({
|
|
|
93783
93946
|
language = className.replace(/^(lang-|language-)\s*/, "").trim();
|
|
93784
93947
|
}
|
|
93785
93948
|
}
|
|
93786
|
-
const [isCopied, setIsCopied] =
|
|
93949
|
+
const [isCopied, setIsCopied] = useState17(false);
|
|
93787
93950
|
const codeContent = String(children).trim();
|
|
93788
93951
|
const handleCopy = async () => {
|
|
93789
93952
|
await navigator.clipboard.writeText(codeContent);
|
|
93790
93953
|
setIsCopied(true);
|
|
93791
93954
|
setTimeout(() => setIsCopied(false), 2e3);
|
|
93792
93955
|
};
|
|
93793
|
-
return /* @__PURE__ */
|
|
93794
|
-
/* @__PURE__ */
|
|
93795
|
-
/* @__PURE__ */
|
|
93796
|
-
/* @__PURE__ */
|
|
93956
|
+
return /* @__PURE__ */ jsxs30("div", { className: "my-4 relative group/code bg-muted rounded-md p-0", children: [
|
|
93957
|
+
/* @__PURE__ */ jsxs30("div", { className: "flex items-center justify-between mb-2 absolute top-0 left-0 w-full", children: [
|
|
93958
|
+
/* @__PURE__ */ jsx51("div", { className: "text-[10px] font-mono text-muted-foreground/50 bg-transparent px-2 py-0 rounded", children: language }),
|
|
93959
|
+
/* @__PURE__ */ jsx51(
|
|
93797
93960
|
"button",
|
|
93798
93961
|
{
|
|
93799
93962
|
className: "opacity-0 group-hover/code:opacity-100 transition-opacity text-muted-foreground hover:text-foreground text-xs flex items-center gap-1 px-2 py-1 rounded hover:bg-muted",
|
|
93800
93963
|
onClick: handleCopy,
|
|
93801
93964
|
title: "Copy code",
|
|
93802
|
-
children: isCopied ? /* @__PURE__ */
|
|
93965
|
+
children: isCopied ? /* @__PURE__ */ jsx51(Check5, { className: "h-3.5 w-3.5" }) : /* @__PURE__ */ jsx51(Copy5, { className: "h-3.5 w-3.5" })
|
|
93803
93966
|
}
|
|
93804
93967
|
)
|
|
93805
93968
|
] }),
|
|
93806
|
-
/* @__PURE__ */
|
|
93969
|
+
/* @__PURE__ */ jsx51(
|
|
93807
93970
|
SyntaxHighlighter2,
|
|
93808
93971
|
{
|
|
93809
93972
|
language,
|
|
@@ -93823,16 +93986,16 @@ function CodeBlock({
|
|
|
93823
93986
|
] });
|
|
93824
93987
|
}
|
|
93825
93988
|
function InlineCode({ children }) {
|
|
93826
|
-
return /* @__PURE__ */
|
|
93989
|
+
return /* @__PURE__ */ jsx51("code", { className: "bg-muted px-1.5 py-0.5 rounded text-sm font-mono", children });
|
|
93827
93990
|
}
|
|
93828
93991
|
function Code({
|
|
93829
93992
|
children,
|
|
93830
93993
|
className
|
|
93831
93994
|
}) {
|
|
93832
93995
|
if (className) {
|
|
93833
|
-
return /* @__PURE__ */
|
|
93996
|
+
return /* @__PURE__ */ jsx51(CodeBlock, { className, children });
|
|
93834
93997
|
}
|
|
93835
|
-
return /* @__PURE__ */
|
|
93998
|
+
return /* @__PURE__ */ jsx51(InlineCode, { children });
|
|
93836
93999
|
}
|
|
93837
94000
|
function ListItem({ children }) {
|
|
93838
94001
|
if (typeof children === "string") {
|
|
@@ -93840,9 +94003,9 @@ function ListItem({ children }) {
|
|
|
93840
94003
|
if (checkboxMatch) {
|
|
93841
94004
|
const isChecked = checkboxMatch[1].toLowerCase() === "x";
|
|
93842
94005
|
const text = checkboxMatch[2];
|
|
93843
|
-
return /* @__PURE__ */
|
|
93844
|
-
/* @__PURE__ */
|
|
93845
|
-
/* @__PURE__ */
|
|
94006
|
+
return /* @__PURE__ */ jsxs30("li", { className: "text-foreground flex items-center gap-2", children: [
|
|
94007
|
+
/* @__PURE__ */ jsx51(Checkbox, { checked: isChecked, disabled: true }),
|
|
94008
|
+
/* @__PURE__ */ jsx51("span", { children: text })
|
|
93846
94009
|
] });
|
|
93847
94010
|
}
|
|
93848
94011
|
}
|
|
@@ -93853,9 +94016,9 @@ function ListItem({ children }) {
|
|
|
93853
94016
|
if (checkboxMatch) {
|
|
93854
94017
|
const isChecked = checkboxMatch[1].toLowerCase() === "x";
|
|
93855
94018
|
const text = checkboxMatch[2];
|
|
93856
|
-
return /* @__PURE__ */
|
|
93857
|
-
/* @__PURE__ */
|
|
93858
|
-
/* @__PURE__ */
|
|
94019
|
+
return /* @__PURE__ */ jsxs30("li", { className: "text-foreground flex items-center gap-2", children: [
|
|
94020
|
+
/* @__PURE__ */ jsx51(Checkbox, { checked: isChecked, disabled: true }),
|
|
94021
|
+
/* @__PURE__ */ jsxs30("span", { children: [
|
|
93859
94022
|
text,
|
|
93860
94023
|
children.slice(1)
|
|
93861
94024
|
] })
|
|
@@ -93863,37 +94026,37 @@ function ListItem({ children }) {
|
|
|
93863
94026
|
}
|
|
93864
94027
|
}
|
|
93865
94028
|
}
|
|
93866
|
-
return /* @__PURE__ */
|
|
94029
|
+
return /* @__PURE__ */ jsx51("li", { className: "text-foreground", children });
|
|
93867
94030
|
}
|
|
93868
94031
|
function MarkdownRenderer({ content }) {
|
|
93869
|
-
return /* @__PURE__ */
|
|
94032
|
+
return /* @__PURE__ */ jsx51(
|
|
93870
94033
|
Markdown,
|
|
93871
94034
|
{
|
|
93872
94035
|
options: {
|
|
93873
94036
|
overrides: {
|
|
93874
94037
|
code: Code,
|
|
93875
|
-
pre: ({ children }) => /* @__PURE__ */
|
|
93876
|
-
h1: ({ children }) => /* @__PURE__ */
|
|
93877
|
-
h2: ({ children }) => /* @__PURE__ */
|
|
93878
|
-
h3: ({ children }) => /* @__PURE__ */
|
|
93879
|
-
h4: ({ children }) => /* @__PURE__ */
|
|
93880
|
-
h5: ({ children }) => /* @__PURE__ */
|
|
93881
|
-
h6: ({ children }) => /* @__PURE__ */
|
|
93882
|
-
p: ({ children }) => /* @__PURE__ */
|
|
93883
|
-
ul: ({ children }) => /* @__PURE__ */
|
|
93884
|
-
ol: ({ children }) => /* @__PURE__ */
|
|
94038
|
+
pre: ({ children }) => /* @__PURE__ */ jsx51(Fragment9, { children }),
|
|
94039
|
+
h1: ({ children }) => /* @__PURE__ */ jsx51("h1", { className: "text-xl font-bold text-foreground mb-2 mt-4", children }),
|
|
94040
|
+
h2: ({ children }) => /* @__PURE__ */ jsx51("h2", { className: "text-lg font-bold text-foreground mb-2 mt-4", children }),
|
|
94041
|
+
h3: ({ children }) => /* @__PURE__ */ jsx51("h3", { className: "text-base font-bold text-foreground mb-2 mt-4", children }),
|
|
94042
|
+
h4: ({ children }) => /* @__PURE__ */ jsx51("h4", { className: "text-sm font-bold text-foreground mb-2 mt-4", children }),
|
|
94043
|
+
h5: ({ children }) => /* @__PURE__ */ jsx51("h5", { className: "text-sm font-bold text-foreground mb-2 mt-4", children }),
|
|
94044
|
+
h6: ({ children }) => /* @__PURE__ */ jsx51("h6", { className: "text-sm font-bold text-foreground mb-2 mt-4", children }),
|
|
94045
|
+
p: ({ children }) => /* @__PURE__ */ jsx51("p", { className: "text-foreground mb-2 leading-relaxed", children }),
|
|
94046
|
+
ul: ({ children }) => /* @__PURE__ */ jsx51("ul", { className: "list-disc list-inside mb-3 space-y-1", children }),
|
|
94047
|
+
ol: ({ children }) => /* @__PURE__ */ jsx51("ol", { className: "list-decimal list-inside mb-3 space-y-1", children }),
|
|
93885
94048
|
li: ListItem,
|
|
93886
|
-
table: ({ children }) => /* @__PURE__ */
|
|
93887
|
-
thead: ({ children }) => /* @__PURE__ */
|
|
93888
|
-
tbody: ({ children }) => /* @__PURE__ */
|
|
93889
|
-
tr: ({ children }) => /* @__PURE__ */
|
|
93890
|
-
th: ({ children }) => /* @__PURE__ */
|
|
93891
|
-
td: ({ children }) => /* @__PURE__ */
|
|
93892
|
-
blockquote: ({ children }) => /* @__PURE__ */
|
|
94049
|
+
table: ({ children }) => /* @__PURE__ */ jsx51("div", { className: "my-4", children: /* @__PURE__ */ jsx51(Table, { children }) }),
|
|
94050
|
+
thead: ({ children }) => /* @__PURE__ */ jsx51(TableHeader, { children }),
|
|
94051
|
+
tbody: ({ children }) => /* @__PURE__ */ jsx51(TableBody, { children }),
|
|
94052
|
+
tr: ({ children }) => /* @__PURE__ */ jsx51(TableRow, { children }),
|
|
94053
|
+
th: ({ children }) => /* @__PURE__ */ jsx51(TableHead, { children }),
|
|
94054
|
+
td: ({ children }) => /* @__PURE__ */ jsx51(TableCell, { children }),
|
|
94055
|
+
blockquote: ({ children }) => /* @__PURE__ */ jsx51("blockquote", { className: "border-l-4 border-muted-foreground pl-4 italic text-muted-foreground mb-3", children }),
|
|
93893
94056
|
a: ({
|
|
93894
94057
|
children,
|
|
93895
94058
|
href
|
|
93896
|
-
}) => /* @__PURE__ */
|
|
94059
|
+
}) => /* @__PURE__ */ jsx51(
|
|
93897
94060
|
"a",
|
|
93898
94061
|
{
|
|
93899
94062
|
href,
|
|
@@ -93903,9 +94066,9 @@ function MarkdownRenderer({ content }) {
|
|
|
93903
94066
|
children
|
|
93904
94067
|
}
|
|
93905
94068
|
),
|
|
93906
|
-
strong: ({ children }) => /* @__PURE__ */
|
|
93907
|
-
em: ({ children }) => /* @__PURE__ */
|
|
93908
|
-
img: ({ src, alt }) => /* @__PURE__ */
|
|
94069
|
+
strong: ({ children }) => /* @__PURE__ */ jsx51("strong", { className: "font-semibold text-foreground", children }),
|
|
94070
|
+
em: ({ children }) => /* @__PURE__ */ jsx51("em", { className: "italic text-foreground", children }),
|
|
94071
|
+
img: ({ src, alt }) => /* @__PURE__ */ jsx51(
|
|
93909
94072
|
"img",
|
|
93910
94073
|
{
|
|
93911
94074
|
src,
|
|
@@ -93914,7 +94077,7 @@ function MarkdownRenderer({ content }) {
|
|
|
93914
94077
|
loading: "lazy"
|
|
93915
94078
|
}
|
|
93916
94079
|
),
|
|
93917
|
-
hr: () => /* @__PURE__ */
|
|
94080
|
+
hr: () => /* @__PURE__ */ jsx51("hr", { className: "my-4 border-t border-border" })
|
|
93918
94081
|
}
|
|
93919
94082
|
},
|
|
93920
94083
|
children: content
|
|
@@ -93923,21 +94086,21 @@ function MarkdownRenderer({ content }) {
|
|
|
93923
94086
|
}
|
|
93924
94087
|
|
|
93925
94088
|
// src/client/components/chat/AssistantMessage.tsx
|
|
93926
|
-
import { jsx as
|
|
94089
|
+
import { jsx as jsx52, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
93927
94090
|
function CopyButton({ text }) {
|
|
93928
|
-
const [isCopied, setIsCopied] =
|
|
94091
|
+
const [isCopied, setIsCopied] = useState18(false);
|
|
93929
94092
|
const handleCopy = async () => {
|
|
93930
94093
|
await navigator.clipboard.writeText(text);
|
|
93931
94094
|
setIsCopied(true);
|
|
93932
94095
|
setTimeout(() => setIsCopied(false), 2e3);
|
|
93933
94096
|
};
|
|
93934
|
-
return /* @__PURE__ */
|
|
94097
|
+
return /* @__PURE__ */ jsx52(
|
|
93935
94098
|
"button",
|
|
93936
94099
|
{
|
|
93937
94100
|
className: "opacity-0 group-hover/message:opacity-100 transition-opacity text-muted-foreground hover:text-foreground text-xs flex items-center gap-1",
|
|
93938
94101
|
onClick: handleCopy,
|
|
93939
94102
|
title: "Copy message content",
|
|
93940
|
-
children: isCopied ? /* @__PURE__ */
|
|
94103
|
+
children: isCopied ? /* @__PURE__ */ jsx52(Check6, { className: "h-3.5 w-3.5" }) : /* @__PURE__ */ jsx52(Copy6, { className: "h-3.5 w-3.5" })
|
|
93941
94104
|
}
|
|
93942
94105
|
);
|
|
93943
94106
|
}
|
|
@@ -93949,23 +94112,23 @@ function AssistantMessage({
|
|
|
93949
94112
|
if (!content || content.length === 0) {
|
|
93950
94113
|
return null;
|
|
93951
94114
|
}
|
|
93952
|
-
return /* @__PURE__ */
|
|
94115
|
+
return /* @__PURE__ */ jsx52(
|
|
93953
94116
|
"div",
|
|
93954
94117
|
{
|
|
93955
94118
|
className: "flex items-start gap-6 group/message relative",
|
|
93956
94119
|
"data-testid": "chat-message-assistant",
|
|
93957
|
-
children: /* @__PURE__ */
|
|
93958
|
-
/* @__PURE__ */
|
|
94120
|
+
children: /* @__PURE__ */ jsxs31("div", { className: "flex-1 min-w-0", children: [
|
|
94121
|
+
/* @__PURE__ */ jsx52("div", { className: "wrap-break-word", children: /* @__PURE__ */ jsx52(
|
|
93959
94122
|
"div",
|
|
93960
94123
|
{
|
|
93961
94124
|
className: "text-base leading-7 font-sans text-start wrap-break-word transition-all duration-300 ease-in-out",
|
|
93962
94125
|
"data-testid": "chat-message-content",
|
|
93963
|
-
children: /* @__PURE__ */
|
|
94126
|
+
children: /* @__PURE__ */ jsx52(MarkdownRenderer, { content })
|
|
93964
94127
|
}
|
|
93965
94128
|
) }),
|
|
93966
|
-
timestamp && /* @__PURE__ */
|
|
93967
|
-
/* @__PURE__ */
|
|
93968
|
-
/* @__PURE__ */
|
|
94129
|
+
timestamp && /* @__PURE__ */ jsxs31("div", { className: "flex items-center justify-between mt-2", children: [
|
|
94130
|
+
/* @__PURE__ */ jsx52("span", { className: "text-xs text-muted-foreground", children: new Date(timestamp).toLocaleTimeString() }),
|
|
94131
|
+
/* @__PURE__ */ jsx52(CopyButton, { text: content })
|
|
93969
94132
|
] })
|
|
93970
94133
|
] })
|
|
93971
94134
|
}
|
|
@@ -93973,9 +94136,9 @@ function AssistantMessage({
|
|
|
93973
94136
|
}
|
|
93974
94137
|
|
|
93975
94138
|
// src/client/components/chat/ToolCallDisplay.tsx
|
|
93976
|
-
import { Check as Check7, Copy as Copy7, Loader2 as Loader24, Wrench, X as X7 } from "lucide-react";
|
|
93977
|
-
import { useState as
|
|
93978
|
-
import { jsx as
|
|
94139
|
+
import { Check as Check7, Copy as Copy7, Loader2 as Loader24, Wrench as Wrench2, X as X7 } from "lucide-react";
|
|
94140
|
+
import { useState as useState19 } from "react";
|
|
94141
|
+
import { jsx as jsx53, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
93979
94142
|
function ToolCallDisplay({
|
|
93980
94143
|
toolName,
|
|
93981
94144
|
args,
|
|
@@ -93983,18 +94146,18 @@ function ToolCallDisplay({
|
|
|
93983
94146
|
state = "result",
|
|
93984
94147
|
partialArgs
|
|
93985
94148
|
}) {
|
|
93986
|
-
const [_copied, setCopied] =
|
|
94149
|
+
const [_copied, setCopied] = useState19(false);
|
|
93987
94150
|
const displayArgs = state === "call" && partialArgs ? partialArgs : args;
|
|
93988
94151
|
const getStatusIcon = () => {
|
|
93989
94152
|
switch (state) {
|
|
93990
94153
|
case "call":
|
|
93991
|
-
return /* @__PURE__ */
|
|
94154
|
+
return /* @__PURE__ */ jsx53(Loader24, { className: "h-4 w-4 animate-spin text-blue-500 dark:text-blue-400" });
|
|
93992
94155
|
case "result":
|
|
93993
|
-
return /* @__PURE__ */
|
|
94156
|
+
return /* @__PURE__ */ jsx53(Check7, { className: "h-4 w-4 text-emerald-800 dark:text-emerald-400" });
|
|
93994
94157
|
case "error":
|
|
93995
|
-
return /* @__PURE__ */
|
|
94158
|
+
return /* @__PURE__ */ jsx53(X7, { className: "h-4 w-4 text-red-500 dark:text-red-400" });
|
|
93996
94159
|
default:
|
|
93997
|
-
return /* @__PURE__ */
|
|
94160
|
+
return /* @__PURE__ */ jsx53(Check7, { className: "h-4 w-4 text-emerald-800 dark:text-emerald-400" });
|
|
93998
94161
|
}
|
|
93999
94162
|
};
|
|
94000
94163
|
const getStatusBg = () => {
|
|
@@ -94021,24 +94184,24 @@ function ToolCallDisplay({
|
|
|
94021
94184
|
}
|
|
94022
94185
|
return String(content);
|
|
94023
94186
|
};
|
|
94024
|
-
return /* @__PURE__ */
|
|
94025
|
-
/* @__PURE__ */
|
|
94187
|
+
return /* @__PURE__ */ jsxs32(Sheet, { children: [
|
|
94188
|
+
/* @__PURE__ */ jsx53(SheetTrigger, { asChild: true, children: /* @__PURE__ */ jsxs32(
|
|
94026
94189
|
"div",
|
|
94027
94190
|
{
|
|
94028
94191
|
className: "flex max-w-min items-center gap-3 p-1 rounded-full border bg-card hover:bg-accent/50 transition-colors cursor-pointer my-4",
|
|
94029
94192
|
"data-testid": `chat-tool-call-${toolName}`,
|
|
94030
94193
|
children: [
|
|
94031
|
-
/* @__PURE__ */
|
|
94032
|
-
/* @__PURE__ */
|
|
94194
|
+
/* @__PURE__ */ jsx53("div", { className: "w-8 h-8 rounded-full bg-zinc-100 dark:bg-zinc-900 border border-zinc-200 dark:border-zinc-800 flex items-center justify-center shrink-0", children: /* @__PURE__ */ jsx53(Wrench2, { className: "size-4 text-muted-foreground" }) }),
|
|
94195
|
+
/* @__PURE__ */ jsx53("div", { className: "flex-1 min-w-0", children: /* @__PURE__ */ jsx53("div", { className: "flex items-center gap-2", children: /* @__PURE__ */ jsxs32("span", { className: "text-sm font-medium truncate", children: [
|
|
94033
94196
|
toolName,
|
|
94034
94197
|
"(",
|
|
94035
|
-
Object.keys(displayArgs).length > 0 ? /* @__PURE__ */
|
|
94198
|
+
Object.keys(displayArgs).length > 0 ? /* @__PURE__ */ jsxs32("span", { className: "bg-muted-foreground/20 rounded-full px-1.5 mx-1 py-0.5 text-xs", children: [
|
|
94036
94199
|
Object.keys(displayArgs).length,
|
|
94037
94200
|
" args"
|
|
94038
94201
|
] }) : "",
|
|
94039
94202
|
")"
|
|
94040
94203
|
] }) }) }),
|
|
94041
|
-
/* @__PURE__ */
|
|
94204
|
+
/* @__PURE__ */ jsx53(
|
|
94042
94205
|
"div",
|
|
94043
94206
|
{
|
|
94044
94207
|
className: cn(
|
|
@@ -94052,34 +94215,34 @@ function ToolCallDisplay({
|
|
|
94052
94215
|
]
|
|
94053
94216
|
}
|
|
94054
94217
|
) }),
|
|
94055
|
-
/* @__PURE__ */
|
|
94218
|
+
/* @__PURE__ */ jsxs32(
|
|
94056
94219
|
SheetContent,
|
|
94057
94220
|
{
|
|
94058
94221
|
side: "right",
|
|
94059
94222
|
className: "w-[400px] sm:w-[540px] p-4 overflow-y-auto",
|
|
94060
94223
|
"data-testid": "chat-tool-drawer",
|
|
94061
94224
|
children: [
|
|
94062
|
-
/* @__PURE__ */
|
|
94063
|
-
/* @__PURE__ */
|
|
94064
|
-
/* @__PURE__ */
|
|
94225
|
+
/* @__PURE__ */ jsxs32(SheetHeader, { children: [
|
|
94226
|
+
/* @__PURE__ */ jsxs32(SheetTitle, { className: "flex items-center gap-2", children: [
|
|
94227
|
+
/* @__PURE__ */ jsx53(Wrench2, { className: "h-5 w-5" }),
|
|
94065
94228
|
"Tool Call Details"
|
|
94066
94229
|
] }),
|
|
94067
|
-
/* @__PURE__ */
|
|
94230
|
+
/* @__PURE__ */ jsxs32(SheetDescription, { className: "flex items-center gap-2", children: [
|
|
94068
94231
|
toolName,
|
|
94069
94232
|
" \u2014 ",
|
|
94070
94233
|
state,
|
|
94071
|
-
state === "call" && /* @__PURE__ */
|
|
94072
|
-
/* @__PURE__ */
|
|
94234
|
+
state === "call" && /* @__PURE__ */ jsxs32("span", { className: "flex items-center gap-1 text-blue-500 dark:text-blue-400", children: [
|
|
94235
|
+
/* @__PURE__ */ jsx53(Loader24, { className: "h-3 w-3 animate-spin" }),
|
|
94073
94236
|
"streaming\u2026"
|
|
94074
94237
|
] })
|
|
94075
94238
|
] })
|
|
94076
94239
|
] }),
|
|
94077
|
-
/* @__PURE__ */
|
|
94078
|
-
/* @__PURE__ */
|
|
94079
|
-
/* @__PURE__ */
|
|
94080
|
-
/* @__PURE__ */
|
|
94081
|
-
/* @__PURE__ */
|
|
94082
|
-
/* @__PURE__ */
|
|
94240
|
+
/* @__PURE__ */ jsxs32("div", { className: "flex flex-col gap-6 py-4", children: [
|
|
94241
|
+
/* @__PURE__ */ jsxs32("div", { children: [
|
|
94242
|
+
/* @__PURE__ */ jsx53("h3", { className: "text-sm font-medium mb-2", children: "Arguments" }),
|
|
94243
|
+
/* @__PURE__ */ jsxs32("div", { className: "relative", "data-testid": "chat-tool-drawer-args", children: [
|
|
94244
|
+
/* @__PURE__ */ jsx53("pre", { className: "text-xs bg-muted/50 rounded-lg p-3 overflow-x-auto border font-mono leading-relaxed max-h-48 whitespace-pre-wrap break-words", children: formatContent(displayArgs) }),
|
|
94245
|
+
/* @__PURE__ */ jsx53(
|
|
94083
94246
|
Button,
|
|
94084
94247
|
{
|
|
94085
94248
|
variant: "ghost",
|
|
@@ -94087,14 +94250,14 @@ function ToolCallDisplay({
|
|
|
94087
94250
|
onClick: () => copyToClipboard(formatContent(displayArgs)),
|
|
94088
94251
|
className: "absolute top-2 right-2 h-6 w-6 p-0 opacity-70 hover:opacity-100",
|
|
94089
94252
|
title: "Copy arguments",
|
|
94090
|
-
children: /* @__PURE__ */
|
|
94253
|
+
children: /* @__PURE__ */ jsx53(Copy7, { className: "h-3 w-3" })
|
|
94091
94254
|
}
|
|
94092
94255
|
)
|
|
94093
94256
|
] })
|
|
94094
94257
|
] }),
|
|
94095
|
-
result && /* @__PURE__ */
|
|
94096
|
-
/* @__PURE__ */
|
|
94097
|
-
/* @__PURE__ */
|
|
94258
|
+
result && /* @__PURE__ */ jsxs32("div", { children: [
|
|
94259
|
+
/* @__PURE__ */ jsx53("h3", { className: "text-sm font-medium mb-2", children: "Result" }),
|
|
94260
|
+
/* @__PURE__ */ jsx53("div", { className: "relative", "data-testid": "chat-tool-drawer-result", children: typeof result === "string" ? /* @__PURE__ */ jsxs32(
|
|
94098
94261
|
"div",
|
|
94099
94262
|
{
|
|
94100
94263
|
className: cn(
|
|
@@ -94102,11 +94265,11 @@ function ToolCallDisplay({
|
|
|
94102
94265
|
state === "error" ? "bg-destructive/10 border-destructive/20 text-destructive-foreground" : "bg-muted/30 border-border"
|
|
94103
94266
|
),
|
|
94104
94267
|
children: [
|
|
94105
|
-
result.startsWith("Error") ? /* @__PURE__ */
|
|
94106
|
-
/* @__PURE__ */
|
|
94107
|
-
/* @__PURE__ */
|
|
94108
|
-
] }) : /* @__PURE__ */
|
|
94109
|
-
/* @__PURE__ */
|
|
94268
|
+
result.startsWith("Error") ? /* @__PURE__ */ jsxs32("div", { className: "font-mono", children: [
|
|
94269
|
+
/* @__PURE__ */ jsx53("div", { className: "font-semibold text-destructive mb-1", children: "Error:" }),
|
|
94270
|
+
/* @__PURE__ */ jsx53("div", { className: "whitespace-pre-wrap break-words", children: result.replace(/^Error:\s*/, "") })
|
|
94271
|
+
] }) : /* @__PURE__ */ jsx53("div", { className: "whitespace-pre-wrap font-mono break-words", children: result }),
|
|
94272
|
+
/* @__PURE__ */ jsx53(
|
|
94110
94273
|
Button,
|
|
94111
94274
|
{
|
|
94112
94275
|
variant: "ghost",
|
|
@@ -94114,12 +94277,12 @@ function ToolCallDisplay({
|
|
|
94114
94277
|
onClick: () => copyToClipboard(result),
|
|
94115
94278
|
className: "absolute top-2 right-2 h-6 w-6 p-0 opacity-70 hover:opacity-100",
|
|
94116
94279
|
title: "Copy result",
|
|
94117
|
-
children: /* @__PURE__ */
|
|
94280
|
+
children: /* @__PURE__ */ jsx53(Copy7, { className: "h-3 w-3" })
|
|
94118
94281
|
}
|
|
94119
94282
|
)
|
|
94120
94283
|
]
|
|
94121
94284
|
}
|
|
94122
|
-
) : /* @__PURE__ */
|
|
94285
|
+
) : /* @__PURE__ */ jsxs32(
|
|
94123
94286
|
"div",
|
|
94124
94287
|
{
|
|
94125
94288
|
className: cn(
|
|
@@ -94127,14 +94290,14 @@ function ToolCallDisplay({
|
|
|
94127
94290
|
state === "error" ? "bg-destructive/10 border-destructive/20 text-destructive-foreground" : "bg-muted/30 border-border"
|
|
94128
94291
|
),
|
|
94129
94292
|
children: [
|
|
94130
|
-
/* @__PURE__ */
|
|
94293
|
+
/* @__PURE__ */ jsx53(
|
|
94131
94294
|
JSONDisplay,
|
|
94132
94295
|
{
|
|
94133
94296
|
data: result,
|
|
94134
94297
|
filename: `tool-call-${toolName}-result-${Date.now()}.json`
|
|
94135
94298
|
}
|
|
94136
94299
|
),
|
|
94137
|
-
/* @__PURE__ */
|
|
94300
|
+
/* @__PURE__ */ jsx53(
|
|
94138
94301
|
Button,
|
|
94139
94302
|
{
|
|
94140
94303
|
variant: "ghost",
|
|
@@ -94142,7 +94305,7 @@ function ToolCallDisplay({
|
|
|
94142
94305
|
onClick: () => copyToClipboard(JSON.stringify(result, null, 2)),
|
|
94143
94306
|
className: "absolute top-2 right-2 h-6 w-6 p-0 opacity-70 hover:opacity-100",
|
|
94144
94307
|
title: "Copy result",
|
|
94145
|
-
children: /* @__PURE__ */
|
|
94308
|
+
children: /* @__PURE__ */ jsx53(Copy7, { className: "h-3 w-3" })
|
|
94146
94309
|
}
|
|
94147
94310
|
)
|
|
94148
94311
|
]
|
|
@@ -94157,7 +94320,7 @@ function ToolCallDisplay({
|
|
|
94157
94320
|
}
|
|
94158
94321
|
|
|
94159
94322
|
// src/client/components/chat/UserMessage.tsx
|
|
94160
|
-
import { jsx as
|
|
94323
|
+
import { jsx as jsx54, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
94161
94324
|
function UserMessage({
|
|
94162
94325
|
content,
|
|
94163
94326
|
timestamp,
|
|
@@ -94166,23 +94329,23 @@ function UserMessage({
|
|
|
94166
94329
|
if ((!content || content.length === 0) && (!attachments || attachments.length === 0)) {
|
|
94167
94330
|
return null;
|
|
94168
94331
|
}
|
|
94169
|
-
return /* @__PURE__ */
|
|
94332
|
+
return /* @__PURE__ */ jsx54(
|
|
94170
94333
|
"div",
|
|
94171
94334
|
{
|
|
94172
94335
|
className: "flex items-start gap-3 justify-end group/user-message",
|
|
94173
94336
|
"data-testid": "chat-message-user",
|
|
94174
|
-
children: /* @__PURE__ */
|
|
94175
|
-
/* @__PURE__ */
|
|
94337
|
+
children: /* @__PURE__ */ jsxs33("div", { className: "flex-1 min-w-0 flex flex-col items-end", children: [
|
|
94338
|
+
/* @__PURE__ */ jsxs33(
|
|
94176
94339
|
"div",
|
|
94177
94340
|
{
|
|
94178
94341
|
className: "bg-zinc-200 dark:bg-zinc-800 text-primary rounded-3xl px-4 py-2 max-w-[80%] break-words",
|
|
94179
94342
|
"data-testid": "chat-message-content",
|
|
94180
94343
|
children: [
|
|
94181
|
-
attachments && attachments.length > 0 && /* @__PURE__ */
|
|
94344
|
+
attachments && attachments.length > 0 && /* @__PURE__ */ jsx54("div", { className: "flex flex-wrap gap-2 mb-2", children: attachments.map((attachment, index) => /* @__PURE__ */ jsx54(
|
|
94182
94345
|
"div",
|
|
94183
94346
|
{
|
|
94184
94347
|
className: "rounded-lg overflow-hidden border border-zinc-300 dark:border-zinc-700",
|
|
94185
|
-
children: /* @__PURE__ */
|
|
94348
|
+
children: /* @__PURE__ */ jsx54(
|
|
94186
94349
|
"img",
|
|
94187
94350
|
{
|
|
94188
94351
|
src: `data:${attachment.mimeType};base64,${attachment.data}`,
|
|
@@ -94193,18 +94356,18 @@ function UserMessage({
|
|
|
94193
94356
|
},
|
|
94194
94357
|
index
|
|
94195
94358
|
)) }),
|
|
94196
|
-
content && content.length > 0 && /* @__PURE__ */
|
|
94359
|
+
content && content.length > 0 && /* @__PURE__ */ jsx54("p", { className: "text-base leading-7 font-sans text-start break-words", children: content })
|
|
94197
94360
|
]
|
|
94198
94361
|
}
|
|
94199
94362
|
),
|
|
94200
|
-
timestamp && /* @__PURE__ */
|
|
94363
|
+
timestamp && /* @__PURE__ */ jsx54("span", { className: "text-xs text-muted-foreground mt-1", children: new Date(timestamp).toLocaleTimeString() })
|
|
94201
94364
|
] })
|
|
94202
94365
|
}
|
|
94203
94366
|
);
|
|
94204
94367
|
}
|
|
94205
94368
|
|
|
94206
94369
|
// src/client/components/chat/MessageList.tsx
|
|
94207
|
-
import { Fragment as Fragment10, jsx as
|
|
94370
|
+
import { Fragment as Fragment10, jsx as jsx55, jsxs as jsxs34 } from "react/jsx-runtime";
|
|
94208
94371
|
var MessageList = memo4(
|
|
94209
94372
|
({
|
|
94210
94373
|
messages,
|
|
@@ -94253,13 +94416,13 @@ var MessageList = memo4(
|
|
|
94253
94416
|
const lastMessage = messages[messages.length - 1];
|
|
94254
94417
|
return message.id === lastMessage.id && lastMessage.role === "assistant";
|
|
94255
94418
|
};
|
|
94256
|
-
return /* @__PURE__ */
|
|
94419
|
+
return /* @__PURE__ */ jsxs34("div", { className: "space-y-6 max-w-3xl mx-auto px-2", children: [
|
|
94257
94420
|
messages.map((message) => {
|
|
94258
94421
|
const contentStr = typeof message.content === "string" ? message.content : Array.isArray(message.content) ? message.content.map(
|
|
94259
94422
|
(item) => typeof item === "string" ? item : item.text || JSON.stringify(item)
|
|
94260
94423
|
).join("") : JSON.stringify(message.content);
|
|
94261
94424
|
if (message.role === "user") {
|
|
94262
|
-
return /* @__PURE__ */
|
|
94425
|
+
return /* @__PURE__ */ jsx55(
|
|
94263
94426
|
UserMessage,
|
|
94264
94427
|
{
|
|
94265
94428
|
content: contentStr,
|
|
@@ -94270,10 +94433,10 @@ var MessageList = memo4(
|
|
|
94270
94433
|
);
|
|
94271
94434
|
}
|
|
94272
94435
|
if (message.role === "assistant") {
|
|
94273
|
-
return /* @__PURE__ */
|
|
94436
|
+
return /* @__PURE__ */ jsx55("div", { className: "space-y-4", children: message.parts && message.parts.length > 0 ? message.parts.map((part, partIndex) => {
|
|
94274
94437
|
const partKey = part.type === "text" ? `${message.id}-text-${partIndex}-${part.text?.slice(0, 20)}` : `${message.id}-tool-${part.toolInvocation?.toolName}-${partIndex}`;
|
|
94275
94438
|
if (part.type === "text") {
|
|
94276
|
-
return /* @__PURE__ */
|
|
94439
|
+
return /* @__PURE__ */ jsx55(
|
|
94277
94440
|
AssistantMessage,
|
|
94278
94441
|
{
|
|
94279
94442
|
content: part.text || "",
|
|
@@ -94283,8 +94446,8 @@ var MessageList = memo4(
|
|
|
94283
94446
|
partKey
|
|
94284
94447
|
);
|
|
94285
94448
|
} else if (part.type === "tool-invocation" && part.toolInvocation) {
|
|
94286
|
-
return /* @__PURE__ */
|
|
94287
|
-
/* @__PURE__ */
|
|
94449
|
+
return /* @__PURE__ */ jsxs34("div", { children: [
|
|
94450
|
+
/* @__PURE__ */ jsx55(
|
|
94288
94451
|
ToolCallDisplay,
|
|
94289
94452
|
{
|
|
94290
94453
|
toolName: part.toolInvocation.toolName,
|
|
@@ -94294,7 +94457,7 @@ var MessageList = memo4(
|
|
|
94294
94457
|
partialArgs: part.toolInvocation.partialArgs
|
|
94295
94458
|
}
|
|
94296
94459
|
),
|
|
94297
|
-
(part.toolInvocation.result || part.toolInvocation.state === "streaming" || isWidgetTool(part.toolInvocation.toolName)) && /* @__PURE__ */
|
|
94460
|
+
(part.toolInvocation.result || part.toolInvocation.state === "streaming" || isWidgetTool(part.toolInvocation.toolName)) && /* @__PURE__ */ jsx55(
|
|
94298
94461
|
ToolResultRenderer,
|
|
94299
94462
|
{
|
|
94300
94463
|
toolName: part.toolInvocation.toolName,
|
|
@@ -94314,8 +94477,8 @@ var MessageList = memo4(
|
|
|
94314
94477
|
] }, partKey);
|
|
94315
94478
|
}
|
|
94316
94479
|
return null;
|
|
94317
|
-
}) : /* @__PURE__ */
|
|
94318
|
-
/* @__PURE__ */
|
|
94480
|
+
}) : /* @__PURE__ */ jsxs34(Fragment10, { children: [
|
|
94481
|
+
/* @__PURE__ */ jsx55(
|
|
94319
94482
|
AssistantMessage,
|
|
94320
94483
|
{
|
|
94321
94484
|
content: contentStr,
|
|
@@ -94323,10 +94486,10 @@ var MessageList = memo4(
|
|
|
94323
94486
|
_isStreaming: isMessageStreaming(message)
|
|
94324
94487
|
}
|
|
94325
94488
|
),
|
|
94326
|
-
message.toolCalls && message.toolCalls.length > 0 && /* @__PURE__ */
|
|
94489
|
+
message.toolCalls && message.toolCalls.length > 0 && /* @__PURE__ */ jsx55("div", { className: "space-y-2", children: message.toolCalls.map((toolCall) => {
|
|
94327
94490
|
const toolCallKey = `${message.id}-${toolCall.toolName}-${JSON.stringify(toolCall.args).slice(0, 50)}`;
|
|
94328
|
-
return /* @__PURE__ */
|
|
94329
|
-
/* @__PURE__ */
|
|
94491
|
+
return /* @__PURE__ */ jsxs34("div", { children: [
|
|
94492
|
+
/* @__PURE__ */ jsx55(
|
|
94330
94493
|
ToolCallDisplay,
|
|
94331
94494
|
{
|
|
94332
94495
|
toolName: toolCall.toolName,
|
|
@@ -94335,7 +94498,7 @@ var MessageList = memo4(
|
|
|
94335
94498
|
state: toolCall.result ? "result" : "call"
|
|
94336
94499
|
}
|
|
94337
94500
|
),
|
|
94338
|
-
(toolCall.result || isWidgetTool(toolCall.toolName)) && /* @__PURE__ */
|
|
94501
|
+
(toolCall.result || isWidgetTool(toolCall.toolName)) && /* @__PURE__ */ jsx55(
|
|
94339
94502
|
ToolResultRenderer,
|
|
94340
94503
|
{
|
|
94341
94504
|
toolName: toolCall.toolName,
|
|
@@ -94354,14 +94517,14 @@ var MessageList = memo4(
|
|
|
94354
94517
|
}
|
|
94355
94518
|
return null;
|
|
94356
94519
|
}),
|
|
94357
|
-
isThinking && /* @__PURE__ */
|
|
94358
|
-
/* @__PURE__ */
|
|
94520
|
+
isThinking && /* @__PURE__ */ jsx55("div", { className: "flex items-start gap-3", children: /* @__PURE__ */ jsx55("div", { className: "flex-1", children: /* @__PURE__ */ jsx55("div", { className: "rounded-lg p-4 max-w-fit", children: /* @__PURE__ */ jsx55("div", { className: "flex items-center gap-2", children: /* @__PURE__ */ jsx55("span", { className: "text-sm", children: /* @__PURE__ */ jsx55(TextShimmer, { duration: 2, spread: 1, children: "Thinking..." }) }) }) }) }) }),
|
|
94521
|
+
/* @__PURE__ */ jsx55("div", { ref: messagesEndRef })
|
|
94359
94522
|
] });
|
|
94360
94523
|
}
|
|
94361
94524
|
);
|
|
94362
94525
|
|
|
94363
94526
|
// src/client/components/chat/useChatMessages.ts
|
|
94364
|
-
import { useCallback as
|
|
94527
|
+
import { useCallback as useCallback14, useRef as useRef13, useState as useState20 } from "react";
|
|
94365
94528
|
|
|
94366
94529
|
// src/client/components/chat/conversion.ts
|
|
94367
94530
|
import { AIMessage, HumanMessage } from "@langchain/core/messages";
|
|
@@ -94471,11 +94634,11 @@ function useChatMessages({
|
|
|
94471
94634
|
chatApiUrl,
|
|
94472
94635
|
widgetModelContexts
|
|
94473
94636
|
}) {
|
|
94474
|
-
const [messages, setMessages] =
|
|
94475
|
-
const [isLoading, setIsLoading] =
|
|
94476
|
-
const [attachments, setAttachments] =
|
|
94637
|
+
const [messages, setMessages] = useState20([]);
|
|
94638
|
+
const [isLoading, setIsLoading] = useState20(false);
|
|
94639
|
+
const [attachments, setAttachments] = useState20([]);
|
|
94477
94640
|
const abortControllerRef = useRef13(null);
|
|
94478
|
-
const sendMessage =
|
|
94641
|
+
const sendMessage = useCallback14(
|
|
94479
94642
|
async (userInput, promptResults) => {
|
|
94480
94643
|
const hasContent = userInput.trim() || promptResults.length > 0 || attachments.length > 0;
|
|
94481
94644
|
if (!hasContent || !llmConfig || !isConnected) {
|
|
@@ -94754,15 +94917,15 @@ ${parts2.join("\n")}`
|
|
|
94754
94917
|
chatApiUrl
|
|
94755
94918
|
]
|
|
94756
94919
|
);
|
|
94757
|
-
const clearMessages =
|
|
94920
|
+
const clearMessages = useCallback14(() => {
|
|
94758
94921
|
setMessages([]);
|
|
94759
94922
|
}, []);
|
|
94760
|
-
const stop =
|
|
94923
|
+
const stop = useCallback14(() => {
|
|
94761
94924
|
if (abortControllerRef.current) {
|
|
94762
94925
|
abortControllerRef.current.abort();
|
|
94763
94926
|
}
|
|
94764
94927
|
}, []);
|
|
94765
|
-
const addAttachment =
|
|
94928
|
+
const addAttachment = useCallback14(async (file) => {
|
|
94766
94929
|
try {
|
|
94767
94930
|
const attachment = await fileToAttachment(file);
|
|
94768
94931
|
setAttachments((prev) => {
|
|
@@ -94781,10 +94944,10 @@ ${parts2.join("\n")}`
|
|
|
94781
94944
|
}
|
|
94782
94945
|
}
|
|
94783
94946
|
}, []);
|
|
94784
|
-
const removeAttachment =
|
|
94947
|
+
const removeAttachment = useCallback14((index) => {
|
|
94785
94948
|
setAttachments((prev) => prev.filter((_2, i2) => i2 !== index));
|
|
94786
94949
|
}, []);
|
|
94787
|
-
const clearAttachments =
|
|
94950
|
+
const clearAttachments = useCallback14(() => {
|
|
94788
94951
|
setAttachments([]);
|
|
94789
94952
|
}, []);
|
|
94790
94953
|
return {
|
|
@@ -94801,21 +94964,23 @@ ${parts2.join("\n")}`
|
|
|
94801
94964
|
}
|
|
94802
94965
|
|
|
94803
94966
|
// src/client/components/chat/useChatMessagesClientSide.ts
|
|
94804
|
-
import { useCallback as
|
|
94967
|
+
import { useCallback as useCallback15, useRef as useRef14, useState as useState21 } from "react";
|
|
94805
94968
|
function useChatMessagesClientSide({
|
|
94806
94969
|
connection,
|
|
94807
94970
|
llmConfig,
|
|
94808
94971
|
isConnected,
|
|
94809
94972
|
readResource,
|
|
94810
|
-
widgetModelContexts
|
|
94973
|
+
widgetModelContexts,
|
|
94974
|
+
disabledTools
|
|
94811
94975
|
}) {
|
|
94812
|
-
const [messages, setMessages] =
|
|
94813
|
-
const [isLoading, setIsLoading] =
|
|
94814
|
-
const [attachments, setAttachments] =
|
|
94976
|
+
const [messages, setMessages] = useState21([]);
|
|
94977
|
+
const [isLoading, setIsLoading] = useState21(false);
|
|
94978
|
+
const [attachments, setAttachments] = useState21([]);
|
|
94815
94979
|
const abortControllerRef = useRef14(null);
|
|
94816
94980
|
const agentRef = useRef14(null);
|
|
94817
94981
|
const llmRef = useRef14(null);
|
|
94818
|
-
const
|
|
94982
|
+
const lastDisabledToolsRef = useRef14("");
|
|
94983
|
+
const sendMessage = useCallback15(
|
|
94819
94984
|
async (userInput, promptResults) => {
|
|
94820
94985
|
const hasContent = userInput.trim() || promptResults.length > 0 || attachments.length > 0;
|
|
94821
94986
|
if (!hasContent || !llmConfig || !isConnected) {
|
|
@@ -94893,21 +95058,22 @@ function useChatMessagesClientSide({
|
|
|
94893
95058
|
apiKey: llmConfig.apiKey
|
|
94894
95059
|
};
|
|
94895
95060
|
}
|
|
94896
|
-
|
|
95061
|
+
const disallowedToolsArr = disabledTools ? [...disabledTools].sort() : [];
|
|
95062
|
+
const disallowedToolsKey = disallowedToolsArr.join(",");
|
|
95063
|
+
const needsNewAgent = !agentRef.current || agentRef.current.llm !== llmRef.current.instance || lastDisabledToolsRef.current !== disallowedToolsKey;
|
|
95064
|
+
if (needsNewAgent) {
|
|
94897
95065
|
const { MCPAgent: MCPAgent2 } = await Promise.resolve().then(() => (init_browser(), browser_exports));
|
|
94898
95066
|
agentRef.current = new MCPAgent2({
|
|
94899
95067
|
llm: llmRef.current.instance,
|
|
94900
95068
|
client: connection.client ?? void 0,
|
|
94901
95069
|
memoryEnabled: false,
|
|
94902
|
-
|
|
94903
|
-
|
|
95070
|
+
exposeResourcesAsTools: false,
|
|
95071
|
+
exposePromptsAsTools: false,
|
|
95072
|
+
disallowedTools: disallowedToolsArr.length > 0 ? disallowedToolsArr : void 0,
|
|
95073
|
+
systemPrompt: "You are a helpful assistant with access to MCP tools. Help users interact with the MCP server."
|
|
94904
95074
|
});
|
|
94905
95075
|
await agentRef.current.initialize();
|
|
94906
|
-
|
|
94907
|
-
console.log(
|
|
94908
|
-
"[useChatMessagesClientSide] Reusing existing agent. History length:",
|
|
94909
|
-
agentRef.current.conversationHistory?.length
|
|
94910
|
-
);
|
|
95076
|
+
lastDisabledToolsRef.current = disallowedToolsKey;
|
|
94911
95077
|
}
|
|
94912
95078
|
const widgetContextMessages = [];
|
|
94913
95079
|
if (widgetModelContexts && widgetModelContexts.size > 0) {
|
|
@@ -95281,20 +95447,28 @@ ${parts2.join("\n")}`,
|
|
|
95281
95447
|
abortControllerRef.current = null;
|
|
95282
95448
|
}
|
|
95283
95449
|
},
|
|
95284
|
-
[
|
|
95450
|
+
[
|
|
95451
|
+
connection,
|
|
95452
|
+
llmConfig,
|
|
95453
|
+
isConnected,
|
|
95454
|
+
messages,
|
|
95455
|
+
readResource,
|
|
95456
|
+
attachments,
|
|
95457
|
+
disabledTools
|
|
95458
|
+
]
|
|
95285
95459
|
);
|
|
95286
|
-
const clearMessages =
|
|
95460
|
+
const clearMessages = useCallback15(() => {
|
|
95287
95461
|
setMessages([]);
|
|
95288
95462
|
if (agentRef.current) {
|
|
95289
95463
|
agentRef.current.clearConversationHistory();
|
|
95290
95464
|
}
|
|
95291
95465
|
}, []);
|
|
95292
|
-
const stop =
|
|
95466
|
+
const stop = useCallback15(() => {
|
|
95293
95467
|
if (abortControllerRef.current) {
|
|
95294
95468
|
abortControllerRef.current.abort();
|
|
95295
95469
|
}
|
|
95296
95470
|
}, []);
|
|
95297
|
-
const addAttachment =
|
|
95471
|
+
const addAttachment = useCallback15(async (file) => {
|
|
95298
95472
|
try {
|
|
95299
95473
|
const attachment = await fileToAttachment(file);
|
|
95300
95474
|
setAttachments((prev) => {
|
|
@@ -95313,10 +95487,10 @@ ${parts2.join("\n")}`,
|
|
|
95313
95487
|
}
|
|
95314
95488
|
}
|
|
95315
95489
|
}, []);
|
|
95316
|
-
const removeAttachment =
|
|
95490
|
+
const removeAttachment = useCallback15((index) => {
|
|
95317
95491
|
setAttachments((prev) => prev.filter((_2, i2) => i2 !== index));
|
|
95318
95492
|
}, []);
|
|
95319
|
-
const clearAttachments =
|
|
95493
|
+
const clearAttachments = useCallback15(() => {
|
|
95320
95494
|
setAttachments([]);
|
|
95321
95495
|
}, []);
|
|
95322
95496
|
return {
|
|
@@ -95333,7 +95507,7 @@ ${parts2.join("\n")}`,
|
|
|
95333
95507
|
}
|
|
95334
95508
|
|
|
95335
95509
|
// src/client/components/chat/useConfig.ts
|
|
95336
|
-
import { useCallback as
|
|
95510
|
+
import { useCallback as useCallback16, useEffect as useEffect17, useState as useState22 } from "react";
|
|
95337
95511
|
|
|
95338
95512
|
// src/client/components/chat/types.ts
|
|
95339
95513
|
var DEFAULT_MODELS = {
|
|
@@ -95344,13 +95518,13 @@ var DEFAULT_MODELS = {
|
|
|
95344
95518
|
|
|
95345
95519
|
// src/client/components/chat/useConfig.ts
|
|
95346
95520
|
function useConfig({ mcpServerUrl }) {
|
|
95347
|
-
const [llmConfig, setLLMConfig] =
|
|
95348
|
-
const [authConfig, setAuthConfig] =
|
|
95349
|
-
const [configDialogOpen, setConfigDialogOpen] =
|
|
95350
|
-
const [tempProvider, setTempProvider] =
|
|
95351
|
-
const [tempApiKey, setTempApiKey] =
|
|
95352
|
-
const [tempModel, setTempModel] =
|
|
95353
|
-
const getApiKeys =
|
|
95521
|
+
const [llmConfig, setLLMConfig] = useState22(null);
|
|
95522
|
+
const [authConfig, setAuthConfig] = useState22(null);
|
|
95523
|
+
const [configDialogOpen, setConfigDialogOpen] = useState22(false);
|
|
95524
|
+
const [tempProvider, setTempProvider] = useState22("openai");
|
|
95525
|
+
const [tempApiKey, setTempApiKey] = useState22("");
|
|
95526
|
+
const [tempModel, setTempModel] = useState22(DEFAULT_MODELS.openai);
|
|
95527
|
+
const getApiKeys = useCallback16(() => {
|
|
95354
95528
|
const saved = localStorage.getItem("mcp-inspector-api-keys");
|
|
95355
95529
|
if (saved) {
|
|
95356
95530
|
try {
|
|
@@ -95362,13 +95536,13 @@ function useConfig({ mcpServerUrl }) {
|
|
|
95362
95536
|
}
|
|
95363
95537
|
return {};
|
|
95364
95538
|
}, []);
|
|
95365
|
-
const saveApiKeys =
|
|
95539
|
+
const saveApiKeys = useCallback16((apiKeys) => {
|
|
95366
95540
|
localStorage.setItem("mcp-inspector-api-keys", JSON.stringify(apiKeys));
|
|
95367
95541
|
}, []);
|
|
95368
|
-
const [tempAuthType, setTempAuthType] =
|
|
95369
|
-
const [tempUsername, setTempUsername] =
|
|
95370
|
-
const [tempPassword, setTempPassword] =
|
|
95371
|
-
const [tempToken, setTempToken] =
|
|
95542
|
+
const [tempAuthType, setTempAuthType] = useState22("none");
|
|
95543
|
+
const [tempUsername, setTempUsername] = useState22("");
|
|
95544
|
+
const [tempPassword, setTempPassword] = useState22("");
|
|
95545
|
+
const [tempToken, setTempToken] = useState22("");
|
|
95372
95546
|
useEffect17(() => {
|
|
95373
95547
|
const loadConfig = () => {
|
|
95374
95548
|
const saved = localStorage.getItem("mcp-inspector-llm-config");
|
|
@@ -95435,7 +95609,7 @@ function useConfig({ mcpServerUrl }) {
|
|
|
95435
95609
|
const apiKeys = getApiKeys();
|
|
95436
95610
|
setTempApiKey(apiKeys[tempProvider] || "");
|
|
95437
95611
|
}, [tempProvider, getApiKeys]);
|
|
95438
|
-
const saveLLMConfig =
|
|
95612
|
+
const saveLLMConfig = useCallback16(() => {
|
|
95439
95613
|
if (!tempApiKey.trim()) {
|
|
95440
95614
|
return;
|
|
95441
95615
|
}
|
|
@@ -95480,7 +95654,7 @@ function useConfig({ mcpServerUrl }) {
|
|
|
95480
95654
|
getApiKeys,
|
|
95481
95655
|
saveApiKeys
|
|
95482
95656
|
]);
|
|
95483
|
-
const clearConfig =
|
|
95657
|
+
const clearConfig = useCallback16(() => {
|
|
95484
95658
|
setLLMConfig(null);
|
|
95485
95659
|
setAuthConfig(null);
|
|
95486
95660
|
const apiKeys = getApiKeys();
|
|
@@ -95512,7 +95686,7 @@ function useConfig({ mcpServerUrl }) {
|
|
|
95512
95686
|
}
|
|
95513
95687
|
|
|
95514
95688
|
// src/client/components/ChatTab.tsx
|
|
95515
|
-
import { jsx as
|
|
95689
|
+
import { jsx as jsx56, jsxs as jsxs35 } from "react/jsx-runtime";
|
|
95516
95690
|
var PROMPT_TRIGGER_REGEX = /(?:^\/$|\s+\/$)/;
|
|
95517
95691
|
var PROMPT_ARROW_KEYS = ["ArrowDown", "ArrowUp", "Escape", "Enter"];
|
|
95518
95692
|
function ChatTab({
|
|
@@ -95536,13 +95710,21 @@ function ChatTab({
|
|
|
95536
95710
|
chatQuickQuestions = [],
|
|
95537
95711
|
chatFollowups = []
|
|
95538
95712
|
}) {
|
|
95539
|
-
const [inputValue, setInputValue] =
|
|
95540
|
-
const [promptsDropdownOpen, setPromptsDropdownOpen] =
|
|
95541
|
-
const [promptFocusedIndex, setPromptFocusedIndex] =
|
|
95542
|
-
const [quickQuestions, setQuickQuestions] =
|
|
95543
|
-
const [followups, setFollowups] =
|
|
95713
|
+
const [inputValue, setInputValue] = useState23("");
|
|
95714
|
+
const [promptsDropdownOpen, setPromptsDropdownOpen] = useState23(false);
|
|
95715
|
+
const [promptFocusedIndex, setPromptFocusedIndex] = useState23(-1);
|
|
95716
|
+
const [quickQuestions, setQuickQuestions] = useState23(chatQuickQuestions);
|
|
95717
|
+
const [followups, setFollowups] = useState23(chatFollowups);
|
|
95718
|
+
const [disabledTools, setDisabledTools] = useState23(/* @__PURE__ */ new Set());
|
|
95544
95719
|
const textareaRef = useRef15(null);
|
|
95545
95720
|
const triggerSpanRef = useRef15(null);
|
|
95721
|
+
const toolInfos = useMemo13(
|
|
95722
|
+
() => (connection.tools ?? []).map((t2) => ({
|
|
95723
|
+
name: t2.name,
|
|
95724
|
+
description: t2.description
|
|
95725
|
+
})),
|
|
95726
|
+
[connection.tools]
|
|
95727
|
+
);
|
|
95546
95728
|
const {
|
|
95547
95729
|
llmConfig: localLlmConfig,
|
|
95548
95730
|
authConfig: userAuthConfig,
|
|
@@ -95566,7 +95748,8 @@ function ChatTab({
|
|
|
95566
95748
|
llmConfig,
|
|
95567
95749
|
isConnected,
|
|
95568
95750
|
readResource,
|
|
95569
|
-
widgetModelContexts
|
|
95751
|
+
widgetModelContexts,
|
|
95752
|
+
disabledTools
|
|
95570
95753
|
};
|
|
95571
95754
|
const serverSideChat = useChatMessages({
|
|
95572
95755
|
mcpServerUrl: connection.url,
|
|
@@ -95601,18 +95784,18 @@ function ChatTab({
|
|
|
95601
95784
|
callPrompt,
|
|
95602
95785
|
serverId
|
|
95603
95786
|
});
|
|
95604
|
-
const sanitizeStringList =
|
|
95787
|
+
const sanitizeStringList = useCallback17((input) => {
|
|
95605
95788
|
if (!Array.isArray(input)) return [];
|
|
95606
95789
|
return input.filter((item) => typeof item === "string").map((item) => item.trim()).filter(Boolean).slice(0, 8);
|
|
95607
95790
|
}, []);
|
|
95608
|
-
const serializeMessageContent =
|
|
95791
|
+
const serializeMessageContent = useCallback17((message) => {
|
|
95609
95792
|
if (typeof message.content === "string") return message.content;
|
|
95610
95793
|
if (Array.isArray(message.content)) {
|
|
95611
95794
|
return message.content.map((item) => typeof item === "string" ? item : item.text ?? "").join("");
|
|
95612
95795
|
}
|
|
95613
95796
|
return "";
|
|
95614
95797
|
}, []);
|
|
95615
|
-
const getSerializedMessages =
|
|
95798
|
+
const getSerializedMessages = useCallback17(() => {
|
|
95616
95799
|
return messages.map((message) => ({
|
|
95617
95800
|
id: message.id,
|
|
95618
95801
|
role: message.role,
|
|
@@ -95620,7 +95803,7 @@ function ChatTab({
|
|
|
95620
95803
|
timestamp: message.timestamp
|
|
95621
95804
|
}));
|
|
95622
95805
|
}, [messages, serializeMessageContent]);
|
|
95623
|
-
const postBridgeEvent =
|
|
95806
|
+
const postBridgeEvent = useCallback17(
|
|
95624
95807
|
(type, payload = {}) => {
|
|
95625
95808
|
if (typeof window === "undefined" || window.parent === window) return;
|
|
95626
95809
|
window.parent.postMessage(
|
|
@@ -95748,12 +95931,12 @@ function ChatTab({
|
|
|
95748
95931
|
useKeyboardShortcuts(
|
|
95749
95932
|
enableKeyboardShortcuts ? { onNewChat: clearMessages } : {}
|
|
95750
95933
|
);
|
|
95751
|
-
const clearPromptsUIState =
|
|
95934
|
+
const clearPromptsUIState = useCallback17(() => {
|
|
95752
95935
|
setPromptFocusedIndex(-1);
|
|
95753
95936
|
setPromptsDropdownOpen(false);
|
|
95754
95937
|
triggerSpanRef.current = null;
|
|
95755
95938
|
}, []);
|
|
95756
|
-
const updatePromptsDropdownState =
|
|
95939
|
+
const updatePromptsDropdownState = useCallback17(() => {
|
|
95757
95940
|
if (!textareaRef.current) {
|
|
95758
95941
|
return;
|
|
95759
95942
|
}
|
|
@@ -95784,12 +95967,12 @@ function ChatTab({
|
|
|
95784
95967
|
}
|
|
95785
95968
|
updatePromptsDropdownState();
|
|
95786
95969
|
}, [inputValue, updatePromptsDropdownState]);
|
|
95787
|
-
const clearPromptsState =
|
|
95970
|
+
const clearPromptsState = useCallback17(() => {
|
|
95788
95971
|
setSelectedPrompt(null);
|
|
95789
95972
|
setPromptArgs({});
|
|
95790
95973
|
clearPromptsUIState();
|
|
95791
95974
|
}, [clearPromptsUIState]);
|
|
95792
|
-
const handlePromptSelect =
|
|
95975
|
+
const handlePromptSelect = useCallback17(
|
|
95793
95976
|
async (prompt) => {
|
|
95794
95977
|
setSelectedPrompt(prompt);
|
|
95795
95978
|
if (prompt.arguments && prompt.arguments.length > 0) {
|
|
@@ -95819,7 +96002,7 @@ function ChatTab({
|
|
|
95819
96002
|
},
|
|
95820
96003
|
[executePrompt, clearPromptsState, inputValue]
|
|
95821
96004
|
);
|
|
95822
|
-
const handleSendMessage =
|
|
96005
|
+
const handleSendMessage = useCallback17(() => {
|
|
95823
96006
|
const hasContent = inputValue.trim() || results.length > 0 || attachments.length > 0;
|
|
95824
96007
|
if (!hasContent) {
|
|
95825
96008
|
return;
|
|
@@ -95828,7 +96011,7 @@ function ChatTab({
|
|
|
95828
96011
|
setInputValue("");
|
|
95829
96012
|
clearPromptResults();
|
|
95830
96013
|
}, [inputValue, results, sendMessage, clearPromptResults, attachments]);
|
|
95831
|
-
const handlePromptKeyDown =
|
|
96014
|
+
const handlePromptKeyDown = useCallback17(
|
|
95832
96015
|
(e2) => {
|
|
95833
96016
|
if (e2.key === "ArrowDown") {
|
|
95834
96017
|
setPromptFocusedIndex((prev) => {
|
|
@@ -95857,7 +96040,7 @@ function ChatTab({
|
|
|
95857
96040
|
clearPromptsUIState
|
|
95858
96041
|
]
|
|
95859
96042
|
);
|
|
95860
|
-
const handleKeyDown =
|
|
96043
|
+
const handleKeyDown = useCallback17(
|
|
95861
96044
|
(e2) => {
|
|
95862
96045
|
if (PROMPT_ARROW_KEYS.includes(e2.key) && promptsDropdownOpen) {
|
|
95863
96046
|
e2.preventDefault();
|
|
@@ -95869,7 +96052,7 @@ function ChatTab({
|
|
|
95869
96052
|
},
|
|
95870
96053
|
[handleSendMessage, handlePromptKeyDown, promptsDropdownOpen]
|
|
95871
96054
|
);
|
|
95872
|
-
const handleKeyUp =
|
|
96055
|
+
const handleKeyUp = useCallback17(
|
|
95873
96056
|
(e2) => {
|
|
95874
96057
|
if (e2.key === "ArrowLeft" || e2.key === "ArrowRight") {
|
|
95875
96058
|
updatePromptsDropdownState();
|
|
@@ -95877,11 +96060,11 @@ function ChatTab({
|
|
|
95877
96060
|
},
|
|
95878
96061
|
[updatePromptsDropdownState]
|
|
95879
96062
|
);
|
|
95880
|
-
const handleClearConfig =
|
|
96063
|
+
const handleClearConfig = useCallback17(() => {
|
|
95881
96064
|
clearConfig();
|
|
95882
96065
|
clearMessages();
|
|
95883
96066
|
}, [clearConfig, clearMessages]);
|
|
95884
|
-
const handleQuickQuestionSelect =
|
|
96067
|
+
const handleQuickQuestionSelect = useCallback17(
|
|
95885
96068
|
(question) => {
|
|
95886
96069
|
if (!question.trim()) return;
|
|
95887
96070
|
if (!llmConfig || !isConnected) return;
|
|
@@ -95894,7 +96077,7 @@ function ChatTab({
|
|
|
95894
96077
|
},
|
|
95895
96078
|
[postBridgeEvent, sendMessage, llmConfig, isConnected]
|
|
95896
96079
|
);
|
|
95897
|
-
const handleFollowupSelect =
|
|
96080
|
+
const handleFollowupSelect = useCallback17(
|
|
95898
96081
|
(followup) => {
|
|
95899
96082
|
if (!followup.trim()) return;
|
|
95900
96083
|
if (!llmConfig || !isConnected) return;
|
|
@@ -95908,8 +96091,8 @@ function ChatTab({
|
|
|
95908
96091
|
[postBridgeEvent, sendMessage, llmConfig, isConnected]
|
|
95909
96092
|
);
|
|
95910
96093
|
if (llmConfig && messages.length === 0) {
|
|
95911
|
-
return /* @__PURE__ */
|
|
95912
|
-
!isManaged && /* @__PURE__ */
|
|
96094
|
+
return /* @__PURE__ */ jsxs35("div", { className: "flex flex-col h-full", children: [
|
|
96095
|
+
!isManaged && /* @__PURE__ */ jsx56("div", { className: "absolute top-4 right-4 z-10", children: /* @__PURE__ */ jsx56(
|
|
95913
96096
|
ConfigurationDialog,
|
|
95914
96097
|
{
|
|
95915
96098
|
open: configDialogOpen,
|
|
@@ -95926,7 +96109,7 @@ function ChatTab({
|
|
|
95926
96109
|
buttonLabel: "Change API Key"
|
|
95927
96110
|
}
|
|
95928
96111
|
) }),
|
|
95929
|
-
/* @__PURE__ */
|
|
96112
|
+
/* @__PURE__ */ jsx56(
|
|
95930
96113
|
ChatLandingForm,
|
|
95931
96114
|
{
|
|
95932
96115
|
mcpServerUrl: connection.url,
|
|
@@ -95941,6 +96124,9 @@ function ChatTab({
|
|
|
95941
96124
|
selectedPrompt,
|
|
95942
96125
|
promptResults: results,
|
|
95943
96126
|
attachments,
|
|
96127
|
+
tools: toolInfos,
|
|
96128
|
+
disabledTools,
|
|
96129
|
+
onDisabledToolsChange: setDisabledTools,
|
|
95944
96130
|
onDeletePromptResult: handleDeleteResult,
|
|
95945
96131
|
onPromptSelect: handlePromptSelect,
|
|
95946
96132
|
onInputChange: setInputValue,
|
|
@@ -95962,8 +96148,8 @@ function ChatTab({
|
|
|
95962
96148
|
)
|
|
95963
96149
|
] });
|
|
95964
96150
|
}
|
|
95965
|
-
return /* @__PURE__ */
|
|
95966
|
-
/* @__PURE__ */
|
|
96151
|
+
return /* @__PURE__ */ jsxs35("div", { className: "flex flex-col h-full relative", children: [
|
|
96152
|
+
/* @__PURE__ */ jsx56(
|
|
95967
96153
|
ChatHeader,
|
|
95968
96154
|
{
|
|
95969
96155
|
llmConfig,
|
|
@@ -95988,12 +96174,12 @@ function ChatTab({
|
|
|
95988
96174
|
clearButtonVariant
|
|
95989
96175
|
}
|
|
95990
96176
|
),
|
|
95991
|
-
/* @__PURE__ */
|
|
96177
|
+
/* @__PURE__ */ jsx56("div", { className: "flex-1 overflow-y-auto p-2 sm:p-4 pt-[80px] sm:pt-[100px]", children: !llmConfig ? /* @__PURE__ */ jsx56(
|
|
95992
96178
|
ConfigureEmptyState,
|
|
95993
96179
|
{
|
|
95994
96180
|
onConfigureClick: () => setConfigDialogOpen(true)
|
|
95995
96181
|
}
|
|
95996
|
-
) : /* @__PURE__ */
|
|
96182
|
+
) : /* @__PURE__ */ jsx56(
|
|
95997
96183
|
MessageList,
|
|
95998
96184
|
{
|
|
95999
96185
|
messages,
|
|
@@ -96005,7 +96191,7 @@ function ChatTab({
|
|
|
96005
96191
|
serverBaseUrl: connection.url
|
|
96006
96192
|
}
|
|
96007
96193
|
) }),
|
|
96008
|
-
llmConfig && /* @__PURE__ */
|
|
96194
|
+
llmConfig && /* @__PURE__ */ jsx56(
|
|
96009
96195
|
ChatInputArea,
|
|
96010
96196
|
{
|
|
96011
96197
|
inputValue,
|
|
@@ -96018,6 +96204,9 @@ function ChatTab({
|
|
|
96018
96204
|
promptResults: results,
|
|
96019
96205
|
selectedPrompt,
|
|
96020
96206
|
attachments,
|
|
96207
|
+
tools: toolInfos,
|
|
96208
|
+
disabledTools,
|
|
96209
|
+
onDisabledToolsChange: setDisabledTools,
|
|
96021
96210
|
onDeletePromptResult: handleDeleteResult,
|
|
96022
96211
|
onPromptSelect: handlePromptSelect,
|
|
96023
96212
|
onInputChange: setInputValue,
|