@xpert-ai/chatkit-ui 0.5.15 → 0.5.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (336) hide show
  1. package/dist/app/assets/{_baseUniq-9hdyHfR5.js → _baseUniq-CdqWVyDi.js} +1 -1
  2. package/dist/app/assets/{abap-y4N5ojeB.js → abap-DG6Ek7_c.js} +1 -1
  3. package/dist/app/assets/{abnf-CGxt_pi7.js → abnf-D4aLD9mZ.js} +1 -1
  4. package/dist/app/assets/{actionscript-DHtBtT7W.js → actionscript-B4H2PXyd.js} +1 -1
  5. package/dist/app/assets/{ada-CzTrTrOe.js → ada-DtM3Nnaa.js} +1 -1
  6. package/dist/app/assets/{agda-CV42rDct.js → agda-BDfZBc9b.js} +1 -1
  7. package/dist/app/assets/{al-B19rWg_7.js → al-CuMmj85N.js} +1 -1
  8. package/dist/app/assets/{antlr4-6j7higho.js → antlr4-CvOASiHP.js} +1 -1
  9. package/dist/app/assets/{apacheconf-BnTQXe7c.js → apacheconf-egtcsmgP.js} +1 -1
  10. package/dist/app/assets/{apex-CrGUf4vy.js → apex-aL2bFEJp.js} +1 -1
  11. package/dist/app/assets/{apl-CFYPxCJn.js → apl-CC_GmUZr.js} +1 -1
  12. package/dist/app/assets/{applescript-BZWvUcGU.js → applescript-DAxdm_ZL.js} +1 -1
  13. package/dist/app/assets/{aql-A5X6ON50.js → aql-CWpqz7Xs.js} +1 -1
  14. package/dist/app/assets/{arc-DfRbHjtJ.js → arc-BDGkEfCH.js} +1 -1
  15. package/dist/app/assets/{architectureDiagram-Q4EWVU46-bDnvhCp9.js → architectureDiagram-Q4EWVU46-CxmmRQKb.js} +1 -1
  16. package/dist/app/assets/{arduino-D-E6g3Ne.js → arduino-DeA-rcpQ.js} +1 -1
  17. package/dist/app/assets/{arff-CLPWjOWo.js → arff-DmVG-Rqm.js} +1 -1
  18. package/dist/app/assets/{asciidoc-unvw7QPv.js → asciidoc-TLFkcHSh.js} +1 -1
  19. package/dist/app/assets/{asm6502-D41umBFW.js → asm6502-C4Ip0b9p.js} +1 -1
  20. package/dist/app/assets/{asmatmel-alNRd3F9.js → asmatmel-thy6vzGi.js} +1 -1
  21. package/dist/app/assets/{aspnet-_0zU96S5.js → aspnet-DzllYmrW.js} +1 -1
  22. package/dist/app/assets/{autohotkey-BpMLT2LK.js → autohotkey-B8zy-gEV.js} +1 -1
  23. package/dist/app/assets/{autoit-mO3ghUI7.js → autoit-CkiepIGR.js} +1 -1
  24. package/dist/app/assets/{avisynth-DWLO42Rj.js → avisynth-_4CaW1AA.js} +1 -1
  25. package/dist/app/assets/{avro-idl-BBQRzylG.js → avro-idl-B5uauj2Y.js} +1 -1
  26. package/dist/app/assets/{bash-QIqJHBX-.js → bash-435vmYqx.js} +1 -1
  27. package/dist/app/assets/{basic-Bc5kyCr2.js → basic-CaYQWOe4.js} +1 -1
  28. package/dist/app/assets/{batch-4zRdbOHs.js → batch-BnbU0dwA.js} +1 -1
  29. package/dist/app/assets/{bbcode-Ketn398N.js → bbcode-ClK0qvV6.js} +1 -1
  30. package/dist/app/assets/{bicep-D2LZklJx.js → bicep-BNwB5eFu.js} +1 -1
  31. package/dist/app/assets/{birb-C5z-Tz7A.js → birb-pP0ceH0d.js} +1 -1
  32. package/dist/app/assets/{bison-BSdtws5Z.js → bison-kM83HWDk.js} +1 -1
  33. package/dist/app/assets/{blockDiagram-DXYQGD6D-C7-lDa8H.js → blockDiagram-DXYQGD6D-D_Y5pJpD.js} +1 -1
  34. package/dist/app/assets/{bnf-CzUBVS5p.js → bnf-XqmAKNgb.js} +1 -1
  35. package/dist/app/assets/{brainfuck-VF_hPzCx.js → brainfuck-DtES44L3.js} +1 -1
  36. package/dist/app/assets/{brightscript-DyjAyHnm.js → brightscript-CvjC2vRm.js} +1 -1
  37. package/dist/app/assets/{bro-DXD2kNH0.js → bro-BOO3M_vG.js} +1 -1
  38. package/dist/app/assets/{bsl-Dgcej-Ho.js → bsl-BnT3JyMb.js} +1 -1
  39. package/dist/app/assets/{c-B2MQTpqm.js → c-HSm0GKGX.js} +1 -1
  40. package/dist/app/assets/{c4Diagram-AHTNJAMY-B2bMwEb4.js → c4Diagram-AHTNJAMY-DWDSfX-E.js} +1 -1
  41. package/dist/app/assets/{cfscript-DATPhxH0.js → cfscript-BqD0iZt0.js} +1 -1
  42. package/dist/app/assets/{chaiscript-O52uWiyy.js → chaiscript-CBUa9IVb.js} +1 -1
  43. package/dist/app/assets/channel-BsvzoHJ-.js +1 -0
  44. package/dist/app/assets/{chunk-4BX2VUAB-Dr7WgjiQ.js → chunk-4BX2VUAB-G68_yQYv.js} +1 -1
  45. package/dist/app/assets/{chunk-4TB4RGXK-BG3Kd_Oz.js → chunk-4TB4RGXK-C8qWZWuz.js} +1 -1
  46. package/dist/app/assets/{chunk-55IACEB6-DyX9k3Y1.js → chunk-55IACEB6-D7_j-pa1.js} +1 -1
  47. package/dist/app/assets/{chunk-EDXVE4YY-pchaRAmm.js → chunk-EDXVE4YY-CIVEVHGi.js} +1 -1
  48. package/dist/app/assets/{chunk-FMBD7UC4-2yygKKXG.js → chunk-FMBD7UC4-BGwcTuE9.js} +1 -1
  49. package/dist/app/assets/{chunk-OYMX7WX6-2WusKNDh.js → chunk-OYMX7WX6-DiWZxi_A.js} +1 -1
  50. package/dist/app/assets/{chunk-QZHKN3VN-BZ5_Y8Zt.js → chunk-QZHKN3VN-C-YpJxwp.js} +1 -1
  51. package/dist/app/assets/{chunk-YZCP3GAM-_aa6WpMv.js → chunk-YZCP3GAM-QlE1i3zF.js} +1 -1
  52. package/dist/app/assets/{cil-KLF5l8H1.js → cil-KBR34Gqp.js} +1 -1
  53. package/dist/app/assets/classDiagram-6PBFFD2Q-CYjgx8Fr.js +1 -0
  54. package/dist/app/assets/classDiagram-v2-HSJHXN6E-CYjgx8Fr.js +1 -0
  55. package/dist/app/assets/{clike-D8oWEn5X.js → clike-Du4bbm-V.js} +1 -1
  56. package/dist/app/assets/{clojure-CT0PdwAd.js → clojure-BVHe2fH_.js} +1 -1
  57. package/dist/app/assets/clone-DbsXYxks.js +1 -0
  58. package/dist/app/assets/{cmake-Bo-pQuoI.js → cmake-LfltEGpZ.js} +1 -1
  59. package/dist/app/assets/{cobol-TNUQ4Zvz.js → cobol-CkSeF0to.js} +1 -1
  60. package/dist/app/assets/{coffeescript-COZuXnnc.js → coffeescript-CA0rPswf.js} +1 -1
  61. package/dist/app/assets/{concurnas-CndbEVcp.js → concurnas-PXz5fvZw.js} +1 -1
  62. package/dist/app/assets/{coq-CQF7xkg5.js → coq-IrOjIGL7.js} +1 -1
  63. package/dist/app/assets/{core-Ct-8nj69.js → core-DmoYxwYZ.js} +1 -1
  64. package/dist/app/assets/{cose-bilkent-S5V4N54A-COkBhJ5e.js → cose-bilkent-S5V4N54A-BOmveU-f.js} +1 -1
  65. package/dist/app/assets/{cpp-Cpt2kIfc.js → cpp-D1GZveGW.js} +1 -1
  66. package/dist/app/assets/{crystal-CC4A43sf.js → crystal-D8_W3h6-.js} +1 -1
  67. package/dist/app/assets/{csharp-DVX8Ptxd.js → csharp-DMr0pSHg.js} +1 -1
  68. package/dist/app/assets/{cshtml-DV8hsAFT.js → cshtml-DWsc6tEe.js} +1 -1
  69. package/dist/app/assets/{csp-BXIU2vr9.js → csp-BsffHyBO.js} +1 -1
  70. package/dist/app/assets/{css-hPXFq369.js → css-DftqNva8.js} +1 -1
  71. package/dist/app/assets/{css-extras-CRzZv0wt.js → css-extras-V_jK59dK.js} +1 -1
  72. package/dist/app/assets/{csv-DGM23MqA.js → csv-CAt3fUf2.js} +1 -1
  73. package/dist/app/assets/{cypher-CvafnXIa.js → cypher-DGhvVc6x.js} +1 -1
  74. package/dist/app/assets/{d-Bgz2Icvc.js → d-pY7u0cyQ.js} +1 -1
  75. package/dist/app/assets/{dagre-KV5264BT-COvMEU_C.js → dagre-KV5264BT-BCWr5q-a.js} +1 -1
  76. package/dist/app/assets/{dart-CsQMX65p.js → dart-BoHXdRLm.js} +1 -1
  77. package/dist/app/assets/{dataweave-7NSMtIoz.js → dataweave-T2yhDDoP.js} +1 -1
  78. package/dist/app/assets/{dax-DBH5GX3s.js → dax-9LuefO8-.js} +1 -1
  79. package/dist/app/assets/{dhall-Brj0ymLX.js → dhall-DPTyQCFs.js} +1 -1
  80. package/dist/app/assets/{diagram-5BDNPKRD-B62KSyFy.js → diagram-5BDNPKRD-DCpIhLj-.js} +1 -1
  81. package/dist/app/assets/{diagram-G4DWMVQ6-Bx19LSIi.js → diagram-G4DWMVQ6-CPbvjoKj.js} +1 -1
  82. package/dist/app/assets/{diagram-MMDJMWI5-BsD6FzFH.js → diagram-MMDJMWI5-C5KCxH6X.js} +1 -1
  83. package/dist/app/assets/{diagram-TYMM5635-W0Jp79ck.js → diagram-TYMM5635-BoWRoWWL.js} +1 -1
  84. package/dist/app/assets/{diff-CG5RwsI8.js → diff-CPrqhMrr.js} +1 -1
  85. package/dist/app/assets/{django-u_MMtcCx.js → django-Bmr0AE9I.js} +1 -1
  86. package/dist/app/assets/{dns-zone-file-B3Qz4Cjh.js → dns-zone-file-CVNIWnt5.js} +1 -1
  87. package/dist/app/assets/{docker-DoSgwNxw.js → docker-C_nohD9R.js} +1 -1
  88. package/dist/app/assets/{dot-Di4txxnz.js → dot-VJy9IudS.js} +1 -1
  89. package/dist/app/assets/{ebnf-E6Wus_Cg.js → ebnf-DRJfZtWN.js} +1 -1
  90. package/dist/app/assets/{editorconfig-Lhlz74Ag.js → editorconfig-CI0yOvrp.js} +1 -1
  91. package/dist/app/assets/{eiffel-UWWTQlxS.js → eiffel-BjzQ0RYg.js} +1 -1
  92. package/dist/app/assets/{ejs-ClYOd_ZG.js → ejs-CNG21MEH.js} +1 -1
  93. package/dist/app/assets/{elixir-CM0riPTA.js → elixir-C5gCfRcW.js} +1 -1
  94. package/dist/app/assets/{elm-CAE87IuH.js → elm-DfTUm9_v.js} +1 -1
  95. package/dist/app/assets/{erDiagram-SMLLAGMA-BBsk0oXF.js → erDiagram-SMLLAGMA-BN6ZY4jl.js} +1 -1
  96. package/dist/app/assets/{erb-zLjY2fAl.js → erb-Cpvn4OXN.js} +1 -1
  97. package/dist/app/assets/{erlang-CrvXKUc7.js → erlang-D7Wv7F6m.js} +1 -1
  98. package/dist/app/assets/{etlua-DxWXCLko.js → etlua-N2-g8XE3.js} +1 -1
  99. package/dist/app/assets/{excel-formula-CiH5d6mo.js → excel-formula-Cw4Ab24c.js} +1 -1
  100. package/dist/app/assets/{factor-CnItKGC9.js → factor-BStQHdsr.js} +1 -1
  101. package/dist/app/assets/{false-DLECb57n.js → false-BlEwh5Vd.js} +1 -1
  102. package/dist/app/assets/{firestore-security-rules-D8JjUoJD.js → firestore-security-rules-BoAPZA3m.js} +1 -1
  103. package/dist/app/assets/{flow-DT0Fnhbu.js → flow-CUBvjiZo.js} +1 -1
  104. package/dist/app/assets/{flowDiagram-DWJPFMVM-DVfHA-q_.js → flowDiagram-DWJPFMVM-D2Bjlr_z.js} +1 -1
  105. package/dist/app/assets/{fortran-DFlxq4UW.js → fortran-B1Sxq__Q.js} +1 -1
  106. package/dist/app/assets/{fsharp-DDme86W7.js → fsharp-BSMB546x.js} +1 -1
  107. package/dist/app/assets/{ftl-BwMSYXiB.js → ftl-BuKOtUHg.js} +1 -1
  108. package/dist/app/assets/{ganttDiagram-T4ZO3ILL-BX62svu-.js → ganttDiagram-T4ZO3ILL-CKhlQBbj.js} +1 -1
  109. package/dist/app/assets/{gap-BNsR5yzD.js → gap-C7esBRUR.js} +1 -1
  110. package/dist/app/assets/{gcode-CQfdO1HP.js → gcode-CSOoiF0K.js} +1 -1
  111. package/dist/app/assets/{gdscript-gl_2iPqv.js → gdscript-D8g2Ew_b.js} +1 -1
  112. package/dist/app/assets/{gedcom-C6dWfgdF.js → gedcom-Y6NV1dOA.js} +1 -1
  113. package/dist/app/assets/{gherkin-BV8Q-Ik0.js → gherkin-Ael2lJbZ.js} +1 -1
  114. package/dist/app/assets/{git-DHK1vesx.js → git-BrnMxv7k.js} +1 -1
  115. package/dist/app/assets/{gitGraphDiagram-UUTBAWPF-BGdDTywt.js → gitGraphDiagram-UUTBAWPF-LfGc0_4G.js} +1 -1
  116. package/dist/app/assets/{glsl-Cttd0JqG.js → glsl-eyBBuWEz.js} +1 -1
  117. package/dist/app/assets/{gml-B1A7NVBI.js → gml-CIyVuxTV.js} +1 -1
  118. package/dist/app/assets/{gn-JTqPhQly.js → gn-BoEixtoM.js} +1 -1
  119. package/dist/app/assets/{go-DPP_uL2Z.js → go-PMtEnveV.js} +1 -1
  120. package/dist/app/assets/{go-module-DbFHis62.js → go-module-BITIjqE7.js} +1 -1
  121. package/dist/app/assets/{graph-Bvte0M4G.js → graph-Db4YdjHy.js} +1 -1
  122. package/dist/app/assets/{graphql-DmdIpbmB.js → graphql-BNykKyYV.js} +1 -1
  123. package/dist/app/assets/{groovy-DsONrbhy.js → groovy-UP4lI3F2.js} +1 -1
  124. package/dist/app/assets/{haml-Dt5fqj4m.js → haml-D5-Oeil3.js} +1 -1
  125. package/dist/app/assets/{handlebars-IWm0Rjeo.js → handlebars-rC5O1fKQ.js} +1 -1
  126. package/dist/app/assets/{haskell-CYqvIKUh.js → haskell-1MPzDJll.js} +1 -1
  127. package/dist/app/assets/{haxe-DNZaWUA6.js → haxe-CDQ14Qm9.js} +1 -1
  128. package/dist/app/assets/{hcl-BrFfKrsI.js → hcl-BrHSHT7r.js} +1 -1
  129. package/dist/app/assets/{hlsl-k83DlHUe.js → hlsl-ByJ0YyD8.js} +1 -1
  130. package/dist/app/assets/{hoon-BwGmnLFf.js → hoon-B4OItWIT.js} +1 -1
  131. package/dist/app/assets/{hpkp-DeruzFiI.js → hpkp-B-M7o-IY.js} +1 -1
  132. package/dist/app/assets/{hsts-9-LLFYdA.js → hsts-DPJNnaCG.js} +1 -1
  133. package/dist/app/assets/{http-C4MBAsdX.js → http-DoBNMUNG.js} +1 -1
  134. package/dist/app/assets/{ichigojam-BjuaS71I.js → ichigojam-CtW5s9_-.js} +1 -1
  135. package/dist/app/assets/{icon-B0i-wwut.js → icon-D-JQphN5.js} +1 -1
  136. package/dist/app/assets/{icu-message-format-eJ5-Ohmi.js → icu-message-format-ruU-kH-n.js} +1 -1
  137. package/dist/app/assets/{idris-DUmAppb-.js → idris-DnWSKw0X.js} +1 -1
  138. package/dist/app/assets/{iecst-AnSdtdbJ.js → iecst-Ci5w8cVm.js} +1 -1
  139. package/dist/app/assets/{ignore-BpkyQBzh.js → ignore-CXu1LoH2.js} +1 -1
  140. package/dist/app/assets/index-BYs7roX8.css +1 -0
  141. package/dist/app/assets/{index-BXQx0D-G.js → index-CEJlS2dp.js} +231 -231
  142. package/dist/app/assets/{infoDiagram-42DDH7IO-VnCCz30W.js → infoDiagram-42DDH7IO-CfplsLD4.js} +1 -1
  143. package/dist/app/assets/{inform7-BeHOP5Zh.js → inform7-CDxUTy2E.js} +1 -1
  144. package/dist/app/assets/{ini-CbPPFcs4.js → ini-DtN8RKTs.js} +1 -1
  145. package/dist/app/assets/{io-B8BGFXpt.js → io-COm0s1hx.js} +1 -1
  146. package/dist/app/assets/{ishikawaDiagram-UXIWVN3A-pUpo21Dr.js → ishikawaDiagram-UXIWVN3A-kVT7MqRm.js} +1 -1
  147. package/dist/app/assets/{j-CL5Cqy2S.js → j-D0zs7nnU.js} +1 -1
  148. package/dist/app/assets/{java-CRSZ4_i0.js → java-DX0EZWJL.js} +1 -1
  149. package/dist/app/assets/{javadoc-laXgJpIa.js → javadoc-Ct0le1Z6.js} +1 -1
  150. package/dist/app/assets/{javadoclike-BP-snd7e.js → javadoclike-DdyCh3Ml.js} +1 -1
  151. package/dist/app/assets/{javascript-j_7E8SeD.js → javascript-CqMb2XU5.js} +1 -1
  152. package/dist/app/assets/{javastacktrace-CD4IrClv.js → javastacktrace-gPffXgcv.js} +1 -1
  153. package/dist/app/assets/{jexl-Dp1-qlX6.js → jexl-xIqbcJ4L.js} +1 -1
  154. package/dist/app/assets/{jolie-DZ_hHQV4.js → jolie-UZATV5_w.js} +1 -1
  155. package/dist/app/assets/{journeyDiagram-VCZTEJTY-CzMRf4DY.js → journeyDiagram-VCZTEJTY-CcqrW3YN.js} +1 -1
  156. package/dist/app/assets/{jq-DkwgKP8o.js → jq-7K9kiw1a.js} +1 -1
  157. package/dist/app/assets/{js-extras-BjnvxeRw.js → js-extras-0lF_oqDI.js} +1 -1
  158. package/dist/app/assets/{js-templates-DZiqSSas.js → js-templates-Db6UNOsA.js} +1 -1
  159. package/dist/app/assets/{jsdoc-DIxcnHGw.js → jsdoc-DCS6XG5S.js} +1 -1
  160. package/dist/app/assets/{json-JqASQvqr.js → json-RXFeoV2Y.js} +1 -1
  161. package/dist/app/assets/{json5-DI2p3cKU.js → json5-RlAi90PW.js} +1 -1
  162. package/dist/app/assets/{jsonp-CP7LCInQ.js → jsonp-DOSjGjiK.js} +1 -1
  163. package/dist/app/assets/{jsstacktrace-BXNcxOuD.js → jsstacktrace-CXGC4Q7U.js} +1 -1
  164. package/dist/app/assets/{jsx-BOQSBv-m.js → jsx-ChPmvVoO.js} +1 -1
  165. package/dist/app/assets/{julia-CbvO5E_j.js → julia-CpFEfIO7.js} +1 -1
  166. package/dist/app/assets/{kanban-definition-6JOO6SKY-mcpkFjYC.js → kanban-definition-6JOO6SKY-CXaOHoj7.js} +1 -1
  167. package/dist/app/assets/{keepalived-Brl1UwyB.js → keepalived-BfciQnnM.js} +1 -1
  168. package/dist/app/assets/{keyman-Diwjm1-r.js → keyman-Ca5SVuI1.js} +1 -1
  169. package/dist/app/assets/{kotlin-BKZDWgsH.js → kotlin-S88hlBjn.js} +1 -1
  170. package/dist/app/assets/{kumir-BDMBH7lL.js → kumir-DG6o3rhN.js} +1 -1
  171. package/dist/app/assets/{kusto-DW7-bPDb.js → kusto-BQLO52bI.js} +1 -1
  172. package/dist/app/assets/{latex-BJdSHYdZ.js → latex-CfcJ3nQF.js} +1 -1
  173. package/dist/app/assets/{latte-BZ1XIgcZ.js → latte-BJxUJ_gi.js} +1 -1
  174. package/dist/app/assets/{layout-TszSIt1Y.js → layout-DUQlwvoW.js} +1 -1
  175. package/dist/app/assets/{less-hJWBNocb.js → less-IeSPRI_D.js} +1 -1
  176. package/dist/app/assets/{lilypond-CbQ9DblC.js → lilypond-CKi0LlX4.js} +1 -1
  177. package/dist/app/assets/{linear-BpYMP2cC.js → linear-BRaSI2Us.js} +1 -1
  178. package/dist/app/assets/{liquid-CdUQHvBV.js → liquid-CWLL6Srj.js} +1 -1
  179. package/dist/app/assets/{lisp-BxbBtxPt.js → lisp-cwdEE2gO.js} +1 -1
  180. package/dist/app/assets/{livescript-C5gTgPtX.js → livescript-BnHbVQm9.js} +1 -1
  181. package/dist/app/assets/{llvm-Bm7Rf7dU.js → llvm-IOZ65oFi.js} +1 -1
  182. package/dist/app/assets/{log-Dzfp6rwH.js → log-iR5kcnKw.js} +1 -1
  183. package/dist/app/assets/{lolcode-DBCWtmwh.js → lolcode-B2Je5E97.js} +1 -1
  184. package/dist/app/assets/{lua-DSwn1ZWT.js → lua-CxR4UFVY.js} +1 -1
  185. package/dist/app/assets/{magma-rFMMJRhy.js → magma-D8yVNW7j.js} +1 -1
  186. package/dist/app/assets/{makefile-BV53Gfpx.js → makefile-BwsVphsP.js} +1 -1
  187. package/dist/app/assets/{markdown-C1EQVW4O.js → markdown-DoIUfG6n.js} +1 -1
  188. package/dist/app/assets/{markup-iv8ZNCgp.js → markup-lSNw5NdD.js} +1 -1
  189. package/dist/app/assets/{markup-templating-DJDij_Hc.js → markup-templating-Dqecsm_5.js} +1 -1
  190. package/dist/app/assets/{matlab-B0c4hfFK.js → matlab-CYZZYmT0.js} +1 -1
  191. package/dist/app/assets/{maxscript-Dlhq7LWv.js → maxscript-CoVwzSKG.js} +1 -1
  192. package/dist/app/assets/{mel-BeVlAXHA.js → mel-CwGYOeaV.js} +1 -1
  193. package/dist/app/assets/{mermaid-eqTFwloS.js → mermaid-BbSlv0xT.js} +1 -1
  194. package/dist/app/assets/{min-CGAWvuO0.js → min-DcInW5uf.js} +1 -1
  195. package/dist/app/assets/{mindmap-definition-QFDTVHPH-CAH7tpSK.js → mindmap-definition-QFDTVHPH-B2tkKckz.js} +1 -1
  196. package/dist/app/assets/{mizar-DgcUJzeP.js → mizar-BAhpXtjk.js} +1 -1
  197. package/dist/app/assets/{mongodb-DEUSb5Ms.js → mongodb-Cx_vk1-h.js} +1 -1
  198. package/dist/app/assets/{monkey-CZ9HWoOK.js → monkey-Cp8-Sq3C.js} +1 -1
  199. package/dist/app/assets/{moonscript-Dvb9TLm6.js → moonscript-CT9x7rB1.js} +1 -1
  200. package/dist/app/assets/{n1ql-CyMHvsrH.js → n1ql-BxsKejG5.js} +1 -1
  201. package/dist/app/assets/{n4js-B_97r3VW.js → n4js-Cb2xMLYB.js} +1 -1
  202. package/dist/app/assets/{nand2tetris-hdl-pF2SYN8Z.js → nand2tetris-hdl-BCp78K37.js} +1 -1
  203. package/dist/app/assets/{naniscript-puXUSTvu.js → naniscript-DbYn6KX-.js} +1 -1
  204. package/dist/app/assets/{nasm-DH6-TBi3.js → nasm-8NRS9VNe.js} +1 -1
  205. package/dist/app/assets/{neon-Ce8N5E3x.js → neon-BmveA7rn.js} +1 -1
  206. package/dist/app/assets/{nevod-DjZ-qNQ5.js → nevod-C-o0U806.js} +1 -1
  207. package/dist/app/assets/{nginx-ClqxqDpv.js → nginx-CsPRsHth.js} +1 -1
  208. package/dist/app/assets/{nim-CLOp7ISH.js → nim-DjBoBJrI.js} +1 -1
  209. package/dist/app/assets/{nix-BUI1HHhR.js → nix-CfkFK_4X.js} +1 -1
  210. package/dist/app/assets/{nsis-CoZWs28s.js → nsis-oX0BO1CF.js} +1 -1
  211. package/dist/app/assets/{objectivec-D7oxiJtv.js → objectivec-DTrD7w8V.js} +1 -1
  212. package/dist/app/assets/{ocaml-BZADKYY4.js → ocaml-CvB-CUyk.js} +1 -1
  213. package/dist/app/assets/{opencl-D_x8M_l6.js → opencl-BBJBsX4d.js} +1 -1
  214. package/dist/app/assets/{openqasm-DUe_Xd8r.js → openqasm-DB7mfscI.js} +1 -1
  215. package/dist/app/assets/{oz-C0f0E8I7.js → oz-BvTx7AIJ.js} +1 -1
  216. package/dist/app/assets/{parigp-DXzTc1rx.js → parigp-C9t14Vny.js} +1 -1
  217. package/dist/app/assets/{parser-C_eB_SAO.js → parser-DGgh-9XZ.js} +1 -1
  218. package/dist/app/assets/{pascal-BuDaRABN.js → pascal-CBrywbV2.js} +1 -1
  219. package/dist/app/assets/{pascaligo-DsQ5vX0o.js → pascaligo-DlaweMAR.js} +1 -1
  220. package/dist/app/assets/{pcaxis-Dp8ons9r.js → pcaxis-BP161RoS.js} +1 -1
  221. package/dist/app/assets/{peoplecode-D9Dy5D6r.js → peoplecode-ClPNXeMD.js} +1 -1
  222. package/dist/app/assets/{perl-IW2mnDG4.js → perl-B82k98ZA.js} +1 -1
  223. package/dist/app/assets/{php-C9wJbpXc.js → php-O_5ku-VG.js} +1 -1
  224. package/dist/app/assets/{php-extras-Dd0NGkAH.js → php-extras-DWUC7Ivz.js} +1 -1
  225. package/dist/app/assets/{phpdoc-DcttAIG_.js → phpdoc-Bek4yNUS.js} +1 -1
  226. package/dist/app/assets/{pieDiagram-DEJITSTG-D4cgvpRm.js → pieDiagram-DEJITSTG-CYEVSkhe.js} +1 -1
  227. package/dist/app/assets/{plsql-CvlRFEAJ.js → plsql-BlaQ9IoK.js} +1 -1
  228. package/dist/app/assets/{powerquery-BMKyritt.js → powerquery-Cx3Q-AYE.js} +1 -1
  229. package/dist/app/assets/{powershell-CAfpBbTC.js → powershell-3RLc3t0u.js} +1 -1
  230. package/dist/app/assets/{processing-DjYuzcaq.js → processing-AnTfwD0V.js} +1 -1
  231. package/dist/app/assets/{prolog-Ce-zjLfE.js → prolog-OvZLjDSo.js} +1 -1
  232. package/dist/app/assets/{promql-B5pdwV0L.js → promql-CuPGcqxq.js} +1 -1
  233. package/dist/app/assets/{properties-BizCduLB.js → properties-CKY9tON-.js} +1 -1
  234. package/dist/app/assets/{protobuf-BeXj0NkT.js → protobuf-CSGANi1A.js} +1 -1
  235. package/dist/app/assets/{psl-CCOrF3fG.js → psl-sDRzvTjB.js} +1 -1
  236. package/dist/app/assets/{pug-DBfhqVrT.js → pug-DI3BTEgs.js} +1 -1
  237. package/dist/app/assets/{puppet-cskfrihC.js → puppet-Dt9puHvs.js} +1 -1
  238. package/dist/app/assets/{pure-uP7Go2xi.js → pure-BibINdVm.js} +1 -1
  239. package/dist/app/assets/{purebasic-BzxFuhCY.js → purebasic-lfEZm_bJ.js} +1 -1
  240. package/dist/app/assets/{purescript-DAclKDFj.js → purescript-CjgjVGu8.js} +1 -1
  241. package/dist/app/assets/{q-Dj4c9jzw.js → q-CKYhNuGi.js} +1 -1
  242. package/dist/app/assets/{qml-C_WQAySg.js → qml-D5Il6_Lm.js} +1 -1
  243. package/dist/app/assets/{qore-C-UzVsUa.js → qore-C1uyIaih.js} +1 -1
  244. package/dist/app/assets/{qsharp-DhHVFASC.js → qsharp-Cde7m626.js} +1 -1
  245. package/dist/app/assets/{quadrantDiagram-34T5L4WZ-D76oNip7.js → quadrantDiagram-34T5L4WZ-CunYrfOP.js} +1 -1
  246. package/dist/app/assets/{r-CBOEAXGr.js → r-DTIfuxk3.js} +1 -1
  247. package/dist/app/assets/{racket-DVu6Dqdf.js → racket-CdH21hBI.js} +1 -1
  248. package/dist/app/assets/{reason-ETO6PU0a.js → reason-CoSJZFLF.js} +1 -1
  249. package/dist/app/assets/{regex-B_1z9nrW.js → regex-DLD55Glh.js} +1 -1
  250. package/dist/app/assets/{rego-CMx1q3ma.js → rego-BT2cOd8A.js} +1 -1
  251. package/dist/app/assets/{renpy-BNXwhZ6y.js → renpy-CuruShcb.js} +1 -1
  252. package/dist/app/assets/{requirementDiagram-MS252O5E-Cub81lLN.js → requirementDiagram-MS252O5E-2bmxoCD4.js} +1 -1
  253. package/dist/app/assets/{rest-C7Ju3aO_.js → rest-WCDfoasX.js} +1 -1
  254. package/dist/app/assets/{rip-BezD6ReZ.js → rip-DGv3__zG.js} +1 -1
  255. package/dist/app/assets/{roboconf-BCYNMrkD.js → roboconf-Bas02wjc.js} +1 -1
  256. package/dist/app/assets/{robotframework-DBnHxJ-E.js → robotframework-tGFzRD3G.js} +1 -1
  257. package/dist/app/assets/{ruby-DEY5WIqS.js → ruby-D8vE-7go.js} +1 -1
  258. package/dist/app/assets/{rust-DUoyQ2zP.js → rust-D9nPw-HY.js} +1 -1
  259. package/dist/app/assets/{sankeyDiagram-XADWPNL6-PiusOvgK.js → sankeyDiagram-XADWPNL6-DDJJQgu9.js} +1 -1
  260. package/dist/app/assets/{sas-4TFbJJbx.js → sas-CNQe8fmQ.js} +1 -1
  261. package/dist/app/assets/{sass-dE1FNaVr.js → sass-WIrPITxq.js} +1 -1
  262. package/dist/app/assets/{scala-Zhswyjm9.js → scala-BRyS8fHn.js} +1 -1
  263. package/dist/app/assets/{scheme-BTDb7rYq.js → scheme-sMkeVGM2.js} +1 -1
  264. package/dist/app/assets/{scss-5ZfA9WbF.js → scss-DScK7EFk.js} +1 -1
  265. package/dist/app/assets/{sequenceDiagram-FGHM5R23-B_xi91rE.js → sequenceDiagram-FGHM5R23--RbLQXIN.js} +1 -1
  266. package/dist/app/assets/{shell-session-Hwk6YMvp.js → shell-session-B7NWU4lC.js} +1 -1
  267. package/dist/app/assets/{smali-BvKNDUVq.js → smali-BHax8EIi.js} +1 -1
  268. package/dist/app/assets/{smalltalk-Cuj_IZOI.js → smalltalk-BT1-CEp0.js} +1 -1
  269. package/dist/app/assets/{smarty-YDqi5bLB.js → smarty-C8hT76Fl.js} +1 -1
  270. package/dist/app/assets/{sml-Cj6DYVC8.js → sml-CxB1b1Av.js} +1 -1
  271. package/dist/app/assets/{solidity-a7YwsEGV.js → solidity-CMhwxrSt.js} +1 -1
  272. package/dist/app/assets/{solution-file-D9JBb3wE.js → solution-file-DF2RWpk2.js} +1 -1
  273. package/dist/app/assets/{soy-CaAOEVjI.js → soy-BquGnVo6.js} +1 -1
  274. package/dist/app/assets/{sparql-DyXPgrW0.js → sparql-DsXRgXrC.js} +1 -1
  275. package/dist/app/assets/{splunk-spl-BIkU0fAL.js → splunk-spl-DU6lZWvQ.js} +1 -1
  276. package/dist/app/assets/{sqf-D57PcZVb.js → sqf-DuBryCfn.js} +1 -1
  277. package/dist/app/assets/{sql-MukaihY4.js → sql-DKbJMmuW.js} +1 -1
  278. package/dist/app/assets/{squirrel-CzYXWy6S.js → squirrel-CU-sQYjH.js} +1 -1
  279. package/dist/app/assets/{stan-FpLekD3U.js → stan-DorDVDUl.js} +1 -1
  280. package/dist/app/assets/{stateDiagram-FHFEXIEX-CpS745KL.js → stateDiagram-FHFEXIEX-B2u0vNWm.js} +1 -1
  281. package/dist/app/assets/stateDiagram-v2-QKLJ7IA2-BSCHSkf5.js +1 -0
  282. package/dist/app/assets/{stylus-CLeCT1Qf.js → stylus-DtDJOQrY.js} +1 -1
  283. package/dist/app/assets/{swift-CpMxUQeA.js → swift-1SZPUwjy.js} +1 -1
  284. package/dist/app/assets/{systemd-CGjsVDc1.js → systemd-B5Z6ff1T.js} +1 -1
  285. package/dist/app/assets/{t4-cs-ChnaFLT7.js → t4-cs-CTScVUI-.js} +1 -1
  286. package/dist/app/assets/{t4-templating-B5pWafb8.js → t4-templating-CnFzEH8T.js} +1 -1
  287. package/dist/app/assets/{t4-vb-DK65bsRV.js → t4-vb-BU2-1O3l.js} +1 -1
  288. package/dist/app/assets/{tap-BjFFJfCu.js → tap-9vuRf2zf.js} +1 -1
  289. package/dist/app/assets/{tcl-6ZH-Ye76.js → tcl-4WzMBc3u.js} +1 -1
  290. package/dist/app/assets/{textile-Biidr0CK.js → textile-BJ9xWM53.js} +1 -1
  291. package/dist/app/assets/{timeline-definition-GMOUNBTQ-B71aIAPy.js → timeline-definition-GMOUNBTQ-C7wox-Nh.js} +1 -1
  292. package/dist/app/assets/{toml-CbA-hSQN.js → toml-CIfJtDJm.js} +1 -1
  293. package/dist/app/assets/{tremor-XnVSNc97.js → tremor-BCPKs7zG.js} +1 -1
  294. package/dist/app/assets/{tt2-Db0GSjWI.js → tt2-8cKWRoIL.js} +1 -1
  295. package/dist/app/assets/{turtle-bkAg37hd.js → turtle-BOX54zyV.js} +1 -1
  296. package/dist/app/assets/{twig-WKrEkAVe.js → twig-C8LLL6cb.js} +1 -1
  297. package/dist/app/assets/{typescript-CbA_8yl0.js → typescript-X2aSEXrA.js} +1 -1
  298. package/dist/app/assets/{typoscript-CNl71QFr.js → typoscript-D5ZXmrkV.js} +1 -1
  299. package/dist/app/assets/{unrealscript-Rq94tMZ9.js → unrealscript-D9UBRGN5.js} +1 -1
  300. package/dist/app/assets/{uorazor-5bxvkQjZ.js → uorazor-CTTqi2r1.js} +1 -1
  301. package/dist/app/assets/{uri-XOJXvqEY.js → uri-BFLn9hb5.js} +1 -1
  302. package/dist/app/assets/{v-DB2Yd9Sg.js → v-nb9ocvxh.js} +1 -1
  303. package/dist/app/assets/{vala-DZyPUHGF.js → vala-nEOqY-nY.js} +1 -1
  304. package/dist/app/assets/{vbnet-PpzMKvFE.js → vbnet-xRfCkZLw.js} +1 -1
  305. package/dist/app/assets/{velocity-qwehq1WR.js → velocity-DMb5Eobp.js} +1 -1
  306. package/dist/app/assets/{vennDiagram-DHZGUBPP-w6jfcHyz.js → vennDiagram-DHZGUBPP-BE_sjtU1.js} +1 -1
  307. package/dist/app/assets/{verilog-BaX6ehBO.js → verilog-MF3DQwrp.js} +1 -1
  308. package/dist/app/assets/{vhdl-CJ4oaOIm.js → vhdl-CaG_lZvs.js} +1 -1
  309. package/dist/app/assets/{vim-DsX1ZLAr.js → vim-DWEsvdkG.js} +1 -1
  310. package/dist/app/assets/{visual-basic-DcOgtvaV.js → visual-basic-BtAZxtsd.js} +1 -1
  311. package/dist/app/assets/{wardley-RL74JXVD-C6_5QD5-.js → wardley-RL74JXVD-BFsqjqU9.js} +1 -1
  312. package/dist/app/assets/{wardleyDiagram-NUSXRM2D-OBOS76Xf.js → wardleyDiagram-NUSXRM2D-BRCBl_Bo.js} +1 -1
  313. package/dist/app/assets/{warpscript-CsjaYEbC.js → warpscript-DaB6pxgc.js} +1 -1
  314. package/dist/app/assets/{wasm-C4s0Rskl.js → wasm-CYNiAZ8m.js} +1 -1
  315. package/dist/app/assets/{web-idl-CSSCDVy0.js → web-idl-BShUjsSx.js} +1 -1
  316. package/dist/app/assets/{wiki-B3uxFlGO.js → wiki-C92dpb1x.js} +1 -1
  317. package/dist/app/assets/{wolfram-BwGO75HU.js → wolfram-DpSRxPHz.js} +1 -1
  318. package/dist/app/assets/{wren-C57hzETc.js → wren-D33pCTT5.js} +1 -1
  319. package/dist/app/assets/{xeora-DrSuSyRC.js → xeora-Db0qw0Q1.js} +1 -1
  320. package/dist/app/assets/{xml-doc-CaRS8bMN.js → xml-doc-BlQp7vTd.js} +1 -1
  321. package/dist/app/assets/{xojo-C5eIw0DD.js → xojo-4-mS_JMd.js} +1 -1
  322. package/dist/app/assets/{xquery-BxZFMYbk.js → xquery-CHe6I6si.js} +1 -1
  323. package/dist/app/assets/{xychartDiagram-5P7HB3ND-zh-yE8PC.js → xychartDiagram-5P7HB3ND-k81eXzby.js} +1 -1
  324. package/dist/app/assets/{yaml-CwtSqOBb.js → yaml-CKVNhYrk.js} +1 -1
  325. package/dist/app/assets/{yang-DeNE_vI5.js → yang-CBuNW7y-.js} +1 -1
  326. package/dist/app/assets/{zig-AMjIOt6c.js → zig-rCC2YzXf.js} +1 -1
  327. package/dist/app/index.html +2 -2
  328. package/dist/index.cjs +788 -400
  329. package/dist/index.js +812 -424
  330. package/package.json +4 -4
  331. package/dist/app/assets/channel-Cuf4hwrt.js +0 -1
  332. package/dist/app/assets/classDiagram-6PBFFD2Q-y-yLSjJ4.js +0 -1
  333. package/dist/app/assets/classDiagram-v2-HSJHXN6E-y-yLSjJ4.js +0 -1
  334. package/dist/app/assets/clone-DHJkspmJ.js +0 -1
  335. package/dist/app/assets/index-BUlNsn5y.css +0 -1
  336. package/dist/app/assets/stateDiagram-v2-QKLJ7IA2-49AEvAwI.js +0 -1
package/dist/index.cjs CHANGED
@@ -3174,6 +3174,7 @@ var en_US_default = {
3174
3174
  shell: {
3175
3175
  success: "Success",
3176
3176
  running: "Running",
3177
+ paused: "Paused",
3177
3178
  failed: "Failed",
3178
3179
  exitCode: "Exit code {{code}}",
3179
3180
  ranCommand: "Ran {{command}}",
@@ -3210,6 +3211,28 @@ var en_US_default = {
3210
3211
  }
3211
3212
  }
3212
3213
  }
3214
+ },
3215
+ threadControl: {
3216
+ branch: "Conversation branch",
3217
+ branchNumber: "Branch {{number}}",
3218
+ pause: "Pause workflow",
3219
+ resume: "Resume workflow",
3220
+ cancelRun: "Stop task",
3221
+ pausing: "Saving and pausing\u2026",
3222
+ paused: "Workflow paused",
3223
+ editMessage: "Edit message",
3224
+ sourcePauseUnavailable: "The original task cannot be paused yet. Try again after it finishes.",
3225
+ discardEdit: "Cancel",
3226
+ saveBranch: "Send",
3227
+ status: {
3228
+ busy: "Running",
3229
+ pausing: "Pausing",
3230
+ paused: "Paused",
3231
+ idle: "Idle",
3232
+ interrupted: "Waiting",
3233
+ error: "Error",
3234
+ running: "Running"
3235
+ }
3213
3236
  }
3214
3237
  };
3215
3238
 
@@ -3791,6 +3814,7 @@ var zh_CN_default = {
3791
3814
  shell: {
3792
3815
  success: "\u6210\u529F",
3793
3816
  running: "\u8FD0\u884C\u4E2D",
3817
+ paused: "\u5DF2\u6682\u505C",
3794
3818
  failed: "\u5931\u8D25",
3795
3819
  exitCode: "\u9000\u51FA\u7801 {{code}}",
3796
3820
  ranCommand: "\u5DF2\u8FD0\u884C {{command}}",
@@ -3827,6 +3851,28 @@ var zh_CN_default = {
3827
3851
  }
3828
3852
  }
3829
3853
  }
3854
+ },
3855
+ threadControl: {
3856
+ branch: "\u5386\u53F2\u5206\u652F",
3857
+ branchNumber: "\u5206\u652F {{number}}",
3858
+ pause: "\u6682\u505C\u6D41\u7A0B",
3859
+ resume: "\u6062\u590D\u6D41\u7A0B",
3860
+ cancelRun: "\u505C\u6B62\u4EFB\u52A1",
3861
+ pausing: "\u6B63\u5728\u4FDD\u5B58\u5E76\u6682\u505C\u2026",
3862
+ paused: "\u6D41\u7A0B\u5DF2\u6682\u505C",
3863
+ editMessage: "\u7F16\u8F91\u6D88\u606F",
3864
+ sourcePauseUnavailable: "\u539F\u4EFB\u52A1\u6682\u4E0D\u652F\u6301\u6682\u505C\uFF0C\u8BF7\u5728\u4EFB\u52A1\u5B8C\u6210\u540E\u91CD\u8BD5\u3002",
3865
+ discardEdit: "\u53D6\u6D88",
3866
+ saveBranch: "\u53D1\u9001",
3867
+ status: {
3868
+ busy: "\u8FD0\u884C\u4E2D",
3869
+ pausing: "\u6B63\u5728\u6682\u505C",
3870
+ paused: "\u5DF2\u6682\u505C",
3871
+ idle: "\u7A7A\u95F2",
3872
+ interrupted: "\u7B49\u5F85\u5904\u7406",
3873
+ error: "\u51FA\u9519",
3874
+ running: "\u8FD0\u884C\u4E2D"
3875
+ }
3830
3876
  }
3831
3877
  };
3832
3878
 
@@ -8102,26 +8148,36 @@ function SendButton({
8102
8148
  disabled = false,
8103
8149
  isLoading = false,
8104
8150
  showStop = isLoading,
8151
+ stopDisabled = false,
8105
8152
  onStop,
8106
8153
  stopLabel = "Stop",
8154
+ showResume = false,
8155
+ resumeDisabled = false,
8156
+ onResume,
8157
+ resumeLabel = "Resume",
8107
8158
  sendLabel = "Send",
8108
8159
  shortcuts
8109
8160
  }) {
8110
- if (showStop) {
8161
+ if (showStop || showResume) {
8162
+ const label = showStop ? stopLabel : resumeLabel;
8163
+ const Icon = showStop ? import_lucide_react11.Square : import_lucide_react11.Play;
8111
8164
  return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
8112
8165
  "button",
8113
8166
  {
8114
8167
  type: "button",
8115
- onClick: onStop,
8168
+ onClick: showStop ? onStop : onResume,
8169
+ disabled: showStop ? stopDisabled : resumeDisabled,
8116
8170
  className: cn(
8117
8171
  "flex size-8 shrink-0 cursor-pointer items-center justify-center rounded-full",
8118
8172
  "bg-foreground text-background",
8119
8173
  "transition-transform duration-150 ease-out",
8120
- "hover:scale-105 active:scale-95"
8174
+ "hover:scale-105 active:scale-95",
8175
+ "disabled:opacity-40 disabled:cursor-not-allowed disabled:hover:scale-100"
8121
8176
  ),
8122
- "aria-label": stopLabel,
8177
+ "aria-label": label,
8178
+ title: label,
8123
8179
  children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
8124
- import_lucide_react11.Square,
8180
+ Icon,
8125
8181
  {
8126
8182
  size: 14,
8127
8183
  fill: "currentColor",
@@ -12198,6 +12254,10 @@ function markIncompleteAgentRunStatusSuccess(node) {
12198
12254
  }
12199
12255
  function buildAssistantRenderTree(message) {
12200
12256
  const rootExecutionId = message.executionId;
12257
+ const rootExecutionIds = /* @__PURE__ */ new Set([
12258
+ rootExecutionId,
12259
+ ...message.rootExecutionIds ?? []
12260
+ ]);
12201
12261
  const runs = (message.agentRuns ?? []).filter(
12202
12262
  (run) => !isMiddlewareAgentRunInfo(run)
12203
12263
  );
@@ -12211,7 +12271,7 @@ function buildAssistantRenderTree(message) {
12211
12271
  });
12212
12272
  for (const entry of entries) {
12213
12273
  const target = getEntryRunTarget(entry, runs, rootExecutionId);
12214
- const shouldGroup = Boolean(target?.executionId) && (target?.executionId !== rootExecutionId || Boolean(target?.parentExecutionId));
12274
+ const shouldGroup = Boolean(target?.executionId) && (!rootExecutionIds.has(target?.executionId) || Boolean(target?.parentExecutionId));
12215
12275
  if (!target || !shouldGroup) {
12216
12276
  if (entry.source === "reasoning" && typeof entry.item !== "string") {
12217
12277
  rootReasoning.push(entry.item);
@@ -12230,11 +12290,11 @@ function buildAssistantRenderTree(message) {
12230
12290
  }
12231
12291
  const roots = [];
12232
12292
  for (const node of nodes.values()) {
12233
- if (node.id === rootExecutionId && !node.info.parentId) {
12293
+ if (rootExecutionIds.has(node.id) && !node.info.parentId && !node.info.parentExecutionId) {
12234
12294
  continue;
12235
12295
  }
12236
12296
  const parentId = node.info.parentId ?? node.info.parentExecutionId;
12237
- if (parentId && parentId !== rootExecutionId && parentId !== node.id) {
12297
+ if (parentId && !rootExecutionIds.has(parentId) && parentId !== node.id) {
12238
12298
  const parent = nodes.get(parentId);
12239
12299
  if (parent) {
12240
12300
  parent.children.push(node);
@@ -14001,14 +14061,11 @@ function ContextCompressionIcon({
14001
14061
  }) {
14002
14062
  const status = data.status ?? "running";
14003
14063
  const skipped = isSkipped(status, data.reason);
14004
- if (status === "running") {
14005
- return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_lucide_react27.Loader2, { "aria-hidden": "true", className: "h-4 w-4 shrink-0 animate-spin" });
14006
- }
14007
14064
  if (status === "fail") {
14008
14065
  return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_lucide_react27.XCircle, { "aria-hidden": "true", className: "h-4 w-4 shrink-0" });
14009
14066
  }
14010
14067
  return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
14011
- import_lucide_react27.FileText,
14068
+ import_lucide_react27.ScrollText,
14012
14069
  {
14013
14070
  "aria-hidden": "true",
14014
14071
  className: cn("h-4 w-4 shrink-0", skipped && "opacity-80")
@@ -14029,13 +14086,13 @@ function ContextCompressionMessage({
14029
14086
  const status = data.status ?? "running";
14030
14087
  const tooltipText = getTooltipText(data, i18n2.language);
14031
14088
  const label = /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(ContextCompressionLabel, { data });
14032
- const center = /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(
14089
+ const row = /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(
14033
14090
  "div",
14034
14091
  {
14035
14092
  className: cn(
14036
- "inline-flex max-w-[80%] shrink-0 items-center gap-1.5 rounded-md px-2 py-1 text-sm font-medium text-muted-foreground transition-colors hover:bg-muted hover:text-foreground",
14037
- tooltipText && "cursor-help",
14038
- status === "fail" && "text-destructive hover:text-destructive"
14093
+ "inline-flex max-w-full min-w-0 items-center gap-2 text-left text-sm font-medium text-muted-foreground transition-opacity",
14094
+ tooltipText && "cursor-help hover:opacity-100",
14095
+ status === "fail" ? "text-destructive" : "opacity-60"
14039
14096
  ),
14040
14097
  children: [
14041
14098
  /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(ContextCompressionIcon, { data }),
@@ -14043,7 +14100,7 @@ function ContextCompressionMessage({
14043
14100
  "span",
14044
14101
  {
14045
14102
  className: cn(
14046
- "truncate",
14103
+ "min-w-0 truncate",
14047
14104
  status === "running" && "ck-tool-call-running-text"
14048
14105
  ),
14049
14106
  children: label
@@ -14052,21 +14109,17 @@ function ContextCompressionMessage({
14052
14109
  ]
14053
14110
  }
14054
14111
  );
14055
- return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("div", { className: "flex w-full items-center justify-center gap-3 py-6", children: [
14056
- /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { className: "h-px min-w-8 flex-1 bg-border" }),
14057
- tooltipText ? /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(Tooltip, { children: [
14058
- /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(TooltipTrigger, { asChild: true, children: center }),
14059
- /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
14060
- TooltipContent,
14061
- {
14062
- side: "top",
14063
- className: "max-h-80 max-w-xl overflow-auto whitespace-pre-wrap text-left text-xs leading-5",
14064
- children: tooltipText
14065
- }
14066
- )
14067
- ] }) : center,
14068
- /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { className: "h-px min-w-8 flex-1 bg-border" })
14069
- ] });
14112
+ return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { className: "px-1 py-1", children: tooltipText ? /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(Tooltip, { children: [
14113
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(TooltipTrigger, { asChild: true, children: row }),
14114
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
14115
+ TooltipContent,
14116
+ {
14117
+ side: "top",
14118
+ className: "max-h-80 max-w-xl overflow-auto whitespace-pre-wrap text-left text-xs leading-5",
14119
+ children: tooltipText
14120
+ }
14121
+ )
14122
+ ] }) : row });
14070
14123
  }
14071
14124
 
14072
14125
  // src/components/thread/messages/knowledge-retriever-component-renderer.tsx
@@ -14651,12 +14704,16 @@ function ShellCopyButton({
14651
14704
  }
14652
14705
  function SandboxShellStatus({
14653
14706
  data,
14654
- exitCode
14707
+ exitCode,
14708
+ isPaused
14655
14709
  }) {
14656
14710
  const { t } = useChatkitTranslation();
14657
14711
  if (exitCode !== null) {
14658
14712
  return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("span", { className: "text-muted-foreground/90", children: t("message.toolGroup.shell.exitCode", { code: exitCode }) });
14659
14713
  }
14714
+ if (isPaused && data.status === "running") {
14715
+ return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("span", { className: "text-muted-foreground/90", children: t("message.toolGroup.shell.paused") });
14716
+ }
14660
14717
  if (data.status === "running") {
14661
14718
  return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("span", { className: "text-muted-foreground/90", children: t("message.toolGroup.shell.running") });
14662
14719
  }
@@ -14668,7 +14725,10 @@ function SandboxShellStatus({
14668
14725
  t("message.toolGroup.shell.success")
14669
14726
  ] });
14670
14727
  }
14671
- function SandboxShellToolCallCard({ data }) {
14728
+ function SandboxShellToolCallCard({
14729
+ data,
14730
+ isPaused
14731
+ }) {
14672
14732
  const { i18n: i18n2 } = useChatkitTranslation();
14673
14733
  const command = getSandboxShellCommand(data, i18n2.language);
14674
14734
  const formattedCommand = formatShellCommand(command);
@@ -14745,7 +14805,7 @@ function SandboxShellToolCallCard({ data }) {
14745
14805
  "mt-3 flex shrink-0 justify-end in-data-[density=compact]:mt-2 in-data-[density=spacious]:mt-4",
14746
14806
  SANDBOX_SHELL_TEXT_CLASS
14747
14807
  ),
14748
- children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(SandboxShellStatus, { data, exitCode })
14808
+ children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(SandboxShellStatus, { data, exitCode, isPaused })
14749
14809
  }
14750
14810
  )
14751
14811
  ]
@@ -15048,8 +15108,11 @@ function parseStepDate(value) {
15048
15108
  function isThreadKnownIdle(isThreadRunning) {
15049
15109
  return isThreadRunning === false;
15050
15110
  }
15051
- function getEffectiveToolStepStatus(data, isThreadRunning) {
15052
- if (data.status === "running" && isThreadKnownIdle(isThreadRunning)) {
15111
+ function isPausedToolStep(data, isThreadPaused) {
15112
+ return data.status === "running" && isThreadPaused === true;
15113
+ }
15114
+ function getEffectiveToolStepStatus(data, isThreadRunning, isThreadPaused) {
15115
+ if (data.status === "running" && isThreadKnownIdle(isThreadRunning) && !isPausedToolStep(data, isThreadPaused)) {
15053
15116
  return "fail";
15054
15117
  }
15055
15118
  return data.status;
@@ -15090,9 +15153,10 @@ function useToolStepDurationLabel(data, options) {
15090
15153
  const createdAt = parseStepDate(data.created_date);
15091
15154
  const explicitEndedAt = parseStepDate(data.end_date);
15092
15155
  const status = options?.status ?? data.status;
15093
- const endedAt = explicitEndedAt ?? (status !== "running" ? options?.fallbackEndedAt ?? null : null);
15156
+ const isElapsing = status === "running" && !options?.isPaused;
15157
+ const endedAt = explicitEndedAt ?? (!isElapsing ? options?.fallbackEndedAt ?? null : null);
15094
15158
  React45.useEffect(() => {
15095
- if (status !== "running" || createdAt === null || endedAt !== null) {
15159
+ if (!isElapsing || createdAt === null || endedAt !== null) {
15096
15160
  return;
15097
15161
  }
15098
15162
  setDurationNow(Date.now());
@@ -15102,7 +15166,7 @@ function useToolStepDurationLabel(data, options) {
15102
15166
  return () => {
15103
15167
  window.clearInterval(timer);
15104
15168
  };
15105
- }, [createdAt, endedAt, status]);
15169
+ }, [createdAt, endedAt, isElapsing]);
15106
15170
  if (createdAt === null) return null;
15107
15171
  const durationMs = Math.max(0, (endedAt ?? durationNow) - createdAt);
15108
15172
  return formatStepDuration2(durationMs);
@@ -15589,11 +15653,20 @@ function DefaultToolCallOutput({
15589
15653
  output !== null ? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(ToolCallValueBlock, { value: output }) : null
15590
15654
  ] });
15591
15655
  }
15592
- function ToolCallDetails({ content }) {
15656
+ function ToolCallDetails({
15657
+ content,
15658
+ isThreadPaused
15659
+ }) {
15593
15660
  const { i18n: i18n2, t } = useChatkitTranslation();
15594
15661
  const data = getToolStepData(content);
15595
15662
  if (isSandboxShellStep(data)) {
15596
- return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: "ml-2 mt-1", children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(SandboxShellToolCallCard, { data }) });
15663
+ return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: "ml-2 mt-1", children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
15664
+ SandboxShellToolCallCard,
15665
+ {
15666
+ data,
15667
+ isPaused: isPausedToolStep(data, isThreadPaused)
15668
+ }
15669
+ ) });
15597
15670
  }
15598
15671
  const renderer = getComponentMessageRenderer(content, data);
15599
15672
  const hasCustomDetails = data.error === void 0 && hasComponentMessageRendererDetails(renderer, content, data);
@@ -15622,17 +15695,23 @@ function ToolCallDetails({ content }) {
15622
15695
  ] });
15623
15696
  }
15624
15697
  function areToolCallRowPropsEqual(previous, next) {
15625
- return previous.content.id === next.content.id && previous.content.data === next.content.data && previous.isThreadRunning === next.isThreadRunning && previous.organizationId === next.organizationId && previous.apiUrl === next.apiUrl;
15698
+ return previous.content.id === next.content.id && previous.content.data === next.content.data && previous.isThreadRunning === next.isThreadRunning && previous.isThreadPaused === next.isThreadPaused && previous.organizationId === next.organizationId && previous.apiUrl === next.apiUrl;
15626
15699
  }
15627
15700
  function ToolCallRowContent({
15628
15701
  content,
15629
15702
  isThreadRunning,
15703
+ isThreadPaused,
15630
15704
  organizationId,
15631
15705
  apiUrl
15632
15706
  }) {
15633
15707
  const { i18n: i18n2, t } = useChatkitTranslation();
15634
15708
  const data = getToolStepData(content);
15635
- const status = getEffectiveToolStepStatus(data, isThreadRunning);
15709
+ const isPaused = isPausedToolStep(data, isThreadPaused);
15710
+ const status = getEffectiveToolStepStatus(
15711
+ data,
15712
+ isThreadRunning,
15713
+ isThreadPaused
15714
+ );
15636
15715
  const hasError = status === "fail" || Boolean(data.error);
15637
15716
  const isSandboxShell = isSandboxShellStep(data);
15638
15717
  const detailsId = React45.useId();
@@ -15641,11 +15720,12 @@ function ToolCallRowContent({
15641
15720
  const hasCustomDetails = data.error === void 0 && hasComponentMessageRendererDetails(renderer, content, data);
15642
15721
  const hasDetails = isSandboxShell || data.input !== void 0 || data.error !== void 0 || data.output !== void 0 || data.artifact !== void 0 || hasCustomDetails;
15643
15722
  const fallbackEndedAt = useFrozenTimestamp(
15644
- data.status === "running" && status === "fail"
15723
+ data.status === "running" && (status === "fail" || isPaused)
15645
15724
  );
15646
15725
  const durationLabel = useToolStepDurationLabel(data, {
15647
15726
  status,
15648
- fallbackEndedAt
15727
+ fallbackEndedAt,
15728
+ isPaused
15649
15729
  });
15650
15730
  const [isExpanded, setIsExpanded] = React45.useState(false);
15651
15731
  React45.useEffect(() => {
@@ -15688,7 +15768,7 @@ function ToolCallRowContent({
15688
15768
  {
15689
15769
  className: cn(
15690
15770
  "min-w-0 truncate",
15691
- status === "running" && "ck-tool-call-running-text"
15771
+ status === "running" && !isPaused && "ck-tool-call-running-text"
15692
15772
  ),
15693
15773
  title: label,
15694
15774
  children: label
@@ -15708,7 +15788,7 @@ function ToolCallRowContent({
15708
15788
  ]
15709
15789
  }
15710
15790
  ),
15711
- hasDetails && isExpanded ? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { id: detailsId, children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(ToolCallDetails, { content }) }) : null
15791
+ hasDetails && isExpanded ? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { id: detailsId, children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(ToolCallDetails, { content, isThreadPaused }) }) : null
15712
15792
  ] });
15713
15793
  }
15714
15794
  var ToolCallRow = React45.memo(ToolCallRowContent, areToolCallRowPropsEqual);
@@ -15717,6 +15797,7 @@ function ToolComponentGroup({
15717
15797
  items,
15718
15798
  hasFollowingItem,
15719
15799
  isThreadRunning,
15800
+ isThreadPaused,
15720
15801
  organizationId,
15721
15802
  apiUrl
15722
15803
  }) {
@@ -15772,6 +15853,7 @@ function ToolComponentGroup({
15772
15853
  {
15773
15854
  content: item,
15774
15855
  isThreadRunning,
15856
+ isThreadPaused,
15775
15857
  organizationId,
15776
15858
  apiUrl
15777
15859
  },
@@ -18403,6 +18485,7 @@ function renderContentItem(content, index, message, lookupMessages, options) {
18403
18485
  items: [content],
18404
18486
  hasFollowingItem: false,
18405
18487
  isThreadRunning: options?.isThreadRunning,
18488
+ isThreadPaused: options?.isThreadPaused,
18406
18489
  organizationId: options?.organizationId,
18407
18490
  apiUrl: options?.apiUrl
18408
18491
  }
@@ -18453,6 +18536,7 @@ function renderContentUnit(unit, message, lookupMessages, hasFollowingItem, opti
18453
18536
  return renderContentItem(unit.item, unit.index, message, lookupMessages, {
18454
18537
  isReasoning: options?.isReasoning && !hasFollowingItem && !options?.isAgentOutput,
18455
18538
  isThreadRunning: options?.isThreadRunning,
18539
+ isThreadPaused: options?.isThreadPaused,
18456
18540
  organizationId: options?.organizationId,
18457
18541
  apiUrl: options?.apiUrl,
18458
18542
  isAgentOutput: options?.isAgentOutput,
@@ -18465,6 +18549,7 @@ function renderContentUnit(unit, message, lookupMessages, hasFollowingItem, opti
18465
18549
  items: unit.items,
18466
18550
  hasFollowingItem,
18467
18551
  isThreadRunning: options?.isThreadRunning,
18552
+ isThreadPaused: options?.isThreadPaused,
18468
18553
  organizationId: options?.organizationId,
18469
18554
  apiUrl: options?.apiUrl
18470
18555
  }
@@ -18609,6 +18694,7 @@ function AssistantMessage({
18609
18694
  isStreaming = false,
18610
18695
  streamingStatus,
18611
18696
  isThreadRunning,
18697
+ isThreadPaused,
18612
18698
  organizationId,
18613
18699
  apiUrl,
18614
18700
  pet,
@@ -18628,6 +18714,7 @@ function AssistantMessage({
18628
18714
  const answerNode = renderContent(message, lookupMessages, {
18629
18715
  isReasoning,
18630
18716
  isThreadRunning,
18717
+ isThreadPaused,
18631
18718
  organizationId,
18632
18719
  apiUrl,
18633
18720
  mcpApps
@@ -18827,6 +18914,7 @@ function MessageActions({
18827
18914
  isAssistant = false,
18828
18915
  isStreaming = false,
18829
18916
  onRetry,
18917
+ onEdit,
18830
18918
  className
18831
18919
  }) {
18832
18920
  const { t } = useChatkitTranslation();
@@ -18864,6 +18952,17 @@ function MessageActions({
18864
18952
  children: copied ? /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_lucide_react34.Check, { size: 14 }) : /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_lucide_react34.Copy, { size: 14 })
18865
18953
  }
18866
18954
  ),
18955
+ !isAssistant && onEdit && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
18956
+ "button",
18957
+ {
18958
+ type: "button",
18959
+ onClick: onEdit,
18960
+ className: "rounded-md p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground",
18961
+ title: t("threadControl.editMessage"),
18962
+ "aria-label": t("threadControl.editMessage"),
18963
+ children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_lucide_react34.Pencil, { size: 14 })
18964
+ }
18965
+ ),
18867
18966
  isAssistant && onRetry && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
18868
18967
  "button",
18869
18968
  {
@@ -18879,21 +18978,122 @@ function MessageActions({
18879
18978
  );
18880
18979
  }
18881
18980
 
18981
+ // src/components/thread/MessageEditor.tsx
18982
+ var import_react8 = require("react");
18983
+ var import_jsx_runtime59 = require("react/jsx-runtime");
18984
+ function MessageEditor({
18985
+ initialText,
18986
+ onSave,
18987
+ onCancel
18988
+ }) {
18989
+ const { t } = useChatkitTranslation();
18990
+ const [text, setText] = (0, import_react8.useState)(initialText);
18991
+ const [busy, setBusy] = (0, import_react8.useState)(false);
18992
+ const [error, setError] = (0, import_react8.useState)(null);
18993
+ async function save() {
18994
+ setBusy(true);
18995
+ setError(null);
18996
+ try {
18997
+ await onSave(text);
18998
+ } catch (error2) {
18999
+ setError(error2 instanceof Error ? error2.message : String(error2));
19000
+ } finally {
19001
+ setBusy(false);
19002
+ }
19003
+ }
19004
+ return /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { className: "w-full space-y-2 rounded-2xl border border-input bg-background p-3", children: [
19005
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
19006
+ "textarea",
19007
+ {
19008
+ "aria-label": t("threadControl.editMessage"),
19009
+ value: text,
19010
+ onChange: (event) => setText(event.target.value),
19011
+ disabled: busy,
19012
+ rows: 4,
19013
+ autoFocus: true,
19014
+ className: "w-full resize-y bg-transparent text-sm leading-relaxed text-foreground outline-none"
19015
+ }
19016
+ ),
19017
+ error && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("p", { role: "alert", className: "text-xs text-destructive", children: error }),
19018
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { className: "flex justify-end gap-2", children: [
19019
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
19020
+ Button,
19021
+ {
19022
+ type: "button",
19023
+ size: "sm",
19024
+ variant: "ghost",
19025
+ disabled: busy,
19026
+ onClick: onCancel,
19027
+ children: t("threadControl.discardEdit")
19028
+ }
19029
+ ),
19030
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
19031
+ Button,
19032
+ {
19033
+ type: "button",
19034
+ size: "sm",
19035
+ disabled: busy || !text.trim(),
19036
+ onClick: () => void save(),
19037
+ children: t("threadControl.saveBranch")
19038
+ }
19039
+ )
19040
+ ] })
19041
+ ] });
19042
+ }
19043
+
19044
+ // src/hooks/useThreadBranches.ts
19045
+ var import_react9 = require("react");
19046
+ function useThreadBranches(client, conversationId, threadId, enabled, isLoading) {
19047
+ const scope = (0, import_react9.useRef)(threadId);
19048
+ scope.current = threadId;
19049
+ const [snapshot, setSnapshot] = (0, import_react9.useState)(null);
19050
+ const [error, setError] = (0, import_react9.useState)(null);
19051
+ const generation = (0, import_react9.useRef)(0);
19052
+ const refresh = (0, import_react9.useCallback)(async () => {
19053
+ if (!threadId || !conversationId || !enabled) return;
19054
+ const request = ++generation.current;
19055
+ try {
19056
+ const branches2 = await client.conversations.listThreads(conversationId);
19057
+ if (scope.current !== threadId || generation.current !== request) return;
19058
+ setSnapshot({ threadId, branches: branches2 });
19059
+ setError(null);
19060
+ } catch (error2) {
19061
+ if (scope.current !== threadId || generation.current !== request) return;
19062
+ if (error2 && typeof error2 === "object" && "status" in error2 && error2.status === 404) {
19063
+ setSnapshot(null);
19064
+ setError(null);
19065
+ return;
19066
+ }
19067
+ setError(error2 instanceof Error ? error2.message : String(error2));
19068
+ }
19069
+ }, [client, conversationId, enabled, threadId]);
19070
+ const branches = enabled && snapshot?.threadId === threadId ? snapshot.branches : [];
19071
+ const current = branches.find((branch) => branch.thread_id === threadId);
19072
+ (0, import_react9.useEffect)(() => {
19073
+ setError(null);
19074
+ void refresh();
19075
+ return () => {
19076
+ generation.current += 1;
19077
+ };
19078
+ }, [refresh, isLoading]);
19079
+ return { branches, current, error, refresh };
19080
+ }
19081
+
18882
19082
  // src/components/thread/StartScreen.tsx
18883
19083
  var React51 = require("react");
18884
19084
  var import_lucide_react35 = require("lucide-react");
18885
- var import_jsx_runtime59 = require("react/jsx-runtime");
19085
+ var import_jsx_runtime60 = require("react/jsx-runtime");
18886
19086
  function getIconComponent2(icon) {
18887
19087
  const iconMap = {
18888
- "circle-question": /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_lucide_react35.HelpCircle, { size: 20 }),
18889
- lightbulb: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_lucide_react35.Lightbulb, { size: 20 }),
18890
- sparkle: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_lucide_react35.Sparkles, { size: 20 }),
18891
- write: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_lucide_react35.Pencil, { size: 20 }),
18892
- search: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_lucide_react35.Search, { size: 20 }),
18893
- globe: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_lucide_react35.Globe, { size: 20 }),
18894
- "book-open": /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_lucide_react35.BookOpen, { size: 20 }),
18895
- compass: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_lucide_react35.Compass, { size: 20 }),
18896
- bolt: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_lucide_react35.Zap, { size: 20 })
19088
+ "circle-question": /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_lucide_react35.HelpCircle, { size: 20 }),
19089
+ lightbulb: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_lucide_react35.Lightbulb, { size: 20 }),
19090
+ sparkle: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_lucide_react35.Sparkles, { size: 20 }),
19091
+ write: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_lucide_react35.Pencil, { size: 20 }),
19092
+ search: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_lucide_react35.Search, { size: 20 }),
19093
+ globe: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_lucide_react35.Globe, { size: 20 }),
19094
+ "book-open": /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_lucide_react35.BookOpen, { size: 20 }),
19095
+ compass: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_lucide_react35.Compass, { size: 20 }),
19096
+ bolt: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_lucide_react35.Zap, { size: 20 })
18897
19097
  };
18898
19098
  return icon ? iconMap[icon] || iconMap["sparkle"] : iconMap["sparkle"];
18899
19099
  }
@@ -18910,7 +19110,7 @@ function StartScreen({
18910
19110
  const prompts = startScreen?.prompts ?? [];
18911
19111
  const hasPrompts = startScreen?.promptsLayout !== "list" && prompts.length > 0;
18912
19112
  const editPromptLabel = t("startScreen.editPrompt");
18913
- return /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(
19113
+ return /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(
18914
19114
  "div",
18915
19115
  {
18916
19116
  className: cn(
@@ -18918,8 +19118,8 @@ function StartScreen({
18918
19118
  className
18919
19119
  ),
18920
19120
  children: [
18921
- /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { className: cn("mb-4 text-center", hasPrompts && "mb-10"), children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("h2", { className: "mb-4 text-4xl font-semibold text-foreground", children: greeting }) }),
18922
- hasPrompts && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { className: "w-full max-w-2xl", children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { className: "grid grid-cols-1 sm:grid-cols-2 gap-3", children: prompts.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(
19121
+ /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("div", { className: cn("mb-4 text-center", hasPrompts && "mb-10"), children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("h2", { className: "mb-4 text-4xl font-semibold text-foreground", children: greeting }) }),
19122
+ hasPrompts && /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("div", { className: "w-full max-w-2xl", children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("div", { className: "grid grid-cols-1 sm:grid-cols-2 gap-3", children: prompts.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(
18923
19123
  "div",
18924
19124
  {
18925
19125
  className: cn(
@@ -18928,7 +19128,7 @@ function StartScreen({
18928
19128
  "focus-within:ring-2 focus-within:ring-primary/20"
18929
19129
  ),
18930
19130
  children: [
18931
- /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(
19131
+ /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(
18932
19132
  "button",
18933
19133
  {
18934
19134
  type: "button",
@@ -18939,8 +19139,8 @@ function StartScreen({
18939
19139
  "focus:outline-none disabled:cursor-not-allowed disabled:opacity-50"
18940
19140
  ),
18941
19141
  children: [
18942
- /* @__PURE__ */ (0, import_jsx_runtime59.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) }),
18943
- /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
19142
+ /* @__PURE__ */ (0, import_jsx_runtime60.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) }),
19143
+ /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
18944
19144
  "div",
18945
19145
  {
18946
19146
  className: "text-sm font-medium text-foreground line-clamp-3 overflow-hidden",
@@ -18951,7 +19151,7 @@ function StartScreen({
18951
19151
  ]
18952
19152
  }
18953
19153
  ),
18954
- /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
19154
+ /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
18955
19155
  "button",
18956
19156
  {
18957
19157
  type: "button",
@@ -18964,7 +19164,7 @@ function StartScreen({
18964
19164
  "rounded-r-xl transition-colors hover:bg-muted hover:text-foreground",
18965
19165
  "focus:outline-none disabled:cursor-not-allowed disabled:opacity-50"
18966
19166
  ),
18967
- children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_lucide_react35.Pencil, { size: 16 })
19167
+ children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_lucide_react35.Pencil, { size: 16 })
18968
19168
  }
18969
19169
  )
18970
19170
  ]
@@ -18978,7 +19178,7 @@ function StartScreen({
18978
19178
 
18979
19179
  // src/components/composer/StarterPromptSuggestions.tsx
18980
19180
  var import_lucide_react36 = require("lucide-react");
18981
- var import_jsx_runtime60 = require("react/jsx-runtime");
19181
+ var import_jsx_runtime61 = require("react/jsx-runtime");
18982
19182
  function StarterPromptSuggestions({
18983
19183
  prompts,
18984
19184
  onPromptClick,
@@ -18988,13 +19188,13 @@ function StarterPromptSuggestions({
18988
19188
  }) {
18989
19189
  const { t } = useChatkitTranslation();
18990
19190
  if (!prompts.length) return null;
18991
- return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
19191
+ return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
18992
19192
  "div",
18993
19193
  {
18994
19194
  "data-slot": "starter-prompt-suggestions",
18995
19195
  className: "mt-2 min-w-0 space-y-0.5 px-2",
18996
- children: prompts.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)("div", { className: "group flex min-w-0 items-center gap-1", children: [
18997
- /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(
19196
+ children: prompts.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)("div", { className: "group flex min-w-0 items-center gap-1", children: [
19197
+ /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)(
18998
19198
  Button,
18999
19199
  {
19000
19200
  type: "button",
@@ -19005,12 +19205,12 @@ function StarterPromptSuggestions({
19005
19205
  title: item.label,
19006
19206
  onClick: () => onPromptClick(item.prompt),
19007
19207
  children: [
19008
- /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_lucide_react36.MessagesSquare, { className: "size-4 shrink-0", "aria-hidden": "true" }),
19009
- /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("span", { className: "truncate", children: item.label })
19208
+ /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(import_lucide_react36.MessagesSquare, { className: "size-4 shrink-0", "aria-hidden": "true" }),
19209
+ /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("span", { className: "truncate", children: item.label })
19010
19210
  ]
19011
19211
  }
19012
19212
  ),
19013
- /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
19213
+ /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
19014
19214
  Button,
19015
19215
  {
19016
19216
  type: "button",
@@ -19021,7 +19221,7 @@ function StarterPromptSuggestions({
19021
19221
  "aria-label": t("startScreen.editPrompt"),
19022
19222
  title: t("startScreen.editPrompt"),
19023
19223
  onClick: () => onPromptEdit(item.prompt),
19024
- children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_lucide_react36.Pencil, { className: "size-3.5", "aria-hidden": "true" })
19224
+ children: /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(import_lucide_react36.Pencil, { className: "size-3.5", "aria-hidden": "true" })
19025
19225
  }
19026
19226
  )
19027
19227
  ] }, `prompt-${index}`))
@@ -19240,7 +19440,7 @@ var React53 = __toESM(require("react"), 1);
19240
19440
  var import_lucide_react37 = require("lucide-react");
19241
19441
 
19242
19442
  // src/components/ui/progress-circle.tsx
19243
- var import_jsx_runtime61 = (
19443
+ var import_jsx_runtime62 = (
19244
19444
  // biome-ignore lint/a11y/useFocusableInteractive: false positive (progress + progressbar are not focusable interactives)
19245
19445
  // biome-ignore lint/nursery/useAriaPropsSupportedByRole: biome rule at odds with mdn docs (presumed nursary bug with rule)
19246
19446
  require("react/jsx-runtime")
@@ -19264,7 +19464,7 @@ var ProgressCircle = ({ value, className, ...restSvgProps }) => {
19264
19464
  fill: "none",
19265
19465
  strokeWidth
19266
19466
  };
19267
- return /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)(
19467
+ return /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(
19268
19468
  "svg",
19269
19469
  {
19270
19470
  role: "progressbar",
@@ -19275,8 +19475,8 @@ var ProgressCircle = ({ value, className, ...restSvgProps }) => {
19275
19475
  "aria-valuemax": 100,
19276
19476
  ...restSvgProps,
19277
19477
  children: [
19278
- /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("circle", { ...commonParams, className: "stroke-current/25" }),
19279
- /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
19478
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("circle", { ...commonParams, className: "stroke-current/25" }),
19479
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
19280
19480
  "circle",
19281
19481
  {
19282
19482
  ...commonParams,
@@ -19294,7 +19494,7 @@ var ProgressCircle = ({ value, className, ...restSvgProps }) => {
19294
19494
  };
19295
19495
 
19296
19496
  // src/components/thread/context-usage-indicator.tsx
19297
- var import_jsx_runtime62 = require("react/jsx-runtime");
19497
+ var import_jsx_runtime63 = require("react/jsx-runtime");
19298
19498
  var kNumberFormatter = new Intl.NumberFormat("en-US", {
19299
19499
  minimumFractionDigits: 0,
19300
19500
  maximumFractionDigits: 1
@@ -19464,8 +19664,8 @@ function ContextUsageIndicator({
19464
19664
  const usageLabelWithSuffix = usageLabel.endsWith(":") ? usageLabel : `${usageLabel}:`;
19465
19665
  const statusLabel = usageStatus === "stale" ? t("chat.contextUsage.stale") : !hasMeasurement ? t("chat.contextUsage.unavailable") : null;
19466
19666
  const progressClassName = percent >= 90 ? "text-destructive" : percent >= 75 ? "text-amber-500" : "text-primary dark:text-zinc-300";
19467
- return /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(Tooltip, { children: [
19468
- /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
19667
+ return /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)(Tooltip, { children: [
19668
+ /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
19469
19669
  "button",
19470
19670
  {
19471
19671
  type: "button",
@@ -19474,13 +19674,13 @@ function ContextUsageIndicator({
19474
19674
  className
19475
19675
  ),
19476
19676
  "aria-label": `${usageLabelWithSuffix} ${hasMeasurement ? `${usageFullLabel}. ${usageTokensLabel}` : ""}${statusLabel ? ` ${statusLabel}` : ""}`,
19477
- children: hasMeasurement ? /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
19677
+ children: hasMeasurement ? /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
19478
19678
  ProgressCircle,
19479
19679
  {
19480
19680
  value: percent,
19481
19681
  className: cn("size-5", progressClassName)
19482
19682
  }
19483
- ) : /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
19683
+ ) : /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
19484
19684
  import_lucide_react37.CircleHelp,
19485
19685
  {
19486
19686
  className: "size-5 text-muted-foreground",
@@ -19489,19 +19689,19 @@ function ContextUsageIndicator({
19489
19689
  )
19490
19690
  }
19491
19691
  ) }),
19492
- /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(
19692
+ /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)(
19493
19693
  TooltipContent,
19494
19694
  {
19495
19695
  side: "top",
19496
19696
  sideOffset: 6,
19497
19697
  className: "space-y-0.5 px-3 py-2 text-center",
19498
19698
  children: [
19499
- /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("div", { className: "text-primary-foreground/70", children: usageLabelWithSuffix }),
19500
- hasMeasurement && /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(import_jsx_runtime62.Fragment, { children: [
19501
- /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("div", { className: "font-medium text-primary-foreground/80", children: usageFullLabel }),
19502
- /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("div", { className: "text-sm font-semibold", children: usageTokensLabel })
19699
+ /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("div", { className: "text-primary-foreground/70", children: usageLabelWithSuffix }),
19700
+ hasMeasurement && /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)(import_jsx_runtime63.Fragment, { children: [
19701
+ /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("div", { className: "font-medium text-primary-foreground/80", children: usageFullLabel }),
19702
+ /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("div", { className: "text-sm font-semibold", children: usageTokensLabel })
19503
19703
  ] }),
19504
- !hasMeasurement && statusLabel && /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("div", { className: "text-sm", children: statusLabel })
19704
+ !hasMeasurement && statusLabel && /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("div", { className: "text-sm", children: statusLabel })
19505
19705
  ]
19506
19706
  }
19507
19707
  )
@@ -19538,7 +19738,7 @@ function normalizeModelOptions(models) {
19538
19738
 
19539
19739
  // src/components/composer/ComposerCapabilityChip.tsx
19540
19740
  var import_lucide_react38 = require("lucide-react");
19541
- var import_jsx_runtime63 = require("react/jsx-runtime");
19741
+ var import_jsx_runtime64 = require("react/jsx-runtime");
19542
19742
  function ComposerCapabilityChip({
19543
19743
  option,
19544
19744
  onRemove,
@@ -19546,7 +19746,7 @@ function ComposerCapabilityChip({
19546
19746
  }) {
19547
19747
  const { t } = useChatkitTranslation();
19548
19748
  const color = getRuntimeCapabilityColor(option);
19549
- return /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)(
19749
+ return /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)(
19550
19750
  "span",
19551
19751
  {
19552
19752
  "data-slot": "composer-capability-chip",
@@ -19561,9 +19761,9 @@ function ComposerCapabilityChip({
19561
19761
  ${option.description}` : option.label,
19562
19762
  contentEditable: false,
19563
19763
  children: [
19564
- /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(RuntimeCapabilityIcon, { option, variant: "chip" }),
19565
- /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("span", { className: "min-w-0 truncate", children: option.label }),
19566
- /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
19764
+ /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(RuntimeCapabilityIcon, { option, variant: "chip" }),
19765
+ /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("span", { className: "min-w-0 truncate", children: option.label }),
19766
+ /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
19567
19767
  "button",
19568
19768
  {
19569
19769
  type: "button",
@@ -19575,7 +19775,7 @@ ${option.description}` : option.label,
19575
19775
  name: option.label
19576
19776
  }),
19577
19777
  className: "flex size-5 shrink-0 items-center justify-center rounded-full hover:bg-primary/15 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:opacity-50",
19578
- children: /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(import_lucide_react38.X, { className: "size-3" })
19778
+ children: /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(import_lucide_react38.X, { className: "size-3" })
19579
19779
  }
19580
19780
  )
19581
19781
  ]
@@ -20002,17 +20202,17 @@ var import_lucide_react40 = require("lucide-react");
20002
20202
  var React56 = require("react");
20003
20203
  var import_radix_ui2 = require("radix-ui");
20004
20204
  var import_lucide_react39 = require("lucide-react");
20005
- var import_jsx_runtime64 = require("react/jsx-runtime");
20205
+ var import_jsx_runtime65 = require("react/jsx-runtime");
20006
20206
  function Select({
20007
20207
  ...props
20008
20208
  }) {
20009
- return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(import_radix_ui2.Select.Root, { "data-slot": "select", ...props });
20209
+ return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(import_radix_ui2.Select.Root, { "data-slot": "select", ...props });
20010
20210
  }
20011
20211
  function SelectGroup({
20012
20212
  className,
20013
20213
  ...props
20014
20214
  }) {
20015
- return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
20215
+ return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
20016
20216
  import_radix_ui2.Select.Group,
20017
20217
  {
20018
20218
  "data-slot": "select-group",
@@ -20024,7 +20224,7 @@ function SelectGroup({
20024
20224
  function SelectValue({
20025
20225
  ...props
20026
20226
  }) {
20027
- return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(import_radix_ui2.Select.Value, { "data-slot": "select-value", ...props });
20227
+ return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(import_radix_ui2.Select.Value, { "data-slot": "select-value", ...props });
20028
20228
  }
20029
20229
  function SelectTrigger({
20030
20230
  className,
@@ -20032,7 +20232,7 @@ function SelectTrigger({
20032
20232
  children,
20033
20233
  ...props
20034
20234
  }) {
20035
- return /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)(
20235
+ return /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(
20036
20236
  import_radix_ui2.Select.Trigger,
20037
20237
  {
20038
20238
  "data-slot": "select-trigger",
@@ -20044,7 +20244,7 @@ function SelectTrigger({
20044
20244
  ...props,
20045
20245
  children: [
20046
20246
  children,
20047
- /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(import_radix_ui2.Select.Icon, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(import_lucide_react39.ChevronDownIcon, { className: "pointer-events-none size-4 text-muted-foreground" }) })
20247
+ /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(import_radix_ui2.Select.Icon, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(import_lucide_react39.ChevronDownIcon, { className: "pointer-events-none size-4 text-muted-foreground" }) })
20048
20248
  ]
20049
20249
  }
20050
20250
  );
@@ -20056,7 +20256,7 @@ function SelectContent({
20056
20256
  align = "center",
20057
20257
  ...props
20058
20258
  }) {
20059
- return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(import_radix_ui2.Select.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)(
20259
+ return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(import_radix_ui2.Select.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(
20060
20260
  import_radix_ui2.Select.Content,
20061
20261
  {
20062
20262
  "data-slot": "select-content",
@@ -20066,8 +20266,8 @@ function SelectContent({
20066
20266
  align,
20067
20267
  ...props,
20068
20268
  children: [
20069
- /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(SelectScrollUpButton, {}),
20070
- /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
20269
+ /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(SelectScrollUpButton, {}),
20270
+ /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
20071
20271
  import_radix_ui2.Select.Viewport,
20072
20272
  {
20073
20273
  "data-position": position,
@@ -20078,7 +20278,7 @@ function SelectContent({
20078
20278
  children
20079
20279
  }
20080
20280
  ),
20081
- /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(SelectScrollDownButton, {})
20281
+ /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(SelectScrollDownButton, {})
20082
20282
  ]
20083
20283
  }
20084
20284
  ) });
@@ -20088,7 +20288,7 @@ function SelectItem({
20088
20288
  children,
20089
20289
  ...props
20090
20290
  }) {
20091
- return /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)(
20291
+ return /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(
20092
20292
  import_radix_ui2.Select.Item,
20093
20293
  {
20094
20294
  "data-slot": "select-item",
@@ -20098,8 +20298,8 @@ function SelectItem({
20098
20298
  ),
20099
20299
  ...props,
20100
20300
  children: [
20101
- /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("span", { className: "pointer-events-none absolute right-2 flex size-4 items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(import_radix_ui2.Select.ItemIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(import_lucide_react39.CheckIcon, { className: "pointer-events-none" }) }) }),
20102
- /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(import_radix_ui2.Select.ItemText, { children })
20301
+ /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("span", { className: "pointer-events-none absolute right-2 flex size-4 items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(import_radix_ui2.Select.ItemIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(import_lucide_react39.CheckIcon, { className: "pointer-events-none" }) }) }),
20302
+ /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(import_radix_ui2.Select.ItemText, { children })
20103
20303
  ]
20104
20304
  }
20105
20305
  );
@@ -20108,7 +20308,7 @@ function SelectScrollUpButton({
20108
20308
  className,
20109
20309
  ...props
20110
20310
  }) {
20111
- return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
20311
+ return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
20112
20312
  import_radix_ui2.Select.ScrollUpButton,
20113
20313
  {
20114
20314
  "data-slot": "select-scroll-up-button",
@@ -20117,7 +20317,7 @@ function SelectScrollUpButton({
20117
20317
  className
20118
20318
  ),
20119
20319
  ...props,
20120
- children: /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
20320
+ children: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
20121
20321
  import_lucide_react39.ChevronUpIcon,
20122
20322
  {}
20123
20323
  )
@@ -20128,7 +20328,7 @@ function SelectScrollDownButton({
20128
20328
  className,
20129
20329
  ...props
20130
20330
  }) {
20131
- return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
20331
+ return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
20132
20332
  import_radix_ui2.Select.ScrollDownButton,
20133
20333
  {
20134
20334
  "data-slot": "select-scroll-down-button",
@@ -20137,7 +20337,7 @@ function SelectScrollDownButton({
20137
20337
  className
20138
20338
  ),
20139
20339
  ...props,
20140
- children: /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
20340
+ children: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
20141
20341
  import_lucide_react39.ChevronDownIcon,
20142
20342
  {}
20143
20343
  )
@@ -20148,7 +20348,7 @@ function SelectScrollDownButton({
20148
20348
  // src/components/ui/slider.tsx
20149
20349
  var React57 = __toESM(require("react"), 1);
20150
20350
  var import_radix_ui3 = require("radix-ui");
20151
- var import_jsx_runtime65 = require("react/jsx-runtime");
20351
+ var import_jsx_runtime66 = require("react/jsx-runtime");
20152
20352
  function Slider({
20153
20353
  className,
20154
20354
  defaultValue,
@@ -20161,7 +20361,7 @@ function Slider({
20161
20361
  () => Array.isArray(value) ? value : Array.isArray(defaultValue) ? defaultValue : [min, max],
20162
20362
  [value, defaultValue, min, max]
20163
20363
  );
20164
- return /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(
20364
+ return /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(
20165
20365
  import_radix_ui3.Slider.Root,
20166
20366
  {
20167
20367
  "data-slot": "slider",
@@ -20175,12 +20375,12 @@ function Slider({
20175
20375
  ),
20176
20376
  ...props,
20177
20377
  children: [
20178
- /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
20378
+ /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
20179
20379
  import_radix_ui3.Slider.Track,
20180
20380
  {
20181
20381
  "data-slot": "slider-track",
20182
20382
  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",
20183
- children: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
20383
+ children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
20184
20384
  import_radix_ui3.Slider.Range,
20185
20385
  {
20186
20386
  "data-slot": "slider-range",
@@ -20189,7 +20389,7 @@ function Slider({
20189
20389
  )
20190
20390
  }
20191
20391
  ),
20192
- Array.from({ length: _values.length }, (_, index) => /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
20392
+ Array.from({ length: _values.length }, (_, index) => /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
20193
20393
  import_radix_ui3.Slider.Thumb,
20194
20394
  {
20195
20395
  "data-slot": "slider-thumb",
@@ -20211,7 +20411,7 @@ var import_radix_ui5 = require("radix-ui");
20211
20411
  var React58 = require("react");
20212
20412
  var import_class_variance_authority2 = require("class-variance-authority");
20213
20413
  var import_radix_ui4 = require("radix-ui");
20214
- var import_jsx_runtime66 = require("react/jsx-runtime");
20414
+ var import_jsx_runtime67 = require("react/jsx-runtime");
20215
20415
  var toggleVariants = (0, import_class_variance_authority2.cva)(
20216
20416
  "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",
20217
20417
  {
@@ -20234,7 +20434,7 @@ var toggleVariants = (0, import_class_variance_authority2.cva)(
20234
20434
  );
20235
20435
 
20236
20436
  // src/components/ui/toggle-group.tsx
20237
- var import_jsx_runtime67 = require("react/jsx-runtime");
20437
+ var import_jsx_runtime68 = require("react/jsx-runtime");
20238
20438
  var ToggleGroupContext = React59.createContext({
20239
20439
  size: "default",
20240
20440
  variant: "default",
@@ -20250,7 +20450,7 @@ function ToggleGroup({
20250
20450
  children,
20251
20451
  ...props
20252
20452
  }) {
20253
- return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
20453
+ return /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
20254
20454
  import_radix_ui5.ToggleGroup.Root,
20255
20455
  {
20256
20456
  "data-slot": "toggle-group",
@@ -20264,7 +20464,7 @@ function ToggleGroup({
20264
20464
  className
20265
20465
  ),
20266
20466
  ...props,
20267
- children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
20467
+ children: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
20268
20468
  ToggleGroupContext.Provider,
20269
20469
  {
20270
20470
  value: { variant, size: size2, spacing, orientation },
@@ -20282,7 +20482,7 @@ function ToggleGroupItem({
20282
20482
  ...props
20283
20483
  }) {
20284
20484
  const context = React59.useContext(ToggleGroupContext);
20285
- return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
20485
+ return /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
20286
20486
  import_radix_ui5.ToggleGroup.Item,
20287
20487
  {
20288
20488
  "data-slot": "toggle-group-item",
@@ -20518,7 +20718,7 @@ var React60 = require("react");
20518
20718
  var import_chatkit_types15 = require("@xpert-ai/chatkit-types");
20519
20719
 
20520
20720
  // src/components/pet/PetPreview.tsx
20521
- var import_jsx_runtime68 = require("react/jsx-runtime");
20721
+ var import_jsx_runtime69 = require("react/jsx-runtime");
20522
20722
  function escapeCssUrl2(value) {
20523
20723
  return value.replace(/["\\]/g, "\\$&");
20524
20724
  }
@@ -20526,7 +20726,7 @@ function PetPreview({ src, label, className }) {
20526
20726
  const scale = 0.13;
20527
20727
  const width = import_chatkit_types15.petSpriteAtlas.cellWidth;
20528
20728
  const height = import_chatkit_types15.petSpriteAtlas.cellHeight;
20529
- return /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
20729
+ return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
20530
20730
  "span",
20531
20731
  {
20532
20732
  className: cn(
@@ -20535,7 +20735,7 @@ function PetPreview({ src, label, className }) {
20535
20735
  ),
20536
20736
  "aria-hidden": "true",
20537
20737
  title: label,
20538
- children: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
20738
+ children: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
20539
20739
  "span",
20540
20740
  {
20541
20741
  className: "absolute left-1/2 top-1/2 block",
@@ -20557,7 +20757,7 @@ function PetPreview({ src, label, className }) {
20557
20757
  }
20558
20758
 
20559
20759
  // src/components/settings/SettingsSheet.tsx
20560
- var import_jsx_runtime69 = require("react/jsx-runtime");
20760
+ var import_jsx_runtime70 = require("react/jsx-runtime");
20561
20761
  var CHARACTER_TYPES2 = [
20562
20762
  "builtin",
20563
20763
  "atlas"
@@ -20597,23 +20797,23 @@ function SettingsSheet({
20597
20797
  defaultValue: selectedBuiltinPet.label
20598
20798
  }
20599
20799
  );
20600
- return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(Sheet, { open, onOpenChange, children: /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(SheetContent, { side: "right", className: "w-[min(92vw,26rem)] overflow-y-auto", children: [
20601
- /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(SheetHeader, { children: /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("div", { className: "flex items-center gap-2", children: [
20602
- /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("span", { className: "flex h-8 w-8 items-center justify-center rounded-md bg-primary/10 text-primary", children: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(import_lucide_react40.Settings, { size: 16 }) }),
20603
- /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(SheetTitle, { children: t("settings.title") })
20800
+ return /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(Sheet, { open, onOpenChange, children: /* @__PURE__ */ (0, import_jsx_runtime70.jsxs)(SheetContent, { side: "right", className: "w-[min(92vw,26rem)] overflow-y-auto", children: [
20801
+ /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(SheetHeader, { children: /* @__PURE__ */ (0, import_jsx_runtime70.jsxs)("div", { className: "flex items-center gap-2", children: [
20802
+ /* @__PURE__ */ (0, import_jsx_runtime70.jsx)("span", { className: "flex h-8 w-8 items-center justify-center rounded-md bg-primary/10 text-primary", children: /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(import_lucide_react40.Settings, { size: 16 }) }),
20803
+ /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(SheetTitle, { children: t("settings.title") })
20604
20804
  ] }) }),
20605
- /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("form", { className: "mt-6 space-y-5", onSubmit: handleSubmit, children: [
20606
- /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("section", { className: "space-y-5", children: [
20607
- /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("div", { className: "flex items-center gap-2", children: [
20608
- /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("span", { className: "flex h-7 w-7 items-center justify-center rounded-md bg-muted text-muted-foreground", children: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(import_lucide_react40.PawPrint, { size: 15 }) }),
20609
- /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("h3", { className: "text-sm font-semibold", children: t("pet.settings.title") })
20805
+ /* @__PURE__ */ (0, import_jsx_runtime70.jsxs)("form", { className: "mt-6 space-y-5", onSubmit: handleSubmit, children: [
20806
+ /* @__PURE__ */ (0, import_jsx_runtime70.jsxs)("section", { className: "space-y-5", children: [
20807
+ /* @__PURE__ */ (0, import_jsx_runtime70.jsxs)("div", { className: "flex items-center gap-2", children: [
20808
+ /* @__PURE__ */ (0, import_jsx_runtime70.jsx)("span", { className: "flex h-7 w-7 items-center justify-center rounded-md bg-muted text-muted-foreground", children: /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(import_lucide_react40.PawPrint, { size: 15 }) }),
20809
+ /* @__PURE__ */ (0, import_jsx_runtime70.jsx)("h3", { className: "text-sm font-semibold", children: t("pet.settings.title") })
20610
20810
  ] }),
20611
- /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("label", { className: "flex items-center justify-between gap-4 rounded-md border border-border px-3 py-2", children: [
20612
- /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("span", { className: "min-w-0", children: [
20613
- /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("span", { className: "block text-sm font-medium", children: t("pet.settings.enabled") }),
20614
- petRequired && /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("span", { className: "mt-0.5 block text-xs text-muted-foreground", children: t("pet.settings.requiredHint") })
20811
+ /* @__PURE__ */ (0, import_jsx_runtime70.jsxs)("label", { className: "flex items-center justify-between gap-4 rounded-md border border-border px-3 py-2", children: [
20812
+ /* @__PURE__ */ (0, import_jsx_runtime70.jsxs)("span", { className: "min-w-0", children: [
20813
+ /* @__PURE__ */ (0, import_jsx_runtime70.jsx)("span", { className: "block text-sm font-medium", children: t("pet.settings.enabled") }),
20814
+ petRequired && /* @__PURE__ */ (0, import_jsx_runtime70.jsx)("span", { className: "mt-0.5 block text-xs text-muted-foreground", children: t("pet.settings.requiredHint") })
20615
20815
  ] }),
20616
- /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
20816
+ /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
20617
20817
  "button",
20618
20818
  {
20619
20819
  type: "button",
@@ -20626,7 +20826,7 @@ function SettingsSheet({
20626
20826
  draft.enabled ? "bg-primary" : "bg-muted-foreground/20",
20627
20827
  petRequired ? "cursor-not-allowed opacity-70" : ""
20628
20828
  ].join(" "),
20629
- children: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
20829
+ children: /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
20630
20830
  "span",
20631
20831
  {
20632
20832
  className: [
@@ -20639,9 +20839,9 @@ function SettingsSheet({
20639
20839
  )
20640
20840
  ] })
20641
20841
  ] }),
20642
- /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("div", { className: "space-y-2", children: [
20643
- /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("span", { id: "chatkit-pet-type-label", className: "text-sm font-medium", children: t("pet.settings.characterType") }),
20644
- /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
20842
+ /* @__PURE__ */ (0, import_jsx_runtime70.jsxs)("div", { className: "space-y-2", children: [
20843
+ /* @__PURE__ */ (0, import_jsx_runtime70.jsx)("span", { id: "chatkit-pet-type-label", className: "text-sm font-medium", children: t("pet.settings.characterType") }),
20844
+ /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
20645
20845
  ToggleGroup,
20646
20846
  {
20647
20847
  id: "chatkit-pet-type",
@@ -20656,7 +20856,7 @@ function SettingsSheet({
20656
20856
  variant: "outline",
20657
20857
  spacing: 2,
20658
20858
  className: "!w-full",
20659
- children: CHARACTER_TYPES2.map((type) => /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
20859
+ children: CHARACTER_TYPES2.map((type) => /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
20660
20860
  ToggleGroupItem,
20661
20861
  {
20662
20862
  value: type,
@@ -20668,8 +20868,8 @@ function SettingsSheet({
20668
20868
  }
20669
20869
  )
20670
20870
  ] }),
20671
- draft.characterType === "builtin" && /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("div", { className: "space-y-2", children: [
20672
- /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
20871
+ draft.characterType === "builtin" && /* @__PURE__ */ (0, import_jsx_runtime70.jsxs)("div", { className: "space-y-2", children: [
20872
+ /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
20673
20873
  "label",
20674
20874
  {
20675
20875
  htmlFor: "chatkit-pet-builtin",
@@ -20677,7 +20877,7 @@ function SettingsSheet({
20677
20877
  children: t("pet.settings.builtin")
20678
20878
  }
20679
20879
  ),
20680
- /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(
20880
+ /* @__PURE__ */ (0, import_jsx_runtime70.jsxs)(
20681
20881
  Select,
20682
20882
  {
20683
20883
  value: selectedBuiltinPet.id,
@@ -20688,26 +20888,26 @@ function SettingsSheet({
20688
20888
  }
20689
20889
  },
20690
20890
  children: [
20691
- /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
20891
+ /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
20692
20892
  SelectTrigger,
20693
20893
  {
20694
20894
  id: "chatkit-pet-builtin",
20695
20895
  className: "min-h-12 w-full px-3 py-2",
20696
- children: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(SelectValue, { placeholder: selectedBuiltinPetLabel })
20896
+ children: /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(SelectValue, { placeholder: selectedBuiltinPetLabel })
20697
20897
  }
20698
20898
  ),
20699
- /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(SelectContent, { className: "w-[var(--radix-select-trigger-width)]", children: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(SelectGroup, { children: INCLUDED_PET_OPTIONS.map((pet) => {
20899
+ /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(SelectContent, { className: "w-[var(--radix-select-trigger-width)]", children: /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(SelectGroup, { children: INCLUDED_PET_OPTIONS.map((pet) => {
20700
20900
  const label = t(`pet.settings.builtins.${pet.id}`, {
20701
20901
  defaultValue: pet.label
20702
20902
  });
20703
- return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
20903
+ return /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
20704
20904
  SelectItem,
20705
20905
  {
20706
20906
  value: pet.id,
20707
20907
  className: "min-h-10 py-1.5 pl-2 pr-8",
20708
- children: /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("span", { className: "flex min-w-0 items-center gap-2", children: [
20709
- /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(PetPreview, { src: pet.previewSrc, label }),
20710
- /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("span", { className: "min-w-0 truncate", children: label })
20908
+ children: /* @__PURE__ */ (0, import_jsx_runtime70.jsxs)("span", { className: "flex min-w-0 items-center gap-2", children: [
20909
+ /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(PetPreview, { src: pet.previewSrc, label }),
20910
+ /* @__PURE__ */ (0, import_jsx_runtime70.jsx)("span", { className: "min-w-0 truncate", children: label })
20711
20911
  ] })
20712
20912
  },
20713
20913
  pet.id
@@ -20717,8 +20917,8 @@ function SettingsSheet({
20717
20917
  }
20718
20918
  )
20719
20919
  ] }),
20720
- draft.characterType === "atlas" && /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("div", { className: "space-y-2", children: [
20721
- /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
20920
+ draft.characterType === "atlas" && /* @__PURE__ */ (0, import_jsx_runtime70.jsxs)("div", { className: "space-y-2", children: [
20921
+ /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
20722
20922
  "label",
20723
20923
  {
20724
20924
  className: "text-sm font-medium",
@@ -20726,7 +20926,7 @@ function SettingsSheet({
20726
20926
  children: t("pet.settings.atlasUrl")
20727
20927
  }
20728
20928
  ),
20729
- /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
20929
+ /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
20730
20930
  Input,
20731
20931
  {
20732
20932
  id: "chatkit-pet-atlas",
@@ -20736,15 +20936,15 @@ function SettingsSheet({
20736
20936
  }
20737
20937
  )
20738
20938
  ] }),
20739
- /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("div", { className: "space-y-2", children: [
20740
- /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("div", { className: "flex items-center justify-between gap-4", children: [
20741
- /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("label", { className: "text-sm font-medium", htmlFor: "chatkit-pet-scale", children: t("pet.settings.scale") }),
20742
- /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("span", { className: "text-xs tabular-nums text-muted-foreground", children: [
20939
+ /* @__PURE__ */ (0, import_jsx_runtime70.jsxs)("div", { className: "space-y-2", children: [
20940
+ /* @__PURE__ */ (0, import_jsx_runtime70.jsxs)("div", { className: "flex items-center justify-between gap-4", children: [
20941
+ /* @__PURE__ */ (0, import_jsx_runtime70.jsx)("label", { className: "text-sm font-medium", htmlFor: "chatkit-pet-scale", children: t("pet.settings.scale") }),
20942
+ /* @__PURE__ */ (0, import_jsx_runtime70.jsxs)("span", { className: "text-xs tabular-nums text-muted-foreground", children: [
20743
20943
  draft.scale.toFixed(2),
20744
20944
  "x"
20745
20945
  ] })
20746
20946
  ] }),
20747
- /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
20947
+ /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
20748
20948
  Slider,
20749
20949
  {
20750
20950
  id: "chatkit-pet-scale",
@@ -20758,8 +20958,8 @@ function SettingsSheet({
20758
20958
  }
20759
20959
  )
20760
20960
  ] }),
20761
- /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("label", { className: "flex items-center gap-2 text-sm", children: [
20762
- /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
20961
+ /* @__PURE__ */ (0, import_jsx_runtime70.jsxs)("label", { className: "flex items-center gap-2 text-sm", children: [
20962
+ /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
20763
20963
  "input",
20764
20964
  {
20765
20965
  type: "checkbox",
@@ -20770,8 +20970,8 @@ function SettingsSheet({
20770
20970
  ),
20771
20971
  t("pet.settings.draggable")
20772
20972
  ] }),
20773
- /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("label", { className: "flex items-center gap-2 text-sm", children: [
20774
- /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
20973
+ /* @__PURE__ */ (0, import_jsx_runtime70.jsxs)("label", { className: "flex items-center gap-2 text-sm", children: [
20974
+ /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
20775
20975
  "input",
20776
20976
  {
20777
20977
  type: "checkbox",
@@ -20782,8 +20982,8 @@ function SettingsSheet({
20782
20982
  ),
20783
20983
  t("pet.settings.persistPosition")
20784
20984
  ] }),
20785
- /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("div", { className: "flex justify-end gap-2 pt-2", children: [
20786
- /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
20985
+ /* @__PURE__ */ (0, import_jsx_runtime70.jsxs)("div", { className: "flex justify-end gap-2 pt-2", children: [
20986
+ /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
20787
20987
  Button,
20788
20988
  {
20789
20989
  type: "button",
@@ -20792,7 +20992,7 @@ function SettingsSheet({
20792
20992
  children: t("pet.settings.cancel")
20793
20993
  }
20794
20994
  ),
20795
- /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(Button, { type: "submit", children: t("pet.settings.save") })
20995
+ /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(Button, { type: "submit", children: t("pet.settings.save") })
20796
20996
  ] })
20797
20997
  ] })
20798
20998
  ] }) });
@@ -20968,7 +21168,7 @@ function createXpertThreadGoalAdapter(client, scope) {
20968
21168
  // src/workbench/context.tsx
20969
21169
  var React62 = __toESM(require("react"), 1);
20970
21170
  var import_lucide_react41 = require("lucide-react");
20971
- var import_jsx_runtime70 = require("react/jsx-runtime");
21171
+ var import_jsx_runtime71 = require("react/jsx-runtime");
20972
21172
  var WorkbenchContext = React62.createContext({
20973
21173
  enabled: false,
20974
21174
  open: false,
@@ -20987,8 +21187,8 @@ function WorkbenchToggleButton() {
20987
21187
  if (!workbench.enabled || workbench.open) return null;
20988
21188
  const label = t("workbench.open");
20989
21189
  const tooltip = workbench.disabledReason ?? label;
20990
- return /* @__PURE__ */ (0, import_jsx_runtime70.jsxs)(Tooltip, { children: [
20991
- /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime70.jsx)("span", { className: "inline-flex h-8 w-8", children: /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
21190
+ return /* @__PURE__ */ (0, import_jsx_runtime71.jsxs)(Tooltip, { children: [
21191
+ /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime71.jsx)("span", { className: "inline-flex h-8 w-8", children: /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
20992
21192
  "button",
20993
21193
  {
20994
21194
  type: "button",
@@ -21001,16 +21201,16 @@ function WorkbenchToggleButton() {
21001
21201
  ),
21002
21202
  "aria-label": label,
21003
21203
  "aria-expanded": false,
21004
- children: workbench.loading ? /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(import_lucide_react41.Loader2, { size: 16, className: "animate-spin" }) : /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(import_lucide_react41.PanelRight, { size: 16 })
21204
+ children: workbench.loading ? /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(import_lucide_react41.Loader2, { size: 16, className: "animate-spin" }) : /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(import_lucide_react41.PanelRight, { size: 16 })
21005
21205
  }
21006
21206
  ) }) }),
21007
- /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(TooltipContent, { side: "bottom", children: tooltip })
21207
+ /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(TooltipContent, { side: "bottom", children: tooltip })
21008
21208
  ] });
21009
21209
  }
21010
21210
 
21011
21211
  // src/components/chat/runtime-capabilities.tsx
21012
21212
  var React63 = __toESM(require("react"), 1);
21013
- var import_jsx_runtime71 = require("react/jsx-runtime");
21213
+ var import_jsx_runtime72 = require("react/jsx-runtime");
21014
21214
  function createComposerCapabilityInsertionParts(options) {
21015
21215
  return options.filter((option) => option.type !== "subAgent").flatMap((option) => [
21016
21216
  createComposerCapabilityPart(option, createMessageId()),
@@ -21569,16 +21769,16 @@ function HumanRuntimeCapabilityChips({
21569
21769
  if (options.length === 0) {
21570
21770
  return null;
21571
21771
  }
21572
- return /* @__PURE__ */ (0, import_jsx_runtime71.jsx)("div", { className: "mb-2 flex flex-wrap gap-1.5", children: options.map((option) => {
21772
+ return /* @__PURE__ */ (0, import_jsx_runtime72.jsx)("div", { className: "mb-2 flex flex-wrap gap-1.5", children: options.map((option) => {
21573
21773
  const color = option.type === "skill" ? void 0 : getRuntimeCapabilityColor(option);
21574
- return /* @__PURE__ */ (0, import_jsx_runtime71.jsxs)(
21774
+ return /* @__PURE__ */ (0, import_jsx_runtime72.jsxs)(
21575
21775
  "span",
21576
21776
  {
21577
21777
  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",
21578
21778
  style: color ? { color } : void 0,
21579
21779
  children: [
21580
- /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(RuntimeCapabilityIcon, { option, variant: "chip" }),
21581
- /* @__PURE__ */ (0, import_jsx_runtime71.jsx)("span", { className: "max-w-[9rem] truncate", children: option.label })
21780
+ /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(RuntimeCapabilityIcon, { option, variant: "chip" }),
21781
+ /* @__PURE__ */ (0, import_jsx_runtime72.jsx)("span", { className: "max-w-[9rem] truncate", children: option.label })
21582
21782
  ]
21583
21783
  },
21584
21784
  `${option.type}:${option.id}`
@@ -21591,7 +21791,7 @@ function ComposerCapabilityToken({
21591
21791
  disabled
21592
21792
  }) {
21593
21793
  const color = getRuntimeCapabilityColor(part.capability);
21594
- return /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
21794
+ return /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
21595
21795
  "span",
21596
21796
  {
21597
21797
  "data-composer-capability-key": part.key,
@@ -21599,7 +21799,7 @@ function ComposerCapabilityToken({
21599
21799
  "data-capability-id": part.capability.id,
21600
21800
  contentEditable: false,
21601
21801
  style: color ? { color } : void 0,
21602
- children: /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
21802
+ children: /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
21603
21803
  ComposerCapabilityChip,
21604
21804
  {
21605
21805
  option: part.capability,
@@ -21984,7 +22184,7 @@ function useTaskSummary({
21984
22184
  // src/components/task-summary/TaskSummary.tsx
21985
22185
  var React65 = __toESM(require("react"), 1);
21986
22186
  var import_lucide_react42 = require("lucide-react");
21987
- var import_jsx_runtime72 = require("react/jsx-runtime");
22187
+ var import_jsx_runtime73 = require("react/jsx-runtime");
21988
22188
  var PREVIEW_SIZE = 3;
21989
22189
  function TaskSummaryTrigger({
21990
22190
  displayMode = "popover",
@@ -22004,7 +22204,7 @@ function TaskSummaryTrigger({
22004
22204
  },
22005
22205
  [controlledOpen, onOpenChange]
22006
22206
  );
22007
- const triggerButton = /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
22207
+ const triggerButton = /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
22008
22208
  "button",
22009
22209
  {
22010
22210
  type: "button",
@@ -22012,28 +22212,28 @@ function TaskSummaryTrigger({
22012
22212
  "aria-label": t("taskSummary.open"),
22013
22213
  "aria-expanded": open,
22014
22214
  onClick: displayMode === "docked" ? () => setOpen(!open) : void 0,
22015
- children: /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(import_lucide_react42.ListChecks, { size: 16 })
22215
+ children: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(import_lucide_react42.ListChecks, { size: 16 })
22016
22216
  }
22017
22217
  );
22018
22218
  if (displayMode === "docked") {
22019
- return /* @__PURE__ */ (0, import_jsx_runtime72.jsxs)(Tooltip, { children: [
22020
- /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(TooltipTrigger, { asChild: true, children: triggerButton }),
22021
- /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(TooltipContent, { side: "bottom", children: t("taskSummary.open") })
22219
+ return /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(Tooltip, { children: [
22220
+ /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(TooltipTrigger, { asChild: true, children: triggerButton }),
22221
+ /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(TooltipContent, { side: "bottom", children: t("taskSummary.open") })
22022
22222
  ] });
22023
22223
  }
22024
- return /* @__PURE__ */ (0, import_jsx_runtime72.jsxs)(Popover, { open, onOpenChange: setOpen, children: [
22025
- /* @__PURE__ */ (0, import_jsx_runtime72.jsxs)(Tooltip, { children: [
22026
- /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(PopoverTrigger, { asChild: true, children: triggerButton }) }),
22027
- /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(TooltipContent, { side: "bottom", children: t("taskSummary.open") })
22224
+ return /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(Popover, { open, onOpenChange: setOpen, children: [
22225
+ /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(Tooltip, { children: [
22226
+ /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(PopoverTrigger, { asChild: true, children: triggerButton }) }),
22227
+ /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(TooltipContent, { side: "bottom", children: t("taskSummary.open") })
22028
22228
  ] }),
22029
- /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
22229
+ /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
22030
22230
  PopoverContent,
22031
22231
  {
22032
22232
  align: "end",
22033
22233
  sideOffset: 8,
22034
22234
  className: "w-[min(20rem,calc(100vw-2rem))] max-h-[min(44rem,calc(100vh-5rem))] overflow-y-auto rounded-2xl border-border/70 bg-popover p-0 shadow-lg",
22035
22235
  "aria-label": t("taskSummary.title"),
22036
- children: /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(TaskSummaryContent, { ...props })
22236
+ children: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(TaskSummaryContent, { ...props })
22037
22237
  }
22038
22238
  )
22039
22239
  ] });
@@ -22043,7 +22243,7 @@ function TaskSummaryPanel({
22043
22243
  ...props
22044
22244
  }) {
22045
22245
  const { t } = useChatkitTranslation();
22046
- return /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
22246
+ return /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
22047
22247
  "aside",
22048
22248
  {
22049
22249
  "data-slot": "task-summary-panel",
@@ -22052,7 +22252,7 @@ function TaskSummaryPanel({
22052
22252
  "h-fit max-h-full overflow-y-auto rounded-2xl border border-border/70 bg-popover text-popover-foreground shadow-lg",
22053
22253
  className
22054
22254
  ),
22055
- children: /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(TaskSummaryContent, { ...props })
22255
+ children: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(TaskSummaryContent, { ...props })
22056
22256
  }
22057
22257
  );
22058
22258
  }
@@ -22107,7 +22307,7 @@ function TaskSummaryContent({
22107
22307
  if (total2 <= PREVIEW_SIZE && !expanded[section]) return null;
22108
22308
  const loading = loadingSections[section];
22109
22309
  const canLoadMore = Boolean(expanded[section]) && loadedSectionCounts[section] < total2;
22110
- return /* @__PURE__ */ (0, import_jsx_runtime72.jsxs)(
22310
+ return /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(
22111
22311
  "button",
22112
22312
  {
22113
22313
  type: "button",
@@ -22115,8 +22315,8 @@ function TaskSummaryContent({
22115
22315
  disabled: loading,
22116
22316
  onClick: () => canLoadMore ? void onLoadSection(section) : toggleSection(section),
22117
22317
  children: [
22118
- loading && /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(import_lucide_react42.Loader2, { className: "size-3 animate-spin" }),
22119
- !loading && /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(import_lucide_react42.ListChecks, { className: "size-3.5" }),
22318
+ loading && /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(import_lucide_react42.Loader2, { className: "size-3 animate-spin" }),
22319
+ !loading && /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(import_lucide_react42.ListChecks, { className: "size-3.5" }),
22120
22320
  canLoadMore ? t("taskSummary.loadMore") : expanded[section] ? t("taskSummary.collapse") : t("taskSummary.viewAll", { count: total2 })
22121
22321
  ]
22122
22322
  }
@@ -22125,7 +22325,7 @@ function TaskSummaryContent({
22125
22325
  const localSectionAction = (section, total2) => {
22126
22326
  if (total2 <= PREVIEW_SIZE) return null;
22127
22327
  const isExpanded = Boolean(expandedLocal[section]);
22128
- return /* @__PURE__ */ (0, import_jsx_runtime72.jsxs)(
22328
+ return /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(
22129
22329
  "button",
22130
22330
  {
22131
22331
  type: "button",
@@ -22135,83 +22335,83 @@ function TaskSummaryContent({
22135
22335
  [section]: !isExpanded
22136
22336
  })),
22137
22337
  children: [
22138
- /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(import_lucide_react42.ListChecks, { className: "size-3.5" }),
22338
+ /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(import_lucide_react42.ListChecks, { className: "size-3.5" }),
22139
22339
  isExpanded ? t("taskSummary.collapse") : t("taskSummary.viewAll", { count: total2 })
22140
22340
  ]
22141
22341
  }
22142
22342
  );
22143
22343
  };
22144
- return /* @__PURE__ */ (0, import_jsx_runtime72.jsxs)("div", { className: "divide-y divide-border/70", children: [
22145
- Boolean(historyError) && /* @__PURE__ */ (0, import_jsx_runtime72.jsxs)("div", { className: "m-3 flex items-start justify-between gap-3 rounded-lg border border-destructive/30 bg-destructive/5 px-3 py-2 text-xs text-destructive", children: [
22146
- /* @__PURE__ */ (0, import_jsx_runtime72.jsx)("span", { children: t("taskSummary.historyError") }),
22147
- /* @__PURE__ */ (0, import_jsx_runtime72.jsxs)(
22344
+ return /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)("div", { className: "divide-y divide-border/70", children: [
22345
+ Boolean(historyError) && /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)("div", { className: "m-3 flex items-start justify-between gap-3 rounded-lg border border-destructive/30 bg-destructive/5 px-3 py-2 text-xs text-destructive", children: [
22346
+ /* @__PURE__ */ (0, import_jsx_runtime73.jsx)("span", { children: t("taskSummary.historyError") }),
22347
+ /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(
22148
22348
  "button",
22149
22349
  {
22150
22350
  type: "button",
22151
22351
  className: "inline-flex shrink-0 items-center gap-1 font-medium hover:underline",
22152
22352
  onClick: onRetryHistory,
22153
22353
  children: [
22154
- /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(import_lucide_react42.RotateCcw, { className: "size-3" }),
22354
+ /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(import_lucide_react42.RotateCcw, { className: "size-3" }),
22155
22355
  t("taskSummary.retry")
22156
22356
  ]
22157
22357
  }
22158
22358
  )
22159
22359
  ] }),
22160
- /* @__PURE__ */ (0, import_jsx_runtime72.jsxs)(SummarySection, { title: t("taskSummary.sections.outputs"), children: [
22161
- summary.outputs.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(SummaryPrompt, { onClick: onFocusComposer, children: t("taskSummary.createOutput") }) : sectionItems("outputs", summary.outputs).map((item) => /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
22360
+ /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(SummarySection, { title: t("taskSummary.sections.outputs"), children: [
22361
+ summary.outputs.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(SummaryPrompt, { onClick: onFocusComposer, children: t("taskSummary.createOutput") }) : sectionItems("outputs", summary.outputs).map((item) => /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
22162
22362
  SummaryButton,
22163
22363
  {
22164
22364
  title: item.title,
22165
22365
  metadata: localizedStatus(item.status),
22166
22366
  description: item.description,
22167
- leading: /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(import_lucide_react42.FileOutput, { className: "size-4" }),
22168
- trailing: item.resource && item.resource.type !== "message" ? /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(import_lucide_react42.ExternalLink, { className: "size-3.5" }) : void 0,
22367
+ leading: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(import_lucide_react42.FileOutput, { className: "size-4" }),
22368
+ trailing: item.resource && item.resource.type !== "message" ? /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(import_lucide_react42.ExternalLink, { className: "size-3.5" }) : void 0,
22169
22369
  onClick: () => openSummaryItem(item.resource, item.messageId, item.title)
22170
22370
  },
22171
22371
  item.id
22172
22372
  )),
22173
22373
  sectionAction("outputs", summary.totals.outputs)
22174
22374
  ] }),
22175
- /* @__PURE__ */ (0, import_jsx_runtime72.jsxs)(SummarySection, { title: t("taskSummary.sections.sources"), children: [
22176
- sectionItems("sources", summary.sources).map((item) => /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
22375
+ /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(SummarySection, { title: t("taskSummary.sections.sources"), children: [
22376
+ sectionItems("sources", summary.sources).map((item) => /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
22177
22377
  SummaryButton,
22178
22378
  {
22179
22379
  title: item.title,
22180
22380
  description: item.description,
22181
- leading: /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(import_lucide_react42.BookOpen, { className: "size-4" }),
22182
- trailing: item.resource && item.resource.type !== "message" ? /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(import_lucide_react42.ExternalLink, { className: "size-3.5" }) : void 0,
22381
+ leading: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(import_lucide_react42.BookOpen, { className: "size-4" }),
22382
+ trailing: item.resource && item.resource.type !== "message" ? /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(import_lucide_react42.ExternalLink, { className: "size-3.5" }) : void 0,
22183
22383
  onClick: () => openSummaryItem(item.resource, item.messageId, item.title)
22184
22384
  },
22185
22385
  item.id
22186
22386
  )),
22187
22387
  sectionAction("sources", summary.totals.sources)
22188
22388
  ] }),
22189
- hasTask && /* @__PURE__ */ (0, import_jsx_runtime72.jsxs)(SummarySection, { title: t("taskSummary.sections.task"), children: [
22190
- summary.goal && /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
22389
+ hasTask && /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(SummarySection, { title: t("taskSummary.sections.task"), children: [
22390
+ summary.goal && /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
22191
22391
  SummaryButton,
22192
22392
  {
22193
22393
  title: summary.goal.objective,
22194
22394
  metadata: localizedStatus(summary.goal.status),
22195
- leading: /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(import_lucide_react42.Target, { className: "size-4" }),
22395
+ leading: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(import_lucide_react42.Target, { className: "size-4" }),
22196
22396
  onClick: onFocusComposer
22197
22397
  }
22198
22398
  ),
22199
- summary.plan && /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
22399
+ summary.plan && /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
22200
22400
  SummaryButton,
22201
22401
  {
22202
22402
  title: summary.plan.title,
22203
22403
  description: summary.plan.excerpt,
22204
- leading: /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(import_lucide_react42.ListChecks, { className: "size-4" }),
22404
+ leading: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(import_lucide_react42.ListChecks, { className: "size-4" }),
22205
22405
  onClick: () => summary.plan?.messageId ? onNavigateMessage(summary.plan.messageId) : onFocusComposer()
22206
22406
  }
22207
22407
  ),
22208
22408
  localSectionItems("todos", summary.todos?.items ?? []).map(
22209
- (todo) => /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
22409
+ (todo) => /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
22210
22410
  SummaryButton,
22211
22411
  {
22212
22412
  title: todo.content,
22213
22413
  metadata: localizedStatus(todo.status),
22214
- leading: todo.status === "completed" ? /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(import_lucide_react42.CheckCircle2, { className: "size-4 text-muted-foreground" }) : /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(import_lucide_react42.CircleEllipsis, { className: "size-4 text-muted-foreground" }),
22414
+ leading: todo.status === "completed" ? /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(import_lucide_react42.CheckCircle2, { className: "size-4 text-muted-foreground" }) : /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(import_lucide_react42.CircleEllipsis, { className: "size-4 text-muted-foreground" }),
22215
22415
  onClick: () => summary.todos?.messageId ? onNavigateMessage(summary.todos.messageId) : onFocusComposer()
22216
22416
  },
22217
22417
  todo.id
@@ -22219,23 +22419,23 @@ function TaskSummaryContent({
22219
22419
  ),
22220
22420
  localSectionAction("todos", summary.todos?.items.length ?? 0)
22221
22421
  ] }),
22222
- summary.running.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime72.jsxs)(SummarySection, { title: t("taskSummary.sections.running"), children: [
22223
- localSectionItems("running", summary.running).map((item) => /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
22422
+ summary.running.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(SummarySection, { title: t("taskSummary.sections.running"), children: [
22423
+ localSectionItems("running", summary.running).map((item) => /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
22224
22424
  SummaryButton,
22225
22425
  {
22226
22426
  title: item.title,
22227
22427
  metadata: localizedStatus(item.status),
22228
22428
  description: item.description,
22229
- leading: /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(import_lucide_react42.PlayCircle, { className: "size-4" }),
22230
- trailing: item.resource ? /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(import_lucide_react42.ExternalLink, { className: "size-3.5" }) : void 0,
22429
+ leading: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(import_lucide_react42.PlayCircle, { className: "size-4" }),
22430
+ trailing: item.resource ? /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(import_lucide_react42.ExternalLink, { className: "size-3.5" }) : void 0,
22231
22431
  onClick: () => item.resource && onOpenResource(item.resource, void 0, item.title)
22232
22432
  },
22233
22433
  item.id
22234
22434
  )),
22235
22435
  localSectionAction("running", summary.running.length)
22236
22436
  ] }),
22237
- summary.agents.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime72.jsxs)(SummarySection, { title: t("taskSummary.sections.agents"), children: [
22238
- sectionItems("agents", summary.agents).map((item) => /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
22437
+ summary.agents.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(SummarySection, { title: t("taskSummary.sections.agents"), children: [
22438
+ sectionItems("agents", summary.agents).map((item) => /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
22239
22439
  SummaryButton,
22240
22440
  {
22241
22441
  title: item.title,
@@ -22244,20 +22444,20 @@ function TaskSummaryContent({
22244
22444
  formatElapsed(item.elapsedTime)
22245
22445
  ].filter(Boolean).join(" \xB7 "),
22246
22446
  description: item.error,
22247
- leading: /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(import_lucide_react42.Bot, { className: "size-4" }),
22447
+ leading: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(import_lucide_react42.Bot, { className: "size-4" }),
22248
22448
  onClick: () => item.messageId ? onNavigateMessage(item.messageId) : onFocusComposer()
22249
22449
  },
22250
22450
  item.id
22251
22451
  )),
22252
22452
  sectionAction("agents", summary.totals.agents)
22253
22453
  ] }),
22254
- summary.pending.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime72.jsxs)(SummarySection, { title: t("taskSummary.sections.pending"), children: [
22255
- sectionItems("pending", summary.pending).map((item) => /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
22454
+ summary.pending.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(SummarySection, { title: t("taskSummary.sections.pending"), children: [
22455
+ sectionItems("pending", summary.pending).map((item) => /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
22256
22456
  SummaryButton,
22257
22457
  {
22258
22458
  title: item.title,
22259
22459
  description: item.description,
22260
- leading: /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(import_lucide_react42.CircleEllipsis, { className: "size-4" }),
22460
+ leading: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(import_lucide_react42.CircleEllipsis, { className: "size-4" }),
22261
22461
  onClick: () => item.messageId ? onNavigateMessage(item.messageId) : onFocusComposer()
22262
22462
  },
22263
22463
  item.id
@@ -22270,16 +22470,16 @@ function SummarySection({
22270
22470
  title,
22271
22471
  children
22272
22472
  }) {
22273
- return /* @__PURE__ */ (0, import_jsx_runtime72.jsxs)("section", { "aria-label": title, className: "px-4 py-3", children: [
22274
- /* @__PURE__ */ (0, import_jsx_runtime72.jsx)("div", { className: "flex min-h-7 items-center justify-between gap-3", children: /* @__PURE__ */ (0, import_jsx_runtime72.jsx)("h3", { className: "text-sm font-medium text-muted-foreground", children: title }) }),
22275
- /* @__PURE__ */ (0, import_jsx_runtime72.jsx)("div", { className: "mt-1 space-y-0.5", children })
22473
+ return /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)("section", { "aria-label": title, className: "px-4 py-3", children: [
22474
+ /* @__PURE__ */ (0, import_jsx_runtime73.jsx)("div", { className: "flex min-h-7 items-center justify-between gap-3", children: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)("h3", { className: "text-sm font-medium text-muted-foreground", children: title }) }),
22475
+ /* @__PURE__ */ (0, import_jsx_runtime73.jsx)("div", { className: "mt-1 space-y-0.5", children })
22276
22476
  ] });
22277
22477
  }
22278
22478
  function SummaryPrompt({
22279
22479
  children,
22280
22480
  onClick
22281
22481
  }) {
22282
- return /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
22482
+ return /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
22283
22483
  "button",
22284
22484
  {
22285
22485
  type: "button",
@@ -22298,7 +22498,7 @@ function SummaryButton({
22298
22498
  onClick
22299
22499
  }) {
22300
22500
  const tooltipText = [title, metadata, description].filter(Boolean);
22301
- return /* @__PURE__ */ (0, import_jsx_runtime72.jsxs)(
22501
+ return /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(
22302
22502
  "button",
22303
22503
  {
22304
22504
  type: "button",
@@ -22312,13 +22512,13 @@ function SummaryButton({
22312
22512
  !onClick && "cursor-default"
22313
22513
  ),
22314
22514
  children: [
22315
- leading && /* @__PURE__ */ (0, import_jsx_runtime72.jsx)("span", { className: "mt-0.5 shrink-0 text-muted-foreground", children: leading }),
22316
- /* @__PURE__ */ (0, import_jsx_runtime72.jsxs)("span", { className: "min-w-0 flex-1", children: [
22317
- /* @__PURE__ */ (0, import_jsx_runtime72.jsx)("span", { className: "block truncate text-sm font-medium leading-5 text-foreground", children: title }),
22318
- metadata && /* @__PURE__ */ (0, import_jsx_runtime72.jsx)("span", { className: "mt-0.5 block truncate text-xs text-muted-foreground", children: metadata }),
22319
- description && /* @__PURE__ */ (0, import_jsx_runtime72.jsx)("span", { className: "mt-0.5 block line-clamp-2 text-xs text-muted-foreground", children: description })
22515
+ leading && /* @__PURE__ */ (0, import_jsx_runtime73.jsx)("span", { className: "mt-0.5 shrink-0 text-muted-foreground", children: leading }),
22516
+ /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)("span", { className: "min-w-0 flex-1", children: [
22517
+ /* @__PURE__ */ (0, import_jsx_runtime73.jsx)("span", { className: "block truncate text-sm font-medium leading-5 text-foreground", children: title }),
22518
+ metadata && /* @__PURE__ */ (0, import_jsx_runtime73.jsx)("span", { className: "mt-0.5 block truncate text-xs text-muted-foreground", children: metadata }),
22519
+ description && /* @__PURE__ */ (0, import_jsx_runtime73.jsx)("span", { className: "mt-0.5 block line-clamp-2 text-xs text-muted-foreground", children: description })
22320
22520
  ] }),
22321
- trailing && /* @__PURE__ */ (0, import_jsx_runtime72.jsx)("span", { className: "mt-0.5 text-muted-foreground", children: trailing })
22521
+ trailing && /* @__PURE__ */ (0, import_jsx_runtime73.jsx)("span", { className: "mt-0.5 text-muted-foreground", children: trailing })
22322
22522
  ]
22323
22523
  }
22324
22524
  );
@@ -22330,7 +22530,7 @@ function formatElapsed(value) {
22330
22530
  }
22331
22531
 
22332
22532
  // src/components/chat.tsx
22333
- var import_jsx_runtime73 = require("react/jsx-runtime");
22533
+ var import_jsx_runtime74 = require("react/jsx-runtime");
22334
22534
  var import_meta2 = {};
22335
22535
  var defaultApiUrl2 = import_meta2.env.VITE_XPERTAI_API_URL;
22336
22536
  var LONG_TEXT_REFERENCE_THRESHOLD = 5e3;
@@ -22469,7 +22669,7 @@ function ReferenceChip({
22469
22669
  const metaLine = getReferenceMetaLine(reference);
22470
22670
  const isComposer = variant === "composer";
22471
22671
  const Icon = reference.type === "quote" ? import_lucide_react43.Quote : reference.type === "image" ? import_lucide_react43.ImageIcon : import_lucide_react43.FileText;
22472
- return /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(
22672
+ return /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)(
22473
22673
  "div",
22474
22674
  {
22475
22675
  className: cn(
@@ -22478,7 +22678,7 @@ function ReferenceChip({
22478
22678
  ),
22479
22679
  title: getReferenceTitle(reference),
22480
22680
  children: [
22481
- /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
22681
+ /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
22482
22682
  Icon,
22483
22683
  {
22484
22684
  size: isComposer ? 14 : 12,
@@ -22488,8 +22688,8 @@ function ReferenceChip({
22488
22688
  )
22489
22689
  }
22490
22690
  ),
22491
- /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)("div", { className: "min-w-0 flex-1", children: [
22492
- /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
22691
+ /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)("div", { className: "min-w-0 flex-1", children: [
22692
+ /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
22493
22693
  "div",
22494
22694
  {
22495
22695
  className: cn(
@@ -22499,7 +22699,7 @@ function ReferenceChip({
22499
22699
  children: getReferenceLabel(reference)
22500
22700
  }
22501
22701
  ),
22502
- metaLine && /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
22702
+ metaLine && /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
22503
22703
  "div",
22504
22704
  {
22505
22705
  className: cn(
@@ -22510,7 +22710,7 @@ function ReferenceChip({
22510
22710
  }
22511
22711
  )
22512
22712
  ] }),
22513
- onRemove && removeLabel && /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
22713
+ onRemove && removeLabel && /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
22514
22714
  "button",
22515
22715
  {
22516
22716
  type: "button",
@@ -22521,7 +22721,7 @@ function ReferenceChip({
22521
22721
  ),
22522
22722
  title: removeLabel,
22523
22723
  "aria-label": removeLabel,
22524
- children: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(import_lucide_react43.X, { size: 12 })
22724
+ children: /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(import_lucide_react43.X, { size: 12 })
22525
22725
  }
22526
22726
  )
22527
22727
  ]
@@ -22535,19 +22735,19 @@ function WorkspaceFileChip({
22535
22735
  }) {
22536
22736
  const label = file.originalName ?? file.workspacePath ?? file.id ?? file.fileAssetId ?? "File";
22537
22737
  const meta = file.workspacePath ?? file.mimeType;
22538
- return /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(
22738
+ return /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)(
22539
22739
  "div",
22540
22740
  {
22541
22741
  "data-slot": "workspace-file-reference",
22542
22742
  className: "flex min-w-0 items-start gap-2 rounded-md bg-muted px-2 py-1 text-foreground",
22543
22743
  title: label,
22544
22744
  children: [
22545
- /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(import_lucide_react43.FileText, { className: "mt-0.5 size-3.5 shrink-0 text-muted-foreground" }),
22546
- /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)("div", { className: "min-w-0 flex-1", children: [
22547
- /* @__PURE__ */ (0, import_jsx_runtime73.jsx)("div", { className: "truncate text-sm", children: label }),
22548
- meta ? /* @__PURE__ */ (0, import_jsx_runtime73.jsx)("div", { className: "truncate text-xs text-muted-foreground", children: meta }) : null
22745
+ /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(import_lucide_react43.FileText, { className: "mt-0.5 size-3.5 shrink-0 text-muted-foreground" }),
22746
+ /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)("div", { className: "min-w-0 flex-1", children: [
22747
+ /* @__PURE__ */ (0, import_jsx_runtime74.jsx)("div", { className: "truncate text-sm", children: label }),
22748
+ meta ? /* @__PURE__ */ (0, import_jsx_runtime74.jsx)("div", { className: "truncate text-xs text-muted-foreground", children: meta }) : null
22549
22749
  ] }),
22550
- /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
22750
+ /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
22551
22751
  "button",
22552
22752
  {
22553
22753
  type: "button",
@@ -22555,7 +22755,7 @@ function WorkspaceFileChip({
22555
22755
  className: "ml-1 rounded-full p-0.5 hover:bg-muted-foreground/20",
22556
22756
  title: removeLabel,
22557
22757
  "aria-label": removeLabel,
22558
- children: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(import_lucide_react43.X, { size: 12 })
22758
+ children: /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(import_lucide_react43.X, { size: 12 })
22559
22759
  }
22560
22760
  )
22561
22761
  ]
@@ -22588,6 +22788,38 @@ function Chat({
22588
22788
  const messageNavigationEnabled = options?.messageNavigation?.enabled !== false;
22589
22789
  const { setStream } = useStreamManager();
22590
22790
  const stream = useStreamContext();
22791
+ const branchState = useThreadBranches(
22792
+ stream.client,
22793
+ stream.conversationId,
22794
+ stream.threadId,
22795
+ Boolean(stream.isReady && stream.client?.conversations?.listThreads),
22796
+ stream.isLoading
22797
+ );
22798
+ const [editingMessageId, setEditingMessageId] = React66.useState(
22799
+ null
22800
+ );
22801
+ const editRequestRef = React66.useRef(null);
22802
+ const [isChangingBranch, setIsChangingBranch] = React66.useState(false);
22803
+ const [runControlRequest, setRunControlRequest] = React66.useState(null);
22804
+ const runControlRequestRef = React66.useRef(null);
22805
+ const [runControlError, setRunControlError] = React66.useState(null);
22806
+ const currentRunControl = branchState.current?.runControl;
22807
+ const pauseRunId = stream.activeRunId ?? currentRunControl?.executionId ?? stream.displayPause?.executionId ?? null;
22808
+ const canPauseRun = Boolean(
22809
+ stream.threadId && pauseRunId && (stream.isLoading || currentRunControl?.state === "running")
22810
+ );
22811
+ const isRunPausing = runControlRequest?.threadId === stream.threadId && runControlRequest.action === "pause" || branchState.current?.status === "pausing";
22812
+ const isRunPaused = branchState.current?.status === "paused";
22813
+ const canRevealPausedDisplay = Boolean(stream.displayPause) && ["idle", "error", "interrupted"].includes(branchState.current?.status ?? "");
22814
+ const isPauseActive = isRunPausing || isRunPaused || stream.isDisplayPaused;
22815
+ const isResumingRun = runControlRequest?.threadId === stream.threadId && runControlRequest.action === "resume";
22816
+ const isVisibleStreaming = stream.isLoading && !stream.isDisplayPaused;
22817
+ const activeBranchRef = React66.useRef(stream.threadId);
22818
+ activeBranchRef.current = stream.threadId;
22819
+ React66.useEffect(() => {
22820
+ setEditingMessageId(null);
22821
+ editRequestRef.current = null;
22822
+ }, [stream.threadId]);
22591
22823
  const workbench = useWorkbench();
22592
22824
  const xpertPlatformClient = stream.client;
22593
22825
  const { theme } = useTheme();
@@ -23568,8 +23800,11 @@ function Chat({
23568
23800
  }, [stream.isLoading, messages, scrollToBottom]);
23569
23801
  const showMissingConfig = !isClientSecretInitializing && missingConfig;
23570
23802
  const hasUploadingFiles = attachmentState.hasUploadingFiles;
23571
- const isSubmissionBlocked = hasPendingInteractiveRequest || missingConfig || isHistoryUnavailable || hasUploadingFiles || isUploadingReferenceImages;
23572
- const isSendDisabled = !trimmedDraft && !hasReferences || isSubmissionBlocked;
23803
+ const isSubmissionBlocked = isChangingBranch || isResumingRun || isRunPausing || hasPendingInteractiveRequest || missingConfig || isHistoryUnavailable || hasUploadingFiles || isUploadingReferenceImages;
23804
+ const hasComposerInput = Boolean(
23805
+ trimmedDraft || hasReferences || attachmentState.uploadedFiles.length
23806
+ );
23807
+ const isSendDisabled = !hasComposerInput || isSubmissionBlocked;
23573
23808
  const isPromptEditDisabled = hasPendingInteractiveRequest || missingConfig || isHistoryLoading;
23574
23809
  const canUploadAttachments = composer?.attachments?.enabled === true && !isPromptEditDisabled;
23575
23810
  const queueAttachmentFiles = React66.useCallback((files) => {
@@ -23789,7 +24024,7 @@ function Chat({
23789
24024
  );
23790
24025
  const filesToSend = mergedFiles.length > 0 ? mergedFiles : void 0;
23791
24026
  const referencesToSend = references.length > 0 ? [...references] : void 0;
23792
- const nextFollowUpMode = stream.isLoading ? "queue" : void 0;
24027
+ const nextFollowUpMode = stream.isLoading && !stream.isDisplayPaused && !isRunPaused ? "queue" : void 0;
23793
24028
  const effectivePlanMode = submitOptions.planMode ?? planModeEnabled;
23794
24029
  const humanInput = buildHumanMessageInputPayload({
23795
24030
  content: contentToSubmit,
@@ -23886,6 +24121,7 @@ function Chat({
23886
24121
  };
23887
24122
  const submission = stream.submit(
23888
24123
  {
24124
+ id: newMessage.id,
23889
24125
  input: inputPayload,
23890
24126
  ...requestOptions.state ? { state: requestOptions.state } : {}
23891
24127
  },
@@ -23918,6 +24154,7 @@ function Chat({
23918
24154
  getRuntimeCapabilitiesForSubmit,
23919
24155
  promptWorkflow,
23920
24156
  isSubmissionBlocked,
24157
+ isRunPaused,
23921
24158
  options?.request,
23922
24159
  persistSessionRuntimeCapabilities,
23923
24160
  references,
@@ -24671,6 +24908,136 @@ function Chat({
24671
24908
  );
24672
24909
  });
24673
24910
  };
24911
+ const handleComposerRunControl = async (action) => {
24912
+ const sourceThreadId = stream.threadId;
24913
+ if (isChangingBranch || isRunPausing || isResumingRun) return;
24914
+ if (action === "resume") {
24915
+ if (!sourceThreadId || !canRevealPausedDisplay && (!isRunPaused || !currentRunControl?.pauseId)) return;
24916
+ } else {
24917
+ if (isRunPaused) return;
24918
+ if (!sourceThreadId || !pauseRunId) return;
24919
+ }
24920
+ if (!sourceThreadId) return;
24921
+ if (runControlRequestRef.current?.threadId === sourceThreadId) return;
24922
+ const runId = pauseRunId;
24923
+ if (!runId) return;
24924
+ const request = {
24925
+ action,
24926
+ threadId: sourceThreadId,
24927
+ runId
24928
+ };
24929
+ runControlRequestRef.current = request;
24930
+ setRunControlRequest(request);
24931
+ setRunControlError(null);
24932
+ try {
24933
+ if (action === "resume" && canRevealPausedDisplay) {
24934
+ await stream.resumeDisplay();
24935
+ } else if (action === "resume" && currentRunControl?.pauseId) {
24936
+ await stream.resumeRun(request.runId, currentRunControl.pauseId);
24937
+ } else {
24938
+ await stream.pauseRun(request.runId);
24939
+ }
24940
+ if (activeBranchRef.current === sourceThreadId) {
24941
+ await branchState.refresh();
24942
+ }
24943
+ } catch (error) {
24944
+ if (activeBranchRef.current === sourceThreadId && runControlRequestRef.current === request) {
24945
+ setRunControlError({
24946
+ threadId: sourceThreadId,
24947
+ message: error instanceof Error ? error.message : String(error)
24948
+ });
24949
+ }
24950
+ } finally {
24951
+ if (runControlRequestRef.current === request) {
24952
+ runControlRequestRef.current = null;
24953
+ setRunControlRequest(null);
24954
+ }
24955
+ }
24956
+ };
24957
+ const saveEditedMessage = async (message, text) => {
24958
+ const sourceThreadId = stream.threadId;
24959
+ if (!sourceThreadId || !message.id) return;
24960
+ const request = editRequestRef.current?.messageId === message.id ? editRequestRef.current : { messageId: message.id, requestId: createMessageId() };
24961
+ editRequestRef.current = request;
24962
+ setIsChangingBranch(true);
24963
+ try {
24964
+ const branch = await stream.client.threads.copy(sourceThreadId, {
24965
+ beforeMessageId: message.id,
24966
+ requestId: request.requestId
24967
+ });
24968
+ if (activeBranchRef.current !== sourceThreadId) return;
24969
+ const source = await stream.client.threads.get(sourceThreadId);
24970
+ if (activeBranchRef.current !== sourceThreadId) return;
24971
+ if (source.status === "busy") {
24972
+ if (!source.runControl?.executionId) {
24973
+ throw new Error(t("threadControl.sourcePauseUnavailable"));
24974
+ }
24975
+ try {
24976
+ await stream.pauseRun(source.runControl.executionId);
24977
+ } catch (error) {
24978
+ const latest = await stream.client.threads.get(sourceThreadId).catch(() => null);
24979
+ if (!latest || latest.status === "busy") throw error;
24980
+ }
24981
+ }
24982
+ if (activeBranchRef.current !== sourceThreadId) return;
24983
+ activeBranchRef.current = branch.thread_id;
24984
+ stream.reset(branch.thread_id, []);
24985
+ await stream.loadThread(branch.thread_id);
24986
+ if (activeBranchRef.current !== branch.thread_id) return;
24987
+ const humanInput = buildHumanMessageInputPayload({
24988
+ content: text,
24989
+ references: message.references,
24990
+ referenceComposition: "compose"
24991
+ });
24992
+ if (!humanInput) return;
24993
+ const files = mergeSubmittedFiles(
24994
+ message.fileAssets ?? [],
24995
+ message.attachments ?? []
24996
+ );
24997
+ const edited = {
24998
+ ...message,
24999
+ type: "human",
25000
+ id: createMessageId(),
25001
+ content: text,
25002
+ submittedInput: humanInput.input,
25003
+ referenceComposition: humanInput.referenceComposition
25004
+ };
25005
+ const input = {
25006
+ ...humanInput,
25007
+ ...files.length ? { files } : {},
25008
+ ...message.runtimeCapabilities ? { runtimeCapabilities: message.runtimeCapabilities } : {},
25009
+ ...message.model ? { model: message.model } : {}
25010
+ };
25011
+ const requestOptions = buildInjectedRequestOptions({
25012
+ defaults: options?.request,
25013
+ humanInput: input
25014
+ });
25015
+ setEditingMessageId(null);
25016
+ setIsChangingBranch(false);
25017
+ const submission = stream.submit(
25018
+ {
25019
+ id: edited.id,
25020
+ input,
25021
+ ...requestOptions.state ? { state: requestOptions.state } : {}
25022
+ },
25023
+ {
25024
+ threadId: branch.thread_id,
25025
+ joinExistingThread: true,
25026
+ ...requestOptions.context ? { context: requestOptions.context } : {},
25027
+ ...requestOptions.config ? { config: requestOptions.config } : {},
25028
+ optimisticValues: (previous) => ({
25029
+ ...previous,
25030
+ messages: [...previous.messages ?? [], edited]
25031
+ })
25032
+ }
25033
+ );
25034
+ void submission.catch((error) => {
25035
+ setHistoryError(error instanceof Error ? error.message : String(error));
25036
+ });
25037
+ } finally {
25038
+ setIsChangingBranch(false);
25039
+ }
25040
+ };
24674
25041
  const handleRetry = (messageIndex) => {
24675
25042
  const messagesUpToIndex = messages.slice(0, messageIndex);
24676
25043
  const lastHumanMessage = [...messagesUpToIndex].reverse().find((m) => String(m.type) === "human");
@@ -24836,13 +25203,13 @@ function Chat({
24836
25203
  onFocusComposer: () => focusComposerAt(),
24837
25204
  onOpenResource: openTaskSummaryResource
24838
25205
  };
24839
- return /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(
25206
+ return /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)(
24840
25207
  "div",
24841
25208
  {
24842
25209
  className: "relative flex h-full w-full min-w-0 bg-background",
24843
25210
  "data-task-summary-layout": taskSummaryDocked ? "docked" : "popover",
24844
25211
  children: [
24845
- /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(
25212
+ /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)(
24846
25213
  UploadDroppedFiles,
24847
25214
  {
24848
25215
  ref: viewportRef,
@@ -24857,7 +25224,7 @@ function Chat({
24857
25224
  className
24858
25225
  ),
24859
25226
  children: [
24860
- surface === "main" && options?.header?.enabled !== false && /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(
25227
+ surface === "main" && options?.header?.enabled !== false && /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)(
24861
25228
  "div",
24862
25229
  {
24863
25230
  ref: chatColumnRef,
@@ -24865,9 +25232,9 @@ function Chat({
24865
25232
  className: "mx-auto flex w-full items-center justify-between border-b p-2 sticky top-0 z-10 bg-background",
24866
25233
  style: chatColumnStyle,
24867
25234
  children: [
24868
- /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)("div", { className: "flex min-w-0 items-center gap-3 overflow-hidden", children: [
24869
- /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)("div", { className: "relative shrink-0", children: [
24870
- /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
25235
+ /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)("div", { className: "flex min-w-0 items-center gap-3 overflow-hidden", children: [
25236
+ /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)("div", { className: "relative shrink-0", children: [
25237
+ /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
24871
25238
  ChatkitAvatar,
24872
25239
  {
24873
25240
  avatar: assistantAvatar,
@@ -24875,10 +25242,10 @@ function Chat({
24875
25242
  label: assistantTitle
24876
25243
  }
24877
25244
  ),
24878
- /* @__PURE__ */ (0, import_jsx_runtime73.jsx)("span", { className: "absolute bottom-0 right-0 h-2.5 w-2.5 rounded-full border-2 border-background bg-green-500" })
25245
+ /* @__PURE__ */ (0, import_jsx_runtime74.jsx)("span", { className: "absolute bottom-0 right-0 h-2.5 w-2.5 rounded-full border-2 border-background bg-green-500" })
24879
25246
  ] }),
24880
- /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)("div", { className: "min-w-0", children: [
24881
- /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
25247
+ /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)("div", { className: "min-w-0", children: [
25248
+ /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
24882
25249
  "h2",
24883
25250
  {
24884
25251
  className: "text-lg font-semibold truncate",
@@ -24886,7 +25253,7 @@ function Chat({
24886
25253
  children: assistantTitle
24887
25254
  }
24888
25255
  ),
24889
- /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
25256
+ /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
24890
25257
  "p",
24891
25258
  {
24892
25259
  className: "truncate text-xs text-muted-foreground",
@@ -24896,8 +25263,8 @@ function Chat({
24896
25263
  )
24897
25264
  ] })
24898
25265
  ] }),
24899
- /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)("div", { className: "flex items-center gap-1", children: [
24900
- taskSummaryAvailable && /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
25266
+ /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)("div", { className: "flex items-center gap-1", children: [
25267
+ taskSummaryAvailable && /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
24901
25268
  TaskSummaryTrigger,
24902
25269
  {
24903
25270
  ...taskSummaryProps,
@@ -24906,9 +25273,9 @@ function Chat({
24906
25273
  onOpenChange: handleTaskSummaryOpenChange
24907
25274
  }
24908
25275
  ),
24909
- /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(WorkbenchToggleButton, {}),
24910
- canMinimizeToPet && /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(Tooltip, { children: [
24911
- /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)("span", { className: "inline-flex h-8 w-8", children: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
25276
+ /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(WorkbenchToggleButton, {}),
25277
+ canMinimizeToPet && /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)(Tooltip, { children: [
25278
+ /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime74.jsx)("span", { className: "inline-flex h-8 w-8", children: /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
24912
25279
  "button",
24913
25280
  {
24914
25281
  type: "button",
@@ -24919,13 +25286,13 @@ function Chat({
24919
25286
  "transition-colors duration-150"
24920
25287
  ),
24921
25288
  "aria-label": t("chat.minimizeToPet"),
24922
- children: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(import_lucide_react43.Minus, { size: 16 })
25289
+ children: /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(import_lucide_react43.Minus, { size: 16 })
24923
25290
  }
24924
25291
  ) }) }),
24925
- /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(TooltipContent, { side: "bottom", children: t("chat.minimizeToPet") })
25292
+ /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(TooltipContent, { side: "bottom", children: t("chat.minimizeToPet") })
24926
25293
  ] }),
24927
- /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(Tooltip, { children: [
24928
- /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)("span", { className: "inline-flex h-8 w-8", children: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
25294
+ /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)(Tooltip, { children: [
25295
+ /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime74.jsx)("span", { className: "inline-flex h-8 w-8", children: /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
24929
25296
  "button",
24930
25297
  {
24931
25298
  type: "button",
@@ -24936,14 +25303,14 @@ function Chat({
24936
25303
  "transition-colors duration-150"
24937
25304
  ),
24938
25305
  "aria-label": t("settings.open"),
24939
- children: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(import_lucide_react43.Settings, { size: 16 })
25306
+ children: /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(import_lucide_react43.Settings, { size: 16 })
24940
25307
  }
24941
25308
  ) }) }),
24942
- /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(TooltipContent, { side: "bottom", children: t("settings.open") })
25309
+ /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(TooltipContent, { side: "bottom", children: t("settings.open") })
24943
25310
  ] }),
24944
- history?.enabled !== false && /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(import_jsx_runtime73.Fragment, { children: [
24945
- /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(Tooltip, { children: [
24946
- /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)("span", { className: "inline-flex h-8 w-8", children: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
25311
+ history?.enabled !== false && /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)(import_jsx_runtime74.Fragment, { children: [
25312
+ /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)(Tooltip, { children: [
25313
+ /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime74.jsx)("span", { className: "inline-flex h-8 w-8", children: /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
24947
25314
  "button",
24948
25315
  {
24949
25316
  type: "button",
@@ -24956,12 +25323,12 @@ function Chat({
24956
25323
  "disabled:pointer-events-none disabled:opacity-50 disabled:cursor-not-allowed"
24957
25324
  ),
24958
25325
  "aria-label": t("history.newThread"),
24959
- children: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(import_lucide_react43.Pencil, { size: 16 })
25326
+ children: /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(import_lucide_react43.Pencil, { size: 16 })
24960
25327
  }
24961
25328
  ) }) }),
24962
- /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(TooltipContent, { side: "bottom", children: t("history.newThread") })
25329
+ /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(TooltipContent, { side: "bottom", children: t("history.newThread") })
24963
25330
  ] }),
24964
- /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
25331
+ /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
24965
25332
  HistorySidebar,
24966
25333
  {
24967
25334
  threads,
@@ -24980,7 +25347,7 @@ function Chat({
24980
25347
  ]
24981
25348
  }
24982
25349
  ),
24983
- showMessageNavigation && /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
25350
+ showMessageNavigation && /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
24984
25351
  MessageNavigator,
24985
25352
  {
24986
25353
  items: messageNavigationItems,
@@ -24991,7 +25358,7 @@ function Chat({
24991
25358
  tagsOverflowLabel: (count) => t("message.navigation.moreTags", { count })
24992
25359
  }
24993
25360
  ),
24994
- /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(
25361
+ /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)(
24995
25362
  "div",
24996
25363
  {
24997
25364
  "data-slot": "chatkit-chat-content",
@@ -25001,10 +25368,10 @@ function Chat({
25001
25368
  ),
25002
25369
  style: chatColumnStyle,
25003
25370
  children: [
25004
- errorMessage && /* @__PURE__ */ (0, import_jsx_runtime73.jsx)("div", { className: "mb-4 rounded-lg border border-destructive/30 bg-destructive/10 px-3 py-2 text-sm text-destructive", children: errorMessage }),
25005
- historyError && /* @__PURE__ */ (0, import_jsx_runtime73.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 }),
25006
- showMissingConfig && /* @__PURE__ */ (0, import_jsx_runtime73.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 }),
25007
- /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
25371
+ errorMessage && /* @__PURE__ */ (0, import_jsx_runtime74.jsx)("div", { className: "mb-4 rounded-lg border border-destructive/30 bg-destructive/10 px-3 py-2 text-sm text-destructive", children: errorMessage }),
25372
+ historyError && /* @__PURE__ */ (0, import_jsx_runtime74.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 }),
25373
+ showMissingConfig && /* @__PURE__ */ (0, import_jsx_runtime74.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 }),
25374
+ /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
25008
25375
  ThreadHistoryStatus,
25009
25376
  {
25010
25377
  state: stream.historyLoad,
@@ -25014,7 +25381,7 @@ function Chat({
25014
25381
  }
25015
25382
  }
25016
25383
  ),
25017
- !stream.threadId && messages.length === 0 && !canLoadMoreMessages ? /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
25384
+ !stream.threadId && messages.length === 0 && !canLoadMoreMessages ? /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
25018
25385
  StartScreen,
25019
25386
  {
25020
25387
  startScreen,
@@ -25024,10 +25391,10 @@ function Chat({
25024
25391
  promptEditDisabled: isPromptEditDisabled,
25025
25392
  className: "px-4 pb-4 pt-2"
25026
25393
  }
25027
- ) : /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)("div", { className: "space-y-4", children: [
25028
- canLoadMoreMessages && /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)("div", { className: "flex items-center gap-3 py-1", children: [
25029
- /* @__PURE__ */ (0, import_jsx_runtime73.jsx)("div", { className: "h-px min-w-8 flex-1 bg-border" }),
25030
- /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
25394
+ ) : /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)("div", { className: "space-y-4", children: [
25395
+ canLoadMoreMessages && /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)("div", { className: "flex items-center gap-3 py-1", children: [
25396
+ /* @__PURE__ */ (0, import_jsx_runtime74.jsx)("div", { className: "h-px min-w-8 flex-1 bg-border" }),
25397
+ /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
25031
25398
  Button,
25032
25399
  {
25033
25400
  type: "button",
@@ -25039,12 +25406,12 @@ function Chat({
25039
25406
  children: isLoadingMoreMessages ? t("chat.loadingMoreMessages") : t("chat.loadMoreMessages")
25040
25407
  }
25041
25408
  ),
25042
- /* @__PURE__ */ (0, import_jsx_runtime73.jsx)("div", { className: "h-px min-w-8 flex-1 bg-border" })
25409
+ /* @__PURE__ */ (0, import_jsx_runtime74.jsx)("div", { className: "h-px min-w-8 flex-1 bg-border" })
25043
25410
  ] }),
25044
25411
  messages.map((message, index) => {
25045
25412
  const messageType = String(message.type);
25046
25413
  const isAssistantMessage = messageType === "assistant" || messageType === "ai";
25047
- const isStreamingMessage = stream.isLoading && index === messages.length - 1;
25414
+ const isStreamingMessage = isVisibleStreaming && index === messages.length - 1;
25048
25415
  const streamingStatus = isAssistantMessage ? getAssistantStreamingStatus(
25049
25416
  {
25050
25417
  ...message,
@@ -25075,6 +25442,8 @@ function Chat({
25075
25442
  ) : [];
25076
25443
  const hasHumanAttachments = message.type === "human" && humanAttachments.length > 0;
25077
25444
  const canQuoteMessage = message.type === "human" || isAssistantMessage;
25445
+ const isEditingMessage = Boolean(message.id) && editingMessageId === message.id;
25446
+ const canEditMessage = message.type === "human" && Boolean(branchState.current) && Boolean(message.id) && humanMessage.inputCheckpoint !== null && !humanMessage.followUpMode && !isChangingBranch;
25078
25447
  const quoteSource = message.type === "human" ? t("chat.youLabel") : assistantTitle;
25079
25448
  const messageNavigationId = getMessageNavigationItemId(
25080
25449
  message,
@@ -25083,7 +25452,7 @@ function Chat({
25083
25452
  if (!isAssistantMessage && !hasPlainRenderableContent && !hasHumanAttachments && humanRuntimeCapabilityOptions.length === 0 && humanReferences.length === 0) {
25084
25453
  return null;
25085
25454
  }
25086
- return /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
25455
+ return /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
25087
25456
  "div",
25088
25457
  {
25089
25458
  ref: (node) => setMessageNavigationAnchor(messageNavigationId, node),
@@ -25093,15 +25462,23 @@ function Chat({
25093
25462
  message.type === "human" ? "justify-end" : "justify-start -ml-1"
25094
25463
  // AI messages: slightly closer to left
25095
25464
  ),
25096
- children: /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(
25465
+ children: /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
25097
25466
  "div",
25098
25467
  {
25099
25468
  className: cn(
25100
25469
  "flex flex-col px-3 overflow-hidden",
25101
- isAssistantMessage && "min-w-0 flex-1"
25470
+ (isAssistantMessage || isEditingMessage) && "min-w-0 flex-1"
25102
25471
  ),
25103
- children: [
25104
- /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
25472
+ children: isEditingMessage ? /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
25473
+ MessageEditor,
25474
+ {
25475
+ initialText: typeof message.content === "string" ? message.content : messageContent,
25476
+ onCancel: () => setEditingMessageId(null),
25477
+ onSave: (text) => saveEditedMessage(message, text)
25478
+ },
25479
+ message.id
25480
+ ) : /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)(import_jsx_runtime74.Fragment, { children: [
25481
+ /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
25105
25482
  "div",
25106
25483
  {
25107
25484
  ...canQuoteMessage ? {
@@ -25113,7 +25490,7 @@ function Chat({
25113
25490
  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"
25114
25491
  // AI messages: use chat-specific foreground color
25115
25492
  ),
25116
- children: isAssistantMessage ? /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
25493
+ children: isAssistantMessage ? /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
25117
25494
  AssistantMessage,
25118
25495
  {
25119
25496
  message: {
@@ -25129,19 +25506,20 @@ function Chat({
25129
25506
  isStreaming: isStreamingMessage,
25130
25507
  streamingStatus,
25131
25508
  isThreadRunning: currentThreadIsRunning,
25509
+ isThreadPaused: isPauseActive,
25132
25510
  organizationId: stream.organizationId,
25133
25511
  apiUrl: stream.apiUrl,
25134
25512
  pet: effectivePet,
25135
25513
  mcpApps: options?.mcpApps
25136
25514
  }
25137
- ) : /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(import_jsx_runtime73.Fragment, { children: [
25138
- message.type === "human" && humanRuntimeCapabilityOptions.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
25515
+ ) : /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)(import_jsx_runtime74.Fragment, { children: [
25516
+ message.type === "human" && humanRuntimeCapabilityOptions.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
25139
25517
  HumanRuntimeCapabilityChips,
25140
25518
  {
25141
25519
  options: humanRuntimeCapabilityOptions
25142
25520
  }
25143
25521
  ),
25144
- message.type === "human" && humanReferences.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime73.jsx)("div", { className: "mb-2 flex flex-wrap gap-1.5", children: humanReferences.map((reference) => /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
25522
+ message.type === "human" && humanReferences.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime74.jsx)("div", { className: "mb-2 flex flex-wrap gap-1.5", children: humanReferences.map((reference) => /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
25145
25523
  ReferenceChip,
25146
25524
  {
25147
25525
  reference,
@@ -25149,45 +25527,49 @@ function Chat({
25149
25527
  },
25150
25528
  getReferenceKey(reference)
25151
25529
  )) }),
25152
- message.type === "human" && humanAttachments.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime73.jsx)("div", { className: "flex flex-wrap gap-1.5 mb-2", children: humanAttachments.map((file, fileIndex) => /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(
25530
+ message.type === "human" && humanAttachments.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime74.jsx)("div", { className: "flex flex-wrap gap-1.5 mb-2", children: humanAttachments.map((file, fileIndex) => /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)(
25153
25531
  "div",
25154
25532
  {
25155
25533
  className: "flex items-center gap-1.5 rounded-md bg-primary-foreground/20 px-2 py-1 text-xs",
25156
25534
  children: [
25157
- /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(import_lucide_react43.FileText, { size: 12 }),
25158
- /* @__PURE__ */ (0, import_jsx_runtime73.jsx)("span", { className: "max-w-[100px] truncate", children: file.originalName ?? file.id })
25535
+ /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(import_lucide_react43.FileText, { size: 12 }),
25536
+ /* @__PURE__ */ (0, import_jsx_runtime74.jsx)("span", { className: "max-w-[100px] truncate", children: file.originalName ?? file.id })
25159
25537
  ]
25160
25538
  },
25161
25539
  fileIndex
25162
25540
  )) }),
25163
- Array.isArray(message.content) ? message.content.map((part, partIndex) => /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
25541
+ Array.isArray(message.content) ? message.content.map((part, partIndex) => /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
25164
25542
  "p",
25165
25543
  {
25166
25544
  className: "wrap-break-word text-sm leading-relaxed",
25167
25545
  children: formatMessageContent(part)
25168
25546
  },
25169
25547
  `${part.type}-${partIndex}`
25170
- )) : /* @__PURE__ */ (0, import_jsx_runtime73.jsx)("span", { className: "wrap-break-word text-sm leading-relaxed", children: formatMessageContent(message.content) })
25548
+ )) : /* @__PURE__ */ (0, import_jsx_runtime74.jsx)("span", { className: "wrap-break-word text-sm leading-relaxed", children: formatMessageContent(message.content) })
25171
25549
  ] })
25172
25550
  }
25173
25551
  ),
25174
- /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
25552
+ /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
25175
25553
  MessageActions,
25176
25554
  {
25177
25555
  content: messageContent,
25178
25556
  isAssistant: isAssistantMessage,
25179
25557
  isStreaming: isStreamingMessage,
25180
- onRetry: isAssistantMessage && !stream.isLoading && index === messages.length - 1 ? () => handleRetry(index) : void 0
25558
+ onEdit: canEditMessage ? () => {
25559
+ editRequestRef.current = null;
25560
+ setEditingMessageId(message.id ?? null);
25561
+ } : void 0,
25562
+ onRetry: isAssistantMessage && branchState.current?.status !== "paused" && branchState.current?.status !== "pausing" && !stream.isLoading && index === messages.length - 1 ? () => handleRetry(index) : void 0
25181
25563
  }
25182
25564
  )
25183
- ]
25565
+ ] })
25184
25566
  }
25185
25567
  )
25186
25568
  },
25187
25569
  message.id ?? `${message.type}-${index}`
25188
25570
  );
25189
25571
  }),
25190
- showLoadingDots && (() => {
25572
+ showLoadingDots && !stream.isDisplayPaused && (() => {
25191
25573
  const lastMessage = messages[messages.length - 1];
25192
25574
  const lastMessageType = lastMessage ? String(lastMessage.type) : "";
25193
25575
  const isLastMessageFromAI = lastMessageType === "ai" || lastMessageType === "assistant";
@@ -25209,7 +25591,7 @@ function Chat({
25209
25591
  stream.isLoading,
25210
25592
  { now: streamingNow }
25211
25593
  );
25212
- return /* @__PURE__ */ (0, import_jsx_runtime73.jsx)("div", { className: "flex justify-start gap-3 -ml-2", children: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)("div", { className: "max-w-full rounded-2xl py-2.5", children: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
25594
+ return /* @__PURE__ */ (0, import_jsx_runtime74.jsx)("div", { className: "flex justify-start gap-3 -ml-2", children: /* @__PURE__ */ (0, import_jsx_runtime74.jsx)("div", { className: "max-w-full rounded-2xl py-2.5", children: /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
25213
25595
  AssistantStreamingIndicator,
25214
25596
  {
25215
25597
  status: fallbackStreamingStatus ?? "loading"
@@ -25220,7 +25602,7 @@ function Chat({
25220
25602
  ]
25221
25603
  }
25222
25604
  ),
25223
- quoteSelection && /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(
25605
+ quoteSelection && /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)(
25224
25606
  "div",
25225
25607
  {
25226
25608
  className: "pointer-events-none fixed z-50 flex flex-col items-center gap-1",
@@ -25230,8 +25612,8 @@ function Chat({
25230
25612
  transform: "translateX(-50%)"
25231
25613
  },
25232
25614
  children: [
25233
- /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)("div", { className: "pointer-events-auto flex overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-lg", children: [
25234
- /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(
25615
+ /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)("div", { className: "pointer-events-auto flex overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-lg", children: [
25616
+ /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)(
25235
25617
  Button,
25236
25618
  {
25237
25619
  type: "button",
@@ -25243,12 +25625,12 @@ function Chat({
25243
25625
  "aria-label": t("composer.quoteSelection"),
25244
25626
  title: t("composer.quoteSelection"),
25245
25627
  children: [
25246
- /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(import_lucide_react43.Quote, { size: 14 }),
25628
+ /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(import_lucide_react43.Quote, { size: 14 }),
25247
25629
  t("composer.quoteSelection")
25248
25630
  ]
25249
25631
  }
25250
25632
  ),
25251
- workbench.sideChatEnabled && /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(
25633
+ workbench.sideChatEnabled && /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)(
25252
25634
  Button,
25253
25635
  {
25254
25636
  type: "button",
@@ -25261,17 +25643,17 @@ function Chat({
25261
25643
  "aria-label": t("composer.askInSideChat"),
25262
25644
  title: t("composer.askInSideChat"),
25263
25645
  children: [
25264
- isOpeningSideChat ? /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(import_lucide_react43.Loader2, { size: 14, className: "animate-spin" }) : /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(import_lucide_react43.MessageSquarePlus, { size: 14 }),
25646
+ isOpeningSideChat ? /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(import_lucide_react43.Loader2, { size: 14, className: "animate-spin" }) : /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(import_lucide_react43.MessageSquarePlus, { size: 14 }),
25265
25647
  t("composer.askInSideChat")
25266
25648
  ]
25267
25649
  }
25268
25650
  )
25269
25651
  ] }),
25270
- sideChatError && /* @__PURE__ */ (0, import_jsx_runtime73.jsx)("div", { className: "pointer-events-auto max-w-72 rounded-md bg-destructive px-2 py-1 text-xs text-destructive-foreground shadow", children: sideChatError })
25652
+ sideChatError && /* @__PURE__ */ (0, import_jsx_runtime74.jsx)("div", { className: "pointer-events-auto max-w-72 rounded-md bg-destructive px-2 py-1 text-xs text-destructive-foreground shadow", children: sideChatError })
25271
25653
  ]
25272
25654
  }
25273
25655
  ),
25274
- /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(
25656
+ /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)(
25275
25657
  "div",
25276
25658
  {
25277
25659
  "data-slot": "chatkit-chat-composer",
@@ -25282,12 +25664,13 @@ function Chat({
25282
25664
  ),
25283
25665
  style: chatColumnStyle,
25284
25666
  children: [
25285
- !isAtBottom && messages.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
25667
+ runControlError?.threadId === stream.threadId && /* @__PURE__ */ (0, import_jsx_runtime74.jsx)("p", { role: "alert", className: "text-xs text-destructive", children: runControlError.message }),
25668
+ !isAtBottom && messages.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
25286
25669
  "div",
25287
25670
  {
25288
25671
  "data-slot": "scroll-to-bottom",
25289
25672
  className: "pointer-events-none absolute left-1/2 top-0 z-20 flex -translate-x-1/2 -translate-y-full justify-center",
25290
- children: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
25673
+ children: /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
25291
25674
  Button,
25292
25675
  {
25293
25676
  type: "button",
@@ -25300,13 +25683,13 @@ function Chat({
25300
25683
  onClick: () => scrollToBottom(true, true),
25301
25684
  "aria-label": t("chat.scrollToBottom"),
25302
25685
  title: t("chat.scrollToBottom"),
25303
- children: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(import_lucide_react43.ArrowDown, { size: 16 })
25686
+ children: /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(import_lucide_react43.ArrowDown, { size: 16 })
25304
25687
  }
25305
25688
  )
25306
25689
  }
25307
25690
  ),
25308
- threadErrorMessage && /* @__PURE__ */ (0, import_jsx_runtime73.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 }),
25309
- showGoalStatus && /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(
25691
+ threadErrorMessage && /* @__PURE__ */ (0, import_jsx_runtime74.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 }),
25692
+ showGoalStatus && /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)(
25310
25693
  "div",
25311
25694
  {
25312
25695
  className: cn(
@@ -25314,7 +25697,7 @@ function Chat({
25314
25697
  isGoalObjectiveExpanded ? "items-start" : "items-center"
25315
25698
  ),
25316
25699
  children: [
25317
- /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
25700
+ /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
25318
25701
  import_lucide_react43.Target,
25319
25702
  {
25320
25703
  className: cn(
@@ -25323,13 +25706,13 @@ function Chat({
25323
25706
  )
25324
25707
  }
25325
25708
  ),
25326
- /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)("div", { className: "min-w-0 flex-1", children: [
25327
- /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)("div", { className: "flex min-w-0 items-center gap-2", children: [
25328
- /* @__PURE__ */ (0, import_jsx_runtime73.jsx)("span", { className: "font-medium", children: t("chat.goal.label") }),
25329
- threadGoal && /* @__PURE__ */ (0, import_jsx_runtime73.jsx)("span", { className: "shrink-0 rounded-md bg-muted px-1.5 py-0.5 text-[11px] text-muted-foreground", children: t(`chat.goal.status.${threadGoal.status}`) }),
25330
- isGoalLoading && /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(import_lucide_react43.Loader2, { className: "size-3 animate-spin text-muted-foreground" })
25709
+ /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)("div", { className: "min-w-0 flex-1", children: [
25710
+ /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)("div", { className: "flex min-w-0 items-center gap-2", children: [
25711
+ /* @__PURE__ */ (0, import_jsx_runtime74.jsx)("span", { className: "font-medium", children: t("chat.goal.label") }),
25712
+ threadGoal && /* @__PURE__ */ (0, import_jsx_runtime74.jsx)("span", { className: "shrink-0 rounded-md bg-muted px-1.5 py-0.5 text-[11px] text-muted-foreground", children: t(`chat.goal.status.${threadGoal.status}`) }),
25713
+ isGoalLoading && /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(import_lucide_react43.Loader2, { className: "size-3 animate-spin text-muted-foreground" })
25331
25714
  ] }),
25332
- /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
25715
+ /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
25333
25716
  "div",
25334
25717
  {
25335
25718
  className: cn(
@@ -25339,13 +25722,13 @@ function Chat({
25339
25722
  children: goalError || threadGoal?.objective
25340
25723
  }
25341
25724
  ),
25342
- threadGoal && /* @__PURE__ */ (0, import_jsx_runtime73.jsx)("div", { className: "mt-1 flex flex-wrap gap-x-3 gap-y-1 text-[11px] text-muted-foreground", children: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)("span", { children: t("chat.goal.elapsed", {
25725
+ threadGoal && /* @__PURE__ */ (0, import_jsx_runtime74.jsx)("div", { className: "mt-1 flex flex-wrap gap-x-3 gap-y-1 text-[11px] text-muted-foreground", children: /* @__PURE__ */ (0, import_jsx_runtime74.jsx)("span", { children: t("chat.goal.elapsed", {
25343
25726
  elapsed: formatGoalElapsed(displayedGoalElapsedSeconds)
25344
25727
  }) }) })
25345
25728
  ] }),
25346
- threadGoal && /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)("div", { className: "flex shrink-0 items-center gap-1", children: [
25347
- /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(Tooltip, { children: [
25348
- /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
25729
+ threadGoal && /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)("div", { className: "flex shrink-0 items-center gap-1", children: [
25730
+ /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)(Tooltip, { children: [
25731
+ /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
25349
25732
  Button,
25350
25733
  {
25351
25734
  type: "button",
@@ -25356,13 +25739,13 @@ function Chat({
25356
25739
  const prefix = "/goal edit ";
25357
25740
  setComposerText(`${prefix}${threadGoal.objective}`);
25358
25741
  },
25359
- children: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(import_lucide_react43.Pencil, { className: "size-3" })
25742
+ children: /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(import_lucide_react43.Pencil, { className: "size-3" })
25360
25743
  }
25361
25744
  ) }),
25362
- /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(TooltipContent, { children: t("chat.goal.edit") })
25745
+ /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(TooltipContent, { children: t("chat.goal.edit") })
25363
25746
  ] }),
25364
- /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(Tooltip, { children: [
25365
- /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
25747
+ /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)(Tooltip, { children: [
25748
+ /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
25366
25749
  Button,
25367
25750
  {
25368
25751
  type: "button",
@@ -25378,13 +25761,13 @@ function Chat({
25378
25761
  executionType: "insert_invocation"
25379
25762
  }
25380
25763
  }),
25381
- children: threadGoal.status === "paused" ? /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(import_lucide_react43.Play, { className: "size-3" }) : /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(import_lucide_react43.Pause, { className: "size-3" })
25764
+ children: threadGoal.status === "paused" ? /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(import_lucide_react43.Play, { className: "size-3" }) : /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(import_lucide_react43.Pause, { className: "size-3" })
25382
25765
  }
25383
25766
  ) }),
25384
- /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(TooltipContent, { children: threadGoal.status === "paused" ? t("chat.goal.resume") : t("chat.goal.pause") })
25767
+ /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(TooltipContent, { children: threadGoal.status === "paused" ? t("chat.goal.resume") : t("chat.goal.pause") })
25385
25768
  ] }),
25386
- /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(Tooltip, { children: [
25387
- /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
25769
+ /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)(Tooltip, { children: [
25770
+ /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
25388
25771
  Button,
25389
25772
  {
25390
25773
  type: "button",
@@ -25400,13 +25783,13 @@ function Chat({
25400
25783
  executionType: "insert_invocation"
25401
25784
  }
25402
25785
  }),
25403
- children: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(import_lucide_react43.Trash2, { className: "size-3" })
25786
+ children: /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(import_lucide_react43.Trash2, { className: "size-3" })
25404
25787
  }
25405
25788
  ) }),
25406
- /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(TooltipContent, { children: t("chat.goal.clear") })
25789
+ /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(TooltipContent, { children: t("chat.goal.clear") })
25407
25790
  ] }),
25408
- threadGoal.objective && !goalError && /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(Tooltip, { children: [
25409
- /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
25791
+ threadGoal.objective && !goalError && /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)(Tooltip, { children: [
25792
+ /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
25410
25793
  Button,
25411
25794
  {
25412
25795
  type: "button",
@@ -25415,7 +25798,7 @@ function Chat({
25415
25798
  "aria-expanded": isGoalObjectiveExpanded,
25416
25799
  "aria-label": isGoalObjectiveExpanded ? t("chat.goal.collapseObjective") : t("chat.goal.expandObjective"),
25417
25800
  onClick: () => setIsGoalObjectiveExpanded((expanded) => !expanded),
25418
- children: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
25801
+ children: /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
25419
25802
  import_lucide_react43.ChevronDown,
25420
25803
  {
25421
25804
  className: cn(
@@ -25426,13 +25809,13 @@ function Chat({
25426
25809
  )
25427
25810
  }
25428
25811
  ) }),
25429
- /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(TooltipContent, { children: isGoalObjectiveExpanded ? t("chat.goal.collapseObjective") : t("chat.goal.expandObjective") })
25812
+ /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(TooltipContent, { children: isGoalObjectiveExpanded ? t("chat.goal.collapseObjective") : t("chat.goal.expandObjective") })
25430
25813
  ] })
25431
25814
  ] })
25432
25815
  ]
25433
25816
  }
25434
25817
  ),
25435
- /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
25818
+ /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
25436
25819
  PendingRuntimeServices,
25437
25820
  {
25438
25821
  state: stream.runtimeActivities.sandboxServices,
@@ -25441,7 +25824,7 @@ function Chat({
25441
25824
  className: hasPendingTodos || hasPendingFollowUps ? "mb-2" : void 0
25442
25825
  }
25443
25826
  ),
25444
- /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
25827
+ /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
25445
25828
  PendingTodos,
25446
25829
  {
25447
25830
  snapshot: stream.todos,
@@ -25449,7 +25832,7 @@ function Chat({
25449
25832
  className: hasPendingFollowUps ? "mb-2" : void 0
25450
25833
  }
25451
25834
  ),
25452
- /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
25835
+ /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
25453
25836
  PendingFollowUps,
25454
25837
  {
25455
25838
  items: pendingFollowUps,
@@ -25462,7 +25845,7 @@ function Chat({
25462
25845
  attachToComposer: true
25463
25846
  }
25464
25847
  ),
25465
- /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
25848
+ /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
25466
25849
  RequestUserInputPanel,
25467
25850
  {
25468
25851
  request: stream.pendingRequestUserInput,
@@ -25471,7 +25854,7 @@ function Chat({
25471
25854
  attachToComposer: true
25472
25855
  }
25473
25856
  ),
25474
- /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
25857
+ /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
25475
25858
  HITLApprovalPanel,
25476
25859
  {
25477
25860
  request: stream.pendingHITLRequest,
@@ -25480,7 +25863,7 @@ function Chat({
25480
25863
  attachToComposer: true
25481
25864
  }
25482
25865
  ),
25483
- isInitialComposer && /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
25866
+ isInitialComposer && /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
25484
25867
  PromptWorkflowShortcuts,
25485
25868
  {
25486
25869
  commands: promptWorkflow.commands,
@@ -25494,7 +25877,7 @@ function Chat({
25494
25877
  onBack: promptWorkflow.showPrompts
25495
25878
  }
25496
25879
  ),
25497
- /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
25880
+ /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
25498
25881
  ChatAttachments,
25499
25882
  {
25500
25883
  ref: attachmentsRef,
@@ -25508,7 +25891,7 @@ function Chat({
25508
25891
  onStateChange: setAttachmentState
25509
25892
  }
25510
25893
  ),
25511
- references.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime73.jsx)("div", { className: "mb-3 flex flex-wrap gap-2", children: references.map((reference) => /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
25894
+ references.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime74.jsx)("div", { className: "mb-3 flex flex-wrap gap-2", children: references.map((reference) => /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
25512
25895
  ReferenceChip,
25513
25896
  {
25514
25897
  reference,
@@ -25522,9 +25905,9 @@ function Chat({
25522
25905
  },
25523
25906
  getReferenceKey(reference)
25524
25907
  )) }),
25525
- referencedWorkspaceFiles.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime73.jsx)("div", { className: "mb-3 flex flex-wrap gap-2", children: referencedWorkspaceFiles.map((file) => {
25908
+ referencedWorkspaceFiles.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime74.jsx)("div", { className: "mb-3 flex flex-wrap gap-2", children: referencedWorkspaceFiles.map((file) => {
25526
25909
  const id = file.workspacePath ?? file.filePath ?? file.fileAssetId ?? file.fileId ?? file.id;
25527
- return /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
25910
+ return /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
25528
25911
  WorkspaceFileChip,
25529
25912
  {
25530
25913
  file,
@@ -25538,7 +25921,7 @@ function Chat({
25538
25921
  id
25539
25922
  );
25540
25923
  }) }),
25541
- workspaceFileMention && /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
25924
+ workspaceFileMention && /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
25542
25925
  WorkspaceFileMentionPalette,
25543
25926
  {
25544
25927
  ref: workspaceFileMentionPaletteRef,
@@ -25550,7 +25933,7 @@ function Chat({
25550
25933
  onSelect: selectWorkspaceFileMention
25551
25934
  }
25552
25935
  ),
25553
- runtimeCapabilityPalette && !workspaceFileMention && /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
25936
+ runtimeCapabilityPalette && !workspaceFileMention && /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
25554
25937
  SlashPalette,
25555
25938
  {
25556
25939
  palette: runtimeCapabilityPalette,
@@ -25564,7 +25947,7 @@ function Chat({
25564
25947
  onSelect: selectSlashPaletteOption
25565
25948
  }
25566
25949
  ),
25567
- /* @__PURE__ */ (0, import_jsx_runtime73.jsx)("form", { className: "flex items-end", onSubmit: handleSubmit, children: /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(
25950
+ /* @__PURE__ */ (0, import_jsx_runtime74.jsx)("form", { className: "flex items-end", onSubmit: handleSubmit, children: /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)(
25568
25951
  "div",
25569
25952
  {
25570
25953
  "data-slot": "composer-input-shell",
@@ -25577,7 +25960,7 @@ function Chat({
25577
25960
  "rounded-composer-shell shadow-composer-shell"
25578
25961
  ),
25579
25962
  children: [
25580
- /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(
25963
+ /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)(
25581
25964
  "div",
25582
25965
  {
25583
25966
  "data-slot": "composer-editor-surface",
@@ -25586,7 +25969,7 @@ function Chat({
25586
25969
  "rounded-composer-editor"
25587
25970
  ),
25588
25971
  children: [
25589
- /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(
25972
+ /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)(
25590
25973
  "div",
25591
25974
  {
25592
25975
  "data-slot": "composer-body",
@@ -25595,7 +25978,7 @@ function Chat({
25595
25978
  if (event.target === event.currentTarget) focusComposerAt();
25596
25979
  },
25597
25980
  children: [
25598
- composerCapabilities.inline.map((option) => /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
25981
+ composerCapabilities.inline.map((option) => /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
25599
25982
  ComposerCapabilityChip,
25600
25983
  {
25601
25984
  option,
@@ -25604,7 +25987,7 @@ function Chat({
25604
25987
  },
25605
25988
  `${option.type}:${option.id}`
25606
25989
  )),
25607
- /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
25990
+ /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
25608
25991
  "div",
25609
25992
  {
25610
25993
  ref: composerInputRef,
@@ -25627,7 +26010,7 @@ function Chat({
25627
26010
  (missingConfig || isHistoryLoading || hasPendingInteractiveRequest) && "cursor-not-allowed opacity-50"
25628
26011
  ),
25629
26012
  children: renderedComposerParts.map(
25630
- (part, index) => part.type === "text" ? /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(React66.Fragment, { children: part.text }, `text-${index}`) : /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
26013
+ (part, index) => part.type === "text" ? /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(React66.Fragment, { children: part.text }, `text-${index}`) : /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
25631
26014
  ComposerCapabilityToken,
25632
26015
  {
25633
26016
  part,
@@ -25643,14 +26026,14 @@ function Chat({
25643
26026
  ]
25644
26027
  }
25645
26028
  ),
25646
- /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(
26029
+ /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)(
25647
26030
  "div",
25648
26031
  {
25649
26032
  "data-slot": "composer-action-bar",
25650
26033
  className: "pointer-events-none absolute inset-x-3 bottom-2 flex min-h-10 items-center justify-between gap-2",
25651
26034
  children: [
25652
- /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)("div", { className: "pointer-events-none flex min-w-0 flex-1 items-center gap-1.5", children: [
25653
- /* @__PURE__ */ (0, import_jsx_runtime73.jsx)("div", { className: "pointer-events-auto flex shrink-0 items-center gap-1.5", children: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
26035
+ /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)("div", { className: "pointer-events-none flex min-w-0 flex-1 items-center gap-1.5", children: [
26036
+ /* @__PURE__ */ (0, import_jsx_runtime74.jsx)("div", { className: "pointer-events-auto flex shrink-0 items-center gap-1.5", children: /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
25654
26037
  ComposerMenu,
25655
26038
  {
25656
26039
  composer,
@@ -25682,12 +26065,12 @@ function Chat({
25682
26065
  disabled: missingConfig || isHistoryLoading || hasPendingInteractiveRequest
25683
26066
  }
25684
26067
  ) }),
25685
- composerCapabilities.subAgents.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
26068
+ composerCapabilities.subAgents.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
25686
26069
  "div",
25687
26070
  {
25688
26071
  "data-slot": "composer-selected-sub-agents",
25689
26072
  className: "pointer-events-auto flex min-w-0 items-center gap-1 overflow-x-auto overflow-y-hidden [scrollbar-width:none]! [&::-webkit-scrollbar]:hidden",
25690
- children: composerCapabilities.subAgents.map((option) => /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
26073
+ children: composerCapabilities.subAgents.map((option) => /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
25691
26074
  ComposerCapabilityChip,
25692
26075
  {
25693
26076
  option,
@@ -25698,14 +26081,14 @@ function Chat({
25698
26081
  ))
25699
26082
  }
25700
26083
  ),
25701
- selectedTool && /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(
26084
+ selectedTool && /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)(
25702
26085
  "span",
25703
26086
  {
25704
26087
  "data-slot": "composer-selected-tool",
25705
26088
  className: "group/tool pointer-events-auto inline-flex h-8 min-w-0 max-w-[14rem] shrink items-center rounded-full bg-primary/10 px-2 text-xs font-medium text-primary transition-all duration-200",
25706
26089
  children: [
25707
- /* @__PURE__ */ (0, import_jsx_runtime73.jsx)("span", { className: "truncate", children: selectedTool.shortLabel ?? selectedTool.label }),
25708
- /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
26090
+ /* @__PURE__ */ (0, import_jsx_runtime74.jsx)("span", { className: "truncate", children: selectedTool.shortLabel ?? selectedTool.label }),
26091
+ /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
25709
26092
  "button",
25710
26093
  {
25711
26094
  "data-slot": "composer-selected-tool-remove",
@@ -25721,16 +26104,16 @@ function Chat({
25721
26104
  "focus-visible:pointer-events-auto focus-visible:ml-1 focus-visible:w-4 focus-visible:opacity-100",
25722
26105
  "hover:bg-primary/10 hover:text-primary focus-visible:bg-primary/10 focus-visible:text-primary"
25723
26106
  ),
25724
- children: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(import_lucide_react43.X, { className: "size-3 shrink-0" })
26107
+ children: /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(import_lucide_react43.X, { className: "size-3 shrink-0" })
25725
26108
  }
25726
26109
  )
25727
26110
  ]
25728
26111
  }
25729
26112
  )
25730
26113
  ] }),
25731
- /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)("div", { className: "pointer-events-auto flex shrink-0 items-center gap-1", children: [
25732
- /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(ContextUsageIndicator, { className: "size-8" }),
25733
- /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
26114
+ /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)("div", { className: "pointer-events-auto flex shrink-0 items-center gap-1", children: [
26115
+ /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(ContextUsageIndicator, { className: "size-8" }),
26116
+ /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
25734
26117
  ModelPicker,
25735
26118
  {
25736
26119
  models: availableModels,
@@ -25754,16 +26137,21 @@ function Chat({
25754
26137
  }
25755
26138
  }
25756
26139
  ),
25757
- /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
26140
+ /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
25758
26141
  SendButton,
25759
26142
  {
25760
26143
  disabled: isSendDisabled,
25761
26144
  isLoading: stream.isLoading,
25762
- showStop: stream.isLoading && (!trimmedDraft || hasPendingInteractiveRequest),
25763
- onStop: () => stream.stop(),
25764
- stopLabel: t("chat.stop"),
26145
+ showStop: !isPauseActive && (stream.isLoading || canPauseRun) && (!hasComposerInput || hasPendingInteractiveRequest),
26146
+ stopDisabled: isChangingBranch || !canPauseRun,
26147
+ onStop: () => void handleComposerRunControl("pause"),
26148
+ stopLabel: t("threadControl.pause"),
26149
+ showResume: isPauseActive && !hasComposerInput,
26150
+ resumeDisabled: !isRunPaused && !canRevealPausedDisplay || isRunPausing || isResumingRun || isChangingBranch || !currentRunControl?.pauseId && !canRevealPausedDisplay,
26151
+ onResume: () => void handleComposerRunControl("resume"),
26152
+ resumeLabel: t("threadControl.resume"),
25765
26153
  sendLabel: t("chat.send"),
25766
- shortcuts: stream.isLoading && trimmedDraft ? [
26154
+ shortcuts: isVisibleStreaming && !isRunPaused && trimmedDraft ? [
25767
26155
  {
25768
26156
  label: t("chat.followUps.queue"),
25769
26157
  keys: "Enter"
@@ -25778,8 +26166,8 @@ function Chat({
25778
26166
  ]
25779
26167
  }
25780
26168
  ),
25781
- /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)("div", { "data-slot": "composer-context-rail", className: "flex min-w-0 flex-wrap items-center", children: [
25782
- /* @__PURE__ */ (0, import_jsx_runtime73.jsx)("div", { className: "min-w-0 max-w-full", children: projectsEnabled && (isConfiguredProjectLocked || !isProjectSelectionLocked) ? /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
26169
+ /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)("div", { "data-slot": "composer-context-rail", className: "flex min-w-0 flex-wrap items-center", children: [
26170
+ /* @__PURE__ */ (0, import_jsx_runtime74.jsx)("div", { className: "min-w-0 max-w-full", children: projectsEnabled && (isConfiguredProjectLocked || !isProjectSelectionLocked) ? /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
25783
26171
  ProjectSelector,
25784
26172
  {
25785
26173
  client: xpertPlatformClient,
@@ -25794,7 +26182,7 @@ function Chat({
25794
26182
  onProjectTypeCreate
25795
26183
  }
25796
26184
  ) : null }),
25797
- isFileSelectorVisible && /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
26185
+ isFileSelectorVisible && /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
25798
26186
  WorkspaceFileSelector,
25799
26187
  {
25800
26188
  client: xpertPlatformClient,
@@ -25809,7 +26197,7 @@ function Chat({
25809
26197
  ]
25810
26198
  }
25811
26199
  ) }),
25812
- isInitialComposer && startScreen?.promptsLayout === "list" && /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
26200
+ isInitialComposer && startScreen?.promptsLayout === "list" && /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
25813
26201
  StarterPromptSuggestions,
25814
26202
  {
25815
26203
  prompts: startScreen.prompts ?? [],
@@ -25819,7 +26207,7 @@ function Chat({
25819
26207
  promptEditDisabled: isPromptEditDisabled
25820
26208
  }
25821
26209
  ),
25822
- disclaimer?.text && /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
26210
+ disclaimer?.text && /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
25823
26211
  "p",
25824
26212
  {
25825
26213
  className: cn(
@@ -25832,7 +26220,7 @@ function Chat({
25832
26220
  ]
25833
26221
  }
25834
26222
  ),
25835
- /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
26223
+ /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
25836
26224
  SettingsSheet,
25837
26225
  {
25838
26226
  open: petSettingsOpen,
@@ -25842,11 +26230,11 @@ function Chat({
25842
26230
  onSave: savePetLocalSettings
25843
26231
  }
25844
26232
  ),
25845
- /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(PetBridge, { pet: effectivePet, state: petAutoState })
26233
+ /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(PetBridge, { pet: effectivePet, state: petAutoState })
25846
26234
  ]
25847
26235
  }
25848
26236
  ),
25849
- taskSummaryAvailable && taskSummaryDocked && taskSummaryOpen && /* @__PURE__ */ (0, import_jsx_runtime73.jsx)("div", { className: "pointer-events-none absolute right-5 top-3 z-20 max-h-[calc(100%-1.5rem)] w-80", children: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
26237
+ taskSummaryAvailable && taskSummaryDocked && taskSummaryOpen && /* @__PURE__ */ (0, import_jsx_runtime74.jsx)("div", { className: "pointer-events-none absolute right-5 top-3 z-20 max-h-[calc(100%-1.5rem)] w-80", children: /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
25850
26238
  TaskSummaryPanel,
25851
26239
  {
25852
26240
  ...taskSummaryProps,