@xpert-ai/chatkit-ui 0.0.18 → 0.0.19

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 (284) hide show
  1. package/dist/app/assets/{abap-CHwuRnXq.js → abap-CabZ0vYL.js} +1 -1
  2. package/dist/app/assets/{abnf-2DfzhqtW.js → abnf-CPoubvVG.js} +1 -1
  3. package/dist/app/assets/{actionscript-DAgV32eO.js → actionscript-CL1BPQFv.js} +1 -1
  4. package/dist/app/assets/{ada-DT3cxlyx.js → ada-BOt55oS4.js} +1 -1
  5. package/dist/app/assets/{agda-CtLOupxH.js → agda-DKyUkxie.js} +1 -1
  6. package/dist/app/assets/{al-DEAhLEpb.js → al-Jnhqb7P-.js} +1 -1
  7. package/dist/app/assets/{antlr4-mH3vFjLU.js → antlr4-BeT3YbbK.js} +1 -1
  8. package/dist/app/assets/{apacheconf-XqH3RiJR.js → apacheconf-Ck_DRZXY.js} +1 -1
  9. package/dist/app/assets/{apex-ToiE8TUF.js → apex-CPjbO0O4.js} +1 -1
  10. package/dist/app/assets/{apl-wfi68f3P.js → apl-Ccs4_jOU.js} +1 -1
  11. package/dist/app/assets/{applescript-D76E4SJU.js → applescript-C6i7vo8F.js} +1 -1
  12. package/dist/app/assets/{aql-BMSyfgpD.js → aql-D3ZWY-VL.js} +1 -1
  13. package/dist/app/assets/{arduino-DJbNpx4-.js → arduino-xTj3TTXg.js} +1 -1
  14. package/dist/app/assets/{arff-yrwqaguZ.js → arff-BOuVccGR.js} +1 -1
  15. package/dist/app/assets/{asciidoc-CEQ5mqA1.js → asciidoc-BmShvnn0.js} +1 -1
  16. package/dist/app/assets/{asm6502-C-2c85ky.js → asm6502-6FWPK68i.js} +1 -1
  17. package/dist/app/assets/{asmatmel-CWq0tTKz.js → asmatmel-KLAd82QV.js} +1 -1
  18. package/dist/app/assets/{aspnet-Cx4ZWrOh.js → aspnet-vZiSZd1y.js} +1 -1
  19. package/dist/app/assets/{autohotkey-DWdNXtYW.js → autohotkey-tcBDP1b7.js} +1 -1
  20. package/dist/app/assets/{autoit-Dbc7dXyT.js → autoit-Bwt0tLM_.js} +1 -1
  21. package/dist/app/assets/{avisynth-MYFijYs8.js → avisynth-Bzz43Lfu.js} +1 -1
  22. package/dist/app/assets/{avro-idl-D-g9-Y0l.js → avro-idl-Bt9aSyrD.js} +1 -1
  23. package/dist/app/assets/{bash-8NbFWZiC.js → bash-BloO3C-T.js} +1 -1
  24. package/dist/app/assets/{basic-DSlnlwQJ.js → basic-B-OOkRrw.js} +1 -1
  25. package/dist/app/assets/{batch-B2Rcm8G9.js → batch-aOUu2msA.js} +1 -1
  26. package/dist/app/assets/{bbcode-DHCPPC4e.js → bbcode-C4D8vm8O.js} +1 -1
  27. package/dist/app/assets/{bicep-BZyRz9TP.js → bicep-BtBByAYv.js} +1 -1
  28. package/dist/app/assets/{birb-BakwD9zz.js → birb-BKXLouTf.js} +1 -1
  29. package/dist/app/assets/{bison-ieCPcVGR.js → bison-CniuHJJN.js} +1 -1
  30. package/dist/app/assets/{bnf-CGY-BBi3.js → bnf-CGcuZYv2.js} +1 -1
  31. package/dist/app/assets/{brainfuck-Cj81VtmH.js → brainfuck-C9dlh056.js} +1 -1
  32. package/dist/app/assets/{brightscript-BD0EgXHk.js → brightscript-nhHFw9_4.js} +1 -1
  33. package/dist/app/assets/{bro-CBy8pULp.js → bro-BTsReVOc.js} +1 -1
  34. package/dist/app/assets/{bsl-xro0lCDL.js → bsl-CmOTwcFR.js} +1 -1
  35. package/dist/app/assets/{c-9rxn2YQ4.js → c-Yjfq4oES.js} +1 -1
  36. package/dist/app/assets/{cfscript-Bkf3ayeM.js → cfscript-DGhYlgJ7.js} +1 -1
  37. package/dist/app/assets/{chaiscript-GDz4R2K8.js → chaiscript-CpP8bBSU.js} +1 -1
  38. package/dist/app/assets/{cil-CYn74Ewd.js → cil-CZ7j4pcz.js} +1 -1
  39. package/dist/app/assets/{clike-45tZ1mA6.js → clike-D581thF2.js} +1 -1
  40. package/dist/app/assets/{clojure-BWz4NMPO.js → clojure-AXVmar0o.js} +1 -1
  41. package/dist/app/assets/{cmake-xA13Uqwj.js → cmake-BozSSfax.js} +1 -1
  42. package/dist/app/assets/{cobol-j0iRbhJB.js → cobol-OciN9vwY.js} +1 -1
  43. package/dist/app/assets/{coffeescript-dl-THSsH.js → coffeescript-B9yMzVL5.js} +1 -1
  44. package/dist/app/assets/{concurnas-B6S-ADWj.js → concurnas-DeQIM64O.js} +1 -1
  45. package/dist/app/assets/{coq-PXls10l3.js → coq-CicPksao.js} +1 -1
  46. package/dist/app/assets/{core-DDPOAK1E.js → core-BIcqXTaK.js} +1 -1
  47. package/dist/app/assets/{cpp-BgzSW_NX.js → cpp-DKQF7403.js} +1 -1
  48. package/dist/app/assets/{crystal-BMmhu41o.js → crystal-Bcau7QFZ.js} +1 -1
  49. package/dist/app/assets/{csharp-B_WC3Vn_.js → csharp-BYghYpTl.js} +1 -1
  50. package/dist/app/assets/{cshtml-BqSNO3ox.js → cshtml-BIxIGrsH.js} +1 -1
  51. package/dist/app/assets/{csp-CrUI1cnG.js → csp-CzDOD-m1.js} +1 -1
  52. package/dist/app/assets/{css-ChHsquIc.js → css-CPRwU6oY.js} +1 -1
  53. package/dist/app/assets/{css-extras-bQ5HJzA4.js → css-extras-C28yWYxN.js} +1 -1
  54. package/dist/app/assets/{csv-t6AqRQB9.js → csv-D8IAZwKO.js} +1 -1
  55. package/dist/app/assets/{cypher-Cy7io1dY.js → cypher-0hMRBt8D.js} +1 -1
  56. package/dist/app/assets/{d-CwMdCAM_.js → d-B5PQgXXo.js} +1 -1
  57. package/dist/app/assets/{dart-BuartbIn.js → dart-CvCyf8me.js} +1 -1
  58. package/dist/app/assets/{dataweave-BnCsrMSg.js → dataweave-Izl0xtz9.js} +1 -1
  59. package/dist/app/assets/{dax-DaI-ew-T.js → dax-D-bGAkbS.js} +1 -1
  60. package/dist/app/assets/{dhall-6JyEA8LJ.js → dhall-DXIOSM5Q.js} +1 -1
  61. package/dist/app/assets/{diff-BAlFnOor.js → diff-BE-xKdIi.js} +1 -1
  62. package/dist/app/assets/{django-D9vYkGg3.js → django-DxEZdkeU.js} +1 -1
  63. package/dist/app/assets/{dns-zone-file-abVzPRWS.js → dns-zone-file-D406E4S7.js} +1 -1
  64. package/dist/app/assets/{docker-DoUnklwQ.js → docker-BZkb2U00.js} +1 -1
  65. package/dist/app/assets/{dot-DDnBlEa_.js → dot-BGJNVmx1.js} +1 -1
  66. package/dist/app/assets/{ebnf-BajOxGce.js → ebnf-_PEATas2.js} +1 -1
  67. package/dist/app/assets/{editorconfig-BIddix8n.js → editorconfig-C1UuLwJC.js} +1 -1
  68. package/dist/app/assets/{eiffel-BKXrTa6c.js → eiffel-PzXVtlzf.js} +1 -1
  69. package/dist/app/assets/{ejs-Og16WqX4.js → ejs-707c0691.js} +1 -1
  70. package/dist/app/assets/{elixir-CRUCJ3sb.js → elixir-Bd3zWMjP.js} +1 -1
  71. package/dist/app/assets/{elm-BWsXlhNE.js → elm-DvEDEOdK.js} +1 -1
  72. package/dist/app/assets/{erb-Cl2dmgV9.js → erb-B6lZT1P9.js} +1 -1
  73. package/dist/app/assets/{erlang-52x12hpz.js → erlang-BwhqRmQk.js} +1 -1
  74. package/dist/app/assets/{etlua-BvUA6TYU.js → etlua-Bkg93PrU.js} +1 -1
  75. package/dist/app/assets/{excel-formula-CUG5ejOC.js → excel-formula-BD0I0dyD.js} +1 -1
  76. package/dist/app/assets/{factor-C6rMQLDa.js → factor-CiQgOsxY.js} +1 -1
  77. package/dist/app/assets/{false-DV4ACTLB.js → false-DlJ-f_Rc.js} +1 -1
  78. package/dist/app/assets/{firestore-security-rules-BKZLjo1E.js → firestore-security-rules-CxrEhPSm.js} +1 -1
  79. package/dist/app/assets/{flow-qFNOvNgm.js → flow-DOjTBDi4.js} +1 -1
  80. package/dist/app/assets/{fortran-DqiezfWq.js → fortran-D6uA-pWI.js} +1 -1
  81. package/dist/app/assets/{fsharp-ClWdxDsu.js → fsharp-CFL1DcvT.js} +1 -1
  82. package/dist/app/assets/{ftl-B02Q359Y.js → ftl-DzWZwecM.js} +1 -1
  83. package/dist/app/assets/{gap-CI8z3sUw.js → gap-DatQeRFY.js} +1 -1
  84. package/dist/app/assets/{gcode-CS21WcHI.js → gcode-5FSxboIT.js} +1 -1
  85. package/dist/app/assets/{gdscript-C7R4f8Sc.js → gdscript-Dz-OC8bG.js} +1 -1
  86. package/dist/app/assets/{gedcom-zHMKYqZx.js → gedcom-BS0539Ys.js} +1 -1
  87. package/dist/app/assets/{gherkin-BcPGV1uj.js → gherkin-BJKrWYAT.js} +1 -1
  88. package/dist/app/assets/{git-EtetQy0I.js → git-DCjIevVw.js} +1 -1
  89. package/dist/app/assets/{glsl-BcKnrROs.js → glsl-toSXKJrw.js} +1 -1
  90. package/dist/app/assets/{gml-CrGZiEns.js → gml-DODsSWU7.js} +1 -1
  91. package/dist/app/assets/{gn-DHos-BEp.js → gn-CzmtMWMm.js} +1 -1
  92. package/dist/app/assets/{go-tSMJGh2m.js → go-BCQUEKVv.js} +1 -1
  93. package/dist/app/assets/{go-module-DmD_s_em.js → go-module-BbcV-9oG.js} +1 -1
  94. package/dist/app/assets/{graphql-Cv6KihzB.js → graphql-C_KxCYJO.js} +1 -1
  95. package/dist/app/assets/{groovy-CzqIFnlO.js → groovy-Cj97iKYK.js} +1 -1
  96. package/dist/app/assets/{haml-p67IB2SU.js → haml-tLXJGYDb.js} +1 -1
  97. package/dist/app/assets/{handlebars-CZv3-FpN.js → handlebars-DIdVe3xN.js} +1 -1
  98. package/dist/app/assets/{haskell-DAL_LfTS.js → haskell-DPqw5u4H.js} +1 -1
  99. package/dist/app/assets/{haxe-CTqmh5A2.js → haxe-AsnHNCIR.js} +1 -1
  100. package/dist/app/assets/{hcl-CVN94LS3.js → hcl-C6aoWR34.js} +1 -1
  101. package/dist/app/assets/{hlsl-Bn6ZMphU.js → hlsl-B2hhU30-.js} +1 -1
  102. package/dist/app/assets/{hoon-CE6akRDU.js → hoon-Bs-KhWO3.js} +1 -1
  103. package/dist/app/assets/{hpkp-C8KgIg74.js → hpkp-C-J4O-Mp.js} +1 -1
  104. package/dist/app/assets/{hsts-DosDc_Xd.js → hsts-BNFEkSnm.js} +1 -1
  105. package/dist/app/assets/{http-CdUJWc4k.js → http-D7UlQANy.js} +1 -1
  106. package/dist/app/assets/{ichigojam-BYu2pYZ_.js → ichigojam-B01TJ8BA.js} +1 -1
  107. package/dist/app/assets/{icon-C5iVR2I1.js → icon-Ca_ghvQd.js} +1 -1
  108. package/dist/app/assets/{icu-message-format-C7_n4NGR.js → icu-message-format-CkcsJ0ML.js} +1 -1
  109. package/dist/app/assets/{idris-BbHCmg9Y.js → idris-BApVxI9a.js} +1 -1
  110. package/dist/app/assets/{iecst-BXI2gfub.js → iecst-CXLR8sGn.js} +1 -1
  111. package/dist/app/assets/{ignore-DxilDdWj.js → ignore-7LzAeAFj.js} +1 -1
  112. package/dist/app/assets/{index-CxdiVFB3.js → index-BUg2yVDW.js} +99 -99
  113. package/dist/app/assets/{index-Ki_i49D-.css → index-om2E9pNd.css} +1 -1
  114. package/dist/app/assets/{inform7-D9rsIB2_.js → inform7-CtnRN-Iq.js} +1 -1
  115. package/dist/app/assets/{ini-CorbaNQ2.js → ini-Cjpl6yTL.js} +1 -1
  116. package/dist/app/assets/{io-DlaJAU3H.js → io-C6W_EboY.js} +1 -1
  117. package/dist/app/assets/{j-Df9KMPk_.js → j-BOBDun2W.js} +1 -1
  118. package/dist/app/assets/{java-BbPAAQzG.js → java-CNwVyXY2.js} +1 -1
  119. package/dist/app/assets/{javadoc-BBvxcZku.js → javadoc-DS6hxu7_.js} +1 -1
  120. package/dist/app/assets/{javadoclike-C-hXm4Na.js → javadoclike-J6YT11JS.js} +1 -1
  121. package/dist/app/assets/{javascript-D2UR82H9.js → javascript-IbEfuVSB.js} +1 -1
  122. package/dist/app/assets/{javastacktrace--Jk342eR.js → javastacktrace-DjxwGV26.js} +1 -1
  123. package/dist/app/assets/{jexl-Dp7mqOtA.js → jexl-TLHmHaQ5.js} +1 -1
  124. package/dist/app/assets/{jolie-CSWv4bc8.js → jolie-CLk71kur.js} +1 -1
  125. package/dist/app/assets/{jq-CRIxeObf.js → jq-DZKnIQZM.js} +1 -1
  126. package/dist/app/assets/{js-extras-D6Oxrs85.js → js-extras-CJab09ti.js} +1 -1
  127. package/dist/app/assets/{js-templates-CvddYygu.js → js-templates-CQGqrHhi.js} +1 -1
  128. package/dist/app/assets/{jsdoc-BdeT1xTG.js → jsdoc--ymvl4aq.js} +1 -1
  129. package/dist/app/assets/{json-CD5aTyqv.js → json-D9b-V85G.js} +1 -1
  130. package/dist/app/assets/{json5-CQD7S44p.js → json5-LgA47n7A.js} +1 -1
  131. package/dist/app/assets/{jsonp-BDhKO2OY.js → jsonp-Cvwp3f8M.js} +1 -1
  132. package/dist/app/assets/{jsstacktrace-lbAhFL2v.js → jsstacktrace-z8t2H6h6.js} +1 -1
  133. package/dist/app/assets/{jsx-DqiBSXn6.js → jsx-B71LrwNd.js} +1 -1
  134. package/dist/app/assets/{julia-yGL3eW7D.js → julia-DCATdxwO.js} +1 -1
  135. package/dist/app/assets/{keepalived-DHZu6IVW.js → keepalived-DVYYbgrL.js} +1 -1
  136. package/dist/app/assets/{keyman-DoP3-MPX.js → keyman-DLyOXnhf.js} +1 -1
  137. package/dist/app/assets/{kotlin-C38FMvib.js → kotlin-CYoDfyDA.js} +1 -1
  138. package/dist/app/assets/{kumir-DYUxd4M5.js → kumir-CPWiEvmL.js} +1 -1
  139. package/dist/app/assets/{kusto-CjBEwlq_.js → kusto-BkfRYk0W.js} +1 -1
  140. package/dist/app/assets/{latex-yk3k8b7j.js → latex-BEjZ0ppC.js} +1 -1
  141. package/dist/app/assets/{latte-Dng4v313.js → latte-DaZOqdGV.js} +1 -1
  142. package/dist/app/assets/{less-CmhWzUUH.js → less-BmKsj1gN.js} +1 -1
  143. package/dist/app/assets/{lilypond-DpO8jIok.js → lilypond-mmng28aJ.js} +1 -1
  144. package/dist/app/assets/{liquid-7KQu8yU-.js → liquid-BuuJO6_6.js} +1 -1
  145. package/dist/app/assets/{lisp-CkwfOFVq.js → lisp-DnffFM5N.js} +1 -1
  146. package/dist/app/assets/{livescript-K_eeePCa.js → livescript-BSsr00Wr.js} +1 -1
  147. package/dist/app/assets/{llvm-Chk2kOg9.js → llvm-37YjcHN5.js} +1 -1
  148. package/dist/app/assets/{log-XeloFBhC.js → log-D3l5N3To.js} +1 -1
  149. package/dist/app/assets/{lolcode-6kb_GfTw.js → lolcode-C0Q2M_6s.js} +1 -1
  150. package/dist/app/assets/{lua-DpHWoKu0.js → lua-DcLwN4Tg.js} +1 -1
  151. package/dist/app/assets/{magma-B1cwfm8a.js → magma-CK0Amip9.js} +1 -1
  152. package/dist/app/assets/{makefile-DnoX0HR-.js → makefile-CtpS-RoO.js} +1 -1
  153. package/dist/app/assets/{markdown-C5XigQJ0.js → markdown-BNK3F4ql.js} +1 -1
  154. package/dist/app/assets/{markup-SKmTYACD.js → markup-C9GIL65H.js} +1 -1
  155. package/dist/app/assets/{markup-templating-BDHc3isa.js → markup-templating-Du1J3ADP.js} +1 -1
  156. package/dist/app/assets/{matlab-DYse1JL8.js → matlab-DEM6O1Ul.js} +1 -1
  157. package/dist/app/assets/{maxscript-Dof7S23b.js → maxscript-DMvqa3gf.js} +1 -1
  158. package/dist/app/assets/{mel-DsVmbOxg.js → mel-C8DBIw1g.js} +1 -1
  159. package/dist/app/assets/{mermaid-CjPxe17r.js → mermaid-CVko6NSq.js} +1 -1
  160. package/dist/app/assets/{mizar-DLTTgd44.js → mizar-CwYm3_It.js} +1 -1
  161. package/dist/app/assets/{mongodb-J5tlFev8.js → mongodb-DRqGwjq6.js} +1 -1
  162. package/dist/app/assets/{monkey-QAy3552c.js → monkey-BxiKe6Nr.js} +1 -1
  163. package/dist/app/assets/{moonscript-D0xhYjmI.js → moonscript-CJyt1xoM.js} +1 -1
  164. package/dist/app/assets/{n1ql-vOxeW8Ks.js → n1ql-BBmjIGEU.js} +1 -1
  165. package/dist/app/assets/{n4js-Cr0sbX4v.js → n4js-ByKsJMJL.js} +1 -1
  166. package/dist/app/assets/{nand2tetris-hdl-CGUHioIg.js → nand2tetris-hdl-BTSXj71h.js} +1 -1
  167. package/dist/app/assets/{naniscript-BRNba_ij.js → naniscript-C4jykFVF.js} +1 -1
  168. package/dist/app/assets/{nasm-BEE3NtXA.js → nasm-DPA0eXtX.js} +1 -1
  169. package/dist/app/assets/{neon-BCWk85VJ.js → neon-upN4Ak64.js} +1 -1
  170. package/dist/app/assets/{nevod-DuaN4wbX.js → nevod-CdttHB8F.js} +1 -1
  171. package/dist/app/assets/{nginx-BE3tA_qC.js → nginx-DI1fsQ3j.js} +1 -1
  172. package/dist/app/assets/{nim-BTdmQ5Q3.js → nim-D7kc_mK9.js} +1 -1
  173. package/dist/app/assets/{nix-BGISRhR6.js → nix-BUG5ppr9.js} +1 -1
  174. package/dist/app/assets/{nsis-Cy7-xS7T.js → nsis-BnXhmmxO.js} +1 -1
  175. package/dist/app/assets/{objectivec-dDOKBhSQ.js → objectivec-Bu4dOfb9.js} +1 -1
  176. package/dist/app/assets/{ocaml-FY2_HJ8p.js → ocaml-aT7VVPiL.js} +1 -1
  177. package/dist/app/assets/{opencl-QvCSqYEz.js → opencl-BzyWcYkI.js} +1 -1
  178. package/dist/app/assets/{openqasm-DciDYaBI.js → openqasm-b2yFBJdq.js} +1 -1
  179. package/dist/app/assets/{oz-b_RN2Jum.js → oz-D46TtIuw.js} +1 -1
  180. package/dist/app/assets/{parigp-pi9tW-vJ.js → parigp-BAJyhdut.js} +1 -1
  181. package/dist/app/assets/{parser-BNyoGbdp.js → parser-B-ALvauC.js} +1 -1
  182. package/dist/app/assets/{pascal-CCbBRhEl.js → pascal-B0ap4FDW.js} +1 -1
  183. package/dist/app/assets/{pascaligo-DlAAMoJ9.js → pascaligo-ChOneu9-.js} +1 -1
  184. package/dist/app/assets/{pcaxis-doDt0DKg.js → pcaxis-DTAmxHgs.js} +1 -1
  185. package/dist/app/assets/{peoplecode-C6qORRLy.js → peoplecode-dQfUy8zn.js} +1 -1
  186. package/dist/app/assets/{perl-DYO72X5y.js → perl-CYk00e1Q.js} +1 -1
  187. package/dist/app/assets/{php-DYRzOllS.js → php-DvSqFnSN.js} +1 -1
  188. package/dist/app/assets/{php-extras-CVIKu6Nc.js → php-extras-BFjUbIU6.js} +1 -1
  189. package/dist/app/assets/{phpdoc-BGNfZMOM.js → phpdoc-Di7rKCNL.js} +1 -1
  190. package/dist/app/assets/{plsql-eC13ro-r.js → plsql-dX0-BKqD.js} +1 -1
  191. package/dist/app/assets/{powerquery-Cs0JgpuI.js → powerquery-3xq4KaAs.js} +1 -1
  192. package/dist/app/assets/{powershell-9KYeI4sx.js → powershell-BbXooszO.js} +1 -1
  193. package/dist/app/assets/{processing-HbGRdnnD.js → processing-GWbfNCzH.js} +1 -1
  194. package/dist/app/assets/{prolog-CI3jZdJK.js → prolog-Tb2TbunJ.js} +1 -1
  195. package/dist/app/assets/{promql-D0wREOFk.js → promql-QS8vHhL7.js} +1 -1
  196. package/dist/app/assets/{properties-DgwMsvo5.js → properties-BJ8AWlqX.js} +1 -1
  197. package/dist/app/assets/{protobuf-C1Z09MVB.js → protobuf-De-puAg3.js} +1 -1
  198. package/dist/app/assets/{psl-DpPBMaI5.js → psl-hZft3C8K.js} +1 -1
  199. package/dist/app/assets/{pug-DYaSYILA.js → pug-BcYHdk-i.js} +1 -1
  200. package/dist/app/assets/{puppet-DxCnT5Pj.js → puppet-BWbqDQJD.js} +1 -1
  201. package/dist/app/assets/{pure-CUYh7Ck6.js → pure-Bz2pjTxR.js} +1 -1
  202. package/dist/app/assets/{purebasic-DXQmX2ZG.js → purebasic-BlO48lYx.js} +1 -1
  203. package/dist/app/assets/{purescript-BVZzZ7nk.js → purescript-BxSMm2Br.js} +1 -1
  204. package/dist/app/assets/{q-BMx8_CVm.js → q-DDUTW9aK.js} +1 -1
  205. package/dist/app/assets/{qml-CmeGky21.js → qml-DisOV-LV.js} +1 -1
  206. package/dist/app/assets/{qore-CtP0c7NV.js → qore-FNRP4gBF.js} +1 -1
  207. package/dist/app/assets/{qsharp-BTgQDBC3.js → qsharp-DhtMV0oO.js} +1 -1
  208. package/dist/app/assets/{r-B5-O0rcA.js → r-CyiuHjNN.js} +1 -1
  209. package/dist/app/assets/{racket-CEX4pyKb.js → racket-DFgoSckH.js} +1 -1
  210. package/dist/app/assets/{reason-CqPEmBsx.js → reason-HhYbY7K3.js} +1 -1
  211. package/dist/app/assets/{regex-CQ8JW_Gc.js → regex-jU5TpvM-.js} +1 -1
  212. package/dist/app/assets/{rego-Dt4DHrNq.js → rego-BCjDPrQO.js} +1 -1
  213. package/dist/app/assets/{renpy-ByHKwRX9.js → renpy-BTSgQi2v.js} +1 -1
  214. package/dist/app/assets/{rest-BrStwFnU.js → rest-BLcZ4e-5.js} +1 -1
  215. package/dist/app/assets/{rip-B74P3wJy.js → rip-SltRJnuI.js} +1 -1
  216. package/dist/app/assets/{roboconf-DLUr9EJ1.js → roboconf-B-GZm2Oe.js} +1 -1
  217. package/dist/app/assets/{robotframework-BcuIX9tt.js → robotframework-BOt8S6cX.js} +1 -1
  218. package/dist/app/assets/{ruby-Bi4Wut0d.js → ruby-CVfYH0zM.js} +1 -1
  219. package/dist/app/assets/{rust-CYPSHdmA.js → rust-B6mEp4Sj.js} +1 -1
  220. package/dist/app/assets/{sas-CAUvO4l1.js → sas-DvEI8RJ0.js} +1 -1
  221. package/dist/app/assets/{sass-DzJLJBqu.js → sass-Cv25Jxqq.js} +1 -1
  222. package/dist/app/assets/{scala-CT_n8gZn.js → scala-CyqNr7Uv.js} +1 -1
  223. package/dist/app/assets/{scheme-xujlA_rp.js → scheme-ji0XoXLf.js} +1 -1
  224. package/dist/app/assets/{scss-D8ZDIDQI.js → scss-B7_0neO_.js} +1 -1
  225. package/dist/app/assets/{shell-session-CWbKJyhk.js → shell-session-CqZEoMQD.js} +1 -1
  226. package/dist/app/assets/{smali-Nxfv_vvZ.js → smali-DKSzZYkI.js} +1 -1
  227. package/dist/app/assets/{smalltalk-B--by9ZJ.js → smalltalk-BOA4piuq.js} +1 -1
  228. package/dist/app/assets/{smarty-uT4syL5U.js → smarty-Du99BSgN.js} +1 -1
  229. package/dist/app/assets/{sml-C6x2rWB8.js → sml-BJedIA4B.js} +1 -1
  230. package/dist/app/assets/{solidity-BOJu-utD.js → solidity-DidQwG5Z.js} +1 -1
  231. package/dist/app/assets/{solution-file-ygppTBQ1.js → solution-file-Bx0d9qN8.js} +1 -1
  232. package/dist/app/assets/{soy-Bavjfh30.js → soy-BBLv3Cfa.js} +1 -1
  233. package/dist/app/assets/{sparql-D6GMLoSp.js → sparql-Da5WZKbL.js} +1 -1
  234. package/dist/app/assets/{splunk-spl-BCqeA0zN.js → splunk-spl-DbJKl8So.js} +1 -1
  235. package/dist/app/assets/{sqf-DXFnoJLs.js → sqf-CYrx0jxf.js} +1 -1
  236. package/dist/app/assets/{sql-CDPg3pWi.js → sql-Gv-aOlOf.js} +1 -1
  237. package/dist/app/assets/{squirrel-BzsuTTxA.js → squirrel-FpIGPPw4.js} +1 -1
  238. package/dist/app/assets/{stan-BNSDRY4v.js → stan-Dq001Nrk.js} +1 -1
  239. package/dist/app/assets/{stylus-DylJUx_f.js → stylus-aatfgWwe.js} +1 -1
  240. package/dist/app/assets/{swift-CaIWTpgC.js → swift-pn7VW95d.js} +1 -1
  241. package/dist/app/assets/{systemd-DQnCn8nj.js → systemd-9capsVJ6.js} +1 -1
  242. package/dist/app/assets/{t4-cs-Cq_GwW_Q.js → t4-cs-CKXcczci.js} +1 -1
  243. package/dist/app/assets/{t4-templating-BISgTxam.js → t4-templating-1wTayb8u.js} +1 -1
  244. package/dist/app/assets/{t4-vb-N0GEvIeQ.js → t4-vb-B_O7wBow.js} +1 -1
  245. package/dist/app/assets/{tap-ce-I6CHh.js → tap-D-TV5_gQ.js} +1 -1
  246. package/dist/app/assets/{tcl-C06hBxKf.js → tcl-BaVob1Om.js} +1 -1
  247. package/dist/app/assets/{textile-Cd7PLrV2.js → textile-COMk-HmI.js} +1 -1
  248. package/dist/app/assets/{toml-DB0RMCXU.js → toml-D9NJpArC.js} +1 -1
  249. package/dist/app/assets/{tremor-CxlZCmcC.js → tremor-rCNHwdQL.js} +1 -1
  250. package/dist/app/assets/{tt2-BoO6vEQl.js → tt2-DTDvfOgc.js} +1 -1
  251. package/dist/app/assets/{turtle-TnULjnRa.js → turtle-D8pkqXh1.js} +1 -1
  252. package/dist/app/assets/{twig-C7sH-lah.js → twig-DxSF8gqH.js} +1 -1
  253. package/dist/app/assets/{typescript-zCOOstrs.js → typescript-Caebatmk.js} +1 -1
  254. package/dist/app/assets/{typoscript-yX2bGADB.js → typoscript-B3uk1kES.js} +1 -1
  255. package/dist/app/assets/{unrealscript-Cj-gCXJg.js → unrealscript-ZNoSG8ji.js} +1 -1
  256. package/dist/app/assets/{uorazor-TOQ_u0re.js → uorazor-LekoNNOo.js} +1 -1
  257. package/dist/app/assets/{uri-Pfk8EtIw.js → uri-B8YcIzOv.js} +1 -1
  258. package/dist/app/assets/{v-CLB2o_L5.js → v-6rOne2a0.js} +1 -1
  259. package/dist/app/assets/{vala-PFnq-zMH.js → vala-CjEJEdsP.js} +1 -1
  260. package/dist/app/assets/{vbnet-CeobNUlV.js → vbnet-DBPmBm7_.js} +1 -1
  261. package/dist/app/assets/{velocity-D_oz4NYY.js → velocity-DOooMwL8.js} +1 -1
  262. package/dist/app/assets/{verilog-Bhh7YyoC.js → verilog-Cq0ZocvP.js} +1 -1
  263. package/dist/app/assets/{vhdl-zKh6LXHA.js → vhdl-Dxs_xidb.js} +1 -1
  264. package/dist/app/assets/{vim-CL4YN93-.js → vim-BqsnXwB6.js} +1 -1
  265. package/dist/app/assets/{visual-basic-DNms8NyE.js → visual-basic-zAzjvaqP.js} +1 -1
  266. package/dist/app/assets/{warpscript-5Fq7EzBx.js → warpscript-D9hbfr6_.js} +1 -1
  267. package/dist/app/assets/{wasm-R6qJ-jJ8.js → wasm-C4TU9VDY.js} +1 -1
  268. package/dist/app/assets/{web-idl-Blrz26ym.js → web-idl-DD5JcddQ.js} +1 -1
  269. package/dist/app/assets/{wiki-OeXSqdoS.js → wiki-Des21yVK.js} +1 -1
  270. package/dist/app/assets/{wolfram-C-UD9Kta.js → wolfram-B7enpov1.js} +1 -1
  271. package/dist/app/assets/{wren-Dll3yBh8.js → wren-Rr8h-Ayu.js} +1 -1
  272. package/dist/app/assets/{xeora-DrxHOskN.js → xeora-EjcLXBhx.js} +1 -1
  273. package/dist/app/assets/{xml-doc-Bz3psZDa.js → xml-doc-uaTxx6-m.js} +1 -1
  274. package/dist/app/assets/{xojo-B-FqLlsk.js → xojo-CX6G8nhh.js} +1 -1
  275. package/dist/app/assets/{xquery-CQnqW2mz.js → xquery-DvPb3Uw9.js} +1 -1
  276. package/dist/app/assets/{yaml-jvENsAZR.js → yaml-D-l_Y2hx.js} +1 -1
  277. package/dist/app/assets/{yang-DKQbMmVK.js → yang-KBoIIT4_.js} +1 -1
  278. package/dist/app/assets/{zig-DslIE2kW.js → zig-_uNXp9cY.js} +1 -1
  279. package/dist/app/index.html +2 -2
  280. package/dist/index.cjs +324 -197
  281. package/dist/index.d.cts +24 -1
  282. package/dist/index.d.ts +24 -1
  283. package/dist/index.js +320 -197
  284. package/package.json +3 -3
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  // src/components/chat.tsx
2
- import * as React18 from "react";
2
+ import * as React20 from "react";
3
3
  import { ArrowDown, FileText as FileText2, Loader2 as Loader22, Pencil as Pencil3, RefreshCw as RefreshCw2, X as X2 } from "lucide-react";
4
4
 
5
5
  // src/lib/utils.ts
@@ -8,19 +8,14 @@ import { twMerge } from "tailwind-merge";
8
8
  function cn(...inputs) {
9
9
  return twMerge(clsx(inputs));
10
10
  }
11
- function getRoundedClass(themeRadius) {
12
- switch (themeRadius) {
13
- case "pill":
14
- return "rounded-full";
15
- case "round":
16
- return "rounded-xl";
17
- case "soft":
18
- return "rounded-lg";
19
- case "sharp":
20
- return "rounded-none";
21
- default:
22
- return "rounded-full";
23
- }
11
+ var THEME_RADIUS_PRESET_CLASS = {
12
+ pill: "rounded-full",
13
+ round: "rounded-xl",
14
+ soft: "rounded-lg",
15
+ sharp: "rounded-none"
16
+ };
17
+ function getRoundedClass(themeRadius, fallback = "rounded-full") {
18
+ return themeRadius ? THEME_RADIUS_PRESET_CLASS[themeRadius] : fallback;
24
19
  }
25
20
  function createMessageId() {
26
21
  return globalThis.crypto?.randomUUID?.() ?? `${Date.now().toString(36)}-${Math.random().toString(36).slice(2)}`;
@@ -575,6 +570,10 @@ var en_US_default = {
575
570
  errorToast: "An error occurred. Please try again.",
576
571
  errorLabel: "Error:",
577
572
  langGraphMessages: "LangGraph Messages..."
573
+ },
574
+ message: {
575
+ answer: "Answer",
576
+ reasoning: "Reasoning"
578
577
  }
579
578
  };
580
579
 
@@ -634,6 +633,10 @@ var zh_CN_default = {
634
633
  errorToast: "\u53D1\u751F\u9519\u8BEF\uFF0C\u8BF7\u91CD\u8BD5\u3002",
635
634
  errorLabel: "\u9519\u8BEF\uFF1A",
636
635
  langGraphMessages: "LangGraph \u6D88\u606F..."
636
+ },
637
+ message: {
638
+ answer: "\u56DE\u7B54",
639
+ reasoning: "\u63A8\u7406"
637
640
  }
638
641
  };
639
642
 
@@ -2196,6 +2199,7 @@ function renderContent(content, messageId) {
2196
2199
  return /* @__PURE__ */ jsx19("div", { className: "space-y-3", children: content.map((item, index) => renderContentItem(item, index, messageId)) });
2197
2200
  }
2198
2201
  function AssistantMessage({ message, className, isStreaming = false }) {
2202
+ const { t } = useChatkitTranslation();
2199
2203
  const content = message.content;
2200
2204
  const hasContent = content != null && !(typeof content === "string" && content.trim() === "" || Array.isArray(message.content) && message.content.length === 0);
2201
2205
  const hasReasoning = Array.isArray(message.reasoning) && message.reasoning.some((item) => item.text?.trim());
@@ -2211,8 +2215,8 @@ function AssistantMessage({ message, className, isStreaming = false }) {
2211
2215
  className: "w-full",
2212
2216
  children: [
2213
2217
  /* @__PURE__ */ jsxs8(TabsList, { className: "h-9", children: [
2214
- /* @__PURE__ */ jsx19(TabsTrigger, { value: "answer", children: "Answer" }),
2215
- /* @__PURE__ */ jsx19(TabsTrigger, { value: "reasoning", children: "Reasoning" })
2218
+ /* @__PURE__ */ jsx19(TabsTrigger, { value: "answer", children: t("message.answer") }),
2219
+ /* @__PURE__ */ jsx19(TabsTrigger, { value: "reasoning", children: t("message.reasoning") })
2216
2220
  ] }),
2217
2221
  /* @__PURE__ */ jsx19(TabsContent, { value: "answer", className: "space-y-3", children: answerNode }),
2218
2222
  /* @__PURE__ */ jsx19(TabsContent, { value: "reasoning", className: "space-y-3", children: reasoningNode })
@@ -2338,8 +2342,136 @@ function StartScreen({ startScreen, onPromptClick, className }) {
2338
2342
  ] });
2339
2343
  }
2340
2344
 
2341
- // src/hooks/useThreads.ts
2345
+ // src/components/ui/chatkit-avatar.tsx
2346
+ import "react";
2347
+
2348
+ // src/components/ui/avatar.tsx
2342
2349
  import * as React16 from "react";
2350
+ import * as AvatarPrimitive from "@radix-ui/react-avatar";
2351
+ import { jsx as jsx22 } from "react/jsx-runtime";
2352
+ var Avatar = React16.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx22(
2353
+ AvatarPrimitive.Root,
2354
+ {
2355
+ ref,
2356
+ className: cn(
2357
+ "relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",
2358
+ className
2359
+ ),
2360
+ ...props
2361
+ }
2362
+ ));
2363
+ Avatar.displayName = AvatarPrimitive.Root.displayName;
2364
+ var AvatarImage = React16.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx22(
2365
+ AvatarPrimitive.Image,
2366
+ {
2367
+ ref,
2368
+ className: cn("aspect-square h-full w-full", className),
2369
+ ...props
2370
+ }
2371
+ ));
2372
+ AvatarImage.displayName = AvatarPrimitive.Image.displayName;
2373
+ var AvatarFallback = React16.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx22(
2374
+ AvatarPrimitive.Fallback,
2375
+ {
2376
+ ref,
2377
+ className: cn(
2378
+ "flex h-full w-full items-center justify-center rounded-full bg-muted",
2379
+ className
2380
+ ),
2381
+ ...props
2382
+ }
2383
+ ));
2384
+ AvatarFallback.displayName = AvatarPrimitive.Fallback.displayName;
2385
+
2386
+ // src/components/ui/chatkit-avatar.tsx
2387
+ import { jsx as jsx23, jsxs as jsxs11 } from "react/jsx-runtime";
2388
+ function asRecord(value) {
2389
+ return value && typeof value === "object" ? value : null;
2390
+ }
2391
+ function getNonEmptyString(value) {
2392
+ if (typeof value !== "string") return void 0;
2393
+ const normalized = value.trim();
2394
+ return normalized || void 0;
2395
+ }
2396
+ function unicodeFromUnified(unified) {
2397
+ const normalized = getNonEmptyString(unified);
2398
+ if (!normalized) return void 0;
2399
+ try {
2400
+ return normalized.split("-").map((hex) => String.fromCodePoint(Number.parseInt(hex, 16))).join("");
2401
+ } catch {
2402
+ return void 0;
2403
+ }
2404
+ }
2405
+ function getEmojiCharacter(avatar) {
2406
+ return unicodeFromUnified(avatar?.emoji?.unified);
2407
+ }
2408
+ function getAvatarFallback(label) {
2409
+ return label.trim().charAt(0).toUpperCase() || "A";
2410
+ }
2411
+ function normalizeChatkitAvatar(rawAvatar) {
2412
+ if (typeof rawAvatar === "string") {
2413
+ const url = getNonEmptyString(rawAvatar);
2414
+ return url ? { url } : null;
2415
+ }
2416
+ const avatarRecord = asRecord(rawAvatar);
2417
+ if (!avatarRecord) return null;
2418
+ const emojiRecord = asRecord(avatarRecord.emoji);
2419
+ const avatar = {
2420
+ background: getNonEmptyString(avatarRecord.background),
2421
+ url: getNonEmptyString(avatarRecord.url),
2422
+ useNotoColor: Boolean(avatarRecord.useNotoColor)
2423
+ };
2424
+ if (emojiRecord) {
2425
+ avatar.emoji = {
2426
+ colons: getNonEmptyString(emojiRecord.colons),
2427
+ id: getNonEmptyString(emojiRecord.id),
2428
+ unified: getNonEmptyString(emojiRecord.unified)
2429
+ };
2430
+ }
2431
+ return avatar.url || avatar.background || avatar.emoji?.id || avatar.emoji?.unified ? avatar : null;
2432
+ }
2433
+ function extractAssistantAvatar(assistant) {
2434
+ const assistantRecord = asRecord(assistant);
2435
+ const metadata = asRecord(assistant.metadata);
2436
+ const rawAvatar = assistantRecord?.avatar ?? metadata?.avatar;
2437
+ const avatar = normalizeChatkitAvatar(rawAvatar);
2438
+ if (avatar) return avatar;
2439
+ const metadataAvatar = getNonEmptyString(metadata?.avatarUrl) ?? getNonEmptyString(metadata?.avatar_url);
2440
+ return metadataAvatar ? { url: metadataAvatar } : null;
2441
+ }
2442
+ function ChatkitAvatar({
2443
+ avatar,
2444
+ className,
2445
+ fallback,
2446
+ fallbackClassName,
2447
+ imageClassName,
2448
+ label,
2449
+ style,
2450
+ ...props
2451
+ }) {
2452
+ const { theme } = useTheme();
2453
+ const emojiCharacter = getEmojiCharacter(avatar);
2454
+ const fallbackText = fallback || getAvatarFallback(label);
2455
+ const roundedClass = getRoundedClass(theme.radius);
2456
+ const emojiStyle = avatar?.useNotoColor ? { fontFamily: '"Noto Color Emoji", "Apple Color Emoji", "Segoe UI Emoji", sans-serif' } : void 0;
2457
+ const fallbackStyle = {
2458
+ ...avatar?.background ? { background: avatar.background } : {}
2459
+ };
2460
+ return /* @__PURE__ */ jsxs11(Avatar, { className: cn(roundedClass, className), style, ...props, children: [
2461
+ avatar?.url ? /* @__PURE__ */ jsx23(AvatarImage, { className: imageClassName, src: avatar.url, alt: label }) : null,
2462
+ /* @__PURE__ */ jsx23(
2463
+ AvatarFallback,
2464
+ {
2465
+ className: cn(roundedClass, "text-sm font-medium text-foreground", fallbackClassName),
2466
+ style: fallbackStyle,
2467
+ children: emojiCharacter ? /* @__PURE__ */ jsx23("span", { className: "text-[1.1em] leading-none", style: emojiStyle, children: emojiCharacter }) : fallbackText
2468
+ }
2469
+ )
2470
+ ] });
2471
+ }
2472
+
2473
+ // src/hooks/useThreads.ts
2474
+ import * as React18 from "react";
2343
2475
  var DEFAULT_LIMIT = 50;
2344
2476
  var getThreadTitle = (threadRecord) => {
2345
2477
  const title = threadRecord.title?.trim();
@@ -2377,16 +2509,16 @@ function useThreads(limit = DEFAULT_LIMIT) {
2377
2509
  isReady,
2378
2510
  isLoading: isStreamLoading
2379
2511
  } = useStreamContext();
2380
- const [threadRecords, setThreadRecords] = React16.useState([]);
2381
- const [isLoading, setIsLoading] = React16.useState(false);
2382
- const [error, setError] = React16.useState(null);
2383
- const upsertThreadRecord = React16.useCallback((threadRecord) => {
2512
+ const [threadRecords, setThreadRecords] = React18.useState([]);
2513
+ const [isLoading, setIsLoading] = React18.useState(false);
2514
+ const [error, setError] = React18.useState(null);
2515
+ const upsertThreadRecord = React18.useCallback((threadRecord) => {
2384
2516
  setThreadRecords((prev) => {
2385
2517
  const next = prev.filter((item) => item.id !== threadRecord.id);
2386
2518
  return sortThreadRecords([threadRecord, ...next]);
2387
2519
  });
2388
2520
  }, []);
2389
- const refreshThreads = React16.useCallback(async () => {
2521
+ const refreshThreads = React18.useCallback(async () => {
2390
2522
  setIsLoading(true);
2391
2523
  setError(null);
2392
2524
  try {
@@ -2402,7 +2534,7 @@ function useThreads(limit = DEFAULT_LIMIT) {
2402
2534
  setIsLoading(false);
2403
2535
  }
2404
2536
  }, [client, limit, assistantId]);
2405
- const createThread = React16.useCallback(
2537
+ const createThread = React18.useCallback(
2406
2538
  async (input) => {
2407
2539
  setError(null);
2408
2540
  const payload = {};
@@ -2416,7 +2548,7 @@ function useThreads(limit = DEFAULT_LIMIT) {
2416
2548
  },
2417
2549
  [client, upsertThreadRecord]
2418
2550
  );
2419
- const updateThread = React16.useCallback(
2551
+ const updateThread = React18.useCallback(
2420
2552
  async (recordId, payload) => {
2421
2553
  setError(null);
2422
2554
  const updated = await client.conversations.update(recordId, payload);
@@ -2425,7 +2557,7 @@ function useThreads(limit = DEFAULT_LIMIT) {
2425
2557
  },
2426
2558
  [client, upsertThreadRecord]
2427
2559
  );
2428
- const deleteThread = React16.useCallback(
2560
+ const deleteThread = React18.useCallback(
2429
2561
  async (recordId) => {
2430
2562
  setError(null);
2431
2563
  await client.conversations.delete(recordId);
@@ -2433,11 +2565,11 @@ function useThreads(limit = DEFAULT_LIMIT) {
2433
2565
  },
2434
2566
  [client]
2435
2567
  );
2436
- React16.useEffect(() => {
2568
+ React18.useEffect(() => {
2437
2569
  if (!isReady) return;
2438
2570
  void refreshThreads();
2439
2571
  }, [refreshThreads, isReady]);
2440
- React16.useEffect(() => {
2572
+ React18.useEffect(() => {
2441
2573
  if (!threadId || !isStreamLoading) return;
2442
2574
  const now = (/* @__PURE__ */ new Date()).toISOString();
2443
2575
  setThreadRecords((prev) => {
@@ -2457,7 +2589,7 @@ function useThreads(limit = DEFAULT_LIMIT) {
2457
2589
  return changed ? sortThreadRecords(next) : prev;
2458
2590
  });
2459
2591
  }, [threadId, isStreamLoading]);
2460
- React16.useEffect(() => {
2592
+ React18.useEffect(() => {
2461
2593
  if (!isReady || !threadId || isStreamLoading) return;
2462
2594
  let cancelled = false;
2463
2595
  void client.conversations.search({ where: { threadId }, limit: 1 }).then((result) => {
@@ -2471,7 +2603,7 @@ function useThreads(limit = DEFAULT_LIMIT) {
2471
2603
  cancelled = true;
2472
2604
  };
2473
2605
  }, [client, threadId, upsertThreadRecord, isReady, isStreamLoading]);
2474
- const threads = React16.useMemo(
2606
+ const threads = React18.useMemo(
2475
2607
  () => threadRecords.map((threadRecord) => toThreadItem(threadRecord)),
2476
2608
  [threadRecords]
2477
2609
  );
@@ -2488,10 +2620,10 @@ function useThreads(limit = DEFAULT_LIMIT) {
2488
2620
  }
2489
2621
 
2490
2622
  // src/components/thread/context-usage-indicator.tsx
2491
- import * as React17 from "react";
2623
+ import * as React19 from "react";
2492
2624
 
2493
2625
  // src/components/ui/progress-circle.tsx
2494
- import { jsx as jsx22, jsxs as jsxs11 } from "react/jsx-runtime";
2626
+ import { jsx as jsx24, jsxs as jsxs12 } from "react/jsx-runtime";
2495
2627
  function clamp(input, a, b) {
2496
2628
  return Math.max(Math.min(input, Math.max(a, b)), Math.min(a, b));
2497
2629
  }
@@ -2514,7 +2646,7 @@ var ProgressCircle = ({ value, className, ...restSvgProps }) => {
2514
2646
  return (
2515
2647
  // biome-ignore lint/a11y/useFocusableInteractive: false positive (progress + progressbar are not focusable interactives)
2516
2648
  // biome-ignore lint/nursery/useAriaPropsSupportedByRole: biome rule at odds with mdn docs (presumed nursary bug with rule)
2517
- /* @__PURE__ */ jsxs11(
2649
+ /* @__PURE__ */ jsxs12(
2518
2650
  "svg",
2519
2651
  {
2520
2652
  role: "progressbar",
@@ -2525,8 +2657,8 @@ var ProgressCircle = ({ value, className, ...restSvgProps }) => {
2525
2657
  "aria-valuemax": 100,
2526
2658
  ...restSvgProps,
2527
2659
  children: [
2528
- /* @__PURE__ */ jsx22("circle", { ...commonParams, className: "stroke-current/25" }),
2529
- /* @__PURE__ */ jsx22(
2660
+ /* @__PURE__ */ jsx24("circle", { ...commonParams, className: "stroke-current/25" }),
2661
+ /* @__PURE__ */ jsx24(
2530
2662
  "circle",
2531
2663
  {
2532
2664
  ...commonParams,
@@ -2545,7 +2677,7 @@ var ProgressCircle = ({ value, className, ...restSvgProps }) => {
2545
2677
  };
2546
2678
 
2547
2679
  // src/components/thread/context-usage-indicator.tsx
2548
- import { jsx as jsx23, jsxs as jsxs12 } from "react/jsx-runtime";
2680
+ import { jsx as jsx25, jsxs as jsxs13 } from "react/jsx-runtime";
2549
2681
  var kNumberFormatter = new Intl.NumberFormat("en-US", {
2550
2682
  minimumFractionDigits: 0,
2551
2683
  maximumFractionDigits: 1
@@ -2578,20 +2710,20 @@ function ContextUsageIndicator({
2578
2710
  }) {
2579
2711
  const { t } = useChatkitTranslation();
2580
2712
  const stream = useStreamContext();
2581
- const [maxContextSize, setMaxContextSize] = React17.useState(null);
2582
- const [usedContextSize, setUsedContextSize] = React17.useState(null);
2583
- const [assistantAgentKey, setAssistantAgentKey] = React17.useState(null);
2584
- const latestRealtimeUsageRef = React17.useRef({
2713
+ const [maxContextSize, setMaxContextSize] = React19.useState(null);
2714
+ const [usedContextSize, setUsedContextSize] = React19.useState(null);
2715
+ const [assistantAgentKey, setAssistantAgentKey] = React19.useState(null);
2716
+ const latestRealtimeUsageRef = React19.useRef({
2585
2717
  threadId: null,
2586
2718
  agentKey: null,
2587
2719
  usedTokens: null
2588
2720
  });
2589
- const realtimeUsage = React17.useMemo(
2721
+ const realtimeUsage = React19.useMemo(
2590
2722
  () => getThreadContextUsage(stream.contextUsageByAgentKey, assistantAgentKey),
2591
2723
  [assistantAgentKey, stream.contextUsageByAgentKey]
2592
2724
  );
2593
2725
  const realtimeUsedContextSize = getThreadContextUsageTotalTokens(realtimeUsage);
2594
- React17.useEffect(() => {
2726
+ React19.useEffect(() => {
2595
2727
  if (!stream.client || !stream.assistantId) {
2596
2728
  setMaxContextSize(null);
2597
2729
  setAssistantAgentKey(null);
@@ -2611,18 +2743,18 @@ function ContextUsageIndicator({
2611
2743
  cancelled = true;
2612
2744
  };
2613
2745
  }, [stream.client, stream.assistantId]);
2614
- React17.useEffect(() => {
2746
+ React19.useEffect(() => {
2615
2747
  latestRealtimeUsageRef.current = {
2616
2748
  threadId: stream.threadId ?? null,
2617
2749
  agentKey: assistantAgentKey,
2618
2750
  usedTokens: realtimeUsedContextSize
2619
2751
  };
2620
2752
  }, [assistantAgentKey, realtimeUsedContextSize, stream.threadId]);
2621
- React17.useEffect(() => {
2753
+ React19.useEffect(() => {
2622
2754
  if (realtimeUsedContextSize == null) return;
2623
2755
  setUsedContextSize(realtimeUsedContextSize);
2624
2756
  }, [realtimeUsedContextSize]);
2625
- React17.useEffect(() => {
2757
+ React19.useEffect(() => {
2626
2758
  if (!stream.client) {
2627
2759
  setUsedContextSize(null);
2628
2760
  return;
@@ -2687,8 +2819,8 @@ function ContextUsageIndicator({
2687
2819
  });
2688
2820
  const usageLabelWithSuffix = usageLabel.endsWith(":") ? usageLabel : `${usageLabel}:`;
2689
2821
  const progressClassName = percent >= 90 ? "text-destructive" : percent >= 75 ? "text-amber-500" : "text-primary dark:text-zinc-300";
2690
- return /* @__PURE__ */ jsxs12(Tooltip, { children: [
2691
- /* @__PURE__ */ jsx23(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx23(
2822
+ return /* @__PURE__ */ jsxs13(Tooltip, { children: [
2823
+ /* @__PURE__ */ jsx25(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx25(
2692
2824
  "button",
2693
2825
  {
2694
2826
  type: "button",
@@ -2697,19 +2829,19 @@ function ContextUsageIndicator({
2697
2829
  className
2698
2830
  ),
2699
2831
  "aria-label": `${usageLabelWithSuffix} ${usageFullLabel}. ${usageTokensLabel}`,
2700
- children: /* @__PURE__ */ jsx23(ProgressCircle, { value: percent, className: cn("size-3.5", progressClassName) })
2832
+ children: /* @__PURE__ */ jsx25(ProgressCircle, { value: percent, className: cn("size-3.5", progressClassName) })
2701
2833
  }
2702
2834
  ) }),
2703
- /* @__PURE__ */ jsxs12(TooltipContent, { side: "top", sideOffset: 6, className: "space-y-0.5 px-3 py-2 text-center", children: [
2704
- /* @__PURE__ */ jsx23("div", { className: "text-primary-foreground/70", children: usageLabelWithSuffix }),
2705
- /* @__PURE__ */ jsx23("div", { className: "font-medium text-primary-foreground/80", children: usageFullLabel }),
2706
- /* @__PURE__ */ jsx23("div", { className: "text-sm font-semibold", children: usageTokensLabel })
2835
+ /* @__PURE__ */ jsxs13(TooltipContent, { side: "top", sideOffset: 6, className: "space-y-0.5 px-3 py-2 text-center", children: [
2836
+ /* @__PURE__ */ jsx25("div", { className: "text-primary-foreground/70", children: usageLabelWithSuffix }),
2837
+ /* @__PURE__ */ jsx25("div", { className: "font-medium text-primary-foreground/80", children: usageFullLabel }),
2838
+ /* @__PURE__ */ jsx25("div", { className: "text-sm font-semibold", children: usageTokensLabel })
2707
2839
  ] })
2708
2840
  ] });
2709
2841
  }
2710
2842
 
2711
2843
  // src/components/chat.tsx
2712
- import { Fragment as Fragment3, jsx as jsx24, jsxs as jsxs13 } from "react/jsx-runtime";
2844
+ import { Fragment as Fragment3, jsx as jsx26, jsxs as jsxs14 } from "react/jsx-runtime";
2713
2845
  var defaultApiUrl2 = import.meta.env.VITE_XPERTAI_API_URL;
2714
2846
  function formatMessageContent(content) {
2715
2847
  if (typeof content === "string") {
@@ -2748,16 +2880,17 @@ function Chat({
2748
2880
  const apiUrl = options?.api?.apiUrl || defaultApiUrl2;
2749
2881
  const { setStream } = useStreamManager();
2750
2882
  const stream = useStreamContext();
2751
- const [isHistoryLoading, setIsHistoryLoading] = React18.useState(false);
2752
- const [historyError, setHistoryError] = React18.useState(null);
2753
- const [assistantName, setAssistantName] = React18.useState(null);
2883
+ const [isHistoryLoading, setIsHistoryLoading] = React20.useState(false);
2884
+ const [historyError, setHistoryError] = React20.useState(null);
2885
+ const [assistantName, setAssistantName] = React20.useState(null);
2886
+ const [assistantAvatar, setAssistantAvatar] = React20.useState(null);
2754
2887
  const LOADING_DOTS_MIN_DURATION = 800;
2755
- const [showLoadingDots, setShowLoadingDots] = React18.useState(false);
2756
- const loadingStartTimeRef = React18.useRef(null);
2757
- React18.useEffect(() => {
2888
+ const [showLoadingDots, setShowLoadingDots] = React20.useState(false);
2889
+ const loadingStartTimeRef = React20.useRef(null);
2890
+ React20.useEffect(() => {
2758
2891
  setStream(stream);
2759
2892
  }, [setStream, stream]);
2760
- React18.useEffect(() => {
2893
+ React20.useEffect(() => {
2761
2894
  if (stream.isLoading) {
2762
2895
  if (!loadingStartTimeRef.current) {
2763
2896
  loadingStartTimeRef.current = Date.now();
@@ -2780,48 +2913,48 @@ function Chat({
2780
2913
  }
2781
2914
  }
2782
2915
  }, [stream.isLoading]);
2783
- const [draft, setDraft] = React18.useState("");
2784
- const [selectedTool, setSelectedTool] = React18.useState(null);
2785
- const [attachments, setAttachments] = React18.useState([]);
2786
- const [isAtBottom, setIsAtBottom] = React18.useState(true);
2787
- const [hasUpdatesBelow, setHasUpdatesBelow] = React18.useState(false);
2916
+ const [draft, setDraft] = React20.useState("");
2917
+ const [selectedTool, setSelectedTool] = React20.useState(null);
2918
+ const [attachments, setAttachments] = React20.useState([]);
2919
+ const [isAtBottom, setIsAtBottom] = React20.useState(true);
2920
+ const [hasUpdatesBelow, setHasUpdatesBelow] = React20.useState(false);
2788
2921
  const {
2789
2922
  threads,
2790
2923
  deleteThread,
2791
2924
  refreshThreads,
2792
2925
  isLoading: isThreadsLoading
2793
2926
  } = useThreads();
2794
- const viewportRef = React18.useRef(null);
2795
- const fileInputRef = React18.useRef(null);
2796
- const shouldAutoScrollRef = React18.useRef(true);
2797
- const forceFollowRef = React18.useRef(false);
2798
- const previousMessageCountRef = React18.useRef(0);
2799
- const previousScrollTopRef = React18.useRef(0);
2800
- const autoScrollFrameRef = React18.useRef(null);
2801
- const isPointerDownRef = React18.useRef(false);
2802
- const lastTouchYRef = React18.useRef(null);
2927
+ const viewportRef = React20.useRef(null);
2928
+ const fileInputRef = React20.useRef(null);
2929
+ const shouldAutoScrollRef = React20.useRef(true);
2930
+ const forceFollowRef = React20.useRef(false);
2931
+ const previousMessageCountRef = React20.useRef(0);
2932
+ const previousScrollTopRef = React20.useRef(0);
2933
+ const autoScrollFrameRef = React20.useRef(null);
2934
+ const isPointerDownRef = React20.useRef(false);
2935
+ const lastTouchYRef = React20.useRef(null);
2803
2936
  const resolvedTitle = title ?? t("chat.title");
2804
2937
  const resolvedPlaceholder = placeholder ?? t("chat.placeholder");
2805
2938
  const inputPlaceholder = selectedTool?.placeholderOverride ?? composer?.placeholder ?? resolvedPlaceholder;
2806
- const messages = React18.useMemo(() => stream.messages ?? [], [stream.messages]);
2939
+ const messages = React20.useMemo(() => stream.messages ?? [], [stream.messages]);
2807
2940
  const trimmedDraft = draft.trim();
2808
- const cancelPendingAutoScroll = React18.useCallback(() => {
2941
+ const cancelPendingAutoScroll = React20.useCallback(() => {
2809
2942
  if (autoScrollFrameRef.current !== null) {
2810
2943
  cancelAnimationFrame(autoScrollFrameRef.current);
2811
2944
  autoScrollFrameRef.current = null;
2812
2945
  }
2813
2946
  }, []);
2814
- const disableAutoFollow = React18.useCallback(() => {
2947
+ const disableAutoFollow = React20.useCallback(() => {
2815
2948
  forceFollowRef.current = false;
2816
2949
  shouldAutoScrollRef.current = false;
2817
2950
  cancelPendingAutoScroll();
2818
2951
  }, [cancelPendingAutoScroll]);
2819
- const enableAutoFollow = React18.useCallback(() => {
2952
+ const enableAutoFollow = React20.useCallback(() => {
2820
2953
  forceFollowRef.current = true;
2821
2954
  shouldAutoScrollRef.current = true;
2822
2955
  setHasUpdatesBelow(false);
2823
2956
  }, []);
2824
- const scrollToBottom = React18.useCallback((smooth = false, force = false) => {
2957
+ const scrollToBottom = React20.useCallback((smooth = false, force = false) => {
2825
2958
  if (force) {
2826
2959
  enableAutoFollow();
2827
2960
  }
@@ -2840,7 +2973,7 @@ function Chat({
2840
2973
  }
2841
2974
  });
2842
2975
  }, [cancelPendingAutoScroll, enableAutoFollow]);
2843
- React18.useEffect(() => {
2976
+ React20.useEffect(() => {
2844
2977
  const viewport = viewportRef.current;
2845
2978
  if (!viewport) return;
2846
2979
  previousScrollTopRef.current = viewport.scrollTop;
@@ -2911,14 +3044,14 @@ function Chat({
2911
3044
  window.removeEventListener("pointercancel", stopPointerTracking);
2912
3045
  };
2913
3046
  }, [cancelPendingAutoScroll, disableAutoFollow]);
2914
- React18.useEffect(() => {
3047
+ React20.useEffect(() => {
2915
3048
  shouldAutoScrollRef.current = true;
2916
3049
  forceFollowRef.current = false;
2917
3050
  previousScrollTopRef.current = 0;
2918
3051
  setIsAtBottom(true);
2919
3052
  setHasUpdatesBelow(false);
2920
3053
  }, [stream.threadId]);
2921
- React18.useEffect(() => {
3054
+ React20.useEffect(() => {
2922
3055
  const messageCountChanged = messages.length !== previousMessageCountRef.current;
2923
3056
  previousMessageCountRef.current = messages.length;
2924
3057
  if (!shouldAutoScrollRef.current) {
@@ -2937,19 +3070,32 @@ function Chat({
2937
3070
  const showMissingConfig = !isClientSecretInitializing && missingConfig;
2938
3071
  const hasUploadingFiles = attachments.some((a) => a.status === "uploading");
2939
3072
  const isSendDisabled = !trimmedDraft || stream.isLoading || missingConfig || isHistoryLoading || hasUploadingFiles;
2940
- React18.useEffect(() => {
3073
+ React20.useEffect(() => {
2941
3074
  if (missingConfig) return;
2942
3075
  void refreshThreads();
2943
3076
  }, [missingConfig, refreshThreads]);
2944
- React18.useEffect(() => {
2945
- if (missingConfig || !stream.client || !stream.assistantId) return;
3077
+ React20.useEffect(() => {
3078
+ if (missingConfig || !stream.client || !stream.assistantId) {
3079
+ setAssistantName(null);
3080
+ setAssistantAvatar(null);
3081
+ return;
3082
+ }
3083
+ setAssistantName(null);
3084
+ setAssistantAvatar(null);
3085
+ let cancelled = false;
2946
3086
  stream.client.assistants.get(stream.assistantId).then((assistant) => {
2947
- if (assistant) {
2948
- setAssistantName(assistant.metadata?.title || assistant.name);
2949
- }
3087
+ if (cancelled || !assistant) return;
3088
+ const assistantTitle2 = typeof assistant.metadata?.title === "string" && assistant.metadata.title.trim() ? assistant.metadata.title : assistant.name;
3089
+ setAssistantName(assistantTitle2);
3090
+ setAssistantAvatar(extractAssistantAvatar(assistant));
2950
3091
  }).catch((err) => {
3092
+ if (cancelled) return;
3093
+ setAssistantAvatar(null);
2951
3094
  console.warn("[Chat] Failed to load assistant info:", err);
2952
3095
  });
3096
+ return () => {
3097
+ cancelled = true;
3098
+ };
2953
3099
  }, [missingConfig, stream.client, stream.assistantId]);
2954
3100
  const uploadedFiles = attachments.filter((a) => a.status === "success" && a.storageFile).map((a) => ({
2955
3101
  id: a.storageFile?.id,
@@ -3003,7 +3149,7 @@ function Chat({
3003
3149
  const handleAttachmentClick = () => {
3004
3150
  fileInputRef.current?.click();
3005
3151
  };
3006
- const uploadFile = React18.useCallback(async (localId, file) => {
3152
+ const uploadFile = React20.useCallback(async (localId, file) => {
3007
3153
  try {
3008
3154
  const result = await stream.client.contexts.uploadFile(file);
3009
3155
  setAttachments(
@@ -3023,7 +3169,7 @@ function Chat({
3023
3169
  );
3024
3170
  }
3025
3171
  }, [stream.client]);
3026
- const handleRetryUpload = React18.useCallback((localId) => {
3172
+ const handleRetryUpload = React20.useCallback((localId) => {
3027
3173
  const attachment = attachments.find((a) => a.localId === localId);
3028
3174
  if (!attachment || attachment.status !== "error") return;
3029
3175
  setAttachments(
@@ -3098,7 +3244,7 @@ function Chat({
3098
3244
  );
3099
3245
  scrollToBottom(true, true);
3100
3246
  };
3101
- const loadConversationMessages = React18.useCallback(
3247
+ const loadConversationMessages = React20.useCallback(
3102
3248
  async (recordId) => {
3103
3249
  if (missingConfig) {
3104
3250
  setHistoryError(t("chat.missingConfigShort"));
@@ -3180,17 +3326,18 @@ function Chat({
3180
3326
  }
3181
3327
  };
3182
3328
  const acceptMimes = composer?.attachments?.accept ? Object.entries(composer.attachments.accept).map(([mime, exts]) => [mime, ...exts.map((e) => `.${e}`)].join(",")).join(",") : void 0;
3183
- const currentThread = React18.useMemo(
3329
+ const currentThread = React20.useMemo(
3184
3330
  () => threads.find((item) => item.id === stream.threadId),
3185
3331
  [threads, stream.threadId]
3186
3332
  );
3187
3333
  const errorMessage = stream.error instanceof Error ? stream.error.message : void 0;
3188
- const threadErrorMessage = React18.useMemo(() => {
3334
+ const threadErrorMessage = React20.useMemo(() => {
3189
3335
  if (currentThread?.status !== "error") return void 0;
3190
3336
  const message = currentThread.error?.trim();
3191
3337
  return message || t("thread.errorToast");
3192
3338
  }, [currentThread, t]);
3193
- return /* @__PURE__ */ jsxs13(
3339
+ const assistantTitle = assistantName || resolvedTitle;
3340
+ return /* @__PURE__ */ jsxs14(
3194
3341
  "div",
3195
3342
  {
3196
3343
  ref: viewportRef,
@@ -3199,16 +3346,26 @@ function Chat({
3199
3346
  className
3200
3347
  ),
3201
3348
  children: [
3202
- /* @__PURE__ */ jsxs13("div", { className: "flex items-center justify-between border-b px-4 py-2 sticky top-0 z-10 bg-background", children: [
3203
- /* @__PURE__ */ jsxs13("div", { className: "flex items-center gap-3", children: [
3204
- /* @__PURE__ */ jsx24("div", { className: "h-2 w-2 rounded-full bg-green-500" }),
3205
- /* @__PURE__ */ jsxs13("div", { children: [
3206
- /* @__PURE__ */ jsx24("h2", { className: "text-lg font-semibold", children: assistantName || resolvedTitle }),
3207
- /* @__PURE__ */ jsx24("p", { className: "text-xs text-muted-foreground", children: t("chat.statusOnline") })
3349
+ /* @__PURE__ */ jsxs14("div", { className: "flex items-center justify-between border-b p-2 sticky top-0 z-10 bg-background", children: [
3350
+ /* @__PURE__ */ jsxs14("div", { className: "flex items-center gap-3 overflow-hidden", children: [
3351
+ /* @__PURE__ */ jsxs14("div", { className: "relative shrink-0", children: [
3352
+ /* @__PURE__ */ jsx26(
3353
+ ChatkitAvatar,
3354
+ {
3355
+ avatar: assistantAvatar,
3356
+ className: "h-9 w-9 border border-border/60",
3357
+ label: assistantTitle
3358
+ }
3359
+ ),
3360
+ /* @__PURE__ */ jsx26("span", { className: "absolute bottom-0 right-0 h-2.5 w-2.5 rounded-full border-2 border-background bg-green-500" })
3361
+ ] }),
3362
+ /* @__PURE__ */ jsxs14("div", { className: "truncate", children: [
3363
+ /* @__PURE__ */ jsx26("h2", { className: "text-lg font-semibold truncate", title: assistantTitle, children: assistantTitle }),
3364
+ /* @__PURE__ */ jsx26("p", { className: "text-xs text-muted-foreground", children: t("chat.statusOnline") })
3208
3365
  ] })
3209
3366
  ] }),
3210
- history?.enabled !== false && /* @__PURE__ */ jsxs13("div", { className: "flex items-center gap-1", children: [
3211
- /* @__PURE__ */ jsx24(
3367
+ history?.enabled !== false && /* @__PURE__ */ jsxs14("div", { className: "flex items-center gap-1", children: [
3368
+ /* @__PURE__ */ jsx26(
3212
3369
  "button",
3213
3370
  {
3214
3371
  type: "button",
@@ -3221,10 +3378,10 @@ function Chat({
3221
3378
  "disabled:opacity-50 disabled:cursor-not-allowed"
3222
3379
  ),
3223
3380
  title: t("history.newThread"),
3224
- children: /* @__PURE__ */ jsx24(Pencil3, { size: 16 })
3381
+ children: /* @__PURE__ */ jsx26(Pencil3, { size: 16 })
3225
3382
  }
3226
3383
  ),
3227
- /* @__PURE__ */ jsx24(
3384
+ /* @__PURE__ */ jsx26(
3228
3385
  HistorySidebar,
3229
3386
  {
3230
3387
  threads,
@@ -3238,23 +3395,23 @@ function Chat({
3238
3395
  )
3239
3396
  ] })
3240
3397
  ] }),
3241
- /* @__PURE__ */ jsxs13("div", { className: "flex-1 p-4", children: [
3242
- errorMessage && /* @__PURE__ */ jsx24("div", { className: "mb-4 rounded-lg border border-destructive/30 bg-destructive/10 px-3 py-2 text-sm text-destructive", children: errorMessage }),
3243
- historyError && /* @__PURE__ */ jsx24("div", { className: "mb-4 rounded-lg border border-amber-200 bg-amber-50 px-3 py-2 text-sm text-amber-900", children: historyError }),
3244
- showMissingConfig && /* @__PURE__ */ jsx24("div", { className: "mb-4 rounded-lg border border-amber-200 bg-amber-50 px-3 py-2 text-sm text-amber-900", children: t("chat.missingConfigDetail") }),
3245
- isHistoryLoading && /* @__PURE__ */ jsx24("div", { className: "mb-4 rounded-lg border border-muted px-3 py-2 text-sm text-muted-foreground", children: t("chat.loadingThread") }),
3246
- messages.length === 0 ? /* @__PURE__ */ jsx24(
3398
+ /* @__PURE__ */ jsxs14("div", { className: "flex-1 p-4", children: [
3399
+ errorMessage && /* @__PURE__ */ jsx26("div", { className: "mb-4 rounded-lg border border-destructive/30 bg-destructive/10 px-3 py-2 text-sm text-destructive", children: errorMessage }),
3400
+ historyError && /* @__PURE__ */ jsx26("div", { className: "mb-4 rounded-lg border border-amber-200 bg-amber-50 px-3 py-2 text-sm text-amber-900", children: historyError }),
3401
+ showMissingConfig && /* @__PURE__ */ jsx26("div", { className: "mb-4 rounded-lg border border-amber-200 bg-amber-50 px-3 py-2 text-sm text-amber-900", children: t("chat.missingConfigDetail") }),
3402
+ isHistoryLoading && /* @__PURE__ */ jsx26("div", { className: "mb-4 rounded-lg border border-muted px-3 py-2 text-sm text-muted-foreground", children: t("chat.loadingThread") }),
3403
+ messages.length === 0 ? /* @__PURE__ */ jsx26(
3247
3404
  StartScreen,
3248
3405
  {
3249
3406
  startScreen,
3250
3407
  onPromptClick: handlePromptClick
3251
3408
  }
3252
- ) : /* @__PURE__ */ jsxs13("div", { className: "space-y-4", children: [
3409
+ ) : /* @__PURE__ */ jsxs14("div", { className: "space-y-4", children: [
3253
3410
  messages.map((message, index) => {
3254
3411
  const messageType = String(message.type);
3255
3412
  const isAssistantMessage = messageType === "assistant" || messageType === "ai";
3256
3413
  const messageContent = typeof message.content === "string" ? message.content : Array.isArray(message.content) ? message.content.map((part) => formatMessageContent(part)).join("") : formatMessageContent(message.content);
3257
- return /* @__PURE__ */ jsx24(
3414
+ return /* @__PURE__ */ jsx26(
3258
3415
  "div",
3259
3416
  {
3260
3417
  className: cn(
@@ -3262,8 +3419,8 @@ function Chat({
3262
3419
  message.type === "human" ? "justify-end" : "justify-start -ml-1"
3263
3420
  // AI messages: slightly closer to left
3264
3421
  ),
3265
- children: /* @__PURE__ */ jsxs13("div", { className: "flex flex-col px-3 overflow-hidden", children: [
3266
- /* @__PURE__ */ jsx24(
3422
+ children: /* @__PURE__ */ jsxs14("div", { className: "flex flex-col px-3 overflow-hidden", children: [
3423
+ /* @__PURE__ */ jsx26(
3267
3424
  "div",
3268
3425
  {
3269
3426
  className: cn(
@@ -3271,7 +3428,7 @@ function Chat({
3271
3428
  message.type === "human" ? "bg-primary text-primary-foreground px-4 py-2.5" : message.type === "system" ? "bg-muted text-muted-foreground text-xs px-4 py-2.5" : "py-1 text-chat-foreground"
3272
3429
  // AI messages: use chat-specific foreground color
3273
3430
  ),
3274
- children: isAssistantMessage ? /* @__PURE__ */ jsx24(
3431
+ children: isAssistantMessage ? /* @__PURE__ */ jsx26(
3275
3432
  AssistantMessage,
3276
3433
  {
3277
3434
  message: {
@@ -3280,30 +3437,30 @@ function Chat({
3280
3437
  },
3281
3438
  isStreaming: stream.isLoading && index === messages.length - 1
3282
3439
  }
3283
- ) : /* @__PURE__ */ jsxs13(Fragment3, { children: [
3284
- message.type === "human" && message.attachments?.length > 0 && /* @__PURE__ */ jsx24("div", { className: "flex flex-wrap gap-1.5 mb-2", children: message.attachments.map((file, fileIndex) => /* @__PURE__ */ jsxs13(
3440
+ ) : /* @__PURE__ */ jsxs14(Fragment3, { children: [
3441
+ message.type === "human" && message.attachments?.length > 0 && /* @__PURE__ */ jsx26("div", { className: "flex flex-wrap gap-1.5 mb-2", children: message.attachments.map((file, fileIndex) => /* @__PURE__ */ jsxs14(
3285
3442
  "div",
3286
3443
  {
3287
3444
  className: "flex items-center gap-1.5 rounded-md bg-primary-foreground/20 px-2 py-1 text-xs",
3288
3445
  children: [
3289
- /* @__PURE__ */ jsx24(FileText2, { size: 12 }),
3290
- /* @__PURE__ */ jsx24("span", { className: "max-w-[100px] truncate", children: file.originalName })
3446
+ /* @__PURE__ */ jsx26(FileText2, { size: 12 }),
3447
+ /* @__PURE__ */ jsx26("span", { className: "max-w-[100px] truncate", children: file.originalName })
3291
3448
  ]
3292
3449
  },
3293
3450
  fileIndex
3294
3451
  )) }),
3295
- Array.isArray(message.content) ? message.content.map((part, partIndex) => /* @__PURE__ */ jsx24(
3452
+ Array.isArray(message.content) ? message.content.map((part, partIndex) => /* @__PURE__ */ jsx26(
3296
3453
  "p",
3297
3454
  {
3298
3455
  className: "wrap-break-word text-sm leading-relaxed",
3299
3456
  children: formatMessageContent(part)
3300
3457
  },
3301
3458
  `${part.type}-${partIndex}`
3302
- )) : /* @__PURE__ */ jsx24("span", { className: "wrap-break-word text-sm leading-relaxed", children: formatMessageContent(message.content) })
3459
+ )) : /* @__PURE__ */ jsx26("span", { className: "wrap-break-word text-sm leading-relaxed", children: formatMessageContent(message.content) })
3303
3460
  ] })
3304
3461
  }
3305
3462
  ),
3306
- /* @__PURE__ */ jsx24(
3463
+ /* @__PURE__ */ jsx26(
3307
3464
  MessageActions,
3308
3465
  {
3309
3466
  content: messageContent,
@@ -3324,15 +3481,15 @@ function Chat({
3324
3481
  const lastMsgContent = lastMessage?.content;
3325
3482
  const hasSubstantialContent = isLastMessageFromAI && (typeof lastMsgContent === "string" && lastMsgContent.length > 10 || Array.isArray(lastMsgContent) && lastMsgContent.length > 0);
3326
3483
  if (hasSubstantialContent) return null;
3327
- return /* @__PURE__ */ jsx24("div", { className: "flex justify-start gap-3 -ml-2", children: /* @__PURE__ */ jsx24("div", { className: "max-w-full rounded-2xl py-2.5", children: /* @__PURE__ */ jsxs13("div", { className: "flex gap-1.5", children: [
3328
- /* @__PURE__ */ jsx24("div", { className: "h-2 w-2 animate-bounce rounded-full bg-muted-foreground/60 [animation-delay:-0.3s]" }),
3329
- /* @__PURE__ */ jsx24("div", { className: "h-2 w-2 animate-bounce rounded-full bg-muted-foreground/60 [animation-delay:-0.15s]" }),
3330
- /* @__PURE__ */ jsx24("div", { className: "h-2 w-2 animate-bounce rounded-full bg-muted-foreground/60" })
3484
+ return /* @__PURE__ */ jsx26("div", { className: "flex justify-start gap-3 -ml-2", children: /* @__PURE__ */ jsx26("div", { className: "max-w-full rounded-2xl py-2.5", children: /* @__PURE__ */ jsxs14("div", { className: "flex gap-1.5", children: [
3485
+ /* @__PURE__ */ jsx26("div", { className: "h-2 w-2 animate-bounce rounded-full bg-muted-foreground/60 [animation-delay:-0.3s]" }),
3486
+ /* @__PURE__ */ jsx26("div", { className: "h-2 w-2 animate-bounce rounded-full bg-muted-foreground/60 [animation-delay:-0.15s]" }),
3487
+ /* @__PURE__ */ jsx26("div", { className: "h-2 w-2 animate-bounce rounded-full bg-muted-foreground/60" })
3331
3488
  ] }) }) });
3332
3489
  })()
3333
3490
  ] })
3334
3491
  ] }),
3335
- !isAtBottom && messages.length > 0 && /* @__PURE__ */ jsx24("div", { className: "sticky bottom-20 z-20 flex justify-center px-4 pointer-events-none", children: /* @__PURE__ */ jsx24(
3492
+ !isAtBottom && messages.length > 0 && /* @__PURE__ */ jsx26("div", { className: "sticky bottom-20 z-20 flex justify-center px-4 pointer-events-none", children: /* @__PURE__ */ jsx26(
3336
3493
  Button,
3337
3494
  {
3338
3495
  type: "button",
@@ -3345,12 +3502,12 @@ function Chat({
3345
3502
  onClick: () => scrollToBottom(true, true),
3346
3503
  "aria-label": t("chat.scrollToBottom"),
3347
3504
  title: t("chat.scrollToBottom"),
3348
- children: /* @__PURE__ */ jsx24(ArrowDown, { size: 16 })
3505
+ children: /* @__PURE__ */ jsx26(ArrowDown, { size: 16 })
3349
3506
  }
3350
3507
  ) }),
3351
- /* @__PURE__ */ jsxs13("div", { className: "p-2 sticky bottom-0 z-10 bg-background", children: [
3352
- threadErrorMessage && /* @__PURE__ */ jsx24("div", { className: "mb-3 rounded-lg border border-destructive/30 bg-destructive/10 px-3 py-2 text-sm text-destructive", children: threadErrorMessage }),
3353
- /* @__PURE__ */ jsx24(
3508
+ /* @__PURE__ */ jsxs14("div", { className: "p-2 sticky bottom-0 z-10 bg-background", children: [
3509
+ threadErrorMessage && /* @__PURE__ */ jsx26("div", { className: "mb-3 rounded-lg border border-destructive/30 bg-destructive/10 px-3 py-2 text-sm text-destructive", children: threadErrorMessage }),
3510
+ /* @__PURE__ */ jsx26(
3354
3511
  "input",
3355
3512
  {
3356
3513
  ref: fileInputRef,
@@ -3361,7 +3518,7 @@ function Chat({
3361
3518
  className: "hidden"
3362
3519
  }
3363
3520
  ),
3364
- attachments.length > 0 && /* @__PURE__ */ jsx24("div", { className: "mb-3 flex flex-wrap gap-2", children: attachments.map((item) => /* @__PURE__ */ jsxs13(
3521
+ attachments.length > 0 && /* @__PURE__ */ jsx26("div", { className: "mb-3 flex flex-wrap gap-2", children: attachments.map((item) => /* @__PURE__ */ jsxs14(
3365
3522
  "div",
3366
3523
  {
3367
3524
  className: cn(
@@ -3369,24 +3526,24 @@ function Chat({
3369
3526
  item.status === "error" ? "bg-destructive/10 border border-destructive/30" : "bg-muted"
3370
3527
  ),
3371
3528
  children: [
3372
- item.status === "uploading" && /* @__PURE__ */ jsx24(Loader22, { size: 14, className: "animate-spin text-muted-foreground" }),
3373
- item.status === "success" && /* @__PURE__ */ jsx24(FileText2, { size: 14, className: "text-muted-foreground" }),
3374
- item.status === "error" && /* @__PURE__ */ jsx24(FileText2, { size: 14, className: "text-destructive" }),
3375
- /* @__PURE__ */ jsx24("span", { className: cn(
3529
+ item.status === "uploading" && /* @__PURE__ */ jsx26(Loader22, { size: 14, className: "animate-spin text-muted-foreground" }),
3530
+ item.status === "success" && /* @__PURE__ */ jsx26(FileText2, { size: 14, className: "text-muted-foreground" }),
3531
+ item.status === "error" && /* @__PURE__ */ jsx26(FileText2, { size: 14, className: "text-destructive" }),
3532
+ /* @__PURE__ */ jsx26("span", { className: cn(
3376
3533
  "max-w-30 truncate",
3377
3534
  item.status === "error" && "text-destructive"
3378
3535
  ), children: item.file.name }),
3379
- item.status === "error" && /* @__PURE__ */ jsx24(
3536
+ item.status === "error" && /* @__PURE__ */ jsx26(
3380
3537
  "button",
3381
3538
  {
3382
3539
  type: "button",
3383
3540
  onClick: () => handleRetryUpload(item.localId),
3384
3541
  className: "ml-1 rounded-full p-0.5 text-destructive hover:bg-destructive/20",
3385
3542
  title: t("chat.retryUpload"),
3386
- children: /* @__PURE__ */ jsx24(RefreshCw2, { size: 12 })
3543
+ children: /* @__PURE__ */ jsx26(RefreshCw2, { size: 12 })
3387
3544
  }
3388
3545
  ),
3389
- /* @__PURE__ */ jsx24(
3546
+ /* @__PURE__ */ jsx26(
3390
3547
  "button",
3391
3548
  {
3392
3549
  type: "button",
@@ -3395,26 +3552,26 @@ function Chat({
3395
3552
  "ml-1 rounded-full p-0.5",
3396
3553
  item.status === "error" ? "text-destructive hover:bg-destructive/20" : "hover:bg-muted-foreground/20"
3397
3554
  ),
3398
- children: /* @__PURE__ */ jsx24(X2, { size: 12 })
3555
+ children: /* @__PURE__ */ jsx26(X2, { size: 12 })
3399
3556
  }
3400
3557
  )
3401
3558
  ]
3402
3559
  },
3403
3560
  item.localId
3404
3561
  )) }),
3405
- selectedTool && /* @__PURE__ */ jsxs13("div", { className: "mb-2 flex items-center gap-2", children: [
3406
- /* @__PURE__ */ jsx24("span", { className: "rounded-full bg-primary/10 px-2 py-0.5 text-xs font-medium text-primary", children: selectedTool.shortLabel ?? selectedTool.label }),
3407
- /* @__PURE__ */ jsx24(
3562
+ selectedTool && /* @__PURE__ */ jsxs14("div", { className: "mb-2 flex items-center gap-2", children: [
3563
+ /* @__PURE__ */ jsx26("span", { className: "rounded-full bg-primary/10 px-2 py-0.5 text-xs font-medium text-primary", children: selectedTool.shortLabel ?? selectedTool.label }),
3564
+ /* @__PURE__ */ jsx26(
3408
3565
  "button",
3409
3566
  {
3410
3567
  type: "button",
3411
3568
  onClick: () => setSelectedTool(null),
3412
3569
  className: "rounded-full p-0.5 text-muted-foreground hover:bg-muted",
3413
- children: /* @__PURE__ */ jsx24(X2, { size: 12 })
3570
+ children: /* @__PURE__ */ jsx26(X2, { size: 12 })
3414
3571
  }
3415
3572
  )
3416
3573
  ] }),
3417
- /* @__PURE__ */ jsx24("form", { className: "flex items-center", onSubmit: handleSubmit, children: /* @__PURE__ */ jsxs13(
3574
+ /* @__PURE__ */ jsx26("form", { className: "flex items-center", onSubmit: handleSubmit, children: /* @__PURE__ */ jsxs14(
3418
3575
  "div",
3419
3576
  {
3420
3577
  className: cn(
@@ -3425,7 +3582,7 @@ function Chat({
3425
3582
  "transition-shadow duration-200"
3426
3583
  ),
3427
3584
  children: [
3428
- /* @__PURE__ */ jsx24(
3585
+ /* @__PURE__ */ jsx26(
3429
3586
  ComposerMenu,
3430
3587
  {
3431
3588
  composer,
@@ -3435,7 +3592,7 @@ function Chat({
3435
3592
  disabled: stream.isLoading || missingConfig || isHistoryLoading
3436
3593
  }
3437
3594
  ),
3438
- /* @__PURE__ */ jsx24(
3595
+ /* @__PURE__ */ jsx26(
3439
3596
  "input",
3440
3597
  {
3441
3598
  type: "text",
@@ -3451,7 +3608,7 @@ function Chat({
3451
3608
  autoComplete: "off"
3452
3609
  }
3453
3610
  ),
3454
- /* @__PURE__ */ jsx24(
3611
+ /* @__PURE__ */ jsx26(
3455
3612
  SendButton,
3456
3613
  {
3457
3614
  disabled: isSendDisabled,
@@ -3464,7 +3621,7 @@ function Chat({
3464
3621
  ]
3465
3622
  }
3466
3623
  ) }),
3467
- disclaimer?.text && /* @__PURE__ */ jsx24(
3624
+ disclaimer?.text && /* @__PURE__ */ jsx26(
3468
3625
  "p",
3469
3626
  {
3470
3627
  className: cn(
@@ -3474,9 +3631,9 @@ function Chat({
3474
3631
  children: disclaimer.text
3475
3632
  }
3476
3633
  ),
3477
- /* @__PURE__ */ jsxs13("div", { className: "mt-2 flex items-center justify-center gap-2 text-xs text-muted-foreground", children: [
3478
- /* @__PURE__ */ jsx24("span", { children: t("chat.poweredBy") }),
3479
- /* @__PURE__ */ jsx24(ContextUsageIndicator, { className: "absolute right-4" })
3634
+ /* @__PURE__ */ jsxs14("div", { className: "mt-2 flex items-center justify-center gap-2 text-xs text-muted-foreground", children: [
3635
+ /* @__PURE__ */ jsx26("span", { children: t("chat.poweredBy") }),
3636
+ /* @__PURE__ */ jsx26(ContextUsageIndicator, { className: "absolute right-4" })
3480
3637
  ] })
3481
3638
  ] })
3482
3639
  ]
@@ -3485,11 +3642,11 @@ function Chat({
3485
3642
  }
3486
3643
 
3487
3644
  // src/components/ui/input.tsx
3488
- import * as React19 from "react";
3489
- import { jsx as jsx25 } from "react/jsx-runtime";
3490
- var Input = React19.forwardRef(
3645
+ import * as React21 from "react";
3646
+ import { jsx as jsx27 } from "react/jsx-runtime";
3647
+ var Input = React21.forwardRef(
3491
3648
  ({ className, type, ...props }, ref) => {
3492
- return /* @__PURE__ */ jsx25(
3649
+ return /* @__PURE__ */ jsx27(
3493
3650
  "input",
3494
3651
  {
3495
3652
  ref,
@@ -3505,49 +3662,11 @@ var Input = React19.forwardRef(
3505
3662
  );
3506
3663
  Input.displayName = "Input";
3507
3664
 
3508
- // src/components/ui/avatar.tsx
3509
- import * as React20 from "react";
3510
- import * as AvatarPrimitive from "@radix-ui/react-avatar";
3511
- import { jsx as jsx26 } from "react/jsx-runtime";
3512
- var Avatar = React20.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx26(
3513
- AvatarPrimitive.Root,
3514
- {
3515
- ref,
3516
- className: cn(
3517
- "relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",
3518
- className
3519
- ),
3520
- ...props
3521
- }
3522
- ));
3523
- Avatar.displayName = AvatarPrimitive.Root.displayName;
3524
- var AvatarImage = React20.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx26(
3525
- AvatarPrimitive.Image,
3526
- {
3527
- ref,
3528
- className: cn("aspect-square h-full w-full", className),
3529
- ...props
3530
- }
3531
- ));
3532
- AvatarImage.displayName = AvatarPrimitive.Image.displayName;
3533
- var AvatarFallback = React20.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx26(
3534
- AvatarPrimitive.Fallback,
3535
- {
3536
- ref,
3537
- className: cn(
3538
- "flex h-full w-full items-center justify-center rounded-full bg-muted",
3539
- className
3540
- ),
3541
- ...props
3542
- }
3543
- ));
3544
- AvatarFallback.displayName = AvatarPrimitive.Fallback.displayName;
3545
-
3546
3665
  // src/components/ui/separator.tsx
3547
- import * as React21 from "react";
3548
- import { jsx as jsx27 } from "react/jsx-runtime";
3549
- var Separator = React21.forwardRef(
3550
- ({ className, orientation = "horizontal", ...props }, ref) => /* @__PURE__ */ jsx27(
3666
+ import * as React22 from "react";
3667
+ import { jsx as jsx28 } from "react/jsx-runtime";
3668
+ var Separator = React22.forwardRef(
3669
+ ({ className, orientation = "horizontal", ...props }, ref) => /* @__PURE__ */ jsx28(
3551
3670
  "div",
3552
3671
  {
3553
3672
  ref,
@@ -3577,6 +3696,7 @@ export {
3577
3696
  CardHeader,
3578
3697
  CardTitle,
3579
3698
  Chat,
3699
+ ChatkitAvatar,
3580
3700
  Input,
3581
3701
  ParentMessengerProvider,
3582
3702
  ScrollArea,
@@ -3588,7 +3708,10 @@ export {
3588
3708
  TabsTrigger,
3589
3709
  ThemeProvider,
3590
3710
  supportedLocales as chatkitSupportedLocales,
3711
+ extractAssistantAvatar,
3712
+ getAvatarFallback,
3591
3713
  getLanguage as getChatkitLanguage,
3714
+ normalizeChatkitAvatar,
3592
3715
  setLanguage as setChatkitLanguage,
3593
3716
  useParentMessenger,
3594
3717
  useTheme