@xpert-ai/chatkit-ui 0.3.6 → 0.3.7

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 (338) hide show
  1. package/dist/app/assets/{_baseUniq-PQJUyd2p.js → _baseUniq-DgbE-Zpp.js} +1 -1
  2. package/dist/app/assets/{abap-DBNQvwwq.js → abap-B0ywZp7w.js} +1 -1
  3. package/dist/app/assets/{abnf-DAYjyqbD.js → abnf-vKucRloH.js} +1 -1
  4. package/dist/app/assets/{actionscript-CC6WSmTp.js → actionscript-CvpjcrZC.js} +1 -1
  5. package/dist/app/assets/{ada-BKGodcKv.js → ada-DV5KTTo4.js} +1 -1
  6. package/dist/app/assets/{agda-Btmo1dV2.js → agda-BTTYVnbo.js} +1 -1
  7. package/dist/app/assets/{al-ZGIJe93k.js → al-u-oZSiBm.js} +1 -1
  8. package/dist/app/assets/{antlr4-5WGUtMyl.js → antlr4-CY1PBdPM.js} +1 -1
  9. package/dist/app/assets/{apacheconf-DUR_1QqW.js → apacheconf-CIk6CfdC.js} +1 -1
  10. package/dist/app/assets/{apex-BintsQD-.js → apex-BdhgEWXC.js} +1 -1
  11. package/dist/app/assets/{apl-B7pUHOBS.js → apl-Mv4j7Tlu.js} +1 -1
  12. package/dist/app/assets/{applescript-CanCSogn.js → applescript-BnoQn48O.js} +1 -1
  13. package/dist/app/assets/{aql-iDHrUFca.js → aql-Do8Nhg8p.js} +1 -1
  14. package/dist/app/assets/{arc-VbTm84dM.js → arc-edZU_NW2.js} +1 -1
  15. package/dist/app/assets/{architectureDiagram-Q4EWVU46-BwbXOlsJ.js → architectureDiagram-Q4EWVU46-Dtt89Y19.js} +1 -1
  16. package/dist/app/assets/{arduino-CvuY6cDV.js → arduino-C48-q0UX.js} +1 -1
  17. package/dist/app/assets/{arff-C7UK1Sqo.js → arff-CvXAFvRm.js} +1 -1
  18. package/dist/app/assets/{asciidoc-jaQgm_Ci.js → asciidoc-CA--68DS.js} +1 -1
  19. package/dist/app/assets/{asm6502-Bec9iTSO.js → asm6502-BcBLxpHN.js} +1 -1
  20. package/dist/app/assets/{asmatmel-CWWLYM-f.js → asmatmel-CDMg3LIG.js} +1 -1
  21. package/dist/app/assets/{aspnet-EICvaNos.js → aspnet-BzZAtk5n.js} +1 -1
  22. package/dist/app/assets/{autohotkey-CgvCc8dt.js → autohotkey-C8WkQEjI.js} +1 -1
  23. package/dist/app/assets/{autoit-BbrdfXjj.js → autoit-D5_mrv5m.js} +1 -1
  24. package/dist/app/assets/{avisynth-C7cOgG-q.js → avisynth-Dh_xask5.js} +1 -1
  25. package/dist/app/assets/{avro-idl-BsT9yVqS.js → avro-idl-AEaYO6yK.js} +1 -1
  26. package/dist/app/assets/{bash-BF1ylQ6_.js → bash-RlP16Xm5.js} +1 -1
  27. package/dist/app/assets/{basic-DyO_cuAQ.js → basic-Xn_eY79M.js} +1 -1
  28. package/dist/app/assets/{batch-DdxmhDRT.js → batch-B_zss_9m.js} +1 -1
  29. package/dist/app/assets/{bbcode-Csh0dpf7.js → bbcode-D5qIIsoM.js} +1 -1
  30. package/dist/app/assets/{bicep-CEnRCsw4.js → bicep-DFAY7lin.js} +1 -1
  31. package/dist/app/assets/{birb-H4aZEyfE.js → birb-DZZhpbmW.js} +1 -1
  32. package/dist/app/assets/{bison-B4NzJQL4.js → bison-B-dGF85b.js} +1 -1
  33. package/dist/app/assets/{blockDiagram-DXYQGD6D-BQrs2vZp.js → blockDiagram-DXYQGD6D-oXU3wiI6.js} +1 -1
  34. package/dist/app/assets/{bnf-BpnLOKBL.js → bnf-6CRAamZR.js} +1 -1
  35. package/dist/app/assets/{brainfuck-BcXFtTZS.js → brainfuck-CexdbLJh.js} +1 -1
  36. package/dist/app/assets/{brightscript-C-G4maiE.js → brightscript-CaxTO5da.js} +1 -1
  37. package/dist/app/assets/{bro-JcLlkXX7.js → bro-BRI4lLX7.js} +1 -1
  38. package/dist/app/assets/{bsl-C7EgrPBt.js → bsl-QOrG17u7.js} +1 -1
  39. package/dist/app/assets/{c-0vDIBgc3.js → c-D3L-REE8.js} +1 -1
  40. package/dist/app/assets/{c4Diagram-AHTNJAMY-wtHHI5rn.js → c4Diagram-AHTNJAMY-zIBgyFbC.js} +1 -1
  41. package/dist/app/assets/{cfscript-B5a7v4dm.js → cfscript-CgDikVyK.js} +1 -1
  42. package/dist/app/assets/{chaiscript-CC6j4sQE.js → chaiscript-BPTekNbB.js} +1 -1
  43. package/dist/app/assets/channel-DJrI2Cpl.js +1 -0
  44. package/dist/app/assets/{chunk-4BX2VUAB-Dlz831RQ.js → chunk-4BX2VUAB-C8q0nzRo.js} +1 -1
  45. package/dist/app/assets/{chunk-4TB4RGXK-D5P5dUqt.js → chunk-4TB4RGXK-C8eclN6u.js} +1 -1
  46. package/dist/app/assets/{chunk-55IACEB6-BqMvjwUA.js → chunk-55IACEB6-CC_AZKq2.js} +1 -1
  47. package/dist/app/assets/{chunk-EDXVE4YY-DnPhlqJA.js → chunk-EDXVE4YY-BKhbC1sp.js} +1 -1
  48. package/dist/app/assets/{chunk-FMBD7UC4-DNRIZD8O.js → chunk-FMBD7UC4-BuH_t_j-.js} +1 -1
  49. package/dist/app/assets/{chunk-OYMX7WX6-JXHjhCxm.js → chunk-OYMX7WX6-DRM_T71-.js} +1 -1
  50. package/dist/app/assets/{chunk-QZHKN3VN-BkxXCZY4.js → chunk-QZHKN3VN-BiziHb7K.js} +1 -1
  51. package/dist/app/assets/{chunk-YZCP3GAM-EpFGzvxp.js → chunk-YZCP3GAM-ns5Vk1f0.js} +1 -1
  52. package/dist/app/assets/{cil-iQdhNO4Q.js → cil-CQ1VUn3A.js} +1 -1
  53. package/dist/app/assets/classDiagram-6PBFFD2Q-DlrWIn_z.js +1 -0
  54. package/dist/app/assets/classDiagram-v2-HSJHXN6E-DlrWIn_z.js +1 -0
  55. package/dist/app/assets/{clike-CQAeHYPM.js → clike-Bk_7iChK.js} +1 -1
  56. package/dist/app/assets/{clojure-Cql6MpyZ.js → clojure-oh6_RnlA.js} +1 -1
  57. package/dist/app/assets/clone-DypLoQyD.js +1 -0
  58. package/dist/app/assets/{cmake-BfKHjCsg.js → cmake-ySS0jC1Y.js} +1 -1
  59. package/dist/app/assets/{cobol-CKkM0fVl.js → cobol-iXcezfTy.js} +1 -1
  60. package/dist/app/assets/{coffeescript-CgyUEXhV.js → coffeescript-BUy0IOTJ.js} +1 -1
  61. package/dist/app/assets/{concurnas-CeEqG40V.js → concurnas-By_kYzwm.js} +1 -1
  62. package/dist/app/assets/{coq-CkWZFRlP.js → coq-DZiJnQYk.js} +1 -1
  63. package/dist/app/assets/{core-CcAPm-aU.js → core-BjYqaHIK.js} +1 -1
  64. package/dist/app/assets/{cose-bilkent-S5V4N54A-kULVHEg6.js → cose-bilkent-S5V4N54A-DRg86qAz.js} +1 -1
  65. package/dist/app/assets/{cpp-Bwq_b1tA.js → cpp-fVJetTCh.js} +1 -1
  66. package/dist/app/assets/{crystal-YNIUD3Bs.js → crystal-Dqa1FSjq.js} +1 -1
  67. package/dist/app/assets/{csharp-P6DguRUY.js → csharp-BEpd8Bfz.js} +1 -1
  68. package/dist/app/assets/{cshtml-B5QmdkLH.js → cshtml-cleS7x9a.js} +1 -1
  69. package/dist/app/assets/{csp-DFeKy3lq.js → csp-DJNuAuVo.js} +1 -1
  70. package/dist/app/assets/{css-extras-BFuChsao.js → css-extras-DqcDnxi2.js} +1 -1
  71. package/dist/app/assets/{css-CRC3M3rp.js → css-laKMA7ps.js} +1 -1
  72. package/dist/app/assets/{csv-C4LMPB8f.js → csv-CcsGtqB7.js} +1 -1
  73. package/dist/app/assets/{cypher-HIcVk2j0.js → cypher-tCYaF_sw.js} +1 -1
  74. package/dist/app/assets/{d-BnjQOzu7.js → d-ZjP-D4jP.js} +1 -1
  75. package/dist/app/assets/{dagre-KV5264BT-DYeQuZ_S.js → dagre-KV5264BT-BMg6cnfG.js} +1 -1
  76. package/dist/app/assets/{dart-BY_HEqIc.js → dart-aEIC0xv8.js} +1 -1
  77. package/dist/app/assets/{dataweave-IZkekg5J.js → dataweave-CM7DNyRc.js} +1 -1
  78. package/dist/app/assets/{dax-BDxI87qH.js → dax-D-1tRMAS.js} +1 -1
  79. package/dist/app/assets/{dhall-BI7me9By.js → dhall-B4G6sh_3.js} +1 -1
  80. package/dist/app/assets/{diagram-5BDNPKRD-DqUtPt3D.js → diagram-5BDNPKRD-BGIhlwaI.js} +1 -1
  81. package/dist/app/assets/{diagram-G4DWMVQ6-DUz5iheG.js → diagram-G4DWMVQ6-CqKLelet.js} +1 -1
  82. package/dist/app/assets/{diagram-MMDJMWI5-DqMZVdpe.js → diagram-MMDJMWI5-2IpGHxI2.js} +1 -1
  83. package/dist/app/assets/{diagram-TYMM5635-D4dMAYPV.js → diagram-TYMM5635-_HRiSNgh.js} +1 -1
  84. package/dist/app/assets/{diff-D1eveguk.js → diff-CAWzHumm.js} +1 -1
  85. package/dist/app/assets/{django-n2RdeMZg.js → django-BLlxHysq.js} +1 -1
  86. package/dist/app/assets/{dns-zone-file-C7ZVuM_8.js → dns-zone-file-Bu1BFi4x.js} +1 -1
  87. package/dist/app/assets/{docker-2dKv2uP8.js → docker-DQtdSM6w.js} +1 -1
  88. package/dist/app/assets/{dot-CnM9kCZh.js → dot-M_8dtQ-J.js} +1 -1
  89. package/dist/app/assets/{ebnf-DNNgDJ77.js → ebnf-Bqjz4X_l.js} +1 -1
  90. package/dist/app/assets/{editorconfig-BOtWIdJu.js → editorconfig-H1gZsYaD.js} +1 -1
  91. package/dist/app/assets/{eiffel-DZJsL-6U.js → eiffel-jToyfE3K.js} +1 -1
  92. package/dist/app/assets/{ejs-DlY_5WK7.js → ejs-Xg8x_yq-.js} +1 -1
  93. package/dist/app/assets/{elixir-DnflWYYw.js → elixir-BG9SfjVk.js} +1 -1
  94. package/dist/app/assets/{elm-DiBtRJyK.js → elm-7rvkjNwn.js} +1 -1
  95. package/dist/app/assets/{erDiagram-SMLLAGMA-s249XOhW.js → erDiagram-SMLLAGMA-CwJ0JEfE.js} +1 -1
  96. package/dist/app/assets/{erb-Ctwnlnto.js → erb-CipiWC9j.js} +1 -1
  97. package/dist/app/assets/{erlang-BnrgWRyV.js → erlang-DyGWgpYG.js} +1 -1
  98. package/dist/app/assets/{etlua-B-b2a1aT.js → etlua-Ct6VkCC4.js} +1 -1
  99. package/dist/app/assets/{excel-formula-BfwuYhTY.js → excel-formula-CY9oxCkI.js} +1 -1
  100. package/dist/app/assets/{factor-2cFlXUFG.js → factor-DBGcEQMr.js} +1 -1
  101. package/dist/app/assets/{false-DVJW4Xbm.js → false-D7Yj-SPJ.js} +1 -1
  102. package/dist/app/assets/{firestore-security-rules-BDB3ruEY.js → firestore-security-rules-BKeRzWep.js} +1 -1
  103. package/dist/app/assets/{flow-v_X8TsCx.js → flow-BUWiIzEU.js} +1 -1
  104. package/dist/app/assets/{flowDiagram-DWJPFMVM-Dz8lk_A8.js → flowDiagram-DWJPFMVM-C3YhD-oq.js} +1 -1
  105. package/dist/app/assets/{fortran-VlXf9wYr.js → fortran-Bj52YXe0.js} +1 -1
  106. package/dist/app/assets/{fsharp-BgmRbToz.js → fsharp-DmCVgmnH.js} +1 -1
  107. package/dist/app/assets/{ftl-CX7l6a-K.js → ftl-Cbmvxbh6.js} +1 -1
  108. package/dist/app/assets/{ganttDiagram-T4ZO3ILL-C8JxZNAd.js → ganttDiagram-T4ZO3ILL-D9xW5yhh.js} +1 -1
  109. package/dist/app/assets/{gap-C3towync.js → gap-D23ZRtRz.js} +1 -1
  110. package/dist/app/assets/{gcode-pPl8BHC6.js → gcode-D5-N3nr_.js} +1 -1
  111. package/dist/app/assets/{gdscript-CQ5KQpTU.js → gdscript-DWERnX-a.js} +1 -1
  112. package/dist/app/assets/{gedcom-UKqoiZ_B.js → gedcom-Ck_Ym3Q2.js} +1 -1
  113. package/dist/app/assets/{gherkin-oHLPyBSJ.js → gherkin-BksiIjs-.js} +1 -1
  114. package/dist/app/assets/{git-QJvYrr1x.js → git-CO1eb-gL.js} +1 -1
  115. package/dist/app/assets/{gitGraphDiagram-UUTBAWPF-D8hAIW7o.js → gitGraphDiagram-UUTBAWPF-DZLT8zDA.js} +1 -1
  116. package/dist/app/assets/{glsl-D9mjvqGV.js → glsl-CN-vqwC_.js} +1 -1
  117. package/dist/app/assets/{gml-DyeDbLje.js → gml-J5W8Y4yz.js} +1 -1
  118. package/dist/app/assets/{gn-CQxx-3wR.js → gn-D7Pv9idR.js} +1 -1
  119. package/dist/app/assets/{go-BlxfTxGG.js → go-6Lw_nSyb.js} +1 -1
  120. package/dist/app/assets/{go-module-aUBiuILx.js → go-module-BCe-jjCg.js} +1 -1
  121. package/dist/app/assets/{graph-D-X2uhF1.js → graph-BhsGz6M4.js} +1 -1
  122. package/dist/app/assets/{graphql-Clt8HaZ7.js → graphql-4_hbbnNw.js} +1 -1
  123. package/dist/app/assets/{groovy-CZSeQO36.js → groovy-BZvyCoNS.js} +1 -1
  124. package/dist/app/assets/{haml-DMf7PiKp.js → haml-MpET2CYX.js} +1 -1
  125. package/dist/app/assets/{handlebars-BphhMxT6.js → handlebars-CMygNMyQ.js} +1 -1
  126. package/dist/app/assets/{haskell-Ccj1mGN_.js → haskell-H9hWCrb6.js} +1 -1
  127. package/dist/app/assets/{haxe-CtvRdMmt.js → haxe-DynXLs0c.js} +1 -1
  128. package/dist/app/assets/{hcl-HQGsM91R.js → hcl-DU8hXUXo.js} +1 -1
  129. package/dist/app/assets/{hlsl-U_2FN4GV.js → hlsl-BGurDJ01.js} +1 -1
  130. package/dist/app/assets/{hoon-DSS3mQR5.js → hoon-Od_h6WWn.js} +1 -1
  131. package/dist/app/assets/{hpkp-BPnzFZ5n.js → hpkp-CnNmkfHz.js} +1 -1
  132. package/dist/app/assets/{hsts-BRaWTgmx.js → hsts-DJA5z9FY.js} +1 -1
  133. package/dist/app/assets/{http-DgZif8XP.js → http-C2OpZukU.js} +1 -1
  134. package/dist/app/assets/{ichigojam-ypramSfH.js → ichigojam-CrG2EGSI.js} +1 -1
  135. package/dist/app/assets/{icon-DsD0Czia.js → icon-cOzaCn0m.js} +1 -1
  136. package/dist/app/assets/{icu-message-format-BVJiYPkB.js → icu-message-format-DDXTMDH-.js} +1 -1
  137. package/dist/app/assets/{idris-BvurrLkY.js → idris-CFY7Fru9.js} +1 -1
  138. package/dist/app/assets/{iecst-Clwdf_8K.js → iecst-DxqDXmAZ.js} +1 -1
  139. package/dist/app/assets/{ignore-DkK-S7HP.js → ignore-50gVavjI.js} +1 -1
  140. package/dist/app/assets/{index-D-y0b7ri.js → index-3vHiuCMV.js} +170 -170
  141. package/dist/app/assets/index-CY_xTM-7.css +1 -0
  142. package/dist/app/assets/{infoDiagram-42DDH7IO-BocjJZwC.js → infoDiagram-42DDH7IO-BhZutCsZ.js} +1 -1
  143. package/dist/app/assets/{inform7-yFSTqWIe.js → inform7-CwMWEErA.js} +1 -1
  144. package/dist/app/assets/{ini-BcO8nYi7.js → ini-Cj0QsVUh.js} +1 -1
  145. package/dist/app/assets/{io-BBkn-xXo.js → io-CaTOfNpm.js} +1 -1
  146. package/dist/app/assets/{ishikawaDiagram-UXIWVN3A-Dlw93ArC.js → ishikawaDiagram-UXIWVN3A-JJt8O0hb.js} +1 -1
  147. package/dist/app/assets/{j-M5UTfImQ.js → j-B9yG1_XZ.js} +1 -1
  148. package/dist/app/assets/{java-Xjo5k22g.js → java-CcqZsJHc.js} +1 -1
  149. package/dist/app/assets/{javadoc-D6lpCK4S.js → javadoc-BdkFH1qi.js} +1 -1
  150. package/dist/app/assets/{javadoclike-DGBCsKaU.js → javadoclike-BBDtbsNc.js} +1 -1
  151. package/dist/app/assets/{javascript-DkE8xAaV.js → javascript-0ZJ71oW2.js} +1 -1
  152. package/dist/app/assets/{javastacktrace-Be5zC165.js → javastacktrace-yNjh86GL.js} +1 -1
  153. package/dist/app/assets/{jexl-C1l-HPYI.js → jexl-BwLpMn8D.js} +1 -1
  154. package/dist/app/assets/{jolie-CRI76P3X.js → jolie-BiDUXy8i.js} +1 -1
  155. package/dist/app/assets/{journeyDiagram-VCZTEJTY-BOongVs3.js → journeyDiagram-VCZTEJTY-BkVWz3Vf.js} +1 -1
  156. package/dist/app/assets/{jq-CrFpn7ql.js → jq-CCJ3EBtV.js} +1 -1
  157. package/dist/app/assets/{js-extras-BvLZUIJ5.js → js-extras-Ck7OEXSL.js} +1 -1
  158. package/dist/app/assets/{js-templates-fYKII4Os.js → js-templates-DjSt7lxm.js} +1 -1
  159. package/dist/app/assets/{jsdoc-DGONDzA5.js → jsdoc-BcTgtGoR.js} +1 -1
  160. package/dist/app/assets/{json-BxIxewuG.js → json-tB4iX3yE.js} +1 -1
  161. package/dist/app/assets/{json5-BP9OBqRe.js → json5-JIq4apAt.js} +1 -1
  162. package/dist/app/assets/{jsonp-Br67zaRL.js → jsonp-DKXtWLpG.js} +1 -1
  163. package/dist/app/assets/{jsstacktrace-BB-1Bcpa.js → jsstacktrace-4bYPPqLT.js} +1 -1
  164. package/dist/app/assets/{jsx-BNfIlN8n.js → jsx-BgQQp2PC.js} +1 -1
  165. package/dist/app/assets/{julia-DVIi4XSJ.js → julia-Dv7hfdzo.js} +1 -1
  166. package/dist/app/assets/{kanban-definition-6JOO6SKY-DD7E-Llo.js → kanban-definition-6JOO6SKY-CWuWLs3K.js} +1 -1
  167. package/dist/app/assets/{keepalived-DmPJ3LF8.js → keepalived-C0mYwr0z.js} +1 -1
  168. package/dist/app/assets/{keyman-Cp-gCfcq.js → keyman-BKpH4p1R.js} +1 -1
  169. package/dist/app/assets/{kotlin-DCptm4kq.js → kotlin-mOfhxbOx.js} +1 -1
  170. package/dist/app/assets/{kumir-Cohjvjog.js → kumir-C6zx-0Ca.js} +1 -1
  171. package/dist/app/assets/{kusto-C2dOIgK1.js → kusto-hO54CA70.js} +1 -1
  172. package/dist/app/assets/{latex-DaFCffTw.js → latex-Dzk8WiHu.js} +1 -1
  173. package/dist/app/assets/{latte-D2mtlTen.js → latte-b3QfOSp4.js} +1 -1
  174. package/dist/app/assets/{layout-C7fpWjpB.js → layout-DBe88OgK.js} +1 -1
  175. package/dist/app/assets/{less-CycfawGH.js → less-B4kl6C6H.js} +1 -1
  176. package/dist/app/assets/{lilypond-DrvS8AAl.js → lilypond-kwN07IjR.js} +1 -1
  177. package/dist/app/assets/{linear-2np4qyjJ.js → linear-DFqpmono.js} +1 -1
  178. package/dist/app/assets/{liquid-BQH0bAHC.js → liquid-CMRtVaic.js} +1 -1
  179. package/dist/app/assets/{lisp-BCWvn2A1.js → lisp-D12Kpj2D.js} +1 -1
  180. package/dist/app/assets/{livescript-DGRf3L1-.js → livescript-CB8ITmGz.js} +1 -1
  181. package/dist/app/assets/{llvm-C_6xvGBO.js → llvm-DBTCiFwL.js} +1 -1
  182. package/dist/app/assets/{log-uCcZN8k2.js → log-BR6SSFh9.js} +1 -1
  183. package/dist/app/assets/{lolcode-XEyTNgnB.js → lolcode-BuzAaCM6.js} +1 -1
  184. package/dist/app/assets/{lua-Dy0fpGeF.js → lua-Ci_ub2Kx.js} +1 -1
  185. package/dist/app/assets/{magma-D6d2r_W9.js → magma-DqKac23z.js} +1 -1
  186. package/dist/app/assets/{makefile-DOydYPAQ.js → makefile-ClFyCfh0.js} +1 -1
  187. package/dist/app/assets/{markdown-CPxRHFza.js → markdown-CJP4BvY0.js} +1 -1
  188. package/dist/app/assets/{markup-jgYp2Lb8.js → markup-BqBuEoCj.js} +1 -1
  189. package/dist/app/assets/{markup-templating-lT8EutTe.js → markup-templating-gWox0fgS.js} +1 -1
  190. package/dist/app/assets/{matlab-y_OOgSc_.js → matlab-D8fITaV4.js} +1 -1
  191. package/dist/app/assets/{maxscript-PMli6_xE.js → maxscript-BONF8rMy.js} +1 -1
  192. package/dist/app/assets/{mel-CIopQCOU.js → mel-C055oCEm.js} +1 -1
  193. package/dist/app/assets/{mermaid-CN6aoo9D.js → mermaid-CJgXcURP.js} +1 -1
  194. package/dist/app/assets/{min-DDl12nhy.js → min-C4k7eVH-.js} +1 -1
  195. package/dist/app/assets/{mindmap-definition-QFDTVHPH-Bosd0mf9.js → mindmap-definition-QFDTVHPH-D5WLdtFz.js} +1 -1
  196. package/dist/app/assets/{mizar-A9B8KORd.js → mizar-DfBcXuj4.js} +1 -1
  197. package/dist/app/assets/{mongodb-DV-yCsoK.js → mongodb-BBCH2cAI.js} +1 -1
  198. package/dist/app/assets/{monkey-HEFodtZa.js → monkey-5xytVR9c.js} +1 -1
  199. package/dist/app/assets/{moonscript-Bj3xAxEV.js → moonscript-DTD_dUoG.js} +1 -1
  200. package/dist/app/assets/{n1ql-DX2KWloB.js → n1ql-CKMBpvrf.js} +1 -1
  201. package/dist/app/assets/{n4js-DQoNqDS9.js → n4js-BLOx_BAB.js} +1 -1
  202. package/dist/app/assets/{nand2tetris-hdl-BFqj7ePK.js → nand2tetris-hdl-B-nkUk0U.js} +1 -1
  203. package/dist/app/assets/{naniscript-Cz--o1by.js → naniscript-DFNNmSZZ.js} +1 -1
  204. package/dist/app/assets/{nasm-Dcb8t8q6.js → nasm-Bp0N-krf.js} +1 -1
  205. package/dist/app/assets/{neon-CK7vx6_x.js → neon-CdOV9D5g.js} +1 -1
  206. package/dist/app/assets/{nevod-BePMNPK5.js → nevod-BKMLRWeT.js} +1 -1
  207. package/dist/app/assets/{nginx-BmbGx2v1.js → nginx-C53g3llS.js} +1 -1
  208. package/dist/app/assets/{nim-B8GUCE2H.js → nim--ucdlwkH.js} +1 -1
  209. package/dist/app/assets/{nix-lGZ9zLZy.js → nix-2nB75Hnm.js} +1 -1
  210. package/dist/app/assets/{nsis-kBAOh3Cs.js → nsis-Cg1me2qV.js} +1 -1
  211. package/dist/app/assets/{objectivec-Bngj8IHt.js → objectivec-HgsJzBVJ.js} +1 -1
  212. package/dist/app/assets/{ocaml-Bba8eOIn.js → ocaml-B_DzHMGS.js} +1 -1
  213. package/dist/app/assets/{opencl-DgfdBrQ_.js → opencl-DBy2C90-.js} +1 -1
  214. package/dist/app/assets/{openqasm-CQV2wxlC.js → openqasm-kR3M1YBJ.js} +1 -1
  215. package/dist/app/assets/{oz-CcMDAMF8.js → oz-CsEQzF2k.js} +1 -1
  216. package/dist/app/assets/{parigp-Cr7bHjhJ.js → parigp-C2gYP3BM.js} +1 -1
  217. package/dist/app/assets/{parser-DX-CvQ44.js → parser-D7agmsnU.js} +1 -1
  218. package/dist/app/assets/{pascal-CCpiRTqn.js → pascal-Dk8h_JiR.js} +1 -1
  219. package/dist/app/assets/{pascaligo-uYvOwN6J.js → pascaligo-DXayKpW1.js} +1 -1
  220. package/dist/app/assets/{pcaxis-dCoAlH4q.js → pcaxis-BbHDn4xw.js} +1 -1
  221. package/dist/app/assets/{peoplecode-BZU0iRIF.js → peoplecode-DgWHb3qM.js} +1 -1
  222. package/dist/app/assets/{perl-Iesy2DKz.js → perl-BCQmJW3u.js} +1 -1
  223. package/dist/app/assets/{php-a3Z68PaM.js → php-Z7u6UBSf.js} +1 -1
  224. package/dist/app/assets/{php-extras-CSgWIoUx.js → php-extras-Bbf1PJiM.js} +1 -1
  225. package/dist/app/assets/{phpdoc-ClEamK9m.js → phpdoc-BUdOOavZ.js} +1 -1
  226. package/dist/app/assets/{pieDiagram-DEJITSTG-D3AaN8D3.js → pieDiagram-DEJITSTG-Bk_gHD7q.js} +1 -1
  227. package/dist/app/assets/{plsql-BUydR2je.js → plsql-KN64tq9c.js} +1 -1
  228. package/dist/app/assets/{powerquery-CbE5r1LK.js → powerquery-DL49etLI.js} +1 -1
  229. package/dist/app/assets/{powershell-DubIcaqQ.js → powershell-jryB4gBu.js} +1 -1
  230. package/dist/app/assets/{processing-CGZk9MFa.js → processing-D-nRflir.js} +1 -1
  231. package/dist/app/assets/{prolog-DWiKE05T.js → prolog-J9p2Dtp3.js} +1 -1
  232. package/dist/app/assets/{promql-ZM0X0cVe.js → promql-Bt3PTIs-.js} +1 -1
  233. package/dist/app/assets/{properties-C_MgCVL7.js → properties-DOzUf5m_.js} +1 -1
  234. package/dist/app/assets/{protobuf-DTptx08I.js → protobuf-CulfNgOj.js} +1 -1
  235. package/dist/app/assets/{psl-AUkZATpo.js → psl-UT93PnFk.js} +1 -1
  236. package/dist/app/assets/{pug-CiJR0sLM.js → pug-Ckrp6b5P.js} +1 -1
  237. package/dist/app/assets/{puppet-DRojzo7w.js → puppet-wUZgXx_p.js} +1 -1
  238. package/dist/app/assets/{pure-DAC784GG.js → pure-CNGrkBhJ.js} +1 -1
  239. package/dist/app/assets/{purebasic-VM4UEIrk.js → purebasic-CwWLgK7e.js} +1 -1
  240. package/dist/app/assets/{purescript-w5sMhquf.js → purescript-BRm-R-3v.js} +1 -1
  241. package/dist/app/assets/{q-CBWya0ez.js → q-wRiaQZTW.js} +1 -1
  242. package/dist/app/assets/{qml-BO1SKCTG.js → qml-hZdBAFTK.js} +1 -1
  243. package/dist/app/assets/{qore-BLEy3V2Q.js → qore-Cye0wnFE.js} +1 -1
  244. package/dist/app/assets/{qsharp-DpGm5nXm.js → qsharp-DufTxaMQ.js} +1 -1
  245. package/dist/app/assets/{quadrantDiagram-34T5L4WZ-zqVJRfM0.js → quadrantDiagram-34T5L4WZ-BSbm0wBP.js} +1 -1
  246. package/dist/app/assets/{r-DJwW4woE.js → r-JhyQLVqm.js} +1 -1
  247. package/dist/app/assets/{racket-tfAlhm9J.js → racket-CcEcl1lQ.js} +1 -1
  248. package/dist/app/assets/{reason-CuQcs6Us.js → reason-WFsaqaXn.js} +1 -1
  249. package/dist/app/assets/{regex-BjBaDCpX.js → regex-Cj5qFUZM.js} +1 -1
  250. package/dist/app/assets/{rego-DWENKceX.js → rego-CfoDWHPw.js} +1 -1
  251. package/dist/app/assets/{renpy-BgVqATTk.js → renpy-D3lRim5H.js} +1 -1
  252. package/dist/app/assets/{requirementDiagram-MS252O5E-B8E8SJly.js → requirementDiagram-MS252O5E-BNs2nP8U.js} +1 -1
  253. package/dist/app/assets/{rest-B9oIUmDJ.js → rest-DktyegXU.js} +1 -1
  254. package/dist/app/assets/{rip-kd5zQPVz.js → rip-D0VY5apf.js} +1 -1
  255. package/dist/app/assets/{roboconf-B1kUkQdY.js → roboconf-y6-jDOpj.js} +1 -1
  256. package/dist/app/assets/{robotframework-B8Cn6zw0.js → robotframework-CC00uJgj.js} +1 -1
  257. package/dist/app/assets/{ruby-CnbgIhf_.js → ruby-dAbspD_k.js} +1 -1
  258. package/dist/app/assets/{rust-C8OTkz5t.js → rust-7wWC8B4O.js} +1 -1
  259. package/dist/app/assets/{sankeyDiagram-XADWPNL6-BWdy5fPK.js → sankeyDiagram-XADWPNL6-CvpH_gH5.js} +1 -1
  260. package/dist/app/assets/{sas-Dw7vQpkk.js → sas-BMwqJCyV.js} +1 -1
  261. package/dist/app/assets/{sass-b7SoCESY.js → sass-Deo2TBca.js} +1 -1
  262. package/dist/app/assets/{scala-D-p3rZbv.js → scala-CDQ_Q6w1.js} +1 -1
  263. package/dist/app/assets/{scheme-BPbr0IV_.js → scheme-Dnvc5SgS.js} +1 -1
  264. package/dist/app/assets/{scss-Cyjt-V6Q.js → scss-CQnjZBSP.js} +1 -1
  265. package/dist/app/assets/{sequenceDiagram-FGHM5R23-D-ACA62M.js → sequenceDiagram-FGHM5R23-CbfExnPM.js} +1 -1
  266. package/dist/app/assets/{shell-session-C7s1XZ_p.js → shell-session-CUzpt9u_.js} +1 -1
  267. package/dist/app/assets/{smali-C621-SJz.js → smali-gUIPUNS_.js} +1 -1
  268. package/dist/app/assets/{smalltalk-CuF0kpcz.js → smalltalk-BWqWeTOj.js} +1 -1
  269. package/dist/app/assets/{smarty-CHbvlN7a.js → smarty-D_6NQwpr.js} +1 -1
  270. package/dist/app/assets/{sml-BGi33Pu0.js → sml-C6fu3ORs.js} +1 -1
  271. package/dist/app/assets/{solidity-CZYdcu6z.js → solidity-aHCvIORR.js} +1 -1
  272. package/dist/app/assets/{solution-file-ChgVI9u6.js → solution-file-rfXcmDEi.js} +1 -1
  273. package/dist/app/assets/{soy-CWvn9QzG.js → soy-CYlWSpIs.js} +1 -1
  274. package/dist/app/assets/{sparql-7JjN18LQ.js → sparql-BAW721Ow.js} +1 -1
  275. package/dist/app/assets/{splunk-spl-DOh97vYU.js → splunk-spl-BTzYVj8d.js} +1 -1
  276. package/dist/app/assets/{sqf-x5ivlIR7.js → sqf-UIbNftU1.js} +1 -1
  277. package/dist/app/assets/{sql-BshsXXbk.js → sql-CgGxned9.js} +1 -1
  278. package/dist/app/assets/{squirrel-BtrGPSbs.js → squirrel-CIcV4Ny-.js} +1 -1
  279. package/dist/app/assets/{stan-sDuPYbZs.js → stan-DgfUhApV.js} +1 -1
  280. package/dist/app/assets/{stateDiagram-FHFEXIEX-C06KYdye.js → stateDiagram-FHFEXIEX-D1iTvQX_.js} +1 -1
  281. package/dist/app/assets/stateDiagram-v2-QKLJ7IA2-BCtIcdWI.js +1 -0
  282. package/dist/app/assets/{stylus-9qu1XZ91.js → stylus-sv3Ey9M5.js} +1 -1
  283. package/dist/app/assets/{swift-UgAKrg8O.js → swift-DS573qiY.js} +1 -1
  284. package/dist/app/assets/{systemd-D1t2IK6h.js → systemd-CzDCvoIg.js} +1 -1
  285. package/dist/app/assets/{t4-cs-D5pPXmrn.js → t4-cs-D4nbx6z2.js} +1 -1
  286. package/dist/app/assets/{t4-templating-DGpA7dEe.js → t4-templating-BMZwZyOE.js} +1 -1
  287. package/dist/app/assets/{t4-vb-DeaFY-L7.js → t4-vb-DIeP4ybv.js} +1 -1
  288. package/dist/app/assets/{tap-B2Jlbmzn.js → tap-De3Jnd4S.js} +1 -1
  289. package/dist/app/assets/{tcl-D3Cxl9RS.js → tcl-BjCUiiee.js} +1 -1
  290. package/dist/app/assets/{textile-vleyTozU.js → textile-DZ3GKhqr.js} +1 -1
  291. package/dist/app/assets/{timeline-definition-GMOUNBTQ-DSaRfuOY.js → timeline-definition-GMOUNBTQ-DNIfYJfl.js} +1 -1
  292. package/dist/app/assets/{toml-Qo-F6Xf4.js → toml-On6uzvVe.js} +1 -1
  293. package/dist/app/assets/{tremor-J5ixbTSm.js → tremor-BU60aKH_.js} +1 -1
  294. package/dist/app/assets/{tt2-DOa_Af-o.js → tt2-BuKbFZt_.js} +1 -1
  295. package/dist/app/assets/{turtle-D8Su1Ry0.js → turtle-DXMNKdPK.js} +1 -1
  296. package/dist/app/assets/{twig-GBJoDW8g.js → twig-Bo_MbBRd.js} +1 -1
  297. package/dist/app/assets/{typescript-DimFy1wk.js → typescript-CR7wxlXD.js} +1 -1
  298. package/dist/app/assets/{typoscript-Corm9VPj.js → typoscript-CMw0wwok.js} +1 -1
  299. package/dist/app/assets/{unrealscript-dSS5kIDz.js → unrealscript-B776bLew.js} +1 -1
  300. package/dist/app/assets/{uorazor-BGl4DTbK.js → uorazor-BYELARrG.js} +1 -1
  301. package/dist/app/assets/{uri-B403JigU.js → uri-CRKYpN9S.js} +1 -1
  302. package/dist/app/assets/{v-D1nzy8SK.js → v-YJo6805g.js} +1 -1
  303. package/dist/app/assets/{vala-CbskSA-6.js → vala-gsYpVkOH.js} +1 -1
  304. package/dist/app/assets/{vbnet-BQwFvsFF.js → vbnet-CmBlYcGa.js} +1 -1
  305. package/dist/app/assets/{velocity-dmmAE00U.js → velocity-Q2c3XfQY.js} +1 -1
  306. package/dist/app/assets/{vennDiagram-DHZGUBPP-BZ7Hb9Hn.js → vennDiagram-DHZGUBPP-BadpBWfC.js} +1 -1
  307. package/dist/app/assets/{verilog-BMPc4qiW.js → verilog-5WEqrogK.js} +1 -1
  308. package/dist/app/assets/{vhdl-BwLIiaQ3.js → vhdl-Co2ZNHLl.js} +1 -1
  309. package/dist/app/assets/{vim-NxGSno01.js → vim-BWHpRDI0.js} +1 -1
  310. package/dist/app/assets/{visual-basic-DT3do2iL.js → visual-basic-DdcJ6qp_.js} +1 -1
  311. package/dist/app/assets/{wardley-RL74JXVD-BQuDsmFg.js → wardley-RL74JXVD-nnCu88t4.js} +1 -1
  312. package/dist/app/assets/{wardleyDiagram-NUSXRM2D-DwMCEfDA.js → wardleyDiagram-NUSXRM2D-DLRxHCOy.js} +1 -1
  313. package/dist/app/assets/{warpscript-natO4zPn.js → warpscript-DQTWfQQI.js} +1 -1
  314. package/dist/app/assets/{wasm-BfugFzDn.js → wasm-P74bjf6T.js} +1 -1
  315. package/dist/app/assets/{web-idl-Bics_ax6.js → web-idl-BwlVUL20.js} +1 -1
  316. package/dist/app/assets/{wiki-Blq646qq.js → wiki-3koXxGGM.js} +1 -1
  317. package/dist/app/assets/{wolfram-Ddn6uV9M.js → wolfram-GHXEYNh8.js} +1 -1
  318. package/dist/app/assets/{wren-CZ9gfbdr.js → wren-DDEdbB41.js} +1 -1
  319. package/dist/app/assets/{xeora-zVJDHWYP.js → xeora-C5eIogh-.js} +1 -1
  320. package/dist/app/assets/{xml-doc-D9g-q5Fh.js → xml-doc-Dxj1u1SJ.js} +1 -1
  321. package/dist/app/assets/{xojo-WpdjfLKR.js → xojo-CeTBKDSR.js} +1 -1
  322. package/dist/app/assets/{xquery-DFrusbUY.js → xquery-C4vwM7F2.js} +1 -1
  323. package/dist/app/assets/{xychartDiagram-5P7HB3ND-BRMmacnH.js → xychartDiagram-5P7HB3ND-8doH-fTN.js} +1 -1
  324. package/dist/app/assets/{yaml-DB6og7ei.js → yaml-Clzy20XF.js} +1 -1
  325. package/dist/app/assets/{yang-CdFoUEPj.js → yang-BTHiGiHX.js} +1 -1
  326. package/dist/app/assets/{zig-C79X6U04.js → zig-BkXx74nT.js} +1 -1
  327. package/dist/app/index.html +2 -2
  328. package/dist/index.cjs +869 -578
  329. package/dist/index.d.cts +3 -0
  330. package/dist/index.d.ts +3 -0
  331. package/dist/index.js +837 -545
  332. package/package.json +3 -3
  333. package/dist/app/assets/channel-B6zrZ2OM.js +0 -1
  334. package/dist/app/assets/classDiagram-6PBFFD2Q-CrRCjWNC.js +0 -1
  335. package/dist/app/assets/classDiagram-v2-HSJHXN6E-CrRCjWNC.js +0 -1
  336. package/dist/app/assets/clone-DF9MaeHz.js +0 -1
  337. package/dist/app/assets/index-D4gddvdJ.css +0 -1
  338. package/dist/app/assets/stateDiagram-v2-QKLJ7IA2-sEMQqWl2.js +0 -1
package/dist/index.cjs CHANGED
@@ -67,8 +67,8 @@ __export(index_exports, {
67
67
  module.exports = __toCommonJS(index_exports);
68
68
 
69
69
  // src/components/chat.tsx
70
- var React44 = __toESM(require("react"), 1);
71
- var import_lucide_react24 = require("lucide-react");
70
+ var React45 = __toESM(require("react"), 1);
71
+ var import_lucide_react25 = require("lucide-react");
72
72
 
73
73
  // src/lib/utils.ts
74
74
  var import_clsx = require("clsx");
@@ -1292,6 +1292,7 @@ var en_US_default = {
1292
1292
  loadingThread: "Loading thread...",
1293
1293
  stop: "Stop",
1294
1294
  send: "Send message",
1295
+ minimizeToPet: "Minimize to pet",
1295
1296
  referencedContentOnly: "Referenced content",
1296
1297
  youLabel: "You",
1297
1298
  scrollToBottom: "Scroll to bottom",
@@ -1573,6 +1574,14 @@ var en_US_default = {
1573
1574
  copy: "Copy",
1574
1575
  copied: "Copied",
1575
1576
  separator: ", ",
1577
+ shell: {
1578
+ success: "Success",
1579
+ running: "Running",
1580
+ failed: "Failed",
1581
+ exitCode: "Exit code {{code}}",
1582
+ ranCommand: "Ran {{command}}",
1583
+ runningCommand: "Running {{command}}"
1584
+ },
1576
1585
  categories: {
1577
1586
  files: {
1578
1587
  one: "{{count}} file",
@@ -1624,6 +1633,7 @@ var zh_CN_default = {
1624
1633
  loadingThread: "\u6B63\u5728\u52A0\u8F7D\u7EBF\u7A0B...",
1625
1634
  stop: "\u505C\u6B62",
1626
1635
  send: "\u53D1\u9001\u6D88\u606F",
1636
+ minimizeToPet: "\u6700\u5C0F\u5316\u5230 Pet",
1627
1637
  referencedContentOnly: "\u5DF2\u5F15\u7528\u5185\u5BB9",
1628
1638
  youLabel: "\u4F60",
1629
1639
  scrollToBottom: "\u56DE\u5230\u5E95\u90E8",
@@ -1905,6 +1915,14 @@ var zh_CN_default = {
1905
1915
  copy: "\u590D\u5236",
1906
1916
  copied: "\u5DF2\u590D\u5236",
1907
1917
  separator: "\uFF0C",
1918
+ shell: {
1919
+ success: "\u6210\u529F",
1920
+ running: "\u8FD0\u884C\u4E2D",
1921
+ failed: "\u5931\u8D25",
1922
+ exitCode: "\u9000\u51FA\u7801 {{code}}",
1923
+ ranCommand: "\u5DF2\u8FD0\u884C {{command}}",
1924
+ runningCommand: "\u6B63\u5728\u8FD0\u884C {{command}}"
1925
+ },
1908
1926
  categories: {
1909
1927
  files: {
1910
1928
  one: "{{count}} \u4E2A\u6587\u4EF6",
@@ -6783,8 +6801,8 @@ function useSlashCommands({
6783
6801
  }
6784
6802
 
6785
6803
  // src/components/thread/messages/ai.tsx
6786
- var React31 = __toESM(require("react"), 1);
6787
- var import_lucide_react19 = require("lucide-react");
6804
+ var React32 = __toESM(require("react"), 1);
6805
+ var import_lucide_react20 = require("lucide-react");
6788
6806
 
6789
6807
  // src/lib/agent-run-render-tree.ts
6790
6808
  function isTextContent(content) {
@@ -8952,21 +8970,262 @@ function hasComponentMessageRendererDetails(renderer, content, data) {
8952
8970
  }
8953
8971
 
8954
8972
  // src/components/thread/messages/tool-component-group.tsx
8973
+ var React30 = __toESM(require("react"), 1);
8974
+ var import_lucide_react18 = require("lucide-react");
8975
+
8976
+ // src/components/thread/messages/sandbox-shell-tool-call.tsx
8955
8977
  var React29 = __toESM(require("react"), 1);
8956
8978
  var import_lucide_react17 = require("lucide-react");
8957
8979
  var import_jsx_runtime34 = require("react/jsx-runtime");
8980
+ var SANDBOX_SHELL_TEXT_CLASS = "text-[13px] leading-5 in-data-[density=compact]:text-xs in-data-[density=compact]:leading-4 in-data-[density=spacious]:text-sm in-data-[density=spacious]:leading-6";
8981
+ var SANDBOX_SHELL_SECTION_GAP_CLASS = "mt-2 in-data-[density=compact]:mt-1.5 in-data-[density=spacious]:mt-3";
8982
+ function normalizeShellToken(value) {
8983
+ if (typeof value !== "string") return null;
8984
+ const normalized = value.trim().toLowerCase().replace(/[\s-]+/g, "_");
8985
+ return normalized || null;
8986
+ }
8987
+ function isPlainObject(value) {
8988
+ return Boolean(value) && typeof value === "object" && !Array.isArray(value);
8989
+ }
8990
+ function readShellString(value) {
8991
+ if (typeof value !== "string") return null;
8992
+ const trimmed = value.trim();
8993
+ return trimmed || null;
8994
+ }
8995
+ function stringifyShellText(value) {
8996
+ if (value === null || value === void 0) return null;
8997
+ if (typeof value === "string") return value;
8998
+ if (typeof value === "number" || typeof value === "boolean") {
8999
+ return String(value);
9000
+ }
9001
+ if (Array.isArray(value)) {
9002
+ const output = value.map((item) => stringifyShellText(item)).filter((item) => item !== null).join("");
9003
+ return output || null;
9004
+ }
9005
+ if (!isPlainObject(value)) return formatDisplayValue(value);
9006
+ const source = value;
9007
+ const textParts = [
9008
+ source.stdout,
9009
+ source.stderr,
9010
+ source.output,
9011
+ source.text,
9012
+ source.logs,
9013
+ source.content,
9014
+ source.chunk,
9015
+ source.delta
9016
+ ].map((item) => stringifyShellText(item)).filter((item) => item !== null && item.length > 0);
9017
+ if (textParts.length > 0) return textParts.join("");
9018
+ return null;
9019
+ }
9020
+ function getSandboxShellCommand(data, language) {
9021
+ const input = data.input;
9022
+ if (typeof input === "string") return input;
9023
+ if (isPlainObject(input)) {
9024
+ const source = input;
9025
+ const command = readShellString(source.command) ?? readShellString(source.cmd) ?? readShellString(source.input);
9026
+ if (command) return command;
9027
+ }
9028
+ const payload = data.data;
9029
+ if (isPlainObject(payload)) {
9030
+ const source = payload;
9031
+ const command = readShellString(source.command) ?? readShellString(source.cmd) ?? readShellString(source.input);
9032
+ if (command) return command;
9033
+ }
9034
+ return readShellString(resolveLocalizedText(data.message, language)) ?? readShellString(resolveLocalizedText(data.title, language)) ?? "sandbox_shell";
9035
+ }
9036
+ function getSandboxShellOutput(data) {
9037
+ const output = stringifyShellText(data.output) ?? stringifyShellText(data.data) ?? stringifyShellText(data.error);
9038
+ return output ?? "";
9039
+ }
9040
+ function readExitCodeFrom(value) {
9041
+ if (!isPlainObject(value)) return null;
9042
+ const source = value;
9043
+ const candidate = source.exit_code ?? source.exitCode ?? source.return_code ?? source.returnCode ?? source.code;
9044
+ if (typeof candidate === "number" && Number.isFinite(candidate)) {
9045
+ return candidate;
9046
+ }
9047
+ if (typeof candidate === "string" && candidate.trim() !== "") {
9048
+ const parsed = Number(candidate);
9049
+ return Number.isFinite(parsed) ? parsed : null;
9050
+ }
9051
+ return null;
9052
+ }
9053
+ function getSandboxShellExitCode(data) {
9054
+ return readExitCodeFrom(data.output) ?? readExitCodeFrom(data.data) ?? readExitCodeFrom(data);
9055
+ }
9056
+ function isSandboxShellStep(data) {
9057
+ const namedData = data;
9058
+ return [data.tool, data.type, data.title, namedData.name].some(
9059
+ (value) => normalizeShellToken(value) === "sandbox_shell"
9060
+ );
9061
+ }
9062
+ function formatShellCommand(command) {
9063
+ const trimmed = command.trim();
9064
+ return trimmed.startsWith("$") ? trimmed : `$ ${trimmed}`;
9065
+ }
9066
+ function getSandboxShellActivityLabel(data, status, language, t) {
9067
+ const command = getSandboxShellCommand(data, language);
9068
+ const key = status === "running" ? "message.toolGroup.shell.runningCommand" : "message.toolGroup.shell.ranCommand";
9069
+ return t(key, { command });
9070
+ }
9071
+ function ShellCopyButton({
9072
+ value,
9073
+ className
9074
+ }) {
9075
+ const { t } = useChatkitTranslation();
9076
+ const [isCopied, setIsCopied] = React29.useState(false);
9077
+ const resetTimeoutRef = React29.useRef(null);
9078
+ const clearResetTimeout = React29.useCallback(() => {
9079
+ if (resetTimeoutRef.current === null) return;
9080
+ window.clearTimeout(resetTimeoutRef.current);
9081
+ resetTimeoutRef.current = null;
9082
+ }, []);
9083
+ React29.useEffect(() => clearResetTimeout, [clearResetTimeout]);
9084
+ const handleCopy = React29.useCallback(() => {
9085
+ if (typeof navigator === "undefined" || !navigator.clipboard) return;
9086
+ void navigator.clipboard.writeText(value).then(() => {
9087
+ setIsCopied(true);
9088
+ clearResetTimeout();
9089
+ resetTimeoutRef.current = window.setTimeout(() => {
9090
+ setIsCopied(false);
9091
+ resetTimeoutRef.current = null;
9092
+ }, 1500);
9093
+ }).catch(() => void 0);
9094
+ }, [clearResetTimeout, value]);
9095
+ const label = isCopied ? t("message.toolGroup.copied") : t("message.toolGroup.copy");
9096
+ return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
9097
+ "button",
9098
+ {
9099
+ type: "button",
9100
+ className: cn(
9101
+ "inline-flex h-6 w-6 shrink-0 items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-background hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/40",
9102
+ className
9103
+ ),
9104
+ "aria-label": label,
9105
+ title: label,
9106
+ onClick: handleCopy,
9107
+ children: isCopied ? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_lucide_react17.Check, { className: "h-3.5 w-3.5", "aria-hidden": "true" }) : /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_lucide_react17.Copy, { className: "h-3.5 w-3.5", "aria-hidden": "true" })
9108
+ }
9109
+ );
9110
+ }
9111
+ function SandboxShellStatus({
9112
+ data,
9113
+ exitCode
9114
+ }) {
9115
+ const { t } = useChatkitTranslation();
9116
+ if (exitCode !== null) {
9117
+ return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { className: "text-muted-foreground/90", children: t("message.toolGroup.shell.exitCode", { code: exitCode }) });
9118
+ }
9119
+ if (data.status === "running") {
9120
+ return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { className: "text-muted-foreground/90", children: t("message.toolGroup.shell.running") });
9121
+ }
9122
+ if (data.status === "fail" || data.error) {
9123
+ return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { className: "text-destructive/90", children: t("message.toolGroup.shell.failed") });
9124
+ }
9125
+ return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("span", { className: "inline-flex items-center gap-1 text-muted-foreground/90", children: [
9126
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_lucide_react17.Check, { className: "h-3.5 w-3.5", "aria-hidden": "true" }),
9127
+ t("message.toolGroup.shell.success")
9128
+ ] });
9129
+ }
9130
+ function SandboxShellToolCallCard({ data }) {
9131
+ const { i18n: i18n2 } = useChatkitTranslation();
9132
+ const command = getSandboxShellCommand(data, i18n2.language);
9133
+ const formattedCommand = formatShellCommand(command);
9134
+ const output = getSandboxShellOutput(data);
9135
+ const exitCode = getSandboxShellExitCode(data);
9136
+ const copyButtonClassName = "absolute right-1 top-1 h-6 w-6 opacity-0 transition-opacity group-hover/shell-copy:opacity-100 group-focus-within/shell-copy:opacity-100 in-data-[density=compact]:right-0.5 in-data-[density=compact]:top-0.5 in-data-[density=compact]:h-5 in-data-[density=compact]:w-5 in-data-[density=spacious]:right-1.5 in-data-[density=spacious]:top-1.5 in-data-[density=spacious]:h-7 in-data-[density=spacious]:w-7";
9137
+ return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
9138
+ "div",
9139
+ {
9140
+ className: "flex max-h-64 min-w-0 flex-col overflow-hidden rounded-md bg-muted/60 px-3 py-2 text-left shadow-sm ring-1 ring-border/30 in-data-[density=compact]:max-h-52 in-data-[density=compact]:px-2 in-data-[density=compact]:py-1.5 in-data-[density=spacious]:max-h-80 in-data-[density=spacious]:px-4 in-data-[density=spacious]:py-3",
9141
+ "data-slot": "sandbox-shell-tool-call",
9142
+ "aria-label": "Shell",
9143
+ children: [
9144
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
9145
+ "div",
9146
+ {
9147
+ className: cn(
9148
+ "font-medium text-muted-foreground",
9149
+ SANDBOX_SHELL_TEXT_CLASS
9150
+ ),
9151
+ children: "Shell"
9152
+ }
9153
+ ),
9154
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
9155
+ "div",
9156
+ {
9157
+ className: cn(
9158
+ "group/shell-copy relative min-w-0",
9159
+ SANDBOX_SHELL_SECTION_GAP_CLASS
9160
+ ),
9161
+ children: [
9162
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
9163
+ "pre",
9164
+ {
9165
+ className: cn(
9166
+ "whitespace-pre-wrap break-words pr-8 font-mono text-foreground in-data-[density=compact]:pr-6 in-data-[density=spacious]:pr-10",
9167
+ SANDBOX_SHELL_TEXT_CLASS
9168
+ ),
9169
+ "data-slot": "sandbox-shell-command",
9170
+ children: formattedCommand
9171
+ }
9172
+ ),
9173
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(ShellCopyButton, { value: command, className: copyButtonClassName })
9174
+ ]
9175
+ }
9176
+ ),
9177
+ output ? /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
9178
+ "div",
9179
+ {
9180
+ className: cn(
9181
+ "group/shell-copy relative min-h-0 flex-1",
9182
+ SANDBOX_SHELL_SECTION_GAP_CLASS
9183
+ ),
9184
+ children: [
9185
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
9186
+ "pre",
9187
+ {
9188
+ className: cn(
9189
+ "min-h-0 overflow-auto whitespace-pre pr-8 font-mono text-muted-foreground/85 in-data-[density=compact]:pr-6 in-data-[density=spacious]:pr-10",
9190
+ SANDBOX_SHELL_TEXT_CLASS
9191
+ ),
9192
+ "data-slot": "sandbox-shell-output",
9193
+ children: output
9194
+ }
9195
+ ),
9196
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(ShellCopyButton, { value: output, className: copyButtonClassName })
9197
+ ]
9198
+ }
9199
+ ) : null,
9200
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
9201
+ "div",
9202
+ {
9203
+ className: cn(
9204
+ "mt-3 flex shrink-0 justify-end in-data-[density=compact]:mt-2 in-data-[density=spacious]:mt-4",
9205
+ SANDBOX_SHELL_TEXT_CLASS
9206
+ ),
9207
+ children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(SandboxShellStatus, { data, exitCode })
9208
+ }
9209
+ )
9210
+ ]
9211
+ }
9212
+ );
9213
+ }
9214
+
9215
+ // src/components/thread/messages/tool-component-group.tsx
9216
+ var import_jsx_runtime35 = require("react/jsx-runtime");
8958
9217
  var toolStatusConfig = {
8959
9218
  success: {
8960
9219
  iconClass: "border-green-500 text-green-700",
8961
- icon: import_lucide_react17.CheckCircle2
9220
+ icon: import_lucide_react18.CheckCircle2
8962
9221
  },
8963
9222
  fail: {
8964
9223
  iconClass: "border-red-500 text-red-700",
8965
- icon: import_lucide_react17.XCircle
9224
+ icon: import_lucide_react18.XCircle
8966
9225
  },
8967
9226
  running: {
8968
9227
  iconClass: "border-blue-500 text-blue-700",
8969
- icon: import_lucide_react17.Loader2
9228
+ icon: import_lucide_react18.Loader2
8970
9229
  }
8971
9230
  };
8972
9231
  var TOOL_GROUP_CATEGORY_ORDER = [
@@ -9060,10 +9319,10 @@ function formatStepDuration2(durationMs) {
9060
9319
  return `${minutes}m ${seconds}s`;
9061
9320
  }
9062
9321
  function useFrozenTimestamp(shouldFreeze) {
9063
- const [frozenAt, setFrozenAt] = React29.useState(
9322
+ const [frozenAt, setFrozenAt] = React30.useState(
9064
9323
  () => shouldFreeze ? Date.now() : null
9065
9324
  );
9066
- React29.useEffect(() => {
9325
+ React30.useEffect(() => {
9067
9326
  if (shouldFreeze) {
9068
9327
  setFrozenAt((current) => current ?? Date.now());
9069
9328
  return;
@@ -9073,12 +9332,12 @@ function useFrozenTimestamp(shouldFreeze) {
9073
9332
  return frozenAt;
9074
9333
  }
9075
9334
  function useToolStepDurationLabel(data, options) {
9076
- const [durationNow, setDurationNow] = React29.useState(() => Date.now());
9335
+ const [durationNow, setDurationNow] = React30.useState(() => Date.now());
9077
9336
  const createdAt = parseStepDate(data.created_date);
9078
9337
  const explicitEndedAt = parseStepDate(data.end_date);
9079
9338
  const status = options?.status ?? data.status;
9080
9339
  const endedAt = explicitEndedAt ?? (status !== "running" ? options?.fallbackEndedAt ?? null : null);
9081
- React29.useEffect(() => {
9340
+ React30.useEffect(() => {
9082
9341
  if (status !== "running" || createdAt === null || endedAt !== null) {
9083
9342
  return;
9084
9343
  }
@@ -9140,7 +9399,7 @@ function classifyToolToken(value) {
9140
9399
  if (directMatch) return directMatch;
9141
9400
  if (normalized.includes("search")) return "searches";
9142
9401
  if (normalized.includes("file")) return "files";
9143
- if (normalized.includes("command") || normalized.includes("cmd") || normalized.includes("program") || normalized.includes("exec") || normalized.startsWith("run_") || normalized.includes("_run")) {
9402
+ if (normalized.includes("command") || normalized.includes("cmd") || normalized.includes("program") || normalized.includes("exec") || normalized.includes("shell") || normalized.includes("terminal") || normalized.startsWith("run_") || normalized.includes("_run")) {
9144
9403
  return "commands";
9145
9404
  }
9146
9405
  if (normalized.includes("list")) return "lists";
@@ -9152,6 +9411,7 @@ function classifyToolToken(value) {
9152
9411
  }
9153
9412
  function getToolGroupCategory(content) {
9154
9413
  const data = getToolStepData(content);
9414
+ if (isSandboxShellStep(data)) return "commands";
9155
9415
  return classifyToolToken(data.type) ?? classifyToolToken(data.tool) ?? classifyToolToken(data.title) ?? classifyToolToken(data.message) ?? "tools";
9156
9416
  }
9157
9417
  function getToolGroupCategoryCounts(items) {
@@ -9261,8 +9521,8 @@ function shouldUseToolsetAvatar(toolset) {
9261
9521
  }
9262
9522
  function useToolsetAvatar(toolsetId, enabled, apiUrl) {
9263
9523
  const avatarUrl = enabled ? createToolsetAvatarUrl(toolsetId, apiUrl) : null;
9264
- const [avatar, setAvatar] = React29.useState(null);
9265
- React29.useEffect(() => {
9524
+ const [avatar, setAvatar] = React30.useState(null);
9525
+ React30.useEffect(() => {
9266
9526
  if (!avatarUrl) {
9267
9527
  setAvatar(null);
9268
9528
  return;
@@ -9294,7 +9554,7 @@ function ToolAvatarIcon({
9294
9554
  className
9295
9555
  }) {
9296
9556
  if (avatar.url) {
9297
- return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
9557
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
9298
9558
  "img",
9299
9559
  {
9300
9560
  alt: "",
@@ -9307,7 +9567,7 @@ function ToolAvatarIcon({
9307
9567
  }
9308
9568
  const emoji = unicodeFromUnified2(avatar.emoji?.unified);
9309
9569
  if (emoji) {
9310
- return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
9570
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
9311
9571
  "span",
9312
9572
  {
9313
9573
  "aria-hidden": "true",
@@ -9322,8 +9582,8 @@ function ToolAvatarIcon({
9322
9582
  }
9323
9583
  );
9324
9584
  }
9325
- return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
9326
- import_lucide_react17.CircleHelp,
9585
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
9586
+ import_lucide_react18.CircleHelp,
9327
9587
  {
9328
9588
  className,
9329
9589
  "aria-hidden": "true",
@@ -9336,20 +9596,20 @@ function getKnownToolsetIcon(toolset) {
9336
9596
  if (!normalized) return null;
9337
9597
  switch (normalized) {
9338
9598
  case "project":
9339
- return import_lucide_react17.Building2;
9599
+ return import_lucide_react18.Building2;
9340
9600
  case "transfer_to":
9341
- return import_lucide_react17.Repeat2;
9601
+ return import_lucide_react18.Repeat2;
9342
9602
  case "knowledge":
9343
9603
  case "knowledgebase":
9344
- return import_lucide_react17.BookOpen;
9604
+ return import_lucide_react18.BookOpen;
9345
9605
  case "project_tasks":
9346
- return import_lucide_react17.ListTodo;
9606
+ return import_lucide_react18.ListTodo;
9347
9607
  case "memories":
9348
- return import_lucide_react17.Brain;
9608
+ return import_lucide_react18.Brain;
9349
9609
  case "workflow_agent_tool":
9350
- return import_lucide_react17.Wrench;
9610
+ return import_lucide_react18.Wrench;
9351
9611
  case "workflow_task":
9352
- return import_lucide_react17.Network;
9612
+ return import_lucide_react18.Network;
9353
9613
  default:
9354
9614
  return null;
9355
9615
  }
@@ -9359,15 +9619,15 @@ function getStepTypeIcon(type) {
9359
9619
  if (!normalized) return null;
9360
9620
  switch (normalized) {
9361
9621
  case "file":
9362
- return import_lucide_react17.FileText;
9622
+ return import_lucide_react18.FileText;
9363
9623
  case "files":
9364
- return import_lucide_react17.Files;
9624
+ return import_lucide_react18.Files;
9365
9625
  case "program":
9366
- return import_lucide_react17.SquareTerminal;
9626
+ return import_lucide_react18.SquareTerminal;
9367
9627
  case "web_search":
9368
- return import_lucide_react17.Search;
9628
+ return import_lucide_react18.Search;
9369
9629
  case "knowledges":
9370
- return import_lucide_react17.BookOpen;
9630
+ return import_lucide_react18.BookOpen;
9371
9631
  default:
9372
9632
  return null;
9373
9633
  }
@@ -9385,12 +9645,12 @@ function ToolStepIcon({
9385
9645
  apiUrl
9386
9646
  );
9387
9647
  const iconUrl = createToolsetIconUrl(data.toolset, organizationId, apiUrl);
9388
- const [failedIconUrl, setFailedIconUrl] = React29.useState(null);
9389
- React29.useEffect(() => {
9648
+ const [failedIconUrl, setFailedIconUrl] = React30.useState(null);
9649
+ React30.useEffect(() => {
9390
9650
  setFailedIconUrl(null);
9391
9651
  }, [iconUrl]);
9392
9652
  if (avatar) {
9393
- return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
9653
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
9394
9654
  ToolAvatarIcon,
9395
9655
  {
9396
9656
  avatar,
@@ -9400,7 +9660,7 @@ function ToolStepIcon({
9400
9660
  );
9401
9661
  }
9402
9662
  if (iconUrl && failedIconUrl !== iconUrl) {
9403
- return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
9663
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
9404
9664
  "img",
9405
9665
  {
9406
9666
  alt: "",
@@ -9414,7 +9674,7 @@ function ToolStepIcon({
9414
9674
  }
9415
9675
  const TypeIcon = getStepTypeIcon(data.type);
9416
9676
  if (TypeIcon) {
9417
- return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
9677
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
9418
9678
  TypeIcon,
9419
9679
  {
9420
9680
  className,
@@ -9425,7 +9685,7 @@ function ToolStepIcon({
9425
9685
  }
9426
9686
  const ToolsetIcon = getKnownToolsetIcon(data.toolset);
9427
9687
  if (ToolsetIcon) {
9428
- return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
9688
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
9429
9689
  ToolsetIcon,
9430
9690
  {
9431
9691
  className,
@@ -9435,8 +9695,8 @@ function ToolStepIcon({
9435
9695
  );
9436
9696
  }
9437
9697
  if (usesToolsetAvatar) {
9438
- return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
9439
- import_lucide_react17.CircleHelp,
9698
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
9699
+ import_lucide_react18.CircleHelp,
9440
9700
  {
9441
9701
  className,
9442
9702
  "aria-hidden": "true",
@@ -9444,8 +9704,8 @@ function ToolStepIcon({
9444
9704
  }
9445
9705
  );
9446
9706
  }
9447
- return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
9448
- import_lucide_react17.CircleHelp,
9707
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
9708
+ import_lucide_react18.CircleHelp,
9449
9709
  {
9450
9710
  className,
9451
9711
  "aria-hidden": "true",
@@ -9453,17 +9713,20 @@ function ToolStepIcon({
9453
9713
  }
9454
9714
  );
9455
9715
  }
9456
- function ToolCallCopyButton({ value }) {
9716
+ function ToolCallCopyButton({
9717
+ value,
9718
+ className
9719
+ }) {
9457
9720
  const { t } = useChatkitTranslation();
9458
- const [isCopied, setIsCopied] = React29.useState(false);
9459
- const resetTimeoutRef = React29.useRef(null);
9460
- const clearResetTimeout = React29.useCallback(() => {
9721
+ const [isCopied, setIsCopied] = React30.useState(false);
9722
+ const resetTimeoutRef = React30.useRef(null);
9723
+ const clearResetTimeout = React30.useCallback(() => {
9461
9724
  if (resetTimeoutRef.current === null) return;
9462
9725
  window.clearTimeout(resetTimeoutRef.current);
9463
9726
  resetTimeoutRef.current = null;
9464
9727
  }, []);
9465
- React29.useEffect(() => clearResetTimeout, [clearResetTimeout]);
9466
- const handleCopy = React29.useCallback(() => {
9728
+ React30.useEffect(() => clearResetTimeout, [clearResetTimeout]);
9729
+ const handleCopy = React30.useCallback(() => {
9467
9730
  if (typeof navigator === "undefined" || !navigator.clipboard) return;
9468
9731
  void navigator.clipboard.writeText(value).then(() => {
9469
9732
  setIsCopied(true);
@@ -9475,15 +9738,18 @@ function ToolCallCopyButton({ value }) {
9475
9738
  }).catch(() => void 0);
9476
9739
  }, [clearResetTimeout, value]);
9477
9740
  const label = isCopied ? t("message.toolGroup.copied") : t("message.toolGroup.copy");
9478
- return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
9741
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
9479
9742
  "button",
9480
9743
  {
9481
9744
  type: "button",
9482
- className: "inline-flex h-6 w-6 shrink-0 items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-background hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/40",
9745
+ className: cn(
9746
+ "inline-flex h-6 w-6 shrink-0 items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-background hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/40",
9747
+ className
9748
+ ),
9483
9749
  "aria-label": label,
9484
9750
  title: label,
9485
9751
  onClick: handleCopy,
9486
- children: isCopied ? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_lucide_react17.Check, { className: "h-3.5 w-3.5", "aria-hidden": "true" }) : /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_lucide_react17.Copy, { className: "h-3.5 w-3.5", "aria-hidden": "true" })
9752
+ children: isCopied ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_lucide_react18.Check, { className: "h-3.5 w-3.5", "aria-hidden": "true" }) : /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_lucide_react18.Copy, { className: "h-3.5 w-3.5", "aria-hidden": "true" })
9487
9753
  }
9488
9754
  );
9489
9755
  }
@@ -9494,28 +9760,28 @@ function ToolCallValueBlock({
9494
9760
  const { t } = useChatkitTranslation();
9495
9761
  const detected = detectJsonValue(value);
9496
9762
  if (detected.kind === "text") {
9497
- return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "min-w-0 space-y-1", children: [
9498
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "flex justify-end", children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(ToolCallCopyButton, { value: detected.text }) }),
9499
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(PlainTextBlock, { value: detected.text, destructive })
9763
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "min-w-0 space-y-1", children: [
9764
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "flex justify-end", children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(ToolCallCopyButton, { value: detected.text }) }),
9765
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(PlainTextBlock, { value: detected.text, destructive })
9500
9766
  ] });
9501
9767
  }
9502
- return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(Tabs, { defaultValue: "tree", className: "min-w-0", children: [
9503
- /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "mb-2 flex min-w-0 items-center justify-between gap-2", children: [
9504
- /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("span", { className: "min-w-0 truncate text-[11px] text-muted-foreground", children: [
9768
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(Tabs, { defaultValue: "tree", className: "min-w-0", children: [
9769
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "mb-2 flex min-w-0 items-center justify-between gap-2", children: [
9770
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("span", { className: "min-w-0 truncate text-[11px] text-muted-foreground", children: [
9505
9771
  t("message.toolGroup.jsonTitle"),
9506
9772
  " \xB7 ",
9507
9773
  getJsonValueSummary(detected.value)
9508
9774
  ] }),
9509
- /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "flex shrink-0 items-center gap-1", children: [
9510
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(ToolCallCopyButton, { value: detected.raw }),
9511
- /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(TabsList, { className: "rounded-md p-0.5", children: [
9512
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(TabsTrigger, { className: "px-2 py-0.5 text-[11px]", value: "tree", children: t("message.toolGroup.jsonTree") }),
9513
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(TabsTrigger, { className: "px-2 py-0.5 text-[11px]", value: "raw", children: t("message.toolGroup.jsonRaw") })
9775
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "flex shrink-0 items-center gap-1", children: [
9776
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(ToolCallCopyButton, { value: detected.raw }),
9777
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(TabsList, { className: "rounded-md p-0.5", children: [
9778
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(TabsTrigger, { className: "px-2 py-0.5 text-[11px]", value: "tree", children: t("message.toolGroup.jsonTree") }),
9779
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(TabsTrigger, { className: "px-2 py-0.5 text-[11px]", value: "raw", children: t("message.toolGroup.jsonRaw") })
9514
9780
  ] })
9515
9781
  ] })
9516
9782
  ] }),
9517
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(TabsContent, { value: "tree", className: "mt-0", children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(JsonTreeView, { value: detected.value }) }),
9518
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(TabsContent, { value: "raw", className: "mt-0", children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(RawJsonBlock, { raw: detected.raw }) })
9783
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(TabsContent, { value: "tree", className: "mt-0", children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(JsonTreeView, { value: detected.value }) }),
9784
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(TabsContent, { value: "raw", className: "mt-0", children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(RawJsonBlock, { raw: detected.raw }) })
9519
9785
  ] });
9520
9786
  }
9521
9787
  function DefaultToolCallOutput({ data }) {
@@ -9523,37 +9789,40 @@ function DefaultToolCallOutput({ data }) {
9523
9789
  const output = data.output ?? null;
9524
9790
  const error = data.error ?? null;
9525
9791
  if (error) {
9526
- return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "space-y-1", children: [
9527
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "text-[11px] font-medium text-destructive", children: t("message.toolGroup.errorTitle") }),
9528
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(ToolCallValueBlock, { value: error, destructive: true })
9792
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "space-y-1", children: [
9793
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "text-[11px] font-medium text-destructive", children: t("message.toolGroup.errorTitle") }),
9794
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(ToolCallValueBlock, { value: error, destructive: true })
9529
9795
  ] });
9530
9796
  }
9531
9797
  if (output === null) return null;
9532
- return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "space-y-1", children: [
9533
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "text-[11px] font-medium text-muted-foreground", children: t("message.toolGroup.outputTitle") }),
9534
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(ToolCallValueBlock, { value: output })
9798
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "space-y-1", children: [
9799
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "text-[11px] font-medium text-muted-foreground", children: t("message.toolGroup.outputTitle") }),
9800
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(ToolCallValueBlock, { value: output })
9535
9801
  ] });
9536
9802
  }
9537
9803
  function ToolCallDetails({ content }) {
9538
9804
  const { t } = useChatkitTranslation();
9539
9805
  const data = getToolStepData(content);
9806
+ if (isSandboxShellStep(data)) {
9807
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "ml-6 mt-1", children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(SandboxShellToolCallCard, { data }) });
9808
+ }
9540
9809
  const renderer = getComponentMessageRenderer(content, data);
9541
9810
  const hasCustomDetails = data.error === void 0 && hasComponentMessageRendererDetails(renderer, content, data);
9542
9811
  const CustomDetailsRenderer = hasCustomDetails ? renderer?.renderDetails : void 0;
9543
9812
  if (CustomDetailsRenderer) {
9544
- return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "ml-6 mt-1 max-h-60 overflow-auto rounded-md bg-muted/30 text-xs text-muted-foreground", children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(CustomDetailsRenderer, { content, data }) });
9813
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "ml-6 mt-1 max-h-60 overflow-auto rounded-md bg-muted/30 text-xs text-muted-foreground", children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(CustomDetailsRenderer, { content, data }) });
9545
9814
  }
9546
9815
  const OutputRenderer = getToolCallOutputRenderer(data);
9547
9816
  const hasInput = data.input !== void 0 && data.input !== null;
9548
9817
  const hasOutput = data.error !== void 0 || data.output !== void 0;
9549
9818
  if (!hasInput && !hasOutput) return null;
9550
- return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "ml-6 mt-1 max-h-60 overflow-auto rounded-md bg-muted/30 px-3 py-2 text-xs text-muted-foreground", children: [
9551
- hasInput && /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "space-y-1", children: [
9552
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "text-[11px] font-medium text-muted-foreground", children: t("message.toolGroup.inputTitle") }),
9553
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(ToolCallValueBlock, { value: data.input })
9819
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "ml-6 mt-1 max-h-60 overflow-auto rounded-md bg-muted/30 px-3 py-2 text-xs text-muted-foreground", children: [
9820
+ hasInput && /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "space-y-1", children: [
9821
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "text-[11px] font-medium text-muted-foreground", children: t("message.toolGroup.inputTitle") }),
9822
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(ToolCallValueBlock, { value: data.input })
9554
9823
  ] }),
9555
- hasInput && hasOutput ? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "h-2" }) : null,
9556
- hasOutput ? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(OutputRenderer, { content, data }) : null
9824
+ hasInput && hasOutput ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "h-2" }) : null,
9825
+ hasOutput ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(OutputRenderer, { content, data }) : null
9557
9826
  ] });
9558
9827
  }
9559
9828
  function areToolCallRowPropsEqual(previous, next) {
@@ -9565,15 +9834,16 @@ function ToolCallRowContent({
9565
9834
  organizationId,
9566
9835
  apiUrl
9567
9836
  }) {
9568
- const { i18n: i18n2 } = useChatkitTranslation();
9837
+ const { i18n: i18n2, t } = useChatkitTranslation();
9569
9838
  const data = getToolStepData(content);
9570
9839
  const status = getEffectiveToolStepStatus(data, isThreadRunning);
9571
9840
  const hasError = status === "fail" || Boolean(data.error);
9572
- const detailsId = React29.useId();
9841
+ const isSandboxShell = isSandboxShellStep(data);
9842
+ const detailsId = React30.useId();
9573
9843
  const renderer = getComponentMessageRenderer(content, data);
9574
- const label = renderer?.getTitle?.(content, data, i18n2.language) ?? getToolActivityLabel(content, i18n2.language, status);
9844
+ const label = isSandboxShell ? getSandboxShellActivityLabel(data, status, i18n2.language, t) : renderer?.getTitle?.(content, data, i18n2.language) ?? getToolActivityLabel(content, i18n2.language, status);
9575
9845
  const hasCustomDetails = data.error === void 0 && hasComponentMessageRendererDetails(renderer, content, data);
9576
- const hasDetails = data.input !== void 0 || data.error !== void 0 || data.output !== void 0 || hasCustomDetails;
9846
+ const hasDetails = isSandboxShell || data.input !== void 0 || data.error !== void 0 || data.output !== void 0 || hasCustomDetails;
9577
9847
  const fallbackEndedAt = useFrozenTimestamp(
9578
9848
  data.status === "running" && status === "fail"
9579
9849
  );
@@ -9581,14 +9851,14 @@ function ToolCallRowContent({
9581
9851
  status,
9582
9852
  fallbackEndedAt
9583
9853
  });
9584
- const [isExpanded, setIsExpanded] = React29.useState(false);
9585
- React29.useEffect(() => {
9854
+ const [isExpanded, setIsExpanded] = React30.useState(false);
9855
+ React30.useEffect(() => {
9586
9856
  if (status === "running" && data.output !== void 0) {
9587
9857
  setIsExpanded(true);
9588
9858
  }
9589
9859
  }, [data.output, status]);
9590
- return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("li", { className: "ck-tool-call-row-enter min-w-0", children: [
9591
- /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
9860
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("li", { className: "ck-tool-call-row-enter min-w-0", children: [
9861
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
9592
9862
  "button",
9593
9863
  {
9594
9864
  type: "button",
@@ -9596,7 +9866,7 @@ function ToolCallRowContent({
9596
9866
  "group/tool-call flex w-full min-w-0 items-center gap-2 text-left text-muted-foreground",
9597
9867
  TOOL_CALL_ROW_TEXT_CLASS,
9598
9868
  hasDetails && "cursor-pointer hover:text-foreground",
9599
- hasError && "text-destructive hover:text-destructive"
9869
+ hasError && !isSandboxShell && "text-destructive hover:text-destructive"
9600
9870
  ),
9601
9871
  "aria-expanded": hasDetails ? isExpanded : void 0,
9602
9872
  "aria-controls": hasDetails ? detailsId : void 0,
@@ -9605,7 +9875,7 @@ function ToolCallRowContent({
9605
9875
  if (hasDetails) setIsExpanded((prev) => !prev);
9606
9876
  },
9607
9877
  children: [
9608
- status ? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
9878
+ status ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
9609
9879
  ToolStepIcon,
9610
9880
  {
9611
9881
  data,
@@ -9613,11 +9883,11 @@ function ToolCallRowContent({
9613
9883
  apiUrl,
9614
9884
  className: cn(
9615
9885
  "h-3.5 w-3.5 shrink-0",
9616
- hasError ? "text-destructive" : "text-muted-foreground"
9886
+ hasError && !isSandboxShell ? "text-destructive" : "text-muted-foreground"
9617
9887
  )
9618
9888
  }
9619
- ) : /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { className: "h-3.5 w-3.5 shrink-0", "aria-hidden": "true" }),
9620
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
9889
+ ) : /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { className: "h-3.5 w-3.5 shrink-0", "aria-hidden": "true" }),
9890
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
9621
9891
  "span",
9622
9892
  {
9623
9893
  className: cn(
@@ -9628,9 +9898,9 @@ function ToolCallRowContent({
9628
9898
  children: label
9629
9899
  }
9630
9900
  ),
9631
- durationLabel ? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { className: "shrink-0 text-[11px] tabular-nums text-muted-foreground/80", children: durationLabel }) : null,
9632
- hasDetails ? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
9633
- import_lucide_react17.ChevronRight,
9901
+ durationLabel ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { className: "shrink-0 text-[11px] tabular-nums text-muted-foreground/80", children: durationLabel }) : null,
9902
+ hasDetails ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
9903
+ import_lucide_react18.ChevronRight,
9634
9904
  {
9635
9905
  "aria-hidden": "true",
9636
9906
  className: cn(
@@ -9642,10 +9912,10 @@ function ToolCallRowContent({
9642
9912
  ]
9643
9913
  }
9644
9914
  ),
9645
- hasDetails && isExpanded ? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { id: detailsId, children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(ToolCallDetails, { content }) }) : null
9915
+ hasDetails && isExpanded ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { id: detailsId, children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(ToolCallDetails, { content }) }) : null
9646
9916
  ] });
9647
9917
  }
9648
- var ToolCallRow = React29.memo(ToolCallRowContent, areToolCallRowPropsEqual);
9918
+ var ToolCallRow = React30.memo(ToolCallRowContent, areToolCallRowPropsEqual);
9649
9919
  ToolCallRow.displayName = "ToolCallRow";
9650
9920
  function ToolComponentGroup({
9651
9921
  items,
@@ -9655,8 +9925,8 @@ function ToolComponentGroup({
9655
9925
  apiUrl
9656
9926
  }) {
9657
9927
  const { t } = useChatkitTranslation();
9658
- const contentId = React29.useId();
9659
- const [isExpanded, setIsExpanded] = React29.useState(!hasFollowingItem);
9928
+ const contentId = React30.useId();
9929
+ const [isExpanded, setIsExpanded] = React30.useState(!hasFollowingItem);
9660
9930
  const categoryCounts = getToolGroupCategoryCounts(items);
9661
9931
  const categorySummary = TOOL_GROUP_CATEGORY_ORDER.flatMap((category) => {
9662
9932
  const count = categoryCounts[category] ?? 0;
@@ -9671,11 +9941,11 @@ function ToolComponentGroup({
9671
9941
  const summary = `${t("message.toolGroup.status.success")} ${categorySummary}`;
9672
9942
  const config = toolStatusConfig.success;
9673
9943
  const StatusIcon = config.icon;
9674
- React29.useEffect(() => {
9944
+ React30.useEffect(() => {
9675
9945
  setIsExpanded(!hasFollowingItem);
9676
9946
  }, [hasFollowingItem]);
9677
- return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "px-1 py-1", children: [
9678
- /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
9947
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "px-1 py-1", children: [
9948
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
9679
9949
  "button",
9680
9950
  {
9681
9951
  type: "button",
@@ -9684,8 +9954,8 @@ function ToolComponentGroup({
9684
9954
  "aria-controls": contentId,
9685
9955
  onClick: () => setIsExpanded((prev) => !prev),
9686
9956
  children: [
9687
- /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "flex min-w-0 items-center gap-2 text-sm font-medium text-muted-foreground", children: [
9688
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
9957
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "flex min-w-0 items-center gap-2 text-sm font-medium text-muted-foreground", children: [
9958
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
9689
9959
  StatusIcon,
9690
9960
  {
9691
9961
  className: cn(
@@ -9694,10 +9964,10 @@ function ToolComponentGroup({
9694
9964
  )
9695
9965
  }
9696
9966
  ),
9697
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { className: "truncate", children: summary })
9967
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { className: "truncate", children: summary })
9698
9968
  ] }),
9699
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
9700
- import_lucide_react17.ChevronRight,
9969
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
9970
+ import_lucide_react18.ChevronRight,
9701
9971
  {
9702
9972
  "aria-hidden": "true",
9703
9973
  className: cn(
@@ -9709,7 +9979,7 @@ function ToolComponentGroup({
9709
9979
  ]
9710
9980
  }
9711
9981
  ),
9712
- isExpanded && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("ul", { id: contentId, className: "mt-2 space-y-1.5 overflow-y-auto pr-1", children: items.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
9982
+ isExpanded && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("ul", { id: contentId, className: "mt-2 space-y-1.5 overflow-y-auto pr-1", children: items.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
9713
9983
  ToolCallRow,
9714
9984
  {
9715
9985
  content: item,
@@ -9723,10 +9993,10 @@ function ToolComponentGroup({
9723
9993
  }
9724
9994
 
9725
9995
  // src/components/thread/messages/request-user-input-result-card.tsx
9726
- var React30 = require("react");
9996
+ var React31 = require("react");
9727
9997
  var import_chatkit_types6 = require("@xpert-ai/chatkit-types");
9728
- var import_lucide_react18 = require("lucide-react");
9729
- var import_jsx_runtime35 = require("react/jsx-runtime");
9998
+ var import_lucide_react19 = require("lucide-react");
9999
+ var import_jsx_runtime36 = require("react/jsx-runtime");
9730
10000
  function isRecord3(value) {
9731
10001
  return !!value && typeof value === "object" && !Array.isArray(value);
9732
10002
  }
@@ -9838,7 +10108,7 @@ function RequestUserInputResultCard({
9838
10108
  className
9839
10109
  }) {
9840
10110
  const { t } = useChatkitTranslation();
9841
- return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
10111
+ return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
9842
10112
  "section",
9843
10113
  {
9844
10114
  "aria-label": t("message.requestUserInputResult.title"),
@@ -9847,23 +10117,23 @@ function RequestUserInputResultCard({
9847
10117
  className
9848
10118
  ),
9849
10119
  children: [
9850
- /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "mb-2 flex items-center gap-2 text-sm font-semibold text-foreground", children: [
9851
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_lucide_react18.CheckCircle2, { className: "h-4 w-4 text-primary" }),
9852
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { children: t("message.requestUserInputResult.title") })
10120
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: "mb-2 flex items-center gap-2 text-sm font-semibold text-foreground", children: [
10121
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_lucide_react19.CheckCircle2, { className: "h-4 w-4 text-primary" }),
10122
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { children: t("message.requestUserInputResult.title") })
9853
10123
  ] }),
9854
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "space-y-2", children: result.answers.map((answer, index) => /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
10124
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { className: "space-y-2", children: result.answers.map((answer, index) => /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
9855
10125
  "div",
9856
10126
  {
9857
10127
  className: "rounded-md bg-background/70 px-2.5 py-2",
9858
10128
  children: [
9859
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "text-xs font-medium leading-5 text-muted-foreground", children: answer.question }),
9860
- /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "mt-0.5 flex min-w-0 flex-wrap items-center gap-1.5", children: [
9861
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { className: "min-w-0 wrap-break-word text-sm font-semibold text-foreground", children: answer.label ?? answer.value }),
9862
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { className: "rounded-full bg-muted px-1.5 py-0.5 text-[11px] font-medium text-muted-foreground", children: t(
10129
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { className: "text-xs font-medium leading-5 text-muted-foreground", children: answer.question }),
10130
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: "mt-0.5 flex min-w-0 flex-wrap items-center gap-1.5", children: [
10131
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { className: "min-w-0 wrap-break-word text-sm font-semibold text-foreground", children: answer.label ?? answer.value }),
10132
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { className: "rounded-full bg-muted px-1.5 py-0.5 text-[11px] font-medium text-muted-foreground", children: t(
9863
10133
  answer.type === "other" ? "message.requestUserInputResult.other" : "message.requestUserInputResult.option"
9864
10134
  ) })
9865
10135
  ] }),
9866
- answer.description ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "mt-1 text-xs leading-5 text-muted-foreground", children: answer.description }) : null
10136
+ answer.description ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { className: "mt-1 text-xs leading-5 text-muted-foreground", children: answer.description }) : null
9867
10137
  ]
9868
10138
  },
9869
10139
  `${answer.id}-${index}`
@@ -9875,18 +10145,18 @@ function RequestUserInputResultCard({
9875
10145
 
9876
10146
  // src/components/thread/messages/widget.tsx
9877
10147
  var import_a2ui_react = require("@xpert-ai/a2ui-react");
9878
- var import_jsx_runtime36 = require("react/jsx-runtime");
10148
+ var import_jsx_runtime37 = require("react/jsx-runtime");
9879
10149
  function WidgetMessage({ messageId, data }) {
9880
10150
  const widgets = Array.isArray(data.widgets) ? data.widgets : [];
9881
10151
  if (widgets.length === 0) return null;
9882
10152
  const baseSurfaceId = `widget-${messageId}`;
9883
- return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { className: "space-y-3", children: widgets.map((widget, index) => {
10153
+ return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: "space-y-3", children: widgets.map((widget, index) => {
9884
10154
  const config = widget?.config;
9885
10155
  if (!config || typeof config !== "object") {
9886
10156
  return null;
9887
10157
  }
9888
10158
  const surfaceId = widgets.length > 1 ? `${baseSurfaceId}-${index}` : baseSurfaceId;
9889
- return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
10159
+ return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
9890
10160
  import_a2ui_react.SurfaceRenderer,
9891
10161
  {
9892
10162
  surfaceId,
@@ -9898,7 +10168,7 @@ function WidgetMessage({ messageId, data }) {
9898
10168
  }
9899
10169
 
9900
10170
  // src/components/thread/messages/ai.tsx
9901
- var import_jsx_runtime37 = require("react/jsx-runtime");
10171
+ var import_jsx_runtime38 = require("react/jsx-runtime");
9902
10172
  var assistantMessageStackClassName = "space-y-3 in-data-[density=compact]:space-y-2 in-data-[density=spacious]:space-y-4";
9903
10173
  function isTextContent3(content) {
9904
10174
  return content.type === "text";
@@ -9932,11 +10202,11 @@ function formatDisplayValue3(value) {
9932
10202
  function ReasoningBlock({ reasoning }) {
9933
10203
  const blocks = reasoning.filter((item) => item.text?.trim());
9934
10204
  if (blocks.length === 0) return null;
9935
- return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: "space-y-2", children: blocks.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
10205
+ return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: "space-y-2", children: blocks.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
9936
10206
  "div",
9937
10207
  {
9938
10208
  className: "rounded-lg border bg-muted/40 p-3 text-xs text-muted-foreground",
9939
- children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("p", { className: "whitespace-pre-wrap wrap-break-word leading-relaxed", children: item.text })
10209
+ children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("p", { className: "whitespace-pre-wrap wrap-break-word leading-relaxed", children: item.text })
9940
10210
  },
9941
10211
  item.id ?? `reasoning-${index}`
9942
10212
  )) });
@@ -9944,20 +10214,20 @@ function ReasoningBlock({ reasoning }) {
9944
10214
  function ImageBlock({ content }) {
9945
10215
  const imageUrl = typeof content.image_url === "string" ? content.image_url : typeof content.image_url?.url === "string" ? content.image_url.url : null;
9946
10216
  if (!imageUrl) {
9947
- return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(Card, { children: [
9948
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(CardHeader, { className: "space-y-1", children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(CardTitle, { className: "text-sm", children: "Image" }) }),
9949
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(CardContent, { className: "text-xs text-muted-foreground", children: safeJson3(content) })
10217
+ return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(Card, { children: [
10218
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(CardHeader, { className: "space-y-1", children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(CardTitle, { className: "text-sm", children: "Image" }) }),
10219
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(CardContent, { className: "text-xs text-muted-foreground", children: safeJson3(content) })
9950
10220
  ] });
9951
10221
  }
9952
- return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("figure", { className: "overflow-hidden rounded-lg border bg-background", children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("img", { src: imageUrl, alt: "Assistant output", className: "h-auto w-full object-cover" }) });
10222
+ return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("figure", { className: "overflow-hidden rounded-lg border bg-background", children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("img", { src: imageUrl, alt: "Assistant output", className: "h-auto w-full object-cover" }) });
9953
10223
  }
9954
10224
  function MemoryBlock({ content }) {
9955
- return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(Card, { children: [
9956
- /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(CardHeader, { className: "flex flex-row items-center justify-between gap-2", children: [
9957
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(CardTitle, { className: "text-sm", children: "Memory" }),
9958
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Badge, { variant: "secondary", children: "Memory" })
10225
+ return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(Card, { children: [
10226
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(CardHeader, { className: "flex flex-row items-center justify-between gap-2", children: [
10227
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(CardTitle, { className: "text-sm", children: "Memory" }),
10228
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Badge, { variant: "secondary", children: "Memory" })
9959
10229
  ] }),
9960
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(CardContent, { className: "text-xs text-muted-foreground", children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("pre", { className: "whitespace-pre-wrap wrap-break-word", children: safeJson3(content.data ?? []) }) })
10230
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(CardContent, { className: "text-xs text-muted-foreground", children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("pre", { className: "whitespace-pre-wrap wrap-break-word", children: safeJson3(content.data ?? []) }) })
9961
10231
  ] });
9962
10232
  }
9963
10233
  function parseStepDate2(value) {
@@ -9991,11 +10261,11 @@ function formatStepDuration3(durationMs) {
9991
10261
  }
9992
10262
  function ComponentBlock({ content }) {
9993
10263
  const { i18n: i18n2 } = useChatkitTranslation();
9994
- const [isExpanded, setIsExpanded] = React31.useState(false);
9995
- const contentRef = React31.useRef(null);
9996
- const shouldAutoScrollRef = React31.useRef(true);
9997
- const previousScrollTopRef = React31.useRef(0);
9998
- const [durationNow, setDurationNow] = React31.useState(() => Date.now());
10264
+ const [isExpanded, setIsExpanded] = React32.useState(false);
10265
+ const contentRef = React32.useRef(null);
10266
+ const shouldAutoScrollRef = React32.useRef(true);
10267
+ const previousScrollTopRef = React32.useRef(0);
10268
+ const [durationNow, setDurationNow] = React32.useState(() => Date.now());
9999
10269
  const data = getToolStepData(content);
10000
10270
  const category = data.category ?? "Component";
10001
10271
  const title = getToolActivityLabel(content, i18n2.language);
@@ -10009,10 +10279,10 @@ function ComponentBlock({ content }) {
10009
10279
  const endedAt = parseStepDate2(data.end_date);
10010
10280
  const durationMs = createdAt === null ? null : Math.max(0, (endedAt ?? durationNow) - createdAt);
10011
10281
  const durationLabel = durationMs === null ? null : formatStepDuration3(durationMs);
10012
- React31.useEffect(() => {
10282
+ React32.useEffect(() => {
10013
10283
  if (status === "running" && output !== null) setIsExpanded(true);
10014
10284
  }, [status, output]);
10015
- React31.useEffect(() => {
10285
+ React32.useEffect(() => {
10016
10286
  if (status !== "running" || createdAt === null || endedAt !== null) {
10017
10287
  return;
10018
10288
  }
@@ -10024,7 +10294,7 @@ function ComponentBlock({ content }) {
10024
10294
  window.clearInterval(timer);
10025
10295
  };
10026
10296
  }, [createdAt, endedAt, status]);
10027
- React31.useEffect(() => {
10297
+ React32.useEffect(() => {
10028
10298
  const element = contentRef.current;
10029
10299
  if (!element) return;
10030
10300
  previousScrollTopRef.current = element.scrollTop;
@@ -10044,7 +10314,7 @@ function ComponentBlock({ content }) {
10044
10314
  element.removeEventListener("scroll", updateAutoScrollState);
10045
10315
  };
10046
10316
  }, [isExpanded]);
10047
- React31.useEffect(() => {
10317
+ React32.useEffect(() => {
10048
10318
  if (status !== "running") {
10049
10319
  shouldAutoScrollRef.current = true;
10050
10320
  return;
@@ -10057,25 +10327,25 @@ function ComponentBlock({ content }) {
10057
10327
  }, [isExpanded, output, status]);
10058
10328
  const config = status ? toolStatusConfig[status] : null;
10059
10329
  const StatusIcon = config?.icon;
10060
- return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(Card, { children: [
10061
- /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(CardHeader, { className: "flex flex-row items-center justify-between gap-2 px-2 py-1 cursor-pointer", onClick: () => setIsExpanded(!isExpanded), children: [
10062
- /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { className: "flex items-center space-x-1 flex-1 min-w-0", children: [
10063
- status && StatusIcon && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(StatusIcon, { className: cn("h-4 w-4", config?.iconClass, status === "running" && "animate-spin") }),
10064
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(CardTitle, { className: "text-sm truncate", children: title })
10330
+ return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(Card, { children: [
10331
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(CardHeader, { className: "flex flex-row items-center justify-between gap-2 px-2 py-1 cursor-pointer", onClick: () => setIsExpanded(!isExpanded), children: [
10332
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "flex items-center space-x-1 flex-1 min-w-0", children: [
10333
+ status && StatusIcon && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(StatusIcon, { className: cn("h-4 w-4", config?.iconClass, status === "running" && "animate-spin") }),
10334
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(CardTitle, { className: "text-sm truncate", children: title })
10065
10335
  ] }),
10066
- /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { className: "flex flex-wrap items-center gap-2 shrink-0", children: [
10067
- durationLabel && /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { className: "inline-flex items-center gap-1 text-[11px] text-muted-foreground tabular-nums", children: [
10068
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_lucide_react19.Clock3, { className: "h-3 w-3" }),
10069
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("span", { children: durationLabel })
10336
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "flex flex-wrap items-center gap-2 shrink-0", children: [
10337
+ durationLabel && /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "inline-flex items-center gap-1 text-[11px] text-muted-foreground tabular-nums", children: [
10338
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_lucide_react20.Clock3, { className: "h-3 w-3" }),
10339
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("span", { children: durationLabel })
10070
10340
  ] }),
10071
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Badge, { variant: "secondary", className: "rounded-lg px-1.5", children: category }),
10072
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
10341
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Badge, { variant: "secondary", className: "rounded-lg px-1.5", children: category }),
10342
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
10073
10343
  "button",
10074
10344
  {
10075
10345
  className: "text-muted-foreground hover:text-foreground transition-colors",
10076
10346
  "aria-label": isExpanded ? "Collapse" : "Expand",
10077
- children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
10078
- import_lucide_react19.ChevronDown,
10347
+ children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
10348
+ import_lucide_react20.ChevronDown,
10079
10349
  {
10080
10350
  className: cn("h-4 w-4 transition-transform", isExpanded && "rotate-180")
10081
10351
  }
@@ -10084,35 +10354,35 @@ function ComponentBlock({ content }) {
10084
10354
  )
10085
10355
  ] })
10086
10356
  ] }),
10087
- isExpanded && /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(CardContent, { ref: contentRef, className: "text-xs text-muted-foreground max-h-60 overflow-auto", children: [
10088
- data.input && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("pre", { className: "whitespace-pre-wrap wrap-break-word", children: formatDisplayValue3(data.input) }),
10089
- error ? /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("pre", { className: "whitespace-pre-wrap wrap-break-word text-destructive", children: formatDisplayValue3(error) }) : hasOutput && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("pre", { className: "whitespace-pre-wrap wrap-break-word", children: formatDisplayValue3(fallback) })
10357
+ isExpanded && /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(CardContent, { ref: contentRef, className: "text-xs text-muted-foreground max-h-60 overflow-auto", children: [
10358
+ data.input && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("pre", { className: "whitespace-pre-wrap wrap-break-word", children: formatDisplayValue3(data.input) }),
10359
+ error ? /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("pre", { className: "whitespace-pre-wrap wrap-break-word text-destructive", children: formatDisplayValue3(error) }) : hasOutput && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("pre", { className: "whitespace-pre-wrap wrap-break-word", children: formatDisplayValue3(fallback) })
10090
10360
  ] })
10091
10361
  ] });
10092
10362
  }
10093
10363
  function UnknownBlock({ content }) {
10094
- return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(Card, { children: [
10095
- /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(CardHeader, { className: "flex flex-row items-center justify-between gap-2", children: [
10096
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(CardTitle, { className: "text-sm", children: "Assistant Content" }),
10097
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Badge, { variant: "outline", children: content.type ?? "unknown" })
10364
+ return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(Card, { children: [
10365
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(CardHeader, { className: "flex flex-row items-center justify-between gap-2", children: [
10366
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(CardTitle, { className: "text-sm", children: "Assistant Content" }),
10367
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Badge, { variant: "outline", children: content.type ?? "unknown" })
10098
10368
  ] }),
10099
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(CardContent, { className: "text-xs text-muted-foreground", children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("pre", { className: "whitespace-pre-wrap break-words", children: safeJson3(content) }) })
10369
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(CardContent, { className: "text-xs text-muted-foreground", children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("pre", { className: "whitespace-pre-wrap break-words", children: safeJson3(content) }) })
10100
10370
  ] });
10101
10371
  }
10102
10372
  function renderContentItem(content, index, message, lookupMessages, options) {
10103
10373
  const messageId = message.id;
10104
10374
  const textClassName = options?.isAgentOutput ? "text-sm [&_.markdown-content_p]:!leading-6" : void 0;
10105
10375
  if (typeof content === "string") {
10106
- return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: textClassName, children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(MarkdownText, { children: content }) }, `text-${index}`);
10376
+ return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: textClassName, children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(MarkdownText, { children: content }) }, `text-${index}`);
10107
10377
  }
10108
10378
  if (isTextContent3(content)) {
10109
- return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: textClassName, children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(MarkdownText, { children: content.text }) }, content.id ?? `text-${index}`);
10379
+ return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: textClassName, children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(MarkdownText, { children: content.text }) }, content.id ?? `text-${index}`);
10110
10380
  }
10111
10381
  if (isReasoningContent3(content)) {
10112
- return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(ReasoningBlock, { reasoning: [content] }) }, content.id ?? `reasoning-${index}`);
10382
+ return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(ReasoningBlock, { reasoning: [content] }) }, content.id ?? `reasoning-${index}`);
10113
10383
  }
10114
10384
  if (isImageContent(content)) {
10115
- return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(ImageBlock, { content }) }, content.id ?? `image-${index}`);
10385
+ return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(ImageBlock, { content }) }, content.id ?? `image-${index}`);
10116
10386
  }
10117
10387
  if (isComponentContent3(content)) {
10118
10388
  const requestUserInputResult = getRequestUserInputResultCardData(
@@ -10120,13 +10390,13 @@ function renderContentItem(content, index, message, lookupMessages, options) {
10120
10390
  lookupMessages
10121
10391
  );
10122
10392
  if (requestUserInputResult) {
10123
- return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(RequestUserInputResultCard, { result: requestUserInputResult }) }, content.id ?? `request-user-input-result-${index}`);
10393
+ return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(RequestUserInputResultCard, { result: requestUserInputResult }) }, content.id ?? `request-user-input-result-${index}`);
10124
10394
  }
10125
10395
  if (isWidgetComponent2(content)) {
10126
- return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(WidgetMessage, { messageId, data: content.data }) }, content.id ?? `widget-${index}`);
10396
+ return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(WidgetMessage, { messageId, data: content.data }) }, content.id ?? `widget-${index}`);
10127
10397
  }
10128
10398
  if (getComponentMessagePresentation(content, getToolStepData(content)) === "grouped-step") {
10129
- return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
10399
+ return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
10130
10400
  ToolComponentGroup,
10131
10401
  {
10132
10402
  items: [content],
@@ -10137,15 +10407,15 @@ function renderContentItem(content, index, message, lookupMessages, options) {
10137
10407
  }
10138
10408
  ) }, content.id ?? `component-group-${index}`);
10139
10409
  }
10140
- return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(ComponentBlock, { content }) }, content.id ?? `component-${index}`);
10410
+ return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(ComponentBlock, { content }) }, content.id ?? `component-${index}`);
10141
10411
  }
10142
10412
  if (isMemoryContent(content)) {
10143
- return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(MemoryBlock, { content }) }, content.id ?? `memory-${index}`);
10413
+ return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(MemoryBlock, { content }) }, content.id ?? `memory-${index}`);
10144
10414
  }
10145
10415
  if (isAgentEventContent(content)) {
10146
- return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(AgentEventRow, { content }) }, content.id ?? `agent-event-${index}`);
10416
+ return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(AgentEventRow, { content }) }, content.id ?? `agent-event-${index}`);
10147
10417
  }
10148
- return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(UnknownBlock, { content }) }, content.id ?? `unknown-${index}`);
10418
+ return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(UnknownBlock, { content }) }, content.id ?? `unknown-${index}`);
10149
10419
  }
10150
10420
  function renderContentUnit(unit, message, lookupMessages, hasFollowingItem, options) {
10151
10421
  if (unit.type === "item") {
@@ -10156,7 +10426,7 @@ function renderContentUnit(unit, message, lookupMessages, hasFollowingItem, opti
10156
10426
  isAgentOutput: options?.isAgentOutput
10157
10427
  });
10158
10428
  }
10159
- return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
10429
+ return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
10160
10430
  ToolComponentGroup,
10161
10431
  {
10162
10432
  items: unit.items,
@@ -10193,7 +10463,7 @@ function renderAssistantRenderUnits(units, message, lookupMessages, options, dep
10193
10463
  const batch = entryBatch;
10194
10464
  entryBatch = [];
10195
10465
  rendered.push(
10196
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(React31.Fragment, { children: renderEntryBatch(batch, message, lookupMessages, hasFollowingItem, {
10466
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(React32.Fragment, { children: renderEntryBatch(batch, message, lookupMessages, hasFollowingItem, {
10197
10467
  ...options,
10198
10468
  isAgentOutput: depth > 0
10199
10469
  }) }, `entries-${batch[0]?.order ?? rendered.length}`)
@@ -10210,7 +10480,7 @@ function renderAssistantRenderUnits(units, message, lookupMessages, options, dep
10210
10480
  }
10211
10481
  flushEntries(true);
10212
10482
  rendered.push(
10213
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
10483
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
10214
10484
  AgentRunGroup,
10215
10485
  {
10216
10486
  node: unit.node,
@@ -10235,7 +10505,7 @@ function renderContent(message, lookupMessages, options) {
10235
10505
  message
10236
10506
  );
10237
10507
  if (renderTree.hasAgentRuns) {
10238
- return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: assistantMessageStackClassName, children: renderAssistantRenderUnits(
10508
+ return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: assistantMessageStackClassName, children: renderAssistantRenderUnits(
10239
10509
  renderTree.units,
10240
10510
  message,
10241
10511
  lookupMessages,
@@ -10245,13 +10515,13 @@ function renderContent(message, lookupMessages, options) {
10245
10515
  const content = message.content;
10246
10516
  if (typeof content === "string") {
10247
10517
  if (!content.trim()) return null;
10248
- return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(MarkdownText, { children: content });
10518
+ return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(MarkdownText, { children: content });
10249
10519
  }
10250
10520
  if (!Array.isArray(content) || content.length === 0) return null;
10251
10521
  const renderUnits = buildToolComponentRenderUnits(content, {
10252
10522
  shouldGroupComponent: (item) => getRequestUserInputResultCardData(item, lookupMessages) === null
10253
10523
  });
10254
- return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: "space-y-3", children: renderUnits.map(
10524
+ return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: "space-y-3", children: renderUnits.map(
10255
10525
  (unit, index) => renderContentUnit(
10256
10526
  unit,
10257
10527
  message,
@@ -10271,7 +10541,7 @@ function AssistantStreamingIndicator({
10271
10541
  thinking: t("message.thinking"),
10272
10542
  answering: t("message.answering")
10273
10543
  };
10274
- return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
10544
+ return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(
10275
10545
  "div",
10276
10546
  {
10277
10547
  className: cn(
@@ -10279,18 +10549,18 @@ function AssistantStreamingIndicator({
10279
10549
  className
10280
10550
  ),
10281
10551
  children: [
10282
- status === "loading" && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_lucide_react19.Loader2, { className: "h-3.5 w-3.5 animate-spin" }),
10283
- status === "thinking" && /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { className: "flex items-end gap-1", "aria-hidden": "true", children: [
10284
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("span", { className: "h-1.5 w-1.5 rounded-full bg-current animate-bounce [animation-delay:-0.3s]" }),
10285
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("span", { className: "h-1.5 w-1.5 rounded-full bg-current animate-bounce [animation-delay:-0.15s]" }),
10286
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("span", { className: "h-1.5 w-1.5 rounded-full bg-current animate-bounce" })
10552
+ status === "loading" && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_lucide_react20.Loader2, { className: "h-3.5 w-3.5 animate-spin" }),
10553
+ status === "thinking" && /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "flex items-end gap-1", "aria-hidden": "true", children: [
10554
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("span", { className: "h-1.5 w-1.5 rounded-full bg-current animate-bounce [animation-delay:-0.3s]" }),
10555
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("span", { className: "h-1.5 w-1.5 rounded-full bg-current animate-bounce [animation-delay:-0.15s]" }),
10556
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("span", { className: "h-1.5 w-1.5 rounded-full bg-current animate-bounce" })
10287
10557
  ] }),
10288
- status === "answering" && /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { className: "flex items-end gap-1", "aria-hidden": "true", children: [
10289
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("span", { className: "h-2 w-0.5 rounded-full bg-current animate-pulse [animation-delay:-0.25s]" }),
10290
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("span", { className: "h-3 w-0.5 rounded-full bg-current animate-pulse [animation-delay:-0.1s]" }),
10291
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("span", { className: "h-2.5 w-0.5 rounded-full bg-current animate-pulse" })
10558
+ status === "answering" && /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "flex items-end gap-1", "aria-hidden": "true", children: [
10559
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("span", { className: "h-2 w-0.5 rounded-full bg-current animate-pulse [animation-delay:-0.25s]" }),
10560
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("span", { className: "h-3 w-0.5 rounded-full bg-current animate-pulse [animation-delay:-0.1s]" }),
10561
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("span", { className: "h-2.5 w-0.5 rounded-full bg-current animate-pulse" })
10292
10562
  ] }),
10293
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("span", { children: labelMap[status] })
10563
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("span", { children: labelMap[status] })
10294
10564
  ]
10295
10565
  }
10296
10566
  );
@@ -10319,42 +10589,42 @@ function AssistantMessage({
10319
10589
  organizationId,
10320
10590
  apiUrl
10321
10591
  });
10322
- const reasoningNode = hasReasoning ? /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(ReasoningBlock, { reasoning: rootReasoning ?? [] }) : null;
10592
+ const reasoningNode = hasReasoning ? /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(ReasoningBlock, { reasoning: rootReasoning ?? [] }) : null;
10323
10593
  if (!hasContent && !hasReasoning && !resolvedStreamingStatus) return null;
10324
10594
  const streamingClass = isStreaming ? "streaming-active" : "";
10325
10595
  if (!hasContent && !hasReasoning && resolvedStreamingStatus) {
10326
- return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: cn("space-y-3", streamingClass, className), children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(AssistantStreamingIndicator, { status: resolvedStreamingStatus }) });
10596
+ return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: cn("space-y-3", streamingClass, className), children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(AssistantStreamingIndicator, { status: resolvedStreamingStatus }) });
10327
10597
  }
10328
10598
  if (hasContent && hasReasoning) {
10329
- return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { className: cn("space-y-3", streamingClass, className), children: [
10330
- /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
10599
+ return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: cn("space-y-3", streamingClass, className), children: [
10600
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(
10331
10601
  Tabs,
10332
10602
  {
10333
10603
  defaultValue: message.status === "reasoning" ? "reasoning" : "answer",
10334
10604
  className: "w-full",
10335
10605
  children: [
10336
- /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(TabsList, { className: "", children: [
10337
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(TabsTrigger, { value: "answer", children: t("message.answer") }),
10338
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(TabsTrigger, { value: "reasoning", children: t("message.reasoning") })
10606
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(TabsList, { className: "", children: [
10607
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(TabsTrigger, { value: "answer", children: t("message.answer") }),
10608
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(TabsTrigger, { value: "reasoning", children: t("message.reasoning") })
10339
10609
  ] }),
10340
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(TabsContent, { value: "answer", className: "space-y-3", children: answerNode }),
10341
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(TabsContent, { value: "reasoning", className: "space-y-3", children: reasoningNode })
10610
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(TabsContent, { value: "answer", className: "space-y-3", children: answerNode }),
10611
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(TabsContent, { value: "reasoning", className: "space-y-3", children: reasoningNode })
10342
10612
  ]
10343
10613
  }
10344
10614
  ),
10345
- resolvedStreamingStatus ? /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(AssistantStreamingIndicator, { status: resolvedStreamingStatus }) : null
10615
+ resolvedStreamingStatus ? /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(AssistantStreamingIndicator, { status: resolvedStreamingStatus }) : null
10346
10616
  ] });
10347
10617
  }
10348
- return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { className: cn("space-y-3", streamingClass, className), children: [
10618
+ return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: cn("space-y-3", streamingClass, className), children: [
10349
10619
  hasReasoning ? reasoningNode : answerNode,
10350
- resolvedStreamingStatus ? /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(AssistantStreamingIndicator, { status: resolvedStreamingStatus }) : null
10620
+ resolvedStreamingStatus ? /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(AssistantStreamingIndicator, { status: resolvedStreamingStatus }) : null
10351
10621
  ] });
10352
10622
  }
10353
10623
 
10354
10624
  // src/components/thread/MessageActions.tsx
10355
- var React32 = __toESM(require("react"), 1);
10356
- var import_lucide_react20 = require("lucide-react");
10357
- var import_jsx_runtime38 = require("react/jsx-runtime");
10625
+ var React33 = __toESM(require("react"), 1);
10626
+ var import_lucide_react21 = require("lucide-react");
10627
+ var import_jsx_runtime39 = require("react/jsx-runtime");
10358
10628
  function MessageActions({
10359
10629
  content,
10360
10630
  isAssistant = false,
@@ -10363,7 +10633,7 @@ function MessageActions({
10363
10633
  className
10364
10634
  }) {
10365
10635
  const { t } = useChatkitTranslation();
10366
- const [copied, setCopied] = React32.useState(false);
10636
+ const [copied, setCopied] = React33.useState(false);
10367
10637
  const handleCopy = async () => {
10368
10638
  try {
10369
10639
  await navigator.clipboard.writeText(content);
@@ -10376,7 +10646,7 @@ function MessageActions({
10376
10646
  if (isStreaming) {
10377
10647
  return null;
10378
10648
  }
10379
- return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(
10649
+ return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
10380
10650
  "div",
10381
10651
  {
10382
10652
  className: cn(
@@ -10384,7 +10654,7 @@ function MessageActions({
10384
10654
  className
10385
10655
  ),
10386
10656
  children: [
10387
- /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
10657
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
10388
10658
  "button",
10389
10659
  {
10390
10660
  type: "button",
@@ -10394,17 +10664,17 @@ function MessageActions({
10394
10664
  copied && "text-green-500"
10395
10665
  ),
10396
10666
  title: copied ? t("messageActions.copied") : t("messageActions.copy"),
10397
- children: copied ? /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_lucide_react20.Check, { size: 14 }) : /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_lucide_react20.Copy, { size: 14 })
10667
+ children: copied ? /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_lucide_react21.Check, { size: 14 }) : /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_lucide_react21.Copy, { size: 14 })
10398
10668
  }
10399
10669
  ),
10400
- isAssistant && onRetry && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
10670
+ isAssistant && onRetry && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
10401
10671
  "button",
10402
10672
  {
10403
10673
  type: "button",
10404
10674
  onClick: onRetry,
10405
10675
  className: "p-1.5 rounded-md text-muted-foreground hover:text-foreground hover:bg-muted transition-colors",
10406
10676
  title: t("messageActions.regenerate"),
10407
- children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_lucide_react20.RefreshCw, { size: 14 })
10677
+ children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_lucide_react21.RefreshCw, { size: 14 })
10408
10678
  }
10409
10679
  )
10410
10680
  ]
@@ -10413,20 +10683,20 @@ function MessageActions({
10413
10683
  }
10414
10684
 
10415
10685
  // src/components/thread/StartScreen.tsx
10416
- var React33 = require("react");
10417
- var import_lucide_react21 = require("lucide-react");
10418
- var import_jsx_runtime39 = require("react/jsx-runtime");
10686
+ var React34 = require("react");
10687
+ var import_lucide_react22 = require("lucide-react");
10688
+ var import_jsx_runtime40 = require("react/jsx-runtime");
10419
10689
  function getIconComponent2(icon) {
10420
10690
  const iconMap = {
10421
- "circle-question": /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_lucide_react21.HelpCircle, { size: 20 }),
10422
- "lightbulb": /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_lucide_react21.Lightbulb, { size: 20 }),
10423
- "sparkle": /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_lucide_react21.Sparkles, { size: 20 }),
10424
- "write": /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_lucide_react21.Pencil, { size: 20 }),
10425
- "search": /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_lucide_react21.Search, { size: 20 }),
10426
- "globe": /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_lucide_react21.Globe, { size: 20 }),
10427
- "book-open": /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_lucide_react21.BookOpen, { size: 20 }),
10428
- "compass": /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_lucide_react21.Compass, { size: 20 }),
10429
- "bolt": /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_lucide_react21.Zap, { size: 20 })
10691
+ "circle-question": /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_lucide_react22.HelpCircle, { size: 20 }),
10692
+ "lightbulb": /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_lucide_react22.Lightbulb, { size: 20 }),
10693
+ "sparkle": /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_lucide_react22.Sparkles, { size: 20 }),
10694
+ "write": /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_lucide_react22.Pencil, { size: 20 }),
10695
+ "search": /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_lucide_react22.Search, { size: 20 }),
10696
+ "globe": /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_lucide_react22.Globe, { size: 20 }),
10697
+ "book-open": /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_lucide_react22.BookOpen, { size: 20 }),
10698
+ "compass": /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_lucide_react22.Compass, { size: 20 }),
10699
+ "bolt": /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_lucide_react22.Zap, { size: 20 })
10430
10700
  };
10431
10701
  return icon ? iconMap[icon] || iconMap["sparkle"] : iconMap["sparkle"];
10432
10702
  }
@@ -10434,9 +10704,9 @@ function StartScreen({ startScreen, onPromptClick, className }) {
10434
10704
  const { t } = useChatkitTranslation();
10435
10705
  const greeting = startScreen?.greeting ?? t("startScreen.greeting");
10436
10706
  const prompts = startScreen?.prompts ?? [];
10437
- return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: cn("flex flex-col items-center justify-center py-12 px-4", className), children: [
10438
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: "mb-8 text-center", children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("h2", { className: "text-2xl font-semibold text-foreground mb-2", children: greeting }) }),
10439
- prompts.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: "w-full max-w-2xl", children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: "grid grid-cols-1 sm:grid-cols-2 gap-3", children: prompts.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
10707
+ return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { className: cn("flex flex-col items-center justify-center py-12 px-4", className), children: [
10708
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { className: "mb-8 text-center", children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("h2", { className: "text-2xl font-semibold text-foreground mb-2", children: greeting }) }),
10709
+ prompts.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { className: "w-full max-w-2xl", children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { className: "grid grid-cols-1 sm:grid-cols-2 gap-3", children: prompts.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
10440
10710
  "button",
10441
10711
  {
10442
10712
  type: "button",
@@ -10447,8 +10717,8 @@ function StartScreen({ startScreen, onPromptClick, className }) {
10447
10717
  "focus:outline-none focus:ring-2 focus:ring-primary/20"
10448
10718
  ),
10449
10719
  children: [
10450
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { className: "flex h-10 w-10 shrink-0 items-center justify-center rounded-lg bg-primary/10 text-primary", children: getIconComponent2(item.icon) }),
10451
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { className: "text-sm font-medium text-foreground", children: item.label })
10720
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("span", { className: "flex h-10 w-10 shrink-0 items-center justify-center rounded-lg bg-primary/10 text-primary", children: getIconComponent2(item.icon) }),
10721
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("span", { className: "text-sm font-medium text-foreground", children: item.label })
10452
10722
  ]
10453
10723
  },
10454
10724
  `prompt-${index}`
@@ -10457,7 +10727,7 @@ function StartScreen({ startScreen, onPromptClick, className }) {
10457
10727
  }
10458
10728
 
10459
10729
  // src/hooks/useThreads.ts
10460
- var React34 = __toESM(require("react"), 1);
10730
+ var React35 = __toESM(require("react"), 1);
10461
10731
  var DEFAULT_LIMIT = 50;
10462
10732
  var getThreadTitle = (threadRecord) => {
10463
10733
  const title = threadRecord.title?.trim();
@@ -10510,16 +10780,16 @@ function useThreads(limit = DEFAULT_LIMIT) {
10510
10780
  isLoading: isStreamLoading,
10511
10781
  error: streamError
10512
10782
  } = useStreamContext();
10513
- const [threadRecords, setThreadRecords] = React34.useState([]);
10514
- const [isLoading, setIsLoading] = React34.useState(false);
10515
- const [error, setError] = React34.useState(null);
10516
- const upsertThreadRecord = React34.useCallback((threadRecord) => {
10783
+ const [threadRecords, setThreadRecords] = React35.useState([]);
10784
+ const [isLoading, setIsLoading] = React35.useState(false);
10785
+ const [error, setError] = React35.useState(null);
10786
+ const upsertThreadRecord = React35.useCallback((threadRecord) => {
10517
10787
  setThreadRecords((prev) => {
10518
10788
  const next = prev.filter((item) => item.id !== threadRecord.id);
10519
10789
  return sortThreadRecords([threadRecord, ...next]);
10520
10790
  });
10521
10791
  }, []);
10522
- const refreshThreads = React34.useCallback(async () => {
10792
+ const refreshThreads = React35.useCallback(async () => {
10523
10793
  setIsLoading(true);
10524
10794
  setError(null);
10525
10795
  try {
@@ -10535,7 +10805,7 @@ function useThreads(limit = DEFAULT_LIMIT) {
10535
10805
  setIsLoading(false);
10536
10806
  }
10537
10807
  }, [client, limit, assistantId]);
10538
- const createThread = React34.useCallback(
10808
+ const createThread = React35.useCallback(
10539
10809
  async (input) => {
10540
10810
  setError(null);
10541
10811
  const payload = {};
@@ -10549,7 +10819,7 @@ function useThreads(limit = DEFAULT_LIMIT) {
10549
10819
  },
10550
10820
  [client, upsertThreadRecord]
10551
10821
  );
10552
- const updateThread = React34.useCallback(
10822
+ const updateThread = React35.useCallback(
10553
10823
  async (recordId, payload) => {
10554
10824
  setError(null);
10555
10825
  const updated = await client.conversations.update(recordId, payload);
@@ -10558,7 +10828,7 @@ function useThreads(limit = DEFAULT_LIMIT) {
10558
10828
  },
10559
10829
  [client, upsertThreadRecord]
10560
10830
  );
10561
- const deleteThread = React34.useCallback(
10831
+ const deleteThread = React35.useCallback(
10562
10832
  async (recordId) => {
10563
10833
  setError(null);
10564
10834
  await client.conversations.delete(recordId);
@@ -10566,11 +10836,11 @@ function useThreads(limit = DEFAULT_LIMIT) {
10566
10836
  },
10567
10837
  [client]
10568
10838
  );
10569
- React34.useEffect(() => {
10839
+ React35.useEffect(() => {
10570
10840
  if (!isReady) return;
10571
10841
  void refreshThreads();
10572
10842
  }, [refreshThreads, isReady]);
10573
- React34.useEffect(() => {
10843
+ React35.useEffect(() => {
10574
10844
  if (!threadId || !isStreamLoading) return;
10575
10845
  const now = (/* @__PURE__ */ new Date()).toISOString();
10576
10846
  const busyStatus = "busy";
@@ -10591,7 +10861,7 @@ function useThreads(limit = DEFAULT_LIMIT) {
10591
10861
  return changed ? sortThreadRecords(next) : prev;
10592
10862
  });
10593
10863
  }, [threadId, isStreamLoading]);
10594
- React34.useEffect(() => {
10864
+ React35.useEffect(() => {
10595
10865
  const message = getErrorMessage(streamError)?.trim();
10596
10866
  if (!threadId || !message) return;
10597
10867
  const now = (/* @__PURE__ */ new Date()).toISOString();
@@ -10613,7 +10883,7 @@ function useThreads(limit = DEFAULT_LIMIT) {
10613
10883
  return changed ? sortThreadRecords(next) : prev;
10614
10884
  });
10615
10885
  }, [threadId, streamError]);
10616
- React34.useEffect(() => {
10886
+ React35.useEffect(() => {
10617
10887
  if (!isReady || !threadId || isStreamLoading) return;
10618
10888
  let cancelled = false;
10619
10889
  void client.conversations.search({ where: { threadId }, limit: 1 }).then((result) => {
@@ -10627,7 +10897,7 @@ function useThreads(limit = DEFAULT_LIMIT) {
10627
10897
  cancelled = true;
10628
10898
  };
10629
10899
  }, [client, threadId, upsertThreadRecord, isReady, isStreamLoading]);
10630
- const threads = React34.useMemo(
10900
+ const threads = React35.useMemo(
10631
10901
  () => threadRecords.map((threadRecord) => toThreadItem(threadRecord)),
10632
10902
  [threadRecords]
10633
10903
  );
@@ -10644,10 +10914,10 @@ function useThreads(limit = DEFAULT_LIMIT) {
10644
10914
  }
10645
10915
 
10646
10916
  // src/components/thread/context-usage-indicator.tsx
10647
- var React35 = __toESM(require("react"), 1);
10917
+ var React36 = __toESM(require("react"), 1);
10648
10918
 
10649
10919
  // src/components/ui/progress-circle.tsx
10650
- var import_jsx_runtime40 = (
10920
+ var import_jsx_runtime41 = (
10651
10921
  // biome-ignore lint/a11y/useFocusableInteractive: false positive (progress + progressbar are not focusable interactives)
10652
10922
  // biome-ignore lint/nursery/useAriaPropsSupportedByRole: biome rule at odds with mdn docs (presumed nursary bug with rule)
10653
10923
  require("react/jsx-runtime")
@@ -10671,7 +10941,7 @@ var ProgressCircle = ({ value, className, ...restSvgProps }) => {
10671
10941
  fill: "none",
10672
10942
  strokeWidth
10673
10943
  };
10674
- return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
10944
+ return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(
10675
10945
  "svg",
10676
10946
  {
10677
10947
  role: "progressbar",
@@ -10682,8 +10952,8 @@ var ProgressCircle = ({ value, className, ...restSvgProps }) => {
10682
10952
  "aria-valuemax": 100,
10683
10953
  ...restSvgProps,
10684
10954
  children: [
10685
- /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("circle", { ...commonParams, className: "stroke-current/25" }),
10686
- /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
10955
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("circle", { ...commonParams, className: "stroke-current/25" }),
10956
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
10687
10957
  "circle",
10688
10958
  {
10689
10959
  ...commonParams,
@@ -10701,7 +10971,7 @@ var ProgressCircle = ({ value, className, ...restSvgProps }) => {
10701
10971
  };
10702
10972
 
10703
10973
  // src/components/thread/context-usage-indicator.tsx
10704
- var import_jsx_runtime41 = require("react/jsx-runtime");
10974
+ var import_jsx_runtime42 = require("react/jsx-runtime");
10705
10975
  var kNumberFormatter = new Intl.NumberFormat("en-US", {
10706
10976
  minimumFractionDigits: 0,
10707
10977
  maximumFractionDigits: 1
@@ -10734,20 +11004,20 @@ function ContextUsageIndicator({
10734
11004
  }) {
10735
11005
  const { t } = useChatkitTranslation();
10736
11006
  const stream = useStreamContext();
10737
- const [maxContextSize, setMaxContextSize] = React35.useState(null);
10738
- const [usedContextSize, setUsedContextSize] = React35.useState(null);
10739
- const [assistantAgentKey, setAssistantAgentKey] = React35.useState(null);
10740
- const latestRealtimeUsageRef = React35.useRef({
11007
+ const [maxContextSize, setMaxContextSize] = React36.useState(null);
11008
+ const [usedContextSize, setUsedContextSize] = React36.useState(null);
11009
+ const [assistantAgentKey, setAssistantAgentKey] = React36.useState(null);
11010
+ const latestRealtimeUsageRef = React36.useRef({
10741
11011
  threadId: null,
10742
11012
  agentKey: null,
10743
11013
  usedTokens: null
10744
11014
  });
10745
- const realtimeUsage = React35.useMemo(
11015
+ const realtimeUsage = React36.useMemo(
10746
11016
  () => getThreadContextUsage(stream.contextUsageByAgentKey, assistantAgentKey),
10747
11017
  [assistantAgentKey, stream.contextUsageByAgentKey]
10748
11018
  );
10749
11019
  const realtimeUsedContextSize = getThreadContextUsageTotalTokens(realtimeUsage);
10750
- React35.useEffect(() => {
11020
+ React36.useEffect(() => {
10751
11021
  if (!stream.client || !stream.assistantId) {
10752
11022
  setMaxContextSize(null);
10753
11023
  setAssistantAgentKey(null);
@@ -10767,18 +11037,18 @@ function ContextUsageIndicator({
10767
11037
  cancelled = true;
10768
11038
  };
10769
11039
  }, [stream.client, stream.assistantId]);
10770
- React35.useEffect(() => {
11040
+ React36.useEffect(() => {
10771
11041
  latestRealtimeUsageRef.current = {
10772
11042
  threadId: stream.threadId ?? null,
10773
11043
  agentKey: assistantAgentKey,
10774
11044
  usedTokens: realtimeUsedContextSize
10775
11045
  };
10776
11046
  }, [assistantAgentKey, realtimeUsedContextSize, stream.threadId]);
10777
- React35.useEffect(() => {
11047
+ React36.useEffect(() => {
10778
11048
  if (realtimeUsedContextSize == null) return;
10779
11049
  setUsedContextSize(realtimeUsedContextSize);
10780
11050
  }, [realtimeUsedContextSize]);
10781
- React35.useEffect(() => {
11051
+ React36.useEffect(() => {
10782
11052
  if (!stream.client) {
10783
11053
  setUsedContextSize(null);
10784
11054
  return;
@@ -10843,8 +11113,8 @@ function ContextUsageIndicator({
10843
11113
  });
10844
11114
  const usageLabelWithSuffix = usageLabel.endsWith(":") ? usageLabel : `${usageLabel}:`;
10845
11115
  const progressClassName = percent >= 90 ? "text-destructive" : percent >= 75 ? "text-amber-500" : "text-primary dark:text-zinc-300";
10846
- return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(Tooltip, { children: [
10847
- /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
11116
+ return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(Tooltip, { children: [
11117
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
10848
11118
  "button",
10849
11119
  {
10850
11120
  type: "button",
@@ -10853,31 +11123,31 @@ function ContextUsageIndicator({
10853
11123
  className
10854
11124
  ),
10855
11125
  "aria-label": `${usageLabelWithSuffix} ${usageFullLabel}. ${usageTokensLabel}`,
10856
- children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(ProgressCircle, { value: percent, className: cn("size-3.5", progressClassName) })
11126
+ children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(ProgressCircle, { value: percent, className: cn("size-3.5", progressClassName) })
10857
11127
  }
10858
11128
  ) }),
10859
- /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(TooltipContent, { side: "top", sideOffset: 6, className: "space-y-0.5 px-3 py-2 text-center", children: [
10860
- /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { className: "text-primary-foreground/70", children: usageLabelWithSuffix }),
10861
- /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { className: "font-medium text-primary-foreground/80", children: usageFullLabel }),
10862
- /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { className: "text-sm font-semibold", children: usageTokensLabel })
11129
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(TooltipContent, { side: "top", sideOffset: 6, className: "space-y-0.5 px-3 py-2 text-center", children: [
11130
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { className: "text-primary-foreground/70", children: usageLabelWithSuffix }),
11131
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { className: "font-medium text-primary-foreground/80", children: usageFullLabel }),
11132
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { className: "text-sm font-semibold", children: usageTokensLabel })
10863
11133
  ] })
10864
11134
  ] });
10865
11135
  }
10866
11136
 
10867
11137
  // src/components/pet/PetBridge.tsx
10868
- var React36 = __toESM(require("react"), 1);
11138
+ var React37 = __toESM(require("react"), 1);
10869
11139
  var import_chatkit_types7 = require("@xpert-ai/chatkit-types");
10870
11140
  function PetBridge({ pet, state }) {
10871
11141
  const parentMessenger = useParentMessenger();
10872
11142
  const sendEvent = parentMessenger?.sendEvent;
10873
- const options = React36.useMemo(() => (0, import_chatkit_types7.normalizePetOptions)(pet), [pet]);
10874
- React36.useEffect(() => {
11143
+ const options = React37.useMemo(() => (0, import_chatkit_types7.normalizePetOptions)(pet), [pet]);
11144
+ React37.useEffect(() => {
10875
11145
  if (!sendEvent) {
10876
11146
  return;
10877
11147
  }
10878
11148
  sendEvent("pet_options_change", { pet: pet ?? null });
10879
11149
  }, [sendEvent, pet]);
10880
- React36.useEffect(() => {
11150
+ React37.useEffect(() => {
10881
11151
  if (!sendEvent || !options) {
10882
11152
  return;
10883
11153
  }
@@ -10887,15 +11157,15 @@ function PetBridge({ pet, state }) {
10887
11157
  }
10888
11158
 
10889
11159
  // src/components/settings/SettingsSheet.tsx
10890
- var React43 = __toESM(require("react"), 1);
10891
- var import_lucide_react23 = require("lucide-react");
11160
+ var React44 = __toESM(require("react"), 1);
11161
+ var import_lucide_react24 = require("lucide-react");
10892
11162
 
10893
11163
  // src/components/ui/input.tsx
10894
- var React37 = __toESM(require("react"), 1);
10895
- var import_jsx_runtime42 = require("react/jsx-runtime");
10896
- var Input = React37.forwardRef(
11164
+ var React38 = __toESM(require("react"), 1);
11165
+ var import_jsx_runtime43 = require("react/jsx-runtime");
11166
+ var Input = React38.forwardRef(
10897
11167
  ({ className, type, ...props }, ref) => {
10898
- return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
11168
+ return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
10899
11169
  "input",
10900
11170
  {
10901
11171
  ref,
@@ -10912,20 +11182,20 @@ var Input = React37.forwardRef(
10912
11182
  Input.displayName = "Input";
10913
11183
 
10914
11184
  // src/components/ui/select.tsx
10915
- var React38 = require("react");
11185
+ var React39 = require("react");
10916
11186
  var import_radix_ui2 = require("radix-ui");
10917
- var import_lucide_react22 = require("lucide-react");
10918
- var import_jsx_runtime43 = require("react/jsx-runtime");
11187
+ var import_lucide_react23 = require("lucide-react");
11188
+ var import_jsx_runtime44 = require("react/jsx-runtime");
10919
11189
  function Select({
10920
11190
  ...props
10921
11191
  }) {
10922
- return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_radix_ui2.Select.Root, { "data-slot": "select", ...props });
11192
+ return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_radix_ui2.Select.Root, { "data-slot": "select", ...props });
10923
11193
  }
10924
11194
  function SelectGroup({
10925
11195
  className,
10926
11196
  ...props
10927
11197
  }) {
10928
- return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
11198
+ return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
10929
11199
  import_radix_ui2.Select.Group,
10930
11200
  {
10931
11201
  "data-slot": "select-group",
@@ -10937,7 +11207,7 @@ function SelectGroup({
10937
11207
  function SelectValue({
10938
11208
  ...props
10939
11209
  }) {
10940
- return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_radix_ui2.Select.Value, { "data-slot": "select-value", ...props });
11210
+ return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_radix_ui2.Select.Value, { "data-slot": "select-value", ...props });
10941
11211
  }
10942
11212
  function SelectTrigger({
10943
11213
  className,
@@ -10945,7 +11215,7 @@ function SelectTrigger({
10945
11215
  children,
10946
11216
  ...props
10947
11217
  }) {
10948
- return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
11218
+ return /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(
10949
11219
  import_radix_ui2.Select.Trigger,
10950
11220
  {
10951
11221
  "data-slot": "select-trigger",
@@ -10957,7 +11227,7 @@ function SelectTrigger({
10957
11227
  ...props,
10958
11228
  children: [
10959
11229
  children,
10960
- /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_radix_ui2.Select.Icon, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_lucide_react22.ChevronDownIcon, { className: "pointer-events-none size-4 text-muted-foreground" }) })
11230
+ /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_radix_ui2.Select.Icon, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_lucide_react23.ChevronDownIcon, { className: "pointer-events-none size-4 text-muted-foreground" }) })
10961
11231
  ]
10962
11232
  }
10963
11233
  );
@@ -10969,7 +11239,7 @@ function SelectContent({
10969
11239
  align = "center",
10970
11240
  ...props
10971
11241
  }) {
10972
- return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_radix_ui2.Select.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
11242
+ return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_radix_ui2.Select.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(
10973
11243
  import_radix_ui2.Select.Content,
10974
11244
  {
10975
11245
  "data-slot": "select-content",
@@ -10979,8 +11249,8 @@ function SelectContent({
10979
11249
  align,
10980
11250
  ...props,
10981
11251
  children: [
10982
- /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(SelectScrollUpButton, {}),
10983
- /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
11252
+ /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(SelectScrollUpButton, {}),
11253
+ /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
10984
11254
  import_radix_ui2.Select.Viewport,
10985
11255
  {
10986
11256
  "data-position": position,
@@ -10991,7 +11261,7 @@ function SelectContent({
10991
11261
  children
10992
11262
  }
10993
11263
  ),
10994
- /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(SelectScrollDownButton, {})
11264
+ /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(SelectScrollDownButton, {})
10995
11265
  ]
10996
11266
  }
10997
11267
  ) });
@@ -11001,7 +11271,7 @@ function SelectItem({
11001
11271
  children,
11002
11272
  ...props
11003
11273
  }) {
11004
- return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
11274
+ return /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(
11005
11275
  import_radix_ui2.Select.Item,
11006
11276
  {
11007
11277
  "data-slot": "select-item",
@@ -11011,8 +11281,8 @@ function SelectItem({
11011
11281
  ),
11012
11282
  ...props,
11013
11283
  children: [
11014
- /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("span", { className: "pointer-events-none absolute right-2 flex size-4 items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_radix_ui2.Select.ItemIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_lucide_react22.CheckIcon, { className: "pointer-events-none" }) }) }),
11015
- /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_radix_ui2.Select.ItemText, { children })
11284
+ /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("span", { className: "pointer-events-none absolute right-2 flex size-4 items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_radix_ui2.Select.ItemIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_lucide_react23.CheckIcon, { className: "pointer-events-none" }) }) }),
11285
+ /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_radix_ui2.Select.ItemText, { children })
11016
11286
  ]
11017
11287
  }
11018
11288
  );
@@ -11021,7 +11291,7 @@ function SelectScrollUpButton({
11021
11291
  className,
11022
11292
  ...props
11023
11293
  }) {
11024
- return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
11294
+ return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
11025
11295
  import_radix_ui2.Select.ScrollUpButton,
11026
11296
  {
11027
11297
  "data-slot": "select-scroll-up-button",
@@ -11030,8 +11300,8 @@ function SelectScrollUpButton({
11030
11300
  className
11031
11301
  ),
11032
11302
  ...props,
11033
- children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
11034
- import_lucide_react22.ChevronUpIcon,
11303
+ children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
11304
+ import_lucide_react23.ChevronUpIcon,
11035
11305
  {}
11036
11306
  )
11037
11307
  }
@@ -11041,7 +11311,7 @@ function SelectScrollDownButton({
11041
11311
  className,
11042
11312
  ...props
11043
11313
  }) {
11044
- return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
11314
+ return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
11045
11315
  import_radix_ui2.Select.ScrollDownButton,
11046
11316
  {
11047
11317
  "data-slot": "select-scroll-down-button",
@@ -11050,8 +11320,8 @@ function SelectScrollDownButton({
11050
11320
  className
11051
11321
  ),
11052
11322
  ...props,
11053
- children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
11054
- import_lucide_react22.ChevronDownIcon,
11323
+ children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
11324
+ import_lucide_react23.ChevronDownIcon,
11055
11325
  {}
11056
11326
  )
11057
11327
  }
@@ -11059,9 +11329,9 @@ function SelectScrollDownButton({
11059
11329
  }
11060
11330
 
11061
11331
  // src/components/ui/slider.tsx
11062
- var React39 = __toESM(require("react"), 1);
11332
+ var React40 = __toESM(require("react"), 1);
11063
11333
  var import_radix_ui3 = require("radix-ui");
11064
- var import_jsx_runtime44 = require("react/jsx-runtime");
11334
+ var import_jsx_runtime45 = require("react/jsx-runtime");
11065
11335
  function Slider({
11066
11336
  className,
11067
11337
  defaultValue,
@@ -11070,11 +11340,11 @@ function Slider({
11070
11340
  max = 100,
11071
11341
  ...props
11072
11342
  }) {
11073
- const _values = React39.useMemo(
11343
+ const _values = React40.useMemo(
11074
11344
  () => Array.isArray(value) ? value : Array.isArray(defaultValue) ? defaultValue : [min, max],
11075
11345
  [value, defaultValue, min, max]
11076
11346
  );
11077
- return /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(
11347
+ return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
11078
11348
  import_radix_ui3.Slider.Root,
11079
11349
  {
11080
11350
  "data-slot": "slider",
@@ -11088,12 +11358,12 @@ function Slider({
11088
11358
  ),
11089
11359
  ...props,
11090
11360
  children: [
11091
- /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
11361
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
11092
11362
  import_radix_ui3.Slider.Track,
11093
11363
  {
11094
11364
  "data-slot": "slider-track",
11095
11365
  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",
11096
- children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
11366
+ children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
11097
11367
  import_radix_ui3.Slider.Range,
11098
11368
  {
11099
11369
  "data-slot": "slider-range",
@@ -11102,7 +11372,7 @@ function Slider({
11102
11372
  )
11103
11373
  }
11104
11374
  ),
11105
- Array.from({ length: _values.length }, (_, index) => /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
11375
+ Array.from({ length: _values.length }, (_, index) => /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
11106
11376
  import_radix_ui3.Slider.Thumb,
11107
11377
  {
11108
11378
  "data-slot": "slider-thumb",
@@ -11116,15 +11386,15 @@ function Slider({
11116
11386
  }
11117
11387
 
11118
11388
  // src/components/ui/toggle-group.tsx
11119
- var React41 = __toESM(require("react"), 1);
11389
+ var React42 = __toESM(require("react"), 1);
11120
11390
  var import_class_variance_authority3 = require("class-variance-authority");
11121
11391
  var import_radix_ui5 = require("radix-ui");
11122
11392
 
11123
11393
  // src/components/ui/toggle.tsx
11124
- var React40 = require("react");
11394
+ var React41 = require("react");
11125
11395
  var import_class_variance_authority2 = require("class-variance-authority");
11126
11396
  var import_radix_ui4 = require("radix-ui");
11127
- var import_jsx_runtime45 = require("react/jsx-runtime");
11397
+ var import_jsx_runtime46 = require("react/jsx-runtime");
11128
11398
  var toggleVariants = (0, import_class_variance_authority2.cva)(
11129
11399
  "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",
11130
11400
  {
@@ -11147,8 +11417,8 @@ var toggleVariants = (0, import_class_variance_authority2.cva)(
11147
11417
  );
11148
11418
 
11149
11419
  // src/components/ui/toggle-group.tsx
11150
- var import_jsx_runtime46 = require("react/jsx-runtime");
11151
- var ToggleGroupContext = React41.createContext({
11420
+ var import_jsx_runtime47 = require("react/jsx-runtime");
11421
+ var ToggleGroupContext = React42.createContext({
11152
11422
  size: "default",
11153
11423
  variant: "default",
11154
11424
  spacing: 0,
@@ -11163,7 +11433,7 @@ function ToggleGroup({
11163
11433
  children,
11164
11434
  ...props
11165
11435
  }) {
11166
- return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
11436
+ return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
11167
11437
  import_radix_ui5.ToggleGroup.Root,
11168
11438
  {
11169
11439
  "data-slot": "toggle-group",
@@ -11177,7 +11447,7 @@ function ToggleGroup({
11177
11447
  className
11178
11448
  ),
11179
11449
  ...props,
11180
- children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
11450
+ children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
11181
11451
  ToggleGroupContext.Provider,
11182
11452
  {
11183
11453
  value: { variant, size: size2, spacing, orientation },
@@ -11194,8 +11464,8 @@ function ToggleGroupItem({
11194
11464
  size: size2 = "default",
11195
11465
  ...props
11196
11466
  }) {
11197
- const context = React41.useContext(ToggleGroupContext);
11198
- return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
11467
+ const context = React42.useContext(ToggleGroupContext);
11468
+ return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
11199
11469
  import_radix_ui5.ToggleGroup.Item,
11200
11470
  {
11201
11471
  "data-slot": "toggle-group-item",
@@ -11425,13 +11695,13 @@ function isPetEnabled(pet) {
11425
11695
  }
11426
11696
 
11427
11697
  // src/components/pet/PetPreview.tsx
11428
- var React42 = require("react");
11698
+ var React43 = require("react");
11429
11699
 
11430
11700
  // src/components/pet/petSpriteAtlas.ts
11431
11701
  var import_chatkit_types9 = require("@xpert-ai/chatkit-types");
11432
11702
 
11433
11703
  // src/components/pet/PetPreview.tsx
11434
- var import_jsx_runtime47 = require("react/jsx-runtime");
11704
+ var import_jsx_runtime48 = require("react/jsx-runtime");
11435
11705
  function escapeCssUrl(value) {
11436
11706
  return value.replace(/["\\]/g, "\\$&");
11437
11707
  }
@@ -11439,7 +11709,7 @@ function PetPreview({ src, label, className }) {
11439
11709
  const scale = 0.13;
11440
11710
  const width = import_chatkit_types9.petSpriteAtlas.cellWidth;
11441
11711
  const height = import_chatkit_types9.petSpriteAtlas.cellHeight;
11442
- return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
11712
+ return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
11443
11713
  "span",
11444
11714
  {
11445
11715
  className: cn(
@@ -11448,7 +11718,7 @@ function PetPreview({ src, label, className }) {
11448
11718
  ),
11449
11719
  "aria-hidden": "true",
11450
11720
  title: label,
11451
- children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
11721
+ children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
11452
11722
  "span",
11453
11723
  {
11454
11724
  className: "absolute left-1/2 top-1/2 block",
@@ -11470,7 +11740,7 @@ function PetPreview({ src, label, className }) {
11470
11740
  }
11471
11741
 
11472
11742
  // src/components/settings/SettingsSheet.tsx
11473
- var import_jsx_runtime48 = require("react/jsx-runtime");
11743
+ var import_jsx_runtime49 = require("react/jsx-runtime");
11474
11744
  var CHARACTER_TYPES2 = [
11475
11745
  "builtin",
11476
11746
  "atlas"
@@ -11486,13 +11756,13 @@ function SettingsSheet({
11486
11756
  onSave
11487
11757
  }) {
11488
11758
  const { t } = useChatkitTranslation();
11489
- const [draft, setDraft] = React43.useState(settings);
11490
- React43.useEffect(() => {
11759
+ const [draft, setDraft] = React44.useState(settings);
11760
+ React44.useEffect(() => {
11491
11761
  if (open) {
11492
11762
  setDraft(petRequired ? { ...settings, enabled: true } : settings);
11493
11763
  }
11494
11764
  }, [open, petRequired, settings]);
11495
- const updateDraft = React43.useCallback(
11765
+ const updateDraft = React44.useCallback(
11496
11766
  (patch) => {
11497
11767
  setDraft((previous) => ({ ...previous, ...patch }));
11498
11768
  },
@@ -11510,23 +11780,23 @@ function SettingsSheet({
11510
11780
  defaultValue: selectedBuiltinPet.label
11511
11781
  }
11512
11782
  );
11513
- return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(Sheet, { open, onOpenChange, children: /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(SheetContent, { side: "right", className: "w-[min(92vw,26rem)] overflow-y-auto", children: [
11514
- /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(SheetHeader, { children: /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "flex items-center gap-2", children: [
11515
- /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("span", { className: "flex h-8 w-8 items-center justify-center rounded-md bg-primary/10 text-primary", children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_lucide_react23.Settings, { size: 16 }) }),
11516
- /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(SheetTitle, { children: t("settings.title") })
11783
+ return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Sheet, { open, onOpenChange, children: /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(SheetContent, { side: "right", className: "w-[min(92vw,26rem)] overflow-y-auto", children: [
11784
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(SheetHeader, { children: /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "flex items-center gap-2", children: [
11785
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("span", { className: "flex h-8 w-8 items-center justify-center rounded-md bg-primary/10 text-primary", children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_lucide_react24.Settings, { size: 16 }) }),
11786
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(SheetTitle, { children: t("settings.title") })
11517
11787
  ] }) }),
11518
- /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("form", { className: "mt-6 space-y-5", onSubmit: handleSubmit, children: [
11519
- /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("section", { className: "space-y-5", children: [
11520
- /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "flex items-center gap-2", children: [
11521
- /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("span", { className: "flex h-7 w-7 items-center justify-center rounded-md bg-muted text-muted-foreground", children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_lucide_react23.PawPrint, { size: 15 }) }),
11522
- /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("h3", { className: "text-sm font-semibold", children: t("pet.settings.title") })
11788
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("form", { className: "mt-6 space-y-5", onSubmit: handleSubmit, children: [
11789
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("section", { className: "space-y-5", children: [
11790
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "flex items-center gap-2", children: [
11791
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("span", { className: "flex h-7 w-7 items-center justify-center rounded-md bg-muted text-muted-foreground", children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_lucide_react24.PawPrint, { size: 15 }) }),
11792
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("h3", { className: "text-sm font-semibold", children: t("pet.settings.title") })
11523
11793
  ] }),
11524
- /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("label", { className: "flex items-center justify-between gap-4 rounded-md border border-border px-3 py-2", children: [
11525
- /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("span", { className: "min-w-0", children: [
11526
- /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("span", { className: "block text-sm font-medium", children: t("pet.settings.enabled") }),
11527
- petRequired && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("span", { className: "mt-0.5 block text-xs text-muted-foreground", children: t("pet.settings.requiredHint") })
11794
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("label", { className: "flex items-center justify-between gap-4 rounded-md border border-border px-3 py-2", children: [
11795
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("span", { className: "min-w-0", children: [
11796
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("span", { className: "block text-sm font-medium", children: t("pet.settings.enabled") }),
11797
+ petRequired && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("span", { className: "mt-0.5 block text-xs text-muted-foreground", children: t("pet.settings.requiredHint") })
11528
11798
  ] }),
11529
- /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
11799
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
11530
11800
  "button",
11531
11801
  {
11532
11802
  type: "button",
@@ -11539,7 +11809,7 @@ function SettingsSheet({
11539
11809
  draft.enabled ? "bg-primary" : "bg-muted-foreground/20",
11540
11810
  petRequired ? "cursor-not-allowed opacity-70" : ""
11541
11811
  ].join(" "),
11542
- children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
11812
+ children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
11543
11813
  "span",
11544
11814
  {
11545
11815
  className: [
@@ -11552,9 +11822,9 @@ function SettingsSheet({
11552
11822
  )
11553
11823
  ] })
11554
11824
  ] }),
11555
- /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "space-y-2", children: [
11556
- /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("span", { id: "chatkit-pet-type-label", className: "text-sm font-medium", children: t("pet.settings.characterType") }),
11557
- /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
11825
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "space-y-2", children: [
11826
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("span", { id: "chatkit-pet-type-label", className: "text-sm font-medium", children: t("pet.settings.characterType") }),
11827
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
11558
11828
  ToggleGroup,
11559
11829
  {
11560
11830
  id: "chatkit-pet-type",
@@ -11569,7 +11839,7 @@ function SettingsSheet({
11569
11839
  variant: "outline",
11570
11840
  spacing: 2,
11571
11841
  className: "!w-full",
11572
- children: CHARACTER_TYPES2.map((type) => /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
11842
+ children: CHARACTER_TYPES2.map((type) => /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
11573
11843
  ToggleGroupItem,
11574
11844
  {
11575
11845
  value: type,
@@ -11581,8 +11851,8 @@ function SettingsSheet({
11581
11851
  }
11582
11852
  )
11583
11853
  ] }),
11584
- draft.characterType === "builtin" && /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "space-y-2", children: [
11585
- /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
11854
+ draft.characterType === "builtin" && /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "space-y-2", children: [
11855
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
11586
11856
  "label",
11587
11857
  {
11588
11858
  htmlFor: "chatkit-pet-builtin",
@@ -11590,7 +11860,7 @@ function SettingsSheet({
11590
11860
  children: t("pet.settings.builtin")
11591
11861
  }
11592
11862
  ),
11593
- /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(
11863
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
11594
11864
  Select,
11595
11865
  {
11596
11866
  value: selectedBuiltinPet.id,
@@ -11601,26 +11871,26 @@ function SettingsSheet({
11601
11871
  }
11602
11872
  },
11603
11873
  children: [
11604
- /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
11874
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
11605
11875
  SelectTrigger,
11606
11876
  {
11607
11877
  id: "chatkit-pet-builtin",
11608
11878
  className: "min-h-12 w-full px-3 py-2",
11609
- children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(SelectValue, { placeholder: selectedBuiltinPetLabel })
11879
+ children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(SelectValue, { placeholder: selectedBuiltinPetLabel })
11610
11880
  }
11611
11881
  ),
11612
- /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(SelectContent, { className: "w-[var(--radix-select-trigger-width)]", children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(SelectGroup, { children: INCLUDED_PET_OPTIONS.map((pet) => {
11882
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(SelectContent, { className: "w-[var(--radix-select-trigger-width)]", children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(SelectGroup, { children: INCLUDED_PET_OPTIONS.map((pet) => {
11613
11883
  const label = t(`pet.settings.builtins.${pet.id}`, {
11614
11884
  defaultValue: pet.label
11615
11885
  });
11616
- return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
11886
+ return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
11617
11887
  SelectItem,
11618
11888
  {
11619
11889
  value: pet.id,
11620
11890
  className: "min-h-10 py-1.5 pl-2 pr-8",
11621
- children: /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("span", { className: "flex min-w-0 items-center gap-2", children: [
11622
- /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(PetPreview, { src: pet.previewSrc, label }),
11623
- /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("span", { className: "min-w-0 truncate", children: label })
11891
+ children: /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("span", { className: "flex min-w-0 items-center gap-2", children: [
11892
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(PetPreview, { src: pet.previewSrc, label }),
11893
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("span", { className: "min-w-0 truncate", children: label })
11624
11894
  ] })
11625
11895
  },
11626
11896
  pet.id
@@ -11630,8 +11900,8 @@ function SettingsSheet({
11630
11900
  }
11631
11901
  )
11632
11902
  ] }),
11633
- draft.characterType === "atlas" && /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "space-y-2", children: [
11634
- /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
11903
+ draft.characterType === "atlas" && /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "space-y-2", children: [
11904
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
11635
11905
  "label",
11636
11906
  {
11637
11907
  className: "text-sm font-medium",
@@ -11639,7 +11909,7 @@ function SettingsSheet({
11639
11909
  children: t("pet.settings.atlasUrl")
11640
11910
  }
11641
11911
  ),
11642
- /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
11912
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
11643
11913
  Input,
11644
11914
  {
11645
11915
  id: "chatkit-pet-atlas",
@@ -11649,15 +11919,15 @@ function SettingsSheet({
11649
11919
  }
11650
11920
  )
11651
11921
  ] }),
11652
- /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "space-y-2", children: [
11653
- /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "flex items-center justify-between gap-4", children: [
11654
- /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("label", { className: "text-sm font-medium", htmlFor: "chatkit-pet-scale", children: t("pet.settings.scale") }),
11655
- /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("span", { className: "text-xs tabular-nums text-muted-foreground", children: [
11922
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "space-y-2", children: [
11923
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "flex items-center justify-between gap-4", children: [
11924
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("label", { className: "text-sm font-medium", htmlFor: "chatkit-pet-scale", children: t("pet.settings.scale") }),
11925
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("span", { className: "text-xs tabular-nums text-muted-foreground", children: [
11656
11926
  draft.scale.toFixed(2),
11657
11927
  "x"
11658
11928
  ] })
11659
11929
  ] }),
11660
- /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
11930
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
11661
11931
  Slider,
11662
11932
  {
11663
11933
  id: "chatkit-pet-scale",
@@ -11671,8 +11941,8 @@ function SettingsSheet({
11671
11941
  }
11672
11942
  )
11673
11943
  ] }),
11674
- /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("label", { className: "flex items-center gap-2 text-sm", children: [
11675
- /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
11944
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("label", { className: "flex items-center gap-2 text-sm", children: [
11945
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
11676
11946
  "input",
11677
11947
  {
11678
11948
  type: "checkbox",
@@ -11683,8 +11953,8 @@ function SettingsSheet({
11683
11953
  ),
11684
11954
  t("pet.settings.draggable")
11685
11955
  ] }),
11686
- /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("label", { className: "flex items-center gap-2 text-sm", children: [
11687
- /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
11956
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("label", { className: "flex items-center gap-2 text-sm", children: [
11957
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
11688
11958
  "input",
11689
11959
  {
11690
11960
  type: "checkbox",
@@ -11695,8 +11965,8 @@ function SettingsSheet({
11695
11965
  ),
11696
11966
  t("pet.settings.persistPosition")
11697
11967
  ] }),
11698
- /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "flex justify-end gap-2 pt-2", children: [
11699
- /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
11968
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "flex justify-end gap-2 pt-2", children: [
11969
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
11700
11970
  Button,
11701
11971
  {
11702
11972
  type: "button",
@@ -11705,7 +11975,7 @@ function SettingsSheet({
11705
11975
  children: t("pet.settings.cancel")
11706
11976
  }
11707
11977
  ),
11708
- /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(Button, { type: "submit", children: t("pet.settings.save") })
11978
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Button, { type: "submit", children: t("pet.settings.save") })
11709
11979
  ] })
11710
11980
  ] })
11711
11981
  ] }) });
@@ -12211,7 +12481,7 @@ function findDomPointForComposerOffset(root, offset) {
12211
12481
  }
12212
12482
 
12213
12483
  // src/components/chat.tsx
12214
- var import_jsx_runtime49 = require("react/jsx-runtime");
12484
+ var import_jsx_runtime50 = require("react/jsx-runtime");
12215
12485
  var import_meta2 = {};
12216
12486
  var defaultApiUrl2 = import_meta2.env.VITE_XPERTAI_API_URL;
12217
12487
  var COMPOSER_INPUT_MAX_HEIGHT = 128;
@@ -12344,8 +12614,8 @@ function ReferenceChip({
12344
12614
  }) {
12345
12615
  const metaLine = getReferenceMetaLine(reference);
12346
12616
  const isComposer = variant === "composer";
12347
- const Icon = reference.type === "quote" ? import_lucide_react24.Quote : reference.type === "image" ? import_lucide_react24.ImageIcon : import_lucide_react24.FileText;
12348
- return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
12617
+ const Icon = reference.type === "quote" ? import_lucide_react25.Quote : reference.type === "image" ? import_lucide_react25.ImageIcon : import_lucide_react25.FileText;
12618
+ return /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(
12349
12619
  "div",
12350
12620
  {
12351
12621
  className: cn(
@@ -12354,7 +12624,7 @@ function ReferenceChip({
12354
12624
  ),
12355
12625
  title: getReferenceTitle(reference),
12356
12626
  children: [
12357
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
12627
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
12358
12628
  Icon,
12359
12629
  {
12360
12630
  size: isComposer ? 14 : 12,
@@ -12364,8 +12634,8 @@ function ReferenceChip({
12364
12634
  )
12365
12635
  }
12366
12636
  ),
12367
- /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "min-w-0 flex-1", children: [
12368
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
12637
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { className: "min-w-0 flex-1", children: [
12638
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
12369
12639
  "div",
12370
12640
  {
12371
12641
  className: cn(
@@ -12375,7 +12645,7 @@ function ReferenceChip({
12375
12645
  children: getReferenceLabel(reference)
12376
12646
  }
12377
12647
  ),
12378
- metaLine && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
12648
+ metaLine && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
12379
12649
  "div",
12380
12650
  {
12381
12651
  className: cn(
@@ -12386,7 +12656,7 @@ function ReferenceChip({
12386
12656
  }
12387
12657
  )
12388
12658
  ] }),
12389
- onRemove && removeLabel && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
12659
+ onRemove && removeLabel && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
12390
12660
  "button",
12391
12661
  {
12392
12662
  type: "button",
@@ -12397,7 +12667,7 @@ function ReferenceChip({
12397
12667
  ),
12398
12668
  title: removeLabel,
12399
12669
  "aria-label": removeLabel,
12400
- children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_lucide_react24.X, { size: 12 })
12670
+ children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_lucide_react25.X, { size: 12 })
12401
12671
  }
12402
12672
  )
12403
12673
  ]
@@ -12421,20 +12691,20 @@ function Chat({
12421
12691
  const { setStream } = useStreamManager();
12422
12692
  const stream = useStreamContext();
12423
12693
  const { theme } = useTheme();
12424
- const [isHistoryLoading, setIsHistoryLoading] = React44.useState(false);
12425
- const [historyError, setHistoryError] = React44.useState(null);
12426
- const [assistantName, setAssistantName] = React44.useState(null);
12427
- const [assistantAvatar, setAssistantAvatar] = React44.useState(null);
12694
+ const [isHistoryLoading, setIsHistoryLoading] = React45.useState(false);
12695
+ const [historyError, setHistoryError] = React45.useState(null);
12696
+ const [assistantName, setAssistantName] = React45.useState(null);
12697
+ const [assistantAvatar, setAssistantAvatar] = React45.useState(null);
12428
12698
  const LOADING_DOTS_MIN_DURATION = 800;
12429
12699
  const STREAMING_STATUS_REFRESH_MS = 250;
12430
- const [showLoadingDots, setShowLoadingDots] = React44.useState(false);
12431
- const [streamingNow, setStreamingNow] = React44.useState(() => Date.now());
12432
- const loadingStartTimeRef = React44.useRef(null);
12433
- const lastStreamOutputAtRef = React44.useRef(null);
12434
- React44.useEffect(() => {
12700
+ const [showLoadingDots, setShowLoadingDots] = React45.useState(false);
12701
+ const [streamingNow, setStreamingNow] = React45.useState(() => Date.now());
12702
+ const loadingStartTimeRef = React45.useRef(null);
12703
+ const lastStreamOutputAtRef = React45.useRef(null);
12704
+ React45.useEffect(() => {
12435
12705
  setStream(stream);
12436
12706
  }, [setStream, stream]);
12437
- React44.useEffect(() => {
12707
+ React45.useEffect(() => {
12438
12708
  if (stream.isLoading) {
12439
12709
  if (!loadingStartTimeRef.current) {
12440
12710
  loadingStartTimeRef.current = Date.now();
@@ -12457,7 +12727,7 @@ function Chat({
12457
12727
  }
12458
12728
  }
12459
12729
  }, [stream.isLoading]);
12460
- React44.useEffect(() => {
12730
+ React45.useEffect(() => {
12461
12731
  if (!stream.isLoading) {
12462
12732
  lastStreamOutputAtRef.current = null;
12463
12733
  setStreamingNow(Date.now());
@@ -12467,7 +12737,7 @@ function Chat({
12467
12737
  lastStreamOutputAtRef.current = now;
12468
12738
  setStreamingNow(now);
12469
12739
  }, [stream.messages, stream.isLoading]);
12470
- React44.useEffect(() => {
12740
+ React45.useEffect(() => {
12471
12741
  if (!stream.isLoading) {
12472
12742
  return;
12473
12743
  }
@@ -12476,74 +12746,74 @@ function Chat({
12476
12746
  }, STREAMING_STATUS_REFRESH_MS);
12477
12747
  return () => window.clearInterval(timer);
12478
12748
  }, [stream.isLoading]);
12479
- const [composerParts, setComposerParts] = React44.useState([]);
12480
- const [renderedComposerParts, setRenderedComposerParts] = React44.useState([]);
12481
- const [composerDomVersion, setComposerDomVersion] = React44.useState(0);
12482
- const [selectedTool, setSelectedTool] = React44.useState(
12749
+ const [composerParts, setComposerParts] = React45.useState([]);
12750
+ const [renderedComposerParts, setRenderedComposerParts] = React45.useState([]);
12751
+ const [composerDomVersion, setComposerDomVersion] = React45.useState(0);
12752
+ const [selectedTool, setSelectedTool] = React45.useState(
12483
12753
  null
12484
12754
  );
12485
- const [planModeEnabled, setPlanModeEnabled] = React44.useState(false);
12486
- const [petSettingsOpen, setPetSettingsOpen] = React44.useState(false);
12487
- const [petLocalSettings, setPetLocalSettings] = React44.useState(() => readPetLocalSettings());
12488
- const [runtimeCapabilities, setRuntimeCapabilities] = React44.useState(null);
12489
- const [runtimeCapabilitiesReady, setRuntimeCapabilitiesReady] = React44.useState(false);
12490
- const [sessionRuntimeCapabilities, setSessionRuntimeCapabilities] = React44.useState(
12755
+ const [planModeEnabled, setPlanModeEnabled] = React45.useState(false);
12756
+ const [petSettingsOpen, setPetSettingsOpen] = React45.useState(false);
12757
+ const [petLocalSettings, setPetLocalSettings] = React45.useState(() => readPetLocalSettings());
12758
+ const [runtimeCapabilities, setRuntimeCapabilities] = React45.useState(null);
12759
+ const [runtimeCapabilitiesReady, setRuntimeCapabilitiesReady] = React45.useState(false);
12760
+ const [sessionRuntimeCapabilities, setSessionRuntimeCapabilities] = React45.useState(
12491
12761
  () => createEmptyRuntimeCapabilitiesSelection()
12492
12762
  );
12493
- const [runRuntimeCapabilities, setRunRuntimeCapabilities] = React44.useState(
12763
+ const [runRuntimeCapabilities, setRunRuntimeCapabilities] = React45.useState(
12494
12764
  () => createEmptyRuntimeCapabilitiesSelection()
12495
12765
  );
12496
- const [runtimeCapabilityPalette, setRuntimeCapabilityPalette] = React44.useState(null);
12497
- const [attachments, setAttachments] = React44.useState([]);
12498
- const [references, setReferences] = React44.useState([]);
12499
- const [isUploadingReferenceImages, setIsUploadingReferenceImages] = React44.useState(false);
12500
- const [quoteSelection, setQuoteSelection] = React44.useState(null);
12501
- const [isAtBottom, setIsAtBottom] = React44.useState(true);
12502
- const [hasUpdatesBelow, setHasUpdatesBelow] = React44.useState(false);
12766
+ const [runtimeCapabilityPalette, setRuntimeCapabilityPalette] = React45.useState(null);
12767
+ const [attachments, setAttachments] = React45.useState([]);
12768
+ const [references, setReferences] = React45.useState([]);
12769
+ const [isUploadingReferenceImages, setIsUploadingReferenceImages] = React45.useState(false);
12770
+ const [quoteSelection, setQuoteSelection] = React45.useState(null);
12771
+ const [isAtBottom, setIsAtBottom] = React45.useState(true);
12772
+ const [hasUpdatesBelow, setHasUpdatesBelow] = React45.useState(false);
12503
12773
  const {
12504
12774
  threads,
12505
12775
  deleteThread,
12506
12776
  refreshThreads,
12507
12777
  isLoading: isThreadsLoading
12508
12778
  } = useThreads();
12509
- const viewportRef = React44.useRef(null);
12510
- const fileInputRef = React44.useRef(null);
12511
- const composerInputRef = React44.useRef(null);
12512
- const slashPaletteRef = React44.useRef(null);
12513
- const slashPaletteOptionRefs = React44.useRef(
12779
+ const viewportRef = React45.useRef(null);
12780
+ const fileInputRef = React45.useRef(null);
12781
+ const composerInputRef = React45.useRef(null);
12782
+ const slashPaletteRef = React45.useRef(null);
12783
+ const slashPaletteOptionRefs = React45.useRef(
12514
12784
  []
12515
12785
  );
12516
- const composerPartsRef = React44.useRef([]);
12517
- const pendingComposerCaretOffsetRef = React44.useRef(null);
12518
- const shouldAutoScrollRef = React44.useRef(true);
12519
- const forceFollowRef = React44.useRef(false);
12520
- const previousMessageCountRef = React44.useRef(0);
12521
- const previousScrollTopRef = React44.useRef(0);
12522
- const autoScrollFrameRef = React44.useRef(null);
12523
- const isPointerDownRef = React44.useRef(false);
12524
- const lastTouchYRef = React44.useRef(null);
12525
- const runtimeCapabilityPreferenceLoadRef = React44.useRef(0);
12786
+ const composerPartsRef = React45.useRef([]);
12787
+ const pendingComposerCaretOffsetRef = React45.useRef(null);
12788
+ const shouldAutoScrollRef = React45.useRef(true);
12789
+ const forceFollowRef = React45.useRef(false);
12790
+ const previousMessageCountRef = React45.useRef(0);
12791
+ const previousScrollTopRef = React45.useRef(0);
12792
+ const autoScrollFrameRef = React45.useRef(null);
12793
+ const isPointerDownRef = React45.useRef(false);
12794
+ const lastTouchYRef = React45.useRef(null);
12795
+ const runtimeCapabilityPreferenceLoadRef = React45.useRef(0);
12526
12796
  const resolvedTitle = title ?? t("chat.title");
12527
12797
  const resolvedPlaceholder = placeholder ?? t("chat.placeholder");
12528
12798
  const petRequired = options?.displayMode === "pet";
12529
- const basePetSettings = React44.useMemo(
12799
+ const basePetSettings = React45.useMemo(
12530
12800
  () => derivePetLocalSettings(options?.pet),
12531
12801
  [options?.pet]
12532
12802
  );
12533
- const displayedPetSettings = React44.useMemo(
12803
+ const displayedPetSettings = React45.useMemo(
12534
12804
  () => ({
12535
12805
  ...petLocalSettings ?? basePetSettings,
12536
12806
  ...petRequired ? { enabled: true } : {}
12537
12807
  }),
12538
12808
  [basePetSettings, petLocalSettings, petRequired]
12539
12809
  );
12540
- const effectivePet = React44.useMemo(() => {
12810
+ const effectivePet = React45.useMemo(() => {
12541
12811
  if (petRequired || petLocalSettings) {
12542
12812
  return buildPetOptionsFromLocalSettings(displayedPetSettings);
12543
12813
  }
12544
12814
  return options?.pet ?? null;
12545
12815
  }, [displayedPetSettings, options?.pet, petLocalSettings, petRequired]);
12546
- const savePetLocalSettings = React44.useCallback(
12816
+ const savePetLocalSettings = React45.useCallback(
12547
12817
  (settings) => {
12548
12818
  const nextSettings = petRequired ? { ...settings, enabled: true } : settings;
12549
12819
  setPetLocalSettings(nextSettings);
@@ -12551,7 +12821,7 @@ function Chat({
12551
12821
  },
12552
12822
  [petRequired]
12553
12823
  );
12554
- const handlePetCommand = React44.useCallback(
12824
+ const handlePetCommand = React45.useCallback(
12555
12825
  (mode) => {
12556
12826
  if (mode === "settings") {
12557
12827
  setPetSettingsOpen(true);
@@ -12573,11 +12843,11 @@ function Chat({
12573
12843
  [displayedPetSettings, effectivePet, petRequired, savePetLocalSettings]
12574
12844
  );
12575
12845
  const inputPlaceholder = selectedTool?.placeholderOverride ?? composer?.placeholder ?? resolvedPlaceholder;
12576
- const messages = React44.useMemo(
12846
+ const messages = React45.useMemo(
12577
12847
  () => stream.messages ?? [],
12578
12848
  [stream.messages]
12579
12849
  );
12580
- const draft = React44.useMemo(
12850
+ const draft = React45.useMemo(
12581
12851
  () => getComposerPlainText(composerParts),
12582
12852
  [composerParts]
12583
12853
  );
@@ -12589,7 +12859,7 @@ function Chat({
12589
12859
  isEmpty: isComposerInputEmpty,
12590
12860
  isStacked: isComposerStacked
12591
12861
  });
12592
- const pendingFollowUps = React44.useMemo(
12862
+ const pendingFollowUps = React45.useMemo(
12593
12863
  () => [...stream.pendingFollowUps ?? []].sort(
12594
12864
  (a, b) => a.createdAt - b.createdAt
12595
12865
  ),
@@ -12600,18 +12870,18 @@ function Chat({
12600
12870
  const hasPendingHITLRequest = Boolean(stream.pendingHITLRequest);
12601
12871
  const hasPendingInteractiveRequest = hasPendingRequestUserInput || hasPendingHITLRequest;
12602
12872
  const hasPendingTodos = Boolean(stream.todos?.items.length);
12603
- const runtimeCapabilityOptions = React44.useMemo(
12873
+ const runtimeCapabilityOptions = React45.useMemo(
12604
12874
  () => getRuntimeCapabilityOptions(runtimeCapabilities),
12605
12875
  [runtimeCapabilities]
12606
12876
  );
12607
- const effectiveSessionRuntimeCapabilities = React44.useMemo(
12877
+ const effectiveSessionRuntimeCapabilities = React45.useMemo(
12608
12878
  () => runtimeCapabilitiesReady && runtimeCapabilities ? mergeRuntimeCapabilitiesSelections(
12609
12879
  runtimeCapabilities,
12610
12880
  sessionRuntimeCapabilities
12611
12881
  ) : null,
12612
12882
  [runtimeCapabilities, runtimeCapabilitiesReady, sessionRuntimeCapabilities]
12613
12883
  );
12614
- const runRuntimeCapabilityOptions = React44.useMemo(
12884
+ const runRuntimeCapabilityOptions = React45.useMemo(
12615
12885
  () => runtimeCapabilityOptions.filter(
12616
12886
  (option) => isRuntimeCapabilitySelected(
12617
12887
  runRuntimeCapabilities,
@@ -12621,11 +12891,11 @@ function Chat({
12621
12891
  ),
12622
12892
  [runRuntimeCapabilities, runtimeCapabilityOptions]
12623
12893
  );
12624
- const composerRuntimeCapabilitySelectionKeys = React44.useMemo(
12894
+ const composerRuntimeCapabilitySelectionKeys = React45.useMemo(
12625
12895
  () => getComposerCapabilitySelectionKeys(composerParts),
12626
12896
  [composerParts]
12627
12897
  );
12628
- const detachedRunRuntimeCapabilityOptions = React44.useMemo(
12898
+ const detachedRunRuntimeCapabilityOptions = React45.useMemo(
12629
12899
  () => runRuntimeCapabilityOptions.filter(
12630
12900
  (option) => !composerRuntimeCapabilitySelectionKeys.has(
12631
12901
  getRuntimeCapabilityOptionKey(option)
@@ -12633,7 +12903,7 @@ function Chat({
12633
12903
  ),
12634
12904
  [composerRuntimeCapabilitySelectionKeys, runRuntimeCapabilityOptions]
12635
12905
  );
12636
- const persistSessionRuntimeCapabilities = React44.useCallback(
12906
+ const persistSessionRuntimeCapabilities = React45.useCallback(
12637
12907
  async (threadId, selection) => {
12638
12908
  if (!runtimeCapabilities || !selection) {
12639
12909
  return;
@@ -12658,10 +12928,10 @@ function Chat({
12658
12928
  },
12659
12929
  [runtimeCapabilities, stream.client]
12660
12930
  );
12661
- const clearQuoteSelection = React44.useCallback(() => {
12931
+ const clearQuoteSelection = React45.useCallback(() => {
12662
12932
  setQuoteSelection(null);
12663
12933
  }, []);
12664
- const commitComposerParts = React44.useCallback(
12934
+ const commitComposerParts = React45.useCallback(
12665
12935
  (nextParts, options2) => {
12666
12936
  const normalized = normalizeComposerParts(nextParts);
12667
12937
  const previous = composerPartsRef.current;
@@ -12697,7 +12967,7 @@ function Chat({
12697
12967
  },
12698
12968
  []
12699
12969
  );
12700
- const setComposerText = React44.useCallback(
12970
+ const setComposerText = React45.useCallback(
12701
12971
  (text, caretOffset = text.length) => {
12702
12972
  commitComposerParts(createComposerTextParts(text), {
12703
12973
  caretOffset,
@@ -12707,7 +12977,7 @@ function Chat({
12707
12977
  },
12708
12978
  [commitComposerParts]
12709
12979
  );
12710
- const focusComposerAt = React44.useCallback((position) => {
12980
+ const focusComposerAt = React45.useCallback((position) => {
12711
12981
  const nextPosition = position ?? getComposerEditingLength(composerPartsRef.current);
12712
12982
  pendingComposerCaretOffsetRef.current = nextPosition;
12713
12983
  requestAnimationFrame(() => {
@@ -12719,7 +12989,7 @@ function Chat({
12719
12989
  });
12720
12990
  }, []);
12721
12991
  const parentMessenger = useParentMessenger({
12722
- onSetComposerValue: React44.useCallback(
12992
+ onSetComposerValue: React45.useCallback(
12723
12993
  (payload) => {
12724
12994
  if (!payload) {
12725
12995
  return;
@@ -12742,10 +13012,10 @@ function Chat({
12742
13012
  },
12743
13013
  [composer?.tools, setComposerText]
12744
13014
  ),
12745
- onFocusComposer: React44.useCallback(() => {
13015
+ onFocusComposer: React45.useCallback(() => {
12746
13016
  composerInputRef.current?.focus();
12747
13017
  }, []),
12748
- onSetPetEnabled: React44.useCallback(
13018
+ onSetPetEnabled: React45.useCallback(
12749
13019
  (enabled) => {
12750
13020
  if (petRequired) {
12751
13021
  return;
@@ -12758,7 +13028,11 @@ function Chat({
12758
13028
  [displayedPetSettings, petRequired, savePetLocalSettings]
12759
13029
  )
12760
13030
  });
12761
- const syncQuoteSelection = React44.useCallback(() => {
13031
+ const canMinimizeToPet = parentMessenger?.isParentAvailable === true && isPetEnabled(effectivePet);
13032
+ const handleMinimizeToPet = React45.useCallback(() => {
13033
+ parentMessenger?.sendEvent("chat_minimize_change", { minimized: true });
13034
+ }, [parentMessenger]);
13035
+ const syncQuoteSelection = React45.useCallback(() => {
12762
13036
  if (typeof window === "undefined") {
12763
13037
  clearQuoteSelection();
12764
13038
  return;
@@ -12803,23 +13077,23 @@ function Chat({
12803
13077
  left
12804
13078
  });
12805
13079
  }, [clearQuoteSelection]);
12806
- const cancelPendingAutoScroll = React44.useCallback(() => {
13080
+ const cancelPendingAutoScroll = React45.useCallback(() => {
12807
13081
  if (autoScrollFrameRef.current !== null) {
12808
13082
  cancelAnimationFrame(autoScrollFrameRef.current);
12809
13083
  autoScrollFrameRef.current = null;
12810
13084
  }
12811
13085
  }, []);
12812
- const disableAutoFollow = React44.useCallback(() => {
13086
+ const disableAutoFollow = React45.useCallback(() => {
12813
13087
  forceFollowRef.current = false;
12814
13088
  shouldAutoScrollRef.current = false;
12815
13089
  cancelPendingAutoScroll();
12816
13090
  }, [cancelPendingAutoScroll]);
12817
- const enableAutoFollow = React44.useCallback(() => {
13091
+ const enableAutoFollow = React45.useCallback(() => {
12818
13092
  forceFollowRef.current = true;
12819
13093
  shouldAutoScrollRef.current = true;
12820
13094
  setHasUpdatesBelow(false);
12821
13095
  }, []);
12822
- const scrollToBottom = React44.useCallback(
13096
+ const scrollToBottom = React45.useCallback(
12823
13097
  (smooth = false, force = false) => {
12824
13098
  if (force) {
12825
13099
  enableAutoFollow();
@@ -12846,7 +13120,7 @@ function Chat({
12846
13120
  },
12847
13121
  [cancelPendingAutoScroll, enableAutoFollow]
12848
13122
  );
12849
- React44.useEffect(() => {
13123
+ React45.useEffect(() => {
12850
13124
  const viewport = viewportRef.current;
12851
13125
  if (!viewport) return;
12852
13126
  previousScrollTopRef.current = viewport.scrollTop;
@@ -12927,14 +13201,14 @@ function Chat({
12927
13201
  window.removeEventListener("pointercancel", stopPointerTracking);
12928
13202
  };
12929
13203
  }, [cancelPendingAutoScroll, disableAutoFollow]);
12930
- React44.useEffect(() => {
13204
+ React45.useEffect(() => {
12931
13205
  shouldAutoScrollRef.current = true;
12932
13206
  forceFollowRef.current = false;
12933
13207
  previousScrollTopRef.current = 0;
12934
13208
  setIsAtBottom(true);
12935
13209
  setHasUpdatesBelow(false);
12936
13210
  }, [stream.threadId]);
12937
- React44.useEffect(() => {
13211
+ React45.useEffect(() => {
12938
13212
  const messageCountChanged = messages.length !== previousMessageCountRef.current;
12939
13213
  previousMessageCountRef.current = messages.length;
12940
13214
  if (!shouldAutoScrollRef.current) {
@@ -12953,7 +13227,7 @@ function Chat({
12953
13227
  clientSecret: effectiveClientSecret
12954
13228
  });
12955
13229
  const missingConfig = Boolean(missingConfigKind);
12956
- const missingConfigShortMessage = React44.useMemo(() => {
13230
+ const missingConfigShortMessage = React45.useMemo(() => {
12957
13231
  switch (missingConfigKind) {
12958
13232
  case "apiUrl":
12959
13233
  return t("chat.missingApiUrlShort");
@@ -12965,7 +13239,7 @@ function Chat({
12965
13239
  return t("chat.missingConfigShort");
12966
13240
  }
12967
13241
  }, [missingConfigKind, t]);
12968
- const missingConfigDetailMessage = React44.useMemo(() => {
13242
+ const missingConfigDetailMessage = React45.useMemo(() => {
12969
13243
  switch (missingConfigKind) {
12970
13244
  case "apiUrl":
12971
13245
  return t("chat.missingApiUrlDetail");
@@ -12980,7 +13254,7 @@ function Chat({
12980
13254
  const showMissingConfig = !isClientSecretInitializing && missingConfig;
12981
13255
  const hasUploadingFiles = attachments.some((a) => a.status === "uploading");
12982
13256
  const isSendDisabled = !trimmedDraft && !hasReferences || hasPendingInteractiveRequest || missingConfig || isHistoryLoading || hasUploadingFiles || isUploadingReferenceImages;
12983
- const resizeComposerInput = React44.useCallback(() => {
13257
+ const resizeComposerInput = React45.useCallback(() => {
12984
13258
  const input = composerInputRef.current;
12985
13259
  if (!input) {
12986
13260
  return;
@@ -12988,7 +13262,7 @@ function Chat({
12988
13262
  input.style.maxHeight = `${COMPOSER_INPUT_MAX_HEIGHT}px`;
12989
13263
  input.style.overflowY = input.scrollHeight > COMPOSER_INPUT_MAX_HEIGHT ? "auto" : "hidden";
12990
13264
  }, []);
12991
- React44.useLayoutEffect(() => {
13265
+ React45.useLayoutEffect(() => {
12992
13266
  composerPartsRef.current = composerParts;
12993
13267
  resizeComposerInput();
12994
13268
  const caretOffset = pendingComposerCaretOffsetRef.current;
@@ -13000,13 +13274,13 @@ function Chat({
13000
13274
  }
13001
13275
  }
13002
13276
  }, [composerDomVersion, composerParts, resizeComposerInput]);
13003
- React44.useEffect(() => {
13277
+ React45.useEffect(() => {
13004
13278
  document.addEventListener("selectionchange", syncQuoteSelection);
13005
13279
  return () => {
13006
13280
  document.removeEventListener("selectionchange", syncQuoteSelection);
13007
13281
  };
13008
13282
  }, [syncQuoteSelection]);
13009
- React44.useEffect(() => {
13283
+ React45.useEffect(() => {
13010
13284
  const viewport = viewportRef.current;
13011
13285
  if (!viewport) {
13012
13286
  return;
@@ -13023,14 +13297,14 @@ function Chat({
13023
13297
  window.removeEventListener("resize", handleViewportScroll);
13024
13298
  };
13025
13299
  }, [clearQuoteSelection]);
13026
- React44.useEffect(() => {
13300
+ React45.useEffect(() => {
13027
13301
  clearQuoteSelection();
13028
13302
  }, [messages.length, stream.threadId, clearQuoteSelection]);
13029
- React44.useEffect(() => {
13303
+ React45.useEffect(() => {
13030
13304
  if (missingConfig) return;
13031
13305
  void refreshThreads();
13032
13306
  }, [missingConfig, refreshThreads]);
13033
- React44.useEffect(() => {
13307
+ React45.useEffect(() => {
13034
13308
  if (missingConfig || !stream.client || !stream.assistantId) {
13035
13309
  setAssistantName(null);
13036
13310
  setAssistantAvatar(null);
@@ -13053,7 +13327,7 @@ function Chat({
13053
13327
  cancelled = true;
13054
13328
  };
13055
13329
  }, [missingConfig, stream.client, stream.assistantId]);
13056
- React44.useEffect(() => {
13330
+ React45.useEffect(() => {
13057
13331
  if (missingConfig || !stream.client || !stream.assistantId) {
13058
13332
  setRuntimeCapabilities(null);
13059
13333
  setRuntimeCapabilitiesReady(false);
@@ -13100,7 +13374,7 @@ function Chat({
13100
13374
  });
13101
13375
  return () => controller.abort();
13102
13376
  }, [missingConfig, stream.client, stream.assistantId]);
13103
- React44.useEffect(() => {
13377
+ React45.useEffect(() => {
13104
13378
  setRunRuntimeCapabilities(
13105
13379
  createEmptyRuntimeCapabilitiesSelection(runtimeCapabilities)
13106
13380
  );
@@ -13157,7 +13431,7 @@ function Chat({
13157
13431
  mimetype: a.storageFile?.mimetype ?? a.file.type,
13158
13432
  size: a.storageFile?.size ?? a.file.size
13159
13433
  }));
13160
- const handleSessionRuntimeCapabilityToggle = React44.useCallback(
13434
+ const handleSessionRuntimeCapabilityToggle = React45.useCallback(
13161
13435
  (type, id, selected) => {
13162
13436
  setSessionRuntimeCapabilities((previous) => {
13163
13437
  const nextSelection = toggleRuntimeCapabilitySelection(
@@ -13175,7 +13449,7 @@ function Chat({
13175
13449
  },
13176
13450
  [persistSessionRuntimeCapabilities, stream.threadId]
13177
13451
  );
13178
- const updateRuntimeCapabilityPalette = React44.useCallback(
13452
+ const updateRuntimeCapabilityPalette = React45.useCallback(
13179
13453
  (parts, selectionStart) => {
13180
13454
  const input = composerInputRef.current;
13181
13455
  const editingText = getComposerEditingText(parts);
@@ -13187,7 +13461,7 @@ function Chat({
13187
13461
  },
13188
13462
  []
13189
13463
  );
13190
- const syncComposerInputFromElement = React44.useCallback(
13464
+ const syncComposerInputFromElement = React45.useCallback(
13191
13465
  (input) => {
13192
13466
  const previousCapabilities = getComposerCapabilityPartMap(
13193
13467
  composerPartsRef.current
@@ -13205,25 +13479,25 @@ function Chat({
13205
13479
  },
13206
13480
  [commitComposerParts, updateRuntimeCapabilityPalette]
13207
13481
  );
13208
- const handleComposerInput = React44.useCallback(
13482
+ const handleComposerInput = React45.useCallback(
13209
13483
  (event) => {
13210
13484
  syncComposerInputFromElement(event.currentTarget);
13211
13485
  },
13212
13486
  [syncComposerInputFromElement]
13213
13487
  );
13214
- const handleComposerCompositionEnd = React44.useCallback(
13488
+ const handleComposerCompositionEnd = React45.useCallback(
13215
13489
  (event) => {
13216
13490
  syncComposerInputFromElement(event.currentTarget);
13217
13491
  },
13218
13492
  [syncComposerInputFromElement]
13219
13493
  );
13220
- const handleComposerSelect = React44.useCallback(() => {
13494
+ const handleComposerSelect = React45.useCallback(() => {
13221
13495
  updateRuntimeCapabilityPalette(
13222
13496
  composerPartsRef.current,
13223
13497
  composerInputRef.current ? getComposerSelectionOffset(composerInputRef.current) : void 0
13224
13498
  );
13225
13499
  }, [updateRuntimeCapabilityPalette]);
13226
- const removeRunRuntimeCapability = React44.useCallback(
13500
+ const removeRunRuntimeCapability = React45.useCallback(
13227
13501
  (option) => {
13228
13502
  setRunRuntimeCapabilities(
13229
13503
  (previous) => toggleRuntimeCapabilitySelection(
@@ -13243,7 +13517,7 @@ function Chat({
13243
13517
  },
13244
13518
  [commitComposerParts]
13245
13519
  );
13246
- const submitDraft = React44.useCallback(
13520
+ const submitDraft = React45.useCallback(
13247
13521
  (optionsOrFollowUp) => {
13248
13522
  if (isSendDisabled) return;
13249
13523
  const submitOptions = typeof optionsOrFollowUp === "string" ? { followUpOverride: optionsOrFollowUp } : optionsOrFollowUp ?? {};
@@ -13367,7 +13641,7 @@ function Chat({
13367
13641
  t
13368
13642
  ]
13369
13643
  );
13370
- const addRunRuntimeCapabilities = React44.useCallback(
13644
+ const addRunRuntimeCapabilities = React45.useCallback(
13371
13645
  (selection) => {
13372
13646
  setRunRuntimeCapabilities(
13373
13647
  (previous) => runtimeCapabilities ? mergeRuntimeCapabilitiesSelections(
@@ -13379,7 +13653,7 @@ function Chat({
13379
13653
  },
13380
13654
  [runtimeCapabilities]
13381
13655
  );
13382
- const insertComposerCapabilityToken = React44.useCallback(
13656
+ const insertComposerCapabilityToken = React45.useCallback(
13383
13657
  (capability, range) => {
13384
13658
  const token = createComposerCapabilityPart(capability, createMessageId());
13385
13659
  const currentParts = composerPartsRef.current;
@@ -13450,7 +13724,7 @@ function Chat({
13450
13724
  plugin: t("composer.slashCommands.empty.loadingCapabilities"),
13451
13725
  subAgent: t("composer.slashCommands.empty.loadingCapabilities")
13452
13726
  };
13453
- React44.useEffect(() => {
13727
+ React45.useEffect(() => {
13454
13728
  if (!runtimeCapabilityPalette) {
13455
13729
  return;
13456
13730
  }
@@ -13469,7 +13743,7 @@ function Chat({
13469
13743
  );
13470
13744
  }
13471
13745
  }, [slashPaletteOptions.length, runtimeCapabilityPalette]);
13472
- React44.useLayoutEffect(() => {
13746
+ React45.useLayoutEffect(() => {
13473
13747
  if (!runtimeCapabilityPalette) {
13474
13748
  return;
13475
13749
  }
@@ -13493,7 +13767,7 @@ function Chat({
13493
13767
  }
13494
13768
  submitDraft();
13495
13769
  };
13496
- const handleEditPendingFollowUp = React44.useCallback(
13770
+ const handleEditPendingFollowUp = React45.useCallback(
13497
13771
  (id) => {
13498
13772
  const item = pendingFollowUps.find(
13499
13773
  (entry) => entry.id === id && entry.mode === "queue"
@@ -13520,7 +13794,7 @@ function Chat({
13520
13794
  },
13521
13795
  [pendingFollowUps, setComposerText, stream]
13522
13796
  );
13523
- const handleQuoteSelection = React44.useCallback(() => {
13797
+ const handleQuoteSelection = React45.useCallback(() => {
13524
13798
  if (!quoteSelection) {
13525
13799
  return;
13526
13800
  }
@@ -13536,7 +13810,7 @@ function Chat({
13536
13810
  const handleAttachmentClick = () => {
13537
13811
  fileInputRef.current?.click();
13538
13812
  };
13539
- const uploadContextFile = React44.useCallback(
13813
+ const uploadContextFile = React45.useCallback(
13540
13814
  (file) => stream.client.contexts.uploadFile(file),
13541
13815
  [stream.client]
13542
13816
  );
@@ -13640,7 +13914,7 @@ function Chat({
13640
13914
  }
13641
13915
  submitDraft();
13642
13916
  };
13643
- const handleComposerPaste = React44.useCallback(
13917
+ const handleComposerPaste = React45.useCallback(
13644
13918
  (event) => {
13645
13919
  const clipboardData = event.clipboardData;
13646
13920
  if (!clipboardData) {
@@ -13739,18 +14013,18 @@ function Chat({
13739
14013
  uploadContextFile
13740
14014
  ]
13741
14015
  );
13742
- const alternateFollowUpShortcutLabel = React44.useMemo(() => {
14016
+ const alternateFollowUpShortcutLabel = React45.useMemo(() => {
13743
14017
  if (typeof navigator === "undefined") {
13744
14018
  return "\u2318Enter";
13745
14019
  }
13746
14020
  const platform = navigator.platform || navigator.userAgent;
13747
14021
  return /Mac|iPhone|iPad|iPod/i.test(platform) ? "\u2318Enter" : "Ctrl+Enter";
13748
14022
  }, []);
13749
- const followUpShortcutLabels = React44.useMemo(
14023
+ const followUpShortcutLabels = React45.useMemo(
13750
14024
  () => getComposerFollowUpShortcutLabels(alternateFollowUpShortcutLabel),
13751
14025
  [alternateFollowUpShortcutLabel]
13752
14026
  );
13753
- const uploadFile = React44.useCallback(
14027
+ const uploadFile = React45.useCallback(
13754
14028
  async (localId, file) => {
13755
14029
  try {
13756
14030
  const result = await uploadContextFile(file);
@@ -13773,7 +14047,7 @@ function Chat({
13773
14047
  },
13774
14048
  [uploadContextFile]
13775
14049
  );
13776
- const handleRetryUpload = React44.useCallback(
14050
+ const handleRetryUpload = React45.useCallback(
13777
14051
  (localId) => {
13778
14052
  const attachment = attachments.find((a) => a.localId === localId);
13779
14053
  if (!attachment || attachment.status !== "error") return;
@@ -13872,7 +14146,7 @@ function Chat({
13872
14146
  );
13873
14147
  scrollToBottom(true, true);
13874
14148
  };
13875
- const loadConversationMessages = React44.useCallback(
14149
+ const loadConversationMessages = React45.useCallback(
13876
14150
  async (recordId) => {
13877
14151
  if (missingConfig) {
13878
14152
  setHistoryError(missingConfigShortMessage);
@@ -13967,12 +14241,12 @@ function Chat({
13967
14241
  }
13968
14242
  };
13969
14243
  const acceptMimes = composer?.attachments?.accept ? Object.entries(composer.attachments.accept).map(([mime, exts]) => [mime, ...exts.map((e) => `.${e}`)].join(",")).join(",") : void 0;
13970
- const currentThread = React44.useMemo(
14244
+ const currentThread = React45.useMemo(
13971
14245
  () => threads.find((item) => item.id === stream.threadId),
13972
14246
  [threads, stream.threadId]
13973
14247
  );
13974
14248
  const streamErrorMessage = stream.error instanceof Error ? stream.error.message : void 0;
13975
- const threadErrorMessage = React44.useMemo(() => {
14249
+ const threadErrorMessage = React45.useMemo(() => {
13976
14250
  if (streamErrorMessage?.trim()) return streamErrorMessage.trim();
13977
14251
  if (currentThread?.status !== "error") return void 0;
13978
14252
  const message = currentThread.error?.trim();
@@ -14003,7 +14277,7 @@ function Chat({
14003
14277
  fallbackTitle: t("history.threadFallback")
14004
14278
  });
14005
14279
  const assistantTitle = assistantName || resolvedTitle;
14006
- return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
14280
+ return /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(
14007
14281
  "div",
14008
14282
  {
14009
14283
  ref: viewportRef,
@@ -14013,10 +14287,10 @@ function Chat({
14013
14287
  className
14014
14288
  ),
14015
14289
  children: [
14016
- /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "flex items-center justify-between border-b p-2 sticky top-0 z-10 bg-background", children: [
14017
- /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "flex items-center gap-3 overflow-hidden", children: [
14018
- /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "relative shrink-0", children: [
14019
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
14290
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { className: "flex items-center justify-between border-b p-2 sticky top-0 z-10 bg-background", children: [
14291
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { className: "flex items-center gap-3 overflow-hidden", children: [
14292
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { className: "relative shrink-0", children: [
14293
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
14020
14294
  ChatkitAvatar,
14021
14295
  {
14022
14296
  avatar: assistantAvatar,
@@ -14024,10 +14298,10 @@ function Chat({
14024
14298
  label: assistantTitle
14025
14299
  }
14026
14300
  ),
14027
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("span", { className: "absolute bottom-0 right-0 h-2.5 w-2.5 rounded-full border-2 border-background bg-green-500" })
14301
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("span", { className: "absolute bottom-0 right-0 h-2.5 w-2.5 rounded-full border-2 border-background bg-green-500" })
14028
14302
  ] }),
14029
- /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "truncate", children: [
14030
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
14303
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { className: "truncate", children: [
14304
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
14031
14305
  "h2",
14032
14306
  {
14033
14307
  className: "text-lg font-semibold truncate",
@@ -14035,12 +14309,29 @@ function Chat({
14035
14309
  children: assistantTitle
14036
14310
  }
14037
14311
  ),
14038
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("p", { className: "text-xs text-muted-foreground", children: t("chat.statusOnline") })
14312
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("p", { className: "text-xs text-muted-foreground", children: t("chat.statusOnline") })
14039
14313
  ] })
14040
14314
  ] }),
14041
- /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "flex items-center gap-1", children: [
14042
- /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(Tooltip, { children: [
14043
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("span", { className: "inline-flex h-8 w-8", children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
14315
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { className: "flex items-center gap-1", children: [
14316
+ canMinimizeToPet && /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(Tooltip, { children: [
14317
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("span", { className: "inline-flex h-8 w-8", children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
14318
+ "button",
14319
+ {
14320
+ type: "button",
14321
+ onClick: handleMinimizeToPet,
14322
+ className: cn(
14323
+ "flex h-8 w-8 cursor-pointer items-center justify-center rounded-md",
14324
+ "text-muted-foreground hover:text-foreground hover:bg-muted",
14325
+ "transition-colors duration-150"
14326
+ ),
14327
+ "aria-label": t("chat.minimizeToPet"),
14328
+ children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_lucide_react25.Minus, { size: 16 })
14329
+ }
14330
+ ) }) }),
14331
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(TooltipContent, { side: "bottom", children: t("chat.minimizeToPet") })
14332
+ ] }),
14333
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(Tooltip, { children: [
14334
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("span", { className: "inline-flex h-8 w-8", children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
14044
14335
  "button",
14045
14336
  {
14046
14337
  type: "button",
@@ -14051,14 +14342,14 @@ function Chat({
14051
14342
  "transition-colors duration-150"
14052
14343
  ),
14053
14344
  "aria-label": t("settings.open"),
14054
- children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_lucide_react24.Settings, { size: 16 })
14345
+ children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_lucide_react25.Settings, { size: 16 })
14055
14346
  }
14056
14347
  ) }) }),
14057
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(TooltipContent, { side: "bottom", children: t("settings.open") })
14348
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(TooltipContent, { side: "bottom", children: t("settings.open") })
14058
14349
  ] }),
14059
- history?.enabled !== false && /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(import_jsx_runtime49.Fragment, { children: [
14060
- /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(Tooltip, { children: [
14061
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("span", { className: "inline-flex h-8 w-8", children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
14350
+ history?.enabled !== false && /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(import_jsx_runtime50.Fragment, { children: [
14351
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(Tooltip, { children: [
14352
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("span", { className: "inline-flex h-8 w-8", children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
14062
14353
  "button",
14063
14354
  {
14064
14355
  type: "button",
@@ -14071,12 +14362,12 @@ function Chat({
14071
14362
  "disabled:pointer-events-none disabled:opacity-50 disabled:cursor-not-allowed"
14072
14363
  ),
14073
14364
  "aria-label": t("history.newThread"),
14074
- children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_lucide_react24.Pencil, { size: 16 })
14365
+ children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_lucide_react25.Pencil, { size: 16 })
14075
14366
  }
14076
14367
  ) }) }),
14077
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(TooltipContent, { side: "bottom", children: t("history.newThread") })
14368
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(TooltipContent, { side: "bottom", children: t("history.newThread") })
14078
14369
  ] }),
14079
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
14370
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
14080
14371
  HistorySidebar,
14081
14372
  {
14082
14373
  threads,
@@ -14091,18 +14382,18 @@ function Chat({
14091
14382
  ] })
14092
14383
  ] })
14093
14384
  ] }),
14094
- /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "flex-1 p-4", children: [
14095
- errorMessage && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: "mb-4 rounded-lg border border-destructive/30 bg-destructive/10 px-3 py-2 text-sm text-destructive", children: errorMessage }),
14096
- historyError && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: "mb-4 rounded-lg border border-amber-200 bg-amber-50 px-3 py-2 text-sm text-amber-900", children: historyError }),
14097
- showMissingConfig && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: "mb-4 rounded-lg border border-amber-200 bg-amber-50 px-3 py-2 text-sm text-amber-900", children: missingConfigDetailMessage }),
14098
- isHistoryLoading && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: "mb-4 rounded-lg border border-muted px-3 py-2 text-sm text-muted-foreground", children: t("chat.loadingThread") }),
14099
- messages.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
14385
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { className: "flex-1 p-4", children: [
14386
+ errorMessage && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { className: "mb-4 rounded-lg border border-destructive/30 bg-destructive/10 px-3 py-2 text-sm text-destructive", children: errorMessage }),
14387
+ historyError && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { className: "mb-4 rounded-lg border border-amber-200 bg-amber-50 px-3 py-2 text-sm text-amber-900", children: historyError }),
14388
+ showMissingConfig && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { className: "mb-4 rounded-lg border border-amber-200 bg-amber-50 px-3 py-2 text-sm text-amber-900", children: missingConfigDetailMessage }),
14389
+ isHistoryLoading && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { className: "mb-4 rounded-lg border border-muted px-3 py-2 text-sm text-muted-foreground", children: t("chat.loadingThread") }),
14390
+ messages.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
14100
14391
  StartScreen,
14101
14392
  {
14102
14393
  startScreen,
14103
14394
  onPromptClick: handlePromptClick
14104
14395
  }
14105
- ) : /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "space-y-4", children: [
14396
+ ) : /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { className: "space-y-4", children: [
14106
14397
  messages.map((message, index) => {
14107
14398
  const messageType = String(message.type);
14108
14399
  const isAssistantMessage = messageType === "assistant" || messageType === "ai";
@@ -14135,7 +14426,7 @@ function Chat({
14135
14426
  if (!isAssistantMessage && !hasPlainRenderableContent && !hasHumanAttachments && humanRuntimeCapabilityOptions.length === 0 && humanReferences.length === 0) {
14136
14427
  return null;
14137
14428
  }
14138
- return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
14429
+ return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
14139
14430
  "div",
14140
14431
  {
14141
14432
  className: cn(
@@ -14143,8 +14434,8 @@ function Chat({
14143
14434
  message.type === "human" ? "justify-end" : "justify-start -ml-1"
14144
14435
  // AI messages: slightly closer to left
14145
14436
  ),
14146
- children: /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "flex flex-col px-3 overflow-hidden", children: [
14147
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
14437
+ children: /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { className: "flex flex-col px-3 overflow-hidden", children: [
14438
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
14148
14439
  "div",
14149
14440
  {
14150
14441
  ...canQuoteMessage ? {
@@ -14156,7 +14447,7 @@ function Chat({
14156
14447
  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"
14157
14448
  // AI messages: use chat-specific foreground color
14158
14449
  ),
14159
- children: isAssistantMessage ? /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
14450
+ children: isAssistantMessage ? /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
14160
14451
  AssistantMessage,
14161
14452
  {
14162
14453
  message: {
@@ -14175,25 +14466,25 @@ function Chat({
14175
14466
  organizationId: stream.organizationId,
14176
14467
  apiUrl: stream.apiUrl
14177
14468
  }
14178
- ) : /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(import_jsx_runtime49.Fragment, { children: [
14179
- message.type === "human" && humanRuntimeCapabilityOptions.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: "mb-2 flex flex-wrap gap-1.5", children: humanRuntimeCapabilityOptions.map((option) => /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
14469
+ ) : /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(import_jsx_runtime50.Fragment, { children: [
14470
+ message.type === "human" && humanRuntimeCapabilityOptions.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { className: "mb-2 flex flex-wrap gap-1.5", children: humanRuntimeCapabilityOptions.map((option) => /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(
14180
14471
  "span",
14181
14472
  {
14182
14473
  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",
14183
14474
  children: [
14184
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
14475
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
14185
14476
  RuntimeCapabilityIcon,
14186
14477
  {
14187
14478
  option,
14188
14479
  variant: "chip"
14189
14480
  }
14190
14481
  ),
14191
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("span", { className: "max-w-[9rem] truncate", children: option.label })
14482
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("span", { className: "max-w-[9rem] truncate", children: option.label })
14192
14483
  ]
14193
14484
  },
14194
14485
  `${option.type}:${option.id}`
14195
14486
  )) }),
14196
- message.type === "human" && humanReferences.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: "mb-2 flex flex-wrap gap-1.5", children: humanReferences.map((reference) => /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
14487
+ message.type === "human" && humanReferences.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { className: "mb-2 flex flex-wrap gap-1.5", children: humanReferences.map((reference) => /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
14197
14488
  ReferenceChip,
14198
14489
  {
14199
14490
  reference,
@@ -14201,29 +14492,29 @@ function Chat({
14201
14492
  },
14202
14493
  getReferenceKey(reference)
14203
14494
  )) }),
14204
- message.type === "human" && humanAttachments.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: "flex flex-wrap gap-1.5 mb-2", children: humanAttachments.map((file, fileIndex) => /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
14495
+ message.type === "human" && humanAttachments.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { className: "flex flex-wrap gap-1.5 mb-2", children: humanAttachments.map((file, fileIndex) => /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(
14205
14496
  "div",
14206
14497
  {
14207
14498
  className: "flex items-center gap-1.5 rounded-md bg-primary-foreground/20 px-2 py-1 text-xs",
14208
14499
  children: [
14209
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_lucide_react24.FileText, { size: 12 }),
14210
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("span", { className: "max-w-[100px] truncate", children: file.originalName })
14500
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_lucide_react25.FileText, { size: 12 }),
14501
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("span", { className: "max-w-[100px] truncate", children: file.originalName })
14211
14502
  ]
14212
14503
  },
14213
14504
  fileIndex
14214
14505
  )) }),
14215
- Array.isArray(message.content) ? message.content.map((part, partIndex) => /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
14506
+ Array.isArray(message.content) ? message.content.map((part, partIndex) => /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
14216
14507
  "p",
14217
14508
  {
14218
14509
  className: "wrap-break-word text-sm leading-relaxed",
14219
14510
  children: formatMessageContent(part)
14220
14511
  },
14221
14512
  `${part.type}-${partIndex}`
14222
- )) : /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("span", { className: "wrap-break-word text-sm leading-relaxed", children: formatMessageContent(message.content) })
14513
+ )) : /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("span", { className: "wrap-break-word text-sm leading-relaxed", children: formatMessageContent(message.content) })
14223
14514
  ] })
14224
14515
  }
14225
14516
  ),
14226
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
14517
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
14227
14518
  MessageActions,
14228
14519
  {
14229
14520
  content: messageContent,
@@ -14259,7 +14550,7 @@ function Chat({
14259
14550
  stream.isLoading,
14260
14551
  { now: streamingNow }
14261
14552
  );
14262
- return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: "flex justify-start gap-3 -ml-2", children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: "max-w-full rounded-2xl py-2.5", children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
14553
+ return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { className: "flex justify-start gap-3 -ml-2", children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { className: "max-w-full rounded-2xl py-2.5", children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
14263
14554
  AssistantStreamingIndicator,
14264
14555
  {
14265
14556
  status: fallbackStreamingStatus ?? "loading"
@@ -14268,7 +14559,7 @@ function Chat({
14268
14559
  })()
14269
14560
  ] })
14270
14561
  ] }),
14271
- !isAtBottom && messages.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: "sticky bottom-20 z-20 flex justify-center px-4 pointer-events-none", children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
14562
+ !isAtBottom && messages.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { className: "sticky bottom-20 z-20 flex justify-center px-4 pointer-events-none", children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
14272
14563
  Button,
14273
14564
  {
14274
14565
  type: "button",
@@ -14281,10 +14572,10 @@ function Chat({
14281
14572
  onClick: () => scrollToBottom(true, true),
14282
14573
  "aria-label": t("chat.scrollToBottom"),
14283
14574
  title: t("chat.scrollToBottom"),
14284
- children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_lucide_react24.ArrowDown, { size: 16 })
14575
+ children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_lucide_react25.ArrowDown, { size: 16 })
14285
14576
  }
14286
14577
  ) }),
14287
- quoteSelection && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
14578
+ quoteSelection && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
14288
14579
  "div",
14289
14580
  {
14290
14581
  className: "pointer-events-none fixed z-50",
@@ -14293,7 +14584,7 @@ function Chat({
14293
14584
  left: `${quoteSelection.left}px`,
14294
14585
  transform: "translateX(-50%)"
14295
14586
  },
14296
- children: /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
14587
+ children: /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(
14297
14588
  Button,
14298
14589
  {
14299
14590
  type: "button",
@@ -14305,16 +14596,16 @@ function Chat({
14305
14596
  "aria-label": t("composer.quoteSelection"),
14306
14597
  title: t("composer.quoteSelection"),
14307
14598
  children: [
14308
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_lucide_react24.Quote, { size: 14 }),
14599
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_lucide_react25.Quote, { size: 14 }),
14309
14600
  t("composer.quoteSelection")
14310
14601
  ]
14311
14602
  }
14312
14603
  )
14313
14604
  }
14314
14605
  ),
14315
- /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "p-2 sticky bottom-0 z-10 bg-background", children: [
14316
- threadErrorMessage && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: "mb-3 rounded-lg border border-destructive/30 bg-destructive/10 px-3 py-2 text-sm text-destructive overflow-auto", children: threadErrorMessage }),
14317
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
14606
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { className: "p-2 sticky bottom-0 z-10 bg-background", children: [
14607
+ threadErrorMessage && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { className: "mb-3 rounded-lg border border-destructive/30 bg-destructive/10 px-3 py-2 text-sm text-destructive overflow-auto", children: threadErrorMessage }),
14608
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
14318
14609
  "input",
14319
14610
  {
14320
14611
  ref: fileInputRef,
@@ -14325,7 +14616,7 @@ function Chat({
14325
14616
  className: "hidden"
14326
14617
  }
14327
14618
  ),
14328
- attachments.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: "mb-3 flex flex-wrap gap-2", children: attachments.map((item) => /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
14619
+ attachments.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { className: "mb-3 flex flex-wrap gap-2", children: attachments.map((item) => /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(
14329
14620
  "div",
14330
14621
  {
14331
14622
  className: cn(
@@ -14333,16 +14624,16 @@ function Chat({
14333
14624
  item.status === "error" ? "bg-destructive/10 border border-destructive/30" : "bg-muted"
14334
14625
  ),
14335
14626
  children: [
14336
- item.status === "uploading" && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
14337
- import_lucide_react24.Loader2,
14627
+ item.status === "uploading" && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
14628
+ import_lucide_react25.Loader2,
14338
14629
  {
14339
14630
  size: 14,
14340
14631
  className: "animate-spin text-muted-foreground"
14341
14632
  }
14342
14633
  ),
14343
- item.status === "success" && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_lucide_react24.FileText, { size: 14, className: "text-muted-foreground" }),
14344
- item.status === "error" && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_lucide_react24.FileText, { size: 14, className: "text-destructive" }),
14345
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
14634
+ item.status === "success" && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_lucide_react25.FileText, { size: 14, className: "text-muted-foreground" }),
14635
+ item.status === "error" && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_lucide_react25.FileText, { size: 14, className: "text-destructive" }),
14636
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
14346
14637
  "span",
14347
14638
  {
14348
14639
  className: cn(
@@ -14352,17 +14643,17 @@ function Chat({
14352
14643
  children: item.file.name
14353
14644
  }
14354
14645
  ),
14355
- item.status === "error" && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
14646
+ item.status === "error" && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
14356
14647
  "button",
14357
14648
  {
14358
14649
  type: "button",
14359
14650
  onClick: () => handleRetryUpload(item.localId),
14360
14651
  className: "ml-1 rounded-full p-0.5 text-destructive hover:bg-destructive/20",
14361
14652
  title: t("chat.retryUpload"),
14362
- children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_lucide_react24.RefreshCw, { size: 12 })
14653
+ children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_lucide_react25.RefreshCw, { size: 12 })
14363
14654
  }
14364
14655
  ),
14365
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
14656
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
14366
14657
  "button",
14367
14658
  {
14368
14659
  type: "button",
@@ -14371,14 +14662,14 @@ function Chat({
14371
14662
  "ml-1 rounded-full p-0.5",
14372
14663
  item.status === "error" ? "text-destructive hover:bg-destructive/20" : "hover:bg-muted-foreground/20"
14373
14664
  ),
14374
- children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_lucide_react24.X, { size: 12 })
14665
+ children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_lucide_react25.X, { size: 12 })
14375
14666
  }
14376
14667
  )
14377
14668
  ]
14378
14669
  },
14379
14670
  item.localId
14380
14671
  )) }),
14381
- references.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: "mb-3 flex flex-wrap gap-2", children: references.map((reference) => /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
14672
+ references.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { className: "mb-3 flex flex-wrap gap-2", children: references.map((reference) => /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
14382
14673
  ReferenceChip,
14383
14674
  {
14384
14675
  reference,
@@ -14392,16 +14683,16 @@ function Chat({
14392
14683
  },
14393
14684
  getReferenceKey(reference)
14394
14685
  )) }),
14395
- detachedRunRuntimeCapabilityOptions.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "mb-2 flex flex-wrap items-center gap-2", children: [
14396
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("span", { className: "text-xs text-muted-foreground", children: t("composer.capabilities.runOnly") }),
14397
- detachedRunRuntimeCapabilityOptions.map((option) => /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
14686
+ detachedRunRuntimeCapabilityOptions.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { className: "mb-2 flex flex-wrap items-center gap-2", children: [
14687
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("span", { className: "text-xs text-muted-foreground", children: t("composer.capabilities.runOnly") }),
14688
+ detachedRunRuntimeCapabilityOptions.map((option) => /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(
14398
14689
  "span",
14399
14690
  {
14400
14691
  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",
14401
14692
  children: [
14402
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(RuntimeCapabilityIcon, { option, variant: "chip" }),
14403
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("span", { className: "max-w-40 truncate", children: option.label }),
14404
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
14693
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(RuntimeCapabilityIcon, { option, variant: "chip" }),
14694
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("span", { className: "max-w-40 truncate", children: option.label }),
14695
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
14405
14696
  "button",
14406
14697
  {
14407
14698
  type: "button",
@@ -14409,7 +14700,7 @@ function Chat({
14409
14700
  className: "rounded-full p-0.5 hover:bg-primary/15",
14410
14701
  title: t("composer.capabilities.removeRunCapability"),
14411
14702
  "aria-label": t("composer.capabilities.removeRunCapability"),
14412
- children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_lucide_react24.X, { size: 11 })
14703
+ children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_lucide_react25.X, { size: 11 })
14413
14704
  }
14414
14705
  )
14415
14706
  ]
@@ -14417,7 +14708,7 @@ function Chat({
14417
14708
  `${option.type}:${option.id}`
14418
14709
  ))
14419
14710
  ] }),
14420
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
14711
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
14421
14712
  PendingRuntimeServices,
14422
14713
  {
14423
14714
  state: stream.runtimeActivities.sandboxServices,
@@ -14426,7 +14717,7 @@ function Chat({
14426
14717
  className: hasPendingTodos || hasPendingFollowUps ? "mb-2" : void 0
14427
14718
  }
14428
14719
  ),
14429
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
14720
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
14430
14721
  PendingTodos,
14431
14722
  {
14432
14723
  snapshot: stream.todos,
@@ -14434,7 +14725,7 @@ function Chat({
14434
14725
  className: hasPendingFollowUps ? "mb-2" : void 0
14435
14726
  }
14436
14727
  ),
14437
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
14728
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
14438
14729
  PendingFollowUps,
14439
14730
  {
14440
14731
  items: pendingFollowUps,
@@ -14449,7 +14740,7 @@ function Chat({
14449
14740
  attachToComposer: true
14450
14741
  }
14451
14742
  ),
14452
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
14743
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
14453
14744
  RequestUserInputPanel,
14454
14745
  {
14455
14746
  request: stream.pendingRequestUserInput,
@@ -14458,7 +14749,7 @@ function Chat({
14458
14749
  attachToComposer: true
14459
14750
  }
14460
14751
  ),
14461
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
14752
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
14462
14753
  HITLApprovalPanel,
14463
14754
  {
14464
14755
  request: stream.pendingHITLRequest,
@@ -14467,7 +14758,7 @@ function Chat({
14467
14758
  attachToComposer: true
14468
14759
  }
14469
14760
  ),
14470
- runtimeCapabilityPalette && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
14761
+ runtimeCapabilityPalette && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
14471
14762
  SlashPalette,
14472
14763
  {
14473
14764
  palette: runtimeCapabilityPalette,
@@ -14481,7 +14772,7 @@ function Chat({
14481
14772
  onSelect: selectSlashPaletteOption
14482
14773
  }
14483
14774
  ),
14484
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("form", { className: "flex items-end", onSubmit: handleSubmit, children: /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
14775
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("form", { className: "flex items-end", onSubmit: handleSubmit, children: /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(
14485
14776
  "div",
14486
14777
  {
14487
14778
  "data-slot": "composer-input-shell",
@@ -14495,7 +14786,7 @@ function Chat({
14495
14786
  composerInputRoundedClass
14496
14787
  ),
14497
14788
  children: [
14498
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
14789
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
14499
14790
  "div",
14500
14791
  {
14501
14792
  ref: composerInputRef,
@@ -14517,7 +14808,7 @@ function Chat({
14517
14808
  (missingConfig || isHistoryLoading || hasPendingInteractiveRequest) && "cursor-not-allowed opacity-50"
14518
14809
  ),
14519
14810
  children: renderedComposerParts.map(
14520
- (part, index) => part.type === "text" ? /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(React44.Fragment, { children: part.text }, `text-${index}`) : /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
14811
+ (part, index) => part.type === "text" ? /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(React45.Fragment, { children: part.text }, `text-${index}`) : /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(
14521
14812
  "span",
14522
14813
  {
14523
14814
  "data-composer-capability-key": part.key,
@@ -14526,14 +14817,14 @@ function Chat({
14526
14817
  contentEditable: false,
14527
14818
  className: "mx-0.5 inline-flex max-w-[14rem] select-none items-center gap-1 text-sm font-semibold text-primary align-baseline",
14528
14819
  children: [
14529
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
14820
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
14530
14821
  RuntimeCapabilityIcon,
14531
14822
  {
14532
14823
  option: part.capability,
14533
14824
  variant: "chip"
14534
14825
  }
14535
14826
  ),
14536
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("span", { className: "truncate", children: part.capability.label })
14827
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("span", { className: "truncate", children: part.capability.label })
14537
14828
  ]
14538
14829
  },
14539
14830
  part.key
@@ -14542,14 +14833,14 @@ function Chat({
14542
14833
  },
14543
14834
  composerDomVersion
14544
14835
  ),
14545
- /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
14836
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(
14546
14837
  "div",
14547
14838
  {
14548
14839
  "data-slot": "composer-action-bar",
14549
14840
  className: "pointer-events-none absolute inset-x-1.5 bottom-1 flex min-h-10 items-center justify-between gap-2",
14550
14841
  children: [
14551
- /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "pointer-events-none flex min-w-0 flex-1 items-center gap-1.5", children: [
14552
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: "pointer-events-auto flex shrink-0 items-center gap-1.5", children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
14842
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { className: "pointer-events-none flex min-w-0 flex-1 items-center gap-1.5", children: [
14843
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { className: "pointer-events-auto flex shrink-0 items-center gap-1.5", children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
14553
14844
  ComposerMenu,
14554
14845
  {
14555
14846
  composer,
@@ -14564,20 +14855,20 @@ function Chat({
14564
14855
  disabled: missingConfig || isHistoryLoading || hasPendingInteractiveRequest
14565
14856
  }
14566
14857
  ) }),
14567
- selectedTool && /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("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: [
14568
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("span", { className: "truncate", children: selectedTool.shortLabel ?? selectedTool.label }),
14569
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
14858
+ selectedTool && /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("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: [
14859
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("span", { className: "truncate", children: selectedTool.shortLabel ?? selectedTool.label }),
14860
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
14570
14861
  "button",
14571
14862
  {
14572
14863
  type: "button",
14573
14864
  onClick: () => setSelectedTool(null),
14574
14865
  className: "shrink-0 rounded-full p-0.5 text-primary/70 hover:bg-primary/10 hover:text-primary",
14575
- children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_lucide_react24.X, { size: 12 })
14866
+ children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_lucide_react25.X, { size: 12 })
14576
14867
  }
14577
14868
  )
14578
14869
  ] })
14579
14870
  ] }),
14580
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: "pointer-events-auto shrink-0", children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
14871
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { className: "pointer-events-auto shrink-0", children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
14581
14872
  SendButton,
14582
14873
  {
14583
14874
  disabled: isSendDisabled,
@@ -14604,7 +14895,7 @@ function Chat({
14604
14895
  ]
14605
14896
  }
14606
14897
  ) }),
14607
- disclaimer?.text && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
14898
+ disclaimer?.text && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
14608
14899
  "p",
14609
14900
  {
14610
14901
  className: cn(
@@ -14614,12 +14905,12 @@ function Chat({
14614
14905
  children: disclaimer.text
14615
14906
  }
14616
14907
  ),
14617
- /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "mt-2 flex items-center justify-center gap-2 text-xs text-muted-foreground", children: [
14618
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("span", { children: t("chat.poweredBy") }),
14619
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(ContextUsageIndicator, { className: "absolute right-4" })
14908
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { className: "mt-2 flex items-center justify-center gap-2 text-xs text-muted-foreground", children: [
14909
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("span", { children: t("chat.poweredBy") }),
14910
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(ContextUsageIndicator, { className: "absolute right-4" })
14620
14911
  ] })
14621
14912
  ] }),
14622
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
14913
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
14623
14914
  SettingsSheet,
14624
14915
  {
14625
14916
  open: petSettingsOpen,
@@ -14629,17 +14920,17 @@ function Chat({
14629
14920
  onSave: savePetLocalSettings
14630
14921
  }
14631
14922
  ),
14632
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(PetBridge, { pet: effectivePet, state: petAutoState })
14923
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(PetBridge, { pet: effectivePet, state: petAutoState })
14633
14924
  ]
14634
14925
  }
14635
14926
  );
14636
14927
  }
14637
14928
 
14638
14929
  // src/components/ui/separator.tsx
14639
- var React45 = __toESM(require("react"), 1);
14640
- var import_jsx_runtime50 = require("react/jsx-runtime");
14641
- var Separator = React45.forwardRef(
14642
- ({ className, orientation = "horizontal", ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
14930
+ var React46 = __toESM(require("react"), 1);
14931
+ var import_jsx_runtime51 = require("react/jsx-runtime");
14932
+ var Separator = React46.forwardRef(
14933
+ ({ className, orientation = "horizontal", ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
14643
14934
  "div",
14644
14935
  {
14645
14936
  ref,