@xpert-ai/chatkit-ui 0.11.0 → 0.11.2
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/{CodeEditor-BMd8uMGB.js → CodeEditor-CkEfOT9Y.js} +1 -1
- package/dist/app/assets/{DocxEditor-hvscWnw3.js → DocxEditor-yTTKzj6U.js} +4 -4
- package/dist/app/assets/{FileChangeReview-B7VqQsRG.js → FileChangeReview-C7gyCK_j.js} +3 -3
- package/dist/app/assets/{PptxEditor-DcI05MK8.js → PptxEditor-BRsbM1NU.js} +3 -3
- package/dist/app/assets/{SpreadsheetEditor-Hb6fJwdq.js → SpreadsheetEditor-DeP_NBKx.js} +1 -1
- package/dist/app/assets/{UTIF-0ZuTiCmi.js → UTIF-Df_VEwu2.js} +1 -1
- package/dist/app/assets/{WorkbenchTerminal-B6mzbO1J.js → WorkbenchTerminal-CyU1b2ua.js} +1 -1
- package/dist/app/assets/{_baseUniq-zNCkWRMr.js → _baseUniq-BItsX9dZ.js} +1 -1
- package/dist/app/assets/{abap-FxzxrGv_.js → abap-CqbAP5VJ.js} +1 -1
- package/dist/app/assets/{abnf-D2EwS92z.js → abnf-chpMxV7i.js} +1 -1
- package/dist/app/assets/{actionscript-DIvGV2CG.js → actionscript-iDizYOyI.js} +1 -1
- package/dist/app/assets/{ada-CXudAkdO.js → ada-BwR_piCn.js} +1 -1
- package/dist/app/assets/{agda-CPKosats.js → agda-DItghU1v.js} +1 -1
- package/dist/app/assets/{al-AB79aqpn.js → al-Cn9iRklY.js} +1 -1
- package/dist/app/assets/{antlr4-D33lkC_v.js → antlr4-BHaybfLu.js} +1 -1
- package/dist/app/assets/{apacheconf-DGA1W1V0.js → apacheconf-7G1Isose.js} +1 -1
- package/dist/app/assets/{apex-DOMf3QQT.js → apex-B2q1-VZ0.js} +1 -1
- package/dist/app/assets/{apl-DIjPkMHh.js → apl-C_Bt1fXt.js} +1 -1
- package/dist/app/assets/{applescript-Tql-0emq.js → applescript-ClCAsCUD.js} +1 -1
- package/dist/app/assets/{aql-DnnhTsbR.js → aql-BHKh6tsA.js} +1 -1
- package/dist/app/assets/{arc-C3DyEbZE.js → arc-B1u5aHAj.js} +1 -1
- package/dist/app/assets/{architectureDiagram-Q4EWVU46-CM8SyLAE.js → architectureDiagram-Q4EWVU46-BwM5Ih-e.js} +1 -1
- package/dist/app/assets/{arduino-DCy67jnp.js → arduino-Cvs7MW6d.js} +1 -1
- package/dist/app/assets/{arff-ChjrA-MP.js → arff-BtQEt-w-.js} +1 -1
- package/dist/app/assets/{asciidoc-CtZoH7c-.js → asciidoc-BWsNKxsy.js} +1 -1
- package/dist/app/assets/{asm6502-BKzW1Pnl.js → asm6502-B3tFsA7S.js} +1 -1
- package/dist/app/assets/{asmatmel-Bk2fugE5.js → asmatmel-DMJIAcxu.js} +1 -1
- package/dist/app/assets/{aspnet-Co_luXPl.js → aspnet-BZjQxYxl.js} +1 -1
- package/dist/app/assets/{autohotkey-WrAoOh8o.js → autohotkey-CcncmCqi.js} +1 -1
- package/dist/app/assets/{autoit-f3t6GtB5.js → autoit-BK9NxDra.js} +1 -1
- package/dist/app/assets/{avisynth-wSIQUVWg.js → avisynth-DPzTZVZd.js} +1 -1
- package/dist/app/assets/{avro-idl-BkrpSKsz.js → avro-idl-C8vSamJL.js} +1 -1
- package/dist/app/assets/{bash-bVgzw1Yx.js → bash-BuICApby.js} +1 -1
- package/dist/app/assets/{basic-BNXe4Ydo.js → basic-CNU-aVUM.js} +1 -1
- package/dist/app/assets/{batch-CB4G1LnU.js → batch-Dh0g3bad.js} +1 -1
- package/dist/app/assets/{bbcode-DxDWYiQ7.js → bbcode-BMnS1Ogt.js} +1 -1
- package/dist/app/assets/{bicep-oVPIz-U_.js → bicep-Dr2QNZIE.js} +1 -1
- package/dist/app/assets/{birb-B2qIZ0Q3.js → birb-BBpAn9_Z.js} +1 -1
- package/dist/app/assets/{bison-ZnRkUusp.js → bison-DyCzjhCr.js} +1 -1
- package/dist/app/assets/{blockDiagram-DXYQGD6D-IGvs0ReR.js → blockDiagram-DXYQGD6D-Da4FDDlD.js} +1 -1
- package/dist/app/assets/{bnf-BGvR1KgO.js → bnf-BjCmHNl7.js} +1 -1
- package/dist/app/assets/{brainfuck-BHWevSod.js → brainfuck-D_ad5ykV.js} +1 -1
- package/dist/app/assets/{brightscript-BMNxpOzO.js → brightscript-BOuFomnC.js} +1 -1
- package/dist/app/assets/{bro-Cy9xesxi.js → bro-bwbGAIPn.js} +1 -1
- package/dist/app/assets/{bsl-BGUzfBpl.js → bsl-Cd0OZu50.js} +1 -1
- package/dist/app/assets/{c-DXwSYCfZ.js → c-C4qH8P7e.js} +1 -1
- package/dist/app/assets/{c4Diagram-AHTNJAMY-DavZ5kER.js → c4Diagram-AHTNJAMY-Dt-tX7hp.js} +1 -1
- package/dist/app/assets/{cfscript-EVB8CcgT.js → cfscript-BtLuAap6.js} +1 -1
- package/dist/app/assets/{chaiscript-gMZkcA9A.js → chaiscript-DfhI4vFK.js} +1 -1
- package/dist/app/assets/channel-CwNVZCQ4.js +1 -0
- package/dist/app/assets/{chunk-4BX2VUAB-C_C-m_br.js → chunk-4BX2VUAB-DErkZghS.js} +1 -1
- package/dist/app/assets/{chunk-4TB4RGXK-CMVYK06B.js → chunk-4TB4RGXK-9syV4RA8.js} +1 -1
- package/dist/app/assets/{chunk-55IACEB6-0kwMzVtH.js → chunk-55IACEB6-CkYTIvmQ.js} +1 -1
- package/dist/app/assets/{chunk-EDXVE4YY-C4_HNDvP.js → chunk-EDXVE4YY-w1lS6MjE.js} +1 -1
- package/dist/app/assets/{chunk-FMBD7UC4-XQBzbmTs.js → chunk-FMBD7UC4-CQae_nTG.js} +1 -1
- package/dist/app/assets/{chunk-OYMX7WX6-BhW-fjK3.js → chunk-OYMX7WX6-DQPwcOqP.js} +1 -1
- package/dist/app/assets/{chunk-QZHKN3VN-CUJJGTFt.js → chunk-QZHKN3VN-CUPf69en.js} +1 -1
- package/dist/app/assets/{chunk-YZCP3GAM-B1dvKRQu.js → chunk-YZCP3GAM-DZ2w0Uo6.js} +1 -1
- package/dist/app/assets/{cil-DhzXB_r0.js → cil-BA-UuYDm.js} +1 -1
- package/dist/app/assets/classDiagram-6PBFFD2Q-BfUAwFzn.js +1 -0
- package/dist/app/assets/classDiagram-v2-HSJHXN6E-BfUAwFzn.js +1 -0
- package/dist/app/assets/{clike-Bp8whLVh.js → clike-CkrJIoXf.js} +1 -1
- package/dist/app/assets/{clojure-DS2n7X9D.js → clojure-De7zisG7.js} +1 -1
- package/dist/app/assets/clone-DmP83D3u.js +1 -0
- package/dist/app/assets/{cmake-C1nCIHl1.js → cmake-Dtpiq6V_.js} +1 -1
- package/dist/app/assets/{cobol-D-aVthhQ.js → cobol-DlKH8b_d.js} +1 -1
- package/dist/app/assets/{coffeescript-BiyiruO-.js → coffeescript-C20eNRop.js} +1 -1
- package/dist/app/assets/{concurnas-BRqgzWKh.js → concurnas-CkwZbl3G.js} +1 -1
- package/dist/app/assets/{coq-Dx6r_1E-.js → coq-BJqm-Vwq.js} +1 -1
- package/dist/app/assets/{core-B9Ndd9Sb.js → core-BeYgHLnP.js} +1 -1
- package/dist/app/assets/{cose-bilkent-S5V4N54A-BIV35Ny_.js → cose-bilkent-S5V4N54A-ZQRpbJ-9.js} +1 -1
- package/dist/app/assets/{cpp-BNAevxHX.js → cpp-CCK-QhpZ.js} +1 -1
- package/dist/app/assets/{crystal-C69D8bsr.js → crystal-D1WMkcyR.js} +1 -1
- package/dist/app/assets/{csharp-DMD3WU2G.js → csharp-CeaNoGzT.js} +1 -1
- package/dist/app/assets/{cshtml-CJzbtnPi.js → cshtml-COTvhMwv.js} +1 -1
- package/dist/app/assets/{csp-CTYsC3im.js → csp-Dtt7oi-z.js} +1 -1
- package/dist/app/assets/{css-4wm7kjkC.js → css-A1NYvfcV.js} +1 -1
- package/dist/app/assets/{css-extras-BgRI9psb.js → css-extras-DSsOd8f_.js} +1 -1
- package/dist/app/assets/{csv-DSLo0eXd.js → csv-BrdkiUQb.js} +1 -1
- package/dist/app/assets/{cypher-B0bKnH-a.js → cypher-MWVOm8yN.js} +1 -1
- package/dist/app/assets/{d-CiBfx57T.js → d-BpOrYr7d.js} +1 -1
- package/dist/app/assets/{dagre-KV5264BT-t8MgsKTV.js → dagre-KV5264BT-BrSuD7-U.js} +1 -1
- package/dist/app/assets/{dart-Cb7rlZ2e.js → dart-C0GBSKHy.js} +1 -1
- package/dist/app/assets/{dataweave-D1owu29v.js → dataweave-BaRmBwDh.js} +1 -1
- package/dist/app/assets/{dax-BF9Ir7-J.js → dax-D9knB6HK.js} +1 -1
- package/dist/app/assets/{dhall-BnQ8k0M9.js → dhall-CRtWuM7k.js} +1 -1
- package/dist/app/assets/{diagram-5BDNPKRD-BDWynrjl.js → diagram-5BDNPKRD-Dg_BPUr3.js} +1 -1
- package/dist/app/assets/{diagram-G4DWMVQ6-MAE_lQOE.js → diagram-G4DWMVQ6-CuNG3uS8.js} +1 -1
- package/dist/app/assets/{diagram-MMDJMWI5-IHJtjsaw.js → diagram-MMDJMWI5-gyjqG3UJ.js} +1 -1
- package/dist/app/assets/{diagram-TYMM5635-Vd0KV2Dg.js → diagram-TYMM5635-BOBArauA.js} +1 -1
- package/dist/app/assets/{diff-BNRQhA_b.js → diff-1jXFAE9-.js} +1 -1
- package/dist/app/assets/{dist-PKZR6RSH-CLGtZTqg.js → dist-PKZR6RSH-CihMZwfS.js} +1 -1
- package/dist/app/assets/{django-zsC7SSCl.js → django-B8Fvwagw.js} +1 -1
- package/dist/app/assets/{dns-zone-file-C3IhsU8v.js → dns-zone-file-eYrA3DMk.js} +1 -1
- package/dist/app/assets/{docker-JEH9Kikw.js → docker-DcwG3M3S.js} +1 -1
- package/dist/app/assets/{dot-C7urzMKu.js → dot-7LgW6Pxt.js} +1 -1
- package/dist/app/assets/{ebnf-BMx_o1k8.js → ebnf-BIBhxWki.js} +1 -1
- package/dist/app/assets/{editorconfig-CW9m_PZG.js → editorconfig-aS9yZiII.js} +1 -1
- package/dist/app/assets/{eiffel-441GzAvA.js → eiffel-CbtB_wg4.js} +1 -1
- package/dist/app/assets/{ejs-DHcmqbA6.js → ejs-CAyJOUgz.js} +1 -1
- package/dist/app/assets/{elixir-CZtkyA_h.js → elixir-CJTRbv1S.js} +1 -1
- package/dist/app/assets/{elm-ChJkcckU.js → elm-rs-d6fza.js} +1 -1
- package/dist/app/assets/{erDiagram-SMLLAGMA-D1dwPtMQ.js → erDiagram-SMLLAGMA-cwYzboAh.js} +1 -1
- package/dist/app/assets/{erb-BdooSGIB.js → erb-CUzxl3q1.js} +1 -1
- package/dist/app/assets/{erlang-Ds-OZylg.js → erlang-B9-MMmZw.js} +1 -1
- package/dist/app/assets/{etlua-BEY70xf6.js → etlua-BolNWEL6.js} +1 -1
- package/dist/app/assets/{excel-formula-DsTqG-tz.js → excel-formula-Dgpq9kjo.js} +1 -1
- package/dist/app/assets/{factor-DdV038qZ.js → factor-BWuJXGFq.js} +1 -1
- package/dist/app/assets/{false-DzLciyDd.js → false-D-oTDaaL.js} +1 -1
- package/dist/app/assets/{firestore-security-rules-DdFk1xxf.js → firestore-security-rules-BraxdQEs.js} +1 -1
- package/dist/app/assets/{flow-DnXddxaF.js → flow-BPYSMfYG.js} +1 -1
- package/dist/app/assets/{flowDiagram-DWJPFMVM-CMl61c9m.js → flowDiagram-DWJPFMVM-DgzkJClR.js} +1 -1
- package/dist/app/assets/{fortran-DosDnVNK.js → fortran-T_iQIE2B.js} +1 -1
- package/dist/app/assets/{fsharp-Wz_WfWqS.js → fsharp-DqD5OmJK.js} +1 -1
- package/dist/app/assets/{ftl-TeerKn0Z.js → ftl-BovgQIrB.js} +1 -1
- package/dist/app/assets/{ganttDiagram-T4ZO3ILL-BeB_sCH7.js → ganttDiagram-T4ZO3ILL-CBzD8A0w.js} +1 -1
- package/dist/app/assets/{gap-BCKVBhy2.js → gap-85TS250G.js} +1 -1
- package/dist/app/assets/{gcode-CVLqDAV3.js → gcode-BW6Qk-5-.js} +1 -1
- package/dist/app/assets/{gdscript-Md3Pew6i.js → gdscript-CLxmTRf5.js} +1 -1
- package/dist/app/assets/{gedcom-vq4c5Mhz.js → gedcom-Cb7Ao7zc.js} +1 -1
- package/dist/app/assets/{gherkin-DLMAVDHb.js → gherkin-BJuAxsMs.js} +1 -1
- package/dist/app/assets/{git-Ddppbzmg.js → git-C2pBzbsu.js} +1 -1
- package/dist/app/assets/{gitGraphDiagram-UUTBAWPF-KMhChbCu.js → gitGraphDiagram-UUTBAWPF-_tqBjJON.js} +1 -1
- package/dist/app/assets/{glsl-BA_4Uw6h.js → glsl-CC9Lx2uz.js} +1 -1
- package/dist/app/assets/{gml-C8mWZW1o.js → gml-Cb4YXigx.js} +1 -1
- package/dist/app/assets/{gn-91bO-la4.js → gn-kQb5aGb5.js} +1 -1
- package/dist/app/assets/{go-CvRVEV_l.js → go-DNAlVb2O.js} +1 -1
- package/dist/app/assets/{go-module-_Icv0nZv.js → go-module-C_VDBUP4.js} +1 -1
- package/dist/app/assets/{graph-DUSo9Sje.js → graph-RvCEEoBA.js} +1 -1
- package/dist/app/assets/{graphql-BW8LUdqC.js → graphql-W05aJ9xQ.js} +1 -1
- package/dist/app/assets/{groovy-ywYXeaQB.js → groovy-DHhMsfeb.js} +1 -1
- package/dist/app/assets/{haml-CSzhwz9e.js → haml-D-E4bZH-.js} +1 -1
- package/dist/app/assets/{handlebars-CTU4xa_2.js → handlebars-CscBBTqv.js} +1 -1
- package/dist/app/assets/{haskell-COx8jem2.js → haskell-zlEk3XCa.js} +1 -1
- package/dist/app/assets/{haxe-4IhqmVsu.js → haxe-DStWUlo8.js} +1 -1
- package/dist/app/assets/{hcl-DL1FUuBN.js → hcl-Cz7FUhgX.js} +1 -1
- package/dist/app/assets/{hlsl-CRyhDjW0.js → hlsl-C_iG3tnK.js} +1 -1
- package/dist/app/assets/{hoon-D8rd1Z96.js → hoon-CP_MZxgs.js} +1 -1
- package/dist/app/assets/{hpkp-C-9xmxq3.js → hpkp-ex07fbEj.js} +1 -1
- package/dist/app/assets/{hsts-CdisgsQe.js → hsts-BPQ_l1UN.js} +1 -1
- package/dist/app/assets/{http-D6DbkYMj.js → http-OrRAX_xg.js} +1 -1
- package/dist/app/assets/{ichigojam-DhDIPquW.js → ichigojam-_EHo3Vus.js} +1 -1
- package/dist/app/assets/{icon-DCWiFL2p.js → icon-D--jckSQ.js} +1 -1
- package/dist/app/assets/{icu-message-format-qlzAVFtk.js → icu-message-format-BLzJeT5b.js} +1 -1
- package/dist/app/assets/{idris-CuifC-Ea.js → idris-m5bn3p8K.js} +1 -1
- package/dist/app/assets/{iecst-DZTSS_Mx.js → iecst-C3iDlseF.js} +1 -1
- package/dist/app/assets/{ignore-HIsAm8c8.js → ignore-jQg1pBvx.js} +1 -1
- package/dist/app/assets/{index-D0YKTBe8.js → index-zFXf25RZ.js} +189 -189
- package/dist/app/assets/{infoDiagram-42DDH7IO-XzzxMfvC.js → infoDiagram-42DDH7IO-Co6iBt5T.js} +1 -1
- package/dist/app/assets/{inform7-CiVe6C4f.js → inform7-D5m58Y4T.js} +1 -1
- package/dist/app/assets/{ini-DbnIcvok.js → ini-U99GmdZD.js} +1 -1
- package/dist/app/assets/{io-BDrIfcxa.js → io-3ii9gOuT.js} +1 -1
- package/dist/app/assets/{ishikawaDiagram-UXIWVN3A-D9s4eo9i.js → ishikawaDiagram-UXIWVN3A-4dAZpmVu.js} +1 -1
- package/dist/app/assets/{j-BGt4pQcu.js → j-DeoVcD4r.js} +1 -1
- package/dist/app/assets/{java-CHPYmuYh.js → java-DhS74ZiS.js} +1 -1
- package/dist/app/assets/{javadoc-BDYK__NB.js → javadoc-D_UUB6dm.js} +1 -1
- package/dist/app/assets/{javadoclike-D6NiEMXI.js → javadoclike-BoEjGF-R.js} +1 -1
- package/dist/app/assets/{javascript-qytty7K5.js → javascript-p3NQWzRq.js} +1 -1
- package/dist/app/assets/{javastacktrace-X-IcFPNl.js → javastacktrace-D4FIcAET.js} +1 -1
- package/dist/app/assets/{jexl-ByKXqTel.js → jexl-DmvRiAUk.js} +1 -1
- package/dist/app/assets/{jolie-TvvsyTgo.js → jolie-B0b5yOXD.js} +1 -1
- package/dist/app/assets/{journeyDiagram-VCZTEJTY-CNdVUup1.js → journeyDiagram-VCZTEJTY-Bor603I6.js} +1 -1
- package/dist/app/assets/{jq-BlWlwz2r.js → jq-DBpc5y5q.js} +1 -1
- package/dist/app/assets/{js-extras-iKDTA1qk.js → js-extras-BitHRC94.js} +1 -1
- package/dist/app/assets/{js-templates-CZgxIp76.js → js-templates-bAbwg7K4.js} +1 -1
- package/dist/app/assets/{jsdoc-Mosrl0Yy.js → jsdoc-CHov7UEh.js} +1 -1
- package/dist/app/assets/{json-Dg8fLZwo.js → json-B-UgUOcv.js} +1 -1
- package/dist/app/assets/{json5-CBfBGp9T.js → json5-CCSh4M_u.js} +1 -1
- package/dist/app/assets/{jsonp-BG40RAdB.js → jsonp-2gpJDalc.js} +1 -1
- package/dist/app/assets/{jsstacktrace-CipEiBvr.js → jsstacktrace-YhInxKZX.js} +1 -1
- package/dist/app/assets/{jsx-ymh1q22x.js → jsx-D1UpiF2P.js} +1 -1
- package/dist/app/assets/{jszip.min-DSgmDoy9.js → jszip.min-Dt-AHYC0.js} +1 -1
- package/dist/app/assets/{julia-vnOiDr5f.js → julia-CyjWo2i8.js} +1 -1
- package/dist/app/assets/{kanban-definition-6JOO6SKY-MGGBnrXG.js → kanban-definition-6JOO6SKY-U-hYiLA-.js} +1 -1
- package/dist/app/assets/{keepalived-hb8WtW0H.js → keepalived-BYriwcGy.js} +1 -1
- package/dist/app/assets/{keyman-DUm3IQsC.js → keyman-34br4hCO.js} +1 -1
- package/dist/app/assets/{kotlin-CdURhZiu.js → kotlin-Bkqpta0R.js} +1 -1
- package/dist/app/assets/{kumir-BjnIsauc.js → kumir-DWXuCeXz.js} +1 -1
- package/dist/app/assets/{kusto-DL2yehMT.js → kusto-0O4e57D9.js} +1 -1
- package/dist/app/assets/{latex-Dug78S0w.js → latex-CMlF4dEe.js} +1 -1
- package/dist/app/assets/{latte-BScBfZxd.js → latte-D1e6h-zD.js} +1 -1
- package/dist/app/assets/{layout-gq0zpE_E.js → layout-eGBUxe5W.js} +1 -1
- package/dist/app/assets/{less-BLwwHp2U.js → less-C13T9UPd.js} +1 -1
- package/dist/app/assets/{lilypond-9n9xTIJ4.js → lilypond-Dn5zAXrr.js} +1 -1
- package/dist/app/assets/{linear-DJDekCN_.js → linear-DgFEqEXs.js} +1 -1
- package/dist/app/assets/{liquid-BbVeJmK_.js → liquid-C-Pt_Vny.js} +1 -1
- package/dist/app/assets/{lisp-CFSGFBAA.js → lisp-BO5glOUn.js} +1 -1
- package/dist/app/assets/{livescript-Cat7VUY0.js → livescript-Dd6zEmXh.js} +1 -1
- package/dist/app/assets/{llvm-BZY36CvO.js → llvm-CYjba539.js} +1 -1
- package/dist/app/assets/{log-Z7bD7Dm2.js → log-a0wt7bko.js} +1 -1
- package/dist/app/assets/{lolcode-BcdEaoXf.js → lolcode-0JFVhyfh.js} +1 -1
- package/dist/app/assets/{lua-CIMWuOWn.js → lua-DRO0x4Co.js} +1 -1
- package/dist/app/assets/{magma-BFW4G9Ie.js → magma-bkMcN84t.js} +1 -1
- package/dist/app/assets/{makefile-6wOxKuUZ.js → makefile-CsXB54hy.js} +1 -1
- package/dist/app/assets/{markdown-B6JNRyIW.js → markdown-Ca3OokvM.js} +1 -1
- package/dist/app/assets/{markup-ClXJVXkw.js → markup-C11HSQJl.js} +1 -1
- package/dist/app/assets/{markup-templating-CJ-wLX4_.js → markup-templating-CWaNNuuv.js} +1 -1
- package/dist/app/assets/{matlab-D_niiE2O.js → matlab-BHxkh0cK.js} +1 -1
- package/dist/app/assets/{maxscript-pus5rJ_0.js → maxscript-CenV4s5A.js} +1 -1
- package/dist/app/assets/{mel-ZdRcVFP0.js → mel-D5b9wd9J.js} +1 -1
- package/dist/app/assets/{mermaid-BDnR9Ohc.js → mermaid-DpwUW522.js} +1 -1
- package/dist/app/assets/{min-BbOq_n6W.js → min-ZXeeloXH.js} +1 -1
- package/dist/app/assets/{mindmap-definition-QFDTVHPH-DpIvQAhR.js → mindmap-definition-QFDTVHPH-DJd5id_i.js} +1 -1
- package/dist/app/assets/{mizar-xsXyQ6rQ.js → mizar-DklHxYKD.js} +1 -1
- package/dist/app/assets/{mongodb-BTgL3ZWT.js → mongodb-BG3ojuXH.js} +1 -1
- package/dist/app/assets/{monkey-F9znNaXb.js → monkey-VpryXw-8.js} +1 -1
- package/dist/app/assets/{moonscript-BVOnwLtu.js → moonscript-D76ynE1M.js} +1 -1
- package/dist/app/assets/{n1ql-CTJLY5PH.js → n1ql-C3IMeS46.js} +1 -1
- package/dist/app/assets/{n4js-DtbwPzA6.js → n4js-Cvjzz6v5.js} +1 -1
- package/dist/app/assets/{nand2tetris-hdl-C53Xsmj_.js → nand2tetris-hdl-CGK2rJb_.js} +1 -1
- package/dist/app/assets/{naniscript-5XkMf0Gg.js → naniscript-z5gCYRIw.js} +1 -1
- package/dist/app/assets/{nasm-BFvvM3DJ.js → nasm-DuSg-eT9.js} +1 -1
- package/dist/app/assets/{neon-ChSQ8_23.js → neon-Djjs3REP.js} +1 -1
- package/dist/app/assets/{nevod-BjKo9A7p.js → nevod-CN5G_5rU.js} +1 -1
- package/dist/app/assets/{nginx-LeCIbnrg.js → nginx-BWWt8A1j.js} +1 -1
- package/dist/app/assets/{nim-4dNKlvi_.js → nim-HOSGhPSy.js} +1 -1
- package/dist/app/assets/{nix-CI3vYyZf.js → nix-D12N_kci.js} +1 -1
- package/dist/app/assets/{nsis-BCXMhWuQ.js → nsis-B1v-kqJf.js} +1 -1
- package/dist/app/assets/{objectivec-CBNQ964u.js → objectivec-Brgm4idR.js} +1 -1
- package/dist/app/assets/{ocaml-CreqCcvn.js → ocaml-7vtyt6C7.js} +1 -1
- package/dist/app/assets/{opencl-U00h5NuL.js → opencl-1Y6L_YpV.js} +1 -1
- package/dist/app/assets/{openqasm-5JmoAEK_.js → openqasm-C3cbIpYJ.js} +1 -1
- package/dist/app/assets/{oz-ByO6sRj5.js → oz-DuJJROqC.js} +1 -1
- package/dist/app/assets/{parigp-BWsCdOUG.js → parigp-CqzuXo0B.js} +1 -1
- package/dist/app/assets/{parser-D1DiUamc.js → parser-DPIFi1zk.js} +1 -1
- package/dist/app/assets/{pascal-BemGcm18.js → pascal-8jBCOys9.js} +1 -1
- package/dist/app/assets/{pascaligo-Co4F9g0w.js → pascaligo-BYAmePB4.js} +1 -1
- package/dist/app/assets/{pcaxis-b_4ajNUm.js → pcaxis-CH_jwvLo.js} +1 -1
- package/dist/app/assets/{peoplecode-CY7MbA6u.js → peoplecode-BCEe26dc.js} +1 -1
- package/dist/app/assets/{perl-CKQA8rPB.js → perl-CfyL0fkk.js} +1 -1
- package/dist/app/assets/{php-C-5V30Sh.js → php-BEdNzSLG.js} +1 -1
- package/dist/app/assets/{php-extras-C9xN5vf_.js → php-extras-Cdo7FfZH.js} +1 -1
- package/dist/app/assets/{phpdoc-CFxW1Wxv.js → phpdoc-5uiCeBAb.js} +1 -1
- package/dist/app/assets/{pieDiagram-DEJITSTG-DgRh7Zap.js → pieDiagram-DEJITSTG-5Xgf1apo.js} +1 -1
- package/dist/app/assets/{plsql-CUKGtN80.js → plsql-CaFGgNQX.js} +1 -1
- package/dist/app/assets/{powerquery-BA3fVcGH.js → powerquery-U6G7w8j2.js} +1 -1
- package/dist/app/assets/{powershell-Y_JLkq70.js → powershell-BEQa27Pd.js} +1 -1
- package/dist/app/assets/{processing-BKwdaseE.js → processing-CPJVmlX3.js} +1 -1
- package/dist/app/assets/{prolog-HM24nA-k.js → prolog-DQ4S2uId.js} +1 -1
- package/dist/app/assets/{promql-OVtibSyw.js → promql-DHu3TLQW.js} +1 -1
- package/dist/app/assets/{properties-Bw8iDk08.js → properties-BEEa0JNa.js} +1 -1
- package/dist/app/assets/{protobuf-DfDNnn1n.js → protobuf-DnIXDpDi.js} +1 -1
- package/dist/app/assets/{psl-C4A_FgBY.js → psl-D6F0X7gI.js} +1 -1
- package/dist/app/assets/{pug-Bbo_gUmT.js → pug-usp0TnS_.js} +1 -1
- package/dist/app/assets/{puppet-DKuYrmko.js → puppet-CCmIBC5o.js} +1 -1
- package/dist/app/assets/{pure-BbBX4Ygi.js → pure-CxW_7PSX.js} +1 -1
- package/dist/app/assets/{purebasic-DDk2f6p7.js → purebasic-CUlLSqEL.js} +1 -1
- package/dist/app/assets/{purescript-DAyc5SMt.js → purescript-DIdsMdqD.js} +1 -1
- package/dist/app/assets/{q-05YeV9ON.js → q-r79YD-RS.js} +1 -1
- package/dist/app/assets/{qml-Bcp3grlx.js → qml-BC7wMM6Q.js} +1 -1
- package/dist/app/assets/{qore-DyXDLOB2.js → qore-WxsAKgCD.js} +1 -1
- package/dist/app/assets/{qsharp-CJerorSH.js → qsharp-D7lLZD3n.js} +1 -1
- package/dist/app/assets/{quadrantDiagram-34T5L4WZ-B8WY1LsE.js → quadrantDiagram-34T5L4WZ-DTIcGAOk.js} +1 -1
- package/dist/app/assets/{r-Bk-EmTE-.js → r-P0CM9urb.js} +1 -1
- package/dist/app/assets/{racket-Bm9RxNSE.js → racket-DVeucTFY.js} +1 -1
- package/dist/app/assets/{reason-ByxYflge.js → reason-BgQvAQAD.js} +1 -1
- package/dist/app/assets/{regex-n3Pg4C2o.js → regex-sqaSbvSv.js} +1 -1
- package/dist/app/assets/{rego-sND5xFsX.js → rego-CJIg56LF.js} +1 -1
- package/dist/app/assets/{renpy-Dw3awaxL.js → renpy-_gDjY0Al.js} +1 -1
- package/dist/app/assets/{requirementDiagram-MS252O5E-C28I-Qs_.js → requirementDiagram-MS252O5E-CE7JMmce.js} +1 -1
- package/dist/app/assets/{rest-DUyjihZy.js → rest-CiU1bgMd.js} +1 -1
- package/dist/app/assets/{rip-DQD1PpI1.js → rip-DggWyO7M.js} +1 -1
- package/dist/app/assets/{roboconf-zgTRBG-b.js → roboconf-CSJ0x616.js} +1 -1
- package/dist/app/assets/{robotframework-DeFCJe2B.js → robotframework-CDF7dCNt.js} +1 -1
- package/dist/app/assets/{ruby-DGxfrUjf.js → ruby-DiJ0PRoD.js} +1 -1
- package/dist/app/assets/{rust-Dw2emRbt.js → rust-BFlAZ4n1.js} +1 -1
- package/dist/app/assets/{sankeyDiagram-XADWPNL6-B0mHlnDH.js → sankeyDiagram-XADWPNL6-C6L2VVck.js} +1 -1
- package/dist/app/assets/{sas-9J3OAgqN.js → sas-Cqi8ANTk.js} +1 -1
- package/dist/app/assets/{sass-BQsiGIZh.js → sass-Fcz-_iW-.js} +1 -1
- package/dist/app/assets/{scala-fVID0vPk.js → scala-CxvM-FLQ.js} +1 -1
- package/dist/app/assets/{scheme-KCB1LwX_.js → scheme-kpBg6tVA.js} +1 -1
- package/dist/app/assets/{scss-BgSYJF8F.js → scss-DXz1iRbh.js} +1 -1
- package/dist/app/assets/{sequenceDiagram-FGHM5R23-D5LSBA72.js → sequenceDiagram-FGHM5R23-x40S7kZo.js} +1 -1
- package/dist/app/assets/{shell-session-DmBypuZB.js → shell-session-DFP85I_o.js} +1 -1
- package/dist/app/assets/{smali-2I2f2uV2.js → smali-B-rVIGx2.js} +1 -1
- package/dist/app/assets/{smalltalk-xmEVtq3b.js → smalltalk-DZhpacIf.js} +1 -1
- package/dist/app/assets/{smarty-DuVe4-fD.js → smarty-BYkPoV7-.js} +1 -1
- package/dist/app/assets/{sml-Bb5jOVPw.js → sml-Bpl2hT9d.js} +1 -1
- package/dist/app/assets/{solidity-7DS3rQ0f.js → solidity-m14I6_Ub.js} +1 -1
- package/dist/app/assets/{solution-file-DpitFDwQ.js → solution-file-lgJK1sXF.js} +1 -1
- package/dist/app/assets/{soy-xa62VSYb.js → soy-CmkNlVMo.js} +1 -1
- package/dist/app/assets/{sparql-nIdLKdzE.js → sparql-C8X9qBCV.js} +1 -1
- package/dist/app/assets/{splunk-spl-DT8vzqTd.js → splunk-spl-D340jzbt.js} +1 -1
- package/dist/app/assets/{sqf-D_J1wPSO.js → sqf-Cy9hNmyR.js} +1 -1
- package/dist/app/assets/{sql-BXPs4lkf.js → sql-BuosKQRc.js} +1 -1
- package/dist/app/assets/{squirrel-Bt2TOoZD.js → squirrel-8Uir-D81.js} +1 -1
- package/dist/app/assets/{stan-bh8Ffooh.js → stan-DwOB-m45.js} +1 -1
- package/dist/app/assets/{stateDiagram-FHFEXIEX-DNkKFWr2.js → stateDiagram-FHFEXIEX-eK4Mr2m1.js} +1 -1
- package/dist/app/assets/stateDiagram-v2-QKLJ7IA2-C3M7UFxa.js +1 -0
- package/dist/app/assets/{stylus-BAUtbs2c.js → stylus-D9o8ycmV.js} +1 -1
- package/dist/app/assets/{swift-l0hP6yV7.js → swift-6P1oJjtu.js} +1 -1
- package/dist/app/assets/{systemd-Btc4Qz3J.js → systemd-CB40GGbI.js} +1 -1
- package/dist/app/assets/{t4-cs-BjAV5Ns6.js → t4-cs-oDtZSVDr.js} +1 -1
- package/dist/app/assets/{t4-templating-0HrVV_I1.js → t4-templating-BNqgqrov.js} +1 -1
- package/dist/app/assets/{t4-vb-CqIBNZ1b.js → t4-vb-Cv8f7UA2.js} +1 -1
- package/dist/app/assets/{tap-B-8X0Drv.js → tap-CbrEfuBB.js} +1 -1
- package/dist/app/assets/{tcl-Dsqf3ZPx.js → tcl-BO7rxJbt.js} +1 -1
- package/dist/app/assets/{textile-DSYQsA-I.js → textile-BTqL4BpR.js} +1 -1
- package/dist/app/assets/{timeline-definition-GMOUNBTQ-CEtXto8g.js → timeline-definition-GMOUNBTQ-Bx9k8UuZ.js} +1 -1
- package/dist/app/assets/{toNumber-BMcN9Ax7.js → toNumber-BHLUnJCk.js} +1 -1
- package/dist/app/assets/{toml-CpRMaMrB.js → toml-KtQBEurb.js} +1 -1
- package/dist/app/assets/{tremor-CGh7Sa_N.js → tremor-Dk70TmsK.js} +1 -1
- package/dist/app/assets/{tt2-DH4IySIU.js → tt2-DnQZgW9E.js} +1 -1
- package/dist/app/assets/{turtle-CCArav6x.js → turtle-D8QBc8HO.js} +1 -1
- package/dist/app/assets/{twig-CMfNIdZ-.js → twig-BOYkX3KT.js} +1 -1
- package/dist/app/assets/{typescript-Bizq75_T.js → typescript-B7MN9vbP.js} +1 -1
- package/dist/app/assets/{typoscript-BKwq_Pv3.js → typoscript-CJp8dvAS.js} +1 -1
- package/dist/app/assets/{unrealscript-C7cPGt_d.js → unrealscript-CgTA2YQi.js} +1 -1
- package/dist/app/assets/{uorazor-Zphes3kf.js → uorazor-APvKotZB.js} +1 -1
- package/dist/app/assets/{uri-BIZ2Bbco.js → uri-D-yR2anw.js} +1 -1
- package/dist/app/assets/{v-4CeCdJxQ.js → v-BDwYNgP_.js} +1 -1
- package/dist/app/assets/{vala-BGjzZngz.js → vala-DgEvv5Sb.js} +1 -1
- package/dist/app/assets/{vbnet-DcGWvrm1.js → vbnet-DN-ptnmb.js} +1 -1
- package/dist/app/assets/{velocity-DLFRqsWq.js → velocity-s30ZYDZQ.js} +1 -1
- package/dist/app/assets/{vennDiagram-DHZGUBPP-iLPwgfwf.js → vennDiagram-DHZGUBPP-DXNVFN6S.js} +1 -1
- package/dist/app/assets/{verilog-VXPCXmmb.js → verilog-BW90SBzF.js} +1 -1
- package/dist/app/assets/{vhdl-OiJgxIIr.js → vhdl-BBFaZHgH.js} +1 -1
- package/dist/app/assets/{vim-UHqZ5huH.js → vim-CB_5_dbu.js} +1 -1
- package/dist/app/assets/{visual-basic-DrmZqU06.js → visual-basic-C7gSM6IL.js} +1 -1
- package/dist/app/assets/{wardley-RL74JXVD-J7Wj2Imv.js → wardley-RL74JXVD-Bc8bssEU.js} +1 -1
- package/dist/app/assets/{wardleyDiagram-NUSXRM2D-BXmwhZ7A.js → wardleyDiagram-NUSXRM2D-ChZrbBkL.js} +1 -1
- package/dist/app/assets/{warpscript-DeTsNI2X.js → warpscript-CTVS4vLW.js} +1 -1
- package/dist/app/assets/{wasm-DRdFvZi2.js → wasm-DrDg6k1Q.js} +1 -1
- package/dist/app/assets/{web-idl-BUn07EHT.js → web-idl-aPR6ivRq.js} +1 -1
- package/dist/app/assets/{wiki-BVI5drcr.js → wiki-DQ0WLnSI.js} +1 -1
- package/dist/app/assets/{wolfram-DbnOY8AT.js → wolfram-DKc_7m0c.js} +1 -1
- package/dist/app/assets/{wren-Buf8bMya.js → wren-BfynSjz-.js} +1 -1
- package/dist/app/assets/{xeora-ngw7GF5O.js → xeora-BG1TDQ7h.js} +1 -1
- package/dist/app/assets/{xml-doc-DaNehWRN.js → xml-doc-BteNMTDL.js} +1 -1
- package/dist/app/assets/{xojo-TxJkqaS8.js → xojo-hLVHJe-j.js} +1 -1
- package/dist/app/assets/{xquery-1o_Sf4Sq.js → xquery-D5eD5vY-.js} +1 -1
- package/dist/app/assets/{xychartDiagram-5P7HB3ND-DJJrUWxd.js → xychartDiagram-5P7HB3ND-DSRp0xPw.js} +1 -1
- package/dist/app/assets/{yaml-CrBHyf9u.js → yaml-D_xQTJJ6.js} +1 -1
- package/dist/app/assets/{yang-g8dRVUhJ.js → yang-QHRqi2r2.js} +1 -1
- package/dist/app/assets/{zig-2EHR4M92.js → zig-CaTmNDOs.js} +1 -1
- package/dist/app/index.html +1 -1
- package/dist/index.cjs +926 -587
- package/dist/index.js +932 -590
- package/package.json +5 -5
- package/dist/app/assets/channel-53ErRBg2.js +0 -1
- package/dist/app/assets/classDiagram-6PBFFD2Q-Cz_aN_Mk.js +0 -1
- package/dist/app/assets/classDiagram-v2-HSJHXN6E-Cz_aN_Mk.js +0 -1
- package/dist/app/assets/clone-B8LwPs5_.js +0 -1
- package/dist/app/assets/stateDiagram-v2-QKLJ7IA2-CVLVuLVv.js +0 -1
package/dist/index.js
CHANGED
|
@@ -1080,6 +1080,11 @@ var en_US_default = {
|
|
|
1080
1080
|
clientCommandUnavailable: "No handler is configured for client command {{commandKey}}."
|
|
1081
1081
|
},
|
|
1082
1082
|
externalAssistants: {
|
|
1083
|
+
cancel: "Cancel",
|
|
1084
|
+
cancelRun: "Cancel execution: {{name}}",
|
|
1085
|
+
cancelling: "Cancelling\u2026",
|
|
1086
|
+
cancelRequested: "Cancellation requested",
|
|
1087
|
+
cancelFailed: "Could not cancel the execution. Please try again.",
|
|
1083
1088
|
title: "External assistants",
|
|
1084
1089
|
openRun: "View execution: {{name}}",
|
|
1085
1090
|
back: "Back to executions",
|
|
@@ -1488,6 +1493,7 @@ var en_US_default = {
|
|
|
1488
1493
|
select: "Select project",
|
|
1489
1494
|
none: "No project",
|
|
1490
1495
|
autoNew: "New project \xB7 Create on send",
|
|
1496
|
+
confirmNew: "New project \xB7 Confirm settings first",
|
|
1491
1497
|
search: "Search projects",
|
|
1492
1498
|
new: "New project",
|
|
1493
1499
|
create: "Create",
|
|
@@ -1853,6 +1859,9 @@ var en_US_default = {
|
|
|
1853
1859
|
moreTags: "+{{count}}"
|
|
1854
1860
|
},
|
|
1855
1861
|
mcpApp: {
|
|
1862
|
+
openProjectFailed: "Unable to open this project.",
|
|
1863
|
+
refresh: "Refresh data",
|
|
1864
|
+
refreshFailed: "Unable to refresh data. Please try again.",
|
|
1856
1865
|
loading: "Loading MCP App",
|
|
1857
1866
|
fullscreen: "Open fullscreen",
|
|
1858
1867
|
pictureInPicture: "Open picture in picture",
|
|
@@ -1893,7 +1902,13 @@ var en_US_default = {
|
|
|
1893
1902
|
replied: "Replied",
|
|
1894
1903
|
pending: "Pending",
|
|
1895
1904
|
interrupted: "Interrupted",
|
|
1896
|
-
timeout: "Timed out"
|
|
1905
|
+
timeout: "Timed out",
|
|
1906
|
+
business_accepted: "Accepted",
|
|
1907
|
+
business_already_completed: "Already completed",
|
|
1908
|
+
business_not_claimed: "Not claimed",
|
|
1909
|
+
business_blocked: "Blocked",
|
|
1910
|
+
business_failed: "Task failed",
|
|
1911
|
+
business_incomplete: "Not accepted"
|
|
1897
1912
|
},
|
|
1898
1913
|
counts: {
|
|
1899
1914
|
messages: {
|
|
@@ -2009,7 +2024,7 @@ var en_US_default = {
|
|
|
2009
2024
|
pause: "Pause workflow",
|
|
2010
2025
|
resume: "Resume workflow",
|
|
2011
2026
|
cancelRun: "Stop task",
|
|
2012
|
-
pausing: "
|
|
2027
|
+
pausing: "Pausing",
|
|
2013
2028
|
paused: "Workflow paused",
|
|
2014
2029
|
editMessage: "Edit message",
|
|
2015
2030
|
sourcePauseUnavailable: "The original task cannot be paused yet. Try again after it finishes.",
|
|
@@ -2023,7 +2038,11 @@ var en_US_default = {
|
|
|
2023
2038
|
interrupted: "Waiting",
|
|
2024
2039
|
error: "Error",
|
|
2025
2040
|
running: "Running"
|
|
2026
|
-
}
|
|
2041
|
+
},
|
|
2042
|
+
stop: "Stop",
|
|
2043
|
+
stopping: "Stopping",
|
|
2044
|
+
stopDescription: "End this run without undoing completed actions",
|
|
2045
|
+
pausingDescription: "Waiting for the current step and checkpoint; you can still stop the run"
|
|
2027
2046
|
},
|
|
2028
2047
|
fileActivity: {
|
|
2029
2048
|
textLineChanges: "Text line changes",
|
|
@@ -2199,6 +2218,11 @@ var zh_CN_default = {
|
|
|
2199
2218
|
clientCommandUnavailable: "\u672A\u914D\u7F6E\u5BA2\u6237\u7AEF\u547D\u4EE4 {{commandKey}} \u7684\u5904\u7406\u5668\u3002"
|
|
2200
2219
|
},
|
|
2201
2220
|
externalAssistants: {
|
|
2221
|
+
cancel: "\u53D6\u6D88\u6267\u884C",
|
|
2222
|
+
cancelRun: "\u53D6\u6D88\u6267\u884C\uFF1A{{name}}",
|
|
2223
|
+
cancelling: "\u6B63\u5728\u53D6\u6D88\u2026",
|
|
2224
|
+
cancelRequested: "\u5DF2\u8BF7\u6C42\u53D6\u6D88",
|
|
2225
|
+
cancelFailed: "\u53D6\u6D88\u6267\u884C\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5\u3002",
|
|
2202
2226
|
title: "\u5916\u90E8\u52A9\u624B",
|
|
2203
2227
|
openRun: "\u67E5\u770B\u6267\u884C\uFF1A{{name}}",
|
|
2204
2228
|
back: "\u8FD4\u56DE\u6267\u884C\u5217\u8868",
|
|
@@ -2607,6 +2631,7 @@ var zh_CN_default = {
|
|
|
2607
2631
|
select: "\u9009\u62E9\u9879\u76EE",
|
|
2608
2632
|
none: "\u4E0D\u4F7F\u7528\u9879\u76EE",
|
|
2609
2633
|
autoNew: "\u65B0\u9879\u76EE \xB7 \u53D1\u9001\u540E\u81EA\u52A8\u521B\u5EFA",
|
|
2634
|
+
confirmNew: "\u65B0\u9879\u76EE \xB7 \u786E\u8BA4\u914D\u7F6E\u540E\u521B\u5EFA",
|
|
2610
2635
|
search: "\u641C\u7D22\u9879\u76EE",
|
|
2611
2636
|
new: "\u65B0\u5EFA\u9879\u76EE",
|
|
2612
2637
|
create: "\u521B\u5EFA",
|
|
@@ -2972,6 +2997,9 @@ var zh_CN_default = {
|
|
|
2972
2997
|
moreTags: "+{{count}}"
|
|
2973
2998
|
},
|
|
2974
2999
|
mcpApp: {
|
|
3000
|
+
openProjectFailed: "\u6682\u65F6\u65E0\u6CD5\u6253\u5F00\u6B64\u9879\u76EE\u3002",
|
|
3001
|
+
refresh: "\u5237\u65B0\u6570\u636E",
|
|
3002
|
+
refreshFailed: "\u6570\u636E\u5237\u65B0\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5\u3002",
|
|
2975
3003
|
loading: "\u6B63\u5728\u52A0\u8F7D MCP App",
|
|
2976
3004
|
fullscreen: "\u5168\u5C4F\u663E\u793A",
|
|
2977
3005
|
pictureInPicture: "\u753B\u4E2D\u753B\u663E\u793A",
|
|
@@ -3012,7 +3040,13 @@ var zh_CN_default = {
|
|
|
3012
3040
|
replied: "\u5DF2\u56DE\u590D",
|
|
3013
3041
|
pending: "\u7B49\u5F85\u4E2D",
|
|
3014
3042
|
interrupted: "\u5DF2\u4E2D\u65AD",
|
|
3015
|
-
timeout: "\u5DF2\u8D85\u65F6"
|
|
3043
|
+
timeout: "\u5DF2\u8D85\u65F6",
|
|
3044
|
+
business_accepted: "\u5DF2\u9A8C\u6536",
|
|
3045
|
+
business_already_completed: "\u5DF2\u5B8C\u6210\uFF0C\u65E0\u9700\u91CD\u590D",
|
|
3046
|
+
business_not_claimed: "\u672A\u9886\u53D6",
|
|
3047
|
+
business_blocked: "\u53D7\u963B",
|
|
3048
|
+
business_failed: "\u4EFB\u52A1\u5931\u8D25",
|
|
3049
|
+
business_incomplete: "\u672A\u9A8C\u6536"
|
|
3016
3050
|
},
|
|
3017
3051
|
counts: {
|
|
3018
3052
|
messages: {
|
|
@@ -3128,7 +3162,7 @@ var zh_CN_default = {
|
|
|
3128
3162
|
pause: "\u6682\u505C\u6D41\u7A0B",
|
|
3129
3163
|
resume: "\u6062\u590D\u6D41\u7A0B",
|
|
3130
3164
|
cancelRun: "\u505C\u6B62\u4EFB\u52A1",
|
|
3131
|
-
pausing: "\u6B63\u5728\
|
|
3165
|
+
pausing: "\u6B63\u5728\u6682\u505C",
|
|
3132
3166
|
paused: "\u6D41\u7A0B\u5DF2\u6682\u505C",
|
|
3133
3167
|
editMessage: "\u7F16\u8F91\u6D88\u606F",
|
|
3134
3168
|
sourcePauseUnavailable: "\u539F\u4EFB\u52A1\u6682\u4E0D\u652F\u6301\u6682\u505C\uFF0C\u8BF7\u5728\u4EFB\u52A1\u5B8C\u6210\u540E\u91CD\u8BD5\u3002",
|
|
@@ -3142,7 +3176,11 @@ var zh_CN_default = {
|
|
|
3142
3176
|
interrupted: "\u7B49\u5F85\u5904\u7406",
|
|
3143
3177
|
error: "\u51FA\u9519",
|
|
3144
3178
|
running: "\u8FD0\u884C\u4E2D"
|
|
3145
|
-
}
|
|
3179
|
+
},
|
|
3180
|
+
stop: "\u505C\u6B62",
|
|
3181
|
+
stopping: "\u6B63\u5728\u505C\u6B62",
|
|
3182
|
+
stopDescription: "\u7EC8\u6B62\u672C\u6B21\u8FD0\u884C\uFF0C\u4E0D\u64A4\u9500\u5DF2\u7ECF\u5B8C\u6210\u7684\u64CD\u4F5C",
|
|
3183
|
+
pausingDescription: "\u6B63\u5728\u7B49\u5F85\u5F53\u524D\u6B65\u9AA4\u5B8C\u6210\u5E76\u4FDD\u5B58\u8FDB\u5EA6\uFF1B\u4ECD\u53EF\u505C\u6B62\u8FD0\u884C"
|
|
3146
3184
|
},
|
|
3147
3185
|
fileActivity: {
|
|
3148
3186
|
textLineChanges: "\u6587\u672C\u884C\u53D8\u66F4",
|
|
@@ -4335,39 +4373,6 @@ import { ChevronRight, Laptop, Monitor } from "lucide-react";
|
|
|
4335
4373
|
// src/providers/Stream.tsx
|
|
4336
4374
|
import { useEffect as useEffect6, useRef as useRef6, useState as useState5 } from "react";
|
|
4337
4375
|
|
|
4338
|
-
// src/lib/api-config.ts
|
|
4339
|
-
function hasConfiguredValue(value) {
|
|
4340
|
-
return typeof value === "string" && value.trim().length > 0;
|
|
4341
|
-
}
|
|
4342
|
-
function getMissingApiConfigurationKind({
|
|
4343
|
-
apiUrl,
|
|
4344
|
-
clientSecret
|
|
4345
|
-
}) {
|
|
4346
|
-
const hasApiUrl = hasConfiguredValue(apiUrl);
|
|
4347
|
-
const hasClientSecret = hasConfiguredValue(clientSecret);
|
|
4348
|
-
if (hasApiUrl && hasClientSecret) {
|
|
4349
|
-
return null;
|
|
4350
|
-
}
|
|
4351
|
-
if (!hasApiUrl && !hasClientSecret) {
|
|
4352
|
-
return "apiUrlAndClientSecret";
|
|
4353
|
-
}
|
|
4354
|
-
return hasApiUrl ? "clientSecret" : "apiUrl";
|
|
4355
|
-
}
|
|
4356
|
-
|
|
4357
|
-
// src/providers/stream/context.ts
|
|
4358
|
-
import { createContext as createContext3, useContext as useContext3 } from "react";
|
|
4359
|
-
var StreamContext = createContext3(
|
|
4360
|
-
void 0
|
|
4361
|
-
);
|
|
4362
|
-
var useStreamContext = () => {
|
|
4363
|
-
const context = useContext3(StreamContext);
|
|
4364
|
-
if (!context) {
|
|
4365
|
-
throw new Error("useStreamContext must be used within a StreamProvider");
|
|
4366
|
-
}
|
|
4367
|
-
return context;
|
|
4368
|
-
};
|
|
4369
|
-
var context_default = StreamContext;
|
|
4370
|
-
|
|
4371
4376
|
// src/lib/follow-ups.ts
|
|
4372
4377
|
function getVisiblePendingFollowUpPriority(item) {
|
|
4373
4378
|
return item.mode === "steer" || item.queuedFromSteer ? 0 : 1;
|
|
@@ -5141,6 +5146,39 @@ function agentRunLevel(run, messages) {
|
|
|
5141
5146
|
return level;
|
|
5142
5147
|
}
|
|
5143
5148
|
|
|
5149
|
+
// src/lib/api-config.ts
|
|
5150
|
+
function hasConfiguredValue(value) {
|
|
5151
|
+
return typeof value === "string" && value.trim().length > 0;
|
|
5152
|
+
}
|
|
5153
|
+
function getMissingApiConfigurationKind({
|
|
5154
|
+
apiUrl,
|
|
5155
|
+
clientSecret
|
|
5156
|
+
}) {
|
|
5157
|
+
const hasApiUrl = hasConfiguredValue(apiUrl);
|
|
5158
|
+
const hasClientSecret = hasConfiguredValue(clientSecret);
|
|
5159
|
+
if (hasApiUrl && hasClientSecret) {
|
|
5160
|
+
return null;
|
|
5161
|
+
}
|
|
5162
|
+
if (!hasApiUrl && !hasClientSecret) {
|
|
5163
|
+
return "apiUrlAndClientSecret";
|
|
5164
|
+
}
|
|
5165
|
+
return hasApiUrl ? "clientSecret" : "apiUrl";
|
|
5166
|
+
}
|
|
5167
|
+
|
|
5168
|
+
// src/providers/stream/context.ts
|
|
5169
|
+
import { createContext as createContext3, useContext as useContext3 } from "react";
|
|
5170
|
+
var StreamContext = createContext3(
|
|
5171
|
+
void 0
|
|
5172
|
+
);
|
|
5173
|
+
var useStreamContext = () => {
|
|
5174
|
+
const context = useContext3(StreamContext);
|
|
5175
|
+
if (!context) {
|
|
5176
|
+
throw new Error("useStreamContext must be used within a StreamProvider");
|
|
5177
|
+
}
|
|
5178
|
+
return context;
|
|
5179
|
+
};
|
|
5180
|
+
var context_default = StreamContext;
|
|
5181
|
+
|
|
5144
5182
|
// src/lib/runtime-capabilities.ts
|
|
5145
5183
|
function isRuntimeSkillSource(value) {
|
|
5146
5184
|
if (!value || typeof value !== "object" || Array.isArray(value)) {
|
|
@@ -5543,12 +5581,12 @@ async function loadConversationRuntimeCapabilities({
|
|
|
5543
5581
|
client,
|
|
5544
5582
|
threadId,
|
|
5545
5583
|
xpertId,
|
|
5546
|
-
projectId,
|
|
5584
|
+
projectId: projectId2,
|
|
5547
5585
|
capabilities
|
|
5548
5586
|
}) {
|
|
5549
5587
|
const conversation = await findConversationByThreadId(client, threadId, {
|
|
5550
5588
|
xpertId,
|
|
5551
|
-
projectId
|
|
5589
|
+
projectId: projectId2
|
|
5552
5590
|
});
|
|
5553
5591
|
const persistedSelection = getConversationOptions(conversation)?.runtimeCapabilities ?? null;
|
|
5554
5592
|
if (!persistedSelection) {
|
|
@@ -5571,7 +5609,7 @@ async function persistConversationRuntimeCapabilities({
|
|
|
5571
5609
|
client,
|
|
5572
5610
|
threadId,
|
|
5573
5611
|
xpertId,
|
|
5574
|
-
projectId,
|
|
5612
|
+
projectId: projectId2,
|
|
5575
5613
|
capabilities,
|
|
5576
5614
|
selection
|
|
5577
5615
|
}) {
|
|
@@ -5582,7 +5620,7 @@ async function persistConversationRuntimeCapabilities({
|
|
|
5582
5620
|
const conversation = await findConversationByThreadIdWithRetry(
|
|
5583
5621
|
client,
|
|
5584
5622
|
threadId,
|
|
5585
|
-
{ xpertId, projectId }
|
|
5623
|
+
{ xpertId, projectId: projectId2 }
|
|
5586
5624
|
);
|
|
5587
5625
|
if (!conversation?.id) {
|
|
5588
5626
|
return {
|
|
@@ -5729,14 +5767,14 @@ function createAssistantThreadPayload(assistantId, threadId) {
|
|
|
5729
5767
|
...threadId ? { threadId, ifExists: "raise" } : {}
|
|
5730
5768
|
};
|
|
5731
5769
|
}
|
|
5732
|
-
function createConversationPayload(threadId, xpertId,
|
|
5770
|
+
function createConversationPayload(threadId, xpertId, projectId2, connectorBindingIds = [], conversationId, runtimeCapabilities) {
|
|
5733
5771
|
const baseOptions = runtimeCapabilities ? { runtimeCapabilities } : void 0;
|
|
5734
5772
|
const options = connectorBindingIds.length ? withConnectorBindingIds(baseOptions, connectorBindingIds) : baseOptions;
|
|
5735
5773
|
return {
|
|
5736
5774
|
...conversationId ? { id: conversationId } : {},
|
|
5737
5775
|
threadId,
|
|
5738
5776
|
xpertId,
|
|
5739
|
-
...
|
|
5777
|
+
...projectId2 ? { projectId: projectId2 } : {},
|
|
5740
5778
|
...options ? { options } : {}
|
|
5741
5779
|
};
|
|
5742
5780
|
}
|
|
@@ -5817,7 +5855,7 @@ async function executeThreadGoalCommand({
|
|
|
5817
5855
|
goal,
|
|
5818
5856
|
threadId,
|
|
5819
5857
|
assistantId,
|
|
5820
|
-
projectId,
|
|
5858
|
+
projectId: projectId2,
|
|
5821
5859
|
command,
|
|
5822
5860
|
runtimeCapabilities,
|
|
5823
5861
|
signal
|
|
@@ -5863,7 +5901,7 @@ async function executeThreadGoalCommand({
|
|
|
5863
5901
|
const result2 = await goal.setGoal({
|
|
5864
5902
|
threadId: null,
|
|
5865
5903
|
assistantId,
|
|
5866
|
-
projectId,
|
|
5904
|
+
projectId: projectId2,
|
|
5867
5905
|
objective,
|
|
5868
5906
|
runtimeCapabilities,
|
|
5869
5907
|
signal
|
|
@@ -5882,7 +5920,7 @@ async function executeThreadGoalCommand({
|
|
|
5882
5920
|
const result = await goal.setGoal({
|
|
5883
5921
|
threadId: normalizedThreadId,
|
|
5884
5922
|
assistantId,
|
|
5885
|
-
projectId,
|
|
5923
|
+
projectId: projectId2,
|
|
5886
5924
|
objective,
|
|
5887
5925
|
runtimeCapabilities,
|
|
5888
5926
|
signal
|
|
@@ -6534,7 +6572,7 @@ function ComputerRow({
|
|
|
6534
6572
|
|
|
6535
6573
|
// src/components/chat.tsx
|
|
6536
6574
|
import { ArrowDown as ArrowDown2 } from "lucide-react";
|
|
6537
|
-
import * as
|
|
6575
|
+
import * as React124 from "react";
|
|
6538
6576
|
|
|
6539
6577
|
// src/lib/composer-parts.ts
|
|
6540
6578
|
var COMPOSER_CAPABILITY_TOKEN_LENGTH = 1;
|
|
@@ -7557,7 +7595,7 @@ function getRemovedComposerCapabilityParts(previousParts, nextParts) {
|
|
|
7557
7595
|
function useRuntimeCapabilitiesState({
|
|
7558
7596
|
client,
|
|
7559
7597
|
assistantId,
|
|
7560
|
-
projectId,
|
|
7598
|
+
projectId: projectId2,
|
|
7561
7599
|
threadId,
|
|
7562
7600
|
disabled
|
|
7563
7601
|
}) {
|
|
@@ -7593,7 +7631,7 @@ function useRuntimeCapabilitiesState({
|
|
|
7593
7631
|
client,
|
|
7594
7632
|
threadId: nextThreadId,
|
|
7595
7633
|
xpertId: assistantId,
|
|
7596
|
-
projectId,
|
|
7634
|
+
projectId: projectId2,
|
|
7597
7635
|
capabilities: runtimeCapabilities,
|
|
7598
7636
|
selection
|
|
7599
7637
|
});
|
|
@@ -7608,7 +7646,7 @@ function useRuntimeCapabilitiesState({
|
|
|
7608
7646
|
);
|
|
7609
7647
|
}
|
|
7610
7648
|
},
|
|
7611
|
-
[assistantId, client,
|
|
7649
|
+
[assistantId, client, projectId2, runtimeCapabilities]
|
|
7612
7650
|
);
|
|
7613
7651
|
const applyExternalRuntimeCapabilities = React15.useCallback(
|
|
7614
7652
|
(selection) => {
|
|
@@ -7728,7 +7766,7 @@ function useRuntimeCapabilitiesState({
|
|
|
7728
7766
|
setRuntimeCapabilities(null);
|
|
7729
7767
|
setRuntimeCapabilityPalette(null);
|
|
7730
7768
|
void client.assistants.getRuntimeCapabilities(assistantId, {
|
|
7731
|
-
...
|
|
7769
|
+
...projectId2 ? { projectId: projectId2 } : {},
|
|
7732
7770
|
signal: controller.signal
|
|
7733
7771
|
}).then((payload) => {
|
|
7734
7772
|
setRuntimeCapabilities(payload);
|
|
@@ -7761,7 +7799,7 @@ function useRuntimeCapabilitiesState({
|
|
|
7761
7799
|
setRunRuntimeCapabilities(createEmptyRuntimeCapabilitiesSelection());
|
|
7762
7800
|
});
|
|
7763
7801
|
return () => controller.abort();
|
|
7764
|
-
}, [assistantId, client, disabled,
|
|
7802
|
+
}, [assistantId, client, disabled, projectId2]);
|
|
7765
7803
|
React15.useEffect(() => {
|
|
7766
7804
|
const emptyRunSelection = createEmptyRuntimeCapabilitiesSelection(runtimeCapabilities);
|
|
7767
7805
|
const pendingExternalSelection = pendingExternalRuntimeCapabilitiesRef.current;
|
|
@@ -7797,7 +7835,7 @@ function useRuntimeCapabilitiesState({
|
|
|
7797
7835
|
client,
|
|
7798
7836
|
threadId: normalizedThreadId,
|
|
7799
7837
|
xpertId: assistantId,
|
|
7800
|
-
projectId,
|
|
7838
|
+
projectId: projectId2,
|
|
7801
7839
|
capabilities: runtimeCapabilities
|
|
7802
7840
|
}).then(({ selection, missing }) => {
|
|
7803
7841
|
if (cancelled || runtimeCapabilityPreferenceLoadRef.current !== requestId) {
|
|
@@ -7821,7 +7859,7 @@ function useRuntimeCapabilitiesState({
|
|
|
7821
7859
|
}, [
|
|
7822
7860
|
assistantId,
|
|
7823
7861
|
client,
|
|
7824
|
-
|
|
7862
|
+
projectId2,
|
|
7825
7863
|
runtimeCapabilities,
|
|
7826
7864
|
runtimeCapabilitiesReady,
|
|
7827
7865
|
threadId
|
|
@@ -8566,7 +8604,7 @@ function useRuntimeResources({
|
|
|
8566
8604
|
client,
|
|
8567
8605
|
enabled,
|
|
8568
8606
|
assistantId,
|
|
8569
|
-
projectId,
|
|
8607
|
+
projectId: projectId2,
|
|
8570
8608
|
conversationId,
|
|
8571
8609
|
threadId
|
|
8572
8610
|
}) {
|
|
@@ -8589,8 +8627,8 @@ function useRuntimeResources({
|
|
|
8589
8627
|
const current = ++generation.current;
|
|
8590
8628
|
const pending = submission.current;
|
|
8591
8629
|
const isDraft = !conversationId && !threadId;
|
|
8592
|
-
const isHandoff = !!pending && pending.assistantId === assistantId && pending.projectId ===
|
|
8593
|
-
if (pending && !isHandoff && (!isDraft || pending.complete || pending.assistantId !== assistantId || pending.projectId !==
|
|
8630
|
+
const isHandoff = !!pending && pending.assistantId === assistantId && pending.projectId === projectId2 && (!!conversationId && conversationId === pending.conversationId || !!threadId && threadId === pending.threadId);
|
|
8631
|
+
if (pending && !isHandoff && (!isDraft || pending.complete || pending.assistantId !== assistantId || pending.projectId !== projectId2)) {
|
|
8594
8632
|
submission.current = null;
|
|
8595
8633
|
if (!isDraft || pending.complete) draft.current = null;
|
|
8596
8634
|
}
|
|
@@ -8609,7 +8647,7 @@ function useRuntimeResources({
|
|
|
8609
8647
|
void (async () => {
|
|
8610
8648
|
const id = conversationId ?? (threadId ? (await findConversationByThreadId(client, threadId, {
|
|
8611
8649
|
xpertId: assistantId,
|
|
8612
|
-
projectId
|
|
8650
|
+
projectId: projectId2
|
|
8613
8651
|
}))?.id : null);
|
|
8614
8652
|
if (!isDraft && !id) throw new Error(conversationUnavailable);
|
|
8615
8653
|
const value = id ? await client.conversations.getRuntimeResources(id) : local;
|
|
@@ -8617,7 +8655,7 @@ function useRuntimeResources({
|
|
|
8617
8655
|
await client.assistants.validateResources(
|
|
8618
8656
|
assistantId,
|
|
8619
8657
|
value,
|
|
8620
|
-
|
|
8658
|
+
projectId2 ?? void 0
|
|
8621
8659
|
);
|
|
8622
8660
|
if (generation.current === current) {
|
|
8623
8661
|
if (isHandoff && submission.current === pending)
|
|
@@ -8639,7 +8677,7 @@ function useRuntimeResources({
|
|
|
8639
8677
|
client,
|
|
8640
8678
|
enabled,
|
|
8641
8679
|
assistantId,
|
|
8642
|
-
|
|
8680
|
+
projectId2,
|
|
8643
8681
|
conversationId,
|
|
8644
8682
|
threadId,
|
|
8645
8683
|
reload,
|
|
@@ -8669,7 +8707,7 @@ function useRuntimeResources({
|
|
|
8669
8707
|
const saved = resolvedId ? await client.conversations.updateRuntimeResources(resolvedId, next) : await client.assistants.validateResources(
|
|
8670
8708
|
assistantId,
|
|
8671
8709
|
next,
|
|
8672
|
-
|
|
8710
|
+
projectId2 ?? void 0
|
|
8673
8711
|
);
|
|
8674
8712
|
if (current === generation.current) {
|
|
8675
8713
|
setSelection(saved);
|
|
@@ -8699,14 +8737,14 @@ function useRuntimeResources({
|
|
|
8699
8737
|
selection,
|
|
8700
8738
|
resolvedId,
|
|
8701
8739
|
assistantId,
|
|
8702
|
-
|
|
8740
|
+
projectId2
|
|
8703
8741
|
]
|
|
8704
8742
|
);
|
|
8705
8743
|
const beginSubmission = React19.useCallback(() => {
|
|
8706
8744
|
if (!enabled || !assistantId || conversationId || threadId) return;
|
|
8707
8745
|
const pending = {
|
|
8708
8746
|
assistantId,
|
|
8709
|
-
projectId,
|
|
8747
|
+
projectId: projectId2,
|
|
8710
8748
|
selection,
|
|
8711
8749
|
complete: false
|
|
8712
8750
|
};
|
|
@@ -8724,7 +8762,7 @@ function useRuntimeResources({
|
|
|
8724
8762
|
else submission.current = null;
|
|
8725
8763
|
}
|
|
8726
8764
|
};
|
|
8727
|
-
}, [enabled, assistantId,
|
|
8765
|
+
}, [enabled, assistantId, projectId2, conversationId, threadId, selection]);
|
|
8728
8766
|
return {
|
|
8729
8767
|
selection,
|
|
8730
8768
|
busy,
|
|
@@ -9017,7 +9055,7 @@ import { jsx as jsx24, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
|
9017
9055
|
var ThreadMentionPalette = React21.forwardRef(function ThreadMentionPalette2({
|
|
9018
9056
|
client,
|
|
9019
9057
|
assistantId,
|
|
9020
|
-
projectId,
|
|
9058
|
+
projectId: projectId2,
|
|
9021
9059
|
threadId,
|
|
9022
9060
|
query,
|
|
9023
9061
|
selectedThreadIds,
|
|
@@ -9042,7 +9080,7 @@ var ThreadMentionPalette = React21.forwardRef(function ThreadMentionPalette2({
|
|
|
9042
9080
|
const timer = setTimeout(() => {
|
|
9043
9081
|
void client.conversations.search(
|
|
9044
9082
|
{
|
|
9045
|
-
where: { xpertId: assistantId, projectId:
|
|
9083
|
+
where: { xpertId: assistantId, projectId: projectId2 ?? null },
|
|
9046
9084
|
search: query.trim(),
|
|
9047
9085
|
limit: 30,
|
|
9048
9086
|
order: { updatedAt: "DESC", id: "DESC" }
|
|
@@ -9060,7 +9098,7 @@ var ThreadMentionPalette = React21.forwardRef(function ThreadMentionPalette2({
|
|
|
9060
9098
|
clearTimeout(timer);
|
|
9061
9099
|
controller.abort();
|
|
9062
9100
|
};
|
|
9063
|
-
}, [client, assistantId,
|
|
9101
|
+
}, [client, assistantId, projectId2, query]);
|
|
9064
9102
|
const visible = items.filter(
|
|
9065
9103
|
(item) => item.threadId && item.threadId !== threadId && !selectedThreadIds.has(item.threadId)
|
|
9066
9104
|
);
|
|
@@ -11170,11 +11208,11 @@ function invalidateConnectionCatalogs(client) {
|
|
|
11170
11208
|
notify(entry);
|
|
11171
11209
|
}
|
|
11172
11210
|
}
|
|
11173
|
-
function useConnectorCatalog(client, assistantId,
|
|
11211
|
+
function useConnectorCatalog(client, assistantId, projectId2, enabled = true) {
|
|
11174
11212
|
const entry = React37.useMemo(() => {
|
|
11175
11213
|
let scopes = clients.get(client);
|
|
11176
11214
|
if (!scopes) clients.set(client, scopes = /* @__PURE__ */ new Map());
|
|
11177
|
-
const key = JSON.stringify([assistantId,
|
|
11215
|
+
const key = JSON.stringify([assistantId, projectId2 ?? null]);
|
|
11178
11216
|
let cached = scopes.get(key);
|
|
11179
11217
|
if (!cached)
|
|
11180
11218
|
scopes.set(
|
|
@@ -11187,7 +11225,7 @@ function useConnectorCatalog(client, assistantId, projectId, enabled = true) {
|
|
|
11187
11225
|
}
|
|
11188
11226
|
);
|
|
11189
11227
|
return cached;
|
|
11190
|
-
}, [client, assistantId,
|
|
11228
|
+
}, [client, assistantId, projectId2]);
|
|
11191
11229
|
const revision = React37.useSyncExternalStore(
|
|
11192
11230
|
React37.useCallback(
|
|
11193
11231
|
(listener) => {
|
|
@@ -11207,7 +11245,7 @@ function useConnectorCatalog(client, assistantId, projectId, enabled = true) {
|
|
|
11207
11245
|
notify(entry);
|
|
11208
11246
|
const startedAt = entry.revision;
|
|
11209
11247
|
void client.connectors.runtimeOptions(assistantId, {
|
|
11210
|
-
projectId:
|
|
11248
|
+
projectId: projectId2 ?? void 0,
|
|
11211
11249
|
includeWorkspace: true
|
|
11212
11250
|
}).then((data) => {
|
|
11213
11251
|
entry.data = data;
|
|
@@ -11218,7 +11256,7 @@ function useConnectorCatalog(client, assistantId, projectId, enabled = true) {
|
|
|
11218
11256
|
entry.loaded = entry.revision === startedAt;
|
|
11219
11257
|
notify(entry);
|
|
11220
11258
|
});
|
|
11221
|
-
}, [entry, client, assistantId,
|
|
11259
|
+
}, [entry, client, assistantId, projectId2, enabled, revision]);
|
|
11222
11260
|
React37.useEffect(() => {
|
|
11223
11261
|
if (!enabled) return;
|
|
11224
11262
|
const refresh = () => {
|
|
@@ -11469,13 +11507,13 @@ function ConnectorMenuPanel(props) {
|
|
|
11469
11507
|
function ConnectorList({
|
|
11470
11508
|
client,
|
|
11471
11509
|
xpertId,
|
|
11472
|
-
projectId,
|
|
11510
|
+
projectId: projectId2,
|
|
11473
11511
|
selectedBindingIds = [],
|
|
11474
11512
|
onSelectionChange,
|
|
11475
11513
|
apiUrl
|
|
11476
11514
|
}) {
|
|
11477
11515
|
const { t, i18n: i18n2 } = useChatkitTranslation();
|
|
11478
|
-
const catalog = useConnectorCatalog(client, xpertId,
|
|
11516
|
+
const catalog = useConnectorCatalog(client, xpertId, projectId2);
|
|
11479
11517
|
const [query, setQuery] = React39.useState("");
|
|
11480
11518
|
const [target, setTarget] = React39.useState(null);
|
|
11481
11519
|
const latest = React39.useRef({ selectedBindingIds, onSelectionChange });
|
|
@@ -12708,6 +12746,7 @@ function ProjectSelector({
|
|
|
12708
12746
|
activeProjectId,
|
|
12709
12747
|
selection,
|
|
12710
12748
|
autoNewEnabled = false,
|
|
12749
|
+
autoNewMode = "on-send",
|
|
12711
12750
|
allowNone = true,
|
|
12712
12751
|
disabled = false,
|
|
12713
12752
|
locked = false,
|
|
@@ -13000,7 +13039,7 @@ function ProjectSelector({
|
|
|
13000
13039
|
"aria-label": t("composer.projects.select"),
|
|
13001
13040
|
children: [
|
|
13002
13041
|
/* @__PURE__ */ jsx48(Folder, { className: "size-3.5 shrink-0" }),
|
|
13003
|
-
/* @__PURE__ */ jsx48("span", { className: "truncate", children: activeProject?.name ?? activeLabel ?? (selection?.mode === "auto-new" ? t("composer.projects.autoNew") : selection?.mode === "none" ? t("composer.projects.none") : void 0) ?? t("composer.projects.select") }),
|
|
13042
|
+
/* @__PURE__ */ jsx48("span", { className: "truncate", children: activeProject?.name ?? activeLabel ?? (selection?.mode === "auto-new" ? t(autoNewMode === "after-confirmation" ? "composer.projects.confirmNew" : "composer.projects.autoNew") : selection?.mode === "none" ? t("composer.projects.none") : void 0) ?? t("composer.projects.select") }),
|
|
13004
13043
|
/* @__PURE__ */ jsx48(ChevronDown4, { className: "size-3.5 shrink-0" })
|
|
13005
13044
|
]
|
|
13006
13045
|
}
|
|
@@ -13262,7 +13301,7 @@ function ProjectSelector({
|
|
|
13262
13301
|
setOpen(false);
|
|
13263
13302
|
},
|
|
13264
13303
|
children: [
|
|
13265
|
-
/* @__PURE__ */ jsx48("span", { className: "flex-1", children: t("composer.projects.autoNew") }),
|
|
13304
|
+
/* @__PURE__ */ jsx48("span", { className: "flex-1", children: t(autoNewMode === "after-confirmation" ? "composer.projects.confirmNew" : "composer.projects.autoNew") }),
|
|
13266
13305
|
!activeProjectId && selection?.mode === "auto-new" ? /* @__PURE__ */ jsx48(Check2, { className: "size-4 shrink-0" }) : null
|
|
13267
13306
|
]
|
|
13268
13307
|
}
|
|
@@ -13764,7 +13803,7 @@ var fullCatalog = { search: "", allPages: true };
|
|
|
13764
13803
|
function useRuntimeResourceCatalog({
|
|
13765
13804
|
client,
|
|
13766
13805
|
assistantId,
|
|
13767
|
-
projectId,
|
|
13806
|
+
projectId: projectId2,
|
|
13768
13807
|
enabled,
|
|
13769
13808
|
query,
|
|
13770
13809
|
kind,
|
|
@@ -13773,7 +13812,7 @@ function useRuntimeResourceCatalog({
|
|
|
13773
13812
|
const { t } = useChatkitTranslation();
|
|
13774
13813
|
const cache = React47.useMemo(
|
|
13775
13814
|
() => ({
|
|
13776
|
-
scope: { client, assistantId, projectId },
|
|
13815
|
+
scope: { client, assistantId, projectId: projectId2 },
|
|
13777
13816
|
entries: /* @__PURE__ */ new Map(),
|
|
13778
13817
|
known: /* @__PURE__ */ new Map(),
|
|
13779
13818
|
// Historical metadata is presentation-only; it is never proof of availability.
|
|
@@ -13781,7 +13820,7 @@ function useRuntimeResourceCatalog({
|
|
|
13781
13820
|
verified: /* @__PURE__ */ new Map(),
|
|
13782
13821
|
controllers: /* @__PURE__ */ new Set()
|
|
13783
13822
|
}),
|
|
13784
|
-
[client, assistantId,
|
|
13823
|
+
[client, assistantId, projectId2]
|
|
13785
13824
|
);
|
|
13786
13825
|
const [revision, redraw] = React47.useReducer((value) => value + 1, 0);
|
|
13787
13826
|
const [actionError, setLoadError] = React47.useState(null);
|
|
@@ -13808,7 +13847,7 @@ function useRuntimeResourceCatalog({
|
|
|
13808
13847
|
}, [cache, refresh]);
|
|
13809
13848
|
const load = React47.useCallback(
|
|
13810
13849
|
async (target, more = false) => {
|
|
13811
|
-
const { client: client2, assistantId: assistantId2, projectId:
|
|
13850
|
+
const { client: client2, assistantId: assistantId2, projectId: projectId3 } = cache.scope;
|
|
13812
13851
|
const key2 = catalogKey(target);
|
|
13813
13852
|
const existing = cache.entries.get(key2);
|
|
13814
13853
|
if (existing?.loading || !more && (existing?.loaded || existing?.error))
|
|
@@ -13830,7 +13869,7 @@ function useRuntimeResourceCatalog({
|
|
|
13830
13869
|
try {
|
|
13831
13870
|
do {
|
|
13832
13871
|
const result = await client2.assistants.getResources(assistantId2, {
|
|
13833
|
-
projectId:
|
|
13872
|
+
projectId: projectId3 ?? void 0,
|
|
13834
13873
|
search: target.search || void 0,
|
|
13835
13874
|
kind: target.kind,
|
|
13836
13875
|
offset: entry2.offset,
|
|
@@ -13902,7 +13941,7 @@ function useRuntimeResourceCatalog({
|
|
|
13902
13941
|
{ bindingId: resource.bindingId, version: resource.version }
|
|
13903
13942
|
]
|
|
13904
13943
|
},
|
|
13905
|
-
|
|
13944
|
+
projectId2 ?? void 0
|
|
13906
13945
|
).then(() => {
|
|
13907
13946
|
if (!abort.signal.aborted)
|
|
13908
13947
|
cache.verified.set(key2, "previous_version");
|
|
@@ -13923,7 +13962,7 @@ function useRuntimeResourceCatalog({
|
|
|
13923
13962
|
selectedResources,
|
|
13924
13963
|
client,
|
|
13925
13964
|
assistantId,
|
|
13926
|
-
|
|
13965
|
+
projectId2,
|
|
13927
13966
|
revision
|
|
13928
13967
|
]);
|
|
13929
13968
|
const selectedItems = selectedResources.map(
|
|
@@ -13991,7 +14030,7 @@ function useCompactMenu() {
|
|
|
13991
14030
|
function RuntimeResourceSelector({
|
|
13992
14031
|
client,
|
|
13993
14032
|
assistantId,
|
|
13994
|
-
projectId,
|
|
14033
|
+
projectId: projectId2,
|
|
13995
14034
|
selection,
|
|
13996
14035
|
busy,
|
|
13997
14036
|
canEditResources = true,
|
|
@@ -14028,7 +14067,7 @@ function RuntimeResourceSelector({
|
|
|
14028
14067
|
const connectors = useConnectorCatalog(
|
|
14029
14068
|
client,
|
|
14030
14069
|
assistantId,
|
|
14031
|
-
|
|
14070
|
+
projectId2,
|
|
14032
14071
|
connectorsEnabled && (open || expanded || connectorBindingIds.length > 0)
|
|
14033
14072
|
);
|
|
14034
14073
|
const latest = React48.useRef({
|
|
@@ -14046,7 +14085,7 @@ function RuntimeResourceSelector({
|
|
|
14046
14085
|
const catalog = useRuntimeResourceCatalog({
|
|
14047
14086
|
client,
|
|
14048
14087
|
assistantId,
|
|
14049
|
-
projectId,
|
|
14088
|
+
projectId: projectId2,
|
|
14050
14089
|
enabled: open || expanded || selection.resources.length > 0,
|
|
14051
14090
|
query: active || expanded ? query : rootQuery,
|
|
14052
14091
|
kind: expanded ? browseKind : active ?? void 0,
|
|
@@ -14060,7 +14099,7 @@ function RuntimeResourceSelector({
|
|
|
14060
14099
|
setQuery("");
|
|
14061
14100
|
setRootQuery("");
|
|
14062
14101
|
setAuthorization(null);
|
|
14063
|
-
}, [assistantId,
|
|
14102
|
+
}, [assistantId, projectId2]);
|
|
14064
14103
|
const selected = new Set(selection.resources.map((item) => item.bindingId));
|
|
14065
14104
|
const selectedItems = catalog.selectedItems;
|
|
14066
14105
|
const selectedResources = selectedItems.filter(
|
|
@@ -14174,7 +14213,7 @@ function RuntimeResourceSelector({
|
|
|
14174
14213
|
bindingId: item.bindingId,
|
|
14175
14214
|
version: item.version,
|
|
14176
14215
|
serverName,
|
|
14177
|
-
projectId:
|
|
14216
|
+
projectId: projectId2 ?? void 0
|
|
14178
14217
|
}),
|
|
14179
14218
|
onAuthorized: async (signal) => {
|
|
14180
14219
|
let offset = 0;
|
|
@@ -14182,7 +14221,7 @@ function RuntimeResourceSelector({
|
|
|
14182
14221
|
let fresh;
|
|
14183
14222
|
do {
|
|
14184
14223
|
const page = await client.assistants.getResources(assistantId, {
|
|
14185
|
-
projectId:
|
|
14224
|
+
projectId: projectId2 ?? void 0,
|
|
14186
14225
|
kind: "agent_plugin",
|
|
14187
14226
|
search: item.title,
|
|
14188
14227
|
signal,
|
|
@@ -14648,7 +14687,7 @@ function RuntimeResourceSelector({
|
|
|
14648
14687
|
}
|
|
14649
14688
|
|
|
14650
14689
|
// src/components/composer/SendButton.tsx
|
|
14651
|
-
import { ArrowUp, Play, Square } from "lucide-react";
|
|
14690
|
+
import { ArrowUp, Pause, Play, Square } from "lucide-react";
|
|
14652
14691
|
import { jsx as jsx53, jsxs as jsxs37 } from "react/jsx-runtime";
|
|
14653
14692
|
function SendButton({
|
|
14654
14693
|
disabled = false,
|
|
@@ -14657,6 +14696,7 @@ function SendButton({
|
|
|
14657
14696
|
stopDisabled = false,
|
|
14658
14697
|
onStop,
|
|
14659
14698
|
stopLabel = "Stop",
|
|
14699
|
+
stopIcon = "stop",
|
|
14660
14700
|
showResume = false,
|
|
14661
14701
|
resumeDisabled = false,
|
|
14662
14702
|
onResume,
|
|
@@ -14666,7 +14706,7 @@ function SendButton({
|
|
|
14666
14706
|
}) {
|
|
14667
14707
|
if (showStop || showResume) {
|
|
14668
14708
|
const label = showStop ? stopLabel : resumeLabel;
|
|
14669
|
-
const Icon = showStop ? Square : Play;
|
|
14709
|
+
const Icon = showStop ? stopIcon === "pause" ? Pause : Square : Play;
|
|
14670
14710
|
return /* @__PURE__ */ jsx53(
|
|
14671
14711
|
"button",
|
|
14672
14712
|
{
|
|
@@ -14763,7 +14803,7 @@ function flattenWorkspaceFiles(files) {
|
|
|
14763
14803
|
var WorkspaceFileMentionPalette = React49.forwardRef(function WorkspaceFileMentionPalette2({
|
|
14764
14804
|
client,
|
|
14765
14805
|
assistantId,
|
|
14766
|
-
projectId,
|
|
14806
|
+
projectId: projectId2,
|
|
14767
14807
|
query,
|
|
14768
14808
|
selectedFilePaths,
|
|
14769
14809
|
onSelect,
|
|
@@ -14779,7 +14819,7 @@ var WorkspaceFileMentionPalette = React49.forwardRef(function WorkspaceFileMenti
|
|
|
14779
14819
|
const optionRefs = React49.useRef([]);
|
|
14780
14820
|
const loadErrorMessage = t("composer.fileMentions.loadError");
|
|
14781
14821
|
React49.useEffect(() => {
|
|
14782
|
-
if (!client || !
|
|
14822
|
+
if (!client || !projectId2 && !assistantId) {
|
|
14783
14823
|
setFiles([]);
|
|
14784
14824
|
setLoading(false);
|
|
14785
14825
|
setError(null);
|
|
@@ -14788,7 +14828,7 @@ var WorkspaceFileMentionPalette = React49.forwardRef(function WorkspaceFileMenti
|
|
|
14788
14828
|
const controller = new AbortController();
|
|
14789
14829
|
setLoading(true);
|
|
14790
14830
|
setError(null);
|
|
14791
|
-
const request =
|
|
14831
|
+
const request = projectId2 ? client.projects.listFiles(projectId2, {
|
|
14792
14832
|
depth: WORKSPACE_FILE_LIST_DEPTH,
|
|
14793
14833
|
signal: controller.signal
|
|
14794
14834
|
}) : client.xperts.listWorkspaceFiles(assistantId, {
|
|
@@ -14808,7 +14848,7 @@ var WorkspaceFileMentionPalette = React49.forwardRef(function WorkspaceFileMenti
|
|
|
14808
14848
|
if (!controller.signal.aborted) setLoading(false);
|
|
14809
14849
|
});
|
|
14810
14850
|
return () => controller.abort();
|
|
14811
|
-
}, [assistantId, client, loadErrorMessage,
|
|
14851
|
+
}, [assistantId, client, loadErrorMessage, projectId2]);
|
|
14812
14852
|
const normalizedQuery = query.trim().toLocaleLowerCase();
|
|
14813
14853
|
const visibleFiles = React49.useMemo(
|
|
14814
14854
|
() => files.filter((file) => {
|
|
@@ -14847,7 +14887,7 @@ var WorkspaceFileMentionPalette = React49.forwardRef(function WorkspaceFileMenti
|
|
|
14847
14887
|
}),
|
|
14848
14888
|
[onSelect, visibleFiles]
|
|
14849
14889
|
);
|
|
14850
|
-
const unavailable = !client || !
|
|
14890
|
+
const unavailable = !client || !projectId2 && !assistantId;
|
|
14851
14891
|
return /* @__PURE__ */ jsxs38(
|
|
14852
14892
|
"div",
|
|
14853
14893
|
{
|
|
@@ -15345,7 +15385,7 @@ function ChatComposerForm({
|
|
|
15345
15385
|
isChangingBranch,
|
|
15346
15386
|
handleComposerRunControl,
|
|
15347
15387
|
isRunPaused,
|
|
15348
|
-
|
|
15388
|
+
isStoppingRun,
|
|
15349
15389
|
isRunPausing,
|
|
15350
15390
|
isResumingRun,
|
|
15351
15391
|
currentRunControl,
|
|
@@ -15561,17 +15601,18 @@ function ChatComposerForm({
|
|
|
15561
15601
|
}
|
|
15562
15602
|
}
|
|
15563
15603
|
),
|
|
15604
|
+
isRunPausing && /* @__PURE__ */ jsx58("span", { role: "status", className: "text-xs text-muted-foreground", title: t("threadControl.pausingDescription"), children: t("threadControl.pausing") }),
|
|
15564
15605
|
/* @__PURE__ */ jsx58(
|
|
15565
15606
|
SendButton,
|
|
15566
15607
|
{
|
|
15567
15608
|
disabled: isSendDisabled,
|
|
15568
15609
|
isLoading: stream.isLoading,
|
|
15569
15610
|
showStop: !isPauseActive && (stream.isLoading || canPauseRun) && (!hasComposerInput || hasPendingInteractiveRequest),
|
|
15570
|
-
stopDisabled: isChangingBranch || !canPauseRun,
|
|
15611
|
+
stopDisabled: isChangingBranch || isStoppingRun || !canPauseRun,
|
|
15571
15612
|
onStop: () => void handleComposerRunControl("pause"),
|
|
15572
|
-
stopLabel: t("threadControl.
|
|
15613
|
+
stopLabel: t("threadControl.stop"),
|
|
15573
15614
|
showResume: isPauseActive && !hasComposerInput,
|
|
15574
|
-
resumeDisabled: !isRunPaused
|
|
15615
|
+
resumeDisabled: !isRunPaused || isStoppingRun || isRunPausing || isResumingRun || isChangingBranch || !currentRunControl?.pauseId,
|
|
15575
15616
|
onResume: () => void handleComposerRunControl("resume"),
|
|
15576
15617
|
resumeLabel: t("threadControl.resume"),
|
|
15577
15618
|
sendLabel: t("chat.send"),
|
|
@@ -15604,6 +15645,7 @@ function ChatComposerForm({
|
|
|
15604
15645
|
activeProjectId,
|
|
15605
15646
|
selection: projectSelection,
|
|
15606
15647
|
autoNewEnabled: options?.composer?.projects?.autoNewEnabled,
|
|
15648
|
+
autoNewMode: options?.composer?.projects?.autoNewMode,
|
|
15607
15649
|
allowNone: options?.composer?.projects?.allowNone,
|
|
15608
15650
|
locked: isProjectScopeLocked,
|
|
15609
15651
|
label: options?.composer?.projects?.label,
|
|
@@ -19357,6 +19399,7 @@ function useChatSubmission({
|
|
|
19357
19399
|
composerPartsRef,
|
|
19358
19400
|
stream,
|
|
19359
19401
|
isRunPaused,
|
|
19402
|
+
clearRunControlError,
|
|
19360
19403
|
planModeEnabled,
|
|
19361
19404
|
getRuntimeCapabilitiesForSubmit,
|
|
19362
19405
|
promptWorkflow,
|
|
@@ -19402,6 +19445,7 @@ function useChatSubmission({
|
|
|
19402
19445
|
if (!humanInput) {
|
|
19403
19446
|
return;
|
|
19404
19447
|
}
|
|
19448
|
+
clearRunControlError();
|
|
19405
19449
|
const {
|
|
19406
19450
|
runtimeCapabilitiesForSubmit,
|
|
19407
19451
|
runtimeCapabilityOptionsForMessage
|
|
@@ -19541,6 +19585,7 @@ function useChatSubmission({
|
|
|
19541
19585
|
promptWorkflow,
|
|
19542
19586
|
isSubmissionBlocked,
|
|
19543
19587
|
isRunPaused,
|
|
19588
|
+
clearRunControlError,
|
|
19544
19589
|
options?.request,
|
|
19545
19590
|
persistSessionRuntimeCapabilities,
|
|
19546
19591
|
resourcesEnabled,
|
|
@@ -20287,7 +20332,7 @@ function useChatFiles({
|
|
|
20287
20332
|
import {
|
|
20288
20333
|
ChevronDown as ChevronDown10,
|
|
20289
20334
|
Loader2 as Loader210,
|
|
20290
|
-
Pause,
|
|
20335
|
+
Pause as Pause2,
|
|
20291
20336
|
Pencil as Pencil4,
|
|
20292
20337
|
Play as Play2,
|
|
20293
20338
|
Target as Target3,
|
|
@@ -20394,7 +20439,7 @@ function ChatGoalStatus({
|
|
|
20394
20439
|
executionType: "insert_invocation"
|
|
20395
20440
|
}
|
|
20396
20441
|
}),
|
|
20397
|
-
children: threadGoal.status === "paused" ? /* @__PURE__ */ jsx72(Play2, { className: "size-3" }) : /* @__PURE__ */ jsx72(
|
|
20442
|
+
children: threadGoal.status === "paused" ? /* @__PURE__ */ jsx72(Play2, { className: "size-3" }) : /* @__PURE__ */ jsx72(Pause2, { className: "size-3" })
|
|
20398
20443
|
}
|
|
20399
20444
|
) }),
|
|
20400
20445
|
/* @__PURE__ */ jsx72(TooltipContent, { children: threadGoal.status === "paused" ? t("chat.goal.resume") : t("chat.goal.pause") })
|
|
@@ -20497,7 +20542,7 @@ function createXpertThreadGoalAdapter(client, scope) {
|
|
|
20497
20542
|
async setGoal({
|
|
20498
20543
|
threadId,
|
|
20499
20544
|
assistantId,
|
|
20500
|
-
projectId,
|
|
20545
|
+
projectId: projectId2,
|
|
20501
20546
|
objective,
|
|
20502
20547
|
runtimeCapabilities,
|
|
20503
20548
|
signal
|
|
@@ -20517,7 +20562,7 @@ function createXpertThreadGoalAdapter(client, scope) {
|
|
|
20517
20562
|
normalizedThreadId,
|
|
20518
20563
|
{
|
|
20519
20564
|
xpertId: scope.xpertId,
|
|
20520
|
-
projectId:
|
|
20565
|
+
projectId: projectId2 ?? scope.projectId
|
|
20521
20566
|
}
|
|
20522
20567
|
);
|
|
20523
20568
|
const goal = await setGoal(
|
|
@@ -20549,7 +20594,7 @@ function createXpertThreadGoalAdapter(client, scope) {
|
|
|
20549
20594
|
},
|
|
20550
20595
|
{
|
|
20551
20596
|
assistantId,
|
|
20552
|
-
projectId,
|
|
20597
|
+
projectId: projectId2,
|
|
20553
20598
|
runtimeCapabilities,
|
|
20554
20599
|
onThreadCreated: (resolvedThreadId) => {
|
|
20555
20600
|
createdThreadId = resolvedThreadId;
|
|
@@ -21817,13 +21862,13 @@ var PAGE_SIZE = 50;
|
|
|
21817
21862
|
function useMessageHistory({
|
|
21818
21863
|
client,
|
|
21819
21864
|
assistantId,
|
|
21820
|
-
projectId,
|
|
21865
|
+
projectId: projectId2,
|
|
21821
21866
|
enabled,
|
|
21822
21867
|
query,
|
|
21823
21868
|
scope
|
|
21824
21869
|
}) {
|
|
21825
21870
|
const { t } = useChatkitTranslation();
|
|
21826
|
-
const filterProjectId = scope === "no-project" ? null : scope === "current-project" ?
|
|
21871
|
+
const filterProjectId = scope === "no-project" ? null : scope === "current-project" ? projectId2 : void 0;
|
|
21827
21872
|
const search = query.trim();
|
|
21828
21873
|
const request = React74.useMemo(
|
|
21829
21874
|
() => ({
|
|
@@ -22054,7 +22099,7 @@ function useThreads(limit = DEFAULT_LIMIT, enabled = true, scope = "all") {
|
|
|
22054
22099
|
client,
|
|
22055
22100
|
threadId,
|
|
22056
22101
|
assistantId,
|
|
22057
|
-
projectId,
|
|
22102
|
+
projectId: projectId2,
|
|
22058
22103
|
isReady,
|
|
22059
22104
|
isLoading: isStreamLoading,
|
|
22060
22105
|
error: streamError
|
|
@@ -22062,7 +22107,7 @@ function useThreads(limit = DEFAULT_LIMIT, enabled = true, scope = "all") {
|
|
|
22062
22107
|
const [threadRecords, setThreadRecords] = React75.useState([]);
|
|
22063
22108
|
const [isLoading, setIsLoading] = React75.useState(false);
|
|
22064
22109
|
const [error, setError] = React75.useState(null);
|
|
22065
|
-
const filterProjectId = scope === "no-project" ? null : scope === "current-project" ?
|
|
22110
|
+
const filterProjectId = scope === "no-project" ? null : scope === "current-project" ? projectId2 : void 0;
|
|
22066
22111
|
const searchRequest = React75.useRef(null);
|
|
22067
22112
|
React75.useEffect(() => {
|
|
22068
22113
|
setThreadRecords([]);
|
|
@@ -22113,7 +22158,7 @@ function useThreads(limit = DEFAULT_LIMIT, enabled = true, scope = "all") {
|
|
|
22113
22158
|
setError(null);
|
|
22114
22159
|
const payload = {
|
|
22115
22160
|
xpertId: assistantId,
|
|
22116
|
-
...
|
|
22161
|
+
...projectId2 ? { projectId: projectId2 } : {}
|
|
22117
22162
|
};
|
|
22118
22163
|
if (input?.recordId) payload.id = input.recordId;
|
|
22119
22164
|
if (input?.threadId) payload.threadId = input.threadId;
|
|
@@ -22123,7 +22168,7 @@ function useThreads(limit = DEFAULT_LIMIT, enabled = true, scope = "all") {
|
|
|
22123
22168
|
upsertThreadRecord(created);
|
|
22124
22169
|
return created;
|
|
22125
22170
|
},
|
|
22126
|
-
[assistantId, client,
|
|
22171
|
+
[assistantId, client, projectId2, upsertThreadRecord]
|
|
22127
22172
|
);
|
|
22128
22173
|
const updateThread = React75.useCallback(
|
|
22129
22174
|
async (recordId, payload) => {
|
|
@@ -22213,7 +22258,7 @@ function useThreads(limit = DEFAULT_LIMIT, enabled = true, scope = "all") {
|
|
|
22213
22258
|
client,
|
|
22214
22259
|
isReady,
|
|
22215
22260
|
isStreamLoading,
|
|
22216
|
-
|
|
22261
|
+
projectId2,
|
|
22217
22262
|
threadId,
|
|
22218
22263
|
upsertThreadRecord
|
|
22219
22264
|
]);
|
|
@@ -25640,7 +25685,7 @@ function getVisibleHumanAttachments(attachments, references) {
|
|
|
25640
25685
|
}
|
|
25641
25686
|
|
|
25642
25687
|
// src/components/thread/messages/assistant-blocks.tsx
|
|
25643
|
-
import * as
|
|
25688
|
+
import * as React102 from "react";
|
|
25644
25689
|
import { Brain as Brain3, ChevronDown as ChevronDown12, ChevronRight as ChevronRight13, Clock3 as Clock33 } from "lucide-react";
|
|
25645
25690
|
|
|
25646
25691
|
// src/lib/scroll.ts
|
|
@@ -26966,7 +27011,7 @@ function formatStepDuration2(durationMs) {
|
|
|
26966
27011
|
}
|
|
26967
27012
|
return `${minutes}m ${seconds}s`;
|
|
26968
27013
|
}
|
|
26969
|
-
function getAgentRunStatusConfig(status, hasReply = false) {
|
|
27014
|
+
function getAgentRunStatusConfig(status, hasReply = false, outcome) {
|
|
26970
27015
|
const normalized = normalizeRunStatus(status);
|
|
26971
27016
|
if (normalized === "running") {
|
|
26972
27017
|
return {
|
|
@@ -26976,6 +27021,14 @@ function getAgentRunStatusConfig(status, hasReply = false) {
|
|
|
26976
27021
|
spin: true
|
|
26977
27022
|
};
|
|
26978
27023
|
}
|
|
27024
|
+
if ((normalized === "success" || normalized === "succeeded") && outcome) {
|
|
27025
|
+
return {
|
|
27026
|
+
icon: outcome.accepted ? CheckCircle24 : outcome.status === "failed" ? XCircle3 : Info6,
|
|
27027
|
+
iconClass: outcome.accepted ? "text-muted-foreground" : "text-destructive",
|
|
27028
|
+
labelKey: `business_${outcome.status}`,
|
|
27029
|
+
spin: false
|
|
27030
|
+
};
|
|
27031
|
+
}
|
|
26979
27032
|
if (normalized === "success" || normalized === "succeeded") {
|
|
26980
27033
|
return {
|
|
26981
27034
|
icon: CheckCircle24,
|
|
@@ -27078,7 +27131,8 @@ function AgentRunGroup({
|
|
|
27078
27131
|
const counts = getAgentRunCounts(node);
|
|
27079
27132
|
const statusConfig = getAgentRunStatusConfig(
|
|
27080
27133
|
node.info.status,
|
|
27081
|
-
counts.text > 0
|
|
27134
|
+
counts.text > 0,
|
|
27135
|
+
node.info.businessOutcome
|
|
27082
27136
|
);
|
|
27083
27137
|
const StatusIcon = statusConfig.icon;
|
|
27084
27138
|
const isRunning = isRunningRunStatus(node.info.status);
|
|
@@ -27739,7 +27793,7 @@ function hasLegacySurface(surface) {
|
|
|
27739
27793
|
|
|
27740
27794
|
// src/components/thread/messages/mcp-app.tsx
|
|
27741
27795
|
import {
|
|
27742
|
-
resolveLocalizedText as
|
|
27796
|
+
resolveLocalizedText as resolveLocalizedText4
|
|
27743
27797
|
} from "@xpert-ai/chatkit-types";
|
|
27744
27798
|
import { isEqual } from "lodash-es";
|
|
27745
27799
|
import {
|
|
@@ -27748,9 +27802,10 @@ import {
|
|
|
27748
27802
|
Maximize2,
|
|
27749
27803
|
Minimize2,
|
|
27750
27804
|
PictureInPicture2,
|
|
27805
|
+
RefreshCw as RefreshCw4,
|
|
27751
27806
|
ShieldAlert
|
|
27752
27807
|
} from "lucide-react";
|
|
27753
|
-
import * as
|
|
27808
|
+
import * as React101 from "react";
|
|
27754
27809
|
|
|
27755
27810
|
// src/components/thread/messages/mcp-app/resource/values.ts
|
|
27756
27811
|
function isRecord6(value) {
|
|
@@ -28006,6 +28061,7 @@ function normalizeMcpAppResourceResponse(value, data) {
|
|
|
28006
28061
|
html,
|
|
28007
28062
|
appInstanceToken: readString4(raw.appInstanceToken),
|
|
28008
28063
|
resourceUri: readString4(raw.resourceUri),
|
|
28064
|
+
refresh: readRefresh(raw.refresh),
|
|
28009
28065
|
title: resourceInfo.title,
|
|
28010
28066
|
description: resourceInfo.description,
|
|
28011
28067
|
icon: resourceInfo.icon,
|
|
@@ -28023,6 +28079,13 @@ function normalizeMcpAppResourceResponse(value, data) {
|
|
|
28023
28079
|
function isMcpAppComponentData(data) {
|
|
28024
28080
|
return isRecord6(data) && data.type === "McpApp" && typeof data.appInstanceId === "string" && typeof data.resourceUri === "string";
|
|
28025
28081
|
}
|
|
28082
|
+
function readRefresh(value) {
|
|
28083
|
+
const raw = readRecord(value);
|
|
28084
|
+
const toolName = raw && readString4(raw.toolName);
|
|
28085
|
+
if (!raw || !toolName) return void 0;
|
|
28086
|
+
if (raw.arguments !== void 0 && !isRecord6(raw.arguments)) return void 0;
|
|
28087
|
+
return { toolName, arguments: readRecord(raw.arguments) };
|
|
28088
|
+
}
|
|
28026
28089
|
|
|
28027
28090
|
// src/components/thread/messages/mcp-app/sandbox/policy.ts
|
|
28028
28091
|
function domains(values) {
|
|
@@ -28573,7 +28636,29 @@ function useMcpAppApprovals({
|
|
|
28573
28636
|
return { clearPendingApproval, dispatchHostRpc, resolvePendingApproval };
|
|
28574
28637
|
}
|
|
28575
28638
|
|
|
28639
|
+
// src/components/thread/messages/mcp-app/bridge/project-link.ts
|
|
28640
|
+
import { z as z2 } from "zod";
|
|
28641
|
+
var projectId = z2.string().uuid();
|
|
28642
|
+
function parseMcpAppProjectLink(href) {
|
|
28643
|
+
try {
|
|
28644
|
+
const url = new URL(href);
|
|
28645
|
+
if (url.protocol !== "xpert:" || url.hostname !== "project" || url.username || url.password || url.port || url.hash)
|
|
28646
|
+
return null;
|
|
28647
|
+
const id = projectId.safeParse(decodeURIComponent(url.pathname.slice(1)));
|
|
28648
|
+
const viewKey = url.searchParams.get("viewKey");
|
|
28649
|
+
if (!id.success || !viewKey || !/^[\w.-]+__[\w.-]+$/.test(viewKey))
|
|
28650
|
+
return null;
|
|
28651
|
+
if (url.searchParams.size !== 1) return null;
|
|
28652
|
+
return { projectId: id.data, viewKey };
|
|
28653
|
+
} catch {
|
|
28654
|
+
return null;
|
|
28655
|
+
}
|
|
28656
|
+
}
|
|
28657
|
+
|
|
28576
28658
|
// src/components/thread/messages/mcp-app/bridge/useMcpAppBridge.ts
|
|
28659
|
+
import {
|
|
28660
|
+
resolveLocalizedText as resolveLocalizedText3
|
|
28661
|
+
} from "@xpert-ai/chatkit-types";
|
|
28577
28662
|
import * as React96 from "react";
|
|
28578
28663
|
|
|
28579
28664
|
// src/components/thread/messages/mcp-app/sandbox/html.ts
|
|
@@ -28727,6 +28812,10 @@ function buildMcpAppTheme(element) {
|
|
|
28727
28812
|
"--mcp-app-font-mono": sanitizeCssValue(
|
|
28728
28813
|
readHostCssVariable(source, "--font-mono") || "ui-monospace, SFMono-Regular, Menlo, monospace"
|
|
28729
28814
|
),
|
|
28815
|
+
// Resolve rem-based host typography before crossing the iframe boundary.
|
|
28816
|
+
"--mcp-app-font-size": sanitizeCssValue(
|
|
28817
|
+
window.getComputedStyle(document.documentElement).fontSize || "16px"
|
|
28818
|
+
),
|
|
28730
28819
|
"--mcp-app-radius": sanitizeCssValue(
|
|
28731
28820
|
readHostCssVariable(source, "--radius") || "0.5rem"
|
|
28732
28821
|
)
|
|
@@ -28745,7 +28834,7 @@ function buildMcpAppTheme(element) {
|
|
|
28745
28834
|
}
|
|
28746
28835
|
function injectMcpAppTheme(html, theme) {
|
|
28747
28836
|
const declarations = Object.entries(theme.cssVariables).map(([name, value]) => `${name}: ${sanitizeCssValue(value)};`).join("");
|
|
28748
|
-
const style = `<style id="mcp-app-host-theme">:root{font-size:
|
|
28837
|
+
const style = `<style id="mcp-app-host-theme">:root{font-size:var(--mcp-app-font-size,16px);color-scheme:${theme.mode};${declarations}}</style>`;
|
|
28749
28838
|
return injectHeadContent(html, style);
|
|
28750
28839
|
}
|
|
28751
28840
|
|
|
@@ -28754,6 +28843,7 @@ function standardMcpAppStyles(legacy) {
|
|
|
28754
28843
|
const mapping = {
|
|
28755
28844
|
"--font-sans": "--mcp-app-font-sans",
|
|
28756
28845
|
"--font-mono": "--mcp-app-font-mono",
|
|
28846
|
+
"--font-text-md-size": "--mcp-app-font-size",
|
|
28757
28847
|
"--border-radius-md": "--mcp-app-radius",
|
|
28758
28848
|
"--color-background-primary": "--mcp-app-color-background",
|
|
28759
28849
|
"--color-background-secondary": "--mcp-app-color-card",
|
|
@@ -28766,7 +28856,9 @@ function standardMcpAppStyles(legacy) {
|
|
|
28766
28856
|
"--color-border-primary": "--mcp-app-color-border",
|
|
28767
28857
|
"--color-ring-primary": "--mcp-app-color-ring"
|
|
28768
28858
|
};
|
|
28769
|
-
return Object.fromEntries(
|
|
28859
|
+
return Object.fromEntries(
|
|
28860
|
+
Object.entries(mapping).filter(([, source]) => legacy[source]).map(([key, source]) => [key, legacy[source]])
|
|
28861
|
+
);
|
|
28770
28862
|
}
|
|
28771
28863
|
|
|
28772
28864
|
// src/components/thread/messages/mcp-app/bridge/chat-input.ts
|
|
@@ -28921,6 +29013,7 @@ function useMcpAppBridge({
|
|
|
28921
29013
|
streamIsLoading,
|
|
28922
29014
|
dispatchHostRpc
|
|
28923
29015
|
}) {
|
|
29016
|
+
const { openProject } = useWorkbench();
|
|
28924
29017
|
React96.useEffect(() => {
|
|
28925
29018
|
if (!initializedRef.current) return;
|
|
28926
29019
|
postToApp({
|
|
@@ -28932,6 +29025,27 @@ function useMcpAppBridge({
|
|
|
28932
29025
|
}
|
|
28933
29026
|
});
|
|
28934
29027
|
}, [displayMode, height, postToApp]);
|
|
29028
|
+
React96.useEffect(() => {
|
|
29029
|
+
const notifyTheme = () => {
|
|
29030
|
+
if (!initializedRef.current) return;
|
|
29031
|
+
const theme = buildMcpAppTheme(containerRef.current);
|
|
29032
|
+
postToApp({
|
|
29033
|
+
jsonrpc: "2.0",
|
|
29034
|
+
method: "ui/notifications/host-context-changed",
|
|
29035
|
+
params: {
|
|
29036
|
+
theme: theme.mode,
|
|
29037
|
+
styles: { variables: standardMcpAppStyles(theme.cssVariables) },
|
|
29038
|
+
themeCssVariables: theme.cssVariables
|
|
29039
|
+
}
|
|
29040
|
+
});
|
|
29041
|
+
};
|
|
29042
|
+
const observer = new MutationObserver(notifyTheme);
|
|
29043
|
+
observer.observe(document.documentElement, {
|
|
29044
|
+
attributes: true,
|
|
29045
|
+
attributeFilter: ["style", "class", "data-theme"]
|
|
29046
|
+
});
|
|
29047
|
+
return () => observer.disconnect();
|
|
29048
|
+
}, [postToApp]);
|
|
28935
29049
|
React96.useEffect(() => {
|
|
28936
29050
|
const handleMessage = async (event) => {
|
|
28937
29051
|
if (event.source !== iframeRef.current?.contentWindow) {
|
|
@@ -29008,7 +29122,18 @@ function useMcpAppBridge({
|
|
|
29008
29122
|
initializedRef.current = true;
|
|
29009
29123
|
const permissions = resource?.permissions ?? data.permissions;
|
|
29010
29124
|
const csp = resource?.csp ?? data.csp;
|
|
29011
|
-
const
|
|
29125
|
+
const rawToolInfo = resource?.toolInfo ?? normalizeMcpAppToolInfo(void 0, data);
|
|
29126
|
+
const toolInfo = {
|
|
29127
|
+
...rawToolInfo,
|
|
29128
|
+
tool: {
|
|
29129
|
+
...rawToolInfo.tool,
|
|
29130
|
+
title: resolveLocalizedText3(rawToolInfo.tool.title, i18n2.language) ?? rawToolInfo.tool.name,
|
|
29131
|
+
description: resolveLocalizedText3(
|
|
29132
|
+
rawToolInfo.tool.description,
|
|
29133
|
+
i18n2.language
|
|
29134
|
+
) ?? void 0
|
|
29135
|
+
}
|
|
29136
|
+
};
|
|
29012
29137
|
const theme = buildMcpAppTheme(containerRef.current);
|
|
29013
29138
|
const hostLocale = normalizeHostLocale(i18n2.language);
|
|
29014
29139
|
const hostLanguage = getLocaleLanguage(hostLocale);
|
|
@@ -29025,6 +29150,7 @@ function useMcpAppBridge({
|
|
|
29025
29150
|
serverTools: {},
|
|
29026
29151
|
serverResources: {},
|
|
29027
29152
|
openLinks: {},
|
|
29153
|
+
...openProject ? { experimental: { "xpert/workbench": { openProject: true } } } : {},
|
|
29028
29154
|
logging: {},
|
|
29029
29155
|
message: {
|
|
29030
29156
|
text: {},
|
|
@@ -29092,6 +29218,28 @@ function useMcpAppBridge({
|
|
|
29092
29218
|
}
|
|
29093
29219
|
if (request.method === "ui/open-link") {
|
|
29094
29220
|
const href = isRecord6(request.params) && typeof request.params.url === "string" ? request.params.url : isRecord6(request.params) && typeof request.params.href === "string" ? request.params.href : null;
|
|
29221
|
+
const projectLink = href ? parseMcpAppProjectLink(href) : null;
|
|
29222
|
+
if (projectLink) {
|
|
29223
|
+
try {
|
|
29224
|
+
const response = await openProject?.(
|
|
29225
|
+
projectLink.projectId,
|
|
29226
|
+
projectLink.viewKey
|
|
29227
|
+
);
|
|
29228
|
+
if (!isRecord6(response) || response.success !== true) {
|
|
29229
|
+
postToApp(
|
|
29230
|
+
jsonRpcError(
|
|
29231
|
+
request.id,
|
|
29232
|
+
i18n2.t("message.mcpApp.openProjectFailed")
|
|
29233
|
+
)
|
|
29234
|
+
);
|
|
29235
|
+
} else {
|
|
29236
|
+
postToApp(jsonRpcResult(request.id, {}));
|
|
29237
|
+
}
|
|
29238
|
+
} catch (cause) {
|
|
29239
|
+
postToApp(jsonRpcError(request.id, getErrorMessage2(cause)));
|
|
29240
|
+
}
|
|
29241
|
+
return;
|
|
29242
|
+
}
|
|
29095
29243
|
if (!href || !isHttpUrl(href)) {
|
|
29096
29244
|
if (request.id !== void 0) {
|
|
29097
29245
|
postToApp(jsonRpcError(request.id, "Invalid URL"));
|
|
@@ -29195,6 +29343,7 @@ function useMcpAppBridge({
|
|
|
29195
29343
|
client,
|
|
29196
29344
|
data,
|
|
29197
29345
|
dispatchHostRpc,
|
|
29346
|
+
openProject,
|
|
29198
29347
|
displayMode,
|
|
29199
29348
|
i18n2.language,
|
|
29200
29349
|
messageId,
|
|
@@ -29212,8 +29361,68 @@ function useMcpAppBridge({
|
|
|
29212
29361
|
]);
|
|
29213
29362
|
}
|
|
29214
29363
|
|
|
29215
|
-
// src/components/thread/messages/mcp-app/resource/
|
|
29364
|
+
// src/components/thread/messages/mcp-app/resource/useMcpAppRefresh.ts
|
|
29216
29365
|
import * as React97 from "react";
|
|
29366
|
+
function useMcpAppRefresh(options) {
|
|
29367
|
+
const [refreshing, setRefreshing] = React97.useState(false);
|
|
29368
|
+
const [error, setError] = React97.useState(null);
|
|
29369
|
+
const active = React97.useRef(null);
|
|
29370
|
+
React97.useEffect(() => {
|
|
29371
|
+
active.current = null;
|
|
29372
|
+
setRefreshing(false);
|
|
29373
|
+
setError(null);
|
|
29374
|
+
return () => {
|
|
29375
|
+
active.current = null;
|
|
29376
|
+
};
|
|
29377
|
+
}, [options.identity]);
|
|
29378
|
+
const refresh = async () => {
|
|
29379
|
+
if (!options.refresh || !options.ready.current || active.current) return;
|
|
29380
|
+
const operation = /* @__PURE__ */ Symbol();
|
|
29381
|
+
active.current = operation;
|
|
29382
|
+
setRefreshing(true);
|
|
29383
|
+
setError(null);
|
|
29384
|
+
try {
|
|
29385
|
+
const response = await options.call({
|
|
29386
|
+
jsonrpc: "2.0",
|
|
29387
|
+
id: `refresh-${Date.now()}`,
|
|
29388
|
+
method: "tools/call",
|
|
29389
|
+
params: {
|
|
29390
|
+
name: options.refresh.toolName,
|
|
29391
|
+
arguments: options.refresh.arguments ?? {}
|
|
29392
|
+
}
|
|
29393
|
+
});
|
|
29394
|
+
if (active.current !== operation) return;
|
|
29395
|
+
if (!isRecord6(response) || response.error || !("result" in response))
|
|
29396
|
+
throw Error(options.failureMessage);
|
|
29397
|
+
const result = normalizeCallToolResult(response.result);
|
|
29398
|
+
if (result.isError) {
|
|
29399
|
+
const text = result.content.find(
|
|
29400
|
+
(item) => item.type === "text" && typeof item.text === "string"
|
|
29401
|
+
)?.text;
|
|
29402
|
+
throw Error(typeof text === "string" ? text : options.failureMessage);
|
|
29403
|
+
}
|
|
29404
|
+
options.post({
|
|
29405
|
+
jsonrpc: "2.0",
|
|
29406
|
+
method: "ui/notifications/tool-result",
|
|
29407
|
+
params: result
|
|
29408
|
+
});
|
|
29409
|
+
} catch (cause) {
|
|
29410
|
+
if (active.current === operation)
|
|
29411
|
+
setError(
|
|
29412
|
+
cause instanceof Error ? cause.message : options.failureMessage
|
|
29413
|
+
);
|
|
29414
|
+
} finally {
|
|
29415
|
+
if (active.current === operation) {
|
|
29416
|
+
active.current = null;
|
|
29417
|
+
setRefreshing(false);
|
|
29418
|
+
}
|
|
29419
|
+
}
|
|
29420
|
+
};
|
|
29421
|
+
return { refresh, refreshing, error };
|
|
29422
|
+
}
|
|
29423
|
+
|
|
29424
|
+
// src/components/thread/messages/mcp-app/resource/useMcpAppResource.ts
|
|
29425
|
+
import * as React98 from "react";
|
|
29217
29426
|
function useMcpAppResource({
|
|
29218
29427
|
initializedRef,
|
|
29219
29428
|
sentInitialResultRef,
|
|
@@ -29239,7 +29448,7 @@ function useMcpAppResource({
|
|
|
29239
29448
|
i18n: i18n2,
|
|
29240
29449
|
containerRef
|
|
29241
29450
|
}) {
|
|
29242
|
-
const sendInitialToolNotifications =
|
|
29451
|
+
const sendInitialToolNotifications = React98.useCallback(() => {
|
|
29243
29452
|
if (!initializedRef.current || sentInitialResultRef.current || !resource) {
|
|
29244
29453
|
return;
|
|
29245
29454
|
}
|
|
@@ -29266,7 +29475,7 @@ function useMcpAppResource({
|
|
|
29266
29475
|
}
|
|
29267
29476
|
});
|
|
29268
29477
|
}, [data.toolCallId, data.toolName, postToApp, resource]);
|
|
29269
|
-
|
|
29478
|
+
React98.useEffect(() => {
|
|
29270
29479
|
const controller = new AbortController();
|
|
29271
29480
|
initializedRef.current = false;
|
|
29272
29481
|
sentInitialResultRef.current = false;
|
|
@@ -29335,37 +29544,37 @@ function useMcpAppResource({
|
|
|
29335
29544
|
}
|
|
29336
29545
|
|
|
29337
29546
|
// src/components/thread/messages/mcp-app/session/useMcpAppState.ts
|
|
29338
|
-
import * as
|
|
29547
|
+
import * as React99 from "react";
|
|
29339
29548
|
function useMcpAppState({ data }) {
|
|
29340
|
-
const iframeRef =
|
|
29341
|
-
const appWindowRef =
|
|
29342
|
-
const containerRef =
|
|
29343
|
-
const initializedRef =
|
|
29344
|
-
const sentInitialResultRef =
|
|
29345
|
-
const modelContextRef =
|
|
29346
|
-
const pendingApprovalRef =
|
|
29347
|
-
const approvalActionRef =
|
|
29348
|
-
const runtimeAppInstanceTokenRef =
|
|
29549
|
+
const iframeRef = React99.useRef(null);
|
|
29550
|
+
const appWindowRef = React99.useRef(null);
|
|
29551
|
+
const containerRef = React99.useRef(null);
|
|
29552
|
+
const initializedRef = React99.useRef(false);
|
|
29553
|
+
const sentInitialResultRef = React99.useRef(false);
|
|
29554
|
+
const modelContextRef = React99.useRef(null);
|
|
29555
|
+
const pendingApprovalRef = React99.useRef(null);
|
|
29556
|
+
const approvalActionRef = React99.useRef(null);
|
|
29557
|
+
const runtimeAppInstanceTokenRef = React99.useRef(
|
|
29349
29558
|
data.appInstanceToken
|
|
29350
29559
|
);
|
|
29351
|
-
const teardownGenerationRef =
|
|
29352
|
-
const teardownStartedRef =
|
|
29353
|
-
const activeAppInstanceIdRef =
|
|
29354
|
-
const [resource, setResource] =
|
|
29355
|
-
const [runtimeAppInstanceToken, setRuntimeAppInstanceToken] =
|
|
29356
|
-
const [srcDoc, setSrcDoc] =
|
|
29357
|
-
const [height, setHeight] =
|
|
29358
|
-
const [displayMode, setDisplayMode] =
|
|
29359
|
-
const [pendingApproval, setPendingApproval] =
|
|
29360
|
-
const [approvalAction, setApprovalAction] =
|
|
29361
|
-
const [approvalError, setApprovalError] =
|
|
29362
|
-
const [error, setError] =
|
|
29363
|
-
const [isLoading, setIsLoading] =
|
|
29364
|
-
const [isTornDown, setIsTornDown] =
|
|
29365
|
-
|
|
29560
|
+
const teardownGenerationRef = React99.useRef(0);
|
|
29561
|
+
const teardownStartedRef = React99.useRef(false);
|
|
29562
|
+
const activeAppInstanceIdRef = React99.useRef(data.appInstanceId);
|
|
29563
|
+
const [resource, setResource] = React99.useState(null);
|
|
29564
|
+
const [runtimeAppInstanceToken, setRuntimeAppInstanceToken] = React99.useState(data.appInstanceToken);
|
|
29565
|
+
const [srcDoc, setSrcDoc] = React99.useState(null);
|
|
29566
|
+
const [height, setHeight] = React99.useState(420);
|
|
29567
|
+
const [displayMode, setDisplayMode] = React99.useState("inline");
|
|
29568
|
+
const [pendingApproval, setPendingApproval] = React99.useState(null);
|
|
29569
|
+
const [approvalAction, setApprovalAction] = React99.useState(null);
|
|
29570
|
+
const [approvalError, setApprovalError] = React99.useState(null);
|
|
29571
|
+
const [error, setError] = React99.useState(null);
|
|
29572
|
+
const [isLoading, setIsLoading] = React99.useState(true);
|
|
29573
|
+
const [isTornDown, setIsTornDown] = React99.useState(false);
|
|
29574
|
+
React99.useEffect(() => {
|
|
29366
29575
|
runtimeAppInstanceTokenRef.current = runtimeAppInstanceToken;
|
|
29367
29576
|
}, [runtimeAppInstanceToken]);
|
|
29368
|
-
const bindIframeRef =
|
|
29577
|
+
const bindIframeRef = React99.useCallback(
|
|
29369
29578
|
(iframe) => {
|
|
29370
29579
|
iframeRef.current = iframe;
|
|
29371
29580
|
if (iframe?.contentWindow) {
|
|
@@ -29414,7 +29623,7 @@ function useMcpAppState({ data }) {
|
|
|
29414
29623
|
}
|
|
29415
29624
|
|
|
29416
29625
|
// src/components/thread/messages/mcp-app/session/useMcpAppTeardown.ts
|
|
29417
|
-
import * as
|
|
29626
|
+
import * as React100 from "react";
|
|
29418
29627
|
function useMcpAppTeardown({
|
|
29419
29628
|
teardownGenerationRef,
|
|
29420
29629
|
activeAppInstanceIdRef,
|
|
@@ -29427,11 +29636,11 @@ function useMcpAppTeardown({
|
|
|
29427
29636
|
teardownStartedRef,
|
|
29428
29637
|
client
|
|
29429
29638
|
}) {
|
|
29430
|
-
const isSupersededStrictModeTeardown =
|
|
29639
|
+
const isSupersededStrictModeTeardown = React100.useCallback(
|
|
29431
29640
|
(generation, appInstanceId) => teardownGenerationRef.current !== generation && activeAppInstanceIdRef.current === appInstanceId,
|
|
29432
29641
|
[]
|
|
29433
29642
|
);
|
|
29434
|
-
|
|
29643
|
+
React100.useEffect(() => {
|
|
29435
29644
|
const generation = ++teardownGenerationRef.current;
|
|
29436
29645
|
activeAppInstanceIdRef.current = data.appInstanceId;
|
|
29437
29646
|
return () => {
|
|
@@ -29488,7 +29697,7 @@ function McpAppMessage({
|
|
|
29488
29697
|
className,
|
|
29489
29698
|
mcpApps
|
|
29490
29699
|
}) {
|
|
29491
|
-
const dataRef =
|
|
29700
|
+
const dataRef = React101.useRef(incomingData);
|
|
29492
29701
|
if (!isEqual(dataRef.current, incomingData)) dataRef.current = incomingData;
|
|
29493
29702
|
const data = dataRef.current;
|
|
29494
29703
|
const { i18n: i18n2 } = useChatkitTranslation();
|
|
@@ -29500,11 +29709,11 @@ function McpAppMessage({
|
|
|
29500
29709
|
conversationId
|
|
29501
29710
|
} = useStreamContext();
|
|
29502
29711
|
const state = useMcpAppState({ data });
|
|
29503
|
-
const sandboxProxy =
|
|
29712
|
+
const sandboxProxy = React101.useMemo(
|
|
29504
29713
|
() => resolveMcpAppSandboxProxy(mcpApps, state.resource?.domain ?? data.domain),
|
|
29505
29714
|
[data.domain, mcpApps, state.resource?.domain]
|
|
29506
29715
|
);
|
|
29507
|
-
const postToApp =
|
|
29716
|
+
const postToApp = React101.useCallback(
|
|
29508
29717
|
(message) => {
|
|
29509
29718
|
state.iframeRef.current?.contentWindow?.postMessage(
|
|
29510
29719
|
message,
|
|
@@ -29513,7 +29722,7 @@ function McpAppMessage({
|
|
|
29513
29722
|
},
|
|
29514
29723
|
[sandboxProxy?.origin]
|
|
29515
29724
|
);
|
|
29516
|
-
const callHostRpc =
|
|
29725
|
+
const callHostRpc = React101.useCallback(
|
|
29517
29726
|
async (request) => {
|
|
29518
29727
|
return client.mcp.apps.rpc(
|
|
29519
29728
|
data.appInstanceId,
|
|
@@ -29531,6 +29740,14 @@ function McpAppMessage({
|
|
|
29531
29740
|
},
|
|
29532
29741
|
[client, data, messageId, state.runtimeAppInstanceToken]
|
|
29533
29742
|
);
|
|
29743
|
+
const refresh = useMcpAppRefresh({
|
|
29744
|
+
identity: data.appInstanceId,
|
|
29745
|
+
refresh: state.resource?.refresh,
|
|
29746
|
+
ready: state.initializedRef,
|
|
29747
|
+
call: callHostRpc,
|
|
29748
|
+
post: postToApp,
|
|
29749
|
+
failureMessage: i18n2.t("message.mcpApp.refreshFailed")
|
|
29750
|
+
});
|
|
29534
29751
|
const approvals = useMcpAppApprovals({
|
|
29535
29752
|
...state,
|
|
29536
29753
|
postToApp,
|
|
@@ -29549,7 +29766,7 @@ function McpAppMessage({
|
|
|
29549
29766
|
});
|
|
29550
29767
|
useMcpAppTeardown({ ...state, data, sandboxProxy, messageId, client });
|
|
29551
29768
|
useMcpAppApprovalExpiry({ ...state, ...approvals, postToApp });
|
|
29552
|
-
|
|
29769
|
+
React101.useEffect(() => {
|
|
29553
29770
|
resourceLifecycle.sendInitialToolNotifications();
|
|
29554
29771
|
}, [resourceLifecycle.sendInitialToolNotifications]);
|
|
29555
29772
|
useMcpAppBridge({
|
|
@@ -29569,14 +29786,14 @@ function McpAppMessage({
|
|
|
29569
29786
|
streamIsLoading
|
|
29570
29787
|
});
|
|
29571
29788
|
const iframePermissions = state.resource?.permissions ?? data.permissions;
|
|
29572
|
-
const iframeAllow =
|
|
29789
|
+
const iframeAllow = React101.useMemo(
|
|
29573
29790
|
() => buildIframeAllow(iframePermissions),
|
|
29574
29791
|
[iframePermissions]
|
|
29575
29792
|
);
|
|
29576
29793
|
const sandbox = sandboxProxy ? "allow-scripts allow-same-origin" : buildSandboxAttribute();
|
|
29577
29794
|
const prefersBorder = state.resource?.prefersBorder ?? data.prefersBorder ?? true;
|
|
29578
|
-
const displayTitle =
|
|
29579
|
-
const displayDescription =
|
|
29795
|
+
const displayTitle = resolveLocalizedText4(state.resource?.title ?? data.title, i18n2.language) ?? data.toolName;
|
|
29796
|
+
const displayDescription = resolveLocalizedText4(
|
|
29580
29797
|
state.resource?.description ?? data.description,
|
|
29581
29798
|
i18n2.language
|
|
29582
29799
|
);
|
|
@@ -29623,6 +29840,24 @@ function McpAppMessage({
|
|
|
29623
29840
|
] })
|
|
29624
29841
|
] }),
|
|
29625
29842
|
/* @__PURE__ */ jsxs80("div", { className: "flex shrink-0 items-center gap-1", children: [
|
|
29843
|
+
state.resource?.refresh ? /* @__PURE__ */ jsx105(
|
|
29844
|
+
Button,
|
|
29845
|
+
{
|
|
29846
|
+
type: "button",
|
|
29847
|
+
variant: "ghost",
|
|
29848
|
+
size: "icon-xs",
|
|
29849
|
+
title: i18n2.t("message.mcpApp.refresh"),
|
|
29850
|
+
"aria-label": i18n2.t("message.mcpApp.refresh"),
|
|
29851
|
+
disabled: state.isLoading || refresh.refreshing || !!state.pendingApproval,
|
|
29852
|
+
onClick: () => void refresh.refresh(),
|
|
29853
|
+
children: /* @__PURE__ */ jsx105(
|
|
29854
|
+
RefreshCw4,
|
|
29855
|
+
{
|
|
29856
|
+
className: cn(refresh.refreshing && "animate-spin")
|
|
29857
|
+
}
|
|
29858
|
+
)
|
|
29859
|
+
}
|
|
29860
|
+
) : null,
|
|
29626
29861
|
state.displayMode !== "fullscreen" ? /* @__PURE__ */ jsx105(
|
|
29627
29862
|
Button,
|
|
29628
29863
|
{
|
|
@@ -29661,6 +29896,7 @@ function McpAppMessage({
|
|
|
29661
29896
|
) : null
|
|
29662
29897
|
] })
|
|
29663
29898
|
] }),
|
|
29899
|
+
refresh.error ? /* @__PURE__ */ jsx105("div", { role: "alert", className: "px-3 py-2 text-sm text-destructive", children: refresh.error }) : null,
|
|
29664
29900
|
state.pendingApproval ? /* @__PURE__ */ jsx105(
|
|
29665
29901
|
"div",
|
|
29666
29902
|
{
|
|
@@ -29839,11 +30075,11 @@ function ReasoningBlock({
|
|
|
29839
30075
|
isReasoning = false
|
|
29840
30076
|
}) {
|
|
29841
30077
|
const { t } = useChatkitTranslation();
|
|
29842
|
-
const [expanded, setExpanded] =
|
|
29843
|
-
|
|
30078
|
+
const [expanded, setExpanded] = React102.useState(isReasoning);
|
|
30079
|
+
React102.useEffect(() => {
|
|
29844
30080
|
setExpanded(isReasoning);
|
|
29845
30081
|
}, [isReasoning]);
|
|
29846
|
-
const contentId =
|
|
30082
|
+
const contentId = React102.useId();
|
|
29847
30083
|
const blocks = reasoning.filter((item) => item.text?.trim());
|
|
29848
30084
|
if (blocks.length === 0) return null;
|
|
29849
30085
|
return /* @__PURE__ */ jsxs82("div", { className: "space-y-2 px-1 py-1", children: [
|
|
@@ -29947,11 +30183,11 @@ function formatStepDuration3(durationMs) {
|
|
|
29947
30183
|
}
|
|
29948
30184
|
function ComponentBlock({ content }) {
|
|
29949
30185
|
const { i18n: i18n2 } = useChatkitTranslation();
|
|
29950
|
-
const [isExpanded, setIsExpanded] =
|
|
29951
|
-
const contentRef =
|
|
29952
|
-
const shouldAutoScrollRef =
|
|
29953
|
-
const previousScrollTopRef =
|
|
29954
|
-
const [durationNow, setDurationNow] =
|
|
30186
|
+
const [isExpanded, setIsExpanded] = React102.useState(false);
|
|
30187
|
+
const contentRef = React102.useRef(null);
|
|
30188
|
+
const shouldAutoScrollRef = React102.useRef(true);
|
|
30189
|
+
const previousScrollTopRef = React102.useRef(0);
|
|
30190
|
+
const [durationNow, setDurationNow] = React102.useState(() => Date.now());
|
|
29955
30191
|
const data = getToolStepData(content);
|
|
29956
30192
|
const category = data.category ?? "Component";
|
|
29957
30193
|
const title = getToolActivityLabel(content, i18n2.language);
|
|
@@ -29965,10 +30201,10 @@ function ComponentBlock({ content }) {
|
|
|
29965
30201
|
const endedAt = parseStepDate2(data.end_date);
|
|
29966
30202
|
const durationMs = createdAt === null ? null : Math.max(0, (endedAt ?? durationNow) - createdAt);
|
|
29967
30203
|
const durationLabel = durationMs === null ? null : formatStepDuration3(durationMs);
|
|
29968
|
-
|
|
30204
|
+
React102.useEffect(() => {
|
|
29969
30205
|
if (status === "running" && output !== null) setIsExpanded(true);
|
|
29970
30206
|
}, [status, output]);
|
|
29971
|
-
|
|
30207
|
+
React102.useEffect(() => {
|
|
29972
30208
|
if (status !== "running" || createdAt === null || endedAt !== null) {
|
|
29973
30209
|
return;
|
|
29974
30210
|
}
|
|
@@ -29980,7 +30216,7 @@ function ComponentBlock({ content }) {
|
|
|
29980
30216
|
window.clearInterval(timer);
|
|
29981
30217
|
};
|
|
29982
30218
|
}, [createdAt, endedAt, status]);
|
|
29983
|
-
|
|
30219
|
+
React102.useEffect(() => {
|
|
29984
30220
|
const element = contentRef.current;
|
|
29985
30221
|
if (!element) return;
|
|
29986
30222
|
previousScrollTopRef.current = element.scrollTop;
|
|
@@ -30002,7 +30238,7 @@ function ComponentBlock({ content }) {
|
|
|
30002
30238
|
element.removeEventListener("scroll", updateAutoScrollState);
|
|
30003
30239
|
};
|
|
30004
30240
|
}, [isExpanded]);
|
|
30005
|
-
|
|
30241
|
+
React102.useEffect(() => {
|
|
30006
30242
|
if (status !== "running") {
|
|
30007
30243
|
shouldAutoScrollRef.current = true;
|
|
30008
30244
|
return;
|
|
@@ -30176,7 +30412,7 @@ import "react";
|
|
|
30176
30412
|
import { Loader2 as Loader220 } from "lucide-react";
|
|
30177
30413
|
|
|
30178
30414
|
// src/components/thread/messages/resource-cards.tsx
|
|
30179
|
-
import * as
|
|
30415
|
+
import * as React103 from "react";
|
|
30180
30416
|
import { Box, Loader2 as Loader218 } from "lucide-react";
|
|
30181
30417
|
import {
|
|
30182
30418
|
parseResourceCardContent as parseResourceCardContent2,
|
|
@@ -30199,8 +30435,8 @@ function ResourceCard({
|
|
|
30199
30435
|
}) {
|
|
30200
30436
|
const workbench = useWorkbench();
|
|
30201
30437
|
const { t } = useChatkitTranslation();
|
|
30202
|
-
const [busy, setBusy] =
|
|
30203
|
-
const [error, setError] =
|
|
30438
|
+
const [busy, setBusy] = React103.useState(false);
|
|
30439
|
+
const [error, setError] = React103.useState(null);
|
|
30204
30440
|
const available = workbench.enabled && !!workbench.openResourceCard;
|
|
30205
30441
|
const open = async () => {
|
|
30206
30442
|
if (!available || busy) return;
|
|
@@ -30273,51 +30509,92 @@ function MessageResourceCards({
|
|
|
30273
30509
|
import "react";
|
|
30274
30510
|
|
|
30275
30511
|
// src/components/thread/messages/external-assistant-run-row.tsx
|
|
30276
|
-
import * as
|
|
30512
|
+
import * as React104 from "react";
|
|
30277
30513
|
import { Bot as Bot8, ChevronRight as ChevronRight14, Clock3 as Clock34 } from "lucide-react";
|
|
30278
|
-
|
|
30514
|
+
|
|
30515
|
+
// src/components/thread/messages/external-assistant-cancel-button.tsx
|
|
30516
|
+
import { LoaderCircle as LoaderCircle3, Square as Square3 } from "lucide-react";
|
|
30517
|
+
import { jsx as jsx109, jsxs as jsxs84 } from "react/jsx-runtime";
|
|
30518
|
+
function ExternalAssistantCancelButton({
|
|
30519
|
+
name,
|
|
30520
|
+
onCancel,
|
|
30521
|
+
pending,
|
|
30522
|
+
requested
|
|
30523
|
+
}) {
|
|
30524
|
+
const { t } = useChatkitTranslation();
|
|
30525
|
+
const label = t(
|
|
30526
|
+
pending ? "workbench.externalAssistants.cancelling" : requested ? "workbench.externalAssistants.cancelRequested" : "workbench.externalAssistants.cancel"
|
|
30527
|
+
);
|
|
30528
|
+
return /* @__PURE__ */ jsxs84(
|
|
30529
|
+
"button",
|
|
30530
|
+
{
|
|
30531
|
+
type: "button",
|
|
30532
|
+
onClick: onCancel,
|
|
30533
|
+
disabled: pending || requested,
|
|
30534
|
+
"aria-label": t("workbench.externalAssistants.cancelRun", { name }),
|
|
30535
|
+
title: label,
|
|
30536
|
+
className: "inline-flex shrink-0 items-center gap-1 rounded-md border px-2 py-1 text-xs text-muted-foreground hover:bg-muted hover:text-destructive focus-visible:ring-2 focus-visible:ring-ring disabled:cursor-default disabled:opacity-50",
|
|
30537
|
+
children: [
|
|
30538
|
+
pending ? /* @__PURE__ */ jsx109(LoaderCircle3, { className: "size-3 animate-spin", "aria-hidden": "true" }) : /* @__PURE__ */ jsx109(Square3, { className: "size-3", "aria-hidden": "true" }),
|
|
30539
|
+
label
|
|
30540
|
+
]
|
|
30541
|
+
}
|
|
30542
|
+
);
|
|
30543
|
+
}
|
|
30544
|
+
|
|
30545
|
+
// src/components/thread/messages/external-assistant-run-row.tsx
|
|
30546
|
+
import { Fragment as Fragment18, jsx as jsx110, jsxs as jsxs85 } from "react/jsx-runtime";
|
|
30279
30547
|
function ExternalAssistantAvatar({ info }) {
|
|
30280
30548
|
const { t } = useChatkitTranslation();
|
|
30281
|
-
return info.avatar ? /* @__PURE__ */
|
|
30549
|
+
return info.avatar ? /* @__PURE__ */ jsx110(
|
|
30282
30550
|
ChatkitAvatar,
|
|
30283
30551
|
{
|
|
30284
30552
|
avatar: info.avatar,
|
|
30285
30553
|
label: getAgentRunTitle(info, t("message.agentRun.defaultTitle")) ?? "",
|
|
30286
30554
|
className: "size-5 shrink-0"
|
|
30287
30555
|
}
|
|
30288
|
-
) : /* @__PURE__ */
|
|
30556
|
+
) : /* @__PURE__ */ jsx110(Bot8, { className: "size-4 shrink-0 text-muted-foreground", "aria-hidden": "true" });
|
|
30289
30557
|
}
|
|
30290
30558
|
function AgentRunStatus({ info }) {
|
|
30291
30559
|
const { t } = useChatkitTranslation();
|
|
30292
|
-
const [now, setNow] =
|
|
30560
|
+
const [now, setNow] = React104.useState(Date.now);
|
|
30293
30561
|
const running = isRunningRunStatus(info.status);
|
|
30294
|
-
|
|
30562
|
+
React104.useEffect(() => {
|
|
30295
30563
|
if (!running) return;
|
|
30296
30564
|
const timer = window.setInterval(() => setNow(Date.now()), 1e3);
|
|
30297
30565
|
return () => window.clearInterval(timer);
|
|
30298
30566
|
}, [running]);
|
|
30299
|
-
const config = getAgentRunStatusConfig(
|
|
30567
|
+
const config = getAgentRunStatusConfig(
|
|
30568
|
+
info.status,
|
|
30569
|
+
false,
|
|
30570
|
+
info.businessOutcome
|
|
30571
|
+
);
|
|
30300
30572
|
const StatusIcon = config.icon;
|
|
30301
30573
|
const duration = getAgentRunDuration(info, now);
|
|
30302
|
-
return /* @__PURE__ */
|
|
30574
|
+
return /* @__PURE__ */ jsxs85(
|
|
30303
30575
|
"span",
|
|
30304
30576
|
{
|
|
30305
30577
|
className: "inline-flex shrink-0 items-center gap-1.5 text-xs text-muted-foreground",
|
|
30306
30578
|
role: "status",
|
|
30579
|
+
title: info.businessOutcome?.message,
|
|
30307
30580
|
children: [
|
|
30308
|
-
/* @__PURE__ */
|
|
30581
|
+
/* @__PURE__ */ jsx110(
|
|
30309
30582
|
StatusIcon,
|
|
30310
30583
|
{
|
|
30311
|
-
className: cn(
|
|
30584
|
+
className: cn(
|
|
30585
|
+
"h-3.5 w-3.5",
|
|
30586
|
+
config.iconClass,
|
|
30587
|
+
config.spin && "animate-spin"
|
|
30588
|
+
),
|
|
30312
30589
|
"aria-hidden": "true"
|
|
30313
30590
|
}
|
|
30314
30591
|
),
|
|
30315
30592
|
t(`message.agentRun.status.${config.labelKey}`, {
|
|
30316
30593
|
defaultValue: info.status ?? config.labelKey
|
|
30317
30594
|
}),
|
|
30318
|
-
duration !== null && /* @__PURE__ */
|
|
30319
|
-
/* @__PURE__ */
|
|
30320
|
-
/* @__PURE__ */
|
|
30595
|
+
duration !== null && /* @__PURE__ */ jsxs85(Fragment18, { children: [
|
|
30596
|
+
/* @__PURE__ */ jsx110(Clock34, { className: "ml-1 h-3 w-3", "aria-hidden": "true" }),
|
|
30597
|
+
/* @__PURE__ */ jsx110("span", { className: "tabular-nums", children: formatStepDuration2(duration) })
|
|
30321
30598
|
] })
|
|
30322
30599
|
]
|
|
30323
30600
|
}
|
|
@@ -30325,31 +30602,45 @@ function AgentRunStatus({ info }) {
|
|
|
30325
30602
|
}
|
|
30326
30603
|
function ExternalAssistantRunRow({
|
|
30327
30604
|
info,
|
|
30328
|
-
onOpen
|
|
30605
|
+
onOpen,
|
|
30606
|
+
onCancel,
|
|
30607
|
+
cancelPending,
|
|
30608
|
+
cancelRequested
|
|
30329
30609
|
}) {
|
|
30330
30610
|
const { t } = useChatkitTranslation();
|
|
30331
30611
|
const title = getAgentRunTitle(info, t("message.agentRun.defaultTitle"));
|
|
30332
|
-
return /* @__PURE__ */
|
|
30333
|
-
|
|
30334
|
-
|
|
30335
|
-
|
|
30336
|
-
|
|
30337
|
-
|
|
30338
|
-
|
|
30339
|
-
|
|
30340
|
-
|
|
30341
|
-
|
|
30342
|
-
|
|
30343
|
-
|
|
30344
|
-
|
|
30345
|
-
|
|
30346
|
-
|
|
30612
|
+
return /* @__PURE__ */ jsxs85("div", { className: "flex min-w-0 items-center gap-2", children: [
|
|
30613
|
+
/* @__PURE__ */ jsxs85(
|
|
30614
|
+
"button",
|
|
30615
|
+
{
|
|
30616
|
+
type: "button",
|
|
30617
|
+
onClick: () => onOpen(info.id),
|
|
30618
|
+
"aria-label": t("workbench.externalAssistants.openRun", { name: title }),
|
|
30619
|
+
className: "group flex min-w-0 flex-1 items-center gap-2 rounded-lg px-2 py-2 text-left text-muted-foreground transition-colors hover:bg-muted/60 hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
30620
|
+
children: [
|
|
30621
|
+
/* @__PURE__ */ jsx110(ExternalAssistantAvatar, { info }),
|
|
30622
|
+
/* @__PURE__ */ jsx110("span", { className: "min-w-0 flex-1 truncate text-sm font-medium", children: title }),
|
|
30623
|
+
/* @__PURE__ */ jsx110(AgentRunStatus, { info }),
|
|
30624
|
+
/* @__PURE__ */ jsx110(ChevronRight14, { className: "h-4 w-4 shrink-0", "aria-hidden": "true" })
|
|
30625
|
+
]
|
|
30626
|
+
}
|
|
30627
|
+
),
|
|
30628
|
+
onCancel && isRunningRunStatus(info.status) && /* @__PURE__ */ jsx110(
|
|
30629
|
+
ExternalAssistantCancelButton,
|
|
30630
|
+
{
|
|
30631
|
+
name: title ?? "",
|
|
30632
|
+
onCancel,
|
|
30633
|
+
pending: cancelPending,
|
|
30634
|
+
requested: cancelRequested
|
|
30635
|
+
}
|
|
30636
|
+
)
|
|
30637
|
+
] });
|
|
30347
30638
|
}
|
|
30348
30639
|
|
|
30349
30640
|
// src/components/thread/messages/assistant-process.tsx
|
|
30350
|
-
import * as
|
|
30641
|
+
import * as React105 from "react";
|
|
30351
30642
|
import { ChevronRight as ChevronRight15, Loader2 as Loader219 } from "lucide-react";
|
|
30352
|
-
import { jsx as
|
|
30643
|
+
import { jsx as jsx111, jsxs as jsxs86 } from "react/jsx-runtime";
|
|
30353
30644
|
function AssistantProcess({
|
|
30354
30645
|
enabled = true,
|
|
30355
30646
|
renderContent,
|
|
@@ -30360,22 +30651,22 @@ function AssistantProcess({
|
|
|
30360
30651
|
durationMs
|
|
30361
30652
|
}) {
|
|
30362
30653
|
const { t } = useChatkitTranslation();
|
|
30363
|
-
const [userExpanded, setUserExpanded] =
|
|
30654
|
+
const [userExpanded, setUserExpanded] = React105.useState(null);
|
|
30364
30655
|
const expanded = forceExpanded || (userExpanded ?? running);
|
|
30365
|
-
const contentId =
|
|
30656
|
+
const contentId = React105.useId();
|
|
30366
30657
|
const seconds = durationMs === void 0 ? null : Math.floor(durationMs / 1e3);
|
|
30367
30658
|
const duration = seconds === null ? null : seconds >= 60 ? t("message.process.minutesSeconds", {
|
|
30368
30659
|
minutes: Math.floor(seconds / 60),
|
|
30369
30660
|
seconds: seconds % 60
|
|
30370
30661
|
}) : t("message.process.seconds", { seconds });
|
|
30371
|
-
return /* @__PURE__ */
|
|
30662
|
+
return /* @__PURE__ */ jsxs86(
|
|
30372
30663
|
"div",
|
|
30373
30664
|
{
|
|
30374
30665
|
className: "space-y-3 in-data-[density=compact]:space-y-2 in-data-[density=spacious]:space-y-4",
|
|
30375
30666
|
"data-assistant-presentation": enabled ? "final-answer" : void 0,
|
|
30376
30667
|
children: [
|
|
30377
|
-
/* @__PURE__ */
|
|
30378
|
-
/* @__PURE__ */
|
|
30668
|
+
/* @__PURE__ */ jsxs86("div", { hidden: !enabled, children: [
|
|
30669
|
+
/* @__PURE__ */ jsx111("div", { className: "border-b border-border/60 pb-2", children: /* @__PURE__ */ jsxs86(
|
|
30379
30670
|
"button",
|
|
30380
30671
|
{
|
|
30381
30672
|
type: "button",
|
|
@@ -30387,15 +30678,15 @@ function AssistantProcess({
|
|
|
30387
30678
|
if (!forceExpanded) setUserExpanded(!expanded);
|
|
30388
30679
|
},
|
|
30389
30680
|
children: [
|
|
30390
|
-
running && /* @__PURE__ */
|
|
30681
|
+
running && /* @__PURE__ */ jsx111(
|
|
30391
30682
|
Loader219,
|
|
30392
30683
|
{
|
|
30393
30684
|
"aria-hidden": "true",
|
|
30394
30685
|
className: "mr-1 h-3.5 w-3.5 animate-spin"
|
|
30395
30686
|
}
|
|
30396
30687
|
),
|
|
30397
|
-
/* @__PURE__ */
|
|
30398
|
-
/* @__PURE__ */
|
|
30688
|
+
/* @__PURE__ */ jsx111("span", { children: running ? t("message.process.running") : duration ? t("message.process.duration", { duration }) : t("message.process.title") }),
|
|
30689
|
+
/* @__PURE__ */ jsx111(
|
|
30399
30690
|
ChevronRight15,
|
|
30400
30691
|
{
|
|
30401
30692
|
"aria-hidden": "true",
|
|
@@ -30408,9 +30699,9 @@ function AssistantProcess({
|
|
|
30408
30699
|
]
|
|
30409
30700
|
}
|
|
30410
30701
|
) }),
|
|
30411
|
-
/* @__PURE__ */
|
|
30702
|
+
/* @__PURE__ */ jsx111("div", { id: contentId, hidden: !expanded, className: "mt-3 space-y-3", children: process })
|
|
30412
30703
|
] }),
|
|
30413
|
-
renderContent ? /* @__PURE__ */
|
|
30704
|
+
renderContent ? /* @__PURE__ */ jsx111(
|
|
30414
30705
|
"div",
|
|
30415
30706
|
{
|
|
30416
30707
|
id: `${contentId}-content`,
|
|
@@ -30424,7 +30715,7 @@ function AssistantProcess({
|
|
|
30424
30715
|
}
|
|
30425
30716
|
|
|
30426
30717
|
// src/components/thread/messages/assistant-content.tsx
|
|
30427
|
-
import { jsx as
|
|
30718
|
+
import { jsx as jsx112 } from "react/jsx-runtime";
|
|
30428
30719
|
function groupAdjacentReasoning(units) {
|
|
30429
30720
|
const groups = [];
|
|
30430
30721
|
for (const unit of units) {
|
|
@@ -30450,11 +30741,11 @@ function renderContentUnit(unit, message, lookupMessages, hasFollowingItem, opti
|
|
|
30450
30741
|
const bubbles = mode === "bubbles";
|
|
30451
30742
|
if (unit.type === "reasoning-group") {
|
|
30452
30743
|
if (bubbles) return null;
|
|
30453
|
-
return /* @__PURE__ */
|
|
30744
|
+
return /* @__PURE__ */ jsx112(
|
|
30454
30745
|
"div",
|
|
30455
30746
|
{
|
|
30456
30747
|
hidden: bubbles,
|
|
30457
|
-
children: !bubbles && /* @__PURE__ */
|
|
30748
|
+
children: !bubbles && /* @__PURE__ */ jsx112(
|
|
30458
30749
|
ReasoningBlock,
|
|
30459
30750
|
{
|
|
30460
30751
|
reasoning: unit.items,
|
|
@@ -30471,7 +30762,7 @@ function renderContentUnit(unit, message, lookupMessages, hasFollowingItem, opti
|
|
|
30471
30762
|
const hidden = bubbles && (kind === "process" || kind === "omitted");
|
|
30472
30763
|
if (hidden) return null;
|
|
30473
30764
|
const key = typeof content === "string" ? `text-${unit.index}` : content.id ?? `item-${unit.index}`;
|
|
30474
|
-
return /* @__PURE__ */
|
|
30765
|
+
return /* @__PURE__ */ jsx112(
|
|
30475
30766
|
MessageBubble,
|
|
30476
30767
|
{
|
|
30477
30768
|
mode,
|
|
@@ -30488,11 +30779,11 @@ function renderContentUnit(unit, message, lookupMessages, hasFollowingItem, opti
|
|
|
30488
30779
|
);
|
|
30489
30780
|
}
|
|
30490
30781
|
if (bubbles && !unit.items.some(hasBubbleToolResult)) return null;
|
|
30491
|
-
return /* @__PURE__ */
|
|
30782
|
+
return /* @__PURE__ */ jsx112(
|
|
30492
30783
|
"div",
|
|
30493
30784
|
{
|
|
30494
30785
|
className: bubbles ? "space-y-3 empty:hidden" : void 0,
|
|
30495
|
-
children: bubbles ? /* @__PURE__ */
|
|
30786
|
+
children: bubbles ? /* @__PURE__ */ jsx112(BubbleToolResults, { items: unit.items, messageStatus: message.status }) : /* @__PURE__ */ jsx112(
|
|
30496
30787
|
ToolComponentGroup,
|
|
30497
30788
|
{
|
|
30498
30789
|
items: unit.items,
|
|
@@ -30522,7 +30813,7 @@ function renderEntryBatch(entries, message, lookupMessages, hasFollowingItem, op
|
|
|
30522
30813
|
const sourceIndex = entry.index;
|
|
30523
30814
|
const mapped = unit.type === "item" ? { ...unit, index: sourceIndex } : { ...unit, startIndex: sourceIndex };
|
|
30524
30815
|
const key = unit.type === "item" ? `entry-${entry.source}-${typeof unit.item === "string" ? sourceIndex : unit.item.id ?? sourceIndex}` : `${unit.type}-${entry.source}-${unit.items[0]?.id ?? sourceIndex}`;
|
|
30525
|
-
return /* @__PURE__ */
|
|
30816
|
+
return /* @__PURE__ */ jsx112(
|
|
30526
30817
|
"div",
|
|
30527
30818
|
{
|
|
30528
30819
|
hidden: options?.hiddenOrders?.has(entry.order),
|
|
@@ -30565,12 +30856,12 @@ function renderAssistantRenderUnits(units, message, lookupMessages, options, dep
|
|
|
30565
30856
|
flushEntries(true);
|
|
30566
30857
|
if (unit.node.info.invocationKind === "external_assistant" && options?.onOpenExternalAssistant) {
|
|
30567
30858
|
rendered.push(
|
|
30568
|
-
/* @__PURE__ */
|
|
30859
|
+
/* @__PURE__ */ jsx112(
|
|
30569
30860
|
MessageBubble,
|
|
30570
30861
|
{
|
|
30571
30862
|
mode: options.mode,
|
|
30572
30863
|
hidden: options.hiddenOrders?.has(unit.order),
|
|
30573
|
-
children: /* @__PURE__ */
|
|
30864
|
+
children: /* @__PURE__ */ jsx112(
|
|
30574
30865
|
ExternalAssistantRunRow,
|
|
30575
30866
|
{
|
|
30576
30867
|
info: unit.node.info,
|
|
@@ -30584,13 +30875,13 @@ function renderAssistantRenderUnits(units, message, lookupMessages, options, dep
|
|
|
30584
30875
|
return;
|
|
30585
30876
|
}
|
|
30586
30877
|
rendered.push(
|
|
30587
|
-
/* @__PURE__ */
|
|
30878
|
+
/* @__PURE__ */ jsx112(
|
|
30588
30879
|
MessageBubble,
|
|
30589
30880
|
{
|
|
30590
30881
|
mode: options?.mode,
|
|
30591
30882
|
hidden: options?.hiddenOrders?.has(unit.order),
|
|
30592
30883
|
"data-quote-source": unit.node.info.xpertName ?? unit.node.info.title,
|
|
30593
|
-
children: /* @__PURE__ */
|
|
30884
|
+
children: /* @__PURE__ */ jsx112(
|
|
30594
30885
|
AgentRunGroup,
|
|
30595
30886
|
{
|
|
30596
30887
|
mode: options?.mode,
|
|
@@ -30621,7 +30912,7 @@ function AssistantContent({
|
|
|
30621
30912
|
const tree = buildAssistantRenderTree(message);
|
|
30622
30913
|
const presentation = getAssistantPresentation(message);
|
|
30623
30914
|
const canSeparate = options.mode !== "bubbles" && options.collapseProcess && presentation.canSeparate && Boolean(presentation.process.length || options.processPrefix);
|
|
30624
|
-
return /* @__PURE__ */
|
|
30915
|
+
return /* @__PURE__ */ jsx112(
|
|
30625
30916
|
AssistantProcess,
|
|
30626
30917
|
{
|
|
30627
30918
|
enabled: Boolean(canSeparate),
|
|
@@ -30638,7 +30929,7 @@ function AssistantContent({
|
|
|
30638
30929
|
}
|
|
30639
30930
|
|
|
30640
30931
|
// src/components/thread/messages/ai.tsx
|
|
30641
|
-
import { Fragment as Fragment19, jsx as
|
|
30932
|
+
import { Fragment as Fragment19, jsx as jsx113, jsxs as jsxs87 } from "react/jsx-runtime";
|
|
30642
30933
|
function AssistantStreamingIndicator({
|
|
30643
30934
|
status,
|
|
30644
30935
|
className
|
|
@@ -30649,7 +30940,7 @@ function AssistantStreamingIndicator({
|
|
|
30649
30940
|
thinking: t("message.thinking"),
|
|
30650
30941
|
answering: t("message.answering")
|
|
30651
30942
|
};
|
|
30652
|
-
return /* @__PURE__ */
|
|
30943
|
+
return /* @__PURE__ */ jsxs87(
|
|
30653
30944
|
"div",
|
|
30654
30945
|
{
|
|
30655
30946
|
className: cn(
|
|
@@ -30657,18 +30948,18 @@ function AssistantStreamingIndicator({
|
|
|
30657
30948
|
className
|
|
30658
30949
|
),
|
|
30659
30950
|
children: [
|
|
30660
|
-
status === "loading" && /* @__PURE__ */
|
|
30661
|
-
status === "thinking" && /* @__PURE__ */
|
|
30662
|
-
/* @__PURE__ */
|
|
30663
|
-
/* @__PURE__ */
|
|
30664
|
-
/* @__PURE__ */
|
|
30951
|
+
status === "loading" && /* @__PURE__ */ jsx113(Loader220, { className: "h-3.5 w-3.5 animate-spin" }),
|
|
30952
|
+
status === "thinking" && /* @__PURE__ */ jsxs87("div", { className: "flex items-end gap-1", "aria-hidden": "true", children: [
|
|
30953
|
+
/* @__PURE__ */ jsx113("span", { className: "h-1.5 w-1.5 rounded-full bg-current animate-bounce [animation-delay:-0.3s]" }),
|
|
30954
|
+
/* @__PURE__ */ jsx113("span", { className: "h-1.5 w-1.5 rounded-full bg-current animate-bounce [animation-delay:-0.15s]" }),
|
|
30955
|
+
/* @__PURE__ */ jsx113("span", { className: "h-1.5 w-1.5 rounded-full bg-current animate-bounce" })
|
|
30665
30956
|
] }),
|
|
30666
|
-
status === "answering" && /* @__PURE__ */
|
|
30667
|
-
/* @__PURE__ */
|
|
30668
|
-
/* @__PURE__ */
|
|
30669
|
-
/* @__PURE__ */
|
|
30957
|
+
status === "answering" && /* @__PURE__ */ jsxs87("div", { className: "flex items-end gap-1", "aria-hidden": "true", children: [
|
|
30958
|
+
/* @__PURE__ */ jsx113("span", { className: "h-2 w-0.5 rounded-full bg-current animate-pulse [animation-delay:-0.25s]" }),
|
|
30959
|
+
/* @__PURE__ */ jsx113("span", { className: "h-3 w-0.5 rounded-full bg-current animate-pulse [animation-delay:-0.1s]" }),
|
|
30960
|
+
/* @__PURE__ */ jsx113("span", { className: "h-2.5 w-0.5 rounded-full bg-current animate-pulse" })
|
|
30670
30961
|
] }),
|
|
30671
|
-
/* @__PURE__ */
|
|
30962
|
+
/* @__PURE__ */ jsx113("span", { children: labelMap[status] })
|
|
30672
30963
|
]
|
|
30673
30964
|
}
|
|
30674
30965
|
);
|
|
@@ -30700,7 +30991,7 @@ function AssistantMessage({
|
|
|
30700
30991
|
const isReasoning = isStreaming && message.status !== "answering" && resolvedStreamingStatus === "thinking";
|
|
30701
30992
|
const lookupMessages = messages?.length ? messages : [message];
|
|
30702
30993
|
const inlinePetState = resolvedStreamingStatus ? resolvedStreamingStatus === "loading" ? "running" : "review" : null;
|
|
30703
|
-
const inlinePet = inlinePetState ? /* @__PURE__ */
|
|
30994
|
+
const inlinePet = inlinePetState ? /* @__PURE__ */ jsx113(InlinePetStatus, { pet, state: inlinePetState }) : null;
|
|
30704
30995
|
const contentOptions = {
|
|
30705
30996
|
mode,
|
|
30706
30997
|
collapseProcess,
|
|
@@ -30714,7 +31005,7 @@ function AssistantMessage({
|
|
|
30714
31005
|
apiUrl,
|
|
30715
31006
|
mcpApps
|
|
30716
31007
|
};
|
|
30717
|
-
const answerNode = /* @__PURE__ */
|
|
31008
|
+
const answerNode = /* @__PURE__ */ jsx113(
|
|
30718
31009
|
AssistantContent,
|
|
30719
31010
|
{
|
|
30720
31011
|
message,
|
|
@@ -30735,21 +31026,21 @@ function AssistantMessage({
|
|
|
30735
31026
|
if (!hasContent && !hasReasoning && !resolvedStreamingStatus && !showCompletion)
|
|
30736
31027
|
return null;
|
|
30737
31028
|
const streamingClass = isStreaming ? "streaming-active" : "";
|
|
30738
|
-
return /* @__PURE__ */
|
|
31029
|
+
return /* @__PURE__ */ jsxs87("div", { className: cn("space-y-3", streamingClass, className), children: [
|
|
30739
31030
|
answerNode,
|
|
30740
|
-
!isStreaming && /* @__PURE__ */
|
|
30741
|
-
/* @__PURE__ */
|
|
31031
|
+
!isStreaming && /* @__PURE__ */ jsxs87(Fragment19, { children: [
|
|
31032
|
+
/* @__PURE__ */ jsx113(
|
|
30742
31033
|
MessageBubble,
|
|
30743
31034
|
{
|
|
30744
31035
|
mode,
|
|
30745
31036
|
hidden: !hasRenderableFileActivity(message),
|
|
30746
|
-
children: /* @__PURE__ */
|
|
31037
|
+
children: /* @__PURE__ */ jsx113(MessageFileActivity, { message })
|
|
30747
31038
|
}
|
|
30748
31039
|
),
|
|
30749
|
-
/* @__PURE__ */
|
|
31040
|
+
/* @__PURE__ */ jsx113(MessageResourceCards, { message, mode })
|
|
30750
31041
|
] }),
|
|
30751
|
-
showCompletion && /* @__PURE__ */
|
|
30752
|
-
resolvedStreamingStatus ? /* @__PURE__ */
|
|
31042
|
+
showCompletion && /* @__PURE__ */ jsx113(MessageBubble, { mode, kind: "status", role: "status", children: t(`message.bubbles.${completion}`) }),
|
|
31043
|
+
resolvedStreamingStatus ? /* @__PURE__ */ jsxs87(
|
|
30753
31044
|
MessageBubble,
|
|
30754
31045
|
{
|
|
30755
31046
|
mode,
|
|
@@ -30757,7 +31048,7 @@ function AssistantMessage({
|
|
|
30757
31048
|
className: "flex items-center gap-2",
|
|
30758
31049
|
children: [
|
|
30759
31050
|
inlinePet,
|
|
30760
|
-
/* @__PURE__ */
|
|
31051
|
+
/* @__PURE__ */ jsx113(AssistantStreamingIndicator, { status: resolvedStreamingStatus })
|
|
30761
31052
|
]
|
|
30762
31053
|
}
|
|
30763
31054
|
) : null
|
|
@@ -30765,32 +31056,32 @@ function AssistantMessage({
|
|
|
30765
31056
|
}
|
|
30766
31057
|
|
|
30767
31058
|
// src/components/thread/MessageActions.tsx
|
|
30768
|
-
import * as
|
|
31059
|
+
import * as React109 from "react";
|
|
30769
31060
|
import {
|
|
30770
31061
|
Check as Check10,
|
|
30771
31062
|
Copy as Copy3,
|
|
30772
31063
|
Pencil as Pencil7,
|
|
30773
|
-
RefreshCw as
|
|
31064
|
+
RefreshCw as RefreshCw5,
|
|
30774
31065
|
GitBranch as GitBranch2,
|
|
30775
31066
|
Loader2 as Loader221
|
|
30776
31067
|
} from "lucide-react";
|
|
30777
31068
|
|
|
30778
31069
|
// src/components/thread/MessageSkills.tsx
|
|
30779
|
-
import * as
|
|
31070
|
+
import * as React108 from "react";
|
|
30780
31071
|
import { BookOpen as BookOpen3 } from "lucide-react";
|
|
30781
31072
|
import {
|
|
30782
31073
|
chatSkillUsageKey
|
|
30783
31074
|
} from "@xpert-ai/chatkit-types";
|
|
30784
|
-
import { jsx as
|
|
31075
|
+
import { jsx as jsx114, jsxs as jsxs88 } from "react/jsx-runtime";
|
|
30785
31076
|
function MessageSkills({
|
|
30786
31077
|
usages,
|
|
30787
31078
|
onOpen
|
|
30788
31079
|
}) {
|
|
30789
31080
|
const { t } = useChatkitTranslation();
|
|
30790
|
-
const [open, setOpen] =
|
|
30791
|
-
const pinned =
|
|
30792
|
-
const timer =
|
|
30793
|
-
const titleId =
|
|
31081
|
+
const [open, setOpen] = React108.useState(false);
|
|
31082
|
+
const pinned = React108.useRef(false);
|
|
31083
|
+
const timer = React108.useRef(void 0);
|
|
31084
|
+
const titleId = React108.useId();
|
|
30794
31085
|
const cancelClose = () => clearTimeout(timer.current);
|
|
30795
31086
|
const show = () => {
|
|
30796
31087
|
cancelClose();
|
|
@@ -30808,8 +31099,8 @@ function MessageSkills({
|
|
|
30808
31099
|
if (!pinned.current) setOpen(false);
|
|
30809
31100
|
}, 150);
|
|
30810
31101
|
};
|
|
30811
|
-
|
|
30812
|
-
return /* @__PURE__ */
|
|
31102
|
+
React108.useEffect(() => () => clearTimeout(timer.current), []);
|
|
31103
|
+
return /* @__PURE__ */ jsxs88(
|
|
30813
31104
|
Popover,
|
|
30814
31105
|
{
|
|
30815
31106
|
open,
|
|
@@ -30817,7 +31108,7 @@ function MessageSkills({
|
|
|
30817
31108
|
if (!next) close();
|
|
30818
31109
|
},
|
|
30819
31110
|
children: [
|
|
30820
|
-
/* @__PURE__ */
|
|
31111
|
+
/* @__PURE__ */ jsx114(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsx114(
|
|
30821
31112
|
"button",
|
|
30822
31113
|
{
|
|
30823
31114
|
type: "button",
|
|
@@ -30837,10 +31128,10 @@ function MessageSkills({
|
|
|
30837
31128
|
show();
|
|
30838
31129
|
}
|
|
30839
31130
|
},
|
|
30840
|
-
children: /* @__PURE__ */
|
|
31131
|
+
children: /* @__PURE__ */ jsx114(BookOpen3, { size: 14, "aria-hidden": "true" })
|
|
30841
31132
|
}
|
|
30842
31133
|
) }),
|
|
30843
|
-
/* @__PURE__ */
|
|
31134
|
+
/* @__PURE__ */ jsxs88(
|
|
30844
31135
|
PopoverContent,
|
|
30845
31136
|
{
|
|
30846
31137
|
side: "top",
|
|
@@ -30853,14 +31144,14 @@ function MessageSkills({
|
|
|
30853
31144
|
onPointerEnter: cancelClose,
|
|
30854
31145
|
onPointerLeave: scheduleClose,
|
|
30855
31146
|
children: [
|
|
30856
|
-
/* @__PURE__ */
|
|
30857
|
-
/* @__PURE__ */
|
|
31147
|
+
/* @__PURE__ */ jsx114("div", { id: titleId, className: "mb-2 text-sm font-medium", children: t("messageActions.skills.title") }),
|
|
31148
|
+
/* @__PURE__ */ jsx114("ul", { className: "max-h-64 space-y-1 overflow-y-auto text-sm", children: usages.map((usage) => /* @__PURE__ */ jsxs88(
|
|
30858
31149
|
"li",
|
|
30859
31150
|
{
|
|
30860
31151
|
className: "flex items-start justify-between gap-4",
|
|
30861
31152
|
children: [
|
|
30862
|
-
/* @__PURE__ */
|
|
30863
|
-
/* @__PURE__ */
|
|
31153
|
+
/* @__PURE__ */ jsx114("span", { className: "min-w-0 break-words", children: usage.name }),
|
|
31154
|
+
/* @__PURE__ */ jsx114("span", { className: "shrink-0 text-muted-foreground", children: t(`messageActions.skills.sources.${usage.source.type}`) })
|
|
30864
31155
|
]
|
|
30865
31156
|
},
|
|
30866
31157
|
chatSkillUsageKey(usage)
|
|
@@ -30874,7 +31165,7 @@ function MessageSkills({
|
|
|
30874
31165
|
}
|
|
30875
31166
|
|
|
30876
31167
|
// src/components/thread/MessageTimestamp.tsx
|
|
30877
|
-
import { jsx as
|
|
31168
|
+
import { jsx as jsx115, jsxs as jsxs89 } from "react/jsx-runtime";
|
|
30878
31169
|
function formatCompactTime(date, language, now = /* @__PURE__ */ new Date()) {
|
|
30879
31170
|
const time = new Intl.DateTimeFormat(language, {
|
|
30880
31171
|
hour: "2-digit",
|
|
@@ -30913,8 +31204,8 @@ function MessageTimestamp({
|
|
|
30913
31204
|
timeZoneName: "short"
|
|
30914
31205
|
}).format(date)
|
|
30915
31206
|
});
|
|
30916
|
-
return /* @__PURE__ */
|
|
30917
|
-
/* @__PURE__ */
|
|
31207
|
+
return /* @__PURE__ */ jsxs89(Tooltip, { children: [
|
|
31208
|
+
/* @__PURE__ */ jsx115(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx115(
|
|
30918
31209
|
"time",
|
|
30919
31210
|
{
|
|
30920
31211
|
dateTime: date.toISOString(),
|
|
@@ -30924,12 +31215,12 @@ function MessageTimestamp({
|
|
|
30924
31215
|
children: formatCompactTime(date, i18n2.language)
|
|
30925
31216
|
}
|
|
30926
31217
|
) }),
|
|
30927
|
-
/* @__PURE__ */
|
|
31218
|
+
/* @__PURE__ */ jsx115(TooltipContent, { side: "bottom", children: label })
|
|
30928
31219
|
] });
|
|
30929
31220
|
}
|
|
30930
31221
|
|
|
30931
31222
|
// src/components/thread/MessageActions.tsx
|
|
30932
|
-
import { jsx as
|
|
31223
|
+
import { jsx as jsx116, jsxs as jsxs90 } from "react/jsx-runtime";
|
|
30933
31224
|
function MessageActionButton({
|
|
30934
31225
|
label,
|
|
30935
31226
|
tooltip = label,
|
|
@@ -30938,7 +31229,7 @@ function MessageActionButton({
|
|
|
30938
31229
|
className,
|
|
30939
31230
|
...props
|
|
30940
31231
|
}) {
|
|
30941
|
-
const button = /* @__PURE__ */
|
|
31232
|
+
const button = /* @__PURE__ */ jsx116(
|
|
30942
31233
|
"button",
|
|
30943
31234
|
{
|
|
30944
31235
|
...props,
|
|
@@ -30951,7 +31242,7 @@ function MessageActionButton({
|
|
|
30951
31242
|
)
|
|
30952
31243
|
}
|
|
30953
31244
|
);
|
|
30954
|
-
return /* @__PURE__ */
|
|
31245
|
+
return /* @__PURE__ */ jsxs90(
|
|
30955
31246
|
Tooltip,
|
|
30956
31247
|
{
|
|
30957
31248
|
delayDuration: 200,
|
|
@@ -30959,7 +31250,7 @@ function MessageActionButton({
|
|
|
30959
31250
|
if (open) onTooltipOpen?.();
|
|
30960
31251
|
},
|
|
30961
31252
|
children: [
|
|
30962
|
-
/* @__PURE__ */
|
|
31253
|
+
/* @__PURE__ */ jsx116(TooltipTrigger, { asChild: true, children: disabled ? /* @__PURE__ */ jsx116(
|
|
30963
31254
|
"span",
|
|
30964
31255
|
{
|
|
30965
31256
|
tabIndex: 0,
|
|
@@ -30969,7 +31260,7 @@ function MessageActionButton({
|
|
|
30969
31260
|
children: button
|
|
30970
31261
|
}
|
|
30971
31262
|
) : button }),
|
|
30972
|
-
/* @__PURE__ */
|
|
31263
|
+
/* @__PURE__ */ jsx116(
|
|
30973
31264
|
TooltipContent,
|
|
30974
31265
|
{
|
|
30975
31266
|
side: "bottom",
|
|
@@ -31000,7 +31291,7 @@ function MessageActions({
|
|
|
31000
31291
|
skillUsages
|
|
31001
31292
|
}) {
|
|
31002
31293
|
const { t } = useChatkitTranslation();
|
|
31003
|
-
const [copied, setCopied] =
|
|
31294
|
+
const [copied, setCopied] = React109.useState(false);
|
|
31004
31295
|
const handleCopy = async () => {
|
|
31005
31296
|
try {
|
|
31006
31297
|
await navigator.clipboard.writeText(content);
|
|
@@ -31013,8 +31304,8 @@ function MessageActions({
|
|
|
31013
31304
|
if (isStreaming) return null;
|
|
31014
31305
|
const branchLabel = t("messageActions.branch");
|
|
31015
31306
|
const branchTooltip = isBranching ? t("messageActions.branching") : branching && !branching.available ? `${branchLabel}\uFF1A${t(`messageActions.branchReasons.${branching.reason ?? "checkpoint_unavailable"}`)}` : branchLabel;
|
|
31016
|
-
return /* @__PURE__ */
|
|
31017
|
-
/* @__PURE__ */
|
|
31307
|
+
return /* @__PURE__ */ jsxs90("div", { className: cn("flex items-center gap-1 mt-2", className), children: [
|
|
31308
|
+
/* @__PURE__ */ jsxs90(
|
|
31018
31309
|
"div",
|
|
31019
31310
|
{
|
|
31020
31311
|
className: cn(
|
|
@@ -31022,35 +31313,35 @@ function MessageActions({
|
|
|
31022
31313
|
!alwaysVisible && "sm:opacity-0 sm:group-hover/message:opacity-100 sm:focus-within:opacity-100"
|
|
31023
31314
|
),
|
|
31024
31315
|
children: [
|
|
31025
|
-
/* @__PURE__ */
|
|
31316
|
+
/* @__PURE__ */ jsx116(
|
|
31026
31317
|
MessageActionButton,
|
|
31027
31318
|
{
|
|
31028
31319
|
label: copied ? t("messageActions.copied") : t("messageActions.copy"),
|
|
31029
31320
|
onClick: handleCopy,
|
|
31030
31321
|
onTooltipOpen: onActionTooltipOpen,
|
|
31031
31322
|
className: cn(copied && "text-green-500"),
|
|
31032
|
-
children: copied ? /* @__PURE__ */
|
|
31323
|
+
children: copied ? /* @__PURE__ */ jsx116(Check10, { size: 14 }) : /* @__PURE__ */ jsx116(Copy3, { size: 14 })
|
|
31033
31324
|
}
|
|
31034
31325
|
),
|
|
31035
|
-
!isAssistant && onEdit && /* @__PURE__ */
|
|
31326
|
+
!isAssistant && onEdit && /* @__PURE__ */ jsx116(
|
|
31036
31327
|
MessageActionButton,
|
|
31037
31328
|
{
|
|
31038
31329
|
label: t("threadControl.editMessage"),
|
|
31039
31330
|
onClick: onEdit,
|
|
31040
31331
|
onTooltipOpen: onActionTooltipOpen,
|
|
31041
|
-
children: /* @__PURE__ */
|
|
31332
|
+
children: /* @__PURE__ */ jsx116(Pencil7, { size: 14 })
|
|
31042
31333
|
}
|
|
31043
31334
|
),
|
|
31044
|
-
isAssistant && onRetry && /* @__PURE__ */
|
|
31335
|
+
isAssistant && onRetry && /* @__PURE__ */ jsx116(
|
|
31045
31336
|
MessageActionButton,
|
|
31046
31337
|
{
|
|
31047
31338
|
label: t("messageActions.regenerate"),
|
|
31048
31339
|
onClick: onRetry,
|
|
31049
31340
|
onTooltipOpen: onActionTooltipOpen,
|
|
31050
|
-
children: /* @__PURE__ */
|
|
31341
|
+
children: /* @__PURE__ */ jsx116(RefreshCw5, { size: 14 })
|
|
31051
31342
|
}
|
|
31052
31343
|
),
|
|
31053
|
-
isAssistant && onBranch && branching && /* @__PURE__ */
|
|
31344
|
+
isAssistant && onBranch && branching && /* @__PURE__ */ jsx116(
|
|
31054
31345
|
MessageActionButton,
|
|
31055
31346
|
{
|
|
31056
31347
|
label: branchLabel,
|
|
@@ -31059,29 +31350,29 @@ function MessageActions({
|
|
|
31059
31350
|
onTooltipOpen: onActionTooltipOpen,
|
|
31060
31351
|
disabled: isBranching || branchDisabled || !branching.available,
|
|
31061
31352
|
"aria-busy": isBranching,
|
|
31062
|
-
children: isBranching ? /* @__PURE__ */
|
|
31353
|
+
children: isBranching ? /* @__PURE__ */ jsx116(Loader221, { size: 14, className: "animate-spin" }) : /* @__PURE__ */ jsx116(GitBranch2, { size: 14 })
|
|
31063
31354
|
}
|
|
31064
31355
|
),
|
|
31065
|
-
isAssistant && skillUsages && skillUsages.length > 0 && /* @__PURE__ */
|
|
31356
|
+
isAssistant && skillUsages && skillUsages.length > 0 && /* @__PURE__ */ jsx116(MessageSkills, { usages: skillUsages, onOpen: onActionTooltipOpen })
|
|
31066
31357
|
]
|
|
31067
31358
|
}
|
|
31068
31359
|
),
|
|
31069
|
-
/* @__PURE__ */
|
|
31360
|
+
/* @__PURE__ */ jsx116(MessageTimestamp, { updatedAt })
|
|
31070
31361
|
] });
|
|
31071
31362
|
}
|
|
31072
31363
|
|
|
31073
31364
|
// src/components/thread/MessageEditor.tsx
|
|
31074
|
-
import { useState as
|
|
31075
|
-
import { jsx as
|
|
31365
|
+
import { useState as useState66 } from "react";
|
|
31366
|
+
import { jsx as jsx117, jsxs as jsxs91 } from "react/jsx-runtime";
|
|
31076
31367
|
function MessageEditor({
|
|
31077
31368
|
initialText,
|
|
31078
31369
|
onSave,
|
|
31079
31370
|
onCancel
|
|
31080
31371
|
}) {
|
|
31081
31372
|
const { t } = useChatkitTranslation();
|
|
31082
|
-
const [text, setText] =
|
|
31083
|
-
const [busy, setBusy] =
|
|
31084
|
-
const [error, setError] =
|
|
31373
|
+
const [text, setText] = useState66(initialText);
|
|
31374
|
+
const [busy, setBusy] = useState66(false);
|
|
31375
|
+
const [error, setError] = useState66(null);
|
|
31085
31376
|
async function save() {
|
|
31086
31377
|
setBusy(true);
|
|
31087
31378
|
setError(null);
|
|
@@ -31093,8 +31384,8 @@ function MessageEditor({
|
|
|
31093
31384
|
setBusy(false);
|
|
31094
31385
|
}
|
|
31095
31386
|
}
|
|
31096
|
-
return /* @__PURE__ */
|
|
31097
|
-
/* @__PURE__ */
|
|
31387
|
+
return /* @__PURE__ */ jsxs91("div", { className: "w-full space-y-2 rounded-2xl border border-input bg-background p-3", children: [
|
|
31388
|
+
/* @__PURE__ */ jsx117(
|
|
31098
31389
|
"textarea",
|
|
31099
31390
|
{
|
|
31100
31391
|
"aria-label": t("threadControl.editMessage"),
|
|
@@ -31106,9 +31397,9 @@ function MessageEditor({
|
|
|
31106
31397
|
className: "w-full resize-y bg-transparent text-sm leading-relaxed text-foreground outline-none"
|
|
31107
31398
|
}
|
|
31108
31399
|
),
|
|
31109
|
-
error && /* @__PURE__ */
|
|
31110
|
-
/* @__PURE__ */
|
|
31111
|
-
/* @__PURE__ */
|
|
31400
|
+
error && /* @__PURE__ */ jsx117("p", { role: "alert", className: "text-xs text-destructive", children: error }),
|
|
31401
|
+
/* @__PURE__ */ jsxs91("div", { className: "flex justify-end gap-2", children: [
|
|
31402
|
+
/* @__PURE__ */ jsx117(
|
|
31112
31403
|
Button,
|
|
31113
31404
|
{
|
|
31114
31405
|
type: "button",
|
|
@@ -31119,7 +31410,7 @@ function MessageEditor({
|
|
|
31119
31410
|
children: t("threadControl.discardEdit")
|
|
31120
31411
|
}
|
|
31121
31412
|
),
|
|
31122
|
-
/* @__PURE__ */
|
|
31413
|
+
/* @__PURE__ */ jsx117(
|
|
31123
31414
|
Button,
|
|
31124
31415
|
{
|
|
31125
31416
|
type: "button",
|
|
@@ -31134,7 +31425,7 @@ function MessageEditor({
|
|
|
31134
31425
|
}
|
|
31135
31426
|
|
|
31136
31427
|
// src/components/thread/MessageList.tsx
|
|
31137
|
-
import { Fragment as Fragment20, jsx as
|
|
31428
|
+
import { Fragment as Fragment20, jsx as jsx118, jsxs as jsxs92 } from "react/jsx-runtime";
|
|
31138
31429
|
function formatMessageContent(content) {
|
|
31139
31430
|
if (typeof content === "string") {
|
|
31140
31431
|
return content;
|
|
@@ -31209,16 +31500,16 @@ function MessageList({
|
|
|
31209
31500
|
const approvalIndex = foldedIndexes.has(toolAnchor) ? [...processGroups].find(
|
|
31210
31501
|
([, indexes]) => indexes.includes(toolAnchor)
|
|
31211
31502
|
)?.[0] ?? lastAssistantIndex : toolAnchor >= 0 ? toolAnchor : lastAssistantIndex;
|
|
31212
|
-
return /* @__PURE__ */
|
|
31503
|
+
return /* @__PURE__ */ jsx118(PresentationScrollAnchor, { mode, children: /* @__PURE__ */ jsxs92(
|
|
31213
31504
|
"div",
|
|
31214
31505
|
{
|
|
31215
31506
|
"data-slot": "chatkit-message-list",
|
|
31216
31507
|
"data-message-presentation": mode,
|
|
31217
31508
|
className: "space-y-4",
|
|
31218
31509
|
children: [
|
|
31219
|
-
canLoadMoreMessages && /* @__PURE__ */
|
|
31220
|
-
/* @__PURE__ */
|
|
31221
|
-
/* @__PURE__ */
|
|
31510
|
+
canLoadMoreMessages && /* @__PURE__ */ jsxs92("div", { className: "flex items-center gap-3 py-1", children: [
|
|
31511
|
+
/* @__PURE__ */ jsx118("div", { className: "h-px min-w-8 flex-1 bg-border" }),
|
|
31512
|
+
/* @__PURE__ */ jsx118(
|
|
31222
31513
|
Button,
|
|
31223
31514
|
{
|
|
31224
31515
|
type: "button",
|
|
@@ -31230,20 +31521,20 @@ function MessageList({
|
|
|
31230
31521
|
children: isLoadingMoreMessages ? t("chat.loadingMoreMessages") : t("chat.loadMoreMessages")
|
|
31231
31522
|
}
|
|
31232
31523
|
),
|
|
31233
|
-
/* @__PURE__ */
|
|
31524
|
+
/* @__PURE__ */ jsx118("div", { className: "h-px min-w-8 flex-1 bg-border" })
|
|
31234
31525
|
] }),
|
|
31235
31526
|
messages.map((message, index) => {
|
|
31236
31527
|
if (foldedIndexes.has(index)) return null;
|
|
31237
31528
|
const call = Array.isArray(message.content) ? message.content.find(isCallEndedContent) : void 0;
|
|
31238
31529
|
if (call)
|
|
31239
|
-
return /* @__PURE__ */
|
|
31530
|
+
return /* @__PURE__ */ jsx118(
|
|
31240
31531
|
"div",
|
|
31241
31532
|
{
|
|
31242
31533
|
"data-message-id": message.id,
|
|
31243
31534
|
ref: (node) => {
|
|
31244
31535
|
if (message.id) onMessageAnchor?.(message.id, node);
|
|
31245
31536
|
},
|
|
31246
|
-
children: /* @__PURE__ */
|
|
31537
|
+
children: /* @__PURE__ */ jsx118(CallEndedMessage, { call })
|
|
31247
31538
|
},
|
|
31248
31539
|
message.id ?? index
|
|
31249
31540
|
);
|
|
@@ -31293,7 +31584,7 @@ function MessageList({
|
|
|
31293
31584
|
if (!isAssistantMessage && !hasPlainRenderableContent && !hasHumanAttachments && humanRuntimeCapabilityOptions.length === 0 && humanReferences.length === 0) {
|
|
31294
31585
|
return null;
|
|
31295
31586
|
}
|
|
31296
|
-
return /* @__PURE__ */
|
|
31587
|
+
return /* @__PURE__ */ jsx118(
|
|
31297
31588
|
"div",
|
|
31298
31589
|
{
|
|
31299
31590
|
ref: (node) => {
|
|
@@ -31315,7 +31606,7 @@ function MessageList({
|
|
|
31315
31606
|
"group group/message flex gap-3",
|
|
31316
31607
|
isHumanMessage ? "justify-end" : embedded ? "justify-start" : "justify-start -ml-1"
|
|
31317
31608
|
),
|
|
31318
|
-
children: /* @__PURE__ */
|
|
31609
|
+
children: /* @__PURE__ */ jsx118(
|
|
31319
31610
|
"div",
|
|
31320
31611
|
{
|
|
31321
31612
|
className: cn(
|
|
@@ -31325,7 +31616,7 @@ function MessageList({
|
|
|
31325
31616
|
!embedded && "px-3",
|
|
31326
31617
|
(isAssistantMessage || isEditingMessage) && "min-w-0 flex-1"
|
|
31327
31618
|
),
|
|
31328
|
-
children: isEditingMessage && editing ? /* @__PURE__ */
|
|
31619
|
+
children: isEditingMessage && editing ? /* @__PURE__ */ jsx118(
|
|
31329
31620
|
MessageEditor,
|
|
31330
31621
|
{
|
|
31331
31622
|
initialText: messageContent,
|
|
@@ -31333,8 +31624,8 @@ function MessageList({
|
|
|
31333
31624
|
onSave: (text) => editing.onSave(humanMessage, text)
|
|
31334
31625
|
},
|
|
31335
31626
|
message.id
|
|
31336
|
-
) : /* @__PURE__ */
|
|
31337
|
-
/* @__PURE__ */
|
|
31627
|
+
) : /* @__PURE__ */ jsxs92(Fragment20, { children: [
|
|
31628
|
+
/* @__PURE__ */ jsx118(
|
|
31338
31629
|
"div",
|
|
31339
31630
|
{
|
|
31340
31631
|
"data-human-bubble": isHumanMessage ? "" : void 0,
|
|
@@ -31348,12 +31639,12 @@ function MessageList({
|
|
|
31348
31639
|
isHumanMessage ? "bg-primary text-primary-foreground px-4 py-2.5" : message.type === "system" ? "bg-muted text-muted-foreground text-xs px-4 py-2.5" : "py-1 text-chat-foreground"
|
|
31349
31640
|
// AI messages: use chat-specific foreground color
|
|
31350
31641
|
),
|
|
31351
|
-
children: isAssistantMessage ? /* @__PURE__ */
|
|
31642
|
+
children: isAssistantMessage ? /* @__PURE__ */ jsx118(
|
|
31352
31643
|
AssistantMessage,
|
|
31353
31644
|
{
|
|
31354
31645
|
mode,
|
|
31355
31646
|
collapseProcess,
|
|
31356
|
-
processPrefix: processIndexes?.length ? /* @__PURE__ */
|
|
31647
|
+
processPrefix: processIndexes?.length ? /* @__PURE__ */ jsx118(
|
|
31357
31648
|
MessageList,
|
|
31358
31649
|
{
|
|
31359
31650
|
messages: processIndexes.map(
|
|
@@ -31388,14 +31679,14 @@ function MessageList({
|
|
|
31388
31679
|
pet,
|
|
31389
31680
|
mcpApps
|
|
31390
31681
|
}
|
|
31391
|
-
) : /* @__PURE__ */
|
|
31392
|
-
isHumanMessage && humanRuntimeCapabilityOptions.length > 0 && /* @__PURE__ */
|
|
31682
|
+
) : /* @__PURE__ */ jsxs92(Fragment20, { children: [
|
|
31683
|
+
isHumanMessage && humanRuntimeCapabilityOptions.length > 0 && /* @__PURE__ */ jsx118(
|
|
31393
31684
|
HumanRuntimeCapabilityChips,
|
|
31394
31685
|
{
|
|
31395
31686
|
options: humanRuntimeCapabilityOptions
|
|
31396
31687
|
}
|
|
31397
31688
|
),
|
|
31398
|
-
isHumanMessage && humanReferences.length > 0 && /* @__PURE__ */
|
|
31689
|
+
isHumanMessage && humanReferences.length > 0 && /* @__PURE__ */ jsx118("div", { className: "mb-2 flex flex-wrap gap-1.5", children: humanReferences.map((reference) => /* @__PURE__ */ jsx118(
|
|
31399
31690
|
ReferenceChip,
|
|
31400
31691
|
{
|
|
31401
31692
|
reference,
|
|
@@ -31403,29 +31694,29 @@ function MessageList({
|
|
|
31403
31694
|
},
|
|
31404
31695
|
getReferenceKey(reference)
|
|
31405
31696
|
)) }),
|
|
31406
|
-
isHumanMessage && humanAttachments.length > 0 && /* @__PURE__ */
|
|
31697
|
+
isHumanMessage && humanAttachments.length > 0 && /* @__PURE__ */ jsx118("div", { className: "flex flex-wrap gap-1.5 mb-2", children: humanAttachments.map((file, fileIndex) => /* @__PURE__ */ jsxs92(
|
|
31407
31698
|
"div",
|
|
31408
31699
|
{
|
|
31409
31700
|
className: "flex items-center gap-1.5 rounded-md bg-primary-foreground/20 px-2 py-1 text-xs",
|
|
31410
31701
|
children: [
|
|
31411
|
-
/* @__PURE__ */
|
|
31412
|
-
/* @__PURE__ */
|
|
31702
|
+
/* @__PURE__ */ jsx118(FileText8, { size: 12 }),
|
|
31703
|
+
/* @__PURE__ */ jsx118("span", { className: "max-w-[100px] truncate", children: file.originalName ?? file.id })
|
|
31413
31704
|
]
|
|
31414
31705
|
},
|
|
31415
31706
|
fileIndex
|
|
31416
31707
|
)) }),
|
|
31417
|
-
Array.isArray(message.content) ? message.content.map((part, partIndex) => /* @__PURE__ */
|
|
31708
|
+
Array.isArray(message.content) ? message.content.map((part, partIndex) => /* @__PURE__ */ jsx118(
|
|
31418
31709
|
"p",
|
|
31419
31710
|
{
|
|
31420
31711
|
className: "wrap-break-word text-sm leading-relaxed",
|
|
31421
31712
|
children: formatMessageContent(part)
|
|
31422
31713
|
},
|
|
31423
31714
|
`${part.type}-${partIndex}`
|
|
31424
|
-
)) : /* @__PURE__ */
|
|
31715
|
+
)) : /* @__PURE__ */ jsx118("span", { className: "wrap-break-word text-sm leading-relaxed", children: formatMessageContent(message.content) })
|
|
31425
31716
|
] })
|
|
31426
31717
|
}
|
|
31427
31718
|
),
|
|
31428
|
-
showActions && /* @__PURE__ */
|
|
31719
|
+
showActions && /* @__PURE__ */ jsx118(
|
|
31429
31720
|
MessageActions,
|
|
31430
31721
|
{
|
|
31431
31722
|
updatedAt: isAssistantMessage || isHumanMessage ? message.updatedAt : void 0,
|
|
@@ -31450,8 +31741,8 @@ function MessageList({
|
|
|
31450
31741
|
onRetry: onRetry && isAssistantMessage && !isLoading && index === messages.length - 1 ? () => onRetry(index) : void 0
|
|
31451
31742
|
}
|
|
31452
31743
|
),
|
|
31453
|
-
index === approvalIndex && approval && /* @__PURE__ */
|
|
31454
|
-
!showActions && !isStreamingMessage && (isAssistantMessage || isHumanMessage) && /* @__PURE__ */
|
|
31744
|
+
index === approvalIndex && approval && /* @__PURE__ */ jsx118(MessageBubble, { mode, children: approval }),
|
|
31745
|
+
!showActions && !isStreamingMessage && (isAssistantMessage || isHumanMessage) && /* @__PURE__ */ jsx118(MessageTimestamp, { updatedAt: message.updatedAt })
|
|
31455
31746
|
] })
|
|
31456
31747
|
}
|
|
31457
31748
|
)
|
|
@@ -31459,7 +31750,7 @@ function MessageList({
|
|
|
31459
31750
|
message.id ?? `${message.type}-${index}`
|
|
31460
31751
|
);
|
|
31461
31752
|
}),
|
|
31462
|
-
approvalIndex < 0 && approval && /* @__PURE__ */
|
|
31753
|
+
approvalIndex < 0 && approval && /* @__PURE__ */ jsx118(MessageBubble, { mode, children: approval }),
|
|
31463
31754
|
showLoadingDots && (() => {
|
|
31464
31755
|
const lastMessage = messages[messages.length - 1];
|
|
31465
31756
|
const lastMessageType = lastMessage ? String(lastMessage.type) : "";
|
|
@@ -31482,13 +31773,13 @@ function MessageList({
|
|
|
31482
31773
|
isLoading,
|
|
31483
31774
|
{ now: streamingNow }
|
|
31484
31775
|
);
|
|
31485
|
-
return /* @__PURE__ */
|
|
31776
|
+
return /* @__PURE__ */ jsx118("div", { className: "flex justify-start gap-3 -ml-2", children: /* @__PURE__ */ jsx118(
|
|
31486
31777
|
MessageBubble,
|
|
31487
31778
|
{
|
|
31488
31779
|
mode,
|
|
31489
31780
|
kind: "status",
|
|
31490
31781
|
className: "max-w-full py-2.5",
|
|
31491
|
-
children: /* @__PURE__ */
|
|
31782
|
+
children: /* @__PURE__ */ jsx118(
|
|
31492
31783
|
AssistantStreamingIndicator,
|
|
31493
31784
|
{
|
|
31494
31785
|
status: fallbackStreamingStatus ?? "loading"
|
|
@@ -31515,18 +31806,18 @@ import {
|
|
|
31515
31806
|
Sparkles as Sparkles3,
|
|
31516
31807
|
Zap
|
|
31517
31808
|
} from "lucide-react";
|
|
31518
|
-
import { jsx as
|
|
31809
|
+
import { jsx as jsx119, jsxs as jsxs93 } from "react/jsx-runtime";
|
|
31519
31810
|
function getIconComponent2(icon) {
|
|
31520
31811
|
const iconMap = {
|
|
31521
|
-
"circle-question": /* @__PURE__ */
|
|
31522
|
-
lightbulb: /* @__PURE__ */
|
|
31523
|
-
sparkle: /* @__PURE__ */
|
|
31524
|
-
write: /* @__PURE__ */
|
|
31525
|
-
search: /* @__PURE__ */
|
|
31526
|
-
globe: /* @__PURE__ */
|
|
31527
|
-
"book-open": /* @__PURE__ */
|
|
31528
|
-
compass: /* @__PURE__ */
|
|
31529
|
-
bolt: /* @__PURE__ */
|
|
31812
|
+
"circle-question": /* @__PURE__ */ jsx119(HelpCircle, { size: 20 }),
|
|
31813
|
+
lightbulb: /* @__PURE__ */ jsx119(Lightbulb2, { size: 20 }),
|
|
31814
|
+
sparkle: /* @__PURE__ */ jsx119(Sparkles3, { size: 20 }),
|
|
31815
|
+
write: /* @__PURE__ */ jsx119(Pencil8, { size: 20 }),
|
|
31816
|
+
search: /* @__PURE__ */ jsx119(Search4, { size: 20 }),
|
|
31817
|
+
globe: /* @__PURE__ */ jsx119(Globe2, { size: 20 }),
|
|
31818
|
+
"book-open": /* @__PURE__ */ jsx119(BookOpen4, { size: 20 }),
|
|
31819
|
+
compass: /* @__PURE__ */ jsx119(Compass, { size: 20 }),
|
|
31820
|
+
bolt: /* @__PURE__ */ jsx119(Zap, { size: 20 })
|
|
31530
31821
|
};
|
|
31531
31822
|
return icon ? iconMap[icon] || iconMap["sparkle"] : iconMap["sparkle"];
|
|
31532
31823
|
}
|
|
@@ -31543,7 +31834,7 @@ function StartScreen({
|
|
|
31543
31834
|
const prompts = startScreen?.prompts ?? [];
|
|
31544
31835
|
const hasPrompts = startScreen?.promptsLayout !== "list" && prompts.length > 0;
|
|
31545
31836
|
const editPromptLabel = t("startScreen.editPrompt");
|
|
31546
|
-
return /* @__PURE__ */
|
|
31837
|
+
return /* @__PURE__ */ jsxs93(
|
|
31547
31838
|
"div",
|
|
31548
31839
|
{
|
|
31549
31840
|
className: cn(
|
|
@@ -31551,8 +31842,8 @@ function StartScreen({
|
|
|
31551
31842
|
className
|
|
31552
31843
|
),
|
|
31553
31844
|
children: [
|
|
31554
|
-
/* @__PURE__ */
|
|
31555
|
-
hasPrompts && /* @__PURE__ */
|
|
31845
|
+
/* @__PURE__ */ jsx119("div", { className: cn("mb-4 text-center", hasPrompts && "mb-10"), children: /* @__PURE__ */ jsx119("h2", { className: "mb-4 text-4xl font-semibold text-foreground", children: greeting }) }),
|
|
31846
|
+
hasPrompts && /* @__PURE__ */ jsx119("div", { className: "w-full max-w-2xl", children: /* @__PURE__ */ jsx119("div", { className: "grid grid-cols-1 sm:grid-cols-2 gap-3", children: prompts.map((item, index) => /* @__PURE__ */ jsxs93(
|
|
31556
31847
|
"div",
|
|
31557
31848
|
{
|
|
31558
31849
|
className: cn(
|
|
@@ -31561,7 +31852,7 @@ function StartScreen({
|
|
|
31561
31852
|
"focus-within:ring-2 focus-within:ring-primary/20"
|
|
31562
31853
|
),
|
|
31563
31854
|
children: [
|
|
31564
|
-
/* @__PURE__ */
|
|
31855
|
+
/* @__PURE__ */ jsxs93(
|
|
31565
31856
|
"button",
|
|
31566
31857
|
{
|
|
31567
31858
|
type: "button",
|
|
@@ -31572,8 +31863,8 @@ function StartScreen({
|
|
|
31572
31863
|
"focus:outline-none disabled:cursor-not-allowed disabled:opacity-50"
|
|
31573
31864
|
),
|
|
31574
31865
|
children: [
|
|
31575
|
-
/* @__PURE__ */
|
|
31576
|
-
/* @__PURE__ */
|
|
31866
|
+
/* @__PURE__ */ jsx119("span", { className: "flex h-10 w-10 shrink-0 items-center justify-center rounded-lg bg-primary/10 text-primary", children: getIconComponent2(item.icon) }),
|
|
31867
|
+
/* @__PURE__ */ jsx119(
|
|
31577
31868
|
"div",
|
|
31578
31869
|
{
|
|
31579
31870
|
className: "text-sm font-medium text-foreground line-clamp-3 overflow-hidden",
|
|
@@ -31584,7 +31875,7 @@ function StartScreen({
|
|
|
31584
31875
|
]
|
|
31585
31876
|
}
|
|
31586
31877
|
),
|
|
31587
|
-
/* @__PURE__ */
|
|
31878
|
+
/* @__PURE__ */ jsx119(
|
|
31588
31879
|
"button",
|
|
31589
31880
|
{
|
|
31590
31881
|
type: "button",
|
|
@@ -31597,7 +31888,7 @@ function StartScreen({
|
|
|
31597
31888
|
"rounded-r-xl transition-colors hover:bg-muted hover:text-foreground",
|
|
31598
31889
|
"focus:outline-none disabled:cursor-not-allowed disabled:opacity-50"
|
|
31599
31890
|
),
|
|
31600
|
-
children: /* @__PURE__ */
|
|
31891
|
+
children: /* @__PURE__ */ jsx119(Pencil8, { size: 16 })
|
|
31601
31892
|
}
|
|
31602
31893
|
)
|
|
31603
31894
|
]
|
|
@@ -31610,7 +31901,7 @@ function StartScreen({
|
|
|
31610
31901
|
}
|
|
31611
31902
|
|
|
31612
31903
|
// src/components/chat/messages/ChatTranscript.tsx
|
|
31613
|
-
import { jsx as
|
|
31904
|
+
import { jsx as jsx120, jsxs as jsxs94 } from "react/jsx-runtime";
|
|
31614
31905
|
function ChatTranscript({
|
|
31615
31906
|
isInitialComposer,
|
|
31616
31907
|
chatColumnStyle,
|
|
@@ -31657,7 +31948,7 @@ function ChatTranscript({
|
|
|
31657
31948
|
const needsUserInput = Boolean(
|
|
31658
31949
|
stream.pendingHITLRequest || stream.pendingRequestUserInput
|
|
31659
31950
|
);
|
|
31660
|
-
return /* @__PURE__ */
|
|
31951
|
+
return /* @__PURE__ */ jsxs94(
|
|
31661
31952
|
"div",
|
|
31662
31953
|
{
|
|
31663
31954
|
"data-slot": "chatkit-chat-content",
|
|
@@ -31667,23 +31958,23 @@ function ChatTranscript({
|
|
|
31667
31958
|
),
|
|
31668
31959
|
style: chatColumnStyle,
|
|
31669
31960
|
children: [
|
|
31670
|
-
errorMessage && /* @__PURE__ */
|
|
31671
|
-
historyError && /* @__PURE__ */
|
|
31672
|
-
conversationBranch.error && /* @__PURE__ */
|
|
31961
|
+
errorMessage && /* @__PURE__ */ jsx120("div", { className: "mb-4 rounded-lg border border-destructive/30 bg-destructive/10 px-3 py-2 text-sm text-destructive", children: errorMessage }),
|
|
31962
|
+
historyError && /* @__PURE__ */ jsx120("div", { className: "mb-4 rounded-lg border border-amber-200 bg-amber-50 px-3 py-2 text-sm text-amber-900", children: historyError }),
|
|
31963
|
+
conversationBranch.error && /* @__PURE__ */ jsxs94(
|
|
31673
31964
|
"div",
|
|
31674
31965
|
{
|
|
31675
31966
|
role: "alert",
|
|
31676
31967
|
className: "mb-4 rounded-lg border border-destructive/30 bg-destructive/10 px-3 py-2 text-sm text-destructive",
|
|
31677
31968
|
children: [
|
|
31678
31969
|
t("messageActions.branchFailed"),
|
|
31679
|
-
/* @__PURE__ */
|
|
31970
|
+
/* @__PURE__ */ jsx120("p", { className: "mt-1 text-xs", children: /^(?:failed to fetch|network\s*(?:request\s*)?(?:failed|error)|load failed)$/i.test(
|
|
31680
31971
|
conversationBranch.error
|
|
31681
31972
|
) ? t("messageActions.branchNetworkError") : conversationBranch.error })
|
|
31682
31973
|
]
|
|
31683
31974
|
}
|
|
31684
31975
|
),
|
|
31685
|
-
showMissingConfig && /* @__PURE__ */
|
|
31686
|
-
/* @__PURE__ */
|
|
31976
|
+
showMissingConfig && /* @__PURE__ */ jsx120("div", { className: "mb-4 rounded-lg border border-amber-200 bg-amber-50 px-3 py-2 text-sm text-amber-900", children: missingConfigDetailMessage }),
|
|
31977
|
+
/* @__PURE__ */ jsx120(
|
|
31687
31978
|
ThreadHistoryStatus,
|
|
31688
31979
|
{
|
|
31689
31980
|
state: stream.historyLoad,
|
|
@@ -31693,7 +31984,7 @@ function ChatTranscript({
|
|
|
31693
31984
|
}
|
|
31694
31985
|
}
|
|
31695
31986
|
),
|
|
31696
|
-
!stream.threadId && messages.length === 0 && !canLoadMoreMessages ? /* @__PURE__ */
|
|
31987
|
+
!stream.threadId && messages.length === 0 && !canLoadMoreMessages ? /* @__PURE__ */ jsx120(
|
|
31697
31988
|
StartScreen,
|
|
31698
31989
|
{
|
|
31699
31990
|
startScreen,
|
|
@@ -31703,7 +31994,7 @@ function ChatTranscript({
|
|
|
31703
31994
|
promptEditDisabled: isPromptEditDisabled,
|
|
31704
31995
|
className: "px-4 pb-4 pt-2"
|
|
31705
31996
|
}
|
|
31706
|
-
) : /* @__PURE__ */
|
|
31997
|
+
) : /* @__PURE__ */ jsx120(
|
|
31707
31998
|
MessageList,
|
|
31708
31999
|
{
|
|
31709
32000
|
approval: inlineApproval.card,
|
|
@@ -31750,14 +32041,14 @@ function ChatTranscript({
|
|
|
31750
32041
|
onMessageAnchor: setMessageNavigationAnchor
|
|
31751
32042
|
}
|
|
31752
32043
|
),
|
|
31753
|
-
needsUserInput && !stream.isDisplayPaused && /* @__PURE__ */
|
|
32044
|
+
needsUserInput && !stream.isDisplayPaused && /* @__PURE__ */ jsx120("p", { role: "status", className: "mt-3 text-sm text-muted-foreground", children: t("thread.waitingForInput") })
|
|
31754
32045
|
]
|
|
31755
32046
|
}
|
|
31756
32047
|
);
|
|
31757
32048
|
}
|
|
31758
32049
|
|
|
31759
32050
|
// src/components/chat/messages/useChatQuotes.ts
|
|
31760
|
-
import * as
|
|
32051
|
+
import * as React111 from "react";
|
|
31761
32052
|
|
|
31762
32053
|
// src/components/chat/messages/quote-selection.ts
|
|
31763
32054
|
function getClosestQuoteContainer(node) {
|
|
@@ -31778,13 +32069,13 @@ function useChatQuotes({
|
|
|
31778
32069
|
composerInputRef,
|
|
31779
32070
|
workbench
|
|
31780
32071
|
}) {
|
|
31781
|
-
const [quoteSelection, setQuoteSelection] =
|
|
31782
|
-
const [isOpeningSideChat, setIsOpeningSideChat] =
|
|
31783
|
-
const [sideChatError, setSideChatError] =
|
|
31784
|
-
const clearQuoteSelection =
|
|
32072
|
+
const [quoteSelection, setQuoteSelection] = React111.useState(null);
|
|
32073
|
+
const [isOpeningSideChat, setIsOpeningSideChat] = React111.useState(false);
|
|
32074
|
+
const [sideChatError, setSideChatError] = React111.useState(null);
|
|
32075
|
+
const clearQuoteSelection = React111.useCallback(() => {
|
|
31785
32076
|
setQuoteSelection(null);
|
|
31786
32077
|
}, []);
|
|
31787
|
-
const syncQuoteSelection =
|
|
32078
|
+
const syncQuoteSelection = React111.useCallback(() => {
|
|
31788
32079
|
if (surface !== "main") {
|
|
31789
32080
|
clearQuoteSelection();
|
|
31790
32081
|
return;
|
|
@@ -31833,13 +32124,13 @@ function useChatQuotes({
|
|
|
31833
32124
|
left
|
|
31834
32125
|
});
|
|
31835
32126
|
}, [clearQuoteSelection, surface]);
|
|
31836
|
-
|
|
32127
|
+
React111.useEffect(() => {
|
|
31837
32128
|
document.addEventListener("selectionchange", syncQuoteSelection);
|
|
31838
32129
|
return () => {
|
|
31839
32130
|
document.removeEventListener("selectionchange", syncQuoteSelection);
|
|
31840
32131
|
};
|
|
31841
32132
|
}, [syncQuoteSelection]);
|
|
31842
|
-
|
|
32133
|
+
React111.useEffect(() => {
|
|
31843
32134
|
const viewport = viewportRef.current;
|
|
31844
32135
|
if (!viewport) {
|
|
31845
32136
|
return;
|
|
@@ -31856,10 +32147,10 @@ function useChatQuotes({
|
|
|
31856
32147
|
window.removeEventListener("resize", handleViewportScroll);
|
|
31857
32148
|
};
|
|
31858
32149
|
}, [clearQuoteSelection]);
|
|
31859
|
-
|
|
32150
|
+
React111.useEffect(() => {
|
|
31860
32151
|
clearQuoteSelection();
|
|
31861
32152
|
}, [messages.length, stream.threadId, clearQuoteSelection]);
|
|
31862
|
-
const handleQuoteSelection =
|
|
32153
|
+
const handleQuoteSelection = React111.useCallback(() => {
|
|
31863
32154
|
if (!quoteSelection) {
|
|
31864
32155
|
return;
|
|
31865
32156
|
}
|
|
@@ -31872,7 +32163,7 @@ function useChatQuotes({
|
|
|
31872
32163
|
}
|
|
31873
32164
|
composerInputRef.current?.focus();
|
|
31874
32165
|
}, [clearQuoteSelection, quoteSelection]);
|
|
31875
|
-
const handleAskInSideChat =
|
|
32166
|
+
const handleAskInSideChat = React111.useCallback(async () => {
|
|
31876
32167
|
if (!quoteSelection || !workbench.sideChatEnabled || !stream.threadId || stream.isLoading)
|
|
31877
32168
|
return;
|
|
31878
32169
|
setIsOpeningSideChat(true);
|
|
@@ -31904,7 +32195,7 @@ function useChatQuotes({
|
|
|
31904
32195
|
}
|
|
31905
32196
|
|
|
31906
32197
|
// src/components/chat/messages/useChatStreamingFeedback.ts
|
|
31907
|
-
import * as
|
|
32198
|
+
import * as React112 from "react";
|
|
31908
32199
|
function useChatStreamingFeedback({
|
|
31909
32200
|
surface,
|
|
31910
32201
|
setStream,
|
|
@@ -31912,14 +32203,14 @@ function useChatStreamingFeedback({
|
|
|
31912
32203
|
}) {
|
|
31913
32204
|
const LOADING_DOTS_MIN_DURATION = 800;
|
|
31914
32205
|
const STREAMING_STATUS_REFRESH_MS = 250;
|
|
31915
|
-
const [showLoadingDots, setShowLoadingDots] =
|
|
31916
|
-
const [streamingNow, setStreamingNow] =
|
|
31917
|
-
const loadingStartTimeRef =
|
|
31918
|
-
const lastStreamOutputAtRef =
|
|
31919
|
-
|
|
32206
|
+
const [showLoadingDots, setShowLoadingDots] = React112.useState(false);
|
|
32207
|
+
const [streamingNow, setStreamingNow] = React112.useState(() => Date.now());
|
|
32208
|
+
const loadingStartTimeRef = React112.useRef(null);
|
|
32209
|
+
const lastStreamOutputAtRef = React112.useRef(null);
|
|
32210
|
+
React112.useEffect(() => {
|
|
31920
32211
|
if (surface === "main") setStream(stream);
|
|
31921
32212
|
}, [setStream, stream, surface]);
|
|
31922
|
-
|
|
32213
|
+
React112.useEffect(() => {
|
|
31923
32214
|
if (stream.isLoading) {
|
|
31924
32215
|
if (!loadingStartTimeRef.current) {
|
|
31925
32216
|
loadingStartTimeRef.current = Date.now();
|
|
@@ -31942,7 +32233,7 @@ function useChatStreamingFeedback({
|
|
|
31942
32233
|
}
|
|
31943
32234
|
}
|
|
31944
32235
|
}, [stream.isLoading]);
|
|
31945
|
-
|
|
32236
|
+
React112.useEffect(() => {
|
|
31946
32237
|
if (!stream.isLoading) {
|
|
31947
32238
|
lastStreamOutputAtRef.current = null;
|
|
31948
32239
|
setStreamingNow(Date.now());
|
|
@@ -31952,7 +32243,7 @@ function useChatStreamingFeedback({
|
|
|
31952
32243
|
lastStreamOutputAtRef.current = now;
|
|
31953
32244
|
setStreamingNow(now);
|
|
31954
32245
|
}, [stream.messages, stream.isLoading]);
|
|
31955
|
-
|
|
32246
|
+
React112.useEffect(() => {
|
|
31956
32247
|
if (!stream.isLoading) {
|
|
31957
32248
|
return;
|
|
31958
32249
|
}
|
|
@@ -31965,7 +32256,7 @@ function useChatStreamingFeedback({
|
|
|
31965
32256
|
}
|
|
31966
32257
|
|
|
31967
32258
|
// src/components/chat/messages/useChatViewport.ts
|
|
31968
|
-
import * as
|
|
32259
|
+
import * as React113 from "react";
|
|
31969
32260
|
function useChatViewport({
|
|
31970
32261
|
t,
|
|
31971
32262
|
assistantTitle,
|
|
@@ -31978,20 +32269,20 @@ function useChatViewport({
|
|
|
31978
32269
|
clearQuoteSelection,
|
|
31979
32270
|
setHistoryError
|
|
31980
32271
|
}) {
|
|
31981
|
-
const [isAtBottom, setIsAtBottom] =
|
|
31982
|
-
const [hasUpdatesBelow, setHasUpdatesBelow] =
|
|
31983
|
-
const messageNavigationAnchorsRef =
|
|
32272
|
+
const [isAtBottom, setIsAtBottom] = React113.useState(true);
|
|
32273
|
+
const [hasUpdatesBelow, setHasUpdatesBelow] = React113.useState(false);
|
|
32274
|
+
const messageNavigationAnchorsRef = React113.useRef(
|
|
31984
32275
|
/* @__PURE__ */ new Map()
|
|
31985
32276
|
);
|
|
31986
|
-
const shouldAutoScrollRef =
|
|
31987
|
-
const forceFollowRef =
|
|
31988
|
-
const previousMessageCountRef =
|
|
31989
|
-
const previousScrollTopRef =
|
|
31990
|
-
const isPrependingHistoryMessagesRef =
|
|
31991
|
-
const autoScrollFrameRef =
|
|
31992
|
-
const isPointerDownRef =
|
|
31993
|
-
const lastTouchYRef =
|
|
31994
|
-
const messageNavigationLabels =
|
|
32277
|
+
const shouldAutoScrollRef = React113.useRef(true);
|
|
32278
|
+
const forceFollowRef = React113.useRef(false);
|
|
32279
|
+
const previousMessageCountRef = React113.useRef(0);
|
|
32280
|
+
const previousScrollTopRef = React113.useRef(0);
|
|
32281
|
+
const isPrependingHistoryMessagesRef = React113.useRef(false);
|
|
32282
|
+
const autoScrollFrameRef = React113.useRef(null);
|
|
32283
|
+
const isPointerDownRef = React113.useRef(false);
|
|
32284
|
+
const lastTouchYRef = React113.useRef(null);
|
|
32285
|
+
const messageNavigationLabels = React113.useMemo(
|
|
31995
32286
|
() => ({
|
|
31996
32287
|
user: t("chat.youLabel"),
|
|
31997
32288
|
assistant: assistantTitle,
|
|
@@ -32011,7 +32302,7 @@ function useChatViewport({
|
|
|
32011
32302
|
[assistantTitle, t]
|
|
32012
32303
|
);
|
|
32013
32304
|
const presentationMode = resolveMessagePresentation(messagePresentation).mode;
|
|
32014
|
-
const messageNavigationItems =
|
|
32305
|
+
const messageNavigationItems = React113.useMemo(
|
|
32015
32306
|
() => messageNavigationEnabled ? buildMessageNavigationItems(
|
|
32016
32307
|
messages,
|
|
32017
32308
|
{
|
|
@@ -32036,23 +32327,23 @@ function useChatViewport({
|
|
|
32036
32327
|
historyMessagePagination?.isLoadingMore
|
|
32037
32328
|
);
|
|
32038
32329
|
const canLoadMoreMessages = Boolean(historyMessagePagination?.hasMore);
|
|
32039
|
-
const cancelPendingAutoScroll =
|
|
32330
|
+
const cancelPendingAutoScroll = React113.useCallback(() => {
|
|
32040
32331
|
if (autoScrollFrameRef.current !== null) {
|
|
32041
32332
|
cancelAnimationFrame(autoScrollFrameRef.current);
|
|
32042
32333
|
autoScrollFrameRef.current = null;
|
|
32043
32334
|
}
|
|
32044
32335
|
}, []);
|
|
32045
|
-
const disableAutoFollow =
|
|
32336
|
+
const disableAutoFollow = React113.useCallback(() => {
|
|
32046
32337
|
forceFollowRef.current = false;
|
|
32047
32338
|
shouldAutoScrollRef.current = false;
|
|
32048
32339
|
cancelPendingAutoScroll();
|
|
32049
32340
|
}, [cancelPendingAutoScroll]);
|
|
32050
|
-
const enableAutoFollow =
|
|
32341
|
+
const enableAutoFollow = React113.useCallback(() => {
|
|
32051
32342
|
forceFollowRef.current = true;
|
|
32052
32343
|
shouldAutoScrollRef.current = true;
|
|
32053
32344
|
setHasUpdatesBelow(false);
|
|
32054
32345
|
}, []);
|
|
32055
|
-
const scrollToBottom =
|
|
32346
|
+
const scrollToBottom = React113.useCallback(
|
|
32056
32347
|
(smooth = false, force = false) => {
|
|
32057
32348
|
if (force) {
|
|
32058
32349
|
enableAutoFollow();
|
|
@@ -32079,7 +32370,7 @@ function useChatViewport({
|
|
|
32079
32370
|
},
|
|
32080
32371
|
[cancelPendingAutoScroll, enableAutoFollow]
|
|
32081
32372
|
);
|
|
32082
|
-
const setMessageNavigationAnchor =
|
|
32373
|
+
const setMessageNavigationAnchor = React113.useCallback(
|
|
32083
32374
|
(id, node) => {
|
|
32084
32375
|
if (node) {
|
|
32085
32376
|
messageNavigationAnchorsRef.current.set(id, node);
|
|
@@ -32089,15 +32380,15 @@ function useChatViewport({
|
|
|
32089
32380
|
},
|
|
32090
32381
|
[]
|
|
32091
32382
|
);
|
|
32092
|
-
const getMessageNavigationAnchor =
|
|
32383
|
+
const getMessageNavigationAnchor = React113.useCallback(
|
|
32093
32384
|
(item) => messageNavigationAnchorsRef.current.get(item.id) ?? null,
|
|
32094
32385
|
[]
|
|
32095
32386
|
);
|
|
32096
|
-
const handleMessageNavigationNavigate =
|
|
32387
|
+
const handleMessageNavigationNavigate = React113.useCallback(() => {
|
|
32097
32388
|
disableAutoFollow();
|
|
32098
32389
|
clearQuoteSelection();
|
|
32099
32390
|
}, [clearQuoteSelection, disableAutoFollow]);
|
|
32100
|
-
|
|
32391
|
+
React113.useEffect(() => {
|
|
32101
32392
|
const viewport = viewportRef.current;
|
|
32102
32393
|
if (!viewport) return;
|
|
32103
32394
|
previousScrollTopRef.current = viewport.scrollTop;
|
|
@@ -32178,14 +32469,14 @@ function useChatViewport({
|
|
|
32178
32469
|
window.removeEventListener("pointercancel", stopPointerTracking);
|
|
32179
32470
|
};
|
|
32180
32471
|
}, [cancelPendingAutoScroll, disableAutoFollow]);
|
|
32181
|
-
|
|
32472
|
+
React113.useEffect(() => {
|
|
32182
32473
|
shouldAutoScrollRef.current = true;
|
|
32183
32474
|
forceFollowRef.current = false;
|
|
32184
32475
|
previousScrollTopRef.current = 0;
|
|
32185
32476
|
setIsAtBottom(true);
|
|
32186
32477
|
setHasUpdatesBelow(false);
|
|
32187
32478
|
}, [stream.threadId]);
|
|
32188
|
-
|
|
32479
|
+
React113.useEffect(() => {
|
|
32189
32480
|
const messageCountChanged = messages.length !== previousMessageCountRef.current;
|
|
32190
32481
|
previousMessageCountRef.current = messages.length;
|
|
32191
32482
|
if (isPrependingHistoryMessagesRef.current) {
|
|
@@ -32202,7 +32493,7 @@ function useChatViewport({
|
|
|
32202
32493
|
scrollToBottom();
|
|
32203
32494
|
}
|
|
32204
32495
|
}, [stream.isLoading, messages, scrollToBottom]);
|
|
32205
|
-
const handleLoadMoreMessages =
|
|
32496
|
+
const handleLoadMoreMessages = React113.useCallback(async () => {
|
|
32206
32497
|
if (!canLoadMoreMessages || isLoadingMoreMessages) {
|
|
32207
32498
|
return;
|
|
32208
32499
|
}
|
|
@@ -32254,7 +32545,7 @@ function useChatViewport({
|
|
|
32254
32545
|
}
|
|
32255
32546
|
|
|
32256
32547
|
// src/components/chat/models/useChatModels.ts
|
|
32257
|
-
import * as
|
|
32548
|
+
import * as React114 from "react";
|
|
32258
32549
|
|
|
32259
32550
|
// src/components/chat/session/errors.ts
|
|
32260
32551
|
function toError(value) {
|
|
@@ -32277,7 +32568,7 @@ function useChatModels({
|
|
|
32277
32568
|
availableModels,
|
|
32278
32569
|
hostedModelCatalog
|
|
32279
32570
|
}) {
|
|
32280
|
-
|
|
32571
|
+
React114.useEffect(() => {
|
|
32281
32572
|
if (modelAssistantIdRef.current !== modelAssistantId) {
|
|
32282
32573
|
modelAssistantIdRef.current = modelAssistantId;
|
|
32283
32574
|
requestedModelIdRef.current = void 0;
|
|
@@ -32326,7 +32617,7 @@ function useChatModels({
|
|
|
32326
32617
|
sendParentEvent,
|
|
32327
32618
|
setSelectedModelId
|
|
32328
32619
|
]);
|
|
32329
|
-
const handleModelSelect =
|
|
32620
|
+
const handleModelSelect = React114.useCallback(
|
|
32330
32621
|
(modelId) => {
|
|
32331
32622
|
const nextModelId = resolveSelectedModelId(availableModels, modelId);
|
|
32332
32623
|
if (!nextModelId) return;
|
|
@@ -32355,22 +32646,22 @@ function useChatModels({
|
|
|
32355
32646
|
}
|
|
32356
32647
|
|
|
32357
32648
|
// src/components/chat/models/useChatModelState.ts
|
|
32358
|
-
import * as
|
|
32649
|
+
import * as React115 from "react";
|
|
32359
32650
|
function useChatModelState({ stream }) {
|
|
32360
|
-
const [availableModels, setAvailableModels] =
|
|
32651
|
+
const [availableModels, setAvailableModels] = React115.useState(
|
|
32361
32652
|
[]
|
|
32362
32653
|
);
|
|
32363
|
-
const [hostedModelCatalog, setHostedModelCatalog] =
|
|
32654
|
+
const [hostedModelCatalog, setHostedModelCatalog] = React115.useState(null);
|
|
32364
32655
|
const modelAssistantId = stream.assistantId;
|
|
32365
32656
|
const modelClient = stream.client;
|
|
32366
32657
|
const selectedModelId = stream.selectedModelId;
|
|
32367
32658
|
const setSelectedModelId = stream.setSelectedModelId;
|
|
32368
|
-
const selectedModelIdRef =
|
|
32659
|
+
const selectedModelIdRef = React115.useRef(selectedModelId);
|
|
32369
32660
|
selectedModelIdRef.current = selectedModelId;
|
|
32370
|
-
const requestedModelIdRef =
|
|
32661
|
+
const requestedModelIdRef = React115.useRef(
|
|
32371
32662
|
void 0
|
|
32372
32663
|
);
|
|
32373
|
-
const modelAssistantIdRef =
|
|
32664
|
+
const modelAssistantIdRef = React115.useRef(modelAssistantId);
|
|
32374
32665
|
return {
|
|
32375
32666
|
requestedModelIdRef,
|
|
32376
32667
|
setSelectedModelId,
|
|
@@ -32386,24 +32677,24 @@ function useChatModelState({ stream }) {
|
|
|
32386
32677
|
}
|
|
32387
32678
|
|
|
32388
32679
|
// src/components/chat/pet/useChatPetSettings.ts
|
|
32389
|
-
import * as
|
|
32680
|
+
import * as React116 from "react";
|
|
32390
32681
|
function useChatPetSettings({ options }) {
|
|
32391
|
-
const [petSettingsOpen, setPetSettingsOpen] =
|
|
32392
|
-
const [petLocalSettings, setPetLocalSettings] =
|
|
32682
|
+
const [petSettingsOpen, setPetSettingsOpen] = React116.useState(false);
|
|
32683
|
+
const [petLocalSettings, setPetLocalSettings] = React116.useState(() => readPetLocalSettings());
|
|
32393
32684
|
const petRequired = options?.displayMode === "pet";
|
|
32394
32685
|
const petDisabled = options?.pet === false && !petRequired;
|
|
32395
|
-
const basePetSettings =
|
|
32686
|
+
const basePetSettings = React116.useMemo(
|
|
32396
32687
|
() => derivePetLocalSettings(options?.pet),
|
|
32397
32688
|
[options?.pet]
|
|
32398
32689
|
);
|
|
32399
|
-
const displayedPetSettings =
|
|
32690
|
+
const displayedPetSettings = React116.useMemo(
|
|
32400
32691
|
() => ({
|
|
32401
32692
|
...petLocalSettings ?? basePetSettings,
|
|
32402
32693
|
...petRequired ? { enabled: true } : {}
|
|
32403
32694
|
}),
|
|
32404
32695
|
[basePetSettings, petLocalSettings, petRequired]
|
|
32405
32696
|
);
|
|
32406
|
-
const effectivePet =
|
|
32697
|
+
const effectivePet = React116.useMemo(() => {
|
|
32407
32698
|
if (petDisabled) return false;
|
|
32408
32699
|
if (petRequired || petLocalSettings) {
|
|
32409
32700
|
return buildPetOptionsFromLocalSettings(displayedPetSettings);
|
|
@@ -32416,7 +32707,7 @@ function useChatPetSettings({ options }) {
|
|
|
32416
32707
|
petLocalSettings,
|
|
32417
32708
|
petRequired
|
|
32418
32709
|
]);
|
|
32419
|
-
const savePetLocalSettings =
|
|
32710
|
+
const savePetLocalSettings = React116.useCallback(
|
|
32420
32711
|
(settings) => {
|
|
32421
32712
|
if (petDisabled) return;
|
|
32422
32713
|
const nextSettings = petRequired ? { ...settings, enabled: true } : settings;
|
|
@@ -32425,7 +32716,7 @@ function useChatPetSettings({ options }) {
|
|
|
32425
32716
|
},
|
|
32426
32717
|
[petDisabled, petRequired]
|
|
32427
32718
|
);
|
|
32428
|
-
const handlePetCommand =
|
|
32719
|
+
const handlePetCommand = React116.useCallback(
|
|
32429
32720
|
(mode) => {
|
|
32430
32721
|
if (petDisabled) return;
|
|
32431
32722
|
if (mode === "settings") {
|
|
@@ -32453,7 +32744,7 @@ function useChatPetSettings({ options }) {
|
|
|
32453
32744
|
savePetLocalSettings
|
|
32454
32745
|
]
|
|
32455
32746
|
);
|
|
32456
|
-
const handleSetPetEnabled =
|
|
32747
|
+
const handleSetPetEnabled = React116.useCallback(
|
|
32457
32748
|
(enabled) => {
|
|
32458
32749
|
if (petRequired) return;
|
|
32459
32750
|
savePetLocalSettings({ ...displayedPetSettings, enabled });
|
|
@@ -32477,16 +32768,16 @@ function useChatPetSettings({ options }) {
|
|
|
32477
32768
|
import { useMemo as useMemo33 } from "react";
|
|
32478
32769
|
|
|
32479
32770
|
// src/hooks/useAssistantInfo.ts
|
|
32480
|
-
import { useContext as useContext13, useEffect as
|
|
32771
|
+
import { useContext as useContext13, useEffect as useEffect69, useState as useState72 } from "react";
|
|
32481
32772
|
function useAssistantInfo(client, assistantId) {
|
|
32482
32773
|
const messenger = useContext13(ParentMessengerContext);
|
|
32483
|
-
const [revision, setRevision] =
|
|
32774
|
+
const [revision, setRevision] = useState72(0);
|
|
32484
32775
|
const registerOnSetOptions = messenger?.registerOnSetOptions;
|
|
32485
|
-
|
|
32776
|
+
useEffect69(
|
|
32486
32777
|
() => registerOnSetOptions?.(() => setRevision((value) => value + 1)),
|
|
32487
32778
|
[registerOnSetOptions]
|
|
32488
32779
|
);
|
|
32489
|
-
|
|
32780
|
+
useEffect69(() => {
|
|
32490
32781
|
const refresh = () => {
|
|
32491
32782
|
if (document.visibilityState === "visible")
|
|
32492
32783
|
setRevision((value) => value + 1);
|
|
@@ -32500,8 +32791,8 @@ function useAssistantInfo(client, assistantId) {
|
|
|
32500
32791
|
window.clearInterval(timer);
|
|
32501
32792
|
};
|
|
32502
32793
|
}, []);
|
|
32503
|
-
const [profile, setProfile] =
|
|
32504
|
-
|
|
32794
|
+
const [profile, setProfile] = useState72(null);
|
|
32795
|
+
useEffect69(() => {
|
|
32505
32796
|
if (!client || !assistantId) {
|
|
32506
32797
|
setProfile(null);
|
|
32507
32798
|
return;
|
|
@@ -32570,16 +32861,16 @@ function useChatAssistant({
|
|
|
32570
32861
|
}
|
|
32571
32862
|
|
|
32572
32863
|
// src/components/chat/session/useChatBranchState.ts
|
|
32573
|
-
import * as
|
|
32864
|
+
import * as React117 from "react";
|
|
32574
32865
|
|
|
32575
32866
|
// src/hooks/useThreadBranches.ts
|
|
32576
|
-
import { useCallback as useCallback41, useEffect as
|
|
32867
|
+
import { useCallback as useCallback41, useEffect as useEffect70, useRef as useRef46, useState as useState73 } from "react";
|
|
32577
32868
|
function useThreadBranches(client, conversationId, threadId, enabled, isLoading) {
|
|
32578
|
-
const scope =
|
|
32869
|
+
const scope = useRef46(threadId);
|
|
32579
32870
|
scope.current = threadId;
|
|
32580
|
-
const [snapshot, setSnapshot] =
|
|
32581
|
-
const [error, setError] =
|
|
32582
|
-
const generation =
|
|
32871
|
+
const [snapshot, setSnapshot] = useState73(null);
|
|
32872
|
+
const [error, setError] = useState73(null);
|
|
32873
|
+
const generation = useRef46(0);
|
|
32583
32874
|
const refresh = useCallback41(async () => {
|
|
32584
32875
|
if (!threadId || !conversationId || !enabled) return;
|
|
32585
32876
|
const request = ++generation.current;
|
|
@@ -32600,13 +32891,28 @@ function useThreadBranches(client, conversationId, threadId, enabled, isLoading)
|
|
|
32600
32891
|
}, [client, conversationId, enabled, threadId]);
|
|
32601
32892
|
const branches = enabled && snapshot?.threadId === threadId ? snapshot.branches : [];
|
|
32602
32893
|
const current = branches.find((branch) => branch.thread_id === threadId);
|
|
32603
|
-
|
|
32894
|
+
useEffect70(() => {
|
|
32604
32895
|
setError(null);
|
|
32605
32896
|
void refresh();
|
|
32606
32897
|
return () => {
|
|
32607
32898
|
generation.current += 1;
|
|
32608
32899
|
};
|
|
32609
32900
|
}, [refresh, isLoading]);
|
|
32901
|
+
useEffect70(() => {
|
|
32902
|
+
if (!enabled || !threadId || !["busy", "pausing"].includes(current?.status ?? ""))
|
|
32903
|
+
return;
|
|
32904
|
+
let disposed = false;
|
|
32905
|
+
let timer;
|
|
32906
|
+
const poll = async () => {
|
|
32907
|
+
await refresh();
|
|
32908
|
+
if (!disposed) timer = setTimeout(poll, 1e3);
|
|
32909
|
+
};
|
|
32910
|
+
timer = setTimeout(poll, 1e3);
|
|
32911
|
+
return () => {
|
|
32912
|
+
disposed = true;
|
|
32913
|
+
clearTimeout(timer);
|
|
32914
|
+
};
|
|
32915
|
+
}, [enabled, threadId, current?.status, refresh]);
|
|
32610
32916
|
return { branches, current, error, refresh };
|
|
32611
32917
|
}
|
|
32612
32918
|
|
|
@@ -32619,14 +32925,14 @@ function useChatBranchState({ stream }) {
|
|
|
32619
32925
|
Boolean(stream.isReady && stream.client?.conversations?.listThreads),
|
|
32620
32926
|
stream.isLoading
|
|
32621
32927
|
);
|
|
32622
|
-
const [editingMessageId, setEditingMessageId] =
|
|
32928
|
+
const [editingMessageId, setEditingMessageId] = React117.useState(
|
|
32623
32929
|
null
|
|
32624
32930
|
);
|
|
32625
|
-
const editRequestRef =
|
|
32626
|
-
const [isChangingBranch, setIsChangingBranch] =
|
|
32627
|
-
const activeBranchRef =
|
|
32931
|
+
const editRequestRef = React117.useRef(null);
|
|
32932
|
+
const [isChangingBranch, setIsChangingBranch] = React117.useState(false);
|
|
32933
|
+
const activeBranchRef = React117.useRef(stream.threadId);
|
|
32628
32934
|
activeBranchRef.current = stream.threadId;
|
|
32629
|
-
|
|
32935
|
+
React117.useEffect(() => {
|
|
32630
32936
|
setEditingMessageId(null);
|
|
32631
32937
|
editRequestRef.current = null;
|
|
32632
32938
|
}, [stream.threadId]);
|
|
@@ -32642,10 +32948,10 @@ function useChatBranchState({ stream }) {
|
|
|
32642
32948
|
}
|
|
32643
32949
|
|
|
32644
32950
|
// src/components/chat/session/useChatConversationActions.ts
|
|
32645
|
-
import * as
|
|
32951
|
+
import * as React118 from "react";
|
|
32646
32952
|
|
|
32647
32953
|
// src/hooks/useConversationBranch.ts
|
|
32648
|
-
import { useEffect as
|
|
32954
|
+
import { useEffect as useEffect72, useRef as useRef48, useState as useState75 } from "react";
|
|
32649
32955
|
function useConversationBranch({
|
|
32650
32956
|
client,
|
|
32651
32957
|
conversationId,
|
|
@@ -32654,10 +32960,10 @@ function useConversationBranch({
|
|
|
32654
32960
|
onReady,
|
|
32655
32961
|
refresh
|
|
32656
32962
|
}) {
|
|
32657
|
-
const request =
|
|
32658
|
-
const inFlight =
|
|
32659
|
-
const mounted =
|
|
32660
|
-
const selection =
|
|
32963
|
+
const request = useRef48(null);
|
|
32964
|
+
const inFlight = useRef48(null);
|
|
32965
|
+
const mounted = useRef48(true);
|
|
32966
|
+
const selection = useRef48({ threadId, epoch: 0 });
|
|
32661
32967
|
if (selection.current.threadId !== threadId) {
|
|
32662
32968
|
selection.current = { threadId, epoch: selection.current.epoch + 1 };
|
|
32663
32969
|
if (request.current?.expectedThreadId === threadId) {
|
|
@@ -32665,9 +32971,9 @@ function useConversationBranch({
|
|
|
32665
32971
|
request.current.expectedThreadId = void 0;
|
|
32666
32972
|
}
|
|
32667
32973
|
}
|
|
32668
|
-
const [pending, setPending] =
|
|
32669
|
-
const [error, setError] =
|
|
32670
|
-
|
|
32974
|
+
const [pending, setPending] = useState75(null);
|
|
32975
|
+
const [error, setError] = useState75(null);
|
|
32976
|
+
useEffect72(() => {
|
|
32671
32977
|
mounted.current = true;
|
|
32672
32978
|
return () => {
|
|
32673
32979
|
mounted.current = false;
|
|
@@ -32766,8 +33072,33 @@ function useChatConversationActions({
|
|
|
32766
33072
|
setIsChangingBranch,
|
|
32767
33073
|
options
|
|
32768
33074
|
}) {
|
|
32769
|
-
const
|
|
32770
|
-
|
|
33075
|
+
const previousProjectRef = React118.useRef(activeProjectId);
|
|
33076
|
+
React118.useLayoutEffect(() => {
|
|
33077
|
+
if (previousProjectRef.current === activeProjectId) return;
|
|
33078
|
+
previousProjectRef.current = activeProjectId;
|
|
33079
|
+
commitComposerParts(composerPartsRef.current.filter((part) => part.type === "text"), {
|
|
33080
|
+
resetDom: true,
|
|
33081
|
+
syncRemovedCapabilityTokens: false
|
|
33082
|
+
});
|
|
33083
|
+
attachmentsRef.current?.clear();
|
|
33084
|
+
setReferences([]);
|
|
33085
|
+
setReferencedWorkspaceFiles([]);
|
|
33086
|
+
setThreadMention(null);
|
|
33087
|
+
setSelectedTool(null);
|
|
33088
|
+
setEditingMessageId(null);
|
|
33089
|
+
editRequestRef.current = null;
|
|
33090
|
+
activeBranchRef.current = null;
|
|
33091
|
+
setIsChangingBranch(false);
|
|
33092
|
+
setHistoryError(null);
|
|
33093
|
+
setRuntimeCapabilityPalette(null);
|
|
33094
|
+
resetRunRuntimeCapabilities();
|
|
33095
|
+
}, [activeProjectId, commitComposerParts, resetRunRuntimeCapabilities]);
|
|
33096
|
+
const handleProjectSelectionChange = React118.useCallback(
|
|
33097
|
+
(projectId2, selection) => {
|
|
33098
|
+
if (stream.threadId || stream.conversationId) {
|
|
33099
|
+
onProjectChange?.(projectId2, selection);
|
|
33100
|
+
return;
|
|
33101
|
+
}
|
|
32771
33102
|
const textParts = composerPartsRef.current.filter(
|
|
32772
33103
|
(part) => part.type === "text"
|
|
32773
33104
|
);
|
|
@@ -32788,7 +33119,7 @@ function useChatConversationActions({
|
|
|
32788
33119
|
);
|
|
32789
33120
|
});
|
|
32790
33121
|
onConnectorsChange?.([]);
|
|
32791
|
-
onProjectChange?.(
|
|
33122
|
+
onProjectChange?.(projectId2, selection);
|
|
32792
33123
|
},
|
|
32793
33124
|
[
|
|
32794
33125
|
commitComposerParts,
|
|
@@ -32823,7 +33154,7 @@ function useChatConversationActions({
|
|
|
32823
33154
|
},
|
|
32824
33155
|
refresh: refreshThreads
|
|
32825
33156
|
});
|
|
32826
|
-
const handlePromptEdit =
|
|
33157
|
+
const handlePromptEdit = React118.useCallback(
|
|
32827
33158
|
(prompt) => {
|
|
32828
33159
|
if (isPromptEditDisabled) return;
|
|
32829
33160
|
setComposerText(prompt, prompt.length);
|
|
@@ -32837,7 +33168,7 @@ function useChatConversationActions({
|
|
|
32837
33168
|
setRuntimeCapabilityPalette
|
|
32838
33169
|
]
|
|
32839
33170
|
);
|
|
32840
|
-
const loadThreadHistory =
|
|
33171
|
+
const loadThreadHistory = React118.useCallback(
|
|
32841
33172
|
async (threadId) => {
|
|
32842
33173
|
if (missingConfig) {
|
|
32843
33174
|
setHistoryError(missingConfigShortMessage);
|
|
@@ -32984,7 +33315,7 @@ function useChatConversationActions({
|
|
|
32984
33315
|
}
|
|
32985
33316
|
|
|
32986
33317
|
// src/components/chat/session/useChatEnvironment.ts
|
|
32987
|
-
import * as
|
|
33318
|
+
import * as React119 from "react";
|
|
32988
33319
|
var defaultApiUrl2 = import.meta.env.VITE_XPERTAI_API_URL;
|
|
32989
33320
|
function useChatEnvironment({
|
|
32990
33321
|
options,
|
|
@@ -33011,7 +33342,7 @@ function useChatEnvironment({
|
|
|
33011
33342
|
clientSecret: effectiveClientSecret
|
|
33012
33343
|
});
|
|
33013
33344
|
const missingConfig = Boolean(missingConfigKind);
|
|
33014
|
-
const missingConfigShortMessage =
|
|
33345
|
+
const missingConfigShortMessage = React119.useMemo(() => {
|
|
33015
33346
|
switch (missingConfigKind) {
|
|
33016
33347
|
case "apiUrl":
|
|
33017
33348
|
return t("chat.missingApiUrlShort");
|
|
@@ -33023,7 +33354,7 @@ function useChatEnvironment({
|
|
|
33023
33354
|
return t("chat.missingConfigShort");
|
|
33024
33355
|
}
|
|
33025
33356
|
}, [missingConfigKind, t]);
|
|
33026
|
-
const missingConfigDetailMessage =
|
|
33357
|
+
const missingConfigDetailMessage = React119.useMemo(() => {
|
|
33027
33358
|
switch (missingConfigKind) {
|
|
33028
33359
|
case "apiUrl":
|
|
33029
33360
|
return t("chat.missingApiUrlDetail");
|
|
@@ -33037,7 +33368,7 @@ function useChatEnvironment({
|
|
|
33037
33368
|
}, [missingConfigKind, t]);
|
|
33038
33369
|
const isHistoryLoading = stream.historyLoad?.status === "loading";
|
|
33039
33370
|
const isHistoryUnavailable = isHistoryLoading || stream.historyLoad?.status === "error";
|
|
33040
|
-
const [historyError, setHistoryError] =
|
|
33371
|
+
const [historyError, setHistoryError] = React119.useState(null);
|
|
33041
33372
|
const showMissingConfig = !isClientSecretInitializing && missingConfig;
|
|
33042
33373
|
return {
|
|
33043
33374
|
stream,
|
|
@@ -33066,43 +33397,49 @@ function useChatEnvironment({
|
|
|
33066
33397
|
}
|
|
33067
33398
|
|
|
33068
33399
|
// src/components/chat/session/useChatRunControl.ts
|
|
33069
|
-
import * as
|
|
33400
|
+
import * as React120 from "react";
|
|
33070
33401
|
function useChatRunControl({
|
|
33071
33402
|
branchState,
|
|
33072
33403
|
stream,
|
|
33073
33404
|
isChangingBranch,
|
|
33074
33405
|
activeBranchRef
|
|
33075
33406
|
}) {
|
|
33076
|
-
const [runControlRequest, setRunControlRequest] =
|
|
33077
|
-
const runControlRequestRef =
|
|
33078
|
-
const [runControlError, setRunControlError] =
|
|
33407
|
+
const [runControlRequest, setRunControlRequest] = React120.useState(null);
|
|
33408
|
+
const runControlRequestRef = React120.useRef(null);
|
|
33409
|
+
const [runControlError, setRunControlError] = React120.useState(null);
|
|
33410
|
+
const errorGenerationRef = React120.useRef(0);
|
|
33411
|
+
const clearRunControlError = React120.useCallback(() => {
|
|
33412
|
+
errorGenerationRef.current += 1;
|
|
33413
|
+
setRunControlError(null);
|
|
33414
|
+
}, []);
|
|
33415
|
+
React120.useEffect(clearRunControlError, [stream.threadId, clearRunControlError]);
|
|
33079
33416
|
const currentRunControl = branchState.current?.runControl;
|
|
33080
|
-
const pauseRunId = stream.activeRunId ?? currentRunControl?.executionId ??
|
|
33417
|
+
const pauseRunId = stream.isLoading ? stream.activeRunId ?? currentRunControl?.executionId ?? null : currentRunControl?.executionId ?? stream.activeRunId ?? null;
|
|
33081
33418
|
const canPauseRun = Boolean(
|
|
33082
33419
|
stream.threadId && pauseRunId && !stream.isThreadInterrupted && (stream.isLoading || currentRunControl?.state === "running")
|
|
33083
33420
|
);
|
|
33084
33421
|
const isRunPausing = runControlRequest?.threadId === stream.threadId && runControlRequest.action === "pause" || branchState.current?.status === "pausing";
|
|
33085
33422
|
const isRunPaused = branchState.current?.status === "paused";
|
|
33086
|
-
const
|
|
33087
|
-
|
|
33423
|
+
const isPauseActive = isRunPausing || isRunPaused;
|
|
33424
|
+
const isStoppingRun = runControlRequest?.threadId === stream.threadId && runControlRequest.action === "stop";
|
|
33425
|
+
const canStopRun = Boolean(
|
|
33426
|
+
stream.threadId && pauseRunId && (stream.isLoading || ["busy", "pausing", "paused"].includes(
|
|
33427
|
+
branchState.current?.status ?? ""
|
|
33428
|
+
))
|
|
33088
33429
|
);
|
|
33089
|
-
const isPauseActive = isRunPausing || isRunPaused || stream.isDisplayPaused;
|
|
33090
33430
|
const isResumingRun = runControlRequest?.threadId === stream.threadId && runControlRequest.action === "resume";
|
|
33091
|
-
const isVisibleStreaming = stream.isLoading && !stream.
|
|
33431
|
+
const isVisibleStreaming = stream.isLoading && !stream.isThreadInterrupted;
|
|
33092
33432
|
const handleComposerRunControl = async (action) => {
|
|
33093
33433
|
const sourceThreadId = stream.threadId;
|
|
33094
|
-
if (isChangingBranch ||
|
|
33095
|
-
|
|
33096
|
-
|
|
33097
|
-
|
|
33098
|
-
|
|
33099
|
-
|
|
33100
|
-
|
|
33101
|
-
|
|
33102
|
-
if (!sourceThreadId) return;
|
|
33103
|
-
if (runControlRequestRef.current?.threadId === sourceThreadId) return;
|
|
33434
|
+
if (!sourceThreadId || !pauseRunId || isChangingBranch || isStoppingRun || isResumingRun)
|
|
33435
|
+
return;
|
|
33436
|
+
if (action === "resume" && (!isRunPaused || !currentRunControl?.pauseId))
|
|
33437
|
+
return;
|
|
33438
|
+
if (action === "pause" && (isRunPaused || isRunPausing)) return;
|
|
33439
|
+
if (action === "stop" && !canStopRun) return;
|
|
33440
|
+
if (action !== "stop" && runControlRequestRef.current?.threadId === sourceThreadId)
|
|
33441
|
+
return;
|
|
33104
33442
|
const runId = pauseRunId;
|
|
33105
|
-
if (!runId) return;
|
|
33106
33443
|
const request = {
|
|
33107
33444
|
action,
|
|
33108
33445
|
threadId: sourceThreadId,
|
|
@@ -33110,26 +33447,26 @@ function useChatRunControl({
|
|
|
33110
33447
|
};
|
|
33111
33448
|
runControlRequestRef.current = request;
|
|
33112
33449
|
setRunControlRequest(request);
|
|
33113
|
-
|
|
33450
|
+
clearRunControlError();
|
|
33451
|
+
const errorGeneration = errorGenerationRef.current;
|
|
33114
33452
|
try {
|
|
33115
|
-
if (action === "
|
|
33116
|
-
await stream.
|
|
33453
|
+
if (action === "stop") {
|
|
33454
|
+
await stream.stop(request.runId);
|
|
33117
33455
|
} else if (action === "resume" && currentRunControl?.pauseId) {
|
|
33118
33456
|
await stream.resumeRun(request.runId, currentRunControl.pauseId);
|
|
33119
33457
|
} else {
|
|
33120
33458
|
await stream.pauseRun(request.runId);
|
|
33121
33459
|
}
|
|
33122
|
-
if (activeBranchRef.current === sourceThreadId) {
|
|
33123
|
-
await branchState.refresh();
|
|
33124
|
-
}
|
|
33125
33460
|
} catch (error) {
|
|
33126
|
-
if (activeBranchRef.current === sourceThreadId && runControlRequestRef.current === request) {
|
|
33461
|
+
if (activeBranchRef.current === sourceThreadId && runControlRequestRef.current === request && errorGenerationRef.current === errorGeneration) {
|
|
33127
33462
|
setRunControlError({
|
|
33128
33463
|
threadId: sourceThreadId,
|
|
33129
33464
|
message: error instanceof Error ? error.message : String(error)
|
|
33130
33465
|
});
|
|
33131
33466
|
}
|
|
33132
33467
|
} finally {
|
|
33468
|
+
if (activeBranchRef.current === sourceThreadId)
|
|
33469
|
+
await branchState.refresh();
|
|
33133
33470
|
if (runControlRequestRef.current === request) {
|
|
33134
33471
|
runControlRequestRef.current = null;
|
|
33135
33472
|
setRunControlRequest(null);
|
|
@@ -33143,18 +33480,20 @@ function useChatRunControl({
|
|
|
33143
33480
|
isVisibleStreaming,
|
|
33144
33481
|
isPauseActive,
|
|
33145
33482
|
runControlError,
|
|
33483
|
+
clearRunControlError,
|
|
33146
33484
|
canPauseRun,
|
|
33147
33485
|
handleComposerRunControl,
|
|
33148
|
-
|
|
33486
|
+
canStopRun,
|
|
33487
|
+
isStoppingRun,
|
|
33149
33488
|
currentRunControl
|
|
33150
33489
|
};
|
|
33151
33490
|
}
|
|
33152
33491
|
|
|
33153
33492
|
// src/components/chat/summary/useChatTaskSummary.ts
|
|
33154
|
-
import * as
|
|
33493
|
+
import * as React122 from "react";
|
|
33155
33494
|
|
|
33156
33495
|
// src/hooks/useTaskSummary.ts
|
|
33157
|
-
import * as
|
|
33496
|
+
import * as React121 from "react";
|
|
33158
33497
|
function useTaskSummary({
|
|
33159
33498
|
enabled,
|
|
33160
33499
|
conversationId,
|
|
@@ -33162,23 +33501,23 @@ function useTaskSummary({
|
|
|
33162
33501
|
live,
|
|
33163
33502
|
refreshVersion = 0
|
|
33164
33503
|
}) {
|
|
33165
|
-
const [loaded, setLoaded] =
|
|
33166
|
-
const [historySections, setHistorySections] =
|
|
33167
|
-
const [historySectionsConversationId, setHistorySectionsConversationId] =
|
|
33168
|
-
const [loadingSections, setLoadingSections] =
|
|
33169
|
-
const [error, setError] =
|
|
33170
|
-
const [retryVersion, setRetryVersion] =
|
|
33171
|
-
const requestVersionRef =
|
|
33172
|
-
const conversationIdRef =
|
|
33173
|
-
const sectionControllersRef =
|
|
33504
|
+
const [loaded, setLoaded] = React121.useState(null);
|
|
33505
|
+
const [historySections, setHistorySections] = React121.useState({});
|
|
33506
|
+
const [historySectionsConversationId, setHistorySectionsConversationId] = React121.useState(null);
|
|
33507
|
+
const [loadingSections, setLoadingSections] = React121.useState({});
|
|
33508
|
+
const [error, setError] = React121.useState(null);
|
|
33509
|
+
const [retryVersion, setRetryVersion] = React121.useState(0);
|
|
33510
|
+
const requestVersionRef = React121.useRef(0);
|
|
33511
|
+
const conversationIdRef = React121.useRef(conversationId);
|
|
33512
|
+
const sectionControllersRef = React121.useRef(
|
|
33174
33513
|
/* @__PURE__ */ new Map()
|
|
33175
33514
|
);
|
|
33176
33515
|
conversationIdRef.current = conversationId;
|
|
33177
|
-
const abortSectionRequests =
|
|
33516
|
+
const abortSectionRequests = React121.useCallback(() => {
|
|
33178
33517
|
sectionControllersRef.current.forEach((controller) => controller.abort());
|
|
33179
33518
|
sectionControllersRef.current.clear();
|
|
33180
33519
|
}, []);
|
|
33181
|
-
|
|
33520
|
+
React121.useEffect(() => {
|
|
33182
33521
|
abortSectionRequests();
|
|
33183
33522
|
setHistorySections({});
|
|
33184
33523
|
setHistorySectionsConversationId(conversationId);
|
|
@@ -33213,11 +33552,11 @@ function useTaskSummary({
|
|
|
33213
33552
|
retryVersion
|
|
33214
33553
|
]);
|
|
33215
33554
|
const snapshot = loaded?.conversationId === conversationId ? loaded.snapshot : null;
|
|
33216
|
-
const activeHistorySections =
|
|
33555
|
+
const activeHistorySections = React121.useMemo(
|
|
33217
33556
|
() => historySectionsConversationId === conversationId ? historySections : {},
|
|
33218
33557
|
[conversationId, historySections, historySectionsConversationId]
|
|
33219
33558
|
);
|
|
33220
|
-
const loadSection =
|
|
33559
|
+
const loadSection = React121.useCallback(
|
|
33221
33560
|
async (section) => {
|
|
33222
33561
|
if (!enabled || !conversationId || loadingSections[section]) {
|
|
33223
33562
|
return;
|
|
@@ -33295,12 +33634,12 @@ function useChatTaskSummary({
|
|
|
33295
33634
|
}) {
|
|
33296
33635
|
const taskSummaryEnabled = options?.taskSummary?.enabled === true;
|
|
33297
33636
|
const taskSummaryConversationId = stream.conversationId ?? null;
|
|
33298
|
-
const [taskSummaryDocked, setTaskSummaryDocked] =
|
|
33299
|
-
const [taskSummaryOpen, setTaskSummaryOpen] =
|
|
33300
|
-
const manuallyClosedTaskSummaryConversationIdsRef =
|
|
33637
|
+
const [taskSummaryDocked, setTaskSummaryDocked] = React122.useState(false);
|
|
33638
|
+
const [taskSummaryOpen, setTaskSummaryOpen] = React122.useState(false);
|
|
33639
|
+
const manuallyClosedTaskSummaryConversationIdsRef = React122.useRef(
|
|
33301
33640
|
/* @__PURE__ */ new Set()
|
|
33302
33641
|
);
|
|
33303
|
-
const liveTaskSummaryPending =
|
|
33642
|
+
const liveTaskSummaryPending = React122.useMemo(() => {
|
|
33304
33643
|
const followUps = pendingFollowUps.map((item) => ({
|
|
33305
33644
|
id: `follow-up:${item.id}`,
|
|
33306
33645
|
kind: "follow_up",
|
|
@@ -33335,7 +33674,7 @@ function useChatTaskSummary({
|
|
|
33335
33674
|
stream.pendingRequestUserInput,
|
|
33336
33675
|
t
|
|
33337
33676
|
]);
|
|
33338
|
-
const liveTaskSummaryRunning =
|
|
33677
|
+
const liveTaskSummaryRunning = React122.useMemo(
|
|
33339
33678
|
() => stream.runtimeActivities.sandboxServices.services.filter(
|
|
33340
33679
|
(service) => service.status === "starting" || service.status === "running" || service.status === "stopping"
|
|
33341
33680
|
).map((service) => ({
|
|
@@ -33352,7 +33691,7 @@ function useChatTaskSummary({
|
|
|
33352
33691
|
})),
|
|
33353
33692
|
[stream.runtimeActivities.sandboxServices.services]
|
|
33354
33693
|
);
|
|
33355
|
-
const taskSummaryAgentNames =
|
|
33694
|
+
const taskSummaryAgentNames = React122.useMemo(() => {
|
|
33356
33695
|
const names = /* @__PURE__ */ new Map();
|
|
33357
33696
|
runtimeCapabilityOptions.forEach((option) => {
|
|
33358
33697
|
if (option.type !== "subAgent") return;
|
|
@@ -33364,7 +33703,7 @@ function useChatTaskSummary({
|
|
|
33364
33703
|
});
|
|
33365
33704
|
return names;
|
|
33366
33705
|
}, [runtimeCapabilityOptions]);
|
|
33367
|
-
const liveTaskSummary =
|
|
33706
|
+
const liveTaskSummary = React122.useMemo(
|
|
33368
33707
|
() => collectLiveTaskSummary({
|
|
33369
33708
|
messages: messages.map(
|
|
33370
33709
|
(message) => ({
|
|
@@ -33402,7 +33741,7 @@ function useChatTaskSummary({
|
|
|
33402
33741
|
live: liveTaskSummary,
|
|
33403
33742
|
refreshVersion: stream.historyMessageLoadVersion
|
|
33404
33743
|
});
|
|
33405
|
-
const navigateToTaskSummaryMessage =
|
|
33744
|
+
const navigateToTaskSummaryMessage = React122.useCallback(
|
|
33406
33745
|
async (messageId) => {
|
|
33407
33746
|
try {
|
|
33408
33747
|
let anchor = messageNavigationAnchorsRef.current.get(messageId);
|
|
@@ -33430,7 +33769,7 @@ function useChatTaskSummary({
|
|
|
33430
33769
|
taskSummary.summary.outputs,
|
|
33431
33770
|
taskSummaryConversationId ?? void 0
|
|
33432
33771
|
);
|
|
33433
|
-
|
|
33772
|
+
React122.useLayoutEffect(() => {
|
|
33434
33773
|
if (characterPresentation) {
|
|
33435
33774
|
setTaskSummaryDocked(true);
|
|
33436
33775
|
return;
|
|
@@ -33469,7 +33808,7 @@ function useChatTaskSummary({
|
|
|
33469
33808
|
const taskSummaryAvailable = Boolean(
|
|
33470
33809
|
taskSummaryEnabled && (characterPresentation || stream.threadId && taskSummaryConversationId)
|
|
33471
33810
|
);
|
|
33472
|
-
const handleTaskSummaryOpenChange =
|
|
33811
|
+
const handleTaskSummaryOpenChange = React122.useCallback(
|
|
33473
33812
|
(open) => {
|
|
33474
33813
|
setTaskSummaryOpen(open);
|
|
33475
33814
|
if (!taskSummaryConversationId) return;
|
|
@@ -33485,7 +33824,7 @@ function useChatTaskSummary({
|
|
|
33485
33824
|
},
|
|
33486
33825
|
[taskSummaryConversationId]
|
|
33487
33826
|
);
|
|
33488
|
-
|
|
33827
|
+
React122.useEffect(() => {
|
|
33489
33828
|
if (characterPresentation) {
|
|
33490
33829
|
setTaskSummaryOpen(false);
|
|
33491
33830
|
return;
|
|
@@ -33494,7 +33833,7 @@ function useChatTaskSummary({
|
|
|
33494
33833
|
setTaskSummaryOpen(false);
|
|
33495
33834
|
}
|
|
33496
33835
|
}, [taskSummaryDocked, characterPresentation, stream.assistantId]);
|
|
33497
|
-
|
|
33836
|
+
React122.useEffect(() => {
|
|
33498
33837
|
if (characterPresentation || !taskSummaryDocked || !taskSummaryAvailable || !taskSummaryConversationId || manuallyClosedTaskSummaryConversationIdsRef.current.has(
|
|
33499
33838
|
taskSummaryConversationId
|
|
33500
33839
|
)) {
|
|
@@ -33533,7 +33872,7 @@ function useChatTaskSummary({
|
|
|
33533
33872
|
import { CHATKIT_ASSISTANT_CUSTOMIZE_EFFECT } from "@xpert-ai/chatkit-types";
|
|
33534
33873
|
|
|
33535
33874
|
// src/components/chat/header/AssistantPresence.tsx
|
|
33536
|
-
import * as
|
|
33875
|
+
import * as React123 from "react";
|
|
33537
33876
|
import * as Dialog5 from "@radix-ui/react-dialog";
|
|
33538
33877
|
import { Pencil as Pencil9, X as X17 } from "lucide-react";
|
|
33539
33878
|
import {
|
|
@@ -33542,7 +33881,7 @@ import {
|
|
|
33542
33881
|
useIsPresent,
|
|
33543
33882
|
useReducedMotion as useReducedMotion2
|
|
33544
33883
|
} from "framer-motion";
|
|
33545
|
-
import { jsx as
|
|
33884
|
+
import { jsx as jsx121, jsxs as jsxs95 } from "react/jsx-runtime";
|
|
33546
33885
|
var PRESENCE_EASE = [0.22, 1, 0.36, 1];
|
|
33547
33886
|
function PresenceCharacter({
|
|
33548
33887
|
presence,
|
|
@@ -33550,7 +33889,7 @@ function PresenceCharacter({
|
|
|
33550
33889
|
}) {
|
|
33551
33890
|
const systemReducedMotion = useReducedMotion2();
|
|
33552
33891
|
const still = presence.reducedMotion || systemReducedMotion;
|
|
33553
|
-
return /* @__PURE__ */
|
|
33892
|
+
return /* @__PURE__ */ jsx121(
|
|
33554
33893
|
motion.div,
|
|
33555
33894
|
{
|
|
33556
33895
|
"data-slot": "assistant-presence-character",
|
|
@@ -33558,7 +33897,7 @@ function PresenceCharacter({
|
|
|
33558
33897
|
className: "relative z-10 shrink-0",
|
|
33559
33898
|
style: { width: size2, height: size2 },
|
|
33560
33899
|
transition: { layout: { duration: 0.34, ease: PRESENCE_EASE } },
|
|
33561
|
-
children: /* @__PURE__ */
|
|
33900
|
+
children: /* @__PURE__ */ jsx121(AssistantCharacter, { ...presence, size: size2 })
|
|
33562
33901
|
}
|
|
33563
33902
|
);
|
|
33564
33903
|
}
|
|
@@ -33569,7 +33908,7 @@ function PresenceStatus({
|
|
|
33569
33908
|
}) {
|
|
33570
33909
|
const { t } = useChatkitTranslation();
|
|
33571
33910
|
const key = waitingForInput ? "approval" : state === "failed" ? "failed" : state === "review" ? "thinking" : state === "running" ? "running" : state === "waiting" ? "loading" : "idle";
|
|
33572
|
-
return /* @__PURE__ */
|
|
33911
|
+
return /* @__PURE__ */ jsxs95(
|
|
33573
33912
|
"span",
|
|
33574
33913
|
{
|
|
33575
33914
|
role: "status",
|
|
@@ -33587,12 +33926,12 @@ function AssistantPresence(props) {
|
|
|
33587
33926
|
const { t } = useChatkitTranslation();
|
|
33588
33927
|
const systemReducedMotion = useReducedMotion2();
|
|
33589
33928
|
const still = props.reducedMotion || systemReducedMotion;
|
|
33590
|
-
return /* @__PURE__ */
|
|
33929
|
+
return /* @__PURE__ */ jsx121(
|
|
33591
33930
|
"div",
|
|
33592
33931
|
{
|
|
33593
33932
|
"data-slot": "assistant-presence",
|
|
33594
33933
|
className: "chatkit-presence pointer-events-none relative z-20 col-start-1 row-start-1 flex shrink-0 flex-col items-center self-start",
|
|
33595
|
-
children: /* @__PURE__ */
|
|
33934
|
+
children: /* @__PURE__ */ jsxs95(
|
|
33596
33935
|
"button",
|
|
33597
33936
|
{
|
|
33598
33937
|
id: props.motionId ? `${props.motionId}-trigger` : void 0,
|
|
@@ -33606,8 +33945,8 @@ function AssistantPresence(props) {
|
|
|
33606
33945
|
className: "chatkit-presence-trigger pointer-events-auto grid justify-items-center rounded-2xl outline-offset-4",
|
|
33607
33946
|
onClick: () => props.onOpenChange(true),
|
|
33608
33947
|
children: [
|
|
33609
|
-
/* @__PURE__ */
|
|
33610
|
-
/* @__PURE__ */
|
|
33948
|
+
/* @__PURE__ */ jsx121("span", { className: "block size-20", children: !props.open && /* @__PURE__ */ jsx121(PresenceCharacter, { presence: props }) }),
|
|
33949
|
+
/* @__PURE__ */ jsxs95(
|
|
33611
33950
|
motion.span,
|
|
33612
33951
|
{
|
|
33613
33952
|
initial: false,
|
|
@@ -33619,8 +33958,8 @@ function AssistantPresence(props) {
|
|
|
33619
33958
|
transition: { duration: still ? 0 : 0.18, ease: PRESENCE_EASE },
|
|
33620
33959
|
className: "chatkit-presence-bubble max-w-64 rounded-2xl border border-border/60 bg-popover/95 shadow-sm backdrop-blur-sm",
|
|
33621
33960
|
children: [
|
|
33622
|
-
/* @__PURE__ */
|
|
33623
|
-
/* @__PURE__ */
|
|
33961
|
+
/* @__PURE__ */ jsx121("span", { className: "block truncate text-sm font-medium", children: props.name }),
|
|
33962
|
+
/* @__PURE__ */ jsx121(PresenceStatus, { ...props })
|
|
33624
33963
|
]
|
|
33625
33964
|
}
|
|
33626
33965
|
)
|
|
@@ -33637,11 +33976,11 @@ function AssistantSummaryDialog({
|
|
|
33637
33976
|
voice
|
|
33638
33977
|
}) {
|
|
33639
33978
|
const { t } = useChatkitTranslation();
|
|
33640
|
-
const dialog =
|
|
33641
|
-
const opener =
|
|
33642
|
-
const restoreFocus =
|
|
33643
|
-
const wasOpen =
|
|
33644
|
-
|
|
33979
|
+
const dialog = React123.useRef(null);
|
|
33980
|
+
const opener = React123.useRef(null);
|
|
33981
|
+
const restoreFocus = React123.useRef(true);
|
|
33982
|
+
const wasOpen = React123.useRef(false);
|
|
33983
|
+
React123.useLayoutEffect(() => {
|
|
33645
33984
|
if (presence.open && !wasOpen.current) {
|
|
33646
33985
|
restoreFocus.current = true;
|
|
33647
33986
|
const active = document.activeElement;
|
|
@@ -33655,7 +33994,7 @@ function AssistantSummaryDialog({
|
|
|
33655
33994
|
}
|
|
33656
33995
|
wasOpen.current = presence.open;
|
|
33657
33996
|
}, [presence.open, presence.motionId]);
|
|
33658
|
-
|
|
33997
|
+
React123.useEffect(() => {
|
|
33659
33998
|
if (!presence.open || voice?.panel) return;
|
|
33660
33999
|
const dismiss = () => {
|
|
33661
34000
|
restoreFocus.current = false;
|
|
@@ -33664,15 +34003,15 @@ function AssistantSummaryDialog({
|
|
|
33664
34003
|
window.addEventListener("blur", dismiss);
|
|
33665
34004
|
return () => window.removeEventListener("blur", dismiss);
|
|
33666
34005
|
}, [presence.open, presence.onOpenChange, voice?.panel]);
|
|
33667
|
-
return /* @__PURE__ */
|
|
34006
|
+
return /* @__PURE__ */ jsxs95("div", { className: "chatkit-presence-stack pointer-events-none absolute z-30 flex max-h-[calc(100%-1.5rem)] flex-col gap-3", children: [
|
|
33668
34007
|
voice?.panel,
|
|
33669
|
-
/* @__PURE__ */
|
|
34008
|
+
/* @__PURE__ */ jsx121(
|
|
33670
34009
|
Dialog5.Root,
|
|
33671
34010
|
{
|
|
33672
34011
|
open: presence.open,
|
|
33673
34012
|
onOpenChange: presence.onOpenChange,
|
|
33674
34013
|
modal: false,
|
|
33675
|
-
children: /* @__PURE__ */
|
|
34014
|
+
children: /* @__PURE__ */ jsx121(AnimatePresence, { initial: false, children: presence.open && /* @__PURE__ */ jsxs95(
|
|
33676
34015
|
PresenceDialogSurface,
|
|
33677
34016
|
{
|
|
33678
34017
|
presence,
|
|
@@ -33696,40 +34035,40 @@ function AssistantSummaryDialog({
|
|
|
33696
34035
|
event.preventDefault();
|
|
33697
34036
|
},
|
|
33698
34037
|
children: [
|
|
33699
|
-
/* @__PURE__ */
|
|
33700
|
-
/* @__PURE__ */
|
|
33701
|
-
/* @__PURE__ */
|
|
33702
|
-
/* @__PURE__ */
|
|
33703
|
-
/* @__PURE__ */
|
|
33704
|
-
/* @__PURE__ */
|
|
33705
|
-
presence.onCustomize && /* @__PURE__ */
|
|
34038
|
+
/* @__PURE__ */ jsx121(Dialog5.Title, { className: "sr-only", children: t("assistantPresence.details") }),
|
|
34039
|
+
/* @__PURE__ */ jsxs95("div", { className: "chatkit-presence-header flex shrink-0 items-start", children: [
|
|
34040
|
+
/* @__PURE__ */ jsx121(PresenceCharacter, { presence, size: "4rem" }),
|
|
34041
|
+
/* @__PURE__ */ jsxs95("div", { className: "chatkit-presence-details min-w-0 flex-1", children: [
|
|
34042
|
+
/* @__PURE__ */ jsx121("h2", { className: "truncate font-semibold", children: presence.name }),
|
|
34043
|
+
/* @__PURE__ */ jsx121(PresenceStatus, { ...presence }),
|
|
34044
|
+
presence.onCustomize && /* @__PURE__ */ jsxs95(
|
|
33706
34045
|
"button",
|
|
33707
34046
|
{
|
|
33708
34047
|
type: "button",
|
|
33709
34048
|
className: "chatkit-presence-customize flex items-center text-xs text-muted-foreground hover:text-foreground",
|
|
33710
34049
|
onClick: presence.onCustomize,
|
|
33711
34050
|
children: [
|
|
33712
|
-
/* @__PURE__ */
|
|
34051
|
+
/* @__PURE__ */ jsx121(Pencil9, { className: "size-3 shrink-0" }),
|
|
33713
34052
|
t("assistantPresence.customize")
|
|
33714
34053
|
]
|
|
33715
34054
|
}
|
|
33716
34055
|
)
|
|
33717
34056
|
] }),
|
|
33718
|
-
/* @__PURE__ */
|
|
34057
|
+
/* @__PURE__ */ jsx121(
|
|
33719
34058
|
"button",
|
|
33720
34059
|
{
|
|
33721
34060
|
type: "button",
|
|
33722
34061
|
className: "chatkit-presence-close flex shrink-0 items-center justify-center rounded-lg text-muted-foreground hover:bg-muted",
|
|
33723
34062
|
"aria-label": t("assistantPresence.close"),
|
|
33724
34063
|
onClick: () => presence.onOpenChange(false),
|
|
33725
|
-
children: /* @__PURE__ */
|
|
34064
|
+
children: /* @__PURE__ */ jsx121(X17, { className: "size-[1.125rem]" })
|
|
33726
34065
|
}
|
|
33727
34066
|
)
|
|
33728
34067
|
] }),
|
|
33729
|
-
/* @__PURE__ */
|
|
34068
|
+
/* @__PURE__ */ jsxs95("div", { className: "min-h-0 overflow-auto rounded-b-3xl", children: [
|
|
33730
34069
|
voice?.dial,
|
|
33731
34070
|
computers,
|
|
33732
|
-
/* @__PURE__ */
|
|
34071
|
+
/* @__PURE__ */ jsx121(TaskSummaryContent, { ...summary })
|
|
33733
34072
|
] })
|
|
33734
34073
|
]
|
|
33735
34074
|
},
|
|
@@ -33739,11 +34078,11 @@ function AssistantSummaryDialog({
|
|
|
33739
34078
|
)
|
|
33740
34079
|
] });
|
|
33741
34080
|
}
|
|
33742
|
-
var PresenceDialogSurface =
|
|
34081
|
+
var PresenceDialogSurface = React123.forwardRef(function PresenceDialogSurface2({ presence, children, ...props }, ref) {
|
|
33743
34082
|
const isPresent = useIsPresent();
|
|
33744
34083
|
const systemReducedMotion = useReducedMotion2();
|
|
33745
34084
|
const still = presence.reducedMotion || systemReducedMotion;
|
|
33746
|
-
return /* @__PURE__ */
|
|
34085
|
+
return /* @__PURE__ */ jsx121(
|
|
33747
34086
|
Dialog5.Content,
|
|
33748
34087
|
{
|
|
33749
34088
|
...props,
|
|
@@ -33751,7 +34090,7 @@ var PresenceDialogSurface = React122.forwardRef(function PresenceDialogSurface2(
|
|
|
33751
34090
|
asChild: true,
|
|
33752
34091
|
ref,
|
|
33753
34092
|
inert: !isPresent || void 0,
|
|
33754
|
-
children: /* @__PURE__ */
|
|
34093
|
+
children: /* @__PURE__ */ jsx121(
|
|
33755
34094
|
motion.div,
|
|
33756
34095
|
{
|
|
33757
34096
|
"data-slot": "assistant-summary-dialog",
|
|
@@ -33780,7 +34119,7 @@ var PresenceDialogSurface = React122.forwardRef(function PresenceDialogSurface2(
|
|
|
33780
34119
|
});
|
|
33781
34120
|
|
|
33782
34121
|
// src/components/chat.tsx
|
|
33783
|
-
import { jsx as
|
|
34122
|
+
import { jsx as jsx122, jsxs as jsxs96 } from "react/jsx-runtime";
|
|
33784
34123
|
function Chat({
|
|
33785
34124
|
className,
|
|
33786
34125
|
options,
|
|
@@ -33839,19 +34178,19 @@ function Chat({
|
|
|
33839
34178
|
options
|
|
33840
34179
|
});
|
|
33841
34180
|
const modelState = useChatModelState({ ...session });
|
|
33842
|
-
const [planModeEnabled, setPlanModeEnabled] =
|
|
34181
|
+
const [planModeEnabled, setPlanModeEnabled] = React124.useState(false);
|
|
33843
34182
|
const pet = useChatPetSettings({ options });
|
|
33844
|
-
const headerMoreButtonRef =
|
|
33845
|
-
const restoreHeaderFocus =
|
|
34183
|
+
const headerMoreButtonRef = React124.useRef(null);
|
|
34184
|
+
const restoreHeaderFocus = React124.useCallback((event) => {
|
|
33846
34185
|
if (headerMoreButtonRef.current) {
|
|
33847
34186
|
event.preventDefault();
|
|
33848
34187
|
headerMoreButtonRef.current.focus();
|
|
33849
34188
|
}
|
|
33850
34189
|
}, []);
|
|
33851
|
-
const [hasSelectableProjects, setHasSelectableProjects] =
|
|
34190
|
+
const [hasSelectableProjects, setHasSelectableProjects] = React124.useState(false);
|
|
33852
34191
|
const files = useChatFiles({ ...draft, ...session, referenceRequest });
|
|
33853
|
-
const viewportRef =
|
|
33854
|
-
const messages =
|
|
34192
|
+
const viewportRef = React124.useRef(null);
|
|
34193
|
+
const messages = React124.useMemo(
|
|
33855
34194
|
() => mergeCompletedCalls(
|
|
33856
34195
|
session.stream.messages ?? [],
|
|
33857
34196
|
options?.realtimeVoice?.completed,
|
|
@@ -33879,7 +34218,7 @@ function Chat({
|
|
|
33879
34218
|
messages,
|
|
33880
34219
|
viewportRef
|
|
33881
34220
|
});
|
|
33882
|
-
const chatColumnRef =
|
|
34221
|
+
const chatColumnRef = React124.useRef(null);
|
|
33883
34222
|
const capabilities = useChatCapabilities({
|
|
33884
34223
|
...runtime,
|
|
33885
34224
|
...draft,
|
|
@@ -33941,7 +34280,7 @@ function Chat({
|
|
|
33941
34280
|
options,
|
|
33942
34281
|
messages
|
|
33943
34282
|
});
|
|
33944
|
-
const pendingFollowUps =
|
|
34283
|
+
const pendingFollowUps = React124.useMemo(
|
|
33945
34284
|
() => sortVisiblePendingFollowUps(session.stream.pendingFollowUps ?? []),
|
|
33946
34285
|
[session.stream.pendingFollowUps]
|
|
33947
34286
|
);
|
|
@@ -33961,7 +34300,10 @@ function Chat({
|
|
|
33961
34300
|
const inputPlaceholder = draft.selectedTool?.placeholderOverride ?? session.composer?.placeholder ?? assistant.resolvedPlaceholder;
|
|
33962
34301
|
const isInitialComposer = !session.stream.threadId && messages.length === 0 && !viewport.canLoadMoreMessages && !session.stream.isLoading;
|
|
33963
34302
|
const hasPendingFollowUps = pendingFollowUps.length > 0;
|
|
33964
|
-
const
|
|
34303
|
+
const hasConversationId = Boolean(
|
|
34304
|
+
session.stream.threadId || session.stream.conversationId
|
|
34305
|
+
);
|
|
34306
|
+
const isProjectSelectionLocked = hasConversationId ? !onProjectChange : messages.length > 0 || viewport.canLoadMoreMessages;
|
|
33965
34307
|
const isProjectScopeLocked = Boolean(session.activeProjectId) && (isProjectSelectionLocked || options?.composer?.projects?.locked === true);
|
|
33966
34308
|
const isFileSelectorVisible = Boolean(
|
|
33967
34309
|
session.xpertPlatformClient && (session.activeProjectId || session.stream.assistantId)
|
|
@@ -34004,7 +34346,7 @@ function Chat({
|
|
|
34004
34346
|
canUploadAttachments
|
|
34005
34347
|
});
|
|
34006
34348
|
const streamErrorMessage = session.stream.error instanceof Error ? session.stream.error.message : void 0;
|
|
34007
|
-
const threadErrorMessage =
|
|
34349
|
+
const threadErrorMessage = React124.useMemo(() => {
|
|
34008
34350
|
if (streamErrorMessage?.trim()) return streamErrorMessage.trim();
|
|
34009
34351
|
if (historyState.currentThread?.status !== "error") return void 0;
|
|
34010
34352
|
const message = historyState.currentThread.error?.trim();
|
|
@@ -34034,14 +34376,14 @@ function Chat({
|
|
|
34034
34376
|
historyMessageLoadVersion: session.stream.historyMessageLoadVersion ?? 0,
|
|
34035
34377
|
fallbackTitle: session.t("history.threadFallback")
|
|
34036
34378
|
});
|
|
34037
|
-
const chatColumnStyle =
|
|
34379
|
+
const chatColumnStyle = React124.useMemo(() => {
|
|
34038
34380
|
if (layoutMaxWidth === void 0 || layoutMaxWidth === null || layoutMaxWidth === "") {
|
|
34039
34381
|
return void 0;
|
|
34040
34382
|
}
|
|
34041
34383
|
return { maxWidth: layoutMaxWidth };
|
|
34042
34384
|
}, [layoutMaxWidth]);
|
|
34043
34385
|
const waitingForInput = !!(session.stream.pendingHITLRequest || session.stream.pendingRequestUserInput);
|
|
34044
|
-
const presenceMotionId =
|
|
34386
|
+
const presenceMotionId = React124.useId();
|
|
34045
34387
|
const presence = {
|
|
34046
34388
|
motionId: presenceMotionId,
|
|
34047
34389
|
avatar: assistant.assistantAvatar,
|
|
@@ -34062,13 +34404,13 @@ function Chat({
|
|
|
34062
34404
|
]);
|
|
34063
34405
|
} : void 0
|
|
34064
34406
|
};
|
|
34065
|
-
return /* @__PURE__ */
|
|
34407
|
+
return /* @__PURE__ */ jsxs96(
|
|
34066
34408
|
"div",
|
|
34067
34409
|
{
|
|
34068
34410
|
className: "relative flex h-full w-full min-w-0 bg-background",
|
|
34069
34411
|
"data-task-summary-layout": summary.taskSummaryDocked ? "docked" : "popover",
|
|
34070
34412
|
children: [
|
|
34071
|
-
/* @__PURE__ */
|
|
34413
|
+
/* @__PURE__ */ jsxs96(
|
|
34072
34414
|
UploadDroppedFiles,
|
|
34073
34415
|
{
|
|
34074
34416
|
ref: viewportRef,
|
|
@@ -34083,13 +34425,13 @@ function Chat({
|
|
|
34083
34425
|
className
|
|
34084
34426
|
),
|
|
34085
34427
|
children: [
|
|
34086
|
-
/* @__PURE__ */
|
|
34428
|
+
/* @__PURE__ */ jsxs96(
|
|
34087
34429
|
"div",
|
|
34088
34430
|
{
|
|
34089
34431
|
"data-window-drag-scope": "",
|
|
34090
34432
|
className: characterPresentation ? "pointer-events-none sticky top-0 z-10 grid w-full shrink-0" : "contents",
|
|
34091
34433
|
children: [
|
|
34092
|
-
/* @__PURE__ */
|
|
34434
|
+
/* @__PURE__ */ jsx122(
|
|
34093
34435
|
ChatHeader,
|
|
34094
34436
|
{
|
|
34095
34437
|
characterPresentation,
|
|
@@ -34109,11 +34451,11 @@ function Chat({
|
|
|
34109
34451
|
restoreHeaderFocus
|
|
34110
34452
|
}
|
|
34111
34453
|
),
|
|
34112
|
-
characterPresentation && /* @__PURE__ */
|
|
34454
|
+
characterPresentation && /* @__PURE__ */ jsx122(AssistantPresence, { ...presence })
|
|
34113
34455
|
]
|
|
34114
34456
|
}
|
|
34115
34457
|
),
|
|
34116
|
-
viewport.showMessageNavigation && /* @__PURE__ */
|
|
34458
|
+
viewport.showMessageNavigation && /* @__PURE__ */ jsx122(
|
|
34117
34459
|
MessageNavigator,
|
|
34118
34460
|
{
|
|
34119
34461
|
items: viewport.messageNavigationItems,
|
|
@@ -34124,7 +34466,7 @@ function Chat({
|
|
|
34124
34466
|
tagsOverflowLabel: (count) => session.t("message.navigation.moreTags", { count })
|
|
34125
34467
|
}
|
|
34126
34468
|
),
|
|
34127
|
-
/* @__PURE__ */
|
|
34469
|
+
/* @__PURE__ */ jsx122(
|
|
34128
34470
|
ChatTranscript,
|
|
34129
34471
|
{
|
|
34130
34472
|
...session,
|
|
@@ -34150,8 +34492,8 @@ function Chat({
|
|
|
34150
34492
|
messagePresentation
|
|
34151
34493
|
}
|
|
34152
34494
|
),
|
|
34153
|
-
/* @__PURE__ */
|
|
34154
|
-
/* @__PURE__ */
|
|
34495
|
+
/* @__PURE__ */ jsx122(ChatQuoteActions, { ...quotes, ...session }),
|
|
34496
|
+
/* @__PURE__ */ jsxs96(
|
|
34155
34497
|
"div",
|
|
34156
34498
|
{
|
|
34157
34499
|
"data-slot": "chatkit-chat-composer",
|
|
@@ -34162,13 +34504,13 @@ function Chat({
|
|
|
34162
34504
|
),
|
|
34163
34505
|
style: chatColumnStyle,
|
|
34164
34506
|
children: [
|
|
34165
|
-
runControl.runControlError?.threadId === session.stream.threadId && /* @__PURE__ */
|
|
34166
|
-
!viewport.isAtBottom && messages.length > 0 && /* @__PURE__ */
|
|
34507
|
+
runControl.runControlError?.threadId === session.stream.threadId && /* @__PURE__ */ jsx122("p", { role: "alert", className: "text-xs text-destructive", children: runControl.runControlError.message }),
|
|
34508
|
+
!viewport.isAtBottom && messages.length > 0 && /* @__PURE__ */ jsx122(
|
|
34167
34509
|
"div",
|
|
34168
34510
|
{
|
|
34169
34511
|
"data-slot": "scroll-to-bottom",
|
|
34170
34512
|
className: "pointer-events-none absolute left-1/2 top-0 z-20 flex -translate-x-1/2 -translate-y-full justify-center",
|
|
34171
|
-
children: /* @__PURE__ */
|
|
34513
|
+
children: /* @__PURE__ */ jsx122(
|
|
34172
34514
|
Button,
|
|
34173
34515
|
{
|
|
34174
34516
|
type: "button",
|
|
@@ -34181,14 +34523,14 @@ function Chat({
|
|
|
34181
34523
|
onClick: () => viewport.scrollToBottom(true, true),
|
|
34182
34524
|
"aria-label": session.t("chat.scrollToBottom"),
|
|
34183
34525
|
title: session.t("chat.scrollToBottom"),
|
|
34184
|
-
children: /* @__PURE__ */
|
|
34526
|
+
children: /* @__PURE__ */ jsx122(ArrowDown2, { size: 16 })
|
|
34185
34527
|
}
|
|
34186
34528
|
)
|
|
34187
34529
|
}
|
|
34188
34530
|
),
|
|
34189
|
-
threadErrorMessage && /* @__PURE__ */
|
|
34190
|
-
/* @__PURE__ */
|
|
34191
|
-
/* @__PURE__ */
|
|
34531
|
+
threadErrorMessage && /* @__PURE__ */ jsx122("div", { className: "mb-3 rounded-lg border border-destructive/30 bg-destructive/10 px-3 py-2 text-sm text-destructive overflow-auto", children: threadErrorMessage }),
|
|
34532
|
+
/* @__PURE__ */ jsx122(ChatGoalStatus, { ...goal, ...session, ...draft }),
|
|
34533
|
+
/* @__PURE__ */ jsx122(
|
|
34192
34534
|
ChatPendingActions,
|
|
34193
34535
|
{
|
|
34194
34536
|
...session,
|
|
@@ -34199,7 +34541,7 @@ function Chat({
|
|
|
34199
34541
|
pendingFollowUps
|
|
34200
34542
|
}
|
|
34201
34543
|
),
|
|
34202
|
-
isInitialComposer && /* @__PURE__ */
|
|
34544
|
+
isInitialComposer && /* @__PURE__ */ jsx122(
|
|
34203
34545
|
PromptWorkflowShortcuts,
|
|
34204
34546
|
{
|
|
34205
34547
|
commands: capabilities.promptWorkflow.commands,
|
|
@@ -34213,8 +34555,8 @@ function Chat({
|
|
|
34213
34555
|
onBack: capabilities.promptWorkflow.showPrompts
|
|
34214
34556
|
}
|
|
34215
34557
|
),
|
|
34216
|
-
/* @__PURE__ */
|
|
34217
|
-
draft.threadMention && /* @__PURE__ */
|
|
34558
|
+
/* @__PURE__ */ jsx122(ChatComposerAttachments, { ...files, ...session }),
|
|
34559
|
+
draft.threadMention && /* @__PURE__ */ jsx122(
|
|
34218
34560
|
ThreadMentionPalette,
|
|
34219
34561
|
{
|
|
34220
34562
|
ref: draft.threadMentionPaletteRef,
|
|
@@ -34234,7 +34576,7 @@ function Chat({
|
|
|
34234
34576
|
onSelect: draft.selectThreadMention
|
|
34235
34577
|
}
|
|
34236
34578
|
),
|
|
34237
|
-
runtime.runtimeCapabilityPalette && !draft.threadMention && /* @__PURE__ */
|
|
34579
|
+
runtime.runtimeCapabilityPalette && !draft.threadMention && /* @__PURE__ */ jsx122(
|
|
34238
34580
|
SlashPalette,
|
|
34239
34581
|
{
|
|
34240
34582
|
palette: runtime.runtimeCapabilityPalette,
|
|
@@ -34248,7 +34590,7 @@ function Chat({
|
|
|
34248
34590
|
onSelect: commands.selectSlashPaletteOption
|
|
34249
34591
|
}
|
|
34250
34592
|
),
|
|
34251
|
-
/* @__PURE__ */
|
|
34593
|
+
/* @__PURE__ */ jsx122(
|
|
34252
34594
|
ChatComposerForm,
|
|
34253
34595
|
{
|
|
34254
34596
|
...commands,
|
|
@@ -34287,7 +34629,7 @@ function Chat({
|
|
|
34287
34629
|
runtimeResources
|
|
34288
34630
|
}
|
|
34289
34631
|
),
|
|
34290
|
-
isInitialComposer && session.startScreen?.promptsLayout === "list" && /* @__PURE__ */
|
|
34632
|
+
isInitialComposer && session.startScreen?.promptsLayout === "list" && /* @__PURE__ */ jsx122(
|
|
34291
34633
|
StarterPromptSuggestions,
|
|
34292
34634
|
{
|
|
34293
34635
|
prompts: session.startScreen.prompts ?? [],
|
|
@@ -34297,7 +34639,7 @@ function Chat({
|
|
|
34297
34639
|
promptEditDisabled: isPromptEditDisabled
|
|
34298
34640
|
}
|
|
34299
34641
|
),
|
|
34300
|
-
session.disclaimer?.text && /* @__PURE__ */
|
|
34642
|
+
session.disclaimer?.text && /* @__PURE__ */ jsx122(
|
|
34301
34643
|
"p",
|
|
34302
34644
|
{
|
|
34303
34645
|
className: cn(
|
|
@@ -34310,7 +34652,7 @@ function Chat({
|
|
|
34310
34652
|
]
|
|
34311
34653
|
}
|
|
34312
34654
|
),
|
|
34313
|
-
/* @__PURE__ */
|
|
34655
|
+
/* @__PURE__ */ jsx122(
|
|
34314
34656
|
SettingsSheet,
|
|
34315
34657
|
{
|
|
34316
34658
|
open: !pet.petDisabled && pet.petSettingsOpen,
|
|
@@ -34321,17 +34663,17 @@ function Chat({
|
|
|
34321
34663
|
onSave: pet.savePetLocalSettings
|
|
34322
34664
|
}
|
|
34323
34665
|
),
|
|
34324
|
-
/* @__PURE__ */
|
|
34666
|
+
/* @__PURE__ */ jsx122(PetBridge, { pet: pet.effectivePet, state: petAutoState })
|
|
34325
34667
|
]
|
|
34326
34668
|
}
|
|
34327
34669
|
),
|
|
34328
|
-
characterPresentation && /* @__PURE__ */
|
|
34670
|
+
characterPresentation && /* @__PURE__ */ jsx122(
|
|
34329
34671
|
AssistantSummaryDialog,
|
|
34330
34672
|
{
|
|
34331
34673
|
presence,
|
|
34332
34674
|
voice,
|
|
34333
34675
|
summary: summary.taskSummaryProps,
|
|
34334
|
-
computers: /* @__PURE__ */
|
|
34676
|
+
computers: /* @__PURE__ */ jsx122(
|
|
34335
34677
|
AssistantComputers,
|
|
34336
34678
|
{
|
|
34337
34679
|
computers: options?.header?.character?.computers,
|
|
@@ -34350,7 +34692,7 @@ function Chat({
|
|
|
34350
34692
|
)
|
|
34351
34693
|
}
|
|
34352
34694
|
),
|
|
34353
|
-
!characterPresentation && summary.taskSummaryAvailable && summary.taskSummaryDocked && summary.taskSummaryOpen && /* @__PURE__ */
|
|
34695
|
+
!characterPresentation && summary.taskSummaryAvailable && summary.taskSummaryDocked && summary.taskSummaryOpen && /* @__PURE__ */ jsx122("div", { className: "pointer-events-none absolute right-5 top-3 z-20 max-h-[calc(100%-1.5rem)] w-80", children: /* @__PURE__ */ jsx122(
|
|
34354
34696
|
TaskSummaryPanel,
|
|
34355
34697
|
{
|
|
34356
34698
|
...summary.taskSummaryProps,
|