@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.cjs CHANGED
@@ -66,8 +66,8 @@ __export(index_exports, {
66
66
  module.exports = __toCommonJS(index_exports);
67
67
 
68
68
  // src/components/chat.tsx
69
- var React22 = __toESM(require("react"), 1);
70
- var import_lucide_react11 = require("lucide-react");
69
+ var React23 = __toESM(require("react"), 1);
70
+ var import_lucide_react12 = require("lucide-react");
71
71
 
72
72
  // src/lib/utils.ts
73
73
  var import_clsx = require("clsx");
@@ -961,6 +961,11 @@ function getBusyComposerShortcutFollowUpMode(useQueueShortcut) {
961
961
  return useQueueShortcut ? "queue" : "steer";
962
962
  }
963
963
 
964
+ // src/lib/todos.ts
965
+ function countCompletedTodos(items) {
966
+ return items.filter((item) => item.status === "completed").length;
967
+ }
968
+
964
969
  // src/providers/Stream.tsx
965
970
  var import_jsx_runtime2 = require("react/jsx-runtime");
966
971
  var import_meta = {};
@@ -1115,6 +1120,9 @@ var en_US_default = {
1115
1120
  manualQueueHint: "Ready to send as a new run",
1116
1121
  steerHint: "Injects after the current tool call"
1117
1122
  },
1123
+ todos: {
1124
+ summary: "{{total}} tasks, {{completed}} completed"
1125
+ },
1118
1126
  errors: {
1119
1127
  loadMessages: "Failed to load thread messages",
1120
1128
  createThread: "Failed to create thread",
@@ -1219,6 +1227,9 @@ var zh_CN_default = {
1219
1227
  manualQueueHint: "\u4FDD\u7559\u4E3A\u5F85\u53D1\u9001\uFF0C\u53EF\u624B\u52A8\u5F00\u542F\u65B0\u4E00\u8F6E",
1220
1228
  steerHint: "\u5F53\u524D\u5DE5\u5177\u8C03\u7528\u5B8C\u6210\u540E\u6CE8\u5165"
1221
1229
  },
1230
+ todos: {
1231
+ summary: "\u5171 {{total}} \u4E2A\u4EFB\u52A1\uFF0C\u5DF2\u7ECF\u5B8C\u6210 {{completed}} \u4E2A"
1232
+ },
1222
1233
  errors: {
1223
1234
  loadMessages: "\u52A0\u8F7D\u7EBF\u7A0B\u6D88\u606F\u5931\u8D25",
1224
1235
  createThread: "\u521B\u5EFA\u7EBF\u7A0B\u5931\u8D25",
@@ -2197,6 +2208,7 @@ function PendingFollowUps({
2197
2208
  onSendNow,
2198
2209
  onEdit,
2199
2210
  onRemove,
2211
+ attachToComposer = true,
2200
2212
  className
2201
2213
  }) {
2202
2214
  const { t } = useChatkitTranslation();
@@ -2219,8 +2231,9 @@ function PendingFollowUps({
2219
2231
  "div",
2220
2232
  {
2221
2233
  className: cn(
2222
- "space-y-2 mx-2 p-2 border border-border border-b-0",
2223
- rounded.top,
2234
+ "space-y-2 mx-2 p-2 border border-border",
2235
+ attachToComposer ? "border-b-0" : null,
2236
+ attachToComposer ? rounded.top : rounded.panel,
2224
2237
  className
2225
2238
  ),
2226
2239
  children: /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "space-y-1", children: [
@@ -2451,31 +2464,150 @@ function PendingFollowUps({
2451
2464
  );
2452
2465
  }
2453
2466
 
2467
+ // src/components/composer/pending-todos.tsx
2468
+ var React11 = __toESM(require("react"), 1);
2469
+ var import_lucide_react6 = require("lucide-react");
2470
+ var import_jsx_runtime13 = require("react/jsx-runtime");
2471
+ function useRoundedClasses2() {
2472
+ const { theme } = useTheme();
2473
+ return {
2474
+ top: theme.radius ? {
2475
+ pill: "rounded-t-full",
2476
+ round: "rounded-t-xl",
2477
+ soft: "rounded-t-lg",
2478
+ sharp: "rounded-t-none"
2479
+ }[theme.radius] : "rounded-t-lg",
2480
+ panel: getRoundedClass(theme.radius, "rounded-lg")
2481
+ };
2482
+ }
2483
+ function TodoStatusIcon({ status }) {
2484
+ if (status === "completed") {
2485
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_lucide_react6.CheckCircle2, { className: "mt-1 h-4 w-4 shrink-0 text-emerald-600" });
2486
+ }
2487
+ if (status === "in_progress") {
2488
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_lucide_react6.CircleDashed, { className: "mt-1 h-4 w-4 shrink-0 text-foreground/70" });
2489
+ }
2490
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_lucide_react6.Circle, { className: "mt-1 h-4 w-4 shrink-0 text-muted-foreground" });
2491
+ }
2492
+ function PendingTodos({
2493
+ snapshot,
2494
+ attachToComposer = true,
2495
+ className
2496
+ }) {
2497
+ const { t } = useChatkitTranslation();
2498
+ const rounded = useRoundedClasses2();
2499
+ const listId = React11.useId();
2500
+ const [isCollapsed, setIsCollapsed] = React11.useState(false);
2501
+ React11.useEffect(() => {
2502
+ setIsCollapsed(false);
2503
+ }, [snapshot?.componentId]);
2504
+ if (!snapshot || snapshot.items.length === 0) {
2505
+ return null;
2506
+ }
2507
+ const completedCount = countCompletedTodos(snapshot.items);
2508
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
2509
+ "div",
2510
+ {
2511
+ "aria-live": "polite",
2512
+ className: cn(
2513
+ "mx-2 border border-border bg-background/95 px-3 py-3 shadow-sm",
2514
+ attachToComposer ? "border-b-0" : null,
2515
+ attachToComposer ? rounded.top : rounded.panel,
2516
+ className
2517
+ ),
2518
+ children: [
2519
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
2520
+ "button",
2521
+ {
2522
+ type: "button",
2523
+ className: "flex w-full items-center justify-between gap-3 text-left",
2524
+ "aria-expanded": !isCollapsed,
2525
+ "aria-controls": listId,
2526
+ onClick: () => setIsCollapsed((prev) => !prev),
2527
+ children: [
2528
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "flex min-w-0 items-center gap-2 text-sm font-medium text-foreground", children: [
2529
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_lucide_react6.ListTodo, { className: "h-4 w-4 shrink-0 text-muted-foreground" }),
2530
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { className: "truncate", children: t("chat.todos.summary", {
2531
+ total: snapshot.items.length,
2532
+ completed: completedCount
2533
+ }) })
2534
+ ] }),
2535
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "flex items-center shrink-0", children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
2536
+ import_lucide_react6.ChevronDown,
2537
+ {
2538
+ className: cn(
2539
+ "h-4 w-4 text-muted-foreground transition-transform",
2540
+ isCollapsed ? null : "rotate-180"
2541
+ )
2542
+ }
2543
+ ) })
2544
+ ]
2545
+ }
2546
+ ),
2547
+ !isCollapsed && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("ol", { id: listId, className: "mt-3 space-y-2.5", children: snapshot.items.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
2548
+ "li",
2549
+ {
2550
+ className: "grid min-w-0 grid-cols-[16px_24px_minmax(0,1fr)] items-start gap-2 overflow-hidden",
2551
+ children: [
2552
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(TodoStatusIcon, { status: item.status }),
2553
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
2554
+ "span",
2555
+ {
2556
+ className: cn(
2557
+ "text-sm leading-6 text-foreground",
2558
+ item.status === "completed" ? "text-muted-foreground" : null
2559
+ ),
2560
+ children: [
2561
+ index + 1,
2562
+ "."
2563
+ ]
2564
+ }
2565
+ ),
2566
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
2567
+ "span",
2568
+ {
2569
+ title: item.content,
2570
+ className: cn(
2571
+ "block min-w-0 truncate text-sm leading-6 text-foreground",
2572
+ item.status === "completed" ? "text-muted-foreground line-through" : item.status === "in_progress" ? "font-medium" : null
2573
+ ),
2574
+ children: item.content
2575
+ }
2576
+ )
2577
+ ]
2578
+ },
2579
+ item.id
2580
+ )) })
2581
+ ]
2582
+ }
2583
+ );
2584
+ }
2585
+
2454
2586
  // src/components/thread/messages/ai.tsx
2455
- var React15 = __toESM(require("react"), 1);
2456
- var import_lucide_react8 = require("lucide-react");
2587
+ var React16 = __toESM(require("react"), 1);
2588
+ var import_lucide_react9 = require("lucide-react");
2457
2589
 
2458
2590
  // src/components/ui/badge.tsx
2459
- var React11 = __toESM(require("react"), 1);
2460
- var import_jsx_runtime13 = require("react/jsx-runtime");
2591
+ var React12 = __toESM(require("react"), 1);
2592
+ var import_jsx_runtime14 = require("react/jsx-runtime");
2461
2593
  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";
2462
2594
  var variants = {
2463
2595
  default: "bg-primary text-primary-foreground",
2464
2596
  secondary: "bg-secondary text-secondary-foreground",
2465
2597
  outline: "border-input text-foreground"
2466
2598
  };
2467
- var Badge = React11.forwardRef(
2599
+ var Badge = React12.forwardRef(
2468
2600
  ({ className, variant = "default", ...props }, ref) => {
2469
- return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { ref, className: cn(base, variants[variant], className), ...props });
2601
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { ref, className: cn(base, variants[variant], className), ...props });
2470
2602
  }
2471
2603
  );
2472
2604
  Badge.displayName = "Badge";
2473
2605
 
2474
2606
  // src/components/ui/card.tsx
2475
- var React12 = __toESM(require("react"), 1);
2476
- var import_jsx_runtime14 = require("react/jsx-runtime");
2477
- var Card = React12.forwardRef(
2478
- ({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
2607
+ var React13 = __toESM(require("react"), 1);
2608
+ var import_jsx_runtime15 = require("react/jsx-runtime");
2609
+ var Card = React13.forwardRef(
2610
+ ({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
2479
2611
  "div",
2480
2612
  {
2481
2613
  ref,
@@ -2488,45 +2620,45 @@ var Card = React12.forwardRef(
2488
2620
  )
2489
2621
  );
2490
2622
  Card.displayName = "Card";
2491
- var CardHeader = React12.forwardRef(
2492
- ({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { ref, className: cn("flex flex-col gap-1.5 px-6 pt-6", className), ...props })
2623
+ var CardHeader = React13.forwardRef(
2624
+ ({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { ref, className: cn("flex flex-col gap-1.5 px-6 pt-6", className), ...props })
2493
2625
  );
2494
2626
  CardHeader.displayName = "CardHeader";
2495
- var CardTitle = React12.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("h3", { ref, className: cn("text-lg font-semibold leading-tight", className), ...props }));
2627
+ var CardTitle = React13.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("h3", { ref, className: cn("text-lg font-semibold leading-tight", className), ...props }));
2496
2628
  CardTitle.displayName = "CardTitle";
2497
- var CardDescription = React12.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("p", { ref, className: cn("text-sm text-muted-foreground", className), ...props }));
2629
+ var CardDescription = React13.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("p", { ref, className: cn("text-sm text-muted-foreground", className), ...props }));
2498
2630
  CardDescription.displayName = "CardDescription";
2499
- var CardContent = React12.forwardRef(
2500
- ({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { ref, className: cn("px-6 pb-6", className), ...props })
2631
+ var CardContent = React13.forwardRef(
2632
+ ({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { ref, className: cn("px-6 pb-6", className), ...props })
2501
2633
  );
2502
2634
  CardContent.displayName = "CardContent";
2503
- var CardFooter = React12.forwardRef(
2504
- ({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { ref, className: cn("flex items-center px-6 pb-6", className), ...props })
2635
+ var CardFooter = React13.forwardRef(
2636
+ ({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { ref, className: cn("flex items-center px-6 pb-6", className), ...props })
2505
2637
  );
2506
2638
  CardFooter.displayName = "CardFooter";
2507
- var CardAction = React12.forwardRef(
2508
- ({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { ref, className: cn("ml-auto flex items-center", className), ...props })
2639
+ var CardAction = React13.forwardRef(
2640
+ ({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { ref, className: cn("ml-auto flex items-center", className), ...props })
2509
2641
  );
2510
2642
  CardAction.displayName = "CardAction";
2511
2643
 
2512
2644
  // src/components/ui/tabs.tsx
2513
- var React13 = __toESM(require("react"), 1);
2514
- var import_jsx_runtime15 = require("react/jsx-runtime");
2515
- var TabsContext = React13.createContext(null);
2645
+ var React14 = __toESM(require("react"), 1);
2646
+ var import_jsx_runtime16 = require("react/jsx-runtime");
2647
+ var TabsContext = React14.createContext(null);
2516
2648
  function Tabs({ className, defaultValue, value, onValueChange, ...props }) {
2517
- const [internalValue, setInternalValue] = React13.useState(defaultValue ?? "");
2649
+ const [internalValue, setInternalValue] = React14.useState(defaultValue ?? "");
2518
2650
  const activeValue = value ?? internalValue;
2519
- const setValue = React13.useCallback(
2651
+ const setValue = React14.useCallback(
2520
2652
  (nextValue) => {
2521
2653
  if (value === void 0) setInternalValue(nextValue);
2522
2654
  onValueChange?.(nextValue);
2523
2655
  },
2524
2656
  [onValueChange, value]
2525
2657
  );
2526
- return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(TabsContext.Provider, { value: { value: activeValue, setValue }, children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: cn("w-full", className), ...props }) });
2658
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(TabsContext.Provider, { value: { value: activeValue, setValue }, children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: cn("w-full", className), ...props }) });
2527
2659
  }
2528
- var TabsList = React13.forwardRef(
2529
- ({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
2660
+ var TabsList = React14.forwardRef(
2661
+ ({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
2530
2662
  "div",
2531
2663
  {
2532
2664
  ref,
@@ -2540,14 +2672,14 @@ var TabsList = React13.forwardRef(
2540
2672
  )
2541
2673
  );
2542
2674
  TabsList.displayName = "TabsList";
2543
- var TabsTrigger = React13.forwardRef(
2675
+ var TabsTrigger = React14.forwardRef(
2544
2676
  ({ className, value, onClick, ...props }, ref) => {
2545
- const context = React13.useContext(TabsContext);
2677
+ const context = React14.useContext(TabsContext);
2546
2678
  if (!context) {
2547
2679
  throw new Error("TabsTrigger must be used within Tabs");
2548
2680
  }
2549
2681
  const isActive = context.value === value;
2550
- return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
2682
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
2551
2683
  "button",
2552
2684
  {
2553
2685
  ref,
@@ -2569,14 +2701,14 @@ var TabsTrigger = React13.forwardRef(
2569
2701
  }
2570
2702
  );
2571
2703
  TabsTrigger.displayName = "TabsTrigger";
2572
- var TabsContent = React13.forwardRef(
2704
+ var TabsContent = React14.forwardRef(
2573
2705
  ({ className, value, ...props }, ref) => {
2574
- const context = React13.useContext(TabsContext);
2706
+ const context = React14.useContext(TabsContext);
2575
2707
  if (!context) {
2576
2708
  throw new Error("TabsContent must be used within Tabs");
2577
2709
  }
2578
2710
  if (context.value !== value) return null;
2579
- return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
2711
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
2580
2712
  "div",
2581
2713
  {
2582
2714
  ref,
@@ -2598,7 +2730,7 @@ var import_remark_gfm = __toESM(require("remark-gfm"), 1);
2598
2730
  var import_rehype_katex = __toESM(require("rehype-katex"), 1);
2599
2731
  var import_remark_math = __toESM(require("remark-math"), 1);
2600
2732
  var import_react6 = require("react");
2601
- var import_lucide_react7 = require("lucide-react");
2733
+ var import_lucide_react8 = require("lucide-react");
2602
2734
 
2603
2735
  // src/components/thread/syntax-highlighter.tsx
2604
2736
  var import_react_syntax_highlighter = require("react-syntax-highlighter");
@@ -2606,7 +2738,7 @@ var import_tsx = __toESM(require("react-syntax-highlighter/dist/esm/languages/pr
2606
2738
  var import_python = __toESM(require("react-syntax-highlighter/dist/esm/languages/prism/python"), 1);
2607
2739
  var import_prism = require("react-syntax-highlighter/dist/cjs/styles/prism");
2608
2740
  var import_react4 = require("react");
2609
- var import_jsx_runtime16 = require("react/jsx-runtime");
2741
+ var import_jsx_runtime17 = require("react/jsx-runtime");
2610
2742
  import_react_syntax_highlighter.PrismAsyncLight.registerLanguage("js", import_tsx.default);
2611
2743
  import_react_syntax_highlighter.PrismAsyncLight.registerLanguage("jsx", import_tsx.default);
2612
2744
  import_react_syntax_highlighter.PrismAsyncLight.registerLanguage("ts", import_tsx.default);
@@ -2617,7 +2749,7 @@ var SyntaxHighlighter = ({
2617
2749
  language,
2618
2750
  className
2619
2751
  }) => {
2620
- return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
2752
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
2621
2753
  import_react_syntax_highlighter.PrismAsyncLight,
2622
2754
  {
2623
2755
  language,
@@ -2637,15 +2769,15 @@ var SyntaxHighlighter = ({
2637
2769
  // src/components/thread/mermaid-block.tsx
2638
2770
  var Dialog = __toESM(require("@radix-ui/react-dialog"), 1);
2639
2771
  var import_mermaid = __toESM(require("mermaid"), 1);
2640
- var import_lucide_react6 = require("lucide-react");
2641
- var React14 = __toESM(require("react"), 1);
2772
+ var import_lucide_react7 = require("lucide-react");
2773
+ var React15 = __toESM(require("react"), 1);
2642
2774
 
2643
2775
  // src/components/thread/tooltip-icon-button.tsx
2644
2776
  var import_react5 = require("react");
2645
- var import_jsx_runtime17 = require("react/jsx-runtime");
2777
+ var import_jsx_runtime18 = require("react/jsx-runtime");
2646
2778
  var TooltipIconButton = (0, import_react5.forwardRef)(({ children, tooltip, side = "bottom", className, ...rest }, ref) => {
2647
- return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(TooltipProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(Tooltip, { children: [
2648
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
2779
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(TooltipProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(Tooltip, { children: [
2780
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
2649
2781
  Button,
2650
2782
  {
2651
2783
  variant: "ghost",
@@ -2655,17 +2787,17 @@ var TooltipIconButton = (0, import_react5.forwardRef)(({ children, tooltip, side
2655
2787
  ref,
2656
2788
  children: [
2657
2789
  children,
2658
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "sr-only", children: tooltip })
2790
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "sr-only", children: tooltip })
2659
2791
  ]
2660
2792
  }
2661
2793
  ) }),
2662
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(TooltipContent, { side, children: tooltip })
2794
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(TooltipContent, { side, children: tooltip })
2663
2795
  ] }) });
2664
2796
  });
2665
2797
  TooltipIconButton.displayName = "TooltipIconButton";
2666
2798
 
2667
2799
  // src/components/thread/mermaid-block.tsx
2668
- var import_jsx_runtime18 = require("react/jsx-runtime");
2800
+ var import_jsx_runtime19 = require("react/jsx-runtime");
2669
2801
  var HEX_COLOR_PATTERN = /^#([\da-f]{3,8})$/i;
2670
2802
  var MERMAID_DIRECTIVE_PATTERN = /%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi;
2671
2803
  var MERMAID_FRONTMATTER_PATTERN = /^-{3}\s*[\n\r](.*?)[\n\r]-{3}\s*[\n\r]+/s;
@@ -2913,24 +3045,24 @@ function MermaidPreviewDialog({
2913
3045
  svgMarkup,
2914
3046
  title
2915
3047
  }) {
2916
- return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Dialog.Root, { open, onOpenChange, children: /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(Dialog.Portal, { children: [
2917
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(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" }),
2918
- /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(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: [
2919
- /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "flex items-center justify-between gap-4 border-b border-border px-5 py-4", children: [
2920
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Dialog.Title, { className: "text-base font-semibold text-foreground", children: title }),
2921
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Dialog.Close, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
3048
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Dialog.Root, { open, onOpenChange, children: /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(Dialog.Portal, { children: [
3049
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(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" }),
3050
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(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: [
3051
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "flex items-center justify-between gap-4 border-b border-border px-5 py-4", children: [
3052
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Dialog.Title, { className: "text-base font-semibold text-foreground", children: title }),
3053
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Dialog.Close, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
2922
3054
  "button",
2923
3055
  {
2924
3056
  type: "button",
2925
3057
  className: "inline-flex size-10 items-center justify-center rounded-full border border-border bg-card text-muted-foreground transition-colors hover:text-foreground",
2926
3058
  children: [
2927
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_lucide_react6.X, { className: "size-4" }),
2928
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "sr-only", children: closeLabel })
3059
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lucide_react7.X, { className: "size-4" }),
3060
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "sr-only", children: closeLabel })
2929
3061
  ]
2930
3062
  }
2931
3063
  ) })
2932
3064
  ] }),
2933
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "flex-1 overflow-auto bg-card p-6", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
3065
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "flex-1 overflow-auto bg-card p-6", children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
2934
3066
  "div",
2935
3067
  {
2936
3068
  "data-slot": "mermaid-preview",
@@ -2944,24 +3076,24 @@ function MermaidPreviewDialog({
2944
3076
  function MermaidBlock({ code }) {
2945
3077
  const { t } = useChatkitTranslation();
2946
3078
  const { theme, isDarkMode } = useTheme();
2947
- const containerRef = React14.useRef(null);
2948
- const renderHostRef = React14.useRef(null);
2949
- const renderSequenceRef = React14.useRef(0);
2950
- const copyResetTimeoutRef = React14.useRef(null);
2951
- const diagramId = React14.useId().replace(/:/g, "");
2952
- const [activeTab, setActiveTab] = React14.useState("diagram");
2953
- const [isCopied, setIsCopied] = React14.useState(false);
2954
- const [isPreviewOpen, setIsPreviewOpen] = React14.useState(false);
2955
- const [isRendering, setIsRendering] = React14.useState(true);
2956
- const [renderError, setRenderError] = React14.useState(null);
2957
- const [svgMarkup, setSvgMarkup] = React14.useState(null);
2958
- const normalizedCode = React14.useMemo(() => normalizeMermaidCode(code), [code]);
2959
- const clearCopyResetTimeout = React14.useCallback(() => {
3079
+ const containerRef = React15.useRef(null);
3080
+ const renderHostRef = React15.useRef(null);
3081
+ const renderSequenceRef = React15.useRef(0);
3082
+ const copyResetTimeoutRef = React15.useRef(null);
3083
+ const diagramId = React15.useId().replace(/:/g, "");
3084
+ const [activeTab, setActiveTab] = React15.useState("diagram");
3085
+ const [isCopied, setIsCopied] = React15.useState(false);
3086
+ const [isPreviewOpen, setIsPreviewOpen] = React15.useState(false);
3087
+ const [isRendering, setIsRendering] = React15.useState(true);
3088
+ const [renderError, setRenderError] = React15.useState(null);
3089
+ const [svgMarkup, setSvgMarkup] = React15.useState(null);
3090
+ const normalizedCode = React15.useMemo(() => normalizeMermaidCode(code), [code]);
3091
+ const clearCopyResetTimeout = React15.useCallback(() => {
2960
3092
  if (copyResetTimeoutRef.current === null) return;
2961
3093
  window.clearTimeout(copyResetTimeoutRef.current);
2962
3094
  copyResetTimeoutRef.current = null;
2963
3095
  }, []);
2964
- React14.useEffect(() => {
3096
+ React15.useEffect(() => {
2965
3097
  let isActive = true;
2966
3098
  async function runRender() {
2967
3099
  const container = containerRef.current;
@@ -2999,17 +3131,17 @@ function MermaidBlock({ code }) {
2999
3131
  }
3000
3132
  };
3001
3133
  }, [diagramId, isDarkMode, normalizedCode, theme]);
3002
- React14.useEffect(() => {
3134
+ React15.useEffect(() => {
3003
3135
  clearCopyResetTimeout();
3004
3136
  setIsCopied(false);
3005
3137
  }, [activeTab, clearCopyResetTimeout, code]);
3006
- React14.useEffect(
3138
+ React15.useEffect(
3007
3139
  () => () => {
3008
3140
  clearCopyResetTimeout();
3009
3141
  },
3010
3142
  [clearCopyResetTimeout]
3011
3143
  );
3012
- const handleDownload = React14.useCallback(() => {
3144
+ const handleDownload = React15.useCallback(() => {
3013
3145
  if (!svgMarkup) return;
3014
3146
  const blob = new Blob([svgMarkup], {
3015
3147
  type: "image/svg+xml;charset=utf-8"
@@ -3023,7 +3155,7 @@ function MermaidBlock({ code }) {
3023
3155
  anchor.remove();
3024
3156
  window.URL.revokeObjectURL(url);
3025
3157
  }, [diagramId, svgMarkup]);
3026
- const handleCopyCode = React14.useCallback(() => {
3158
+ const handleCopyCode = React15.useCallback(() => {
3027
3159
  if (!code || isCopied) return;
3028
3160
  navigator.clipboard.writeText(code).then(() => {
3029
3161
  setIsCopied(true);
@@ -3037,21 +3169,21 @@ function MermaidBlock({ code }) {
3037
3169
  }, [clearCopyResetTimeout, code, isCopied]);
3038
3170
  const hasRenderedDiagram = svgMarkup !== null && !renderError;
3039
3171
  const statusMessage = isRendering ? t("markdown.mermaid.rendering") : t("markdown.mermaid.failed");
3040
- return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_jsx_runtime18.Fragment, { children: [
3041
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
3172
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_jsx_runtime19.Fragment, { children: [
3173
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
3042
3174
  Tabs,
3043
3175
  {
3044
3176
  className: "w-full",
3045
3177
  onValueChange: (value) => setActiveTab(value),
3046
3178
  value: activeTab,
3047
- children: /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
3179
+ children: /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
3048
3180
  "div",
3049
3181
  {
3050
3182
  ref: containerRef,
3051
3183
  "data-slot": "mermaid-block",
3052
3184
  className: "relative overflow-hidden text-card-foreground",
3053
3185
  children: [
3054
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
3186
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
3055
3187
  "div",
3056
3188
  {
3057
3189
  ref: renderHostRef,
@@ -3060,62 +3192,62 @@ function MermaidBlock({ code }) {
3060
3192
  "data-slot": "mermaid-render-host"
3061
3193
  }
3062
3194
  ),
3063
- /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "flex flex-wrap items-center justify-between gap-3 px-4 py-3", children: [
3064
- /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "flex min-w-0 items-center gap-3", children: [
3065
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "inline-flex size-9 shrink-0 items-center justify-center rounded-full bg-muted text-foreground", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_lucide_react6.Code2Icon, { className: "size-4" }) }),
3066
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "truncate text-base font-semibold text-foreground", children: t("markdown.mermaid.title") })
3195
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "flex flex-wrap items-center justify-between gap-3 px-4 py-3", children: [
3196
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "flex min-w-0 items-center gap-3", children: [
3197
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "inline-flex size-9 shrink-0 items-center justify-center rounded-full bg-muted text-foreground", children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lucide_react7.Code2Icon, { className: "size-4" }) }),
3198
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "truncate text-base font-semibold text-foreground", children: t("markdown.mermaid.title") })
3067
3199
  ] }),
3068
- /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "flex shrink-0 items-center gap-2", children: [
3069
- /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "flex items-center gap-1", children: [
3070
- activeTab === "diagram" && hasRenderedDiagram ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
3200
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "flex shrink-0 items-center gap-2", children: [
3201
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "flex items-center gap-1", children: [
3202
+ activeTab === "diagram" && hasRenderedDiagram ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
3071
3203
  TooltipIconButton,
3072
3204
  {
3073
3205
  onClick: handleDownload,
3074
3206
  tooltip: t("markdown.mermaid.download"),
3075
- children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_lucide_react6.DownloadIcon, { className: "size-4" })
3207
+ children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lucide_react7.DownloadIcon, { className: "size-4" })
3076
3208
  }
3077
3209
  ) : null,
3078
- activeTab === "diagram" && hasRenderedDiagram ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
3210
+ activeTab === "diagram" && hasRenderedDiagram ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
3079
3211
  TooltipIconButton,
3080
3212
  {
3081
3213
  onClick: () => setIsPreviewOpen(true),
3082
3214
  tooltip: t("markdown.mermaid.fullScreen"),
3083
- children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_lucide_react6.ExpandIcon, { className: "size-4" })
3215
+ children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lucide_react7.ExpandIcon, { className: "size-4" })
3084
3216
  }
3085
3217
  ) : null,
3086
- activeTab === "code" ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
3218
+ activeTab === "code" ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
3087
3219
  TooltipIconButton,
3088
3220
  {
3089
3221
  onClick: handleCopyCode,
3090
3222
  tooltip: t("markdown.copy"),
3091
- children: isCopied ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_lucide_react6.CheckIcon, { className: "size-4" }) : /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_lucide_react6.CopyIcon, { className: "size-4" })
3223
+ children: isCopied ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lucide_react7.CheckIcon, { className: "size-4" }) : /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lucide_react7.CopyIcon, { className: "size-4" })
3092
3224
  }
3093
3225
  ) : null
3094
3226
  ] }),
3095
- /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(TabsList, { children: [
3096
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(TabsTrigger, { value: "diagram", children: t("markdown.mermaid.diagram") }),
3097
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(TabsTrigger, { value: "code", children: t("markdown.mermaid.code") })
3227
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(TabsList, { children: [
3228
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(TabsTrigger, { value: "diagram", children: t("markdown.mermaid.diagram") }),
3229
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(TabsTrigger, { value: "code", children: t("markdown.mermaid.code") })
3098
3230
  ] })
3099
3231
  ] })
3100
3232
  ] }),
3101
- /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "border-t border-border pt-4", children: [
3102
- renderError ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("p", { role: "alert", className: "mb-4 text-sm font-medium text-destructive", children: t("markdown.mermaid.failed") }) : null,
3103
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(TabsContent, { value: "diagram", className: "mt-0 space-y-4", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
3233
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "border-t border-border pt-4", children: [
3234
+ renderError ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("p", { role: "alert", className: "mb-4 text-sm font-medium text-destructive", children: t("markdown.mermaid.failed") }) : null,
3235
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(TabsContent, { value: "diagram", className: "mt-0 space-y-4", children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
3104
3236
  "div",
3105
3237
  {
3106
3238
  className: cn(
3107
3239
  "relative overflow-auto rounded-[calc(var(--radius)+0.5rem)] border border-border bg-background p-4",
3108
3240
  hasRenderedDiagram ? "[&_svg]:mx-auto [&_svg]:h-auto [&_svg]:w-full [&_svg]:max-w-none" : "min-h-[14rem]"
3109
3241
  ),
3110
- children: hasRenderedDiagram ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
3242
+ children: hasRenderedDiagram ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
3111
3243
  "div",
3112
3244
  {
3113
3245
  "data-slot": "mermaid-diagram",
3114
3246
  dangerouslySetInnerHTML: { __html: svgMarkup }
3115
3247
  }
3116
- ) : /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "flex min-h-[12rem] flex-col items-center justify-center gap-3 text-center text-muted-foreground", children: [
3117
- isRendering ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_lucide_react6.Loader2, { className: "size-5 animate-spin" }) : /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_lucide_react6.TriangleAlert, { className: "size-5 text-destructive" }),
3118
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
3248
+ ) : /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "flex min-h-[12rem] flex-col items-center justify-center gap-3 text-center text-muted-foreground", children: [
3249
+ isRendering ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lucide_react7.Loader2, { className: "size-5 animate-spin" }) : /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lucide_react7.TriangleAlert, { className: "size-5 text-destructive" }),
3250
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
3119
3251
  "p",
3120
3252
  {
3121
3253
  className: cn("text-sm font-medium", !isRendering && "text-destructive"),
@@ -3126,12 +3258,12 @@ function MermaidBlock({ code }) {
3126
3258
  ] })
3127
3259
  }
3128
3260
  ) }),
3129
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(TabsContent, { value: "code", className: "mt-0", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
3261
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(TabsContent, { value: "code", className: "mt-0", children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
3130
3262
  "pre",
3131
3263
  {
3132
3264
  "data-slot": "mermaid-code",
3133
3265
  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",
3134
- children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("code", { className: "block whitespace-pre font-mono", children: code })
3266
+ children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("code", { className: "block whitespace-pre font-mono", children: code })
3135
3267
  }
3136
3268
  ) })
3137
3269
  ] })
@@ -3140,7 +3272,7 @@ function MermaidBlock({ code }) {
3140
3272
  )
3141
3273
  }
3142
3274
  ),
3143
- svgMarkup ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
3275
+ svgMarkup ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
3144
3276
  MermaidPreviewDialog,
3145
3277
  {
3146
3278
  closeLabel: t("sheet.close"),
@@ -3155,7 +3287,13 @@ function MermaidBlock({ code }) {
3155
3287
 
3156
3288
  // src/components/thread/markdown-text.tsx
3157
3289
  var import_katex_min = require("katex/dist/katex.min.css");
3158
- var import_jsx_runtime19 = require("react/jsx-runtime");
3290
+ var import_jsx_runtime20 = require("react/jsx-runtime");
3291
+ var markdownTableMinWidth = "max(7rem, calc(8rem * var(--density-spacing, 1)))";
3292
+ var markdownTableCellPaddingInline = "calc(var(--density-padding, 1rem) * 1.25)";
3293
+ var markdownTableCellPaddingBlock = "max(0.5rem, calc(var(--density-padding, 1rem) * 0.75))";
3294
+ var markdownTableLineHeight = "max(1.375rem, calc(1.5rem * var(--density-spacing, 1)))";
3295
+ var markdownInlineCodePaddingInline = "max(0.25rem, calc(var(--density-gap, 0.5rem) * 0.75))";
3296
+ var markdownInlineCodePaddingBlock = "max(0.125rem, calc(var(--density-gap, 0.5rem) * 0.5))";
3159
3297
  var getTextContent = (children) => import_react6.Children.toArray(children).map((child) => {
3160
3298
  if (typeof child === "string" || typeof child === "number") {
3161
3299
  return String(child);
@@ -3184,23 +3322,23 @@ var CodeHeader = ({ language, code }) => {
3184
3322
  if (!code || isCopied) return;
3185
3323
  copyToClipboard(code);
3186
3324
  };
3187
- return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("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: [
3188
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "lowercase [&>span]:text-xs", children: language }),
3189
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
3325
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("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: [
3326
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: "lowercase [&>span]:text-xs", children: language }),
3327
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
3190
3328
  TooltipIconButton,
3191
3329
  {
3192
3330
  tooltip: t("markdown.copy"),
3193
3331
  onClick: onCopy,
3194
3332
  children: [
3195
- !isCopied && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lucide_react7.CopyIcon, {}),
3196
- isCopied && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lucide_react7.CheckIcon, {})
3333
+ !isCopied && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_lucide_react8.CopyIcon, {}),
3334
+ isCopied && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_lucide_react8.CheckIcon, {})
3197
3335
  ]
3198
3336
  }
3199
3337
  )
3200
3338
  ] });
3201
3339
  };
3202
3340
  var defaultComponents = {
3203
- h1: ({ className, node: _node, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
3341
+ h1: ({ className, node: _node, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
3204
3342
  "h1",
3205
3343
  {
3206
3344
  className: cn(
@@ -3210,7 +3348,7 @@ var defaultComponents = {
3210
3348
  ...props
3211
3349
  }
3212
3350
  ),
3213
- h2: ({ className, node: _node, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
3351
+ h2: ({ className, node: _node, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
3214
3352
  "h2",
3215
3353
  {
3216
3354
  className: cn(
@@ -3220,7 +3358,7 @@ var defaultComponents = {
3220
3358
  ...props
3221
3359
  }
3222
3360
  ),
3223
- h3: ({ className, node: _node, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
3361
+ h3: ({ className, node: _node, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
3224
3362
  "h3",
3225
3363
  {
3226
3364
  className: cn(
@@ -3230,7 +3368,7 @@ var defaultComponents = {
3230
3368
  ...props
3231
3369
  }
3232
3370
  ),
3233
- h4: ({ className, node: _node, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
3371
+ h4: ({ className, node: _node, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
3234
3372
  "h4",
3235
3373
  {
3236
3374
  className: cn(
@@ -3240,7 +3378,7 @@ var defaultComponents = {
3240
3378
  ...props
3241
3379
  }
3242
3380
  ),
3243
- h5: ({ className, node: _node, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
3381
+ h5: ({ className, node: _node, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
3244
3382
  "h5",
3245
3383
  {
3246
3384
  className: cn(
@@ -3250,21 +3388,21 @@ var defaultComponents = {
3250
3388
  ...props
3251
3389
  }
3252
3390
  ),
3253
- h6: ({ className, node: _node, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
3391
+ h6: ({ className, node: _node, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
3254
3392
  "h6",
3255
3393
  {
3256
3394
  className: cn("my-4 font-semibold first:mt-0 last:mb-0", className),
3257
3395
  ...props
3258
3396
  }
3259
3397
  ),
3260
- p: ({ className, node: _node, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
3398
+ p: ({ className, node: _node, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
3261
3399
  "p",
3262
3400
  {
3263
3401
  className: cn("mt-5 mb-5 leading-7 first:mt-0 last:mb-0", className),
3264
3402
  ...props
3265
3403
  }
3266
3404
  ),
3267
- a: ({ className, node: _node, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
3405
+ a: ({ className, node: _node, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
3268
3406
  "a",
3269
3407
  {
3270
3408
  className: cn(
@@ -3280,7 +3418,7 @@ var defaultComponents = {
3280
3418
  className,
3281
3419
  node: _node,
3282
3420
  ...props
3283
- }) => /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
3421
+ }) => /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
3284
3422
  "blockquote",
3285
3423
  {
3286
3424
  className: cn(
@@ -3290,21 +3428,21 @@ var defaultComponents = {
3290
3428
  ...props
3291
3429
  }
3292
3430
  ),
3293
- ul: ({ className, node: _node, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
3431
+ ul: ({ className, node: _node, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
3294
3432
  "ul",
3295
3433
  {
3296
3434
  className: cn("my-5 list-outside list-disc pl-6 [&>li]:mt-2", className),
3297
3435
  ...props
3298
3436
  }
3299
3437
  ),
3300
- ol: ({ className, node: _node, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
3438
+ ol: ({ className, node: _node, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
3301
3439
  "ol",
3302
3440
  {
3303
3441
  className: cn("my-5 list-outside list-decimal pl-8 [&>li]:mt-2", className),
3304
3442
  ...props
3305
3443
  }
3306
3444
  ),
3307
- hr: ({ className, node: _node, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
3445
+ hr: ({ className, node: _node, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
3308
3446
  "hr",
3309
3447
  {
3310
3448
  className: cn("my-5 border-b", className),
@@ -3314,55 +3452,89 @@ var defaultComponents = {
3314
3452
  table: ({
3315
3453
  className,
3316
3454
  node: _node,
3455
+ style,
3317
3456
  ...props
3318
- }) => /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
3319
- "table",
3457
+ }) => /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
3458
+ "div",
3320
3459
  {
3321
- className: cn(
3322
- "my-5 w-full border-separate border-spacing-0 overflow-y-auto",
3323
- className
3324
- ),
3325
- ...props
3460
+ "data-slot": "markdown-table-container",
3461
+ className: "my-5 max-w-full overflow-x-auto rounded-xl border border-border bg-background",
3462
+ children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
3463
+ "table",
3464
+ {
3465
+ className: cn(
3466
+ "min-w-full w-max border-separate border-spacing-0 text-sm",
3467
+ className
3468
+ ),
3469
+ style: {
3470
+ lineHeight: markdownTableLineHeight,
3471
+ ...style
3472
+ },
3473
+ ...props
3474
+ }
3475
+ )
3326
3476
  }
3327
3477
  ),
3328
- th: ({ className, node: _node, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
3478
+ th: ({
3479
+ className,
3480
+ node: _node,
3481
+ style,
3482
+ ...props
3483
+ }) => /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
3329
3484
  "th",
3330
3485
  {
3331
3486
  className: cn(
3332
- "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",
3487
+ "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",
3333
3488
  className
3334
3489
  ),
3490
+ style: {
3491
+ minWidth: markdownTableMinWidth,
3492
+ paddingInline: markdownTableCellPaddingInline,
3493
+ paddingBlock: markdownTableCellPaddingBlock,
3494
+ ...style
3495
+ },
3335
3496
  ...props
3336
3497
  }
3337
3498
  ),
3338
- td: ({ className, node: _node, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
3499
+ td: ({
3500
+ className,
3501
+ node: _node,
3502
+ style,
3503
+ ...props
3504
+ }) => /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
3339
3505
  "td",
3340
3506
  {
3341
3507
  className: cn(
3342
- "border-border border-b border-l px-4 py-2 text-left last:border-r [&[align=center]]:text-center [&[align=right]]:text-right",
3508
+ "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]",
3343
3509
  className
3344
3510
  ),
3511
+ style: {
3512
+ minWidth: markdownTableMinWidth,
3513
+ paddingInline: markdownTableCellPaddingInline,
3514
+ paddingBlock: markdownTableCellPaddingBlock,
3515
+ ...style
3516
+ },
3345
3517
  ...props
3346
3518
  }
3347
3519
  ),
3348
- tr: ({ className, node: _node, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
3520
+ tr: ({ className, node: _node, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
3349
3521
  "tr",
3350
3522
  {
3351
3523
  className: cn(
3352
- "m-0 p-0 even:bg-muted/50 [&:last-child>td:first-child]:rounded-bl-lg [&:last-child>td:last-child]:rounded-br-lg",
3524
+ "m-0 p-0 even:bg-muted/30 [&:last-child>td:first-child]:rounded-bl-xl [&:last-child>td:last-child]:rounded-br-xl",
3353
3525
  className
3354
3526
  ),
3355
3527
  ...props
3356
3528
  }
3357
3529
  ),
3358
- sup: ({ className, node: _node, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
3530
+ sup: ({ className, node: _node, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
3359
3531
  "sup",
3360
3532
  {
3361
3533
  className: cn("[&>a]:text-xs [&>a]:no-underline", className),
3362
3534
  ...props
3363
3535
  }
3364
3536
  ),
3365
- pre: ({ className, children, node: _node }) => import_react6.Children.toArray(children).length === 1 && (isMermaidBlockChild(import_react6.Children.toArray(children)[0]) || isMermaidCodeElement(import_react6.Children.toArray(children)[0])) ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_jsx_runtime19.Fragment, { children }) : /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
3537
+ pre: ({ className, children, node: _node }) => import_react6.Children.toArray(children).length === 1 && (isMermaidBlockChild(import_react6.Children.toArray(children)[0]) || isMermaidCodeElement(import_react6.Children.toArray(children)[0])) ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_jsx_runtime20.Fragment, { children }) : /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
3366
3538
  "div",
3367
3539
  {
3368
3540
  className: cn(
@@ -3376,6 +3548,7 @@ var defaultComponents = {
3376
3548
  className,
3377
3549
  children,
3378
3550
  node: _node,
3551
+ style,
3379
3552
  ...props
3380
3553
  }) => {
3381
3554
  const match = /language-([\w-]+)/.exec(className || "");
@@ -3385,17 +3558,17 @@ var defaultComponents = {
3385
3558
  const language = match[1];
3386
3559
  const normalizedCode = code.replace(/\n$/, "");
3387
3560
  if (language === "mermaid") {
3388
- return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(MermaidBlock, { code: normalizedCode });
3561
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(MermaidBlock, { code: normalizedCode });
3389
3562
  }
3390
- return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_jsx_runtime19.Fragment, { children: [
3391
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
3563
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_jsx_runtime20.Fragment, { children: [
3564
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
3392
3565
  CodeHeader,
3393
3566
  {
3394
3567
  language,
3395
3568
  code: normalizedCode
3396
3569
  }
3397
3570
  ),
3398
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
3571
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
3399
3572
  SyntaxHighlighter,
3400
3573
  {
3401
3574
  language,
@@ -3406,7 +3579,7 @@ var defaultComponents = {
3406
3579
  ] });
3407
3580
  }
3408
3581
  if (isBlockCode) {
3409
- return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
3582
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
3410
3583
  "code",
3411
3584
  {
3412
3585
  className: cn(
@@ -3418,13 +3591,18 @@ var defaultComponents = {
3418
3591
  }
3419
3592
  );
3420
3593
  }
3421
- return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
3594
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
3422
3595
  "code",
3423
3596
  {
3424
3597
  className: cn(
3425
- "bg-muted rounded px-1.5 py-0.5 font-mono text-[0.9em] font-semibold break-all",
3598
+ "bg-muted rounded font-mono text-[0.9em] font-semibold whitespace-pre-wrap [overflow-wrap:anywhere]",
3426
3599
  className
3427
3600
  ),
3601
+ style: {
3602
+ paddingInline: markdownInlineCodePaddingInline,
3603
+ paddingBlock: markdownInlineCodePaddingBlock,
3604
+ ...style
3605
+ },
3428
3606
  ...props,
3429
3607
  children
3430
3608
  }
@@ -3432,7 +3610,7 @@ var defaultComponents = {
3432
3610
  }
3433
3611
  };
3434
3612
  var MarkdownTextImpl = ({ children }) => {
3435
- return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "markdown-content", children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
3613
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: "markdown-content", children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
3436
3614
  import_react_markdown.default,
3437
3615
  {
3438
3616
  remarkPlugins: [import_remark_gfm.default, import_remark_math.default],
@@ -3446,18 +3624,18 @@ var MarkdownText = (0, import_react6.memo)(MarkdownTextImpl);
3446
3624
 
3447
3625
  // src/components/thread/messages/widget.tsx
3448
3626
  var import_a2ui_react = require("@xpert-ai/a2ui-react");
3449
- var import_jsx_runtime20 = require("react/jsx-runtime");
3627
+ var import_jsx_runtime21 = require("react/jsx-runtime");
3450
3628
  function WidgetMessage({ messageId, data }) {
3451
3629
  const widgets = Array.isArray(data.widgets) ? data.widgets : [];
3452
3630
  if (widgets.length === 0) return null;
3453
3631
  const baseSurfaceId = `widget-${messageId}`;
3454
- return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: "space-y-3", children: widgets.map((widget, index) => {
3632
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "space-y-3", children: widgets.map((widget, index) => {
3455
3633
  const config = widget?.config;
3456
3634
  if (!config || typeof config !== "object") {
3457
3635
  return null;
3458
3636
  }
3459
3637
  const surfaceId = widgets.length > 1 ? `${baseSurfaceId}-${index}` : baseSurfaceId;
3460
- return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
3638
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
3461
3639
  import_a2ui_react.SurfaceRenderer,
3462
3640
  {
3463
3641
  surfaceId,
@@ -3469,7 +3647,7 @@ function WidgetMessage({ messageId, data }) {
3469
3647
  }
3470
3648
 
3471
3649
  // src/components/thread/messages/ai.tsx
3472
- var import_jsx_runtime21 = require("react/jsx-runtime");
3650
+ var import_jsx_runtime22 = require("react/jsx-runtime");
3473
3651
  function isTextContent(content) {
3474
3652
  return content.type === "text";
3475
3653
  }
@@ -3485,15 +3663,15 @@ function isComponentContent(content) {
3485
3663
  var statusConfig = {
3486
3664
  success: {
3487
3665
  iconClass: "border-green-500 text-green-700",
3488
- icon: import_lucide_react8.CheckCircle2
3666
+ icon: import_lucide_react9.CheckCircle2
3489
3667
  },
3490
3668
  fail: {
3491
3669
  iconClass: "border-red-500 text-red-700",
3492
- icon: import_lucide_react8.XCircle
3670
+ icon: import_lucide_react9.XCircle
3493
3671
  },
3494
3672
  running: {
3495
3673
  iconClass: "border-blue-500 text-blue-700",
3496
- icon: import_lucide_react8.Loader2
3674
+ icon: import_lucide_react9.Loader2
3497
3675
  }
3498
3676
  };
3499
3677
  function isWidgetComponent(content) {
@@ -3516,11 +3694,11 @@ function formatDisplayValue(value) {
3516
3694
  function ReasoningBlock({ reasoning }) {
3517
3695
  const blocks = reasoning.filter((item) => item.text?.trim());
3518
3696
  if (blocks.length === 0) return null;
3519
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "space-y-2", children: blocks.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
3697
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: "space-y-2", children: blocks.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
3520
3698
  "div",
3521
3699
  {
3522
3700
  className: "rounded-lg border bg-muted/40 p-3 text-xs text-muted-foreground",
3523
- children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("p", { className: "whitespace-pre-wrap wrap-break-word leading-relaxed", children: item.text })
3701
+ children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("p", { className: "whitespace-pre-wrap wrap-break-word leading-relaxed", children: item.text })
3524
3702
  },
3525
3703
  item.id ?? `reasoning-${index}`
3526
3704
  )) });
@@ -3528,27 +3706,57 @@ function ReasoningBlock({ reasoning }) {
3528
3706
  function ImageBlock({ content }) {
3529
3707
  const imageUrl = typeof content.image_url === "string" ? content.image_url : typeof content.image_url?.url === "string" ? content.image_url.url : null;
3530
3708
  if (!imageUrl) {
3531
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(Card, { children: [
3532
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(CardHeader, { className: "space-y-1", children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(CardTitle, { className: "text-sm", children: "Image" }) }),
3533
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(CardContent, { className: "text-xs text-muted-foreground", children: safeJson(content) })
3709
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(Card, { children: [
3710
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(CardHeader, { className: "space-y-1", children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(CardTitle, { className: "text-sm", children: "Image" }) }),
3711
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(CardContent, { className: "text-xs text-muted-foreground", children: safeJson(content) })
3534
3712
  ] });
3535
3713
  }
3536
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("figure", { className: "overflow-hidden rounded-lg border bg-background", children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("img", { src: imageUrl, alt: "Assistant output", className: "h-auto w-full object-cover" }) });
3714
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("figure", { className: "overflow-hidden rounded-lg border bg-background", children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("img", { src: imageUrl, alt: "Assistant output", className: "h-auto w-full object-cover" }) });
3537
3715
  }
3538
3716
  function MemoryBlock({ content }) {
3539
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(Card, { children: [
3540
- /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(CardHeader, { className: "flex flex-row items-center justify-between gap-2", children: [
3541
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(CardTitle, { className: "text-sm", children: "Memory" }),
3542
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Badge, { variant: "secondary", children: "Memory" })
3717
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(Card, { children: [
3718
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(CardHeader, { className: "flex flex-row items-center justify-between gap-2", children: [
3719
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(CardTitle, { className: "text-sm", children: "Memory" }),
3720
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Badge, { variant: "secondary", children: "Memory" })
3543
3721
  ] }),
3544
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(CardContent, { className: "text-xs text-muted-foreground", children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("pre", { className: "whitespace-pre-wrap wrap-break-word", children: safeJson(content.data ?? []) }) })
3722
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(CardContent, { className: "text-xs text-muted-foreground", children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("pre", { className: "whitespace-pre-wrap wrap-break-word", children: safeJson(content.data ?? []) }) })
3545
3723
  ] });
3546
3724
  }
3725
+ function parseStepDate(value) {
3726
+ if (value instanceof Date) {
3727
+ const timestamp2 = value.getTime();
3728
+ return Number.isNaN(timestamp2) ? null : timestamp2;
3729
+ }
3730
+ if (typeof value !== "string") {
3731
+ return null;
3732
+ }
3733
+ const timestamp = Date.parse(value);
3734
+ return Number.isNaN(timestamp) ? null : timestamp;
3735
+ }
3736
+ function formatStepDuration(durationMs) {
3737
+ if (durationMs < 1e3) {
3738
+ return `${durationMs}ms`;
3739
+ }
3740
+ if (durationMs < 1e4) {
3741
+ return `${(durationMs / 1e3).toFixed(1)}s`;
3742
+ }
3743
+ if (durationMs < 6e4) {
3744
+ return `${Math.round(durationMs / 1e3)}s`;
3745
+ }
3746
+ const hours = Math.floor(durationMs / 36e5);
3747
+ const minutes = Math.floor(durationMs % 36e5 / 6e4);
3748
+ const seconds = Math.floor(durationMs % 6e4 / 1e3);
3749
+ if (hours > 0) {
3750
+ return `${hours}h ${minutes}m ${seconds}s`;
3751
+ }
3752
+ return `${minutes}m ${seconds}s`;
3753
+ }
3547
3754
  function ComponentBlock({ content }) {
3548
- const [isExpanded, setIsExpanded] = React15.useState(false);
3549
- const contentRef = React15.useRef(null);
3550
- const shouldAutoScrollRef = React15.useRef(true);
3551
- const previousScrollTopRef = React15.useRef(0);
3755
+ const [isExpanded, setIsExpanded] = React16.useState(false);
3756
+ const contentRef = React16.useRef(null);
3757
+ const shouldAutoScrollRef = React16.useRef(true);
3758
+ const previousScrollTopRef = React16.useRef(0);
3759
+ const [durationNow, setDurationNow] = React16.useState(() => Date.now());
3552
3760
  const data = content.data ?? {};
3553
3761
  const category = data.category ?? "Component";
3554
3762
  const title = data.tool && category === "Tool" ? data.tool : data.title ?? data.type ?? "Component";
@@ -3558,10 +3766,26 @@ function ComponentBlock({ content }) {
3558
3766
  const error = data.error ?? null;
3559
3767
  const fallback = message ?? output ?? data.data ?? data;
3560
3768
  const hasOutput = message !== null || output !== null;
3561
- React15.useEffect(() => {
3769
+ const createdAt = parseStepDate(data.created_date);
3770
+ const endedAt = parseStepDate(data.end_date);
3771
+ const durationMs = createdAt === null ? null : Math.max(0, (endedAt ?? durationNow) - createdAt);
3772
+ const durationLabel = durationMs === null ? null : formatStepDuration(durationMs);
3773
+ React16.useEffect(() => {
3562
3774
  if (status === "running" && output !== null) setIsExpanded(true);
3563
3775
  }, [status, output]);
3564
- React15.useEffect(() => {
3776
+ React16.useEffect(() => {
3777
+ if (status !== "running" || createdAt === null || endedAt !== null) {
3778
+ return;
3779
+ }
3780
+ setDurationNow(Date.now());
3781
+ const timer = window.setInterval(() => {
3782
+ setDurationNow(Date.now());
3783
+ }, 100);
3784
+ return () => {
3785
+ window.clearInterval(timer);
3786
+ };
3787
+ }, [createdAt, endedAt, status]);
3788
+ React16.useEffect(() => {
3565
3789
  const element = contentRef.current;
3566
3790
  if (!element) return;
3567
3791
  previousScrollTopRef.current = element.scrollTop;
@@ -3581,7 +3805,7 @@ function ComponentBlock({ content }) {
3581
3805
  element.removeEventListener("scroll", updateAutoScrollState);
3582
3806
  };
3583
3807
  }, [isExpanded]);
3584
- React15.useEffect(() => {
3808
+ React16.useEffect(() => {
3585
3809
  if (status !== "running") {
3586
3810
  shouldAutoScrollRef.current = true;
3587
3811
  return;
@@ -3594,21 +3818,25 @@ function ComponentBlock({ content }) {
3594
3818
  }, [isExpanded, output, status]);
3595
3819
  const config = status ? statusConfig[status] : null;
3596
3820
  const StatusIcon = config?.icon;
3597
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(Card, { children: [
3598
- /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(CardHeader, { className: "flex flex-row items-center justify-between gap-2 px-2 py-1 cursor-pointer", onClick: () => setIsExpanded(!isExpanded), children: [
3599
- /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "flex items-center space-x-1 flex-1 min-w-0", children: [
3600
- status && StatusIcon && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(StatusIcon, { className: cn("h-4 w-4", config?.iconClass, status === "running" && "animate-spin") }),
3601
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(CardTitle, { className: "text-sm truncate", children: title })
3821
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(Card, { children: [
3822
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(CardHeader, { className: "flex flex-row items-center justify-between gap-2 px-2 py-1 cursor-pointer", onClick: () => setIsExpanded(!isExpanded), children: [
3823
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "flex items-center space-x-1 flex-1 min-w-0", children: [
3824
+ status && StatusIcon && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(StatusIcon, { className: cn("h-4 w-4", config?.iconClass, status === "running" && "animate-spin") }),
3825
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(CardTitle, { className: "text-sm truncate", children: title })
3602
3826
  ] }),
3603
- /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "flex flex-wrap items-center gap-2 shrink-0", children: [
3604
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Badge, { variant: "secondary", className: "rounded-lg px-1.5", children: category }),
3605
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
3827
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "flex flex-wrap items-center gap-2 shrink-0", children: [
3828
+ durationLabel && /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "inline-flex items-center gap-1 text-[11px] text-muted-foreground tabular-nums", children: [
3829
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_lucide_react9.Clock3, { className: "h-3 w-3" }),
3830
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { children: durationLabel })
3831
+ ] }),
3832
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Badge, { variant: "secondary", className: "rounded-lg px-1.5", children: category }),
3833
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
3606
3834
  "button",
3607
3835
  {
3608
3836
  className: "text-muted-foreground hover:text-foreground transition-colors",
3609
3837
  "aria-label": isExpanded ? "Collapse" : "Expand",
3610
- children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
3611
- import_lucide_react8.ChevronDown,
3838
+ children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
3839
+ import_lucide_react9.ChevronDown,
3612
3840
  {
3613
3841
  className: cn("h-4 w-4 transition-transform", isExpanded && "rotate-180")
3614
3842
  }
@@ -3617,55 +3845,55 @@ function ComponentBlock({ content }) {
3617
3845
  )
3618
3846
  ] })
3619
3847
  ] }),
3620
- isExpanded && /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(CardContent, { ref: contentRef, className: "text-xs text-muted-foreground max-h-60 overflow-auto", children: [
3621
- data.input && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("pre", { className: "whitespace-pre-wrap wrap-break-word", children: formatDisplayValue(data.input) }),
3622
- error ? /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("pre", { className: "whitespace-pre-wrap wrap-break-word text-destructive", children: formatDisplayValue(error) }) : hasOutput && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("pre", { className: "whitespace-pre-wrap wrap-break-word", children: formatDisplayValue(fallback) })
3848
+ isExpanded && /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(CardContent, { ref: contentRef, className: "text-xs text-muted-foreground max-h-60 overflow-auto", children: [
3849
+ data.input && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("pre", { className: "whitespace-pre-wrap wrap-break-word", children: formatDisplayValue(data.input) }),
3850
+ error ? /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("pre", { className: "whitespace-pre-wrap wrap-break-word text-destructive", children: formatDisplayValue(error) }) : hasOutput && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("pre", { className: "whitespace-pre-wrap wrap-break-word", children: formatDisplayValue(fallback) })
3623
3851
  ] })
3624
3852
  ] });
3625
3853
  }
3626
3854
  function UnknownBlock({ content }) {
3627
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(Card, { children: [
3628
- /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(CardHeader, { className: "flex flex-row items-center justify-between gap-2", children: [
3629
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(CardTitle, { className: "text-sm", children: "Assistant Content" }),
3630
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Badge, { variant: "outline", children: content.type ?? "unknown" })
3855
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(Card, { children: [
3856
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(CardHeader, { className: "flex flex-row items-center justify-between gap-2", children: [
3857
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(CardTitle, { className: "text-sm", children: "Assistant Content" }),
3858
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Badge, { variant: "outline", children: content.type ?? "unknown" })
3631
3859
  ] }),
3632
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(CardContent, { className: "text-xs text-muted-foreground", children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("pre", { className: "whitespace-pre-wrap break-words", children: safeJson(content) }) })
3860
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(CardContent, { className: "text-xs text-muted-foreground", children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("pre", { className: "whitespace-pre-wrap break-words", children: safeJson(content) }) })
3633
3861
  ] });
3634
3862
  }
3635
3863
  function renderContentItem(content, index, messageId) {
3636
3864
  if (typeof content === "string") {
3637
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { children: [
3638
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(MarkdownText, { children: content }),
3865
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { children: [
3866
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(MarkdownText, { children: content }),
3639
3867
  ";"
3640
3868
  ] }, `text-${index}`);
3641
3869
  }
3642
3870
  if (isTextContent(content)) {
3643
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(MarkdownText, { children: content.text }) }, content.id ?? `text-${index}`);
3871
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(MarkdownText, { children: content.text }) }, content.id ?? `text-${index}`);
3644
3872
  }
3645
3873
  if (isReasoningContent(content)) {
3646
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(ReasoningBlock, { reasoning: [content] }) }, content.id ?? `reasoning-${index}`);
3874
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(ReasoningBlock, { reasoning: [content] }) }, content.id ?? `reasoning-${index}`);
3647
3875
  }
3648
3876
  if (isImageContent(content)) {
3649
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(ImageBlock, { content }) }, content.id ?? `image-${index}`);
3877
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(ImageBlock, { content }) }, content.id ?? `image-${index}`);
3650
3878
  }
3651
3879
  if (isComponentContent(content)) {
3652
3880
  if (isWidgetComponent(content)) {
3653
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(WidgetMessage, { messageId, data: content.data }) }, content.id ?? `widget-${index}`);
3881
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(WidgetMessage, { messageId, data: content.data }) }, content.id ?? `widget-${index}`);
3654
3882
  }
3655
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(ComponentBlock, { content }) }, content.id ?? `component-${index}`);
3883
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(ComponentBlock, { content }) }, content.id ?? `component-${index}`);
3656
3884
  }
3657
3885
  if (isMemoryContent(content)) {
3658
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(MemoryBlock, { content }) }, content.id ?? `memory-${index}`);
3886
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(MemoryBlock, { content }) }, content.id ?? `memory-${index}`);
3659
3887
  }
3660
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(UnknownBlock, { content }) }, content.id ?? `unknown-${index}`);
3888
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(UnknownBlock, { content }) }, content.id ?? `unknown-${index}`);
3661
3889
  }
3662
3890
  function renderContent(content, messageId) {
3663
3891
  if (typeof content === "string") {
3664
3892
  if (!content.trim()) return null;
3665
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(MarkdownText, { children: content });
3893
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(MarkdownText, { children: content });
3666
3894
  }
3667
3895
  if (!Array.isArray(content) || content.length === 0) return null;
3668
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "space-y-3", children: content.map((item, index) => renderContentItem(item, index, messageId)) });
3896
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: "space-y-3", children: content.map((item, index) => renderContentItem(item, index, messageId)) });
3669
3897
  }
3670
3898
  function AssistantStreamingIndicator({
3671
3899
  status,
@@ -3677,19 +3905,19 @@ function AssistantStreamingIndicator({
3677
3905
  thinking: t("message.thinking"),
3678
3906
  answering: t("message.answering")
3679
3907
  };
3680
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: cn("flex items-center gap-2 text-xs text-muted-foreground", className), children: [
3681
- status === "loading" && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_lucide_react8.Loader2, { className: "h-3.5 w-3.5 animate-spin" }),
3682
- status === "thinking" && /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "flex items-end gap-1", "aria-hidden": "true", children: [
3683
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "h-1.5 w-1.5 rounded-full bg-current animate-bounce [animation-delay:-0.3s]" }),
3684
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "h-1.5 w-1.5 rounded-full bg-current animate-bounce [animation-delay:-0.15s]" }),
3685
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "h-1.5 w-1.5 rounded-full bg-current animate-bounce" })
3908
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: cn("flex items-center gap-2 text-xs text-muted-foreground", className), children: [
3909
+ status === "loading" && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_lucide_react9.Loader2, { className: "h-3.5 w-3.5 animate-spin" }),
3910
+ status === "thinking" && /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "flex items-end gap-1", "aria-hidden": "true", children: [
3911
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { className: "h-1.5 w-1.5 rounded-full bg-current animate-bounce [animation-delay:-0.3s]" }),
3912
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { className: "h-1.5 w-1.5 rounded-full bg-current animate-bounce [animation-delay:-0.15s]" }),
3913
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { className: "h-1.5 w-1.5 rounded-full bg-current animate-bounce" })
3686
3914
  ] }),
3687
- status === "answering" && /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "flex items-end gap-1", "aria-hidden": "true", children: [
3688
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "h-2 w-0.5 rounded-full bg-current animate-pulse [animation-delay:-0.25s]" }),
3689
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "h-3 w-0.5 rounded-full bg-current animate-pulse [animation-delay:-0.1s]" }),
3690
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "h-2.5 w-0.5 rounded-full bg-current animate-pulse" })
3915
+ status === "answering" && /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "flex items-end gap-1", "aria-hidden": "true", children: [
3916
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { className: "h-2 w-0.5 rounded-full bg-current animate-pulse [animation-delay:-0.25s]" }),
3917
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { className: "h-3 w-0.5 rounded-full bg-current animate-pulse [animation-delay:-0.1s]" }),
3918
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { className: "h-2.5 w-0.5 rounded-full bg-current animate-pulse" })
3691
3919
  ] }),
3692
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { children: labelMap[status] })
3920
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { children: labelMap[status] })
3693
3921
  ] });
3694
3922
  }
3695
3923
  function AssistantMessage({
@@ -3703,42 +3931,42 @@ function AssistantMessage({
3703
3931
  const hasReasoning = hasRenderableReasoning(message.reasoning);
3704
3932
  const resolvedStreamingStatus = streamingStatus ?? getAssistantStreamingStatus(message, isStreaming);
3705
3933
  const answerNode = renderContent(message.content, message.id);
3706
- const reasoningNode = hasReasoning ? /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(ReasoningBlock, { reasoning: message.reasoning ?? [] }) : null;
3934
+ const reasoningNode = hasReasoning ? /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(ReasoningBlock, { reasoning: message.reasoning ?? [] }) : null;
3707
3935
  if (!hasRenderableAssistantMessage(message) && !resolvedStreamingStatus) return null;
3708
3936
  const streamingClass = isStreaming ? "streaming-active" : "";
3709
3937
  if (!hasRenderableAssistantMessage(message) && resolvedStreamingStatus) {
3710
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: cn("space-y-3", streamingClass, className), children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(AssistantStreamingIndicator, { status: resolvedStreamingStatus }) });
3938
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: cn("space-y-3", streamingClass, className), children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(AssistantStreamingIndicator, { status: resolvedStreamingStatus }) });
3711
3939
  }
3712
3940
  if (hasContent && hasReasoning) {
3713
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: cn("space-y-3", streamingClass, className), children: [
3714
- /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
3941
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: cn("space-y-3", streamingClass, className), children: [
3942
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
3715
3943
  Tabs,
3716
3944
  {
3717
3945
  defaultValue: message.status === "reasoning" ? "reasoning" : "answer",
3718
3946
  className: "w-full",
3719
3947
  children: [
3720
- /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(TabsList, { className: "", children: [
3721
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(TabsTrigger, { value: "answer", children: t("message.answer") }),
3722
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(TabsTrigger, { value: "reasoning", children: t("message.reasoning") })
3948
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(TabsList, { className: "", children: [
3949
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(TabsTrigger, { value: "answer", children: t("message.answer") }),
3950
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(TabsTrigger, { value: "reasoning", children: t("message.reasoning") })
3723
3951
  ] }),
3724
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(TabsContent, { value: "answer", className: "space-y-3", children: answerNode }),
3725
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(TabsContent, { value: "reasoning", className: "space-y-3", children: reasoningNode })
3952
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(TabsContent, { value: "answer", className: "space-y-3", children: answerNode }),
3953
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(TabsContent, { value: "reasoning", className: "space-y-3", children: reasoningNode })
3726
3954
  ]
3727
3955
  }
3728
3956
  ),
3729
- resolvedStreamingStatus ? /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(AssistantStreamingIndicator, { status: resolvedStreamingStatus }) : null
3957
+ resolvedStreamingStatus ? /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(AssistantStreamingIndicator, { status: resolvedStreamingStatus }) : null
3730
3958
  ] });
3731
3959
  }
3732
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: cn("space-y-3", streamingClass, className), children: [
3960
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: cn("space-y-3", streamingClass, className), children: [
3733
3961
  hasReasoning ? reasoningNode : answerNode,
3734
- resolvedStreamingStatus ? /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(AssistantStreamingIndicator, { status: resolvedStreamingStatus }) : null
3962
+ resolvedStreamingStatus ? /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(AssistantStreamingIndicator, { status: resolvedStreamingStatus }) : null
3735
3963
  ] });
3736
3964
  }
3737
3965
 
3738
3966
  // src/components/thread/MessageActions.tsx
3739
- var React16 = __toESM(require("react"), 1);
3740
- var import_lucide_react9 = require("lucide-react");
3741
- var import_jsx_runtime22 = require("react/jsx-runtime");
3967
+ var React17 = __toESM(require("react"), 1);
3968
+ var import_lucide_react10 = require("lucide-react");
3969
+ var import_jsx_runtime23 = require("react/jsx-runtime");
3742
3970
  function MessageActions({
3743
3971
  content,
3744
3972
  isAssistant = false,
@@ -3747,7 +3975,7 @@ function MessageActions({
3747
3975
  className
3748
3976
  }) {
3749
3977
  const { t } = useChatkitTranslation();
3750
- const [copied, setCopied] = React16.useState(false);
3978
+ const [copied, setCopied] = React17.useState(false);
3751
3979
  const handleCopy = async () => {
3752
3980
  try {
3753
3981
  await navigator.clipboard.writeText(content);
@@ -3760,7 +3988,7 @@ function MessageActions({
3760
3988
  if (isStreaming) {
3761
3989
  return null;
3762
3990
  }
3763
- return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
3991
+ return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
3764
3992
  "div",
3765
3993
  {
3766
3994
  className: cn(
@@ -3768,7 +3996,7 @@ function MessageActions({
3768
3996
  className
3769
3997
  ),
3770
3998
  children: [
3771
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
3999
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
3772
4000
  "button",
3773
4001
  {
3774
4002
  type: "button",
@@ -3778,17 +4006,17 @@ function MessageActions({
3778
4006
  copied && "text-green-500"
3779
4007
  ),
3780
4008
  title: copied ? t("messageActions.copied") : t("messageActions.copy"),
3781
- children: copied ? /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_lucide_react9.Check, { size: 14 }) : /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_lucide_react9.Copy, { size: 14 })
4009
+ children: copied ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_lucide_react10.Check, { size: 14 }) : /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_lucide_react10.Copy, { size: 14 })
3782
4010
  }
3783
4011
  ),
3784
- isAssistant && onRetry && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
4012
+ isAssistant && onRetry && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
3785
4013
  "button",
3786
4014
  {
3787
4015
  type: "button",
3788
4016
  onClick: onRetry,
3789
4017
  className: "p-1.5 rounded-md text-muted-foreground hover:text-foreground hover:bg-muted transition-colors",
3790
4018
  title: t("messageActions.regenerate"),
3791
- children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_lucide_react9.RefreshCw, { size: 14 })
4019
+ children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_lucide_react10.RefreshCw, { size: 14 })
3792
4020
  }
3793
4021
  )
3794
4022
  ]
@@ -3797,20 +4025,20 @@ function MessageActions({
3797
4025
  }
3798
4026
 
3799
4027
  // src/components/thread/StartScreen.tsx
3800
- var React17 = require("react");
3801
- var import_lucide_react10 = require("lucide-react");
3802
- var import_jsx_runtime23 = require("react/jsx-runtime");
4028
+ var React18 = require("react");
4029
+ var import_lucide_react11 = require("lucide-react");
4030
+ var import_jsx_runtime24 = require("react/jsx-runtime");
3803
4031
  function getIconComponent2(icon) {
3804
4032
  const iconMap = {
3805
- "circle-question": /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_lucide_react10.HelpCircle, { size: 20 }),
3806
- "lightbulb": /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_lucide_react10.Lightbulb, { size: 20 }),
3807
- "sparkle": /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_lucide_react10.Sparkles, { size: 20 }),
3808
- "write": /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_lucide_react10.Pencil, { size: 20 }),
3809
- "search": /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_lucide_react10.Search, { size: 20 }),
3810
- "globe": /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_lucide_react10.Globe, { size: 20 }),
3811
- "book-open": /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_lucide_react10.BookOpen, { size: 20 }),
3812
- "compass": /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_lucide_react10.Compass, { size: 20 }),
3813
- "bolt": /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_lucide_react10.Zap, { size: 20 })
4033
+ "circle-question": /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_lucide_react11.HelpCircle, { size: 20 }),
4034
+ "lightbulb": /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_lucide_react11.Lightbulb, { size: 20 }),
4035
+ "sparkle": /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_lucide_react11.Sparkles, { size: 20 }),
4036
+ "write": /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_lucide_react11.Pencil, { size: 20 }),
4037
+ "search": /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_lucide_react11.Search, { size: 20 }),
4038
+ "globe": /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_lucide_react11.Globe, { size: 20 }),
4039
+ "book-open": /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_lucide_react11.BookOpen, { size: 20 }),
4040
+ "compass": /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_lucide_react11.Compass, { size: 20 }),
4041
+ "bolt": /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_lucide_react11.Zap, { size: 20 })
3814
4042
  };
3815
4043
  return icon ? iconMap[icon] || iconMap["sparkle"] : iconMap["sparkle"];
3816
4044
  }
@@ -3818,9 +4046,9 @@ function StartScreen({ startScreen, onPromptClick, className }) {
3818
4046
  const { t } = useChatkitTranslation();
3819
4047
  const greeting = startScreen?.greeting ?? t("startScreen.greeting");
3820
4048
  const prompts = startScreen?.prompts ?? [];
3821
- return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: cn("flex flex-col items-center justify-center py-12 px-4", className), children: [
3822
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: "mb-8 text-center", children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("h2", { className: "text-2xl font-semibold text-foreground mb-2", children: greeting }) }),
3823
- prompts.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: "w-full max-w-2xl", children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: "grid grid-cols-1 sm:grid-cols-2 gap-3", children: prompts.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
4049
+ return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: cn("flex flex-col items-center justify-center py-12 px-4", className), children: [
4050
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "mb-8 text-center", children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("h2", { className: "text-2xl font-semibold text-foreground mb-2", children: greeting }) }),
4051
+ prompts.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "w-full max-w-2xl", children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "grid grid-cols-1 sm:grid-cols-2 gap-3", children: prompts.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
3824
4052
  "button",
3825
4053
  {
3826
4054
  type: "button",
@@ -3831,8 +4059,8 @@ function StartScreen({ startScreen, onPromptClick, className }) {
3831
4059
  "focus:outline-none focus:ring-2 focus:ring-primary/20"
3832
4060
  ),
3833
4061
  children: [
3834
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: "flex h-10 w-10 shrink-0 items-center justify-center rounded-lg bg-primary/10 text-primary", children: getIconComponent2(item.icon) }),
3835
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: "text-sm font-medium text-foreground", children: item.label })
4062
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { className: "flex h-10 w-10 shrink-0 items-center justify-center rounded-lg bg-primary/10 text-primary", children: getIconComponent2(item.icon) }),
4063
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { className: "text-sm font-medium text-foreground", children: item.label })
3836
4064
  ]
3837
4065
  },
3838
4066
  `prompt-${index}`
@@ -3841,13 +4069,13 @@ function StartScreen({ startScreen, onPromptClick, className }) {
3841
4069
  }
3842
4070
 
3843
4071
  // src/components/ui/chatkit-avatar.tsx
3844
- var React19 = require("react");
4072
+ var React20 = require("react");
3845
4073
 
3846
4074
  // src/components/ui/avatar.tsx
3847
- var React18 = __toESM(require("react"), 1);
4075
+ var React19 = __toESM(require("react"), 1);
3848
4076
  var AvatarPrimitive = __toESM(require("@radix-ui/react-avatar"), 1);
3849
- var import_jsx_runtime24 = require("react/jsx-runtime");
3850
- var Avatar = React18.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
4077
+ var import_jsx_runtime25 = require("react/jsx-runtime");
4078
+ var Avatar = React19.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
3851
4079
  AvatarPrimitive.Root,
3852
4080
  {
3853
4081
  ref,
@@ -3859,7 +4087,7 @@ var Avatar = React18.forwardRef(({ className, ...props }, ref) => /* @__PURE__ *
3859
4087
  }
3860
4088
  ));
3861
4089
  Avatar.displayName = AvatarPrimitive.Root.displayName;
3862
- var AvatarImage = React18.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
4090
+ var AvatarImage = React19.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
3863
4091
  AvatarPrimitive.Image,
3864
4092
  {
3865
4093
  ref,
@@ -3868,7 +4096,7 @@ var AvatarImage = React18.forwardRef(({ className, ...props }, ref) => /* @__PUR
3868
4096
  }
3869
4097
  ));
3870
4098
  AvatarImage.displayName = AvatarPrimitive.Image.displayName;
3871
- var AvatarFallback = React18.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
4099
+ var AvatarFallback = React19.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
3872
4100
  AvatarPrimitive.Fallback,
3873
4101
  {
3874
4102
  ref,
@@ -3882,7 +4110,7 @@ var AvatarFallback = React18.forwardRef(({ className, ...props }, ref) => /* @__
3882
4110
  AvatarFallback.displayName = AvatarPrimitive.Fallback.displayName;
3883
4111
 
3884
4112
  // src/components/ui/chatkit-avatar.tsx
3885
- var import_jsx_runtime25 = require("react/jsx-runtime");
4113
+ var import_jsx_runtime26 = require("react/jsx-runtime");
3886
4114
  function asRecord(value) {
3887
4115
  return value && typeof value === "object" ? value : null;
3888
4116
  }
@@ -3955,21 +4183,21 @@ function ChatkitAvatar({
3955
4183
  const fallbackStyle = {
3956
4184
  ...avatar?.background ? { background: avatar.background } : {}
3957
4185
  };
3958
- return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(Avatar, { className: cn(roundedClass, className), style, ...props, children: [
3959
- avatar?.url ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(AvatarImage, { className: imageClassName, src: avatar.url, alt: label }) : null,
3960
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
4186
+ return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(Avatar, { className: cn(roundedClass, className), style, ...props, children: [
4187
+ avatar?.url ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(AvatarImage, { className: imageClassName, src: avatar.url, alt: label }) : null,
4188
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
3961
4189
  AvatarFallback,
3962
4190
  {
3963
4191
  className: cn(roundedClass, "text-sm font-medium text-foreground", fallbackClassName),
3964
4192
  style: fallbackStyle,
3965
- children: emojiCharacter ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { className: "text-[1.1em] leading-none", style: emojiStyle, children: emojiCharacter }) : fallbackText
4193
+ children: emojiCharacter ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { className: "text-[1.1em] leading-none", style: emojiStyle, children: emojiCharacter }) : fallbackText
3966
4194
  }
3967
4195
  )
3968
4196
  ] });
3969
4197
  }
3970
4198
 
3971
4199
  // src/hooks/useThreads.ts
3972
- var React20 = __toESM(require("react"), 1);
4200
+ var React21 = __toESM(require("react"), 1);
3973
4201
  var DEFAULT_LIMIT = 50;
3974
4202
  var getThreadTitle = (threadRecord) => {
3975
4203
  const title = threadRecord.title?.trim();
@@ -4007,16 +4235,16 @@ function useThreads(limit = DEFAULT_LIMIT) {
4007
4235
  isReady,
4008
4236
  isLoading: isStreamLoading
4009
4237
  } = useStreamContext();
4010
- const [threadRecords, setThreadRecords] = React20.useState([]);
4011
- const [isLoading, setIsLoading] = React20.useState(false);
4012
- const [error, setError] = React20.useState(null);
4013
- const upsertThreadRecord = React20.useCallback((threadRecord) => {
4238
+ const [threadRecords, setThreadRecords] = React21.useState([]);
4239
+ const [isLoading, setIsLoading] = React21.useState(false);
4240
+ const [error, setError] = React21.useState(null);
4241
+ const upsertThreadRecord = React21.useCallback((threadRecord) => {
4014
4242
  setThreadRecords((prev) => {
4015
4243
  const next = prev.filter((item) => item.id !== threadRecord.id);
4016
4244
  return sortThreadRecords([threadRecord, ...next]);
4017
4245
  });
4018
4246
  }, []);
4019
- const refreshThreads = React20.useCallback(async () => {
4247
+ const refreshThreads = React21.useCallback(async () => {
4020
4248
  setIsLoading(true);
4021
4249
  setError(null);
4022
4250
  try {
@@ -4032,7 +4260,7 @@ function useThreads(limit = DEFAULT_LIMIT) {
4032
4260
  setIsLoading(false);
4033
4261
  }
4034
4262
  }, [client, limit, assistantId]);
4035
- const createThread = React20.useCallback(
4263
+ const createThread = React21.useCallback(
4036
4264
  async (input) => {
4037
4265
  setError(null);
4038
4266
  const payload = {};
@@ -4046,7 +4274,7 @@ function useThreads(limit = DEFAULT_LIMIT) {
4046
4274
  },
4047
4275
  [client, upsertThreadRecord]
4048
4276
  );
4049
- const updateThread = React20.useCallback(
4277
+ const updateThread = React21.useCallback(
4050
4278
  async (recordId, payload) => {
4051
4279
  setError(null);
4052
4280
  const updated = await client.conversations.update(recordId, payload);
@@ -4055,7 +4283,7 @@ function useThreads(limit = DEFAULT_LIMIT) {
4055
4283
  },
4056
4284
  [client, upsertThreadRecord]
4057
4285
  );
4058
- const deleteThread = React20.useCallback(
4286
+ const deleteThread = React21.useCallback(
4059
4287
  async (recordId) => {
4060
4288
  setError(null);
4061
4289
  await client.conversations.delete(recordId);
@@ -4063,11 +4291,11 @@ function useThreads(limit = DEFAULT_LIMIT) {
4063
4291
  },
4064
4292
  [client]
4065
4293
  );
4066
- React20.useEffect(() => {
4294
+ React21.useEffect(() => {
4067
4295
  if (!isReady) return;
4068
4296
  void refreshThreads();
4069
4297
  }, [refreshThreads, isReady]);
4070
- React20.useEffect(() => {
4298
+ React21.useEffect(() => {
4071
4299
  if (!threadId || !isStreamLoading) return;
4072
4300
  const now = (/* @__PURE__ */ new Date()).toISOString();
4073
4301
  const busyStatus = "busy";
@@ -4088,7 +4316,7 @@ function useThreads(limit = DEFAULT_LIMIT) {
4088
4316
  return changed ? sortThreadRecords(next) : prev;
4089
4317
  });
4090
4318
  }, [threadId, isStreamLoading]);
4091
- React20.useEffect(() => {
4319
+ React21.useEffect(() => {
4092
4320
  if (!isReady || !threadId || isStreamLoading) return;
4093
4321
  let cancelled = false;
4094
4322
  void client.conversations.search({ where: { threadId }, limit: 1 }).then((result) => {
@@ -4102,7 +4330,7 @@ function useThreads(limit = DEFAULT_LIMIT) {
4102
4330
  cancelled = true;
4103
4331
  };
4104
4332
  }, [client, threadId, upsertThreadRecord, isReady, isStreamLoading]);
4105
- const threads = React20.useMemo(
4333
+ const threads = React21.useMemo(
4106
4334
  () => threadRecords.map((threadRecord) => toThreadItem(threadRecord)),
4107
4335
  [threadRecords]
4108
4336
  );
@@ -4119,10 +4347,10 @@ function useThreads(limit = DEFAULT_LIMIT) {
4119
4347
  }
4120
4348
 
4121
4349
  // src/components/thread/context-usage-indicator.tsx
4122
- var React21 = __toESM(require("react"), 1);
4350
+ var React22 = __toESM(require("react"), 1);
4123
4351
 
4124
4352
  // src/components/ui/progress-circle.tsx
4125
- var import_jsx_runtime26 = (
4353
+ var import_jsx_runtime27 = (
4126
4354
  // biome-ignore lint/a11y/useFocusableInteractive: false positive (progress + progressbar are not focusable interactives)
4127
4355
  // biome-ignore lint/nursery/useAriaPropsSupportedByRole: biome rule at odds with mdn docs (presumed nursary bug with rule)
4128
4356
  require("react/jsx-runtime")
@@ -4146,7 +4374,7 @@ var ProgressCircle = ({ value, className, ...restSvgProps }) => {
4146
4374
  fill: "none",
4147
4375
  strokeWidth
4148
4376
  };
4149
- return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
4377
+ return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
4150
4378
  "svg",
4151
4379
  {
4152
4380
  role: "progressbar",
@@ -4157,8 +4385,8 @@ var ProgressCircle = ({ value, className, ...restSvgProps }) => {
4157
4385
  "aria-valuemax": 100,
4158
4386
  ...restSvgProps,
4159
4387
  children: [
4160
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("circle", { ...commonParams, className: "stroke-current/25" }),
4161
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
4388
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("circle", { ...commonParams, className: "stroke-current/25" }),
4389
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
4162
4390
  "circle",
4163
4391
  {
4164
4392
  ...commonParams,
@@ -4176,7 +4404,7 @@ var ProgressCircle = ({ value, className, ...restSvgProps }) => {
4176
4404
  };
4177
4405
 
4178
4406
  // src/components/thread/context-usage-indicator.tsx
4179
- var import_jsx_runtime27 = require("react/jsx-runtime");
4407
+ var import_jsx_runtime28 = require("react/jsx-runtime");
4180
4408
  var kNumberFormatter = new Intl.NumberFormat("en-US", {
4181
4409
  minimumFractionDigits: 0,
4182
4410
  maximumFractionDigits: 1
@@ -4209,20 +4437,20 @@ function ContextUsageIndicator({
4209
4437
  }) {
4210
4438
  const { t } = useChatkitTranslation();
4211
4439
  const stream = useStreamContext();
4212
- const [maxContextSize, setMaxContextSize] = React21.useState(null);
4213
- const [usedContextSize, setUsedContextSize] = React21.useState(null);
4214
- const [assistantAgentKey, setAssistantAgentKey] = React21.useState(null);
4215
- const latestRealtimeUsageRef = React21.useRef({
4440
+ const [maxContextSize, setMaxContextSize] = React22.useState(null);
4441
+ const [usedContextSize, setUsedContextSize] = React22.useState(null);
4442
+ const [assistantAgentKey, setAssistantAgentKey] = React22.useState(null);
4443
+ const latestRealtimeUsageRef = React22.useRef({
4216
4444
  threadId: null,
4217
4445
  agentKey: null,
4218
4446
  usedTokens: null
4219
4447
  });
4220
- const realtimeUsage = React21.useMemo(
4448
+ const realtimeUsage = React22.useMemo(
4221
4449
  () => getThreadContextUsage(stream.contextUsageByAgentKey, assistantAgentKey),
4222
4450
  [assistantAgentKey, stream.contextUsageByAgentKey]
4223
4451
  );
4224
4452
  const realtimeUsedContextSize = getThreadContextUsageTotalTokens(realtimeUsage);
4225
- React21.useEffect(() => {
4453
+ React22.useEffect(() => {
4226
4454
  if (!stream.client || !stream.assistantId) {
4227
4455
  setMaxContextSize(null);
4228
4456
  setAssistantAgentKey(null);
@@ -4242,18 +4470,18 @@ function ContextUsageIndicator({
4242
4470
  cancelled = true;
4243
4471
  };
4244
4472
  }, [stream.client, stream.assistantId]);
4245
- React21.useEffect(() => {
4473
+ React22.useEffect(() => {
4246
4474
  latestRealtimeUsageRef.current = {
4247
4475
  threadId: stream.threadId ?? null,
4248
4476
  agentKey: assistantAgentKey,
4249
4477
  usedTokens: realtimeUsedContextSize
4250
4478
  };
4251
4479
  }, [assistantAgentKey, realtimeUsedContextSize, stream.threadId]);
4252
- React21.useEffect(() => {
4480
+ React22.useEffect(() => {
4253
4481
  if (realtimeUsedContextSize == null) return;
4254
4482
  setUsedContextSize(realtimeUsedContextSize);
4255
4483
  }, [realtimeUsedContextSize]);
4256
- React21.useEffect(() => {
4484
+ React22.useEffect(() => {
4257
4485
  if (!stream.client) {
4258
4486
  setUsedContextSize(null);
4259
4487
  return;
@@ -4318,8 +4546,8 @@ function ContextUsageIndicator({
4318
4546
  });
4319
4547
  const usageLabelWithSuffix = usageLabel.endsWith(":") ? usageLabel : `${usageLabel}:`;
4320
4548
  const progressClassName = percent >= 90 ? "text-destructive" : percent >= 75 ? "text-amber-500" : "text-primary dark:text-zinc-300";
4321
- return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(Tooltip, { children: [
4322
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
4549
+ return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(Tooltip, { children: [
4550
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
4323
4551
  "button",
4324
4552
  {
4325
4553
  type: "button",
@@ -4328,19 +4556,19 @@ function ContextUsageIndicator({
4328
4556
  className
4329
4557
  ),
4330
4558
  "aria-label": `${usageLabelWithSuffix} ${usageFullLabel}. ${usageTokensLabel}`,
4331
- children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(ProgressCircle, { value: percent, className: cn("size-3.5", progressClassName) })
4559
+ children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(ProgressCircle, { value: percent, className: cn("size-3.5", progressClassName) })
4332
4560
  }
4333
4561
  ) }),
4334
- /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(TooltipContent, { side: "top", sideOffset: 6, className: "space-y-0.5 px-3 py-2 text-center", children: [
4335
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: "text-primary-foreground/70", children: usageLabelWithSuffix }),
4336
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: "font-medium text-primary-foreground/80", children: usageFullLabel }),
4337
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: "text-sm font-semibold", children: usageTokensLabel })
4562
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(TooltipContent, { side: "top", sideOffset: 6, className: "space-y-0.5 px-3 py-2 text-center", children: [
4563
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "text-primary-foreground/70", children: usageLabelWithSuffix }),
4564
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "font-medium text-primary-foreground/80", children: usageFullLabel }),
4565
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "text-sm font-semibold", children: usageTokensLabel })
4338
4566
  ] })
4339
4567
  ] });
4340
4568
  }
4341
4569
 
4342
4570
  // src/components/chat.tsx
4343
- var import_jsx_runtime28 = require("react/jsx-runtime");
4571
+ var import_jsx_runtime29 = require("react/jsx-runtime");
4344
4572
  var import_meta2 = {};
4345
4573
  var defaultApiUrl2 = import_meta2.env.VITE_XPERTAI_API_URL;
4346
4574
  var COMPOSER_INPUT_MAX_HEIGHT = 128;
@@ -4432,8 +4660,8 @@ function ReferenceChip({
4432
4660
  }) {
4433
4661
  const metaLine = getReferenceMetaLine(reference);
4434
4662
  const isComposer = variant === "composer";
4435
- const Icon = reference.type === "quote" ? import_lucide_react11.Quote : reference.type === "image" ? import_lucide_react11.ImageIcon : import_lucide_react11.FileText;
4436
- return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
4663
+ const Icon = reference.type === "quote" ? import_lucide_react12.Quote : reference.type === "image" ? import_lucide_react12.ImageIcon : import_lucide_react12.FileText;
4664
+ return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
4437
4665
  "div",
4438
4666
  {
4439
4667
  className: cn(
@@ -4442,7 +4670,7 @@ function ReferenceChip({
4442
4670
  ),
4443
4671
  title: getReferenceTitle(reference),
4444
4672
  children: [
4445
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
4673
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
4446
4674
  Icon,
4447
4675
  {
4448
4676
  size: isComposer ? 14 : 12,
@@ -4452,8 +4680,8 @@ function ReferenceChip({
4452
4680
  )
4453
4681
  }
4454
4682
  ),
4455
- /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "min-w-0 flex-1", children: [
4456
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
4683
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: "min-w-0 flex-1", children: [
4684
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
4457
4685
  "div",
4458
4686
  {
4459
4687
  className: cn(
@@ -4463,7 +4691,7 @@ function ReferenceChip({
4463
4691
  children: getReferenceLabel(reference)
4464
4692
  }
4465
4693
  ),
4466
- metaLine && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
4694
+ metaLine && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
4467
4695
  "div",
4468
4696
  {
4469
4697
  className: cn(
@@ -4474,7 +4702,7 @@ function ReferenceChip({
4474
4702
  }
4475
4703
  )
4476
4704
  ] }),
4477
- onRemove && removeLabel && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
4705
+ onRemove && removeLabel && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
4478
4706
  "button",
4479
4707
  {
4480
4708
  type: "button",
@@ -4485,7 +4713,7 @@ function ReferenceChip({
4485
4713
  ),
4486
4714
  title: removeLabel,
4487
4715
  "aria-label": removeLabel,
4488
- children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_lucide_react11.X, { size: 12 })
4716
+ children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_lucide_react12.X, { size: 12 })
4489
4717
  }
4490
4718
  )
4491
4719
  ]
@@ -4509,20 +4737,20 @@ function Chat({
4509
4737
  const { setStream } = useStreamManager();
4510
4738
  const stream = useStreamContext();
4511
4739
  const { theme } = useTheme();
4512
- const [isHistoryLoading, setIsHistoryLoading] = React22.useState(false);
4513
- const [historyError, setHistoryError] = React22.useState(null);
4514
- const [assistantName, setAssistantName] = React22.useState(null);
4515
- const [assistantAvatar, setAssistantAvatar] = React22.useState(null);
4740
+ const [isHistoryLoading, setIsHistoryLoading] = React23.useState(false);
4741
+ const [historyError, setHistoryError] = React23.useState(null);
4742
+ const [assistantName, setAssistantName] = React23.useState(null);
4743
+ const [assistantAvatar, setAssistantAvatar] = React23.useState(null);
4516
4744
  const LOADING_DOTS_MIN_DURATION = 800;
4517
4745
  const STREAMING_STATUS_REFRESH_MS = 250;
4518
- const [showLoadingDots, setShowLoadingDots] = React22.useState(false);
4519
- const [streamingNow, setStreamingNow] = React22.useState(() => Date.now());
4520
- const loadingStartTimeRef = React22.useRef(null);
4521
- const lastStreamOutputAtRef = React22.useRef(null);
4522
- React22.useEffect(() => {
4746
+ const [showLoadingDots, setShowLoadingDots] = React23.useState(false);
4747
+ const [streamingNow, setStreamingNow] = React23.useState(() => Date.now());
4748
+ const loadingStartTimeRef = React23.useRef(null);
4749
+ const lastStreamOutputAtRef = React23.useRef(null);
4750
+ React23.useEffect(() => {
4523
4751
  setStream(stream);
4524
4752
  }, [setStream, stream]);
4525
- React22.useEffect(() => {
4753
+ React23.useEffect(() => {
4526
4754
  if (stream.isLoading) {
4527
4755
  if (!loadingStartTimeRef.current) {
4528
4756
  loadingStartTimeRef.current = Date.now();
@@ -4545,7 +4773,7 @@ function Chat({
4545
4773
  }
4546
4774
  }
4547
4775
  }, [stream.isLoading]);
4548
- React22.useEffect(() => {
4776
+ React23.useEffect(() => {
4549
4777
  if (!stream.isLoading) {
4550
4778
  lastStreamOutputAtRef.current = null;
4551
4779
  setStreamingNow(Date.now());
@@ -4555,7 +4783,7 @@ function Chat({
4555
4783
  lastStreamOutputAtRef.current = now;
4556
4784
  setStreamingNow(now);
4557
4785
  }, [stream.messages, stream.isLoading]);
4558
- React22.useEffect(() => {
4786
+ React23.useEffect(() => {
4559
4787
  if (!stream.isLoading) {
4560
4788
  return;
4561
4789
  }
@@ -4564,52 +4792,53 @@ function Chat({
4564
4792
  }, STREAMING_STATUS_REFRESH_MS);
4565
4793
  return () => window.clearInterval(timer);
4566
4794
  }, [stream.isLoading]);
4567
- const [draft, setDraft] = React22.useState("");
4568
- const [selectedTool, setSelectedTool] = React22.useState(
4795
+ const [draft, setDraft] = React23.useState("");
4796
+ const [selectedTool, setSelectedTool] = React23.useState(
4569
4797
  null
4570
4798
  );
4571
- const [attachments, setAttachments] = React22.useState([]);
4572
- const [references, setReferences] = React22.useState([]);
4573
- const [isUploadingReferenceImages, setIsUploadingReferenceImages] = React22.useState(false);
4574
- const [quoteSelection, setQuoteSelection] = React22.useState(null);
4575
- const [isAtBottom, setIsAtBottom] = React22.useState(true);
4576
- const [hasUpdatesBelow, setHasUpdatesBelow] = React22.useState(false);
4799
+ const [attachments, setAttachments] = React23.useState([]);
4800
+ const [references, setReferences] = React23.useState([]);
4801
+ const [isUploadingReferenceImages, setIsUploadingReferenceImages] = React23.useState(false);
4802
+ const [quoteSelection, setQuoteSelection] = React23.useState(null);
4803
+ const [isAtBottom, setIsAtBottom] = React23.useState(true);
4804
+ const [hasUpdatesBelow, setHasUpdatesBelow] = React23.useState(false);
4577
4805
  const {
4578
4806
  threads,
4579
4807
  deleteThread,
4580
4808
  refreshThreads,
4581
4809
  isLoading: isThreadsLoading
4582
4810
  } = useThreads();
4583
- const viewportRef = React22.useRef(null);
4584
- const fileInputRef = React22.useRef(null);
4585
- const composerInputRef = React22.useRef(null);
4586
- const shouldAutoScrollRef = React22.useRef(true);
4587
- const forceFollowRef = React22.useRef(false);
4588
- const previousMessageCountRef = React22.useRef(0);
4589
- const previousScrollTopRef = React22.useRef(0);
4590
- const autoScrollFrameRef = React22.useRef(null);
4591
- const isPointerDownRef = React22.useRef(false);
4592
- const lastTouchYRef = React22.useRef(null);
4811
+ const viewportRef = React23.useRef(null);
4812
+ const fileInputRef = React23.useRef(null);
4813
+ const composerInputRef = React23.useRef(null);
4814
+ const shouldAutoScrollRef = React23.useRef(true);
4815
+ const forceFollowRef = React23.useRef(false);
4816
+ const previousMessageCountRef = React23.useRef(0);
4817
+ const previousScrollTopRef = React23.useRef(0);
4818
+ const autoScrollFrameRef = React23.useRef(null);
4819
+ const isPointerDownRef = React23.useRef(false);
4820
+ const lastTouchYRef = React23.useRef(null);
4593
4821
  const resolvedTitle = title ?? t("chat.title");
4594
4822
  const resolvedPlaceholder = placeholder ?? t("chat.placeholder");
4595
4823
  const inputPlaceholder = selectedTool?.placeholderOverride ?? composer?.placeholder ?? resolvedPlaceholder;
4596
- const messages = React22.useMemo(
4824
+ const messages = React23.useMemo(
4597
4825
  () => stream.messages ?? [],
4598
4826
  [stream.messages]
4599
4827
  );
4600
4828
  const trimmedDraft = draft.trim();
4601
4829
  const hasReferences = references.length > 0;
4602
- const pendingFollowUps = React22.useMemo(
4830
+ const pendingFollowUps = React23.useMemo(
4603
4831
  () => [...stream.pendingFollowUps ?? []].sort(
4604
4832
  (a, b) => a.createdAt - b.createdAt
4605
4833
  ),
4606
4834
  [stream.pendingFollowUps]
4607
4835
  );
4608
- const clearQuoteSelection = React22.useCallback(() => {
4836
+ const hasPendingFollowUps = pendingFollowUps.length > 0;
4837
+ const clearQuoteSelection = React23.useCallback(() => {
4609
4838
  setQuoteSelection(null);
4610
4839
  }, []);
4611
4840
  useParentMessenger({
4612
- onSetComposerValue: React22.useCallback(
4841
+ onSetComposerValue: React23.useCallback(
4613
4842
  (payload) => {
4614
4843
  if (!payload) {
4615
4844
  return;
@@ -4632,11 +4861,11 @@ function Chat({
4632
4861
  },
4633
4862
  [composer?.tools]
4634
4863
  ),
4635
- onFocusComposer: React22.useCallback(() => {
4864
+ onFocusComposer: React23.useCallback(() => {
4636
4865
  composerInputRef.current?.focus();
4637
4866
  }, [])
4638
4867
  });
4639
- const syncQuoteSelection = React22.useCallback(() => {
4868
+ const syncQuoteSelection = React23.useCallback(() => {
4640
4869
  if (typeof window === "undefined") {
4641
4870
  clearQuoteSelection();
4642
4871
  return;
@@ -4681,23 +4910,23 @@ function Chat({
4681
4910
  left
4682
4911
  });
4683
4912
  }, [clearQuoteSelection]);
4684
- const cancelPendingAutoScroll = React22.useCallback(() => {
4913
+ const cancelPendingAutoScroll = React23.useCallback(() => {
4685
4914
  if (autoScrollFrameRef.current !== null) {
4686
4915
  cancelAnimationFrame(autoScrollFrameRef.current);
4687
4916
  autoScrollFrameRef.current = null;
4688
4917
  }
4689
4918
  }, []);
4690
- const disableAutoFollow = React22.useCallback(() => {
4919
+ const disableAutoFollow = React23.useCallback(() => {
4691
4920
  forceFollowRef.current = false;
4692
4921
  shouldAutoScrollRef.current = false;
4693
4922
  cancelPendingAutoScroll();
4694
4923
  }, [cancelPendingAutoScroll]);
4695
- const enableAutoFollow = React22.useCallback(() => {
4924
+ const enableAutoFollow = React23.useCallback(() => {
4696
4925
  forceFollowRef.current = true;
4697
4926
  shouldAutoScrollRef.current = true;
4698
4927
  setHasUpdatesBelow(false);
4699
4928
  }, []);
4700
- const scrollToBottom = React22.useCallback(
4929
+ const scrollToBottom = React23.useCallback(
4701
4930
  (smooth = false, force = false) => {
4702
4931
  if (force) {
4703
4932
  enableAutoFollow();
@@ -4719,7 +4948,7 @@ function Chat({
4719
4948
  },
4720
4949
  [cancelPendingAutoScroll, enableAutoFollow]
4721
4950
  );
4722
- React22.useEffect(() => {
4951
+ React23.useEffect(() => {
4723
4952
  const viewport = viewportRef.current;
4724
4953
  if (!viewport) return;
4725
4954
  previousScrollTopRef.current = viewport.scrollTop;
@@ -4800,14 +5029,14 @@ function Chat({
4800
5029
  window.removeEventListener("pointercancel", stopPointerTracking);
4801
5030
  };
4802
5031
  }, [cancelPendingAutoScroll, disableAutoFollow]);
4803
- React22.useEffect(() => {
5032
+ React23.useEffect(() => {
4804
5033
  shouldAutoScrollRef.current = true;
4805
5034
  forceFollowRef.current = false;
4806
5035
  previousScrollTopRef.current = 0;
4807
5036
  setIsAtBottom(true);
4808
5037
  setHasUpdatesBelow(false);
4809
5038
  }, [stream.threadId]);
4810
- React22.useEffect(() => {
5039
+ React23.useEffect(() => {
4811
5040
  const messageCountChanged = messages.length !== previousMessageCountRef.current;
4812
5041
  previousMessageCountRef.current = messages.length;
4813
5042
  if (!shouldAutoScrollRef.current) {
@@ -4826,7 +5055,7 @@ function Chat({
4826
5055
  clientSecret: effectiveClientSecret
4827
5056
  });
4828
5057
  const missingConfig = Boolean(missingConfigKind);
4829
- const missingConfigShortMessage = React22.useMemo(() => {
5058
+ const missingConfigShortMessage = React23.useMemo(() => {
4830
5059
  switch (missingConfigKind) {
4831
5060
  case "apiUrl":
4832
5061
  return t("chat.missingApiUrlShort");
@@ -4838,7 +5067,7 @@ function Chat({
4838
5067
  return t("chat.missingConfigShort");
4839
5068
  }
4840
5069
  }, [missingConfigKind, t]);
4841
- const missingConfigDetailMessage = React22.useMemo(() => {
5070
+ const missingConfigDetailMessage = React23.useMemo(() => {
4842
5071
  switch (missingConfigKind) {
4843
5072
  case "apiUrl":
4844
5073
  return t("chat.missingApiUrlDetail");
@@ -4853,7 +5082,7 @@ function Chat({
4853
5082
  const showMissingConfig = !isClientSecretInitializing && missingConfig;
4854
5083
  const hasUploadingFiles = attachments.some((a) => a.status === "uploading");
4855
5084
  const isSendDisabled = !trimmedDraft && !hasReferences || missingConfig || isHistoryLoading || hasUploadingFiles || isUploadingReferenceImages;
4856
- const resizeComposerInput = React22.useCallback(() => {
5085
+ const resizeComposerInput = React23.useCallback(() => {
4857
5086
  const textarea = composerInputRef.current;
4858
5087
  if (!textarea) {
4859
5088
  return;
@@ -4866,16 +5095,16 @@ function Chat({
4866
5095
  textarea.style.height = `${nextHeight}px`;
4867
5096
  textarea.style.overflowY = textarea.scrollHeight > COMPOSER_INPUT_MAX_HEIGHT ? "auto" : "hidden";
4868
5097
  }, []);
4869
- React22.useEffect(() => {
5098
+ React23.useEffect(() => {
4870
5099
  resizeComposerInput();
4871
5100
  }, [draft, resizeComposerInput]);
4872
- React22.useEffect(() => {
5101
+ React23.useEffect(() => {
4873
5102
  document.addEventListener("selectionchange", syncQuoteSelection);
4874
5103
  return () => {
4875
5104
  document.removeEventListener("selectionchange", syncQuoteSelection);
4876
5105
  };
4877
5106
  }, [syncQuoteSelection]);
4878
- React22.useEffect(() => {
5107
+ React23.useEffect(() => {
4879
5108
  const viewport = viewportRef.current;
4880
5109
  if (!viewport) {
4881
5110
  return;
@@ -4892,14 +5121,14 @@ function Chat({
4892
5121
  window.removeEventListener("resize", handleViewportScroll);
4893
5122
  };
4894
5123
  }, [clearQuoteSelection]);
4895
- React22.useEffect(() => {
5124
+ React23.useEffect(() => {
4896
5125
  clearQuoteSelection();
4897
5126
  }, [messages.length, stream.threadId, clearQuoteSelection]);
4898
- React22.useEffect(() => {
5127
+ React23.useEffect(() => {
4899
5128
  if (missingConfig) return;
4900
5129
  void refreshThreads();
4901
5130
  }, [missingConfig, refreshThreads]);
4902
- React22.useEffect(() => {
5131
+ React23.useEffect(() => {
4903
5132
  if (missingConfig || !stream.client || !stream.assistantId) {
4904
5133
  setAssistantName(null);
4905
5134
  setAssistantAvatar(null);
@@ -4930,7 +5159,7 @@ function Chat({
4930
5159
  mimetype: a.storageFile?.mimetype ?? a.file.type,
4931
5160
  size: a.storageFile?.size ?? a.file.size
4932
5161
  }));
4933
- const submitDraft = React22.useCallback(
5162
+ const submitDraft = React23.useCallback(
4934
5163
  (followUpOverride) => {
4935
5164
  if (isSendDisabled) return;
4936
5165
  const filesToSend = uploadedFiles.length > 0 ? [...uploadedFiles] : void 0;
@@ -5004,7 +5233,7 @@ function Chat({
5004
5233
  event.preventDefault();
5005
5234
  submitDraft();
5006
5235
  };
5007
- const handleEditPendingFollowUp = React22.useCallback(
5236
+ const handleEditPendingFollowUp = React23.useCallback(
5008
5237
  (id) => {
5009
5238
  const item = pendingFollowUps.find(
5010
5239
  (entry) => entry.id === id && entry.mode === "queue"
@@ -5031,7 +5260,7 @@ function Chat({
5031
5260
  },
5032
5261
  [pendingFollowUps, stream]
5033
5262
  );
5034
- const handleQuoteSelection = React22.useCallback(() => {
5263
+ const handleQuoteSelection = React23.useCallback(() => {
5035
5264
  if (!quoteSelection) {
5036
5265
  return;
5037
5266
  }
@@ -5047,7 +5276,7 @@ function Chat({
5047
5276
  const handleAttachmentClick = () => {
5048
5277
  fileInputRef.current?.click();
5049
5278
  };
5050
- const uploadContextFile = React22.useCallback(
5279
+ const uploadContextFile = React23.useCallback(
5051
5280
  (file) => stream.client.contexts.uploadFile(file),
5052
5281
  [stream.client]
5053
5282
  );
@@ -5073,7 +5302,7 @@ function Chat({
5073
5302
  }
5074
5303
  submitDraft();
5075
5304
  };
5076
- const handleComposerPaste = React22.useCallback(
5305
+ const handleComposerPaste = React23.useCallback(
5077
5306
  (event) => {
5078
5307
  const clipboardData = event.clipboardData;
5079
5308
  if (!clipboardData) {
@@ -5152,18 +5381,18 @@ function Chat({
5152
5381
  uploadContextFile
5153
5382
  ]
5154
5383
  );
5155
- const alternateFollowUpShortcutLabel = React22.useMemo(() => {
5384
+ const alternateFollowUpShortcutLabel = React23.useMemo(() => {
5156
5385
  if (typeof navigator === "undefined") {
5157
5386
  return "\u2318Enter";
5158
5387
  }
5159
5388
  const platform = navigator.platform || navigator.userAgent;
5160
5389
  return /Mac|iPhone|iPad|iPod/i.test(platform) ? "\u2318Enter" : "Ctrl+Enter";
5161
5390
  }, []);
5162
- const followUpShortcutLabels = React22.useMemo(
5391
+ const followUpShortcutLabels = React23.useMemo(
5163
5392
  () => getComposerFollowUpShortcutLabels(alternateFollowUpShortcutLabel),
5164
5393
  [alternateFollowUpShortcutLabel]
5165
5394
  );
5166
- const uploadFile = React22.useCallback(
5395
+ const uploadFile = React23.useCallback(
5167
5396
  async (localId, file) => {
5168
5397
  try {
5169
5398
  const result = await uploadContextFile(file);
@@ -5186,7 +5415,7 @@ function Chat({
5186
5415
  },
5187
5416
  [uploadContextFile]
5188
5417
  );
5189
- const handleRetryUpload = React22.useCallback(
5418
+ const handleRetryUpload = React23.useCallback(
5190
5419
  (localId) => {
5191
5420
  const attachment = attachments.find((a) => a.localId === localId);
5192
5421
  if (!attachment || attachment.status !== "error") return;
@@ -5271,7 +5500,7 @@ function Chat({
5271
5500
  );
5272
5501
  scrollToBottom(true, true);
5273
5502
  };
5274
- const loadConversationMessages = React22.useCallback(
5503
+ const loadConversationMessages = React23.useCallback(
5275
5504
  async (recordId) => {
5276
5505
  if (missingConfig) {
5277
5506
  setHistoryError(missingConfigShortMessage);
@@ -5357,18 +5586,18 @@ function Chat({
5357
5586
  }
5358
5587
  };
5359
5588
  const acceptMimes = composer?.attachments?.accept ? Object.entries(composer.attachments.accept).map(([mime, exts]) => [mime, ...exts.map((e) => `.${e}`)].join(",")).join(",") : void 0;
5360
- const currentThread = React22.useMemo(
5589
+ const currentThread = React23.useMemo(
5361
5590
  () => threads.find((item) => item.id === stream.threadId),
5362
5591
  [threads, stream.threadId]
5363
5592
  );
5364
5593
  const errorMessage = stream.error instanceof Error ? stream.error.message : void 0;
5365
- const threadErrorMessage = React22.useMemo(() => {
5594
+ const threadErrorMessage = React23.useMemo(() => {
5366
5595
  if (currentThread?.status !== "error") return void 0;
5367
5596
  const message = currentThread.error?.trim();
5368
5597
  return message || t("thread.errorToast");
5369
5598
  }, [currentThread, t]);
5370
5599
  const assistantTitle = assistantName || resolvedTitle;
5371
- return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
5600
+ return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
5372
5601
  "div",
5373
5602
  {
5374
5603
  ref: viewportRef,
@@ -5377,10 +5606,10 @@ function Chat({
5377
5606
  className
5378
5607
  ),
5379
5608
  children: [
5380
- /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "flex items-center justify-between border-b p-2 sticky top-0 z-10 bg-background", children: [
5381
- /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "flex items-center gap-3 overflow-hidden", children: [
5382
- /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "relative shrink-0", children: [
5383
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
5609
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: "flex items-center justify-between border-b p-2 sticky top-0 z-10 bg-background", children: [
5610
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: "flex items-center gap-3 overflow-hidden", children: [
5611
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: "relative shrink-0", children: [
5612
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
5384
5613
  ChatkitAvatar,
5385
5614
  {
5386
5615
  avatar: assistantAvatar,
@@ -5388,10 +5617,10 @@ function Chat({
5388
5617
  label: assistantTitle
5389
5618
  }
5390
5619
  ),
5391
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { className: "absolute bottom-0 right-0 h-2.5 w-2.5 rounded-full border-2 border-background bg-green-500" })
5620
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { className: "absolute bottom-0 right-0 h-2.5 w-2.5 rounded-full border-2 border-background bg-green-500" })
5392
5621
  ] }),
5393
- /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "truncate", children: [
5394
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
5622
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: "truncate", children: [
5623
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
5395
5624
  "h2",
5396
5625
  {
5397
5626
  className: "text-lg font-semibold truncate",
@@ -5399,11 +5628,11 @@ function Chat({
5399
5628
  children: assistantTitle
5400
5629
  }
5401
5630
  ),
5402
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("p", { className: "text-xs text-muted-foreground", children: t("chat.statusOnline") })
5631
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("p", { className: "text-xs text-muted-foreground", children: t("chat.statusOnline") })
5403
5632
  ] })
5404
5633
  ] }),
5405
- history?.enabled !== false && /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "flex items-center gap-1", children: [
5406
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
5634
+ history?.enabled !== false && /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: "flex items-center gap-1", children: [
5635
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
5407
5636
  "button",
5408
5637
  {
5409
5638
  type: "button",
@@ -5416,10 +5645,10 @@ function Chat({
5416
5645
  "disabled:opacity-50 disabled:cursor-not-allowed"
5417
5646
  ),
5418
5647
  title: t("history.newThread"),
5419
- children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_lucide_react11.Pencil, { size: 16 })
5648
+ children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_lucide_react12.Pencil, { size: 16 })
5420
5649
  }
5421
5650
  ),
5422
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
5651
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
5423
5652
  HistorySidebar,
5424
5653
  {
5425
5654
  threads,
@@ -5433,18 +5662,18 @@ function Chat({
5433
5662
  )
5434
5663
  ] })
5435
5664
  ] }),
5436
- /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "flex-1 p-4", children: [
5437
- errorMessage && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "mb-4 rounded-lg border border-destructive/30 bg-destructive/10 px-3 py-2 text-sm text-destructive", children: errorMessage }),
5438
- historyError && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "mb-4 rounded-lg border border-amber-200 bg-amber-50 px-3 py-2 text-sm text-amber-900", children: historyError }),
5439
- showMissingConfig && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "mb-4 rounded-lg border border-amber-200 bg-amber-50 px-3 py-2 text-sm text-amber-900", children: missingConfigDetailMessage }),
5440
- isHistoryLoading && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "mb-4 rounded-lg border border-muted px-3 py-2 text-sm text-muted-foreground", children: t("chat.loadingThread") }),
5441
- messages.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
5665
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: "flex-1 p-4", children: [
5666
+ errorMessage && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "mb-4 rounded-lg border border-destructive/30 bg-destructive/10 px-3 py-2 text-sm text-destructive", children: errorMessage }),
5667
+ historyError && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "mb-4 rounded-lg border border-amber-200 bg-amber-50 px-3 py-2 text-sm text-amber-900", children: historyError }),
5668
+ showMissingConfig && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "mb-4 rounded-lg border border-amber-200 bg-amber-50 px-3 py-2 text-sm text-amber-900", children: missingConfigDetailMessage }),
5669
+ isHistoryLoading && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "mb-4 rounded-lg border border-muted px-3 py-2 text-sm text-muted-foreground", children: t("chat.loadingThread") }),
5670
+ messages.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
5442
5671
  StartScreen,
5443
5672
  {
5444
5673
  startScreen,
5445
5674
  onPromptClick: handlePromptClick
5446
5675
  }
5447
- ) : /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "space-y-4", children: [
5676
+ ) : /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: "space-y-4", children: [
5448
5677
  messages.map((message, index) => {
5449
5678
  const messageType = String(message.type);
5450
5679
  const isAssistantMessage = messageType === "assistant" || messageType === "ai";
@@ -5471,7 +5700,7 @@ function Chat({
5471
5700
  if (!isAssistantMessage && !hasPlainRenderableContent && !hasHumanAttachments && humanReferences.length === 0) {
5472
5701
  return null;
5473
5702
  }
5474
- return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
5703
+ return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
5475
5704
  "div",
5476
5705
  {
5477
5706
  className: cn(
@@ -5479,8 +5708,8 @@ function Chat({
5479
5708
  message.type === "human" ? "justify-end" : "justify-start -ml-1"
5480
5709
  // AI messages: slightly closer to left
5481
5710
  ),
5482
- children: /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "flex flex-col px-3 overflow-hidden", children: [
5483
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
5711
+ children: /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: "flex flex-col px-3 overflow-hidden", children: [
5712
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
5484
5713
  "div",
5485
5714
  {
5486
5715
  ...canQuoteMessage ? {
@@ -5492,7 +5721,7 @@ function Chat({
5492
5721
  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"
5493
5722
  // AI messages: use chat-specific foreground color
5494
5723
  ),
5495
- children: isAssistantMessage ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
5724
+ children: isAssistantMessage ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
5496
5725
  AssistantMessage,
5497
5726
  {
5498
5727
  message: {
@@ -5502,8 +5731,8 @@ function Chat({
5502
5731
  isStreaming: isStreamingMessage,
5503
5732
  streamingStatus
5504
5733
  }
5505
- ) : /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(import_jsx_runtime28.Fragment, { children: [
5506
- message.type === "human" && humanReferences.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "mb-2 flex flex-wrap gap-1.5", children: humanReferences.map((reference) => /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
5734
+ ) : /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(import_jsx_runtime29.Fragment, { children: [
5735
+ message.type === "human" && humanReferences.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "mb-2 flex flex-wrap gap-1.5", children: humanReferences.map((reference) => /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
5507
5736
  ReferenceChip,
5508
5737
  {
5509
5738
  reference,
@@ -5511,29 +5740,29 @@ function Chat({
5511
5740
  },
5512
5741
  getReferenceKey(reference)
5513
5742
  )) }),
5514
- message.type === "human" && humanAttachments.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "flex flex-wrap gap-1.5 mb-2", children: humanAttachments.map((file, fileIndex) => /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
5743
+ message.type === "human" && humanAttachments.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "flex flex-wrap gap-1.5 mb-2", children: humanAttachments.map((file, fileIndex) => /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
5515
5744
  "div",
5516
5745
  {
5517
5746
  className: "flex items-center gap-1.5 rounded-md bg-primary-foreground/20 px-2 py-1 text-xs",
5518
5747
  children: [
5519
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_lucide_react11.FileText, { size: 12 }),
5520
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { className: "max-w-[100px] truncate", children: file.originalName })
5748
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_lucide_react12.FileText, { size: 12 }),
5749
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { className: "max-w-[100px] truncate", children: file.originalName })
5521
5750
  ]
5522
5751
  },
5523
5752
  fileIndex
5524
5753
  )) }),
5525
- Array.isArray(message.content) ? message.content.map((part, partIndex) => /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
5754
+ Array.isArray(message.content) ? message.content.map((part, partIndex) => /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
5526
5755
  "p",
5527
5756
  {
5528
5757
  className: "wrap-break-word text-sm leading-relaxed",
5529
5758
  children: formatMessageContent(part)
5530
5759
  },
5531
5760
  `${part.type}-${partIndex}`
5532
- )) : /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { className: "wrap-break-word text-sm leading-relaxed", children: formatMessageContent(message.content) })
5761
+ )) : /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { className: "wrap-break-word text-sm leading-relaxed", children: formatMessageContent(message.content) })
5533
5762
  ] })
5534
5763
  }
5535
5764
  ),
5536
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
5765
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
5537
5766
  MessageActions,
5538
5767
  {
5539
5768
  content: messageContent,
@@ -5569,7 +5798,7 @@ function Chat({
5569
5798
  stream.isLoading,
5570
5799
  { now: streamingNow }
5571
5800
  );
5572
- return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "flex justify-start gap-3 -ml-2", children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "max-w-full rounded-2xl py-2.5", children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
5801
+ return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "flex justify-start gap-3 -ml-2", children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "max-w-full rounded-2xl py-2.5", children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
5573
5802
  AssistantStreamingIndicator,
5574
5803
  {
5575
5804
  status: fallbackStreamingStatus ?? "loading"
@@ -5578,7 +5807,7 @@ function Chat({
5578
5807
  })()
5579
5808
  ] })
5580
5809
  ] }),
5581
- !isAtBottom && messages.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "sticky bottom-20 z-20 flex justify-center px-4 pointer-events-none", children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
5810
+ !isAtBottom && messages.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "sticky bottom-20 z-20 flex justify-center px-4 pointer-events-none", children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
5582
5811
  Button,
5583
5812
  {
5584
5813
  type: "button",
@@ -5591,10 +5820,10 @@ function Chat({
5591
5820
  onClick: () => scrollToBottom(true, true),
5592
5821
  "aria-label": t("chat.scrollToBottom"),
5593
5822
  title: t("chat.scrollToBottom"),
5594
- children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_lucide_react11.ArrowDown, { size: 16 })
5823
+ children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_lucide_react12.ArrowDown, { size: 16 })
5595
5824
  }
5596
5825
  ) }),
5597
- quoteSelection && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
5826
+ quoteSelection && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
5598
5827
  "div",
5599
5828
  {
5600
5829
  className: "pointer-events-none fixed z-50",
@@ -5603,7 +5832,7 @@ function Chat({
5603
5832
  left: `${quoteSelection.left}px`,
5604
5833
  transform: "translateX(-50%)"
5605
5834
  },
5606
- children: /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
5835
+ children: /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
5607
5836
  Button,
5608
5837
  {
5609
5838
  type: "button",
@@ -5615,16 +5844,16 @@ function Chat({
5615
5844
  "aria-label": t("composer.quoteSelection"),
5616
5845
  title: t("composer.quoteSelection"),
5617
5846
  children: [
5618
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_lucide_react11.Quote, { size: 14 }),
5847
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_lucide_react12.Quote, { size: 14 }),
5619
5848
  t("composer.quoteSelection")
5620
5849
  ]
5621
5850
  }
5622
5851
  )
5623
5852
  }
5624
5853
  ),
5625
- /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "p-2 sticky bottom-0 z-10 bg-background", children: [
5626
- threadErrorMessage && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("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 }),
5627
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
5854
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: "p-2 sticky bottom-0 z-10 bg-background", children: [
5855
+ threadErrorMessage && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("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 }),
5856
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
5628
5857
  "input",
5629
5858
  {
5630
5859
  ref: fileInputRef,
@@ -5635,7 +5864,7 @@ function Chat({
5635
5864
  className: "hidden"
5636
5865
  }
5637
5866
  ),
5638
- attachments.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "mb-3 flex flex-wrap gap-2", children: attachments.map((item) => /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
5867
+ attachments.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "mb-3 flex flex-wrap gap-2", children: attachments.map((item) => /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
5639
5868
  "div",
5640
5869
  {
5641
5870
  className: cn(
@@ -5643,16 +5872,16 @@ function Chat({
5643
5872
  item.status === "error" ? "bg-destructive/10 border border-destructive/30" : "bg-muted"
5644
5873
  ),
5645
5874
  children: [
5646
- item.status === "uploading" && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
5647
- import_lucide_react11.Loader2,
5875
+ item.status === "uploading" && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
5876
+ import_lucide_react12.Loader2,
5648
5877
  {
5649
5878
  size: 14,
5650
5879
  className: "animate-spin text-muted-foreground"
5651
5880
  }
5652
5881
  ),
5653
- item.status === "success" && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_lucide_react11.FileText, { size: 14, className: "text-muted-foreground" }),
5654
- item.status === "error" && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_lucide_react11.FileText, { size: 14, className: "text-destructive" }),
5655
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
5882
+ item.status === "success" && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_lucide_react12.FileText, { size: 14, className: "text-muted-foreground" }),
5883
+ item.status === "error" && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_lucide_react12.FileText, { size: 14, className: "text-destructive" }),
5884
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
5656
5885
  "span",
5657
5886
  {
5658
5887
  className: cn(
@@ -5662,17 +5891,17 @@ function Chat({
5662
5891
  children: item.file.name
5663
5892
  }
5664
5893
  ),
5665
- item.status === "error" && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
5894
+ item.status === "error" && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
5666
5895
  "button",
5667
5896
  {
5668
5897
  type: "button",
5669
5898
  onClick: () => handleRetryUpload(item.localId),
5670
5899
  className: "ml-1 rounded-full p-0.5 text-destructive hover:bg-destructive/20",
5671
5900
  title: t("chat.retryUpload"),
5672
- children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_lucide_react11.RefreshCw, { size: 12 })
5901
+ children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_lucide_react12.RefreshCw, { size: 12 })
5673
5902
  }
5674
5903
  ),
5675
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
5904
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
5676
5905
  "button",
5677
5906
  {
5678
5907
  type: "button",
@@ -5681,14 +5910,14 @@ function Chat({
5681
5910
  "ml-1 rounded-full p-0.5",
5682
5911
  item.status === "error" ? "text-destructive hover:bg-destructive/20" : "hover:bg-muted-foreground/20"
5683
5912
  ),
5684
- children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_lucide_react11.X, { size: 12 })
5913
+ children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_lucide_react12.X, { size: 12 })
5685
5914
  }
5686
5915
  )
5687
5916
  ]
5688
5917
  },
5689
5918
  item.localId
5690
5919
  )) }),
5691
- references.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "mb-3 flex flex-wrap gap-2", children: references.map((reference) => /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
5920
+ references.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "mb-3 flex flex-wrap gap-2", children: references.map((reference) => /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
5692
5921
  ReferenceChip,
5693
5922
  {
5694
5923
  reference,
@@ -5702,19 +5931,27 @@ function Chat({
5702
5931
  },
5703
5932
  getReferenceKey(reference)
5704
5933
  )) }),
5705
- selectedTool && /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "mb-2 flex items-center gap-2", children: [
5706
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { className: "rounded-full bg-primary/10 px-2 py-0.5 text-xs font-medium text-primary", children: selectedTool.shortLabel ?? selectedTool.label }),
5707
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
5934
+ selectedTool && /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: "mb-2 flex items-center gap-2", children: [
5935
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { className: "rounded-full bg-primary/10 px-2 py-0.5 text-xs font-medium text-primary", children: selectedTool.shortLabel ?? selectedTool.label }),
5936
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
5708
5937
  "button",
5709
5938
  {
5710
5939
  type: "button",
5711
5940
  onClick: () => setSelectedTool(null),
5712
5941
  className: "rounded-full p-0.5 text-muted-foreground hover:bg-muted",
5713
- children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_lucide_react11.X, { size: 12 })
5942
+ children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_lucide_react12.X, { size: 12 })
5714
5943
  }
5715
5944
  )
5716
5945
  ] }),
5717
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
5946
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
5947
+ PendingTodos,
5948
+ {
5949
+ snapshot: stream.todos,
5950
+ attachToComposer: !hasPendingFollowUps,
5951
+ className: hasPendingFollowUps ? "mb-2" : void 0
5952
+ }
5953
+ ),
5954
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
5718
5955
  PendingFollowUps,
5719
5956
  {
5720
5957
  items: pendingFollowUps,
@@ -5725,10 +5962,11 @@ function Chat({
5725
5962
  canSendNow: stream.canSendPendingFollowUpNow,
5726
5963
  onSendNow: (id) => stream.sendPendingFollowUpNow(id),
5727
5964
  onEdit: handleEditPendingFollowUp,
5728
- onRemove: stream.removePendingFollowUp
5965
+ onRemove: stream.removePendingFollowUp,
5966
+ attachToComposer: true
5729
5967
  }
5730
5968
  ),
5731
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("form", { className: "flex items-end", onSubmit: handleSubmit, children: /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
5969
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("form", { className: "flex items-end", onSubmit: handleSubmit, children: /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
5732
5970
  "div",
5733
5971
  {
5734
5972
  className: cn(
@@ -5740,7 +5978,7 @@ function Chat({
5740
5978
  getRoundedClass(theme.radius)
5741
5979
  ),
5742
5980
  children: [
5743
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
5981
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
5744
5982
  ComposerMenu,
5745
5983
  {
5746
5984
  composer,
@@ -5750,7 +5988,7 @@ function Chat({
5750
5988
  disabled: missingConfig || isHistoryLoading
5751
5989
  }
5752
5990
  ),
5753
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
5991
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
5754
5992
  "textarea",
5755
5993
  {
5756
5994
  ref: composerInputRef,
@@ -5768,7 +6006,7 @@ function Chat({
5768
6006
  )
5769
6007
  }
5770
6008
  ),
5771
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
6009
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
5772
6010
  SendButton,
5773
6011
  {
5774
6012
  disabled: isSendDisabled,
@@ -5792,7 +6030,7 @@ function Chat({
5792
6030
  ]
5793
6031
  }
5794
6032
  ) }),
5795
- disclaimer?.text && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
6033
+ disclaimer?.text && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
5796
6034
  "p",
5797
6035
  {
5798
6036
  className: cn(
@@ -5802,9 +6040,9 @@ function Chat({
5802
6040
  children: disclaimer.text
5803
6041
  }
5804
6042
  ),
5805
- /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "mt-2 flex items-center justify-center gap-2 text-xs text-muted-foreground", children: [
5806
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { children: t("chat.poweredBy") }),
5807
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(ContextUsageIndicator, { className: "absolute right-4" })
6043
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: "mt-2 flex items-center justify-center gap-2 text-xs text-muted-foreground", children: [
6044
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { children: t("chat.poweredBy") }),
6045
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(ContextUsageIndicator, { className: "absolute right-4" })
5808
6046
  ] })
5809
6047
  ] })
5810
6048
  ]
@@ -5813,11 +6051,11 @@ function Chat({
5813
6051
  }
5814
6052
 
5815
6053
  // src/components/ui/input.tsx
5816
- var React23 = __toESM(require("react"), 1);
5817
- var import_jsx_runtime29 = require("react/jsx-runtime");
5818
- var Input = React23.forwardRef(
6054
+ var React24 = __toESM(require("react"), 1);
6055
+ var import_jsx_runtime30 = require("react/jsx-runtime");
6056
+ var Input = React24.forwardRef(
5819
6057
  ({ className, type, ...props }, ref) => {
5820
- return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
6058
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
5821
6059
  "input",
5822
6060
  {
5823
6061
  ref,
@@ -5834,10 +6072,10 @@ var Input = React23.forwardRef(
5834
6072
  Input.displayName = "Input";
5835
6073
 
5836
6074
  // src/components/ui/separator.tsx
5837
- var React24 = __toESM(require("react"), 1);
5838
- var import_jsx_runtime30 = require("react/jsx-runtime");
5839
- var Separator = React24.forwardRef(
5840
- ({ className, orientation = "horizontal", ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
6075
+ var React25 = __toESM(require("react"), 1);
6076
+ var import_jsx_runtime31 = require("react/jsx-runtime");
6077
+ var Separator = React25.forwardRef(
6078
+ ({ className, orientation = "horizontal", ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
5841
6079
  "div",
5842
6080
  {
5843
6081
  ref,