@xpert-ai/chatkit-ui 0.1.1 → 0.1.2

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 (337) hide show
  1. package/dist/app/assets/{_baseUniq-p9H3Gzep.js → _baseUniq-Cjg58ynO.js} +1 -1
  2. package/dist/app/assets/{abap-bJX3iBqH.js → abap-CaHNU3KZ.js} +1 -1
  3. package/dist/app/assets/{abnf-BoiZ35EE.js → abnf-D-YMXYdM.js} +1 -1
  4. package/dist/app/assets/{actionscript-D-H9vZ8b.js → actionscript-CrHB5nA4.js} +1 -1
  5. package/dist/app/assets/{ada-Bne3WpOl.js → ada-Dv2nikaa.js} +1 -1
  6. package/dist/app/assets/{agda-C938cagi.js → agda-DFaAW7Yp.js} +1 -1
  7. package/dist/app/assets/{al-Dcxw3Vj0.js → al-CgiCJJan.js} +1 -1
  8. package/dist/app/assets/{antlr4-uTm2QqyV.js → antlr4-BtYcfzHN.js} +1 -1
  9. package/dist/app/assets/{apacheconf-D52D513G.js → apacheconf-CQ7_TaHr.js} +1 -1
  10. package/dist/app/assets/{apex-B76H7J4g.js → apex-B4zhZGbX.js} +1 -1
  11. package/dist/app/assets/{apl-CzLk42pF.js → apl-CYl9UMD4.js} +1 -1
  12. package/dist/app/assets/{applescript-Dx8Ig-Eo.js → applescript-CqOg5uaM.js} +1 -1
  13. package/dist/app/assets/{aql-wjx32tAU.js → aql-g4FQmCtN.js} +1 -1
  14. package/dist/app/assets/{arc-B32_yhh0.js → arc-Dg9GdpOd.js} +1 -1
  15. package/dist/app/assets/{architectureDiagram-Q4EWVU46-Ba-C8DAI.js → architectureDiagram-Q4EWVU46-D_Hf6A9k.js} +1 -1
  16. package/dist/app/assets/{arduino-BwKDxTSS.js → arduino-CLAoEDGh.js} +1 -1
  17. package/dist/app/assets/{arff-DrkRViyY.js → arff-CkPQOMpJ.js} +1 -1
  18. package/dist/app/assets/{asciidoc-BGLZq9v8.js → asciidoc-D6FBYhU4.js} +1 -1
  19. package/dist/app/assets/{asm6502-MsEWIyJj.js → asm6502-BNREQutf.js} +1 -1
  20. package/dist/app/assets/{asmatmel-CeHxqS5T.js → asmatmel-AsGe04C5.js} +1 -1
  21. package/dist/app/assets/{aspnet-CmsQfR5a.js → aspnet-BowT6uwS.js} +1 -1
  22. package/dist/app/assets/{autohotkey-Cusm-zTm.js → autohotkey-CYQjpY2v.js} +1 -1
  23. package/dist/app/assets/{autoit-Da8gsEm-.js → autoit-DZuwPYYs.js} +1 -1
  24. package/dist/app/assets/{avisynth-C46xLzyo.js → avisynth-BApmLDkf.js} +1 -1
  25. package/dist/app/assets/{avro-idl-D2WmoYBG.js → avro-idl-DTdqv6Sr.js} +1 -1
  26. package/dist/app/assets/{bash-BrsKn3za.js → bash-COtf9s5e.js} +1 -1
  27. package/dist/app/assets/{basic-Dt5oGQ8B.js → basic-0Wk0Z9hh.js} +1 -1
  28. package/dist/app/assets/{batch-DtrIlfXi.js → batch-yLGV74r2.js} +1 -1
  29. package/dist/app/assets/{bbcode-BWYlAYoE.js → bbcode-gj0k8ZdD.js} +1 -1
  30. package/dist/app/assets/{bicep-C4sxks0f.js → bicep-BsCXg-ZU.js} +1 -1
  31. package/dist/app/assets/{birb-gYyyIZ-F.js → birb-CrVXepVH.js} +1 -1
  32. package/dist/app/assets/{bison-or-umhj6.js → bison-CEkN9m61.js} +1 -1
  33. package/dist/app/assets/{blockDiagram-DXYQGD6D-5oqbPp8P.js → blockDiagram-DXYQGD6D-Cxg7TJzM.js} +1 -1
  34. package/dist/app/assets/{bnf-BQR7hfk2.js → bnf-BNo5FkNz.js} +1 -1
  35. package/dist/app/assets/{brainfuck-DkQqhNHv.js → brainfuck-Be3VzThb.js} +1 -1
  36. package/dist/app/assets/{brightscript-rGhg0HBT.js → brightscript-DvlnFSog.js} +1 -1
  37. package/dist/app/assets/{bro-CIgtBg0f.js → bro-v-4Gv7xz.js} +1 -1
  38. package/dist/app/assets/{bsl-C4geIkQv.js → bsl-Ckf08F6h.js} +1 -1
  39. package/dist/app/assets/{c-Cw5181Rv.js → c-DzIU03a7.js} +1 -1
  40. package/dist/app/assets/{c4Diagram-AHTNJAMY-BKyN5n0Y.js → c4Diagram-AHTNJAMY-ClK737fG.js} +1 -1
  41. package/dist/app/assets/{cfscript-DHPNMvWS.js → cfscript-BjMiAM6E.js} +1 -1
  42. package/dist/app/assets/{chaiscript-Cd8c0hJ8.js → chaiscript-B43Wj-Sh.js} +1 -1
  43. package/dist/app/assets/channel-SVZNtrjN.js +1 -0
  44. package/dist/app/assets/{chunk-4BX2VUAB-CfLubn_X.js → chunk-4BX2VUAB-CLpouVUP.js} +1 -1
  45. package/dist/app/assets/{chunk-4TB4RGXK-Bhehm3S4.js → chunk-4TB4RGXK-Bx935_8R.js} +1 -1
  46. package/dist/app/assets/{chunk-55IACEB6-D0Zgi2qX.js → chunk-55IACEB6-BBvPym8v.js} +1 -1
  47. package/dist/app/assets/{chunk-EDXVE4YY-DzMULs0l.js → chunk-EDXVE4YY-DjPOkQ8M.js} +1 -1
  48. package/dist/app/assets/{chunk-FMBD7UC4-CEU9agAN.js → chunk-FMBD7UC4-DYYB_Z9z.js} +1 -1
  49. package/dist/app/assets/{chunk-OYMX7WX6-C-avxOs6.js → chunk-OYMX7WX6-D6RNfja3.js} +1 -1
  50. package/dist/app/assets/{chunk-QZHKN3VN-C66xsvBW.js → chunk-QZHKN3VN-C8ZgdC9O.js} +1 -1
  51. package/dist/app/assets/{chunk-YZCP3GAM-DZlwMcoL.js → chunk-YZCP3GAM-BBgDUOse.js} +1 -1
  52. package/dist/app/assets/{cil-L3oWT8Nl.js → cil-B9ihzdF2.js} +1 -1
  53. package/dist/app/assets/classDiagram-6PBFFD2Q-BiMmE_Ro.js +1 -0
  54. package/dist/app/assets/classDiagram-v2-HSJHXN6E-BiMmE_Ro.js +1 -0
  55. package/dist/app/assets/{clike-CHF9NJQa.js → clike-CJh4oCgy.js} +1 -1
  56. package/dist/app/assets/{clojure-YgRWUbgr.js → clojure-TlSbaE4l.js} +1 -1
  57. package/dist/app/assets/clone-E2Stvins.js +1 -0
  58. package/dist/app/assets/{cmake-TK-Cvlxu.js → cmake-BSn84SxA.js} +1 -1
  59. package/dist/app/assets/{cobol-XSbSVVcZ.js → cobol-CJ6-cTtI.js} +1 -1
  60. package/dist/app/assets/{coffeescript-HxNd9-Ob.js → coffeescript-stKJEoMv.js} +1 -1
  61. package/dist/app/assets/{concurnas-DK3wUjjD.js → concurnas-1ifwVnR3.js} +1 -1
  62. package/dist/app/assets/{coq-B9Rq7NUE.js → coq-DVFU6UV7.js} +1 -1
  63. package/dist/app/assets/{core-B1vWjEfj.js → core-Yh44uZBs.js} +1 -1
  64. package/dist/app/assets/{cose-bilkent-S5V4N54A-4PebjqsX.js → cose-bilkent-S5V4N54A-Dx7-_QHb.js} +1 -1
  65. package/dist/app/assets/{cpp-DUWMh-8O.js → cpp-Zzzi5FD8.js} +1 -1
  66. package/dist/app/assets/{crystal-rYgGF4lS.js → crystal-DDbZAA_E.js} +1 -1
  67. package/dist/app/assets/{csharp-eqTMyksU.js → csharp-BZcvKq6n.js} +1 -1
  68. package/dist/app/assets/{cshtml-DSv9-mpk.js → cshtml-9x1DpGIK.js} +1 -1
  69. package/dist/app/assets/{csp-DyZfVzvb.js → csp-D1hHVDgG.js} +1 -1
  70. package/dist/app/assets/{css-DYXyUyJe.js → css-BFu7Iqqk.js} +1 -1
  71. package/dist/app/assets/{css-extras-FP15zHq8.js → css-extras-COx1Ei_l.js} +1 -1
  72. package/dist/app/assets/{csv-Bp1iUR7c.js → csv-D0CxHXjS.js} +1 -1
  73. package/dist/app/assets/{cypher-BjXgs7Y3.js → cypher-BsuAyRBu.js} +1 -1
  74. package/dist/app/assets/{d-Bquc1S6a.js → d-CtjOdpDZ.js} +1 -1
  75. package/dist/app/assets/{dagre-KV5264BT-D9OICDLb.js → dagre-KV5264BT-DjhJCF-B.js} +1 -1
  76. package/dist/app/assets/{dart-DrKyO7TC.js → dart-BN9c8RLX.js} +1 -1
  77. package/dist/app/assets/{dataweave-BgpsWzO7.js → dataweave-DzlUCFjQ.js} +1 -1
  78. package/dist/app/assets/{dax-BwP1SyCZ.js → dax-D0KU-54t.js} +1 -1
  79. package/dist/app/assets/{dhall-BA5nXB8V.js → dhall-BZJS2G5U.js} +1 -1
  80. package/dist/app/assets/{diagram-5BDNPKRD-BIFTIy6n.js → diagram-5BDNPKRD-DSws8TSr.js} +1 -1
  81. package/dist/app/assets/{diagram-G4DWMVQ6-BCVIBrZ2.js → diagram-G4DWMVQ6-Cx7BBH89.js} +1 -1
  82. package/dist/app/assets/{diagram-MMDJMWI5-43z4NaFN.js → diagram-MMDJMWI5-D9n-fpq5.js} +1 -1
  83. package/dist/app/assets/{diagram-TYMM5635-BDZjM1c_.js → diagram-TYMM5635-A2Du0da2.js} +1 -1
  84. package/dist/app/assets/{diff-Yc6a7YOT.js → diff-2klWb1Uo.js} +1 -1
  85. package/dist/app/assets/{django-B61BBi1t.js → django-B2AbqJYz.js} +1 -1
  86. package/dist/app/assets/{dns-zone-file-DtXhOJHq.js → dns-zone-file-CvZSGx-4.js} +1 -1
  87. package/dist/app/assets/{docker-BLh9n10i.js → docker-Cn7U_QhX.js} +1 -1
  88. package/dist/app/assets/{dot-BbSnn0Ap.js → dot-B8xtegaK.js} +1 -1
  89. package/dist/app/assets/{ebnf-D_ljHBdb.js → ebnf-oe3GchaY.js} +1 -1
  90. package/dist/app/assets/{editorconfig-BQXrLGC5.js → editorconfig-BcXP_CBv.js} +1 -1
  91. package/dist/app/assets/{eiffel-Cm3FUI5X.js → eiffel-2H-hw0_M.js} +1 -1
  92. package/dist/app/assets/{ejs-CIp2UdDw.js → ejs-Ba0Dl3hs.js} +1 -1
  93. package/dist/app/assets/{elixir-DXlWBe5R.js → elixir-Zqex1hfd.js} +1 -1
  94. package/dist/app/assets/{elm-ECxjLCR-.js → elm-BaLOxH54.js} +1 -1
  95. package/dist/app/assets/{erDiagram-SMLLAGMA-B9I89ndp.js → erDiagram-SMLLAGMA-lphP26u7.js} +1 -1
  96. package/dist/app/assets/{erb-FzgX8ydn.js → erb-D4zKB7vm.js} +1 -1
  97. package/dist/app/assets/{erlang-CzvdSvoz.js → erlang-hK3qlNLz.js} +1 -1
  98. package/dist/app/assets/{etlua-C3Zsz3RA.js → etlua-DmORWQ6o.js} +1 -1
  99. package/dist/app/assets/{excel-formula-Cua38PQJ.js → excel-formula-Dyve7tHx.js} +1 -1
  100. package/dist/app/assets/{factor-CSAzXoQb.js → factor-aKN6m8fH.js} +1 -1
  101. package/dist/app/assets/{false-NSFMCUjP.js → false-CIRDgfm3.js} +1 -1
  102. package/dist/app/assets/{firestore-security-rules-BjNYwvNe.js → firestore-security-rules-D8Ht8z5e.js} +1 -1
  103. package/dist/app/assets/{flow-BuZaM8y6.js → flow-CoMa0rFO.js} +1 -1
  104. package/dist/app/assets/{flowDiagram-DWJPFMVM-CWmW_muY.js → flowDiagram-DWJPFMVM-BLg6doOr.js} +1 -1
  105. package/dist/app/assets/{fortran-Cc_f_mSH.js → fortran-CN_uZJ_i.js} +1 -1
  106. package/dist/app/assets/{fsharp-IelQ4Z-Z.js → fsharp-C9nE9g7s.js} +1 -1
  107. package/dist/app/assets/{ftl-Ddl9DDyG.js → ftl-DvqhmJFJ.js} +1 -1
  108. package/dist/app/assets/{ganttDiagram-T4ZO3ILL-CuR1J7dx.js → ganttDiagram-T4ZO3ILL-20MMEZeq.js} +1 -1
  109. package/dist/app/assets/{gap-D3W6p-Jp.js → gap-ChJ4bKbS.js} +1 -1
  110. package/dist/app/assets/{gcode-Bn8O4UOx.js → gcode-D6-Q_Sls.js} +1 -1
  111. package/dist/app/assets/{gdscript-B4nck3Az.js → gdscript-uy9Z57J0.js} +1 -1
  112. package/dist/app/assets/{gedcom-BCTZRsxn.js → gedcom-DKejVBFQ.js} +1 -1
  113. package/dist/app/assets/{gherkin-CFCJQug9.js → gherkin-D309wbrl.js} +1 -1
  114. package/dist/app/assets/{git-Dd2t83_l.js → git-CXyU-4Kx.js} +1 -1
  115. package/dist/app/assets/{gitGraphDiagram-UUTBAWPF-DzscVnaS.js → gitGraphDiagram-UUTBAWPF-CdbhEKk_.js} +1 -1
  116. package/dist/app/assets/{glsl-NXGZDuA9.js → glsl-CUHcECEi.js} +1 -1
  117. package/dist/app/assets/{gml-DtS9_99j.js → gml-BYJwp8Mq.js} +1 -1
  118. package/dist/app/assets/{gn-C6VmNt4U.js → gn-C5jDEgl-.js} +1 -1
  119. package/dist/app/assets/{go-otK-v_nb.js → go-4DBR4Ukq.js} +1 -1
  120. package/dist/app/assets/{go-module-CmBM8SA1.js → go-module-BDCY5HMb.js} +1 -1
  121. package/dist/app/assets/{graph-BelNBDAZ.js → graph-CasqcucB.js} +1 -1
  122. package/dist/app/assets/{graphql-JPlPKrhh.js → graphql-CUOhePaJ.js} +1 -1
  123. package/dist/app/assets/{groovy-CkMUqzIt.js → groovy-C6NRtaMF.js} +1 -1
  124. package/dist/app/assets/{haml-DwaIQOGd.js → haml-CeFDFdq_.js} +1 -1
  125. package/dist/app/assets/{handlebars-Ck6RB1iw.js → handlebars-Diav69MK.js} +1 -1
  126. package/dist/app/assets/{haskell-BxYLBxBa.js → haskell-BRtS7ZYk.js} +1 -1
  127. package/dist/app/assets/{haxe-C4OMV9zJ.js → haxe-okolorzn.js} +1 -1
  128. package/dist/app/assets/{hcl-DVznmODf.js → hcl-DUovHBmz.js} +1 -1
  129. package/dist/app/assets/{hlsl-Z_ySkish.js → hlsl-Est_RcA2.js} +1 -1
  130. package/dist/app/assets/{hoon-UWT3k4H8.js → hoon-BiOVdLrI.js} +1 -1
  131. package/dist/app/assets/{hpkp-CXa39f7J.js → hpkp-Bm0WuAFk.js} +1 -1
  132. package/dist/app/assets/{hsts-CJF4yNvU.js → hsts-CbOaMMM4.js} +1 -1
  133. package/dist/app/assets/{http-BxOKxlr4.js → http-D0tGKTH_.js} +1 -1
  134. package/dist/app/assets/{ichigojam-Csb66zY2.js → ichigojam-WTyjHjN0.js} +1 -1
  135. package/dist/app/assets/{icon-DxphTQI9.js → icon-Bcw6nO7C.js} +1 -1
  136. package/dist/app/assets/{icu-message-format-CSZfssuP.js → icu-message-format-1IVITSOw.js} +1 -1
  137. package/dist/app/assets/{idris-BmXANiaa.js → idris-DGiKWxqv.js} +1 -1
  138. package/dist/app/assets/{iecst-FfznJdjL.js → iecst-_G6fk-6o.js} +1 -1
  139. package/dist/app/assets/{ignore-C3IKkXMi.js → ignore-CGGRjy1I.js} +1 -1
  140. package/dist/app/assets/index-BnLZxiSt.js +747 -0
  141. package/dist/app/assets/index-D58ynlvg.css +1 -0
  142. package/dist/app/assets/{infoDiagram-42DDH7IO-rTeQPEt4.js → infoDiagram-42DDH7IO-DNXFcEYI.js} +1 -1
  143. package/dist/app/assets/{inform7-Dk4gPo4b.js → inform7-DJNO-7Vs.js} +1 -1
  144. package/dist/app/assets/{ini-CClGKGMe.js → ini-BXxeA4dZ.js} +1 -1
  145. package/dist/app/assets/{io-6YtqLtET.js → io-CZYqA1fa.js} +1 -1
  146. package/dist/app/assets/{ishikawaDiagram-UXIWVN3A-BBnJ9iuN.js → ishikawaDiagram-UXIWVN3A-1FFzVMOS.js} +1 -1
  147. package/dist/app/assets/{j-DBPrIcAG.js → j-CLXGTuej.js} +1 -1
  148. package/dist/app/assets/{java-CopGP3Lu.js → java-DgCJQY9_.js} +1 -1
  149. package/dist/app/assets/{javadoc-C8F3ifW2.js → javadoc-rf7ABQVy.js} +1 -1
  150. package/dist/app/assets/{javadoclike-BNVFpoJC.js → javadoclike-BhPYSoi1.js} +1 -1
  151. package/dist/app/assets/{javascript-BMkkas2q.js → javascript-DOESY9kn.js} +1 -1
  152. package/dist/app/assets/{javastacktrace-DuykBujE.js → javastacktrace-B40tpYFc.js} +1 -1
  153. package/dist/app/assets/{jexl-BSWOm8s5.js → jexl-CVSwBfWj.js} +1 -1
  154. package/dist/app/assets/{jolie-CdkOmKFM.js → jolie-CuMdzw00.js} +1 -1
  155. package/dist/app/assets/{journeyDiagram-VCZTEJTY-CRDpL_1T.js → journeyDiagram-VCZTEJTY-DCh9QB_1.js} +1 -1
  156. package/dist/app/assets/{jq-Nr0Kxpxc.js → jq-rSPG4wjz.js} +1 -1
  157. package/dist/app/assets/{js-extras-CA8iZ_E5.js → js-extras-DtC7d85t.js} +1 -1
  158. package/dist/app/assets/{js-templates-BoqcQW67.js → js-templates-BkzRtF3M.js} +1 -1
  159. package/dist/app/assets/{jsdoc-CeMFl6xP.js → jsdoc-CdEDtKIx.js} +1 -1
  160. package/dist/app/assets/{json-CrSHUueM.js → json-DFUISOXb.js} +1 -1
  161. package/dist/app/assets/{json5-BBfX460l.js → json5-DDXB8kVt.js} +1 -1
  162. package/dist/app/assets/{jsonp-DHEqmGWL.js → jsonp-B6KceYOu.js} +1 -1
  163. package/dist/app/assets/{jsstacktrace-BK3SuvsS.js → jsstacktrace-BmLmkRns.js} +1 -1
  164. package/dist/app/assets/{jsx-CjR3dp14.js → jsx-tZerg2PH.js} +1 -1
  165. package/dist/app/assets/{julia-BJJ6LUnI.js → julia-Bc1WscpO.js} +1 -1
  166. package/dist/app/assets/{kanban-definition-6JOO6SKY-Dztk4Auy.js → kanban-definition-6JOO6SKY-BG2AO71l.js} +1 -1
  167. package/dist/app/assets/{keepalived-CjGUJvsk.js → keepalived-C-VxfNGq.js} +1 -1
  168. package/dist/app/assets/{keyman-Bogz-7f0.js → keyman-EjQIu4mX.js} +1 -1
  169. package/dist/app/assets/{kotlin-DGdetcAk.js → kotlin-CQALgAA5.js} +1 -1
  170. package/dist/app/assets/{kumir-Czhml4-j.js → kumir-7Nk84McD.js} +1 -1
  171. package/dist/app/assets/{kusto-BuL9qwXk.js → kusto-DaP91ut7.js} +1 -1
  172. package/dist/app/assets/{latex-BAc_zS_4.js → latex-DjQNRo9H.js} +1 -1
  173. package/dist/app/assets/{latte-BzZFX_wH.js → latte-5JEuNRoR.js} +1 -1
  174. package/dist/app/assets/{layout-DOHRtR3x.js → layout-FVsf45l9.js} +1 -1
  175. package/dist/app/assets/{less-DATW_Ot3.js → less-8yUOsL09.js} +1 -1
  176. package/dist/app/assets/{lilypond-DSmAdE7B.js → lilypond-COsmQkBk.js} +1 -1
  177. package/dist/app/assets/{linear-rr7FzlEM.js → linear-C_63YKi4.js} +1 -1
  178. package/dist/app/assets/{liquid-CF8lqz9m.js → liquid--Ji9gJSD.js} +1 -1
  179. package/dist/app/assets/{lisp-BUPAsWUh.js → lisp-DuUkFEfd.js} +1 -1
  180. package/dist/app/assets/{livescript-B8CIEQDH.js → livescript-Cs6PchSa.js} +1 -1
  181. package/dist/app/assets/{llvm-DGaRc9w0.js → llvm-COqWFLYS.js} +1 -1
  182. package/dist/app/assets/{log-XuE3Wqn5.js → log-C8QHMZzv.js} +1 -1
  183. package/dist/app/assets/{lolcode-Clk-p_j2.js → lolcode-BIsqHJ6H.js} +1 -1
  184. package/dist/app/assets/{lua-BLczZbJa.js → lua-Ds7uGUxB.js} +1 -1
  185. package/dist/app/assets/{magma-DTO3ftgF.js → magma-DLHoFFMW.js} +1 -1
  186. package/dist/app/assets/{makefile-OSVaZHmV.js → makefile-CW_5azpn.js} +1 -1
  187. package/dist/app/assets/{markdown-InD7dXs9.js → markdown-wU5DnlD5.js} +1 -1
  188. package/dist/app/assets/{markup-BN6MlRZT.js → markup-BjK1nSyh.js} +1 -1
  189. package/dist/app/assets/{markup-templating-DRXAmI1c.js → markup-templating-CfGV0lcD.js} +1 -1
  190. package/dist/app/assets/{matlab-CV_q70_G.js → matlab-Bs2eP0LD.js} +1 -1
  191. package/dist/app/assets/{maxscript-Ck_8H__C.js → maxscript-D8jwXiPi.js} +1 -1
  192. package/dist/app/assets/{mel-D9MU0rZa.js → mel-Cmbsj11e.js} +1 -1
  193. package/dist/app/assets/{mermaid-DshECBS6.js → mermaid-C-cxdm_P.js} +1 -1
  194. package/dist/app/assets/{min-CfLzpwyh.js → min-BctQ8xDj.js} +1 -1
  195. package/dist/app/assets/{mindmap-definition-QFDTVHPH-C7XGlydX.js → mindmap-definition-QFDTVHPH-DHcgEjW6.js} +1 -1
  196. package/dist/app/assets/{mizar-WBJ-SwIG.js → mizar-Ca1dbNOh.js} +1 -1
  197. package/dist/app/assets/{mongodb-CmzRTKBq.js → mongodb-BocaDOlW.js} +1 -1
  198. package/dist/app/assets/{monkey-W1yB--1T.js → monkey-BLhpedmj.js} +1 -1
  199. package/dist/app/assets/{moonscript-BD5hlCXn.js → moonscript-CElpz-Ug.js} +1 -1
  200. package/dist/app/assets/{n1ql-CwugAEoM.js → n1ql-CwNqjlWA.js} +1 -1
  201. package/dist/app/assets/{n4js-tFC-Lsvd.js → n4js-B1i6cZX9.js} +1 -1
  202. package/dist/app/assets/{nand2tetris-hdl-hzvfBJxH.js → nand2tetris-hdl-DO01eHXa.js} +1 -1
  203. package/dist/app/assets/{naniscript-DUtjoUL1.js → naniscript-C86I87cR.js} +1 -1
  204. package/dist/app/assets/{nasm-Dcckq6ib.js → nasm-X9SuO04-.js} +1 -1
  205. package/dist/app/assets/{neon-DeVv09BE.js → neon-Cb3VrB_2.js} +1 -1
  206. package/dist/app/assets/{nevod-CAq9Kfwt.js → nevod-BiEf92s6.js} +1 -1
  207. package/dist/app/assets/{nginx-C8GHDEqt.js → nginx-CUAldmyK.js} +1 -1
  208. package/dist/app/assets/{nim-BqdyUedD.js → nim-CicsGaXu.js} +1 -1
  209. package/dist/app/assets/{nix-514mCcjs.js → nix-CqX4i_yR.js} +1 -1
  210. package/dist/app/assets/{nsis-CdKqXn3g.js → nsis-TyCoq1Up.js} +1 -1
  211. package/dist/app/assets/{objectivec-uPp8iMUn.js → objectivec-COzECw8M.js} +1 -1
  212. package/dist/app/assets/{ocaml-D4EB6rFL.js → ocaml-CouJ1SZ_.js} +1 -1
  213. package/dist/app/assets/{opencl-BN8tmrp-.js → opencl-BNCeQsDQ.js} +1 -1
  214. package/dist/app/assets/{openqasm-CZT9yVLH.js → openqasm-DX-rtDDv.js} +1 -1
  215. package/dist/app/assets/{oz-xEnzbfGI.js → oz-CAFaEfY9.js} +1 -1
  216. package/dist/app/assets/{parigp-PN33G_ZS.js → parigp-DTj7bCjF.js} +1 -1
  217. package/dist/app/assets/{parser-YigtK2Gn.js → parser-Dw8xYjDE.js} +1 -1
  218. package/dist/app/assets/{pascal-BSQHqJO2.js → pascal-rnwnKrYC.js} +1 -1
  219. package/dist/app/assets/{pascaligo-B3om_nlX.js → pascaligo-x1XdfDyr.js} +1 -1
  220. package/dist/app/assets/{pcaxis-B_qwjIH4.js → pcaxis-2ZAgxxTO.js} +1 -1
  221. package/dist/app/assets/{peoplecode-G3CTxh8q.js → peoplecode-pTltM-sq.js} +1 -1
  222. package/dist/app/assets/{perl-CBvGMSZZ.js → perl-CdAlw2Ho.js} +1 -1
  223. package/dist/app/assets/{php-DewJLtev.js → php-C2mFD2oC.js} +1 -1
  224. package/dist/app/assets/{php-extras-BT2DdjGn.js → php-extras-D7Zt-ImZ.js} +1 -1
  225. package/dist/app/assets/{phpdoc-DiQXOd9D.js → phpdoc-C1kmfh9i.js} +1 -1
  226. package/dist/app/assets/{pieDiagram-DEJITSTG-CYXmqIpD.js → pieDiagram-DEJITSTG-B_eQU9Uk.js} +1 -1
  227. package/dist/app/assets/{plsql-BzUO3h3t.js → plsql-Im5gOG9c.js} +1 -1
  228. package/dist/app/assets/{powerquery-D_713gdU.js → powerquery-poq2eyPm.js} +1 -1
  229. package/dist/app/assets/{powershell-D7IGyPyT.js → powershell-DJ56nmEi.js} +1 -1
  230. package/dist/app/assets/{processing-CULfTuKk.js → processing-Bn-H7mMf.js} +1 -1
  231. package/dist/app/assets/{prolog-DI8sHw_1.js → prolog-BCb-6dWU.js} +1 -1
  232. package/dist/app/assets/{promql-DdWPpZzX.js → promql-CtbjoMKF.js} +1 -1
  233. package/dist/app/assets/{properties-UUBptvjg.js → properties-CU4TDD4l.js} +1 -1
  234. package/dist/app/assets/{protobuf-Yh4lBroy.js → protobuf-_Q2Yj86k.js} +1 -1
  235. package/dist/app/assets/{psl-CKuqp255.js → psl-DqN21NC_.js} +1 -1
  236. package/dist/app/assets/{pug-Duz4hJlP.js → pug-DAgKMecD.js} +1 -1
  237. package/dist/app/assets/{puppet-Tenfq4aE.js → puppet-Cc2ljXH1.js} +1 -1
  238. package/dist/app/assets/{pure-CTE3YKFb.js → pure-B0x_E1bn.js} +1 -1
  239. package/dist/app/assets/{purebasic-BzV6ZqWW.js → purebasic-DcsxzNqC.js} +1 -1
  240. package/dist/app/assets/{purescript-CjSCYtGb.js → purescript-Cc11iskN.js} +1 -1
  241. package/dist/app/assets/{q-BTX8RKFy.js → q-SRKQXeFP.js} +1 -1
  242. package/dist/app/assets/{qml-CGjBjP81.js → qml-COWYdH0A.js} +1 -1
  243. package/dist/app/assets/{qore-5Gggmt2I.js → qore-AdoWA6sw.js} +1 -1
  244. package/dist/app/assets/{qsharp-DhqE1FPx.js → qsharp-k5lgGfSV.js} +1 -1
  245. package/dist/app/assets/{quadrantDiagram-34T5L4WZ-BbnPMKp-.js → quadrantDiagram-34T5L4WZ-U_BUH870.js} +1 -1
  246. package/dist/app/assets/{r-Dr0jr5tD.js → r-Bmcjr3EC.js} +1 -1
  247. package/dist/app/assets/{racket-NVUa01EO.js → racket-506ZDFuM.js} +1 -1
  248. package/dist/app/assets/{reason-Bx5CI0l0.js → reason-BngsaqkW.js} +1 -1
  249. package/dist/app/assets/{regex-12879jLK.js → regex-BC6jlFZr.js} +1 -1
  250. package/dist/app/assets/{rego-w2Fhvb_N.js → rego-BYCQ91X3.js} +1 -1
  251. package/dist/app/assets/{renpy-gPxX0z3Q.js → renpy-D95h89N9.js} +1 -1
  252. package/dist/app/assets/{requirementDiagram-MS252O5E-BhOU7uOd.js → requirementDiagram-MS252O5E-CWAV9Lki.js} +1 -1
  253. package/dist/app/assets/{rest-C39bU2b1.js → rest-DiYuUdld.js} +1 -1
  254. package/dist/app/assets/{rip-RLtTVF0Y.js → rip-B1Ip8kd2.js} +1 -1
  255. package/dist/app/assets/{roboconf-BJckt4oD.js → roboconf-DHaw-Q3G.js} +1 -1
  256. package/dist/app/assets/{robotframework-DCR96jiT.js → robotframework-HN9oBCJd.js} +1 -1
  257. package/dist/app/assets/{ruby-CRs8uxXB.js → ruby-C42HzAMc.js} +1 -1
  258. package/dist/app/assets/{rust-C0bGL254.js → rust-DJdUDgl0.js} +1 -1
  259. package/dist/app/assets/{sankeyDiagram-XADWPNL6-CFgkd6GO.js → sankeyDiagram-XADWPNL6-DzoDqMzU.js} +1 -1
  260. package/dist/app/assets/{sas-CkLtpL1M.js → sas-EmHkISJg.js} +1 -1
  261. package/dist/app/assets/{sass-FNfCYuQd.js → sass-BEWMjvc2.js} +1 -1
  262. package/dist/app/assets/{scala-Dy5lip5O.js → scala-Y9l-QmB_.js} +1 -1
  263. package/dist/app/assets/{scheme-pkKED5As.js → scheme-oQH0YeM4.js} +1 -1
  264. package/dist/app/assets/{scss-DrZ4F_S5.js → scss-DDqkkzfA.js} +1 -1
  265. package/dist/app/assets/{sequenceDiagram-FGHM5R23-t5z2WRg9.js → sequenceDiagram-FGHM5R23-BRWyyuf5.js} +1 -1
  266. package/dist/app/assets/{shell-session-tfqRzQ64.js → shell-session-DUtkYnuZ.js} +1 -1
  267. package/dist/app/assets/{smali-D9oJJF_a.js → smali-CQN_R6JD.js} +1 -1
  268. package/dist/app/assets/{smalltalk-FhicZwdZ.js → smalltalk-C5vveBjr.js} +1 -1
  269. package/dist/app/assets/{smarty-RTVkhvGe.js → smarty-BF9avlDB.js} +1 -1
  270. package/dist/app/assets/{sml-8jU1U62j.js → sml-C_smEF_i.js} +1 -1
  271. package/dist/app/assets/{solidity-DLvpuywG.js → solidity-CsmKUFUp.js} +1 -1
  272. package/dist/app/assets/{solution-file-BOwCbL9x.js → solution-file-5OHlEmXf.js} +1 -1
  273. package/dist/app/assets/{soy-Dye6FppK.js → soy-DHS0rtw_.js} +1 -1
  274. package/dist/app/assets/{sparql-BRIOTA6e.js → sparql-BxBq3H35.js} +1 -1
  275. package/dist/app/assets/{splunk-spl-xjEKSM5T.js → splunk-spl-C8VgtuYE.js} +1 -1
  276. package/dist/app/assets/{sqf-BTXRZqz9.js → sqf-hSDek24H.js} +1 -1
  277. package/dist/app/assets/{sql-LIGcsz7H.js → sql-DYgxUZFA.js} +1 -1
  278. package/dist/app/assets/{squirrel-D1i-yP9F.js → squirrel-C7uGEJgW.js} +1 -1
  279. package/dist/app/assets/{stan-Bz-MTQlG.js → stan-CGYqPG3F.js} +1 -1
  280. package/dist/app/assets/{stateDiagram-FHFEXIEX-INV79XkW.js → stateDiagram-FHFEXIEX-Dj_QL8hp.js} +1 -1
  281. package/dist/app/assets/stateDiagram-v2-QKLJ7IA2-BJgU_5Se.js +1 -0
  282. package/dist/app/assets/{stylus-CPcHbGGR.js → stylus-BCrv-hm1.js} +1 -1
  283. package/dist/app/assets/{swift-CMnIAhC_.js → swift-3XnbN5uB.js} +1 -1
  284. package/dist/app/assets/{systemd-CnQ86vtn.js → systemd-DzUq_PeH.js} +1 -1
  285. package/dist/app/assets/{t4-cs-ClADD8kZ.js → t4-cs-DaXmHhdA.js} +1 -1
  286. package/dist/app/assets/{t4-templating-BxEXIn9V.js → t4-templating-C1pqdj2v.js} +1 -1
  287. package/dist/app/assets/{t4-vb-BuQFrDQM.js → t4-vb-4wqP1_sy.js} +1 -1
  288. package/dist/app/assets/{tap-D-OeTv7J.js → tap-FHe0A6pH.js} +1 -1
  289. package/dist/app/assets/{tcl-D4EWmvqA.js → tcl-DlumdfOH.js} +1 -1
  290. package/dist/app/assets/{textile-vCa5WeBr.js → textile-BmxrCmib.js} +1 -1
  291. package/dist/app/assets/{timeline-definition-GMOUNBTQ-CZVpkWZR.js → timeline-definition-GMOUNBTQ-BcI-XOle.js} +1 -1
  292. package/dist/app/assets/{toml-CyQfWyMg.js → toml-BngAbTT7.js} +1 -1
  293. package/dist/app/assets/{tremor-DTpakXR3.js → tremor-BoVxotcN.js} +1 -1
  294. package/dist/app/assets/{tt2-I3k-jzpY.js → tt2-BoBfCiJa.js} +1 -1
  295. package/dist/app/assets/{turtle-BjS87MX7.js → turtle-CJfK17BD.js} +1 -1
  296. package/dist/app/assets/{twig-BYK2hDMY.js → twig-BoM58FfM.js} +1 -1
  297. package/dist/app/assets/{typescript-DNEOvUVG.js → typescript-BU7mQ9Me.js} +1 -1
  298. package/dist/app/assets/{typoscript-hqzFge6d.js → typoscript-BQMBCyle.js} +1 -1
  299. package/dist/app/assets/{unrealscript-_-NzaZj0.js → unrealscript-Bly1rszO.js} +1 -1
  300. package/dist/app/assets/{uorazor-BMR9qMW5.js → uorazor-AR6v804j.js} +1 -1
  301. package/dist/app/assets/{uri-BSGWfMxZ.js → uri-DQN5AlR9.js} +1 -1
  302. package/dist/app/assets/{v-CLtdeXIK.js → v-CzlNjPFF.js} +1 -1
  303. package/dist/app/assets/{vala-wzCcqtKA.js → vala-D4j-TYUj.js} +1 -1
  304. package/dist/app/assets/{vbnet-DGCLmXdC.js → vbnet-BO_zrLTA.js} +1 -1
  305. package/dist/app/assets/{velocity-DX_5gTOq.js → velocity-D14EQjuJ.js} +1 -1
  306. package/dist/app/assets/{vennDiagram-DHZGUBPP-Dq1FXdcO.js → vennDiagram-DHZGUBPP-Ct-BJj4e.js} +1 -1
  307. package/dist/app/assets/{verilog-DeAFTKrK.js → verilog-8HBCyzJW.js} +1 -1
  308. package/dist/app/assets/{vhdl-CgPp3m3I.js → vhdl-CABoGFHh.js} +1 -1
  309. package/dist/app/assets/{vim-ZY6C4NgO.js → vim-BqejDUiH.js} +1 -1
  310. package/dist/app/assets/{visual-basic-DmV7laqn.js → visual-basic-BBFqe9IH.js} +1 -1
  311. package/dist/app/assets/{wardley-RL74JXVD-OqiGOeix.js → wardley-RL74JXVD-DF76BHVV.js} +1 -1
  312. package/dist/app/assets/{wardleyDiagram-NUSXRM2D-XXEOUAR6.js → wardleyDiagram-NUSXRM2D-tb9-DpEL.js} +1 -1
  313. package/dist/app/assets/{warpscript-CST9Acbf.js → warpscript-D8JsH2aH.js} +1 -1
  314. package/dist/app/assets/{wasm-D44TvCcf.js → wasm-usuPS3UI.js} +1 -1
  315. package/dist/app/assets/{web-idl-CUAX3ogm.js → web-idl-CtjhIrn5.js} +1 -1
  316. package/dist/app/assets/{wiki-KNEqZQWK.js → wiki-nE7oYJAm.js} +1 -1
  317. package/dist/app/assets/{wolfram-CZdD1bRd.js → wolfram-BpCCg-Fp.js} +1 -1
  318. package/dist/app/assets/{wren-PITvEkQ4.js → wren-Dtkpodh6.js} +1 -1
  319. package/dist/app/assets/{xeora-BM_ABt9y.js → xeora-BpTlDPdY.js} +1 -1
  320. package/dist/app/assets/{xml-doc-249eg8mF.js → xml-doc-CcDifcyn.js} +1 -1
  321. package/dist/app/assets/{xojo-M3SASV_b.js → xojo-O-0SvFwZ.js} +1 -1
  322. package/dist/app/assets/{xquery-BWv2VkcM.js → xquery-UAB2jKQB.js} +1 -1
  323. package/dist/app/assets/{xychartDiagram-5P7HB3ND-CvXT15VO.js → xychartDiagram-5P7HB3ND-d6FXhzUl.js} +1 -1
  324. package/dist/app/assets/{yaml-B70AwQ7Y.js → yaml-eCAjf2lJ.js} +1 -1
  325. package/dist/app/assets/{yang-DffrsIpd.js → yang-BkCZ0omw.js} +1 -1
  326. package/dist/app/assets/{zig-C9vlYfKL.js → zig-DEIPVEHz.js} +1 -1
  327. package/dist/app/index.html +2 -2
  328. package/dist/index.cjs +680 -442
  329. package/dist/index.js +683 -433
  330. package/package.json +1 -1
  331. package/dist/app/assets/channel-Cx11sSAI.js +0 -1
  332. package/dist/app/assets/classDiagram-6PBFFD2Q-BQrwJXsB.js +0 -1
  333. package/dist/app/assets/classDiagram-v2-HSJHXN6E-BQrwJXsB.js +0 -1
  334. package/dist/app/assets/clone-DHPdZQ_6.js +0 -1
  335. package/dist/app/assets/index-D972kqET.css +0 -1
  336. package/dist/app/assets/index-DmMWBDJR.js +0 -747
  337. package/dist/app/assets/stateDiagram-v2-QKLJ7IA2-DkwGLXRp.js +0 -1
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  // src/components/chat.tsx
2
- import * as React22 from "react";
2
+ import * as React23 from "react";
3
3
  import {
4
4
  ArrowDown,
5
5
  FileText as FileText2,
@@ -926,6 +926,11 @@ function getBusyComposerShortcutFollowUpMode(useQueueShortcut) {
926
926
  return useQueueShortcut ? "queue" : "steer";
927
927
  }
928
928
 
929
+ // src/lib/todos.ts
930
+ function countCompletedTodos(items) {
931
+ return items.filter((item) => item.status === "completed").length;
932
+ }
933
+
929
934
  // src/providers/Stream.tsx
930
935
  import { jsx as jsx2 } from "react/jsx-runtime";
931
936
  var StreamContext = createContext2(void 0);
@@ -1090,6 +1095,9 @@ var en_US_default = {
1090
1095
  manualQueueHint: "Ready to send as a new run",
1091
1096
  steerHint: "Injects after the current tool call"
1092
1097
  },
1098
+ todos: {
1099
+ summary: "{{total}} tasks, {{completed}} completed"
1100
+ },
1093
1101
  errors: {
1094
1102
  loadMessages: "Failed to load thread messages",
1095
1103
  createThread: "Failed to create thread",
@@ -1194,6 +1202,9 @@ var zh_CN_default = {
1194
1202
  manualQueueHint: "\u4FDD\u7559\u4E3A\u5F85\u53D1\u9001\uFF0C\u53EF\u624B\u52A8\u5F00\u542F\u65B0\u4E00\u8F6E",
1195
1203
  steerHint: "\u5F53\u524D\u5DE5\u5177\u8C03\u7528\u5B8C\u6210\u540E\u6CE8\u5165"
1196
1204
  },
1205
+ todos: {
1206
+ summary: "\u5171 {{total}} \u4E2A\u4EFB\u52A1\uFF0C\u5DF2\u7ECF\u5B8C\u6210 {{completed}} \u4E2A"
1207
+ },
1197
1208
  errors: {
1198
1209
  loadMessages: "\u52A0\u8F7D\u7EBF\u7A0B\u6D88\u606F\u5931\u8D25",
1199
1210
  createThread: "\u521B\u5EFA\u7EBF\u7A0B\u5931\u8D25",
@@ -2179,6 +2190,7 @@ function PendingFollowUps({
2179
2190
  onSendNow,
2180
2191
  onEdit,
2181
2192
  onRemove,
2193
+ attachToComposer = true,
2182
2194
  className
2183
2195
  }) {
2184
2196
  const { t } = useChatkitTranslation();
@@ -2201,8 +2213,9 @@ function PendingFollowUps({
2201
2213
  "div",
2202
2214
  {
2203
2215
  className: cn(
2204
- "space-y-2 mx-2 p-2 border border-border border-b-0",
2205
- rounded.top,
2216
+ "space-y-2 mx-2 p-2 border border-border",
2217
+ attachToComposer ? "border-b-0" : null,
2218
+ attachToComposer ? rounded.top : rounded.panel,
2206
2219
  className
2207
2220
  ),
2208
2221
  children: /* @__PURE__ */ jsxs7("div", { className: "space-y-1", children: [
@@ -2433,31 +2446,162 @@ function PendingFollowUps({
2433
2446
  );
2434
2447
  }
2435
2448
 
2449
+ // src/components/composer/pending-todos.tsx
2450
+ import * as React11 from "react";
2451
+ import {
2452
+ CheckCircle2,
2453
+ ChevronDown,
2454
+ Circle,
2455
+ CircleDashed,
2456
+ ListTodo
2457
+ } from "lucide-react";
2458
+ import { jsx as jsx13, jsxs as jsxs8 } from "react/jsx-runtime";
2459
+ function useRoundedClasses2() {
2460
+ const { theme } = useTheme();
2461
+ return {
2462
+ top: theme.radius ? {
2463
+ pill: "rounded-t-full",
2464
+ round: "rounded-t-xl",
2465
+ soft: "rounded-t-lg",
2466
+ sharp: "rounded-t-none"
2467
+ }[theme.radius] : "rounded-t-lg",
2468
+ panel: getRoundedClass(theme.radius, "rounded-lg")
2469
+ };
2470
+ }
2471
+ function TodoStatusIcon({ status }) {
2472
+ if (status === "completed") {
2473
+ return /* @__PURE__ */ jsx13(CheckCircle2, { className: "mt-1 h-4 w-4 shrink-0 text-emerald-600" });
2474
+ }
2475
+ if (status === "in_progress") {
2476
+ return /* @__PURE__ */ jsx13(CircleDashed, { className: "mt-1 h-4 w-4 shrink-0 text-foreground/70" });
2477
+ }
2478
+ return /* @__PURE__ */ jsx13(Circle, { className: "mt-1 h-4 w-4 shrink-0 text-muted-foreground" });
2479
+ }
2480
+ function PendingTodos({
2481
+ snapshot,
2482
+ attachToComposer = true,
2483
+ className
2484
+ }) {
2485
+ const { t } = useChatkitTranslation();
2486
+ const rounded = useRoundedClasses2();
2487
+ const listId = React11.useId();
2488
+ const [isCollapsed, setIsCollapsed] = React11.useState(false);
2489
+ React11.useEffect(() => {
2490
+ setIsCollapsed(false);
2491
+ }, [snapshot?.componentId]);
2492
+ if (!snapshot || snapshot.items.length === 0) {
2493
+ return null;
2494
+ }
2495
+ const completedCount = countCompletedTodos(snapshot.items);
2496
+ return /* @__PURE__ */ jsxs8(
2497
+ "div",
2498
+ {
2499
+ "aria-live": "polite",
2500
+ className: cn(
2501
+ "mx-2 border border-border bg-background/95 px-3 py-3 shadow-sm",
2502
+ attachToComposer ? "border-b-0" : null,
2503
+ attachToComposer ? rounded.top : rounded.panel,
2504
+ className
2505
+ ),
2506
+ children: [
2507
+ /* @__PURE__ */ jsxs8(
2508
+ "button",
2509
+ {
2510
+ type: "button",
2511
+ className: "flex w-full items-center justify-between gap-3 text-left",
2512
+ "aria-expanded": !isCollapsed,
2513
+ "aria-controls": listId,
2514
+ onClick: () => setIsCollapsed((prev) => !prev),
2515
+ children: [
2516
+ /* @__PURE__ */ jsxs8("div", { className: "flex min-w-0 items-center gap-2 text-sm font-medium text-foreground", children: [
2517
+ /* @__PURE__ */ jsx13(ListTodo, { className: "h-4 w-4 shrink-0 text-muted-foreground" }),
2518
+ /* @__PURE__ */ jsx13("span", { className: "truncate", children: t("chat.todos.summary", {
2519
+ total: snapshot.items.length,
2520
+ completed: completedCount
2521
+ }) })
2522
+ ] }),
2523
+ /* @__PURE__ */ jsx13("div", { className: "flex items-center shrink-0", children: /* @__PURE__ */ jsx13(
2524
+ ChevronDown,
2525
+ {
2526
+ className: cn(
2527
+ "h-4 w-4 text-muted-foreground transition-transform",
2528
+ isCollapsed ? null : "rotate-180"
2529
+ )
2530
+ }
2531
+ ) })
2532
+ ]
2533
+ }
2534
+ ),
2535
+ !isCollapsed && /* @__PURE__ */ jsx13("ol", { id: listId, className: "mt-3 space-y-2.5", children: snapshot.items.map((item, index) => /* @__PURE__ */ jsxs8(
2536
+ "li",
2537
+ {
2538
+ className: "grid min-w-0 grid-cols-[16px_24px_minmax(0,1fr)] items-start gap-2 overflow-hidden",
2539
+ children: [
2540
+ /* @__PURE__ */ jsx13(TodoStatusIcon, { status: item.status }),
2541
+ /* @__PURE__ */ jsxs8(
2542
+ "span",
2543
+ {
2544
+ className: cn(
2545
+ "text-sm leading-6 text-foreground",
2546
+ item.status === "completed" ? "text-muted-foreground" : null
2547
+ ),
2548
+ children: [
2549
+ index + 1,
2550
+ "."
2551
+ ]
2552
+ }
2553
+ ),
2554
+ /* @__PURE__ */ jsx13(
2555
+ "span",
2556
+ {
2557
+ title: item.content,
2558
+ className: cn(
2559
+ "block min-w-0 truncate text-sm leading-6 text-foreground",
2560
+ item.status === "completed" ? "text-muted-foreground line-through" : item.status === "in_progress" ? "font-medium" : null
2561
+ ),
2562
+ children: item.content
2563
+ }
2564
+ )
2565
+ ]
2566
+ },
2567
+ item.id
2568
+ )) })
2569
+ ]
2570
+ }
2571
+ );
2572
+ }
2573
+
2436
2574
  // src/components/thread/messages/ai.tsx
2437
- import * as React15 from "react";
2438
- import { ChevronDown, CheckCircle2, XCircle, Loader2 as Loader22 } from "lucide-react";
2575
+ import * as React16 from "react";
2576
+ import {
2577
+ ChevronDown as ChevronDown2,
2578
+ CheckCircle2 as CheckCircle22,
2579
+ Clock3,
2580
+ XCircle,
2581
+ Loader2 as Loader22
2582
+ } from "lucide-react";
2439
2583
 
2440
2584
  // src/components/ui/badge.tsx
2441
- import * as React11 from "react";
2442
- import { jsx as jsx13 } from "react/jsx-runtime";
2585
+ import * as React12 from "react";
2586
+ import { jsx as jsx14 } from "react/jsx-runtime";
2443
2587
  var base = "inline-flex items-center rounded-full border border-transparent px-2.5 py-0.5 text-xs font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 ring-offset-background";
2444
2588
  var variants = {
2445
2589
  default: "bg-primary text-primary-foreground",
2446
2590
  secondary: "bg-secondary text-secondary-foreground",
2447
2591
  outline: "border-input text-foreground"
2448
2592
  };
2449
- var Badge = React11.forwardRef(
2593
+ var Badge = React12.forwardRef(
2450
2594
  ({ className, variant = "default", ...props }, ref) => {
2451
- return /* @__PURE__ */ jsx13("span", { ref, className: cn(base, variants[variant], className), ...props });
2595
+ return /* @__PURE__ */ jsx14("span", { ref, className: cn(base, variants[variant], className), ...props });
2452
2596
  }
2453
2597
  );
2454
2598
  Badge.displayName = "Badge";
2455
2599
 
2456
2600
  // src/components/ui/card.tsx
2457
- import * as React12 from "react";
2458
- import { jsx as jsx14 } from "react/jsx-runtime";
2459
- var Card = React12.forwardRef(
2460
- ({ className, ...props }, ref) => /* @__PURE__ */ jsx14(
2601
+ import * as React13 from "react";
2602
+ import { jsx as jsx15 } from "react/jsx-runtime";
2603
+ var Card = React13.forwardRef(
2604
+ ({ className, ...props }, ref) => /* @__PURE__ */ jsx15(
2461
2605
  "div",
2462
2606
  {
2463
2607
  ref,
@@ -2470,45 +2614,45 @@ var Card = React12.forwardRef(
2470
2614
  )
2471
2615
  );
2472
2616
  Card.displayName = "Card";
2473
- var CardHeader = React12.forwardRef(
2474
- ({ className, ...props }, ref) => /* @__PURE__ */ jsx14("div", { ref, className: cn("flex flex-col gap-1.5 px-6 pt-6", className), ...props })
2617
+ var CardHeader = React13.forwardRef(
2618
+ ({ className, ...props }, ref) => /* @__PURE__ */ jsx15("div", { ref, className: cn("flex flex-col gap-1.5 px-6 pt-6", className), ...props })
2475
2619
  );
2476
2620
  CardHeader.displayName = "CardHeader";
2477
- var CardTitle = React12.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx14("h3", { ref, className: cn("text-lg font-semibold leading-tight", className), ...props }));
2621
+ var CardTitle = React13.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx15("h3", { ref, className: cn("text-lg font-semibold leading-tight", className), ...props }));
2478
2622
  CardTitle.displayName = "CardTitle";
2479
- var CardDescription = React12.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx14("p", { ref, className: cn("text-sm text-muted-foreground", className), ...props }));
2623
+ var CardDescription = React13.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx15("p", { ref, className: cn("text-sm text-muted-foreground", className), ...props }));
2480
2624
  CardDescription.displayName = "CardDescription";
2481
- var CardContent = React12.forwardRef(
2482
- ({ className, ...props }, ref) => /* @__PURE__ */ jsx14("div", { ref, className: cn("px-6 pb-6", className), ...props })
2625
+ var CardContent = React13.forwardRef(
2626
+ ({ className, ...props }, ref) => /* @__PURE__ */ jsx15("div", { ref, className: cn("px-6 pb-6", className), ...props })
2483
2627
  );
2484
2628
  CardContent.displayName = "CardContent";
2485
- var CardFooter = React12.forwardRef(
2486
- ({ className, ...props }, ref) => /* @__PURE__ */ jsx14("div", { ref, className: cn("flex items-center px-6 pb-6", className), ...props })
2629
+ var CardFooter = React13.forwardRef(
2630
+ ({ className, ...props }, ref) => /* @__PURE__ */ jsx15("div", { ref, className: cn("flex items-center px-6 pb-6", className), ...props })
2487
2631
  );
2488
2632
  CardFooter.displayName = "CardFooter";
2489
- var CardAction = React12.forwardRef(
2490
- ({ className, ...props }, ref) => /* @__PURE__ */ jsx14("div", { ref, className: cn("ml-auto flex items-center", className), ...props })
2633
+ var CardAction = React13.forwardRef(
2634
+ ({ className, ...props }, ref) => /* @__PURE__ */ jsx15("div", { ref, className: cn("ml-auto flex items-center", className), ...props })
2491
2635
  );
2492
2636
  CardAction.displayName = "CardAction";
2493
2637
 
2494
2638
  // src/components/ui/tabs.tsx
2495
- import * as React13 from "react";
2496
- import { jsx as jsx15 } from "react/jsx-runtime";
2497
- var TabsContext = React13.createContext(null);
2639
+ import * as React14 from "react";
2640
+ import { jsx as jsx16 } from "react/jsx-runtime";
2641
+ var TabsContext = React14.createContext(null);
2498
2642
  function Tabs({ className, defaultValue, value, onValueChange, ...props }) {
2499
- const [internalValue, setInternalValue] = React13.useState(defaultValue ?? "");
2643
+ const [internalValue, setInternalValue] = React14.useState(defaultValue ?? "");
2500
2644
  const activeValue = value ?? internalValue;
2501
- const setValue = React13.useCallback(
2645
+ const setValue = React14.useCallback(
2502
2646
  (nextValue) => {
2503
2647
  if (value === void 0) setInternalValue(nextValue);
2504
2648
  onValueChange?.(nextValue);
2505
2649
  },
2506
2650
  [onValueChange, value]
2507
2651
  );
2508
- return /* @__PURE__ */ jsx15(TabsContext.Provider, { value: { value: activeValue, setValue }, children: /* @__PURE__ */ jsx15("div", { className: cn("w-full", className), ...props }) });
2652
+ return /* @__PURE__ */ jsx16(TabsContext.Provider, { value: { value: activeValue, setValue }, children: /* @__PURE__ */ jsx16("div", { className: cn("w-full", className), ...props }) });
2509
2653
  }
2510
- var TabsList = React13.forwardRef(
2511
- ({ className, ...props }, ref) => /* @__PURE__ */ jsx15(
2654
+ var TabsList = React14.forwardRef(
2655
+ ({ className, ...props }, ref) => /* @__PURE__ */ jsx16(
2512
2656
  "div",
2513
2657
  {
2514
2658
  ref,
@@ -2522,14 +2666,14 @@ var TabsList = React13.forwardRef(
2522
2666
  )
2523
2667
  );
2524
2668
  TabsList.displayName = "TabsList";
2525
- var TabsTrigger = React13.forwardRef(
2669
+ var TabsTrigger = React14.forwardRef(
2526
2670
  ({ className, value, onClick, ...props }, ref) => {
2527
- const context = React13.useContext(TabsContext);
2671
+ const context = React14.useContext(TabsContext);
2528
2672
  if (!context) {
2529
2673
  throw new Error("TabsTrigger must be used within Tabs");
2530
2674
  }
2531
2675
  const isActive = context.value === value;
2532
- return /* @__PURE__ */ jsx15(
2676
+ return /* @__PURE__ */ jsx16(
2533
2677
  "button",
2534
2678
  {
2535
2679
  ref,
@@ -2551,14 +2695,14 @@ var TabsTrigger = React13.forwardRef(
2551
2695
  }
2552
2696
  );
2553
2697
  TabsTrigger.displayName = "TabsTrigger";
2554
- var TabsContent = React13.forwardRef(
2698
+ var TabsContent = React14.forwardRef(
2555
2699
  ({ className, value, ...props }, ref) => {
2556
- const context = React13.useContext(TabsContext);
2700
+ const context = React14.useContext(TabsContext);
2557
2701
  if (!context) {
2558
2702
  throw new Error("TabsContent must be used within Tabs");
2559
2703
  }
2560
2704
  if (context.value !== value) return null;
2561
- return /* @__PURE__ */ jsx15(
2705
+ return /* @__PURE__ */ jsx16(
2562
2706
  "div",
2563
2707
  {
2564
2708
  ref,
@@ -2583,7 +2727,7 @@ import {
2583
2727
  Children,
2584
2728
  isValidElement,
2585
2729
  memo,
2586
- useState as useState7
2730
+ useState as useState8
2587
2731
  } from "react";
2588
2732
  import { CheckIcon as CheckIcon2, CopyIcon as CopyIcon2 } from "lucide-react";
2589
2733
 
@@ -2593,7 +2737,7 @@ import tsx from "react-syntax-highlighter/dist/esm/languages/prism/tsx";
2593
2737
  import python from "react-syntax-highlighter/dist/esm/languages/prism/python";
2594
2738
  import { coldarkDark } from "react-syntax-highlighter/dist/cjs/styles/prism";
2595
2739
  import "react";
2596
- import { jsx as jsx16 } from "react/jsx-runtime";
2740
+ import { jsx as jsx17 } from "react/jsx-runtime";
2597
2741
  SyntaxHighlighterPrism.registerLanguage("js", tsx);
2598
2742
  SyntaxHighlighterPrism.registerLanguage("jsx", tsx);
2599
2743
  SyntaxHighlighterPrism.registerLanguage("ts", tsx);
@@ -2604,7 +2748,7 @@ var SyntaxHighlighter = ({
2604
2748
  language,
2605
2749
  className
2606
2750
  }) => {
2607
- return /* @__PURE__ */ jsx16(
2751
+ return /* @__PURE__ */ jsx17(
2608
2752
  SyntaxHighlighterPrism,
2609
2753
  {
2610
2754
  language,
@@ -2634,14 +2778,14 @@ import {
2634
2778
  TriangleAlert,
2635
2779
  X as X2
2636
2780
  } from "lucide-react";
2637
- import * as React14 from "react";
2781
+ import * as React15 from "react";
2638
2782
 
2639
2783
  // src/components/thread/tooltip-icon-button.tsx
2640
2784
  import { forwardRef as forwardRef5 } from "react";
2641
- import { jsx as jsx17, jsxs as jsxs8 } from "react/jsx-runtime";
2785
+ import { jsx as jsx18, jsxs as jsxs9 } from "react/jsx-runtime";
2642
2786
  var TooltipIconButton = forwardRef5(({ children, tooltip, side = "bottom", className, ...rest }, ref) => {
2643
- return /* @__PURE__ */ jsx17(TooltipProvider, { children: /* @__PURE__ */ jsxs8(Tooltip, { children: [
2644
- /* @__PURE__ */ jsx17(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsxs8(
2787
+ return /* @__PURE__ */ jsx18(TooltipProvider, { children: /* @__PURE__ */ jsxs9(Tooltip, { children: [
2788
+ /* @__PURE__ */ jsx18(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsxs9(
2645
2789
  Button,
2646
2790
  {
2647
2791
  variant: "ghost",
@@ -2651,17 +2795,17 @@ var TooltipIconButton = forwardRef5(({ children, tooltip, side = "bottom", class
2651
2795
  ref,
2652
2796
  children: [
2653
2797
  children,
2654
- /* @__PURE__ */ jsx17("span", { className: "sr-only", children: tooltip })
2798
+ /* @__PURE__ */ jsx18("span", { className: "sr-only", children: tooltip })
2655
2799
  ]
2656
2800
  }
2657
2801
  ) }),
2658
- /* @__PURE__ */ jsx17(TooltipContent, { side, children: tooltip })
2802
+ /* @__PURE__ */ jsx18(TooltipContent, { side, children: tooltip })
2659
2803
  ] }) });
2660
2804
  });
2661
2805
  TooltipIconButton.displayName = "TooltipIconButton";
2662
2806
 
2663
2807
  // src/components/thread/mermaid-block.tsx
2664
- import { Fragment as Fragment2, jsx as jsx18, jsxs as jsxs9 } from "react/jsx-runtime";
2808
+ import { Fragment as Fragment2, jsx as jsx19, jsxs as jsxs10 } from "react/jsx-runtime";
2665
2809
  var HEX_COLOR_PATTERN = /^#([\da-f]{3,8})$/i;
2666
2810
  var MERMAID_DIRECTIVE_PATTERN = /%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi;
2667
2811
  var MERMAID_FRONTMATTER_PATTERN = /^-{3}\s*[\n\r](.*?)[\n\r]-{3}\s*[\n\r]+/s;
@@ -2909,24 +3053,24 @@ function MermaidPreviewDialog({
2909
3053
  svgMarkup,
2910
3054
  title
2911
3055
  }) {
2912
- return /* @__PURE__ */ jsx18(Dialog.Root, { open, onOpenChange, children: /* @__PURE__ */ jsxs9(Dialog.Portal, { children: [
2913
- /* @__PURE__ */ jsx18(Dialog.Overlay, { className: "fixed inset-0 z-50 bg-black/60 backdrop-blur-sm data-[state=closed]:animate-out data-[state=open]:animate-in data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0" }),
2914
- /* @__PURE__ */ jsxs9(Dialog.Content, { className: "fixed inset-[5vh] z-50 flex flex-col overflow-hidden rounded-3xl border border-border bg-background shadow-2xl outline-none data-[state=closed]:animate-out data-[state=open]:animate-in data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95", children: [
2915
- /* @__PURE__ */ jsxs9("div", { className: "flex items-center justify-between gap-4 border-b border-border px-5 py-4", children: [
2916
- /* @__PURE__ */ jsx18(Dialog.Title, { className: "text-base font-semibold text-foreground", children: title }),
2917
- /* @__PURE__ */ jsx18(Dialog.Close, { asChild: true, children: /* @__PURE__ */ jsxs9(
3056
+ return /* @__PURE__ */ jsx19(Dialog.Root, { open, onOpenChange, children: /* @__PURE__ */ jsxs10(Dialog.Portal, { children: [
3057
+ /* @__PURE__ */ jsx19(Dialog.Overlay, { className: "fixed inset-0 z-50 bg-black/60 backdrop-blur-sm data-[state=closed]:animate-out data-[state=open]:animate-in data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0" }),
3058
+ /* @__PURE__ */ jsxs10(Dialog.Content, { className: "fixed inset-[5vh] z-50 flex flex-col overflow-hidden rounded-3xl border border-border bg-background shadow-2xl outline-none data-[state=closed]:animate-out data-[state=open]:animate-in data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95", children: [
3059
+ /* @__PURE__ */ jsxs10("div", { className: "flex items-center justify-between gap-4 border-b border-border px-5 py-4", children: [
3060
+ /* @__PURE__ */ jsx19(Dialog.Title, { className: "text-base font-semibold text-foreground", children: title }),
3061
+ /* @__PURE__ */ jsx19(Dialog.Close, { asChild: true, children: /* @__PURE__ */ jsxs10(
2918
3062
  "button",
2919
3063
  {
2920
3064
  type: "button",
2921
3065
  className: "inline-flex size-10 items-center justify-center rounded-full border border-border bg-card text-muted-foreground transition-colors hover:text-foreground",
2922
3066
  children: [
2923
- /* @__PURE__ */ jsx18(X2, { className: "size-4" }),
2924
- /* @__PURE__ */ jsx18("span", { className: "sr-only", children: closeLabel })
3067
+ /* @__PURE__ */ jsx19(X2, { className: "size-4" }),
3068
+ /* @__PURE__ */ jsx19("span", { className: "sr-only", children: closeLabel })
2925
3069
  ]
2926
3070
  }
2927
3071
  ) })
2928
3072
  ] }),
2929
- /* @__PURE__ */ jsx18("div", { className: "flex-1 overflow-auto bg-card p-6", children: /* @__PURE__ */ jsx18(
3073
+ /* @__PURE__ */ jsx19("div", { className: "flex-1 overflow-auto bg-card p-6", children: /* @__PURE__ */ jsx19(
2930
3074
  "div",
2931
3075
  {
2932
3076
  "data-slot": "mermaid-preview",
@@ -2940,24 +3084,24 @@ function MermaidPreviewDialog({
2940
3084
  function MermaidBlock({ code }) {
2941
3085
  const { t } = useChatkitTranslation();
2942
3086
  const { theme, isDarkMode } = useTheme();
2943
- const containerRef = React14.useRef(null);
2944
- const renderHostRef = React14.useRef(null);
2945
- const renderSequenceRef = React14.useRef(0);
2946
- const copyResetTimeoutRef = React14.useRef(null);
2947
- const diagramId = React14.useId().replace(/:/g, "");
2948
- const [activeTab, setActiveTab] = React14.useState("diagram");
2949
- const [isCopied, setIsCopied] = React14.useState(false);
2950
- const [isPreviewOpen, setIsPreviewOpen] = React14.useState(false);
2951
- const [isRendering, setIsRendering] = React14.useState(true);
2952
- const [renderError, setRenderError] = React14.useState(null);
2953
- const [svgMarkup, setSvgMarkup] = React14.useState(null);
2954
- const normalizedCode = React14.useMemo(() => normalizeMermaidCode(code), [code]);
2955
- const clearCopyResetTimeout = React14.useCallback(() => {
3087
+ const containerRef = React15.useRef(null);
3088
+ const renderHostRef = React15.useRef(null);
3089
+ const renderSequenceRef = React15.useRef(0);
3090
+ const copyResetTimeoutRef = React15.useRef(null);
3091
+ const diagramId = React15.useId().replace(/:/g, "");
3092
+ const [activeTab, setActiveTab] = React15.useState("diagram");
3093
+ const [isCopied, setIsCopied] = React15.useState(false);
3094
+ const [isPreviewOpen, setIsPreviewOpen] = React15.useState(false);
3095
+ const [isRendering, setIsRendering] = React15.useState(true);
3096
+ const [renderError, setRenderError] = React15.useState(null);
3097
+ const [svgMarkup, setSvgMarkup] = React15.useState(null);
3098
+ const normalizedCode = React15.useMemo(() => normalizeMermaidCode(code), [code]);
3099
+ const clearCopyResetTimeout = React15.useCallback(() => {
2956
3100
  if (copyResetTimeoutRef.current === null) return;
2957
3101
  window.clearTimeout(copyResetTimeoutRef.current);
2958
3102
  copyResetTimeoutRef.current = null;
2959
3103
  }, []);
2960
- React14.useEffect(() => {
3104
+ React15.useEffect(() => {
2961
3105
  let isActive = true;
2962
3106
  async function runRender() {
2963
3107
  const container = containerRef.current;
@@ -2995,17 +3139,17 @@ function MermaidBlock({ code }) {
2995
3139
  }
2996
3140
  };
2997
3141
  }, [diagramId, isDarkMode, normalizedCode, theme]);
2998
- React14.useEffect(() => {
3142
+ React15.useEffect(() => {
2999
3143
  clearCopyResetTimeout();
3000
3144
  setIsCopied(false);
3001
3145
  }, [activeTab, clearCopyResetTimeout, code]);
3002
- React14.useEffect(
3146
+ React15.useEffect(
3003
3147
  () => () => {
3004
3148
  clearCopyResetTimeout();
3005
3149
  },
3006
3150
  [clearCopyResetTimeout]
3007
3151
  );
3008
- const handleDownload = React14.useCallback(() => {
3152
+ const handleDownload = React15.useCallback(() => {
3009
3153
  if (!svgMarkup) return;
3010
3154
  const blob = new Blob([svgMarkup], {
3011
3155
  type: "image/svg+xml;charset=utf-8"
@@ -3019,7 +3163,7 @@ function MermaidBlock({ code }) {
3019
3163
  anchor.remove();
3020
3164
  window.URL.revokeObjectURL(url);
3021
3165
  }, [diagramId, svgMarkup]);
3022
- const handleCopyCode = React14.useCallback(() => {
3166
+ const handleCopyCode = React15.useCallback(() => {
3023
3167
  if (!code || isCopied) return;
3024
3168
  navigator.clipboard.writeText(code).then(() => {
3025
3169
  setIsCopied(true);
@@ -3033,21 +3177,21 @@ function MermaidBlock({ code }) {
3033
3177
  }, [clearCopyResetTimeout, code, isCopied]);
3034
3178
  const hasRenderedDiagram = svgMarkup !== null && !renderError;
3035
3179
  const statusMessage = isRendering ? t("markdown.mermaid.rendering") : t("markdown.mermaid.failed");
3036
- return /* @__PURE__ */ jsxs9(Fragment2, { children: [
3037
- /* @__PURE__ */ jsx18(
3180
+ return /* @__PURE__ */ jsxs10(Fragment2, { children: [
3181
+ /* @__PURE__ */ jsx19(
3038
3182
  Tabs,
3039
3183
  {
3040
3184
  className: "w-full",
3041
3185
  onValueChange: (value) => setActiveTab(value),
3042
3186
  value: activeTab,
3043
- children: /* @__PURE__ */ jsxs9(
3187
+ children: /* @__PURE__ */ jsxs10(
3044
3188
  "div",
3045
3189
  {
3046
3190
  ref: containerRef,
3047
3191
  "data-slot": "mermaid-block",
3048
3192
  className: "relative overflow-hidden text-card-foreground",
3049
3193
  children: [
3050
- /* @__PURE__ */ jsx18(
3194
+ /* @__PURE__ */ jsx19(
3051
3195
  "div",
3052
3196
  {
3053
3197
  ref: renderHostRef,
@@ -3056,62 +3200,62 @@ function MermaidBlock({ code }) {
3056
3200
  "data-slot": "mermaid-render-host"
3057
3201
  }
3058
3202
  ),
3059
- /* @__PURE__ */ jsxs9("div", { className: "flex flex-wrap items-center justify-between gap-3 px-4 py-3", children: [
3060
- /* @__PURE__ */ jsxs9("div", { className: "flex min-w-0 items-center gap-3", children: [
3061
- /* @__PURE__ */ jsx18("span", { className: "inline-flex size-9 shrink-0 items-center justify-center rounded-full bg-muted text-foreground", children: /* @__PURE__ */ jsx18(Code2Icon, { className: "size-4" }) }),
3062
- /* @__PURE__ */ jsx18("span", { className: "truncate text-base font-semibold text-foreground", children: t("markdown.mermaid.title") })
3203
+ /* @__PURE__ */ jsxs10("div", { className: "flex flex-wrap items-center justify-between gap-3 px-4 py-3", children: [
3204
+ /* @__PURE__ */ jsxs10("div", { className: "flex min-w-0 items-center gap-3", children: [
3205
+ /* @__PURE__ */ jsx19("span", { className: "inline-flex size-9 shrink-0 items-center justify-center rounded-full bg-muted text-foreground", children: /* @__PURE__ */ jsx19(Code2Icon, { className: "size-4" }) }),
3206
+ /* @__PURE__ */ jsx19("span", { className: "truncate text-base font-semibold text-foreground", children: t("markdown.mermaid.title") })
3063
3207
  ] }),
3064
- /* @__PURE__ */ jsxs9("div", { className: "flex shrink-0 items-center gap-2", children: [
3065
- /* @__PURE__ */ jsxs9("div", { className: "flex items-center gap-1", children: [
3066
- activeTab === "diagram" && hasRenderedDiagram ? /* @__PURE__ */ jsx18(
3208
+ /* @__PURE__ */ jsxs10("div", { className: "flex shrink-0 items-center gap-2", children: [
3209
+ /* @__PURE__ */ jsxs10("div", { className: "flex items-center gap-1", children: [
3210
+ activeTab === "diagram" && hasRenderedDiagram ? /* @__PURE__ */ jsx19(
3067
3211
  TooltipIconButton,
3068
3212
  {
3069
3213
  onClick: handleDownload,
3070
3214
  tooltip: t("markdown.mermaid.download"),
3071
- children: /* @__PURE__ */ jsx18(DownloadIcon, { className: "size-4" })
3215
+ children: /* @__PURE__ */ jsx19(DownloadIcon, { className: "size-4" })
3072
3216
  }
3073
3217
  ) : null,
3074
- activeTab === "diagram" && hasRenderedDiagram ? /* @__PURE__ */ jsx18(
3218
+ activeTab === "diagram" && hasRenderedDiagram ? /* @__PURE__ */ jsx19(
3075
3219
  TooltipIconButton,
3076
3220
  {
3077
3221
  onClick: () => setIsPreviewOpen(true),
3078
3222
  tooltip: t("markdown.mermaid.fullScreen"),
3079
- children: /* @__PURE__ */ jsx18(ExpandIcon, { className: "size-4" })
3223
+ children: /* @__PURE__ */ jsx19(ExpandIcon, { className: "size-4" })
3080
3224
  }
3081
3225
  ) : null,
3082
- activeTab === "code" ? /* @__PURE__ */ jsx18(
3226
+ activeTab === "code" ? /* @__PURE__ */ jsx19(
3083
3227
  TooltipIconButton,
3084
3228
  {
3085
3229
  onClick: handleCopyCode,
3086
3230
  tooltip: t("markdown.copy"),
3087
- children: isCopied ? /* @__PURE__ */ jsx18(CheckIcon, { className: "size-4" }) : /* @__PURE__ */ jsx18(CopyIcon, { className: "size-4" })
3231
+ children: isCopied ? /* @__PURE__ */ jsx19(CheckIcon, { className: "size-4" }) : /* @__PURE__ */ jsx19(CopyIcon, { className: "size-4" })
3088
3232
  }
3089
3233
  ) : null
3090
3234
  ] }),
3091
- /* @__PURE__ */ jsxs9(TabsList, { children: [
3092
- /* @__PURE__ */ jsx18(TabsTrigger, { value: "diagram", children: t("markdown.mermaid.diagram") }),
3093
- /* @__PURE__ */ jsx18(TabsTrigger, { value: "code", children: t("markdown.mermaid.code") })
3235
+ /* @__PURE__ */ jsxs10(TabsList, { children: [
3236
+ /* @__PURE__ */ jsx19(TabsTrigger, { value: "diagram", children: t("markdown.mermaid.diagram") }),
3237
+ /* @__PURE__ */ jsx19(TabsTrigger, { value: "code", children: t("markdown.mermaid.code") })
3094
3238
  ] })
3095
3239
  ] })
3096
3240
  ] }),
3097
- /* @__PURE__ */ jsxs9("div", { className: "border-t border-border pt-4", children: [
3098
- renderError ? /* @__PURE__ */ jsx18("p", { role: "alert", className: "mb-4 text-sm font-medium text-destructive", children: t("markdown.mermaid.failed") }) : null,
3099
- /* @__PURE__ */ jsx18(TabsContent, { value: "diagram", className: "mt-0 space-y-4", children: /* @__PURE__ */ jsx18(
3241
+ /* @__PURE__ */ jsxs10("div", { className: "border-t border-border pt-4", children: [
3242
+ renderError ? /* @__PURE__ */ jsx19("p", { role: "alert", className: "mb-4 text-sm font-medium text-destructive", children: t("markdown.mermaid.failed") }) : null,
3243
+ /* @__PURE__ */ jsx19(TabsContent, { value: "diagram", className: "mt-0 space-y-4", children: /* @__PURE__ */ jsx19(
3100
3244
  "div",
3101
3245
  {
3102
3246
  className: cn(
3103
3247
  "relative overflow-auto rounded-[calc(var(--radius)+0.5rem)] border border-border bg-background p-4",
3104
3248
  hasRenderedDiagram ? "[&_svg]:mx-auto [&_svg]:h-auto [&_svg]:w-full [&_svg]:max-w-none" : "min-h-[14rem]"
3105
3249
  ),
3106
- children: hasRenderedDiagram ? /* @__PURE__ */ jsx18(
3250
+ children: hasRenderedDiagram ? /* @__PURE__ */ jsx19(
3107
3251
  "div",
3108
3252
  {
3109
3253
  "data-slot": "mermaid-diagram",
3110
3254
  dangerouslySetInnerHTML: { __html: svgMarkup }
3111
3255
  }
3112
- ) : /* @__PURE__ */ jsxs9("div", { className: "flex min-h-[12rem] flex-col items-center justify-center gap-3 text-center text-muted-foreground", children: [
3113
- isRendering ? /* @__PURE__ */ jsx18(Loader2, { className: "size-5 animate-spin" }) : /* @__PURE__ */ jsx18(TriangleAlert, { className: "size-5 text-destructive" }),
3114
- /* @__PURE__ */ jsx18(
3256
+ ) : /* @__PURE__ */ jsxs10("div", { className: "flex min-h-[12rem] flex-col items-center justify-center gap-3 text-center text-muted-foreground", children: [
3257
+ isRendering ? /* @__PURE__ */ jsx19(Loader2, { className: "size-5 animate-spin" }) : /* @__PURE__ */ jsx19(TriangleAlert, { className: "size-5 text-destructive" }),
3258
+ /* @__PURE__ */ jsx19(
3115
3259
  "p",
3116
3260
  {
3117
3261
  className: cn("text-sm font-medium", !isRendering && "text-destructive"),
@@ -3122,12 +3266,12 @@ function MermaidBlock({ code }) {
3122
3266
  ] })
3123
3267
  }
3124
3268
  ) }),
3125
- /* @__PURE__ */ jsx18(TabsContent, { value: "code", className: "mt-0", children: /* @__PURE__ */ jsx18(
3269
+ /* @__PURE__ */ jsx19(TabsContent, { value: "code", className: "mt-0", children: /* @__PURE__ */ jsx19(
3126
3270
  "pre",
3127
3271
  {
3128
3272
  "data-slot": "mermaid-code",
3129
3273
  className: "overflow-x-auto rounded-[calc(var(--radius)+0.5rem)] border border-border bg-zinc-950 px-4 py-4 text-sm text-zinc-50",
3130
- children: /* @__PURE__ */ jsx18("code", { className: "block whitespace-pre font-mono", children: code })
3274
+ children: /* @__PURE__ */ jsx19("code", { className: "block whitespace-pre font-mono", children: code })
3131
3275
  }
3132
3276
  ) })
3133
3277
  ] })
@@ -3136,7 +3280,7 @@ function MermaidBlock({ code }) {
3136
3280
  )
3137
3281
  }
3138
3282
  ),
3139
- svgMarkup ? /* @__PURE__ */ jsx18(
3283
+ svgMarkup ? /* @__PURE__ */ jsx19(
3140
3284
  MermaidPreviewDialog,
3141
3285
  {
3142
3286
  closeLabel: t("sheet.close"),
@@ -3151,7 +3295,13 @@ function MermaidBlock({ code }) {
3151
3295
 
3152
3296
  // src/components/thread/markdown-text.tsx
3153
3297
  import "katex/dist/katex.min.css";
3154
- import { Fragment as Fragment3, jsx as jsx19, jsxs as jsxs10 } from "react/jsx-runtime";
3298
+ import { Fragment as Fragment3, jsx as jsx20, jsxs as jsxs11 } from "react/jsx-runtime";
3299
+ var markdownTableMinWidth = "max(7rem, calc(8rem * var(--density-spacing, 1)))";
3300
+ var markdownTableCellPaddingInline = "calc(var(--density-padding, 1rem) * 1.25)";
3301
+ var markdownTableCellPaddingBlock = "max(0.5rem, calc(var(--density-padding, 1rem) * 0.75))";
3302
+ var markdownTableLineHeight = "max(1.375rem, calc(1.5rem * var(--density-spacing, 1)))";
3303
+ var markdownInlineCodePaddingInline = "max(0.25rem, calc(var(--density-gap, 0.5rem) * 0.75))";
3304
+ var markdownInlineCodePaddingBlock = "max(0.125rem, calc(var(--density-gap, 0.5rem) * 0.5))";
3155
3305
  var getTextContent = (children) => Children.toArray(children).map((child) => {
3156
3306
  if (typeof child === "string" || typeof child === "number") {
3157
3307
  return String(child);
@@ -3163,7 +3313,7 @@ var isMermaidCodeElement = (child) => isValidElement(child) && typeof child.prop
3163
3313
  var useCopyToClipboard = ({
3164
3314
  copiedDuration = 3e3
3165
3315
  } = {}) => {
3166
- const [isCopied, setIsCopied] = useState7(false);
3316
+ const [isCopied, setIsCopied] = useState8(false);
3167
3317
  const copyToClipboard = (value) => {
3168
3318
  if (!value) return;
3169
3319
  navigator.clipboard.writeText(value).then(() => {
@@ -3180,23 +3330,23 @@ var CodeHeader = ({ language, code }) => {
3180
3330
  if (!code || isCopied) return;
3181
3331
  copyToClipboard(code);
3182
3332
  };
3183
- return /* @__PURE__ */ jsxs10("div", { className: "flex items-center justify-between gap-4 rounded-t-lg bg-zinc-900 px-4 py-2 text-sm font-semibold text-white", children: [
3184
- /* @__PURE__ */ jsx19("span", { className: "lowercase [&>span]:text-xs", children: language }),
3185
- /* @__PURE__ */ jsxs10(
3333
+ return /* @__PURE__ */ jsxs11("div", { className: "flex items-center justify-between gap-4 rounded-t-lg bg-zinc-900 px-4 py-2 text-sm font-semibold text-white", children: [
3334
+ /* @__PURE__ */ jsx20("span", { className: "lowercase [&>span]:text-xs", children: language }),
3335
+ /* @__PURE__ */ jsxs11(
3186
3336
  TooltipIconButton,
3187
3337
  {
3188
3338
  tooltip: t("markdown.copy"),
3189
3339
  onClick: onCopy,
3190
3340
  children: [
3191
- !isCopied && /* @__PURE__ */ jsx19(CopyIcon2, {}),
3192
- isCopied && /* @__PURE__ */ jsx19(CheckIcon2, {})
3341
+ !isCopied && /* @__PURE__ */ jsx20(CopyIcon2, {}),
3342
+ isCopied && /* @__PURE__ */ jsx20(CheckIcon2, {})
3193
3343
  ]
3194
3344
  }
3195
3345
  )
3196
3346
  ] });
3197
3347
  };
3198
3348
  var defaultComponents = {
3199
- h1: ({ className, node: _node, ...props }) => /* @__PURE__ */ jsx19(
3349
+ h1: ({ className, node: _node, ...props }) => /* @__PURE__ */ jsx20(
3200
3350
  "h1",
3201
3351
  {
3202
3352
  className: cn(
@@ -3206,7 +3356,7 @@ var defaultComponents = {
3206
3356
  ...props
3207
3357
  }
3208
3358
  ),
3209
- h2: ({ className, node: _node, ...props }) => /* @__PURE__ */ jsx19(
3359
+ h2: ({ className, node: _node, ...props }) => /* @__PURE__ */ jsx20(
3210
3360
  "h2",
3211
3361
  {
3212
3362
  className: cn(
@@ -3216,7 +3366,7 @@ var defaultComponents = {
3216
3366
  ...props
3217
3367
  }
3218
3368
  ),
3219
- h3: ({ className, node: _node, ...props }) => /* @__PURE__ */ jsx19(
3369
+ h3: ({ className, node: _node, ...props }) => /* @__PURE__ */ jsx20(
3220
3370
  "h3",
3221
3371
  {
3222
3372
  className: cn(
@@ -3226,7 +3376,7 @@ var defaultComponents = {
3226
3376
  ...props
3227
3377
  }
3228
3378
  ),
3229
- h4: ({ className, node: _node, ...props }) => /* @__PURE__ */ jsx19(
3379
+ h4: ({ className, node: _node, ...props }) => /* @__PURE__ */ jsx20(
3230
3380
  "h4",
3231
3381
  {
3232
3382
  className: cn(
@@ -3236,7 +3386,7 @@ var defaultComponents = {
3236
3386
  ...props
3237
3387
  }
3238
3388
  ),
3239
- h5: ({ className, node: _node, ...props }) => /* @__PURE__ */ jsx19(
3389
+ h5: ({ className, node: _node, ...props }) => /* @__PURE__ */ jsx20(
3240
3390
  "h5",
3241
3391
  {
3242
3392
  className: cn(
@@ -3246,21 +3396,21 @@ var defaultComponents = {
3246
3396
  ...props
3247
3397
  }
3248
3398
  ),
3249
- h6: ({ className, node: _node, ...props }) => /* @__PURE__ */ jsx19(
3399
+ h6: ({ className, node: _node, ...props }) => /* @__PURE__ */ jsx20(
3250
3400
  "h6",
3251
3401
  {
3252
3402
  className: cn("my-4 font-semibold first:mt-0 last:mb-0", className),
3253
3403
  ...props
3254
3404
  }
3255
3405
  ),
3256
- p: ({ className, node: _node, ...props }) => /* @__PURE__ */ jsx19(
3406
+ p: ({ className, node: _node, ...props }) => /* @__PURE__ */ jsx20(
3257
3407
  "p",
3258
3408
  {
3259
3409
  className: cn("mt-5 mb-5 leading-7 first:mt-0 last:mb-0", className),
3260
3410
  ...props
3261
3411
  }
3262
3412
  ),
3263
- a: ({ className, node: _node, ...props }) => /* @__PURE__ */ jsx19(
3413
+ a: ({ className, node: _node, ...props }) => /* @__PURE__ */ jsx20(
3264
3414
  "a",
3265
3415
  {
3266
3416
  className: cn(
@@ -3276,7 +3426,7 @@ var defaultComponents = {
3276
3426
  className,
3277
3427
  node: _node,
3278
3428
  ...props
3279
- }) => /* @__PURE__ */ jsx19(
3429
+ }) => /* @__PURE__ */ jsx20(
3280
3430
  "blockquote",
3281
3431
  {
3282
3432
  className: cn(
@@ -3286,21 +3436,21 @@ var defaultComponents = {
3286
3436
  ...props
3287
3437
  }
3288
3438
  ),
3289
- ul: ({ className, node: _node, ...props }) => /* @__PURE__ */ jsx19(
3439
+ ul: ({ className, node: _node, ...props }) => /* @__PURE__ */ jsx20(
3290
3440
  "ul",
3291
3441
  {
3292
3442
  className: cn("my-5 list-outside list-disc pl-6 [&>li]:mt-2", className),
3293
3443
  ...props
3294
3444
  }
3295
3445
  ),
3296
- ol: ({ className, node: _node, ...props }) => /* @__PURE__ */ jsx19(
3446
+ ol: ({ className, node: _node, ...props }) => /* @__PURE__ */ jsx20(
3297
3447
  "ol",
3298
3448
  {
3299
3449
  className: cn("my-5 list-outside list-decimal pl-8 [&>li]:mt-2", className),
3300
3450
  ...props
3301
3451
  }
3302
3452
  ),
3303
- hr: ({ className, node: _node, ...props }) => /* @__PURE__ */ jsx19(
3453
+ hr: ({ className, node: _node, ...props }) => /* @__PURE__ */ jsx20(
3304
3454
  "hr",
3305
3455
  {
3306
3456
  className: cn("my-5 border-b", className),
@@ -3310,55 +3460,89 @@ var defaultComponents = {
3310
3460
  table: ({
3311
3461
  className,
3312
3462
  node: _node,
3463
+ style,
3313
3464
  ...props
3314
- }) => /* @__PURE__ */ jsx19(
3315
- "table",
3465
+ }) => /* @__PURE__ */ jsx20(
3466
+ "div",
3316
3467
  {
3317
- className: cn(
3318
- "my-5 w-full border-separate border-spacing-0 overflow-y-auto",
3319
- className
3320
- ),
3321
- ...props
3468
+ "data-slot": "markdown-table-container",
3469
+ className: "my-5 max-w-full overflow-x-auto rounded-xl border border-border bg-background",
3470
+ children: /* @__PURE__ */ jsx20(
3471
+ "table",
3472
+ {
3473
+ className: cn(
3474
+ "min-w-full w-max border-separate border-spacing-0 text-sm",
3475
+ className
3476
+ ),
3477
+ style: {
3478
+ lineHeight: markdownTableLineHeight,
3479
+ ...style
3480
+ },
3481
+ ...props
3482
+ }
3483
+ )
3322
3484
  }
3323
3485
  ),
3324
- th: ({ className, node: _node, ...props }) => /* @__PURE__ */ jsx19(
3486
+ th: ({
3487
+ className,
3488
+ node: _node,
3489
+ style,
3490
+ ...props
3491
+ }) => /* @__PURE__ */ jsx20(
3325
3492
  "th",
3326
3493
  {
3327
3494
  className: cn(
3328
- "bg-muted border-border border-y border-l px-4 py-2 text-left font-bold first:rounded-tl-lg last:rounded-tr-lg last:border-r [&[align=center]]:text-center [&[align=right]]:text-right",
3495
+ "bg-muted/80 border-border border-l text-left align-top font-semibold whitespace-normal break-words first:border-l-0 first:rounded-tl-xl last:rounded-tr-xl [&[align=center]]:text-center [&[align=right]]:text-right",
3329
3496
  className
3330
3497
  ),
3498
+ style: {
3499
+ minWidth: markdownTableMinWidth,
3500
+ paddingInline: markdownTableCellPaddingInline,
3501
+ paddingBlock: markdownTableCellPaddingBlock,
3502
+ ...style
3503
+ },
3331
3504
  ...props
3332
3505
  }
3333
3506
  ),
3334
- td: ({ className, node: _node, ...props }) => /* @__PURE__ */ jsx19(
3507
+ td: ({
3508
+ className,
3509
+ node: _node,
3510
+ style,
3511
+ ...props
3512
+ }) => /* @__PURE__ */ jsx20(
3335
3513
  "td",
3336
3514
  {
3337
3515
  className: cn(
3338
- "border-border border-b border-l px-4 py-2 text-left last:border-r [&[align=center]]:text-center [&[align=right]]:text-right",
3516
+ "border-border border-t border-l text-left align-top whitespace-normal break-words first:border-l-0 [&[align=center]]:text-center [&[align=right]]:text-right [&_code]:break-words [&_code]:whitespace-pre-wrap [&_code]:[overflow-wrap:anywhere]",
3339
3517
  className
3340
3518
  ),
3519
+ style: {
3520
+ minWidth: markdownTableMinWidth,
3521
+ paddingInline: markdownTableCellPaddingInline,
3522
+ paddingBlock: markdownTableCellPaddingBlock,
3523
+ ...style
3524
+ },
3341
3525
  ...props
3342
3526
  }
3343
3527
  ),
3344
- tr: ({ className, node: _node, ...props }) => /* @__PURE__ */ jsx19(
3528
+ tr: ({ className, node: _node, ...props }) => /* @__PURE__ */ jsx20(
3345
3529
  "tr",
3346
3530
  {
3347
3531
  className: cn(
3348
- "m-0 p-0 even:bg-muted/50 [&:last-child>td:first-child]:rounded-bl-lg [&:last-child>td:last-child]:rounded-br-lg",
3532
+ "m-0 p-0 even:bg-muted/30 [&:last-child>td:first-child]:rounded-bl-xl [&:last-child>td:last-child]:rounded-br-xl",
3349
3533
  className
3350
3534
  ),
3351
3535
  ...props
3352
3536
  }
3353
3537
  ),
3354
- sup: ({ className, node: _node, ...props }) => /* @__PURE__ */ jsx19(
3538
+ sup: ({ className, node: _node, ...props }) => /* @__PURE__ */ jsx20(
3355
3539
  "sup",
3356
3540
  {
3357
3541
  className: cn("[&>a]:text-xs [&>a]:no-underline", className),
3358
3542
  ...props
3359
3543
  }
3360
3544
  ),
3361
- pre: ({ className, children, node: _node }) => Children.toArray(children).length === 1 && (isMermaidBlockChild(Children.toArray(children)[0]) || isMermaidCodeElement(Children.toArray(children)[0])) ? /* @__PURE__ */ jsx19(Fragment3, { children }) : /* @__PURE__ */ jsx19(
3545
+ pre: ({ className, children, node: _node }) => Children.toArray(children).length === 1 && (isMermaidBlockChild(Children.toArray(children)[0]) || isMermaidCodeElement(Children.toArray(children)[0])) ? /* @__PURE__ */ jsx20(Fragment3, { children }) : /* @__PURE__ */ jsx20(
3362
3546
  "div",
3363
3547
  {
3364
3548
  className: cn(
@@ -3372,6 +3556,7 @@ var defaultComponents = {
3372
3556
  className,
3373
3557
  children,
3374
3558
  node: _node,
3559
+ style,
3375
3560
  ...props
3376
3561
  }) => {
3377
3562
  const match = /language-([\w-]+)/.exec(className || "");
@@ -3381,17 +3566,17 @@ var defaultComponents = {
3381
3566
  const language = match[1];
3382
3567
  const normalizedCode = code.replace(/\n$/, "");
3383
3568
  if (language === "mermaid") {
3384
- return /* @__PURE__ */ jsx19(MermaidBlock, { code: normalizedCode });
3569
+ return /* @__PURE__ */ jsx20(MermaidBlock, { code: normalizedCode });
3385
3570
  }
3386
- return /* @__PURE__ */ jsxs10(Fragment3, { children: [
3387
- /* @__PURE__ */ jsx19(
3571
+ return /* @__PURE__ */ jsxs11(Fragment3, { children: [
3572
+ /* @__PURE__ */ jsx20(
3388
3573
  CodeHeader,
3389
3574
  {
3390
3575
  language,
3391
3576
  code: normalizedCode
3392
3577
  }
3393
3578
  ),
3394
- /* @__PURE__ */ jsx19(
3579
+ /* @__PURE__ */ jsx20(
3395
3580
  SyntaxHighlighter,
3396
3581
  {
3397
3582
  language,
@@ -3402,7 +3587,7 @@ var defaultComponents = {
3402
3587
  ] });
3403
3588
  }
3404
3589
  if (isBlockCode) {
3405
- return /* @__PURE__ */ jsx19(
3590
+ return /* @__PURE__ */ jsx20(
3406
3591
  "code",
3407
3592
  {
3408
3593
  className: cn(
@@ -3414,13 +3599,18 @@ var defaultComponents = {
3414
3599
  }
3415
3600
  );
3416
3601
  }
3417
- return /* @__PURE__ */ jsx19(
3602
+ return /* @__PURE__ */ jsx20(
3418
3603
  "code",
3419
3604
  {
3420
3605
  className: cn(
3421
- "bg-muted rounded px-1.5 py-0.5 font-mono text-[0.9em] font-semibold break-all",
3606
+ "bg-muted rounded font-mono text-[0.9em] font-semibold whitespace-pre-wrap [overflow-wrap:anywhere]",
3422
3607
  className
3423
3608
  ),
3609
+ style: {
3610
+ paddingInline: markdownInlineCodePaddingInline,
3611
+ paddingBlock: markdownInlineCodePaddingBlock,
3612
+ ...style
3613
+ },
3424
3614
  ...props,
3425
3615
  children
3426
3616
  }
@@ -3428,7 +3618,7 @@ var defaultComponents = {
3428
3618
  }
3429
3619
  };
3430
3620
  var MarkdownTextImpl = ({ children }) => {
3431
- return /* @__PURE__ */ jsx19("div", { className: "markdown-content", children: /* @__PURE__ */ jsx19(
3621
+ return /* @__PURE__ */ jsx20("div", { className: "markdown-content", children: /* @__PURE__ */ jsx20(
3432
3622
  ReactMarkdown,
3433
3623
  {
3434
3624
  remarkPlugins: [remarkGfm, remarkMath],
@@ -3442,18 +3632,18 @@ var MarkdownText = memo(MarkdownTextImpl);
3442
3632
 
3443
3633
  // src/components/thread/messages/widget.tsx
3444
3634
  import { SurfaceRenderer } from "@xpert-ai/a2ui-react";
3445
- import { jsx as jsx20 } from "react/jsx-runtime";
3635
+ import { jsx as jsx21 } from "react/jsx-runtime";
3446
3636
  function WidgetMessage({ messageId, data }) {
3447
3637
  const widgets = Array.isArray(data.widgets) ? data.widgets : [];
3448
3638
  if (widgets.length === 0) return null;
3449
3639
  const baseSurfaceId = `widget-${messageId}`;
3450
- return /* @__PURE__ */ jsx20("div", { className: "space-y-3", children: widgets.map((widget, index) => {
3640
+ return /* @__PURE__ */ jsx21("div", { className: "space-y-3", children: widgets.map((widget, index) => {
3451
3641
  const config = widget?.config;
3452
3642
  if (!config || typeof config !== "object") {
3453
3643
  return null;
3454
3644
  }
3455
3645
  const surfaceId = widgets.length > 1 ? `${baseSurfaceId}-${index}` : baseSurfaceId;
3456
- return /* @__PURE__ */ jsx20(
3646
+ return /* @__PURE__ */ jsx21(
3457
3647
  SurfaceRenderer,
3458
3648
  {
3459
3649
  surfaceId,
@@ -3465,7 +3655,7 @@ function WidgetMessage({ messageId, data }) {
3465
3655
  }
3466
3656
 
3467
3657
  // src/components/thread/messages/ai.tsx
3468
- import { jsx as jsx21, jsxs as jsxs11 } from "react/jsx-runtime";
3658
+ import { jsx as jsx22, jsxs as jsxs12 } from "react/jsx-runtime";
3469
3659
  function isTextContent(content) {
3470
3660
  return content.type === "text";
3471
3661
  }
@@ -3481,7 +3671,7 @@ function isComponentContent(content) {
3481
3671
  var statusConfig = {
3482
3672
  success: {
3483
3673
  iconClass: "border-green-500 text-green-700",
3484
- icon: CheckCircle2
3674
+ icon: CheckCircle22
3485
3675
  },
3486
3676
  fail: {
3487
3677
  iconClass: "border-red-500 text-red-700",
@@ -3512,11 +3702,11 @@ function formatDisplayValue(value) {
3512
3702
  function ReasoningBlock({ reasoning }) {
3513
3703
  const blocks = reasoning.filter((item) => item.text?.trim());
3514
3704
  if (blocks.length === 0) return null;
3515
- return /* @__PURE__ */ jsx21("div", { className: "space-y-2", children: blocks.map((item, index) => /* @__PURE__ */ jsx21(
3705
+ return /* @__PURE__ */ jsx22("div", { className: "space-y-2", children: blocks.map((item, index) => /* @__PURE__ */ jsx22(
3516
3706
  "div",
3517
3707
  {
3518
3708
  className: "rounded-lg border bg-muted/40 p-3 text-xs text-muted-foreground",
3519
- children: /* @__PURE__ */ jsx21("p", { className: "whitespace-pre-wrap wrap-break-word leading-relaxed", children: item.text })
3709
+ children: /* @__PURE__ */ jsx22("p", { className: "whitespace-pre-wrap wrap-break-word leading-relaxed", children: item.text })
3520
3710
  },
3521
3711
  item.id ?? `reasoning-${index}`
3522
3712
  )) });
@@ -3524,27 +3714,57 @@ function ReasoningBlock({ reasoning }) {
3524
3714
  function ImageBlock({ content }) {
3525
3715
  const imageUrl = typeof content.image_url === "string" ? content.image_url : typeof content.image_url?.url === "string" ? content.image_url.url : null;
3526
3716
  if (!imageUrl) {
3527
- return /* @__PURE__ */ jsxs11(Card, { children: [
3528
- /* @__PURE__ */ jsx21(CardHeader, { className: "space-y-1", children: /* @__PURE__ */ jsx21(CardTitle, { className: "text-sm", children: "Image" }) }),
3529
- /* @__PURE__ */ jsx21(CardContent, { className: "text-xs text-muted-foreground", children: safeJson(content) })
3717
+ return /* @__PURE__ */ jsxs12(Card, { children: [
3718
+ /* @__PURE__ */ jsx22(CardHeader, { className: "space-y-1", children: /* @__PURE__ */ jsx22(CardTitle, { className: "text-sm", children: "Image" }) }),
3719
+ /* @__PURE__ */ jsx22(CardContent, { className: "text-xs text-muted-foreground", children: safeJson(content) })
3530
3720
  ] });
3531
3721
  }
3532
- return /* @__PURE__ */ jsx21("figure", { className: "overflow-hidden rounded-lg border bg-background", children: /* @__PURE__ */ jsx21("img", { src: imageUrl, alt: "Assistant output", className: "h-auto w-full object-cover" }) });
3722
+ return /* @__PURE__ */ jsx22("figure", { className: "overflow-hidden rounded-lg border bg-background", children: /* @__PURE__ */ jsx22("img", { src: imageUrl, alt: "Assistant output", className: "h-auto w-full object-cover" }) });
3533
3723
  }
3534
3724
  function MemoryBlock({ content }) {
3535
- return /* @__PURE__ */ jsxs11(Card, { children: [
3536
- /* @__PURE__ */ jsxs11(CardHeader, { className: "flex flex-row items-center justify-between gap-2", children: [
3537
- /* @__PURE__ */ jsx21(CardTitle, { className: "text-sm", children: "Memory" }),
3538
- /* @__PURE__ */ jsx21(Badge, { variant: "secondary", children: "Memory" })
3725
+ return /* @__PURE__ */ jsxs12(Card, { children: [
3726
+ /* @__PURE__ */ jsxs12(CardHeader, { className: "flex flex-row items-center justify-between gap-2", children: [
3727
+ /* @__PURE__ */ jsx22(CardTitle, { className: "text-sm", children: "Memory" }),
3728
+ /* @__PURE__ */ jsx22(Badge, { variant: "secondary", children: "Memory" })
3539
3729
  ] }),
3540
- /* @__PURE__ */ jsx21(CardContent, { className: "text-xs text-muted-foreground", children: /* @__PURE__ */ jsx21("pre", { className: "whitespace-pre-wrap wrap-break-word", children: safeJson(content.data ?? []) }) })
3730
+ /* @__PURE__ */ jsx22(CardContent, { className: "text-xs text-muted-foreground", children: /* @__PURE__ */ jsx22("pre", { className: "whitespace-pre-wrap wrap-break-word", children: safeJson(content.data ?? []) }) })
3541
3731
  ] });
3542
3732
  }
3733
+ function parseStepDate(value) {
3734
+ if (value instanceof Date) {
3735
+ const timestamp2 = value.getTime();
3736
+ return Number.isNaN(timestamp2) ? null : timestamp2;
3737
+ }
3738
+ if (typeof value !== "string") {
3739
+ return null;
3740
+ }
3741
+ const timestamp = Date.parse(value);
3742
+ return Number.isNaN(timestamp) ? null : timestamp;
3743
+ }
3744
+ function formatStepDuration(durationMs) {
3745
+ if (durationMs < 1e3) {
3746
+ return `${durationMs}ms`;
3747
+ }
3748
+ if (durationMs < 1e4) {
3749
+ return `${(durationMs / 1e3).toFixed(1)}s`;
3750
+ }
3751
+ if (durationMs < 6e4) {
3752
+ return `${Math.round(durationMs / 1e3)}s`;
3753
+ }
3754
+ const hours = Math.floor(durationMs / 36e5);
3755
+ const minutes = Math.floor(durationMs % 36e5 / 6e4);
3756
+ const seconds = Math.floor(durationMs % 6e4 / 1e3);
3757
+ if (hours > 0) {
3758
+ return `${hours}h ${minutes}m ${seconds}s`;
3759
+ }
3760
+ return `${minutes}m ${seconds}s`;
3761
+ }
3543
3762
  function ComponentBlock({ content }) {
3544
- const [isExpanded, setIsExpanded] = React15.useState(false);
3545
- const contentRef = React15.useRef(null);
3546
- const shouldAutoScrollRef = React15.useRef(true);
3547
- const previousScrollTopRef = React15.useRef(0);
3763
+ const [isExpanded, setIsExpanded] = React16.useState(false);
3764
+ const contentRef = React16.useRef(null);
3765
+ const shouldAutoScrollRef = React16.useRef(true);
3766
+ const previousScrollTopRef = React16.useRef(0);
3767
+ const [durationNow, setDurationNow] = React16.useState(() => Date.now());
3548
3768
  const data = content.data ?? {};
3549
3769
  const category = data.category ?? "Component";
3550
3770
  const title = data.tool && category === "Tool" ? data.tool : data.title ?? data.type ?? "Component";
@@ -3554,10 +3774,26 @@ function ComponentBlock({ content }) {
3554
3774
  const error = data.error ?? null;
3555
3775
  const fallback = message ?? output ?? data.data ?? data;
3556
3776
  const hasOutput = message !== null || output !== null;
3557
- React15.useEffect(() => {
3777
+ const createdAt = parseStepDate(data.created_date);
3778
+ const endedAt = parseStepDate(data.end_date);
3779
+ const durationMs = createdAt === null ? null : Math.max(0, (endedAt ?? durationNow) - createdAt);
3780
+ const durationLabel = durationMs === null ? null : formatStepDuration(durationMs);
3781
+ React16.useEffect(() => {
3558
3782
  if (status === "running" && output !== null) setIsExpanded(true);
3559
3783
  }, [status, output]);
3560
- React15.useEffect(() => {
3784
+ React16.useEffect(() => {
3785
+ if (status !== "running" || createdAt === null || endedAt !== null) {
3786
+ return;
3787
+ }
3788
+ setDurationNow(Date.now());
3789
+ const timer = window.setInterval(() => {
3790
+ setDurationNow(Date.now());
3791
+ }, 100);
3792
+ return () => {
3793
+ window.clearInterval(timer);
3794
+ };
3795
+ }, [createdAt, endedAt, status]);
3796
+ React16.useEffect(() => {
3561
3797
  const element = contentRef.current;
3562
3798
  if (!element) return;
3563
3799
  previousScrollTopRef.current = element.scrollTop;
@@ -3577,7 +3813,7 @@ function ComponentBlock({ content }) {
3577
3813
  element.removeEventListener("scroll", updateAutoScrollState);
3578
3814
  };
3579
3815
  }, [isExpanded]);
3580
- React15.useEffect(() => {
3816
+ React16.useEffect(() => {
3581
3817
  if (status !== "running") {
3582
3818
  shouldAutoScrollRef.current = true;
3583
3819
  return;
@@ -3590,21 +3826,25 @@ function ComponentBlock({ content }) {
3590
3826
  }, [isExpanded, output, status]);
3591
3827
  const config = status ? statusConfig[status] : null;
3592
3828
  const StatusIcon = config?.icon;
3593
- return /* @__PURE__ */ jsxs11(Card, { children: [
3594
- /* @__PURE__ */ jsxs11(CardHeader, { className: "flex flex-row items-center justify-between gap-2 px-2 py-1 cursor-pointer", onClick: () => setIsExpanded(!isExpanded), children: [
3595
- /* @__PURE__ */ jsxs11("div", { className: "flex items-center space-x-1 flex-1 min-w-0", children: [
3596
- status && StatusIcon && /* @__PURE__ */ jsx21(StatusIcon, { className: cn("h-4 w-4", config?.iconClass, status === "running" && "animate-spin") }),
3597
- /* @__PURE__ */ jsx21(CardTitle, { className: "text-sm truncate", children: title })
3829
+ return /* @__PURE__ */ jsxs12(Card, { children: [
3830
+ /* @__PURE__ */ jsxs12(CardHeader, { className: "flex flex-row items-center justify-between gap-2 px-2 py-1 cursor-pointer", onClick: () => setIsExpanded(!isExpanded), children: [
3831
+ /* @__PURE__ */ jsxs12("div", { className: "flex items-center space-x-1 flex-1 min-w-0", children: [
3832
+ status && StatusIcon && /* @__PURE__ */ jsx22(StatusIcon, { className: cn("h-4 w-4", config?.iconClass, status === "running" && "animate-spin") }),
3833
+ /* @__PURE__ */ jsx22(CardTitle, { className: "text-sm truncate", children: title })
3598
3834
  ] }),
3599
- /* @__PURE__ */ jsxs11("div", { className: "flex flex-wrap items-center gap-2 shrink-0", children: [
3600
- /* @__PURE__ */ jsx21(Badge, { variant: "secondary", className: "rounded-lg px-1.5", children: category }),
3601
- /* @__PURE__ */ jsx21(
3835
+ /* @__PURE__ */ jsxs12("div", { className: "flex flex-wrap items-center gap-2 shrink-0", children: [
3836
+ durationLabel && /* @__PURE__ */ jsxs12("div", { className: "inline-flex items-center gap-1 text-[11px] text-muted-foreground tabular-nums", children: [
3837
+ /* @__PURE__ */ jsx22(Clock3, { className: "h-3 w-3" }),
3838
+ /* @__PURE__ */ jsx22("span", { children: durationLabel })
3839
+ ] }),
3840
+ /* @__PURE__ */ jsx22(Badge, { variant: "secondary", className: "rounded-lg px-1.5", children: category }),
3841
+ /* @__PURE__ */ jsx22(
3602
3842
  "button",
3603
3843
  {
3604
3844
  className: "text-muted-foreground hover:text-foreground transition-colors",
3605
3845
  "aria-label": isExpanded ? "Collapse" : "Expand",
3606
- children: /* @__PURE__ */ jsx21(
3607
- ChevronDown,
3846
+ children: /* @__PURE__ */ jsx22(
3847
+ ChevronDown2,
3608
3848
  {
3609
3849
  className: cn("h-4 w-4 transition-transform", isExpanded && "rotate-180")
3610
3850
  }
@@ -3613,55 +3853,55 @@ function ComponentBlock({ content }) {
3613
3853
  )
3614
3854
  ] })
3615
3855
  ] }),
3616
- isExpanded && /* @__PURE__ */ jsxs11(CardContent, { ref: contentRef, className: "text-xs text-muted-foreground max-h-60 overflow-auto", children: [
3617
- data.input && /* @__PURE__ */ jsx21("pre", { className: "whitespace-pre-wrap wrap-break-word", children: formatDisplayValue(data.input) }),
3618
- error ? /* @__PURE__ */ jsx21("pre", { className: "whitespace-pre-wrap wrap-break-word text-destructive", children: formatDisplayValue(error) }) : hasOutput && /* @__PURE__ */ jsx21("pre", { className: "whitespace-pre-wrap wrap-break-word", children: formatDisplayValue(fallback) })
3856
+ isExpanded && /* @__PURE__ */ jsxs12(CardContent, { ref: contentRef, className: "text-xs text-muted-foreground max-h-60 overflow-auto", children: [
3857
+ data.input && /* @__PURE__ */ jsx22("pre", { className: "whitespace-pre-wrap wrap-break-word", children: formatDisplayValue(data.input) }),
3858
+ error ? /* @__PURE__ */ jsx22("pre", { className: "whitespace-pre-wrap wrap-break-word text-destructive", children: formatDisplayValue(error) }) : hasOutput && /* @__PURE__ */ jsx22("pre", { className: "whitespace-pre-wrap wrap-break-word", children: formatDisplayValue(fallback) })
3619
3859
  ] })
3620
3860
  ] });
3621
3861
  }
3622
3862
  function UnknownBlock({ content }) {
3623
- return /* @__PURE__ */ jsxs11(Card, { children: [
3624
- /* @__PURE__ */ jsxs11(CardHeader, { className: "flex flex-row items-center justify-between gap-2", children: [
3625
- /* @__PURE__ */ jsx21(CardTitle, { className: "text-sm", children: "Assistant Content" }),
3626
- /* @__PURE__ */ jsx21(Badge, { variant: "outline", children: content.type ?? "unknown" })
3863
+ return /* @__PURE__ */ jsxs12(Card, { children: [
3864
+ /* @__PURE__ */ jsxs12(CardHeader, { className: "flex flex-row items-center justify-between gap-2", children: [
3865
+ /* @__PURE__ */ jsx22(CardTitle, { className: "text-sm", children: "Assistant Content" }),
3866
+ /* @__PURE__ */ jsx22(Badge, { variant: "outline", children: content.type ?? "unknown" })
3627
3867
  ] }),
3628
- /* @__PURE__ */ jsx21(CardContent, { className: "text-xs text-muted-foreground", children: /* @__PURE__ */ jsx21("pre", { className: "whitespace-pre-wrap break-words", children: safeJson(content) }) })
3868
+ /* @__PURE__ */ jsx22(CardContent, { className: "text-xs text-muted-foreground", children: /* @__PURE__ */ jsx22("pre", { className: "whitespace-pre-wrap break-words", children: safeJson(content) }) })
3629
3869
  ] });
3630
3870
  }
3631
3871
  function renderContentItem(content, index, messageId) {
3632
3872
  if (typeof content === "string") {
3633
- return /* @__PURE__ */ jsxs11("div", { children: [
3634
- /* @__PURE__ */ jsx21(MarkdownText, { children: content }),
3873
+ return /* @__PURE__ */ jsxs12("div", { children: [
3874
+ /* @__PURE__ */ jsx22(MarkdownText, { children: content }),
3635
3875
  ";"
3636
3876
  ] }, `text-${index}`);
3637
3877
  }
3638
3878
  if (isTextContent(content)) {
3639
- return /* @__PURE__ */ jsx21("div", { children: /* @__PURE__ */ jsx21(MarkdownText, { children: content.text }) }, content.id ?? `text-${index}`);
3879
+ return /* @__PURE__ */ jsx22("div", { children: /* @__PURE__ */ jsx22(MarkdownText, { children: content.text }) }, content.id ?? `text-${index}`);
3640
3880
  }
3641
3881
  if (isReasoningContent(content)) {
3642
- return /* @__PURE__ */ jsx21("div", { children: /* @__PURE__ */ jsx21(ReasoningBlock, { reasoning: [content] }) }, content.id ?? `reasoning-${index}`);
3882
+ return /* @__PURE__ */ jsx22("div", { children: /* @__PURE__ */ jsx22(ReasoningBlock, { reasoning: [content] }) }, content.id ?? `reasoning-${index}`);
3643
3883
  }
3644
3884
  if (isImageContent(content)) {
3645
- return /* @__PURE__ */ jsx21("div", { children: /* @__PURE__ */ jsx21(ImageBlock, { content }) }, content.id ?? `image-${index}`);
3885
+ return /* @__PURE__ */ jsx22("div", { children: /* @__PURE__ */ jsx22(ImageBlock, { content }) }, content.id ?? `image-${index}`);
3646
3886
  }
3647
3887
  if (isComponentContent(content)) {
3648
3888
  if (isWidgetComponent(content)) {
3649
- return /* @__PURE__ */ jsx21("div", { children: /* @__PURE__ */ jsx21(WidgetMessage, { messageId, data: content.data }) }, content.id ?? `widget-${index}`);
3889
+ return /* @__PURE__ */ jsx22("div", { children: /* @__PURE__ */ jsx22(WidgetMessage, { messageId, data: content.data }) }, content.id ?? `widget-${index}`);
3650
3890
  }
3651
- return /* @__PURE__ */ jsx21("div", { children: /* @__PURE__ */ jsx21(ComponentBlock, { content }) }, content.id ?? `component-${index}`);
3891
+ return /* @__PURE__ */ jsx22("div", { children: /* @__PURE__ */ jsx22(ComponentBlock, { content }) }, content.id ?? `component-${index}`);
3652
3892
  }
3653
3893
  if (isMemoryContent(content)) {
3654
- return /* @__PURE__ */ jsx21("div", { children: /* @__PURE__ */ jsx21(MemoryBlock, { content }) }, content.id ?? `memory-${index}`);
3894
+ return /* @__PURE__ */ jsx22("div", { children: /* @__PURE__ */ jsx22(MemoryBlock, { content }) }, content.id ?? `memory-${index}`);
3655
3895
  }
3656
- return /* @__PURE__ */ jsx21("div", { children: /* @__PURE__ */ jsx21(UnknownBlock, { content }) }, content.id ?? `unknown-${index}`);
3896
+ return /* @__PURE__ */ jsx22("div", { children: /* @__PURE__ */ jsx22(UnknownBlock, { content }) }, content.id ?? `unknown-${index}`);
3657
3897
  }
3658
3898
  function renderContent(content, messageId) {
3659
3899
  if (typeof content === "string") {
3660
3900
  if (!content.trim()) return null;
3661
- return /* @__PURE__ */ jsx21(MarkdownText, { children: content });
3901
+ return /* @__PURE__ */ jsx22(MarkdownText, { children: content });
3662
3902
  }
3663
3903
  if (!Array.isArray(content) || content.length === 0) return null;
3664
- return /* @__PURE__ */ jsx21("div", { className: "space-y-3", children: content.map((item, index) => renderContentItem(item, index, messageId)) });
3904
+ return /* @__PURE__ */ jsx22("div", { className: "space-y-3", children: content.map((item, index) => renderContentItem(item, index, messageId)) });
3665
3905
  }
3666
3906
  function AssistantStreamingIndicator({
3667
3907
  status,
@@ -3673,19 +3913,19 @@ function AssistantStreamingIndicator({
3673
3913
  thinking: t("message.thinking"),
3674
3914
  answering: t("message.answering")
3675
3915
  };
3676
- return /* @__PURE__ */ jsxs11("div", { className: cn("flex items-center gap-2 text-xs text-muted-foreground", className), children: [
3677
- status === "loading" && /* @__PURE__ */ jsx21(Loader22, { className: "h-3.5 w-3.5 animate-spin" }),
3678
- status === "thinking" && /* @__PURE__ */ jsxs11("div", { className: "flex items-end gap-1", "aria-hidden": "true", children: [
3679
- /* @__PURE__ */ jsx21("span", { className: "h-1.5 w-1.5 rounded-full bg-current animate-bounce [animation-delay:-0.3s]" }),
3680
- /* @__PURE__ */ jsx21("span", { className: "h-1.5 w-1.5 rounded-full bg-current animate-bounce [animation-delay:-0.15s]" }),
3681
- /* @__PURE__ */ jsx21("span", { className: "h-1.5 w-1.5 rounded-full bg-current animate-bounce" })
3916
+ return /* @__PURE__ */ jsxs12("div", { className: cn("flex items-center gap-2 text-xs text-muted-foreground", className), children: [
3917
+ status === "loading" && /* @__PURE__ */ jsx22(Loader22, { className: "h-3.5 w-3.5 animate-spin" }),
3918
+ status === "thinking" && /* @__PURE__ */ jsxs12("div", { className: "flex items-end gap-1", "aria-hidden": "true", children: [
3919
+ /* @__PURE__ */ jsx22("span", { className: "h-1.5 w-1.5 rounded-full bg-current animate-bounce [animation-delay:-0.3s]" }),
3920
+ /* @__PURE__ */ jsx22("span", { className: "h-1.5 w-1.5 rounded-full bg-current animate-bounce [animation-delay:-0.15s]" }),
3921
+ /* @__PURE__ */ jsx22("span", { className: "h-1.5 w-1.5 rounded-full bg-current animate-bounce" })
3682
3922
  ] }),
3683
- status === "answering" && /* @__PURE__ */ jsxs11("div", { className: "flex items-end gap-1", "aria-hidden": "true", children: [
3684
- /* @__PURE__ */ jsx21("span", { className: "h-2 w-0.5 rounded-full bg-current animate-pulse [animation-delay:-0.25s]" }),
3685
- /* @__PURE__ */ jsx21("span", { className: "h-3 w-0.5 rounded-full bg-current animate-pulse [animation-delay:-0.1s]" }),
3686
- /* @__PURE__ */ jsx21("span", { className: "h-2.5 w-0.5 rounded-full bg-current animate-pulse" })
3923
+ status === "answering" && /* @__PURE__ */ jsxs12("div", { className: "flex items-end gap-1", "aria-hidden": "true", children: [
3924
+ /* @__PURE__ */ jsx22("span", { className: "h-2 w-0.5 rounded-full bg-current animate-pulse [animation-delay:-0.25s]" }),
3925
+ /* @__PURE__ */ jsx22("span", { className: "h-3 w-0.5 rounded-full bg-current animate-pulse [animation-delay:-0.1s]" }),
3926
+ /* @__PURE__ */ jsx22("span", { className: "h-2.5 w-0.5 rounded-full bg-current animate-pulse" })
3687
3927
  ] }),
3688
- /* @__PURE__ */ jsx21("span", { children: labelMap[status] })
3928
+ /* @__PURE__ */ jsx22("span", { children: labelMap[status] })
3689
3929
  ] });
3690
3930
  }
3691
3931
  function AssistantMessage({
@@ -3699,42 +3939,42 @@ function AssistantMessage({
3699
3939
  const hasReasoning = hasRenderableReasoning(message.reasoning);
3700
3940
  const resolvedStreamingStatus = streamingStatus ?? getAssistantStreamingStatus(message, isStreaming);
3701
3941
  const answerNode = renderContent(message.content, message.id);
3702
- const reasoningNode = hasReasoning ? /* @__PURE__ */ jsx21(ReasoningBlock, { reasoning: message.reasoning ?? [] }) : null;
3942
+ const reasoningNode = hasReasoning ? /* @__PURE__ */ jsx22(ReasoningBlock, { reasoning: message.reasoning ?? [] }) : null;
3703
3943
  if (!hasRenderableAssistantMessage(message) && !resolvedStreamingStatus) return null;
3704
3944
  const streamingClass = isStreaming ? "streaming-active" : "";
3705
3945
  if (!hasRenderableAssistantMessage(message) && resolvedStreamingStatus) {
3706
- return /* @__PURE__ */ jsx21("div", { className: cn("space-y-3", streamingClass, className), children: /* @__PURE__ */ jsx21(AssistantStreamingIndicator, { status: resolvedStreamingStatus }) });
3946
+ return /* @__PURE__ */ jsx22("div", { className: cn("space-y-3", streamingClass, className), children: /* @__PURE__ */ jsx22(AssistantStreamingIndicator, { status: resolvedStreamingStatus }) });
3707
3947
  }
3708
3948
  if (hasContent && hasReasoning) {
3709
- return /* @__PURE__ */ jsxs11("div", { className: cn("space-y-3", streamingClass, className), children: [
3710
- /* @__PURE__ */ jsxs11(
3949
+ return /* @__PURE__ */ jsxs12("div", { className: cn("space-y-3", streamingClass, className), children: [
3950
+ /* @__PURE__ */ jsxs12(
3711
3951
  Tabs,
3712
3952
  {
3713
3953
  defaultValue: message.status === "reasoning" ? "reasoning" : "answer",
3714
3954
  className: "w-full",
3715
3955
  children: [
3716
- /* @__PURE__ */ jsxs11(TabsList, { className: "", children: [
3717
- /* @__PURE__ */ jsx21(TabsTrigger, { value: "answer", children: t("message.answer") }),
3718
- /* @__PURE__ */ jsx21(TabsTrigger, { value: "reasoning", children: t("message.reasoning") })
3956
+ /* @__PURE__ */ jsxs12(TabsList, { className: "", children: [
3957
+ /* @__PURE__ */ jsx22(TabsTrigger, { value: "answer", children: t("message.answer") }),
3958
+ /* @__PURE__ */ jsx22(TabsTrigger, { value: "reasoning", children: t("message.reasoning") })
3719
3959
  ] }),
3720
- /* @__PURE__ */ jsx21(TabsContent, { value: "answer", className: "space-y-3", children: answerNode }),
3721
- /* @__PURE__ */ jsx21(TabsContent, { value: "reasoning", className: "space-y-3", children: reasoningNode })
3960
+ /* @__PURE__ */ jsx22(TabsContent, { value: "answer", className: "space-y-3", children: answerNode }),
3961
+ /* @__PURE__ */ jsx22(TabsContent, { value: "reasoning", className: "space-y-3", children: reasoningNode })
3722
3962
  ]
3723
3963
  }
3724
3964
  ),
3725
- resolvedStreamingStatus ? /* @__PURE__ */ jsx21(AssistantStreamingIndicator, { status: resolvedStreamingStatus }) : null
3965
+ resolvedStreamingStatus ? /* @__PURE__ */ jsx22(AssistantStreamingIndicator, { status: resolvedStreamingStatus }) : null
3726
3966
  ] });
3727
3967
  }
3728
- return /* @__PURE__ */ jsxs11("div", { className: cn("space-y-3", streamingClass, className), children: [
3968
+ return /* @__PURE__ */ jsxs12("div", { className: cn("space-y-3", streamingClass, className), children: [
3729
3969
  hasReasoning ? reasoningNode : answerNode,
3730
- resolvedStreamingStatus ? /* @__PURE__ */ jsx21(AssistantStreamingIndicator, { status: resolvedStreamingStatus }) : null
3970
+ resolvedStreamingStatus ? /* @__PURE__ */ jsx22(AssistantStreamingIndicator, { status: resolvedStreamingStatus }) : null
3731
3971
  ] });
3732
3972
  }
3733
3973
 
3734
3974
  // src/components/thread/MessageActions.tsx
3735
- import * as React16 from "react";
3975
+ import * as React17 from "react";
3736
3976
  import { Check, Copy, RefreshCw } from "lucide-react";
3737
- import { jsx as jsx22, jsxs as jsxs12 } from "react/jsx-runtime";
3977
+ import { jsx as jsx23, jsxs as jsxs13 } from "react/jsx-runtime";
3738
3978
  function MessageActions({
3739
3979
  content,
3740
3980
  isAssistant = false,
@@ -3743,7 +3983,7 @@ function MessageActions({
3743
3983
  className
3744
3984
  }) {
3745
3985
  const { t } = useChatkitTranslation();
3746
- const [copied, setCopied] = React16.useState(false);
3986
+ const [copied, setCopied] = React17.useState(false);
3747
3987
  const handleCopy = async () => {
3748
3988
  try {
3749
3989
  await navigator.clipboard.writeText(content);
@@ -3756,7 +3996,7 @@ function MessageActions({
3756
3996
  if (isStreaming) {
3757
3997
  return null;
3758
3998
  }
3759
- return /* @__PURE__ */ jsxs12(
3999
+ return /* @__PURE__ */ jsxs13(
3760
4000
  "div",
3761
4001
  {
3762
4002
  className: cn(
@@ -3764,7 +4004,7 @@ function MessageActions({
3764
4004
  className
3765
4005
  ),
3766
4006
  children: [
3767
- /* @__PURE__ */ jsx22(
4007
+ /* @__PURE__ */ jsx23(
3768
4008
  "button",
3769
4009
  {
3770
4010
  type: "button",
@@ -3774,17 +4014,17 @@ function MessageActions({
3774
4014
  copied && "text-green-500"
3775
4015
  ),
3776
4016
  title: copied ? t("messageActions.copied") : t("messageActions.copy"),
3777
- children: copied ? /* @__PURE__ */ jsx22(Check, { size: 14 }) : /* @__PURE__ */ jsx22(Copy, { size: 14 })
4017
+ children: copied ? /* @__PURE__ */ jsx23(Check, { size: 14 }) : /* @__PURE__ */ jsx23(Copy, { size: 14 })
3778
4018
  }
3779
4019
  ),
3780
- isAssistant && onRetry && /* @__PURE__ */ jsx22(
4020
+ isAssistant && onRetry && /* @__PURE__ */ jsx23(
3781
4021
  "button",
3782
4022
  {
3783
4023
  type: "button",
3784
4024
  onClick: onRetry,
3785
4025
  className: "p-1.5 rounded-md text-muted-foreground hover:text-foreground hover:bg-muted transition-colors",
3786
4026
  title: t("messageActions.regenerate"),
3787
- children: /* @__PURE__ */ jsx22(RefreshCw, { size: 14 })
4027
+ children: /* @__PURE__ */ jsx23(RefreshCw, { size: 14 })
3788
4028
  }
3789
4029
  )
3790
4030
  ]
@@ -3805,18 +4045,18 @@ import {
3805
4045
  Sparkles as Sparkles2,
3806
4046
  Zap
3807
4047
  } from "lucide-react";
3808
- import { jsx as jsx23, jsxs as jsxs13 } from "react/jsx-runtime";
4048
+ import { jsx as jsx24, jsxs as jsxs14 } from "react/jsx-runtime";
3809
4049
  function getIconComponent2(icon) {
3810
4050
  const iconMap = {
3811
- "circle-question": /* @__PURE__ */ jsx23(HelpCircle, { size: 20 }),
3812
- "lightbulb": /* @__PURE__ */ jsx23(Lightbulb2, { size: 20 }),
3813
- "sparkle": /* @__PURE__ */ jsx23(Sparkles2, { size: 20 }),
3814
- "write": /* @__PURE__ */ jsx23(Pencil2, { size: 20 }),
3815
- "search": /* @__PURE__ */ jsx23(Search2, { size: 20 }),
3816
- "globe": /* @__PURE__ */ jsx23(Globe2, { size: 20 }),
3817
- "book-open": /* @__PURE__ */ jsx23(BookOpen, { size: 20 }),
3818
- "compass": /* @__PURE__ */ jsx23(Compass, { size: 20 }),
3819
- "bolt": /* @__PURE__ */ jsx23(Zap, { size: 20 })
4051
+ "circle-question": /* @__PURE__ */ jsx24(HelpCircle, { size: 20 }),
4052
+ "lightbulb": /* @__PURE__ */ jsx24(Lightbulb2, { size: 20 }),
4053
+ "sparkle": /* @__PURE__ */ jsx24(Sparkles2, { size: 20 }),
4054
+ "write": /* @__PURE__ */ jsx24(Pencil2, { size: 20 }),
4055
+ "search": /* @__PURE__ */ jsx24(Search2, { size: 20 }),
4056
+ "globe": /* @__PURE__ */ jsx24(Globe2, { size: 20 }),
4057
+ "book-open": /* @__PURE__ */ jsx24(BookOpen, { size: 20 }),
4058
+ "compass": /* @__PURE__ */ jsx24(Compass, { size: 20 }),
4059
+ "bolt": /* @__PURE__ */ jsx24(Zap, { size: 20 })
3820
4060
  };
3821
4061
  return icon ? iconMap[icon] || iconMap["sparkle"] : iconMap["sparkle"];
3822
4062
  }
@@ -3824,9 +4064,9 @@ function StartScreen({ startScreen, onPromptClick, className }) {
3824
4064
  const { t } = useChatkitTranslation();
3825
4065
  const greeting = startScreen?.greeting ?? t("startScreen.greeting");
3826
4066
  const prompts = startScreen?.prompts ?? [];
3827
- return /* @__PURE__ */ jsxs13("div", { className: cn("flex flex-col items-center justify-center py-12 px-4", className), children: [
3828
- /* @__PURE__ */ jsx23("div", { className: "mb-8 text-center", children: /* @__PURE__ */ jsx23("h2", { className: "text-2xl font-semibold text-foreground mb-2", children: greeting }) }),
3829
- prompts.length > 0 && /* @__PURE__ */ jsx23("div", { className: "w-full max-w-2xl", children: /* @__PURE__ */ jsx23("div", { className: "grid grid-cols-1 sm:grid-cols-2 gap-3", children: prompts.map((item, index) => /* @__PURE__ */ jsxs13(
4067
+ return /* @__PURE__ */ jsxs14("div", { className: cn("flex flex-col items-center justify-center py-12 px-4", className), children: [
4068
+ /* @__PURE__ */ jsx24("div", { className: "mb-8 text-center", children: /* @__PURE__ */ jsx24("h2", { className: "text-2xl font-semibold text-foreground mb-2", children: greeting }) }),
4069
+ prompts.length > 0 && /* @__PURE__ */ jsx24("div", { className: "w-full max-w-2xl", children: /* @__PURE__ */ jsx24("div", { className: "grid grid-cols-1 sm:grid-cols-2 gap-3", children: prompts.map((item, index) => /* @__PURE__ */ jsxs14(
3830
4070
  "button",
3831
4071
  {
3832
4072
  type: "button",
@@ -3837,8 +4077,8 @@ function StartScreen({ startScreen, onPromptClick, className }) {
3837
4077
  "focus:outline-none focus:ring-2 focus:ring-primary/20"
3838
4078
  ),
3839
4079
  children: [
3840
- /* @__PURE__ */ jsx23("span", { className: "flex h-10 w-10 shrink-0 items-center justify-center rounded-lg bg-primary/10 text-primary", children: getIconComponent2(item.icon) }),
3841
- /* @__PURE__ */ jsx23("span", { className: "text-sm font-medium text-foreground", children: item.label })
4080
+ /* @__PURE__ */ jsx24("span", { className: "flex h-10 w-10 shrink-0 items-center justify-center rounded-lg bg-primary/10 text-primary", children: getIconComponent2(item.icon) }),
4081
+ /* @__PURE__ */ jsx24("span", { className: "text-sm font-medium text-foreground", children: item.label })
3842
4082
  ]
3843
4083
  },
3844
4084
  `prompt-${index}`
@@ -3850,10 +4090,10 @@ function StartScreen({ startScreen, onPromptClick, className }) {
3850
4090
  import "react";
3851
4091
 
3852
4092
  // src/components/ui/avatar.tsx
3853
- import * as React18 from "react";
4093
+ import * as React19 from "react";
3854
4094
  import * as AvatarPrimitive from "@radix-ui/react-avatar";
3855
- import { jsx as jsx24 } from "react/jsx-runtime";
3856
- var Avatar = React18.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx24(
4095
+ import { jsx as jsx25 } from "react/jsx-runtime";
4096
+ var Avatar = React19.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx25(
3857
4097
  AvatarPrimitive.Root,
3858
4098
  {
3859
4099
  ref,
@@ -3865,7 +4105,7 @@ var Avatar = React18.forwardRef(({ className, ...props }, ref) => /* @__PURE__ *
3865
4105
  }
3866
4106
  ));
3867
4107
  Avatar.displayName = AvatarPrimitive.Root.displayName;
3868
- var AvatarImage = React18.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx24(
4108
+ var AvatarImage = React19.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx25(
3869
4109
  AvatarPrimitive.Image,
3870
4110
  {
3871
4111
  ref,
@@ -3874,7 +4114,7 @@ var AvatarImage = React18.forwardRef(({ className, ...props }, ref) => /* @__PUR
3874
4114
  }
3875
4115
  ));
3876
4116
  AvatarImage.displayName = AvatarPrimitive.Image.displayName;
3877
- var AvatarFallback = React18.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx24(
4117
+ var AvatarFallback = React19.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx25(
3878
4118
  AvatarPrimitive.Fallback,
3879
4119
  {
3880
4120
  ref,
@@ -3888,7 +4128,7 @@ var AvatarFallback = React18.forwardRef(({ className, ...props }, ref) => /* @__
3888
4128
  AvatarFallback.displayName = AvatarPrimitive.Fallback.displayName;
3889
4129
 
3890
4130
  // src/components/ui/chatkit-avatar.tsx
3891
- import { jsx as jsx25, jsxs as jsxs14 } from "react/jsx-runtime";
4131
+ import { jsx as jsx26, jsxs as jsxs15 } from "react/jsx-runtime";
3892
4132
  function asRecord(value) {
3893
4133
  return value && typeof value === "object" ? value : null;
3894
4134
  }
@@ -3961,21 +4201,21 @@ function ChatkitAvatar({
3961
4201
  const fallbackStyle = {
3962
4202
  ...avatar?.background ? { background: avatar.background } : {}
3963
4203
  };
3964
- return /* @__PURE__ */ jsxs14(Avatar, { className: cn(roundedClass, className), style, ...props, children: [
3965
- avatar?.url ? /* @__PURE__ */ jsx25(AvatarImage, { className: imageClassName, src: avatar.url, alt: label }) : null,
3966
- /* @__PURE__ */ jsx25(
4204
+ return /* @__PURE__ */ jsxs15(Avatar, { className: cn(roundedClass, className), style, ...props, children: [
4205
+ avatar?.url ? /* @__PURE__ */ jsx26(AvatarImage, { className: imageClassName, src: avatar.url, alt: label }) : null,
4206
+ /* @__PURE__ */ jsx26(
3967
4207
  AvatarFallback,
3968
4208
  {
3969
4209
  className: cn(roundedClass, "text-sm font-medium text-foreground", fallbackClassName),
3970
4210
  style: fallbackStyle,
3971
- children: emojiCharacter ? /* @__PURE__ */ jsx25("span", { className: "text-[1.1em] leading-none", style: emojiStyle, children: emojiCharacter }) : fallbackText
4211
+ children: emojiCharacter ? /* @__PURE__ */ jsx26("span", { className: "text-[1.1em] leading-none", style: emojiStyle, children: emojiCharacter }) : fallbackText
3972
4212
  }
3973
4213
  )
3974
4214
  ] });
3975
4215
  }
3976
4216
 
3977
4217
  // src/hooks/useThreads.ts
3978
- import * as React20 from "react";
4218
+ import * as React21 from "react";
3979
4219
  var DEFAULT_LIMIT = 50;
3980
4220
  var getThreadTitle = (threadRecord) => {
3981
4221
  const title = threadRecord.title?.trim();
@@ -4013,16 +4253,16 @@ function useThreads(limit = DEFAULT_LIMIT) {
4013
4253
  isReady,
4014
4254
  isLoading: isStreamLoading
4015
4255
  } = useStreamContext();
4016
- const [threadRecords, setThreadRecords] = React20.useState([]);
4017
- const [isLoading, setIsLoading] = React20.useState(false);
4018
- const [error, setError] = React20.useState(null);
4019
- const upsertThreadRecord = React20.useCallback((threadRecord) => {
4256
+ const [threadRecords, setThreadRecords] = React21.useState([]);
4257
+ const [isLoading, setIsLoading] = React21.useState(false);
4258
+ const [error, setError] = React21.useState(null);
4259
+ const upsertThreadRecord = React21.useCallback((threadRecord) => {
4020
4260
  setThreadRecords((prev) => {
4021
4261
  const next = prev.filter((item) => item.id !== threadRecord.id);
4022
4262
  return sortThreadRecords([threadRecord, ...next]);
4023
4263
  });
4024
4264
  }, []);
4025
- const refreshThreads = React20.useCallback(async () => {
4265
+ const refreshThreads = React21.useCallback(async () => {
4026
4266
  setIsLoading(true);
4027
4267
  setError(null);
4028
4268
  try {
@@ -4038,7 +4278,7 @@ function useThreads(limit = DEFAULT_LIMIT) {
4038
4278
  setIsLoading(false);
4039
4279
  }
4040
4280
  }, [client, limit, assistantId]);
4041
- const createThread = React20.useCallback(
4281
+ const createThread = React21.useCallback(
4042
4282
  async (input) => {
4043
4283
  setError(null);
4044
4284
  const payload = {};
@@ -4052,7 +4292,7 @@ function useThreads(limit = DEFAULT_LIMIT) {
4052
4292
  },
4053
4293
  [client, upsertThreadRecord]
4054
4294
  );
4055
- const updateThread = React20.useCallback(
4295
+ const updateThread = React21.useCallback(
4056
4296
  async (recordId, payload) => {
4057
4297
  setError(null);
4058
4298
  const updated = await client.conversations.update(recordId, payload);
@@ -4061,7 +4301,7 @@ function useThreads(limit = DEFAULT_LIMIT) {
4061
4301
  },
4062
4302
  [client, upsertThreadRecord]
4063
4303
  );
4064
- const deleteThread = React20.useCallback(
4304
+ const deleteThread = React21.useCallback(
4065
4305
  async (recordId) => {
4066
4306
  setError(null);
4067
4307
  await client.conversations.delete(recordId);
@@ -4069,11 +4309,11 @@ function useThreads(limit = DEFAULT_LIMIT) {
4069
4309
  },
4070
4310
  [client]
4071
4311
  );
4072
- React20.useEffect(() => {
4312
+ React21.useEffect(() => {
4073
4313
  if (!isReady) return;
4074
4314
  void refreshThreads();
4075
4315
  }, [refreshThreads, isReady]);
4076
- React20.useEffect(() => {
4316
+ React21.useEffect(() => {
4077
4317
  if (!threadId || !isStreamLoading) return;
4078
4318
  const now = (/* @__PURE__ */ new Date()).toISOString();
4079
4319
  const busyStatus = "busy";
@@ -4094,7 +4334,7 @@ function useThreads(limit = DEFAULT_LIMIT) {
4094
4334
  return changed ? sortThreadRecords(next) : prev;
4095
4335
  });
4096
4336
  }, [threadId, isStreamLoading]);
4097
- React20.useEffect(() => {
4337
+ React21.useEffect(() => {
4098
4338
  if (!isReady || !threadId || isStreamLoading) return;
4099
4339
  let cancelled = false;
4100
4340
  void client.conversations.search({ where: { threadId }, limit: 1 }).then((result) => {
@@ -4108,7 +4348,7 @@ function useThreads(limit = DEFAULT_LIMIT) {
4108
4348
  cancelled = true;
4109
4349
  };
4110
4350
  }, [client, threadId, upsertThreadRecord, isReady, isStreamLoading]);
4111
- const threads = React20.useMemo(
4351
+ const threads = React21.useMemo(
4112
4352
  () => threadRecords.map((threadRecord) => toThreadItem(threadRecord)),
4113
4353
  [threadRecords]
4114
4354
  );
@@ -4125,10 +4365,10 @@ function useThreads(limit = DEFAULT_LIMIT) {
4125
4365
  }
4126
4366
 
4127
4367
  // src/components/thread/context-usage-indicator.tsx
4128
- import * as React21 from "react";
4368
+ import * as React22 from "react";
4129
4369
 
4130
4370
  // src/components/ui/progress-circle.tsx
4131
- import { jsx as jsx26, jsxs as jsxs15 } from "react/jsx-runtime";
4371
+ import { jsx as jsx27, jsxs as jsxs16 } from "react/jsx-runtime";
4132
4372
  function clamp2(input, a, b) {
4133
4373
  return Math.max(Math.min(input, Math.max(a, b)), Math.min(a, b));
4134
4374
  }
@@ -4151,7 +4391,7 @@ var ProgressCircle = ({ value, className, ...restSvgProps }) => {
4151
4391
  return (
4152
4392
  // biome-ignore lint/a11y/useFocusableInteractive: false positive (progress + progressbar are not focusable interactives)
4153
4393
  // biome-ignore lint/nursery/useAriaPropsSupportedByRole: biome rule at odds with mdn docs (presumed nursary bug with rule)
4154
- /* @__PURE__ */ jsxs15(
4394
+ /* @__PURE__ */ jsxs16(
4155
4395
  "svg",
4156
4396
  {
4157
4397
  role: "progressbar",
@@ -4162,8 +4402,8 @@ var ProgressCircle = ({ value, className, ...restSvgProps }) => {
4162
4402
  "aria-valuemax": 100,
4163
4403
  ...restSvgProps,
4164
4404
  children: [
4165
- /* @__PURE__ */ jsx26("circle", { ...commonParams, className: "stroke-current/25" }),
4166
- /* @__PURE__ */ jsx26(
4405
+ /* @__PURE__ */ jsx27("circle", { ...commonParams, className: "stroke-current/25" }),
4406
+ /* @__PURE__ */ jsx27(
4167
4407
  "circle",
4168
4408
  {
4169
4409
  ...commonParams,
@@ -4182,7 +4422,7 @@ var ProgressCircle = ({ value, className, ...restSvgProps }) => {
4182
4422
  };
4183
4423
 
4184
4424
  // src/components/thread/context-usage-indicator.tsx
4185
- import { jsx as jsx27, jsxs as jsxs16 } from "react/jsx-runtime";
4425
+ import { jsx as jsx28, jsxs as jsxs17 } from "react/jsx-runtime";
4186
4426
  var kNumberFormatter = new Intl.NumberFormat("en-US", {
4187
4427
  minimumFractionDigits: 0,
4188
4428
  maximumFractionDigits: 1
@@ -4215,20 +4455,20 @@ function ContextUsageIndicator({
4215
4455
  }) {
4216
4456
  const { t } = useChatkitTranslation();
4217
4457
  const stream = useStreamContext();
4218
- const [maxContextSize, setMaxContextSize] = React21.useState(null);
4219
- const [usedContextSize, setUsedContextSize] = React21.useState(null);
4220
- const [assistantAgentKey, setAssistantAgentKey] = React21.useState(null);
4221
- const latestRealtimeUsageRef = React21.useRef({
4458
+ const [maxContextSize, setMaxContextSize] = React22.useState(null);
4459
+ const [usedContextSize, setUsedContextSize] = React22.useState(null);
4460
+ const [assistantAgentKey, setAssistantAgentKey] = React22.useState(null);
4461
+ const latestRealtimeUsageRef = React22.useRef({
4222
4462
  threadId: null,
4223
4463
  agentKey: null,
4224
4464
  usedTokens: null
4225
4465
  });
4226
- const realtimeUsage = React21.useMemo(
4466
+ const realtimeUsage = React22.useMemo(
4227
4467
  () => getThreadContextUsage(stream.contextUsageByAgentKey, assistantAgentKey),
4228
4468
  [assistantAgentKey, stream.contextUsageByAgentKey]
4229
4469
  );
4230
4470
  const realtimeUsedContextSize = getThreadContextUsageTotalTokens(realtimeUsage);
4231
- React21.useEffect(() => {
4471
+ React22.useEffect(() => {
4232
4472
  if (!stream.client || !stream.assistantId) {
4233
4473
  setMaxContextSize(null);
4234
4474
  setAssistantAgentKey(null);
@@ -4248,18 +4488,18 @@ function ContextUsageIndicator({
4248
4488
  cancelled = true;
4249
4489
  };
4250
4490
  }, [stream.client, stream.assistantId]);
4251
- React21.useEffect(() => {
4491
+ React22.useEffect(() => {
4252
4492
  latestRealtimeUsageRef.current = {
4253
4493
  threadId: stream.threadId ?? null,
4254
4494
  agentKey: assistantAgentKey,
4255
4495
  usedTokens: realtimeUsedContextSize
4256
4496
  };
4257
4497
  }, [assistantAgentKey, realtimeUsedContextSize, stream.threadId]);
4258
- React21.useEffect(() => {
4498
+ React22.useEffect(() => {
4259
4499
  if (realtimeUsedContextSize == null) return;
4260
4500
  setUsedContextSize(realtimeUsedContextSize);
4261
4501
  }, [realtimeUsedContextSize]);
4262
- React21.useEffect(() => {
4502
+ React22.useEffect(() => {
4263
4503
  if (!stream.client) {
4264
4504
  setUsedContextSize(null);
4265
4505
  return;
@@ -4324,8 +4564,8 @@ function ContextUsageIndicator({
4324
4564
  });
4325
4565
  const usageLabelWithSuffix = usageLabel.endsWith(":") ? usageLabel : `${usageLabel}:`;
4326
4566
  const progressClassName = percent >= 90 ? "text-destructive" : percent >= 75 ? "text-amber-500" : "text-primary dark:text-zinc-300";
4327
- return /* @__PURE__ */ jsxs16(Tooltip, { children: [
4328
- /* @__PURE__ */ jsx27(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx27(
4567
+ return /* @__PURE__ */ jsxs17(Tooltip, { children: [
4568
+ /* @__PURE__ */ jsx28(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx28(
4329
4569
  "button",
4330
4570
  {
4331
4571
  type: "button",
@@ -4334,19 +4574,19 @@ function ContextUsageIndicator({
4334
4574
  className
4335
4575
  ),
4336
4576
  "aria-label": `${usageLabelWithSuffix} ${usageFullLabel}. ${usageTokensLabel}`,
4337
- children: /* @__PURE__ */ jsx27(ProgressCircle, { value: percent, className: cn("size-3.5", progressClassName) })
4577
+ children: /* @__PURE__ */ jsx28(ProgressCircle, { value: percent, className: cn("size-3.5", progressClassName) })
4338
4578
  }
4339
4579
  ) }),
4340
- /* @__PURE__ */ jsxs16(TooltipContent, { side: "top", sideOffset: 6, className: "space-y-0.5 px-3 py-2 text-center", children: [
4341
- /* @__PURE__ */ jsx27("div", { className: "text-primary-foreground/70", children: usageLabelWithSuffix }),
4342
- /* @__PURE__ */ jsx27("div", { className: "font-medium text-primary-foreground/80", children: usageFullLabel }),
4343
- /* @__PURE__ */ jsx27("div", { className: "text-sm font-semibold", children: usageTokensLabel })
4580
+ /* @__PURE__ */ jsxs17(TooltipContent, { side: "top", sideOffset: 6, className: "space-y-0.5 px-3 py-2 text-center", children: [
4581
+ /* @__PURE__ */ jsx28("div", { className: "text-primary-foreground/70", children: usageLabelWithSuffix }),
4582
+ /* @__PURE__ */ jsx28("div", { className: "font-medium text-primary-foreground/80", children: usageFullLabel }),
4583
+ /* @__PURE__ */ jsx28("div", { className: "text-sm font-semibold", children: usageTokensLabel })
4344
4584
  ] })
4345
4585
  ] });
4346
4586
  }
4347
4587
 
4348
4588
  // src/components/chat.tsx
4349
- import { Fragment as Fragment4, jsx as jsx28, jsxs as jsxs17 } from "react/jsx-runtime";
4589
+ import { Fragment as Fragment4, jsx as jsx29, jsxs as jsxs18 } from "react/jsx-runtime";
4350
4590
  var defaultApiUrl2 = import.meta.env.VITE_XPERTAI_API_URL;
4351
4591
  var COMPOSER_INPUT_MAX_HEIGHT = 128;
4352
4592
  var LONG_TEXT_REFERENCE_THRESHOLD = 5e3;
@@ -4438,7 +4678,7 @@ function ReferenceChip({
4438
4678
  const metaLine = getReferenceMetaLine(reference);
4439
4679
  const isComposer = variant === "composer";
4440
4680
  const Icon = reference.type === "quote" ? Quote : reference.type === "image" ? ImageIcon : FileText2;
4441
- return /* @__PURE__ */ jsxs17(
4681
+ return /* @__PURE__ */ jsxs18(
4442
4682
  "div",
4443
4683
  {
4444
4684
  className: cn(
@@ -4447,7 +4687,7 @@ function ReferenceChip({
4447
4687
  ),
4448
4688
  title: getReferenceTitle(reference),
4449
4689
  children: [
4450
- /* @__PURE__ */ jsx28(
4690
+ /* @__PURE__ */ jsx29(
4451
4691
  Icon,
4452
4692
  {
4453
4693
  size: isComposer ? 14 : 12,
@@ -4457,8 +4697,8 @@ function ReferenceChip({
4457
4697
  )
4458
4698
  }
4459
4699
  ),
4460
- /* @__PURE__ */ jsxs17("div", { className: "min-w-0 flex-1", children: [
4461
- /* @__PURE__ */ jsx28(
4700
+ /* @__PURE__ */ jsxs18("div", { className: "min-w-0 flex-1", children: [
4701
+ /* @__PURE__ */ jsx29(
4462
4702
  "div",
4463
4703
  {
4464
4704
  className: cn(
@@ -4468,7 +4708,7 @@ function ReferenceChip({
4468
4708
  children: getReferenceLabel(reference)
4469
4709
  }
4470
4710
  ),
4471
- metaLine && /* @__PURE__ */ jsx28(
4711
+ metaLine && /* @__PURE__ */ jsx29(
4472
4712
  "div",
4473
4713
  {
4474
4714
  className: cn(
@@ -4479,7 +4719,7 @@ function ReferenceChip({
4479
4719
  }
4480
4720
  )
4481
4721
  ] }),
4482
- onRemove && removeLabel && /* @__PURE__ */ jsx28(
4722
+ onRemove && removeLabel && /* @__PURE__ */ jsx29(
4483
4723
  "button",
4484
4724
  {
4485
4725
  type: "button",
@@ -4490,7 +4730,7 @@ function ReferenceChip({
4490
4730
  ),
4491
4731
  title: removeLabel,
4492
4732
  "aria-label": removeLabel,
4493
- children: /* @__PURE__ */ jsx28(X3, { size: 12 })
4733
+ children: /* @__PURE__ */ jsx29(X3, { size: 12 })
4494
4734
  }
4495
4735
  )
4496
4736
  ]
@@ -4514,20 +4754,20 @@ function Chat({
4514
4754
  const { setStream } = useStreamManager();
4515
4755
  const stream = useStreamContext();
4516
4756
  const { theme } = useTheme();
4517
- const [isHistoryLoading, setIsHistoryLoading] = React22.useState(false);
4518
- const [historyError, setHistoryError] = React22.useState(null);
4519
- const [assistantName, setAssistantName] = React22.useState(null);
4520
- const [assistantAvatar, setAssistantAvatar] = React22.useState(null);
4757
+ const [isHistoryLoading, setIsHistoryLoading] = React23.useState(false);
4758
+ const [historyError, setHistoryError] = React23.useState(null);
4759
+ const [assistantName, setAssistantName] = React23.useState(null);
4760
+ const [assistantAvatar, setAssistantAvatar] = React23.useState(null);
4521
4761
  const LOADING_DOTS_MIN_DURATION = 800;
4522
4762
  const STREAMING_STATUS_REFRESH_MS = 250;
4523
- const [showLoadingDots, setShowLoadingDots] = React22.useState(false);
4524
- const [streamingNow, setStreamingNow] = React22.useState(() => Date.now());
4525
- const loadingStartTimeRef = React22.useRef(null);
4526
- const lastStreamOutputAtRef = React22.useRef(null);
4527
- React22.useEffect(() => {
4763
+ const [showLoadingDots, setShowLoadingDots] = React23.useState(false);
4764
+ const [streamingNow, setStreamingNow] = React23.useState(() => Date.now());
4765
+ const loadingStartTimeRef = React23.useRef(null);
4766
+ const lastStreamOutputAtRef = React23.useRef(null);
4767
+ React23.useEffect(() => {
4528
4768
  setStream(stream);
4529
4769
  }, [setStream, stream]);
4530
- React22.useEffect(() => {
4770
+ React23.useEffect(() => {
4531
4771
  if (stream.isLoading) {
4532
4772
  if (!loadingStartTimeRef.current) {
4533
4773
  loadingStartTimeRef.current = Date.now();
@@ -4550,7 +4790,7 @@ function Chat({
4550
4790
  }
4551
4791
  }
4552
4792
  }, [stream.isLoading]);
4553
- React22.useEffect(() => {
4793
+ React23.useEffect(() => {
4554
4794
  if (!stream.isLoading) {
4555
4795
  lastStreamOutputAtRef.current = null;
4556
4796
  setStreamingNow(Date.now());
@@ -4560,7 +4800,7 @@ function Chat({
4560
4800
  lastStreamOutputAtRef.current = now;
4561
4801
  setStreamingNow(now);
4562
4802
  }, [stream.messages, stream.isLoading]);
4563
- React22.useEffect(() => {
4803
+ React23.useEffect(() => {
4564
4804
  if (!stream.isLoading) {
4565
4805
  return;
4566
4806
  }
@@ -4569,52 +4809,53 @@ function Chat({
4569
4809
  }, STREAMING_STATUS_REFRESH_MS);
4570
4810
  return () => window.clearInterval(timer);
4571
4811
  }, [stream.isLoading]);
4572
- const [draft, setDraft] = React22.useState("");
4573
- const [selectedTool, setSelectedTool] = React22.useState(
4812
+ const [draft, setDraft] = React23.useState("");
4813
+ const [selectedTool, setSelectedTool] = React23.useState(
4574
4814
  null
4575
4815
  );
4576
- const [attachments, setAttachments] = React22.useState([]);
4577
- const [references, setReferences] = React22.useState([]);
4578
- const [isUploadingReferenceImages, setIsUploadingReferenceImages] = React22.useState(false);
4579
- const [quoteSelection, setQuoteSelection] = React22.useState(null);
4580
- const [isAtBottom, setIsAtBottom] = React22.useState(true);
4581
- const [hasUpdatesBelow, setHasUpdatesBelow] = React22.useState(false);
4816
+ const [attachments, setAttachments] = React23.useState([]);
4817
+ const [references, setReferences] = React23.useState([]);
4818
+ const [isUploadingReferenceImages, setIsUploadingReferenceImages] = React23.useState(false);
4819
+ const [quoteSelection, setQuoteSelection] = React23.useState(null);
4820
+ const [isAtBottom, setIsAtBottom] = React23.useState(true);
4821
+ const [hasUpdatesBelow, setHasUpdatesBelow] = React23.useState(false);
4582
4822
  const {
4583
4823
  threads,
4584
4824
  deleteThread,
4585
4825
  refreshThreads,
4586
4826
  isLoading: isThreadsLoading
4587
4827
  } = useThreads();
4588
- const viewportRef = React22.useRef(null);
4589
- const fileInputRef = React22.useRef(null);
4590
- const composerInputRef = React22.useRef(null);
4591
- const shouldAutoScrollRef = React22.useRef(true);
4592
- const forceFollowRef = React22.useRef(false);
4593
- const previousMessageCountRef = React22.useRef(0);
4594
- const previousScrollTopRef = React22.useRef(0);
4595
- const autoScrollFrameRef = React22.useRef(null);
4596
- const isPointerDownRef = React22.useRef(false);
4597
- const lastTouchYRef = React22.useRef(null);
4828
+ const viewportRef = React23.useRef(null);
4829
+ const fileInputRef = React23.useRef(null);
4830
+ const composerInputRef = React23.useRef(null);
4831
+ const shouldAutoScrollRef = React23.useRef(true);
4832
+ const forceFollowRef = React23.useRef(false);
4833
+ const previousMessageCountRef = React23.useRef(0);
4834
+ const previousScrollTopRef = React23.useRef(0);
4835
+ const autoScrollFrameRef = React23.useRef(null);
4836
+ const isPointerDownRef = React23.useRef(false);
4837
+ const lastTouchYRef = React23.useRef(null);
4598
4838
  const resolvedTitle = title ?? t("chat.title");
4599
4839
  const resolvedPlaceholder = placeholder ?? t("chat.placeholder");
4600
4840
  const inputPlaceholder = selectedTool?.placeholderOverride ?? composer?.placeholder ?? resolvedPlaceholder;
4601
- const messages = React22.useMemo(
4841
+ const messages = React23.useMemo(
4602
4842
  () => stream.messages ?? [],
4603
4843
  [stream.messages]
4604
4844
  );
4605
4845
  const trimmedDraft = draft.trim();
4606
4846
  const hasReferences = references.length > 0;
4607
- const pendingFollowUps = React22.useMemo(
4847
+ const pendingFollowUps = React23.useMemo(
4608
4848
  () => [...stream.pendingFollowUps ?? []].sort(
4609
4849
  (a, b) => a.createdAt - b.createdAt
4610
4850
  ),
4611
4851
  [stream.pendingFollowUps]
4612
4852
  );
4613
- const clearQuoteSelection = React22.useCallback(() => {
4853
+ const hasPendingFollowUps = pendingFollowUps.length > 0;
4854
+ const clearQuoteSelection = React23.useCallback(() => {
4614
4855
  setQuoteSelection(null);
4615
4856
  }, []);
4616
4857
  useParentMessenger({
4617
- onSetComposerValue: React22.useCallback(
4858
+ onSetComposerValue: React23.useCallback(
4618
4859
  (payload) => {
4619
4860
  if (!payload) {
4620
4861
  return;
@@ -4637,11 +4878,11 @@ function Chat({
4637
4878
  },
4638
4879
  [composer?.tools]
4639
4880
  ),
4640
- onFocusComposer: React22.useCallback(() => {
4881
+ onFocusComposer: React23.useCallback(() => {
4641
4882
  composerInputRef.current?.focus();
4642
4883
  }, [])
4643
4884
  });
4644
- const syncQuoteSelection = React22.useCallback(() => {
4885
+ const syncQuoteSelection = React23.useCallback(() => {
4645
4886
  if (typeof window === "undefined") {
4646
4887
  clearQuoteSelection();
4647
4888
  return;
@@ -4686,23 +4927,23 @@ function Chat({
4686
4927
  left
4687
4928
  });
4688
4929
  }, [clearQuoteSelection]);
4689
- const cancelPendingAutoScroll = React22.useCallback(() => {
4930
+ const cancelPendingAutoScroll = React23.useCallback(() => {
4690
4931
  if (autoScrollFrameRef.current !== null) {
4691
4932
  cancelAnimationFrame(autoScrollFrameRef.current);
4692
4933
  autoScrollFrameRef.current = null;
4693
4934
  }
4694
4935
  }, []);
4695
- const disableAutoFollow = React22.useCallback(() => {
4936
+ const disableAutoFollow = React23.useCallback(() => {
4696
4937
  forceFollowRef.current = false;
4697
4938
  shouldAutoScrollRef.current = false;
4698
4939
  cancelPendingAutoScroll();
4699
4940
  }, [cancelPendingAutoScroll]);
4700
- const enableAutoFollow = React22.useCallback(() => {
4941
+ const enableAutoFollow = React23.useCallback(() => {
4701
4942
  forceFollowRef.current = true;
4702
4943
  shouldAutoScrollRef.current = true;
4703
4944
  setHasUpdatesBelow(false);
4704
4945
  }, []);
4705
- const scrollToBottom = React22.useCallback(
4946
+ const scrollToBottom = React23.useCallback(
4706
4947
  (smooth = false, force = false) => {
4707
4948
  if (force) {
4708
4949
  enableAutoFollow();
@@ -4724,7 +4965,7 @@ function Chat({
4724
4965
  },
4725
4966
  [cancelPendingAutoScroll, enableAutoFollow]
4726
4967
  );
4727
- React22.useEffect(() => {
4968
+ React23.useEffect(() => {
4728
4969
  const viewport = viewportRef.current;
4729
4970
  if (!viewport) return;
4730
4971
  previousScrollTopRef.current = viewport.scrollTop;
@@ -4805,14 +5046,14 @@ function Chat({
4805
5046
  window.removeEventListener("pointercancel", stopPointerTracking);
4806
5047
  };
4807
5048
  }, [cancelPendingAutoScroll, disableAutoFollow]);
4808
- React22.useEffect(() => {
5049
+ React23.useEffect(() => {
4809
5050
  shouldAutoScrollRef.current = true;
4810
5051
  forceFollowRef.current = false;
4811
5052
  previousScrollTopRef.current = 0;
4812
5053
  setIsAtBottom(true);
4813
5054
  setHasUpdatesBelow(false);
4814
5055
  }, [stream.threadId]);
4815
- React22.useEffect(() => {
5056
+ React23.useEffect(() => {
4816
5057
  const messageCountChanged = messages.length !== previousMessageCountRef.current;
4817
5058
  previousMessageCountRef.current = messages.length;
4818
5059
  if (!shouldAutoScrollRef.current) {
@@ -4831,7 +5072,7 @@ function Chat({
4831
5072
  clientSecret: effectiveClientSecret
4832
5073
  });
4833
5074
  const missingConfig = Boolean(missingConfigKind);
4834
- const missingConfigShortMessage = React22.useMemo(() => {
5075
+ const missingConfigShortMessage = React23.useMemo(() => {
4835
5076
  switch (missingConfigKind) {
4836
5077
  case "apiUrl":
4837
5078
  return t("chat.missingApiUrlShort");
@@ -4843,7 +5084,7 @@ function Chat({
4843
5084
  return t("chat.missingConfigShort");
4844
5085
  }
4845
5086
  }, [missingConfigKind, t]);
4846
- const missingConfigDetailMessage = React22.useMemo(() => {
5087
+ const missingConfigDetailMessage = React23.useMemo(() => {
4847
5088
  switch (missingConfigKind) {
4848
5089
  case "apiUrl":
4849
5090
  return t("chat.missingApiUrlDetail");
@@ -4858,7 +5099,7 @@ function Chat({
4858
5099
  const showMissingConfig = !isClientSecretInitializing && missingConfig;
4859
5100
  const hasUploadingFiles = attachments.some((a) => a.status === "uploading");
4860
5101
  const isSendDisabled = !trimmedDraft && !hasReferences || missingConfig || isHistoryLoading || hasUploadingFiles || isUploadingReferenceImages;
4861
- const resizeComposerInput = React22.useCallback(() => {
5102
+ const resizeComposerInput = React23.useCallback(() => {
4862
5103
  const textarea = composerInputRef.current;
4863
5104
  if (!textarea) {
4864
5105
  return;
@@ -4871,16 +5112,16 @@ function Chat({
4871
5112
  textarea.style.height = `${nextHeight}px`;
4872
5113
  textarea.style.overflowY = textarea.scrollHeight > COMPOSER_INPUT_MAX_HEIGHT ? "auto" : "hidden";
4873
5114
  }, []);
4874
- React22.useEffect(() => {
5115
+ React23.useEffect(() => {
4875
5116
  resizeComposerInput();
4876
5117
  }, [draft, resizeComposerInput]);
4877
- React22.useEffect(() => {
5118
+ React23.useEffect(() => {
4878
5119
  document.addEventListener("selectionchange", syncQuoteSelection);
4879
5120
  return () => {
4880
5121
  document.removeEventListener("selectionchange", syncQuoteSelection);
4881
5122
  };
4882
5123
  }, [syncQuoteSelection]);
4883
- React22.useEffect(() => {
5124
+ React23.useEffect(() => {
4884
5125
  const viewport = viewportRef.current;
4885
5126
  if (!viewport) {
4886
5127
  return;
@@ -4897,14 +5138,14 @@ function Chat({
4897
5138
  window.removeEventListener("resize", handleViewportScroll);
4898
5139
  };
4899
5140
  }, [clearQuoteSelection]);
4900
- React22.useEffect(() => {
5141
+ React23.useEffect(() => {
4901
5142
  clearQuoteSelection();
4902
5143
  }, [messages.length, stream.threadId, clearQuoteSelection]);
4903
- React22.useEffect(() => {
5144
+ React23.useEffect(() => {
4904
5145
  if (missingConfig) return;
4905
5146
  void refreshThreads();
4906
5147
  }, [missingConfig, refreshThreads]);
4907
- React22.useEffect(() => {
5148
+ React23.useEffect(() => {
4908
5149
  if (missingConfig || !stream.client || !stream.assistantId) {
4909
5150
  setAssistantName(null);
4910
5151
  setAssistantAvatar(null);
@@ -4935,7 +5176,7 @@ function Chat({
4935
5176
  mimetype: a.storageFile?.mimetype ?? a.file.type,
4936
5177
  size: a.storageFile?.size ?? a.file.size
4937
5178
  }));
4938
- const submitDraft = React22.useCallback(
5179
+ const submitDraft = React23.useCallback(
4939
5180
  (followUpOverride) => {
4940
5181
  if (isSendDisabled) return;
4941
5182
  const filesToSend = uploadedFiles.length > 0 ? [...uploadedFiles] : void 0;
@@ -5009,7 +5250,7 @@ function Chat({
5009
5250
  event.preventDefault();
5010
5251
  submitDraft();
5011
5252
  };
5012
- const handleEditPendingFollowUp = React22.useCallback(
5253
+ const handleEditPendingFollowUp = React23.useCallback(
5013
5254
  (id) => {
5014
5255
  const item = pendingFollowUps.find(
5015
5256
  (entry) => entry.id === id && entry.mode === "queue"
@@ -5036,7 +5277,7 @@ function Chat({
5036
5277
  },
5037
5278
  [pendingFollowUps, stream]
5038
5279
  );
5039
- const handleQuoteSelection = React22.useCallback(() => {
5280
+ const handleQuoteSelection = React23.useCallback(() => {
5040
5281
  if (!quoteSelection) {
5041
5282
  return;
5042
5283
  }
@@ -5052,7 +5293,7 @@ function Chat({
5052
5293
  const handleAttachmentClick = () => {
5053
5294
  fileInputRef.current?.click();
5054
5295
  };
5055
- const uploadContextFile = React22.useCallback(
5296
+ const uploadContextFile = React23.useCallback(
5056
5297
  (file) => stream.client.contexts.uploadFile(file),
5057
5298
  [stream.client]
5058
5299
  );
@@ -5078,7 +5319,7 @@ function Chat({
5078
5319
  }
5079
5320
  submitDraft();
5080
5321
  };
5081
- const handleComposerPaste = React22.useCallback(
5322
+ const handleComposerPaste = React23.useCallback(
5082
5323
  (event) => {
5083
5324
  const clipboardData = event.clipboardData;
5084
5325
  if (!clipboardData) {
@@ -5157,18 +5398,18 @@ function Chat({
5157
5398
  uploadContextFile
5158
5399
  ]
5159
5400
  );
5160
- const alternateFollowUpShortcutLabel = React22.useMemo(() => {
5401
+ const alternateFollowUpShortcutLabel = React23.useMemo(() => {
5161
5402
  if (typeof navigator === "undefined") {
5162
5403
  return "\u2318Enter";
5163
5404
  }
5164
5405
  const platform = navigator.platform || navigator.userAgent;
5165
5406
  return /Mac|iPhone|iPad|iPod/i.test(platform) ? "\u2318Enter" : "Ctrl+Enter";
5166
5407
  }, []);
5167
- const followUpShortcutLabels = React22.useMemo(
5408
+ const followUpShortcutLabels = React23.useMemo(
5168
5409
  () => getComposerFollowUpShortcutLabels(alternateFollowUpShortcutLabel),
5169
5410
  [alternateFollowUpShortcutLabel]
5170
5411
  );
5171
- const uploadFile = React22.useCallback(
5412
+ const uploadFile = React23.useCallback(
5172
5413
  async (localId, file) => {
5173
5414
  try {
5174
5415
  const result = await uploadContextFile(file);
@@ -5191,7 +5432,7 @@ function Chat({
5191
5432
  },
5192
5433
  [uploadContextFile]
5193
5434
  );
5194
- const handleRetryUpload = React22.useCallback(
5435
+ const handleRetryUpload = React23.useCallback(
5195
5436
  (localId) => {
5196
5437
  const attachment = attachments.find((a) => a.localId === localId);
5197
5438
  if (!attachment || attachment.status !== "error") return;
@@ -5276,7 +5517,7 @@ function Chat({
5276
5517
  );
5277
5518
  scrollToBottom(true, true);
5278
5519
  };
5279
- const loadConversationMessages = React22.useCallback(
5520
+ const loadConversationMessages = React23.useCallback(
5280
5521
  async (recordId) => {
5281
5522
  if (missingConfig) {
5282
5523
  setHistoryError(missingConfigShortMessage);
@@ -5362,18 +5603,18 @@ function Chat({
5362
5603
  }
5363
5604
  };
5364
5605
  const acceptMimes = composer?.attachments?.accept ? Object.entries(composer.attachments.accept).map(([mime, exts]) => [mime, ...exts.map((e) => `.${e}`)].join(",")).join(",") : void 0;
5365
- const currentThread = React22.useMemo(
5606
+ const currentThread = React23.useMemo(
5366
5607
  () => threads.find((item) => item.id === stream.threadId),
5367
5608
  [threads, stream.threadId]
5368
5609
  );
5369
5610
  const errorMessage = stream.error instanceof Error ? stream.error.message : void 0;
5370
- const threadErrorMessage = React22.useMemo(() => {
5611
+ const threadErrorMessage = React23.useMemo(() => {
5371
5612
  if (currentThread?.status !== "error") return void 0;
5372
5613
  const message = currentThread.error?.trim();
5373
5614
  return message || t("thread.errorToast");
5374
5615
  }, [currentThread, t]);
5375
5616
  const assistantTitle = assistantName || resolvedTitle;
5376
- return /* @__PURE__ */ jsxs17(
5617
+ return /* @__PURE__ */ jsxs18(
5377
5618
  "div",
5378
5619
  {
5379
5620
  ref: viewportRef,
@@ -5382,10 +5623,10 @@ function Chat({
5382
5623
  className
5383
5624
  ),
5384
5625
  children: [
5385
- /* @__PURE__ */ jsxs17("div", { className: "flex items-center justify-between border-b p-2 sticky top-0 z-10 bg-background", children: [
5386
- /* @__PURE__ */ jsxs17("div", { className: "flex items-center gap-3 overflow-hidden", children: [
5387
- /* @__PURE__ */ jsxs17("div", { className: "relative shrink-0", children: [
5388
- /* @__PURE__ */ jsx28(
5626
+ /* @__PURE__ */ jsxs18("div", { className: "flex items-center justify-between border-b p-2 sticky top-0 z-10 bg-background", children: [
5627
+ /* @__PURE__ */ jsxs18("div", { className: "flex items-center gap-3 overflow-hidden", children: [
5628
+ /* @__PURE__ */ jsxs18("div", { className: "relative shrink-0", children: [
5629
+ /* @__PURE__ */ jsx29(
5389
5630
  ChatkitAvatar,
5390
5631
  {
5391
5632
  avatar: assistantAvatar,
@@ -5393,10 +5634,10 @@ function Chat({
5393
5634
  label: assistantTitle
5394
5635
  }
5395
5636
  ),
5396
- /* @__PURE__ */ jsx28("span", { className: "absolute bottom-0 right-0 h-2.5 w-2.5 rounded-full border-2 border-background bg-green-500" })
5637
+ /* @__PURE__ */ jsx29("span", { className: "absolute bottom-0 right-0 h-2.5 w-2.5 rounded-full border-2 border-background bg-green-500" })
5397
5638
  ] }),
5398
- /* @__PURE__ */ jsxs17("div", { className: "truncate", children: [
5399
- /* @__PURE__ */ jsx28(
5639
+ /* @__PURE__ */ jsxs18("div", { className: "truncate", children: [
5640
+ /* @__PURE__ */ jsx29(
5400
5641
  "h2",
5401
5642
  {
5402
5643
  className: "text-lg font-semibold truncate",
@@ -5404,11 +5645,11 @@ function Chat({
5404
5645
  children: assistantTitle
5405
5646
  }
5406
5647
  ),
5407
- /* @__PURE__ */ jsx28("p", { className: "text-xs text-muted-foreground", children: t("chat.statusOnline") })
5648
+ /* @__PURE__ */ jsx29("p", { className: "text-xs text-muted-foreground", children: t("chat.statusOnline") })
5408
5649
  ] })
5409
5650
  ] }),
5410
- history?.enabled !== false && /* @__PURE__ */ jsxs17("div", { className: "flex items-center gap-1", children: [
5411
- /* @__PURE__ */ jsx28(
5651
+ history?.enabled !== false && /* @__PURE__ */ jsxs18("div", { className: "flex items-center gap-1", children: [
5652
+ /* @__PURE__ */ jsx29(
5412
5653
  "button",
5413
5654
  {
5414
5655
  type: "button",
@@ -5421,10 +5662,10 @@ function Chat({
5421
5662
  "disabled:opacity-50 disabled:cursor-not-allowed"
5422
5663
  ),
5423
5664
  title: t("history.newThread"),
5424
- children: /* @__PURE__ */ jsx28(Pencil3, { size: 16 })
5665
+ children: /* @__PURE__ */ jsx29(Pencil3, { size: 16 })
5425
5666
  }
5426
5667
  ),
5427
- /* @__PURE__ */ jsx28(
5668
+ /* @__PURE__ */ jsx29(
5428
5669
  HistorySidebar,
5429
5670
  {
5430
5671
  threads,
@@ -5438,18 +5679,18 @@ function Chat({
5438
5679
  )
5439
5680
  ] })
5440
5681
  ] }),
5441
- /* @__PURE__ */ jsxs17("div", { className: "flex-1 p-4", children: [
5442
- errorMessage && /* @__PURE__ */ jsx28("div", { className: "mb-4 rounded-lg border border-destructive/30 bg-destructive/10 px-3 py-2 text-sm text-destructive", children: errorMessage }),
5443
- historyError && /* @__PURE__ */ jsx28("div", { className: "mb-4 rounded-lg border border-amber-200 bg-amber-50 px-3 py-2 text-sm text-amber-900", children: historyError }),
5444
- showMissingConfig && /* @__PURE__ */ jsx28("div", { className: "mb-4 rounded-lg border border-amber-200 bg-amber-50 px-3 py-2 text-sm text-amber-900", children: missingConfigDetailMessage }),
5445
- isHistoryLoading && /* @__PURE__ */ jsx28("div", { className: "mb-4 rounded-lg border border-muted px-3 py-2 text-sm text-muted-foreground", children: t("chat.loadingThread") }),
5446
- messages.length === 0 ? /* @__PURE__ */ jsx28(
5682
+ /* @__PURE__ */ jsxs18("div", { className: "flex-1 p-4", children: [
5683
+ errorMessage && /* @__PURE__ */ jsx29("div", { className: "mb-4 rounded-lg border border-destructive/30 bg-destructive/10 px-3 py-2 text-sm text-destructive", children: errorMessage }),
5684
+ historyError && /* @__PURE__ */ jsx29("div", { className: "mb-4 rounded-lg border border-amber-200 bg-amber-50 px-3 py-2 text-sm text-amber-900", children: historyError }),
5685
+ showMissingConfig && /* @__PURE__ */ jsx29("div", { className: "mb-4 rounded-lg border border-amber-200 bg-amber-50 px-3 py-2 text-sm text-amber-900", children: missingConfigDetailMessage }),
5686
+ isHistoryLoading && /* @__PURE__ */ jsx29("div", { className: "mb-4 rounded-lg border border-muted px-3 py-2 text-sm text-muted-foreground", children: t("chat.loadingThread") }),
5687
+ messages.length === 0 ? /* @__PURE__ */ jsx29(
5447
5688
  StartScreen,
5448
5689
  {
5449
5690
  startScreen,
5450
5691
  onPromptClick: handlePromptClick
5451
5692
  }
5452
- ) : /* @__PURE__ */ jsxs17("div", { className: "space-y-4", children: [
5693
+ ) : /* @__PURE__ */ jsxs18("div", { className: "space-y-4", children: [
5453
5694
  messages.map((message, index) => {
5454
5695
  const messageType = String(message.type);
5455
5696
  const isAssistantMessage = messageType === "assistant" || messageType === "ai";
@@ -5476,7 +5717,7 @@ function Chat({
5476
5717
  if (!isAssistantMessage && !hasPlainRenderableContent && !hasHumanAttachments && humanReferences.length === 0) {
5477
5718
  return null;
5478
5719
  }
5479
- return /* @__PURE__ */ jsx28(
5720
+ return /* @__PURE__ */ jsx29(
5480
5721
  "div",
5481
5722
  {
5482
5723
  className: cn(
@@ -5484,8 +5725,8 @@ function Chat({
5484
5725
  message.type === "human" ? "justify-end" : "justify-start -ml-1"
5485
5726
  // AI messages: slightly closer to left
5486
5727
  ),
5487
- children: /* @__PURE__ */ jsxs17("div", { className: "flex flex-col px-3 overflow-hidden", children: [
5488
- /* @__PURE__ */ jsx28(
5728
+ children: /* @__PURE__ */ jsxs18("div", { className: "flex flex-col px-3 overflow-hidden", children: [
5729
+ /* @__PURE__ */ jsx29(
5489
5730
  "div",
5490
5731
  {
5491
5732
  ...canQuoteMessage ? {
@@ -5497,7 +5738,7 @@ function Chat({
5497
5738
  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"
5498
5739
  // AI messages: use chat-specific foreground color
5499
5740
  ),
5500
- children: isAssistantMessage ? /* @__PURE__ */ jsx28(
5741
+ children: isAssistantMessage ? /* @__PURE__ */ jsx29(
5501
5742
  AssistantMessage,
5502
5743
  {
5503
5744
  message: {
@@ -5507,8 +5748,8 @@ function Chat({
5507
5748
  isStreaming: isStreamingMessage,
5508
5749
  streamingStatus
5509
5750
  }
5510
- ) : /* @__PURE__ */ jsxs17(Fragment4, { children: [
5511
- message.type === "human" && humanReferences.length > 0 && /* @__PURE__ */ jsx28("div", { className: "mb-2 flex flex-wrap gap-1.5", children: humanReferences.map((reference) => /* @__PURE__ */ jsx28(
5751
+ ) : /* @__PURE__ */ jsxs18(Fragment4, { children: [
5752
+ message.type === "human" && humanReferences.length > 0 && /* @__PURE__ */ jsx29("div", { className: "mb-2 flex flex-wrap gap-1.5", children: humanReferences.map((reference) => /* @__PURE__ */ jsx29(
5512
5753
  ReferenceChip,
5513
5754
  {
5514
5755
  reference,
@@ -5516,29 +5757,29 @@ function Chat({
5516
5757
  },
5517
5758
  getReferenceKey(reference)
5518
5759
  )) }),
5519
- message.type === "human" && humanAttachments.length > 0 && /* @__PURE__ */ jsx28("div", { className: "flex flex-wrap gap-1.5 mb-2", children: humanAttachments.map((file, fileIndex) => /* @__PURE__ */ jsxs17(
5760
+ message.type === "human" && humanAttachments.length > 0 && /* @__PURE__ */ jsx29("div", { className: "flex flex-wrap gap-1.5 mb-2", children: humanAttachments.map((file, fileIndex) => /* @__PURE__ */ jsxs18(
5520
5761
  "div",
5521
5762
  {
5522
5763
  className: "flex items-center gap-1.5 rounded-md bg-primary-foreground/20 px-2 py-1 text-xs",
5523
5764
  children: [
5524
- /* @__PURE__ */ jsx28(FileText2, { size: 12 }),
5525
- /* @__PURE__ */ jsx28("span", { className: "max-w-[100px] truncate", children: file.originalName })
5765
+ /* @__PURE__ */ jsx29(FileText2, { size: 12 }),
5766
+ /* @__PURE__ */ jsx29("span", { className: "max-w-[100px] truncate", children: file.originalName })
5526
5767
  ]
5527
5768
  },
5528
5769
  fileIndex
5529
5770
  )) }),
5530
- Array.isArray(message.content) ? message.content.map((part, partIndex) => /* @__PURE__ */ jsx28(
5771
+ Array.isArray(message.content) ? message.content.map((part, partIndex) => /* @__PURE__ */ jsx29(
5531
5772
  "p",
5532
5773
  {
5533
5774
  className: "wrap-break-word text-sm leading-relaxed",
5534
5775
  children: formatMessageContent(part)
5535
5776
  },
5536
5777
  `${part.type}-${partIndex}`
5537
- )) : /* @__PURE__ */ jsx28("span", { className: "wrap-break-word text-sm leading-relaxed", children: formatMessageContent(message.content) })
5778
+ )) : /* @__PURE__ */ jsx29("span", { className: "wrap-break-word text-sm leading-relaxed", children: formatMessageContent(message.content) })
5538
5779
  ] })
5539
5780
  }
5540
5781
  ),
5541
- /* @__PURE__ */ jsx28(
5782
+ /* @__PURE__ */ jsx29(
5542
5783
  MessageActions,
5543
5784
  {
5544
5785
  content: messageContent,
@@ -5574,7 +5815,7 @@ function Chat({
5574
5815
  stream.isLoading,
5575
5816
  { now: streamingNow }
5576
5817
  );
5577
- return /* @__PURE__ */ jsx28("div", { className: "flex justify-start gap-3 -ml-2", children: /* @__PURE__ */ jsx28("div", { className: "max-w-full rounded-2xl py-2.5", children: /* @__PURE__ */ jsx28(
5818
+ return /* @__PURE__ */ jsx29("div", { className: "flex justify-start gap-3 -ml-2", children: /* @__PURE__ */ jsx29("div", { className: "max-w-full rounded-2xl py-2.5", children: /* @__PURE__ */ jsx29(
5578
5819
  AssistantStreamingIndicator,
5579
5820
  {
5580
5821
  status: fallbackStreamingStatus ?? "loading"
@@ -5583,7 +5824,7 @@ function Chat({
5583
5824
  })()
5584
5825
  ] })
5585
5826
  ] }),
5586
- !isAtBottom && messages.length > 0 && /* @__PURE__ */ jsx28("div", { className: "sticky bottom-20 z-20 flex justify-center px-4 pointer-events-none", children: /* @__PURE__ */ jsx28(
5827
+ !isAtBottom && messages.length > 0 && /* @__PURE__ */ jsx29("div", { className: "sticky bottom-20 z-20 flex justify-center px-4 pointer-events-none", children: /* @__PURE__ */ jsx29(
5587
5828
  Button,
5588
5829
  {
5589
5830
  type: "button",
@@ -5596,10 +5837,10 @@ function Chat({
5596
5837
  onClick: () => scrollToBottom(true, true),
5597
5838
  "aria-label": t("chat.scrollToBottom"),
5598
5839
  title: t("chat.scrollToBottom"),
5599
- children: /* @__PURE__ */ jsx28(ArrowDown, { size: 16 })
5840
+ children: /* @__PURE__ */ jsx29(ArrowDown, { size: 16 })
5600
5841
  }
5601
5842
  ) }),
5602
- quoteSelection && /* @__PURE__ */ jsx28(
5843
+ quoteSelection && /* @__PURE__ */ jsx29(
5603
5844
  "div",
5604
5845
  {
5605
5846
  className: "pointer-events-none fixed z-50",
@@ -5608,7 +5849,7 @@ function Chat({
5608
5849
  left: `${quoteSelection.left}px`,
5609
5850
  transform: "translateX(-50%)"
5610
5851
  },
5611
- children: /* @__PURE__ */ jsxs17(
5852
+ children: /* @__PURE__ */ jsxs18(
5612
5853
  Button,
5613
5854
  {
5614
5855
  type: "button",
@@ -5620,16 +5861,16 @@ function Chat({
5620
5861
  "aria-label": t("composer.quoteSelection"),
5621
5862
  title: t("composer.quoteSelection"),
5622
5863
  children: [
5623
- /* @__PURE__ */ jsx28(Quote, { size: 14 }),
5864
+ /* @__PURE__ */ jsx29(Quote, { size: 14 }),
5624
5865
  t("composer.quoteSelection")
5625
5866
  ]
5626
5867
  }
5627
5868
  )
5628
5869
  }
5629
5870
  ),
5630
- /* @__PURE__ */ jsxs17("div", { className: "p-2 sticky bottom-0 z-10 bg-background", children: [
5631
- threadErrorMessage && /* @__PURE__ */ jsx28("div", { className: "mb-3 rounded-lg border border-destructive/30 bg-destructive/10 px-3 py-2 text-sm text-destructive overflow-auto", children: threadErrorMessage }),
5632
- /* @__PURE__ */ jsx28(
5871
+ /* @__PURE__ */ jsxs18("div", { className: "p-2 sticky bottom-0 z-10 bg-background", children: [
5872
+ threadErrorMessage && /* @__PURE__ */ jsx29("div", { className: "mb-3 rounded-lg border border-destructive/30 bg-destructive/10 px-3 py-2 text-sm text-destructive overflow-auto", children: threadErrorMessage }),
5873
+ /* @__PURE__ */ jsx29(
5633
5874
  "input",
5634
5875
  {
5635
5876
  ref: fileInputRef,
@@ -5640,7 +5881,7 @@ function Chat({
5640
5881
  className: "hidden"
5641
5882
  }
5642
5883
  ),
5643
- attachments.length > 0 && /* @__PURE__ */ jsx28("div", { className: "mb-3 flex flex-wrap gap-2", children: attachments.map((item) => /* @__PURE__ */ jsxs17(
5884
+ attachments.length > 0 && /* @__PURE__ */ jsx29("div", { className: "mb-3 flex flex-wrap gap-2", children: attachments.map((item) => /* @__PURE__ */ jsxs18(
5644
5885
  "div",
5645
5886
  {
5646
5887
  className: cn(
@@ -5648,16 +5889,16 @@ function Chat({
5648
5889
  item.status === "error" ? "bg-destructive/10 border border-destructive/30" : "bg-muted"
5649
5890
  ),
5650
5891
  children: [
5651
- item.status === "uploading" && /* @__PURE__ */ jsx28(
5892
+ item.status === "uploading" && /* @__PURE__ */ jsx29(
5652
5893
  Loader23,
5653
5894
  {
5654
5895
  size: 14,
5655
5896
  className: "animate-spin text-muted-foreground"
5656
5897
  }
5657
5898
  ),
5658
- item.status === "success" && /* @__PURE__ */ jsx28(FileText2, { size: 14, className: "text-muted-foreground" }),
5659
- item.status === "error" && /* @__PURE__ */ jsx28(FileText2, { size: 14, className: "text-destructive" }),
5660
- /* @__PURE__ */ jsx28(
5899
+ item.status === "success" && /* @__PURE__ */ jsx29(FileText2, { size: 14, className: "text-muted-foreground" }),
5900
+ item.status === "error" && /* @__PURE__ */ jsx29(FileText2, { size: 14, className: "text-destructive" }),
5901
+ /* @__PURE__ */ jsx29(
5661
5902
  "span",
5662
5903
  {
5663
5904
  className: cn(
@@ -5667,17 +5908,17 @@ function Chat({
5667
5908
  children: item.file.name
5668
5909
  }
5669
5910
  ),
5670
- item.status === "error" && /* @__PURE__ */ jsx28(
5911
+ item.status === "error" && /* @__PURE__ */ jsx29(
5671
5912
  "button",
5672
5913
  {
5673
5914
  type: "button",
5674
5915
  onClick: () => handleRetryUpload(item.localId),
5675
5916
  className: "ml-1 rounded-full p-0.5 text-destructive hover:bg-destructive/20",
5676
5917
  title: t("chat.retryUpload"),
5677
- children: /* @__PURE__ */ jsx28(RefreshCw2, { size: 12 })
5918
+ children: /* @__PURE__ */ jsx29(RefreshCw2, { size: 12 })
5678
5919
  }
5679
5920
  ),
5680
- /* @__PURE__ */ jsx28(
5921
+ /* @__PURE__ */ jsx29(
5681
5922
  "button",
5682
5923
  {
5683
5924
  type: "button",
@@ -5686,14 +5927,14 @@ function Chat({
5686
5927
  "ml-1 rounded-full p-0.5",
5687
5928
  item.status === "error" ? "text-destructive hover:bg-destructive/20" : "hover:bg-muted-foreground/20"
5688
5929
  ),
5689
- children: /* @__PURE__ */ jsx28(X3, { size: 12 })
5930
+ children: /* @__PURE__ */ jsx29(X3, { size: 12 })
5690
5931
  }
5691
5932
  )
5692
5933
  ]
5693
5934
  },
5694
5935
  item.localId
5695
5936
  )) }),
5696
- references.length > 0 && /* @__PURE__ */ jsx28("div", { className: "mb-3 flex flex-wrap gap-2", children: references.map((reference) => /* @__PURE__ */ jsx28(
5937
+ references.length > 0 && /* @__PURE__ */ jsx29("div", { className: "mb-3 flex flex-wrap gap-2", children: references.map((reference) => /* @__PURE__ */ jsx29(
5697
5938
  ReferenceChip,
5698
5939
  {
5699
5940
  reference,
@@ -5707,19 +5948,27 @@ function Chat({
5707
5948
  },
5708
5949
  getReferenceKey(reference)
5709
5950
  )) }),
5710
- selectedTool && /* @__PURE__ */ jsxs17("div", { className: "mb-2 flex items-center gap-2", children: [
5711
- /* @__PURE__ */ jsx28("span", { className: "rounded-full bg-primary/10 px-2 py-0.5 text-xs font-medium text-primary", children: selectedTool.shortLabel ?? selectedTool.label }),
5712
- /* @__PURE__ */ jsx28(
5951
+ selectedTool && /* @__PURE__ */ jsxs18("div", { className: "mb-2 flex items-center gap-2", children: [
5952
+ /* @__PURE__ */ jsx29("span", { className: "rounded-full bg-primary/10 px-2 py-0.5 text-xs font-medium text-primary", children: selectedTool.shortLabel ?? selectedTool.label }),
5953
+ /* @__PURE__ */ jsx29(
5713
5954
  "button",
5714
5955
  {
5715
5956
  type: "button",
5716
5957
  onClick: () => setSelectedTool(null),
5717
5958
  className: "rounded-full p-0.5 text-muted-foreground hover:bg-muted",
5718
- children: /* @__PURE__ */ jsx28(X3, { size: 12 })
5959
+ children: /* @__PURE__ */ jsx29(X3, { size: 12 })
5719
5960
  }
5720
5961
  )
5721
5962
  ] }),
5722
- /* @__PURE__ */ jsx28(
5963
+ /* @__PURE__ */ jsx29(
5964
+ PendingTodos,
5965
+ {
5966
+ snapshot: stream.todos,
5967
+ attachToComposer: !hasPendingFollowUps,
5968
+ className: hasPendingFollowUps ? "mb-2" : void 0
5969
+ }
5970
+ ),
5971
+ /* @__PURE__ */ jsx29(
5723
5972
  PendingFollowUps,
5724
5973
  {
5725
5974
  items: pendingFollowUps,
@@ -5730,10 +5979,11 @@ function Chat({
5730
5979
  canSendNow: stream.canSendPendingFollowUpNow,
5731
5980
  onSendNow: (id) => stream.sendPendingFollowUpNow(id),
5732
5981
  onEdit: handleEditPendingFollowUp,
5733
- onRemove: stream.removePendingFollowUp
5982
+ onRemove: stream.removePendingFollowUp,
5983
+ attachToComposer: true
5734
5984
  }
5735
5985
  ),
5736
- /* @__PURE__ */ jsx28("form", { className: "flex items-end", onSubmit: handleSubmit, children: /* @__PURE__ */ jsxs17(
5986
+ /* @__PURE__ */ jsx29("form", { className: "flex items-end", onSubmit: handleSubmit, children: /* @__PURE__ */ jsxs18(
5737
5987
  "div",
5738
5988
  {
5739
5989
  className: cn(
@@ -5745,7 +5995,7 @@ function Chat({
5745
5995
  getRoundedClass(theme.radius)
5746
5996
  ),
5747
5997
  children: [
5748
- /* @__PURE__ */ jsx28(
5998
+ /* @__PURE__ */ jsx29(
5749
5999
  ComposerMenu,
5750
6000
  {
5751
6001
  composer,
@@ -5755,7 +6005,7 @@ function Chat({
5755
6005
  disabled: missingConfig || isHistoryLoading
5756
6006
  }
5757
6007
  ),
5758
- /* @__PURE__ */ jsx28(
6008
+ /* @__PURE__ */ jsx29(
5759
6009
  "textarea",
5760
6010
  {
5761
6011
  ref: composerInputRef,
@@ -5773,7 +6023,7 @@ function Chat({
5773
6023
  )
5774
6024
  }
5775
6025
  ),
5776
- /* @__PURE__ */ jsx28(
6026
+ /* @__PURE__ */ jsx29(
5777
6027
  SendButton,
5778
6028
  {
5779
6029
  disabled: isSendDisabled,
@@ -5797,7 +6047,7 @@ function Chat({
5797
6047
  ]
5798
6048
  }
5799
6049
  ) }),
5800
- disclaimer?.text && /* @__PURE__ */ jsx28(
6050
+ disclaimer?.text && /* @__PURE__ */ jsx29(
5801
6051
  "p",
5802
6052
  {
5803
6053
  className: cn(
@@ -5807,9 +6057,9 @@ function Chat({
5807
6057
  children: disclaimer.text
5808
6058
  }
5809
6059
  ),
5810
- /* @__PURE__ */ jsxs17("div", { className: "mt-2 flex items-center justify-center gap-2 text-xs text-muted-foreground", children: [
5811
- /* @__PURE__ */ jsx28("span", { children: t("chat.poweredBy") }),
5812
- /* @__PURE__ */ jsx28(ContextUsageIndicator, { className: "absolute right-4" })
6060
+ /* @__PURE__ */ jsxs18("div", { className: "mt-2 flex items-center justify-center gap-2 text-xs text-muted-foreground", children: [
6061
+ /* @__PURE__ */ jsx29("span", { children: t("chat.poweredBy") }),
6062
+ /* @__PURE__ */ jsx29(ContextUsageIndicator, { className: "absolute right-4" })
5813
6063
  ] })
5814
6064
  ] })
5815
6065
  ]
@@ -5818,11 +6068,11 @@ function Chat({
5818
6068
  }
5819
6069
 
5820
6070
  // src/components/ui/input.tsx
5821
- import * as React23 from "react";
5822
- import { jsx as jsx29 } from "react/jsx-runtime";
5823
- var Input = React23.forwardRef(
6071
+ import * as React24 from "react";
6072
+ import { jsx as jsx30 } from "react/jsx-runtime";
6073
+ var Input = React24.forwardRef(
5824
6074
  ({ className, type, ...props }, ref) => {
5825
- return /* @__PURE__ */ jsx29(
6075
+ return /* @__PURE__ */ jsx30(
5826
6076
  "input",
5827
6077
  {
5828
6078
  ref,
@@ -5839,10 +6089,10 @@ var Input = React23.forwardRef(
5839
6089
  Input.displayName = "Input";
5840
6090
 
5841
6091
  // src/components/ui/separator.tsx
5842
- import * as React24 from "react";
5843
- import { jsx as jsx30 } from "react/jsx-runtime";
5844
- var Separator = React24.forwardRef(
5845
- ({ className, orientation = "horizontal", ...props }, ref) => /* @__PURE__ */ jsx30(
6092
+ import * as React25 from "react";
6093
+ import { jsx as jsx31 } from "react/jsx-runtime";
6094
+ var Separator = React25.forwardRef(
6095
+ ({ className, orientation = "horizontal", ...props }, ref) => /* @__PURE__ */ jsx31(
5846
6096
  "div",
5847
6097
  {
5848
6098
  ref,