@xpert-ai/chatkit-ui 0.3.12 → 0.3.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (337) hide show
  1. package/dist/app/assets/{_baseUniq-IKp1Qtyx.js → _baseUniq-CvONysm3.js} +1 -1
  2. package/dist/app/assets/{abap-C7CFWD5V.js → abap-D0PmjeYp.js} +1 -1
  3. package/dist/app/assets/{abnf-DMBTOEVk.js → abnf-BOKaYw8z.js} +1 -1
  4. package/dist/app/assets/{actionscript-BcEvaXWq.js → actionscript-oedcs05j.js} +1 -1
  5. package/dist/app/assets/{ada-CjD42KJL.js → ada-DTslPS_X.js} +1 -1
  6. package/dist/app/assets/{agda-Bcj2WXF1.js → agda-DyIPFvgY.js} +1 -1
  7. package/dist/app/assets/{al-CMk7bc_L.js → al-JhNzL42i.js} +1 -1
  8. package/dist/app/assets/{antlr4-mV0cIoyX.js → antlr4-C-0Ut0bd.js} +1 -1
  9. package/dist/app/assets/{apacheconf-DN4T9Q-R.js → apacheconf-EFdrrvMh.js} +1 -1
  10. package/dist/app/assets/{apex-3WQ3SwvB.js → apex-BK1Yi3gT.js} +1 -1
  11. package/dist/app/assets/{apl-kyDsC9Hx.js → apl-CHOws7Yd.js} +1 -1
  12. package/dist/app/assets/{applescript-Bs98Sq0b.js → applescript-CaZLRm7r.js} +1 -1
  13. package/dist/app/assets/{aql-BAbWlxCN.js → aql-BjEOqP5L.js} +1 -1
  14. package/dist/app/assets/{arc-EIoofq4L.js → arc-BMasGuP9.js} +1 -1
  15. package/dist/app/assets/{architectureDiagram-Q4EWVU46-DtyblCvt.js → architectureDiagram-Q4EWVU46-B6eAqAul.js} +1 -1
  16. package/dist/app/assets/{arduino-DrkFmhPG.js → arduino-DR77CmPb.js} +1 -1
  17. package/dist/app/assets/{arff-COd-UaSA.js → arff-Cq42nzUN.js} +1 -1
  18. package/dist/app/assets/{asciidoc-D0TlSE1p.js → asciidoc-D8n9IYex.js} +1 -1
  19. package/dist/app/assets/{asm6502-DBgU992u.js → asm6502-B6bHtPuY.js} +1 -1
  20. package/dist/app/assets/{asmatmel-DoAdyDdX.js → asmatmel-CooszWWJ.js} +1 -1
  21. package/dist/app/assets/{aspnet-DbKj2Y0x.js → aspnet-CX0-h1MZ.js} +1 -1
  22. package/dist/app/assets/{autohotkey-BKpl02dF.js → autohotkey-CHtIhjCF.js} +1 -1
  23. package/dist/app/assets/{autoit-nvDMUiIR.js → autoit-DcksqFoK.js} +1 -1
  24. package/dist/app/assets/{avisynth-zdcS6mIk.js → avisynth-CtsFuCNj.js} +1 -1
  25. package/dist/app/assets/{avro-idl-Bz9IAA6X.js → avro-idl-BNfYi2Dh.js} +1 -1
  26. package/dist/app/assets/{bash-Bzch0sET.js → bash-3S4c0WHd.js} +1 -1
  27. package/dist/app/assets/{basic-u-yPBVQX.js → basic-_uhMDh0B.js} +1 -1
  28. package/dist/app/assets/{batch-Due3vTON.js → batch-C_-ETunx.js} +1 -1
  29. package/dist/app/assets/{bbcode-B7eqvAzk.js → bbcode-Ba0czJNb.js} +1 -1
  30. package/dist/app/assets/{bicep-BfgsVHBJ.js → bicep-By_QuI3J.js} +1 -1
  31. package/dist/app/assets/{birb-BSK9o8wp.js → birb-D5W_4t7e.js} +1 -1
  32. package/dist/app/assets/{bison-DzmILaWc.js → bison-Dtt2PWL_.js} +1 -1
  33. package/dist/app/assets/{blockDiagram-DXYQGD6D-4q0Z69yb.js → blockDiagram-DXYQGD6D-lg_Jl28M.js} +1 -1
  34. package/dist/app/assets/{bnf-CTxrvOa_.js → bnf-DQe8pZVg.js} +1 -1
  35. package/dist/app/assets/{brainfuck-B2x0y1yE.js → brainfuck-BIYXJ7sN.js} +1 -1
  36. package/dist/app/assets/{brightscript-B1YuuA1a.js → brightscript-BBCeseWd.js} +1 -1
  37. package/dist/app/assets/{bro-qJvkUxuW.js → bro-Dyt8VOvH.js} +1 -1
  38. package/dist/app/assets/{bsl-D717dB3Z.js → bsl-Cy-qTbmy.js} +1 -1
  39. package/dist/app/assets/{c-eAvYogDo.js → c-B9t9Sy6r.js} +1 -1
  40. package/dist/app/assets/{c4Diagram-AHTNJAMY-8Ls7e8MM.js → c4Diagram-AHTNJAMY-HamHya8d.js} +1 -1
  41. package/dist/app/assets/{cfscript-Po8jLzf2.js → cfscript-B7tkoim0.js} +1 -1
  42. package/dist/app/assets/{chaiscript-DQ0kVVD1.js → chaiscript-BXsoW5BE.js} +1 -1
  43. package/dist/app/assets/channel-BsY2pq9p.js +1 -0
  44. package/dist/app/assets/{chunk-4BX2VUAB-aVXDopSe.js → chunk-4BX2VUAB-bFSsv7Ln.js} +1 -1
  45. package/dist/app/assets/{chunk-4TB4RGXK-B4i0WSGT.js → chunk-4TB4RGXK-Cdsd7ZCo.js} +1 -1
  46. package/dist/app/assets/{chunk-55IACEB6-CDWG5f9m.js → chunk-55IACEB6-ZTsQ3wyw.js} +1 -1
  47. package/dist/app/assets/{chunk-EDXVE4YY-DhPmwrgR.js → chunk-EDXVE4YY-isVJYuaP.js} +1 -1
  48. package/dist/app/assets/{chunk-FMBD7UC4-Bst2lua5.js → chunk-FMBD7UC4-C63-DQH9.js} +1 -1
  49. package/dist/app/assets/{chunk-OYMX7WX6-B3OQzz_w.js → chunk-OYMX7WX6-BTttzFGm.js} +1 -1
  50. package/dist/app/assets/{chunk-QZHKN3VN-rnQWX_CM.js → chunk-QZHKN3VN-CDwAyIOt.js} +1 -1
  51. package/dist/app/assets/{chunk-YZCP3GAM-0SoL9M8l.js → chunk-YZCP3GAM-Bx3_k3Zo.js} +1 -1
  52. package/dist/app/assets/{cil-DWCFx6mz.js → cil-BLTa56Y5.js} +1 -1
  53. package/dist/app/assets/classDiagram-6PBFFD2Q-DpJB1PZu.js +1 -0
  54. package/dist/app/assets/classDiagram-v2-HSJHXN6E-DpJB1PZu.js +1 -0
  55. package/dist/app/assets/{clike-B6raVGdU.js → clike-BIDFl0fT.js} +1 -1
  56. package/dist/app/assets/{clojure-DKI51Ecz.js → clojure-Dpd5h1BA.js} +1 -1
  57. package/dist/app/assets/clone-CiMLCRAd.js +1 -0
  58. package/dist/app/assets/{cmake-CwwQf097.js → cmake-DjUqp9u8.js} +1 -1
  59. package/dist/app/assets/{cobol-BixlHzvP.js → cobol-Dgx17sMr.js} +1 -1
  60. package/dist/app/assets/{coffeescript-DzMKx8Wm.js → coffeescript-B9wL5-Va.js} +1 -1
  61. package/dist/app/assets/{concurnas-CeI1_l2A.js → concurnas-mF1tuHyA.js} +1 -1
  62. package/dist/app/assets/{coq-Rlyk5JPF.js → coq-RHagnzin.js} +1 -1
  63. package/dist/app/assets/{core-CKaxhIxn.js → core-DCCJ-C0q.js} +1 -1
  64. package/dist/app/assets/{cose-bilkent-S5V4N54A-BEbmBjkM.js → cose-bilkent-S5V4N54A-Cb0_atLY.js} +1 -1
  65. package/dist/app/assets/{cpp-D6N2YRS8.js → cpp-DTIt5dAl.js} +1 -1
  66. package/dist/app/assets/{crystal-Bp-ZOMp9.js → crystal-DVA5GCDX.js} +1 -1
  67. package/dist/app/assets/{csharp-73XQRtra.js → csharp-NOj19G2H.js} +1 -1
  68. package/dist/app/assets/{cshtml-_Kw38cMM.js → cshtml-CD3z7IxG.js} +1 -1
  69. package/dist/app/assets/{csp-CWKQ7qNy.js → csp-jVwEgPNj.js} +1 -1
  70. package/dist/app/assets/{css-CSf4crh0.js → css-aJF3Q48Q.js} +1 -1
  71. package/dist/app/assets/{css-extras-BPFlTbKM.js → css-extras-C-U4h-Z3.js} +1 -1
  72. package/dist/app/assets/{csv-NdIdVmit.js → csv-B3FtP7a3.js} +1 -1
  73. package/dist/app/assets/{cypher-DrG3lvrT.js → cypher-Jelt7i1F.js} +1 -1
  74. package/dist/app/assets/{d-Byk2LV83.js → d-ijfOZ2or.js} +1 -1
  75. package/dist/app/assets/{dagre-KV5264BT-DONbK4nc.js → dagre-KV5264BT-DF_s1Fnc.js} +1 -1
  76. package/dist/app/assets/{dart-DAvsdDA3.js → dart-CTYpy6Bc.js} +1 -1
  77. package/dist/app/assets/{dataweave-C5T6xtfv.js → dataweave-D1exHB4s.js} +1 -1
  78. package/dist/app/assets/{dax-DoH9pkog.js → dax-JqPdegf6.js} +1 -1
  79. package/dist/app/assets/{dhall-DJpQKYes.js → dhall-DLi-OuCE.js} +1 -1
  80. package/dist/app/assets/{diagram-5BDNPKRD-cVSMcLwH.js → diagram-5BDNPKRD-C7H0RboA.js} +1 -1
  81. package/dist/app/assets/{diagram-G4DWMVQ6-B5QE6o4T.js → diagram-G4DWMVQ6-CMdy8B-k.js} +1 -1
  82. package/dist/app/assets/{diagram-MMDJMWI5-DIWNtwBR.js → diagram-MMDJMWI5-Dkb4OujG.js} +1 -1
  83. package/dist/app/assets/{diagram-TYMM5635-rMAqc1qj.js → diagram-TYMM5635-C6nwxn_A.js} +1 -1
  84. package/dist/app/assets/{diff-DvrdG0n8.js → diff-BT54-KV8.js} +1 -1
  85. package/dist/app/assets/{django-DEQbld8i.js → django-RAer7vZH.js} +1 -1
  86. package/dist/app/assets/{dns-zone-file-BADAi43M.js → dns-zone-file-Ctz907jU.js} +1 -1
  87. package/dist/app/assets/{docker-BbNeQOxZ.js → docker-DQMF0Heg.js} +1 -1
  88. package/dist/app/assets/{dot-Bmy4l5j8.js → dot-DRM01oM7.js} +1 -1
  89. package/dist/app/assets/{ebnf-B0QE6nnN.js → ebnf-BoXaxGMy.js} +1 -1
  90. package/dist/app/assets/{editorconfig-Bg3JR5OT.js → editorconfig-COefETIr.js} +1 -1
  91. package/dist/app/assets/{eiffel-CYMSvYtO.js → eiffel-DtiXpw62.js} +1 -1
  92. package/dist/app/assets/{ejs-CP1oTchE.js → ejs-CPjGZkv_.js} +1 -1
  93. package/dist/app/assets/{elixir-Di3D46jy.js → elixir-DoBN8UeH.js} +1 -1
  94. package/dist/app/assets/{elm-DS1CidFy.js → elm-B62i2ybA.js} +1 -1
  95. package/dist/app/assets/{erDiagram-SMLLAGMA-DmA9X2aB.js → erDiagram-SMLLAGMA-B4OO8MsP.js} +1 -1
  96. package/dist/app/assets/{erb-MTRWz0CC.js → erb-C9ckQs5i.js} +1 -1
  97. package/dist/app/assets/{erlang-C0EhPwsW.js → erlang-DrTNnJnm.js} +1 -1
  98. package/dist/app/assets/{etlua-DrTwkJv_.js → etlua-B9YWlzUb.js} +1 -1
  99. package/dist/app/assets/{excel-formula-BUY1j-dw.js → excel-formula-C2YGQfQt.js} +1 -1
  100. package/dist/app/assets/{factor-BawUE8xG.js → factor-CQEBDNb2.js} +1 -1
  101. package/dist/app/assets/{false-BoDMLPv-.js → false-aj0fVJxM.js} +1 -1
  102. package/dist/app/assets/{firestore-security-rules-CWXxe34f.js → firestore-security-rules-CDG1Fy4c.js} +1 -1
  103. package/dist/app/assets/{flow-l-oHCDfx.js → flow-DpfOp8Q1.js} +1 -1
  104. package/dist/app/assets/{flowDiagram-DWJPFMVM-Bf7CgR6O.js → flowDiagram-DWJPFMVM-dKziAkNZ.js} +1 -1
  105. package/dist/app/assets/{fortran-DbfhBm3h.js → fortran-B6dEgcNp.js} +1 -1
  106. package/dist/app/assets/{fsharp-C_xG7_2F.js → fsharp-CKzEOQJi.js} +1 -1
  107. package/dist/app/assets/{ftl-BOmP6dqU.js → ftl-0jDsA_YP.js} +1 -1
  108. package/dist/app/assets/{ganttDiagram-T4ZO3ILL-Bg6Tdt0n.js → ganttDiagram-T4ZO3ILL-CxPsDkXF.js} +1 -1
  109. package/dist/app/assets/{gap-CHKm_uiw.js → gap-DDX0qjW3.js} +1 -1
  110. package/dist/app/assets/{gcode-vLqAglHa.js → gcode-BpIri7up.js} +1 -1
  111. package/dist/app/assets/{gdscript-vbRU5enn.js → gdscript-C04N9JVO.js} +1 -1
  112. package/dist/app/assets/{gedcom-D0cr82OU.js → gedcom-DvtepZde.js} +1 -1
  113. package/dist/app/assets/{gherkin-CdrJEioP.js → gherkin-BsAX23_T.js} +1 -1
  114. package/dist/app/assets/{git-BpYfHv6w.js → git-CJNx4Xo6.js} +1 -1
  115. package/dist/app/assets/{gitGraphDiagram-UUTBAWPF-DpeozhsT.js → gitGraphDiagram-UUTBAWPF-DiSvgj0u.js} +1 -1
  116. package/dist/app/assets/{glsl-C1mqMYtZ.js → glsl-D-54R-AO.js} +1 -1
  117. package/dist/app/assets/{gml-MmP8j1JT.js → gml-B0X-Mxkw.js} +1 -1
  118. package/dist/app/assets/{gn-vbr8Ezf8.js → gn-CWmpfEaG.js} +1 -1
  119. package/dist/app/assets/{go-D6TPbDdE.js → go-C_2hF6ro.js} +1 -1
  120. package/dist/app/assets/{go-module-DfKcZOwK.js → go-module-vMtGZodQ.js} +1 -1
  121. package/dist/app/assets/{graph-CUTA2u9Q.js → graph-Cq9YMAYz.js} +1 -1
  122. package/dist/app/assets/{graphql-mqzCl3PN.js → graphql-DrrIeY06.js} +1 -1
  123. package/dist/app/assets/{groovy-ClYqnFm5.js → groovy-BMn_67fe.js} +1 -1
  124. package/dist/app/assets/{haml-BxHbXcYR.js → haml-Ci-7VFqq.js} +1 -1
  125. package/dist/app/assets/{handlebars-v6nReoI-.js → handlebars-BJlC_vgB.js} +1 -1
  126. package/dist/app/assets/{haskell-DzKP2Bsc.js → haskell-Bfe0YQeZ.js} +1 -1
  127. package/dist/app/assets/{haxe-DevMcR_Z.js → haxe-BHjIvHwX.js} +1 -1
  128. package/dist/app/assets/{hcl-C5Bj9s3r.js → hcl-oPGkwxVh.js} +1 -1
  129. package/dist/app/assets/{hlsl-FNmun_i2.js → hlsl-KfasWwmv.js} +1 -1
  130. package/dist/app/assets/{hoon-Cn8qSAYQ.js → hoon-OBQG5VLk.js} +1 -1
  131. package/dist/app/assets/{hpkp-x-6CfFYy.js → hpkp-zyYCSn0s.js} +1 -1
  132. package/dist/app/assets/{hsts-DTMvA9jI.js → hsts-BMBBwqU0.js} +1 -1
  133. package/dist/app/assets/{http-repyLWTd.js → http-CCSDlbLo.js} +1 -1
  134. package/dist/app/assets/{ichigojam-DVrOBI5W.js → ichigojam-DdhQX3SK.js} +1 -1
  135. package/dist/app/assets/{icon-CFEy7hhK.js → icon-B7p5YPMg.js} +1 -1
  136. package/dist/app/assets/{icu-message-format-Bs8z8Pa8.js → icu-message-format-UOBEOoHS.js} +1 -1
  137. package/dist/app/assets/{idris-B4dKajLi.js → idris-CdhiOKCO.js} +1 -1
  138. package/dist/app/assets/{iecst-C8tB6F6o.js → iecst-DXPMKwX6.js} +1 -1
  139. package/dist/app/assets/{ignore-BSV7EeW4.js → ignore-BVa755Kc.js} +1 -1
  140. package/dist/app/assets/index-BEJfqOrB.js +754 -0
  141. package/dist/app/assets/index-CtZ-BBEn.css +1 -0
  142. package/dist/app/assets/{infoDiagram-42DDH7IO-C3qc42CB.js → infoDiagram-42DDH7IO-BB_Um6R6.js} +1 -1
  143. package/dist/app/assets/{inform7-DrAKK55g.js → inform7-mq-OIbmJ.js} +1 -1
  144. package/dist/app/assets/{ini-u8YQIiOq.js → ini-BXIIaxsj.js} +1 -1
  145. package/dist/app/assets/{io-BF3U_13f.js → io-CkhJ-e49.js} +1 -1
  146. package/dist/app/assets/{ishikawaDiagram-UXIWVN3A-DZFv5qUJ.js → ishikawaDiagram-UXIWVN3A-BNzRWQMS.js} +1 -1
  147. package/dist/app/assets/{j-CCimMXhx.js → j-C0CAN9XN.js} +1 -1
  148. package/dist/app/assets/{java-DO5fViyr.js → java-CgSYFksp.js} +1 -1
  149. package/dist/app/assets/{javadoc-DDpss0Lm.js → javadoc-BmBI86rZ.js} +1 -1
  150. package/dist/app/assets/{javadoclike-DU0tWt01.js → javadoclike-D4vqwJX5.js} +1 -1
  151. package/dist/app/assets/{javascript-DdjszwTa.js → javascript-CC8_K6vT.js} +1 -1
  152. package/dist/app/assets/{javastacktrace-6TqNjdk7.js → javastacktrace-B0T5_L5h.js} +1 -1
  153. package/dist/app/assets/{jexl-D8MtdYvR.js → jexl-BzBj2ekh.js} +1 -1
  154. package/dist/app/assets/{jolie-CocTJfsD.js → jolie-PcQu5Qal.js} +1 -1
  155. package/dist/app/assets/{journeyDiagram-VCZTEJTY-BJFWqXvt.js → journeyDiagram-VCZTEJTY-YbGxquTC.js} +1 -1
  156. package/dist/app/assets/{jq-BLep2RPL.js → jq-BIlSIJBC.js} +1 -1
  157. package/dist/app/assets/{js-extras-DQHOpmR6.js → js-extras-CrkjSQXw.js} +1 -1
  158. package/dist/app/assets/{js-templates-C8bgfiAI.js → js-templates-BdsRT61p.js} +1 -1
  159. package/dist/app/assets/{jsdoc-CTXb0QBN.js → jsdoc-BGPbyhWt.js} +1 -1
  160. package/dist/app/assets/{json-MXhid-40.js → json-C8O9rn_F.js} +1 -1
  161. package/dist/app/assets/{json5-BBNk0TrK.js → json5-DNnHL8bJ.js} +1 -1
  162. package/dist/app/assets/{jsonp-B8GEZBkI.js → jsonp-CBoW4Wzv.js} +1 -1
  163. package/dist/app/assets/{jsstacktrace-pvIKS4Zv.js → jsstacktrace-YRTCG2qE.js} +1 -1
  164. package/dist/app/assets/{jsx-BR_PTydE.js → jsx-Cvmg8Qc0.js} +1 -1
  165. package/dist/app/assets/{julia-Cm4xtp32.js → julia-C6GEw5Kx.js} +1 -1
  166. package/dist/app/assets/{kanban-definition-6JOO6SKY-BG9atDzG.js → kanban-definition-6JOO6SKY-Dlqu8obb.js} +1 -1
  167. package/dist/app/assets/{keepalived-DS091xJp.js → keepalived-D2mav9II.js} +1 -1
  168. package/dist/app/assets/{keyman-Cq3rg_OW.js → keyman-DDZgfq0u.js} +1 -1
  169. package/dist/app/assets/{kotlin-Dj8rHKDk.js → kotlin-CrYc_wtA.js} +1 -1
  170. package/dist/app/assets/{kumir-CnspAIaB.js → kumir-B_VS6AVj.js} +1 -1
  171. package/dist/app/assets/{kusto-B_M8_-iN.js → kusto-CP_9UovW.js} +1 -1
  172. package/dist/app/assets/{latex-h_1mu4rU.js → latex-QgAbXGsS.js} +1 -1
  173. package/dist/app/assets/{latte-DRruVMVR.js → latte-DUpGulNe.js} +1 -1
  174. package/dist/app/assets/{layout-C4Y-_UhZ.js → layout-BTwqxbTv.js} +1 -1
  175. package/dist/app/assets/{less-BkBKGybJ.js → less-BLrdBrWF.js} +1 -1
  176. package/dist/app/assets/{lilypond-tpptDbXf.js → lilypond-BDTzAMhd.js} +1 -1
  177. package/dist/app/assets/{linear-LRhlJwR0.js → linear-DkWSa105.js} +1 -1
  178. package/dist/app/assets/{liquid-BYEdjQlm.js → liquid-Dy291YjU.js} +1 -1
  179. package/dist/app/assets/{lisp-UYdnBUFJ.js → lisp-BfnyURQK.js} +1 -1
  180. package/dist/app/assets/{livescript-C9yax0KM.js → livescript-CDMj4WP6.js} +1 -1
  181. package/dist/app/assets/{llvm-2LUJOlxq.js → llvm-CQPEUNLB.js} +1 -1
  182. package/dist/app/assets/{log-DKjvz3ho.js → log-DS0VJgjd.js} +1 -1
  183. package/dist/app/assets/{lolcode-CLsVUU7R.js → lolcode-B2MbftYe.js} +1 -1
  184. package/dist/app/assets/{lua-G_BZKE8Q.js → lua-C-7j_5ne.js} +1 -1
  185. package/dist/app/assets/{magma-lCuEwSEu.js → magma-BBFpD5aY.js} +1 -1
  186. package/dist/app/assets/{makefile-CuurcFXN.js → makefile-CzEmFT7o.js} +1 -1
  187. package/dist/app/assets/{markdown-D8twlx64.js → markdown-BLlnxB-K.js} +1 -1
  188. package/dist/app/assets/{markup-CPx0l2_m.js → markup-D7eCVjbF.js} +1 -1
  189. package/dist/app/assets/{markup-templating-1SLH6Zrr.js → markup-templating-8Z6sScHe.js} +1 -1
  190. package/dist/app/assets/{matlab-DiXiMdVf.js → matlab-uhLBPgTB.js} +1 -1
  191. package/dist/app/assets/{maxscript-CR5B3kzO.js → maxscript-Bkndg0OF.js} +1 -1
  192. package/dist/app/assets/{mel-4XG8ApRx.js → mel-By4Q6ZsA.js} +1 -1
  193. package/dist/app/assets/{mermaid-Dg_Z96Py.js → mermaid-CbChcMmC.js} +1 -1
  194. package/dist/app/assets/{min-ZF6tgODw.js → min-5A3EmlAd.js} +1 -1
  195. package/dist/app/assets/{mindmap-definition-QFDTVHPH-XatWoYUC.js → mindmap-definition-QFDTVHPH-BzbhOcGv.js} +1 -1
  196. package/dist/app/assets/{mizar-D7LfXPjH.js → mizar-Boa07XhI.js} +1 -1
  197. package/dist/app/assets/{mongodb-BT27iI7P.js → mongodb-Dx1noqnV.js} +1 -1
  198. package/dist/app/assets/{monkey-CHo4ln4E.js → monkey-BeXPWhV3.js} +1 -1
  199. package/dist/app/assets/{moonscript-yAsABvFl.js → moonscript-1thH6xrI.js} +1 -1
  200. package/dist/app/assets/{n1ql-CVjJ8k0G.js → n1ql-BulKbT01.js} +1 -1
  201. package/dist/app/assets/{n4js-BpnXK7uO.js → n4js-BOzYMeOt.js} +1 -1
  202. package/dist/app/assets/{nand2tetris-hdl-DZIcttnF.js → nand2tetris-hdl-BIyeRQVK.js} +1 -1
  203. package/dist/app/assets/{naniscript-BjdWmpbq.js → naniscript-CAfgrASy.js} +1 -1
  204. package/dist/app/assets/{nasm-tTGUS43W.js → nasm-pf-h63vT.js} +1 -1
  205. package/dist/app/assets/{neon-Cm0NipU3.js → neon-x4Rgd4bZ.js} +1 -1
  206. package/dist/app/assets/{nevod-CAvas20G.js → nevod-Cdc3uw7C.js} +1 -1
  207. package/dist/app/assets/{nginx-BG78NxdZ.js → nginx-BTHrB1wh.js} +1 -1
  208. package/dist/app/assets/{nim-vMSiqOYt.js → nim-CM1DVIbF.js} +1 -1
  209. package/dist/app/assets/{nix-PeXWRdgp.js → nix-BPK2kQ5C.js} +1 -1
  210. package/dist/app/assets/{nsis-Bx4jjgkI.js → nsis-CRyjntvc.js} +1 -1
  211. package/dist/app/assets/{objectivec-Xc1Oxea3.js → objectivec-CDDtF0zH.js} +1 -1
  212. package/dist/app/assets/{ocaml-CETJbxfK.js → ocaml-DZcit9Vn.js} +1 -1
  213. package/dist/app/assets/{opencl-C8i9C44z.js → opencl-cc0R5DUM.js} +1 -1
  214. package/dist/app/assets/{openqasm-qSsT45fS.js → openqasm-c2pwesjj.js} +1 -1
  215. package/dist/app/assets/{oz-w99JsW87.js → oz-DyrsesLt.js} +1 -1
  216. package/dist/app/assets/{parigp-DvkJkH_x.js → parigp-7_V5KdI6.js} +1 -1
  217. package/dist/app/assets/{parser-B1HImE8Y.js → parser-D6eGtoRN.js} +1 -1
  218. package/dist/app/assets/{pascal-DQaovYcp.js → pascal-DzeBw5qN.js} +1 -1
  219. package/dist/app/assets/{pascaligo-DbdIyNdD.js → pascaligo-Dbb-AhC2.js} +1 -1
  220. package/dist/app/assets/{pcaxis-8ssDIrdH.js → pcaxis-idJM1h2x.js} +1 -1
  221. package/dist/app/assets/{peoplecode-BiV5Zxb2.js → peoplecode-BFxdNkx7.js} +1 -1
  222. package/dist/app/assets/{perl-CPu8mq3o.js → perl-DMMKXc6L.js} +1 -1
  223. package/dist/app/assets/{php-BDLnoxLe.js → php-GE2qlcWl.js} +1 -1
  224. package/dist/app/assets/{php-extras-BlCs6h78.js → php-extras-D0h3euWn.js} +1 -1
  225. package/dist/app/assets/{phpdoc-oTKbX7Rh.js → phpdoc-Aj9K_9VA.js} +1 -1
  226. package/dist/app/assets/{pieDiagram-DEJITSTG-CkgOwggS.js → pieDiagram-DEJITSTG-euy__LIt.js} +1 -1
  227. package/dist/app/assets/{plsql-BYXZUF33.js → plsql-a8FhcqVr.js} +1 -1
  228. package/dist/app/assets/{powerquery-VGGq_Y-K.js → powerquery-DN1sTZNS.js} +1 -1
  229. package/dist/app/assets/{powershell-RNtOnmCz.js → powershell-DMt014c-.js} +1 -1
  230. package/dist/app/assets/{processing-C83CF7Om.js → processing-DchAVn2G.js} +1 -1
  231. package/dist/app/assets/{prolog-MO4dJhtY.js → prolog-BYbcb0nT.js} +1 -1
  232. package/dist/app/assets/{promql-CzEJXg3T.js → promql-BfevPKN7.js} +1 -1
  233. package/dist/app/assets/{properties-BXiHyIGq.js → properties-DxkwWeRR.js} +1 -1
  234. package/dist/app/assets/{protobuf-DzIsCptu.js → protobuf-CChhTutV.js} +1 -1
  235. package/dist/app/assets/{psl-gO8eBzTG.js → psl-C2_pLcpA.js} +1 -1
  236. package/dist/app/assets/{pug-DROaMmxc.js → pug-B-sQ4OSc.js} +1 -1
  237. package/dist/app/assets/{puppet-CkdEKP68.js → puppet-vcyz-j7I.js} +1 -1
  238. package/dist/app/assets/{pure-B4T0aVQv.js → pure-C0W7EfBD.js} +1 -1
  239. package/dist/app/assets/{purebasic-DhErIpnU.js → purebasic-FcKgSuqo.js} +1 -1
  240. package/dist/app/assets/{purescript-BpSYig0_.js → purescript-C_ltNiXx.js} +1 -1
  241. package/dist/app/assets/{q-BP_ajmdt.js → q-CmN7H41m.js} +1 -1
  242. package/dist/app/assets/{qml-VWVXkJA9.js → qml-BBK77TJq.js} +1 -1
  243. package/dist/app/assets/{qore-CVNz07Jd.js → qore-BRjQrygC.js} +1 -1
  244. package/dist/app/assets/{qsharp-DYrITprs.js → qsharp-DUFroSj9.js} +1 -1
  245. package/dist/app/assets/{quadrantDiagram-34T5L4WZ-VnllqPYP.js → quadrantDiagram-34T5L4WZ-BGqai1hN.js} +1 -1
  246. package/dist/app/assets/{r-lkMqhKIi.js → r-BtLInYIq.js} +1 -1
  247. package/dist/app/assets/{racket-GNxLzSm4.js → racket-DSLIke9j.js} +1 -1
  248. package/dist/app/assets/{reason-pr_OxQol.js → reason-BN_bXQ-1.js} +1 -1
  249. package/dist/app/assets/{regex-DuA5bt82.js → regex-Fls3JQwM.js} +1 -1
  250. package/dist/app/assets/{rego-ChVBSuCN.js → rego-LWOfAlAR.js} +1 -1
  251. package/dist/app/assets/{renpy-B-T9UWLB.js → renpy-BnxGO9ok.js} +1 -1
  252. package/dist/app/assets/{requirementDiagram-MS252O5E-nOZVjPtN.js → requirementDiagram-MS252O5E-DTiW7nXX.js} +1 -1
  253. package/dist/app/assets/{rest-CG4X-WbZ.js → rest-Dzyy_awZ.js} +1 -1
  254. package/dist/app/assets/{rip-B6LzWfep.js → rip-BHRZITuS.js} +1 -1
  255. package/dist/app/assets/{roboconf-ySeTNbLp.js → roboconf-BB7SqKLx.js} +1 -1
  256. package/dist/app/assets/{robotframework-kIOhzxiU.js → robotframework-CbbiHJ_l.js} +1 -1
  257. package/dist/app/assets/{ruby-BM8sekCP.js → ruby-UNNH3SH_.js} +1 -1
  258. package/dist/app/assets/{rust-BOWARmu4.js → rust-fivntoob.js} +1 -1
  259. package/dist/app/assets/{sankeyDiagram-XADWPNL6-D5SMgLO7.js → sankeyDiagram-XADWPNL6-Cg_WnhP6.js} +1 -1
  260. package/dist/app/assets/{sas-C95QHnSk.js → sas-Bawf1d6-.js} +1 -1
  261. package/dist/app/assets/{sass-CcV7wTsX.js → sass-Q4vPpiny.js} +1 -1
  262. package/dist/app/assets/{scala-B-FlSrSn.js → scala-CtMDsbPt.js} +1 -1
  263. package/dist/app/assets/{scheme-DAA64CUS.js → scheme-DiND4h1E.js} +1 -1
  264. package/dist/app/assets/{scss-B383C8dD.js → scss-BpxRS9T1.js} +1 -1
  265. package/dist/app/assets/{sequenceDiagram-FGHM5R23-BAq3WCJj.js → sequenceDiagram-FGHM5R23-DLIccWX-.js} +1 -1
  266. package/dist/app/assets/{shell-session-65a-LoVJ.js → shell-session-DE5VxnzZ.js} +1 -1
  267. package/dist/app/assets/{smali-kRxBivzr.js → smali-D2y9x0Hn.js} +1 -1
  268. package/dist/app/assets/{smalltalk-BeQVL5pW.js → smalltalk-D90_h2xX.js} +1 -1
  269. package/dist/app/assets/{smarty-Ch5TbbQQ.js → smarty-Ci02BnOV.js} +1 -1
  270. package/dist/app/assets/{sml-BB_7RVyU.js → sml-qZ9IVAdA.js} +1 -1
  271. package/dist/app/assets/{solidity-D7wGcxQr.js → solidity-Ld1X52bE.js} +1 -1
  272. package/dist/app/assets/{solution-file-Db21ESd-.js → solution-file-I128_x79.js} +1 -1
  273. package/dist/app/assets/{soy-B0_l5rJw.js → soy-CL8SHdlV.js} +1 -1
  274. package/dist/app/assets/{sparql-JpwPPAJG.js → sparql-9UibhZzT.js} +1 -1
  275. package/dist/app/assets/{splunk-spl-_c2dI16C.js → splunk-spl-DmuQo_Z-.js} +1 -1
  276. package/dist/app/assets/{sqf-AGX-5SQA.js → sqf-DYapkK6k.js} +1 -1
  277. package/dist/app/assets/{sql-DQV539be.js → sql-0G77DN1e.js} +1 -1
  278. package/dist/app/assets/{squirrel-FmrsBrtP.js → squirrel-DDRb89LY.js} +1 -1
  279. package/dist/app/assets/{stan-DG1wBDVn.js → stan-BglK2xWh.js} +1 -1
  280. package/dist/app/assets/{stateDiagram-FHFEXIEX-CBG1b62a.js → stateDiagram-FHFEXIEX-VBMagnLo.js} +1 -1
  281. package/dist/app/assets/stateDiagram-v2-QKLJ7IA2-ceSH7UY2.js +1 -0
  282. package/dist/app/assets/{stylus-FxxnGpKJ.js → stylus-BzCzKORP.js} +1 -1
  283. package/dist/app/assets/{swift-OjEf0t2u.js → swift-DzGGhUfC.js} +1 -1
  284. package/dist/app/assets/{systemd-CXdOpEaM.js → systemd-CKRopl3u.js} +1 -1
  285. package/dist/app/assets/{t4-cs-BWNYdlda.js → t4-cs-CBX4HWWS.js} +1 -1
  286. package/dist/app/assets/{t4-templating-Biohaix7.js → t4-templating-T0C2gZZ5.js} +1 -1
  287. package/dist/app/assets/{t4-vb-DNFGD3d_.js → t4-vb-B3zSPzaZ.js} +1 -1
  288. package/dist/app/assets/{tap-Dg18e05M.js → tap-CAe8OF_b.js} +1 -1
  289. package/dist/app/assets/{tcl-Btqn2UMc.js → tcl-CGagKhb1.js} +1 -1
  290. package/dist/app/assets/{textile-BxdpzGb-.js → textile-CueycoY7.js} +1 -1
  291. package/dist/app/assets/{timeline-definition-GMOUNBTQ-BtjV1Syb.js → timeline-definition-GMOUNBTQ-BR8w0YIC.js} +1 -1
  292. package/dist/app/assets/{toml-D3WkKMhp.js → toml-D3xWlWq-.js} +1 -1
  293. package/dist/app/assets/{tremor-ix0_xPIS.js → tremor-Cpf7QHkZ.js} +1 -1
  294. package/dist/app/assets/{tt2-DYiEf69I.js → tt2-CAC91Rlw.js} +1 -1
  295. package/dist/app/assets/{turtle-D79kYTiV.js → turtle-QHsxVOjz.js} +1 -1
  296. package/dist/app/assets/{twig-C2lO0FQ6.js → twig-DFrh0LJU.js} +1 -1
  297. package/dist/app/assets/{typescript-BWbs3zZK.js → typescript-B9pE0jdB.js} +1 -1
  298. package/dist/app/assets/{typoscript-CXO8uHo_.js → typoscript-0mp-YLa-.js} +1 -1
  299. package/dist/app/assets/{unrealscript-B4IFw4Fc.js → unrealscript-ClO5RmCe.js} +1 -1
  300. package/dist/app/assets/{uorazor-Ow8B2gZE.js → uorazor-DOBr2GLb.js} +1 -1
  301. package/dist/app/assets/{uri-CjdCf_n6.js → uri-BfuI8rBD.js} +1 -1
  302. package/dist/app/assets/{v-Djh7PWAw.js → v-DnbjWteW.js} +1 -1
  303. package/dist/app/assets/{vala-hMKcKqAv.js → vala-DSpcVXUB.js} +1 -1
  304. package/dist/app/assets/{vbnet-CBKK7AZw.js → vbnet-BnOKOgHJ.js} +1 -1
  305. package/dist/app/assets/{velocity-DBPvifAA.js → velocity-lvbSLJ-r.js} +1 -1
  306. package/dist/app/assets/{vennDiagram-DHZGUBPP-D-sPxJCn.js → vennDiagram-DHZGUBPP-BiCE3euu.js} +1 -1
  307. package/dist/app/assets/{verilog-B06XleW6.js → verilog-DkYzNfBh.js} +1 -1
  308. package/dist/app/assets/{vhdl-z0adhEhq.js → vhdl-D_YywZA8.js} +1 -1
  309. package/dist/app/assets/{vim-DgXoWMAS.js → vim-pGXhp0rg.js} +1 -1
  310. package/dist/app/assets/{visual-basic-C17Ibazf.js → visual-basic-BhtyQkXP.js} +1 -1
  311. package/dist/app/assets/{wardley-RL74JXVD-DSMlPQeI.js → wardley-RL74JXVD-B2V57Q2E.js} +1 -1
  312. package/dist/app/assets/{wardleyDiagram-NUSXRM2D-DfRjSWRr.js → wardleyDiagram-NUSXRM2D-Cp8D-xvV.js} +1 -1
  313. package/dist/app/assets/{warpscript-BIetGxT8.js → warpscript-CoTVqDn1.js} +1 -1
  314. package/dist/app/assets/{wasm-DDD0BDOW.js → wasm-CMFJzAkq.js} +1 -1
  315. package/dist/app/assets/{web-idl-CIMai9Vx.js → web-idl-C-lZ_t1T.js} +1 -1
  316. package/dist/app/assets/{wiki-CVWHKZwQ.js → wiki-BOedWAnh.js} +1 -1
  317. package/dist/app/assets/{wolfram-BvGOmO4s.js → wolfram-CYOMd2Zo.js} +1 -1
  318. package/dist/app/assets/{wren-CbF6O884.js → wren-DupAeqRZ.js} +1 -1
  319. package/dist/app/assets/{xeora-B1ekyGx3.js → xeora-CbXv4PDs.js} +1 -1
  320. package/dist/app/assets/{xml-doc-B4Y4OcvH.js → xml-doc-B7Sbddxh.js} +1 -1
  321. package/dist/app/assets/{xojo-8yNuRPIu.js → xojo-D1qtWt5Q.js} +1 -1
  322. package/dist/app/assets/{xquery-18e5foCa.js → xquery-DoggQfJM.js} +1 -1
  323. package/dist/app/assets/{xychartDiagram-5P7HB3ND-CC5MceuR.js → xychartDiagram-5P7HB3ND-D1aj1N3W.js} +1 -1
  324. package/dist/app/assets/{yaml-CBHqwYPN.js → yaml-DQR4TEX3.js} +1 -1
  325. package/dist/app/assets/{yang-Cr3tggHy.js → yang-Cq-mC04g.js} +1 -1
  326. package/dist/app/assets/{zig-CAn9IEzi.js → zig-BFW3ALkQ.js} +1 -1
  327. package/dist/app/index.html +2 -2
  328. package/dist/index.cjs +836 -4
  329. package/dist/index.js +843 -4
  330. package/package.json +4 -4
  331. package/dist/app/assets/channel-776uJRzf.js +0 -1
  332. package/dist/app/assets/classDiagram-6PBFFD2Q-CuMmt2wK.js +0 -1
  333. package/dist/app/assets/classDiagram-v2-HSJHXN6E-CuMmt2wK.js +0 -1
  334. package/dist/app/assets/clone-BHKv9dxg.js +0 -1
  335. package/dist/app/assets/index-COsBUIAY.js +0 -754
  336. package/dist/app/assets/index-aAZDJmqe.css +0 -1
  337. package/dist/app/assets/stateDiagram-v2-QKLJ7IA2-Duz6pBEy.js +0 -1
package/dist/index.cjs CHANGED
@@ -1077,6 +1077,117 @@ function resolveUsedContextSize(options) {
1077
1077
  return normalizeContextUsageNumber(options.fallbackUsedTokens) ?? 0;
1078
1078
  }
1079
1079
 
1080
+ // src/lib/thread-goals.ts
1081
+ function normalizeGoalObjective(value) {
1082
+ return value.trim();
1083
+ }
1084
+ function parseGoalCommand(args) {
1085
+ const text = args.trim();
1086
+ if (!text) {
1087
+ return { type: "show" };
1088
+ }
1089
+ const lower = text.toLowerCase();
1090
+ if (lower === "pause") {
1091
+ return { type: "pause" };
1092
+ }
1093
+ if (lower === "resume") {
1094
+ return { type: "resume" };
1095
+ }
1096
+ if (lower === "clear") {
1097
+ return { type: "clear" };
1098
+ }
1099
+ if (lower.startsWith("edit ")) {
1100
+ return {
1101
+ type: "edit",
1102
+ objective: normalizeGoalObjective(text.slice(5))
1103
+ };
1104
+ }
1105
+ return {
1106
+ type: "set",
1107
+ objective: normalizeGoalObjective(text)
1108
+ };
1109
+ }
1110
+ async function loadThreadGoal({
1111
+ goal,
1112
+ threadId,
1113
+ signal
1114
+ }) {
1115
+ return goal.getGoal({ threadId, signal });
1116
+ }
1117
+ async function executeThreadGoalCommand({
1118
+ goal,
1119
+ threadId,
1120
+ assistantId,
1121
+ command,
1122
+ runtimeCapabilities,
1123
+ signal
1124
+ }) {
1125
+ const normalizedThreadId = threadId?.trim() || null;
1126
+ if (command.type === "show") {
1127
+ if (!normalizedThreadId) {
1128
+ throw new Error("Thread is required to show the current goal.");
1129
+ }
1130
+ return {
1131
+ threadId: normalizedThreadId,
1132
+ goal: await goal.getGoal({ threadId: normalizedThreadId, signal })
1133
+ };
1134
+ }
1135
+ if (command.type === "clear") {
1136
+ if (!normalizedThreadId) {
1137
+ throw new Error("Thread is required to clear the current goal.");
1138
+ }
1139
+ return {
1140
+ threadId: normalizedThreadId,
1141
+ goal: await goal.clearGoal({ threadId: normalizedThreadId, signal })
1142
+ };
1143
+ }
1144
+ if (command.type === "pause" || command.type === "resume") {
1145
+ if (!normalizedThreadId) {
1146
+ throw new Error("Thread is required to update the current goal.");
1147
+ }
1148
+ return {
1149
+ threadId: normalizedThreadId,
1150
+ goal: await goal.updateGoal({
1151
+ threadId: normalizedThreadId,
1152
+ status: command.type === "pause" ? "paused" : "active",
1153
+ signal
1154
+ })
1155
+ };
1156
+ }
1157
+ const objective = command.objective.trim();
1158
+ if (!objective) {
1159
+ throw new Error("Goal objective is required.");
1160
+ }
1161
+ if (command.type === "edit") {
1162
+ if (!normalizedThreadId) {
1163
+ const result2 = await goal.setGoal({
1164
+ threadId: null,
1165
+ assistantId,
1166
+ objective,
1167
+ runtimeCapabilities,
1168
+ signal
1169
+ });
1170
+ return result2;
1171
+ }
1172
+ return {
1173
+ threadId: normalizedThreadId,
1174
+ goal: await goal.updateGoal({
1175
+ threadId: normalizedThreadId,
1176
+ objective,
1177
+ signal
1178
+ })
1179
+ };
1180
+ }
1181
+ const result = await goal.setGoal({
1182
+ threadId: normalizedThreadId,
1183
+ assistantId,
1184
+ objective,
1185
+ runtimeCapabilities,
1186
+ signal
1187
+ });
1188
+ return result;
1189
+ }
1190
+
1080
1191
  // src/lib/follow-ups.ts
1081
1192
  function getComposerFollowUpShortcutLabels(queueShortcutLabel) {
1082
1193
  return {
@@ -1296,6 +1407,8 @@ var en_US_default = {
1296
1407
  referencedContentOnly: "Referenced content",
1297
1408
  youLabel: "You",
1298
1409
  scrollToBottom: "Scroll to bottom",
1410
+ loadMoreMessages: "Load more",
1411
+ loadingMoreMessages: "Loading...",
1299
1412
  retryUpload: "Retry upload",
1300
1413
  dropFilesTitle: "Drop files to upload",
1301
1414
  dropFilesHint: "They will be attached to your next message.",
@@ -1343,6 +1456,27 @@ var en_US_default = {
1343
1456
  label: "Context window",
1344
1457
  full: "{{usedPercent}}% used ({{remainingPercent}}% left)",
1345
1458
  tokensUsed: "{{used}} / {{max}} tokens used"
1459
+ },
1460
+ goal: {
1461
+ label: "Goal",
1462
+ unavailable: "Goal controls are not available for this client.",
1463
+ startThreadRequired: "Start a conversation before changing the goal.",
1464
+ elapsed: "{{elapsed}} elapsed",
1465
+ edit: "Edit goal",
1466
+ pause: "Pause goal",
1467
+ resume: "Resume goal",
1468
+ clear: "Clear goal",
1469
+ hide: "Hide goal",
1470
+ expandObjective: "Show full goal",
1471
+ collapseObjective: "Hide full goal",
1472
+ status: {
1473
+ active: "active",
1474
+ paused: "paused",
1475
+ blocked: "blocked",
1476
+ usage_limited: "usage limited",
1477
+ budget_limited: "budget limited",
1478
+ complete: "complete"
1479
+ }
1346
1480
  }
1347
1481
  },
1348
1482
  history: {
@@ -1653,6 +1787,8 @@ var zh_CN_default = {
1653
1787
  referencedContentOnly: "\u5DF2\u5F15\u7528\u5185\u5BB9",
1654
1788
  youLabel: "\u4F60",
1655
1789
  scrollToBottom: "\u56DE\u5230\u5E95\u90E8",
1790
+ loadMoreMessages: "\u52A0\u8F7D\u66F4\u591A",
1791
+ loadingMoreMessages: "\u6B63\u5728\u52A0\u8F7D...",
1656
1792
  retryUpload: "\u91CD\u65B0\u4E0A\u4F20",
1657
1793
  dropFilesTitle: "\u677E\u624B\u4E0A\u4F20\u6587\u4EF6",
1658
1794
  dropFilesHint: "\u6587\u4EF6\u4F1A\u9644\u52A0\u5230\u4F60\u7684\u4E0B\u4E00\u6761\u6D88\u606F\u3002",
@@ -1700,6 +1836,27 @@ var zh_CN_default = {
1700
1836
  label: "\u4E0A\u4E0B\u6587\u7A97\u53E3",
1701
1837
  full: "\u5DF2\u4F7F\u7528 {{usedPercent}}%\uFF08\u5269\u4F59 {{remainingPercent}}%\uFF09",
1702
1838
  tokensUsed: "\u5DF2\u4F7F\u7528 {{used}} / {{max}} tokens"
1839
+ },
1840
+ goal: {
1841
+ label: "\u76EE\u6807",
1842
+ unavailable: "\u5F53\u524D\u5BA2\u6237\u7AEF\u4E0D\u652F\u6301\u76EE\u6807\u63A7\u5236\u3002",
1843
+ startThreadRequired: "\u8BF7\u5148\u5F00\u59CB\u4E00\u4E2A\u4F1A\u8BDD\u518D\u4FEE\u6539\u76EE\u6807\u3002",
1844
+ elapsed: "\u5DF2\u8FD0\u884C {{elapsed}}",
1845
+ edit: "\u7F16\u8F91\u76EE\u6807",
1846
+ pause: "\u6682\u505C\u76EE\u6807",
1847
+ resume: "\u6062\u590D\u76EE\u6807",
1848
+ clear: "\u6E05\u9664\u76EE\u6807",
1849
+ hide: "\u9690\u85CF\u76EE\u6807",
1850
+ expandObjective: "\u663E\u793A\u5B8C\u6574\u76EE\u6807",
1851
+ collapseObjective: "\u9690\u85CF\u5B8C\u6574\u76EE\u6807",
1852
+ status: {
1853
+ active: "\u8FD0\u884C\u4E2D",
1854
+ paused: "\u5DF2\u6682\u505C",
1855
+ blocked: "\u5DF2\u963B\u585E",
1856
+ usage_limited: "\u7528\u91CF\u53D7\u9650",
1857
+ budget_limited: "\u9884\u7B97\u8017\u5C3D",
1858
+ complete: "\u5DF2\u5B8C\u6210"
1859
+ }
1703
1860
  }
1704
1861
  },
1705
1862
  history: {
@@ -2972,6 +3129,9 @@ function ComposerMenu({
2972
3129
  selectedTool,
2973
3130
  planModeEnabled = false,
2974
3131
  onPlanModeChange,
3132
+ goalCommandAvailable = false,
3133
+ goalPanelOpen = false,
3134
+ onGoalPanelOpenChange,
2975
3135
  runtimeCapabilities,
2976
3136
  selectedRuntimeCapabilities,
2977
3137
  onRuntimeCapabilityToggle,
@@ -3006,6 +3166,9 @@ function ComposerMenu({
3006
3166
  const handlePlanModeToggle = () => {
3007
3167
  onPlanModeChange?.(!planModeEnabled);
3008
3168
  };
3169
+ const handleGoalCommandClick = () => {
3170
+ onGoalPanelOpenChange?.(!goalPanelOpen);
3171
+ };
3009
3172
  const handleOpenChange = (nextOpen) => {
3010
3173
  if (nextOpen) {
3011
3174
  const boundary = triggerRef.current?.closest("[data-chatkit-root]") ?? void 0;
@@ -3303,6 +3466,45 @@ function ComposerMenu({
3303
3466
  ]
3304
3467
  }
3305
3468
  ),
3469
+ goalCommandAvailable && /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
3470
+ DropdownMenuItem,
3471
+ {
3472
+ role: "switch",
3473
+ "aria-checked": goalPanelOpen,
3474
+ onSelect: (event) => {
3475
+ event.preventDefault();
3476
+ handleGoalCommandClick();
3477
+ },
3478
+ className: cn(
3479
+ "gap-3 px-3 py-2",
3480
+ menuItemRoundedClass,
3481
+ goalPanelOpen && "bg-muted"
3482
+ ),
3483
+ children: [
3484
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "flex h-6 w-6 items-center justify-center text-muted-foreground", children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_lucide_react3.Target, { size: 16 }) }),
3485
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "min-w-0 flex-1 text-left", children: t("chat.goal.label") }),
3486
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
3487
+ "span",
3488
+ {
3489
+ className: cn(
3490
+ "relative inline-flex h-6 w-10 shrink-0 items-center rounded-full transition-colors",
3491
+ goalPanelOpen ? "bg-primary" : "bg-muted-foreground/20"
3492
+ ),
3493
+ "aria-hidden": "true",
3494
+ children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
3495
+ "span",
3496
+ {
3497
+ className: cn(
3498
+ "inline-block h-5 w-5 rounded-full bg-background shadow-sm transition-transform",
3499
+ goalPanelOpen ? "translate-x-[18px]" : "translate-x-0.5"
3500
+ )
3501
+ }
3502
+ )
3503
+ }
3504
+ )
3505
+ ]
3506
+ }
3507
+ ),
3306
3508
  hasRuntimeCapabilities && /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_jsx_runtime11.Fragment, { children: [
3307
3509
  /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(DropdownMenuSeparator, {}),
3308
3510
  skills.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
@@ -3407,6 +3609,40 @@ function ComposerMenu({
3407
3609
  /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { children: t("composer.planModeActive") })
3408
3610
  ]
3409
3611
  }
3612
+ ),
3613
+ goalCommandAvailable && goalPanelOpen && /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
3614
+ "button",
3615
+ {
3616
+ type: "button",
3617
+ "aria-label": t("chat.goal.hide"),
3618
+ disabled,
3619
+ onClick: () => onGoalPanelOpenChange?.(false),
3620
+ className: cn(
3621
+ "group inline-flex h-8 shrink-0 items-center gap-1.5 border border-primary/30 bg-primary/10 px-2 text-xs font-medium text-primary transition-all duration-200 hover:bg-primary/15",
3622
+ roundedClass
3623
+ ),
3624
+ children: [
3625
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("span", { className: "relative inline-flex h-4 w-4 items-center justify-center", children: [
3626
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
3627
+ import_lucide_react3.Target,
3628
+ {
3629
+ "data-slot": "goal-indicator-icon",
3630
+ size: 14,
3631
+ className: "absolute transition-all duration-150 group-hover:scale-75 group-hover:opacity-0"
3632
+ }
3633
+ ),
3634
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
3635
+ import_lucide_react3.X,
3636
+ {
3637
+ "data-slot": "goal-remove-icon",
3638
+ size: 14,
3639
+ className: "absolute scale-75 opacity-0 transition-all duration-150 group-hover:scale-100 group-hover:opacity-100"
3640
+ }
3641
+ )
3642
+ ] }),
3643
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { children: t("chat.goal.label") })
3644
+ ]
3645
+ }
3410
3646
  )
3411
3647
  ] });
3412
3648
  }
@@ -6729,6 +6965,9 @@ function parseSlashCommandInvocation(value) {
6729
6965
  };
6730
6966
  }
6731
6967
  function shouldSubmitRawSlashInvocation(command) {
6968
+ if (command.name === "goal" && command.source === "runtime") {
6969
+ return false;
6970
+ }
6732
6971
  return command.action.type === "insert_invocation";
6733
6972
  }
6734
6973
  function resolvePromptWorkflowText(value, language) {
@@ -6766,6 +7005,14 @@ function createSlashCommandExecutionEffect(command, args, language) {
6766
7005
  ...command.kind === "prompt_workflow" ? { kind: command.kind } : {},
6767
7006
  ...workflow ? { workflow } : {}
6768
7007
  };
7008
+ if (command.name === "goal" && command.source === "runtime") {
7009
+ return {
7010
+ type: "goal",
7011
+ args: args.trim(),
7012
+ commandSource,
7013
+ runtimeCapabilities: getActionRuntimeCapabilities(action) ?? void 0
7014
+ };
7015
+ }
6769
7016
  if (command.source === "builtin" && action.type === "client_action") {
6770
7017
  if (command.name === "plan") {
6771
7018
  if (args.trim()) {
@@ -7127,7 +7374,9 @@ function useSlashCommands({
7127
7374
  setComposerText,
7128
7375
  focusComposerAt,
7129
7376
  setPlanModeEnabled,
7377
+ setGoalPanelOpen,
7130
7378
  onPetCommand,
7379
+ onGoalCommand,
7131
7380
  addRunRuntimeCapabilities,
7132
7381
  setRunRuntimeCapabilities,
7133
7382
  insertComposerCapabilityToken,
@@ -7319,6 +7568,17 @@ function useSlashCommands({
7319
7568
  submitPrompt(effect);
7320
7569
  return true;
7321
7570
  }
7571
+ if (effect.type === "goal") {
7572
+ void onGoalCommand?.({
7573
+ args: effect.args,
7574
+ commandSource: effect.commandSource,
7575
+ runtimeCapabilities: effect.runtimeCapabilities
7576
+ });
7577
+ setComposerText("", 0);
7578
+ setPalette(null);
7579
+ focusComposerAt(0);
7580
+ return true;
7581
+ }
7322
7582
  if (effect.type === "client_action") {
7323
7583
  if (parentMessenger) {
7324
7584
  void parentMessenger.sendCommand("onWidgetAction", {
@@ -7347,6 +7607,7 @@ function useSlashCommands({
7347
7607
  i18n2.language,
7348
7608
  parentMessenger,
7349
7609
  onPetCommand,
7610
+ onGoalCommand,
7350
7611
  selectCapabilityById,
7351
7612
  setComposerText,
7352
7613
  setPalette,
@@ -7372,12 +7633,23 @@ function useSlashCommands({
7372
7633
  toggleCapabilityGroup(option.capabilityType);
7373
7634
  return;
7374
7635
  }
7636
+ if (option.command.name === "goal" && option.command.source === "runtime") {
7637
+ setGoalPanelOpen((open) => !open);
7638
+ setComposerText("", 0);
7639
+ setPalette(null);
7640
+ focusComposerAt(0);
7641
+ return;
7642
+ }
7375
7643
  executeSlashCommand(option.command, "");
7376
7644
  },
7377
7645
  [
7378
7646
  executeSlashCommand,
7647
+ focusComposerAt,
7379
7648
  insertComposerCapabilityToken,
7380
7649
  palette,
7650
+ setGoalPanelOpen,
7651
+ setComposerText,
7652
+ setPalette,
7381
7653
  toggleCapabilityGroup
7382
7654
  ]
7383
7655
  );
@@ -9844,7 +10116,7 @@ function SandboxShellToolCallCard({ data }) {
9844
10116
  "div",
9845
10117
  {
9846
10118
  className: cn(
9847
- "group/shell-copy relative min-h-0 flex-1",
10119
+ "group/shell-copy relative min-h-0 flex-1 overflow-auto",
9848
10120
  SANDBOX_SHELL_SECTION_GAP_CLASS
9849
10121
  ),
9850
10122
  children: [
@@ -9852,7 +10124,7 @@ function SandboxShellToolCallCard({ data }) {
9852
10124
  "pre",
9853
10125
  {
9854
10126
  className: cn(
9855
- "min-h-0 overflow-auto whitespace-pre pr-8 font-mono text-muted-foreground/85 in-data-[density=compact]:pr-6 in-data-[density=spacious]:pr-10",
10127
+ "min-h-0 whitespace-pre pr-8 font-mono text-muted-foreground/85 in-data-[density=compact]:pr-6 in-data-[density=spacious]:pr-10",
9856
10128
  SANDBOX_SHELL_TEXT_CLASS
9857
10129
  ),
9858
10130
  "data-slot": "sandbox-shell-output",
@@ -13165,6 +13437,127 @@ async function persistConversationRuntimeCapabilities({
13165
13437
  };
13166
13438
  }
13167
13439
 
13440
+ // src/lib/xpert-thread-goal-adapter.ts
13441
+ var SDK_GOAL_METHOD_ERROR = "Current Xpert SDK client does not expose conversation goal methods. Provide options.goal to use a custom goal adapter.";
13442
+ function requireBoundGoalMethod(owner, method) {
13443
+ if (!owner || !method) {
13444
+ throw new Error(SDK_GOAL_METHOD_ERROR);
13445
+ }
13446
+ return method.bind(owner);
13447
+ }
13448
+ function supportsXpertThreadGoalAdapter(client) {
13449
+ const conversations = client.conversations;
13450
+ return Boolean(
13451
+ conversations?.search && conversations.create && conversations.getGoal && conversations.setGoal && conversations.updateGoal && conversations.clearGoal
13452
+ );
13453
+ }
13454
+ async function findConversation(client, threadId) {
13455
+ return findConversationByThreadIdWithRetry(
13456
+ client,
13457
+ threadId
13458
+ );
13459
+ }
13460
+ async function requireConversation(client, threadId) {
13461
+ const conversation = await findConversation(client, threadId);
13462
+ if (!conversation?.id) {
13463
+ throw new Error("Conversation not found for this thread.");
13464
+ }
13465
+ return conversation;
13466
+ }
13467
+ function createXpertThreadGoalAdapter(client) {
13468
+ return {
13469
+ async getGoal({ threadId, signal }) {
13470
+ const conversation = await findConversation(client, threadId);
13471
+ if (!conversation?.id) {
13472
+ return null;
13473
+ }
13474
+ const getGoal = requireBoundGoalMethod(
13475
+ client.conversations,
13476
+ client.conversations.getGoal
13477
+ );
13478
+ return getGoal(conversation.id, { signal });
13479
+ },
13480
+ async setGoal({
13481
+ threadId,
13482
+ assistantId,
13483
+ objective,
13484
+ runtimeCapabilities,
13485
+ signal
13486
+ }) {
13487
+ const normalizedObjective = objective.trim();
13488
+ if (!normalizedObjective) {
13489
+ throw new Error("Goal objective is required.");
13490
+ }
13491
+ const setGoal = requireBoundGoalMethod(
13492
+ client.conversations,
13493
+ client.conversations.setGoal
13494
+ );
13495
+ const normalizedThreadId = threadId?.trim() || null;
13496
+ if (normalizedThreadId) {
13497
+ const conversation2 = await requireConversation(
13498
+ client,
13499
+ normalizedThreadId
13500
+ );
13501
+ const goal2 = await setGoal(
13502
+ conversation2.id,
13503
+ { objective: normalizedObjective },
13504
+ { signal }
13505
+ );
13506
+ return { threadId: normalizedThreadId, goal: goal2 };
13507
+ }
13508
+ const createConversation = requireBoundGoalMethod(
13509
+ client.conversations,
13510
+ client.conversations?.create
13511
+ );
13512
+ const conversation = await createConversation({
13513
+ xpertId: assistantId,
13514
+ ...runtimeCapabilities ? {
13515
+ options: {
13516
+ runtimeCapabilities
13517
+ }
13518
+ } : {}
13519
+ });
13520
+ const conversationId = conversation.id?.trim();
13521
+ if (!conversationId) {
13522
+ throw new Error("Created conversation is missing id.");
13523
+ }
13524
+ const createdThreadId = conversation.threadId?.trim();
13525
+ if (!createdThreadId) {
13526
+ throw new Error("Created conversation is missing threadId.");
13527
+ }
13528
+ const goal = await setGoal(
13529
+ conversationId,
13530
+ { objective: normalizedObjective },
13531
+ { signal }
13532
+ );
13533
+ return { threadId: createdThreadId, goal };
13534
+ },
13535
+ async updateGoal({ threadId, objective, status, signal }) {
13536
+ const conversation = await requireConversation(client, threadId);
13537
+ const updateGoal = requireBoundGoalMethod(
13538
+ client.conversations,
13539
+ client.conversations.updateGoal
13540
+ );
13541
+ return updateGoal(
13542
+ conversation.id,
13543
+ {
13544
+ ...objective !== void 0 ? { objective } : {},
13545
+ ...status ? { status } : {}
13546
+ },
13547
+ { signal }
13548
+ );
13549
+ },
13550
+ async clearGoal({ threadId, signal }) {
13551
+ const conversation = await requireConversation(client, threadId);
13552
+ const clearGoal = requireBoundGoalMethod(
13553
+ client.conversations,
13554
+ client.conversations.clearGoal
13555
+ );
13556
+ return clearGoal(conversation.id, { signal });
13557
+ }
13558
+ };
13559
+ }
13560
+
13168
13561
  // src/lib/composer-parts.ts
13169
13562
  var COMPOSER_CAPABILITY_TOKEN_LENGTH = 1;
13170
13563
  var COMPOSER_CAPABILITY_TOKEN = "\uFFFC";
@@ -13488,6 +13881,21 @@ var import_meta2 = {};
13488
13881
  var defaultApiUrl2 = import_meta2.env.VITE_XPERTAI_API_URL;
13489
13882
  var COMPOSER_INPUT_MAX_HEIGHT = 128;
13490
13883
  var LONG_TEXT_REFERENCE_THRESHOLD = 5e3;
13884
+ var GOAL_RUN_INPUT = "Continue working toward the active goal.";
13885
+ function hasRuntimeGoalCommand(runtimeCapabilities) {
13886
+ return runtimeCapabilities?.commands?.some((command) => command.name === "goal") ?? false;
13887
+ }
13888
+ function isGoalAdapter(value) {
13889
+ return Boolean(value) && typeof value === "object" && typeof value.getGoal === "function" && typeof value.setGoal === "function" && typeof value.updateGoal === "function" && typeof value.clearGoal === "function";
13890
+ }
13891
+ function formatGoalElapsed(seconds) {
13892
+ if (seconds < 60) {
13893
+ return `${seconds}s`;
13894
+ }
13895
+ const minutes = Math.floor(seconds / 60);
13896
+ const remainingSeconds = seconds % 60;
13897
+ return remainingSeconds ? `${minutes}m ${remainingSeconds}s` : `${minutes}m`;
13898
+ }
13491
13899
  function getSlashPaletteEmptyLabelKey(palette, runtimeCapabilitiesReady) {
13492
13900
  if (!palette.capabilityTypes || palette.capabilityTypes.length !== 1) {
13493
13901
  return "composer.capabilities.emptySearch";
@@ -13697,6 +14105,12 @@ function Chat({
13697
14105
  const [historyError, setHistoryError] = React48.useState(null);
13698
14106
  const [assistantName, setAssistantName] = React48.useState(null);
13699
14107
  const [assistantAvatar, setAssistantAvatar] = React48.useState(null);
14108
+ const [threadGoal, setThreadGoal] = React48.useState(null);
14109
+ const [goalError, setGoalError] = React48.useState(null);
14110
+ const [isGoalLoading, setIsGoalLoading] = React48.useState(false);
14111
+ const [isGoalPanelOpen, setIsGoalPanelOpen] = React48.useState(false);
14112
+ const [isGoalObjectiveExpanded, setIsGoalObjectiveExpanded] = React48.useState(false);
14113
+ const [goalElapsedStartedAt, setGoalElapsedStartedAt] = React48.useState(null);
13700
14114
  const LOADING_DOTS_MIN_DURATION = 800;
13701
14115
  const STREAMING_STATUS_REFRESH_MS = 250;
13702
14116
  const [showLoadingDots, setShowLoadingDots] = React48.useState(false);
@@ -13748,6 +14162,21 @@ function Chat({
13748
14162
  }, STREAMING_STATUS_REFRESH_MS);
13749
14163
  return () => window.clearInterval(timer);
13750
14164
  }, [stream.isLoading]);
14165
+ React48.useEffect(() => {
14166
+ if (threadGoal?.status === "active" && stream.isLoading) {
14167
+ setGoalElapsedStartedAt(Date.now());
14168
+ return;
14169
+ }
14170
+ setGoalElapsedStartedAt(null);
14171
+ }, [
14172
+ stream.isLoading,
14173
+ threadGoal?.elapsedSeconds,
14174
+ threadGoal?.id,
14175
+ threadGoal?.status
14176
+ ]);
14177
+ React48.useEffect(() => {
14178
+ setIsGoalObjectiveExpanded(false);
14179
+ }, [threadGoal?.id]);
13751
14180
  const [composerParts, setComposerParts] = React48.useState([]);
13752
14181
  const [renderedComposerParts, setRenderedComposerParts] = React48.useState([]);
13753
14182
  const [composerDomVersion, setComposerDomVersion] = React48.useState(0);
@@ -13795,6 +14224,7 @@ function Chat({
13795
14224
  const forceFollowRef = React48.useRef(false);
13796
14225
  const previousMessageCountRef = React48.useRef(0);
13797
14226
  const previousScrollTopRef = React48.useRef(0);
14227
+ const isPrependingHistoryMessagesRef = React48.useRef(false);
13798
14228
  const autoScrollFrameRef = React48.useRef(null);
13799
14229
  const isPointerDownRef = React48.useRef(false);
13800
14230
  const lastTouchYRef = React48.useRef(null);
@@ -13853,13 +14283,20 @@ function Chat({
13853
14283
  () => stream.messages ?? [],
13854
14284
  [stream.messages]
13855
14285
  );
14286
+ const historyMessagePagination = stream.historyMessagePagination;
14287
+ const isLoadingMoreMessages = Boolean(
14288
+ historyMessagePagination?.isLoadingMore
14289
+ );
14290
+ const canLoadMoreMessages = Boolean(historyMessagePagination?.hasMore);
13856
14291
  const draft = React48.useMemo(
13857
14292
  () => getComposerPlainText(composerParts),
13858
14293
  [composerParts]
13859
14294
  );
13860
14295
  const trimmedDraft = draft.trim();
13861
14296
  const hasReferences = references.length > 0;
13862
- const isComposerStacked = planModeEnabled || Boolean(selectedTool);
14297
+ const hasCompletedGoal = threadGoal?.status === "complete";
14298
+ const isGoalModeOpen = isGoalPanelOpen;
14299
+ const isComposerStacked = planModeEnabled || isGoalModeOpen || Boolean(selectedTool);
13863
14300
  const isComposerInputEmpty = getComposerEditingLength(composerParts) === 0;
13864
14301
  const composerInputRoundedClass = getComposerInputRoundedClass(theme.radius, {
13865
14302
  isEmpty: isComposerInputEmpty,
@@ -13880,6 +14317,18 @@ function Chat({
13880
14317
  () => getRuntimeCapabilityOptions(runtimeCapabilities),
13881
14318
  [runtimeCapabilities]
13882
14319
  );
14320
+ const goalCommandAvailable = hasRuntimeGoalCommand(runtimeCapabilities);
14321
+ const goalAdapter = React48.useMemo(
14322
+ () => {
14323
+ if (isGoalAdapter(options?.goal)) {
14324
+ return options.goal;
14325
+ }
14326
+ return supportsXpertThreadGoalAdapter(stream.client) ? createXpertThreadGoalAdapter(stream.client) : null;
14327
+ },
14328
+ [options?.goal, stream.client]
14329
+ );
14330
+ const showGoalStatus = goalCommandAvailable && !hasCompletedGoal && (Boolean(goalError) || threadGoal?.status === "active" && stream.isLoading);
14331
+ const displayedGoalElapsedSeconds = threadGoal ? (threadGoal.elapsedSeconds ?? 0) + (goalElapsedStartedAt ? Math.max(0, Math.floor((streamingNow - goalElapsedStartedAt) / 1e3)) : 0) : 0;
13883
14332
  const effectiveSessionRuntimeCapabilities = React48.useMemo(
13884
14333
  () => runtimeCapabilitiesReady && runtimeCapabilities ? mergeRuntimeCapabilitiesSelections(
13885
14334
  runtimeCapabilities,
@@ -14217,6 +14666,10 @@ function Chat({
14217
14666
  React48.useEffect(() => {
14218
14667
  const messageCountChanged = messages.length !== previousMessageCountRef.current;
14219
14668
  previousMessageCountRef.current = messages.length;
14669
+ if (isPrependingHistoryMessagesRef.current) {
14670
+ setHasUpdatesBelow(false);
14671
+ return;
14672
+ }
14220
14673
  if (!shouldAutoScrollRef.current) {
14221
14674
  if (messageCountChanged || stream.isLoading) {
14222
14675
  setHasUpdatesBelow(true);
@@ -14429,6 +14882,49 @@ function Chat({
14429
14882
  stream.client,
14430
14883
  stream.threadId
14431
14884
  ]);
14885
+ React48.useEffect(() => {
14886
+ setThreadGoal(stream.threadGoal);
14887
+ }, [stream.threadGoal]);
14888
+ React48.useEffect(() => {
14889
+ const threadId = stream.threadId?.trim();
14890
+ if (!threadId || !goalCommandAvailable) {
14891
+ setThreadGoal(null);
14892
+ setGoalError(null);
14893
+ setIsGoalLoading(false);
14894
+ setIsGoalPanelOpen(false);
14895
+ return;
14896
+ }
14897
+ if (!goalAdapter) {
14898
+ setThreadGoal(null);
14899
+ setGoalError(null);
14900
+ setIsGoalLoading(false);
14901
+ setIsGoalPanelOpen(false);
14902
+ return;
14903
+ }
14904
+ const controller = new AbortController();
14905
+ setIsGoalLoading(true);
14906
+ setGoalError(null);
14907
+ void loadThreadGoal({
14908
+ goal: goalAdapter,
14909
+ threadId,
14910
+ signal: controller.signal
14911
+ }).then((goal) => {
14912
+ if (!controller.signal.aborted) {
14913
+ setThreadGoal(goal);
14914
+ }
14915
+ }).catch((error) => {
14916
+ if (controller.signal.aborted) {
14917
+ return;
14918
+ }
14919
+ setGoalError(error instanceof Error ? error.message : String(error));
14920
+ setThreadGoal(null);
14921
+ }).finally(() => {
14922
+ if (!controller.signal.aborted) {
14923
+ setIsGoalLoading(false);
14924
+ }
14925
+ });
14926
+ return () => controller.abort();
14927
+ }, [goalAdapter, goalCommandAvailable, stream.threadId]);
14432
14928
  const uploadedFiles = attachmentState.uploadedFiles;
14433
14929
  const handleSessionRuntimeCapabilityToggle = React48.useCallback(
14434
14930
  (type, id, selected) => {
@@ -14640,6 +15136,124 @@ function Chat({
14640
15136
  t
14641
15137
  ]
14642
15138
  );
15139
+ const handleGoalCommand = React48.useCallback(
15140
+ async ({
15141
+ args,
15142
+ commandSource,
15143
+ runtimeCapabilities: commandRuntimeCapabilities,
15144
+ visibleInput
15145
+ }) => {
15146
+ const command = parseGoalCommand(args);
15147
+ const threadId = stream.threadId?.trim();
15148
+ setGoalError(null);
15149
+ if (!threadId) {
15150
+ if (command.type === "show") {
15151
+ setThreadGoal(null);
15152
+ setIsGoalLoading(false);
15153
+ return;
15154
+ }
15155
+ if (command.type !== "set" && command.type !== "edit") {
15156
+ setGoalError(t("chat.goal.startThreadRequired"));
15157
+ return;
15158
+ }
15159
+ }
15160
+ if (!goalAdapter) {
15161
+ setGoalError(t("chat.goal.unavailable"));
15162
+ return;
15163
+ }
15164
+ setIsGoalLoading(true);
15165
+ try {
15166
+ const result = await executeThreadGoalCommand({
15167
+ goal: goalAdapter,
15168
+ threadId,
15169
+ assistantId: stream.assistantId,
15170
+ command,
15171
+ runtimeCapabilities: commandRuntimeCapabilities
15172
+ });
15173
+ if (!threadId && result.threadId) {
15174
+ stream.reset(result.threadId, []);
15175
+ void refreshThreads();
15176
+ }
15177
+ const startsGoalRun = result.goal?.status === "active" && (command.type === "set" || command.type === "edit" || command.type === "resume");
15178
+ setThreadGoal(command.type === "clear" ? null : result.goal);
15179
+ if (command.type === "clear" || startsGoalRun) {
15180
+ setIsGoalPanelOpen(false);
15181
+ }
15182
+ if (startsGoalRun) {
15183
+ const goalRunThreadId = result.threadId ?? threadId;
15184
+ const runtimeCapabilitiesForGoalRun = runtimeCapabilities && runtimeCapabilitiesReady ? createRuntimeCapabilitiesForSubmit({
15185
+ capabilities: runtimeCapabilities,
15186
+ available: effectiveSessionRuntimeCapabilities,
15187
+ recommended: commandRuntimeCapabilities
15188
+ }) : commandRuntimeCapabilities ?? null;
15189
+ const inputPayload = {
15190
+ input: GOAL_RUN_INPUT,
15191
+ commandSource,
15192
+ goalRun: true,
15193
+ ...runtimeCapabilitiesForGoalRun ? { runtimeCapabilities: runtimeCapabilitiesForGoalRun } : {}
15194
+ };
15195
+ const requestOptions = buildInjectedRequestOptions({
15196
+ defaults: options?.request,
15197
+ humanInput: inputPayload
15198
+ });
15199
+ const visibleGoalMessage = visibleInput ? {
15200
+ id: createMessageId(),
15201
+ type: "human",
15202
+ content: visibleInput,
15203
+ submittedInput: visibleInput
15204
+ } : null;
15205
+ void stream.submit(
15206
+ {
15207
+ input: inputPayload,
15208
+ ...requestOptions.state ? { state: requestOptions.state } : {}
15209
+ },
15210
+ {
15211
+ ...goalRunThreadId && !threadId ? {
15212
+ threadId: goalRunThreadId,
15213
+ joinExistingThread: true
15214
+ } : {},
15215
+ ...requestOptions.context ? { context: requestOptions.context } : {},
15216
+ ...requestOptions.config ? { config: requestOptions.config } : {},
15217
+ ...visibleGoalMessage ? {
15218
+ preserveOptimisticMessages: true,
15219
+ optimisticValues: (prev) => {
15220
+ const prevMessages = prev?.messages ?? [];
15221
+ return {
15222
+ ...prev,
15223
+ messages: [...prevMessages, visibleGoalMessage]
15224
+ };
15225
+ }
15226
+ } : {}
15227
+ }
15228
+ ).catch((error) => {
15229
+ setGoalError(
15230
+ error instanceof Error ? error.message : String(error)
15231
+ );
15232
+ });
15233
+ }
15234
+ } catch (error) {
15235
+ setGoalError(error instanceof Error ? error.message : String(error));
15236
+ } finally {
15237
+ setIsGoalLoading(false);
15238
+ }
15239
+ },
15240
+ [
15241
+ effectiveSessionRuntimeCapabilities,
15242
+ goalAdapter,
15243
+ options?.request,
15244
+ refreshThreads,
15245
+ runtimeCapabilities,
15246
+ runtimeCapabilitiesReady,
15247
+ stream,
15248
+ t
15249
+ ]
15250
+ );
15251
+ const handleGoalPanelOpenChange = React48.useCallback(
15252
+ (open) => {
15253
+ setIsGoalPanelOpen(open);
15254
+ },
15255
+ []
15256
+ );
14643
15257
  const addRunRuntimeCapabilities = React48.useCallback(
14644
15258
  (selection) => {
14645
15259
  setRunRuntimeCapabilities(
@@ -14702,7 +15316,9 @@ function Chat({
14702
15316
  setComposerText,
14703
15317
  focusComposerAt,
14704
15318
  setPlanModeEnabled,
15319
+ setGoalPanelOpen: setIsGoalPanelOpen,
14705
15320
  onPetCommand: handlePetCommand,
15321
+ onGoalCommand: handleGoalCommand,
14706
15322
  addRunRuntimeCapabilities,
14707
15323
  setRunRuntimeCapabilities,
14708
15324
  insertComposerCapabilityToken,
@@ -14759,11 +15375,42 @@ function Chat({
14759
15375
  container.scrollTop += optionRect.bottom - containerRect.bottom;
14760
15376
  }
14761
15377
  }, [runtimeCapabilityPalette, slashPaletteOptions.length]);
15378
+ const submitGoalModeDraft = React48.useCallback(() => {
15379
+ const objective = getComposerPlainText(composerPartsRef.current).trim();
15380
+ if (!isGoalModeOpen || !goalCommandAvailable || !objective) {
15381
+ return false;
15382
+ }
15383
+ setComposerText("", 0);
15384
+ setRuntimeCapabilityPalette(null);
15385
+ focusComposerAt(0);
15386
+ void handleGoalCommand({
15387
+ args: objective,
15388
+ commandSource: {
15389
+ type: "slash_command",
15390
+ name: "goal",
15391
+ source: "runtime",
15392
+ executionType: "insert_invocation"
15393
+ },
15394
+ runtimeCapabilities: runRuntimeCapabilities,
15395
+ visibleInput: objective
15396
+ });
15397
+ return true;
15398
+ }, [
15399
+ focusComposerAt,
15400
+ goalCommandAvailable,
15401
+ handleGoalCommand,
15402
+ isGoalModeOpen,
15403
+ runRuntimeCapabilities,
15404
+ setComposerText
15405
+ ]);
14762
15406
  const handleSubmit = (event) => {
14763
15407
  event.preventDefault();
14764
15408
  if (executeSlashCommandFromDraft()) {
14765
15409
  return;
14766
15410
  }
15411
+ if (submitGoalModeDraft()) {
15412
+ return;
15413
+ }
14767
15414
  submitDraft();
14768
15415
  };
14769
15416
  const handleEditPendingFollowUp = React48.useCallback(
@@ -14928,6 +15575,9 @@ function Chat({
14928
15575
  if (executeSlashCommandFromDraft()) {
14929
15576
  return;
14930
15577
  }
15578
+ if (submitGoalModeDraft()) {
15579
+ return;
15580
+ }
14931
15581
  submitDraft(
14932
15582
  getBusyComposerShortcutFollowUpMode(event.metaKey || event.ctrlKey)
14933
15583
  );
@@ -14936,6 +15586,9 @@ function Chat({
14936
15586
  if (executeSlashCommandFromDraft()) {
14937
15587
  return;
14938
15588
  }
15589
+ if (submitGoalModeDraft()) {
15590
+ return;
15591
+ }
14939
15592
  submitDraft();
14940
15593
  };
14941
15594
  const handleComposerPaste = React48.useCallback(
@@ -15116,6 +15769,40 @@ function Chat({
15116
15769
  },
15117
15770
  [missingConfig, missingConfigShortMessage, stream, t]
15118
15771
  );
15772
+ const handleLoadMoreMessages = React48.useCallback(async () => {
15773
+ if (!canLoadMoreMessages || isLoadingMoreMessages) {
15774
+ return;
15775
+ }
15776
+ const viewport = viewportRef.current;
15777
+ const previousScrollHeight = viewport?.scrollHeight ?? 0;
15778
+ const previousScrollTop = viewport?.scrollTop ?? 0;
15779
+ isPrependingHistoryMessagesRef.current = true;
15780
+ shouldAutoScrollRef.current = false;
15781
+ forceFollowRef.current = false;
15782
+ setHasUpdatesBelow(false);
15783
+ setHistoryError(null);
15784
+ const restoreScrollPosition = () => {
15785
+ requestAnimationFrame(() => {
15786
+ const nextViewport = viewportRef.current;
15787
+ if (nextViewport) {
15788
+ const nextScrollTop = nextViewport.scrollHeight - previousScrollHeight + previousScrollTop;
15789
+ nextViewport.scrollTop = Math.max(0, nextScrollTop);
15790
+ previousScrollTopRef.current = nextViewport.scrollTop;
15791
+ }
15792
+ isPrependingHistoryMessagesRef.current = false;
15793
+ });
15794
+ };
15795
+ try {
15796
+ await stream.loadMoreConversationMessages();
15797
+ restoreScrollPosition();
15798
+ } catch (err) {
15799
+ isPrependingHistoryMessagesRef.current = false;
15800
+ console.warn("Failed to load more thread messages", err);
15801
+ setHistoryError(
15802
+ err instanceof Error ? err.message : t("chat.errors.loadMessages")
15803
+ );
15804
+ }
15805
+ }, [canLoadMoreMessages, isLoadingMoreMessages, stream, t]);
15119
15806
  const handleNewThread = async () => {
15120
15807
  if (missingConfig || isHistoryLoading) return;
15121
15808
  setHistoryError(null);
@@ -15345,13 +16032,29 @@ function Chat({
15345
16032
  historyError && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("div", { className: "mb-4 rounded-lg border border-amber-200 bg-amber-50 px-3 py-2 text-sm text-amber-900", children: historyError }),
15346
16033
  showMissingConfig && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("div", { className: "mb-4 rounded-lg border border-amber-200 bg-amber-50 px-3 py-2 text-sm text-amber-900", children: missingConfigDetailMessage }),
15347
16034
  isHistoryLoading && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("div", { className: "mb-4 rounded-lg border border-muted px-3 py-2 text-sm text-muted-foreground", children: t("chat.loadingThread") }),
15348
- messages.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
16035
+ messages.length === 0 && !canLoadMoreMessages ? /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
15349
16036
  StartScreen,
15350
16037
  {
15351
16038
  startScreen,
15352
16039
  onPromptClick: handlePromptClick
15353
16040
  }
15354
16041
  ) : /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { className: "space-y-4", children: [
16042
+ canLoadMoreMessages && /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { className: "flex items-center gap-3 py-1", children: [
16043
+ /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("div", { className: "h-px min-w-8 flex-1 bg-border" }),
16044
+ /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
16045
+ Button,
16046
+ {
16047
+ type: "button",
16048
+ variant: "ghost",
16049
+ size: "sm",
16050
+ onClick: handleLoadMoreMessages,
16051
+ disabled: isLoadingMoreMessages,
16052
+ className: "h-7 px-2 text-xs font-medium text-muted-foreground hover:text-foreground",
16053
+ children: isLoadingMoreMessages ? t("chat.loadingMoreMessages") : t("chat.loadMoreMessages")
16054
+ }
16055
+ ),
16056
+ /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("div", { className: "h-px min-w-8 flex-1 bg-border" })
16057
+ ] }),
15355
16058
  messages.map((message, index) => {
15356
16059
  const messageType = String(message.type);
15357
16060
  const isAssistantMessage = messageType === "assistant" || messageType === "ai";
@@ -15628,6 +16331,132 @@ function Chat({
15628
16331
  `${option.type}:${option.id}`
15629
16332
  ))
15630
16333
  ] }),
16334
+ showGoalStatus && /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(
16335
+ "div",
16336
+ {
16337
+ className: cn(
16338
+ "mb-2 flex min-h-10 gap-2 rounded-md border border-border bg-background px-2.5 py-2 text-xs text-foreground shadow-sm",
16339
+ isGoalObjectiveExpanded ? "items-start" : "items-center"
16340
+ ),
16341
+ children: [
16342
+ /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
16343
+ import_lucide_react28.Target,
16344
+ {
16345
+ className: cn(
16346
+ "size-4 shrink-0 text-muted-foreground",
16347
+ isGoalObjectiveExpanded && "mt-1"
16348
+ )
16349
+ }
16350
+ ),
16351
+ /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { className: "min-w-0 flex-1", children: [
16352
+ /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { className: "flex min-w-0 items-center gap-2", children: [
16353
+ /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("span", { className: "font-medium", children: t("chat.goal.label") }),
16354
+ threadGoal && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("span", { className: "shrink-0 rounded-md bg-muted px-1.5 py-0.5 text-[11px] text-muted-foreground", children: t(`chat.goal.status.${threadGoal.status}`) }),
16355
+ isGoalLoading && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_lucide_react28.Loader2, { className: "size-3 animate-spin text-muted-foreground" })
16356
+ ] }),
16357
+ /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
16358
+ "div",
16359
+ {
16360
+ className: cn(
16361
+ "mt-0.5 text-muted-foreground",
16362
+ threadGoal?.objective && !goalError && isGoalObjectiveExpanded ? "whitespace-pre-wrap break-words" : "truncate"
16363
+ ),
16364
+ children: goalError || threadGoal?.objective
16365
+ }
16366
+ ),
16367
+ threadGoal && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("div", { className: "mt-1 flex flex-wrap gap-x-3 gap-y-1 text-[11px] text-muted-foreground", children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("span", { children: t("chat.goal.elapsed", {
16368
+ elapsed: formatGoalElapsed(displayedGoalElapsedSeconds)
16369
+ }) }) })
16370
+ ] }),
16371
+ threadGoal && /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { className: "flex shrink-0 items-center gap-1", children: [
16372
+ /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(Tooltip, { children: [
16373
+ /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
16374
+ Button,
16375
+ {
16376
+ type: "button",
16377
+ variant: "ghost",
16378
+ size: "icon-xs",
16379
+ disabled: isGoalLoading,
16380
+ onClick: () => {
16381
+ const prefix = "/goal edit ";
16382
+ setComposerText(`${prefix}${threadGoal.objective}`);
16383
+ },
16384
+ children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_lucide_react28.Pencil, { className: "size-3" })
16385
+ }
16386
+ ) }),
16387
+ /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(TooltipContent, { children: t("chat.goal.edit") })
16388
+ ] }),
16389
+ /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(Tooltip, { children: [
16390
+ /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
16391
+ Button,
16392
+ {
16393
+ type: "button",
16394
+ variant: "ghost",
16395
+ size: "icon-xs",
16396
+ disabled: isGoalLoading,
16397
+ onClick: () => void handleGoalCommand({
16398
+ args: threadGoal.status === "paused" ? "resume" : "pause",
16399
+ commandSource: {
16400
+ type: "slash_command",
16401
+ name: "goal",
16402
+ source: "runtime",
16403
+ executionType: "insert_invocation"
16404
+ }
16405
+ }),
16406
+ children: threadGoal.status === "paused" ? /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_lucide_react28.Play, { className: "size-3" }) : /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_lucide_react28.Pause, { className: "size-3" })
16407
+ }
16408
+ ) }),
16409
+ /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(TooltipContent, { children: threadGoal.status === "paused" ? t("chat.goal.resume") : t("chat.goal.pause") })
16410
+ ] }),
16411
+ /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(Tooltip, { children: [
16412
+ /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
16413
+ Button,
16414
+ {
16415
+ type: "button",
16416
+ variant: "ghost",
16417
+ size: "icon-xs",
16418
+ disabled: isGoalLoading,
16419
+ onClick: () => void handleGoalCommand({
16420
+ args: "clear",
16421
+ commandSource: {
16422
+ type: "slash_command",
16423
+ name: "goal",
16424
+ source: "runtime",
16425
+ executionType: "insert_invocation"
16426
+ }
16427
+ }),
16428
+ children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_lucide_react28.Trash2, { className: "size-3" })
16429
+ }
16430
+ ) }),
16431
+ /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(TooltipContent, { children: t("chat.goal.clear") })
16432
+ ] }),
16433
+ threadGoal.objective && !goalError && /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(Tooltip, { children: [
16434
+ /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
16435
+ Button,
16436
+ {
16437
+ type: "button",
16438
+ variant: "ghost",
16439
+ size: "icon-xs",
16440
+ "aria-expanded": isGoalObjectiveExpanded,
16441
+ "aria-label": isGoalObjectiveExpanded ? t("chat.goal.collapseObjective") : t("chat.goal.expandObjective"),
16442
+ onClick: () => setIsGoalObjectiveExpanded((expanded) => !expanded),
16443
+ children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
16444
+ import_lucide_react28.ChevronDown,
16445
+ {
16446
+ className: cn(
16447
+ "size-3 transition-transform",
16448
+ isGoalObjectiveExpanded && "rotate-180"
16449
+ )
16450
+ }
16451
+ )
16452
+ }
16453
+ ) }),
16454
+ /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(TooltipContent, { children: isGoalObjectiveExpanded ? t("chat.goal.collapseObjective") : t("chat.goal.expandObjective") })
16455
+ ] })
16456
+ ] })
16457
+ ]
16458
+ }
16459
+ ),
15631
16460
  /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
15632
16461
  PendingRuntimeServices,
15633
16462
  {
@@ -15769,6 +16598,9 @@ function Chat({
15769
16598
  selectedTool,
15770
16599
  planModeEnabled,
15771
16600
  onPlanModeChange: setPlanModeEnabled,
16601
+ goalCommandAvailable,
16602
+ goalPanelOpen: isGoalModeOpen,
16603
+ onGoalPanelOpenChange: handleGoalPanelOpenChange,
15772
16604
  runtimeCapabilities: runtimeCapabilitiesReady ? runtimeCapabilities : null,
15773
16605
  selectedRuntimeCapabilities: effectiveSessionRuntimeCapabilities,
15774
16606
  onRuntimeCapabilityToggle: handleSessionRuntimeCapabilityToggle,