@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.
Files changed (287) hide show
  1. package/dist/app/assets/{abap-CWzFNSp-.js → abap-BoIjZmaZ.js} +1 -1
  2. package/dist/app/assets/{abnf-BxCFtB4s.js → abnf-dSbn3xkN.js} +1 -1
  3. package/dist/app/assets/{actionscript-BMVcZIWM.js → actionscript-ChuNDFqb.js} +1 -1
  4. package/dist/app/assets/{ada-dl2GoC8H.js → ada-Dvd3C277.js} +1 -1
  5. package/dist/app/assets/{agda-D4pBWumw.js → agda-0xfHec_W.js} +1 -1
  6. package/dist/app/assets/{al-DN0MgvqQ.js → al-Coze2G4P.js} +1 -1
  7. package/dist/app/assets/{antlr4-CGc7Ys0O.js → antlr4-DAeOwqy-.js} +1 -1
  8. package/dist/app/assets/{apacheconf-CGJnbgp4.js → apacheconf-C37ePIkJ.js} +1 -1
  9. package/dist/app/assets/{apex-ByEj4aCS.js → apex-DH8r9Bnu.js} +1 -1
  10. package/dist/app/assets/{apl-CZoiimft.js → apl-G86Tst_e.js} +1 -1
  11. package/dist/app/assets/{applescript-n8m_Jzeh.js → applescript-D7AnwBsW.js} +1 -1
  12. package/dist/app/assets/{aql-BHYPVYEd.js → aql-CEIMa69e.js} +1 -1
  13. package/dist/app/assets/{arduino-DOwjV1xr.js → arduino-C4__FgG7.js} +1 -1
  14. package/dist/app/assets/{arff-DDAls7WH.js → arff-DucTCOwY.js} +1 -1
  15. package/dist/app/assets/{asciidoc-CDg0i7az.js → asciidoc-b6l_xRT-.js} +1 -1
  16. package/dist/app/assets/{asm6502-gRZ7mYMo.js → asm6502-B2aeOPaQ.js} +1 -1
  17. package/dist/app/assets/{asmatmel-m61heT5k.js → asmatmel-DWoi6J9F.js} +1 -1
  18. package/dist/app/assets/{aspnet-C3LE21kz.js → aspnet-CWRG9aUZ.js} +1 -1
  19. package/dist/app/assets/{autohotkey-DzTDmePJ.js → autohotkey-B0_8QbTJ.js} +1 -1
  20. package/dist/app/assets/{autoit-Cnhhv2qU.js → autoit-CHJRnMaa.js} +1 -1
  21. package/dist/app/assets/{avisynth-BrJReYCb.js → avisynth-nYVaucuS.js} +1 -1
  22. package/dist/app/assets/{avro-idl-CaBS_m5w.js → avro-idl-5HEY8nyQ.js} +1 -1
  23. package/dist/app/assets/{bash-Bg2wTUUd.js → bash-CbjNmFNe.js} +1 -1
  24. package/dist/app/assets/{basic-DGW2DfId.js → basic-Bk4MU9TY.js} +1 -1
  25. package/dist/app/assets/{batch-CFcNVGyG.js → batch-BVR1Z-Ze.js} +1 -1
  26. package/dist/app/assets/{bbcode-BqKfVTdS.js → bbcode-BXZzCVWs.js} +1 -1
  27. package/dist/app/assets/{bicep-CSj7qJLn.js → bicep-C7--NbzV.js} +1 -1
  28. package/dist/app/assets/{birb-CZ_UnLaE.js → birb-BoaEfruo.js} +1 -1
  29. package/dist/app/assets/{bison-AJPkLJ01.js → bison-46XaAAX9.js} +1 -1
  30. package/dist/app/assets/{bnf-C4wLUeiV.js → bnf-iXMbAgBJ.js} +1 -1
  31. package/dist/app/assets/{brainfuck-CtynTwQW.js → brainfuck-Jzxh49W2.js} +1 -1
  32. package/dist/app/assets/{brightscript-6fcqU7un.js → brightscript-BadaxwXh.js} +1 -1
  33. package/dist/app/assets/{bro-BHjD18jy.js → bro-CR7xdyd-.js} +1 -1
  34. package/dist/app/assets/{bsl-u3z--w0F.js → bsl-9EeFiwxQ.js} +1 -1
  35. package/dist/app/assets/{c-BqSyeoF5.js → c-DQ7liO6a.js} +1 -1
  36. package/dist/app/assets/{cfscript-Ba3ohzJU.js → cfscript-SALoq7FX.js} +1 -1
  37. package/dist/app/assets/{chaiscript-B1kf0tLX.js → chaiscript-CNEL74a4.js} +1 -1
  38. package/dist/app/assets/{cil-Bbq_Pohc.js → cil-C2ZEDTDB.js} +1 -1
  39. package/dist/app/assets/{clike-BQY1uX2J.js → clike-DsD21Evf.js} +1 -1
  40. package/dist/app/assets/{clojure-CD5FzqN8.js → clojure-CZHHyOHz.js} +1 -1
  41. package/dist/app/assets/{cmake-E4O60FXO.js → cmake-CTchcqYX.js} +1 -1
  42. package/dist/app/assets/{cobol-4mBujo3m.js → cobol-BiftCL-L.js} +1 -1
  43. package/dist/app/assets/{coffeescript-CePI6Tdq.js → coffeescript-DijTcNNW.js} +1 -1
  44. package/dist/app/assets/{concurnas-uDjQZLaY.js → concurnas-ard6ErmL.js} +1 -1
  45. package/dist/app/assets/{coq-CaOpj4UX.js → coq-i9-qHej_.js} +1 -1
  46. package/dist/app/assets/{core-pu1AeMbV.js → core-aj5JZjcO.js} +1 -1
  47. package/dist/app/assets/{cpp-CcW-8rTc.js → cpp-BT7nVZr2.js} +1 -1
  48. package/dist/app/assets/{crystal-DRfBhOgf.js → crystal-_iZ0Q5Jk.js} +1 -1
  49. package/dist/app/assets/{csharp-BEQdGJcF.js → csharp-CTQVhFeP.js} +1 -1
  50. package/dist/app/assets/{cshtml-5ml03XNo.js → cshtml-DVHl3YlJ.js} +1 -1
  51. package/dist/app/assets/{csp-Behk06iM.js → csp-Jhq_JW1m.js} +1 -1
  52. package/dist/app/assets/{css-DXGELfz6.js → css-Cokpob_V.js} +1 -1
  53. package/dist/app/assets/{css-extras-B_cNEgHi.js → css-extras-BZG-mKgU.js} +1 -1
  54. package/dist/app/assets/{csv-CVwcNBm7.js → csv-DJ6MtS6f.js} +1 -1
  55. package/dist/app/assets/{cypher-BcNVi6vJ.js → cypher-DLIBipvO.js} +1 -1
  56. package/dist/app/assets/{d-HttcRaBz.js → d-vgJqU9a6.js} +1 -1
  57. package/dist/app/assets/{dart-BW2vioEe.js → dart-mEK1vzDL.js} +1 -1
  58. package/dist/app/assets/{dataweave-Bd5xMJuj.js → dataweave-Dgcq8Rdn.js} +1 -1
  59. package/dist/app/assets/{dax-DfpKP7XF.js → dax-C7NOquac.js} +1 -1
  60. package/dist/app/assets/{dhall-BqQAmdDY.js → dhall-DQcztP06.js} +1 -1
  61. package/dist/app/assets/{diff-Q6gyzp1p.js → diff-CIWhtMw0.js} +1 -1
  62. package/dist/app/assets/{django-CBK6CHRd.js → django-B28DWuEq.js} +1 -1
  63. package/dist/app/assets/{dns-zone-file-CNh7YnMq.js → dns-zone-file-C0LYWClw.js} +1 -1
  64. package/dist/app/assets/{docker-B_Q25cYf.js → docker-XC07_dge.js} +1 -1
  65. package/dist/app/assets/{dot-CNzlgF5r.js → dot-B-cLSr2L.js} +1 -1
  66. package/dist/app/assets/{ebnf-CFKzKpl0.js → ebnf-LdHuV98Q.js} +1 -1
  67. package/dist/app/assets/{editorconfig-CiSrxVma.js → editorconfig-6qFF56uJ.js} +1 -1
  68. package/dist/app/assets/{eiffel-BfApOLd3.js → eiffel-BBlop-Ob.js} +1 -1
  69. package/dist/app/assets/{ejs-4Dd6gLZA.js → ejs-Cpb8mc_5.js} +1 -1
  70. package/dist/app/assets/{elixir-DWUeUQTK.js → elixir-BCH_jx6L.js} +1 -1
  71. package/dist/app/assets/{elm-BL5Cpktc.js → elm-BYitJ5N8.js} +1 -1
  72. package/dist/app/assets/{erb-DUtgA_WM.js → erb-BM71CWBM.js} +1 -1
  73. package/dist/app/assets/{erlang-nZyH6Oo4.js → erlang-C3MAiPYK.js} +1 -1
  74. package/dist/app/assets/{etlua-BXUfGRLO.js → etlua-B59J9deP.js} +1 -1
  75. package/dist/app/assets/{excel-formula-DP8NQckB.js → excel-formula-DL0sVnhe.js} +1 -1
  76. package/dist/app/assets/{factor-D9oMyJYq.js → factor-C0qd9-Ik.js} +1 -1
  77. package/dist/app/assets/{false-C5KgjRg_.js → false-CJfgqy4_.js} +1 -1
  78. package/dist/app/assets/{firestore-security-rules-h4rD4BAP.js → firestore-security-rules-DwecoR3J.js} +1 -1
  79. package/dist/app/assets/{flow-CtGPm__x.js → flow-CDbqIUbL.js} +1 -1
  80. package/dist/app/assets/{fortran-JKmvOaKb.js → fortran-hpiaS8_6.js} +1 -1
  81. package/dist/app/assets/{fsharp-CY-kWYXS.js → fsharp-DbRhkxgi.js} +1 -1
  82. package/dist/app/assets/{ftl-lDx2eN4b.js → ftl-1DykyJWZ.js} +1 -1
  83. package/dist/app/assets/{gap-CbzqI0Rg.js → gap-DoGlEwd3.js} +1 -1
  84. package/dist/app/assets/{gcode-B0j0LQok.js → gcode-D-Px2cE_.js} +1 -1
  85. package/dist/app/assets/{gdscript-OeCrPajz.js → gdscript-BrNoOncy.js} +1 -1
  86. package/dist/app/assets/{gedcom-dvLxXwAu.js → gedcom-B_NdfrML.js} +1 -1
  87. package/dist/app/assets/{gherkin-DKAe3RsJ.js → gherkin-CqgRkfNX.js} +1 -1
  88. package/dist/app/assets/{git-DvC3-v9a.js → git-CvFmzhfv.js} +1 -1
  89. package/dist/app/assets/{glsl-Du_zalDB.js → glsl-CLucsEPA.js} +1 -1
  90. package/dist/app/assets/{gml-okrayOzA.js → gml-BlpkejAp.js} +1 -1
  91. package/dist/app/assets/{gn-BRy21STB.js → gn-BhXi_GxX.js} +1 -1
  92. package/dist/app/assets/{go-BoOL6e-2.js → go-2dcH9sSS.js} +1 -1
  93. package/dist/app/assets/{go-module-CreBO_WI.js → go-module-DzMt3K71.js} +1 -1
  94. package/dist/app/assets/{graphql-B8puKuqv.js → graphql-dsIFYpYZ.js} +1 -1
  95. package/dist/app/assets/{groovy-Rr-99oQa.js → groovy-DgzpjP_D.js} +1 -1
  96. package/dist/app/assets/{haml-B16TW3OA.js → haml-DT74cpdh.js} +1 -1
  97. package/dist/app/assets/{handlebars-DJ35T0jG.js → handlebars-Dz1-cyuE.js} +1 -1
  98. package/dist/app/assets/{haskell-CNmIr1qp.js → haskell-BtvH26fL.js} +1 -1
  99. package/dist/app/assets/{haxe-BP0489Ny.js → haxe-CJ2gszbA.js} +1 -1
  100. package/dist/app/assets/{hcl-BZ0mKM4I.js → hcl-BNZH9Ib9.js} +1 -1
  101. package/dist/app/assets/{hlsl-BvuUfy9Y.js → hlsl-CSuHbA9t.js} +1 -1
  102. package/dist/app/assets/{hoon-F9stahw9.js → hoon-BeJF0lUF.js} +1 -1
  103. package/dist/app/assets/{hpkp-BTP6fPb6.js → hpkp-Biss6dVt.js} +1 -1
  104. package/dist/app/assets/{hsts-B4iFfqi0.js → hsts-CLEmT2zf.js} +1 -1
  105. package/dist/app/assets/{http-BsKsFgBg.js → http-CTrWhEI8.js} +1 -1
  106. package/dist/app/assets/{ichigojam-Br86wNcB.js → ichigojam-CM00i9P4.js} +1 -1
  107. package/dist/app/assets/{icon-DOq3L_9O.js → icon-DEnOKKOC.js} +1 -1
  108. package/dist/app/assets/{icu-message-format-D7BXTTd2.js → icu-message-format-3z4ane6q.js} +1 -1
  109. package/dist/app/assets/{idris-Cff7mPno.js → idris-CkNPAoKr.js} +1 -1
  110. package/dist/app/assets/{iecst-kzhp9nKs.js → iecst-3D5UGiz6.js} +1 -1
  111. package/dist/app/assets/{ignore-DZYE9Szm.js → ignore-BrbB_BSD.js} +1 -1
  112. package/dist/app/assets/index-BTGdEmOx.css +1 -0
  113. package/dist/app/assets/index-DAVw-s04.js +439 -0
  114. package/dist/app/assets/{inform7-Dz2gt0-c.js → inform7-XNwha8I1.js} +1 -1
  115. package/dist/app/assets/{ini-Btpvp4DT.js → ini-DLlwf2gT.js} +1 -1
  116. package/dist/app/assets/{io-fpXGYgAV.js → io-D2RYUqys.js} +1 -1
  117. package/dist/app/assets/{j-8UK359TD.js → j-BasAkJbf.js} +1 -1
  118. package/dist/app/assets/{java-CcEYgaqi.js → java-6c1Mm3IN.js} +1 -1
  119. package/dist/app/assets/{javadoc-BYWdVRGr.js → javadoc-CRaAlfqw.js} +1 -1
  120. package/dist/app/assets/{javadoclike-DZIZZJFp.js → javadoclike-9bpcWOkY.js} +1 -1
  121. package/dist/app/assets/{javascript-BFsnARZD.js → javascript-DZUmzoI7.js} +1 -1
  122. package/dist/app/assets/{javastacktrace-B8IM8tv1.js → javastacktrace-g-dS0tWu.js} +1 -1
  123. package/dist/app/assets/{jexl-C6vnzKaQ.js → jexl-BrjlwC5s.js} +1 -1
  124. package/dist/app/assets/{jolie-J-E5Gc-W.js → jolie-CXt8utu9.js} +1 -1
  125. package/dist/app/assets/{jq-CeMWQPPn.js → jq-Bcnqodq2.js} +1 -1
  126. package/dist/app/assets/{js-extras-DT1ht6Uf.js → js-extras-_DMxxy53.js} +1 -1
  127. package/dist/app/assets/{js-templates-DweuRIjv.js → js-templates-B1Xy1qPf.js} +1 -1
  128. package/dist/app/assets/{jsdoc-CdaRjYMn.js → jsdoc-CRLso8tn.js} +1 -1
  129. package/dist/app/assets/{json-DJXtscC1.js → json-DGdFBZaG.js} +1 -1
  130. package/dist/app/assets/{json5-BoYaK0oG.js → json5-DHfIgdC6.js} +1 -1
  131. package/dist/app/assets/{jsonp-Bqin8zpD.js → jsonp-DQjCVsy3.js} +1 -1
  132. package/dist/app/assets/{jsstacktrace-C_x2X0wP.js → jsstacktrace-DdpnKq-S.js} +1 -1
  133. package/dist/app/assets/{jsx-R36Hja1Z.js → jsx-DGHeNivK.js} +1 -1
  134. package/dist/app/assets/{julia-DadwWMMU.js → julia-C4_8nu13.js} +1 -1
  135. package/dist/app/assets/{keepalived-Bn7I7eeZ.js → keepalived-CgBr_LcP.js} +1 -1
  136. package/dist/app/assets/{keyman-BsLy49b_.js → keyman-DLsdmPzg.js} +1 -1
  137. package/dist/app/assets/{kotlin-DAec6q-r.js → kotlin-BIyZ_mVz.js} +1 -1
  138. package/dist/app/assets/{kumir-Clgy4fig.js → kumir-DxZ90Jrj.js} +1 -1
  139. package/dist/app/assets/{kusto-B8r6qF-j.js → kusto-DXX_XYlb.js} +1 -1
  140. package/dist/app/assets/{latex-BiuC2wkP.js → latex-Chy4MZga.js} +1 -1
  141. package/dist/app/assets/{latte-Cla5OXcC.js → latte-CwOr4WSZ.js} +1 -1
  142. package/dist/app/assets/{less-D_ikeydS.js → less-NIIuxYev.js} +1 -1
  143. package/dist/app/assets/{lilypond--YpFjBez.js → lilypond-I8E_e9s3.js} +1 -1
  144. package/dist/app/assets/{liquid-CPV4dMvO.js → liquid-CC9-AlJL.js} +1 -1
  145. package/dist/app/assets/{lisp-DOFH1l-q.js → lisp-DU3ynTRL.js} +1 -1
  146. package/dist/app/assets/{livescript-JB55yErK.js → livescript-mede3eXX.js} +1 -1
  147. package/dist/app/assets/{llvm-jN3Ev1En.js → llvm-ChOZipf9.js} +1 -1
  148. package/dist/app/assets/{log-DQQCNEql.js → log-BlgfBYo8.js} +1 -1
  149. package/dist/app/assets/{lolcode-ksN5f-yb.js → lolcode-Dxp_wkNH.js} +1 -1
  150. package/dist/app/assets/{lua-DC9DJI9p.js → lua-De71Dk_o.js} +1 -1
  151. package/dist/app/assets/{magma-DrubqNTB.js → magma-Xk9asSNm.js} +1 -1
  152. package/dist/app/assets/{makefile-B5k684cb.js → makefile-D8AvVIZr.js} +1 -1
  153. package/dist/app/assets/{markdown-DFVUIKIi.js → markdown-f2l7WvCf.js} +1 -1
  154. package/dist/app/assets/{markup-templating-CiwYkdhY.js → markup-templating-DGy3xLOw.js} +1 -1
  155. package/dist/app/assets/{markup-CjoPL6K5.js → markup-twhd9bJ7.js} +1 -1
  156. package/dist/app/assets/{matlab-ERqXPSns.js → matlab-BnnzNP6N.js} +1 -1
  157. package/dist/app/assets/{maxscript-D5ySF-hZ.js → maxscript-wegT0Hte.js} +1 -1
  158. package/dist/app/assets/{mel-DcinxC8_.js → mel-BeWBIIM8.js} +1 -1
  159. package/dist/app/assets/{mermaid-CC9wRo1N.js → mermaid-BTAS88aZ.js} +1 -1
  160. package/dist/app/assets/{mizar-FpXRzvKF.js → mizar-DwJSTZ3i.js} +1 -1
  161. package/dist/app/assets/{mongodb-BKjEps6Z.js → mongodb-CXGzXJVg.js} +1 -1
  162. package/dist/app/assets/{monkey-DTH2komu.js → monkey-CDzLAr7y.js} +1 -1
  163. package/dist/app/assets/{moonscript-CJ-TUmDO.js → moonscript-CMoyqNP7.js} +1 -1
  164. package/dist/app/assets/{n1ql-DuVTgQ4i.js → n1ql-xaPxaJST.js} +1 -1
  165. package/dist/app/assets/{n4js-C1kvC1iR.js → n4js-BZ6fn5FD.js} +1 -1
  166. package/dist/app/assets/{nand2tetris-hdl-BD55HVds.js → nand2tetris-hdl-DAx6t1t9.js} +1 -1
  167. package/dist/app/assets/{naniscript-hvAS8R5k.js → naniscript-DF84GuME.js} +1 -1
  168. package/dist/app/assets/{nasm-BN4tkUGd.js → nasm-B7uV0gGJ.js} +1 -1
  169. package/dist/app/assets/{neon-Cwa4bFMz.js → neon-CKj_SNMo.js} +1 -1
  170. package/dist/app/assets/{nevod-7tUWkcxU.js → nevod-Dhy_1bov.js} +1 -1
  171. package/dist/app/assets/{nginx-BQNWmJeC.js → nginx-p1M3Geay.js} +1 -1
  172. package/dist/app/assets/{nim-VFG-pALN.js → nim-CU39HumB.js} +1 -1
  173. package/dist/app/assets/{nix-ryTFWbv-.js → nix-CwpMGFgf.js} +1 -1
  174. package/dist/app/assets/{nsis-csuADrZa.js → nsis-eoDJFK6h.js} +1 -1
  175. package/dist/app/assets/{objectivec-CSGhR-Vw.js → objectivec-C3g9_fbX.js} +1 -1
  176. package/dist/app/assets/{ocaml-D0LmaOuS.js → ocaml-CSHSpeFg.js} +1 -1
  177. package/dist/app/assets/{opencl-DAUuuIMo.js → opencl-BdyiZtQ0.js} +1 -1
  178. package/dist/app/assets/{openqasm-DG7a1Exg.js → openqasm-je8WlDNj.js} +1 -1
  179. package/dist/app/assets/{oz-Ca36DgAF.js → oz-CUz9q9Cx.js} +1 -1
  180. package/dist/app/assets/{parigp-DLpf5jtK.js → parigp-BlcFmUeN.js} +1 -1
  181. package/dist/app/assets/{parser-BK0LebkS.js → parser-BEb8_JfW.js} +1 -1
  182. package/dist/app/assets/{pascal-BElfvk70.js → pascal-CXud7dwk.js} +1 -1
  183. package/dist/app/assets/{pascaligo-iZXFGeX_.js → pascaligo-D8TqU7tP.js} +1 -1
  184. package/dist/app/assets/{pcaxis-CRNF94Ci.js → pcaxis-Rc2xz6nY.js} +1 -1
  185. package/dist/app/assets/{peoplecode-Dw92XHF9.js → peoplecode-vcggeuWN.js} +1 -1
  186. package/dist/app/assets/{perl-CdfnIJMq.js → perl-UKwRKGyT.js} +1 -1
  187. package/dist/app/assets/{php-Dln42vSU.js → php-AVlR1HxF.js} +1 -1
  188. package/dist/app/assets/{php-extras-0UIOyCNY.js → php-extras-9vU0n0hg.js} +1 -1
  189. package/dist/app/assets/{phpdoc-K_FSRCrz.js → phpdoc-DdNIP5Cz.js} +1 -1
  190. package/dist/app/assets/{plsql-CDziRovj.js → plsql-CHF_uFPR.js} +1 -1
  191. package/dist/app/assets/{powerquery-hRIv-7HY.js → powerquery-DYaLrf7D.js} +1 -1
  192. package/dist/app/assets/{powershell-Cvsi-Ajt.js → powershell-C_A95Q2Z.js} +1 -1
  193. package/dist/app/assets/{processing-BzBfl4pu.js → processing-D2A_N_ov.js} +1 -1
  194. package/dist/app/assets/{prolog-Bu6-Dx5E.js → prolog-uXSXcG5C.js} +1 -1
  195. package/dist/app/assets/{promql-DDaoibvE.js → promql-BphtLzBj.js} +1 -1
  196. package/dist/app/assets/{properties-DMGmO8LS.js → properties-By8wzMLh.js} +1 -1
  197. package/dist/app/assets/{protobuf-DIALiUNt.js → protobuf-Br036i_2.js} +1 -1
  198. package/dist/app/assets/{psl-ONY-TRz1.js → psl-BqC5a1i2.js} +1 -1
  199. package/dist/app/assets/{pug-ChphTcM1.js → pug-CIlbkPhR.js} +1 -1
  200. package/dist/app/assets/{puppet-BE8IkE_0.js → puppet-BPgrPqLm.js} +1 -1
  201. package/dist/app/assets/{pure-G57DkT8U.js → pure-B8Dte7PK.js} +1 -1
  202. package/dist/app/assets/{purebasic-CeNwW-mm.js → purebasic-BLQdSyOI.js} +1 -1
  203. package/dist/app/assets/{purescript-Bcq77YFD.js → purescript-Cqa3iDCo.js} +1 -1
  204. package/dist/app/assets/{q-FBi2WGZw.js → q-BGRU5tMs.js} +1 -1
  205. package/dist/app/assets/{qml-CtkX8OgF.js → qml-4wkr_e8q.js} +1 -1
  206. package/dist/app/assets/{qore-SnoYykD8.js → qore-Dn8DPaxX.js} +1 -1
  207. package/dist/app/assets/{qsharp-_B9KOx9k.js → qsharp-DuHfkgke.js} +1 -1
  208. package/dist/app/assets/{r-DSG5NIOe.js → r-JNvVUTzQ.js} +1 -1
  209. package/dist/app/assets/{racket-BeUDpNfX.js → racket-CuuQfryI.js} +1 -1
  210. package/dist/app/assets/{reason-BgOolNCf.js → reason-BkulNhIX.js} +1 -1
  211. package/dist/app/assets/{regex-Bk1oSl4f.js → regex-BK250LBm.js} +1 -1
  212. package/dist/app/assets/{rego-CIWDsMqH.js → rego-DD4jfVrz.js} +1 -1
  213. package/dist/app/assets/{renpy-_kbcmpNF.js → renpy-Up6DOU68.js} +1 -1
  214. package/dist/app/assets/{rest-DIpQJ-do.js → rest-JgcjFndH.js} +1 -1
  215. package/dist/app/assets/{rip-BSoWq6Xg.js → rip-Bw1N4gpB.js} +1 -1
  216. package/dist/app/assets/{roboconf-CvqHeFcy.js → roboconf-BSia62DO.js} +1 -1
  217. package/dist/app/assets/{robotframework-BJhVx5AC.js → robotframework-CD3SIrcT.js} +1 -1
  218. package/dist/app/assets/{ruby-BvQRDxMJ.js → ruby-DjzxjDrP.js} +1 -1
  219. package/dist/app/assets/{rust-kh79P-sj.js → rust-CenxkUdd.js} +1 -1
  220. package/dist/app/assets/{sas-P8RLNFXd.js → sas-CkhHqzKO.js} +1 -1
  221. package/dist/app/assets/{sass-B46x_1bU.js → sass-Bj5RvbQb.js} +1 -1
  222. package/dist/app/assets/{scala-ChFXl2Pu.js → scala-CD7YOhd_.js} +1 -1
  223. package/dist/app/assets/{scheme-BLb7t4HS.js → scheme-C7ztqGcC.js} +1 -1
  224. package/dist/app/assets/{scss-B9yekGw_.js → scss-jngc2vM4.js} +1 -1
  225. package/dist/app/assets/{shell-session-DmLv8D3v.js → shell-session-Cf8TkgCb.js} +1 -1
  226. package/dist/app/assets/{smali-Blke27la.js → smali-BWjG_F2J.js} +1 -1
  227. package/dist/app/assets/{smalltalk-tw6G9Dzq.js → smalltalk-B7bFUWh2.js} +1 -1
  228. package/dist/app/assets/{smarty-CkUQxAfl.js → smarty-BtDh_Lbq.js} +1 -1
  229. package/dist/app/assets/{sml-BwHXlh6a.js → sml-baFYvc0l.js} +1 -1
  230. package/dist/app/assets/{solidity-C75eGiBN.js → solidity-BHUtyotx.js} +1 -1
  231. package/dist/app/assets/{solution-file-CSQS8iUg.js → solution-file-B2B1VEoF.js} +1 -1
  232. package/dist/app/assets/{soy-BTvUPYjh.js → soy-D07-kKcL.js} +1 -1
  233. package/dist/app/assets/{sparql-CNBLBifn.js → sparql-Bq1nby44.js} +1 -1
  234. package/dist/app/assets/{splunk-spl-Nfz25S75.js → splunk-spl-7OB4FDIj.js} +1 -1
  235. package/dist/app/assets/{sqf-D61wR7ps.js → sqf-Y8kPyUGy.js} +1 -1
  236. package/dist/app/assets/{sql-ziUJYpp6.js → sql-cchOGBTS.js} +1 -1
  237. package/dist/app/assets/{squirrel-DPmSQoXL.js → squirrel-B5XNpE09.js} +1 -1
  238. package/dist/app/assets/{stan-VYGTpgHk.js → stan-BbdO1pjw.js} +1 -1
  239. package/dist/app/assets/{stylus-CNUEtGJh.js → stylus-CEx2rDQb.js} +1 -1
  240. package/dist/app/assets/{swift-oZWKuYsC.js → swift-E_SJ1p-z.js} +1 -1
  241. package/dist/app/assets/{systemd-CAFNmTIP.js → systemd-Bp6JJhYd.js} +1 -1
  242. package/dist/app/assets/{t4-cs-C-wJS3Mm.js → t4-cs-B6VxfevA.js} +1 -1
  243. package/dist/app/assets/{t4-templating-Dda8pWdO.js → t4-templating-BFVCMjcF.js} +1 -1
  244. package/dist/app/assets/{t4-vb-CBaRFyZF.js → t4-vb-Cw44ZeAl.js} +1 -1
  245. package/dist/app/assets/{tap-Bq_3zqFc.js → tap-BeeNW0Dn.js} +1 -1
  246. package/dist/app/assets/{tcl-BiRGOESK.js → tcl-Dr9LwAok.js} +1 -1
  247. package/dist/app/assets/{textile-ChcIaDjR.js → textile-DxUzeEfH.js} +1 -1
  248. package/dist/app/assets/{toml-DLsGEGKj.js → toml-DW-fj9Ve.js} +1 -1
  249. package/dist/app/assets/{tremor-Ckrp0S7o.js → tremor-CSPNAvxf.js} +1 -1
  250. package/dist/app/assets/{tt2-B_3AORYq.js → tt2-5hZ0qseS.js} +1 -1
  251. package/dist/app/assets/{turtle-CwHHk8_t.js → turtle-D78spzhr.js} +1 -1
  252. package/dist/app/assets/{twig-DlTuzPmO.js → twig-DSTGGsFD.js} +1 -1
  253. package/dist/app/assets/{typescript-f2B3Jfpo.js → typescript-DeKf5Yx2.js} +1 -1
  254. package/dist/app/assets/{typoscript-DnIUY4GA.js → typoscript-mYWtQCKO.js} +1 -1
  255. package/dist/app/assets/{unrealscript-D-gdymGH.js → unrealscript-DEhfFJlC.js} +1 -1
  256. package/dist/app/assets/{uorazor-C62OEYTZ.js → uorazor-0uC9DIjB.js} +1 -1
  257. package/dist/app/assets/{uri-bzMacUn_.js → uri-Df_kC31y.js} +1 -1
  258. package/dist/app/assets/{v-D50xccVa.js → v-LL1hUydo.js} +1 -1
  259. package/dist/app/assets/{vala-V-KAAqYe.js → vala-D02QI2Px.js} +1 -1
  260. package/dist/app/assets/{vbnet-D04Q9ev9.js → vbnet-CR3y5qLg.js} +1 -1
  261. package/dist/app/assets/{velocity-Cgya3_aZ.js → velocity-HNtJrOJ1.js} +1 -1
  262. package/dist/app/assets/{verilog-ChFGSA3K.js → verilog-BLgKa5W4.js} +1 -1
  263. package/dist/app/assets/{vhdl-BSU5cUGk.js → vhdl-CNY_UEqB.js} +1 -1
  264. package/dist/app/assets/{vim-KeffaP4E.js → vim-BZUpIPYO.js} +1 -1
  265. package/dist/app/assets/{visual-basic-Cxu4K2zU.js → visual-basic-DQ5SAQUu.js} +1 -1
  266. package/dist/app/assets/{warpscript-CLjny6tr.js → warpscript-C8sl0AcI.js} +1 -1
  267. package/dist/app/assets/{wasm-CpefXmbi.js → wasm-CtcB8nnU.js} +1 -1
  268. package/dist/app/assets/{web-idl-Bj5qae8A.js → web-idl-CVztrMTV.js} +1 -1
  269. package/dist/app/assets/{wiki-BI1zVW5V.js → wiki-gaSWHzkK.js} +1 -1
  270. package/dist/app/assets/{wolfram-BLawAZSW.js → wolfram-Bep9vU4v.js} +1 -1
  271. package/dist/app/assets/{wren-Z79FVuvr.js → wren-C21a2Yjt.js} +1 -1
  272. package/dist/app/assets/{xeora-D5SMpUiE.js → xeora-Dp4LrTkO.js} +1 -1
  273. package/dist/app/assets/{xml-doc-Dyd5ZrR3.js → xml-doc-Doj5uv_S.js} +1 -1
  274. package/dist/app/assets/{xojo-DGsUoypx.js → xojo-DG95hxHV.js} +1 -1
  275. package/dist/app/assets/{xquery-BvMyVlg9.js → xquery-BF4ZgZA4.js} +1 -1
  276. package/dist/app/assets/{yaml-BR4wSo8s.js → yaml-BKgY30GP.js} +1 -1
  277. package/dist/app/assets/{yang-VGMETllk.js → yang-1nC5puJT.js} +1 -1
  278. package/dist/app/assets/{zig-eOsQLEGa.js → zig-CYQ8mjbV.js} +1 -1
  279. package/dist/app/index.html +2 -2
  280. package/dist/index.cjs +341 -65
  281. package/dist/index.css +0 -36
  282. package/dist/index.d.cts +2 -2
  283. package/dist/index.d.ts +2 -2
  284. package/dist/index.js +347 -67
  285. package/package.json +4 -5
  286. package/dist/app/assets/index-BqfTSOoT.js +0 -438
  287. package/dist/app/assets/index-BzKLI1qz.css +0 -1
package/dist/index.cjs CHANGED
@@ -89,6 +89,15 @@ function createMessageId() {
89
89
  return globalThis.crypto?.randomUUID?.() ?? `${Date.now().toString(36)}-${Math.random().toString(36).slice(2)}`;
90
90
  }
91
91
 
92
+ // src/lib/scroll.ts
93
+ var BOTTOM_FOLLOW_THRESHOLD_PX = 48;
94
+ function getDistanceFromBottom(element) {
95
+ return Math.max(0, element.scrollHeight - element.clientHeight - element.scrollTop);
96
+ }
97
+ function isNearBottom(element, threshold = BOTTOM_FOLLOW_THRESHOLD_PX) {
98
+ return getDistanceFromBottom(element) <= threshold;
99
+ }
100
+
92
101
  // src/providers/Stream.tsx
93
102
  var import_react3 = require("react");
94
103
  var import_nuqs = require("nuqs");
@@ -327,11 +336,41 @@ function useParentMessenger({ onSetOptions } = {}) {
327
336
  return messenger;
328
337
  }
329
338
 
339
+ // src/lib/thread-context-usage.ts
340
+ function normalizeContextUsageNumber(value) {
341
+ if (typeof value === "number" && Number.isFinite(value) && value >= 0) {
342
+ return Math.floor(value);
343
+ }
344
+ if (typeof value === "string") {
345
+ const parsed = Number.parseFloat(value);
346
+ if (Number.isFinite(parsed) && parsed >= 0) {
347
+ return Math.floor(parsed);
348
+ }
349
+ }
350
+ return null;
351
+ }
352
+ function getThreadContextUsage(state, agentKey) {
353
+ if (!agentKey) return null;
354
+ return state[agentKey] ?? null;
355
+ }
356
+ function getThreadContextUsageTotalTokens(event) {
357
+ return normalizeContextUsageNumber(event?.usage?.totalTokens);
358
+ }
359
+ function resolveUsedContextSize(options) {
360
+ const realtimeUsedTokens = getThreadContextUsageTotalTokens(
361
+ options.realtimeUsage
362
+ );
363
+ if (realtimeUsedTokens != null) {
364
+ return realtimeUsedTokens;
365
+ }
366
+ return normalizeContextUsageNumber(options.fallbackUsedTokens) ?? 0;
367
+ }
368
+
330
369
  // src/providers/Stream.tsx
331
370
  var import_jsx_runtime2 = require("react/jsx-runtime");
332
371
  var import_meta = {};
333
372
  var StreamContext = (0, import_react3.createContext)(void 0);
334
- var defaultApiUrl = import_meta.env.VITE_XPERTAI_API_URL ?? "https://api.mtda.cloud/api/ai";
373
+ var defaultApiUrl = import_meta.env.VITE_XPERTAI_API_URL ?? "https://api.xpertai.cn/api/ai";
335
374
  var useStreamContext = () => {
336
375
  const context = (0, import_react3.useContext)(StreamContext);
337
376
  if (!context) {
@@ -451,6 +490,7 @@ var en_US_default = {
451
490
  loadingThread: "Loading thread...",
452
491
  stop: "Stop",
453
492
  send: "Send message",
493
+ scrollToBottom: "Scroll to bottom",
454
494
  retryUpload: "Retry upload",
455
495
  poweredBy: "Powered by Xpert AI",
456
496
  errors: {
@@ -509,6 +549,7 @@ var zh_CN_default = {
509
549
  loadingThread: "\u6B63\u5728\u52A0\u8F7D\u7EBF\u7A0B...",
510
550
  stop: "\u505C\u6B62",
511
551
  send: "\u53D1\u9001\u6D88\u606F",
552
+ scrollToBottom: "\u56DE\u5230\u5E95\u90E8",
512
553
  retryUpload: "\u91CD\u65B0\u4E0A\u4F20",
513
554
  poweredBy: "\u7531 Xpert AI \u9A71\u52A8",
514
555
  errors: {
@@ -1607,6 +1648,12 @@ TooltipIconButton.displayName = "TooltipIconButton";
1607
1648
  // src/components/thread/markdown-text.tsx
1608
1649
  var import_katex_min = require("katex/dist/katex.min.css");
1609
1650
  var import_jsx_runtime17 = require("react/jsx-runtime");
1651
+ var getTextContent = (children) => import_react6.Children.toArray(children).map((child) => {
1652
+ if (typeof child === "string" || typeof child === "number") {
1653
+ return String(child);
1654
+ }
1655
+ return "";
1656
+ }).join("");
1610
1657
  var useCopyToClipboard = ({
1611
1658
  copiedDuration = 3e3
1612
1659
  } = {}) => {
@@ -1643,7 +1690,7 @@ var CodeHeader = ({ language, code }) => {
1643
1690
  ] });
1644
1691
  };
1645
1692
  var defaultComponents = {
1646
- h1: ({ className, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1693
+ h1: ({ className, node: _node, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1647
1694
  "h1",
1648
1695
  {
1649
1696
  className: cn(
@@ -1653,7 +1700,7 @@ var defaultComponents = {
1653
1700
  ...props
1654
1701
  }
1655
1702
  ),
1656
- h2: ({ className, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1703
+ h2: ({ className, node: _node, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1657
1704
  "h2",
1658
1705
  {
1659
1706
  className: cn(
@@ -1663,7 +1710,7 @@ var defaultComponents = {
1663
1710
  ...props
1664
1711
  }
1665
1712
  ),
1666
- h3: ({ className, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1713
+ h3: ({ className, node: _node, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1667
1714
  "h3",
1668
1715
  {
1669
1716
  className: cn(
@@ -1673,7 +1720,7 @@ var defaultComponents = {
1673
1720
  ...props
1674
1721
  }
1675
1722
  ),
1676
- h4: ({ className, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1723
+ h4: ({ className, node: _node, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1677
1724
  "h4",
1678
1725
  {
1679
1726
  className: cn(
@@ -1683,7 +1730,7 @@ var defaultComponents = {
1683
1730
  ...props
1684
1731
  }
1685
1732
  ),
1686
- h5: ({ className, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1733
+ h5: ({ className, node: _node, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1687
1734
  "h5",
1688
1735
  {
1689
1736
  className: cn(
@@ -1693,21 +1740,21 @@ var defaultComponents = {
1693
1740
  ...props
1694
1741
  }
1695
1742
  ),
1696
- h6: ({ className, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1743
+ h6: ({ className, node: _node, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1697
1744
  "h6",
1698
1745
  {
1699
1746
  className: cn("my-4 font-semibold first:mt-0 last:mb-0", className),
1700
1747
  ...props
1701
1748
  }
1702
1749
  ),
1703
- p: ({ className, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1750
+ p: ({ className, node: _node, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1704
1751
  "p",
1705
1752
  {
1706
1753
  className: cn("mt-5 mb-5 leading-7 first:mt-0 last:mb-0", className),
1707
1754
  ...props
1708
1755
  }
1709
1756
  ),
1710
- a: ({ className, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1757
+ a: ({ className, node: _node, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1711
1758
  "a",
1712
1759
  {
1713
1760
  className: cn(
@@ -1719,35 +1766,46 @@ var defaultComponents = {
1719
1766
  ...props
1720
1767
  }
1721
1768
  ),
1722
- blockquote: ({ className, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1769
+ blockquote: ({
1770
+ className,
1771
+ node: _node,
1772
+ ...props
1773
+ }) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1723
1774
  "blockquote",
1724
1775
  {
1725
- className: cn("border-l-2 pl-6 italic", className),
1776
+ className: cn(
1777
+ "border-l-4 border-border pl-6 italic text-muted-foreground",
1778
+ className
1779
+ ),
1726
1780
  ...props
1727
1781
  }
1728
1782
  ),
1729
- ul: ({ className, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1783
+ ul: ({ className, node: _node, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1730
1784
  "ul",
1731
1785
  {
1732
1786
  className: cn("my-5 list-outside list-disc pl-6 [&>li]:mt-2", className),
1733
1787
  ...props
1734
1788
  }
1735
1789
  ),
1736
- ol: ({ className, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1790
+ ol: ({ className, node: _node, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1737
1791
  "ol",
1738
1792
  {
1739
1793
  className: cn("my-5 list-outside list-decimal pl-8 [&>li]:mt-2", className),
1740
1794
  ...props
1741
1795
  }
1742
1796
  ),
1743
- hr: ({ className, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1797
+ hr: ({ className, node: _node, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1744
1798
  "hr",
1745
1799
  {
1746
1800
  className: cn("my-5 border-b", className),
1747
1801
  ...props
1748
1802
  }
1749
1803
  ),
1750
- table: ({ className, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1804
+ table: ({
1805
+ className,
1806
+ node: _node,
1807
+ ...props
1808
+ }) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1751
1809
  "table",
1752
1810
  {
1753
1811
  className: cn(
@@ -1757,48 +1815,48 @@ var defaultComponents = {
1757
1815
  ...props
1758
1816
  }
1759
1817
  ),
1760
- th: ({ className, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1818
+ th: ({ className, node: _node, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1761
1819
  "th",
1762
1820
  {
1763
1821
  className: cn(
1764
- "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",
1822
+ "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",
1765
1823
  className
1766
1824
  ),
1767
1825
  ...props
1768
1826
  }
1769
1827
  ),
1770
- td: ({ className, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1828
+ td: ({ className, node: _node, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1771
1829
  "td",
1772
1830
  {
1773
1831
  className: cn(
1774
- "border-b border-l px-4 py-2 text-left last:border-r [&[align=center]]:text-center [&[align=right]]:text-right",
1832
+ "border-border border-b border-l px-4 py-2 text-left last:border-r [&[align=center]]:text-center [&[align=right]]:text-right",
1775
1833
  className
1776
1834
  ),
1777
1835
  ...props
1778
1836
  }
1779
1837
  ),
1780
- tr: ({ className, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1838
+ tr: ({ className, node: _node, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1781
1839
  "tr",
1782
1840
  {
1783
1841
  className: cn(
1784
- "m-0 border-b p-0 first:border-t [&:last-child>td:first-child]:rounded-bl-lg [&:last-child>td:last-child]:rounded-br-lg",
1842
+ "m-0 p-0 even:bg-muted/50 [&:last-child>td:first-child]:rounded-bl-lg [&:last-child>td:last-child]:rounded-br-lg",
1785
1843
  className
1786
1844
  ),
1787
1845
  ...props
1788
1846
  }
1789
1847
  ),
1790
- sup: ({ className, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1848
+ sup: ({ className, node: _node, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1791
1849
  "sup",
1792
1850
  {
1793
1851
  className: cn("[&>a]:text-xs [&>a]:no-underline", className),
1794
1852
  ...props
1795
1853
  }
1796
1854
  ),
1797
- pre: ({ className, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1798
- "pre",
1855
+ pre: ({ className, node: _node, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1856
+ "div",
1799
1857
  {
1800
1858
  className: cn(
1801
- "max-w-4xl overflow-x-auto rounded-lg text-sm bg-black text-white dark:bg-zinc-800 ",
1859
+ "max-w-4xl overflow-x-auto rounded-lg text-sm bg-black text-white dark:bg-zinc-800",
1802
1860
  className
1803
1861
  ),
1804
1862
  ...props
@@ -1807,18 +1865,21 @@ var defaultComponents = {
1807
1865
  code: ({
1808
1866
  className,
1809
1867
  children,
1868
+ node: _node,
1810
1869
  ...props
1811
1870
  }) => {
1812
1871
  const match = /language-(\w+)/.exec(className || "");
1872
+ const code = getTextContent(children);
1873
+ const isBlockCode = code.includes("\n");
1813
1874
  if (match) {
1814
1875
  const language = match[1];
1815
- const code = String(children).replace(/\n$/, "");
1876
+ const normalizedCode = code.replace(/\n$/, "");
1816
1877
  return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_jsx_runtime17.Fragment, { children: [
1817
1878
  /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1818
1879
  CodeHeader,
1819
1880
  {
1820
1881
  language,
1821
- code
1882
+ code: normalizedCode
1822
1883
  }
1823
1884
  ),
1824
1885
  /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
@@ -1826,15 +1887,31 @@ var defaultComponents = {
1826
1887
  {
1827
1888
  language,
1828
1889
  className,
1829
- children: code
1890
+ children: normalizedCode
1830
1891
  }
1831
1892
  )
1832
1893
  ] });
1833
1894
  }
1895
+ if (isBlockCode) {
1896
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1897
+ "code",
1898
+ {
1899
+ className: cn(
1900
+ "block min-w-full whitespace-pre px-4 py-4 font-mono text-inherit",
1901
+ className
1902
+ ),
1903
+ ...props,
1904
+ children: code.replace(/\n$/, "")
1905
+ }
1906
+ );
1907
+ }
1834
1908
  return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1835
1909
  "code",
1836
1910
  {
1837
- className: cn("rounded font-semibold", className),
1911
+ className: cn(
1912
+ "bg-muted rounded px-1.5 py-0.5 font-mono text-[0.9em] font-semibold",
1913
+ className
1914
+ ),
1838
1915
  ...props,
1839
1916
  children
1840
1917
  }
@@ -1953,14 +2030,52 @@ function MemoryBlock({ content }) {
1953
2030
  }
1954
2031
  function ComponentBlock({ content }) {
1955
2032
  const [isExpanded, setIsExpanded] = React13.useState(false);
2033
+ const contentRef = React13.useRef(null);
2034
+ const shouldAutoScrollRef = React13.useRef(true);
2035
+ const previousScrollTopRef = React13.useRef(0);
1956
2036
  const data = content.data ?? {};
1957
- const title = typeof data.title === "string" ? data.title : typeof data.type === "string" ? data.type : "Component";
1958
- const category = typeof data.category === "string" ? data.category : "Component";
1959
- const status = typeof data.status === "string" ? data.status : null;
1960
- const message = typeof data.message === "string" ? data.message : null;
1961
- const output = typeof data.output === "string" ? data.output : null;
1962
- const error = data.error || null;
2037
+ const category = data.category ?? "Component";
2038
+ const title = data.tool && category === "Tool" ? data.tool : data.title ?? data.type ?? "Component";
2039
+ const status = data.status ?? null;
2040
+ const message = data.message ?? null;
2041
+ const output = data.output ?? null;
2042
+ const error = data.error ?? null;
1963
2043
  const fallback = message ?? output ?? safeJson(data.data ?? data);
2044
+ const hasOutput = message !== null || output !== null;
2045
+ React13.useEffect(() => {
2046
+ if (status === "running" && output !== null) setIsExpanded(true);
2047
+ }, [status, output]);
2048
+ React13.useEffect(() => {
2049
+ const element = contentRef.current;
2050
+ if (!element) return;
2051
+ previousScrollTopRef.current = element.scrollTop;
2052
+ const updateAutoScrollState = () => {
2053
+ const nextScrollTop = element.scrollTop;
2054
+ const isScrollingUp = nextScrollTop < previousScrollTopRef.current - 1;
2055
+ previousScrollTopRef.current = nextScrollTop;
2056
+ if (isScrollingUp) {
2057
+ shouldAutoScrollRef.current = false;
2058
+ return;
2059
+ }
2060
+ shouldAutoScrollRef.current = isNearBottom(element);
2061
+ };
2062
+ updateAutoScrollState();
2063
+ element.addEventListener("scroll", updateAutoScrollState, { passive: true });
2064
+ return () => {
2065
+ element.removeEventListener("scroll", updateAutoScrollState);
2066
+ };
2067
+ }, [isExpanded]);
2068
+ React13.useEffect(() => {
2069
+ if (status !== "running") {
2070
+ shouldAutoScrollRef.current = true;
2071
+ return;
2072
+ }
2073
+ const element = contentRef.current;
2074
+ if (!element || !shouldAutoScrollRef.current) {
2075
+ return;
2076
+ }
2077
+ element.scrollTop = element.scrollHeight;
2078
+ }, [isExpanded, output, status]);
1964
2079
  const config = status ? statusConfig[status] : null;
1965
2080
  const StatusIcon = config?.icon;
1966
2081
  return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(Card, { children: [
@@ -1986,9 +2101,9 @@ function ComponentBlock({ content }) {
1986
2101
  )
1987
2102
  ] })
1988
2103
  ] }),
1989
- isExpanded && /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(CardContent, { className: "text-xs text-muted-foreground max-h-60 overflow-auto", children: [
2104
+ isExpanded && /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(CardContent, { ref: contentRef, className: "text-xs text-muted-foreground max-h-60 overflow-auto", children: [
1990
2105
  data.input && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("pre", { className: "whitespace-pre-wrap wrap-break-word", children: JSON.stringify(data.input, null, 2) }),
1991
- error ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("pre", { className: "whitespace-pre-wrap wrap-break-word text-destructive", children: typeof error === "string" ? error : safeJson(error) }) : output && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("pre", { className: "whitespace-pre-wrap wrap-break-word", children: fallback })
2106
+ error ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("pre", { className: "whitespace-pre-wrap wrap-break-word text-destructive", children: typeof error === "string" ? error : safeJson(error) }) : hasOutput && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("pre", { className: "whitespace-pre-wrap wrap-break-word", children: fallback })
1992
2107
  ] })
1993
2108
  ] });
1994
2109
  }
@@ -2381,18 +2496,6 @@ var kNumberFormatter = new Intl.NumberFormat("en-US", {
2381
2496
  minimumFractionDigits: 0,
2382
2497
  maximumFractionDigits: 1
2383
2498
  });
2384
- function normalizeContextSize(value) {
2385
- if (typeof value === "number" && Number.isFinite(value) && value >= 0) {
2386
- return Math.floor(value);
2387
- }
2388
- if (typeof value === "string") {
2389
- const parsed = Number.parseInt(value, 10);
2390
- if (Number.isFinite(parsed) && parsed >= 0) {
2391
- return parsed;
2392
- }
2393
- }
2394
- return null;
2395
- }
2396
2499
  function normalizeAgentKey(value) {
2397
2500
  if (typeof value !== "string") {
2398
2501
  return null;
@@ -2401,7 +2504,7 @@ function normalizeAgentKey(value) {
2401
2504
  return normalized ? normalized : null;
2402
2505
  }
2403
2506
  function resolveAssistantContextSize(assistant) {
2404
- return normalizeContextSize(assistant.metadata?.context_size) ?? normalizeContextSize(assistant.config?.configurable?.context_size);
2507
+ return normalizeContextUsageNumber(assistant.metadata?.context_size) ?? normalizeContextUsageNumber(assistant.config?.configurable?.context_size);
2405
2508
  }
2406
2509
  function resolveAssistantAgentKey(assistant) {
2407
2510
  return normalizeAgentKey(assistant.metadata?.agent_key) ?? normalizeAgentKey(assistant.config?.configurable?.agentKey);
@@ -2424,6 +2527,16 @@ function ContextUsageIndicator({
2424
2527
  const [maxContextSize, setMaxContextSize] = React17.useState(null);
2425
2528
  const [usedContextSize, setUsedContextSize] = React17.useState(null);
2426
2529
  const [assistantAgentKey, setAssistantAgentKey] = React17.useState(null);
2530
+ const latestRealtimeUsageRef = React17.useRef({
2531
+ threadId: null,
2532
+ agentKey: null,
2533
+ usedTokens: null
2534
+ });
2535
+ const realtimeUsage = React17.useMemo(
2536
+ () => getThreadContextUsage(stream.contextUsageByAgentKey, assistantAgentKey),
2537
+ [assistantAgentKey, stream.contextUsageByAgentKey]
2538
+ );
2539
+ const realtimeUsedContextSize = getThreadContextUsageTotalTokens(realtimeUsage);
2427
2540
  React17.useEffect(() => {
2428
2541
  if (!stream.client || !stream.assistantId) {
2429
2542
  setMaxContextSize(null);
@@ -2444,6 +2557,17 @@ function ContextUsageIndicator({
2444
2557
  cancelled = true;
2445
2558
  };
2446
2559
  }, [stream.client, stream.assistantId]);
2560
+ React17.useEffect(() => {
2561
+ latestRealtimeUsageRef.current = {
2562
+ threadId: stream.threadId ?? null,
2563
+ agentKey: assistantAgentKey,
2564
+ usedTokens: realtimeUsedContextSize
2565
+ };
2566
+ }, [assistantAgentKey, realtimeUsedContextSize, stream.threadId]);
2567
+ React17.useEffect(() => {
2568
+ if (realtimeUsedContextSize == null) return;
2569
+ setUsedContextSize(realtimeUsedContextSize);
2570
+ }, [realtimeUsedContextSize]);
2447
2571
  React17.useEffect(() => {
2448
2572
  if (!stream.client) {
2449
2573
  setUsedContextSize(null);
@@ -2453,14 +2577,25 @@ function ContextUsageIndicator({
2453
2577
  setUsedContextSize(0);
2454
2578
  return;
2455
2579
  }
2580
+ if (realtimeUsedContextSize != null) return;
2456
2581
  if (stream.isLoading) return;
2457
2582
  let cancelled = false;
2583
+ const requestThreadId = stream.threadId;
2584
+ const requestAgentKey = assistantAgentKey;
2458
2585
  stream.client.threads.getContextUsage(
2459
- stream.threadId,
2460
- assistantAgentKey ? { agentKey: assistantAgentKey } : void 0
2461
- ).then((result) => normalizeContextSize(result?.usage?.context_tokens)).then((result) => {
2586
+ requestThreadId,
2587
+ requestAgentKey ? { agentKey: requestAgentKey } : void 0
2588
+ ).then((result) => normalizeContextUsageNumber(result?.usage?.context_tokens)).then((result) => {
2462
2589
  if (cancelled) return;
2463
- setUsedContextSize(result ?? 0);
2590
+ const latestRealtimeUsage = latestRealtimeUsageRef.current;
2591
+ if (latestRealtimeUsage.usedTokens != null && latestRealtimeUsage.threadId === requestThreadId && latestRealtimeUsage.agentKey === requestAgentKey) {
2592
+ return;
2593
+ }
2594
+ setUsedContextSize(
2595
+ resolveUsedContextSize({
2596
+ fallbackUsedTokens: result
2597
+ })
2598
+ );
2464
2599
  }).catch((err) => {
2465
2600
  if (cancelled) return;
2466
2601
  console.warn("[Chat] Failed to load thread context usage:", err);
@@ -2468,7 +2603,15 @@ function ContextUsageIndicator({
2468
2603
  return () => {
2469
2604
  cancelled = true;
2470
2605
  };
2471
- }, [assistantAgentKey, stream.apiKey, stream.apiUrl, stream.client, stream.threadId, stream.isLoading]);
2606
+ }, [
2607
+ assistantAgentKey,
2608
+ realtimeUsedContextSize,
2609
+ stream.apiKey,
2610
+ stream.apiUrl,
2611
+ stream.client,
2612
+ stream.threadId,
2613
+ stream.isLoading
2614
+ ]);
2472
2615
  if (typeof maxContextSize !== "number" || !Number.isFinite(maxContextSize) || maxContextSize <= 0) {
2473
2616
  return null;
2474
2617
  }
@@ -2587,6 +2730,8 @@ function Chat({
2587
2730
  const [draft, setDraft] = React18.useState("");
2588
2731
  const [selectedTool, setSelectedTool] = React18.useState(null);
2589
2732
  const [attachments, setAttachments] = React18.useState([]);
2733
+ const [isAtBottom, setIsAtBottom] = React18.useState(true);
2734
+ const [hasUpdatesBelow, setHasUpdatesBelow] = React18.useState(false);
2590
2735
  const {
2591
2736
  threads,
2592
2737
  deleteThread,
@@ -2595,27 +2740,141 @@ function Chat({
2595
2740
  } = useThreads();
2596
2741
  const viewportRef = React18.useRef(null);
2597
2742
  const fileInputRef = React18.useRef(null);
2743
+ const shouldAutoScrollRef = React18.useRef(true);
2744
+ const forceFollowRef = React18.useRef(false);
2745
+ const previousMessageCountRef = React18.useRef(0);
2746
+ const previousScrollTopRef = React18.useRef(0);
2747
+ const autoScrollFrameRef = React18.useRef(null);
2748
+ const isPointerDownRef = React18.useRef(false);
2749
+ const lastTouchYRef = React18.useRef(null);
2598
2750
  const resolvedTitle = title ?? t("chat.title");
2599
2751
  const resolvedPlaceholder = placeholder ?? t("chat.placeholder");
2600
2752
  const inputPlaceholder = selectedTool?.placeholderOverride ?? composer?.placeholder ?? resolvedPlaceholder;
2601
- const messages = stream.messages ?? [];
2753
+ const messages = React18.useMemo(() => stream.messages ?? [], [stream.messages]);
2602
2754
  const trimmedDraft = draft.trim();
2603
- const scrollToBottom = React18.useCallback((smooth = false) => {
2604
- requestAnimationFrame(() => {
2755
+ const cancelPendingAutoScroll = React18.useCallback(() => {
2756
+ if (autoScrollFrameRef.current !== null) {
2757
+ cancelAnimationFrame(autoScrollFrameRef.current);
2758
+ autoScrollFrameRef.current = null;
2759
+ }
2760
+ }, []);
2761
+ const disableAutoFollow = React18.useCallback(() => {
2762
+ forceFollowRef.current = false;
2763
+ shouldAutoScrollRef.current = false;
2764
+ cancelPendingAutoScroll();
2765
+ }, [cancelPendingAutoScroll]);
2766
+ const enableAutoFollow = React18.useCallback(() => {
2767
+ forceFollowRef.current = true;
2768
+ shouldAutoScrollRef.current = true;
2769
+ setHasUpdatesBelow(false);
2770
+ }, []);
2771
+ const scrollToBottom = React18.useCallback((smooth = false, force = false) => {
2772
+ if (force) {
2773
+ enableAutoFollow();
2774
+ }
2775
+ cancelPendingAutoScroll();
2776
+ autoScrollFrameRef.current = requestAnimationFrame(() => {
2777
+ autoScrollFrameRef.current = null;
2605
2778
  const viewport = viewportRef.current;
2606
2779
  if (viewport) {
2780
+ if (!force && !shouldAutoScrollRef.current) {
2781
+ return;
2782
+ }
2607
2783
  viewport.scrollTo({
2608
2784
  top: viewport.scrollHeight,
2609
2785
  behavior: smooth ? "smooth" : "instant"
2610
2786
  });
2611
2787
  }
2612
2788
  });
2613
- }, []);
2789
+ }, [cancelPendingAutoScroll, enableAutoFollow]);
2790
+ React18.useEffect(() => {
2791
+ const viewport = viewportRef.current;
2792
+ if (!viewport) return;
2793
+ previousScrollTopRef.current = viewport.scrollTop;
2794
+ const stopPointerTracking = () => {
2795
+ isPointerDownRef.current = false;
2796
+ };
2797
+ const updateAutoScrollState = () => {
2798
+ const nextScrollTop = viewport.scrollTop;
2799
+ const isScrollingUp = nextScrollTop < previousScrollTopRef.current - 1;
2800
+ previousScrollTopRef.current = nextScrollTop;
2801
+ const nearBottom = isNearBottom(viewport);
2802
+ setIsAtBottom(nearBottom);
2803
+ if (nearBottom) {
2804
+ shouldAutoScrollRef.current = true;
2805
+ setHasUpdatesBelow(false);
2806
+ return;
2807
+ }
2808
+ if (forceFollowRef.current) {
2809
+ shouldAutoScrollRef.current = true;
2810
+ return;
2811
+ }
2812
+ if (isPointerDownRef.current && isScrollingUp) {
2813
+ disableAutoFollow();
2814
+ return;
2815
+ }
2816
+ shouldAutoScrollRef.current = false;
2817
+ };
2818
+ const handleWheel = (event) => {
2819
+ if (event.deltaY < 0) {
2820
+ disableAutoFollow();
2821
+ }
2822
+ };
2823
+ const handlePointerDown = () => {
2824
+ isPointerDownRef.current = true;
2825
+ };
2826
+ const handleTouchStart = (event) => {
2827
+ lastTouchYRef.current = event.touches[0]?.clientY ?? null;
2828
+ };
2829
+ const handleTouchMove = (event) => {
2830
+ const nextTouchY = event.touches[0]?.clientY;
2831
+ if (typeof nextTouchY !== "number") return;
2832
+ if (lastTouchYRef.current !== null && nextTouchY > lastTouchYRef.current + 1) {
2833
+ disableAutoFollow();
2834
+ }
2835
+ lastTouchYRef.current = nextTouchY;
2836
+ };
2837
+ const handleTouchEnd = () => {
2838
+ lastTouchYRef.current = null;
2839
+ };
2840
+ updateAutoScrollState();
2841
+ viewport.addEventListener("wheel", handleWheel, { passive: true });
2842
+ viewport.addEventListener("pointerdown", handlePointerDown, { passive: true });
2843
+ viewport.addEventListener("scroll", updateAutoScrollState, { passive: true });
2844
+ viewport.addEventListener("touchstart", handleTouchStart, { passive: true });
2845
+ viewport.addEventListener("touchmove", handleTouchMove, { passive: true });
2846
+ viewport.addEventListener("touchend", handleTouchEnd, { passive: true });
2847
+ window.addEventListener("pointerup", stopPointerTracking, { passive: true });
2848
+ window.addEventListener("pointercancel", stopPointerTracking, { passive: true });
2849
+ return () => {
2850
+ cancelPendingAutoScroll();
2851
+ viewport.removeEventListener("wheel", handleWheel);
2852
+ viewport.removeEventListener("pointerdown", handlePointerDown);
2853
+ viewport.removeEventListener("scroll", updateAutoScrollState);
2854
+ viewport.removeEventListener("touchstart", handleTouchStart);
2855
+ viewport.removeEventListener("touchmove", handleTouchMove);
2856
+ viewport.removeEventListener("touchend", handleTouchEnd);
2857
+ window.removeEventListener("pointerup", stopPointerTracking);
2858
+ window.removeEventListener("pointercancel", stopPointerTracking);
2859
+ };
2860
+ }, [cancelPendingAutoScroll, disableAutoFollow]);
2614
2861
  React18.useEffect(() => {
2615
- scrollToBottom();
2616
- }, [messages.length, scrollToBottom]);
2862
+ shouldAutoScrollRef.current = true;
2863
+ forceFollowRef.current = false;
2864
+ previousScrollTopRef.current = 0;
2865
+ setIsAtBottom(true);
2866
+ setHasUpdatesBelow(false);
2867
+ }, [stream.threadId]);
2617
2868
  React18.useEffect(() => {
2618
- if (stream.isLoading) {
2869
+ const messageCountChanged = messages.length !== previousMessageCountRef.current;
2870
+ previousMessageCountRef.current = messages.length;
2871
+ if (!shouldAutoScrollRef.current) {
2872
+ if (messageCountChanged || stream.isLoading) {
2873
+ setHasUpdatesBelow(true);
2874
+ }
2875
+ return;
2876
+ }
2877
+ if (messageCountChanged || stream.isLoading) {
2619
2878
  scrollToBottom();
2620
2879
  }
2621
2880
  }, [stream.isLoading, messages, scrollToBottom]);
@@ -2673,7 +2932,7 @@ function Chat({
2673
2932
  }
2674
2933
  }
2675
2934
  );
2676
- scrollToBottom(true);
2935
+ scrollToBottom(true, true);
2677
2936
  if (selectedTool && !selectedTool.pinned) {
2678
2937
  setSelectedTool(null);
2679
2938
  }
@@ -2775,7 +3034,7 @@ function Chat({
2775
3034
  }
2776
3035
  }
2777
3036
  );
2778
- scrollToBottom(true);
3037
+ scrollToBottom(true, true);
2779
3038
  };
2780
3039
  const loadConversationMessages = React18.useCallback(
2781
3040
  async (recordId) => {
@@ -2855,6 +3114,7 @@ function Chat({
2855
3114
  }
2856
3115
  }
2857
3116
  );
3117
+ scrollToBottom(true, true);
2858
3118
  }
2859
3119
  };
2860
3120
  const acceptMimes = composer?.attachments?.accept ? Object.entries(composer.attachments.accept).map(([mime, exts]) => [mime, ...exts.map((e) => `.${e}`)].join(",")).join(",") : void 0;
@@ -2873,7 +3133,7 @@ function Chat({
2873
3133
  {
2874
3134
  ref: viewportRef,
2875
3135
  className: cn(
2876
- "flex h-full w-full flex-col flex-1 overflow-y-auto bg-background shadow-sm",
3136
+ "relative flex h-full w-full flex-col flex-1 overflow-y-auto bg-background shadow-sm",
2877
3137
  className
2878
3138
  ),
2879
3139
  children: [
@@ -3010,6 +3270,22 @@ function Chat({
3010
3270
  })()
3011
3271
  ] })
3012
3272
  ] }),
3273
+ !isAtBottom && messages.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "sticky bottom-20 z-20 flex justify-center px-4 pointer-events-none", children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
3274
+ Button,
3275
+ {
3276
+ type: "button",
3277
+ size: "icon-sm",
3278
+ variant: hasUpdatesBelow ? "default" : "outline",
3279
+ className: cn(
3280
+ "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)]",
3281
+ hasUpdatesBelow && "animate-bounce"
3282
+ ),
3283
+ onClick: () => scrollToBottom(true, true),
3284
+ "aria-label": t("chat.scrollToBottom"),
3285
+ title: t("chat.scrollToBottom"),
3286
+ children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_lucide_react9.ArrowDown, { size: 16 })
3287
+ }
3288
+ ) }),
3013
3289
  /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "p-2 sticky bottom-0 z-10 bg-background", children: [
3014
3290
  threadErrorMessage && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "mb-3 rounded-lg border border-destructive/30 bg-destructive/10 px-3 py-2 text-sm text-destructive", children: threadErrorMessage }),
3015
3291
  /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(