@xpert-ai/chatkit-ui 0.0.15 → 0.0.17

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-BWs0QYPi.js → abap-Bwwc_1gv.js} +1 -1
  2. package/dist/app/assets/{abnf-D836Ekee.js → abnf-B2dNcP9G.js} +1 -1
  3. package/dist/app/assets/{actionscript-DwxVdnYd.js → actionscript-CXHQ00sX.js} +1 -1
  4. package/dist/app/assets/{ada-DuqPZP7y.js → ada-CqG-JVlv.js} +1 -1
  5. package/dist/app/assets/{agda--lKV47zi.js → agda-B17H_65R.js} +1 -1
  6. package/dist/app/assets/{al-DmWukAFp.js → al-DZ1np1rt.js} +1 -1
  7. package/dist/app/assets/{antlr4-Cui9A7Z6.js → antlr4-C8q5KPBn.js} +1 -1
  8. package/dist/app/assets/{apacheconf-p7Nhi2d3.js → apacheconf-ChkcfFbQ.js} +1 -1
  9. package/dist/app/assets/{apex-wwNmkUuv.js → apex-BH4E_dsM.js} +1 -1
  10. package/dist/app/assets/{apl-CQGwfDry.js → apl-CrQcdvRs.js} +1 -1
  11. package/dist/app/assets/{applescript-CxRglPCi.js → applescript-cM7xSTOK.js} +1 -1
  12. package/dist/app/assets/{aql-DzrzGLDh.js → aql-CUr96LHI.js} +1 -1
  13. package/dist/app/assets/{arduino-Bl4m690J.js → arduino-Cxfmugkq.js} +1 -1
  14. package/dist/app/assets/{arff-Bi4yNRUp.js → arff-BUd5n8om.js} +1 -1
  15. package/dist/app/assets/{asciidoc-CPTTRBXf.js → asciidoc-DXG-Il5x.js} +1 -1
  16. package/dist/app/assets/{asm6502-CBolQ2s3.js → asm6502-CGctLvPd.js} +1 -1
  17. package/dist/app/assets/{asmatmel-DwyOAW8C.js → asmatmel-D079kq0M.js} +1 -1
  18. package/dist/app/assets/{aspnet-K1n3IryN.js → aspnet-8ExSjxvo.js} +1 -1
  19. package/dist/app/assets/{autohotkey-DKr5NeGL.js → autohotkey-Dl4oXtIk.js} +1 -1
  20. package/dist/app/assets/{autoit-BmaRQ3eS.js → autoit-C3CwtOjR.js} +1 -1
  21. package/dist/app/assets/{avisynth-B5jllq4s.js → avisynth-Bx99tLxs.js} +1 -1
  22. package/dist/app/assets/{avro-idl-D79eqXPk.js → avro-idl-C31XGLPW.js} +1 -1
  23. package/dist/app/assets/{bash-DWI44uVu.js → bash-Bbt-WPbn.js} +1 -1
  24. package/dist/app/assets/{basic-DX5tJRab.js → basic-C61Emcak.js} +1 -1
  25. package/dist/app/assets/{batch-BZon0dQf.js → batch-Djn-x2uB.js} +1 -1
  26. package/dist/app/assets/{bbcode-CCzrmpJu.js → bbcode-CNJrjhuJ.js} +1 -1
  27. package/dist/app/assets/{bicep-BhU89M6Z.js → bicep-CI5LT2Ae.js} +1 -1
  28. package/dist/app/assets/{birb-CpbVfpC3.js → birb-DbXUGjzd.js} +1 -1
  29. package/dist/app/assets/{bison-C7eKJdUK.js → bison-DrTn1ufs.js} +1 -1
  30. package/dist/app/assets/{bnf-C41JeurH.js → bnf-IYAsThC7.js} +1 -1
  31. package/dist/app/assets/{brainfuck-DL3BN1lC.js → brainfuck-BP2_pLcy.js} +1 -1
  32. package/dist/app/assets/{brightscript-C1ciaxot.js → brightscript-DAQk2Wd6.js} +1 -1
  33. package/dist/app/assets/{bro-DeUBCRiY.js → bro-DLuKh1Ny.js} +1 -1
  34. package/dist/app/assets/{bsl-BVdoLWrt.js → bsl-kl73aWRB.js} +1 -1
  35. package/dist/app/assets/{c-D-NlgPSm.js → c-CIhTtviR.js} +1 -1
  36. package/dist/app/assets/{cfscript-CI77gY57.js → cfscript-CbFVl9I3.js} +1 -1
  37. package/dist/app/assets/{chaiscript-D92IIXjK.js → chaiscript-D-0nW1Dm.js} +1 -1
  38. package/dist/app/assets/{cil-Vi00szx4.js → cil-BDy_lgSO.js} +1 -1
  39. package/dist/app/assets/{clike-K_AYaoxN.js → clike-CpJMZ32o.js} +1 -1
  40. package/dist/app/assets/{clojure-IjprIaXK.js → clojure-DGR-MOcf.js} +1 -1
  41. package/dist/app/assets/{cmake-CiZsn6Cd.js → cmake-DN0Hfx1z.js} +1 -1
  42. package/dist/app/assets/{cobol-BsMCYJOB.js → cobol-CizJYTKX.js} +1 -1
  43. package/dist/app/assets/{coffeescript-Tn0NVIMO.js → coffeescript-R-3uLIaS.js} +1 -1
  44. package/dist/app/assets/{concurnas-Qkduv-yR.js → concurnas-CQkxgZj4.js} +1 -1
  45. package/dist/app/assets/{coq-CkiZ3gEL.js → coq-DQgbmzEf.js} +1 -1
  46. package/dist/app/assets/{core-BIe9U2bi.js → core-DycsgPCm.js} +1 -1
  47. package/dist/app/assets/{cpp-DUkuUOiy.js → cpp-CWEafQ-5.js} +1 -1
  48. package/dist/app/assets/{crystal-DzDaEh84.js → crystal-B99VfLZA.js} +1 -1
  49. package/dist/app/assets/{csharp-Ds4tzl1h.js → csharp-BpTiSprW.js} +1 -1
  50. package/dist/app/assets/{cshtml-XSfeicox.js → cshtml-Vijio5v4.js} +1 -1
  51. package/dist/app/assets/{csp-BnuytBc2.js → csp-tvYUeGBl.js} +1 -1
  52. package/dist/app/assets/{css-uvHkMV3H.js → css-DKouri6h.js} +1 -1
  53. package/dist/app/assets/{css-extras-BYbzAK7f.js → css-extras-CBuI96HF.js} +1 -1
  54. package/dist/app/assets/{csv-ZTBDHIMG.js → csv-CwTWJ9fy.js} +1 -1
  55. package/dist/app/assets/{cypher-8jmGfbdR.js → cypher-D88tClXE.js} +1 -1
  56. package/dist/app/assets/{d-DFbflmjx.js → d-BWG0iTE-.js} +1 -1
  57. package/dist/app/assets/{dart-xe2OJ0zL.js → dart-CuUeEfkB.js} +1 -1
  58. package/dist/app/assets/{dataweave-cyUIz_PL.js → dataweave-Y5qfzSJO.js} +1 -1
  59. package/dist/app/assets/{dax-BnxULnvb.js → dax-z1vJoJqt.js} +1 -1
  60. package/dist/app/assets/{dhall-DkVQZ3C3.js → dhall-fDEBchRN.js} +1 -1
  61. package/dist/app/assets/{diff-u2elSjyY.js → diff-DWMZ6ihZ.js} +1 -1
  62. package/dist/app/assets/{django-DWfaa1BH.js → django-DCaIOARB.js} +1 -1
  63. package/dist/app/assets/{dns-zone-file-BxxD9YiY.js → dns-zone-file-BDhluMwF.js} +1 -1
  64. package/dist/app/assets/{docker-agJ_fYVN.js → docker-ADTABOD7.js} +1 -1
  65. package/dist/app/assets/{dot-DfK48nzU.js → dot-dm0hRI_d.js} +1 -1
  66. package/dist/app/assets/{ebnf-D2_uN5ZR.js → ebnf-qFQ8NGRa.js} +1 -1
  67. package/dist/app/assets/{editorconfig-Bkm8bu86.js → editorconfig-M1PNmDB7.js} +1 -1
  68. package/dist/app/assets/{eiffel-KNdMI65Y.js → eiffel-Bk5GVHNc.js} +1 -1
  69. package/dist/app/assets/{ejs-CscaSYIN.js → ejs-BXbi7DMO.js} +1 -1
  70. package/dist/app/assets/{elixir-BNlWI1r7.js → elixir-nt7_rP4L.js} +1 -1
  71. package/dist/app/assets/{elm-CNwbF3_9.js → elm-CDcRzvrq.js} +1 -1
  72. package/dist/app/assets/{erb-DtFL1xmZ.js → erb-D3tcO__0.js} +1 -1
  73. package/dist/app/assets/{erlang-C0jBeitv.js → erlang-B4u--80w.js} +1 -1
  74. package/dist/app/assets/{etlua-B_FYDHoo.js → etlua-BnbSsaIV.js} +1 -1
  75. package/dist/app/assets/{excel-formula-Ddk-Nf9I.js → excel-formula-DLztFxwy.js} +1 -1
  76. package/dist/app/assets/{factor-CmwX-7Jh.js → factor-k_q8DU3n.js} +1 -1
  77. package/dist/app/assets/{false-DyBWE4qx.js → false-EqgS-Tkv.js} +1 -1
  78. package/dist/app/assets/{firestore-security-rules-BnA9yQQx.js → firestore-security-rules-BNeM0zmk.js} +1 -1
  79. package/dist/app/assets/{flow-DN7IgZst.js → flow-C6rIqrD4.js} +1 -1
  80. package/dist/app/assets/{fortran-CWBI75l9.js → fortran-CtcKyblB.js} +1 -1
  81. package/dist/app/assets/{fsharp-Be4_1ptQ.js → fsharp-DvC6evnC.js} +1 -1
  82. package/dist/app/assets/{ftl-CGRdQf4s.js → ftl-B_JlxDIr.js} +1 -1
  83. package/dist/app/assets/{gap-BKioDcPC.js → gap-gLflRQGF.js} +1 -1
  84. package/dist/app/assets/{gcode-Dn2cLzkC.js → gcode-CnfAyvEE.js} +1 -1
  85. package/dist/app/assets/{gdscript-CJOS-gjk.js → gdscript-EKerpVNS.js} +1 -1
  86. package/dist/app/assets/{gedcom-CplceX5G.js → gedcom-Ad0m6Zc2.js} +1 -1
  87. package/dist/app/assets/{gherkin-DMSysr5I.js → gherkin-uCNN1ATX.js} +1 -1
  88. package/dist/app/assets/{git-CPW7sXGf.js → git-Bjayw6ss.js} +1 -1
  89. package/dist/app/assets/{glsl-k-facHOT.js → glsl-bHhLBW8P.js} +1 -1
  90. package/dist/app/assets/{gml-CV--3uCc.js → gml-BQNjMX9m.js} +1 -1
  91. package/dist/app/assets/{gn-jkosEbNS.js → gn-AZpH8rMM.js} +1 -1
  92. package/dist/app/assets/{go-BNQLRlmA.js → go-B04a4gPD.js} +1 -1
  93. package/dist/app/assets/{go-module-DbWOj2H0.js → go-module-B-KN1Mlr.js} +1 -1
  94. package/dist/app/assets/{graphql-usPW3Fl7.js → graphql-DHjSGdnz.js} +1 -1
  95. package/dist/app/assets/{groovy-MKE1O2R9.js → groovy-DEug64iA.js} +1 -1
  96. package/dist/app/assets/{haml-_mDStvsq.js → haml-Bz8MK1Hn.js} +1 -1
  97. package/dist/app/assets/{handlebars-CIl8TmZq.js → handlebars-r_hDn-yj.js} +1 -1
  98. package/dist/app/assets/{haskell-Cm4BzUdQ.js → haskell-DhRqgzP_.js} +1 -1
  99. package/dist/app/assets/{haxe-COKxOzXV.js → haxe-DQFQxvE_.js} +1 -1
  100. package/dist/app/assets/{hcl-DUZa-9cr.js → hcl-BKp5VAPU.js} +1 -1
  101. package/dist/app/assets/{hlsl-Dxo1rrBG.js → hlsl-CghIWoQj.js} +1 -1
  102. package/dist/app/assets/{hoon-DZk8Paai.js → hoon-Dm-fnZxk.js} +1 -1
  103. package/dist/app/assets/{hpkp-Bf9ZU2kJ.js → hpkp-lkuwmSbZ.js} +1 -1
  104. package/dist/app/assets/{hsts-CMX9dH_c.js → hsts-Wd4KhVht.js} +1 -1
  105. package/dist/app/assets/{http-BdPDUUlX.js → http-CmfhFPEg.js} +1 -1
  106. package/dist/app/assets/{ichigojam-DZWqQfTk.js → ichigojam-Dc2L55jh.js} +1 -1
  107. package/dist/app/assets/{icon-CSC5VGP_.js → icon-DdCxyxIH.js} +1 -1
  108. package/dist/app/assets/{icu-message-format-CtRFWyFe.js → icu-message-format-BQYI0sFj.js} +1 -1
  109. package/dist/app/assets/{idris-D2LDs3co.js → idris-C5tNclWm.js} +1 -1
  110. package/dist/app/assets/{iecst-kpaa10GT.js → iecst-BKVUYIbF.js} +1 -1
  111. package/dist/app/assets/{ignore-B6TeQ2cq.js → ignore-CfwJhNgR.js} +1 -1
  112. package/dist/app/assets/index-3k-bKyOc.js +439 -0
  113. package/dist/app/assets/index-Ki_i49D-.css +1 -0
  114. package/dist/app/assets/{inform7-B2DiX5z0.js → inform7-Cdcod1ei.js} +1 -1
  115. package/dist/app/assets/{ini-CJgz2CJx.js → ini-C2cDeXd9.js} +1 -1
  116. package/dist/app/assets/{io-C4PjllHD.js → io-DuXAvwXa.js} +1 -1
  117. package/dist/app/assets/{j-BKSoIQwQ.js → j-BYVASY6X.js} +1 -1
  118. package/dist/app/assets/{java-CHbVZ6UP.js → java-4VrDHvxX.js} +1 -1
  119. package/dist/app/assets/{javadoc-CPqAjHoM.js → javadoc-CuF60fip.js} +1 -1
  120. package/dist/app/assets/{javadoclike-Bs-8xh3H.js → javadoclike-C44_Y4pE.js} +1 -1
  121. package/dist/app/assets/{javascript-BT_NpjyP.js → javascript-DWYY3Hmb.js} +1 -1
  122. package/dist/app/assets/{javastacktrace-Drjxr-oB.js → javastacktrace-C1VDqTgi.js} +1 -1
  123. package/dist/app/assets/{jexl-BxjDgVx9.js → jexl-DeQ9RUDn.js} +1 -1
  124. package/dist/app/assets/{jolie-BqMpKk0G.js → jolie-BRudN8eg.js} +1 -1
  125. package/dist/app/assets/{jq-BHUHr0op.js → jq-CtXc1LOh.js} +1 -1
  126. package/dist/app/assets/{js-extras-D4wvqur3.js → js-extras-CvvdpdSS.js} +1 -1
  127. package/dist/app/assets/{js-templates-Yv-O3_U6.js → js-templates-M2G0Wqhr.js} +1 -1
  128. package/dist/app/assets/{jsdoc-OgQO3nf9.js → jsdoc-Bu2t9JLm.js} +1 -1
  129. package/dist/app/assets/{json-DVZtz_Zz.js → json-Cq-mABJ1.js} +1 -1
  130. package/dist/app/assets/{json5--f2Givq3.js → json5-4HqEH5T5.js} +1 -1
  131. package/dist/app/assets/{jsonp-DVGUcHMz.js → jsonp-BEtlh398.js} +1 -1
  132. package/dist/app/assets/{jsstacktrace-D-yoMr1R.js → jsstacktrace-Dx0Y7B74.js} +1 -1
  133. package/dist/app/assets/{jsx-C05X4U8h.js → jsx-DsbRpy7E.js} +1 -1
  134. package/dist/app/assets/{julia-DgnoOAdD.js → julia-DcsLQWYM.js} +1 -1
  135. package/dist/app/assets/{keepalived-JD08MytA.js → keepalived-Dv8pDJFo.js} +1 -1
  136. package/dist/app/assets/{keyman-azrDuGNy.js → keyman-Ci2jdsqC.js} +1 -1
  137. package/dist/app/assets/{kotlin-Bq9qLl8S.js → kotlin-SayKmA5u.js} +1 -1
  138. package/dist/app/assets/{kumir-BaIa8IWz.js → kumir-DMWOjK8x.js} +1 -1
  139. package/dist/app/assets/{kusto-DQhcCWAA.js → kusto-aI0GRJrT.js} +1 -1
  140. package/dist/app/assets/{latex-qLbFVwxL.js → latex-DTp_-VF9.js} +1 -1
  141. package/dist/app/assets/{latte-BIpeH7ye.js → latte-LZMPGx1E.js} +1 -1
  142. package/dist/app/assets/{less-DCAm2XKc.js → less-gB0H6bSD.js} +1 -1
  143. package/dist/app/assets/{lilypond-URqh-pba.js → lilypond-F37QUedl.js} +1 -1
  144. package/dist/app/assets/{liquid-BdNjEMRj.js → liquid-D--Wm3ha.js} +1 -1
  145. package/dist/app/assets/{lisp-DdMDpbFO.js → lisp-DIM2rPYE.js} +1 -1
  146. package/dist/app/assets/{livescript-YUBYodrC.js → livescript-BXTz0GVS.js} +1 -1
  147. package/dist/app/assets/{llvm-BdNAFhzC.js → llvm-ao5q-dod.js} +1 -1
  148. package/dist/app/assets/{log-BdA3w0be.js → log-DSdp1PUj.js} +1 -1
  149. package/dist/app/assets/{lolcode-BqnlYMBu.js → lolcode-DTgLBwjE.js} +1 -1
  150. package/dist/app/assets/{lua-Z_Qxo3dR.js → lua-D1IySTDW.js} +1 -1
  151. package/dist/app/assets/{magma-rsT2u-lT.js → magma-By0NJTpR.js} +1 -1
  152. package/dist/app/assets/{makefile-CrrMmdVS.js → makefile-CGoRDnpf.js} +1 -1
  153. package/dist/app/assets/{markdown-B5hh6ods.js → markdown-D1L-HQf5.js} +1 -1
  154. package/dist/app/assets/{markup-BiaBQ4Go.js → markup-raYrASfk.js} +1 -1
  155. package/dist/app/assets/{markup-templating-CbtO_SGF.js → markup-templating-CssRUGmY.js} +1 -1
  156. package/dist/app/assets/{matlab-BXD-ZhVV.js → matlab-Bkpr6UVS.js} +1 -1
  157. package/dist/app/assets/{maxscript-NZobaPB9.js → maxscript-BqOK2v7p.js} +1 -1
  158. package/dist/app/assets/{mel-BsjN8CzC.js → mel-CH03lWHq.js} +1 -1
  159. package/dist/app/assets/{mermaid-B5UiXAS_.js → mermaid-BN5SfVaW.js} +1 -1
  160. package/dist/app/assets/{mizar-CuUsPtTq.js → mizar-B5EFFzYR.js} +1 -1
  161. package/dist/app/assets/{mongodb-D3GB0bU8.js → mongodb-6kvQytJm.js} +1 -1
  162. package/dist/app/assets/{monkey-CK-Syk83.js → monkey-CrULcDcp.js} +1 -1
  163. package/dist/app/assets/{moonscript-CxgNQMDf.js → moonscript-BUk4hr1Y.js} +1 -1
  164. package/dist/app/assets/{n1ql-B0gvukgr.js → n1ql-BD0zH2HW.js} +1 -1
  165. package/dist/app/assets/{n4js-CSiVWG8j.js → n4js-BmHkGn_8.js} +1 -1
  166. package/dist/app/assets/{nand2tetris-hdl-BvvEGqNK.js → nand2tetris-hdl-B8Jd5FCr.js} +1 -1
  167. package/dist/app/assets/{naniscript-45A_ER_d.js → naniscript-B6Iuqu44.js} +1 -1
  168. package/dist/app/assets/{nasm-CyYsQrbV.js → nasm-CenqrlGz.js} +1 -1
  169. package/dist/app/assets/{neon-BiKXlKLm.js → neon-BlyFo4oH.js} +1 -1
  170. package/dist/app/assets/{nevod-8Kv8aVJh.js → nevod-FI2_D4MV.js} +1 -1
  171. package/dist/app/assets/{nginx-Cqo-dGUO.js → nginx-vOnlcjjK.js} +1 -1
  172. package/dist/app/assets/{nim-Cy_EjBaO.js → nim-BTBcND8I.js} +1 -1
  173. package/dist/app/assets/{nix-BmTy7l9S.js → nix-CxWC3x_A.js} +1 -1
  174. package/dist/app/assets/{nsis-XTneXqGR.js → nsis-DWRIAzZl.js} +1 -1
  175. package/dist/app/assets/{objectivec-Dmg9RHOg.js → objectivec-DnNYqiEV.js} +1 -1
  176. package/dist/app/assets/{ocaml-CWRJM2tE.js → ocaml-MWcE4wPG.js} +1 -1
  177. package/dist/app/assets/{opencl-D8_U7ZHs.js → opencl-CEoyfv1f.js} +1 -1
  178. package/dist/app/assets/{openqasm--Tw4PlEa.js → openqasm-B9J2Sj4l.js} +1 -1
  179. package/dist/app/assets/{oz-D-aUSxpN.js → oz-Q6fkizOZ.js} +1 -1
  180. package/dist/app/assets/{parigp-MtrGmHWf.js → parigp-qViHuHAI.js} +1 -1
  181. package/dist/app/assets/{parser-h_-AW9-T.js → parser-D1TDrUDK.js} +1 -1
  182. package/dist/app/assets/{pascal-DAMDGrIq.js → pascal-C_GcAzVz.js} +1 -1
  183. package/dist/app/assets/{pascaligo-TT68AZ0R.js → pascaligo-BGECHz22.js} +1 -1
  184. package/dist/app/assets/{pcaxis-BZabfhMp.js → pcaxis-5_0lQ0o8.js} +1 -1
  185. package/dist/app/assets/{peoplecode-8Z4ArX58.js → peoplecode-C-_cyguZ.js} +1 -1
  186. package/dist/app/assets/{perl-Tf2L_iWK.js → perl-Bhu_9hey.js} +1 -1
  187. package/dist/app/assets/{php-Citv4wvI.js → php-CUhDCFAS.js} +1 -1
  188. package/dist/app/assets/{php-extras-CXdnzF7N.js → php-extras-DSKZN6SK.js} +1 -1
  189. package/dist/app/assets/{phpdoc-D6tsAiH4.js → phpdoc-C1FLn7tF.js} +1 -1
  190. package/dist/app/assets/{plsql-DJtQNxFM.js → plsql-DMfpGYGl.js} +1 -1
  191. package/dist/app/assets/{powerquery-CP9sQCLl.js → powerquery-BRhf1hs3.js} +1 -1
  192. package/dist/app/assets/{powershell-CKCDLWVv.js → powershell-CRaHW94B.js} +1 -1
  193. package/dist/app/assets/{processing-D4muvaDA.js → processing-I8nRKQlO.js} +1 -1
  194. package/dist/app/assets/{prolog-DqCpmAF7.js → prolog-FrUePJiK.js} +1 -1
  195. package/dist/app/assets/{promql-DNdbBZJb.js → promql-BvAq16Ge.js} +1 -1
  196. package/dist/app/assets/{properties-DQUwwb8x.js → properties-DbxGMSRW.js} +1 -1
  197. package/dist/app/assets/{protobuf-BNe-4-Ln.js → protobuf-DrIGvjWL.js} +1 -1
  198. package/dist/app/assets/{psl-DHT7D5Zu.js → psl-0HKrjoj1.js} +1 -1
  199. package/dist/app/assets/{pug-BYrNe-ek.js → pug-CxH9bsi7.js} +1 -1
  200. package/dist/app/assets/{puppet-IzXU2QnL.js → puppet-DHgc1gZg.js} +1 -1
  201. package/dist/app/assets/{pure-C8utNRFH.js → pure-B0kLfpMx.js} +1 -1
  202. package/dist/app/assets/{purebasic-BLFLiyfl.js → purebasic-Ca1sSC6z.js} +1 -1
  203. package/dist/app/assets/{purescript-CGkGiDmC.js → purescript-BQK7br_N.js} +1 -1
  204. package/dist/app/assets/{q-Ch-_c3XY.js → q-DwDhLegJ.js} +1 -1
  205. package/dist/app/assets/{qml-BCtzfHKg.js → qml-CtbldBP6.js} +1 -1
  206. package/dist/app/assets/{qore-6XNyhUtr.js → qore-D3LZb6ma.js} +1 -1
  207. package/dist/app/assets/{qsharp-KFIiBs-v.js → qsharp-CiLCdqjv.js} +1 -1
  208. package/dist/app/assets/{r-VHCTkPpx.js → r-Dilam18q.js} +1 -1
  209. package/dist/app/assets/{racket-1qTUuxaw.js → racket-BBckdZP5.js} +1 -1
  210. package/dist/app/assets/{reason-c3DD7ovu.js → reason-C20wa4Ng.js} +1 -1
  211. package/dist/app/assets/{regex-CKlhWzhL.js → regex-COQGBYpa.js} +1 -1
  212. package/dist/app/assets/{rego-B6Roc-f_.js → rego-pKEk3RLD.js} +1 -1
  213. package/dist/app/assets/{renpy-B8vDLdIS.js → renpy-CDmk4rPI.js} +1 -1
  214. package/dist/app/assets/{rest-CbuvO7de.js → rest-Dl5zGTqN.js} +1 -1
  215. package/dist/app/assets/{rip-sVuuKWbv.js → rip-Dn6GOHWS.js} +1 -1
  216. package/dist/app/assets/{roboconf-BidW62eI.js → roboconf-BBJnM0BC.js} +1 -1
  217. package/dist/app/assets/{robotframework-Cd11Dy3l.js → robotframework-B3glKH4d.js} +1 -1
  218. package/dist/app/assets/{ruby-BMwY3KVp.js → ruby-BQGh_6Rr.js} +1 -1
  219. package/dist/app/assets/{rust-DglFfUim.js → rust-QlUGh2de.js} +1 -1
  220. package/dist/app/assets/{sas-BCWGGNZo.js → sas-BDC68F8y.js} +1 -1
  221. package/dist/app/assets/{sass-Chbcrpqb.js → sass-DieDF6XQ.js} +1 -1
  222. package/dist/app/assets/{scala-ClwErATt.js → scala-D3MUhHYj.js} +1 -1
  223. package/dist/app/assets/{scheme-mqaymmTS.js → scheme-BGgE-kqm.js} +1 -1
  224. package/dist/app/assets/{scss-BBhxumOr.js → scss--_H8DdDE.js} +1 -1
  225. package/dist/app/assets/{shell-session-CuI4Rdf4.js → shell-session-LGnbrToj.js} +1 -1
  226. package/dist/app/assets/{smali-BoavhNXE.js → smali-CBlokkez.js} +1 -1
  227. package/dist/app/assets/{smalltalk-WiUFOepn.js → smalltalk-BbGkP-W2.js} +1 -1
  228. package/dist/app/assets/{smarty-BP4mWIwR.js → smarty-HZnEokqM.js} +1 -1
  229. package/dist/app/assets/{sml-AFqGvMHc.js → sml-D3kN5fHv.js} +1 -1
  230. package/dist/app/assets/{solidity-D5h9njh8.js → solidity-COzqk2SX.js} +1 -1
  231. package/dist/app/assets/{solution-file-BLK1IrUz.js → solution-file-B_WMCfok.js} +1 -1
  232. package/dist/app/assets/{soy-Cf8u5dko.js → soy-BnjJHZA_.js} +1 -1
  233. package/dist/app/assets/{sparql-C9KxnH23.js → sparql-B5TBM1ys.js} +1 -1
  234. package/dist/app/assets/{splunk-spl-BxUXtsOD.js → splunk-spl-B2w0z96G.js} +1 -1
  235. package/dist/app/assets/{sqf-qlV7g48i.js → sqf-XPpbNZWG.js} +1 -1
  236. package/dist/app/assets/{sql-C-p1pos9.js → sql-BdoHQUvu.js} +1 -1
  237. package/dist/app/assets/{squirrel-PX1Grtap.js → squirrel-C7PSbqa8.js} +1 -1
  238. package/dist/app/assets/{stan-zV2a82m3.js → stan-j2SrNXay.js} +1 -1
  239. package/dist/app/assets/{stylus-BrnUo9zO.js → stylus-B4ESB7LK.js} +1 -1
  240. package/dist/app/assets/{swift-Byy18r0p.js → swift-0REuIxse.js} +1 -1
  241. package/dist/app/assets/{systemd-BtqJkXRf.js → systemd-C-jON-S5.js} +1 -1
  242. package/dist/app/assets/{t4-cs-C5jp0bkn.js → t4-cs-73fI4ZnY.js} +1 -1
  243. package/dist/app/assets/{t4-templating-Bmu7FZgm.js → t4-templating-B7K5zZjl.js} +1 -1
  244. package/dist/app/assets/{t4-vb-CczRCjMn.js → t4-vb-nmeCn59t.js} +1 -1
  245. package/dist/app/assets/{tap-DUhOrRiK.js → tap-CC3qoO-h.js} +1 -1
  246. package/dist/app/assets/{tcl-BGDNQuGV.js → tcl-CXW6dWdJ.js} +1 -1
  247. package/dist/app/assets/{textile-BGym3KVm.js → textile-CcZgymJI.js} +1 -1
  248. package/dist/app/assets/{toml-h2DQ44P0.js → toml-Bt-KwXSX.js} +1 -1
  249. package/dist/app/assets/{tremor-CwHv-OnP.js → tremor-CfkeSZOn.js} +1 -1
  250. package/dist/app/assets/{tt2-qgYZXJPR.js → tt2-VjO-nd3t.js} +1 -1
  251. package/dist/app/assets/{turtle-Czr_CW8r.js → turtle-C7lex_1P.js} +1 -1
  252. package/dist/app/assets/{twig-Bq_oAHcm.js → twig-ydMCwYBK.js} +1 -1
  253. package/dist/app/assets/{typescript-mXKzIg0y.js → typescript-BgbE9enz.js} +1 -1
  254. package/dist/app/assets/{typoscript-CLdCbPty.js → typoscript-mPjPihGb.js} +1 -1
  255. package/dist/app/assets/{unrealscript-CdYUVWsh.js → unrealscript-B1h3FIp7.js} +1 -1
  256. package/dist/app/assets/{uorazor-DxNXLQYo.js → uorazor-BixEY3TF.js} +1 -1
  257. package/dist/app/assets/{uri-DYk5U2Tx.js → uri-a9CNoVTl.js} +1 -1
  258. package/dist/app/assets/{v-ZpnMXAp_.js → v-Bun8Oo4V.js} +1 -1
  259. package/dist/app/assets/{vala-hVJU5BfN.js → vala-Yh7IL00A.js} +1 -1
  260. package/dist/app/assets/{vbnet-CmY51d5G.js → vbnet-D1bws4TN.js} +1 -1
  261. package/dist/app/assets/{velocity-CsvRt2hb.js → velocity-BTBe_YdS.js} +1 -1
  262. package/dist/app/assets/{verilog-CPo8f42m.js → verilog-CZb0BmwQ.js} +1 -1
  263. package/dist/app/assets/{vhdl-WKsKMPi0.js → vhdl-GveK8MNv.js} +1 -1
  264. package/dist/app/assets/{vim-BgsS8AXO.js → vim-BFnGQW9p.js} +1 -1
  265. package/dist/app/assets/{visual-basic-CufJPq0T.js → visual-basic-C6IoFdCy.js} +1 -1
  266. package/dist/app/assets/{warpscript-BMGdLyX8.js → warpscript-BhRK7JpJ.js} +1 -1
  267. package/dist/app/assets/{wasm-BwoGQtY0.js → wasm-BPlRsQZE.js} +1 -1
  268. package/dist/app/assets/{web-idl-CQh6nLUF.js → web-idl-DsR59OqK.js} +1 -1
  269. package/dist/app/assets/{wiki-BBUQmhnv.js → wiki-CqKbsRaB.js} +1 -1
  270. package/dist/app/assets/{wolfram-TAz_4SnR.js → wolfram-DBwl_BKC.js} +1 -1
  271. package/dist/app/assets/{wren-CVPXcwur.js → wren-BiiMWCe5.js} +1 -1
  272. package/dist/app/assets/{xeora-DFQOGccv.js → xeora-BAHjHPpy.js} +1 -1
  273. package/dist/app/assets/{xml-doc-DU62FPEw.js → xml-doc-C7XMC-Tu.js} +1 -1
  274. package/dist/app/assets/{xojo-CRo0kja2.js → xojo-B8_jJVJy.js} +1 -1
  275. package/dist/app/assets/{xquery-lrNjl9FO.js → xquery-C4b31bTA.js} +1 -1
  276. package/dist/app/assets/{yaml-PqToDf_Q.js → yaml-BZKzmGBJ.js} +1 -1
  277. package/dist/app/assets/{yang-BQDTSngB.js → yang-Bbsnlksx.js} +1 -1
  278. package/dist/app/assets/{zig-D_9EoT5C.js → zig-BnOm7PBz.js} +1 -1
  279. package/dist/app/index.html +2 -2
  280. package/dist/index.cjs +387 -71
  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 +394 -72
  285. package/package.json +2 -2
  286. package/dist/app/assets/index-C9w4yW8p.js +0 -438
  287. package/dist/app/assets/index-DcB156i0.css +0 -1
package/dist/index.cjs CHANGED
@@ -89,19 +89,28 @@ 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");
95
104
  var import_xpert_sdk = require("@xpert-ai/xpert-sdk");
96
105
  var import_tool = require("@langchain/core/messages/tool");
97
- var import_chatkit_types2 = require("@xpert-ai/chatkit-types");
106
+ var import_chatkit_types3 = require("@xpert-ai/chatkit-types");
98
107
 
99
108
  // src/hooks/useParentMessenger.tsx
100
109
  var import_react2 = require("react");
101
110
 
102
111
  // src/providers/ParentMessenger.tsx
103
112
  var import_react = require("react");
104
- var import_chatkit_types = require("@xpert-ai/chatkit-types");
113
+ var import_chatkit_types2 = require("@xpert-ai/chatkit-types");
105
114
 
106
115
  // src/hooks/useStream.ts
107
116
  var streamRef = { current: null };
@@ -115,6 +124,44 @@ function useStreamManager() {
115
124
  };
116
125
  }
117
126
 
127
+ // src/lib/request-options.ts
128
+ var import_chatkit_types = require("@xpert-ai/chatkit-types");
129
+ function isRecord(value) {
130
+ return Boolean(value) && typeof value === "object" && !Array.isArray(value);
131
+ }
132
+ function resolveHumanStateValue(value) {
133
+ const human = value?.[import_chatkit_types.STATE_VARIABLE_HUMAN];
134
+ return isRecord(human) ? human : {};
135
+ }
136
+ function buildInjectedRequestOptions(input) {
137
+ const defaultState = input.defaults?.state;
138
+ const explicitState = input.state;
139
+ const defaultContext = input.defaults?.context;
140
+ const explicitContext = input.context;
141
+ const mergedContext = {
142
+ ...defaultContext ?? {},
143
+ ...explicitContext ?? {}
144
+ };
145
+ const hasContext = Object.keys(mergedContext).length > 0;
146
+ const mergedState = {
147
+ ...defaultState ?? {},
148
+ ...explicitState ?? {}
149
+ };
150
+ const mergedHumanState = {
151
+ ...resolveHumanStateValue(defaultState),
152
+ ...resolveHumanStateValue(explicitState),
153
+ ...input.humanInput ?? {}
154
+ };
155
+ if (Object.keys(mergedHumanState).length > 0) {
156
+ mergedState[import_chatkit_types.STATE_VARIABLE_HUMAN] = mergedHumanState;
157
+ }
158
+ const hasState = Object.keys(mergedState).length > 0;
159
+ return {
160
+ ...hasState ? { state: mergedState } : {},
161
+ ...hasContext ? { context: mergedContext } : {}
162
+ };
163
+ }
164
+
118
165
  // src/providers/ParentMessenger.tsx
119
166
  var import_jsx_runtime = require("react/jsx-runtime");
120
167
  var handledSendUserMessageNonces = /* @__PURE__ */ new Set();
@@ -143,6 +190,7 @@ function ParentMessengerProvider({
143
190
  /* @__PURE__ */ new Map()
144
191
  );
145
192
  const onSetOptionsHandlersRef = (0, import_react.useRef)(/* @__PURE__ */ new Set());
193
+ const latestOptionsRef = (0, import_react.useRef)(null);
146
194
  const isParentAvailable = (0, import_react.useMemo)(() => {
147
195
  return typeof window !== "undefined" && window.parent !== window;
148
196
  }, []);
@@ -185,27 +233,29 @@ function ParentMessengerProvider({
185
233
  handledSendUserMessageEvents.add(event);
186
234
  }
187
235
  const params = payload.data;
188
- const prompt = (params.text ?? params.state?.[import_chatkit_types.STATE_VARIABLE_HUMAN]?.input ?? "").trim();
236
+ const prompt = (params.text ?? params.state?.[import_chatkit_types2.STATE_VARIABLE_HUMAN]?.input ?? "").trim();
189
237
  const newMessage = {
190
238
  id: createMessageId(),
191
239
  type: "human",
192
240
  content: prompt
193
241
  };
242
+ const requestOptions = buildInjectedRequestOptions({
243
+ defaults: latestOptionsRef.current?.request,
244
+ state: params.state,
245
+ humanInput: {
246
+ input: prompt
247
+ }
248
+ });
194
249
  streamRef2.current?.submit(
195
250
  {
196
251
  input: {
197
252
  input: prompt
198
253
  },
199
- state: {
200
- ...params.state || {},
201
- [import_chatkit_types.STATE_VARIABLE_HUMAN]: {
202
- ...params.state?.[import_chatkit_types.STATE_VARIABLE_HUMAN] || {},
203
- input: prompt
204
- }
205
- }
254
+ ...requestOptions.state ? { state: requestOptions.state } : {}
206
255
  },
207
256
  {
208
257
  newThread: params.newThread,
258
+ ...requestOptions.context ? { context: requestOptions.context } : {},
209
259
  optimisticValues: (prev) => {
210
260
  const prevMessages = prev?.messages ?? [];
211
261
  return { ...prev, messages: [...prevMessages, newMessage] };
@@ -218,6 +268,7 @@ function ParentMessengerProvider({
218
268
  return;
219
269
  }
220
270
  if (payload.type == "command" && payload.command === "onSetOptions") {
271
+ latestOptionsRef.current = payload.data ?? null;
221
272
  if (onSetOptionsHandlersRef.current.size > 0) {
222
273
  onSetOptionsHandlersRef.current.forEach((handler2) => {
223
274
  handler2(payload.data);
@@ -327,11 +378,41 @@ function useParentMessenger({ onSetOptions } = {}) {
327
378
  return messenger;
328
379
  }
329
380
 
381
+ // src/lib/thread-context-usage.ts
382
+ function normalizeContextUsageNumber(value) {
383
+ if (typeof value === "number" && Number.isFinite(value) && value >= 0) {
384
+ return Math.floor(value);
385
+ }
386
+ if (typeof value === "string") {
387
+ const parsed = Number.parseFloat(value);
388
+ if (Number.isFinite(parsed) && parsed >= 0) {
389
+ return Math.floor(parsed);
390
+ }
391
+ }
392
+ return null;
393
+ }
394
+ function getThreadContextUsage(state, agentKey) {
395
+ if (!agentKey) return null;
396
+ return state[agentKey] ?? null;
397
+ }
398
+ function getThreadContextUsageTotalTokens(event) {
399
+ return normalizeContextUsageNumber(event?.usage?.totalTokens);
400
+ }
401
+ function resolveUsedContextSize(options) {
402
+ const realtimeUsedTokens = getThreadContextUsageTotalTokens(
403
+ options.realtimeUsage
404
+ );
405
+ if (realtimeUsedTokens != null) {
406
+ return realtimeUsedTokens;
407
+ }
408
+ return normalizeContextUsageNumber(options.fallbackUsedTokens) ?? 0;
409
+ }
410
+
330
411
  // src/providers/Stream.tsx
331
412
  var import_jsx_runtime2 = require("react/jsx-runtime");
332
413
  var import_meta = {};
333
414
  var StreamContext = (0, import_react3.createContext)(void 0);
334
- var defaultApiUrl = import_meta.env.VITE_XPERTAI_API_URL ?? "https://api.mtda.cloud/api/ai";
415
+ var defaultApiUrl = import_meta.env.VITE_XPERTAI_API_URL ?? "https://api.xpertai.cn/api/ai";
335
416
  var useStreamContext = () => {
336
417
  const context = (0, import_react3.useContext)(StreamContext);
337
418
  if (!context) {
@@ -451,6 +532,7 @@ var en_US_default = {
451
532
  loadingThread: "Loading thread...",
452
533
  stop: "Stop",
453
534
  send: "Send message",
535
+ scrollToBottom: "Scroll to bottom",
454
536
  retryUpload: "Retry upload",
455
537
  poweredBy: "Powered by Xpert AI",
456
538
  errors: {
@@ -509,6 +591,7 @@ var zh_CN_default = {
509
591
  loadingThread: "\u6B63\u5728\u52A0\u8F7D\u7EBF\u7A0B...",
510
592
  stop: "\u505C\u6B62",
511
593
  send: "\u53D1\u9001\u6D88\u606F",
594
+ scrollToBottom: "\u56DE\u5230\u5E95\u90E8",
512
595
  retryUpload: "\u91CD\u65B0\u4E0A\u4F20",
513
596
  poweredBy: "\u7531 Xpert AI \u9A71\u52A8",
514
597
  errors: {
@@ -1607,6 +1690,12 @@ TooltipIconButton.displayName = "TooltipIconButton";
1607
1690
  // src/components/thread/markdown-text.tsx
1608
1691
  var import_katex_min = require("katex/dist/katex.min.css");
1609
1692
  var import_jsx_runtime17 = require("react/jsx-runtime");
1693
+ var getTextContent = (children) => import_react6.Children.toArray(children).map((child) => {
1694
+ if (typeof child === "string" || typeof child === "number") {
1695
+ return String(child);
1696
+ }
1697
+ return "";
1698
+ }).join("");
1610
1699
  var useCopyToClipboard = ({
1611
1700
  copiedDuration = 3e3
1612
1701
  } = {}) => {
@@ -1643,7 +1732,7 @@ var CodeHeader = ({ language, code }) => {
1643
1732
  ] });
1644
1733
  };
1645
1734
  var defaultComponents = {
1646
- h1: ({ className, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1735
+ h1: ({ className, node: _node, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1647
1736
  "h1",
1648
1737
  {
1649
1738
  className: cn(
@@ -1653,7 +1742,7 @@ var defaultComponents = {
1653
1742
  ...props
1654
1743
  }
1655
1744
  ),
1656
- h2: ({ className, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1745
+ h2: ({ className, node: _node, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1657
1746
  "h2",
1658
1747
  {
1659
1748
  className: cn(
@@ -1663,7 +1752,7 @@ var defaultComponents = {
1663
1752
  ...props
1664
1753
  }
1665
1754
  ),
1666
- h3: ({ className, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1755
+ h3: ({ className, node: _node, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1667
1756
  "h3",
1668
1757
  {
1669
1758
  className: cn(
@@ -1673,7 +1762,7 @@ var defaultComponents = {
1673
1762
  ...props
1674
1763
  }
1675
1764
  ),
1676
- h4: ({ className, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1765
+ h4: ({ className, node: _node, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1677
1766
  "h4",
1678
1767
  {
1679
1768
  className: cn(
@@ -1683,7 +1772,7 @@ var defaultComponents = {
1683
1772
  ...props
1684
1773
  }
1685
1774
  ),
1686
- h5: ({ className, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1775
+ h5: ({ className, node: _node, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1687
1776
  "h5",
1688
1777
  {
1689
1778
  className: cn(
@@ -1693,21 +1782,21 @@ var defaultComponents = {
1693
1782
  ...props
1694
1783
  }
1695
1784
  ),
1696
- h6: ({ className, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1785
+ h6: ({ className, node: _node, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1697
1786
  "h6",
1698
1787
  {
1699
1788
  className: cn("my-4 font-semibold first:mt-0 last:mb-0", className),
1700
1789
  ...props
1701
1790
  }
1702
1791
  ),
1703
- p: ({ className, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1792
+ p: ({ className, node: _node, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1704
1793
  "p",
1705
1794
  {
1706
1795
  className: cn("mt-5 mb-5 leading-7 first:mt-0 last:mb-0", className),
1707
1796
  ...props
1708
1797
  }
1709
1798
  ),
1710
- a: ({ className, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1799
+ a: ({ className, node: _node, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1711
1800
  "a",
1712
1801
  {
1713
1802
  className: cn(
@@ -1719,35 +1808,46 @@ var defaultComponents = {
1719
1808
  ...props
1720
1809
  }
1721
1810
  ),
1722
- blockquote: ({ className, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1811
+ blockquote: ({
1812
+ className,
1813
+ node: _node,
1814
+ ...props
1815
+ }) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1723
1816
  "blockquote",
1724
1817
  {
1725
- className: cn("border-l-2 pl-6 italic", className),
1818
+ className: cn(
1819
+ "border-l-4 border-border pl-6 italic text-muted-foreground",
1820
+ className
1821
+ ),
1726
1822
  ...props
1727
1823
  }
1728
1824
  ),
1729
- ul: ({ className, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1825
+ ul: ({ className, node: _node, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1730
1826
  "ul",
1731
1827
  {
1732
1828
  className: cn("my-5 list-outside list-disc pl-6 [&>li]:mt-2", className),
1733
1829
  ...props
1734
1830
  }
1735
1831
  ),
1736
- ol: ({ className, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1832
+ ol: ({ className, node: _node, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1737
1833
  "ol",
1738
1834
  {
1739
1835
  className: cn("my-5 list-outside list-decimal pl-8 [&>li]:mt-2", className),
1740
1836
  ...props
1741
1837
  }
1742
1838
  ),
1743
- hr: ({ className, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1839
+ hr: ({ className, node: _node, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1744
1840
  "hr",
1745
1841
  {
1746
1842
  className: cn("my-5 border-b", className),
1747
1843
  ...props
1748
1844
  }
1749
1845
  ),
1750
- table: ({ className, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1846
+ table: ({
1847
+ className,
1848
+ node: _node,
1849
+ ...props
1850
+ }) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1751
1851
  "table",
1752
1852
  {
1753
1853
  className: cn(
@@ -1757,48 +1857,48 @@ var defaultComponents = {
1757
1857
  ...props
1758
1858
  }
1759
1859
  ),
1760
- th: ({ className, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1860
+ th: ({ className, node: _node, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1761
1861
  "th",
1762
1862
  {
1763
1863
  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",
1864
+ "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
1865
  className
1766
1866
  ),
1767
1867
  ...props
1768
1868
  }
1769
1869
  ),
1770
- td: ({ className, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1870
+ td: ({ className, node: _node, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1771
1871
  "td",
1772
1872
  {
1773
1873
  className: cn(
1774
- "border-b border-l px-4 py-2 text-left last:border-r [&[align=center]]:text-center [&[align=right]]:text-right",
1874
+ "border-border border-b border-l px-4 py-2 text-left last:border-r [&[align=center]]:text-center [&[align=right]]:text-right",
1775
1875
  className
1776
1876
  ),
1777
1877
  ...props
1778
1878
  }
1779
1879
  ),
1780
- tr: ({ className, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1880
+ tr: ({ className, node: _node, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1781
1881
  "tr",
1782
1882
  {
1783
1883
  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",
1884
+ "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
1885
  className
1786
1886
  ),
1787
1887
  ...props
1788
1888
  }
1789
1889
  ),
1790
- sup: ({ className, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1890
+ sup: ({ className, node: _node, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1791
1891
  "sup",
1792
1892
  {
1793
1893
  className: cn("[&>a]:text-xs [&>a]:no-underline", className),
1794
1894
  ...props
1795
1895
  }
1796
1896
  ),
1797
- pre: ({ className, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1798
- "pre",
1897
+ pre: ({ className, node: _node, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1898
+ "div",
1799
1899
  {
1800
1900
  className: cn(
1801
- "max-w-4xl overflow-x-auto rounded-lg text-sm bg-black text-white dark:bg-zinc-800 ",
1901
+ "max-w-4xl overflow-x-auto rounded-lg text-sm bg-black text-white dark:bg-zinc-800",
1802
1902
  className
1803
1903
  ),
1804
1904
  ...props
@@ -1807,18 +1907,21 @@ var defaultComponents = {
1807
1907
  code: ({
1808
1908
  className,
1809
1909
  children,
1910
+ node: _node,
1810
1911
  ...props
1811
1912
  }) => {
1812
1913
  const match = /language-(\w+)/.exec(className || "");
1914
+ const code = getTextContent(children);
1915
+ const isBlockCode = code.includes("\n");
1813
1916
  if (match) {
1814
1917
  const language = match[1];
1815
- const code = String(children).replace(/\n$/, "");
1918
+ const normalizedCode = code.replace(/\n$/, "");
1816
1919
  return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_jsx_runtime17.Fragment, { children: [
1817
1920
  /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1818
1921
  CodeHeader,
1819
1922
  {
1820
1923
  language,
1821
- code
1924
+ code: normalizedCode
1822
1925
  }
1823
1926
  ),
1824
1927
  /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
@@ -1826,15 +1929,31 @@ var defaultComponents = {
1826
1929
  {
1827
1930
  language,
1828
1931
  className,
1829
- children: code
1932
+ children: normalizedCode
1830
1933
  }
1831
1934
  )
1832
1935
  ] });
1833
1936
  }
1937
+ if (isBlockCode) {
1938
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1939
+ "code",
1940
+ {
1941
+ className: cn(
1942
+ "block min-w-full whitespace-pre px-4 py-4 font-mono text-inherit",
1943
+ className
1944
+ ),
1945
+ ...props,
1946
+ children: code.replace(/\n$/, "")
1947
+ }
1948
+ );
1949
+ }
1834
1950
  return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1835
1951
  "code",
1836
1952
  {
1837
- className: cn("rounded font-semibold", className),
1953
+ className: cn(
1954
+ "bg-muted rounded px-1.5 py-0.5 font-mono text-[0.9em] font-semibold break-all",
1955
+ className
1956
+ ),
1838
1957
  ...props,
1839
1958
  children
1840
1959
  }
@@ -1954,6 +2073,8 @@ function MemoryBlock({ content }) {
1954
2073
  function ComponentBlock({ content }) {
1955
2074
  const [isExpanded, setIsExpanded] = React13.useState(false);
1956
2075
  const contentRef = React13.useRef(null);
2076
+ const shouldAutoScrollRef = React13.useRef(true);
2077
+ const previousScrollTopRef = React13.useRef(0);
1957
2078
  const data = content.data ?? {};
1958
2079
  const category = data.category ?? "Component";
1959
2080
  const title = data.tool && category === "Tool" ? data.tool : data.title ?? data.type ?? "Component";
@@ -1967,10 +2088,36 @@ function ComponentBlock({ content }) {
1967
2088
  if (status === "running" && output !== null) setIsExpanded(true);
1968
2089
  }, [status, output]);
1969
2090
  React13.useEffect(() => {
1970
- if (status === "running" && contentRef.current) {
1971
- contentRef.current.scrollTop = contentRef.current.scrollHeight;
2091
+ const element = contentRef.current;
2092
+ if (!element) return;
2093
+ previousScrollTopRef.current = element.scrollTop;
2094
+ const updateAutoScrollState = () => {
2095
+ const nextScrollTop = element.scrollTop;
2096
+ const isScrollingUp = nextScrollTop < previousScrollTopRef.current - 1;
2097
+ previousScrollTopRef.current = nextScrollTop;
2098
+ if (isScrollingUp) {
2099
+ shouldAutoScrollRef.current = false;
2100
+ return;
2101
+ }
2102
+ shouldAutoScrollRef.current = isNearBottom(element);
2103
+ };
2104
+ updateAutoScrollState();
2105
+ element.addEventListener("scroll", updateAutoScrollState, { passive: true });
2106
+ return () => {
2107
+ element.removeEventListener("scroll", updateAutoScrollState);
2108
+ };
2109
+ }, [isExpanded]);
2110
+ React13.useEffect(() => {
2111
+ if (status !== "running") {
2112
+ shouldAutoScrollRef.current = true;
2113
+ return;
1972
2114
  }
1973
- }, [status, output]);
2115
+ const element = contentRef.current;
2116
+ if (!element || !shouldAutoScrollRef.current) {
2117
+ return;
2118
+ }
2119
+ element.scrollTop = element.scrollHeight;
2120
+ }, [isExpanded, output, status]);
1974
2121
  const config = status ? statusConfig[status] : null;
1975
2122
  const StatusIcon = config?.icon;
1976
2123
  return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(Card, { children: [
@@ -2391,18 +2538,6 @@ var kNumberFormatter = new Intl.NumberFormat("en-US", {
2391
2538
  minimumFractionDigits: 0,
2392
2539
  maximumFractionDigits: 1
2393
2540
  });
2394
- function normalizeContextSize(value) {
2395
- if (typeof value === "number" && Number.isFinite(value) && value >= 0) {
2396
- return Math.floor(value);
2397
- }
2398
- if (typeof value === "string") {
2399
- const parsed = Number.parseInt(value, 10);
2400
- if (Number.isFinite(parsed) && parsed >= 0) {
2401
- return parsed;
2402
- }
2403
- }
2404
- return null;
2405
- }
2406
2541
  function normalizeAgentKey(value) {
2407
2542
  if (typeof value !== "string") {
2408
2543
  return null;
@@ -2411,7 +2546,7 @@ function normalizeAgentKey(value) {
2411
2546
  return normalized ? normalized : null;
2412
2547
  }
2413
2548
  function resolveAssistantContextSize(assistant) {
2414
- return normalizeContextSize(assistant.metadata?.context_size) ?? normalizeContextSize(assistant.config?.configurable?.context_size);
2549
+ return normalizeContextUsageNumber(assistant.metadata?.context_size) ?? normalizeContextUsageNumber(assistant.config?.configurable?.context_size);
2415
2550
  }
2416
2551
  function resolveAssistantAgentKey(assistant) {
2417
2552
  return normalizeAgentKey(assistant.metadata?.agent_key) ?? normalizeAgentKey(assistant.config?.configurable?.agentKey);
@@ -2434,6 +2569,16 @@ function ContextUsageIndicator({
2434
2569
  const [maxContextSize, setMaxContextSize] = React17.useState(null);
2435
2570
  const [usedContextSize, setUsedContextSize] = React17.useState(null);
2436
2571
  const [assistantAgentKey, setAssistantAgentKey] = React17.useState(null);
2572
+ const latestRealtimeUsageRef = React17.useRef({
2573
+ threadId: null,
2574
+ agentKey: null,
2575
+ usedTokens: null
2576
+ });
2577
+ const realtimeUsage = React17.useMemo(
2578
+ () => getThreadContextUsage(stream.contextUsageByAgentKey, assistantAgentKey),
2579
+ [assistantAgentKey, stream.contextUsageByAgentKey]
2580
+ );
2581
+ const realtimeUsedContextSize = getThreadContextUsageTotalTokens(realtimeUsage);
2437
2582
  React17.useEffect(() => {
2438
2583
  if (!stream.client || !stream.assistantId) {
2439
2584
  setMaxContextSize(null);
@@ -2454,6 +2599,17 @@ function ContextUsageIndicator({
2454
2599
  cancelled = true;
2455
2600
  };
2456
2601
  }, [stream.client, stream.assistantId]);
2602
+ React17.useEffect(() => {
2603
+ latestRealtimeUsageRef.current = {
2604
+ threadId: stream.threadId ?? null,
2605
+ agentKey: assistantAgentKey,
2606
+ usedTokens: realtimeUsedContextSize
2607
+ };
2608
+ }, [assistantAgentKey, realtimeUsedContextSize, stream.threadId]);
2609
+ React17.useEffect(() => {
2610
+ if (realtimeUsedContextSize == null) return;
2611
+ setUsedContextSize(realtimeUsedContextSize);
2612
+ }, [realtimeUsedContextSize]);
2457
2613
  React17.useEffect(() => {
2458
2614
  if (!stream.client) {
2459
2615
  setUsedContextSize(null);
@@ -2463,14 +2619,25 @@ function ContextUsageIndicator({
2463
2619
  setUsedContextSize(0);
2464
2620
  return;
2465
2621
  }
2622
+ if (realtimeUsedContextSize != null) return;
2466
2623
  if (stream.isLoading) return;
2467
2624
  let cancelled = false;
2625
+ const requestThreadId = stream.threadId;
2626
+ const requestAgentKey = assistantAgentKey;
2468
2627
  stream.client.threads.getContextUsage(
2469
- stream.threadId,
2470
- assistantAgentKey ? { agentKey: assistantAgentKey } : void 0
2471
- ).then((result) => normalizeContextSize(result?.usage?.context_tokens)).then((result) => {
2628
+ requestThreadId,
2629
+ requestAgentKey ? { agentKey: requestAgentKey } : void 0
2630
+ ).then((result) => normalizeContextUsageNumber(result?.usage?.context_tokens)).then((result) => {
2472
2631
  if (cancelled) return;
2473
- setUsedContextSize(result ?? 0);
2632
+ const latestRealtimeUsage = latestRealtimeUsageRef.current;
2633
+ if (latestRealtimeUsage.usedTokens != null && latestRealtimeUsage.threadId === requestThreadId && latestRealtimeUsage.agentKey === requestAgentKey) {
2634
+ return;
2635
+ }
2636
+ setUsedContextSize(
2637
+ resolveUsedContextSize({
2638
+ fallbackUsedTokens: result
2639
+ })
2640
+ );
2474
2641
  }).catch((err) => {
2475
2642
  if (cancelled) return;
2476
2643
  console.warn("[Chat] Failed to load thread context usage:", err);
@@ -2478,7 +2645,15 @@ function ContextUsageIndicator({
2478
2645
  return () => {
2479
2646
  cancelled = true;
2480
2647
  };
2481
- }, [assistantAgentKey, stream.apiKey, stream.apiUrl, stream.client, stream.threadId, stream.isLoading]);
2648
+ }, [
2649
+ assistantAgentKey,
2650
+ realtimeUsedContextSize,
2651
+ stream.apiKey,
2652
+ stream.apiUrl,
2653
+ stream.client,
2654
+ stream.threadId,
2655
+ stream.isLoading
2656
+ ]);
2482
2657
  if (typeof maxContextSize !== "number" || !Number.isFinite(maxContextSize) || maxContextSize <= 0) {
2483
2658
  return null;
2484
2659
  }
@@ -2597,6 +2772,8 @@ function Chat({
2597
2772
  const [draft, setDraft] = React18.useState("");
2598
2773
  const [selectedTool, setSelectedTool] = React18.useState(null);
2599
2774
  const [attachments, setAttachments] = React18.useState([]);
2775
+ const [isAtBottom, setIsAtBottom] = React18.useState(true);
2776
+ const [hasUpdatesBelow, setHasUpdatesBelow] = React18.useState(false);
2600
2777
  const {
2601
2778
  threads,
2602
2779
  deleteThread,
@@ -2605,27 +2782,141 @@ function Chat({
2605
2782
  } = useThreads();
2606
2783
  const viewportRef = React18.useRef(null);
2607
2784
  const fileInputRef = React18.useRef(null);
2785
+ const shouldAutoScrollRef = React18.useRef(true);
2786
+ const forceFollowRef = React18.useRef(false);
2787
+ const previousMessageCountRef = React18.useRef(0);
2788
+ const previousScrollTopRef = React18.useRef(0);
2789
+ const autoScrollFrameRef = React18.useRef(null);
2790
+ const isPointerDownRef = React18.useRef(false);
2791
+ const lastTouchYRef = React18.useRef(null);
2608
2792
  const resolvedTitle = title ?? t("chat.title");
2609
2793
  const resolvedPlaceholder = placeholder ?? t("chat.placeholder");
2610
2794
  const inputPlaceholder = selectedTool?.placeholderOverride ?? composer?.placeholder ?? resolvedPlaceholder;
2611
- const messages = stream.messages ?? [];
2795
+ const messages = React18.useMemo(() => stream.messages ?? [], [stream.messages]);
2612
2796
  const trimmedDraft = draft.trim();
2613
- const scrollToBottom = React18.useCallback((smooth = false) => {
2614
- requestAnimationFrame(() => {
2797
+ const cancelPendingAutoScroll = React18.useCallback(() => {
2798
+ if (autoScrollFrameRef.current !== null) {
2799
+ cancelAnimationFrame(autoScrollFrameRef.current);
2800
+ autoScrollFrameRef.current = null;
2801
+ }
2802
+ }, []);
2803
+ const disableAutoFollow = React18.useCallback(() => {
2804
+ forceFollowRef.current = false;
2805
+ shouldAutoScrollRef.current = false;
2806
+ cancelPendingAutoScroll();
2807
+ }, [cancelPendingAutoScroll]);
2808
+ const enableAutoFollow = React18.useCallback(() => {
2809
+ forceFollowRef.current = true;
2810
+ shouldAutoScrollRef.current = true;
2811
+ setHasUpdatesBelow(false);
2812
+ }, []);
2813
+ const scrollToBottom = React18.useCallback((smooth = false, force = false) => {
2814
+ if (force) {
2815
+ enableAutoFollow();
2816
+ }
2817
+ cancelPendingAutoScroll();
2818
+ autoScrollFrameRef.current = requestAnimationFrame(() => {
2819
+ autoScrollFrameRef.current = null;
2615
2820
  const viewport = viewportRef.current;
2616
2821
  if (viewport) {
2822
+ if (!force && !shouldAutoScrollRef.current) {
2823
+ return;
2824
+ }
2617
2825
  viewport.scrollTo({
2618
2826
  top: viewport.scrollHeight,
2619
2827
  behavior: smooth ? "smooth" : "instant"
2620
2828
  });
2621
2829
  }
2622
2830
  });
2623
- }, []);
2831
+ }, [cancelPendingAutoScroll, enableAutoFollow]);
2832
+ React18.useEffect(() => {
2833
+ const viewport = viewportRef.current;
2834
+ if (!viewport) return;
2835
+ previousScrollTopRef.current = viewport.scrollTop;
2836
+ const stopPointerTracking = () => {
2837
+ isPointerDownRef.current = false;
2838
+ };
2839
+ const updateAutoScrollState = () => {
2840
+ const nextScrollTop = viewport.scrollTop;
2841
+ const isScrollingUp = nextScrollTop < previousScrollTopRef.current - 1;
2842
+ previousScrollTopRef.current = nextScrollTop;
2843
+ const nearBottom = isNearBottom(viewport);
2844
+ setIsAtBottom(nearBottom);
2845
+ if (nearBottom) {
2846
+ shouldAutoScrollRef.current = true;
2847
+ setHasUpdatesBelow(false);
2848
+ return;
2849
+ }
2850
+ if (forceFollowRef.current) {
2851
+ shouldAutoScrollRef.current = true;
2852
+ return;
2853
+ }
2854
+ if (isPointerDownRef.current && isScrollingUp) {
2855
+ disableAutoFollow();
2856
+ return;
2857
+ }
2858
+ shouldAutoScrollRef.current = false;
2859
+ };
2860
+ const handleWheel = (event) => {
2861
+ if (event.deltaY < 0) {
2862
+ disableAutoFollow();
2863
+ }
2864
+ };
2865
+ const handlePointerDown = () => {
2866
+ isPointerDownRef.current = true;
2867
+ };
2868
+ const handleTouchStart = (event) => {
2869
+ lastTouchYRef.current = event.touches[0]?.clientY ?? null;
2870
+ };
2871
+ const handleTouchMove = (event) => {
2872
+ const nextTouchY = event.touches[0]?.clientY;
2873
+ if (typeof nextTouchY !== "number") return;
2874
+ if (lastTouchYRef.current !== null && nextTouchY > lastTouchYRef.current + 1) {
2875
+ disableAutoFollow();
2876
+ }
2877
+ lastTouchYRef.current = nextTouchY;
2878
+ };
2879
+ const handleTouchEnd = () => {
2880
+ lastTouchYRef.current = null;
2881
+ };
2882
+ updateAutoScrollState();
2883
+ viewport.addEventListener("wheel", handleWheel, { passive: true });
2884
+ viewport.addEventListener("pointerdown", handlePointerDown, { passive: true });
2885
+ viewport.addEventListener("scroll", updateAutoScrollState, { passive: true });
2886
+ viewport.addEventListener("touchstart", handleTouchStart, { passive: true });
2887
+ viewport.addEventListener("touchmove", handleTouchMove, { passive: true });
2888
+ viewport.addEventListener("touchend", handleTouchEnd, { passive: true });
2889
+ window.addEventListener("pointerup", stopPointerTracking, { passive: true });
2890
+ window.addEventListener("pointercancel", stopPointerTracking, { passive: true });
2891
+ return () => {
2892
+ cancelPendingAutoScroll();
2893
+ viewport.removeEventListener("wheel", handleWheel);
2894
+ viewport.removeEventListener("pointerdown", handlePointerDown);
2895
+ viewport.removeEventListener("scroll", updateAutoScrollState);
2896
+ viewport.removeEventListener("touchstart", handleTouchStart);
2897
+ viewport.removeEventListener("touchmove", handleTouchMove);
2898
+ viewport.removeEventListener("touchend", handleTouchEnd);
2899
+ window.removeEventListener("pointerup", stopPointerTracking);
2900
+ window.removeEventListener("pointercancel", stopPointerTracking);
2901
+ };
2902
+ }, [cancelPendingAutoScroll, disableAutoFollow]);
2624
2903
  React18.useEffect(() => {
2625
- scrollToBottom();
2626
- }, [messages.length, scrollToBottom]);
2904
+ shouldAutoScrollRef.current = true;
2905
+ forceFollowRef.current = false;
2906
+ previousScrollTopRef.current = 0;
2907
+ setIsAtBottom(true);
2908
+ setHasUpdatesBelow(false);
2909
+ }, [stream.threadId]);
2627
2910
  React18.useEffect(() => {
2628
- if (stream.isLoading) {
2911
+ const messageCountChanged = messages.length !== previousMessageCountRef.current;
2912
+ previousMessageCountRef.current = messages.length;
2913
+ if (!shouldAutoScrollRef.current) {
2914
+ if (messageCountChanged || stream.isLoading) {
2915
+ setHasUpdatesBelow(true);
2916
+ }
2917
+ return;
2918
+ }
2919
+ if (messageCountChanged || stream.isLoading) {
2629
2920
  scrollToBottom();
2630
2921
  }
2631
2922
  }, [stream.isLoading, messages, scrollToBottom]);
@@ -2674,16 +2965,24 @@ function Chat({
2674
2965
  if (filesToSend) {
2675
2966
  inputPayload.files = filesToSend;
2676
2967
  }
2968
+ const requestOptions = buildInjectedRequestOptions({
2969
+ defaults: options?.request,
2970
+ humanInput: inputPayload
2971
+ });
2677
2972
  stream.submit(
2678
- { input: inputPayload },
2679
2973
  {
2974
+ input: inputPayload,
2975
+ ...requestOptions.state ? { state: requestOptions.state } : {}
2976
+ },
2977
+ {
2978
+ ...requestOptions.context ? { context: requestOptions.context } : {},
2680
2979
  optimisticValues: (prev) => {
2681
2980
  const prevMessages = prev?.messages ?? [];
2682
2981
  return { ...prev, messages: [...prevMessages, newMessage] };
2683
2982
  }
2684
2983
  }
2685
2984
  );
2686
- scrollToBottom(true);
2985
+ scrollToBottom(true, true);
2687
2986
  if (selectedTool && !selectedTool.pinned) {
2688
2987
  setSelectedTool(null);
2689
2988
  }
@@ -2785,7 +3084,7 @@ function Chat({
2785
3084
  }
2786
3085
  }
2787
3086
  );
2788
- scrollToBottom(true);
3087
+ scrollToBottom(true, true);
2789
3088
  };
2790
3089
  const loadConversationMessages = React18.useCallback(
2791
3090
  async (recordId) => {
@@ -2865,6 +3164,7 @@ function Chat({
2865
3164
  }
2866
3165
  }
2867
3166
  );
3167
+ scrollToBottom(true, true);
2868
3168
  }
2869
3169
  };
2870
3170
  const acceptMimes = composer?.attachments?.accept ? Object.entries(composer.attachments.accept).map(([mime, exts]) => [mime, ...exts.map((e) => `.${e}`)].join(",")).join(",") : void 0;
@@ -2883,7 +3183,7 @@ function Chat({
2883
3183
  {
2884
3184
  ref: viewportRef,
2885
3185
  className: cn(
2886
- "flex h-full w-full flex-col flex-1 overflow-y-auto bg-background shadow-sm",
3186
+ "relative flex h-full w-full flex-col flex-1 overflow-y-auto bg-background shadow-sm",
2887
3187
  className
2888
3188
  ),
2889
3189
  children: [
@@ -3020,6 +3320,22 @@ function Chat({
3020
3320
  })()
3021
3321
  ] })
3022
3322
  ] }),
3323
+ !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)(
3324
+ Button,
3325
+ {
3326
+ type: "button",
3327
+ size: "icon-sm",
3328
+ variant: hasUpdatesBelow ? "default" : "outline",
3329
+ className: cn(
3330
+ "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)]",
3331
+ hasUpdatesBelow && "animate-bounce"
3332
+ ),
3333
+ onClick: () => scrollToBottom(true, true),
3334
+ "aria-label": t("chat.scrollToBottom"),
3335
+ title: t("chat.scrollToBottom"),
3336
+ children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_lucide_react9.ArrowDown, { size: 16 })
3337
+ }
3338
+ ) }),
3023
3339
  /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "p-2 sticky bottom-0 z-10 bg-background", children: [
3024
3340
  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 }),
3025
3341
  /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(