@xpert-ai/chatkit-ui 0.4.4 → 0.4.5

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 (336) hide show
  1. package/dist/app/assets/{_baseUniq-TMxiHmEt.js → _baseUniq-Co-XCsnp.js} +1 -1
  2. package/dist/app/assets/{abap-Ck-A--kS.js → abap--D_Kn6xP.js} +1 -1
  3. package/dist/app/assets/{abnf-ETC1zUJ3.js → abnf-D5WYHs_l.js} +1 -1
  4. package/dist/app/assets/{actionscript-D--OP--K.js → actionscript-DsVXzf-F.js} +1 -1
  5. package/dist/app/assets/{ada-CDetVdj6.js → ada-Cvy4GD3X.js} +1 -1
  6. package/dist/app/assets/{agda-BMJYMk52.js → agda-DsLk_pDK.js} +1 -1
  7. package/dist/app/assets/{al-Db9ENOd3.js → al-BeEwAGNu.js} +1 -1
  8. package/dist/app/assets/{antlr4-BW8d6D2N.js → antlr4-BPDPs4mt.js} +1 -1
  9. package/dist/app/assets/{apacheconf-BQPffoZs.js → apacheconf-DDa4MsSo.js} +1 -1
  10. package/dist/app/assets/{apex-BDhwAKiF.js → apex-IXxIiz3T.js} +1 -1
  11. package/dist/app/assets/{apl-BS9tU3lX.js → apl-_Xuh93xL.js} +1 -1
  12. package/dist/app/assets/{applescript-CAuteGTO.js → applescript-zF-7HGIh.js} +1 -1
  13. package/dist/app/assets/{aql-DlV09MnJ.js → aql-qapLE7vo.js} +1 -1
  14. package/dist/app/assets/{arc-D3dvEiRa.js → arc-R6XS2pBf.js} +1 -1
  15. package/dist/app/assets/{architectureDiagram-Q4EWVU46-BJNOb03u.js → architectureDiagram-Q4EWVU46-6z2emAH2.js} +1 -1
  16. package/dist/app/assets/{arduino-Fwp0Gqjn.js → arduino-2NlbDC0E.js} +1 -1
  17. package/dist/app/assets/{arff-D1ze2M6G.js → arff-15Fx0kni.js} +1 -1
  18. package/dist/app/assets/{asciidoc-DuSG0rE-.js → asciidoc-IGRk8vb3.js} +1 -1
  19. package/dist/app/assets/{asm6502-DiyS793s.js → asm6502-lyM25DlO.js} +1 -1
  20. package/dist/app/assets/{asmatmel-BgPjOvKk.js → asmatmel-DGRiY6RP.js} +1 -1
  21. package/dist/app/assets/{aspnet-DS6cVlO8.js → aspnet-DRHt5RUL.js} +1 -1
  22. package/dist/app/assets/{autohotkey-BhOfSyb7.js → autohotkey-DNI_3d2u.js} +1 -1
  23. package/dist/app/assets/{autoit-qharvHka.js → autoit-Tn0WXTkZ.js} +1 -1
  24. package/dist/app/assets/{avisynth-DuYY8hq9.js → avisynth-DZrXIifS.js} +1 -1
  25. package/dist/app/assets/{avro-idl-CVlpaCRn.js → avro-idl-DvnfR4q7.js} +1 -1
  26. package/dist/app/assets/{bash-CRdlMYvM.js → bash-bqRZI_pO.js} +1 -1
  27. package/dist/app/assets/{basic-DupsYiAg.js → basic-BaebTlRT.js} +1 -1
  28. package/dist/app/assets/{batch-SuJmV6In.js → batch-PcmijW6C.js} +1 -1
  29. package/dist/app/assets/{bbcode-BS6lj-GP.js → bbcode-6XIsStWc.js} +1 -1
  30. package/dist/app/assets/{bicep-rkAfEJ7t.js → bicep-CtazMCUu.js} +1 -1
  31. package/dist/app/assets/{birb-iXd4GkHj.js → birb-Bb-Z2Uoh.js} +1 -1
  32. package/dist/app/assets/{bison-DXF-YZke.js → bison-DMpTitx0.js} +1 -1
  33. package/dist/app/assets/{blockDiagram-DXYQGD6D-FJZrsqQ2.js → blockDiagram-DXYQGD6D-4zGz8PX5.js} +1 -1
  34. package/dist/app/assets/{bnf-H9nHTWOC.js → bnf-BgCmtG9K.js} +1 -1
  35. package/dist/app/assets/{brainfuck-6HhEdVzI.js → brainfuck-ZV2E8Tsx.js} +1 -1
  36. package/dist/app/assets/{brightscript-B00Ory-q.js → brightscript-BcUAceb3.js} +1 -1
  37. package/dist/app/assets/{bro-BguB8PwR.js → bro-CJMO1xO5.js} +1 -1
  38. package/dist/app/assets/{bsl-CnoKMnh1.js → bsl-BUH4KORj.js} +1 -1
  39. package/dist/app/assets/{c-BLZaQSul.js → c-jtWYEsXA.js} +1 -1
  40. package/dist/app/assets/{c4Diagram-AHTNJAMY-aFMpHsr7.js → c4Diagram-AHTNJAMY-BWtNBZjf.js} +1 -1
  41. package/dist/app/assets/{cfscript-Dj3sn5qb.js → cfscript-BRsXWjhc.js} +1 -1
  42. package/dist/app/assets/{chaiscript-B2Li8_Xi.js → chaiscript-Cyvk1xer.js} +1 -1
  43. package/dist/app/assets/channel-e2pCq0KM.js +1 -0
  44. package/dist/app/assets/{chunk-4BX2VUAB-mNkmACgc.js → chunk-4BX2VUAB-Cci3cX0w.js} +1 -1
  45. package/dist/app/assets/{chunk-4TB4RGXK-UImL1Qph.js → chunk-4TB4RGXK-Cc2Mhdt_.js} +1 -1
  46. package/dist/app/assets/{chunk-55IACEB6-BrbuP7ej.js → chunk-55IACEB6-BCuokoIJ.js} +1 -1
  47. package/dist/app/assets/{chunk-EDXVE4YY-nIuwelfS.js → chunk-EDXVE4YY-BniMDhnr.js} +1 -1
  48. package/dist/app/assets/{chunk-FMBD7UC4-BcWvK3ua.js → chunk-FMBD7UC4-BZgeDsZW.js} +1 -1
  49. package/dist/app/assets/{chunk-OYMX7WX6-NFSrvN2K.js → chunk-OYMX7WX6-DNtQg1UI.js} +1 -1
  50. package/dist/app/assets/{chunk-QZHKN3VN-A-S7sUFp.js → chunk-QZHKN3VN-CYOkyP3f.js} +1 -1
  51. package/dist/app/assets/{chunk-YZCP3GAM-NsOgLJm6.js → chunk-YZCP3GAM-DrNq3DSp.js} +1 -1
  52. package/dist/app/assets/{cil-BSYlNEvs.js → cil-xB1Wcx8v.js} +1 -1
  53. package/dist/app/assets/classDiagram-6PBFFD2Q-DHVJ7GQ2.js +1 -0
  54. package/dist/app/assets/classDiagram-v2-HSJHXN6E-DHVJ7GQ2.js +1 -0
  55. package/dist/app/assets/{clike-DaoHXpYs.js → clike-Bys-F0y3.js} +1 -1
  56. package/dist/app/assets/{clojure-CtOotL0u.js → clojure-X2Ur1GCR.js} +1 -1
  57. package/dist/app/assets/clone-CepWRlEk.js +1 -0
  58. package/dist/app/assets/{cmake-BSiUfJHf.js → cmake-BV05wnad.js} +1 -1
  59. package/dist/app/assets/{cobol-Blq62nOS.js → cobol-DmbS5Ovj.js} +1 -1
  60. package/dist/app/assets/{coffeescript-wfCQi2dy.js → coffeescript-NB44yUqU.js} +1 -1
  61. package/dist/app/assets/{concurnas-BptxXLM6.js → concurnas-DRly0Ymz.js} +1 -1
  62. package/dist/app/assets/{coq-m0xx6QVk.js → coq-5BMX0a02.js} +1 -1
  63. package/dist/app/assets/{core-BlK5liku.js → core-BDQ00Bae.js} +1 -1
  64. package/dist/app/assets/{cose-bilkent-S5V4N54A-BVlJJjjG.js → cose-bilkent-S5V4N54A-C5sw6sBK.js} +1 -1
  65. package/dist/app/assets/{cpp-DrIwjXt4.js → cpp-DGTd--nV.js} +1 -1
  66. package/dist/app/assets/{crystal-B2OownN0.js → crystal-04-7jCUz.js} +1 -1
  67. package/dist/app/assets/{csharp-C8hT9u31.js → csharp-BekrIY2o.js} +1 -1
  68. package/dist/app/assets/{cshtml-Bqk4UcKH.js → cshtml-DRaoghIv.js} +1 -1
  69. package/dist/app/assets/{csp-B23dqIVk.js → csp-9-yRddNx.js} +1 -1
  70. package/dist/app/assets/{css-C7bAsgCD.js → css-CAtlVqs0.js} +1 -1
  71. package/dist/app/assets/{css-extras-BxAj6HIM.js → css-extras-CWVDDT-t.js} +1 -1
  72. package/dist/app/assets/{csv-CITuvdZl.js → csv-Dg-zB1qs.js} +1 -1
  73. package/dist/app/assets/{cypher-BdWaNEPh.js → cypher-4IbDZc8Y.js} +1 -1
  74. package/dist/app/assets/{d-DWzNEoy_.js → d-B7r6CIW_.js} +1 -1
  75. package/dist/app/assets/{dagre-KV5264BT-Cwq32s4A.js → dagre-KV5264BT-Aa6ga6Tg.js} +1 -1
  76. package/dist/app/assets/{dart-Cct8-2Yi.js → dart-33q2tN5Y.js} +1 -1
  77. package/dist/app/assets/{dataweave-sykaGSqb.js → dataweave-_KZXrqme.js} +1 -1
  78. package/dist/app/assets/{dax-CZ69LQsy.js → dax-bZvO9T2D.js} +1 -1
  79. package/dist/app/assets/{dhall-DThgzXZx.js → dhall-CMmS_d1I.js} +1 -1
  80. package/dist/app/assets/{diagram-5BDNPKRD-BfciTHMz.js → diagram-5BDNPKRD-CWOgCaWs.js} +1 -1
  81. package/dist/app/assets/{diagram-G4DWMVQ6-Q37x31io.js → diagram-G4DWMVQ6-pXmi3PKB.js} +1 -1
  82. package/dist/app/assets/{diagram-MMDJMWI5-Cyyx6ZUw.js → diagram-MMDJMWI5-D6L1aAmr.js} +1 -1
  83. package/dist/app/assets/{diagram-TYMM5635-BUh40K6u.js → diagram-TYMM5635-Bnbk8hJL.js} +1 -1
  84. package/dist/app/assets/{diff-UDoi3FBV.js → diff-BMnhXRfO.js} +1 -1
  85. package/dist/app/assets/{django-CUQxRbf9.js → django-CwyRKLji.js} +1 -1
  86. package/dist/app/assets/{dns-zone-file-9UmAuR-l.js → dns-zone-file-CH2YmErm.js} +1 -1
  87. package/dist/app/assets/{docker-vhZ6HugE.js → docker-CMu6fCBm.js} +1 -1
  88. package/dist/app/assets/{dot-Dlao8ZwH.js → dot-DbQdbB35.js} +1 -1
  89. package/dist/app/assets/{ebnf-BfWJycwn.js → ebnf-Dv8o3Xd5.js} +1 -1
  90. package/dist/app/assets/{editorconfig-DsrBDVtJ.js → editorconfig-DGpNYUTF.js} +1 -1
  91. package/dist/app/assets/{eiffel-ZZ7Z0b2_.js → eiffel-DlwnHLpb.js} +1 -1
  92. package/dist/app/assets/{ejs-SLmpmzms.js → ejs-CnitBaIQ.js} +1 -1
  93. package/dist/app/assets/{elixir-BdkxsFt4.js → elixir-BwncS48q.js} +1 -1
  94. package/dist/app/assets/{elm-DSgkBbD-.js → elm-DIeTEpXB.js} +1 -1
  95. package/dist/app/assets/{erDiagram-SMLLAGMA-CKj18meA.js → erDiagram-SMLLAGMA-DCVTOQcd.js} +1 -1
  96. package/dist/app/assets/{erb-AX38416h.js → erb-DLShoXNV.js} +1 -1
  97. package/dist/app/assets/{erlang-DY2BVWMP.js → erlang-CymPR6rz.js} +1 -1
  98. package/dist/app/assets/{etlua-BSaUvZH7.js → etlua-DnGxLY3M.js} +1 -1
  99. package/dist/app/assets/{excel-formula-CGTOeZhB.js → excel-formula-BH7DFVmw.js} +1 -1
  100. package/dist/app/assets/{factor-CtvOHq60.js → factor-Bh-cxy91.js} +1 -1
  101. package/dist/app/assets/{false-C4FtFKhi.js → false-Bbvyie5f.js} +1 -1
  102. package/dist/app/assets/{firestore-security-rules-Z8TPJQpU.js → firestore-security-rules-C1Z4GDy7.js} +1 -1
  103. package/dist/app/assets/{flow-0LSCeVxZ.js → flow-CEb_LmQm.js} +1 -1
  104. package/dist/app/assets/{flowDiagram-DWJPFMVM-CmW1pCPp.js → flowDiagram-DWJPFMVM-t4rWU0cl.js} +1 -1
  105. package/dist/app/assets/{fortran-DR7--sEx.js → fortran-BNasWrrZ.js} +1 -1
  106. package/dist/app/assets/{fsharp-CoiFf2ek.js → fsharp-BsCVJk6E.js} +1 -1
  107. package/dist/app/assets/{ftl-BsfZdglK.js → ftl-jRCUJODD.js} +1 -1
  108. package/dist/app/assets/{ganttDiagram-T4ZO3ILL-C1vWI0vT.js → ganttDiagram-T4ZO3ILL-CIt95e25.js} +1 -1
  109. package/dist/app/assets/{gap-D5rs685K.js → gap-BNZC8mW7.js} +1 -1
  110. package/dist/app/assets/{gcode-ioide_II.js → gcode-Dm32zQCL.js} +1 -1
  111. package/dist/app/assets/{gdscript-C1ZWRkkr.js → gdscript-nnhWLrN6.js} +1 -1
  112. package/dist/app/assets/{gedcom-DS1yKzLz.js → gedcom-CK-ySXEa.js} +1 -1
  113. package/dist/app/assets/{gherkin-uIhE-MbH.js → gherkin--zbB3aYH.js} +1 -1
  114. package/dist/app/assets/{git-B5BRNNT7.js → git-DiWVe3eJ.js} +1 -1
  115. package/dist/app/assets/{gitGraphDiagram-UUTBAWPF-DEg-duQZ.js → gitGraphDiagram-UUTBAWPF-SzhkWrKD.js} +1 -1
  116. package/dist/app/assets/{glsl-B9fhkctz.js → glsl-D1fReIPw.js} +1 -1
  117. package/dist/app/assets/{gml-offEglBU.js → gml-BDyUxEuB.js} +1 -1
  118. package/dist/app/assets/{gn-FZ0bWEld.js → gn-y9O1wUj9.js} +1 -1
  119. package/dist/app/assets/{go-BIRlaT1a.js → go-BluFqfDq.js} +1 -1
  120. package/dist/app/assets/{go-module-SjD6zijS.js → go-module-DZRzQTXf.js} +1 -1
  121. package/dist/app/assets/{graph-sBvKxujm.js → graph-CqvHVXoE.js} +1 -1
  122. package/dist/app/assets/{graphql-Be74WDAY.js → graphql-W2OnfZNH.js} +1 -1
  123. package/dist/app/assets/{groovy-ChbEq3v0.js → groovy-CJ1kbbBa.js} +1 -1
  124. package/dist/app/assets/{haml-C6FObrUo.js → haml-CrhrA9XY.js} +1 -1
  125. package/dist/app/assets/{handlebars-36OFp0YX.js → handlebars-EgGfXI7t.js} +1 -1
  126. package/dist/app/assets/{haskell-DuohgBoX.js → haskell-Bj5MfGGI.js} +1 -1
  127. package/dist/app/assets/{haxe-CNMh78ZV.js → haxe-BdDpk8xR.js} +1 -1
  128. package/dist/app/assets/{hcl-BpxVSY5Z.js → hcl-D9OwvylQ.js} +1 -1
  129. package/dist/app/assets/{hlsl-DnxGKW3m.js → hlsl-562nbzk6.js} +1 -1
  130. package/dist/app/assets/{hoon-XUklDmVn.js → hoon-BqdgVrcr.js} +1 -1
  131. package/dist/app/assets/{hpkp-Did6vsrG.js → hpkp-EH8H3Hom.js} +1 -1
  132. package/dist/app/assets/{hsts-DS9blmxt.js → hsts-QIGmRf78.js} +1 -1
  133. package/dist/app/assets/{http-DA2WLFiQ.js → http-CzfjEVlY.js} +1 -1
  134. package/dist/app/assets/{ichigojam-DdOMt5rE.js → ichigojam-D98a8BcA.js} +1 -1
  135. package/dist/app/assets/{icon-PVJAVx5C.js → icon-DBD-5k6c.js} +1 -1
  136. package/dist/app/assets/{icu-message-format-6jii1RVV.js → icu-message-format-BYT71AMs.js} +1 -1
  137. package/dist/app/assets/{idris-UxX24g1J.js → idris-B7zJwyc1.js} +1 -1
  138. package/dist/app/assets/{iecst-BynNGYT2.js → iecst-SesII_E4.js} +1 -1
  139. package/dist/app/assets/{ignore-4EVq7-cE.js → ignore-B6Rk10df.js} +1 -1
  140. package/dist/app/assets/index-CmKBuFcH.css +1 -0
  141. package/dist/app/assets/{index-CAfb2sup.js → index-DH__JuG8.js} +196 -196
  142. package/dist/app/assets/{infoDiagram-42DDH7IO-BfATVLk8.js → infoDiagram-42DDH7IO-B_FQWO4F.js} +1 -1
  143. package/dist/app/assets/{inform7-BXb820VQ.js → inform7-h2cFjWGx.js} +1 -1
  144. package/dist/app/assets/{ini-Cmr0cBrX.js → ini-BS51ySt6.js} +1 -1
  145. package/dist/app/assets/{io-BdLksOc2.js → io-B4AFlnDh.js} +1 -1
  146. package/dist/app/assets/{ishikawaDiagram-UXIWVN3A-B6I8Yqfq.js → ishikawaDiagram-UXIWVN3A-1rRuzx1s.js} +1 -1
  147. package/dist/app/assets/{j-CAftgdTa.js → j-Drz8g_1M.js} +1 -1
  148. package/dist/app/assets/{java-fwAzePp5.js → java-DCpfLevZ.js} +1 -1
  149. package/dist/app/assets/{javadoc-BcYkNCK0.js → javadoc-DXIzKQcq.js} +1 -1
  150. package/dist/app/assets/{javadoclike-B57hwpBc.js → javadoclike-C8SmsTQv.js} +1 -1
  151. package/dist/app/assets/{javascript-u1gm812-.js → javascript-uumTubEW.js} +1 -1
  152. package/dist/app/assets/{javastacktrace-cj9BHFXH.js → javastacktrace-B-eU9XLD.js} +1 -1
  153. package/dist/app/assets/{jexl-DrO8YpRi.js → jexl-D4977EKW.js} +1 -1
  154. package/dist/app/assets/{jolie-C5CF-EiA.js → jolie-DLawqTad.js} +1 -1
  155. package/dist/app/assets/{journeyDiagram-VCZTEJTY-62Da_9fB.js → journeyDiagram-VCZTEJTY-DrQg892C.js} +1 -1
  156. package/dist/app/assets/{jq-BQS35fYF.js → jq-Cm1vS58Z.js} +1 -1
  157. package/dist/app/assets/{js-extras-Dc8Ge9lP.js → js-extras-RCYpP2to.js} +1 -1
  158. package/dist/app/assets/{js-templates-BChMs7zu.js → js-templates-767pf_M_.js} +1 -1
  159. package/dist/app/assets/{jsdoc-Dsh0OaeE.js → jsdoc-DTvTCxfG.js} +1 -1
  160. package/dist/app/assets/{json-DSLB2HLl.js → json-Dy-V79-1.js} +1 -1
  161. package/dist/app/assets/{json5-cRfUF1uJ.js → json5-BEmUoI2s.js} +1 -1
  162. package/dist/app/assets/{jsonp-DXOWbjE0.js → jsonp-Box0_wdw.js} +1 -1
  163. package/dist/app/assets/{jsstacktrace-DlgtDbr8.js → jsstacktrace-D4k7LJFI.js} +1 -1
  164. package/dist/app/assets/{jsx-CyFeFIQM.js → jsx-UHXI_vWR.js} +1 -1
  165. package/dist/app/assets/{julia-vGoL8D9z.js → julia-DNluswh2.js} +1 -1
  166. package/dist/app/assets/{kanban-definition-6JOO6SKY-JAtH1H2c.js → kanban-definition-6JOO6SKY-DCoBgIKn.js} +1 -1
  167. package/dist/app/assets/{keepalived-u6JnaMHj.js → keepalived-cL1_TOGJ.js} +1 -1
  168. package/dist/app/assets/{keyman-C2x0si7Y.js → keyman-CgmsT3ZD.js} +1 -1
  169. package/dist/app/assets/{kotlin-l8__XfWl.js → kotlin-B-7C62fR.js} +1 -1
  170. package/dist/app/assets/{kumir-CaQaIRBf.js → kumir-BmZSzZs3.js} +1 -1
  171. package/dist/app/assets/{kusto-DYDxqji-.js → kusto-Bd4bditr.js} +1 -1
  172. package/dist/app/assets/{latex-D2qjbQmB.js → latex-B6Yn44p1.js} +1 -1
  173. package/dist/app/assets/{latte-CmbmgbPe.js → latte-D_VkuuMY.js} +1 -1
  174. package/dist/app/assets/{layout-BMTuSUP-.js → layout-CuQBqeJF.js} +1 -1
  175. package/dist/app/assets/{less-DpljErLD.js → less-CNL3ODIy.js} +1 -1
  176. package/dist/app/assets/{lilypond-DAeqUsI_.js → lilypond-Bvambxk4.js} +1 -1
  177. package/dist/app/assets/{linear-CqSIeBnp.js → linear-BFLcIrl3.js} +1 -1
  178. package/dist/app/assets/{liquid-Bo11FNrj.js → liquid-B-rCvqgj.js} +1 -1
  179. package/dist/app/assets/{lisp-BNBGpNSq.js → lisp-DAPeLOCL.js} +1 -1
  180. package/dist/app/assets/{livescript-CNBuUGwr.js → livescript-DhdAKU5C.js} +1 -1
  181. package/dist/app/assets/{llvm-BCQgrmMc.js → llvm-CZUCpwhn.js} +1 -1
  182. package/dist/app/assets/{log-7C67ffIH.js → log-DWq76M48.js} +1 -1
  183. package/dist/app/assets/{lolcode-tyVOf0-i.js → lolcode-Cpeb2C7M.js} +1 -1
  184. package/dist/app/assets/{lua-D1tjiZGJ.js → lua-VuQhfB0e.js} +1 -1
  185. package/dist/app/assets/{magma-DvpErL5E.js → magma-C6-R8Pis.js} +1 -1
  186. package/dist/app/assets/{makefile-DVopM6_I.js → makefile-C8sXNjev.js} +1 -1
  187. package/dist/app/assets/{markdown-zDaJjBqz.js → markdown-Dr_2eVkJ.js} +1 -1
  188. package/dist/app/assets/{markup-Dn7T0Xgl.js → markup-DYRaVR0L.js} +1 -1
  189. package/dist/app/assets/{markup-templating-jmwD3Mv5.js → markup-templating-Clq2Wdtu.js} +1 -1
  190. package/dist/app/assets/{matlab-Dmd8VzKM.js → matlab-N7ULHzkN.js} +1 -1
  191. package/dist/app/assets/{maxscript-FjCyY0j5.js → maxscript-C_UH_c0Y.js} +1 -1
  192. package/dist/app/assets/{mel-BDzXY19C.js → mel-biAclKO6.js} +1 -1
  193. package/dist/app/assets/{mermaid-lu-_cgAH.js → mermaid-cA3X8ng1.js} +1 -1
  194. package/dist/app/assets/{min-DYtuudAi.js → min-DNXX2fdQ.js} +1 -1
  195. package/dist/app/assets/{mindmap-definition-QFDTVHPH-C0LlKYnG.js → mindmap-definition-QFDTVHPH-B3hDdQGV.js} +1 -1
  196. package/dist/app/assets/{mizar-BDWlOEMd.js → mizar-DkeIuoWx.js} +1 -1
  197. package/dist/app/assets/{mongodb-BqhqCTUF.js → mongodb-CZtDL2oy.js} +1 -1
  198. package/dist/app/assets/{monkey-DD_wkxjO.js → monkey-B7rkJ-YN.js} +1 -1
  199. package/dist/app/assets/{moonscript-5BliHqu8.js → moonscript-BrAkE7P-.js} +1 -1
  200. package/dist/app/assets/{n1ql-BI9d8-dk.js → n1ql-CAwurqwa.js} +1 -1
  201. package/dist/app/assets/{n4js-CiGP0jcT.js → n4js-CQMx2F8M.js} +1 -1
  202. package/dist/app/assets/{nand2tetris-hdl-h4B9YPVX.js → nand2tetris-hdl-C_WH3v-f.js} +1 -1
  203. package/dist/app/assets/{naniscript-0FP5ZgNv.js → naniscript-BIg6AoSC.js} +1 -1
  204. package/dist/app/assets/{nasm-CfsxN3sz.js → nasm-JWQkVK3O.js} +1 -1
  205. package/dist/app/assets/{neon-Ds1qWnTS.js → neon-CCu-JZXF.js} +1 -1
  206. package/dist/app/assets/{nevod-CpogMq0t.js → nevod-DQ_tL5xo.js} +1 -1
  207. package/dist/app/assets/{nginx-CBAywKyc.js → nginx-CE0GIB_t.js} +1 -1
  208. package/dist/app/assets/{nim-CKndoR7P.js → nim-BQkGgHx1.js} +1 -1
  209. package/dist/app/assets/{nix-C2aGN04i.js → nix-DjPqNtXA.js} +1 -1
  210. package/dist/app/assets/{nsis-BS2FD5Ui.js → nsis-B0wDo6fc.js} +1 -1
  211. package/dist/app/assets/{objectivec-BV3I8zfq.js → objectivec-BOWTft_L.js} +1 -1
  212. package/dist/app/assets/{ocaml-CumNTZrg.js → ocaml-rGGzL-J8.js} +1 -1
  213. package/dist/app/assets/{opencl-BA7HxeS1.js → opencl-7DwawK0u.js} +1 -1
  214. package/dist/app/assets/{openqasm-CVlYcfEb.js → openqasm-BoZmVcpe.js} +1 -1
  215. package/dist/app/assets/{oz-BgNzyTQm.js → oz-k8zQh74U.js} +1 -1
  216. package/dist/app/assets/{parigp-HAeKHx70.js → parigp-DOF_5XSw.js} +1 -1
  217. package/dist/app/assets/{parser-DBm9W7gH.js → parser-Bn3oD8Fj.js} +1 -1
  218. package/dist/app/assets/{pascal-DVVWX7c3.js → pascal-BMod2MBu.js} +1 -1
  219. package/dist/app/assets/{pascaligo-9sC0JINE.js → pascaligo-VMBK85nU.js} +1 -1
  220. package/dist/app/assets/{pcaxis-BExTG1b5.js → pcaxis-DtO95BO9.js} +1 -1
  221. package/dist/app/assets/{peoplecode-BYMaBssU.js → peoplecode-B6669Uht.js} +1 -1
  222. package/dist/app/assets/{perl-BnEaJyRt.js → perl-BWa2t7hE.js} +1 -1
  223. package/dist/app/assets/{php-DTvaAe6L.js → php-D1EHwdfc.js} +1 -1
  224. package/dist/app/assets/{php-extras-BryvmqOr.js → php-extras-BkzLJdMh.js} +1 -1
  225. package/dist/app/assets/{phpdoc-DNQcJB7n.js → phpdoc-Cjl8GbI3.js} +1 -1
  226. package/dist/app/assets/{pieDiagram-DEJITSTG-CNyUzOEA.js → pieDiagram-DEJITSTG-BOQDZEsp.js} +1 -1
  227. package/dist/app/assets/{plsql-C53Rqwl3.js → plsql-C9d_4ASZ.js} +1 -1
  228. package/dist/app/assets/{powerquery-CBDVLr0E.js → powerquery-B8dvsoEG.js} +1 -1
  229. package/dist/app/assets/{powershell-BTjXHGcn.js → powershell-B_E5Ls3m.js} +1 -1
  230. package/dist/app/assets/{processing-LU1Q4Xrp.js → processing-JtrZ9RaV.js} +1 -1
  231. package/dist/app/assets/{prolog-CAkqp_8e.js → prolog-CqFUVRIw.js} +1 -1
  232. package/dist/app/assets/{promql-qm_oe_qq.js → promql-CAbgJv1n.js} +1 -1
  233. package/dist/app/assets/{properties-CkopXTtp.js → properties-BngV24FT.js} +1 -1
  234. package/dist/app/assets/{protobuf-Y8NjvM3i.js → protobuf-Bi9iRUiu.js} +1 -1
  235. package/dist/app/assets/{psl-C6tOp1_K.js → psl-pDjrt0B9.js} +1 -1
  236. package/dist/app/assets/{pug-CS_9WzOj.js → pug-DioknANs.js} +1 -1
  237. package/dist/app/assets/{puppet-CUp_EgdL.js → puppet-ML2ON0Nh.js} +1 -1
  238. package/dist/app/assets/{pure-Blo1Mo0B.js → pure-DhCM2LcO.js} +1 -1
  239. package/dist/app/assets/{purebasic-Ca8-6hSG.js → purebasic-BBRpNPNK.js} +1 -1
  240. package/dist/app/assets/{purescript-NTJk_TqU.js → purescript-BCyPbnZA.js} +1 -1
  241. package/dist/app/assets/{q-B6Zcp4zx.js → q-AswilSny.js} +1 -1
  242. package/dist/app/assets/{qml-BWFD-5NF.js → qml-CmAUtWqC.js} +1 -1
  243. package/dist/app/assets/{qore-CDatToXb.js → qore-Bv9pFdiR.js} +1 -1
  244. package/dist/app/assets/{qsharp-D7nj5IOf.js → qsharp-48tPx5Mz.js} +1 -1
  245. package/dist/app/assets/{quadrantDiagram-34T5L4WZ-DhG4JpPn.js → quadrantDiagram-34T5L4WZ-xfjbVVZu.js} +1 -1
  246. package/dist/app/assets/{r-B1QI-AqR.js → r-D7-cDDS_.js} +1 -1
  247. package/dist/app/assets/{racket-B4nDtIWF.js → racket-rfJjsp9a.js} +1 -1
  248. package/dist/app/assets/{reason-JWfMNNZ5.js → reason-DBC0zi5i.js} +1 -1
  249. package/dist/app/assets/{regex-CJNXHeEg.js → regex-DnBFBfKd.js} +1 -1
  250. package/dist/app/assets/{rego-LQxbhCWr.js → rego-B4yEjn-8.js} +1 -1
  251. package/dist/app/assets/{renpy-BDFd6l-h.js → renpy-D_4quYLX.js} +1 -1
  252. package/dist/app/assets/{requirementDiagram-MS252O5E-VIZnTHe_.js → requirementDiagram-MS252O5E-ykcp6OKq.js} +1 -1
  253. package/dist/app/assets/{rest-CGwOWaqn.js → rest-DE5aTQbn.js} +1 -1
  254. package/dist/app/assets/{rip-BIv3Yp6n.js → rip-nLkeQy-_.js} +1 -1
  255. package/dist/app/assets/{roboconf-DGg8AzxQ.js → roboconf-fk8WiTzj.js} +1 -1
  256. package/dist/app/assets/{robotframework-Cu4U-LJt.js → robotframework-CT4iaIxT.js} +1 -1
  257. package/dist/app/assets/{ruby-jJNeRq1e.js → ruby-cQyytj4i.js} +1 -1
  258. package/dist/app/assets/{rust-DBMO8o-k.js → rust-CWJm_bSY.js} +1 -1
  259. package/dist/app/assets/{sankeyDiagram-XADWPNL6-D109kLbO.js → sankeyDiagram-XADWPNL6-Bhogh-O-.js} +1 -1
  260. package/dist/app/assets/{sas-BXMgxJ5D.js → sas-DoRGa1wg.js} +1 -1
  261. package/dist/app/assets/{sass-BXkCPsxr.js → sass-LYaBIZKs.js} +1 -1
  262. package/dist/app/assets/{scala-A2dbBlRv.js → scala-BZjhJr8S.js} +1 -1
  263. package/dist/app/assets/{scheme-5YfcUkz6.js → scheme-D01CiDze.js} +1 -1
  264. package/dist/app/assets/{scss-CKQrod7s.js → scss-Da6GwvfN.js} +1 -1
  265. package/dist/app/assets/{sequenceDiagram-FGHM5R23-BWFRA3S4.js → sequenceDiagram-FGHM5R23-ecYbruEX.js} +1 -1
  266. package/dist/app/assets/{shell-session-7xRIeziW.js → shell-session-g6FrqTiP.js} +1 -1
  267. package/dist/app/assets/{smali-Dp3s5TDa.js → smali-BSpX36tk.js} +1 -1
  268. package/dist/app/assets/{smalltalk-Cn6dJ_DR.js → smalltalk-Bq_Gsc0F.js} +1 -1
  269. package/dist/app/assets/{smarty-B62Phcz3.js → smarty-D3fU2RbY.js} +1 -1
  270. package/dist/app/assets/{sml-CRGJcRiK.js → sml-TZkjEgtP.js} +1 -1
  271. package/dist/app/assets/{solidity-CmijFrY5.js → solidity-DLkuvBc2.js} +1 -1
  272. package/dist/app/assets/{solution-file-CMlGbfWf.js → solution-file-BqI5xPXQ.js} +1 -1
  273. package/dist/app/assets/{soy-DfV0L1AX.js → soy-BCG5CQr6.js} +1 -1
  274. package/dist/app/assets/{sparql-UU0JEsJN.js → sparql-DQQsm_l4.js} +1 -1
  275. package/dist/app/assets/{splunk-spl-CoMa2odZ.js → splunk-spl-bY7_uYjh.js} +1 -1
  276. package/dist/app/assets/{sqf-BK0u4w1w.js → sqf-BZo7hu6i.js} +1 -1
  277. package/dist/app/assets/{sql-DNyh2fmD.js → sql-DqFLgmXx.js} +1 -1
  278. package/dist/app/assets/{squirrel-inCt7JHG.js → squirrel-CiX2EfEw.js} +1 -1
  279. package/dist/app/assets/{stan-Doi4GinI.js → stan-CMhpMP7k.js} +1 -1
  280. package/dist/app/assets/{stateDiagram-FHFEXIEX-BrDgd0rD.js → stateDiagram-FHFEXIEX-v9Gsby_c.js} +1 -1
  281. package/dist/app/assets/stateDiagram-v2-QKLJ7IA2-2pX5wx_N.js +1 -0
  282. package/dist/app/assets/{stylus-B--PyNIy.js → stylus-CenUxfuN.js} +1 -1
  283. package/dist/app/assets/{swift-CzynVDjb.js → swift-BVjGHQuG.js} +1 -1
  284. package/dist/app/assets/{systemd-BzRtQaxY.js → systemd-CpOXAdLf.js} +1 -1
  285. package/dist/app/assets/{t4-cs-DRmWJZc9.js → t4-cs-CS9lJ-K0.js} +1 -1
  286. package/dist/app/assets/{t4-templating-DPZ7hNhf.js → t4-templating-hj-TNDsq.js} +1 -1
  287. package/dist/app/assets/{t4-vb-DJ-j33dQ.js → t4-vb-Ck7mu1gJ.js} +1 -1
  288. package/dist/app/assets/{tap-Cxx_PgyE.js → tap-DaH9gaoq.js} +1 -1
  289. package/dist/app/assets/{tcl-Bs4a0Dfs.js → tcl-DNIWr75O.js} +1 -1
  290. package/dist/app/assets/{textile-BoRmwUMy.js → textile-Bv4nPa6s.js} +1 -1
  291. package/dist/app/assets/{timeline-definition-GMOUNBTQ-CzfKhXYm.js → timeline-definition-GMOUNBTQ-D6n0S-ku.js} +1 -1
  292. package/dist/app/assets/{toml-Dt03eQXy.js → toml-DF3HfhqH.js} +1 -1
  293. package/dist/app/assets/{tremor-DAjHRWBi.js → tremor-Bvh1Y6zY.js} +1 -1
  294. package/dist/app/assets/{tt2-BeNFgyN2.js → tt2-Dv5tLBlM.js} +1 -1
  295. package/dist/app/assets/{turtle-BzI8BWIV.js → turtle-DkLAfnik.js} +1 -1
  296. package/dist/app/assets/{twig-Df--35lw.js → twig-S_GHUqZa.js} +1 -1
  297. package/dist/app/assets/{typescript-BAKA2fdq.js → typescript-Cu71LnVi.js} +1 -1
  298. package/dist/app/assets/{typoscript-r0z-RS5y.js → typoscript-CtN4Jy8Z.js} +1 -1
  299. package/dist/app/assets/{unrealscript-dT1dIQam.js → unrealscript-BRjPcrs6.js} +1 -1
  300. package/dist/app/assets/{uorazor-C4wimjxD.js → uorazor-D4ckTG59.js} +1 -1
  301. package/dist/app/assets/{uri-D7oE-PoJ.js → uri-DQCryf4S.js} +1 -1
  302. package/dist/app/assets/{v-DwJtB8Vm.js → v-Bx-_iyUf.js} +1 -1
  303. package/dist/app/assets/{vala-D0mTgP2k.js → vala-C-8psoRf.js} +1 -1
  304. package/dist/app/assets/{vbnet-BJfu6o8X.js → vbnet-Do4mtB7R.js} +1 -1
  305. package/dist/app/assets/{velocity-BJB5m8fQ.js → velocity-Drww5v_3.js} +1 -1
  306. package/dist/app/assets/{vennDiagram-DHZGUBPP-Cgb8-zyn.js → vennDiagram-DHZGUBPP-tW8wVSRe.js} +1 -1
  307. package/dist/app/assets/{verilog-Ci2D8dFC.js → verilog-B8pepi-H.js} +1 -1
  308. package/dist/app/assets/{vhdl-DcEoROdo.js → vhdl-CuO3hi8I.js} +1 -1
  309. package/dist/app/assets/{vim-BzWQ6rL0.js → vim-DSsNung_.js} +1 -1
  310. package/dist/app/assets/{visual-basic-C9jUzYfG.js → visual-basic-CZIqY5t6.js} +1 -1
  311. package/dist/app/assets/{wardley-RL74JXVD-Btw_ODEd.js → wardley-RL74JXVD-D7c8EbFm.js} +1 -1
  312. package/dist/app/assets/{wardleyDiagram-NUSXRM2D-B84YCqkj.js → wardleyDiagram-NUSXRM2D-Br8nJ8eB.js} +1 -1
  313. package/dist/app/assets/{warpscript-BVhze8vt.js → warpscript-DxQu8-1N.js} +1 -1
  314. package/dist/app/assets/{wasm-zAS-bEPo.js → wasm-TvYG9PxF.js} +1 -1
  315. package/dist/app/assets/{web-idl-G3r7q-fK.js → web-idl-Cz41qHgE.js} +1 -1
  316. package/dist/app/assets/{wiki-exG7pUTP.js → wiki-Dpvt1md3.js} +1 -1
  317. package/dist/app/assets/{wolfram-C_Mj1MJG.js → wolfram-Bg7HPXEQ.js} +1 -1
  318. package/dist/app/assets/{wren-CdV44Tnx.js → wren-D5Yecsqj.js} +1 -1
  319. package/dist/app/assets/{xeora-2KKn4X5q.js → xeora-Cg-n24u9.js} +1 -1
  320. package/dist/app/assets/{xml-doc-DLPYHfMi.js → xml-doc-Eti4SXoM.js} +1 -1
  321. package/dist/app/assets/{xojo-B6ggSUBg.js → xojo-DhQBW3jL.js} +1 -1
  322. package/dist/app/assets/{xquery-B2tHFdf8.js → xquery-DrnMYyrL.js} +1 -1
  323. package/dist/app/assets/{xychartDiagram-5P7HB3ND-CWuLJaAz.js → xychartDiagram-5P7HB3ND-D0kV7MNO.js} +1 -1
  324. package/dist/app/assets/{yaml-BkS8H31d.js → yaml-DiOrjhia.js} +1 -1
  325. package/dist/app/assets/{yang-DT_nuuZI.js → yang-B38xE-H2.js} +1 -1
  326. package/dist/app/assets/{zig-B0zYSJvR.js → zig-C7oerdaD.js} +1 -1
  327. package/dist/app/index.html +2 -2
  328. package/dist/index.cjs +952 -431
  329. package/dist/index.js +948 -427
  330. package/package.json +3 -3
  331. package/dist/app/assets/channel-DYgM_zKD.js +0 -1
  332. package/dist/app/assets/classDiagram-6PBFFD2Q-G-7-i5lY.js +0 -1
  333. package/dist/app/assets/classDiagram-v2-HSJHXN6E-G-7-i5lY.js +0 -1
  334. package/dist/app/assets/clone-4Dzzc8I_.js +0 -1
  335. package/dist/app/assets/index-E0F-_Dk8.css +0 -1
  336. package/dist/app/assets/stateDiagram-v2-QKLJ7IA2-DrNQuVcu.js +0 -1
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  // src/components/chat.tsx
2
- import * as React49 from "react";
2
+ import * as React50 from "react";
3
3
  import {
4
4
  ArrowDown as ArrowDown2,
5
5
  ChevronDown as ChevronDown5,
@@ -1680,6 +1680,21 @@ var en_US_default = {
1680
1680
  loading: "Loading",
1681
1681
  thinking: "Thinking",
1682
1682
  answering: "Answering",
1683
+ navigation: {
1684
+ label: "Message navigation",
1685
+ system: "System",
1686
+ tool: "Tool",
1687
+ event: "Event",
1688
+ message: "Message",
1689
+ image: "Image",
1690
+ memory: "Memory",
1691
+ widget: "Widget",
1692
+ mcpApp: "MCP App",
1693
+ attachment: "Attachment",
1694
+ reference: "Reference",
1695
+ capability: "Capability",
1696
+ moreTags: "+{{count}}"
1697
+ },
1683
1698
  mcpApp: {
1684
1699
  loading: "Loading MCP App"
1685
1700
  },
@@ -2073,6 +2088,21 @@ var zh_CN_default = {
2073
2088
  loading: "\u6B63\u5728\u52A0\u8F7D",
2074
2089
  thinking: "\u6B63\u5728\u601D\u8003",
2075
2090
  answering: "\u6B63\u5728\u751F\u6210",
2091
+ navigation: {
2092
+ label: "\u6D88\u606F\u5BFC\u822A",
2093
+ system: "\u7CFB\u7EDF",
2094
+ tool: "\u5DE5\u5177",
2095
+ event: "\u4E8B\u4EF6",
2096
+ message: "\u6D88\u606F",
2097
+ image: "\u56FE\u7247",
2098
+ memory: "\u8BB0\u5FC6",
2099
+ widget: "\u7EC4\u4EF6",
2100
+ mcpApp: "MCP App",
2101
+ attachment: "\u9644\u4EF6",
2102
+ reference: "\u5F15\u7528",
2103
+ capability: "\u80FD\u529B",
2104
+ moreTags: "+{{count}}"
2105
+ },
2076
2106
  mcpApp: {
2077
2107
  loading: "\u6B63\u5728\u52A0\u8F7D MCP App"
2078
2108
  },
@@ -13226,10 +13256,179 @@ function AssistantMessage({
13226
13256
  ] });
13227
13257
  }
13228
13258
 
13229
- // src/components/thread/MessageActions.tsx
13259
+ // src/components/thread/MessageNavigator.tsx
13230
13260
  import * as React37 from "react";
13231
- import { Check as Check5, Copy as Copy3, RefreshCw as RefreshCw2 } from "lucide-react";
13232
13261
  import { jsx as jsx43, jsxs as jsxs30 } from "react/jsx-runtime";
13262
+ var ACTIVE_OFFSET_PX = 12;
13263
+ function getMarkerWidthClass(index, active, interactionIndex) {
13264
+ if (interactionIndex >= 0) {
13265
+ const distance = Math.abs(index - interactionIndex);
13266
+ if (distance === 0) return "w-7";
13267
+ if (distance === 1) return "w-5";
13268
+ if (distance === 2) return "w-3.5";
13269
+ return "w-2";
13270
+ }
13271
+ return active ? "w-5" : "w-2";
13272
+ }
13273
+ function getAnchorTop(viewport, anchor) {
13274
+ return anchor.offsetTop - viewport.offsetTop;
13275
+ }
13276
+ function resolveActiveItemId(items, viewport, getAnchor) {
13277
+ if (!viewport || items.length === 0) return null;
13278
+ const targetTop = viewport.scrollTop + ACTIVE_OFFSET_PX;
13279
+ let activeId = items[0]?.id ?? null;
13280
+ for (const item of items) {
13281
+ const anchor = getAnchor(item);
13282
+ if (!anchor) continue;
13283
+ if (getAnchorTop(viewport, anchor) <= targetTop) {
13284
+ activeId = item.id;
13285
+ continue;
13286
+ }
13287
+ break;
13288
+ }
13289
+ return activeId;
13290
+ }
13291
+ function scrollToAnchor(viewport, anchor) {
13292
+ const top = Math.max(0, getAnchorTop(viewport, anchor) - ACTIVE_OFFSET_PX);
13293
+ if (typeof viewport.scrollTo === "function") {
13294
+ viewport.scrollTo({ top, behavior: "smooth" });
13295
+ return;
13296
+ }
13297
+ viewport.scrollTop = top;
13298
+ }
13299
+ function MessageNavigator({
13300
+ items,
13301
+ viewportRef,
13302
+ getAnchor,
13303
+ onNavigate,
13304
+ className,
13305
+ label,
13306
+ tagsOverflowLabel
13307
+ }) {
13308
+ const [hoveredId, setHoveredId] = React37.useState(null);
13309
+ const [focusedId, setFocusedId] = React37.useState(null);
13310
+ const [activeId, setActiveId] = React37.useState(null);
13311
+ const updateActiveItem = React37.useCallback(() => {
13312
+ const viewport = viewportRef.current;
13313
+ setActiveId(resolveActiveItemId(items, viewport, getAnchor));
13314
+ }, [getAnchor, items, viewportRef]);
13315
+ React37.useLayoutEffect(() => {
13316
+ updateActiveItem();
13317
+ }, [updateActiveItem]);
13318
+ React37.useEffect(() => {
13319
+ const viewport = viewportRef.current;
13320
+ if (!viewport) return;
13321
+ let frame = null;
13322
+ const scheduleUpdate = () => {
13323
+ if (frame !== null) return;
13324
+ frame = requestAnimationFrame(() => {
13325
+ frame = null;
13326
+ updateActiveItem();
13327
+ });
13328
+ };
13329
+ viewport.addEventListener("scroll", scheduleUpdate, { passive: true });
13330
+ window.addEventListener("resize", scheduleUpdate, { passive: true });
13331
+ const resizeObserver = typeof ResizeObserver !== "undefined" ? new ResizeObserver(scheduleUpdate) : null;
13332
+ resizeObserver?.observe(viewport);
13333
+ return () => {
13334
+ if (frame !== null) {
13335
+ cancelAnimationFrame(frame);
13336
+ }
13337
+ viewport.removeEventListener("scroll", scheduleUpdate);
13338
+ window.removeEventListener("resize", scheduleUpdate);
13339
+ resizeObserver?.disconnect();
13340
+ };
13341
+ }, [updateActiveItem, viewportRef]);
13342
+ const handleNavigate = React37.useCallback(
13343
+ (item) => {
13344
+ const viewport = viewportRef.current;
13345
+ const anchor = getAnchor(item);
13346
+ if (!viewport || !anchor) return;
13347
+ onNavigate?.();
13348
+ scrollToAnchor(viewport, anchor);
13349
+ setActiveId(item.id);
13350
+ },
13351
+ [getAnchor, onNavigate, viewportRef]
13352
+ );
13353
+ if (items.length === 0) return null;
13354
+ const interactionId = focusedId ?? hoveredId;
13355
+ const interactionIndex = interactionId ? items.findIndex((item) => item.id === interactionId) : -1;
13356
+ return /* @__PURE__ */ jsx43(
13357
+ "nav",
13358
+ {
13359
+ "aria-label": label,
13360
+ className: cn(
13361
+ "pointer-events-none sticky top-16 z-20 hidden h-0 w-0 shrink-0 self-start md:block",
13362
+ className
13363
+ ),
13364
+ "data-slot": "chatkit-message-navigator",
13365
+ children: /* @__PURE__ */ jsx43("div", { className: "group/nav relative h-[calc(100vh-9rem)] w-12", children: /* @__PURE__ */ jsx43("div", { className: "absolute left-2 top-1/2 flex max-h-full w-10 -translate-y-1/2 flex-col gap-0.5 py-1", children: items.map((item, index) => {
13366
+ const isActive = item.id === activeId;
13367
+ const isPreviewed = item.id === hoveredId || item.id === focusedId;
13368
+ return /* @__PURE__ */ jsxs30("div", { className: "relative h-3.5 w-10 shrink-0", children: [
13369
+ /* @__PURE__ */ jsx43(
13370
+ "button",
13371
+ {
13372
+ type: "button",
13373
+ "aria-label": `${item.title}: ${item.preview}`,
13374
+ "aria-current": isActive ? "location" : void 0,
13375
+ className: cn(
13376
+ "pointer-events-auto flex h-3.5 w-10 items-center justify-start rounded-sm outline-none",
13377
+ "focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background"
13378
+ ),
13379
+ onClick: () => handleNavigate(item),
13380
+ onMouseEnter: () => setHoveredId(item.id),
13381
+ onMouseLeave: () => setHoveredId((id) => id === item.id ? null : id),
13382
+ onFocus: () => setFocusedId(item.id),
13383
+ onBlur: () => setFocusedId((id) => id === item.id ? null : id),
13384
+ children: /* @__PURE__ */ jsx43(
13385
+ "span",
13386
+ {
13387
+ className: cn(
13388
+ "block h-0.5 rounded-full bg-muted-foreground/25 transition-all duration-150",
13389
+ getMarkerWidthClass(index, isActive, interactionIndex),
13390
+ isActive && "bg-foreground",
13391
+ isPreviewed && "bg-foreground",
13392
+ interactionIndex >= 0 && !isActive && !isPreviewed && "bg-muted-foreground/35"
13393
+ )
13394
+ }
13395
+ )
13396
+ }
13397
+ ),
13398
+ isPreviewed && /* @__PURE__ */ jsxs30(
13399
+ "div",
13400
+ {
13401
+ className: cn(
13402
+ "pointer-events-none absolute left-9 top-1/2 z-30 w-80 max-w-[min(20rem,calc(100vw-6rem))] -translate-y-1/2",
13403
+ "rounded-lg border border-border bg-background/95 p-3 text-left shadow-xl backdrop-blur"
13404
+ ),
13405
+ children: [
13406
+ /* @__PURE__ */ jsx43("div", { className: "mb-1 truncate text-sm font-medium text-foreground", children: item.title }),
13407
+ /* @__PURE__ */ jsx43("div", { className: "line-clamp-2 text-sm leading-5 text-muted-foreground", children: item.preview }),
13408
+ item.tags.length > 0 && /* @__PURE__ */ jsxs30("div", { className: "mt-2 flex flex-wrap gap-1.5", children: [
13409
+ item.tags.slice(0, 3).map((tag) => /* @__PURE__ */ jsx43(
13410
+ "span",
13411
+ {
13412
+ className: "max-w-[8rem] truncate rounded-md bg-muted px-1.5 py-0.5 text-[11px] leading-4 text-muted-foreground",
13413
+ children: tag
13414
+ },
13415
+ tag
13416
+ )),
13417
+ item.tags.length > 3 && /* @__PURE__ */ jsx43("span", { className: "rounded-md bg-muted px-1.5 py-0.5 text-[11px] leading-4 text-muted-foreground", children: tagsOverflowLabel(item.tags.length - 3) })
13418
+ ] })
13419
+ ]
13420
+ }
13421
+ )
13422
+ ] }, item.id);
13423
+ }) }) })
13424
+ }
13425
+ );
13426
+ }
13427
+
13428
+ // src/components/thread/MessageActions.tsx
13429
+ import * as React38 from "react";
13430
+ import { Check as Check5, Copy as Copy3, RefreshCw as RefreshCw2 } from "lucide-react";
13431
+ import { jsx as jsx44, jsxs as jsxs31 } from "react/jsx-runtime";
13233
13432
  function MessageActions({
13234
13433
  content,
13235
13434
  isAssistant = false,
@@ -13238,7 +13437,7 @@ function MessageActions({
13238
13437
  className
13239
13438
  }) {
13240
13439
  const { t } = useChatkitTranslation();
13241
- const [copied, setCopied] = React37.useState(false);
13440
+ const [copied, setCopied] = React38.useState(false);
13242
13441
  const handleCopy = async () => {
13243
13442
  try {
13244
13443
  await navigator.clipboard.writeText(content);
@@ -13251,7 +13450,7 @@ function MessageActions({
13251
13450
  if (isStreaming) {
13252
13451
  return null;
13253
13452
  }
13254
- return /* @__PURE__ */ jsxs30(
13453
+ return /* @__PURE__ */ jsxs31(
13255
13454
  "div",
13256
13455
  {
13257
13456
  className: cn(
@@ -13259,7 +13458,7 @@ function MessageActions({
13259
13458
  className
13260
13459
  ),
13261
13460
  children: [
13262
- /* @__PURE__ */ jsx43(
13461
+ /* @__PURE__ */ jsx44(
13263
13462
  "button",
13264
13463
  {
13265
13464
  type: "button",
@@ -13269,17 +13468,17 @@ function MessageActions({
13269
13468
  copied && "text-green-500"
13270
13469
  ),
13271
13470
  title: copied ? t("messageActions.copied") : t("messageActions.copy"),
13272
- children: copied ? /* @__PURE__ */ jsx43(Check5, { size: 14 }) : /* @__PURE__ */ jsx43(Copy3, { size: 14 })
13471
+ children: copied ? /* @__PURE__ */ jsx44(Check5, { size: 14 }) : /* @__PURE__ */ jsx44(Copy3, { size: 14 })
13273
13472
  }
13274
13473
  ),
13275
- isAssistant && onRetry && /* @__PURE__ */ jsx43(
13474
+ isAssistant && onRetry && /* @__PURE__ */ jsx44(
13276
13475
  "button",
13277
13476
  {
13278
13477
  type: "button",
13279
13478
  onClick: onRetry,
13280
13479
  className: "p-1.5 rounded-md text-muted-foreground hover:text-foreground hover:bg-muted transition-colors",
13281
13480
  title: t("messageActions.regenerate"),
13282
- children: /* @__PURE__ */ jsx43(RefreshCw2, { size: 14 })
13481
+ children: /* @__PURE__ */ jsx44(RefreshCw2, { size: 14 })
13283
13482
  }
13284
13483
  )
13285
13484
  ]
@@ -13300,18 +13499,18 @@ import {
13300
13499
  Sparkles as Sparkles3,
13301
13500
  Zap
13302
13501
  } from "lucide-react";
13303
- import { jsx as jsx44, jsxs as jsxs31 } from "react/jsx-runtime";
13502
+ import { jsx as jsx45, jsxs as jsxs32 } from "react/jsx-runtime";
13304
13503
  function getIconComponent2(icon) {
13305
13504
  const iconMap = {
13306
- "circle-question": /* @__PURE__ */ jsx44(HelpCircle, { size: 20 }),
13307
- "lightbulb": /* @__PURE__ */ jsx44(Lightbulb2, { size: 20 }),
13308
- "sparkle": /* @__PURE__ */ jsx44(Sparkles3, { size: 20 }),
13309
- "write": /* @__PURE__ */ jsx44(Pencil3, { size: 20 }),
13310
- "search": /* @__PURE__ */ jsx44(Search3, { size: 20 }),
13311
- "globe": /* @__PURE__ */ jsx44(Globe2, { size: 20 }),
13312
- "book-open": /* @__PURE__ */ jsx44(BookOpen2, { size: 20 }),
13313
- "compass": /* @__PURE__ */ jsx44(Compass, { size: 20 }),
13314
- "bolt": /* @__PURE__ */ jsx44(Zap, { size: 20 })
13505
+ "circle-question": /* @__PURE__ */ jsx45(HelpCircle, { size: 20 }),
13506
+ "lightbulb": /* @__PURE__ */ jsx45(Lightbulb2, { size: 20 }),
13507
+ "sparkle": /* @__PURE__ */ jsx45(Sparkles3, { size: 20 }),
13508
+ "write": /* @__PURE__ */ jsx45(Pencil3, { size: 20 }),
13509
+ "search": /* @__PURE__ */ jsx45(Search3, { size: 20 }),
13510
+ "globe": /* @__PURE__ */ jsx45(Globe2, { size: 20 }),
13511
+ "book-open": /* @__PURE__ */ jsx45(BookOpen2, { size: 20 }),
13512
+ "compass": /* @__PURE__ */ jsx45(Compass, { size: 20 }),
13513
+ "bolt": /* @__PURE__ */ jsx45(Zap, { size: 20 })
13315
13514
  };
13316
13515
  return icon ? iconMap[icon] || iconMap["sparkle"] : iconMap["sparkle"];
13317
13516
  }
@@ -13327,7 +13526,7 @@ function StartScreen({
13327
13526
  const greeting = startScreen?.greeting ?? t("startScreen.greeting");
13328
13527
  const prompts = startScreen?.prompts ?? [];
13329
13528
  const editPromptLabel = t("startScreen.editPrompt");
13330
- return /* @__PURE__ */ jsxs31(
13529
+ return /* @__PURE__ */ jsxs32(
13331
13530
  "div",
13332
13531
  {
13333
13532
  className: cn(
@@ -13335,8 +13534,8 @@ function StartScreen({
13335
13534
  className
13336
13535
  ),
13337
13536
  children: [
13338
- /* @__PURE__ */ jsx44("div", { className: "mb-8 text-center", children: /* @__PURE__ */ jsx44("h2", { className: "text-2xl font-semibold text-foreground mb-2", children: greeting }) }),
13339
- prompts.length > 0 && /* @__PURE__ */ jsx44("div", { className: "w-full max-w-2xl", children: /* @__PURE__ */ jsx44("div", { className: "grid grid-cols-1 sm:grid-cols-2 gap-3", children: prompts.map((item, index) => /* @__PURE__ */ jsxs31(
13537
+ /* @__PURE__ */ jsx45("div", { className: "mb-8 text-center", children: /* @__PURE__ */ jsx45("h2", { className: "text-2xl font-semibold text-foreground mb-2", children: greeting }) }),
13538
+ prompts.length > 0 && /* @__PURE__ */ jsx45("div", { className: "w-full max-w-2xl", children: /* @__PURE__ */ jsx45("div", { className: "grid grid-cols-1 sm:grid-cols-2 gap-3", children: prompts.map((item, index) => /* @__PURE__ */ jsxs32(
13340
13539
  "div",
13341
13540
  {
13342
13541
  className: cn(
@@ -13345,7 +13544,7 @@ function StartScreen({
13345
13544
  "focus-within:ring-2 focus-within:ring-primary/20"
13346
13545
  ),
13347
13546
  children: [
13348
- /* @__PURE__ */ jsxs31(
13547
+ /* @__PURE__ */ jsxs32(
13349
13548
  "button",
13350
13549
  {
13351
13550
  type: "button",
@@ -13356,12 +13555,12 @@ function StartScreen({
13356
13555
  "focus:outline-none disabled:cursor-not-allowed disabled:opacity-50"
13357
13556
  ),
13358
13557
  children: [
13359
- /* @__PURE__ */ jsx44("span", { className: "flex h-10 w-10 shrink-0 items-center justify-center rounded-lg bg-primary/10 text-primary", children: getIconComponent2(item.icon) }),
13360
- /* @__PURE__ */ jsx44("span", { className: "text-sm font-medium text-foreground", children: item.label })
13558
+ /* @__PURE__ */ jsx45("span", { className: "flex h-10 w-10 shrink-0 items-center justify-center rounded-lg bg-primary/10 text-primary", children: getIconComponent2(item.icon) }),
13559
+ /* @__PURE__ */ jsx45("span", { className: "text-sm font-medium text-foreground", children: item.label })
13361
13560
  ]
13362
13561
  }
13363
13562
  ),
13364
- /* @__PURE__ */ jsx44(
13563
+ /* @__PURE__ */ jsx45(
13365
13564
  "button",
13366
13565
  {
13367
13566
  type: "button",
@@ -13374,7 +13573,7 @@ function StartScreen({
13374
13573
  "rounded-r-xl transition-colors hover:bg-muted hover:text-foreground",
13375
13574
  "focus:outline-none disabled:cursor-not-allowed disabled:opacity-50"
13376
13575
  ),
13377
- children: /* @__PURE__ */ jsx44(Pencil3, { size: 16 })
13576
+ children: /* @__PURE__ */ jsx45(Pencil3, { size: 16 })
13378
13577
  }
13379
13578
  )
13380
13579
  ]
@@ -13387,7 +13586,7 @@ function StartScreen({
13387
13586
  }
13388
13587
 
13389
13588
  // src/hooks/useThreads.ts
13390
- import * as React39 from "react";
13589
+ import * as React40 from "react";
13391
13590
  var DEFAULT_LIMIT = 50;
13392
13591
  var getThreadTitle = (threadRecord) => {
13393
13592
  const title = threadRecord.title?.trim();
@@ -13440,16 +13639,16 @@ function useThreads(limit = DEFAULT_LIMIT) {
13440
13639
  isLoading: isStreamLoading,
13441
13640
  error: streamError
13442
13641
  } = useStreamContext();
13443
- const [threadRecords, setThreadRecords] = React39.useState([]);
13444
- const [isLoading, setIsLoading] = React39.useState(false);
13445
- const [error, setError] = React39.useState(null);
13446
- const upsertThreadRecord = React39.useCallback((threadRecord) => {
13642
+ const [threadRecords, setThreadRecords] = React40.useState([]);
13643
+ const [isLoading, setIsLoading] = React40.useState(false);
13644
+ const [error, setError] = React40.useState(null);
13645
+ const upsertThreadRecord = React40.useCallback((threadRecord) => {
13447
13646
  setThreadRecords((prev) => {
13448
13647
  const next = prev.filter((item) => item.id !== threadRecord.id);
13449
13648
  return sortThreadRecords([threadRecord, ...next]);
13450
13649
  });
13451
13650
  }, []);
13452
- const refreshThreads = React39.useCallback(async () => {
13651
+ const refreshThreads = React40.useCallback(async () => {
13453
13652
  setIsLoading(true);
13454
13653
  setError(null);
13455
13654
  try {
@@ -13465,7 +13664,7 @@ function useThreads(limit = DEFAULT_LIMIT) {
13465
13664
  setIsLoading(false);
13466
13665
  }
13467
13666
  }, [client, limit, assistantId]);
13468
- const createThread = React39.useCallback(
13667
+ const createThread = React40.useCallback(
13469
13668
  async (input) => {
13470
13669
  setError(null);
13471
13670
  const payload = {};
@@ -13479,7 +13678,7 @@ function useThreads(limit = DEFAULT_LIMIT) {
13479
13678
  },
13480
13679
  [client, upsertThreadRecord]
13481
13680
  );
13482
- const updateThread = React39.useCallback(
13681
+ const updateThread = React40.useCallback(
13483
13682
  async (recordId, payload) => {
13484
13683
  setError(null);
13485
13684
  const updated = await client.conversations.update(recordId, payload);
@@ -13488,7 +13687,7 @@ function useThreads(limit = DEFAULT_LIMIT) {
13488
13687
  },
13489
13688
  [client, upsertThreadRecord]
13490
13689
  );
13491
- const deleteThread = React39.useCallback(
13690
+ const deleteThread = React40.useCallback(
13492
13691
  async (recordId) => {
13493
13692
  setError(null);
13494
13693
  await client.conversations.delete(recordId);
@@ -13496,11 +13695,11 @@ function useThreads(limit = DEFAULT_LIMIT) {
13496
13695
  },
13497
13696
  [client]
13498
13697
  );
13499
- React39.useEffect(() => {
13698
+ React40.useEffect(() => {
13500
13699
  if (!isReady) return;
13501
13700
  void refreshThreads();
13502
13701
  }, [refreshThreads, isReady]);
13503
- React39.useEffect(() => {
13702
+ React40.useEffect(() => {
13504
13703
  if (!threadId || !isStreamLoading) return;
13505
13704
  const now = (/* @__PURE__ */ new Date()).toISOString();
13506
13705
  const busyStatus = "busy";
@@ -13521,7 +13720,7 @@ function useThreads(limit = DEFAULT_LIMIT) {
13521
13720
  return changed ? sortThreadRecords(next) : prev;
13522
13721
  });
13523
13722
  }, [threadId, isStreamLoading]);
13524
- React39.useEffect(() => {
13723
+ React40.useEffect(() => {
13525
13724
  const message = getErrorMessage2(streamError)?.trim();
13526
13725
  if (!threadId || !message) return;
13527
13726
  const now = (/* @__PURE__ */ new Date()).toISOString();
@@ -13543,7 +13742,7 @@ function useThreads(limit = DEFAULT_LIMIT) {
13543
13742
  return changed ? sortThreadRecords(next) : prev;
13544
13743
  });
13545
13744
  }, [threadId, streamError]);
13546
- React39.useEffect(() => {
13745
+ React40.useEffect(() => {
13547
13746
  if (!isReady || !threadId || isStreamLoading) return;
13548
13747
  let cancelled = false;
13549
13748
  void client.conversations.search({ where: { threadId }, limit: 1 }).then((result) => {
@@ -13557,7 +13756,7 @@ function useThreads(limit = DEFAULT_LIMIT) {
13557
13756
  cancelled = true;
13558
13757
  };
13559
13758
  }, [client, threadId, upsertThreadRecord, isReady, isStreamLoading]);
13560
- const threads = React39.useMemo(
13759
+ const threads = React40.useMemo(
13561
13760
  () => threadRecords.map((threadRecord) => toThreadItem(threadRecord)),
13562
13761
  [threadRecords]
13563
13762
  );
@@ -13574,10 +13773,10 @@ function useThreads(limit = DEFAULT_LIMIT) {
13574
13773
  }
13575
13774
 
13576
13775
  // src/components/thread/context-usage-indicator.tsx
13577
- import * as React40 from "react";
13776
+ import * as React41 from "react";
13578
13777
 
13579
13778
  // src/components/ui/progress-circle.tsx
13580
- import { jsx as jsx45, jsxs as jsxs32 } from "react/jsx-runtime";
13779
+ import { jsx as jsx46, jsxs as jsxs33 } from "react/jsx-runtime";
13581
13780
  function clamp2(input, a, b) {
13582
13781
  return Math.max(Math.min(input, Math.max(a, b)), Math.min(a, b));
13583
13782
  }
@@ -13600,7 +13799,7 @@ var ProgressCircle = ({ value, className, ...restSvgProps }) => {
13600
13799
  return (
13601
13800
  // biome-ignore lint/a11y/useFocusableInteractive: false positive (progress + progressbar are not focusable interactives)
13602
13801
  // biome-ignore lint/nursery/useAriaPropsSupportedByRole: biome rule at odds with mdn docs (presumed nursary bug with rule)
13603
- /* @__PURE__ */ jsxs32(
13802
+ /* @__PURE__ */ jsxs33(
13604
13803
  "svg",
13605
13804
  {
13606
13805
  role: "progressbar",
@@ -13611,8 +13810,8 @@ var ProgressCircle = ({ value, className, ...restSvgProps }) => {
13611
13810
  "aria-valuemax": 100,
13612
13811
  ...restSvgProps,
13613
13812
  children: [
13614
- /* @__PURE__ */ jsx45("circle", { ...commonParams, className: "stroke-current/25" }),
13615
- /* @__PURE__ */ jsx45(
13813
+ /* @__PURE__ */ jsx46("circle", { ...commonParams, className: "stroke-current/25" }),
13814
+ /* @__PURE__ */ jsx46(
13616
13815
  "circle",
13617
13816
  {
13618
13817
  ...commonParams,
@@ -13631,7 +13830,7 @@ var ProgressCircle = ({ value, className, ...restSvgProps }) => {
13631
13830
  };
13632
13831
 
13633
13832
  // src/components/thread/context-usage-indicator.tsx
13634
- import { jsx as jsx46, jsxs as jsxs33 } from "react/jsx-runtime";
13833
+ import { jsx as jsx47, jsxs as jsxs34 } from "react/jsx-runtime";
13635
13834
  var kNumberFormatter = new Intl.NumberFormat("en-US", {
13636
13835
  minimumFractionDigits: 0,
13637
13836
  maximumFractionDigits: 1
@@ -13664,21 +13863,21 @@ function ContextUsageIndicator({
13664
13863
  }) {
13665
13864
  const { t } = useChatkitTranslation();
13666
13865
  const stream = useStreamContext();
13667
- const [maxContextSize, setMaxContextSize] = React40.useState(null);
13668
- const [usedContextSize, setUsedContextSize] = React40.useState(null);
13669
- const [assistantAgentKey, setAssistantAgentKey] = React40.useState(null);
13670
- const latestRealtimeUsageRef = React40.useRef({
13866
+ const [maxContextSize, setMaxContextSize] = React41.useState(null);
13867
+ const [usedContextSize, setUsedContextSize] = React41.useState(null);
13868
+ const [assistantAgentKey, setAssistantAgentKey] = React41.useState(null);
13869
+ const latestRealtimeUsageRef = React41.useRef({
13671
13870
  threadId: null,
13672
13871
  agentKey: null,
13673
13872
  usedTokens: null
13674
13873
  });
13675
- const realtimeUsage = React40.useMemo(
13874
+ const realtimeUsage = React41.useMemo(
13676
13875
  () => getThreadContextUsage(stream.contextUsageByAgentKey, assistantAgentKey),
13677
13876
  [assistantAgentKey, stream.contextUsageByAgentKey]
13678
13877
  );
13679
13878
  const realtimeUsedContextSize = getThreadContextUsageTotalTokens(realtimeUsage);
13680
13879
  const hasApiConfiguration = Boolean(stream.apiUrl?.trim() && stream.apiKey?.trim());
13681
- React40.useEffect(() => {
13880
+ React41.useEffect(() => {
13682
13881
  if (!hasApiConfiguration || !stream.client || !stream.assistantId) {
13683
13882
  setMaxContextSize(null);
13684
13883
  setAssistantAgentKey(null);
@@ -13698,18 +13897,18 @@ function ContextUsageIndicator({
13698
13897
  cancelled = true;
13699
13898
  };
13700
13899
  }, [hasApiConfiguration, stream.client, stream.assistantId]);
13701
- React40.useEffect(() => {
13900
+ React41.useEffect(() => {
13702
13901
  latestRealtimeUsageRef.current = {
13703
13902
  threadId: stream.threadId ?? null,
13704
13903
  agentKey: assistantAgentKey,
13705
13904
  usedTokens: realtimeUsedContextSize
13706
13905
  };
13707
13906
  }, [assistantAgentKey, realtimeUsedContextSize, stream.threadId]);
13708
- React40.useEffect(() => {
13907
+ React41.useEffect(() => {
13709
13908
  if (realtimeUsedContextSize == null) return;
13710
13909
  setUsedContextSize(realtimeUsedContextSize);
13711
13910
  }, [realtimeUsedContextSize]);
13712
- React40.useEffect(() => {
13911
+ React41.useEffect(() => {
13713
13912
  if (!hasApiConfiguration || !stream.client) {
13714
13913
  setUsedContextSize(null);
13715
13914
  return;
@@ -13775,8 +13974,8 @@ function ContextUsageIndicator({
13775
13974
  });
13776
13975
  const usageLabelWithSuffix = usageLabel.endsWith(":") ? usageLabel : `${usageLabel}:`;
13777
13976
  const progressClassName = percent >= 90 ? "text-destructive" : percent >= 75 ? "text-amber-500" : "text-primary dark:text-zinc-300";
13778
- return /* @__PURE__ */ jsxs33(Tooltip, { children: [
13779
- /* @__PURE__ */ jsx46(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx46(
13977
+ return /* @__PURE__ */ jsxs34(Tooltip, { children: [
13978
+ /* @__PURE__ */ jsx47(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx47(
13780
13979
  "button",
13781
13980
  {
13782
13981
  type: "button",
@@ -13785,31 +13984,31 @@ function ContextUsageIndicator({
13785
13984
  className
13786
13985
  ),
13787
13986
  "aria-label": `${usageLabelWithSuffix} ${usageFullLabel}. ${usageTokensLabel}`,
13788
- children: /* @__PURE__ */ jsx46(ProgressCircle, { value: percent, className: cn("size-3.5", progressClassName) })
13987
+ children: /* @__PURE__ */ jsx47(ProgressCircle, { value: percent, className: cn("size-3.5", progressClassName) })
13789
13988
  }
13790
13989
  ) }),
13791
- /* @__PURE__ */ jsxs33(TooltipContent, { side: "top", sideOffset: 6, className: "space-y-0.5 px-3 py-2 text-center", children: [
13792
- /* @__PURE__ */ jsx46("div", { className: "text-primary-foreground/70", children: usageLabelWithSuffix }),
13793
- /* @__PURE__ */ jsx46("div", { className: "font-medium text-primary-foreground/80", children: usageFullLabel }),
13794
- /* @__PURE__ */ jsx46("div", { className: "text-sm font-semibold", children: usageTokensLabel })
13990
+ /* @__PURE__ */ jsxs34(TooltipContent, { side: "top", sideOffset: 6, className: "space-y-0.5 px-3 py-2 text-center", children: [
13991
+ /* @__PURE__ */ jsx47("div", { className: "text-primary-foreground/70", children: usageLabelWithSuffix }),
13992
+ /* @__PURE__ */ jsx47("div", { className: "font-medium text-primary-foreground/80", children: usageFullLabel }),
13993
+ /* @__PURE__ */ jsx47("div", { className: "text-sm font-semibold", children: usageTokensLabel })
13795
13994
  ] })
13796
13995
  ] });
13797
13996
  }
13798
13997
 
13799
13998
  // src/components/pet/PetBridge.tsx
13800
- import * as React41 from "react";
13999
+ import * as React42 from "react";
13801
14000
  import { normalizePetOptions } from "@xpert-ai/chatkit-types";
13802
14001
  function PetBridge({ pet, state }) {
13803
14002
  const parentMessenger = useParentMessenger();
13804
14003
  const sendEvent = parentMessenger?.sendEvent;
13805
- const options = React41.useMemo(() => normalizePetOptions(pet), [pet]);
13806
- React41.useEffect(() => {
14004
+ const options = React42.useMemo(() => normalizePetOptions(pet), [pet]);
14005
+ React42.useEffect(() => {
13807
14006
  if (!sendEvent) {
13808
14007
  return;
13809
14008
  }
13810
14009
  sendEvent("pet_options_change", { pet: pet ?? null });
13811
14010
  }, [sendEvent, pet]);
13812
- React41.useEffect(() => {
14011
+ React42.useEffect(() => {
13813
14012
  if (!sendEvent || !options) {
13814
14013
  return;
13815
14014
  }
@@ -13819,15 +14018,15 @@ function PetBridge({ pet, state }) {
13819
14018
  }
13820
14019
 
13821
14020
  // src/components/settings/SettingsSheet.tsx
13822
- import * as React48 from "react";
14021
+ import * as React49 from "react";
13823
14022
  import { PawPrint, Settings } from "lucide-react";
13824
14023
 
13825
14024
  // src/components/ui/input.tsx
13826
- import * as React42 from "react";
13827
- import { jsx as jsx47 } from "react/jsx-runtime";
13828
- var Input = React42.forwardRef(
14025
+ import * as React43 from "react";
14026
+ import { jsx as jsx48 } from "react/jsx-runtime";
14027
+ var Input = React43.forwardRef(
13829
14028
  ({ className, type, ...props }, ref) => {
13830
- return /* @__PURE__ */ jsx47(
14029
+ return /* @__PURE__ */ jsx48(
13831
14030
  "input",
13832
14031
  {
13833
14032
  ref,
@@ -13847,17 +14046,17 @@ Input.displayName = "Input";
13847
14046
  import "react";
13848
14047
  import { Select as SelectPrimitive } from "radix-ui";
13849
14048
  import { ChevronDownIcon as ChevronDownIcon2, CheckIcon as CheckIcon4, ChevronUpIcon } from "lucide-react";
13850
- import { jsx as jsx48, jsxs as jsxs34 } from "react/jsx-runtime";
14049
+ import { jsx as jsx49, jsxs as jsxs35 } from "react/jsx-runtime";
13851
14050
  function Select({
13852
14051
  ...props
13853
14052
  }) {
13854
- return /* @__PURE__ */ jsx48(SelectPrimitive.Root, { "data-slot": "select", ...props });
14053
+ return /* @__PURE__ */ jsx49(SelectPrimitive.Root, { "data-slot": "select", ...props });
13855
14054
  }
13856
14055
  function SelectGroup({
13857
14056
  className,
13858
14057
  ...props
13859
14058
  }) {
13860
- return /* @__PURE__ */ jsx48(
14059
+ return /* @__PURE__ */ jsx49(
13861
14060
  SelectPrimitive.Group,
13862
14061
  {
13863
14062
  "data-slot": "select-group",
@@ -13869,7 +14068,7 @@ function SelectGroup({
13869
14068
  function SelectValue({
13870
14069
  ...props
13871
14070
  }) {
13872
- return /* @__PURE__ */ jsx48(SelectPrimitive.Value, { "data-slot": "select-value", ...props });
14071
+ return /* @__PURE__ */ jsx49(SelectPrimitive.Value, { "data-slot": "select-value", ...props });
13873
14072
  }
13874
14073
  function SelectTrigger({
13875
14074
  className,
@@ -13877,7 +14076,7 @@ function SelectTrigger({
13877
14076
  children,
13878
14077
  ...props
13879
14078
  }) {
13880
- return /* @__PURE__ */ jsxs34(
14079
+ return /* @__PURE__ */ jsxs35(
13881
14080
  SelectPrimitive.Trigger,
13882
14081
  {
13883
14082
  "data-slot": "select-trigger",
@@ -13889,7 +14088,7 @@ function SelectTrigger({
13889
14088
  ...props,
13890
14089
  children: [
13891
14090
  children,
13892
- /* @__PURE__ */ jsx48(SelectPrimitive.Icon, { asChild: true, children: /* @__PURE__ */ jsx48(ChevronDownIcon2, { className: "pointer-events-none size-4 text-muted-foreground" }) })
14091
+ /* @__PURE__ */ jsx49(SelectPrimitive.Icon, { asChild: true, children: /* @__PURE__ */ jsx49(ChevronDownIcon2, { className: "pointer-events-none size-4 text-muted-foreground" }) })
13893
14092
  ]
13894
14093
  }
13895
14094
  );
@@ -13901,7 +14100,7 @@ function SelectContent({
13901
14100
  align = "center",
13902
14101
  ...props
13903
14102
  }) {
13904
- return /* @__PURE__ */ jsx48(SelectPrimitive.Portal, { children: /* @__PURE__ */ jsxs34(
14103
+ return /* @__PURE__ */ jsx49(SelectPrimitive.Portal, { children: /* @__PURE__ */ jsxs35(
13905
14104
  SelectPrimitive.Content,
13906
14105
  {
13907
14106
  "data-slot": "select-content",
@@ -13911,8 +14110,8 @@ function SelectContent({
13911
14110
  align,
13912
14111
  ...props,
13913
14112
  children: [
13914
- /* @__PURE__ */ jsx48(SelectScrollUpButton, {}),
13915
- /* @__PURE__ */ jsx48(
14113
+ /* @__PURE__ */ jsx49(SelectScrollUpButton, {}),
14114
+ /* @__PURE__ */ jsx49(
13916
14115
  SelectPrimitive.Viewport,
13917
14116
  {
13918
14117
  "data-position": position,
@@ -13923,7 +14122,7 @@ function SelectContent({
13923
14122
  children
13924
14123
  }
13925
14124
  ),
13926
- /* @__PURE__ */ jsx48(SelectScrollDownButton, {})
14125
+ /* @__PURE__ */ jsx49(SelectScrollDownButton, {})
13927
14126
  ]
13928
14127
  }
13929
14128
  ) });
@@ -13933,7 +14132,7 @@ function SelectItem({
13933
14132
  children,
13934
14133
  ...props
13935
14134
  }) {
13936
- return /* @__PURE__ */ jsxs34(
14135
+ return /* @__PURE__ */ jsxs35(
13937
14136
  SelectPrimitive.Item,
13938
14137
  {
13939
14138
  "data-slot": "select-item",
@@ -13943,8 +14142,8 @@ function SelectItem({
13943
14142
  ),
13944
14143
  ...props,
13945
14144
  children: [
13946
- /* @__PURE__ */ jsx48("span", { className: "pointer-events-none absolute right-2 flex size-4 items-center justify-center", children: /* @__PURE__ */ jsx48(SelectPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx48(CheckIcon4, { className: "pointer-events-none" }) }) }),
13947
- /* @__PURE__ */ jsx48(SelectPrimitive.ItemText, { children })
14145
+ /* @__PURE__ */ jsx49("span", { className: "pointer-events-none absolute right-2 flex size-4 items-center justify-center", children: /* @__PURE__ */ jsx49(SelectPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx49(CheckIcon4, { className: "pointer-events-none" }) }) }),
14146
+ /* @__PURE__ */ jsx49(SelectPrimitive.ItemText, { children })
13948
14147
  ]
13949
14148
  }
13950
14149
  );
@@ -13953,7 +14152,7 @@ function SelectScrollUpButton({
13953
14152
  className,
13954
14153
  ...props
13955
14154
  }) {
13956
- return /* @__PURE__ */ jsx48(
14155
+ return /* @__PURE__ */ jsx49(
13957
14156
  SelectPrimitive.ScrollUpButton,
13958
14157
  {
13959
14158
  "data-slot": "select-scroll-up-button",
@@ -13962,7 +14161,7 @@ function SelectScrollUpButton({
13962
14161
  className
13963
14162
  ),
13964
14163
  ...props,
13965
- children: /* @__PURE__ */ jsx48(
14164
+ children: /* @__PURE__ */ jsx49(
13966
14165
  ChevronUpIcon,
13967
14166
  {}
13968
14167
  )
@@ -13973,7 +14172,7 @@ function SelectScrollDownButton({
13973
14172
  className,
13974
14173
  ...props
13975
14174
  }) {
13976
- return /* @__PURE__ */ jsx48(
14175
+ return /* @__PURE__ */ jsx49(
13977
14176
  SelectPrimitive.ScrollDownButton,
13978
14177
  {
13979
14178
  "data-slot": "select-scroll-down-button",
@@ -13982,7 +14181,7 @@ function SelectScrollDownButton({
13982
14181
  className
13983
14182
  ),
13984
14183
  ...props,
13985
- children: /* @__PURE__ */ jsx48(
14184
+ children: /* @__PURE__ */ jsx49(
13986
14185
  ChevronDownIcon2,
13987
14186
  {}
13988
14187
  )
@@ -13991,9 +14190,9 @@ function SelectScrollDownButton({
13991
14190
  }
13992
14191
 
13993
14192
  // src/components/ui/slider.tsx
13994
- import * as React44 from "react";
14193
+ import * as React45 from "react";
13995
14194
  import { Slider as SliderPrimitive } from "radix-ui";
13996
- import { jsx as jsx49, jsxs as jsxs35 } from "react/jsx-runtime";
14195
+ import { jsx as jsx50, jsxs as jsxs36 } from "react/jsx-runtime";
13997
14196
  function Slider({
13998
14197
  className,
13999
14198
  defaultValue,
@@ -14002,11 +14201,11 @@ function Slider({
14002
14201
  max = 100,
14003
14202
  ...props
14004
14203
  }) {
14005
- const _values = React44.useMemo(
14204
+ const _values = React45.useMemo(
14006
14205
  () => Array.isArray(value) ? value : Array.isArray(defaultValue) ? defaultValue : [min, max],
14007
14206
  [value, defaultValue, min, max]
14008
14207
  );
14009
- return /* @__PURE__ */ jsxs35(
14208
+ return /* @__PURE__ */ jsxs36(
14010
14209
  SliderPrimitive.Root,
14011
14210
  {
14012
14211
  "data-slot": "slider",
@@ -14020,12 +14219,12 @@ function Slider({
14020
14219
  ),
14021
14220
  ...props,
14022
14221
  children: [
14023
- /* @__PURE__ */ jsx49(
14222
+ /* @__PURE__ */ jsx50(
14024
14223
  SliderPrimitive.Track,
14025
14224
  {
14026
14225
  "data-slot": "slider-track",
14027
14226
  className: "relative grow overflow-hidden rounded-full bg-muted data-horizontal:h-1 data-horizontal:w-full data-vertical:h-full data-vertical:w-1",
14028
- children: /* @__PURE__ */ jsx49(
14227
+ children: /* @__PURE__ */ jsx50(
14029
14228
  SliderPrimitive.Range,
14030
14229
  {
14031
14230
  "data-slot": "slider-range",
@@ -14034,7 +14233,7 @@ function Slider({
14034
14233
  )
14035
14234
  }
14036
14235
  ),
14037
- Array.from({ length: _values.length }, (_, index) => /* @__PURE__ */ jsx49(
14236
+ Array.from({ length: _values.length }, (_, index) => /* @__PURE__ */ jsx50(
14038
14237
  SliderPrimitive.Thumb,
14039
14238
  {
14040
14239
  "data-slot": "slider-thumb",
@@ -14048,7 +14247,7 @@ function Slider({
14048
14247
  }
14049
14248
 
14050
14249
  // src/components/ui/toggle-group.tsx
14051
- import * as React46 from "react";
14250
+ import * as React47 from "react";
14052
14251
  import "class-variance-authority";
14053
14252
  import { ToggleGroup as ToggleGroupPrimitive } from "radix-ui";
14054
14253
 
@@ -14056,7 +14255,7 @@ import { ToggleGroup as ToggleGroupPrimitive } from "radix-ui";
14056
14255
  import "react";
14057
14256
  import { cva as cva2 } from "class-variance-authority";
14058
14257
  import { Toggle as TogglePrimitive } from "radix-ui";
14059
- import { jsx as jsx50 } from "react/jsx-runtime";
14258
+ import { jsx as jsx51 } from "react/jsx-runtime";
14060
14259
  var toggleVariants = cva2(
14061
14260
  "group/toggle inline-flex items-center justify-center gap-1 rounded-lg text-sm font-medium whitespace-nowrap transition-all outline-none hover:bg-muted hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 aria-pressed:bg-muted data-[state=on]:bg-muted dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
14062
14261
  {
@@ -14079,8 +14278,8 @@ var toggleVariants = cva2(
14079
14278
  );
14080
14279
 
14081
14280
  // src/components/ui/toggle-group.tsx
14082
- import { jsx as jsx51 } from "react/jsx-runtime";
14083
- var ToggleGroupContext = React46.createContext({
14281
+ import { jsx as jsx52 } from "react/jsx-runtime";
14282
+ var ToggleGroupContext = React47.createContext({
14084
14283
  size: "default",
14085
14284
  variant: "default",
14086
14285
  spacing: 0,
@@ -14095,7 +14294,7 @@ function ToggleGroup({
14095
14294
  children,
14096
14295
  ...props
14097
14296
  }) {
14098
- return /* @__PURE__ */ jsx51(
14297
+ return /* @__PURE__ */ jsx52(
14099
14298
  ToggleGroupPrimitive.Root,
14100
14299
  {
14101
14300
  "data-slot": "toggle-group",
@@ -14109,7 +14308,7 @@ function ToggleGroup({
14109
14308
  className
14110
14309
  ),
14111
14310
  ...props,
14112
- children: /* @__PURE__ */ jsx51(
14311
+ children: /* @__PURE__ */ jsx52(
14113
14312
  ToggleGroupContext.Provider,
14114
14313
  {
14115
14314
  value: { variant, size: size2, spacing, orientation },
@@ -14126,8 +14325,8 @@ function ToggleGroupItem({
14126
14325
  size: size2 = "default",
14127
14326
  ...props
14128
14327
  }) {
14129
- const context = React46.useContext(ToggleGroupContext);
14130
- return /* @__PURE__ */ jsx51(
14328
+ const context = React47.useContext(ToggleGroupContext);
14329
+ return /* @__PURE__ */ jsx52(
14131
14330
  ToggleGroupPrimitive.Item,
14132
14331
  {
14133
14332
  "data-slot": "toggle-group-item",
@@ -14367,7 +14566,7 @@ import {
14367
14566
  } from "@xpert-ai/chatkit-types";
14368
14567
 
14369
14568
  // src/components/pet/PetPreview.tsx
14370
- import { jsx as jsx52 } from "react/jsx-runtime";
14569
+ import { jsx as jsx53 } from "react/jsx-runtime";
14371
14570
  function escapeCssUrl(value) {
14372
14571
  return value.replace(/["\\]/g, "\\$&");
14373
14572
  }
@@ -14375,7 +14574,7 @@ function PetPreview({ src, label, className }) {
14375
14574
  const scale = 0.13;
14376
14575
  const width = petSpriteAtlas.cellWidth;
14377
14576
  const height = petSpriteAtlas.cellHeight;
14378
- return /* @__PURE__ */ jsx52(
14577
+ return /* @__PURE__ */ jsx53(
14379
14578
  "span",
14380
14579
  {
14381
14580
  className: cn(
@@ -14384,7 +14583,7 @@ function PetPreview({ src, label, className }) {
14384
14583
  ),
14385
14584
  "aria-hidden": "true",
14386
14585
  title: label,
14387
- children: /* @__PURE__ */ jsx52(
14586
+ children: /* @__PURE__ */ jsx53(
14388
14587
  "span",
14389
14588
  {
14390
14589
  className: "absolute left-1/2 top-1/2 block",
@@ -14406,7 +14605,7 @@ function PetPreview({ src, label, className }) {
14406
14605
  }
14407
14606
 
14408
14607
  // src/components/settings/SettingsSheet.tsx
14409
- import { jsx as jsx53, jsxs as jsxs36 } from "react/jsx-runtime";
14608
+ import { jsx as jsx54, jsxs as jsxs37 } from "react/jsx-runtime";
14410
14609
  var CHARACTER_TYPES2 = [
14411
14610
  "builtin",
14412
14611
  "atlas"
@@ -14422,13 +14621,13 @@ function SettingsSheet({
14422
14621
  onSave
14423
14622
  }) {
14424
14623
  const { t } = useChatkitTranslation();
14425
- const [draft, setDraft] = React48.useState(settings);
14426
- React48.useEffect(() => {
14624
+ const [draft, setDraft] = React49.useState(settings);
14625
+ React49.useEffect(() => {
14427
14626
  if (open) {
14428
14627
  setDraft(petRequired ? { ...settings, enabled: true } : settings);
14429
14628
  }
14430
14629
  }, [open, petRequired, settings]);
14431
- const updateDraft = React48.useCallback(
14630
+ const updateDraft = React49.useCallback(
14432
14631
  (patch) => {
14433
14632
  setDraft((previous) => ({ ...previous, ...patch }));
14434
14633
  },
@@ -14446,23 +14645,23 @@ function SettingsSheet({
14446
14645
  defaultValue: selectedBuiltinPet.label
14447
14646
  }
14448
14647
  );
14449
- return /* @__PURE__ */ jsx53(Sheet, { open, onOpenChange, children: /* @__PURE__ */ jsxs36(SheetContent, { side: "right", className: "w-[min(92vw,26rem)] overflow-y-auto", children: [
14450
- /* @__PURE__ */ jsx53(SheetHeader, { children: /* @__PURE__ */ jsxs36("div", { className: "flex items-center gap-2", children: [
14451
- /* @__PURE__ */ jsx53("span", { className: "flex h-8 w-8 items-center justify-center rounded-md bg-primary/10 text-primary", children: /* @__PURE__ */ jsx53(Settings, { size: 16 }) }),
14452
- /* @__PURE__ */ jsx53(SheetTitle, { children: t("settings.title") })
14648
+ return /* @__PURE__ */ jsx54(Sheet, { open, onOpenChange, children: /* @__PURE__ */ jsxs37(SheetContent, { side: "right", className: "w-[min(92vw,26rem)] overflow-y-auto", children: [
14649
+ /* @__PURE__ */ jsx54(SheetHeader, { children: /* @__PURE__ */ jsxs37("div", { className: "flex items-center gap-2", children: [
14650
+ /* @__PURE__ */ jsx54("span", { className: "flex h-8 w-8 items-center justify-center rounded-md bg-primary/10 text-primary", children: /* @__PURE__ */ jsx54(Settings, { size: 16 }) }),
14651
+ /* @__PURE__ */ jsx54(SheetTitle, { children: t("settings.title") })
14453
14652
  ] }) }),
14454
- /* @__PURE__ */ jsxs36("form", { className: "mt-6 space-y-5", onSubmit: handleSubmit, children: [
14455
- /* @__PURE__ */ jsxs36("section", { className: "space-y-5", children: [
14456
- /* @__PURE__ */ jsxs36("div", { className: "flex items-center gap-2", children: [
14457
- /* @__PURE__ */ jsx53("span", { className: "flex h-7 w-7 items-center justify-center rounded-md bg-muted text-muted-foreground", children: /* @__PURE__ */ jsx53(PawPrint, { size: 15 }) }),
14458
- /* @__PURE__ */ jsx53("h3", { className: "text-sm font-semibold", children: t("pet.settings.title") })
14653
+ /* @__PURE__ */ jsxs37("form", { className: "mt-6 space-y-5", onSubmit: handleSubmit, children: [
14654
+ /* @__PURE__ */ jsxs37("section", { className: "space-y-5", children: [
14655
+ /* @__PURE__ */ jsxs37("div", { className: "flex items-center gap-2", children: [
14656
+ /* @__PURE__ */ jsx54("span", { className: "flex h-7 w-7 items-center justify-center rounded-md bg-muted text-muted-foreground", children: /* @__PURE__ */ jsx54(PawPrint, { size: 15 }) }),
14657
+ /* @__PURE__ */ jsx54("h3", { className: "text-sm font-semibold", children: t("pet.settings.title") })
14459
14658
  ] }),
14460
- /* @__PURE__ */ jsxs36("label", { className: "flex items-center justify-between gap-4 rounded-md border border-border px-3 py-2", children: [
14461
- /* @__PURE__ */ jsxs36("span", { className: "min-w-0", children: [
14462
- /* @__PURE__ */ jsx53("span", { className: "block text-sm font-medium", children: t("pet.settings.enabled") }),
14463
- petRequired && /* @__PURE__ */ jsx53("span", { className: "mt-0.5 block text-xs text-muted-foreground", children: t("pet.settings.requiredHint") })
14659
+ /* @__PURE__ */ jsxs37("label", { className: "flex items-center justify-between gap-4 rounded-md border border-border px-3 py-2", children: [
14660
+ /* @__PURE__ */ jsxs37("span", { className: "min-w-0", children: [
14661
+ /* @__PURE__ */ jsx54("span", { className: "block text-sm font-medium", children: t("pet.settings.enabled") }),
14662
+ petRequired && /* @__PURE__ */ jsx54("span", { className: "mt-0.5 block text-xs text-muted-foreground", children: t("pet.settings.requiredHint") })
14464
14663
  ] }),
14465
- /* @__PURE__ */ jsx53(
14664
+ /* @__PURE__ */ jsx54(
14466
14665
  "button",
14467
14666
  {
14468
14667
  type: "button",
@@ -14475,7 +14674,7 @@ function SettingsSheet({
14475
14674
  draft.enabled ? "bg-primary" : "bg-muted-foreground/20",
14476
14675
  petRequired ? "cursor-not-allowed opacity-70" : ""
14477
14676
  ].join(" "),
14478
- children: /* @__PURE__ */ jsx53(
14677
+ children: /* @__PURE__ */ jsx54(
14479
14678
  "span",
14480
14679
  {
14481
14680
  className: [
@@ -14488,9 +14687,9 @@ function SettingsSheet({
14488
14687
  )
14489
14688
  ] })
14490
14689
  ] }),
14491
- /* @__PURE__ */ jsxs36("div", { className: "space-y-2", children: [
14492
- /* @__PURE__ */ jsx53("span", { id: "chatkit-pet-type-label", className: "text-sm font-medium", children: t("pet.settings.characterType") }),
14493
- /* @__PURE__ */ jsx53(
14690
+ /* @__PURE__ */ jsxs37("div", { className: "space-y-2", children: [
14691
+ /* @__PURE__ */ jsx54("span", { id: "chatkit-pet-type-label", className: "text-sm font-medium", children: t("pet.settings.characterType") }),
14692
+ /* @__PURE__ */ jsx54(
14494
14693
  ToggleGroup,
14495
14694
  {
14496
14695
  id: "chatkit-pet-type",
@@ -14505,7 +14704,7 @@ function SettingsSheet({
14505
14704
  variant: "outline",
14506
14705
  spacing: 2,
14507
14706
  className: "!w-full",
14508
- children: CHARACTER_TYPES2.map((type) => /* @__PURE__ */ jsx53(
14707
+ children: CHARACTER_TYPES2.map((type) => /* @__PURE__ */ jsx54(
14509
14708
  ToggleGroupItem,
14510
14709
  {
14511
14710
  value: type,
@@ -14517,8 +14716,8 @@ function SettingsSheet({
14517
14716
  }
14518
14717
  )
14519
14718
  ] }),
14520
- draft.characterType === "builtin" && /* @__PURE__ */ jsxs36("div", { className: "space-y-2", children: [
14521
- /* @__PURE__ */ jsx53(
14719
+ draft.characterType === "builtin" && /* @__PURE__ */ jsxs37("div", { className: "space-y-2", children: [
14720
+ /* @__PURE__ */ jsx54(
14522
14721
  "label",
14523
14722
  {
14524
14723
  htmlFor: "chatkit-pet-builtin",
@@ -14526,7 +14725,7 @@ function SettingsSheet({
14526
14725
  children: t("pet.settings.builtin")
14527
14726
  }
14528
14727
  ),
14529
- /* @__PURE__ */ jsxs36(
14728
+ /* @__PURE__ */ jsxs37(
14530
14729
  Select,
14531
14730
  {
14532
14731
  value: selectedBuiltinPet.id,
@@ -14537,26 +14736,26 @@ function SettingsSheet({
14537
14736
  }
14538
14737
  },
14539
14738
  children: [
14540
- /* @__PURE__ */ jsx53(
14739
+ /* @__PURE__ */ jsx54(
14541
14740
  SelectTrigger,
14542
14741
  {
14543
14742
  id: "chatkit-pet-builtin",
14544
14743
  className: "min-h-12 w-full px-3 py-2",
14545
- children: /* @__PURE__ */ jsx53(SelectValue, { placeholder: selectedBuiltinPetLabel })
14744
+ children: /* @__PURE__ */ jsx54(SelectValue, { placeholder: selectedBuiltinPetLabel })
14546
14745
  }
14547
14746
  ),
14548
- /* @__PURE__ */ jsx53(SelectContent, { className: "w-[var(--radix-select-trigger-width)]", children: /* @__PURE__ */ jsx53(SelectGroup, { children: INCLUDED_PET_OPTIONS.map((pet) => {
14747
+ /* @__PURE__ */ jsx54(SelectContent, { className: "w-[var(--radix-select-trigger-width)]", children: /* @__PURE__ */ jsx54(SelectGroup, { children: INCLUDED_PET_OPTIONS.map((pet) => {
14549
14748
  const label = t(`pet.settings.builtins.${pet.id}`, {
14550
14749
  defaultValue: pet.label
14551
14750
  });
14552
- return /* @__PURE__ */ jsx53(
14751
+ return /* @__PURE__ */ jsx54(
14553
14752
  SelectItem,
14554
14753
  {
14555
14754
  value: pet.id,
14556
14755
  className: "min-h-10 py-1.5 pl-2 pr-8",
14557
- children: /* @__PURE__ */ jsxs36("span", { className: "flex min-w-0 items-center gap-2", children: [
14558
- /* @__PURE__ */ jsx53(PetPreview, { src: pet.previewSrc, label }),
14559
- /* @__PURE__ */ jsx53("span", { className: "min-w-0 truncate", children: label })
14756
+ children: /* @__PURE__ */ jsxs37("span", { className: "flex min-w-0 items-center gap-2", children: [
14757
+ /* @__PURE__ */ jsx54(PetPreview, { src: pet.previewSrc, label }),
14758
+ /* @__PURE__ */ jsx54("span", { className: "min-w-0 truncate", children: label })
14560
14759
  ] })
14561
14760
  },
14562
14761
  pet.id
@@ -14566,8 +14765,8 @@ function SettingsSheet({
14566
14765
  }
14567
14766
  )
14568
14767
  ] }),
14569
- draft.characterType === "atlas" && /* @__PURE__ */ jsxs36("div", { className: "space-y-2", children: [
14570
- /* @__PURE__ */ jsx53(
14768
+ draft.characterType === "atlas" && /* @__PURE__ */ jsxs37("div", { className: "space-y-2", children: [
14769
+ /* @__PURE__ */ jsx54(
14571
14770
  "label",
14572
14771
  {
14573
14772
  className: "text-sm font-medium",
@@ -14575,7 +14774,7 @@ function SettingsSheet({
14575
14774
  children: t("pet.settings.atlasUrl")
14576
14775
  }
14577
14776
  ),
14578
- /* @__PURE__ */ jsx53(
14777
+ /* @__PURE__ */ jsx54(
14579
14778
  Input,
14580
14779
  {
14581
14780
  id: "chatkit-pet-atlas",
@@ -14585,15 +14784,15 @@ function SettingsSheet({
14585
14784
  }
14586
14785
  )
14587
14786
  ] }),
14588
- /* @__PURE__ */ jsxs36("div", { className: "space-y-2", children: [
14589
- /* @__PURE__ */ jsxs36("div", { className: "flex items-center justify-between gap-4", children: [
14590
- /* @__PURE__ */ jsx53("label", { className: "text-sm font-medium", htmlFor: "chatkit-pet-scale", children: t("pet.settings.scale") }),
14591
- /* @__PURE__ */ jsxs36("span", { className: "text-xs tabular-nums text-muted-foreground", children: [
14787
+ /* @__PURE__ */ jsxs37("div", { className: "space-y-2", children: [
14788
+ /* @__PURE__ */ jsxs37("div", { className: "flex items-center justify-between gap-4", children: [
14789
+ /* @__PURE__ */ jsx54("label", { className: "text-sm font-medium", htmlFor: "chatkit-pet-scale", children: t("pet.settings.scale") }),
14790
+ /* @__PURE__ */ jsxs37("span", { className: "text-xs tabular-nums text-muted-foreground", children: [
14592
14791
  draft.scale.toFixed(2),
14593
14792
  "x"
14594
14793
  ] })
14595
14794
  ] }),
14596
- /* @__PURE__ */ jsx53(
14795
+ /* @__PURE__ */ jsx54(
14597
14796
  Slider,
14598
14797
  {
14599
14798
  id: "chatkit-pet-scale",
@@ -14607,8 +14806,8 @@ function SettingsSheet({
14607
14806
  }
14608
14807
  )
14609
14808
  ] }),
14610
- /* @__PURE__ */ jsxs36("label", { className: "flex items-center gap-2 text-sm", children: [
14611
- /* @__PURE__ */ jsx53(
14809
+ /* @__PURE__ */ jsxs37("label", { className: "flex items-center gap-2 text-sm", children: [
14810
+ /* @__PURE__ */ jsx54(
14612
14811
  "input",
14613
14812
  {
14614
14813
  type: "checkbox",
@@ -14619,8 +14818,8 @@ function SettingsSheet({
14619
14818
  ),
14620
14819
  t("pet.settings.draggable")
14621
14820
  ] }),
14622
- /* @__PURE__ */ jsxs36("label", { className: "flex items-center gap-2 text-sm", children: [
14623
- /* @__PURE__ */ jsx53(
14821
+ /* @__PURE__ */ jsxs37("label", { className: "flex items-center gap-2 text-sm", children: [
14822
+ /* @__PURE__ */ jsx54(
14624
14823
  "input",
14625
14824
  {
14626
14825
  type: "checkbox",
@@ -14631,8 +14830,8 @@ function SettingsSheet({
14631
14830
  ),
14632
14831
  t("pet.settings.persistPosition")
14633
14832
  ] }),
14634
- /* @__PURE__ */ jsxs36("div", { className: "flex justify-end gap-2 pt-2", children: [
14635
- /* @__PURE__ */ jsx53(
14833
+ /* @__PURE__ */ jsxs37("div", { className: "flex justify-end gap-2 pt-2", children: [
14834
+ /* @__PURE__ */ jsx54(
14636
14835
  Button,
14637
14836
  {
14638
14837
  type: "button",
@@ -14641,7 +14840,7 @@ function SettingsSheet({
14641
14840
  children: t("pet.settings.cancel")
14642
14841
  }
14643
14842
  ),
14644
- /* @__PURE__ */ jsx53(Button, { type: "submit", children: t("pet.settings.save") })
14843
+ /* @__PURE__ */ jsx54(Button, { type: "submit", children: t("pet.settings.save") })
14645
14844
  ] })
14646
14845
  ] })
14647
14846
  ] }) });
@@ -15267,8 +15466,260 @@ function findDomPointForComposerOffset(root, offset) {
15267
15466
  return result ?? { node: lastNode, offset: lastOffset };
15268
15467
  }
15269
15468
 
15469
+ // src/lib/message-navigation.ts
15470
+ var MESSAGE_NAVIGATION_MIN_ITEMS = 3;
15471
+ var MAX_PREVIEW_LENGTH = 180;
15472
+ var MAX_TAG_LENGTH = 40;
15473
+ function isRecord6(value) {
15474
+ return Boolean(value) && typeof value === "object" && !Array.isArray(value);
15475
+ }
15476
+ function readString4(value) {
15477
+ return typeof value === "string" && value.trim() ? value.trim() : null;
15478
+ }
15479
+ function normalizeWhitespace(value) {
15480
+ return value.replace(/\s+/g, " ").trim();
15481
+ }
15482
+ function truncate(value, maxLength) {
15483
+ const normalized = normalizeWhitespace(value);
15484
+ if (normalized.length <= maxLength) return normalized;
15485
+ return `${normalized.slice(0, Math.max(0, maxLength - 1)).trimEnd()}...`;
15486
+ }
15487
+ function pushText(draft, value) {
15488
+ const text = readString4(value);
15489
+ if (text) draft.text.push(text);
15490
+ }
15491
+ function pushTag(draft, value) {
15492
+ const tag = readString4(value);
15493
+ if (!tag) return;
15494
+ const normalized = truncate(tag, MAX_TAG_LENGTH);
15495
+ if (!draft.tags.includes(normalized)) {
15496
+ draft.tags.push(normalized);
15497
+ }
15498
+ }
15499
+ function mergeTags(...tagGroups) {
15500
+ const tags = [];
15501
+ for (const group of tagGroups) {
15502
+ for (const tag of group) {
15503
+ if (!tags.includes(tag)) tags.push(tag);
15504
+ }
15505
+ }
15506
+ return tags;
15507
+ }
15508
+ function getMessageNavigationItemId(message, index) {
15509
+ const messageId = readString4(message.id);
15510
+ if (messageId) return messageId;
15511
+ const type = readString4(message.type) ?? "message";
15512
+ return `${type}-${index}`;
15513
+ }
15514
+ function getMessageNavigationRole(type) {
15515
+ const normalized = readString4(type)?.toLowerCase();
15516
+ if (normalized === "human" || normalized === "user") return "user";
15517
+ if (normalized === "ai" || normalized === "assistant") return "assistant";
15518
+ if (normalized === "system") return "system";
15519
+ if (normalized === "tool") return "tool";
15520
+ if (normalized === "event") return "event";
15521
+ return "message";
15522
+ }
15523
+ function isTextContent4(content) {
15524
+ return content.type === "text";
15525
+ }
15526
+ function isReasoningContent4(content) {
15527
+ return content.type === "reasoning";
15528
+ }
15529
+ function isComponentContent4(content) {
15530
+ return content.type === "component";
15531
+ }
15532
+ function isMemoryContent2(content) {
15533
+ return content.type === "memory";
15534
+ }
15535
+ function isWidgetComponent3(content) {
15536
+ const data = content.data;
15537
+ return data?.type === "Widget" && Array.isArray(data.widgets);
15538
+ }
15539
+ function isMcpAppComponent2(content) {
15540
+ const data = content.data;
15541
+ return data?.type === "McpApp" && typeof data.appInstanceId === "string";
15542
+ }
15543
+ function collectWidgetContent(draft, content, labels) {
15544
+ const names = content.data.widgets.map((widget) => readString4(widget.name)).filter((name) => Boolean(name));
15545
+ if (names.length === 0) {
15546
+ pushTag(draft, labels.widget);
15547
+ return;
15548
+ }
15549
+ for (const name of names) {
15550
+ pushTag(draft, name);
15551
+ }
15552
+ }
15553
+ function collectMcpAppContent(draft, content, labels, language) {
15554
+ const title = readString4(resolveLocalizedText(content.data.title, language)) ?? readString4(content.data.toolName) ?? labels.mcpApp;
15555
+ pushTag(draft, title);
15556
+ pushText(draft, resolveLocalizedText(content.data.description, language));
15557
+ }
15558
+ function collectComponentContent(draft, content, labels, language, options) {
15559
+ if (isWidgetComponent3(content)) {
15560
+ collectWidgetContent(draft, content, labels);
15561
+ return;
15562
+ }
15563
+ if (isMcpAppComponent2(content)) {
15564
+ collectMcpAppContent(draft, content, labels, language);
15565
+ return;
15566
+ }
15567
+ const data = getToolStepData(content);
15568
+ pushTag(
15569
+ draft,
15570
+ resolveLocalizedText(data.message, language) ?? getToolActivityLabel(content, language)
15571
+ );
15572
+ if (options.includeComponentText !== false) {
15573
+ pushText(draft, resolveLocalizedText(data.message, language));
15574
+ pushText(draft, resolveLocalizedText(data.title, language));
15575
+ pushText(draft, resolveLocalizedText(data.tool, language));
15576
+ pushText(draft, resolveLocalizedText(data.type, language));
15577
+ }
15578
+ }
15579
+ function collectContentItem(draft, item, labels, language, options) {
15580
+ if (item === void 0 || isThreadContextUsageRenderArtifact(item)) return;
15581
+ if (typeof item === "string") {
15582
+ pushText(draft, item);
15583
+ return;
15584
+ }
15585
+ if (isTextContent4(item) || isReasoningContent4(item)) {
15586
+ pushText(draft, item.text);
15587
+ if (isReasoningContent4(item)) pushTag(draft, labels.reasoning);
15588
+ return;
15589
+ }
15590
+ if (item.type === "image_url") {
15591
+ pushTag(draft, labels.image);
15592
+ return;
15593
+ }
15594
+ if (isComponentContent4(item)) {
15595
+ collectComponentContent(draft, item, labels, language, options);
15596
+ return;
15597
+ }
15598
+ if (isMemoryContent2(item)) {
15599
+ pushTag(draft, labels.memory);
15600
+ }
15601
+ }
15602
+ function collectContent(draft, content, labels, language, options = {}) {
15603
+ if (typeof content === "string") {
15604
+ pushText(draft, content);
15605
+ return;
15606
+ }
15607
+ if (!Array.isArray(content)) {
15608
+ return;
15609
+ }
15610
+ for (const item of content) {
15611
+ collectContentItem(
15612
+ draft,
15613
+ item,
15614
+ labels,
15615
+ language,
15616
+ options
15617
+ );
15618
+ }
15619
+ }
15620
+ function collectReasoning(draft, reasoning, labels) {
15621
+ if (!Array.isArray(reasoning)) return;
15622
+ for (const item of reasoning) {
15623
+ if (!isRecord6(item)) continue;
15624
+ pushText(draft, item.text);
15625
+ if (readString4(item.text)) pushTag(draft, labels.reasoning);
15626
+ }
15627
+ }
15628
+ function collectFiles(draft, value, fallbackLabel) {
15629
+ if (!Array.isArray(value)) return;
15630
+ for (const file of value) {
15631
+ if (!isRecord6(file)) continue;
15632
+ pushTag(
15633
+ draft,
15634
+ file.originalName ?? file.name ?? file.fileName ?? file.id ?? fallbackLabel
15635
+ );
15636
+ }
15637
+ }
15638
+ function collectReferences(draft, value) {
15639
+ for (const reference of normalizeReferences(value)) {
15640
+ pushTag(draft, getReferenceLabel(reference));
15641
+ }
15642
+ }
15643
+ function collectRuntimeCapabilities(draft, value) {
15644
+ if (!Array.isArray(value)) return;
15645
+ for (const option of value) {
15646
+ if (!isRecord6(option)) continue;
15647
+ pushTag(draft, option.label ?? option.id ?? option.type);
15648
+ }
15649
+ }
15650
+ function getTitle(role, labels, assistantTitle) {
15651
+ if (role === "assistant" && assistantTitle?.trim()) {
15652
+ return assistantTitle.trim();
15653
+ }
15654
+ return labels[role];
15655
+ }
15656
+ function buildMessageNavigationItemSummary(message, index, options, collectOptions = {}) {
15657
+ const role = getMessageNavigationRole(message.type);
15658
+ const draft = {
15659
+ text: [],
15660
+ tags: []
15661
+ };
15662
+ const language = options.language ?? "en-US";
15663
+ const labels = options.labels;
15664
+ if (role === "user") {
15665
+ pushText(draft, message.submittedInput);
15666
+ }
15667
+ collectContent(draft, message.content, labels, language, collectOptions);
15668
+ collectReasoning(draft, message.reasoning, labels);
15669
+ collectFiles(draft, message.fileAssets, labels.attachment);
15670
+ collectFiles(draft, message.attachments, labels.attachment);
15671
+ collectReferences(draft, message.references);
15672
+ collectRuntimeCapabilities(draft, message.runtimeCapabilityOptions);
15673
+ const text = draft.text.map(normalizeWhitespace).filter(Boolean).join(" ");
15674
+ const preview = truncate(text, MAX_PREVIEW_LENGTH) || draft.tags.slice(0, 2).join(" \xB7 ");
15675
+ if (!preview && draft.tags.length === 0) {
15676
+ return null;
15677
+ }
15678
+ const messageId = readString4(message.id) ?? void 0;
15679
+ return {
15680
+ id: getMessageNavigationItemId(message, index),
15681
+ ...messageId ? { messageId } : {},
15682
+ index,
15683
+ role,
15684
+ title: getTitle(role, labels, options.assistantTitle),
15685
+ preview,
15686
+ tags: draft.tags
15687
+ };
15688
+ }
15689
+ function buildMessageNavigationItems(messages, options) {
15690
+ const items = [];
15691
+ let pendingUser = null;
15692
+ messages.forEach((message, messageIndex) => {
15693
+ const item = buildMessageNavigationItemSummary(
15694
+ message,
15695
+ messageIndex,
15696
+ options,
15697
+ { includeComponentText: false }
15698
+ );
15699
+ if (!item) return;
15700
+ if (item.role === "user") {
15701
+ pendingUser = { item };
15702
+ return;
15703
+ }
15704
+ if (item.role !== "assistant" || !pendingUser) {
15705
+ return;
15706
+ }
15707
+ items.push({
15708
+ id: pendingUser.item.id,
15709
+ ...pendingUser.item.messageId ? { messageId: pendingUser.item.messageId } : {},
15710
+ index: items.length,
15711
+ role: "user",
15712
+ title: pendingUser.item.preview,
15713
+ preview: item.preview,
15714
+ tags: mergeTags(item.tags, pendingUser.item.tags)
15715
+ });
15716
+ pendingUser = null;
15717
+ });
15718
+ return items;
15719
+ }
15720
+
15270
15721
  // src/components/chat.tsx
15271
- import { Fragment as Fragment9, jsx as jsx54, jsxs as jsxs37 } from "react/jsx-runtime";
15722
+ import { Fragment as Fragment9, jsx as jsx55, jsxs as jsxs38 } from "react/jsx-runtime";
15272
15723
  var defaultApiUrl2 = import.meta.env.VITE_XPERTAI_API_URL;
15273
15724
  var COMPOSER_INPUT_MAX_HEIGHT = 128;
15274
15725
  var LONG_TEXT_REFERENCE_THRESHOLD = 5e3;
@@ -15413,7 +15864,7 @@ function ReferenceChip({
15413
15864
  const metaLine = getReferenceMetaLine(reference);
15414
15865
  const isComposer = variant === "composer";
15415
15866
  const Icon = reference.type === "quote" ? Quote : reference.type === "image" ? ImageIcon : FileText5;
15416
- return /* @__PURE__ */ jsxs37(
15867
+ return /* @__PURE__ */ jsxs38(
15417
15868
  "div",
15418
15869
  {
15419
15870
  className: cn(
@@ -15422,7 +15873,7 @@ function ReferenceChip({
15422
15873
  ),
15423
15874
  title: getReferenceTitle(reference),
15424
15875
  children: [
15425
- /* @__PURE__ */ jsx54(
15876
+ /* @__PURE__ */ jsx55(
15426
15877
  Icon,
15427
15878
  {
15428
15879
  size: isComposer ? 14 : 12,
@@ -15432,8 +15883,8 @@ function ReferenceChip({
15432
15883
  )
15433
15884
  }
15434
15885
  ),
15435
- /* @__PURE__ */ jsxs37("div", { className: "min-w-0 flex-1", children: [
15436
- /* @__PURE__ */ jsx54(
15886
+ /* @__PURE__ */ jsxs38("div", { className: "min-w-0 flex-1", children: [
15887
+ /* @__PURE__ */ jsx55(
15437
15888
  "div",
15438
15889
  {
15439
15890
  className: cn(
@@ -15443,7 +15894,7 @@ function ReferenceChip({
15443
15894
  children: getReferenceLabel(reference)
15444
15895
  }
15445
15896
  ),
15446
- metaLine && /* @__PURE__ */ jsx54(
15897
+ metaLine && /* @__PURE__ */ jsx55(
15447
15898
  "div",
15448
15899
  {
15449
15900
  className: cn(
@@ -15454,7 +15905,7 @@ function ReferenceChip({
15454
15905
  }
15455
15906
  )
15456
15907
  ] }),
15457
- onRemove && removeLabel && /* @__PURE__ */ jsx54(
15908
+ onRemove && removeLabel && /* @__PURE__ */ jsx55(
15458
15909
  "button",
15459
15910
  {
15460
15911
  type: "button",
@@ -15465,7 +15916,7 @@ function ReferenceChip({
15465
15916
  ),
15466
15917
  title: removeLabel,
15467
15918
  "aria-label": removeLabel,
15468
- children: /* @__PURE__ */ jsx54(X6, { size: 12 })
15919
+ children: /* @__PURE__ */ jsx55(X6, { size: 12 })
15469
15920
  }
15470
15921
  )
15471
15922
  ]
@@ -15480,35 +15931,36 @@ function Chat({
15480
15931
  clientSecret = "",
15481
15932
  isClientSecretInitializing = false
15482
15933
  }) {
15483
- const { t } = useChatkitTranslation();
15934
+ const { t, i18n: i18n2 } = useChatkitTranslation();
15484
15935
  const composer = options?.composer;
15485
15936
  const startScreen = options?.startScreen;
15486
15937
  const history = options?.history;
15487
15938
  const disclaimer = options?.disclaimer;
15488
15939
  const apiUrl = options?.api?.apiUrl || defaultApiUrl2;
15940
+ const messageNavigationEnabled = options?.messageNavigation?.enabled !== false;
15489
15941
  const { setStream } = useStreamManager();
15490
15942
  const stream = useStreamContext();
15491
15943
  const { theme } = useTheme();
15492
- const [isHistoryLoading, setIsHistoryLoading] = React49.useState(false);
15493
- const [historyError, setHistoryError] = React49.useState(null);
15494
- const [assistantName, setAssistantName] = React49.useState(null);
15495
- const [assistantAvatar, setAssistantAvatar] = React49.useState(null);
15496
- const [threadGoal, setThreadGoal] = React49.useState(null);
15497
- const [goalError, setGoalError] = React49.useState(null);
15498
- const [isGoalLoading, setIsGoalLoading] = React49.useState(false);
15499
- const [isGoalPanelOpen, setIsGoalPanelOpen] = React49.useState(false);
15500
- const [isGoalObjectiveExpanded, setIsGoalObjectiveExpanded] = React49.useState(false);
15501
- const [goalElapsedStartedAt, setGoalElapsedStartedAt] = React49.useState(null);
15944
+ const [isHistoryLoading, setIsHistoryLoading] = React50.useState(false);
15945
+ const [historyError, setHistoryError] = React50.useState(null);
15946
+ const [assistantName, setAssistantName] = React50.useState(null);
15947
+ const [assistantAvatar, setAssistantAvatar] = React50.useState(null);
15948
+ const [threadGoal, setThreadGoal] = React50.useState(null);
15949
+ const [goalError, setGoalError] = React50.useState(null);
15950
+ const [isGoalLoading, setIsGoalLoading] = React50.useState(false);
15951
+ const [isGoalPanelOpen, setIsGoalPanelOpen] = React50.useState(false);
15952
+ const [isGoalObjectiveExpanded, setIsGoalObjectiveExpanded] = React50.useState(false);
15953
+ const [goalElapsedStartedAt, setGoalElapsedStartedAt] = React50.useState(null);
15502
15954
  const LOADING_DOTS_MIN_DURATION = 800;
15503
15955
  const STREAMING_STATUS_REFRESH_MS = 250;
15504
- const [showLoadingDots, setShowLoadingDots] = React49.useState(false);
15505
- const [streamingNow, setStreamingNow] = React49.useState(() => Date.now());
15506
- const loadingStartTimeRef = React49.useRef(null);
15507
- const lastStreamOutputAtRef = React49.useRef(null);
15508
- React49.useEffect(() => {
15956
+ const [showLoadingDots, setShowLoadingDots] = React50.useState(false);
15957
+ const [streamingNow, setStreamingNow] = React50.useState(() => Date.now());
15958
+ const loadingStartTimeRef = React50.useRef(null);
15959
+ const lastStreamOutputAtRef = React50.useRef(null);
15960
+ React50.useEffect(() => {
15509
15961
  setStream(stream);
15510
15962
  }, [setStream, stream]);
15511
- React49.useEffect(() => {
15963
+ React50.useEffect(() => {
15512
15964
  if (stream.isLoading) {
15513
15965
  if (!loadingStartTimeRef.current) {
15514
15966
  loadingStartTimeRef.current = Date.now();
@@ -15531,7 +15983,7 @@ function Chat({
15531
15983
  }
15532
15984
  }
15533
15985
  }, [stream.isLoading]);
15534
- React49.useEffect(() => {
15986
+ React50.useEffect(() => {
15535
15987
  if (!stream.isLoading) {
15536
15988
  lastStreamOutputAtRef.current = null;
15537
15989
  setStreamingNow(Date.now());
@@ -15541,7 +15993,7 @@ function Chat({
15541
15993
  lastStreamOutputAtRef.current = now;
15542
15994
  setStreamingNow(now);
15543
15995
  }, [stream.messages, stream.isLoading]);
15544
- React49.useEffect(() => {
15996
+ React50.useEffect(() => {
15545
15997
  if (!stream.isLoading) {
15546
15998
  return;
15547
15999
  }
@@ -15550,7 +16002,7 @@ function Chat({
15550
16002
  }, STREAMING_STATUS_REFRESH_MS);
15551
16003
  return () => window.clearInterval(timer);
15552
16004
  }, [stream.isLoading]);
15553
- React49.useEffect(() => {
16005
+ React50.useEffect(() => {
15554
16006
  if (threadGoal?.status === "active" && stream.isLoading) {
15555
16007
  setGoalElapsedStartedAt(Date.now());
15556
16008
  return;
@@ -15562,82 +16014,86 @@ function Chat({
15562
16014
  threadGoal?.id,
15563
16015
  threadGoal?.status
15564
16016
  ]);
15565
- React49.useEffect(() => {
16017
+ React50.useEffect(() => {
15566
16018
  setIsGoalObjectiveExpanded(false);
15567
16019
  }, [threadGoal?.id]);
15568
- const [composerParts, setComposerParts] = React49.useState([]);
15569
- const [renderedComposerParts, setRenderedComposerParts] = React49.useState([]);
15570
- const [composerDomVersion, setComposerDomVersion] = React49.useState(0);
15571
- const [selectedTool, setSelectedTool] = React49.useState(
16020
+ const [composerParts, setComposerParts] = React50.useState([]);
16021
+ const [renderedComposerParts, setRenderedComposerParts] = React50.useState([]);
16022
+ const [composerDomVersion, setComposerDomVersion] = React50.useState(0);
16023
+ const [selectedTool, setSelectedTool] = React50.useState(
15572
16024
  null
15573
16025
  );
15574
- const [planModeEnabled, setPlanModeEnabled] = React49.useState(false);
15575
- const [petSettingsOpen, setPetSettingsOpen] = React49.useState(false);
15576
- const [petLocalSettings, setPetLocalSettings] = React49.useState(() => readPetLocalSettings());
15577
- const [runtimeCapabilities, setRuntimeCapabilities] = React49.useState(null);
15578
- const [runtimeCapabilitiesReady, setRuntimeCapabilitiesReady] = React49.useState(false);
15579
- const [sessionRuntimeCapabilities, setSessionRuntimeCapabilities] = React49.useState(
16026
+ const [planModeEnabled, setPlanModeEnabled] = React50.useState(false);
16027
+ const [petSettingsOpen, setPetSettingsOpen] = React50.useState(false);
16028
+ const [petLocalSettings, setPetLocalSettings] = React50.useState(() => readPetLocalSettings());
16029
+ const [runtimeCapabilities, setRuntimeCapabilities] = React50.useState(null);
16030
+ const [runtimeCapabilitiesReady, setRuntimeCapabilitiesReady] = React50.useState(false);
16031
+ const [sessionRuntimeCapabilities, setSessionRuntimeCapabilities] = React50.useState(
15580
16032
  () => createEmptyRuntimeCapabilitiesSelection()
15581
16033
  );
15582
- const [runRuntimeCapabilities, setRunRuntimeCapabilities] = React49.useState(
16034
+ const [runRuntimeCapabilities, setRunRuntimeCapabilities] = React50.useState(
15583
16035
  () => createEmptyRuntimeCapabilitiesSelection()
15584
16036
  );
15585
- const [runtimeCapabilityPalette, setRuntimeCapabilityPalette] = React49.useState(null);
15586
- const [attachmentState, setAttachmentState] = React49.useState({
16037
+ const [runtimeCapabilityPalette, setRuntimeCapabilityPalette] = React50.useState(null);
16038
+ const [attachmentState, setAttachmentState] = React50.useState({
15587
16039
  uploadedFiles: [],
15588
16040
  hasUploadingFiles: false,
15589
16041
  hasParsingFiles: false
15590
16042
  });
15591
- const [references, setReferences] = React49.useState([]);
15592
- const [isUploadingReferenceImages, setIsUploadingReferenceImages] = React49.useState(false);
15593
- const [quoteSelection, setQuoteSelection] = React49.useState(null);
15594
- const [isAtBottom, setIsAtBottom] = React49.useState(true);
15595
- const [hasUpdatesBelow, setHasUpdatesBelow] = React49.useState(false);
16043
+ const [references, setReferences] = React50.useState([]);
16044
+ const [isUploadingReferenceImages, setIsUploadingReferenceImages] = React50.useState(false);
16045
+ const [quoteSelection, setQuoteSelection] = React50.useState(null);
16046
+ const [isAtBottom, setIsAtBottom] = React50.useState(true);
16047
+ const [hasUpdatesBelow, setHasUpdatesBelow] = React50.useState(false);
15596
16048
  const {
15597
16049
  threads,
15598
16050
  deleteThread,
15599
16051
  refreshThreads,
15600
16052
  isLoading: isThreadsLoading
15601
16053
  } = useThreads();
15602
- const viewportRef = React49.useRef(null);
15603
- const attachmentsRef = React49.useRef(null);
15604
- const composerInputRef = React49.useRef(null);
15605
- const slashPaletteRef = React49.useRef(null);
15606
- const slashPaletteOptionRefs = React49.useRef(
16054
+ const viewportRef = React50.useRef(null);
16055
+ const messageNavigationAnchorsRef = React50.useRef(
16056
+ /* @__PURE__ */ new Map()
16057
+ );
16058
+ const attachmentsRef = React50.useRef(null);
16059
+ const composerInputRef = React50.useRef(null);
16060
+ const slashPaletteRef = React50.useRef(null);
16061
+ const slashPaletteOptionRefs = React50.useRef(
15607
16062
  []
15608
16063
  );
15609
- const composerPartsRef = React49.useRef([]);
15610
- const pendingComposerCaretOffsetRef = React49.useRef(null);
15611
- const shouldAutoScrollRef = React49.useRef(true);
15612
- const forceFollowRef = React49.useRef(false);
15613
- const previousMessageCountRef = React49.useRef(0);
15614
- const previousScrollTopRef = React49.useRef(0);
15615
- const isPrependingHistoryMessagesRef = React49.useRef(false);
15616
- const autoScrollFrameRef = React49.useRef(null);
15617
- const isPointerDownRef = React49.useRef(false);
15618
- const lastTouchYRef = React49.useRef(null);
15619
- const runtimeCapabilityPreferenceLoadRef = React49.useRef(0);
16064
+ const composerPartsRef = React50.useRef([]);
16065
+ const pendingComposerCaretOffsetRef = React50.useRef(null);
16066
+ const shouldAutoScrollRef = React50.useRef(true);
16067
+ const forceFollowRef = React50.useRef(false);
16068
+ const previousMessageCountRef = React50.useRef(0);
16069
+ const previousScrollTopRef = React50.useRef(0);
16070
+ const isPrependingHistoryMessagesRef = React50.useRef(false);
16071
+ const autoScrollFrameRef = React50.useRef(null);
16072
+ const isPointerDownRef = React50.useRef(false);
16073
+ const lastTouchYRef = React50.useRef(null);
16074
+ const runtimeCapabilityPreferenceLoadRef = React50.useRef(0);
15620
16075
  const resolvedTitle = title ?? t("chat.title");
15621
16076
  const resolvedPlaceholder = placeholder ?? t("chat.placeholder");
16077
+ const assistantTitle = assistantName || resolvedTitle;
15622
16078
  const petRequired = options?.displayMode === "pet";
15623
- const basePetSettings = React49.useMemo(
16079
+ const basePetSettings = React50.useMemo(
15624
16080
  () => derivePetLocalSettings(options?.pet),
15625
16081
  [options?.pet]
15626
16082
  );
15627
- const displayedPetSettings = React49.useMemo(
16083
+ const displayedPetSettings = React50.useMemo(
15628
16084
  () => ({
15629
16085
  ...petLocalSettings ?? basePetSettings,
15630
16086
  ...petRequired ? { enabled: true } : {}
15631
16087
  }),
15632
16088
  [basePetSettings, petLocalSettings, petRequired]
15633
16089
  );
15634
- const effectivePet = React49.useMemo(() => {
16090
+ const effectivePet = React50.useMemo(() => {
15635
16091
  if (petRequired || petLocalSettings) {
15636
16092
  return buildPetOptionsFromLocalSettings(displayedPetSettings);
15637
16093
  }
15638
16094
  return options?.pet ?? null;
15639
16095
  }, [displayedPetSettings, options?.pet, petLocalSettings, petRequired]);
15640
- const savePetLocalSettings = React49.useCallback(
16096
+ const savePetLocalSettings = React50.useCallback(
15641
16097
  (settings) => {
15642
16098
  const nextSettings = petRequired ? { ...settings, enabled: true } : settings;
15643
16099
  setPetLocalSettings(nextSettings);
@@ -15645,7 +16101,7 @@ function Chat({
15645
16101
  },
15646
16102
  [petRequired]
15647
16103
  );
15648
- const handlePetCommand = React49.useCallback(
16104
+ const handlePetCommand = React50.useCallback(
15649
16105
  (mode) => {
15650
16106
  if (mode === "settings") {
15651
16107
  setPetSettingsOpen(true);
@@ -15667,16 +16123,53 @@ function Chat({
15667
16123
  [displayedPetSettings, effectivePet, petRequired, savePetLocalSettings]
15668
16124
  );
15669
16125
  const inputPlaceholder = selectedTool?.placeholderOverride ?? composer?.placeholder ?? resolvedPlaceholder;
15670
- const messages = React49.useMemo(
16126
+ const messages = React50.useMemo(
15671
16127
  () => stream.messages ?? [],
15672
16128
  [stream.messages]
15673
16129
  );
16130
+ const messageNavigationLabels = React50.useMemo(
16131
+ () => ({
16132
+ user: t("chat.youLabel"),
16133
+ assistant: assistantTitle,
16134
+ system: t("message.navigation.system"),
16135
+ tool: t("message.navigation.tool"),
16136
+ event: t("message.navigation.event"),
16137
+ message: t("message.navigation.message"),
16138
+ image: t("message.navigation.image"),
16139
+ memory: t("message.navigation.memory"),
16140
+ widget: t("message.navigation.widget"),
16141
+ mcpApp: t("message.navigation.mcpApp"),
16142
+ attachment: t("message.navigation.attachment"),
16143
+ reference: t("message.navigation.reference"),
16144
+ capability: t("message.navigation.capability"),
16145
+ reasoning: t("message.reasoning")
16146
+ }),
16147
+ [assistantTitle, t]
16148
+ );
16149
+ const messageNavigationItems = React50.useMemo(
16150
+ () => messageNavigationEnabled ? buildMessageNavigationItems(
16151
+ messages,
16152
+ {
16153
+ labels: messageNavigationLabels,
16154
+ language: i18n2.language,
16155
+ assistantTitle
16156
+ }
16157
+ ) : [],
16158
+ [
16159
+ assistantTitle,
16160
+ i18n2.language,
16161
+ messageNavigationEnabled,
16162
+ messageNavigationLabels,
16163
+ messages
16164
+ ]
16165
+ );
16166
+ const showMessageNavigation = messageNavigationItems.length >= MESSAGE_NAVIGATION_MIN_ITEMS;
15674
16167
  const historyMessagePagination = stream.historyMessagePagination;
15675
16168
  const isLoadingMoreMessages = Boolean(
15676
16169
  historyMessagePagination?.isLoadingMore
15677
16170
  );
15678
16171
  const canLoadMoreMessages = Boolean(historyMessagePagination?.hasMore);
15679
- const draft = React49.useMemo(
16172
+ const draft = React50.useMemo(
15680
16173
  () => getComposerPlainText(composerParts),
15681
16174
  [composerParts]
15682
16175
  );
@@ -15690,7 +16183,7 @@ function Chat({
15690
16183
  isEmpty: isComposerInputEmpty,
15691
16184
  isStacked: isComposerStacked
15692
16185
  });
15693
- const pendingFollowUps = React49.useMemo(
16186
+ const pendingFollowUps = React50.useMemo(
15694
16187
  () => sortVisiblePendingFollowUps(stream.pendingFollowUps ?? []),
15695
16188
  [stream.pendingFollowUps]
15696
16189
  );
@@ -15699,21 +16192,18 @@ function Chat({
15699
16192
  const hasPendingHITLRequest = Boolean(stream.pendingHITLRequest);
15700
16193
  const hasPendingInteractiveRequest = hasPendingRequestUserInput || hasPendingHITLRequest;
15701
16194
  const hasPendingTodos = Boolean(stream.todos?.items.length);
15702
- const runtimeCapabilityOptions = React49.useMemo(
16195
+ const runtimeCapabilityOptions = React50.useMemo(
15703
16196
  () => getRuntimeCapabilityOptions(runtimeCapabilities),
15704
16197
  [runtimeCapabilities]
15705
16198
  );
15706
- const goalAdapter = React49.useMemo(
15707
- () => {
15708
- if (isGoalAdapter(options?.goal)) {
15709
- return options.goal;
15710
- }
15711
- return supportsXpertThreadGoalAdapter(stream.client) ? createXpertThreadGoalAdapter(stream.client) : null;
15712
- },
15713
- [options?.goal, stream.client]
15714
- );
16199
+ const goalAdapter = React50.useMemo(() => {
16200
+ if (isGoalAdapter(options?.goal)) {
16201
+ return options.goal;
16202
+ }
16203
+ return supportsXpertThreadGoalAdapter(stream.client) ? createXpertThreadGoalAdapter(stream.client) : null;
16204
+ }, [options?.goal, stream.client]);
15715
16205
  const displayedGoalElapsedSeconds = threadGoal ? (threadGoal.elapsedSeconds ?? 0) + (goalElapsedStartedAt ? Math.max(0, Math.floor((streamingNow - goalElapsedStartedAt) / 1e3)) : 0) : 0;
15716
- const effectiveSessionRuntimeCapabilities = React49.useMemo(
16206
+ const effectiveSessionRuntimeCapabilities = React50.useMemo(
15717
16207
  () => runtimeCapabilitiesReady && runtimeCapabilities ? mergeRuntimeCapabilitiesSelections(
15718
16208
  runtimeCapabilities,
15719
16209
  sessionRuntimeCapabilities
@@ -15726,7 +16216,7 @@ function Chat({
15726
16216
  "goal"
15727
16217
  );
15728
16218
  const showGoalStatus = goalCommandAvailable && !hasCompletedGoal && (Boolean(goalError) || threadGoal?.status === "active" && stream.isLoading);
15729
- const runRuntimeCapabilityOptions = React49.useMemo(
16219
+ const runRuntimeCapabilityOptions = React50.useMemo(
15730
16220
  () => runtimeCapabilityOptions.filter(
15731
16221
  (option) => isRuntimeCapabilitySelected(
15732
16222
  runRuntimeCapabilities,
@@ -15736,11 +16226,11 @@ function Chat({
15736
16226
  ),
15737
16227
  [runRuntimeCapabilities, runtimeCapabilityOptions]
15738
16228
  );
15739
- const composerRuntimeCapabilitySelectionKeys = React49.useMemo(
16229
+ const composerRuntimeCapabilitySelectionKeys = React50.useMemo(
15740
16230
  () => getComposerCapabilitySelectionKeys(composerParts),
15741
16231
  [composerParts]
15742
16232
  );
15743
- const detachedRunRuntimeCapabilityOptions = React49.useMemo(
16233
+ const detachedRunRuntimeCapabilityOptions = React50.useMemo(
15744
16234
  () => runRuntimeCapabilityOptions.filter(
15745
16235
  (option) => !composerRuntimeCapabilitySelectionKeys.has(
15746
16236
  getRuntimeCapabilityOptionKey(option)
@@ -15748,7 +16238,7 @@ function Chat({
15748
16238
  ),
15749
16239
  [composerRuntimeCapabilitySelectionKeys, runRuntimeCapabilityOptions]
15750
16240
  );
15751
- const persistSessionRuntimeCapabilities = React49.useCallback(
16241
+ const persistSessionRuntimeCapabilities = React50.useCallback(
15752
16242
  async (threadId, selection) => {
15753
16243
  if (!runtimeCapabilities || !selection) {
15754
16244
  return;
@@ -15773,10 +16263,10 @@ function Chat({
15773
16263
  },
15774
16264
  [runtimeCapabilities, stream.client]
15775
16265
  );
15776
- const clearQuoteSelection = React49.useCallback(() => {
16266
+ const clearQuoteSelection = React50.useCallback(() => {
15777
16267
  setQuoteSelection(null);
15778
16268
  }, []);
15779
- const commitComposerParts = React49.useCallback(
16269
+ const commitComposerParts = React50.useCallback(
15780
16270
  (nextParts, options2) => {
15781
16271
  const normalized = normalizeComposerParts(nextParts);
15782
16272
  const previous = composerPartsRef.current;
@@ -15812,7 +16302,7 @@ function Chat({
15812
16302
  },
15813
16303
  []
15814
16304
  );
15815
- const setComposerText = React49.useCallback(
16305
+ const setComposerText = React50.useCallback(
15816
16306
  (text, caretOffset = text.length) => {
15817
16307
  commitComposerParts(createComposerTextParts(text), {
15818
16308
  caretOffset,
@@ -15822,7 +16312,7 @@ function Chat({
15822
16312
  },
15823
16313
  [commitComposerParts]
15824
16314
  );
15825
- const focusComposerAt = React49.useCallback((position) => {
16315
+ const focusComposerAt = React50.useCallback((position) => {
15826
16316
  const nextPosition = position ?? getComposerEditingLength(composerPartsRef.current);
15827
16317
  pendingComposerCaretOffsetRef.current = nextPosition;
15828
16318
  requestAnimationFrame(() => {
@@ -15834,7 +16324,7 @@ function Chat({
15834
16324
  });
15835
16325
  }, []);
15836
16326
  const parentMessenger = useParentMessenger({
15837
- onSetComposerValue: React49.useCallback(
16327
+ onSetComposerValue: React50.useCallback(
15838
16328
  (payload) => {
15839
16329
  if (!payload) {
15840
16330
  return;
@@ -15857,10 +16347,10 @@ function Chat({
15857
16347
  },
15858
16348
  [composer?.tools, setComposerText]
15859
16349
  ),
15860
- onFocusComposer: React49.useCallback(() => {
16350
+ onFocusComposer: React50.useCallback(() => {
15861
16351
  composerInputRef.current?.focus();
15862
16352
  }, []),
15863
- onSetPetEnabled: React49.useCallback(
16353
+ onSetPetEnabled: React50.useCallback(
15864
16354
  (enabled) => {
15865
16355
  if (petRequired) {
15866
16356
  return;
@@ -15874,10 +16364,10 @@ function Chat({
15874
16364
  )
15875
16365
  });
15876
16366
  const canMinimizeToPet = parentMessenger?.isParentAvailable === true && isPetEnabled(effectivePet);
15877
- const handleMinimizeToPet = React49.useCallback(() => {
16367
+ const handleMinimizeToPet = React50.useCallback(() => {
15878
16368
  parentMessenger?.sendEvent("chat_minimize_change", { minimized: true });
15879
16369
  }, [parentMessenger]);
15880
- const syncQuoteSelection = React49.useCallback(() => {
16370
+ const syncQuoteSelection = React50.useCallback(() => {
15881
16371
  if (typeof window === "undefined") {
15882
16372
  clearQuoteSelection();
15883
16373
  return;
@@ -15922,23 +16412,23 @@ function Chat({
15922
16412
  left
15923
16413
  });
15924
16414
  }, [clearQuoteSelection]);
15925
- const cancelPendingAutoScroll = React49.useCallback(() => {
16415
+ const cancelPendingAutoScroll = React50.useCallback(() => {
15926
16416
  if (autoScrollFrameRef.current !== null) {
15927
16417
  cancelAnimationFrame(autoScrollFrameRef.current);
15928
16418
  autoScrollFrameRef.current = null;
15929
16419
  }
15930
16420
  }, []);
15931
- const disableAutoFollow = React49.useCallback(() => {
16421
+ const disableAutoFollow = React50.useCallback(() => {
15932
16422
  forceFollowRef.current = false;
15933
16423
  shouldAutoScrollRef.current = false;
15934
16424
  cancelPendingAutoScroll();
15935
16425
  }, [cancelPendingAutoScroll]);
15936
- const enableAutoFollow = React49.useCallback(() => {
16426
+ const enableAutoFollow = React50.useCallback(() => {
15937
16427
  forceFollowRef.current = true;
15938
16428
  shouldAutoScrollRef.current = true;
15939
16429
  setHasUpdatesBelow(false);
15940
16430
  }, []);
15941
- const scrollToBottom = React49.useCallback(
16431
+ const scrollToBottom = React50.useCallback(
15942
16432
  (smooth = false, force = false) => {
15943
16433
  if (force) {
15944
16434
  enableAutoFollow();
@@ -15965,7 +16455,25 @@ function Chat({
15965
16455
  },
15966
16456
  [cancelPendingAutoScroll, enableAutoFollow]
15967
16457
  );
15968
- React49.useEffect(() => {
16458
+ const setMessageNavigationAnchor = React50.useCallback(
16459
+ (id, node) => {
16460
+ if (node) {
16461
+ messageNavigationAnchorsRef.current.set(id, node);
16462
+ return;
16463
+ }
16464
+ messageNavigationAnchorsRef.current.delete(id);
16465
+ },
16466
+ []
16467
+ );
16468
+ const getMessageNavigationAnchor = React50.useCallback(
16469
+ (item) => messageNavigationAnchorsRef.current.get(item.id) ?? null,
16470
+ []
16471
+ );
16472
+ const handleMessageNavigationNavigate = React50.useCallback(() => {
16473
+ disableAutoFollow();
16474
+ clearQuoteSelection();
16475
+ }, [clearQuoteSelection, disableAutoFollow]);
16476
+ React50.useEffect(() => {
15969
16477
  const viewport = viewportRef.current;
15970
16478
  if (!viewport) return;
15971
16479
  previousScrollTopRef.current = viewport.scrollTop;
@@ -16046,14 +16554,14 @@ function Chat({
16046
16554
  window.removeEventListener("pointercancel", stopPointerTracking);
16047
16555
  };
16048
16556
  }, [cancelPendingAutoScroll, disableAutoFollow]);
16049
- React49.useEffect(() => {
16557
+ React50.useEffect(() => {
16050
16558
  shouldAutoScrollRef.current = true;
16051
16559
  forceFollowRef.current = false;
16052
16560
  previousScrollTopRef.current = 0;
16053
16561
  setIsAtBottom(true);
16054
16562
  setHasUpdatesBelow(false);
16055
16563
  }, [stream.threadId]);
16056
- React49.useEffect(() => {
16564
+ React50.useEffect(() => {
16057
16565
  const messageCountChanged = messages.length !== previousMessageCountRef.current;
16058
16566
  previousMessageCountRef.current = messages.length;
16059
16567
  if (isPrependingHistoryMessagesRef.current) {
@@ -16076,7 +16584,7 @@ function Chat({
16076
16584
  clientSecret: effectiveClientSecret
16077
16585
  });
16078
16586
  const missingConfig = Boolean(missingConfigKind);
16079
- const missingConfigShortMessage = React49.useMemo(() => {
16587
+ const missingConfigShortMessage = React50.useMemo(() => {
16080
16588
  switch (missingConfigKind) {
16081
16589
  case "apiUrl":
16082
16590
  return t("chat.missingApiUrlShort");
@@ -16088,7 +16596,7 @@ function Chat({
16088
16596
  return t("chat.missingConfigShort");
16089
16597
  }
16090
16598
  }, [missingConfigKind, t]);
16091
- const missingConfigDetailMessage = React49.useMemo(() => {
16599
+ const missingConfigDetailMessage = React50.useMemo(() => {
16092
16600
  switch (missingConfigKind) {
16093
16601
  case "apiUrl":
16094
16602
  return t("chat.missingApiUrlDetail");
@@ -16105,7 +16613,7 @@ function Chat({
16105
16613
  const isSubmissionBlocked = hasPendingInteractiveRequest || missingConfig || isHistoryLoading || hasUploadingFiles || isUploadingReferenceImages;
16106
16614
  const isSendDisabled = !trimmedDraft && !hasReferences || isSubmissionBlocked;
16107
16615
  const isPromptEditDisabled = hasPendingInteractiveRequest || missingConfig || isHistoryLoading;
16108
- const resizeComposerInput = React49.useCallback(() => {
16616
+ const resizeComposerInput = React50.useCallback(() => {
16109
16617
  const input = composerInputRef.current;
16110
16618
  if (!input) {
16111
16619
  return;
@@ -16113,7 +16621,7 @@ function Chat({
16113
16621
  input.style.maxHeight = `${COMPOSER_INPUT_MAX_HEIGHT}px`;
16114
16622
  input.style.overflowY = input.scrollHeight > COMPOSER_INPUT_MAX_HEIGHT ? "auto" : "hidden";
16115
16623
  }, []);
16116
- React49.useLayoutEffect(() => {
16624
+ React50.useLayoutEffect(() => {
16117
16625
  composerPartsRef.current = composerParts;
16118
16626
  resizeComposerInput();
16119
16627
  const caretOffset = pendingComposerCaretOffsetRef.current;
@@ -16125,13 +16633,13 @@ function Chat({
16125
16633
  }
16126
16634
  }
16127
16635
  }, [composerDomVersion, composerParts, resizeComposerInput]);
16128
- React49.useEffect(() => {
16636
+ React50.useEffect(() => {
16129
16637
  document.addEventListener("selectionchange", syncQuoteSelection);
16130
16638
  return () => {
16131
16639
  document.removeEventListener("selectionchange", syncQuoteSelection);
16132
16640
  };
16133
16641
  }, [syncQuoteSelection]);
16134
- React49.useEffect(() => {
16642
+ React50.useEffect(() => {
16135
16643
  const viewport = viewportRef.current;
16136
16644
  if (!viewport) {
16137
16645
  return;
@@ -16148,14 +16656,14 @@ function Chat({
16148
16656
  window.removeEventListener("resize", handleViewportScroll);
16149
16657
  };
16150
16658
  }, [clearQuoteSelection]);
16151
- React49.useEffect(() => {
16659
+ React50.useEffect(() => {
16152
16660
  clearQuoteSelection();
16153
16661
  }, [messages.length, stream.threadId, clearQuoteSelection]);
16154
- React49.useEffect(() => {
16662
+ React50.useEffect(() => {
16155
16663
  if (missingConfig) return;
16156
16664
  void refreshThreads();
16157
16665
  }, [missingConfig, refreshThreads]);
16158
- React49.useEffect(() => {
16666
+ React50.useEffect(() => {
16159
16667
  if (missingConfig || !stream.client || !stream.assistantId) {
16160
16668
  setAssistantName(null);
16161
16669
  setAssistantAvatar(null);
@@ -16178,7 +16686,7 @@ function Chat({
16178
16686
  cancelled = true;
16179
16687
  };
16180
16688
  }, [missingConfig, stream.client, stream.assistantId]);
16181
- React49.useEffect(() => {
16689
+ React50.useEffect(() => {
16182
16690
  if (missingConfig || !stream.client || !stream.assistantId) {
16183
16691
  setRuntimeCapabilities(null);
16184
16692
  setRuntimeCapabilitiesReady(false);
@@ -16225,7 +16733,7 @@ function Chat({
16225
16733
  });
16226
16734
  return () => controller.abort();
16227
16735
  }, [missingConfig, stream.client, stream.assistantId]);
16228
- React49.useEffect(() => {
16736
+ React50.useEffect(() => {
16229
16737
  setRunRuntimeCapabilities(
16230
16738
  createEmptyRuntimeCapabilitiesSelection(runtimeCapabilities)
16231
16739
  );
@@ -16274,10 +16782,10 @@ function Chat({
16274
16782
  stream.client,
16275
16783
  stream.threadId
16276
16784
  ]);
16277
- React49.useEffect(() => {
16785
+ React50.useEffect(() => {
16278
16786
  setThreadGoal(stream.threadGoal);
16279
16787
  }, [stream.threadGoal]);
16280
- React49.useEffect(() => {
16788
+ React50.useEffect(() => {
16281
16789
  const threadId = stream.threadId?.trim();
16282
16790
  if (!threadId || !goalCommandAvailable) {
16283
16791
  setThreadGoal(null);
@@ -16318,7 +16826,7 @@ function Chat({
16318
16826
  return () => controller.abort();
16319
16827
  }, [goalAdapter, goalCommandAvailable, stream.threadId]);
16320
16828
  const uploadedFiles = attachmentState.uploadedFiles;
16321
- const handleSessionRuntimeCapabilityToggle = React49.useCallback(
16829
+ const handleSessionRuntimeCapabilityToggle = React50.useCallback(
16322
16830
  (type, id, selected) => {
16323
16831
  setSessionRuntimeCapabilities((previous) => {
16324
16832
  const nextSelection = toggleRuntimeCapabilitySelection(
@@ -16336,7 +16844,7 @@ function Chat({
16336
16844
  },
16337
16845
  [persistSessionRuntimeCapabilities, stream.threadId]
16338
16846
  );
16339
- const updateRuntimeCapabilityPalette = React49.useCallback(
16847
+ const updateRuntimeCapabilityPalette = React50.useCallback(
16340
16848
  (parts, selectionStart) => {
16341
16849
  const input = composerInputRef.current;
16342
16850
  const editingText = getComposerEditingText(parts);
@@ -16348,7 +16856,7 @@ function Chat({
16348
16856
  },
16349
16857
  []
16350
16858
  );
16351
- const syncComposerInputFromElement = React49.useCallback(
16859
+ const syncComposerInputFromElement = React50.useCallback(
16352
16860
  (input) => {
16353
16861
  const previousCapabilities = getComposerCapabilityPartMap(
16354
16862
  composerPartsRef.current
@@ -16366,25 +16874,25 @@ function Chat({
16366
16874
  },
16367
16875
  [commitComposerParts, updateRuntimeCapabilityPalette]
16368
16876
  );
16369
- const handleComposerInput = React49.useCallback(
16877
+ const handleComposerInput = React50.useCallback(
16370
16878
  (event) => {
16371
16879
  syncComposerInputFromElement(event.currentTarget);
16372
16880
  },
16373
16881
  [syncComposerInputFromElement]
16374
16882
  );
16375
- const handleComposerCompositionEnd = React49.useCallback(
16883
+ const handleComposerCompositionEnd = React50.useCallback(
16376
16884
  (event) => {
16377
16885
  syncComposerInputFromElement(event.currentTarget);
16378
16886
  },
16379
16887
  [syncComposerInputFromElement]
16380
16888
  );
16381
- const handleComposerSelect = React49.useCallback(() => {
16889
+ const handleComposerSelect = React50.useCallback(() => {
16382
16890
  updateRuntimeCapabilityPalette(
16383
16891
  composerPartsRef.current,
16384
16892
  composerInputRef.current ? getComposerSelectionOffset(composerInputRef.current) : void 0
16385
16893
  );
16386
16894
  }, [updateRuntimeCapabilityPalette]);
16387
- const removeRunRuntimeCapability = React49.useCallback(
16895
+ const removeRunRuntimeCapability = React50.useCallback(
16388
16896
  (option) => {
16389
16897
  setRunRuntimeCapabilities(
16390
16898
  (previous) => toggleRuntimeCapabilitySelection(
@@ -16404,7 +16912,7 @@ function Chat({
16404
16912
  },
16405
16913
  [commitComposerParts]
16406
16914
  );
16407
- const submitDraft = React49.useCallback(
16915
+ const submitDraft = React50.useCallback(
16408
16916
  (submitOptions = {}) => {
16409
16917
  if (isSubmissionBlocked) return;
16410
16918
  const contentToSubmit = (submitOptions.inputText ?? trimmedDraft).trim();
@@ -16527,7 +17035,7 @@ function Chat({
16527
17035
  t
16528
17036
  ]
16529
17037
  );
16530
- const handleGoalCommand = React49.useCallback(
17038
+ const handleGoalCommand = React50.useCallback(
16531
17039
  async ({
16532
17040
  args,
16533
17041
  commandSource,
@@ -16639,13 +17147,10 @@ function Chat({
16639
17147
  t
16640
17148
  ]
16641
17149
  );
16642
- const handleGoalPanelOpenChange = React49.useCallback(
16643
- (open) => {
16644
- setIsGoalPanelOpen(open);
16645
- },
16646
- []
16647
- );
16648
- const addRunRuntimeCapabilities = React49.useCallback(
17150
+ const handleGoalPanelOpenChange = React50.useCallback((open) => {
17151
+ setIsGoalPanelOpen(open);
17152
+ }, []);
17153
+ const addRunRuntimeCapabilities = React50.useCallback(
16649
17154
  (selection) => {
16650
17155
  setRunRuntimeCapabilities(
16651
17156
  (previous) => runtimeCapabilities ? mergeRuntimeCapabilitiesSelections(
@@ -16657,7 +17162,7 @@ function Chat({
16657
17162
  },
16658
17163
  [runtimeCapabilities]
16659
17164
  );
16660
- const insertComposerCapabilityToken = React49.useCallback(
17165
+ const insertComposerCapabilityToken = React50.useCallback(
16661
17166
  (capability, range) => {
16662
17167
  const token = createComposerCapabilityPart(capability, createMessageId());
16663
17168
  const currentParts = composerPartsRef.current;
@@ -16730,7 +17235,7 @@ function Chat({
16730
17235
  plugin: t("composer.slashCommands.empty.loadingCapabilities"),
16731
17236
  subAgent: t("composer.slashCommands.empty.loadingCapabilities")
16732
17237
  };
16733
- React49.useEffect(() => {
17238
+ React50.useEffect(() => {
16734
17239
  if (!runtimeCapabilityPalette) {
16735
17240
  return;
16736
17241
  }
@@ -16749,7 +17254,7 @@ function Chat({
16749
17254
  );
16750
17255
  }
16751
17256
  }, [slashPaletteOptions.length, runtimeCapabilityPalette]);
16752
- React49.useLayoutEffect(() => {
17257
+ React50.useLayoutEffect(() => {
16753
17258
  if (!runtimeCapabilityPalette) {
16754
17259
  return;
16755
17260
  }
@@ -16766,7 +17271,7 @@ function Chat({
16766
17271
  container.scrollTop += optionRect.bottom - containerRect.bottom;
16767
17272
  }
16768
17273
  }, [runtimeCapabilityPalette, slashPaletteOptions.length]);
16769
- const submitGoalModeDraft = React49.useCallback(() => {
17274
+ const submitGoalModeDraft = React50.useCallback(() => {
16770
17275
  const objective = getComposerPlainText(composerPartsRef.current).trim();
16771
17276
  if (!isGoalModeOpen || !goalCommandAvailable || !objective) {
16772
17277
  return false;
@@ -16804,7 +17309,7 @@ function Chat({
16804
17309
  }
16805
17310
  submitDraft();
16806
17311
  };
16807
- const handleEditPendingFollowUp = React49.useCallback(
17312
+ const handleEditPendingFollowUp = React50.useCallback(
16808
17313
  (id) => {
16809
17314
  const item = pendingFollowUps.find(
16810
17315
  (entry) => entry.id === id && entry.mode === "queue"
@@ -16831,7 +17336,7 @@ function Chat({
16831
17336
  },
16832
17337
  [pendingFollowUps, setComposerText, stream]
16833
17338
  );
16834
- const handleQuoteSelection = React49.useCallback(() => {
17339
+ const handleQuoteSelection = React50.useCallback(() => {
16835
17340
  if (!quoteSelection) {
16836
17341
  return;
16837
17342
  }
@@ -16847,7 +17352,7 @@ function Chat({
16847
17352
  const handleAttachmentClick = () => {
16848
17353
  attachmentsRef.current?.openFilePicker();
16849
17354
  };
16850
- const uploadContextFile = React49.useCallback(
17355
+ const uploadContextFile = React50.useCallback(
16851
17356
  (file) => {
16852
17357
  const formData = new FormData();
16853
17358
  formData.append("file", file, file.name || "upload");
@@ -16866,13 +17371,13 @@ function Chat({
16866
17371
  },
16867
17372
  [stream.assistantId, stream.client, stream.threadId]
16868
17373
  );
16869
- const getContextFileStatus = React49.useCallback(
17374
+ const getContextFileStatus = React50.useCallback(
16870
17375
  (fileId) => stream.client.contexts.fetch(`/files/${fileId}/status`, {
16871
17376
  method: "GET"
16872
17377
  }),
16873
17378
  [stream.client]
16874
17379
  );
16875
- const deleteContextFile = React49.useCallback(
17380
+ const deleteContextFile = React50.useCallback(
16876
17381
  (storageFileId) => stream.client.contexts.deleteFile(storageFileId),
16877
17382
  [stream.client]
16878
17383
  );
@@ -16980,7 +17485,7 @@ function Chat({
16980
17485
  }
16981
17486
  submitDraft();
16982
17487
  };
16983
- const handleComposerPaste = React49.useCallback(
17488
+ const handleComposerPaste = React50.useCallback(
16984
17489
  (event) => {
16985
17490
  const clipboardData = event.clipboardData;
16986
17491
  if (!clipboardData) {
@@ -17082,13 +17587,13 @@ function Chat({
17082
17587
  const handleToolSelect = (tool) => {
17083
17588
  setSelectedTool((prev) => prev?.id === tool.id ? null : tool);
17084
17589
  };
17085
- const handlePromptClick = React49.useCallback(
17590
+ const handlePromptClick = React50.useCallback(
17086
17591
  (prompt) => {
17087
17592
  submitDraft({ inputText: prompt, displayText: prompt });
17088
17593
  },
17089
17594
  [submitDraft]
17090
17595
  );
17091
- const handlePromptEdit = React49.useCallback(
17596
+ const handlePromptEdit = React50.useCallback(
17092
17597
  (prompt) => {
17093
17598
  if (isPromptEditDisabled) return;
17094
17599
  setComposerText(prompt, prompt.length);
@@ -17097,7 +17602,7 @@ function Chat({
17097
17602
  },
17098
17603
  [focusComposerAt, isPromptEditDisabled, setComposerText]
17099
17604
  );
17100
- const loadConversationMessages = React49.useCallback(
17605
+ const loadConversationMessages = React50.useCallback(
17101
17606
  async (recordId) => {
17102
17607
  if (missingConfig) {
17103
17608
  setHistoryError(missingConfigShortMessage);
@@ -17118,7 +17623,7 @@ function Chat({
17118
17623
  },
17119
17624
  [missingConfig, missingConfigShortMessage, stream, t]
17120
17625
  );
17121
- const handleLoadMoreMessages = React49.useCallback(async () => {
17626
+ const handleLoadMoreMessages = React50.useCallback(async () => {
17122
17627
  if (!canLoadMoreMessages || isLoadingMoreMessages) {
17123
17628
  return;
17124
17629
  }
@@ -17227,15 +17732,15 @@ function Chat({
17227
17732
  };
17228
17733
  const acceptMimes = composer?.attachments?.accept ? Object.entries(composer.attachments.accept).map(([mime, exts]) => [mime, ...exts.map((e) => `.${e}`)].join(",")).join(",") : void 0;
17229
17734
  const canUploadDroppedFiles = composer?.attachments?.enabled === true && !missingConfig && !isHistoryLoading && !hasPendingInteractiveRequest;
17230
- const handleDroppedFiles = React49.useCallback((files) => {
17735
+ const handleDroppedFiles = React50.useCallback((files) => {
17231
17736
  return attachmentsRef.current?.queueFiles(files) ?? false;
17232
17737
  }, []);
17233
- const currentThread = React49.useMemo(
17738
+ const currentThread = React50.useMemo(
17234
17739
  () => threads.find((item) => item.id === stream.threadId),
17235
17740
  [threads, stream.threadId]
17236
17741
  );
17237
17742
  const streamErrorMessage = stream.error instanceof Error ? stream.error.message : void 0;
17238
- const threadErrorMessage = React49.useMemo(() => {
17743
+ const threadErrorMessage = React50.useMemo(() => {
17239
17744
  if (streamErrorMessage?.trim()) return streamErrorMessage.trim();
17240
17745
  if (currentThread?.status !== "error") return void 0;
17241
17746
  const message = currentThread.error?.trim();
@@ -17265,15 +17770,14 @@ function Chat({
17265
17770
  historyMessageLoadVersion: stream.historyMessageLoadVersion ?? 0,
17266
17771
  fallbackTitle: t("history.threadFallback")
17267
17772
  });
17268
- const assistantTitle = assistantName || resolvedTitle;
17269
17773
  const layoutMaxWidth = options?.layout?.maxWidth;
17270
- const chatColumnStyle = React49.useMemo(() => {
17774
+ const chatColumnStyle = React50.useMemo(() => {
17271
17775
  if (layoutMaxWidth === void 0 || layoutMaxWidth === null || layoutMaxWidth === "") {
17272
17776
  return void 0;
17273
17777
  }
17274
17778
  return { maxWidth: layoutMaxWidth };
17275
17779
  }, [layoutMaxWidth]);
17276
- return /* @__PURE__ */ jsxs37(
17780
+ return /* @__PURE__ */ jsxs38(
17277
17781
  UploadDroppedFiles,
17278
17782
  {
17279
17783
  ref: viewportRef,
@@ -17288,16 +17792,16 @@ function Chat({
17288
17792
  className
17289
17793
  ),
17290
17794
  children: [
17291
- /* @__PURE__ */ jsxs37(
17795
+ /* @__PURE__ */ jsxs38(
17292
17796
  "div",
17293
17797
  {
17294
17798
  "data-slot": "chatkit-chat-header",
17295
17799
  className: "mx-auto flex w-full items-center justify-between border-b p-2 sticky top-0 z-10 bg-background",
17296
17800
  style: chatColumnStyle,
17297
17801
  children: [
17298
- /* @__PURE__ */ jsxs37("div", { className: "flex items-center gap-3 overflow-hidden", children: [
17299
- /* @__PURE__ */ jsxs37("div", { className: "relative shrink-0", children: [
17300
- /* @__PURE__ */ jsx54(
17802
+ /* @__PURE__ */ jsxs38("div", { className: "flex items-center gap-3 overflow-hidden", children: [
17803
+ /* @__PURE__ */ jsxs38("div", { className: "relative shrink-0", children: [
17804
+ /* @__PURE__ */ jsx55(
17301
17805
  ChatkitAvatar,
17302
17806
  {
17303
17807
  avatar: assistantAvatar,
@@ -17305,10 +17809,10 @@ function Chat({
17305
17809
  label: assistantTitle
17306
17810
  }
17307
17811
  ),
17308
- /* @__PURE__ */ jsx54("span", { className: "absolute bottom-0 right-0 h-2.5 w-2.5 rounded-full border-2 border-background bg-green-500" })
17812
+ /* @__PURE__ */ jsx55("span", { className: "absolute bottom-0 right-0 h-2.5 w-2.5 rounded-full border-2 border-background bg-green-500" })
17309
17813
  ] }),
17310
- /* @__PURE__ */ jsxs37("div", { className: "truncate", children: [
17311
- /* @__PURE__ */ jsx54(
17814
+ /* @__PURE__ */ jsxs38("div", { className: "truncate", children: [
17815
+ /* @__PURE__ */ jsx55(
17312
17816
  "h2",
17313
17817
  {
17314
17818
  className: "text-lg font-semibold truncate",
@@ -17316,12 +17820,12 @@ function Chat({
17316
17820
  children: assistantTitle
17317
17821
  }
17318
17822
  ),
17319
- /* @__PURE__ */ jsx54("p", { className: "text-xs text-muted-foreground", children: t("chat.statusOnline") })
17823
+ /* @__PURE__ */ jsx55("p", { className: "text-xs text-muted-foreground", children: t("chat.statusOnline") })
17320
17824
  ] })
17321
17825
  ] }),
17322
- /* @__PURE__ */ jsxs37("div", { className: "flex items-center gap-1", children: [
17323
- canMinimizeToPet && /* @__PURE__ */ jsxs37(Tooltip, { children: [
17324
- /* @__PURE__ */ jsx54(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx54("span", { className: "inline-flex h-8 w-8", children: /* @__PURE__ */ jsx54(
17826
+ /* @__PURE__ */ jsxs38("div", { className: "flex items-center gap-1", children: [
17827
+ canMinimizeToPet && /* @__PURE__ */ jsxs38(Tooltip, { children: [
17828
+ /* @__PURE__ */ jsx55(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx55("span", { className: "inline-flex h-8 w-8", children: /* @__PURE__ */ jsx55(
17325
17829
  "button",
17326
17830
  {
17327
17831
  type: "button",
@@ -17332,13 +17836,13 @@ function Chat({
17332
17836
  "transition-colors duration-150"
17333
17837
  ),
17334
17838
  "aria-label": t("chat.minimizeToPet"),
17335
- children: /* @__PURE__ */ jsx54(Minus, { size: 16 })
17839
+ children: /* @__PURE__ */ jsx55(Minus, { size: 16 })
17336
17840
  }
17337
17841
  ) }) }),
17338
- /* @__PURE__ */ jsx54(TooltipContent, { side: "bottom", children: t("chat.minimizeToPet") })
17842
+ /* @__PURE__ */ jsx55(TooltipContent, { side: "bottom", children: t("chat.minimizeToPet") })
17339
17843
  ] }),
17340
- /* @__PURE__ */ jsxs37(Tooltip, { children: [
17341
- /* @__PURE__ */ jsx54(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx54("span", { className: "inline-flex h-8 w-8", children: /* @__PURE__ */ jsx54(
17844
+ /* @__PURE__ */ jsxs38(Tooltip, { children: [
17845
+ /* @__PURE__ */ jsx55(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx55("span", { className: "inline-flex h-8 w-8", children: /* @__PURE__ */ jsx55(
17342
17846
  "button",
17343
17847
  {
17344
17848
  type: "button",
@@ -17349,14 +17853,14 @@ function Chat({
17349
17853
  "transition-colors duration-150"
17350
17854
  ),
17351
17855
  "aria-label": t("settings.open"),
17352
- children: /* @__PURE__ */ jsx54(Settings2, { size: 16 })
17856
+ children: /* @__PURE__ */ jsx55(Settings2, { size: 16 })
17353
17857
  }
17354
17858
  ) }) }),
17355
- /* @__PURE__ */ jsx54(TooltipContent, { side: "bottom", children: t("settings.open") })
17859
+ /* @__PURE__ */ jsx55(TooltipContent, { side: "bottom", children: t("settings.open") })
17356
17860
  ] }),
17357
- history?.enabled !== false && /* @__PURE__ */ jsxs37(Fragment9, { children: [
17358
- /* @__PURE__ */ jsxs37(Tooltip, { children: [
17359
- /* @__PURE__ */ jsx54(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx54("span", { className: "inline-flex h-8 w-8", children: /* @__PURE__ */ jsx54(
17861
+ history?.enabled !== false && /* @__PURE__ */ jsxs38(Fragment9, { children: [
17862
+ /* @__PURE__ */ jsxs38(Tooltip, { children: [
17863
+ /* @__PURE__ */ jsx55(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx55("span", { className: "inline-flex h-8 w-8", children: /* @__PURE__ */ jsx55(
17360
17864
  "button",
17361
17865
  {
17362
17866
  type: "button",
@@ -17369,12 +17873,12 @@ function Chat({
17369
17873
  "disabled:pointer-events-none disabled:opacity-50 disabled:cursor-not-allowed"
17370
17874
  ),
17371
17875
  "aria-label": t("history.newThread"),
17372
- children: /* @__PURE__ */ jsx54(Pencil4, { size: 16 })
17876
+ children: /* @__PURE__ */ jsx55(Pencil4, { size: 16 })
17373
17877
  }
17374
17878
  ) }) }),
17375
- /* @__PURE__ */ jsx54(TooltipContent, { side: "bottom", children: t("history.newThread") })
17879
+ /* @__PURE__ */ jsx55(TooltipContent, { side: "bottom", children: t("history.newThread") })
17376
17880
  ] }),
17377
- /* @__PURE__ */ jsx54(
17881
+ /* @__PURE__ */ jsx55(
17378
17882
  HistorySidebar,
17379
17883
  {
17380
17884
  threads,
@@ -17391,18 +17895,29 @@ function Chat({
17391
17895
  ]
17392
17896
  }
17393
17897
  ),
17394
- /* @__PURE__ */ jsxs37(
17898
+ showMessageNavigation && /* @__PURE__ */ jsx55(
17899
+ MessageNavigator,
17900
+ {
17901
+ items: messageNavigationItems,
17902
+ viewportRef,
17903
+ getAnchor: getMessageNavigationAnchor,
17904
+ onNavigate: handleMessageNavigationNavigate,
17905
+ label: t("message.navigation.label"),
17906
+ tagsOverflowLabel: (count) => t("message.navigation.moreTags", { count })
17907
+ }
17908
+ ),
17909
+ /* @__PURE__ */ jsxs38(
17395
17910
  "div",
17396
17911
  {
17397
17912
  "data-slot": "chatkit-chat-content",
17398
17913
  className: "mx-auto w-full flex-1 p-4",
17399
17914
  style: chatColumnStyle,
17400
17915
  children: [
17401
- errorMessage && /* @__PURE__ */ jsx54("div", { className: "mb-4 rounded-lg border border-destructive/30 bg-destructive/10 px-3 py-2 text-sm text-destructive", children: errorMessage }),
17402
- historyError && /* @__PURE__ */ jsx54("div", { className: "mb-4 rounded-lg border border-amber-200 bg-amber-50 px-3 py-2 text-sm text-amber-900", children: historyError }),
17403
- showMissingConfig && /* @__PURE__ */ jsx54("div", { className: "mb-4 rounded-lg border border-amber-200 bg-amber-50 px-3 py-2 text-sm text-amber-900", children: missingConfigDetailMessage }),
17404
- isHistoryLoading && /* @__PURE__ */ jsx54("div", { className: "mb-4 rounded-lg border border-muted px-3 py-2 text-sm text-muted-foreground", children: t("chat.loadingThread") }),
17405
- messages.length === 0 && !canLoadMoreMessages ? /* @__PURE__ */ jsx54(
17916
+ errorMessage && /* @__PURE__ */ jsx55("div", { className: "mb-4 rounded-lg border border-destructive/30 bg-destructive/10 px-3 py-2 text-sm text-destructive", children: errorMessage }),
17917
+ historyError && /* @__PURE__ */ jsx55("div", { className: "mb-4 rounded-lg border border-amber-200 bg-amber-50 px-3 py-2 text-sm text-amber-900", children: historyError }),
17918
+ showMissingConfig && /* @__PURE__ */ jsx55("div", { className: "mb-4 rounded-lg border border-amber-200 bg-amber-50 px-3 py-2 text-sm text-amber-900", children: missingConfigDetailMessage }),
17919
+ isHistoryLoading && /* @__PURE__ */ jsx55("div", { className: "mb-4 rounded-lg border border-muted px-3 py-2 text-sm text-muted-foreground", children: t("chat.loadingThread") }),
17920
+ messages.length === 0 && !canLoadMoreMessages ? /* @__PURE__ */ jsx55(
17406
17921
  StartScreen,
17407
17922
  {
17408
17923
  startScreen,
@@ -17411,10 +17926,10 @@ function Chat({
17411
17926
  promptSendDisabled: isSubmissionBlocked,
17412
17927
  promptEditDisabled: isPromptEditDisabled
17413
17928
  }
17414
- ) : /* @__PURE__ */ jsxs37("div", { className: "space-y-4", children: [
17415
- canLoadMoreMessages && /* @__PURE__ */ jsxs37("div", { className: "flex items-center gap-3 py-1", children: [
17416
- /* @__PURE__ */ jsx54("div", { className: "h-px min-w-8 flex-1 bg-border" }),
17417
- /* @__PURE__ */ jsx54(
17929
+ ) : /* @__PURE__ */ jsxs38("div", { className: "space-y-4", children: [
17930
+ canLoadMoreMessages && /* @__PURE__ */ jsxs38("div", { className: "flex items-center gap-3 py-1", children: [
17931
+ /* @__PURE__ */ jsx55("div", { className: "h-px min-w-8 flex-1 bg-border" }),
17932
+ /* @__PURE__ */ jsx55(
17418
17933
  Button,
17419
17934
  {
17420
17935
  type: "button",
@@ -17426,7 +17941,7 @@ function Chat({
17426
17941
  children: isLoadingMoreMessages ? t("chat.loadingMoreMessages") : t("chat.loadMoreMessages")
17427
17942
  }
17428
17943
  ),
17429
- /* @__PURE__ */ jsx54("div", { className: "h-px min-w-8 flex-1 bg-border" })
17944
+ /* @__PURE__ */ jsx55("div", { className: "h-px min-w-8 flex-1 bg-border" })
17430
17945
  ] }),
17431
17946
  messages.map((message, index) => {
17432
17947
  const messageType = String(message.type);
@@ -17460,18 +17975,24 @@ function Chat({
17460
17975
  const hasHumanAttachments = message.type === "human" && humanAttachments.length > 0;
17461
17976
  const canQuoteMessage = message.type === "human" || isAssistantMessage;
17462
17977
  const quoteSource = message.type === "human" ? t("chat.youLabel") : assistantTitle;
17978
+ const messageNavigationId = getMessageNavigationItemId(
17979
+ message,
17980
+ index
17981
+ );
17463
17982
  if (!isAssistantMessage && !hasPlainRenderableContent && !hasHumanAttachments && humanRuntimeCapabilityOptions.length === 0 && humanReferences.length === 0) {
17464
17983
  return null;
17465
17984
  }
17466
- return /* @__PURE__ */ jsx54(
17985
+ return /* @__PURE__ */ jsx55(
17467
17986
  "div",
17468
17987
  {
17988
+ ref: (node) => setMessageNavigationAnchor(messageNavigationId, node),
17989
+ "data-message-navigation-id": messageNavigationId,
17469
17990
  className: cn(
17470
17991
  "group flex gap-3",
17471
17992
  message.type === "human" ? "justify-end" : "justify-start -ml-1"
17472
17993
  // AI messages: slightly closer to left
17473
17994
  ),
17474
- children: /* @__PURE__ */ jsxs37(
17995
+ children: /* @__PURE__ */ jsxs38(
17475
17996
  "div",
17476
17997
  {
17477
17998
  className: cn(
@@ -17479,7 +18000,7 @@ function Chat({
17479
18000
  isAssistantMessage && "min-w-0 flex-1"
17480
18001
  ),
17481
18002
  children: [
17482
- /* @__PURE__ */ jsx54(
18003
+ /* @__PURE__ */ jsx55(
17483
18004
  "div",
17484
18005
  {
17485
18006
  ...canQuoteMessage ? {
@@ -17491,7 +18012,7 @@ function Chat({
17491
18012
  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"
17492
18013
  // AI messages: use chat-specific foreground color
17493
18014
  ),
17494
- children: isAssistantMessage ? /* @__PURE__ */ jsx54(
18015
+ children: isAssistantMessage ? /* @__PURE__ */ jsx55(
17495
18016
  AssistantMessage,
17496
18017
  {
17497
18018
  message: {
@@ -17510,25 +18031,25 @@ function Chat({
17510
18031
  organizationId: stream.organizationId,
17511
18032
  apiUrl: stream.apiUrl
17512
18033
  }
17513
- ) : /* @__PURE__ */ jsxs37(Fragment9, { children: [
17514
- message.type === "human" && humanRuntimeCapabilityOptions.length > 0 && /* @__PURE__ */ jsx54("div", { className: "mb-2 flex flex-wrap gap-1.5", children: humanRuntimeCapabilityOptions.map((option) => /* @__PURE__ */ jsxs37(
18034
+ ) : /* @__PURE__ */ jsxs38(Fragment9, { children: [
18035
+ message.type === "human" && humanRuntimeCapabilityOptions.length > 0 && /* @__PURE__ */ jsx55("div", { className: "mb-2 flex flex-wrap gap-1.5", children: humanRuntimeCapabilityOptions.map((option) => /* @__PURE__ */ jsxs38(
17515
18036
  "span",
17516
18037
  {
17517
18038
  className: "inline-flex max-w-full items-center gap-1 rounded-md bg-primary-foreground/20 px-2 py-1 text-xs font-medium text-primary-foreground",
17518
18039
  children: [
17519
- /* @__PURE__ */ jsx54(
18040
+ /* @__PURE__ */ jsx55(
17520
18041
  RuntimeCapabilityIcon,
17521
18042
  {
17522
18043
  option,
17523
18044
  variant: "chip"
17524
18045
  }
17525
18046
  ),
17526
- /* @__PURE__ */ jsx54("span", { className: "max-w-[9rem] truncate", children: option.label })
18047
+ /* @__PURE__ */ jsx55("span", { className: "max-w-[9rem] truncate", children: option.label })
17527
18048
  ]
17528
18049
  },
17529
18050
  `${option.type}:${option.id}`
17530
18051
  )) }),
17531
- message.type === "human" && humanReferences.length > 0 && /* @__PURE__ */ jsx54("div", { className: "mb-2 flex flex-wrap gap-1.5", children: humanReferences.map((reference) => /* @__PURE__ */ jsx54(
18052
+ message.type === "human" && humanReferences.length > 0 && /* @__PURE__ */ jsx55("div", { className: "mb-2 flex flex-wrap gap-1.5", children: humanReferences.map((reference) => /* @__PURE__ */ jsx55(
17532
18053
  ReferenceChip,
17533
18054
  {
17534
18055
  reference,
@@ -17536,29 +18057,29 @@ function Chat({
17536
18057
  },
17537
18058
  getReferenceKey(reference)
17538
18059
  )) }),
17539
- message.type === "human" && humanAttachments.length > 0 && /* @__PURE__ */ jsx54("div", { className: "flex flex-wrap gap-1.5 mb-2", children: humanAttachments.map((file, fileIndex) => /* @__PURE__ */ jsxs37(
18060
+ message.type === "human" && humanAttachments.length > 0 && /* @__PURE__ */ jsx55("div", { className: "flex flex-wrap gap-1.5 mb-2", children: humanAttachments.map((file, fileIndex) => /* @__PURE__ */ jsxs38(
17540
18061
  "div",
17541
18062
  {
17542
18063
  className: "flex items-center gap-1.5 rounded-md bg-primary-foreground/20 px-2 py-1 text-xs",
17543
18064
  children: [
17544
- /* @__PURE__ */ jsx54(FileText5, { size: 12 }),
17545
- /* @__PURE__ */ jsx54("span", { className: "max-w-[100px] truncate", children: file.originalName ?? file.id })
18065
+ /* @__PURE__ */ jsx55(FileText5, { size: 12 }),
18066
+ /* @__PURE__ */ jsx55("span", { className: "max-w-[100px] truncate", children: file.originalName ?? file.id })
17546
18067
  ]
17547
18068
  },
17548
18069
  fileIndex
17549
18070
  )) }),
17550
- Array.isArray(message.content) ? message.content.map((part, partIndex) => /* @__PURE__ */ jsx54(
18071
+ Array.isArray(message.content) ? message.content.map((part, partIndex) => /* @__PURE__ */ jsx55(
17551
18072
  "p",
17552
18073
  {
17553
18074
  className: "wrap-break-word text-sm leading-relaxed",
17554
18075
  children: formatMessageContent(part)
17555
18076
  },
17556
18077
  `${part.type}-${partIndex}`
17557
- )) : /* @__PURE__ */ jsx54("span", { className: "wrap-break-word text-sm leading-relaxed", children: formatMessageContent(message.content) })
18078
+ )) : /* @__PURE__ */ jsx55("span", { className: "wrap-break-word text-sm leading-relaxed", children: formatMessageContent(message.content) })
17558
18079
  ] })
17559
18080
  }
17560
18081
  ),
17561
- /* @__PURE__ */ jsx54(
18082
+ /* @__PURE__ */ jsx55(
17562
18083
  MessageActions,
17563
18084
  {
17564
18085
  content: messageContent,
@@ -17596,7 +18117,7 @@ function Chat({
17596
18117
  stream.isLoading,
17597
18118
  { now: streamingNow }
17598
18119
  );
17599
- return /* @__PURE__ */ jsx54("div", { className: "flex justify-start gap-3 -ml-2", children: /* @__PURE__ */ jsx54("div", { className: "max-w-full rounded-2xl py-2.5", children: /* @__PURE__ */ jsx54(
18120
+ return /* @__PURE__ */ jsx55("div", { className: "flex justify-start gap-3 -ml-2", children: /* @__PURE__ */ jsx55("div", { className: "max-w-full rounded-2xl py-2.5", children: /* @__PURE__ */ jsx55(
17600
18121
  AssistantStreamingIndicator,
17601
18122
  {
17602
18123
  status: fallbackStreamingStatus ?? "loading"
@@ -17607,7 +18128,7 @@ function Chat({
17607
18128
  ]
17608
18129
  }
17609
18130
  ),
17610
- !isAtBottom && messages.length > 0 && /* @__PURE__ */ jsx54("div", { className: "sticky bottom-20 z-20 flex justify-center px-4 pointer-events-none", children: /* @__PURE__ */ jsx54(
18131
+ !isAtBottom && messages.length > 0 && /* @__PURE__ */ jsx55("div", { className: "sticky bottom-20 z-20 flex justify-center px-4 pointer-events-none", children: /* @__PURE__ */ jsx55(
17611
18132
  Button,
17612
18133
  {
17613
18134
  type: "button",
@@ -17620,10 +18141,10 @@ function Chat({
17620
18141
  onClick: () => scrollToBottom(true, true),
17621
18142
  "aria-label": t("chat.scrollToBottom"),
17622
18143
  title: t("chat.scrollToBottom"),
17623
- children: /* @__PURE__ */ jsx54(ArrowDown2, { size: 16 })
18144
+ children: /* @__PURE__ */ jsx55(ArrowDown2, { size: 16 })
17624
18145
  }
17625
18146
  ) }),
17626
- quoteSelection && /* @__PURE__ */ jsx54(
18147
+ quoteSelection && /* @__PURE__ */ jsx55(
17627
18148
  "div",
17628
18149
  {
17629
18150
  className: "pointer-events-none fixed z-50",
@@ -17632,7 +18153,7 @@ function Chat({
17632
18153
  left: `${quoteSelection.left}px`,
17633
18154
  transform: "translateX(-50%)"
17634
18155
  },
17635
- children: /* @__PURE__ */ jsxs37(
18156
+ children: /* @__PURE__ */ jsxs38(
17636
18157
  Button,
17637
18158
  {
17638
18159
  type: "button",
@@ -17644,22 +18165,22 @@ function Chat({
17644
18165
  "aria-label": t("composer.quoteSelection"),
17645
18166
  title: t("composer.quoteSelection"),
17646
18167
  children: [
17647
- /* @__PURE__ */ jsx54(Quote, { size: 14 }),
18168
+ /* @__PURE__ */ jsx55(Quote, { size: 14 }),
17648
18169
  t("composer.quoteSelection")
17649
18170
  ]
17650
18171
  }
17651
18172
  )
17652
18173
  }
17653
18174
  ),
17654
- /* @__PURE__ */ jsxs37(
18175
+ /* @__PURE__ */ jsxs38(
17655
18176
  "div",
17656
18177
  {
17657
18178
  "data-slot": "chatkit-chat-composer",
17658
18179
  className: "mx-auto w-full p-2 sticky bottom-0 z-10 bg-background",
17659
18180
  style: chatColumnStyle,
17660
18181
  children: [
17661
- threadErrorMessage && /* @__PURE__ */ jsx54("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 }),
17662
- /* @__PURE__ */ jsx54(
18182
+ threadErrorMessage && /* @__PURE__ */ jsx55("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 }),
18183
+ /* @__PURE__ */ jsx55(
17663
18184
  ChatAttachments,
17664
18185
  {
17665
18186
  ref: attachmentsRef,
@@ -17673,7 +18194,7 @@ function Chat({
17673
18194
  onStateChange: setAttachmentState
17674
18195
  }
17675
18196
  ),
17676
- references.length > 0 && /* @__PURE__ */ jsx54("div", { className: "mb-3 flex flex-wrap gap-2", children: references.map((reference) => /* @__PURE__ */ jsx54(
18197
+ references.length > 0 && /* @__PURE__ */ jsx55("div", { className: "mb-3 flex flex-wrap gap-2", children: references.map((reference) => /* @__PURE__ */ jsx55(
17677
18198
  ReferenceChip,
17678
18199
  {
17679
18200
  reference,
@@ -17687,16 +18208,16 @@ function Chat({
17687
18208
  },
17688
18209
  getReferenceKey(reference)
17689
18210
  )) }),
17690
- detachedRunRuntimeCapabilityOptions.length > 0 && /* @__PURE__ */ jsxs37("div", { className: "mb-2 flex flex-wrap items-center gap-2", children: [
17691
- /* @__PURE__ */ jsx54("span", { className: "text-xs text-muted-foreground", children: t("composer.capabilities.runOnly") }),
17692
- detachedRunRuntimeCapabilityOptions.map((option) => /* @__PURE__ */ jsxs37(
18211
+ detachedRunRuntimeCapabilityOptions.length > 0 && /* @__PURE__ */ jsxs38("div", { className: "mb-2 flex flex-wrap items-center gap-2", children: [
18212
+ /* @__PURE__ */ jsx55("span", { className: "text-xs text-muted-foreground", children: t("composer.capabilities.runOnly") }),
18213
+ detachedRunRuntimeCapabilityOptions.map((option) => /* @__PURE__ */ jsxs38(
17693
18214
  "span",
17694
18215
  {
17695
18216
  className: "inline-flex max-w-full items-center gap-1 rounded-full bg-primary/10 px-2 py-0.5 text-xs font-medium text-primary",
17696
18217
  children: [
17697
- /* @__PURE__ */ jsx54(RuntimeCapabilityIcon, { option, variant: "chip" }),
17698
- /* @__PURE__ */ jsx54("span", { className: "max-w-40 truncate", children: option.label }),
17699
- /* @__PURE__ */ jsx54(
18218
+ /* @__PURE__ */ jsx55(RuntimeCapabilityIcon, { option, variant: "chip" }),
18219
+ /* @__PURE__ */ jsx55("span", { className: "max-w-40 truncate", children: option.label }),
18220
+ /* @__PURE__ */ jsx55(
17700
18221
  "button",
17701
18222
  {
17702
18223
  type: "button",
@@ -17704,7 +18225,7 @@ function Chat({
17704
18225
  className: "rounded-full p-0.5 hover:bg-primary/15",
17705
18226
  title: t("composer.capabilities.removeRunCapability"),
17706
18227
  "aria-label": t("composer.capabilities.removeRunCapability"),
17707
- children: /* @__PURE__ */ jsx54(X6, { size: 11 })
18228
+ children: /* @__PURE__ */ jsx55(X6, { size: 11 })
17708
18229
  }
17709
18230
  )
17710
18231
  ]
@@ -17712,7 +18233,7 @@ function Chat({
17712
18233
  `${option.type}:${option.id}`
17713
18234
  ))
17714
18235
  ] }),
17715
- showGoalStatus && /* @__PURE__ */ jsxs37(
18236
+ showGoalStatus && /* @__PURE__ */ jsxs38(
17716
18237
  "div",
17717
18238
  {
17718
18239
  className: cn(
@@ -17720,7 +18241,7 @@ function Chat({
17720
18241
  isGoalObjectiveExpanded ? "items-start" : "items-center"
17721
18242
  ),
17722
18243
  children: [
17723
- /* @__PURE__ */ jsx54(
18244
+ /* @__PURE__ */ jsx55(
17724
18245
  Target2,
17725
18246
  {
17726
18247
  className: cn(
@@ -17729,13 +18250,13 @@ function Chat({
17729
18250
  )
17730
18251
  }
17731
18252
  ),
17732
- /* @__PURE__ */ jsxs37("div", { className: "min-w-0 flex-1", children: [
17733
- /* @__PURE__ */ jsxs37("div", { className: "flex min-w-0 items-center gap-2", children: [
17734
- /* @__PURE__ */ jsx54("span", { className: "font-medium", children: t("chat.goal.label") }),
17735
- threadGoal && /* @__PURE__ */ jsx54("span", { className: "shrink-0 rounded-md bg-muted px-1.5 py-0.5 text-[11px] text-muted-foreground", children: t(`chat.goal.status.${threadGoal.status}`) }),
17736
- isGoalLoading && /* @__PURE__ */ jsx54(Loader29, { className: "size-3 animate-spin text-muted-foreground" })
18253
+ /* @__PURE__ */ jsxs38("div", { className: "min-w-0 flex-1", children: [
18254
+ /* @__PURE__ */ jsxs38("div", { className: "flex min-w-0 items-center gap-2", children: [
18255
+ /* @__PURE__ */ jsx55("span", { className: "font-medium", children: t("chat.goal.label") }),
18256
+ threadGoal && /* @__PURE__ */ jsx55("span", { className: "shrink-0 rounded-md bg-muted px-1.5 py-0.5 text-[11px] text-muted-foreground", children: t(`chat.goal.status.${threadGoal.status}`) }),
18257
+ isGoalLoading && /* @__PURE__ */ jsx55(Loader29, { className: "size-3 animate-spin text-muted-foreground" })
17737
18258
  ] }),
17738
- /* @__PURE__ */ jsx54(
18259
+ /* @__PURE__ */ jsx55(
17739
18260
  "div",
17740
18261
  {
17741
18262
  className: cn(
@@ -17745,13 +18266,13 @@ function Chat({
17745
18266
  children: goalError || threadGoal?.objective
17746
18267
  }
17747
18268
  ),
17748
- threadGoal && /* @__PURE__ */ jsx54("div", { className: "mt-1 flex flex-wrap gap-x-3 gap-y-1 text-[11px] text-muted-foreground", children: /* @__PURE__ */ jsx54("span", { children: t("chat.goal.elapsed", {
18269
+ threadGoal && /* @__PURE__ */ jsx55("div", { className: "mt-1 flex flex-wrap gap-x-3 gap-y-1 text-[11px] text-muted-foreground", children: /* @__PURE__ */ jsx55("span", { children: t("chat.goal.elapsed", {
17749
18270
  elapsed: formatGoalElapsed(displayedGoalElapsedSeconds)
17750
18271
  }) }) })
17751
18272
  ] }),
17752
- threadGoal && /* @__PURE__ */ jsxs37("div", { className: "flex shrink-0 items-center gap-1", children: [
17753
- /* @__PURE__ */ jsxs37(Tooltip, { children: [
17754
- /* @__PURE__ */ jsx54(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx54(
18273
+ threadGoal && /* @__PURE__ */ jsxs38("div", { className: "flex shrink-0 items-center gap-1", children: [
18274
+ /* @__PURE__ */ jsxs38(Tooltip, { children: [
18275
+ /* @__PURE__ */ jsx55(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx55(
17755
18276
  Button,
17756
18277
  {
17757
18278
  type: "button",
@@ -17762,13 +18283,13 @@ function Chat({
17762
18283
  const prefix = "/goal edit ";
17763
18284
  setComposerText(`${prefix}${threadGoal.objective}`);
17764
18285
  },
17765
- children: /* @__PURE__ */ jsx54(Pencil4, { className: "size-3" })
18286
+ children: /* @__PURE__ */ jsx55(Pencil4, { className: "size-3" })
17766
18287
  }
17767
18288
  ) }),
17768
- /* @__PURE__ */ jsx54(TooltipContent, { children: t("chat.goal.edit") })
18289
+ /* @__PURE__ */ jsx55(TooltipContent, { children: t("chat.goal.edit") })
17769
18290
  ] }),
17770
- /* @__PURE__ */ jsxs37(Tooltip, { children: [
17771
- /* @__PURE__ */ jsx54(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx54(
18291
+ /* @__PURE__ */ jsxs38(Tooltip, { children: [
18292
+ /* @__PURE__ */ jsx55(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx55(
17772
18293
  Button,
17773
18294
  {
17774
18295
  type: "button",
@@ -17784,13 +18305,13 @@ function Chat({
17784
18305
  executionType: "insert_invocation"
17785
18306
  }
17786
18307
  }),
17787
- children: threadGoal.status === "paused" ? /* @__PURE__ */ jsx54(Play, { className: "size-3" }) : /* @__PURE__ */ jsx54(Pause, { className: "size-3" })
18308
+ children: threadGoal.status === "paused" ? /* @__PURE__ */ jsx55(Play, { className: "size-3" }) : /* @__PURE__ */ jsx55(Pause, { className: "size-3" })
17788
18309
  }
17789
18310
  ) }),
17790
- /* @__PURE__ */ jsx54(TooltipContent, { children: threadGoal.status === "paused" ? t("chat.goal.resume") : t("chat.goal.pause") })
18311
+ /* @__PURE__ */ jsx55(TooltipContent, { children: threadGoal.status === "paused" ? t("chat.goal.resume") : t("chat.goal.pause") })
17791
18312
  ] }),
17792
- /* @__PURE__ */ jsxs37(Tooltip, { children: [
17793
- /* @__PURE__ */ jsx54(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx54(
18313
+ /* @__PURE__ */ jsxs38(Tooltip, { children: [
18314
+ /* @__PURE__ */ jsx55(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx55(
17794
18315
  Button,
17795
18316
  {
17796
18317
  type: "button",
@@ -17806,13 +18327,13 @@ function Chat({
17806
18327
  executionType: "insert_invocation"
17807
18328
  }
17808
18329
  }),
17809
- children: /* @__PURE__ */ jsx54(Trash23, { className: "size-3" })
18330
+ children: /* @__PURE__ */ jsx55(Trash23, { className: "size-3" })
17810
18331
  }
17811
18332
  ) }),
17812
- /* @__PURE__ */ jsx54(TooltipContent, { children: t("chat.goal.clear") })
18333
+ /* @__PURE__ */ jsx55(TooltipContent, { children: t("chat.goal.clear") })
17813
18334
  ] }),
17814
- threadGoal.objective && !goalError && /* @__PURE__ */ jsxs37(Tooltip, { children: [
17815
- /* @__PURE__ */ jsx54(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx54(
18335
+ threadGoal.objective && !goalError && /* @__PURE__ */ jsxs38(Tooltip, { children: [
18336
+ /* @__PURE__ */ jsx55(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx55(
17816
18337
  Button,
17817
18338
  {
17818
18339
  type: "button",
@@ -17821,7 +18342,7 @@ function Chat({
17821
18342
  "aria-expanded": isGoalObjectiveExpanded,
17822
18343
  "aria-label": isGoalObjectiveExpanded ? t("chat.goal.collapseObjective") : t("chat.goal.expandObjective"),
17823
18344
  onClick: () => setIsGoalObjectiveExpanded((expanded) => !expanded),
17824
- children: /* @__PURE__ */ jsx54(
18345
+ children: /* @__PURE__ */ jsx55(
17825
18346
  ChevronDown5,
17826
18347
  {
17827
18348
  className: cn(
@@ -17832,13 +18353,13 @@ function Chat({
17832
18353
  )
17833
18354
  }
17834
18355
  ) }),
17835
- /* @__PURE__ */ jsx54(TooltipContent, { children: isGoalObjectiveExpanded ? t("chat.goal.collapseObjective") : t("chat.goal.expandObjective") })
18356
+ /* @__PURE__ */ jsx55(TooltipContent, { children: isGoalObjectiveExpanded ? t("chat.goal.collapseObjective") : t("chat.goal.expandObjective") })
17836
18357
  ] })
17837
18358
  ] })
17838
18359
  ]
17839
18360
  }
17840
18361
  ),
17841
- /* @__PURE__ */ jsx54(
18362
+ /* @__PURE__ */ jsx55(
17842
18363
  PendingRuntimeServices,
17843
18364
  {
17844
18365
  state: stream.runtimeActivities.sandboxServices,
@@ -17847,7 +18368,7 @@ function Chat({
17847
18368
  className: hasPendingTodos || hasPendingFollowUps ? "mb-2" : void 0
17848
18369
  }
17849
18370
  ),
17850
- /* @__PURE__ */ jsx54(
18371
+ /* @__PURE__ */ jsx55(
17851
18372
  PendingTodos,
17852
18373
  {
17853
18374
  snapshot: stream.todos,
@@ -17855,7 +18376,7 @@ function Chat({
17855
18376
  className: hasPendingFollowUps ? "mb-2" : void 0
17856
18377
  }
17857
18378
  ),
17858
- /* @__PURE__ */ jsx54(
18379
+ /* @__PURE__ */ jsx55(
17859
18380
  PendingFollowUps,
17860
18381
  {
17861
18382
  items: pendingFollowUps,
@@ -17868,7 +18389,7 @@ function Chat({
17868
18389
  attachToComposer: true
17869
18390
  }
17870
18391
  ),
17871
- /* @__PURE__ */ jsx54(
18392
+ /* @__PURE__ */ jsx55(
17872
18393
  RequestUserInputPanel,
17873
18394
  {
17874
18395
  request: stream.pendingRequestUserInput,
@@ -17877,7 +18398,7 @@ function Chat({
17877
18398
  attachToComposer: true
17878
18399
  }
17879
18400
  ),
17880
- /* @__PURE__ */ jsx54(
18401
+ /* @__PURE__ */ jsx55(
17881
18402
  HITLApprovalPanel,
17882
18403
  {
17883
18404
  request: stream.pendingHITLRequest,
@@ -17886,7 +18407,7 @@ function Chat({
17886
18407
  attachToComposer: true
17887
18408
  }
17888
18409
  ),
17889
- runtimeCapabilityPalette && /* @__PURE__ */ jsx54(
18410
+ runtimeCapabilityPalette && /* @__PURE__ */ jsx55(
17890
18411
  SlashPalette,
17891
18412
  {
17892
18413
  palette: runtimeCapabilityPalette,
@@ -17900,7 +18421,7 @@ function Chat({
17900
18421
  onSelect: selectSlashPaletteOption
17901
18422
  }
17902
18423
  ),
17903
- /* @__PURE__ */ jsx54("form", { className: "flex items-end", onSubmit: handleSubmit, children: /* @__PURE__ */ jsxs37(
18424
+ /* @__PURE__ */ jsx55("form", { className: "flex items-end", onSubmit: handleSubmit, children: /* @__PURE__ */ jsxs38(
17904
18425
  "div",
17905
18426
  {
17906
18427
  "data-slot": "composer-input-shell",
@@ -17914,7 +18435,7 @@ function Chat({
17914
18435
  composerInputRoundedClass
17915
18436
  ),
17916
18437
  children: [
17917
- /* @__PURE__ */ jsx54(
18438
+ /* @__PURE__ */ jsx55(
17918
18439
  "div",
17919
18440
  {
17920
18441
  ref: composerInputRef,
@@ -17936,7 +18457,7 @@ function Chat({
17936
18457
  (missingConfig || isHistoryLoading || hasPendingInteractiveRequest) && "cursor-not-allowed opacity-50"
17937
18458
  ),
17938
18459
  children: renderedComposerParts.map(
17939
- (part, index) => part.type === "text" ? /* @__PURE__ */ jsx54(React49.Fragment, { children: part.text }, `text-${index}`) : /* @__PURE__ */ jsxs37(
18460
+ (part, index) => part.type === "text" ? /* @__PURE__ */ jsx55(React50.Fragment, { children: part.text }, `text-${index}`) : /* @__PURE__ */ jsxs38(
17940
18461
  "span",
17941
18462
  {
17942
18463
  "data-composer-capability-key": part.key,
@@ -17945,14 +18466,14 @@ function Chat({
17945
18466
  contentEditable: false,
17946
18467
  className: "mx-0.5 inline-flex max-w-[14rem] select-none items-center gap-1 text-sm font-semibold text-primary align-baseline",
17947
18468
  children: [
17948
- /* @__PURE__ */ jsx54(
18469
+ /* @__PURE__ */ jsx55(
17949
18470
  RuntimeCapabilityIcon,
17950
18471
  {
17951
18472
  option: part.capability,
17952
18473
  variant: "chip"
17953
18474
  }
17954
18475
  ),
17955
- /* @__PURE__ */ jsx54("span", { className: "truncate", children: part.capability.label })
18476
+ /* @__PURE__ */ jsx55("span", { className: "truncate", children: part.capability.label })
17956
18477
  ]
17957
18478
  },
17958
18479
  part.key
@@ -17961,14 +18482,14 @@ function Chat({
17961
18482
  },
17962
18483
  composerDomVersion
17963
18484
  ),
17964
- /* @__PURE__ */ jsxs37(
18485
+ /* @__PURE__ */ jsxs38(
17965
18486
  "div",
17966
18487
  {
17967
18488
  "data-slot": "composer-action-bar",
17968
18489
  className: "pointer-events-none absolute inset-x-1.5 bottom-1 flex min-h-10 items-center justify-between gap-2",
17969
18490
  children: [
17970
- /* @__PURE__ */ jsxs37("div", { className: "pointer-events-none flex min-w-0 flex-1 items-center gap-1.5", children: [
17971
- /* @__PURE__ */ jsx54("div", { className: "pointer-events-auto flex shrink-0 items-center gap-1.5", children: /* @__PURE__ */ jsx54(
18491
+ /* @__PURE__ */ jsxs38("div", { className: "pointer-events-none flex min-w-0 flex-1 items-center gap-1.5", children: [
18492
+ /* @__PURE__ */ jsx55("div", { className: "pointer-events-auto flex shrink-0 items-center gap-1.5", children: /* @__PURE__ */ jsx55(
17972
18493
  ComposerMenu,
17973
18494
  {
17974
18495
  composer,
@@ -17986,20 +18507,20 @@ function Chat({
17986
18507
  disabled: missingConfig || isHistoryLoading || hasPendingInteractiveRequest
17987
18508
  }
17988
18509
  ) }),
17989
- selectedTool && /* @__PURE__ */ jsxs37("span", { className: "pointer-events-auto inline-flex h-8 min-w-0 max-w-[14rem] shrink items-center gap-1.5 rounded-full bg-primary/10 px-2 text-xs font-medium text-primary transition-all duration-200", children: [
17990
- /* @__PURE__ */ jsx54("span", { className: "truncate", children: selectedTool.shortLabel ?? selectedTool.label }),
17991
- /* @__PURE__ */ jsx54(
18510
+ selectedTool && /* @__PURE__ */ jsxs38("span", { className: "pointer-events-auto inline-flex h-8 min-w-0 max-w-[14rem] shrink items-center gap-1.5 rounded-full bg-primary/10 px-2 text-xs font-medium text-primary transition-all duration-200", children: [
18511
+ /* @__PURE__ */ jsx55("span", { className: "truncate", children: selectedTool.shortLabel ?? selectedTool.label }),
18512
+ /* @__PURE__ */ jsx55(
17992
18513
  "button",
17993
18514
  {
17994
18515
  type: "button",
17995
18516
  onClick: () => setSelectedTool(null),
17996
18517
  className: "shrink-0 rounded-full p-0.5 text-primary/70 hover:bg-primary/10 hover:text-primary",
17997
- children: /* @__PURE__ */ jsx54(X6, { size: 12 })
18518
+ children: /* @__PURE__ */ jsx55(X6, { size: 12 })
17998
18519
  }
17999
18520
  )
18000
18521
  ] })
18001
18522
  ] }),
18002
- /* @__PURE__ */ jsx54("div", { className: "pointer-events-auto shrink-0", children: /* @__PURE__ */ jsx54(
18523
+ /* @__PURE__ */ jsx55("div", { className: "pointer-events-auto shrink-0", children: /* @__PURE__ */ jsx55(
18003
18524
  SendButton,
18004
18525
  {
18005
18526
  disabled: isSendDisabled,
@@ -18022,7 +18543,7 @@ function Chat({
18022
18543
  ]
18023
18544
  }
18024
18545
  ) }),
18025
- disclaimer?.text && /* @__PURE__ */ jsx54(
18546
+ disclaimer?.text && /* @__PURE__ */ jsx55(
18026
18547
  "p",
18027
18548
  {
18028
18549
  className: cn(
@@ -18032,14 +18553,14 @@ function Chat({
18032
18553
  children: disclaimer.text
18033
18554
  }
18034
18555
  ),
18035
- /* @__PURE__ */ jsxs37("div", { className: "mt-2 flex items-center justify-center gap-2 text-xs text-muted-foreground", children: [
18036
- /* @__PURE__ */ jsx54("span", { children: t("chat.poweredBy") }),
18037
- /* @__PURE__ */ jsx54(ContextUsageIndicator, { className: "absolute right-4" })
18556
+ /* @__PURE__ */ jsxs38("div", { className: "mt-2 flex items-center justify-center gap-2 text-xs text-muted-foreground", children: [
18557
+ /* @__PURE__ */ jsx55("span", { children: t("chat.poweredBy") }),
18558
+ /* @__PURE__ */ jsx55(ContextUsageIndicator, { className: "absolute right-4" })
18038
18559
  ] })
18039
18560
  ]
18040
18561
  }
18041
18562
  ),
18042
- /* @__PURE__ */ jsx54(
18563
+ /* @__PURE__ */ jsx55(
18043
18564
  SettingsSheet,
18044
18565
  {
18045
18566
  open: petSettingsOpen,
@@ -18049,17 +18570,17 @@ function Chat({
18049
18570
  onSave: savePetLocalSettings
18050
18571
  }
18051
18572
  ),
18052
- /* @__PURE__ */ jsx54(PetBridge, { pet: effectivePet, state: petAutoState })
18573
+ /* @__PURE__ */ jsx55(PetBridge, { pet: effectivePet, state: petAutoState })
18053
18574
  ]
18054
18575
  }
18055
18576
  );
18056
18577
  }
18057
18578
 
18058
18579
  // src/components/ui/separator.tsx
18059
- import * as React50 from "react";
18060
- import { jsx as jsx55 } from "react/jsx-runtime";
18061
- var Separator = React50.forwardRef(
18062
- ({ className, orientation = "horizontal", ...props }, ref) => /* @__PURE__ */ jsx55(
18580
+ import * as React51 from "react";
18581
+ import { jsx as jsx56 } from "react/jsx-runtime";
18582
+ var Separator = React51.forwardRef(
18583
+ ({ className, orientation = "horizontal", ...props }, ref) => /* @__PURE__ */ jsx56(
18063
18584
  "div",
18064
18585
  {
18065
18586
  ref,