@xpert-ai/chatkit-ui 0.4.10 → 0.4.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/app/assets/{_baseUniq-L_C0UtBf.js → _baseUniq-D3JA5kg6.js} +1 -1
- package/dist/app/assets/{abap-BpnyPh6e.js → abap-U3trMbvh.js} +1 -1
- package/dist/app/assets/{abnf-CePQrE9v.js → abnf-Bl4asd8k.js} +1 -1
- package/dist/app/assets/{actionscript-CEbXXYWC.js → actionscript-D8gfKfJD.js} +1 -1
- package/dist/app/assets/{ada-6ojm7R_Z.js → ada-DdH41xZz.js} +1 -1
- package/dist/app/assets/{agda-BJJMgT72.js → agda-CRS5ewL6.js} +1 -1
- package/dist/app/assets/{al-CjM03tR4.js → al-6ay2Ap_a.js} +1 -1
- package/dist/app/assets/{antlr4-CN9DxFQq.js → antlr4-1_hBGW-a.js} +1 -1
- package/dist/app/assets/{apacheconf-DIP0dEtR.js → apacheconf-CZxoTH8B.js} +1 -1
- package/dist/app/assets/{apex-Dk0IZjGB.js → apex-CrTOQiOq.js} +1 -1
- package/dist/app/assets/{apl-Bzb4FgpE.js → apl-W2lGuttD.js} +1 -1
- package/dist/app/assets/{applescript-B0UaluN5.js → applescript-b_jfORvY.js} +1 -1
- package/dist/app/assets/{aql-CUf7Ed1z.js → aql-DcttT6A-.js} +1 -1
- package/dist/app/assets/{arc-CAj2CWKM.js → arc-CcWnzmyO.js} +1 -1
- package/dist/app/assets/{architectureDiagram-Q4EWVU46-BOSyiusQ.js → architectureDiagram-Q4EWVU46-BzsxtvCr.js} +1 -1
- package/dist/app/assets/{arduino-B1HB_jXM.js → arduino-DcmjPx9R.js} +1 -1
- package/dist/app/assets/{arff-CPQ25yN1.js → arff-DdTCsnLN.js} +1 -1
- package/dist/app/assets/{asciidoc-DV5p79UO.js → asciidoc-C3Zw8KHv.js} +1 -1
- package/dist/app/assets/{asm6502-CpY5r4lk.js → asm6502-Cl6X60ew.js} +1 -1
- package/dist/app/assets/{asmatmel-CxbyxEbb.js → asmatmel-4TiHBMZ0.js} +1 -1
- package/dist/app/assets/{aspnet-CJaAnWH-.js → aspnet-BAcaJr0W.js} +1 -1
- package/dist/app/assets/{autohotkey-C582BAaU.js → autohotkey-DU4MbEO6.js} +1 -1
- package/dist/app/assets/{autoit-Ct1i1FKr.js → autoit-DNUFW1WT.js} +1 -1
- package/dist/app/assets/{avisynth-DtDpdH0z.js → avisynth-Dj1xCW-P.js} +1 -1
- package/dist/app/assets/{avro-idl-B_TsIBE2.js → avro-idl-BUuuPK0F.js} +1 -1
- package/dist/app/assets/{bash-DwYhdU-w.js → bash-Car3l6Qf.js} +1 -1
- package/dist/app/assets/{basic-C07QA6Vo.js → basic-Dz2vmq9w.js} +1 -1
- package/dist/app/assets/{batch-DjR7VTRm.js → batch-DYOkuO24.js} +1 -1
- package/dist/app/assets/{bbcode-CwHqfRZe.js → bbcode-BTogT5Ke.js} +1 -1
- package/dist/app/assets/{bicep-C1vVTkRE.js → bicep-gKyzTSH1.js} +1 -1
- package/dist/app/assets/{birb-CBTuHWN7.js → birb-D1xh9nGK.js} +1 -1
- package/dist/app/assets/{bison-C08f83AH.js → bison-y3F6JBTg.js} +1 -1
- package/dist/app/assets/{blockDiagram-DXYQGD6D-BwfXbVr_.js → blockDiagram-DXYQGD6D-wp5YgjZR.js} +1 -1
- package/dist/app/assets/{bnf-eixMjfhu.js → bnf-CvdKGJcO.js} +1 -1
- package/dist/app/assets/{brainfuck-OXBW4BZH.js → brainfuck-zxUjJDmK.js} +1 -1
- package/dist/app/assets/{brightscript-BSDqAE-U.js → brightscript-E2VTIZaD.js} +1 -1
- package/dist/app/assets/{bro-Bi8eHVX-.js → bro-Bf9FPsHP.js} +1 -1
- package/dist/app/assets/{bsl-CEhRIRY7.js → bsl-BTf78jgi.js} +1 -1
- package/dist/app/assets/{c-Czzvuksm.js → c-E6pl-2PD.js} +1 -1
- package/dist/app/assets/{c4Diagram-AHTNJAMY-BGp37t4h.js → c4Diagram-AHTNJAMY-BFh75I1O.js} +1 -1
- package/dist/app/assets/{cfscript-BDye0SUz.js → cfscript-BU29FYfv.js} +1 -1
- package/dist/app/assets/{chaiscript-DapUhojE.js → chaiscript-D2Mla472.js} +1 -1
- package/dist/app/assets/channel-Dza7FWEy.js +1 -0
- package/dist/app/assets/{chunk-4BX2VUAB-xQQ1b4Co.js → chunk-4BX2VUAB-D-Payniv.js} +1 -1
- package/dist/app/assets/{chunk-4TB4RGXK-ChvEc_zS.js → chunk-4TB4RGXK-Bsata7j8.js} +1 -1
- package/dist/app/assets/{chunk-55IACEB6-CSgtZuqU.js → chunk-55IACEB6-DURW_8ZU.js} +1 -1
- package/dist/app/assets/{chunk-EDXVE4YY-D6bAHfe-.js → chunk-EDXVE4YY-DUechSa6.js} +1 -1
- package/dist/app/assets/{chunk-FMBD7UC4-CfqAGzwt.js → chunk-FMBD7UC4-CKF0xhys.js} +1 -1
- package/dist/app/assets/{chunk-OYMX7WX6-DppYEx9e.js → chunk-OYMX7WX6-ddmRWT15.js} +1 -1
- package/dist/app/assets/{chunk-QZHKN3VN-OcXmUBXK.js → chunk-QZHKN3VN-DDobBULn.js} +1 -1
- package/dist/app/assets/{chunk-YZCP3GAM-DEM4F_gM.js → chunk-YZCP3GAM-ll1E1L_E.js} +1 -1
- package/dist/app/assets/{cil-CkS5pr8z.js → cil-DOsNtjkv.js} +1 -1
- package/dist/app/assets/classDiagram-6PBFFD2Q-hqaQDDNp.js +1 -0
- package/dist/app/assets/classDiagram-v2-HSJHXN6E-hqaQDDNp.js +1 -0
- package/dist/app/assets/{clike-BnesBfd1.js → clike-dVQK0iCE.js} +1 -1
- package/dist/app/assets/{clojure-CMTJuYgr.js → clojure-_I7oUYLh.js} +1 -1
- package/dist/app/assets/clone-QKEFKOuT.js +1 -0
- package/dist/app/assets/{cmake-Bad4-rPE.js → cmake-VLeg6CIA.js} +1 -1
- package/dist/app/assets/{cobol-BVGOaTIA.js → cobol-CXrTAELN.js} +1 -1
- package/dist/app/assets/{coffeescript-BfGXelSK.js → coffeescript-D3PuU-yU.js} +1 -1
- package/dist/app/assets/{concurnas-CIwpz7d6.js → concurnas-Bq5Sn-8p.js} +1 -1
- package/dist/app/assets/{coq-DSIeTmBw.js → coq-DRNw2I4c.js} +1 -1
- package/dist/app/assets/{core-aBCdKGFg.js → core-sRD64d7H.js} +1 -1
- package/dist/app/assets/{cose-bilkent-S5V4N54A-BsOe3ZRA.js → cose-bilkent-S5V4N54A-uleqFww7.js} +1 -1
- package/dist/app/assets/{cpp-6tyvrJuf.js → cpp-BDi4JlwY.js} +1 -1
- package/dist/app/assets/{crystal-CiyZx3nA.js → crystal-BhcbrMpD.js} +1 -1
- package/dist/app/assets/{csharp-aV-8z_7S.js → csharp-Cw8JnLSL.js} +1 -1
- package/dist/app/assets/{cshtml-DXQwMOL2.js → cshtml-DXOu3MO1.js} +1 -1
- package/dist/app/assets/{csp-QFnPub4X.js → csp-hJziNvFM.js} +1 -1
- package/dist/app/assets/{css-NG8SQHFd.js → css-DTw2TWVx.js} +1 -1
- package/dist/app/assets/{css-extras-BYOlAC_J.js → css-extras-PKQV57Zr.js} +1 -1
- package/dist/app/assets/{csv-CRVKaEXK.js → csv-DxeK1pCZ.js} +1 -1
- package/dist/app/assets/{cypher-N4lavBWi.js → cypher-B7sxi8sn.js} +1 -1
- package/dist/app/assets/{d-CXsOP2vo.js → d-VOENt14s.js} +1 -1
- package/dist/app/assets/{dagre-KV5264BT-DeGuPXts.js → dagre-KV5264BT-F8PHo6-o.js} +1 -1
- package/dist/app/assets/{dart-QuR1URa-.js → dart-C6P3kCs3.js} +1 -1
- package/dist/app/assets/{dataweave-DSZsHkWW.js → dataweave-zcqXRaeA.js} +1 -1
- package/dist/app/assets/{dax-316zZNcC.js → dax-C5_rBzHq.js} +1 -1
- package/dist/app/assets/{dhall-RmKM9GKI.js → dhall-Bx3A89qP.js} +1 -1
- package/dist/app/assets/{diagram-5BDNPKRD-rnVFbmh_.js → diagram-5BDNPKRD-BJ6gx1Gb.js} +1 -1
- package/dist/app/assets/{diagram-G4DWMVQ6-C_06tcEj.js → diagram-G4DWMVQ6-4TsobmGQ.js} +1 -1
- package/dist/app/assets/{diagram-MMDJMWI5-CU4PzLKC.js → diagram-MMDJMWI5-C15cfaVx.js} +1 -1
- package/dist/app/assets/{diagram-TYMM5635-B6DWOJFf.js → diagram-TYMM5635-C4QWM_wV.js} +1 -1
- package/dist/app/assets/{diff-D1VyyUNE.js → diff-DIp53C-C.js} +1 -1
- package/dist/app/assets/{django-1g5s3FD9.js → django-C8OufmY4.js} +1 -1
- package/dist/app/assets/{dns-zone-file-DPyAfyNh.js → dns-zone-file-BynM2b-W.js} +1 -1
- package/dist/app/assets/{docker-B6Ppya8s.js → docker-CHYID_Vv.js} +1 -1
- package/dist/app/assets/{dot-qEA9Iscp.js → dot-CxRj9_e0.js} +1 -1
- package/dist/app/assets/{ebnf-Dq27JvcF.js → ebnf-DX9131Gx.js} +1 -1
- package/dist/app/assets/{editorconfig-DTKOOxka.js → editorconfig-D4jacbLb.js} +1 -1
- package/dist/app/assets/{eiffel-M573bWnZ.js → eiffel-ChlDTIQd.js} +1 -1
- package/dist/app/assets/{ejs-5_NMM1D1.js → ejs-DMwwVwMt.js} +1 -1
- package/dist/app/assets/{elixir-Czvfyjv_.js → elixir-BQqiT3Sk.js} +1 -1
- package/dist/app/assets/{elm-B8ew8DwL.js → elm-pfx4TW8i.js} +1 -1
- package/dist/app/assets/{erDiagram-SMLLAGMA-CLBUx2BT.js → erDiagram-SMLLAGMA-BkNAnp-O.js} +1 -1
- package/dist/app/assets/{erb-B6kN8bOV.js → erb-6Zc-tMAk.js} +1 -1
- package/dist/app/assets/{erlang-DB9zwFPB.js → erlang-NGXc_i-u.js} +1 -1
- package/dist/app/assets/{etlua-BO-uDffT.js → etlua-eDkjyVnU.js} +1 -1
- package/dist/app/assets/{excel-formula-DggXv9UI.js → excel-formula-7XJSUddh.js} +1 -1
- package/dist/app/assets/{factor-DyMYAmFt.js → factor-BDm_BSrr.js} +1 -1
- package/dist/app/assets/{false-D6qsKvn8.js → false-CmPeUbjY.js} +1 -1
- package/dist/app/assets/{firestore-security-rules-CmxC6hqr.js → firestore-security-rules-DHkZlm67.js} +1 -1
- package/dist/app/assets/{flow-CuYyVwSm.js → flow-C-a8u5C0.js} +1 -1
- package/dist/app/assets/{flowDiagram-DWJPFMVM-BXqpXcQj.js → flowDiagram-DWJPFMVM-Dos2R6DF.js} +1 -1
- package/dist/app/assets/{fortran-B9VZ0rBH.js → fortran-DgmvqnEK.js} +1 -1
- package/dist/app/assets/{fsharp-GO7xyDtk.js → fsharp-TKADo8lI.js} +1 -1
- package/dist/app/assets/{ftl-miAH75V3.js → ftl-BmLn54KU.js} +1 -1
- package/dist/app/assets/{ganttDiagram-T4ZO3ILL-Dwt1tgUY.js → ganttDiagram-T4ZO3ILL-DaVRJ0Uz.js} +1 -1
- package/dist/app/assets/{gap-CId1dUrj.js → gap-Bjsk63TZ.js} +1 -1
- package/dist/app/assets/{gcode-C59Bc_Q_.js → gcode-1WjVfVzX.js} +1 -1
- package/dist/app/assets/{gdscript-fCaxiH5y.js → gdscript-DciRg-5W.js} +1 -1
- package/dist/app/assets/{gedcom-Fz0PyMGL.js → gedcom-DFjhwBQZ.js} +1 -1
- package/dist/app/assets/{gherkin-DpCy-yO5.js → gherkin-CO-3f6VP.js} +1 -1
- package/dist/app/assets/{git-CDabPQd8.js → git-JidzCe0C.js} +1 -1
- package/dist/app/assets/{gitGraphDiagram-UUTBAWPF-DKdTEA1Q.js → gitGraphDiagram-UUTBAWPF-BDm3Pi5R.js} +1 -1
- package/dist/app/assets/{glsl-CAuBdubM.js → glsl-DDTjG0bk.js} +1 -1
- package/dist/app/assets/{gml-B1-KFSC-.js → gml-k6Q_j5IU.js} +1 -1
- package/dist/app/assets/{gn-z9JlBynS.js → gn-CJsI82tl.js} +1 -1
- package/dist/app/assets/{go-Bh8RVnCA.js → go-C-knydKg.js} +1 -1
- package/dist/app/assets/{go-module-BxEHBAUj.js → go-module-CfZylmWG.js} +1 -1
- package/dist/app/assets/{graph-C5VCXRja.js → graph-CX9fPkqi.js} +1 -1
- package/dist/app/assets/{graphql-UVwaZqUP.js → graphql-DNzt2Vv1.js} +1 -1
- package/dist/app/assets/{groovy-Bm3Dr_U_.js → groovy-BtP_mAne.js} +1 -1
- package/dist/app/assets/{haml-BQkZhweN.js → haml-CexsUymU.js} +1 -1
- package/dist/app/assets/{handlebars-UliZj7od.js → handlebars-Co1eX_hJ.js} +1 -1
- package/dist/app/assets/{haskell-EGerwJvN.js → haskell-PQ0sv3zH.js} +1 -1
- package/dist/app/assets/{haxe-f4j0SE6I.js → haxe-CUwllgrP.js} +1 -1
- package/dist/app/assets/{hcl-CuuY0fvP.js → hcl-Mhayh0kN.js} +1 -1
- package/dist/app/assets/{hlsl-C4nrcroF.js → hlsl-CxQjFTxz.js} +1 -1
- package/dist/app/assets/{hoon-YAf2AIOr.js → hoon-DHelY60I.js} +1 -1
- package/dist/app/assets/{hpkp-ClJhCK_W.js → hpkp-CNOmVbEe.js} +1 -1
- package/dist/app/assets/{hsts-CEpwd5fr.js → hsts-J3H51YU7.js} +1 -1
- package/dist/app/assets/{http-BR64Nyk9.js → http-BBPS6mp1.js} +1 -1
- package/dist/app/assets/{ichigojam-DTWmfCcD.js → ichigojam-WoI4Sjvh.js} +1 -1
- package/dist/app/assets/{icon-D0qxhzhu.js → icon-Cxqt5frF.js} +1 -1
- package/dist/app/assets/{icu-message-format-Cr2MhD47.js → icu-message-format-CbNr2X1z.js} +1 -1
- package/dist/app/assets/{idris-D6urX37y.js → idris-B_uYD37d.js} +1 -1
- package/dist/app/assets/{iecst-D9PNLpyA.js → iecst-DBH5ZBla.js} +1 -1
- package/dist/app/assets/{ignore-hxaHGT6e.js → ignore-e11AExB3.js} +1 -1
- package/dist/app/assets/index-Bz1k_vD4.js +762 -0
- package/dist/app/assets/index-CtioO_Xd.css +1 -0
- package/dist/app/assets/{infoDiagram-42DDH7IO-CCZ9EqBH.js → infoDiagram-42DDH7IO-C6vGng8S.js} +1 -1
- package/dist/app/assets/{inform7-DGwJlX9w.js → inform7-BuBdwiiY.js} +1 -1
- package/dist/app/assets/{ini-HbQ_pZ9w.js → ini-CZG2vXy_.js} +1 -1
- package/dist/app/assets/{io-Dhyv4fqE.js → io-CTkwXIPH.js} +1 -1
- package/dist/app/assets/{ishikawaDiagram-UXIWVN3A-CnOAK-IZ.js → ishikawaDiagram-UXIWVN3A-B1in37bc.js} +1 -1
- package/dist/app/assets/{j-DAcUG2zB.js → j-DuEjM6Bj.js} +1 -1
- package/dist/app/assets/{java-CdeMY3IG.js → java-BlZmoU8I.js} +1 -1
- package/dist/app/assets/{javadoc-BeQ0Pg6D.js → javadoc-C2k6A4-n.js} +1 -1
- package/dist/app/assets/{javadoclike-DPYVfShk.js → javadoclike-kK2hIzbB.js} +1 -1
- package/dist/app/assets/{javascript-BGlZ4jdn.js → javascript-BoS5KR_7.js} +1 -1
- package/dist/app/assets/{javastacktrace-Jex9eXtr.js → javastacktrace-LrtuAnj1.js} +1 -1
- package/dist/app/assets/{jexl-BFt920Jf.js → jexl-BLuWwkDx.js} +1 -1
- package/dist/app/assets/{jolie-YCJV5cqd.js → jolie-CwQmCAzP.js} +1 -1
- package/dist/app/assets/{journeyDiagram-VCZTEJTY-C5RrtwyC.js → journeyDiagram-VCZTEJTY-BaS3mXyF.js} +1 -1
- package/dist/app/assets/{jq-BlHh9d3G.js → jq-BEXhHNOY.js} +1 -1
- package/dist/app/assets/{js-extras-DqpdICye.js → js-extras-Ct8_w3lG.js} +1 -1
- package/dist/app/assets/{js-templates-CvnMgk4Z.js → js-templates-BkILqbLu.js} +1 -1
- package/dist/app/assets/{jsdoc-D4a3LTWc.js → jsdoc-CoMibHem.js} +1 -1
- package/dist/app/assets/{json-Deb7FFLA.js → json-CY_RB4MI.js} +1 -1
- package/dist/app/assets/{json5-BJMK5K1n.js → json5-Dj8cRnNr.js} +1 -1
- package/dist/app/assets/{jsonp-C04DhIsm.js → jsonp-P7RxrUXF.js} +1 -1
- package/dist/app/assets/{jsstacktrace-dnLb08RQ.js → jsstacktrace-BNUg_CVa.js} +1 -1
- package/dist/app/assets/{jsx-qoVtXIf0.js → jsx-CEVEgFxG.js} +1 -1
- package/dist/app/assets/{julia-Din5szlb.js → julia-DfDHC1h7.js} +1 -1
- package/dist/app/assets/{kanban-definition-6JOO6SKY-CbNOvC3e.js → kanban-definition-6JOO6SKY-CD7tPba2.js} +1 -1
- package/dist/app/assets/{keepalived-B4pmJFAA.js → keepalived-oFPT0tbW.js} +1 -1
- package/dist/app/assets/{keyman-GZkMiOR4.js → keyman-C57wO1cD.js} +1 -1
- package/dist/app/assets/{kotlin-BaVFlKSj.js → kotlin-ZOXm9fam.js} +1 -1
- package/dist/app/assets/{kumir-BYgnVncN.js → kumir-Bnsvckx9.js} +1 -1
- package/dist/app/assets/{kusto-iC0N6VZB.js → kusto-jXKPAUmp.js} +1 -1
- package/dist/app/assets/{latex-DJsq4A7S.js → latex-CMqvt8Q2.js} +1 -1
- package/dist/app/assets/{latte-4-D5JQy6.js → latte-BZeQRR6X.js} +1 -1
- package/dist/app/assets/{layout-woS_Ptld.js → layout-D1Cr86UF.js} +1 -1
- package/dist/app/assets/{less-BEGF0T8s.js → less-DzlT6rR0.js} +1 -1
- package/dist/app/assets/{lilypond-DaScaqz9.js → lilypond-Bhy1kxEo.js} +1 -1
- package/dist/app/assets/{linear-BihMu0qn.js → linear-CYv9ZVDs.js} +1 -1
- package/dist/app/assets/{liquid-D0JwjezM.js → liquid-a0kLlmeN.js} +1 -1
- package/dist/app/assets/{lisp-Ba08UZ8Y.js → lisp-48BMMQcI.js} +1 -1
- package/dist/app/assets/{livescript-Ba6INIPm.js → livescript-DE5TQT-Y.js} +1 -1
- package/dist/app/assets/{llvm-B0HbpJgY.js → llvm-DYLeeTIC.js} +1 -1
- package/dist/app/assets/{log-CUZTDc-a.js → log-BN0LG1yL.js} +1 -1
- package/dist/app/assets/{lolcode-D40bzDOF.js → lolcode-CYCvRp7b.js} +1 -1
- package/dist/app/assets/{lua-jHZMGpQf.js → lua-CqLmWD7C.js} +1 -1
- package/dist/app/assets/{magma-BMKUCiAE.js → magma-Bke0ceyc.js} +1 -1
- package/dist/app/assets/{makefile-CrnMbIy3.js → makefile-DBlcQubt.js} +1 -1
- package/dist/app/assets/{markdown-BpxRx0s_.js → markdown-BH45bEmz.js} +1 -1
- package/dist/app/assets/{markup-D_2bSIGF.js → markup-DmFxGmf3.js} +1 -1
- package/dist/app/assets/{markup-templating-BQJ4eRFE.js → markup-templating-B_q0uBR_.js} +1 -1
- package/dist/app/assets/{matlab-uyhAjnN1.js → matlab-BvTng_-n.js} +1 -1
- package/dist/app/assets/{maxscript-H8QAZVCr.js → maxscript-EAjZrtH-.js} +1 -1
- package/dist/app/assets/{mel-Os9gRUqz.js → mel-B31GmaYN.js} +1 -1
- package/dist/app/assets/{mermaid-B2iIz3n5.js → mermaid-Bbo9oxye.js} +1 -1
- package/dist/app/assets/{min-BTBcsdCC.js → min-C1erP2ys.js} +1 -1
- package/dist/app/assets/{mindmap-definition-QFDTVHPH-Dvj885ud.js → mindmap-definition-QFDTVHPH-DoDM_kwT.js} +1 -1
- package/dist/app/assets/{mizar-D9MjA9UN.js → mizar-CA6MYAa-.js} +1 -1
- package/dist/app/assets/{mongodb-Dn0muF6d.js → mongodb-DBUwhD50.js} +1 -1
- package/dist/app/assets/{monkey-DOTSILMn.js → monkey-W8cNL4gi.js} +1 -1
- package/dist/app/assets/{moonscript-DfQiWdI-.js → moonscript-DlXhfU4k.js} +1 -1
- package/dist/app/assets/{n1ql-Di7PgXpN.js → n1ql-Dd4Dcmn4.js} +1 -1
- package/dist/app/assets/{n4js-4FGHhLWQ.js → n4js-BJwReVRf.js} +1 -1
- package/dist/app/assets/{nand2tetris-hdl-RPNTjDij.js → nand2tetris-hdl-DeAovU0i.js} +1 -1
- package/dist/app/assets/{naniscript-DlBeU5rv.js → naniscript-B5DfcucH.js} +1 -1
- package/dist/app/assets/{nasm-DOfW-U1c.js → nasm-B2p6UrEt.js} +1 -1
- package/dist/app/assets/{neon-DIaK0ba7.js → neon-LRGEn3Kl.js} +1 -1
- package/dist/app/assets/{nevod-MZznxw70.js → nevod-DA521y4e.js} +1 -1
- package/dist/app/assets/{nginx-B_evwEEx.js → nginx-DkBE6sdh.js} +1 -1
- package/dist/app/assets/{nim-CKV8H1in.js → nim-BwHhtLL4.js} +1 -1
- package/dist/app/assets/{nix-snnJAJ52.js → nix-DEjXGklZ.js} +1 -1
- package/dist/app/assets/{nsis-BkQHvfnw.js → nsis-CvAF9MTd.js} +1 -1
- package/dist/app/assets/{objectivec-MasMMXjt.js → objectivec-BnL4g9NC.js} +1 -1
- package/dist/app/assets/{ocaml-DfMICclm.js → ocaml-eNTexkzn.js} +1 -1
- package/dist/app/assets/{opencl-DMGsaXz-.js → opencl-D1mGywOY.js} +1 -1
- package/dist/app/assets/{openqasm-HESEWwwi.js → openqasm-lFdkM6pg.js} +1 -1
- package/dist/app/assets/{oz-Dnbv1xyS.js → oz-DHvmEwQV.js} +1 -1
- package/dist/app/assets/{parigp-BA7vMMvc.js → parigp-es3NjzpJ.js} +1 -1
- package/dist/app/assets/{parser-CpgehIIr.js → parser-Bak-ak7k.js} +1 -1
- package/dist/app/assets/{pascal-CHpGLduo.js → pascal-DJr5JSGs.js} +1 -1
- package/dist/app/assets/{pascaligo-gC_Fmy9X.js → pascaligo-ClJZy1ED.js} +1 -1
- package/dist/app/assets/{pcaxis-ClUcRdeO.js → pcaxis-Cq269eOX.js} +1 -1
- package/dist/app/assets/{peoplecode-DQzgxy54.js → peoplecode-CyL_NE7O.js} +1 -1
- package/dist/app/assets/{perl-oGp9SxLw.js → perl-DXU8D9bf.js} +1 -1
- package/dist/app/assets/{php-DgxqR0GZ.js → php-D7BV8qZw.js} +1 -1
- package/dist/app/assets/{php-extras-BfS-aY8o.js → php-extras-DOPW1PzN.js} +1 -1
- package/dist/app/assets/{phpdoc-BmMoLBHI.js → phpdoc-CRtNn35u.js} +1 -1
- package/dist/app/assets/{pieDiagram-DEJITSTG-DZ0yFuk7.js → pieDiagram-DEJITSTG-sozKWzq0.js} +1 -1
- package/dist/app/assets/{plsql-CPXmCYYW.js → plsql-BMvjxqWu.js} +1 -1
- package/dist/app/assets/{powerquery-FtFYTUVW.js → powerquery-672I_RiA.js} +1 -1
- package/dist/app/assets/{powershell-DuDoHsht.js → powershell-Bbhz0xjs.js} +1 -1
- package/dist/app/assets/{processing-CjEmSLbF.js → processing-onwQ_mg1.js} +1 -1
- package/dist/app/assets/{prolog-BrB4XKYQ.js → prolog-R0mnr85o.js} +1 -1
- package/dist/app/assets/{promql-Bo3Yo-85.js → promql-Cpdica46.js} +1 -1
- package/dist/app/assets/{properties-C12E8Vrx.js → properties-DHo8PbRa.js} +1 -1
- package/dist/app/assets/{protobuf-ZSbyt_tp.js → protobuf-DkjPAzxf.js} +1 -1
- package/dist/app/assets/{psl-C8BZ04EB.js → psl-bLvkZS_A.js} +1 -1
- package/dist/app/assets/{pug-tFtksCnz.js → pug-ByCsGE0M.js} +1 -1
- package/dist/app/assets/{puppet-DIKGEmsp.js → puppet-Bln8m9q9.js} +1 -1
- package/dist/app/assets/{pure-Dl1I5Uf9.js → pure-ClPohX0Q.js} +1 -1
- package/dist/app/assets/{purebasic-BKUq9_IV.js → purebasic-K5G6Cxnt.js} +1 -1
- package/dist/app/assets/{purescript-BfKdBG7f.js → purescript-BvwLUX-O.js} +1 -1
- package/dist/app/assets/{q-Bc-J6oNm.js → q-zX6rqsIp.js} +1 -1
- package/dist/app/assets/{qml-CtblfTL-.js → qml-CklZzPNb.js} +1 -1
- package/dist/app/assets/{qore-C_WhRfpS.js → qore-B9lXXujC.js} +1 -1
- package/dist/app/assets/{qsharp-CkQWjHnz.js → qsharp-x147BCXH.js} +1 -1
- package/dist/app/assets/{quadrantDiagram-34T5L4WZ-BFAfZEAg.js → quadrantDiagram-34T5L4WZ-B-6ATLiH.js} +1 -1
- package/dist/app/assets/{r-BLXGPVPD.js → r-Axvo4Zd_.js} +1 -1
- package/dist/app/assets/{racket-E6RQ7R9a.js → racket-xW0BNq3A.js} +1 -1
- package/dist/app/assets/{reason-DCm-poIN.js → reason-f5QENJ-q.js} +1 -1
- package/dist/app/assets/{regex-BQMYuSFJ.js → regex-BpaxF7jU.js} +1 -1
- package/dist/app/assets/{rego-kN2r0Pui.js → rego-BUom_JrJ.js} +1 -1
- package/dist/app/assets/{renpy-ifyhyky1.js → renpy-CJyvxC3b.js} +1 -1
- package/dist/app/assets/{requirementDiagram-MS252O5E-Cy6vLX6y.js → requirementDiagram-MS252O5E-CYxoCRf9.js} +1 -1
- package/dist/app/assets/{rest-sNHXO2Rp.js → rest-B4ukFYPn.js} +1 -1
- package/dist/app/assets/{rip-DiG06njh.js → rip-B4q_Vw7R.js} +1 -1
- package/dist/app/assets/{roboconf-Go3FkVXZ.js → roboconf-CtkjsQy6.js} +1 -1
- package/dist/app/assets/{robotframework-B0KjSDge.js → robotframework-DNz8f1Ip.js} +1 -1
- package/dist/app/assets/{ruby-lembbibU.js → ruby-rJz8oHeT.js} +1 -1
- package/dist/app/assets/{rust-lLanU6M8.js → rust-Cqf9gv1-.js} +1 -1
- package/dist/app/assets/{sankeyDiagram-XADWPNL6-CHNcaRfC.js → sankeyDiagram-XADWPNL6-DdDztt4E.js} +1 -1
- package/dist/app/assets/{sas-CepPfFuK.js → sas-EnB4FWaC.js} +1 -1
- package/dist/app/assets/{sass-CJ9PFEHC.js → sass-DZUC6NF8.js} +1 -1
- package/dist/app/assets/{scala-BOTmxIAg.js → scala-DUd3GTdg.js} +1 -1
- package/dist/app/assets/{scheme-DebY6fXZ.js → scheme-BiPREGfN.js} +1 -1
- package/dist/app/assets/{scss-I831DfbF.js → scss-gvdTHnI9.js} +1 -1
- package/dist/app/assets/{sequenceDiagram-FGHM5R23-B262jGYI.js → sequenceDiagram-FGHM5R23-lyt-X7gd.js} +1 -1
- package/dist/app/assets/{shell-session-Bc2Vf63x.js → shell-session-BOZ-lbqx.js} +1 -1
- package/dist/app/assets/{smali-BvHZ9KC5.js → smali-BRGQxjkp.js} +1 -1
- package/dist/app/assets/{smalltalk-CnJHUQDi.js → smalltalk-4xLJEhv1.js} +1 -1
- package/dist/app/assets/{smarty-C52pWLjT.js → smarty-HC6iTXED.js} +1 -1
- package/dist/app/assets/{sml-BIsAmqJZ.js → sml-aSisqwwP.js} +1 -1
- package/dist/app/assets/{solidity-CmIQhZ4P.js → solidity-wi6bpO7H.js} +1 -1
- package/dist/app/assets/{solution-file-BIQSOYlV.js → solution-file-BiKyTt1v.js} +1 -1
- package/dist/app/assets/{soy-3fx5uUfg.js → soy-B5zGlrys.js} +1 -1
- package/dist/app/assets/{sparql-BVOpxY0k.js → sparql-DknctEWY.js} +1 -1
- package/dist/app/assets/{splunk-spl-BY78MSNc.js → splunk-spl-uHY5PLUO.js} +1 -1
- package/dist/app/assets/{sqf-C829Cqkw.js → sqf-C_xrVS5o.js} +1 -1
- package/dist/app/assets/{sql-BjXleg-C.js → sql-BPenyVf5.js} +1 -1
- package/dist/app/assets/{squirrel-hVXB9A_k.js → squirrel-DADHl-33.js} +1 -1
- package/dist/app/assets/{stan-DR8-Ksro.js → stan-DrWoR2TQ.js} +1 -1
- package/dist/app/assets/{stateDiagram-FHFEXIEX-DASFzkGA.js → stateDiagram-FHFEXIEX-CZaq-pRy.js} +1 -1
- package/dist/app/assets/stateDiagram-v2-QKLJ7IA2-CjL5rpeW.js +1 -0
- package/dist/app/assets/{stylus-BLgROJFn.js → stylus-BteIttv6.js} +1 -1
- package/dist/app/assets/{swift-BFiTbikL.js → swift-CID0lx8z.js} +1 -1
- package/dist/app/assets/{systemd-BH7-HakT.js → systemd-BfSaVXI_.js} +1 -1
- package/dist/app/assets/{t4-cs-BhRgiInj.js → t4-cs-BnGkiA9f.js} +1 -1
- package/dist/app/assets/{t4-templating-DVcctKts.js → t4-templating-DU7VnNhm.js} +1 -1
- package/dist/app/assets/{t4-vb-BWdGVqZt.js → t4-vb-DqrbsRf8.js} +1 -1
- package/dist/app/assets/{tap-O_XkewC5.js → tap-4N6JZhAV.js} +1 -1
- package/dist/app/assets/{tcl-yX1XNQSP.js → tcl-DAdjH7wF.js} +1 -1
- package/dist/app/assets/{textile-BLezi3e1.js → textile-Du9JitF-.js} +1 -1
- package/dist/app/assets/{timeline-definition-GMOUNBTQ-BNGwgyTF.js → timeline-definition-GMOUNBTQ-CdXHfEQv.js} +1 -1
- package/dist/app/assets/{toml-Eph7qw5M.js → toml-B1OC92l7.js} +1 -1
- package/dist/app/assets/{tremor-CSl2ZVP1.js → tremor-CcXF5xRR.js} +1 -1
- package/dist/app/assets/{tt2-0Brdd3gb.js → tt2-CbRAm8Dv.js} +1 -1
- package/dist/app/assets/{turtle-Cc0fFjp3.js → turtle-BYM3wDgF.js} +1 -1
- package/dist/app/assets/{twig-Dt5yL5pH.js → twig-jMTWKrUr.js} +1 -1
- package/dist/app/assets/{typescript-gPQes0uv.js → typescript-BUWfHro-.js} +1 -1
- package/dist/app/assets/{typoscript-J9BtBWlv.js → typoscript-BYuR5WoR.js} +1 -1
- package/dist/app/assets/{unrealscript-g2cMrNeY.js → unrealscript-D0Ks49Es.js} +1 -1
- package/dist/app/assets/{uorazor-ChupejQE.js → uorazor-BJa2k0kx.js} +1 -1
- package/dist/app/assets/{uri-DKyJK53l.js → uri-BC41d-Kc.js} +1 -1
- package/dist/app/assets/{v-gE-bfjKA.js → v-pMjd7J8c.js} +1 -1
- package/dist/app/assets/{vala-COAZWYR5.js → vala-Cc2iyU85.js} +1 -1
- package/dist/app/assets/{vbnet-Bu2O5wTQ.js → vbnet-Cw4YKA4r.js} +1 -1
- package/dist/app/assets/{velocity-QORnuopg.js → velocity-DgoH540V.js} +1 -1
- package/dist/app/assets/{vennDiagram-DHZGUBPP-7IQLntaa.js → vennDiagram-DHZGUBPP-BGQ4WYyA.js} +1 -1
- package/dist/app/assets/{verilog-qxGjqHLf.js → verilog-B3IpJw7p.js} +1 -1
- package/dist/app/assets/{vhdl-cIq_dULQ.js → vhdl-Bp_kvSRI.js} +1 -1
- package/dist/app/assets/{vim-DY-IJIKY.js → vim-vIMCVl5h.js} +1 -1
- package/dist/app/assets/{visual-basic-Coo2C3Qj.js → visual-basic-BDowvLdG.js} +1 -1
- package/dist/app/assets/{wardley-RL74JXVD-D5caMcOT.js → wardley-RL74JXVD-Q35_vT4f.js} +1 -1
- package/dist/app/assets/{wardleyDiagram-NUSXRM2D-BbTN3RD2.js → wardleyDiagram-NUSXRM2D-tiJkvEP3.js} +1 -1
- package/dist/app/assets/{warpscript-BaMVI_Yi.js → warpscript-CGawrQhB.js} +1 -1
- package/dist/app/assets/{wasm-C1KcjV4l.js → wasm-DioreXvc.js} +1 -1
- package/dist/app/assets/{web-idl-C1V0GjBc.js → web-idl-Cl19lMMv.js} +1 -1
- package/dist/app/assets/{wiki-QJuJkorv.js → wiki-fhUrXEuf.js} +1 -1
- package/dist/app/assets/{wolfram-fbFFHeKH.js → wolfram-BBdTj5xJ.js} +1 -1
- package/dist/app/assets/{wren-CZ1XKEHc.js → wren-DyGar7gV.js} +1 -1
- package/dist/app/assets/{xeora-O0sY3eom.js → xeora-NACaryDq.js} +1 -1
- package/dist/app/assets/{xml-doc-Bs1K40y6.js → xml-doc-Deba7Hms.js} +1 -1
- package/dist/app/assets/{xojo-DsepgQ0E.js → xojo-BDayHUxW.js} +1 -1
- package/dist/app/assets/{xquery-C2-xF6LZ.js → xquery-BUHudJSq.js} +1 -1
- package/dist/app/assets/{xychartDiagram-5P7HB3ND-D_u6cobc.js → xychartDiagram-5P7HB3ND-lPbACL4f.js} +1 -1
- package/dist/app/assets/{yaml-CSCOF77O.js → yaml-Mc4-fPw6.js} +1 -1
- package/dist/app/assets/{yang-Dupiqe8o.js → yang-D4m2oyuH.js} +1 -1
- package/dist/app/assets/{zig-BVtaAQ9o.js → zig-B87WilJ7.js} +1 -1
- package/dist/app/index.html +2 -2
- package/dist/index.cjs +492 -379
- package/dist/index.d.cts +16 -0
- package/dist/index.d.ts +16 -0
- package/dist/index.js +508 -385
- package/package.json +3 -3
- package/dist/app/assets/channel-CKs0hRBa.js +0 -1
- package/dist/app/assets/classDiagram-6PBFFD2Q-BSlTfNc_.js +0 -1
- package/dist/app/assets/classDiagram-v2-HSJHXN6E-BSlTfNc_.js +0 -1
- package/dist/app/assets/clone-Qytsv1Ng.js +0 -1
- package/dist/app/assets/index-CIhQPDQc.css +0 -1
- package/dist/app/assets/index-Ca6boVeh.js +0 -762
- package/dist/app/assets/stateDiagram-v2-QKLJ7IA2-VSJXuK_v.js +0 -1
package/dist/index.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
// src/components/chat.tsx
|
|
2
|
-
import * as
|
|
2
|
+
import * as React55 from "react";
|
|
3
3
|
import {
|
|
4
4
|
ArrowDown as ArrowDown2,
|
|
5
5
|
ChevronDown as ChevronDown5,
|
|
6
6
|
FileText as FileText5,
|
|
7
7
|
ImageIcon,
|
|
8
|
-
Loader2 as
|
|
8
|
+
Loader2 as Loader211,
|
|
9
9
|
Minus,
|
|
10
10
|
Pause,
|
|
11
11
|
Pencil as Pencil4,
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
Settings as Settings2,
|
|
15
15
|
Target as Target3,
|
|
16
16
|
Trash2 as Trash23,
|
|
17
|
-
X as
|
|
17
|
+
X as X9
|
|
18
18
|
} from "lucide-react";
|
|
19
19
|
import { CHATKIT_TASK_SUMMARY_OPEN_RESOURCE_EFFECT } from "@xpert-ai/chatkit-types";
|
|
20
20
|
|
|
@@ -806,6 +806,7 @@ function isRuntimeCapabilitiesSelection(value) {
|
|
|
806
806
|
|
|
807
807
|
// src/providers/ParentMessenger.tsx
|
|
808
808
|
import { jsx } from "react/jsx-runtime";
|
|
809
|
+
var CHATKIT_INTERNAL_PARENT_EVENT = "chatkit:internal-parent-event";
|
|
809
810
|
var handledSendUserMessageNonces = /* @__PURE__ */ new Set();
|
|
810
811
|
var handledSendUserMessageEvents = /* @__PURE__ */ new WeakSet();
|
|
811
812
|
var getParentOrigin = () => {
|
|
@@ -1123,6 +1124,16 @@ function ParentMessengerProvider({
|
|
|
1123
1124
|
);
|
|
1124
1125
|
const sendEvent = useCallback(
|
|
1125
1126
|
(event, data, transfer) => {
|
|
1127
|
+
if (typeof window !== "undefined") {
|
|
1128
|
+
window.dispatchEvent(
|
|
1129
|
+
new CustomEvent(
|
|
1130
|
+
CHATKIT_INTERNAL_PARENT_EVENT,
|
|
1131
|
+
{
|
|
1132
|
+
detail: { event, data }
|
|
1133
|
+
}
|
|
1134
|
+
)
|
|
1135
|
+
);
|
|
1136
|
+
}
|
|
1126
1137
|
if (!isParentAvailable) return;
|
|
1127
1138
|
const message = {
|
|
1128
1139
|
__xpaiChatKit: true,
|
|
@@ -2118,6 +2129,32 @@ import { initReactI18next } from "react-i18next";
|
|
|
2118
2129
|
|
|
2119
2130
|
// src/i18n/locales/en-US.json
|
|
2120
2131
|
var en_US_default = {
|
|
2132
|
+
workbench: {
|
|
2133
|
+
title: "Views",
|
|
2134
|
+
description: "Remote workbench views",
|
|
2135
|
+
views: "Available views",
|
|
2136
|
+
open: "Open views",
|
|
2137
|
+
close: "Close views",
|
|
2138
|
+
expandPanel: "Expand panel",
|
|
2139
|
+
restorePanel: "Restore panel",
|
|
2140
|
+
toggleSidebar: "Show or hide sidebar",
|
|
2141
|
+
resize: "Resize views panel",
|
|
2142
|
+
loading: "Loading views...",
|
|
2143
|
+
loadingView: "Loading view...",
|
|
2144
|
+
empty: "No compatible views are available.",
|
|
2145
|
+
loadFailed: "Views could not be loaded.",
|
|
2146
|
+
entryUnavailable: "Remote view content is unavailable.",
|
|
2147
|
+
missingAssistant: "An assistant is required to load views.",
|
|
2148
|
+
retry: "Retry",
|
|
2149
|
+
errors: {
|
|
2150
|
+
contextKeyRequired: "Context key is required.",
|
|
2151
|
+
messageRequired: "Message text is required.",
|
|
2152
|
+
sendFailed: "The message could not be sent.",
|
|
2153
|
+
requestFailed: "The remote view request failed.",
|
|
2154
|
+
requestTimeout: "The remote view request timed out.",
|
|
2155
|
+
clientCommandUnavailable: "No handler is configured for client command {{commandKey}}."
|
|
2156
|
+
}
|
|
2157
|
+
},
|
|
2121
2158
|
chat: {
|
|
2122
2159
|
title: "Chat",
|
|
2123
2160
|
placeholder: "Type a message...",
|
|
@@ -2562,6 +2599,32 @@ var en_US_default = {
|
|
|
2562
2599
|
|
|
2563
2600
|
// src/i18n/locales/zh-CN.json
|
|
2564
2601
|
var zh_CN_default = {
|
|
2602
|
+
workbench: {
|
|
2603
|
+
title: "\u89C6\u56FE",
|
|
2604
|
+
description: "\u8FDC\u7A0B\u5DE5\u4F5C\u53F0\u89C6\u56FE",
|
|
2605
|
+
views: "\u53EF\u7528\u89C6\u56FE",
|
|
2606
|
+
open: "\u6253\u5F00\u89C6\u56FE",
|
|
2607
|
+
close: "\u5173\u95ED\u89C6\u56FE",
|
|
2608
|
+
expandPanel: "\u5C55\u5F00\u9762\u677F",
|
|
2609
|
+
restorePanel: "\u8FD8\u539F\u9762\u677F",
|
|
2610
|
+
toggleSidebar: "\u663E\u793A/\u9690\u85CF\u4FA7\u8FB9\u680F",
|
|
2611
|
+
resize: "\u8C03\u6574\u89C6\u56FE\u9762\u677F\u5BBD\u5EA6",
|
|
2612
|
+
loading: "\u6B63\u5728\u52A0\u8F7D\u89C6\u56FE...",
|
|
2613
|
+
loadingView: "\u6B63\u5728\u52A0\u8F7D\u89C6\u56FE...",
|
|
2614
|
+
empty: "\u6682\u65E0\u517C\u5BB9\u7684\u89C6\u56FE\u3002",
|
|
2615
|
+
loadFailed: "\u89C6\u56FE\u52A0\u8F7D\u5931\u8D25\u3002",
|
|
2616
|
+
entryUnavailable: "\u8FDC\u7A0B\u89C6\u56FE\u5185\u5BB9\u4E0D\u53EF\u7528\u3002",
|
|
2617
|
+
missingAssistant: "\u9700\u8981 Assistant \u624D\u80FD\u52A0\u8F7D\u89C6\u56FE\u3002",
|
|
2618
|
+
retry: "\u91CD\u8BD5",
|
|
2619
|
+
errors: {
|
|
2620
|
+
contextKeyRequired: "\u5FC5\u987B\u63D0\u4F9B\u4E0A\u4E0B\u6587\u952E\u3002",
|
|
2621
|
+
messageRequired: "\u5FC5\u987B\u63D0\u4F9B\u6D88\u606F\u5185\u5BB9\u3002",
|
|
2622
|
+
sendFailed: "\u6D88\u606F\u53D1\u9001\u5931\u8D25\u3002",
|
|
2623
|
+
requestFailed: "\u8FDC\u7A0B\u89C6\u56FE\u8BF7\u6C42\u5931\u8D25\u3002",
|
|
2624
|
+
requestTimeout: "\u8FDC\u7A0B\u89C6\u56FE\u8BF7\u6C42\u8D85\u65F6\u3002",
|
|
2625
|
+
clientCommandUnavailable: "\u672A\u914D\u7F6E\u5BA2\u6237\u7AEF\u547D\u4EE4 {{commandKey}} \u7684\u5904\u7406\u5668\u3002"
|
|
2626
|
+
}
|
|
2627
|
+
},
|
|
2565
2628
|
chat: {
|
|
2566
2629
|
title: "\u804A\u5929",
|
|
2567
2630
|
placeholder: "\u8F93\u5165\u6D88\u606F...",
|
|
@@ -3236,6 +3299,7 @@ function generateGrayscaleColors(grayscale, isDarkMode) {
|
|
|
3236
3299
|
}
|
|
3237
3300
|
function ThemeProvider({ children, theme: themeProp }) {
|
|
3238
3301
|
const themeRef = React4.useRef(null);
|
|
3302
|
+
const [themeRevision, setThemeRevision] = React4.useState(0);
|
|
3239
3303
|
const theme = React4.useMemo(() => {
|
|
3240
3304
|
if (typeof themeProp === "string") {
|
|
3241
3305
|
return {
|
|
@@ -3248,8 +3312,13 @@ function ThemeProvider({ children, theme: themeProp }) {
|
|
|
3248
3312
|
return theme.colorScheme === "dark";
|
|
3249
3313
|
}, [theme]);
|
|
3250
3314
|
const contextValue = React4.useMemo(
|
|
3251
|
-
() => ({
|
|
3252
|
-
|
|
3315
|
+
() => ({
|
|
3316
|
+
theme,
|
|
3317
|
+
isDarkMode,
|
|
3318
|
+
themeRootRef: themeRef,
|
|
3319
|
+
themeRevision
|
|
3320
|
+
}),
|
|
3321
|
+
[theme, isDarkMode, themeRevision]
|
|
3253
3322
|
);
|
|
3254
3323
|
React4.useEffect(() => {
|
|
3255
3324
|
if (!themeRef.current) return;
|
|
@@ -3346,6 +3415,7 @@ function ThemeProvider({ children, theme: themeProp }) {
|
|
|
3346
3415
|
}
|
|
3347
3416
|
}
|
|
3348
3417
|
}
|
|
3418
|
+
setThemeRevision((current) => current + 1);
|
|
3349
3419
|
return () => {
|
|
3350
3420
|
const root = document.documentElement;
|
|
3351
3421
|
el.classList.remove("dark");
|
|
@@ -9274,7 +9344,7 @@ import {
|
|
|
9274
9344
|
memo,
|
|
9275
9345
|
useContext as useContext5,
|
|
9276
9346
|
useId as useId4,
|
|
9277
|
-
useState as
|
|
9347
|
+
useState as useState15
|
|
9278
9348
|
} from "react";
|
|
9279
9349
|
import { CheckIcon as CheckIcon3, ChevronDownIcon, CopyIcon as CopyIcon2, DownloadIcon as DownloadIcon2, ListChecksIcon } from "lucide-react";
|
|
9280
9350
|
|
|
@@ -10029,7 +10099,7 @@ function PlanCard({ children }) {
|
|
|
10029
10099
|
const { t } = useChatkitTranslation();
|
|
10030
10100
|
const planMarkdown = normalizePlanMarkdown(children);
|
|
10031
10101
|
const contentId = useId4();
|
|
10032
|
-
const [isExpanded, setIsExpanded] =
|
|
10102
|
+
const [isExpanded, setIsExpanded] = useState15(false);
|
|
10033
10103
|
const { isCopied, copyToClipboard } = useCopyToClipboard();
|
|
10034
10104
|
const onCopy = () => {
|
|
10035
10105
|
if (!planMarkdown || isCopied) return;
|
|
@@ -10135,7 +10205,7 @@ var isMermaidCodeElement = (child) => isValidElement(child) && typeof child.prop
|
|
|
10135
10205
|
function useCopyToClipboard({
|
|
10136
10206
|
copiedDuration = 3e3
|
|
10137
10207
|
} = {}) {
|
|
10138
|
-
const [isCopied, setIsCopied] =
|
|
10208
|
+
const [isCopied, setIsCopied] = useState15(false);
|
|
10139
10209
|
const copyToClipboard = (value) => {
|
|
10140
10210
|
if (!value) return;
|
|
10141
10211
|
navigator.clipboard.writeText(value).then(() => {
|
|
@@ -12471,7 +12541,7 @@ function RequestUserInputResultCard({
|
|
|
12471
12541
|
}
|
|
12472
12542
|
|
|
12473
12543
|
// src/components/thread/messages/widget.tsx
|
|
12474
|
-
import { useEffect as useEffect17, useMemo as useMemo12, useState as
|
|
12544
|
+
import { useEffect as useEffect17, useMemo as useMemo12, useState as useState19 } from "react";
|
|
12475
12545
|
import {
|
|
12476
12546
|
A2UIRenderer,
|
|
12477
12547
|
SurfaceRenderer,
|
|
@@ -12514,7 +12584,7 @@ function FlatWidgetSurface({
|
|
|
12514
12584
|
surfaceId
|
|
12515
12585
|
}) {
|
|
12516
12586
|
const { processMessages } = useA2UI();
|
|
12517
|
-
const [renderError, setRenderError] =
|
|
12587
|
+
const [renderError, setRenderError] = useState19(false);
|
|
12518
12588
|
const normalizedMessages = useMemo12(
|
|
12519
12589
|
() => normalizeFlatWidgetMessages(messages, surfaceId),
|
|
12520
12590
|
[messages, surfaceId]
|
|
@@ -16537,10 +16607,62 @@ function findDomPointForComposerOffset(root, offset) {
|
|
|
16537
16607
|
return result ?? { node: lastNode, offset: lastOffset };
|
|
16538
16608
|
}
|
|
16539
16609
|
|
|
16540
|
-
// src/
|
|
16610
|
+
// src/workbench/WorkbenchShell.tsx
|
|
16541
16611
|
import * as React51 from "react";
|
|
16542
|
-
import {
|
|
16543
|
-
|
|
16612
|
+
import {
|
|
16613
|
+
ASSISTANT_CHAT_SEND_MESSAGE_COMMAND,
|
|
16614
|
+
ASSISTANT_CONTEXT_SET_COMMAND
|
|
16615
|
+
} from "@xpert-ai/xpert-sdk";
|
|
16616
|
+
import {
|
|
16617
|
+
Loader2 as Loader29,
|
|
16618
|
+
Maximize2,
|
|
16619
|
+
Minimize2,
|
|
16620
|
+
PanelRight,
|
|
16621
|
+
RotateCcw,
|
|
16622
|
+
X as X7
|
|
16623
|
+
} from "lucide-react";
|
|
16624
|
+
import { Fragment as Fragment8, jsx as jsx56, jsxs as jsxs38 } from "react/jsx-runtime";
|
|
16625
|
+
var WorkbenchContext = React51.createContext({
|
|
16626
|
+
enabled: false,
|
|
16627
|
+
open: false,
|
|
16628
|
+
loading: false,
|
|
16629
|
+
available: false,
|
|
16630
|
+
toggle: () => void 0
|
|
16631
|
+
});
|
|
16632
|
+
function useWorkbench() {
|
|
16633
|
+
return React51.useContext(WorkbenchContext);
|
|
16634
|
+
}
|
|
16635
|
+
function WorkbenchToggleButton() {
|
|
16636
|
+
const workbench = useWorkbench();
|
|
16637
|
+
const { t } = useChatkitTranslation();
|
|
16638
|
+
if (!workbench.enabled || workbench.open) return null;
|
|
16639
|
+
const label = t("workbench.open");
|
|
16640
|
+
const tooltip = workbench.disabledReason ?? label;
|
|
16641
|
+
return /* @__PURE__ */ jsxs38(Tooltip, { children: [
|
|
16642
|
+
/* @__PURE__ */ jsx56(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx56("span", { className: "inline-flex h-8 w-8", children: /* @__PURE__ */ jsx56(
|
|
16643
|
+
"button",
|
|
16644
|
+
{
|
|
16645
|
+
type: "button",
|
|
16646
|
+
onClick: workbench.toggle,
|
|
16647
|
+
disabled: !workbench.available,
|
|
16648
|
+
className: cn(
|
|
16649
|
+
"flex h-8 w-8 cursor-pointer items-center justify-center rounded-md",
|
|
16650
|
+
"text-muted-foreground transition-colors duration-150 hover:bg-muted hover:text-foreground",
|
|
16651
|
+
"disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50"
|
|
16652
|
+
),
|
|
16653
|
+
"aria-label": label,
|
|
16654
|
+
"aria-expanded": false,
|
|
16655
|
+
children: workbench.loading ? /* @__PURE__ */ jsx56(Loader29, { size: 16, className: "animate-spin" }) : /* @__PURE__ */ jsx56(PanelRight, { size: 16 })
|
|
16656
|
+
}
|
|
16657
|
+
) }) }),
|
|
16658
|
+
/* @__PURE__ */ jsx56(TooltipContent, { side: "bottom", children: tooltip })
|
|
16659
|
+
] });
|
|
16660
|
+
}
|
|
16661
|
+
|
|
16662
|
+
// src/components/chat/runtime-capabilities.tsx
|
|
16663
|
+
import * as React52 from "react";
|
|
16664
|
+
import { X as X8 } from "lucide-react";
|
|
16665
|
+
import { jsx as jsx57, jsxs as jsxs39 } from "react/jsx-runtime";
|
|
16544
16666
|
function createComposerCapabilityInsertionParts(options) {
|
|
16545
16667
|
return options.flatMap((option) => [
|
|
16546
16668
|
createComposerCapabilityPart(option, createMessageId()),
|
|
@@ -16613,29 +16735,29 @@ function useRuntimeCapabilitiesState({
|
|
|
16613
16735
|
disabled,
|
|
16614
16736
|
composerParts
|
|
16615
16737
|
}) {
|
|
16616
|
-
const [runtimeCapabilities, setRuntimeCapabilities] =
|
|
16617
|
-
const [runtimeCapabilitiesReady, setRuntimeCapabilitiesReady] =
|
|
16618
|
-
const [sessionRuntimeCapabilities, setSessionRuntimeCapabilities] =
|
|
16738
|
+
const [runtimeCapabilities, setRuntimeCapabilities] = React52.useState(null);
|
|
16739
|
+
const [runtimeCapabilitiesReady, setRuntimeCapabilitiesReady] = React52.useState(false);
|
|
16740
|
+
const [sessionRuntimeCapabilities, setSessionRuntimeCapabilities] = React52.useState(
|
|
16619
16741
|
() => createEmptyRuntimeCapabilitiesSelection()
|
|
16620
16742
|
);
|
|
16621
|
-
const [runRuntimeCapabilities, setRunRuntimeCapabilities] =
|
|
16743
|
+
const [runRuntimeCapabilities, setRunRuntimeCapabilities] = React52.useState(
|
|
16622
16744
|
() => createEmptyRuntimeCapabilitiesSelection()
|
|
16623
16745
|
);
|
|
16624
|
-
const [runtimeCapabilityPalette, setRuntimeCapabilityPalette] =
|
|
16625
|
-
const runtimeCapabilityPreferenceLoadRef =
|
|
16626
|
-
const pendingExternalRuntimeCapabilitiesRef =
|
|
16627
|
-
const runtimeCapabilityOptions =
|
|
16746
|
+
const [runtimeCapabilityPalette, setRuntimeCapabilityPalette] = React52.useState(null);
|
|
16747
|
+
const runtimeCapabilityPreferenceLoadRef = React52.useRef(0);
|
|
16748
|
+
const pendingExternalRuntimeCapabilitiesRef = React52.useRef(null);
|
|
16749
|
+
const runtimeCapabilityOptions = React52.useMemo(
|
|
16628
16750
|
() => getRuntimeCapabilityOptions(runtimeCapabilities),
|
|
16629
16751
|
[runtimeCapabilities]
|
|
16630
16752
|
);
|
|
16631
|
-
const effectiveSessionRuntimeCapabilities =
|
|
16753
|
+
const effectiveSessionRuntimeCapabilities = React52.useMemo(
|
|
16632
16754
|
() => runtimeCapabilitiesReady && runtimeCapabilities ? mergeRuntimeCapabilitiesSelections(
|
|
16633
16755
|
runtimeCapabilities,
|
|
16634
16756
|
sessionRuntimeCapabilities
|
|
16635
16757
|
) : null,
|
|
16636
16758
|
[runtimeCapabilities, runtimeCapabilitiesReady, sessionRuntimeCapabilities]
|
|
16637
16759
|
);
|
|
16638
|
-
const runRuntimeCapabilityOptions =
|
|
16760
|
+
const runRuntimeCapabilityOptions = React52.useMemo(
|
|
16639
16761
|
() => runtimeCapabilityOptions.filter(
|
|
16640
16762
|
(option) => isRuntimeCapabilitySelected(
|
|
16641
16763
|
runRuntimeCapabilities,
|
|
@@ -16645,11 +16767,11 @@ function useRuntimeCapabilitiesState({
|
|
|
16645
16767
|
),
|
|
16646
16768
|
[runRuntimeCapabilities, runtimeCapabilityOptions]
|
|
16647
16769
|
);
|
|
16648
|
-
const composerRuntimeCapabilitySelectionKeys =
|
|
16770
|
+
const composerRuntimeCapabilitySelectionKeys = React52.useMemo(
|
|
16649
16771
|
() => getComposerCapabilitySelectionKeys(composerParts),
|
|
16650
16772
|
[composerParts]
|
|
16651
16773
|
);
|
|
16652
|
-
const detachedRunRuntimeCapabilityOptions =
|
|
16774
|
+
const detachedRunRuntimeCapabilityOptions = React52.useMemo(
|
|
16653
16775
|
() => runRuntimeCapabilityOptions.filter(
|
|
16654
16776
|
(option) => !composerRuntimeCapabilitySelectionKeys.has(
|
|
16655
16777
|
getRuntimeCapabilityOptionKey(option)
|
|
@@ -16657,7 +16779,7 @@ function useRuntimeCapabilitiesState({
|
|
|
16657
16779
|
),
|
|
16658
16780
|
[composerRuntimeCapabilitySelectionKeys, runRuntimeCapabilityOptions]
|
|
16659
16781
|
);
|
|
16660
|
-
const persistSessionRuntimeCapabilities =
|
|
16782
|
+
const persistSessionRuntimeCapabilities = React52.useCallback(
|
|
16661
16783
|
async (nextThreadId, selection) => {
|
|
16662
16784
|
if (!runtimeCapabilities || !selection || !client) {
|
|
16663
16785
|
return;
|
|
@@ -16682,7 +16804,7 @@ function useRuntimeCapabilitiesState({
|
|
|
16682
16804
|
},
|
|
16683
16805
|
[client, runtimeCapabilities]
|
|
16684
16806
|
);
|
|
16685
|
-
const applyExternalRuntimeCapabilities =
|
|
16807
|
+
const applyExternalRuntimeCapabilities = React52.useCallback(
|
|
16686
16808
|
(selection) => {
|
|
16687
16809
|
pendingExternalRuntimeCapabilitiesRef.current = selection;
|
|
16688
16810
|
setRunRuntimeCapabilities(() => {
|
|
@@ -16703,7 +16825,7 @@ function useRuntimeCapabilitiesState({
|
|
|
16703
16825
|
},
|
|
16704
16826
|
[runtimeCapabilities]
|
|
16705
16827
|
);
|
|
16706
|
-
const handleSessionRuntimeCapabilityToggle =
|
|
16828
|
+
const handleSessionRuntimeCapabilityToggle = React52.useCallback(
|
|
16707
16829
|
(type, id, selected) => {
|
|
16708
16830
|
setSessionRuntimeCapabilities((previous) => {
|
|
16709
16831
|
const nextSelection = toggleRuntimeCapabilitySelection(
|
|
@@ -16724,7 +16846,7 @@ function useRuntimeCapabilitiesState({
|
|
|
16724
16846
|
},
|
|
16725
16847
|
[persistSessionRuntimeCapabilities, threadId]
|
|
16726
16848
|
);
|
|
16727
|
-
const addRunRuntimeCapabilities =
|
|
16849
|
+
const addRunRuntimeCapabilities = React52.useCallback(
|
|
16728
16850
|
(selection) => {
|
|
16729
16851
|
setRunRuntimeCapabilities(
|
|
16730
16852
|
(previous) => runtimeCapabilities ? mergeRuntimeCapabilitiesSelections(
|
|
@@ -16736,13 +16858,13 @@ function useRuntimeCapabilitiesState({
|
|
|
16736
16858
|
},
|
|
16737
16859
|
[runtimeCapabilities]
|
|
16738
16860
|
);
|
|
16739
|
-
const resetRunRuntimeCapabilities =
|
|
16861
|
+
const resetRunRuntimeCapabilities = React52.useCallback(() => {
|
|
16740
16862
|
setRunRuntimeCapabilities(
|
|
16741
16863
|
createEmptyRuntimeCapabilitiesSelection(runtimeCapabilities)
|
|
16742
16864
|
);
|
|
16743
16865
|
setRuntimeCapabilityPalette(null);
|
|
16744
16866
|
}, [runtimeCapabilities]);
|
|
16745
|
-
const getRuntimeCapabilitiesForSubmit =
|
|
16867
|
+
const getRuntimeCapabilitiesForSubmit = React52.useCallback(
|
|
16746
16868
|
(recommended) => {
|
|
16747
16869
|
const recommendedRuntimeCapabilitiesForSubmit = recommended && runtimeCapabilities && runtimeCapabilitiesReady ? mergeRuntimeCapabilitiesSelections(
|
|
16748
16870
|
runtimeCapabilities,
|
|
@@ -16773,7 +16895,7 @@ function useRuntimeCapabilitiesState({
|
|
|
16773
16895
|
runtimeCapabilityOptions
|
|
16774
16896
|
]
|
|
16775
16897
|
);
|
|
16776
|
-
const getRuntimeCapabilitiesForCommand =
|
|
16898
|
+
const getRuntimeCapabilitiesForCommand = React52.useCallback(
|
|
16777
16899
|
(recommended) => runtimeCapabilities && runtimeCapabilitiesReady ? createRuntimeCapabilitiesForSubmit({
|
|
16778
16900
|
capabilities: runtimeCapabilities,
|
|
16779
16901
|
available: effectiveSessionRuntimeCapabilities,
|
|
@@ -16785,7 +16907,7 @@ function useRuntimeCapabilitiesState({
|
|
|
16785
16907
|
runtimeCapabilitiesReady
|
|
16786
16908
|
]
|
|
16787
16909
|
);
|
|
16788
|
-
|
|
16910
|
+
React52.useEffect(() => {
|
|
16789
16911
|
if (disabled || !client || !assistantId) {
|
|
16790
16912
|
pendingExternalRuntimeCapabilitiesRef.current = null;
|
|
16791
16913
|
setRuntimeCapabilities(null);
|
|
@@ -16833,7 +16955,7 @@ function useRuntimeCapabilitiesState({
|
|
|
16833
16955
|
});
|
|
16834
16956
|
return () => controller.abort();
|
|
16835
16957
|
}, [assistantId, client, disabled]);
|
|
16836
|
-
|
|
16958
|
+
React52.useEffect(() => {
|
|
16837
16959
|
const emptyRunSelection = createEmptyRuntimeCapabilitiesSelection(runtimeCapabilities);
|
|
16838
16960
|
const pendingExternalSelection = pendingExternalRuntimeCapabilitiesRef.current;
|
|
16839
16961
|
if (pendingExternalSelection && runtimeCapabilities) {
|
|
@@ -16925,8 +17047,8 @@ function useRuntimeCapabilityComposerActions({
|
|
|
16925
17047
|
commitComposerParts,
|
|
16926
17048
|
focusComposerAt
|
|
16927
17049
|
}) {
|
|
16928
|
-
const pendingExternalRuntimeCapabilityInsertRef =
|
|
16929
|
-
const insertExternalRuntimeCapabilities =
|
|
17050
|
+
const pendingExternalRuntimeCapabilityInsertRef = React52.useRef(null);
|
|
17051
|
+
const insertExternalRuntimeCapabilities = React52.useCallback(
|
|
16930
17052
|
(selection, options) => {
|
|
16931
17053
|
applyExternalRuntimeCapabilities(selection);
|
|
16932
17054
|
if (!selection) {
|
|
@@ -16981,7 +17103,7 @@ function useRuntimeCapabilityComposerActions({
|
|
|
16981
17103
|
setRuntimeCapabilityPalette
|
|
16982
17104
|
]
|
|
16983
17105
|
);
|
|
16984
|
-
const applyComposerValueRuntimeCapabilities =
|
|
17106
|
+
const applyComposerValueRuntimeCapabilities = React52.useCallback(
|
|
16985
17107
|
(payload, options) => {
|
|
16986
17108
|
const runtimeCapabilitiesPayload = isRuntimeCapabilitiesSelection(
|
|
16987
17109
|
payload.runtimeCapabilities
|
|
@@ -16997,7 +17119,7 @@ function useRuntimeCapabilityComposerActions({
|
|
|
16997
17119
|
},
|
|
16998
17120
|
[applyExternalRuntimeCapabilities, insertExternalRuntimeCapabilities]
|
|
16999
17121
|
);
|
|
17000
|
-
const updateRuntimeCapabilityPalette =
|
|
17122
|
+
const updateRuntimeCapabilityPalette = React52.useCallback(
|
|
17001
17123
|
(parts, selectionStart) => {
|
|
17002
17124
|
const input = composerInputRef.current;
|
|
17003
17125
|
const editingText = getComposerEditingText(parts);
|
|
@@ -17009,7 +17131,7 @@ function useRuntimeCapabilityComposerActions({
|
|
|
17009
17131
|
},
|
|
17010
17132
|
[composerInputRef, setRuntimeCapabilityPalette]
|
|
17011
17133
|
);
|
|
17012
|
-
const removeRunRuntimeCapability =
|
|
17134
|
+
const removeRunRuntimeCapability = React52.useCallback(
|
|
17013
17135
|
(option) => {
|
|
17014
17136
|
setRunRuntimeCapabilities(
|
|
17015
17137
|
(previous) => toggleRuntimeCapabilitySelection(
|
|
@@ -17029,7 +17151,7 @@ function useRuntimeCapabilityComposerActions({
|
|
|
17029
17151
|
},
|
|
17030
17152
|
[commitComposerParts, composerPartsRef, setRunRuntimeCapabilities]
|
|
17031
17153
|
);
|
|
17032
|
-
const insertComposerCapabilityToken =
|
|
17154
|
+
const insertComposerCapabilityToken = React52.useCallback(
|
|
17033
17155
|
(capability, range) => {
|
|
17034
17156
|
const replacementParts = createComposerCapabilityInsertionParts([
|
|
17035
17157
|
capability
|
|
@@ -17070,7 +17192,7 @@ function useRuntimeCapabilityComposerActions({
|
|
|
17070
17192
|
setRuntimeCapabilityPalette
|
|
17071
17193
|
]
|
|
17072
17194
|
);
|
|
17073
|
-
|
|
17195
|
+
React52.useEffect(() => {
|
|
17074
17196
|
if (!runtimeCapabilitiesReady || !runtimeCapabilities) {
|
|
17075
17197
|
return;
|
|
17076
17198
|
}
|
|
@@ -17100,16 +17222,16 @@ function HumanRuntimeCapabilityChips({
|
|
|
17100
17222
|
if (options.length === 0) {
|
|
17101
17223
|
return null;
|
|
17102
17224
|
}
|
|
17103
|
-
return /* @__PURE__ */
|
|
17225
|
+
return /* @__PURE__ */ jsx57("div", { className: "mb-2 flex flex-wrap gap-1.5", children: options.map((option) => {
|
|
17104
17226
|
const color = option.type === "skill" ? void 0 : getRuntimeCapabilityColor(option);
|
|
17105
|
-
return /* @__PURE__ */
|
|
17227
|
+
return /* @__PURE__ */ jsxs39(
|
|
17106
17228
|
"span",
|
|
17107
17229
|
{
|
|
17108
17230
|
className: "inline-flex max-w-full items-center gap-1 rounded-md bg-primary-foreground/20 px-2 py-1 text-xs font-medium text-primary-foreground",
|
|
17109
17231
|
style: color ? { color } : void 0,
|
|
17110
17232
|
children: [
|
|
17111
|
-
/* @__PURE__ */
|
|
17112
|
-
/* @__PURE__ */
|
|
17233
|
+
/* @__PURE__ */ jsx57(RuntimeCapabilityIcon, { option, variant: "chip" }),
|
|
17234
|
+
/* @__PURE__ */ jsx57("span", { className: "max-w-[9rem] truncate", children: option.label })
|
|
17113
17235
|
]
|
|
17114
17236
|
},
|
|
17115
17237
|
`${option.type}:${option.id}`
|
|
@@ -17125,19 +17247,19 @@ function DetachedRunRuntimeCapabilities({
|
|
|
17125
17247
|
if (options.length === 0) {
|
|
17126
17248
|
return null;
|
|
17127
17249
|
}
|
|
17128
|
-
return /* @__PURE__ */
|
|
17129
|
-
/* @__PURE__ */
|
|
17250
|
+
return /* @__PURE__ */ jsxs39("div", { className: "mb-2 flex flex-wrap items-center gap-2", children: [
|
|
17251
|
+
/* @__PURE__ */ jsx57("span", { className: "text-xs text-muted-foreground", children: runOnlyLabel }),
|
|
17130
17252
|
options.map((option) => {
|
|
17131
17253
|
const color = getRuntimeCapabilityColor(option);
|
|
17132
|
-
return /* @__PURE__ */
|
|
17254
|
+
return /* @__PURE__ */ jsxs39(
|
|
17133
17255
|
"span",
|
|
17134
17256
|
{
|
|
17135
17257
|
className: "inline-flex max-w-full items-center gap-1 rounded-full bg-primary/10 px-2 py-0.5 text-xs font-medium text-primary",
|
|
17136
17258
|
style: color ? { color } : void 0,
|
|
17137
17259
|
children: [
|
|
17138
|
-
/* @__PURE__ */
|
|
17139
|
-
/* @__PURE__ */
|
|
17140
|
-
/* @__PURE__ */
|
|
17260
|
+
/* @__PURE__ */ jsx57(RuntimeCapabilityIcon, { option, variant: "chip" }),
|
|
17261
|
+
/* @__PURE__ */ jsx57("span", { className: "max-w-40 truncate", children: option.label }),
|
|
17262
|
+
/* @__PURE__ */ jsx57(
|
|
17141
17263
|
"button",
|
|
17142
17264
|
{
|
|
17143
17265
|
type: "button",
|
|
@@ -17145,7 +17267,7 @@ function DetachedRunRuntimeCapabilities({
|
|
|
17145
17267
|
className: "rounded-full p-0.5 hover:bg-primary/15",
|
|
17146
17268
|
title: removeLabel,
|
|
17147
17269
|
"aria-label": removeLabel,
|
|
17148
|
-
children: /* @__PURE__ */
|
|
17270
|
+
children: /* @__PURE__ */ jsx57(X8, { size: 11 })
|
|
17149
17271
|
}
|
|
17150
17272
|
)
|
|
17151
17273
|
]
|
|
@@ -17159,7 +17281,7 @@ function ComposerCapabilityToken({
|
|
|
17159
17281
|
part
|
|
17160
17282
|
}) {
|
|
17161
17283
|
const color = getRuntimeCapabilityColor(part.capability);
|
|
17162
|
-
return /* @__PURE__ */
|
|
17284
|
+
return /* @__PURE__ */ jsxs39(
|
|
17163
17285
|
"span",
|
|
17164
17286
|
{
|
|
17165
17287
|
"data-composer-capability-key": part.key,
|
|
@@ -17169,8 +17291,8 @@ function ComposerCapabilityToken({
|
|
|
17169
17291
|
className: "mx-0.5 inline-flex max-w-[14rem] select-none items-center gap-1 text-sm font-semibold text-primary align-baseline",
|
|
17170
17292
|
style: color ? { color } : void 0,
|
|
17171
17293
|
children: [
|
|
17172
|
-
/* @__PURE__ */
|
|
17173
|
-
/* @__PURE__ */
|
|
17294
|
+
/* @__PURE__ */ jsx57(RuntimeCapabilityIcon, { option: part.capability, variant: "chip" }),
|
|
17295
|
+
/* @__PURE__ */ jsx57("span", { className: "truncate", children: part.capability.label })
|
|
17174
17296
|
]
|
|
17175
17297
|
},
|
|
17176
17298
|
part.key
|
|
@@ -17430,30 +17552,30 @@ function buildMessageNavigationItems(messages, options) {
|
|
|
17430
17552
|
}
|
|
17431
17553
|
|
|
17432
17554
|
// src/hooks/useTaskSummary.ts
|
|
17433
|
-
import * as
|
|
17555
|
+
import * as React53 from "react";
|
|
17434
17556
|
function useTaskSummary({
|
|
17435
17557
|
enabled,
|
|
17436
17558
|
conversationId,
|
|
17437
17559
|
client,
|
|
17438
17560
|
live
|
|
17439
17561
|
}) {
|
|
17440
|
-
const [loaded, setLoaded] =
|
|
17441
|
-
const [historySections, setHistorySections] =
|
|
17442
|
-
const [historySectionsConversationId, setHistorySectionsConversationId] =
|
|
17443
|
-
const [loadingSections, setLoadingSections] =
|
|
17444
|
-
const [error, setError] =
|
|
17445
|
-
const [retryVersion, setRetryVersion] =
|
|
17446
|
-
const requestVersionRef =
|
|
17447
|
-
const conversationIdRef =
|
|
17448
|
-
const sectionControllersRef =
|
|
17562
|
+
const [loaded, setLoaded] = React53.useState(null);
|
|
17563
|
+
const [historySections, setHistorySections] = React53.useState({});
|
|
17564
|
+
const [historySectionsConversationId, setHistorySectionsConversationId] = React53.useState(null);
|
|
17565
|
+
const [loadingSections, setLoadingSections] = React53.useState({});
|
|
17566
|
+
const [error, setError] = React53.useState(null);
|
|
17567
|
+
const [retryVersion, setRetryVersion] = React53.useState(0);
|
|
17568
|
+
const requestVersionRef = React53.useRef(0);
|
|
17569
|
+
const conversationIdRef = React53.useRef(conversationId);
|
|
17570
|
+
const sectionControllersRef = React53.useRef(
|
|
17449
17571
|
/* @__PURE__ */ new Map()
|
|
17450
17572
|
);
|
|
17451
17573
|
conversationIdRef.current = conversationId;
|
|
17452
|
-
const abortSectionRequests =
|
|
17574
|
+
const abortSectionRequests = React53.useCallback(() => {
|
|
17453
17575
|
sectionControllersRef.current.forEach((controller) => controller.abort());
|
|
17454
17576
|
sectionControllersRef.current.clear();
|
|
17455
17577
|
}, []);
|
|
17456
|
-
|
|
17578
|
+
React53.useEffect(() => {
|
|
17457
17579
|
abortSectionRequests();
|
|
17458
17580
|
setHistorySections({});
|
|
17459
17581
|
setHistorySectionsConversationId(conversationId);
|
|
@@ -17482,11 +17604,11 @@ function useTaskSummary({
|
|
|
17482
17604
|
};
|
|
17483
17605
|
}, [abortSectionRequests, client, conversationId, enabled, retryVersion]);
|
|
17484
17606
|
const snapshot = loaded?.conversationId === conversationId ? loaded.snapshot : null;
|
|
17485
|
-
const activeHistorySections =
|
|
17607
|
+
const activeHistorySections = React53.useMemo(
|
|
17486
17608
|
() => historySectionsConversationId === conversationId ? historySections : {},
|
|
17487
17609
|
[conversationId, historySections, historySectionsConversationId]
|
|
17488
17610
|
);
|
|
17489
|
-
const loadSection =
|
|
17611
|
+
const loadSection = React53.useCallback(
|
|
17490
17612
|
async (section) => {
|
|
17491
17613
|
if (!enabled || !conversationId || loadingSections[section]) {
|
|
17492
17614
|
return;
|
|
@@ -17546,7 +17668,7 @@ function useTaskSummary({
|
|
|
17546
17668
|
}
|
|
17547
17669
|
|
|
17548
17670
|
// src/components/task-summary/TaskSummary.tsx
|
|
17549
|
-
import * as
|
|
17671
|
+
import * as React54 from "react";
|
|
17550
17672
|
import {
|
|
17551
17673
|
Bot as Bot4,
|
|
17552
17674
|
BookOpen as BookOpen3,
|
|
@@ -17555,12 +17677,12 @@ import {
|
|
|
17555
17677
|
ExternalLink,
|
|
17556
17678
|
FileOutput,
|
|
17557
17679
|
ListChecks as ListChecks3,
|
|
17558
|
-
Loader2 as
|
|
17680
|
+
Loader2 as Loader210,
|
|
17559
17681
|
PlayCircle,
|
|
17560
|
-
RotateCcw,
|
|
17682
|
+
RotateCcw as RotateCcw2,
|
|
17561
17683
|
Target as Target2
|
|
17562
17684
|
} from "lucide-react";
|
|
17563
|
-
import { jsx as
|
|
17685
|
+
import { jsx as jsx58, jsxs as jsxs40 } from "react/jsx-runtime";
|
|
17564
17686
|
var PREVIEW_SIZE = 3;
|
|
17565
17687
|
function TaskSummaryTrigger({
|
|
17566
17688
|
displayMode = "popover",
|
|
@@ -17569,9 +17691,9 @@ function TaskSummaryTrigger({
|
|
|
17569
17691
|
...props
|
|
17570
17692
|
}) {
|
|
17571
17693
|
const { t } = useChatkitTranslation();
|
|
17572
|
-
const [uncontrolledOpen, setUncontrolledOpen] =
|
|
17694
|
+
const [uncontrolledOpen, setUncontrolledOpen] = React54.useState(false);
|
|
17573
17695
|
const open = controlledOpen ?? uncontrolledOpen;
|
|
17574
|
-
const setOpen =
|
|
17696
|
+
const setOpen = React54.useCallback(
|
|
17575
17697
|
(nextOpen) => {
|
|
17576
17698
|
if (controlledOpen === void 0) {
|
|
17577
17699
|
setUncontrolledOpen(nextOpen);
|
|
@@ -17580,7 +17702,7 @@ function TaskSummaryTrigger({
|
|
|
17580
17702
|
},
|
|
17581
17703
|
[controlledOpen, onOpenChange]
|
|
17582
17704
|
);
|
|
17583
|
-
const triggerButton = /* @__PURE__ */
|
|
17705
|
+
const triggerButton = /* @__PURE__ */ jsx58(
|
|
17584
17706
|
"button",
|
|
17585
17707
|
{
|
|
17586
17708
|
type: "button",
|
|
@@ -17588,28 +17710,28 @@ function TaskSummaryTrigger({
|
|
|
17588
17710
|
"aria-label": t("taskSummary.open"),
|
|
17589
17711
|
"aria-expanded": open,
|
|
17590
17712
|
onClick: displayMode === "docked" ? () => setOpen(!open) : void 0,
|
|
17591
|
-
children: /* @__PURE__ */
|
|
17713
|
+
children: /* @__PURE__ */ jsx58(ListChecks3, { size: 16 })
|
|
17592
17714
|
}
|
|
17593
17715
|
);
|
|
17594
17716
|
if (displayMode === "docked") {
|
|
17595
|
-
return /* @__PURE__ */
|
|
17596
|
-
/* @__PURE__ */
|
|
17597
|
-
/* @__PURE__ */
|
|
17717
|
+
return /* @__PURE__ */ jsxs40(Tooltip, { children: [
|
|
17718
|
+
/* @__PURE__ */ jsx58(TooltipTrigger, { asChild: true, children: triggerButton }),
|
|
17719
|
+
/* @__PURE__ */ jsx58(TooltipContent, { side: "bottom", children: t("taskSummary.open") })
|
|
17598
17720
|
] });
|
|
17599
17721
|
}
|
|
17600
|
-
return /* @__PURE__ */
|
|
17601
|
-
/* @__PURE__ */
|
|
17602
|
-
/* @__PURE__ */
|
|
17603
|
-
/* @__PURE__ */
|
|
17722
|
+
return /* @__PURE__ */ jsxs40(Popover, { open, onOpenChange: setOpen, children: [
|
|
17723
|
+
/* @__PURE__ */ jsxs40(Tooltip, { children: [
|
|
17724
|
+
/* @__PURE__ */ jsx58(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx58(PopoverTrigger, { asChild: true, children: triggerButton }) }),
|
|
17725
|
+
/* @__PURE__ */ jsx58(TooltipContent, { side: "bottom", children: t("taskSummary.open") })
|
|
17604
17726
|
] }),
|
|
17605
|
-
/* @__PURE__ */
|
|
17727
|
+
/* @__PURE__ */ jsx58(
|
|
17606
17728
|
PopoverContent,
|
|
17607
17729
|
{
|
|
17608
17730
|
align: "end",
|
|
17609
17731
|
sideOffset: 8,
|
|
17610
17732
|
className: "w-[min(20rem,calc(100vw-2rem))] max-h-[min(44rem,calc(100vh-5rem))] overflow-y-auto rounded-2xl border-border/70 bg-popover p-0 shadow-lg",
|
|
17611
17733
|
"aria-label": t("taskSummary.title"),
|
|
17612
|
-
children: /* @__PURE__ */
|
|
17734
|
+
children: /* @__PURE__ */ jsx58(TaskSummaryContent, { ...props })
|
|
17613
17735
|
}
|
|
17614
17736
|
)
|
|
17615
17737
|
] });
|
|
@@ -17619,7 +17741,7 @@ function TaskSummaryPanel({
|
|
|
17619
17741
|
...props
|
|
17620
17742
|
}) {
|
|
17621
17743
|
const { t } = useChatkitTranslation();
|
|
17622
|
-
return /* @__PURE__ */
|
|
17744
|
+
return /* @__PURE__ */ jsx58(
|
|
17623
17745
|
"aside",
|
|
17624
17746
|
{
|
|
17625
17747
|
"data-slot": "task-summary-panel",
|
|
@@ -17628,7 +17750,7 @@ function TaskSummaryPanel({
|
|
|
17628
17750
|
"h-fit max-h-full overflow-y-auto rounded-2xl border border-border/70 bg-popover text-popover-foreground shadow-lg",
|
|
17629
17751
|
className
|
|
17630
17752
|
),
|
|
17631
|
-
children: /* @__PURE__ */
|
|
17753
|
+
children: /* @__PURE__ */ jsx58(TaskSummaryContent, { ...props })
|
|
17632
17754
|
}
|
|
17633
17755
|
);
|
|
17634
17756
|
}
|
|
@@ -17644,7 +17766,7 @@ function TaskSummaryContent({
|
|
|
17644
17766
|
onOpenResource
|
|
17645
17767
|
}) {
|
|
17646
17768
|
const { t } = useChatkitTranslation();
|
|
17647
|
-
const [expanded, setExpanded] =
|
|
17769
|
+
const [expanded, setExpanded] = React54.useState({});
|
|
17648
17770
|
const hasTask = Boolean(
|
|
17649
17771
|
summary.goal || summary.plan || summary.todos?.items.length
|
|
17650
17772
|
);
|
|
@@ -17676,7 +17798,7 @@ function TaskSummaryContent({
|
|
|
17676
17798
|
if (total2 <= PREVIEW_SIZE && !expanded[section]) return null;
|
|
17677
17799
|
const loading = loadingSections[section];
|
|
17678
17800
|
const canLoadMore = Boolean(expanded[section]) && loadedSectionCounts[section] < total2;
|
|
17679
|
-
return /* @__PURE__ */
|
|
17801
|
+
return /* @__PURE__ */ jsxs40(
|
|
17680
17802
|
"button",
|
|
17681
17803
|
{
|
|
17682
17804
|
type: "button",
|
|
@@ -17684,41 +17806,41 @@ function TaskSummaryContent({
|
|
|
17684
17806
|
disabled: loading,
|
|
17685
17807
|
onClick: () => canLoadMore ? void onLoadSection(section) : toggleSection(section),
|
|
17686
17808
|
children: [
|
|
17687
|
-
loading && /* @__PURE__ */
|
|
17688
|
-
!loading && /* @__PURE__ */
|
|
17809
|
+
loading && /* @__PURE__ */ jsx58(Loader210, { className: "size-3 animate-spin" }),
|
|
17810
|
+
!loading && /* @__PURE__ */ jsx58(ListChecks3, { className: "size-3.5" }),
|
|
17689
17811
|
canLoadMore ? t("taskSummary.loadMore") : expanded[section] ? t("taskSummary.collapse") : t("taskSummary.viewAll", { count: total2 })
|
|
17690
17812
|
]
|
|
17691
17813
|
}
|
|
17692
17814
|
);
|
|
17693
17815
|
};
|
|
17694
|
-
return /* @__PURE__ */
|
|
17695
|
-
Boolean(historyError) && /* @__PURE__ */
|
|
17696
|
-
/* @__PURE__ */
|
|
17697
|
-
/* @__PURE__ */
|
|
17816
|
+
return /* @__PURE__ */ jsxs40("div", { className: "divide-y divide-border/70", children: [
|
|
17817
|
+
Boolean(historyError) && /* @__PURE__ */ jsxs40("div", { className: "m-3 flex items-start justify-between gap-3 rounded-lg border border-destructive/30 bg-destructive/5 px-3 py-2 text-xs text-destructive", children: [
|
|
17818
|
+
/* @__PURE__ */ jsx58("span", { children: t("taskSummary.historyError") }),
|
|
17819
|
+
/* @__PURE__ */ jsxs40(
|
|
17698
17820
|
"button",
|
|
17699
17821
|
{
|
|
17700
17822
|
type: "button",
|
|
17701
17823
|
className: "inline-flex shrink-0 items-center gap-1 font-medium hover:underline",
|
|
17702
17824
|
onClick: onRetryHistory,
|
|
17703
17825
|
children: [
|
|
17704
|
-
/* @__PURE__ */
|
|
17826
|
+
/* @__PURE__ */ jsx58(RotateCcw2, { className: "size-3" }),
|
|
17705
17827
|
t("taskSummary.retry")
|
|
17706
17828
|
]
|
|
17707
17829
|
}
|
|
17708
17830
|
)
|
|
17709
17831
|
] }),
|
|
17710
|
-
/* @__PURE__ */
|
|
17832
|
+
/* @__PURE__ */ jsxs40(
|
|
17711
17833
|
SummarySection,
|
|
17712
17834
|
{
|
|
17713
17835
|
title: t("taskSummary.sections.outputs"),
|
|
17714
17836
|
children: [
|
|
17715
|
-
summary.outputs.length === 0 ? /* @__PURE__ */
|
|
17837
|
+
summary.outputs.length === 0 ? /* @__PURE__ */ jsx58(SummaryPrompt, { onClick: onFocusComposer, children: t("taskSummary.createOutput") }) : sectionItems("outputs", summary.outputs).map((item) => /* @__PURE__ */ jsx58(
|
|
17716
17838
|
SummaryButton,
|
|
17717
17839
|
{
|
|
17718
17840
|
title: item.title,
|
|
17719
17841
|
description: item.description ?? item.status,
|
|
17720
|
-
leading: /* @__PURE__ */
|
|
17721
|
-
trailing: item.resource && item.resource.type !== "message" ? /* @__PURE__ */
|
|
17842
|
+
leading: /* @__PURE__ */ jsx58(FileOutput, { className: "size-4" }),
|
|
17843
|
+
trailing: item.resource && item.resource.type !== "message" ? /* @__PURE__ */ jsx58(ExternalLink, { className: "size-3.5" }) : void 0,
|
|
17722
17844
|
onClick: () => openSummaryItem(item.resource, item.messageId, item.title)
|
|
17723
17845
|
},
|
|
17724
17846
|
item.id
|
|
@@ -17727,18 +17849,18 @@ function TaskSummaryContent({
|
|
|
17727
17849
|
]
|
|
17728
17850
|
}
|
|
17729
17851
|
),
|
|
17730
|
-
/* @__PURE__ */
|
|
17852
|
+
/* @__PURE__ */ jsxs40(
|
|
17731
17853
|
SummarySection,
|
|
17732
17854
|
{
|
|
17733
17855
|
title: t("taskSummary.sections.sources"),
|
|
17734
17856
|
children: [
|
|
17735
|
-
sectionItems("sources", summary.sources).map((item) => /* @__PURE__ */
|
|
17857
|
+
sectionItems("sources", summary.sources).map((item) => /* @__PURE__ */ jsx58(
|
|
17736
17858
|
SummaryButton,
|
|
17737
17859
|
{
|
|
17738
17860
|
title: item.title,
|
|
17739
17861
|
description: item.description,
|
|
17740
|
-
leading: /* @__PURE__ */
|
|
17741
|
-
trailing: item.resource && item.resource.type !== "message" ? /* @__PURE__ */
|
|
17862
|
+
leading: /* @__PURE__ */ jsx58(BookOpen3, { className: "size-4" }),
|
|
17863
|
+
trailing: item.resource && item.resource.type !== "message" ? /* @__PURE__ */ jsx58(ExternalLink, { className: "size-3.5" }) : void 0,
|
|
17742
17864
|
onClick: () => openSummaryItem(item.resource, item.messageId, item.title)
|
|
17743
17865
|
},
|
|
17744
17866
|
item.id
|
|
@@ -17747,67 +17869,67 @@ function TaskSummaryContent({
|
|
|
17747
17869
|
]
|
|
17748
17870
|
}
|
|
17749
17871
|
),
|
|
17750
|
-
hasTask && /* @__PURE__ */
|
|
17751
|
-
summary.goal && /* @__PURE__ */
|
|
17872
|
+
hasTask && /* @__PURE__ */ jsxs40(SummarySection, { title: t("taskSummary.sections.task"), children: [
|
|
17873
|
+
summary.goal && /* @__PURE__ */ jsx58(
|
|
17752
17874
|
SummaryButton,
|
|
17753
17875
|
{
|
|
17754
17876
|
title: summary.goal.objective,
|
|
17755
17877
|
description: summary.goal.status,
|
|
17756
|
-
leading: /* @__PURE__ */
|
|
17878
|
+
leading: /* @__PURE__ */ jsx58(Target2, { className: "size-4" }),
|
|
17757
17879
|
onClick: onFocusComposer
|
|
17758
17880
|
}
|
|
17759
17881
|
),
|
|
17760
|
-
summary.plan && /* @__PURE__ */
|
|
17882
|
+
summary.plan && /* @__PURE__ */ jsx58(
|
|
17761
17883
|
SummaryButton,
|
|
17762
17884
|
{
|
|
17763
17885
|
title: summary.plan.title,
|
|
17764
17886
|
description: summary.plan.excerpt,
|
|
17765
|
-
leading: /* @__PURE__ */
|
|
17887
|
+
leading: /* @__PURE__ */ jsx58(ListChecks3, { className: "size-4" }),
|
|
17766
17888
|
onClick: () => summary.plan?.messageId ? onNavigateMessage(summary.plan.messageId) : onFocusComposer()
|
|
17767
17889
|
}
|
|
17768
17890
|
),
|
|
17769
|
-
(summary.todos?.items ?? []).slice(0, PREVIEW_SIZE).map((todo) => /* @__PURE__ */
|
|
17891
|
+
(summary.todos?.items ?? []).slice(0, PREVIEW_SIZE).map((todo) => /* @__PURE__ */ jsx58(
|
|
17770
17892
|
SummaryButton,
|
|
17771
17893
|
{
|
|
17772
17894
|
title: todo.content,
|
|
17773
17895
|
description: t(`taskSummary.status.${todo.status}`),
|
|
17774
|
-
leading: todo.status === "completed" ? /* @__PURE__ */
|
|
17896
|
+
leading: todo.status === "completed" ? /* @__PURE__ */ jsx58(CheckCircle25, { className: "size-4 text-muted-foreground" }) : /* @__PURE__ */ jsx58(CircleEllipsis, { className: "size-4 text-muted-foreground" }),
|
|
17775
17897
|
onClick: () => summary.todos?.messageId ? onNavigateMessage(summary.todos.messageId) : onFocusComposer()
|
|
17776
17898
|
},
|
|
17777
17899
|
todo.id
|
|
17778
17900
|
))
|
|
17779
17901
|
] }),
|
|
17780
|
-
summary.running.length > 0 && /* @__PURE__ */
|
|
17902
|
+
summary.running.length > 0 && /* @__PURE__ */ jsx58(SummarySection, { title: t("taskSummary.sections.running"), children: summary.running.slice(0, PREVIEW_SIZE).map((item) => /* @__PURE__ */ jsx58(
|
|
17781
17903
|
SummaryButton,
|
|
17782
17904
|
{
|
|
17783
17905
|
title: item.title,
|
|
17784
17906
|
description: item.description ?? item.status,
|
|
17785
|
-
leading: /* @__PURE__ */
|
|
17786
|
-
trailing: item.resource ? /* @__PURE__ */
|
|
17907
|
+
leading: /* @__PURE__ */ jsx58(PlayCircle, { className: "size-4" }),
|
|
17908
|
+
trailing: item.resource ? /* @__PURE__ */ jsx58(ExternalLink, { className: "size-3.5" }) : void 0,
|
|
17787
17909
|
onClick: () => item.resource && onOpenResource(item.resource, void 0, item.title)
|
|
17788
17910
|
},
|
|
17789
17911
|
item.id
|
|
17790
17912
|
)) }),
|
|
17791
|
-
summary.agents.length > 0 && /* @__PURE__ */
|
|
17792
|
-
sectionItems("agents", summary.agents).map((item) => /* @__PURE__ */
|
|
17913
|
+
summary.agents.length > 0 && /* @__PURE__ */ jsxs40(SummarySection, { title: t("taskSummary.sections.agents"), children: [
|
|
17914
|
+
sectionItems("agents", summary.agents).map((item) => /* @__PURE__ */ jsx58(
|
|
17793
17915
|
SummaryButton,
|
|
17794
17916
|
{
|
|
17795
17917
|
title: item.title,
|
|
17796
17918
|
description: [item.status, formatElapsed(item.elapsedTime)].filter(Boolean).join(" \xB7 "),
|
|
17797
|
-
leading: /* @__PURE__ */
|
|
17919
|
+
leading: /* @__PURE__ */ jsx58(Bot4, { className: "size-4" }),
|
|
17798
17920
|
onClick: () => item.messageId ? onNavigateMessage(item.messageId) : onFocusComposer()
|
|
17799
17921
|
},
|
|
17800
17922
|
item.id
|
|
17801
17923
|
)),
|
|
17802
17924
|
sectionAction("agents", summary.totals.agents)
|
|
17803
17925
|
] }),
|
|
17804
|
-
summary.pending.length > 0 && /* @__PURE__ */
|
|
17805
|
-
sectionItems("pending", summary.pending).map((item) => /* @__PURE__ */
|
|
17926
|
+
summary.pending.length > 0 && /* @__PURE__ */ jsxs40(SummarySection, { title: t("taskSummary.sections.pending"), children: [
|
|
17927
|
+
sectionItems("pending", summary.pending).map((item) => /* @__PURE__ */ jsx58(
|
|
17806
17928
|
SummaryButton,
|
|
17807
17929
|
{
|
|
17808
17930
|
title: item.title,
|
|
17809
17931
|
description: item.description,
|
|
17810
|
-
leading: /* @__PURE__ */
|
|
17932
|
+
leading: /* @__PURE__ */ jsx58(CircleEllipsis, { className: "size-4" }),
|
|
17811
17933
|
onClick: () => item.messageId ? onNavigateMessage(item.messageId) : onFocusComposer()
|
|
17812
17934
|
},
|
|
17813
17935
|
item.id
|
|
@@ -17820,16 +17942,16 @@ function SummarySection({
|
|
|
17820
17942
|
title,
|
|
17821
17943
|
children
|
|
17822
17944
|
}) {
|
|
17823
|
-
return /* @__PURE__ */
|
|
17824
|
-
/* @__PURE__ */
|
|
17825
|
-
/* @__PURE__ */
|
|
17945
|
+
return /* @__PURE__ */ jsxs40("section", { "aria-label": title, className: "px-4 py-3", children: [
|
|
17946
|
+
/* @__PURE__ */ jsx58("div", { className: "flex min-h-7 items-center justify-between gap-3", children: /* @__PURE__ */ jsx58("h3", { className: "text-sm font-medium text-muted-foreground", children: title }) }),
|
|
17947
|
+
/* @__PURE__ */ jsx58("div", { className: "mt-1 space-y-0.5", children })
|
|
17826
17948
|
] });
|
|
17827
17949
|
}
|
|
17828
17950
|
function SummaryPrompt({
|
|
17829
17951
|
children,
|
|
17830
17952
|
onClick
|
|
17831
17953
|
}) {
|
|
17832
|
-
return /* @__PURE__ */
|
|
17954
|
+
return /* @__PURE__ */ jsx58(
|
|
17833
17955
|
"button",
|
|
17834
17956
|
{
|
|
17835
17957
|
type: "button",
|
|
@@ -17846,7 +17968,7 @@ function SummaryButton({
|
|
|
17846
17968
|
trailing,
|
|
17847
17969
|
onClick
|
|
17848
17970
|
}) {
|
|
17849
|
-
return /* @__PURE__ */
|
|
17971
|
+
return /* @__PURE__ */ jsxs40(
|
|
17850
17972
|
"button",
|
|
17851
17973
|
{
|
|
17852
17974
|
type: "button",
|
|
@@ -17858,12 +17980,12 @@ function SummaryButton({
|
|
|
17858
17980
|
!onClick && "cursor-default"
|
|
17859
17981
|
),
|
|
17860
17982
|
children: [
|
|
17861
|
-
leading && /* @__PURE__ */
|
|
17862
|
-
/* @__PURE__ */
|
|
17863
|
-
/* @__PURE__ */
|
|
17864
|
-
description && /* @__PURE__ */
|
|
17983
|
+
leading && /* @__PURE__ */ jsx58("span", { className: "mt-0.5 shrink-0 text-muted-foreground", children: leading }),
|
|
17984
|
+
/* @__PURE__ */ jsxs40("span", { className: "min-w-0 flex-1", children: [
|
|
17985
|
+
/* @__PURE__ */ jsx58("span", { className: "block truncate text-sm font-medium leading-5 text-foreground", children: title }),
|
|
17986
|
+
description && /* @__PURE__ */ jsx58("span", { className: "mt-0.5 block line-clamp-2 text-xs text-muted-foreground", children: description })
|
|
17865
17987
|
] }),
|
|
17866
|
-
trailing && /* @__PURE__ */
|
|
17988
|
+
trailing && /* @__PURE__ */ jsx58("span", { className: "mt-0.5 text-muted-foreground", children: trailing })
|
|
17867
17989
|
]
|
|
17868
17990
|
}
|
|
17869
17991
|
);
|
|
@@ -17875,7 +17997,7 @@ function formatElapsed(value) {
|
|
|
17875
17997
|
}
|
|
17876
17998
|
|
|
17877
17999
|
// src/components/chat.tsx
|
|
17878
|
-
import { Fragment as
|
|
18000
|
+
import { Fragment as Fragment10, jsx as jsx59, jsxs as jsxs41 } from "react/jsx-runtime";
|
|
17879
18001
|
var defaultApiUrl2 = import.meta.env.VITE_XPERTAI_API_URL;
|
|
17880
18002
|
var COMPOSER_INPUT_MAX_HEIGHT = 128;
|
|
17881
18003
|
var LONG_TEXT_REFERENCE_THRESHOLD = 5e3;
|
|
@@ -17982,7 +18104,7 @@ function ReferenceChip({
|
|
|
17982
18104
|
const metaLine = getReferenceMetaLine(reference);
|
|
17983
18105
|
const isComposer = variant === "composer";
|
|
17984
18106
|
const Icon = reference.type === "quote" ? Quote : reference.type === "image" ? ImageIcon : FileText5;
|
|
17985
|
-
return /* @__PURE__ */
|
|
18107
|
+
return /* @__PURE__ */ jsxs41(
|
|
17986
18108
|
"div",
|
|
17987
18109
|
{
|
|
17988
18110
|
className: cn(
|
|
@@ -17991,7 +18113,7 @@ function ReferenceChip({
|
|
|
17991
18113
|
),
|
|
17992
18114
|
title: getReferenceTitle(reference),
|
|
17993
18115
|
children: [
|
|
17994
|
-
/* @__PURE__ */
|
|
18116
|
+
/* @__PURE__ */ jsx59(
|
|
17995
18117
|
Icon,
|
|
17996
18118
|
{
|
|
17997
18119
|
size: isComposer ? 14 : 12,
|
|
@@ -18001,8 +18123,8 @@ function ReferenceChip({
|
|
|
18001
18123
|
)
|
|
18002
18124
|
}
|
|
18003
18125
|
),
|
|
18004
|
-
/* @__PURE__ */
|
|
18005
|
-
/* @__PURE__ */
|
|
18126
|
+
/* @__PURE__ */ jsxs41("div", { className: "min-w-0 flex-1", children: [
|
|
18127
|
+
/* @__PURE__ */ jsx59(
|
|
18006
18128
|
"div",
|
|
18007
18129
|
{
|
|
18008
18130
|
className: cn(
|
|
@@ -18012,7 +18134,7 @@ function ReferenceChip({
|
|
|
18012
18134
|
children: getReferenceLabel(reference)
|
|
18013
18135
|
}
|
|
18014
18136
|
),
|
|
18015
|
-
metaLine && /* @__PURE__ */
|
|
18137
|
+
metaLine && /* @__PURE__ */ jsx59(
|
|
18016
18138
|
"div",
|
|
18017
18139
|
{
|
|
18018
18140
|
className: cn(
|
|
@@ -18023,7 +18145,7 @@ function ReferenceChip({
|
|
|
18023
18145
|
}
|
|
18024
18146
|
)
|
|
18025
18147
|
] }),
|
|
18026
|
-
onRemove && removeLabel && /* @__PURE__ */
|
|
18148
|
+
onRemove && removeLabel && /* @__PURE__ */ jsx59(
|
|
18027
18149
|
"button",
|
|
18028
18150
|
{
|
|
18029
18151
|
type: "button",
|
|
@@ -18034,7 +18156,7 @@ function ReferenceChip({
|
|
|
18034
18156
|
),
|
|
18035
18157
|
title: removeLabel,
|
|
18036
18158
|
"aria-label": removeLabel,
|
|
18037
|
-
children: /* @__PURE__ */
|
|
18159
|
+
children: /* @__PURE__ */ jsx59(X9, { size: 12 })
|
|
18038
18160
|
}
|
|
18039
18161
|
)
|
|
18040
18162
|
]
|
|
@@ -18065,7 +18187,7 @@ function Chat({
|
|
|
18065
18187
|
clientSecret: effectiveClientSecret
|
|
18066
18188
|
});
|
|
18067
18189
|
const missingConfig = Boolean(missingConfigKind);
|
|
18068
|
-
const missingConfigShortMessage =
|
|
18190
|
+
const missingConfigShortMessage = React55.useMemo(() => {
|
|
18069
18191
|
switch (missingConfigKind) {
|
|
18070
18192
|
case "apiUrl":
|
|
18071
18193
|
return t("chat.missingApiUrlShort");
|
|
@@ -18077,7 +18199,7 @@ function Chat({
|
|
|
18077
18199
|
return t("chat.missingConfigShort");
|
|
18078
18200
|
}
|
|
18079
18201
|
}, [missingConfigKind, t]);
|
|
18080
|
-
const missingConfigDetailMessage =
|
|
18202
|
+
const missingConfigDetailMessage = React55.useMemo(() => {
|
|
18081
18203
|
switch (missingConfigKind) {
|
|
18082
18204
|
case "apiUrl":
|
|
18083
18205
|
return t("chat.missingApiUrlDetail");
|
|
@@ -18089,26 +18211,26 @@ function Chat({
|
|
|
18089
18211
|
return t("chat.missingConfigDetail");
|
|
18090
18212
|
}
|
|
18091
18213
|
}, [missingConfigKind, t]);
|
|
18092
|
-
const [isHistoryLoading, setIsHistoryLoading] =
|
|
18093
|
-
const [historyError, setHistoryError] =
|
|
18094
|
-
const [assistantName, setAssistantName] =
|
|
18095
|
-
const [assistantAvatar, setAssistantAvatar] =
|
|
18096
|
-
const [threadGoal, setThreadGoal] =
|
|
18097
|
-
const [goalError, setGoalError] =
|
|
18098
|
-
const [isGoalLoading, setIsGoalLoading] =
|
|
18099
|
-
const [isGoalPanelOpen, setIsGoalPanelOpen] =
|
|
18100
|
-
const [isGoalObjectiveExpanded, setIsGoalObjectiveExpanded] =
|
|
18101
|
-
const [goalElapsedStartedAt, setGoalElapsedStartedAt] =
|
|
18214
|
+
const [isHistoryLoading, setIsHistoryLoading] = React55.useState(false);
|
|
18215
|
+
const [historyError, setHistoryError] = React55.useState(null);
|
|
18216
|
+
const [assistantName, setAssistantName] = React55.useState(null);
|
|
18217
|
+
const [assistantAvatar, setAssistantAvatar] = React55.useState(null);
|
|
18218
|
+
const [threadGoal, setThreadGoal] = React55.useState(null);
|
|
18219
|
+
const [goalError, setGoalError] = React55.useState(null);
|
|
18220
|
+
const [isGoalLoading, setIsGoalLoading] = React55.useState(false);
|
|
18221
|
+
const [isGoalPanelOpen, setIsGoalPanelOpen] = React55.useState(false);
|
|
18222
|
+
const [isGoalObjectiveExpanded, setIsGoalObjectiveExpanded] = React55.useState(false);
|
|
18223
|
+
const [goalElapsedStartedAt, setGoalElapsedStartedAt] = React55.useState(null);
|
|
18102
18224
|
const LOADING_DOTS_MIN_DURATION = 800;
|
|
18103
18225
|
const STREAMING_STATUS_REFRESH_MS = 250;
|
|
18104
|
-
const [showLoadingDots, setShowLoadingDots] =
|
|
18105
|
-
const [streamingNow, setStreamingNow] =
|
|
18106
|
-
const loadingStartTimeRef =
|
|
18107
|
-
const lastStreamOutputAtRef =
|
|
18108
|
-
|
|
18226
|
+
const [showLoadingDots, setShowLoadingDots] = React55.useState(false);
|
|
18227
|
+
const [streamingNow, setStreamingNow] = React55.useState(() => Date.now());
|
|
18228
|
+
const loadingStartTimeRef = React55.useRef(null);
|
|
18229
|
+
const lastStreamOutputAtRef = React55.useRef(null);
|
|
18230
|
+
React55.useEffect(() => {
|
|
18109
18231
|
setStream(stream);
|
|
18110
18232
|
}, [setStream, stream]);
|
|
18111
|
-
|
|
18233
|
+
React55.useEffect(() => {
|
|
18112
18234
|
if (stream.isLoading) {
|
|
18113
18235
|
if (!loadingStartTimeRef.current) {
|
|
18114
18236
|
loadingStartTimeRef.current = Date.now();
|
|
@@ -18131,7 +18253,7 @@ function Chat({
|
|
|
18131
18253
|
}
|
|
18132
18254
|
}
|
|
18133
18255
|
}, [stream.isLoading]);
|
|
18134
|
-
|
|
18256
|
+
React55.useEffect(() => {
|
|
18135
18257
|
if (!stream.isLoading) {
|
|
18136
18258
|
lastStreamOutputAtRef.current = null;
|
|
18137
18259
|
setStreamingNow(Date.now());
|
|
@@ -18141,7 +18263,7 @@ function Chat({
|
|
|
18141
18263
|
lastStreamOutputAtRef.current = now;
|
|
18142
18264
|
setStreamingNow(now);
|
|
18143
18265
|
}, [stream.messages, stream.isLoading]);
|
|
18144
|
-
|
|
18266
|
+
React55.useEffect(() => {
|
|
18145
18267
|
if (!stream.isLoading) {
|
|
18146
18268
|
return;
|
|
18147
18269
|
}
|
|
@@ -18150,7 +18272,7 @@ function Chat({
|
|
|
18150
18272
|
}, STREAMING_STATUS_REFRESH_MS);
|
|
18151
18273
|
return () => window.clearInterval(timer);
|
|
18152
18274
|
}, [stream.isLoading]);
|
|
18153
|
-
|
|
18275
|
+
React55.useEffect(() => {
|
|
18154
18276
|
if (threadGoal?.status === "active" && stream.isLoading) {
|
|
18155
18277
|
setGoalElapsedStartedAt(Date.now());
|
|
18156
18278
|
return;
|
|
@@ -18162,55 +18284,55 @@ function Chat({
|
|
|
18162
18284
|
threadGoal?.id,
|
|
18163
18285
|
threadGoal?.status
|
|
18164
18286
|
]);
|
|
18165
|
-
|
|
18287
|
+
React55.useEffect(() => {
|
|
18166
18288
|
setIsGoalObjectiveExpanded(false);
|
|
18167
18289
|
}, [threadGoal?.id]);
|
|
18168
|
-
const [composerParts, setComposerParts] =
|
|
18169
|
-
const [renderedComposerParts, setRenderedComposerParts] =
|
|
18170
|
-
const [composerDomVersion, setComposerDomVersion] =
|
|
18171
|
-
const [selectedTool, setSelectedTool] =
|
|
18290
|
+
const [composerParts, setComposerParts] = React55.useState([]);
|
|
18291
|
+
const [renderedComposerParts, setRenderedComposerParts] = React55.useState([]);
|
|
18292
|
+
const [composerDomVersion, setComposerDomVersion] = React55.useState(0);
|
|
18293
|
+
const [selectedTool, setSelectedTool] = React55.useState(
|
|
18172
18294
|
null
|
|
18173
18295
|
);
|
|
18174
|
-
const [planModeEnabled, setPlanModeEnabled] =
|
|
18175
|
-
const [petSettingsOpen, setPetSettingsOpen] =
|
|
18176
|
-
const [petLocalSettings, setPetLocalSettings] =
|
|
18177
|
-
const [attachmentState, setAttachmentState] =
|
|
18296
|
+
const [planModeEnabled, setPlanModeEnabled] = React55.useState(false);
|
|
18297
|
+
const [petSettingsOpen, setPetSettingsOpen] = React55.useState(false);
|
|
18298
|
+
const [petLocalSettings, setPetLocalSettings] = React55.useState(() => readPetLocalSettings());
|
|
18299
|
+
const [attachmentState, setAttachmentState] = React55.useState({
|
|
18178
18300
|
uploadedFiles: [],
|
|
18179
18301
|
hasUploadingFiles: false,
|
|
18180
18302
|
hasParsingFiles: false
|
|
18181
18303
|
});
|
|
18182
|
-
const [references, setReferences] =
|
|
18183
|
-
const [isUploadingReferenceImages, setIsUploadingReferenceImages] =
|
|
18184
|
-
const [quoteSelection, setQuoteSelection] =
|
|
18185
|
-
const [isAtBottom, setIsAtBottom] =
|
|
18186
|
-
const [hasUpdatesBelow, setHasUpdatesBelow] =
|
|
18304
|
+
const [references, setReferences] = React55.useState([]);
|
|
18305
|
+
const [isUploadingReferenceImages, setIsUploadingReferenceImages] = React55.useState(false);
|
|
18306
|
+
const [quoteSelection, setQuoteSelection] = React55.useState(null);
|
|
18307
|
+
const [isAtBottom, setIsAtBottom] = React55.useState(true);
|
|
18308
|
+
const [hasUpdatesBelow, setHasUpdatesBelow] = React55.useState(false);
|
|
18187
18309
|
const {
|
|
18188
18310
|
threads,
|
|
18189
18311
|
deleteThread,
|
|
18190
18312
|
refreshThreads,
|
|
18191
18313
|
isLoading: isThreadsLoading
|
|
18192
18314
|
} = useThreads();
|
|
18193
|
-
const viewportRef =
|
|
18194
|
-
const chatColumnRef =
|
|
18195
|
-
const messageNavigationAnchorsRef =
|
|
18315
|
+
const viewportRef = React55.useRef(null);
|
|
18316
|
+
const chatColumnRef = React55.useRef(null);
|
|
18317
|
+
const messageNavigationAnchorsRef = React55.useRef(
|
|
18196
18318
|
/* @__PURE__ */ new Map()
|
|
18197
18319
|
);
|
|
18198
|
-
const attachmentsRef =
|
|
18199
|
-
const composerInputRef =
|
|
18200
|
-
const slashPaletteRef =
|
|
18201
|
-
const slashPaletteOptionRefs =
|
|
18320
|
+
const attachmentsRef = React55.useRef(null);
|
|
18321
|
+
const composerInputRef = React55.useRef(null);
|
|
18322
|
+
const slashPaletteRef = React55.useRef(null);
|
|
18323
|
+
const slashPaletteOptionRefs = React55.useRef(
|
|
18202
18324
|
[]
|
|
18203
18325
|
);
|
|
18204
|
-
const composerPartsRef =
|
|
18205
|
-
const pendingComposerCaretOffsetRef =
|
|
18206
|
-
const shouldAutoScrollRef =
|
|
18207
|
-
const forceFollowRef =
|
|
18208
|
-
const previousMessageCountRef =
|
|
18209
|
-
const previousScrollTopRef =
|
|
18210
|
-
const isPrependingHistoryMessagesRef =
|
|
18211
|
-
const autoScrollFrameRef =
|
|
18212
|
-
const isPointerDownRef =
|
|
18213
|
-
const lastTouchYRef =
|
|
18326
|
+
const composerPartsRef = React55.useRef([]);
|
|
18327
|
+
const pendingComposerCaretOffsetRef = React55.useRef(null);
|
|
18328
|
+
const shouldAutoScrollRef = React55.useRef(true);
|
|
18329
|
+
const forceFollowRef = React55.useRef(false);
|
|
18330
|
+
const previousMessageCountRef = React55.useRef(0);
|
|
18331
|
+
const previousScrollTopRef = React55.useRef(0);
|
|
18332
|
+
const isPrependingHistoryMessagesRef = React55.useRef(false);
|
|
18333
|
+
const autoScrollFrameRef = React55.useRef(null);
|
|
18334
|
+
const isPointerDownRef = React55.useRef(false);
|
|
18335
|
+
const lastTouchYRef = React55.useRef(null);
|
|
18214
18336
|
const {
|
|
18215
18337
|
runtimeCapabilities,
|
|
18216
18338
|
runtimeCapabilitiesReady,
|
|
@@ -18239,24 +18361,24 @@ function Chat({
|
|
|
18239
18361
|
const resolvedPlaceholder = placeholder ?? t("chat.placeholder");
|
|
18240
18362
|
const assistantTitle = assistantName || resolvedTitle;
|
|
18241
18363
|
const petRequired = options?.displayMode === "pet";
|
|
18242
|
-
const basePetSettings =
|
|
18364
|
+
const basePetSettings = React55.useMemo(
|
|
18243
18365
|
() => derivePetLocalSettings(options?.pet),
|
|
18244
18366
|
[options?.pet]
|
|
18245
18367
|
);
|
|
18246
|
-
const displayedPetSettings =
|
|
18368
|
+
const displayedPetSettings = React55.useMemo(
|
|
18247
18369
|
() => ({
|
|
18248
18370
|
...petLocalSettings ?? basePetSettings,
|
|
18249
18371
|
...petRequired ? { enabled: true } : {}
|
|
18250
18372
|
}),
|
|
18251
18373
|
[basePetSettings, petLocalSettings, petRequired]
|
|
18252
18374
|
);
|
|
18253
|
-
const effectivePet =
|
|
18375
|
+
const effectivePet = React55.useMemo(() => {
|
|
18254
18376
|
if (petRequired || petLocalSettings) {
|
|
18255
18377
|
return buildPetOptionsFromLocalSettings(displayedPetSettings);
|
|
18256
18378
|
}
|
|
18257
18379
|
return options?.pet ?? null;
|
|
18258
18380
|
}, [displayedPetSettings, options?.pet, petLocalSettings, petRequired]);
|
|
18259
|
-
const savePetLocalSettings =
|
|
18381
|
+
const savePetLocalSettings = React55.useCallback(
|
|
18260
18382
|
(settings) => {
|
|
18261
18383
|
const nextSettings = petRequired ? { ...settings, enabled: true } : settings;
|
|
18262
18384
|
setPetLocalSettings(nextSettings);
|
|
@@ -18264,7 +18386,7 @@ function Chat({
|
|
|
18264
18386
|
},
|
|
18265
18387
|
[petRequired]
|
|
18266
18388
|
);
|
|
18267
|
-
const handlePetCommand =
|
|
18389
|
+
const handlePetCommand = React55.useCallback(
|
|
18268
18390
|
(mode) => {
|
|
18269
18391
|
if (mode === "settings") {
|
|
18270
18392
|
setPetSettingsOpen(true);
|
|
@@ -18286,11 +18408,11 @@ function Chat({
|
|
|
18286
18408
|
[displayedPetSettings, effectivePet, petRequired, savePetLocalSettings]
|
|
18287
18409
|
);
|
|
18288
18410
|
const inputPlaceholder = selectedTool?.placeholderOverride ?? composer?.placeholder ?? resolvedPlaceholder;
|
|
18289
|
-
const messages =
|
|
18411
|
+
const messages = React55.useMemo(
|
|
18290
18412
|
() => stream.messages ?? [],
|
|
18291
18413
|
[stream.messages]
|
|
18292
18414
|
);
|
|
18293
|
-
const messageNavigationLabels =
|
|
18415
|
+
const messageNavigationLabels = React55.useMemo(
|
|
18294
18416
|
() => ({
|
|
18295
18417
|
user: t("chat.youLabel"),
|
|
18296
18418
|
assistant: assistantTitle,
|
|
@@ -18309,7 +18431,7 @@ function Chat({
|
|
|
18309
18431
|
}),
|
|
18310
18432
|
[assistantTitle, t]
|
|
18311
18433
|
);
|
|
18312
|
-
const messageNavigationItems =
|
|
18434
|
+
const messageNavigationItems = React55.useMemo(
|
|
18313
18435
|
() => messageNavigationEnabled ? buildMessageNavigationItems(
|
|
18314
18436
|
messages,
|
|
18315
18437
|
{
|
|
@@ -18332,7 +18454,7 @@ function Chat({
|
|
|
18332
18454
|
historyMessagePagination?.isLoadingMore
|
|
18333
18455
|
);
|
|
18334
18456
|
const canLoadMoreMessages = Boolean(historyMessagePagination?.hasMore);
|
|
18335
|
-
const draft =
|
|
18457
|
+
const draft = React55.useMemo(
|
|
18336
18458
|
() => getComposerPlainText(composerParts),
|
|
18337
18459
|
[composerParts]
|
|
18338
18460
|
);
|
|
@@ -18346,7 +18468,7 @@ function Chat({
|
|
|
18346
18468
|
isEmpty: isComposerInputEmpty,
|
|
18347
18469
|
isStacked: isComposerStacked
|
|
18348
18470
|
});
|
|
18349
|
-
const pendingFollowUps =
|
|
18471
|
+
const pendingFollowUps = React55.useMemo(
|
|
18350
18472
|
() => sortVisiblePendingFollowUps(stream.pendingFollowUps ?? []),
|
|
18351
18473
|
[stream.pendingFollowUps]
|
|
18352
18474
|
);
|
|
@@ -18355,7 +18477,7 @@ function Chat({
|
|
|
18355
18477
|
const hasPendingHITLRequest = Boolean(stream.pendingHITLRequest);
|
|
18356
18478
|
const hasPendingInteractiveRequest = hasPendingRequestUserInput || hasPendingHITLRequest;
|
|
18357
18479
|
const hasPendingTodos = Boolean(stream.todos?.items.length);
|
|
18358
|
-
const goalAdapter =
|
|
18480
|
+
const goalAdapter = React55.useMemo(() => {
|
|
18359
18481
|
if (isGoalAdapter(options?.goal)) {
|
|
18360
18482
|
return options.goal;
|
|
18361
18483
|
}
|
|
@@ -18368,10 +18490,10 @@ function Chat({
|
|
|
18368
18490
|
"goal"
|
|
18369
18491
|
);
|
|
18370
18492
|
const showGoalStatus = goalCommandAvailable && !hasCompletedGoal && (Boolean(goalError) || threadGoal?.status === "active" && stream.isLoading);
|
|
18371
|
-
const clearQuoteSelection =
|
|
18493
|
+
const clearQuoteSelection = React55.useCallback(() => {
|
|
18372
18494
|
setQuoteSelection(null);
|
|
18373
18495
|
}, []);
|
|
18374
|
-
const commitComposerParts =
|
|
18496
|
+
const commitComposerParts = React55.useCallback(
|
|
18375
18497
|
(nextParts, options2) => {
|
|
18376
18498
|
const normalized = normalizeComposerParts(nextParts);
|
|
18377
18499
|
const previous = composerPartsRef.current;
|
|
@@ -18401,7 +18523,7 @@ function Chat({
|
|
|
18401
18523
|
},
|
|
18402
18524
|
[setRunRuntimeCapabilities]
|
|
18403
18525
|
);
|
|
18404
|
-
const setComposerText =
|
|
18526
|
+
const setComposerText = React55.useCallback(
|
|
18405
18527
|
(text, caretOffset = text.length) => {
|
|
18406
18528
|
commitComposerParts(createComposerTextParts(text), {
|
|
18407
18529
|
caretOffset,
|
|
@@ -18411,7 +18533,7 @@ function Chat({
|
|
|
18411
18533
|
},
|
|
18412
18534
|
[commitComposerParts]
|
|
18413
18535
|
);
|
|
18414
|
-
const focusComposerAt =
|
|
18536
|
+
const focusComposerAt = React55.useCallback((position) => {
|
|
18415
18537
|
const nextPosition = position ?? getComposerEditingLength(composerPartsRef.current);
|
|
18416
18538
|
pendingComposerCaretOffsetRef.current = nextPosition;
|
|
18417
18539
|
requestAnimationFrame(() => {
|
|
@@ -18440,7 +18562,7 @@ function Chat({
|
|
|
18440
18562
|
focusComposerAt
|
|
18441
18563
|
});
|
|
18442
18564
|
const parentMessenger = useParentMessenger({
|
|
18443
|
-
onSetComposerValue:
|
|
18565
|
+
onSetComposerValue: React55.useCallback(
|
|
18444
18566
|
(payload) => {
|
|
18445
18567
|
if (!payload) {
|
|
18446
18568
|
return;
|
|
@@ -18468,16 +18590,16 @@ function Chat({
|
|
|
18468
18590
|
},
|
|
18469
18591
|
[applyComposerValueRuntimeCapabilities, composer?.tools, setComposerText]
|
|
18470
18592
|
),
|
|
18471
|
-
onSetRuntimeCapabilities:
|
|
18593
|
+
onSetRuntimeCapabilities: React55.useCallback(
|
|
18472
18594
|
(selection) => {
|
|
18473
18595
|
applyExternalRuntimeCapabilities(selection);
|
|
18474
18596
|
},
|
|
18475
18597
|
[applyExternalRuntimeCapabilities]
|
|
18476
18598
|
),
|
|
18477
|
-
onFocusComposer:
|
|
18599
|
+
onFocusComposer: React55.useCallback(() => {
|
|
18478
18600
|
composerInputRef.current?.focus();
|
|
18479
18601
|
}, []),
|
|
18480
|
-
onSetPetEnabled:
|
|
18602
|
+
onSetPetEnabled: React55.useCallback(
|
|
18481
18603
|
(enabled) => {
|
|
18482
18604
|
if (petRequired) {
|
|
18483
18605
|
return;
|
|
@@ -18491,10 +18613,10 @@ function Chat({
|
|
|
18491
18613
|
)
|
|
18492
18614
|
});
|
|
18493
18615
|
const canMinimizeToPet = parentMessenger?.isParentAvailable === true && isPetEnabled(effectivePet);
|
|
18494
|
-
const handleMinimizeToPet =
|
|
18616
|
+
const handleMinimizeToPet = React55.useCallback(() => {
|
|
18495
18617
|
parentMessenger?.sendEvent("chat_minimize_change", { minimized: true });
|
|
18496
18618
|
}, [parentMessenger]);
|
|
18497
|
-
const syncQuoteSelection =
|
|
18619
|
+
const syncQuoteSelection = React55.useCallback(() => {
|
|
18498
18620
|
if (typeof window === "undefined") {
|
|
18499
18621
|
clearQuoteSelection();
|
|
18500
18622
|
return;
|
|
@@ -18539,23 +18661,23 @@ function Chat({
|
|
|
18539
18661
|
left
|
|
18540
18662
|
});
|
|
18541
18663
|
}, [clearQuoteSelection]);
|
|
18542
|
-
const cancelPendingAutoScroll =
|
|
18664
|
+
const cancelPendingAutoScroll = React55.useCallback(() => {
|
|
18543
18665
|
if (autoScrollFrameRef.current !== null) {
|
|
18544
18666
|
cancelAnimationFrame(autoScrollFrameRef.current);
|
|
18545
18667
|
autoScrollFrameRef.current = null;
|
|
18546
18668
|
}
|
|
18547
18669
|
}, []);
|
|
18548
|
-
const disableAutoFollow =
|
|
18670
|
+
const disableAutoFollow = React55.useCallback(() => {
|
|
18549
18671
|
forceFollowRef.current = false;
|
|
18550
18672
|
shouldAutoScrollRef.current = false;
|
|
18551
18673
|
cancelPendingAutoScroll();
|
|
18552
18674
|
}, [cancelPendingAutoScroll]);
|
|
18553
|
-
const enableAutoFollow =
|
|
18675
|
+
const enableAutoFollow = React55.useCallback(() => {
|
|
18554
18676
|
forceFollowRef.current = true;
|
|
18555
18677
|
shouldAutoScrollRef.current = true;
|
|
18556
18678
|
setHasUpdatesBelow(false);
|
|
18557
18679
|
}, []);
|
|
18558
|
-
const scrollToBottom =
|
|
18680
|
+
const scrollToBottom = React55.useCallback(
|
|
18559
18681
|
(smooth = false, force = false) => {
|
|
18560
18682
|
if (force) {
|
|
18561
18683
|
enableAutoFollow();
|
|
@@ -18582,7 +18704,7 @@ function Chat({
|
|
|
18582
18704
|
},
|
|
18583
18705
|
[cancelPendingAutoScroll, enableAutoFollow]
|
|
18584
18706
|
);
|
|
18585
|
-
const setMessageNavigationAnchor =
|
|
18707
|
+
const setMessageNavigationAnchor = React55.useCallback(
|
|
18586
18708
|
(id, node) => {
|
|
18587
18709
|
if (node) {
|
|
18588
18710
|
messageNavigationAnchorsRef.current.set(id, node);
|
|
@@ -18592,22 +18714,22 @@ function Chat({
|
|
|
18592
18714
|
},
|
|
18593
18715
|
[]
|
|
18594
18716
|
);
|
|
18595
|
-
const getMessageNavigationAnchor =
|
|
18717
|
+
const getMessageNavigationAnchor = React55.useCallback(
|
|
18596
18718
|
(item) => messageNavigationAnchorsRef.current.get(item.id) ?? null,
|
|
18597
18719
|
[]
|
|
18598
18720
|
);
|
|
18599
|
-
const handleMessageNavigationNavigate =
|
|
18721
|
+
const handleMessageNavigationNavigate = React55.useCallback(() => {
|
|
18600
18722
|
disableAutoFollow();
|
|
18601
18723
|
clearQuoteSelection();
|
|
18602
18724
|
}, [clearQuoteSelection, disableAutoFollow]);
|
|
18603
18725
|
const taskSummaryEnabled = options?.taskSummary?.enabled === true;
|
|
18604
18726
|
const taskSummaryConversationId = stream.conversationId ?? null;
|
|
18605
|
-
const [taskSummaryDocked, setTaskSummaryDocked] =
|
|
18606
|
-
const [taskSummaryOpen, setTaskSummaryOpen] =
|
|
18607
|
-
const manuallyClosedTaskSummaryConversationIdsRef =
|
|
18727
|
+
const [taskSummaryDocked, setTaskSummaryDocked] = React55.useState(false);
|
|
18728
|
+
const [taskSummaryOpen, setTaskSummaryOpen] = React55.useState(false);
|
|
18729
|
+
const manuallyClosedTaskSummaryConversationIdsRef = React55.useRef(
|
|
18608
18730
|
/* @__PURE__ */ new Set()
|
|
18609
18731
|
);
|
|
18610
|
-
const liveTaskSummaryPending =
|
|
18732
|
+
const liveTaskSummaryPending = React55.useMemo(() => {
|
|
18611
18733
|
const followUps = pendingFollowUps.map((item) => ({
|
|
18612
18734
|
id: `follow-up:${item.id}`,
|
|
18613
18735
|
kind: "follow_up",
|
|
@@ -18642,7 +18764,7 @@ function Chat({
|
|
|
18642
18764
|
stream.pendingRequestUserInput,
|
|
18643
18765
|
t
|
|
18644
18766
|
]);
|
|
18645
|
-
const liveTaskSummaryRunning =
|
|
18767
|
+
const liveTaskSummaryRunning = React55.useMemo(
|
|
18646
18768
|
() => stream.runtimeActivities.sandboxServices.services.filter(
|
|
18647
18769
|
(service) => service.status === "starting" || service.status === "running" || service.status === "stopping"
|
|
18648
18770
|
).map((service) => ({
|
|
@@ -18659,7 +18781,7 @@ function Chat({
|
|
|
18659
18781
|
})),
|
|
18660
18782
|
[stream.runtimeActivities.sandboxServices.services]
|
|
18661
18783
|
);
|
|
18662
|
-
const taskSummaryAgentNames =
|
|
18784
|
+
const taskSummaryAgentNames = React55.useMemo(() => {
|
|
18663
18785
|
const names = /* @__PURE__ */ new Map();
|
|
18664
18786
|
runtimeCapabilityOptions.forEach((option) => {
|
|
18665
18787
|
if (option.type !== "subAgent") return;
|
|
@@ -18671,7 +18793,7 @@ function Chat({
|
|
|
18671
18793
|
});
|
|
18672
18794
|
return names;
|
|
18673
18795
|
}, [runtimeCapabilityOptions]);
|
|
18674
|
-
const liveTaskSummary =
|
|
18796
|
+
const liveTaskSummary = React55.useMemo(
|
|
18675
18797
|
() => collectLiveTaskSummary({
|
|
18676
18798
|
messages: messages.map(
|
|
18677
18799
|
(message) => ({
|
|
@@ -18708,7 +18830,7 @@ function Chat({
|
|
|
18708
18830
|
client: stream.client,
|
|
18709
18831
|
live: liveTaskSummary
|
|
18710
18832
|
});
|
|
18711
|
-
const navigateToTaskSummaryMessage =
|
|
18833
|
+
const navigateToTaskSummaryMessage = React55.useCallback(
|
|
18712
18834
|
async (messageId) => {
|
|
18713
18835
|
try {
|
|
18714
18836
|
let anchor = messageNavigationAnchorsRef.current.get(messageId);
|
|
@@ -18732,7 +18854,7 @@ function Chat({
|
|
|
18732
18854
|
},
|
|
18733
18855
|
[clearQuoteSelection, disableAutoFollow, stream]
|
|
18734
18856
|
);
|
|
18735
|
-
const openTaskSummaryResource =
|
|
18857
|
+
const openTaskSummaryResource = React55.useCallback(
|
|
18736
18858
|
(resource, messageId, resourceTitle) => {
|
|
18737
18859
|
const data = {
|
|
18738
18860
|
resource,
|
|
@@ -18750,7 +18872,7 @@ function Chat({
|
|
|
18750
18872
|
},
|
|
18751
18873
|
[parentMessenger, taskSummaryConversationId]
|
|
18752
18874
|
);
|
|
18753
|
-
|
|
18875
|
+
React55.useEffect(() => {
|
|
18754
18876
|
const viewport = viewportRef.current;
|
|
18755
18877
|
if (!viewport) return;
|
|
18756
18878
|
previousScrollTopRef.current = viewport.scrollTop;
|
|
@@ -18831,14 +18953,14 @@ function Chat({
|
|
|
18831
18953
|
window.removeEventListener("pointercancel", stopPointerTracking);
|
|
18832
18954
|
};
|
|
18833
18955
|
}, [cancelPendingAutoScroll, disableAutoFollow]);
|
|
18834
|
-
|
|
18956
|
+
React55.useEffect(() => {
|
|
18835
18957
|
shouldAutoScrollRef.current = true;
|
|
18836
18958
|
forceFollowRef.current = false;
|
|
18837
18959
|
previousScrollTopRef.current = 0;
|
|
18838
18960
|
setIsAtBottom(true);
|
|
18839
18961
|
setHasUpdatesBelow(false);
|
|
18840
18962
|
}, [stream.threadId]);
|
|
18841
|
-
|
|
18963
|
+
React55.useEffect(() => {
|
|
18842
18964
|
const messageCountChanged = messages.length !== previousMessageCountRef.current;
|
|
18843
18965
|
previousMessageCountRef.current = messages.length;
|
|
18844
18966
|
if (isPrependingHistoryMessagesRef.current) {
|
|
@@ -18860,7 +18982,7 @@ function Chat({
|
|
|
18860
18982
|
const isSubmissionBlocked = hasPendingInteractiveRequest || missingConfig || isHistoryLoading || hasUploadingFiles || isUploadingReferenceImages;
|
|
18861
18983
|
const isSendDisabled = !trimmedDraft && !hasReferences || isSubmissionBlocked;
|
|
18862
18984
|
const isPromptEditDisabled = hasPendingInteractiveRequest || missingConfig || isHistoryLoading;
|
|
18863
|
-
const resizeComposerInput =
|
|
18985
|
+
const resizeComposerInput = React55.useCallback(() => {
|
|
18864
18986
|
const input = composerInputRef.current;
|
|
18865
18987
|
if (!input) {
|
|
18866
18988
|
return;
|
|
@@ -18868,7 +18990,7 @@ function Chat({
|
|
|
18868
18990
|
input.style.maxHeight = `${COMPOSER_INPUT_MAX_HEIGHT}px`;
|
|
18869
18991
|
input.style.overflowY = input.scrollHeight > COMPOSER_INPUT_MAX_HEIGHT ? "auto" : "hidden";
|
|
18870
18992
|
}, []);
|
|
18871
|
-
|
|
18993
|
+
React55.useLayoutEffect(() => {
|
|
18872
18994
|
composerPartsRef.current = composerParts;
|
|
18873
18995
|
resizeComposerInput();
|
|
18874
18996
|
const caretOffset = pendingComposerCaretOffsetRef.current;
|
|
@@ -18880,13 +19002,13 @@ function Chat({
|
|
|
18880
19002
|
}
|
|
18881
19003
|
}
|
|
18882
19004
|
}, [composerDomVersion, composerParts, resizeComposerInput]);
|
|
18883
|
-
|
|
19005
|
+
React55.useEffect(() => {
|
|
18884
19006
|
document.addEventListener("selectionchange", syncQuoteSelection);
|
|
18885
19007
|
return () => {
|
|
18886
19008
|
document.removeEventListener("selectionchange", syncQuoteSelection);
|
|
18887
19009
|
};
|
|
18888
19010
|
}, [syncQuoteSelection]);
|
|
18889
|
-
|
|
19011
|
+
React55.useEffect(() => {
|
|
18890
19012
|
const viewport = viewportRef.current;
|
|
18891
19013
|
if (!viewport) {
|
|
18892
19014
|
return;
|
|
@@ -18903,14 +19025,14 @@ function Chat({
|
|
|
18903
19025
|
window.removeEventListener("resize", handleViewportScroll);
|
|
18904
19026
|
};
|
|
18905
19027
|
}, [clearQuoteSelection]);
|
|
18906
|
-
|
|
19028
|
+
React55.useEffect(() => {
|
|
18907
19029
|
clearQuoteSelection();
|
|
18908
19030
|
}, [messages.length, stream.threadId, clearQuoteSelection]);
|
|
18909
|
-
|
|
19031
|
+
React55.useEffect(() => {
|
|
18910
19032
|
if (missingConfig) return;
|
|
18911
19033
|
void refreshThreads();
|
|
18912
19034
|
}, [missingConfig, refreshThreads]);
|
|
18913
|
-
|
|
19035
|
+
React55.useEffect(() => {
|
|
18914
19036
|
if (missingConfig || !stream.client || !stream.assistantId) {
|
|
18915
19037
|
setAssistantName(null);
|
|
18916
19038
|
setAssistantAvatar(null);
|
|
@@ -18933,10 +19055,10 @@ function Chat({
|
|
|
18933
19055
|
cancelled = true;
|
|
18934
19056
|
};
|
|
18935
19057
|
}, [missingConfig, stream.client, stream.assistantId]);
|
|
18936
|
-
|
|
19058
|
+
React55.useEffect(() => {
|
|
18937
19059
|
setThreadGoal(stream.threadGoal);
|
|
18938
19060
|
}, [stream.threadGoal]);
|
|
18939
|
-
|
|
19061
|
+
React55.useEffect(() => {
|
|
18940
19062
|
const threadId = stream.threadId?.trim();
|
|
18941
19063
|
if (!threadId || !goalCommandAvailable) {
|
|
18942
19064
|
setThreadGoal(null);
|
|
@@ -18977,7 +19099,7 @@ function Chat({
|
|
|
18977
19099
|
return () => controller.abort();
|
|
18978
19100
|
}, [goalAdapter, goalCommandAvailable, stream.threadId]);
|
|
18979
19101
|
const uploadedFiles = attachmentState.uploadedFiles;
|
|
18980
|
-
const syncComposerInputFromElement =
|
|
19102
|
+
const syncComposerInputFromElement = React55.useCallback(
|
|
18981
19103
|
(input) => {
|
|
18982
19104
|
const previousCapabilities = getComposerCapabilityPartMap(
|
|
18983
19105
|
composerPartsRef.current
|
|
@@ -18995,25 +19117,25 @@ function Chat({
|
|
|
18995
19117
|
},
|
|
18996
19118
|
[commitComposerParts, updateRuntimeCapabilityPalette]
|
|
18997
19119
|
);
|
|
18998
|
-
const handleComposerInput =
|
|
19120
|
+
const handleComposerInput = React55.useCallback(
|
|
18999
19121
|
(event) => {
|
|
19000
19122
|
syncComposerInputFromElement(event.currentTarget);
|
|
19001
19123
|
},
|
|
19002
19124
|
[syncComposerInputFromElement]
|
|
19003
19125
|
);
|
|
19004
|
-
const handleComposerCompositionEnd =
|
|
19126
|
+
const handleComposerCompositionEnd = React55.useCallback(
|
|
19005
19127
|
(event) => {
|
|
19006
19128
|
syncComposerInputFromElement(event.currentTarget);
|
|
19007
19129
|
},
|
|
19008
19130
|
[syncComposerInputFromElement]
|
|
19009
19131
|
);
|
|
19010
|
-
const handleComposerSelect =
|
|
19132
|
+
const handleComposerSelect = React55.useCallback(() => {
|
|
19011
19133
|
updateRuntimeCapabilityPalette(
|
|
19012
19134
|
composerPartsRef.current,
|
|
19013
19135
|
composerInputRef.current ? getComposerSelectionOffset(composerInputRef.current) : void 0
|
|
19014
19136
|
);
|
|
19015
19137
|
}, [updateRuntimeCapabilityPalette]);
|
|
19016
|
-
const submitDraft =
|
|
19138
|
+
const submitDraft = React55.useCallback(
|
|
19017
19139
|
(submitOptions = {}) => {
|
|
19018
19140
|
if (isSubmissionBlocked) return;
|
|
19019
19141
|
const contentToSubmit = (submitOptions.inputText ?? trimmedDraft).trim();
|
|
@@ -19119,7 +19241,7 @@ function Chat({
|
|
|
19119
19241
|
t
|
|
19120
19242
|
]
|
|
19121
19243
|
);
|
|
19122
|
-
const handleGoalCommand =
|
|
19244
|
+
const handleGoalCommand = React55.useCallback(
|
|
19123
19245
|
async ({
|
|
19124
19246
|
args,
|
|
19125
19247
|
commandSource,
|
|
@@ -19225,7 +19347,7 @@ function Chat({
|
|
|
19225
19347
|
t
|
|
19226
19348
|
]
|
|
19227
19349
|
);
|
|
19228
|
-
const handleGoalPanelOpenChange =
|
|
19350
|
+
const handleGoalPanelOpenChange = React55.useCallback((open) => {
|
|
19229
19351
|
setIsGoalPanelOpen(open);
|
|
19230
19352
|
}, []);
|
|
19231
19353
|
const {
|
|
@@ -19269,7 +19391,7 @@ function Chat({
|
|
|
19269
19391
|
plugin: t("composer.slashCommands.empty.loadingCapabilities"),
|
|
19270
19392
|
subAgent: t("composer.slashCommands.empty.loadingCapabilities")
|
|
19271
19393
|
};
|
|
19272
|
-
|
|
19394
|
+
React55.useEffect(() => {
|
|
19273
19395
|
if (!runtimeCapabilityPalette) {
|
|
19274
19396
|
return;
|
|
19275
19397
|
}
|
|
@@ -19288,7 +19410,7 @@ function Chat({
|
|
|
19288
19410
|
);
|
|
19289
19411
|
}
|
|
19290
19412
|
}, [slashPaletteOptions.length, runtimeCapabilityPalette]);
|
|
19291
|
-
|
|
19413
|
+
React55.useLayoutEffect(() => {
|
|
19292
19414
|
if (!runtimeCapabilityPalette) {
|
|
19293
19415
|
return;
|
|
19294
19416
|
}
|
|
@@ -19305,7 +19427,7 @@ function Chat({
|
|
|
19305
19427
|
container.scrollTop += optionRect.bottom - containerRect.bottom;
|
|
19306
19428
|
}
|
|
19307
19429
|
}, [runtimeCapabilityPalette, slashPaletteOptions.length]);
|
|
19308
|
-
const submitGoalModeDraft =
|
|
19430
|
+
const submitGoalModeDraft = React55.useCallback(() => {
|
|
19309
19431
|
const objective = getComposerPlainText(composerPartsRef.current).trim();
|
|
19310
19432
|
if (!isGoalModeOpen || !goalCommandAvailable || !objective) {
|
|
19311
19433
|
return false;
|
|
@@ -19343,7 +19465,7 @@ function Chat({
|
|
|
19343
19465
|
}
|
|
19344
19466
|
submitDraft();
|
|
19345
19467
|
};
|
|
19346
|
-
const handleEditPendingFollowUp =
|
|
19468
|
+
const handleEditPendingFollowUp = React55.useCallback(
|
|
19347
19469
|
(id) => {
|
|
19348
19470
|
const item = pendingFollowUps.find(
|
|
19349
19471
|
(entry) => entry.id === id && entry.mode === "queue"
|
|
@@ -19370,7 +19492,7 @@ function Chat({
|
|
|
19370
19492
|
},
|
|
19371
19493
|
[pendingFollowUps, setComposerText, stream]
|
|
19372
19494
|
);
|
|
19373
|
-
const handleQuoteSelection =
|
|
19495
|
+
const handleQuoteSelection = React55.useCallback(() => {
|
|
19374
19496
|
if (!quoteSelection) {
|
|
19375
19497
|
return;
|
|
19376
19498
|
}
|
|
@@ -19386,7 +19508,7 @@ function Chat({
|
|
|
19386
19508
|
const handleAttachmentClick = () => {
|
|
19387
19509
|
attachmentsRef.current?.openFilePicker();
|
|
19388
19510
|
};
|
|
19389
|
-
const uploadContextFile =
|
|
19511
|
+
const uploadContextFile = React55.useCallback(
|
|
19390
19512
|
(file) => {
|
|
19391
19513
|
const formData = new FormData();
|
|
19392
19514
|
formData.append("file", file, file.name || "upload");
|
|
@@ -19405,13 +19527,13 @@ function Chat({
|
|
|
19405
19527
|
},
|
|
19406
19528
|
[stream.assistantId, stream.client, stream.threadId]
|
|
19407
19529
|
);
|
|
19408
|
-
const getContextFileStatus =
|
|
19530
|
+
const getContextFileStatus = React55.useCallback(
|
|
19409
19531
|
(fileId) => stream.client.contexts.fetch(`/files/${fileId}/status`, {
|
|
19410
19532
|
method: "GET"
|
|
19411
19533
|
}),
|
|
19412
19534
|
[stream.client]
|
|
19413
19535
|
);
|
|
19414
|
-
const deleteContextFile =
|
|
19536
|
+
const deleteContextFile = React55.useCallback(
|
|
19415
19537
|
(storageFileId) => stream.client.contexts.deleteFile(storageFileId),
|
|
19416
19538
|
[stream.client]
|
|
19417
19539
|
);
|
|
@@ -19519,7 +19641,7 @@ function Chat({
|
|
|
19519
19641
|
}
|
|
19520
19642
|
submitDraft();
|
|
19521
19643
|
};
|
|
19522
|
-
const handleComposerPaste =
|
|
19644
|
+
const handleComposerPaste = React55.useCallback(
|
|
19523
19645
|
(event) => {
|
|
19524
19646
|
const clipboardData = event.clipboardData;
|
|
19525
19647
|
if (!clipboardData) {
|
|
@@ -19621,13 +19743,13 @@ function Chat({
|
|
|
19621
19743
|
const handleToolSelect = (tool) => {
|
|
19622
19744
|
setSelectedTool((prev) => prev?.id === tool.id ? null : tool);
|
|
19623
19745
|
};
|
|
19624
|
-
const handlePromptClick =
|
|
19746
|
+
const handlePromptClick = React55.useCallback(
|
|
19625
19747
|
(prompt) => {
|
|
19626
19748
|
submitDraft({ inputText: prompt, displayText: prompt });
|
|
19627
19749
|
},
|
|
19628
19750
|
[submitDraft]
|
|
19629
19751
|
);
|
|
19630
|
-
const handlePromptEdit =
|
|
19752
|
+
const handlePromptEdit = React55.useCallback(
|
|
19631
19753
|
(prompt) => {
|
|
19632
19754
|
if (isPromptEditDisabled) return;
|
|
19633
19755
|
setComposerText(prompt, prompt.length);
|
|
@@ -19636,7 +19758,7 @@ function Chat({
|
|
|
19636
19758
|
},
|
|
19637
19759
|
[focusComposerAt, isPromptEditDisabled, setComposerText]
|
|
19638
19760
|
);
|
|
19639
|
-
const loadConversationMessages =
|
|
19761
|
+
const loadConversationMessages = React55.useCallback(
|
|
19640
19762
|
async (recordId) => {
|
|
19641
19763
|
if (missingConfig) {
|
|
19642
19764
|
setHistoryError(missingConfigShortMessage);
|
|
@@ -19657,7 +19779,7 @@ function Chat({
|
|
|
19657
19779
|
},
|
|
19658
19780
|
[missingConfig, missingConfigShortMessage, stream, t]
|
|
19659
19781
|
);
|
|
19660
|
-
const handleLoadMoreMessages =
|
|
19782
|
+
const handleLoadMoreMessages = React55.useCallback(async () => {
|
|
19661
19783
|
if (!canLoadMoreMessages || isLoadingMoreMessages) {
|
|
19662
19784
|
return;
|
|
19663
19785
|
}
|
|
@@ -19766,19 +19888,19 @@ function Chat({
|
|
|
19766
19888
|
};
|
|
19767
19889
|
const acceptMimes = composer?.attachments?.accept ? Object.entries(composer.attachments.accept).map(([mime, exts]) => [mime, ...exts.map((e) => `.${e}`)].join(",")).join(",") : void 0;
|
|
19768
19890
|
const canUploadDroppedFiles = composer?.attachments?.enabled === true && !missingConfig && !isHistoryLoading && !hasPendingInteractiveRequest;
|
|
19769
|
-
const handleDroppedFiles =
|
|
19891
|
+
const handleDroppedFiles = React55.useCallback((files) => {
|
|
19770
19892
|
return attachmentsRef.current?.queueFiles(files) ?? false;
|
|
19771
19893
|
}, []);
|
|
19772
|
-
const currentThread =
|
|
19894
|
+
const currentThread = React55.useMemo(
|
|
19773
19895
|
() => threads.find((item) => item.id === stream.threadId),
|
|
19774
19896
|
[threads, stream.threadId]
|
|
19775
19897
|
);
|
|
19776
|
-
const assistantStatusText =
|
|
19898
|
+
const assistantStatusText = React55.useMemo(() => {
|
|
19777
19899
|
if (!stream.threadId) return t("chat.statusOnline");
|
|
19778
19900
|
return currentThread?.title?.trim() || t("chat.statusOnline");
|
|
19779
19901
|
}, [currentThread?.title, stream.threadId, t]);
|
|
19780
19902
|
const streamErrorMessage = stream.error instanceof Error ? stream.error.message : void 0;
|
|
19781
|
-
const threadErrorMessage =
|
|
19903
|
+
const threadErrorMessage = React55.useMemo(() => {
|
|
19782
19904
|
if (streamErrorMessage?.trim()) return streamErrorMessage.trim();
|
|
19783
19905
|
if (currentThread?.status !== "error") return void 0;
|
|
19784
19906
|
const message = currentThread.error?.trim();
|
|
@@ -19809,13 +19931,13 @@ function Chat({
|
|
|
19809
19931
|
fallbackTitle: t("history.threadFallback")
|
|
19810
19932
|
});
|
|
19811
19933
|
const layoutMaxWidth = options?.layout?.maxWidth;
|
|
19812
|
-
const chatColumnStyle =
|
|
19934
|
+
const chatColumnStyle = React55.useMemo(() => {
|
|
19813
19935
|
if (layoutMaxWidth === void 0 || layoutMaxWidth === null || layoutMaxWidth === "") {
|
|
19814
19936
|
return void 0;
|
|
19815
19937
|
}
|
|
19816
19938
|
return { maxWidth: layoutMaxWidth };
|
|
19817
19939
|
}, [layoutMaxWidth]);
|
|
19818
|
-
|
|
19940
|
+
React55.useLayoutEffect(() => {
|
|
19819
19941
|
if (!taskSummaryEnabled) {
|
|
19820
19942
|
setTaskSummaryDocked(false);
|
|
19821
19943
|
return;
|
|
@@ -19850,7 +19972,7 @@ function Chat({
|
|
|
19850
19972
|
const taskSummaryAvailable = Boolean(
|
|
19851
19973
|
taskSummaryEnabled && stream.threadId && taskSummaryConversationId
|
|
19852
19974
|
);
|
|
19853
|
-
const handleTaskSummaryOpenChange =
|
|
19975
|
+
const handleTaskSummaryOpenChange = React55.useCallback(
|
|
19854
19976
|
(open) => {
|
|
19855
19977
|
setTaskSummaryOpen(open);
|
|
19856
19978
|
if (!taskSummaryConversationId) return;
|
|
@@ -19866,12 +19988,12 @@ function Chat({
|
|
|
19866
19988
|
},
|
|
19867
19989
|
[taskSummaryConversationId]
|
|
19868
19990
|
);
|
|
19869
|
-
|
|
19991
|
+
React55.useEffect(() => {
|
|
19870
19992
|
if (!taskSummaryDocked) {
|
|
19871
19993
|
setTaskSummaryOpen(false);
|
|
19872
19994
|
}
|
|
19873
19995
|
}, [taskSummaryDocked]);
|
|
19874
|
-
|
|
19996
|
+
React55.useEffect(() => {
|
|
19875
19997
|
if (!taskSummaryDocked || !taskSummaryAvailable || !taskSummaryConversationId || manuallyClosedTaskSummaryConversationIdsRef.current.has(
|
|
19876
19998
|
taskSummaryConversationId
|
|
19877
19999
|
)) {
|
|
@@ -19892,13 +20014,13 @@ function Chat({
|
|
|
19892
20014
|
onFocusComposer: () => focusComposerAt(),
|
|
19893
20015
|
onOpenResource: openTaskSummaryResource
|
|
19894
20016
|
};
|
|
19895
|
-
return /* @__PURE__ */
|
|
20017
|
+
return /* @__PURE__ */ jsxs41(
|
|
19896
20018
|
"div",
|
|
19897
20019
|
{
|
|
19898
20020
|
className: "relative flex h-full w-full min-w-0 bg-background",
|
|
19899
20021
|
"data-task-summary-layout": taskSummaryDocked ? "docked" : "popover",
|
|
19900
20022
|
children: [
|
|
19901
|
-
/* @__PURE__ */
|
|
20023
|
+
/* @__PURE__ */ jsxs41(
|
|
19902
20024
|
UploadDroppedFiles,
|
|
19903
20025
|
{
|
|
19904
20026
|
ref: viewportRef,
|
|
@@ -19913,7 +20035,7 @@ function Chat({
|
|
|
19913
20035
|
className
|
|
19914
20036
|
),
|
|
19915
20037
|
children: [
|
|
19916
|
-
/* @__PURE__ */
|
|
20038
|
+
/* @__PURE__ */ jsxs41(
|
|
19917
20039
|
"div",
|
|
19918
20040
|
{
|
|
19919
20041
|
ref: chatColumnRef,
|
|
@@ -19921,9 +20043,9 @@ function Chat({
|
|
|
19921
20043
|
className: "mx-auto flex w-full items-center justify-between border-b p-2 sticky top-0 z-10 bg-background",
|
|
19922
20044
|
style: chatColumnStyle,
|
|
19923
20045
|
children: [
|
|
19924
|
-
/* @__PURE__ */
|
|
19925
|
-
/* @__PURE__ */
|
|
19926
|
-
/* @__PURE__ */
|
|
20046
|
+
/* @__PURE__ */ jsxs41("div", { className: "flex min-w-0 items-center gap-3 overflow-hidden", children: [
|
|
20047
|
+
/* @__PURE__ */ jsxs41("div", { className: "relative shrink-0", children: [
|
|
20048
|
+
/* @__PURE__ */ jsx59(
|
|
19927
20049
|
ChatkitAvatar,
|
|
19928
20050
|
{
|
|
19929
20051
|
avatar: assistantAvatar,
|
|
@@ -19931,10 +20053,10 @@ function Chat({
|
|
|
19931
20053
|
label: assistantTitle
|
|
19932
20054
|
}
|
|
19933
20055
|
),
|
|
19934
|
-
/* @__PURE__ */
|
|
20056
|
+
/* @__PURE__ */ jsx59("span", { className: "absolute bottom-0 right-0 h-2.5 w-2.5 rounded-full border-2 border-background bg-green-500" })
|
|
19935
20057
|
] }),
|
|
19936
|
-
/* @__PURE__ */
|
|
19937
|
-
/* @__PURE__ */
|
|
20058
|
+
/* @__PURE__ */ jsxs41("div", { className: "min-w-0", children: [
|
|
20059
|
+
/* @__PURE__ */ jsx59(
|
|
19938
20060
|
"h2",
|
|
19939
20061
|
{
|
|
19940
20062
|
className: "text-lg font-semibold truncate",
|
|
@@ -19942,7 +20064,7 @@ function Chat({
|
|
|
19942
20064
|
children: assistantTitle
|
|
19943
20065
|
}
|
|
19944
20066
|
),
|
|
19945
|
-
/* @__PURE__ */
|
|
20067
|
+
/* @__PURE__ */ jsx59(
|
|
19946
20068
|
"p",
|
|
19947
20069
|
{
|
|
19948
20070
|
className: "truncate text-xs text-muted-foreground",
|
|
@@ -19952,8 +20074,8 @@ function Chat({
|
|
|
19952
20074
|
)
|
|
19953
20075
|
] })
|
|
19954
20076
|
] }),
|
|
19955
|
-
/* @__PURE__ */
|
|
19956
|
-
taskSummaryAvailable && /* @__PURE__ */
|
|
20077
|
+
/* @__PURE__ */ jsxs41("div", { className: "flex items-center gap-1", children: [
|
|
20078
|
+
taskSummaryAvailable && /* @__PURE__ */ jsx59(
|
|
19957
20079
|
TaskSummaryTrigger,
|
|
19958
20080
|
{
|
|
19959
20081
|
...taskSummaryProps,
|
|
@@ -19962,8 +20084,9 @@ function Chat({
|
|
|
19962
20084
|
onOpenChange: handleTaskSummaryOpenChange
|
|
19963
20085
|
}
|
|
19964
20086
|
),
|
|
19965
|
-
|
|
19966
|
-
|
|
20087
|
+
/* @__PURE__ */ jsx59(WorkbenchToggleButton, {}),
|
|
20088
|
+
canMinimizeToPet && /* @__PURE__ */ jsxs41(Tooltip, { children: [
|
|
20089
|
+
/* @__PURE__ */ jsx59(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx59("span", { className: "inline-flex h-8 w-8", children: /* @__PURE__ */ jsx59(
|
|
19967
20090
|
"button",
|
|
19968
20091
|
{
|
|
19969
20092
|
type: "button",
|
|
@@ -19974,13 +20097,13 @@ function Chat({
|
|
|
19974
20097
|
"transition-colors duration-150"
|
|
19975
20098
|
),
|
|
19976
20099
|
"aria-label": t("chat.minimizeToPet"),
|
|
19977
|
-
children: /* @__PURE__ */
|
|
20100
|
+
children: /* @__PURE__ */ jsx59(Minus, { size: 16 })
|
|
19978
20101
|
}
|
|
19979
20102
|
) }) }),
|
|
19980
|
-
/* @__PURE__ */
|
|
20103
|
+
/* @__PURE__ */ jsx59(TooltipContent, { side: "bottom", children: t("chat.minimizeToPet") })
|
|
19981
20104
|
] }),
|
|
19982
|
-
/* @__PURE__ */
|
|
19983
|
-
/* @__PURE__ */
|
|
20105
|
+
/* @__PURE__ */ jsxs41(Tooltip, { children: [
|
|
20106
|
+
/* @__PURE__ */ jsx59(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx59("span", { className: "inline-flex h-8 w-8", children: /* @__PURE__ */ jsx59(
|
|
19984
20107
|
"button",
|
|
19985
20108
|
{
|
|
19986
20109
|
type: "button",
|
|
@@ -19991,14 +20114,14 @@ function Chat({
|
|
|
19991
20114
|
"transition-colors duration-150"
|
|
19992
20115
|
),
|
|
19993
20116
|
"aria-label": t("settings.open"),
|
|
19994
|
-
children: /* @__PURE__ */
|
|
20117
|
+
children: /* @__PURE__ */ jsx59(Settings2, { size: 16 })
|
|
19995
20118
|
}
|
|
19996
20119
|
) }) }),
|
|
19997
|
-
/* @__PURE__ */
|
|
20120
|
+
/* @__PURE__ */ jsx59(TooltipContent, { side: "bottom", children: t("settings.open") })
|
|
19998
20121
|
] }),
|
|
19999
|
-
history?.enabled !== false && /* @__PURE__ */
|
|
20000
|
-
/* @__PURE__ */
|
|
20001
|
-
/* @__PURE__ */
|
|
20122
|
+
history?.enabled !== false && /* @__PURE__ */ jsxs41(Fragment10, { children: [
|
|
20123
|
+
/* @__PURE__ */ jsxs41(Tooltip, { children: [
|
|
20124
|
+
/* @__PURE__ */ jsx59(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx59("span", { className: "inline-flex h-8 w-8", children: /* @__PURE__ */ jsx59(
|
|
20002
20125
|
"button",
|
|
20003
20126
|
{
|
|
20004
20127
|
type: "button",
|
|
@@ -20011,12 +20134,12 @@ function Chat({
|
|
|
20011
20134
|
"disabled:pointer-events-none disabled:opacity-50 disabled:cursor-not-allowed"
|
|
20012
20135
|
),
|
|
20013
20136
|
"aria-label": t("history.newThread"),
|
|
20014
|
-
children: /* @__PURE__ */
|
|
20137
|
+
children: /* @__PURE__ */ jsx59(Pencil4, { size: 16 })
|
|
20015
20138
|
}
|
|
20016
20139
|
) }) }),
|
|
20017
|
-
/* @__PURE__ */
|
|
20140
|
+
/* @__PURE__ */ jsx59(TooltipContent, { side: "bottom", children: t("history.newThread") })
|
|
20018
20141
|
] }),
|
|
20019
|
-
/* @__PURE__ */
|
|
20142
|
+
/* @__PURE__ */ jsx59(
|
|
20020
20143
|
HistorySidebar,
|
|
20021
20144
|
{
|
|
20022
20145
|
threads,
|
|
@@ -20035,7 +20158,7 @@ function Chat({
|
|
|
20035
20158
|
]
|
|
20036
20159
|
}
|
|
20037
20160
|
),
|
|
20038
|
-
showMessageNavigation && /* @__PURE__ */
|
|
20161
|
+
showMessageNavigation && /* @__PURE__ */ jsx59(
|
|
20039
20162
|
MessageNavigator,
|
|
20040
20163
|
{
|
|
20041
20164
|
items: messageNavigationItems,
|
|
@@ -20046,18 +20169,18 @@ function Chat({
|
|
|
20046
20169
|
tagsOverflowLabel: (count) => t("message.navigation.moreTags", { count })
|
|
20047
20170
|
}
|
|
20048
20171
|
),
|
|
20049
|
-
/* @__PURE__ */
|
|
20172
|
+
/* @__PURE__ */ jsxs41(
|
|
20050
20173
|
"div",
|
|
20051
20174
|
{
|
|
20052
20175
|
"data-slot": "chatkit-chat-content",
|
|
20053
20176
|
className: "mx-auto w-full flex-1 p-4",
|
|
20054
20177
|
style: chatColumnStyle,
|
|
20055
20178
|
children: [
|
|
20056
|
-
errorMessage && /* @__PURE__ */
|
|
20057
|
-
historyError && /* @__PURE__ */
|
|
20058
|
-
showMissingConfig && /* @__PURE__ */
|
|
20059
|
-
isHistoryLoading && /* @__PURE__ */
|
|
20060
|
-
messages.length === 0 && !canLoadMoreMessages ? /* @__PURE__ */
|
|
20179
|
+
errorMessage && /* @__PURE__ */ jsx59("div", { className: "mb-4 rounded-lg border border-destructive/30 bg-destructive/10 px-3 py-2 text-sm text-destructive", children: errorMessage }),
|
|
20180
|
+
historyError && /* @__PURE__ */ jsx59("div", { className: "mb-4 rounded-lg border border-amber-200 bg-amber-50 px-3 py-2 text-sm text-amber-900", children: historyError }),
|
|
20181
|
+
showMissingConfig && /* @__PURE__ */ jsx59("div", { className: "mb-4 rounded-lg border border-amber-200 bg-amber-50 px-3 py-2 text-sm text-amber-900", children: missingConfigDetailMessage }),
|
|
20182
|
+
isHistoryLoading && /* @__PURE__ */ jsx59("div", { className: "mb-4 rounded-lg border border-muted px-3 py-2 text-sm text-muted-foreground", children: t("chat.loadingThread") }),
|
|
20183
|
+
messages.length === 0 && !canLoadMoreMessages ? /* @__PURE__ */ jsx59(
|
|
20061
20184
|
StartScreen,
|
|
20062
20185
|
{
|
|
20063
20186
|
startScreen,
|
|
@@ -20066,10 +20189,10 @@ function Chat({
|
|
|
20066
20189
|
promptSendDisabled: isSubmissionBlocked,
|
|
20067
20190
|
promptEditDisabled: isPromptEditDisabled
|
|
20068
20191
|
}
|
|
20069
|
-
) : /* @__PURE__ */
|
|
20070
|
-
canLoadMoreMessages && /* @__PURE__ */
|
|
20071
|
-
/* @__PURE__ */
|
|
20072
|
-
/* @__PURE__ */
|
|
20192
|
+
) : /* @__PURE__ */ jsxs41("div", { className: "space-y-4", children: [
|
|
20193
|
+
canLoadMoreMessages && /* @__PURE__ */ jsxs41("div", { className: "flex items-center gap-3 py-1", children: [
|
|
20194
|
+
/* @__PURE__ */ jsx59("div", { className: "h-px min-w-8 flex-1 bg-border" }),
|
|
20195
|
+
/* @__PURE__ */ jsx59(
|
|
20073
20196
|
Button,
|
|
20074
20197
|
{
|
|
20075
20198
|
type: "button",
|
|
@@ -20081,7 +20204,7 @@ function Chat({
|
|
|
20081
20204
|
children: isLoadingMoreMessages ? t("chat.loadingMoreMessages") : t("chat.loadMoreMessages")
|
|
20082
20205
|
}
|
|
20083
20206
|
),
|
|
20084
|
-
/* @__PURE__ */
|
|
20207
|
+
/* @__PURE__ */ jsx59("div", { className: "h-px min-w-8 flex-1 bg-border" })
|
|
20085
20208
|
] }),
|
|
20086
20209
|
messages.map((message, index) => {
|
|
20087
20210
|
const messageType = String(message.type);
|
|
@@ -20125,7 +20248,7 @@ function Chat({
|
|
|
20125
20248
|
if (!isAssistantMessage && !hasPlainRenderableContent && !hasHumanAttachments && humanRuntimeCapabilityOptions.length === 0 && humanReferences.length === 0) {
|
|
20126
20249
|
return null;
|
|
20127
20250
|
}
|
|
20128
|
-
return /* @__PURE__ */
|
|
20251
|
+
return /* @__PURE__ */ jsx59(
|
|
20129
20252
|
"div",
|
|
20130
20253
|
{
|
|
20131
20254
|
ref: (node) => setMessageNavigationAnchor(messageNavigationId, node),
|
|
@@ -20135,7 +20258,7 @@ function Chat({
|
|
|
20135
20258
|
message.type === "human" ? "justify-end" : "justify-start -ml-1"
|
|
20136
20259
|
// AI messages: slightly closer to left
|
|
20137
20260
|
),
|
|
20138
|
-
children: /* @__PURE__ */
|
|
20261
|
+
children: /* @__PURE__ */ jsxs41(
|
|
20139
20262
|
"div",
|
|
20140
20263
|
{
|
|
20141
20264
|
className: cn(
|
|
@@ -20143,7 +20266,7 @@ function Chat({
|
|
|
20143
20266
|
isAssistantMessage && "min-w-0 flex-1"
|
|
20144
20267
|
),
|
|
20145
20268
|
children: [
|
|
20146
|
-
/* @__PURE__ */
|
|
20269
|
+
/* @__PURE__ */ jsx59(
|
|
20147
20270
|
"div",
|
|
20148
20271
|
{
|
|
20149
20272
|
...canQuoteMessage ? {
|
|
@@ -20155,7 +20278,7 @@ function Chat({
|
|
|
20155
20278
|
message.type === "human" ? "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"
|
|
20156
20279
|
// AI messages: use chat-specific foreground color
|
|
20157
20280
|
),
|
|
20158
|
-
children: isAssistantMessage ? /* @__PURE__ */
|
|
20281
|
+
children: isAssistantMessage ? /* @__PURE__ */ jsx59(
|
|
20159
20282
|
AssistantMessage,
|
|
20160
20283
|
{
|
|
20161
20284
|
message: {
|
|
@@ -20175,14 +20298,14 @@ function Chat({
|
|
|
20175
20298
|
apiUrl: stream.apiUrl,
|
|
20176
20299
|
pet: effectivePet
|
|
20177
20300
|
}
|
|
20178
|
-
) : /* @__PURE__ */
|
|
20179
|
-
message.type === "human" && humanRuntimeCapabilityOptions.length > 0 && /* @__PURE__ */
|
|
20301
|
+
) : /* @__PURE__ */ jsxs41(Fragment10, { children: [
|
|
20302
|
+
message.type === "human" && humanRuntimeCapabilityOptions.length > 0 && /* @__PURE__ */ jsx59(
|
|
20180
20303
|
HumanRuntimeCapabilityChips,
|
|
20181
20304
|
{
|
|
20182
20305
|
options: humanRuntimeCapabilityOptions
|
|
20183
20306
|
}
|
|
20184
20307
|
),
|
|
20185
|
-
message.type === "human" && humanReferences.length > 0 && /* @__PURE__ */
|
|
20308
|
+
message.type === "human" && humanReferences.length > 0 && /* @__PURE__ */ jsx59("div", { className: "mb-2 flex flex-wrap gap-1.5", children: humanReferences.map((reference) => /* @__PURE__ */ jsx59(
|
|
20186
20309
|
ReferenceChip,
|
|
20187
20310
|
{
|
|
20188
20311
|
reference,
|
|
@@ -20190,29 +20313,29 @@ function Chat({
|
|
|
20190
20313
|
},
|
|
20191
20314
|
getReferenceKey(reference)
|
|
20192
20315
|
)) }),
|
|
20193
|
-
message.type === "human" && humanAttachments.length > 0 && /* @__PURE__ */
|
|
20316
|
+
message.type === "human" && humanAttachments.length > 0 && /* @__PURE__ */ jsx59("div", { className: "flex flex-wrap gap-1.5 mb-2", children: humanAttachments.map((file, fileIndex) => /* @__PURE__ */ jsxs41(
|
|
20194
20317
|
"div",
|
|
20195
20318
|
{
|
|
20196
20319
|
className: "flex items-center gap-1.5 rounded-md bg-primary-foreground/20 px-2 py-1 text-xs",
|
|
20197
20320
|
children: [
|
|
20198
|
-
/* @__PURE__ */
|
|
20199
|
-
/* @__PURE__ */
|
|
20321
|
+
/* @__PURE__ */ jsx59(FileText5, { size: 12 }),
|
|
20322
|
+
/* @__PURE__ */ jsx59("span", { className: "max-w-[100px] truncate", children: file.originalName ?? file.id })
|
|
20200
20323
|
]
|
|
20201
20324
|
},
|
|
20202
20325
|
fileIndex
|
|
20203
20326
|
)) }),
|
|
20204
|
-
Array.isArray(message.content) ? message.content.map((part, partIndex) => /* @__PURE__ */
|
|
20327
|
+
Array.isArray(message.content) ? message.content.map((part, partIndex) => /* @__PURE__ */ jsx59(
|
|
20205
20328
|
"p",
|
|
20206
20329
|
{
|
|
20207
20330
|
className: "wrap-break-word text-sm leading-relaxed",
|
|
20208
20331
|
children: formatMessageContent(part)
|
|
20209
20332
|
},
|
|
20210
20333
|
`${part.type}-${partIndex}`
|
|
20211
|
-
)) : /* @__PURE__ */
|
|
20334
|
+
)) : /* @__PURE__ */ jsx59("span", { className: "wrap-break-word text-sm leading-relaxed", children: formatMessageContent(message.content) })
|
|
20212
20335
|
] })
|
|
20213
20336
|
}
|
|
20214
20337
|
),
|
|
20215
|
-
/* @__PURE__ */
|
|
20338
|
+
/* @__PURE__ */ jsx59(
|
|
20216
20339
|
MessageActions,
|
|
20217
20340
|
{
|
|
20218
20341
|
content: messageContent,
|
|
@@ -20250,7 +20373,7 @@ function Chat({
|
|
|
20250
20373
|
stream.isLoading,
|
|
20251
20374
|
{ now: streamingNow }
|
|
20252
20375
|
);
|
|
20253
|
-
return /* @__PURE__ */
|
|
20376
|
+
return /* @__PURE__ */ jsx59("div", { className: "flex justify-start gap-3 -ml-2", children: /* @__PURE__ */ jsx59("div", { className: "max-w-full rounded-2xl py-2.5", children: /* @__PURE__ */ jsx59(
|
|
20254
20377
|
AssistantStreamingIndicator,
|
|
20255
20378
|
{
|
|
20256
20379
|
status: fallbackStreamingStatus ?? "loading"
|
|
@@ -20261,7 +20384,7 @@ function Chat({
|
|
|
20261
20384
|
]
|
|
20262
20385
|
}
|
|
20263
20386
|
),
|
|
20264
|
-
!isAtBottom && messages.length > 0 && /* @__PURE__ */
|
|
20387
|
+
!isAtBottom && messages.length > 0 && /* @__PURE__ */ jsx59("div", { className: "sticky bottom-20 z-20 flex justify-center px-4 pointer-events-none", children: /* @__PURE__ */ jsx59(
|
|
20265
20388
|
Button,
|
|
20266
20389
|
{
|
|
20267
20390
|
type: "button",
|
|
@@ -20274,10 +20397,10 @@ function Chat({
|
|
|
20274
20397
|
onClick: () => scrollToBottom(true, true),
|
|
20275
20398
|
"aria-label": t("chat.scrollToBottom"),
|
|
20276
20399
|
title: t("chat.scrollToBottom"),
|
|
20277
|
-
children: /* @__PURE__ */
|
|
20400
|
+
children: /* @__PURE__ */ jsx59(ArrowDown2, { size: 16 })
|
|
20278
20401
|
}
|
|
20279
20402
|
) }),
|
|
20280
|
-
quoteSelection && /* @__PURE__ */
|
|
20403
|
+
quoteSelection && /* @__PURE__ */ jsx59(
|
|
20281
20404
|
"div",
|
|
20282
20405
|
{
|
|
20283
20406
|
className: "pointer-events-none fixed z-50",
|
|
@@ -20286,7 +20409,7 @@ function Chat({
|
|
|
20286
20409
|
left: `${quoteSelection.left}px`,
|
|
20287
20410
|
transform: "translateX(-50%)"
|
|
20288
20411
|
},
|
|
20289
|
-
children: /* @__PURE__ */
|
|
20412
|
+
children: /* @__PURE__ */ jsxs41(
|
|
20290
20413
|
Button,
|
|
20291
20414
|
{
|
|
20292
20415
|
type: "button",
|
|
@@ -20298,22 +20421,22 @@ function Chat({
|
|
|
20298
20421
|
"aria-label": t("composer.quoteSelection"),
|
|
20299
20422
|
title: t("composer.quoteSelection"),
|
|
20300
20423
|
children: [
|
|
20301
|
-
/* @__PURE__ */
|
|
20424
|
+
/* @__PURE__ */ jsx59(Quote, { size: 14 }),
|
|
20302
20425
|
t("composer.quoteSelection")
|
|
20303
20426
|
]
|
|
20304
20427
|
}
|
|
20305
20428
|
)
|
|
20306
20429
|
}
|
|
20307
20430
|
),
|
|
20308
|
-
/* @__PURE__ */
|
|
20431
|
+
/* @__PURE__ */ jsxs41(
|
|
20309
20432
|
"div",
|
|
20310
20433
|
{
|
|
20311
20434
|
"data-slot": "chatkit-chat-composer",
|
|
20312
20435
|
className: "mx-auto w-full p-2 sticky bottom-0 z-10 bg-background",
|
|
20313
20436
|
style: chatColumnStyle,
|
|
20314
20437
|
children: [
|
|
20315
|
-
threadErrorMessage && /* @__PURE__ */
|
|
20316
|
-
/* @__PURE__ */
|
|
20438
|
+
threadErrorMessage && /* @__PURE__ */ jsx59("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 }),
|
|
20439
|
+
/* @__PURE__ */ jsx59(
|
|
20317
20440
|
ChatAttachments,
|
|
20318
20441
|
{
|
|
20319
20442
|
ref: attachmentsRef,
|
|
@@ -20327,7 +20450,7 @@ function Chat({
|
|
|
20327
20450
|
onStateChange: setAttachmentState
|
|
20328
20451
|
}
|
|
20329
20452
|
),
|
|
20330
|
-
references.length > 0 && /* @__PURE__ */
|
|
20453
|
+
references.length > 0 && /* @__PURE__ */ jsx59("div", { className: "mb-3 flex flex-wrap gap-2", children: references.map((reference) => /* @__PURE__ */ jsx59(
|
|
20331
20454
|
ReferenceChip,
|
|
20332
20455
|
{
|
|
20333
20456
|
reference,
|
|
@@ -20341,7 +20464,7 @@ function Chat({
|
|
|
20341
20464
|
},
|
|
20342
20465
|
getReferenceKey(reference)
|
|
20343
20466
|
)) }),
|
|
20344
|
-
/* @__PURE__ */
|
|
20467
|
+
/* @__PURE__ */ jsx59(
|
|
20345
20468
|
DetachedRunRuntimeCapabilities,
|
|
20346
20469
|
{
|
|
20347
20470
|
options: detachedRunRuntimeCapabilityOptions,
|
|
@@ -20350,7 +20473,7 @@ function Chat({
|
|
|
20350
20473
|
onRemove: removeRunRuntimeCapability
|
|
20351
20474
|
}
|
|
20352
20475
|
),
|
|
20353
|
-
showGoalStatus && /* @__PURE__ */
|
|
20476
|
+
showGoalStatus && /* @__PURE__ */ jsxs41(
|
|
20354
20477
|
"div",
|
|
20355
20478
|
{
|
|
20356
20479
|
className: cn(
|
|
@@ -20358,7 +20481,7 @@ function Chat({
|
|
|
20358
20481
|
isGoalObjectiveExpanded ? "items-start" : "items-center"
|
|
20359
20482
|
),
|
|
20360
20483
|
children: [
|
|
20361
|
-
/* @__PURE__ */
|
|
20484
|
+
/* @__PURE__ */ jsx59(
|
|
20362
20485
|
Target3,
|
|
20363
20486
|
{
|
|
20364
20487
|
className: cn(
|
|
@@ -20367,13 +20490,13 @@ function Chat({
|
|
|
20367
20490
|
)
|
|
20368
20491
|
}
|
|
20369
20492
|
),
|
|
20370
|
-
/* @__PURE__ */
|
|
20371
|
-
/* @__PURE__ */
|
|
20372
|
-
/* @__PURE__ */
|
|
20373
|
-
threadGoal && /* @__PURE__ */
|
|
20374
|
-
isGoalLoading && /* @__PURE__ */
|
|
20493
|
+
/* @__PURE__ */ jsxs41("div", { className: "min-w-0 flex-1", children: [
|
|
20494
|
+
/* @__PURE__ */ jsxs41("div", { className: "flex min-w-0 items-center gap-2", children: [
|
|
20495
|
+
/* @__PURE__ */ jsx59("span", { className: "font-medium", children: t("chat.goal.label") }),
|
|
20496
|
+
threadGoal && /* @__PURE__ */ jsx59("span", { className: "shrink-0 rounded-md bg-muted px-1.5 py-0.5 text-[11px] text-muted-foreground", children: t(`chat.goal.status.${threadGoal.status}`) }),
|
|
20497
|
+
isGoalLoading && /* @__PURE__ */ jsx59(Loader211, { className: "size-3 animate-spin text-muted-foreground" })
|
|
20375
20498
|
] }),
|
|
20376
|
-
/* @__PURE__ */
|
|
20499
|
+
/* @__PURE__ */ jsx59(
|
|
20377
20500
|
"div",
|
|
20378
20501
|
{
|
|
20379
20502
|
className: cn(
|
|
@@ -20383,13 +20506,13 @@ function Chat({
|
|
|
20383
20506
|
children: goalError || threadGoal?.objective
|
|
20384
20507
|
}
|
|
20385
20508
|
),
|
|
20386
|
-
threadGoal && /* @__PURE__ */
|
|
20509
|
+
threadGoal && /* @__PURE__ */ jsx59("div", { className: "mt-1 flex flex-wrap gap-x-3 gap-y-1 text-[11px] text-muted-foreground", children: /* @__PURE__ */ jsx59("span", { children: t("chat.goal.elapsed", {
|
|
20387
20510
|
elapsed: formatGoalElapsed(displayedGoalElapsedSeconds)
|
|
20388
20511
|
}) }) })
|
|
20389
20512
|
] }),
|
|
20390
|
-
threadGoal && /* @__PURE__ */
|
|
20391
|
-
/* @__PURE__ */
|
|
20392
|
-
/* @__PURE__ */
|
|
20513
|
+
threadGoal && /* @__PURE__ */ jsxs41("div", { className: "flex shrink-0 items-center gap-1", children: [
|
|
20514
|
+
/* @__PURE__ */ jsxs41(Tooltip, { children: [
|
|
20515
|
+
/* @__PURE__ */ jsx59(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx59(
|
|
20393
20516
|
Button,
|
|
20394
20517
|
{
|
|
20395
20518
|
type: "button",
|
|
@@ -20400,13 +20523,13 @@ function Chat({
|
|
|
20400
20523
|
const prefix = "/goal edit ";
|
|
20401
20524
|
setComposerText(`${prefix}${threadGoal.objective}`);
|
|
20402
20525
|
},
|
|
20403
|
-
children: /* @__PURE__ */
|
|
20526
|
+
children: /* @__PURE__ */ jsx59(Pencil4, { className: "size-3" })
|
|
20404
20527
|
}
|
|
20405
20528
|
) }),
|
|
20406
|
-
/* @__PURE__ */
|
|
20529
|
+
/* @__PURE__ */ jsx59(TooltipContent, { children: t("chat.goal.edit") })
|
|
20407
20530
|
] }),
|
|
20408
|
-
/* @__PURE__ */
|
|
20409
|
-
/* @__PURE__ */
|
|
20531
|
+
/* @__PURE__ */ jsxs41(Tooltip, { children: [
|
|
20532
|
+
/* @__PURE__ */ jsx59(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx59(
|
|
20410
20533
|
Button,
|
|
20411
20534
|
{
|
|
20412
20535
|
type: "button",
|
|
@@ -20422,13 +20545,13 @@ function Chat({
|
|
|
20422
20545
|
executionType: "insert_invocation"
|
|
20423
20546
|
}
|
|
20424
20547
|
}),
|
|
20425
|
-
children: threadGoal.status === "paused" ? /* @__PURE__ */
|
|
20548
|
+
children: threadGoal.status === "paused" ? /* @__PURE__ */ jsx59(Play, { className: "size-3" }) : /* @__PURE__ */ jsx59(Pause, { className: "size-3" })
|
|
20426
20549
|
}
|
|
20427
20550
|
) }),
|
|
20428
|
-
/* @__PURE__ */
|
|
20551
|
+
/* @__PURE__ */ jsx59(TooltipContent, { children: threadGoal.status === "paused" ? t("chat.goal.resume") : t("chat.goal.pause") })
|
|
20429
20552
|
] }),
|
|
20430
|
-
/* @__PURE__ */
|
|
20431
|
-
/* @__PURE__ */
|
|
20553
|
+
/* @__PURE__ */ jsxs41(Tooltip, { children: [
|
|
20554
|
+
/* @__PURE__ */ jsx59(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx59(
|
|
20432
20555
|
Button,
|
|
20433
20556
|
{
|
|
20434
20557
|
type: "button",
|
|
@@ -20444,13 +20567,13 @@ function Chat({
|
|
|
20444
20567
|
executionType: "insert_invocation"
|
|
20445
20568
|
}
|
|
20446
20569
|
}),
|
|
20447
|
-
children: /* @__PURE__ */
|
|
20570
|
+
children: /* @__PURE__ */ jsx59(Trash23, { className: "size-3" })
|
|
20448
20571
|
}
|
|
20449
20572
|
) }),
|
|
20450
|
-
/* @__PURE__ */
|
|
20573
|
+
/* @__PURE__ */ jsx59(TooltipContent, { children: t("chat.goal.clear") })
|
|
20451
20574
|
] }),
|
|
20452
|
-
threadGoal.objective && !goalError && /* @__PURE__ */
|
|
20453
|
-
/* @__PURE__ */
|
|
20575
|
+
threadGoal.objective && !goalError && /* @__PURE__ */ jsxs41(Tooltip, { children: [
|
|
20576
|
+
/* @__PURE__ */ jsx59(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx59(
|
|
20454
20577
|
Button,
|
|
20455
20578
|
{
|
|
20456
20579
|
type: "button",
|
|
@@ -20459,7 +20582,7 @@ function Chat({
|
|
|
20459
20582
|
"aria-expanded": isGoalObjectiveExpanded,
|
|
20460
20583
|
"aria-label": isGoalObjectiveExpanded ? t("chat.goal.collapseObjective") : t("chat.goal.expandObjective"),
|
|
20461
20584
|
onClick: () => setIsGoalObjectiveExpanded((expanded) => !expanded),
|
|
20462
|
-
children: /* @__PURE__ */
|
|
20585
|
+
children: /* @__PURE__ */ jsx59(
|
|
20463
20586
|
ChevronDown5,
|
|
20464
20587
|
{
|
|
20465
20588
|
className: cn(
|
|
@@ -20470,13 +20593,13 @@ function Chat({
|
|
|
20470
20593
|
)
|
|
20471
20594
|
}
|
|
20472
20595
|
) }),
|
|
20473
|
-
/* @__PURE__ */
|
|
20596
|
+
/* @__PURE__ */ jsx59(TooltipContent, { children: isGoalObjectiveExpanded ? t("chat.goal.collapseObjective") : t("chat.goal.expandObjective") })
|
|
20474
20597
|
] })
|
|
20475
20598
|
] })
|
|
20476
20599
|
]
|
|
20477
20600
|
}
|
|
20478
20601
|
),
|
|
20479
|
-
/* @__PURE__ */
|
|
20602
|
+
/* @__PURE__ */ jsx59(
|
|
20480
20603
|
PendingRuntimeServices,
|
|
20481
20604
|
{
|
|
20482
20605
|
state: stream.runtimeActivities.sandboxServices,
|
|
@@ -20485,7 +20608,7 @@ function Chat({
|
|
|
20485
20608
|
className: hasPendingTodos || hasPendingFollowUps ? "mb-2" : void 0
|
|
20486
20609
|
}
|
|
20487
20610
|
),
|
|
20488
|
-
/* @__PURE__ */
|
|
20611
|
+
/* @__PURE__ */ jsx59(
|
|
20489
20612
|
PendingTodos,
|
|
20490
20613
|
{
|
|
20491
20614
|
snapshot: stream.todos,
|
|
@@ -20493,7 +20616,7 @@ function Chat({
|
|
|
20493
20616
|
className: hasPendingFollowUps ? "mb-2" : void 0
|
|
20494
20617
|
}
|
|
20495
20618
|
),
|
|
20496
|
-
/* @__PURE__ */
|
|
20619
|
+
/* @__PURE__ */ jsx59(
|
|
20497
20620
|
PendingFollowUps,
|
|
20498
20621
|
{
|
|
20499
20622
|
items: pendingFollowUps,
|
|
@@ -20506,7 +20629,7 @@ function Chat({
|
|
|
20506
20629
|
attachToComposer: true
|
|
20507
20630
|
}
|
|
20508
20631
|
),
|
|
20509
|
-
/* @__PURE__ */
|
|
20632
|
+
/* @__PURE__ */ jsx59(
|
|
20510
20633
|
RequestUserInputPanel,
|
|
20511
20634
|
{
|
|
20512
20635
|
request: stream.pendingRequestUserInput,
|
|
@@ -20515,7 +20638,7 @@ function Chat({
|
|
|
20515
20638
|
attachToComposer: true
|
|
20516
20639
|
}
|
|
20517
20640
|
),
|
|
20518
|
-
/* @__PURE__ */
|
|
20641
|
+
/* @__PURE__ */ jsx59(
|
|
20519
20642
|
HITLApprovalPanel,
|
|
20520
20643
|
{
|
|
20521
20644
|
request: stream.pendingHITLRequest,
|
|
@@ -20524,7 +20647,7 @@ function Chat({
|
|
|
20524
20647
|
attachToComposer: true
|
|
20525
20648
|
}
|
|
20526
20649
|
),
|
|
20527
|
-
runtimeCapabilityPalette && /* @__PURE__ */
|
|
20650
|
+
runtimeCapabilityPalette && /* @__PURE__ */ jsx59(
|
|
20528
20651
|
SlashPalette,
|
|
20529
20652
|
{
|
|
20530
20653
|
palette: runtimeCapabilityPalette,
|
|
@@ -20538,7 +20661,7 @@ function Chat({
|
|
|
20538
20661
|
onSelect: selectSlashPaletteOption
|
|
20539
20662
|
}
|
|
20540
20663
|
),
|
|
20541
|
-
/* @__PURE__ */
|
|
20664
|
+
/* @__PURE__ */ jsx59("form", { className: "flex items-end", onSubmit: handleSubmit, children: /* @__PURE__ */ jsxs41(
|
|
20542
20665
|
"div",
|
|
20543
20666
|
{
|
|
20544
20667
|
"data-slot": "composer-input-shell",
|
|
@@ -20552,7 +20675,7 @@ function Chat({
|
|
|
20552
20675
|
composerInputRoundedClass
|
|
20553
20676
|
),
|
|
20554
20677
|
children: [
|
|
20555
|
-
/* @__PURE__ */
|
|
20678
|
+
/* @__PURE__ */ jsx59(
|
|
20556
20679
|
"div",
|
|
20557
20680
|
{
|
|
20558
20681
|
ref: composerInputRef,
|
|
@@ -20574,19 +20697,19 @@ function Chat({
|
|
|
20574
20697
|
(missingConfig || isHistoryLoading || hasPendingInteractiveRequest) && "cursor-not-allowed opacity-50"
|
|
20575
20698
|
),
|
|
20576
20699
|
children: renderedComposerParts.map(
|
|
20577
|
-
(part, index) => part.type === "text" ? /* @__PURE__ */
|
|
20700
|
+
(part, index) => part.type === "text" ? /* @__PURE__ */ jsx59(React55.Fragment, { children: part.text }, `text-${index}`) : /* @__PURE__ */ jsx59(ComposerCapabilityToken, { part }, part.key)
|
|
20578
20701
|
)
|
|
20579
20702
|
},
|
|
20580
20703
|
composerDomVersion
|
|
20581
20704
|
),
|
|
20582
|
-
/* @__PURE__ */
|
|
20705
|
+
/* @__PURE__ */ jsxs41(
|
|
20583
20706
|
"div",
|
|
20584
20707
|
{
|
|
20585
20708
|
"data-slot": "composer-action-bar",
|
|
20586
20709
|
className: "pointer-events-none absolute inset-x-1.5 bottom-1 flex min-h-10 items-center justify-between gap-2",
|
|
20587
20710
|
children: [
|
|
20588
|
-
/* @__PURE__ */
|
|
20589
|
-
/* @__PURE__ */
|
|
20711
|
+
/* @__PURE__ */ jsxs41("div", { className: "pointer-events-none flex min-w-0 flex-1 items-center gap-1.5", children: [
|
|
20712
|
+
/* @__PURE__ */ jsx59("div", { className: "pointer-events-auto flex shrink-0 items-center gap-1.5", children: /* @__PURE__ */ jsx59(
|
|
20590
20713
|
ComposerMenu,
|
|
20591
20714
|
{
|
|
20592
20715
|
composer,
|
|
@@ -20604,20 +20727,20 @@ function Chat({
|
|
|
20604
20727
|
disabled: missingConfig || isHistoryLoading || hasPendingInteractiveRequest
|
|
20605
20728
|
}
|
|
20606
20729
|
) }),
|
|
20607
|
-
selectedTool && /* @__PURE__ */
|
|
20608
|
-
/* @__PURE__ */
|
|
20609
|
-
/* @__PURE__ */
|
|
20730
|
+
selectedTool && /* @__PURE__ */ jsxs41("span", { className: "pointer-events-auto inline-flex h-8 min-w-0 max-w-[14rem] shrink items-center gap-1.5 rounded-full bg-primary/10 px-2 text-xs font-medium text-primary transition-all duration-200", children: [
|
|
20731
|
+
/* @__PURE__ */ jsx59("span", { className: "truncate", children: selectedTool.shortLabel ?? selectedTool.label }),
|
|
20732
|
+
/* @__PURE__ */ jsx59(
|
|
20610
20733
|
"button",
|
|
20611
20734
|
{
|
|
20612
20735
|
type: "button",
|
|
20613
20736
|
onClick: () => setSelectedTool(null),
|
|
20614
20737
|
className: "shrink-0 rounded-full p-0.5 text-primary/70 hover:bg-primary/10 hover:text-primary",
|
|
20615
|
-
children: /* @__PURE__ */
|
|
20738
|
+
children: /* @__PURE__ */ jsx59(X9, { size: 12 })
|
|
20616
20739
|
}
|
|
20617
20740
|
)
|
|
20618
20741
|
] })
|
|
20619
20742
|
] }),
|
|
20620
|
-
/* @__PURE__ */
|
|
20743
|
+
/* @__PURE__ */ jsx59("div", { className: "pointer-events-auto shrink-0", children: /* @__PURE__ */ jsx59(
|
|
20621
20744
|
SendButton,
|
|
20622
20745
|
{
|
|
20623
20746
|
disabled: isSendDisabled,
|
|
@@ -20640,7 +20763,7 @@ function Chat({
|
|
|
20640
20763
|
]
|
|
20641
20764
|
}
|
|
20642
20765
|
) }),
|
|
20643
|
-
disclaimer?.text && /* @__PURE__ */
|
|
20766
|
+
disclaimer?.text && /* @__PURE__ */ jsx59(
|
|
20644
20767
|
"p",
|
|
20645
20768
|
{
|
|
20646
20769
|
className: cn(
|
|
@@ -20650,14 +20773,14 @@ function Chat({
|
|
|
20650
20773
|
children: disclaimer.text
|
|
20651
20774
|
}
|
|
20652
20775
|
),
|
|
20653
|
-
/* @__PURE__ */
|
|
20654
|
-
/* @__PURE__ */
|
|
20655
|
-
/* @__PURE__ */
|
|
20776
|
+
/* @__PURE__ */ jsxs41("div", { className: "mt-2 flex items-center justify-center gap-2 text-xs text-muted-foreground", children: [
|
|
20777
|
+
/* @__PURE__ */ jsx59("span", { children: t("chat.poweredBy") }),
|
|
20778
|
+
/* @__PURE__ */ jsx59(ContextUsageIndicator, { className: "absolute right-4" })
|
|
20656
20779
|
] })
|
|
20657
20780
|
]
|
|
20658
20781
|
}
|
|
20659
20782
|
),
|
|
20660
|
-
/* @__PURE__ */
|
|
20783
|
+
/* @__PURE__ */ jsx59(
|
|
20661
20784
|
SettingsSheet,
|
|
20662
20785
|
{
|
|
20663
20786
|
open: petSettingsOpen,
|
|
@@ -20667,11 +20790,11 @@ function Chat({
|
|
|
20667
20790
|
onSave: savePetLocalSettings
|
|
20668
20791
|
}
|
|
20669
20792
|
),
|
|
20670
|
-
/* @__PURE__ */
|
|
20793
|
+
/* @__PURE__ */ jsx59(PetBridge, { pet: effectivePet, state: petAutoState })
|
|
20671
20794
|
]
|
|
20672
20795
|
}
|
|
20673
20796
|
),
|
|
20674
|
-
taskSummaryAvailable && taskSummaryDocked && taskSummaryOpen && /* @__PURE__ */
|
|
20797
|
+
taskSummaryAvailable && taskSummaryDocked && taskSummaryOpen && /* @__PURE__ */ jsx59("div", { className: "pointer-events-none absolute right-5 top-3 z-20 max-h-[calc(100%-1.5rem)] w-80", children: /* @__PURE__ */ jsx59(
|
|
20675
20798
|
TaskSummaryPanel,
|
|
20676
20799
|
{
|
|
20677
20800
|
...taskSummaryProps,
|
|
@@ -20684,10 +20807,10 @@ function Chat({
|
|
|
20684
20807
|
}
|
|
20685
20808
|
|
|
20686
20809
|
// src/components/ui/separator.tsx
|
|
20687
|
-
import * as
|
|
20688
|
-
import { jsx as
|
|
20689
|
-
var Separator =
|
|
20690
|
-
({ className, orientation = "horizontal", ...props }, ref) => /* @__PURE__ */
|
|
20810
|
+
import * as React56 from "react";
|
|
20811
|
+
import { jsx as jsx60 } from "react/jsx-runtime";
|
|
20812
|
+
var Separator = React56.forwardRef(
|
|
20813
|
+
({ className, orientation = "horizontal", ...props }, ref) => /* @__PURE__ */ jsx60(
|
|
20691
20814
|
"div",
|
|
20692
20815
|
{
|
|
20693
20816
|
ref,
|