@xpert-ai/chatkit-ui 0.0.10 → 0.0.15

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 (283) hide show
  1. package/dist/app/assets/{abap-CpKSSrK_.js → abap-BWs0QYPi.js} +1 -1
  2. package/dist/app/assets/{abnf-BVL0u9PX.js → abnf-D836Ekee.js} +1 -1
  3. package/dist/app/assets/{actionscript-C_sqaulT.js → actionscript-DwxVdnYd.js} +1 -1
  4. package/dist/app/assets/{ada-CUBoAgmH.js → ada-DuqPZP7y.js} +1 -1
  5. package/dist/app/assets/{agda-BDxdJxRp.js → agda--lKV47zi.js} +1 -1
  6. package/dist/app/assets/{al-i9blZBn9.js → al-DmWukAFp.js} +1 -1
  7. package/dist/app/assets/{antlr4-cDPlCT9z.js → antlr4-Cui9A7Z6.js} +1 -1
  8. package/dist/app/assets/{apacheconf-mx1wZ8Bm.js → apacheconf-p7Nhi2d3.js} +1 -1
  9. package/dist/app/assets/{apex-DMI3JjWh.js → apex-wwNmkUuv.js} +1 -1
  10. package/dist/app/assets/{apl-_8ogJZ7X.js → apl-CQGwfDry.js} +1 -1
  11. package/dist/app/assets/{applescript-BWFg5Ha1.js → applescript-CxRglPCi.js} +1 -1
  12. package/dist/app/assets/{aql-D_EqAs4I.js → aql-DzrzGLDh.js} +1 -1
  13. package/dist/app/assets/{arduino-DrH35aeU.js → arduino-Bl4m690J.js} +1 -1
  14. package/dist/app/assets/{arff-DQqF3M_l.js → arff-Bi4yNRUp.js} +1 -1
  15. package/dist/app/assets/{asciidoc-C4IoUu6K.js → asciidoc-CPTTRBXf.js} +1 -1
  16. package/dist/app/assets/{asm6502-BQ6KGqID.js → asm6502-CBolQ2s3.js} +1 -1
  17. package/dist/app/assets/{asmatmel-DHU7bQLh.js → asmatmel-DwyOAW8C.js} +1 -1
  18. package/dist/app/assets/{aspnet-BSyGAXSd.js → aspnet-K1n3IryN.js} +1 -1
  19. package/dist/app/assets/{autohotkey-CEssrsWy.js → autohotkey-DKr5NeGL.js} +1 -1
  20. package/dist/app/assets/{autoit-DFqGJrrh.js → autoit-BmaRQ3eS.js} +1 -1
  21. package/dist/app/assets/{avisynth-D8lXWMQA.js → avisynth-B5jllq4s.js} +1 -1
  22. package/dist/app/assets/{avro-idl-MjcQcvjH.js → avro-idl-D79eqXPk.js} +1 -1
  23. package/dist/app/assets/{bash-BR_8TZ7p.js → bash-DWI44uVu.js} +1 -1
  24. package/dist/app/assets/{basic-CBfC-BKI.js → basic-DX5tJRab.js} +1 -1
  25. package/dist/app/assets/{batch-BYpzJTg5.js → batch-BZon0dQf.js} +1 -1
  26. package/dist/app/assets/{bbcode-BZ8pPSr8.js → bbcode-CCzrmpJu.js} +1 -1
  27. package/dist/app/assets/{bicep-GwE5NVdg.js → bicep-BhU89M6Z.js} +1 -1
  28. package/dist/app/assets/{birb-BeqeGoZ_.js → birb-CpbVfpC3.js} +1 -1
  29. package/dist/app/assets/{bison-CQwgQQvh.js → bison-C7eKJdUK.js} +1 -1
  30. package/dist/app/assets/{bnf-BGM0sncB.js → bnf-C41JeurH.js} +1 -1
  31. package/dist/app/assets/{brainfuck-lB4i24bM.js → brainfuck-DL3BN1lC.js} +1 -1
  32. package/dist/app/assets/{brightscript-Dl8MNYiF.js → brightscript-C1ciaxot.js} +1 -1
  33. package/dist/app/assets/{bro-CY-c2xJz.js → bro-DeUBCRiY.js} +1 -1
  34. package/dist/app/assets/{bsl-Bovqxv8h.js → bsl-BVdoLWrt.js} +1 -1
  35. package/dist/app/assets/{c-Ci50forI.js → c-D-NlgPSm.js} +1 -1
  36. package/dist/app/assets/{cfscript-BX3YmBro.js → cfscript-CI77gY57.js} +1 -1
  37. package/dist/app/assets/{chaiscript-xOdo2D1o.js → chaiscript-D92IIXjK.js} +1 -1
  38. package/dist/app/assets/{cil-DHUeAnM1.js → cil-Vi00szx4.js} +1 -1
  39. package/dist/app/assets/{clike-D2eiYtKe.js → clike-K_AYaoxN.js} +1 -1
  40. package/dist/app/assets/{clojure-B5bjqSmp.js → clojure-IjprIaXK.js} +1 -1
  41. package/dist/app/assets/{cmake-BxDL9iad.js → cmake-CiZsn6Cd.js} +1 -1
  42. package/dist/app/assets/{cobol-BpXwlbJI.js → cobol-BsMCYJOB.js} +1 -1
  43. package/dist/app/assets/{coffeescript-Nv9bpn0a.js → coffeescript-Tn0NVIMO.js} +1 -1
  44. package/dist/app/assets/{concurnas-BPP9Cnh4.js → concurnas-Qkduv-yR.js} +1 -1
  45. package/dist/app/assets/{coq-Dx6VfsEA.js → coq-CkiZ3gEL.js} +1 -1
  46. package/dist/app/assets/{core-CaWqkwwr.js → core-BIe9U2bi.js} +1 -1
  47. package/dist/app/assets/{cpp-DdnjSWFZ.js → cpp-DUkuUOiy.js} +1 -1
  48. package/dist/app/assets/{crystal-CWe_65uG.js → crystal-DzDaEh84.js} +1 -1
  49. package/dist/app/assets/{csharp-Cdi1xWuC.js → csharp-Ds4tzl1h.js} +1 -1
  50. package/dist/app/assets/{cshtml-B4G8DJ3U.js → cshtml-XSfeicox.js} +1 -1
  51. package/dist/app/assets/{csp-mPeZI98g.js → csp-BnuytBc2.js} +1 -1
  52. package/dist/app/assets/{css-extras-y3PUbTY5.js → css-extras-BYbzAK7f.js} +1 -1
  53. package/dist/app/assets/{css-BvF-zJtq.js → css-uvHkMV3H.js} +1 -1
  54. package/dist/app/assets/{csv-vWHT1ozX.js → csv-ZTBDHIMG.js} +1 -1
  55. package/dist/app/assets/{cypher-C3VwuNjB.js → cypher-8jmGfbdR.js} +1 -1
  56. package/dist/app/assets/{d-ChOi10nO.js → d-DFbflmjx.js} +1 -1
  57. package/dist/app/assets/{dart-l5mU-ZLY.js → dart-xe2OJ0zL.js} +1 -1
  58. package/dist/app/assets/{dataweave-CsDj_aMO.js → dataweave-cyUIz_PL.js} +1 -1
  59. package/dist/app/assets/{dax-DJOHLMB9.js → dax-BnxULnvb.js} +1 -1
  60. package/dist/app/assets/{dhall-DQm-mZhA.js → dhall-DkVQZ3C3.js} +1 -1
  61. package/dist/app/assets/{diff-BVwIh1po.js → diff-u2elSjyY.js} +1 -1
  62. package/dist/app/assets/{django-DtsnWdmi.js → django-DWfaa1BH.js} +1 -1
  63. package/dist/app/assets/{dns-zone-file-Bt1skU7w.js → dns-zone-file-BxxD9YiY.js} +1 -1
  64. package/dist/app/assets/{docker-BlsPFCy3.js → docker-agJ_fYVN.js} +1 -1
  65. package/dist/app/assets/{dot-DUVVSuew.js → dot-DfK48nzU.js} +1 -1
  66. package/dist/app/assets/{ebnf-BsDLHJKX.js → ebnf-D2_uN5ZR.js} +1 -1
  67. package/dist/app/assets/{editorconfig-BS0KK0Ub.js → editorconfig-Bkm8bu86.js} +1 -1
  68. package/dist/app/assets/{eiffel-b4q1Q1qO.js → eiffel-KNdMI65Y.js} +1 -1
  69. package/dist/app/assets/{ejs-Dww-1ssh.js → ejs-CscaSYIN.js} +1 -1
  70. package/dist/app/assets/{elixir-BnCqGTxk.js → elixir-BNlWI1r7.js} +1 -1
  71. package/dist/app/assets/{elm-BlcyOCTR.js → elm-CNwbF3_9.js} +1 -1
  72. package/dist/app/assets/{erb-IU9eqmmY.js → erb-DtFL1xmZ.js} +1 -1
  73. package/dist/app/assets/{erlang-DA1rWFnM.js → erlang-C0jBeitv.js} +1 -1
  74. package/dist/app/assets/{etlua-CaxgZH-h.js → etlua-B_FYDHoo.js} +1 -1
  75. package/dist/app/assets/{excel-formula-Cf8-wBDh.js → excel-formula-Ddk-Nf9I.js} +1 -1
  76. package/dist/app/assets/{factor-Tcum1DGN.js → factor-CmwX-7Jh.js} +1 -1
  77. package/dist/app/assets/{false-6Loz_2ZI.js → false-DyBWE4qx.js} +1 -1
  78. package/dist/app/assets/{firestore-security-rules-DSOwpbPT.js → firestore-security-rules-BnA9yQQx.js} +1 -1
  79. package/dist/app/assets/{flow-BYv59F4U.js → flow-DN7IgZst.js} +1 -1
  80. package/dist/app/assets/{fortran-1Ynd1g_l.js → fortran-CWBI75l9.js} +1 -1
  81. package/dist/app/assets/{fsharp-DKtLBT4N.js → fsharp-Be4_1ptQ.js} +1 -1
  82. package/dist/app/assets/{ftl-rOBeTgCe.js → ftl-CGRdQf4s.js} +1 -1
  83. package/dist/app/assets/{gap-CLCkiuT_.js → gap-BKioDcPC.js} +1 -1
  84. package/dist/app/assets/{gcode-fZi1s7qd.js → gcode-Dn2cLzkC.js} +1 -1
  85. package/dist/app/assets/{gdscript-D791ThWx.js → gdscript-CJOS-gjk.js} +1 -1
  86. package/dist/app/assets/{gedcom-BSxk86Bn.js → gedcom-CplceX5G.js} +1 -1
  87. package/dist/app/assets/{gherkin-DSJcm4x_.js → gherkin-DMSysr5I.js} +1 -1
  88. package/dist/app/assets/{git-B9-mQ4_l.js → git-CPW7sXGf.js} +1 -1
  89. package/dist/app/assets/{glsl-DregI2-u.js → glsl-k-facHOT.js} +1 -1
  90. package/dist/app/assets/{gml-BhaH01cU.js → gml-CV--3uCc.js} +1 -1
  91. package/dist/app/assets/{gn-CXxPFJQ_.js → gn-jkosEbNS.js} +1 -1
  92. package/dist/app/assets/{go-DP3Jxp6y.js → go-BNQLRlmA.js} +1 -1
  93. package/dist/app/assets/{go-module-CiAIsLM3.js → go-module-DbWOj2H0.js} +1 -1
  94. package/dist/app/assets/{graphql-CaSbVnLG.js → graphql-usPW3Fl7.js} +1 -1
  95. package/dist/app/assets/{groovy-D6HAXDfs.js → groovy-MKE1O2R9.js} +1 -1
  96. package/dist/app/assets/{haml-CwutxnJD.js → haml-_mDStvsq.js} +1 -1
  97. package/dist/app/assets/{handlebars-B-09CZ7P.js → handlebars-CIl8TmZq.js} +1 -1
  98. package/dist/app/assets/{haskell-Rze2y2YD.js → haskell-Cm4BzUdQ.js} +1 -1
  99. package/dist/app/assets/{haxe-DaQGjvgL.js → haxe-COKxOzXV.js} +1 -1
  100. package/dist/app/assets/{hcl-BZbr_bNr.js → hcl-DUZa-9cr.js} +1 -1
  101. package/dist/app/assets/{hlsl-Bz26R-03.js → hlsl-Dxo1rrBG.js} +1 -1
  102. package/dist/app/assets/{hoon-Bdr0VJqd.js → hoon-DZk8Paai.js} +1 -1
  103. package/dist/app/assets/{hpkp-Dq_sBE4w.js → hpkp-Bf9ZU2kJ.js} +1 -1
  104. package/dist/app/assets/{hsts-Bt89fuV0.js → hsts-CMX9dH_c.js} +1 -1
  105. package/dist/app/assets/{http-B3HJMLFi.js → http-BdPDUUlX.js} +1 -1
  106. package/dist/app/assets/{ichigojam-DSGx2rww.js → ichigojam-DZWqQfTk.js} +1 -1
  107. package/dist/app/assets/{icon-BsSu7TVp.js → icon-CSC5VGP_.js} +1 -1
  108. package/dist/app/assets/{icu-message-format-B9aA-RMV.js → icu-message-format-CtRFWyFe.js} +1 -1
  109. package/dist/app/assets/{idris-Bw5AhjWp.js → idris-D2LDs3co.js} +1 -1
  110. package/dist/app/assets/{iecst-B3d92Fx8.js → iecst-kpaa10GT.js} +1 -1
  111. package/dist/app/assets/{ignore-CjZeEZ3Q.js → ignore-B6TeQ2cq.js} +1 -1
  112. package/dist/app/assets/{index-DsJq9G3Y.js → index-C9w4yW8p.js} +92 -92
  113. package/dist/app/assets/index-DcB156i0.css +1 -0
  114. package/dist/app/assets/{inform7-V8411CET.js → inform7-B2DiX5z0.js} +1 -1
  115. package/dist/app/assets/{ini-CXdKYDPt.js → ini-CJgz2CJx.js} +1 -1
  116. package/dist/app/assets/{io-gXeCsUNI.js → io-C4PjllHD.js} +1 -1
  117. package/dist/app/assets/{j-MV0gySsy.js → j-BKSoIQwQ.js} +1 -1
  118. package/dist/app/assets/{java-CcFTmX5o.js → java-CHbVZ6UP.js} +1 -1
  119. package/dist/app/assets/{javadoc-CwBHzHZi.js → javadoc-CPqAjHoM.js} +1 -1
  120. package/dist/app/assets/{javadoclike-DNbF66_R.js → javadoclike-Bs-8xh3H.js} +1 -1
  121. package/dist/app/assets/{javascript-Dal0il8M.js → javascript-BT_NpjyP.js} +1 -1
  122. package/dist/app/assets/{javastacktrace-C8Nlpi-O.js → javastacktrace-Drjxr-oB.js} +1 -1
  123. package/dist/app/assets/{jexl-CECnT_QW.js → jexl-BxjDgVx9.js} +1 -1
  124. package/dist/app/assets/{jolie-Cts9p6KC.js → jolie-BqMpKk0G.js} +1 -1
  125. package/dist/app/assets/{jq-xBk2Ii8R.js → jq-BHUHr0op.js} +1 -1
  126. package/dist/app/assets/{js-extras-96PL4Xzt.js → js-extras-D4wvqur3.js} +1 -1
  127. package/dist/app/assets/{js-templates-CokWOpKv.js → js-templates-Yv-O3_U6.js} +1 -1
  128. package/dist/app/assets/{jsdoc-K25GfokP.js → jsdoc-OgQO3nf9.js} +1 -1
  129. package/dist/app/assets/{json-C9kjgKRj.js → json-DVZtz_Zz.js} +1 -1
  130. package/dist/app/assets/{json5-c50Ziatt.js → json5--f2Givq3.js} +1 -1
  131. package/dist/app/assets/{jsonp-COjtpHbV.js → jsonp-DVGUcHMz.js} +1 -1
  132. package/dist/app/assets/{jsstacktrace-CidimJ1y.js → jsstacktrace-D-yoMr1R.js} +1 -1
  133. package/dist/app/assets/{jsx-CJ1L9gGr.js → jsx-C05X4U8h.js} +1 -1
  134. package/dist/app/assets/{julia-Da_SbRf5.js → julia-DgnoOAdD.js} +1 -1
  135. package/dist/app/assets/{keepalived-CCfn5QsH.js → keepalived-JD08MytA.js} +1 -1
  136. package/dist/app/assets/{keyman-D8n_akBV.js → keyman-azrDuGNy.js} +1 -1
  137. package/dist/app/assets/{kotlin-Bt7rRlVU.js → kotlin-Bq9qLl8S.js} +1 -1
  138. package/dist/app/assets/{kumir-atdRvqMo.js → kumir-BaIa8IWz.js} +1 -1
  139. package/dist/app/assets/{kusto-BvFMNTpU.js → kusto-DQhcCWAA.js} +1 -1
  140. package/dist/app/assets/{latex-BO5DV-cv.js → latex-qLbFVwxL.js} +1 -1
  141. package/dist/app/assets/{latte-BEVR_4ug.js → latte-BIpeH7ye.js} +1 -1
  142. package/dist/app/assets/{less-cGeYdUe_.js → less-DCAm2XKc.js} +1 -1
  143. package/dist/app/assets/{lilypond-Bp-dNtuQ.js → lilypond-URqh-pba.js} +1 -1
  144. package/dist/app/assets/{liquid-Cz2pxm0P.js → liquid-BdNjEMRj.js} +1 -1
  145. package/dist/app/assets/{lisp-Z9LREmfl.js → lisp-DdMDpbFO.js} +1 -1
  146. package/dist/app/assets/{livescript-StFGOYPb.js → livescript-YUBYodrC.js} +1 -1
  147. package/dist/app/assets/{llvm-Cds-XkAH.js → llvm-BdNAFhzC.js} +1 -1
  148. package/dist/app/assets/{log-8qUXyVEA.js → log-BdA3w0be.js} +1 -1
  149. package/dist/app/assets/{lolcode-Cgo0rvKo.js → lolcode-BqnlYMBu.js} +1 -1
  150. package/dist/app/assets/{lua-TNAGVpxz.js → lua-Z_Qxo3dR.js} +1 -1
  151. package/dist/app/assets/{magma-Bbg_k1Wk.js → magma-rsT2u-lT.js} +1 -1
  152. package/dist/app/assets/{makefile-cGqvB5Kg.js → makefile-CrrMmdVS.js} +1 -1
  153. package/dist/app/assets/{markdown-g8a_a-sS.js → markdown-B5hh6ods.js} +1 -1
  154. package/dist/app/assets/{markup-DYhtb9ZI.js → markup-BiaBQ4Go.js} +1 -1
  155. package/dist/app/assets/{markup-templating-DEHiISAi.js → markup-templating-CbtO_SGF.js} +1 -1
  156. package/dist/app/assets/{matlab-8iaEIHxW.js → matlab-BXD-ZhVV.js} +1 -1
  157. package/dist/app/assets/{maxscript-CS0KzlHa.js → maxscript-NZobaPB9.js} +1 -1
  158. package/dist/app/assets/{mel-ChDiIUZ_.js → mel-BsjN8CzC.js} +1 -1
  159. package/dist/app/assets/{mermaid-3zuGECsm.js → mermaid-B5UiXAS_.js} +1 -1
  160. package/dist/app/assets/{mizar-17truMgB.js → mizar-CuUsPtTq.js} +1 -1
  161. package/dist/app/assets/{mongodb-DqojEwBP.js → mongodb-D3GB0bU8.js} +1 -1
  162. package/dist/app/assets/{monkey-Bc2s0UjK.js → monkey-CK-Syk83.js} +1 -1
  163. package/dist/app/assets/{moonscript-E3I38132.js → moonscript-CxgNQMDf.js} +1 -1
  164. package/dist/app/assets/{n1ql-BBizmk84.js → n1ql-B0gvukgr.js} +1 -1
  165. package/dist/app/assets/{n4js-Dvc4iLVa.js → n4js-CSiVWG8j.js} +1 -1
  166. package/dist/app/assets/{nand2tetris-hdl-UFJ-du_i.js → nand2tetris-hdl-BvvEGqNK.js} +1 -1
  167. package/dist/app/assets/{naniscript-BcX8rnbm.js → naniscript-45A_ER_d.js} +1 -1
  168. package/dist/app/assets/{nasm-DyMQBnEQ.js → nasm-CyYsQrbV.js} +1 -1
  169. package/dist/app/assets/{neon-QMPM5wRg.js → neon-BiKXlKLm.js} +1 -1
  170. package/dist/app/assets/{nevod-C5ECRbST.js → nevod-8Kv8aVJh.js} +1 -1
  171. package/dist/app/assets/{nginx-CphFQ-cQ.js → nginx-Cqo-dGUO.js} +1 -1
  172. package/dist/app/assets/{nim-D7hzQ_1g.js → nim-Cy_EjBaO.js} +1 -1
  173. package/dist/app/assets/{nix-BhjZpk5E.js → nix-BmTy7l9S.js} +1 -1
  174. package/dist/app/assets/{nsis-CzR8RsBi.js → nsis-XTneXqGR.js} +1 -1
  175. package/dist/app/assets/{objectivec-9Ly6bCkw.js → objectivec-Dmg9RHOg.js} +1 -1
  176. package/dist/app/assets/{ocaml-CtLkifD-.js → ocaml-CWRJM2tE.js} +1 -1
  177. package/dist/app/assets/{opencl-Cf4alDzT.js → opencl-D8_U7ZHs.js} +1 -1
  178. package/dist/app/assets/{openqasm-DhL6LJyQ.js → openqasm--Tw4PlEa.js} +1 -1
  179. package/dist/app/assets/{oz-GygD3dPP.js → oz-D-aUSxpN.js} +1 -1
  180. package/dist/app/assets/{parigp-BI44AQWQ.js → parigp-MtrGmHWf.js} +1 -1
  181. package/dist/app/assets/{parser-DhgscZEK.js → parser-h_-AW9-T.js} +1 -1
  182. package/dist/app/assets/{pascal-OA3KQD1c.js → pascal-DAMDGrIq.js} +1 -1
  183. package/dist/app/assets/{pascaligo-C9AuMOo1.js → pascaligo-TT68AZ0R.js} +1 -1
  184. package/dist/app/assets/{pcaxis-Cn_iBIX4.js → pcaxis-BZabfhMp.js} +1 -1
  185. package/dist/app/assets/{peoplecode-6ysvrf9m.js → peoplecode-8Z4ArX58.js} +1 -1
  186. package/dist/app/assets/{perl-D0SBzlTM.js → perl-Tf2L_iWK.js} +1 -1
  187. package/dist/app/assets/{php-Bv3WFIPw.js → php-Citv4wvI.js} +1 -1
  188. package/dist/app/assets/{php-extras-C4m4KxXp.js → php-extras-CXdnzF7N.js} +1 -1
  189. package/dist/app/assets/{phpdoc-CSQcFbun.js → phpdoc-D6tsAiH4.js} +1 -1
  190. package/dist/app/assets/{plsql-DFoZDuWx.js → plsql-DJtQNxFM.js} +1 -1
  191. package/dist/app/assets/{powerquery-CuTqS8yg.js → powerquery-CP9sQCLl.js} +1 -1
  192. package/dist/app/assets/{powershell-nfOZtD16.js → powershell-CKCDLWVv.js} +1 -1
  193. package/dist/app/assets/{processing-_Mu5PGoP.js → processing-D4muvaDA.js} +1 -1
  194. package/dist/app/assets/{prolog-CdDBEcoh.js → prolog-DqCpmAF7.js} +1 -1
  195. package/dist/app/assets/{promql-DAFTSFxH.js → promql-DNdbBZJb.js} +1 -1
  196. package/dist/app/assets/{properties-k1YLbT2B.js → properties-DQUwwb8x.js} +1 -1
  197. package/dist/app/assets/{protobuf-x-b74FmM.js → protobuf-BNe-4-Ln.js} +1 -1
  198. package/dist/app/assets/{psl-D9M1e9tE.js → psl-DHT7D5Zu.js} +1 -1
  199. package/dist/app/assets/{pug-BQKaYoXe.js → pug-BYrNe-ek.js} +1 -1
  200. package/dist/app/assets/{puppet-DYKy-doo.js → puppet-IzXU2QnL.js} +1 -1
  201. package/dist/app/assets/{pure-DBhdSPxo.js → pure-C8utNRFH.js} +1 -1
  202. package/dist/app/assets/{purebasic-BuQZCj3F.js → purebasic-BLFLiyfl.js} +1 -1
  203. package/dist/app/assets/{purescript-DjomkIsU.js → purescript-CGkGiDmC.js} +1 -1
  204. package/dist/app/assets/{q-C34Yf54w.js → q-Ch-_c3XY.js} +1 -1
  205. package/dist/app/assets/{qml-4hOMV25C.js → qml-BCtzfHKg.js} +1 -1
  206. package/dist/app/assets/{qore-DVhxYCg8.js → qore-6XNyhUtr.js} +1 -1
  207. package/dist/app/assets/{qsharp-Cu9ikQhz.js → qsharp-KFIiBs-v.js} +1 -1
  208. package/dist/app/assets/{r-RBQ1N0EN.js → r-VHCTkPpx.js} +1 -1
  209. package/dist/app/assets/{racket-DHIOKMsi.js → racket-1qTUuxaw.js} +1 -1
  210. package/dist/app/assets/{reason-6pAE5WHL.js → reason-c3DD7ovu.js} +1 -1
  211. package/dist/app/assets/{regex-CImx51d0.js → regex-CKlhWzhL.js} +1 -1
  212. package/dist/app/assets/{rego-BU-67Pl8.js → rego-B6Roc-f_.js} +1 -1
  213. package/dist/app/assets/{renpy-BObLa0_P.js → renpy-B8vDLdIS.js} +1 -1
  214. package/dist/app/assets/{rest-B0XQBMma.js → rest-CbuvO7de.js} +1 -1
  215. package/dist/app/assets/{rip-C7xxwI5-.js → rip-sVuuKWbv.js} +1 -1
  216. package/dist/app/assets/{roboconf-CTNAlwGm.js → roboconf-BidW62eI.js} +1 -1
  217. package/dist/app/assets/{robotframework-BaDIC60_.js → robotframework-Cd11Dy3l.js} +1 -1
  218. package/dist/app/assets/{ruby-DqfcyUfW.js → ruby-BMwY3KVp.js} +1 -1
  219. package/dist/app/assets/{rust-DaWV8yF5.js → rust-DglFfUim.js} +1 -1
  220. package/dist/app/assets/{sas-Bc9eJtyC.js → sas-BCWGGNZo.js} +1 -1
  221. package/dist/app/assets/{sass-BcQymHvs.js → sass-Chbcrpqb.js} +1 -1
  222. package/dist/app/assets/{scala-BLTMwn3O.js → scala-ClwErATt.js} +1 -1
  223. package/dist/app/assets/{scheme-CTLVJWSk.js → scheme-mqaymmTS.js} +1 -1
  224. package/dist/app/assets/{scss-G_jfdfZu.js → scss-BBhxumOr.js} +1 -1
  225. package/dist/app/assets/{shell-session-DllNhK50.js → shell-session-CuI4Rdf4.js} +1 -1
  226. package/dist/app/assets/{smali-DushsftM.js → smali-BoavhNXE.js} +1 -1
  227. package/dist/app/assets/{smalltalk-BEa1xZGu.js → smalltalk-WiUFOepn.js} +1 -1
  228. package/dist/app/assets/{smarty-RcUfBAkv.js → smarty-BP4mWIwR.js} +1 -1
  229. package/dist/app/assets/{sml-8LNIbU09.js → sml-AFqGvMHc.js} +1 -1
  230. package/dist/app/assets/{solidity-CW_UWxm8.js → solidity-D5h9njh8.js} +1 -1
  231. package/dist/app/assets/{solution-file-C5CMiaVP.js → solution-file-BLK1IrUz.js} +1 -1
  232. package/dist/app/assets/{soy-COA_5a7p.js → soy-Cf8u5dko.js} +1 -1
  233. package/dist/app/assets/{sparql-CdX0zIp-.js → sparql-C9KxnH23.js} +1 -1
  234. package/dist/app/assets/{splunk-spl-B21-S-YP.js → splunk-spl-BxUXtsOD.js} +1 -1
  235. package/dist/app/assets/{sqf-DeUK-4FI.js → sqf-qlV7g48i.js} +1 -1
  236. package/dist/app/assets/{sql-DLFpBqel.js → sql-C-p1pos9.js} +1 -1
  237. package/dist/app/assets/{squirrel-Bc1aJmaR.js → squirrel-PX1Grtap.js} +1 -1
  238. package/dist/app/assets/{stan-BHpxt81_.js → stan-zV2a82m3.js} +1 -1
  239. package/dist/app/assets/{stylus-S_RdPnv3.js → stylus-BrnUo9zO.js} +1 -1
  240. package/dist/app/assets/{swift-BLpPX7bb.js → swift-Byy18r0p.js} +1 -1
  241. package/dist/app/assets/{systemd-XzcG5qYo.js → systemd-BtqJkXRf.js} +1 -1
  242. package/dist/app/assets/{t4-cs-D0TWCunk.js → t4-cs-C5jp0bkn.js} +1 -1
  243. package/dist/app/assets/{t4-templating-CTrL1aFu.js → t4-templating-Bmu7FZgm.js} +1 -1
  244. package/dist/app/assets/{t4-vb-Dxpfhuge.js → t4-vb-CczRCjMn.js} +1 -1
  245. package/dist/app/assets/{tap-DoPStLfm.js → tap-DUhOrRiK.js} +1 -1
  246. package/dist/app/assets/{tcl-CBS_qmhg.js → tcl-BGDNQuGV.js} +1 -1
  247. package/dist/app/assets/{textile-O4oRd_9w.js → textile-BGym3KVm.js} +1 -1
  248. package/dist/app/assets/{toml-5hU_kRjA.js → toml-h2DQ44P0.js} +1 -1
  249. package/dist/app/assets/{tremor-DvaedV-L.js → tremor-CwHv-OnP.js} +1 -1
  250. package/dist/app/assets/{tt2-DVC5dSpd.js → tt2-qgYZXJPR.js} +1 -1
  251. package/dist/app/assets/{turtle-DzoC7tSw.js → turtle-Czr_CW8r.js} +1 -1
  252. package/dist/app/assets/{twig-BwT0hHAM.js → twig-Bq_oAHcm.js} +1 -1
  253. package/dist/app/assets/{typescript-DnwlJMwN.js → typescript-mXKzIg0y.js} +1 -1
  254. package/dist/app/assets/{typoscript-D9mi76Z6.js → typoscript-CLdCbPty.js} +1 -1
  255. package/dist/app/assets/{unrealscript-BzoQxa7m.js → unrealscript-CdYUVWsh.js} +1 -1
  256. package/dist/app/assets/{uorazor-BARW-iHJ.js → uorazor-DxNXLQYo.js} +1 -1
  257. package/dist/app/assets/{uri-BBOwFVE7.js → uri-DYk5U2Tx.js} +1 -1
  258. package/dist/app/assets/{v-D3zLLIBD.js → v-ZpnMXAp_.js} +1 -1
  259. package/dist/app/assets/{vala-3b-dcq6R.js → vala-hVJU5BfN.js} +1 -1
  260. package/dist/app/assets/{vbnet-CD1ZGMUz.js → vbnet-CmY51d5G.js} +1 -1
  261. package/dist/app/assets/{velocity-DSd9gnso.js → velocity-CsvRt2hb.js} +1 -1
  262. package/dist/app/assets/{verilog-pAsLW3hb.js → verilog-CPo8f42m.js} +1 -1
  263. package/dist/app/assets/{vhdl-CFoWg-80.js → vhdl-WKsKMPi0.js} +1 -1
  264. package/dist/app/assets/{vim-BNStWbIH.js → vim-BgsS8AXO.js} +1 -1
  265. package/dist/app/assets/{visual-basic-CiP_BG8f.js → visual-basic-CufJPq0T.js} +1 -1
  266. package/dist/app/assets/{warpscript-BArUOgos.js → warpscript-BMGdLyX8.js} +1 -1
  267. package/dist/app/assets/{wasm-DeM1Oodx.js → wasm-BwoGQtY0.js} +1 -1
  268. package/dist/app/assets/{web-idl-D6levqn0.js → web-idl-CQh6nLUF.js} +1 -1
  269. package/dist/app/assets/{wiki-BzldQZnm.js → wiki-BBUQmhnv.js} +1 -1
  270. package/dist/app/assets/{wolfram-DLPWbLkb.js → wolfram-TAz_4SnR.js} +1 -1
  271. package/dist/app/assets/{wren-Bt3dBH59.js → wren-CVPXcwur.js} +1 -1
  272. package/dist/app/assets/{xeora-Djb93XZz.js → xeora-DFQOGccv.js} +1 -1
  273. package/dist/app/assets/{xml-doc-SPRrWf4t.js → xml-doc-DU62FPEw.js} +1 -1
  274. package/dist/app/assets/{xojo-Borowp2a.js → xojo-CRo0kja2.js} +1 -1
  275. package/dist/app/assets/{xquery-CJ9PQJbE.js → xquery-lrNjl9FO.js} +1 -1
  276. package/dist/app/assets/{yaml-CpR62_uk.js → yaml-PqToDf_Q.js} +1 -1
  277. package/dist/app/assets/{yang-DTdx8_iE.js → yang-BQDTSngB.js} +1 -1
  278. package/dist/app/assets/{zig-7s1xAY_j.js → zig-D_9EoT5C.js} +1 -1
  279. package/dist/app/index.html +2 -2
  280. package/dist/index.cjs +363 -106
  281. package/dist/index.js +363 -106
  282. package/package.json +6 -7
  283. package/dist/app/assets/index-DAcglDE0.css +0 -1
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  // src/components/chat.tsx
2
- import * as React17 from "react";
2
+ import * as React18 from "react";
3
3
  import { 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
@@ -338,7 +338,7 @@ var buttonVariants = cva(
338
338
  function Button({
339
339
  className,
340
340
  variant = "default",
341
- size = "default",
341
+ size: size2 = "default",
342
342
  asChild = false,
343
343
  ...props
344
344
  }) {
@@ -348,8 +348,8 @@ function Button({
348
348
  {
349
349
  "data-slot": "button",
350
350
  "data-variant": variant,
351
- "data-size": size,
352
- className: cn(buttonVariants({ variant, size, className })),
351
+ "data-size": size2,
352
+ className: cn(buttonVariants({ variant, size: size2, className })),
353
353
  ...props
354
354
  }
355
355
  );
@@ -414,6 +414,11 @@ var en_US_default = {
414
414
  loadMessages: "Failed to load thread messages",
415
415
  createThread: "Failed to create thread",
416
416
  deleteThread: "Failed to delete thread"
417
+ },
418
+ contextUsage: {
419
+ label: "Context window",
420
+ full: "{{usedPercent}}% used ({{remainingPercent}}% left)",
421
+ tokensUsed: "{{used}} / {{max}} tokens used"
417
422
  }
418
423
  },
419
424
  history: {
@@ -467,6 +472,11 @@ var zh_CN_default = {
467
472
  loadMessages: "\u52A0\u8F7D\u7EBF\u7A0B\u6D88\u606F\u5931\u8D25",
468
473
  createThread: "\u521B\u5EFA\u7EBF\u7A0B\u5931\u8D25",
469
474
  deleteThread: "\u5220\u9664\u7EBF\u7A0B\u5931\u8D25"
475
+ },
476
+ contextUsage: {
477
+ label: "\u4E0A\u4E0B\u6587\u7A97\u53E3",
478
+ full: "\u5DF2\u4F7F\u7528 {{usedPercent}}%\uFF08\u5269\u4F59 {{remainingPercent}}%\uFF09",
479
+ tokensUsed: "\u5DF2\u4F7F\u7528 {{used}} / {{max}} tokens"
470
480
  }
471
481
  },
472
482
  history: {
@@ -1900,14 +1910,24 @@ function MemoryBlock({ content }) {
1900
1910
  }
1901
1911
  function ComponentBlock({ content }) {
1902
1912
  const [isExpanded, setIsExpanded] = React13.useState(false);
1913
+ const contentRef = React13.useRef(null);
1903
1914
  const data = content.data ?? {};
1904
- const title = typeof data.title === "string" ? data.title : typeof data.type === "string" ? data.type : "Component";
1905
- const category = typeof data.category === "string" ? data.category : "Component";
1906
- const status = typeof data.status === "string" ? data.status : null;
1907
- const message = typeof data.message === "string" ? data.message : null;
1908
- const output = typeof data.output === "string" ? data.output : null;
1909
- const error = data.error || null;
1915
+ const category = data.category ?? "Component";
1916
+ const title = data.tool && category === "Tool" ? data.tool : data.title ?? data.type ?? "Component";
1917
+ const status = data.status ?? null;
1918
+ const message = data.message ?? null;
1919
+ const output = data.output ?? null;
1920
+ const error = data.error ?? null;
1910
1921
  const fallback = message ?? output ?? safeJson(data.data ?? data);
1922
+ const hasOutput = message !== null || output !== null;
1923
+ React13.useEffect(() => {
1924
+ if (status === "running" && output !== null) setIsExpanded(true);
1925
+ }, [status, output]);
1926
+ React13.useEffect(() => {
1927
+ if (status === "running" && contentRef.current) {
1928
+ contentRef.current.scrollTop = contentRef.current.scrollHeight;
1929
+ }
1930
+ }, [status, output]);
1911
1931
  const config = status ? statusConfig[status] : null;
1912
1932
  const StatusIcon = config?.icon;
1913
1933
  return /* @__PURE__ */ jsxs8(Card, { children: [
@@ -1933,9 +1953,9 @@ function ComponentBlock({ content }) {
1933
1953
  )
1934
1954
  ] })
1935
1955
  ] }),
1936
- isExpanded && /* @__PURE__ */ jsxs8(CardContent, { className: "text-xs text-muted-foreground max-h-60 overflow-auto", children: [
1956
+ isExpanded && /* @__PURE__ */ jsxs8(CardContent, { ref: contentRef, className: "text-xs text-muted-foreground max-h-60 overflow-auto", children: [
1937
1957
  data.input && /* @__PURE__ */ jsx19("pre", { className: "whitespace-pre-wrap wrap-break-word", children: JSON.stringify(data.input, null, 2) }),
1938
- error ? /* @__PURE__ */ jsx19("pre", { className: "whitespace-pre-wrap wrap-break-word text-destructive", children: typeof error === "string" ? error : safeJson(error) }) : output && /* @__PURE__ */ jsx19("pre", { className: "whitespace-pre-wrap wrap-break-word", children: fallback })
1958
+ error ? /* @__PURE__ */ jsx19("pre", { className: "whitespace-pre-wrap wrap-break-word text-destructive", children: typeof error === "string" ? error : safeJson(error) }) : hasOutput && /* @__PURE__ */ jsx19("pre", { className: "whitespace-pre-wrap wrap-break-word", children: fallback })
1939
1959
  ] })
1940
1960
  ] });
1941
1961
  }
@@ -2146,6 +2166,8 @@ var toThreadItem = (threadRecord) => ({
2146
2166
  id: threadRecord.threadId ?? threadRecord.id,
2147
2167
  recordId: threadRecord.id,
2148
2168
  title: getThreadTitle(threadRecord),
2169
+ status: threadRecord.status || "idle",
2170
+ error: threadRecord.error,
2149
2171
  lastMessageAt: toDate(threadRecord.updatedAt)
2150
2172
  });
2151
2173
  var sortThreadRecords = (threadRecords) => {
@@ -2156,7 +2178,13 @@ var sortThreadRecords = (threadRecords) => {
2156
2178
  });
2157
2179
  };
2158
2180
  function useThreads(limit = DEFAULT_LIMIT) {
2159
- const { client, threadId, assistantId, isReady } = useStreamContext();
2181
+ const {
2182
+ client,
2183
+ threadId,
2184
+ assistantId,
2185
+ isReady,
2186
+ isLoading: isStreamLoading
2187
+ } = useStreamContext();
2160
2188
  const [threadRecords, setThreadRecords] = React16.useState([]);
2161
2189
  const [isLoading, setIsLoading] = React16.useState(false);
2162
2190
  const [error, setError] = React16.useState(null);
@@ -2218,16 +2246,39 @@ function useThreads(limit = DEFAULT_LIMIT) {
2218
2246
  void refreshThreads();
2219
2247
  }, [refreshThreads, isReady]);
2220
2248
  React16.useEffect(() => {
2221
- if (!isReady) return;
2222
- if (!threadId) return;
2223
- if (threadRecords.some((item) => item.threadId === threadId)) return;
2249
+ if (!threadId || !isStreamLoading) return;
2250
+ const now = (/* @__PURE__ */ new Date()).toISOString();
2251
+ setThreadRecords((prev) => {
2252
+ let changed = false;
2253
+ const next = prev.map((item) => {
2254
+ const isCurrentThread = item.threadId === threadId || item.id === threadId;
2255
+ if (!isCurrentThread) return item;
2256
+ if (item.status === "busy" && !item.error) return item;
2257
+ changed = true;
2258
+ return {
2259
+ ...item,
2260
+ status: "busy",
2261
+ error: void 0,
2262
+ updatedAt: now
2263
+ };
2264
+ });
2265
+ return changed ? sortThreadRecords(next) : prev;
2266
+ });
2267
+ }, [threadId, isStreamLoading]);
2268
+ React16.useEffect(() => {
2269
+ if (!isReady || !threadId || isStreamLoading) return;
2270
+ let cancelled = false;
2224
2271
  void client.conversations.search({ where: { threadId }, limit: 1 }).then((result) => {
2272
+ if (cancelled) return;
2225
2273
  const found = result.items?.[0];
2226
2274
  if (found) upsertThreadRecord(found);
2227
2275
  }).catch((err) => {
2228
- setError(err);
2276
+ if (!cancelled) setError(err);
2229
2277
  });
2230
- }, [client, threadId, threadRecords, upsertThreadRecord, isReady]);
2278
+ return () => {
2279
+ cancelled = true;
2280
+ };
2281
+ }, [client, threadId, upsertThreadRecord, isReady, isStreamLoading]);
2231
2282
  const threads = React16.useMemo(
2232
2283
  () => threadRecords.map((threadRecord) => toThreadItem(threadRecord)),
2233
2284
  [threadRecords]
@@ -2244,8 +2295,201 @@ function useThreads(limit = DEFAULT_LIMIT) {
2244
2295
  };
2245
2296
  }
2246
2297
 
2298
+ // src/components/thread/context-usage-indicator.tsx
2299
+ import * as React17 from "react";
2300
+
2301
+ // src/components/ui/progress-circle.tsx
2302
+ import { jsx as jsx22, jsxs as jsxs11 } from "react/jsx-runtime";
2303
+ function clamp(input, a, b) {
2304
+ return Math.max(Math.min(input, Math.max(a, b)), Math.min(a, b));
2305
+ }
2306
+ var size = 24;
2307
+ var strokeWidth = 4;
2308
+ var total = 100;
2309
+ var ProgressCircle = ({ value, className, ...restSvgProps }) => {
2310
+ const normalizedValue = clamp(value, 0, total);
2311
+ const radius = (size - strokeWidth) / 2;
2312
+ const circumference = 2 * Math.PI * radius;
2313
+ const progress = normalizedValue / total * circumference;
2314
+ const halfSize = size / 2;
2315
+ const commonParams = {
2316
+ cx: halfSize,
2317
+ cy: halfSize,
2318
+ r: radius,
2319
+ fill: "none",
2320
+ strokeWidth
2321
+ };
2322
+ return (
2323
+ // biome-ignore lint/a11y/useFocusableInteractive: false positive (progress + progressbar are not focusable interactives)
2324
+ // biome-ignore lint/nursery/useAriaPropsSupportedByRole: biome rule at odds with mdn docs (presumed nursary bug with rule)
2325
+ /* @__PURE__ */ jsxs11(
2326
+ "svg",
2327
+ {
2328
+ role: "progressbar",
2329
+ viewBox: `0 0 ${size} ${size}`,
2330
+ className: cn("size-6", className),
2331
+ "aria-valuenow": normalizedValue,
2332
+ "aria-valuemin": 0,
2333
+ "aria-valuemax": 100,
2334
+ ...restSvgProps,
2335
+ children: [
2336
+ /* @__PURE__ */ jsx22("circle", { ...commonParams, className: "stroke-current/25" }),
2337
+ /* @__PURE__ */ jsx22(
2338
+ "circle",
2339
+ {
2340
+ ...commonParams,
2341
+ stroke: "currentColor",
2342
+ strokeDasharray: circumference,
2343
+ strokeDashoffset: circumference - progress,
2344
+ strokeLinecap: "round",
2345
+ transform: `rotate(-90 ${halfSize} ${halfSize})`,
2346
+ className: "stroke-current"
2347
+ }
2348
+ )
2349
+ ]
2350
+ }
2351
+ )
2352
+ );
2353
+ };
2354
+
2355
+ // src/components/thread/context-usage-indicator.tsx
2356
+ import { jsx as jsx23, jsxs as jsxs12 } from "react/jsx-runtime";
2357
+ var kNumberFormatter = new Intl.NumberFormat("en-US", {
2358
+ minimumFractionDigits: 0,
2359
+ maximumFractionDigits: 1
2360
+ });
2361
+ function normalizeContextSize(value) {
2362
+ if (typeof value === "number" && Number.isFinite(value) && value >= 0) {
2363
+ return Math.floor(value);
2364
+ }
2365
+ if (typeof value === "string") {
2366
+ const parsed = Number.parseInt(value, 10);
2367
+ if (Number.isFinite(parsed) && parsed >= 0) {
2368
+ return parsed;
2369
+ }
2370
+ }
2371
+ return null;
2372
+ }
2373
+ function normalizeAgentKey(value) {
2374
+ if (typeof value !== "string") {
2375
+ return null;
2376
+ }
2377
+ const normalized = value.trim();
2378
+ return normalized ? normalized : null;
2379
+ }
2380
+ function resolveAssistantContextSize(assistant) {
2381
+ return normalizeContextSize(assistant.metadata?.context_size) ?? normalizeContextSize(assistant.config?.configurable?.context_size);
2382
+ }
2383
+ function resolveAssistantAgentKey(assistant) {
2384
+ return normalizeAgentKey(assistant.metadata?.agent_key) ?? normalizeAgentKey(assistant.config?.configurable?.agentKey);
2385
+ }
2386
+ function clampUsage(value, max) {
2387
+ if (typeof value !== "number" || !Number.isFinite(value) || value < 0) {
2388
+ return 0;
2389
+ }
2390
+ return Math.min(Math.floor(value), max);
2391
+ }
2392
+ function formatCountInK(value) {
2393
+ return `${kNumberFormatter.format(value / 1e3)}k`;
2394
+ }
2395
+ function ContextUsageIndicator({
2396
+ label,
2397
+ className
2398
+ }) {
2399
+ const { t } = useChatkitTranslation();
2400
+ const stream = useStreamContext();
2401
+ const [maxContextSize, setMaxContextSize] = React17.useState(null);
2402
+ const [usedContextSize, setUsedContextSize] = React17.useState(null);
2403
+ const [assistantAgentKey, setAssistantAgentKey] = React17.useState(null);
2404
+ React17.useEffect(() => {
2405
+ if (!stream.client || !stream.assistantId) {
2406
+ setMaxContextSize(null);
2407
+ setAssistantAgentKey(null);
2408
+ return;
2409
+ }
2410
+ let cancelled = false;
2411
+ stream.client.assistants.get(stream.assistantId).then((assistant) => {
2412
+ if (cancelled || !assistant) return;
2413
+ setMaxContextSize(resolveAssistantContextSize(assistant));
2414
+ setAssistantAgentKey(resolveAssistantAgentKey(assistant));
2415
+ }).catch((err) => {
2416
+ if (cancelled) return;
2417
+ console.warn("[Chat] Failed to load assistant context size:", err);
2418
+ setAssistantAgentKey(null);
2419
+ });
2420
+ return () => {
2421
+ cancelled = true;
2422
+ };
2423
+ }, [stream.client, stream.assistantId]);
2424
+ React17.useEffect(() => {
2425
+ if (!stream.client) {
2426
+ setUsedContextSize(null);
2427
+ return;
2428
+ }
2429
+ if (!stream.threadId) {
2430
+ setUsedContextSize(0);
2431
+ return;
2432
+ }
2433
+ if (stream.isLoading) return;
2434
+ let cancelled = false;
2435
+ stream.client.threads.getContextUsage(
2436
+ stream.threadId,
2437
+ assistantAgentKey ? { agentKey: assistantAgentKey } : void 0
2438
+ ).then((result) => normalizeContextSize(result?.usage?.context_tokens)).then((result) => {
2439
+ if (cancelled) return;
2440
+ setUsedContextSize(result ?? 0);
2441
+ }).catch((err) => {
2442
+ if (cancelled) return;
2443
+ console.warn("[Chat] Failed to load thread context usage:", err);
2444
+ });
2445
+ return () => {
2446
+ cancelled = true;
2447
+ };
2448
+ }, [assistantAgentKey, stream.apiKey, stream.apiUrl, stream.client, stream.threadId, stream.isLoading]);
2449
+ if (typeof maxContextSize !== "number" || !Number.isFinite(maxContextSize) || maxContextSize <= 0) {
2450
+ return null;
2451
+ }
2452
+ const max = Math.floor(maxContextSize);
2453
+ const used = clampUsage(usedContextSize, max);
2454
+ const percent = Math.max(0, Math.min(100, used / max * 100));
2455
+ const roundedPercent = Math.round(percent);
2456
+ const remainingPercent = Math.max(0, 100 - roundedPercent);
2457
+ const formattedUsed = formatCountInK(used);
2458
+ const formattedMax = formatCountInK(max);
2459
+ const usageLabel = label ?? t("chat.contextUsage.label");
2460
+ const usageFullLabel = t("chat.contextUsage.full", {
2461
+ usedPercent: roundedPercent,
2462
+ remainingPercent
2463
+ });
2464
+ const usageTokensLabel = t("chat.contextUsage.tokensUsed", {
2465
+ used: formattedUsed,
2466
+ max: formattedMax
2467
+ });
2468
+ const usageLabelWithSuffix = usageLabel.endsWith(":") ? usageLabel : `${usageLabel}:`;
2469
+ const progressClassName = percent >= 90 ? "text-destructive" : percent >= 75 ? "text-amber-500" : "text-primary dark:text-zinc-300";
2470
+ return /* @__PURE__ */ jsxs12(Tooltip, { children: [
2471
+ /* @__PURE__ */ jsx23(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx23(
2472
+ "button",
2473
+ {
2474
+ type: "button",
2475
+ className: cn(
2476
+ "inline-flex items-center justify-center rounded-full focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 ring-offset-background",
2477
+ className
2478
+ ),
2479
+ "aria-label": `${usageLabelWithSuffix} ${usageFullLabel}. ${usageTokensLabel}`,
2480
+ children: /* @__PURE__ */ jsx23(ProgressCircle, { value: percent, className: cn("size-3.5", progressClassName) })
2481
+ }
2482
+ ) }),
2483
+ /* @__PURE__ */ jsxs12(TooltipContent, { side: "top", sideOffset: 6, className: "space-y-0.5 px-3 py-2 text-center", children: [
2484
+ /* @__PURE__ */ jsx23("div", { className: "text-primary-foreground/70", children: usageLabelWithSuffix }),
2485
+ /* @__PURE__ */ jsx23("div", { className: "font-medium text-primary-foreground/80", children: usageFullLabel }),
2486
+ /* @__PURE__ */ jsx23("div", { className: "text-sm font-semibold", children: usageTokensLabel })
2487
+ ] })
2488
+ ] });
2489
+ }
2490
+
2247
2491
  // src/components/chat.tsx
2248
- import { Fragment as Fragment3, jsx as jsx22, jsxs as jsxs11 } from "react/jsx-runtime";
2492
+ import { Fragment as Fragment3, jsx as jsx24, jsxs as jsxs13 } from "react/jsx-runtime";
2249
2493
  var defaultApiUrl2 = import.meta.env.VITE_XPERTAI_API_URL;
2250
2494
  function formatMessageContent(content) {
2251
2495
  if (typeof content === "string") {
@@ -2284,16 +2528,16 @@ function Chat({
2284
2528
  const apiUrl = options?.api?.apiUrl || defaultApiUrl2;
2285
2529
  const { setStream } = useStreamManager();
2286
2530
  const stream = useStreamContext();
2287
- const [isHistoryLoading, setIsHistoryLoading] = React17.useState(false);
2288
- const [historyError, setHistoryError] = React17.useState(null);
2289
- const [assistantName, setAssistantName] = React17.useState(null);
2531
+ const [isHistoryLoading, setIsHistoryLoading] = React18.useState(false);
2532
+ const [historyError, setHistoryError] = React18.useState(null);
2533
+ const [assistantName, setAssistantName] = React18.useState(null);
2290
2534
  const LOADING_DOTS_MIN_DURATION = 800;
2291
- const [showLoadingDots, setShowLoadingDots] = React17.useState(false);
2292
- const loadingStartTimeRef = React17.useRef(null);
2293
- React17.useEffect(() => {
2535
+ const [showLoadingDots, setShowLoadingDots] = React18.useState(false);
2536
+ const loadingStartTimeRef = React18.useRef(null);
2537
+ React18.useEffect(() => {
2294
2538
  setStream(stream);
2295
2539
  }, [setStream, stream]);
2296
- React17.useEffect(() => {
2540
+ React18.useEffect(() => {
2297
2541
  if (stream.isLoading) {
2298
2542
  if (!loadingStartTimeRef.current) {
2299
2543
  loadingStartTimeRef.current = Date.now();
@@ -2316,23 +2560,23 @@ function Chat({
2316
2560
  }
2317
2561
  }
2318
2562
  }, [stream.isLoading]);
2319
- const [draft, setDraft] = React17.useState("");
2320
- const [selectedTool, setSelectedTool] = React17.useState(null);
2321
- const [attachments, setAttachments] = React17.useState([]);
2563
+ const [draft, setDraft] = React18.useState("");
2564
+ const [selectedTool, setSelectedTool] = React18.useState(null);
2565
+ const [attachments, setAttachments] = React18.useState([]);
2322
2566
  const {
2323
2567
  threads,
2324
2568
  deleteThread,
2325
2569
  refreshThreads,
2326
2570
  isLoading: isThreadsLoading
2327
2571
  } = useThreads();
2328
- const viewportRef = React17.useRef(null);
2329
- const fileInputRef = React17.useRef(null);
2572
+ const viewportRef = React18.useRef(null);
2573
+ const fileInputRef = React18.useRef(null);
2330
2574
  const resolvedTitle = title ?? t("chat.title");
2331
2575
  const resolvedPlaceholder = placeholder ?? t("chat.placeholder");
2332
2576
  const inputPlaceholder = selectedTool?.placeholderOverride ?? composer?.placeholder ?? resolvedPlaceholder;
2333
2577
  const messages = stream.messages ?? [];
2334
2578
  const trimmedDraft = draft.trim();
2335
- const scrollToBottom = React17.useCallback((smooth = false) => {
2579
+ const scrollToBottom = React18.useCallback((smooth = false) => {
2336
2580
  requestAnimationFrame(() => {
2337
2581
  const viewport = viewportRef.current;
2338
2582
  if (viewport) {
@@ -2343,10 +2587,10 @@ function Chat({
2343
2587
  }
2344
2588
  });
2345
2589
  }, []);
2346
- React17.useEffect(() => {
2590
+ React18.useEffect(() => {
2347
2591
  scrollToBottom();
2348
2592
  }, [messages.length, scrollToBottom]);
2349
- React17.useEffect(() => {
2593
+ React18.useEffect(() => {
2350
2594
  if (stream.isLoading) {
2351
2595
  scrollToBottom();
2352
2596
  }
@@ -2357,11 +2601,11 @@ function Chat({
2357
2601
  const showMissingConfig = !isClientSecretInitializing && missingConfig;
2358
2602
  const hasUploadingFiles = attachments.some((a) => a.status === "uploading");
2359
2603
  const isSendDisabled = !trimmedDraft || stream.isLoading || missingConfig || isHistoryLoading || hasUploadingFiles;
2360
- React17.useEffect(() => {
2604
+ React18.useEffect(() => {
2361
2605
  if (missingConfig) return;
2362
2606
  void refreshThreads();
2363
2607
  }, [missingConfig, refreshThreads]);
2364
- React17.useEffect(() => {
2608
+ React18.useEffect(() => {
2365
2609
  if (missingConfig || !stream.client || !stream.assistantId) return;
2366
2610
  stream.client.assistants.get(stream.assistantId).then((assistant) => {
2367
2611
  if (assistant) {
@@ -2414,7 +2658,7 @@ function Chat({
2414
2658
  const handleAttachmentClick = () => {
2415
2659
  fileInputRef.current?.click();
2416
2660
  };
2417
- const uploadFile = React17.useCallback(async (localId, file) => {
2661
+ const uploadFile = React18.useCallback(async (localId, file) => {
2418
2662
  try {
2419
2663
  const result = await stream.client.contexts.uploadFile(file);
2420
2664
  setAttachments(
@@ -2434,7 +2678,7 @@ function Chat({
2434
2678
  );
2435
2679
  }
2436
2680
  }, [stream.client]);
2437
- const handleRetryUpload = React17.useCallback((localId) => {
2681
+ const handleRetryUpload = React18.useCallback((localId) => {
2438
2682
  const attachment = attachments.find((a) => a.localId === localId);
2439
2683
  if (!attachment || attachment.status !== "error") return;
2440
2684
  setAttachments(
@@ -2509,7 +2753,7 @@ function Chat({
2509
2753
  );
2510
2754
  scrollToBottom(true);
2511
2755
  };
2512
- const loadConversationMessages = React17.useCallback(
2756
+ const loadConversationMessages = React18.useCallback(
2513
2757
  async (recordId) => {
2514
2758
  if (missingConfig) {
2515
2759
  setHistoryError(t("chat.missingConfigShort"));
@@ -2590,8 +2834,17 @@ function Chat({
2590
2834
  }
2591
2835
  };
2592
2836
  const acceptMimes = composer?.attachments?.accept ? Object.entries(composer.attachments.accept).map(([mime, exts]) => [mime, ...exts.map((e) => `.${e}`)].join(",")).join(",") : void 0;
2837
+ const currentThread = React18.useMemo(
2838
+ () => threads.find((item) => item.id === stream.threadId),
2839
+ [threads, stream.threadId]
2840
+ );
2593
2841
  const errorMessage = stream.error instanceof Error ? stream.error.message : void 0;
2594
- return /* @__PURE__ */ jsxs11(
2842
+ const threadErrorMessage = React18.useMemo(() => {
2843
+ if (currentThread?.status !== "error") return void 0;
2844
+ const message = currentThread.error?.trim();
2845
+ return message || t("thread.errorToast");
2846
+ }, [currentThread, t]);
2847
+ return /* @__PURE__ */ jsxs13(
2595
2848
  "div",
2596
2849
  {
2597
2850
  ref: viewportRef,
@@ -2600,16 +2853,16 @@ function Chat({
2600
2853
  className
2601
2854
  ),
2602
2855
  children: [
2603
- /* @__PURE__ */ jsxs11("div", { className: "flex items-center justify-between border-b px-4 py-2 sticky top-0 z-10 bg-background", children: [
2604
- /* @__PURE__ */ jsxs11("div", { className: "flex items-center gap-3", children: [
2605
- /* @__PURE__ */ jsx22("div", { className: "h-2 w-2 rounded-full bg-green-500" }),
2606
- /* @__PURE__ */ jsxs11("div", { children: [
2607
- /* @__PURE__ */ jsx22("h2", { className: "text-lg font-semibold", children: assistantName || resolvedTitle }),
2608
- /* @__PURE__ */ jsx22("p", { className: "text-xs text-muted-foreground", children: t("chat.statusOnline") })
2856
+ /* @__PURE__ */ jsxs13("div", { className: "flex items-center justify-between border-b px-4 py-2 sticky top-0 z-10 bg-background", children: [
2857
+ /* @__PURE__ */ jsxs13("div", { className: "flex items-center gap-3", children: [
2858
+ /* @__PURE__ */ jsx24("div", { className: "h-2 w-2 rounded-full bg-green-500" }),
2859
+ /* @__PURE__ */ jsxs13("div", { children: [
2860
+ /* @__PURE__ */ jsx24("h2", { className: "text-lg font-semibold", children: assistantName || resolvedTitle }),
2861
+ /* @__PURE__ */ jsx24("p", { className: "text-xs text-muted-foreground", children: t("chat.statusOnline") })
2609
2862
  ] })
2610
2863
  ] }),
2611
- history?.enabled !== false && /* @__PURE__ */ jsxs11("div", { className: "flex items-center gap-1", children: [
2612
- /* @__PURE__ */ jsx22(
2864
+ history?.enabled !== false && /* @__PURE__ */ jsxs13("div", { className: "flex items-center gap-1", children: [
2865
+ /* @__PURE__ */ jsx24(
2613
2866
  "button",
2614
2867
  {
2615
2868
  type: "button",
@@ -2622,10 +2875,10 @@ function Chat({
2622
2875
  "disabled:opacity-50 disabled:cursor-not-allowed"
2623
2876
  ),
2624
2877
  title: t("history.newThread"),
2625
- children: /* @__PURE__ */ jsx22(Pencil3, { size: 16 })
2878
+ children: /* @__PURE__ */ jsx24(Pencil3, { size: 16 })
2626
2879
  }
2627
2880
  ),
2628
- /* @__PURE__ */ jsx22(
2881
+ /* @__PURE__ */ jsx24(
2629
2882
  HistorySidebar,
2630
2883
  {
2631
2884
  threads,
@@ -2639,23 +2892,23 @@ function Chat({
2639
2892
  )
2640
2893
  ] })
2641
2894
  ] }),
2642
- /* @__PURE__ */ jsxs11("div", { className: "flex-1 p-4", children: [
2643
- errorMessage && /* @__PURE__ */ jsx22("div", { className: "mb-4 rounded-lg border border-destructive/30 bg-destructive/10 px-3 py-2 text-sm text-destructive", children: errorMessage }),
2644
- historyError && /* @__PURE__ */ jsx22("div", { className: "mb-4 rounded-lg border border-amber-200 bg-amber-50 px-3 py-2 text-sm text-amber-900", children: historyError }),
2645
- showMissingConfig && /* @__PURE__ */ jsx22("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") }),
2646
- isHistoryLoading && /* @__PURE__ */ jsx22("div", { className: "mb-4 rounded-lg border border-muted px-3 py-2 text-sm text-muted-foreground", children: t("chat.loadingThread") }),
2647
- messages.length === 0 ? /* @__PURE__ */ jsx22(
2895
+ /* @__PURE__ */ jsxs13("div", { className: "flex-1 p-4", children: [
2896
+ 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 }),
2897
+ 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 }),
2898
+ 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") }),
2899
+ 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") }),
2900
+ messages.length === 0 ? /* @__PURE__ */ jsx24(
2648
2901
  StartScreen,
2649
2902
  {
2650
2903
  startScreen,
2651
2904
  onPromptClick: handlePromptClick
2652
2905
  }
2653
- ) : /* @__PURE__ */ jsxs11("div", { className: "space-y-4", children: [
2906
+ ) : /* @__PURE__ */ jsxs13("div", { className: "space-y-4", children: [
2654
2907
  messages.map((message, index) => {
2655
2908
  const messageType = String(message.type);
2656
2909
  const isAssistantMessage = messageType === "assistant" || messageType === "ai";
2657
2910
  const messageContent = typeof message.content === "string" ? message.content : Array.isArray(message.content) ? message.content.map((part) => formatMessageContent(part)).join("") : formatMessageContent(message.content);
2658
- return /* @__PURE__ */ jsx22(
2911
+ return /* @__PURE__ */ jsx24(
2659
2912
  "div",
2660
2913
  {
2661
2914
  className: cn(
@@ -2663,8 +2916,8 @@ function Chat({
2663
2916
  message.type === "human" ? "justify-end" : "justify-start -ml-1"
2664
2917
  // AI messages: slightly closer to left
2665
2918
  ),
2666
- children: /* @__PURE__ */ jsxs11("div", { className: "flex flex-col px-3 overflow-hidden", children: [
2667
- /* @__PURE__ */ jsx22(
2919
+ children: /* @__PURE__ */ jsxs13("div", { className: "flex flex-col px-3 overflow-hidden", children: [
2920
+ /* @__PURE__ */ jsx24(
2668
2921
  "div",
2669
2922
  {
2670
2923
  className: cn(
@@ -2672,7 +2925,7 @@ function Chat({
2672
2925
  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"
2673
2926
  // AI messages: use chat-specific foreground color
2674
2927
  ),
2675
- children: isAssistantMessage ? /* @__PURE__ */ jsx22(
2928
+ children: isAssistantMessage ? /* @__PURE__ */ jsx24(
2676
2929
  AssistantMessage,
2677
2930
  {
2678
2931
  message: {
@@ -2681,30 +2934,30 @@ function Chat({
2681
2934
  },
2682
2935
  isStreaming: stream.isLoading && index === messages.length - 1
2683
2936
  }
2684
- ) : /* @__PURE__ */ jsxs11(Fragment3, { children: [
2685
- message.type === "human" && message.attachments?.length > 0 && /* @__PURE__ */ jsx22("div", { className: "flex flex-wrap gap-1.5 mb-2", children: message.attachments.map((file, fileIndex) => /* @__PURE__ */ jsxs11(
2937
+ ) : /* @__PURE__ */ jsxs13(Fragment3, { children: [
2938
+ 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(
2686
2939
  "div",
2687
2940
  {
2688
2941
  className: "flex items-center gap-1.5 rounded-md bg-primary-foreground/20 px-2 py-1 text-xs",
2689
2942
  children: [
2690
- /* @__PURE__ */ jsx22(FileText2, { size: 12 }),
2691
- /* @__PURE__ */ jsx22("span", { className: "max-w-[100px] truncate", children: file.originalName })
2943
+ /* @__PURE__ */ jsx24(FileText2, { size: 12 }),
2944
+ /* @__PURE__ */ jsx24("span", { className: "max-w-[100px] truncate", children: file.originalName })
2692
2945
  ]
2693
2946
  },
2694
2947
  fileIndex
2695
2948
  )) }),
2696
- Array.isArray(message.content) ? message.content.map((part, partIndex) => /* @__PURE__ */ jsx22(
2949
+ Array.isArray(message.content) ? message.content.map((part, partIndex) => /* @__PURE__ */ jsx24(
2697
2950
  "p",
2698
2951
  {
2699
2952
  className: "wrap-break-word text-sm leading-relaxed",
2700
2953
  children: formatMessageContent(part)
2701
2954
  },
2702
2955
  `${part.type}-${partIndex}`
2703
- )) : /* @__PURE__ */ jsx22("span", { className: "wrap-break-word text-sm leading-relaxed", children: formatMessageContent(message.content) })
2956
+ )) : /* @__PURE__ */ jsx24("span", { className: "wrap-break-word text-sm leading-relaxed", children: formatMessageContent(message.content) })
2704
2957
  ] })
2705
2958
  }
2706
2959
  ),
2707
- /* @__PURE__ */ jsx22(
2960
+ /* @__PURE__ */ jsx24(
2708
2961
  MessageActions,
2709
2962
  {
2710
2963
  content: messageContent,
@@ -2725,16 +2978,17 @@ function Chat({
2725
2978
  const lastMsgContent = lastMessage?.content;
2726
2979
  const hasSubstantialContent = isLastMessageFromAI && (typeof lastMsgContent === "string" && lastMsgContent.length > 10 || Array.isArray(lastMsgContent) && lastMsgContent.length > 0);
2727
2980
  if (hasSubstantialContent) return null;
2728
- return /* @__PURE__ */ jsx22("div", { className: "flex justify-start gap-3 -ml-2", children: /* @__PURE__ */ jsx22("div", { className: "max-w-full rounded-2xl py-2.5", children: /* @__PURE__ */ jsxs11("div", { className: "flex gap-1.5", children: [
2729
- /* @__PURE__ */ jsx22("div", { className: "h-2 w-2 animate-bounce rounded-full bg-muted-foreground/60 [animation-delay:-0.3s]" }),
2730
- /* @__PURE__ */ jsx22("div", { className: "h-2 w-2 animate-bounce rounded-full bg-muted-foreground/60 [animation-delay:-0.15s]" }),
2731
- /* @__PURE__ */ jsx22("div", { className: "h-2 w-2 animate-bounce rounded-full bg-muted-foreground/60" })
2981
+ 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: [
2982
+ /* @__PURE__ */ jsx24("div", { className: "h-2 w-2 animate-bounce rounded-full bg-muted-foreground/60 [animation-delay:-0.3s]" }),
2983
+ /* @__PURE__ */ jsx24("div", { className: "h-2 w-2 animate-bounce rounded-full bg-muted-foreground/60 [animation-delay:-0.15s]" }),
2984
+ /* @__PURE__ */ jsx24("div", { className: "h-2 w-2 animate-bounce rounded-full bg-muted-foreground/60" })
2732
2985
  ] }) }) });
2733
2986
  })()
2734
2987
  ] })
2735
2988
  ] }),
2736
- /* @__PURE__ */ jsxs11("div", { className: "p-2 sticky bottom-0 z-10 bg-background", children: [
2737
- /* @__PURE__ */ jsx22(
2989
+ /* @__PURE__ */ jsxs13("div", { className: "p-2 sticky bottom-0 z-10 bg-background", children: [
2990
+ 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 }),
2991
+ /* @__PURE__ */ jsx24(
2738
2992
  "input",
2739
2993
  {
2740
2994
  ref: fileInputRef,
@@ -2745,7 +2999,7 @@ function Chat({
2745
2999
  className: "hidden"
2746
3000
  }
2747
3001
  ),
2748
- attachments.length > 0 && /* @__PURE__ */ jsx22("div", { className: "mb-3 flex flex-wrap gap-2", children: attachments.map((item) => /* @__PURE__ */ jsxs11(
3002
+ attachments.length > 0 && /* @__PURE__ */ jsx24("div", { className: "mb-3 flex flex-wrap gap-2", children: attachments.map((item) => /* @__PURE__ */ jsxs13(
2749
3003
  "div",
2750
3004
  {
2751
3005
  className: cn(
@@ -2753,24 +3007,24 @@ function Chat({
2753
3007
  item.status === "error" ? "bg-destructive/10 border border-destructive/30" : "bg-muted"
2754
3008
  ),
2755
3009
  children: [
2756
- item.status === "uploading" && /* @__PURE__ */ jsx22(Loader22, { size: 14, className: "animate-spin text-muted-foreground" }),
2757
- item.status === "success" && /* @__PURE__ */ jsx22(FileText2, { size: 14, className: "text-muted-foreground" }),
2758
- item.status === "error" && /* @__PURE__ */ jsx22(FileText2, { size: 14, className: "text-destructive" }),
2759
- /* @__PURE__ */ jsx22("span", { className: cn(
3010
+ item.status === "uploading" && /* @__PURE__ */ jsx24(Loader22, { size: 14, className: "animate-spin text-muted-foreground" }),
3011
+ item.status === "success" && /* @__PURE__ */ jsx24(FileText2, { size: 14, className: "text-muted-foreground" }),
3012
+ item.status === "error" && /* @__PURE__ */ jsx24(FileText2, { size: 14, className: "text-destructive" }),
3013
+ /* @__PURE__ */ jsx24("span", { className: cn(
2760
3014
  "max-w-30 truncate",
2761
3015
  item.status === "error" && "text-destructive"
2762
3016
  ), children: item.file.name }),
2763
- item.status === "error" && /* @__PURE__ */ jsx22(
3017
+ item.status === "error" && /* @__PURE__ */ jsx24(
2764
3018
  "button",
2765
3019
  {
2766
3020
  type: "button",
2767
3021
  onClick: () => handleRetryUpload(item.localId),
2768
3022
  className: "ml-1 rounded-full p-0.5 text-destructive hover:bg-destructive/20",
2769
3023
  title: t("chat.retryUpload"),
2770
- children: /* @__PURE__ */ jsx22(RefreshCw2, { size: 12 })
3024
+ children: /* @__PURE__ */ jsx24(RefreshCw2, { size: 12 })
2771
3025
  }
2772
3026
  ),
2773
- /* @__PURE__ */ jsx22(
3027
+ /* @__PURE__ */ jsx24(
2774
3028
  "button",
2775
3029
  {
2776
3030
  type: "button",
@@ -2779,26 +3033,26 @@ function Chat({
2779
3033
  "ml-1 rounded-full p-0.5",
2780
3034
  item.status === "error" ? "text-destructive hover:bg-destructive/20" : "hover:bg-muted-foreground/20"
2781
3035
  ),
2782
- children: /* @__PURE__ */ jsx22(X2, { size: 12 })
3036
+ children: /* @__PURE__ */ jsx24(X2, { size: 12 })
2783
3037
  }
2784
3038
  )
2785
3039
  ]
2786
3040
  },
2787
3041
  item.localId
2788
3042
  )) }),
2789
- selectedTool && /* @__PURE__ */ jsxs11("div", { className: "mb-2 flex items-center gap-2", children: [
2790
- /* @__PURE__ */ jsx22("span", { className: "rounded-full bg-primary/10 px-2 py-0.5 text-xs font-medium text-primary", children: selectedTool.shortLabel ?? selectedTool.label }),
2791
- /* @__PURE__ */ jsx22(
3043
+ selectedTool && /* @__PURE__ */ jsxs13("div", { className: "mb-2 flex items-center gap-2", children: [
3044
+ /* @__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 }),
3045
+ /* @__PURE__ */ jsx24(
2792
3046
  "button",
2793
3047
  {
2794
3048
  type: "button",
2795
3049
  onClick: () => setSelectedTool(null),
2796
3050
  className: "rounded-full p-0.5 text-muted-foreground hover:bg-muted",
2797
- children: /* @__PURE__ */ jsx22(X2, { size: 12 })
3051
+ children: /* @__PURE__ */ jsx24(X2, { size: 12 })
2798
3052
  }
2799
3053
  )
2800
3054
  ] }),
2801
- /* @__PURE__ */ jsx22("form", { className: "flex items-center", onSubmit: handleSubmit, children: /* @__PURE__ */ jsxs11(
3055
+ /* @__PURE__ */ jsx24("form", { className: "flex items-center", onSubmit: handleSubmit, children: /* @__PURE__ */ jsxs13(
2802
3056
  "div",
2803
3057
  {
2804
3058
  className: cn(
@@ -2809,7 +3063,7 @@ function Chat({
2809
3063
  "transition-shadow duration-200"
2810
3064
  ),
2811
3065
  children: [
2812
- /* @__PURE__ */ jsx22(
3066
+ /* @__PURE__ */ jsx24(
2813
3067
  ComposerMenu,
2814
3068
  {
2815
3069
  composer,
@@ -2819,7 +3073,7 @@ function Chat({
2819
3073
  disabled: stream.isLoading || missingConfig || isHistoryLoading
2820
3074
  }
2821
3075
  ),
2822
- /* @__PURE__ */ jsx22(
3076
+ /* @__PURE__ */ jsx24(
2823
3077
  "input",
2824
3078
  {
2825
3079
  type: "text",
@@ -2835,7 +3089,7 @@ function Chat({
2835
3089
  autoComplete: "off"
2836
3090
  }
2837
3091
  ),
2838
- /* @__PURE__ */ jsx22(
3092
+ /* @__PURE__ */ jsx24(
2839
3093
  SendButton,
2840
3094
  {
2841
3095
  disabled: isSendDisabled,
@@ -2848,7 +3102,7 @@ function Chat({
2848
3102
  ]
2849
3103
  }
2850
3104
  ) }),
2851
- disclaimer?.text && /* @__PURE__ */ jsx22(
3105
+ disclaimer?.text && /* @__PURE__ */ jsx24(
2852
3106
  "p",
2853
3107
  {
2854
3108
  className: cn(
@@ -2858,7 +3112,10 @@ function Chat({
2858
3112
  children: disclaimer.text
2859
3113
  }
2860
3114
  ),
2861
- /* @__PURE__ */ jsx22("p", { className: "mt-2 text-center text-xs text-muted-foreground", children: t("chat.poweredBy") })
3115
+ /* @__PURE__ */ jsxs13("div", { className: "mt-2 flex items-center justify-center gap-2 text-xs text-muted-foreground", children: [
3116
+ /* @__PURE__ */ jsx24("span", { children: t("chat.poweredBy") }),
3117
+ /* @__PURE__ */ jsx24(ContextUsageIndicator, { className: "absolute right-4" })
3118
+ ] })
2862
3119
  ] })
2863
3120
  ]
2864
3121
  }
@@ -2866,11 +3123,11 @@ function Chat({
2866
3123
  }
2867
3124
 
2868
3125
  // src/components/ui/input.tsx
2869
- import * as React18 from "react";
2870
- import { jsx as jsx23 } from "react/jsx-runtime";
2871
- var Input = React18.forwardRef(
3126
+ import * as React19 from "react";
3127
+ import { jsx as jsx25 } from "react/jsx-runtime";
3128
+ var Input = React19.forwardRef(
2872
3129
  ({ className, type, ...props }, ref) => {
2873
- return /* @__PURE__ */ jsx23(
3130
+ return /* @__PURE__ */ jsx25(
2874
3131
  "input",
2875
3132
  {
2876
3133
  ref,
@@ -2887,10 +3144,10 @@ var Input = React18.forwardRef(
2887
3144
  Input.displayName = "Input";
2888
3145
 
2889
3146
  // src/components/ui/avatar.tsx
2890
- import * as React19 from "react";
3147
+ import * as React20 from "react";
2891
3148
  import * as AvatarPrimitive from "@radix-ui/react-avatar";
2892
- import { jsx as jsx24 } from "react/jsx-runtime";
2893
- var Avatar = React19.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx24(
3149
+ import { jsx as jsx26 } from "react/jsx-runtime";
3150
+ var Avatar = React20.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx26(
2894
3151
  AvatarPrimitive.Root,
2895
3152
  {
2896
3153
  ref,
@@ -2902,7 +3159,7 @@ var Avatar = React19.forwardRef(({ className, ...props }, ref) => /* @__PURE__ *
2902
3159
  }
2903
3160
  ));
2904
3161
  Avatar.displayName = AvatarPrimitive.Root.displayName;
2905
- var AvatarImage = React19.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx24(
3162
+ var AvatarImage = React20.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx26(
2906
3163
  AvatarPrimitive.Image,
2907
3164
  {
2908
3165
  ref,
@@ -2911,7 +3168,7 @@ var AvatarImage = React19.forwardRef(({ className, ...props }, ref) => /* @__PUR
2911
3168
  }
2912
3169
  ));
2913
3170
  AvatarImage.displayName = AvatarPrimitive.Image.displayName;
2914
- var AvatarFallback = React19.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx24(
3171
+ var AvatarFallback = React20.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx26(
2915
3172
  AvatarPrimitive.Fallback,
2916
3173
  {
2917
3174
  ref,
@@ -2925,10 +3182,10 @@ var AvatarFallback = React19.forwardRef(({ className, ...props }, ref) => /* @__
2925
3182
  AvatarFallback.displayName = AvatarPrimitive.Fallback.displayName;
2926
3183
 
2927
3184
  // src/components/ui/separator.tsx
2928
- import * as React20 from "react";
2929
- import { jsx as jsx25 } from "react/jsx-runtime";
2930
- var Separator = React20.forwardRef(
2931
- ({ className, orientation = "horizontal", ...props }, ref) => /* @__PURE__ */ jsx25(
3185
+ import * as React21 from "react";
3186
+ import { jsx as jsx27 } from "react/jsx-runtime";
3187
+ var Separator = React21.forwardRef(
3188
+ ({ className, orientation = "horizontal", ...props }, ref) => /* @__PURE__ */ jsx27(
2932
3189
  "div",
2933
3190
  {
2934
3191
  ref,