@xpert-ai/chatkit-ui 0.5.8 → 0.5.10

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-rZtKpJ7w.js → _baseUniq-BGtBWDHF.js} +1 -1
  2. package/dist/app/assets/{abap-C_Zf_H72.js → abap-CRoFwrxO.js} +1 -1
  3. package/dist/app/assets/{abnf-nexoj3h-.js → abnf-CNjS2eos.js} +1 -1
  4. package/dist/app/assets/{actionscript-BshPPT08.js → actionscript-B8mr3NzG.js} +1 -1
  5. package/dist/app/assets/{ada-trcc9pO3.js → ada-BFLo8FUI.js} +1 -1
  6. package/dist/app/assets/{agda-wf9li4FM.js → agda-3OzBs9Hc.js} +1 -1
  7. package/dist/app/assets/{al-B_Ug0q1P.js → al-D20XP4lJ.js} +1 -1
  8. package/dist/app/assets/{antlr4-CXTRv9CY.js → antlr4-CAk9QE2f.js} +1 -1
  9. package/dist/app/assets/{apacheconf-BzLOlEQw.js → apacheconf-DVy5BZVN.js} +1 -1
  10. package/dist/app/assets/{apex-B6XAxpaJ.js → apex-BOwqYrLv.js} +1 -1
  11. package/dist/app/assets/{apl-BaTx00Cu.js → apl-BKNJFilC.js} +1 -1
  12. package/dist/app/assets/{applescript-28sGIXzX.js → applescript-BBrUU_PL.js} +1 -1
  13. package/dist/app/assets/{aql-D3JixB2U.js → aql-D6uGUCXn.js} +1 -1
  14. package/dist/app/assets/{arc-Dp-hSx2j.js → arc-CrwfbbB_.js} +1 -1
  15. package/dist/app/assets/{architectureDiagram-Q4EWVU46-Bn2pO9pH.js → architectureDiagram-Q4EWVU46-ChKCVNgI.js} +1 -1
  16. package/dist/app/assets/{arduino-C7O-XQwD.js → arduino-D6bzhWX_.js} +1 -1
  17. package/dist/app/assets/{arff-DB2beTEN.js → arff-D92IxpM3.js} +1 -1
  18. package/dist/app/assets/{asciidoc-Dg8NUgJd.js → asciidoc-DfsvV2P7.js} +1 -1
  19. package/dist/app/assets/{asm6502-Bbp3HUM7.js → asm6502-_F1FAt_4.js} +1 -1
  20. package/dist/app/assets/{asmatmel-BWVdPyKO.js → asmatmel-Cbtqac6c.js} +1 -1
  21. package/dist/app/assets/{aspnet-DGscSPT5.js → aspnet-BW0Um7vX.js} +1 -1
  22. package/dist/app/assets/{autohotkey-CG73I5aR.js → autohotkey-BN09uJNY.js} +1 -1
  23. package/dist/app/assets/{autoit-C_ZFpucT.js → autoit-CsiD8aKJ.js} +1 -1
  24. package/dist/app/assets/{avisynth-cwGR8iYP.js → avisynth-CjQfGoLi.js} +1 -1
  25. package/dist/app/assets/{avro-idl-BGr05mCA.js → avro-idl-BZ5kGhBz.js} +1 -1
  26. package/dist/app/assets/{bash-RnGhYB2Q.js → bash-DJKkM7QN.js} +1 -1
  27. package/dist/app/assets/{basic-CQQHZrba.js → basic-Bfxph2ze.js} +1 -1
  28. package/dist/app/assets/{batch-D9lrM7o0.js → batch-Bg0kGp_U.js} +1 -1
  29. package/dist/app/assets/{bbcode-Cv3WobVE.js → bbcode-BCAqMttV.js} +1 -1
  30. package/dist/app/assets/{bicep-vbBE-eEI.js → bicep-D59fWffG.js} +1 -1
  31. package/dist/app/assets/{birb-CGZh784n.js → birb-o5jcDsHe.js} +1 -1
  32. package/dist/app/assets/{bison-8qRts1aL.js → bison-yB-JpgNW.js} +1 -1
  33. package/dist/app/assets/{blockDiagram-DXYQGD6D-C-uwwa6g.js → blockDiagram-DXYQGD6D-Bbcf1g82.js} +1 -1
  34. package/dist/app/assets/{bnf-BQ4Vtazg.js → bnf-MvjnxGLj.js} +1 -1
  35. package/dist/app/assets/{brainfuck-CEpFRGxy.js → brainfuck-Di4LuxXz.js} +1 -1
  36. package/dist/app/assets/{brightscript-BarfPCjz.js → brightscript-CoKUdu4Z.js} +1 -1
  37. package/dist/app/assets/{bro-Dk0XGvow.js → bro-Dtuf-rOu.js} +1 -1
  38. package/dist/app/assets/{bsl-5j820PBe.js → bsl-Dphub1md.js} +1 -1
  39. package/dist/app/assets/{c-3oV1Vcgs.js → c-CouCMjhn.js} +1 -1
  40. package/dist/app/assets/{c4Diagram-AHTNJAMY-JlsWBEMe.js → c4Diagram-AHTNJAMY-B71AnYEv.js} +1 -1
  41. package/dist/app/assets/{cfscript-DMqyhl2W.js → cfscript-WEBTQyyh.js} +1 -1
  42. package/dist/app/assets/{chaiscript-YkAH53Dr.js → chaiscript-ChKY8J66.js} +1 -1
  43. package/dist/app/assets/channel-cWYrdn2X.js +1 -0
  44. package/dist/app/assets/{chunk-4BX2VUAB-B0JqLkZH.js → chunk-4BX2VUAB-CrS4RXRQ.js} +1 -1
  45. package/dist/app/assets/{chunk-4TB4RGXK-BQpDNXUF.js → chunk-4TB4RGXK-DK5YEmle.js} +1 -1
  46. package/dist/app/assets/{chunk-55IACEB6-Dn3FnTDT.js → chunk-55IACEB6-Bo7tPBvq.js} +1 -1
  47. package/dist/app/assets/{chunk-EDXVE4YY-BVoPugx9.js → chunk-EDXVE4YY-S8p2mxbS.js} +1 -1
  48. package/dist/app/assets/{chunk-FMBD7UC4-C9tVdhsE.js → chunk-FMBD7UC4-BmeEs0Fl.js} +1 -1
  49. package/dist/app/assets/{chunk-OYMX7WX6-CQXv2wtk.js → chunk-OYMX7WX6-CVOe3eKO.js} +1 -1
  50. package/dist/app/assets/{chunk-QZHKN3VN-C8qSU9Qy.js → chunk-QZHKN3VN-D8KyAP_6.js} +1 -1
  51. package/dist/app/assets/{chunk-YZCP3GAM-CZaoG1nw.js → chunk-YZCP3GAM-BCxkcMfg.js} +1 -1
  52. package/dist/app/assets/{cil-DcR2VPHY.js → cil-B50znBsv.js} +1 -1
  53. package/dist/app/assets/classDiagram-6PBFFD2Q-B_cL4ol2.js +1 -0
  54. package/dist/app/assets/classDiagram-v2-HSJHXN6E-B_cL4ol2.js +1 -0
  55. package/dist/app/assets/{clike-DfNujqql.js → clike-BDx2IDni.js} +1 -1
  56. package/dist/app/assets/{clojure-C5Le-JTX.js → clojure-DwvfHL53.js} +1 -1
  57. package/dist/app/assets/clone-DqC7wLFm.js +1 -0
  58. package/dist/app/assets/{cmake-COAIzhsZ.js → cmake-CR0A7aZm.js} +1 -1
  59. package/dist/app/assets/{cobol-ibITcyU7.js → cobol-CyPvCTIP.js} +1 -1
  60. package/dist/app/assets/{coffeescript-PhVUJmlI.js → coffeescript-BWdDr59V.js} +1 -1
  61. package/dist/app/assets/{concurnas-mR1M8CkN.js → concurnas-DOsrzlEd.js} +1 -1
  62. package/dist/app/assets/{coq-BAC4s_KN.js → coq-DufSYl-_.js} +1 -1
  63. package/dist/app/assets/{core-CyiPngnC.js → core-CCxBh-db.js} +1 -1
  64. package/dist/app/assets/{cose-bilkent-S5V4N54A-DVGjGUds.js → cose-bilkent-S5V4N54A-CVetMxrj.js} +1 -1
  65. package/dist/app/assets/{cpp-CGbZdGpN.js → cpp-DlRzYOQ3.js} +1 -1
  66. package/dist/app/assets/{crystal-DlR7pIGD.js → crystal-C6liNBfM.js} +1 -1
  67. package/dist/app/assets/{csharp-C_Q9l4md.js → csharp-BJQ_L68V.js} +1 -1
  68. package/dist/app/assets/{cshtml-CCx5u7US.js → cshtml-CIHuGJB1.js} +1 -1
  69. package/dist/app/assets/{csp-CAaZklqT.js → csp-DClFC8n5.js} +1 -1
  70. package/dist/app/assets/{css-DYR3Ly4O.js → css-BIHXWlvb.js} +1 -1
  71. package/dist/app/assets/{css-extras-Cmt8C7YK.js → css-extras-DW9n0pYv.js} +1 -1
  72. package/dist/app/assets/{csv-D6wS2l_w.js → csv-BCDO1ezZ.js} +1 -1
  73. package/dist/app/assets/{cypher-ByiZgWx2.js → cypher-C02ZuRq6.js} +1 -1
  74. package/dist/app/assets/{d-CE7B9yzF.js → d-C_m1NZFO.js} +1 -1
  75. package/dist/app/assets/{dagre-KV5264BT-D7upVhY0.js → dagre-KV5264BT-CNZ7oGpU.js} +1 -1
  76. package/dist/app/assets/{dart-D81jl3NK.js → dart-BzfpaRRB.js} +1 -1
  77. package/dist/app/assets/{dataweave-CMxZQ8zh.js → dataweave-BZwfufNx.js} +1 -1
  78. package/dist/app/assets/{dax-BbrDk-Ta.js → dax-BL-K1OK0.js} +1 -1
  79. package/dist/app/assets/{dhall-CIldjTYK.js → dhall-kRlu5-Ah.js} +1 -1
  80. package/dist/app/assets/{diagram-5BDNPKRD-DhUmS4Ny.js → diagram-5BDNPKRD-Dou4ReAX.js} +1 -1
  81. package/dist/app/assets/{diagram-G4DWMVQ6-CrkCLxhl.js → diagram-G4DWMVQ6-DrTF8uMu.js} +1 -1
  82. package/dist/app/assets/{diagram-MMDJMWI5-fnPPfUw8.js → diagram-MMDJMWI5-Duy5amDa.js} +1 -1
  83. package/dist/app/assets/{diagram-TYMM5635-COhdlDB0.js → diagram-TYMM5635-BbR1qfVD.js} +1 -1
  84. package/dist/app/assets/{diff-FjTJCkPu.js → diff-B4AimFb8.js} +1 -1
  85. package/dist/app/assets/{django-Co_IyfXB.js → django-CHuXCByJ.js} +1 -1
  86. package/dist/app/assets/{dns-zone-file-BM6Yg4q9.js → dns-zone-file-DFO0-Wh5.js} +1 -1
  87. package/dist/app/assets/{docker-Pwo3GM5h.js → docker-DeblFuGF.js} +1 -1
  88. package/dist/app/assets/{dot-P8f8aStV.js → dot-DsmxGkhr.js} +1 -1
  89. package/dist/app/assets/{ebnf-CZbb3oK9.js → ebnf-CbgMYLgT.js} +1 -1
  90. package/dist/app/assets/{editorconfig-CJApclIQ.js → editorconfig-DFLqU5tO.js} +1 -1
  91. package/dist/app/assets/{eiffel-DDWKQYgT.js → eiffel-BwLrgMir.js} +1 -1
  92. package/dist/app/assets/{ejs-y-QhOnYV.js → ejs-C_qs3M41.js} +1 -1
  93. package/dist/app/assets/{elixir-CqAp0uEr.js → elixir-DrAUe9cA.js} +1 -1
  94. package/dist/app/assets/{elm-Cq69Vcs-.js → elm-NL3cn8Zq.js} +1 -1
  95. package/dist/app/assets/{erDiagram-SMLLAGMA-BUrrh0KJ.js → erDiagram-SMLLAGMA-BfCXo53J.js} +1 -1
  96. package/dist/app/assets/{erb-DpEt_5Uk.js → erb-B3ZYOAhJ.js} +1 -1
  97. package/dist/app/assets/{erlang-BnwnR51t.js → erlang-DHaDiNC1.js} +1 -1
  98. package/dist/app/assets/{etlua-DTUtr9Fv.js → etlua-cjNwXVDj.js} +1 -1
  99. package/dist/app/assets/{excel-formula-CfzAGN3E.js → excel-formula-K59v6qG0.js} +1 -1
  100. package/dist/app/assets/{factor-Br_burI4.js → factor-CaxnvHX-.js} +1 -1
  101. package/dist/app/assets/{false-DH44eJVK.js → false-C3dAj0rb.js} +1 -1
  102. package/dist/app/assets/{firestore-security-rules-CV5vZ6x7.js → firestore-security-rules-BWiaIy5P.js} +1 -1
  103. package/dist/app/assets/{flow-B62tsz3I.js → flow-DtC7lyt9.js} +1 -1
  104. package/dist/app/assets/{flowDiagram-DWJPFMVM-BfT3i-xi.js → flowDiagram-DWJPFMVM-C-qKitVO.js} +1 -1
  105. package/dist/app/assets/{fortran-CBRjRmRL.js → fortran-DR0Ai6wv.js} +1 -1
  106. package/dist/app/assets/{fsharp-Is0Kcyy0.js → fsharp-CQ4gmr0N.js} +1 -1
  107. package/dist/app/assets/{ftl-CVovTksj.js → ftl-Ckk-2edF.js} +1 -1
  108. package/dist/app/assets/{ganttDiagram-T4ZO3ILL-CovfmvZ_.js → ganttDiagram-T4ZO3ILL-CVsnCO44.js} +1 -1
  109. package/dist/app/assets/{gap-0V7EqXkM.js → gap-BKZovOdF.js} +1 -1
  110. package/dist/app/assets/{gcode-wFsl1biV.js → gcode-DEwkGIHO.js} +1 -1
  111. package/dist/app/assets/{gdscript-DP_1GAju.js → gdscript-BHZKxFHM.js} +1 -1
  112. package/dist/app/assets/{gedcom-LmQhBuu1.js → gedcom-5qXzfSVG.js} +1 -1
  113. package/dist/app/assets/{gherkin-CO2nCzn1.js → gherkin-JPPL0NwC.js} +1 -1
  114. package/dist/app/assets/{git-Cvy-4np6.js → git-BHHbjeSj.js} +1 -1
  115. package/dist/app/assets/{gitGraphDiagram-UUTBAWPF-_3cNEIkd.js → gitGraphDiagram-UUTBAWPF-BAMZ7idy.js} +1 -1
  116. package/dist/app/assets/{glsl-fLhWQ1WX.js → glsl-ojT9GGcQ.js} +1 -1
  117. package/dist/app/assets/{gml-BLDBKR2w.js → gml-Byrz4K18.js} +1 -1
  118. package/dist/app/assets/{gn-_UfXOcPr.js → gn-BXN298zz.js} +1 -1
  119. package/dist/app/assets/{go-CrEw6tau.js → go-QMar_vXY.js} +1 -1
  120. package/dist/app/assets/{go-module-CVIz5ie2.js → go-module-DhttF-9u.js} +1 -1
  121. package/dist/app/assets/{graph-BqzMGlGz.js → graph-B32jd8nV.js} +1 -1
  122. package/dist/app/assets/{graphql-W65oy7EB.js → graphql-D52K_SsX.js} +1 -1
  123. package/dist/app/assets/{groovy-DEyASrLB.js → groovy-CqJveqOx.js} +1 -1
  124. package/dist/app/assets/{haml-t64RfAT3.js → haml-CoLWO1nd.js} +1 -1
  125. package/dist/app/assets/{handlebars-JgRYcJpr.js → handlebars-BfmAmLER.js} +1 -1
  126. package/dist/app/assets/{haskell-DveuOuZW.js → haskell-jItCYvPU.js} +1 -1
  127. package/dist/app/assets/{haxe-x_WD_hzY.js → haxe-4SLJ2_08.js} +1 -1
  128. package/dist/app/assets/{hcl-BEB0xGh2.js → hcl-BMmyrQ8c.js} +1 -1
  129. package/dist/app/assets/{hlsl-CMwaco8P.js → hlsl-SJDMNXGq.js} +1 -1
  130. package/dist/app/assets/{hoon-C28P95lX.js → hoon-D6moOZKy.js} +1 -1
  131. package/dist/app/assets/{hpkp-D9NYtA5K.js → hpkp-sCVuwPlN.js} +1 -1
  132. package/dist/app/assets/{hsts-Dqogk4Yd.js → hsts-bAMpwV9D.js} +1 -1
  133. package/dist/app/assets/{http-DVQXlCQn.js → http-Dx1p06BK.js} +1 -1
  134. package/dist/app/assets/{ichigojam-CsJTimzt.js → ichigojam-CVXOu9yk.js} +1 -1
  135. package/dist/app/assets/{icon-DoDL_e-r.js → icon-D6wxStB0.js} +1 -1
  136. package/dist/app/assets/{icu-message-format-BeyfGsVT.js → icu-message-format-D6yLIfrn.js} +1 -1
  137. package/dist/app/assets/{idris-CHkWZJwi.js → idris-DpAtc3fL.js} +1 -1
  138. package/dist/app/assets/{iecst-BBD_SRuf.js → iecst-B29ujpoO.js} +1 -1
  139. package/dist/app/assets/{ignore-D_p3I9dV.js → ignore-CVq0aJkW.js} +1 -1
  140. package/dist/app/assets/{index-CfB9oDR4.js → index-BBJxrAP8.js} +185 -184
  141. package/dist/app/assets/index-D-hjfkvG.css +1 -0
  142. package/dist/app/assets/{infoDiagram-42DDH7IO-D2Mfe8CF.js → infoDiagram-42DDH7IO-BG7H21DU.js} +1 -1
  143. package/dist/app/assets/{inform7-jsDCYfoA.js → inform7-B1F0WxwD.js} +1 -1
  144. package/dist/app/assets/{ini-iuNDaZnC.js → ini-CIpuuB9_.js} +1 -1
  145. package/dist/app/assets/{io-LDVlgGqs.js → io-3w1UICu0.js} +1 -1
  146. package/dist/app/assets/{ishikawaDiagram-UXIWVN3A-Dv1hBGmJ.js → ishikawaDiagram-UXIWVN3A-j8lnD8_c.js} +1 -1
  147. package/dist/app/assets/{j-DGuaT7yL.js → j-D3-2sGJz.js} +1 -1
  148. package/dist/app/assets/{java-DDoCHbBb.js → java-BlX-H2cK.js} +1 -1
  149. package/dist/app/assets/{javadoc-BqIDews8.js → javadoc-J2TruS4-.js} +1 -1
  150. package/dist/app/assets/{javadoclike-DUebWUK0.js → javadoclike-bfC-JoEq.js} +1 -1
  151. package/dist/app/assets/{javascript-vIym5G3x.js → javascript-BP7WO6B4.js} +1 -1
  152. package/dist/app/assets/{javastacktrace-DMSQTFoj.js → javastacktrace-BTUlM0LC.js} +1 -1
  153. package/dist/app/assets/{jexl-B-qDI-8w.js → jexl-Cxa4h-16.js} +1 -1
  154. package/dist/app/assets/{jolie-BWdRTPfY.js → jolie-BbbvEhKj.js} +1 -1
  155. package/dist/app/assets/{journeyDiagram-VCZTEJTY-7rE7nmNY.js → journeyDiagram-VCZTEJTY-BwTniXNV.js} +1 -1
  156. package/dist/app/assets/{jq-DTb1pxNf.js → jq-DArJYKLU.js} +1 -1
  157. package/dist/app/assets/{js-extras-DEXJls4B.js → js-extras-BvRL3Jvq.js} +1 -1
  158. package/dist/app/assets/{js-templates-DhkrkuKk.js → js-templates-Dk5OdIFK.js} +1 -1
  159. package/dist/app/assets/{jsdoc-Bl3V6ktn.js → jsdoc-DngF7jir.js} +1 -1
  160. package/dist/app/assets/{json-Bi4t4sWI.js → json-ClAvu2RW.js} +1 -1
  161. package/dist/app/assets/{json5-BTkpxuwF.js → json5-BmFfbQQU.js} +1 -1
  162. package/dist/app/assets/{jsonp-CIGuP4pY.js → jsonp-BgadffEo.js} +1 -1
  163. package/dist/app/assets/{jsstacktrace-twK4XklZ.js → jsstacktrace-Dd8S1Q81.js} +1 -1
  164. package/dist/app/assets/{jsx-Ce1OOyMG.js → jsx-Dz0neUh1.js} +1 -1
  165. package/dist/app/assets/{julia-Cquz_qEr.js → julia-BHGMeW5t.js} +1 -1
  166. package/dist/app/assets/{kanban-definition-6JOO6SKY-Bv3tDxPP.js → kanban-definition-6JOO6SKY-CMc5-Ea3.js} +1 -1
  167. package/dist/app/assets/{keepalived-CJwooiaS.js → keepalived-1yyGwudH.js} +1 -1
  168. package/dist/app/assets/{keyman-DFel6Ybe.js → keyman-D96kZ3Ti.js} +1 -1
  169. package/dist/app/assets/{kotlin-wolTrM8e.js → kotlin-DU--_X0J.js} +1 -1
  170. package/dist/app/assets/{kumir-BizUlAia.js → kumir-0MOuOYYf.js} +1 -1
  171. package/dist/app/assets/{kusto-z61BrIf7.js → kusto-C-XA0mwb.js} +1 -1
  172. package/dist/app/assets/{latex-BdjU0W-y.js → latex-DwJ10yrt.js} +1 -1
  173. package/dist/app/assets/{latte-qxmlfKWi.js → latte-D_Yyq_nM.js} +1 -1
  174. package/dist/app/assets/{layout-DxAn_P0a.js → layout-DQt8UNZi.js} +1 -1
  175. package/dist/app/assets/{less-CD3dW47g.js → less-CsUu5jL1.js} +1 -1
  176. package/dist/app/assets/{lilypond-22T5o_jq.js → lilypond-CIbhxqtF.js} +1 -1
  177. package/dist/app/assets/{linear-BZgMFgqg.js → linear-D8DMmUY3.js} +1 -1
  178. package/dist/app/assets/{liquid-Cmo4Xe4F.js → liquid-BaXz-DcY.js} +1 -1
  179. package/dist/app/assets/{lisp-BYktmVtF.js → lisp-DQs2fOve.js} +1 -1
  180. package/dist/app/assets/{livescript-BYFmorZ7.js → livescript-BebY4jFA.js} +1 -1
  181. package/dist/app/assets/{llvm-BOD0KyZl.js → llvm-tvuSKoRQ.js} +1 -1
  182. package/dist/app/assets/{log-CVV316Uy.js → log-euixYp8a.js} +1 -1
  183. package/dist/app/assets/{lolcode-CVthCzlE.js → lolcode-CwPkrI86.js} +1 -1
  184. package/dist/app/assets/{lua-DDV9U3wt.js → lua-CNvDsE6g.js} +1 -1
  185. package/dist/app/assets/{magma-BG3jyl2H.js → magma-CdK12PLr.js} +1 -1
  186. package/dist/app/assets/{makefile-MpxiKn_B.js → makefile-fq5UhIbM.js} +1 -1
  187. package/dist/app/assets/{markdown-BL5FU4cM.js → markdown-Ajq2JGa1.js} +1 -1
  188. package/dist/app/assets/{markup-CZRmXwYL.js → markup-CfbpoVuv.js} +1 -1
  189. package/dist/app/assets/{markup-templating-COlI1blx.js → markup-templating-ClpbWH3E.js} +1 -1
  190. package/dist/app/assets/{matlab-BmSN2QiN.js → matlab-DUQtIrQ-.js} +1 -1
  191. package/dist/app/assets/{maxscript-D75deoQZ.js → maxscript-BQSIPoaa.js} +1 -1
  192. package/dist/app/assets/{mel-DyYcmDoQ.js → mel-C8tXgXmS.js} +1 -1
  193. package/dist/app/assets/{mermaid-NR0G0IWZ.js → mermaid-BMSiReCn.js} +1 -1
  194. package/dist/app/assets/{min-CTh07dZy.js → min-DgHJ7Nf4.js} +1 -1
  195. package/dist/app/assets/{mindmap-definition-QFDTVHPH-Fw3KcKbj.js → mindmap-definition-QFDTVHPH-70NBPICA.js} +1 -1
  196. package/dist/app/assets/{mizar-MJo_u1CH.js → mizar-FFvziKde.js} +1 -1
  197. package/dist/app/assets/{mongodb-CRNnG1K2.js → mongodb-D1mzpRCd.js} +1 -1
  198. package/dist/app/assets/{monkey-ZwGbwuwW.js → monkey-dBKcwUTm.js} +1 -1
  199. package/dist/app/assets/{moonscript-C_41cfMk.js → moonscript-Bba8hj2N.js} +1 -1
  200. package/dist/app/assets/{n1ql-4JPBqsQ5.js → n1ql-BKv6f_ZJ.js} +1 -1
  201. package/dist/app/assets/{n4js-DaifC79s.js → n4js-De4nJHcC.js} +1 -1
  202. package/dist/app/assets/{nand2tetris-hdl-DrlPu1km.js → nand2tetris-hdl-d6Im94up.js} +1 -1
  203. package/dist/app/assets/{naniscript-CVSEham5.js → naniscript-7I_PYFtb.js} +1 -1
  204. package/dist/app/assets/{nasm-Vxg1Ci7m.js → nasm-DtbQ_6JV.js} +1 -1
  205. package/dist/app/assets/{neon-D5WYLOp6.js → neon-7JcECa8A.js} +1 -1
  206. package/dist/app/assets/{nevod-BM_P4MZJ.js → nevod-BarubR7h.js} +1 -1
  207. package/dist/app/assets/{nginx-_BUWopwD.js → nginx-C-Nvt6BK.js} +1 -1
  208. package/dist/app/assets/{nim-yUtxyMQ_.js → nim-LP-7gM1Q.js} +1 -1
  209. package/dist/app/assets/{nix-DnqJswG2.js → nix-Msza7-r9.js} +1 -1
  210. package/dist/app/assets/{nsis-CGhWE5Eq.js → nsis-N1c5jrgc.js} +1 -1
  211. package/dist/app/assets/{objectivec-B0xQqJXP.js → objectivec-qIn11zhm.js} +1 -1
  212. package/dist/app/assets/{ocaml-DtyqCVnY.js → ocaml-CM1-jZNQ.js} +1 -1
  213. package/dist/app/assets/{opencl-D1Atjn6H.js → opencl-aZRowywV.js} +1 -1
  214. package/dist/app/assets/{openqasm-BlBDbDqg.js → openqasm-DXQkGk7v.js} +1 -1
  215. package/dist/app/assets/{oz-CiAGh31i.js → oz-IpByQjyt.js} +1 -1
  216. package/dist/app/assets/{parigp-5zImxHQS.js → parigp-i2cpgz90.js} +1 -1
  217. package/dist/app/assets/{parser-DgQnPlcs.js → parser-DUe4fyHY.js} +1 -1
  218. package/dist/app/assets/{pascal-CAl-2WrG.js → pascal-CCbi6In9.js} +1 -1
  219. package/dist/app/assets/{pascaligo-D7ENkfXk.js → pascaligo-cYiy-tQf.js} +1 -1
  220. package/dist/app/assets/{pcaxis-BvkOw95O.js → pcaxis-DUe2I8NZ.js} +1 -1
  221. package/dist/app/assets/{peoplecode-CNnlXgOn.js → peoplecode-y-WYZDRM.js} +1 -1
  222. package/dist/app/assets/{perl-GWYgHN-P.js → perl-uC0qqGFo.js} +1 -1
  223. package/dist/app/assets/{php-BeSl8K9C.js → php-Djwg1gg7.js} +1 -1
  224. package/dist/app/assets/{php-extras-CGICdl64.js → php-extras-BXM2sgwu.js} +1 -1
  225. package/dist/app/assets/{phpdoc-u5eUYTCn.js → phpdoc-SxUKXPYZ.js} +1 -1
  226. package/dist/app/assets/{pieDiagram-DEJITSTG-Df6vroGU.js → pieDiagram-DEJITSTG-CQfl-KLS.js} +1 -1
  227. package/dist/app/assets/{plsql-CEzG1NJz.js → plsql-C3HfRTv-.js} +1 -1
  228. package/dist/app/assets/{powerquery-DNIShEdf.js → powerquery-a89Fj1Qs.js} +1 -1
  229. package/dist/app/assets/{powershell-C1503cRG.js → powershell-dX-2_G9H.js} +1 -1
  230. package/dist/app/assets/{processing-Ckpy9HoW.js → processing-BjXVOyvk.js} +1 -1
  231. package/dist/app/assets/{prolog-BRYphUYZ.js → prolog-B9kdH-bl.js} +1 -1
  232. package/dist/app/assets/{promql-qgDrO6DL.js → promql-B3BDR8es.js} +1 -1
  233. package/dist/app/assets/{properties-BeIGQXwD.js → properties-CMjA6hD5.js} +1 -1
  234. package/dist/app/assets/{protobuf-BWgB5SUj.js → protobuf-DVGs9Q8Q.js} +1 -1
  235. package/dist/app/assets/{psl-CcafEZ7w.js → psl-BzbEAN9s.js} +1 -1
  236. package/dist/app/assets/{pug-BJI1GxyB.js → pug-fdeIkQLg.js} +1 -1
  237. package/dist/app/assets/{puppet-CgDAWiLk.js → puppet-JnrsXSZY.js} +1 -1
  238. package/dist/app/assets/{pure-a4cDZ80m.js → pure-Bsjul00Q.js} +1 -1
  239. package/dist/app/assets/{purebasic-BW0KBvtY.js → purebasic-C_mf0qxg.js} +1 -1
  240. package/dist/app/assets/{purescript-kBgGMzoV.js → purescript-P7l76DgD.js} +1 -1
  241. package/dist/app/assets/{q-eRG7i9yX.js → q-D98RUW_e.js} +1 -1
  242. package/dist/app/assets/{qml-CZPuZ9R-.js → qml-CBe5bVTm.js} +1 -1
  243. package/dist/app/assets/{qore-Ba0NjboT.js → qore-CrvWCYtL.js} +1 -1
  244. package/dist/app/assets/{qsharp-DLxaivN6.js → qsharp-4BBfTlhh.js} +1 -1
  245. package/dist/app/assets/{quadrantDiagram-34T5L4WZ-CAGAlKAA.js → quadrantDiagram-34T5L4WZ-_JtlPbxc.js} +1 -1
  246. package/dist/app/assets/{r-D6OZourJ.js → r-C-wPXw3M.js} +1 -1
  247. package/dist/app/assets/{racket-DSFSWP_M.js → racket-BDc8Z2eV.js} +1 -1
  248. package/dist/app/assets/{reason-DpnBqGp5.js → reason-DBeyHA3q.js} +1 -1
  249. package/dist/app/assets/{regex-B-yHjdQW.js → regex-yDzON3WO.js} +1 -1
  250. package/dist/app/assets/{rego-Be5OUAwc.js → rego-CWdKhPRV.js} +1 -1
  251. package/dist/app/assets/{renpy-DNWEtToe.js → renpy-COnBNW6q.js} +1 -1
  252. package/dist/app/assets/{requirementDiagram-MS252O5E-Cs0AkqyV.js → requirementDiagram-MS252O5E-C3gIi5N5.js} +1 -1
  253. package/dist/app/assets/{rest-ULuBuZ2D.js → rest-D7ADMqxp.js} +1 -1
  254. package/dist/app/assets/{rip-C8ZpkRvV.js → rip-BXziA95H.js} +1 -1
  255. package/dist/app/assets/{roboconf-Cp0JApAD.js → roboconf-wb822TWS.js} +1 -1
  256. package/dist/app/assets/{robotframework-DZ9Qk3u4.js → robotframework-BRitqS4Z.js} +1 -1
  257. package/dist/app/assets/{ruby-CL29GmGo.js → ruby-SERs2agE.js} +1 -1
  258. package/dist/app/assets/{rust-j4o3jalU.js → rust-CPnTKWoF.js} +1 -1
  259. package/dist/app/assets/{sankeyDiagram-XADWPNL6-DV18Urm5.js → sankeyDiagram-XADWPNL6-C8zexvre.js} +1 -1
  260. package/dist/app/assets/{sas-D5BKlpKm.js → sas-F8wqa-VH.js} +1 -1
  261. package/dist/app/assets/{sass-uSmrqYvP.js → sass-sFRMpF9E.js} +1 -1
  262. package/dist/app/assets/{scala-BZEFxiel.js → scala-BjAq73X3.js} +1 -1
  263. package/dist/app/assets/{scheme-BqWRh7bv.js → scheme-Dy5snFBD.js} +1 -1
  264. package/dist/app/assets/{scss-pdrHGDlf.js → scss-8PCqIjM6.js} +1 -1
  265. package/dist/app/assets/{sequenceDiagram-FGHM5R23-D2LFaM5D.js → sequenceDiagram-FGHM5R23-DbNGiTO2.js} +1 -1
  266. package/dist/app/assets/{shell-session-SP47os3A.js → shell-session-DEdTVxFD.js} +1 -1
  267. package/dist/app/assets/{smali-CoGu_vbJ.js → smali-Bxae2KQR.js} +1 -1
  268. package/dist/app/assets/{smalltalk-UCpjQlP2.js → smalltalk-CwOKqcjX.js} +1 -1
  269. package/dist/app/assets/{smarty-DAjuxRJ8.js → smarty-kF-PSUnG.js} +1 -1
  270. package/dist/app/assets/{sml-j3PkUQFZ.js → sml-bomnQbFX.js} +1 -1
  271. package/dist/app/assets/{solidity-DgmGSzcY.js → solidity-BAjbZMZL.js} +1 -1
  272. package/dist/app/assets/{solution-file-B2qnX0br.js → solution-file-MmJiJ8_n.js} +1 -1
  273. package/dist/app/assets/{soy-g8A8WFzY.js → soy-DU--y6x4.js} +1 -1
  274. package/dist/app/assets/{sparql-CEVYVr_A.js → sparql-mmPoHR5x.js} +1 -1
  275. package/dist/app/assets/{splunk-spl-7mtE8H2J.js → splunk-spl-hgCUw5aN.js} +1 -1
  276. package/dist/app/assets/{sqf-0oU9zYI6.js → sqf-BiiIGVoY.js} +1 -1
  277. package/dist/app/assets/{sql-63gdwGLe.js → sql-nlDwSZBD.js} +1 -1
  278. package/dist/app/assets/{squirrel-Co7eleWn.js → squirrel-Bqi6dvci.js} +1 -1
  279. package/dist/app/assets/{stan-Ba4pDTWk.js → stan-2W_Pcetu.js} +1 -1
  280. package/dist/app/assets/{stateDiagram-FHFEXIEX-BQA1TBkH.js → stateDiagram-FHFEXIEX-pa0JGYLy.js} +1 -1
  281. package/dist/app/assets/stateDiagram-v2-QKLJ7IA2-FdxILnkg.js +1 -0
  282. package/dist/app/assets/{stylus-t89Xz5MX.js → stylus-zCZUGlqV.js} +1 -1
  283. package/dist/app/assets/{swift-C5JABAF0.js → swift-5sLu9EpD.js} +1 -1
  284. package/dist/app/assets/{systemd-BfYE78dG.js → systemd-DgaHeexU.js} +1 -1
  285. package/dist/app/assets/{t4-cs-DkxIRmE1.js → t4-cs-YCeMlSug.js} +1 -1
  286. package/dist/app/assets/{t4-templating-DkFMlvwO.js → t4-templating-DPzKGTo4.js} +1 -1
  287. package/dist/app/assets/{t4-vb-BKVkmiw7.js → t4-vb-BPPPhEQB.js} +1 -1
  288. package/dist/app/assets/{tap-aMlCtwbo.js → tap-Dgrqyvk-.js} +1 -1
  289. package/dist/app/assets/{tcl-BUvHy8dw.js → tcl-DHz3w70b.js} +1 -1
  290. package/dist/app/assets/{textile-ClO_SfJO.js → textile-Cr314Blk.js} +1 -1
  291. package/dist/app/assets/{timeline-definition-GMOUNBTQ-DaorRuHA.js → timeline-definition-GMOUNBTQ-BLY5sqEL.js} +1 -1
  292. package/dist/app/assets/{toml-l5hvvDdv.js → toml-Bnu9rfnB.js} +1 -1
  293. package/dist/app/assets/{tremor-D4QOa0nL.js → tremor-ChXFGibI.js} +1 -1
  294. package/dist/app/assets/{tt2-BJcg3HXa.js → tt2-BzVUtdxI.js} +1 -1
  295. package/dist/app/assets/{turtle-WHNwxJgL.js → turtle-letBf_Bx.js} +1 -1
  296. package/dist/app/assets/{twig-DV78fEOd.js → twig-Ni2rEZw9.js} +1 -1
  297. package/dist/app/assets/{typescript-BDTUEseO.js → typescript-BQofdwc1.js} +1 -1
  298. package/dist/app/assets/{typoscript-CKIRbKHr.js → typoscript-cQilTApE.js} +1 -1
  299. package/dist/app/assets/{unrealscript-Cd5BEbxt.js → unrealscript-CtH2g6It.js} +1 -1
  300. package/dist/app/assets/{uorazor-7LOrWFcr.js → uorazor-CjvsWB8K.js} +1 -1
  301. package/dist/app/assets/{uri-CEErPZZD.js → uri-Cs9bSTwl.js} +1 -1
  302. package/dist/app/assets/{v-BvxrZCPV.js → v-Bqvis8I2.js} +1 -1
  303. package/dist/app/assets/{vala-D91m1wZY.js → vala-BpW8rpIS.js} +1 -1
  304. package/dist/app/assets/{vbnet-DEGVgGPX.js → vbnet-DdVGFj9N.js} +1 -1
  305. package/dist/app/assets/{velocity-C51Z21Lw.js → velocity-CHDcdQy7.js} +1 -1
  306. package/dist/app/assets/{vennDiagram-DHZGUBPP-BJfmLAHi.js → vennDiagram-DHZGUBPP-n6Dq2r90.js} +1 -1
  307. package/dist/app/assets/{verilog-B2QtuWBV.js → verilog-t2rEJU_-.js} +1 -1
  308. package/dist/app/assets/{vhdl-DBCqKA1e.js → vhdl-Bkv11jjq.js} +1 -1
  309. package/dist/app/assets/{vim-sBj_gY5Z.js → vim-C6YVoqqV.js} +1 -1
  310. package/dist/app/assets/{visual-basic-Dq4ItWzJ.js → visual-basic-ozbiLbAI.js} +1 -1
  311. package/dist/app/assets/{wardley-RL74JXVD-BwsKoGL8.js → wardley-RL74JXVD-cDbpgcV_.js} +1 -1
  312. package/dist/app/assets/{wardleyDiagram-NUSXRM2D-C-EsBX4Y.js → wardleyDiagram-NUSXRM2D-C1uThccd.js} +1 -1
  313. package/dist/app/assets/{warpscript-CoBUt13z.js → warpscript-BNO_EbH2.js} +1 -1
  314. package/dist/app/assets/{wasm-pyfkx63g.js → wasm-Bghcf_Ud.js} +1 -1
  315. package/dist/app/assets/{web-idl-BZaPO6Eg.js → web-idl-C-d3Xdl1.js} +1 -1
  316. package/dist/app/assets/{wiki-_07IJE4V.js → wiki-DI1mP-2c.js} +1 -1
  317. package/dist/app/assets/{wolfram-DYHwCmFC.js → wolfram-Sj_QoNQm.js} +1 -1
  318. package/dist/app/assets/{wren-DSze41NQ.js → wren-Bc7J_SNZ.js} +1 -1
  319. package/dist/app/assets/{xeora-Cr7Btk9C.js → xeora-C6DbAKbN.js} +1 -1
  320. package/dist/app/assets/{xml-doc-ZBCtrs4u.js → xml-doc-CllF2qWw.js} +1 -1
  321. package/dist/app/assets/{xojo-5Ul7tx93.js → xojo-BmwcGxAI.js} +1 -1
  322. package/dist/app/assets/{xquery-DxypYnz5.js → xquery-WkzJyf76.js} +1 -1
  323. package/dist/app/assets/{xychartDiagram-5P7HB3ND-BDM6ja2Z.js → xychartDiagram-5P7HB3ND-BWMpw-9z.js} +1 -1
  324. package/dist/app/assets/{yaml-DuYadqWF.js → yaml-DaCV1ugn.js} +1 -1
  325. package/dist/app/assets/{yang-BrzUSzMS.js → yang-BxwNjc1X.js} +1 -1
  326. package/dist/app/assets/{zig-CENGCw6i.js → zig-B-ArCifh.js} +1 -1
  327. package/dist/app/index.html +2 -2
  328. package/dist/index.cjs +982 -643
  329. package/dist/index.js +1017 -676
  330. package/package.json +3 -3
  331. package/dist/app/assets/channel-kNZK4j1o.js +0 -1
  332. package/dist/app/assets/classDiagram-6PBFFD2Q-aPn8aVQq.js +0 -1
  333. package/dist/app/assets/classDiagram-v2-HSJHXN6E-aPn8aVQq.js +0 -1
  334. package/dist/app/assets/clone-DTprJQjh.js +0 -1
  335. package/dist/app/assets/index-DElrl_bY.css +0 -1
  336. package/dist/app/assets/stateDiagram-v2-QKLJ7IA2-BZw8ZMnp.js +0 -1
package/dist/index.js CHANGED
@@ -1390,12 +1390,23 @@ function countCompletedTodos(items) {
1390
1390
 
1391
1391
  // src/lib/task-summary.ts
1392
1392
  var PLAN_PATTERN = /<proposed_plan>\s*([\s\S]*?)\s*<\/proposed_plan>/i;
1393
+ var WEB_SEARCH_RESULT_PATTERN = /^Title:\s*(.+?)\r?\nURL:\s*(https?:\/\/\S+)\s*$/gim;
1394
+ var SANDBOX_FILE_OUTPUT_TOOLS = /* @__PURE__ */ new Set([
1395
+ "sandbox_write_file",
1396
+ "sandbox_append_file",
1397
+ "sandbox_edit_file",
1398
+ "sandbox_multi_edit_file"
1399
+ ]);
1393
1400
  function isObject(value) {
1394
1401
  return Boolean(value) && typeof value === "object" && !Array.isArray(value);
1395
1402
  }
1396
1403
  function stringValue(value) {
1397
1404
  return typeof value === "string" && value.trim() ? value.trim() : void 0;
1398
1405
  }
1406
+ function compactText(value, maxLength) {
1407
+ const normalized = value.replace(/\s+/g, " ").trim();
1408
+ return normalized.length <= maxLength ? normalized : `${normalized.slice(0, maxLength - 3).trimEnd()}...`;
1409
+ }
1399
1410
  function timestamp(value) {
1400
1411
  const parsed = value ? Date.parse(value) : 0;
1401
1412
  return Number.isNaN(parsed) ? 0 : parsed;
@@ -1467,19 +1478,29 @@ function normalizeOutput(value) {
1467
1478
  const id = stringValue(candidate.id);
1468
1479
  const title = stringValue(candidate.title);
1469
1480
  const kind = artifactKind(candidate.kind);
1470
- if (!id || !title || !kind) return null;
1471
- const status = candidate.status;
1481
+ const status = stringValue(candidate.status)?.toLowerCase();
1482
+ const normalizedStatus = status === "success" ? status : void 0;
1483
+ const resource = normalizeResource(candidate.resource);
1484
+ if (!id || !title || !kind || status !== void 0 && status !== "success" || !isOpenableOutputResource(resource)) {
1485
+ return null;
1486
+ }
1472
1487
  return {
1473
1488
  id,
1474
1489
  kind,
1475
1490
  title,
1476
1491
  description: stringValue(candidate.description),
1477
- status: status === "pending" || status === "running" || status === "success" || status === "error" ? status : void 0,
1478
- resource: normalizeResource(candidate.resource),
1492
+ status: normalizedStatus,
1493
+ resource,
1479
1494
  messageId: stringValue(candidate.messageId),
1480
1495
  updatedAt: stringValue(candidate.updatedAt)
1481
1496
  };
1482
1497
  }
1498
+ function isCompletedOpenableOutput(output) {
1499
+ return (output.status === void 0 || output.status === "success") && isOpenableOutputResource(output.resource);
1500
+ }
1501
+ function isOpenableOutputResource(resource) {
1502
+ return resource?.type === "workspace_file" || resource?.type === "artifact" || resource?.type === "url";
1503
+ }
1483
1504
  function normalizeSource(value) {
1484
1505
  if (!isObject(value)) return null;
1485
1506
  const candidate = value;
@@ -1534,11 +1555,10 @@ function contributionFromPart(part) {
1534
1555
  if (part.type !== "component" || !isObject(part.data)) return null;
1535
1556
  const data = part.data;
1536
1557
  const direct = normalizeTaskSummaryContribution(data.taskSummary);
1537
- if (direct) return direct;
1538
- if (!isObject(data._meta)) return null;
1539
- return normalizeTaskSummaryContribution(
1558
+ const metadataContribution = isObject(data._meta) ? normalizeTaskSummaryContribution(
1540
1559
  data._meta["xpertai/taskSummary"]
1541
- );
1560
+ ) : null;
1561
+ return direct ?? metadataContribution;
1542
1562
  }
1543
1563
  function extractPlan(message) {
1544
1564
  const match = PLAN_PATTERN.exec(messageText(message.content));
@@ -1606,17 +1626,9 @@ function knownPartOutputs(part, message) {
1606
1626
  if (part.type !== "component" || !isObject(part.data)) return [];
1607
1627
  const data = part.data;
1608
1628
  const outputs = [...contributionFromPart(part)?.outputs ?? []];
1609
- if (data.type === "McpApp") {
1610
- outputs.push({
1611
- id: `mcp-app:${stringValue(part.id) ?? message.id ?? "message"}`,
1612
- kind: "mcp_app",
1613
- title: stringValue(data.title) ?? "MCP App",
1614
- resource: message.id ? { type: "message", messageId: message.id } : void 0,
1615
- messageId: message.id,
1616
- updatedAt
1617
- });
1618
- }
1619
- if (isObject(data.artifact)) {
1629
+ const sandboxOutput = sandboxFileOutput(data, message);
1630
+ if (sandboxOutput) outputs.push(sandboxOutput);
1631
+ if (isObject(data.artifact) && isCompletedOutputStatus(data.artifact.status)) {
1620
1632
  const artifact = data.artifact;
1621
1633
  const artifactId = stringValue(artifact.artifactId) ?? stringValue(artifact.id);
1622
1634
  const workspacePath = stringValue(artifact.workspacePath);
@@ -1642,6 +1654,7 @@ function knownPartOutputs(part, message) {
1642
1654
  for (const value of [data.artifactLink, data.file]) {
1643
1655
  if (!isObject(value)) continue;
1644
1656
  const artifact = value;
1657
+ if (!isCompletedOutputStatus(artifact.status)) continue;
1645
1658
  const artifactId = stringValue(artifact.artifactId) ?? stringValue(artifact.id);
1646
1659
  const workspacePath = stringValue(artifact.workspacePath);
1647
1660
  const id = artifactId ?? stringValue(artifact.fileAssetId) ?? workspacePath;
@@ -1663,6 +1676,52 @@ function knownPartOutputs(part, message) {
1663
1676
  }
1664
1677
  return outputs;
1665
1678
  }
1679
+ function sandboxFileOutput(data, message) {
1680
+ const tool = stringValue(data.tool);
1681
+ const status = stringValue(data.status)?.toLowerCase();
1682
+ if (!tool || !SANDBOX_FILE_OUTPUT_TOOLS.has(tool) || status !== "success" || !isObject(data.input)) {
1683
+ return void 0;
1684
+ }
1685
+ const workspacePath = portableWorkspacePath(
1686
+ data.input.file_path
1687
+ );
1688
+ if (!workspacePath) return void 0;
1689
+ return {
1690
+ id: `workspace-file:${workspacePath}`,
1691
+ kind: outputKindFromPath(workspacePath),
1692
+ title: workspacePath.split("/").at(-1) ?? workspacePath,
1693
+ status: "success",
1694
+ resource: { type: "workspace_file", workspacePath },
1695
+ messageId: message.id,
1696
+ updatedAt: message.updatedAt ?? message.createdAt
1697
+ };
1698
+ }
1699
+ function portableWorkspacePath(value) {
1700
+ const path = stringValue(value)?.replace(/\\/g, "/").replace(/^\.\/+/, "").replace(/\/{2,}/g, "/");
1701
+ if (!path || path.startsWith("/") || /^[a-z]:\//i.test(path) || path.split("/").some((segment) => segment === "..")) {
1702
+ return void 0;
1703
+ }
1704
+ return path;
1705
+ }
1706
+ function outputKindFromPath(path) {
1707
+ const extension = path.match(/\.([^./]+)$/)?.[1]?.toLowerCase();
1708
+ if (extension === "html" || extension === "htm") return "site";
1709
+ if (["png", "jpg", "jpeg", "gif", "webp", "svg", "avif"].includes(extension ?? ""))
1710
+ return "image";
1711
+ if (["csv", "xls", "xlsx", "ods"].includes(extension ?? ""))
1712
+ return "spreadsheet";
1713
+ if (["ppt", "pptx", "odp"].includes(extension ?? ""))
1714
+ return "presentation";
1715
+ if (["pdf", "doc", "docx", "md", "markdown", "txt", "rtf", "odt"].includes(
1716
+ extension ?? ""
1717
+ ))
1718
+ return "document";
1719
+ return "file";
1720
+ }
1721
+ function isCompletedOutputStatus(value) {
1722
+ const status = stringValue(value)?.toLowerCase();
1723
+ return status === void 0 || status === "success";
1724
+ }
1666
1725
  function sourceFromReference(reference, message) {
1667
1726
  const updatedAt = message.updatedAt ?? message.createdAt;
1668
1727
  const common = {
@@ -1735,25 +1794,42 @@ function fileSources(files, message) {
1735
1794
  ];
1736
1795
  });
1737
1796
  }
1738
- function capabilitySources(message) {
1739
- const selection = message.runtimeCapabilities;
1740
- if (!selection) return [];
1797
+ function webSearchSources(part, message) {
1798
+ if (part.type !== "component" || !isObject(part.data)) return [];
1799
+ const data = part.data;
1800
+ if (data.tool !== "web_search" || stringValue(data.status)?.toLowerCase() !== "success") {
1801
+ return [];
1802
+ }
1803
+ const output = stringValue(data.output);
1804
+ if (!output) return [];
1741
1805
  const updatedAt = message.updatedAt ?? message.createdAt;
1742
- const common = { messageId: message.id, updatedAt };
1743
- return [
1744
- ...selection.skills.ids.map((id) => ({
1745
- ...common,
1746
- id: `skill:${id}`,
1747
- kind: "skill",
1748
- title: id
1749
- })),
1750
- ...selection.plugins.nodeKeys.map((id) => ({
1751
- ...common,
1752
- id: `plugin:${id}`,
1753
- kind: "plugin",
1754
- title: id
1755
- }))
1756
- ];
1806
+ const sources = [];
1807
+ for (const match of output.matchAll(WEB_SEARCH_RESULT_PATTERN)) {
1808
+ const rawTitle = stringValue(match[1]);
1809
+ const url = httpUrl(match[2]);
1810
+ if (!url) continue;
1811
+ const title = rawTitle && rawTitle.toLowerCase() !== "n/a" ? rawTitle : new URL(url).hostname;
1812
+ sources.push({
1813
+ id: `web:${url}`,
1814
+ kind: "web_page",
1815
+ title: compactText(title, 160),
1816
+ description: url,
1817
+ resource: { type: "url", url },
1818
+ messageId: message.id,
1819
+ updatedAt
1820
+ });
1821
+ }
1822
+ return sources;
1823
+ }
1824
+ function httpUrl(value) {
1825
+ const url = stringValue(value);
1826
+ if (!url) return void 0;
1827
+ try {
1828
+ const parsed = new URL(url);
1829
+ return parsed.protocol === "http:" || parsed.protocol === "https:" ? url : void 0;
1830
+ } catch {
1831
+ return void 0;
1832
+ }
1757
1833
  }
1758
1834
  function collectLiveTaskSummary({
1759
1835
  messages,
@@ -1773,7 +1849,9 @@ function collectLiveTaskSummary({
1773
1849
  (message) => extractPlan(message) ?? []
1774
1850
  );
1775
1851
  const agentRuns = messages.flatMap(
1776
- (message) => (message.agentRuns ?? []).filter((run) => Boolean(run.parentId)).map((run) => ({
1852
+ (message) => (message.agentRuns ?? []).filter(
1853
+ (run) => run.category?.trim().toLowerCase() === "agent" && Boolean(run.parentId)
1854
+ ).map((run) => ({
1777
1855
  id: run.id,
1778
1856
  parentId: run.parentId,
1779
1857
  level: agentRunLevel(run, messages),
@@ -1781,7 +1859,7 @@ function collectLiveTaskSummary({
1781
1859
  title: (run.agentKey ? agentNames?.get(run.agentKey) : void 0) ?? run.title ?? run.xpertName ?? run.agentKey ?? "Agent",
1782
1860
  status: taskSummaryAgentStatus(run.status),
1783
1861
  elapsedTime: run.elapsedTime,
1784
- error: typeof run.error === "string" ? run.error : void 0,
1862
+ error: typeof run.error === "string" ? compactText(run.error, 160) : void 0,
1785
1863
  messageId: message.id,
1786
1864
  updatedAt: run.updatedAt ?? run.endedAt ?? run.startedAt ?? message.updatedAt
1787
1865
  }))
@@ -1805,7 +1883,7 @@ function collectLiveTaskSummary({
1805
1883
  (part) => knownPartOutputs(part, message)
1806
1884
  )
1807
1885
  )
1808
- ]),
1886
+ ]).filter(isCompletedOpenableOutput),
1809
1887
  sources: mergeLatest([
1810
1888
  ...contributions.flatMap((item) => item.sources ?? []).filter((source) => source.kind !== "sub_agent"),
1811
1889
  ...messages.flatMap((message) => [
@@ -1814,7 +1892,9 @@ function collectLiveTaskSummary({
1814
1892
  ),
1815
1893
  ...fileSources(message.fileAssets, message),
1816
1894
  ...fileSources(message.attachments, message),
1817
- ...capabilitySources(message)
1895
+ ...contentParts(message.content).flatMap(
1896
+ (part) => webSearchSources(part, message)
1897
+ )
1818
1898
  ])
1819
1899
  ]),
1820
1900
  agents: mergeAgents(agentRuns),
@@ -1826,17 +1906,21 @@ function mergeTaskSummary(history, live, historySections) {
1826
1906
  const outputs = mergeLatest([
1827
1907
  ...historySections?.outputs ?? history?.outputs.items ?? [],
1828
1908
  ...live.outputs
1829
- ]);
1909
+ ]).filter(isCompletedOpenableOutput);
1830
1910
  const sources = mergeLatest([
1831
1911
  ...historySections?.sources ?? history?.sources.items ?? [],
1832
1912
  ...live.sources
1833
1913
  ]);
1834
- const agents = mergeAgents([
1835
- ...(historySections?.agents ?? history?.agents.items ?? []).filter(
1836
- (agent) => Boolean(agent.parentId)
1837
- ),
1838
- ...live.agents
1839
- ]);
1914
+ const historyAgents = historySections?.agents ?? history?.agents.items ?? [];
1915
+ const eligibleHistoryAgents = historyAgents.filter(
1916
+ (agent) => Boolean(agent.parentId)
1917
+ );
1918
+ const excludedHistoryAgentCount = historyAgents.length - eligibleHistoryAgents.length;
1919
+ const historyAgentTotal = Math.max(
1920
+ 0,
1921
+ (history?.agents.total ?? 0) - excludedHistoryAgentCount
1922
+ );
1923
+ const agents = mergeAgents([...eligibleHistoryAgents, ...live.agents]);
1840
1924
  const pending = mergePending([
1841
1925
  ...historySections?.pending ?? history?.pending.items ?? [],
1842
1926
  ...live.pending
@@ -1861,7 +1945,7 @@ function mergeTaskSummary(history, live, historySections) {
1861
1945
  totals: {
1862
1946
  outputs: Math.max(history?.outputs.total ?? 0, outputs.length),
1863
1947
  sources: Math.max(history?.sources.total ?? 0, sources.length),
1864
- agents: agents.length,
1948
+ agents: Math.max(historyAgentTotal, agents.length),
1865
1949
  pending: Math.max(history?.pending.total ?? 0, pending.length)
1866
1950
  }
1867
1951
  };
@@ -2471,13 +2555,15 @@ var useStreamContext = () => {
2471
2555
  };
2472
2556
 
2473
2557
  // src/components/composer/ComposerMenu.tsx
2474
- import * as React12 from "react";
2558
+ import * as React13 from "react";
2475
2559
  import {
2560
+ ArrowLeft,
2476
2561
  Bot,
2477
2562
  ChevronRight,
2478
2563
  FileText,
2479
2564
  Globe,
2480
2565
  Images,
2566
+ Info,
2481
2567
  Lightbulb,
2482
2568
  ListChecks,
2483
2569
  Paperclip,
@@ -2581,7 +2667,6 @@ var en_US_default = {
2581
2667
  partial: "Partially ready",
2582
2668
  failed: "Failed"
2583
2669
  },
2584
- poweredBy: "Powered by Xpert AI",
2585
2670
  followUps: {
2586
2671
  pending: "Pending follow-ups",
2587
2672
  queue: "Queue",
@@ -2891,7 +2976,20 @@ var en_US_default = {
2891
2976
  status: {
2892
2977
  pending: "Pending",
2893
2978
  in_progress: "In progress",
2894
- completed: "Completed"
2979
+ completed: "Completed",
2980
+ active: "Active",
2981
+ paused: "Paused",
2982
+ blocked: "Blocked",
2983
+ usage_limited: "Usage limited",
2984
+ budget_limited: "Budget limited",
2985
+ complete: "Completed",
2986
+ success: "Completed",
2987
+ error: "Failed",
2988
+ running: "Running",
2989
+ starting: "Starting",
2990
+ stopping: "Stopping",
2991
+ timeout: "Timed out",
2992
+ interrupted: "Interrupted"
2895
2993
  },
2896
2994
  pending: {
2897
2995
  approval: "Approval required",
@@ -3157,7 +3255,6 @@ var zh_CN_default = {
3157
3255
  partial: "\u90E8\u5206\u5C31\u7EEA",
3158
3256
  failed: "\u89E3\u6790\u5931\u8D25"
3159
3257
  },
3160
- poweredBy: "\u7531 Xpert AI \u9A71\u52A8",
3161
3258
  followUps: {
3162
3259
  pending: "\u5F85\u5904\u7406 Follow-up",
3163
3260
  queue: "\u6392\u961F",
@@ -3467,7 +3564,20 @@ var zh_CN_default = {
3467
3564
  status: {
3468
3565
  pending: "\u5F85\u5904\u7406",
3469
3566
  in_progress: "\u8FDB\u884C\u4E2D",
3470
- completed: "\u5DF2\u5B8C\u6210"
3567
+ completed: "\u5DF2\u5B8C\u6210",
3568
+ active: "\u8FDB\u884C\u4E2D",
3569
+ paused: "\u5DF2\u6682\u505C",
3570
+ blocked: "\u5DF2\u963B\u585E",
3571
+ usage_limited: "\u7528\u91CF\u53D7\u9650",
3572
+ budget_limited: "\u9884\u7B97\u53D7\u9650",
3573
+ complete: "\u5DF2\u5B8C\u6210",
3574
+ success: "\u5DF2\u5B8C\u6210",
3575
+ error: "\u5931\u8D25",
3576
+ running: "\u8FD0\u884C\u4E2D",
3577
+ starting: "\u542F\u52A8\u4E2D",
3578
+ stopping: "\u505C\u6B62\u4E2D",
3579
+ timeout: "\u5DF2\u8D85\u65F6",
3580
+ interrupted: "\u5DF2\u4E2D\u65AD"
3471
3581
  },
3472
3582
  pending: {
3473
3583
  approval: "\u9700\u8981\u5BA1\u6279",
@@ -3907,12 +4017,16 @@ function ThemeProvider({ children, theme: themeProp }) {
3907
4017
  React2.useEffect(() => {
3908
4018
  if (!themeRef.current) return;
3909
4019
  const el = themeRef.current;
4020
+ const root = document.documentElement;
4021
+ const rootWasDark = root.classList.contains("dark");
3910
4022
  const { colorScheme, radius, density, typography, color } = theme;
3911
4023
  const isDarkMode2 = colorScheme === "dark";
3912
4024
  if (isDarkMode2) {
3913
4025
  el.classList.add("dark");
4026
+ root.classList.add("dark");
3914
4027
  } else {
3915
4028
  el.classList.remove("dark");
4029
+ root.classList.remove("dark");
3916
4030
  }
3917
4031
  if (radius) {
3918
4032
  el.dataset.radius = radius;
@@ -3954,7 +4068,6 @@ function ThemeProvider({ children, theme: themeProp }) {
3954
4068
  }
3955
4069
  }
3956
4070
  if (color) {
3957
- const root = document.documentElement;
3958
4071
  if (color.grayscale) {
3959
4072
  const grayscaleColors = generateGrayscaleColors(color.grayscale, isDarkMode2);
3960
4073
  Object.entries(grayscaleColors).forEach(([key, value]) => {
@@ -4001,8 +4114,8 @@ function ThemeProvider({ children, theme: themeProp }) {
4001
4114
  }
4002
4115
  setThemeRevision((current) => current + 1);
4003
4116
  return () => {
4004
- const root = document.documentElement;
4005
4117
  el.classList.remove("dark");
4118
+ root.classList.toggle("dark", rootWasDark);
4006
4119
  el.removeAttribute("data-radius");
4007
4120
  el.removeAttribute("data-density");
4008
4121
  el.style.removeProperty("--density-spacing");
@@ -4597,25 +4710,100 @@ var Input = React8.forwardRef(
4597
4710
  );
4598
4711
  Input.displayName = "Input";
4599
4712
 
4713
+ // src/components/ui/tooltip.tsx
4714
+ import "react";
4715
+ import * as TooltipPrimitive from "@radix-ui/react-tooltip";
4716
+ import { jsx as jsx11, jsxs as jsxs3 } from "react/jsx-runtime";
4717
+ function TooltipProvider({
4718
+ delayDuration = 0,
4719
+ ...props
4720
+ }) {
4721
+ return /* @__PURE__ */ jsx11(
4722
+ TooltipPrimitive.Provider,
4723
+ {
4724
+ "data-slot": "tooltip-provider",
4725
+ delayDuration,
4726
+ ...props
4727
+ }
4728
+ );
4729
+ }
4730
+ function Tooltip({
4731
+ ...props
4732
+ }) {
4733
+ return /* @__PURE__ */ jsx11(TooltipProvider, { children: /* @__PURE__ */ jsx11(
4734
+ TooltipPrimitive.Root,
4735
+ {
4736
+ "data-slot": "tooltip",
4737
+ ...props
4738
+ }
4739
+ ) });
4740
+ }
4741
+ function TooltipTrigger({
4742
+ ...props
4743
+ }) {
4744
+ return /* @__PURE__ */ jsx11(
4745
+ TooltipPrimitive.Trigger,
4746
+ {
4747
+ "data-slot": "tooltip-trigger",
4748
+ ...props
4749
+ }
4750
+ );
4751
+ }
4752
+ function TooltipContent({
4753
+ className,
4754
+ sideOffset = 0,
4755
+ hideArrow = false,
4756
+ children,
4757
+ ...props
4758
+ }) {
4759
+ return /* @__PURE__ */ jsx11(TooltipPrimitive.Portal, { children: /* @__PURE__ */ jsxs3(
4760
+ TooltipPrimitive.Content,
4761
+ {
4762
+ "data-slot": "tooltip-content",
4763
+ sideOffset,
4764
+ className: cn(
4765
+ "bg-primary text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit rounded-md px-3 py-1.5 text-xs text-balance",
4766
+ className
4767
+ ),
4768
+ ...props,
4769
+ children: [
4770
+ children,
4771
+ !hideArrow ? /* @__PURE__ */ jsx11(TooltipPrimitive.Arrow, { className: "bg-primary fill-primary z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]" }) : null
4772
+ ]
4773
+ }
4774
+ ) });
4775
+ }
4776
+
4777
+ // src/components/composer/ConnectorMenuPanel.tsx
4778
+ import * as React12 from "react";
4779
+ import {
4780
+ ArrowUpRight,
4781
+ Cable,
4782
+ Check,
4783
+ Link2,
4784
+ Loader2,
4785
+ Search
4786
+ } from "lucide-react";
4787
+
4600
4788
  // src/components/ui/scroll-area.tsx
4601
- import * as React9 from "react";
4789
+ import * as React10 from "react";
4602
4790
  import * as ScrollAreaPrimitive from "@radix-ui/react-scroll-area";
4603
- import { jsx as jsx11, jsxs as jsxs3 } from "react/jsx-runtime";
4604
- var ScrollArea = React9.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs3(
4791
+ import { jsx as jsx12, jsxs as jsxs4 } from "react/jsx-runtime";
4792
+ var ScrollArea = React10.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs4(
4605
4793
  ScrollAreaPrimitive.Root,
4606
4794
  {
4607
4795
  ref,
4608
4796
  className: cn("relative min-w-0 overflow-hidden", className),
4609
4797
  ...props,
4610
4798
  children: [
4611
- /* @__PURE__ */ jsx11(ScrollAreaPrimitive.Viewport, { className: "h-full w-full min-w-0 max-w-full rounded-[inherit] [&>div]:!block [&>div]:!w-full", children }),
4612
- /* @__PURE__ */ jsx11(ScrollBar, {}),
4613
- /* @__PURE__ */ jsx11(ScrollAreaPrimitive.Corner, {})
4799
+ /* @__PURE__ */ jsx12(ScrollAreaPrimitive.Viewport, { className: "h-full w-full min-w-0 max-w-full rounded-[inherit] [&>div]:!block [&>div]:!w-full", children }),
4800
+ /* @__PURE__ */ jsx12(ScrollBar, {}),
4801
+ /* @__PURE__ */ jsx12(ScrollAreaPrimitive.Corner, {})
4614
4802
  ]
4615
4803
  }
4616
4804
  ));
4617
4805
  ScrollArea.displayName = ScrollAreaPrimitive.Root.displayName;
4618
- var ScrollBar = React9.forwardRef(({ className, orientation = "vertical", ...props }, ref) => /* @__PURE__ */ jsx11(
4806
+ var ScrollBar = React10.forwardRef(({ className, orientation = "vertical", ...props }, ref) => /* @__PURE__ */ jsx12(
4619
4807
  ScrollAreaPrimitive.ScrollAreaScrollbar,
4620
4808
  {
4621
4809
  ref,
@@ -4627,27 +4815,16 @@ var ScrollBar = React9.forwardRef(({ className, orientation = "vertical", ...pro
4627
4815
  className
4628
4816
  ),
4629
4817
  ...props,
4630
- children: /* @__PURE__ */ jsx11(ScrollAreaPrimitive.ScrollAreaThumb, { className: "relative flex-1 rounded-full bg-border" })
4818
+ children: /* @__PURE__ */ jsx12(ScrollAreaPrimitive.ScrollAreaThumb, { className: "relative flex-1 rounded-full bg-border" })
4631
4819
  }
4632
4820
  ));
4633
4821
  ScrollBar.displayName = ScrollAreaPrimitive.ScrollAreaScrollbar.displayName;
4634
4822
 
4635
- // src/components/composer/ConnectorMenuPanel.tsx
4636
- import * as React11 from "react";
4637
- import {
4638
- ArrowUpRight,
4639
- Cable,
4640
- Check,
4641
- Link2,
4642
- Loader2,
4643
- Search
4644
- } from "lucide-react";
4645
-
4646
4823
  // src/components/ui/separator.tsx
4647
- import * as React10 from "react";
4648
- import { jsx as jsx12 } from "react/jsx-runtime";
4649
- var Separator = React10.forwardRef(
4650
- ({ className, orientation = "horizontal", ...props }, ref) => /* @__PURE__ */ jsx12(
4824
+ import * as React11 from "react";
4825
+ import { jsx as jsx13 } from "react/jsx-runtime";
4826
+ var Separator = React11.forwardRef(
4827
+ ({ className, orientation = "horizontal", ...props }, ref) => /* @__PURE__ */ jsx13(
4651
4828
  "div",
4652
4829
  {
4653
4830
  ref,
@@ -4665,7 +4842,7 @@ var Separator = React10.forwardRef(
4665
4842
  Separator.displayName = "Separator";
4666
4843
 
4667
4844
  // src/components/composer/ConnectorMenuPanel.tsx
4668
- import { jsx as jsx13, jsxs as jsxs4 } from "react/jsx-runtime";
4845
+ import { jsx as jsx14, jsxs as jsxs5 } from "react/jsx-runtime";
4669
4846
  function resolveConnectorManagementUrl(apiUrl, scope) {
4670
4847
  const base2 = apiUrl?.trim() || window.location.href;
4671
4848
  const path = scope.type === "project" ? `/project/${encodeURIComponent(scope.projectId)}/config` : `/xpert/w/${encodeURIComponent(scope.workspaceId)}/connectors`;
@@ -4697,7 +4874,7 @@ function ConnectorIcon({
4697
4874
  label
4698
4875
  }) {
4699
4876
  if (option.icon?.type === "image" && typeof option.icon.value === "string") {
4700
- return /* @__PURE__ */ jsx13(
4877
+ return /* @__PURE__ */ jsx14(
4701
4878
  "img",
4702
4879
  {
4703
4880
  src: option.icon.value,
@@ -4706,13 +4883,13 @@ function ConnectorIcon({
4706
4883
  }
4707
4884
  );
4708
4885
  }
4709
- return /* @__PURE__ */ jsx13(
4886
+ return /* @__PURE__ */ jsx14(
4710
4887
  "span",
4711
4888
  {
4712
4889
  "aria-hidden": "true",
4713
4890
  title: label,
4714
4891
  className: "flex size-7 items-center justify-center rounded-md bg-muted text-muted-foreground",
4715
- children: /* @__PURE__ */ jsx13(Cable, { className: "size-4" })
4892
+ children: /* @__PURE__ */ jsx14(Cable, { className: "size-4" })
4716
4893
  }
4717
4894
  );
4718
4895
  }
@@ -4728,22 +4905,22 @@ function ConnectorMenuPanel({
4728
4905
  apiUrl
4729
4906
  }) {
4730
4907
  const { t, i18n: i18n2 } = useChatkitTranslation();
4731
- const [query, setQuery] = React11.useState("");
4732
- const [scope, setScope] = React11.useState(null);
4733
- const [options, setOptions] = React11.useState([]);
4734
- const [loading, setLoading] = React11.useState(false);
4735
- const [error, setError] = React11.useState(null);
4736
- const [connectingBindingId, setConnectingBindingId] = React11.useState(null);
4908
+ const [query, setQuery] = React12.useState("");
4909
+ const [scope, setScope] = React12.useState(null);
4910
+ const [options, setOptions] = React12.useState([]);
4911
+ const [loading, setLoading] = React12.useState(false);
4912
+ const [error, setError] = React12.useState(null);
4913
+ const [connectingBindingId, setConnectingBindingId] = React12.useState(null);
4737
4914
  const loadErrorMessage = t("composer.connectors.loadError");
4738
4915
  const accessDeniedMessage = t("composer.connectors.accessDenied");
4739
4916
  const scopeUnavailableMessage = t("composer.connectors.scopeUnavailable");
4740
- const pollAbortRef = React11.useRef(null);
4741
- const popupRef = React11.useRef(null);
4742
- const selectedBindingIdSet = React11.useMemo(
4917
+ const pollAbortRef = React12.useRef(null);
4918
+ const popupRef = React12.useRef(null);
4919
+ const selectedBindingIdSet = React12.useMemo(
4743
4920
  () => new Set(selectedBindingIds),
4744
4921
  [selectedBindingIds]
4745
4922
  );
4746
- const loadConnectors = React11.useCallback(
4923
+ const loadConnectors = React12.useCallback(
4747
4924
  async (signal) => {
4748
4925
  if (!client || !xpertId) return;
4749
4926
  const response = await client.connectors.runtimeOptions(xpertId, {
@@ -4755,7 +4932,7 @@ function ConnectorMenuPanel({
4755
4932
  },
4756
4933
  [client, projectId, xpertId]
4757
4934
  );
4758
- React11.useEffect(() => {
4935
+ React12.useEffect(() => {
4759
4936
  if (!client || !xpertId) {
4760
4937
  setScope(null);
4761
4938
  setOptions([]);
@@ -4778,7 +4955,7 @@ function ConnectorMenuPanel({
4778
4955
  });
4779
4956
  return () => controller.abort();
4780
4957
  }, [accessDeniedMessage, client, loadConnectors, loadErrorMessage, xpertId]);
4781
- React11.useEffect(
4958
+ React12.useEffect(
4782
4959
  () => () => {
4783
4960
  pollAbortRef.current?.abort();
4784
4961
  if (popupRef.current && !popupRef.current.closed) {
@@ -4789,7 +4966,7 @@ function ConnectorMenuPanel({
4789
4966
  );
4790
4967
  const manageUrl = scope ? resolveConnectorManagementUrl(apiUrl, scope) : null;
4791
4968
  const normalizedQuery = query.trim().toLocaleLowerCase();
4792
- const filteredOptions = React11.useMemo(
4969
+ const filteredOptions = React12.useMemo(
4793
4970
  () => options.filter((option) => {
4794
4971
  if (!normalizedQuery) return true;
4795
4972
  const searchable = `${localizeText(
@@ -4800,7 +4977,7 @@ function ConnectorMenuPanel({
4800
4977
  }),
4801
4978
  [i18n2.language, normalizedQuery, options]
4802
4979
  );
4803
- const refresh = React11.useCallback(async () => {
4980
+ const refresh = React12.useCallback(async () => {
4804
4981
  setLoading(true);
4805
4982
  try {
4806
4983
  await loadConnectors();
@@ -4809,7 +4986,7 @@ function ConnectorMenuPanel({
4809
4986
  setLoading(false);
4810
4987
  }
4811
4988
  }, [loadConnectors]);
4812
- const pollAuthorization = React11.useCallback(
4989
+ const pollAuthorization = React12.useCallback(
4813
4990
  async (bindingId, initial, popup, signal) => {
4814
4991
  if (!client) return;
4815
4992
  let status = initial;
@@ -4846,7 +5023,7 @@ function ConnectorMenuPanel({
4846
5023
  },
4847
5024
  [client, onSelectionChange, refresh, selectedBindingIds, xpertId]
4848
5025
  );
4849
- const openManageConnectors = React11.useCallback(() => {
5026
+ const openManageConnectors = React12.useCallback(() => {
4850
5027
  if (!manageUrl) {
4851
5028
  setError(scopeUnavailableMessage);
4852
5029
  return;
@@ -4858,7 +5035,7 @@ function ConnectorMenuPanel({
4858
5035
  }
4859
5036
  popup.opener = null;
4860
5037
  }, [manageUrl, scopeUnavailableMessage, t]);
4861
- const connectPersonalBinding = React11.useCallback(
5038
+ const connectPersonalBinding = React12.useCallback(
4862
5039
  async (option) => {
4863
5040
  if (!client) return;
4864
5041
  if (option.profile) {
@@ -4944,7 +5121,7 @@ function ConnectorMenuPanel({
4944
5121
  xpertId
4945
5122
  ]
4946
5123
  );
4947
- const handleOptionClick = React11.useCallback(
5124
+ const handleOptionClick = React12.useCallback(
4948
5125
  (option) => {
4949
5126
  if (!isConnectorUsable(option)) {
4950
5127
  if (option.authorizationMode === "personal") {
@@ -4965,15 +5142,15 @@ function ConnectorMenuPanel({
4965
5142
  selectedBindingIds
4966
5143
  ]
4967
5144
  );
4968
- return /* @__PURE__ */ jsxs4(
5145
+ return /* @__PURE__ */ jsxs5(
4969
5146
  "div",
4970
5147
  {
4971
5148
  "data-slot": "composer-connector-panel",
4972
5149
  className: "flex w-full min-w-0 max-w-full flex-col",
4973
5150
  children: [
4974
- /* @__PURE__ */ jsx13("div", { className: "p-3 pb-2", children: /* @__PURE__ */ jsxs4("div", { className: "relative", children: [
4975
- /* @__PURE__ */ jsx13(Search, { className: "pointer-events-none absolute left-3 top-1/2 size-5 -translate-y-1/2 text-muted-foreground" }),
4976
- /* @__PURE__ */ jsx13(
5151
+ /* @__PURE__ */ jsx14("div", { className: "p-3 pb-2", children: /* @__PURE__ */ jsxs5("div", { className: "relative", children: [
5152
+ /* @__PURE__ */ jsx14(Search, { className: "pointer-events-none absolute left-3 top-1/2 size-5 -translate-y-1/2 text-muted-foreground" }),
5153
+ /* @__PURE__ */ jsx14(
4977
5154
  Input,
4978
5155
  {
4979
5156
  value: query,
@@ -4983,15 +5160,15 @@ function ConnectorMenuPanel({
4983
5160
  }
4984
5161
  )
4985
5162
  ] }) }),
4986
- /* @__PURE__ */ jsx13(ScrollArea, { className: "max-h-72 min-h-0 px-3", children: /* @__PURE__ */ jsx13("div", { "data-slot": "composer-connector-list", className: "space-y-1 pb-2", children: loading ? /* @__PURE__ */ jsxs4(ConnectorMessage, { children: [
4987
- /* @__PURE__ */ jsx13(Loader2, { className: "mr-2 inline size-4 animate-spin" }),
5163
+ /* @__PURE__ */ jsx14(ScrollArea, { className: "max-h-72 min-h-0 px-3", children: /* @__PURE__ */ jsx14("div", { "data-slot": "composer-connector-list", className: "space-y-1 pb-2", children: loading ? /* @__PURE__ */ jsxs5(ConnectorMessage, { children: [
5164
+ /* @__PURE__ */ jsx14(Loader2, { className: "mr-2 inline size-4 animate-spin" }),
4988
5165
  t("composer.connectors.loading")
4989
- ] }) : !xpertId ? /* @__PURE__ */ jsx13(ConnectorMessage, { children: scopeUnavailableMessage }) : filteredOptions.length === 0 ? /* @__PURE__ */ jsx13(ConnectorMessage, { children: t("composer.connectors.empty") }) : filteredOptions.map((option) => {
5166
+ ] }) : !xpertId ? /* @__PURE__ */ jsx14(ConnectorMessage, { children: scopeUnavailableMessage }) : filteredOptions.length === 0 ? /* @__PURE__ */ jsx14(ConnectorMessage, { children: t("composer.connectors.empty") }) : filteredOptions.map((option) => {
4990
5167
  const label = localizeText(option.label, i18n2.language);
4991
5168
  const selected = selectedBindingIdSet.has(option.bindingId);
4992
5169
  const usable = isConnectorUsable(option);
4993
5170
  const connecting = connectingBindingId === option.bindingId;
4994
- return /* @__PURE__ */ jsxs4(
5171
+ return /* @__PURE__ */ jsxs5(
4995
5172
  "button",
4996
5173
  {
4997
5174
  type: "button",
@@ -5003,13 +5180,13 @@ function ConnectorMenuPanel({
5003
5180
  ),
5004
5181
  onClick: () => handleOptionClick(option),
5005
5182
  children: [
5006
- /* @__PURE__ */ jsx13(ConnectorIcon, { option, label }),
5007
- /* @__PURE__ */ jsxs4("span", { className: "min-w-0 flex-1", children: [
5008
- /* @__PURE__ */ jsx13("span", { className: "block truncate text-base", children: label || option.provider }),
5009
- /* @__PURE__ */ jsx13("span", { className: "block truncate text-xs text-muted-foreground", children: option.authorizationMode === "personal" ? t("composer.connectors.personal") : scope?.type === "workspace" ? t("composer.connectors.workspaceShared") : t("composer.connectors.shared") })
5183
+ /* @__PURE__ */ jsx14(ConnectorIcon, { option, label }),
5184
+ /* @__PURE__ */ jsxs5("span", { className: "min-w-0 flex-1", children: [
5185
+ /* @__PURE__ */ jsx14("span", { className: "block truncate text-base", children: label || option.provider }),
5186
+ /* @__PURE__ */ jsx14("span", { className: "block truncate text-xs text-muted-foreground", children: option.authorizationMode === "personal" ? t("composer.connectors.personal") : scope?.type === "workspace" ? t("composer.connectors.workspaceShared") : t("composer.connectors.shared") })
5010
5187
  ] }),
5011
- /* @__PURE__ */ jsxs4("span", { className: "inline-flex shrink-0 items-center gap-1.5 text-sm text-muted-foreground", children: [
5012
- connecting ? /* @__PURE__ */ jsx13(Loader2, { className: "size-4 animate-spin" }) : selected ? /* @__PURE__ */ jsx13(Check, { className: "size-4 text-primary" }) : usable ? /* @__PURE__ */ jsx13("span", { className: "size-4 rounded-full border border-current" }) : /* @__PURE__ */ jsx13(Link2, { className: "size-4" }),
5188
+ /* @__PURE__ */ jsxs5("span", { className: "inline-flex shrink-0 items-center gap-1.5 text-sm text-muted-foreground", children: [
5189
+ connecting ? /* @__PURE__ */ jsx14(Loader2, { className: "size-4 animate-spin" }) : selected ? /* @__PURE__ */ jsx14(Check, { className: "size-4 text-primary" }) : usable ? /* @__PURE__ */ jsx14("span", { className: "size-4 rounded-full border border-current" }) : /* @__PURE__ */ jsx14(Link2, { className: "size-4" }),
5013
5190
  connecting ? t("composer.connectors.connecting") : selected ? t("composer.connectors.selected") : usable ? t("composer.connectors.select") : option.authorizationMode === "personal" ? t("composer.connectors.connect") : t("composer.connectors.unavailable")
5014
5191
  ] })
5015
5192
  ]
@@ -5017,9 +5194,9 @@ function ConnectorMenuPanel({
5017
5194
  option.bindingId
5018
5195
  );
5019
5196
  }) }) }),
5020
- error ? /* @__PURE__ */ jsx13("div", { role: "alert", className: "px-4 py-2 text-sm text-destructive", children: error }) : null,
5021
- /* @__PURE__ */ jsx13(Separator, {}),
5022
- /* @__PURE__ */ jsxs4(
5197
+ error ? /* @__PURE__ */ jsx14("div", { role: "alert", className: "px-4 py-2 text-sm text-destructive", children: error }) : null,
5198
+ /* @__PURE__ */ jsx14(Separator, {}),
5199
+ /* @__PURE__ */ jsxs5(
5023
5200
  "button",
5024
5201
  {
5025
5202
  type: "button",
@@ -5027,7 +5204,7 @@ function ConnectorMenuPanel({
5027
5204
  disabled: !scope,
5028
5205
  onClick: openManageConnectors,
5029
5206
  children: [
5030
- /* @__PURE__ */ jsx13(ArrowUpRight, { className: "size-5" }),
5207
+ /* @__PURE__ */ jsx14(ArrowUpRight, { className: "size-5" }),
5031
5208
  t("composer.connectors.manage")
5032
5209
  ]
5033
5210
  }
@@ -5040,27 +5217,29 @@ function isAccessDenied(error) {
5040
5217
  return error instanceof Error && "status" in error && (error.status === 401 || error.status === 403);
5041
5218
  }
5042
5219
  function ConnectorMessage({ children }) {
5043
- return /* @__PURE__ */ jsx13("div", { className: "flex min-h-40 items-center justify-center px-4 text-center text-sm text-muted-foreground", children });
5220
+ return /* @__PURE__ */ jsx14("div", { className: "flex min-h-40 items-center justify-center px-4 text-center text-sm text-muted-foreground", children });
5044
5221
  }
5045
5222
 
5046
5223
  // src/components/composer/ComposerMenu.tsx
5047
- import { jsx as jsx14, jsxs as jsxs5 } from "react/jsx-runtime";
5224
+ import { Fragment, jsx as jsx15, jsxs as jsxs6 } from "react/jsx-runtime";
5225
+ var COMPOSER_MENU_EXPANDED_WIDTH_REM = 33;
5226
+ var COMPOSER_MENU_COLLISION_PADDING = 12;
5048
5227
  function getIconComponent(icon) {
5049
5228
  const iconMap = {
5050
- plus: /* @__PURE__ */ jsx14(Plus, { size: 16 }),
5051
- document: /* @__PURE__ */ jsx14(FileText, { size: 16 }),
5052
- write: /* @__PURE__ */ jsx14(Pencil, { size: 16 }),
5053
- sparkle: /* @__PURE__ */ jsx14(Sparkles, { size: 16 }),
5054
- lightbulb: /* @__PURE__ */ jsx14(Lightbulb, { size: 16 }),
5055
- "settings-slider": /* @__PURE__ */ jsx14(SlidersHorizontal, { size: 16 }),
5056
- search: /* @__PURE__ */ jsx14(Search2, { size: 16 }),
5057
- globe: /* @__PURE__ */ jsx14(Globe, { size: 16 }),
5058
- images: /* @__PURE__ */ jsx14(Images, { size: 16 })
5229
+ plus: /* @__PURE__ */ jsx15(Plus, { size: 16 }),
5230
+ document: /* @__PURE__ */ jsx15(FileText, { size: 16 }),
5231
+ write: /* @__PURE__ */ jsx15(Pencil, { size: 16 }),
5232
+ sparkle: /* @__PURE__ */ jsx15(Sparkles, { size: 16 }),
5233
+ lightbulb: /* @__PURE__ */ jsx15(Lightbulb, { size: 16 }),
5234
+ "settings-slider": /* @__PURE__ */ jsx15(SlidersHorizontal, { size: 16 }),
5235
+ search: /* @__PURE__ */ jsx15(Search2, { size: 16 }),
5236
+ globe: /* @__PURE__ */ jsx15(Globe, { size: 16 }),
5237
+ images: /* @__PURE__ */ jsx15(Images, { size: 16 })
5059
5238
  };
5060
5239
  return iconMap[icon] || iconMap.sparkle;
5061
5240
  }
5062
5241
  function Toggle({ checked }) {
5063
- return /* @__PURE__ */ jsx14(
5242
+ return /* @__PURE__ */ jsx15(
5064
5243
  "span",
5065
5244
  {
5066
5245
  "aria-hidden": "true",
@@ -5068,7 +5247,7 @@ function Toggle({ checked }) {
5068
5247
  "relative inline-flex h-6 w-10 shrink-0 items-center rounded-full transition-colors",
5069
5248
  checked ? "bg-primary" : "bg-muted-foreground/20"
5070
5249
  ),
5071
- children: /* @__PURE__ */ jsx14(
5250
+ children: /* @__PURE__ */ jsx15(
5072
5251
  "span",
5073
5252
  {
5074
5253
  className: cn(
@@ -5104,13 +5283,14 @@ function ComposerMenu({
5104
5283
  }) {
5105
5284
  const { t } = useChatkitTranslation();
5106
5285
  const { theme } = useTheme();
5107
- const [open, setOpen] = React12.useState(false);
5108
- const [activePanel, setActivePanel] = React12.useState(
5286
+ const [open, setOpen] = React13.useState(false);
5287
+ const [activePanel, setActivePanel] = React13.useState(
5109
5288
  null
5110
5289
  );
5111
- const [query, setQuery] = React12.useState("");
5112
- const [collisionBoundary, setCollisionBoundary] = React12.useState();
5113
- const triggerRef = React12.useRef(null);
5290
+ const [query, setQuery] = React13.useState("");
5291
+ const [collisionBoundary, setCollisionBoundary] = React13.useState();
5292
+ const [canExpandSecondaryPanel, setCanExpandSecondaryPanel] = React13.useState(false);
5293
+ const triggerRef = React13.useRef(null);
5114
5294
  const roundedClass = getRoundedClass(theme.radius);
5115
5295
  const panelRoundedClass = getPanelRoundedClass(theme.radius);
5116
5296
  const menuItemRoundedClass = getMenuItemRoundedClass(theme.radius);
@@ -5136,8 +5316,148 @@ function ComposerMenu({
5136
5316
  setActivePanel(panel);
5137
5317
  setQuery("");
5138
5318
  };
5319
+ React13.useLayoutEffect(() => {
5320
+ if (!open || !collisionBoundary) {
5321
+ setCanExpandSecondaryPanel(false);
5322
+ return;
5323
+ }
5324
+ const updateLayout = () => {
5325
+ const trigger = triggerRef.current;
5326
+ if (!trigger) {
5327
+ setCanExpandSecondaryPanel(false);
5328
+ return;
5329
+ }
5330
+ const boundaryRect = collisionBoundary.getBoundingClientRect();
5331
+ const triggerRect = trigger.getBoundingClientRect();
5332
+ const rootFontSize = Number.parseFloat(
5333
+ window.getComputedStyle(document.documentElement).fontSize
5334
+ );
5335
+ const remInPixels = Number.isFinite(rootFontSize) ? rootFontSize : 16;
5336
+ const menuLeft = Math.max(
5337
+ triggerRect.left,
5338
+ boundaryRect.left + COMPOSER_MENU_COLLISION_PADDING
5339
+ );
5340
+ const availableWidth = boundaryRect.right - COMPOSER_MENU_COLLISION_PADDING - menuLeft;
5341
+ const requiredWidth = COMPOSER_MENU_EXPANDED_WIDTH_REM * remInPixels;
5342
+ setCanExpandSecondaryPanel(availableWidth >= requiredWidth);
5343
+ };
5344
+ updateLayout();
5345
+ window.addEventListener("resize", updateLayout);
5346
+ const resizeObserver = typeof ResizeObserver === "function" ? new ResizeObserver(updateLayout) : null;
5347
+ resizeObserver?.observe(collisionBoundary);
5348
+ if (triggerRef.current) {
5349
+ resizeObserver?.observe(triggerRef.current);
5350
+ }
5351
+ return () => {
5352
+ window.removeEventListener("resize", updateLayout);
5353
+ resizeObserver?.disconnect();
5354
+ };
5355
+ }, [collisionBoundary, open]);
5356
+ const returnToPrimaryPanel = () => {
5357
+ setActivePanel(null);
5358
+ setQuery("");
5359
+ };
5360
+ const activePanelLabel = activePanel === "targets" ? t("composer.workbuddy.targets") : activePanel === "experts" ? t("composer.workbuddy.experts") : activePanel === "skills" ? t("composer.capabilities.skills") : activePanel === "connectors" ? t("composer.workbuddy.connectors") : null;
5139
5361
  const normalizedQuery = query.trim().toLocaleLowerCase();
5140
5362
  const matchesQuery2 = (label, description) => !normalizedQuery || `${label} ${description ?? ""}`.toLocaleLowerCase().includes(normalizedQuery);
5363
+ const renderDetailPills = (label, values) => {
5364
+ if (!values?.length) return null;
5365
+ return /* @__PURE__ */ jsxs6("div", { className: "space-y-1", children: [
5366
+ /* @__PURE__ */ jsx15("div", { className: "text-[11px] font-medium uppercase text-muted-foreground", children: label }),
5367
+ /* @__PURE__ */ jsxs6("div", { className: "flex flex-wrap gap-1", children: [
5368
+ values.slice(0, 6).map((value) => /* @__PURE__ */ jsx15(
5369
+ "span",
5370
+ {
5371
+ className: "max-w-full truncate rounded-md bg-muted px-1.5 py-0.5 text-[11px] text-foreground",
5372
+ children: value
5373
+ },
5374
+ value
5375
+ )),
5376
+ values.length > 6 ? /* @__PURE__ */ jsxs6("span", { className: "rounded-md bg-muted px-1.5 py-0.5 text-[11px] text-muted-foreground", children: [
5377
+ "+",
5378
+ values.length - 6
5379
+ ] }) : null
5380
+ ] })
5381
+ ] });
5382
+ };
5383
+ const renderSubAgentDetailCard = (subAgent) => {
5384
+ const agentKind = subAgent.type === "xpert" ? t("composer.capabilities.xpertAgent") : t("composer.capabilities.agent");
5385
+ return /* @__PURE__ */ jsxs6(
5386
+ "div",
5387
+ {
5388
+ "data-slot": "runtime-sub-agent-detail-card",
5389
+ className: cn(
5390
+ "pointer-events-none w-80 space-y-3 border border-border bg-popover p-3 text-popover-foreground shadow-lg",
5391
+ panelRoundedClass
5392
+ ),
5393
+ children: [
5394
+ /* @__PURE__ */ jsxs6("div", { className: "flex items-start gap-3", children: [
5395
+ /* @__PURE__ */ jsx15(
5396
+ ChatkitAvatar,
5397
+ {
5398
+ avatar: normalizeChatkitAvatar(subAgent.avatar),
5399
+ label: subAgent.label,
5400
+ className: "h-9 w-9 shrink-0",
5401
+ fallbackClassName: "text-xs"
5402
+ }
5403
+ ),
5404
+ /* @__PURE__ */ jsxs6("div", { className: "min-w-0 flex-1", children: [
5405
+ /* @__PURE__ */ jsx15("div", { className: "truncate text-sm font-medium", children: subAgent.label }),
5406
+ /* @__PURE__ */ jsx15("div", { className: "truncate text-xs text-muted-foreground", children: subAgent.name ?? agentKind })
5407
+ ] })
5408
+ ] }),
5409
+ subAgent.description ? /* @__PURE__ */ jsx15("div", { className: "line-clamp-4 text-xs leading-5 text-muted-foreground", children: subAgent.description }) : null,
5410
+ /* @__PURE__ */ jsxs6("div", { className: "grid grid-cols-2 gap-2 text-xs", children: [
5411
+ /* @__PURE__ */ jsxs6("div", { className: "rounded-md bg-muted px-2 py-1", children: [
5412
+ /* @__PURE__ */ jsx15("span", { className: "block text-[11px] text-muted-foreground", children: t("composer.capabilities.type") }),
5413
+ /* @__PURE__ */ jsx15("span", { className: "font-medium", children: agentKind })
5414
+ ] }),
5415
+ subAgent.agentKey || subAgent.xpertId ? /* @__PURE__ */ jsxs6("div", { className: "rounded-md bg-muted px-2 py-1", children: [
5416
+ /* @__PURE__ */ jsx15("span", { className: "block text-[11px] text-muted-foreground", children: t("composer.capabilities.identifier") }),
5417
+ /* @__PURE__ */ jsx15("span", { className: "block truncate font-mono text-[11px]", children: subAgent.agentKey ?? subAgent.xpertId })
5418
+ ] }) : null
5419
+ ] }),
5420
+ renderDetailPills(
5421
+ t("composer.capabilities.tools"),
5422
+ subAgent.toolNames
5423
+ ),
5424
+ renderDetailPills(
5425
+ t("composer.capabilities.toolsets"),
5426
+ subAgent.toolsetNames
5427
+ ),
5428
+ renderDetailPills(
5429
+ t("composer.capabilities.knowledge"),
5430
+ subAgent.knowledgebaseNames
5431
+ )
5432
+ ]
5433
+ }
5434
+ );
5435
+ };
5436
+ const renderSubAgentInfoButton = (subAgent) => /* @__PURE__ */ jsxs6(Tooltip, { children: [
5437
+ /* @__PURE__ */ jsx15(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx15(
5438
+ "button",
5439
+ {
5440
+ type: "button",
5441
+ "aria-label": t("composer.capabilities.agentDetails"),
5442
+ "data-slot": "runtime-sub-agent-info-trigger",
5443
+ className: "mt-0.5 flex h-6 w-6 shrink-0 items-center justify-center rounded-md text-muted-foreground hover:bg-muted hover:text-foreground",
5444
+ onClick: (event) => event.stopPropagation(),
5445
+ onPointerDown: (event) => event.stopPropagation(),
5446
+ children: /* @__PURE__ */ jsx15(Info, { size: 14 })
5447
+ }
5448
+ ) }),
5449
+ /* @__PURE__ */ jsx15(
5450
+ TooltipContent,
5451
+ {
5452
+ side: "top",
5453
+ align: "center",
5454
+ sideOffset: 8,
5455
+ hideArrow: true,
5456
+ className: "bg-transparent p-0 text-popover-foreground shadow-none",
5457
+ children: renderSubAgentDetailCard(subAgent)
5458
+ }
5459
+ )
5460
+ ] });
5141
5461
  const renderCapabilityPanel = (panel) => {
5142
5462
  const isSkills = panel === "skills";
5143
5463
  const filteredSkills = isSkills ? skills.filter((skill) => matchesQuery2(skill.label, skill.description)) : [];
@@ -5148,7 +5468,7 @@ function ComposerMenu({
5148
5468
  skill.id
5149
5469
  ) : false;
5150
5470
  const skillDescription = skill.description ?? skill.repositoryName;
5151
- return /* @__PURE__ */ jsxs5(
5471
+ return /* @__PURE__ */ jsxs6(
5152
5472
  DropdownMenuCheckboxItem,
5153
5473
  {
5154
5474
  checked: selected,
@@ -5161,14 +5481,14 @@ function ComposerMenu({
5161
5481
  selected && "bg-muted"
5162
5482
  ),
5163
5483
  children: [
5164
- /* @__PURE__ */ jsx14(
5484
+ /* @__PURE__ */ jsx15(
5165
5485
  "span",
5166
5486
  {
5167
5487
  className: cn(
5168
5488
  "flex size-7 shrink-0 items-center justify-center text-muted-foreground",
5169
5489
  skillDescription && "mt-0.5"
5170
5490
  ),
5171
- children: /* @__PURE__ */ jsx14(
5491
+ children: /* @__PURE__ */ jsx15(
5172
5492
  RuntimeCapabilityIcon,
5173
5493
  {
5174
5494
  option: {
@@ -5183,9 +5503,9 @@ function ComposerMenu({
5183
5503
  )
5184
5504
  }
5185
5505
  ),
5186
- /* @__PURE__ */ jsxs5("span", { className: "min-w-0 flex-1 text-left", children: [
5187
- /* @__PURE__ */ jsx14("span", { className: "block truncate", children: skill.label }),
5188
- skillDescription && /* @__PURE__ */ jsx14("span", { className: "block truncate text-xs text-muted-foreground", children: skillDescription })
5506
+ /* @__PURE__ */ jsxs6("span", { className: "min-w-0 flex-1 text-left", children: [
5507
+ /* @__PURE__ */ jsx15("span", { className: "block truncate", children: skill.label }),
5508
+ skillDescription && /* @__PURE__ */ jsx15("span", { className: "block truncate text-xs text-muted-foreground", children: skillDescription })
5189
5509
  ] })
5190
5510
  ]
5191
5511
  },
@@ -5211,7 +5531,7 @@ function ComposerMenu({
5211
5531
  "subAgent",
5212
5532
  subAgent.nodeKey
5213
5533
  ) : false;
5214
- return /* @__PURE__ */ jsxs5(
5534
+ return /* @__PURE__ */ jsxs6(
5215
5535
  DropdownMenuCheckboxItem,
5216
5536
  {
5217
5537
  checked: selected,
@@ -5227,7 +5547,7 @@ function ComposerMenu({
5227
5547
  selected && "bg-muted"
5228
5548
  ),
5229
5549
  children: [
5230
- /* @__PURE__ */ jsx14("span", { className: "mt-0.5 flex size-7 shrink-0 items-center justify-center text-muted-foreground", children: /* @__PURE__ */ jsx14(
5550
+ /* @__PURE__ */ jsx15("span", { className: "mt-0.5 flex size-7 shrink-0 items-center justify-center text-muted-foreground", children: /* @__PURE__ */ jsx15(
5231
5551
  RuntimeCapabilityIcon,
5232
5552
  {
5233
5553
  option: {
@@ -5240,16 +5560,17 @@ function ComposerMenu({
5240
5560
  variant: "list"
5241
5561
  }
5242
5562
  ) }),
5243
- /* @__PURE__ */ jsxs5("span", { className: "min-w-0 flex-1 text-left", children: [
5244
- /* @__PURE__ */ jsx14("span", { className: "block truncate", children: subAgent.label }),
5245
- (subAgent.description || subAgent.name) && /* @__PURE__ */ jsx14("span", { className: "block truncate text-xs text-muted-foreground", children: subAgent.description ?? subAgent.name })
5246
- ] })
5563
+ /* @__PURE__ */ jsxs6("span", { className: "min-w-0 flex-1 text-left", children: [
5564
+ /* @__PURE__ */ jsx15("span", { className: "block truncate", children: subAgent.label }),
5565
+ (subAgent.description || subAgent.name) && /* @__PURE__ */ jsx15("span", { className: "block truncate text-xs text-muted-foreground", children: subAgent.description ?? subAgent.name })
5566
+ ] }),
5567
+ renderSubAgentInfoButton(subAgent)
5247
5568
  ]
5248
5569
  },
5249
5570
  subAgent.nodeKey
5250
5571
  );
5251
5572
  });
5252
- const toolRows = isSkills ? tools.filter((tool) => matchesQuery2(tool.label, tool.shortLabel)).map((tool) => /* @__PURE__ */ jsxs5(
5573
+ const toolRows = isSkills ? tools.filter((tool) => matchesQuery2(tool.label, tool.shortLabel)).map((tool) => /* @__PURE__ */ jsxs6(
5253
5574
  "button",
5254
5575
  {
5255
5576
  type: "button",
@@ -5262,14 +5583,14 @@ function ComposerMenu({
5262
5583
  setOpen(false);
5263
5584
  },
5264
5585
  children: [
5265
- /* @__PURE__ */ jsx14("span", { className: "flex size-7 shrink-0 items-center justify-center text-muted-foreground", children: getIconComponent(tool.icon) }),
5266
- /* @__PURE__ */ jsx14("span", { className: "truncate", children: tool.label })
5586
+ /* @__PURE__ */ jsx15("span", { className: "flex size-7 shrink-0 items-center justify-center text-muted-foreground", children: getIconComponent(tool.icon) }),
5587
+ /* @__PURE__ */ jsx15("span", { className: "truncate", children: tool.label })
5267
5588
  ]
5268
5589
  },
5269
5590
  tool.id
5270
5591
  )) : [];
5271
- return /* @__PURE__ */ jsxs5(SecondaryPanel, { panelRoundedClass, children: [
5272
- /* @__PURE__ */ jsx14(
5592
+ return /* @__PURE__ */ jsxs6(Fragment, { children: [
5593
+ /* @__PURE__ */ jsx15(
5273
5594
  PanelSearch,
5274
5595
  {
5275
5596
  value: query,
@@ -5279,29 +5600,109 @@ function ComposerMenu({
5279
5600
  )
5280
5601
  }
5281
5602
  ),
5282
- /* @__PURE__ */ jsx14(ScrollArea, { className: "h-72 px-2 pb-2", children: /* @__PURE__ */ jsxs5("div", { "data-slot": "composer-capability-list", className: "space-y-1", children: [
5283
- isSkills && expertSkills.length > 0 ? /* @__PURE__ */ jsx14(SkillGroup, { label: t("composer.workbuddy.expertSkills"), children: expertSkills.map(renderSkillRow) }) : null,
5284
- isSkills ? Array.from(projectSkillGroups.entries()).map(
5285
- ([projectLabel, projectSkills]) => /* @__PURE__ */ jsx14(
5286
- SkillGroup,
5287
- {
5288
- label: t("composer.workbuddy.projectSkills", {
5289
- project: projectLabel
5290
- }),
5291
- children: projectSkills.map(renderSkillRow)
5292
- },
5293
- projectLabel
5294
- )
5295
- ) : capabilityRows,
5296
- toolRows,
5297
- (isSkills ? filteredSkills.length : capabilityRows.length) === 0 && toolRows.length === 0 ? /* @__PURE__ */ jsx14("div", { className: "flex min-h-32 items-center justify-center px-4 text-center text-sm text-muted-foreground", children: t(
5298
- isSkills ? "composer.workbuddy.emptySkills" : "composer.workbuddy.emptyExperts"
5299
- ) }) : null
5300
- ] }) })
5603
+ /* @__PURE__ */ jsx15(
5604
+ "div",
5605
+ {
5606
+ "data-slot": "composer-capability-scroll",
5607
+ className: "max-h-72 overflow-y-auto overscroll-contain px-2 pb-2",
5608
+ children: /* @__PURE__ */ jsxs6("div", { "data-slot": "composer-capability-list", className: "space-y-1", children: [
5609
+ isSkills && expertSkills.length > 0 ? /* @__PURE__ */ jsx15(SkillGroup, { label: t("composer.workbuddy.expertSkills"), children: expertSkills.map(renderSkillRow) }) : null,
5610
+ isSkills ? Array.from(projectSkillGroups.entries()).map(
5611
+ ([projectLabel, projectSkills]) => /* @__PURE__ */ jsx15(
5612
+ SkillGroup,
5613
+ {
5614
+ label: t("composer.workbuddy.projectSkills", {
5615
+ project: projectLabel
5616
+ }),
5617
+ children: projectSkills.map(renderSkillRow)
5618
+ },
5619
+ projectLabel
5620
+ )
5621
+ ) : capabilityRows,
5622
+ toolRows,
5623
+ (isSkills ? filteredSkills.length : capabilityRows.length) === 0 && toolRows.length === 0 ? /* @__PURE__ */ jsx15("div", { className: "flex min-h-32 items-center justify-center px-4 text-center text-sm text-muted-foreground", children: t(
5624
+ isSkills ? "composer.workbuddy.emptySkills" : "composer.workbuddy.emptyExperts"
5625
+ ) }) : null
5626
+ ] })
5627
+ }
5628
+ )
5301
5629
  ] });
5302
5630
  };
5303
- return /* @__PURE__ */ jsxs5(DropdownMenu, { open, onOpenChange: handleOpenChange, modal: false, children: [
5304
- /* @__PURE__ */ jsx14(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsx14(
5631
+ const primaryPanel = /* @__PURE__ */ jsxs6(
5632
+ "div",
5633
+ {
5634
+ "data-slot": "composer-primary-panel",
5635
+ className: cn(
5636
+ "w-64 max-w-full shrink-0 overflow-hidden bg-popover p-1 text-popover-foreground shadow-md ring-1 ring-foreground/10",
5637
+ panelRoundedClass
5638
+ ),
5639
+ children: [
5640
+ /* @__PURE__ */ jsxs6(
5641
+ DropdownMenuItem,
5642
+ {
5643
+ disabled: !attachmentsEnabled,
5644
+ onSelect: onAttachmentClick,
5645
+ className: cn("gap-3 p-1.5 font-normal", menuItemRoundedClass),
5646
+ children: [
5647
+ /* @__PURE__ */ jsx15(Paperclip, { className: "size-5" }),
5648
+ /* @__PURE__ */ jsx15("span", { className: "flex-1 text-base", children: t("composer.addAttachment") }),
5649
+ /* @__PURE__ */ jsx15(ChevronRight, { className: "size-4" })
5650
+ ]
5651
+ }
5652
+ ),
5653
+ /* @__PURE__ */ jsx15(DropdownMenuSeparator, { className: "my-2" }),
5654
+ /* @__PURE__ */ jsx15(
5655
+ PrimaryPanelItem,
5656
+ {
5657
+ icon: /* @__PURE__ */ jsx15(Target, {}),
5658
+ label: t("composer.workbuddy.targets"),
5659
+ active: activePanel === "targets",
5660
+ onSelect: () => choosePanel("targets"),
5661
+ className: menuItemRoundedClass
5662
+ }
5663
+ ),
5664
+ /* @__PURE__ */ jsx15(
5665
+ PrimaryPanelItem,
5666
+ {
5667
+ icon: /* @__PURE__ */ jsx15(Bot, {}),
5668
+ label: t("composer.workbuddy.experts"),
5669
+ count: selectedSubAgentCount,
5670
+ active: activePanel === "experts",
5671
+ onSelect: () => choosePanel("experts"),
5672
+ className: menuItemRoundedClass
5673
+ }
5674
+ ),
5675
+ /* @__PURE__ */ jsx15(
5676
+ PrimaryPanelItem,
5677
+ {
5678
+ icon: /* @__PURE__ */ jsx15(WandSparkles, {}),
5679
+ label: t("composer.capabilities.skills"),
5680
+ count: selectedSkillCount,
5681
+ active: activePanel === "skills",
5682
+ onSelect: () => choosePanel("skills"),
5683
+ className: menuItemRoundedClass
5684
+ }
5685
+ ),
5686
+ /* @__PURE__ */ jsx15(
5687
+ PrimaryPanelItem,
5688
+ {
5689
+ icon: /* @__PURE__ */ jsx15(Plug2, {}),
5690
+ label: t("composer.workbuddy.connectors"),
5691
+ count: selectedConnectorBindingIds?.length ?? 0,
5692
+ active: activePanel === "connectors",
5693
+ disabled: !connectorsEnabled,
5694
+ onSelect: () => choosePanel("connectors"),
5695
+ className: menuItemRoundedClass
5696
+ }
5697
+ )
5698
+ ]
5699
+ }
5700
+ );
5701
+ const secondaryPanelExpandsRight = Boolean(
5702
+ activePanel && activePanelLabel && canExpandSecondaryPanel
5703
+ );
5704
+ return /* @__PURE__ */ jsxs6(DropdownMenu, { open, onOpenChange: handleOpenChange, modal: false, children: [
5705
+ /* @__PURE__ */ jsx15(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsx15(
5305
5706
  Button,
5306
5707
  {
5307
5708
  ref: triggerRef,
@@ -5315,7 +5716,7 @@ function ComposerMenu({
5315
5716
  "size-9 shrink-0 transition-[background-color,border-radius] duration-300 hover:bg-muted",
5316
5717
  open ? "rounded-full bg-muted" : roundedClass
5317
5718
  ),
5318
- children: /* @__PURE__ */ jsx14(
5719
+ children: /* @__PURE__ */ jsx15(
5319
5720
  Plus,
5320
5721
  {
5321
5722
  className: cn(
@@ -5326,173 +5727,116 @@ function ComposerMenu({
5326
5727
  )
5327
5728
  }
5328
5729
  ) }),
5329
- /* @__PURE__ */ jsx14(
5730
+ /* @__PURE__ */ jsx15(
5330
5731
  DropdownMenuContent,
5331
5732
  {
5332
5733
  align: "start",
5333
5734
  side: "top",
5334
5735
  sideOffset: 8,
5335
5736
  collisionBoundary,
5336
- collisionPadding: 12,
5737
+ collisionPadding: COMPOSER_MENU_COLLISION_PADDING,
5738
+ "data-layout": canExpandSecondaryPanel ? "wide" : "narrow",
5337
5739
  className: cn(
5338
- "bg-transparent shadow-none ring-0",
5339
- activePanel ? "w-[37rem] max-w-(--radix-dropdown-menu-content-available-width) overflow-visible p-1" : "w-[16.5rem] overflow-visible p-1"
5740
+ "max-w-(--radix-dropdown-menu-content-available-width) bg-transparent p-1 shadow-none ring-0",
5741
+ secondaryPanelExpandsRight ? "w-[33rem] overflow-visible" : "w-[16.5rem] overflow-hidden"
5340
5742
  ),
5341
- children: /* @__PURE__ */ jsxs5(
5743
+ children: /* @__PURE__ */ jsxs6(
5342
5744
  "div",
5343
5745
  {
5344
- className: cn(
5345
- "items-end gap-2",
5346
- activePanel ? "flex w-full min-w-0" : "flex"
5347
- ),
5348
- children: [
5349
- /* @__PURE__ */ jsxs5(
5350
- "div",
5351
- {
5352
- "data-slot": "composer-primary-panel",
5353
- className: cn(
5354
- "w-64 max-w-full shrink-0 overflow-hidden bg-popover p-1 text-popover-foreground shadow-md ring-1 ring-foreground/10",
5355
- panelRoundedClass
5356
- ),
5357
- children: [
5358
- /* @__PURE__ */ jsxs5(
5359
- DropdownMenuItem,
5360
- {
5361
- disabled: !attachmentsEnabled,
5362
- onSelect: onAttachmentClick,
5363
- className: cn("gap-3 p-1.5 font-normal", menuItemRoundedClass),
5364
- children: [
5365
- /* @__PURE__ */ jsx14(Paperclip, { className: "size-5" }),
5366
- /* @__PURE__ */ jsx14("span", { className: "flex-1 text-base", children: t("composer.addAttachment") }),
5367
- /* @__PURE__ */ jsx14(ChevronRight, { className: "size-4" })
5368
- ]
5369
- }
5370
- ),
5371
- /* @__PURE__ */ jsx14(DropdownMenuSeparator, { className: "my-2" }),
5372
- /* @__PURE__ */ jsx14(
5373
- PrimaryPanelItem,
5374
- {
5375
- icon: /* @__PURE__ */ jsx14(Target, {}),
5376
- label: t("composer.workbuddy.targets"),
5377
- active: activePanel === "targets",
5378
- onSelect: () => choosePanel("targets"),
5379
- className: menuItemRoundedClass
5380
- }
5381
- ),
5382
- /* @__PURE__ */ jsx14(
5383
- PrimaryPanelItem,
5384
- {
5385
- icon: /* @__PURE__ */ jsx14(Bot, {}),
5386
- label: t("composer.workbuddy.experts"),
5387
- count: selectedSubAgentCount,
5388
- active: activePanel === "experts",
5389
- onSelect: () => choosePanel("experts"),
5390
- className: menuItemRoundedClass
5391
- }
5392
- ),
5393
- /* @__PURE__ */ jsx14(
5394
- PrimaryPanelItem,
5395
- {
5396
- icon: /* @__PURE__ */ jsx14(WandSparkles, {}),
5397
- label: t("composer.capabilities.skills"),
5398
- count: selectedSkillCount,
5399
- active: activePanel === "skills",
5400
- onSelect: () => choosePanel("skills"),
5401
- className: menuItemRoundedClass
5402
- }
5403
- ),
5404
- /* @__PURE__ */ jsx14(
5405
- PrimaryPanelItem,
5406
- {
5407
- icon: /* @__PURE__ */ jsx14(Plug2, {}),
5408
- label: t("composer.workbuddy.connectors"),
5409
- count: selectedConnectorBindingIds?.length ?? 0,
5410
- active: activePanel === "connectors",
5411
- disabled: !connectorsEnabled,
5412
- onSelect: () => choosePanel("connectors"),
5413
- className: menuItemRoundedClass
5414
- }
5415
- )
5416
- ]
5417
- }
5418
- ),
5419
- activePanel === "targets" ? /* @__PURE__ */ jsx14(SecondaryPanel, { panelRoundedClass, children: /* @__PURE__ */ jsxs5("div", { className: "space-y-1 p-1", children: [
5420
- /* @__PURE__ */ jsxs5(
5421
- DropdownMenuItem,
5422
- {
5423
- role: "switch",
5424
- "aria-checked": goalPanelOpen,
5425
- disabled: !goalCommandAvailable,
5426
- onSelect: (event) => {
5427
- event.preventDefault();
5428
- onGoalPanelOpenChange?.(!goalPanelOpen);
5429
- },
5430
- className: cn(
5431
- "gap-3 p-1.5",
5432
- menuItemRoundedClass,
5433
- goalPanelOpen && "bg-muted"
5434
- ),
5435
- children: [
5436
- /* @__PURE__ */ jsx14(Target, { className: "size-5" }),
5437
- /* @__PURE__ */ jsx14("span", { className: "min-w-0 flex-1 text-base", children: t("chat.goal.label") }),
5438
- /* @__PURE__ */ jsx14(Toggle, { checked: goalPanelOpen })
5439
- ]
5746
+ "data-slot": "composer-menu-layout",
5747
+ className: cn(
5748
+ "flex items-end",
5749
+ secondaryPanelExpandsRight && "w-full min-w-0 gap-2"
5750
+ ),
5751
+ children: [
5752
+ secondaryPanelExpandsRight ? primaryPanel : null,
5753
+ activePanel && activePanelLabel ? /* @__PURE__ */ jsxs6(SecondaryPanel, { panelRoundedClass, children: [
5754
+ !secondaryPanelExpandsRight ? /* @__PURE__ */ jsx15(
5755
+ PanelHeader,
5756
+ {
5757
+ label: activePanelLabel,
5758
+ onBack: returnToPrimaryPanel,
5759
+ className: menuItemRoundedClass
5440
5760
  }
5441
- ),
5442
- /* @__PURE__ */ jsxs5(
5443
- DropdownMenuItem,
5761
+ ) : null,
5762
+ activePanel === "targets" ? /* @__PURE__ */ jsxs6("div", { className: "space-y-1 p-1", children: [
5763
+ /* @__PURE__ */ jsxs6(
5764
+ DropdownMenuItem,
5765
+ {
5766
+ role: "switch",
5767
+ "aria-checked": goalPanelOpen,
5768
+ disabled: !goalCommandAvailable,
5769
+ onSelect: (event) => {
5770
+ event.preventDefault();
5771
+ onGoalPanelOpenChange?.(!goalPanelOpen);
5772
+ },
5773
+ className: cn(
5774
+ "gap-3 p-1.5",
5775
+ menuItemRoundedClass,
5776
+ goalPanelOpen && "bg-muted"
5777
+ ),
5778
+ children: [
5779
+ /* @__PURE__ */ jsx15(Target, { className: "size-5" }),
5780
+ /* @__PURE__ */ jsx15("span", { className: "min-w-0 flex-1 text-base", children: t("chat.goal.label") }),
5781
+ /* @__PURE__ */ jsx15(Toggle, { checked: goalPanelOpen })
5782
+ ]
5783
+ }
5784
+ ),
5785
+ /* @__PURE__ */ jsxs6(
5786
+ DropdownMenuItem,
5787
+ {
5788
+ role: "switch",
5789
+ "aria-checked": planModeEnabled,
5790
+ onSelect: (event) => {
5791
+ event.preventDefault();
5792
+ onPlanModeChange?.(!planModeEnabled);
5793
+ },
5794
+ className: cn(
5795
+ "gap-3 p-1.5",
5796
+ menuItemRoundedClass,
5797
+ planModeEnabled && "bg-muted"
5798
+ ),
5799
+ children: [
5800
+ /* @__PURE__ */ jsx15(ListChecks, { className: "size-5" }),
5801
+ /* @__PURE__ */ jsx15("span", { className: "min-w-0 flex-1 text-base", children: t("composer.planMode") }),
5802
+ /* @__PURE__ */ jsx15(Toggle, { checked: planModeEnabled })
5803
+ ]
5804
+ }
5805
+ )
5806
+ ] }) : activePanel === "experts" || activePanel === "skills" ? renderCapabilityPanel(activePanel) : /* @__PURE__ */ jsx15(
5807
+ ConnectorMenuPanel,
5444
5808
  {
5445
- role: "switch",
5446
- "aria-checked": planModeEnabled,
5447
- onSelect: (event) => {
5448
- event.preventDefault();
5449
- onPlanModeChange?.(!planModeEnabled);
5450
- },
5451
- className: cn(
5452
- "gap-3 p-1.5",
5453
- menuItemRoundedClass,
5454
- planModeEnabled && "bg-muted"
5455
- ),
5456
- children: [
5457
- /* @__PURE__ */ jsx14(ListChecks, { className: "size-5" }),
5458
- /* @__PURE__ */ jsx14("span", { className: "min-w-0 flex-1 text-base", children: t("composer.planMode") }),
5459
- /* @__PURE__ */ jsx14(Toggle, { checked: planModeEnabled })
5460
- ]
5809
+ client: connectorClient ?? null,
5810
+ xpertId: connectorXpertId,
5811
+ projectId: connectorProjectId,
5812
+ selectedBindingIds: selectedConnectorBindingIds,
5813
+ onSelectionChange: onConnectorSelectionChange,
5814
+ apiUrl
5461
5815
  }
5462
5816
  )
5463
- ] }) }) : activePanel === "experts" || activePanel === "skills" ? renderCapabilityPanel(activePanel) : activePanel === "connectors" ? /* @__PURE__ */ jsx14(SecondaryPanel, { panelRoundedClass, children: /* @__PURE__ */ jsx14(
5464
- ConnectorMenuPanel,
5465
- {
5466
- client: connectorClient ?? null,
5467
- xpertId: connectorXpertId,
5468
- projectId: connectorProjectId,
5469
- selectedBindingIds: selectedConnectorBindingIds,
5470
- onSelectionChange: onConnectorSelectionChange,
5471
- apiUrl
5472
- }
5473
- ) }) : null
5817
+ ] }) : primaryPanel
5474
5818
  ]
5475
5819
  }
5476
5820
  )
5477
5821
  }
5478
5822
  ),
5479
- planModeEnabled ? /* @__PURE__ */ jsx14(
5823
+ planModeEnabled ? /* @__PURE__ */ jsx15(
5480
5824
  ActiveIndicator,
5481
5825
  {
5482
5826
  label: t("composer.planModeActive"),
5483
5827
  ariaLabel: t("composer.disablePlanMode"),
5484
- icon: /* @__PURE__ */ jsx14(ListChecks, {}),
5828
+ icon: /* @__PURE__ */ jsx15(ListChecks, {}),
5485
5829
  roundedClass,
5486
5830
  disabled,
5487
5831
  onClick: () => onPlanModeChange?.(false)
5488
5832
  }
5489
5833
  ) : null,
5490
- goalCommandAvailable && goalPanelOpen ? /* @__PURE__ */ jsx14(
5834
+ goalCommandAvailable && goalPanelOpen ? /* @__PURE__ */ jsx15(
5491
5835
  ActiveIndicator,
5492
5836
  {
5493
5837
  label: t("chat.goal.label"),
5494
5838
  ariaLabel: t("chat.goal.hide"),
5495
- icon: /* @__PURE__ */ jsx14(Target, {}),
5839
+ icon: /* @__PURE__ */ jsx15(Target, {}),
5496
5840
  roundedClass,
5497
5841
  disabled,
5498
5842
  onClick: () => onGoalPanelOpenChange?.(false)
@@ -5500,6 +5844,29 @@ function ComposerMenu({
5500
5844
  ) : null
5501
5845
  ] });
5502
5846
  }
5847
+ function PanelHeader({
5848
+ label,
5849
+ onBack,
5850
+ className
5851
+ }) {
5852
+ return /* @__PURE__ */ jsxs6(Fragment, { children: [
5853
+ /* @__PURE__ */ jsxs6(
5854
+ DropdownMenuItem,
5855
+ {
5856
+ onSelect: (event) => {
5857
+ event.preventDefault();
5858
+ onBack();
5859
+ },
5860
+ className: cn("gap-3 p-1.5 font-normal", className),
5861
+ children: [
5862
+ /* @__PURE__ */ jsx15(ArrowLeft, { className: "size-5" }),
5863
+ /* @__PURE__ */ jsx15("span", { className: "min-w-0 flex-1 text-base", children: label })
5864
+ ]
5865
+ }
5866
+ ),
5867
+ /* @__PURE__ */ jsx15(DropdownMenuSeparator, { className: "my-0" })
5868
+ ] });
5869
+ }
5503
5870
  function PrimaryPanelItem({
5504
5871
  icon,
5505
5872
  label,
@@ -5509,7 +5876,7 @@ function PrimaryPanelItem({
5509
5876
  onSelect,
5510
5877
  className
5511
5878
  }) {
5512
- return /* @__PURE__ */ jsxs5(
5879
+ return /* @__PURE__ */ jsxs6(
5513
5880
  DropdownMenuItem,
5514
5881
  {
5515
5882
  disabled,
@@ -5519,10 +5886,10 @@ function PrimaryPanelItem({
5519
5886
  },
5520
5887
  className: cn("gap-3 p-1.5 font-normal", className, active && "bg-muted"),
5521
5888
  children: [
5522
- React12.cloneElement(icon, { className: "size-5" }),
5523
- /* @__PURE__ */ jsx14("span", { className: "min-w-0 flex-1 text-base", children: label }),
5524
- count > 0 ? /* @__PURE__ */ jsx14("span", { className: "rounded-full bg-primary/10 px-1.5 py-0.5 text-xs font-normal text-primary", children: count }) : null,
5525
- /* @__PURE__ */ jsx14(ChevronRight, { className: "size-4" })
5889
+ React13.cloneElement(icon, { className: "size-5" }),
5890
+ /* @__PURE__ */ jsx15("span", { className: "min-w-0 flex-1 text-base", children: label }),
5891
+ count > 0 ? /* @__PURE__ */ jsx15("span", { className: "rounded-full bg-primary/10 px-1.5 py-0.5 text-xs font-normal text-primary", children: count }) : null,
5892
+ /* @__PURE__ */ jsx15(ChevronRight, { className: "size-4" })
5526
5893
  ]
5527
5894
  }
5528
5895
  );
@@ -5531,20 +5898,20 @@ function SecondaryPanel({
5531
5898
  panelRoundedClass,
5532
5899
  children
5533
5900
  }) {
5534
- return /* @__PURE__ */ jsx14(
5901
+ return /* @__PURE__ */ jsx15(
5535
5902
  "div",
5536
5903
  {
5537
5904
  "data-slot": "composer-secondary-panel",
5538
5905
  className: cn(
5539
- "min-w-0 max-w-full flex-1 overflow-hidden bg-popover text-popover-foreground shadow-lg ring-1 ring-foreground/10",
5906
+ "w-64 min-w-0 max-w-full overflow-hidden bg-popover text-popover-foreground shadow-lg ring-1 ring-foreground/10",
5540
5907
  panelRoundedClass
5541
5908
  ),
5542
- children: /* @__PURE__ */ jsx14(
5909
+ children: /* @__PURE__ */ jsx15(
5543
5910
  "div",
5544
5911
  {
5545
5912
  "data-slot": "composer-secondary-scroll",
5546
- className: "w-full min-w-0 overflow-x-auto overflow-y-hidden overscroll-x-contain",
5547
- children: /* @__PURE__ */ jsx14("div", { className: "w-full min-w-80", children })
5913
+ className: "w-full min-w-0 overflow-x-hidden",
5914
+ children: /* @__PURE__ */ jsx15("div", { className: "w-full min-w-0", children })
5548
5915
  }
5549
5916
  )
5550
5917
  }
@@ -5555,9 +5922,9 @@ function PanelSearch({
5555
5922
  onChange,
5556
5923
  placeholder
5557
5924
  }) {
5558
- return /* @__PURE__ */ jsxs5("div", { className: "relative p-2", children: [
5559
- /* @__PURE__ */ jsx14(Search2, { className: "pointer-events-none absolute left-5 top-1/2 size-5 -translate-y-1/2 text-muted-foreground" }),
5560
- /* @__PURE__ */ jsx14(
5925
+ return /* @__PURE__ */ jsx15("div", { "data-slot": "composer-panel-search", className: "px-2 pt-1 pb-2", children: /* @__PURE__ */ jsxs6("div", { className: "relative", children: [
5926
+ /* @__PURE__ */ jsx15(Search2, { className: "pointer-events-none absolute left-3 top-1/2 size-5 -translate-y-1/2 text-muted-foreground" }),
5927
+ /* @__PURE__ */ jsx15(
5561
5928
  Input,
5562
5929
  {
5563
5930
  autoFocus: true,
@@ -5567,14 +5934,14 @@ function PanelSearch({
5567
5934
  className: "h-8 border-0 bg-muted pl-10 text-base shadow-none focus-visible:ring-1"
5568
5935
  }
5569
5936
  )
5570
- ] });
5937
+ ] }) });
5571
5938
  }
5572
5939
  function SkillGroup({
5573
5940
  label,
5574
5941
  children
5575
5942
  }) {
5576
- return /* @__PURE__ */ jsxs5("section", { "data-slot": "composer-skill-group", className: "space-y-1", children: [
5577
- /* @__PURE__ */ jsx14("div", { className: "px-1.5 pt-1 text-xs font-normal text-muted-foreground", children: label }),
5943
+ return /* @__PURE__ */ jsxs6("section", { "data-slot": "composer-skill-group", className: "space-y-1", children: [
5944
+ /* @__PURE__ */ jsx15("div", { className: "px-1.5 pt-1 text-xs font-normal text-muted-foreground", children: label }),
5578
5945
  children
5579
5946
  ] });
5580
5947
  }
@@ -5586,7 +5953,7 @@ function ActiveIndicator({
5586
5953
  disabled,
5587
5954
  onClick
5588
5955
  }) {
5589
- return /* @__PURE__ */ jsxs5(
5956
+ return /* @__PURE__ */ jsxs6(
5590
5957
  "button",
5591
5958
  {
5592
5959
  type: "button",
@@ -5598,28 +5965,28 @@ function ActiveIndicator({
5598
5965
  roundedClass
5599
5966
  ),
5600
5967
  children: [
5601
- React12.cloneElement(icon, { className: "mr-1.5 size-3.5" }),
5602
- /* @__PURE__ */ jsx14("span", { children: label }),
5603
- /* @__PURE__ */ jsx14(X, { className: "ml-0 h-3.5 w-0 shrink-0 overflow-hidden opacity-0 transition-[width,margin,opacity] duration-200 group-hover/indicator:ml-1 group-hover/indicator:w-3.5 group-hover/indicator:opacity-100 group-focus-visible/indicator:ml-1 group-focus-visible/indicator:w-3.5 group-focus-visible/indicator:opacity-100" })
5968
+ React13.cloneElement(icon, { className: "mr-1.5 size-3.5" }),
5969
+ /* @__PURE__ */ jsx15("span", { children: label }),
5970
+ /* @__PURE__ */ jsx15(X, { className: "ml-0 h-3.5 w-0 shrink-0 overflow-hidden opacity-0 transition-[width,margin,opacity] duration-200 group-hover/indicator:ml-1 group-hover/indicator:w-3.5 group-hover/indicator:opacity-100 group-focus-visible/indicator:ml-1 group-focus-visible/indicator:w-3.5 group-focus-visible/indicator:opacity-100" })
5604
5971
  ]
5605
5972
  }
5606
5973
  );
5607
5974
  }
5608
5975
 
5609
5976
  // src/components/composer/ModelPicker.tsx
5610
- import * as React13 from "react";
5977
+ import * as React14 from "react";
5611
5978
  import { Bot as Bot2, ChevronDown, SlidersHorizontal as SlidersHorizontal2 } from "lucide-react";
5612
- import { jsx as jsx15, jsxs as jsxs6 } from "react/jsx-runtime";
5979
+ import { jsx as jsx16, jsxs as jsxs7 } from "react/jsx-runtime";
5613
5980
  function ModelProviderAvatar({
5614
5981
  avatar,
5615
5982
  className,
5616
5983
  imageClassName,
5617
5984
  iconClassName
5618
5985
  }) {
5619
- const [failedUrl, setFailedUrl] = React13.useState(null);
5986
+ const [failedUrl, setFailedUrl] = React14.useState(null);
5620
5987
  const avatarUrl = avatar?.url;
5621
5988
  const showImage = Boolean(avatarUrl && failedUrl !== avatarUrl);
5622
- return /* @__PURE__ */ jsx15(
5989
+ return /* @__PURE__ */ jsx16(
5623
5990
  "span",
5624
5991
  {
5625
5992
  "aria-hidden": "true",
@@ -5629,7 +5996,7 @@ function ModelProviderAvatar({
5629
5996
  className
5630
5997
  ),
5631
5998
  style: avatar?.background ? { backgroundColor: avatar.background } : void 0,
5632
- children: showImage ? /* @__PURE__ */ jsx15(
5999
+ children: showImage ? /* @__PURE__ */ jsx16(
5633
6000
  "img",
5634
6001
  {
5635
6002
  "data-slot": "model-provider-avatar-image",
@@ -5638,7 +6005,7 @@ function ModelProviderAvatar({
5638
6005
  className: cn("size-full object-contain p-1", imageClassName),
5639
6006
  onError: () => setFailedUrl(avatarUrl ?? null)
5640
6007
  }
5641
- ) : /* @__PURE__ */ jsx15(Bot2, { "aria-hidden": "true", className: cn("size-3.5", iconClassName) })
6008
+ ) : /* @__PURE__ */ jsx16(Bot2, { "aria-hidden": "true", className: cn("size-3.5", iconClassName) })
5642
6009
  }
5643
6010
  );
5644
6011
  }
@@ -5654,8 +6021,8 @@ function ModelPicker({
5654
6021
  const selectedModel = enabledModels.find(
5655
6022
  (model) => model.id === selectedModelId
5656
6023
  );
5657
- return /* @__PURE__ */ jsxs6(DropdownMenu, { children: [
5658
- /* @__PURE__ */ jsx15(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsxs6(
6024
+ return /* @__PURE__ */ jsxs7(DropdownMenu, { children: [
6025
+ /* @__PURE__ */ jsx16(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsxs7(
5659
6026
  "button",
5660
6027
  {
5661
6028
  type: "button",
@@ -5669,7 +6036,7 @@ function ModelPicker({
5669
6036
  "disabled:pointer-events-none disabled:opacity-50"
5670
6037
  ),
5671
6038
  children: [
5672
- /* @__PURE__ */ jsx15(
6039
+ /* @__PURE__ */ jsx16(
5673
6040
  ModelProviderAvatar,
5674
6041
  {
5675
6042
  avatar: selectedModel?.avatar,
@@ -5678,8 +6045,8 @@ function ModelPicker({
5678
6045
  iconClassName: "size-3"
5679
6046
  }
5680
6047
  ),
5681
- /* @__PURE__ */ jsx15("span", { className: "truncate", children: selectedModel?.label ?? copy.label }),
5682
- /* @__PURE__ */ jsx15(
6048
+ /* @__PURE__ */ jsx16("span", { className: "truncate", children: selectedModel?.label ?? copy.label }),
6049
+ /* @__PURE__ */ jsx16(
5683
6050
  ChevronDown,
5684
6051
  {
5685
6052
  "aria-hidden": "true",
@@ -5689,7 +6056,7 @@ function ModelPicker({
5689
6056
  ]
5690
6057
  }
5691
6058
  ) }),
5692
- /* @__PURE__ */ jsxs6(
6059
+ /* @__PURE__ */ jsxs7(
5693
6060
  DropdownMenuContent,
5694
6061
  {
5695
6062
  align: "end",
@@ -5698,8 +6065,8 @@ function ModelPicker({
5698
6065
  collisionPadding: 12,
5699
6066
  className: "w-80 max-w-[calc(100vw-1.5rem)] overflow-hidden rounded-xl p-0",
5700
6067
  children: [
5701
- /* @__PURE__ */ jsxs6("div", { className: "flex items-start gap-3 px-3 py-3", children: [
5702
- /* @__PURE__ */ jsx15(
6068
+ /* @__PURE__ */ jsxs7("div", { className: "flex items-start gap-3 px-3 py-3", children: [
6069
+ /* @__PURE__ */ jsx16(
5703
6070
  ModelProviderAvatar,
5704
6071
  {
5705
6072
  avatar: selectedModel?.avatar,
@@ -5707,34 +6074,34 @@ function ModelPicker({
5707
6074
  iconClassName: "size-4"
5708
6075
  }
5709
6076
  ),
5710
- /* @__PURE__ */ jsxs6("span", { className: "min-w-0 flex-1", children: [
5711
- /* @__PURE__ */ jsx15("span", { className: "block text-sm font-semibold text-popover-foreground", children: copy.title }),
5712
- /* @__PURE__ */ jsx15("span", { className: "mt-0.5 block text-xs leading-4 text-muted-foreground", children: copy.description })
6077
+ /* @__PURE__ */ jsxs7("span", { className: "min-w-0 flex-1", children: [
6078
+ /* @__PURE__ */ jsx16("span", { className: "block text-sm font-semibold text-popover-foreground", children: copy.title }),
6079
+ /* @__PURE__ */ jsx16("span", { className: "mt-0.5 block text-xs leading-4 text-muted-foreground", children: copy.description })
5713
6080
  ] })
5714
6081
  ] }),
5715
- /* @__PURE__ */ jsx15(DropdownMenuSeparator, { className: "mx-0 my-0" }),
5716
- /* @__PURE__ */ jsx15(DropdownMenuLabel, { className: "px-3 pt-2.5 pb-1 text-[11px] font-semibold tracking-wide uppercase", children: copy.availableModels }),
5717
- /* @__PURE__ */ jsx15(
6082
+ /* @__PURE__ */ jsx16(DropdownMenuSeparator, { className: "mx-0 my-0" }),
6083
+ /* @__PURE__ */ jsx16(DropdownMenuLabel, { className: "px-3 pt-2.5 pb-1 text-[11px] font-semibold tracking-wide uppercase", children: copy.availableModels }),
6084
+ /* @__PURE__ */ jsx16(
5718
6085
  DropdownMenuRadioGroup,
5719
6086
  {
5720
6087
  value: selectedModel?.id ?? "",
5721
6088
  onValueChange: onSelect,
5722
6089
  className: "space-y-0.5 px-1.5 pb-1.5",
5723
- children: models.map((model) => /* @__PURE__ */ jsxs6(
6090
+ children: models.map((model) => /* @__PURE__ */ jsxs7(
5724
6091
  DropdownMenuRadioItem,
5725
6092
  {
5726
6093
  value: model.id,
5727
6094
  disabled: model.disabled,
5728
6095
  className: "min-h-12 cursor-pointer items-center gap-2.5 rounded-lg px-2 py-2 pr-9 data-disabled:cursor-not-allowed",
5729
6096
  children: [
5730
- /* @__PURE__ */ jsx15(ModelProviderAvatar, { avatar: model.avatar, className: "size-7" }),
5731
- /* @__PURE__ */ jsxs6("span", { className: "min-w-0 flex-1", children: [
5732
- /* @__PURE__ */ jsxs6("span", { className: "flex min-w-0 items-center gap-1.5", children: [
5733
- /* @__PURE__ */ jsx15("span", { className: "truncate font-medium text-popover-foreground", children: model.label }),
5734
- model.default ? /* @__PURE__ */ jsx15("span", { className: "shrink-0 rounded-full bg-primary/10 px-1.5 py-0.5 text-[10px] font-medium text-primary", children: copy.defaultBadge }) : null,
5735
- model.disabled ? /* @__PURE__ */ jsx15("span", { className: "shrink-0 rounded-full bg-muted px-1.5 py-0.5 text-[10px] font-medium text-muted-foreground", children: copy.unavailableBadge }) : null
6097
+ /* @__PURE__ */ jsx16(ModelProviderAvatar, { avatar: model.avatar, className: "size-7" }),
6098
+ /* @__PURE__ */ jsxs7("span", { className: "min-w-0 flex-1", children: [
6099
+ /* @__PURE__ */ jsxs7("span", { className: "flex min-w-0 items-center gap-1.5", children: [
6100
+ /* @__PURE__ */ jsx16("span", { className: "truncate font-medium text-popover-foreground", children: model.label }),
6101
+ model.default ? /* @__PURE__ */ jsx16("span", { className: "shrink-0 rounded-full bg-primary/10 px-1.5 py-0.5 text-[10px] font-medium text-primary", children: copy.defaultBadge }) : null,
6102
+ model.disabled ? /* @__PURE__ */ jsx16("span", { className: "shrink-0 rounded-full bg-muted px-1.5 py-0.5 text-[10px] font-medium text-muted-foreground", children: copy.unavailableBadge }) : null
5736
6103
  ] }),
5737
- model.description ? /* @__PURE__ */ jsx15("span", { className: "mt-0.5 block truncate text-xs text-muted-foreground", children: model.description }) : null
6104
+ model.description ? /* @__PURE__ */ jsx16("span", { className: "mt-0.5 block truncate text-xs text-muted-foreground", children: model.description }) : null
5738
6105
  ] })
5739
6106
  ]
5740
6107
  },
@@ -5742,26 +6109,26 @@ function ModelPicker({
5742
6109
  ))
5743
6110
  }
5744
6111
  ),
5745
- /* @__PURE__ */ jsx15(DropdownMenuSeparator, { className: "mx-0 my-0" }),
5746
- /* @__PURE__ */ jsxs6(
6112
+ /* @__PURE__ */ jsx16(DropdownMenuSeparator, { className: "mx-0 my-0" }),
6113
+ /* @__PURE__ */ jsxs7(
5747
6114
  "div",
5748
6115
  {
5749
6116
  "data-slot": "model-picker-future-controls",
5750
6117
  className: "flex items-center gap-2.5 bg-muted/30 px-3 py-2.5",
5751
6118
  "aria-disabled": "true",
5752
6119
  children: [
5753
- /* @__PURE__ */ jsx15(
6120
+ /* @__PURE__ */ jsx16(
5754
6121
  SlidersHorizontal2,
5755
6122
  {
5756
6123
  "aria-hidden": "true",
5757
6124
  className: "size-4 shrink-0 text-muted-foreground"
5758
6125
  }
5759
6126
  ),
5760
- /* @__PURE__ */ jsxs6("span", { className: "min-w-0 flex-1", children: [
5761
- /* @__PURE__ */ jsx15("span", { className: "block text-xs font-medium text-popover-foreground", children: copy.futureTitle }),
5762
- /* @__PURE__ */ jsx15("span", { className: "block truncate text-[11px] text-muted-foreground", children: copy.futureDescription })
6127
+ /* @__PURE__ */ jsxs7("span", { className: "min-w-0 flex-1", children: [
6128
+ /* @__PURE__ */ jsx16("span", { className: "block text-xs font-medium text-popover-foreground", children: copy.futureTitle }),
6129
+ /* @__PURE__ */ jsx16("span", { className: "block truncate text-[11px] text-muted-foreground", children: copy.futureDescription })
5763
6130
  ] }),
5764
- /* @__PURE__ */ jsx15("span", { className: "shrink-0 rounded-full border border-border px-1.5 py-0.5 text-[10px] font-medium text-muted-foreground", children: copy.futureBadge })
6131
+ /* @__PURE__ */ jsx16("span", { className: "shrink-0 rounded-full border border-border px-1.5 py-0.5 text-[10px] font-medium text-muted-foreground", children: copy.futureBadge })
5765
6132
  ]
5766
6133
  }
5767
6134
  )
@@ -5772,9 +6139,9 @@ function ModelPicker({
5772
6139
  }
5773
6140
 
5774
6141
  // src/components/composer/WorkspaceFileMentionPalette.tsx
5775
- import * as React14 from "react";
6142
+ import * as React15 from "react";
5776
6143
  import { FileText as FileText2, Loader2 as Loader22 } from "lucide-react";
5777
- import { jsx as jsx16, jsxs as jsxs7 } from "react/jsx-runtime";
6144
+ import { jsx as jsx17, jsxs as jsxs8 } from "react/jsx-runtime";
5778
6145
  var WORKSPACE_FILE_LIST_DEPTH = 12;
5779
6146
  function getWorkspaceFilePath(file) {
5780
6147
  return file.fullPath?.trim() || file.filePath.trim();
@@ -5786,7 +6153,7 @@ function flattenWorkspaceFiles(files) {
5786
6153
  return [...isDirectory ? [] : [file], ...flattenWorkspaceFiles(children)];
5787
6154
  });
5788
6155
  }
5789
- var WorkspaceFileMentionPalette = React14.forwardRef(function WorkspaceFileMentionPalette2({
6156
+ var WorkspaceFileMentionPalette = React15.forwardRef(function WorkspaceFileMentionPalette2({
5790
6157
  client,
5791
6158
  assistantId,
5792
6159
  projectId,
@@ -5796,14 +6163,14 @@ var WorkspaceFileMentionPalette = React14.forwardRef(function WorkspaceFileMenti
5796
6163
  className
5797
6164
  }, ref) {
5798
6165
  const { t } = useChatkitTranslation();
5799
- const [files, setFiles] = React14.useState([]);
5800
- const [loading, setLoading] = React14.useState(false);
5801
- const [error, setError] = React14.useState(null);
5802
- const [activeIndex, setActiveIndex] = React14.useState(0);
5803
- const activeIndexRef = React14.useRef(0);
5804
- const optionRefs = React14.useRef([]);
6166
+ const [files, setFiles] = React15.useState([]);
6167
+ const [loading, setLoading] = React15.useState(false);
6168
+ const [error, setError] = React15.useState(null);
6169
+ const [activeIndex, setActiveIndex] = React15.useState(0);
6170
+ const activeIndexRef = React15.useRef(0);
6171
+ const optionRefs = React15.useRef([]);
5805
6172
  const loadErrorMessage = t("composer.fileMentions.loadError");
5806
- React14.useEffect(() => {
6173
+ React15.useEffect(() => {
5807
6174
  if (!client || !projectId && !assistantId) {
5808
6175
  setFiles([]);
5809
6176
  setLoading(false);
@@ -5835,7 +6202,7 @@ var WorkspaceFileMentionPalette = React14.forwardRef(function WorkspaceFileMenti
5835
6202
  return () => controller.abort();
5836
6203
  }, [assistantId, client, loadErrorMessage, projectId]);
5837
6204
  const normalizedQuery = query.trim().toLocaleLowerCase();
5838
- const visibleFiles = React14.useMemo(
6205
+ const visibleFiles = React15.useMemo(
5839
6206
  () => files.filter((file) => {
5840
6207
  const filePath = getWorkspaceFilePath(file);
5841
6208
  if (selectedFilePaths.has(filePath)) return false;
@@ -5844,17 +6211,17 @@ var WorkspaceFileMentionPalette = React14.forwardRef(function WorkspaceFileMenti
5844
6211
  }),
5845
6212
  [files, normalizedQuery, selectedFilePaths]
5846
6213
  );
5847
- React14.useLayoutEffect(() => {
6214
+ React15.useLayoutEffect(() => {
5848
6215
  setActiveIndex((current) => {
5849
6216
  const nextIndex = visibleFiles.length === 0 ? 0 : Math.min(current, visibleFiles.length - 1);
5850
6217
  activeIndexRef.current = nextIndex;
5851
6218
  return nextIndex;
5852
6219
  });
5853
6220
  }, [visibleFiles.length]);
5854
- React14.useEffect(() => {
6221
+ React15.useEffect(() => {
5855
6222
  optionRefs.current[activeIndex]?.scrollIntoView?.({ block: "nearest" });
5856
6223
  }, [activeIndex]);
5857
- React14.useImperativeHandle(
6224
+ React15.useImperativeHandle(
5858
6225
  ref,
5859
6226
  () => ({
5860
6227
  moveActive: (direction) => {
@@ -5873,7 +6240,7 @@ var WorkspaceFileMentionPalette = React14.forwardRef(function WorkspaceFileMenti
5873
6240
  [onSelect, visibleFiles]
5874
6241
  );
5875
6242
  const unavailable = !client || !projectId && !assistantId;
5876
- return /* @__PURE__ */ jsxs7(
6243
+ return /* @__PURE__ */ jsxs8(
5877
6244
  "div",
5878
6245
  {
5879
6246
  "data-slot": "workspace-file-mention-palette",
@@ -5882,20 +6249,20 @@ var WorkspaceFileMentionPalette = React14.forwardRef(function WorkspaceFileMenti
5882
6249
  className
5883
6250
  ),
5884
6251
  children: [
5885
- /* @__PURE__ */ jsxs7("div", { className: "border-b border-border px-3 py-2 text-xs font-medium text-muted-foreground", children: [
6252
+ /* @__PURE__ */ jsxs8("div", { className: "border-b border-border px-3 py-2 text-xs font-medium text-muted-foreground", children: [
5886
6253
  t("composer.fileMentions.title"),
5887
- query ? /* @__PURE__ */ jsxs7("span", { className: "ml-1 text-foreground", children: [
6254
+ query ? /* @__PURE__ */ jsxs8("span", { className: "ml-1 text-foreground", children: [
5888
6255
  "@",
5889
6256
  query
5890
6257
  ] }) : null
5891
6258
  ] }),
5892
- /* @__PURE__ */ jsx16("div", { className: "max-h-56 overflow-y-auto p-1", children: unavailable ? /* @__PURE__ */ jsx16(PaletteMessage, { children: t("composer.fileMentions.unavailable") }) : loading ? /* @__PURE__ */ jsxs7(PaletteMessage, { children: [
5893
- /* @__PURE__ */ jsx16(Loader22, { className: "size-4 animate-spin" }),
6259
+ /* @__PURE__ */ jsx17("div", { className: "max-h-56 overflow-y-auto p-1", children: unavailable ? /* @__PURE__ */ jsx17(PaletteMessage, { children: t("composer.fileMentions.unavailable") }) : loading ? /* @__PURE__ */ jsxs8(PaletteMessage, { children: [
6260
+ /* @__PURE__ */ jsx17(Loader22, { className: "size-4 animate-spin" }),
5894
6261
  t("composer.fileMentions.loading")
5895
- ] }) : error ? /* @__PURE__ */ jsx16(PaletteMessage, { role: "alert", children: error }) : visibleFiles.length === 0 ? /* @__PURE__ */ jsx16(PaletteMessage, { children: t("composer.fileMentions.empty") }) : visibleFiles.map((file, index) => {
6262
+ ] }) : error ? /* @__PURE__ */ jsx17(PaletteMessage, { role: "alert", children: error }) : visibleFiles.length === 0 ? /* @__PURE__ */ jsx17(PaletteMessage, { children: t("composer.fileMentions.empty") }) : visibleFiles.map((file, index) => {
5896
6263
  const filePath = getWorkspaceFilePath(file);
5897
6264
  const label = file.filePath || filePath;
5898
- return /* @__PURE__ */ jsxs7(
6265
+ return /* @__PURE__ */ jsxs8(
5899
6266
  "button",
5900
6267
  {
5901
6268
  ref: (node) => {
@@ -5916,10 +6283,10 @@ var WorkspaceFileMentionPalette = React14.forwardRef(function WorkspaceFileMenti
5916
6283
  index === activeIndex && "bg-muted"
5917
6284
  ),
5918
6285
  children: [
5919
- /* @__PURE__ */ jsx16("span", { className: "flex size-8 shrink-0 items-center justify-center rounded-md bg-background text-muted-foreground", children: /* @__PURE__ */ jsx16(FileText2, { className: "size-4" }) }),
5920
- /* @__PURE__ */ jsxs7("span", { className: "min-w-0 flex-1", children: [
5921
- /* @__PURE__ */ jsx16("span", { className: "block truncate font-medium", children: label }),
5922
- filePath || file.mimeType ? /* @__PURE__ */ jsx16("span", { className: "block truncate text-xs text-muted-foreground", children: filePath || file.mimeType }) : null
6286
+ /* @__PURE__ */ jsx17("span", { className: "flex size-8 shrink-0 items-center justify-center rounded-md bg-background text-muted-foreground", children: /* @__PURE__ */ jsx17(FileText2, { className: "size-4" }) }),
6287
+ /* @__PURE__ */ jsxs8("span", { className: "min-w-0 flex-1", children: [
6288
+ /* @__PURE__ */ jsx17("span", { className: "block truncate font-medium", children: label }),
6289
+ filePath || file.mimeType ? /* @__PURE__ */ jsx17("span", { className: "block truncate text-xs text-muted-foreground", children: filePath || file.mimeType }) : null
5923
6290
  ] })
5924
6291
  ]
5925
6292
  },
@@ -5934,7 +6301,7 @@ function PaletteMessage({
5934
6301
  children,
5935
6302
  role
5936
6303
  }) {
5937
- return /* @__PURE__ */ jsx16(
6304
+ return /* @__PURE__ */ jsx17(
5938
6305
  "div",
5939
6306
  {
5940
6307
  role,
@@ -5945,7 +6312,7 @@ function PaletteMessage({
5945
6312
  }
5946
6313
 
5947
6314
  // src/components/composer/ProjectSelector.tsx
5948
- import * as React16 from "react";
6315
+ import * as React17 from "react";
5949
6316
  import {
5950
6317
  Check as Check2,
5951
6318
  ChevronDown as ChevronDown2,
@@ -5959,16 +6326,16 @@ import {
5959
6326
  // src/components/ui/popover.tsx
5960
6327
  import "react";
5961
6328
  import * as PopoverPrimitive from "@radix-ui/react-popover";
5962
- import { jsx as jsx17 } from "react/jsx-runtime";
6329
+ import { jsx as jsx18 } from "react/jsx-runtime";
5963
6330
  function Popover({
5964
6331
  ...props
5965
6332
  }) {
5966
- return /* @__PURE__ */ jsx17(PopoverPrimitive.Root, { "data-slot": "popover", ...props });
6333
+ return /* @__PURE__ */ jsx18(PopoverPrimitive.Root, { "data-slot": "popover", ...props });
5967
6334
  }
5968
6335
  function PopoverTrigger({
5969
6336
  ...props
5970
6337
  }) {
5971
- return /* @__PURE__ */ jsx17(PopoverPrimitive.Trigger, { "data-slot": "popover-trigger", ...props });
6338
+ return /* @__PURE__ */ jsx18(PopoverPrimitive.Trigger, { "data-slot": "popover-trigger", ...props });
5972
6339
  }
5973
6340
  function PopoverContent({
5974
6341
  className,
@@ -5976,7 +6343,7 @@ function PopoverContent({
5976
6343
  sideOffset = 4,
5977
6344
  ...props
5978
6345
  }) {
5979
- return /* @__PURE__ */ jsx17(PopoverPrimitive.Portal, { children: /* @__PURE__ */ jsx17(
6346
+ return /* @__PURE__ */ jsx18(PopoverPrimitive.Portal, { children: /* @__PURE__ */ jsx18(
5980
6347
  PopoverPrimitive.Content,
5981
6348
  {
5982
6349
  "data-slot": "popover-content",
@@ -5992,7 +6359,7 @@ function PopoverContent({
5992
6359
  }
5993
6360
 
5994
6361
  // src/components/composer/ProjectSelector.tsx
5995
- import { Fragment, jsx as jsx18, jsxs as jsxs8 } from "react/jsx-runtime";
6362
+ import { Fragment as Fragment2, jsx as jsx19, jsxs as jsxs9 } from "react/jsx-runtime";
5996
6363
  var PROJECT_PAGE_SIZE = 100;
5997
6364
  async function listAllAvailableProjects(projectsClient, xpertId, signal) {
5998
6365
  const projects = [];
@@ -6026,20 +6393,20 @@ function ProjectSelector({
6026
6393
  }) {
6027
6394
  const { t } = useChatkitTranslation();
6028
6395
  const { theme } = useTheme();
6029
- const [open, setOpen] = React16.useState(false);
6030
- const [query, setQuery] = React16.useState("");
6031
- const [createMode, setCreateMode] = React16.useState(false);
6032
- const [newProjectName, setNewProjectName] = React16.useState("");
6033
- const [projects, setProjects] = React16.useState([]);
6034
- const [loadFailed, setLoadFailed] = React16.useState(false);
6035
- const [loadedFor, setLoadedFor] = React16.useState(null);
6396
+ const [open, setOpen] = React17.useState(false);
6397
+ const [query, setQuery] = React17.useState("");
6398
+ const [createMode, setCreateMode] = React17.useState(false);
6399
+ const [newProjectName, setNewProjectName] = React17.useState("");
6400
+ const [projects, setProjects] = React17.useState([]);
6401
+ const [loadFailed, setLoadFailed] = React17.useState(false);
6402
+ const [loadedFor, setLoadedFor] = React17.useState(null);
6036
6403
  const panelRoundedClass = getPanelRoundedClass(theme.radius);
6037
6404
  const menuItemRoundedClass = getMenuItemRoundedClass(theme.radius);
6038
6405
  const lockedProjectLabel = label?.trim();
6039
- React16.useEffect(() => {
6406
+ React17.useEffect(() => {
6040
6407
  if (disabled) setOpen(false);
6041
6408
  }, [disabled]);
6042
- React16.useEffect(() => {
6409
+ React17.useEffect(() => {
6043
6410
  if (locked) {
6044
6411
  setProjects([]);
6045
6412
  setLoadFailed(false);
@@ -6079,12 +6446,12 @@ function ProjectSelector({
6079
6446
  });
6080
6447
  return () => controller.abort();
6081
6448
  }, [client, locked, xpertId]);
6082
- const activeProject = React16.useMemo(
6449
+ const activeProject = React17.useMemo(
6083
6450
  () => projects.find((project) => project.id === activeProjectId) ?? null,
6084
6451
  [activeProjectId, projects]
6085
6452
  );
6086
6453
  const normalizedQuery = query.trim().toLocaleLowerCase();
6087
- const filteredProjects = React16.useMemo(
6454
+ const filteredProjects = React17.useMemo(
6088
6455
  () => projects.filter((project) => {
6089
6456
  if (!normalizedQuery) return true;
6090
6457
  return project.name.toLocaleLowerCase().includes(normalizedQuery);
@@ -6094,24 +6461,24 @@ function ProjectSelector({
6094
6461
  const hasAvailableProjects = locked ? Boolean(activeProjectId) : loadedFor?.client === client && loadedFor.xpertId === xpertId && !loadFailed && projects.length > 0;
6095
6462
  const projectRailAvailable = hasAvailableProjects || Boolean(onProjectCreate);
6096
6463
  const isLoadingProjects = !locked && Boolean(client && xpertId) && loadedFor === null && !loadFailed;
6097
- React16.useEffect(() => {
6464
+ React17.useEffect(() => {
6098
6465
  onAvailabilityChange?.(projectRailAvailable);
6099
6466
  }, [onAvailabilityChange, projectRailAvailable]);
6100
6467
  if (locked && activeProjectId) {
6101
- return /* @__PURE__ */ jsx18(
6468
+ return /* @__PURE__ */ jsx19(
6102
6469
  "div",
6103
6470
  {
6104
6471
  "data-slot": "composer-project-rail",
6105
6472
  className: "flex h-10 min-w-0 items-center px-1",
6106
- children: /* @__PURE__ */ jsxs8(
6473
+ children: /* @__PURE__ */ jsxs9(
6107
6474
  "div",
6108
6475
  {
6109
6476
  "data-slot": "composer-project-locked",
6110
6477
  className: "inline-flex h-5 max-w-full items-center gap-1.5 rounded-sm px-2 text-sm text-muted-foreground",
6111
6478
  title: lockedProjectLabel || activeProjectId,
6112
6479
  children: [
6113
- /* @__PURE__ */ jsx18(FolderLock, { className: "size-3.5 shrink-0" }),
6114
- /* @__PURE__ */ jsx18("span", { className: "truncate", children: lockedProjectLabel || activeProjectId })
6480
+ /* @__PURE__ */ jsx19(FolderLock, { className: "size-3.5 shrink-0" }),
6481
+ /* @__PURE__ */ jsx19("span", { className: "truncate", children: lockedProjectLabel || activeProjectId })
6115
6482
  ]
6116
6483
  }
6117
6484
  )
@@ -6119,12 +6486,12 @@ function ProjectSelector({
6119
6486
  );
6120
6487
  }
6121
6488
  if (!projectRailAvailable) return null;
6122
- return /* @__PURE__ */ jsx18(
6489
+ return /* @__PURE__ */ jsx19(
6123
6490
  "div",
6124
6491
  {
6125
6492
  "data-slot": "composer-project-rail",
6126
6493
  className: "flex h-10 min-w-0 items-center px-1",
6127
- children: /* @__PURE__ */ jsxs8(
6494
+ children: /* @__PURE__ */ jsxs9(
6128
6495
  Popover,
6129
6496
  {
6130
6497
  open,
@@ -6137,7 +6504,7 @@ function ProjectSelector({
6137
6504
  }
6138
6505
  },
6139
6506
  children: [
6140
- /* @__PURE__ */ jsx18(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxs8(
6507
+ /* @__PURE__ */ jsx19(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxs9(
6141
6508
  "button",
6142
6509
  {
6143
6510
  type: "button",
@@ -6145,13 +6512,13 @@ function ProjectSelector({
6145
6512
  className: "inline-flex h-5 max-w-full items-center gap-1.5 rounded-sm px-2 text-sm text-muted-foreground outline-none transition-colors hover:bg-accent hover:text-accent-foreground focus-visible:ring-2 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",
6146
6513
  "aria-label": t("composer.projects.select"),
6147
6514
  children: [
6148
- /* @__PURE__ */ jsx18(Folder, { className: "size-3.5 shrink-0" }),
6149
- /* @__PURE__ */ jsx18("span", { className: "truncate", children: activeProject?.name ?? t("composer.projects.select") }),
6150
- /* @__PURE__ */ jsx18(ChevronDown2, { className: "size-3.5 shrink-0" })
6515
+ /* @__PURE__ */ jsx19(Folder, { className: "size-3.5 shrink-0" }),
6516
+ /* @__PURE__ */ jsx19("span", { className: "truncate", children: activeProject?.name ?? t("composer.projects.select") }),
6517
+ /* @__PURE__ */ jsx19(ChevronDown2, { className: "size-3.5 shrink-0" })
6151
6518
  ]
6152
6519
  }
6153
6520
  ) }),
6154
- /* @__PURE__ */ jsx18(
6521
+ /* @__PURE__ */ jsx19(
6155
6522
  PopoverContent,
6156
6523
  {
6157
6524
  side: "top",
@@ -6159,15 +6526,15 @@ function ProjectSelector({
6159
6526
  sideOffset: 8,
6160
6527
  collisionPadding: 8,
6161
6528
  className: cn(
6162
- "w-64 max-w-[calc(100vw-1rem)] overflow-hidden border-0 bg-popover p-1 text-popover-foreground shadow-md ring-1 ring-foreground/10",
6529
+ "flex max-h-(--radix-popover-content-available-height) w-64 max-w-[calc(100vw-1rem)] overflow-hidden border-0 bg-popover p-1 text-popover-foreground shadow-md ring-1 ring-foreground/10",
6163
6530
  panelRoundedClass
6164
6531
  ),
6165
- children: /* @__PURE__ */ jsx18(
6532
+ children: /* @__PURE__ */ jsx19(
6166
6533
  "div",
6167
6534
  {
6168
6535
  "data-slot": "composer-project-command",
6169
- className: "flex size-full flex-col overflow-hidden",
6170
- children: createMode ? /* @__PURE__ */ jsxs8(
6536
+ className: "flex min-h-0 w-full flex-col overflow-hidden",
6537
+ children: createMode ? /* @__PURE__ */ jsxs9(
6171
6538
  "form",
6172
6539
  {
6173
6540
  "data-slot": "composer-project-create-form",
@@ -6180,7 +6547,7 @@ function ProjectSelector({
6180
6547
  setOpen(false);
6181
6548
  },
6182
6549
  children: [
6183
- /* @__PURE__ */ jsx18(
6550
+ /* @__PURE__ */ jsx19(
6184
6551
  Input,
6185
6552
  {
6186
6553
  autoFocus: true,
@@ -6195,8 +6562,8 @@ function ProjectSelector({
6195
6562
  )
6196
6563
  }
6197
6564
  ),
6198
- /* @__PURE__ */ jsxs8("div", { className: "flex justify-end gap-2", children: [
6199
- /* @__PURE__ */ jsx18(
6565
+ /* @__PURE__ */ jsxs9("div", { className: "flex justify-end gap-2", children: [
6566
+ /* @__PURE__ */ jsx19(
6200
6567
  "button",
6201
6568
  {
6202
6569
  type: "button",
@@ -6208,7 +6575,7 @@ function ProjectSelector({
6208
6575
  children: t("composer.projects.cancel")
6209
6576
  }
6210
6577
  ),
6211
- /* @__PURE__ */ jsx18(
6578
+ /* @__PURE__ */ jsx19(
6212
6579
  "button",
6213
6580
  {
6214
6581
  type: "submit",
@@ -6220,15 +6587,15 @@ function ProjectSelector({
6220
6587
  ] })
6221
6588
  ]
6222
6589
  }
6223
- ) : /* @__PURE__ */ jsxs8(Fragment, { children: [
6224
- /* @__PURE__ */ jsxs8(
6590
+ ) : /* @__PURE__ */ jsxs9(Fragment2, { children: [
6591
+ /* @__PURE__ */ jsxs9(
6225
6592
  "div",
6226
6593
  {
6227
6594
  "data-slot": "composer-project-search",
6228
- className: "relative mb-2",
6595
+ className: "relative mb-2 shrink-0",
6229
6596
  children: [
6230
- /* @__PURE__ */ jsx18(Search3, { className: "pointer-events-none absolute left-3 top-1/2 z-10 size-4 -translate-y-1/2 text-muted-foreground" }),
6231
- /* @__PURE__ */ jsx18(
6597
+ /* @__PURE__ */ jsx19(Search3, { className: "pointer-events-none absolute left-3 top-1/2 z-10 size-4 -translate-y-1/2 text-muted-foreground" }),
6598
+ /* @__PURE__ */ jsx19(
6232
6599
  Input,
6233
6600
  {
6234
6601
  autoFocus: true,
@@ -6244,70 +6611,77 @@ function ProjectSelector({
6244
6611
  ]
6245
6612
  }
6246
6613
  ),
6247
- /* @__PURE__ */ jsx18(ScrollArea, { className: "max-h-75", children: /* @__PURE__ */ jsxs8(
6614
+ /* @__PURE__ */ jsx19(
6248
6615
  "div",
6249
6616
  {
6250
- "data-slot": "composer-project-list",
6251
- className: "flex flex-col",
6252
- children: [
6253
- activeProjectId && !normalizedQuery ? /* @__PURE__ */ jsxs8(
6254
- "button",
6255
- {
6256
- type: "button",
6257
- "data-slot": "composer-project-clear",
6258
- className: cn(
6259
- "relative flex w-full cursor-default select-none items-center gap-3 px-1.5 py-1.5 text-left text-base outline-none hover:bg-accent hover:text-accent-foreground focus-visible:bg-accent focus-visible:text-accent-foreground",
6260
- menuItemRoundedClass
6261
- ),
6262
- onClick: () => {
6263
- if (disabled) return;
6264
- onProjectChange?.(null);
6265
- setOpen(false);
6266
- },
6267
- children: [
6268
- /* @__PURE__ */ jsx18(FolderX, { className: "size-5 shrink-0 text-muted-foreground" }),
6269
- /* @__PURE__ */ jsx18("span", { className: "min-w-0 flex-1 truncate font-normal", children: t("composer.projects.none") })
6270
- ]
6271
- }
6272
- ) : null,
6273
- isLoadingProjects ? /* @__PURE__ */ jsx18(ProjectMessage, { children: t("composer.projects.loading") }) : loadFailed ? /* @__PURE__ */ jsx18(ProjectMessage, { children: t("composer.projects.loadError") }) : filteredProjects.length === 0 ? /* @__PURE__ */ jsx18(ProjectMessage, { children: t("composer.projects.empty") }) : filteredProjects.map((project) => /* @__PURE__ */ jsxs8(
6274
- "button",
6275
- {
6276
- type: "button",
6277
- "data-slot": "composer-project-item",
6278
- className: cn(
6279
- "relative flex w-full cursor-default select-none items-center gap-3 px-1.5 py-1.5 text-left text-base outline-none hover:bg-accent hover:text-accent-foreground focus-visible:bg-accent focus-visible:text-accent-foreground",
6280
- menuItemRoundedClass,
6281
- project.id === activeProjectId && "bg-accent text-accent-foreground"
6282
- ),
6283
- onClick: () => {
6284
- if (disabled) return;
6285
- if (project.id !== activeProjectId) {
6286
- onProjectChange?.(project.id);
6617
+ "data-slot": "composer-project-scroll-region",
6618
+ className: "min-h-0 flex-1 max-h-75 overflow-y-auto overscroll-contain",
6619
+ children: /* @__PURE__ */ jsxs9(
6620
+ "div",
6621
+ {
6622
+ "data-slot": "composer-project-list",
6623
+ className: "flex flex-col",
6624
+ children: [
6625
+ activeProjectId && !normalizedQuery ? /* @__PURE__ */ jsxs9(
6626
+ "button",
6627
+ {
6628
+ type: "button",
6629
+ "data-slot": "composer-project-clear",
6630
+ className: cn(
6631
+ "relative flex w-full cursor-default select-none items-center gap-3 px-1.5 py-1.5 text-left text-base outline-none hover:bg-accent hover:text-accent-foreground focus-visible:bg-accent focus-visible:text-accent-foreground",
6632
+ menuItemRoundedClass
6633
+ ),
6634
+ onClick: () => {
6635
+ if (disabled) return;
6636
+ onProjectChange?.(null);
6637
+ setOpen(false);
6638
+ },
6639
+ children: [
6640
+ /* @__PURE__ */ jsx19(FolderX, { className: "size-5 shrink-0 text-muted-foreground" }),
6641
+ /* @__PURE__ */ jsx19("span", { className: "min-w-0 flex-1 truncate font-normal", children: t("composer.projects.none") })
6642
+ ]
6287
6643
  }
6288
- setOpen(false);
6289
- },
6290
- children: [
6291
- /* @__PURE__ */ jsx18(Folder, { className: "size-5 shrink-0 text-muted-foreground" }),
6292
- /* @__PURE__ */ jsx18("span", { className: "min-w-0 flex-1 truncate font-normal", children: project.name }),
6293
- project.id === activeProjectId ? /* @__PURE__ */ jsx18(Check2, { className: "size-4 shrink-0" }) : null
6294
- ]
6295
- },
6296
- project.id
6297
- ))
6298
- ]
6644
+ ) : null,
6645
+ isLoadingProjects ? /* @__PURE__ */ jsx19(ProjectMessage, { children: t("composer.projects.loading") }) : loadFailed ? /* @__PURE__ */ jsx19(ProjectMessage, { children: t("composer.projects.loadError") }) : filteredProjects.length === 0 ? /* @__PURE__ */ jsx19(ProjectMessage, { children: t("composer.projects.empty") }) : filteredProjects.map((project) => /* @__PURE__ */ jsxs9(
6646
+ "button",
6647
+ {
6648
+ type: "button",
6649
+ "data-slot": "composer-project-item",
6650
+ className: cn(
6651
+ "relative flex w-full cursor-default select-none items-center gap-3 px-1.5 py-1.5 text-left text-base outline-none hover:bg-accent hover:text-accent-foreground focus-visible:bg-accent focus-visible:text-accent-foreground",
6652
+ menuItemRoundedClass,
6653
+ project.id === activeProjectId && "bg-accent text-accent-foreground"
6654
+ ),
6655
+ onClick: () => {
6656
+ if (disabled) return;
6657
+ if (project.id !== activeProjectId) {
6658
+ onProjectChange?.(project.id);
6659
+ }
6660
+ setOpen(false);
6661
+ },
6662
+ children: [
6663
+ /* @__PURE__ */ jsx19(Folder, { className: "size-5 shrink-0 text-muted-foreground" }),
6664
+ /* @__PURE__ */ jsx19("span", { className: "min-w-0 flex-1 truncate font-normal", children: project.name }),
6665
+ project.id === activeProjectId ? /* @__PURE__ */ jsx19(Check2, { className: "size-4 shrink-0" }) : null
6666
+ ]
6667
+ },
6668
+ project.id
6669
+ ))
6670
+ ]
6671
+ }
6672
+ )
6299
6673
  }
6300
- ) }),
6301
- onProjectCreate ? /* @__PURE__ */ jsxs8(
6674
+ ),
6675
+ onProjectCreate ? /* @__PURE__ */ jsxs9(
6302
6676
  "button",
6303
6677
  {
6304
6678
  type: "button",
6305
6679
  "data-slot": "composer-project-create",
6306
- className: "mt-1 flex w-full items-center gap-3 border-t border-border px-1.5 py-1.5 text-left text-sm font-normal outline-none hover:bg-accent hover:text-accent-foreground focus-visible:bg-accent focus-visible:text-accent-foreground",
6680
+ className: "mt-1 flex w-full shrink-0 items-center gap-3 border-t border-border px-1.5 py-1.5 text-left text-sm font-normal outline-none hover:bg-accent hover:text-accent-foreground focus-visible:bg-accent focus-visible:text-accent-foreground",
6307
6681
  onClick: () => setCreateMode(true),
6308
6682
  children: [
6309
- /* @__PURE__ */ jsx18(Plus2, { className: "size-4 shrink-0" }),
6310
- /* @__PURE__ */ jsx18("span", { children: t("composer.projects.new") })
6683
+ /* @__PURE__ */ jsx19(Plus2, { className: "size-4 shrink-0" }),
6684
+ /* @__PURE__ */ jsx19("span", { children: t("composer.projects.new") })
6311
6685
  ]
6312
6686
  }
6313
6687
  ) : null
@@ -6323,77 +6697,11 @@ function ProjectSelector({
6323
6697
  );
6324
6698
  }
6325
6699
  function ProjectMessage({ children }) {
6326
- return /* @__PURE__ */ jsx18("div", { className: "flex min-h-24 items-center justify-center px-4 text-center text-sm text-muted-foreground", children });
6700
+ return /* @__PURE__ */ jsx19("div", { className: "flex min-h-24 items-center justify-center px-4 text-center text-sm text-muted-foreground", children });
6327
6701
  }
6328
6702
 
6329
6703
  // src/components/composer/SendButton.tsx
6330
6704
  import { ArrowUp, Square } from "lucide-react";
6331
-
6332
- // src/components/ui/tooltip.tsx
6333
- import "react";
6334
- import * as TooltipPrimitive from "@radix-ui/react-tooltip";
6335
- import { jsx as jsx19, jsxs as jsxs9 } from "react/jsx-runtime";
6336
- function TooltipProvider({
6337
- delayDuration = 0,
6338
- ...props
6339
- }) {
6340
- return /* @__PURE__ */ jsx19(
6341
- TooltipPrimitive.Provider,
6342
- {
6343
- "data-slot": "tooltip-provider",
6344
- delayDuration,
6345
- ...props
6346
- }
6347
- );
6348
- }
6349
- function Tooltip({
6350
- ...props
6351
- }) {
6352
- return /* @__PURE__ */ jsx19(TooltipProvider, { children: /* @__PURE__ */ jsx19(
6353
- TooltipPrimitive.Root,
6354
- {
6355
- "data-slot": "tooltip",
6356
- ...props
6357
- }
6358
- ) });
6359
- }
6360
- function TooltipTrigger({
6361
- ...props
6362
- }) {
6363
- return /* @__PURE__ */ jsx19(
6364
- TooltipPrimitive.Trigger,
6365
- {
6366
- "data-slot": "tooltip-trigger",
6367
- ...props
6368
- }
6369
- );
6370
- }
6371
- function TooltipContent({
6372
- className,
6373
- sideOffset = 0,
6374
- hideArrow = false,
6375
- children,
6376
- ...props
6377
- }) {
6378
- return /* @__PURE__ */ jsx19(TooltipPrimitive.Portal, { children: /* @__PURE__ */ jsxs9(
6379
- TooltipPrimitive.Content,
6380
- {
6381
- "data-slot": "tooltip-content",
6382
- sideOffset,
6383
- className: cn(
6384
- "bg-primary text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit rounded-md px-3 py-1.5 text-xs text-balance",
6385
- className
6386
- ),
6387
- ...props,
6388
- children: [
6389
- children,
6390
- !hideArrow ? /* @__PURE__ */ jsx19(TooltipPrimitive.Arrow, { className: "bg-primary fill-primary z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]" }) : null
6391
- ]
6392
- }
6393
- ) });
6394
- }
6395
-
6396
- // src/components/composer/SendButton.tsx
6397
6705
  import { jsx as jsx20, jsxs as jsxs10 } from "react/jsx-runtime";
6398
6706
  function SendButton({
6399
6707
  disabled = false,
@@ -6926,7 +7234,7 @@ import * as React21 from "react";
6926
7234
  import {
6927
7235
  CornerDownLeft,
6928
7236
  Ellipsis,
6929
- Info,
7237
+ Info as Info2,
6930
7238
  PencilLine,
6931
7239
  Trash2 as Trash22
6932
7240
  } from "lucide-react";
@@ -7117,7 +7425,7 @@ function PendingFollowUps({
7117
7425
  ] })
7118
7426
  ] }),
7119
7427
  /* @__PURE__ */ jsxs14("div", { className: "flex items-center gap-1.5 text-[10px] leading-4 text-muted-foreground", children: [
7120
- /* @__PURE__ */ jsx24(Info, { className: "h-3 w-3 shrink-0" }),
7428
+ /* @__PURE__ */ jsx24(Info2, { className: "h-3 w-3 shrink-0" }),
7121
7429
  /* @__PURE__ */ jsx24("span", { className: "truncate", children: item.mode === "queue" ? canSendItemNow ? t("chat.followUps.manualQueueHint") : t("chat.followUps.queueHint") : t("chat.followUps.steerHint") })
7122
7430
  ] })
7123
7431
  ] })
@@ -8347,7 +8655,7 @@ import {
8347
8655
  ChevronLeft as ChevronLeft2,
8348
8656
  ChevronRight as ChevronRight5,
8349
8657
  CornerDownLeft as CornerDownLeft3,
8350
- Info as Info2
8658
+ Info as Info3
8351
8659
  } from "lucide-react";
8352
8660
  import { jsx as jsx29, jsxs as jsxs19 } from "react/jsx-runtime";
8353
8661
  var emptyQuestions = [];
@@ -8844,7 +9152,7 @@ function RequestUserInputPanel({
8844
9152
  "aria-label": t("composer.requestUserInput.optionInfo", {
8845
9153
  label: parsedLabel.label
8846
9154
  }),
8847
- children: /* @__PURE__ */ jsx29(Info2, { className: "h-3.5 w-3.5" })
9155
+ children: /* @__PURE__ */ jsx29(Info3, { className: "h-3.5 w-3.5" })
8848
9156
  }
8849
9157
  ) }),
8850
9158
  /* @__PURE__ */ jsx29(
@@ -9190,7 +9498,7 @@ function useConversationSummaryEvent({
9190
9498
  // src/components/chat/attachments.tsx
9191
9499
  import * as React28 from "react";
9192
9500
  import { FileText as FileText3, Loader2 as Loader24, RefreshCw as RefreshCw2, X as X5 } from "lucide-react";
9193
- import { Fragment as Fragment3, jsx as jsx30, jsxs as jsxs20 } from "react/jsx-runtime";
9501
+ import { Fragment as Fragment4, jsx as jsx30, jsxs as jsxs20 } from "react/jsx-runtime";
9194
9502
  var ACTIVE_PARSE_STATUSES = /* @__PURE__ */ new Set([
9195
9503
  "uploaded",
9196
9504
  "scanning",
@@ -9500,7 +9808,7 @@ var ChatAttachments = React28.forwardRef(function ChatAttachments2({
9500
9808
  }
9501
9809
  );
9502
9810
  }
9503
- return /* @__PURE__ */ jsxs20(Fragment3, { children: [
9811
+ return /* @__PURE__ */ jsxs20(Fragment4, { children: [
9504
9812
  /* @__PURE__ */ jsx30(
9505
9813
  "input",
9506
9814
  {
@@ -11357,7 +11665,7 @@ var TooltipIconButton = forwardRef11(({ children, tooltip, side = "bottom", clas
11357
11665
  TooltipIconButton.displayName = "TooltipIconButton";
11358
11666
 
11359
11667
  // src/components/thread/mermaid-block.tsx
11360
- import { Fragment as Fragment4, jsx as jsx38, jsxs as jsxs23 } from "react/jsx-runtime";
11668
+ import { Fragment as Fragment5, jsx as jsx38, jsxs as jsxs23 } from "react/jsx-runtime";
11361
11669
  var HEX_COLOR_PATTERN = /^#([\da-f]{3,8})$/i;
11362
11670
  var MERMAID_DIRECTIVE_PATTERN = /%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi;
11363
11671
  var MERMAID_FRONTMATTER_PATTERN = /^-{3}\s*[\n\r](.*?)[\n\r]-{3}\s*[\n\r]+/s;
@@ -11729,7 +12037,7 @@ function MermaidBlock({ code }) {
11729
12037
  }, [clearCopyResetTimeout, code, isCopied]);
11730
12038
  const hasRenderedDiagram = svgMarkup !== null && !renderError;
11731
12039
  const statusMessage = isRendering ? t("markdown.mermaid.rendering") : t("markdown.mermaid.failed");
11732
- return /* @__PURE__ */ jsxs23(Fragment4, { children: [
12040
+ return /* @__PURE__ */ jsxs23(Fragment5, { children: [
11733
12041
  /* @__PURE__ */ jsx38(
11734
12042
  Tabs,
11735
12043
  {
@@ -11847,7 +12155,7 @@ function MermaidBlock({ code }) {
11847
12155
 
11848
12156
  // src/components/thread/markdown-text.tsx
11849
12157
  import "katex/dist/katex.min.css";
11850
- import { Fragment as Fragment5, jsx as jsx39, jsxs as jsxs24 } from "react/jsx-runtime";
12158
+ import { Fragment as Fragment6, jsx as jsx39, jsxs as jsxs24 } from "react/jsx-runtime";
11851
12159
  var markdownTableMinWidth = "max(7rem, calc(8rem * var(--density-spacing, 1)))";
11852
12160
  var markdownTableCellPaddingInline = "calc(var(--density-padding, 1rem) * 1.25)";
11853
12161
  var markdownTableCellPaddingBlock = "max(0.5rem, calc(var(--density-padding, 1rem) * 0.75))";
@@ -12335,7 +12643,7 @@ var defaultComponents = {
12335
12643
  ...stripMarkdownNode(props)
12336
12644
  }
12337
12645
  ),
12338
- pre: ({ className, children }) => Children.toArray(children).length === 1 && (isMermaidBlockChild(Children.toArray(children)[0]) || isMermaidCodeElement(Children.toArray(children)[0])) ? /* @__PURE__ */ jsx39(Fragment5, { children }) : /* @__PURE__ */ jsx39(
12646
+ pre: ({ className, children }) => Children.toArray(children).length === 1 && (isMermaidBlockChild(Children.toArray(children)[0]) || isMermaidCodeElement(Children.toArray(children)[0])) ? /* @__PURE__ */ jsx39(Fragment6, { children }) : /* @__PURE__ */ jsx39(
12339
12647
  "div",
12340
12648
  {
12341
12649
  className: cn(
@@ -12360,7 +12668,7 @@ var defaultComponents = {
12360
12668
  if (language === "mermaid") {
12361
12669
  return /* @__PURE__ */ jsx39(MermaidBlock, { code: normalizedCode });
12362
12670
  }
12363
- return /* @__PURE__ */ jsxs24(Fragment5, { children: [
12671
+ return /* @__PURE__ */ jsxs24(Fragment6, { children: [
12364
12672
  /* @__PURE__ */ jsx39(CodeHeader, { language, code: normalizedCode }),
12365
12673
  /* @__PURE__ */ jsx39(SyntaxHighlighter, { language, className, children: normalizedCode })
12366
12674
  ] });
@@ -12412,13 +12720,13 @@ import {
12412
12720
  ChevronRight as ChevronRight6,
12413
12721
  Clock3,
12414
12722
  GitBranch,
12415
- Info as Info3,
12723
+ Info as Info4,
12416
12724
  Loader2 as Loader26,
12417
12725
  MessageSquareText,
12418
12726
  Wrench,
12419
12727
  XCircle
12420
12728
  } from "lucide-react";
12421
- import { Fragment as Fragment6, jsx as jsx40, jsxs as jsxs25 } from "react/jsx-runtime";
12729
+ import { Fragment as Fragment7, jsx as jsx40, jsxs as jsxs25 } from "react/jsx-runtime";
12422
12730
  function safeJson2(value) {
12423
12731
  try {
12424
12732
  return JSON.stringify(value, null, 2);
@@ -12502,7 +12810,7 @@ function MiddlewareEventRow({ content }) {
12502
12810
  }
12503
12811
  ),
12504
12812
  /* @__PURE__ */ jsx40("span", { className: "min-w-0 truncate font-medium", children: label }),
12505
- detail ? /* @__PURE__ */ jsxs25(Fragment6, { children: [
12813
+ detail ? /* @__PURE__ */ jsxs25(Fragment7, { children: [
12506
12814
  /* @__PURE__ */ jsx40("span", { className: "text-muted-foreground/50", children: "\xB7" }),
12507
12815
  /* @__PURE__ */ jsx40("span", { className: "min-w-0 truncate", children: detail })
12508
12816
  ] }) : null
@@ -12619,7 +12927,7 @@ function AgentEventRow({ content }) {
12619
12927
  isError ? "bg-destructive/10 text-destructive" : "bg-muted/40 text-muted-foreground"
12620
12928
  ),
12621
12929
  children: [
12622
- /* @__PURE__ */ jsx40(Info3, { className: "mt-0.5 h-3.5 w-3.5 shrink-0" }),
12930
+ /* @__PURE__ */ jsx40(Info4, { className: "mt-0.5 h-3.5 w-3.5 shrink-0" }),
12623
12931
  /* @__PURE__ */ jsxs25("div", { className: "min-w-0 flex-1", children: [
12624
12932
  /* @__PURE__ */ jsx40("div", { className: "truncate font-medium", children: label }),
12625
12933
  detail ? /* @__PURE__ */ jsx40("div", { className: "wrap-break-word", children: detail }) : null,
@@ -12696,7 +13004,7 @@ function AgentRunGroup({
12696
13004
  )
12697
13005
  } : null,
12698
13006
  counts.events > 0 ? {
12699
- icon: Info3,
13007
+ icon: Info4,
12700
13008
  count: counts.events,
12701
13009
  label: t(
12702
13010
  `message.agentRun.counts.events.${counts.events === 1 ? "one" : "other"}`,
@@ -13817,7 +14125,7 @@ function ToolOutputAttachments({
13817
14125
  }
13818
14126
 
13819
14127
  // src/components/thread/messages/tool-component-group.tsx
13820
- import { Fragment as Fragment7, jsx as jsx46, jsxs as jsxs31 } from "react/jsx-runtime";
14128
+ import { Fragment as Fragment8, jsx as jsx46, jsxs as jsxs31 } from "react/jsx-runtime";
13821
14129
  var toolStatusConfig = {
13822
14130
  success: {
13823
14131
  iconClass: "border-green-500 text-green-700",
@@ -14459,7 +14767,7 @@ function ToolCallDetails({ content }) {
14459
14767
  return /* @__PURE__ */ jsxs31("div", { className: "ml-6 mt-1 max-h-60 overflow-auto rounded-md bg-muted/30 px-3 py-2 text-xs text-muted-foreground", children: [
14460
14768
  hasInput && /* @__PURE__ */ jsxs31("div", { className: "space-y-1", children: [
14461
14769
  /* @__PURE__ */ jsxs31("div", { className: "flex min-w-0 items-baseline gap-1 text-[11px] font-medium text-muted-foreground", children: [
14462
- toolName ? /* @__PURE__ */ jsxs31(Fragment7, { children: [
14770
+ toolName ? /* @__PURE__ */ jsxs31(Fragment8, { children: [
14463
14771
  /* @__PURE__ */ jsx46("span", { className: "min-w-0 break-all font-mono text-foreground/80", children: toolName }),
14464
14772
  /* @__PURE__ */ jsx46("span", { "aria-hidden": "true", children: "\xB7" })
14465
14773
  ] }) : null,
@@ -15355,7 +15663,7 @@ function clickDownload(uri, filename) {
15355
15663
  }
15356
15664
 
15357
15665
  // src/components/thread/messages/mcp-app.tsx
15358
- import { Fragment as Fragment8, jsx as jsx49, jsxs as jsxs33 } from "react/jsx-runtime";
15666
+ import { Fragment as Fragment9, jsx as jsx49, jsxs as jsxs33 } from "react/jsx-runtime";
15359
15667
  var EMPTY_INPUT_SCHEMA = {
15360
15668
  type: "object",
15361
15669
  properties: {}
@@ -16716,7 +17024,7 @@ function McpAppMessage({
16716
17024
  if (isTornDown) {
16717
17025
  return null;
16718
17026
  }
16719
- return /* @__PURE__ */ jsxs33(Fragment8, { children: [
17027
+ return /* @__PURE__ */ jsxs33(Fragment9, { children: [
16720
17028
  displayMode === "fullscreen" ? /* @__PURE__ */ jsx49(
16721
17029
  "div",
16722
17030
  {
@@ -20534,7 +20842,8 @@ function useTaskSummary({
20534
20842
  enabled,
20535
20843
  conversationId,
20536
20844
  client,
20537
- live
20845
+ live,
20846
+ refreshVersion = 0
20538
20847
  }) {
20539
20848
  const [loaded, setLoaded] = React59.useState(null);
20540
20849
  const [historySections, setHistorySections] = React59.useState({});
@@ -20579,7 +20888,14 @@ function useTaskSummary({
20579
20888
  abortSectionRequests();
20580
20889
  requestVersionRef.current += 1;
20581
20890
  };
20582
- }, [abortSectionRequests, client, conversationId, enabled, retryVersion]);
20891
+ }, [
20892
+ abortSectionRequests,
20893
+ client,
20894
+ conversationId,
20895
+ enabled,
20896
+ refreshVersion,
20897
+ retryVersion
20898
+ ]);
20583
20899
  const snapshot = loaded?.conversationId === conversationId ? loaded.snapshot : null;
20584
20900
  const activeHistorySections = React59.useMemo(
20585
20901
  () => historySectionsConversationId === conversationId ? historySections : {},
@@ -20621,13 +20937,7 @@ function useTaskSummary({
20621
20937
  }
20622
20938
  }
20623
20939
  },
20624
- [
20625
- activeHistorySections,
20626
- client,
20627
- conversationId,
20628
- enabled,
20629
- loadingSections
20630
- ]
20940
+ [activeHistorySections, client, conversationId, enabled, loadingSections]
20631
20941
  );
20632
20942
  return {
20633
20943
  summary: mergeTaskSummary(snapshot, live, activeHistorySections),
@@ -20744,6 +21054,7 @@ function TaskSummaryContent({
20744
21054
  }) {
20745
21055
  const { t } = useChatkitTranslation();
20746
21056
  const [expanded, setExpanded] = React60.useState({});
21057
+ const [expandedLocal, setExpandedLocal] = React60.useState({});
20747
21058
  const hasTask = Boolean(
20748
21059
  summary.goal || summary.plan || summary.todos?.items.length
20749
21060
  );
@@ -20758,6 +21069,12 @@ function TaskSummaryContent({
20758
21069
  }
20759
21070
  };
20760
21071
  const sectionItems = (section, items) => expanded[section] ? items : items.slice(0, PREVIEW_SIZE);
21072
+ const localSectionItems = (section, items) => expandedLocal[section] ? items : items.slice(0, PREVIEW_SIZE);
21073
+ const localizedStatus = (status) => {
21074
+ if (!status) return void 0;
21075
+ const key = status.trim().toLowerCase().replace(/[\s-]+/g, "_");
21076
+ return t(`taskSummary.status.${key}`, { defaultValue: status });
21077
+ };
20761
21078
  const openSummaryItem = (resource, messageId, title) => {
20762
21079
  if (resource?.type === "message") {
20763
21080
  onNavigateMessage(resource.messageId);
@@ -20790,6 +21107,25 @@ function TaskSummaryContent({
20790
21107
  }
20791
21108
  );
20792
21109
  };
21110
+ const localSectionAction = (section, total2) => {
21111
+ if (total2 <= PREVIEW_SIZE) return null;
21112
+ const isExpanded = Boolean(expandedLocal[section]);
21113
+ return /* @__PURE__ */ jsxs45(
21114
+ "button",
21115
+ {
21116
+ type: "button",
21117
+ className: "mt-1 flex w-full items-center gap-2 rounded-lg px-2 py-1.5 text-left text-sm text-muted-foreground transition-colors hover:bg-muted/60 hover:text-foreground",
21118
+ onClick: () => setExpandedLocal((state) => ({
21119
+ ...state,
21120
+ [section]: !isExpanded
21121
+ })),
21122
+ children: [
21123
+ /* @__PURE__ */ jsx64(ListChecks3, { className: "size-3.5" }),
21124
+ isExpanded ? t("taskSummary.collapse") : t("taskSummary.viewAll", { count: total2 })
21125
+ ]
21126
+ }
21127
+ );
21128
+ };
20793
21129
  return /* @__PURE__ */ jsxs45("div", { className: "divide-y divide-border/70", children: [
20794
21130
  Boolean(historyError) && /* @__PURE__ */ jsxs45("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: [
20795
21131
  /* @__PURE__ */ jsx64("span", { children: t("taskSummary.historyError") }),
@@ -20806,52 +21142,41 @@ function TaskSummaryContent({
20806
21142
  }
20807
21143
  )
20808
21144
  ] }),
20809
- /* @__PURE__ */ jsxs45(
20810
- SummarySection,
20811
- {
20812
- title: t("taskSummary.sections.outputs"),
20813
- children: [
20814
- summary.outputs.length === 0 ? /* @__PURE__ */ jsx64(SummaryPrompt, { onClick: onFocusComposer, children: t("taskSummary.createOutput") }) : sectionItems("outputs", summary.outputs).map((item) => /* @__PURE__ */ jsx64(
20815
- SummaryButton,
20816
- {
20817
- title: item.title,
20818
- description: item.description ?? item.status,
20819
- leading: /* @__PURE__ */ jsx64(FileOutput, { className: "size-4" }),
20820
- trailing: item.resource && item.resource.type !== "message" ? /* @__PURE__ */ jsx64(ExternalLink, { className: "size-3.5" }) : void 0,
20821
- onClick: () => openSummaryItem(item.resource, item.messageId, item.title)
20822
- },
20823
- item.id
20824
- )),
20825
- sectionAction("outputs", summary.totals.outputs)
20826
- ]
20827
- }
20828
- ),
20829
- /* @__PURE__ */ jsxs45(
20830
- SummarySection,
20831
- {
20832
- title: t("taskSummary.sections.sources"),
20833
- children: [
20834
- sectionItems("sources", summary.sources).map((item) => /* @__PURE__ */ jsx64(
20835
- SummaryButton,
20836
- {
20837
- title: item.title,
20838
- description: item.description,
20839
- leading: /* @__PURE__ */ jsx64(BookOpen3, { className: "size-4" }),
20840
- trailing: item.resource && item.resource.type !== "message" ? /* @__PURE__ */ jsx64(ExternalLink, { className: "size-3.5" }) : void 0,
20841
- onClick: () => openSummaryItem(item.resource, item.messageId, item.title)
20842
- },
20843
- item.id
20844
- )),
20845
- sectionAction("sources", summary.totals.sources)
20846
- ]
20847
- }
20848
- ),
21145
+ /* @__PURE__ */ jsxs45(SummarySection, { title: t("taskSummary.sections.outputs"), children: [
21146
+ summary.outputs.length === 0 ? /* @__PURE__ */ jsx64(SummaryPrompt, { onClick: onFocusComposer, children: t("taskSummary.createOutput") }) : sectionItems("outputs", summary.outputs).map((item) => /* @__PURE__ */ jsx64(
21147
+ SummaryButton,
21148
+ {
21149
+ title: item.title,
21150
+ metadata: localizedStatus(item.status),
21151
+ description: item.description,
21152
+ leading: /* @__PURE__ */ jsx64(FileOutput, { className: "size-4" }),
21153
+ trailing: item.resource && item.resource.type !== "message" ? /* @__PURE__ */ jsx64(ExternalLink, { className: "size-3.5" }) : void 0,
21154
+ onClick: () => openSummaryItem(item.resource, item.messageId, item.title)
21155
+ },
21156
+ item.id
21157
+ )),
21158
+ sectionAction("outputs", summary.totals.outputs)
21159
+ ] }),
21160
+ /* @__PURE__ */ jsxs45(SummarySection, { title: t("taskSummary.sections.sources"), children: [
21161
+ sectionItems("sources", summary.sources).map((item) => /* @__PURE__ */ jsx64(
21162
+ SummaryButton,
21163
+ {
21164
+ title: item.title,
21165
+ description: item.description,
21166
+ leading: /* @__PURE__ */ jsx64(BookOpen3, { className: "size-4" }),
21167
+ trailing: item.resource && item.resource.type !== "message" ? /* @__PURE__ */ jsx64(ExternalLink, { className: "size-3.5" }) : void 0,
21168
+ onClick: () => openSummaryItem(item.resource, item.messageId, item.title)
21169
+ },
21170
+ item.id
21171
+ )),
21172
+ sectionAction("sources", summary.totals.sources)
21173
+ ] }),
20849
21174
  hasTask && /* @__PURE__ */ jsxs45(SummarySection, { title: t("taskSummary.sections.task"), children: [
20850
21175
  summary.goal && /* @__PURE__ */ jsx64(
20851
21176
  SummaryButton,
20852
21177
  {
20853
21178
  title: summary.goal.objective,
20854
- description: summary.goal.status,
21179
+ metadata: localizedStatus(summary.goal.status),
20855
21180
  leading: /* @__PURE__ */ jsx64(Target2, { className: "size-4" }),
20856
21181
  onClick: onFocusComposer
20857
21182
  }
@@ -20865,34 +21190,45 @@ function TaskSummaryContent({
20865
21190
  onClick: () => summary.plan?.messageId ? onNavigateMessage(summary.plan.messageId) : onFocusComposer()
20866
21191
  }
20867
21192
  ),
20868
- (summary.todos?.items ?? []).slice(0, PREVIEW_SIZE).map((todo) => /* @__PURE__ */ jsx64(
21193
+ localSectionItems("todos", summary.todos?.items ?? []).map(
21194
+ (todo) => /* @__PURE__ */ jsx64(
21195
+ SummaryButton,
21196
+ {
21197
+ title: todo.content,
21198
+ metadata: localizedStatus(todo.status),
21199
+ leading: todo.status === "completed" ? /* @__PURE__ */ jsx64(CheckCircle25, { className: "size-4 text-muted-foreground" }) : /* @__PURE__ */ jsx64(CircleEllipsis, { className: "size-4 text-muted-foreground" }),
21200
+ onClick: () => summary.todos?.messageId ? onNavigateMessage(summary.todos.messageId) : onFocusComposer()
21201
+ },
21202
+ todo.id
21203
+ )
21204
+ ),
21205
+ localSectionAction("todos", summary.todos?.items.length ?? 0)
21206
+ ] }),
21207
+ summary.running.length > 0 && /* @__PURE__ */ jsxs45(SummarySection, { title: t("taskSummary.sections.running"), children: [
21208
+ localSectionItems("running", summary.running).map((item) => /* @__PURE__ */ jsx64(
20869
21209
  SummaryButton,
20870
21210
  {
20871
- title: todo.content,
20872
- description: t(`taskSummary.status.${todo.status}`),
20873
- leading: todo.status === "completed" ? /* @__PURE__ */ jsx64(CheckCircle25, { className: "size-4 text-muted-foreground" }) : /* @__PURE__ */ jsx64(CircleEllipsis, { className: "size-4 text-muted-foreground" }),
20874
- onClick: () => summary.todos?.messageId ? onNavigateMessage(summary.todos.messageId) : onFocusComposer()
21211
+ title: item.title,
21212
+ metadata: localizedStatus(item.status),
21213
+ description: item.description,
21214
+ leading: /* @__PURE__ */ jsx64(PlayCircle, { className: "size-4" }),
21215
+ trailing: item.resource ? /* @__PURE__ */ jsx64(ExternalLink, { className: "size-3.5" }) : void 0,
21216
+ onClick: () => item.resource && onOpenResource(item.resource, void 0, item.title)
20875
21217
  },
20876
- todo.id
20877
- ))
21218
+ item.id
21219
+ )),
21220
+ localSectionAction("running", summary.running.length)
20878
21221
  ] }),
20879
- summary.running.length > 0 && /* @__PURE__ */ jsx64(SummarySection, { title: t("taskSummary.sections.running"), children: summary.running.slice(0, PREVIEW_SIZE).map((item) => /* @__PURE__ */ jsx64(
20880
- SummaryButton,
20881
- {
20882
- title: item.title,
20883
- description: item.description ?? item.status,
20884
- leading: /* @__PURE__ */ jsx64(PlayCircle, { className: "size-4" }),
20885
- trailing: item.resource ? /* @__PURE__ */ jsx64(ExternalLink, { className: "size-3.5" }) : void 0,
20886
- onClick: () => item.resource && onOpenResource(item.resource, void 0, item.title)
20887
- },
20888
- item.id
20889
- )) }),
20890
21222
  summary.agents.length > 0 && /* @__PURE__ */ jsxs45(SummarySection, { title: t("taskSummary.sections.agents"), children: [
20891
21223
  sectionItems("agents", summary.agents).map((item) => /* @__PURE__ */ jsx64(
20892
21224
  SummaryButton,
20893
21225
  {
20894
21226
  title: item.title,
20895
- description: [item.status, formatElapsed(item.elapsedTime)].filter(Boolean).join(" \xB7 "),
21227
+ metadata: [
21228
+ localizedStatus(item.status),
21229
+ formatElapsed(item.elapsedTime)
21230
+ ].filter(Boolean).join(" \xB7 "),
21231
+ description: item.error,
20896
21232
  leading: /* @__PURE__ */ jsx64(Bot5, { className: "size-4" }),
20897
21233
  onClick: () => item.messageId ? onNavigateMessage(item.messageId) : onFocusComposer()
20898
21234
  },
@@ -20940,16 +21276,20 @@ function SummaryPrompt({
20940
21276
  }
20941
21277
  function SummaryButton({
20942
21278
  title,
21279
+ metadata,
20943
21280
  description,
20944
21281
  leading,
20945
21282
  trailing,
20946
21283
  onClick
20947
21284
  }) {
21285
+ const tooltipText = [title, metadata, description].filter(Boolean);
20948
21286
  return /* @__PURE__ */ jsxs45(
20949
21287
  "button",
20950
21288
  {
20951
21289
  type: "button",
20952
- disabled: !onClick,
21290
+ title: tooltipText.join("\n"),
21291
+ "aria-disabled": !onClick,
21292
+ tabIndex: onClick ? 0 : -1,
20953
21293
  onClick,
20954
21294
  className: cn(
20955
21295
  "flex w-full min-w-0 items-start gap-2.5 rounded-lg px-2 py-1.5 text-left transition-colors",
@@ -20960,6 +21300,7 @@ function SummaryButton({
20960
21300
  leading && /* @__PURE__ */ jsx64("span", { className: "mt-0.5 shrink-0 text-muted-foreground", children: leading }),
20961
21301
  /* @__PURE__ */ jsxs45("span", { className: "min-w-0 flex-1", children: [
20962
21302
  /* @__PURE__ */ jsx64("span", { className: "block truncate text-sm font-medium leading-5 text-foreground", children: title }),
21303
+ metadata && /* @__PURE__ */ jsx64("span", { className: "mt-0.5 block truncate text-xs text-muted-foreground", children: metadata }),
20963
21304
  description && /* @__PURE__ */ jsx64("span", { className: "mt-0.5 block line-clamp-2 text-xs text-muted-foreground", children: description })
20964
21305
  ] }),
20965
21306
  trailing && /* @__PURE__ */ jsx64("span", { className: "mt-0.5 text-muted-foreground", children: trailing })
@@ -20974,7 +21315,7 @@ function formatElapsed(value) {
20974
21315
  }
20975
21316
 
20976
21317
  // src/components/chat.tsx
20977
- import { Fragment as Fragment11, jsx as jsx65, jsxs as jsxs46 } from "react/jsx-runtime";
21318
+ import { Fragment as Fragment12, jsx as jsx65, jsxs as jsxs46 } from "react/jsx-runtime";
20978
21319
  var defaultApiUrl2 = import.meta.env.VITE_XPERTAI_API_URL;
20979
21320
  var COMPOSER_INPUT_MAX_HEIGHT = 128;
20980
21321
  var LONG_TEXT_REFERENCE_THRESHOLD = 5e3;
@@ -22055,7 +22396,8 @@ function Chat({
22055
22396
  enabled: taskSummaryEnabled,
22056
22397
  conversationId: taskSummaryConversationId,
22057
22398
  client: stream.client,
22058
- live: liveTaskSummary
22399
+ live: liveTaskSummary,
22400
+ refreshVersion: stream.historyMessageLoadVersion
22059
22401
  });
22060
22402
  const navigateToTaskSummaryMessage = React61.useCallback(
22061
22403
  async (messageId) => {
@@ -23550,7 +23892,7 @@ function Chat({
23550
23892
  ) }) }),
23551
23893
  /* @__PURE__ */ jsx65(TooltipContent, { side: "bottom", children: t("settings.open") })
23552
23894
  ] }),
23553
- history?.enabled !== false && /* @__PURE__ */ jsxs46(Fragment11, { children: [
23895
+ history?.enabled !== false && /* @__PURE__ */ jsxs46(Fragment12, { children: [
23554
23896
  /* @__PURE__ */ jsxs46(Tooltip, { children: [
23555
23897
  /* @__PURE__ */ jsx65(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx65("span", { className: "inline-flex h-8 w-8", children: /* @__PURE__ */ jsx65(
23556
23898
  "button",
@@ -23734,7 +24076,7 @@ function Chat({
23734
24076
  pet: effectivePet,
23735
24077
  mcpApps: options?.mcpApps
23736
24078
  }
23737
- ) : /* @__PURE__ */ jsxs46(Fragment11, { children: [
24079
+ ) : /* @__PURE__ */ jsxs46(Fragment12, { children: [
23738
24080
  message.type === "human" && humanRuntimeCapabilityOptions.length > 0 && /* @__PURE__ */ jsx65(
23739
24081
  HumanRuntimeCapabilityChips,
23740
24082
  {
@@ -23820,22 +24162,6 @@ function Chat({
23820
24162
  ]
23821
24163
  }
23822
24164
  ),
23823
- !isAtBottom && messages.length > 0 && /* @__PURE__ */ jsx65("div", { className: "sticky bottom-20 z-20 flex justify-center px-4 pointer-events-none", children: /* @__PURE__ */ jsx65(
23824
- Button,
23825
- {
23826
- type: "button",
23827
- size: "icon-sm",
23828
- variant: hasUpdatesBelow ? "default" : "outline",
23829
- className: cn(
23830
- "pointer-events-auto rounded-full shadow-md dark:border-white/20 dark:ring-1 dark:ring-white/15 dark:shadow-[0_0_0_1px_rgba(255,255,255,0.06),0_10px_30px_rgba(0,0,0,0.45)]",
23831
- hasUpdatesBelow && "animate-bounce"
23832
- ),
23833
- onClick: () => scrollToBottom(true, true),
23834
- "aria-label": t("chat.scrollToBottom"),
23835
- title: t("chat.scrollToBottom"),
23836
- children: /* @__PURE__ */ jsx65(ArrowDown2, { size: 16 })
23837
- }
23838
- ) }),
23839
24165
  quoteSelection && /* @__PURE__ */ jsxs46(
23840
24166
  "div",
23841
24167
  {
@@ -23893,11 +24219,34 @@ function Chat({
23893
24219
  "data-slot": "chatkit-chat-composer",
23894
24220
  "data-position": isInitialComposer ? "centered" : "bottom",
23895
24221
  className: cn(
23896
- "mx-auto w-full p-2 z-10 bg-background",
24222
+ "mx-auto w-full max-w-2xl px-4 pb-4 pt-2 z-10 bg-background",
23897
24223
  isInitialComposer ? "mb-auto" : "sticky bottom-0"
23898
24224
  ),
23899
24225
  style: chatColumnStyle,
23900
24226
  children: [
24227
+ !isAtBottom && messages.length > 0 && /* @__PURE__ */ jsx65(
24228
+ "div",
24229
+ {
24230
+ "data-slot": "scroll-to-bottom",
24231
+ className: "pointer-events-none absolute left-1/2 top-0 z-20 flex -translate-x-1/2 -translate-y-full justify-center",
24232
+ children: /* @__PURE__ */ jsx65(
24233
+ Button,
24234
+ {
24235
+ type: "button",
24236
+ size: "icon-sm",
24237
+ variant: hasUpdatesBelow ? "default" : "outline",
24238
+ className: cn(
24239
+ "pointer-events-auto rounded-full shadow-md dark:border-white/20 dark:ring-1 dark:ring-white/15 dark:shadow-[0_0_0_1px_rgba(255,255,255,0.06),0_10px_30px_rgba(0,0,0,0.45)]",
24240
+ hasUpdatesBelow && "animate-bounce"
24241
+ ),
24242
+ onClick: () => scrollToBottom(true, true),
24243
+ "aria-label": t("chat.scrollToBottom"),
24244
+ title: t("chat.scrollToBottom"),
24245
+ children: /* @__PURE__ */ jsx65(ArrowDown2, { size: 16 })
24246
+ }
24247
+ )
24248
+ }
24249
+ ),
23901
24250
  threadErrorMessage && /* @__PURE__ */ jsx65("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 }),
23902
24251
  /* @__PURE__ */ jsx65(
23903
24252
  ChatAttachments,
@@ -24170,7 +24519,7 @@ function Chat({
24170
24519
  {
24171
24520
  "data-slot": "composer-editor-surface",
24172
24521
  className: cn(
24173
- "relative flex min-h-[10rem] min-w-0 bg-background px-2 pt-2 pb-14",
24522
+ "relative flex min-h-[6.5rem] min-w-0 bg-background px-2 pt-2 pb-14",
24174
24523
  "rounded-composer-editor"
24175
24524
  ),
24176
24525
  children: [
@@ -24191,7 +24540,7 @@ function Chat({
24191
24540
  onKeyDown: handleComposerKeyDown,
24192
24541
  "data-placeholder": inputPlaceholder,
24193
24542
  className: cn(
24194
- "min-h-20 max-h-36 w-full overflow-y-auto whitespace-pre-wrap break-words bg-transparent px-2 py-2 text-base leading-6 text-foreground outline-none",
24543
+ "min-h-10 max-h-36 w-full overflow-y-auto whitespace-pre-wrap break-words bg-transparent px-2 py-2 text-base leading-6 text-foreground outline-none",
24195
24544
  "empty:before:pointer-events-none empty:before:text-muted-foreground empty:before:content-[attr(data-placeholder)]",
24196
24545
  (missingConfig || isHistoryLoading || hasPendingInteractiveRequest) && "cursor-not-allowed opacity-50"
24197
24546
  ),
@@ -24346,14 +24695,6 @@ function Chat({
24346
24695
  ),
24347
24696
  children: disclaimer.text
24348
24697
  }
24349
- ),
24350
- /* @__PURE__ */ jsx65(
24351
- "div",
24352
- {
24353
- "data-slot": "chat-footer",
24354
- className: "relative mt-2 flex min-h-6 items-center justify-center gap-2 text-xs text-muted-foreground",
24355
- children: /* @__PURE__ */ jsx65("span", { children: t("chat.poweredBy") })
24356
- }
24357
24698
  )
24358
24699
  ]
24359
24700
  }