@xpert-ai/chatkit-ui 0.11.1 → 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-DDXBrgn2.js → CodeEditor-CkEfOT9Y.js} +1 -1
- package/dist/app/assets/{DocxEditor-Bd7AcfDU.js → DocxEditor-yTTKzj6U.js} +4 -4
- package/dist/app/assets/{FileChangeReview-Wo4SxY9D.js → FileChangeReview-C7gyCK_j.js} +3 -3
- package/dist/app/assets/{PptxEditor-wNBHSAU7.js → PptxEditor-BRsbM1NU.js} +3 -3
- package/dist/app/assets/{SpreadsheetEditor-BDmtBNp2.js → SpreadsheetEditor-DeP_NBKx.js} +1 -1
- package/dist/app/assets/{UTIF-DGvgqP3V.js → UTIF-Df_VEwu2.js} +1 -1
- package/dist/app/assets/{WorkbenchTerminal-IWMZ-IM_.js → WorkbenchTerminal-CyU1b2ua.js} +1 -1
- package/dist/app/assets/{_baseUniq-ROXW8lLm.js → _baseUniq-BItsX9dZ.js} +1 -1
- package/dist/app/assets/{abap-BRNx7S2o.js → abap-CqbAP5VJ.js} +1 -1
- package/dist/app/assets/{abnf-KBM265Dy.js → abnf-chpMxV7i.js} +1 -1
- package/dist/app/assets/{actionscript-Dj6pW_3f.js → actionscript-iDizYOyI.js} +1 -1
- package/dist/app/assets/{ada-DaS8GjGh.js → ada-BwR_piCn.js} +1 -1
- package/dist/app/assets/{agda-C3umvXlf.js → agda-DItghU1v.js} +1 -1
- package/dist/app/assets/{al-CfkKXgFy.js → al-Cn9iRklY.js} +1 -1
- package/dist/app/assets/{antlr4-D36ZNeD8.js → antlr4-BHaybfLu.js} +1 -1
- package/dist/app/assets/{apacheconf-BRISUocm.js → apacheconf-7G1Isose.js} +1 -1
- package/dist/app/assets/{apex-BrWS5gBh.js → apex-B2q1-VZ0.js} +1 -1
- package/dist/app/assets/{apl-DR7Dad0V.js → apl-C_Bt1fXt.js} +1 -1
- package/dist/app/assets/{applescript-BF-OGtI7.js → applescript-ClCAsCUD.js} +1 -1
- package/dist/app/assets/{aql-CtUnSKQJ.js → aql-BHKh6tsA.js} +1 -1
- package/dist/app/assets/{arc-BHIIkTaz.js → arc-B1u5aHAj.js} +1 -1
- package/dist/app/assets/{architectureDiagram-Q4EWVU46-DAwE0y7E.js → architectureDiagram-Q4EWVU46-BwM5Ih-e.js} +1 -1
- package/dist/app/assets/{arduino-DMlJsDiu.js → arduino-Cvs7MW6d.js} +1 -1
- package/dist/app/assets/{arff-xwt-QtoB.js → arff-BtQEt-w-.js} +1 -1
- package/dist/app/assets/{asciidoc-BVzvcBj4.js → asciidoc-BWsNKxsy.js} +1 -1
- package/dist/app/assets/{asm6502-CszeeWay.js → asm6502-B3tFsA7S.js} +1 -1
- package/dist/app/assets/{asmatmel-3mij4il8.js → asmatmel-DMJIAcxu.js} +1 -1
- package/dist/app/assets/{aspnet-CYHrXIoE.js → aspnet-BZjQxYxl.js} +1 -1
- package/dist/app/assets/{autohotkey-D6f16SkZ.js → autohotkey-CcncmCqi.js} +1 -1
- package/dist/app/assets/{autoit-DqOGjyZy.js → autoit-BK9NxDra.js} +1 -1
- package/dist/app/assets/{avisynth-ifRZD0xk.js → avisynth-DPzTZVZd.js} +1 -1
- package/dist/app/assets/{avro-idl-DU9Tmt3A.js → avro-idl-C8vSamJL.js} +1 -1
- package/dist/app/assets/{bash-CGQsMGCb.js → bash-BuICApby.js} +1 -1
- package/dist/app/assets/{basic-D3zQiVZd.js → basic-CNU-aVUM.js} +1 -1
- package/dist/app/assets/{batch-S7tHqiXb.js → batch-Dh0g3bad.js} +1 -1
- package/dist/app/assets/{bbcode-CR37dH-P.js → bbcode-BMnS1Ogt.js} +1 -1
- package/dist/app/assets/{bicep-CoYhnmdh.js → bicep-Dr2QNZIE.js} +1 -1
- package/dist/app/assets/{birb-CAiYF9C2.js → birb-BBpAn9_Z.js} +1 -1
- package/dist/app/assets/{bison-BtZ4gc7v.js → bison-DyCzjhCr.js} +1 -1
- package/dist/app/assets/{blockDiagram-DXYQGD6D-JXUTG_mL.js → blockDiagram-DXYQGD6D-Da4FDDlD.js} +1 -1
- package/dist/app/assets/{bnf-CageNG5R.js → bnf-BjCmHNl7.js} +1 -1
- package/dist/app/assets/{brainfuck-CEXdHJf8.js → brainfuck-D_ad5ykV.js} +1 -1
- package/dist/app/assets/{brightscript-Dw1TO2a7.js → brightscript-BOuFomnC.js} +1 -1
- package/dist/app/assets/{bro-BHoyaPnh.js → bro-bwbGAIPn.js} +1 -1
- package/dist/app/assets/{bsl-DPhYVG76.js → bsl-Cd0OZu50.js} +1 -1
- package/dist/app/assets/{c-D_gBgYwD.js → c-C4qH8P7e.js} +1 -1
- package/dist/app/assets/{c4Diagram-AHTNJAMY-DIDFWiMu.js → c4Diagram-AHTNJAMY-Dt-tX7hp.js} +1 -1
- package/dist/app/assets/{cfscript-Cty6gO3F.js → cfscript-BtLuAap6.js} +1 -1
- package/dist/app/assets/{chaiscript-CzJZOcQs.js → chaiscript-DfhI4vFK.js} +1 -1
- package/dist/app/assets/channel-CwNVZCQ4.js +1 -0
- package/dist/app/assets/{chunk-4BX2VUAB-Y85Sw5i_.js → chunk-4BX2VUAB-DErkZghS.js} +1 -1
- package/dist/app/assets/{chunk-4TB4RGXK-BvnqEXGf.js → chunk-4TB4RGXK-9syV4RA8.js} +1 -1
- package/dist/app/assets/{chunk-55IACEB6-CEfNsqNb.js → chunk-55IACEB6-CkYTIvmQ.js} +1 -1
- package/dist/app/assets/{chunk-EDXVE4YY-vKPI3f-A.js → chunk-EDXVE4YY-w1lS6MjE.js} +1 -1
- package/dist/app/assets/{chunk-FMBD7UC4-CCTQ2psX.js → chunk-FMBD7UC4-CQae_nTG.js} +1 -1
- package/dist/app/assets/{chunk-OYMX7WX6-Cunw_D8D.js → chunk-OYMX7WX6-DQPwcOqP.js} +1 -1
- package/dist/app/assets/{chunk-QZHKN3VN-D_QIdO-L.js → chunk-QZHKN3VN-CUPf69en.js} +1 -1
- package/dist/app/assets/{chunk-YZCP3GAM-ynowCJM4.js → chunk-YZCP3GAM-DZ2w0Uo6.js} +1 -1
- package/dist/app/assets/{cil-DQ0NKRDC.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-CzB2An0-.js → clike-CkrJIoXf.js} +1 -1
- package/dist/app/assets/{clojure-DuCkRrd1.js → clojure-De7zisG7.js} +1 -1
- package/dist/app/assets/clone-DmP83D3u.js +1 -0
- package/dist/app/assets/{cmake-BC5DmoLE.js → cmake-Dtpiq6V_.js} +1 -1
- package/dist/app/assets/{cobol-DXQcDJBm.js → cobol-DlKH8b_d.js} +1 -1
- package/dist/app/assets/{coffeescript-BPd96d1U.js → coffeescript-C20eNRop.js} +1 -1
- package/dist/app/assets/{concurnas-CJoZomPS.js → concurnas-CkwZbl3G.js} +1 -1
- package/dist/app/assets/{coq-BZzZkfpq.js → coq-BJqm-Vwq.js} +1 -1
- package/dist/app/assets/{core-CtTRi8Nh.js → core-BeYgHLnP.js} +1 -1
- package/dist/app/assets/{cose-bilkent-S5V4N54A-xo9YLfFc.js → cose-bilkent-S5V4N54A-ZQRpbJ-9.js} +1 -1
- package/dist/app/assets/{cpp-DV_lQzAx.js → cpp-CCK-QhpZ.js} +1 -1
- package/dist/app/assets/{crystal-D7hgjM11.js → crystal-D1WMkcyR.js} +1 -1
- package/dist/app/assets/{csharp-DBpLrp9P.js → csharp-CeaNoGzT.js} +1 -1
- package/dist/app/assets/{cshtml-HwY49xVh.js → cshtml-COTvhMwv.js} +1 -1
- package/dist/app/assets/{csp-CU3eBOwy.js → csp-Dtt7oi-z.js} +1 -1
- package/dist/app/assets/{css-DCU9xFkE.js → css-A1NYvfcV.js} +1 -1
- package/dist/app/assets/{css-extras-Ckmc7uv9.js → css-extras-DSsOd8f_.js} +1 -1
- package/dist/app/assets/{csv-CNjzF0PO.js → csv-BrdkiUQb.js} +1 -1
- package/dist/app/assets/{cypher-DPLmc-Ma.js → cypher-MWVOm8yN.js} +1 -1
- package/dist/app/assets/{d-CdWT-gse.js → d-BpOrYr7d.js} +1 -1
- package/dist/app/assets/{dagre-KV5264BT-C3ab1q9U.js → dagre-KV5264BT-BrSuD7-U.js} +1 -1
- package/dist/app/assets/{dart-DdYWV7ct.js → dart-C0GBSKHy.js} +1 -1
- package/dist/app/assets/{dataweave-C5W_3HZG.js → dataweave-BaRmBwDh.js} +1 -1
- package/dist/app/assets/{dax-0ZHKjNra.js → dax-D9knB6HK.js} +1 -1
- package/dist/app/assets/{dhall-diSpDg-O.js → dhall-CRtWuM7k.js} +1 -1
- package/dist/app/assets/{diagram-5BDNPKRD-mizJRRGO.js → diagram-5BDNPKRD-Dg_BPUr3.js} +1 -1
- package/dist/app/assets/{diagram-G4DWMVQ6-MBmTTV5Y.js → diagram-G4DWMVQ6-CuNG3uS8.js} +1 -1
- package/dist/app/assets/{diagram-MMDJMWI5-71k_ygVD.js → diagram-MMDJMWI5-gyjqG3UJ.js} +1 -1
- package/dist/app/assets/{diagram-TYMM5635-CGZzu56j.js → diagram-TYMM5635-BOBArauA.js} +1 -1
- package/dist/app/assets/{diff-BFV8DUsm.js → diff-1jXFAE9-.js} +1 -1
- package/dist/app/assets/{dist-PKZR6RSH-DjgOBuSD.js → dist-PKZR6RSH-CihMZwfS.js} +1 -1
- package/dist/app/assets/{django-CFoNrF-0.js → django-B8Fvwagw.js} +1 -1
- package/dist/app/assets/{dns-zone-file--UTJ7-fa.js → dns-zone-file-eYrA3DMk.js} +1 -1
- package/dist/app/assets/{docker-BZx1MKLq.js → docker-DcwG3M3S.js} +1 -1
- package/dist/app/assets/{dot-rNU_fIQ1.js → dot-7LgW6Pxt.js} +1 -1
- package/dist/app/assets/{ebnf-0mgU4kb0.js → ebnf-BIBhxWki.js} +1 -1
- package/dist/app/assets/{editorconfig-BWt_p39L.js → editorconfig-aS9yZiII.js} +1 -1
- package/dist/app/assets/{eiffel-D6pl18pL.js → eiffel-CbtB_wg4.js} +1 -1
- package/dist/app/assets/{ejs-C9ram-aB.js → ejs-CAyJOUgz.js} +1 -1
- package/dist/app/assets/{elixir-BNJ70-9P.js → elixir-CJTRbv1S.js} +1 -1
- package/dist/app/assets/{elm-B7wvsXNP.js → elm-rs-d6fza.js} +1 -1
- package/dist/app/assets/{erDiagram-SMLLAGMA-Dvaj8Iu_.js → erDiagram-SMLLAGMA-cwYzboAh.js} +1 -1
- package/dist/app/assets/{erb-OSP6dFDd.js → erb-CUzxl3q1.js} +1 -1
- package/dist/app/assets/{erlang-CVfi9bqs.js → erlang-B9-MMmZw.js} +1 -1
- package/dist/app/assets/{etlua-5UiB26kx.js → etlua-BolNWEL6.js} +1 -1
- package/dist/app/assets/{excel-formula-B0BIRxVc.js → excel-formula-Dgpq9kjo.js} +1 -1
- package/dist/app/assets/{factor-BAbjmnLc.js → factor-BWuJXGFq.js} +1 -1
- package/dist/app/assets/{false-IFHQzYem.js → false-D-oTDaaL.js} +1 -1
- package/dist/app/assets/{firestore-security-rules-oEMPG-gE.js → firestore-security-rules-BraxdQEs.js} +1 -1
- package/dist/app/assets/{flow-C9nh8WaU.js → flow-BPYSMfYG.js} +1 -1
- package/dist/app/assets/{flowDiagram-DWJPFMVM-B9YFVrfY.js → flowDiagram-DWJPFMVM-DgzkJClR.js} +1 -1
- package/dist/app/assets/{fortran-fXw0VEnD.js → fortran-T_iQIE2B.js} +1 -1
- package/dist/app/assets/{fsharp-DmKfIF1k.js → fsharp-DqD5OmJK.js} +1 -1
- package/dist/app/assets/{ftl-E5NWNj8l.js → ftl-BovgQIrB.js} +1 -1
- package/dist/app/assets/{ganttDiagram-T4ZO3ILL-e7K05Zxt.js → ganttDiagram-T4ZO3ILL-CBzD8A0w.js} +1 -1
- package/dist/app/assets/{gap-CNzKIazc.js → gap-85TS250G.js} +1 -1
- package/dist/app/assets/{gcode-ukiUmO8u.js → gcode-BW6Qk-5-.js} +1 -1
- package/dist/app/assets/{gdscript-6YlAxvCA.js → gdscript-CLxmTRf5.js} +1 -1
- package/dist/app/assets/{gedcom-DMZa4LMy.js → gedcom-Cb7Ao7zc.js} +1 -1
- package/dist/app/assets/{gherkin-DjFGClHI.js → gherkin-BJuAxsMs.js} +1 -1
- package/dist/app/assets/{git-BkkNyHbU.js → git-C2pBzbsu.js} +1 -1
- package/dist/app/assets/{gitGraphDiagram-UUTBAWPF-D-Zq_-TD.js → gitGraphDiagram-UUTBAWPF-_tqBjJON.js} +1 -1
- package/dist/app/assets/{glsl-r1Lx6-GS.js → glsl-CC9Lx2uz.js} +1 -1
- package/dist/app/assets/{gml-CSXFRSzq.js → gml-Cb4YXigx.js} +1 -1
- package/dist/app/assets/{gn-DPvzuG7b.js → gn-kQb5aGb5.js} +1 -1
- package/dist/app/assets/{go-4zNX79zX.js → go-DNAlVb2O.js} +1 -1
- package/dist/app/assets/{go-module-Jq5FE0dY.js → go-module-C_VDBUP4.js} +1 -1
- package/dist/app/assets/{graph-D-0AeiZY.js → graph-RvCEEoBA.js} +1 -1
- package/dist/app/assets/{graphql-COLFFtR5.js → graphql-W05aJ9xQ.js} +1 -1
- package/dist/app/assets/{groovy-BreujMd8.js → groovy-DHhMsfeb.js} +1 -1
- package/dist/app/assets/{haml-CPS7qWi9.js → haml-D-E4bZH-.js} +1 -1
- package/dist/app/assets/{handlebars-BaqT-oNF.js → handlebars-CscBBTqv.js} +1 -1
- package/dist/app/assets/{haskell-BVCFQOfY.js → haskell-zlEk3XCa.js} +1 -1
- package/dist/app/assets/{haxe-BsAXPi99.js → haxe-DStWUlo8.js} +1 -1
- package/dist/app/assets/{hcl-BON4s1jo.js → hcl-Cz7FUhgX.js} +1 -1
- package/dist/app/assets/{hlsl-J-b3q-ly.js → hlsl-C_iG3tnK.js} +1 -1
- package/dist/app/assets/{hoon-cZQ-E62q.js → hoon-CP_MZxgs.js} +1 -1
- package/dist/app/assets/{hpkp-Bb0ah-tb.js → hpkp-ex07fbEj.js} +1 -1
- package/dist/app/assets/{hsts-8Gg-zo7j.js → hsts-BPQ_l1UN.js} +1 -1
- package/dist/app/assets/{http-DacEgepu.js → http-OrRAX_xg.js} +1 -1
- package/dist/app/assets/{ichigojam-a_iNynue.js → ichigojam-_EHo3Vus.js} +1 -1
- package/dist/app/assets/{icon-6u9tqqdz.js → icon-D--jckSQ.js} +1 -1
- package/dist/app/assets/{icu-message-format-Dz7pcs6Y.js → icu-message-format-BLzJeT5b.js} +1 -1
- package/dist/app/assets/{idris-BmhTh_-f.js → idris-m5bn3p8K.js} +1 -1
- package/dist/app/assets/{iecst-BG9__P6s.js → iecst-C3iDlseF.js} +1 -1
- package/dist/app/assets/{ignore-D_gBUdJ8.js → ignore-jQg1pBvx.js} +1 -1
- package/dist/app/assets/{index-DQ1u_XQP.js → index-zFXf25RZ.js} +186 -186
- package/dist/app/assets/{infoDiagram-42DDH7IO-C2_SqG63.js → infoDiagram-42DDH7IO-Co6iBt5T.js} +1 -1
- package/dist/app/assets/{inform7-uiPxXCVO.js → inform7-D5m58Y4T.js} +1 -1
- package/dist/app/assets/{ini-B9gdE7jG.js → ini-U99GmdZD.js} +1 -1
- package/dist/app/assets/{io-J0_8YN_8.js → io-3ii9gOuT.js} +1 -1
- package/dist/app/assets/{ishikawaDiagram-UXIWVN3A-C4iX8cc_.js → ishikawaDiagram-UXIWVN3A-4dAZpmVu.js} +1 -1
- package/dist/app/assets/{j-czuGPVE9.js → j-DeoVcD4r.js} +1 -1
- package/dist/app/assets/{java-DJIfMelo.js → java-DhS74ZiS.js} +1 -1
- package/dist/app/assets/{javadoc-WP6xLSqx.js → javadoc-D_UUB6dm.js} +1 -1
- package/dist/app/assets/{javadoclike-CJy77lz3.js → javadoclike-BoEjGF-R.js} +1 -1
- package/dist/app/assets/{javascript-DvUBISvg.js → javascript-p3NQWzRq.js} +1 -1
- package/dist/app/assets/{javastacktrace-BG44M8VU.js → javastacktrace-D4FIcAET.js} +1 -1
- package/dist/app/assets/{jexl-BOtf2Rab.js → jexl-DmvRiAUk.js} +1 -1
- package/dist/app/assets/{jolie-BbL4e-kD.js → jolie-B0b5yOXD.js} +1 -1
- package/dist/app/assets/{journeyDiagram-VCZTEJTY-Bo3hBIrm.js → journeyDiagram-VCZTEJTY-Bor603I6.js} +1 -1
- package/dist/app/assets/{jq-4yAlEiTR.js → jq-DBpc5y5q.js} +1 -1
- package/dist/app/assets/{js-extras-jslB_DR9.js → js-extras-BitHRC94.js} +1 -1
- package/dist/app/assets/{js-templates-DoSGFylx.js → js-templates-bAbwg7K4.js} +1 -1
- package/dist/app/assets/{jsdoc-BOvVn3GT.js → jsdoc-CHov7UEh.js} +1 -1
- package/dist/app/assets/{json-BA0JyP4P.js → json-B-UgUOcv.js} +1 -1
- package/dist/app/assets/{json5-B_b6aDTF.js → json5-CCSh4M_u.js} +1 -1
- package/dist/app/assets/{jsonp-DgtMYP33.js → jsonp-2gpJDalc.js} +1 -1
- package/dist/app/assets/{jsstacktrace-BBSFrnYd.js → jsstacktrace-YhInxKZX.js} +1 -1
- package/dist/app/assets/{jsx-C7skqKvu.js → jsx-D1UpiF2P.js} +1 -1
- package/dist/app/assets/{jszip.min-DA4sCx04.js → jszip.min-Dt-AHYC0.js} +1 -1
- package/dist/app/assets/{julia-D40TOS-P.js → julia-CyjWo2i8.js} +1 -1
- package/dist/app/assets/{kanban-definition-6JOO6SKY-CJDuIitV.js → kanban-definition-6JOO6SKY-U-hYiLA-.js} +1 -1
- package/dist/app/assets/{keepalived-DQdz9Yr5.js → keepalived-BYriwcGy.js} +1 -1
- package/dist/app/assets/{keyman-C82bmBIW.js → keyman-34br4hCO.js} +1 -1
- package/dist/app/assets/{kotlin-CpYN0qVQ.js → kotlin-Bkqpta0R.js} +1 -1
- package/dist/app/assets/{kumir-C-1IoGSJ.js → kumir-DWXuCeXz.js} +1 -1
- package/dist/app/assets/{kusto-BTckXa0N.js → kusto-0O4e57D9.js} +1 -1
- package/dist/app/assets/{latex-8VdO0m7g.js → latex-CMlF4dEe.js} +1 -1
- package/dist/app/assets/{latte-J8MLZCUy.js → latte-D1e6h-zD.js} +1 -1
- package/dist/app/assets/{layout-B6UXO29M.js → layout-eGBUxe5W.js} +1 -1
- package/dist/app/assets/{less-Ci6JgDVy.js → less-C13T9UPd.js} +1 -1
- package/dist/app/assets/{lilypond-Bbu8yJJG.js → lilypond-Dn5zAXrr.js} +1 -1
- package/dist/app/assets/{linear-D9CsfRLr.js → linear-DgFEqEXs.js} +1 -1
- package/dist/app/assets/{liquid-Lre--kGo.js → liquid-C-Pt_Vny.js} +1 -1
- package/dist/app/assets/{lisp-CquNYf6B.js → lisp-BO5glOUn.js} +1 -1
- package/dist/app/assets/{livescript-BchBEkL3.js → livescript-Dd6zEmXh.js} +1 -1
- package/dist/app/assets/{llvm-BbwlCS6y.js → llvm-CYjba539.js} +1 -1
- package/dist/app/assets/{log-B8hK0q1F.js → log-a0wt7bko.js} +1 -1
- package/dist/app/assets/{lolcode-DpJlmC5z.js → lolcode-0JFVhyfh.js} +1 -1
- package/dist/app/assets/{lua-BpC7sbmr.js → lua-DRO0x4Co.js} +1 -1
- package/dist/app/assets/{magma-WEs1sOH8.js → magma-bkMcN84t.js} +1 -1
- package/dist/app/assets/{makefile-qGQTa9ZD.js → makefile-CsXB54hy.js} +1 -1
- package/dist/app/assets/{markdown-DupXwYt_.js → markdown-Ca3OokvM.js} +1 -1
- package/dist/app/assets/{markup-Bg_hQlZ8.js → markup-C11HSQJl.js} +1 -1
- package/dist/app/assets/{markup-templating-DU4CElcC.js → markup-templating-CWaNNuuv.js} +1 -1
- package/dist/app/assets/{matlab-CZhZkjDT.js → matlab-BHxkh0cK.js} +1 -1
- package/dist/app/assets/{maxscript-B37oqvDp.js → maxscript-CenV4s5A.js} +1 -1
- package/dist/app/assets/{mel-Ciw9lMWa.js → mel-D5b9wd9J.js} +1 -1
- package/dist/app/assets/{mermaid-D4Ozqq47.js → mermaid-DpwUW522.js} +1 -1
- package/dist/app/assets/{min-BxWVF8H3.js → min-ZXeeloXH.js} +1 -1
- package/dist/app/assets/{mindmap-definition-QFDTVHPH-iLxzVo8p.js → mindmap-definition-QFDTVHPH-DJd5id_i.js} +1 -1
- package/dist/app/assets/{mizar-Cs0ZNGLm.js → mizar-DklHxYKD.js} +1 -1
- package/dist/app/assets/{mongodb-D7yhCTpQ.js → mongodb-BG3ojuXH.js} +1 -1
- package/dist/app/assets/{monkey-DL2IPbkH.js → monkey-VpryXw-8.js} +1 -1
- package/dist/app/assets/{moonscript-97owwo55.js → moonscript-D76ynE1M.js} +1 -1
- package/dist/app/assets/{n1ql-Bjnsw9L4.js → n1ql-C3IMeS46.js} +1 -1
- package/dist/app/assets/{n4js-D7zBIaz7.js → n4js-Cvjzz6v5.js} +1 -1
- package/dist/app/assets/{nand2tetris-hdl-CPBLLNsG.js → nand2tetris-hdl-CGK2rJb_.js} +1 -1
- package/dist/app/assets/{naniscript-CU1xqUsG.js → naniscript-z5gCYRIw.js} +1 -1
- package/dist/app/assets/{nasm-DFsG3tKO.js → nasm-DuSg-eT9.js} +1 -1
- package/dist/app/assets/{neon-DCIXYMAN.js → neon-Djjs3REP.js} +1 -1
- package/dist/app/assets/{nevod-cC1V6erS.js → nevod-CN5G_5rU.js} +1 -1
- package/dist/app/assets/{nginx-CoMoXFra.js → nginx-BWWt8A1j.js} +1 -1
- package/dist/app/assets/{nim-DKwugr4B.js → nim-HOSGhPSy.js} +1 -1
- package/dist/app/assets/{nix-Uq6_h-Th.js → nix-D12N_kci.js} +1 -1
- package/dist/app/assets/{nsis-nslEJQ3f.js → nsis-B1v-kqJf.js} +1 -1
- package/dist/app/assets/{objectivec-B7WSXBh-.js → objectivec-Brgm4idR.js} +1 -1
- package/dist/app/assets/{ocaml-Qeh2TiWs.js → ocaml-7vtyt6C7.js} +1 -1
- package/dist/app/assets/{opencl-DKhSFh1g.js → opencl-1Y6L_YpV.js} +1 -1
- package/dist/app/assets/{openqasm-c9kc2ucY.js → openqasm-C3cbIpYJ.js} +1 -1
- package/dist/app/assets/{oz-CGsDPISj.js → oz-DuJJROqC.js} +1 -1
- package/dist/app/assets/{parigp-BoY4pGJB.js → parigp-CqzuXo0B.js} +1 -1
- package/dist/app/assets/{parser-CYrOtsxy.js → parser-DPIFi1zk.js} +1 -1
- package/dist/app/assets/{pascal-D_xmH32v.js → pascal-8jBCOys9.js} +1 -1
- package/dist/app/assets/{pascaligo-DrbT6WGy.js → pascaligo-BYAmePB4.js} +1 -1
- package/dist/app/assets/{pcaxis-BU0-Bfik.js → pcaxis-CH_jwvLo.js} +1 -1
- package/dist/app/assets/{peoplecode-D0CPLC3y.js → peoplecode-BCEe26dc.js} +1 -1
- package/dist/app/assets/{perl-DzOLh-Sz.js → perl-CfyL0fkk.js} +1 -1
- package/dist/app/assets/{php-D27789CP.js → php-BEdNzSLG.js} +1 -1
- package/dist/app/assets/{php-extras-B3eD3T27.js → php-extras-Cdo7FfZH.js} +1 -1
- package/dist/app/assets/{phpdoc-SUeF-HmH.js → phpdoc-5uiCeBAb.js} +1 -1
- package/dist/app/assets/{pieDiagram-DEJITSTG-B-3oqsmZ.js → pieDiagram-DEJITSTG-5Xgf1apo.js} +1 -1
- package/dist/app/assets/{plsql-B_ZQ-kgG.js → plsql-CaFGgNQX.js} +1 -1
- package/dist/app/assets/{powerquery-qlqj_NnS.js → powerquery-U6G7w8j2.js} +1 -1
- package/dist/app/assets/{powershell-PES0zhk3.js → powershell-BEQa27Pd.js} +1 -1
- package/dist/app/assets/{processing-ZYlQt6y7.js → processing-CPJVmlX3.js} +1 -1
- package/dist/app/assets/{prolog-BCGlS7qY.js → prolog-DQ4S2uId.js} +1 -1
- package/dist/app/assets/{promql-Bg-xm-_r.js → promql-DHu3TLQW.js} +1 -1
- package/dist/app/assets/{properties-ChMdrnoK.js → properties-BEEa0JNa.js} +1 -1
- package/dist/app/assets/{protobuf-BDBdP06k.js → protobuf-DnIXDpDi.js} +1 -1
- package/dist/app/assets/{psl-D_NOQCgU.js → psl-D6F0X7gI.js} +1 -1
- package/dist/app/assets/{pug-CvfPjFWG.js → pug-usp0TnS_.js} +1 -1
- package/dist/app/assets/{puppet-CbwaWWhs.js → puppet-CCmIBC5o.js} +1 -1
- package/dist/app/assets/{pure-BvxP6QLa.js → pure-CxW_7PSX.js} +1 -1
- package/dist/app/assets/{purebasic-Bb7dW61V.js → purebasic-CUlLSqEL.js} +1 -1
- package/dist/app/assets/{purescript-CiBEq1gB.js → purescript-DIdsMdqD.js} +1 -1
- package/dist/app/assets/{q-Dzl25_Zb.js → q-r79YD-RS.js} +1 -1
- package/dist/app/assets/{qml-CdI-wA_a.js → qml-BC7wMM6Q.js} +1 -1
- package/dist/app/assets/{qore-CbupSjiC.js → qore-WxsAKgCD.js} +1 -1
- package/dist/app/assets/{qsharp-CDf_hv3F.js → qsharp-D7lLZD3n.js} +1 -1
- package/dist/app/assets/{quadrantDiagram-34T5L4WZ-pqwmuRAl.js → quadrantDiagram-34T5L4WZ-DTIcGAOk.js} +1 -1
- package/dist/app/assets/{r-DP1VhR93.js → r-P0CM9urb.js} +1 -1
- package/dist/app/assets/{racket-DUwfD5Wc.js → racket-DVeucTFY.js} +1 -1
- package/dist/app/assets/{reason-CHMw7nF4.js → reason-BgQvAQAD.js} +1 -1
- package/dist/app/assets/{regex-CHaiBvXc.js → regex-sqaSbvSv.js} +1 -1
- package/dist/app/assets/{rego-CEKg4V_1.js → rego-CJIg56LF.js} +1 -1
- package/dist/app/assets/{renpy-CInCIwEx.js → renpy-_gDjY0Al.js} +1 -1
- package/dist/app/assets/{requirementDiagram-MS252O5E-BefR5LfP.js → requirementDiagram-MS252O5E-CE7JMmce.js} +1 -1
- package/dist/app/assets/{rest-CpYuOEzO.js → rest-CiU1bgMd.js} +1 -1
- package/dist/app/assets/{rip-CifHSIPx.js → rip-DggWyO7M.js} +1 -1
- package/dist/app/assets/{roboconf-B0VvQ9hE.js → roboconf-CSJ0x616.js} +1 -1
- package/dist/app/assets/{robotframework-UWjApobE.js → robotframework-CDF7dCNt.js} +1 -1
- package/dist/app/assets/{ruby-BMoJw9Ts.js → ruby-DiJ0PRoD.js} +1 -1
- package/dist/app/assets/{rust-DMnQv1lD.js → rust-BFlAZ4n1.js} +1 -1
- package/dist/app/assets/{sankeyDiagram-XADWPNL6-Cz7nlBZm.js → sankeyDiagram-XADWPNL6-C6L2VVck.js} +1 -1
- package/dist/app/assets/{sas-fzacnXdE.js → sas-Cqi8ANTk.js} +1 -1
- package/dist/app/assets/{sass-DQoWRGgE.js → sass-Fcz-_iW-.js} +1 -1
- package/dist/app/assets/{scala-DriG1sps.js → scala-CxvM-FLQ.js} +1 -1
- package/dist/app/assets/{scheme-DCZ0lMtk.js → scheme-kpBg6tVA.js} +1 -1
- package/dist/app/assets/{scss-C2eqpEnN.js → scss-DXz1iRbh.js} +1 -1
- package/dist/app/assets/{sequenceDiagram-FGHM5R23-DMFeE8FE.js → sequenceDiagram-FGHM5R23-x40S7kZo.js} +1 -1
- package/dist/app/assets/{shell-session-CdOS5CmC.js → shell-session-DFP85I_o.js} +1 -1
- package/dist/app/assets/{smali-EPhk-kdo.js → smali-B-rVIGx2.js} +1 -1
- package/dist/app/assets/{smalltalk-B9zVgtzs.js → smalltalk-DZhpacIf.js} +1 -1
- package/dist/app/assets/{smarty-Bj5ujn1X.js → smarty-BYkPoV7-.js} +1 -1
- package/dist/app/assets/{sml-hZAWP4n8.js → sml-Bpl2hT9d.js} +1 -1
- package/dist/app/assets/{solidity-BANKZlXJ.js → solidity-m14I6_Ub.js} +1 -1
- package/dist/app/assets/{solution-file-CQCZg4Pb.js → solution-file-lgJK1sXF.js} +1 -1
- package/dist/app/assets/{soy-D2ndaEdL.js → soy-CmkNlVMo.js} +1 -1
- package/dist/app/assets/{sparql-DPKLFogl.js → sparql-C8X9qBCV.js} +1 -1
- package/dist/app/assets/{splunk-spl-C5sblTsi.js → splunk-spl-D340jzbt.js} +1 -1
- package/dist/app/assets/{sqf-CJWrKXtY.js → sqf-Cy9hNmyR.js} +1 -1
- package/dist/app/assets/{sql-BlHlNADc.js → sql-BuosKQRc.js} +1 -1
- package/dist/app/assets/{squirrel-SROj3Ywg.js → squirrel-8Uir-D81.js} +1 -1
- package/dist/app/assets/{stan-DPo5NegI.js → stan-DwOB-m45.js} +1 -1
- package/dist/app/assets/{stateDiagram-FHFEXIEX-C88VwKG-.js → stateDiagram-FHFEXIEX-eK4Mr2m1.js} +1 -1
- package/dist/app/assets/stateDiagram-v2-QKLJ7IA2-C3M7UFxa.js +1 -0
- package/dist/app/assets/{stylus-5tDFkD58.js → stylus-D9o8ycmV.js} +1 -1
- package/dist/app/assets/{swift-DlzBJw1i.js → swift-6P1oJjtu.js} +1 -1
- package/dist/app/assets/{systemd-BQX9TheV.js → systemd-CB40GGbI.js} +1 -1
- package/dist/app/assets/{t4-cs-8wOroOj8.js → t4-cs-oDtZSVDr.js} +1 -1
- package/dist/app/assets/{t4-templating-CjnZj9v-.js → t4-templating-BNqgqrov.js} +1 -1
- package/dist/app/assets/{t4-vb-CtL70anm.js → t4-vb-Cv8f7UA2.js} +1 -1
- package/dist/app/assets/{tap-C39zc0JC.js → tap-CbrEfuBB.js} +1 -1
- package/dist/app/assets/{tcl-Bc8yuyBv.js → tcl-BO7rxJbt.js} +1 -1
- package/dist/app/assets/{textile-CwNGBWO0.js → textile-BTqL4BpR.js} +1 -1
- package/dist/app/assets/{timeline-definition-GMOUNBTQ-DNhoVqjX.js → timeline-definition-GMOUNBTQ-Bx9k8UuZ.js} +1 -1
- package/dist/app/assets/{toNumber-GCpZEhkW.js → toNumber-BHLUnJCk.js} +1 -1
- package/dist/app/assets/{toml-Do0QQQt7.js → toml-KtQBEurb.js} +1 -1
- package/dist/app/assets/{tremor-CaYxONrM.js → tremor-Dk70TmsK.js} +1 -1
- package/dist/app/assets/{tt2-hpYxJXYL.js → tt2-DnQZgW9E.js} +1 -1
- package/dist/app/assets/{turtle-FRnBdZ1V.js → turtle-D8QBc8HO.js} +1 -1
- package/dist/app/assets/{twig-gqa8auAa.js → twig-BOYkX3KT.js} +1 -1
- package/dist/app/assets/{typescript-CC7a5MgY.js → typescript-B7MN9vbP.js} +1 -1
- package/dist/app/assets/{typoscript-DrKQaTJE.js → typoscript-CJp8dvAS.js} +1 -1
- package/dist/app/assets/{unrealscript-DYV9vveI.js → unrealscript-CgTA2YQi.js} +1 -1
- package/dist/app/assets/{uorazor-CcROpRIN.js → uorazor-APvKotZB.js} +1 -1
- package/dist/app/assets/{uri-CatKQDMP.js → uri-D-yR2anw.js} +1 -1
- package/dist/app/assets/{v-D7jwYpfK.js → v-BDwYNgP_.js} +1 -1
- package/dist/app/assets/{vala-DMgHsITF.js → vala-DgEvv5Sb.js} +1 -1
- package/dist/app/assets/{vbnet-WJnbHqEj.js → vbnet-DN-ptnmb.js} +1 -1
- package/dist/app/assets/{velocity-M0jmXzsJ.js → velocity-s30ZYDZQ.js} +1 -1
- package/dist/app/assets/{vennDiagram-DHZGUBPP-BMuBa3ui.js → vennDiagram-DHZGUBPP-DXNVFN6S.js} +1 -1
- package/dist/app/assets/{verilog-DeqBFqzp.js → verilog-BW90SBzF.js} +1 -1
- package/dist/app/assets/{vhdl-C0mfpJAx.js → vhdl-BBFaZHgH.js} +1 -1
- package/dist/app/assets/{vim-16JmeD6k.js → vim-CB_5_dbu.js} +1 -1
- package/dist/app/assets/{visual-basic-Hul7-u-l.js → visual-basic-C7gSM6IL.js} +1 -1
- package/dist/app/assets/{wardley-RL74JXVD-Cl5pXIg_.js → wardley-RL74JXVD-Bc8bssEU.js} +1 -1
- package/dist/app/assets/{wardleyDiagram-NUSXRM2D-BGCNd1-_.js → wardleyDiagram-NUSXRM2D-ChZrbBkL.js} +1 -1
- package/dist/app/assets/{warpscript-BcR0tthY.js → warpscript-CTVS4vLW.js} +1 -1
- package/dist/app/assets/{wasm-BTxoFDCC.js → wasm-DrDg6k1Q.js} +1 -1
- package/dist/app/assets/{web-idl-yCv8zTTp.js → web-idl-aPR6ivRq.js} +1 -1
- package/dist/app/assets/{wiki-DeD5-N6x.js → wiki-DQ0WLnSI.js} +1 -1
- package/dist/app/assets/{wolfram-BJG2UaEG.js → wolfram-DKc_7m0c.js} +1 -1
- package/dist/app/assets/{wren-CwBORL9K.js → wren-BfynSjz-.js} +1 -1
- package/dist/app/assets/{xeora-CulwM9uQ.js → xeora-BG1TDQ7h.js} +1 -1
- package/dist/app/assets/{xml-doc-CoXWg67E.js → xml-doc-BteNMTDL.js} +1 -1
- package/dist/app/assets/{xojo-UhWwUyFL.js → xojo-hLVHJe-j.js} +1 -1
- package/dist/app/assets/{xquery-7oQC5lWj.js → xquery-D5eD5vY-.js} +1 -1
- package/dist/app/assets/{xychartDiagram-5P7HB3ND-C7Ii4s-S.js → xychartDiagram-5P7HB3ND-DSRp0xPw.js} +1 -1
- package/dist/app/assets/{yaml-D_E0fYND.js → yaml-D_xQTJJ6.js} +1 -1
- package/dist/app/assets/{yang-1xDh68NF.js → yang-QHRqi2r2.js} +1 -1
- package/dist/app/assets/{zig-zO_Fpqxn.js → zig-CaTmNDOs.js} +1 -1
- package/dist/app/index.html +1 -1
- package/dist/index.cjs +893 -554
- package/dist/index.js +899 -557
- package/package.json +5 -5
- package/dist/app/assets/channel-DNc_2r3i.js +0 -1
- package/dist/app/assets/classDiagram-6PBFFD2Q-DL3Bwx9R.js +0 -1
- package/dist/app/assets/classDiagram-v2-HSJHXN6E-DL3Bwx9R.js +0 -1
- package/dist/app/assets/clone-DsfMAOvh.js +0 -1
- package/dist/app/assets/stateDiagram-v2-QKLJ7IA2-BaW4JmSx.js +0 -1
package/dist/index.cjs
CHANGED
|
@@ -1134,6 +1134,11 @@ var en_US_default = {
|
|
|
1134
1134
|
clientCommandUnavailable: "No handler is configured for client command {{commandKey}}."
|
|
1135
1135
|
},
|
|
1136
1136
|
externalAssistants: {
|
|
1137
|
+
cancel: "Cancel",
|
|
1138
|
+
cancelRun: "Cancel execution: {{name}}",
|
|
1139
|
+
cancelling: "Cancelling\u2026",
|
|
1140
|
+
cancelRequested: "Cancellation requested",
|
|
1141
|
+
cancelFailed: "Could not cancel the execution. Please try again.",
|
|
1137
1142
|
title: "External assistants",
|
|
1138
1143
|
openRun: "View execution: {{name}}",
|
|
1139
1144
|
back: "Back to executions",
|
|
@@ -1542,6 +1547,7 @@ var en_US_default = {
|
|
|
1542
1547
|
select: "Select project",
|
|
1543
1548
|
none: "No project",
|
|
1544
1549
|
autoNew: "New project \xB7 Create on send",
|
|
1550
|
+
confirmNew: "New project \xB7 Confirm settings first",
|
|
1545
1551
|
search: "Search projects",
|
|
1546
1552
|
new: "New project",
|
|
1547
1553
|
create: "Create",
|
|
@@ -1907,6 +1913,9 @@ var en_US_default = {
|
|
|
1907
1913
|
moreTags: "+{{count}}"
|
|
1908
1914
|
},
|
|
1909
1915
|
mcpApp: {
|
|
1916
|
+
openProjectFailed: "Unable to open this project.",
|
|
1917
|
+
refresh: "Refresh data",
|
|
1918
|
+
refreshFailed: "Unable to refresh data. Please try again.",
|
|
1910
1919
|
loading: "Loading MCP App",
|
|
1911
1920
|
fullscreen: "Open fullscreen",
|
|
1912
1921
|
pictureInPicture: "Open picture in picture",
|
|
@@ -1947,7 +1956,13 @@ var en_US_default = {
|
|
|
1947
1956
|
replied: "Replied",
|
|
1948
1957
|
pending: "Pending",
|
|
1949
1958
|
interrupted: "Interrupted",
|
|
1950
|
-
timeout: "Timed out"
|
|
1959
|
+
timeout: "Timed out",
|
|
1960
|
+
business_accepted: "Accepted",
|
|
1961
|
+
business_already_completed: "Already completed",
|
|
1962
|
+
business_not_claimed: "Not claimed",
|
|
1963
|
+
business_blocked: "Blocked",
|
|
1964
|
+
business_failed: "Task failed",
|
|
1965
|
+
business_incomplete: "Not accepted"
|
|
1951
1966
|
},
|
|
1952
1967
|
counts: {
|
|
1953
1968
|
messages: {
|
|
@@ -2063,7 +2078,7 @@ var en_US_default = {
|
|
|
2063
2078
|
pause: "Pause workflow",
|
|
2064
2079
|
resume: "Resume workflow",
|
|
2065
2080
|
cancelRun: "Stop task",
|
|
2066
|
-
pausing: "
|
|
2081
|
+
pausing: "Pausing",
|
|
2067
2082
|
paused: "Workflow paused",
|
|
2068
2083
|
editMessage: "Edit message",
|
|
2069
2084
|
sourcePauseUnavailable: "The original task cannot be paused yet. Try again after it finishes.",
|
|
@@ -2077,7 +2092,11 @@ var en_US_default = {
|
|
|
2077
2092
|
interrupted: "Waiting",
|
|
2078
2093
|
error: "Error",
|
|
2079
2094
|
running: "Running"
|
|
2080
|
-
}
|
|
2095
|
+
},
|
|
2096
|
+
stop: "Stop",
|
|
2097
|
+
stopping: "Stopping",
|
|
2098
|
+
stopDescription: "End this run without undoing completed actions",
|
|
2099
|
+
pausingDescription: "Waiting for the current step and checkpoint; you can still stop the run"
|
|
2081
2100
|
},
|
|
2082
2101
|
fileActivity: {
|
|
2083
2102
|
textLineChanges: "Text line changes",
|
|
@@ -2253,6 +2272,11 @@ var zh_CN_default = {
|
|
|
2253
2272
|
clientCommandUnavailable: "\u672A\u914D\u7F6E\u5BA2\u6237\u7AEF\u547D\u4EE4 {{commandKey}} \u7684\u5904\u7406\u5668\u3002"
|
|
2254
2273
|
},
|
|
2255
2274
|
externalAssistants: {
|
|
2275
|
+
cancel: "\u53D6\u6D88\u6267\u884C",
|
|
2276
|
+
cancelRun: "\u53D6\u6D88\u6267\u884C\uFF1A{{name}}",
|
|
2277
|
+
cancelling: "\u6B63\u5728\u53D6\u6D88\u2026",
|
|
2278
|
+
cancelRequested: "\u5DF2\u8BF7\u6C42\u53D6\u6D88",
|
|
2279
|
+
cancelFailed: "\u53D6\u6D88\u6267\u884C\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5\u3002",
|
|
2256
2280
|
title: "\u5916\u90E8\u52A9\u624B",
|
|
2257
2281
|
openRun: "\u67E5\u770B\u6267\u884C\uFF1A{{name}}",
|
|
2258
2282
|
back: "\u8FD4\u56DE\u6267\u884C\u5217\u8868",
|
|
@@ -2661,6 +2685,7 @@ var zh_CN_default = {
|
|
|
2661
2685
|
select: "\u9009\u62E9\u9879\u76EE",
|
|
2662
2686
|
none: "\u4E0D\u4F7F\u7528\u9879\u76EE",
|
|
2663
2687
|
autoNew: "\u65B0\u9879\u76EE \xB7 \u53D1\u9001\u540E\u81EA\u52A8\u521B\u5EFA",
|
|
2688
|
+
confirmNew: "\u65B0\u9879\u76EE \xB7 \u786E\u8BA4\u914D\u7F6E\u540E\u521B\u5EFA",
|
|
2664
2689
|
search: "\u641C\u7D22\u9879\u76EE",
|
|
2665
2690
|
new: "\u65B0\u5EFA\u9879\u76EE",
|
|
2666
2691
|
create: "\u521B\u5EFA",
|
|
@@ -3026,6 +3051,9 @@ var zh_CN_default = {
|
|
|
3026
3051
|
moreTags: "+{{count}}"
|
|
3027
3052
|
},
|
|
3028
3053
|
mcpApp: {
|
|
3054
|
+
openProjectFailed: "\u6682\u65F6\u65E0\u6CD5\u6253\u5F00\u6B64\u9879\u76EE\u3002",
|
|
3055
|
+
refresh: "\u5237\u65B0\u6570\u636E",
|
|
3056
|
+
refreshFailed: "\u6570\u636E\u5237\u65B0\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5\u3002",
|
|
3029
3057
|
loading: "\u6B63\u5728\u52A0\u8F7D MCP App",
|
|
3030
3058
|
fullscreen: "\u5168\u5C4F\u663E\u793A",
|
|
3031
3059
|
pictureInPicture: "\u753B\u4E2D\u753B\u663E\u793A",
|
|
@@ -3066,7 +3094,13 @@ var zh_CN_default = {
|
|
|
3066
3094
|
replied: "\u5DF2\u56DE\u590D",
|
|
3067
3095
|
pending: "\u7B49\u5F85\u4E2D",
|
|
3068
3096
|
interrupted: "\u5DF2\u4E2D\u65AD",
|
|
3069
|
-
timeout: "\u5DF2\u8D85\u65F6"
|
|
3097
|
+
timeout: "\u5DF2\u8D85\u65F6",
|
|
3098
|
+
business_accepted: "\u5DF2\u9A8C\u6536",
|
|
3099
|
+
business_already_completed: "\u5DF2\u5B8C\u6210\uFF0C\u65E0\u9700\u91CD\u590D",
|
|
3100
|
+
business_not_claimed: "\u672A\u9886\u53D6",
|
|
3101
|
+
business_blocked: "\u53D7\u963B",
|
|
3102
|
+
business_failed: "\u4EFB\u52A1\u5931\u8D25",
|
|
3103
|
+
business_incomplete: "\u672A\u9A8C\u6536"
|
|
3070
3104
|
},
|
|
3071
3105
|
counts: {
|
|
3072
3106
|
messages: {
|
|
@@ -3182,7 +3216,7 @@ var zh_CN_default = {
|
|
|
3182
3216
|
pause: "\u6682\u505C\u6D41\u7A0B",
|
|
3183
3217
|
resume: "\u6062\u590D\u6D41\u7A0B",
|
|
3184
3218
|
cancelRun: "\u505C\u6B62\u4EFB\u52A1",
|
|
3185
|
-
pausing: "\u6B63\u5728\
|
|
3219
|
+
pausing: "\u6B63\u5728\u6682\u505C",
|
|
3186
3220
|
paused: "\u6D41\u7A0B\u5DF2\u6682\u505C",
|
|
3187
3221
|
editMessage: "\u7F16\u8F91\u6D88\u606F",
|
|
3188
3222
|
sourcePauseUnavailable: "\u539F\u4EFB\u52A1\u6682\u4E0D\u652F\u6301\u6682\u505C\uFF0C\u8BF7\u5728\u4EFB\u52A1\u5B8C\u6210\u540E\u91CD\u8BD5\u3002",
|
|
@@ -3196,7 +3230,11 @@ var zh_CN_default = {
|
|
|
3196
3230
|
interrupted: "\u7B49\u5F85\u5904\u7406",
|
|
3197
3231
|
error: "\u51FA\u9519",
|
|
3198
3232
|
running: "\u8FD0\u884C\u4E2D"
|
|
3199
|
-
}
|
|
3233
|
+
},
|
|
3234
|
+
stop: "\u505C\u6B62",
|
|
3235
|
+
stopping: "\u6B63\u5728\u505C\u6B62",
|
|
3236
|
+
stopDescription: "\u7EC8\u6B62\u672C\u6B21\u8FD0\u884C\uFF0C\u4E0D\u64A4\u9500\u5DF2\u7ECF\u5B8C\u6210\u7684\u64CD\u4F5C",
|
|
3237
|
+
pausingDescription: "\u6B63\u5728\u7B49\u5F85\u5F53\u524D\u6B65\u9AA4\u5B8C\u6210\u5E76\u4FDD\u5B58\u8FDB\u5EA6\uFF1B\u4ECD\u53EF\u505C\u6B62\u8FD0\u884C"
|
|
3200
3238
|
},
|
|
3201
3239
|
fileActivity: {
|
|
3202
3240
|
textLineChanges: "\u6587\u672C\u884C\u53D8\u66F4",
|
|
@@ -5590,12 +5628,12 @@ async function loadConversationRuntimeCapabilities({
|
|
|
5590
5628
|
client,
|
|
5591
5629
|
threadId,
|
|
5592
5630
|
xpertId,
|
|
5593
|
-
projectId,
|
|
5631
|
+
projectId: projectId2,
|
|
5594
5632
|
capabilities
|
|
5595
5633
|
}) {
|
|
5596
5634
|
const conversation = await findConversationByThreadId(client, threadId, {
|
|
5597
5635
|
xpertId,
|
|
5598
|
-
projectId
|
|
5636
|
+
projectId: projectId2
|
|
5599
5637
|
});
|
|
5600
5638
|
const persistedSelection = getConversationOptions(conversation)?.runtimeCapabilities ?? null;
|
|
5601
5639
|
if (!persistedSelection) {
|
|
@@ -5618,7 +5656,7 @@ async function persistConversationRuntimeCapabilities({
|
|
|
5618
5656
|
client,
|
|
5619
5657
|
threadId,
|
|
5620
5658
|
xpertId,
|
|
5621
|
-
projectId,
|
|
5659
|
+
projectId: projectId2,
|
|
5622
5660
|
capabilities,
|
|
5623
5661
|
selection
|
|
5624
5662
|
}) {
|
|
@@ -5629,7 +5667,7 @@ async function persistConversationRuntimeCapabilities({
|
|
|
5629
5667
|
const conversation = await findConversationByThreadIdWithRetry(
|
|
5630
5668
|
client,
|
|
5631
5669
|
threadId,
|
|
5632
|
-
{ xpertId, projectId }
|
|
5670
|
+
{ xpertId, projectId: projectId2 }
|
|
5633
5671
|
);
|
|
5634
5672
|
if (!conversation?.id) {
|
|
5635
5673
|
return {
|
|
@@ -5776,14 +5814,14 @@ function createAssistantThreadPayload(assistantId, threadId) {
|
|
|
5776
5814
|
...threadId ? { threadId, ifExists: "raise" } : {}
|
|
5777
5815
|
};
|
|
5778
5816
|
}
|
|
5779
|
-
function createConversationPayload(threadId, xpertId,
|
|
5817
|
+
function createConversationPayload(threadId, xpertId, projectId2, connectorBindingIds = [], conversationId, runtimeCapabilities) {
|
|
5780
5818
|
const baseOptions = runtimeCapabilities ? { runtimeCapabilities } : void 0;
|
|
5781
5819
|
const options = connectorBindingIds.length ? withConnectorBindingIds(baseOptions, connectorBindingIds) : baseOptions;
|
|
5782
5820
|
return {
|
|
5783
5821
|
...conversationId ? { id: conversationId } : {},
|
|
5784
5822
|
threadId,
|
|
5785
5823
|
xpertId,
|
|
5786
|
-
...
|
|
5824
|
+
...projectId2 ? { projectId: projectId2 } : {},
|
|
5787
5825
|
...options ? { options } : {}
|
|
5788
5826
|
};
|
|
5789
5827
|
}
|
|
@@ -5864,7 +5902,7 @@ async function executeThreadGoalCommand({
|
|
|
5864
5902
|
goal,
|
|
5865
5903
|
threadId,
|
|
5866
5904
|
assistantId,
|
|
5867
|
-
projectId,
|
|
5905
|
+
projectId: projectId2,
|
|
5868
5906
|
command,
|
|
5869
5907
|
runtimeCapabilities,
|
|
5870
5908
|
signal
|
|
@@ -5910,7 +5948,7 @@ async function executeThreadGoalCommand({
|
|
|
5910
5948
|
const result2 = await goal.setGoal({
|
|
5911
5949
|
threadId: null,
|
|
5912
5950
|
assistantId,
|
|
5913
|
-
projectId,
|
|
5951
|
+
projectId: projectId2,
|
|
5914
5952
|
objective,
|
|
5915
5953
|
runtimeCapabilities,
|
|
5916
5954
|
signal
|
|
@@ -5929,7 +5967,7 @@ async function executeThreadGoalCommand({
|
|
|
5929
5967
|
const result = await goal.setGoal({
|
|
5930
5968
|
threadId: normalizedThreadId,
|
|
5931
5969
|
assistantId,
|
|
5932
|
-
projectId,
|
|
5970
|
+
projectId: projectId2,
|
|
5933
5971
|
objective,
|
|
5934
5972
|
runtimeCapabilities,
|
|
5935
5973
|
signal
|
|
@@ -6581,8 +6619,8 @@ function ComputerRow({
|
|
|
6581
6619
|
}
|
|
6582
6620
|
|
|
6583
6621
|
// src/components/chat.tsx
|
|
6584
|
-
var
|
|
6585
|
-
var
|
|
6622
|
+
var import_lucide_react76 = require("lucide-react");
|
|
6623
|
+
var React124 = __toESM(require("react"), 1);
|
|
6586
6624
|
|
|
6587
6625
|
// src/lib/composer-parts.ts
|
|
6588
6626
|
var COMPOSER_CAPABILITY_TOKEN_LENGTH = 1;
|
|
@@ -7605,7 +7643,7 @@ function getRemovedComposerCapabilityParts(previousParts, nextParts) {
|
|
|
7605
7643
|
function useRuntimeCapabilitiesState({
|
|
7606
7644
|
client,
|
|
7607
7645
|
assistantId,
|
|
7608
|
-
projectId,
|
|
7646
|
+
projectId: projectId2,
|
|
7609
7647
|
threadId,
|
|
7610
7648
|
disabled
|
|
7611
7649
|
}) {
|
|
@@ -7641,7 +7679,7 @@ function useRuntimeCapabilitiesState({
|
|
|
7641
7679
|
client,
|
|
7642
7680
|
threadId: nextThreadId,
|
|
7643
7681
|
xpertId: assistantId,
|
|
7644
|
-
projectId,
|
|
7682
|
+
projectId: projectId2,
|
|
7645
7683
|
capabilities: runtimeCapabilities,
|
|
7646
7684
|
selection
|
|
7647
7685
|
});
|
|
@@ -7656,7 +7694,7 @@ function useRuntimeCapabilitiesState({
|
|
|
7656
7694
|
);
|
|
7657
7695
|
}
|
|
7658
7696
|
},
|
|
7659
|
-
[assistantId, client,
|
|
7697
|
+
[assistantId, client, projectId2, runtimeCapabilities]
|
|
7660
7698
|
);
|
|
7661
7699
|
const applyExternalRuntimeCapabilities = React15.useCallback(
|
|
7662
7700
|
(selection) => {
|
|
@@ -7776,7 +7814,7 @@ function useRuntimeCapabilitiesState({
|
|
|
7776
7814
|
setRuntimeCapabilities(null);
|
|
7777
7815
|
setRuntimeCapabilityPalette(null);
|
|
7778
7816
|
void client.assistants.getRuntimeCapabilities(assistantId, {
|
|
7779
|
-
...
|
|
7817
|
+
...projectId2 ? { projectId: projectId2 } : {},
|
|
7780
7818
|
signal: controller.signal
|
|
7781
7819
|
}).then((payload) => {
|
|
7782
7820
|
setRuntimeCapabilities(payload);
|
|
@@ -7809,7 +7847,7 @@ function useRuntimeCapabilitiesState({
|
|
|
7809
7847
|
setRunRuntimeCapabilities(createEmptyRuntimeCapabilitiesSelection());
|
|
7810
7848
|
});
|
|
7811
7849
|
return () => controller.abort();
|
|
7812
|
-
}, [assistantId, client, disabled,
|
|
7850
|
+
}, [assistantId, client, disabled, projectId2]);
|
|
7813
7851
|
React15.useEffect(() => {
|
|
7814
7852
|
const emptyRunSelection = createEmptyRuntimeCapabilitiesSelection(runtimeCapabilities);
|
|
7815
7853
|
const pendingExternalSelection = pendingExternalRuntimeCapabilitiesRef.current;
|
|
@@ -7845,7 +7883,7 @@ function useRuntimeCapabilitiesState({
|
|
|
7845
7883
|
client,
|
|
7846
7884
|
threadId: normalizedThreadId,
|
|
7847
7885
|
xpertId: assistantId,
|
|
7848
|
-
projectId,
|
|
7886
|
+
projectId: projectId2,
|
|
7849
7887
|
capabilities: runtimeCapabilities
|
|
7850
7888
|
}).then(({ selection, missing }) => {
|
|
7851
7889
|
if (cancelled || runtimeCapabilityPreferenceLoadRef.current !== requestId) {
|
|
@@ -7869,7 +7907,7 @@ function useRuntimeCapabilitiesState({
|
|
|
7869
7907
|
}, [
|
|
7870
7908
|
assistantId,
|
|
7871
7909
|
client,
|
|
7872
|
-
|
|
7910
|
+
projectId2,
|
|
7873
7911
|
runtimeCapabilities,
|
|
7874
7912
|
runtimeCapabilitiesReady,
|
|
7875
7913
|
threadId
|
|
@@ -8614,7 +8652,7 @@ function useRuntimeResources({
|
|
|
8614
8652
|
client,
|
|
8615
8653
|
enabled,
|
|
8616
8654
|
assistantId,
|
|
8617
|
-
projectId,
|
|
8655
|
+
projectId: projectId2,
|
|
8618
8656
|
conversationId,
|
|
8619
8657
|
threadId
|
|
8620
8658
|
}) {
|
|
@@ -8637,8 +8675,8 @@ function useRuntimeResources({
|
|
|
8637
8675
|
const current = ++generation.current;
|
|
8638
8676
|
const pending = submission.current;
|
|
8639
8677
|
const isDraft = !conversationId && !threadId;
|
|
8640
|
-
const isHandoff = !!pending && pending.assistantId === assistantId && pending.projectId ===
|
|
8641
|
-
if (pending && !isHandoff && (!isDraft || pending.complete || pending.assistantId !== assistantId || pending.projectId !==
|
|
8678
|
+
const isHandoff = !!pending && pending.assistantId === assistantId && pending.projectId === projectId2 && (!!conversationId && conversationId === pending.conversationId || !!threadId && threadId === pending.threadId);
|
|
8679
|
+
if (pending && !isHandoff && (!isDraft || pending.complete || pending.assistantId !== assistantId || pending.projectId !== projectId2)) {
|
|
8642
8680
|
submission.current = null;
|
|
8643
8681
|
if (!isDraft || pending.complete) draft.current = null;
|
|
8644
8682
|
}
|
|
@@ -8657,7 +8695,7 @@ function useRuntimeResources({
|
|
|
8657
8695
|
void (async () => {
|
|
8658
8696
|
const id = conversationId ?? (threadId ? (await findConversationByThreadId(client, threadId, {
|
|
8659
8697
|
xpertId: assistantId,
|
|
8660
|
-
projectId
|
|
8698
|
+
projectId: projectId2
|
|
8661
8699
|
}))?.id : null);
|
|
8662
8700
|
if (!isDraft && !id) throw new Error(conversationUnavailable);
|
|
8663
8701
|
const value = id ? await client.conversations.getRuntimeResources(id) : local;
|
|
@@ -8665,7 +8703,7 @@ function useRuntimeResources({
|
|
|
8665
8703
|
await client.assistants.validateResources(
|
|
8666
8704
|
assistantId,
|
|
8667
8705
|
value,
|
|
8668
|
-
|
|
8706
|
+
projectId2 ?? void 0
|
|
8669
8707
|
);
|
|
8670
8708
|
if (generation.current === current) {
|
|
8671
8709
|
if (isHandoff && submission.current === pending)
|
|
@@ -8687,7 +8725,7 @@ function useRuntimeResources({
|
|
|
8687
8725
|
client,
|
|
8688
8726
|
enabled,
|
|
8689
8727
|
assistantId,
|
|
8690
|
-
|
|
8728
|
+
projectId2,
|
|
8691
8729
|
conversationId,
|
|
8692
8730
|
threadId,
|
|
8693
8731
|
reload,
|
|
@@ -8717,7 +8755,7 @@ function useRuntimeResources({
|
|
|
8717
8755
|
const saved = resolvedId ? await client.conversations.updateRuntimeResources(resolvedId, next) : await client.assistants.validateResources(
|
|
8718
8756
|
assistantId,
|
|
8719
8757
|
next,
|
|
8720
|
-
|
|
8758
|
+
projectId2 ?? void 0
|
|
8721
8759
|
);
|
|
8722
8760
|
if (current === generation.current) {
|
|
8723
8761
|
setSelection(saved);
|
|
@@ -8747,14 +8785,14 @@ function useRuntimeResources({
|
|
|
8747
8785
|
selection,
|
|
8748
8786
|
resolvedId,
|
|
8749
8787
|
assistantId,
|
|
8750
|
-
|
|
8788
|
+
projectId2
|
|
8751
8789
|
]
|
|
8752
8790
|
);
|
|
8753
8791
|
const beginSubmission = React19.useCallback(() => {
|
|
8754
8792
|
if (!enabled || !assistantId || conversationId || threadId) return;
|
|
8755
8793
|
const pending = {
|
|
8756
8794
|
assistantId,
|
|
8757
|
-
projectId,
|
|
8795
|
+
projectId: projectId2,
|
|
8758
8796
|
selection,
|
|
8759
8797
|
complete: false
|
|
8760
8798
|
};
|
|
@@ -8772,7 +8810,7 @@ function useRuntimeResources({
|
|
|
8772
8810
|
else submission.current = null;
|
|
8773
8811
|
}
|
|
8774
8812
|
};
|
|
8775
|
-
}, [enabled, assistantId,
|
|
8813
|
+
}, [enabled, assistantId, projectId2, conversationId, threadId, selection]);
|
|
8776
8814
|
return {
|
|
8777
8815
|
selection,
|
|
8778
8816
|
busy,
|
|
@@ -9057,7 +9095,7 @@ var import_jsx_runtime24 = require("react/jsx-runtime");
|
|
|
9057
9095
|
var ThreadMentionPalette = React21.forwardRef(function ThreadMentionPalette2({
|
|
9058
9096
|
client,
|
|
9059
9097
|
assistantId,
|
|
9060
|
-
projectId,
|
|
9098
|
+
projectId: projectId2,
|
|
9061
9099
|
threadId,
|
|
9062
9100
|
query,
|
|
9063
9101
|
selectedThreadIds,
|
|
@@ -9082,7 +9120,7 @@ var ThreadMentionPalette = React21.forwardRef(function ThreadMentionPalette2({
|
|
|
9082
9120
|
const timer = setTimeout(() => {
|
|
9083
9121
|
void client.conversations.search(
|
|
9084
9122
|
{
|
|
9085
|
-
where: { xpertId: assistantId, projectId:
|
|
9123
|
+
where: { xpertId: assistantId, projectId: projectId2 ?? null },
|
|
9086
9124
|
search: query.trim(),
|
|
9087
9125
|
limit: 30,
|
|
9088
9126
|
order: { updatedAt: "DESC", id: "DESC" }
|
|
@@ -9100,7 +9138,7 @@ var ThreadMentionPalette = React21.forwardRef(function ThreadMentionPalette2({
|
|
|
9100
9138
|
clearTimeout(timer);
|
|
9101
9139
|
controller.abort();
|
|
9102
9140
|
};
|
|
9103
|
-
}, [client, assistantId,
|
|
9141
|
+
}, [client, assistantId, projectId2, query]);
|
|
9104
9142
|
const visible = items.filter(
|
|
9105
9143
|
(item) => item.threadId && item.threadId !== threadId && !selectedThreadIds.has(item.threadId)
|
|
9106
9144
|
);
|
|
@@ -11173,11 +11211,11 @@ function invalidateConnectionCatalogs(client) {
|
|
|
11173
11211
|
notify(entry);
|
|
11174
11212
|
}
|
|
11175
11213
|
}
|
|
11176
|
-
function useConnectorCatalog(client, assistantId,
|
|
11214
|
+
function useConnectorCatalog(client, assistantId, projectId2, enabled = true) {
|
|
11177
11215
|
const entry = React37.useMemo(() => {
|
|
11178
11216
|
let scopes = clients.get(client);
|
|
11179
11217
|
if (!scopes) clients.set(client, scopes = /* @__PURE__ */ new Map());
|
|
11180
|
-
const key = JSON.stringify([assistantId,
|
|
11218
|
+
const key = JSON.stringify([assistantId, projectId2 ?? null]);
|
|
11181
11219
|
let cached = scopes.get(key);
|
|
11182
11220
|
if (!cached)
|
|
11183
11221
|
scopes.set(
|
|
@@ -11190,7 +11228,7 @@ function useConnectorCatalog(client, assistantId, projectId, enabled = true) {
|
|
|
11190
11228
|
}
|
|
11191
11229
|
);
|
|
11192
11230
|
return cached;
|
|
11193
|
-
}, [client, assistantId,
|
|
11231
|
+
}, [client, assistantId, projectId2]);
|
|
11194
11232
|
const revision = React37.useSyncExternalStore(
|
|
11195
11233
|
React37.useCallback(
|
|
11196
11234
|
(listener) => {
|
|
@@ -11210,7 +11248,7 @@ function useConnectorCatalog(client, assistantId, projectId, enabled = true) {
|
|
|
11210
11248
|
notify(entry);
|
|
11211
11249
|
const startedAt = entry.revision;
|
|
11212
11250
|
void client.connectors.runtimeOptions(assistantId, {
|
|
11213
|
-
projectId:
|
|
11251
|
+
projectId: projectId2 ?? void 0,
|
|
11214
11252
|
includeWorkspace: true
|
|
11215
11253
|
}).then((data) => {
|
|
11216
11254
|
entry.data = data;
|
|
@@ -11221,7 +11259,7 @@ function useConnectorCatalog(client, assistantId, projectId, enabled = true) {
|
|
|
11221
11259
|
entry.loaded = entry.revision === startedAt;
|
|
11222
11260
|
notify(entry);
|
|
11223
11261
|
});
|
|
11224
|
-
}, [entry, client, assistantId,
|
|
11262
|
+
}, [entry, client, assistantId, projectId2, enabled, revision]);
|
|
11225
11263
|
React37.useEffect(() => {
|
|
11226
11264
|
if (!enabled) return;
|
|
11227
11265
|
const refresh = () => {
|
|
@@ -11472,13 +11510,13 @@ function ConnectorMenuPanel(props) {
|
|
|
11472
11510
|
function ConnectorList({
|
|
11473
11511
|
client,
|
|
11474
11512
|
xpertId,
|
|
11475
|
-
projectId,
|
|
11513
|
+
projectId: projectId2,
|
|
11476
11514
|
selectedBindingIds = [],
|
|
11477
11515
|
onSelectionChange,
|
|
11478
11516
|
apiUrl
|
|
11479
11517
|
}) {
|
|
11480
11518
|
const { t, i18n: i18n2 } = useChatkitTranslation();
|
|
11481
|
-
const catalog = useConnectorCatalog(client, xpertId,
|
|
11519
|
+
const catalog = useConnectorCatalog(client, xpertId, projectId2);
|
|
11482
11520
|
const [query, setQuery] = React39.useState("");
|
|
11483
11521
|
const [target, setTarget] = React39.useState(null);
|
|
11484
11522
|
const latest = React39.useRef({ selectedBindingIds, onSelectionChange });
|
|
@@ -12704,6 +12742,7 @@ function ProjectSelector({
|
|
|
12704
12742
|
activeProjectId,
|
|
12705
12743
|
selection,
|
|
12706
12744
|
autoNewEnabled = false,
|
|
12745
|
+
autoNewMode = "on-send",
|
|
12707
12746
|
allowNone = true,
|
|
12708
12747
|
disabled = false,
|
|
12709
12748
|
locked = false,
|
|
@@ -12996,7 +13035,7 @@ function ProjectSelector({
|
|
|
12996
13035
|
"aria-label": t("composer.projects.select"),
|
|
12997
13036
|
children: [
|
|
12998
13037
|
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_lucide_react27.Folder, { className: "size-3.5 shrink-0" }),
|
|
12999
|
-
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)("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") }),
|
|
13038
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)("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") }),
|
|
13000
13039
|
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_lucide_react27.ChevronDown, { className: "size-3.5 shrink-0" })
|
|
13001
13040
|
]
|
|
13002
13041
|
}
|
|
@@ -13258,7 +13297,7 @@ function ProjectSelector({
|
|
|
13258
13297
|
setOpen(false);
|
|
13259
13298
|
},
|
|
13260
13299
|
children: [
|
|
13261
|
-
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)("span", { className: "flex-1", children: t("composer.projects.autoNew") }),
|
|
13300
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)("span", { className: "flex-1", children: t(autoNewMode === "after-confirmation" ? "composer.projects.confirmNew" : "composer.projects.autoNew") }),
|
|
13262
13301
|
!activeProjectId && selection?.mode === "auto-new" ? /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_lucide_react27.Check, { className: "size-4 shrink-0" }) : null
|
|
13263
13302
|
]
|
|
13264
13303
|
}
|
|
@@ -13748,7 +13787,7 @@ var fullCatalog = { search: "", allPages: true };
|
|
|
13748
13787
|
function useRuntimeResourceCatalog({
|
|
13749
13788
|
client,
|
|
13750
13789
|
assistantId,
|
|
13751
|
-
projectId,
|
|
13790
|
+
projectId: projectId2,
|
|
13752
13791
|
enabled,
|
|
13753
13792
|
query,
|
|
13754
13793
|
kind,
|
|
@@ -13757,7 +13796,7 @@ function useRuntimeResourceCatalog({
|
|
|
13757
13796
|
const { t } = useChatkitTranslation();
|
|
13758
13797
|
const cache = React47.useMemo(
|
|
13759
13798
|
() => ({
|
|
13760
|
-
scope: { client, assistantId, projectId },
|
|
13799
|
+
scope: { client, assistantId, projectId: projectId2 },
|
|
13761
13800
|
entries: /* @__PURE__ */ new Map(),
|
|
13762
13801
|
known: /* @__PURE__ */ new Map(),
|
|
13763
13802
|
// Historical metadata is presentation-only; it is never proof of availability.
|
|
@@ -13765,7 +13804,7 @@ function useRuntimeResourceCatalog({
|
|
|
13765
13804
|
verified: /* @__PURE__ */ new Map(),
|
|
13766
13805
|
controllers: /* @__PURE__ */ new Set()
|
|
13767
13806
|
}),
|
|
13768
|
-
[client, assistantId,
|
|
13807
|
+
[client, assistantId, projectId2]
|
|
13769
13808
|
);
|
|
13770
13809
|
const [revision, redraw] = React47.useReducer((value) => value + 1, 0);
|
|
13771
13810
|
const [actionError, setLoadError] = React47.useState(null);
|
|
@@ -13792,7 +13831,7 @@ function useRuntimeResourceCatalog({
|
|
|
13792
13831
|
}, [cache, refresh]);
|
|
13793
13832
|
const load = React47.useCallback(
|
|
13794
13833
|
async (target, more = false) => {
|
|
13795
|
-
const { client: client2, assistantId: assistantId2, projectId:
|
|
13834
|
+
const { client: client2, assistantId: assistantId2, projectId: projectId3 } = cache.scope;
|
|
13796
13835
|
const key2 = catalogKey(target);
|
|
13797
13836
|
const existing = cache.entries.get(key2);
|
|
13798
13837
|
if (existing?.loading || !more && (existing?.loaded || existing?.error))
|
|
@@ -13814,7 +13853,7 @@ function useRuntimeResourceCatalog({
|
|
|
13814
13853
|
try {
|
|
13815
13854
|
do {
|
|
13816
13855
|
const result = await client2.assistants.getResources(assistantId2, {
|
|
13817
|
-
projectId:
|
|
13856
|
+
projectId: projectId3 ?? void 0,
|
|
13818
13857
|
search: target.search || void 0,
|
|
13819
13858
|
kind: target.kind,
|
|
13820
13859
|
offset: entry2.offset,
|
|
@@ -13886,7 +13925,7 @@ function useRuntimeResourceCatalog({
|
|
|
13886
13925
|
{ bindingId: resource.bindingId, version: resource.version }
|
|
13887
13926
|
]
|
|
13888
13927
|
},
|
|
13889
|
-
|
|
13928
|
+
projectId2 ?? void 0
|
|
13890
13929
|
).then(() => {
|
|
13891
13930
|
if (!abort.signal.aborted)
|
|
13892
13931
|
cache.verified.set(key2, "previous_version");
|
|
@@ -13907,7 +13946,7 @@ function useRuntimeResourceCatalog({
|
|
|
13907
13946
|
selectedResources,
|
|
13908
13947
|
client,
|
|
13909
13948
|
assistantId,
|
|
13910
|
-
|
|
13949
|
+
projectId2,
|
|
13911
13950
|
revision
|
|
13912
13951
|
]);
|
|
13913
13952
|
const selectedItems = selectedResources.map(
|
|
@@ -13975,7 +14014,7 @@ function useCompactMenu() {
|
|
|
13975
14014
|
function RuntimeResourceSelector({
|
|
13976
14015
|
client,
|
|
13977
14016
|
assistantId,
|
|
13978
|
-
projectId,
|
|
14017
|
+
projectId: projectId2,
|
|
13979
14018
|
selection,
|
|
13980
14019
|
busy,
|
|
13981
14020
|
canEditResources = true,
|
|
@@ -14012,7 +14051,7 @@ function RuntimeResourceSelector({
|
|
|
14012
14051
|
const connectors = useConnectorCatalog(
|
|
14013
14052
|
client,
|
|
14014
14053
|
assistantId,
|
|
14015
|
-
|
|
14054
|
+
projectId2,
|
|
14016
14055
|
connectorsEnabled && (open || expanded || connectorBindingIds.length > 0)
|
|
14017
14056
|
);
|
|
14018
14057
|
const latest = React48.useRef({
|
|
@@ -14030,7 +14069,7 @@ function RuntimeResourceSelector({
|
|
|
14030
14069
|
const catalog = useRuntimeResourceCatalog({
|
|
14031
14070
|
client,
|
|
14032
14071
|
assistantId,
|
|
14033
|
-
projectId,
|
|
14072
|
+
projectId: projectId2,
|
|
14034
14073
|
enabled: open || expanded || selection.resources.length > 0,
|
|
14035
14074
|
query: active || expanded ? query : rootQuery,
|
|
14036
14075
|
kind: expanded ? browseKind : active ?? void 0,
|
|
@@ -14044,7 +14083,7 @@ function RuntimeResourceSelector({
|
|
|
14044
14083
|
setQuery("");
|
|
14045
14084
|
setRootQuery("");
|
|
14046
14085
|
setAuthorization(null);
|
|
14047
|
-
}, [assistantId,
|
|
14086
|
+
}, [assistantId, projectId2]);
|
|
14048
14087
|
const selected = new Set(selection.resources.map((item) => item.bindingId));
|
|
14049
14088
|
const selectedItems = catalog.selectedItems;
|
|
14050
14089
|
const selectedResources = selectedItems.filter(
|
|
@@ -14158,7 +14197,7 @@ function RuntimeResourceSelector({
|
|
|
14158
14197
|
bindingId: item.bindingId,
|
|
14159
14198
|
version: item.version,
|
|
14160
14199
|
serverName,
|
|
14161
|
-
projectId:
|
|
14200
|
+
projectId: projectId2 ?? void 0
|
|
14162
14201
|
}),
|
|
14163
14202
|
onAuthorized: async (signal) => {
|
|
14164
14203
|
let offset = 0;
|
|
@@ -14166,7 +14205,7 @@ function RuntimeResourceSelector({
|
|
|
14166
14205
|
let fresh;
|
|
14167
14206
|
do {
|
|
14168
14207
|
const page = await client.assistants.getResources(assistantId, {
|
|
14169
|
-
projectId:
|
|
14208
|
+
projectId: projectId2 ?? void 0,
|
|
14170
14209
|
kind: "agent_plugin",
|
|
14171
14210
|
search: item.title,
|
|
14172
14211
|
signal,
|
|
@@ -14641,6 +14680,7 @@ function SendButton({
|
|
|
14641
14680
|
stopDisabled = false,
|
|
14642
14681
|
onStop,
|
|
14643
14682
|
stopLabel = "Stop",
|
|
14683
|
+
stopIcon = "stop",
|
|
14644
14684
|
showResume = false,
|
|
14645
14685
|
resumeDisabled = false,
|
|
14646
14686
|
onResume,
|
|
@@ -14650,7 +14690,7 @@ function SendButton({
|
|
|
14650
14690
|
}) {
|
|
14651
14691
|
if (showStop || showResume) {
|
|
14652
14692
|
const label = showStop ? stopLabel : resumeLabel;
|
|
14653
|
-
const Icon = showStop ? import_lucide_react31.Square : import_lucide_react31.Play;
|
|
14693
|
+
const Icon = showStop ? stopIcon === "pause" ? import_lucide_react31.Pause : import_lucide_react31.Square : import_lucide_react31.Play;
|
|
14654
14694
|
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
14655
14695
|
"button",
|
|
14656
14696
|
{
|
|
@@ -14747,7 +14787,7 @@ function flattenWorkspaceFiles(files) {
|
|
|
14747
14787
|
var WorkspaceFileMentionPalette = React49.forwardRef(function WorkspaceFileMentionPalette2({
|
|
14748
14788
|
client,
|
|
14749
14789
|
assistantId,
|
|
14750
|
-
projectId,
|
|
14790
|
+
projectId: projectId2,
|
|
14751
14791
|
query,
|
|
14752
14792
|
selectedFilePaths,
|
|
14753
14793
|
onSelect,
|
|
@@ -14763,7 +14803,7 @@ var WorkspaceFileMentionPalette = React49.forwardRef(function WorkspaceFileMenti
|
|
|
14763
14803
|
const optionRefs = React49.useRef([]);
|
|
14764
14804
|
const loadErrorMessage = t("composer.fileMentions.loadError");
|
|
14765
14805
|
React49.useEffect(() => {
|
|
14766
|
-
if (!client || !
|
|
14806
|
+
if (!client || !projectId2 && !assistantId) {
|
|
14767
14807
|
setFiles([]);
|
|
14768
14808
|
setLoading(false);
|
|
14769
14809
|
setError(null);
|
|
@@ -14772,7 +14812,7 @@ var WorkspaceFileMentionPalette = React49.forwardRef(function WorkspaceFileMenti
|
|
|
14772
14812
|
const controller = new AbortController();
|
|
14773
14813
|
setLoading(true);
|
|
14774
14814
|
setError(null);
|
|
14775
|
-
const request =
|
|
14815
|
+
const request = projectId2 ? client.projects.listFiles(projectId2, {
|
|
14776
14816
|
depth: WORKSPACE_FILE_LIST_DEPTH,
|
|
14777
14817
|
signal: controller.signal
|
|
14778
14818
|
}) : client.xperts.listWorkspaceFiles(assistantId, {
|
|
@@ -14792,7 +14832,7 @@ var WorkspaceFileMentionPalette = React49.forwardRef(function WorkspaceFileMenti
|
|
|
14792
14832
|
if (!controller.signal.aborted) setLoading(false);
|
|
14793
14833
|
});
|
|
14794
14834
|
return () => controller.abort();
|
|
14795
|
-
}, [assistantId, client, loadErrorMessage,
|
|
14835
|
+
}, [assistantId, client, loadErrorMessage, projectId2]);
|
|
14796
14836
|
const normalizedQuery = query.trim().toLocaleLowerCase();
|
|
14797
14837
|
const visibleFiles = React49.useMemo(
|
|
14798
14838
|
() => files.filter((file) => {
|
|
@@ -14831,7 +14871,7 @@ var WorkspaceFileMentionPalette = React49.forwardRef(function WorkspaceFileMenti
|
|
|
14831
14871
|
}),
|
|
14832
14872
|
[onSelect, visibleFiles]
|
|
14833
14873
|
);
|
|
14834
|
-
const unavailable = !client || !
|
|
14874
|
+
const unavailable = !client || !projectId2 && !assistantId;
|
|
14835
14875
|
return /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(
|
|
14836
14876
|
"div",
|
|
14837
14877
|
{
|
|
@@ -15329,7 +15369,7 @@ function ChatComposerForm({
|
|
|
15329
15369
|
isChangingBranch,
|
|
15330
15370
|
handleComposerRunControl,
|
|
15331
15371
|
isRunPaused,
|
|
15332
|
-
|
|
15372
|
+
isStoppingRun,
|
|
15333
15373
|
isRunPausing,
|
|
15334
15374
|
isResumingRun,
|
|
15335
15375
|
currentRunControl,
|
|
@@ -15545,17 +15585,18 @@ function ChatComposerForm({
|
|
|
15545
15585
|
}
|
|
15546
15586
|
}
|
|
15547
15587
|
),
|
|
15588
|
+
isRunPausing && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("span", { role: "status", className: "text-xs text-muted-foreground", title: t("threadControl.pausingDescription"), children: t("threadControl.pausing") }),
|
|
15548
15589
|
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
15549
15590
|
SendButton,
|
|
15550
15591
|
{
|
|
15551
15592
|
disabled: isSendDisabled,
|
|
15552
15593
|
isLoading: stream.isLoading,
|
|
15553
15594
|
showStop: !isPauseActive && (stream.isLoading || canPauseRun) && (!hasComposerInput || hasPendingInteractiveRequest),
|
|
15554
|
-
stopDisabled: isChangingBranch || !canPauseRun,
|
|
15595
|
+
stopDisabled: isChangingBranch || isStoppingRun || !canPauseRun,
|
|
15555
15596
|
onStop: () => void handleComposerRunControl("pause"),
|
|
15556
|
-
stopLabel: t("threadControl.
|
|
15597
|
+
stopLabel: t("threadControl.stop"),
|
|
15557
15598
|
showResume: isPauseActive && !hasComposerInput,
|
|
15558
|
-
resumeDisabled: !isRunPaused
|
|
15599
|
+
resumeDisabled: !isRunPaused || isStoppingRun || isRunPausing || isResumingRun || isChangingBranch || !currentRunControl?.pauseId,
|
|
15559
15600
|
onResume: () => void handleComposerRunControl("resume"),
|
|
15560
15601
|
resumeLabel: t("threadControl.resume"),
|
|
15561
15602
|
sendLabel: t("chat.send"),
|
|
@@ -15588,6 +15629,7 @@ function ChatComposerForm({
|
|
|
15588
15629
|
activeProjectId,
|
|
15589
15630
|
selection: projectSelection,
|
|
15590
15631
|
autoNewEnabled: options?.composer?.projects?.autoNewEnabled,
|
|
15632
|
+
autoNewMode: options?.composer?.projects?.autoNewMode,
|
|
15591
15633
|
allowNone: options?.composer?.projects?.allowNone,
|
|
15592
15634
|
locked: isProjectScopeLocked,
|
|
15593
15635
|
label: options?.composer?.projects?.label,
|
|
@@ -19306,6 +19348,7 @@ function useChatSubmission({
|
|
|
19306
19348
|
composerPartsRef,
|
|
19307
19349
|
stream,
|
|
19308
19350
|
isRunPaused,
|
|
19351
|
+
clearRunControlError,
|
|
19309
19352
|
planModeEnabled,
|
|
19310
19353
|
getRuntimeCapabilitiesForSubmit,
|
|
19311
19354
|
promptWorkflow,
|
|
@@ -19351,6 +19394,7 @@ function useChatSubmission({
|
|
|
19351
19394
|
if (!humanInput) {
|
|
19352
19395
|
return;
|
|
19353
19396
|
}
|
|
19397
|
+
clearRunControlError();
|
|
19354
19398
|
const {
|
|
19355
19399
|
runtimeCapabilitiesForSubmit,
|
|
19356
19400
|
runtimeCapabilityOptionsForMessage
|
|
@@ -19490,6 +19534,7 @@ function useChatSubmission({
|
|
|
19490
19534
|
promptWorkflow,
|
|
19491
19535
|
isSubmissionBlocked,
|
|
19492
19536
|
isRunPaused,
|
|
19537
|
+
clearRunControlError,
|
|
19493
19538
|
options?.request,
|
|
19494
19539
|
persistSessionRuntimeCapabilities,
|
|
19495
19540
|
resourcesEnabled,
|
|
@@ -20438,7 +20483,7 @@ function createXpertThreadGoalAdapter(client, scope) {
|
|
|
20438
20483
|
async setGoal({
|
|
20439
20484
|
threadId,
|
|
20440
20485
|
assistantId,
|
|
20441
|
-
projectId,
|
|
20486
|
+
projectId: projectId2,
|
|
20442
20487
|
objective,
|
|
20443
20488
|
runtimeCapabilities,
|
|
20444
20489
|
signal
|
|
@@ -20458,7 +20503,7 @@ function createXpertThreadGoalAdapter(client, scope) {
|
|
|
20458
20503
|
normalizedThreadId,
|
|
20459
20504
|
{
|
|
20460
20505
|
xpertId: scope.xpertId,
|
|
20461
|
-
projectId:
|
|
20506
|
+
projectId: projectId2 ?? scope.projectId
|
|
20462
20507
|
}
|
|
20463
20508
|
);
|
|
20464
20509
|
const goal = await setGoal(
|
|
@@ -20490,7 +20535,7 @@ function createXpertThreadGoalAdapter(client, scope) {
|
|
|
20490
20535
|
},
|
|
20491
20536
|
{
|
|
20492
20537
|
assistantId,
|
|
20493
|
-
projectId,
|
|
20538
|
+
projectId: projectId2,
|
|
20494
20539
|
runtimeCapabilities,
|
|
20495
20540
|
onThreadCreated: (resolvedThreadId) => {
|
|
20496
20541
|
createdThreadId = resolvedThreadId;
|
|
@@ -21745,13 +21790,13 @@ var PAGE_SIZE = 50;
|
|
|
21745
21790
|
function useMessageHistory({
|
|
21746
21791
|
client,
|
|
21747
21792
|
assistantId,
|
|
21748
|
-
projectId,
|
|
21793
|
+
projectId: projectId2,
|
|
21749
21794
|
enabled,
|
|
21750
21795
|
query,
|
|
21751
21796
|
scope
|
|
21752
21797
|
}) {
|
|
21753
21798
|
const { t } = useChatkitTranslation();
|
|
21754
|
-
const filterProjectId = scope === "no-project" ? null : scope === "current-project" ?
|
|
21799
|
+
const filterProjectId = scope === "no-project" ? null : scope === "current-project" ? projectId2 : void 0;
|
|
21755
21800
|
const search = query.trim();
|
|
21756
21801
|
const request = React74.useMemo(
|
|
21757
21802
|
() => ({
|
|
@@ -21982,7 +22027,7 @@ function useThreads(limit = DEFAULT_LIMIT, enabled = true, scope = "all") {
|
|
|
21982
22027
|
client,
|
|
21983
22028
|
threadId,
|
|
21984
22029
|
assistantId,
|
|
21985
|
-
projectId,
|
|
22030
|
+
projectId: projectId2,
|
|
21986
22031
|
isReady,
|
|
21987
22032
|
isLoading: isStreamLoading,
|
|
21988
22033
|
error: streamError
|
|
@@ -21990,7 +22035,7 @@ function useThreads(limit = DEFAULT_LIMIT, enabled = true, scope = "all") {
|
|
|
21990
22035
|
const [threadRecords, setThreadRecords] = React75.useState([]);
|
|
21991
22036
|
const [isLoading, setIsLoading] = React75.useState(false);
|
|
21992
22037
|
const [error, setError] = React75.useState(null);
|
|
21993
|
-
const filterProjectId = scope === "no-project" ? null : scope === "current-project" ?
|
|
22038
|
+
const filterProjectId = scope === "no-project" ? null : scope === "current-project" ? projectId2 : void 0;
|
|
21994
22039
|
const searchRequest = React75.useRef(null);
|
|
21995
22040
|
React75.useEffect(() => {
|
|
21996
22041
|
setThreadRecords([]);
|
|
@@ -22041,7 +22086,7 @@ function useThreads(limit = DEFAULT_LIMIT, enabled = true, scope = "all") {
|
|
|
22041
22086
|
setError(null);
|
|
22042
22087
|
const payload = {
|
|
22043
22088
|
xpertId: assistantId,
|
|
22044
|
-
...
|
|
22089
|
+
...projectId2 ? { projectId: projectId2 } : {}
|
|
22045
22090
|
};
|
|
22046
22091
|
if (input?.recordId) payload.id = input.recordId;
|
|
22047
22092
|
if (input?.threadId) payload.threadId = input.threadId;
|
|
@@ -22051,7 +22096,7 @@ function useThreads(limit = DEFAULT_LIMIT, enabled = true, scope = "all") {
|
|
|
22051
22096
|
upsertThreadRecord(created);
|
|
22052
22097
|
return created;
|
|
22053
22098
|
},
|
|
22054
|
-
[assistantId, client,
|
|
22099
|
+
[assistantId, client, projectId2, upsertThreadRecord]
|
|
22055
22100
|
);
|
|
22056
22101
|
const updateThread = React75.useCallback(
|
|
22057
22102
|
async (recordId, payload) => {
|
|
@@ -22141,7 +22186,7 @@ function useThreads(limit = DEFAULT_LIMIT, enabled = true, scope = "all") {
|
|
|
22141
22186
|
client,
|
|
22142
22187
|
isReady,
|
|
22143
22188
|
isStreamLoading,
|
|
22144
|
-
|
|
22189
|
+
projectId2,
|
|
22145
22190
|
threadId,
|
|
22146
22191
|
upsertThreadRecord
|
|
22147
22192
|
]);
|
|
@@ -22687,7 +22732,7 @@ function ThreadHistoryStatus({
|
|
|
22687
22732
|
}
|
|
22688
22733
|
|
|
22689
22734
|
// src/components/thread/MessageList.tsx
|
|
22690
|
-
var
|
|
22735
|
+
var import_chatkit_types30 = require("@xpert-ai/chatkit-types");
|
|
22691
22736
|
|
|
22692
22737
|
// src/components/thread/messages/call-ended.tsx
|
|
22693
22738
|
var import_lucide_react52 = require("lucide-react");
|
|
@@ -23216,8 +23261,8 @@ function getBubbleCompletionStatus(status) {
|
|
|
23216
23261
|
}
|
|
23217
23262
|
|
|
23218
23263
|
// src/components/thread/MessageList.tsx
|
|
23219
|
-
var
|
|
23220
|
-
var
|
|
23264
|
+
var import_chatkit_types31 = require("@xpert-ai/chatkit-types");
|
|
23265
|
+
var import_lucide_react73 = require("lucide-react");
|
|
23221
23266
|
|
|
23222
23267
|
// src/lib/assistant-presentation.ts
|
|
23223
23268
|
var import_chatkit_types22 = require("@xpert-ai/chatkit-types");
|
|
@@ -25533,7 +25578,7 @@ function getVisibleHumanAttachments(attachments, references) {
|
|
|
25533
25578
|
}
|
|
25534
25579
|
|
|
25535
25580
|
// src/components/thread/messages/assistant-blocks.tsx
|
|
25536
|
-
var
|
|
25581
|
+
var React102 = __toESM(require("react"), 1);
|
|
25537
25582
|
var import_lucide_react65 = require("lucide-react");
|
|
25538
25583
|
|
|
25539
25584
|
// src/lib/scroll.ts
|
|
@@ -26831,7 +26876,7 @@ function formatStepDuration2(durationMs) {
|
|
|
26831
26876
|
}
|
|
26832
26877
|
return `${minutes}m ${seconds}s`;
|
|
26833
26878
|
}
|
|
26834
|
-
function getAgentRunStatusConfig(status, hasReply = false) {
|
|
26879
|
+
function getAgentRunStatusConfig(status, hasReply = false, outcome) {
|
|
26835
26880
|
const normalized = normalizeRunStatus(status);
|
|
26836
26881
|
if (normalized === "running") {
|
|
26837
26882
|
return {
|
|
@@ -26841,6 +26886,14 @@ function getAgentRunStatusConfig(status, hasReply = false) {
|
|
|
26841
26886
|
spin: true
|
|
26842
26887
|
};
|
|
26843
26888
|
}
|
|
26889
|
+
if ((normalized === "success" || normalized === "succeeded") && outcome) {
|
|
26890
|
+
return {
|
|
26891
|
+
icon: outcome.accepted ? import_lucide_react62.CheckCircle2 : outcome.status === "failed" ? import_lucide_react62.XCircle : import_lucide_react62.Info,
|
|
26892
|
+
iconClass: outcome.accepted ? "text-muted-foreground" : "text-destructive",
|
|
26893
|
+
labelKey: `business_${outcome.status}`,
|
|
26894
|
+
spin: false
|
|
26895
|
+
};
|
|
26896
|
+
}
|
|
26844
26897
|
if (normalized === "success" || normalized === "succeeded") {
|
|
26845
26898
|
return {
|
|
26846
26899
|
icon: import_lucide_react62.CheckCircle2,
|
|
@@ -26943,7 +26996,8 @@ function AgentRunGroup({
|
|
|
26943
26996
|
const counts = getAgentRunCounts(node);
|
|
26944
26997
|
const statusConfig = getAgentRunStatusConfig(
|
|
26945
26998
|
node.info.status,
|
|
26946
|
-
counts.text > 0
|
|
26999
|
+
counts.text > 0,
|
|
27000
|
+
node.info.businessOutcome
|
|
26947
27001
|
);
|
|
26948
27002
|
const StatusIcon = statusConfig.icon;
|
|
26949
27003
|
const isRunning = isRunningRunStatus(node.info.status);
|
|
@@ -27596,10 +27650,10 @@ function hasLegacySurface(surface) {
|
|
|
27596
27650
|
}
|
|
27597
27651
|
|
|
27598
27652
|
// src/components/thread/messages/mcp-app.tsx
|
|
27599
|
-
var
|
|
27653
|
+
var import_chatkit_types27 = require("@xpert-ai/chatkit-types");
|
|
27600
27654
|
var import_lodash_es2 = require("lodash-es");
|
|
27601
27655
|
var import_lucide_react64 = require("lucide-react");
|
|
27602
|
-
var
|
|
27656
|
+
var React101 = __toESM(require("react"), 1);
|
|
27603
27657
|
|
|
27604
27658
|
// src/components/thread/messages/mcp-app/resource/values.ts
|
|
27605
27659
|
function isRecord6(value) {
|
|
@@ -27855,6 +27909,7 @@ function normalizeMcpAppResourceResponse(value, data) {
|
|
|
27855
27909
|
html,
|
|
27856
27910
|
appInstanceToken: readString4(raw.appInstanceToken),
|
|
27857
27911
|
resourceUri: readString4(raw.resourceUri),
|
|
27912
|
+
refresh: readRefresh(raw.refresh),
|
|
27858
27913
|
title: resourceInfo.title,
|
|
27859
27914
|
description: resourceInfo.description,
|
|
27860
27915
|
icon: resourceInfo.icon,
|
|
@@ -27872,6 +27927,13 @@ function normalizeMcpAppResourceResponse(value, data) {
|
|
|
27872
27927
|
function isMcpAppComponentData(data) {
|
|
27873
27928
|
return isRecord6(data) && data.type === "McpApp" && typeof data.appInstanceId === "string" && typeof data.resourceUri === "string";
|
|
27874
27929
|
}
|
|
27930
|
+
function readRefresh(value) {
|
|
27931
|
+
const raw = readRecord(value);
|
|
27932
|
+
const toolName = raw && readString4(raw.toolName);
|
|
27933
|
+
if (!raw || !toolName) return void 0;
|
|
27934
|
+
if (raw.arguments !== void 0 && !isRecord6(raw.arguments)) return void 0;
|
|
27935
|
+
return { toolName, arguments: readRecord(raw.arguments) };
|
|
27936
|
+
}
|
|
27875
27937
|
|
|
27876
27938
|
// src/components/thread/messages/mcp-app/sandbox/policy.ts
|
|
27877
27939
|
function domains(values) {
|
|
@@ -28422,7 +28484,27 @@ function useMcpAppApprovals({
|
|
|
28422
28484
|
return { clearPendingApproval, dispatchHostRpc, resolvePendingApproval };
|
|
28423
28485
|
}
|
|
28424
28486
|
|
|
28487
|
+
// src/components/thread/messages/mcp-app/bridge/project-link.ts
|
|
28488
|
+
var import_zod2 = require("zod");
|
|
28489
|
+
var projectId = import_zod2.z.string().uuid();
|
|
28490
|
+
function parseMcpAppProjectLink(href) {
|
|
28491
|
+
try {
|
|
28492
|
+
const url = new URL(href);
|
|
28493
|
+
if (url.protocol !== "xpert:" || url.hostname !== "project" || url.username || url.password || url.port || url.hash)
|
|
28494
|
+
return null;
|
|
28495
|
+
const id = projectId.safeParse(decodeURIComponent(url.pathname.slice(1)));
|
|
28496
|
+
const viewKey = url.searchParams.get("viewKey");
|
|
28497
|
+
if (!id.success || !viewKey || !/^[\w.-]+__[\w.-]+$/.test(viewKey))
|
|
28498
|
+
return null;
|
|
28499
|
+
if (url.searchParams.size !== 1) return null;
|
|
28500
|
+
return { projectId: id.data, viewKey };
|
|
28501
|
+
} catch {
|
|
28502
|
+
return null;
|
|
28503
|
+
}
|
|
28504
|
+
}
|
|
28505
|
+
|
|
28425
28506
|
// src/components/thread/messages/mcp-app/bridge/useMcpAppBridge.ts
|
|
28507
|
+
var import_chatkit_types26 = require("@xpert-ai/chatkit-types");
|
|
28426
28508
|
var React96 = __toESM(require("react"), 1);
|
|
28427
28509
|
|
|
28428
28510
|
// src/components/thread/messages/mcp-app/sandbox/html.ts
|
|
@@ -28576,6 +28658,10 @@ function buildMcpAppTheme(element) {
|
|
|
28576
28658
|
"--mcp-app-font-mono": sanitizeCssValue(
|
|
28577
28659
|
readHostCssVariable(source, "--font-mono") || "ui-monospace, SFMono-Regular, Menlo, monospace"
|
|
28578
28660
|
),
|
|
28661
|
+
// Resolve rem-based host typography before crossing the iframe boundary.
|
|
28662
|
+
"--mcp-app-font-size": sanitizeCssValue(
|
|
28663
|
+
window.getComputedStyle(document.documentElement).fontSize || "16px"
|
|
28664
|
+
),
|
|
28579
28665
|
"--mcp-app-radius": sanitizeCssValue(
|
|
28580
28666
|
readHostCssVariable(source, "--radius") || "0.5rem"
|
|
28581
28667
|
)
|
|
@@ -28594,7 +28680,7 @@ function buildMcpAppTheme(element) {
|
|
|
28594
28680
|
}
|
|
28595
28681
|
function injectMcpAppTheme(html, theme) {
|
|
28596
28682
|
const declarations = Object.entries(theme.cssVariables).map(([name, value]) => `${name}: ${sanitizeCssValue(value)};`).join("");
|
|
28597
|
-
const style = `<style id="mcp-app-host-theme">:root{font-size:
|
|
28683
|
+
const style = `<style id="mcp-app-host-theme">:root{font-size:var(--mcp-app-font-size,16px);color-scheme:${theme.mode};${declarations}}</style>`;
|
|
28598
28684
|
return injectHeadContent(html, style);
|
|
28599
28685
|
}
|
|
28600
28686
|
|
|
@@ -28603,6 +28689,7 @@ function standardMcpAppStyles(legacy) {
|
|
|
28603
28689
|
const mapping = {
|
|
28604
28690
|
"--font-sans": "--mcp-app-font-sans",
|
|
28605
28691
|
"--font-mono": "--mcp-app-font-mono",
|
|
28692
|
+
"--font-text-md-size": "--mcp-app-font-size",
|
|
28606
28693
|
"--border-radius-md": "--mcp-app-radius",
|
|
28607
28694
|
"--color-background-primary": "--mcp-app-color-background",
|
|
28608
28695
|
"--color-background-secondary": "--mcp-app-color-card",
|
|
@@ -28615,7 +28702,9 @@ function standardMcpAppStyles(legacy) {
|
|
|
28615
28702
|
"--color-border-primary": "--mcp-app-color-border",
|
|
28616
28703
|
"--color-ring-primary": "--mcp-app-color-ring"
|
|
28617
28704
|
};
|
|
28618
|
-
return Object.fromEntries(
|
|
28705
|
+
return Object.fromEntries(
|
|
28706
|
+
Object.entries(mapping).filter(([, source]) => legacy[source]).map(([key, source]) => [key, legacy[source]])
|
|
28707
|
+
);
|
|
28619
28708
|
}
|
|
28620
28709
|
|
|
28621
28710
|
// src/components/thread/messages/mcp-app/bridge/chat-input.ts
|
|
@@ -28770,6 +28859,7 @@ function useMcpAppBridge({
|
|
|
28770
28859
|
streamIsLoading,
|
|
28771
28860
|
dispatchHostRpc
|
|
28772
28861
|
}) {
|
|
28862
|
+
const { openProject } = useWorkbench();
|
|
28773
28863
|
React96.useEffect(() => {
|
|
28774
28864
|
if (!initializedRef.current) return;
|
|
28775
28865
|
postToApp({
|
|
@@ -28781,6 +28871,27 @@ function useMcpAppBridge({
|
|
|
28781
28871
|
}
|
|
28782
28872
|
});
|
|
28783
28873
|
}, [displayMode, height, postToApp]);
|
|
28874
|
+
React96.useEffect(() => {
|
|
28875
|
+
const notifyTheme = () => {
|
|
28876
|
+
if (!initializedRef.current) return;
|
|
28877
|
+
const theme = buildMcpAppTheme(containerRef.current);
|
|
28878
|
+
postToApp({
|
|
28879
|
+
jsonrpc: "2.0",
|
|
28880
|
+
method: "ui/notifications/host-context-changed",
|
|
28881
|
+
params: {
|
|
28882
|
+
theme: theme.mode,
|
|
28883
|
+
styles: { variables: standardMcpAppStyles(theme.cssVariables) },
|
|
28884
|
+
themeCssVariables: theme.cssVariables
|
|
28885
|
+
}
|
|
28886
|
+
});
|
|
28887
|
+
};
|
|
28888
|
+
const observer = new MutationObserver(notifyTheme);
|
|
28889
|
+
observer.observe(document.documentElement, {
|
|
28890
|
+
attributes: true,
|
|
28891
|
+
attributeFilter: ["style", "class", "data-theme"]
|
|
28892
|
+
});
|
|
28893
|
+
return () => observer.disconnect();
|
|
28894
|
+
}, [postToApp]);
|
|
28784
28895
|
React96.useEffect(() => {
|
|
28785
28896
|
const handleMessage = async (event) => {
|
|
28786
28897
|
if (event.source !== iframeRef.current?.contentWindow) {
|
|
@@ -28857,7 +28968,18 @@ function useMcpAppBridge({
|
|
|
28857
28968
|
initializedRef.current = true;
|
|
28858
28969
|
const permissions = resource?.permissions ?? data.permissions;
|
|
28859
28970
|
const csp = resource?.csp ?? data.csp;
|
|
28860
|
-
const
|
|
28971
|
+
const rawToolInfo = resource?.toolInfo ?? normalizeMcpAppToolInfo(void 0, data);
|
|
28972
|
+
const toolInfo = {
|
|
28973
|
+
...rawToolInfo,
|
|
28974
|
+
tool: {
|
|
28975
|
+
...rawToolInfo.tool,
|
|
28976
|
+
title: (0, import_chatkit_types26.resolveLocalizedText)(rawToolInfo.tool.title, i18n2.language) ?? rawToolInfo.tool.name,
|
|
28977
|
+
description: (0, import_chatkit_types26.resolveLocalizedText)(
|
|
28978
|
+
rawToolInfo.tool.description,
|
|
28979
|
+
i18n2.language
|
|
28980
|
+
) ?? void 0
|
|
28981
|
+
}
|
|
28982
|
+
};
|
|
28861
28983
|
const theme = buildMcpAppTheme(containerRef.current);
|
|
28862
28984
|
const hostLocale = normalizeHostLocale(i18n2.language);
|
|
28863
28985
|
const hostLanguage = getLocaleLanguage(hostLocale);
|
|
@@ -28874,6 +28996,7 @@ function useMcpAppBridge({
|
|
|
28874
28996
|
serverTools: {},
|
|
28875
28997
|
serverResources: {},
|
|
28876
28998
|
openLinks: {},
|
|
28999
|
+
...openProject ? { experimental: { "xpert/workbench": { openProject: true } } } : {},
|
|
28877
29000
|
logging: {},
|
|
28878
29001
|
message: {
|
|
28879
29002
|
text: {},
|
|
@@ -28941,6 +29064,28 @@ function useMcpAppBridge({
|
|
|
28941
29064
|
}
|
|
28942
29065
|
if (request.method === "ui/open-link") {
|
|
28943
29066
|
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;
|
|
29067
|
+
const projectLink = href ? parseMcpAppProjectLink(href) : null;
|
|
29068
|
+
if (projectLink) {
|
|
29069
|
+
try {
|
|
29070
|
+
const response = await openProject?.(
|
|
29071
|
+
projectLink.projectId,
|
|
29072
|
+
projectLink.viewKey
|
|
29073
|
+
);
|
|
29074
|
+
if (!isRecord6(response) || response.success !== true) {
|
|
29075
|
+
postToApp(
|
|
29076
|
+
jsonRpcError(
|
|
29077
|
+
request.id,
|
|
29078
|
+
i18n2.t("message.mcpApp.openProjectFailed")
|
|
29079
|
+
)
|
|
29080
|
+
);
|
|
29081
|
+
} else {
|
|
29082
|
+
postToApp(jsonRpcResult(request.id, {}));
|
|
29083
|
+
}
|
|
29084
|
+
} catch (cause) {
|
|
29085
|
+
postToApp(jsonRpcError(request.id, getErrorMessage2(cause)));
|
|
29086
|
+
}
|
|
29087
|
+
return;
|
|
29088
|
+
}
|
|
28944
29089
|
if (!href || !isHttpUrl(href)) {
|
|
28945
29090
|
if (request.id !== void 0) {
|
|
28946
29091
|
postToApp(jsonRpcError(request.id, "Invalid URL"));
|
|
@@ -29044,6 +29189,7 @@ function useMcpAppBridge({
|
|
|
29044
29189
|
client,
|
|
29045
29190
|
data,
|
|
29046
29191
|
dispatchHostRpc,
|
|
29192
|
+
openProject,
|
|
29047
29193
|
displayMode,
|
|
29048
29194
|
i18n2.language,
|
|
29049
29195
|
messageId,
|
|
@@ -29061,8 +29207,68 @@ function useMcpAppBridge({
|
|
|
29061
29207
|
]);
|
|
29062
29208
|
}
|
|
29063
29209
|
|
|
29064
|
-
// src/components/thread/messages/mcp-app/resource/
|
|
29210
|
+
// src/components/thread/messages/mcp-app/resource/useMcpAppRefresh.ts
|
|
29065
29211
|
var React97 = __toESM(require("react"), 1);
|
|
29212
|
+
function useMcpAppRefresh(options) {
|
|
29213
|
+
const [refreshing, setRefreshing] = React97.useState(false);
|
|
29214
|
+
const [error, setError] = React97.useState(null);
|
|
29215
|
+
const active = React97.useRef(null);
|
|
29216
|
+
React97.useEffect(() => {
|
|
29217
|
+
active.current = null;
|
|
29218
|
+
setRefreshing(false);
|
|
29219
|
+
setError(null);
|
|
29220
|
+
return () => {
|
|
29221
|
+
active.current = null;
|
|
29222
|
+
};
|
|
29223
|
+
}, [options.identity]);
|
|
29224
|
+
const refresh = async () => {
|
|
29225
|
+
if (!options.refresh || !options.ready.current || active.current) return;
|
|
29226
|
+
const operation = /* @__PURE__ */ Symbol();
|
|
29227
|
+
active.current = operation;
|
|
29228
|
+
setRefreshing(true);
|
|
29229
|
+
setError(null);
|
|
29230
|
+
try {
|
|
29231
|
+
const response = await options.call({
|
|
29232
|
+
jsonrpc: "2.0",
|
|
29233
|
+
id: `refresh-${Date.now()}`,
|
|
29234
|
+
method: "tools/call",
|
|
29235
|
+
params: {
|
|
29236
|
+
name: options.refresh.toolName,
|
|
29237
|
+
arguments: options.refresh.arguments ?? {}
|
|
29238
|
+
}
|
|
29239
|
+
});
|
|
29240
|
+
if (active.current !== operation) return;
|
|
29241
|
+
if (!isRecord6(response) || response.error || !("result" in response))
|
|
29242
|
+
throw Error(options.failureMessage);
|
|
29243
|
+
const result = normalizeCallToolResult(response.result);
|
|
29244
|
+
if (result.isError) {
|
|
29245
|
+
const text = result.content.find(
|
|
29246
|
+
(item) => item.type === "text" && typeof item.text === "string"
|
|
29247
|
+
)?.text;
|
|
29248
|
+
throw Error(typeof text === "string" ? text : options.failureMessage);
|
|
29249
|
+
}
|
|
29250
|
+
options.post({
|
|
29251
|
+
jsonrpc: "2.0",
|
|
29252
|
+
method: "ui/notifications/tool-result",
|
|
29253
|
+
params: result
|
|
29254
|
+
});
|
|
29255
|
+
} catch (cause) {
|
|
29256
|
+
if (active.current === operation)
|
|
29257
|
+
setError(
|
|
29258
|
+
cause instanceof Error ? cause.message : options.failureMessage
|
|
29259
|
+
);
|
|
29260
|
+
} finally {
|
|
29261
|
+
if (active.current === operation) {
|
|
29262
|
+
active.current = null;
|
|
29263
|
+
setRefreshing(false);
|
|
29264
|
+
}
|
|
29265
|
+
}
|
|
29266
|
+
};
|
|
29267
|
+
return { refresh, refreshing, error };
|
|
29268
|
+
}
|
|
29269
|
+
|
|
29270
|
+
// src/components/thread/messages/mcp-app/resource/useMcpAppResource.ts
|
|
29271
|
+
var React98 = __toESM(require("react"), 1);
|
|
29066
29272
|
function useMcpAppResource({
|
|
29067
29273
|
initializedRef,
|
|
29068
29274
|
sentInitialResultRef,
|
|
@@ -29088,7 +29294,7 @@ function useMcpAppResource({
|
|
|
29088
29294
|
i18n: i18n2,
|
|
29089
29295
|
containerRef
|
|
29090
29296
|
}) {
|
|
29091
|
-
const sendInitialToolNotifications =
|
|
29297
|
+
const sendInitialToolNotifications = React98.useCallback(() => {
|
|
29092
29298
|
if (!initializedRef.current || sentInitialResultRef.current || !resource) {
|
|
29093
29299
|
return;
|
|
29094
29300
|
}
|
|
@@ -29115,7 +29321,7 @@ function useMcpAppResource({
|
|
|
29115
29321
|
}
|
|
29116
29322
|
});
|
|
29117
29323
|
}, [data.toolCallId, data.toolName, postToApp, resource]);
|
|
29118
|
-
|
|
29324
|
+
React98.useEffect(() => {
|
|
29119
29325
|
const controller = new AbortController();
|
|
29120
29326
|
initializedRef.current = false;
|
|
29121
29327
|
sentInitialResultRef.current = false;
|
|
@@ -29184,37 +29390,37 @@ function useMcpAppResource({
|
|
|
29184
29390
|
}
|
|
29185
29391
|
|
|
29186
29392
|
// src/components/thread/messages/mcp-app/session/useMcpAppState.ts
|
|
29187
|
-
var
|
|
29393
|
+
var React99 = __toESM(require("react"), 1);
|
|
29188
29394
|
function useMcpAppState({ data }) {
|
|
29189
|
-
const iframeRef =
|
|
29190
|
-
const appWindowRef =
|
|
29191
|
-
const containerRef =
|
|
29192
|
-
const initializedRef =
|
|
29193
|
-
const sentInitialResultRef =
|
|
29194
|
-
const modelContextRef =
|
|
29195
|
-
const pendingApprovalRef =
|
|
29196
|
-
const approvalActionRef =
|
|
29197
|
-
const runtimeAppInstanceTokenRef =
|
|
29395
|
+
const iframeRef = React99.useRef(null);
|
|
29396
|
+
const appWindowRef = React99.useRef(null);
|
|
29397
|
+
const containerRef = React99.useRef(null);
|
|
29398
|
+
const initializedRef = React99.useRef(false);
|
|
29399
|
+
const sentInitialResultRef = React99.useRef(false);
|
|
29400
|
+
const modelContextRef = React99.useRef(null);
|
|
29401
|
+
const pendingApprovalRef = React99.useRef(null);
|
|
29402
|
+
const approvalActionRef = React99.useRef(null);
|
|
29403
|
+
const runtimeAppInstanceTokenRef = React99.useRef(
|
|
29198
29404
|
data.appInstanceToken
|
|
29199
29405
|
);
|
|
29200
|
-
const teardownGenerationRef =
|
|
29201
|
-
const teardownStartedRef =
|
|
29202
|
-
const activeAppInstanceIdRef =
|
|
29203
|
-
const [resource, setResource] =
|
|
29204
|
-
const [runtimeAppInstanceToken, setRuntimeAppInstanceToken] =
|
|
29205
|
-
const [srcDoc, setSrcDoc] =
|
|
29206
|
-
const [height, setHeight] =
|
|
29207
|
-
const [displayMode, setDisplayMode] =
|
|
29208
|
-
const [pendingApproval, setPendingApproval] =
|
|
29209
|
-
const [approvalAction, setApprovalAction] =
|
|
29210
|
-
const [approvalError, setApprovalError] =
|
|
29211
|
-
const [error, setError] =
|
|
29212
|
-
const [isLoading, setIsLoading] =
|
|
29213
|
-
const [isTornDown, setIsTornDown] =
|
|
29214
|
-
|
|
29406
|
+
const teardownGenerationRef = React99.useRef(0);
|
|
29407
|
+
const teardownStartedRef = React99.useRef(false);
|
|
29408
|
+
const activeAppInstanceIdRef = React99.useRef(data.appInstanceId);
|
|
29409
|
+
const [resource, setResource] = React99.useState(null);
|
|
29410
|
+
const [runtimeAppInstanceToken, setRuntimeAppInstanceToken] = React99.useState(data.appInstanceToken);
|
|
29411
|
+
const [srcDoc, setSrcDoc] = React99.useState(null);
|
|
29412
|
+
const [height, setHeight] = React99.useState(420);
|
|
29413
|
+
const [displayMode, setDisplayMode] = React99.useState("inline");
|
|
29414
|
+
const [pendingApproval, setPendingApproval] = React99.useState(null);
|
|
29415
|
+
const [approvalAction, setApprovalAction] = React99.useState(null);
|
|
29416
|
+
const [approvalError, setApprovalError] = React99.useState(null);
|
|
29417
|
+
const [error, setError] = React99.useState(null);
|
|
29418
|
+
const [isLoading, setIsLoading] = React99.useState(true);
|
|
29419
|
+
const [isTornDown, setIsTornDown] = React99.useState(false);
|
|
29420
|
+
React99.useEffect(() => {
|
|
29215
29421
|
runtimeAppInstanceTokenRef.current = runtimeAppInstanceToken;
|
|
29216
29422
|
}, [runtimeAppInstanceToken]);
|
|
29217
|
-
const bindIframeRef =
|
|
29423
|
+
const bindIframeRef = React99.useCallback(
|
|
29218
29424
|
(iframe) => {
|
|
29219
29425
|
iframeRef.current = iframe;
|
|
29220
29426
|
if (iframe?.contentWindow) {
|
|
@@ -29263,7 +29469,7 @@ function useMcpAppState({ data }) {
|
|
|
29263
29469
|
}
|
|
29264
29470
|
|
|
29265
29471
|
// src/components/thread/messages/mcp-app/session/useMcpAppTeardown.ts
|
|
29266
|
-
var
|
|
29472
|
+
var React100 = __toESM(require("react"), 1);
|
|
29267
29473
|
function useMcpAppTeardown({
|
|
29268
29474
|
teardownGenerationRef,
|
|
29269
29475
|
activeAppInstanceIdRef,
|
|
@@ -29276,11 +29482,11 @@ function useMcpAppTeardown({
|
|
|
29276
29482
|
teardownStartedRef,
|
|
29277
29483
|
client
|
|
29278
29484
|
}) {
|
|
29279
|
-
const isSupersededStrictModeTeardown =
|
|
29485
|
+
const isSupersededStrictModeTeardown = React100.useCallback(
|
|
29280
29486
|
(generation, appInstanceId) => teardownGenerationRef.current !== generation && activeAppInstanceIdRef.current === appInstanceId,
|
|
29281
29487
|
[]
|
|
29282
29488
|
);
|
|
29283
|
-
|
|
29489
|
+
React100.useEffect(() => {
|
|
29284
29490
|
const generation = ++teardownGenerationRef.current;
|
|
29285
29491
|
activeAppInstanceIdRef.current = data.appInstanceId;
|
|
29286
29492
|
return () => {
|
|
@@ -29337,7 +29543,7 @@ function McpAppMessage({
|
|
|
29337
29543
|
className,
|
|
29338
29544
|
mcpApps
|
|
29339
29545
|
}) {
|
|
29340
|
-
const dataRef =
|
|
29546
|
+
const dataRef = React101.useRef(incomingData);
|
|
29341
29547
|
if (!(0, import_lodash_es2.isEqual)(dataRef.current, incomingData)) dataRef.current = incomingData;
|
|
29342
29548
|
const data = dataRef.current;
|
|
29343
29549
|
const { i18n: i18n2 } = useChatkitTranslation();
|
|
@@ -29349,11 +29555,11 @@ function McpAppMessage({
|
|
|
29349
29555
|
conversationId
|
|
29350
29556
|
} = useStreamContext();
|
|
29351
29557
|
const state = useMcpAppState({ data });
|
|
29352
|
-
const sandboxProxy =
|
|
29558
|
+
const sandboxProxy = React101.useMemo(
|
|
29353
29559
|
() => resolveMcpAppSandboxProxy(mcpApps, state.resource?.domain ?? data.domain),
|
|
29354
29560
|
[data.domain, mcpApps, state.resource?.domain]
|
|
29355
29561
|
);
|
|
29356
|
-
const postToApp =
|
|
29562
|
+
const postToApp = React101.useCallback(
|
|
29357
29563
|
(message) => {
|
|
29358
29564
|
state.iframeRef.current?.contentWindow?.postMessage(
|
|
29359
29565
|
message,
|
|
@@ -29362,7 +29568,7 @@ function McpAppMessage({
|
|
|
29362
29568
|
},
|
|
29363
29569
|
[sandboxProxy?.origin]
|
|
29364
29570
|
);
|
|
29365
|
-
const callHostRpc =
|
|
29571
|
+
const callHostRpc = React101.useCallback(
|
|
29366
29572
|
async (request) => {
|
|
29367
29573
|
return client.mcp.apps.rpc(
|
|
29368
29574
|
data.appInstanceId,
|
|
@@ -29380,6 +29586,14 @@ function McpAppMessage({
|
|
|
29380
29586
|
},
|
|
29381
29587
|
[client, data, messageId, state.runtimeAppInstanceToken]
|
|
29382
29588
|
);
|
|
29589
|
+
const refresh = useMcpAppRefresh({
|
|
29590
|
+
identity: data.appInstanceId,
|
|
29591
|
+
refresh: state.resource?.refresh,
|
|
29592
|
+
ready: state.initializedRef,
|
|
29593
|
+
call: callHostRpc,
|
|
29594
|
+
post: postToApp,
|
|
29595
|
+
failureMessage: i18n2.t("message.mcpApp.refreshFailed")
|
|
29596
|
+
});
|
|
29383
29597
|
const approvals = useMcpAppApprovals({
|
|
29384
29598
|
...state,
|
|
29385
29599
|
postToApp,
|
|
@@ -29398,7 +29612,7 @@ function McpAppMessage({
|
|
|
29398
29612
|
});
|
|
29399
29613
|
useMcpAppTeardown({ ...state, data, sandboxProxy, messageId, client });
|
|
29400
29614
|
useMcpAppApprovalExpiry({ ...state, ...approvals, postToApp });
|
|
29401
|
-
|
|
29615
|
+
React101.useEffect(() => {
|
|
29402
29616
|
resourceLifecycle.sendInitialToolNotifications();
|
|
29403
29617
|
}, [resourceLifecycle.sendInitialToolNotifications]);
|
|
29404
29618
|
useMcpAppBridge({
|
|
@@ -29418,14 +29632,14 @@ function McpAppMessage({
|
|
|
29418
29632
|
streamIsLoading
|
|
29419
29633
|
});
|
|
29420
29634
|
const iframePermissions = state.resource?.permissions ?? data.permissions;
|
|
29421
|
-
const iframeAllow =
|
|
29635
|
+
const iframeAllow = React101.useMemo(
|
|
29422
29636
|
() => buildIframeAllow(iframePermissions),
|
|
29423
29637
|
[iframePermissions]
|
|
29424
29638
|
);
|
|
29425
29639
|
const sandbox = sandboxProxy ? "allow-scripts allow-same-origin" : buildSandboxAttribute();
|
|
29426
29640
|
const prefersBorder = state.resource?.prefersBorder ?? data.prefersBorder ?? true;
|
|
29427
|
-
const displayTitle = (0,
|
|
29428
|
-
const displayDescription = (0,
|
|
29641
|
+
const displayTitle = (0, import_chatkit_types27.resolveLocalizedText)(state.resource?.title ?? data.title, i18n2.language) ?? data.toolName;
|
|
29642
|
+
const displayDescription = (0, import_chatkit_types27.resolveLocalizedText)(
|
|
29429
29643
|
state.resource?.description ?? data.description,
|
|
29430
29644
|
i18n2.language
|
|
29431
29645
|
);
|
|
@@ -29472,6 +29686,24 @@ function McpAppMessage({
|
|
|
29472
29686
|
] })
|
|
29473
29687
|
] }),
|
|
29474
29688
|
/* @__PURE__ */ (0, import_jsx_runtime105.jsxs)("div", { className: "flex shrink-0 items-center gap-1", children: [
|
|
29689
|
+
state.resource?.refresh ? /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
|
|
29690
|
+
Button,
|
|
29691
|
+
{
|
|
29692
|
+
type: "button",
|
|
29693
|
+
variant: "ghost",
|
|
29694
|
+
size: "icon-xs",
|
|
29695
|
+
title: i18n2.t("message.mcpApp.refresh"),
|
|
29696
|
+
"aria-label": i18n2.t("message.mcpApp.refresh"),
|
|
29697
|
+
disabled: state.isLoading || refresh.refreshing || !!state.pendingApproval,
|
|
29698
|
+
onClick: () => void refresh.refresh(),
|
|
29699
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
|
|
29700
|
+
import_lucide_react64.RefreshCw,
|
|
29701
|
+
{
|
|
29702
|
+
className: cn(refresh.refreshing && "animate-spin")
|
|
29703
|
+
}
|
|
29704
|
+
)
|
|
29705
|
+
}
|
|
29706
|
+
) : null,
|
|
29475
29707
|
state.displayMode !== "fullscreen" ? /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
|
|
29476
29708
|
Button,
|
|
29477
29709
|
{
|
|
@@ -29510,6 +29742,7 @@ function McpAppMessage({
|
|
|
29510
29742
|
) : null
|
|
29511
29743
|
] })
|
|
29512
29744
|
] }),
|
|
29745
|
+
refresh.error ? /* @__PURE__ */ (0, import_jsx_runtime105.jsx)("div", { role: "alert", className: "px-3 py-2 text-sm text-destructive", children: refresh.error }) : null,
|
|
29513
29746
|
state.pendingApproval ? /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
|
|
29514
29747
|
"div",
|
|
29515
29748
|
{
|
|
@@ -29688,11 +29921,11 @@ function ReasoningBlock({
|
|
|
29688
29921
|
isReasoning = false
|
|
29689
29922
|
}) {
|
|
29690
29923
|
const { t } = useChatkitTranslation();
|
|
29691
|
-
const [expanded, setExpanded] =
|
|
29692
|
-
|
|
29924
|
+
const [expanded, setExpanded] = React102.useState(isReasoning);
|
|
29925
|
+
React102.useEffect(() => {
|
|
29693
29926
|
setExpanded(isReasoning);
|
|
29694
29927
|
}, [isReasoning]);
|
|
29695
|
-
const contentId =
|
|
29928
|
+
const contentId = React102.useId();
|
|
29696
29929
|
const blocks = reasoning.filter((item) => item.text?.trim());
|
|
29697
29930
|
if (blocks.length === 0) return null;
|
|
29698
29931
|
return /* @__PURE__ */ (0, import_jsx_runtime107.jsxs)("div", { className: "space-y-2 px-1 py-1", children: [
|
|
@@ -29796,11 +30029,11 @@ function formatStepDuration3(durationMs) {
|
|
|
29796
30029
|
}
|
|
29797
30030
|
function ComponentBlock({ content }) {
|
|
29798
30031
|
const { i18n: i18n2 } = useChatkitTranslation();
|
|
29799
|
-
const [isExpanded, setIsExpanded] =
|
|
29800
|
-
const contentRef =
|
|
29801
|
-
const shouldAutoScrollRef =
|
|
29802
|
-
const previousScrollTopRef =
|
|
29803
|
-
const [durationNow, setDurationNow] =
|
|
30032
|
+
const [isExpanded, setIsExpanded] = React102.useState(false);
|
|
30033
|
+
const contentRef = React102.useRef(null);
|
|
30034
|
+
const shouldAutoScrollRef = React102.useRef(true);
|
|
30035
|
+
const previousScrollTopRef = React102.useRef(0);
|
|
30036
|
+
const [durationNow, setDurationNow] = React102.useState(() => Date.now());
|
|
29804
30037
|
const data = getToolStepData(content);
|
|
29805
30038
|
const category = data.category ?? "Component";
|
|
29806
30039
|
const title = getToolActivityLabel(content, i18n2.language);
|
|
@@ -29814,10 +30047,10 @@ function ComponentBlock({ content }) {
|
|
|
29814
30047
|
const endedAt = parseStepDate2(data.end_date);
|
|
29815
30048
|
const durationMs = createdAt === null ? null : Math.max(0, (endedAt ?? durationNow) - createdAt);
|
|
29816
30049
|
const durationLabel = durationMs === null ? null : formatStepDuration3(durationMs);
|
|
29817
|
-
|
|
30050
|
+
React102.useEffect(() => {
|
|
29818
30051
|
if (status === "running" && output !== null) setIsExpanded(true);
|
|
29819
30052
|
}, [status, output]);
|
|
29820
|
-
|
|
30053
|
+
React102.useEffect(() => {
|
|
29821
30054
|
if (status !== "running" || createdAt === null || endedAt !== null) {
|
|
29822
30055
|
return;
|
|
29823
30056
|
}
|
|
@@ -29829,7 +30062,7 @@ function ComponentBlock({ content }) {
|
|
|
29829
30062
|
window.clearInterval(timer);
|
|
29830
30063
|
};
|
|
29831
30064
|
}, [createdAt, endedAt, status]);
|
|
29832
|
-
|
|
30065
|
+
React102.useEffect(() => {
|
|
29833
30066
|
const element = contentRef.current;
|
|
29834
30067
|
if (!element) return;
|
|
29835
30068
|
previousScrollTopRef.current = element.scrollTop;
|
|
@@ -29851,7 +30084,7 @@ function ComponentBlock({ content }) {
|
|
|
29851
30084
|
element.removeEventListener("scroll", updateAutoScrollState);
|
|
29852
30085
|
};
|
|
29853
30086
|
}, [isExpanded]);
|
|
29854
|
-
|
|
30087
|
+
React102.useEffect(() => {
|
|
29855
30088
|
if (status !== "running") {
|
|
29856
30089
|
shouldAutoScrollRef.current = true;
|
|
29857
30090
|
return;
|
|
@@ -30021,20 +30254,20 @@ function renderContentItem(content, index, message, lookupMessages, options) {
|
|
|
30021
30254
|
}
|
|
30022
30255
|
|
|
30023
30256
|
// src/components/thread/messages/ai.tsx
|
|
30024
|
-
var
|
|
30025
|
-
var
|
|
30257
|
+
var React107 = require("react");
|
|
30258
|
+
var import_lucide_react70 = require("lucide-react");
|
|
30026
30259
|
|
|
30027
30260
|
// src/components/thread/messages/resource-cards.tsx
|
|
30028
|
-
var
|
|
30261
|
+
var React103 = __toESM(require("react"), 1);
|
|
30029
30262
|
var import_lucide_react66 = require("lucide-react");
|
|
30030
|
-
var
|
|
30263
|
+
var import_chatkit_types28 = require("@xpert-ai/chatkit-types");
|
|
30031
30264
|
var import_jsx_runtime108 = require("react/jsx-runtime");
|
|
30032
30265
|
function messageResourceCards(message) {
|
|
30033
30266
|
if (!Array.isArray(message.content)) return [];
|
|
30034
30267
|
return message.content.reduce(
|
|
30035
30268
|
(cards, part) => {
|
|
30036
|
-
const card = (0,
|
|
30037
|
-
return card ? (0,
|
|
30269
|
+
const card = (0, import_chatkit_types28.parseResourceCardContent)(part);
|
|
30270
|
+
return card ? (0, import_chatkit_types28.upsertResourceCardContent)(cards, card) : cards;
|
|
30038
30271
|
},
|
|
30039
30272
|
[]
|
|
30040
30273
|
);
|
|
@@ -30045,8 +30278,8 @@ function ResourceCard({
|
|
|
30045
30278
|
}) {
|
|
30046
30279
|
const workbench = useWorkbench();
|
|
30047
30280
|
const { t } = useChatkitTranslation();
|
|
30048
|
-
const [busy, setBusy] =
|
|
30049
|
-
const [error, setError] =
|
|
30281
|
+
const [busy, setBusy] = React103.useState(false);
|
|
30282
|
+
const [error, setError] = React103.useState(null);
|
|
30050
30283
|
const available = workbench.enabled && !!workbench.openResourceCard;
|
|
30051
30284
|
const open = async () => {
|
|
30052
30285
|
if (!available || busy) return;
|
|
@@ -30116,54 +30349,95 @@ function MessageResourceCards({
|
|
|
30116
30349
|
}
|
|
30117
30350
|
|
|
30118
30351
|
// src/components/thread/messages/assistant-content.tsx
|
|
30119
|
-
var
|
|
30352
|
+
var React106 = require("react");
|
|
30120
30353
|
|
|
30121
30354
|
// src/components/thread/messages/external-assistant-run-row.tsx
|
|
30122
|
-
var
|
|
30355
|
+
var React104 = __toESM(require("react"), 1);
|
|
30356
|
+
var import_lucide_react68 = require("lucide-react");
|
|
30357
|
+
|
|
30358
|
+
// src/components/thread/messages/external-assistant-cancel-button.tsx
|
|
30123
30359
|
var import_lucide_react67 = require("lucide-react");
|
|
30124
30360
|
var import_jsx_runtime109 = require("react/jsx-runtime");
|
|
30361
|
+
function ExternalAssistantCancelButton({
|
|
30362
|
+
name,
|
|
30363
|
+
onCancel,
|
|
30364
|
+
pending,
|
|
30365
|
+
requested
|
|
30366
|
+
}) {
|
|
30367
|
+
const { t } = useChatkitTranslation();
|
|
30368
|
+
const label = t(
|
|
30369
|
+
pending ? "workbench.externalAssistants.cancelling" : requested ? "workbench.externalAssistants.cancelRequested" : "workbench.externalAssistants.cancel"
|
|
30370
|
+
);
|
|
30371
|
+
return /* @__PURE__ */ (0, import_jsx_runtime109.jsxs)(
|
|
30372
|
+
"button",
|
|
30373
|
+
{
|
|
30374
|
+
type: "button",
|
|
30375
|
+
onClick: onCancel,
|
|
30376
|
+
disabled: pending || requested,
|
|
30377
|
+
"aria-label": t("workbench.externalAssistants.cancelRun", { name }),
|
|
30378
|
+
title: label,
|
|
30379
|
+
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",
|
|
30380
|
+
children: [
|
|
30381
|
+
pending ? /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(import_lucide_react67.LoaderCircle, { className: "size-3 animate-spin", "aria-hidden": "true" }) : /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(import_lucide_react67.Square, { className: "size-3", "aria-hidden": "true" }),
|
|
30382
|
+
label
|
|
30383
|
+
]
|
|
30384
|
+
}
|
|
30385
|
+
);
|
|
30386
|
+
}
|
|
30387
|
+
|
|
30388
|
+
// src/components/thread/messages/external-assistant-run-row.tsx
|
|
30389
|
+
var import_jsx_runtime110 = require("react/jsx-runtime");
|
|
30125
30390
|
function ExternalAssistantAvatar({ info }) {
|
|
30126
30391
|
const { t } = useChatkitTranslation();
|
|
30127
|
-
return info.avatar ? /* @__PURE__ */ (0,
|
|
30392
|
+
return info.avatar ? /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(
|
|
30128
30393
|
ChatkitAvatar,
|
|
30129
30394
|
{
|
|
30130
30395
|
avatar: info.avatar,
|
|
30131
30396
|
label: getAgentRunTitle(info, t("message.agentRun.defaultTitle")) ?? "",
|
|
30132
30397
|
className: "size-5 shrink-0"
|
|
30133
30398
|
}
|
|
30134
|
-
) : /* @__PURE__ */ (0,
|
|
30399
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(import_lucide_react68.Bot, { className: "size-4 shrink-0 text-muted-foreground", "aria-hidden": "true" });
|
|
30135
30400
|
}
|
|
30136
30401
|
function AgentRunStatus({ info }) {
|
|
30137
30402
|
const { t } = useChatkitTranslation();
|
|
30138
|
-
const [now, setNow] =
|
|
30403
|
+
const [now, setNow] = React104.useState(Date.now);
|
|
30139
30404
|
const running = isRunningRunStatus(info.status);
|
|
30140
|
-
|
|
30405
|
+
React104.useEffect(() => {
|
|
30141
30406
|
if (!running) return;
|
|
30142
30407
|
const timer = window.setInterval(() => setNow(Date.now()), 1e3);
|
|
30143
30408
|
return () => window.clearInterval(timer);
|
|
30144
30409
|
}, [running]);
|
|
30145
|
-
const config = getAgentRunStatusConfig(
|
|
30410
|
+
const config = getAgentRunStatusConfig(
|
|
30411
|
+
info.status,
|
|
30412
|
+
false,
|
|
30413
|
+
info.businessOutcome
|
|
30414
|
+
);
|
|
30146
30415
|
const StatusIcon = config.icon;
|
|
30147
30416
|
const duration = getAgentRunDuration(info, now);
|
|
30148
|
-
return /* @__PURE__ */ (0,
|
|
30417
|
+
return /* @__PURE__ */ (0, import_jsx_runtime110.jsxs)(
|
|
30149
30418
|
"span",
|
|
30150
30419
|
{
|
|
30151
30420
|
className: "inline-flex shrink-0 items-center gap-1.5 text-xs text-muted-foreground",
|
|
30152
30421
|
role: "status",
|
|
30422
|
+
title: info.businessOutcome?.message,
|
|
30153
30423
|
children: [
|
|
30154
|
-
/* @__PURE__ */ (0,
|
|
30424
|
+
/* @__PURE__ */ (0, import_jsx_runtime110.jsx)(
|
|
30155
30425
|
StatusIcon,
|
|
30156
30426
|
{
|
|
30157
|
-
className: cn(
|
|
30427
|
+
className: cn(
|
|
30428
|
+
"h-3.5 w-3.5",
|
|
30429
|
+
config.iconClass,
|
|
30430
|
+
config.spin && "animate-spin"
|
|
30431
|
+
),
|
|
30158
30432
|
"aria-hidden": "true"
|
|
30159
30433
|
}
|
|
30160
30434
|
),
|
|
30161
30435
|
t(`message.agentRun.status.${config.labelKey}`, {
|
|
30162
30436
|
defaultValue: info.status ?? config.labelKey
|
|
30163
30437
|
}),
|
|
30164
|
-
duration !== null && /* @__PURE__ */ (0,
|
|
30165
|
-
/* @__PURE__ */ (0,
|
|
30166
|
-
/* @__PURE__ */ (0,
|
|
30438
|
+
duration !== null && /* @__PURE__ */ (0, import_jsx_runtime110.jsxs)(import_jsx_runtime110.Fragment, { children: [
|
|
30439
|
+
/* @__PURE__ */ (0, import_jsx_runtime110.jsx)(import_lucide_react68.Clock3, { className: "ml-1 h-3 w-3", "aria-hidden": "true" }),
|
|
30440
|
+
/* @__PURE__ */ (0, import_jsx_runtime110.jsx)("span", { className: "tabular-nums", children: formatStepDuration2(duration) })
|
|
30167
30441
|
] })
|
|
30168
30442
|
]
|
|
30169
30443
|
}
|
|
@@ -30171,31 +30445,45 @@ function AgentRunStatus({ info }) {
|
|
|
30171
30445
|
}
|
|
30172
30446
|
function ExternalAssistantRunRow({
|
|
30173
30447
|
info,
|
|
30174
|
-
onOpen
|
|
30448
|
+
onOpen,
|
|
30449
|
+
onCancel,
|
|
30450
|
+
cancelPending,
|
|
30451
|
+
cancelRequested
|
|
30175
30452
|
}) {
|
|
30176
30453
|
const { t } = useChatkitTranslation();
|
|
30177
30454
|
const title = getAgentRunTitle(info, t("message.agentRun.defaultTitle"));
|
|
30178
|
-
return /* @__PURE__ */ (0,
|
|
30179
|
-
|
|
30180
|
-
|
|
30181
|
-
|
|
30182
|
-
|
|
30183
|
-
|
|
30184
|
-
|
|
30185
|
-
|
|
30186
|
-
|
|
30187
|
-
|
|
30188
|
-
|
|
30189
|
-
|
|
30190
|
-
|
|
30191
|
-
|
|
30192
|
-
|
|
30455
|
+
return /* @__PURE__ */ (0, import_jsx_runtime110.jsxs)("div", { className: "flex min-w-0 items-center gap-2", children: [
|
|
30456
|
+
/* @__PURE__ */ (0, import_jsx_runtime110.jsxs)(
|
|
30457
|
+
"button",
|
|
30458
|
+
{
|
|
30459
|
+
type: "button",
|
|
30460
|
+
onClick: () => onOpen(info.id),
|
|
30461
|
+
"aria-label": t("workbench.externalAssistants.openRun", { name: title }),
|
|
30462
|
+
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",
|
|
30463
|
+
children: [
|
|
30464
|
+
/* @__PURE__ */ (0, import_jsx_runtime110.jsx)(ExternalAssistantAvatar, { info }),
|
|
30465
|
+
/* @__PURE__ */ (0, import_jsx_runtime110.jsx)("span", { className: "min-w-0 flex-1 truncate text-sm font-medium", children: title }),
|
|
30466
|
+
/* @__PURE__ */ (0, import_jsx_runtime110.jsx)(AgentRunStatus, { info }),
|
|
30467
|
+
/* @__PURE__ */ (0, import_jsx_runtime110.jsx)(import_lucide_react68.ChevronRight, { className: "h-4 w-4 shrink-0", "aria-hidden": "true" })
|
|
30468
|
+
]
|
|
30469
|
+
}
|
|
30470
|
+
),
|
|
30471
|
+
onCancel && isRunningRunStatus(info.status) && /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(
|
|
30472
|
+
ExternalAssistantCancelButton,
|
|
30473
|
+
{
|
|
30474
|
+
name: title ?? "",
|
|
30475
|
+
onCancel,
|
|
30476
|
+
pending: cancelPending,
|
|
30477
|
+
requested: cancelRequested
|
|
30478
|
+
}
|
|
30479
|
+
)
|
|
30480
|
+
] });
|
|
30193
30481
|
}
|
|
30194
30482
|
|
|
30195
30483
|
// src/components/thread/messages/assistant-process.tsx
|
|
30196
|
-
var
|
|
30197
|
-
var
|
|
30198
|
-
var
|
|
30484
|
+
var React105 = __toESM(require("react"), 1);
|
|
30485
|
+
var import_lucide_react69 = require("lucide-react");
|
|
30486
|
+
var import_jsx_runtime111 = require("react/jsx-runtime");
|
|
30199
30487
|
function AssistantProcess({
|
|
30200
30488
|
enabled = true,
|
|
30201
30489
|
renderContent,
|
|
@@ -30206,22 +30494,22 @@ function AssistantProcess({
|
|
|
30206
30494
|
durationMs
|
|
30207
30495
|
}) {
|
|
30208
30496
|
const { t } = useChatkitTranslation();
|
|
30209
|
-
const [userExpanded, setUserExpanded] =
|
|
30497
|
+
const [userExpanded, setUserExpanded] = React105.useState(null);
|
|
30210
30498
|
const expanded = forceExpanded || (userExpanded ?? running);
|
|
30211
|
-
const contentId =
|
|
30499
|
+
const contentId = React105.useId();
|
|
30212
30500
|
const seconds = durationMs === void 0 ? null : Math.floor(durationMs / 1e3);
|
|
30213
30501
|
const duration = seconds === null ? null : seconds >= 60 ? t("message.process.minutesSeconds", {
|
|
30214
30502
|
minutes: Math.floor(seconds / 60),
|
|
30215
30503
|
seconds: seconds % 60
|
|
30216
30504
|
}) : t("message.process.seconds", { seconds });
|
|
30217
|
-
return /* @__PURE__ */ (0,
|
|
30505
|
+
return /* @__PURE__ */ (0, import_jsx_runtime111.jsxs)(
|
|
30218
30506
|
"div",
|
|
30219
30507
|
{
|
|
30220
30508
|
className: "space-y-3 in-data-[density=compact]:space-y-2 in-data-[density=spacious]:space-y-4",
|
|
30221
30509
|
"data-assistant-presentation": enabled ? "final-answer" : void 0,
|
|
30222
30510
|
children: [
|
|
30223
|
-
/* @__PURE__ */ (0,
|
|
30224
|
-
/* @__PURE__ */ (0,
|
|
30511
|
+
/* @__PURE__ */ (0, import_jsx_runtime111.jsxs)("div", { hidden: !enabled, children: [
|
|
30512
|
+
/* @__PURE__ */ (0, import_jsx_runtime111.jsx)("div", { className: "border-b border-border/60 pb-2", children: /* @__PURE__ */ (0, import_jsx_runtime111.jsxs)(
|
|
30225
30513
|
"button",
|
|
30226
30514
|
{
|
|
30227
30515
|
type: "button",
|
|
@@ -30233,16 +30521,16 @@ function AssistantProcess({
|
|
|
30233
30521
|
if (!forceExpanded) setUserExpanded(!expanded);
|
|
30234
30522
|
},
|
|
30235
30523
|
children: [
|
|
30236
|
-
running && /* @__PURE__ */ (0,
|
|
30237
|
-
|
|
30524
|
+
running && /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(
|
|
30525
|
+
import_lucide_react69.Loader2,
|
|
30238
30526
|
{
|
|
30239
30527
|
"aria-hidden": "true",
|
|
30240
30528
|
className: "mr-1 h-3.5 w-3.5 animate-spin"
|
|
30241
30529
|
}
|
|
30242
30530
|
),
|
|
30243
|
-
/* @__PURE__ */ (0,
|
|
30244
|
-
/* @__PURE__ */ (0,
|
|
30245
|
-
|
|
30531
|
+
/* @__PURE__ */ (0, import_jsx_runtime111.jsx)("span", { children: running ? t("message.process.running") : duration ? t("message.process.duration", { duration }) : t("message.process.title") }),
|
|
30532
|
+
/* @__PURE__ */ (0, import_jsx_runtime111.jsx)(
|
|
30533
|
+
import_lucide_react69.ChevronRight,
|
|
30246
30534
|
{
|
|
30247
30535
|
"aria-hidden": "true",
|
|
30248
30536
|
className: cn(
|
|
@@ -30254,9 +30542,9 @@ function AssistantProcess({
|
|
|
30254
30542
|
]
|
|
30255
30543
|
}
|
|
30256
30544
|
) }),
|
|
30257
|
-
/* @__PURE__ */ (0,
|
|
30545
|
+
/* @__PURE__ */ (0, import_jsx_runtime111.jsx)("div", { id: contentId, hidden: !expanded, className: "mt-3 space-y-3", children: process })
|
|
30258
30546
|
] }),
|
|
30259
|
-
renderContent ? /* @__PURE__ */ (0,
|
|
30547
|
+
renderContent ? /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(
|
|
30260
30548
|
"div",
|
|
30261
30549
|
{
|
|
30262
30550
|
id: `${contentId}-content`,
|
|
@@ -30270,7 +30558,7 @@ function AssistantProcess({
|
|
|
30270
30558
|
}
|
|
30271
30559
|
|
|
30272
30560
|
// src/components/thread/messages/assistant-content.tsx
|
|
30273
|
-
var
|
|
30561
|
+
var import_jsx_runtime112 = require("react/jsx-runtime");
|
|
30274
30562
|
function groupAdjacentReasoning(units) {
|
|
30275
30563
|
const groups = [];
|
|
30276
30564
|
for (const unit of units) {
|
|
@@ -30296,11 +30584,11 @@ function renderContentUnit(unit, message, lookupMessages, hasFollowingItem, opti
|
|
|
30296
30584
|
const bubbles = mode === "bubbles";
|
|
30297
30585
|
if (unit.type === "reasoning-group") {
|
|
30298
30586
|
if (bubbles) return null;
|
|
30299
|
-
return /* @__PURE__ */ (0,
|
|
30587
|
+
return /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(
|
|
30300
30588
|
"div",
|
|
30301
30589
|
{
|
|
30302
30590
|
hidden: bubbles,
|
|
30303
|
-
children: !bubbles && /* @__PURE__ */ (0,
|
|
30591
|
+
children: !bubbles && /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(
|
|
30304
30592
|
ReasoningBlock,
|
|
30305
30593
|
{
|
|
30306
30594
|
reasoning: unit.items,
|
|
@@ -30317,7 +30605,7 @@ function renderContentUnit(unit, message, lookupMessages, hasFollowingItem, opti
|
|
|
30317
30605
|
const hidden = bubbles && (kind === "process" || kind === "omitted");
|
|
30318
30606
|
if (hidden) return null;
|
|
30319
30607
|
const key = typeof content === "string" ? `text-${unit.index}` : content.id ?? `item-${unit.index}`;
|
|
30320
|
-
return /* @__PURE__ */ (0,
|
|
30608
|
+
return /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(
|
|
30321
30609
|
MessageBubble,
|
|
30322
30610
|
{
|
|
30323
30611
|
mode,
|
|
@@ -30334,11 +30622,11 @@ function renderContentUnit(unit, message, lookupMessages, hasFollowingItem, opti
|
|
|
30334
30622
|
);
|
|
30335
30623
|
}
|
|
30336
30624
|
if (bubbles && !unit.items.some(hasBubbleToolResult)) return null;
|
|
30337
|
-
return /* @__PURE__ */ (0,
|
|
30625
|
+
return /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(
|
|
30338
30626
|
"div",
|
|
30339
30627
|
{
|
|
30340
30628
|
className: bubbles ? "space-y-3 empty:hidden" : void 0,
|
|
30341
|
-
children: bubbles ? /* @__PURE__ */ (0,
|
|
30629
|
+
children: bubbles ? /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(BubbleToolResults, { items: unit.items, messageStatus: message.status }) : /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(
|
|
30342
30630
|
ToolComponentGroup,
|
|
30343
30631
|
{
|
|
30344
30632
|
items: unit.items,
|
|
@@ -30368,7 +30656,7 @@ function renderEntryBatch(entries, message, lookupMessages, hasFollowingItem, op
|
|
|
30368
30656
|
const sourceIndex = entry.index;
|
|
30369
30657
|
const mapped = unit.type === "item" ? { ...unit, index: sourceIndex } : { ...unit, startIndex: sourceIndex };
|
|
30370
30658
|
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}`;
|
|
30371
|
-
return /* @__PURE__ */ (0,
|
|
30659
|
+
return /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(
|
|
30372
30660
|
"div",
|
|
30373
30661
|
{
|
|
30374
30662
|
hidden: options?.hiddenOrders?.has(entry.order),
|
|
@@ -30411,12 +30699,12 @@ function renderAssistantRenderUnits(units, message, lookupMessages, options, dep
|
|
|
30411
30699
|
flushEntries(true);
|
|
30412
30700
|
if (unit.node.info.invocationKind === "external_assistant" && options?.onOpenExternalAssistant) {
|
|
30413
30701
|
rendered.push(
|
|
30414
|
-
/* @__PURE__ */ (0,
|
|
30702
|
+
/* @__PURE__ */ (0, import_jsx_runtime112.jsx)(
|
|
30415
30703
|
MessageBubble,
|
|
30416
30704
|
{
|
|
30417
30705
|
mode: options.mode,
|
|
30418
30706
|
hidden: options.hiddenOrders?.has(unit.order),
|
|
30419
|
-
children: /* @__PURE__ */ (0,
|
|
30707
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(
|
|
30420
30708
|
ExternalAssistantRunRow,
|
|
30421
30709
|
{
|
|
30422
30710
|
info: unit.node.info,
|
|
@@ -30430,13 +30718,13 @@ function renderAssistantRenderUnits(units, message, lookupMessages, options, dep
|
|
|
30430
30718
|
return;
|
|
30431
30719
|
}
|
|
30432
30720
|
rendered.push(
|
|
30433
|
-
/* @__PURE__ */ (0,
|
|
30721
|
+
/* @__PURE__ */ (0, import_jsx_runtime112.jsx)(
|
|
30434
30722
|
MessageBubble,
|
|
30435
30723
|
{
|
|
30436
30724
|
mode: options?.mode,
|
|
30437
30725
|
hidden: options?.hiddenOrders?.has(unit.order),
|
|
30438
30726
|
"data-quote-source": unit.node.info.xpertName ?? unit.node.info.title,
|
|
30439
|
-
children: /* @__PURE__ */ (0,
|
|
30727
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(
|
|
30440
30728
|
AgentRunGroup,
|
|
30441
30729
|
{
|
|
30442
30730
|
mode: options?.mode,
|
|
@@ -30467,7 +30755,7 @@ function AssistantContent({
|
|
|
30467
30755
|
const tree = buildAssistantRenderTree(message);
|
|
30468
30756
|
const presentation = getAssistantPresentation(message);
|
|
30469
30757
|
const canSeparate = options.mode !== "bubbles" && options.collapseProcess && presentation.canSeparate && Boolean(presentation.process.length || options.processPrefix);
|
|
30470
|
-
return /* @__PURE__ */ (0,
|
|
30758
|
+
return /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(
|
|
30471
30759
|
AssistantProcess,
|
|
30472
30760
|
{
|
|
30473
30761
|
enabled: Boolean(canSeparate),
|
|
@@ -30484,7 +30772,7 @@ function AssistantContent({
|
|
|
30484
30772
|
}
|
|
30485
30773
|
|
|
30486
30774
|
// src/components/thread/messages/ai.tsx
|
|
30487
|
-
var
|
|
30775
|
+
var import_jsx_runtime113 = require("react/jsx-runtime");
|
|
30488
30776
|
function AssistantStreamingIndicator({
|
|
30489
30777
|
status,
|
|
30490
30778
|
className
|
|
@@ -30495,7 +30783,7 @@ function AssistantStreamingIndicator({
|
|
|
30495
30783
|
thinking: t("message.thinking"),
|
|
30496
30784
|
answering: t("message.answering")
|
|
30497
30785
|
};
|
|
30498
|
-
return /* @__PURE__ */ (0,
|
|
30786
|
+
return /* @__PURE__ */ (0, import_jsx_runtime113.jsxs)(
|
|
30499
30787
|
"div",
|
|
30500
30788
|
{
|
|
30501
30789
|
className: cn(
|
|
@@ -30503,18 +30791,18 @@ function AssistantStreamingIndicator({
|
|
|
30503
30791
|
className
|
|
30504
30792
|
),
|
|
30505
30793
|
children: [
|
|
30506
|
-
status === "loading" && /* @__PURE__ */ (0,
|
|
30507
|
-
status === "thinking" && /* @__PURE__ */ (0,
|
|
30508
|
-
/* @__PURE__ */ (0,
|
|
30509
|
-
/* @__PURE__ */ (0,
|
|
30510
|
-
/* @__PURE__ */ (0,
|
|
30794
|
+
status === "loading" && /* @__PURE__ */ (0, import_jsx_runtime113.jsx)(import_lucide_react70.Loader2, { className: "h-3.5 w-3.5 animate-spin" }),
|
|
30795
|
+
status === "thinking" && /* @__PURE__ */ (0, import_jsx_runtime113.jsxs)("div", { className: "flex items-end gap-1", "aria-hidden": "true", children: [
|
|
30796
|
+
/* @__PURE__ */ (0, import_jsx_runtime113.jsx)("span", { className: "h-1.5 w-1.5 rounded-full bg-current animate-bounce [animation-delay:-0.3s]" }),
|
|
30797
|
+
/* @__PURE__ */ (0, import_jsx_runtime113.jsx)("span", { className: "h-1.5 w-1.5 rounded-full bg-current animate-bounce [animation-delay:-0.15s]" }),
|
|
30798
|
+
/* @__PURE__ */ (0, import_jsx_runtime113.jsx)("span", { className: "h-1.5 w-1.5 rounded-full bg-current animate-bounce" })
|
|
30511
30799
|
] }),
|
|
30512
|
-
status === "answering" && /* @__PURE__ */ (0,
|
|
30513
|
-
/* @__PURE__ */ (0,
|
|
30514
|
-
/* @__PURE__ */ (0,
|
|
30515
|
-
/* @__PURE__ */ (0,
|
|
30800
|
+
status === "answering" && /* @__PURE__ */ (0, import_jsx_runtime113.jsxs)("div", { className: "flex items-end gap-1", "aria-hidden": "true", children: [
|
|
30801
|
+
/* @__PURE__ */ (0, import_jsx_runtime113.jsx)("span", { className: "h-2 w-0.5 rounded-full bg-current animate-pulse [animation-delay:-0.25s]" }),
|
|
30802
|
+
/* @__PURE__ */ (0, import_jsx_runtime113.jsx)("span", { className: "h-3 w-0.5 rounded-full bg-current animate-pulse [animation-delay:-0.1s]" }),
|
|
30803
|
+
/* @__PURE__ */ (0, import_jsx_runtime113.jsx)("span", { className: "h-2.5 w-0.5 rounded-full bg-current animate-pulse" })
|
|
30516
30804
|
] }),
|
|
30517
|
-
/* @__PURE__ */ (0,
|
|
30805
|
+
/* @__PURE__ */ (0, import_jsx_runtime113.jsx)("span", { children: labelMap[status] })
|
|
30518
30806
|
]
|
|
30519
30807
|
}
|
|
30520
30808
|
);
|
|
@@ -30546,7 +30834,7 @@ function AssistantMessage({
|
|
|
30546
30834
|
const isReasoning = isStreaming && message.status !== "answering" && resolvedStreamingStatus === "thinking";
|
|
30547
30835
|
const lookupMessages = messages?.length ? messages : [message];
|
|
30548
30836
|
const inlinePetState = resolvedStreamingStatus ? resolvedStreamingStatus === "loading" ? "running" : "review" : null;
|
|
30549
|
-
const inlinePet = inlinePetState ? /* @__PURE__ */ (0,
|
|
30837
|
+
const inlinePet = inlinePetState ? /* @__PURE__ */ (0, import_jsx_runtime113.jsx)(InlinePetStatus, { pet, state: inlinePetState }) : null;
|
|
30550
30838
|
const contentOptions = {
|
|
30551
30839
|
mode,
|
|
30552
30840
|
collapseProcess,
|
|
@@ -30560,7 +30848,7 @@ function AssistantMessage({
|
|
|
30560
30848
|
apiUrl,
|
|
30561
30849
|
mcpApps
|
|
30562
30850
|
};
|
|
30563
|
-
const answerNode = /* @__PURE__ */ (0,
|
|
30851
|
+
const answerNode = /* @__PURE__ */ (0, import_jsx_runtime113.jsx)(
|
|
30564
30852
|
AssistantContent,
|
|
30565
30853
|
{
|
|
30566
30854
|
message,
|
|
@@ -30581,21 +30869,21 @@ function AssistantMessage({
|
|
|
30581
30869
|
if (!hasContent && !hasReasoning && !resolvedStreamingStatus && !showCompletion)
|
|
30582
30870
|
return null;
|
|
30583
30871
|
const streamingClass = isStreaming ? "streaming-active" : "";
|
|
30584
|
-
return /* @__PURE__ */ (0,
|
|
30872
|
+
return /* @__PURE__ */ (0, import_jsx_runtime113.jsxs)("div", { className: cn("space-y-3", streamingClass, className), children: [
|
|
30585
30873
|
answerNode,
|
|
30586
|
-
!isStreaming && /* @__PURE__ */ (0,
|
|
30587
|
-
/* @__PURE__ */ (0,
|
|
30874
|
+
!isStreaming && /* @__PURE__ */ (0, import_jsx_runtime113.jsxs)(import_jsx_runtime113.Fragment, { children: [
|
|
30875
|
+
/* @__PURE__ */ (0, import_jsx_runtime113.jsx)(
|
|
30588
30876
|
MessageBubble,
|
|
30589
30877
|
{
|
|
30590
30878
|
mode,
|
|
30591
30879
|
hidden: !hasRenderableFileActivity(message),
|
|
30592
|
-
children: /* @__PURE__ */ (0,
|
|
30880
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime113.jsx)(MessageFileActivity, { message })
|
|
30593
30881
|
}
|
|
30594
30882
|
),
|
|
30595
|
-
/* @__PURE__ */ (0,
|
|
30883
|
+
/* @__PURE__ */ (0, import_jsx_runtime113.jsx)(MessageResourceCards, { message, mode })
|
|
30596
30884
|
] }),
|
|
30597
|
-
showCompletion && /* @__PURE__ */ (0,
|
|
30598
|
-
resolvedStreamingStatus ? /* @__PURE__ */ (0,
|
|
30885
|
+
showCompletion && /* @__PURE__ */ (0, import_jsx_runtime113.jsx)(MessageBubble, { mode, kind: "status", role: "status", children: t(`message.bubbles.${completion}`) }),
|
|
30886
|
+
resolvedStreamingStatus ? /* @__PURE__ */ (0, import_jsx_runtime113.jsxs)(
|
|
30599
30887
|
MessageBubble,
|
|
30600
30888
|
{
|
|
30601
30889
|
mode,
|
|
@@ -30603,7 +30891,7 @@ function AssistantMessage({
|
|
|
30603
30891
|
className: "flex items-center gap-2",
|
|
30604
30892
|
children: [
|
|
30605
30893
|
inlinePet,
|
|
30606
|
-
/* @__PURE__ */ (0,
|
|
30894
|
+
/* @__PURE__ */ (0, import_jsx_runtime113.jsx)(AssistantStreamingIndicator, { status: resolvedStreamingStatus })
|
|
30607
30895
|
]
|
|
30608
30896
|
}
|
|
30609
30897
|
) : null
|
|
@@ -30611,23 +30899,23 @@ function AssistantMessage({
|
|
|
30611
30899
|
}
|
|
30612
30900
|
|
|
30613
30901
|
// src/components/thread/MessageActions.tsx
|
|
30614
|
-
var
|
|
30615
|
-
var
|
|
30902
|
+
var React109 = __toESM(require("react"), 1);
|
|
30903
|
+
var import_lucide_react72 = require("lucide-react");
|
|
30616
30904
|
|
|
30617
30905
|
// src/components/thread/MessageSkills.tsx
|
|
30618
|
-
var
|
|
30619
|
-
var
|
|
30620
|
-
var
|
|
30621
|
-
var
|
|
30906
|
+
var React108 = __toESM(require("react"), 1);
|
|
30907
|
+
var import_lucide_react71 = require("lucide-react");
|
|
30908
|
+
var import_chatkit_types29 = require("@xpert-ai/chatkit-types");
|
|
30909
|
+
var import_jsx_runtime114 = require("react/jsx-runtime");
|
|
30622
30910
|
function MessageSkills({
|
|
30623
30911
|
usages,
|
|
30624
30912
|
onOpen
|
|
30625
30913
|
}) {
|
|
30626
30914
|
const { t } = useChatkitTranslation();
|
|
30627
|
-
const [open, setOpen] =
|
|
30628
|
-
const pinned =
|
|
30629
|
-
const timer =
|
|
30630
|
-
const titleId =
|
|
30915
|
+
const [open, setOpen] = React108.useState(false);
|
|
30916
|
+
const pinned = React108.useRef(false);
|
|
30917
|
+
const timer = React108.useRef(void 0);
|
|
30918
|
+
const titleId = React108.useId();
|
|
30631
30919
|
const cancelClose = () => clearTimeout(timer.current);
|
|
30632
30920
|
const show = () => {
|
|
30633
30921
|
cancelClose();
|
|
@@ -30645,8 +30933,8 @@ function MessageSkills({
|
|
|
30645
30933
|
if (!pinned.current) setOpen(false);
|
|
30646
30934
|
}, 150);
|
|
30647
30935
|
};
|
|
30648
|
-
|
|
30649
|
-
return /* @__PURE__ */ (0,
|
|
30936
|
+
React108.useEffect(() => () => clearTimeout(timer.current), []);
|
|
30937
|
+
return /* @__PURE__ */ (0, import_jsx_runtime114.jsxs)(
|
|
30650
30938
|
Popover,
|
|
30651
30939
|
{
|
|
30652
30940
|
open,
|
|
@@ -30654,7 +30942,7 @@ function MessageSkills({
|
|
|
30654
30942
|
if (!next) close();
|
|
30655
30943
|
},
|
|
30656
30944
|
children: [
|
|
30657
|
-
/* @__PURE__ */ (0,
|
|
30945
|
+
/* @__PURE__ */ (0, import_jsx_runtime114.jsx)(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(
|
|
30658
30946
|
"button",
|
|
30659
30947
|
{
|
|
30660
30948
|
type: "button",
|
|
@@ -30674,10 +30962,10 @@ function MessageSkills({
|
|
|
30674
30962
|
show();
|
|
30675
30963
|
}
|
|
30676
30964
|
},
|
|
30677
|
-
children: /* @__PURE__ */ (0,
|
|
30965
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(import_lucide_react71.BookOpen, { size: 14, "aria-hidden": "true" })
|
|
30678
30966
|
}
|
|
30679
30967
|
) }),
|
|
30680
|
-
/* @__PURE__ */ (0,
|
|
30968
|
+
/* @__PURE__ */ (0, import_jsx_runtime114.jsxs)(
|
|
30681
30969
|
PopoverContent,
|
|
30682
30970
|
{
|
|
30683
30971
|
side: "top",
|
|
@@ -30690,17 +30978,17 @@ function MessageSkills({
|
|
|
30690
30978
|
onPointerEnter: cancelClose,
|
|
30691
30979
|
onPointerLeave: scheduleClose,
|
|
30692
30980
|
children: [
|
|
30693
|
-
/* @__PURE__ */ (0,
|
|
30694
|
-
/* @__PURE__ */ (0,
|
|
30981
|
+
/* @__PURE__ */ (0, import_jsx_runtime114.jsx)("div", { id: titleId, className: "mb-2 text-sm font-medium", children: t("messageActions.skills.title") }),
|
|
30982
|
+
/* @__PURE__ */ (0, import_jsx_runtime114.jsx)("ul", { className: "max-h-64 space-y-1 overflow-y-auto text-sm", children: usages.map((usage) => /* @__PURE__ */ (0, import_jsx_runtime114.jsxs)(
|
|
30695
30983
|
"li",
|
|
30696
30984
|
{
|
|
30697
30985
|
className: "flex items-start justify-between gap-4",
|
|
30698
30986
|
children: [
|
|
30699
|
-
/* @__PURE__ */ (0,
|
|
30700
|
-
/* @__PURE__ */ (0,
|
|
30987
|
+
/* @__PURE__ */ (0, import_jsx_runtime114.jsx)("span", { className: "min-w-0 break-words", children: usage.name }),
|
|
30988
|
+
/* @__PURE__ */ (0, import_jsx_runtime114.jsx)("span", { className: "shrink-0 text-muted-foreground", children: t(`messageActions.skills.sources.${usage.source.type}`) })
|
|
30701
30989
|
]
|
|
30702
30990
|
},
|
|
30703
|
-
(0,
|
|
30991
|
+
(0, import_chatkit_types29.chatSkillUsageKey)(usage)
|
|
30704
30992
|
)) })
|
|
30705
30993
|
]
|
|
30706
30994
|
}
|
|
@@ -30711,7 +30999,7 @@ function MessageSkills({
|
|
|
30711
30999
|
}
|
|
30712
31000
|
|
|
30713
31001
|
// src/components/thread/MessageTimestamp.tsx
|
|
30714
|
-
var
|
|
31002
|
+
var import_jsx_runtime115 = require("react/jsx-runtime");
|
|
30715
31003
|
function formatCompactTime(date, language, now = /* @__PURE__ */ new Date()) {
|
|
30716
31004
|
const time = new Intl.DateTimeFormat(language, {
|
|
30717
31005
|
hour: "2-digit",
|
|
@@ -30750,8 +31038,8 @@ function MessageTimestamp({
|
|
|
30750
31038
|
timeZoneName: "short"
|
|
30751
31039
|
}).format(date)
|
|
30752
31040
|
});
|
|
30753
|
-
return /* @__PURE__ */ (0,
|
|
30754
|
-
/* @__PURE__ */ (0,
|
|
31041
|
+
return /* @__PURE__ */ (0, import_jsx_runtime115.jsxs)(Tooltip, { children: [
|
|
31042
|
+
/* @__PURE__ */ (0, import_jsx_runtime115.jsx)(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(
|
|
30755
31043
|
"time",
|
|
30756
31044
|
{
|
|
30757
31045
|
dateTime: date.toISOString(),
|
|
@@ -30761,12 +31049,12 @@ function MessageTimestamp({
|
|
|
30761
31049
|
children: formatCompactTime(date, i18n2.language)
|
|
30762
31050
|
}
|
|
30763
31051
|
) }),
|
|
30764
|
-
/* @__PURE__ */ (0,
|
|
31052
|
+
/* @__PURE__ */ (0, import_jsx_runtime115.jsx)(TooltipContent, { side: "bottom", children: label })
|
|
30765
31053
|
] });
|
|
30766
31054
|
}
|
|
30767
31055
|
|
|
30768
31056
|
// src/components/thread/MessageActions.tsx
|
|
30769
|
-
var
|
|
31057
|
+
var import_jsx_runtime116 = require("react/jsx-runtime");
|
|
30770
31058
|
function MessageActionButton({
|
|
30771
31059
|
label,
|
|
30772
31060
|
tooltip = label,
|
|
@@ -30775,7 +31063,7 @@ function MessageActionButton({
|
|
|
30775
31063
|
className,
|
|
30776
31064
|
...props
|
|
30777
31065
|
}) {
|
|
30778
|
-
const button = /* @__PURE__ */ (0,
|
|
31066
|
+
const button = /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(
|
|
30779
31067
|
"button",
|
|
30780
31068
|
{
|
|
30781
31069
|
...props,
|
|
@@ -30788,7 +31076,7 @@ function MessageActionButton({
|
|
|
30788
31076
|
)
|
|
30789
31077
|
}
|
|
30790
31078
|
);
|
|
30791
|
-
return /* @__PURE__ */ (0,
|
|
31079
|
+
return /* @__PURE__ */ (0, import_jsx_runtime116.jsxs)(
|
|
30792
31080
|
Tooltip,
|
|
30793
31081
|
{
|
|
30794
31082
|
delayDuration: 200,
|
|
@@ -30796,7 +31084,7 @@ function MessageActionButton({
|
|
|
30796
31084
|
if (open) onTooltipOpen?.();
|
|
30797
31085
|
},
|
|
30798
31086
|
children: [
|
|
30799
|
-
/* @__PURE__ */ (0,
|
|
31087
|
+
/* @__PURE__ */ (0, import_jsx_runtime116.jsx)(TooltipTrigger, { asChild: true, children: disabled ? /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(
|
|
30800
31088
|
"span",
|
|
30801
31089
|
{
|
|
30802
31090
|
tabIndex: 0,
|
|
@@ -30806,7 +31094,7 @@ function MessageActionButton({
|
|
|
30806
31094
|
children: button
|
|
30807
31095
|
}
|
|
30808
31096
|
) : button }),
|
|
30809
|
-
/* @__PURE__ */ (0,
|
|
31097
|
+
/* @__PURE__ */ (0, import_jsx_runtime116.jsx)(
|
|
30810
31098
|
TooltipContent,
|
|
30811
31099
|
{
|
|
30812
31100
|
side: "bottom",
|
|
@@ -30837,7 +31125,7 @@ function MessageActions({
|
|
|
30837
31125
|
skillUsages
|
|
30838
31126
|
}) {
|
|
30839
31127
|
const { t } = useChatkitTranslation();
|
|
30840
|
-
const [copied, setCopied] =
|
|
31128
|
+
const [copied, setCopied] = React109.useState(false);
|
|
30841
31129
|
const handleCopy = async () => {
|
|
30842
31130
|
try {
|
|
30843
31131
|
await navigator.clipboard.writeText(content);
|
|
@@ -30850,8 +31138,8 @@ function MessageActions({
|
|
|
30850
31138
|
if (isStreaming) return null;
|
|
30851
31139
|
const branchLabel = t("messageActions.branch");
|
|
30852
31140
|
const branchTooltip = isBranching ? t("messageActions.branching") : branching && !branching.available ? `${branchLabel}\uFF1A${t(`messageActions.branchReasons.${branching.reason ?? "checkpoint_unavailable"}`)}` : branchLabel;
|
|
30853
|
-
return /* @__PURE__ */ (0,
|
|
30854
|
-
/* @__PURE__ */ (0,
|
|
31141
|
+
return /* @__PURE__ */ (0, import_jsx_runtime116.jsxs)("div", { className: cn("flex items-center gap-1 mt-2", className), children: [
|
|
31142
|
+
/* @__PURE__ */ (0, import_jsx_runtime116.jsxs)(
|
|
30855
31143
|
"div",
|
|
30856
31144
|
{
|
|
30857
31145
|
className: cn(
|
|
@@ -30859,35 +31147,35 @@ function MessageActions({
|
|
|
30859
31147
|
!alwaysVisible && "sm:opacity-0 sm:group-hover/message:opacity-100 sm:focus-within:opacity-100"
|
|
30860
31148
|
),
|
|
30861
31149
|
children: [
|
|
30862
|
-
/* @__PURE__ */ (0,
|
|
31150
|
+
/* @__PURE__ */ (0, import_jsx_runtime116.jsx)(
|
|
30863
31151
|
MessageActionButton,
|
|
30864
31152
|
{
|
|
30865
31153
|
label: copied ? t("messageActions.copied") : t("messageActions.copy"),
|
|
30866
31154
|
onClick: handleCopy,
|
|
30867
31155
|
onTooltipOpen: onActionTooltipOpen,
|
|
30868
31156
|
className: cn(copied && "text-green-500"),
|
|
30869
|
-
children: copied ? /* @__PURE__ */ (0,
|
|
31157
|
+
children: copied ? /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(import_lucide_react72.Check, { size: 14 }) : /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(import_lucide_react72.Copy, { size: 14 })
|
|
30870
31158
|
}
|
|
30871
31159
|
),
|
|
30872
|
-
!isAssistant && onEdit && /* @__PURE__ */ (0,
|
|
31160
|
+
!isAssistant && onEdit && /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(
|
|
30873
31161
|
MessageActionButton,
|
|
30874
31162
|
{
|
|
30875
31163
|
label: t("threadControl.editMessage"),
|
|
30876
31164
|
onClick: onEdit,
|
|
30877
31165
|
onTooltipOpen: onActionTooltipOpen,
|
|
30878
|
-
children: /* @__PURE__ */ (0,
|
|
31166
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(import_lucide_react72.Pencil, { size: 14 })
|
|
30879
31167
|
}
|
|
30880
31168
|
),
|
|
30881
|
-
isAssistant && onRetry && /* @__PURE__ */ (0,
|
|
31169
|
+
isAssistant && onRetry && /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(
|
|
30882
31170
|
MessageActionButton,
|
|
30883
31171
|
{
|
|
30884
31172
|
label: t("messageActions.regenerate"),
|
|
30885
31173
|
onClick: onRetry,
|
|
30886
31174
|
onTooltipOpen: onActionTooltipOpen,
|
|
30887
|
-
children: /* @__PURE__ */ (0,
|
|
31175
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(import_lucide_react72.RefreshCw, { size: 14 })
|
|
30888
31176
|
}
|
|
30889
31177
|
),
|
|
30890
|
-
isAssistant && onBranch && branching && /* @__PURE__ */ (0,
|
|
31178
|
+
isAssistant && onBranch && branching && /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(
|
|
30891
31179
|
MessageActionButton,
|
|
30892
31180
|
{
|
|
30893
31181
|
label: branchLabel,
|
|
@@ -30896,20 +31184,20 @@ function MessageActions({
|
|
|
30896
31184
|
onTooltipOpen: onActionTooltipOpen,
|
|
30897
31185
|
disabled: isBranching || branchDisabled || !branching.available,
|
|
30898
31186
|
"aria-busy": isBranching,
|
|
30899
|
-
children: isBranching ? /* @__PURE__ */ (0,
|
|
31187
|
+
children: isBranching ? /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(import_lucide_react72.Loader2, { size: 14, className: "animate-spin" }) : /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(import_lucide_react72.GitBranch, { size: 14 })
|
|
30900
31188
|
}
|
|
30901
31189
|
),
|
|
30902
|
-
isAssistant && skillUsages && skillUsages.length > 0 && /* @__PURE__ */ (0,
|
|
31190
|
+
isAssistant && skillUsages && skillUsages.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(MessageSkills, { usages: skillUsages, onOpen: onActionTooltipOpen })
|
|
30903
31191
|
]
|
|
30904
31192
|
}
|
|
30905
31193
|
),
|
|
30906
|
-
/* @__PURE__ */ (0,
|
|
31194
|
+
/* @__PURE__ */ (0, import_jsx_runtime116.jsx)(MessageTimestamp, { updatedAt })
|
|
30907
31195
|
] });
|
|
30908
31196
|
}
|
|
30909
31197
|
|
|
30910
31198
|
// src/components/thread/MessageEditor.tsx
|
|
30911
31199
|
var import_react10 = require("react");
|
|
30912
|
-
var
|
|
31200
|
+
var import_jsx_runtime117 = require("react/jsx-runtime");
|
|
30913
31201
|
function MessageEditor({
|
|
30914
31202
|
initialText,
|
|
30915
31203
|
onSave,
|
|
@@ -30930,8 +31218,8 @@ function MessageEditor({
|
|
|
30930
31218
|
setBusy(false);
|
|
30931
31219
|
}
|
|
30932
31220
|
}
|
|
30933
|
-
return /* @__PURE__ */ (0,
|
|
30934
|
-
/* @__PURE__ */ (0,
|
|
31221
|
+
return /* @__PURE__ */ (0, import_jsx_runtime117.jsxs)("div", { className: "w-full space-y-2 rounded-2xl border border-input bg-background p-3", children: [
|
|
31222
|
+
/* @__PURE__ */ (0, import_jsx_runtime117.jsx)(
|
|
30935
31223
|
"textarea",
|
|
30936
31224
|
{
|
|
30937
31225
|
"aria-label": t("threadControl.editMessage"),
|
|
@@ -30943,9 +31231,9 @@ function MessageEditor({
|
|
|
30943
31231
|
className: "w-full resize-y bg-transparent text-sm leading-relaxed text-foreground outline-none"
|
|
30944
31232
|
}
|
|
30945
31233
|
),
|
|
30946
|
-
error && /* @__PURE__ */ (0,
|
|
30947
|
-
/* @__PURE__ */ (0,
|
|
30948
|
-
/* @__PURE__ */ (0,
|
|
31234
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime117.jsx)("p", { role: "alert", className: "text-xs text-destructive", children: error }),
|
|
31235
|
+
/* @__PURE__ */ (0, import_jsx_runtime117.jsxs)("div", { className: "flex justify-end gap-2", children: [
|
|
31236
|
+
/* @__PURE__ */ (0, import_jsx_runtime117.jsx)(
|
|
30949
31237
|
Button,
|
|
30950
31238
|
{
|
|
30951
31239
|
type: "button",
|
|
@@ -30956,7 +31244,7 @@ function MessageEditor({
|
|
|
30956
31244
|
children: t("threadControl.discardEdit")
|
|
30957
31245
|
}
|
|
30958
31246
|
),
|
|
30959
|
-
/* @__PURE__ */ (0,
|
|
31247
|
+
/* @__PURE__ */ (0, import_jsx_runtime117.jsx)(
|
|
30960
31248
|
Button,
|
|
30961
31249
|
{
|
|
30962
31250
|
type: "button",
|
|
@@ -30971,7 +31259,7 @@ function MessageEditor({
|
|
|
30971
31259
|
}
|
|
30972
31260
|
|
|
30973
31261
|
// src/components/thread/MessageList.tsx
|
|
30974
|
-
var
|
|
31262
|
+
var import_jsx_runtime118 = require("react/jsx-runtime");
|
|
30975
31263
|
function formatMessageContent(content) {
|
|
30976
31264
|
if (typeof content === "string") {
|
|
30977
31265
|
return content;
|
|
@@ -31046,16 +31334,16 @@ function MessageList({
|
|
|
31046
31334
|
const approvalIndex = foldedIndexes.has(toolAnchor) ? [...processGroups].find(
|
|
31047
31335
|
([, indexes]) => indexes.includes(toolAnchor)
|
|
31048
31336
|
)?.[0] ?? lastAssistantIndex : toolAnchor >= 0 ? toolAnchor : lastAssistantIndex;
|
|
31049
|
-
return /* @__PURE__ */ (0,
|
|
31337
|
+
return /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(PresentationScrollAnchor, { mode, children: /* @__PURE__ */ (0, import_jsx_runtime118.jsxs)(
|
|
31050
31338
|
"div",
|
|
31051
31339
|
{
|
|
31052
31340
|
"data-slot": "chatkit-message-list",
|
|
31053
31341
|
"data-message-presentation": mode,
|
|
31054
31342
|
className: "space-y-4",
|
|
31055
31343
|
children: [
|
|
31056
|
-
canLoadMoreMessages && /* @__PURE__ */ (0,
|
|
31057
|
-
/* @__PURE__ */ (0,
|
|
31058
|
-
/* @__PURE__ */ (0,
|
|
31344
|
+
canLoadMoreMessages && /* @__PURE__ */ (0, import_jsx_runtime118.jsxs)("div", { className: "flex items-center gap-3 py-1", children: [
|
|
31345
|
+
/* @__PURE__ */ (0, import_jsx_runtime118.jsx)("div", { className: "h-px min-w-8 flex-1 bg-border" }),
|
|
31346
|
+
/* @__PURE__ */ (0, import_jsx_runtime118.jsx)(
|
|
31059
31347
|
Button,
|
|
31060
31348
|
{
|
|
31061
31349
|
type: "button",
|
|
@@ -31067,20 +31355,20 @@ function MessageList({
|
|
|
31067
31355
|
children: isLoadingMoreMessages ? t("chat.loadingMoreMessages") : t("chat.loadMoreMessages")
|
|
31068
31356
|
}
|
|
31069
31357
|
),
|
|
31070
|
-
/* @__PURE__ */ (0,
|
|
31358
|
+
/* @__PURE__ */ (0, import_jsx_runtime118.jsx)("div", { className: "h-px min-w-8 flex-1 bg-border" })
|
|
31071
31359
|
] }),
|
|
31072
31360
|
messages.map((message, index) => {
|
|
31073
31361
|
if (foldedIndexes.has(index)) return null;
|
|
31074
|
-
const call = Array.isArray(message.content) ? message.content.find(
|
|
31362
|
+
const call = Array.isArray(message.content) ? message.content.find(import_chatkit_types30.isCallEndedContent) : void 0;
|
|
31075
31363
|
if (call)
|
|
31076
|
-
return /* @__PURE__ */ (0,
|
|
31364
|
+
return /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(
|
|
31077
31365
|
"div",
|
|
31078
31366
|
{
|
|
31079
31367
|
"data-message-id": message.id,
|
|
31080
31368
|
ref: (node) => {
|
|
31081
31369
|
if (message.id) onMessageAnchor?.(message.id, node);
|
|
31082
31370
|
},
|
|
31083
|
-
children: /* @__PURE__ */ (0,
|
|
31371
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(CallEndedMessage, { call })
|
|
31084
31372
|
},
|
|
31085
31373
|
message.id ?? index
|
|
31086
31374
|
);
|
|
@@ -31130,7 +31418,7 @@ function MessageList({
|
|
|
31130
31418
|
if (!isAssistantMessage && !hasPlainRenderableContent && !hasHumanAttachments && humanRuntimeCapabilityOptions.length === 0 && humanReferences.length === 0) {
|
|
31131
31419
|
return null;
|
|
31132
31420
|
}
|
|
31133
|
-
return /* @__PURE__ */ (0,
|
|
31421
|
+
return /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(
|
|
31134
31422
|
"div",
|
|
31135
31423
|
{
|
|
31136
31424
|
ref: (node) => {
|
|
@@ -31152,7 +31440,7 @@ function MessageList({
|
|
|
31152
31440
|
"group group/message flex gap-3",
|
|
31153
31441
|
isHumanMessage ? "justify-end" : embedded ? "justify-start" : "justify-start -ml-1"
|
|
31154
31442
|
),
|
|
31155
|
-
children: /* @__PURE__ */ (0,
|
|
31443
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(
|
|
31156
31444
|
"div",
|
|
31157
31445
|
{
|
|
31158
31446
|
className: cn(
|
|
@@ -31162,7 +31450,7 @@ function MessageList({
|
|
|
31162
31450
|
!embedded && "px-3",
|
|
31163
31451
|
(isAssistantMessage || isEditingMessage) && "min-w-0 flex-1"
|
|
31164
31452
|
),
|
|
31165
|
-
children: isEditingMessage && editing ? /* @__PURE__ */ (0,
|
|
31453
|
+
children: isEditingMessage && editing ? /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(
|
|
31166
31454
|
MessageEditor,
|
|
31167
31455
|
{
|
|
31168
31456
|
initialText: messageContent,
|
|
@@ -31170,8 +31458,8 @@ function MessageList({
|
|
|
31170
31458
|
onSave: (text) => editing.onSave(humanMessage, text)
|
|
31171
31459
|
},
|
|
31172
31460
|
message.id
|
|
31173
|
-
) : /* @__PURE__ */ (0,
|
|
31174
|
-
/* @__PURE__ */ (0,
|
|
31461
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime118.jsxs)(import_jsx_runtime118.Fragment, { children: [
|
|
31462
|
+
/* @__PURE__ */ (0, import_jsx_runtime118.jsx)(
|
|
31175
31463
|
"div",
|
|
31176
31464
|
{
|
|
31177
31465
|
"data-human-bubble": isHumanMessage ? "" : void 0,
|
|
@@ -31185,12 +31473,12 @@ function MessageList({
|
|
|
31185
31473
|
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"
|
|
31186
31474
|
// AI messages: use chat-specific foreground color
|
|
31187
31475
|
),
|
|
31188
|
-
children: isAssistantMessage ? /* @__PURE__ */ (0,
|
|
31476
|
+
children: isAssistantMessage ? /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(
|
|
31189
31477
|
AssistantMessage,
|
|
31190
31478
|
{
|
|
31191
31479
|
mode,
|
|
31192
31480
|
collapseProcess,
|
|
31193
|
-
processPrefix: processIndexes?.length ? /* @__PURE__ */ (0,
|
|
31481
|
+
processPrefix: processIndexes?.length ? /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(
|
|
31194
31482
|
MessageList,
|
|
31195
31483
|
{
|
|
31196
31484
|
messages: processIndexes.map(
|
|
@@ -31225,14 +31513,14 @@ function MessageList({
|
|
|
31225
31513
|
pet,
|
|
31226
31514
|
mcpApps
|
|
31227
31515
|
}
|
|
31228
|
-
) : /* @__PURE__ */ (0,
|
|
31229
|
-
isHumanMessage && humanRuntimeCapabilityOptions.length > 0 && /* @__PURE__ */ (0,
|
|
31516
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime118.jsxs)(import_jsx_runtime118.Fragment, { children: [
|
|
31517
|
+
isHumanMessage && humanRuntimeCapabilityOptions.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(
|
|
31230
31518
|
HumanRuntimeCapabilityChips,
|
|
31231
31519
|
{
|
|
31232
31520
|
options: humanRuntimeCapabilityOptions
|
|
31233
31521
|
}
|
|
31234
31522
|
),
|
|
31235
|
-
isHumanMessage && humanReferences.length > 0 && /* @__PURE__ */ (0,
|
|
31523
|
+
isHumanMessage && humanReferences.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime118.jsx)("div", { className: "mb-2 flex flex-wrap gap-1.5", children: humanReferences.map((reference) => /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(
|
|
31236
31524
|
ReferenceChip,
|
|
31237
31525
|
{
|
|
31238
31526
|
reference,
|
|
@@ -31240,29 +31528,29 @@ function MessageList({
|
|
|
31240
31528
|
},
|
|
31241
31529
|
getReferenceKey(reference)
|
|
31242
31530
|
)) }),
|
|
31243
|
-
isHumanMessage && humanAttachments.length > 0 && /* @__PURE__ */ (0,
|
|
31531
|
+
isHumanMessage && humanAttachments.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime118.jsx)("div", { className: "flex flex-wrap gap-1.5 mb-2", children: humanAttachments.map((file, fileIndex) => /* @__PURE__ */ (0, import_jsx_runtime118.jsxs)(
|
|
31244
31532
|
"div",
|
|
31245
31533
|
{
|
|
31246
31534
|
className: "flex items-center gap-1.5 rounded-md bg-primary-foreground/20 px-2 py-1 text-xs",
|
|
31247
31535
|
children: [
|
|
31248
|
-
/* @__PURE__ */ (0,
|
|
31249
|
-
/* @__PURE__ */ (0,
|
|
31536
|
+
/* @__PURE__ */ (0, import_jsx_runtime118.jsx)(import_lucide_react73.FileText, { size: 12 }),
|
|
31537
|
+
/* @__PURE__ */ (0, import_jsx_runtime118.jsx)("span", { className: "max-w-[100px] truncate", children: file.originalName ?? file.id })
|
|
31250
31538
|
]
|
|
31251
31539
|
},
|
|
31252
31540
|
fileIndex
|
|
31253
31541
|
)) }),
|
|
31254
|
-
Array.isArray(message.content) ? message.content.map((part, partIndex) => /* @__PURE__ */ (0,
|
|
31542
|
+
Array.isArray(message.content) ? message.content.map((part, partIndex) => /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(
|
|
31255
31543
|
"p",
|
|
31256
31544
|
{
|
|
31257
31545
|
className: "wrap-break-word text-sm leading-relaxed",
|
|
31258
31546
|
children: formatMessageContent(part)
|
|
31259
31547
|
},
|
|
31260
31548
|
`${part.type}-${partIndex}`
|
|
31261
|
-
)) : /* @__PURE__ */ (0,
|
|
31549
|
+
)) : /* @__PURE__ */ (0, import_jsx_runtime118.jsx)("span", { className: "wrap-break-word text-sm leading-relaxed", children: formatMessageContent(message.content) })
|
|
31262
31550
|
] })
|
|
31263
31551
|
}
|
|
31264
31552
|
),
|
|
31265
|
-
showActions && /* @__PURE__ */ (0,
|
|
31553
|
+
showActions && /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(
|
|
31266
31554
|
MessageActions,
|
|
31267
31555
|
{
|
|
31268
31556
|
updatedAt: isAssistantMessage || isHumanMessage ? message.updatedAt : void 0,
|
|
@@ -31270,11 +31558,11 @@ function MessageList({
|
|
|
31270
31558
|
message
|
|
31271
31559
|
) ?? messageContent : messageContent,
|
|
31272
31560
|
isAssistant: isAssistantMessage,
|
|
31273
|
-
skillUsages: isAssistantMessage ? (0,
|
|
31561
|
+
skillUsages: isAssistantMessage ? (0, import_chatkit_types31.mergeChatSkillUsages)(
|
|
31274
31562
|
...(processIndexes ?? []).map(
|
|
31275
|
-
(i) => (0,
|
|
31563
|
+
(i) => (0, import_chatkit_types31.getMessageSkillUsages)(messages[i])
|
|
31276
31564
|
),
|
|
31277
|
-
(0,
|
|
31565
|
+
(0, import_chatkit_types31.getMessageSkillUsages)(message)
|
|
31278
31566
|
) : void 0,
|
|
31279
31567
|
isStreaming: isStreamingMessage,
|
|
31280
31568
|
alwaysVisible: isAssistantMessage && index === lastAssistantIndex,
|
|
@@ -31287,8 +31575,8 @@ function MessageList({
|
|
|
31287
31575
|
onRetry: onRetry && isAssistantMessage && !isLoading && index === messages.length - 1 ? () => onRetry(index) : void 0
|
|
31288
31576
|
}
|
|
31289
31577
|
),
|
|
31290
|
-
index === approvalIndex && approval && /* @__PURE__ */ (0,
|
|
31291
|
-
!showActions && !isStreamingMessage && (isAssistantMessage || isHumanMessage) && /* @__PURE__ */ (0,
|
|
31578
|
+
index === approvalIndex && approval && /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(MessageBubble, { mode, children: approval }),
|
|
31579
|
+
!showActions && !isStreamingMessage && (isAssistantMessage || isHumanMessage) && /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(MessageTimestamp, { updatedAt: message.updatedAt })
|
|
31292
31580
|
] })
|
|
31293
31581
|
}
|
|
31294
31582
|
)
|
|
@@ -31296,7 +31584,7 @@ function MessageList({
|
|
|
31296
31584
|
message.id ?? `${message.type}-${index}`
|
|
31297
31585
|
);
|
|
31298
31586
|
}),
|
|
31299
|
-
approvalIndex < 0 && approval && /* @__PURE__ */ (0,
|
|
31587
|
+
approvalIndex < 0 && approval && /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(MessageBubble, { mode, children: approval }),
|
|
31300
31588
|
showLoadingDots && (() => {
|
|
31301
31589
|
const lastMessage = messages[messages.length - 1];
|
|
31302
31590
|
const lastMessageType = lastMessage ? String(lastMessage.type) : "";
|
|
@@ -31319,13 +31607,13 @@ function MessageList({
|
|
|
31319
31607
|
isLoading,
|
|
31320
31608
|
{ now: streamingNow }
|
|
31321
31609
|
);
|
|
31322
|
-
return /* @__PURE__ */ (0,
|
|
31610
|
+
return /* @__PURE__ */ (0, import_jsx_runtime118.jsx)("div", { className: "flex justify-start gap-3 -ml-2", children: /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(
|
|
31323
31611
|
MessageBubble,
|
|
31324
31612
|
{
|
|
31325
31613
|
mode,
|
|
31326
31614
|
kind: "status",
|
|
31327
31615
|
className: "max-w-full py-2.5",
|
|
31328
|
-
children: /* @__PURE__ */ (0,
|
|
31616
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(
|
|
31329
31617
|
AssistantStreamingIndicator,
|
|
31330
31618
|
{
|
|
31331
31619
|
status: fallbackStreamingStatus ?? "loading"
|
|
@@ -31340,20 +31628,20 @@ function MessageList({
|
|
|
31340
31628
|
}
|
|
31341
31629
|
|
|
31342
31630
|
// src/components/thread/StartScreen.tsx
|
|
31343
|
-
var
|
|
31344
|
-
var
|
|
31345
|
-
var
|
|
31631
|
+
var React110 = require("react");
|
|
31632
|
+
var import_lucide_react74 = require("lucide-react");
|
|
31633
|
+
var import_jsx_runtime119 = require("react/jsx-runtime");
|
|
31346
31634
|
function getIconComponent2(icon) {
|
|
31347
31635
|
const iconMap = {
|
|
31348
|
-
"circle-question": /* @__PURE__ */ (0,
|
|
31349
|
-
lightbulb: /* @__PURE__ */ (0,
|
|
31350
|
-
sparkle: /* @__PURE__ */ (0,
|
|
31351
|
-
write: /* @__PURE__ */ (0,
|
|
31352
|
-
search: /* @__PURE__ */ (0,
|
|
31353
|
-
globe: /* @__PURE__ */ (0,
|
|
31354
|
-
"book-open": /* @__PURE__ */ (0,
|
|
31355
|
-
compass: /* @__PURE__ */ (0,
|
|
31356
|
-
bolt: /* @__PURE__ */ (0,
|
|
31636
|
+
"circle-question": /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(import_lucide_react74.HelpCircle, { size: 20 }),
|
|
31637
|
+
lightbulb: /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(import_lucide_react74.Lightbulb, { size: 20 }),
|
|
31638
|
+
sparkle: /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(import_lucide_react74.Sparkles, { size: 20 }),
|
|
31639
|
+
write: /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(import_lucide_react74.Pencil, { size: 20 }),
|
|
31640
|
+
search: /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(import_lucide_react74.Search, { size: 20 }),
|
|
31641
|
+
globe: /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(import_lucide_react74.Globe, { size: 20 }),
|
|
31642
|
+
"book-open": /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(import_lucide_react74.BookOpen, { size: 20 }),
|
|
31643
|
+
compass: /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(import_lucide_react74.Compass, { size: 20 }),
|
|
31644
|
+
bolt: /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(import_lucide_react74.Zap, { size: 20 })
|
|
31357
31645
|
};
|
|
31358
31646
|
return icon ? iconMap[icon] || iconMap["sparkle"] : iconMap["sparkle"];
|
|
31359
31647
|
}
|
|
@@ -31370,7 +31658,7 @@ function StartScreen({
|
|
|
31370
31658
|
const prompts = startScreen?.prompts ?? [];
|
|
31371
31659
|
const hasPrompts = startScreen?.promptsLayout !== "list" && prompts.length > 0;
|
|
31372
31660
|
const editPromptLabel = t("startScreen.editPrompt");
|
|
31373
|
-
return /* @__PURE__ */ (0,
|
|
31661
|
+
return /* @__PURE__ */ (0, import_jsx_runtime119.jsxs)(
|
|
31374
31662
|
"div",
|
|
31375
31663
|
{
|
|
31376
31664
|
className: cn(
|
|
@@ -31378,8 +31666,8 @@ function StartScreen({
|
|
|
31378
31666
|
className
|
|
31379
31667
|
),
|
|
31380
31668
|
children: [
|
|
31381
|
-
/* @__PURE__ */ (0,
|
|
31382
|
-
hasPrompts && /* @__PURE__ */ (0,
|
|
31669
|
+
/* @__PURE__ */ (0, import_jsx_runtime119.jsx)("div", { className: cn("mb-4 text-center", hasPrompts && "mb-10"), children: /* @__PURE__ */ (0, import_jsx_runtime119.jsx)("h2", { className: "mb-4 text-4xl font-semibold text-foreground", children: greeting }) }),
|
|
31670
|
+
hasPrompts && /* @__PURE__ */ (0, import_jsx_runtime119.jsx)("div", { className: "w-full max-w-2xl", children: /* @__PURE__ */ (0, import_jsx_runtime119.jsx)("div", { className: "grid grid-cols-1 sm:grid-cols-2 gap-3", children: prompts.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime119.jsxs)(
|
|
31383
31671
|
"div",
|
|
31384
31672
|
{
|
|
31385
31673
|
className: cn(
|
|
@@ -31388,7 +31676,7 @@ function StartScreen({
|
|
|
31388
31676
|
"focus-within:ring-2 focus-within:ring-primary/20"
|
|
31389
31677
|
),
|
|
31390
31678
|
children: [
|
|
31391
|
-
/* @__PURE__ */ (0,
|
|
31679
|
+
/* @__PURE__ */ (0, import_jsx_runtime119.jsxs)(
|
|
31392
31680
|
"button",
|
|
31393
31681
|
{
|
|
31394
31682
|
type: "button",
|
|
@@ -31399,8 +31687,8 @@ function StartScreen({
|
|
|
31399
31687
|
"focus:outline-none disabled:cursor-not-allowed disabled:opacity-50"
|
|
31400
31688
|
),
|
|
31401
31689
|
children: [
|
|
31402
|
-
/* @__PURE__ */ (0,
|
|
31403
|
-
/* @__PURE__ */ (0,
|
|
31690
|
+
/* @__PURE__ */ (0, import_jsx_runtime119.jsx)("span", { className: "flex h-10 w-10 shrink-0 items-center justify-center rounded-lg bg-primary/10 text-primary", children: getIconComponent2(item.icon) }),
|
|
31691
|
+
/* @__PURE__ */ (0, import_jsx_runtime119.jsx)(
|
|
31404
31692
|
"div",
|
|
31405
31693
|
{
|
|
31406
31694
|
className: "text-sm font-medium text-foreground line-clamp-3 overflow-hidden",
|
|
@@ -31411,7 +31699,7 @@ function StartScreen({
|
|
|
31411
31699
|
]
|
|
31412
31700
|
}
|
|
31413
31701
|
),
|
|
31414
|
-
/* @__PURE__ */ (0,
|
|
31702
|
+
/* @__PURE__ */ (0, import_jsx_runtime119.jsx)(
|
|
31415
31703
|
"button",
|
|
31416
31704
|
{
|
|
31417
31705
|
type: "button",
|
|
@@ -31424,7 +31712,7 @@ function StartScreen({
|
|
|
31424
31712
|
"rounded-r-xl transition-colors hover:bg-muted hover:text-foreground",
|
|
31425
31713
|
"focus:outline-none disabled:cursor-not-allowed disabled:opacity-50"
|
|
31426
31714
|
),
|
|
31427
|
-
children: /* @__PURE__ */ (0,
|
|
31715
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(import_lucide_react74.Pencil, { size: 16 })
|
|
31428
31716
|
}
|
|
31429
31717
|
)
|
|
31430
31718
|
]
|
|
@@ -31437,7 +31725,7 @@ function StartScreen({
|
|
|
31437
31725
|
}
|
|
31438
31726
|
|
|
31439
31727
|
// src/components/chat/messages/ChatTranscript.tsx
|
|
31440
|
-
var
|
|
31728
|
+
var import_jsx_runtime120 = require("react/jsx-runtime");
|
|
31441
31729
|
function ChatTranscript({
|
|
31442
31730
|
isInitialComposer,
|
|
31443
31731
|
chatColumnStyle,
|
|
@@ -31484,7 +31772,7 @@ function ChatTranscript({
|
|
|
31484
31772
|
const needsUserInput = Boolean(
|
|
31485
31773
|
stream.pendingHITLRequest || stream.pendingRequestUserInput
|
|
31486
31774
|
);
|
|
31487
|
-
return /* @__PURE__ */ (0,
|
|
31775
|
+
return /* @__PURE__ */ (0, import_jsx_runtime120.jsxs)(
|
|
31488
31776
|
"div",
|
|
31489
31777
|
{
|
|
31490
31778
|
"data-slot": "chatkit-chat-content",
|
|
@@ -31494,23 +31782,23 @@ function ChatTranscript({
|
|
|
31494
31782
|
),
|
|
31495
31783
|
style: chatColumnStyle,
|
|
31496
31784
|
children: [
|
|
31497
|
-
errorMessage && /* @__PURE__ */ (0,
|
|
31498
|
-
historyError && /* @__PURE__ */ (0,
|
|
31499
|
-
conversationBranch.error && /* @__PURE__ */ (0,
|
|
31785
|
+
errorMessage && /* @__PURE__ */ (0, import_jsx_runtime120.jsx)("div", { className: "mb-4 rounded-lg border border-destructive/30 bg-destructive/10 px-3 py-2 text-sm text-destructive", children: errorMessage }),
|
|
31786
|
+
historyError && /* @__PURE__ */ (0, import_jsx_runtime120.jsx)("div", { className: "mb-4 rounded-lg border border-amber-200 bg-amber-50 px-3 py-2 text-sm text-amber-900", children: historyError }),
|
|
31787
|
+
conversationBranch.error && /* @__PURE__ */ (0, import_jsx_runtime120.jsxs)(
|
|
31500
31788
|
"div",
|
|
31501
31789
|
{
|
|
31502
31790
|
role: "alert",
|
|
31503
31791
|
className: "mb-4 rounded-lg border border-destructive/30 bg-destructive/10 px-3 py-2 text-sm text-destructive",
|
|
31504
31792
|
children: [
|
|
31505
31793
|
t("messageActions.branchFailed"),
|
|
31506
|
-
/* @__PURE__ */ (0,
|
|
31794
|
+
/* @__PURE__ */ (0, import_jsx_runtime120.jsx)("p", { className: "mt-1 text-xs", children: /^(?:failed to fetch|network\s*(?:request\s*)?(?:failed|error)|load failed)$/i.test(
|
|
31507
31795
|
conversationBranch.error
|
|
31508
31796
|
) ? t("messageActions.branchNetworkError") : conversationBranch.error })
|
|
31509
31797
|
]
|
|
31510
31798
|
}
|
|
31511
31799
|
),
|
|
31512
|
-
showMissingConfig && /* @__PURE__ */ (0,
|
|
31513
|
-
/* @__PURE__ */ (0,
|
|
31800
|
+
showMissingConfig && /* @__PURE__ */ (0, import_jsx_runtime120.jsx)("div", { className: "mb-4 rounded-lg border border-amber-200 bg-amber-50 px-3 py-2 text-sm text-amber-900", children: missingConfigDetailMessage }),
|
|
31801
|
+
/* @__PURE__ */ (0, import_jsx_runtime120.jsx)(
|
|
31514
31802
|
ThreadHistoryStatus,
|
|
31515
31803
|
{
|
|
31516
31804
|
state: stream.historyLoad,
|
|
@@ -31520,7 +31808,7 @@ function ChatTranscript({
|
|
|
31520
31808
|
}
|
|
31521
31809
|
}
|
|
31522
31810
|
),
|
|
31523
|
-
!stream.threadId && messages.length === 0 && !canLoadMoreMessages ? /* @__PURE__ */ (0,
|
|
31811
|
+
!stream.threadId && messages.length === 0 && !canLoadMoreMessages ? /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(
|
|
31524
31812
|
StartScreen,
|
|
31525
31813
|
{
|
|
31526
31814
|
startScreen,
|
|
@@ -31530,7 +31818,7 @@ function ChatTranscript({
|
|
|
31530
31818
|
promptEditDisabled: isPromptEditDisabled,
|
|
31531
31819
|
className: "px-4 pb-4 pt-2"
|
|
31532
31820
|
}
|
|
31533
|
-
) : /* @__PURE__ */ (0,
|
|
31821
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(
|
|
31534
31822
|
MessageList,
|
|
31535
31823
|
{
|
|
31536
31824
|
approval: inlineApproval.card,
|
|
@@ -31577,14 +31865,14 @@ function ChatTranscript({
|
|
|
31577
31865
|
onMessageAnchor: setMessageNavigationAnchor
|
|
31578
31866
|
}
|
|
31579
31867
|
),
|
|
31580
|
-
needsUserInput && !stream.isDisplayPaused && /* @__PURE__ */ (0,
|
|
31868
|
+
needsUserInput && !stream.isDisplayPaused && /* @__PURE__ */ (0, import_jsx_runtime120.jsx)("p", { role: "status", className: "mt-3 text-sm text-muted-foreground", children: t("thread.waitingForInput") })
|
|
31581
31869
|
]
|
|
31582
31870
|
}
|
|
31583
31871
|
);
|
|
31584
31872
|
}
|
|
31585
31873
|
|
|
31586
31874
|
// src/components/chat/messages/useChatQuotes.ts
|
|
31587
|
-
var
|
|
31875
|
+
var React111 = __toESM(require("react"), 1);
|
|
31588
31876
|
|
|
31589
31877
|
// src/components/chat/messages/quote-selection.ts
|
|
31590
31878
|
function getClosestQuoteContainer(node) {
|
|
@@ -31605,13 +31893,13 @@ function useChatQuotes({
|
|
|
31605
31893
|
composerInputRef,
|
|
31606
31894
|
workbench
|
|
31607
31895
|
}) {
|
|
31608
|
-
const [quoteSelection, setQuoteSelection] =
|
|
31609
|
-
const [isOpeningSideChat, setIsOpeningSideChat] =
|
|
31610
|
-
const [sideChatError, setSideChatError] =
|
|
31611
|
-
const clearQuoteSelection =
|
|
31896
|
+
const [quoteSelection, setQuoteSelection] = React111.useState(null);
|
|
31897
|
+
const [isOpeningSideChat, setIsOpeningSideChat] = React111.useState(false);
|
|
31898
|
+
const [sideChatError, setSideChatError] = React111.useState(null);
|
|
31899
|
+
const clearQuoteSelection = React111.useCallback(() => {
|
|
31612
31900
|
setQuoteSelection(null);
|
|
31613
31901
|
}, []);
|
|
31614
|
-
const syncQuoteSelection =
|
|
31902
|
+
const syncQuoteSelection = React111.useCallback(() => {
|
|
31615
31903
|
if (surface !== "main") {
|
|
31616
31904
|
clearQuoteSelection();
|
|
31617
31905
|
return;
|
|
@@ -31660,13 +31948,13 @@ function useChatQuotes({
|
|
|
31660
31948
|
left
|
|
31661
31949
|
});
|
|
31662
31950
|
}, [clearQuoteSelection, surface]);
|
|
31663
|
-
|
|
31951
|
+
React111.useEffect(() => {
|
|
31664
31952
|
document.addEventListener("selectionchange", syncQuoteSelection);
|
|
31665
31953
|
return () => {
|
|
31666
31954
|
document.removeEventListener("selectionchange", syncQuoteSelection);
|
|
31667
31955
|
};
|
|
31668
31956
|
}, [syncQuoteSelection]);
|
|
31669
|
-
|
|
31957
|
+
React111.useEffect(() => {
|
|
31670
31958
|
const viewport = viewportRef.current;
|
|
31671
31959
|
if (!viewport) {
|
|
31672
31960
|
return;
|
|
@@ -31683,10 +31971,10 @@ function useChatQuotes({
|
|
|
31683
31971
|
window.removeEventListener("resize", handleViewportScroll);
|
|
31684
31972
|
};
|
|
31685
31973
|
}, [clearQuoteSelection]);
|
|
31686
|
-
|
|
31974
|
+
React111.useEffect(() => {
|
|
31687
31975
|
clearQuoteSelection();
|
|
31688
31976
|
}, [messages.length, stream.threadId, clearQuoteSelection]);
|
|
31689
|
-
const handleQuoteSelection =
|
|
31977
|
+
const handleQuoteSelection = React111.useCallback(() => {
|
|
31690
31978
|
if (!quoteSelection) {
|
|
31691
31979
|
return;
|
|
31692
31980
|
}
|
|
@@ -31699,7 +31987,7 @@ function useChatQuotes({
|
|
|
31699
31987
|
}
|
|
31700
31988
|
composerInputRef.current?.focus();
|
|
31701
31989
|
}, [clearQuoteSelection, quoteSelection]);
|
|
31702
|
-
const handleAskInSideChat =
|
|
31990
|
+
const handleAskInSideChat = React111.useCallback(async () => {
|
|
31703
31991
|
if (!quoteSelection || !workbench.sideChatEnabled || !stream.threadId || stream.isLoading)
|
|
31704
31992
|
return;
|
|
31705
31993
|
setIsOpeningSideChat(true);
|
|
@@ -31731,7 +32019,7 @@ function useChatQuotes({
|
|
|
31731
32019
|
}
|
|
31732
32020
|
|
|
31733
32021
|
// src/components/chat/messages/useChatStreamingFeedback.ts
|
|
31734
|
-
var
|
|
32022
|
+
var React112 = __toESM(require("react"), 1);
|
|
31735
32023
|
function useChatStreamingFeedback({
|
|
31736
32024
|
surface,
|
|
31737
32025
|
setStream,
|
|
@@ -31739,14 +32027,14 @@ function useChatStreamingFeedback({
|
|
|
31739
32027
|
}) {
|
|
31740
32028
|
const LOADING_DOTS_MIN_DURATION = 800;
|
|
31741
32029
|
const STREAMING_STATUS_REFRESH_MS = 250;
|
|
31742
|
-
const [showLoadingDots, setShowLoadingDots] =
|
|
31743
|
-
const [streamingNow, setStreamingNow] =
|
|
31744
|
-
const loadingStartTimeRef =
|
|
31745
|
-
const lastStreamOutputAtRef =
|
|
31746
|
-
|
|
32030
|
+
const [showLoadingDots, setShowLoadingDots] = React112.useState(false);
|
|
32031
|
+
const [streamingNow, setStreamingNow] = React112.useState(() => Date.now());
|
|
32032
|
+
const loadingStartTimeRef = React112.useRef(null);
|
|
32033
|
+
const lastStreamOutputAtRef = React112.useRef(null);
|
|
32034
|
+
React112.useEffect(() => {
|
|
31747
32035
|
if (surface === "main") setStream(stream);
|
|
31748
32036
|
}, [setStream, stream, surface]);
|
|
31749
|
-
|
|
32037
|
+
React112.useEffect(() => {
|
|
31750
32038
|
if (stream.isLoading) {
|
|
31751
32039
|
if (!loadingStartTimeRef.current) {
|
|
31752
32040
|
loadingStartTimeRef.current = Date.now();
|
|
@@ -31769,7 +32057,7 @@ function useChatStreamingFeedback({
|
|
|
31769
32057
|
}
|
|
31770
32058
|
}
|
|
31771
32059
|
}, [stream.isLoading]);
|
|
31772
|
-
|
|
32060
|
+
React112.useEffect(() => {
|
|
31773
32061
|
if (!stream.isLoading) {
|
|
31774
32062
|
lastStreamOutputAtRef.current = null;
|
|
31775
32063
|
setStreamingNow(Date.now());
|
|
@@ -31779,7 +32067,7 @@ function useChatStreamingFeedback({
|
|
|
31779
32067
|
lastStreamOutputAtRef.current = now;
|
|
31780
32068
|
setStreamingNow(now);
|
|
31781
32069
|
}, [stream.messages, stream.isLoading]);
|
|
31782
|
-
|
|
32070
|
+
React112.useEffect(() => {
|
|
31783
32071
|
if (!stream.isLoading) {
|
|
31784
32072
|
return;
|
|
31785
32073
|
}
|
|
@@ -31792,7 +32080,7 @@ function useChatStreamingFeedback({
|
|
|
31792
32080
|
}
|
|
31793
32081
|
|
|
31794
32082
|
// src/components/chat/messages/useChatViewport.ts
|
|
31795
|
-
var
|
|
32083
|
+
var React113 = __toESM(require("react"), 1);
|
|
31796
32084
|
function useChatViewport({
|
|
31797
32085
|
t,
|
|
31798
32086
|
assistantTitle,
|
|
@@ -31805,20 +32093,20 @@ function useChatViewport({
|
|
|
31805
32093
|
clearQuoteSelection,
|
|
31806
32094
|
setHistoryError
|
|
31807
32095
|
}) {
|
|
31808
|
-
const [isAtBottom, setIsAtBottom] =
|
|
31809
|
-
const [hasUpdatesBelow, setHasUpdatesBelow] =
|
|
31810
|
-
const messageNavigationAnchorsRef =
|
|
32096
|
+
const [isAtBottom, setIsAtBottom] = React113.useState(true);
|
|
32097
|
+
const [hasUpdatesBelow, setHasUpdatesBelow] = React113.useState(false);
|
|
32098
|
+
const messageNavigationAnchorsRef = React113.useRef(
|
|
31811
32099
|
/* @__PURE__ */ new Map()
|
|
31812
32100
|
);
|
|
31813
|
-
const shouldAutoScrollRef =
|
|
31814
|
-
const forceFollowRef =
|
|
31815
|
-
const previousMessageCountRef =
|
|
31816
|
-
const previousScrollTopRef =
|
|
31817
|
-
const isPrependingHistoryMessagesRef =
|
|
31818
|
-
const autoScrollFrameRef =
|
|
31819
|
-
const isPointerDownRef =
|
|
31820
|
-
const lastTouchYRef =
|
|
31821
|
-
const messageNavigationLabels =
|
|
32101
|
+
const shouldAutoScrollRef = React113.useRef(true);
|
|
32102
|
+
const forceFollowRef = React113.useRef(false);
|
|
32103
|
+
const previousMessageCountRef = React113.useRef(0);
|
|
32104
|
+
const previousScrollTopRef = React113.useRef(0);
|
|
32105
|
+
const isPrependingHistoryMessagesRef = React113.useRef(false);
|
|
32106
|
+
const autoScrollFrameRef = React113.useRef(null);
|
|
32107
|
+
const isPointerDownRef = React113.useRef(false);
|
|
32108
|
+
const lastTouchYRef = React113.useRef(null);
|
|
32109
|
+
const messageNavigationLabels = React113.useMemo(
|
|
31822
32110
|
() => ({
|
|
31823
32111
|
user: t("chat.youLabel"),
|
|
31824
32112
|
assistant: assistantTitle,
|
|
@@ -31838,7 +32126,7 @@ function useChatViewport({
|
|
|
31838
32126
|
[assistantTitle, t]
|
|
31839
32127
|
);
|
|
31840
32128
|
const presentationMode = resolveMessagePresentation(messagePresentation).mode;
|
|
31841
|
-
const messageNavigationItems =
|
|
32129
|
+
const messageNavigationItems = React113.useMemo(
|
|
31842
32130
|
() => messageNavigationEnabled ? buildMessageNavigationItems(
|
|
31843
32131
|
messages,
|
|
31844
32132
|
{
|
|
@@ -31863,23 +32151,23 @@ function useChatViewport({
|
|
|
31863
32151
|
historyMessagePagination?.isLoadingMore
|
|
31864
32152
|
);
|
|
31865
32153
|
const canLoadMoreMessages = Boolean(historyMessagePagination?.hasMore);
|
|
31866
|
-
const cancelPendingAutoScroll =
|
|
32154
|
+
const cancelPendingAutoScroll = React113.useCallback(() => {
|
|
31867
32155
|
if (autoScrollFrameRef.current !== null) {
|
|
31868
32156
|
cancelAnimationFrame(autoScrollFrameRef.current);
|
|
31869
32157
|
autoScrollFrameRef.current = null;
|
|
31870
32158
|
}
|
|
31871
32159
|
}, []);
|
|
31872
|
-
const disableAutoFollow =
|
|
32160
|
+
const disableAutoFollow = React113.useCallback(() => {
|
|
31873
32161
|
forceFollowRef.current = false;
|
|
31874
32162
|
shouldAutoScrollRef.current = false;
|
|
31875
32163
|
cancelPendingAutoScroll();
|
|
31876
32164
|
}, [cancelPendingAutoScroll]);
|
|
31877
|
-
const enableAutoFollow =
|
|
32165
|
+
const enableAutoFollow = React113.useCallback(() => {
|
|
31878
32166
|
forceFollowRef.current = true;
|
|
31879
32167
|
shouldAutoScrollRef.current = true;
|
|
31880
32168
|
setHasUpdatesBelow(false);
|
|
31881
32169
|
}, []);
|
|
31882
|
-
const scrollToBottom =
|
|
32170
|
+
const scrollToBottom = React113.useCallback(
|
|
31883
32171
|
(smooth = false, force = false) => {
|
|
31884
32172
|
if (force) {
|
|
31885
32173
|
enableAutoFollow();
|
|
@@ -31906,7 +32194,7 @@ function useChatViewport({
|
|
|
31906
32194
|
},
|
|
31907
32195
|
[cancelPendingAutoScroll, enableAutoFollow]
|
|
31908
32196
|
);
|
|
31909
|
-
const setMessageNavigationAnchor =
|
|
32197
|
+
const setMessageNavigationAnchor = React113.useCallback(
|
|
31910
32198
|
(id, node) => {
|
|
31911
32199
|
if (node) {
|
|
31912
32200
|
messageNavigationAnchorsRef.current.set(id, node);
|
|
@@ -31916,15 +32204,15 @@ function useChatViewport({
|
|
|
31916
32204
|
},
|
|
31917
32205
|
[]
|
|
31918
32206
|
);
|
|
31919
|
-
const getMessageNavigationAnchor =
|
|
32207
|
+
const getMessageNavigationAnchor = React113.useCallback(
|
|
31920
32208
|
(item) => messageNavigationAnchorsRef.current.get(item.id) ?? null,
|
|
31921
32209
|
[]
|
|
31922
32210
|
);
|
|
31923
|
-
const handleMessageNavigationNavigate =
|
|
32211
|
+
const handleMessageNavigationNavigate = React113.useCallback(() => {
|
|
31924
32212
|
disableAutoFollow();
|
|
31925
32213
|
clearQuoteSelection();
|
|
31926
32214
|
}, [clearQuoteSelection, disableAutoFollow]);
|
|
31927
|
-
|
|
32215
|
+
React113.useEffect(() => {
|
|
31928
32216
|
const viewport = viewportRef.current;
|
|
31929
32217
|
if (!viewport) return;
|
|
31930
32218
|
previousScrollTopRef.current = viewport.scrollTop;
|
|
@@ -32005,14 +32293,14 @@ function useChatViewport({
|
|
|
32005
32293
|
window.removeEventListener("pointercancel", stopPointerTracking);
|
|
32006
32294
|
};
|
|
32007
32295
|
}, [cancelPendingAutoScroll, disableAutoFollow]);
|
|
32008
|
-
|
|
32296
|
+
React113.useEffect(() => {
|
|
32009
32297
|
shouldAutoScrollRef.current = true;
|
|
32010
32298
|
forceFollowRef.current = false;
|
|
32011
32299
|
previousScrollTopRef.current = 0;
|
|
32012
32300
|
setIsAtBottom(true);
|
|
32013
32301
|
setHasUpdatesBelow(false);
|
|
32014
32302
|
}, [stream.threadId]);
|
|
32015
|
-
|
|
32303
|
+
React113.useEffect(() => {
|
|
32016
32304
|
const messageCountChanged = messages.length !== previousMessageCountRef.current;
|
|
32017
32305
|
previousMessageCountRef.current = messages.length;
|
|
32018
32306
|
if (isPrependingHistoryMessagesRef.current) {
|
|
@@ -32029,7 +32317,7 @@ function useChatViewport({
|
|
|
32029
32317
|
scrollToBottom();
|
|
32030
32318
|
}
|
|
32031
32319
|
}, [stream.isLoading, messages, scrollToBottom]);
|
|
32032
|
-
const handleLoadMoreMessages =
|
|
32320
|
+
const handleLoadMoreMessages = React113.useCallback(async () => {
|
|
32033
32321
|
if (!canLoadMoreMessages || isLoadingMoreMessages) {
|
|
32034
32322
|
return;
|
|
32035
32323
|
}
|
|
@@ -32081,7 +32369,7 @@ function useChatViewport({
|
|
|
32081
32369
|
}
|
|
32082
32370
|
|
|
32083
32371
|
// src/components/chat/models/useChatModels.ts
|
|
32084
|
-
var
|
|
32372
|
+
var React114 = __toESM(require("react"), 1);
|
|
32085
32373
|
|
|
32086
32374
|
// src/components/chat/session/errors.ts
|
|
32087
32375
|
function toError(value) {
|
|
@@ -32104,7 +32392,7 @@ function useChatModels({
|
|
|
32104
32392
|
availableModels,
|
|
32105
32393
|
hostedModelCatalog
|
|
32106
32394
|
}) {
|
|
32107
|
-
|
|
32395
|
+
React114.useEffect(() => {
|
|
32108
32396
|
if (modelAssistantIdRef.current !== modelAssistantId) {
|
|
32109
32397
|
modelAssistantIdRef.current = modelAssistantId;
|
|
32110
32398
|
requestedModelIdRef.current = void 0;
|
|
@@ -32153,7 +32441,7 @@ function useChatModels({
|
|
|
32153
32441
|
sendParentEvent,
|
|
32154
32442
|
setSelectedModelId
|
|
32155
32443
|
]);
|
|
32156
|
-
const handleModelSelect =
|
|
32444
|
+
const handleModelSelect = React114.useCallback(
|
|
32157
32445
|
(modelId) => {
|
|
32158
32446
|
const nextModelId = resolveSelectedModelId(availableModels, modelId);
|
|
32159
32447
|
if (!nextModelId) return;
|
|
@@ -32182,22 +32470,22 @@ function useChatModels({
|
|
|
32182
32470
|
}
|
|
32183
32471
|
|
|
32184
32472
|
// src/components/chat/models/useChatModelState.ts
|
|
32185
|
-
var
|
|
32473
|
+
var React115 = __toESM(require("react"), 1);
|
|
32186
32474
|
function useChatModelState({ stream }) {
|
|
32187
|
-
const [availableModels, setAvailableModels] =
|
|
32475
|
+
const [availableModels, setAvailableModels] = React115.useState(
|
|
32188
32476
|
[]
|
|
32189
32477
|
);
|
|
32190
|
-
const [hostedModelCatalog, setHostedModelCatalog] =
|
|
32478
|
+
const [hostedModelCatalog, setHostedModelCatalog] = React115.useState(null);
|
|
32191
32479
|
const modelAssistantId = stream.assistantId;
|
|
32192
32480
|
const modelClient = stream.client;
|
|
32193
32481
|
const selectedModelId = stream.selectedModelId;
|
|
32194
32482
|
const setSelectedModelId = stream.setSelectedModelId;
|
|
32195
|
-
const selectedModelIdRef =
|
|
32483
|
+
const selectedModelIdRef = React115.useRef(selectedModelId);
|
|
32196
32484
|
selectedModelIdRef.current = selectedModelId;
|
|
32197
|
-
const requestedModelIdRef =
|
|
32485
|
+
const requestedModelIdRef = React115.useRef(
|
|
32198
32486
|
void 0
|
|
32199
32487
|
);
|
|
32200
|
-
const modelAssistantIdRef =
|
|
32488
|
+
const modelAssistantIdRef = React115.useRef(modelAssistantId);
|
|
32201
32489
|
return {
|
|
32202
32490
|
requestedModelIdRef,
|
|
32203
32491
|
setSelectedModelId,
|
|
@@ -32213,24 +32501,24 @@ function useChatModelState({ stream }) {
|
|
|
32213
32501
|
}
|
|
32214
32502
|
|
|
32215
32503
|
// src/components/chat/pet/useChatPetSettings.ts
|
|
32216
|
-
var
|
|
32504
|
+
var React116 = __toESM(require("react"), 1);
|
|
32217
32505
|
function useChatPetSettings({ options }) {
|
|
32218
|
-
const [petSettingsOpen, setPetSettingsOpen] =
|
|
32219
|
-
const [petLocalSettings, setPetLocalSettings] =
|
|
32506
|
+
const [petSettingsOpen, setPetSettingsOpen] = React116.useState(false);
|
|
32507
|
+
const [petLocalSettings, setPetLocalSettings] = React116.useState(() => readPetLocalSettings());
|
|
32220
32508
|
const petRequired = options?.displayMode === "pet";
|
|
32221
32509
|
const petDisabled = options?.pet === false && !petRequired;
|
|
32222
|
-
const basePetSettings =
|
|
32510
|
+
const basePetSettings = React116.useMemo(
|
|
32223
32511
|
() => derivePetLocalSettings(options?.pet),
|
|
32224
32512
|
[options?.pet]
|
|
32225
32513
|
);
|
|
32226
|
-
const displayedPetSettings =
|
|
32514
|
+
const displayedPetSettings = React116.useMemo(
|
|
32227
32515
|
() => ({
|
|
32228
32516
|
...petLocalSettings ?? basePetSettings,
|
|
32229
32517
|
...petRequired ? { enabled: true } : {}
|
|
32230
32518
|
}),
|
|
32231
32519
|
[basePetSettings, petLocalSettings, petRequired]
|
|
32232
32520
|
);
|
|
32233
|
-
const effectivePet =
|
|
32521
|
+
const effectivePet = React116.useMemo(() => {
|
|
32234
32522
|
if (petDisabled) return false;
|
|
32235
32523
|
if (petRequired || petLocalSettings) {
|
|
32236
32524
|
return buildPetOptionsFromLocalSettings(displayedPetSettings);
|
|
@@ -32243,7 +32531,7 @@ function useChatPetSettings({ options }) {
|
|
|
32243
32531
|
petLocalSettings,
|
|
32244
32532
|
petRequired
|
|
32245
32533
|
]);
|
|
32246
|
-
const savePetLocalSettings =
|
|
32534
|
+
const savePetLocalSettings = React116.useCallback(
|
|
32247
32535
|
(settings) => {
|
|
32248
32536
|
if (petDisabled) return;
|
|
32249
32537
|
const nextSettings = petRequired ? { ...settings, enabled: true } : settings;
|
|
@@ -32252,7 +32540,7 @@ function useChatPetSettings({ options }) {
|
|
|
32252
32540
|
},
|
|
32253
32541
|
[petDisabled, petRequired]
|
|
32254
32542
|
);
|
|
32255
|
-
const handlePetCommand =
|
|
32543
|
+
const handlePetCommand = React116.useCallback(
|
|
32256
32544
|
(mode) => {
|
|
32257
32545
|
if (petDisabled) return;
|
|
32258
32546
|
if (mode === "settings") {
|
|
@@ -32280,7 +32568,7 @@ function useChatPetSettings({ options }) {
|
|
|
32280
32568
|
savePetLocalSettings
|
|
32281
32569
|
]
|
|
32282
32570
|
);
|
|
32283
|
-
const handleSetPetEnabled =
|
|
32571
|
+
const handleSetPetEnabled = React116.useCallback(
|
|
32284
32572
|
(enabled) => {
|
|
32285
32573
|
if (petRequired) return;
|
|
32286
32574
|
savePetLocalSettings({ ...displayedPetSettings, enabled });
|
|
@@ -32397,7 +32685,7 @@ function useChatAssistant({
|
|
|
32397
32685
|
}
|
|
32398
32686
|
|
|
32399
32687
|
// src/components/chat/session/useChatBranchState.ts
|
|
32400
|
-
var
|
|
32688
|
+
var React117 = __toESM(require("react"), 1);
|
|
32401
32689
|
|
|
32402
32690
|
// src/hooks/useThreadBranches.ts
|
|
32403
32691
|
var import_react13 = require("react");
|
|
@@ -32434,6 +32722,21 @@ function useThreadBranches(client, conversationId, threadId, enabled, isLoading)
|
|
|
32434
32722
|
generation.current += 1;
|
|
32435
32723
|
};
|
|
32436
32724
|
}, [refresh, isLoading]);
|
|
32725
|
+
(0, import_react13.useEffect)(() => {
|
|
32726
|
+
if (!enabled || !threadId || !["busy", "pausing"].includes(current?.status ?? ""))
|
|
32727
|
+
return;
|
|
32728
|
+
let disposed = false;
|
|
32729
|
+
let timer;
|
|
32730
|
+
const poll = async () => {
|
|
32731
|
+
await refresh();
|
|
32732
|
+
if (!disposed) timer = setTimeout(poll, 1e3);
|
|
32733
|
+
};
|
|
32734
|
+
timer = setTimeout(poll, 1e3);
|
|
32735
|
+
return () => {
|
|
32736
|
+
disposed = true;
|
|
32737
|
+
clearTimeout(timer);
|
|
32738
|
+
};
|
|
32739
|
+
}, [enabled, threadId, current?.status, refresh]);
|
|
32437
32740
|
return { branches, current, error, refresh };
|
|
32438
32741
|
}
|
|
32439
32742
|
|
|
@@ -32446,14 +32749,14 @@ function useChatBranchState({ stream }) {
|
|
|
32446
32749
|
Boolean(stream.isReady && stream.client?.conversations?.listThreads),
|
|
32447
32750
|
stream.isLoading
|
|
32448
32751
|
);
|
|
32449
|
-
const [editingMessageId, setEditingMessageId] =
|
|
32752
|
+
const [editingMessageId, setEditingMessageId] = React117.useState(
|
|
32450
32753
|
null
|
|
32451
32754
|
);
|
|
32452
|
-
const editRequestRef =
|
|
32453
|
-
const [isChangingBranch, setIsChangingBranch] =
|
|
32454
|
-
const activeBranchRef =
|
|
32755
|
+
const editRequestRef = React117.useRef(null);
|
|
32756
|
+
const [isChangingBranch, setIsChangingBranch] = React117.useState(false);
|
|
32757
|
+
const activeBranchRef = React117.useRef(stream.threadId);
|
|
32455
32758
|
activeBranchRef.current = stream.threadId;
|
|
32456
|
-
|
|
32759
|
+
React117.useEffect(() => {
|
|
32457
32760
|
setEditingMessageId(null);
|
|
32458
32761
|
editRequestRef.current = null;
|
|
32459
32762
|
}, [stream.threadId]);
|
|
@@ -32469,7 +32772,7 @@ function useChatBranchState({ stream }) {
|
|
|
32469
32772
|
}
|
|
32470
32773
|
|
|
32471
32774
|
// src/components/chat/session/useChatConversationActions.ts
|
|
32472
|
-
var
|
|
32775
|
+
var React118 = __toESM(require("react"), 1);
|
|
32473
32776
|
|
|
32474
32777
|
// src/hooks/useConversationBranch.ts
|
|
32475
32778
|
var import_react14 = require("react");
|
|
@@ -32593,8 +32896,33 @@ function useChatConversationActions({
|
|
|
32593
32896
|
setIsChangingBranch,
|
|
32594
32897
|
options
|
|
32595
32898
|
}) {
|
|
32596
|
-
const
|
|
32597
|
-
|
|
32899
|
+
const previousProjectRef = React118.useRef(activeProjectId);
|
|
32900
|
+
React118.useLayoutEffect(() => {
|
|
32901
|
+
if (previousProjectRef.current === activeProjectId) return;
|
|
32902
|
+
previousProjectRef.current = activeProjectId;
|
|
32903
|
+
commitComposerParts(composerPartsRef.current.filter((part) => part.type === "text"), {
|
|
32904
|
+
resetDom: true,
|
|
32905
|
+
syncRemovedCapabilityTokens: false
|
|
32906
|
+
});
|
|
32907
|
+
attachmentsRef.current?.clear();
|
|
32908
|
+
setReferences([]);
|
|
32909
|
+
setReferencedWorkspaceFiles([]);
|
|
32910
|
+
setThreadMention(null);
|
|
32911
|
+
setSelectedTool(null);
|
|
32912
|
+
setEditingMessageId(null);
|
|
32913
|
+
editRequestRef.current = null;
|
|
32914
|
+
activeBranchRef.current = null;
|
|
32915
|
+
setIsChangingBranch(false);
|
|
32916
|
+
setHistoryError(null);
|
|
32917
|
+
setRuntimeCapabilityPalette(null);
|
|
32918
|
+
resetRunRuntimeCapabilities();
|
|
32919
|
+
}, [activeProjectId, commitComposerParts, resetRunRuntimeCapabilities]);
|
|
32920
|
+
const handleProjectSelectionChange = React118.useCallback(
|
|
32921
|
+
(projectId2, selection) => {
|
|
32922
|
+
if (stream.threadId || stream.conversationId) {
|
|
32923
|
+
onProjectChange?.(projectId2, selection);
|
|
32924
|
+
return;
|
|
32925
|
+
}
|
|
32598
32926
|
const textParts = composerPartsRef.current.filter(
|
|
32599
32927
|
(part) => part.type === "text"
|
|
32600
32928
|
);
|
|
@@ -32615,7 +32943,7 @@ function useChatConversationActions({
|
|
|
32615
32943
|
);
|
|
32616
32944
|
});
|
|
32617
32945
|
onConnectorsChange?.([]);
|
|
32618
|
-
onProjectChange?.(
|
|
32946
|
+
onProjectChange?.(projectId2, selection);
|
|
32619
32947
|
},
|
|
32620
32948
|
[
|
|
32621
32949
|
commitComposerParts,
|
|
@@ -32650,7 +32978,7 @@ function useChatConversationActions({
|
|
|
32650
32978
|
},
|
|
32651
32979
|
refresh: refreshThreads
|
|
32652
32980
|
});
|
|
32653
|
-
const handlePromptEdit =
|
|
32981
|
+
const handlePromptEdit = React118.useCallback(
|
|
32654
32982
|
(prompt) => {
|
|
32655
32983
|
if (isPromptEditDisabled) return;
|
|
32656
32984
|
setComposerText(prompt, prompt.length);
|
|
@@ -32664,7 +32992,7 @@ function useChatConversationActions({
|
|
|
32664
32992
|
setRuntimeCapabilityPalette
|
|
32665
32993
|
]
|
|
32666
32994
|
);
|
|
32667
|
-
const loadThreadHistory =
|
|
32995
|
+
const loadThreadHistory = React118.useCallback(
|
|
32668
32996
|
async (threadId) => {
|
|
32669
32997
|
if (missingConfig) {
|
|
32670
32998
|
setHistoryError(missingConfigShortMessage);
|
|
@@ -32811,7 +33139,7 @@ function useChatConversationActions({
|
|
|
32811
33139
|
}
|
|
32812
33140
|
|
|
32813
33141
|
// src/components/chat/session/useChatEnvironment.ts
|
|
32814
|
-
var
|
|
33142
|
+
var React119 = __toESM(require("react"), 1);
|
|
32815
33143
|
var import_meta3 = {};
|
|
32816
33144
|
var defaultApiUrl2 = import_meta3.env.VITE_XPERTAI_API_URL;
|
|
32817
33145
|
function useChatEnvironment({
|
|
@@ -32839,7 +33167,7 @@ function useChatEnvironment({
|
|
|
32839
33167
|
clientSecret: effectiveClientSecret
|
|
32840
33168
|
});
|
|
32841
33169
|
const missingConfig = Boolean(missingConfigKind);
|
|
32842
|
-
const missingConfigShortMessage =
|
|
33170
|
+
const missingConfigShortMessage = React119.useMemo(() => {
|
|
32843
33171
|
switch (missingConfigKind) {
|
|
32844
33172
|
case "apiUrl":
|
|
32845
33173
|
return t("chat.missingApiUrlShort");
|
|
@@ -32851,7 +33179,7 @@ function useChatEnvironment({
|
|
|
32851
33179
|
return t("chat.missingConfigShort");
|
|
32852
33180
|
}
|
|
32853
33181
|
}, [missingConfigKind, t]);
|
|
32854
|
-
const missingConfigDetailMessage =
|
|
33182
|
+
const missingConfigDetailMessage = React119.useMemo(() => {
|
|
32855
33183
|
switch (missingConfigKind) {
|
|
32856
33184
|
case "apiUrl":
|
|
32857
33185
|
return t("chat.missingApiUrlDetail");
|
|
@@ -32865,7 +33193,7 @@ function useChatEnvironment({
|
|
|
32865
33193
|
}, [missingConfigKind, t]);
|
|
32866
33194
|
const isHistoryLoading = stream.historyLoad?.status === "loading";
|
|
32867
33195
|
const isHistoryUnavailable = isHistoryLoading || stream.historyLoad?.status === "error";
|
|
32868
|
-
const [historyError, setHistoryError] =
|
|
33196
|
+
const [historyError, setHistoryError] = React119.useState(null);
|
|
32869
33197
|
const showMissingConfig = !isClientSecretInitializing && missingConfig;
|
|
32870
33198
|
return {
|
|
32871
33199
|
stream,
|
|
@@ -32894,43 +33222,49 @@ function useChatEnvironment({
|
|
|
32894
33222
|
}
|
|
32895
33223
|
|
|
32896
33224
|
// src/components/chat/session/useChatRunControl.ts
|
|
32897
|
-
var
|
|
33225
|
+
var React120 = __toESM(require("react"), 1);
|
|
32898
33226
|
function useChatRunControl({
|
|
32899
33227
|
branchState,
|
|
32900
33228
|
stream,
|
|
32901
33229
|
isChangingBranch,
|
|
32902
33230
|
activeBranchRef
|
|
32903
33231
|
}) {
|
|
32904
|
-
const [runControlRequest, setRunControlRequest] =
|
|
32905
|
-
const runControlRequestRef =
|
|
32906
|
-
const [runControlError, setRunControlError] =
|
|
33232
|
+
const [runControlRequest, setRunControlRequest] = React120.useState(null);
|
|
33233
|
+
const runControlRequestRef = React120.useRef(null);
|
|
33234
|
+
const [runControlError, setRunControlError] = React120.useState(null);
|
|
33235
|
+
const errorGenerationRef = React120.useRef(0);
|
|
33236
|
+
const clearRunControlError = React120.useCallback(() => {
|
|
33237
|
+
errorGenerationRef.current += 1;
|
|
33238
|
+
setRunControlError(null);
|
|
33239
|
+
}, []);
|
|
33240
|
+
React120.useEffect(clearRunControlError, [stream.threadId, clearRunControlError]);
|
|
32907
33241
|
const currentRunControl = branchState.current?.runControl;
|
|
32908
|
-
const pauseRunId = stream.activeRunId ?? currentRunControl?.executionId ??
|
|
33242
|
+
const pauseRunId = stream.isLoading ? stream.activeRunId ?? currentRunControl?.executionId ?? null : currentRunControl?.executionId ?? stream.activeRunId ?? null;
|
|
32909
33243
|
const canPauseRun = Boolean(
|
|
32910
33244
|
stream.threadId && pauseRunId && !stream.isThreadInterrupted && (stream.isLoading || currentRunControl?.state === "running")
|
|
32911
33245
|
);
|
|
32912
33246
|
const isRunPausing = runControlRequest?.threadId === stream.threadId && runControlRequest.action === "pause" || branchState.current?.status === "pausing";
|
|
32913
33247
|
const isRunPaused = branchState.current?.status === "paused";
|
|
32914
|
-
const
|
|
32915
|
-
|
|
33248
|
+
const isPauseActive = isRunPausing || isRunPaused;
|
|
33249
|
+
const isStoppingRun = runControlRequest?.threadId === stream.threadId && runControlRequest.action === "stop";
|
|
33250
|
+
const canStopRun = Boolean(
|
|
33251
|
+
stream.threadId && pauseRunId && (stream.isLoading || ["busy", "pausing", "paused"].includes(
|
|
33252
|
+
branchState.current?.status ?? ""
|
|
33253
|
+
))
|
|
32916
33254
|
);
|
|
32917
|
-
const isPauseActive = isRunPausing || isRunPaused || stream.isDisplayPaused;
|
|
32918
33255
|
const isResumingRun = runControlRequest?.threadId === stream.threadId && runControlRequest.action === "resume";
|
|
32919
|
-
const isVisibleStreaming = stream.isLoading && !stream.
|
|
33256
|
+
const isVisibleStreaming = stream.isLoading && !stream.isThreadInterrupted;
|
|
32920
33257
|
const handleComposerRunControl = async (action) => {
|
|
32921
33258
|
const sourceThreadId = stream.threadId;
|
|
32922
|
-
if (isChangingBranch ||
|
|
32923
|
-
|
|
32924
|
-
|
|
32925
|
-
|
|
32926
|
-
|
|
32927
|
-
|
|
32928
|
-
|
|
32929
|
-
|
|
32930
|
-
if (!sourceThreadId) return;
|
|
32931
|
-
if (runControlRequestRef.current?.threadId === sourceThreadId) return;
|
|
33259
|
+
if (!sourceThreadId || !pauseRunId || isChangingBranch || isStoppingRun || isResumingRun)
|
|
33260
|
+
return;
|
|
33261
|
+
if (action === "resume" && (!isRunPaused || !currentRunControl?.pauseId))
|
|
33262
|
+
return;
|
|
33263
|
+
if (action === "pause" && (isRunPaused || isRunPausing)) return;
|
|
33264
|
+
if (action === "stop" && !canStopRun) return;
|
|
33265
|
+
if (action !== "stop" && runControlRequestRef.current?.threadId === sourceThreadId)
|
|
33266
|
+
return;
|
|
32932
33267
|
const runId = pauseRunId;
|
|
32933
|
-
if (!runId) return;
|
|
32934
33268
|
const request = {
|
|
32935
33269
|
action,
|
|
32936
33270
|
threadId: sourceThreadId,
|
|
@@ -32938,26 +33272,26 @@ function useChatRunControl({
|
|
|
32938
33272
|
};
|
|
32939
33273
|
runControlRequestRef.current = request;
|
|
32940
33274
|
setRunControlRequest(request);
|
|
32941
|
-
|
|
33275
|
+
clearRunControlError();
|
|
33276
|
+
const errorGeneration = errorGenerationRef.current;
|
|
32942
33277
|
try {
|
|
32943
|
-
if (action === "
|
|
32944
|
-
await stream.
|
|
33278
|
+
if (action === "stop") {
|
|
33279
|
+
await stream.stop(request.runId);
|
|
32945
33280
|
} else if (action === "resume" && currentRunControl?.pauseId) {
|
|
32946
33281
|
await stream.resumeRun(request.runId, currentRunControl.pauseId);
|
|
32947
33282
|
} else {
|
|
32948
33283
|
await stream.pauseRun(request.runId);
|
|
32949
33284
|
}
|
|
32950
|
-
if (activeBranchRef.current === sourceThreadId) {
|
|
32951
|
-
await branchState.refresh();
|
|
32952
|
-
}
|
|
32953
33285
|
} catch (error) {
|
|
32954
|
-
if (activeBranchRef.current === sourceThreadId && runControlRequestRef.current === request) {
|
|
33286
|
+
if (activeBranchRef.current === sourceThreadId && runControlRequestRef.current === request && errorGenerationRef.current === errorGeneration) {
|
|
32955
33287
|
setRunControlError({
|
|
32956
33288
|
threadId: sourceThreadId,
|
|
32957
33289
|
message: error instanceof Error ? error.message : String(error)
|
|
32958
33290
|
});
|
|
32959
33291
|
}
|
|
32960
33292
|
} finally {
|
|
33293
|
+
if (activeBranchRef.current === sourceThreadId)
|
|
33294
|
+
await branchState.refresh();
|
|
32961
33295
|
if (runControlRequestRef.current === request) {
|
|
32962
33296
|
runControlRequestRef.current = null;
|
|
32963
33297
|
setRunControlRequest(null);
|
|
@@ -32971,18 +33305,20 @@ function useChatRunControl({
|
|
|
32971
33305
|
isVisibleStreaming,
|
|
32972
33306
|
isPauseActive,
|
|
32973
33307
|
runControlError,
|
|
33308
|
+
clearRunControlError,
|
|
32974
33309
|
canPauseRun,
|
|
32975
33310
|
handleComposerRunControl,
|
|
32976
|
-
|
|
33311
|
+
canStopRun,
|
|
33312
|
+
isStoppingRun,
|
|
32977
33313
|
currentRunControl
|
|
32978
33314
|
};
|
|
32979
33315
|
}
|
|
32980
33316
|
|
|
32981
33317
|
// src/components/chat/summary/useChatTaskSummary.ts
|
|
32982
|
-
var
|
|
33318
|
+
var React122 = __toESM(require("react"), 1);
|
|
32983
33319
|
|
|
32984
33320
|
// src/hooks/useTaskSummary.ts
|
|
32985
|
-
var
|
|
33321
|
+
var React121 = __toESM(require("react"), 1);
|
|
32986
33322
|
function useTaskSummary({
|
|
32987
33323
|
enabled,
|
|
32988
33324
|
conversationId,
|
|
@@ -32990,23 +33326,23 @@ function useTaskSummary({
|
|
|
32990
33326
|
live,
|
|
32991
33327
|
refreshVersion = 0
|
|
32992
33328
|
}) {
|
|
32993
|
-
const [loaded, setLoaded] =
|
|
32994
|
-
const [historySections, setHistorySections] =
|
|
32995
|
-
const [historySectionsConversationId, setHistorySectionsConversationId] =
|
|
32996
|
-
const [loadingSections, setLoadingSections] =
|
|
32997
|
-
const [error, setError] =
|
|
32998
|
-
const [retryVersion, setRetryVersion] =
|
|
32999
|
-
const requestVersionRef =
|
|
33000
|
-
const conversationIdRef =
|
|
33001
|
-
const sectionControllersRef =
|
|
33329
|
+
const [loaded, setLoaded] = React121.useState(null);
|
|
33330
|
+
const [historySections, setHistorySections] = React121.useState({});
|
|
33331
|
+
const [historySectionsConversationId, setHistorySectionsConversationId] = React121.useState(null);
|
|
33332
|
+
const [loadingSections, setLoadingSections] = React121.useState({});
|
|
33333
|
+
const [error, setError] = React121.useState(null);
|
|
33334
|
+
const [retryVersion, setRetryVersion] = React121.useState(0);
|
|
33335
|
+
const requestVersionRef = React121.useRef(0);
|
|
33336
|
+
const conversationIdRef = React121.useRef(conversationId);
|
|
33337
|
+
const sectionControllersRef = React121.useRef(
|
|
33002
33338
|
/* @__PURE__ */ new Map()
|
|
33003
33339
|
);
|
|
33004
33340
|
conversationIdRef.current = conversationId;
|
|
33005
|
-
const abortSectionRequests =
|
|
33341
|
+
const abortSectionRequests = React121.useCallback(() => {
|
|
33006
33342
|
sectionControllersRef.current.forEach((controller) => controller.abort());
|
|
33007
33343
|
sectionControllersRef.current.clear();
|
|
33008
33344
|
}, []);
|
|
33009
|
-
|
|
33345
|
+
React121.useEffect(() => {
|
|
33010
33346
|
abortSectionRequests();
|
|
33011
33347
|
setHistorySections({});
|
|
33012
33348
|
setHistorySectionsConversationId(conversationId);
|
|
@@ -33041,11 +33377,11 @@ function useTaskSummary({
|
|
|
33041
33377
|
retryVersion
|
|
33042
33378
|
]);
|
|
33043
33379
|
const snapshot = loaded?.conversationId === conversationId ? loaded.snapshot : null;
|
|
33044
|
-
const activeHistorySections =
|
|
33380
|
+
const activeHistorySections = React121.useMemo(
|
|
33045
33381
|
() => historySectionsConversationId === conversationId ? historySections : {},
|
|
33046
33382
|
[conversationId, historySections, historySectionsConversationId]
|
|
33047
33383
|
);
|
|
33048
|
-
const loadSection =
|
|
33384
|
+
const loadSection = React121.useCallback(
|
|
33049
33385
|
async (section) => {
|
|
33050
33386
|
if (!enabled || !conversationId || loadingSections[section]) {
|
|
33051
33387
|
return;
|
|
@@ -33123,12 +33459,12 @@ function useChatTaskSummary({
|
|
|
33123
33459
|
}) {
|
|
33124
33460
|
const taskSummaryEnabled = options?.taskSummary?.enabled === true;
|
|
33125
33461
|
const taskSummaryConversationId = stream.conversationId ?? null;
|
|
33126
|
-
const [taskSummaryDocked, setTaskSummaryDocked] =
|
|
33127
|
-
const [taskSummaryOpen, setTaskSummaryOpen] =
|
|
33128
|
-
const manuallyClosedTaskSummaryConversationIdsRef =
|
|
33462
|
+
const [taskSummaryDocked, setTaskSummaryDocked] = React122.useState(false);
|
|
33463
|
+
const [taskSummaryOpen, setTaskSummaryOpen] = React122.useState(false);
|
|
33464
|
+
const manuallyClosedTaskSummaryConversationIdsRef = React122.useRef(
|
|
33129
33465
|
/* @__PURE__ */ new Set()
|
|
33130
33466
|
);
|
|
33131
|
-
const liveTaskSummaryPending =
|
|
33467
|
+
const liveTaskSummaryPending = React122.useMemo(() => {
|
|
33132
33468
|
const followUps = pendingFollowUps.map((item) => ({
|
|
33133
33469
|
id: `follow-up:${item.id}`,
|
|
33134
33470
|
kind: "follow_up",
|
|
@@ -33163,7 +33499,7 @@ function useChatTaskSummary({
|
|
|
33163
33499
|
stream.pendingRequestUserInput,
|
|
33164
33500
|
t
|
|
33165
33501
|
]);
|
|
33166
|
-
const liveTaskSummaryRunning =
|
|
33502
|
+
const liveTaskSummaryRunning = React122.useMemo(
|
|
33167
33503
|
() => stream.runtimeActivities.sandboxServices.services.filter(
|
|
33168
33504
|
(service) => service.status === "starting" || service.status === "running" || service.status === "stopping"
|
|
33169
33505
|
).map((service) => ({
|
|
@@ -33180,7 +33516,7 @@ function useChatTaskSummary({
|
|
|
33180
33516
|
})),
|
|
33181
33517
|
[stream.runtimeActivities.sandboxServices.services]
|
|
33182
33518
|
);
|
|
33183
|
-
const taskSummaryAgentNames =
|
|
33519
|
+
const taskSummaryAgentNames = React122.useMemo(() => {
|
|
33184
33520
|
const names = /* @__PURE__ */ new Map();
|
|
33185
33521
|
runtimeCapabilityOptions.forEach((option) => {
|
|
33186
33522
|
if (option.type !== "subAgent") return;
|
|
@@ -33192,7 +33528,7 @@ function useChatTaskSummary({
|
|
|
33192
33528
|
});
|
|
33193
33529
|
return names;
|
|
33194
33530
|
}, [runtimeCapabilityOptions]);
|
|
33195
|
-
const liveTaskSummary =
|
|
33531
|
+
const liveTaskSummary = React122.useMemo(
|
|
33196
33532
|
() => collectLiveTaskSummary({
|
|
33197
33533
|
messages: messages.map(
|
|
33198
33534
|
(message) => ({
|
|
@@ -33230,7 +33566,7 @@ function useChatTaskSummary({
|
|
|
33230
33566
|
live: liveTaskSummary,
|
|
33231
33567
|
refreshVersion: stream.historyMessageLoadVersion
|
|
33232
33568
|
});
|
|
33233
|
-
const navigateToTaskSummaryMessage =
|
|
33569
|
+
const navigateToTaskSummaryMessage = React122.useCallback(
|
|
33234
33570
|
async (messageId) => {
|
|
33235
33571
|
try {
|
|
33236
33572
|
let anchor = messageNavigationAnchorsRef.current.get(messageId);
|
|
@@ -33258,7 +33594,7 @@ function useChatTaskSummary({
|
|
|
33258
33594
|
taskSummary.summary.outputs,
|
|
33259
33595
|
taskSummaryConversationId ?? void 0
|
|
33260
33596
|
);
|
|
33261
|
-
|
|
33597
|
+
React122.useLayoutEffect(() => {
|
|
33262
33598
|
if (characterPresentation) {
|
|
33263
33599
|
setTaskSummaryDocked(true);
|
|
33264
33600
|
return;
|
|
@@ -33297,7 +33633,7 @@ function useChatTaskSummary({
|
|
|
33297
33633
|
const taskSummaryAvailable = Boolean(
|
|
33298
33634
|
taskSummaryEnabled && (characterPresentation || stream.threadId && taskSummaryConversationId)
|
|
33299
33635
|
);
|
|
33300
|
-
const handleTaskSummaryOpenChange =
|
|
33636
|
+
const handleTaskSummaryOpenChange = React122.useCallback(
|
|
33301
33637
|
(open) => {
|
|
33302
33638
|
setTaskSummaryOpen(open);
|
|
33303
33639
|
if (!taskSummaryConversationId) return;
|
|
@@ -33313,7 +33649,7 @@ function useChatTaskSummary({
|
|
|
33313
33649
|
},
|
|
33314
33650
|
[taskSummaryConversationId]
|
|
33315
33651
|
);
|
|
33316
|
-
|
|
33652
|
+
React122.useEffect(() => {
|
|
33317
33653
|
if (characterPresentation) {
|
|
33318
33654
|
setTaskSummaryOpen(false);
|
|
33319
33655
|
return;
|
|
@@ -33322,7 +33658,7 @@ function useChatTaskSummary({
|
|
|
33322
33658
|
setTaskSummaryOpen(false);
|
|
33323
33659
|
}
|
|
33324
33660
|
}, [taskSummaryDocked, characterPresentation, stream.assistantId]);
|
|
33325
|
-
|
|
33661
|
+
React122.useEffect(() => {
|
|
33326
33662
|
if (characterPresentation || !taskSummaryDocked || !taskSummaryAvailable || !taskSummaryConversationId || manuallyClosedTaskSummaryConversationIdsRef.current.has(
|
|
33327
33663
|
taskSummaryConversationId
|
|
33328
33664
|
)) {
|
|
@@ -33358,14 +33694,14 @@ function useChatTaskSummary({
|
|
|
33358
33694
|
}
|
|
33359
33695
|
|
|
33360
33696
|
// src/components/chat.tsx
|
|
33361
|
-
var
|
|
33697
|
+
var import_chatkit_types32 = require("@xpert-ai/chatkit-types");
|
|
33362
33698
|
|
|
33363
33699
|
// src/components/chat/header/AssistantPresence.tsx
|
|
33364
|
-
var
|
|
33700
|
+
var React123 = __toESM(require("react"), 1);
|
|
33365
33701
|
var Dialog5 = __toESM(require("@radix-ui/react-dialog"), 1);
|
|
33366
|
-
var
|
|
33702
|
+
var import_lucide_react75 = require("lucide-react");
|
|
33367
33703
|
var import_framer_motion2 = require("framer-motion");
|
|
33368
|
-
var
|
|
33704
|
+
var import_jsx_runtime121 = require("react/jsx-runtime");
|
|
33369
33705
|
var PRESENCE_EASE = [0.22, 1, 0.36, 1];
|
|
33370
33706
|
function PresenceCharacter({
|
|
33371
33707
|
presence,
|
|
@@ -33373,7 +33709,7 @@ function PresenceCharacter({
|
|
|
33373
33709
|
}) {
|
|
33374
33710
|
const systemReducedMotion = (0, import_framer_motion2.useReducedMotion)();
|
|
33375
33711
|
const still = presence.reducedMotion || systemReducedMotion;
|
|
33376
|
-
return /* @__PURE__ */ (0,
|
|
33712
|
+
return /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(
|
|
33377
33713
|
import_framer_motion2.motion.div,
|
|
33378
33714
|
{
|
|
33379
33715
|
"data-slot": "assistant-presence-character",
|
|
@@ -33381,7 +33717,7 @@ function PresenceCharacter({
|
|
|
33381
33717
|
className: "relative z-10 shrink-0",
|
|
33382
33718
|
style: { width: size2, height: size2 },
|
|
33383
33719
|
transition: { layout: { duration: 0.34, ease: PRESENCE_EASE } },
|
|
33384
|
-
children: /* @__PURE__ */ (0,
|
|
33720
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(AssistantCharacter, { ...presence, size: size2 })
|
|
33385
33721
|
}
|
|
33386
33722
|
);
|
|
33387
33723
|
}
|
|
@@ -33392,7 +33728,7 @@ function PresenceStatus({
|
|
|
33392
33728
|
}) {
|
|
33393
33729
|
const { t } = useChatkitTranslation();
|
|
33394
33730
|
const key = waitingForInput ? "approval" : state === "failed" ? "failed" : state === "review" ? "thinking" : state === "running" ? "running" : state === "waiting" ? "loading" : "idle";
|
|
33395
|
-
return /* @__PURE__ */ (0,
|
|
33731
|
+
return /* @__PURE__ */ (0, import_jsx_runtime121.jsxs)(
|
|
33396
33732
|
"span",
|
|
33397
33733
|
{
|
|
33398
33734
|
role: "status",
|
|
@@ -33410,12 +33746,12 @@ function AssistantPresence(props) {
|
|
|
33410
33746
|
const { t } = useChatkitTranslation();
|
|
33411
33747
|
const systemReducedMotion = (0, import_framer_motion2.useReducedMotion)();
|
|
33412
33748
|
const still = props.reducedMotion || systemReducedMotion;
|
|
33413
|
-
return /* @__PURE__ */ (0,
|
|
33749
|
+
return /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(
|
|
33414
33750
|
"div",
|
|
33415
33751
|
{
|
|
33416
33752
|
"data-slot": "assistant-presence",
|
|
33417
33753
|
className: "chatkit-presence pointer-events-none relative z-20 col-start-1 row-start-1 flex shrink-0 flex-col items-center self-start",
|
|
33418
|
-
children: /* @__PURE__ */ (0,
|
|
33754
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime121.jsxs)(
|
|
33419
33755
|
"button",
|
|
33420
33756
|
{
|
|
33421
33757
|
id: props.motionId ? `${props.motionId}-trigger` : void 0,
|
|
@@ -33429,8 +33765,8 @@ function AssistantPresence(props) {
|
|
|
33429
33765
|
className: "chatkit-presence-trigger pointer-events-auto grid justify-items-center rounded-2xl outline-offset-4",
|
|
33430
33766
|
onClick: () => props.onOpenChange(true),
|
|
33431
33767
|
children: [
|
|
33432
|
-
/* @__PURE__ */ (0,
|
|
33433
|
-
/* @__PURE__ */ (0,
|
|
33768
|
+
/* @__PURE__ */ (0, import_jsx_runtime121.jsx)("span", { className: "block size-20", children: !props.open && /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(PresenceCharacter, { presence: props }) }),
|
|
33769
|
+
/* @__PURE__ */ (0, import_jsx_runtime121.jsxs)(
|
|
33434
33770
|
import_framer_motion2.motion.span,
|
|
33435
33771
|
{
|
|
33436
33772
|
initial: false,
|
|
@@ -33442,8 +33778,8 @@ function AssistantPresence(props) {
|
|
|
33442
33778
|
transition: { duration: still ? 0 : 0.18, ease: PRESENCE_EASE },
|
|
33443
33779
|
className: "chatkit-presence-bubble max-w-64 rounded-2xl border border-border/60 bg-popover/95 shadow-sm backdrop-blur-sm",
|
|
33444
33780
|
children: [
|
|
33445
|
-
/* @__PURE__ */ (0,
|
|
33446
|
-
/* @__PURE__ */ (0,
|
|
33781
|
+
/* @__PURE__ */ (0, import_jsx_runtime121.jsx)("span", { className: "block truncate text-sm font-medium", children: props.name }),
|
|
33782
|
+
/* @__PURE__ */ (0, import_jsx_runtime121.jsx)(PresenceStatus, { ...props })
|
|
33447
33783
|
]
|
|
33448
33784
|
}
|
|
33449
33785
|
)
|
|
@@ -33460,11 +33796,11 @@ function AssistantSummaryDialog({
|
|
|
33460
33796
|
voice
|
|
33461
33797
|
}) {
|
|
33462
33798
|
const { t } = useChatkitTranslation();
|
|
33463
|
-
const dialog =
|
|
33464
|
-
const opener =
|
|
33465
|
-
const restoreFocus =
|
|
33466
|
-
const wasOpen =
|
|
33467
|
-
|
|
33799
|
+
const dialog = React123.useRef(null);
|
|
33800
|
+
const opener = React123.useRef(null);
|
|
33801
|
+
const restoreFocus = React123.useRef(true);
|
|
33802
|
+
const wasOpen = React123.useRef(false);
|
|
33803
|
+
React123.useLayoutEffect(() => {
|
|
33468
33804
|
if (presence.open && !wasOpen.current) {
|
|
33469
33805
|
restoreFocus.current = true;
|
|
33470
33806
|
const active = document.activeElement;
|
|
@@ -33478,7 +33814,7 @@ function AssistantSummaryDialog({
|
|
|
33478
33814
|
}
|
|
33479
33815
|
wasOpen.current = presence.open;
|
|
33480
33816
|
}, [presence.open, presence.motionId]);
|
|
33481
|
-
|
|
33817
|
+
React123.useEffect(() => {
|
|
33482
33818
|
if (!presence.open || voice?.panel) return;
|
|
33483
33819
|
const dismiss = () => {
|
|
33484
33820
|
restoreFocus.current = false;
|
|
@@ -33487,15 +33823,15 @@ function AssistantSummaryDialog({
|
|
|
33487
33823
|
window.addEventListener("blur", dismiss);
|
|
33488
33824
|
return () => window.removeEventListener("blur", dismiss);
|
|
33489
33825
|
}, [presence.open, presence.onOpenChange, voice?.panel]);
|
|
33490
|
-
return /* @__PURE__ */ (0,
|
|
33826
|
+
return /* @__PURE__ */ (0, import_jsx_runtime121.jsxs)("div", { className: "chatkit-presence-stack pointer-events-none absolute z-30 flex max-h-[calc(100%-1.5rem)] flex-col gap-3", children: [
|
|
33491
33827
|
voice?.panel,
|
|
33492
|
-
/* @__PURE__ */ (0,
|
|
33828
|
+
/* @__PURE__ */ (0, import_jsx_runtime121.jsx)(
|
|
33493
33829
|
Dialog5.Root,
|
|
33494
33830
|
{
|
|
33495
33831
|
open: presence.open,
|
|
33496
33832
|
onOpenChange: presence.onOpenChange,
|
|
33497
33833
|
modal: false,
|
|
33498
|
-
children: /* @__PURE__ */ (0,
|
|
33834
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(import_framer_motion2.AnimatePresence, { initial: false, children: presence.open && /* @__PURE__ */ (0, import_jsx_runtime121.jsxs)(
|
|
33499
33835
|
PresenceDialogSurface,
|
|
33500
33836
|
{
|
|
33501
33837
|
presence,
|
|
@@ -33519,40 +33855,40 @@ function AssistantSummaryDialog({
|
|
|
33519
33855
|
event.preventDefault();
|
|
33520
33856
|
},
|
|
33521
33857
|
children: [
|
|
33522
|
-
/* @__PURE__ */ (0,
|
|
33523
|
-
/* @__PURE__ */ (0,
|
|
33524
|
-
/* @__PURE__ */ (0,
|
|
33525
|
-
/* @__PURE__ */ (0,
|
|
33526
|
-
/* @__PURE__ */ (0,
|
|
33527
|
-
/* @__PURE__ */ (0,
|
|
33528
|
-
presence.onCustomize && /* @__PURE__ */ (0,
|
|
33858
|
+
/* @__PURE__ */ (0, import_jsx_runtime121.jsx)(Dialog5.Title, { className: "sr-only", children: t("assistantPresence.details") }),
|
|
33859
|
+
/* @__PURE__ */ (0, import_jsx_runtime121.jsxs)("div", { className: "chatkit-presence-header flex shrink-0 items-start", children: [
|
|
33860
|
+
/* @__PURE__ */ (0, import_jsx_runtime121.jsx)(PresenceCharacter, { presence, size: "4rem" }),
|
|
33861
|
+
/* @__PURE__ */ (0, import_jsx_runtime121.jsxs)("div", { className: "chatkit-presence-details min-w-0 flex-1", children: [
|
|
33862
|
+
/* @__PURE__ */ (0, import_jsx_runtime121.jsx)("h2", { className: "truncate font-semibold", children: presence.name }),
|
|
33863
|
+
/* @__PURE__ */ (0, import_jsx_runtime121.jsx)(PresenceStatus, { ...presence }),
|
|
33864
|
+
presence.onCustomize && /* @__PURE__ */ (0, import_jsx_runtime121.jsxs)(
|
|
33529
33865
|
"button",
|
|
33530
33866
|
{
|
|
33531
33867
|
type: "button",
|
|
33532
33868
|
className: "chatkit-presence-customize flex items-center text-xs text-muted-foreground hover:text-foreground",
|
|
33533
33869
|
onClick: presence.onCustomize,
|
|
33534
33870
|
children: [
|
|
33535
|
-
/* @__PURE__ */ (0,
|
|
33871
|
+
/* @__PURE__ */ (0, import_jsx_runtime121.jsx)(import_lucide_react75.Pencil, { className: "size-3 shrink-0" }),
|
|
33536
33872
|
t("assistantPresence.customize")
|
|
33537
33873
|
]
|
|
33538
33874
|
}
|
|
33539
33875
|
)
|
|
33540
33876
|
] }),
|
|
33541
|
-
/* @__PURE__ */ (0,
|
|
33877
|
+
/* @__PURE__ */ (0, import_jsx_runtime121.jsx)(
|
|
33542
33878
|
"button",
|
|
33543
33879
|
{
|
|
33544
33880
|
type: "button",
|
|
33545
33881
|
className: "chatkit-presence-close flex shrink-0 items-center justify-center rounded-lg text-muted-foreground hover:bg-muted",
|
|
33546
33882
|
"aria-label": t("assistantPresence.close"),
|
|
33547
33883
|
onClick: () => presence.onOpenChange(false),
|
|
33548
|
-
children: /* @__PURE__ */ (0,
|
|
33884
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(import_lucide_react75.X, { className: "size-[1.125rem]" })
|
|
33549
33885
|
}
|
|
33550
33886
|
)
|
|
33551
33887
|
] }),
|
|
33552
|
-
/* @__PURE__ */ (0,
|
|
33888
|
+
/* @__PURE__ */ (0, import_jsx_runtime121.jsxs)("div", { className: "min-h-0 overflow-auto rounded-b-3xl", children: [
|
|
33553
33889
|
voice?.dial,
|
|
33554
33890
|
computers,
|
|
33555
|
-
/* @__PURE__ */ (0,
|
|
33891
|
+
/* @__PURE__ */ (0, import_jsx_runtime121.jsx)(TaskSummaryContent, { ...summary })
|
|
33556
33892
|
] })
|
|
33557
33893
|
]
|
|
33558
33894
|
},
|
|
@@ -33562,11 +33898,11 @@ function AssistantSummaryDialog({
|
|
|
33562
33898
|
)
|
|
33563
33899
|
] });
|
|
33564
33900
|
}
|
|
33565
|
-
var PresenceDialogSurface =
|
|
33901
|
+
var PresenceDialogSurface = React123.forwardRef(function PresenceDialogSurface2({ presence, children, ...props }, ref) {
|
|
33566
33902
|
const isPresent = (0, import_framer_motion2.useIsPresent)();
|
|
33567
33903
|
const systemReducedMotion = (0, import_framer_motion2.useReducedMotion)();
|
|
33568
33904
|
const still = presence.reducedMotion || systemReducedMotion;
|
|
33569
|
-
return /* @__PURE__ */ (0,
|
|
33905
|
+
return /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(
|
|
33570
33906
|
Dialog5.Content,
|
|
33571
33907
|
{
|
|
33572
33908
|
...props,
|
|
@@ -33574,7 +33910,7 @@ var PresenceDialogSurface = React122.forwardRef(function PresenceDialogSurface2(
|
|
|
33574
33910
|
asChild: true,
|
|
33575
33911
|
ref,
|
|
33576
33912
|
inert: !isPresent || void 0,
|
|
33577
|
-
children: /* @__PURE__ */ (0,
|
|
33913
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(
|
|
33578
33914
|
import_framer_motion2.motion.div,
|
|
33579
33915
|
{
|
|
33580
33916
|
"data-slot": "assistant-summary-dialog",
|
|
@@ -33603,7 +33939,7 @@ var PresenceDialogSurface = React122.forwardRef(function PresenceDialogSurface2(
|
|
|
33603
33939
|
});
|
|
33604
33940
|
|
|
33605
33941
|
// src/components/chat.tsx
|
|
33606
|
-
var
|
|
33942
|
+
var import_jsx_runtime122 = require("react/jsx-runtime");
|
|
33607
33943
|
function Chat({
|
|
33608
33944
|
className,
|
|
33609
33945
|
options,
|
|
@@ -33662,19 +33998,19 @@ function Chat({
|
|
|
33662
33998
|
options
|
|
33663
33999
|
});
|
|
33664
34000
|
const modelState = useChatModelState({ ...session });
|
|
33665
|
-
const [planModeEnabled, setPlanModeEnabled] =
|
|
34001
|
+
const [planModeEnabled, setPlanModeEnabled] = React124.useState(false);
|
|
33666
34002
|
const pet = useChatPetSettings({ options });
|
|
33667
|
-
const headerMoreButtonRef =
|
|
33668
|
-
const restoreHeaderFocus =
|
|
34003
|
+
const headerMoreButtonRef = React124.useRef(null);
|
|
34004
|
+
const restoreHeaderFocus = React124.useCallback((event) => {
|
|
33669
34005
|
if (headerMoreButtonRef.current) {
|
|
33670
34006
|
event.preventDefault();
|
|
33671
34007
|
headerMoreButtonRef.current.focus();
|
|
33672
34008
|
}
|
|
33673
34009
|
}, []);
|
|
33674
|
-
const [hasSelectableProjects, setHasSelectableProjects] =
|
|
34010
|
+
const [hasSelectableProjects, setHasSelectableProjects] = React124.useState(false);
|
|
33675
34011
|
const files = useChatFiles({ ...draft, ...session, referenceRequest });
|
|
33676
|
-
const viewportRef =
|
|
33677
|
-
const messages =
|
|
34012
|
+
const viewportRef = React124.useRef(null);
|
|
34013
|
+
const messages = React124.useMemo(
|
|
33678
34014
|
() => mergeCompletedCalls(
|
|
33679
34015
|
session.stream.messages ?? [],
|
|
33680
34016
|
options?.realtimeVoice?.completed,
|
|
@@ -33702,7 +34038,7 @@ function Chat({
|
|
|
33702
34038
|
messages,
|
|
33703
34039
|
viewportRef
|
|
33704
34040
|
});
|
|
33705
|
-
const chatColumnRef =
|
|
34041
|
+
const chatColumnRef = React124.useRef(null);
|
|
33706
34042
|
const capabilities = useChatCapabilities({
|
|
33707
34043
|
...runtime,
|
|
33708
34044
|
...draft,
|
|
@@ -33764,7 +34100,7 @@ function Chat({
|
|
|
33764
34100
|
options,
|
|
33765
34101
|
messages
|
|
33766
34102
|
});
|
|
33767
|
-
const pendingFollowUps =
|
|
34103
|
+
const pendingFollowUps = React124.useMemo(
|
|
33768
34104
|
() => sortVisiblePendingFollowUps(session.stream.pendingFollowUps ?? []),
|
|
33769
34105
|
[session.stream.pendingFollowUps]
|
|
33770
34106
|
);
|
|
@@ -33784,7 +34120,10 @@ function Chat({
|
|
|
33784
34120
|
const inputPlaceholder = draft.selectedTool?.placeholderOverride ?? session.composer?.placeholder ?? assistant.resolvedPlaceholder;
|
|
33785
34121
|
const isInitialComposer = !session.stream.threadId && messages.length === 0 && !viewport.canLoadMoreMessages && !session.stream.isLoading;
|
|
33786
34122
|
const hasPendingFollowUps = pendingFollowUps.length > 0;
|
|
33787
|
-
const
|
|
34123
|
+
const hasConversationId = Boolean(
|
|
34124
|
+
session.stream.threadId || session.stream.conversationId
|
|
34125
|
+
);
|
|
34126
|
+
const isProjectSelectionLocked = hasConversationId ? !onProjectChange : messages.length > 0 || viewport.canLoadMoreMessages;
|
|
33788
34127
|
const isProjectScopeLocked = Boolean(session.activeProjectId) && (isProjectSelectionLocked || options?.composer?.projects?.locked === true);
|
|
33789
34128
|
const isFileSelectorVisible = Boolean(
|
|
33790
34129
|
session.xpertPlatformClient && (session.activeProjectId || session.stream.assistantId)
|
|
@@ -33827,7 +34166,7 @@ function Chat({
|
|
|
33827
34166
|
canUploadAttachments
|
|
33828
34167
|
});
|
|
33829
34168
|
const streamErrorMessage = session.stream.error instanceof Error ? session.stream.error.message : void 0;
|
|
33830
|
-
const threadErrorMessage =
|
|
34169
|
+
const threadErrorMessage = React124.useMemo(() => {
|
|
33831
34170
|
if (streamErrorMessage?.trim()) return streamErrorMessage.trim();
|
|
33832
34171
|
if (historyState.currentThread?.status !== "error") return void 0;
|
|
33833
34172
|
const message = historyState.currentThread.error?.trim();
|
|
@@ -33857,14 +34196,14 @@ function Chat({
|
|
|
33857
34196
|
historyMessageLoadVersion: session.stream.historyMessageLoadVersion ?? 0,
|
|
33858
34197
|
fallbackTitle: session.t("history.threadFallback")
|
|
33859
34198
|
});
|
|
33860
|
-
const chatColumnStyle =
|
|
34199
|
+
const chatColumnStyle = React124.useMemo(() => {
|
|
33861
34200
|
if (layoutMaxWidth === void 0 || layoutMaxWidth === null || layoutMaxWidth === "") {
|
|
33862
34201
|
return void 0;
|
|
33863
34202
|
}
|
|
33864
34203
|
return { maxWidth: layoutMaxWidth };
|
|
33865
34204
|
}, [layoutMaxWidth]);
|
|
33866
34205
|
const waitingForInput = !!(session.stream.pendingHITLRequest || session.stream.pendingRequestUserInput);
|
|
33867
|
-
const presenceMotionId =
|
|
34206
|
+
const presenceMotionId = React124.useId();
|
|
33868
34207
|
const presence = {
|
|
33869
34208
|
motionId: presenceMotionId,
|
|
33870
34209
|
avatar: assistant.assistantAvatar,
|
|
@@ -33879,19 +34218,19 @@ function Chat({
|
|
|
33879
34218
|
host.parentMessenger.sendEvent("public_event", [
|
|
33880
34219
|
"effect",
|
|
33881
34220
|
{
|
|
33882
|
-
name:
|
|
34221
|
+
name: import_chatkit_types32.CHATKIT_ASSISTANT_CUSTOMIZE_EFFECT,
|
|
33883
34222
|
data: { assistantId: session.stream.assistantId }
|
|
33884
34223
|
}
|
|
33885
34224
|
]);
|
|
33886
34225
|
} : void 0
|
|
33887
34226
|
};
|
|
33888
|
-
return /* @__PURE__ */ (0,
|
|
34227
|
+
return /* @__PURE__ */ (0, import_jsx_runtime122.jsxs)(
|
|
33889
34228
|
"div",
|
|
33890
34229
|
{
|
|
33891
34230
|
className: "relative flex h-full w-full min-w-0 bg-background",
|
|
33892
34231
|
"data-task-summary-layout": summary.taskSummaryDocked ? "docked" : "popover",
|
|
33893
34232
|
children: [
|
|
33894
|
-
/* @__PURE__ */ (0,
|
|
34233
|
+
/* @__PURE__ */ (0, import_jsx_runtime122.jsxs)(
|
|
33895
34234
|
UploadDroppedFiles,
|
|
33896
34235
|
{
|
|
33897
34236
|
ref: viewportRef,
|
|
@@ -33906,13 +34245,13 @@ function Chat({
|
|
|
33906
34245
|
className
|
|
33907
34246
|
),
|
|
33908
34247
|
children: [
|
|
33909
|
-
/* @__PURE__ */ (0,
|
|
34248
|
+
/* @__PURE__ */ (0, import_jsx_runtime122.jsxs)(
|
|
33910
34249
|
"div",
|
|
33911
34250
|
{
|
|
33912
34251
|
"data-window-drag-scope": "",
|
|
33913
34252
|
className: characterPresentation ? "pointer-events-none sticky top-0 z-10 grid w-full shrink-0" : "contents",
|
|
33914
34253
|
children: [
|
|
33915
|
-
/* @__PURE__ */ (0,
|
|
34254
|
+
/* @__PURE__ */ (0, import_jsx_runtime122.jsx)(
|
|
33916
34255
|
ChatHeader,
|
|
33917
34256
|
{
|
|
33918
34257
|
characterPresentation,
|
|
@@ -33932,11 +34271,11 @@ function Chat({
|
|
|
33932
34271
|
restoreHeaderFocus
|
|
33933
34272
|
}
|
|
33934
34273
|
),
|
|
33935
|
-
characterPresentation && /* @__PURE__ */ (0,
|
|
34274
|
+
characterPresentation && /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(AssistantPresence, { ...presence })
|
|
33936
34275
|
]
|
|
33937
34276
|
}
|
|
33938
34277
|
),
|
|
33939
|
-
viewport.showMessageNavigation && /* @__PURE__ */ (0,
|
|
34278
|
+
viewport.showMessageNavigation && /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(
|
|
33940
34279
|
MessageNavigator,
|
|
33941
34280
|
{
|
|
33942
34281
|
items: viewport.messageNavigationItems,
|
|
@@ -33947,7 +34286,7 @@ function Chat({
|
|
|
33947
34286
|
tagsOverflowLabel: (count) => session.t("message.navigation.moreTags", { count })
|
|
33948
34287
|
}
|
|
33949
34288
|
),
|
|
33950
|
-
/* @__PURE__ */ (0,
|
|
34289
|
+
/* @__PURE__ */ (0, import_jsx_runtime122.jsx)(
|
|
33951
34290
|
ChatTranscript,
|
|
33952
34291
|
{
|
|
33953
34292
|
...session,
|
|
@@ -33973,8 +34312,8 @@ function Chat({
|
|
|
33973
34312
|
messagePresentation
|
|
33974
34313
|
}
|
|
33975
34314
|
),
|
|
33976
|
-
/* @__PURE__ */ (0,
|
|
33977
|
-
/* @__PURE__ */ (0,
|
|
34315
|
+
/* @__PURE__ */ (0, import_jsx_runtime122.jsx)(ChatQuoteActions, { ...quotes, ...session }),
|
|
34316
|
+
/* @__PURE__ */ (0, import_jsx_runtime122.jsxs)(
|
|
33978
34317
|
"div",
|
|
33979
34318
|
{
|
|
33980
34319
|
"data-slot": "chatkit-chat-composer",
|
|
@@ -33985,13 +34324,13 @@ function Chat({
|
|
|
33985
34324
|
),
|
|
33986
34325
|
style: chatColumnStyle,
|
|
33987
34326
|
children: [
|
|
33988
|
-
runControl.runControlError?.threadId === session.stream.threadId && /* @__PURE__ */ (0,
|
|
33989
|
-
!viewport.isAtBottom && messages.length > 0 && /* @__PURE__ */ (0,
|
|
34327
|
+
runControl.runControlError?.threadId === session.stream.threadId && /* @__PURE__ */ (0, import_jsx_runtime122.jsx)("p", { role: "alert", className: "text-xs text-destructive", children: runControl.runControlError.message }),
|
|
34328
|
+
!viewport.isAtBottom && messages.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(
|
|
33990
34329
|
"div",
|
|
33991
34330
|
{
|
|
33992
34331
|
"data-slot": "scroll-to-bottom",
|
|
33993
34332
|
className: "pointer-events-none absolute left-1/2 top-0 z-20 flex -translate-x-1/2 -translate-y-full justify-center",
|
|
33994
|
-
children: /* @__PURE__ */ (0,
|
|
34333
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(
|
|
33995
34334
|
Button,
|
|
33996
34335
|
{
|
|
33997
34336
|
type: "button",
|
|
@@ -34004,14 +34343,14 @@ function Chat({
|
|
|
34004
34343
|
onClick: () => viewport.scrollToBottom(true, true),
|
|
34005
34344
|
"aria-label": session.t("chat.scrollToBottom"),
|
|
34006
34345
|
title: session.t("chat.scrollToBottom"),
|
|
34007
|
-
children: /* @__PURE__ */ (0,
|
|
34346
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(import_lucide_react76.ArrowDown, { size: 16 })
|
|
34008
34347
|
}
|
|
34009
34348
|
)
|
|
34010
34349
|
}
|
|
34011
34350
|
),
|
|
34012
|
-
threadErrorMessage && /* @__PURE__ */ (0,
|
|
34013
|
-
/* @__PURE__ */ (0,
|
|
34014
|
-
/* @__PURE__ */ (0,
|
|
34351
|
+
threadErrorMessage && /* @__PURE__ */ (0, import_jsx_runtime122.jsx)("div", { className: "mb-3 rounded-lg border border-destructive/30 bg-destructive/10 px-3 py-2 text-sm text-destructive overflow-auto", children: threadErrorMessage }),
|
|
34352
|
+
/* @__PURE__ */ (0, import_jsx_runtime122.jsx)(ChatGoalStatus, { ...goal, ...session, ...draft }),
|
|
34353
|
+
/* @__PURE__ */ (0, import_jsx_runtime122.jsx)(
|
|
34015
34354
|
ChatPendingActions,
|
|
34016
34355
|
{
|
|
34017
34356
|
...session,
|
|
@@ -34022,7 +34361,7 @@ function Chat({
|
|
|
34022
34361
|
pendingFollowUps
|
|
34023
34362
|
}
|
|
34024
34363
|
),
|
|
34025
|
-
isInitialComposer && /* @__PURE__ */ (0,
|
|
34364
|
+
isInitialComposer && /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(
|
|
34026
34365
|
PromptWorkflowShortcuts,
|
|
34027
34366
|
{
|
|
34028
34367
|
commands: capabilities.promptWorkflow.commands,
|
|
@@ -34036,8 +34375,8 @@ function Chat({
|
|
|
34036
34375
|
onBack: capabilities.promptWorkflow.showPrompts
|
|
34037
34376
|
}
|
|
34038
34377
|
),
|
|
34039
|
-
/* @__PURE__ */ (0,
|
|
34040
|
-
draft.threadMention && /* @__PURE__ */ (0,
|
|
34378
|
+
/* @__PURE__ */ (0, import_jsx_runtime122.jsx)(ChatComposerAttachments, { ...files, ...session }),
|
|
34379
|
+
draft.threadMention && /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(
|
|
34041
34380
|
ThreadMentionPalette,
|
|
34042
34381
|
{
|
|
34043
34382
|
ref: draft.threadMentionPaletteRef,
|
|
@@ -34057,7 +34396,7 @@ function Chat({
|
|
|
34057
34396
|
onSelect: draft.selectThreadMention
|
|
34058
34397
|
}
|
|
34059
34398
|
),
|
|
34060
|
-
runtime.runtimeCapabilityPalette && !draft.threadMention && /* @__PURE__ */ (0,
|
|
34399
|
+
runtime.runtimeCapabilityPalette && !draft.threadMention && /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(
|
|
34061
34400
|
SlashPalette,
|
|
34062
34401
|
{
|
|
34063
34402
|
palette: runtime.runtimeCapabilityPalette,
|
|
@@ -34071,7 +34410,7 @@ function Chat({
|
|
|
34071
34410
|
onSelect: commands.selectSlashPaletteOption
|
|
34072
34411
|
}
|
|
34073
34412
|
),
|
|
34074
|
-
/* @__PURE__ */ (0,
|
|
34413
|
+
/* @__PURE__ */ (0, import_jsx_runtime122.jsx)(
|
|
34075
34414
|
ChatComposerForm,
|
|
34076
34415
|
{
|
|
34077
34416
|
...commands,
|
|
@@ -34110,7 +34449,7 @@ function Chat({
|
|
|
34110
34449
|
runtimeResources
|
|
34111
34450
|
}
|
|
34112
34451
|
),
|
|
34113
|
-
isInitialComposer && session.startScreen?.promptsLayout === "list" && /* @__PURE__ */ (0,
|
|
34452
|
+
isInitialComposer && session.startScreen?.promptsLayout === "list" && /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(
|
|
34114
34453
|
StarterPromptSuggestions,
|
|
34115
34454
|
{
|
|
34116
34455
|
prompts: session.startScreen.prompts ?? [],
|
|
@@ -34120,7 +34459,7 @@ function Chat({
|
|
|
34120
34459
|
promptEditDisabled: isPromptEditDisabled
|
|
34121
34460
|
}
|
|
34122
34461
|
),
|
|
34123
|
-
session.disclaimer?.text && /* @__PURE__ */ (0,
|
|
34462
|
+
session.disclaimer?.text && /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(
|
|
34124
34463
|
"p",
|
|
34125
34464
|
{
|
|
34126
34465
|
className: cn(
|
|
@@ -34133,7 +34472,7 @@ function Chat({
|
|
|
34133
34472
|
]
|
|
34134
34473
|
}
|
|
34135
34474
|
),
|
|
34136
|
-
/* @__PURE__ */ (0,
|
|
34475
|
+
/* @__PURE__ */ (0, import_jsx_runtime122.jsx)(
|
|
34137
34476
|
SettingsSheet,
|
|
34138
34477
|
{
|
|
34139
34478
|
open: !pet.petDisabled && pet.petSettingsOpen,
|
|
@@ -34144,17 +34483,17 @@ function Chat({
|
|
|
34144
34483
|
onSave: pet.savePetLocalSettings
|
|
34145
34484
|
}
|
|
34146
34485
|
),
|
|
34147
|
-
/* @__PURE__ */ (0,
|
|
34486
|
+
/* @__PURE__ */ (0, import_jsx_runtime122.jsx)(PetBridge, { pet: pet.effectivePet, state: petAutoState })
|
|
34148
34487
|
]
|
|
34149
34488
|
}
|
|
34150
34489
|
),
|
|
34151
|
-
characterPresentation && /* @__PURE__ */ (0,
|
|
34490
|
+
characterPresentation && /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(
|
|
34152
34491
|
AssistantSummaryDialog,
|
|
34153
34492
|
{
|
|
34154
34493
|
presence,
|
|
34155
34494
|
voice,
|
|
34156
34495
|
summary: summary.taskSummaryProps,
|
|
34157
|
-
computers: /* @__PURE__ */ (0,
|
|
34496
|
+
computers: /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(
|
|
34158
34497
|
AssistantComputers,
|
|
34159
34498
|
{
|
|
34160
34499
|
computers: options?.header?.character?.computers,
|
|
@@ -34173,7 +34512,7 @@ function Chat({
|
|
|
34173
34512
|
)
|
|
34174
34513
|
}
|
|
34175
34514
|
),
|
|
34176
|
-
!characterPresentation && summary.taskSummaryAvailable && summary.taskSummaryDocked && summary.taskSummaryOpen && /* @__PURE__ */ (0,
|
|
34515
|
+
!characterPresentation && summary.taskSummaryAvailable && summary.taskSummaryDocked && summary.taskSummaryOpen && /* @__PURE__ */ (0, import_jsx_runtime122.jsx)("div", { className: "pointer-events-none absolute right-5 top-3 z-20 max-h-[calc(100%-1.5rem)] w-80", children: /* @__PURE__ */ (0, import_jsx_runtime122.jsx)(
|
|
34177
34516
|
TaskSummaryPanel,
|
|
34178
34517
|
{
|
|
34179
34518
|
...summary.taskSummaryProps,
|