@xpert-ai/chatkit-ui 0.0.17 → 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-Bwwc_1gv.js → abap-CabZ0vYL.js} +1 -1
  2. package/dist/app/assets/{abnf-B2dNcP9G.js → abnf-CPoubvVG.js} +1 -1
  3. package/dist/app/assets/{actionscript-CXHQ00sX.js → actionscript-CL1BPQFv.js} +1 -1
  4. package/dist/app/assets/{ada-CqG-JVlv.js → ada-BOt55oS4.js} +1 -1
  5. package/dist/app/assets/{agda-B17H_65R.js → agda-DKyUkxie.js} +1 -1
  6. package/dist/app/assets/{al-DZ1np1rt.js → al-Jnhqb7P-.js} +1 -1
  7. package/dist/app/assets/{antlr4-C8q5KPBn.js → antlr4-BeT3YbbK.js} +1 -1
  8. package/dist/app/assets/{apacheconf-ChkcfFbQ.js → apacheconf-Ck_DRZXY.js} +1 -1
  9. package/dist/app/assets/{apex-BH4E_dsM.js → apex-CPjbO0O4.js} +1 -1
  10. package/dist/app/assets/{apl-CrQcdvRs.js → apl-Ccs4_jOU.js} +1 -1
  11. package/dist/app/assets/{applescript-cM7xSTOK.js → applescript-C6i7vo8F.js} +1 -1
  12. package/dist/app/assets/{aql-CUr96LHI.js → aql-D3ZWY-VL.js} +1 -1
  13. package/dist/app/assets/{arduino-Cxfmugkq.js → arduino-xTj3TTXg.js} +1 -1
  14. package/dist/app/assets/{arff-BUd5n8om.js → arff-BOuVccGR.js} +1 -1
  15. package/dist/app/assets/{asciidoc-DXG-Il5x.js → asciidoc-BmShvnn0.js} +1 -1
  16. package/dist/app/assets/{asm6502-CGctLvPd.js → asm6502-6FWPK68i.js} +1 -1
  17. package/dist/app/assets/{asmatmel-D079kq0M.js → asmatmel-KLAd82QV.js} +1 -1
  18. package/dist/app/assets/{aspnet-8ExSjxvo.js → aspnet-vZiSZd1y.js} +1 -1
  19. package/dist/app/assets/{autohotkey-Dl4oXtIk.js → autohotkey-tcBDP1b7.js} +1 -1
  20. package/dist/app/assets/{autoit-C3CwtOjR.js → autoit-Bwt0tLM_.js} +1 -1
  21. package/dist/app/assets/{avisynth-Bx99tLxs.js → avisynth-Bzz43Lfu.js} +1 -1
  22. package/dist/app/assets/{avro-idl-C31XGLPW.js → avro-idl-Bt9aSyrD.js} +1 -1
  23. package/dist/app/assets/{bash-Bbt-WPbn.js → bash-BloO3C-T.js} +1 -1
  24. package/dist/app/assets/{basic-C61Emcak.js → basic-B-OOkRrw.js} +1 -1
  25. package/dist/app/assets/{batch-Djn-x2uB.js → batch-aOUu2msA.js} +1 -1
  26. package/dist/app/assets/{bbcode-CNJrjhuJ.js → bbcode-C4D8vm8O.js} +1 -1
  27. package/dist/app/assets/{bicep-CI5LT2Ae.js → bicep-BtBByAYv.js} +1 -1
  28. package/dist/app/assets/{birb-DbXUGjzd.js → birb-BKXLouTf.js} +1 -1
  29. package/dist/app/assets/{bison-DrTn1ufs.js → bison-CniuHJJN.js} +1 -1
  30. package/dist/app/assets/{bnf-IYAsThC7.js → bnf-CGcuZYv2.js} +1 -1
  31. package/dist/app/assets/{brainfuck-BP2_pLcy.js → brainfuck-C9dlh056.js} +1 -1
  32. package/dist/app/assets/{brightscript-DAQk2Wd6.js → brightscript-nhHFw9_4.js} +1 -1
  33. package/dist/app/assets/{bro-DLuKh1Ny.js → bro-BTsReVOc.js} +1 -1
  34. package/dist/app/assets/{bsl-kl73aWRB.js → bsl-CmOTwcFR.js} +1 -1
  35. package/dist/app/assets/{c-CIhTtviR.js → c-Yjfq4oES.js} +1 -1
  36. package/dist/app/assets/{cfscript-CbFVl9I3.js → cfscript-DGhYlgJ7.js} +1 -1
  37. package/dist/app/assets/{chaiscript-D-0nW1Dm.js → chaiscript-CpP8bBSU.js} +1 -1
  38. package/dist/app/assets/{cil-BDy_lgSO.js → cil-CZ7j4pcz.js} +1 -1
  39. package/dist/app/assets/{clike-CpJMZ32o.js → clike-D581thF2.js} +1 -1
  40. package/dist/app/assets/{clojure-DGR-MOcf.js → clojure-AXVmar0o.js} +1 -1
  41. package/dist/app/assets/{cmake-DN0Hfx1z.js → cmake-BozSSfax.js} +1 -1
  42. package/dist/app/assets/{cobol-CizJYTKX.js → cobol-OciN9vwY.js} +1 -1
  43. package/dist/app/assets/{coffeescript-R-3uLIaS.js → coffeescript-B9yMzVL5.js} +1 -1
  44. package/dist/app/assets/{concurnas-CQkxgZj4.js → concurnas-DeQIM64O.js} +1 -1
  45. package/dist/app/assets/{coq-DQgbmzEf.js → coq-CicPksao.js} +1 -1
  46. package/dist/app/assets/{core-DycsgPCm.js → core-BIcqXTaK.js} +1 -1
  47. package/dist/app/assets/{cpp-CWEafQ-5.js → cpp-DKQF7403.js} +1 -1
  48. package/dist/app/assets/{crystal-B99VfLZA.js → crystal-Bcau7QFZ.js} +1 -1
  49. package/dist/app/assets/{csharp-BpTiSprW.js → csharp-BYghYpTl.js} +1 -1
  50. package/dist/app/assets/{cshtml-Vijio5v4.js → cshtml-BIxIGrsH.js} +1 -1
  51. package/dist/app/assets/{csp-tvYUeGBl.js → csp-CzDOD-m1.js} +1 -1
  52. package/dist/app/assets/{css-DKouri6h.js → css-CPRwU6oY.js} +1 -1
  53. package/dist/app/assets/{css-extras-CBuI96HF.js → css-extras-C28yWYxN.js} +1 -1
  54. package/dist/app/assets/{csv-CwTWJ9fy.js → csv-D8IAZwKO.js} +1 -1
  55. package/dist/app/assets/{cypher-D88tClXE.js → cypher-0hMRBt8D.js} +1 -1
  56. package/dist/app/assets/{d-BWG0iTE-.js → d-B5PQgXXo.js} +1 -1
  57. package/dist/app/assets/{dart-CuUeEfkB.js → dart-CvCyf8me.js} +1 -1
  58. package/dist/app/assets/{dataweave-Y5qfzSJO.js → dataweave-Izl0xtz9.js} +1 -1
  59. package/dist/app/assets/{dax-z1vJoJqt.js → dax-D-bGAkbS.js} +1 -1
  60. package/dist/app/assets/{dhall-fDEBchRN.js → dhall-DXIOSM5Q.js} +1 -1
  61. package/dist/app/assets/{diff-DWMZ6ihZ.js → diff-BE-xKdIi.js} +1 -1
  62. package/dist/app/assets/{django-DCaIOARB.js → django-DxEZdkeU.js} +1 -1
  63. package/dist/app/assets/{dns-zone-file-BDhluMwF.js → dns-zone-file-D406E4S7.js} +1 -1
  64. package/dist/app/assets/{docker-ADTABOD7.js → docker-BZkb2U00.js} +1 -1
  65. package/dist/app/assets/{dot-dm0hRI_d.js → dot-BGJNVmx1.js} +1 -1
  66. package/dist/app/assets/{ebnf-qFQ8NGRa.js → ebnf-_PEATas2.js} +1 -1
  67. package/dist/app/assets/{editorconfig-M1PNmDB7.js → editorconfig-C1UuLwJC.js} +1 -1
  68. package/dist/app/assets/{eiffel-Bk5GVHNc.js → eiffel-PzXVtlzf.js} +1 -1
  69. package/dist/app/assets/{ejs-BXbi7DMO.js → ejs-707c0691.js} +1 -1
  70. package/dist/app/assets/{elixir-nt7_rP4L.js → elixir-Bd3zWMjP.js} +1 -1
  71. package/dist/app/assets/{elm-CDcRzvrq.js → elm-DvEDEOdK.js} +1 -1
  72. package/dist/app/assets/{erb-D3tcO__0.js → erb-B6lZT1P9.js} +1 -1
  73. package/dist/app/assets/{erlang-B4u--80w.js → erlang-BwhqRmQk.js} +1 -1
  74. package/dist/app/assets/{etlua-BnbSsaIV.js → etlua-Bkg93PrU.js} +1 -1
  75. package/dist/app/assets/{excel-formula-DLztFxwy.js → excel-formula-BD0I0dyD.js} +1 -1
  76. package/dist/app/assets/{factor-k_q8DU3n.js → factor-CiQgOsxY.js} +1 -1
  77. package/dist/app/assets/{false-EqgS-Tkv.js → false-DlJ-f_Rc.js} +1 -1
  78. package/dist/app/assets/{firestore-security-rules-BNeM0zmk.js → firestore-security-rules-CxrEhPSm.js} +1 -1
  79. package/dist/app/assets/{flow-C6rIqrD4.js → flow-DOjTBDi4.js} +1 -1
  80. package/dist/app/assets/{fortran-CtcKyblB.js → fortran-D6uA-pWI.js} +1 -1
  81. package/dist/app/assets/{fsharp-DvC6evnC.js → fsharp-CFL1DcvT.js} +1 -1
  82. package/dist/app/assets/{ftl-B_JlxDIr.js → ftl-DzWZwecM.js} +1 -1
  83. package/dist/app/assets/{gap-gLflRQGF.js → gap-DatQeRFY.js} +1 -1
  84. package/dist/app/assets/{gcode-CnfAyvEE.js → gcode-5FSxboIT.js} +1 -1
  85. package/dist/app/assets/{gdscript-EKerpVNS.js → gdscript-Dz-OC8bG.js} +1 -1
  86. package/dist/app/assets/{gedcom-Ad0m6Zc2.js → gedcom-BS0539Ys.js} +1 -1
  87. package/dist/app/assets/{gherkin-uCNN1ATX.js → gherkin-BJKrWYAT.js} +1 -1
  88. package/dist/app/assets/{git-Bjayw6ss.js → git-DCjIevVw.js} +1 -1
  89. package/dist/app/assets/{glsl-bHhLBW8P.js → glsl-toSXKJrw.js} +1 -1
  90. package/dist/app/assets/{gml-BQNjMX9m.js → gml-DODsSWU7.js} +1 -1
  91. package/dist/app/assets/{gn-AZpH8rMM.js → gn-CzmtMWMm.js} +1 -1
  92. package/dist/app/assets/{go-B04a4gPD.js → go-BCQUEKVv.js} +1 -1
  93. package/dist/app/assets/{go-module-B-KN1Mlr.js → go-module-BbcV-9oG.js} +1 -1
  94. package/dist/app/assets/{graphql-DHjSGdnz.js → graphql-C_KxCYJO.js} +1 -1
  95. package/dist/app/assets/{groovy-DEug64iA.js → groovy-Cj97iKYK.js} +1 -1
  96. package/dist/app/assets/{haml-Bz8MK1Hn.js → haml-tLXJGYDb.js} +1 -1
  97. package/dist/app/assets/{handlebars-r_hDn-yj.js → handlebars-DIdVe3xN.js} +1 -1
  98. package/dist/app/assets/{haskell-DhRqgzP_.js → haskell-DPqw5u4H.js} +1 -1
  99. package/dist/app/assets/{haxe-DQFQxvE_.js → haxe-AsnHNCIR.js} +1 -1
  100. package/dist/app/assets/{hcl-BKp5VAPU.js → hcl-C6aoWR34.js} +1 -1
  101. package/dist/app/assets/{hlsl-CghIWoQj.js → hlsl-B2hhU30-.js} +1 -1
  102. package/dist/app/assets/{hoon-Dm-fnZxk.js → hoon-Bs-KhWO3.js} +1 -1
  103. package/dist/app/assets/{hpkp-lkuwmSbZ.js → hpkp-C-J4O-Mp.js} +1 -1
  104. package/dist/app/assets/{hsts-Wd4KhVht.js → hsts-BNFEkSnm.js} +1 -1
  105. package/dist/app/assets/{http-CmfhFPEg.js → http-D7UlQANy.js} +1 -1
  106. package/dist/app/assets/{ichigojam-Dc2L55jh.js → ichigojam-B01TJ8BA.js} +1 -1
  107. package/dist/app/assets/{icon-DdCxyxIH.js → icon-Ca_ghvQd.js} +1 -1
  108. package/dist/app/assets/{icu-message-format-BQYI0sFj.js → icu-message-format-CkcsJ0ML.js} +1 -1
  109. package/dist/app/assets/{idris-C5tNclWm.js → idris-BApVxI9a.js} +1 -1
  110. package/dist/app/assets/{iecst-BKVUYIbF.js → iecst-CXLR8sGn.js} +1 -1
  111. package/dist/app/assets/{ignore-CfwJhNgR.js → ignore-7LzAeAFj.js} +1 -1
  112. package/dist/app/assets/{index-3k-bKyOc.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-Cdcod1ei.js → inform7-CtnRN-Iq.js} +1 -1
  115. package/dist/app/assets/{ini-C2cDeXd9.js → ini-Cjpl6yTL.js} +1 -1
  116. package/dist/app/assets/{io-DuXAvwXa.js → io-C6W_EboY.js} +1 -1
  117. package/dist/app/assets/{j-BYVASY6X.js → j-BOBDun2W.js} +1 -1
  118. package/dist/app/assets/{java-4VrDHvxX.js → java-CNwVyXY2.js} +1 -1
  119. package/dist/app/assets/{javadoc-CuF60fip.js → javadoc-DS6hxu7_.js} +1 -1
  120. package/dist/app/assets/{javadoclike-C44_Y4pE.js → javadoclike-J6YT11JS.js} +1 -1
  121. package/dist/app/assets/{javascript-DWYY3Hmb.js → javascript-IbEfuVSB.js} +1 -1
  122. package/dist/app/assets/{javastacktrace-C1VDqTgi.js → javastacktrace-DjxwGV26.js} +1 -1
  123. package/dist/app/assets/{jexl-DeQ9RUDn.js → jexl-TLHmHaQ5.js} +1 -1
  124. package/dist/app/assets/{jolie-BRudN8eg.js → jolie-CLk71kur.js} +1 -1
  125. package/dist/app/assets/{jq-CtXc1LOh.js → jq-DZKnIQZM.js} +1 -1
  126. package/dist/app/assets/{js-extras-CvvdpdSS.js → js-extras-CJab09ti.js} +1 -1
  127. package/dist/app/assets/{js-templates-M2G0Wqhr.js → js-templates-CQGqrHhi.js} +1 -1
  128. package/dist/app/assets/{jsdoc-Bu2t9JLm.js → jsdoc--ymvl4aq.js} +1 -1
  129. package/dist/app/assets/{json-Cq-mABJ1.js → json-D9b-V85G.js} +1 -1
  130. package/dist/app/assets/{json5-4HqEH5T5.js → json5-LgA47n7A.js} +1 -1
  131. package/dist/app/assets/{jsonp-BEtlh398.js → jsonp-Cvwp3f8M.js} +1 -1
  132. package/dist/app/assets/{jsstacktrace-Dx0Y7B74.js → jsstacktrace-z8t2H6h6.js} +1 -1
  133. package/dist/app/assets/{jsx-DsbRpy7E.js → jsx-B71LrwNd.js} +1 -1
  134. package/dist/app/assets/{julia-DcsLQWYM.js → julia-DCATdxwO.js} +1 -1
  135. package/dist/app/assets/{keepalived-Dv8pDJFo.js → keepalived-DVYYbgrL.js} +1 -1
  136. package/dist/app/assets/{keyman-Ci2jdsqC.js → keyman-DLyOXnhf.js} +1 -1
  137. package/dist/app/assets/{kotlin-SayKmA5u.js → kotlin-CYoDfyDA.js} +1 -1
  138. package/dist/app/assets/{kumir-DMWOjK8x.js → kumir-CPWiEvmL.js} +1 -1
  139. package/dist/app/assets/{kusto-aI0GRJrT.js → kusto-BkfRYk0W.js} +1 -1
  140. package/dist/app/assets/{latex-DTp_-VF9.js → latex-BEjZ0ppC.js} +1 -1
  141. package/dist/app/assets/{latte-LZMPGx1E.js → latte-DaZOqdGV.js} +1 -1
  142. package/dist/app/assets/{less-gB0H6bSD.js → less-BmKsj1gN.js} +1 -1
  143. package/dist/app/assets/{lilypond-F37QUedl.js → lilypond-mmng28aJ.js} +1 -1
  144. package/dist/app/assets/{liquid-D--Wm3ha.js → liquid-BuuJO6_6.js} +1 -1
  145. package/dist/app/assets/{lisp-DIM2rPYE.js → lisp-DnffFM5N.js} +1 -1
  146. package/dist/app/assets/{livescript-BXTz0GVS.js → livescript-BSsr00Wr.js} +1 -1
  147. package/dist/app/assets/{llvm-ao5q-dod.js → llvm-37YjcHN5.js} +1 -1
  148. package/dist/app/assets/{log-DSdp1PUj.js → log-D3l5N3To.js} +1 -1
  149. package/dist/app/assets/{lolcode-DTgLBwjE.js → lolcode-C0Q2M_6s.js} +1 -1
  150. package/dist/app/assets/{lua-D1IySTDW.js → lua-DcLwN4Tg.js} +1 -1
  151. package/dist/app/assets/{magma-By0NJTpR.js → magma-CK0Amip9.js} +1 -1
  152. package/dist/app/assets/{makefile-CGoRDnpf.js → makefile-CtpS-RoO.js} +1 -1
  153. package/dist/app/assets/{markdown-D1L-HQf5.js → markdown-BNK3F4ql.js} +1 -1
  154. package/dist/app/assets/{markup-raYrASfk.js → markup-C9GIL65H.js} +1 -1
  155. package/dist/app/assets/{markup-templating-CssRUGmY.js → markup-templating-Du1J3ADP.js} +1 -1
  156. package/dist/app/assets/{matlab-Bkpr6UVS.js → matlab-DEM6O1Ul.js} +1 -1
  157. package/dist/app/assets/{maxscript-BqOK2v7p.js → maxscript-DMvqa3gf.js} +1 -1
  158. package/dist/app/assets/{mel-CH03lWHq.js → mel-C8DBIw1g.js} +1 -1
  159. package/dist/app/assets/{mermaid-BN5SfVaW.js → mermaid-CVko6NSq.js} +1 -1
  160. package/dist/app/assets/{mizar-B5EFFzYR.js → mizar-CwYm3_It.js} +1 -1
  161. package/dist/app/assets/{mongodb-6kvQytJm.js → mongodb-DRqGwjq6.js} +1 -1
  162. package/dist/app/assets/{monkey-CrULcDcp.js → monkey-BxiKe6Nr.js} +1 -1
  163. package/dist/app/assets/{moonscript-BUk4hr1Y.js → moonscript-CJyt1xoM.js} +1 -1
  164. package/dist/app/assets/{n1ql-BD0zH2HW.js → n1ql-BBmjIGEU.js} +1 -1
  165. package/dist/app/assets/{n4js-BmHkGn_8.js → n4js-ByKsJMJL.js} +1 -1
  166. package/dist/app/assets/{nand2tetris-hdl-B8Jd5FCr.js → nand2tetris-hdl-BTSXj71h.js} +1 -1
  167. package/dist/app/assets/{naniscript-B6Iuqu44.js → naniscript-C4jykFVF.js} +1 -1
  168. package/dist/app/assets/{nasm-CenqrlGz.js → nasm-DPA0eXtX.js} +1 -1
  169. package/dist/app/assets/{neon-BlyFo4oH.js → neon-upN4Ak64.js} +1 -1
  170. package/dist/app/assets/{nevod-FI2_D4MV.js → nevod-CdttHB8F.js} +1 -1
  171. package/dist/app/assets/{nginx-vOnlcjjK.js → nginx-DI1fsQ3j.js} +1 -1
  172. package/dist/app/assets/{nim-BTBcND8I.js → nim-D7kc_mK9.js} +1 -1
  173. package/dist/app/assets/{nix-CxWC3x_A.js → nix-BUG5ppr9.js} +1 -1
  174. package/dist/app/assets/{nsis-DWRIAzZl.js → nsis-BnXhmmxO.js} +1 -1
  175. package/dist/app/assets/{objectivec-DnNYqiEV.js → objectivec-Bu4dOfb9.js} +1 -1
  176. package/dist/app/assets/{ocaml-MWcE4wPG.js → ocaml-aT7VVPiL.js} +1 -1
  177. package/dist/app/assets/{opencl-CEoyfv1f.js → opencl-BzyWcYkI.js} +1 -1
  178. package/dist/app/assets/{openqasm-B9J2Sj4l.js → openqasm-b2yFBJdq.js} +1 -1
  179. package/dist/app/assets/{oz-Q6fkizOZ.js → oz-D46TtIuw.js} +1 -1
  180. package/dist/app/assets/{parigp-qViHuHAI.js → parigp-BAJyhdut.js} +1 -1
  181. package/dist/app/assets/{parser-D1TDrUDK.js → parser-B-ALvauC.js} +1 -1
  182. package/dist/app/assets/{pascal-C_GcAzVz.js → pascal-B0ap4FDW.js} +1 -1
  183. package/dist/app/assets/{pascaligo-BGECHz22.js → pascaligo-ChOneu9-.js} +1 -1
  184. package/dist/app/assets/{pcaxis-5_0lQ0o8.js → pcaxis-DTAmxHgs.js} +1 -1
  185. package/dist/app/assets/{peoplecode-C-_cyguZ.js → peoplecode-dQfUy8zn.js} +1 -1
  186. package/dist/app/assets/{perl-Bhu_9hey.js → perl-CYk00e1Q.js} +1 -1
  187. package/dist/app/assets/{php-CUhDCFAS.js → php-DvSqFnSN.js} +1 -1
  188. package/dist/app/assets/{php-extras-DSKZN6SK.js → php-extras-BFjUbIU6.js} +1 -1
  189. package/dist/app/assets/{phpdoc-C1FLn7tF.js → phpdoc-Di7rKCNL.js} +1 -1
  190. package/dist/app/assets/{plsql-DMfpGYGl.js → plsql-dX0-BKqD.js} +1 -1
  191. package/dist/app/assets/{powerquery-BRhf1hs3.js → powerquery-3xq4KaAs.js} +1 -1
  192. package/dist/app/assets/{powershell-CRaHW94B.js → powershell-BbXooszO.js} +1 -1
  193. package/dist/app/assets/{processing-I8nRKQlO.js → processing-GWbfNCzH.js} +1 -1
  194. package/dist/app/assets/{prolog-FrUePJiK.js → prolog-Tb2TbunJ.js} +1 -1
  195. package/dist/app/assets/{promql-BvAq16Ge.js → promql-QS8vHhL7.js} +1 -1
  196. package/dist/app/assets/{properties-DbxGMSRW.js → properties-BJ8AWlqX.js} +1 -1
  197. package/dist/app/assets/{protobuf-DrIGvjWL.js → protobuf-De-puAg3.js} +1 -1
  198. package/dist/app/assets/{psl-0HKrjoj1.js → psl-hZft3C8K.js} +1 -1
  199. package/dist/app/assets/{pug-CxH9bsi7.js → pug-BcYHdk-i.js} +1 -1
  200. package/dist/app/assets/{puppet-DHgc1gZg.js → puppet-BWbqDQJD.js} +1 -1
  201. package/dist/app/assets/{pure-B0kLfpMx.js → pure-Bz2pjTxR.js} +1 -1
  202. package/dist/app/assets/{purebasic-Ca1sSC6z.js → purebasic-BlO48lYx.js} +1 -1
  203. package/dist/app/assets/{purescript-BQK7br_N.js → purescript-BxSMm2Br.js} +1 -1
  204. package/dist/app/assets/{q-DwDhLegJ.js → q-DDUTW9aK.js} +1 -1
  205. package/dist/app/assets/{qml-CtbldBP6.js → qml-DisOV-LV.js} +1 -1
  206. package/dist/app/assets/{qore-D3LZb6ma.js → qore-FNRP4gBF.js} +1 -1
  207. package/dist/app/assets/{qsharp-CiLCdqjv.js → qsharp-DhtMV0oO.js} +1 -1
  208. package/dist/app/assets/{r-Dilam18q.js → r-CyiuHjNN.js} +1 -1
  209. package/dist/app/assets/{racket-BBckdZP5.js → racket-DFgoSckH.js} +1 -1
  210. package/dist/app/assets/{reason-C20wa4Ng.js → reason-HhYbY7K3.js} +1 -1
  211. package/dist/app/assets/{regex-COQGBYpa.js → regex-jU5TpvM-.js} +1 -1
  212. package/dist/app/assets/{rego-pKEk3RLD.js → rego-BCjDPrQO.js} +1 -1
  213. package/dist/app/assets/{renpy-CDmk4rPI.js → renpy-BTSgQi2v.js} +1 -1
  214. package/dist/app/assets/{rest-Dl5zGTqN.js → rest-BLcZ4e-5.js} +1 -1
  215. package/dist/app/assets/{rip-Dn6GOHWS.js → rip-SltRJnuI.js} +1 -1
  216. package/dist/app/assets/{roboconf-BBJnM0BC.js → roboconf-B-GZm2Oe.js} +1 -1
  217. package/dist/app/assets/{robotframework-B3glKH4d.js → robotframework-BOt8S6cX.js} +1 -1
  218. package/dist/app/assets/{ruby-BQGh_6Rr.js → ruby-CVfYH0zM.js} +1 -1
  219. package/dist/app/assets/{rust-QlUGh2de.js → rust-B6mEp4Sj.js} +1 -1
  220. package/dist/app/assets/{sas-BDC68F8y.js → sas-DvEI8RJ0.js} +1 -1
  221. package/dist/app/assets/{sass-DieDF6XQ.js → sass-Cv25Jxqq.js} +1 -1
  222. package/dist/app/assets/{scala-D3MUhHYj.js → scala-CyqNr7Uv.js} +1 -1
  223. package/dist/app/assets/{scheme-BGgE-kqm.js → scheme-ji0XoXLf.js} +1 -1
  224. package/dist/app/assets/{scss--_H8DdDE.js → scss-B7_0neO_.js} +1 -1
  225. package/dist/app/assets/{shell-session-LGnbrToj.js → shell-session-CqZEoMQD.js} +1 -1
  226. package/dist/app/assets/{smali-CBlokkez.js → smali-DKSzZYkI.js} +1 -1
  227. package/dist/app/assets/{smalltalk-BbGkP-W2.js → smalltalk-BOA4piuq.js} +1 -1
  228. package/dist/app/assets/{smarty-HZnEokqM.js → smarty-Du99BSgN.js} +1 -1
  229. package/dist/app/assets/{sml-D3kN5fHv.js → sml-BJedIA4B.js} +1 -1
  230. package/dist/app/assets/{solidity-COzqk2SX.js → solidity-DidQwG5Z.js} +1 -1
  231. package/dist/app/assets/{solution-file-B_WMCfok.js → solution-file-Bx0d9qN8.js} +1 -1
  232. package/dist/app/assets/{soy-BnjJHZA_.js → soy-BBLv3Cfa.js} +1 -1
  233. package/dist/app/assets/{sparql-B5TBM1ys.js → sparql-Da5WZKbL.js} +1 -1
  234. package/dist/app/assets/{splunk-spl-B2w0z96G.js → splunk-spl-DbJKl8So.js} +1 -1
  235. package/dist/app/assets/{sqf-XPpbNZWG.js → sqf-CYrx0jxf.js} +1 -1
  236. package/dist/app/assets/{sql-BdoHQUvu.js → sql-Gv-aOlOf.js} +1 -1
  237. package/dist/app/assets/{squirrel-C7PSbqa8.js → squirrel-FpIGPPw4.js} +1 -1
  238. package/dist/app/assets/{stan-j2SrNXay.js → stan-Dq001Nrk.js} +1 -1
  239. package/dist/app/assets/{stylus-B4ESB7LK.js → stylus-aatfgWwe.js} +1 -1
  240. package/dist/app/assets/{swift-0REuIxse.js → swift-pn7VW95d.js} +1 -1
  241. package/dist/app/assets/{systemd-C-jON-S5.js → systemd-9capsVJ6.js} +1 -1
  242. package/dist/app/assets/{t4-cs-73fI4ZnY.js → t4-cs-CKXcczci.js} +1 -1
  243. package/dist/app/assets/{t4-templating-B7K5zZjl.js → t4-templating-1wTayb8u.js} +1 -1
  244. package/dist/app/assets/{t4-vb-nmeCn59t.js → t4-vb-B_O7wBow.js} +1 -1
  245. package/dist/app/assets/{tap-CC3qoO-h.js → tap-D-TV5_gQ.js} +1 -1
  246. package/dist/app/assets/{tcl-CXW6dWdJ.js → tcl-BaVob1Om.js} +1 -1
  247. package/dist/app/assets/{textile-CcZgymJI.js → textile-COMk-HmI.js} +1 -1
  248. package/dist/app/assets/{toml-Bt-KwXSX.js → toml-D9NJpArC.js} +1 -1
  249. package/dist/app/assets/{tremor-CfkeSZOn.js → tremor-rCNHwdQL.js} +1 -1
  250. package/dist/app/assets/{tt2-VjO-nd3t.js → tt2-DTDvfOgc.js} +1 -1
  251. package/dist/app/assets/{turtle-C7lex_1P.js → turtle-D8pkqXh1.js} +1 -1
  252. package/dist/app/assets/{twig-ydMCwYBK.js → twig-DxSF8gqH.js} +1 -1
  253. package/dist/app/assets/{typescript-BgbE9enz.js → typescript-Caebatmk.js} +1 -1
  254. package/dist/app/assets/{typoscript-mPjPihGb.js → typoscript-B3uk1kES.js} +1 -1
  255. package/dist/app/assets/{unrealscript-B1h3FIp7.js → unrealscript-ZNoSG8ji.js} +1 -1
  256. package/dist/app/assets/{uorazor-BixEY3TF.js → uorazor-LekoNNOo.js} +1 -1
  257. package/dist/app/assets/{uri-a9CNoVTl.js → uri-B8YcIzOv.js} +1 -1
  258. package/dist/app/assets/{v-Bun8Oo4V.js → v-6rOne2a0.js} +1 -1
  259. package/dist/app/assets/{vala-Yh7IL00A.js → vala-CjEJEdsP.js} +1 -1
  260. package/dist/app/assets/{vbnet-D1bws4TN.js → vbnet-DBPmBm7_.js} +1 -1
  261. package/dist/app/assets/{velocity-BTBe_YdS.js → velocity-DOooMwL8.js} +1 -1
  262. package/dist/app/assets/{verilog-CZb0BmwQ.js → verilog-Cq0ZocvP.js} +1 -1
  263. package/dist/app/assets/{vhdl-GveK8MNv.js → vhdl-Dxs_xidb.js} +1 -1
  264. package/dist/app/assets/{vim-BFnGQW9p.js → vim-BqsnXwB6.js} +1 -1
  265. package/dist/app/assets/{visual-basic-C6IoFdCy.js → visual-basic-zAzjvaqP.js} +1 -1
  266. package/dist/app/assets/{warpscript-BhRK7JpJ.js → warpscript-D9hbfr6_.js} +1 -1
  267. package/dist/app/assets/{wasm-BPlRsQZE.js → wasm-C4TU9VDY.js} +1 -1
  268. package/dist/app/assets/{web-idl-DsR59OqK.js → web-idl-DD5JcddQ.js} +1 -1
  269. package/dist/app/assets/{wiki-CqKbsRaB.js → wiki-Des21yVK.js} +1 -1
  270. package/dist/app/assets/{wolfram-DBwl_BKC.js → wolfram-B7enpov1.js} +1 -1
  271. package/dist/app/assets/{wren-BiiMWCe5.js → wren-Rr8h-Ayu.js} +1 -1
  272. package/dist/app/assets/{xeora-BAHjHPpy.js → xeora-EjcLXBhx.js} +1 -1
  273. package/dist/app/assets/{xml-doc-C7XMC-Tu.js → xml-doc-uaTxx6-m.js} +1 -1
  274. package/dist/app/assets/{xojo-B8_jJVJy.js → xojo-CX6G8nhh.js} +1 -1
  275. package/dist/app/assets/{xquery-C4b31bTA.js → xquery-DvPb3Uw9.js} +1 -1
  276. package/dist/app/assets/{yaml-BZKzmGBJ.js → yaml-D-l_Y2hx.js} +1 -1
  277. package/dist/app/assets/{yang-Bbsnlksx.js → yang-KBoIIT4_.js} +1 -1
  278. package/dist/app/assets/{zig-BnOm7PBz.js → zig-_uNXp9cY.js} +1 -1
  279. package/dist/app/index.html +2 -2
  280. package/dist/index.cjs +391 -224
  281. package/dist/index.d.cts +24 -1
  282. package/dist/index.d.ts +24 -1
  283. package/dist/index.js +387 -224
  284. package/package.json +3 -3
package/dist/index.cjs CHANGED
@@ -43,6 +43,7 @@ __export(index_exports, {
43
43
  CardHeader: () => CardHeader,
44
44
  CardTitle: () => CardTitle,
45
45
  Chat: () => Chat,
46
+ ChatkitAvatar: () => ChatkitAvatar,
46
47
  Input: () => Input,
47
48
  ParentMessengerProvider: () => ParentMessengerProvider,
48
49
  ScrollArea: () => ScrollArea,
@@ -54,7 +55,10 @@ __export(index_exports, {
54
55
  TabsTrigger: () => TabsTrigger,
55
56
  ThemeProvider: () => ThemeProvider,
56
57
  chatkitSupportedLocales: () => supportedLocales,
58
+ extractAssistantAvatar: () => extractAssistantAvatar,
59
+ getAvatarFallback: () => getAvatarFallback,
57
60
  getChatkitLanguage: () => getLanguage,
61
+ normalizeChatkitAvatar: () => normalizeChatkitAvatar,
58
62
  setChatkitLanguage: () => setLanguage,
59
63
  useParentMessenger: () => useParentMessenger,
60
64
  useTheme: () => useTheme
@@ -62,7 +66,7 @@ __export(index_exports, {
62
66
  module.exports = __toCommonJS(index_exports);
63
67
 
64
68
  // src/components/chat.tsx
65
- var React18 = __toESM(require("react"), 1);
69
+ var React20 = __toESM(require("react"), 1);
66
70
  var import_lucide_react9 = require("lucide-react");
67
71
 
68
72
  // src/lib/utils.ts
@@ -71,19 +75,14 @@ var import_tailwind_merge = require("tailwind-merge");
71
75
  function cn(...inputs) {
72
76
  return (0, import_tailwind_merge.twMerge)((0, import_clsx.clsx)(inputs));
73
77
  }
74
- function getRoundedClass(themeRadius) {
75
- switch (themeRadius) {
76
- case "pill":
77
- return "rounded-full";
78
- case "round":
79
- return "rounded-xl";
80
- case "soft":
81
- return "rounded-lg";
82
- case "sharp":
83
- return "rounded-none";
84
- default:
85
- return "rounded-full";
86
- }
78
+ var THEME_RADIUS_PRESET_CLASS = {
79
+ pill: "rounded-full",
80
+ round: "rounded-xl",
81
+ soft: "rounded-lg",
82
+ sharp: "rounded-none"
83
+ };
84
+ function getRoundedClass(themeRadius, fallback = "rounded-full") {
85
+ return themeRadius ? THEME_RADIUS_PRESET_CLASS[themeRadius] : fallback;
87
86
  }
88
87
  function createMessageId() {
89
88
  return globalThis.crypto?.randomUUID?.() ?? `${Date.now().toString(36)}-${Math.random().toString(36).slice(2)}`;
@@ -105,25 +104,6 @@ var import_xpert_sdk = require("@xpert-ai/xpert-sdk");
105
104
  var import_tool = require("@langchain/core/messages/tool");
106
105
  var import_chatkit_types3 = require("@xpert-ai/chatkit-types");
107
106
 
108
- // src/hooks/useParentMessenger.tsx
109
- var import_react2 = require("react");
110
-
111
- // src/providers/ParentMessenger.tsx
112
- var import_react = require("react");
113
- var import_chatkit_types2 = require("@xpert-ai/chatkit-types");
114
-
115
- // src/hooks/useStream.ts
116
- var streamRef = { current: null };
117
- function useStreamManager() {
118
- return {
119
- streamRef,
120
- stream: streamRef.current,
121
- setStream: (stream) => {
122
- streamRef.current = stream;
123
- }
124
- };
125
- }
126
-
127
107
  // src/lib/request-options.ts
128
108
  var import_chatkit_types = require("@xpert-ai/chatkit-types");
129
109
  function isRecord(value) {
@@ -133,16 +113,53 @@ function resolveHumanStateValue(value) {
133
113
  const human = value?.[import_chatkit_types.STATE_VARIABLE_HUMAN];
134
114
  return isRecord(human) ? human : {};
135
115
  }
116
+ function splitEnvCarrier(value) {
117
+ if (!isRecord(value)) {
118
+ return { value: {}, env: {} };
119
+ }
120
+ const { env, ...rest } = value;
121
+ return {
122
+ value: rest,
123
+ env: isRecord(env) ? env : {}
124
+ };
125
+ }
126
+ function mergeRequestOptions(input) {
127
+ const defaultContext = splitEnvCarrier(input.defaults?.context);
128
+ const explicitContext = splitEnvCarrier(input.context);
129
+ const defaultConfig = isRecord(input.defaults?.config) ? input.defaults?.config : {};
130
+ const explicitConfig = isRecord(input.config) ? input.config : {};
131
+ const mergedEnv = {
132
+ ...defaultContext.env,
133
+ ...explicitContext.env
134
+ };
135
+ const mergedContextBase = {
136
+ ...defaultContext.value,
137
+ ...explicitContext.value
138
+ };
139
+ const mergedConfig = {
140
+ ...defaultConfig,
141
+ ...explicitConfig
142
+ };
143
+ const hasEnv = Object.keys(mergedEnv).length > 0;
144
+ const mergedContext = hasEnv ? { ...mergedContextBase, env: mergedEnv } : mergedContextBase;
145
+ const hasContext = Object.keys(mergedContextBase).length > 0 || hasEnv;
146
+ const hasConfig = Object.keys(mergedConfig).length > 0;
147
+ return {
148
+ ...hasContext ? { context: mergedContext } : {},
149
+ ...hasConfig ? { config: mergedConfig } : {}
150
+ };
151
+ }
136
152
  function buildInjectedRequestOptions(input) {
137
153
  const defaultState = input.defaults?.state;
138
154
  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;
155
+ const normalizedRequest = mergeRequestOptions({
156
+ defaults: {
157
+ context: input.defaults?.context,
158
+ config: input.defaults?.config
159
+ },
160
+ context: input.context,
161
+ config: input.config
162
+ });
146
163
  const mergedState = {
147
164
  ...defaultState ?? {},
148
165
  ...explicitState ?? {}
@@ -158,7 +175,27 @@ function buildInjectedRequestOptions(input) {
158
175
  const hasState = Object.keys(mergedState).length > 0;
159
176
  return {
160
177
  ...hasState ? { state: mergedState } : {},
161
- ...hasContext ? { context: mergedContext } : {}
178
+ ...normalizedRequest.context ? { context: normalizedRequest.context } : {},
179
+ ...normalizedRequest.config ? { config: normalizedRequest.config } : {}
180
+ };
181
+ }
182
+
183
+ // src/hooks/useParentMessenger.tsx
184
+ var import_react2 = require("react");
185
+
186
+ // src/providers/ParentMessenger.tsx
187
+ var import_react = require("react");
188
+ var import_chatkit_types2 = require("@xpert-ai/chatkit-types");
189
+
190
+ // src/hooks/useStream.ts
191
+ var streamRef = { current: null };
192
+ function useStreamManager() {
193
+ return {
194
+ streamRef,
195
+ stream: streamRef.current,
196
+ setStream: (stream) => {
197
+ streamRef.current = stream;
198
+ }
162
199
  };
163
200
  }
164
201
 
@@ -256,6 +293,7 @@ function ParentMessengerProvider({
256
293
  {
257
294
  newThread: params.newThread,
258
295
  ...requestOptions.context ? { context: requestOptions.context } : {},
296
+ ...requestOptions.config ? { config: requestOptions.config } : {},
259
297
  optimisticValues: (prev) => {
260
298
  const prevMessages = prev?.messages ?? [];
261
299
  return { ...prev, messages: [...prevMessages, newMessage] };
@@ -577,6 +615,10 @@ var en_US_default = {
577
615
  errorToast: "An error occurred. Please try again.",
578
616
  errorLabel: "Error:",
579
617
  langGraphMessages: "LangGraph Messages..."
618
+ },
619
+ message: {
620
+ answer: "Answer",
621
+ reasoning: "Reasoning"
580
622
  }
581
623
  };
582
624
 
@@ -636,6 +678,10 @@ var zh_CN_default = {
636
678
  errorToast: "\u53D1\u751F\u9519\u8BEF\uFF0C\u8BF7\u91CD\u8BD5\u3002",
637
679
  errorLabel: "\u9519\u8BEF\uFF1A",
638
680
  langGraphMessages: "LangGraph \u6D88\u606F..."
681
+ },
682
+ message: {
683
+ answer: "\u56DE\u7B54",
684
+ reasoning: "\u63A8\u7406"
639
685
  }
640
686
  };
641
687
 
@@ -2194,6 +2240,7 @@ function renderContent(content, messageId) {
2194
2240
  return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "space-y-3", children: content.map((item, index) => renderContentItem(item, index, messageId)) });
2195
2241
  }
2196
2242
  function AssistantMessage({ message, className, isStreaming = false }) {
2243
+ const { t } = useChatkitTranslation();
2197
2244
  const content = message.content;
2198
2245
  const hasContent = content != null && !(typeof content === "string" && content.trim() === "" || Array.isArray(message.content) && message.content.length === 0);
2199
2246
  const hasReasoning = Array.isArray(message.reasoning) && message.reasoning.some((item) => item.text?.trim());
@@ -2209,8 +2256,8 @@ function AssistantMessage({ message, className, isStreaming = false }) {
2209
2256
  className: "w-full",
2210
2257
  children: [
2211
2258
  /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(TabsList, { className: "h-9", children: [
2212
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(TabsTrigger, { value: "answer", children: "Answer" }),
2213
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(TabsTrigger, { value: "reasoning", children: "Reasoning" })
2259
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(TabsTrigger, { value: "answer", children: t("message.answer") }),
2260
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(TabsTrigger, { value: "reasoning", children: t("message.reasoning") })
2214
2261
  ] }),
2215
2262
  /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(TabsContent, { value: "answer", className: "space-y-3", children: answerNode }),
2216
2263
  /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(TabsContent, { value: "reasoning", className: "space-y-3", children: reasoningNode })
@@ -2326,8 +2373,136 @@ function StartScreen({ startScreen, onPromptClick, className }) {
2326
2373
  ] });
2327
2374
  }
2328
2375
 
2329
- // src/hooks/useThreads.ts
2376
+ // src/components/ui/chatkit-avatar.tsx
2377
+ var React17 = require("react");
2378
+
2379
+ // src/components/ui/avatar.tsx
2330
2380
  var React16 = __toESM(require("react"), 1);
2381
+ var AvatarPrimitive = __toESM(require("@radix-ui/react-avatar"), 1);
2382
+ var import_jsx_runtime22 = require("react/jsx-runtime");
2383
+ var Avatar = React16.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
2384
+ AvatarPrimitive.Root,
2385
+ {
2386
+ ref,
2387
+ className: cn(
2388
+ "relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",
2389
+ className
2390
+ ),
2391
+ ...props
2392
+ }
2393
+ ));
2394
+ Avatar.displayName = AvatarPrimitive.Root.displayName;
2395
+ var AvatarImage = React16.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
2396
+ AvatarPrimitive.Image,
2397
+ {
2398
+ ref,
2399
+ className: cn("aspect-square h-full w-full", className),
2400
+ ...props
2401
+ }
2402
+ ));
2403
+ AvatarImage.displayName = AvatarPrimitive.Image.displayName;
2404
+ var AvatarFallback = React16.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
2405
+ AvatarPrimitive.Fallback,
2406
+ {
2407
+ ref,
2408
+ className: cn(
2409
+ "flex h-full w-full items-center justify-center rounded-full bg-muted",
2410
+ className
2411
+ ),
2412
+ ...props
2413
+ }
2414
+ ));
2415
+ AvatarFallback.displayName = AvatarPrimitive.Fallback.displayName;
2416
+
2417
+ // src/components/ui/chatkit-avatar.tsx
2418
+ var import_jsx_runtime23 = require("react/jsx-runtime");
2419
+ function asRecord(value) {
2420
+ return value && typeof value === "object" ? value : null;
2421
+ }
2422
+ function getNonEmptyString(value) {
2423
+ if (typeof value !== "string") return void 0;
2424
+ const normalized = value.trim();
2425
+ return normalized || void 0;
2426
+ }
2427
+ function unicodeFromUnified(unified) {
2428
+ const normalized = getNonEmptyString(unified);
2429
+ if (!normalized) return void 0;
2430
+ try {
2431
+ return normalized.split("-").map((hex) => String.fromCodePoint(Number.parseInt(hex, 16))).join("");
2432
+ } catch {
2433
+ return void 0;
2434
+ }
2435
+ }
2436
+ function getEmojiCharacter(avatar) {
2437
+ return unicodeFromUnified(avatar?.emoji?.unified);
2438
+ }
2439
+ function getAvatarFallback(label) {
2440
+ return label.trim().charAt(0).toUpperCase() || "A";
2441
+ }
2442
+ function normalizeChatkitAvatar(rawAvatar) {
2443
+ if (typeof rawAvatar === "string") {
2444
+ const url = getNonEmptyString(rawAvatar);
2445
+ return url ? { url } : null;
2446
+ }
2447
+ const avatarRecord = asRecord(rawAvatar);
2448
+ if (!avatarRecord) return null;
2449
+ const emojiRecord = asRecord(avatarRecord.emoji);
2450
+ const avatar = {
2451
+ background: getNonEmptyString(avatarRecord.background),
2452
+ url: getNonEmptyString(avatarRecord.url),
2453
+ useNotoColor: Boolean(avatarRecord.useNotoColor)
2454
+ };
2455
+ if (emojiRecord) {
2456
+ avatar.emoji = {
2457
+ colons: getNonEmptyString(emojiRecord.colons),
2458
+ id: getNonEmptyString(emojiRecord.id),
2459
+ unified: getNonEmptyString(emojiRecord.unified)
2460
+ };
2461
+ }
2462
+ return avatar.url || avatar.background || avatar.emoji?.id || avatar.emoji?.unified ? avatar : null;
2463
+ }
2464
+ function extractAssistantAvatar(assistant) {
2465
+ const assistantRecord = asRecord(assistant);
2466
+ const metadata = asRecord(assistant.metadata);
2467
+ const rawAvatar = assistantRecord?.avatar ?? metadata?.avatar;
2468
+ const avatar = normalizeChatkitAvatar(rawAvatar);
2469
+ if (avatar) return avatar;
2470
+ const metadataAvatar = getNonEmptyString(metadata?.avatarUrl) ?? getNonEmptyString(metadata?.avatar_url);
2471
+ return metadataAvatar ? { url: metadataAvatar } : null;
2472
+ }
2473
+ function ChatkitAvatar({
2474
+ avatar,
2475
+ className,
2476
+ fallback,
2477
+ fallbackClassName,
2478
+ imageClassName,
2479
+ label,
2480
+ style,
2481
+ ...props
2482
+ }) {
2483
+ const { theme } = useTheme();
2484
+ const emojiCharacter = getEmojiCharacter(avatar);
2485
+ const fallbackText = fallback || getAvatarFallback(label);
2486
+ const roundedClass = getRoundedClass(theme.radius);
2487
+ const emojiStyle = avatar?.useNotoColor ? { fontFamily: '"Noto Color Emoji", "Apple Color Emoji", "Segoe UI Emoji", sans-serif' } : void 0;
2488
+ const fallbackStyle = {
2489
+ ...avatar?.background ? { background: avatar.background } : {}
2490
+ };
2491
+ return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(Avatar, { className: cn(roundedClass, className), style, ...props, children: [
2492
+ avatar?.url ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(AvatarImage, { className: imageClassName, src: avatar.url, alt: label }) : null,
2493
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
2494
+ AvatarFallback,
2495
+ {
2496
+ className: cn(roundedClass, "text-sm font-medium text-foreground", fallbackClassName),
2497
+ style: fallbackStyle,
2498
+ children: emojiCharacter ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: "text-[1.1em] leading-none", style: emojiStyle, children: emojiCharacter }) : fallbackText
2499
+ }
2500
+ )
2501
+ ] });
2502
+ }
2503
+
2504
+ // src/hooks/useThreads.ts
2505
+ var React18 = __toESM(require("react"), 1);
2331
2506
  var DEFAULT_LIMIT = 50;
2332
2507
  var getThreadTitle = (threadRecord) => {
2333
2508
  const title = threadRecord.title?.trim();
@@ -2365,16 +2540,16 @@ function useThreads(limit = DEFAULT_LIMIT) {
2365
2540
  isReady,
2366
2541
  isLoading: isStreamLoading
2367
2542
  } = useStreamContext();
2368
- const [threadRecords, setThreadRecords] = React16.useState([]);
2369
- const [isLoading, setIsLoading] = React16.useState(false);
2370
- const [error, setError] = React16.useState(null);
2371
- const upsertThreadRecord = React16.useCallback((threadRecord) => {
2543
+ const [threadRecords, setThreadRecords] = React18.useState([]);
2544
+ const [isLoading, setIsLoading] = React18.useState(false);
2545
+ const [error, setError] = React18.useState(null);
2546
+ const upsertThreadRecord = React18.useCallback((threadRecord) => {
2372
2547
  setThreadRecords((prev) => {
2373
2548
  const next = prev.filter((item) => item.id !== threadRecord.id);
2374
2549
  return sortThreadRecords([threadRecord, ...next]);
2375
2550
  });
2376
2551
  }, []);
2377
- const refreshThreads = React16.useCallback(async () => {
2552
+ const refreshThreads = React18.useCallback(async () => {
2378
2553
  setIsLoading(true);
2379
2554
  setError(null);
2380
2555
  try {
@@ -2390,7 +2565,7 @@ function useThreads(limit = DEFAULT_LIMIT) {
2390
2565
  setIsLoading(false);
2391
2566
  }
2392
2567
  }, [client, limit, assistantId]);
2393
- const createThread = React16.useCallback(
2568
+ const createThread = React18.useCallback(
2394
2569
  async (input) => {
2395
2570
  setError(null);
2396
2571
  const payload = {};
@@ -2404,7 +2579,7 @@ function useThreads(limit = DEFAULT_LIMIT) {
2404
2579
  },
2405
2580
  [client, upsertThreadRecord]
2406
2581
  );
2407
- const updateThread = React16.useCallback(
2582
+ const updateThread = React18.useCallback(
2408
2583
  async (recordId, payload) => {
2409
2584
  setError(null);
2410
2585
  const updated = await client.conversations.update(recordId, payload);
@@ -2413,7 +2588,7 @@ function useThreads(limit = DEFAULT_LIMIT) {
2413
2588
  },
2414
2589
  [client, upsertThreadRecord]
2415
2590
  );
2416
- const deleteThread = React16.useCallback(
2591
+ const deleteThread = React18.useCallback(
2417
2592
  async (recordId) => {
2418
2593
  setError(null);
2419
2594
  await client.conversations.delete(recordId);
@@ -2421,11 +2596,11 @@ function useThreads(limit = DEFAULT_LIMIT) {
2421
2596
  },
2422
2597
  [client]
2423
2598
  );
2424
- React16.useEffect(() => {
2599
+ React18.useEffect(() => {
2425
2600
  if (!isReady) return;
2426
2601
  void refreshThreads();
2427
2602
  }, [refreshThreads, isReady]);
2428
- React16.useEffect(() => {
2603
+ React18.useEffect(() => {
2429
2604
  if (!threadId || !isStreamLoading) return;
2430
2605
  const now = (/* @__PURE__ */ new Date()).toISOString();
2431
2606
  setThreadRecords((prev) => {
@@ -2445,7 +2620,7 @@ function useThreads(limit = DEFAULT_LIMIT) {
2445
2620
  return changed ? sortThreadRecords(next) : prev;
2446
2621
  });
2447
2622
  }, [threadId, isStreamLoading]);
2448
- React16.useEffect(() => {
2623
+ React18.useEffect(() => {
2449
2624
  if (!isReady || !threadId || isStreamLoading) return;
2450
2625
  let cancelled = false;
2451
2626
  void client.conversations.search({ where: { threadId }, limit: 1 }).then((result) => {
@@ -2459,7 +2634,7 @@ function useThreads(limit = DEFAULT_LIMIT) {
2459
2634
  cancelled = true;
2460
2635
  };
2461
2636
  }, [client, threadId, upsertThreadRecord, isReady, isStreamLoading]);
2462
- const threads = React16.useMemo(
2637
+ const threads = React18.useMemo(
2463
2638
  () => threadRecords.map((threadRecord) => toThreadItem(threadRecord)),
2464
2639
  [threadRecords]
2465
2640
  );
@@ -2476,10 +2651,10 @@ function useThreads(limit = DEFAULT_LIMIT) {
2476
2651
  }
2477
2652
 
2478
2653
  // src/components/thread/context-usage-indicator.tsx
2479
- var React17 = __toESM(require("react"), 1);
2654
+ var React19 = __toESM(require("react"), 1);
2480
2655
 
2481
2656
  // src/components/ui/progress-circle.tsx
2482
- var import_jsx_runtime22 = (
2657
+ var import_jsx_runtime24 = (
2483
2658
  // biome-ignore lint/a11y/useFocusableInteractive: false positive (progress + progressbar are not focusable interactives)
2484
2659
  // biome-ignore lint/nursery/useAriaPropsSupportedByRole: biome rule at odds with mdn docs (presumed nursary bug with rule)
2485
2660
  require("react/jsx-runtime")
@@ -2503,7 +2678,7 @@ var ProgressCircle = ({ value, className, ...restSvgProps }) => {
2503
2678
  fill: "none",
2504
2679
  strokeWidth
2505
2680
  };
2506
- return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
2681
+ return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
2507
2682
  "svg",
2508
2683
  {
2509
2684
  role: "progressbar",
@@ -2514,8 +2689,8 @@ var ProgressCircle = ({ value, className, ...restSvgProps }) => {
2514
2689
  "aria-valuemax": 100,
2515
2690
  ...restSvgProps,
2516
2691
  children: [
2517
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("circle", { ...commonParams, className: "stroke-current/25" }),
2518
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
2692
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("circle", { ...commonParams, className: "stroke-current/25" }),
2693
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
2519
2694
  "circle",
2520
2695
  {
2521
2696
  ...commonParams,
@@ -2533,7 +2708,7 @@ var ProgressCircle = ({ value, className, ...restSvgProps }) => {
2533
2708
  };
2534
2709
 
2535
2710
  // src/components/thread/context-usage-indicator.tsx
2536
- var import_jsx_runtime23 = require("react/jsx-runtime");
2711
+ var import_jsx_runtime25 = require("react/jsx-runtime");
2537
2712
  var kNumberFormatter = new Intl.NumberFormat("en-US", {
2538
2713
  minimumFractionDigits: 0,
2539
2714
  maximumFractionDigits: 1
@@ -2566,20 +2741,20 @@ function ContextUsageIndicator({
2566
2741
  }) {
2567
2742
  const { t } = useChatkitTranslation();
2568
2743
  const stream = useStreamContext();
2569
- const [maxContextSize, setMaxContextSize] = React17.useState(null);
2570
- const [usedContextSize, setUsedContextSize] = React17.useState(null);
2571
- const [assistantAgentKey, setAssistantAgentKey] = React17.useState(null);
2572
- const latestRealtimeUsageRef = React17.useRef({
2744
+ const [maxContextSize, setMaxContextSize] = React19.useState(null);
2745
+ const [usedContextSize, setUsedContextSize] = React19.useState(null);
2746
+ const [assistantAgentKey, setAssistantAgentKey] = React19.useState(null);
2747
+ const latestRealtimeUsageRef = React19.useRef({
2573
2748
  threadId: null,
2574
2749
  agentKey: null,
2575
2750
  usedTokens: null
2576
2751
  });
2577
- const realtimeUsage = React17.useMemo(
2752
+ const realtimeUsage = React19.useMemo(
2578
2753
  () => getThreadContextUsage(stream.contextUsageByAgentKey, assistantAgentKey),
2579
2754
  [assistantAgentKey, stream.contextUsageByAgentKey]
2580
2755
  );
2581
2756
  const realtimeUsedContextSize = getThreadContextUsageTotalTokens(realtimeUsage);
2582
- React17.useEffect(() => {
2757
+ React19.useEffect(() => {
2583
2758
  if (!stream.client || !stream.assistantId) {
2584
2759
  setMaxContextSize(null);
2585
2760
  setAssistantAgentKey(null);
@@ -2599,18 +2774,18 @@ function ContextUsageIndicator({
2599
2774
  cancelled = true;
2600
2775
  };
2601
2776
  }, [stream.client, stream.assistantId]);
2602
- React17.useEffect(() => {
2777
+ React19.useEffect(() => {
2603
2778
  latestRealtimeUsageRef.current = {
2604
2779
  threadId: stream.threadId ?? null,
2605
2780
  agentKey: assistantAgentKey,
2606
2781
  usedTokens: realtimeUsedContextSize
2607
2782
  };
2608
2783
  }, [assistantAgentKey, realtimeUsedContextSize, stream.threadId]);
2609
- React17.useEffect(() => {
2784
+ React19.useEffect(() => {
2610
2785
  if (realtimeUsedContextSize == null) return;
2611
2786
  setUsedContextSize(realtimeUsedContextSize);
2612
2787
  }, [realtimeUsedContextSize]);
2613
- React17.useEffect(() => {
2788
+ React19.useEffect(() => {
2614
2789
  if (!stream.client) {
2615
2790
  setUsedContextSize(null);
2616
2791
  return;
@@ -2675,8 +2850,8 @@ function ContextUsageIndicator({
2675
2850
  });
2676
2851
  const usageLabelWithSuffix = usageLabel.endsWith(":") ? usageLabel : `${usageLabel}:`;
2677
2852
  const progressClassName = percent >= 90 ? "text-destructive" : percent >= 75 ? "text-amber-500" : "text-primary dark:text-zinc-300";
2678
- return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(Tooltip, { children: [
2679
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
2853
+ return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(Tooltip, { children: [
2854
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
2680
2855
  "button",
2681
2856
  {
2682
2857
  type: "button",
@@ -2685,19 +2860,19 @@ function ContextUsageIndicator({
2685
2860
  className
2686
2861
  ),
2687
2862
  "aria-label": `${usageLabelWithSuffix} ${usageFullLabel}. ${usageTokensLabel}`,
2688
- children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(ProgressCircle, { value: percent, className: cn("size-3.5", progressClassName) })
2863
+ children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(ProgressCircle, { value: percent, className: cn("size-3.5", progressClassName) })
2689
2864
  }
2690
2865
  ) }),
2691
- /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(TooltipContent, { side: "top", sideOffset: 6, className: "space-y-0.5 px-3 py-2 text-center", children: [
2692
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: "text-primary-foreground/70", children: usageLabelWithSuffix }),
2693
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: "font-medium text-primary-foreground/80", children: usageFullLabel }),
2694
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: "text-sm font-semibold", children: usageTokensLabel })
2866
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(TooltipContent, { side: "top", sideOffset: 6, className: "space-y-0.5 px-3 py-2 text-center", children: [
2867
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: "text-primary-foreground/70", children: usageLabelWithSuffix }),
2868
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: "font-medium text-primary-foreground/80", children: usageFullLabel }),
2869
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: "text-sm font-semibold", children: usageTokensLabel })
2695
2870
  ] })
2696
2871
  ] });
2697
2872
  }
2698
2873
 
2699
2874
  // src/components/chat.tsx
2700
- var import_jsx_runtime24 = require("react/jsx-runtime");
2875
+ var import_jsx_runtime26 = require("react/jsx-runtime");
2701
2876
  var import_meta2 = {};
2702
2877
  var defaultApiUrl2 = import_meta2.env.VITE_XPERTAI_API_URL;
2703
2878
  function formatMessageContent(content) {
@@ -2737,16 +2912,17 @@ function Chat({
2737
2912
  const apiUrl = options?.api?.apiUrl || defaultApiUrl2;
2738
2913
  const { setStream } = useStreamManager();
2739
2914
  const stream = useStreamContext();
2740
- const [isHistoryLoading, setIsHistoryLoading] = React18.useState(false);
2741
- const [historyError, setHistoryError] = React18.useState(null);
2742
- const [assistantName, setAssistantName] = React18.useState(null);
2915
+ const [isHistoryLoading, setIsHistoryLoading] = React20.useState(false);
2916
+ const [historyError, setHistoryError] = React20.useState(null);
2917
+ const [assistantName, setAssistantName] = React20.useState(null);
2918
+ const [assistantAvatar, setAssistantAvatar] = React20.useState(null);
2743
2919
  const LOADING_DOTS_MIN_DURATION = 800;
2744
- const [showLoadingDots, setShowLoadingDots] = React18.useState(false);
2745
- const loadingStartTimeRef = React18.useRef(null);
2746
- React18.useEffect(() => {
2920
+ const [showLoadingDots, setShowLoadingDots] = React20.useState(false);
2921
+ const loadingStartTimeRef = React20.useRef(null);
2922
+ React20.useEffect(() => {
2747
2923
  setStream(stream);
2748
2924
  }, [setStream, stream]);
2749
- React18.useEffect(() => {
2925
+ React20.useEffect(() => {
2750
2926
  if (stream.isLoading) {
2751
2927
  if (!loadingStartTimeRef.current) {
2752
2928
  loadingStartTimeRef.current = Date.now();
@@ -2769,48 +2945,48 @@ function Chat({
2769
2945
  }
2770
2946
  }
2771
2947
  }, [stream.isLoading]);
2772
- const [draft, setDraft] = React18.useState("");
2773
- const [selectedTool, setSelectedTool] = React18.useState(null);
2774
- const [attachments, setAttachments] = React18.useState([]);
2775
- const [isAtBottom, setIsAtBottom] = React18.useState(true);
2776
- const [hasUpdatesBelow, setHasUpdatesBelow] = React18.useState(false);
2948
+ const [draft, setDraft] = React20.useState("");
2949
+ const [selectedTool, setSelectedTool] = React20.useState(null);
2950
+ const [attachments, setAttachments] = React20.useState([]);
2951
+ const [isAtBottom, setIsAtBottom] = React20.useState(true);
2952
+ const [hasUpdatesBelow, setHasUpdatesBelow] = React20.useState(false);
2777
2953
  const {
2778
2954
  threads,
2779
2955
  deleteThread,
2780
2956
  refreshThreads,
2781
2957
  isLoading: isThreadsLoading
2782
2958
  } = useThreads();
2783
- const viewportRef = React18.useRef(null);
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);
2959
+ const viewportRef = React20.useRef(null);
2960
+ const fileInputRef = React20.useRef(null);
2961
+ const shouldAutoScrollRef = React20.useRef(true);
2962
+ const forceFollowRef = React20.useRef(false);
2963
+ const previousMessageCountRef = React20.useRef(0);
2964
+ const previousScrollTopRef = React20.useRef(0);
2965
+ const autoScrollFrameRef = React20.useRef(null);
2966
+ const isPointerDownRef = React20.useRef(false);
2967
+ const lastTouchYRef = React20.useRef(null);
2792
2968
  const resolvedTitle = title ?? t("chat.title");
2793
2969
  const resolvedPlaceholder = placeholder ?? t("chat.placeholder");
2794
2970
  const inputPlaceholder = selectedTool?.placeholderOverride ?? composer?.placeholder ?? resolvedPlaceholder;
2795
- const messages = React18.useMemo(() => stream.messages ?? [], [stream.messages]);
2971
+ const messages = React20.useMemo(() => stream.messages ?? [], [stream.messages]);
2796
2972
  const trimmedDraft = draft.trim();
2797
- const cancelPendingAutoScroll = React18.useCallback(() => {
2973
+ const cancelPendingAutoScroll = React20.useCallback(() => {
2798
2974
  if (autoScrollFrameRef.current !== null) {
2799
2975
  cancelAnimationFrame(autoScrollFrameRef.current);
2800
2976
  autoScrollFrameRef.current = null;
2801
2977
  }
2802
2978
  }, []);
2803
- const disableAutoFollow = React18.useCallback(() => {
2979
+ const disableAutoFollow = React20.useCallback(() => {
2804
2980
  forceFollowRef.current = false;
2805
2981
  shouldAutoScrollRef.current = false;
2806
2982
  cancelPendingAutoScroll();
2807
2983
  }, [cancelPendingAutoScroll]);
2808
- const enableAutoFollow = React18.useCallback(() => {
2984
+ const enableAutoFollow = React20.useCallback(() => {
2809
2985
  forceFollowRef.current = true;
2810
2986
  shouldAutoScrollRef.current = true;
2811
2987
  setHasUpdatesBelow(false);
2812
2988
  }, []);
2813
- const scrollToBottom = React18.useCallback((smooth = false, force = false) => {
2989
+ const scrollToBottom = React20.useCallback((smooth = false, force = false) => {
2814
2990
  if (force) {
2815
2991
  enableAutoFollow();
2816
2992
  }
@@ -2829,7 +3005,7 @@ function Chat({
2829
3005
  }
2830
3006
  });
2831
3007
  }, [cancelPendingAutoScroll, enableAutoFollow]);
2832
- React18.useEffect(() => {
3008
+ React20.useEffect(() => {
2833
3009
  const viewport = viewportRef.current;
2834
3010
  if (!viewport) return;
2835
3011
  previousScrollTopRef.current = viewport.scrollTop;
@@ -2900,14 +3076,14 @@ function Chat({
2900
3076
  window.removeEventListener("pointercancel", stopPointerTracking);
2901
3077
  };
2902
3078
  }, [cancelPendingAutoScroll, disableAutoFollow]);
2903
- React18.useEffect(() => {
3079
+ React20.useEffect(() => {
2904
3080
  shouldAutoScrollRef.current = true;
2905
3081
  forceFollowRef.current = false;
2906
3082
  previousScrollTopRef.current = 0;
2907
3083
  setIsAtBottom(true);
2908
3084
  setHasUpdatesBelow(false);
2909
3085
  }, [stream.threadId]);
2910
- React18.useEffect(() => {
3086
+ React20.useEffect(() => {
2911
3087
  const messageCountChanged = messages.length !== previousMessageCountRef.current;
2912
3088
  previousMessageCountRef.current = messages.length;
2913
3089
  if (!shouldAutoScrollRef.current) {
@@ -2926,19 +3102,32 @@ function Chat({
2926
3102
  const showMissingConfig = !isClientSecretInitializing && missingConfig;
2927
3103
  const hasUploadingFiles = attachments.some((a) => a.status === "uploading");
2928
3104
  const isSendDisabled = !trimmedDraft || stream.isLoading || missingConfig || isHistoryLoading || hasUploadingFiles;
2929
- React18.useEffect(() => {
3105
+ React20.useEffect(() => {
2930
3106
  if (missingConfig) return;
2931
3107
  void refreshThreads();
2932
3108
  }, [missingConfig, refreshThreads]);
2933
- React18.useEffect(() => {
2934
- if (missingConfig || !stream.client || !stream.assistantId) return;
3109
+ React20.useEffect(() => {
3110
+ if (missingConfig || !stream.client || !stream.assistantId) {
3111
+ setAssistantName(null);
3112
+ setAssistantAvatar(null);
3113
+ return;
3114
+ }
3115
+ setAssistantName(null);
3116
+ setAssistantAvatar(null);
3117
+ let cancelled = false;
2935
3118
  stream.client.assistants.get(stream.assistantId).then((assistant) => {
2936
- if (assistant) {
2937
- setAssistantName(assistant.metadata?.title || assistant.name);
2938
- }
3119
+ if (cancelled || !assistant) return;
3120
+ const assistantTitle2 = typeof assistant.metadata?.title === "string" && assistant.metadata.title.trim() ? assistant.metadata.title : assistant.name;
3121
+ setAssistantName(assistantTitle2);
3122
+ setAssistantAvatar(extractAssistantAvatar(assistant));
2939
3123
  }).catch((err) => {
3124
+ if (cancelled) return;
3125
+ setAssistantAvatar(null);
2940
3126
  console.warn("[Chat] Failed to load assistant info:", err);
2941
3127
  });
3128
+ return () => {
3129
+ cancelled = true;
3130
+ };
2942
3131
  }, [missingConfig, stream.client, stream.assistantId]);
2943
3132
  const uploadedFiles = attachments.filter((a) => a.status === "success" && a.storageFile).map((a) => ({
2944
3133
  id: a.storageFile?.id,
@@ -2976,6 +3165,7 @@ function Chat({
2976
3165
  },
2977
3166
  {
2978
3167
  ...requestOptions.context ? { context: requestOptions.context } : {},
3168
+ ...requestOptions.config ? { config: requestOptions.config } : {},
2979
3169
  optimisticValues: (prev) => {
2980
3170
  const prevMessages = prev?.messages ?? [];
2981
3171
  return { ...prev, messages: [...prevMessages, newMessage] };
@@ -2991,7 +3181,7 @@ function Chat({
2991
3181
  const handleAttachmentClick = () => {
2992
3182
  fileInputRef.current?.click();
2993
3183
  };
2994
- const uploadFile = React18.useCallback(async (localId, file) => {
3184
+ const uploadFile = React20.useCallback(async (localId, file) => {
2995
3185
  try {
2996
3186
  const result = await stream.client.contexts.uploadFile(file);
2997
3187
  setAttachments(
@@ -3011,7 +3201,7 @@ function Chat({
3011
3201
  );
3012
3202
  }
3013
3203
  }, [stream.client]);
3014
- const handleRetryUpload = React18.useCallback((localId) => {
3204
+ const handleRetryUpload = React20.useCallback((localId) => {
3015
3205
  const attachment = attachments.find((a) => a.localId === localId);
3016
3206
  if (!attachment || attachment.status !== "error") return;
3017
3207
  setAttachments(
@@ -3086,7 +3276,7 @@ function Chat({
3086
3276
  );
3087
3277
  scrollToBottom(true, true);
3088
3278
  };
3089
- const loadConversationMessages = React18.useCallback(
3279
+ const loadConversationMessages = React20.useCallback(
3090
3280
  async (recordId) => {
3091
3281
  if (missingConfig) {
3092
3282
  setHistoryError(t("chat.missingConfigShort"));
@@ -3168,17 +3358,18 @@ function Chat({
3168
3358
  }
3169
3359
  };
3170
3360
  const acceptMimes = composer?.attachments?.accept ? Object.entries(composer.attachments.accept).map(([mime, exts]) => [mime, ...exts.map((e) => `.${e}`)].join(",")).join(",") : void 0;
3171
- const currentThread = React18.useMemo(
3361
+ const currentThread = React20.useMemo(
3172
3362
  () => threads.find((item) => item.id === stream.threadId),
3173
3363
  [threads, stream.threadId]
3174
3364
  );
3175
3365
  const errorMessage = stream.error instanceof Error ? stream.error.message : void 0;
3176
- const threadErrorMessage = React18.useMemo(() => {
3366
+ const threadErrorMessage = React20.useMemo(() => {
3177
3367
  if (currentThread?.status !== "error") return void 0;
3178
3368
  const message = currentThread.error?.trim();
3179
3369
  return message || t("thread.errorToast");
3180
3370
  }, [currentThread, t]);
3181
- return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
3371
+ const assistantTitle = assistantName || resolvedTitle;
3372
+ return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
3182
3373
  "div",
3183
3374
  {
3184
3375
  ref: viewportRef,
@@ -3187,16 +3378,26 @@ function Chat({
3187
3378
  className
3188
3379
  ),
3189
3380
  children: [
3190
- /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "flex items-center justify-between border-b px-4 py-2 sticky top-0 z-10 bg-background", children: [
3191
- /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "flex items-center gap-3", children: [
3192
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "h-2 w-2 rounded-full bg-green-500" }),
3193
- /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { children: [
3194
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("h2", { className: "text-lg font-semibold", children: assistantName || resolvedTitle }),
3195
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("p", { className: "text-xs text-muted-foreground", children: t("chat.statusOnline") })
3381
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "flex items-center justify-between border-b p-2 sticky top-0 z-10 bg-background", children: [
3382
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "flex items-center gap-3 overflow-hidden", children: [
3383
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "relative shrink-0", children: [
3384
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
3385
+ ChatkitAvatar,
3386
+ {
3387
+ avatar: assistantAvatar,
3388
+ className: "h-9 w-9 border border-border/60",
3389
+ label: assistantTitle
3390
+ }
3391
+ ),
3392
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { className: "absolute bottom-0 right-0 h-2.5 w-2.5 rounded-full border-2 border-background bg-green-500" })
3393
+ ] }),
3394
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "truncate", children: [
3395
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("h2", { className: "text-lg font-semibold truncate", title: assistantTitle, children: assistantTitle }),
3396
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("p", { className: "text-xs text-muted-foreground", children: t("chat.statusOnline") })
3196
3397
  ] })
3197
3398
  ] }),
3198
- history?.enabled !== false && /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "flex items-center gap-1", children: [
3199
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
3399
+ history?.enabled !== false && /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "flex items-center gap-1", children: [
3400
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
3200
3401
  "button",
3201
3402
  {
3202
3403
  type: "button",
@@ -3209,10 +3410,10 @@ function Chat({
3209
3410
  "disabled:opacity-50 disabled:cursor-not-allowed"
3210
3411
  ),
3211
3412
  title: t("history.newThread"),
3212
- children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_lucide_react9.Pencil, { size: 16 })
3413
+ children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_lucide_react9.Pencil, { size: 16 })
3213
3414
  }
3214
3415
  ),
3215
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
3416
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
3216
3417
  HistorySidebar,
3217
3418
  {
3218
3419
  threads,
@@ -3226,23 +3427,23 @@ function Chat({
3226
3427
  )
3227
3428
  ] })
3228
3429
  ] }),
3229
- /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "flex-1 p-4", children: [
3230
- errorMessage && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "mb-4 rounded-lg border border-destructive/30 bg-destructive/10 px-3 py-2 text-sm text-destructive", children: errorMessage }),
3231
- historyError && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "mb-4 rounded-lg border border-amber-200 bg-amber-50 px-3 py-2 text-sm text-amber-900", children: historyError }),
3232
- showMissingConfig && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("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") }),
3233
- isHistoryLoading && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "mb-4 rounded-lg border border-muted px-3 py-2 text-sm text-muted-foreground", children: t("chat.loadingThread") }),
3234
- messages.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
3430
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "flex-1 p-4", children: [
3431
+ errorMessage && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "mb-4 rounded-lg border border-destructive/30 bg-destructive/10 px-3 py-2 text-sm text-destructive", children: errorMessage }),
3432
+ historyError && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "mb-4 rounded-lg border border-amber-200 bg-amber-50 px-3 py-2 text-sm text-amber-900", children: historyError }),
3433
+ showMissingConfig && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("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") }),
3434
+ isHistoryLoading && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "mb-4 rounded-lg border border-muted px-3 py-2 text-sm text-muted-foreground", children: t("chat.loadingThread") }),
3435
+ messages.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
3235
3436
  StartScreen,
3236
3437
  {
3237
3438
  startScreen,
3238
3439
  onPromptClick: handlePromptClick
3239
3440
  }
3240
- ) : /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "space-y-4", children: [
3441
+ ) : /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "space-y-4", children: [
3241
3442
  messages.map((message, index) => {
3242
3443
  const messageType = String(message.type);
3243
3444
  const isAssistantMessage = messageType === "assistant" || messageType === "ai";
3244
3445
  const messageContent = typeof message.content === "string" ? message.content : Array.isArray(message.content) ? message.content.map((part) => formatMessageContent(part)).join("") : formatMessageContent(message.content);
3245
- return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
3446
+ return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
3246
3447
  "div",
3247
3448
  {
3248
3449
  className: cn(
@@ -3250,8 +3451,8 @@ function Chat({
3250
3451
  message.type === "human" ? "justify-end" : "justify-start -ml-1"
3251
3452
  // AI messages: slightly closer to left
3252
3453
  ),
3253
- children: /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "flex flex-col px-3 overflow-hidden", children: [
3254
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
3454
+ children: /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "flex flex-col px-3 overflow-hidden", children: [
3455
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
3255
3456
  "div",
3256
3457
  {
3257
3458
  className: cn(
@@ -3259,7 +3460,7 @@ function Chat({
3259
3460
  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"
3260
3461
  // AI messages: use chat-specific foreground color
3261
3462
  ),
3262
- children: isAssistantMessage ? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
3463
+ children: isAssistantMessage ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
3263
3464
  AssistantMessage,
3264
3465
  {
3265
3466
  message: {
@@ -3268,30 +3469,30 @@ function Chat({
3268
3469
  },
3269
3470
  isStreaming: stream.isLoading && index === messages.length - 1
3270
3471
  }
3271
- ) : /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(import_jsx_runtime24.Fragment, { children: [
3272
- message.type === "human" && message.attachments?.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "flex flex-wrap gap-1.5 mb-2", children: message.attachments.map((file, fileIndex) => /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
3472
+ ) : /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_jsx_runtime26.Fragment, { children: [
3473
+ message.type === "human" && message.attachments?.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "flex flex-wrap gap-1.5 mb-2", children: message.attachments.map((file, fileIndex) => /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
3273
3474
  "div",
3274
3475
  {
3275
3476
  className: "flex items-center gap-1.5 rounded-md bg-primary-foreground/20 px-2 py-1 text-xs",
3276
3477
  children: [
3277
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_lucide_react9.FileText, { size: 12 }),
3278
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { className: "max-w-[100px] truncate", children: file.originalName })
3478
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_lucide_react9.FileText, { size: 12 }),
3479
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { className: "max-w-[100px] truncate", children: file.originalName })
3279
3480
  ]
3280
3481
  },
3281
3482
  fileIndex
3282
3483
  )) }),
3283
- Array.isArray(message.content) ? message.content.map((part, partIndex) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
3484
+ Array.isArray(message.content) ? message.content.map((part, partIndex) => /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
3284
3485
  "p",
3285
3486
  {
3286
3487
  className: "wrap-break-word text-sm leading-relaxed",
3287
3488
  children: formatMessageContent(part)
3288
3489
  },
3289
3490
  `${part.type}-${partIndex}`
3290
- )) : /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { className: "wrap-break-word text-sm leading-relaxed", children: formatMessageContent(message.content) })
3491
+ )) : /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { className: "wrap-break-word text-sm leading-relaxed", children: formatMessageContent(message.content) })
3291
3492
  ] })
3292
3493
  }
3293
3494
  ),
3294
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
3495
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
3295
3496
  MessageActions,
3296
3497
  {
3297
3498
  content: messageContent,
@@ -3312,15 +3513,15 @@ function Chat({
3312
3513
  const lastMsgContent = lastMessage?.content;
3313
3514
  const hasSubstantialContent = isLastMessageFromAI && (typeof lastMsgContent === "string" && lastMsgContent.length > 10 || Array.isArray(lastMsgContent) && lastMsgContent.length > 0);
3314
3515
  if (hasSubstantialContent) return null;
3315
- return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "flex justify-start gap-3 -ml-2", children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "max-w-full rounded-2xl py-2.5", children: /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "flex gap-1.5", children: [
3316
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "h-2 w-2 animate-bounce rounded-full bg-muted-foreground/60 [animation-delay:-0.3s]" }),
3317
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "h-2 w-2 animate-bounce rounded-full bg-muted-foreground/60 [animation-delay:-0.15s]" }),
3318
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "h-2 w-2 animate-bounce rounded-full bg-muted-foreground/60" })
3516
+ return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "flex justify-start gap-3 -ml-2", children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "max-w-full rounded-2xl py-2.5", children: /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "flex gap-1.5", children: [
3517
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "h-2 w-2 animate-bounce rounded-full bg-muted-foreground/60 [animation-delay:-0.3s]" }),
3518
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "h-2 w-2 animate-bounce rounded-full bg-muted-foreground/60 [animation-delay:-0.15s]" }),
3519
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "h-2 w-2 animate-bounce rounded-full bg-muted-foreground/60" })
3319
3520
  ] }) }) });
3320
3521
  })()
3321
3522
  ] })
3322
3523
  ] }),
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)(
3524
+ !isAtBottom && messages.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "sticky bottom-20 z-20 flex justify-center px-4 pointer-events-none", children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
3324
3525
  Button,
3325
3526
  {
3326
3527
  type: "button",
@@ -3333,12 +3534,12 @@ function Chat({
3333
3534
  onClick: () => scrollToBottom(true, true),
3334
3535
  "aria-label": t("chat.scrollToBottom"),
3335
3536
  title: t("chat.scrollToBottom"),
3336
- children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_lucide_react9.ArrowDown, { size: 16 })
3537
+ children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_lucide_react9.ArrowDown, { size: 16 })
3337
3538
  }
3338
3539
  ) }),
3339
- /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "p-2 sticky bottom-0 z-10 bg-background", children: [
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 }),
3341
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
3540
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "p-2 sticky bottom-0 z-10 bg-background", children: [
3541
+ threadErrorMessage && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "mb-3 rounded-lg border border-destructive/30 bg-destructive/10 px-3 py-2 text-sm text-destructive", children: threadErrorMessage }),
3542
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
3342
3543
  "input",
3343
3544
  {
3344
3545
  ref: fileInputRef,
@@ -3349,7 +3550,7 @@ function Chat({
3349
3550
  className: "hidden"
3350
3551
  }
3351
3552
  ),
3352
- attachments.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "mb-3 flex flex-wrap gap-2", children: attachments.map((item) => /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
3553
+ attachments.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "mb-3 flex flex-wrap gap-2", children: attachments.map((item) => /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
3353
3554
  "div",
3354
3555
  {
3355
3556
  className: cn(
@@ -3357,24 +3558,24 @@ function Chat({
3357
3558
  item.status === "error" ? "bg-destructive/10 border border-destructive/30" : "bg-muted"
3358
3559
  ),
3359
3560
  children: [
3360
- item.status === "uploading" && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_lucide_react9.Loader2, { size: 14, className: "animate-spin text-muted-foreground" }),
3361
- item.status === "success" && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_lucide_react9.FileText, { size: 14, className: "text-muted-foreground" }),
3362
- item.status === "error" && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_lucide_react9.FileText, { size: 14, className: "text-destructive" }),
3363
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { className: cn(
3561
+ item.status === "uploading" && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_lucide_react9.Loader2, { size: 14, className: "animate-spin text-muted-foreground" }),
3562
+ item.status === "success" && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_lucide_react9.FileText, { size: 14, className: "text-muted-foreground" }),
3563
+ item.status === "error" && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_lucide_react9.FileText, { size: 14, className: "text-destructive" }),
3564
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { className: cn(
3364
3565
  "max-w-30 truncate",
3365
3566
  item.status === "error" && "text-destructive"
3366
3567
  ), children: item.file.name }),
3367
- item.status === "error" && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
3568
+ item.status === "error" && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
3368
3569
  "button",
3369
3570
  {
3370
3571
  type: "button",
3371
3572
  onClick: () => handleRetryUpload(item.localId),
3372
3573
  className: "ml-1 rounded-full p-0.5 text-destructive hover:bg-destructive/20",
3373
3574
  title: t("chat.retryUpload"),
3374
- children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_lucide_react9.RefreshCw, { size: 12 })
3575
+ children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_lucide_react9.RefreshCw, { size: 12 })
3375
3576
  }
3376
3577
  ),
3377
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
3578
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
3378
3579
  "button",
3379
3580
  {
3380
3581
  type: "button",
@@ -3383,26 +3584,26 @@ function Chat({
3383
3584
  "ml-1 rounded-full p-0.5",
3384
3585
  item.status === "error" ? "text-destructive hover:bg-destructive/20" : "hover:bg-muted-foreground/20"
3385
3586
  ),
3386
- children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_lucide_react9.X, { size: 12 })
3587
+ children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_lucide_react9.X, { size: 12 })
3387
3588
  }
3388
3589
  )
3389
3590
  ]
3390
3591
  },
3391
3592
  item.localId
3392
3593
  )) }),
3393
- selectedTool && /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "mb-2 flex items-center gap-2", children: [
3394
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { className: "rounded-full bg-primary/10 px-2 py-0.5 text-xs font-medium text-primary", children: selectedTool.shortLabel ?? selectedTool.label }),
3395
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
3594
+ selectedTool && /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "mb-2 flex items-center gap-2", children: [
3595
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { className: "rounded-full bg-primary/10 px-2 py-0.5 text-xs font-medium text-primary", children: selectedTool.shortLabel ?? selectedTool.label }),
3596
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
3396
3597
  "button",
3397
3598
  {
3398
3599
  type: "button",
3399
3600
  onClick: () => setSelectedTool(null),
3400
3601
  className: "rounded-full p-0.5 text-muted-foreground hover:bg-muted",
3401
- children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_lucide_react9.X, { size: 12 })
3602
+ children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_lucide_react9.X, { size: 12 })
3402
3603
  }
3403
3604
  )
3404
3605
  ] }),
3405
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("form", { className: "flex items-center", onSubmit: handleSubmit, children: /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
3606
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("form", { className: "flex items-center", onSubmit: handleSubmit, children: /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
3406
3607
  "div",
3407
3608
  {
3408
3609
  className: cn(
@@ -3413,7 +3614,7 @@ function Chat({
3413
3614
  "transition-shadow duration-200"
3414
3615
  ),
3415
3616
  children: [
3416
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
3617
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
3417
3618
  ComposerMenu,
3418
3619
  {
3419
3620
  composer,
@@ -3423,7 +3624,7 @@ function Chat({
3423
3624
  disabled: stream.isLoading || missingConfig || isHistoryLoading
3424
3625
  }
3425
3626
  ),
3426
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
3627
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
3427
3628
  "input",
3428
3629
  {
3429
3630
  type: "text",
@@ -3439,7 +3640,7 @@ function Chat({
3439
3640
  autoComplete: "off"
3440
3641
  }
3441
3642
  ),
3442
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
3643
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
3443
3644
  SendButton,
3444
3645
  {
3445
3646
  disabled: isSendDisabled,
@@ -3452,7 +3653,7 @@ function Chat({
3452
3653
  ]
3453
3654
  }
3454
3655
  ) }),
3455
- disclaimer?.text && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
3656
+ disclaimer?.text && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
3456
3657
  "p",
3457
3658
  {
3458
3659
  className: cn(
@@ -3462,9 +3663,9 @@ function Chat({
3462
3663
  children: disclaimer.text
3463
3664
  }
3464
3665
  ),
3465
- /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "mt-2 flex items-center justify-center gap-2 text-xs text-muted-foreground", children: [
3466
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { children: t("chat.poweredBy") }),
3467
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(ContextUsageIndicator, { className: "absolute right-4" })
3666
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "mt-2 flex items-center justify-center gap-2 text-xs text-muted-foreground", children: [
3667
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { children: t("chat.poweredBy") }),
3668
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(ContextUsageIndicator, { className: "absolute right-4" })
3468
3669
  ] })
3469
3670
  ] })
3470
3671
  ]
@@ -3473,11 +3674,11 @@ function Chat({
3473
3674
  }
3474
3675
 
3475
3676
  // src/components/ui/input.tsx
3476
- var React19 = __toESM(require("react"), 1);
3477
- var import_jsx_runtime25 = require("react/jsx-runtime");
3478
- var Input = React19.forwardRef(
3677
+ var React21 = __toESM(require("react"), 1);
3678
+ var import_jsx_runtime27 = require("react/jsx-runtime");
3679
+ var Input = React21.forwardRef(
3479
3680
  ({ className, type, ...props }, ref) => {
3480
- return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
3681
+ return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
3481
3682
  "input",
3482
3683
  {
3483
3684
  ref,
@@ -3493,49 +3694,11 @@ var Input = React19.forwardRef(
3493
3694
  );
3494
3695
  Input.displayName = "Input";
3495
3696
 
3496
- // src/components/ui/avatar.tsx
3497
- var React20 = __toESM(require("react"), 1);
3498
- var AvatarPrimitive = __toESM(require("@radix-ui/react-avatar"), 1);
3499
- var import_jsx_runtime26 = require("react/jsx-runtime");
3500
- var Avatar = React20.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
3501
- AvatarPrimitive.Root,
3502
- {
3503
- ref,
3504
- className: cn(
3505
- "relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",
3506
- className
3507
- ),
3508
- ...props
3509
- }
3510
- ));
3511
- Avatar.displayName = AvatarPrimitive.Root.displayName;
3512
- var AvatarImage = React20.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
3513
- AvatarPrimitive.Image,
3514
- {
3515
- ref,
3516
- className: cn("aspect-square h-full w-full", className),
3517
- ...props
3518
- }
3519
- ));
3520
- AvatarImage.displayName = AvatarPrimitive.Image.displayName;
3521
- var AvatarFallback = React20.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
3522
- AvatarPrimitive.Fallback,
3523
- {
3524
- ref,
3525
- className: cn(
3526
- "flex h-full w-full items-center justify-center rounded-full bg-muted",
3527
- className
3528
- ),
3529
- ...props
3530
- }
3531
- ));
3532
- AvatarFallback.displayName = AvatarPrimitive.Fallback.displayName;
3533
-
3534
3697
  // src/components/ui/separator.tsx
3535
- var React21 = __toESM(require("react"), 1);
3536
- var import_jsx_runtime27 = require("react/jsx-runtime");
3537
- var Separator = React21.forwardRef(
3538
- ({ className, orientation = "horizontal", ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
3698
+ var React22 = __toESM(require("react"), 1);
3699
+ var import_jsx_runtime28 = require("react/jsx-runtime");
3700
+ var Separator = React22.forwardRef(
3701
+ ({ className, orientation = "horizontal", ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
3539
3702
  "div",
3540
3703
  {
3541
3704
  ref,
@@ -3566,6 +3729,7 @@ Separator.displayName = "Separator";
3566
3729
  CardHeader,
3567
3730
  CardTitle,
3568
3731
  Chat,
3732
+ ChatkitAvatar,
3569
3733
  Input,
3570
3734
  ParentMessengerProvider,
3571
3735
  ScrollArea,
@@ -3577,7 +3741,10 @@ Separator.displayName = "Separator";
3577
3741
  TabsTrigger,
3578
3742
  ThemeProvider,
3579
3743
  chatkitSupportedLocales,
3744
+ extractAssistantAvatar,
3745
+ getAvatarFallback,
3580
3746
  getChatkitLanguage,
3747
+ normalizeChatkitAvatar,
3581
3748
  setChatkitLanguage,
3582
3749
  useParentMessenger,
3583
3750
  useTheme