@xpert-ai/chatkit-ui 0.5.8 → 0.5.10
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-rZtKpJ7w.js → _baseUniq-BGtBWDHF.js} +1 -1
- package/dist/app/assets/{abap-C_Zf_H72.js → abap-CRoFwrxO.js} +1 -1
- package/dist/app/assets/{abnf-nexoj3h-.js → abnf-CNjS2eos.js} +1 -1
- package/dist/app/assets/{actionscript-BshPPT08.js → actionscript-B8mr3NzG.js} +1 -1
- package/dist/app/assets/{ada-trcc9pO3.js → ada-BFLo8FUI.js} +1 -1
- package/dist/app/assets/{agda-wf9li4FM.js → agda-3OzBs9Hc.js} +1 -1
- package/dist/app/assets/{al-B_Ug0q1P.js → al-D20XP4lJ.js} +1 -1
- package/dist/app/assets/{antlr4-CXTRv9CY.js → antlr4-CAk9QE2f.js} +1 -1
- package/dist/app/assets/{apacheconf-BzLOlEQw.js → apacheconf-DVy5BZVN.js} +1 -1
- package/dist/app/assets/{apex-B6XAxpaJ.js → apex-BOwqYrLv.js} +1 -1
- package/dist/app/assets/{apl-BaTx00Cu.js → apl-BKNJFilC.js} +1 -1
- package/dist/app/assets/{applescript-28sGIXzX.js → applescript-BBrUU_PL.js} +1 -1
- package/dist/app/assets/{aql-D3JixB2U.js → aql-D6uGUCXn.js} +1 -1
- package/dist/app/assets/{arc-Dp-hSx2j.js → arc-CrwfbbB_.js} +1 -1
- package/dist/app/assets/{architectureDiagram-Q4EWVU46-Bn2pO9pH.js → architectureDiagram-Q4EWVU46-ChKCVNgI.js} +1 -1
- package/dist/app/assets/{arduino-C7O-XQwD.js → arduino-D6bzhWX_.js} +1 -1
- package/dist/app/assets/{arff-DB2beTEN.js → arff-D92IxpM3.js} +1 -1
- package/dist/app/assets/{asciidoc-Dg8NUgJd.js → asciidoc-DfsvV2P7.js} +1 -1
- package/dist/app/assets/{asm6502-Bbp3HUM7.js → asm6502-_F1FAt_4.js} +1 -1
- package/dist/app/assets/{asmatmel-BWVdPyKO.js → asmatmel-Cbtqac6c.js} +1 -1
- package/dist/app/assets/{aspnet-DGscSPT5.js → aspnet-BW0Um7vX.js} +1 -1
- package/dist/app/assets/{autohotkey-CG73I5aR.js → autohotkey-BN09uJNY.js} +1 -1
- package/dist/app/assets/{autoit-C_ZFpucT.js → autoit-CsiD8aKJ.js} +1 -1
- package/dist/app/assets/{avisynth-cwGR8iYP.js → avisynth-CjQfGoLi.js} +1 -1
- package/dist/app/assets/{avro-idl-BGr05mCA.js → avro-idl-BZ5kGhBz.js} +1 -1
- package/dist/app/assets/{bash-RnGhYB2Q.js → bash-DJKkM7QN.js} +1 -1
- package/dist/app/assets/{basic-CQQHZrba.js → basic-Bfxph2ze.js} +1 -1
- package/dist/app/assets/{batch-D9lrM7o0.js → batch-Bg0kGp_U.js} +1 -1
- package/dist/app/assets/{bbcode-Cv3WobVE.js → bbcode-BCAqMttV.js} +1 -1
- package/dist/app/assets/{bicep-vbBE-eEI.js → bicep-D59fWffG.js} +1 -1
- package/dist/app/assets/{birb-CGZh784n.js → birb-o5jcDsHe.js} +1 -1
- package/dist/app/assets/{bison-8qRts1aL.js → bison-yB-JpgNW.js} +1 -1
- package/dist/app/assets/{blockDiagram-DXYQGD6D-C-uwwa6g.js → blockDiagram-DXYQGD6D-Bbcf1g82.js} +1 -1
- package/dist/app/assets/{bnf-BQ4Vtazg.js → bnf-MvjnxGLj.js} +1 -1
- package/dist/app/assets/{brainfuck-CEpFRGxy.js → brainfuck-Di4LuxXz.js} +1 -1
- package/dist/app/assets/{brightscript-BarfPCjz.js → brightscript-CoKUdu4Z.js} +1 -1
- package/dist/app/assets/{bro-Dk0XGvow.js → bro-Dtuf-rOu.js} +1 -1
- package/dist/app/assets/{bsl-5j820PBe.js → bsl-Dphub1md.js} +1 -1
- package/dist/app/assets/{c-3oV1Vcgs.js → c-CouCMjhn.js} +1 -1
- package/dist/app/assets/{c4Diagram-AHTNJAMY-JlsWBEMe.js → c4Diagram-AHTNJAMY-B71AnYEv.js} +1 -1
- package/dist/app/assets/{cfscript-DMqyhl2W.js → cfscript-WEBTQyyh.js} +1 -1
- package/dist/app/assets/{chaiscript-YkAH53Dr.js → chaiscript-ChKY8J66.js} +1 -1
- package/dist/app/assets/channel-cWYrdn2X.js +1 -0
- package/dist/app/assets/{chunk-4BX2VUAB-B0JqLkZH.js → chunk-4BX2VUAB-CrS4RXRQ.js} +1 -1
- package/dist/app/assets/{chunk-4TB4RGXK-BQpDNXUF.js → chunk-4TB4RGXK-DK5YEmle.js} +1 -1
- package/dist/app/assets/{chunk-55IACEB6-Dn3FnTDT.js → chunk-55IACEB6-Bo7tPBvq.js} +1 -1
- package/dist/app/assets/{chunk-EDXVE4YY-BVoPugx9.js → chunk-EDXVE4YY-S8p2mxbS.js} +1 -1
- package/dist/app/assets/{chunk-FMBD7UC4-C9tVdhsE.js → chunk-FMBD7UC4-BmeEs0Fl.js} +1 -1
- package/dist/app/assets/{chunk-OYMX7WX6-CQXv2wtk.js → chunk-OYMX7WX6-CVOe3eKO.js} +1 -1
- package/dist/app/assets/{chunk-QZHKN3VN-C8qSU9Qy.js → chunk-QZHKN3VN-D8KyAP_6.js} +1 -1
- package/dist/app/assets/{chunk-YZCP3GAM-CZaoG1nw.js → chunk-YZCP3GAM-BCxkcMfg.js} +1 -1
- package/dist/app/assets/{cil-DcR2VPHY.js → cil-B50znBsv.js} +1 -1
- package/dist/app/assets/classDiagram-6PBFFD2Q-B_cL4ol2.js +1 -0
- package/dist/app/assets/classDiagram-v2-HSJHXN6E-B_cL4ol2.js +1 -0
- package/dist/app/assets/{clike-DfNujqql.js → clike-BDx2IDni.js} +1 -1
- package/dist/app/assets/{clojure-C5Le-JTX.js → clojure-DwvfHL53.js} +1 -1
- package/dist/app/assets/clone-DqC7wLFm.js +1 -0
- package/dist/app/assets/{cmake-COAIzhsZ.js → cmake-CR0A7aZm.js} +1 -1
- package/dist/app/assets/{cobol-ibITcyU7.js → cobol-CyPvCTIP.js} +1 -1
- package/dist/app/assets/{coffeescript-PhVUJmlI.js → coffeescript-BWdDr59V.js} +1 -1
- package/dist/app/assets/{concurnas-mR1M8CkN.js → concurnas-DOsrzlEd.js} +1 -1
- package/dist/app/assets/{coq-BAC4s_KN.js → coq-DufSYl-_.js} +1 -1
- package/dist/app/assets/{core-CyiPngnC.js → core-CCxBh-db.js} +1 -1
- package/dist/app/assets/{cose-bilkent-S5V4N54A-DVGjGUds.js → cose-bilkent-S5V4N54A-CVetMxrj.js} +1 -1
- package/dist/app/assets/{cpp-CGbZdGpN.js → cpp-DlRzYOQ3.js} +1 -1
- package/dist/app/assets/{crystal-DlR7pIGD.js → crystal-C6liNBfM.js} +1 -1
- package/dist/app/assets/{csharp-C_Q9l4md.js → csharp-BJQ_L68V.js} +1 -1
- package/dist/app/assets/{cshtml-CCx5u7US.js → cshtml-CIHuGJB1.js} +1 -1
- package/dist/app/assets/{csp-CAaZklqT.js → csp-DClFC8n5.js} +1 -1
- package/dist/app/assets/{css-DYR3Ly4O.js → css-BIHXWlvb.js} +1 -1
- package/dist/app/assets/{css-extras-Cmt8C7YK.js → css-extras-DW9n0pYv.js} +1 -1
- package/dist/app/assets/{csv-D6wS2l_w.js → csv-BCDO1ezZ.js} +1 -1
- package/dist/app/assets/{cypher-ByiZgWx2.js → cypher-C02ZuRq6.js} +1 -1
- package/dist/app/assets/{d-CE7B9yzF.js → d-C_m1NZFO.js} +1 -1
- package/dist/app/assets/{dagre-KV5264BT-D7upVhY0.js → dagre-KV5264BT-CNZ7oGpU.js} +1 -1
- package/dist/app/assets/{dart-D81jl3NK.js → dart-BzfpaRRB.js} +1 -1
- package/dist/app/assets/{dataweave-CMxZQ8zh.js → dataweave-BZwfufNx.js} +1 -1
- package/dist/app/assets/{dax-BbrDk-Ta.js → dax-BL-K1OK0.js} +1 -1
- package/dist/app/assets/{dhall-CIldjTYK.js → dhall-kRlu5-Ah.js} +1 -1
- package/dist/app/assets/{diagram-5BDNPKRD-DhUmS4Ny.js → diagram-5BDNPKRD-Dou4ReAX.js} +1 -1
- package/dist/app/assets/{diagram-G4DWMVQ6-CrkCLxhl.js → diagram-G4DWMVQ6-DrTF8uMu.js} +1 -1
- package/dist/app/assets/{diagram-MMDJMWI5-fnPPfUw8.js → diagram-MMDJMWI5-Duy5amDa.js} +1 -1
- package/dist/app/assets/{diagram-TYMM5635-COhdlDB0.js → diagram-TYMM5635-BbR1qfVD.js} +1 -1
- package/dist/app/assets/{diff-FjTJCkPu.js → diff-B4AimFb8.js} +1 -1
- package/dist/app/assets/{django-Co_IyfXB.js → django-CHuXCByJ.js} +1 -1
- package/dist/app/assets/{dns-zone-file-BM6Yg4q9.js → dns-zone-file-DFO0-Wh5.js} +1 -1
- package/dist/app/assets/{docker-Pwo3GM5h.js → docker-DeblFuGF.js} +1 -1
- package/dist/app/assets/{dot-P8f8aStV.js → dot-DsmxGkhr.js} +1 -1
- package/dist/app/assets/{ebnf-CZbb3oK9.js → ebnf-CbgMYLgT.js} +1 -1
- package/dist/app/assets/{editorconfig-CJApclIQ.js → editorconfig-DFLqU5tO.js} +1 -1
- package/dist/app/assets/{eiffel-DDWKQYgT.js → eiffel-BwLrgMir.js} +1 -1
- package/dist/app/assets/{ejs-y-QhOnYV.js → ejs-C_qs3M41.js} +1 -1
- package/dist/app/assets/{elixir-CqAp0uEr.js → elixir-DrAUe9cA.js} +1 -1
- package/dist/app/assets/{elm-Cq69Vcs-.js → elm-NL3cn8Zq.js} +1 -1
- package/dist/app/assets/{erDiagram-SMLLAGMA-BUrrh0KJ.js → erDiagram-SMLLAGMA-BfCXo53J.js} +1 -1
- package/dist/app/assets/{erb-DpEt_5Uk.js → erb-B3ZYOAhJ.js} +1 -1
- package/dist/app/assets/{erlang-BnwnR51t.js → erlang-DHaDiNC1.js} +1 -1
- package/dist/app/assets/{etlua-DTUtr9Fv.js → etlua-cjNwXVDj.js} +1 -1
- package/dist/app/assets/{excel-formula-CfzAGN3E.js → excel-formula-K59v6qG0.js} +1 -1
- package/dist/app/assets/{factor-Br_burI4.js → factor-CaxnvHX-.js} +1 -1
- package/dist/app/assets/{false-DH44eJVK.js → false-C3dAj0rb.js} +1 -1
- package/dist/app/assets/{firestore-security-rules-CV5vZ6x7.js → firestore-security-rules-BWiaIy5P.js} +1 -1
- package/dist/app/assets/{flow-B62tsz3I.js → flow-DtC7lyt9.js} +1 -1
- package/dist/app/assets/{flowDiagram-DWJPFMVM-BfT3i-xi.js → flowDiagram-DWJPFMVM-C-qKitVO.js} +1 -1
- package/dist/app/assets/{fortran-CBRjRmRL.js → fortran-DR0Ai6wv.js} +1 -1
- package/dist/app/assets/{fsharp-Is0Kcyy0.js → fsharp-CQ4gmr0N.js} +1 -1
- package/dist/app/assets/{ftl-CVovTksj.js → ftl-Ckk-2edF.js} +1 -1
- package/dist/app/assets/{ganttDiagram-T4ZO3ILL-CovfmvZ_.js → ganttDiagram-T4ZO3ILL-CVsnCO44.js} +1 -1
- package/dist/app/assets/{gap-0V7EqXkM.js → gap-BKZovOdF.js} +1 -1
- package/dist/app/assets/{gcode-wFsl1biV.js → gcode-DEwkGIHO.js} +1 -1
- package/dist/app/assets/{gdscript-DP_1GAju.js → gdscript-BHZKxFHM.js} +1 -1
- package/dist/app/assets/{gedcom-LmQhBuu1.js → gedcom-5qXzfSVG.js} +1 -1
- package/dist/app/assets/{gherkin-CO2nCzn1.js → gherkin-JPPL0NwC.js} +1 -1
- package/dist/app/assets/{git-Cvy-4np6.js → git-BHHbjeSj.js} +1 -1
- package/dist/app/assets/{gitGraphDiagram-UUTBAWPF-_3cNEIkd.js → gitGraphDiagram-UUTBAWPF-BAMZ7idy.js} +1 -1
- package/dist/app/assets/{glsl-fLhWQ1WX.js → glsl-ojT9GGcQ.js} +1 -1
- package/dist/app/assets/{gml-BLDBKR2w.js → gml-Byrz4K18.js} +1 -1
- package/dist/app/assets/{gn-_UfXOcPr.js → gn-BXN298zz.js} +1 -1
- package/dist/app/assets/{go-CrEw6tau.js → go-QMar_vXY.js} +1 -1
- package/dist/app/assets/{go-module-CVIz5ie2.js → go-module-DhttF-9u.js} +1 -1
- package/dist/app/assets/{graph-BqzMGlGz.js → graph-B32jd8nV.js} +1 -1
- package/dist/app/assets/{graphql-W65oy7EB.js → graphql-D52K_SsX.js} +1 -1
- package/dist/app/assets/{groovy-DEyASrLB.js → groovy-CqJveqOx.js} +1 -1
- package/dist/app/assets/{haml-t64RfAT3.js → haml-CoLWO1nd.js} +1 -1
- package/dist/app/assets/{handlebars-JgRYcJpr.js → handlebars-BfmAmLER.js} +1 -1
- package/dist/app/assets/{haskell-DveuOuZW.js → haskell-jItCYvPU.js} +1 -1
- package/dist/app/assets/{haxe-x_WD_hzY.js → haxe-4SLJ2_08.js} +1 -1
- package/dist/app/assets/{hcl-BEB0xGh2.js → hcl-BMmyrQ8c.js} +1 -1
- package/dist/app/assets/{hlsl-CMwaco8P.js → hlsl-SJDMNXGq.js} +1 -1
- package/dist/app/assets/{hoon-C28P95lX.js → hoon-D6moOZKy.js} +1 -1
- package/dist/app/assets/{hpkp-D9NYtA5K.js → hpkp-sCVuwPlN.js} +1 -1
- package/dist/app/assets/{hsts-Dqogk4Yd.js → hsts-bAMpwV9D.js} +1 -1
- package/dist/app/assets/{http-DVQXlCQn.js → http-Dx1p06BK.js} +1 -1
- package/dist/app/assets/{ichigojam-CsJTimzt.js → ichigojam-CVXOu9yk.js} +1 -1
- package/dist/app/assets/{icon-DoDL_e-r.js → icon-D6wxStB0.js} +1 -1
- package/dist/app/assets/{icu-message-format-BeyfGsVT.js → icu-message-format-D6yLIfrn.js} +1 -1
- package/dist/app/assets/{idris-CHkWZJwi.js → idris-DpAtc3fL.js} +1 -1
- package/dist/app/assets/{iecst-BBD_SRuf.js → iecst-B29ujpoO.js} +1 -1
- package/dist/app/assets/{ignore-D_p3I9dV.js → ignore-CVq0aJkW.js} +1 -1
- package/dist/app/assets/{index-CfB9oDR4.js → index-BBJxrAP8.js} +185 -184
- package/dist/app/assets/index-D-hjfkvG.css +1 -0
- package/dist/app/assets/{infoDiagram-42DDH7IO-D2Mfe8CF.js → infoDiagram-42DDH7IO-BG7H21DU.js} +1 -1
- package/dist/app/assets/{inform7-jsDCYfoA.js → inform7-B1F0WxwD.js} +1 -1
- package/dist/app/assets/{ini-iuNDaZnC.js → ini-CIpuuB9_.js} +1 -1
- package/dist/app/assets/{io-LDVlgGqs.js → io-3w1UICu0.js} +1 -1
- package/dist/app/assets/{ishikawaDiagram-UXIWVN3A-Dv1hBGmJ.js → ishikawaDiagram-UXIWVN3A-j8lnD8_c.js} +1 -1
- package/dist/app/assets/{j-DGuaT7yL.js → j-D3-2sGJz.js} +1 -1
- package/dist/app/assets/{java-DDoCHbBb.js → java-BlX-H2cK.js} +1 -1
- package/dist/app/assets/{javadoc-BqIDews8.js → javadoc-J2TruS4-.js} +1 -1
- package/dist/app/assets/{javadoclike-DUebWUK0.js → javadoclike-bfC-JoEq.js} +1 -1
- package/dist/app/assets/{javascript-vIym5G3x.js → javascript-BP7WO6B4.js} +1 -1
- package/dist/app/assets/{javastacktrace-DMSQTFoj.js → javastacktrace-BTUlM0LC.js} +1 -1
- package/dist/app/assets/{jexl-B-qDI-8w.js → jexl-Cxa4h-16.js} +1 -1
- package/dist/app/assets/{jolie-BWdRTPfY.js → jolie-BbbvEhKj.js} +1 -1
- package/dist/app/assets/{journeyDiagram-VCZTEJTY-7rE7nmNY.js → journeyDiagram-VCZTEJTY-BwTniXNV.js} +1 -1
- package/dist/app/assets/{jq-DTb1pxNf.js → jq-DArJYKLU.js} +1 -1
- package/dist/app/assets/{js-extras-DEXJls4B.js → js-extras-BvRL3Jvq.js} +1 -1
- package/dist/app/assets/{js-templates-DhkrkuKk.js → js-templates-Dk5OdIFK.js} +1 -1
- package/dist/app/assets/{jsdoc-Bl3V6ktn.js → jsdoc-DngF7jir.js} +1 -1
- package/dist/app/assets/{json-Bi4t4sWI.js → json-ClAvu2RW.js} +1 -1
- package/dist/app/assets/{json5-BTkpxuwF.js → json5-BmFfbQQU.js} +1 -1
- package/dist/app/assets/{jsonp-CIGuP4pY.js → jsonp-BgadffEo.js} +1 -1
- package/dist/app/assets/{jsstacktrace-twK4XklZ.js → jsstacktrace-Dd8S1Q81.js} +1 -1
- package/dist/app/assets/{jsx-Ce1OOyMG.js → jsx-Dz0neUh1.js} +1 -1
- package/dist/app/assets/{julia-Cquz_qEr.js → julia-BHGMeW5t.js} +1 -1
- package/dist/app/assets/{kanban-definition-6JOO6SKY-Bv3tDxPP.js → kanban-definition-6JOO6SKY-CMc5-Ea3.js} +1 -1
- package/dist/app/assets/{keepalived-CJwooiaS.js → keepalived-1yyGwudH.js} +1 -1
- package/dist/app/assets/{keyman-DFel6Ybe.js → keyman-D96kZ3Ti.js} +1 -1
- package/dist/app/assets/{kotlin-wolTrM8e.js → kotlin-DU--_X0J.js} +1 -1
- package/dist/app/assets/{kumir-BizUlAia.js → kumir-0MOuOYYf.js} +1 -1
- package/dist/app/assets/{kusto-z61BrIf7.js → kusto-C-XA0mwb.js} +1 -1
- package/dist/app/assets/{latex-BdjU0W-y.js → latex-DwJ10yrt.js} +1 -1
- package/dist/app/assets/{latte-qxmlfKWi.js → latte-D_Yyq_nM.js} +1 -1
- package/dist/app/assets/{layout-DxAn_P0a.js → layout-DQt8UNZi.js} +1 -1
- package/dist/app/assets/{less-CD3dW47g.js → less-CsUu5jL1.js} +1 -1
- package/dist/app/assets/{lilypond-22T5o_jq.js → lilypond-CIbhxqtF.js} +1 -1
- package/dist/app/assets/{linear-BZgMFgqg.js → linear-D8DMmUY3.js} +1 -1
- package/dist/app/assets/{liquid-Cmo4Xe4F.js → liquid-BaXz-DcY.js} +1 -1
- package/dist/app/assets/{lisp-BYktmVtF.js → lisp-DQs2fOve.js} +1 -1
- package/dist/app/assets/{livescript-BYFmorZ7.js → livescript-BebY4jFA.js} +1 -1
- package/dist/app/assets/{llvm-BOD0KyZl.js → llvm-tvuSKoRQ.js} +1 -1
- package/dist/app/assets/{log-CVV316Uy.js → log-euixYp8a.js} +1 -1
- package/dist/app/assets/{lolcode-CVthCzlE.js → lolcode-CwPkrI86.js} +1 -1
- package/dist/app/assets/{lua-DDV9U3wt.js → lua-CNvDsE6g.js} +1 -1
- package/dist/app/assets/{magma-BG3jyl2H.js → magma-CdK12PLr.js} +1 -1
- package/dist/app/assets/{makefile-MpxiKn_B.js → makefile-fq5UhIbM.js} +1 -1
- package/dist/app/assets/{markdown-BL5FU4cM.js → markdown-Ajq2JGa1.js} +1 -1
- package/dist/app/assets/{markup-CZRmXwYL.js → markup-CfbpoVuv.js} +1 -1
- package/dist/app/assets/{markup-templating-COlI1blx.js → markup-templating-ClpbWH3E.js} +1 -1
- package/dist/app/assets/{matlab-BmSN2QiN.js → matlab-DUQtIrQ-.js} +1 -1
- package/dist/app/assets/{maxscript-D75deoQZ.js → maxscript-BQSIPoaa.js} +1 -1
- package/dist/app/assets/{mel-DyYcmDoQ.js → mel-C8tXgXmS.js} +1 -1
- package/dist/app/assets/{mermaid-NR0G0IWZ.js → mermaid-BMSiReCn.js} +1 -1
- package/dist/app/assets/{min-CTh07dZy.js → min-DgHJ7Nf4.js} +1 -1
- package/dist/app/assets/{mindmap-definition-QFDTVHPH-Fw3KcKbj.js → mindmap-definition-QFDTVHPH-70NBPICA.js} +1 -1
- package/dist/app/assets/{mizar-MJo_u1CH.js → mizar-FFvziKde.js} +1 -1
- package/dist/app/assets/{mongodb-CRNnG1K2.js → mongodb-D1mzpRCd.js} +1 -1
- package/dist/app/assets/{monkey-ZwGbwuwW.js → monkey-dBKcwUTm.js} +1 -1
- package/dist/app/assets/{moonscript-C_41cfMk.js → moonscript-Bba8hj2N.js} +1 -1
- package/dist/app/assets/{n1ql-4JPBqsQ5.js → n1ql-BKv6f_ZJ.js} +1 -1
- package/dist/app/assets/{n4js-DaifC79s.js → n4js-De4nJHcC.js} +1 -1
- package/dist/app/assets/{nand2tetris-hdl-DrlPu1km.js → nand2tetris-hdl-d6Im94up.js} +1 -1
- package/dist/app/assets/{naniscript-CVSEham5.js → naniscript-7I_PYFtb.js} +1 -1
- package/dist/app/assets/{nasm-Vxg1Ci7m.js → nasm-DtbQ_6JV.js} +1 -1
- package/dist/app/assets/{neon-D5WYLOp6.js → neon-7JcECa8A.js} +1 -1
- package/dist/app/assets/{nevod-BM_P4MZJ.js → nevod-BarubR7h.js} +1 -1
- package/dist/app/assets/{nginx-_BUWopwD.js → nginx-C-Nvt6BK.js} +1 -1
- package/dist/app/assets/{nim-yUtxyMQ_.js → nim-LP-7gM1Q.js} +1 -1
- package/dist/app/assets/{nix-DnqJswG2.js → nix-Msza7-r9.js} +1 -1
- package/dist/app/assets/{nsis-CGhWE5Eq.js → nsis-N1c5jrgc.js} +1 -1
- package/dist/app/assets/{objectivec-B0xQqJXP.js → objectivec-qIn11zhm.js} +1 -1
- package/dist/app/assets/{ocaml-DtyqCVnY.js → ocaml-CM1-jZNQ.js} +1 -1
- package/dist/app/assets/{opencl-D1Atjn6H.js → opencl-aZRowywV.js} +1 -1
- package/dist/app/assets/{openqasm-BlBDbDqg.js → openqasm-DXQkGk7v.js} +1 -1
- package/dist/app/assets/{oz-CiAGh31i.js → oz-IpByQjyt.js} +1 -1
- package/dist/app/assets/{parigp-5zImxHQS.js → parigp-i2cpgz90.js} +1 -1
- package/dist/app/assets/{parser-DgQnPlcs.js → parser-DUe4fyHY.js} +1 -1
- package/dist/app/assets/{pascal-CAl-2WrG.js → pascal-CCbi6In9.js} +1 -1
- package/dist/app/assets/{pascaligo-D7ENkfXk.js → pascaligo-cYiy-tQf.js} +1 -1
- package/dist/app/assets/{pcaxis-BvkOw95O.js → pcaxis-DUe2I8NZ.js} +1 -1
- package/dist/app/assets/{peoplecode-CNnlXgOn.js → peoplecode-y-WYZDRM.js} +1 -1
- package/dist/app/assets/{perl-GWYgHN-P.js → perl-uC0qqGFo.js} +1 -1
- package/dist/app/assets/{php-BeSl8K9C.js → php-Djwg1gg7.js} +1 -1
- package/dist/app/assets/{php-extras-CGICdl64.js → php-extras-BXM2sgwu.js} +1 -1
- package/dist/app/assets/{phpdoc-u5eUYTCn.js → phpdoc-SxUKXPYZ.js} +1 -1
- package/dist/app/assets/{pieDiagram-DEJITSTG-Df6vroGU.js → pieDiagram-DEJITSTG-CQfl-KLS.js} +1 -1
- package/dist/app/assets/{plsql-CEzG1NJz.js → plsql-C3HfRTv-.js} +1 -1
- package/dist/app/assets/{powerquery-DNIShEdf.js → powerquery-a89Fj1Qs.js} +1 -1
- package/dist/app/assets/{powershell-C1503cRG.js → powershell-dX-2_G9H.js} +1 -1
- package/dist/app/assets/{processing-Ckpy9HoW.js → processing-BjXVOyvk.js} +1 -1
- package/dist/app/assets/{prolog-BRYphUYZ.js → prolog-B9kdH-bl.js} +1 -1
- package/dist/app/assets/{promql-qgDrO6DL.js → promql-B3BDR8es.js} +1 -1
- package/dist/app/assets/{properties-BeIGQXwD.js → properties-CMjA6hD5.js} +1 -1
- package/dist/app/assets/{protobuf-BWgB5SUj.js → protobuf-DVGs9Q8Q.js} +1 -1
- package/dist/app/assets/{psl-CcafEZ7w.js → psl-BzbEAN9s.js} +1 -1
- package/dist/app/assets/{pug-BJI1GxyB.js → pug-fdeIkQLg.js} +1 -1
- package/dist/app/assets/{puppet-CgDAWiLk.js → puppet-JnrsXSZY.js} +1 -1
- package/dist/app/assets/{pure-a4cDZ80m.js → pure-Bsjul00Q.js} +1 -1
- package/dist/app/assets/{purebasic-BW0KBvtY.js → purebasic-C_mf0qxg.js} +1 -1
- package/dist/app/assets/{purescript-kBgGMzoV.js → purescript-P7l76DgD.js} +1 -1
- package/dist/app/assets/{q-eRG7i9yX.js → q-D98RUW_e.js} +1 -1
- package/dist/app/assets/{qml-CZPuZ9R-.js → qml-CBe5bVTm.js} +1 -1
- package/dist/app/assets/{qore-Ba0NjboT.js → qore-CrvWCYtL.js} +1 -1
- package/dist/app/assets/{qsharp-DLxaivN6.js → qsharp-4BBfTlhh.js} +1 -1
- package/dist/app/assets/{quadrantDiagram-34T5L4WZ-CAGAlKAA.js → quadrantDiagram-34T5L4WZ-_JtlPbxc.js} +1 -1
- package/dist/app/assets/{r-D6OZourJ.js → r-C-wPXw3M.js} +1 -1
- package/dist/app/assets/{racket-DSFSWP_M.js → racket-BDc8Z2eV.js} +1 -1
- package/dist/app/assets/{reason-DpnBqGp5.js → reason-DBeyHA3q.js} +1 -1
- package/dist/app/assets/{regex-B-yHjdQW.js → regex-yDzON3WO.js} +1 -1
- package/dist/app/assets/{rego-Be5OUAwc.js → rego-CWdKhPRV.js} +1 -1
- package/dist/app/assets/{renpy-DNWEtToe.js → renpy-COnBNW6q.js} +1 -1
- package/dist/app/assets/{requirementDiagram-MS252O5E-Cs0AkqyV.js → requirementDiagram-MS252O5E-C3gIi5N5.js} +1 -1
- package/dist/app/assets/{rest-ULuBuZ2D.js → rest-D7ADMqxp.js} +1 -1
- package/dist/app/assets/{rip-C8ZpkRvV.js → rip-BXziA95H.js} +1 -1
- package/dist/app/assets/{roboconf-Cp0JApAD.js → roboconf-wb822TWS.js} +1 -1
- package/dist/app/assets/{robotframework-DZ9Qk3u4.js → robotframework-BRitqS4Z.js} +1 -1
- package/dist/app/assets/{ruby-CL29GmGo.js → ruby-SERs2agE.js} +1 -1
- package/dist/app/assets/{rust-j4o3jalU.js → rust-CPnTKWoF.js} +1 -1
- package/dist/app/assets/{sankeyDiagram-XADWPNL6-DV18Urm5.js → sankeyDiagram-XADWPNL6-C8zexvre.js} +1 -1
- package/dist/app/assets/{sas-D5BKlpKm.js → sas-F8wqa-VH.js} +1 -1
- package/dist/app/assets/{sass-uSmrqYvP.js → sass-sFRMpF9E.js} +1 -1
- package/dist/app/assets/{scala-BZEFxiel.js → scala-BjAq73X3.js} +1 -1
- package/dist/app/assets/{scheme-BqWRh7bv.js → scheme-Dy5snFBD.js} +1 -1
- package/dist/app/assets/{scss-pdrHGDlf.js → scss-8PCqIjM6.js} +1 -1
- package/dist/app/assets/{sequenceDiagram-FGHM5R23-D2LFaM5D.js → sequenceDiagram-FGHM5R23-DbNGiTO2.js} +1 -1
- package/dist/app/assets/{shell-session-SP47os3A.js → shell-session-DEdTVxFD.js} +1 -1
- package/dist/app/assets/{smali-CoGu_vbJ.js → smali-Bxae2KQR.js} +1 -1
- package/dist/app/assets/{smalltalk-UCpjQlP2.js → smalltalk-CwOKqcjX.js} +1 -1
- package/dist/app/assets/{smarty-DAjuxRJ8.js → smarty-kF-PSUnG.js} +1 -1
- package/dist/app/assets/{sml-j3PkUQFZ.js → sml-bomnQbFX.js} +1 -1
- package/dist/app/assets/{solidity-DgmGSzcY.js → solidity-BAjbZMZL.js} +1 -1
- package/dist/app/assets/{solution-file-B2qnX0br.js → solution-file-MmJiJ8_n.js} +1 -1
- package/dist/app/assets/{soy-g8A8WFzY.js → soy-DU--y6x4.js} +1 -1
- package/dist/app/assets/{sparql-CEVYVr_A.js → sparql-mmPoHR5x.js} +1 -1
- package/dist/app/assets/{splunk-spl-7mtE8H2J.js → splunk-spl-hgCUw5aN.js} +1 -1
- package/dist/app/assets/{sqf-0oU9zYI6.js → sqf-BiiIGVoY.js} +1 -1
- package/dist/app/assets/{sql-63gdwGLe.js → sql-nlDwSZBD.js} +1 -1
- package/dist/app/assets/{squirrel-Co7eleWn.js → squirrel-Bqi6dvci.js} +1 -1
- package/dist/app/assets/{stan-Ba4pDTWk.js → stan-2W_Pcetu.js} +1 -1
- package/dist/app/assets/{stateDiagram-FHFEXIEX-BQA1TBkH.js → stateDiagram-FHFEXIEX-pa0JGYLy.js} +1 -1
- package/dist/app/assets/stateDiagram-v2-QKLJ7IA2-FdxILnkg.js +1 -0
- package/dist/app/assets/{stylus-t89Xz5MX.js → stylus-zCZUGlqV.js} +1 -1
- package/dist/app/assets/{swift-C5JABAF0.js → swift-5sLu9EpD.js} +1 -1
- package/dist/app/assets/{systemd-BfYE78dG.js → systemd-DgaHeexU.js} +1 -1
- package/dist/app/assets/{t4-cs-DkxIRmE1.js → t4-cs-YCeMlSug.js} +1 -1
- package/dist/app/assets/{t4-templating-DkFMlvwO.js → t4-templating-DPzKGTo4.js} +1 -1
- package/dist/app/assets/{t4-vb-BKVkmiw7.js → t4-vb-BPPPhEQB.js} +1 -1
- package/dist/app/assets/{tap-aMlCtwbo.js → tap-Dgrqyvk-.js} +1 -1
- package/dist/app/assets/{tcl-BUvHy8dw.js → tcl-DHz3w70b.js} +1 -1
- package/dist/app/assets/{textile-ClO_SfJO.js → textile-Cr314Blk.js} +1 -1
- package/dist/app/assets/{timeline-definition-GMOUNBTQ-DaorRuHA.js → timeline-definition-GMOUNBTQ-BLY5sqEL.js} +1 -1
- package/dist/app/assets/{toml-l5hvvDdv.js → toml-Bnu9rfnB.js} +1 -1
- package/dist/app/assets/{tremor-D4QOa0nL.js → tremor-ChXFGibI.js} +1 -1
- package/dist/app/assets/{tt2-BJcg3HXa.js → tt2-BzVUtdxI.js} +1 -1
- package/dist/app/assets/{turtle-WHNwxJgL.js → turtle-letBf_Bx.js} +1 -1
- package/dist/app/assets/{twig-DV78fEOd.js → twig-Ni2rEZw9.js} +1 -1
- package/dist/app/assets/{typescript-BDTUEseO.js → typescript-BQofdwc1.js} +1 -1
- package/dist/app/assets/{typoscript-CKIRbKHr.js → typoscript-cQilTApE.js} +1 -1
- package/dist/app/assets/{unrealscript-Cd5BEbxt.js → unrealscript-CtH2g6It.js} +1 -1
- package/dist/app/assets/{uorazor-7LOrWFcr.js → uorazor-CjvsWB8K.js} +1 -1
- package/dist/app/assets/{uri-CEErPZZD.js → uri-Cs9bSTwl.js} +1 -1
- package/dist/app/assets/{v-BvxrZCPV.js → v-Bqvis8I2.js} +1 -1
- package/dist/app/assets/{vala-D91m1wZY.js → vala-BpW8rpIS.js} +1 -1
- package/dist/app/assets/{vbnet-DEGVgGPX.js → vbnet-DdVGFj9N.js} +1 -1
- package/dist/app/assets/{velocity-C51Z21Lw.js → velocity-CHDcdQy7.js} +1 -1
- package/dist/app/assets/{vennDiagram-DHZGUBPP-BJfmLAHi.js → vennDiagram-DHZGUBPP-n6Dq2r90.js} +1 -1
- package/dist/app/assets/{verilog-B2QtuWBV.js → verilog-t2rEJU_-.js} +1 -1
- package/dist/app/assets/{vhdl-DBCqKA1e.js → vhdl-Bkv11jjq.js} +1 -1
- package/dist/app/assets/{vim-sBj_gY5Z.js → vim-C6YVoqqV.js} +1 -1
- package/dist/app/assets/{visual-basic-Dq4ItWzJ.js → visual-basic-ozbiLbAI.js} +1 -1
- package/dist/app/assets/{wardley-RL74JXVD-BwsKoGL8.js → wardley-RL74JXVD-cDbpgcV_.js} +1 -1
- package/dist/app/assets/{wardleyDiagram-NUSXRM2D-C-EsBX4Y.js → wardleyDiagram-NUSXRM2D-C1uThccd.js} +1 -1
- package/dist/app/assets/{warpscript-CoBUt13z.js → warpscript-BNO_EbH2.js} +1 -1
- package/dist/app/assets/{wasm-pyfkx63g.js → wasm-Bghcf_Ud.js} +1 -1
- package/dist/app/assets/{web-idl-BZaPO6Eg.js → web-idl-C-d3Xdl1.js} +1 -1
- package/dist/app/assets/{wiki-_07IJE4V.js → wiki-DI1mP-2c.js} +1 -1
- package/dist/app/assets/{wolfram-DYHwCmFC.js → wolfram-Sj_QoNQm.js} +1 -1
- package/dist/app/assets/{wren-DSze41NQ.js → wren-Bc7J_SNZ.js} +1 -1
- package/dist/app/assets/{xeora-Cr7Btk9C.js → xeora-C6DbAKbN.js} +1 -1
- package/dist/app/assets/{xml-doc-ZBCtrs4u.js → xml-doc-CllF2qWw.js} +1 -1
- package/dist/app/assets/{xojo-5Ul7tx93.js → xojo-BmwcGxAI.js} +1 -1
- package/dist/app/assets/{xquery-DxypYnz5.js → xquery-WkzJyf76.js} +1 -1
- package/dist/app/assets/{xychartDiagram-5P7HB3ND-BDM6ja2Z.js → xychartDiagram-5P7HB3ND-BWMpw-9z.js} +1 -1
- package/dist/app/assets/{yaml-DuYadqWF.js → yaml-DaCV1ugn.js} +1 -1
- package/dist/app/assets/{yang-BrzUSzMS.js → yang-BxwNjc1X.js} +1 -1
- package/dist/app/assets/{zig-CENGCw6i.js → zig-B-ArCifh.js} +1 -1
- package/dist/app/index.html +2 -2
- package/dist/index.cjs +982 -643
- package/dist/index.js +1017 -676
- package/package.json +3 -3
- package/dist/app/assets/channel-kNZK4j1o.js +0 -1
- package/dist/app/assets/classDiagram-6PBFFD2Q-aPn8aVQq.js +0 -1
- package/dist/app/assets/classDiagram-v2-HSJHXN6E-aPn8aVQq.js +0 -1
- package/dist/app/assets/clone-DTprJQjh.js +0 -1
- package/dist/app/assets/index-DElrl_bY.css +0 -1
- package/dist/app/assets/stateDiagram-v2-QKLJ7IA2-BZw8ZMnp.js +0 -1
package/dist/index.cjs
CHANGED
|
@@ -1405,12 +1405,23 @@ function countCompletedTodos(items) {
|
|
|
1405
1405
|
|
|
1406
1406
|
// src/lib/task-summary.ts
|
|
1407
1407
|
var PLAN_PATTERN = /<proposed_plan>\s*([\s\S]*?)\s*<\/proposed_plan>/i;
|
|
1408
|
+
var WEB_SEARCH_RESULT_PATTERN = /^Title:\s*(.+?)\r?\nURL:\s*(https?:\/\/\S+)\s*$/gim;
|
|
1409
|
+
var SANDBOX_FILE_OUTPUT_TOOLS = /* @__PURE__ */ new Set([
|
|
1410
|
+
"sandbox_write_file",
|
|
1411
|
+
"sandbox_append_file",
|
|
1412
|
+
"sandbox_edit_file",
|
|
1413
|
+
"sandbox_multi_edit_file"
|
|
1414
|
+
]);
|
|
1408
1415
|
function isObject(value) {
|
|
1409
1416
|
return Boolean(value) && typeof value === "object" && !Array.isArray(value);
|
|
1410
1417
|
}
|
|
1411
1418
|
function stringValue(value) {
|
|
1412
1419
|
return typeof value === "string" && value.trim() ? value.trim() : void 0;
|
|
1413
1420
|
}
|
|
1421
|
+
function compactText(value, maxLength) {
|
|
1422
|
+
const normalized = value.replace(/\s+/g, " ").trim();
|
|
1423
|
+
return normalized.length <= maxLength ? normalized : `${normalized.slice(0, maxLength - 3).trimEnd()}...`;
|
|
1424
|
+
}
|
|
1414
1425
|
function timestamp(value) {
|
|
1415
1426
|
const parsed = value ? Date.parse(value) : 0;
|
|
1416
1427
|
return Number.isNaN(parsed) ? 0 : parsed;
|
|
@@ -1482,19 +1493,29 @@ function normalizeOutput(value) {
|
|
|
1482
1493
|
const id = stringValue(candidate.id);
|
|
1483
1494
|
const title = stringValue(candidate.title);
|
|
1484
1495
|
const kind = artifactKind(candidate.kind);
|
|
1485
|
-
|
|
1486
|
-
const
|
|
1496
|
+
const status = stringValue(candidate.status)?.toLowerCase();
|
|
1497
|
+
const normalizedStatus = status === "success" ? status : void 0;
|
|
1498
|
+
const resource = normalizeResource(candidate.resource);
|
|
1499
|
+
if (!id || !title || !kind || status !== void 0 && status !== "success" || !isOpenableOutputResource(resource)) {
|
|
1500
|
+
return null;
|
|
1501
|
+
}
|
|
1487
1502
|
return {
|
|
1488
1503
|
id,
|
|
1489
1504
|
kind,
|
|
1490
1505
|
title,
|
|
1491
1506
|
description: stringValue(candidate.description),
|
|
1492
|
-
status:
|
|
1493
|
-
resource
|
|
1507
|
+
status: normalizedStatus,
|
|
1508
|
+
resource,
|
|
1494
1509
|
messageId: stringValue(candidate.messageId),
|
|
1495
1510
|
updatedAt: stringValue(candidate.updatedAt)
|
|
1496
1511
|
};
|
|
1497
1512
|
}
|
|
1513
|
+
function isCompletedOpenableOutput(output) {
|
|
1514
|
+
return (output.status === void 0 || output.status === "success") && isOpenableOutputResource(output.resource);
|
|
1515
|
+
}
|
|
1516
|
+
function isOpenableOutputResource(resource) {
|
|
1517
|
+
return resource?.type === "workspace_file" || resource?.type === "artifact" || resource?.type === "url";
|
|
1518
|
+
}
|
|
1498
1519
|
function normalizeSource(value) {
|
|
1499
1520
|
if (!isObject(value)) return null;
|
|
1500
1521
|
const candidate = value;
|
|
@@ -1549,11 +1570,10 @@ function contributionFromPart(part) {
|
|
|
1549
1570
|
if (part.type !== "component" || !isObject(part.data)) return null;
|
|
1550
1571
|
const data = part.data;
|
|
1551
1572
|
const direct = normalizeTaskSummaryContribution(data.taskSummary);
|
|
1552
|
-
|
|
1553
|
-
if (!isObject(data._meta)) return null;
|
|
1554
|
-
return normalizeTaskSummaryContribution(
|
|
1573
|
+
const metadataContribution = isObject(data._meta) ? normalizeTaskSummaryContribution(
|
|
1555
1574
|
data._meta["xpertai/taskSummary"]
|
|
1556
|
-
);
|
|
1575
|
+
) : null;
|
|
1576
|
+
return direct ?? metadataContribution;
|
|
1557
1577
|
}
|
|
1558
1578
|
function extractPlan(message) {
|
|
1559
1579
|
const match = PLAN_PATTERN.exec(messageText(message.content));
|
|
@@ -1621,17 +1641,9 @@ function knownPartOutputs(part, message) {
|
|
|
1621
1641
|
if (part.type !== "component" || !isObject(part.data)) return [];
|
|
1622
1642
|
const data = part.data;
|
|
1623
1643
|
const outputs = [...contributionFromPart(part)?.outputs ?? []];
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
kind: "mcp_app",
|
|
1628
|
-
title: stringValue(data.title) ?? "MCP App",
|
|
1629
|
-
resource: message.id ? { type: "message", messageId: message.id } : void 0,
|
|
1630
|
-
messageId: message.id,
|
|
1631
|
-
updatedAt
|
|
1632
|
-
});
|
|
1633
|
-
}
|
|
1634
|
-
if (isObject(data.artifact)) {
|
|
1644
|
+
const sandboxOutput = sandboxFileOutput(data, message);
|
|
1645
|
+
if (sandboxOutput) outputs.push(sandboxOutput);
|
|
1646
|
+
if (isObject(data.artifact) && isCompletedOutputStatus(data.artifact.status)) {
|
|
1635
1647
|
const artifact = data.artifact;
|
|
1636
1648
|
const artifactId = stringValue(artifact.artifactId) ?? stringValue(artifact.id);
|
|
1637
1649
|
const workspacePath = stringValue(artifact.workspacePath);
|
|
@@ -1657,6 +1669,7 @@ function knownPartOutputs(part, message) {
|
|
|
1657
1669
|
for (const value of [data.artifactLink, data.file]) {
|
|
1658
1670
|
if (!isObject(value)) continue;
|
|
1659
1671
|
const artifact = value;
|
|
1672
|
+
if (!isCompletedOutputStatus(artifact.status)) continue;
|
|
1660
1673
|
const artifactId = stringValue(artifact.artifactId) ?? stringValue(artifact.id);
|
|
1661
1674
|
const workspacePath = stringValue(artifact.workspacePath);
|
|
1662
1675
|
const id = artifactId ?? stringValue(artifact.fileAssetId) ?? workspacePath;
|
|
@@ -1678,6 +1691,52 @@ function knownPartOutputs(part, message) {
|
|
|
1678
1691
|
}
|
|
1679
1692
|
return outputs;
|
|
1680
1693
|
}
|
|
1694
|
+
function sandboxFileOutput(data, message) {
|
|
1695
|
+
const tool = stringValue(data.tool);
|
|
1696
|
+
const status = stringValue(data.status)?.toLowerCase();
|
|
1697
|
+
if (!tool || !SANDBOX_FILE_OUTPUT_TOOLS.has(tool) || status !== "success" || !isObject(data.input)) {
|
|
1698
|
+
return void 0;
|
|
1699
|
+
}
|
|
1700
|
+
const workspacePath = portableWorkspacePath(
|
|
1701
|
+
data.input.file_path
|
|
1702
|
+
);
|
|
1703
|
+
if (!workspacePath) return void 0;
|
|
1704
|
+
return {
|
|
1705
|
+
id: `workspace-file:${workspacePath}`,
|
|
1706
|
+
kind: outputKindFromPath(workspacePath),
|
|
1707
|
+
title: workspacePath.split("/").at(-1) ?? workspacePath,
|
|
1708
|
+
status: "success",
|
|
1709
|
+
resource: { type: "workspace_file", workspacePath },
|
|
1710
|
+
messageId: message.id,
|
|
1711
|
+
updatedAt: message.updatedAt ?? message.createdAt
|
|
1712
|
+
};
|
|
1713
|
+
}
|
|
1714
|
+
function portableWorkspacePath(value) {
|
|
1715
|
+
const path = stringValue(value)?.replace(/\\/g, "/").replace(/^\.\/+/, "").replace(/\/{2,}/g, "/");
|
|
1716
|
+
if (!path || path.startsWith("/") || /^[a-z]:\//i.test(path) || path.split("/").some((segment) => segment === "..")) {
|
|
1717
|
+
return void 0;
|
|
1718
|
+
}
|
|
1719
|
+
return path;
|
|
1720
|
+
}
|
|
1721
|
+
function outputKindFromPath(path) {
|
|
1722
|
+
const extension = path.match(/\.([^./]+)$/)?.[1]?.toLowerCase();
|
|
1723
|
+
if (extension === "html" || extension === "htm") return "site";
|
|
1724
|
+
if (["png", "jpg", "jpeg", "gif", "webp", "svg", "avif"].includes(extension ?? ""))
|
|
1725
|
+
return "image";
|
|
1726
|
+
if (["csv", "xls", "xlsx", "ods"].includes(extension ?? ""))
|
|
1727
|
+
return "spreadsheet";
|
|
1728
|
+
if (["ppt", "pptx", "odp"].includes(extension ?? ""))
|
|
1729
|
+
return "presentation";
|
|
1730
|
+
if (["pdf", "doc", "docx", "md", "markdown", "txt", "rtf", "odt"].includes(
|
|
1731
|
+
extension ?? ""
|
|
1732
|
+
))
|
|
1733
|
+
return "document";
|
|
1734
|
+
return "file";
|
|
1735
|
+
}
|
|
1736
|
+
function isCompletedOutputStatus(value) {
|
|
1737
|
+
const status = stringValue(value)?.toLowerCase();
|
|
1738
|
+
return status === void 0 || status === "success";
|
|
1739
|
+
}
|
|
1681
1740
|
function sourceFromReference(reference, message) {
|
|
1682
1741
|
const updatedAt = message.updatedAt ?? message.createdAt;
|
|
1683
1742
|
const common = {
|
|
@@ -1750,25 +1809,42 @@ function fileSources(files, message) {
|
|
|
1750
1809
|
];
|
|
1751
1810
|
});
|
|
1752
1811
|
}
|
|
1753
|
-
function
|
|
1754
|
-
|
|
1755
|
-
|
|
1812
|
+
function webSearchSources(part, message) {
|
|
1813
|
+
if (part.type !== "component" || !isObject(part.data)) return [];
|
|
1814
|
+
const data = part.data;
|
|
1815
|
+
if (data.tool !== "web_search" || stringValue(data.status)?.toLowerCase() !== "success") {
|
|
1816
|
+
return [];
|
|
1817
|
+
}
|
|
1818
|
+
const output = stringValue(data.output);
|
|
1819
|
+
if (!output) return [];
|
|
1756
1820
|
const updatedAt = message.updatedAt ?? message.createdAt;
|
|
1757
|
-
const
|
|
1758
|
-
|
|
1759
|
-
|
|
1760
|
-
|
|
1761
|
-
|
|
1762
|
-
|
|
1763
|
-
|
|
1764
|
-
|
|
1765
|
-
|
|
1766
|
-
|
|
1767
|
-
|
|
1768
|
-
|
|
1769
|
-
|
|
1770
|
-
|
|
1771
|
-
|
|
1821
|
+
const sources = [];
|
|
1822
|
+
for (const match of output.matchAll(WEB_SEARCH_RESULT_PATTERN)) {
|
|
1823
|
+
const rawTitle = stringValue(match[1]);
|
|
1824
|
+
const url = httpUrl(match[2]);
|
|
1825
|
+
if (!url) continue;
|
|
1826
|
+
const title = rawTitle && rawTitle.toLowerCase() !== "n/a" ? rawTitle : new URL(url).hostname;
|
|
1827
|
+
sources.push({
|
|
1828
|
+
id: `web:${url}`,
|
|
1829
|
+
kind: "web_page",
|
|
1830
|
+
title: compactText(title, 160),
|
|
1831
|
+
description: url,
|
|
1832
|
+
resource: { type: "url", url },
|
|
1833
|
+
messageId: message.id,
|
|
1834
|
+
updatedAt
|
|
1835
|
+
});
|
|
1836
|
+
}
|
|
1837
|
+
return sources;
|
|
1838
|
+
}
|
|
1839
|
+
function httpUrl(value) {
|
|
1840
|
+
const url = stringValue(value);
|
|
1841
|
+
if (!url) return void 0;
|
|
1842
|
+
try {
|
|
1843
|
+
const parsed = new URL(url);
|
|
1844
|
+
return parsed.protocol === "http:" || parsed.protocol === "https:" ? url : void 0;
|
|
1845
|
+
} catch {
|
|
1846
|
+
return void 0;
|
|
1847
|
+
}
|
|
1772
1848
|
}
|
|
1773
1849
|
function collectLiveTaskSummary({
|
|
1774
1850
|
messages,
|
|
@@ -1788,7 +1864,9 @@ function collectLiveTaskSummary({
|
|
|
1788
1864
|
(message) => extractPlan(message) ?? []
|
|
1789
1865
|
);
|
|
1790
1866
|
const agentRuns = messages.flatMap(
|
|
1791
|
-
(message) => (message.agentRuns ?? []).filter(
|
|
1867
|
+
(message) => (message.agentRuns ?? []).filter(
|
|
1868
|
+
(run) => run.category?.trim().toLowerCase() === "agent" && Boolean(run.parentId)
|
|
1869
|
+
).map((run) => ({
|
|
1792
1870
|
id: run.id,
|
|
1793
1871
|
parentId: run.parentId,
|
|
1794
1872
|
level: agentRunLevel(run, messages),
|
|
@@ -1796,7 +1874,7 @@ function collectLiveTaskSummary({
|
|
|
1796
1874
|
title: (run.agentKey ? agentNames?.get(run.agentKey) : void 0) ?? run.title ?? run.xpertName ?? run.agentKey ?? "Agent",
|
|
1797
1875
|
status: taskSummaryAgentStatus(run.status),
|
|
1798
1876
|
elapsedTime: run.elapsedTime,
|
|
1799
|
-
error: typeof run.error === "string" ? run.error : void 0,
|
|
1877
|
+
error: typeof run.error === "string" ? compactText(run.error, 160) : void 0,
|
|
1800
1878
|
messageId: message.id,
|
|
1801
1879
|
updatedAt: run.updatedAt ?? run.endedAt ?? run.startedAt ?? message.updatedAt
|
|
1802
1880
|
}))
|
|
@@ -1820,7 +1898,7 @@ function collectLiveTaskSummary({
|
|
|
1820
1898
|
(part) => knownPartOutputs(part, message)
|
|
1821
1899
|
)
|
|
1822
1900
|
)
|
|
1823
|
-
]),
|
|
1901
|
+
]).filter(isCompletedOpenableOutput),
|
|
1824
1902
|
sources: mergeLatest([
|
|
1825
1903
|
...contributions.flatMap((item) => item.sources ?? []).filter((source) => source.kind !== "sub_agent"),
|
|
1826
1904
|
...messages.flatMap((message) => [
|
|
@@ -1829,7 +1907,9 @@ function collectLiveTaskSummary({
|
|
|
1829
1907
|
),
|
|
1830
1908
|
...fileSources(message.fileAssets, message),
|
|
1831
1909
|
...fileSources(message.attachments, message),
|
|
1832
|
-
...
|
|
1910
|
+
...contentParts(message.content).flatMap(
|
|
1911
|
+
(part) => webSearchSources(part, message)
|
|
1912
|
+
)
|
|
1833
1913
|
])
|
|
1834
1914
|
]),
|
|
1835
1915
|
agents: mergeAgents(agentRuns),
|
|
@@ -1841,17 +1921,21 @@ function mergeTaskSummary(history, live, historySections) {
|
|
|
1841
1921
|
const outputs = mergeLatest([
|
|
1842
1922
|
...historySections?.outputs ?? history?.outputs.items ?? [],
|
|
1843
1923
|
...live.outputs
|
|
1844
|
-
]);
|
|
1924
|
+
]).filter(isCompletedOpenableOutput);
|
|
1845
1925
|
const sources = mergeLatest([
|
|
1846
1926
|
...historySections?.sources ?? history?.sources.items ?? [],
|
|
1847
1927
|
...live.sources
|
|
1848
1928
|
]);
|
|
1849
|
-
const
|
|
1850
|
-
|
|
1851
|
-
|
|
1852
|
-
|
|
1853
|
-
|
|
1854
|
-
|
|
1929
|
+
const historyAgents = historySections?.agents ?? history?.agents.items ?? [];
|
|
1930
|
+
const eligibleHistoryAgents = historyAgents.filter(
|
|
1931
|
+
(agent) => Boolean(agent.parentId)
|
|
1932
|
+
);
|
|
1933
|
+
const excludedHistoryAgentCount = historyAgents.length - eligibleHistoryAgents.length;
|
|
1934
|
+
const historyAgentTotal = Math.max(
|
|
1935
|
+
0,
|
|
1936
|
+
(history?.agents.total ?? 0) - excludedHistoryAgentCount
|
|
1937
|
+
);
|
|
1938
|
+
const agents = mergeAgents([...eligibleHistoryAgents, ...live.agents]);
|
|
1855
1939
|
const pending = mergePending([
|
|
1856
1940
|
...historySections?.pending ?? history?.pending.items ?? [],
|
|
1857
1941
|
...live.pending
|
|
@@ -1876,7 +1960,7 @@ function mergeTaskSummary(history, live, historySections) {
|
|
|
1876
1960
|
totals: {
|
|
1877
1961
|
outputs: Math.max(history?.outputs.total ?? 0, outputs.length),
|
|
1878
1962
|
sources: Math.max(history?.sources.total ?? 0, sources.length),
|
|
1879
|
-
agents: agents.length,
|
|
1963
|
+
agents: Math.max(historyAgentTotal, agents.length),
|
|
1880
1964
|
pending: Math.max(history?.pending.total ?? 0, pending.length)
|
|
1881
1965
|
}
|
|
1882
1966
|
};
|
|
@@ -2487,7 +2571,7 @@ var useStreamContext = () => {
|
|
|
2487
2571
|
};
|
|
2488
2572
|
|
|
2489
2573
|
// src/components/composer/ComposerMenu.tsx
|
|
2490
|
-
var
|
|
2574
|
+
var React13 = __toESM(require("react"), 1);
|
|
2491
2575
|
var import_lucide_react4 = require("lucide-react");
|
|
2492
2576
|
|
|
2493
2577
|
// src/i18n/useChatkitTranslation.ts
|
|
@@ -2579,7 +2663,6 @@ var en_US_default = {
|
|
|
2579
2663
|
partial: "Partially ready",
|
|
2580
2664
|
failed: "Failed"
|
|
2581
2665
|
},
|
|
2582
|
-
poweredBy: "Powered by Xpert AI",
|
|
2583
2666
|
followUps: {
|
|
2584
2667
|
pending: "Pending follow-ups",
|
|
2585
2668
|
queue: "Queue",
|
|
@@ -2889,7 +2972,20 @@ var en_US_default = {
|
|
|
2889
2972
|
status: {
|
|
2890
2973
|
pending: "Pending",
|
|
2891
2974
|
in_progress: "In progress",
|
|
2892
|
-
completed: "Completed"
|
|
2975
|
+
completed: "Completed",
|
|
2976
|
+
active: "Active",
|
|
2977
|
+
paused: "Paused",
|
|
2978
|
+
blocked: "Blocked",
|
|
2979
|
+
usage_limited: "Usage limited",
|
|
2980
|
+
budget_limited: "Budget limited",
|
|
2981
|
+
complete: "Completed",
|
|
2982
|
+
success: "Completed",
|
|
2983
|
+
error: "Failed",
|
|
2984
|
+
running: "Running",
|
|
2985
|
+
starting: "Starting",
|
|
2986
|
+
stopping: "Stopping",
|
|
2987
|
+
timeout: "Timed out",
|
|
2988
|
+
interrupted: "Interrupted"
|
|
2893
2989
|
},
|
|
2894
2990
|
pending: {
|
|
2895
2991
|
approval: "Approval required",
|
|
@@ -3155,7 +3251,6 @@ var zh_CN_default = {
|
|
|
3155
3251
|
partial: "\u90E8\u5206\u5C31\u7EEA",
|
|
3156
3252
|
failed: "\u89E3\u6790\u5931\u8D25"
|
|
3157
3253
|
},
|
|
3158
|
-
poweredBy: "\u7531 Xpert AI \u9A71\u52A8",
|
|
3159
3254
|
followUps: {
|
|
3160
3255
|
pending: "\u5F85\u5904\u7406 Follow-up",
|
|
3161
3256
|
queue: "\u6392\u961F",
|
|
@@ -3465,7 +3560,20 @@ var zh_CN_default = {
|
|
|
3465
3560
|
status: {
|
|
3466
3561
|
pending: "\u5F85\u5904\u7406",
|
|
3467
3562
|
in_progress: "\u8FDB\u884C\u4E2D",
|
|
3468
|
-
completed: "\u5DF2\u5B8C\u6210"
|
|
3563
|
+
completed: "\u5DF2\u5B8C\u6210",
|
|
3564
|
+
active: "\u8FDB\u884C\u4E2D",
|
|
3565
|
+
paused: "\u5DF2\u6682\u505C",
|
|
3566
|
+
blocked: "\u5DF2\u963B\u585E",
|
|
3567
|
+
usage_limited: "\u7528\u91CF\u53D7\u9650",
|
|
3568
|
+
budget_limited: "\u9884\u7B97\u53D7\u9650",
|
|
3569
|
+
complete: "\u5DF2\u5B8C\u6210",
|
|
3570
|
+
success: "\u5DF2\u5B8C\u6210",
|
|
3571
|
+
error: "\u5931\u8D25",
|
|
3572
|
+
running: "\u8FD0\u884C\u4E2D",
|
|
3573
|
+
starting: "\u542F\u52A8\u4E2D",
|
|
3574
|
+
stopping: "\u505C\u6B62\u4E2D",
|
|
3575
|
+
timeout: "\u5DF2\u8D85\u65F6",
|
|
3576
|
+
interrupted: "\u5DF2\u4E2D\u65AD"
|
|
3469
3577
|
},
|
|
3470
3578
|
pending: {
|
|
3471
3579
|
approval: "\u9700\u8981\u5BA1\u6279",
|
|
@@ -3905,12 +4013,16 @@ function ThemeProvider({ children, theme: themeProp }) {
|
|
|
3905
4013
|
React2.useEffect(() => {
|
|
3906
4014
|
if (!themeRef.current) return;
|
|
3907
4015
|
const el = themeRef.current;
|
|
4016
|
+
const root = document.documentElement;
|
|
4017
|
+
const rootWasDark = root.classList.contains("dark");
|
|
3908
4018
|
const { colorScheme, radius, density, typography, color } = theme;
|
|
3909
4019
|
const isDarkMode2 = colorScheme === "dark";
|
|
3910
4020
|
if (isDarkMode2) {
|
|
3911
4021
|
el.classList.add("dark");
|
|
4022
|
+
root.classList.add("dark");
|
|
3912
4023
|
} else {
|
|
3913
4024
|
el.classList.remove("dark");
|
|
4025
|
+
root.classList.remove("dark");
|
|
3914
4026
|
}
|
|
3915
4027
|
if (radius) {
|
|
3916
4028
|
el.dataset.radius = radius;
|
|
@@ -3952,7 +4064,6 @@ function ThemeProvider({ children, theme: themeProp }) {
|
|
|
3952
4064
|
}
|
|
3953
4065
|
}
|
|
3954
4066
|
if (color) {
|
|
3955
|
-
const root = document.documentElement;
|
|
3956
4067
|
if (color.grayscale) {
|
|
3957
4068
|
const grayscaleColors = generateGrayscaleColors(color.grayscale, isDarkMode2);
|
|
3958
4069
|
Object.entries(grayscaleColors).forEach(([key, value]) => {
|
|
@@ -3999,8 +4110,8 @@ function ThemeProvider({ children, theme: themeProp }) {
|
|
|
3999
4110
|
}
|
|
4000
4111
|
setThemeRevision((current) => current + 1);
|
|
4001
4112
|
return () => {
|
|
4002
|
-
const root = document.documentElement;
|
|
4003
4113
|
el.classList.remove("dark");
|
|
4114
|
+
root.classList.toggle("dark", rootWasDark);
|
|
4004
4115
|
el.removeAttribute("data-radius");
|
|
4005
4116
|
el.removeAttribute("data-density");
|
|
4006
4117
|
el.style.removeProperty("--density-spacing");
|
|
@@ -4595,25 +4706,93 @@ var Input = React8.forwardRef(
|
|
|
4595
4706
|
);
|
|
4596
4707
|
Input.displayName = "Input";
|
|
4597
4708
|
|
|
4709
|
+
// src/components/ui/tooltip.tsx
|
|
4710
|
+
var React9 = require("react");
|
|
4711
|
+
var TooltipPrimitive = __toESM(require("@radix-ui/react-tooltip"), 1);
|
|
4712
|
+
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
4713
|
+
function TooltipProvider({
|
|
4714
|
+
delayDuration = 0,
|
|
4715
|
+
...props
|
|
4716
|
+
}) {
|
|
4717
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
4718
|
+
TooltipPrimitive.Provider,
|
|
4719
|
+
{
|
|
4720
|
+
"data-slot": "tooltip-provider",
|
|
4721
|
+
delayDuration,
|
|
4722
|
+
...props
|
|
4723
|
+
}
|
|
4724
|
+
);
|
|
4725
|
+
}
|
|
4726
|
+
function Tooltip({
|
|
4727
|
+
...props
|
|
4728
|
+
}) {
|
|
4729
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(TooltipProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
4730
|
+
TooltipPrimitive.Root,
|
|
4731
|
+
{
|
|
4732
|
+
"data-slot": "tooltip",
|
|
4733
|
+
...props
|
|
4734
|
+
}
|
|
4735
|
+
) });
|
|
4736
|
+
}
|
|
4737
|
+
function TooltipTrigger({
|
|
4738
|
+
...props
|
|
4739
|
+
}) {
|
|
4740
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
4741
|
+
TooltipPrimitive.Trigger,
|
|
4742
|
+
{
|
|
4743
|
+
"data-slot": "tooltip-trigger",
|
|
4744
|
+
...props
|
|
4745
|
+
}
|
|
4746
|
+
);
|
|
4747
|
+
}
|
|
4748
|
+
function TooltipContent({
|
|
4749
|
+
className,
|
|
4750
|
+
sideOffset = 0,
|
|
4751
|
+
hideArrow = false,
|
|
4752
|
+
children,
|
|
4753
|
+
...props
|
|
4754
|
+
}) {
|
|
4755
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(TooltipPrimitive.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
|
|
4756
|
+
TooltipPrimitive.Content,
|
|
4757
|
+
{
|
|
4758
|
+
"data-slot": "tooltip-content",
|
|
4759
|
+
sideOffset,
|
|
4760
|
+
className: cn(
|
|
4761
|
+
"bg-primary text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit rounded-md px-3 py-1.5 text-xs text-balance",
|
|
4762
|
+
className
|
|
4763
|
+
),
|
|
4764
|
+
...props,
|
|
4765
|
+
children: [
|
|
4766
|
+
children,
|
|
4767
|
+
!hideArrow ? /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(TooltipPrimitive.Arrow, { className: "bg-primary fill-primary z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]" }) : null
|
|
4768
|
+
]
|
|
4769
|
+
}
|
|
4770
|
+
) });
|
|
4771
|
+
}
|
|
4772
|
+
|
|
4773
|
+
// src/components/composer/ConnectorMenuPanel.tsx
|
|
4774
|
+
var React12 = __toESM(require("react"), 1);
|
|
4775
|
+
var import_lucide_react3 = require("lucide-react");
|
|
4776
|
+
|
|
4598
4777
|
// src/components/ui/scroll-area.tsx
|
|
4599
|
-
var
|
|
4778
|
+
var React10 = __toESM(require("react"), 1);
|
|
4600
4779
|
var ScrollAreaPrimitive = __toESM(require("@radix-ui/react-scroll-area"), 1);
|
|
4601
|
-
var
|
|
4602
|
-
var ScrollArea =
|
|
4780
|
+
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
4781
|
+
var ScrollArea = React10.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
|
|
4603
4782
|
ScrollAreaPrimitive.Root,
|
|
4604
4783
|
{
|
|
4605
4784
|
ref,
|
|
4606
4785
|
className: cn("relative min-w-0 overflow-hidden", className),
|
|
4607
4786
|
...props,
|
|
4608
4787
|
children: [
|
|
4609
|
-
/* @__PURE__ */ (0,
|
|
4610
|
-
/* @__PURE__ */ (0,
|
|
4611
|
-
/* @__PURE__ */ (0,
|
|
4788
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(ScrollAreaPrimitive.Viewport, { className: "h-full w-full min-w-0 max-w-full rounded-[inherit] [&>div]:!block [&>div]:!w-full", children }),
|
|
4789
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(ScrollBar, {}),
|
|
4790
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(ScrollAreaPrimitive.Corner, {})
|
|
4612
4791
|
]
|
|
4613
4792
|
}
|
|
4614
4793
|
));
|
|
4615
4794
|
ScrollArea.displayName = ScrollAreaPrimitive.Root.displayName;
|
|
4616
|
-
var ScrollBar =
|
|
4795
|
+
var ScrollBar = React10.forwardRef(({ className, orientation = "vertical", ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
4617
4796
|
ScrollAreaPrimitive.ScrollAreaScrollbar,
|
|
4618
4797
|
{
|
|
4619
4798
|
ref,
|
|
@@ -4625,20 +4804,16 @@ var ScrollBar = React9.forwardRef(({ className, orientation = "vertical", ...pro
|
|
|
4625
4804
|
className
|
|
4626
4805
|
),
|
|
4627
4806
|
...props,
|
|
4628
|
-
children: /* @__PURE__ */ (0,
|
|
4807
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(ScrollAreaPrimitive.ScrollAreaThumb, { className: "relative flex-1 rounded-full bg-border" })
|
|
4629
4808
|
}
|
|
4630
4809
|
));
|
|
4631
4810
|
ScrollBar.displayName = ScrollAreaPrimitive.ScrollAreaScrollbar.displayName;
|
|
4632
4811
|
|
|
4633
|
-
// src/components/composer/ConnectorMenuPanel.tsx
|
|
4634
|
-
var React11 = __toESM(require("react"), 1);
|
|
4635
|
-
var import_lucide_react3 = require("lucide-react");
|
|
4636
|
-
|
|
4637
4812
|
// src/components/ui/separator.tsx
|
|
4638
|
-
var
|
|
4639
|
-
var
|
|
4640
|
-
var Separator =
|
|
4641
|
-
({ className, orientation = "horizontal", ...props }, ref) => /* @__PURE__ */ (0,
|
|
4813
|
+
var React11 = __toESM(require("react"), 1);
|
|
4814
|
+
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
4815
|
+
var Separator = React11.forwardRef(
|
|
4816
|
+
({ className, orientation = "horizontal", ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
4642
4817
|
"div",
|
|
4643
4818
|
{
|
|
4644
4819
|
ref,
|
|
@@ -4656,7 +4831,7 @@ var Separator = React10.forwardRef(
|
|
|
4656
4831
|
Separator.displayName = "Separator";
|
|
4657
4832
|
|
|
4658
4833
|
// src/components/composer/ConnectorMenuPanel.tsx
|
|
4659
|
-
var
|
|
4834
|
+
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
4660
4835
|
function resolveConnectorManagementUrl(apiUrl, scope) {
|
|
4661
4836
|
const base2 = apiUrl?.trim() || window.location.href;
|
|
4662
4837
|
const path = scope.type === "project" ? `/project/${encodeURIComponent(scope.projectId)}/config` : `/xpert/w/${encodeURIComponent(scope.workspaceId)}/connectors`;
|
|
@@ -4688,7 +4863,7 @@ function ConnectorIcon({
|
|
|
4688
4863
|
label
|
|
4689
4864
|
}) {
|
|
4690
4865
|
if (option.icon?.type === "image" && typeof option.icon.value === "string") {
|
|
4691
|
-
return /* @__PURE__ */ (0,
|
|
4866
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
4692
4867
|
"img",
|
|
4693
4868
|
{
|
|
4694
4869
|
src: option.icon.value,
|
|
@@ -4697,13 +4872,13 @@ function ConnectorIcon({
|
|
|
4697
4872
|
}
|
|
4698
4873
|
);
|
|
4699
4874
|
}
|
|
4700
|
-
return /* @__PURE__ */ (0,
|
|
4875
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
4701
4876
|
"span",
|
|
4702
4877
|
{
|
|
4703
4878
|
"aria-hidden": "true",
|
|
4704
4879
|
title: label,
|
|
4705
4880
|
className: "flex size-7 items-center justify-center rounded-md bg-muted text-muted-foreground",
|
|
4706
|
-
children: /* @__PURE__ */ (0,
|
|
4881
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_lucide_react3.Cable, { className: "size-4" })
|
|
4707
4882
|
}
|
|
4708
4883
|
);
|
|
4709
4884
|
}
|
|
@@ -4719,22 +4894,22 @@ function ConnectorMenuPanel({
|
|
|
4719
4894
|
apiUrl
|
|
4720
4895
|
}) {
|
|
4721
4896
|
const { t, i18n: i18n2 } = useChatkitTranslation();
|
|
4722
|
-
const [query, setQuery] =
|
|
4723
|
-
const [scope, setScope] =
|
|
4724
|
-
const [options, setOptions] =
|
|
4725
|
-
const [loading, setLoading] =
|
|
4726
|
-
const [error, setError] =
|
|
4727
|
-
const [connectingBindingId, setConnectingBindingId] =
|
|
4897
|
+
const [query, setQuery] = React12.useState("");
|
|
4898
|
+
const [scope, setScope] = React12.useState(null);
|
|
4899
|
+
const [options, setOptions] = React12.useState([]);
|
|
4900
|
+
const [loading, setLoading] = React12.useState(false);
|
|
4901
|
+
const [error, setError] = React12.useState(null);
|
|
4902
|
+
const [connectingBindingId, setConnectingBindingId] = React12.useState(null);
|
|
4728
4903
|
const loadErrorMessage = t("composer.connectors.loadError");
|
|
4729
4904
|
const accessDeniedMessage = t("composer.connectors.accessDenied");
|
|
4730
4905
|
const scopeUnavailableMessage = t("composer.connectors.scopeUnavailable");
|
|
4731
|
-
const pollAbortRef =
|
|
4732
|
-
const popupRef =
|
|
4733
|
-
const selectedBindingIdSet =
|
|
4906
|
+
const pollAbortRef = React12.useRef(null);
|
|
4907
|
+
const popupRef = React12.useRef(null);
|
|
4908
|
+
const selectedBindingIdSet = React12.useMemo(
|
|
4734
4909
|
() => new Set(selectedBindingIds),
|
|
4735
4910
|
[selectedBindingIds]
|
|
4736
4911
|
);
|
|
4737
|
-
const loadConnectors =
|
|
4912
|
+
const loadConnectors = React12.useCallback(
|
|
4738
4913
|
async (signal) => {
|
|
4739
4914
|
if (!client || !xpertId) return;
|
|
4740
4915
|
const response = await client.connectors.runtimeOptions(xpertId, {
|
|
@@ -4746,7 +4921,7 @@ function ConnectorMenuPanel({
|
|
|
4746
4921
|
},
|
|
4747
4922
|
[client, projectId, xpertId]
|
|
4748
4923
|
);
|
|
4749
|
-
|
|
4924
|
+
React12.useEffect(() => {
|
|
4750
4925
|
if (!client || !xpertId) {
|
|
4751
4926
|
setScope(null);
|
|
4752
4927
|
setOptions([]);
|
|
@@ -4769,7 +4944,7 @@ function ConnectorMenuPanel({
|
|
|
4769
4944
|
});
|
|
4770
4945
|
return () => controller.abort();
|
|
4771
4946
|
}, [accessDeniedMessage, client, loadConnectors, loadErrorMessage, xpertId]);
|
|
4772
|
-
|
|
4947
|
+
React12.useEffect(
|
|
4773
4948
|
() => () => {
|
|
4774
4949
|
pollAbortRef.current?.abort();
|
|
4775
4950
|
if (popupRef.current && !popupRef.current.closed) {
|
|
@@ -4780,7 +4955,7 @@ function ConnectorMenuPanel({
|
|
|
4780
4955
|
);
|
|
4781
4956
|
const manageUrl = scope ? resolveConnectorManagementUrl(apiUrl, scope) : null;
|
|
4782
4957
|
const normalizedQuery = query.trim().toLocaleLowerCase();
|
|
4783
|
-
const filteredOptions =
|
|
4958
|
+
const filteredOptions = React12.useMemo(
|
|
4784
4959
|
() => options.filter((option) => {
|
|
4785
4960
|
if (!normalizedQuery) return true;
|
|
4786
4961
|
const searchable = `${localizeText(
|
|
@@ -4791,7 +4966,7 @@ function ConnectorMenuPanel({
|
|
|
4791
4966
|
}),
|
|
4792
4967
|
[i18n2.language, normalizedQuery, options]
|
|
4793
4968
|
);
|
|
4794
|
-
const refresh =
|
|
4969
|
+
const refresh = React12.useCallback(async () => {
|
|
4795
4970
|
setLoading(true);
|
|
4796
4971
|
try {
|
|
4797
4972
|
await loadConnectors();
|
|
@@ -4800,7 +4975,7 @@ function ConnectorMenuPanel({
|
|
|
4800
4975
|
setLoading(false);
|
|
4801
4976
|
}
|
|
4802
4977
|
}, [loadConnectors]);
|
|
4803
|
-
const pollAuthorization =
|
|
4978
|
+
const pollAuthorization = React12.useCallback(
|
|
4804
4979
|
async (bindingId, initial, popup, signal) => {
|
|
4805
4980
|
if (!client) return;
|
|
4806
4981
|
let status = initial;
|
|
@@ -4837,7 +5012,7 @@ function ConnectorMenuPanel({
|
|
|
4837
5012
|
},
|
|
4838
5013
|
[client, onSelectionChange, refresh, selectedBindingIds, xpertId]
|
|
4839
5014
|
);
|
|
4840
|
-
const openManageConnectors =
|
|
5015
|
+
const openManageConnectors = React12.useCallback(() => {
|
|
4841
5016
|
if (!manageUrl) {
|
|
4842
5017
|
setError(scopeUnavailableMessage);
|
|
4843
5018
|
return;
|
|
@@ -4849,7 +5024,7 @@ function ConnectorMenuPanel({
|
|
|
4849
5024
|
}
|
|
4850
5025
|
popup.opener = null;
|
|
4851
5026
|
}, [manageUrl, scopeUnavailableMessage, t]);
|
|
4852
|
-
const connectPersonalBinding =
|
|
5027
|
+
const connectPersonalBinding = React12.useCallback(
|
|
4853
5028
|
async (option) => {
|
|
4854
5029
|
if (!client) return;
|
|
4855
5030
|
if (option.profile) {
|
|
@@ -4935,7 +5110,7 @@ function ConnectorMenuPanel({
|
|
|
4935
5110
|
xpertId
|
|
4936
5111
|
]
|
|
4937
5112
|
);
|
|
4938
|
-
const handleOptionClick =
|
|
5113
|
+
const handleOptionClick = React12.useCallback(
|
|
4939
5114
|
(option) => {
|
|
4940
5115
|
if (!isConnectorUsable(option)) {
|
|
4941
5116
|
if (option.authorizationMode === "personal") {
|
|
@@ -4956,15 +5131,15 @@ function ConnectorMenuPanel({
|
|
|
4956
5131
|
selectedBindingIds
|
|
4957
5132
|
]
|
|
4958
5133
|
);
|
|
4959
|
-
return /* @__PURE__ */ (0,
|
|
5134
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
|
|
4960
5135
|
"div",
|
|
4961
5136
|
{
|
|
4962
5137
|
"data-slot": "composer-connector-panel",
|
|
4963
5138
|
className: "flex w-full min-w-0 max-w-full flex-col",
|
|
4964
5139
|
children: [
|
|
4965
|
-
/* @__PURE__ */ (0,
|
|
4966
|
-
/* @__PURE__ */ (0,
|
|
4967
|
-
/* @__PURE__ */ (0,
|
|
5140
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "p-3 pb-2", children: /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "relative", children: [
|
|
5141
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_lucide_react3.Search, { className: "pointer-events-none absolute left-3 top-1/2 size-5 -translate-y-1/2 text-muted-foreground" }),
|
|
5142
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
4968
5143
|
Input,
|
|
4969
5144
|
{
|
|
4970
5145
|
value: query,
|
|
@@ -4974,15 +5149,15 @@ function ConnectorMenuPanel({
|
|
|
4974
5149
|
}
|
|
4975
5150
|
)
|
|
4976
5151
|
] }) }),
|
|
4977
|
-
/* @__PURE__ */ (0,
|
|
4978
|
-
/* @__PURE__ */ (0,
|
|
5152
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(ScrollArea, { className: "max-h-72 min-h-0 px-3", children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { "data-slot": "composer-connector-list", className: "space-y-1 pb-2", children: loading ? /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(ConnectorMessage, { children: [
|
|
5153
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_lucide_react3.Loader2, { className: "mr-2 inline size-4 animate-spin" }),
|
|
4979
5154
|
t("composer.connectors.loading")
|
|
4980
|
-
] }) : !xpertId ? /* @__PURE__ */ (0,
|
|
5155
|
+
] }) : !xpertId ? /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(ConnectorMessage, { children: scopeUnavailableMessage }) : filteredOptions.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(ConnectorMessage, { children: t("composer.connectors.empty") }) : filteredOptions.map((option) => {
|
|
4981
5156
|
const label = localizeText(option.label, i18n2.language);
|
|
4982
5157
|
const selected = selectedBindingIdSet.has(option.bindingId);
|
|
4983
5158
|
const usable = isConnectorUsable(option);
|
|
4984
5159
|
const connecting = connectingBindingId === option.bindingId;
|
|
4985
|
-
return /* @__PURE__ */ (0,
|
|
5160
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
|
|
4986
5161
|
"button",
|
|
4987
5162
|
{
|
|
4988
5163
|
type: "button",
|
|
@@ -4994,13 +5169,13 @@ function ConnectorMenuPanel({
|
|
|
4994
5169
|
),
|
|
4995
5170
|
onClick: () => handleOptionClick(option),
|
|
4996
5171
|
children: [
|
|
4997
|
-
/* @__PURE__ */ (0,
|
|
4998
|
-
/* @__PURE__ */ (0,
|
|
4999
|
-
/* @__PURE__ */ (0,
|
|
5000
|
-
/* @__PURE__ */ (0,
|
|
5172
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(ConnectorIcon, { option, label }),
|
|
5173
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("span", { className: "min-w-0 flex-1", children: [
|
|
5174
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "block truncate text-base", children: label || option.provider }),
|
|
5175
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "block truncate text-xs text-muted-foreground", children: option.authorizationMode === "personal" ? t("composer.connectors.personal") : scope?.type === "workspace" ? t("composer.connectors.workspaceShared") : t("composer.connectors.shared") })
|
|
5001
5176
|
] }),
|
|
5002
|
-
/* @__PURE__ */ (0,
|
|
5003
|
-
connecting ? /* @__PURE__ */ (0,
|
|
5177
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("span", { className: "inline-flex shrink-0 items-center gap-1.5 text-sm text-muted-foreground", children: [
|
|
5178
|
+
connecting ? /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_lucide_react3.Loader2, { className: "size-4 animate-spin" }) : selected ? /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_lucide_react3.Check, { className: "size-4 text-primary" }) : usable ? /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "size-4 rounded-full border border-current" }) : /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_lucide_react3.Link2, { className: "size-4" }),
|
|
5004
5179
|
connecting ? t("composer.connectors.connecting") : selected ? t("composer.connectors.selected") : usable ? t("composer.connectors.select") : option.authorizationMode === "personal" ? t("composer.connectors.connect") : t("composer.connectors.unavailable")
|
|
5005
5180
|
] })
|
|
5006
5181
|
]
|
|
@@ -5008,9 +5183,9 @@ function ConnectorMenuPanel({
|
|
|
5008
5183
|
option.bindingId
|
|
5009
5184
|
);
|
|
5010
5185
|
}) }) }),
|
|
5011
|
-
error ? /* @__PURE__ */ (0,
|
|
5012
|
-
/* @__PURE__ */ (0,
|
|
5013
|
-
/* @__PURE__ */ (0,
|
|
5186
|
+
error ? /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { role: "alert", className: "px-4 py-2 text-sm text-destructive", children: error }) : null,
|
|
5187
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Separator, {}),
|
|
5188
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
|
|
5014
5189
|
"button",
|
|
5015
5190
|
{
|
|
5016
5191
|
type: "button",
|
|
@@ -5018,7 +5193,7 @@ function ConnectorMenuPanel({
|
|
|
5018
5193
|
disabled: !scope,
|
|
5019
5194
|
onClick: openManageConnectors,
|
|
5020
5195
|
children: [
|
|
5021
|
-
/* @__PURE__ */ (0,
|
|
5196
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_lucide_react3.ArrowUpRight, { className: "size-5" }),
|
|
5022
5197
|
t("composer.connectors.manage")
|
|
5023
5198
|
]
|
|
5024
5199
|
}
|
|
@@ -5031,27 +5206,29 @@ function isAccessDenied(error) {
|
|
|
5031
5206
|
return error instanceof Error && "status" in error && (error.status === 401 || error.status === 403);
|
|
5032
5207
|
}
|
|
5033
5208
|
function ConnectorMessage({ children }) {
|
|
5034
|
-
return /* @__PURE__ */ (0,
|
|
5209
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "flex min-h-40 items-center justify-center px-4 text-center text-sm text-muted-foreground", children });
|
|
5035
5210
|
}
|
|
5036
5211
|
|
|
5037
5212
|
// src/components/composer/ComposerMenu.tsx
|
|
5038
|
-
var
|
|
5213
|
+
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
5214
|
+
var COMPOSER_MENU_EXPANDED_WIDTH_REM = 33;
|
|
5215
|
+
var COMPOSER_MENU_COLLISION_PADDING = 12;
|
|
5039
5216
|
function getIconComponent(icon) {
|
|
5040
5217
|
const iconMap = {
|
|
5041
|
-
plus: /* @__PURE__ */ (0,
|
|
5042
|
-
document: /* @__PURE__ */ (0,
|
|
5043
|
-
write: /* @__PURE__ */ (0,
|
|
5044
|
-
sparkle: /* @__PURE__ */ (0,
|
|
5045
|
-
lightbulb: /* @__PURE__ */ (0,
|
|
5046
|
-
"settings-slider": /* @__PURE__ */ (0,
|
|
5047
|
-
search: /* @__PURE__ */ (0,
|
|
5048
|
-
globe: /* @__PURE__ */ (0,
|
|
5049
|
-
images: /* @__PURE__ */ (0,
|
|
5218
|
+
plus: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_lucide_react4.Plus, { size: 16 }),
|
|
5219
|
+
document: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_lucide_react4.FileText, { size: 16 }),
|
|
5220
|
+
write: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_lucide_react4.Pencil, { size: 16 }),
|
|
5221
|
+
sparkle: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_lucide_react4.Sparkles, { size: 16 }),
|
|
5222
|
+
lightbulb: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_lucide_react4.Lightbulb, { size: 16 }),
|
|
5223
|
+
"settings-slider": /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_lucide_react4.SlidersHorizontal, { size: 16 }),
|
|
5224
|
+
search: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_lucide_react4.Search, { size: 16 }),
|
|
5225
|
+
globe: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_lucide_react4.Globe, { size: 16 }),
|
|
5226
|
+
images: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_lucide_react4.Images, { size: 16 })
|
|
5050
5227
|
};
|
|
5051
5228
|
return iconMap[icon] || iconMap.sparkle;
|
|
5052
5229
|
}
|
|
5053
5230
|
function Toggle({ checked }) {
|
|
5054
|
-
return /* @__PURE__ */ (0,
|
|
5231
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
5055
5232
|
"span",
|
|
5056
5233
|
{
|
|
5057
5234
|
"aria-hidden": "true",
|
|
@@ -5059,7 +5236,7 @@ function Toggle({ checked }) {
|
|
|
5059
5236
|
"relative inline-flex h-6 w-10 shrink-0 items-center rounded-full transition-colors",
|
|
5060
5237
|
checked ? "bg-primary" : "bg-muted-foreground/20"
|
|
5061
5238
|
),
|
|
5062
|
-
children: /* @__PURE__ */ (0,
|
|
5239
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
5063
5240
|
"span",
|
|
5064
5241
|
{
|
|
5065
5242
|
className: cn(
|
|
@@ -5095,13 +5272,14 @@ function ComposerMenu({
|
|
|
5095
5272
|
}) {
|
|
5096
5273
|
const { t } = useChatkitTranslation();
|
|
5097
5274
|
const { theme } = useTheme();
|
|
5098
|
-
const [open, setOpen] =
|
|
5099
|
-
const [activePanel, setActivePanel] =
|
|
5275
|
+
const [open, setOpen] = React13.useState(false);
|
|
5276
|
+
const [activePanel, setActivePanel] = React13.useState(
|
|
5100
5277
|
null
|
|
5101
5278
|
);
|
|
5102
|
-
const [query, setQuery] =
|
|
5103
|
-
const [collisionBoundary, setCollisionBoundary] =
|
|
5104
|
-
const
|
|
5279
|
+
const [query, setQuery] = React13.useState("");
|
|
5280
|
+
const [collisionBoundary, setCollisionBoundary] = React13.useState();
|
|
5281
|
+
const [canExpandSecondaryPanel, setCanExpandSecondaryPanel] = React13.useState(false);
|
|
5282
|
+
const triggerRef = React13.useRef(null);
|
|
5105
5283
|
const roundedClass = getRoundedClass(theme.radius);
|
|
5106
5284
|
const panelRoundedClass = getPanelRoundedClass(theme.radius);
|
|
5107
5285
|
const menuItemRoundedClass = getMenuItemRoundedClass(theme.radius);
|
|
@@ -5127,8 +5305,148 @@ function ComposerMenu({
|
|
|
5127
5305
|
setActivePanel(panel);
|
|
5128
5306
|
setQuery("");
|
|
5129
5307
|
};
|
|
5308
|
+
React13.useLayoutEffect(() => {
|
|
5309
|
+
if (!open || !collisionBoundary) {
|
|
5310
|
+
setCanExpandSecondaryPanel(false);
|
|
5311
|
+
return;
|
|
5312
|
+
}
|
|
5313
|
+
const updateLayout = () => {
|
|
5314
|
+
const trigger = triggerRef.current;
|
|
5315
|
+
if (!trigger) {
|
|
5316
|
+
setCanExpandSecondaryPanel(false);
|
|
5317
|
+
return;
|
|
5318
|
+
}
|
|
5319
|
+
const boundaryRect = collisionBoundary.getBoundingClientRect();
|
|
5320
|
+
const triggerRect = trigger.getBoundingClientRect();
|
|
5321
|
+
const rootFontSize = Number.parseFloat(
|
|
5322
|
+
window.getComputedStyle(document.documentElement).fontSize
|
|
5323
|
+
);
|
|
5324
|
+
const remInPixels = Number.isFinite(rootFontSize) ? rootFontSize : 16;
|
|
5325
|
+
const menuLeft = Math.max(
|
|
5326
|
+
triggerRect.left,
|
|
5327
|
+
boundaryRect.left + COMPOSER_MENU_COLLISION_PADDING
|
|
5328
|
+
);
|
|
5329
|
+
const availableWidth = boundaryRect.right - COMPOSER_MENU_COLLISION_PADDING - menuLeft;
|
|
5330
|
+
const requiredWidth = COMPOSER_MENU_EXPANDED_WIDTH_REM * remInPixels;
|
|
5331
|
+
setCanExpandSecondaryPanel(availableWidth >= requiredWidth);
|
|
5332
|
+
};
|
|
5333
|
+
updateLayout();
|
|
5334
|
+
window.addEventListener("resize", updateLayout);
|
|
5335
|
+
const resizeObserver = typeof ResizeObserver === "function" ? new ResizeObserver(updateLayout) : null;
|
|
5336
|
+
resizeObserver?.observe(collisionBoundary);
|
|
5337
|
+
if (triggerRef.current) {
|
|
5338
|
+
resizeObserver?.observe(triggerRef.current);
|
|
5339
|
+
}
|
|
5340
|
+
return () => {
|
|
5341
|
+
window.removeEventListener("resize", updateLayout);
|
|
5342
|
+
resizeObserver?.disconnect();
|
|
5343
|
+
};
|
|
5344
|
+
}, [collisionBoundary, open]);
|
|
5345
|
+
const returnToPrimaryPanel = () => {
|
|
5346
|
+
setActivePanel(null);
|
|
5347
|
+
setQuery("");
|
|
5348
|
+
};
|
|
5349
|
+
const activePanelLabel = activePanel === "targets" ? t("composer.workbuddy.targets") : activePanel === "experts" ? t("composer.workbuddy.experts") : activePanel === "skills" ? t("composer.capabilities.skills") : activePanel === "connectors" ? t("composer.workbuddy.connectors") : null;
|
|
5130
5350
|
const normalizedQuery = query.trim().toLocaleLowerCase();
|
|
5131
5351
|
const matchesQuery2 = (label, description) => !normalizedQuery || `${label} ${description ?? ""}`.toLocaleLowerCase().includes(normalizedQuery);
|
|
5352
|
+
const renderDetailPills = (label, values) => {
|
|
5353
|
+
if (!values?.length) return null;
|
|
5354
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "space-y-1", children: [
|
|
5355
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "text-[11px] font-medium uppercase text-muted-foreground", children: label }),
|
|
5356
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "flex flex-wrap gap-1", children: [
|
|
5357
|
+
values.slice(0, 6).map((value) => /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
5358
|
+
"span",
|
|
5359
|
+
{
|
|
5360
|
+
className: "max-w-full truncate rounded-md bg-muted px-1.5 py-0.5 text-[11px] text-foreground",
|
|
5361
|
+
children: value
|
|
5362
|
+
},
|
|
5363
|
+
value
|
|
5364
|
+
)),
|
|
5365
|
+
values.length > 6 ? /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("span", { className: "rounded-md bg-muted px-1.5 py-0.5 text-[11px] text-muted-foreground", children: [
|
|
5366
|
+
"+",
|
|
5367
|
+
values.length - 6
|
|
5368
|
+
] }) : null
|
|
5369
|
+
] })
|
|
5370
|
+
] });
|
|
5371
|
+
};
|
|
5372
|
+
const renderSubAgentDetailCard = (subAgent) => {
|
|
5373
|
+
const agentKind = subAgent.type === "xpert" ? t("composer.capabilities.xpertAgent") : t("composer.capabilities.agent");
|
|
5374
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
5375
|
+
"div",
|
|
5376
|
+
{
|
|
5377
|
+
"data-slot": "runtime-sub-agent-detail-card",
|
|
5378
|
+
className: cn(
|
|
5379
|
+
"pointer-events-none w-80 space-y-3 border border-border bg-popover p-3 text-popover-foreground shadow-lg",
|
|
5380
|
+
panelRoundedClass
|
|
5381
|
+
),
|
|
5382
|
+
children: [
|
|
5383
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "flex items-start gap-3", children: [
|
|
5384
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
5385
|
+
ChatkitAvatar,
|
|
5386
|
+
{
|
|
5387
|
+
avatar: normalizeChatkitAvatar(subAgent.avatar),
|
|
5388
|
+
label: subAgent.label,
|
|
5389
|
+
className: "h-9 w-9 shrink-0",
|
|
5390
|
+
fallbackClassName: "text-xs"
|
|
5391
|
+
}
|
|
5392
|
+
),
|
|
5393
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "min-w-0 flex-1", children: [
|
|
5394
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "truncate text-sm font-medium", children: subAgent.label }),
|
|
5395
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "truncate text-xs text-muted-foreground", children: subAgent.name ?? agentKind })
|
|
5396
|
+
] })
|
|
5397
|
+
] }),
|
|
5398
|
+
subAgent.description ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "line-clamp-4 text-xs leading-5 text-muted-foreground", children: subAgent.description }) : null,
|
|
5399
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "grid grid-cols-2 gap-2 text-xs", children: [
|
|
5400
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "rounded-md bg-muted px-2 py-1", children: [
|
|
5401
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: "block text-[11px] text-muted-foreground", children: t("composer.capabilities.type") }),
|
|
5402
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: "font-medium", children: agentKind })
|
|
5403
|
+
] }),
|
|
5404
|
+
subAgent.agentKey || subAgent.xpertId ? /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "rounded-md bg-muted px-2 py-1", children: [
|
|
5405
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: "block text-[11px] text-muted-foreground", children: t("composer.capabilities.identifier") }),
|
|
5406
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: "block truncate font-mono text-[11px]", children: subAgent.agentKey ?? subAgent.xpertId })
|
|
5407
|
+
] }) : null
|
|
5408
|
+
] }),
|
|
5409
|
+
renderDetailPills(
|
|
5410
|
+
t("composer.capabilities.tools"),
|
|
5411
|
+
subAgent.toolNames
|
|
5412
|
+
),
|
|
5413
|
+
renderDetailPills(
|
|
5414
|
+
t("composer.capabilities.toolsets"),
|
|
5415
|
+
subAgent.toolsetNames
|
|
5416
|
+
),
|
|
5417
|
+
renderDetailPills(
|
|
5418
|
+
t("composer.capabilities.knowledge"),
|
|
5419
|
+
subAgent.knowledgebaseNames
|
|
5420
|
+
)
|
|
5421
|
+
]
|
|
5422
|
+
}
|
|
5423
|
+
);
|
|
5424
|
+
};
|
|
5425
|
+
const renderSubAgentInfoButton = (subAgent) => /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(Tooltip, { children: [
|
|
5426
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
5427
|
+
"button",
|
|
5428
|
+
{
|
|
5429
|
+
type: "button",
|
|
5430
|
+
"aria-label": t("composer.capabilities.agentDetails"),
|
|
5431
|
+
"data-slot": "runtime-sub-agent-info-trigger",
|
|
5432
|
+
className: "mt-0.5 flex h-6 w-6 shrink-0 items-center justify-center rounded-md text-muted-foreground hover:bg-muted hover:text-foreground",
|
|
5433
|
+
onClick: (event) => event.stopPropagation(),
|
|
5434
|
+
onPointerDown: (event) => event.stopPropagation(),
|
|
5435
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_lucide_react4.Info, { size: 14 })
|
|
5436
|
+
}
|
|
5437
|
+
) }),
|
|
5438
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
5439
|
+
TooltipContent,
|
|
5440
|
+
{
|
|
5441
|
+
side: "top",
|
|
5442
|
+
align: "center",
|
|
5443
|
+
sideOffset: 8,
|
|
5444
|
+
hideArrow: true,
|
|
5445
|
+
className: "bg-transparent p-0 text-popover-foreground shadow-none",
|
|
5446
|
+
children: renderSubAgentDetailCard(subAgent)
|
|
5447
|
+
}
|
|
5448
|
+
)
|
|
5449
|
+
] });
|
|
5132
5450
|
const renderCapabilityPanel = (panel) => {
|
|
5133
5451
|
const isSkills = panel === "skills";
|
|
5134
5452
|
const filteredSkills = isSkills ? skills.filter((skill) => matchesQuery2(skill.label, skill.description)) : [];
|
|
@@ -5139,7 +5457,7 @@ function ComposerMenu({
|
|
|
5139
5457
|
skill.id
|
|
5140
5458
|
) : false;
|
|
5141
5459
|
const skillDescription = skill.description ?? skill.repositoryName;
|
|
5142
|
-
return /* @__PURE__ */ (0,
|
|
5460
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
5143
5461
|
DropdownMenuCheckboxItem,
|
|
5144
5462
|
{
|
|
5145
5463
|
checked: selected,
|
|
@@ -5152,14 +5470,14 @@ function ComposerMenu({
|
|
|
5152
5470
|
selected && "bg-muted"
|
|
5153
5471
|
),
|
|
5154
5472
|
children: [
|
|
5155
|
-
/* @__PURE__ */ (0,
|
|
5473
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
5156
5474
|
"span",
|
|
5157
5475
|
{
|
|
5158
5476
|
className: cn(
|
|
5159
5477
|
"flex size-7 shrink-0 items-center justify-center text-muted-foreground",
|
|
5160
5478
|
skillDescription && "mt-0.5"
|
|
5161
5479
|
),
|
|
5162
|
-
children: /* @__PURE__ */ (0,
|
|
5480
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
5163
5481
|
RuntimeCapabilityIcon,
|
|
5164
5482
|
{
|
|
5165
5483
|
option: {
|
|
@@ -5174,9 +5492,9 @@ function ComposerMenu({
|
|
|
5174
5492
|
)
|
|
5175
5493
|
}
|
|
5176
5494
|
),
|
|
5177
|
-
/* @__PURE__ */ (0,
|
|
5178
|
-
/* @__PURE__ */ (0,
|
|
5179
|
-
skillDescription && /* @__PURE__ */ (0,
|
|
5495
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("span", { className: "min-w-0 flex-1 text-left", children: [
|
|
5496
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: "block truncate", children: skill.label }),
|
|
5497
|
+
skillDescription && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: "block truncate text-xs text-muted-foreground", children: skillDescription })
|
|
5180
5498
|
] })
|
|
5181
5499
|
]
|
|
5182
5500
|
},
|
|
@@ -5202,7 +5520,7 @@ function ComposerMenu({
|
|
|
5202
5520
|
"subAgent",
|
|
5203
5521
|
subAgent.nodeKey
|
|
5204
5522
|
) : false;
|
|
5205
|
-
return /* @__PURE__ */ (0,
|
|
5523
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
5206
5524
|
DropdownMenuCheckboxItem,
|
|
5207
5525
|
{
|
|
5208
5526
|
checked: selected,
|
|
@@ -5218,7 +5536,7 @@ function ComposerMenu({
|
|
|
5218
5536
|
selected && "bg-muted"
|
|
5219
5537
|
),
|
|
5220
5538
|
children: [
|
|
5221
|
-
/* @__PURE__ */ (0,
|
|
5539
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: "mt-0.5 flex size-7 shrink-0 items-center justify-center text-muted-foreground", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
5222
5540
|
RuntimeCapabilityIcon,
|
|
5223
5541
|
{
|
|
5224
5542
|
option: {
|
|
@@ -5231,16 +5549,17 @@ function ComposerMenu({
|
|
|
5231
5549
|
variant: "list"
|
|
5232
5550
|
}
|
|
5233
5551
|
) }),
|
|
5234
|
-
/* @__PURE__ */ (0,
|
|
5235
|
-
/* @__PURE__ */ (0,
|
|
5236
|
-
(subAgent.description || subAgent.name) && /* @__PURE__ */ (0,
|
|
5237
|
-
] })
|
|
5552
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("span", { className: "min-w-0 flex-1 text-left", children: [
|
|
5553
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: "block truncate", children: subAgent.label }),
|
|
5554
|
+
(subAgent.description || subAgent.name) && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: "block truncate text-xs text-muted-foreground", children: subAgent.description ?? subAgent.name })
|
|
5555
|
+
] }),
|
|
5556
|
+
renderSubAgentInfoButton(subAgent)
|
|
5238
5557
|
]
|
|
5239
5558
|
},
|
|
5240
5559
|
subAgent.nodeKey
|
|
5241
5560
|
);
|
|
5242
5561
|
});
|
|
5243
|
-
const toolRows = isSkills ? tools.filter((tool) => matchesQuery2(tool.label, tool.shortLabel)).map((tool) => /* @__PURE__ */ (0,
|
|
5562
|
+
const toolRows = isSkills ? tools.filter((tool) => matchesQuery2(tool.label, tool.shortLabel)).map((tool) => /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
5244
5563
|
"button",
|
|
5245
5564
|
{
|
|
5246
5565
|
type: "button",
|
|
@@ -5253,14 +5572,14 @@ function ComposerMenu({
|
|
|
5253
5572
|
setOpen(false);
|
|
5254
5573
|
},
|
|
5255
5574
|
children: [
|
|
5256
|
-
/* @__PURE__ */ (0,
|
|
5257
|
-
/* @__PURE__ */ (0,
|
|
5575
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: "flex size-7 shrink-0 items-center justify-center text-muted-foreground", children: getIconComponent(tool.icon) }),
|
|
5576
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: "truncate", children: tool.label })
|
|
5258
5577
|
]
|
|
5259
5578
|
},
|
|
5260
5579
|
tool.id
|
|
5261
5580
|
)) : [];
|
|
5262
|
-
return /* @__PURE__ */ (0,
|
|
5263
|
-
/* @__PURE__ */ (0,
|
|
5581
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_jsx_runtime15.Fragment, { children: [
|
|
5582
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
5264
5583
|
PanelSearch,
|
|
5265
5584
|
{
|
|
5266
5585
|
value: query,
|
|
@@ -5270,29 +5589,109 @@ function ComposerMenu({
|
|
|
5270
5589
|
)
|
|
5271
5590
|
}
|
|
5272
5591
|
),
|
|
5273
|
-
/* @__PURE__ */ (0,
|
|
5274
|
-
|
|
5275
|
-
|
|
5276
|
-
|
|
5277
|
-
|
|
5278
|
-
|
|
5279
|
-
|
|
5280
|
-
|
|
5281
|
-
|
|
5282
|
-
|
|
5283
|
-
|
|
5284
|
-
|
|
5285
|
-
|
|
5286
|
-
|
|
5287
|
-
|
|
5288
|
-
|
|
5289
|
-
|
|
5290
|
-
|
|
5291
|
-
|
|
5592
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
5593
|
+
"div",
|
|
5594
|
+
{
|
|
5595
|
+
"data-slot": "composer-capability-scroll",
|
|
5596
|
+
className: "max-h-72 overflow-y-auto overscroll-contain px-2 pb-2",
|
|
5597
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { "data-slot": "composer-capability-list", className: "space-y-1", children: [
|
|
5598
|
+
isSkills && expertSkills.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(SkillGroup, { label: t("composer.workbuddy.expertSkills"), children: expertSkills.map(renderSkillRow) }) : null,
|
|
5599
|
+
isSkills ? Array.from(projectSkillGroups.entries()).map(
|
|
5600
|
+
([projectLabel, projectSkills]) => /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
5601
|
+
SkillGroup,
|
|
5602
|
+
{
|
|
5603
|
+
label: t("composer.workbuddy.projectSkills", {
|
|
5604
|
+
project: projectLabel
|
|
5605
|
+
}),
|
|
5606
|
+
children: projectSkills.map(renderSkillRow)
|
|
5607
|
+
},
|
|
5608
|
+
projectLabel
|
|
5609
|
+
)
|
|
5610
|
+
) : capabilityRows,
|
|
5611
|
+
toolRows,
|
|
5612
|
+
(isSkills ? filteredSkills.length : capabilityRows.length) === 0 && toolRows.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "flex min-h-32 items-center justify-center px-4 text-center text-sm text-muted-foreground", children: t(
|
|
5613
|
+
isSkills ? "composer.workbuddy.emptySkills" : "composer.workbuddy.emptyExperts"
|
|
5614
|
+
) }) : null
|
|
5615
|
+
] })
|
|
5616
|
+
}
|
|
5617
|
+
)
|
|
5292
5618
|
] });
|
|
5293
5619
|
};
|
|
5294
|
-
|
|
5295
|
-
|
|
5620
|
+
const primaryPanel = /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
5621
|
+
"div",
|
|
5622
|
+
{
|
|
5623
|
+
"data-slot": "composer-primary-panel",
|
|
5624
|
+
className: cn(
|
|
5625
|
+
"w-64 max-w-full shrink-0 overflow-hidden bg-popover p-1 text-popover-foreground shadow-md ring-1 ring-foreground/10",
|
|
5626
|
+
panelRoundedClass
|
|
5627
|
+
),
|
|
5628
|
+
children: [
|
|
5629
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
5630
|
+
DropdownMenuItem,
|
|
5631
|
+
{
|
|
5632
|
+
disabled: !attachmentsEnabled,
|
|
5633
|
+
onSelect: onAttachmentClick,
|
|
5634
|
+
className: cn("gap-3 p-1.5 font-normal", menuItemRoundedClass),
|
|
5635
|
+
children: [
|
|
5636
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_lucide_react4.Paperclip, { className: "size-5" }),
|
|
5637
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: "flex-1 text-base", children: t("composer.addAttachment") }),
|
|
5638
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_lucide_react4.ChevronRight, { className: "size-4" })
|
|
5639
|
+
]
|
|
5640
|
+
}
|
|
5641
|
+
),
|
|
5642
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(DropdownMenuSeparator, { className: "my-2" }),
|
|
5643
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
5644
|
+
PrimaryPanelItem,
|
|
5645
|
+
{
|
|
5646
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_lucide_react4.Target, {}),
|
|
5647
|
+
label: t("composer.workbuddy.targets"),
|
|
5648
|
+
active: activePanel === "targets",
|
|
5649
|
+
onSelect: () => choosePanel("targets"),
|
|
5650
|
+
className: menuItemRoundedClass
|
|
5651
|
+
}
|
|
5652
|
+
),
|
|
5653
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
5654
|
+
PrimaryPanelItem,
|
|
5655
|
+
{
|
|
5656
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_lucide_react4.Bot, {}),
|
|
5657
|
+
label: t("composer.workbuddy.experts"),
|
|
5658
|
+
count: selectedSubAgentCount,
|
|
5659
|
+
active: activePanel === "experts",
|
|
5660
|
+
onSelect: () => choosePanel("experts"),
|
|
5661
|
+
className: menuItemRoundedClass
|
|
5662
|
+
}
|
|
5663
|
+
),
|
|
5664
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
5665
|
+
PrimaryPanelItem,
|
|
5666
|
+
{
|
|
5667
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_lucide_react4.WandSparkles, {}),
|
|
5668
|
+
label: t("composer.capabilities.skills"),
|
|
5669
|
+
count: selectedSkillCount,
|
|
5670
|
+
active: activePanel === "skills",
|
|
5671
|
+
onSelect: () => choosePanel("skills"),
|
|
5672
|
+
className: menuItemRoundedClass
|
|
5673
|
+
}
|
|
5674
|
+
),
|
|
5675
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
5676
|
+
PrimaryPanelItem,
|
|
5677
|
+
{
|
|
5678
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_lucide_react4.Plug, {}),
|
|
5679
|
+
label: t("composer.workbuddy.connectors"),
|
|
5680
|
+
count: selectedConnectorBindingIds?.length ?? 0,
|
|
5681
|
+
active: activePanel === "connectors",
|
|
5682
|
+
disabled: !connectorsEnabled,
|
|
5683
|
+
onSelect: () => choosePanel("connectors"),
|
|
5684
|
+
className: menuItemRoundedClass
|
|
5685
|
+
}
|
|
5686
|
+
)
|
|
5687
|
+
]
|
|
5688
|
+
}
|
|
5689
|
+
);
|
|
5690
|
+
const secondaryPanelExpandsRight = Boolean(
|
|
5691
|
+
activePanel && activePanelLabel && canExpandSecondaryPanel
|
|
5692
|
+
);
|
|
5693
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(DropdownMenu, { open, onOpenChange: handleOpenChange, modal: false, children: [
|
|
5694
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
5296
5695
|
Button,
|
|
5297
5696
|
{
|
|
5298
5697
|
ref: triggerRef,
|
|
@@ -5306,7 +5705,7 @@ function ComposerMenu({
|
|
|
5306
5705
|
"size-9 shrink-0 transition-[background-color,border-radius] duration-300 hover:bg-muted",
|
|
5307
5706
|
open ? "rounded-full bg-muted" : roundedClass
|
|
5308
5707
|
),
|
|
5309
|
-
children: /* @__PURE__ */ (0,
|
|
5708
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
5310
5709
|
import_lucide_react4.Plus,
|
|
5311
5710
|
{
|
|
5312
5711
|
className: cn(
|
|
@@ -5317,173 +5716,116 @@ function ComposerMenu({
|
|
|
5317
5716
|
)
|
|
5318
5717
|
}
|
|
5319
5718
|
) }),
|
|
5320
|
-
/* @__PURE__ */ (0,
|
|
5719
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
5321
5720
|
DropdownMenuContent,
|
|
5322
5721
|
{
|
|
5323
5722
|
align: "start",
|
|
5324
5723
|
side: "top",
|
|
5325
5724
|
sideOffset: 8,
|
|
5326
5725
|
collisionBoundary,
|
|
5327
|
-
collisionPadding:
|
|
5726
|
+
collisionPadding: COMPOSER_MENU_COLLISION_PADDING,
|
|
5727
|
+
"data-layout": canExpandSecondaryPanel ? "wide" : "narrow",
|
|
5328
5728
|
className: cn(
|
|
5329
|
-
"bg-transparent shadow-none ring-0",
|
|
5330
|
-
|
|
5729
|
+
"max-w-(--radix-dropdown-menu-content-available-width) bg-transparent p-1 shadow-none ring-0",
|
|
5730
|
+
secondaryPanelExpandsRight ? "w-[33rem] overflow-visible" : "w-[16.5rem] overflow-hidden"
|
|
5331
5731
|
),
|
|
5332
|
-
children: /* @__PURE__ */ (0,
|
|
5732
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
5333
5733
|
"div",
|
|
5334
5734
|
{
|
|
5735
|
+
"data-slot": "composer-menu-layout",
|
|
5335
5736
|
className: cn(
|
|
5336
|
-
"items-end
|
|
5337
|
-
|
|
5737
|
+
"flex items-end",
|
|
5738
|
+
secondaryPanelExpandsRight && "w-full min-w-0 gap-2"
|
|
5338
5739
|
),
|
|
5339
5740
|
children: [
|
|
5340
|
-
|
|
5341
|
-
|
|
5342
|
-
|
|
5343
|
-
|
|
5344
|
-
className: cn(
|
|
5345
|
-
"w-64 max-w-full shrink-0 overflow-hidden bg-popover p-1 text-popover-foreground shadow-md ring-1 ring-foreground/10",
|
|
5346
|
-
panelRoundedClass
|
|
5347
|
-
),
|
|
5348
|
-
children: [
|
|
5349
|
-
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
|
|
5350
|
-
DropdownMenuItem,
|
|
5351
|
-
{
|
|
5352
|
-
disabled: !attachmentsEnabled,
|
|
5353
|
-
onSelect: onAttachmentClick,
|
|
5354
|
-
className: cn("gap-3 p-1.5 font-normal", menuItemRoundedClass),
|
|
5355
|
-
children: [
|
|
5356
|
-
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_lucide_react4.Paperclip, { className: "size-5" }),
|
|
5357
|
-
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "flex-1 text-base", children: t("composer.addAttachment") }),
|
|
5358
|
-
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_lucide_react4.ChevronRight, { className: "size-4" })
|
|
5359
|
-
]
|
|
5360
|
-
}
|
|
5361
|
-
),
|
|
5362
|
-
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(DropdownMenuSeparator, { className: "my-2" }),
|
|
5363
|
-
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
5364
|
-
PrimaryPanelItem,
|
|
5365
|
-
{
|
|
5366
|
-
icon: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_lucide_react4.Target, {}),
|
|
5367
|
-
label: t("composer.workbuddy.targets"),
|
|
5368
|
-
active: activePanel === "targets",
|
|
5369
|
-
onSelect: () => choosePanel("targets"),
|
|
5370
|
-
className: menuItemRoundedClass
|
|
5371
|
-
}
|
|
5372
|
-
),
|
|
5373
|
-
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
5374
|
-
PrimaryPanelItem,
|
|
5375
|
-
{
|
|
5376
|
-
icon: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_lucide_react4.Bot, {}),
|
|
5377
|
-
label: t("composer.workbuddy.experts"),
|
|
5378
|
-
count: selectedSubAgentCount,
|
|
5379
|
-
active: activePanel === "experts",
|
|
5380
|
-
onSelect: () => choosePanel("experts"),
|
|
5381
|
-
className: menuItemRoundedClass
|
|
5382
|
-
}
|
|
5383
|
-
),
|
|
5384
|
-
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
5385
|
-
PrimaryPanelItem,
|
|
5386
|
-
{
|
|
5387
|
-
icon: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_lucide_react4.WandSparkles, {}),
|
|
5388
|
-
label: t("composer.capabilities.skills"),
|
|
5389
|
-
count: selectedSkillCount,
|
|
5390
|
-
active: activePanel === "skills",
|
|
5391
|
-
onSelect: () => choosePanel("skills"),
|
|
5392
|
-
className: menuItemRoundedClass
|
|
5393
|
-
}
|
|
5394
|
-
),
|
|
5395
|
-
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
5396
|
-
PrimaryPanelItem,
|
|
5397
|
-
{
|
|
5398
|
-
icon: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_lucide_react4.Plug, {}),
|
|
5399
|
-
label: t("composer.workbuddy.connectors"),
|
|
5400
|
-
count: selectedConnectorBindingIds?.length ?? 0,
|
|
5401
|
-
active: activePanel === "connectors",
|
|
5402
|
-
disabled: !connectorsEnabled,
|
|
5403
|
-
onSelect: () => choosePanel("connectors"),
|
|
5404
|
-
className: menuItemRoundedClass
|
|
5405
|
-
}
|
|
5406
|
-
)
|
|
5407
|
-
]
|
|
5408
|
-
}
|
|
5409
|
-
),
|
|
5410
|
-
activePanel === "targets" ? /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(SecondaryPanel, { panelRoundedClass, children: /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "space-y-1 p-1", children: [
|
|
5411
|
-
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
|
|
5412
|
-
DropdownMenuItem,
|
|
5741
|
+
secondaryPanelExpandsRight ? primaryPanel : null,
|
|
5742
|
+
activePanel && activePanelLabel ? /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(SecondaryPanel, { panelRoundedClass, children: [
|
|
5743
|
+
!secondaryPanelExpandsRight ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
5744
|
+
PanelHeader,
|
|
5413
5745
|
{
|
|
5414
|
-
|
|
5415
|
-
|
|
5416
|
-
|
|
5417
|
-
onSelect: (event) => {
|
|
5418
|
-
event.preventDefault();
|
|
5419
|
-
onGoalPanelOpenChange?.(!goalPanelOpen);
|
|
5420
|
-
},
|
|
5421
|
-
className: cn(
|
|
5422
|
-
"gap-3 p-1.5",
|
|
5423
|
-
menuItemRoundedClass,
|
|
5424
|
-
goalPanelOpen && "bg-muted"
|
|
5425
|
-
),
|
|
5426
|
-
children: [
|
|
5427
|
-
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_lucide_react4.Target, { className: "size-5" }),
|
|
5428
|
-
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "min-w-0 flex-1 text-base", children: t("chat.goal.label") }),
|
|
5429
|
-
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Toggle, { checked: goalPanelOpen })
|
|
5430
|
-
]
|
|
5746
|
+
label: activePanelLabel,
|
|
5747
|
+
onBack: returnToPrimaryPanel,
|
|
5748
|
+
className: menuItemRoundedClass
|
|
5431
5749
|
}
|
|
5432
|
-
),
|
|
5433
|
-
/* @__PURE__ */ (0,
|
|
5434
|
-
|
|
5750
|
+
) : null,
|
|
5751
|
+
activePanel === "targets" ? /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "space-y-1 p-1", children: [
|
|
5752
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
5753
|
+
DropdownMenuItem,
|
|
5754
|
+
{
|
|
5755
|
+
role: "switch",
|
|
5756
|
+
"aria-checked": goalPanelOpen,
|
|
5757
|
+
disabled: !goalCommandAvailable,
|
|
5758
|
+
onSelect: (event) => {
|
|
5759
|
+
event.preventDefault();
|
|
5760
|
+
onGoalPanelOpenChange?.(!goalPanelOpen);
|
|
5761
|
+
},
|
|
5762
|
+
className: cn(
|
|
5763
|
+
"gap-3 p-1.5",
|
|
5764
|
+
menuItemRoundedClass,
|
|
5765
|
+
goalPanelOpen && "bg-muted"
|
|
5766
|
+
),
|
|
5767
|
+
children: [
|
|
5768
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_lucide_react4.Target, { className: "size-5" }),
|
|
5769
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: "min-w-0 flex-1 text-base", children: t("chat.goal.label") }),
|
|
5770
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Toggle, { checked: goalPanelOpen })
|
|
5771
|
+
]
|
|
5772
|
+
}
|
|
5773
|
+
),
|
|
5774
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
5775
|
+
DropdownMenuItem,
|
|
5776
|
+
{
|
|
5777
|
+
role: "switch",
|
|
5778
|
+
"aria-checked": planModeEnabled,
|
|
5779
|
+
onSelect: (event) => {
|
|
5780
|
+
event.preventDefault();
|
|
5781
|
+
onPlanModeChange?.(!planModeEnabled);
|
|
5782
|
+
},
|
|
5783
|
+
className: cn(
|
|
5784
|
+
"gap-3 p-1.5",
|
|
5785
|
+
menuItemRoundedClass,
|
|
5786
|
+
planModeEnabled && "bg-muted"
|
|
5787
|
+
),
|
|
5788
|
+
children: [
|
|
5789
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_lucide_react4.ListChecks, { className: "size-5" }),
|
|
5790
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: "min-w-0 flex-1 text-base", children: t("composer.planMode") }),
|
|
5791
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Toggle, { checked: planModeEnabled })
|
|
5792
|
+
]
|
|
5793
|
+
}
|
|
5794
|
+
)
|
|
5795
|
+
] }) : activePanel === "experts" || activePanel === "skills" ? renderCapabilityPanel(activePanel) : /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
5796
|
+
ConnectorMenuPanel,
|
|
5435
5797
|
{
|
|
5436
|
-
|
|
5437
|
-
|
|
5438
|
-
|
|
5439
|
-
|
|
5440
|
-
|
|
5441
|
-
|
|
5442
|
-
className: cn(
|
|
5443
|
-
"gap-3 p-1.5",
|
|
5444
|
-
menuItemRoundedClass,
|
|
5445
|
-
planModeEnabled && "bg-muted"
|
|
5446
|
-
),
|
|
5447
|
-
children: [
|
|
5448
|
-
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_lucide_react4.ListChecks, { className: "size-5" }),
|
|
5449
|
-
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "min-w-0 flex-1 text-base", children: t("composer.planMode") }),
|
|
5450
|
-
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Toggle, { checked: planModeEnabled })
|
|
5451
|
-
]
|
|
5798
|
+
client: connectorClient ?? null,
|
|
5799
|
+
xpertId: connectorXpertId,
|
|
5800
|
+
projectId: connectorProjectId,
|
|
5801
|
+
selectedBindingIds: selectedConnectorBindingIds,
|
|
5802
|
+
onSelectionChange: onConnectorSelectionChange,
|
|
5803
|
+
apiUrl
|
|
5452
5804
|
}
|
|
5453
5805
|
)
|
|
5454
|
-
] })
|
|
5455
|
-
ConnectorMenuPanel,
|
|
5456
|
-
{
|
|
5457
|
-
client: connectorClient ?? null,
|
|
5458
|
-
xpertId: connectorXpertId,
|
|
5459
|
-
projectId: connectorProjectId,
|
|
5460
|
-
selectedBindingIds: selectedConnectorBindingIds,
|
|
5461
|
-
onSelectionChange: onConnectorSelectionChange,
|
|
5462
|
-
apiUrl
|
|
5463
|
-
}
|
|
5464
|
-
) }) : null
|
|
5806
|
+
] }) : primaryPanel
|
|
5465
5807
|
]
|
|
5466
5808
|
}
|
|
5467
5809
|
)
|
|
5468
5810
|
}
|
|
5469
5811
|
),
|
|
5470
|
-
planModeEnabled ? /* @__PURE__ */ (0,
|
|
5812
|
+
planModeEnabled ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
5471
5813
|
ActiveIndicator,
|
|
5472
5814
|
{
|
|
5473
5815
|
label: t("composer.planModeActive"),
|
|
5474
5816
|
ariaLabel: t("composer.disablePlanMode"),
|
|
5475
|
-
icon: /* @__PURE__ */ (0,
|
|
5817
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_lucide_react4.ListChecks, {}),
|
|
5476
5818
|
roundedClass,
|
|
5477
5819
|
disabled,
|
|
5478
5820
|
onClick: () => onPlanModeChange?.(false)
|
|
5479
5821
|
}
|
|
5480
5822
|
) : null,
|
|
5481
|
-
goalCommandAvailable && goalPanelOpen ? /* @__PURE__ */ (0,
|
|
5823
|
+
goalCommandAvailable && goalPanelOpen ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
5482
5824
|
ActiveIndicator,
|
|
5483
5825
|
{
|
|
5484
5826
|
label: t("chat.goal.label"),
|
|
5485
5827
|
ariaLabel: t("chat.goal.hide"),
|
|
5486
|
-
icon: /* @__PURE__ */ (0,
|
|
5828
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_lucide_react4.Target, {}),
|
|
5487
5829
|
roundedClass,
|
|
5488
5830
|
disabled,
|
|
5489
5831
|
onClick: () => onGoalPanelOpenChange?.(false)
|
|
@@ -5491,6 +5833,29 @@ function ComposerMenu({
|
|
|
5491
5833
|
) : null
|
|
5492
5834
|
] });
|
|
5493
5835
|
}
|
|
5836
|
+
function PanelHeader({
|
|
5837
|
+
label,
|
|
5838
|
+
onBack,
|
|
5839
|
+
className
|
|
5840
|
+
}) {
|
|
5841
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_jsx_runtime15.Fragment, { children: [
|
|
5842
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
5843
|
+
DropdownMenuItem,
|
|
5844
|
+
{
|
|
5845
|
+
onSelect: (event) => {
|
|
5846
|
+
event.preventDefault();
|
|
5847
|
+
onBack();
|
|
5848
|
+
},
|
|
5849
|
+
className: cn("gap-3 p-1.5 font-normal", className),
|
|
5850
|
+
children: [
|
|
5851
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_lucide_react4.ArrowLeft, { className: "size-5" }),
|
|
5852
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: "min-w-0 flex-1 text-base", children: label })
|
|
5853
|
+
]
|
|
5854
|
+
}
|
|
5855
|
+
),
|
|
5856
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(DropdownMenuSeparator, { className: "my-0" })
|
|
5857
|
+
] });
|
|
5858
|
+
}
|
|
5494
5859
|
function PrimaryPanelItem({
|
|
5495
5860
|
icon,
|
|
5496
5861
|
label,
|
|
@@ -5500,7 +5865,7 @@ function PrimaryPanelItem({
|
|
|
5500
5865
|
onSelect,
|
|
5501
5866
|
className
|
|
5502
5867
|
}) {
|
|
5503
|
-
return /* @__PURE__ */ (0,
|
|
5868
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
5504
5869
|
DropdownMenuItem,
|
|
5505
5870
|
{
|
|
5506
5871
|
disabled,
|
|
@@ -5510,10 +5875,10 @@ function PrimaryPanelItem({
|
|
|
5510
5875
|
},
|
|
5511
5876
|
className: cn("gap-3 p-1.5 font-normal", className, active && "bg-muted"),
|
|
5512
5877
|
children: [
|
|
5513
|
-
|
|
5514
|
-
/* @__PURE__ */ (0,
|
|
5515
|
-
count > 0 ? /* @__PURE__ */ (0,
|
|
5516
|
-
/* @__PURE__ */ (0,
|
|
5878
|
+
React13.cloneElement(icon, { className: "size-5" }),
|
|
5879
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: "min-w-0 flex-1 text-base", children: label }),
|
|
5880
|
+
count > 0 ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: "rounded-full bg-primary/10 px-1.5 py-0.5 text-xs font-normal text-primary", children: count }) : null,
|
|
5881
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_lucide_react4.ChevronRight, { className: "size-4" })
|
|
5517
5882
|
]
|
|
5518
5883
|
}
|
|
5519
5884
|
);
|
|
@@ -5522,20 +5887,20 @@ function SecondaryPanel({
|
|
|
5522
5887
|
panelRoundedClass,
|
|
5523
5888
|
children
|
|
5524
5889
|
}) {
|
|
5525
|
-
return /* @__PURE__ */ (0,
|
|
5890
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
5526
5891
|
"div",
|
|
5527
5892
|
{
|
|
5528
5893
|
"data-slot": "composer-secondary-panel",
|
|
5529
5894
|
className: cn(
|
|
5530
|
-
"min-w-0 max-w-full
|
|
5895
|
+
"w-64 min-w-0 max-w-full overflow-hidden bg-popover text-popover-foreground shadow-lg ring-1 ring-foreground/10",
|
|
5531
5896
|
panelRoundedClass
|
|
5532
5897
|
),
|
|
5533
|
-
children: /* @__PURE__ */ (0,
|
|
5898
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
5534
5899
|
"div",
|
|
5535
5900
|
{
|
|
5536
5901
|
"data-slot": "composer-secondary-scroll",
|
|
5537
|
-
className: "w-full min-w-0 overflow-x-
|
|
5538
|
-
children: /* @__PURE__ */ (0,
|
|
5902
|
+
className: "w-full min-w-0 overflow-x-hidden",
|
|
5903
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "w-full min-w-0", children })
|
|
5539
5904
|
}
|
|
5540
5905
|
)
|
|
5541
5906
|
}
|
|
@@ -5546,9 +5911,9 @@ function PanelSearch({
|
|
|
5546
5911
|
onChange,
|
|
5547
5912
|
placeholder
|
|
5548
5913
|
}) {
|
|
5549
|
-
return /* @__PURE__ */ (0,
|
|
5550
|
-
/* @__PURE__ */ (0,
|
|
5551
|
-
/* @__PURE__ */ (0,
|
|
5914
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { "data-slot": "composer-panel-search", className: "px-2 pt-1 pb-2", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "relative", children: [
|
|
5915
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_lucide_react4.Search, { className: "pointer-events-none absolute left-3 top-1/2 size-5 -translate-y-1/2 text-muted-foreground" }),
|
|
5916
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
5552
5917
|
Input,
|
|
5553
5918
|
{
|
|
5554
5919
|
autoFocus: true,
|
|
@@ -5558,14 +5923,14 @@ function PanelSearch({
|
|
|
5558
5923
|
className: "h-8 border-0 bg-muted pl-10 text-base shadow-none focus-visible:ring-1"
|
|
5559
5924
|
}
|
|
5560
5925
|
)
|
|
5561
|
-
] });
|
|
5926
|
+
] }) });
|
|
5562
5927
|
}
|
|
5563
5928
|
function SkillGroup({
|
|
5564
5929
|
label,
|
|
5565
5930
|
children
|
|
5566
5931
|
}) {
|
|
5567
|
-
return /* @__PURE__ */ (0,
|
|
5568
|
-
/* @__PURE__ */ (0,
|
|
5932
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("section", { "data-slot": "composer-skill-group", className: "space-y-1", children: [
|
|
5933
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "px-1.5 pt-1 text-xs font-normal text-muted-foreground", children: label }),
|
|
5569
5934
|
children
|
|
5570
5935
|
] });
|
|
5571
5936
|
}
|
|
@@ -5577,7 +5942,7 @@ function ActiveIndicator({
|
|
|
5577
5942
|
disabled,
|
|
5578
5943
|
onClick
|
|
5579
5944
|
}) {
|
|
5580
|
-
return /* @__PURE__ */ (0,
|
|
5945
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
5581
5946
|
"button",
|
|
5582
5947
|
{
|
|
5583
5948
|
type: "button",
|
|
@@ -5589,28 +5954,28 @@ function ActiveIndicator({
|
|
|
5589
5954
|
roundedClass
|
|
5590
5955
|
),
|
|
5591
5956
|
children: [
|
|
5592
|
-
|
|
5593
|
-
/* @__PURE__ */ (0,
|
|
5594
|
-
/* @__PURE__ */ (0,
|
|
5957
|
+
React13.cloneElement(icon, { className: "mr-1.5 size-3.5" }),
|
|
5958
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { children: label }),
|
|
5959
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_lucide_react4.X, { className: "ml-0 h-3.5 w-0 shrink-0 overflow-hidden opacity-0 transition-[width,margin,opacity] duration-200 group-hover/indicator:ml-1 group-hover/indicator:w-3.5 group-hover/indicator:opacity-100 group-focus-visible/indicator:ml-1 group-focus-visible/indicator:w-3.5 group-focus-visible/indicator:opacity-100" })
|
|
5595
5960
|
]
|
|
5596
5961
|
}
|
|
5597
5962
|
);
|
|
5598
5963
|
}
|
|
5599
5964
|
|
|
5600
5965
|
// src/components/composer/ModelPicker.tsx
|
|
5601
|
-
var
|
|
5966
|
+
var React14 = __toESM(require("react"), 1);
|
|
5602
5967
|
var import_lucide_react5 = require("lucide-react");
|
|
5603
|
-
var
|
|
5968
|
+
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
5604
5969
|
function ModelProviderAvatar({
|
|
5605
5970
|
avatar,
|
|
5606
5971
|
className,
|
|
5607
5972
|
imageClassName,
|
|
5608
5973
|
iconClassName
|
|
5609
5974
|
}) {
|
|
5610
|
-
const [failedUrl, setFailedUrl] =
|
|
5975
|
+
const [failedUrl, setFailedUrl] = React14.useState(null);
|
|
5611
5976
|
const avatarUrl = avatar?.url;
|
|
5612
5977
|
const showImage = Boolean(avatarUrl && failedUrl !== avatarUrl);
|
|
5613
|
-
return /* @__PURE__ */ (0,
|
|
5978
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
5614
5979
|
"span",
|
|
5615
5980
|
{
|
|
5616
5981
|
"aria-hidden": "true",
|
|
@@ -5620,7 +5985,7 @@ function ModelProviderAvatar({
|
|
|
5620
5985
|
className
|
|
5621
5986
|
),
|
|
5622
5987
|
style: avatar?.background ? { backgroundColor: avatar.background } : void 0,
|
|
5623
|
-
children: showImage ? /* @__PURE__ */ (0,
|
|
5988
|
+
children: showImage ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
5624
5989
|
"img",
|
|
5625
5990
|
{
|
|
5626
5991
|
"data-slot": "model-provider-avatar-image",
|
|
@@ -5629,7 +5994,7 @@ function ModelProviderAvatar({
|
|
|
5629
5994
|
className: cn("size-full object-contain p-1", imageClassName),
|
|
5630
5995
|
onError: () => setFailedUrl(avatarUrl ?? null)
|
|
5631
5996
|
}
|
|
5632
|
-
) : /* @__PURE__ */ (0,
|
|
5997
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_lucide_react5.Bot, { "aria-hidden": "true", className: cn("size-3.5", iconClassName) })
|
|
5633
5998
|
}
|
|
5634
5999
|
);
|
|
5635
6000
|
}
|
|
@@ -5645,8 +6010,8 @@ function ModelPicker({
|
|
|
5645
6010
|
const selectedModel = enabledModels.find(
|
|
5646
6011
|
(model) => model.id === selectedModelId
|
|
5647
6012
|
);
|
|
5648
|
-
return /* @__PURE__ */ (0,
|
|
5649
|
-
/* @__PURE__ */ (0,
|
|
6013
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(DropdownMenu, { children: [
|
|
6014
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
|
|
5650
6015
|
"button",
|
|
5651
6016
|
{
|
|
5652
6017
|
type: "button",
|
|
@@ -5660,7 +6025,7 @@ function ModelPicker({
|
|
|
5660
6025
|
"disabled:pointer-events-none disabled:opacity-50"
|
|
5661
6026
|
),
|
|
5662
6027
|
children: [
|
|
5663
|
-
/* @__PURE__ */ (0,
|
|
6028
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
5664
6029
|
ModelProviderAvatar,
|
|
5665
6030
|
{
|
|
5666
6031
|
avatar: selectedModel?.avatar,
|
|
@@ -5669,8 +6034,8 @@ function ModelPicker({
|
|
|
5669
6034
|
iconClassName: "size-3"
|
|
5670
6035
|
}
|
|
5671
6036
|
),
|
|
5672
|
-
/* @__PURE__ */ (0,
|
|
5673
|
-
/* @__PURE__ */ (0,
|
|
6037
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "truncate", children: selectedModel?.label ?? copy.label }),
|
|
6038
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
5674
6039
|
import_lucide_react5.ChevronDown,
|
|
5675
6040
|
{
|
|
5676
6041
|
"aria-hidden": "true",
|
|
@@ -5680,7 +6045,7 @@ function ModelPicker({
|
|
|
5680
6045
|
]
|
|
5681
6046
|
}
|
|
5682
6047
|
) }),
|
|
5683
|
-
/* @__PURE__ */ (0,
|
|
6048
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
|
|
5684
6049
|
DropdownMenuContent,
|
|
5685
6050
|
{
|
|
5686
6051
|
align: "end",
|
|
@@ -5689,8 +6054,8 @@ function ModelPicker({
|
|
|
5689
6054
|
collisionPadding: 12,
|
|
5690
6055
|
className: "w-80 max-w-[calc(100vw-1.5rem)] overflow-hidden rounded-xl p-0",
|
|
5691
6056
|
children: [
|
|
5692
|
-
/* @__PURE__ */ (0,
|
|
5693
|
-
/* @__PURE__ */ (0,
|
|
6057
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "flex items-start gap-3 px-3 py-3", children: [
|
|
6058
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
5694
6059
|
ModelProviderAvatar,
|
|
5695
6060
|
{
|
|
5696
6061
|
avatar: selectedModel?.avatar,
|
|
@@ -5698,34 +6063,34 @@ function ModelPicker({
|
|
|
5698
6063
|
iconClassName: "size-4"
|
|
5699
6064
|
}
|
|
5700
6065
|
),
|
|
5701
|
-
/* @__PURE__ */ (0,
|
|
5702
|
-
/* @__PURE__ */ (0,
|
|
5703
|
-
/* @__PURE__ */ (0,
|
|
6066
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("span", { className: "min-w-0 flex-1", children: [
|
|
6067
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "block text-sm font-semibold text-popover-foreground", children: copy.title }),
|
|
6068
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "mt-0.5 block text-xs leading-4 text-muted-foreground", children: copy.description })
|
|
5704
6069
|
] })
|
|
5705
6070
|
] }),
|
|
5706
|
-
/* @__PURE__ */ (0,
|
|
5707
|
-
/* @__PURE__ */ (0,
|
|
5708
|
-
/* @__PURE__ */ (0,
|
|
6071
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(DropdownMenuSeparator, { className: "mx-0 my-0" }),
|
|
6072
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(DropdownMenuLabel, { className: "px-3 pt-2.5 pb-1 text-[11px] font-semibold tracking-wide uppercase", children: copy.availableModels }),
|
|
6073
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
5709
6074
|
DropdownMenuRadioGroup,
|
|
5710
6075
|
{
|
|
5711
6076
|
value: selectedModel?.id ?? "",
|
|
5712
6077
|
onValueChange: onSelect,
|
|
5713
6078
|
className: "space-y-0.5 px-1.5 pb-1.5",
|
|
5714
|
-
children: models.map((model) => /* @__PURE__ */ (0,
|
|
6079
|
+
children: models.map((model) => /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
|
|
5715
6080
|
DropdownMenuRadioItem,
|
|
5716
6081
|
{
|
|
5717
6082
|
value: model.id,
|
|
5718
6083
|
disabled: model.disabled,
|
|
5719
6084
|
className: "min-h-12 cursor-pointer items-center gap-2.5 rounded-lg px-2 py-2 pr-9 data-disabled:cursor-not-allowed",
|
|
5720
6085
|
children: [
|
|
5721
|
-
/* @__PURE__ */ (0,
|
|
5722
|
-
/* @__PURE__ */ (0,
|
|
5723
|
-
/* @__PURE__ */ (0,
|
|
5724
|
-
/* @__PURE__ */ (0,
|
|
5725
|
-
model.default ? /* @__PURE__ */ (0,
|
|
5726
|
-
model.disabled ? /* @__PURE__ */ (0,
|
|
6086
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(ModelProviderAvatar, { avatar: model.avatar, className: "size-7" }),
|
|
6087
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("span", { className: "min-w-0 flex-1", children: [
|
|
6088
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("span", { className: "flex min-w-0 items-center gap-1.5", children: [
|
|
6089
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "truncate font-medium text-popover-foreground", children: model.label }),
|
|
6090
|
+
model.default ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "shrink-0 rounded-full bg-primary/10 px-1.5 py-0.5 text-[10px] font-medium text-primary", children: copy.defaultBadge }) : null,
|
|
6091
|
+
model.disabled ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "shrink-0 rounded-full bg-muted px-1.5 py-0.5 text-[10px] font-medium text-muted-foreground", children: copy.unavailableBadge }) : null
|
|
5727
6092
|
] }),
|
|
5728
|
-
model.description ? /* @__PURE__ */ (0,
|
|
6093
|
+
model.description ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "mt-0.5 block truncate text-xs text-muted-foreground", children: model.description }) : null
|
|
5729
6094
|
] })
|
|
5730
6095
|
]
|
|
5731
6096
|
},
|
|
@@ -5733,26 +6098,26 @@ function ModelPicker({
|
|
|
5733
6098
|
))
|
|
5734
6099
|
}
|
|
5735
6100
|
),
|
|
5736
|
-
/* @__PURE__ */ (0,
|
|
5737
|
-
/* @__PURE__ */ (0,
|
|
6101
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(DropdownMenuSeparator, { className: "mx-0 my-0" }),
|
|
6102
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
|
|
5738
6103
|
"div",
|
|
5739
6104
|
{
|
|
5740
6105
|
"data-slot": "model-picker-future-controls",
|
|
5741
6106
|
className: "flex items-center gap-2.5 bg-muted/30 px-3 py-2.5",
|
|
5742
6107
|
"aria-disabled": "true",
|
|
5743
6108
|
children: [
|
|
5744
|
-
/* @__PURE__ */ (0,
|
|
6109
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
5745
6110
|
import_lucide_react5.SlidersHorizontal,
|
|
5746
6111
|
{
|
|
5747
6112
|
"aria-hidden": "true",
|
|
5748
6113
|
className: "size-4 shrink-0 text-muted-foreground"
|
|
5749
6114
|
}
|
|
5750
6115
|
),
|
|
5751
|
-
/* @__PURE__ */ (0,
|
|
5752
|
-
/* @__PURE__ */ (0,
|
|
5753
|
-
/* @__PURE__ */ (0,
|
|
6116
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("span", { className: "min-w-0 flex-1", children: [
|
|
6117
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "block text-xs font-medium text-popover-foreground", children: copy.futureTitle }),
|
|
6118
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "block truncate text-[11px] text-muted-foreground", children: copy.futureDescription })
|
|
5754
6119
|
] }),
|
|
5755
|
-
/* @__PURE__ */ (0,
|
|
6120
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "shrink-0 rounded-full border border-border px-1.5 py-0.5 text-[10px] font-medium text-muted-foreground", children: copy.futureBadge })
|
|
5756
6121
|
]
|
|
5757
6122
|
}
|
|
5758
6123
|
)
|
|
@@ -5763,9 +6128,9 @@ function ModelPicker({
|
|
|
5763
6128
|
}
|
|
5764
6129
|
|
|
5765
6130
|
// src/components/composer/WorkspaceFileMentionPalette.tsx
|
|
5766
|
-
var
|
|
6131
|
+
var React15 = __toESM(require("react"), 1);
|
|
5767
6132
|
var import_lucide_react6 = require("lucide-react");
|
|
5768
|
-
var
|
|
6133
|
+
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
5769
6134
|
var WORKSPACE_FILE_LIST_DEPTH = 12;
|
|
5770
6135
|
function getWorkspaceFilePath(file) {
|
|
5771
6136
|
return file.fullPath?.trim() || file.filePath.trim();
|
|
@@ -5777,7 +6142,7 @@ function flattenWorkspaceFiles(files) {
|
|
|
5777
6142
|
return [...isDirectory ? [] : [file], ...flattenWorkspaceFiles(children)];
|
|
5778
6143
|
});
|
|
5779
6144
|
}
|
|
5780
|
-
var WorkspaceFileMentionPalette =
|
|
6145
|
+
var WorkspaceFileMentionPalette = React15.forwardRef(function WorkspaceFileMentionPalette2({
|
|
5781
6146
|
client,
|
|
5782
6147
|
assistantId,
|
|
5783
6148
|
projectId,
|
|
@@ -5787,14 +6152,14 @@ var WorkspaceFileMentionPalette = React14.forwardRef(function WorkspaceFileMenti
|
|
|
5787
6152
|
className
|
|
5788
6153
|
}, ref) {
|
|
5789
6154
|
const { t } = useChatkitTranslation();
|
|
5790
|
-
const [files, setFiles] =
|
|
5791
|
-
const [loading, setLoading] =
|
|
5792
|
-
const [error, setError] =
|
|
5793
|
-
const [activeIndex, setActiveIndex] =
|
|
5794
|
-
const activeIndexRef =
|
|
5795
|
-
const optionRefs =
|
|
6155
|
+
const [files, setFiles] = React15.useState([]);
|
|
6156
|
+
const [loading, setLoading] = React15.useState(false);
|
|
6157
|
+
const [error, setError] = React15.useState(null);
|
|
6158
|
+
const [activeIndex, setActiveIndex] = React15.useState(0);
|
|
6159
|
+
const activeIndexRef = React15.useRef(0);
|
|
6160
|
+
const optionRefs = React15.useRef([]);
|
|
5796
6161
|
const loadErrorMessage = t("composer.fileMentions.loadError");
|
|
5797
|
-
|
|
6162
|
+
React15.useEffect(() => {
|
|
5798
6163
|
if (!client || !projectId && !assistantId) {
|
|
5799
6164
|
setFiles([]);
|
|
5800
6165
|
setLoading(false);
|
|
@@ -5826,7 +6191,7 @@ var WorkspaceFileMentionPalette = React14.forwardRef(function WorkspaceFileMenti
|
|
|
5826
6191
|
return () => controller.abort();
|
|
5827
6192
|
}, [assistantId, client, loadErrorMessage, projectId]);
|
|
5828
6193
|
const normalizedQuery = query.trim().toLocaleLowerCase();
|
|
5829
|
-
const visibleFiles =
|
|
6194
|
+
const visibleFiles = React15.useMemo(
|
|
5830
6195
|
() => files.filter((file) => {
|
|
5831
6196
|
const filePath = getWorkspaceFilePath(file);
|
|
5832
6197
|
if (selectedFilePaths.has(filePath)) return false;
|
|
@@ -5835,17 +6200,17 @@ var WorkspaceFileMentionPalette = React14.forwardRef(function WorkspaceFileMenti
|
|
|
5835
6200
|
}),
|
|
5836
6201
|
[files, normalizedQuery, selectedFilePaths]
|
|
5837
6202
|
);
|
|
5838
|
-
|
|
6203
|
+
React15.useLayoutEffect(() => {
|
|
5839
6204
|
setActiveIndex((current) => {
|
|
5840
6205
|
const nextIndex = visibleFiles.length === 0 ? 0 : Math.min(current, visibleFiles.length - 1);
|
|
5841
6206
|
activeIndexRef.current = nextIndex;
|
|
5842
6207
|
return nextIndex;
|
|
5843
6208
|
});
|
|
5844
6209
|
}, [visibleFiles.length]);
|
|
5845
|
-
|
|
6210
|
+
React15.useEffect(() => {
|
|
5846
6211
|
optionRefs.current[activeIndex]?.scrollIntoView?.({ block: "nearest" });
|
|
5847
6212
|
}, [activeIndex]);
|
|
5848
|
-
|
|
6213
|
+
React15.useImperativeHandle(
|
|
5849
6214
|
ref,
|
|
5850
6215
|
() => ({
|
|
5851
6216
|
moveActive: (direction) => {
|
|
@@ -5864,7 +6229,7 @@ var WorkspaceFileMentionPalette = React14.forwardRef(function WorkspaceFileMenti
|
|
|
5864
6229
|
[onSelect, visibleFiles]
|
|
5865
6230
|
);
|
|
5866
6231
|
const unavailable = !client || !projectId && !assistantId;
|
|
5867
|
-
return /* @__PURE__ */ (0,
|
|
6232
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
5868
6233
|
"div",
|
|
5869
6234
|
{
|
|
5870
6235
|
"data-slot": "workspace-file-mention-palette",
|
|
@@ -5873,20 +6238,20 @@ var WorkspaceFileMentionPalette = React14.forwardRef(function WorkspaceFileMenti
|
|
|
5873
6238
|
className
|
|
5874
6239
|
),
|
|
5875
6240
|
children: [
|
|
5876
|
-
/* @__PURE__ */ (0,
|
|
6241
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "border-b border-border px-3 py-2 text-xs font-medium text-muted-foreground", children: [
|
|
5877
6242
|
t("composer.fileMentions.title"),
|
|
5878
|
-
query ? /* @__PURE__ */ (0,
|
|
6243
|
+
query ? /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("span", { className: "ml-1 text-foreground", children: [
|
|
5879
6244
|
"@",
|
|
5880
6245
|
query
|
|
5881
6246
|
] }) : null
|
|
5882
6247
|
] }),
|
|
5883
|
-
/* @__PURE__ */ (0,
|
|
5884
|
-
/* @__PURE__ */ (0,
|
|
6248
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "max-h-56 overflow-y-auto p-1", children: unavailable ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(PaletteMessage, { children: t("composer.fileMentions.unavailable") }) : loading ? /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(PaletteMessage, { children: [
|
|
6249
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_lucide_react6.Loader2, { className: "size-4 animate-spin" }),
|
|
5885
6250
|
t("composer.fileMentions.loading")
|
|
5886
|
-
] }) : error ? /* @__PURE__ */ (0,
|
|
6251
|
+
] }) : error ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(PaletteMessage, { role: "alert", children: error }) : visibleFiles.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(PaletteMessage, { children: t("composer.fileMentions.empty") }) : visibleFiles.map((file, index) => {
|
|
5887
6252
|
const filePath = getWorkspaceFilePath(file);
|
|
5888
6253
|
const label = file.filePath || filePath;
|
|
5889
|
-
return /* @__PURE__ */ (0,
|
|
6254
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
5890
6255
|
"button",
|
|
5891
6256
|
{
|
|
5892
6257
|
ref: (node) => {
|
|
@@ -5907,10 +6272,10 @@ var WorkspaceFileMentionPalette = React14.forwardRef(function WorkspaceFileMenti
|
|
|
5907
6272
|
index === activeIndex && "bg-muted"
|
|
5908
6273
|
),
|
|
5909
6274
|
children: [
|
|
5910
|
-
/* @__PURE__ */ (0,
|
|
5911
|
-
/* @__PURE__ */ (0,
|
|
5912
|
-
/* @__PURE__ */ (0,
|
|
5913
|
-
filePath || file.mimeType ? /* @__PURE__ */ (0,
|
|
6275
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "flex size-8 shrink-0 items-center justify-center rounded-md bg-background text-muted-foreground", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_lucide_react6.FileText, { className: "size-4" }) }),
|
|
6276
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("span", { className: "min-w-0 flex-1", children: [
|
|
6277
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "block truncate font-medium", children: label }),
|
|
6278
|
+
filePath || file.mimeType ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "block truncate text-xs text-muted-foreground", children: filePath || file.mimeType }) : null
|
|
5914
6279
|
] })
|
|
5915
6280
|
]
|
|
5916
6281
|
},
|
|
@@ -5925,7 +6290,7 @@ function PaletteMessage({
|
|
|
5925
6290
|
children,
|
|
5926
6291
|
role
|
|
5927
6292
|
}) {
|
|
5928
|
-
return /* @__PURE__ */ (0,
|
|
6293
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
5929
6294
|
"div",
|
|
5930
6295
|
{
|
|
5931
6296
|
role,
|
|
@@ -5936,22 +6301,22 @@ function PaletteMessage({
|
|
|
5936
6301
|
}
|
|
5937
6302
|
|
|
5938
6303
|
// src/components/composer/ProjectSelector.tsx
|
|
5939
|
-
var
|
|
6304
|
+
var React17 = __toESM(require("react"), 1);
|
|
5940
6305
|
var import_lucide_react7 = require("lucide-react");
|
|
5941
6306
|
|
|
5942
6307
|
// src/components/ui/popover.tsx
|
|
5943
|
-
var
|
|
6308
|
+
var React16 = require("react");
|
|
5944
6309
|
var PopoverPrimitive = __toESM(require("@radix-ui/react-popover"), 1);
|
|
5945
|
-
var
|
|
6310
|
+
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
5946
6311
|
function Popover({
|
|
5947
6312
|
...props
|
|
5948
6313
|
}) {
|
|
5949
|
-
return /* @__PURE__ */ (0,
|
|
6314
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(PopoverPrimitive.Root, { "data-slot": "popover", ...props });
|
|
5950
6315
|
}
|
|
5951
6316
|
function PopoverTrigger({
|
|
5952
6317
|
...props
|
|
5953
6318
|
}) {
|
|
5954
|
-
return /* @__PURE__ */ (0,
|
|
6319
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(PopoverPrimitive.Trigger, { "data-slot": "popover-trigger", ...props });
|
|
5955
6320
|
}
|
|
5956
6321
|
function PopoverContent({
|
|
5957
6322
|
className,
|
|
@@ -5959,7 +6324,7 @@ function PopoverContent({
|
|
|
5959
6324
|
sideOffset = 4,
|
|
5960
6325
|
...props
|
|
5961
6326
|
}) {
|
|
5962
|
-
return /* @__PURE__ */ (0,
|
|
6327
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(PopoverPrimitive.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
5963
6328
|
PopoverPrimitive.Content,
|
|
5964
6329
|
{
|
|
5965
6330
|
"data-slot": "popover-content",
|
|
@@ -5975,7 +6340,7 @@ function PopoverContent({
|
|
|
5975
6340
|
}
|
|
5976
6341
|
|
|
5977
6342
|
// src/components/composer/ProjectSelector.tsx
|
|
5978
|
-
var
|
|
6343
|
+
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
5979
6344
|
var PROJECT_PAGE_SIZE = 100;
|
|
5980
6345
|
async function listAllAvailableProjects(projectsClient, xpertId, signal) {
|
|
5981
6346
|
const projects = [];
|
|
@@ -6009,20 +6374,20 @@ function ProjectSelector({
|
|
|
6009
6374
|
}) {
|
|
6010
6375
|
const { t } = useChatkitTranslation();
|
|
6011
6376
|
const { theme } = useTheme();
|
|
6012
|
-
const [open, setOpen] =
|
|
6013
|
-
const [query, setQuery] =
|
|
6014
|
-
const [createMode, setCreateMode] =
|
|
6015
|
-
const [newProjectName, setNewProjectName] =
|
|
6016
|
-
const [projects, setProjects] =
|
|
6017
|
-
const [loadFailed, setLoadFailed] =
|
|
6018
|
-
const [loadedFor, setLoadedFor] =
|
|
6377
|
+
const [open, setOpen] = React17.useState(false);
|
|
6378
|
+
const [query, setQuery] = React17.useState("");
|
|
6379
|
+
const [createMode, setCreateMode] = React17.useState(false);
|
|
6380
|
+
const [newProjectName, setNewProjectName] = React17.useState("");
|
|
6381
|
+
const [projects, setProjects] = React17.useState([]);
|
|
6382
|
+
const [loadFailed, setLoadFailed] = React17.useState(false);
|
|
6383
|
+
const [loadedFor, setLoadedFor] = React17.useState(null);
|
|
6019
6384
|
const panelRoundedClass = getPanelRoundedClass(theme.radius);
|
|
6020
6385
|
const menuItemRoundedClass = getMenuItemRoundedClass(theme.radius);
|
|
6021
6386
|
const lockedProjectLabel = label?.trim();
|
|
6022
|
-
|
|
6387
|
+
React17.useEffect(() => {
|
|
6023
6388
|
if (disabled) setOpen(false);
|
|
6024
6389
|
}, [disabled]);
|
|
6025
|
-
|
|
6390
|
+
React17.useEffect(() => {
|
|
6026
6391
|
if (locked) {
|
|
6027
6392
|
setProjects([]);
|
|
6028
6393
|
setLoadFailed(false);
|
|
@@ -6062,12 +6427,12 @@ function ProjectSelector({
|
|
|
6062
6427
|
});
|
|
6063
6428
|
return () => controller.abort();
|
|
6064
6429
|
}, [client, locked, xpertId]);
|
|
6065
|
-
const activeProject =
|
|
6430
|
+
const activeProject = React17.useMemo(
|
|
6066
6431
|
() => projects.find((project) => project.id === activeProjectId) ?? null,
|
|
6067
6432
|
[activeProjectId, projects]
|
|
6068
6433
|
);
|
|
6069
6434
|
const normalizedQuery = query.trim().toLocaleLowerCase();
|
|
6070
|
-
const filteredProjects =
|
|
6435
|
+
const filteredProjects = React17.useMemo(
|
|
6071
6436
|
() => projects.filter((project) => {
|
|
6072
6437
|
if (!normalizedQuery) return true;
|
|
6073
6438
|
return project.name.toLocaleLowerCase().includes(normalizedQuery);
|
|
@@ -6077,24 +6442,24 @@ function ProjectSelector({
|
|
|
6077
6442
|
const hasAvailableProjects = locked ? Boolean(activeProjectId) : loadedFor?.client === client && loadedFor.xpertId === xpertId && !loadFailed && projects.length > 0;
|
|
6078
6443
|
const projectRailAvailable = hasAvailableProjects || Boolean(onProjectCreate);
|
|
6079
6444
|
const isLoadingProjects = !locked && Boolean(client && xpertId) && loadedFor === null && !loadFailed;
|
|
6080
|
-
|
|
6445
|
+
React17.useEffect(() => {
|
|
6081
6446
|
onAvailabilityChange?.(projectRailAvailable);
|
|
6082
6447
|
}, [onAvailabilityChange, projectRailAvailable]);
|
|
6083
6448
|
if (locked && activeProjectId) {
|
|
6084
|
-
return /* @__PURE__ */ (0,
|
|
6449
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
6085
6450
|
"div",
|
|
6086
6451
|
{
|
|
6087
6452
|
"data-slot": "composer-project-rail",
|
|
6088
6453
|
className: "flex h-10 min-w-0 items-center px-1",
|
|
6089
|
-
children: /* @__PURE__ */ (0,
|
|
6454
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
6090
6455
|
"div",
|
|
6091
6456
|
{
|
|
6092
6457
|
"data-slot": "composer-project-locked",
|
|
6093
6458
|
className: "inline-flex h-5 max-w-full items-center gap-1.5 rounded-sm px-2 text-sm text-muted-foreground",
|
|
6094
6459
|
title: lockedProjectLabel || activeProjectId,
|
|
6095
6460
|
children: [
|
|
6096
|
-
/* @__PURE__ */ (0,
|
|
6097
|
-
/* @__PURE__ */ (0,
|
|
6461
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lucide_react7.FolderLock, { className: "size-3.5 shrink-0" }),
|
|
6462
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "truncate", children: lockedProjectLabel || activeProjectId })
|
|
6098
6463
|
]
|
|
6099
6464
|
}
|
|
6100
6465
|
)
|
|
@@ -6102,12 +6467,12 @@ function ProjectSelector({
|
|
|
6102
6467
|
);
|
|
6103
6468
|
}
|
|
6104
6469
|
if (!projectRailAvailable) return null;
|
|
6105
|
-
return /* @__PURE__ */ (0,
|
|
6470
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
6106
6471
|
"div",
|
|
6107
6472
|
{
|
|
6108
6473
|
"data-slot": "composer-project-rail",
|
|
6109
6474
|
className: "flex h-10 min-w-0 items-center px-1",
|
|
6110
|
-
children: /* @__PURE__ */ (0,
|
|
6475
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
6111
6476
|
Popover,
|
|
6112
6477
|
{
|
|
6113
6478
|
open,
|
|
@@ -6120,7 +6485,7 @@ function ProjectSelector({
|
|
|
6120
6485
|
}
|
|
6121
6486
|
},
|
|
6122
6487
|
children: [
|
|
6123
|
-
/* @__PURE__ */ (0,
|
|
6488
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
6124
6489
|
"button",
|
|
6125
6490
|
{
|
|
6126
6491
|
type: "button",
|
|
@@ -6128,13 +6493,13 @@ function ProjectSelector({
|
|
|
6128
6493
|
className: "inline-flex h-5 max-w-full items-center gap-1.5 rounded-sm px-2 text-sm text-muted-foreground outline-none transition-colors hover:bg-accent hover:text-accent-foreground focus-visible:ring-2 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",
|
|
6129
6494
|
"aria-label": t("composer.projects.select"),
|
|
6130
6495
|
children: [
|
|
6131
|
-
/* @__PURE__ */ (0,
|
|
6132
|
-
/* @__PURE__ */ (0,
|
|
6133
|
-
/* @__PURE__ */ (0,
|
|
6496
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lucide_react7.Folder, { className: "size-3.5 shrink-0" }),
|
|
6497
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "truncate", children: activeProject?.name ?? t("composer.projects.select") }),
|
|
6498
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lucide_react7.ChevronDown, { className: "size-3.5 shrink-0" })
|
|
6134
6499
|
]
|
|
6135
6500
|
}
|
|
6136
6501
|
) }),
|
|
6137
|
-
/* @__PURE__ */ (0,
|
|
6502
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
6138
6503
|
PopoverContent,
|
|
6139
6504
|
{
|
|
6140
6505
|
side: "top",
|
|
@@ -6142,15 +6507,15 @@ function ProjectSelector({
|
|
|
6142
6507
|
sideOffset: 8,
|
|
6143
6508
|
collisionPadding: 8,
|
|
6144
6509
|
className: cn(
|
|
6145
|
-
"w-64 max-w-[calc(100vw-1rem)] overflow-hidden border-0 bg-popover p-1 text-popover-foreground shadow-md ring-1 ring-foreground/10",
|
|
6510
|
+
"flex max-h-(--radix-popover-content-available-height) w-64 max-w-[calc(100vw-1rem)] overflow-hidden border-0 bg-popover p-1 text-popover-foreground shadow-md ring-1 ring-foreground/10",
|
|
6146
6511
|
panelRoundedClass
|
|
6147
6512
|
),
|
|
6148
|
-
children: /* @__PURE__ */ (0,
|
|
6513
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
6149
6514
|
"div",
|
|
6150
6515
|
{
|
|
6151
6516
|
"data-slot": "composer-project-command",
|
|
6152
|
-
className: "flex
|
|
6153
|
-
children: createMode ? /* @__PURE__ */ (0,
|
|
6517
|
+
className: "flex min-h-0 w-full flex-col overflow-hidden",
|
|
6518
|
+
children: createMode ? /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
6154
6519
|
"form",
|
|
6155
6520
|
{
|
|
6156
6521
|
"data-slot": "composer-project-create-form",
|
|
@@ -6163,7 +6528,7 @@ function ProjectSelector({
|
|
|
6163
6528
|
setOpen(false);
|
|
6164
6529
|
},
|
|
6165
6530
|
children: [
|
|
6166
|
-
/* @__PURE__ */ (0,
|
|
6531
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
6167
6532
|
Input,
|
|
6168
6533
|
{
|
|
6169
6534
|
autoFocus: true,
|
|
@@ -6178,8 +6543,8 @@ function ProjectSelector({
|
|
|
6178
6543
|
)
|
|
6179
6544
|
}
|
|
6180
6545
|
),
|
|
6181
|
-
/* @__PURE__ */ (0,
|
|
6182
|
-
/* @__PURE__ */ (0,
|
|
6546
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "flex justify-end gap-2", children: [
|
|
6547
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
6183
6548
|
"button",
|
|
6184
6549
|
{
|
|
6185
6550
|
type: "button",
|
|
@@ -6191,7 +6556,7 @@ function ProjectSelector({
|
|
|
6191
6556
|
children: t("composer.projects.cancel")
|
|
6192
6557
|
}
|
|
6193
6558
|
),
|
|
6194
|
-
/* @__PURE__ */ (0,
|
|
6559
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
6195
6560
|
"button",
|
|
6196
6561
|
{
|
|
6197
6562
|
type: "submit",
|
|
@@ -6203,15 +6568,15 @@ function ProjectSelector({
|
|
|
6203
6568
|
] })
|
|
6204
6569
|
]
|
|
6205
6570
|
}
|
|
6206
|
-
) : /* @__PURE__ */ (0,
|
|
6207
|
-
/* @__PURE__ */ (0,
|
|
6571
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_jsx_runtime19.Fragment, { children: [
|
|
6572
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
6208
6573
|
"div",
|
|
6209
6574
|
{
|
|
6210
6575
|
"data-slot": "composer-project-search",
|
|
6211
|
-
className: "relative mb-2",
|
|
6576
|
+
className: "relative mb-2 shrink-0",
|
|
6212
6577
|
children: [
|
|
6213
|
-
/* @__PURE__ */ (0,
|
|
6214
|
-
/* @__PURE__ */ (0,
|
|
6578
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lucide_react7.Search, { className: "pointer-events-none absolute left-3 top-1/2 z-10 size-4 -translate-y-1/2 text-muted-foreground" }),
|
|
6579
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
6215
6580
|
Input,
|
|
6216
6581
|
{
|
|
6217
6582
|
autoFocus: true,
|
|
@@ -6227,70 +6592,77 @@ function ProjectSelector({
|
|
|
6227
6592
|
]
|
|
6228
6593
|
}
|
|
6229
6594
|
),
|
|
6230
|
-
/* @__PURE__ */ (0,
|
|
6595
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
6231
6596
|
"div",
|
|
6232
6597
|
{
|
|
6233
|
-
"data-slot": "composer-project-
|
|
6234
|
-
className: "
|
|
6235
|
-
children:
|
|
6236
|
-
|
|
6237
|
-
|
|
6238
|
-
|
|
6239
|
-
|
|
6240
|
-
|
|
6241
|
-
|
|
6242
|
-
"
|
|
6243
|
-
|
|
6244
|
-
|
|
6245
|
-
|
|
6246
|
-
|
|
6247
|
-
|
|
6248
|
-
|
|
6249
|
-
|
|
6250
|
-
|
|
6251
|
-
|
|
6252
|
-
|
|
6253
|
-
|
|
6254
|
-
|
|
6255
|
-
|
|
6256
|
-
|
|
6257
|
-
|
|
6258
|
-
|
|
6259
|
-
type: "button",
|
|
6260
|
-
"data-slot": "composer-project-item",
|
|
6261
|
-
className: cn(
|
|
6262
|
-
"relative flex w-full cursor-default select-none items-center gap-3 px-1.5 py-1.5 text-left text-base outline-none hover:bg-accent hover:text-accent-foreground focus-visible:bg-accent focus-visible:text-accent-foreground",
|
|
6263
|
-
menuItemRoundedClass,
|
|
6264
|
-
project.id === activeProjectId && "bg-accent text-accent-foreground"
|
|
6265
|
-
),
|
|
6266
|
-
onClick: () => {
|
|
6267
|
-
if (disabled) return;
|
|
6268
|
-
if (project.id !== activeProjectId) {
|
|
6269
|
-
onProjectChange?.(project.id);
|
|
6598
|
+
"data-slot": "composer-project-scroll-region",
|
|
6599
|
+
className: "min-h-0 flex-1 max-h-75 overflow-y-auto overscroll-contain",
|
|
6600
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
6601
|
+
"div",
|
|
6602
|
+
{
|
|
6603
|
+
"data-slot": "composer-project-list",
|
|
6604
|
+
className: "flex flex-col",
|
|
6605
|
+
children: [
|
|
6606
|
+
activeProjectId && !normalizedQuery ? /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
6607
|
+
"button",
|
|
6608
|
+
{
|
|
6609
|
+
type: "button",
|
|
6610
|
+
"data-slot": "composer-project-clear",
|
|
6611
|
+
className: cn(
|
|
6612
|
+
"relative flex w-full cursor-default select-none items-center gap-3 px-1.5 py-1.5 text-left text-base outline-none hover:bg-accent hover:text-accent-foreground focus-visible:bg-accent focus-visible:text-accent-foreground",
|
|
6613
|
+
menuItemRoundedClass
|
|
6614
|
+
),
|
|
6615
|
+
onClick: () => {
|
|
6616
|
+
if (disabled) return;
|
|
6617
|
+
onProjectChange?.(null);
|
|
6618
|
+
setOpen(false);
|
|
6619
|
+
},
|
|
6620
|
+
children: [
|
|
6621
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lucide_react7.FolderX, { className: "size-5 shrink-0 text-muted-foreground" }),
|
|
6622
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "min-w-0 flex-1 truncate font-normal", children: t("composer.projects.none") })
|
|
6623
|
+
]
|
|
6270
6624
|
}
|
|
6271
|
-
|
|
6272
|
-
},
|
|
6273
|
-
|
|
6274
|
-
|
|
6275
|
-
|
|
6276
|
-
|
|
6277
|
-
|
|
6278
|
-
|
|
6279
|
-
|
|
6280
|
-
|
|
6281
|
-
|
|
6625
|
+
) : null,
|
|
6626
|
+
isLoadingProjects ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(ProjectMessage, { children: t("composer.projects.loading") }) : loadFailed ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(ProjectMessage, { children: t("composer.projects.loadError") }) : filteredProjects.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(ProjectMessage, { children: t("composer.projects.empty") }) : filteredProjects.map((project) => /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
6627
|
+
"button",
|
|
6628
|
+
{
|
|
6629
|
+
type: "button",
|
|
6630
|
+
"data-slot": "composer-project-item",
|
|
6631
|
+
className: cn(
|
|
6632
|
+
"relative flex w-full cursor-default select-none items-center gap-3 px-1.5 py-1.5 text-left text-base outline-none hover:bg-accent hover:text-accent-foreground focus-visible:bg-accent focus-visible:text-accent-foreground",
|
|
6633
|
+
menuItemRoundedClass,
|
|
6634
|
+
project.id === activeProjectId && "bg-accent text-accent-foreground"
|
|
6635
|
+
),
|
|
6636
|
+
onClick: () => {
|
|
6637
|
+
if (disabled) return;
|
|
6638
|
+
if (project.id !== activeProjectId) {
|
|
6639
|
+
onProjectChange?.(project.id);
|
|
6640
|
+
}
|
|
6641
|
+
setOpen(false);
|
|
6642
|
+
},
|
|
6643
|
+
children: [
|
|
6644
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lucide_react7.Folder, { className: "size-5 shrink-0 text-muted-foreground" }),
|
|
6645
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "min-w-0 flex-1 truncate font-normal", children: project.name }),
|
|
6646
|
+
project.id === activeProjectId ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lucide_react7.Check, { className: "size-4 shrink-0" }) : null
|
|
6647
|
+
]
|
|
6648
|
+
},
|
|
6649
|
+
project.id
|
|
6650
|
+
))
|
|
6651
|
+
]
|
|
6652
|
+
}
|
|
6653
|
+
)
|
|
6282
6654
|
}
|
|
6283
|
-
)
|
|
6284
|
-
onProjectCreate ? /* @__PURE__ */ (0,
|
|
6655
|
+
),
|
|
6656
|
+
onProjectCreate ? /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
6285
6657
|
"button",
|
|
6286
6658
|
{
|
|
6287
6659
|
type: "button",
|
|
6288
6660
|
"data-slot": "composer-project-create",
|
|
6289
|
-
className: "mt-1 flex w-full items-center gap-3 border-t border-border px-1.5 py-1.5 text-left text-sm font-normal outline-none hover:bg-accent hover:text-accent-foreground focus-visible:bg-accent focus-visible:text-accent-foreground",
|
|
6661
|
+
className: "mt-1 flex w-full shrink-0 items-center gap-3 border-t border-border px-1.5 py-1.5 text-left text-sm font-normal outline-none hover:bg-accent hover:text-accent-foreground focus-visible:bg-accent focus-visible:text-accent-foreground",
|
|
6290
6662
|
onClick: () => setCreateMode(true),
|
|
6291
6663
|
children: [
|
|
6292
|
-
/* @__PURE__ */ (0,
|
|
6293
|
-
/* @__PURE__ */ (0,
|
|
6664
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lucide_react7.Plus, { className: "size-4 shrink-0" }),
|
|
6665
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { children: t("composer.projects.new") })
|
|
6294
6666
|
]
|
|
6295
6667
|
}
|
|
6296
6668
|
) : null
|
|
@@ -6306,77 +6678,11 @@ function ProjectSelector({
|
|
|
6306
6678
|
);
|
|
6307
6679
|
}
|
|
6308
6680
|
function ProjectMessage({ children }) {
|
|
6309
|
-
return /* @__PURE__ */ (0,
|
|
6681
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "flex min-h-24 items-center justify-center px-4 text-center text-sm text-muted-foreground", children });
|
|
6310
6682
|
}
|
|
6311
6683
|
|
|
6312
6684
|
// src/components/composer/SendButton.tsx
|
|
6313
6685
|
var import_lucide_react8 = require("lucide-react");
|
|
6314
|
-
|
|
6315
|
-
// src/components/ui/tooltip.tsx
|
|
6316
|
-
var React17 = require("react");
|
|
6317
|
-
var TooltipPrimitive = __toESM(require("@radix-ui/react-tooltip"), 1);
|
|
6318
|
-
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
6319
|
-
function TooltipProvider({
|
|
6320
|
-
delayDuration = 0,
|
|
6321
|
-
...props
|
|
6322
|
-
}) {
|
|
6323
|
-
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
6324
|
-
TooltipPrimitive.Provider,
|
|
6325
|
-
{
|
|
6326
|
-
"data-slot": "tooltip-provider",
|
|
6327
|
-
delayDuration,
|
|
6328
|
-
...props
|
|
6329
|
-
}
|
|
6330
|
-
);
|
|
6331
|
-
}
|
|
6332
|
-
function Tooltip({
|
|
6333
|
-
...props
|
|
6334
|
-
}) {
|
|
6335
|
-
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(TooltipProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
6336
|
-
TooltipPrimitive.Root,
|
|
6337
|
-
{
|
|
6338
|
-
"data-slot": "tooltip",
|
|
6339
|
-
...props
|
|
6340
|
-
}
|
|
6341
|
-
) });
|
|
6342
|
-
}
|
|
6343
|
-
function TooltipTrigger({
|
|
6344
|
-
...props
|
|
6345
|
-
}) {
|
|
6346
|
-
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
6347
|
-
TooltipPrimitive.Trigger,
|
|
6348
|
-
{
|
|
6349
|
-
"data-slot": "tooltip-trigger",
|
|
6350
|
-
...props
|
|
6351
|
-
}
|
|
6352
|
-
);
|
|
6353
|
-
}
|
|
6354
|
-
function TooltipContent({
|
|
6355
|
-
className,
|
|
6356
|
-
sideOffset = 0,
|
|
6357
|
-
hideArrow = false,
|
|
6358
|
-
children,
|
|
6359
|
-
...props
|
|
6360
|
-
}) {
|
|
6361
|
-
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(TooltipPrimitive.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
6362
|
-
TooltipPrimitive.Content,
|
|
6363
|
-
{
|
|
6364
|
-
"data-slot": "tooltip-content",
|
|
6365
|
-
sideOffset,
|
|
6366
|
-
className: cn(
|
|
6367
|
-
"bg-primary text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit rounded-md px-3 py-1.5 text-xs text-balance",
|
|
6368
|
-
className
|
|
6369
|
-
),
|
|
6370
|
-
...props,
|
|
6371
|
-
children: [
|
|
6372
|
-
children,
|
|
6373
|
-
!hideArrow ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(TooltipPrimitive.Arrow, { className: "bg-primary fill-primary z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]" }) : null
|
|
6374
|
-
]
|
|
6375
|
-
}
|
|
6376
|
-
) });
|
|
6377
|
-
}
|
|
6378
|
-
|
|
6379
|
-
// src/components/composer/SendButton.tsx
|
|
6380
6686
|
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
6381
6687
|
function SendButton({
|
|
6382
6688
|
disabled = false,
|
|
@@ -20382,7 +20688,8 @@ function useTaskSummary({
|
|
|
20382
20688
|
enabled,
|
|
20383
20689
|
conversationId,
|
|
20384
20690
|
client,
|
|
20385
|
-
live
|
|
20691
|
+
live,
|
|
20692
|
+
refreshVersion = 0
|
|
20386
20693
|
}) {
|
|
20387
20694
|
const [loaded, setLoaded] = React59.useState(null);
|
|
20388
20695
|
const [historySections, setHistorySections] = React59.useState({});
|
|
@@ -20427,7 +20734,14 @@ function useTaskSummary({
|
|
|
20427
20734
|
abortSectionRequests();
|
|
20428
20735
|
requestVersionRef.current += 1;
|
|
20429
20736
|
};
|
|
20430
|
-
}, [
|
|
20737
|
+
}, [
|
|
20738
|
+
abortSectionRequests,
|
|
20739
|
+
client,
|
|
20740
|
+
conversationId,
|
|
20741
|
+
enabled,
|
|
20742
|
+
refreshVersion,
|
|
20743
|
+
retryVersion
|
|
20744
|
+
]);
|
|
20431
20745
|
const snapshot = loaded?.conversationId === conversationId ? loaded.snapshot : null;
|
|
20432
20746
|
const activeHistorySections = React59.useMemo(
|
|
20433
20747
|
() => historySectionsConversationId === conversationId ? historySections : {},
|
|
@@ -20469,13 +20783,7 @@ function useTaskSummary({
|
|
|
20469
20783
|
}
|
|
20470
20784
|
}
|
|
20471
20785
|
},
|
|
20472
|
-
[
|
|
20473
|
-
activeHistorySections,
|
|
20474
|
-
client,
|
|
20475
|
-
conversationId,
|
|
20476
|
-
enabled,
|
|
20477
|
-
loadingSections
|
|
20478
|
-
]
|
|
20786
|
+
[activeHistorySections, client, conversationId, enabled, loadingSections]
|
|
20479
20787
|
);
|
|
20480
20788
|
return {
|
|
20481
20789
|
summary: mergeTaskSummary(snapshot, live, activeHistorySections),
|
|
@@ -20580,6 +20888,7 @@ function TaskSummaryContent({
|
|
|
20580
20888
|
}) {
|
|
20581
20889
|
const { t } = useChatkitTranslation();
|
|
20582
20890
|
const [expanded, setExpanded] = React60.useState({});
|
|
20891
|
+
const [expandedLocal, setExpandedLocal] = React60.useState({});
|
|
20583
20892
|
const hasTask = Boolean(
|
|
20584
20893
|
summary.goal || summary.plan || summary.todos?.items.length
|
|
20585
20894
|
);
|
|
@@ -20594,6 +20903,12 @@ function TaskSummaryContent({
|
|
|
20594
20903
|
}
|
|
20595
20904
|
};
|
|
20596
20905
|
const sectionItems = (section, items) => expanded[section] ? items : items.slice(0, PREVIEW_SIZE);
|
|
20906
|
+
const localSectionItems = (section, items) => expandedLocal[section] ? items : items.slice(0, PREVIEW_SIZE);
|
|
20907
|
+
const localizedStatus = (status) => {
|
|
20908
|
+
if (!status) return void 0;
|
|
20909
|
+
const key = status.trim().toLowerCase().replace(/[\s-]+/g, "_");
|
|
20910
|
+
return t(`taskSummary.status.${key}`, { defaultValue: status });
|
|
20911
|
+
};
|
|
20597
20912
|
const openSummaryItem = (resource, messageId, title) => {
|
|
20598
20913
|
if (resource?.type === "message") {
|
|
20599
20914
|
onNavigateMessage(resource.messageId);
|
|
@@ -20626,6 +20941,25 @@ function TaskSummaryContent({
|
|
|
20626
20941
|
}
|
|
20627
20942
|
);
|
|
20628
20943
|
};
|
|
20944
|
+
const localSectionAction = (section, total2) => {
|
|
20945
|
+
if (total2 <= PREVIEW_SIZE) return null;
|
|
20946
|
+
const isExpanded = Boolean(expandedLocal[section]);
|
|
20947
|
+
return /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)(
|
|
20948
|
+
"button",
|
|
20949
|
+
{
|
|
20950
|
+
type: "button",
|
|
20951
|
+
className: "mt-1 flex w-full items-center gap-2 rounded-lg px-2 py-1.5 text-left text-sm text-muted-foreground transition-colors hover:bg-muted/60 hover:text-foreground",
|
|
20952
|
+
onClick: () => setExpandedLocal((state) => ({
|
|
20953
|
+
...state,
|
|
20954
|
+
[section]: !isExpanded
|
|
20955
|
+
})),
|
|
20956
|
+
children: [
|
|
20957
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsx)(import_lucide_react36.ListChecks, { className: "size-3.5" }),
|
|
20958
|
+
isExpanded ? t("taskSummary.collapse") : t("taskSummary.viewAll", { count: total2 })
|
|
20959
|
+
]
|
|
20960
|
+
}
|
|
20961
|
+
);
|
|
20962
|
+
};
|
|
20629
20963
|
return /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)("div", { className: "divide-y divide-border/70", children: [
|
|
20630
20964
|
Boolean(historyError) && /* @__PURE__ */ (0, import_jsx_runtime64.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: [
|
|
20631
20965
|
/* @__PURE__ */ (0, import_jsx_runtime64.jsx)("span", { children: t("taskSummary.historyError") }),
|
|
@@ -20642,52 +20976,41 @@ function TaskSummaryContent({
|
|
|
20642
20976
|
}
|
|
20643
20977
|
)
|
|
20644
20978
|
] }),
|
|
20645
|
-
/* @__PURE__ */ (0, import_jsx_runtime64.jsxs)(
|
|
20646
|
-
|
|
20647
|
-
|
|
20648
|
-
|
|
20649
|
-
|
|
20650
|
-
|
|
20651
|
-
|
|
20652
|
-
|
|
20653
|
-
|
|
20654
|
-
|
|
20655
|
-
|
|
20656
|
-
|
|
20657
|
-
|
|
20658
|
-
|
|
20659
|
-
|
|
20660
|
-
|
|
20661
|
-
|
|
20662
|
-
|
|
20663
|
-
|
|
20664
|
-
|
|
20665
|
-
|
|
20666
|
-
|
|
20667
|
-
|
|
20668
|
-
|
|
20669
|
-
|
|
20670
|
-
|
|
20671
|
-
|
|
20672
|
-
|
|
20673
|
-
|
|
20674
|
-
description: item.description,
|
|
20675
|
-
leading: /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(import_lucide_react36.BookOpen, { className: "size-4" }),
|
|
20676
|
-
trailing: item.resource && item.resource.type !== "message" ? /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(import_lucide_react36.ExternalLink, { className: "size-3.5" }) : void 0,
|
|
20677
|
-
onClick: () => openSummaryItem(item.resource, item.messageId, item.title)
|
|
20678
|
-
},
|
|
20679
|
-
item.id
|
|
20680
|
-
)),
|
|
20681
|
-
sectionAction("sources", summary.totals.sources)
|
|
20682
|
-
]
|
|
20683
|
-
}
|
|
20684
|
-
),
|
|
20979
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsxs)(SummarySection, { title: t("taskSummary.sections.outputs"), children: [
|
|
20980
|
+
summary.outputs.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(SummaryPrompt, { onClick: onFocusComposer, children: t("taskSummary.createOutput") }) : sectionItems("outputs", summary.outputs).map((item) => /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
|
|
20981
|
+
SummaryButton,
|
|
20982
|
+
{
|
|
20983
|
+
title: item.title,
|
|
20984
|
+
metadata: localizedStatus(item.status),
|
|
20985
|
+
description: item.description,
|
|
20986
|
+
leading: /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(import_lucide_react36.FileOutput, { className: "size-4" }),
|
|
20987
|
+
trailing: item.resource && item.resource.type !== "message" ? /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(import_lucide_react36.ExternalLink, { className: "size-3.5" }) : void 0,
|
|
20988
|
+
onClick: () => openSummaryItem(item.resource, item.messageId, item.title)
|
|
20989
|
+
},
|
|
20990
|
+
item.id
|
|
20991
|
+
)),
|
|
20992
|
+
sectionAction("outputs", summary.totals.outputs)
|
|
20993
|
+
] }),
|
|
20994
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsxs)(SummarySection, { title: t("taskSummary.sections.sources"), children: [
|
|
20995
|
+
sectionItems("sources", summary.sources).map((item) => /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
|
|
20996
|
+
SummaryButton,
|
|
20997
|
+
{
|
|
20998
|
+
title: item.title,
|
|
20999
|
+
description: item.description,
|
|
21000
|
+
leading: /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(import_lucide_react36.BookOpen, { className: "size-4" }),
|
|
21001
|
+
trailing: item.resource && item.resource.type !== "message" ? /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(import_lucide_react36.ExternalLink, { className: "size-3.5" }) : void 0,
|
|
21002
|
+
onClick: () => openSummaryItem(item.resource, item.messageId, item.title)
|
|
21003
|
+
},
|
|
21004
|
+
item.id
|
|
21005
|
+
)),
|
|
21006
|
+
sectionAction("sources", summary.totals.sources)
|
|
21007
|
+
] }),
|
|
20685
21008
|
hasTask && /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)(SummarySection, { title: t("taskSummary.sections.task"), children: [
|
|
20686
21009
|
summary.goal && /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
|
|
20687
21010
|
SummaryButton,
|
|
20688
21011
|
{
|
|
20689
21012
|
title: summary.goal.objective,
|
|
20690
|
-
|
|
21013
|
+
metadata: localizedStatus(summary.goal.status),
|
|
20691
21014
|
leading: /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(import_lucide_react36.Target, { className: "size-4" }),
|
|
20692
21015
|
onClick: onFocusComposer
|
|
20693
21016
|
}
|
|
@@ -20701,34 +21024,45 @@ function TaskSummaryContent({
|
|
|
20701
21024
|
onClick: () => summary.plan?.messageId ? onNavigateMessage(summary.plan.messageId) : onFocusComposer()
|
|
20702
21025
|
}
|
|
20703
21026
|
),
|
|
20704
|
-
(summary.todos?.items ?? []).
|
|
21027
|
+
localSectionItems("todos", summary.todos?.items ?? []).map(
|
|
21028
|
+
(todo) => /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
|
|
21029
|
+
SummaryButton,
|
|
21030
|
+
{
|
|
21031
|
+
title: todo.content,
|
|
21032
|
+
metadata: localizedStatus(todo.status),
|
|
21033
|
+
leading: todo.status === "completed" ? /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(import_lucide_react36.CheckCircle2, { className: "size-4 text-muted-foreground" }) : /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(import_lucide_react36.CircleEllipsis, { className: "size-4 text-muted-foreground" }),
|
|
21034
|
+
onClick: () => summary.todos?.messageId ? onNavigateMessage(summary.todos.messageId) : onFocusComposer()
|
|
21035
|
+
},
|
|
21036
|
+
todo.id
|
|
21037
|
+
)
|
|
21038
|
+
),
|
|
21039
|
+
localSectionAction("todos", summary.todos?.items.length ?? 0)
|
|
21040
|
+
] }),
|
|
21041
|
+
summary.running.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)(SummarySection, { title: t("taskSummary.sections.running"), children: [
|
|
21042
|
+
localSectionItems("running", summary.running).map((item) => /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
|
|
20705
21043
|
SummaryButton,
|
|
20706
21044
|
{
|
|
20707
|
-
title:
|
|
20708
|
-
|
|
20709
|
-
|
|
20710
|
-
|
|
21045
|
+
title: item.title,
|
|
21046
|
+
metadata: localizedStatus(item.status),
|
|
21047
|
+
description: item.description,
|
|
21048
|
+
leading: /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(import_lucide_react36.PlayCircle, { className: "size-4" }),
|
|
21049
|
+
trailing: item.resource ? /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(import_lucide_react36.ExternalLink, { className: "size-3.5" }) : void 0,
|
|
21050
|
+
onClick: () => item.resource && onOpenResource(item.resource, void 0, item.title)
|
|
20711
21051
|
},
|
|
20712
|
-
|
|
20713
|
-
))
|
|
21052
|
+
item.id
|
|
21053
|
+
)),
|
|
21054
|
+
localSectionAction("running", summary.running.length)
|
|
20714
21055
|
] }),
|
|
20715
|
-
summary.running.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(SummarySection, { title: t("taskSummary.sections.running"), children: summary.running.slice(0, PREVIEW_SIZE).map((item) => /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
|
|
20716
|
-
SummaryButton,
|
|
20717
|
-
{
|
|
20718
|
-
title: item.title,
|
|
20719
|
-
description: item.description ?? item.status,
|
|
20720
|
-
leading: /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(import_lucide_react36.PlayCircle, { className: "size-4" }),
|
|
20721
|
-
trailing: item.resource ? /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(import_lucide_react36.ExternalLink, { className: "size-3.5" }) : void 0,
|
|
20722
|
-
onClick: () => item.resource && onOpenResource(item.resource, void 0, item.title)
|
|
20723
|
-
},
|
|
20724
|
-
item.id
|
|
20725
|
-
)) }),
|
|
20726
21056
|
summary.agents.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)(SummarySection, { title: t("taskSummary.sections.agents"), children: [
|
|
20727
21057
|
sectionItems("agents", summary.agents).map((item) => /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
|
|
20728
21058
|
SummaryButton,
|
|
20729
21059
|
{
|
|
20730
21060
|
title: item.title,
|
|
20731
|
-
|
|
21061
|
+
metadata: [
|
|
21062
|
+
localizedStatus(item.status),
|
|
21063
|
+
formatElapsed(item.elapsedTime)
|
|
21064
|
+
].filter(Boolean).join(" \xB7 "),
|
|
21065
|
+
description: item.error,
|
|
20732
21066
|
leading: /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(import_lucide_react36.Bot, { className: "size-4" }),
|
|
20733
21067
|
onClick: () => item.messageId ? onNavigateMessage(item.messageId) : onFocusComposer()
|
|
20734
21068
|
},
|
|
@@ -20776,16 +21110,20 @@ function SummaryPrompt({
|
|
|
20776
21110
|
}
|
|
20777
21111
|
function SummaryButton({
|
|
20778
21112
|
title,
|
|
21113
|
+
metadata,
|
|
20779
21114
|
description,
|
|
20780
21115
|
leading,
|
|
20781
21116
|
trailing,
|
|
20782
21117
|
onClick
|
|
20783
21118
|
}) {
|
|
21119
|
+
const tooltipText = [title, metadata, description].filter(Boolean);
|
|
20784
21120
|
return /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)(
|
|
20785
21121
|
"button",
|
|
20786
21122
|
{
|
|
20787
21123
|
type: "button",
|
|
20788
|
-
|
|
21124
|
+
title: tooltipText.join("\n"),
|
|
21125
|
+
"aria-disabled": !onClick,
|
|
21126
|
+
tabIndex: onClick ? 0 : -1,
|
|
20789
21127
|
onClick,
|
|
20790
21128
|
className: cn(
|
|
20791
21129
|
"flex w-full min-w-0 items-start gap-2.5 rounded-lg px-2 py-1.5 text-left transition-colors",
|
|
@@ -20796,6 +21134,7 @@ function SummaryButton({
|
|
|
20796
21134
|
leading && /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("span", { className: "mt-0.5 shrink-0 text-muted-foreground", children: leading }),
|
|
20797
21135
|
/* @__PURE__ */ (0, import_jsx_runtime64.jsxs)("span", { className: "min-w-0 flex-1", children: [
|
|
20798
21136
|
/* @__PURE__ */ (0, import_jsx_runtime64.jsx)("span", { className: "block truncate text-sm font-medium leading-5 text-foreground", children: title }),
|
|
21137
|
+
metadata && /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("span", { className: "mt-0.5 block truncate text-xs text-muted-foreground", children: metadata }),
|
|
20799
21138
|
description && /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("span", { className: "mt-0.5 block line-clamp-2 text-xs text-muted-foreground", children: description })
|
|
20800
21139
|
] }),
|
|
20801
21140
|
trailing && /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("span", { className: "mt-0.5 text-muted-foreground", children: trailing })
|
|
@@ -21892,7 +22231,8 @@ function Chat({
|
|
|
21892
22231
|
enabled: taskSummaryEnabled,
|
|
21893
22232
|
conversationId: taskSummaryConversationId,
|
|
21894
22233
|
client: stream.client,
|
|
21895
|
-
live: liveTaskSummary
|
|
22234
|
+
live: liveTaskSummary,
|
|
22235
|
+
refreshVersion: stream.historyMessageLoadVersion
|
|
21896
22236
|
});
|
|
21897
22237
|
const navigateToTaskSummaryMessage = React61.useCallback(
|
|
21898
22238
|
async (messageId) => {
|
|
@@ -23657,22 +23997,6 @@ function Chat({
|
|
|
23657
23997
|
]
|
|
23658
23998
|
}
|
|
23659
23999
|
),
|
|
23660
|
-
!isAtBottom && messages.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("div", { className: "sticky bottom-20 z-20 flex justify-center px-4 pointer-events-none", children: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
|
23661
|
-
Button,
|
|
23662
|
-
{
|
|
23663
|
-
type: "button",
|
|
23664
|
-
size: "icon-sm",
|
|
23665
|
-
variant: hasUpdatesBelow ? "default" : "outline",
|
|
23666
|
-
className: cn(
|
|
23667
|
-
"pointer-events-auto rounded-full shadow-md dark:border-white/20 dark:ring-1 dark:ring-white/15 dark:shadow-[0_0_0_1px_rgba(255,255,255,0.06),0_10px_30px_rgba(0,0,0,0.45)]",
|
|
23668
|
-
hasUpdatesBelow && "animate-bounce"
|
|
23669
|
-
),
|
|
23670
|
-
onClick: () => scrollToBottom(true, true),
|
|
23671
|
-
"aria-label": t("chat.scrollToBottom"),
|
|
23672
|
-
title: t("chat.scrollToBottom"),
|
|
23673
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(import_lucide_react37.ArrowDown, { size: 16 })
|
|
23674
|
-
}
|
|
23675
|
-
) }),
|
|
23676
24000
|
quoteSelection && /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(
|
|
23677
24001
|
"div",
|
|
23678
24002
|
{
|
|
@@ -23730,11 +24054,34 @@ function Chat({
|
|
|
23730
24054
|
"data-slot": "chatkit-chat-composer",
|
|
23731
24055
|
"data-position": isInitialComposer ? "centered" : "bottom",
|
|
23732
24056
|
className: cn(
|
|
23733
|
-
"mx-auto w-full
|
|
24057
|
+
"mx-auto w-full max-w-2xl px-4 pb-4 pt-2 z-10 bg-background",
|
|
23734
24058
|
isInitialComposer ? "mb-auto" : "sticky bottom-0"
|
|
23735
24059
|
),
|
|
23736
24060
|
style: chatColumnStyle,
|
|
23737
24061
|
children: [
|
|
24062
|
+
!isAtBottom && messages.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
|
24063
|
+
"div",
|
|
24064
|
+
{
|
|
24065
|
+
"data-slot": "scroll-to-bottom",
|
|
24066
|
+
className: "pointer-events-none absolute left-1/2 top-0 z-20 flex -translate-x-1/2 -translate-y-full justify-center",
|
|
24067
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
|
24068
|
+
Button,
|
|
24069
|
+
{
|
|
24070
|
+
type: "button",
|
|
24071
|
+
size: "icon-sm",
|
|
24072
|
+
variant: hasUpdatesBelow ? "default" : "outline",
|
|
24073
|
+
className: cn(
|
|
24074
|
+
"pointer-events-auto rounded-full shadow-md dark:border-white/20 dark:ring-1 dark:ring-white/15 dark:shadow-[0_0_0_1px_rgba(255,255,255,0.06),0_10px_30px_rgba(0,0,0,0.45)]",
|
|
24075
|
+
hasUpdatesBelow && "animate-bounce"
|
|
24076
|
+
),
|
|
24077
|
+
onClick: () => scrollToBottom(true, true),
|
|
24078
|
+
"aria-label": t("chat.scrollToBottom"),
|
|
24079
|
+
title: t("chat.scrollToBottom"),
|
|
24080
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(import_lucide_react37.ArrowDown, { size: 16 })
|
|
24081
|
+
}
|
|
24082
|
+
)
|
|
24083
|
+
}
|
|
24084
|
+
),
|
|
23738
24085
|
threadErrorMessage && /* @__PURE__ */ (0, import_jsx_runtime65.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 }),
|
|
23739
24086
|
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
|
23740
24087
|
ChatAttachments,
|
|
@@ -24007,7 +24354,7 @@ function Chat({
|
|
|
24007
24354
|
{
|
|
24008
24355
|
"data-slot": "composer-editor-surface",
|
|
24009
24356
|
className: cn(
|
|
24010
|
-
"relative flex min-h-[
|
|
24357
|
+
"relative flex min-h-[6.5rem] min-w-0 bg-background px-2 pt-2 pb-14",
|
|
24011
24358
|
"rounded-composer-editor"
|
|
24012
24359
|
),
|
|
24013
24360
|
children: [
|
|
@@ -24028,7 +24375,7 @@ function Chat({
|
|
|
24028
24375
|
onKeyDown: handleComposerKeyDown,
|
|
24029
24376
|
"data-placeholder": inputPlaceholder,
|
|
24030
24377
|
className: cn(
|
|
24031
|
-
"min-h-
|
|
24378
|
+
"min-h-10 max-h-36 w-full overflow-y-auto whitespace-pre-wrap break-words bg-transparent px-2 py-2 text-base leading-6 text-foreground outline-none",
|
|
24032
24379
|
"empty:before:pointer-events-none empty:before:text-muted-foreground empty:before:content-[attr(data-placeholder)]",
|
|
24033
24380
|
(missingConfig || isHistoryLoading || hasPendingInteractiveRequest) && "cursor-not-allowed opacity-50"
|
|
24034
24381
|
),
|
|
@@ -24183,14 +24530,6 @@ function Chat({
|
|
|
24183
24530
|
),
|
|
24184
24531
|
children: disclaimer.text
|
|
24185
24532
|
}
|
|
24186
|
-
),
|
|
24187
|
-
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
|
24188
|
-
"div",
|
|
24189
|
-
{
|
|
24190
|
-
"data-slot": "chat-footer",
|
|
24191
|
-
className: "relative mt-2 flex min-h-6 items-center justify-center gap-2 text-xs text-muted-foreground",
|
|
24192
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("span", { children: t("chat.poweredBy") })
|
|
24193
|
-
}
|
|
24194
24533
|
)
|
|
24195
24534
|
]
|
|
24196
24535
|
}
|