@xpert-ai/chatkit-ui 0.4.10 → 0.4.12
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-DDAF6NS1.js} +1 -1
- package/dist/app/assets/{abap-BpnyPh6e.js → abap-B5kuZMBU.js} +1 -1
- package/dist/app/assets/{abnf-CePQrE9v.js → abnf-vB7f2WMu.js} +1 -1
- package/dist/app/assets/{actionscript-CEbXXYWC.js → actionscript-DdKBH_MP.js} +1 -1
- package/dist/app/assets/{ada-6ojm7R_Z.js → ada-UAF-C5fV.js} +1 -1
- package/dist/app/assets/{agda-BJJMgT72.js → agda-Df0jhwc3.js} +1 -1
- package/dist/app/assets/{al-CjM03tR4.js → al-atU_jzsj.js} +1 -1
- package/dist/app/assets/{antlr4-CN9DxFQq.js → antlr4-DFy3C0i-.js} +1 -1
- package/dist/app/assets/{apacheconf-DIP0dEtR.js → apacheconf-oqf3cl-S.js} +1 -1
- package/dist/app/assets/{apex-Dk0IZjGB.js → apex-BH2e-BHs.js} +1 -1
- package/dist/app/assets/{apl-Bzb4FgpE.js → apl-DQSChDxy.js} +1 -1
- package/dist/app/assets/{applescript-B0UaluN5.js → applescript-DKiAqciQ.js} +1 -1
- package/dist/app/assets/{aql-CUf7Ed1z.js → aql-CaPJIphH.js} +1 -1
- package/dist/app/assets/{arc-CAj2CWKM.js → arc-CebqIIwp.js} +1 -1
- package/dist/app/assets/{architectureDiagram-Q4EWVU46-BOSyiusQ.js → architectureDiagram-Q4EWVU46-BGCwMfQN.js} +1 -1
- package/dist/app/assets/{arduino-B1HB_jXM.js → arduino-BBjE6dsG.js} +1 -1
- package/dist/app/assets/{arff-CPQ25yN1.js → arff-CNCoJ57r.js} +1 -1
- package/dist/app/assets/{asciidoc-DV5p79UO.js → asciidoc-DKCMYIb5.js} +1 -1
- package/dist/app/assets/{asm6502-CpY5r4lk.js → asm6502-KuppTAQi.js} +1 -1
- package/dist/app/assets/{asmatmel-CxbyxEbb.js → asmatmel-5HYURTVr.js} +1 -1
- package/dist/app/assets/{aspnet-CJaAnWH-.js → aspnet-VRY1dAhW.js} +1 -1
- package/dist/app/assets/{autohotkey-C582BAaU.js → autohotkey-Bgr_lUvQ.js} +1 -1
- package/dist/app/assets/{autoit-Ct1i1FKr.js → autoit-Dq59UEgn.js} +1 -1
- package/dist/app/assets/{avisynth-DtDpdH0z.js → avisynth-BlWjnAOD.js} +1 -1
- package/dist/app/assets/{avro-idl-B_TsIBE2.js → avro-idl-BQp8Ix-w.js} +1 -1
- package/dist/app/assets/{bash-DwYhdU-w.js → bash-LWvFzRGa.js} +1 -1
- package/dist/app/assets/{basic-C07QA6Vo.js → basic-VqcPtabW.js} +1 -1
- package/dist/app/assets/{batch-DjR7VTRm.js → batch-uVNhIbGZ.js} +1 -1
- package/dist/app/assets/{bbcode-CwHqfRZe.js → bbcode-CCcQPp5e.js} +1 -1
- package/dist/app/assets/{bicep-C1vVTkRE.js → bicep-Bb19eGzd.js} +1 -1
- package/dist/app/assets/{birb-CBTuHWN7.js → birb-4bthZwkl.js} +1 -1
- package/dist/app/assets/{bison-C08f83AH.js → bison-BF4Jifgg.js} +1 -1
- package/dist/app/assets/{blockDiagram-DXYQGD6D-BwfXbVr_.js → blockDiagram-DXYQGD6D-CgPQseHK.js} +1 -1
- package/dist/app/assets/{bnf-eixMjfhu.js → bnf-B1jl6Wb4.js} +1 -1
- package/dist/app/assets/{brainfuck-OXBW4BZH.js → brainfuck-B4A_qSfv.js} +1 -1
- package/dist/app/assets/{brightscript-BSDqAE-U.js → brightscript-BQKGhJ6R.js} +1 -1
- package/dist/app/assets/{bro-Bi8eHVX-.js → bro-B2NgcV4s.js} +1 -1
- package/dist/app/assets/{bsl-CEhRIRY7.js → bsl-BGr1F29Q.js} +1 -1
- package/dist/app/assets/{c-Czzvuksm.js → c-r9YaBxRP.js} +1 -1
- package/dist/app/assets/{c4Diagram-AHTNJAMY-BGp37t4h.js → c4Diagram-AHTNJAMY-Y45uJy2D.js} +1 -1
- package/dist/app/assets/{cfscript-BDye0SUz.js → cfscript-CQ4VHw9c.js} +1 -1
- package/dist/app/assets/{chaiscript-DapUhojE.js → chaiscript-DrQAGaNh.js} +1 -1
- package/dist/app/assets/channel-VVzQBc9p.js +1 -0
- package/dist/app/assets/{chunk-4BX2VUAB-xQQ1b4Co.js → chunk-4BX2VUAB-DR0YnzMw.js} +1 -1
- package/dist/app/assets/{chunk-4TB4RGXK-ChvEc_zS.js → chunk-4TB4RGXK-Dc4lLBE6.js} +1 -1
- package/dist/app/assets/{chunk-55IACEB6-CSgtZuqU.js → chunk-55IACEB6-C-TU0K9X.js} +1 -1
- package/dist/app/assets/{chunk-EDXVE4YY-D6bAHfe-.js → chunk-EDXVE4YY-BaOX0v_0.js} +1 -1
- package/dist/app/assets/{chunk-FMBD7UC4-CfqAGzwt.js → chunk-FMBD7UC4-D359WI80.js} +1 -1
- package/dist/app/assets/{chunk-OYMX7WX6-DppYEx9e.js → chunk-OYMX7WX6-BuRuBFpQ.js} +1 -1
- package/dist/app/assets/{chunk-QZHKN3VN-OcXmUBXK.js → chunk-QZHKN3VN-CyEi-ra2.js} +1 -1
- package/dist/app/assets/{chunk-YZCP3GAM-DEM4F_gM.js → chunk-YZCP3GAM-BEEy2K1W.js} +1 -1
- package/dist/app/assets/{cil-CkS5pr8z.js → cil-BuADaDKW.js} +1 -1
- package/dist/app/assets/classDiagram-6PBFFD2Q-e30oqMPQ.js +1 -0
- package/dist/app/assets/classDiagram-v2-HSJHXN6E-e30oqMPQ.js +1 -0
- package/dist/app/assets/{clike-BnesBfd1.js → clike-B1D1DBL3.js} +1 -1
- package/dist/app/assets/{clojure-CMTJuYgr.js → clojure-B3SPLK7c.js} +1 -1
- package/dist/app/assets/clone-qx55TFbv.js +1 -0
- package/dist/app/assets/{cmake-Bad4-rPE.js → cmake-COH8dih1.js} +1 -1
- package/dist/app/assets/{cobol-BVGOaTIA.js → cobol-C7vZDD37.js} +1 -1
- package/dist/app/assets/{coffeescript-BfGXelSK.js → coffeescript-B94CG8h3.js} +1 -1
- package/dist/app/assets/{concurnas-CIwpz7d6.js → concurnas-DhVx0CX_.js} +1 -1
- package/dist/app/assets/{coq-DSIeTmBw.js → coq-DYvqTP2L.js} +1 -1
- package/dist/app/assets/{core-aBCdKGFg.js → core-B-Vt8qye.js} +1 -1
- package/dist/app/assets/{cose-bilkent-S5V4N54A-BsOe3ZRA.js → cose-bilkent-S5V4N54A-cnDgdkBZ.js} +1 -1
- package/dist/app/assets/{cpp-6tyvrJuf.js → cpp-DepCH_qd.js} +1 -1
- package/dist/app/assets/{crystal-CiyZx3nA.js → crystal-D-5NBLXj.js} +1 -1
- package/dist/app/assets/{csharp-aV-8z_7S.js → csharp-nWa20obb.js} +1 -1
- package/dist/app/assets/{cshtml-DXQwMOL2.js → cshtml-7093-HJ_.js} +1 -1
- package/dist/app/assets/{csp-QFnPub4X.js → csp-JmmQah6c.js} +1 -1
- package/dist/app/assets/{css-NG8SQHFd.js → css-BuEd2fz2.js} +1 -1
- package/dist/app/assets/{css-extras-BYOlAC_J.js → css-extras-DiYkseu8.js} +1 -1
- package/dist/app/assets/{csv-CRVKaEXK.js → csv-Bbn7Sw0h.js} +1 -1
- package/dist/app/assets/{cypher-N4lavBWi.js → cypher-SppGYMTi.js} +1 -1
- package/dist/app/assets/{d-CXsOP2vo.js → d-nLANT3dy.js} +1 -1
- package/dist/app/assets/{dagre-KV5264BT-DeGuPXts.js → dagre-KV5264BT-B1i-BBiR.js} +1 -1
- package/dist/app/assets/{dart-QuR1URa-.js → dart-Dhl_qWV4.js} +1 -1
- package/dist/app/assets/{dataweave-DSZsHkWW.js → dataweave-DCCRWXjr.js} +1 -1
- package/dist/app/assets/{dax-316zZNcC.js → dax-BoA2R2N8.js} +1 -1
- package/dist/app/assets/{dhall-RmKM9GKI.js → dhall-DTGUaN-4.js} +1 -1
- package/dist/app/assets/{diagram-5BDNPKRD-rnVFbmh_.js → diagram-5BDNPKRD-Dow19hef.js} +1 -1
- package/dist/app/assets/{diagram-G4DWMVQ6-C_06tcEj.js → diagram-G4DWMVQ6-D0pE9nCA.js} +1 -1
- package/dist/app/assets/{diagram-MMDJMWI5-CU4PzLKC.js → diagram-MMDJMWI5-DbcRh2vE.js} +1 -1
- package/dist/app/assets/{diagram-TYMM5635-B6DWOJFf.js → diagram-TYMM5635-CXx2ZaT4.js} +1 -1
- package/dist/app/assets/{diff-D1VyyUNE.js → diff-2OXQn6o9.js} +1 -1
- package/dist/app/assets/{django-1g5s3FD9.js → django-CdPAzoCC.js} +1 -1
- package/dist/app/assets/{dns-zone-file-DPyAfyNh.js → dns-zone-file-BBwevRlw.js} +1 -1
- package/dist/app/assets/{docker-B6Ppya8s.js → docker-DjHVT1mA.js} +1 -1
- package/dist/app/assets/{dot-qEA9Iscp.js → dot-BSnCaGTC.js} +1 -1
- package/dist/app/assets/{ebnf-Dq27JvcF.js → ebnf-DdZmyGKH.js} +1 -1
- package/dist/app/assets/{editorconfig-DTKOOxka.js → editorconfig-CUSgZ2y_.js} +1 -1
- package/dist/app/assets/{eiffel-M573bWnZ.js → eiffel-DsJFaSFl.js} +1 -1
- package/dist/app/assets/{ejs-5_NMM1D1.js → ejs-BbBJ5QIA.js} +1 -1
- package/dist/app/assets/{elixir-Czvfyjv_.js → elixir-SDkPmJm7.js} +1 -1
- package/dist/app/assets/{elm-B8ew8DwL.js → elm-Dug0EDUq.js} +1 -1
- package/dist/app/assets/{erDiagram-SMLLAGMA-CLBUx2BT.js → erDiagram-SMLLAGMA-CeMLsOHD.js} +1 -1
- package/dist/app/assets/{erb-B6kN8bOV.js → erb-DyyrQtQr.js} +1 -1
- package/dist/app/assets/{erlang-DB9zwFPB.js → erlang-ChCNopdz.js} +1 -1
- package/dist/app/assets/{etlua-BO-uDffT.js → etlua-Dl5Qy9QZ.js} +1 -1
- package/dist/app/assets/{excel-formula-DggXv9UI.js → excel-formula-DwMTBw2T.js} +1 -1
- package/dist/app/assets/{factor-DyMYAmFt.js → factor-DauUqCmK.js} +1 -1
- package/dist/app/assets/{false-D6qsKvn8.js → false-BXnJ9_dh.js} +1 -1
- package/dist/app/assets/{firestore-security-rules-CmxC6hqr.js → firestore-security-rules-ORamZFqd.js} +1 -1
- package/dist/app/assets/{flow-CuYyVwSm.js → flow-21ezBa1O.js} +1 -1
- package/dist/app/assets/{flowDiagram-DWJPFMVM-BXqpXcQj.js → flowDiagram-DWJPFMVM-DFUCTxTh.js} +1 -1
- package/dist/app/assets/{fortran-B9VZ0rBH.js → fortran-Z9uQlm38.js} +1 -1
- package/dist/app/assets/{fsharp-GO7xyDtk.js → fsharp-DdLoygGu.js} +1 -1
- package/dist/app/assets/{ftl-miAH75V3.js → ftl-DqQYPDj9.js} +1 -1
- package/dist/app/assets/{ganttDiagram-T4ZO3ILL-Dwt1tgUY.js → ganttDiagram-T4ZO3ILL-D3MmdPUG.js} +1 -1
- package/dist/app/assets/{gap-CId1dUrj.js → gap-DpSNB7Jg.js} +1 -1
- package/dist/app/assets/{gcode-C59Bc_Q_.js → gcode-CBAQGw-1.js} +1 -1
- package/dist/app/assets/{gdscript-fCaxiH5y.js → gdscript-BsIrRHU-.js} +1 -1
- package/dist/app/assets/{gedcom-Fz0PyMGL.js → gedcom-CGU-RC0C.js} +1 -1
- package/dist/app/assets/{gherkin-DpCy-yO5.js → gherkin-DIE5QZSL.js} +1 -1
- package/dist/app/assets/{git-CDabPQd8.js → git-CkU9sVQK.js} +1 -1
- package/dist/app/assets/{gitGraphDiagram-UUTBAWPF-DKdTEA1Q.js → gitGraphDiagram-UUTBAWPF-u7-eDWQK.js} +1 -1
- package/dist/app/assets/{glsl-CAuBdubM.js → glsl-Blh9LfIt.js} +1 -1
- package/dist/app/assets/{gml-B1-KFSC-.js → gml-Cc45yLFS.js} +1 -1
- package/dist/app/assets/{gn-z9JlBynS.js → gn-DZ0DddHN.js} +1 -1
- package/dist/app/assets/{go-Bh8RVnCA.js → go-mGyH9IXp.js} +1 -1
- package/dist/app/assets/{go-module-BxEHBAUj.js → go-module-BvUYZ0sz.js} +1 -1
- package/dist/app/assets/{graph-C5VCXRja.js → graph-BoY8t1-O.js} +1 -1
- package/dist/app/assets/{graphql-UVwaZqUP.js → graphql-u2Rgmvln.js} +1 -1
- package/dist/app/assets/{groovy-Bm3Dr_U_.js → groovy-zZaRUKNR.js} +1 -1
- package/dist/app/assets/{haml-BQkZhweN.js → haml-Su2CtJnF.js} +1 -1
- package/dist/app/assets/{handlebars-UliZj7od.js → handlebars-F5ADzMhi.js} +1 -1
- package/dist/app/assets/{haskell-EGerwJvN.js → haskell-DzWmpx32.js} +1 -1
- package/dist/app/assets/{haxe-f4j0SE6I.js → haxe-BGpweLG2.js} +1 -1
- package/dist/app/assets/{hcl-CuuY0fvP.js → hcl-BjhBcKSg.js} +1 -1
- package/dist/app/assets/{hlsl-C4nrcroF.js → hlsl-SjDbMdjn.js} +1 -1
- package/dist/app/assets/{hoon-YAf2AIOr.js → hoon-Cx3E-s_o.js} +1 -1
- package/dist/app/assets/{hpkp-ClJhCK_W.js → hpkp-DPoMyYoU.js} +1 -1
- package/dist/app/assets/{hsts-CEpwd5fr.js → hsts-lhpshNTY.js} +1 -1
- package/dist/app/assets/{http-BR64Nyk9.js → http-C3R3gVhT.js} +1 -1
- package/dist/app/assets/{ichigojam-DTWmfCcD.js → ichigojam-CwUu39sX.js} +1 -1
- package/dist/app/assets/{icon-D0qxhzhu.js → icon-TJHjWHXx.js} +1 -1
- package/dist/app/assets/{icu-message-format-Cr2MhD47.js → icu-message-format-DxKTlbxf.js} +1 -1
- package/dist/app/assets/{idris-D6urX37y.js → idris-DWqaccK2.js} +1 -1
- package/dist/app/assets/{iecst-D9PNLpyA.js → iecst-DORlcjzm.js} +1 -1
- package/dist/app/assets/{ignore-hxaHGT6e.js → ignore-B9gAYbh1.js} +1 -1
- package/dist/app/assets/index-CUC_NpQM.js +762 -0
- package/dist/app/assets/index-CtioO_Xd.css +1 -0
- package/dist/app/assets/{infoDiagram-42DDH7IO-CCZ9EqBH.js → infoDiagram-42DDH7IO-tYjxziGL.js} +1 -1
- package/dist/app/assets/{inform7-DGwJlX9w.js → inform7-DkK-RZMY.js} +1 -1
- package/dist/app/assets/{ini-HbQ_pZ9w.js → ini-0w9Xb91U.js} +1 -1
- package/dist/app/assets/{io-Dhyv4fqE.js → io-DvaCkiMR.js} +1 -1
- package/dist/app/assets/{ishikawaDiagram-UXIWVN3A-CnOAK-IZ.js → ishikawaDiagram-UXIWVN3A-2JB0y6an.js} +1 -1
- package/dist/app/assets/{j-DAcUG2zB.js → j-C0RkbTNn.js} +1 -1
- package/dist/app/assets/{java-CdeMY3IG.js → java-D75f0yzo.js} +1 -1
- package/dist/app/assets/{javadoc-BeQ0Pg6D.js → javadoc-DJI4x2pb.js} +1 -1
- package/dist/app/assets/{javadoclike-DPYVfShk.js → javadoclike-CDXreW48.js} +1 -1
- package/dist/app/assets/{javascript-BGlZ4jdn.js → javascript-CYoWsxZG.js} +1 -1
- package/dist/app/assets/{javastacktrace-Jex9eXtr.js → javastacktrace-DxkS056-.js} +1 -1
- package/dist/app/assets/{jexl-BFt920Jf.js → jexl-CDS1hv_s.js} +1 -1
- package/dist/app/assets/{jolie-YCJV5cqd.js → jolie-EuNI73RV.js} +1 -1
- package/dist/app/assets/{journeyDiagram-VCZTEJTY-C5RrtwyC.js → journeyDiagram-VCZTEJTY-B1X5hCIz.js} +1 -1
- package/dist/app/assets/{jq-BlHh9d3G.js → jq-PhGKEDcu.js} +1 -1
- package/dist/app/assets/{js-extras-DqpdICye.js → js-extras-jtc33ycC.js} +1 -1
- package/dist/app/assets/{js-templates-CvnMgk4Z.js → js-templates-B3cXQFLp.js} +1 -1
- package/dist/app/assets/{jsdoc-D4a3LTWc.js → jsdoc-CqjI_w-r.js} +1 -1
- package/dist/app/assets/{json-Deb7FFLA.js → json-Ne2BRWg4.js} +1 -1
- package/dist/app/assets/{json5-BJMK5K1n.js → json5-CiKaM-_C.js} +1 -1
- package/dist/app/assets/{jsonp-C04DhIsm.js → jsonp-zvJEur-6.js} +1 -1
- package/dist/app/assets/{jsstacktrace-dnLb08RQ.js → jsstacktrace-CiHGr1oh.js} +1 -1
- package/dist/app/assets/{jsx-qoVtXIf0.js → jsx-Cjxo93ea.js} +1 -1
- package/dist/app/assets/{julia-Din5szlb.js → julia-BRHMuu5e.js} +1 -1
- package/dist/app/assets/{kanban-definition-6JOO6SKY-CbNOvC3e.js → kanban-definition-6JOO6SKY-DOIj_2Hw.js} +1 -1
- package/dist/app/assets/{keepalived-B4pmJFAA.js → keepalived-B17LIaaB.js} +1 -1
- package/dist/app/assets/{keyman-GZkMiOR4.js → keyman-BC0CTO_c.js} +1 -1
- package/dist/app/assets/{kotlin-BaVFlKSj.js → kotlin-DSDl2yr2.js} +1 -1
- package/dist/app/assets/{kumir-BYgnVncN.js → kumir-DH3qkefY.js} +1 -1
- package/dist/app/assets/{kusto-iC0N6VZB.js → kusto-CJxTK0ap.js} +1 -1
- package/dist/app/assets/{latex-DJsq4A7S.js → latex-BN2yX_Ed.js} +1 -1
- package/dist/app/assets/{latte-4-D5JQy6.js → latte-Bvavolyx.js} +1 -1
- package/dist/app/assets/{layout-woS_Ptld.js → layout-DGwxOXfn.js} +1 -1
- package/dist/app/assets/{less-BEGF0T8s.js → less-BHMIRXn5.js} +1 -1
- package/dist/app/assets/{lilypond-DaScaqz9.js → lilypond-Dks2Yn4E.js} +1 -1
- package/dist/app/assets/{linear-BihMu0qn.js → linear-BbQHAsyX.js} +1 -1
- package/dist/app/assets/{liquid-D0JwjezM.js → liquid-1Rh_VBgV.js} +1 -1
- package/dist/app/assets/{lisp-Ba08UZ8Y.js → lisp-B8F7GnzZ.js} +1 -1
- package/dist/app/assets/{livescript-Ba6INIPm.js → livescript-CnMl3GUW.js} +1 -1
- package/dist/app/assets/{llvm-B0HbpJgY.js → llvm-kit0j3fk.js} +1 -1
- package/dist/app/assets/{log-CUZTDc-a.js → log-BceSrVhl.js} +1 -1
- package/dist/app/assets/{lolcode-D40bzDOF.js → lolcode-BnIVqr1e.js} +1 -1
- package/dist/app/assets/{lua-jHZMGpQf.js → lua-T-5MUo9C.js} +1 -1
- package/dist/app/assets/{magma-BMKUCiAE.js → magma-gHe2O1FT.js} +1 -1
- package/dist/app/assets/{makefile-CrnMbIy3.js → makefile-bjFHqbvE.js} +1 -1
- package/dist/app/assets/{markdown-BpxRx0s_.js → markdown-CuFRHNGb.js} +1 -1
- package/dist/app/assets/{markup-D_2bSIGF.js → markup-BvcMGiKs.js} +1 -1
- package/dist/app/assets/{markup-templating-BQJ4eRFE.js → markup-templating-BmOIQpVF.js} +1 -1
- package/dist/app/assets/{matlab-uyhAjnN1.js → matlab-MUaweOP2.js} +1 -1
- package/dist/app/assets/{maxscript-H8QAZVCr.js → maxscript-C-vFH8dn.js} +1 -1
- package/dist/app/assets/{mel-Os9gRUqz.js → mel-Des6FEsu.js} +1 -1
- package/dist/app/assets/{mermaid-B2iIz3n5.js → mermaid-uLNvYeU7.js} +1 -1
- package/dist/app/assets/{min-BTBcsdCC.js → min-xlulTJHq.js} +1 -1
- package/dist/app/assets/{mindmap-definition-QFDTVHPH-Dvj885ud.js → mindmap-definition-QFDTVHPH-CfBB94BK.js} +1 -1
- package/dist/app/assets/{mizar-D9MjA9UN.js → mizar-D6rM1QfB.js} +1 -1
- package/dist/app/assets/{mongodb-Dn0muF6d.js → mongodb-yE586N9z.js} +1 -1
- package/dist/app/assets/{monkey-DOTSILMn.js → monkey-F6R8O6cT.js} +1 -1
- package/dist/app/assets/{moonscript-DfQiWdI-.js → moonscript-BRGQgk_O.js} +1 -1
- package/dist/app/assets/{n1ql-Di7PgXpN.js → n1ql-C5HrwbXh.js} +1 -1
- package/dist/app/assets/{n4js-4FGHhLWQ.js → n4js-CJi-EH8r.js} +1 -1
- package/dist/app/assets/{nand2tetris-hdl-RPNTjDij.js → nand2tetris-hdl-DxBTUunr.js} +1 -1
- package/dist/app/assets/{naniscript-DlBeU5rv.js → naniscript-BBXcDzDo.js} +1 -1
- package/dist/app/assets/{nasm-DOfW-U1c.js → nasm-CXaelFZU.js} +1 -1
- package/dist/app/assets/{neon-DIaK0ba7.js → neon-DoPefS15.js} +1 -1
- package/dist/app/assets/{nevod-MZznxw70.js → nevod-CX8n8gut.js} +1 -1
- package/dist/app/assets/{nginx-B_evwEEx.js → nginx-BXXCb5zs.js} +1 -1
- package/dist/app/assets/{nim-CKV8H1in.js → nim-Dryxvpf7.js} +1 -1
- package/dist/app/assets/{nix-snnJAJ52.js → nix-C3SgS0sm.js} +1 -1
- package/dist/app/assets/{nsis-BkQHvfnw.js → nsis-CuoIbU9u.js} +1 -1
- package/dist/app/assets/{objectivec-MasMMXjt.js → objectivec-ByW5tlUk.js} +1 -1
- package/dist/app/assets/{ocaml-DfMICclm.js → ocaml-BwrG1vxe.js} +1 -1
- package/dist/app/assets/{opencl-DMGsaXz-.js → opencl-DUXY7e6n.js} +1 -1
- package/dist/app/assets/{openqasm-HESEWwwi.js → openqasm--XSPIHP9.js} +1 -1
- package/dist/app/assets/{oz-Dnbv1xyS.js → oz-BxcK1fCk.js} +1 -1
- package/dist/app/assets/{parigp-BA7vMMvc.js → parigp-Cq_RScYD.js} +1 -1
- package/dist/app/assets/{parser-CpgehIIr.js → parser-BhBh9_yj.js} +1 -1
- package/dist/app/assets/{pascal-CHpGLduo.js → pascal-B8xwG_-H.js} +1 -1
- package/dist/app/assets/{pascaligo-gC_Fmy9X.js → pascaligo-DVI5vd0W.js} +1 -1
- package/dist/app/assets/{pcaxis-ClUcRdeO.js → pcaxis-CVhxW8dN.js} +1 -1
- package/dist/app/assets/{peoplecode-DQzgxy54.js → peoplecode-6atfhw90.js} +1 -1
- package/dist/app/assets/{perl-oGp9SxLw.js → perl-Bii6ZVZr.js} +1 -1
- package/dist/app/assets/{php-DgxqR0GZ.js → php-CUw8Uhwa.js} +1 -1
- package/dist/app/assets/{php-extras-BfS-aY8o.js → php-extras-DPujDZz7.js} +1 -1
- package/dist/app/assets/{phpdoc-BmMoLBHI.js → phpdoc-DfEawTrK.js} +1 -1
- package/dist/app/assets/{pieDiagram-DEJITSTG-DZ0yFuk7.js → pieDiagram-DEJITSTG-BdxkrLEe.js} +1 -1
- package/dist/app/assets/{plsql-CPXmCYYW.js → plsql-BwYNPHZc.js} +1 -1
- package/dist/app/assets/{powerquery-FtFYTUVW.js → powerquery-BQQvuflw.js} +1 -1
- package/dist/app/assets/{powershell-DuDoHsht.js → powershell-IqR72QQg.js} +1 -1
- package/dist/app/assets/{processing-CjEmSLbF.js → processing-DBFWv5cx.js} +1 -1
- package/dist/app/assets/{prolog-BrB4XKYQ.js → prolog-IDQzlcDI.js} +1 -1
- package/dist/app/assets/{promql-Bo3Yo-85.js → promql-pvhJxEyv.js} +1 -1
- package/dist/app/assets/{properties-C12E8Vrx.js → properties-DMEQb5Fo.js} +1 -1
- package/dist/app/assets/{protobuf-ZSbyt_tp.js → protobuf-pPaOApuw.js} +1 -1
- package/dist/app/assets/{psl-C8BZ04EB.js → psl-7h3UTxBj.js} +1 -1
- package/dist/app/assets/{pug-tFtksCnz.js → pug-BSBM9dXD.js} +1 -1
- package/dist/app/assets/{puppet-DIKGEmsp.js → puppet-dYx_z5u4.js} +1 -1
- package/dist/app/assets/{pure-Dl1I5Uf9.js → pure-DV_eZfCY.js} +1 -1
- package/dist/app/assets/{purebasic-BKUq9_IV.js → purebasic-BOeezX__.js} +1 -1
- package/dist/app/assets/{purescript-BfKdBG7f.js → purescript-BgbK6O1d.js} +1 -1
- package/dist/app/assets/{q-Bc-J6oNm.js → q-DXmJs7IN.js} +1 -1
- package/dist/app/assets/{qml-CtblfTL-.js → qml-CXjat1gE.js} +1 -1
- package/dist/app/assets/{qore-C_WhRfpS.js → qore-DJTbKkUa.js} +1 -1
- package/dist/app/assets/{qsharp-CkQWjHnz.js → qsharp-D7KET1nO.js} +1 -1
- package/dist/app/assets/{quadrantDiagram-34T5L4WZ-BFAfZEAg.js → quadrantDiagram-34T5L4WZ-BZQlafcX.js} +1 -1
- package/dist/app/assets/{r-BLXGPVPD.js → r-ojalpXiN.js} +1 -1
- package/dist/app/assets/{racket-E6RQ7R9a.js → racket-CEfT6hAc.js} +1 -1
- package/dist/app/assets/{reason-DCm-poIN.js → reason-DBNmE4oL.js} +1 -1
- package/dist/app/assets/{regex-BQMYuSFJ.js → regex-COhTZxZE.js} +1 -1
- package/dist/app/assets/{rego-kN2r0Pui.js → rego-wNAgtW3q.js} +1 -1
- package/dist/app/assets/{renpy-ifyhyky1.js → renpy-DGwLL0fG.js} +1 -1
- package/dist/app/assets/{requirementDiagram-MS252O5E-Cy6vLX6y.js → requirementDiagram-MS252O5E-CcAhbUz5.js} +1 -1
- package/dist/app/assets/{rest-sNHXO2Rp.js → rest-DYSbFKPV.js} +1 -1
- package/dist/app/assets/{rip-DiG06njh.js → rip-Bfbupelm.js} +1 -1
- package/dist/app/assets/{roboconf-Go3FkVXZ.js → roboconf-DAfuDy2O.js} +1 -1
- package/dist/app/assets/{robotframework-B0KjSDge.js → robotframework-BUPkauKC.js} +1 -1
- package/dist/app/assets/{ruby-lembbibU.js → ruby-9VNUAQYV.js} +1 -1
- package/dist/app/assets/{rust-lLanU6M8.js → rust-BeuepAML.js} +1 -1
- package/dist/app/assets/{sankeyDiagram-XADWPNL6-CHNcaRfC.js → sankeyDiagram-XADWPNL6-jLgXeIwH.js} +1 -1
- package/dist/app/assets/{sas-CepPfFuK.js → sas-e7kS8SsS.js} +1 -1
- package/dist/app/assets/{sass-CJ9PFEHC.js → sass-DYKC0MKE.js} +1 -1
- package/dist/app/assets/{scala-BOTmxIAg.js → scala-ClrUfcj7.js} +1 -1
- package/dist/app/assets/{scheme-DebY6fXZ.js → scheme-CfwROFXg.js} +1 -1
- package/dist/app/assets/{scss-I831DfbF.js → scss-2lQldpbe.js} +1 -1
- package/dist/app/assets/{sequenceDiagram-FGHM5R23-B262jGYI.js → sequenceDiagram-FGHM5R23-B2LyA3XJ.js} +1 -1
- package/dist/app/assets/{shell-session-Bc2Vf63x.js → shell-session-DPaZHV-K.js} +1 -1
- package/dist/app/assets/{smali-BvHZ9KC5.js → smali-CKuJc0cP.js} +1 -1
- package/dist/app/assets/{smalltalk-CnJHUQDi.js → smalltalk-PubA0-OK.js} +1 -1
- package/dist/app/assets/{smarty-C52pWLjT.js → smarty-_JLI79Cv.js} +1 -1
- package/dist/app/assets/{sml-BIsAmqJZ.js → sml-Bg8pvE9C.js} +1 -1
- package/dist/app/assets/{solidity-CmIQhZ4P.js → solidity-DP74t6-m.js} +1 -1
- package/dist/app/assets/{solution-file-BIQSOYlV.js → solution-file-CstqiDH0.js} +1 -1
- package/dist/app/assets/{soy-3fx5uUfg.js → soy-QD4r-fge.js} +1 -1
- package/dist/app/assets/{sparql-BVOpxY0k.js → sparql-Ctv8wN_S.js} +1 -1
- package/dist/app/assets/{splunk-spl-BY78MSNc.js → splunk-spl-DXfTugwh.js} +1 -1
- package/dist/app/assets/{sqf-C829Cqkw.js → sqf-DDYE8u1s.js} +1 -1
- package/dist/app/assets/{sql-BjXleg-C.js → sql-CwcCLvnC.js} +1 -1
- package/dist/app/assets/{squirrel-hVXB9A_k.js → squirrel-Cnsc9D7K.js} +1 -1
- package/dist/app/assets/{stan-DR8-Ksro.js → stan-AKGk2epv.js} +1 -1
- package/dist/app/assets/{stateDiagram-FHFEXIEX-DASFzkGA.js → stateDiagram-FHFEXIEX-BSl_DTWy.js} +1 -1
- package/dist/app/assets/stateDiagram-v2-QKLJ7IA2-BJqUpXJV.js +1 -0
- package/dist/app/assets/{stylus-BLgROJFn.js → stylus-BZzQ2RYd.js} +1 -1
- package/dist/app/assets/{swift-BFiTbikL.js → swift-DE2c2XNt.js} +1 -1
- package/dist/app/assets/{systemd-BH7-HakT.js → systemd-B4iOELli.js} +1 -1
- package/dist/app/assets/{t4-cs-BhRgiInj.js → t4-cs-Drfumg_5.js} +1 -1
- package/dist/app/assets/{t4-templating-DVcctKts.js → t4-templating-CWe1Wj1T.js} +1 -1
- package/dist/app/assets/{t4-vb-BWdGVqZt.js → t4-vb-Dw48h-8D.js} +1 -1
- package/dist/app/assets/{tap-O_XkewC5.js → tap-QOawf4s6.js} +1 -1
- package/dist/app/assets/{tcl-yX1XNQSP.js → tcl-DCNBICRw.js} +1 -1
- package/dist/app/assets/{textile-BLezi3e1.js → textile-DIZodGDg.js} +1 -1
- package/dist/app/assets/{timeline-definition-GMOUNBTQ-BNGwgyTF.js → timeline-definition-GMOUNBTQ-Z9RQmNUy.js} +1 -1
- package/dist/app/assets/{toml-Eph7qw5M.js → toml-CiK0hA2t.js} +1 -1
- package/dist/app/assets/{tremor-CSl2ZVP1.js → tremor-zgXyG1cv.js} +1 -1
- package/dist/app/assets/{tt2-0Brdd3gb.js → tt2-D1YpVJXr.js} +1 -1
- package/dist/app/assets/{turtle-Cc0fFjp3.js → turtle-B1trqDSm.js} +1 -1
- package/dist/app/assets/{twig-Dt5yL5pH.js → twig-Bf9SEHBb.js} +1 -1
- package/dist/app/assets/{typescript-gPQes0uv.js → typescript-C-4JYtNM.js} +1 -1
- package/dist/app/assets/{typoscript-J9BtBWlv.js → typoscript-hB_DOtTY.js} +1 -1
- package/dist/app/assets/{unrealscript-g2cMrNeY.js → unrealscript-D8m_f-UH.js} +1 -1
- package/dist/app/assets/{uorazor-ChupejQE.js → uorazor-7OFkiaZN.js} +1 -1
- package/dist/app/assets/{uri-DKyJK53l.js → uri-Bg5uoy-A.js} +1 -1
- package/dist/app/assets/{v-gE-bfjKA.js → v-crNEWQ0o.js} +1 -1
- package/dist/app/assets/{vala-COAZWYR5.js → vala-I7-r3sF5.js} +1 -1
- package/dist/app/assets/{vbnet-Bu2O5wTQ.js → vbnet-Ch5CuGnJ.js} +1 -1
- package/dist/app/assets/{velocity-QORnuopg.js → velocity-DOxzqRXl.js} +1 -1
- package/dist/app/assets/{vennDiagram-DHZGUBPP-7IQLntaa.js → vennDiagram-DHZGUBPP-YeOFYz1P.js} +1 -1
- package/dist/app/assets/{verilog-qxGjqHLf.js → verilog-D41Pfqh8.js} +1 -1
- package/dist/app/assets/{vhdl-cIq_dULQ.js → vhdl-CTcWCQJD.js} +1 -1
- package/dist/app/assets/{vim-DY-IJIKY.js → vim-BuN7t_SM.js} +1 -1
- package/dist/app/assets/{visual-basic-Coo2C3Qj.js → visual-basic-JQAH8AZk.js} +1 -1
- package/dist/app/assets/{wardley-RL74JXVD-D5caMcOT.js → wardley-RL74JXVD-BUjHb5HT.js} +1 -1
- package/dist/app/assets/{wardleyDiagram-NUSXRM2D-BbTN3RD2.js → wardleyDiagram-NUSXRM2D-C15gNPrf.js} +1 -1
- package/dist/app/assets/{warpscript-BaMVI_Yi.js → warpscript-Ch53ljcr.js} +1 -1
- package/dist/app/assets/{wasm-C1KcjV4l.js → wasm-BOYqb1W1.js} +1 -1
- package/dist/app/assets/{web-idl-C1V0GjBc.js → web-idl-B-9jGBdG.js} +1 -1
- package/dist/app/assets/{wiki-QJuJkorv.js → wiki-BED0tcyV.js} +1 -1
- package/dist/app/assets/{wolfram-fbFFHeKH.js → wolfram-BzxMBieL.js} +1 -1
- package/dist/app/assets/{wren-CZ1XKEHc.js → wren-BGHq8rsm.js} +1 -1
- package/dist/app/assets/{xeora-O0sY3eom.js → xeora-B9qNkvY8.js} +1 -1
- package/dist/app/assets/{xml-doc-Bs1K40y6.js → xml-doc-DSfu_FBO.js} +1 -1
- package/dist/app/assets/{xojo-DsepgQ0E.js → xojo-BT2W_WXT.js} +1 -1
- package/dist/app/assets/{xquery-C2-xF6LZ.js → xquery-D1t5F9ed.js} +1 -1
- package/dist/app/assets/{xychartDiagram-5P7HB3ND-D_u6cobc.js → xychartDiagram-5P7HB3ND-DCVn10Kq.js} +1 -1
- package/dist/app/assets/{yaml-CSCOF77O.js → yaml-D2dqe7Hw.js} +1 -1
- package/dist/app/assets/{yang-Dupiqe8o.js → yang-5UPIMSAR.js} +1 -1
- package/dist/app/assets/{zig-BVtaAQ9o.js → zig-BvxlkZ0r.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.cjs
CHANGED
|
@@ -67,8 +67,8 @@ __export(index_exports, {
|
|
|
67
67
|
module.exports = __toCommonJS(index_exports);
|
|
68
68
|
|
|
69
69
|
// src/components/chat.tsx
|
|
70
|
-
var
|
|
71
|
-
var
|
|
70
|
+
var React55 = __toESM(require("react"), 1);
|
|
71
|
+
var import_lucide_react32 = require("lucide-react");
|
|
72
72
|
var import_chatkit_types14 = require("@xpert-ai/chatkit-types");
|
|
73
73
|
|
|
74
74
|
// src/lib/utils.ts
|
|
@@ -825,6 +825,7 @@ function isRuntimeCapabilitiesSelection(value) {
|
|
|
825
825
|
|
|
826
826
|
// src/providers/ParentMessenger.tsx
|
|
827
827
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
828
|
+
var CHATKIT_INTERNAL_PARENT_EVENT = "chatkit:internal-parent-event";
|
|
828
829
|
var handledSendUserMessageNonces = /* @__PURE__ */ new Set();
|
|
829
830
|
var handledSendUserMessageEvents = /* @__PURE__ */ new WeakSet();
|
|
830
831
|
var getParentOrigin = () => {
|
|
@@ -1142,6 +1143,16 @@ function ParentMessengerProvider({
|
|
|
1142
1143
|
);
|
|
1143
1144
|
const sendEvent = (0, import_react.useCallback)(
|
|
1144
1145
|
(event, data, transfer) => {
|
|
1146
|
+
if (typeof window !== "undefined") {
|
|
1147
|
+
window.dispatchEvent(
|
|
1148
|
+
new CustomEvent(
|
|
1149
|
+
CHATKIT_INTERNAL_PARENT_EVENT,
|
|
1150
|
+
{
|
|
1151
|
+
detail: { event, data }
|
|
1152
|
+
}
|
|
1153
|
+
)
|
|
1154
|
+
);
|
|
1155
|
+
}
|
|
1145
1156
|
if (!isParentAvailable) return;
|
|
1146
1157
|
const message = {
|
|
1147
1158
|
__xpaiChatKit: true,
|
|
@@ -2118,6 +2129,32 @@ var import_react_i18next = require("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");
|
|
@@ -16412,10 +16482,52 @@ function findDomPointForComposerOffset(root, offset) {
|
|
|
16412
16482
|
return result ?? { node: lastNode, offset: lastOffset };
|
|
16413
16483
|
}
|
|
16414
16484
|
|
|
16415
|
-
// src/
|
|
16485
|
+
// src/workbench/WorkbenchShell.tsx
|
|
16416
16486
|
var React51 = __toESM(require("react"), 1);
|
|
16487
|
+
var import_xpert_sdk2 = require("@xpert-ai/xpert-sdk");
|
|
16417
16488
|
var import_lucide_react29 = require("lucide-react");
|
|
16418
16489
|
var import_jsx_runtime56 = require("react/jsx-runtime");
|
|
16490
|
+
var WorkbenchContext = React51.createContext({
|
|
16491
|
+
enabled: false,
|
|
16492
|
+
open: false,
|
|
16493
|
+
loading: false,
|
|
16494
|
+
available: false,
|
|
16495
|
+
toggle: () => void 0
|
|
16496
|
+
});
|
|
16497
|
+
function useWorkbench() {
|
|
16498
|
+
return React51.useContext(WorkbenchContext);
|
|
16499
|
+
}
|
|
16500
|
+
function WorkbenchToggleButton() {
|
|
16501
|
+
const workbench = useWorkbench();
|
|
16502
|
+
const { t } = useChatkitTranslation();
|
|
16503
|
+
if (!workbench.enabled || workbench.open) return null;
|
|
16504
|
+
const label = t("workbench.open");
|
|
16505
|
+
const tooltip = workbench.disabledReason ?? label;
|
|
16506
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(Tooltip, { children: [
|
|
16507
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("span", { className: "inline-flex h-8 w-8", children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
16508
|
+
"button",
|
|
16509
|
+
{
|
|
16510
|
+
type: "button",
|
|
16511
|
+
onClick: workbench.toggle,
|
|
16512
|
+
disabled: !workbench.available,
|
|
16513
|
+
className: cn(
|
|
16514
|
+
"flex h-8 w-8 cursor-pointer items-center justify-center rounded-md",
|
|
16515
|
+
"text-muted-foreground transition-colors duration-150 hover:bg-muted hover:text-foreground",
|
|
16516
|
+
"disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50"
|
|
16517
|
+
),
|
|
16518
|
+
"aria-label": label,
|
|
16519
|
+
"aria-expanded": false,
|
|
16520
|
+
children: workbench.loading ? /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_lucide_react29.Loader2, { size: 16, className: "animate-spin" }) : /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_lucide_react29.PanelRight, { size: 16 })
|
|
16521
|
+
}
|
|
16522
|
+
) }) }),
|
|
16523
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(TooltipContent, { side: "bottom", children: tooltip })
|
|
16524
|
+
] });
|
|
16525
|
+
}
|
|
16526
|
+
|
|
16527
|
+
// src/components/chat/runtime-capabilities.tsx
|
|
16528
|
+
var React52 = __toESM(require("react"), 1);
|
|
16529
|
+
var import_lucide_react30 = require("lucide-react");
|
|
16530
|
+
var import_jsx_runtime57 = require("react/jsx-runtime");
|
|
16419
16531
|
function createComposerCapabilityInsertionParts(options) {
|
|
16420
16532
|
return options.flatMap((option) => [
|
|
16421
16533
|
createComposerCapabilityPart(option, createMessageId()),
|
|
@@ -16488,29 +16600,29 @@ function useRuntimeCapabilitiesState({
|
|
|
16488
16600
|
disabled,
|
|
16489
16601
|
composerParts
|
|
16490
16602
|
}) {
|
|
16491
|
-
const [runtimeCapabilities, setRuntimeCapabilities] =
|
|
16492
|
-
const [runtimeCapabilitiesReady, setRuntimeCapabilitiesReady] =
|
|
16493
|
-
const [sessionRuntimeCapabilities, setSessionRuntimeCapabilities] =
|
|
16603
|
+
const [runtimeCapabilities, setRuntimeCapabilities] = React52.useState(null);
|
|
16604
|
+
const [runtimeCapabilitiesReady, setRuntimeCapabilitiesReady] = React52.useState(false);
|
|
16605
|
+
const [sessionRuntimeCapabilities, setSessionRuntimeCapabilities] = React52.useState(
|
|
16494
16606
|
() => createEmptyRuntimeCapabilitiesSelection()
|
|
16495
16607
|
);
|
|
16496
|
-
const [runRuntimeCapabilities, setRunRuntimeCapabilities] =
|
|
16608
|
+
const [runRuntimeCapabilities, setRunRuntimeCapabilities] = React52.useState(
|
|
16497
16609
|
() => createEmptyRuntimeCapabilitiesSelection()
|
|
16498
16610
|
);
|
|
16499
|
-
const [runtimeCapabilityPalette, setRuntimeCapabilityPalette] =
|
|
16500
|
-
const runtimeCapabilityPreferenceLoadRef =
|
|
16501
|
-
const pendingExternalRuntimeCapabilitiesRef =
|
|
16502
|
-
const runtimeCapabilityOptions =
|
|
16611
|
+
const [runtimeCapabilityPalette, setRuntimeCapabilityPalette] = React52.useState(null);
|
|
16612
|
+
const runtimeCapabilityPreferenceLoadRef = React52.useRef(0);
|
|
16613
|
+
const pendingExternalRuntimeCapabilitiesRef = React52.useRef(null);
|
|
16614
|
+
const runtimeCapabilityOptions = React52.useMemo(
|
|
16503
16615
|
() => getRuntimeCapabilityOptions(runtimeCapabilities),
|
|
16504
16616
|
[runtimeCapabilities]
|
|
16505
16617
|
);
|
|
16506
|
-
const effectiveSessionRuntimeCapabilities =
|
|
16618
|
+
const effectiveSessionRuntimeCapabilities = React52.useMemo(
|
|
16507
16619
|
() => runtimeCapabilitiesReady && runtimeCapabilities ? mergeRuntimeCapabilitiesSelections(
|
|
16508
16620
|
runtimeCapabilities,
|
|
16509
16621
|
sessionRuntimeCapabilities
|
|
16510
16622
|
) : null,
|
|
16511
16623
|
[runtimeCapabilities, runtimeCapabilitiesReady, sessionRuntimeCapabilities]
|
|
16512
16624
|
);
|
|
16513
|
-
const runRuntimeCapabilityOptions =
|
|
16625
|
+
const runRuntimeCapabilityOptions = React52.useMemo(
|
|
16514
16626
|
() => runtimeCapabilityOptions.filter(
|
|
16515
16627
|
(option) => isRuntimeCapabilitySelected(
|
|
16516
16628
|
runRuntimeCapabilities,
|
|
@@ -16520,11 +16632,11 @@ function useRuntimeCapabilitiesState({
|
|
|
16520
16632
|
),
|
|
16521
16633
|
[runRuntimeCapabilities, runtimeCapabilityOptions]
|
|
16522
16634
|
);
|
|
16523
|
-
const composerRuntimeCapabilitySelectionKeys =
|
|
16635
|
+
const composerRuntimeCapabilitySelectionKeys = React52.useMemo(
|
|
16524
16636
|
() => getComposerCapabilitySelectionKeys(composerParts),
|
|
16525
16637
|
[composerParts]
|
|
16526
16638
|
);
|
|
16527
|
-
const detachedRunRuntimeCapabilityOptions =
|
|
16639
|
+
const detachedRunRuntimeCapabilityOptions = React52.useMemo(
|
|
16528
16640
|
() => runRuntimeCapabilityOptions.filter(
|
|
16529
16641
|
(option) => !composerRuntimeCapabilitySelectionKeys.has(
|
|
16530
16642
|
getRuntimeCapabilityOptionKey(option)
|
|
@@ -16532,7 +16644,7 @@ function useRuntimeCapabilitiesState({
|
|
|
16532
16644
|
),
|
|
16533
16645
|
[composerRuntimeCapabilitySelectionKeys, runRuntimeCapabilityOptions]
|
|
16534
16646
|
);
|
|
16535
|
-
const persistSessionRuntimeCapabilities =
|
|
16647
|
+
const persistSessionRuntimeCapabilities = React52.useCallback(
|
|
16536
16648
|
async (nextThreadId, selection) => {
|
|
16537
16649
|
if (!runtimeCapabilities || !selection || !client) {
|
|
16538
16650
|
return;
|
|
@@ -16557,7 +16669,7 @@ function useRuntimeCapabilitiesState({
|
|
|
16557
16669
|
},
|
|
16558
16670
|
[client, runtimeCapabilities]
|
|
16559
16671
|
);
|
|
16560
|
-
const applyExternalRuntimeCapabilities =
|
|
16672
|
+
const applyExternalRuntimeCapabilities = React52.useCallback(
|
|
16561
16673
|
(selection) => {
|
|
16562
16674
|
pendingExternalRuntimeCapabilitiesRef.current = selection;
|
|
16563
16675
|
setRunRuntimeCapabilities(() => {
|
|
@@ -16578,7 +16690,7 @@ function useRuntimeCapabilitiesState({
|
|
|
16578
16690
|
},
|
|
16579
16691
|
[runtimeCapabilities]
|
|
16580
16692
|
);
|
|
16581
|
-
const handleSessionRuntimeCapabilityToggle =
|
|
16693
|
+
const handleSessionRuntimeCapabilityToggle = React52.useCallback(
|
|
16582
16694
|
(type, id, selected) => {
|
|
16583
16695
|
setSessionRuntimeCapabilities((previous) => {
|
|
16584
16696
|
const nextSelection = toggleRuntimeCapabilitySelection(
|
|
@@ -16599,7 +16711,7 @@ function useRuntimeCapabilitiesState({
|
|
|
16599
16711
|
},
|
|
16600
16712
|
[persistSessionRuntimeCapabilities, threadId]
|
|
16601
16713
|
);
|
|
16602
|
-
const addRunRuntimeCapabilities =
|
|
16714
|
+
const addRunRuntimeCapabilities = React52.useCallback(
|
|
16603
16715
|
(selection) => {
|
|
16604
16716
|
setRunRuntimeCapabilities(
|
|
16605
16717
|
(previous) => runtimeCapabilities ? mergeRuntimeCapabilitiesSelections(
|
|
@@ -16611,13 +16723,13 @@ function useRuntimeCapabilitiesState({
|
|
|
16611
16723
|
},
|
|
16612
16724
|
[runtimeCapabilities]
|
|
16613
16725
|
);
|
|
16614
|
-
const resetRunRuntimeCapabilities =
|
|
16726
|
+
const resetRunRuntimeCapabilities = React52.useCallback(() => {
|
|
16615
16727
|
setRunRuntimeCapabilities(
|
|
16616
16728
|
createEmptyRuntimeCapabilitiesSelection(runtimeCapabilities)
|
|
16617
16729
|
);
|
|
16618
16730
|
setRuntimeCapabilityPalette(null);
|
|
16619
16731
|
}, [runtimeCapabilities]);
|
|
16620
|
-
const getRuntimeCapabilitiesForSubmit =
|
|
16732
|
+
const getRuntimeCapabilitiesForSubmit = React52.useCallback(
|
|
16621
16733
|
(recommended) => {
|
|
16622
16734
|
const recommendedRuntimeCapabilitiesForSubmit = recommended && runtimeCapabilities && runtimeCapabilitiesReady ? mergeRuntimeCapabilitiesSelections(
|
|
16623
16735
|
runtimeCapabilities,
|
|
@@ -16648,7 +16760,7 @@ function useRuntimeCapabilitiesState({
|
|
|
16648
16760
|
runtimeCapabilityOptions
|
|
16649
16761
|
]
|
|
16650
16762
|
);
|
|
16651
|
-
const getRuntimeCapabilitiesForCommand =
|
|
16763
|
+
const getRuntimeCapabilitiesForCommand = React52.useCallback(
|
|
16652
16764
|
(recommended) => runtimeCapabilities && runtimeCapabilitiesReady ? createRuntimeCapabilitiesForSubmit({
|
|
16653
16765
|
capabilities: runtimeCapabilities,
|
|
16654
16766
|
available: effectiveSessionRuntimeCapabilities,
|
|
@@ -16660,7 +16772,7 @@ function useRuntimeCapabilitiesState({
|
|
|
16660
16772
|
runtimeCapabilitiesReady
|
|
16661
16773
|
]
|
|
16662
16774
|
);
|
|
16663
|
-
|
|
16775
|
+
React52.useEffect(() => {
|
|
16664
16776
|
if (disabled || !client || !assistantId) {
|
|
16665
16777
|
pendingExternalRuntimeCapabilitiesRef.current = null;
|
|
16666
16778
|
setRuntimeCapabilities(null);
|
|
@@ -16708,7 +16820,7 @@ function useRuntimeCapabilitiesState({
|
|
|
16708
16820
|
});
|
|
16709
16821
|
return () => controller.abort();
|
|
16710
16822
|
}, [assistantId, client, disabled]);
|
|
16711
|
-
|
|
16823
|
+
React52.useEffect(() => {
|
|
16712
16824
|
const emptyRunSelection = createEmptyRuntimeCapabilitiesSelection(runtimeCapabilities);
|
|
16713
16825
|
const pendingExternalSelection = pendingExternalRuntimeCapabilitiesRef.current;
|
|
16714
16826
|
if (pendingExternalSelection && runtimeCapabilities) {
|
|
@@ -16800,8 +16912,8 @@ function useRuntimeCapabilityComposerActions({
|
|
|
16800
16912
|
commitComposerParts,
|
|
16801
16913
|
focusComposerAt
|
|
16802
16914
|
}) {
|
|
16803
|
-
const pendingExternalRuntimeCapabilityInsertRef =
|
|
16804
|
-
const insertExternalRuntimeCapabilities =
|
|
16915
|
+
const pendingExternalRuntimeCapabilityInsertRef = React52.useRef(null);
|
|
16916
|
+
const insertExternalRuntimeCapabilities = React52.useCallback(
|
|
16805
16917
|
(selection, options) => {
|
|
16806
16918
|
applyExternalRuntimeCapabilities(selection);
|
|
16807
16919
|
if (!selection) {
|
|
@@ -16856,7 +16968,7 @@ function useRuntimeCapabilityComposerActions({
|
|
|
16856
16968
|
setRuntimeCapabilityPalette
|
|
16857
16969
|
]
|
|
16858
16970
|
);
|
|
16859
|
-
const applyComposerValueRuntimeCapabilities =
|
|
16971
|
+
const applyComposerValueRuntimeCapabilities = React52.useCallback(
|
|
16860
16972
|
(payload, options) => {
|
|
16861
16973
|
const runtimeCapabilitiesPayload = isRuntimeCapabilitiesSelection(
|
|
16862
16974
|
payload.runtimeCapabilities
|
|
@@ -16872,7 +16984,7 @@ function useRuntimeCapabilityComposerActions({
|
|
|
16872
16984
|
},
|
|
16873
16985
|
[applyExternalRuntimeCapabilities, insertExternalRuntimeCapabilities]
|
|
16874
16986
|
);
|
|
16875
|
-
const updateRuntimeCapabilityPalette =
|
|
16987
|
+
const updateRuntimeCapabilityPalette = React52.useCallback(
|
|
16876
16988
|
(parts, selectionStart) => {
|
|
16877
16989
|
const input = composerInputRef.current;
|
|
16878
16990
|
const editingText = getComposerEditingText(parts);
|
|
@@ -16884,7 +16996,7 @@ function useRuntimeCapabilityComposerActions({
|
|
|
16884
16996
|
},
|
|
16885
16997
|
[composerInputRef, setRuntimeCapabilityPalette]
|
|
16886
16998
|
);
|
|
16887
|
-
const removeRunRuntimeCapability =
|
|
16999
|
+
const removeRunRuntimeCapability = React52.useCallback(
|
|
16888
17000
|
(option) => {
|
|
16889
17001
|
setRunRuntimeCapabilities(
|
|
16890
17002
|
(previous) => toggleRuntimeCapabilitySelection(
|
|
@@ -16904,7 +17016,7 @@ function useRuntimeCapabilityComposerActions({
|
|
|
16904
17016
|
},
|
|
16905
17017
|
[commitComposerParts, composerPartsRef, setRunRuntimeCapabilities]
|
|
16906
17018
|
);
|
|
16907
|
-
const insertComposerCapabilityToken =
|
|
17019
|
+
const insertComposerCapabilityToken = React52.useCallback(
|
|
16908
17020
|
(capability, range) => {
|
|
16909
17021
|
const replacementParts = createComposerCapabilityInsertionParts([
|
|
16910
17022
|
capability
|
|
@@ -16945,7 +17057,7 @@ function useRuntimeCapabilityComposerActions({
|
|
|
16945
17057
|
setRuntimeCapabilityPalette
|
|
16946
17058
|
]
|
|
16947
17059
|
);
|
|
16948
|
-
|
|
17060
|
+
React52.useEffect(() => {
|
|
16949
17061
|
if (!runtimeCapabilitiesReady || !runtimeCapabilities) {
|
|
16950
17062
|
return;
|
|
16951
17063
|
}
|
|
@@ -16975,16 +17087,16 @@ function HumanRuntimeCapabilityChips({
|
|
|
16975
17087
|
if (options.length === 0) {
|
|
16976
17088
|
return null;
|
|
16977
17089
|
}
|
|
16978
|
-
return /* @__PURE__ */ (0,
|
|
17090
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("div", { className: "mb-2 flex flex-wrap gap-1.5", children: options.map((option) => {
|
|
16979
17091
|
const color = option.type === "skill" ? void 0 : getRuntimeCapabilityColor(option);
|
|
16980
|
-
return /* @__PURE__ */ (0,
|
|
17092
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(
|
|
16981
17093
|
"span",
|
|
16982
17094
|
{
|
|
16983
17095
|
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",
|
|
16984
17096
|
style: color ? { color } : void 0,
|
|
16985
17097
|
children: [
|
|
16986
|
-
/* @__PURE__ */ (0,
|
|
16987
|
-
/* @__PURE__ */ (0,
|
|
17098
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)(RuntimeCapabilityIcon, { option, variant: "chip" }),
|
|
17099
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)("span", { className: "max-w-[9rem] truncate", children: option.label })
|
|
16988
17100
|
]
|
|
16989
17101
|
},
|
|
16990
17102
|
`${option.type}:${option.id}`
|
|
@@ -17000,19 +17112,19 @@ function DetachedRunRuntimeCapabilities({
|
|
|
17000
17112
|
if (options.length === 0) {
|
|
17001
17113
|
return null;
|
|
17002
17114
|
}
|
|
17003
|
-
return /* @__PURE__ */ (0,
|
|
17004
|
-
/* @__PURE__ */ (0,
|
|
17115
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { className: "mb-2 flex flex-wrap items-center gap-2", children: [
|
|
17116
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)("span", { className: "text-xs text-muted-foreground", children: runOnlyLabel }),
|
|
17005
17117
|
options.map((option) => {
|
|
17006
17118
|
const color = getRuntimeCapabilityColor(option);
|
|
17007
|
-
return /* @__PURE__ */ (0,
|
|
17119
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(
|
|
17008
17120
|
"span",
|
|
17009
17121
|
{
|
|
17010
17122
|
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",
|
|
17011
17123
|
style: color ? { color } : void 0,
|
|
17012
17124
|
children: [
|
|
17013
|
-
/* @__PURE__ */ (0,
|
|
17014
|
-
/* @__PURE__ */ (0,
|
|
17015
|
-
/* @__PURE__ */ (0,
|
|
17125
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)(RuntimeCapabilityIcon, { option, variant: "chip" }),
|
|
17126
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)("span", { className: "max-w-40 truncate", children: option.label }),
|
|
17127
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
17016
17128
|
"button",
|
|
17017
17129
|
{
|
|
17018
17130
|
type: "button",
|
|
@@ -17020,7 +17132,7 @@ function DetachedRunRuntimeCapabilities({
|
|
|
17020
17132
|
className: "rounded-full p-0.5 hover:bg-primary/15",
|
|
17021
17133
|
title: removeLabel,
|
|
17022
17134
|
"aria-label": removeLabel,
|
|
17023
|
-
children: /* @__PURE__ */ (0,
|
|
17135
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(import_lucide_react30.X, { size: 11 })
|
|
17024
17136
|
}
|
|
17025
17137
|
)
|
|
17026
17138
|
]
|
|
@@ -17034,7 +17146,7 @@ function ComposerCapabilityToken({
|
|
|
17034
17146
|
part
|
|
17035
17147
|
}) {
|
|
17036
17148
|
const color = getRuntimeCapabilityColor(part.capability);
|
|
17037
|
-
return /* @__PURE__ */ (0,
|
|
17149
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(
|
|
17038
17150
|
"span",
|
|
17039
17151
|
{
|
|
17040
17152
|
"data-composer-capability-key": part.key,
|
|
@@ -17044,8 +17156,8 @@ function ComposerCapabilityToken({
|
|
|
17044
17156
|
className: "mx-0.5 inline-flex max-w-[14rem] select-none items-center gap-1 text-sm font-semibold text-primary align-baseline",
|
|
17045
17157
|
style: color ? { color } : void 0,
|
|
17046
17158
|
children: [
|
|
17047
|
-
/* @__PURE__ */ (0,
|
|
17048
|
-
/* @__PURE__ */ (0,
|
|
17159
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)(RuntimeCapabilityIcon, { option: part.capability, variant: "chip" }),
|
|
17160
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)("span", { className: "truncate", children: part.capability.label })
|
|
17049
17161
|
]
|
|
17050
17162
|
},
|
|
17051
17163
|
part.key
|
|
@@ -17305,30 +17417,30 @@ function buildMessageNavigationItems(messages, options) {
|
|
|
17305
17417
|
}
|
|
17306
17418
|
|
|
17307
17419
|
// src/hooks/useTaskSummary.ts
|
|
17308
|
-
var
|
|
17420
|
+
var React53 = __toESM(require("react"), 1);
|
|
17309
17421
|
function useTaskSummary({
|
|
17310
17422
|
enabled,
|
|
17311
17423
|
conversationId,
|
|
17312
17424
|
client,
|
|
17313
17425
|
live
|
|
17314
17426
|
}) {
|
|
17315
|
-
const [loaded, setLoaded] =
|
|
17316
|
-
const [historySections, setHistorySections] =
|
|
17317
|
-
const [historySectionsConversationId, setHistorySectionsConversationId] =
|
|
17318
|
-
const [loadingSections, setLoadingSections] =
|
|
17319
|
-
const [error, setError] =
|
|
17320
|
-
const [retryVersion, setRetryVersion] =
|
|
17321
|
-
const requestVersionRef =
|
|
17322
|
-
const conversationIdRef =
|
|
17323
|
-
const sectionControllersRef =
|
|
17427
|
+
const [loaded, setLoaded] = React53.useState(null);
|
|
17428
|
+
const [historySections, setHistorySections] = React53.useState({});
|
|
17429
|
+
const [historySectionsConversationId, setHistorySectionsConversationId] = React53.useState(null);
|
|
17430
|
+
const [loadingSections, setLoadingSections] = React53.useState({});
|
|
17431
|
+
const [error, setError] = React53.useState(null);
|
|
17432
|
+
const [retryVersion, setRetryVersion] = React53.useState(0);
|
|
17433
|
+
const requestVersionRef = React53.useRef(0);
|
|
17434
|
+
const conversationIdRef = React53.useRef(conversationId);
|
|
17435
|
+
const sectionControllersRef = React53.useRef(
|
|
17324
17436
|
/* @__PURE__ */ new Map()
|
|
17325
17437
|
);
|
|
17326
17438
|
conversationIdRef.current = conversationId;
|
|
17327
|
-
const abortSectionRequests =
|
|
17439
|
+
const abortSectionRequests = React53.useCallback(() => {
|
|
17328
17440
|
sectionControllersRef.current.forEach((controller) => controller.abort());
|
|
17329
17441
|
sectionControllersRef.current.clear();
|
|
17330
17442
|
}, []);
|
|
17331
|
-
|
|
17443
|
+
React53.useEffect(() => {
|
|
17332
17444
|
abortSectionRequests();
|
|
17333
17445
|
setHistorySections({});
|
|
17334
17446
|
setHistorySectionsConversationId(conversationId);
|
|
@@ -17357,11 +17469,11 @@ function useTaskSummary({
|
|
|
17357
17469
|
};
|
|
17358
17470
|
}, [abortSectionRequests, client, conversationId, enabled, retryVersion]);
|
|
17359
17471
|
const snapshot = loaded?.conversationId === conversationId ? loaded.snapshot : null;
|
|
17360
|
-
const activeHistorySections =
|
|
17472
|
+
const activeHistorySections = React53.useMemo(
|
|
17361
17473
|
() => historySectionsConversationId === conversationId ? historySections : {},
|
|
17362
17474
|
[conversationId, historySections, historySectionsConversationId]
|
|
17363
17475
|
);
|
|
17364
|
-
const loadSection =
|
|
17476
|
+
const loadSection = React53.useCallback(
|
|
17365
17477
|
async (section) => {
|
|
17366
17478
|
if (!enabled || !conversationId || loadingSections[section]) {
|
|
17367
17479
|
return;
|
|
@@ -17421,9 +17533,9 @@ function useTaskSummary({
|
|
|
17421
17533
|
}
|
|
17422
17534
|
|
|
17423
17535
|
// src/components/task-summary/TaskSummary.tsx
|
|
17424
|
-
var
|
|
17425
|
-
var
|
|
17426
|
-
var
|
|
17536
|
+
var React54 = __toESM(require("react"), 1);
|
|
17537
|
+
var import_lucide_react31 = require("lucide-react");
|
|
17538
|
+
var import_jsx_runtime58 = require("react/jsx-runtime");
|
|
17427
17539
|
var PREVIEW_SIZE = 3;
|
|
17428
17540
|
function TaskSummaryTrigger({
|
|
17429
17541
|
displayMode = "popover",
|
|
@@ -17432,9 +17544,9 @@ function TaskSummaryTrigger({
|
|
|
17432
17544
|
...props
|
|
17433
17545
|
}) {
|
|
17434
17546
|
const { t } = useChatkitTranslation();
|
|
17435
|
-
const [uncontrolledOpen, setUncontrolledOpen] =
|
|
17547
|
+
const [uncontrolledOpen, setUncontrolledOpen] = React54.useState(false);
|
|
17436
17548
|
const open = controlledOpen ?? uncontrolledOpen;
|
|
17437
|
-
const setOpen =
|
|
17549
|
+
const setOpen = React54.useCallback(
|
|
17438
17550
|
(nextOpen) => {
|
|
17439
17551
|
if (controlledOpen === void 0) {
|
|
17440
17552
|
setUncontrolledOpen(nextOpen);
|
|
@@ -17443,7 +17555,7 @@ function TaskSummaryTrigger({
|
|
|
17443
17555
|
},
|
|
17444
17556
|
[controlledOpen, onOpenChange]
|
|
17445
17557
|
);
|
|
17446
|
-
const triggerButton = /* @__PURE__ */ (0,
|
|
17558
|
+
const triggerButton = /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
17447
17559
|
"button",
|
|
17448
17560
|
{
|
|
17449
17561
|
type: "button",
|
|
@@ -17451,28 +17563,28 @@ function TaskSummaryTrigger({
|
|
|
17451
17563
|
"aria-label": t("taskSummary.open"),
|
|
17452
17564
|
"aria-expanded": open,
|
|
17453
17565
|
onClick: displayMode === "docked" ? () => setOpen(!open) : void 0,
|
|
17454
|
-
children: /* @__PURE__ */ (0,
|
|
17566
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_lucide_react31.ListChecks, { size: 16 })
|
|
17455
17567
|
}
|
|
17456
17568
|
);
|
|
17457
17569
|
if (displayMode === "docked") {
|
|
17458
|
-
return /* @__PURE__ */ (0,
|
|
17459
|
-
/* @__PURE__ */ (0,
|
|
17460
|
-
/* @__PURE__ */ (0,
|
|
17570
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(Tooltip, { children: [
|
|
17571
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(TooltipTrigger, { asChild: true, children: triggerButton }),
|
|
17572
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(TooltipContent, { side: "bottom", children: t("taskSummary.open") })
|
|
17461
17573
|
] });
|
|
17462
17574
|
}
|
|
17463
|
-
return /* @__PURE__ */ (0,
|
|
17464
|
-
/* @__PURE__ */ (0,
|
|
17465
|
-
/* @__PURE__ */ (0,
|
|
17466
|
-
/* @__PURE__ */ (0,
|
|
17575
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(Popover, { open, onOpenChange: setOpen, children: [
|
|
17576
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(Tooltip, { children: [
|
|
17577
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(PopoverTrigger, { asChild: true, children: triggerButton }) }),
|
|
17578
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(TooltipContent, { side: "bottom", children: t("taskSummary.open") })
|
|
17467
17579
|
] }),
|
|
17468
|
-
/* @__PURE__ */ (0,
|
|
17580
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
17469
17581
|
PopoverContent,
|
|
17470
17582
|
{
|
|
17471
17583
|
align: "end",
|
|
17472
17584
|
sideOffset: 8,
|
|
17473
17585
|
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",
|
|
17474
17586
|
"aria-label": t("taskSummary.title"),
|
|
17475
|
-
children: /* @__PURE__ */ (0,
|
|
17587
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(TaskSummaryContent, { ...props })
|
|
17476
17588
|
}
|
|
17477
17589
|
)
|
|
17478
17590
|
] });
|
|
@@ -17482,7 +17594,7 @@ function TaskSummaryPanel({
|
|
|
17482
17594
|
...props
|
|
17483
17595
|
}) {
|
|
17484
17596
|
const { t } = useChatkitTranslation();
|
|
17485
|
-
return /* @__PURE__ */ (0,
|
|
17597
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
17486
17598
|
"aside",
|
|
17487
17599
|
{
|
|
17488
17600
|
"data-slot": "task-summary-panel",
|
|
@@ -17491,7 +17603,7 @@ function TaskSummaryPanel({
|
|
|
17491
17603
|
"h-fit max-h-full overflow-y-auto rounded-2xl border border-border/70 bg-popover text-popover-foreground shadow-lg",
|
|
17492
17604
|
className
|
|
17493
17605
|
),
|
|
17494
|
-
children: /* @__PURE__ */ (0,
|
|
17606
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(TaskSummaryContent, { ...props })
|
|
17495
17607
|
}
|
|
17496
17608
|
);
|
|
17497
17609
|
}
|
|
@@ -17507,7 +17619,7 @@ function TaskSummaryContent({
|
|
|
17507
17619
|
onOpenResource
|
|
17508
17620
|
}) {
|
|
17509
17621
|
const { t } = useChatkitTranslation();
|
|
17510
|
-
const [expanded, setExpanded] =
|
|
17622
|
+
const [expanded, setExpanded] = React54.useState({});
|
|
17511
17623
|
const hasTask = Boolean(
|
|
17512
17624
|
summary.goal || summary.plan || summary.todos?.items.length
|
|
17513
17625
|
);
|
|
@@ -17539,7 +17651,7 @@ function TaskSummaryContent({
|
|
|
17539
17651
|
if (total2 <= PREVIEW_SIZE && !expanded[section]) return null;
|
|
17540
17652
|
const loading = loadingSections[section];
|
|
17541
17653
|
const canLoadMore = Boolean(expanded[section]) && loadedSectionCounts[section] < total2;
|
|
17542
|
-
return /* @__PURE__ */ (0,
|
|
17654
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(
|
|
17543
17655
|
"button",
|
|
17544
17656
|
{
|
|
17545
17657
|
type: "button",
|
|
@@ -17547,41 +17659,41 @@ function TaskSummaryContent({
|
|
|
17547
17659
|
disabled: loading,
|
|
17548
17660
|
onClick: () => canLoadMore ? void onLoadSection(section) : toggleSection(section),
|
|
17549
17661
|
children: [
|
|
17550
|
-
loading && /* @__PURE__ */ (0,
|
|
17551
|
-
!loading && /* @__PURE__ */ (0,
|
|
17662
|
+
loading && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_lucide_react31.Loader2, { className: "size-3 animate-spin" }),
|
|
17663
|
+
!loading && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_lucide_react31.ListChecks, { className: "size-3.5" }),
|
|
17552
17664
|
canLoadMore ? t("taskSummary.loadMore") : expanded[section] ? t("taskSummary.collapse") : t("taskSummary.viewAll", { count: total2 })
|
|
17553
17665
|
]
|
|
17554
17666
|
}
|
|
17555
17667
|
);
|
|
17556
17668
|
};
|
|
17557
|
-
return /* @__PURE__ */ (0,
|
|
17558
|
-
Boolean(historyError) && /* @__PURE__ */ (0,
|
|
17559
|
-
/* @__PURE__ */ (0,
|
|
17560
|
-
/* @__PURE__ */ (0,
|
|
17669
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: "divide-y divide-border/70", children: [
|
|
17670
|
+
Boolean(historyError) && /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("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: [
|
|
17671
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)("span", { children: t("taskSummary.historyError") }),
|
|
17672
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(
|
|
17561
17673
|
"button",
|
|
17562
17674
|
{
|
|
17563
17675
|
type: "button",
|
|
17564
17676
|
className: "inline-flex shrink-0 items-center gap-1 font-medium hover:underline",
|
|
17565
17677
|
onClick: onRetryHistory,
|
|
17566
17678
|
children: [
|
|
17567
|
-
/* @__PURE__ */ (0,
|
|
17679
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_lucide_react31.RotateCcw, { className: "size-3" }),
|
|
17568
17680
|
t("taskSummary.retry")
|
|
17569
17681
|
]
|
|
17570
17682
|
}
|
|
17571
17683
|
)
|
|
17572
17684
|
] }),
|
|
17573
|
-
/* @__PURE__ */ (0,
|
|
17685
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(
|
|
17574
17686
|
SummarySection,
|
|
17575
17687
|
{
|
|
17576
17688
|
title: t("taskSummary.sections.outputs"),
|
|
17577
17689
|
children: [
|
|
17578
|
-
summary.outputs.length === 0 ? /* @__PURE__ */ (0,
|
|
17690
|
+
summary.outputs.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(SummaryPrompt, { onClick: onFocusComposer, children: t("taskSummary.createOutput") }) : sectionItems("outputs", summary.outputs).map((item) => /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
17579
17691
|
SummaryButton,
|
|
17580
17692
|
{
|
|
17581
17693
|
title: item.title,
|
|
17582
17694
|
description: item.description ?? item.status,
|
|
17583
|
-
leading: /* @__PURE__ */ (0,
|
|
17584
|
-
trailing: item.resource && item.resource.type !== "message" ? /* @__PURE__ */ (0,
|
|
17695
|
+
leading: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_lucide_react31.FileOutput, { className: "size-4" }),
|
|
17696
|
+
trailing: item.resource && item.resource.type !== "message" ? /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_lucide_react31.ExternalLink, { className: "size-3.5" }) : void 0,
|
|
17585
17697
|
onClick: () => openSummaryItem(item.resource, item.messageId, item.title)
|
|
17586
17698
|
},
|
|
17587
17699
|
item.id
|
|
@@ -17590,18 +17702,18 @@ function TaskSummaryContent({
|
|
|
17590
17702
|
]
|
|
17591
17703
|
}
|
|
17592
17704
|
),
|
|
17593
|
-
/* @__PURE__ */ (0,
|
|
17705
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(
|
|
17594
17706
|
SummarySection,
|
|
17595
17707
|
{
|
|
17596
17708
|
title: t("taskSummary.sections.sources"),
|
|
17597
17709
|
children: [
|
|
17598
|
-
sectionItems("sources", summary.sources).map((item) => /* @__PURE__ */ (0,
|
|
17710
|
+
sectionItems("sources", summary.sources).map((item) => /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
17599
17711
|
SummaryButton,
|
|
17600
17712
|
{
|
|
17601
17713
|
title: item.title,
|
|
17602
17714
|
description: item.description,
|
|
17603
|
-
leading: /* @__PURE__ */ (0,
|
|
17604
|
-
trailing: item.resource && item.resource.type !== "message" ? /* @__PURE__ */ (0,
|
|
17715
|
+
leading: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_lucide_react31.BookOpen, { className: "size-4" }),
|
|
17716
|
+
trailing: item.resource && item.resource.type !== "message" ? /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_lucide_react31.ExternalLink, { className: "size-3.5" }) : void 0,
|
|
17605
17717
|
onClick: () => openSummaryItem(item.resource, item.messageId, item.title)
|
|
17606
17718
|
},
|
|
17607
17719
|
item.id
|
|
@@ -17610,67 +17722,67 @@ function TaskSummaryContent({
|
|
|
17610
17722
|
]
|
|
17611
17723
|
}
|
|
17612
17724
|
),
|
|
17613
|
-
hasTask && /* @__PURE__ */ (0,
|
|
17614
|
-
summary.goal && /* @__PURE__ */ (0,
|
|
17725
|
+
hasTask && /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(SummarySection, { title: t("taskSummary.sections.task"), children: [
|
|
17726
|
+
summary.goal && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
17615
17727
|
SummaryButton,
|
|
17616
17728
|
{
|
|
17617
17729
|
title: summary.goal.objective,
|
|
17618
17730
|
description: summary.goal.status,
|
|
17619
|
-
leading: /* @__PURE__ */ (0,
|
|
17731
|
+
leading: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_lucide_react31.Target, { className: "size-4" }),
|
|
17620
17732
|
onClick: onFocusComposer
|
|
17621
17733
|
}
|
|
17622
17734
|
),
|
|
17623
|
-
summary.plan && /* @__PURE__ */ (0,
|
|
17735
|
+
summary.plan && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
17624
17736
|
SummaryButton,
|
|
17625
17737
|
{
|
|
17626
17738
|
title: summary.plan.title,
|
|
17627
17739
|
description: summary.plan.excerpt,
|
|
17628
|
-
leading: /* @__PURE__ */ (0,
|
|
17740
|
+
leading: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_lucide_react31.ListChecks, { className: "size-4" }),
|
|
17629
17741
|
onClick: () => summary.plan?.messageId ? onNavigateMessage(summary.plan.messageId) : onFocusComposer()
|
|
17630
17742
|
}
|
|
17631
17743
|
),
|
|
17632
|
-
(summary.todos?.items ?? []).slice(0, PREVIEW_SIZE).map((todo) => /* @__PURE__ */ (0,
|
|
17744
|
+
(summary.todos?.items ?? []).slice(0, PREVIEW_SIZE).map((todo) => /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
17633
17745
|
SummaryButton,
|
|
17634
17746
|
{
|
|
17635
17747
|
title: todo.content,
|
|
17636
17748
|
description: t(`taskSummary.status.${todo.status}`),
|
|
17637
|
-
leading: todo.status === "completed" ? /* @__PURE__ */ (0,
|
|
17749
|
+
leading: todo.status === "completed" ? /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_lucide_react31.CheckCircle2, { className: "size-4 text-muted-foreground" }) : /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_lucide_react31.CircleEllipsis, { className: "size-4 text-muted-foreground" }),
|
|
17638
17750
|
onClick: () => summary.todos?.messageId ? onNavigateMessage(summary.todos.messageId) : onFocusComposer()
|
|
17639
17751
|
},
|
|
17640
17752
|
todo.id
|
|
17641
17753
|
))
|
|
17642
17754
|
] }),
|
|
17643
|
-
summary.running.length > 0 && /* @__PURE__ */ (0,
|
|
17755
|
+
summary.running.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(SummarySection, { title: t("taskSummary.sections.running"), children: summary.running.slice(0, PREVIEW_SIZE).map((item) => /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
17644
17756
|
SummaryButton,
|
|
17645
17757
|
{
|
|
17646
17758
|
title: item.title,
|
|
17647
17759
|
description: item.description ?? item.status,
|
|
17648
|
-
leading: /* @__PURE__ */ (0,
|
|
17649
|
-
trailing: item.resource ? /* @__PURE__ */ (0,
|
|
17760
|
+
leading: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_lucide_react31.PlayCircle, { className: "size-4" }),
|
|
17761
|
+
trailing: item.resource ? /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_lucide_react31.ExternalLink, { className: "size-3.5" }) : void 0,
|
|
17650
17762
|
onClick: () => item.resource && onOpenResource(item.resource, void 0, item.title)
|
|
17651
17763
|
},
|
|
17652
17764
|
item.id
|
|
17653
17765
|
)) }),
|
|
17654
|
-
summary.agents.length > 0 && /* @__PURE__ */ (0,
|
|
17655
|
-
sectionItems("agents", summary.agents).map((item) => /* @__PURE__ */ (0,
|
|
17766
|
+
summary.agents.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(SummarySection, { title: t("taskSummary.sections.agents"), children: [
|
|
17767
|
+
sectionItems("agents", summary.agents).map((item) => /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
17656
17768
|
SummaryButton,
|
|
17657
17769
|
{
|
|
17658
17770
|
title: item.title,
|
|
17659
17771
|
description: [item.status, formatElapsed(item.elapsedTime)].filter(Boolean).join(" \xB7 "),
|
|
17660
|
-
leading: /* @__PURE__ */ (0,
|
|
17772
|
+
leading: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_lucide_react31.Bot, { className: "size-4" }),
|
|
17661
17773
|
onClick: () => item.messageId ? onNavigateMessage(item.messageId) : onFocusComposer()
|
|
17662
17774
|
},
|
|
17663
17775
|
item.id
|
|
17664
17776
|
)),
|
|
17665
17777
|
sectionAction("agents", summary.totals.agents)
|
|
17666
17778
|
] }),
|
|
17667
|
-
summary.pending.length > 0 && /* @__PURE__ */ (0,
|
|
17668
|
-
sectionItems("pending", summary.pending).map((item) => /* @__PURE__ */ (0,
|
|
17779
|
+
summary.pending.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(SummarySection, { title: t("taskSummary.sections.pending"), children: [
|
|
17780
|
+
sectionItems("pending", summary.pending).map((item) => /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
17669
17781
|
SummaryButton,
|
|
17670
17782
|
{
|
|
17671
17783
|
title: item.title,
|
|
17672
17784
|
description: item.description,
|
|
17673
|
-
leading: /* @__PURE__ */ (0,
|
|
17785
|
+
leading: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_lucide_react31.CircleEllipsis, { className: "size-4" }),
|
|
17674
17786
|
onClick: () => item.messageId ? onNavigateMessage(item.messageId) : onFocusComposer()
|
|
17675
17787
|
},
|
|
17676
17788
|
item.id
|
|
@@ -17683,16 +17795,16 @@ function SummarySection({
|
|
|
17683
17795
|
title,
|
|
17684
17796
|
children
|
|
17685
17797
|
}) {
|
|
17686
|
-
return /* @__PURE__ */ (0,
|
|
17687
|
-
/* @__PURE__ */ (0,
|
|
17688
|
-
/* @__PURE__ */ (0,
|
|
17798
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("section", { "aria-label": title, className: "px-4 py-3", children: [
|
|
17799
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)("div", { className: "flex min-h-7 items-center justify-between gap-3", children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("h3", { className: "text-sm font-medium text-muted-foreground", children: title }) }),
|
|
17800
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)("div", { className: "mt-1 space-y-0.5", children })
|
|
17689
17801
|
] });
|
|
17690
17802
|
}
|
|
17691
17803
|
function SummaryPrompt({
|
|
17692
17804
|
children,
|
|
17693
17805
|
onClick
|
|
17694
17806
|
}) {
|
|
17695
|
-
return /* @__PURE__ */ (0,
|
|
17807
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
17696
17808
|
"button",
|
|
17697
17809
|
{
|
|
17698
17810
|
type: "button",
|
|
@@ -17709,7 +17821,7 @@ function SummaryButton({
|
|
|
17709
17821
|
trailing,
|
|
17710
17822
|
onClick
|
|
17711
17823
|
}) {
|
|
17712
|
-
return /* @__PURE__ */ (0,
|
|
17824
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(
|
|
17713
17825
|
"button",
|
|
17714
17826
|
{
|
|
17715
17827
|
type: "button",
|
|
@@ -17721,12 +17833,12 @@ function SummaryButton({
|
|
|
17721
17833
|
!onClick && "cursor-default"
|
|
17722
17834
|
),
|
|
17723
17835
|
children: [
|
|
17724
|
-
leading && /* @__PURE__ */ (0,
|
|
17725
|
-
/* @__PURE__ */ (0,
|
|
17726
|
-
/* @__PURE__ */ (0,
|
|
17727
|
-
description && /* @__PURE__ */ (0,
|
|
17836
|
+
leading && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("span", { className: "mt-0.5 shrink-0 text-muted-foreground", children: leading }),
|
|
17837
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("span", { className: "min-w-0 flex-1", children: [
|
|
17838
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)("span", { className: "block truncate text-sm font-medium leading-5 text-foreground", children: title }),
|
|
17839
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("span", { className: "mt-0.5 block line-clamp-2 text-xs text-muted-foreground", children: description })
|
|
17728
17840
|
] }),
|
|
17729
|
-
trailing && /* @__PURE__ */ (0,
|
|
17841
|
+
trailing && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("span", { className: "mt-0.5 text-muted-foreground", children: trailing })
|
|
17730
17842
|
]
|
|
17731
17843
|
}
|
|
17732
17844
|
);
|
|
@@ -17738,7 +17850,7 @@ function formatElapsed(value) {
|
|
|
17738
17850
|
}
|
|
17739
17851
|
|
|
17740
17852
|
// src/components/chat.tsx
|
|
17741
|
-
var
|
|
17853
|
+
var import_jsx_runtime59 = require("react/jsx-runtime");
|
|
17742
17854
|
var import_meta2 = {};
|
|
17743
17855
|
var defaultApiUrl2 = import_meta2.env.VITE_XPERTAI_API_URL;
|
|
17744
17856
|
var COMPOSER_INPUT_MAX_HEIGHT = 128;
|
|
@@ -17845,8 +17957,8 @@ function ReferenceChip({
|
|
|
17845
17957
|
}) {
|
|
17846
17958
|
const metaLine = getReferenceMetaLine(reference);
|
|
17847
17959
|
const isComposer = variant === "composer";
|
|
17848
|
-
const Icon = reference.type === "quote" ?
|
|
17849
|
-
return /* @__PURE__ */ (0,
|
|
17960
|
+
const Icon = reference.type === "quote" ? import_lucide_react32.Quote : reference.type === "image" ? import_lucide_react32.ImageIcon : import_lucide_react32.FileText;
|
|
17961
|
+
return /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(
|
|
17850
17962
|
"div",
|
|
17851
17963
|
{
|
|
17852
17964
|
className: cn(
|
|
@@ -17855,7 +17967,7 @@ function ReferenceChip({
|
|
|
17855
17967
|
),
|
|
17856
17968
|
title: getReferenceTitle(reference),
|
|
17857
17969
|
children: [
|
|
17858
|
-
/* @__PURE__ */ (0,
|
|
17970
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
17859
17971
|
Icon,
|
|
17860
17972
|
{
|
|
17861
17973
|
size: isComposer ? 14 : 12,
|
|
@@ -17865,8 +17977,8 @@ function ReferenceChip({
|
|
|
17865
17977
|
)
|
|
17866
17978
|
}
|
|
17867
17979
|
),
|
|
17868
|
-
/* @__PURE__ */ (0,
|
|
17869
|
-
/* @__PURE__ */ (0,
|
|
17980
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { className: "min-w-0 flex-1", children: [
|
|
17981
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
17870
17982
|
"div",
|
|
17871
17983
|
{
|
|
17872
17984
|
className: cn(
|
|
@@ -17876,7 +17988,7 @@ function ReferenceChip({
|
|
|
17876
17988
|
children: getReferenceLabel(reference)
|
|
17877
17989
|
}
|
|
17878
17990
|
),
|
|
17879
|
-
metaLine && /* @__PURE__ */ (0,
|
|
17991
|
+
metaLine && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
17880
17992
|
"div",
|
|
17881
17993
|
{
|
|
17882
17994
|
className: cn(
|
|
@@ -17887,7 +17999,7 @@ function ReferenceChip({
|
|
|
17887
17999
|
}
|
|
17888
18000
|
)
|
|
17889
18001
|
] }),
|
|
17890
|
-
onRemove && removeLabel && /* @__PURE__ */ (0,
|
|
18002
|
+
onRemove && removeLabel && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
17891
18003
|
"button",
|
|
17892
18004
|
{
|
|
17893
18005
|
type: "button",
|
|
@@ -17898,7 +18010,7 @@ function ReferenceChip({
|
|
|
17898
18010
|
),
|
|
17899
18011
|
title: removeLabel,
|
|
17900
18012
|
"aria-label": removeLabel,
|
|
17901
|
-
children: /* @__PURE__ */ (0,
|
|
18013
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_lucide_react32.X, { size: 12 })
|
|
17902
18014
|
}
|
|
17903
18015
|
)
|
|
17904
18016
|
]
|
|
@@ -17929,7 +18041,7 @@ function Chat({
|
|
|
17929
18041
|
clientSecret: effectiveClientSecret
|
|
17930
18042
|
});
|
|
17931
18043
|
const missingConfig = Boolean(missingConfigKind);
|
|
17932
|
-
const missingConfigShortMessage =
|
|
18044
|
+
const missingConfigShortMessage = React55.useMemo(() => {
|
|
17933
18045
|
switch (missingConfigKind) {
|
|
17934
18046
|
case "apiUrl":
|
|
17935
18047
|
return t("chat.missingApiUrlShort");
|
|
@@ -17941,7 +18053,7 @@ function Chat({
|
|
|
17941
18053
|
return t("chat.missingConfigShort");
|
|
17942
18054
|
}
|
|
17943
18055
|
}, [missingConfigKind, t]);
|
|
17944
|
-
const missingConfigDetailMessage =
|
|
18056
|
+
const missingConfigDetailMessage = React55.useMemo(() => {
|
|
17945
18057
|
switch (missingConfigKind) {
|
|
17946
18058
|
case "apiUrl":
|
|
17947
18059
|
return t("chat.missingApiUrlDetail");
|
|
@@ -17953,26 +18065,26 @@ function Chat({
|
|
|
17953
18065
|
return t("chat.missingConfigDetail");
|
|
17954
18066
|
}
|
|
17955
18067
|
}, [missingConfigKind, t]);
|
|
17956
|
-
const [isHistoryLoading, setIsHistoryLoading] =
|
|
17957
|
-
const [historyError, setHistoryError] =
|
|
17958
|
-
const [assistantName, setAssistantName] =
|
|
17959
|
-
const [assistantAvatar, setAssistantAvatar] =
|
|
17960
|
-
const [threadGoal, setThreadGoal] =
|
|
17961
|
-
const [goalError, setGoalError] =
|
|
17962
|
-
const [isGoalLoading, setIsGoalLoading] =
|
|
17963
|
-
const [isGoalPanelOpen, setIsGoalPanelOpen] =
|
|
17964
|
-
const [isGoalObjectiveExpanded, setIsGoalObjectiveExpanded] =
|
|
17965
|
-
const [goalElapsedStartedAt, setGoalElapsedStartedAt] =
|
|
18068
|
+
const [isHistoryLoading, setIsHistoryLoading] = React55.useState(false);
|
|
18069
|
+
const [historyError, setHistoryError] = React55.useState(null);
|
|
18070
|
+
const [assistantName, setAssistantName] = React55.useState(null);
|
|
18071
|
+
const [assistantAvatar, setAssistantAvatar] = React55.useState(null);
|
|
18072
|
+
const [threadGoal, setThreadGoal] = React55.useState(null);
|
|
18073
|
+
const [goalError, setGoalError] = React55.useState(null);
|
|
18074
|
+
const [isGoalLoading, setIsGoalLoading] = React55.useState(false);
|
|
18075
|
+
const [isGoalPanelOpen, setIsGoalPanelOpen] = React55.useState(false);
|
|
18076
|
+
const [isGoalObjectiveExpanded, setIsGoalObjectiveExpanded] = React55.useState(false);
|
|
18077
|
+
const [goalElapsedStartedAt, setGoalElapsedStartedAt] = React55.useState(null);
|
|
17966
18078
|
const LOADING_DOTS_MIN_DURATION = 800;
|
|
17967
18079
|
const STREAMING_STATUS_REFRESH_MS = 250;
|
|
17968
|
-
const [showLoadingDots, setShowLoadingDots] =
|
|
17969
|
-
const [streamingNow, setStreamingNow] =
|
|
17970
|
-
const loadingStartTimeRef =
|
|
17971
|
-
const lastStreamOutputAtRef =
|
|
17972
|
-
|
|
18080
|
+
const [showLoadingDots, setShowLoadingDots] = React55.useState(false);
|
|
18081
|
+
const [streamingNow, setStreamingNow] = React55.useState(() => Date.now());
|
|
18082
|
+
const loadingStartTimeRef = React55.useRef(null);
|
|
18083
|
+
const lastStreamOutputAtRef = React55.useRef(null);
|
|
18084
|
+
React55.useEffect(() => {
|
|
17973
18085
|
setStream(stream);
|
|
17974
18086
|
}, [setStream, stream]);
|
|
17975
|
-
|
|
18087
|
+
React55.useEffect(() => {
|
|
17976
18088
|
if (stream.isLoading) {
|
|
17977
18089
|
if (!loadingStartTimeRef.current) {
|
|
17978
18090
|
loadingStartTimeRef.current = Date.now();
|
|
@@ -17995,7 +18107,7 @@ function Chat({
|
|
|
17995
18107
|
}
|
|
17996
18108
|
}
|
|
17997
18109
|
}, [stream.isLoading]);
|
|
17998
|
-
|
|
18110
|
+
React55.useEffect(() => {
|
|
17999
18111
|
if (!stream.isLoading) {
|
|
18000
18112
|
lastStreamOutputAtRef.current = null;
|
|
18001
18113
|
setStreamingNow(Date.now());
|
|
@@ -18005,7 +18117,7 @@ function Chat({
|
|
|
18005
18117
|
lastStreamOutputAtRef.current = now;
|
|
18006
18118
|
setStreamingNow(now);
|
|
18007
18119
|
}, [stream.messages, stream.isLoading]);
|
|
18008
|
-
|
|
18120
|
+
React55.useEffect(() => {
|
|
18009
18121
|
if (!stream.isLoading) {
|
|
18010
18122
|
return;
|
|
18011
18123
|
}
|
|
@@ -18014,7 +18126,7 @@ function Chat({
|
|
|
18014
18126
|
}, STREAMING_STATUS_REFRESH_MS);
|
|
18015
18127
|
return () => window.clearInterval(timer);
|
|
18016
18128
|
}, [stream.isLoading]);
|
|
18017
|
-
|
|
18129
|
+
React55.useEffect(() => {
|
|
18018
18130
|
if (threadGoal?.status === "active" && stream.isLoading) {
|
|
18019
18131
|
setGoalElapsedStartedAt(Date.now());
|
|
18020
18132
|
return;
|
|
@@ -18026,55 +18138,55 @@ function Chat({
|
|
|
18026
18138
|
threadGoal?.id,
|
|
18027
18139
|
threadGoal?.status
|
|
18028
18140
|
]);
|
|
18029
|
-
|
|
18141
|
+
React55.useEffect(() => {
|
|
18030
18142
|
setIsGoalObjectiveExpanded(false);
|
|
18031
18143
|
}, [threadGoal?.id]);
|
|
18032
|
-
const [composerParts, setComposerParts] =
|
|
18033
|
-
const [renderedComposerParts, setRenderedComposerParts] =
|
|
18034
|
-
const [composerDomVersion, setComposerDomVersion] =
|
|
18035
|
-
const [selectedTool, setSelectedTool] =
|
|
18144
|
+
const [composerParts, setComposerParts] = React55.useState([]);
|
|
18145
|
+
const [renderedComposerParts, setRenderedComposerParts] = React55.useState([]);
|
|
18146
|
+
const [composerDomVersion, setComposerDomVersion] = React55.useState(0);
|
|
18147
|
+
const [selectedTool, setSelectedTool] = React55.useState(
|
|
18036
18148
|
null
|
|
18037
18149
|
);
|
|
18038
|
-
const [planModeEnabled, setPlanModeEnabled] =
|
|
18039
|
-
const [petSettingsOpen, setPetSettingsOpen] =
|
|
18040
|
-
const [petLocalSettings, setPetLocalSettings] =
|
|
18041
|
-
const [attachmentState, setAttachmentState] =
|
|
18150
|
+
const [planModeEnabled, setPlanModeEnabled] = React55.useState(false);
|
|
18151
|
+
const [petSettingsOpen, setPetSettingsOpen] = React55.useState(false);
|
|
18152
|
+
const [petLocalSettings, setPetLocalSettings] = React55.useState(() => readPetLocalSettings());
|
|
18153
|
+
const [attachmentState, setAttachmentState] = React55.useState({
|
|
18042
18154
|
uploadedFiles: [],
|
|
18043
18155
|
hasUploadingFiles: false,
|
|
18044
18156
|
hasParsingFiles: false
|
|
18045
18157
|
});
|
|
18046
|
-
const [references, setReferences] =
|
|
18047
|
-
const [isUploadingReferenceImages, setIsUploadingReferenceImages] =
|
|
18048
|
-
const [quoteSelection, setQuoteSelection] =
|
|
18049
|
-
const [isAtBottom, setIsAtBottom] =
|
|
18050
|
-
const [hasUpdatesBelow, setHasUpdatesBelow] =
|
|
18158
|
+
const [references, setReferences] = React55.useState([]);
|
|
18159
|
+
const [isUploadingReferenceImages, setIsUploadingReferenceImages] = React55.useState(false);
|
|
18160
|
+
const [quoteSelection, setQuoteSelection] = React55.useState(null);
|
|
18161
|
+
const [isAtBottom, setIsAtBottom] = React55.useState(true);
|
|
18162
|
+
const [hasUpdatesBelow, setHasUpdatesBelow] = React55.useState(false);
|
|
18051
18163
|
const {
|
|
18052
18164
|
threads,
|
|
18053
18165
|
deleteThread,
|
|
18054
18166
|
refreshThreads,
|
|
18055
18167
|
isLoading: isThreadsLoading
|
|
18056
18168
|
} = useThreads();
|
|
18057
|
-
const viewportRef =
|
|
18058
|
-
const chatColumnRef =
|
|
18059
|
-
const messageNavigationAnchorsRef =
|
|
18169
|
+
const viewportRef = React55.useRef(null);
|
|
18170
|
+
const chatColumnRef = React55.useRef(null);
|
|
18171
|
+
const messageNavigationAnchorsRef = React55.useRef(
|
|
18060
18172
|
/* @__PURE__ */ new Map()
|
|
18061
18173
|
);
|
|
18062
|
-
const attachmentsRef =
|
|
18063
|
-
const composerInputRef =
|
|
18064
|
-
const slashPaletteRef =
|
|
18065
|
-
const slashPaletteOptionRefs =
|
|
18174
|
+
const attachmentsRef = React55.useRef(null);
|
|
18175
|
+
const composerInputRef = React55.useRef(null);
|
|
18176
|
+
const slashPaletteRef = React55.useRef(null);
|
|
18177
|
+
const slashPaletteOptionRefs = React55.useRef(
|
|
18066
18178
|
[]
|
|
18067
18179
|
);
|
|
18068
|
-
const composerPartsRef =
|
|
18069
|
-
const pendingComposerCaretOffsetRef =
|
|
18070
|
-
const shouldAutoScrollRef =
|
|
18071
|
-
const forceFollowRef =
|
|
18072
|
-
const previousMessageCountRef =
|
|
18073
|
-
const previousScrollTopRef =
|
|
18074
|
-
const isPrependingHistoryMessagesRef =
|
|
18075
|
-
const autoScrollFrameRef =
|
|
18076
|
-
const isPointerDownRef =
|
|
18077
|
-
const lastTouchYRef =
|
|
18180
|
+
const composerPartsRef = React55.useRef([]);
|
|
18181
|
+
const pendingComposerCaretOffsetRef = React55.useRef(null);
|
|
18182
|
+
const shouldAutoScrollRef = React55.useRef(true);
|
|
18183
|
+
const forceFollowRef = React55.useRef(false);
|
|
18184
|
+
const previousMessageCountRef = React55.useRef(0);
|
|
18185
|
+
const previousScrollTopRef = React55.useRef(0);
|
|
18186
|
+
const isPrependingHistoryMessagesRef = React55.useRef(false);
|
|
18187
|
+
const autoScrollFrameRef = React55.useRef(null);
|
|
18188
|
+
const isPointerDownRef = React55.useRef(false);
|
|
18189
|
+
const lastTouchYRef = React55.useRef(null);
|
|
18078
18190
|
const {
|
|
18079
18191
|
runtimeCapabilities,
|
|
18080
18192
|
runtimeCapabilitiesReady,
|
|
@@ -18103,24 +18215,24 @@ function Chat({
|
|
|
18103
18215
|
const resolvedPlaceholder = placeholder ?? t("chat.placeholder");
|
|
18104
18216
|
const assistantTitle = assistantName || resolvedTitle;
|
|
18105
18217
|
const petRequired = options?.displayMode === "pet";
|
|
18106
|
-
const basePetSettings =
|
|
18218
|
+
const basePetSettings = React55.useMemo(
|
|
18107
18219
|
() => derivePetLocalSettings(options?.pet),
|
|
18108
18220
|
[options?.pet]
|
|
18109
18221
|
);
|
|
18110
|
-
const displayedPetSettings =
|
|
18222
|
+
const displayedPetSettings = React55.useMemo(
|
|
18111
18223
|
() => ({
|
|
18112
18224
|
...petLocalSettings ?? basePetSettings,
|
|
18113
18225
|
...petRequired ? { enabled: true } : {}
|
|
18114
18226
|
}),
|
|
18115
18227
|
[basePetSettings, petLocalSettings, petRequired]
|
|
18116
18228
|
);
|
|
18117
|
-
const effectivePet =
|
|
18229
|
+
const effectivePet = React55.useMemo(() => {
|
|
18118
18230
|
if (petRequired || petLocalSettings) {
|
|
18119
18231
|
return buildPetOptionsFromLocalSettings(displayedPetSettings);
|
|
18120
18232
|
}
|
|
18121
18233
|
return options?.pet ?? null;
|
|
18122
18234
|
}, [displayedPetSettings, options?.pet, petLocalSettings, petRequired]);
|
|
18123
|
-
const savePetLocalSettings =
|
|
18235
|
+
const savePetLocalSettings = React55.useCallback(
|
|
18124
18236
|
(settings) => {
|
|
18125
18237
|
const nextSettings = petRequired ? { ...settings, enabled: true } : settings;
|
|
18126
18238
|
setPetLocalSettings(nextSettings);
|
|
@@ -18128,7 +18240,7 @@ function Chat({
|
|
|
18128
18240
|
},
|
|
18129
18241
|
[petRequired]
|
|
18130
18242
|
);
|
|
18131
|
-
const handlePetCommand =
|
|
18243
|
+
const handlePetCommand = React55.useCallback(
|
|
18132
18244
|
(mode) => {
|
|
18133
18245
|
if (mode === "settings") {
|
|
18134
18246
|
setPetSettingsOpen(true);
|
|
@@ -18150,11 +18262,11 @@ function Chat({
|
|
|
18150
18262
|
[displayedPetSettings, effectivePet, petRequired, savePetLocalSettings]
|
|
18151
18263
|
);
|
|
18152
18264
|
const inputPlaceholder = selectedTool?.placeholderOverride ?? composer?.placeholder ?? resolvedPlaceholder;
|
|
18153
|
-
const messages =
|
|
18265
|
+
const messages = React55.useMemo(
|
|
18154
18266
|
() => stream.messages ?? [],
|
|
18155
18267
|
[stream.messages]
|
|
18156
18268
|
);
|
|
18157
|
-
const messageNavigationLabels =
|
|
18269
|
+
const messageNavigationLabels = React55.useMemo(
|
|
18158
18270
|
() => ({
|
|
18159
18271
|
user: t("chat.youLabel"),
|
|
18160
18272
|
assistant: assistantTitle,
|
|
@@ -18173,7 +18285,7 @@ function Chat({
|
|
|
18173
18285
|
}),
|
|
18174
18286
|
[assistantTitle, t]
|
|
18175
18287
|
);
|
|
18176
|
-
const messageNavigationItems =
|
|
18288
|
+
const messageNavigationItems = React55.useMemo(
|
|
18177
18289
|
() => messageNavigationEnabled ? buildMessageNavigationItems(
|
|
18178
18290
|
messages,
|
|
18179
18291
|
{
|
|
@@ -18196,7 +18308,7 @@ function Chat({
|
|
|
18196
18308
|
historyMessagePagination?.isLoadingMore
|
|
18197
18309
|
);
|
|
18198
18310
|
const canLoadMoreMessages = Boolean(historyMessagePagination?.hasMore);
|
|
18199
|
-
const draft =
|
|
18311
|
+
const draft = React55.useMemo(
|
|
18200
18312
|
() => getComposerPlainText(composerParts),
|
|
18201
18313
|
[composerParts]
|
|
18202
18314
|
);
|
|
@@ -18210,7 +18322,7 @@ function Chat({
|
|
|
18210
18322
|
isEmpty: isComposerInputEmpty,
|
|
18211
18323
|
isStacked: isComposerStacked
|
|
18212
18324
|
});
|
|
18213
|
-
const pendingFollowUps =
|
|
18325
|
+
const pendingFollowUps = React55.useMemo(
|
|
18214
18326
|
() => sortVisiblePendingFollowUps(stream.pendingFollowUps ?? []),
|
|
18215
18327
|
[stream.pendingFollowUps]
|
|
18216
18328
|
);
|
|
@@ -18219,7 +18331,7 @@ function Chat({
|
|
|
18219
18331
|
const hasPendingHITLRequest = Boolean(stream.pendingHITLRequest);
|
|
18220
18332
|
const hasPendingInteractiveRequest = hasPendingRequestUserInput || hasPendingHITLRequest;
|
|
18221
18333
|
const hasPendingTodos = Boolean(stream.todos?.items.length);
|
|
18222
|
-
const goalAdapter =
|
|
18334
|
+
const goalAdapter = React55.useMemo(() => {
|
|
18223
18335
|
if (isGoalAdapter(options?.goal)) {
|
|
18224
18336
|
return options.goal;
|
|
18225
18337
|
}
|
|
@@ -18232,10 +18344,10 @@ function Chat({
|
|
|
18232
18344
|
"goal"
|
|
18233
18345
|
);
|
|
18234
18346
|
const showGoalStatus = goalCommandAvailable && !hasCompletedGoal && (Boolean(goalError) || threadGoal?.status === "active" && stream.isLoading);
|
|
18235
|
-
const clearQuoteSelection =
|
|
18347
|
+
const clearQuoteSelection = React55.useCallback(() => {
|
|
18236
18348
|
setQuoteSelection(null);
|
|
18237
18349
|
}, []);
|
|
18238
|
-
const commitComposerParts =
|
|
18350
|
+
const commitComposerParts = React55.useCallback(
|
|
18239
18351
|
(nextParts, options2) => {
|
|
18240
18352
|
const normalized = normalizeComposerParts(nextParts);
|
|
18241
18353
|
const previous = composerPartsRef.current;
|
|
@@ -18265,7 +18377,7 @@ function Chat({
|
|
|
18265
18377
|
},
|
|
18266
18378
|
[setRunRuntimeCapabilities]
|
|
18267
18379
|
);
|
|
18268
|
-
const setComposerText =
|
|
18380
|
+
const setComposerText = React55.useCallback(
|
|
18269
18381
|
(text, caretOffset = text.length) => {
|
|
18270
18382
|
commitComposerParts(createComposerTextParts(text), {
|
|
18271
18383
|
caretOffset,
|
|
@@ -18275,7 +18387,7 @@ function Chat({
|
|
|
18275
18387
|
},
|
|
18276
18388
|
[commitComposerParts]
|
|
18277
18389
|
);
|
|
18278
|
-
const focusComposerAt =
|
|
18390
|
+
const focusComposerAt = React55.useCallback((position) => {
|
|
18279
18391
|
const nextPosition = position ?? getComposerEditingLength(composerPartsRef.current);
|
|
18280
18392
|
pendingComposerCaretOffsetRef.current = nextPosition;
|
|
18281
18393
|
requestAnimationFrame(() => {
|
|
@@ -18304,7 +18416,7 @@ function Chat({
|
|
|
18304
18416
|
focusComposerAt
|
|
18305
18417
|
});
|
|
18306
18418
|
const parentMessenger = useParentMessenger({
|
|
18307
|
-
onSetComposerValue:
|
|
18419
|
+
onSetComposerValue: React55.useCallback(
|
|
18308
18420
|
(payload) => {
|
|
18309
18421
|
if (!payload) {
|
|
18310
18422
|
return;
|
|
@@ -18332,16 +18444,16 @@ function Chat({
|
|
|
18332
18444
|
},
|
|
18333
18445
|
[applyComposerValueRuntimeCapabilities, composer?.tools, setComposerText]
|
|
18334
18446
|
),
|
|
18335
|
-
onSetRuntimeCapabilities:
|
|
18447
|
+
onSetRuntimeCapabilities: React55.useCallback(
|
|
18336
18448
|
(selection) => {
|
|
18337
18449
|
applyExternalRuntimeCapabilities(selection);
|
|
18338
18450
|
},
|
|
18339
18451
|
[applyExternalRuntimeCapabilities]
|
|
18340
18452
|
),
|
|
18341
|
-
onFocusComposer:
|
|
18453
|
+
onFocusComposer: React55.useCallback(() => {
|
|
18342
18454
|
composerInputRef.current?.focus();
|
|
18343
18455
|
}, []),
|
|
18344
|
-
onSetPetEnabled:
|
|
18456
|
+
onSetPetEnabled: React55.useCallback(
|
|
18345
18457
|
(enabled) => {
|
|
18346
18458
|
if (petRequired) {
|
|
18347
18459
|
return;
|
|
@@ -18355,10 +18467,10 @@ function Chat({
|
|
|
18355
18467
|
)
|
|
18356
18468
|
});
|
|
18357
18469
|
const canMinimizeToPet = parentMessenger?.isParentAvailable === true && isPetEnabled(effectivePet);
|
|
18358
|
-
const handleMinimizeToPet =
|
|
18470
|
+
const handleMinimizeToPet = React55.useCallback(() => {
|
|
18359
18471
|
parentMessenger?.sendEvent("chat_minimize_change", { minimized: true });
|
|
18360
18472
|
}, [parentMessenger]);
|
|
18361
|
-
const syncQuoteSelection =
|
|
18473
|
+
const syncQuoteSelection = React55.useCallback(() => {
|
|
18362
18474
|
if (typeof window === "undefined") {
|
|
18363
18475
|
clearQuoteSelection();
|
|
18364
18476
|
return;
|
|
@@ -18403,23 +18515,23 @@ function Chat({
|
|
|
18403
18515
|
left
|
|
18404
18516
|
});
|
|
18405
18517
|
}, [clearQuoteSelection]);
|
|
18406
|
-
const cancelPendingAutoScroll =
|
|
18518
|
+
const cancelPendingAutoScroll = React55.useCallback(() => {
|
|
18407
18519
|
if (autoScrollFrameRef.current !== null) {
|
|
18408
18520
|
cancelAnimationFrame(autoScrollFrameRef.current);
|
|
18409
18521
|
autoScrollFrameRef.current = null;
|
|
18410
18522
|
}
|
|
18411
18523
|
}, []);
|
|
18412
|
-
const disableAutoFollow =
|
|
18524
|
+
const disableAutoFollow = React55.useCallback(() => {
|
|
18413
18525
|
forceFollowRef.current = false;
|
|
18414
18526
|
shouldAutoScrollRef.current = false;
|
|
18415
18527
|
cancelPendingAutoScroll();
|
|
18416
18528
|
}, [cancelPendingAutoScroll]);
|
|
18417
|
-
const enableAutoFollow =
|
|
18529
|
+
const enableAutoFollow = React55.useCallback(() => {
|
|
18418
18530
|
forceFollowRef.current = true;
|
|
18419
18531
|
shouldAutoScrollRef.current = true;
|
|
18420
18532
|
setHasUpdatesBelow(false);
|
|
18421
18533
|
}, []);
|
|
18422
|
-
const scrollToBottom =
|
|
18534
|
+
const scrollToBottom = React55.useCallback(
|
|
18423
18535
|
(smooth = false, force = false) => {
|
|
18424
18536
|
if (force) {
|
|
18425
18537
|
enableAutoFollow();
|
|
@@ -18446,7 +18558,7 @@ function Chat({
|
|
|
18446
18558
|
},
|
|
18447
18559
|
[cancelPendingAutoScroll, enableAutoFollow]
|
|
18448
18560
|
);
|
|
18449
|
-
const setMessageNavigationAnchor =
|
|
18561
|
+
const setMessageNavigationAnchor = React55.useCallback(
|
|
18450
18562
|
(id, node) => {
|
|
18451
18563
|
if (node) {
|
|
18452
18564
|
messageNavigationAnchorsRef.current.set(id, node);
|
|
@@ -18456,22 +18568,22 @@ function Chat({
|
|
|
18456
18568
|
},
|
|
18457
18569
|
[]
|
|
18458
18570
|
);
|
|
18459
|
-
const getMessageNavigationAnchor =
|
|
18571
|
+
const getMessageNavigationAnchor = React55.useCallback(
|
|
18460
18572
|
(item) => messageNavigationAnchorsRef.current.get(item.id) ?? null,
|
|
18461
18573
|
[]
|
|
18462
18574
|
);
|
|
18463
|
-
const handleMessageNavigationNavigate =
|
|
18575
|
+
const handleMessageNavigationNavigate = React55.useCallback(() => {
|
|
18464
18576
|
disableAutoFollow();
|
|
18465
18577
|
clearQuoteSelection();
|
|
18466
18578
|
}, [clearQuoteSelection, disableAutoFollow]);
|
|
18467
18579
|
const taskSummaryEnabled = options?.taskSummary?.enabled === true;
|
|
18468
18580
|
const taskSummaryConversationId = stream.conversationId ?? null;
|
|
18469
|
-
const [taskSummaryDocked, setTaskSummaryDocked] =
|
|
18470
|
-
const [taskSummaryOpen, setTaskSummaryOpen] =
|
|
18471
|
-
const manuallyClosedTaskSummaryConversationIdsRef =
|
|
18581
|
+
const [taskSummaryDocked, setTaskSummaryDocked] = React55.useState(false);
|
|
18582
|
+
const [taskSummaryOpen, setTaskSummaryOpen] = React55.useState(false);
|
|
18583
|
+
const manuallyClosedTaskSummaryConversationIdsRef = React55.useRef(
|
|
18472
18584
|
/* @__PURE__ */ new Set()
|
|
18473
18585
|
);
|
|
18474
|
-
const liveTaskSummaryPending =
|
|
18586
|
+
const liveTaskSummaryPending = React55.useMemo(() => {
|
|
18475
18587
|
const followUps = pendingFollowUps.map((item) => ({
|
|
18476
18588
|
id: `follow-up:${item.id}`,
|
|
18477
18589
|
kind: "follow_up",
|
|
@@ -18506,7 +18618,7 @@ function Chat({
|
|
|
18506
18618
|
stream.pendingRequestUserInput,
|
|
18507
18619
|
t
|
|
18508
18620
|
]);
|
|
18509
|
-
const liveTaskSummaryRunning =
|
|
18621
|
+
const liveTaskSummaryRunning = React55.useMemo(
|
|
18510
18622
|
() => stream.runtimeActivities.sandboxServices.services.filter(
|
|
18511
18623
|
(service) => service.status === "starting" || service.status === "running" || service.status === "stopping"
|
|
18512
18624
|
).map((service) => ({
|
|
@@ -18523,7 +18635,7 @@ function Chat({
|
|
|
18523
18635
|
})),
|
|
18524
18636
|
[stream.runtimeActivities.sandboxServices.services]
|
|
18525
18637
|
);
|
|
18526
|
-
const taskSummaryAgentNames =
|
|
18638
|
+
const taskSummaryAgentNames = React55.useMemo(() => {
|
|
18527
18639
|
const names = /* @__PURE__ */ new Map();
|
|
18528
18640
|
runtimeCapabilityOptions.forEach((option) => {
|
|
18529
18641
|
if (option.type !== "subAgent") return;
|
|
@@ -18535,7 +18647,7 @@ function Chat({
|
|
|
18535
18647
|
});
|
|
18536
18648
|
return names;
|
|
18537
18649
|
}, [runtimeCapabilityOptions]);
|
|
18538
|
-
const liveTaskSummary =
|
|
18650
|
+
const liveTaskSummary = React55.useMemo(
|
|
18539
18651
|
() => collectLiveTaskSummary({
|
|
18540
18652
|
messages: messages.map(
|
|
18541
18653
|
(message) => ({
|
|
@@ -18572,7 +18684,7 @@ function Chat({
|
|
|
18572
18684
|
client: stream.client,
|
|
18573
18685
|
live: liveTaskSummary
|
|
18574
18686
|
});
|
|
18575
|
-
const navigateToTaskSummaryMessage =
|
|
18687
|
+
const navigateToTaskSummaryMessage = React55.useCallback(
|
|
18576
18688
|
async (messageId) => {
|
|
18577
18689
|
try {
|
|
18578
18690
|
let anchor = messageNavigationAnchorsRef.current.get(messageId);
|
|
@@ -18596,7 +18708,7 @@ function Chat({
|
|
|
18596
18708
|
},
|
|
18597
18709
|
[clearQuoteSelection, disableAutoFollow, stream]
|
|
18598
18710
|
);
|
|
18599
|
-
const openTaskSummaryResource =
|
|
18711
|
+
const openTaskSummaryResource = React55.useCallback(
|
|
18600
18712
|
(resource, messageId, resourceTitle) => {
|
|
18601
18713
|
const data = {
|
|
18602
18714
|
resource,
|
|
@@ -18614,7 +18726,7 @@ function Chat({
|
|
|
18614
18726
|
},
|
|
18615
18727
|
[parentMessenger, taskSummaryConversationId]
|
|
18616
18728
|
);
|
|
18617
|
-
|
|
18729
|
+
React55.useEffect(() => {
|
|
18618
18730
|
const viewport = viewportRef.current;
|
|
18619
18731
|
if (!viewport) return;
|
|
18620
18732
|
previousScrollTopRef.current = viewport.scrollTop;
|
|
@@ -18695,14 +18807,14 @@ function Chat({
|
|
|
18695
18807
|
window.removeEventListener("pointercancel", stopPointerTracking);
|
|
18696
18808
|
};
|
|
18697
18809
|
}, [cancelPendingAutoScroll, disableAutoFollow]);
|
|
18698
|
-
|
|
18810
|
+
React55.useEffect(() => {
|
|
18699
18811
|
shouldAutoScrollRef.current = true;
|
|
18700
18812
|
forceFollowRef.current = false;
|
|
18701
18813
|
previousScrollTopRef.current = 0;
|
|
18702
18814
|
setIsAtBottom(true);
|
|
18703
18815
|
setHasUpdatesBelow(false);
|
|
18704
18816
|
}, [stream.threadId]);
|
|
18705
|
-
|
|
18817
|
+
React55.useEffect(() => {
|
|
18706
18818
|
const messageCountChanged = messages.length !== previousMessageCountRef.current;
|
|
18707
18819
|
previousMessageCountRef.current = messages.length;
|
|
18708
18820
|
if (isPrependingHistoryMessagesRef.current) {
|
|
@@ -18724,7 +18836,7 @@ function Chat({
|
|
|
18724
18836
|
const isSubmissionBlocked = hasPendingInteractiveRequest || missingConfig || isHistoryLoading || hasUploadingFiles || isUploadingReferenceImages;
|
|
18725
18837
|
const isSendDisabled = !trimmedDraft && !hasReferences || isSubmissionBlocked;
|
|
18726
18838
|
const isPromptEditDisabled = hasPendingInteractiveRequest || missingConfig || isHistoryLoading;
|
|
18727
|
-
const resizeComposerInput =
|
|
18839
|
+
const resizeComposerInput = React55.useCallback(() => {
|
|
18728
18840
|
const input = composerInputRef.current;
|
|
18729
18841
|
if (!input) {
|
|
18730
18842
|
return;
|
|
@@ -18732,7 +18844,7 @@ function Chat({
|
|
|
18732
18844
|
input.style.maxHeight = `${COMPOSER_INPUT_MAX_HEIGHT}px`;
|
|
18733
18845
|
input.style.overflowY = input.scrollHeight > COMPOSER_INPUT_MAX_HEIGHT ? "auto" : "hidden";
|
|
18734
18846
|
}, []);
|
|
18735
|
-
|
|
18847
|
+
React55.useLayoutEffect(() => {
|
|
18736
18848
|
composerPartsRef.current = composerParts;
|
|
18737
18849
|
resizeComposerInput();
|
|
18738
18850
|
const caretOffset = pendingComposerCaretOffsetRef.current;
|
|
@@ -18744,13 +18856,13 @@ function Chat({
|
|
|
18744
18856
|
}
|
|
18745
18857
|
}
|
|
18746
18858
|
}, [composerDomVersion, composerParts, resizeComposerInput]);
|
|
18747
|
-
|
|
18859
|
+
React55.useEffect(() => {
|
|
18748
18860
|
document.addEventListener("selectionchange", syncQuoteSelection);
|
|
18749
18861
|
return () => {
|
|
18750
18862
|
document.removeEventListener("selectionchange", syncQuoteSelection);
|
|
18751
18863
|
};
|
|
18752
18864
|
}, [syncQuoteSelection]);
|
|
18753
|
-
|
|
18865
|
+
React55.useEffect(() => {
|
|
18754
18866
|
const viewport = viewportRef.current;
|
|
18755
18867
|
if (!viewport) {
|
|
18756
18868
|
return;
|
|
@@ -18767,14 +18879,14 @@ function Chat({
|
|
|
18767
18879
|
window.removeEventListener("resize", handleViewportScroll);
|
|
18768
18880
|
};
|
|
18769
18881
|
}, [clearQuoteSelection]);
|
|
18770
|
-
|
|
18882
|
+
React55.useEffect(() => {
|
|
18771
18883
|
clearQuoteSelection();
|
|
18772
18884
|
}, [messages.length, stream.threadId, clearQuoteSelection]);
|
|
18773
|
-
|
|
18885
|
+
React55.useEffect(() => {
|
|
18774
18886
|
if (missingConfig) return;
|
|
18775
18887
|
void refreshThreads();
|
|
18776
18888
|
}, [missingConfig, refreshThreads]);
|
|
18777
|
-
|
|
18889
|
+
React55.useEffect(() => {
|
|
18778
18890
|
if (missingConfig || !stream.client || !stream.assistantId) {
|
|
18779
18891
|
setAssistantName(null);
|
|
18780
18892
|
setAssistantAvatar(null);
|
|
@@ -18797,10 +18909,10 @@ function Chat({
|
|
|
18797
18909
|
cancelled = true;
|
|
18798
18910
|
};
|
|
18799
18911
|
}, [missingConfig, stream.client, stream.assistantId]);
|
|
18800
|
-
|
|
18912
|
+
React55.useEffect(() => {
|
|
18801
18913
|
setThreadGoal(stream.threadGoal);
|
|
18802
18914
|
}, [stream.threadGoal]);
|
|
18803
|
-
|
|
18915
|
+
React55.useEffect(() => {
|
|
18804
18916
|
const threadId = stream.threadId?.trim();
|
|
18805
18917
|
if (!threadId || !goalCommandAvailable) {
|
|
18806
18918
|
setThreadGoal(null);
|
|
@@ -18841,7 +18953,7 @@ function Chat({
|
|
|
18841
18953
|
return () => controller.abort();
|
|
18842
18954
|
}, [goalAdapter, goalCommandAvailable, stream.threadId]);
|
|
18843
18955
|
const uploadedFiles = attachmentState.uploadedFiles;
|
|
18844
|
-
const syncComposerInputFromElement =
|
|
18956
|
+
const syncComposerInputFromElement = React55.useCallback(
|
|
18845
18957
|
(input) => {
|
|
18846
18958
|
const previousCapabilities = getComposerCapabilityPartMap(
|
|
18847
18959
|
composerPartsRef.current
|
|
@@ -18859,25 +18971,25 @@ function Chat({
|
|
|
18859
18971
|
},
|
|
18860
18972
|
[commitComposerParts, updateRuntimeCapabilityPalette]
|
|
18861
18973
|
);
|
|
18862
|
-
const handleComposerInput =
|
|
18974
|
+
const handleComposerInput = React55.useCallback(
|
|
18863
18975
|
(event) => {
|
|
18864
18976
|
syncComposerInputFromElement(event.currentTarget);
|
|
18865
18977
|
},
|
|
18866
18978
|
[syncComposerInputFromElement]
|
|
18867
18979
|
);
|
|
18868
|
-
const handleComposerCompositionEnd =
|
|
18980
|
+
const handleComposerCompositionEnd = React55.useCallback(
|
|
18869
18981
|
(event) => {
|
|
18870
18982
|
syncComposerInputFromElement(event.currentTarget);
|
|
18871
18983
|
},
|
|
18872
18984
|
[syncComposerInputFromElement]
|
|
18873
18985
|
);
|
|
18874
|
-
const handleComposerSelect =
|
|
18986
|
+
const handleComposerSelect = React55.useCallback(() => {
|
|
18875
18987
|
updateRuntimeCapabilityPalette(
|
|
18876
18988
|
composerPartsRef.current,
|
|
18877
18989
|
composerInputRef.current ? getComposerSelectionOffset(composerInputRef.current) : void 0
|
|
18878
18990
|
);
|
|
18879
18991
|
}, [updateRuntimeCapabilityPalette]);
|
|
18880
|
-
const submitDraft =
|
|
18992
|
+
const submitDraft = React55.useCallback(
|
|
18881
18993
|
(submitOptions = {}) => {
|
|
18882
18994
|
if (isSubmissionBlocked) return;
|
|
18883
18995
|
const contentToSubmit = (submitOptions.inputText ?? trimmedDraft).trim();
|
|
@@ -18983,7 +19095,7 @@ function Chat({
|
|
|
18983
19095
|
t
|
|
18984
19096
|
]
|
|
18985
19097
|
);
|
|
18986
|
-
const handleGoalCommand =
|
|
19098
|
+
const handleGoalCommand = React55.useCallback(
|
|
18987
19099
|
async ({
|
|
18988
19100
|
args,
|
|
18989
19101
|
commandSource,
|
|
@@ -19089,7 +19201,7 @@ function Chat({
|
|
|
19089
19201
|
t
|
|
19090
19202
|
]
|
|
19091
19203
|
);
|
|
19092
|
-
const handleGoalPanelOpenChange =
|
|
19204
|
+
const handleGoalPanelOpenChange = React55.useCallback((open) => {
|
|
19093
19205
|
setIsGoalPanelOpen(open);
|
|
19094
19206
|
}, []);
|
|
19095
19207
|
const {
|
|
@@ -19133,7 +19245,7 @@ function Chat({
|
|
|
19133
19245
|
plugin: t("composer.slashCommands.empty.loadingCapabilities"),
|
|
19134
19246
|
subAgent: t("composer.slashCommands.empty.loadingCapabilities")
|
|
19135
19247
|
};
|
|
19136
|
-
|
|
19248
|
+
React55.useEffect(() => {
|
|
19137
19249
|
if (!runtimeCapabilityPalette) {
|
|
19138
19250
|
return;
|
|
19139
19251
|
}
|
|
@@ -19152,7 +19264,7 @@ function Chat({
|
|
|
19152
19264
|
);
|
|
19153
19265
|
}
|
|
19154
19266
|
}, [slashPaletteOptions.length, runtimeCapabilityPalette]);
|
|
19155
|
-
|
|
19267
|
+
React55.useLayoutEffect(() => {
|
|
19156
19268
|
if (!runtimeCapabilityPalette) {
|
|
19157
19269
|
return;
|
|
19158
19270
|
}
|
|
@@ -19169,7 +19281,7 @@ function Chat({
|
|
|
19169
19281
|
container.scrollTop += optionRect.bottom - containerRect.bottom;
|
|
19170
19282
|
}
|
|
19171
19283
|
}, [runtimeCapabilityPalette, slashPaletteOptions.length]);
|
|
19172
|
-
const submitGoalModeDraft =
|
|
19284
|
+
const submitGoalModeDraft = React55.useCallback(() => {
|
|
19173
19285
|
const objective = getComposerPlainText(composerPartsRef.current).trim();
|
|
19174
19286
|
if (!isGoalModeOpen || !goalCommandAvailable || !objective) {
|
|
19175
19287
|
return false;
|
|
@@ -19207,7 +19319,7 @@ function Chat({
|
|
|
19207
19319
|
}
|
|
19208
19320
|
submitDraft();
|
|
19209
19321
|
};
|
|
19210
|
-
const handleEditPendingFollowUp =
|
|
19322
|
+
const handleEditPendingFollowUp = React55.useCallback(
|
|
19211
19323
|
(id) => {
|
|
19212
19324
|
const item = pendingFollowUps.find(
|
|
19213
19325
|
(entry) => entry.id === id && entry.mode === "queue"
|
|
@@ -19234,7 +19346,7 @@ function Chat({
|
|
|
19234
19346
|
},
|
|
19235
19347
|
[pendingFollowUps, setComposerText, stream]
|
|
19236
19348
|
);
|
|
19237
|
-
const handleQuoteSelection =
|
|
19349
|
+
const handleQuoteSelection = React55.useCallback(() => {
|
|
19238
19350
|
if (!quoteSelection) {
|
|
19239
19351
|
return;
|
|
19240
19352
|
}
|
|
@@ -19250,7 +19362,7 @@ function Chat({
|
|
|
19250
19362
|
const handleAttachmentClick = () => {
|
|
19251
19363
|
attachmentsRef.current?.openFilePicker();
|
|
19252
19364
|
};
|
|
19253
|
-
const uploadContextFile =
|
|
19365
|
+
const uploadContextFile = React55.useCallback(
|
|
19254
19366
|
(file) => {
|
|
19255
19367
|
const formData = new FormData();
|
|
19256
19368
|
formData.append("file", file, file.name || "upload");
|
|
@@ -19269,13 +19381,13 @@ function Chat({
|
|
|
19269
19381
|
},
|
|
19270
19382
|
[stream.assistantId, stream.client, stream.threadId]
|
|
19271
19383
|
);
|
|
19272
|
-
const getContextFileStatus =
|
|
19384
|
+
const getContextFileStatus = React55.useCallback(
|
|
19273
19385
|
(fileId) => stream.client.contexts.fetch(`/files/${fileId}/status`, {
|
|
19274
19386
|
method: "GET"
|
|
19275
19387
|
}),
|
|
19276
19388
|
[stream.client]
|
|
19277
19389
|
);
|
|
19278
|
-
const deleteContextFile =
|
|
19390
|
+
const deleteContextFile = React55.useCallback(
|
|
19279
19391
|
(storageFileId) => stream.client.contexts.deleteFile(storageFileId),
|
|
19280
19392
|
[stream.client]
|
|
19281
19393
|
);
|
|
@@ -19383,7 +19495,7 @@ function Chat({
|
|
|
19383
19495
|
}
|
|
19384
19496
|
submitDraft();
|
|
19385
19497
|
};
|
|
19386
|
-
const handleComposerPaste =
|
|
19498
|
+
const handleComposerPaste = React55.useCallback(
|
|
19387
19499
|
(event) => {
|
|
19388
19500
|
const clipboardData = event.clipboardData;
|
|
19389
19501
|
if (!clipboardData) {
|
|
@@ -19485,13 +19597,13 @@ function Chat({
|
|
|
19485
19597
|
const handleToolSelect = (tool) => {
|
|
19486
19598
|
setSelectedTool((prev) => prev?.id === tool.id ? null : tool);
|
|
19487
19599
|
};
|
|
19488
|
-
const handlePromptClick =
|
|
19600
|
+
const handlePromptClick = React55.useCallback(
|
|
19489
19601
|
(prompt) => {
|
|
19490
19602
|
submitDraft({ inputText: prompt, displayText: prompt });
|
|
19491
19603
|
},
|
|
19492
19604
|
[submitDraft]
|
|
19493
19605
|
);
|
|
19494
|
-
const handlePromptEdit =
|
|
19606
|
+
const handlePromptEdit = React55.useCallback(
|
|
19495
19607
|
(prompt) => {
|
|
19496
19608
|
if (isPromptEditDisabled) return;
|
|
19497
19609
|
setComposerText(prompt, prompt.length);
|
|
@@ -19500,7 +19612,7 @@ function Chat({
|
|
|
19500
19612
|
},
|
|
19501
19613
|
[focusComposerAt, isPromptEditDisabled, setComposerText]
|
|
19502
19614
|
);
|
|
19503
|
-
const loadConversationMessages =
|
|
19615
|
+
const loadConversationMessages = React55.useCallback(
|
|
19504
19616
|
async (recordId) => {
|
|
19505
19617
|
if (missingConfig) {
|
|
19506
19618
|
setHistoryError(missingConfigShortMessage);
|
|
@@ -19521,7 +19633,7 @@ function Chat({
|
|
|
19521
19633
|
},
|
|
19522
19634
|
[missingConfig, missingConfigShortMessage, stream, t]
|
|
19523
19635
|
);
|
|
19524
|
-
const handleLoadMoreMessages =
|
|
19636
|
+
const handleLoadMoreMessages = React55.useCallback(async () => {
|
|
19525
19637
|
if (!canLoadMoreMessages || isLoadingMoreMessages) {
|
|
19526
19638
|
return;
|
|
19527
19639
|
}
|
|
@@ -19630,19 +19742,19 @@ function Chat({
|
|
|
19630
19742
|
};
|
|
19631
19743
|
const acceptMimes = composer?.attachments?.accept ? Object.entries(composer.attachments.accept).map(([mime, exts]) => [mime, ...exts.map((e) => `.${e}`)].join(",")).join(",") : void 0;
|
|
19632
19744
|
const canUploadDroppedFiles = composer?.attachments?.enabled === true && !missingConfig && !isHistoryLoading && !hasPendingInteractiveRequest;
|
|
19633
|
-
const handleDroppedFiles =
|
|
19745
|
+
const handleDroppedFiles = React55.useCallback((files) => {
|
|
19634
19746
|
return attachmentsRef.current?.queueFiles(files) ?? false;
|
|
19635
19747
|
}, []);
|
|
19636
|
-
const currentThread =
|
|
19748
|
+
const currentThread = React55.useMemo(
|
|
19637
19749
|
() => threads.find((item) => item.id === stream.threadId),
|
|
19638
19750
|
[threads, stream.threadId]
|
|
19639
19751
|
);
|
|
19640
|
-
const assistantStatusText =
|
|
19752
|
+
const assistantStatusText = React55.useMemo(() => {
|
|
19641
19753
|
if (!stream.threadId) return t("chat.statusOnline");
|
|
19642
19754
|
return currentThread?.title?.trim() || t("chat.statusOnline");
|
|
19643
19755
|
}, [currentThread?.title, stream.threadId, t]);
|
|
19644
19756
|
const streamErrorMessage = stream.error instanceof Error ? stream.error.message : void 0;
|
|
19645
|
-
const threadErrorMessage =
|
|
19757
|
+
const threadErrorMessage = React55.useMemo(() => {
|
|
19646
19758
|
if (streamErrorMessage?.trim()) return streamErrorMessage.trim();
|
|
19647
19759
|
if (currentThread?.status !== "error") return void 0;
|
|
19648
19760
|
const message = currentThread.error?.trim();
|
|
@@ -19673,13 +19785,13 @@ function Chat({
|
|
|
19673
19785
|
fallbackTitle: t("history.threadFallback")
|
|
19674
19786
|
});
|
|
19675
19787
|
const layoutMaxWidth = options?.layout?.maxWidth;
|
|
19676
|
-
const chatColumnStyle =
|
|
19788
|
+
const chatColumnStyle = React55.useMemo(() => {
|
|
19677
19789
|
if (layoutMaxWidth === void 0 || layoutMaxWidth === null || layoutMaxWidth === "") {
|
|
19678
19790
|
return void 0;
|
|
19679
19791
|
}
|
|
19680
19792
|
return { maxWidth: layoutMaxWidth };
|
|
19681
19793
|
}, [layoutMaxWidth]);
|
|
19682
|
-
|
|
19794
|
+
React55.useLayoutEffect(() => {
|
|
19683
19795
|
if (!taskSummaryEnabled) {
|
|
19684
19796
|
setTaskSummaryDocked(false);
|
|
19685
19797
|
return;
|
|
@@ -19714,7 +19826,7 @@ function Chat({
|
|
|
19714
19826
|
const taskSummaryAvailable = Boolean(
|
|
19715
19827
|
taskSummaryEnabled && stream.threadId && taskSummaryConversationId
|
|
19716
19828
|
);
|
|
19717
|
-
const handleTaskSummaryOpenChange =
|
|
19829
|
+
const handleTaskSummaryOpenChange = React55.useCallback(
|
|
19718
19830
|
(open) => {
|
|
19719
19831
|
setTaskSummaryOpen(open);
|
|
19720
19832
|
if (!taskSummaryConversationId) return;
|
|
@@ -19730,12 +19842,12 @@ function Chat({
|
|
|
19730
19842
|
},
|
|
19731
19843
|
[taskSummaryConversationId]
|
|
19732
19844
|
);
|
|
19733
|
-
|
|
19845
|
+
React55.useEffect(() => {
|
|
19734
19846
|
if (!taskSummaryDocked) {
|
|
19735
19847
|
setTaskSummaryOpen(false);
|
|
19736
19848
|
}
|
|
19737
19849
|
}, [taskSummaryDocked]);
|
|
19738
|
-
|
|
19850
|
+
React55.useEffect(() => {
|
|
19739
19851
|
if (!taskSummaryDocked || !taskSummaryAvailable || !taskSummaryConversationId || manuallyClosedTaskSummaryConversationIdsRef.current.has(
|
|
19740
19852
|
taskSummaryConversationId
|
|
19741
19853
|
)) {
|
|
@@ -19756,13 +19868,13 @@ function Chat({
|
|
|
19756
19868
|
onFocusComposer: () => focusComposerAt(),
|
|
19757
19869
|
onOpenResource: openTaskSummaryResource
|
|
19758
19870
|
};
|
|
19759
|
-
return /* @__PURE__ */ (0,
|
|
19871
|
+
return /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(
|
|
19760
19872
|
"div",
|
|
19761
19873
|
{
|
|
19762
19874
|
className: "relative flex h-full w-full min-w-0 bg-background",
|
|
19763
19875
|
"data-task-summary-layout": taskSummaryDocked ? "docked" : "popover",
|
|
19764
19876
|
children: [
|
|
19765
|
-
/* @__PURE__ */ (0,
|
|
19877
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(
|
|
19766
19878
|
UploadDroppedFiles,
|
|
19767
19879
|
{
|
|
19768
19880
|
ref: viewportRef,
|
|
@@ -19777,7 +19889,7 @@ function Chat({
|
|
|
19777
19889
|
className
|
|
19778
19890
|
),
|
|
19779
19891
|
children: [
|
|
19780
|
-
/* @__PURE__ */ (0,
|
|
19892
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(
|
|
19781
19893
|
"div",
|
|
19782
19894
|
{
|
|
19783
19895
|
ref: chatColumnRef,
|
|
@@ -19785,9 +19897,9 @@ function Chat({
|
|
|
19785
19897
|
className: "mx-auto flex w-full items-center justify-between border-b p-2 sticky top-0 z-10 bg-background",
|
|
19786
19898
|
style: chatColumnStyle,
|
|
19787
19899
|
children: [
|
|
19788
|
-
/* @__PURE__ */ (0,
|
|
19789
|
-
/* @__PURE__ */ (0,
|
|
19790
|
-
/* @__PURE__ */ (0,
|
|
19900
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { className: "flex min-w-0 items-center gap-3 overflow-hidden", children: [
|
|
19901
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { className: "relative shrink-0", children: [
|
|
19902
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
19791
19903
|
ChatkitAvatar,
|
|
19792
19904
|
{
|
|
19793
19905
|
avatar: assistantAvatar,
|
|
@@ -19795,10 +19907,10 @@ function Chat({
|
|
|
19795
19907
|
label: assistantTitle
|
|
19796
19908
|
}
|
|
19797
19909
|
),
|
|
19798
|
-
/* @__PURE__ */ (0,
|
|
19910
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("span", { className: "absolute bottom-0 right-0 h-2.5 w-2.5 rounded-full border-2 border-background bg-green-500" })
|
|
19799
19911
|
] }),
|
|
19800
|
-
/* @__PURE__ */ (0,
|
|
19801
|
-
/* @__PURE__ */ (0,
|
|
19912
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { className: "min-w-0", children: [
|
|
19913
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
19802
19914
|
"h2",
|
|
19803
19915
|
{
|
|
19804
19916
|
className: "text-lg font-semibold truncate",
|
|
@@ -19806,7 +19918,7 @@ function Chat({
|
|
|
19806
19918
|
children: assistantTitle
|
|
19807
19919
|
}
|
|
19808
19920
|
),
|
|
19809
|
-
/* @__PURE__ */ (0,
|
|
19921
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
19810
19922
|
"p",
|
|
19811
19923
|
{
|
|
19812
19924
|
className: "truncate text-xs text-muted-foreground",
|
|
@@ -19816,8 +19928,8 @@ function Chat({
|
|
|
19816
19928
|
)
|
|
19817
19929
|
] })
|
|
19818
19930
|
] }),
|
|
19819
|
-
/* @__PURE__ */ (0,
|
|
19820
|
-
taskSummaryAvailable && /* @__PURE__ */ (0,
|
|
19931
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { className: "flex items-center gap-1", children: [
|
|
19932
|
+
taskSummaryAvailable && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
19821
19933
|
TaskSummaryTrigger,
|
|
19822
19934
|
{
|
|
19823
19935
|
...taskSummaryProps,
|
|
@@ -19826,8 +19938,9 @@ function Chat({
|
|
|
19826
19938
|
onOpenChange: handleTaskSummaryOpenChange
|
|
19827
19939
|
}
|
|
19828
19940
|
),
|
|
19829
|
-
|
|
19830
|
-
|
|
19941
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(WorkbenchToggleButton, {}),
|
|
19942
|
+
canMinimizeToPet && /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(Tooltip, { children: [
|
|
19943
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("span", { className: "inline-flex h-8 w-8", children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
19831
19944
|
"button",
|
|
19832
19945
|
{
|
|
19833
19946
|
type: "button",
|
|
@@ -19838,13 +19951,13 @@ function Chat({
|
|
|
19838
19951
|
"transition-colors duration-150"
|
|
19839
19952
|
),
|
|
19840
19953
|
"aria-label": t("chat.minimizeToPet"),
|
|
19841
|
-
children: /* @__PURE__ */ (0,
|
|
19954
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_lucide_react32.Minus, { size: 16 })
|
|
19842
19955
|
}
|
|
19843
19956
|
) }) }),
|
|
19844
|
-
/* @__PURE__ */ (0,
|
|
19957
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(TooltipContent, { side: "bottom", children: t("chat.minimizeToPet") })
|
|
19845
19958
|
] }),
|
|
19846
|
-
/* @__PURE__ */ (0,
|
|
19847
|
-
/* @__PURE__ */ (0,
|
|
19959
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(Tooltip, { children: [
|
|
19960
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("span", { className: "inline-flex h-8 w-8", children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
19848
19961
|
"button",
|
|
19849
19962
|
{
|
|
19850
19963
|
type: "button",
|
|
@@ -19855,14 +19968,14 @@ function Chat({
|
|
|
19855
19968
|
"transition-colors duration-150"
|
|
19856
19969
|
),
|
|
19857
19970
|
"aria-label": t("settings.open"),
|
|
19858
|
-
children: /* @__PURE__ */ (0,
|
|
19971
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_lucide_react32.Settings, { size: 16 })
|
|
19859
19972
|
}
|
|
19860
19973
|
) }) }),
|
|
19861
|
-
/* @__PURE__ */ (0,
|
|
19974
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(TooltipContent, { side: "bottom", children: t("settings.open") })
|
|
19862
19975
|
] }),
|
|
19863
|
-
history?.enabled !== false && /* @__PURE__ */ (0,
|
|
19864
|
-
/* @__PURE__ */ (0,
|
|
19865
|
-
/* @__PURE__ */ (0,
|
|
19976
|
+
history?.enabled !== false && /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(import_jsx_runtime59.Fragment, { children: [
|
|
19977
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(Tooltip, { children: [
|
|
19978
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("span", { className: "inline-flex h-8 w-8", children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
19866
19979
|
"button",
|
|
19867
19980
|
{
|
|
19868
19981
|
type: "button",
|
|
@@ -19875,12 +19988,12 @@ function Chat({
|
|
|
19875
19988
|
"disabled:pointer-events-none disabled:opacity-50 disabled:cursor-not-allowed"
|
|
19876
19989
|
),
|
|
19877
19990
|
"aria-label": t("history.newThread"),
|
|
19878
|
-
children: /* @__PURE__ */ (0,
|
|
19991
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_lucide_react32.Pencil, { size: 16 })
|
|
19879
19992
|
}
|
|
19880
19993
|
) }) }),
|
|
19881
|
-
/* @__PURE__ */ (0,
|
|
19994
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(TooltipContent, { side: "bottom", children: t("history.newThread") })
|
|
19882
19995
|
] }),
|
|
19883
|
-
/* @__PURE__ */ (0,
|
|
19996
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
19884
19997
|
HistorySidebar,
|
|
19885
19998
|
{
|
|
19886
19999
|
threads,
|
|
@@ -19899,7 +20012,7 @@ function Chat({
|
|
|
19899
20012
|
]
|
|
19900
20013
|
}
|
|
19901
20014
|
),
|
|
19902
|
-
showMessageNavigation && /* @__PURE__ */ (0,
|
|
20015
|
+
showMessageNavigation && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
19903
20016
|
MessageNavigator,
|
|
19904
20017
|
{
|
|
19905
20018
|
items: messageNavigationItems,
|
|
@@ -19910,18 +20023,18 @@ function Chat({
|
|
|
19910
20023
|
tagsOverflowLabel: (count) => t("message.navigation.moreTags", { count })
|
|
19911
20024
|
}
|
|
19912
20025
|
),
|
|
19913
|
-
/* @__PURE__ */ (0,
|
|
20026
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(
|
|
19914
20027
|
"div",
|
|
19915
20028
|
{
|
|
19916
20029
|
"data-slot": "chatkit-chat-content",
|
|
19917
20030
|
className: "mx-auto w-full flex-1 p-4",
|
|
19918
20031
|
style: chatColumnStyle,
|
|
19919
20032
|
children: [
|
|
19920
|
-
errorMessage && /* @__PURE__ */ (0,
|
|
19921
|
-
historyError && /* @__PURE__ */ (0,
|
|
19922
|
-
showMissingConfig && /* @__PURE__ */ (0,
|
|
19923
|
-
isHistoryLoading && /* @__PURE__ */ (0,
|
|
19924
|
-
messages.length === 0 && !canLoadMoreMessages ? /* @__PURE__ */ (0,
|
|
20033
|
+
errorMessage && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { className: "mb-4 rounded-lg border border-destructive/30 bg-destructive/10 px-3 py-2 text-sm text-destructive", children: errorMessage }),
|
|
20034
|
+
historyError && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { className: "mb-4 rounded-lg border border-amber-200 bg-amber-50 px-3 py-2 text-sm text-amber-900", children: historyError }),
|
|
20035
|
+
showMissingConfig && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { className: "mb-4 rounded-lg border border-amber-200 bg-amber-50 px-3 py-2 text-sm text-amber-900", children: missingConfigDetailMessage }),
|
|
20036
|
+
isHistoryLoading && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { className: "mb-4 rounded-lg border border-muted px-3 py-2 text-sm text-muted-foreground", children: t("chat.loadingThread") }),
|
|
20037
|
+
messages.length === 0 && !canLoadMoreMessages ? /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
19925
20038
|
StartScreen,
|
|
19926
20039
|
{
|
|
19927
20040
|
startScreen,
|
|
@@ -19930,10 +20043,10 @@ function Chat({
|
|
|
19930
20043
|
promptSendDisabled: isSubmissionBlocked,
|
|
19931
20044
|
promptEditDisabled: isPromptEditDisabled
|
|
19932
20045
|
}
|
|
19933
|
-
) : /* @__PURE__ */ (0,
|
|
19934
|
-
canLoadMoreMessages && /* @__PURE__ */ (0,
|
|
19935
|
-
/* @__PURE__ */ (0,
|
|
19936
|
-
/* @__PURE__ */ (0,
|
|
20046
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { className: "space-y-4", children: [
|
|
20047
|
+
canLoadMoreMessages && /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { className: "flex items-center gap-3 py-1", children: [
|
|
20048
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { className: "h-px min-w-8 flex-1 bg-border" }),
|
|
20049
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
19937
20050
|
Button,
|
|
19938
20051
|
{
|
|
19939
20052
|
type: "button",
|
|
@@ -19945,7 +20058,7 @@ function Chat({
|
|
|
19945
20058
|
children: isLoadingMoreMessages ? t("chat.loadingMoreMessages") : t("chat.loadMoreMessages")
|
|
19946
20059
|
}
|
|
19947
20060
|
),
|
|
19948
|
-
/* @__PURE__ */ (0,
|
|
20061
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { className: "h-px min-w-8 flex-1 bg-border" })
|
|
19949
20062
|
] }),
|
|
19950
20063
|
messages.map((message, index) => {
|
|
19951
20064
|
const messageType = String(message.type);
|
|
@@ -19989,7 +20102,7 @@ function Chat({
|
|
|
19989
20102
|
if (!isAssistantMessage && !hasPlainRenderableContent && !hasHumanAttachments && humanRuntimeCapabilityOptions.length === 0 && humanReferences.length === 0) {
|
|
19990
20103
|
return null;
|
|
19991
20104
|
}
|
|
19992
|
-
return /* @__PURE__ */ (0,
|
|
20105
|
+
return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
19993
20106
|
"div",
|
|
19994
20107
|
{
|
|
19995
20108
|
ref: (node) => setMessageNavigationAnchor(messageNavigationId, node),
|
|
@@ -19999,7 +20112,7 @@ function Chat({
|
|
|
19999
20112
|
message.type === "human" ? "justify-end" : "justify-start -ml-1"
|
|
20000
20113
|
// AI messages: slightly closer to left
|
|
20001
20114
|
),
|
|
20002
|
-
children: /* @__PURE__ */ (0,
|
|
20115
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(
|
|
20003
20116
|
"div",
|
|
20004
20117
|
{
|
|
20005
20118
|
className: cn(
|
|
@@ -20007,7 +20120,7 @@ function Chat({
|
|
|
20007
20120
|
isAssistantMessage && "min-w-0 flex-1"
|
|
20008
20121
|
),
|
|
20009
20122
|
children: [
|
|
20010
|
-
/* @__PURE__ */ (0,
|
|
20123
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
20011
20124
|
"div",
|
|
20012
20125
|
{
|
|
20013
20126
|
...canQuoteMessage ? {
|
|
@@ -20019,7 +20132,7 @@ function Chat({
|
|
|
20019
20132
|
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"
|
|
20020
20133
|
// AI messages: use chat-specific foreground color
|
|
20021
20134
|
),
|
|
20022
|
-
children: isAssistantMessage ? /* @__PURE__ */ (0,
|
|
20135
|
+
children: isAssistantMessage ? /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
20023
20136
|
AssistantMessage,
|
|
20024
20137
|
{
|
|
20025
20138
|
message: {
|
|
@@ -20039,14 +20152,14 @@ function Chat({
|
|
|
20039
20152
|
apiUrl: stream.apiUrl,
|
|
20040
20153
|
pet: effectivePet
|
|
20041
20154
|
}
|
|
20042
|
-
) : /* @__PURE__ */ (0,
|
|
20043
|
-
message.type === "human" && humanRuntimeCapabilityOptions.length > 0 && /* @__PURE__ */ (0,
|
|
20155
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(import_jsx_runtime59.Fragment, { children: [
|
|
20156
|
+
message.type === "human" && humanRuntimeCapabilityOptions.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
20044
20157
|
HumanRuntimeCapabilityChips,
|
|
20045
20158
|
{
|
|
20046
20159
|
options: humanRuntimeCapabilityOptions
|
|
20047
20160
|
}
|
|
20048
20161
|
),
|
|
20049
|
-
message.type === "human" && humanReferences.length > 0 && /* @__PURE__ */ (0,
|
|
20162
|
+
message.type === "human" && humanReferences.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { className: "mb-2 flex flex-wrap gap-1.5", children: humanReferences.map((reference) => /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
20050
20163
|
ReferenceChip,
|
|
20051
20164
|
{
|
|
20052
20165
|
reference,
|
|
@@ -20054,29 +20167,29 @@ function Chat({
|
|
|
20054
20167
|
},
|
|
20055
20168
|
getReferenceKey(reference)
|
|
20056
20169
|
)) }),
|
|
20057
|
-
message.type === "human" && humanAttachments.length > 0 && /* @__PURE__ */ (0,
|
|
20170
|
+
message.type === "human" && humanAttachments.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { className: "flex flex-wrap gap-1.5 mb-2", children: humanAttachments.map((file, fileIndex) => /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(
|
|
20058
20171
|
"div",
|
|
20059
20172
|
{
|
|
20060
20173
|
className: "flex items-center gap-1.5 rounded-md bg-primary-foreground/20 px-2 py-1 text-xs",
|
|
20061
20174
|
children: [
|
|
20062
|
-
/* @__PURE__ */ (0,
|
|
20063
|
-
/* @__PURE__ */ (0,
|
|
20175
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_lucide_react32.FileText, { size: 12 }),
|
|
20176
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("span", { className: "max-w-[100px] truncate", children: file.originalName ?? file.id })
|
|
20064
20177
|
]
|
|
20065
20178
|
},
|
|
20066
20179
|
fileIndex
|
|
20067
20180
|
)) }),
|
|
20068
|
-
Array.isArray(message.content) ? message.content.map((part, partIndex) => /* @__PURE__ */ (0,
|
|
20181
|
+
Array.isArray(message.content) ? message.content.map((part, partIndex) => /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
20069
20182
|
"p",
|
|
20070
20183
|
{
|
|
20071
20184
|
className: "wrap-break-word text-sm leading-relaxed",
|
|
20072
20185
|
children: formatMessageContent(part)
|
|
20073
20186
|
},
|
|
20074
20187
|
`${part.type}-${partIndex}`
|
|
20075
|
-
)) : /* @__PURE__ */ (0,
|
|
20188
|
+
)) : /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("span", { className: "wrap-break-word text-sm leading-relaxed", children: formatMessageContent(message.content) })
|
|
20076
20189
|
] })
|
|
20077
20190
|
}
|
|
20078
20191
|
),
|
|
20079
|
-
/* @__PURE__ */ (0,
|
|
20192
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
20080
20193
|
MessageActions,
|
|
20081
20194
|
{
|
|
20082
20195
|
content: messageContent,
|
|
@@ -20114,7 +20227,7 @@ function Chat({
|
|
|
20114
20227
|
stream.isLoading,
|
|
20115
20228
|
{ now: streamingNow }
|
|
20116
20229
|
);
|
|
20117
|
-
return /* @__PURE__ */ (0,
|
|
20230
|
+
return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { className: "flex justify-start gap-3 -ml-2", children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { className: "max-w-full rounded-2xl py-2.5", children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
20118
20231
|
AssistantStreamingIndicator,
|
|
20119
20232
|
{
|
|
20120
20233
|
status: fallbackStreamingStatus ?? "loading"
|
|
@@ -20125,7 +20238,7 @@ function Chat({
|
|
|
20125
20238
|
]
|
|
20126
20239
|
}
|
|
20127
20240
|
),
|
|
20128
|
-
!isAtBottom && messages.length > 0 && /* @__PURE__ */ (0,
|
|
20241
|
+
!isAtBottom && messages.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { className: "sticky bottom-20 z-20 flex justify-center px-4 pointer-events-none", children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
20129
20242
|
Button,
|
|
20130
20243
|
{
|
|
20131
20244
|
type: "button",
|
|
@@ -20138,10 +20251,10 @@ function Chat({
|
|
|
20138
20251
|
onClick: () => scrollToBottom(true, true),
|
|
20139
20252
|
"aria-label": t("chat.scrollToBottom"),
|
|
20140
20253
|
title: t("chat.scrollToBottom"),
|
|
20141
|
-
children: /* @__PURE__ */ (0,
|
|
20254
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_lucide_react32.ArrowDown, { size: 16 })
|
|
20142
20255
|
}
|
|
20143
20256
|
) }),
|
|
20144
|
-
quoteSelection && /* @__PURE__ */ (0,
|
|
20257
|
+
quoteSelection && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
20145
20258
|
"div",
|
|
20146
20259
|
{
|
|
20147
20260
|
className: "pointer-events-none fixed z-50",
|
|
@@ -20150,7 +20263,7 @@ function Chat({
|
|
|
20150
20263
|
left: `${quoteSelection.left}px`,
|
|
20151
20264
|
transform: "translateX(-50%)"
|
|
20152
20265
|
},
|
|
20153
|
-
children: /* @__PURE__ */ (0,
|
|
20266
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(
|
|
20154
20267
|
Button,
|
|
20155
20268
|
{
|
|
20156
20269
|
type: "button",
|
|
@@ -20162,22 +20275,22 @@ function Chat({
|
|
|
20162
20275
|
"aria-label": t("composer.quoteSelection"),
|
|
20163
20276
|
title: t("composer.quoteSelection"),
|
|
20164
20277
|
children: [
|
|
20165
|
-
/* @__PURE__ */ (0,
|
|
20278
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_lucide_react32.Quote, { size: 14 }),
|
|
20166
20279
|
t("composer.quoteSelection")
|
|
20167
20280
|
]
|
|
20168
20281
|
}
|
|
20169
20282
|
)
|
|
20170
20283
|
}
|
|
20171
20284
|
),
|
|
20172
|
-
/* @__PURE__ */ (0,
|
|
20285
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(
|
|
20173
20286
|
"div",
|
|
20174
20287
|
{
|
|
20175
20288
|
"data-slot": "chatkit-chat-composer",
|
|
20176
20289
|
className: "mx-auto w-full p-2 sticky bottom-0 z-10 bg-background",
|
|
20177
20290
|
style: chatColumnStyle,
|
|
20178
20291
|
children: [
|
|
20179
|
-
threadErrorMessage && /* @__PURE__ */ (0,
|
|
20180
|
-
/* @__PURE__ */ (0,
|
|
20292
|
+
threadErrorMessage && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { className: "mb-3 rounded-lg border border-destructive/30 bg-destructive/10 px-3 py-2 text-sm text-destructive overflow-auto", children: threadErrorMessage }),
|
|
20293
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
20181
20294
|
ChatAttachments,
|
|
20182
20295
|
{
|
|
20183
20296
|
ref: attachmentsRef,
|
|
@@ -20191,7 +20304,7 @@ function Chat({
|
|
|
20191
20304
|
onStateChange: setAttachmentState
|
|
20192
20305
|
}
|
|
20193
20306
|
),
|
|
20194
|
-
references.length > 0 && /* @__PURE__ */ (0,
|
|
20307
|
+
references.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { className: "mb-3 flex flex-wrap gap-2", children: references.map((reference) => /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
20195
20308
|
ReferenceChip,
|
|
20196
20309
|
{
|
|
20197
20310
|
reference,
|
|
@@ -20205,7 +20318,7 @@ function Chat({
|
|
|
20205
20318
|
},
|
|
20206
20319
|
getReferenceKey(reference)
|
|
20207
20320
|
)) }),
|
|
20208
|
-
/* @__PURE__ */ (0,
|
|
20321
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
20209
20322
|
DetachedRunRuntimeCapabilities,
|
|
20210
20323
|
{
|
|
20211
20324
|
options: detachedRunRuntimeCapabilityOptions,
|
|
@@ -20214,7 +20327,7 @@ function Chat({
|
|
|
20214
20327
|
onRemove: removeRunRuntimeCapability
|
|
20215
20328
|
}
|
|
20216
20329
|
),
|
|
20217
|
-
showGoalStatus && /* @__PURE__ */ (0,
|
|
20330
|
+
showGoalStatus && /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(
|
|
20218
20331
|
"div",
|
|
20219
20332
|
{
|
|
20220
20333
|
className: cn(
|
|
@@ -20222,8 +20335,8 @@ function Chat({
|
|
|
20222
20335
|
isGoalObjectiveExpanded ? "items-start" : "items-center"
|
|
20223
20336
|
),
|
|
20224
20337
|
children: [
|
|
20225
|
-
/* @__PURE__ */ (0,
|
|
20226
|
-
|
|
20338
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
20339
|
+
import_lucide_react32.Target,
|
|
20227
20340
|
{
|
|
20228
20341
|
className: cn(
|
|
20229
20342
|
"size-4 shrink-0 text-muted-foreground",
|
|
@@ -20231,13 +20344,13 @@ function Chat({
|
|
|
20231
20344
|
)
|
|
20232
20345
|
}
|
|
20233
20346
|
),
|
|
20234
|
-
/* @__PURE__ */ (0,
|
|
20235
|
-
/* @__PURE__ */ (0,
|
|
20236
|
-
/* @__PURE__ */ (0,
|
|
20237
|
-
threadGoal && /* @__PURE__ */ (0,
|
|
20238
|
-
isGoalLoading && /* @__PURE__ */ (0,
|
|
20347
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { className: "min-w-0 flex-1", children: [
|
|
20348
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { className: "flex min-w-0 items-center gap-2", children: [
|
|
20349
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("span", { className: "font-medium", children: t("chat.goal.label") }),
|
|
20350
|
+
threadGoal && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("span", { className: "shrink-0 rounded-md bg-muted px-1.5 py-0.5 text-[11px] text-muted-foreground", children: t(`chat.goal.status.${threadGoal.status}`) }),
|
|
20351
|
+
isGoalLoading && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_lucide_react32.Loader2, { className: "size-3 animate-spin text-muted-foreground" })
|
|
20239
20352
|
] }),
|
|
20240
|
-
/* @__PURE__ */ (0,
|
|
20353
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
20241
20354
|
"div",
|
|
20242
20355
|
{
|
|
20243
20356
|
className: cn(
|
|
@@ -20247,13 +20360,13 @@ function Chat({
|
|
|
20247
20360
|
children: goalError || threadGoal?.objective
|
|
20248
20361
|
}
|
|
20249
20362
|
),
|
|
20250
|
-
threadGoal && /* @__PURE__ */ (0,
|
|
20363
|
+
threadGoal && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { className: "mt-1 flex flex-wrap gap-x-3 gap-y-1 text-[11px] text-muted-foreground", children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("span", { children: t("chat.goal.elapsed", {
|
|
20251
20364
|
elapsed: formatGoalElapsed(displayedGoalElapsedSeconds)
|
|
20252
20365
|
}) }) })
|
|
20253
20366
|
] }),
|
|
20254
|
-
threadGoal && /* @__PURE__ */ (0,
|
|
20255
|
-
/* @__PURE__ */ (0,
|
|
20256
|
-
/* @__PURE__ */ (0,
|
|
20367
|
+
threadGoal && /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { className: "flex shrink-0 items-center gap-1", children: [
|
|
20368
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(Tooltip, { children: [
|
|
20369
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
20257
20370
|
Button,
|
|
20258
20371
|
{
|
|
20259
20372
|
type: "button",
|
|
@@ -20264,13 +20377,13 @@ function Chat({
|
|
|
20264
20377
|
const prefix = "/goal edit ";
|
|
20265
20378
|
setComposerText(`${prefix}${threadGoal.objective}`);
|
|
20266
20379
|
},
|
|
20267
|
-
children: /* @__PURE__ */ (0,
|
|
20380
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_lucide_react32.Pencil, { className: "size-3" })
|
|
20268
20381
|
}
|
|
20269
20382
|
) }),
|
|
20270
|
-
/* @__PURE__ */ (0,
|
|
20383
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(TooltipContent, { children: t("chat.goal.edit") })
|
|
20271
20384
|
] }),
|
|
20272
|
-
/* @__PURE__ */ (0,
|
|
20273
|
-
/* @__PURE__ */ (0,
|
|
20385
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(Tooltip, { children: [
|
|
20386
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
20274
20387
|
Button,
|
|
20275
20388
|
{
|
|
20276
20389
|
type: "button",
|
|
@@ -20286,13 +20399,13 @@ function Chat({
|
|
|
20286
20399
|
executionType: "insert_invocation"
|
|
20287
20400
|
}
|
|
20288
20401
|
}),
|
|
20289
|
-
children: threadGoal.status === "paused" ? /* @__PURE__ */ (0,
|
|
20402
|
+
children: threadGoal.status === "paused" ? /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_lucide_react32.Play, { className: "size-3" }) : /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_lucide_react32.Pause, { className: "size-3" })
|
|
20290
20403
|
}
|
|
20291
20404
|
) }),
|
|
20292
|
-
/* @__PURE__ */ (0,
|
|
20405
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(TooltipContent, { children: threadGoal.status === "paused" ? t("chat.goal.resume") : t("chat.goal.pause") })
|
|
20293
20406
|
] }),
|
|
20294
|
-
/* @__PURE__ */ (0,
|
|
20295
|
-
/* @__PURE__ */ (0,
|
|
20407
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(Tooltip, { children: [
|
|
20408
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
20296
20409
|
Button,
|
|
20297
20410
|
{
|
|
20298
20411
|
type: "button",
|
|
@@ -20308,13 +20421,13 @@ function Chat({
|
|
|
20308
20421
|
executionType: "insert_invocation"
|
|
20309
20422
|
}
|
|
20310
20423
|
}),
|
|
20311
|
-
children: /* @__PURE__ */ (0,
|
|
20424
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_lucide_react32.Trash2, { className: "size-3" })
|
|
20312
20425
|
}
|
|
20313
20426
|
) }),
|
|
20314
|
-
/* @__PURE__ */ (0,
|
|
20427
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(TooltipContent, { children: t("chat.goal.clear") })
|
|
20315
20428
|
] }),
|
|
20316
|
-
threadGoal.objective && !goalError && /* @__PURE__ */ (0,
|
|
20317
|
-
/* @__PURE__ */ (0,
|
|
20429
|
+
threadGoal.objective && !goalError && /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(Tooltip, { children: [
|
|
20430
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
20318
20431
|
Button,
|
|
20319
20432
|
{
|
|
20320
20433
|
type: "button",
|
|
@@ -20323,8 +20436,8 @@ function Chat({
|
|
|
20323
20436
|
"aria-expanded": isGoalObjectiveExpanded,
|
|
20324
20437
|
"aria-label": isGoalObjectiveExpanded ? t("chat.goal.collapseObjective") : t("chat.goal.expandObjective"),
|
|
20325
20438
|
onClick: () => setIsGoalObjectiveExpanded((expanded) => !expanded),
|
|
20326
|
-
children: /* @__PURE__ */ (0,
|
|
20327
|
-
|
|
20439
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
20440
|
+
import_lucide_react32.ChevronDown,
|
|
20328
20441
|
{
|
|
20329
20442
|
className: cn(
|
|
20330
20443
|
"size-3 transition-transform",
|
|
@@ -20334,13 +20447,13 @@ function Chat({
|
|
|
20334
20447
|
)
|
|
20335
20448
|
}
|
|
20336
20449
|
) }),
|
|
20337
|
-
/* @__PURE__ */ (0,
|
|
20450
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(TooltipContent, { children: isGoalObjectiveExpanded ? t("chat.goal.collapseObjective") : t("chat.goal.expandObjective") })
|
|
20338
20451
|
] })
|
|
20339
20452
|
] })
|
|
20340
20453
|
]
|
|
20341
20454
|
}
|
|
20342
20455
|
),
|
|
20343
|
-
/* @__PURE__ */ (0,
|
|
20456
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
20344
20457
|
PendingRuntimeServices,
|
|
20345
20458
|
{
|
|
20346
20459
|
state: stream.runtimeActivities.sandboxServices,
|
|
@@ -20349,7 +20462,7 @@ function Chat({
|
|
|
20349
20462
|
className: hasPendingTodos || hasPendingFollowUps ? "mb-2" : void 0
|
|
20350
20463
|
}
|
|
20351
20464
|
),
|
|
20352
|
-
/* @__PURE__ */ (0,
|
|
20465
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
20353
20466
|
PendingTodos,
|
|
20354
20467
|
{
|
|
20355
20468
|
snapshot: stream.todos,
|
|
@@ -20357,7 +20470,7 @@ function Chat({
|
|
|
20357
20470
|
className: hasPendingFollowUps ? "mb-2" : void 0
|
|
20358
20471
|
}
|
|
20359
20472
|
),
|
|
20360
|
-
/* @__PURE__ */ (0,
|
|
20473
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
20361
20474
|
PendingFollowUps,
|
|
20362
20475
|
{
|
|
20363
20476
|
items: pendingFollowUps,
|
|
@@ -20370,7 +20483,7 @@ function Chat({
|
|
|
20370
20483
|
attachToComposer: true
|
|
20371
20484
|
}
|
|
20372
20485
|
),
|
|
20373
|
-
/* @__PURE__ */ (0,
|
|
20486
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
20374
20487
|
RequestUserInputPanel,
|
|
20375
20488
|
{
|
|
20376
20489
|
request: stream.pendingRequestUserInput,
|
|
@@ -20379,7 +20492,7 @@ function Chat({
|
|
|
20379
20492
|
attachToComposer: true
|
|
20380
20493
|
}
|
|
20381
20494
|
),
|
|
20382
|
-
/* @__PURE__ */ (0,
|
|
20495
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
20383
20496
|
HITLApprovalPanel,
|
|
20384
20497
|
{
|
|
20385
20498
|
request: stream.pendingHITLRequest,
|
|
@@ -20388,7 +20501,7 @@ function Chat({
|
|
|
20388
20501
|
attachToComposer: true
|
|
20389
20502
|
}
|
|
20390
20503
|
),
|
|
20391
|
-
runtimeCapabilityPalette && /* @__PURE__ */ (0,
|
|
20504
|
+
runtimeCapabilityPalette && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
20392
20505
|
SlashPalette,
|
|
20393
20506
|
{
|
|
20394
20507
|
palette: runtimeCapabilityPalette,
|
|
@@ -20402,7 +20515,7 @@ function Chat({
|
|
|
20402
20515
|
onSelect: selectSlashPaletteOption
|
|
20403
20516
|
}
|
|
20404
20517
|
),
|
|
20405
|
-
/* @__PURE__ */ (0,
|
|
20518
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("form", { className: "flex items-end", onSubmit: handleSubmit, children: /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(
|
|
20406
20519
|
"div",
|
|
20407
20520
|
{
|
|
20408
20521
|
"data-slot": "composer-input-shell",
|
|
@@ -20416,7 +20529,7 @@ function Chat({
|
|
|
20416
20529
|
composerInputRoundedClass
|
|
20417
20530
|
),
|
|
20418
20531
|
children: [
|
|
20419
|
-
/* @__PURE__ */ (0,
|
|
20532
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
20420
20533
|
"div",
|
|
20421
20534
|
{
|
|
20422
20535
|
ref: composerInputRef,
|
|
@@ -20438,19 +20551,19 @@ function Chat({
|
|
|
20438
20551
|
(missingConfig || isHistoryLoading || hasPendingInteractiveRequest) && "cursor-not-allowed opacity-50"
|
|
20439
20552
|
),
|
|
20440
20553
|
children: renderedComposerParts.map(
|
|
20441
|
-
(part, index) => part.type === "text" ? /* @__PURE__ */ (0,
|
|
20554
|
+
(part, index) => part.type === "text" ? /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(React55.Fragment, { children: part.text }, `text-${index}`) : /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(ComposerCapabilityToken, { part }, part.key)
|
|
20442
20555
|
)
|
|
20443
20556
|
},
|
|
20444
20557
|
composerDomVersion
|
|
20445
20558
|
),
|
|
20446
|
-
/* @__PURE__ */ (0,
|
|
20559
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(
|
|
20447
20560
|
"div",
|
|
20448
20561
|
{
|
|
20449
20562
|
"data-slot": "composer-action-bar",
|
|
20450
20563
|
className: "pointer-events-none absolute inset-x-1.5 bottom-1 flex min-h-10 items-center justify-between gap-2",
|
|
20451
20564
|
children: [
|
|
20452
|
-
/* @__PURE__ */ (0,
|
|
20453
|
-
/* @__PURE__ */ (0,
|
|
20565
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { className: "pointer-events-none flex min-w-0 flex-1 items-center gap-1.5", children: [
|
|
20566
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { className: "pointer-events-auto flex shrink-0 items-center gap-1.5", children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
20454
20567
|
ComposerMenu,
|
|
20455
20568
|
{
|
|
20456
20569
|
composer,
|
|
@@ -20468,20 +20581,20 @@ function Chat({
|
|
|
20468
20581
|
disabled: missingConfig || isHistoryLoading || hasPendingInteractiveRequest
|
|
20469
20582
|
}
|
|
20470
20583
|
) }),
|
|
20471
|
-
selectedTool && /* @__PURE__ */ (0,
|
|
20472
|
-
/* @__PURE__ */ (0,
|
|
20473
|
-
/* @__PURE__ */ (0,
|
|
20584
|
+
selectedTool && /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("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: [
|
|
20585
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("span", { className: "truncate", children: selectedTool.shortLabel ?? selectedTool.label }),
|
|
20586
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
20474
20587
|
"button",
|
|
20475
20588
|
{
|
|
20476
20589
|
type: "button",
|
|
20477
20590
|
onClick: () => setSelectedTool(null),
|
|
20478
20591
|
className: "shrink-0 rounded-full p-0.5 text-primary/70 hover:bg-primary/10 hover:text-primary",
|
|
20479
|
-
children: /* @__PURE__ */ (0,
|
|
20592
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_lucide_react32.X, { size: 12 })
|
|
20480
20593
|
}
|
|
20481
20594
|
)
|
|
20482
20595
|
] })
|
|
20483
20596
|
] }),
|
|
20484
|
-
/* @__PURE__ */ (0,
|
|
20597
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { className: "pointer-events-auto shrink-0", children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
20485
20598
|
SendButton,
|
|
20486
20599
|
{
|
|
20487
20600
|
disabled: isSendDisabled,
|
|
@@ -20504,7 +20617,7 @@ function Chat({
|
|
|
20504
20617
|
]
|
|
20505
20618
|
}
|
|
20506
20619
|
) }),
|
|
20507
|
-
disclaimer?.text && /* @__PURE__ */ (0,
|
|
20620
|
+
disclaimer?.text && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
20508
20621
|
"p",
|
|
20509
20622
|
{
|
|
20510
20623
|
className: cn(
|
|
@@ -20514,14 +20627,14 @@ function Chat({
|
|
|
20514
20627
|
children: disclaimer.text
|
|
20515
20628
|
}
|
|
20516
20629
|
),
|
|
20517
|
-
/* @__PURE__ */ (0,
|
|
20518
|
-
/* @__PURE__ */ (0,
|
|
20519
|
-
/* @__PURE__ */ (0,
|
|
20630
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { className: "mt-2 flex items-center justify-center gap-2 text-xs text-muted-foreground", children: [
|
|
20631
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("span", { children: t("chat.poweredBy") }),
|
|
20632
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(ContextUsageIndicator, { className: "absolute right-4" })
|
|
20520
20633
|
] })
|
|
20521
20634
|
]
|
|
20522
20635
|
}
|
|
20523
20636
|
),
|
|
20524
|
-
/* @__PURE__ */ (0,
|
|
20637
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
20525
20638
|
SettingsSheet,
|
|
20526
20639
|
{
|
|
20527
20640
|
open: petSettingsOpen,
|
|
@@ -20531,11 +20644,11 @@ function Chat({
|
|
|
20531
20644
|
onSave: savePetLocalSettings
|
|
20532
20645
|
}
|
|
20533
20646
|
),
|
|
20534
|
-
/* @__PURE__ */ (0,
|
|
20647
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(PetBridge, { pet: effectivePet, state: petAutoState })
|
|
20535
20648
|
]
|
|
20536
20649
|
}
|
|
20537
20650
|
),
|
|
20538
|
-
taskSummaryAvailable && taskSummaryDocked && taskSummaryOpen && /* @__PURE__ */ (0,
|
|
20651
|
+
taskSummaryAvailable && taskSummaryDocked && taskSummaryOpen && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { className: "pointer-events-none absolute right-5 top-3 z-20 max-h-[calc(100%-1.5rem)] w-80", children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
20539
20652
|
TaskSummaryPanel,
|
|
20540
20653
|
{
|
|
20541
20654
|
...taskSummaryProps,
|
|
@@ -20548,10 +20661,10 @@ function Chat({
|
|
|
20548
20661
|
}
|
|
20549
20662
|
|
|
20550
20663
|
// src/components/ui/separator.tsx
|
|
20551
|
-
var
|
|
20552
|
-
var
|
|
20553
|
-
var Separator =
|
|
20554
|
-
({ className, orientation = "horizontal", ...props }, ref) => /* @__PURE__ */ (0,
|
|
20664
|
+
var React56 = __toESM(require("react"), 1);
|
|
20665
|
+
var import_jsx_runtime60 = require("react/jsx-runtime");
|
|
20666
|
+
var Separator = React56.forwardRef(
|
|
20667
|
+
({ className, orientation = "horizontal", ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
|
20555
20668
|
"div",
|
|
20556
20669
|
{
|
|
20557
20670
|
ref,
|