@xpert-ai/chatkit-ui 0.0.11 → 0.0.16
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/app/assets/{abap-CWzFNSp-.js → abap-BoIjZmaZ.js} +1 -1
- package/dist/app/assets/{abnf-BxCFtB4s.js → abnf-dSbn3xkN.js} +1 -1
- package/dist/app/assets/{actionscript-BMVcZIWM.js → actionscript-ChuNDFqb.js} +1 -1
- package/dist/app/assets/{ada-dl2GoC8H.js → ada-Dvd3C277.js} +1 -1
- package/dist/app/assets/{agda-D4pBWumw.js → agda-0xfHec_W.js} +1 -1
- package/dist/app/assets/{al-DN0MgvqQ.js → al-Coze2G4P.js} +1 -1
- package/dist/app/assets/{antlr4-CGc7Ys0O.js → antlr4-DAeOwqy-.js} +1 -1
- package/dist/app/assets/{apacheconf-CGJnbgp4.js → apacheconf-C37ePIkJ.js} +1 -1
- package/dist/app/assets/{apex-ByEj4aCS.js → apex-DH8r9Bnu.js} +1 -1
- package/dist/app/assets/{apl-CZoiimft.js → apl-G86Tst_e.js} +1 -1
- package/dist/app/assets/{applescript-n8m_Jzeh.js → applescript-D7AnwBsW.js} +1 -1
- package/dist/app/assets/{aql-BHYPVYEd.js → aql-CEIMa69e.js} +1 -1
- package/dist/app/assets/{arduino-DOwjV1xr.js → arduino-C4__FgG7.js} +1 -1
- package/dist/app/assets/{arff-DDAls7WH.js → arff-DucTCOwY.js} +1 -1
- package/dist/app/assets/{asciidoc-CDg0i7az.js → asciidoc-b6l_xRT-.js} +1 -1
- package/dist/app/assets/{asm6502-gRZ7mYMo.js → asm6502-B2aeOPaQ.js} +1 -1
- package/dist/app/assets/{asmatmel-m61heT5k.js → asmatmel-DWoi6J9F.js} +1 -1
- package/dist/app/assets/{aspnet-C3LE21kz.js → aspnet-CWRG9aUZ.js} +1 -1
- package/dist/app/assets/{autohotkey-DzTDmePJ.js → autohotkey-B0_8QbTJ.js} +1 -1
- package/dist/app/assets/{autoit-Cnhhv2qU.js → autoit-CHJRnMaa.js} +1 -1
- package/dist/app/assets/{avisynth-BrJReYCb.js → avisynth-nYVaucuS.js} +1 -1
- package/dist/app/assets/{avro-idl-CaBS_m5w.js → avro-idl-5HEY8nyQ.js} +1 -1
- package/dist/app/assets/{bash-Bg2wTUUd.js → bash-CbjNmFNe.js} +1 -1
- package/dist/app/assets/{basic-DGW2DfId.js → basic-Bk4MU9TY.js} +1 -1
- package/dist/app/assets/{batch-CFcNVGyG.js → batch-BVR1Z-Ze.js} +1 -1
- package/dist/app/assets/{bbcode-BqKfVTdS.js → bbcode-BXZzCVWs.js} +1 -1
- package/dist/app/assets/{bicep-CSj7qJLn.js → bicep-C7--NbzV.js} +1 -1
- package/dist/app/assets/{birb-CZ_UnLaE.js → birb-BoaEfruo.js} +1 -1
- package/dist/app/assets/{bison-AJPkLJ01.js → bison-46XaAAX9.js} +1 -1
- package/dist/app/assets/{bnf-C4wLUeiV.js → bnf-iXMbAgBJ.js} +1 -1
- package/dist/app/assets/{brainfuck-CtynTwQW.js → brainfuck-Jzxh49W2.js} +1 -1
- package/dist/app/assets/{brightscript-6fcqU7un.js → brightscript-BadaxwXh.js} +1 -1
- package/dist/app/assets/{bro-BHjD18jy.js → bro-CR7xdyd-.js} +1 -1
- package/dist/app/assets/{bsl-u3z--w0F.js → bsl-9EeFiwxQ.js} +1 -1
- package/dist/app/assets/{c-BqSyeoF5.js → c-DQ7liO6a.js} +1 -1
- package/dist/app/assets/{cfscript-Ba3ohzJU.js → cfscript-SALoq7FX.js} +1 -1
- package/dist/app/assets/{chaiscript-B1kf0tLX.js → chaiscript-CNEL74a4.js} +1 -1
- package/dist/app/assets/{cil-Bbq_Pohc.js → cil-C2ZEDTDB.js} +1 -1
- package/dist/app/assets/{clike-BQY1uX2J.js → clike-DsD21Evf.js} +1 -1
- package/dist/app/assets/{clojure-CD5FzqN8.js → clojure-CZHHyOHz.js} +1 -1
- package/dist/app/assets/{cmake-E4O60FXO.js → cmake-CTchcqYX.js} +1 -1
- package/dist/app/assets/{cobol-4mBujo3m.js → cobol-BiftCL-L.js} +1 -1
- package/dist/app/assets/{coffeescript-CePI6Tdq.js → coffeescript-DijTcNNW.js} +1 -1
- package/dist/app/assets/{concurnas-uDjQZLaY.js → concurnas-ard6ErmL.js} +1 -1
- package/dist/app/assets/{coq-CaOpj4UX.js → coq-i9-qHej_.js} +1 -1
- package/dist/app/assets/{core-pu1AeMbV.js → core-aj5JZjcO.js} +1 -1
- package/dist/app/assets/{cpp-CcW-8rTc.js → cpp-BT7nVZr2.js} +1 -1
- package/dist/app/assets/{crystal-DRfBhOgf.js → crystal-_iZ0Q5Jk.js} +1 -1
- package/dist/app/assets/{csharp-BEQdGJcF.js → csharp-CTQVhFeP.js} +1 -1
- package/dist/app/assets/{cshtml-5ml03XNo.js → cshtml-DVHl3YlJ.js} +1 -1
- package/dist/app/assets/{csp-Behk06iM.js → csp-Jhq_JW1m.js} +1 -1
- package/dist/app/assets/{css-DXGELfz6.js → css-Cokpob_V.js} +1 -1
- package/dist/app/assets/{css-extras-B_cNEgHi.js → css-extras-BZG-mKgU.js} +1 -1
- package/dist/app/assets/{csv-CVwcNBm7.js → csv-DJ6MtS6f.js} +1 -1
- package/dist/app/assets/{cypher-BcNVi6vJ.js → cypher-DLIBipvO.js} +1 -1
- package/dist/app/assets/{d-HttcRaBz.js → d-vgJqU9a6.js} +1 -1
- package/dist/app/assets/{dart-BW2vioEe.js → dart-mEK1vzDL.js} +1 -1
- package/dist/app/assets/{dataweave-Bd5xMJuj.js → dataweave-Dgcq8Rdn.js} +1 -1
- package/dist/app/assets/{dax-DfpKP7XF.js → dax-C7NOquac.js} +1 -1
- package/dist/app/assets/{dhall-BqQAmdDY.js → dhall-DQcztP06.js} +1 -1
- package/dist/app/assets/{diff-Q6gyzp1p.js → diff-CIWhtMw0.js} +1 -1
- package/dist/app/assets/{django-CBK6CHRd.js → django-B28DWuEq.js} +1 -1
- package/dist/app/assets/{dns-zone-file-CNh7YnMq.js → dns-zone-file-C0LYWClw.js} +1 -1
- package/dist/app/assets/{docker-B_Q25cYf.js → docker-XC07_dge.js} +1 -1
- package/dist/app/assets/{dot-CNzlgF5r.js → dot-B-cLSr2L.js} +1 -1
- package/dist/app/assets/{ebnf-CFKzKpl0.js → ebnf-LdHuV98Q.js} +1 -1
- package/dist/app/assets/{editorconfig-CiSrxVma.js → editorconfig-6qFF56uJ.js} +1 -1
- package/dist/app/assets/{eiffel-BfApOLd3.js → eiffel-BBlop-Ob.js} +1 -1
- package/dist/app/assets/{ejs-4Dd6gLZA.js → ejs-Cpb8mc_5.js} +1 -1
- package/dist/app/assets/{elixir-DWUeUQTK.js → elixir-BCH_jx6L.js} +1 -1
- package/dist/app/assets/{elm-BL5Cpktc.js → elm-BYitJ5N8.js} +1 -1
- package/dist/app/assets/{erb-DUtgA_WM.js → erb-BM71CWBM.js} +1 -1
- package/dist/app/assets/{erlang-nZyH6Oo4.js → erlang-C3MAiPYK.js} +1 -1
- package/dist/app/assets/{etlua-BXUfGRLO.js → etlua-B59J9deP.js} +1 -1
- package/dist/app/assets/{excel-formula-DP8NQckB.js → excel-formula-DL0sVnhe.js} +1 -1
- package/dist/app/assets/{factor-D9oMyJYq.js → factor-C0qd9-Ik.js} +1 -1
- package/dist/app/assets/{false-C5KgjRg_.js → false-CJfgqy4_.js} +1 -1
- package/dist/app/assets/{firestore-security-rules-h4rD4BAP.js → firestore-security-rules-DwecoR3J.js} +1 -1
- package/dist/app/assets/{flow-CtGPm__x.js → flow-CDbqIUbL.js} +1 -1
- package/dist/app/assets/{fortran-JKmvOaKb.js → fortran-hpiaS8_6.js} +1 -1
- package/dist/app/assets/{fsharp-CY-kWYXS.js → fsharp-DbRhkxgi.js} +1 -1
- package/dist/app/assets/{ftl-lDx2eN4b.js → ftl-1DykyJWZ.js} +1 -1
- package/dist/app/assets/{gap-CbzqI0Rg.js → gap-DoGlEwd3.js} +1 -1
- package/dist/app/assets/{gcode-B0j0LQok.js → gcode-D-Px2cE_.js} +1 -1
- package/dist/app/assets/{gdscript-OeCrPajz.js → gdscript-BrNoOncy.js} +1 -1
- package/dist/app/assets/{gedcom-dvLxXwAu.js → gedcom-B_NdfrML.js} +1 -1
- package/dist/app/assets/{gherkin-DKAe3RsJ.js → gherkin-CqgRkfNX.js} +1 -1
- package/dist/app/assets/{git-DvC3-v9a.js → git-CvFmzhfv.js} +1 -1
- package/dist/app/assets/{glsl-Du_zalDB.js → glsl-CLucsEPA.js} +1 -1
- package/dist/app/assets/{gml-okrayOzA.js → gml-BlpkejAp.js} +1 -1
- package/dist/app/assets/{gn-BRy21STB.js → gn-BhXi_GxX.js} +1 -1
- package/dist/app/assets/{go-BoOL6e-2.js → go-2dcH9sSS.js} +1 -1
- package/dist/app/assets/{go-module-CreBO_WI.js → go-module-DzMt3K71.js} +1 -1
- package/dist/app/assets/{graphql-B8puKuqv.js → graphql-dsIFYpYZ.js} +1 -1
- package/dist/app/assets/{groovy-Rr-99oQa.js → groovy-DgzpjP_D.js} +1 -1
- package/dist/app/assets/{haml-B16TW3OA.js → haml-DT74cpdh.js} +1 -1
- package/dist/app/assets/{handlebars-DJ35T0jG.js → handlebars-Dz1-cyuE.js} +1 -1
- package/dist/app/assets/{haskell-CNmIr1qp.js → haskell-BtvH26fL.js} +1 -1
- package/dist/app/assets/{haxe-BP0489Ny.js → haxe-CJ2gszbA.js} +1 -1
- package/dist/app/assets/{hcl-BZ0mKM4I.js → hcl-BNZH9Ib9.js} +1 -1
- package/dist/app/assets/{hlsl-BvuUfy9Y.js → hlsl-CSuHbA9t.js} +1 -1
- package/dist/app/assets/{hoon-F9stahw9.js → hoon-BeJF0lUF.js} +1 -1
- package/dist/app/assets/{hpkp-BTP6fPb6.js → hpkp-Biss6dVt.js} +1 -1
- package/dist/app/assets/{hsts-B4iFfqi0.js → hsts-CLEmT2zf.js} +1 -1
- package/dist/app/assets/{http-BsKsFgBg.js → http-CTrWhEI8.js} +1 -1
- package/dist/app/assets/{ichigojam-Br86wNcB.js → ichigojam-CM00i9P4.js} +1 -1
- package/dist/app/assets/{icon-DOq3L_9O.js → icon-DEnOKKOC.js} +1 -1
- package/dist/app/assets/{icu-message-format-D7BXTTd2.js → icu-message-format-3z4ane6q.js} +1 -1
- package/dist/app/assets/{idris-Cff7mPno.js → idris-CkNPAoKr.js} +1 -1
- package/dist/app/assets/{iecst-kzhp9nKs.js → iecst-3D5UGiz6.js} +1 -1
- package/dist/app/assets/{ignore-DZYE9Szm.js → ignore-BrbB_BSD.js} +1 -1
- package/dist/app/assets/index-BTGdEmOx.css +1 -0
- package/dist/app/assets/index-DAVw-s04.js +439 -0
- package/dist/app/assets/{inform7-Dz2gt0-c.js → inform7-XNwha8I1.js} +1 -1
- package/dist/app/assets/{ini-Btpvp4DT.js → ini-DLlwf2gT.js} +1 -1
- package/dist/app/assets/{io-fpXGYgAV.js → io-D2RYUqys.js} +1 -1
- package/dist/app/assets/{j-8UK359TD.js → j-BasAkJbf.js} +1 -1
- package/dist/app/assets/{java-CcEYgaqi.js → java-6c1Mm3IN.js} +1 -1
- package/dist/app/assets/{javadoc-BYWdVRGr.js → javadoc-CRaAlfqw.js} +1 -1
- package/dist/app/assets/{javadoclike-DZIZZJFp.js → javadoclike-9bpcWOkY.js} +1 -1
- package/dist/app/assets/{javascript-BFsnARZD.js → javascript-DZUmzoI7.js} +1 -1
- package/dist/app/assets/{javastacktrace-B8IM8tv1.js → javastacktrace-g-dS0tWu.js} +1 -1
- package/dist/app/assets/{jexl-C6vnzKaQ.js → jexl-BrjlwC5s.js} +1 -1
- package/dist/app/assets/{jolie-J-E5Gc-W.js → jolie-CXt8utu9.js} +1 -1
- package/dist/app/assets/{jq-CeMWQPPn.js → jq-Bcnqodq2.js} +1 -1
- package/dist/app/assets/{js-extras-DT1ht6Uf.js → js-extras-_DMxxy53.js} +1 -1
- package/dist/app/assets/{js-templates-DweuRIjv.js → js-templates-B1Xy1qPf.js} +1 -1
- package/dist/app/assets/{jsdoc-CdaRjYMn.js → jsdoc-CRLso8tn.js} +1 -1
- package/dist/app/assets/{json-DJXtscC1.js → json-DGdFBZaG.js} +1 -1
- package/dist/app/assets/{json5-BoYaK0oG.js → json5-DHfIgdC6.js} +1 -1
- package/dist/app/assets/{jsonp-Bqin8zpD.js → jsonp-DQjCVsy3.js} +1 -1
- package/dist/app/assets/{jsstacktrace-C_x2X0wP.js → jsstacktrace-DdpnKq-S.js} +1 -1
- package/dist/app/assets/{jsx-R36Hja1Z.js → jsx-DGHeNivK.js} +1 -1
- package/dist/app/assets/{julia-DadwWMMU.js → julia-C4_8nu13.js} +1 -1
- package/dist/app/assets/{keepalived-Bn7I7eeZ.js → keepalived-CgBr_LcP.js} +1 -1
- package/dist/app/assets/{keyman-BsLy49b_.js → keyman-DLsdmPzg.js} +1 -1
- package/dist/app/assets/{kotlin-DAec6q-r.js → kotlin-BIyZ_mVz.js} +1 -1
- package/dist/app/assets/{kumir-Clgy4fig.js → kumir-DxZ90Jrj.js} +1 -1
- package/dist/app/assets/{kusto-B8r6qF-j.js → kusto-DXX_XYlb.js} +1 -1
- package/dist/app/assets/{latex-BiuC2wkP.js → latex-Chy4MZga.js} +1 -1
- package/dist/app/assets/{latte-Cla5OXcC.js → latte-CwOr4WSZ.js} +1 -1
- package/dist/app/assets/{less-D_ikeydS.js → less-NIIuxYev.js} +1 -1
- package/dist/app/assets/{lilypond--YpFjBez.js → lilypond-I8E_e9s3.js} +1 -1
- package/dist/app/assets/{liquid-CPV4dMvO.js → liquid-CC9-AlJL.js} +1 -1
- package/dist/app/assets/{lisp-DOFH1l-q.js → lisp-DU3ynTRL.js} +1 -1
- package/dist/app/assets/{livescript-JB55yErK.js → livescript-mede3eXX.js} +1 -1
- package/dist/app/assets/{llvm-jN3Ev1En.js → llvm-ChOZipf9.js} +1 -1
- package/dist/app/assets/{log-DQQCNEql.js → log-BlgfBYo8.js} +1 -1
- package/dist/app/assets/{lolcode-ksN5f-yb.js → lolcode-Dxp_wkNH.js} +1 -1
- package/dist/app/assets/{lua-DC9DJI9p.js → lua-De71Dk_o.js} +1 -1
- package/dist/app/assets/{magma-DrubqNTB.js → magma-Xk9asSNm.js} +1 -1
- package/dist/app/assets/{makefile-B5k684cb.js → makefile-D8AvVIZr.js} +1 -1
- package/dist/app/assets/{markdown-DFVUIKIi.js → markdown-f2l7WvCf.js} +1 -1
- package/dist/app/assets/{markup-templating-CiwYkdhY.js → markup-templating-DGy3xLOw.js} +1 -1
- package/dist/app/assets/{markup-CjoPL6K5.js → markup-twhd9bJ7.js} +1 -1
- package/dist/app/assets/{matlab-ERqXPSns.js → matlab-BnnzNP6N.js} +1 -1
- package/dist/app/assets/{maxscript-D5ySF-hZ.js → maxscript-wegT0Hte.js} +1 -1
- package/dist/app/assets/{mel-DcinxC8_.js → mel-BeWBIIM8.js} +1 -1
- package/dist/app/assets/{mermaid-CC9wRo1N.js → mermaid-BTAS88aZ.js} +1 -1
- package/dist/app/assets/{mizar-FpXRzvKF.js → mizar-DwJSTZ3i.js} +1 -1
- package/dist/app/assets/{mongodb-BKjEps6Z.js → mongodb-CXGzXJVg.js} +1 -1
- package/dist/app/assets/{monkey-DTH2komu.js → monkey-CDzLAr7y.js} +1 -1
- package/dist/app/assets/{moonscript-CJ-TUmDO.js → moonscript-CMoyqNP7.js} +1 -1
- package/dist/app/assets/{n1ql-DuVTgQ4i.js → n1ql-xaPxaJST.js} +1 -1
- package/dist/app/assets/{n4js-C1kvC1iR.js → n4js-BZ6fn5FD.js} +1 -1
- package/dist/app/assets/{nand2tetris-hdl-BD55HVds.js → nand2tetris-hdl-DAx6t1t9.js} +1 -1
- package/dist/app/assets/{naniscript-hvAS8R5k.js → naniscript-DF84GuME.js} +1 -1
- package/dist/app/assets/{nasm-BN4tkUGd.js → nasm-B7uV0gGJ.js} +1 -1
- package/dist/app/assets/{neon-Cwa4bFMz.js → neon-CKj_SNMo.js} +1 -1
- package/dist/app/assets/{nevod-7tUWkcxU.js → nevod-Dhy_1bov.js} +1 -1
- package/dist/app/assets/{nginx-BQNWmJeC.js → nginx-p1M3Geay.js} +1 -1
- package/dist/app/assets/{nim-VFG-pALN.js → nim-CU39HumB.js} +1 -1
- package/dist/app/assets/{nix-ryTFWbv-.js → nix-CwpMGFgf.js} +1 -1
- package/dist/app/assets/{nsis-csuADrZa.js → nsis-eoDJFK6h.js} +1 -1
- package/dist/app/assets/{objectivec-CSGhR-Vw.js → objectivec-C3g9_fbX.js} +1 -1
- package/dist/app/assets/{ocaml-D0LmaOuS.js → ocaml-CSHSpeFg.js} +1 -1
- package/dist/app/assets/{opencl-DAUuuIMo.js → opencl-BdyiZtQ0.js} +1 -1
- package/dist/app/assets/{openqasm-DG7a1Exg.js → openqasm-je8WlDNj.js} +1 -1
- package/dist/app/assets/{oz-Ca36DgAF.js → oz-CUz9q9Cx.js} +1 -1
- package/dist/app/assets/{parigp-DLpf5jtK.js → parigp-BlcFmUeN.js} +1 -1
- package/dist/app/assets/{parser-BK0LebkS.js → parser-BEb8_JfW.js} +1 -1
- package/dist/app/assets/{pascal-BElfvk70.js → pascal-CXud7dwk.js} +1 -1
- package/dist/app/assets/{pascaligo-iZXFGeX_.js → pascaligo-D8TqU7tP.js} +1 -1
- package/dist/app/assets/{pcaxis-CRNF94Ci.js → pcaxis-Rc2xz6nY.js} +1 -1
- package/dist/app/assets/{peoplecode-Dw92XHF9.js → peoplecode-vcggeuWN.js} +1 -1
- package/dist/app/assets/{perl-CdfnIJMq.js → perl-UKwRKGyT.js} +1 -1
- package/dist/app/assets/{php-Dln42vSU.js → php-AVlR1HxF.js} +1 -1
- package/dist/app/assets/{php-extras-0UIOyCNY.js → php-extras-9vU0n0hg.js} +1 -1
- package/dist/app/assets/{phpdoc-K_FSRCrz.js → phpdoc-DdNIP5Cz.js} +1 -1
- package/dist/app/assets/{plsql-CDziRovj.js → plsql-CHF_uFPR.js} +1 -1
- package/dist/app/assets/{powerquery-hRIv-7HY.js → powerquery-DYaLrf7D.js} +1 -1
- package/dist/app/assets/{powershell-Cvsi-Ajt.js → powershell-C_A95Q2Z.js} +1 -1
- package/dist/app/assets/{processing-BzBfl4pu.js → processing-D2A_N_ov.js} +1 -1
- package/dist/app/assets/{prolog-Bu6-Dx5E.js → prolog-uXSXcG5C.js} +1 -1
- package/dist/app/assets/{promql-DDaoibvE.js → promql-BphtLzBj.js} +1 -1
- package/dist/app/assets/{properties-DMGmO8LS.js → properties-By8wzMLh.js} +1 -1
- package/dist/app/assets/{protobuf-DIALiUNt.js → protobuf-Br036i_2.js} +1 -1
- package/dist/app/assets/{psl-ONY-TRz1.js → psl-BqC5a1i2.js} +1 -1
- package/dist/app/assets/{pug-ChphTcM1.js → pug-CIlbkPhR.js} +1 -1
- package/dist/app/assets/{puppet-BE8IkE_0.js → puppet-BPgrPqLm.js} +1 -1
- package/dist/app/assets/{pure-G57DkT8U.js → pure-B8Dte7PK.js} +1 -1
- package/dist/app/assets/{purebasic-CeNwW-mm.js → purebasic-BLQdSyOI.js} +1 -1
- package/dist/app/assets/{purescript-Bcq77YFD.js → purescript-Cqa3iDCo.js} +1 -1
- package/dist/app/assets/{q-FBi2WGZw.js → q-BGRU5tMs.js} +1 -1
- package/dist/app/assets/{qml-CtkX8OgF.js → qml-4wkr_e8q.js} +1 -1
- package/dist/app/assets/{qore-SnoYykD8.js → qore-Dn8DPaxX.js} +1 -1
- package/dist/app/assets/{qsharp-_B9KOx9k.js → qsharp-DuHfkgke.js} +1 -1
- package/dist/app/assets/{r-DSG5NIOe.js → r-JNvVUTzQ.js} +1 -1
- package/dist/app/assets/{racket-BeUDpNfX.js → racket-CuuQfryI.js} +1 -1
- package/dist/app/assets/{reason-BgOolNCf.js → reason-BkulNhIX.js} +1 -1
- package/dist/app/assets/{regex-Bk1oSl4f.js → regex-BK250LBm.js} +1 -1
- package/dist/app/assets/{rego-CIWDsMqH.js → rego-DD4jfVrz.js} +1 -1
- package/dist/app/assets/{renpy-_kbcmpNF.js → renpy-Up6DOU68.js} +1 -1
- package/dist/app/assets/{rest-DIpQJ-do.js → rest-JgcjFndH.js} +1 -1
- package/dist/app/assets/{rip-BSoWq6Xg.js → rip-Bw1N4gpB.js} +1 -1
- package/dist/app/assets/{roboconf-CvqHeFcy.js → roboconf-BSia62DO.js} +1 -1
- package/dist/app/assets/{robotframework-BJhVx5AC.js → robotframework-CD3SIrcT.js} +1 -1
- package/dist/app/assets/{ruby-BvQRDxMJ.js → ruby-DjzxjDrP.js} +1 -1
- package/dist/app/assets/{rust-kh79P-sj.js → rust-CenxkUdd.js} +1 -1
- package/dist/app/assets/{sas-P8RLNFXd.js → sas-CkhHqzKO.js} +1 -1
- package/dist/app/assets/{sass-B46x_1bU.js → sass-Bj5RvbQb.js} +1 -1
- package/dist/app/assets/{scala-ChFXl2Pu.js → scala-CD7YOhd_.js} +1 -1
- package/dist/app/assets/{scheme-BLb7t4HS.js → scheme-C7ztqGcC.js} +1 -1
- package/dist/app/assets/{scss-B9yekGw_.js → scss-jngc2vM4.js} +1 -1
- package/dist/app/assets/{shell-session-DmLv8D3v.js → shell-session-Cf8TkgCb.js} +1 -1
- package/dist/app/assets/{smali-Blke27la.js → smali-BWjG_F2J.js} +1 -1
- package/dist/app/assets/{smalltalk-tw6G9Dzq.js → smalltalk-B7bFUWh2.js} +1 -1
- package/dist/app/assets/{smarty-CkUQxAfl.js → smarty-BtDh_Lbq.js} +1 -1
- package/dist/app/assets/{sml-BwHXlh6a.js → sml-baFYvc0l.js} +1 -1
- package/dist/app/assets/{solidity-C75eGiBN.js → solidity-BHUtyotx.js} +1 -1
- package/dist/app/assets/{solution-file-CSQS8iUg.js → solution-file-B2B1VEoF.js} +1 -1
- package/dist/app/assets/{soy-BTvUPYjh.js → soy-D07-kKcL.js} +1 -1
- package/dist/app/assets/{sparql-CNBLBifn.js → sparql-Bq1nby44.js} +1 -1
- package/dist/app/assets/{splunk-spl-Nfz25S75.js → splunk-spl-7OB4FDIj.js} +1 -1
- package/dist/app/assets/{sqf-D61wR7ps.js → sqf-Y8kPyUGy.js} +1 -1
- package/dist/app/assets/{sql-ziUJYpp6.js → sql-cchOGBTS.js} +1 -1
- package/dist/app/assets/{squirrel-DPmSQoXL.js → squirrel-B5XNpE09.js} +1 -1
- package/dist/app/assets/{stan-VYGTpgHk.js → stan-BbdO1pjw.js} +1 -1
- package/dist/app/assets/{stylus-CNUEtGJh.js → stylus-CEx2rDQb.js} +1 -1
- package/dist/app/assets/{swift-oZWKuYsC.js → swift-E_SJ1p-z.js} +1 -1
- package/dist/app/assets/{systemd-CAFNmTIP.js → systemd-Bp6JJhYd.js} +1 -1
- package/dist/app/assets/{t4-cs-C-wJS3Mm.js → t4-cs-B6VxfevA.js} +1 -1
- package/dist/app/assets/{t4-templating-Dda8pWdO.js → t4-templating-BFVCMjcF.js} +1 -1
- package/dist/app/assets/{t4-vb-CBaRFyZF.js → t4-vb-Cw44ZeAl.js} +1 -1
- package/dist/app/assets/{tap-Bq_3zqFc.js → tap-BeeNW0Dn.js} +1 -1
- package/dist/app/assets/{tcl-BiRGOESK.js → tcl-Dr9LwAok.js} +1 -1
- package/dist/app/assets/{textile-ChcIaDjR.js → textile-DxUzeEfH.js} +1 -1
- package/dist/app/assets/{toml-DLsGEGKj.js → toml-DW-fj9Ve.js} +1 -1
- package/dist/app/assets/{tremor-Ckrp0S7o.js → tremor-CSPNAvxf.js} +1 -1
- package/dist/app/assets/{tt2-B_3AORYq.js → tt2-5hZ0qseS.js} +1 -1
- package/dist/app/assets/{turtle-CwHHk8_t.js → turtle-D78spzhr.js} +1 -1
- package/dist/app/assets/{twig-DlTuzPmO.js → twig-DSTGGsFD.js} +1 -1
- package/dist/app/assets/{typescript-f2B3Jfpo.js → typescript-DeKf5Yx2.js} +1 -1
- package/dist/app/assets/{typoscript-DnIUY4GA.js → typoscript-mYWtQCKO.js} +1 -1
- package/dist/app/assets/{unrealscript-D-gdymGH.js → unrealscript-DEhfFJlC.js} +1 -1
- package/dist/app/assets/{uorazor-C62OEYTZ.js → uorazor-0uC9DIjB.js} +1 -1
- package/dist/app/assets/{uri-bzMacUn_.js → uri-Df_kC31y.js} +1 -1
- package/dist/app/assets/{v-D50xccVa.js → v-LL1hUydo.js} +1 -1
- package/dist/app/assets/{vala-V-KAAqYe.js → vala-D02QI2Px.js} +1 -1
- package/dist/app/assets/{vbnet-D04Q9ev9.js → vbnet-CR3y5qLg.js} +1 -1
- package/dist/app/assets/{velocity-Cgya3_aZ.js → velocity-HNtJrOJ1.js} +1 -1
- package/dist/app/assets/{verilog-ChFGSA3K.js → verilog-BLgKa5W4.js} +1 -1
- package/dist/app/assets/{vhdl-BSU5cUGk.js → vhdl-CNY_UEqB.js} +1 -1
- package/dist/app/assets/{vim-KeffaP4E.js → vim-BZUpIPYO.js} +1 -1
- package/dist/app/assets/{visual-basic-Cxu4K2zU.js → visual-basic-DQ5SAQUu.js} +1 -1
- package/dist/app/assets/{warpscript-CLjny6tr.js → warpscript-C8sl0AcI.js} +1 -1
- package/dist/app/assets/{wasm-CpefXmbi.js → wasm-CtcB8nnU.js} +1 -1
- package/dist/app/assets/{web-idl-Bj5qae8A.js → web-idl-CVztrMTV.js} +1 -1
- package/dist/app/assets/{wiki-BI1zVW5V.js → wiki-gaSWHzkK.js} +1 -1
- package/dist/app/assets/{wolfram-BLawAZSW.js → wolfram-Bep9vU4v.js} +1 -1
- package/dist/app/assets/{wren-Z79FVuvr.js → wren-C21a2Yjt.js} +1 -1
- package/dist/app/assets/{xeora-D5SMpUiE.js → xeora-Dp4LrTkO.js} +1 -1
- package/dist/app/assets/{xml-doc-Dyd5ZrR3.js → xml-doc-Doj5uv_S.js} +1 -1
- package/dist/app/assets/{xojo-DGsUoypx.js → xojo-DG95hxHV.js} +1 -1
- package/dist/app/assets/{xquery-BvMyVlg9.js → xquery-BF4ZgZA4.js} +1 -1
- package/dist/app/assets/{yaml-BR4wSo8s.js → yaml-BKgY30GP.js} +1 -1
- package/dist/app/assets/{yang-VGMETllk.js → yang-1nC5puJT.js} +1 -1
- package/dist/app/assets/{zig-eOsQLEGa.js → zig-CYQ8mjbV.js} +1 -1
- package/dist/app/index.html +2 -2
- package/dist/index.cjs +341 -65
- package/dist/index.css +0 -36
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +347 -67
- package/package.json +4 -5
- package/dist/app/assets/index-BqfTSOoT.js +0 -438
- package/dist/app/assets/index-BzKLI1qz.css +0 -1
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// src/components/chat.tsx
|
|
2
2
|
import * as React18 from "react";
|
|
3
|
-
import { FileText as FileText2, Loader2 as Loader22, Pencil as Pencil3, RefreshCw as RefreshCw2, X as X2 } from "lucide-react";
|
|
3
|
+
import { ArrowDown, FileText as FileText2, Loader2 as Loader22, Pencil as Pencil3, RefreshCw as RefreshCw2, X as X2 } from "lucide-react";
|
|
4
4
|
|
|
5
5
|
// src/lib/utils.ts
|
|
6
6
|
import { clsx } from "clsx";
|
|
@@ -26,6 +26,15 @@ function createMessageId() {
|
|
|
26
26
|
return globalThis.crypto?.randomUUID?.() ?? `${Date.now().toString(36)}-${Math.random().toString(36).slice(2)}`;
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
+
// src/lib/scroll.ts
|
|
30
|
+
var BOTTOM_FOLLOW_THRESHOLD_PX = 48;
|
|
31
|
+
function getDistanceFromBottom(element) {
|
|
32
|
+
return Math.max(0, element.scrollHeight - element.clientHeight - element.scrollTop);
|
|
33
|
+
}
|
|
34
|
+
function isNearBottom(element, threshold = BOTTOM_FOLLOW_THRESHOLD_PX) {
|
|
35
|
+
return getDistanceFromBottom(element) <= threshold;
|
|
36
|
+
}
|
|
37
|
+
|
|
29
38
|
// src/providers/Stream.tsx
|
|
30
39
|
import {
|
|
31
40
|
createContext as createContext2,
|
|
@@ -274,10 +283,40 @@ function useParentMessenger({ onSetOptions } = {}) {
|
|
|
274
283
|
return messenger;
|
|
275
284
|
}
|
|
276
285
|
|
|
286
|
+
// src/lib/thread-context-usage.ts
|
|
287
|
+
function normalizeContextUsageNumber(value) {
|
|
288
|
+
if (typeof value === "number" && Number.isFinite(value) && value >= 0) {
|
|
289
|
+
return Math.floor(value);
|
|
290
|
+
}
|
|
291
|
+
if (typeof value === "string") {
|
|
292
|
+
const parsed = Number.parseFloat(value);
|
|
293
|
+
if (Number.isFinite(parsed) && parsed >= 0) {
|
|
294
|
+
return Math.floor(parsed);
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
return null;
|
|
298
|
+
}
|
|
299
|
+
function getThreadContextUsage(state, agentKey) {
|
|
300
|
+
if (!agentKey) return null;
|
|
301
|
+
return state[agentKey] ?? null;
|
|
302
|
+
}
|
|
303
|
+
function getThreadContextUsageTotalTokens(event) {
|
|
304
|
+
return normalizeContextUsageNumber(event?.usage?.totalTokens);
|
|
305
|
+
}
|
|
306
|
+
function resolveUsedContextSize(options) {
|
|
307
|
+
const realtimeUsedTokens = getThreadContextUsageTotalTokens(
|
|
308
|
+
options.realtimeUsage
|
|
309
|
+
);
|
|
310
|
+
if (realtimeUsedTokens != null) {
|
|
311
|
+
return realtimeUsedTokens;
|
|
312
|
+
}
|
|
313
|
+
return normalizeContextUsageNumber(options.fallbackUsedTokens) ?? 0;
|
|
314
|
+
}
|
|
315
|
+
|
|
277
316
|
// src/providers/Stream.tsx
|
|
278
317
|
import { jsx as jsx2 } from "react/jsx-runtime";
|
|
279
318
|
var StreamContext = createContext2(void 0);
|
|
280
|
-
var defaultApiUrl = import.meta.env.VITE_XPERTAI_API_URL ?? "https://api.
|
|
319
|
+
var defaultApiUrl = import.meta.env.VITE_XPERTAI_API_URL ?? "https://api.xpertai.cn/api/ai";
|
|
281
320
|
var useStreamContext = () => {
|
|
282
321
|
const context = useContext2(StreamContext);
|
|
283
322
|
if (!context) {
|
|
@@ -408,6 +447,7 @@ var en_US_default = {
|
|
|
408
447
|
loadingThread: "Loading thread...",
|
|
409
448
|
stop: "Stop",
|
|
410
449
|
send: "Send message",
|
|
450
|
+
scrollToBottom: "Scroll to bottom",
|
|
411
451
|
retryUpload: "Retry upload",
|
|
412
452
|
poweredBy: "Powered by Xpert AI",
|
|
413
453
|
errors: {
|
|
@@ -466,6 +506,7 @@ var zh_CN_default = {
|
|
|
466
506
|
loadingThread: "\u6B63\u5728\u52A0\u8F7D\u7EBF\u7A0B...",
|
|
467
507
|
stop: "\u505C\u6B62",
|
|
468
508
|
send: "\u53D1\u9001\u6D88\u606F",
|
|
509
|
+
scrollToBottom: "\u56DE\u5230\u5E95\u90E8",
|
|
469
510
|
retryUpload: "\u91CD\u65B0\u4E0A\u4F20",
|
|
470
511
|
poweredBy: "\u7531 Xpert AI \u9A71\u52A8",
|
|
471
512
|
errors: {
|
|
@@ -1435,7 +1476,11 @@ import ReactMarkdown from "react-markdown";
|
|
|
1435
1476
|
import remarkGfm from "remark-gfm";
|
|
1436
1477
|
import rehypeKatex from "rehype-katex";
|
|
1437
1478
|
import remarkMath from "remark-math";
|
|
1438
|
-
import {
|
|
1479
|
+
import {
|
|
1480
|
+
Children,
|
|
1481
|
+
memo,
|
|
1482
|
+
useState as useState5
|
|
1483
|
+
} from "react";
|
|
1439
1484
|
import { CheckIcon, CopyIcon } from "lucide-react";
|
|
1440
1485
|
|
|
1441
1486
|
// src/components/thread/syntax-highlighter.tsx
|
|
@@ -1564,6 +1609,12 @@ TooltipIconButton.displayName = "TooltipIconButton";
|
|
|
1564
1609
|
// src/components/thread/markdown-text.tsx
|
|
1565
1610
|
import "katex/dist/katex.min.css";
|
|
1566
1611
|
import { Fragment as Fragment2, jsx as jsx17, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
1612
|
+
var getTextContent = (children) => Children.toArray(children).map((child) => {
|
|
1613
|
+
if (typeof child === "string" || typeof child === "number") {
|
|
1614
|
+
return String(child);
|
|
1615
|
+
}
|
|
1616
|
+
return "";
|
|
1617
|
+
}).join("");
|
|
1567
1618
|
var useCopyToClipboard = ({
|
|
1568
1619
|
copiedDuration = 3e3
|
|
1569
1620
|
} = {}) => {
|
|
@@ -1600,7 +1651,7 @@ var CodeHeader = ({ language, code }) => {
|
|
|
1600
1651
|
] });
|
|
1601
1652
|
};
|
|
1602
1653
|
var defaultComponents = {
|
|
1603
|
-
h1: ({ className, ...props }) => /* @__PURE__ */ jsx17(
|
|
1654
|
+
h1: ({ className, node: _node, ...props }) => /* @__PURE__ */ jsx17(
|
|
1604
1655
|
"h1",
|
|
1605
1656
|
{
|
|
1606
1657
|
className: cn(
|
|
@@ -1610,7 +1661,7 @@ var defaultComponents = {
|
|
|
1610
1661
|
...props
|
|
1611
1662
|
}
|
|
1612
1663
|
),
|
|
1613
|
-
h2: ({ className, ...props }) => /* @__PURE__ */ jsx17(
|
|
1664
|
+
h2: ({ className, node: _node, ...props }) => /* @__PURE__ */ jsx17(
|
|
1614
1665
|
"h2",
|
|
1615
1666
|
{
|
|
1616
1667
|
className: cn(
|
|
@@ -1620,7 +1671,7 @@ var defaultComponents = {
|
|
|
1620
1671
|
...props
|
|
1621
1672
|
}
|
|
1622
1673
|
),
|
|
1623
|
-
h3: ({ className, ...props }) => /* @__PURE__ */ jsx17(
|
|
1674
|
+
h3: ({ className, node: _node, ...props }) => /* @__PURE__ */ jsx17(
|
|
1624
1675
|
"h3",
|
|
1625
1676
|
{
|
|
1626
1677
|
className: cn(
|
|
@@ -1630,7 +1681,7 @@ var defaultComponents = {
|
|
|
1630
1681
|
...props
|
|
1631
1682
|
}
|
|
1632
1683
|
),
|
|
1633
|
-
h4: ({ className, ...props }) => /* @__PURE__ */ jsx17(
|
|
1684
|
+
h4: ({ className, node: _node, ...props }) => /* @__PURE__ */ jsx17(
|
|
1634
1685
|
"h4",
|
|
1635
1686
|
{
|
|
1636
1687
|
className: cn(
|
|
@@ -1640,7 +1691,7 @@ var defaultComponents = {
|
|
|
1640
1691
|
...props
|
|
1641
1692
|
}
|
|
1642
1693
|
),
|
|
1643
|
-
h5: ({ className, ...props }) => /* @__PURE__ */ jsx17(
|
|
1694
|
+
h5: ({ className, node: _node, ...props }) => /* @__PURE__ */ jsx17(
|
|
1644
1695
|
"h5",
|
|
1645
1696
|
{
|
|
1646
1697
|
className: cn(
|
|
@@ -1650,21 +1701,21 @@ var defaultComponents = {
|
|
|
1650
1701
|
...props
|
|
1651
1702
|
}
|
|
1652
1703
|
),
|
|
1653
|
-
h6: ({ className, ...props }) => /* @__PURE__ */ jsx17(
|
|
1704
|
+
h6: ({ className, node: _node, ...props }) => /* @__PURE__ */ jsx17(
|
|
1654
1705
|
"h6",
|
|
1655
1706
|
{
|
|
1656
1707
|
className: cn("my-4 font-semibold first:mt-0 last:mb-0", className),
|
|
1657
1708
|
...props
|
|
1658
1709
|
}
|
|
1659
1710
|
),
|
|
1660
|
-
p: ({ className, ...props }) => /* @__PURE__ */ jsx17(
|
|
1711
|
+
p: ({ className, node: _node, ...props }) => /* @__PURE__ */ jsx17(
|
|
1661
1712
|
"p",
|
|
1662
1713
|
{
|
|
1663
1714
|
className: cn("mt-5 mb-5 leading-7 first:mt-0 last:mb-0", className),
|
|
1664
1715
|
...props
|
|
1665
1716
|
}
|
|
1666
1717
|
),
|
|
1667
|
-
a: ({ className, ...props }) => /* @__PURE__ */ jsx17(
|
|
1718
|
+
a: ({ className, node: _node, ...props }) => /* @__PURE__ */ jsx17(
|
|
1668
1719
|
"a",
|
|
1669
1720
|
{
|
|
1670
1721
|
className: cn(
|
|
@@ -1676,35 +1727,46 @@ var defaultComponents = {
|
|
|
1676
1727
|
...props
|
|
1677
1728
|
}
|
|
1678
1729
|
),
|
|
1679
|
-
blockquote: ({
|
|
1730
|
+
blockquote: ({
|
|
1731
|
+
className,
|
|
1732
|
+
node: _node,
|
|
1733
|
+
...props
|
|
1734
|
+
}) => /* @__PURE__ */ jsx17(
|
|
1680
1735
|
"blockquote",
|
|
1681
1736
|
{
|
|
1682
|
-
className: cn(
|
|
1737
|
+
className: cn(
|
|
1738
|
+
"border-l-4 border-border pl-6 italic text-muted-foreground",
|
|
1739
|
+
className
|
|
1740
|
+
),
|
|
1683
1741
|
...props
|
|
1684
1742
|
}
|
|
1685
1743
|
),
|
|
1686
|
-
ul: ({ className, ...props }) => /* @__PURE__ */ jsx17(
|
|
1744
|
+
ul: ({ className, node: _node, ...props }) => /* @__PURE__ */ jsx17(
|
|
1687
1745
|
"ul",
|
|
1688
1746
|
{
|
|
1689
1747
|
className: cn("my-5 list-outside list-disc pl-6 [&>li]:mt-2", className),
|
|
1690
1748
|
...props
|
|
1691
1749
|
}
|
|
1692
1750
|
),
|
|
1693
|
-
ol: ({ className, ...props }) => /* @__PURE__ */ jsx17(
|
|
1751
|
+
ol: ({ className, node: _node, ...props }) => /* @__PURE__ */ jsx17(
|
|
1694
1752
|
"ol",
|
|
1695
1753
|
{
|
|
1696
1754
|
className: cn("my-5 list-outside list-decimal pl-8 [&>li]:mt-2", className),
|
|
1697
1755
|
...props
|
|
1698
1756
|
}
|
|
1699
1757
|
),
|
|
1700
|
-
hr: ({ className, ...props }) => /* @__PURE__ */ jsx17(
|
|
1758
|
+
hr: ({ className, node: _node, ...props }) => /* @__PURE__ */ jsx17(
|
|
1701
1759
|
"hr",
|
|
1702
1760
|
{
|
|
1703
1761
|
className: cn("my-5 border-b", className),
|
|
1704
1762
|
...props
|
|
1705
1763
|
}
|
|
1706
1764
|
),
|
|
1707
|
-
table: ({
|
|
1765
|
+
table: ({
|
|
1766
|
+
className,
|
|
1767
|
+
node: _node,
|
|
1768
|
+
...props
|
|
1769
|
+
}) => /* @__PURE__ */ jsx17(
|
|
1708
1770
|
"table",
|
|
1709
1771
|
{
|
|
1710
1772
|
className: cn(
|
|
@@ -1714,48 +1776,48 @@ var defaultComponents = {
|
|
|
1714
1776
|
...props
|
|
1715
1777
|
}
|
|
1716
1778
|
),
|
|
1717
|
-
th: ({ className, ...props }) => /* @__PURE__ */ jsx17(
|
|
1779
|
+
th: ({ className, node: _node, ...props }) => /* @__PURE__ */ jsx17(
|
|
1718
1780
|
"th",
|
|
1719
1781
|
{
|
|
1720
1782
|
className: cn(
|
|
1721
|
-
"bg-muted px-4 py-2 text-left font-bold first:rounded-tl-lg last:rounded-tr-lg [&[align=center]]:text-center [&[align=right]]:text-right",
|
|
1783
|
+
"bg-muted border-border border-y border-l px-4 py-2 text-left font-bold first:rounded-tl-lg last:rounded-tr-lg last:border-r [&[align=center]]:text-center [&[align=right]]:text-right",
|
|
1722
1784
|
className
|
|
1723
1785
|
),
|
|
1724
1786
|
...props
|
|
1725
1787
|
}
|
|
1726
1788
|
),
|
|
1727
|
-
td: ({ className, ...props }) => /* @__PURE__ */ jsx17(
|
|
1789
|
+
td: ({ className, node: _node, ...props }) => /* @__PURE__ */ jsx17(
|
|
1728
1790
|
"td",
|
|
1729
1791
|
{
|
|
1730
1792
|
className: cn(
|
|
1731
|
-
"border-b border-l px-4 py-2 text-left last:border-r [&[align=center]]:text-center [&[align=right]]:text-right",
|
|
1793
|
+
"border-border border-b border-l px-4 py-2 text-left last:border-r [&[align=center]]:text-center [&[align=right]]:text-right",
|
|
1732
1794
|
className
|
|
1733
1795
|
),
|
|
1734
1796
|
...props
|
|
1735
1797
|
}
|
|
1736
1798
|
),
|
|
1737
|
-
tr: ({ className, ...props }) => /* @__PURE__ */ jsx17(
|
|
1799
|
+
tr: ({ className, node: _node, ...props }) => /* @__PURE__ */ jsx17(
|
|
1738
1800
|
"tr",
|
|
1739
1801
|
{
|
|
1740
1802
|
className: cn(
|
|
1741
|
-
"m-0
|
|
1803
|
+
"m-0 p-0 even:bg-muted/50 [&:last-child>td:first-child]:rounded-bl-lg [&:last-child>td:last-child]:rounded-br-lg",
|
|
1742
1804
|
className
|
|
1743
1805
|
),
|
|
1744
1806
|
...props
|
|
1745
1807
|
}
|
|
1746
1808
|
),
|
|
1747
|
-
sup: ({ className, ...props }) => /* @__PURE__ */ jsx17(
|
|
1809
|
+
sup: ({ className, node: _node, ...props }) => /* @__PURE__ */ jsx17(
|
|
1748
1810
|
"sup",
|
|
1749
1811
|
{
|
|
1750
1812
|
className: cn("[&>a]:text-xs [&>a]:no-underline", className),
|
|
1751
1813
|
...props
|
|
1752
1814
|
}
|
|
1753
1815
|
),
|
|
1754
|
-
pre: ({ className, ...props }) => /* @__PURE__ */ jsx17(
|
|
1755
|
-
"
|
|
1816
|
+
pre: ({ className, node: _node, ...props }) => /* @__PURE__ */ jsx17(
|
|
1817
|
+
"div",
|
|
1756
1818
|
{
|
|
1757
1819
|
className: cn(
|
|
1758
|
-
"max-w-4xl overflow-x-auto rounded-lg text-sm bg-black text-white dark:bg-zinc-800
|
|
1820
|
+
"max-w-4xl overflow-x-auto rounded-lg text-sm bg-black text-white dark:bg-zinc-800",
|
|
1759
1821
|
className
|
|
1760
1822
|
),
|
|
1761
1823
|
...props
|
|
@@ -1764,18 +1826,21 @@ var defaultComponents = {
|
|
|
1764
1826
|
code: ({
|
|
1765
1827
|
className,
|
|
1766
1828
|
children,
|
|
1829
|
+
node: _node,
|
|
1767
1830
|
...props
|
|
1768
1831
|
}) => {
|
|
1769
1832
|
const match = /language-(\w+)/.exec(className || "");
|
|
1833
|
+
const code = getTextContent(children);
|
|
1834
|
+
const isBlockCode = code.includes("\n");
|
|
1770
1835
|
if (match) {
|
|
1771
1836
|
const language = match[1];
|
|
1772
|
-
const
|
|
1837
|
+
const normalizedCode = code.replace(/\n$/, "");
|
|
1773
1838
|
return /* @__PURE__ */ jsxs7(Fragment2, { children: [
|
|
1774
1839
|
/* @__PURE__ */ jsx17(
|
|
1775
1840
|
CodeHeader,
|
|
1776
1841
|
{
|
|
1777
1842
|
language,
|
|
1778
|
-
code
|
|
1843
|
+
code: normalizedCode
|
|
1779
1844
|
}
|
|
1780
1845
|
),
|
|
1781
1846
|
/* @__PURE__ */ jsx17(
|
|
@@ -1783,15 +1848,31 @@ var defaultComponents = {
|
|
|
1783
1848
|
{
|
|
1784
1849
|
language,
|
|
1785
1850
|
className,
|
|
1786
|
-
children:
|
|
1851
|
+
children: normalizedCode
|
|
1787
1852
|
}
|
|
1788
1853
|
)
|
|
1789
1854
|
] });
|
|
1790
1855
|
}
|
|
1856
|
+
if (isBlockCode) {
|
|
1857
|
+
return /* @__PURE__ */ jsx17(
|
|
1858
|
+
"code",
|
|
1859
|
+
{
|
|
1860
|
+
className: cn(
|
|
1861
|
+
"block min-w-full whitespace-pre px-4 py-4 font-mono text-inherit",
|
|
1862
|
+
className
|
|
1863
|
+
),
|
|
1864
|
+
...props,
|
|
1865
|
+
children: code.replace(/\n$/, "")
|
|
1866
|
+
}
|
|
1867
|
+
);
|
|
1868
|
+
}
|
|
1791
1869
|
return /* @__PURE__ */ jsx17(
|
|
1792
1870
|
"code",
|
|
1793
1871
|
{
|
|
1794
|
-
className: cn(
|
|
1872
|
+
className: cn(
|
|
1873
|
+
"bg-muted rounded px-1.5 py-0.5 font-mono text-[0.9em] font-semibold",
|
|
1874
|
+
className
|
|
1875
|
+
),
|
|
1795
1876
|
...props,
|
|
1796
1877
|
children
|
|
1797
1878
|
}
|
|
@@ -1910,14 +1991,52 @@ function MemoryBlock({ content }) {
|
|
|
1910
1991
|
}
|
|
1911
1992
|
function ComponentBlock({ content }) {
|
|
1912
1993
|
const [isExpanded, setIsExpanded] = React13.useState(false);
|
|
1994
|
+
const contentRef = React13.useRef(null);
|
|
1995
|
+
const shouldAutoScrollRef = React13.useRef(true);
|
|
1996
|
+
const previousScrollTopRef = React13.useRef(0);
|
|
1913
1997
|
const data = content.data ?? {};
|
|
1914
|
-
const
|
|
1915
|
-
const
|
|
1916
|
-
const status =
|
|
1917
|
-
const message =
|
|
1918
|
-
const output =
|
|
1919
|
-
const error = data.error
|
|
1998
|
+
const category = data.category ?? "Component";
|
|
1999
|
+
const title = data.tool && category === "Tool" ? data.tool : data.title ?? data.type ?? "Component";
|
|
2000
|
+
const status = data.status ?? null;
|
|
2001
|
+
const message = data.message ?? null;
|
|
2002
|
+
const output = data.output ?? null;
|
|
2003
|
+
const error = data.error ?? null;
|
|
1920
2004
|
const fallback = message ?? output ?? safeJson(data.data ?? data);
|
|
2005
|
+
const hasOutput = message !== null || output !== null;
|
|
2006
|
+
React13.useEffect(() => {
|
|
2007
|
+
if (status === "running" && output !== null) setIsExpanded(true);
|
|
2008
|
+
}, [status, output]);
|
|
2009
|
+
React13.useEffect(() => {
|
|
2010
|
+
const element = contentRef.current;
|
|
2011
|
+
if (!element) return;
|
|
2012
|
+
previousScrollTopRef.current = element.scrollTop;
|
|
2013
|
+
const updateAutoScrollState = () => {
|
|
2014
|
+
const nextScrollTop = element.scrollTop;
|
|
2015
|
+
const isScrollingUp = nextScrollTop < previousScrollTopRef.current - 1;
|
|
2016
|
+
previousScrollTopRef.current = nextScrollTop;
|
|
2017
|
+
if (isScrollingUp) {
|
|
2018
|
+
shouldAutoScrollRef.current = false;
|
|
2019
|
+
return;
|
|
2020
|
+
}
|
|
2021
|
+
shouldAutoScrollRef.current = isNearBottom(element);
|
|
2022
|
+
};
|
|
2023
|
+
updateAutoScrollState();
|
|
2024
|
+
element.addEventListener("scroll", updateAutoScrollState, { passive: true });
|
|
2025
|
+
return () => {
|
|
2026
|
+
element.removeEventListener("scroll", updateAutoScrollState);
|
|
2027
|
+
};
|
|
2028
|
+
}, [isExpanded]);
|
|
2029
|
+
React13.useEffect(() => {
|
|
2030
|
+
if (status !== "running") {
|
|
2031
|
+
shouldAutoScrollRef.current = true;
|
|
2032
|
+
return;
|
|
2033
|
+
}
|
|
2034
|
+
const element = contentRef.current;
|
|
2035
|
+
if (!element || !shouldAutoScrollRef.current) {
|
|
2036
|
+
return;
|
|
2037
|
+
}
|
|
2038
|
+
element.scrollTop = element.scrollHeight;
|
|
2039
|
+
}, [isExpanded, output, status]);
|
|
1921
2040
|
const config = status ? statusConfig[status] : null;
|
|
1922
2041
|
const StatusIcon = config?.icon;
|
|
1923
2042
|
return /* @__PURE__ */ jsxs8(Card, { children: [
|
|
@@ -1943,9 +2062,9 @@ function ComponentBlock({ content }) {
|
|
|
1943
2062
|
)
|
|
1944
2063
|
] })
|
|
1945
2064
|
] }),
|
|
1946
|
-
isExpanded && /* @__PURE__ */ jsxs8(CardContent, { className: "text-xs text-muted-foreground max-h-60 overflow-auto", children: [
|
|
2065
|
+
isExpanded && /* @__PURE__ */ jsxs8(CardContent, { ref: contentRef, className: "text-xs text-muted-foreground max-h-60 overflow-auto", children: [
|
|
1947
2066
|
data.input && /* @__PURE__ */ jsx19("pre", { className: "whitespace-pre-wrap wrap-break-word", children: JSON.stringify(data.input, null, 2) }),
|
|
1948
|
-
error ? /* @__PURE__ */ jsx19("pre", { className: "whitespace-pre-wrap wrap-break-word text-destructive", children: typeof error === "string" ? error : safeJson(error) }) :
|
|
2067
|
+
error ? /* @__PURE__ */ jsx19("pre", { className: "whitespace-pre-wrap wrap-break-word text-destructive", children: typeof error === "string" ? error : safeJson(error) }) : hasOutput && /* @__PURE__ */ jsx19("pre", { className: "whitespace-pre-wrap wrap-break-word", children: fallback })
|
|
1949
2068
|
] })
|
|
1950
2069
|
] });
|
|
1951
2070
|
}
|
|
@@ -2348,18 +2467,6 @@ var kNumberFormatter = new Intl.NumberFormat("en-US", {
|
|
|
2348
2467
|
minimumFractionDigits: 0,
|
|
2349
2468
|
maximumFractionDigits: 1
|
|
2350
2469
|
});
|
|
2351
|
-
function normalizeContextSize(value) {
|
|
2352
|
-
if (typeof value === "number" && Number.isFinite(value) && value >= 0) {
|
|
2353
|
-
return Math.floor(value);
|
|
2354
|
-
}
|
|
2355
|
-
if (typeof value === "string") {
|
|
2356
|
-
const parsed = Number.parseInt(value, 10);
|
|
2357
|
-
if (Number.isFinite(parsed) && parsed >= 0) {
|
|
2358
|
-
return parsed;
|
|
2359
|
-
}
|
|
2360
|
-
}
|
|
2361
|
-
return null;
|
|
2362
|
-
}
|
|
2363
2470
|
function normalizeAgentKey(value) {
|
|
2364
2471
|
if (typeof value !== "string") {
|
|
2365
2472
|
return null;
|
|
@@ -2368,7 +2475,7 @@ function normalizeAgentKey(value) {
|
|
|
2368
2475
|
return normalized ? normalized : null;
|
|
2369
2476
|
}
|
|
2370
2477
|
function resolveAssistantContextSize(assistant) {
|
|
2371
|
-
return
|
|
2478
|
+
return normalizeContextUsageNumber(assistant.metadata?.context_size) ?? normalizeContextUsageNumber(assistant.config?.configurable?.context_size);
|
|
2372
2479
|
}
|
|
2373
2480
|
function resolveAssistantAgentKey(assistant) {
|
|
2374
2481
|
return normalizeAgentKey(assistant.metadata?.agent_key) ?? normalizeAgentKey(assistant.config?.configurable?.agentKey);
|
|
@@ -2391,6 +2498,16 @@ function ContextUsageIndicator({
|
|
|
2391
2498
|
const [maxContextSize, setMaxContextSize] = React17.useState(null);
|
|
2392
2499
|
const [usedContextSize, setUsedContextSize] = React17.useState(null);
|
|
2393
2500
|
const [assistantAgentKey, setAssistantAgentKey] = React17.useState(null);
|
|
2501
|
+
const latestRealtimeUsageRef = React17.useRef({
|
|
2502
|
+
threadId: null,
|
|
2503
|
+
agentKey: null,
|
|
2504
|
+
usedTokens: null
|
|
2505
|
+
});
|
|
2506
|
+
const realtimeUsage = React17.useMemo(
|
|
2507
|
+
() => getThreadContextUsage(stream.contextUsageByAgentKey, assistantAgentKey),
|
|
2508
|
+
[assistantAgentKey, stream.contextUsageByAgentKey]
|
|
2509
|
+
);
|
|
2510
|
+
const realtimeUsedContextSize = getThreadContextUsageTotalTokens(realtimeUsage);
|
|
2394
2511
|
React17.useEffect(() => {
|
|
2395
2512
|
if (!stream.client || !stream.assistantId) {
|
|
2396
2513
|
setMaxContextSize(null);
|
|
@@ -2411,6 +2528,17 @@ function ContextUsageIndicator({
|
|
|
2411
2528
|
cancelled = true;
|
|
2412
2529
|
};
|
|
2413
2530
|
}, [stream.client, stream.assistantId]);
|
|
2531
|
+
React17.useEffect(() => {
|
|
2532
|
+
latestRealtimeUsageRef.current = {
|
|
2533
|
+
threadId: stream.threadId ?? null,
|
|
2534
|
+
agentKey: assistantAgentKey,
|
|
2535
|
+
usedTokens: realtimeUsedContextSize
|
|
2536
|
+
};
|
|
2537
|
+
}, [assistantAgentKey, realtimeUsedContextSize, stream.threadId]);
|
|
2538
|
+
React17.useEffect(() => {
|
|
2539
|
+
if (realtimeUsedContextSize == null) return;
|
|
2540
|
+
setUsedContextSize(realtimeUsedContextSize);
|
|
2541
|
+
}, [realtimeUsedContextSize]);
|
|
2414
2542
|
React17.useEffect(() => {
|
|
2415
2543
|
if (!stream.client) {
|
|
2416
2544
|
setUsedContextSize(null);
|
|
@@ -2420,14 +2548,25 @@ function ContextUsageIndicator({
|
|
|
2420
2548
|
setUsedContextSize(0);
|
|
2421
2549
|
return;
|
|
2422
2550
|
}
|
|
2551
|
+
if (realtimeUsedContextSize != null) return;
|
|
2423
2552
|
if (stream.isLoading) return;
|
|
2424
2553
|
let cancelled = false;
|
|
2554
|
+
const requestThreadId = stream.threadId;
|
|
2555
|
+
const requestAgentKey = assistantAgentKey;
|
|
2425
2556
|
stream.client.threads.getContextUsage(
|
|
2426
|
-
|
|
2427
|
-
|
|
2428
|
-
).then((result) =>
|
|
2557
|
+
requestThreadId,
|
|
2558
|
+
requestAgentKey ? { agentKey: requestAgentKey } : void 0
|
|
2559
|
+
).then((result) => normalizeContextUsageNumber(result?.usage?.context_tokens)).then((result) => {
|
|
2429
2560
|
if (cancelled) return;
|
|
2430
|
-
|
|
2561
|
+
const latestRealtimeUsage = latestRealtimeUsageRef.current;
|
|
2562
|
+
if (latestRealtimeUsage.usedTokens != null && latestRealtimeUsage.threadId === requestThreadId && latestRealtimeUsage.agentKey === requestAgentKey) {
|
|
2563
|
+
return;
|
|
2564
|
+
}
|
|
2565
|
+
setUsedContextSize(
|
|
2566
|
+
resolveUsedContextSize({
|
|
2567
|
+
fallbackUsedTokens: result
|
|
2568
|
+
})
|
|
2569
|
+
);
|
|
2431
2570
|
}).catch((err) => {
|
|
2432
2571
|
if (cancelled) return;
|
|
2433
2572
|
console.warn("[Chat] Failed to load thread context usage:", err);
|
|
@@ -2435,7 +2574,15 @@ function ContextUsageIndicator({
|
|
|
2435
2574
|
return () => {
|
|
2436
2575
|
cancelled = true;
|
|
2437
2576
|
};
|
|
2438
|
-
}, [
|
|
2577
|
+
}, [
|
|
2578
|
+
assistantAgentKey,
|
|
2579
|
+
realtimeUsedContextSize,
|
|
2580
|
+
stream.apiKey,
|
|
2581
|
+
stream.apiUrl,
|
|
2582
|
+
stream.client,
|
|
2583
|
+
stream.threadId,
|
|
2584
|
+
stream.isLoading
|
|
2585
|
+
]);
|
|
2439
2586
|
if (typeof maxContextSize !== "number" || !Number.isFinite(maxContextSize) || maxContextSize <= 0) {
|
|
2440
2587
|
return null;
|
|
2441
2588
|
}
|
|
@@ -2553,6 +2700,8 @@ function Chat({
|
|
|
2553
2700
|
const [draft, setDraft] = React18.useState("");
|
|
2554
2701
|
const [selectedTool, setSelectedTool] = React18.useState(null);
|
|
2555
2702
|
const [attachments, setAttachments] = React18.useState([]);
|
|
2703
|
+
const [isAtBottom, setIsAtBottom] = React18.useState(true);
|
|
2704
|
+
const [hasUpdatesBelow, setHasUpdatesBelow] = React18.useState(false);
|
|
2556
2705
|
const {
|
|
2557
2706
|
threads,
|
|
2558
2707
|
deleteThread,
|
|
@@ -2561,27 +2710,141 @@ function Chat({
|
|
|
2561
2710
|
} = useThreads();
|
|
2562
2711
|
const viewportRef = React18.useRef(null);
|
|
2563
2712
|
const fileInputRef = React18.useRef(null);
|
|
2713
|
+
const shouldAutoScrollRef = React18.useRef(true);
|
|
2714
|
+
const forceFollowRef = React18.useRef(false);
|
|
2715
|
+
const previousMessageCountRef = React18.useRef(0);
|
|
2716
|
+
const previousScrollTopRef = React18.useRef(0);
|
|
2717
|
+
const autoScrollFrameRef = React18.useRef(null);
|
|
2718
|
+
const isPointerDownRef = React18.useRef(false);
|
|
2719
|
+
const lastTouchYRef = React18.useRef(null);
|
|
2564
2720
|
const resolvedTitle = title ?? t("chat.title");
|
|
2565
2721
|
const resolvedPlaceholder = placeholder ?? t("chat.placeholder");
|
|
2566
2722
|
const inputPlaceholder = selectedTool?.placeholderOverride ?? composer?.placeholder ?? resolvedPlaceholder;
|
|
2567
|
-
const messages = stream.messages ?? [];
|
|
2723
|
+
const messages = React18.useMemo(() => stream.messages ?? [], [stream.messages]);
|
|
2568
2724
|
const trimmedDraft = draft.trim();
|
|
2569
|
-
const
|
|
2570
|
-
|
|
2725
|
+
const cancelPendingAutoScroll = React18.useCallback(() => {
|
|
2726
|
+
if (autoScrollFrameRef.current !== null) {
|
|
2727
|
+
cancelAnimationFrame(autoScrollFrameRef.current);
|
|
2728
|
+
autoScrollFrameRef.current = null;
|
|
2729
|
+
}
|
|
2730
|
+
}, []);
|
|
2731
|
+
const disableAutoFollow = React18.useCallback(() => {
|
|
2732
|
+
forceFollowRef.current = false;
|
|
2733
|
+
shouldAutoScrollRef.current = false;
|
|
2734
|
+
cancelPendingAutoScroll();
|
|
2735
|
+
}, [cancelPendingAutoScroll]);
|
|
2736
|
+
const enableAutoFollow = React18.useCallback(() => {
|
|
2737
|
+
forceFollowRef.current = true;
|
|
2738
|
+
shouldAutoScrollRef.current = true;
|
|
2739
|
+
setHasUpdatesBelow(false);
|
|
2740
|
+
}, []);
|
|
2741
|
+
const scrollToBottom = React18.useCallback((smooth = false, force = false) => {
|
|
2742
|
+
if (force) {
|
|
2743
|
+
enableAutoFollow();
|
|
2744
|
+
}
|
|
2745
|
+
cancelPendingAutoScroll();
|
|
2746
|
+
autoScrollFrameRef.current = requestAnimationFrame(() => {
|
|
2747
|
+
autoScrollFrameRef.current = null;
|
|
2571
2748
|
const viewport = viewportRef.current;
|
|
2572
2749
|
if (viewport) {
|
|
2750
|
+
if (!force && !shouldAutoScrollRef.current) {
|
|
2751
|
+
return;
|
|
2752
|
+
}
|
|
2573
2753
|
viewport.scrollTo({
|
|
2574
2754
|
top: viewport.scrollHeight,
|
|
2575
2755
|
behavior: smooth ? "smooth" : "instant"
|
|
2576
2756
|
});
|
|
2577
2757
|
}
|
|
2578
2758
|
});
|
|
2579
|
-
}, []);
|
|
2759
|
+
}, [cancelPendingAutoScroll, enableAutoFollow]);
|
|
2580
2760
|
React18.useEffect(() => {
|
|
2581
|
-
|
|
2582
|
-
|
|
2761
|
+
const viewport = viewportRef.current;
|
|
2762
|
+
if (!viewport) return;
|
|
2763
|
+
previousScrollTopRef.current = viewport.scrollTop;
|
|
2764
|
+
const stopPointerTracking = () => {
|
|
2765
|
+
isPointerDownRef.current = false;
|
|
2766
|
+
};
|
|
2767
|
+
const updateAutoScrollState = () => {
|
|
2768
|
+
const nextScrollTop = viewport.scrollTop;
|
|
2769
|
+
const isScrollingUp = nextScrollTop < previousScrollTopRef.current - 1;
|
|
2770
|
+
previousScrollTopRef.current = nextScrollTop;
|
|
2771
|
+
const nearBottom = isNearBottom(viewport);
|
|
2772
|
+
setIsAtBottom(nearBottom);
|
|
2773
|
+
if (nearBottom) {
|
|
2774
|
+
shouldAutoScrollRef.current = true;
|
|
2775
|
+
setHasUpdatesBelow(false);
|
|
2776
|
+
return;
|
|
2777
|
+
}
|
|
2778
|
+
if (forceFollowRef.current) {
|
|
2779
|
+
shouldAutoScrollRef.current = true;
|
|
2780
|
+
return;
|
|
2781
|
+
}
|
|
2782
|
+
if (isPointerDownRef.current && isScrollingUp) {
|
|
2783
|
+
disableAutoFollow();
|
|
2784
|
+
return;
|
|
2785
|
+
}
|
|
2786
|
+
shouldAutoScrollRef.current = false;
|
|
2787
|
+
};
|
|
2788
|
+
const handleWheel = (event) => {
|
|
2789
|
+
if (event.deltaY < 0) {
|
|
2790
|
+
disableAutoFollow();
|
|
2791
|
+
}
|
|
2792
|
+
};
|
|
2793
|
+
const handlePointerDown = () => {
|
|
2794
|
+
isPointerDownRef.current = true;
|
|
2795
|
+
};
|
|
2796
|
+
const handleTouchStart = (event) => {
|
|
2797
|
+
lastTouchYRef.current = event.touches[0]?.clientY ?? null;
|
|
2798
|
+
};
|
|
2799
|
+
const handleTouchMove = (event) => {
|
|
2800
|
+
const nextTouchY = event.touches[0]?.clientY;
|
|
2801
|
+
if (typeof nextTouchY !== "number") return;
|
|
2802
|
+
if (lastTouchYRef.current !== null && nextTouchY > lastTouchYRef.current + 1) {
|
|
2803
|
+
disableAutoFollow();
|
|
2804
|
+
}
|
|
2805
|
+
lastTouchYRef.current = nextTouchY;
|
|
2806
|
+
};
|
|
2807
|
+
const handleTouchEnd = () => {
|
|
2808
|
+
lastTouchYRef.current = null;
|
|
2809
|
+
};
|
|
2810
|
+
updateAutoScrollState();
|
|
2811
|
+
viewport.addEventListener("wheel", handleWheel, { passive: true });
|
|
2812
|
+
viewport.addEventListener("pointerdown", handlePointerDown, { passive: true });
|
|
2813
|
+
viewport.addEventListener("scroll", updateAutoScrollState, { passive: true });
|
|
2814
|
+
viewport.addEventListener("touchstart", handleTouchStart, { passive: true });
|
|
2815
|
+
viewport.addEventListener("touchmove", handleTouchMove, { passive: true });
|
|
2816
|
+
viewport.addEventListener("touchend", handleTouchEnd, { passive: true });
|
|
2817
|
+
window.addEventListener("pointerup", stopPointerTracking, { passive: true });
|
|
2818
|
+
window.addEventListener("pointercancel", stopPointerTracking, { passive: true });
|
|
2819
|
+
return () => {
|
|
2820
|
+
cancelPendingAutoScroll();
|
|
2821
|
+
viewport.removeEventListener("wheel", handleWheel);
|
|
2822
|
+
viewport.removeEventListener("pointerdown", handlePointerDown);
|
|
2823
|
+
viewport.removeEventListener("scroll", updateAutoScrollState);
|
|
2824
|
+
viewport.removeEventListener("touchstart", handleTouchStart);
|
|
2825
|
+
viewport.removeEventListener("touchmove", handleTouchMove);
|
|
2826
|
+
viewport.removeEventListener("touchend", handleTouchEnd);
|
|
2827
|
+
window.removeEventListener("pointerup", stopPointerTracking);
|
|
2828
|
+
window.removeEventListener("pointercancel", stopPointerTracking);
|
|
2829
|
+
};
|
|
2830
|
+
}, [cancelPendingAutoScroll, disableAutoFollow]);
|
|
2583
2831
|
React18.useEffect(() => {
|
|
2584
|
-
|
|
2832
|
+
shouldAutoScrollRef.current = true;
|
|
2833
|
+
forceFollowRef.current = false;
|
|
2834
|
+
previousScrollTopRef.current = 0;
|
|
2835
|
+
setIsAtBottom(true);
|
|
2836
|
+
setHasUpdatesBelow(false);
|
|
2837
|
+
}, [stream.threadId]);
|
|
2838
|
+
React18.useEffect(() => {
|
|
2839
|
+
const messageCountChanged = messages.length !== previousMessageCountRef.current;
|
|
2840
|
+
previousMessageCountRef.current = messages.length;
|
|
2841
|
+
if (!shouldAutoScrollRef.current) {
|
|
2842
|
+
if (messageCountChanged || stream.isLoading) {
|
|
2843
|
+
setHasUpdatesBelow(true);
|
|
2844
|
+
}
|
|
2845
|
+
return;
|
|
2846
|
+
}
|
|
2847
|
+
if (messageCountChanged || stream.isLoading) {
|
|
2585
2848
|
scrollToBottom();
|
|
2586
2849
|
}
|
|
2587
2850
|
}, [stream.isLoading, messages, scrollToBottom]);
|
|
@@ -2639,7 +2902,7 @@ function Chat({
|
|
|
2639
2902
|
}
|
|
2640
2903
|
}
|
|
2641
2904
|
);
|
|
2642
|
-
scrollToBottom(true);
|
|
2905
|
+
scrollToBottom(true, true);
|
|
2643
2906
|
if (selectedTool && !selectedTool.pinned) {
|
|
2644
2907
|
setSelectedTool(null);
|
|
2645
2908
|
}
|
|
@@ -2741,7 +3004,7 @@ function Chat({
|
|
|
2741
3004
|
}
|
|
2742
3005
|
}
|
|
2743
3006
|
);
|
|
2744
|
-
scrollToBottom(true);
|
|
3007
|
+
scrollToBottom(true, true);
|
|
2745
3008
|
};
|
|
2746
3009
|
const loadConversationMessages = React18.useCallback(
|
|
2747
3010
|
async (recordId) => {
|
|
@@ -2821,6 +3084,7 @@ function Chat({
|
|
|
2821
3084
|
}
|
|
2822
3085
|
}
|
|
2823
3086
|
);
|
|
3087
|
+
scrollToBottom(true, true);
|
|
2824
3088
|
}
|
|
2825
3089
|
};
|
|
2826
3090
|
const acceptMimes = composer?.attachments?.accept ? Object.entries(composer.attachments.accept).map(([mime, exts]) => [mime, ...exts.map((e) => `.${e}`)].join(",")).join(",") : void 0;
|
|
@@ -2839,7 +3103,7 @@ function Chat({
|
|
|
2839
3103
|
{
|
|
2840
3104
|
ref: viewportRef,
|
|
2841
3105
|
className: cn(
|
|
2842
|
-
"flex h-full w-full flex-col flex-1 overflow-y-auto bg-background shadow-sm",
|
|
3106
|
+
"relative flex h-full w-full flex-col flex-1 overflow-y-auto bg-background shadow-sm",
|
|
2843
3107
|
className
|
|
2844
3108
|
),
|
|
2845
3109
|
children: [
|
|
@@ -2976,6 +3240,22 @@ function Chat({
|
|
|
2976
3240
|
})()
|
|
2977
3241
|
] })
|
|
2978
3242
|
] }),
|
|
3243
|
+
!isAtBottom && messages.length > 0 && /* @__PURE__ */ jsx24("div", { className: "sticky bottom-20 z-20 flex justify-center px-4 pointer-events-none", children: /* @__PURE__ */ jsx24(
|
|
3244
|
+
Button,
|
|
3245
|
+
{
|
|
3246
|
+
type: "button",
|
|
3247
|
+
size: "icon-sm",
|
|
3248
|
+
variant: hasUpdatesBelow ? "default" : "outline",
|
|
3249
|
+
className: cn(
|
|
3250
|
+
"pointer-events-auto rounded-full shadow-md dark:border-white/20 dark:ring-1 dark:ring-white/15 dark:shadow-[0_0_0_1px_rgba(255,255,255,0.06),0_10px_30px_rgba(0,0,0,0.45)]",
|
|
3251
|
+
hasUpdatesBelow && "animate-bounce"
|
|
3252
|
+
),
|
|
3253
|
+
onClick: () => scrollToBottom(true, true),
|
|
3254
|
+
"aria-label": t("chat.scrollToBottom"),
|
|
3255
|
+
title: t("chat.scrollToBottom"),
|
|
3256
|
+
children: /* @__PURE__ */ jsx24(ArrowDown, { size: 16 })
|
|
3257
|
+
}
|
|
3258
|
+
) }),
|
|
2979
3259
|
/* @__PURE__ */ jsxs13("div", { className: "p-2 sticky bottom-0 z-10 bg-background", children: [
|
|
2980
3260
|
threadErrorMessage && /* @__PURE__ */ jsx24("div", { className: "mb-3 rounded-lg border border-destructive/30 bg-destructive/10 px-3 py-2 text-sm text-destructive", children: threadErrorMessage }),
|
|
2981
3261
|
/* @__PURE__ */ jsx24(
|