@xpert-ai/chatkit-ui 0.3.12 → 0.3.14
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.
- package/dist/app/assets/{_baseUniq-IKp1Qtyx.js → _baseUniq-DN7U2Vwz.js} +1 -1
- package/dist/app/assets/{abap-C7CFWD5V.js → abap-CfmrZkTc.js} +1 -1
- package/dist/app/assets/{abnf-DMBTOEVk.js → abnf-Bw291hxX.js} +1 -1
- package/dist/app/assets/{actionscript-BcEvaXWq.js → actionscript-CWDe_ef1.js} +1 -1
- package/dist/app/assets/{ada-CjD42KJL.js → ada-C0d9duWb.js} +1 -1
- package/dist/app/assets/{agda-Bcj2WXF1.js → agda-exZUjj9O.js} +1 -1
- package/dist/app/assets/{al-CMk7bc_L.js → al-B5qtQv7q.js} +1 -1
- package/dist/app/assets/{antlr4-mV0cIoyX.js → antlr4-BJmUfb2m.js} +1 -1
- package/dist/app/assets/{apacheconf-DN4T9Q-R.js → apacheconf-DulsAdC6.js} +1 -1
- package/dist/app/assets/{apex-3WQ3SwvB.js → apex-HXl-N7PT.js} +1 -1
- package/dist/app/assets/{apl-kyDsC9Hx.js → apl-CVSWi-_l.js} +1 -1
- package/dist/app/assets/{applescript-Bs98Sq0b.js → applescript-BSLfPuyN.js} +1 -1
- package/dist/app/assets/{aql-BAbWlxCN.js → aql-B4eku8M8.js} +1 -1
- package/dist/app/assets/{arc-EIoofq4L.js → arc-lR4coLR7.js} +1 -1
- package/dist/app/assets/{architectureDiagram-Q4EWVU46-DtyblCvt.js → architectureDiagram-Q4EWVU46-BjCbdxqW.js} +1 -1
- package/dist/app/assets/{arduino-DrkFmhPG.js → arduino-BqxagEIz.js} +1 -1
- package/dist/app/assets/{arff-COd-UaSA.js → arff-DTiB1hQ2.js} +1 -1
- package/dist/app/assets/{asciidoc-D0TlSE1p.js → asciidoc-B32rNoj2.js} +1 -1
- package/dist/app/assets/{asm6502-DBgU992u.js → asm6502-DMwUl645.js} +1 -1
- package/dist/app/assets/{asmatmel-DoAdyDdX.js → asmatmel-0eqMlNdR.js} +1 -1
- package/dist/app/assets/{aspnet-DbKj2Y0x.js → aspnet-BdeQ5UsH.js} +1 -1
- package/dist/app/assets/{autohotkey-BKpl02dF.js → autohotkey-CCB3UMT9.js} +1 -1
- package/dist/app/assets/{autoit-nvDMUiIR.js → autoit-BOwLxRnm.js} +1 -1
- package/dist/app/assets/{avisynth-zdcS6mIk.js → avisynth-Bj6TRnGp.js} +1 -1
- package/dist/app/assets/{avro-idl-Bz9IAA6X.js → avro-idl-Bv76GoO9.js} +1 -1
- package/dist/app/assets/{bash-Bzch0sET.js → bash-C0E5FYLo.js} +1 -1
- package/dist/app/assets/{basic-u-yPBVQX.js → basic-DEsDv0vi.js} +1 -1
- package/dist/app/assets/{batch-Due3vTON.js → batch-ddehyzNW.js} +1 -1
- package/dist/app/assets/{bbcode-B7eqvAzk.js → bbcode-Bxx0da3q.js} +1 -1
- package/dist/app/assets/{bicep-BfgsVHBJ.js → bicep-DXDKYRDE.js} +1 -1
- package/dist/app/assets/{birb-BSK9o8wp.js → birb-B66i9ZlU.js} +1 -1
- package/dist/app/assets/{bison-DzmILaWc.js → bison-DTMiiS4R.js} +1 -1
- package/dist/app/assets/{blockDiagram-DXYQGD6D-4q0Z69yb.js → blockDiagram-DXYQGD6D-vtXXtZfo.js} +1 -1
- package/dist/app/assets/{bnf-CTxrvOa_.js → bnf-CEThILY1.js} +1 -1
- package/dist/app/assets/{brainfuck-B2x0y1yE.js → brainfuck-CRkrIiCu.js} +1 -1
- package/dist/app/assets/{brightscript-B1YuuA1a.js → brightscript-QCIOW6AL.js} +1 -1
- package/dist/app/assets/{bro-qJvkUxuW.js → bro-XxT-MRgH.js} +1 -1
- package/dist/app/assets/{bsl-D717dB3Z.js → bsl-CdT9uApG.js} +1 -1
- package/dist/app/assets/{c-eAvYogDo.js → c-B_jLD9e6.js} +1 -1
- package/dist/app/assets/{c4Diagram-AHTNJAMY-8Ls7e8MM.js → c4Diagram-AHTNJAMY-CMiEYCuz.js} +1 -1
- package/dist/app/assets/{cfscript-Po8jLzf2.js → cfscript-BNP9qp1d.js} +1 -1
- package/dist/app/assets/{chaiscript-DQ0kVVD1.js → chaiscript-hY5dXimd.js} +1 -1
- package/dist/app/assets/channel-BYM_b8-I.js +1 -0
- package/dist/app/assets/{chunk-4BX2VUAB-aVXDopSe.js → chunk-4BX2VUAB-DQeJei8f.js} +1 -1
- package/dist/app/assets/{chunk-4TB4RGXK-B4i0WSGT.js → chunk-4TB4RGXK-Da8afgYe.js} +1 -1
- package/dist/app/assets/{chunk-55IACEB6-CDWG5f9m.js → chunk-55IACEB6-Rj5sJFuS.js} +1 -1
- package/dist/app/assets/{chunk-EDXVE4YY-DhPmwrgR.js → chunk-EDXVE4YY-BZgPfOdH.js} +1 -1
- package/dist/app/assets/{chunk-FMBD7UC4-Bst2lua5.js → chunk-FMBD7UC4-COTyIgdO.js} +1 -1
- package/dist/app/assets/{chunk-OYMX7WX6-B3OQzz_w.js → chunk-OYMX7WX6-D1rMsd_2.js} +1 -1
- package/dist/app/assets/{chunk-QZHKN3VN-rnQWX_CM.js → chunk-QZHKN3VN-CKmb12Vi.js} +1 -1
- package/dist/app/assets/{chunk-YZCP3GAM-0SoL9M8l.js → chunk-YZCP3GAM-B_xsfjgK.js} +1 -1
- package/dist/app/assets/{cil-DWCFx6mz.js → cil-PyZct0u9.js} +1 -1
- package/dist/app/assets/classDiagram-6PBFFD2Q-CwWPzWA1.js +1 -0
- package/dist/app/assets/classDiagram-v2-HSJHXN6E-CwWPzWA1.js +1 -0
- package/dist/app/assets/{clike-B6raVGdU.js → clike-147braYa.js} +1 -1
- package/dist/app/assets/{clojure-DKI51Ecz.js → clojure-B5zM8dk0.js} +1 -1
- package/dist/app/assets/clone-B8RPLWzD.js +1 -0
- package/dist/app/assets/{cmake-CwwQf097.js → cmake-DVmCR8-e.js} +1 -1
- package/dist/app/assets/{cobol-BixlHzvP.js → cobol-B9UHQ5TC.js} +1 -1
- package/dist/app/assets/{coffeescript-DzMKx8Wm.js → coffeescript-ChBqV0ML.js} +1 -1
- package/dist/app/assets/{concurnas-CeI1_l2A.js → concurnas-C31Dgpte.js} +1 -1
- package/dist/app/assets/{coq-Rlyk5JPF.js → coq-BMyK4-On.js} +1 -1
- package/dist/app/assets/{core-CKaxhIxn.js → core-2oVERtGy.js} +1 -1
- package/dist/app/assets/{cose-bilkent-S5V4N54A-BEbmBjkM.js → cose-bilkent-S5V4N54A-BzOeQJvC.js} +1 -1
- package/dist/app/assets/{cpp-D6N2YRS8.js → cpp-BbP21HXf.js} +1 -1
- package/dist/app/assets/{crystal-Bp-ZOMp9.js → crystal-_Cl2beGm.js} +1 -1
- package/dist/app/assets/{csharp-73XQRtra.js → csharp-BTTJy4CY.js} +1 -1
- package/dist/app/assets/{cshtml-_Kw38cMM.js → cshtml-DfHhKfEB.js} +1 -1
- package/dist/app/assets/{csp-CWKQ7qNy.js → csp-SVWtS9kS.js} +1 -1
- package/dist/app/assets/{css-CSf4crh0.js → css-B6m9dOOV.js} +1 -1
- package/dist/app/assets/{css-extras-BPFlTbKM.js → css-extras-LK4o0hc9.js} +1 -1
- package/dist/app/assets/{csv-NdIdVmit.js → csv-CoTfO3DU.js} +1 -1
- package/dist/app/assets/{cypher-DrG3lvrT.js → cypher-DX_ZpMzL.js} +1 -1
- package/dist/app/assets/{d-Byk2LV83.js → d-E9Iec9kX.js} +1 -1
- package/dist/app/assets/{dagre-KV5264BT-DONbK4nc.js → dagre-KV5264BT-CrgALnug.js} +1 -1
- package/dist/app/assets/{dart-DAvsdDA3.js → dart-D63EyPv_.js} +1 -1
- package/dist/app/assets/{dataweave-C5T6xtfv.js → dataweave-CBz506IK.js} +1 -1
- package/dist/app/assets/{dax-DoH9pkog.js → dax-wIXLPtir.js} +1 -1
- package/dist/app/assets/{dhall-DJpQKYes.js → dhall-kEUn6fOU.js} +1 -1
- package/dist/app/assets/{diagram-5BDNPKRD-cVSMcLwH.js → diagram-5BDNPKRD-B4x7n2He.js} +1 -1
- package/dist/app/assets/{diagram-G4DWMVQ6-B5QE6o4T.js → diagram-G4DWMVQ6-DJN3PzdQ.js} +1 -1
- package/dist/app/assets/{diagram-MMDJMWI5-DIWNtwBR.js → diagram-MMDJMWI5-EFZZ4e7c.js} +1 -1
- package/dist/app/assets/{diagram-TYMM5635-rMAqc1qj.js → diagram-TYMM5635-BxRlCQ_r.js} +1 -1
- package/dist/app/assets/{diff-DvrdG0n8.js → diff-DC7NxMGB.js} +1 -1
- package/dist/app/assets/{django-DEQbld8i.js → django-D-8jYa2a.js} +1 -1
- package/dist/app/assets/{dns-zone-file-BADAi43M.js → dns-zone-file-C6hvPP_3.js} +1 -1
- package/dist/app/assets/{docker-BbNeQOxZ.js → docker-B-znhIuW.js} +1 -1
- package/dist/app/assets/{dot-Bmy4l5j8.js → dot-DAf-TSqK.js} +1 -1
- package/dist/app/assets/{ebnf-B0QE6nnN.js → ebnf-D-vmW4_0.js} +1 -1
- package/dist/app/assets/{editorconfig-Bg3JR5OT.js → editorconfig-DWNNwgLN.js} +1 -1
- package/dist/app/assets/{eiffel-CYMSvYtO.js → eiffel-BH0EK-0w.js} +1 -1
- package/dist/app/assets/{ejs-CP1oTchE.js → ejs-BHVpNUPK.js} +1 -1
- package/dist/app/assets/{elixir-Di3D46jy.js → elixir-CSqzxagz.js} +1 -1
- package/dist/app/assets/{elm-DS1CidFy.js → elm-DRfM8-kg.js} +1 -1
- package/dist/app/assets/{erDiagram-SMLLAGMA-DmA9X2aB.js → erDiagram-SMLLAGMA-zeJNpJxa.js} +1 -1
- package/dist/app/assets/{erb-MTRWz0CC.js → erb-CNmIpOgi.js} +1 -1
- package/dist/app/assets/{erlang-C0EhPwsW.js → erlang-BDZ2hYY3.js} +1 -1
- package/dist/app/assets/{etlua-DrTwkJv_.js → etlua-C4HN13b2.js} +1 -1
- package/dist/app/assets/{excel-formula-BUY1j-dw.js → excel-formula-Yx0G471H.js} +1 -1
- package/dist/app/assets/{factor-BawUE8xG.js → factor-CDg-yp2G.js} +1 -1
- package/dist/app/assets/{false-BoDMLPv-.js → false-DN2H4sAD.js} +1 -1
- package/dist/app/assets/{firestore-security-rules-CWXxe34f.js → firestore-security-rules-CQ-TIWUF.js} +1 -1
- package/dist/app/assets/{flow-l-oHCDfx.js → flow-BXnYlVyC.js} +1 -1
- package/dist/app/assets/{flowDiagram-DWJPFMVM-Bf7CgR6O.js → flowDiagram-DWJPFMVM-DPw-bB22.js} +1 -1
- package/dist/app/assets/{fortran-DbfhBm3h.js → fortran-DnQotiqX.js} +1 -1
- package/dist/app/assets/{fsharp-C_xG7_2F.js → fsharp-BJKYVmKn.js} +1 -1
- package/dist/app/assets/{ftl-BOmP6dqU.js → ftl-BFC3zO20.js} +1 -1
- package/dist/app/assets/{ganttDiagram-T4ZO3ILL-Bg6Tdt0n.js → ganttDiagram-T4ZO3ILL-CM9Ugpiy.js} +1 -1
- package/dist/app/assets/{gap-CHKm_uiw.js → gap-CrgrAbSP.js} +1 -1
- package/dist/app/assets/{gcode-vLqAglHa.js → gcode-CnYu5Ex7.js} +1 -1
- package/dist/app/assets/{gdscript-vbRU5enn.js → gdscript-cRbhv87p.js} +1 -1
- package/dist/app/assets/{gedcom-D0cr82OU.js → gedcom-D_sy6Ots.js} +1 -1
- package/dist/app/assets/{gherkin-CdrJEioP.js → gherkin-CFywV355.js} +1 -1
- package/dist/app/assets/{git-BpYfHv6w.js → git-Bf2bz3Wy.js} +1 -1
- package/dist/app/assets/{gitGraphDiagram-UUTBAWPF-DpeozhsT.js → gitGraphDiagram-UUTBAWPF-BmVPKqch.js} +1 -1
- package/dist/app/assets/{glsl-C1mqMYtZ.js → glsl-0-0tN7ae.js} +1 -1
- package/dist/app/assets/{gml-MmP8j1JT.js → gml-CF4VMKyW.js} +1 -1
- package/dist/app/assets/{gn-vbr8Ezf8.js → gn-Dwh3RmHT.js} +1 -1
- package/dist/app/assets/{go-D6TPbDdE.js → go-CTuQ3ELr.js} +1 -1
- package/dist/app/assets/{go-module-DfKcZOwK.js → go-module-MkAn_pzN.js} +1 -1
- package/dist/app/assets/{graph-CUTA2u9Q.js → graph-CpjKr_Ss.js} +1 -1
- package/dist/app/assets/{graphql-mqzCl3PN.js → graphql-BGqt50Z0.js} +1 -1
- package/dist/app/assets/{groovy-ClYqnFm5.js → groovy-DNLFkeUu.js} +1 -1
- package/dist/app/assets/{haml-BxHbXcYR.js → haml-DteW0kdw.js} +1 -1
- package/dist/app/assets/{handlebars-v6nReoI-.js → handlebars-Cq0q7SZx.js} +1 -1
- package/dist/app/assets/{haskell-DzKP2Bsc.js → haskell-yRp-22Bm.js} +1 -1
- package/dist/app/assets/{haxe-DevMcR_Z.js → haxe-B2gRWeQu.js} +1 -1
- package/dist/app/assets/{hcl-C5Bj9s3r.js → hcl-DbtimhMF.js} +1 -1
- package/dist/app/assets/{hlsl-FNmun_i2.js → hlsl-CNF6I53_.js} +1 -1
- package/dist/app/assets/{hoon-Cn8qSAYQ.js → hoon-CzaGoRKh.js} +1 -1
- package/dist/app/assets/{hpkp-x-6CfFYy.js → hpkp-CN0wAndN.js} +1 -1
- package/dist/app/assets/{hsts-DTMvA9jI.js → hsts-DappYgs2.js} +1 -1
- package/dist/app/assets/{http-repyLWTd.js → http-BY6617iq.js} +1 -1
- package/dist/app/assets/{ichigojam-DVrOBI5W.js → ichigojam-FmzUOqyg.js} +1 -1
- package/dist/app/assets/{icon-CFEy7hhK.js → icon-t_33X7na.js} +1 -1
- package/dist/app/assets/{icu-message-format-Bs8z8Pa8.js → icu-message-format-DCHJfKU4.js} +1 -1
- package/dist/app/assets/{idris-B4dKajLi.js → idris-BHrSgjd1.js} +1 -1
- package/dist/app/assets/{iecst-C8tB6F6o.js → iecst-Edt5q5x5.js} +1 -1
- package/dist/app/assets/{ignore-BSV7EeW4.js → ignore-QHm1VEId.js} +1 -1
- package/dist/app/assets/index-B25mng8X.js +754 -0
- package/dist/app/assets/index-CYj11nKH.css +1 -0
- package/dist/app/assets/{infoDiagram-42DDH7IO-C3qc42CB.js → infoDiagram-42DDH7IO-CWVsOkhG.js} +1 -1
- package/dist/app/assets/{inform7-DrAKK55g.js → inform7-DQOtMPhH.js} +1 -1
- package/dist/app/assets/{ini-u8YQIiOq.js → ini-Cbu7YzI1.js} +1 -1
- package/dist/app/assets/{io-BF3U_13f.js → io-e0l8cV23.js} +1 -1
- package/dist/app/assets/{ishikawaDiagram-UXIWVN3A-DZFv5qUJ.js → ishikawaDiagram-UXIWVN3A-DM9lBm40.js} +1 -1
- package/dist/app/assets/{j-CCimMXhx.js → j-DcCjctA4.js} +1 -1
- package/dist/app/assets/{java-DO5fViyr.js → java-D6wSCcUS.js} +1 -1
- package/dist/app/assets/{javadoc-DDpss0Lm.js → javadoc-Nw5FrRpH.js} +1 -1
- package/dist/app/assets/{javadoclike-DU0tWt01.js → javadoclike-BtzPHbb7.js} +1 -1
- package/dist/app/assets/{javascript-DdjszwTa.js → javascript-C-05XZq6.js} +1 -1
- package/dist/app/assets/{javastacktrace-6TqNjdk7.js → javastacktrace-CIS-g4Df.js} +1 -1
- package/dist/app/assets/{jexl-D8MtdYvR.js → jexl-CSFXxxQr.js} +1 -1
- package/dist/app/assets/{jolie-CocTJfsD.js → jolie-B_pXK5DU.js} +1 -1
- package/dist/app/assets/{journeyDiagram-VCZTEJTY-BJFWqXvt.js → journeyDiagram-VCZTEJTY-B7-JXvaL.js} +1 -1
- package/dist/app/assets/{jq-BLep2RPL.js → jq-J-I2FM7i.js} +1 -1
- package/dist/app/assets/{js-extras-DQHOpmR6.js → js-extras-Dx_8EXzo.js} +1 -1
- package/dist/app/assets/{js-templates-C8bgfiAI.js → js-templates-D05g6Rqs.js} +1 -1
- package/dist/app/assets/{jsdoc-CTXb0QBN.js → jsdoc-DPSggCzu.js} +1 -1
- package/dist/app/assets/{json-MXhid-40.js → json-eebW4acE.js} +1 -1
- package/dist/app/assets/{json5-BBNk0TrK.js → json5-D6OcVhOH.js} +1 -1
- package/dist/app/assets/{jsonp-B8GEZBkI.js → jsonp-OpiKfVjM.js} +1 -1
- package/dist/app/assets/{jsstacktrace-pvIKS4Zv.js → jsstacktrace-BmUz1bEc.js} +1 -1
- package/dist/app/assets/{jsx-BR_PTydE.js → jsx-rqpNmzfs.js} +1 -1
- package/dist/app/assets/{julia-Cm4xtp32.js → julia-DwJZus4k.js} +1 -1
- package/dist/app/assets/{kanban-definition-6JOO6SKY-BG9atDzG.js → kanban-definition-6JOO6SKY-BfzqKcr7.js} +1 -1
- package/dist/app/assets/{keepalived-DS091xJp.js → keepalived-DpBbx4Cw.js} +1 -1
- package/dist/app/assets/{keyman-Cq3rg_OW.js → keyman-7jQL65gp.js} +1 -1
- package/dist/app/assets/{kotlin-Dj8rHKDk.js → kotlin-BqCPARVL.js} +1 -1
- package/dist/app/assets/{kumir-CnspAIaB.js → kumir-BypHMU6_.js} +1 -1
- package/dist/app/assets/{kusto-B_M8_-iN.js → kusto-LmNXDd9d.js} +1 -1
- package/dist/app/assets/{latex-h_1mu4rU.js → latex-CAoYss1M.js} +1 -1
- package/dist/app/assets/{latte-DRruVMVR.js → latte-CSVfbiOL.js} +1 -1
- package/dist/app/assets/{layout-C4Y-_UhZ.js → layout-Bb4TjfVy.js} +1 -1
- package/dist/app/assets/{less-BkBKGybJ.js → less-DrZAGdRl.js} +1 -1
- package/dist/app/assets/{lilypond-tpptDbXf.js → lilypond-C4k3pwiB.js} +1 -1
- package/dist/app/assets/{linear-LRhlJwR0.js → linear-BRU8--MT.js} +1 -1
- package/dist/app/assets/{liquid-BYEdjQlm.js → liquid-CELaXiSm.js} +1 -1
- package/dist/app/assets/{lisp-UYdnBUFJ.js → lisp-CKGtAI1M.js} +1 -1
- package/dist/app/assets/{livescript-C9yax0KM.js → livescript-B9iEhd-x.js} +1 -1
- package/dist/app/assets/{llvm-2LUJOlxq.js → llvm-wn6tpbZs.js} +1 -1
- package/dist/app/assets/{log-DKjvz3ho.js → log-BA-GGyoJ.js} +1 -1
- package/dist/app/assets/{lolcode-CLsVUU7R.js → lolcode-C3Utlc1p.js} +1 -1
- package/dist/app/assets/{lua-G_BZKE8Q.js → lua-BGTOn4rS.js} +1 -1
- package/dist/app/assets/{magma-lCuEwSEu.js → magma-DH54NGN3.js} +1 -1
- package/dist/app/assets/{makefile-CuurcFXN.js → makefile-Dev3s5gm.js} +1 -1
- package/dist/app/assets/{markdown-D8twlx64.js → markdown-DySjwUhR.js} +1 -1
- package/dist/app/assets/{markup-CPx0l2_m.js → markup-Cne6yiR5.js} +1 -1
- package/dist/app/assets/{markup-templating-1SLH6Zrr.js → markup-templating-D9qZqcoX.js} +1 -1
- package/dist/app/assets/{matlab-DiXiMdVf.js → matlab-DdzC7h-S.js} +1 -1
- package/dist/app/assets/{maxscript-CR5B3kzO.js → maxscript-DJU9yVir.js} +1 -1
- package/dist/app/assets/{mel-4XG8ApRx.js → mel-DBa5zGRt.js} +1 -1
- package/dist/app/assets/{mermaid-Dg_Z96Py.js → mermaid-CKtJNvBf.js} +1 -1
- package/dist/app/assets/{min-ZF6tgODw.js → min-DXoQC-9u.js} +1 -1
- package/dist/app/assets/{mindmap-definition-QFDTVHPH-XatWoYUC.js → mindmap-definition-QFDTVHPH-BY329Pxo.js} +1 -1
- package/dist/app/assets/{mizar-D7LfXPjH.js → mizar-CCmgax7Y.js} +1 -1
- package/dist/app/assets/{mongodb-BT27iI7P.js → mongodb-CpxP716G.js} +1 -1
- package/dist/app/assets/{monkey-CHo4ln4E.js → monkey-uyoynnP1.js} +1 -1
- package/dist/app/assets/{moonscript-yAsABvFl.js → moonscript-Cq-OMQ_B.js} +1 -1
- package/dist/app/assets/{n1ql-CVjJ8k0G.js → n1ql-BXgBZBbD.js} +1 -1
- package/dist/app/assets/{n4js-BpnXK7uO.js → n4js-DfV0N-rV.js} +1 -1
- package/dist/app/assets/{nand2tetris-hdl-DZIcttnF.js → nand2tetris-hdl-CwrCPiLw.js} +1 -1
- package/dist/app/assets/{naniscript-BjdWmpbq.js → naniscript-BYOyd8_0.js} +1 -1
- package/dist/app/assets/{nasm-tTGUS43W.js → nasm-1sS4mbu2.js} +1 -1
- package/dist/app/assets/{neon-Cm0NipU3.js → neon-C5lJqHYa.js} +1 -1
- package/dist/app/assets/{nevod-CAvas20G.js → nevod-CDy3ZJI6.js} +1 -1
- package/dist/app/assets/{nginx-BG78NxdZ.js → nginx-D0pZQ1Gx.js} +1 -1
- package/dist/app/assets/{nim-vMSiqOYt.js → nim-B-QSri62.js} +1 -1
- package/dist/app/assets/{nix-PeXWRdgp.js → nix-BFZ3DzZz.js} +1 -1
- package/dist/app/assets/{nsis-Bx4jjgkI.js → nsis-DUp3RL6V.js} +1 -1
- package/dist/app/assets/{objectivec-Xc1Oxea3.js → objectivec-BXYeLA3z.js} +1 -1
- package/dist/app/assets/{ocaml-CETJbxfK.js → ocaml-N7C8ZUgL.js} +1 -1
- package/dist/app/assets/{opencl-C8i9C44z.js → opencl-C1hdWG9E.js} +1 -1
- package/dist/app/assets/{openqasm-qSsT45fS.js → openqasm-tVhrcf0N.js} +1 -1
- package/dist/app/assets/{oz-w99JsW87.js → oz-DbHRYHpi.js} +1 -1
- package/dist/app/assets/{parigp-DvkJkH_x.js → parigp-D235NbbM.js} +1 -1
- package/dist/app/assets/{parser-B1HImE8Y.js → parser-CQnel-2z.js} +1 -1
- package/dist/app/assets/{pascal-DQaovYcp.js → pascal-DgFGAGP1.js} +1 -1
- package/dist/app/assets/{pascaligo-DbdIyNdD.js → pascaligo-B0jmRm5x.js} +1 -1
- package/dist/app/assets/{pcaxis-8ssDIrdH.js → pcaxis-CQNhbPNS.js} +1 -1
- package/dist/app/assets/{peoplecode-BiV5Zxb2.js → peoplecode-eZLUWdcF.js} +1 -1
- package/dist/app/assets/{perl-CPu8mq3o.js → perl-CiaddnhV.js} +1 -1
- package/dist/app/assets/{php-BDLnoxLe.js → php-B-tFsK7f.js} +1 -1
- package/dist/app/assets/{php-extras-BlCs6h78.js → php-extras-e6eZZ7Na.js} +1 -1
- package/dist/app/assets/{phpdoc-oTKbX7Rh.js → phpdoc-3KxouLRA.js} +1 -1
- package/dist/app/assets/{pieDiagram-DEJITSTG-CkgOwggS.js → pieDiagram-DEJITSTG-DfAj9P4h.js} +1 -1
- package/dist/app/assets/{plsql-BYXZUF33.js → plsql-aOKfDsoP.js} +1 -1
- package/dist/app/assets/{powerquery-VGGq_Y-K.js → powerquery-Bt6p3LDv.js} +1 -1
- package/dist/app/assets/{powershell-RNtOnmCz.js → powershell-DmKC1AtN.js} +1 -1
- package/dist/app/assets/{processing-C83CF7Om.js → processing-BspG6atJ.js} +1 -1
- package/dist/app/assets/{prolog-MO4dJhtY.js → prolog-8OHnLA4S.js} +1 -1
- package/dist/app/assets/{promql-CzEJXg3T.js → promql-WoICd-lG.js} +1 -1
- package/dist/app/assets/{properties-BXiHyIGq.js → properties-CT9ysoga.js} +1 -1
- package/dist/app/assets/{protobuf-DzIsCptu.js → protobuf-DbbkrfXt.js} +1 -1
- package/dist/app/assets/{psl-gO8eBzTG.js → psl-D9uQzlIv.js} +1 -1
- package/dist/app/assets/{pug-DROaMmxc.js → pug-C1Sr-_yU.js} +1 -1
- package/dist/app/assets/{puppet-CkdEKP68.js → puppet-DHnN0rw0.js} +1 -1
- package/dist/app/assets/{pure-B4T0aVQv.js → pure-k9o45cow.js} +1 -1
- package/dist/app/assets/{purebasic-DhErIpnU.js → purebasic-CX4szve_.js} +1 -1
- package/dist/app/assets/{purescript-BpSYig0_.js → purescript-DtyuJSvo.js} +1 -1
- package/dist/app/assets/{q-BP_ajmdt.js → q-CquTY3do.js} +1 -1
- package/dist/app/assets/{qml-VWVXkJA9.js → qml-B2WEaROU.js} +1 -1
- package/dist/app/assets/{qore-CVNz07Jd.js → qore-BaWLl36W.js} +1 -1
- package/dist/app/assets/{qsharp-DYrITprs.js → qsharp-BaHlKQ4H.js} +1 -1
- package/dist/app/assets/{quadrantDiagram-34T5L4WZ-VnllqPYP.js → quadrantDiagram-34T5L4WZ-De73cCE8.js} +1 -1
- package/dist/app/assets/{r-lkMqhKIi.js → r-DYriivXA.js} +1 -1
- package/dist/app/assets/{racket-GNxLzSm4.js → racket-CpHgRVRU.js} +1 -1
- package/dist/app/assets/{reason-pr_OxQol.js → reason-BukTB_kL.js} +1 -1
- package/dist/app/assets/{regex-DuA5bt82.js → regex-DpWjc0Hv.js} +1 -1
- package/dist/app/assets/{rego-ChVBSuCN.js → rego-CLsvZiLZ.js} +1 -1
- package/dist/app/assets/{renpy-B-T9UWLB.js → renpy-CPUiZJXX.js} +1 -1
- package/dist/app/assets/{requirementDiagram-MS252O5E-nOZVjPtN.js → requirementDiagram-MS252O5E-D3E3vDMy.js} +1 -1
- package/dist/app/assets/{rest-CG4X-WbZ.js → rest-D0Bwam59.js} +1 -1
- package/dist/app/assets/{rip-B6LzWfep.js → rip-DRm4vanm.js} +1 -1
- package/dist/app/assets/{roboconf-ySeTNbLp.js → roboconf-DHDu2gUA.js} +1 -1
- package/dist/app/assets/{robotframework-kIOhzxiU.js → robotframework-DicywtSw.js} +1 -1
- package/dist/app/assets/{ruby-BM8sekCP.js → ruby-D9n15-XE.js} +1 -1
- package/dist/app/assets/{rust-BOWARmu4.js → rust-Dt3bCCBI.js} +1 -1
- package/dist/app/assets/{sankeyDiagram-XADWPNL6-D5SMgLO7.js → sankeyDiagram-XADWPNL6-BV0dJiuD.js} +1 -1
- package/dist/app/assets/{sas-C95QHnSk.js → sas-BpsC5kMD.js} +1 -1
- package/dist/app/assets/{sass-CcV7wTsX.js → sass-CT-j7yH3.js} +1 -1
- package/dist/app/assets/{scala-B-FlSrSn.js → scala-D5-0kvxt.js} +1 -1
- package/dist/app/assets/{scheme-DAA64CUS.js → scheme-BAZoRTMC.js} +1 -1
- package/dist/app/assets/{scss-B383C8dD.js → scss-Bb3FF0LI.js} +1 -1
- package/dist/app/assets/{sequenceDiagram-FGHM5R23-BAq3WCJj.js → sequenceDiagram-FGHM5R23-3tyYo99u.js} +1 -1
- package/dist/app/assets/{shell-session-65a-LoVJ.js → shell-session-B7Emf3NW.js} +1 -1
- package/dist/app/assets/{smali-kRxBivzr.js → smali-B5spmGvV.js} +1 -1
- package/dist/app/assets/{smalltalk-BeQVL5pW.js → smalltalk-D3JbgB6K.js} +1 -1
- package/dist/app/assets/{smarty-Ch5TbbQQ.js → smarty-C9YGEmsd.js} +1 -1
- package/dist/app/assets/{sml-BB_7RVyU.js → sml-BxaohhYY.js} +1 -1
- package/dist/app/assets/{solidity-D7wGcxQr.js → solidity-BrUJKjQw.js} +1 -1
- package/dist/app/assets/{solution-file-Db21ESd-.js → solution-file-C7eMymBf.js} +1 -1
- package/dist/app/assets/{soy-B0_l5rJw.js → soy-BiN49MCy.js} +1 -1
- package/dist/app/assets/{sparql-JpwPPAJG.js → sparql-tZI5hOUa.js} +1 -1
- package/dist/app/assets/{splunk-spl-_c2dI16C.js → splunk-spl-B2LG24WR.js} +1 -1
- package/dist/app/assets/{sqf-AGX-5SQA.js → sqf-D39dGOsm.js} +1 -1
- package/dist/app/assets/{sql-DQV539be.js → sql-Bf5b0eBp.js} +1 -1
- package/dist/app/assets/{squirrel-FmrsBrtP.js → squirrel-oMS_qmht.js} +1 -1
- package/dist/app/assets/{stan-DG1wBDVn.js → stan-DCacwMcL.js} +1 -1
- package/dist/app/assets/{stateDiagram-FHFEXIEX-CBG1b62a.js → stateDiagram-FHFEXIEX-bCUjpdIF.js} +1 -1
- package/dist/app/assets/stateDiagram-v2-QKLJ7IA2-jjpXEsTl.js +1 -0
- package/dist/app/assets/{stylus-FxxnGpKJ.js → stylus-CRGeO3WE.js} +1 -1
- package/dist/app/assets/{swift-OjEf0t2u.js → swift-BbDOsDL3.js} +1 -1
- package/dist/app/assets/{systemd-CXdOpEaM.js → systemd-tzWhSmEO.js} +1 -1
- package/dist/app/assets/{t4-cs-BWNYdlda.js → t4-cs-OEUJv71g.js} +1 -1
- package/dist/app/assets/{t4-templating-Biohaix7.js → t4-templating-DwkD4CD2.js} +1 -1
- package/dist/app/assets/{t4-vb-DNFGD3d_.js → t4-vb-BpBzKO9q.js} +1 -1
- package/dist/app/assets/{tap-Dg18e05M.js → tap-DCDrRqf8.js} +1 -1
- package/dist/app/assets/{tcl-Btqn2UMc.js → tcl-BsMdDEdZ.js} +1 -1
- package/dist/app/assets/{textile-BxdpzGb-.js → textile-CuccM9uC.js} +1 -1
- package/dist/app/assets/{timeline-definition-GMOUNBTQ-BtjV1Syb.js → timeline-definition-GMOUNBTQ-C-w2F5Or.js} +1 -1
- package/dist/app/assets/{toml-D3WkKMhp.js → toml-DS1V4-5r.js} +1 -1
- package/dist/app/assets/{tremor-ix0_xPIS.js → tremor-BsV3JlTK.js} +1 -1
- package/dist/app/assets/{tt2-DYiEf69I.js → tt2-CsX9KNZF.js} +1 -1
- package/dist/app/assets/{turtle-D79kYTiV.js → turtle-BdBdOvle.js} +1 -1
- package/dist/app/assets/{twig-C2lO0FQ6.js → twig-CFTxgyFh.js} +1 -1
- package/dist/app/assets/{typescript-BWbs3zZK.js → typescript-CP-0S4VB.js} +1 -1
- package/dist/app/assets/{typoscript-CXO8uHo_.js → typoscript-sdz_0j3U.js} +1 -1
- package/dist/app/assets/{unrealscript-B4IFw4Fc.js → unrealscript-ITVDTz_r.js} +1 -1
- package/dist/app/assets/{uorazor-Ow8B2gZE.js → uorazor-Bk5cDC7V.js} +1 -1
- package/dist/app/assets/{uri-CjdCf_n6.js → uri-B4zzsc9t.js} +1 -1
- package/dist/app/assets/{v-Djh7PWAw.js → v-_ZLRiU4I.js} +1 -1
- package/dist/app/assets/{vala-hMKcKqAv.js → vala-DewPeyKY.js} +1 -1
- package/dist/app/assets/{vbnet-CBKK7AZw.js → vbnet-CnidJofE.js} +1 -1
- package/dist/app/assets/{velocity-DBPvifAA.js → velocity-BIto2PyM.js} +1 -1
- package/dist/app/assets/{vennDiagram-DHZGUBPP-D-sPxJCn.js → vennDiagram-DHZGUBPP-BiNaKYx5.js} +1 -1
- package/dist/app/assets/{verilog-B06XleW6.js → verilog-Cvnp7XFu.js} +1 -1
- package/dist/app/assets/{vhdl-z0adhEhq.js → vhdl-BxpSxJwd.js} +1 -1
- package/dist/app/assets/{vim-DgXoWMAS.js → vim-Cb-kHdfC.js} +1 -1
- package/dist/app/assets/{visual-basic-C17Ibazf.js → visual-basic-ouzXfRru.js} +1 -1
- package/dist/app/assets/{wardley-RL74JXVD-DSMlPQeI.js → wardley-RL74JXVD-EvMjMAiC.js} +1 -1
- package/dist/app/assets/{wardleyDiagram-NUSXRM2D-DfRjSWRr.js → wardleyDiagram-NUSXRM2D-BCn9Ja7r.js} +1 -1
- package/dist/app/assets/{warpscript-BIetGxT8.js → warpscript-C1EpA-EM.js} +1 -1
- package/dist/app/assets/{wasm-DDD0BDOW.js → wasm-B_LySlXP.js} +1 -1
- package/dist/app/assets/{web-idl-CIMai9Vx.js → web-idl-BB9NLYCy.js} +1 -1
- package/dist/app/assets/{wiki-CVWHKZwQ.js → wiki-D_jE3n0M.js} +1 -1
- package/dist/app/assets/{wolfram-BvGOmO4s.js → wolfram-BbhyYenT.js} +1 -1
- package/dist/app/assets/{wren-CbF6O884.js → wren-CdD9yanb.js} +1 -1
- package/dist/app/assets/{xeora-B1ekyGx3.js → xeora-CGIw1yLs.js} +1 -1
- package/dist/app/assets/{xml-doc-B4Y4OcvH.js → xml-doc-Ddm2H-gK.js} +1 -1
- package/dist/app/assets/{xojo-8yNuRPIu.js → xojo-BJAMTi-d.js} +1 -1
- package/dist/app/assets/{xquery-18e5foCa.js → xquery-DtxeJSqz.js} +1 -1
- package/dist/app/assets/{xychartDiagram-5P7HB3ND-CC5MceuR.js → xychartDiagram-5P7HB3ND-tzUn3HbQ.js} +1 -1
- package/dist/app/assets/{yaml-CBHqwYPN.js → yaml-Y_Pa3exj.js} +1 -1
- package/dist/app/assets/{yang-Cr3tggHy.js → yang-D4TnI_4D.js} +1 -1
- package/dist/app/assets/{zig-CAn9IEzi.js → zig-Dn_ZOetC.js} +1 -1
- package/dist/app/index.html +2 -2
- package/dist/index.cjs +961 -5
- package/dist/index.js +972 -9
- package/package.json +3 -3
- package/dist/app/assets/channel-776uJRzf.js +0 -1
- package/dist/app/assets/classDiagram-6PBFFD2Q-CuMmt2wK.js +0 -1
- package/dist/app/assets/classDiagram-v2-HSJHXN6E-CuMmt2wK.js +0 -1
- package/dist/app/assets/clone-BHKv9dxg.js +0 -1
- package/dist/app/assets/index-COsBUIAY.js +0 -754
- package/dist/app/assets/index-aAZDJmqe.css +0 -1
- package/dist/app/assets/stateDiagram-v2-QKLJ7IA2-Duz6pBEy.js +0 -1
package/dist/index.cjs
CHANGED
|
@@ -211,6 +211,9 @@ function readContentAgentKey(content) {
|
|
|
211
211
|
if (!content || typeof content === "string") return void 0;
|
|
212
212
|
return typeof content.agentKey === "string" && content.agentKey.trim() ? content.agentKey.trim() : void 0;
|
|
213
213
|
}
|
|
214
|
+
function isMiddlewareAgentRunInfo(info) {
|
|
215
|
+
return info?.nodeType?.trim().toLowerCase() === "middleware";
|
|
216
|
+
}
|
|
214
217
|
|
|
215
218
|
// src/lib/api-config.ts
|
|
216
219
|
function hasConfiguredValue(value) {
|
|
@@ -1077,6 +1080,117 @@ function resolveUsedContextSize(options) {
|
|
|
1077
1080
|
return normalizeContextUsageNumber(options.fallbackUsedTokens) ?? 0;
|
|
1078
1081
|
}
|
|
1079
1082
|
|
|
1083
|
+
// src/lib/thread-goals.ts
|
|
1084
|
+
function normalizeGoalObjective(value) {
|
|
1085
|
+
return value.trim();
|
|
1086
|
+
}
|
|
1087
|
+
function parseGoalCommand(args) {
|
|
1088
|
+
const text = args.trim();
|
|
1089
|
+
if (!text) {
|
|
1090
|
+
return { type: "show" };
|
|
1091
|
+
}
|
|
1092
|
+
const lower = text.toLowerCase();
|
|
1093
|
+
if (lower === "pause") {
|
|
1094
|
+
return { type: "pause" };
|
|
1095
|
+
}
|
|
1096
|
+
if (lower === "resume") {
|
|
1097
|
+
return { type: "resume" };
|
|
1098
|
+
}
|
|
1099
|
+
if (lower === "clear") {
|
|
1100
|
+
return { type: "clear" };
|
|
1101
|
+
}
|
|
1102
|
+
if (lower.startsWith("edit ")) {
|
|
1103
|
+
return {
|
|
1104
|
+
type: "edit",
|
|
1105
|
+
objective: normalizeGoalObjective(text.slice(5))
|
|
1106
|
+
};
|
|
1107
|
+
}
|
|
1108
|
+
return {
|
|
1109
|
+
type: "set",
|
|
1110
|
+
objective: normalizeGoalObjective(text)
|
|
1111
|
+
};
|
|
1112
|
+
}
|
|
1113
|
+
async function loadThreadGoal({
|
|
1114
|
+
goal,
|
|
1115
|
+
threadId,
|
|
1116
|
+
signal
|
|
1117
|
+
}) {
|
|
1118
|
+
return goal.getGoal({ threadId, signal });
|
|
1119
|
+
}
|
|
1120
|
+
async function executeThreadGoalCommand({
|
|
1121
|
+
goal,
|
|
1122
|
+
threadId,
|
|
1123
|
+
assistantId,
|
|
1124
|
+
command,
|
|
1125
|
+
runtimeCapabilities,
|
|
1126
|
+
signal
|
|
1127
|
+
}) {
|
|
1128
|
+
const normalizedThreadId = threadId?.trim() || null;
|
|
1129
|
+
if (command.type === "show") {
|
|
1130
|
+
if (!normalizedThreadId) {
|
|
1131
|
+
throw new Error("Thread is required to show the current goal.");
|
|
1132
|
+
}
|
|
1133
|
+
return {
|
|
1134
|
+
threadId: normalizedThreadId,
|
|
1135
|
+
goal: await goal.getGoal({ threadId: normalizedThreadId, signal })
|
|
1136
|
+
};
|
|
1137
|
+
}
|
|
1138
|
+
if (command.type === "clear") {
|
|
1139
|
+
if (!normalizedThreadId) {
|
|
1140
|
+
throw new Error("Thread is required to clear the current goal.");
|
|
1141
|
+
}
|
|
1142
|
+
return {
|
|
1143
|
+
threadId: normalizedThreadId,
|
|
1144
|
+
goal: await goal.clearGoal({ threadId: normalizedThreadId, signal })
|
|
1145
|
+
};
|
|
1146
|
+
}
|
|
1147
|
+
if (command.type === "pause" || command.type === "resume") {
|
|
1148
|
+
if (!normalizedThreadId) {
|
|
1149
|
+
throw new Error("Thread is required to update the current goal.");
|
|
1150
|
+
}
|
|
1151
|
+
return {
|
|
1152
|
+
threadId: normalizedThreadId,
|
|
1153
|
+
goal: await goal.updateGoal({
|
|
1154
|
+
threadId: normalizedThreadId,
|
|
1155
|
+
status: command.type === "pause" ? "paused" : "active",
|
|
1156
|
+
signal
|
|
1157
|
+
})
|
|
1158
|
+
};
|
|
1159
|
+
}
|
|
1160
|
+
const objective = command.objective.trim();
|
|
1161
|
+
if (!objective) {
|
|
1162
|
+
throw new Error("Goal objective is required.");
|
|
1163
|
+
}
|
|
1164
|
+
if (command.type === "edit") {
|
|
1165
|
+
if (!normalizedThreadId) {
|
|
1166
|
+
const result2 = await goal.setGoal({
|
|
1167
|
+
threadId: null,
|
|
1168
|
+
assistantId,
|
|
1169
|
+
objective,
|
|
1170
|
+
runtimeCapabilities,
|
|
1171
|
+
signal
|
|
1172
|
+
});
|
|
1173
|
+
return result2;
|
|
1174
|
+
}
|
|
1175
|
+
return {
|
|
1176
|
+
threadId: normalizedThreadId,
|
|
1177
|
+
goal: await goal.updateGoal({
|
|
1178
|
+
threadId: normalizedThreadId,
|
|
1179
|
+
objective,
|
|
1180
|
+
signal
|
|
1181
|
+
})
|
|
1182
|
+
};
|
|
1183
|
+
}
|
|
1184
|
+
const result = await goal.setGoal({
|
|
1185
|
+
threadId: normalizedThreadId,
|
|
1186
|
+
assistantId,
|
|
1187
|
+
objective,
|
|
1188
|
+
runtimeCapabilities,
|
|
1189
|
+
signal
|
|
1190
|
+
});
|
|
1191
|
+
return result;
|
|
1192
|
+
}
|
|
1193
|
+
|
|
1080
1194
|
// src/lib/follow-ups.ts
|
|
1081
1195
|
function getComposerFollowUpShortcutLabels(queueShortcutLabel) {
|
|
1082
1196
|
return {
|
|
@@ -1296,6 +1410,8 @@ var en_US_default = {
|
|
|
1296
1410
|
referencedContentOnly: "Referenced content",
|
|
1297
1411
|
youLabel: "You",
|
|
1298
1412
|
scrollToBottom: "Scroll to bottom",
|
|
1413
|
+
loadMoreMessages: "Load more",
|
|
1414
|
+
loadingMoreMessages: "Loading...",
|
|
1299
1415
|
retryUpload: "Retry upload",
|
|
1300
1416
|
dropFilesTitle: "Drop files to upload",
|
|
1301
1417
|
dropFilesHint: "They will be attached to your next message.",
|
|
@@ -1343,6 +1459,27 @@ var en_US_default = {
|
|
|
1343
1459
|
label: "Context window",
|
|
1344
1460
|
full: "{{usedPercent}}% used ({{remainingPercent}}% left)",
|
|
1345
1461
|
tokensUsed: "{{used}} / {{max}} tokens used"
|
|
1462
|
+
},
|
|
1463
|
+
goal: {
|
|
1464
|
+
label: "Goal",
|
|
1465
|
+
unavailable: "Goal controls are not available for this client.",
|
|
1466
|
+
startThreadRequired: "Start a conversation before changing the goal.",
|
|
1467
|
+
elapsed: "{{elapsed}} elapsed",
|
|
1468
|
+
edit: "Edit goal",
|
|
1469
|
+
pause: "Pause goal",
|
|
1470
|
+
resume: "Resume goal",
|
|
1471
|
+
clear: "Clear goal",
|
|
1472
|
+
hide: "Hide goal",
|
|
1473
|
+
expandObjective: "Show full goal",
|
|
1474
|
+
collapseObjective: "Hide full goal",
|
|
1475
|
+
status: {
|
|
1476
|
+
active: "active",
|
|
1477
|
+
paused: "paused",
|
|
1478
|
+
blocked: "blocked",
|
|
1479
|
+
usage_limited: "usage limited",
|
|
1480
|
+
budget_limited: "budget limited",
|
|
1481
|
+
complete: "complete"
|
|
1482
|
+
}
|
|
1346
1483
|
}
|
|
1347
1484
|
},
|
|
1348
1485
|
history: {
|
|
@@ -1574,6 +1711,22 @@ var en_US_default = {
|
|
|
1574
1711
|
}
|
|
1575
1712
|
}
|
|
1576
1713
|
},
|
|
1714
|
+
middlewareEvent: {
|
|
1715
|
+
title: {
|
|
1716
|
+
default: "Middleware",
|
|
1717
|
+
ModelFallbackMiddleware: "Model fallback",
|
|
1718
|
+
ModelRetryMiddleware: "Model retry"
|
|
1719
|
+
},
|
|
1720
|
+
phase: {
|
|
1721
|
+
fallback_started: "Trying fallback model {{attempt}}/{{total}}",
|
|
1722
|
+
fallback_succeeded: "Fallback model succeeded {{attempt}}/{{total}}",
|
|
1723
|
+
fallback_failed: "Fallback model failed {{attempt}}/{{total}}",
|
|
1724
|
+
retry_scheduled: "Scheduling model retry {{attempt}}/{{total}}",
|
|
1725
|
+
retry_started: "Retrying model call {{attempt}}/{{total}}",
|
|
1726
|
+
retry_succeeded: "Model retry succeeded {{attempt}}/{{total}}",
|
|
1727
|
+
retry_failed: "Model retry failed {{attempt}}/{{total}}"
|
|
1728
|
+
}
|
|
1729
|
+
},
|
|
1577
1730
|
toolGroup: {
|
|
1578
1731
|
status: {
|
|
1579
1732
|
running: "Processing",
|
|
@@ -1653,6 +1806,8 @@ var zh_CN_default = {
|
|
|
1653
1806
|
referencedContentOnly: "\u5DF2\u5F15\u7528\u5185\u5BB9",
|
|
1654
1807
|
youLabel: "\u4F60",
|
|
1655
1808
|
scrollToBottom: "\u56DE\u5230\u5E95\u90E8",
|
|
1809
|
+
loadMoreMessages: "\u52A0\u8F7D\u66F4\u591A",
|
|
1810
|
+
loadingMoreMessages: "\u6B63\u5728\u52A0\u8F7D...",
|
|
1656
1811
|
retryUpload: "\u91CD\u65B0\u4E0A\u4F20",
|
|
1657
1812
|
dropFilesTitle: "\u677E\u624B\u4E0A\u4F20\u6587\u4EF6",
|
|
1658
1813
|
dropFilesHint: "\u6587\u4EF6\u4F1A\u9644\u52A0\u5230\u4F60\u7684\u4E0B\u4E00\u6761\u6D88\u606F\u3002",
|
|
@@ -1700,6 +1855,27 @@ var zh_CN_default = {
|
|
|
1700
1855
|
label: "\u4E0A\u4E0B\u6587\u7A97\u53E3",
|
|
1701
1856
|
full: "\u5DF2\u4F7F\u7528 {{usedPercent}}%\uFF08\u5269\u4F59 {{remainingPercent}}%\uFF09",
|
|
1702
1857
|
tokensUsed: "\u5DF2\u4F7F\u7528 {{used}} / {{max}} tokens"
|
|
1858
|
+
},
|
|
1859
|
+
goal: {
|
|
1860
|
+
label: "\u76EE\u6807",
|
|
1861
|
+
unavailable: "\u5F53\u524D\u5BA2\u6237\u7AEF\u4E0D\u652F\u6301\u76EE\u6807\u63A7\u5236\u3002",
|
|
1862
|
+
startThreadRequired: "\u8BF7\u5148\u5F00\u59CB\u4E00\u4E2A\u4F1A\u8BDD\u518D\u4FEE\u6539\u76EE\u6807\u3002",
|
|
1863
|
+
elapsed: "\u5DF2\u8FD0\u884C {{elapsed}}",
|
|
1864
|
+
edit: "\u7F16\u8F91\u76EE\u6807",
|
|
1865
|
+
pause: "\u6682\u505C\u76EE\u6807",
|
|
1866
|
+
resume: "\u6062\u590D\u76EE\u6807",
|
|
1867
|
+
clear: "\u6E05\u9664\u76EE\u6807",
|
|
1868
|
+
hide: "\u9690\u85CF\u76EE\u6807",
|
|
1869
|
+
expandObjective: "\u663E\u793A\u5B8C\u6574\u76EE\u6807",
|
|
1870
|
+
collapseObjective: "\u9690\u85CF\u5B8C\u6574\u76EE\u6807",
|
|
1871
|
+
status: {
|
|
1872
|
+
active: "\u8FD0\u884C\u4E2D",
|
|
1873
|
+
paused: "\u5DF2\u6682\u505C",
|
|
1874
|
+
blocked: "\u5DF2\u963B\u585E",
|
|
1875
|
+
usage_limited: "\u7528\u91CF\u53D7\u9650",
|
|
1876
|
+
budget_limited: "\u9884\u7B97\u8017\u5C3D",
|
|
1877
|
+
complete: "\u5DF2\u5B8C\u6210"
|
|
1878
|
+
}
|
|
1703
1879
|
}
|
|
1704
1880
|
},
|
|
1705
1881
|
history: {
|
|
@@ -1931,6 +2107,22 @@ var zh_CN_default = {
|
|
|
1931
2107
|
}
|
|
1932
2108
|
}
|
|
1933
2109
|
},
|
|
2110
|
+
middlewareEvent: {
|
|
2111
|
+
title: {
|
|
2112
|
+
default: "\u4E2D\u95F4\u4EF6",
|
|
2113
|
+
ModelFallbackMiddleware: "\u6A21\u578B\u56DE\u9000",
|
|
2114
|
+
ModelRetryMiddleware: "\u6A21\u578B\u91CD\u8BD5"
|
|
2115
|
+
},
|
|
2116
|
+
phase: {
|
|
2117
|
+
fallback_started: "\u6B63\u5728\u5C1D\u8BD5\u5907\u7528\u6A21\u578B {{attempt}}/{{total}}",
|
|
2118
|
+
fallback_succeeded: "\u5907\u7528\u6A21\u578B\u8C03\u7528\u6210\u529F {{attempt}}/{{total}}",
|
|
2119
|
+
fallback_failed: "\u5907\u7528\u6A21\u578B\u8C03\u7528\u5931\u8D25 {{attempt}}/{{total}}",
|
|
2120
|
+
retry_scheduled: "\u51C6\u5907\u91CD\u8BD5\u6A21\u578B\u8C03\u7528 {{attempt}}/{{total}}",
|
|
2121
|
+
retry_started: "\u6B63\u5728\u91CD\u8BD5\u6A21\u578B\u8C03\u7528 {{attempt}}/{{total}}",
|
|
2122
|
+
retry_succeeded: "\u6A21\u578B\u91CD\u8BD5\u6210\u529F {{attempt}}/{{total}}",
|
|
2123
|
+
retry_failed: "\u6A21\u578B\u91CD\u8BD5\u5931\u8D25 {{attempt}}/{{total}}"
|
|
2124
|
+
}
|
|
2125
|
+
},
|
|
1934
2126
|
toolGroup: {
|
|
1935
2127
|
status: {
|
|
1936
2128
|
running: "\u6B63\u5728\u5904\u7406",
|
|
@@ -2972,6 +3164,9 @@ function ComposerMenu({
|
|
|
2972
3164
|
selectedTool,
|
|
2973
3165
|
planModeEnabled = false,
|
|
2974
3166
|
onPlanModeChange,
|
|
3167
|
+
goalCommandAvailable = false,
|
|
3168
|
+
goalPanelOpen = false,
|
|
3169
|
+
onGoalPanelOpenChange,
|
|
2975
3170
|
runtimeCapabilities,
|
|
2976
3171
|
selectedRuntimeCapabilities,
|
|
2977
3172
|
onRuntimeCapabilityToggle,
|
|
@@ -3006,6 +3201,9 @@ function ComposerMenu({
|
|
|
3006
3201
|
const handlePlanModeToggle = () => {
|
|
3007
3202
|
onPlanModeChange?.(!planModeEnabled);
|
|
3008
3203
|
};
|
|
3204
|
+
const handleGoalCommandClick = () => {
|
|
3205
|
+
onGoalPanelOpenChange?.(!goalPanelOpen);
|
|
3206
|
+
};
|
|
3009
3207
|
const handleOpenChange = (nextOpen) => {
|
|
3010
3208
|
if (nextOpen) {
|
|
3011
3209
|
const boundary = triggerRef.current?.closest("[data-chatkit-root]") ?? void 0;
|
|
@@ -3303,6 +3501,45 @@ function ComposerMenu({
|
|
|
3303
3501
|
]
|
|
3304
3502
|
}
|
|
3305
3503
|
),
|
|
3504
|
+
goalCommandAvailable && /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
|
|
3505
|
+
DropdownMenuItem,
|
|
3506
|
+
{
|
|
3507
|
+
role: "switch",
|
|
3508
|
+
"aria-checked": goalPanelOpen,
|
|
3509
|
+
onSelect: (event) => {
|
|
3510
|
+
event.preventDefault();
|
|
3511
|
+
handleGoalCommandClick();
|
|
3512
|
+
},
|
|
3513
|
+
className: cn(
|
|
3514
|
+
"gap-3 px-3 py-2",
|
|
3515
|
+
menuItemRoundedClass,
|
|
3516
|
+
goalPanelOpen && "bg-muted"
|
|
3517
|
+
),
|
|
3518
|
+
children: [
|
|
3519
|
+
/* @__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 }) }),
|
|
3520
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "min-w-0 flex-1 text-left", children: t("chat.goal.label") }),
|
|
3521
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
3522
|
+
"span",
|
|
3523
|
+
{
|
|
3524
|
+
className: cn(
|
|
3525
|
+
"relative inline-flex h-6 w-10 shrink-0 items-center rounded-full transition-colors",
|
|
3526
|
+
goalPanelOpen ? "bg-primary" : "bg-muted-foreground/20"
|
|
3527
|
+
),
|
|
3528
|
+
"aria-hidden": "true",
|
|
3529
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
3530
|
+
"span",
|
|
3531
|
+
{
|
|
3532
|
+
className: cn(
|
|
3533
|
+
"inline-block h-5 w-5 rounded-full bg-background shadow-sm transition-transform",
|
|
3534
|
+
goalPanelOpen ? "translate-x-[18px]" : "translate-x-0.5"
|
|
3535
|
+
)
|
|
3536
|
+
}
|
|
3537
|
+
)
|
|
3538
|
+
}
|
|
3539
|
+
)
|
|
3540
|
+
]
|
|
3541
|
+
}
|
|
3542
|
+
),
|
|
3306
3543
|
hasRuntimeCapabilities && /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_jsx_runtime11.Fragment, { children: [
|
|
3307
3544
|
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(DropdownMenuSeparator, {}),
|
|
3308
3545
|
skills.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
|
|
@@ -3407,6 +3644,40 @@ function ComposerMenu({
|
|
|
3407
3644
|
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { children: t("composer.planModeActive") })
|
|
3408
3645
|
]
|
|
3409
3646
|
}
|
|
3647
|
+
),
|
|
3648
|
+
goalCommandAvailable && goalPanelOpen && /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
|
|
3649
|
+
"button",
|
|
3650
|
+
{
|
|
3651
|
+
type: "button",
|
|
3652
|
+
"aria-label": t("chat.goal.hide"),
|
|
3653
|
+
disabled,
|
|
3654
|
+
onClick: () => onGoalPanelOpenChange?.(false),
|
|
3655
|
+
className: cn(
|
|
3656
|
+
"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",
|
|
3657
|
+
roundedClass
|
|
3658
|
+
),
|
|
3659
|
+
children: [
|
|
3660
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("span", { className: "relative inline-flex h-4 w-4 items-center justify-center", children: [
|
|
3661
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
3662
|
+
import_lucide_react3.Target,
|
|
3663
|
+
{
|
|
3664
|
+
"data-slot": "goal-indicator-icon",
|
|
3665
|
+
size: 14,
|
|
3666
|
+
className: "absolute transition-all duration-150 group-hover:scale-75 group-hover:opacity-0"
|
|
3667
|
+
}
|
|
3668
|
+
),
|
|
3669
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
3670
|
+
import_lucide_react3.X,
|
|
3671
|
+
{
|
|
3672
|
+
"data-slot": "goal-remove-icon",
|
|
3673
|
+
size: 14,
|
|
3674
|
+
className: "absolute scale-75 opacity-0 transition-all duration-150 group-hover:scale-100 group-hover:opacity-100"
|
|
3675
|
+
}
|
|
3676
|
+
)
|
|
3677
|
+
] }),
|
|
3678
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { children: t("chat.goal.label") })
|
|
3679
|
+
]
|
|
3680
|
+
}
|
|
3410
3681
|
)
|
|
3411
3682
|
] });
|
|
3412
3683
|
}
|
|
@@ -6729,6 +7000,9 @@ function parseSlashCommandInvocation(value) {
|
|
|
6729
7000
|
};
|
|
6730
7001
|
}
|
|
6731
7002
|
function shouldSubmitRawSlashInvocation(command) {
|
|
7003
|
+
if (command.name === "goal" && command.source === "runtime") {
|
|
7004
|
+
return false;
|
|
7005
|
+
}
|
|
6732
7006
|
return command.action.type === "insert_invocation";
|
|
6733
7007
|
}
|
|
6734
7008
|
function resolvePromptWorkflowText(value, language) {
|
|
@@ -6766,6 +7040,14 @@ function createSlashCommandExecutionEffect(command, args, language) {
|
|
|
6766
7040
|
...command.kind === "prompt_workflow" ? { kind: command.kind } : {},
|
|
6767
7041
|
...workflow ? { workflow } : {}
|
|
6768
7042
|
};
|
|
7043
|
+
if (command.name === "goal" && command.source === "runtime") {
|
|
7044
|
+
return {
|
|
7045
|
+
type: "goal",
|
|
7046
|
+
args: args.trim(),
|
|
7047
|
+
commandSource,
|
|
7048
|
+
runtimeCapabilities: getActionRuntimeCapabilities(action) ?? void 0
|
|
7049
|
+
};
|
|
7050
|
+
}
|
|
6769
7051
|
if (command.source === "builtin" && action.type === "client_action") {
|
|
6770
7052
|
if (command.name === "plan") {
|
|
6771
7053
|
if (args.trim()) {
|
|
@@ -7127,7 +7409,9 @@ function useSlashCommands({
|
|
|
7127
7409
|
setComposerText,
|
|
7128
7410
|
focusComposerAt,
|
|
7129
7411
|
setPlanModeEnabled,
|
|
7412
|
+
setGoalPanelOpen,
|
|
7130
7413
|
onPetCommand,
|
|
7414
|
+
onGoalCommand,
|
|
7131
7415
|
addRunRuntimeCapabilities,
|
|
7132
7416
|
setRunRuntimeCapabilities,
|
|
7133
7417
|
insertComposerCapabilityToken,
|
|
@@ -7319,6 +7603,17 @@ function useSlashCommands({
|
|
|
7319
7603
|
submitPrompt(effect);
|
|
7320
7604
|
return true;
|
|
7321
7605
|
}
|
|
7606
|
+
if (effect.type === "goal") {
|
|
7607
|
+
void onGoalCommand?.({
|
|
7608
|
+
args: effect.args,
|
|
7609
|
+
commandSource: effect.commandSource,
|
|
7610
|
+
runtimeCapabilities: effect.runtimeCapabilities
|
|
7611
|
+
});
|
|
7612
|
+
setComposerText("", 0);
|
|
7613
|
+
setPalette(null);
|
|
7614
|
+
focusComposerAt(0);
|
|
7615
|
+
return true;
|
|
7616
|
+
}
|
|
7322
7617
|
if (effect.type === "client_action") {
|
|
7323
7618
|
if (parentMessenger) {
|
|
7324
7619
|
void parentMessenger.sendCommand("onWidgetAction", {
|
|
@@ -7347,6 +7642,7 @@ function useSlashCommands({
|
|
|
7347
7642
|
i18n2.language,
|
|
7348
7643
|
parentMessenger,
|
|
7349
7644
|
onPetCommand,
|
|
7645
|
+
onGoalCommand,
|
|
7350
7646
|
selectCapabilityById,
|
|
7351
7647
|
setComposerText,
|
|
7352
7648
|
setPalette,
|
|
@@ -7372,12 +7668,23 @@ function useSlashCommands({
|
|
|
7372
7668
|
toggleCapabilityGroup(option.capabilityType);
|
|
7373
7669
|
return;
|
|
7374
7670
|
}
|
|
7671
|
+
if (option.command.name === "goal" && option.command.source === "runtime") {
|
|
7672
|
+
setGoalPanelOpen((open) => !open);
|
|
7673
|
+
setComposerText("", 0);
|
|
7674
|
+
setPalette(null);
|
|
7675
|
+
focusComposerAt(0);
|
|
7676
|
+
return;
|
|
7677
|
+
}
|
|
7375
7678
|
executeSlashCommand(option.command, "");
|
|
7376
7679
|
},
|
|
7377
7680
|
[
|
|
7378
7681
|
executeSlashCommand,
|
|
7682
|
+
focusComposerAt,
|
|
7379
7683
|
insertComposerCapabilityToken,
|
|
7380
7684
|
palette,
|
|
7685
|
+
setGoalPanelOpen,
|
|
7686
|
+
setComposerText,
|
|
7687
|
+
setPalette,
|
|
7381
7688
|
toggleCapabilityGroup
|
|
7382
7689
|
]
|
|
7383
7690
|
);
|
|
@@ -7542,6 +7849,9 @@ function findFallbackRunByAgentKey(runs, agentKey, rootExecutionId) {
|
|
|
7542
7849
|
}
|
|
7543
7850
|
function getEntryRunTarget(entry, runs, rootExecutionId) {
|
|
7544
7851
|
const item = entry.item;
|
|
7852
|
+
if (typeof item !== "string" && isAgentEventContent(item) && item.event === "middleware_event") {
|
|
7853
|
+
return null;
|
|
7854
|
+
}
|
|
7545
7855
|
const executionId = readContentExecutionId(item);
|
|
7546
7856
|
const parentExecutionId = readContentParentExecutionId(item);
|
|
7547
7857
|
const agentKey = readContentAgentKey(item);
|
|
@@ -7616,7 +7926,9 @@ function refreshAgentNodeOrder(node) {
|
|
|
7616
7926
|
}
|
|
7617
7927
|
function buildAssistantRenderTree(message) {
|
|
7618
7928
|
const rootExecutionId = message.executionId;
|
|
7619
|
-
const runs = message.agentRuns ?? []
|
|
7929
|
+
const runs = (message.agentRuns ?? []).filter(
|
|
7930
|
+
(run) => !isMiddlewareAgentRunInfo(run)
|
|
7931
|
+
);
|
|
7620
7932
|
const entries = normalizeAssistantEntries(message);
|
|
7621
7933
|
const nodes = /* @__PURE__ */ new Map();
|
|
7622
7934
|
const rootEntries = [];
|
|
@@ -8894,6 +9206,87 @@ function safeJson2(value) {
|
|
|
8894
9206
|
function formatDisplayValue2(value) {
|
|
8895
9207
|
return typeof value === "string" ? value : safeJson2(value);
|
|
8896
9208
|
}
|
|
9209
|
+
function getAgentEventData(content) {
|
|
9210
|
+
return content.data && typeof content.data === "object" ? content.data : {};
|
|
9211
|
+
}
|
|
9212
|
+
function readTrimmedString(value) {
|
|
9213
|
+
if (typeof value !== "string") return null;
|
|
9214
|
+
const trimmed = value.trim();
|
|
9215
|
+
return trimmed ? trimmed : null;
|
|
9216
|
+
}
|
|
9217
|
+
function readDisplayToken(value) {
|
|
9218
|
+
if (typeof value === "number" && Number.isFinite(value)) {
|
|
9219
|
+
return String(value);
|
|
9220
|
+
}
|
|
9221
|
+
return readTrimmedString(value);
|
|
9222
|
+
}
|
|
9223
|
+
function getMiddlewareEventDetailData(data) {
|
|
9224
|
+
return data.data && typeof data.data === "object" && !Array.isArray(data.data) ? data.data : {};
|
|
9225
|
+
}
|
|
9226
|
+
function isMiddlewareEventContent(content) {
|
|
9227
|
+
return content.event === "middleware_event";
|
|
9228
|
+
}
|
|
9229
|
+
function getMiddlewareEventIcon(status) {
|
|
9230
|
+
const normalized = normalizeRunStatus(status);
|
|
9231
|
+
if (normalized === "running") {
|
|
9232
|
+
return { icon: import_lucide_react18.Loader2, spin: true };
|
|
9233
|
+
}
|
|
9234
|
+
if (isFailedRunStatus(status)) {
|
|
9235
|
+
return { icon: import_lucide_react18.XCircle, spin: false };
|
|
9236
|
+
}
|
|
9237
|
+
return { icon: import_lucide_react18.CheckCircle2, spin: false };
|
|
9238
|
+
}
|
|
9239
|
+
function MiddlewareEventRow({ content }) {
|
|
9240
|
+
const { t } = useChatkitTranslation();
|
|
9241
|
+
const eventData = getAgentEventData(content);
|
|
9242
|
+
const detailData = getMiddlewareEventDetailData(eventData);
|
|
9243
|
+
const middlewareName = readTrimmedString(eventData.middlewareName);
|
|
9244
|
+
const phase = readTrimmedString(eventData.phase);
|
|
9245
|
+
const fallbackTitle = readTrimmedString(content.title) || middlewareName || t("message.middlewareEvent.title.default");
|
|
9246
|
+
const label = middlewareName ? t(`message.middlewareEvent.title.${middlewareName}`, {
|
|
9247
|
+
defaultValue: fallbackTitle
|
|
9248
|
+
}) : fallbackTitle;
|
|
9249
|
+
const fallbackMessage = readTrimmedString(content.message) || phase || null;
|
|
9250
|
+
const attempt = readDisplayToken(detailData.attempt) ?? readDisplayToken(eventData.attempt);
|
|
9251
|
+
const total2 = readDisplayToken(detailData.totalAttempts) ?? readDisplayToken(detailData.total) ?? readDisplayToken(eventData.totalAttempts) ?? readDisplayToken(eventData.total);
|
|
9252
|
+
const detail = phase && attempt && total2 ? t(`message.middlewareEvent.phase.${phase}`, {
|
|
9253
|
+
attempt,
|
|
9254
|
+
total: total2,
|
|
9255
|
+
defaultValue: fallbackMessage ?? phase
|
|
9256
|
+
}) : fallbackMessage;
|
|
9257
|
+
const isError = content.error !== void 0 || isFailedRunStatus(content.status);
|
|
9258
|
+
const isRunning = isRunningRunStatus(content.status);
|
|
9259
|
+
const statusIcon = getMiddlewareEventIcon(content.status);
|
|
9260
|
+
const StatusIcon = statusIcon.icon;
|
|
9261
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
|
|
9262
|
+
"div",
|
|
9263
|
+
{
|
|
9264
|
+
"data-testid": "middleware-event-row",
|
|
9265
|
+
className: cn(
|
|
9266
|
+
"my-1 inline-flex max-w-full items-center gap-1.5 rounded-full border px-2 py-1 text-[11px] leading-4",
|
|
9267
|
+
isError ? "border-destructive/20 bg-destructive/5 text-destructive" : isRunning ? "border-border/60 bg-muted/20 text-muted-foreground" : "border-emerald-500/20 bg-emerald-500/5 text-muted-foreground"
|
|
9268
|
+
),
|
|
9269
|
+
children: [
|
|
9270
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
9271
|
+
StatusIcon,
|
|
9272
|
+
{
|
|
9273
|
+
className: cn(
|
|
9274
|
+
"h-3.5 w-3.5 shrink-0",
|
|
9275
|
+
isRunning && "text-blue-700",
|
|
9276
|
+
!isRunning && !isError && "text-emerald-600",
|
|
9277
|
+
statusIcon.spin && "animate-spin"
|
|
9278
|
+
)
|
|
9279
|
+
}
|
|
9280
|
+
),
|
|
9281
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "min-w-0 truncate font-medium", children: label }),
|
|
9282
|
+
detail ? /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(import_jsx_runtime33.Fragment, { children: [
|
|
9283
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "text-muted-foreground/50", children: "\xB7" }),
|
|
9284
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "min-w-0 truncate", children: detail })
|
|
9285
|
+
] }) : null
|
|
9286
|
+
]
|
|
9287
|
+
}
|
|
9288
|
+
);
|
|
9289
|
+
}
|
|
8897
9290
|
function formatStepDuration(durationMs) {
|
|
8898
9291
|
if (durationMs < 1e3) {
|
|
8899
9292
|
return `${durationMs}ms`;
|
|
@@ -8989,6 +9382,9 @@ function getAgentNodeUnits(node) {
|
|
|
8989
9382
|
].sort((a, b) => a.order - b.order);
|
|
8990
9383
|
}
|
|
8991
9384
|
function AgentEventRow({ content }) {
|
|
9385
|
+
if (isMiddlewareEventContent(content)) {
|
|
9386
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(MiddlewareEventRow, { content });
|
|
9387
|
+
}
|
|
8992
9388
|
const label = content.title?.trim() || content.message?.trim() || content.event?.trim() || "Event";
|
|
8993
9389
|
const detail = content.title?.trim() && content.message?.trim() ? content.message.trim() : null;
|
|
8994
9390
|
const isError = content.error !== void 0 || isFailedRunStatus(content.status);
|
|
@@ -9844,7 +10240,7 @@ function SandboxShellToolCallCard({ data }) {
|
|
|
9844
10240
|
"div",
|
|
9845
10241
|
{
|
|
9846
10242
|
className: cn(
|
|
9847
|
-
"group/shell-copy relative min-h-0 flex-1",
|
|
10243
|
+
"group/shell-copy relative min-h-0 flex-1 overflow-auto",
|
|
9848
10244
|
SANDBOX_SHELL_SECTION_GAP_CLASS
|
|
9849
10245
|
),
|
|
9850
10246
|
children: [
|
|
@@ -9852,7 +10248,7 @@ function SandboxShellToolCallCard({ data }) {
|
|
|
9852
10248
|
"pre",
|
|
9853
10249
|
{
|
|
9854
10250
|
className: cn(
|
|
9855
|
-
"min-h-0
|
|
10251
|
+
"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
10252
|
SANDBOX_SHELL_TEXT_CLASS
|
|
9857
10253
|
),
|
|
9858
10254
|
"data-slot": "sandbox-shell-output",
|
|
@@ -13165,6 +13561,127 @@ async function persistConversationRuntimeCapabilities({
|
|
|
13165
13561
|
};
|
|
13166
13562
|
}
|
|
13167
13563
|
|
|
13564
|
+
// src/lib/xpert-thread-goal-adapter.ts
|
|
13565
|
+
var SDK_GOAL_METHOD_ERROR = "Current Xpert SDK client does not expose conversation goal methods. Provide options.goal to use a custom goal adapter.";
|
|
13566
|
+
function requireBoundGoalMethod(owner, method) {
|
|
13567
|
+
if (!owner || !method) {
|
|
13568
|
+
throw new Error(SDK_GOAL_METHOD_ERROR);
|
|
13569
|
+
}
|
|
13570
|
+
return method.bind(owner);
|
|
13571
|
+
}
|
|
13572
|
+
function supportsXpertThreadGoalAdapter(client) {
|
|
13573
|
+
const conversations = client.conversations;
|
|
13574
|
+
return Boolean(
|
|
13575
|
+
conversations?.search && conversations.create && conversations.getGoal && conversations.setGoal && conversations.updateGoal && conversations.clearGoal
|
|
13576
|
+
);
|
|
13577
|
+
}
|
|
13578
|
+
async function findConversation(client, threadId) {
|
|
13579
|
+
return findConversationByThreadIdWithRetry(
|
|
13580
|
+
client,
|
|
13581
|
+
threadId
|
|
13582
|
+
);
|
|
13583
|
+
}
|
|
13584
|
+
async function requireConversation(client, threadId) {
|
|
13585
|
+
const conversation = await findConversation(client, threadId);
|
|
13586
|
+
if (!conversation?.id) {
|
|
13587
|
+
throw new Error("Conversation not found for this thread.");
|
|
13588
|
+
}
|
|
13589
|
+
return conversation;
|
|
13590
|
+
}
|
|
13591
|
+
function createXpertThreadGoalAdapter(client) {
|
|
13592
|
+
return {
|
|
13593
|
+
async getGoal({ threadId, signal }) {
|
|
13594
|
+
const conversation = await findConversation(client, threadId);
|
|
13595
|
+
if (!conversation?.id) {
|
|
13596
|
+
return null;
|
|
13597
|
+
}
|
|
13598
|
+
const getGoal = requireBoundGoalMethod(
|
|
13599
|
+
client.conversations,
|
|
13600
|
+
client.conversations.getGoal
|
|
13601
|
+
);
|
|
13602
|
+
return getGoal(conversation.id, { signal });
|
|
13603
|
+
},
|
|
13604
|
+
async setGoal({
|
|
13605
|
+
threadId,
|
|
13606
|
+
assistantId,
|
|
13607
|
+
objective,
|
|
13608
|
+
runtimeCapabilities,
|
|
13609
|
+
signal
|
|
13610
|
+
}) {
|
|
13611
|
+
const normalizedObjective = objective.trim();
|
|
13612
|
+
if (!normalizedObjective) {
|
|
13613
|
+
throw new Error("Goal objective is required.");
|
|
13614
|
+
}
|
|
13615
|
+
const setGoal = requireBoundGoalMethod(
|
|
13616
|
+
client.conversations,
|
|
13617
|
+
client.conversations.setGoal
|
|
13618
|
+
);
|
|
13619
|
+
const normalizedThreadId = threadId?.trim() || null;
|
|
13620
|
+
if (normalizedThreadId) {
|
|
13621
|
+
const conversation2 = await requireConversation(
|
|
13622
|
+
client,
|
|
13623
|
+
normalizedThreadId
|
|
13624
|
+
);
|
|
13625
|
+
const goal2 = await setGoal(
|
|
13626
|
+
conversation2.id,
|
|
13627
|
+
{ objective: normalizedObjective },
|
|
13628
|
+
{ signal }
|
|
13629
|
+
);
|
|
13630
|
+
return { threadId: normalizedThreadId, goal: goal2 };
|
|
13631
|
+
}
|
|
13632
|
+
const createConversation = requireBoundGoalMethod(
|
|
13633
|
+
client.conversations,
|
|
13634
|
+
client.conversations?.create
|
|
13635
|
+
);
|
|
13636
|
+
const conversation = await createConversation({
|
|
13637
|
+
xpertId: assistantId,
|
|
13638
|
+
...runtimeCapabilities ? {
|
|
13639
|
+
options: {
|
|
13640
|
+
runtimeCapabilities
|
|
13641
|
+
}
|
|
13642
|
+
} : {}
|
|
13643
|
+
});
|
|
13644
|
+
const conversationId = conversation.id?.trim();
|
|
13645
|
+
if (!conversationId) {
|
|
13646
|
+
throw new Error("Created conversation is missing id.");
|
|
13647
|
+
}
|
|
13648
|
+
const createdThreadId = conversation.threadId?.trim();
|
|
13649
|
+
if (!createdThreadId) {
|
|
13650
|
+
throw new Error("Created conversation is missing threadId.");
|
|
13651
|
+
}
|
|
13652
|
+
const goal = await setGoal(
|
|
13653
|
+
conversationId,
|
|
13654
|
+
{ objective: normalizedObjective },
|
|
13655
|
+
{ signal }
|
|
13656
|
+
);
|
|
13657
|
+
return { threadId: createdThreadId, goal };
|
|
13658
|
+
},
|
|
13659
|
+
async updateGoal({ threadId, objective, status, signal }) {
|
|
13660
|
+
const conversation = await requireConversation(client, threadId);
|
|
13661
|
+
const updateGoal = requireBoundGoalMethod(
|
|
13662
|
+
client.conversations,
|
|
13663
|
+
client.conversations.updateGoal
|
|
13664
|
+
);
|
|
13665
|
+
return updateGoal(
|
|
13666
|
+
conversation.id,
|
|
13667
|
+
{
|
|
13668
|
+
...objective !== void 0 ? { objective } : {},
|
|
13669
|
+
...status ? { status } : {}
|
|
13670
|
+
},
|
|
13671
|
+
{ signal }
|
|
13672
|
+
);
|
|
13673
|
+
},
|
|
13674
|
+
async clearGoal({ threadId, signal }) {
|
|
13675
|
+
const conversation = await requireConversation(client, threadId);
|
|
13676
|
+
const clearGoal = requireBoundGoalMethod(
|
|
13677
|
+
client.conversations,
|
|
13678
|
+
client.conversations.clearGoal
|
|
13679
|
+
);
|
|
13680
|
+
return clearGoal(conversation.id, { signal });
|
|
13681
|
+
}
|
|
13682
|
+
};
|
|
13683
|
+
}
|
|
13684
|
+
|
|
13168
13685
|
// src/lib/composer-parts.ts
|
|
13169
13686
|
var COMPOSER_CAPABILITY_TOKEN_LENGTH = 1;
|
|
13170
13687
|
var COMPOSER_CAPABILITY_TOKEN = "\uFFFC";
|
|
@@ -13488,6 +14005,21 @@ var import_meta2 = {};
|
|
|
13488
14005
|
var defaultApiUrl2 = import_meta2.env.VITE_XPERTAI_API_URL;
|
|
13489
14006
|
var COMPOSER_INPUT_MAX_HEIGHT = 128;
|
|
13490
14007
|
var LONG_TEXT_REFERENCE_THRESHOLD = 5e3;
|
|
14008
|
+
var GOAL_RUN_INPUT = "Continue working toward the active goal.";
|
|
14009
|
+
function hasRuntimeGoalCommand(runtimeCapabilities) {
|
|
14010
|
+
return runtimeCapabilities?.commands?.some((command) => command.name === "goal") ?? false;
|
|
14011
|
+
}
|
|
14012
|
+
function isGoalAdapter(value) {
|
|
14013
|
+
return Boolean(value) && typeof value === "object" && typeof value.getGoal === "function" && typeof value.setGoal === "function" && typeof value.updateGoal === "function" && typeof value.clearGoal === "function";
|
|
14014
|
+
}
|
|
14015
|
+
function formatGoalElapsed(seconds) {
|
|
14016
|
+
if (seconds < 60) {
|
|
14017
|
+
return `${seconds}s`;
|
|
14018
|
+
}
|
|
14019
|
+
const minutes = Math.floor(seconds / 60);
|
|
14020
|
+
const remainingSeconds = seconds % 60;
|
|
14021
|
+
return remainingSeconds ? `${minutes}m ${remainingSeconds}s` : `${minutes}m`;
|
|
14022
|
+
}
|
|
13491
14023
|
function getSlashPaletteEmptyLabelKey(palette, runtimeCapabilitiesReady) {
|
|
13492
14024
|
if (!palette.capabilityTypes || palette.capabilityTypes.length !== 1) {
|
|
13493
14025
|
return "composer.capabilities.emptySearch";
|
|
@@ -13697,6 +14229,12 @@ function Chat({
|
|
|
13697
14229
|
const [historyError, setHistoryError] = React48.useState(null);
|
|
13698
14230
|
const [assistantName, setAssistantName] = React48.useState(null);
|
|
13699
14231
|
const [assistantAvatar, setAssistantAvatar] = React48.useState(null);
|
|
14232
|
+
const [threadGoal, setThreadGoal] = React48.useState(null);
|
|
14233
|
+
const [goalError, setGoalError] = React48.useState(null);
|
|
14234
|
+
const [isGoalLoading, setIsGoalLoading] = React48.useState(false);
|
|
14235
|
+
const [isGoalPanelOpen, setIsGoalPanelOpen] = React48.useState(false);
|
|
14236
|
+
const [isGoalObjectiveExpanded, setIsGoalObjectiveExpanded] = React48.useState(false);
|
|
14237
|
+
const [goalElapsedStartedAt, setGoalElapsedStartedAt] = React48.useState(null);
|
|
13700
14238
|
const LOADING_DOTS_MIN_DURATION = 800;
|
|
13701
14239
|
const STREAMING_STATUS_REFRESH_MS = 250;
|
|
13702
14240
|
const [showLoadingDots, setShowLoadingDots] = React48.useState(false);
|
|
@@ -13748,6 +14286,21 @@ function Chat({
|
|
|
13748
14286
|
}, STREAMING_STATUS_REFRESH_MS);
|
|
13749
14287
|
return () => window.clearInterval(timer);
|
|
13750
14288
|
}, [stream.isLoading]);
|
|
14289
|
+
React48.useEffect(() => {
|
|
14290
|
+
if (threadGoal?.status === "active" && stream.isLoading) {
|
|
14291
|
+
setGoalElapsedStartedAt(Date.now());
|
|
14292
|
+
return;
|
|
14293
|
+
}
|
|
14294
|
+
setGoalElapsedStartedAt(null);
|
|
14295
|
+
}, [
|
|
14296
|
+
stream.isLoading,
|
|
14297
|
+
threadGoal?.elapsedSeconds,
|
|
14298
|
+
threadGoal?.id,
|
|
14299
|
+
threadGoal?.status
|
|
14300
|
+
]);
|
|
14301
|
+
React48.useEffect(() => {
|
|
14302
|
+
setIsGoalObjectiveExpanded(false);
|
|
14303
|
+
}, [threadGoal?.id]);
|
|
13751
14304
|
const [composerParts, setComposerParts] = React48.useState([]);
|
|
13752
14305
|
const [renderedComposerParts, setRenderedComposerParts] = React48.useState([]);
|
|
13753
14306
|
const [composerDomVersion, setComposerDomVersion] = React48.useState(0);
|
|
@@ -13795,6 +14348,7 @@ function Chat({
|
|
|
13795
14348
|
const forceFollowRef = React48.useRef(false);
|
|
13796
14349
|
const previousMessageCountRef = React48.useRef(0);
|
|
13797
14350
|
const previousScrollTopRef = React48.useRef(0);
|
|
14351
|
+
const isPrependingHistoryMessagesRef = React48.useRef(false);
|
|
13798
14352
|
const autoScrollFrameRef = React48.useRef(null);
|
|
13799
14353
|
const isPointerDownRef = React48.useRef(false);
|
|
13800
14354
|
const lastTouchYRef = React48.useRef(null);
|
|
@@ -13853,13 +14407,20 @@ function Chat({
|
|
|
13853
14407
|
() => stream.messages ?? [],
|
|
13854
14408
|
[stream.messages]
|
|
13855
14409
|
);
|
|
14410
|
+
const historyMessagePagination = stream.historyMessagePagination;
|
|
14411
|
+
const isLoadingMoreMessages = Boolean(
|
|
14412
|
+
historyMessagePagination?.isLoadingMore
|
|
14413
|
+
);
|
|
14414
|
+
const canLoadMoreMessages = Boolean(historyMessagePagination?.hasMore);
|
|
13856
14415
|
const draft = React48.useMemo(
|
|
13857
14416
|
() => getComposerPlainText(composerParts),
|
|
13858
14417
|
[composerParts]
|
|
13859
14418
|
);
|
|
13860
14419
|
const trimmedDraft = draft.trim();
|
|
13861
14420
|
const hasReferences = references.length > 0;
|
|
13862
|
-
const
|
|
14421
|
+
const hasCompletedGoal = threadGoal?.status === "complete";
|
|
14422
|
+
const isGoalModeOpen = isGoalPanelOpen;
|
|
14423
|
+
const isComposerStacked = planModeEnabled || isGoalModeOpen || Boolean(selectedTool);
|
|
13863
14424
|
const isComposerInputEmpty = getComposerEditingLength(composerParts) === 0;
|
|
13864
14425
|
const composerInputRoundedClass = getComposerInputRoundedClass(theme.radius, {
|
|
13865
14426
|
isEmpty: isComposerInputEmpty,
|
|
@@ -13880,6 +14441,18 @@ function Chat({
|
|
|
13880
14441
|
() => getRuntimeCapabilityOptions(runtimeCapabilities),
|
|
13881
14442
|
[runtimeCapabilities]
|
|
13882
14443
|
);
|
|
14444
|
+
const goalCommandAvailable = hasRuntimeGoalCommand(runtimeCapabilities);
|
|
14445
|
+
const goalAdapter = React48.useMemo(
|
|
14446
|
+
() => {
|
|
14447
|
+
if (isGoalAdapter(options?.goal)) {
|
|
14448
|
+
return options.goal;
|
|
14449
|
+
}
|
|
14450
|
+
return supportsXpertThreadGoalAdapter(stream.client) ? createXpertThreadGoalAdapter(stream.client) : null;
|
|
14451
|
+
},
|
|
14452
|
+
[options?.goal, stream.client]
|
|
14453
|
+
);
|
|
14454
|
+
const showGoalStatus = goalCommandAvailable && !hasCompletedGoal && (Boolean(goalError) || threadGoal?.status === "active" && stream.isLoading);
|
|
14455
|
+
const displayedGoalElapsedSeconds = threadGoal ? (threadGoal.elapsedSeconds ?? 0) + (goalElapsedStartedAt ? Math.max(0, Math.floor((streamingNow - goalElapsedStartedAt) / 1e3)) : 0) : 0;
|
|
13883
14456
|
const effectiveSessionRuntimeCapabilities = React48.useMemo(
|
|
13884
14457
|
() => runtimeCapabilitiesReady && runtimeCapabilities ? mergeRuntimeCapabilitiesSelections(
|
|
13885
14458
|
runtimeCapabilities,
|
|
@@ -14217,6 +14790,10 @@ function Chat({
|
|
|
14217
14790
|
React48.useEffect(() => {
|
|
14218
14791
|
const messageCountChanged = messages.length !== previousMessageCountRef.current;
|
|
14219
14792
|
previousMessageCountRef.current = messages.length;
|
|
14793
|
+
if (isPrependingHistoryMessagesRef.current) {
|
|
14794
|
+
setHasUpdatesBelow(false);
|
|
14795
|
+
return;
|
|
14796
|
+
}
|
|
14220
14797
|
if (!shouldAutoScrollRef.current) {
|
|
14221
14798
|
if (messageCountChanged || stream.isLoading) {
|
|
14222
14799
|
setHasUpdatesBelow(true);
|
|
@@ -14429,6 +15006,49 @@ function Chat({
|
|
|
14429
15006
|
stream.client,
|
|
14430
15007
|
stream.threadId
|
|
14431
15008
|
]);
|
|
15009
|
+
React48.useEffect(() => {
|
|
15010
|
+
setThreadGoal(stream.threadGoal);
|
|
15011
|
+
}, [stream.threadGoal]);
|
|
15012
|
+
React48.useEffect(() => {
|
|
15013
|
+
const threadId = stream.threadId?.trim();
|
|
15014
|
+
if (!threadId || !goalCommandAvailable) {
|
|
15015
|
+
setThreadGoal(null);
|
|
15016
|
+
setGoalError(null);
|
|
15017
|
+
setIsGoalLoading(false);
|
|
15018
|
+
setIsGoalPanelOpen(false);
|
|
15019
|
+
return;
|
|
15020
|
+
}
|
|
15021
|
+
if (!goalAdapter) {
|
|
15022
|
+
setThreadGoal(null);
|
|
15023
|
+
setGoalError(null);
|
|
15024
|
+
setIsGoalLoading(false);
|
|
15025
|
+
setIsGoalPanelOpen(false);
|
|
15026
|
+
return;
|
|
15027
|
+
}
|
|
15028
|
+
const controller = new AbortController();
|
|
15029
|
+
setIsGoalLoading(true);
|
|
15030
|
+
setGoalError(null);
|
|
15031
|
+
void loadThreadGoal({
|
|
15032
|
+
goal: goalAdapter,
|
|
15033
|
+
threadId,
|
|
15034
|
+
signal: controller.signal
|
|
15035
|
+
}).then((goal) => {
|
|
15036
|
+
if (!controller.signal.aborted) {
|
|
15037
|
+
setThreadGoal(goal);
|
|
15038
|
+
}
|
|
15039
|
+
}).catch((error) => {
|
|
15040
|
+
if (controller.signal.aborted) {
|
|
15041
|
+
return;
|
|
15042
|
+
}
|
|
15043
|
+
setGoalError(error instanceof Error ? error.message : String(error));
|
|
15044
|
+
setThreadGoal(null);
|
|
15045
|
+
}).finally(() => {
|
|
15046
|
+
if (!controller.signal.aborted) {
|
|
15047
|
+
setIsGoalLoading(false);
|
|
15048
|
+
}
|
|
15049
|
+
});
|
|
15050
|
+
return () => controller.abort();
|
|
15051
|
+
}, [goalAdapter, goalCommandAvailable, stream.threadId]);
|
|
14432
15052
|
const uploadedFiles = attachmentState.uploadedFiles;
|
|
14433
15053
|
const handleSessionRuntimeCapabilityToggle = React48.useCallback(
|
|
14434
15054
|
(type, id, selected) => {
|
|
@@ -14640,6 +15260,124 @@ function Chat({
|
|
|
14640
15260
|
t
|
|
14641
15261
|
]
|
|
14642
15262
|
);
|
|
15263
|
+
const handleGoalCommand = React48.useCallback(
|
|
15264
|
+
async ({
|
|
15265
|
+
args,
|
|
15266
|
+
commandSource,
|
|
15267
|
+
runtimeCapabilities: commandRuntimeCapabilities,
|
|
15268
|
+
visibleInput
|
|
15269
|
+
}) => {
|
|
15270
|
+
const command = parseGoalCommand(args);
|
|
15271
|
+
const threadId = stream.threadId?.trim();
|
|
15272
|
+
setGoalError(null);
|
|
15273
|
+
if (!threadId) {
|
|
15274
|
+
if (command.type === "show") {
|
|
15275
|
+
setThreadGoal(null);
|
|
15276
|
+
setIsGoalLoading(false);
|
|
15277
|
+
return;
|
|
15278
|
+
}
|
|
15279
|
+
if (command.type !== "set" && command.type !== "edit") {
|
|
15280
|
+
setGoalError(t("chat.goal.startThreadRequired"));
|
|
15281
|
+
return;
|
|
15282
|
+
}
|
|
15283
|
+
}
|
|
15284
|
+
if (!goalAdapter) {
|
|
15285
|
+
setGoalError(t("chat.goal.unavailable"));
|
|
15286
|
+
return;
|
|
15287
|
+
}
|
|
15288
|
+
setIsGoalLoading(true);
|
|
15289
|
+
try {
|
|
15290
|
+
const result = await executeThreadGoalCommand({
|
|
15291
|
+
goal: goalAdapter,
|
|
15292
|
+
threadId,
|
|
15293
|
+
assistantId: stream.assistantId,
|
|
15294
|
+
command,
|
|
15295
|
+
runtimeCapabilities: commandRuntimeCapabilities
|
|
15296
|
+
});
|
|
15297
|
+
if (!threadId && result.threadId) {
|
|
15298
|
+
stream.reset(result.threadId, []);
|
|
15299
|
+
void refreshThreads();
|
|
15300
|
+
}
|
|
15301
|
+
const startsGoalRun = result.goal?.status === "active" && (command.type === "set" || command.type === "edit" || command.type === "resume");
|
|
15302
|
+
setThreadGoal(command.type === "clear" ? null : result.goal);
|
|
15303
|
+
if (command.type === "clear" || startsGoalRun) {
|
|
15304
|
+
setIsGoalPanelOpen(false);
|
|
15305
|
+
}
|
|
15306
|
+
if (startsGoalRun) {
|
|
15307
|
+
const goalRunThreadId = result.threadId ?? threadId;
|
|
15308
|
+
const runtimeCapabilitiesForGoalRun = runtimeCapabilities && runtimeCapabilitiesReady ? createRuntimeCapabilitiesForSubmit({
|
|
15309
|
+
capabilities: runtimeCapabilities,
|
|
15310
|
+
available: effectiveSessionRuntimeCapabilities,
|
|
15311
|
+
recommended: commandRuntimeCapabilities
|
|
15312
|
+
}) : commandRuntimeCapabilities ?? null;
|
|
15313
|
+
const inputPayload = {
|
|
15314
|
+
input: GOAL_RUN_INPUT,
|
|
15315
|
+
commandSource,
|
|
15316
|
+
goalRun: true,
|
|
15317
|
+
...runtimeCapabilitiesForGoalRun ? { runtimeCapabilities: runtimeCapabilitiesForGoalRun } : {}
|
|
15318
|
+
};
|
|
15319
|
+
const requestOptions = buildInjectedRequestOptions({
|
|
15320
|
+
defaults: options?.request,
|
|
15321
|
+
humanInput: inputPayload
|
|
15322
|
+
});
|
|
15323
|
+
const visibleGoalMessage = visibleInput ? {
|
|
15324
|
+
id: createMessageId(),
|
|
15325
|
+
type: "human",
|
|
15326
|
+
content: visibleInput,
|
|
15327
|
+
submittedInput: visibleInput
|
|
15328
|
+
} : null;
|
|
15329
|
+
void stream.submit(
|
|
15330
|
+
{
|
|
15331
|
+
input: inputPayload,
|
|
15332
|
+
...requestOptions.state ? { state: requestOptions.state } : {}
|
|
15333
|
+
},
|
|
15334
|
+
{
|
|
15335
|
+
...goalRunThreadId && !threadId ? {
|
|
15336
|
+
threadId: goalRunThreadId,
|
|
15337
|
+
joinExistingThread: true
|
|
15338
|
+
} : {},
|
|
15339
|
+
...requestOptions.context ? { context: requestOptions.context } : {},
|
|
15340
|
+
...requestOptions.config ? { config: requestOptions.config } : {},
|
|
15341
|
+
...visibleGoalMessage ? {
|
|
15342
|
+
preserveOptimisticMessages: true,
|
|
15343
|
+
optimisticValues: (prev) => {
|
|
15344
|
+
const prevMessages = prev?.messages ?? [];
|
|
15345
|
+
return {
|
|
15346
|
+
...prev,
|
|
15347
|
+
messages: [...prevMessages, visibleGoalMessage]
|
|
15348
|
+
};
|
|
15349
|
+
}
|
|
15350
|
+
} : {}
|
|
15351
|
+
}
|
|
15352
|
+
).catch((error) => {
|
|
15353
|
+
setGoalError(
|
|
15354
|
+
error instanceof Error ? error.message : String(error)
|
|
15355
|
+
);
|
|
15356
|
+
});
|
|
15357
|
+
}
|
|
15358
|
+
} catch (error) {
|
|
15359
|
+
setGoalError(error instanceof Error ? error.message : String(error));
|
|
15360
|
+
} finally {
|
|
15361
|
+
setIsGoalLoading(false);
|
|
15362
|
+
}
|
|
15363
|
+
},
|
|
15364
|
+
[
|
|
15365
|
+
effectiveSessionRuntimeCapabilities,
|
|
15366
|
+
goalAdapter,
|
|
15367
|
+
options?.request,
|
|
15368
|
+
refreshThreads,
|
|
15369
|
+
runtimeCapabilities,
|
|
15370
|
+
runtimeCapabilitiesReady,
|
|
15371
|
+
stream,
|
|
15372
|
+
t
|
|
15373
|
+
]
|
|
15374
|
+
);
|
|
15375
|
+
const handleGoalPanelOpenChange = React48.useCallback(
|
|
15376
|
+
(open) => {
|
|
15377
|
+
setIsGoalPanelOpen(open);
|
|
15378
|
+
},
|
|
15379
|
+
[]
|
|
15380
|
+
);
|
|
14643
15381
|
const addRunRuntimeCapabilities = React48.useCallback(
|
|
14644
15382
|
(selection) => {
|
|
14645
15383
|
setRunRuntimeCapabilities(
|
|
@@ -14702,7 +15440,9 @@ function Chat({
|
|
|
14702
15440
|
setComposerText,
|
|
14703
15441
|
focusComposerAt,
|
|
14704
15442
|
setPlanModeEnabled,
|
|
15443
|
+
setGoalPanelOpen: setIsGoalPanelOpen,
|
|
14705
15444
|
onPetCommand: handlePetCommand,
|
|
15445
|
+
onGoalCommand: handleGoalCommand,
|
|
14706
15446
|
addRunRuntimeCapabilities,
|
|
14707
15447
|
setRunRuntimeCapabilities,
|
|
14708
15448
|
insertComposerCapabilityToken,
|
|
@@ -14759,11 +15499,42 @@ function Chat({
|
|
|
14759
15499
|
container.scrollTop += optionRect.bottom - containerRect.bottom;
|
|
14760
15500
|
}
|
|
14761
15501
|
}, [runtimeCapabilityPalette, slashPaletteOptions.length]);
|
|
15502
|
+
const submitGoalModeDraft = React48.useCallback(() => {
|
|
15503
|
+
const objective = getComposerPlainText(composerPartsRef.current).trim();
|
|
15504
|
+
if (!isGoalModeOpen || !goalCommandAvailable || !objective) {
|
|
15505
|
+
return false;
|
|
15506
|
+
}
|
|
15507
|
+
setComposerText("", 0);
|
|
15508
|
+
setRuntimeCapabilityPalette(null);
|
|
15509
|
+
focusComposerAt(0);
|
|
15510
|
+
void handleGoalCommand({
|
|
15511
|
+
args: objective,
|
|
15512
|
+
commandSource: {
|
|
15513
|
+
type: "slash_command",
|
|
15514
|
+
name: "goal",
|
|
15515
|
+
source: "runtime",
|
|
15516
|
+
executionType: "insert_invocation"
|
|
15517
|
+
},
|
|
15518
|
+
runtimeCapabilities: runRuntimeCapabilities,
|
|
15519
|
+
visibleInput: objective
|
|
15520
|
+
});
|
|
15521
|
+
return true;
|
|
15522
|
+
}, [
|
|
15523
|
+
focusComposerAt,
|
|
15524
|
+
goalCommandAvailable,
|
|
15525
|
+
handleGoalCommand,
|
|
15526
|
+
isGoalModeOpen,
|
|
15527
|
+
runRuntimeCapabilities,
|
|
15528
|
+
setComposerText
|
|
15529
|
+
]);
|
|
14762
15530
|
const handleSubmit = (event) => {
|
|
14763
15531
|
event.preventDefault();
|
|
14764
15532
|
if (executeSlashCommandFromDraft()) {
|
|
14765
15533
|
return;
|
|
14766
15534
|
}
|
|
15535
|
+
if (submitGoalModeDraft()) {
|
|
15536
|
+
return;
|
|
15537
|
+
}
|
|
14767
15538
|
submitDraft();
|
|
14768
15539
|
};
|
|
14769
15540
|
const handleEditPendingFollowUp = React48.useCallback(
|
|
@@ -14928,6 +15699,9 @@ function Chat({
|
|
|
14928
15699
|
if (executeSlashCommandFromDraft()) {
|
|
14929
15700
|
return;
|
|
14930
15701
|
}
|
|
15702
|
+
if (submitGoalModeDraft()) {
|
|
15703
|
+
return;
|
|
15704
|
+
}
|
|
14931
15705
|
submitDraft(
|
|
14932
15706
|
getBusyComposerShortcutFollowUpMode(event.metaKey || event.ctrlKey)
|
|
14933
15707
|
);
|
|
@@ -14936,6 +15710,9 @@ function Chat({
|
|
|
14936
15710
|
if (executeSlashCommandFromDraft()) {
|
|
14937
15711
|
return;
|
|
14938
15712
|
}
|
|
15713
|
+
if (submitGoalModeDraft()) {
|
|
15714
|
+
return;
|
|
15715
|
+
}
|
|
14939
15716
|
submitDraft();
|
|
14940
15717
|
};
|
|
14941
15718
|
const handleComposerPaste = React48.useCallback(
|
|
@@ -15116,6 +15893,40 @@ function Chat({
|
|
|
15116
15893
|
},
|
|
15117
15894
|
[missingConfig, missingConfigShortMessage, stream, t]
|
|
15118
15895
|
);
|
|
15896
|
+
const handleLoadMoreMessages = React48.useCallback(async () => {
|
|
15897
|
+
if (!canLoadMoreMessages || isLoadingMoreMessages) {
|
|
15898
|
+
return;
|
|
15899
|
+
}
|
|
15900
|
+
const viewport = viewportRef.current;
|
|
15901
|
+
const previousScrollHeight = viewport?.scrollHeight ?? 0;
|
|
15902
|
+
const previousScrollTop = viewport?.scrollTop ?? 0;
|
|
15903
|
+
isPrependingHistoryMessagesRef.current = true;
|
|
15904
|
+
shouldAutoScrollRef.current = false;
|
|
15905
|
+
forceFollowRef.current = false;
|
|
15906
|
+
setHasUpdatesBelow(false);
|
|
15907
|
+
setHistoryError(null);
|
|
15908
|
+
const restoreScrollPosition = () => {
|
|
15909
|
+
requestAnimationFrame(() => {
|
|
15910
|
+
const nextViewport = viewportRef.current;
|
|
15911
|
+
if (nextViewport) {
|
|
15912
|
+
const nextScrollTop = nextViewport.scrollHeight - previousScrollHeight + previousScrollTop;
|
|
15913
|
+
nextViewport.scrollTop = Math.max(0, nextScrollTop);
|
|
15914
|
+
previousScrollTopRef.current = nextViewport.scrollTop;
|
|
15915
|
+
}
|
|
15916
|
+
isPrependingHistoryMessagesRef.current = false;
|
|
15917
|
+
});
|
|
15918
|
+
};
|
|
15919
|
+
try {
|
|
15920
|
+
await stream.loadMoreConversationMessages();
|
|
15921
|
+
restoreScrollPosition();
|
|
15922
|
+
} catch (err) {
|
|
15923
|
+
isPrependingHistoryMessagesRef.current = false;
|
|
15924
|
+
console.warn("Failed to load more thread messages", err);
|
|
15925
|
+
setHistoryError(
|
|
15926
|
+
err instanceof Error ? err.message : t("chat.errors.loadMessages")
|
|
15927
|
+
);
|
|
15928
|
+
}
|
|
15929
|
+
}, [canLoadMoreMessages, isLoadingMoreMessages, stream, t]);
|
|
15119
15930
|
const handleNewThread = async () => {
|
|
15120
15931
|
if (missingConfig || isHistoryLoading) return;
|
|
15121
15932
|
setHistoryError(null);
|
|
@@ -15345,13 +16156,29 @@ function Chat({
|
|
|
15345
16156
|
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
16157
|
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
16158
|
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)(
|
|
16159
|
+
messages.length === 0 && !canLoadMoreMessages ? /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
15349
16160
|
StartScreen,
|
|
15350
16161
|
{
|
|
15351
16162
|
startScreen,
|
|
15352
16163
|
onPromptClick: handlePromptClick
|
|
15353
16164
|
}
|
|
15354
16165
|
) : /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { className: "space-y-4", children: [
|
|
16166
|
+
canLoadMoreMessages && /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { className: "flex items-center gap-3 py-1", children: [
|
|
16167
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)("div", { className: "h-px min-w-8 flex-1 bg-border" }),
|
|
16168
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
16169
|
+
Button,
|
|
16170
|
+
{
|
|
16171
|
+
type: "button",
|
|
16172
|
+
variant: "ghost",
|
|
16173
|
+
size: "sm",
|
|
16174
|
+
onClick: handleLoadMoreMessages,
|
|
16175
|
+
disabled: isLoadingMoreMessages,
|
|
16176
|
+
className: "h-7 px-2 text-xs font-medium text-muted-foreground hover:text-foreground",
|
|
16177
|
+
children: isLoadingMoreMessages ? t("chat.loadingMoreMessages") : t("chat.loadMoreMessages")
|
|
16178
|
+
}
|
|
16179
|
+
),
|
|
16180
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)("div", { className: "h-px min-w-8 flex-1 bg-border" })
|
|
16181
|
+
] }),
|
|
15355
16182
|
messages.map((message, index) => {
|
|
15356
16183
|
const messageType = String(message.type);
|
|
15357
16184
|
const isAssistantMessage = messageType === "assistant" || messageType === "ai";
|
|
@@ -15628,6 +16455,132 @@ function Chat({
|
|
|
15628
16455
|
`${option.type}:${option.id}`
|
|
15629
16456
|
))
|
|
15630
16457
|
] }),
|
|
16458
|
+
showGoalStatus && /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(
|
|
16459
|
+
"div",
|
|
16460
|
+
{
|
|
16461
|
+
className: cn(
|
|
16462
|
+
"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",
|
|
16463
|
+
isGoalObjectiveExpanded ? "items-start" : "items-center"
|
|
16464
|
+
),
|
|
16465
|
+
children: [
|
|
16466
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
16467
|
+
import_lucide_react28.Target,
|
|
16468
|
+
{
|
|
16469
|
+
className: cn(
|
|
16470
|
+
"size-4 shrink-0 text-muted-foreground",
|
|
16471
|
+
isGoalObjectiveExpanded && "mt-1"
|
|
16472
|
+
)
|
|
16473
|
+
}
|
|
16474
|
+
),
|
|
16475
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { className: "min-w-0 flex-1", children: [
|
|
16476
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { className: "flex min-w-0 items-center gap-2", children: [
|
|
16477
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)("span", { className: "font-medium", children: t("chat.goal.label") }),
|
|
16478
|
+
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}`) }),
|
|
16479
|
+
isGoalLoading && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_lucide_react28.Loader2, { className: "size-3 animate-spin text-muted-foreground" })
|
|
16480
|
+
] }),
|
|
16481
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
16482
|
+
"div",
|
|
16483
|
+
{
|
|
16484
|
+
className: cn(
|
|
16485
|
+
"mt-0.5 text-muted-foreground",
|
|
16486
|
+
threadGoal?.objective && !goalError && isGoalObjectiveExpanded ? "whitespace-pre-wrap break-words" : "truncate"
|
|
16487
|
+
),
|
|
16488
|
+
children: goalError || threadGoal?.objective
|
|
16489
|
+
}
|
|
16490
|
+
),
|
|
16491
|
+
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", {
|
|
16492
|
+
elapsed: formatGoalElapsed(displayedGoalElapsedSeconds)
|
|
16493
|
+
}) }) })
|
|
16494
|
+
] }),
|
|
16495
|
+
threadGoal && /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("div", { className: "flex shrink-0 items-center gap-1", children: [
|
|
16496
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(Tooltip, { children: [
|
|
16497
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
16498
|
+
Button,
|
|
16499
|
+
{
|
|
16500
|
+
type: "button",
|
|
16501
|
+
variant: "ghost",
|
|
16502
|
+
size: "icon-xs",
|
|
16503
|
+
disabled: isGoalLoading,
|
|
16504
|
+
onClick: () => {
|
|
16505
|
+
const prefix = "/goal edit ";
|
|
16506
|
+
setComposerText(`${prefix}${threadGoal.objective}`);
|
|
16507
|
+
},
|
|
16508
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_lucide_react28.Pencil, { className: "size-3" })
|
|
16509
|
+
}
|
|
16510
|
+
) }),
|
|
16511
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(TooltipContent, { children: t("chat.goal.edit") })
|
|
16512
|
+
] }),
|
|
16513
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(Tooltip, { children: [
|
|
16514
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
16515
|
+
Button,
|
|
16516
|
+
{
|
|
16517
|
+
type: "button",
|
|
16518
|
+
variant: "ghost",
|
|
16519
|
+
size: "icon-xs",
|
|
16520
|
+
disabled: isGoalLoading,
|
|
16521
|
+
onClick: () => void handleGoalCommand({
|
|
16522
|
+
args: threadGoal.status === "paused" ? "resume" : "pause",
|
|
16523
|
+
commandSource: {
|
|
16524
|
+
type: "slash_command",
|
|
16525
|
+
name: "goal",
|
|
16526
|
+
source: "runtime",
|
|
16527
|
+
executionType: "insert_invocation"
|
|
16528
|
+
}
|
|
16529
|
+
}),
|
|
16530
|
+
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" })
|
|
16531
|
+
}
|
|
16532
|
+
) }),
|
|
16533
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(TooltipContent, { children: threadGoal.status === "paused" ? t("chat.goal.resume") : t("chat.goal.pause") })
|
|
16534
|
+
] }),
|
|
16535
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(Tooltip, { children: [
|
|
16536
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
16537
|
+
Button,
|
|
16538
|
+
{
|
|
16539
|
+
type: "button",
|
|
16540
|
+
variant: "ghost",
|
|
16541
|
+
size: "icon-xs",
|
|
16542
|
+
disabled: isGoalLoading,
|
|
16543
|
+
onClick: () => void handleGoalCommand({
|
|
16544
|
+
args: "clear",
|
|
16545
|
+
commandSource: {
|
|
16546
|
+
type: "slash_command",
|
|
16547
|
+
name: "goal",
|
|
16548
|
+
source: "runtime",
|
|
16549
|
+
executionType: "insert_invocation"
|
|
16550
|
+
}
|
|
16551
|
+
}),
|
|
16552
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_lucide_react28.Trash2, { className: "size-3" })
|
|
16553
|
+
}
|
|
16554
|
+
) }),
|
|
16555
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(TooltipContent, { children: t("chat.goal.clear") })
|
|
16556
|
+
] }),
|
|
16557
|
+
threadGoal.objective && !goalError && /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(Tooltip, { children: [
|
|
16558
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
16559
|
+
Button,
|
|
16560
|
+
{
|
|
16561
|
+
type: "button",
|
|
16562
|
+
variant: "ghost",
|
|
16563
|
+
size: "icon-xs",
|
|
16564
|
+
"aria-expanded": isGoalObjectiveExpanded,
|
|
16565
|
+
"aria-label": isGoalObjectiveExpanded ? t("chat.goal.collapseObjective") : t("chat.goal.expandObjective"),
|
|
16566
|
+
onClick: () => setIsGoalObjectiveExpanded((expanded) => !expanded),
|
|
16567
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
16568
|
+
import_lucide_react28.ChevronDown,
|
|
16569
|
+
{
|
|
16570
|
+
className: cn(
|
|
16571
|
+
"size-3 transition-transform",
|
|
16572
|
+
isGoalObjectiveExpanded && "rotate-180"
|
|
16573
|
+
)
|
|
16574
|
+
}
|
|
16575
|
+
)
|
|
16576
|
+
}
|
|
16577
|
+
) }),
|
|
16578
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(TooltipContent, { children: isGoalObjectiveExpanded ? t("chat.goal.collapseObjective") : t("chat.goal.expandObjective") })
|
|
16579
|
+
] })
|
|
16580
|
+
] })
|
|
16581
|
+
]
|
|
16582
|
+
}
|
|
16583
|
+
),
|
|
15631
16584
|
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
15632
16585
|
PendingRuntimeServices,
|
|
15633
16586
|
{
|
|
@@ -15769,6 +16722,9 @@ function Chat({
|
|
|
15769
16722
|
selectedTool,
|
|
15770
16723
|
planModeEnabled,
|
|
15771
16724
|
onPlanModeChange: setPlanModeEnabled,
|
|
16725
|
+
goalCommandAvailable,
|
|
16726
|
+
goalPanelOpen: isGoalModeOpen,
|
|
16727
|
+
onGoalPanelOpenChange: handleGoalPanelOpenChange,
|
|
15772
16728
|
runtimeCapabilities: runtimeCapabilitiesReady ? runtimeCapabilities : null,
|
|
15773
16729
|
selectedRuntimeCapabilities: effectiveSessionRuntimeCapabilities,
|
|
15774
16730
|
onRuntimeCapabilityToggle: handleSessionRuntimeCapabilityToggle,
|