@xpert-ai/chatkit-ui 0.5.9 → 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-BLpvr8Li.js → _baseUniq-BGtBWDHF.js} +1 -1
- package/dist/app/assets/{abap-DuWq8-Fa.js → abap-CRoFwrxO.js} +1 -1
- package/dist/app/assets/{abnf-BHjR3bmX.js → abnf-CNjS2eos.js} +1 -1
- package/dist/app/assets/{actionscript-DJxrYQDx.js → actionscript-B8mr3NzG.js} +1 -1
- package/dist/app/assets/{ada-CbL6tAKZ.js → ada-BFLo8FUI.js} +1 -1
- package/dist/app/assets/{agda-Ck6x7eDV.js → agda-3OzBs9Hc.js} +1 -1
- package/dist/app/assets/{al-DdXfEkta.js → al-D20XP4lJ.js} +1 -1
- package/dist/app/assets/{antlr4-upUqmaYh.js → antlr4-CAk9QE2f.js} +1 -1
- package/dist/app/assets/{apacheconf-CupXJx2-.js → apacheconf-DVy5BZVN.js} +1 -1
- package/dist/app/assets/{apex-0YDHPbgn.js → apex-BOwqYrLv.js} +1 -1
- package/dist/app/assets/{apl-RmSfPwym.js → apl-BKNJFilC.js} +1 -1
- package/dist/app/assets/{applescript-COai1tTm.js → applescript-BBrUU_PL.js} +1 -1
- package/dist/app/assets/{aql-CbZi1-r0.js → aql-D6uGUCXn.js} +1 -1
- package/dist/app/assets/{arc-DIn4pjjH.js → arc-CrwfbbB_.js} +1 -1
- package/dist/app/assets/{architectureDiagram-Q4EWVU46-Dmhp32t-.js → architectureDiagram-Q4EWVU46-ChKCVNgI.js} +1 -1
- package/dist/app/assets/{arduino-CQPi4w3l.js → arduino-D6bzhWX_.js} +1 -1
- package/dist/app/assets/{arff-CeuE6lSG.js → arff-D92IxpM3.js} +1 -1
- package/dist/app/assets/{asciidoc-DCNYoRln.js → asciidoc-DfsvV2P7.js} +1 -1
- package/dist/app/assets/{asm6502-Pd3JHkRr.js → asm6502-_F1FAt_4.js} +1 -1
- package/dist/app/assets/{asmatmel-Cc5XZnaJ.js → asmatmel-Cbtqac6c.js} +1 -1
- package/dist/app/assets/{aspnet-C533BcWB.js → aspnet-BW0Um7vX.js} +1 -1
- package/dist/app/assets/{autohotkey-DKsSzBeu.js → autohotkey-BN09uJNY.js} +1 -1
- package/dist/app/assets/{autoit-BBqFqs2I.js → autoit-CsiD8aKJ.js} +1 -1
- package/dist/app/assets/{avisynth-BQhu1vn5.js → avisynth-CjQfGoLi.js} +1 -1
- package/dist/app/assets/{avro-idl-CLl66iQZ.js → avro-idl-BZ5kGhBz.js} +1 -1
- package/dist/app/assets/{bash-D-02JHh4.js → bash-DJKkM7QN.js} +1 -1
- package/dist/app/assets/{basic-D0Z8Jj8l.js → basic-Bfxph2ze.js} +1 -1
- package/dist/app/assets/{batch-B6HFRBhp.js → batch-Bg0kGp_U.js} +1 -1
- package/dist/app/assets/{bbcode-CE7knYbs.js → bbcode-BCAqMttV.js} +1 -1
- package/dist/app/assets/{bicep--WgDi_5T.js → bicep-D59fWffG.js} +1 -1
- package/dist/app/assets/{birb-CRszBx8p.js → birb-o5jcDsHe.js} +1 -1
- package/dist/app/assets/{bison-2yOIavxu.js → bison-yB-JpgNW.js} +1 -1
- package/dist/app/assets/{blockDiagram-DXYQGD6D-CdfVTYe6.js → blockDiagram-DXYQGD6D-Bbcf1g82.js} +1 -1
- package/dist/app/assets/{bnf-Dg8yqReW.js → bnf-MvjnxGLj.js} +1 -1
- package/dist/app/assets/{brainfuck-CMcDLgle.js → brainfuck-Di4LuxXz.js} +1 -1
- package/dist/app/assets/{brightscript-Cqzcw5aY.js → brightscript-CoKUdu4Z.js} +1 -1
- package/dist/app/assets/{bro-CCYADGfA.js → bro-Dtuf-rOu.js} +1 -1
- package/dist/app/assets/{bsl-BazS2rLi.js → bsl-Dphub1md.js} +1 -1
- package/dist/app/assets/{c-CzdIRBJL.js → c-CouCMjhn.js} +1 -1
- package/dist/app/assets/{c4Diagram-AHTNJAMY-CzWbdT2z.js → c4Diagram-AHTNJAMY-B71AnYEv.js} +1 -1
- package/dist/app/assets/{cfscript-BfocvIBZ.js → cfscript-WEBTQyyh.js} +1 -1
- package/dist/app/assets/{chaiscript-DEeofdbI.js → chaiscript-ChKY8J66.js} +1 -1
- package/dist/app/assets/channel-cWYrdn2X.js +1 -0
- package/dist/app/assets/{chunk-4BX2VUAB-DXvcZJRe.js → chunk-4BX2VUAB-CrS4RXRQ.js} +1 -1
- package/dist/app/assets/{chunk-4TB4RGXK-Cvk3MhhJ.js → chunk-4TB4RGXK-DK5YEmle.js} +1 -1
- package/dist/app/assets/{chunk-55IACEB6-Om7ibAwr.js → chunk-55IACEB6-Bo7tPBvq.js} +1 -1
- package/dist/app/assets/{chunk-EDXVE4YY-DbAgli9I.js → chunk-EDXVE4YY-S8p2mxbS.js} +1 -1
- package/dist/app/assets/{chunk-FMBD7UC4-DObpaYUO.js → chunk-FMBD7UC4-BmeEs0Fl.js} +1 -1
- package/dist/app/assets/{chunk-OYMX7WX6-rGMgjhKm.js → chunk-OYMX7WX6-CVOe3eKO.js} +1 -1
- package/dist/app/assets/{chunk-QZHKN3VN-BtHCPSxj.js → chunk-QZHKN3VN-D8KyAP_6.js} +1 -1
- package/dist/app/assets/{chunk-YZCP3GAM-CDkTBaPo.js → chunk-YZCP3GAM-BCxkcMfg.js} +1 -1
- package/dist/app/assets/{cil-BNlTLivw.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-BBIPxwPb.js → clike-BDx2IDni.js} +1 -1
- package/dist/app/assets/{clojure-SjJCVW3l.js → clojure-DwvfHL53.js} +1 -1
- package/dist/app/assets/clone-DqC7wLFm.js +1 -0
- package/dist/app/assets/{cmake-DKXTFLeQ.js → cmake-CR0A7aZm.js} +1 -1
- package/dist/app/assets/{cobol-DDV2T8Ov.js → cobol-CyPvCTIP.js} +1 -1
- package/dist/app/assets/{coffeescript-DLlO3-WB.js → coffeescript-BWdDr59V.js} +1 -1
- package/dist/app/assets/{concurnas-Zk22sd4q.js → concurnas-DOsrzlEd.js} +1 -1
- package/dist/app/assets/{coq-CB49fGLj.js → coq-DufSYl-_.js} +1 -1
- package/dist/app/assets/{core-GilJv2TY.js → core-CCxBh-db.js} +1 -1
- package/dist/app/assets/{cose-bilkent-S5V4N54A-dCcXah1N.js → cose-bilkent-S5V4N54A-CVetMxrj.js} +1 -1
- package/dist/app/assets/{cpp-_nLYhTeO.js → cpp-DlRzYOQ3.js} +1 -1
- package/dist/app/assets/{crystal-0uF3fCBY.js → crystal-C6liNBfM.js} +1 -1
- package/dist/app/assets/{csharp-9a018lXK.js → csharp-BJQ_L68V.js} +1 -1
- package/dist/app/assets/{cshtml-DeRWrMgA.js → cshtml-CIHuGJB1.js} +1 -1
- package/dist/app/assets/{csp-C1JPZRc6.js → csp-DClFC8n5.js} +1 -1
- package/dist/app/assets/{css-CtlaCojl.js → css-BIHXWlvb.js} +1 -1
- package/dist/app/assets/{css-extras-_r0fSC4K.js → css-extras-DW9n0pYv.js} +1 -1
- package/dist/app/assets/{csv-DEVHAMet.js → csv-BCDO1ezZ.js} +1 -1
- package/dist/app/assets/{cypher-OQlwpa7A.js → cypher-C02ZuRq6.js} +1 -1
- package/dist/app/assets/{d-CBefACWo.js → d-C_m1NZFO.js} +1 -1
- package/dist/app/assets/{dagre-KV5264BT-BbcR5yFp.js → dagre-KV5264BT-CNZ7oGpU.js} +1 -1
- package/dist/app/assets/{dart-DnZNI7st.js → dart-BzfpaRRB.js} +1 -1
- package/dist/app/assets/{dataweave-C0KQEfm3.js → dataweave-BZwfufNx.js} +1 -1
- package/dist/app/assets/{dax-C85xkJS9.js → dax-BL-K1OK0.js} +1 -1
- package/dist/app/assets/{dhall-Dr7lP2CR.js → dhall-kRlu5-Ah.js} +1 -1
- package/dist/app/assets/{diagram-5BDNPKRD-CAF6Irol.js → diagram-5BDNPKRD-Dou4ReAX.js} +1 -1
- package/dist/app/assets/{diagram-G4DWMVQ6-BjM_224a.js → diagram-G4DWMVQ6-DrTF8uMu.js} +1 -1
- package/dist/app/assets/{diagram-MMDJMWI5-DLUB15w5.js → diagram-MMDJMWI5-Duy5amDa.js} +1 -1
- package/dist/app/assets/{diagram-TYMM5635-DBbpw92w.js → diagram-TYMM5635-BbR1qfVD.js} +1 -1
- package/dist/app/assets/{diff-BMBQT17e.js → diff-B4AimFb8.js} +1 -1
- package/dist/app/assets/{django-ciXFTeWU.js → django-CHuXCByJ.js} +1 -1
- package/dist/app/assets/{dns-zone-file-DC-B5K-Z.js → dns-zone-file-DFO0-Wh5.js} +1 -1
- package/dist/app/assets/{docker-A8DlJ91e.js → docker-DeblFuGF.js} +1 -1
- package/dist/app/assets/{dot-DC8VHvNV.js → dot-DsmxGkhr.js} +1 -1
- package/dist/app/assets/{ebnf-92ogoCIr.js → ebnf-CbgMYLgT.js} +1 -1
- package/dist/app/assets/{editorconfig-D-VWzvau.js → editorconfig-DFLqU5tO.js} +1 -1
- package/dist/app/assets/{eiffel-BQlPy2tR.js → eiffel-BwLrgMir.js} +1 -1
- package/dist/app/assets/{ejs-hYRRXYEf.js → ejs-C_qs3M41.js} +1 -1
- package/dist/app/assets/{elixir-BQaOfAKO.js → elixir-DrAUe9cA.js} +1 -1
- package/dist/app/assets/{elm-CMZDaOsd.js → elm-NL3cn8Zq.js} +1 -1
- package/dist/app/assets/{erDiagram-SMLLAGMA-D7RIpy8K.js → erDiagram-SMLLAGMA-BfCXo53J.js} +1 -1
- package/dist/app/assets/{erb-BhUx9oZj.js → erb-B3ZYOAhJ.js} +1 -1
- package/dist/app/assets/{erlang-BEE4gQmE.js → erlang-DHaDiNC1.js} +1 -1
- package/dist/app/assets/{etlua-Do5lhS9I.js → etlua-cjNwXVDj.js} +1 -1
- package/dist/app/assets/{excel-formula-CmwpMtyy.js → excel-formula-K59v6qG0.js} +1 -1
- package/dist/app/assets/{factor-B2pJs6O3.js → factor-CaxnvHX-.js} +1 -1
- package/dist/app/assets/{false-DvjmZdOv.js → false-C3dAj0rb.js} +1 -1
- package/dist/app/assets/{firestore-security-rules-CFb_h360.js → firestore-security-rules-BWiaIy5P.js} +1 -1
- package/dist/app/assets/{flow-D0Mztv7X.js → flow-DtC7lyt9.js} +1 -1
- package/dist/app/assets/{flowDiagram-DWJPFMVM-Bs64njF4.js → flowDiagram-DWJPFMVM-C-qKitVO.js} +1 -1
- package/dist/app/assets/{fortran-1pOElj0a.js → fortran-DR0Ai6wv.js} +1 -1
- package/dist/app/assets/{fsharp-B6O1vScF.js → fsharp-CQ4gmr0N.js} +1 -1
- package/dist/app/assets/{ftl-BC1JMSb3.js → ftl-Ckk-2edF.js} +1 -1
- package/dist/app/assets/{ganttDiagram-T4ZO3ILL-BaqYXbd5.js → ganttDiagram-T4ZO3ILL-CVsnCO44.js} +1 -1
- package/dist/app/assets/{gap-DHN_hna1.js → gap-BKZovOdF.js} +1 -1
- package/dist/app/assets/{gcode-CYOpCOHU.js → gcode-DEwkGIHO.js} +1 -1
- package/dist/app/assets/{gdscript-C_fDjtde.js → gdscript-BHZKxFHM.js} +1 -1
- package/dist/app/assets/{gedcom-BVEMpxDC.js → gedcom-5qXzfSVG.js} +1 -1
- package/dist/app/assets/{gherkin-CbpN6mFf.js → gherkin-JPPL0NwC.js} +1 -1
- package/dist/app/assets/{git-Bf1dI9II.js → git-BHHbjeSj.js} +1 -1
- package/dist/app/assets/{gitGraphDiagram-UUTBAWPF-BdL4HwfB.js → gitGraphDiagram-UUTBAWPF-BAMZ7idy.js} +1 -1
- package/dist/app/assets/{glsl-DHfVVpll.js → glsl-ojT9GGcQ.js} +1 -1
- package/dist/app/assets/{gml-CKW0I1sM.js → gml-Byrz4K18.js} +1 -1
- package/dist/app/assets/{gn-BolaXeCK.js → gn-BXN298zz.js} +1 -1
- package/dist/app/assets/{go-CvNTUNQj.js → go-QMar_vXY.js} +1 -1
- package/dist/app/assets/{go-module-DHNsqTFu.js → go-module-DhttF-9u.js} +1 -1
- package/dist/app/assets/{graph-w3lwjjfd.js → graph-B32jd8nV.js} +1 -1
- package/dist/app/assets/{graphql-CqMPX6Uj.js → graphql-D52K_SsX.js} +1 -1
- package/dist/app/assets/{groovy-ric2FEOh.js → groovy-CqJveqOx.js} +1 -1
- package/dist/app/assets/{haml-Cxb5CUqP.js → haml-CoLWO1nd.js} +1 -1
- package/dist/app/assets/{handlebars-Cn3du5zM.js → handlebars-BfmAmLER.js} +1 -1
- package/dist/app/assets/{haskell-C6_pQzAW.js → haskell-jItCYvPU.js} +1 -1
- package/dist/app/assets/{haxe-ByVxVzJ9.js → haxe-4SLJ2_08.js} +1 -1
- package/dist/app/assets/{hcl-B54wt0UB.js → hcl-BMmyrQ8c.js} +1 -1
- package/dist/app/assets/{hlsl-zd81HZk_.js → hlsl-SJDMNXGq.js} +1 -1
- package/dist/app/assets/{hoon-CIsFAweE.js → hoon-D6moOZKy.js} +1 -1
- package/dist/app/assets/{hpkp-BjSjLyAt.js → hpkp-sCVuwPlN.js} +1 -1
- package/dist/app/assets/{hsts-DYV6IErn.js → hsts-bAMpwV9D.js} +1 -1
- package/dist/app/assets/{http-vOpsxP66.js → http-Dx1p06BK.js} +1 -1
- package/dist/app/assets/{ichigojam-0LTExBpZ.js → ichigojam-CVXOu9yk.js} +1 -1
- package/dist/app/assets/{icon-B-Gp4jiE.js → icon-D6wxStB0.js} +1 -1
- package/dist/app/assets/{icu-message-format-jiNYPlT8.js → icu-message-format-D6yLIfrn.js} +1 -1
- package/dist/app/assets/{idris-ZMBybD9e.js → idris-DpAtc3fL.js} +1 -1
- package/dist/app/assets/{iecst-B3wVu7MT.js → iecst-B29ujpoO.js} +1 -1
- package/dist/app/assets/{ignore-DCDIFGnd.js → ignore-CVq0aJkW.js} +1 -1
- package/dist/app/assets/{index-Bc4smTvC.js → index-BBJxrAP8.js} +139 -139
- package/dist/app/assets/index-D-hjfkvG.css +1 -0
- package/dist/app/assets/{infoDiagram-42DDH7IO-Bbh4hemk.js → infoDiagram-42DDH7IO-BG7H21DU.js} +1 -1
- package/dist/app/assets/{inform7-BI05xVNw.js → inform7-B1F0WxwD.js} +1 -1
- package/dist/app/assets/{ini-vxj4aj2b.js → ini-CIpuuB9_.js} +1 -1
- package/dist/app/assets/{io-Dv10BjOU.js → io-3w1UICu0.js} +1 -1
- package/dist/app/assets/{ishikawaDiagram-UXIWVN3A-BuEYSyJU.js → ishikawaDiagram-UXIWVN3A-j8lnD8_c.js} +1 -1
- package/dist/app/assets/{j-BW8yPUOH.js → j-D3-2sGJz.js} +1 -1
- package/dist/app/assets/{java-BkBlxlrY.js → java-BlX-H2cK.js} +1 -1
- package/dist/app/assets/{javadoc-Cx6tkfWS.js → javadoc-J2TruS4-.js} +1 -1
- package/dist/app/assets/{javadoclike-BBfuCCPL.js → javadoclike-bfC-JoEq.js} +1 -1
- package/dist/app/assets/{javascript-CAUiQeA4.js → javascript-BP7WO6B4.js} +1 -1
- package/dist/app/assets/{javastacktrace-DVKSc9mr.js → javastacktrace-BTUlM0LC.js} +1 -1
- package/dist/app/assets/{jexl-Ctv9A-4Y.js → jexl-Cxa4h-16.js} +1 -1
- package/dist/app/assets/{jolie-8oLOtI3_.js → jolie-BbbvEhKj.js} +1 -1
- package/dist/app/assets/{journeyDiagram-VCZTEJTY-DUm9Kxjg.js → journeyDiagram-VCZTEJTY-BwTniXNV.js} +1 -1
- package/dist/app/assets/{jq-C5TPho8v.js → jq-DArJYKLU.js} +1 -1
- package/dist/app/assets/{js-extras-CvvS7hCP.js → js-extras-BvRL3Jvq.js} +1 -1
- package/dist/app/assets/{js-templates-D1ItFqxK.js → js-templates-Dk5OdIFK.js} +1 -1
- package/dist/app/assets/{jsdoc-D0lTE-nD.js → jsdoc-DngF7jir.js} +1 -1
- package/dist/app/assets/{json-Bj6Xy1YF.js → json-ClAvu2RW.js} +1 -1
- package/dist/app/assets/{json5-CvDs8NVg.js → json5-BmFfbQQU.js} +1 -1
- package/dist/app/assets/{jsonp-BFor_KVf.js → jsonp-BgadffEo.js} +1 -1
- package/dist/app/assets/{jsstacktrace-DaDHvFwg.js → jsstacktrace-Dd8S1Q81.js} +1 -1
- package/dist/app/assets/{jsx-9z5hmKsA.js → jsx-Dz0neUh1.js} +1 -1
- package/dist/app/assets/{julia-DwK7_L2k.js → julia-BHGMeW5t.js} +1 -1
- package/dist/app/assets/{kanban-definition-6JOO6SKY-B4PLi6a2.js → kanban-definition-6JOO6SKY-CMc5-Ea3.js} +1 -1
- package/dist/app/assets/{keepalived-QQAuR044.js → keepalived-1yyGwudH.js} +1 -1
- package/dist/app/assets/{keyman-WSDbwfnX.js → keyman-D96kZ3Ti.js} +1 -1
- package/dist/app/assets/{kotlin-CGASEpWD.js → kotlin-DU--_X0J.js} +1 -1
- package/dist/app/assets/{kumir-Doyw9YhD.js → kumir-0MOuOYYf.js} +1 -1
- package/dist/app/assets/{kusto-xM5aYCkT.js → kusto-C-XA0mwb.js} +1 -1
- package/dist/app/assets/{latex-7t6762ct.js → latex-DwJ10yrt.js} +1 -1
- package/dist/app/assets/{latte-CYYMtaGq.js → latte-D_Yyq_nM.js} +1 -1
- package/dist/app/assets/{layout-Cq9HzFXC.js → layout-DQt8UNZi.js} +1 -1
- package/dist/app/assets/{less-B-rkr2Db.js → less-CsUu5jL1.js} +1 -1
- package/dist/app/assets/{lilypond-BJWXSiTf.js → lilypond-CIbhxqtF.js} +1 -1
- package/dist/app/assets/{linear-DRDsgNmW.js → linear-D8DMmUY3.js} +1 -1
- package/dist/app/assets/{liquid--20_a0Si.js → liquid-BaXz-DcY.js} +1 -1
- package/dist/app/assets/{lisp-B_0ZteJz.js → lisp-DQs2fOve.js} +1 -1
- package/dist/app/assets/{livescript-1Jx0SETD.js → livescript-BebY4jFA.js} +1 -1
- package/dist/app/assets/{llvm-B9HfHMKf.js → llvm-tvuSKoRQ.js} +1 -1
- package/dist/app/assets/{log-CRWfAu0Z.js → log-euixYp8a.js} +1 -1
- package/dist/app/assets/{lolcode-DMRD9BNM.js → lolcode-CwPkrI86.js} +1 -1
- package/dist/app/assets/{lua-D-hyZPBj.js → lua-CNvDsE6g.js} +1 -1
- package/dist/app/assets/{magma-CIgc0Q1n.js → magma-CdK12PLr.js} +1 -1
- package/dist/app/assets/{makefile-CBunZoPa.js → makefile-fq5UhIbM.js} +1 -1
- package/dist/app/assets/{markdown-DvJvDbDy.js → markdown-Ajq2JGa1.js} +1 -1
- package/dist/app/assets/{markup-D3VPet1J.js → markup-CfbpoVuv.js} +1 -1
- package/dist/app/assets/{markup-templating-D7DvUP7P.js → markup-templating-ClpbWH3E.js} +1 -1
- package/dist/app/assets/{matlab-CjKtwgDT.js → matlab-DUQtIrQ-.js} +1 -1
- package/dist/app/assets/{maxscript-CvzRNTSR.js → maxscript-BQSIPoaa.js} +1 -1
- package/dist/app/assets/{mel-DVwlWwS1.js → mel-C8tXgXmS.js} +1 -1
- package/dist/app/assets/{mermaid-mTOAb9I1.js → mermaid-BMSiReCn.js} +1 -1
- package/dist/app/assets/{min-6n2-iCAm.js → min-DgHJ7Nf4.js} +1 -1
- package/dist/app/assets/{mindmap-definition-QFDTVHPH-eTB4aUJ6.js → mindmap-definition-QFDTVHPH-70NBPICA.js} +1 -1
- package/dist/app/assets/{mizar-D1v4Nv22.js → mizar-FFvziKde.js} +1 -1
- package/dist/app/assets/{mongodb-B6xPI5vi.js → mongodb-D1mzpRCd.js} +1 -1
- package/dist/app/assets/{monkey-8ZQGq2j6.js → monkey-dBKcwUTm.js} +1 -1
- package/dist/app/assets/{moonscript-qkDyELmz.js → moonscript-Bba8hj2N.js} +1 -1
- package/dist/app/assets/{n1ql-7qzjjhYg.js → n1ql-BKv6f_ZJ.js} +1 -1
- package/dist/app/assets/{n4js--0WDRpBj.js → n4js-De4nJHcC.js} +1 -1
- package/dist/app/assets/{nand2tetris-hdl-zYT29X94.js → nand2tetris-hdl-d6Im94up.js} +1 -1
- package/dist/app/assets/{naniscript-BEKVFrJA.js → naniscript-7I_PYFtb.js} +1 -1
- package/dist/app/assets/{nasm-BxgE8BWF.js → nasm-DtbQ_6JV.js} +1 -1
- package/dist/app/assets/{neon-CRmkHhWg.js → neon-7JcECa8A.js} +1 -1
- package/dist/app/assets/{nevod-DqOKiweO.js → nevod-BarubR7h.js} +1 -1
- package/dist/app/assets/{nginx-BepDunyM.js → nginx-C-Nvt6BK.js} +1 -1
- package/dist/app/assets/{nim-DOYwB93n.js → nim-LP-7gM1Q.js} +1 -1
- package/dist/app/assets/{nix-OcEzpwWS.js → nix-Msza7-r9.js} +1 -1
- package/dist/app/assets/{nsis-WQEGbgSb.js → nsis-N1c5jrgc.js} +1 -1
- package/dist/app/assets/{objectivec-B8PulHhQ.js → objectivec-qIn11zhm.js} +1 -1
- package/dist/app/assets/{ocaml-DrKpTrGd.js → ocaml-CM1-jZNQ.js} +1 -1
- package/dist/app/assets/{opencl-DJD4I4Az.js → opencl-aZRowywV.js} +1 -1
- package/dist/app/assets/{openqasm-BzLNaS1E.js → openqasm-DXQkGk7v.js} +1 -1
- package/dist/app/assets/{oz-CddQDW4N.js → oz-IpByQjyt.js} +1 -1
- package/dist/app/assets/{parigp-DL9Pul5Z.js → parigp-i2cpgz90.js} +1 -1
- package/dist/app/assets/{parser-BaeyVs6E.js → parser-DUe4fyHY.js} +1 -1
- package/dist/app/assets/{pascal-DZwRqOCW.js → pascal-CCbi6In9.js} +1 -1
- package/dist/app/assets/{pascaligo-CglPcMbu.js → pascaligo-cYiy-tQf.js} +1 -1
- package/dist/app/assets/{pcaxis-m1flL1nx.js → pcaxis-DUe2I8NZ.js} +1 -1
- package/dist/app/assets/{peoplecode-BPZXOWEd.js → peoplecode-y-WYZDRM.js} +1 -1
- package/dist/app/assets/{perl-DEj9sd22.js → perl-uC0qqGFo.js} +1 -1
- package/dist/app/assets/{php-ChAzX5Xy.js → php-Djwg1gg7.js} +1 -1
- package/dist/app/assets/{php-extras-BEC2cMHJ.js → php-extras-BXM2sgwu.js} +1 -1
- package/dist/app/assets/{phpdoc-Efem6iWX.js → phpdoc-SxUKXPYZ.js} +1 -1
- package/dist/app/assets/{pieDiagram-DEJITSTG-I2O3vbig.js → pieDiagram-DEJITSTG-CQfl-KLS.js} +1 -1
- package/dist/app/assets/{plsql-Bgiemx8O.js → plsql-C3HfRTv-.js} +1 -1
- package/dist/app/assets/{powerquery-DoH4a5fD.js → powerquery-a89Fj1Qs.js} +1 -1
- package/dist/app/assets/{powershell-CXwYZoB9.js → powershell-dX-2_G9H.js} +1 -1
- package/dist/app/assets/{processing-BG-k24bE.js → processing-BjXVOyvk.js} +1 -1
- package/dist/app/assets/{prolog-BQk3s9Cz.js → prolog-B9kdH-bl.js} +1 -1
- package/dist/app/assets/{promql-Cn8XzgOs.js → promql-B3BDR8es.js} +1 -1
- package/dist/app/assets/{properties-BzFCc7p8.js → properties-CMjA6hD5.js} +1 -1
- package/dist/app/assets/{protobuf-DsVZomkz.js → protobuf-DVGs9Q8Q.js} +1 -1
- package/dist/app/assets/{psl-BL1By2Di.js → psl-BzbEAN9s.js} +1 -1
- package/dist/app/assets/{pug-CJXPw-_y.js → pug-fdeIkQLg.js} +1 -1
- package/dist/app/assets/{puppet-BgLD34yT.js → puppet-JnrsXSZY.js} +1 -1
- package/dist/app/assets/{pure-D5KRS3X3.js → pure-Bsjul00Q.js} +1 -1
- package/dist/app/assets/{purebasic-BO_zjFwL.js → purebasic-C_mf0qxg.js} +1 -1
- package/dist/app/assets/{purescript-Ddc7moMi.js → purescript-P7l76DgD.js} +1 -1
- package/dist/app/assets/{q-CsHjuzhk.js → q-D98RUW_e.js} +1 -1
- package/dist/app/assets/{qml-YbRFzx0z.js → qml-CBe5bVTm.js} +1 -1
- package/dist/app/assets/{qore-BFgUYB1S.js → qore-CrvWCYtL.js} +1 -1
- package/dist/app/assets/{qsharp-DRh0td2A.js → qsharp-4BBfTlhh.js} +1 -1
- package/dist/app/assets/{quadrantDiagram-34T5L4WZ-sLTzbhk2.js → quadrantDiagram-34T5L4WZ-_JtlPbxc.js} +1 -1
- package/dist/app/assets/{r-5gqFGwLd.js → r-C-wPXw3M.js} +1 -1
- package/dist/app/assets/{racket-BgmD87H8.js → racket-BDc8Z2eV.js} +1 -1
- package/dist/app/assets/{reason-D_tR9ps8.js → reason-DBeyHA3q.js} +1 -1
- package/dist/app/assets/{regex-hcOGgwnQ.js → regex-yDzON3WO.js} +1 -1
- package/dist/app/assets/{rego-C0pl_3VC.js → rego-CWdKhPRV.js} +1 -1
- package/dist/app/assets/{renpy-lT_4OszV.js → renpy-COnBNW6q.js} +1 -1
- package/dist/app/assets/{requirementDiagram-MS252O5E-CEJ8Rcnr.js → requirementDiagram-MS252O5E-C3gIi5N5.js} +1 -1
- package/dist/app/assets/{rest-BBI-g8mr.js → rest-D7ADMqxp.js} +1 -1
- package/dist/app/assets/{rip-C3KbnjS_.js → rip-BXziA95H.js} +1 -1
- package/dist/app/assets/{roboconf-CoZ--fPi.js → roboconf-wb822TWS.js} +1 -1
- package/dist/app/assets/{robotframework-DY6-Pswb.js → robotframework-BRitqS4Z.js} +1 -1
- package/dist/app/assets/{ruby-Bs6f5Nvi.js → ruby-SERs2agE.js} +1 -1
- package/dist/app/assets/{rust-D0f4oPW4.js → rust-CPnTKWoF.js} +1 -1
- package/dist/app/assets/{sankeyDiagram-XADWPNL6-Dx6TM5mU.js → sankeyDiagram-XADWPNL6-C8zexvre.js} +1 -1
- package/dist/app/assets/{sas-RrsOkHla.js → sas-F8wqa-VH.js} +1 -1
- package/dist/app/assets/{sass-D3DRkshk.js → sass-sFRMpF9E.js} +1 -1
- package/dist/app/assets/{scala-2yub5Noi.js → scala-BjAq73X3.js} +1 -1
- package/dist/app/assets/{scheme-DUUET_XL.js → scheme-Dy5snFBD.js} +1 -1
- package/dist/app/assets/{scss-mXwcbbk-.js → scss-8PCqIjM6.js} +1 -1
- package/dist/app/assets/{sequenceDiagram-FGHM5R23-9GU2p9Ma.js → sequenceDiagram-FGHM5R23-DbNGiTO2.js} +1 -1
- package/dist/app/assets/{shell-session-DoXxry6a.js → shell-session-DEdTVxFD.js} +1 -1
- package/dist/app/assets/{smali-BM6j_ZPX.js → smali-Bxae2KQR.js} +1 -1
- package/dist/app/assets/{smalltalk-Bcd172Pc.js → smalltalk-CwOKqcjX.js} +1 -1
- package/dist/app/assets/{smarty-oKqEpnDS.js → smarty-kF-PSUnG.js} +1 -1
- package/dist/app/assets/{sml-B1upkj4b.js → sml-bomnQbFX.js} +1 -1
- package/dist/app/assets/{solidity-xeq40f3P.js → solidity-BAjbZMZL.js} +1 -1
- package/dist/app/assets/{solution-file-DRFXyDTT.js → solution-file-MmJiJ8_n.js} +1 -1
- package/dist/app/assets/{soy-OSBkuqMW.js → soy-DU--y6x4.js} +1 -1
- package/dist/app/assets/{sparql-D3k_wEdU.js → sparql-mmPoHR5x.js} +1 -1
- package/dist/app/assets/{splunk-spl-FKET7kp7.js → splunk-spl-hgCUw5aN.js} +1 -1
- package/dist/app/assets/{sqf-BSn0GDGB.js → sqf-BiiIGVoY.js} +1 -1
- package/dist/app/assets/{sql-D6mgKQB5.js → sql-nlDwSZBD.js} +1 -1
- package/dist/app/assets/{squirrel-DFu-guJ8.js → squirrel-Bqi6dvci.js} +1 -1
- package/dist/app/assets/{stan-CDr-fjyl.js → stan-2W_Pcetu.js} +1 -1
- package/dist/app/assets/{stateDiagram-FHFEXIEX-z2DiLwCm.js → stateDiagram-FHFEXIEX-pa0JGYLy.js} +1 -1
- package/dist/app/assets/stateDiagram-v2-QKLJ7IA2-FdxILnkg.js +1 -0
- package/dist/app/assets/{stylus-BFOCUvnx.js → stylus-zCZUGlqV.js} +1 -1
- package/dist/app/assets/{swift-uHqpQZ6J.js → swift-5sLu9EpD.js} +1 -1
- package/dist/app/assets/{systemd-CYQNlgLz.js → systemd-DgaHeexU.js} +1 -1
- package/dist/app/assets/{t4-cs-usG5jkwF.js → t4-cs-YCeMlSug.js} +1 -1
- package/dist/app/assets/{t4-templating-D4wDOtGr.js → t4-templating-DPzKGTo4.js} +1 -1
- package/dist/app/assets/{t4-vb-C1p1TL0w.js → t4-vb-BPPPhEQB.js} +1 -1
- package/dist/app/assets/{tap-DFMBztgQ.js → tap-Dgrqyvk-.js} +1 -1
- package/dist/app/assets/{tcl-BCt4zqi_.js → tcl-DHz3w70b.js} +1 -1
- package/dist/app/assets/{textile-Bloj03Mi.js → textile-Cr314Blk.js} +1 -1
- package/dist/app/assets/{timeline-definition-GMOUNBTQ-d06kVX17.js → timeline-definition-GMOUNBTQ-BLY5sqEL.js} +1 -1
- package/dist/app/assets/{toml-BhS4WNxa.js → toml-Bnu9rfnB.js} +1 -1
- package/dist/app/assets/{tremor-DviIbCpH.js → tremor-ChXFGibI.js} +1 -1
- package/dist/app/assets/{tt2-DE0j1lmS.js → tt2-BzVUtdxI.js} +1 -1
- package/dist/app/assets/{turtle-BxCayuSl.js → turtle-letBf_Bx.js} +1 -1
- package/dist/app/assets/{twig-DtCkUjxy.js → twig-Ni2rEZw9.js} +1 -1
- package/dist/app/assets/{typescript-3pYqwxJ2.js → typescript-BQofdwc1.js} +1 -1
- package/dist/app/assets/{typoscript-Dy8ykcri.js → typoscript-cQilTApE.js} +1 -1
- package/dist/app/assets/{unrealscript-C4Peef6q.js → unrealscript-CtH2g6It.js} +1 -1
- package/dist/app/assets/{uorazor-91g1sfeu.js → uorazor-CjvsWB8K.js} +1 -1
- package/dist/app/assets/{uri-DDMRMgIp.js → uri-Cs9bSTwl.js} +1 -1
- package/dist/app/assets/{v-2gwj9f62.js → v-Bqvis8I2.js} +1 -1
- package/dist/app/assets/{vala-CUiPsFoo.js → vala-BpW8rpIS.js} +1 -1
- package/dist/app/assets/{vbnet-Zsyt2tdN.js → vbnet-DdVGFj9N.js} +1 -1
- package/dist/app/assets/{velocity-CSkxzAQi.js → velocity-CHDcdQy7.js} +1 -1
- package/dist/app/assets/{vennDiagram-DHZGUBPP-eRSD5RJQ.js → vennDiagram-DHZGUBPP-n6Dq2r90.js} +1 -1
- package/dist/app/assets/{verilog-BtHxNyJ7.js → verilog-t2rEJU_-.js} +1 -1
- package/dist/app/assets/{vhdl-C0vU6j5h.js → vhdl-Bkv11jjq.js} +1 -1
- package/dist/app/assets/{vim-dvVtnnHy.js → vim-C6YVoqqV.js} +1 -1
- package/dist/app/assets/{visual-basic-B-m3tLsh.js → visual-basic-ozbiLbAI.js} +1 -1
- package/dist/app/assets/{wardley-RL74JXVD-BgTJCIjC.js → wardley-RL74JXVD-cDbpgcV_.js} +1 -1
- package/dist/app/assets/{wardleyDiagram-NUSXRM2D-B19yXjvI.js → wardleyDiagram-NUSXRM2D-C1uThccd.js} +1 -1
- package/dist/app/assets/{warpscript-1YJK0eIR.js → warpscript-BNO_EbH2.js} +1 -1
- package/dist/app/assets/{wasm-B18nYup5.js → wasm-Bghcf_Ud.js} +1 -1
- package/dist/app/assets/{web-idl-DaaOjvPO.js → web-idl-C-d3Xdl1.js} +1 -1
- package/dist/app/assets/{wiki-6hqpglgh.js → wiki-DI1mP-2c.js} +1 -1
- package/dist/app/assets/{wolfram-uGnnCOiH.js → wolfram-Sj_QoNQm.js} +1 -1
- package/dist/app/assets/{wren-BVgxyvFh.js → wren-Bc7J_SNZ.js} +1 -1
- package/dist/app/assets/{xeora-BIlCKODO.js → xeora-C6DbAKbN.js} +1 -1
- package/dist/app/assets/{xml-doc-COhD3a_e.js → xml-doc-CllF2qWw.js} +1 -1
- package/dist/app/assets/{xojo-CffC0OLi.js → xojo-BmwcGxAI.js} +1 -1
- package/dist/app/assets/{xquery-BysER8W6.js → xquery-WkzJyf76.js} +1 -1
- package/dist/app/assets/{xychartDiagram-5P7HB3ND-Ba1Vo7v6.js → xychartDiagram-5P7HB3ND-BWMpw-9z.js} +1 -1
- package/dist/app/assets/{yaml-BjlUOXdf.js → yaml-DaCV1ugn.js} +1 -1
- package/dist/app/assets/{yang-CE61CGXZ.js → yang-BxwNjc1X.js} +1 -1
- package/dist/app/assets/{zig-BwDJZvRM.js → zig-B-ArCifh.js} +1 -1
- package/dist/app/index.html +2 -2
- package/dist/index.cjs +708 -506
- package/dist/index.js +739 -535
- package/package.json +3 -3
- package/dist/app/assets/channel-C-xwEqfR.js +0 -1
- package/dist/app/assets/classDiagram-6PBFFD2Q-DZxfIDiK.js +0 -1
- package/dist/app/assets/classDiagram-v2-HSJHXN6E-DZxfIDiK.js +0 -1
- package/dist/app/assets/clone-nOTgxCHT.js +0 -1
- package/dist/app/assets/index-BAb1mpfo.css +0 -1
- package/dist/app/assets/stateDiagram-v2-QKLJ7IA2-CHMZFZDU.js +0 -1
package/dist/index.cjs
CHANGED
|
@@ -2571,7 +2571,7 @@ var useStreamContext = () => {
|
|
|
2571
2571
|
};
|
|
2572
2572
|
|
|
2573
2573
|
// src/components/composer/ComposerMenu.tsx
|
|
2574
|
-
var
|
|
2574
|
+
var React13 = __toESM(require("react"), 1);
|
|
2575
2575
|
var import_lucide_react4 = require("lucide-react");
|
|
2576
2576
|
|
|
2577
2577
|
// src/i18n/useChatkitTranslation.ts
|
|
@@ -4706,25 +4706,93 @@ var Input = React8.forwardRef(
|
|
|
4706
4706
|
);
|
|
4707
4707
|
Input.displayName = "Input";
|
|
4708
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
|
+
|
|
4709
4777
|
// src/components/ui/scroll-area.tsx
|
|
4710
|
-
var
|
|
4778
|
+
var React10 = __toESM(require("react"), 1);
|
|
4711
4779
|
var ScrollAreaPrimitive = __toESM(require("@radix-ui/react-scroll-area"), 1);
|
|
4712
|
-
var
|
|
4713
|
-
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)(
|
|
4714
4782
|
ScrollAreaPrimitive.Root,
|
|
4715
4783
|
{
|
|
4716
4784
|
ref,
|
|
4717
4785
|
className: cn("relative min-w-0 overflow-hidden", className),
|
|
4718
4786
|
...props,
|
|
4719
4787
|
children: [
|
|
4720
|
-
/* @__PURE__ */ (0,
|
|
4721
|
-
/* @__PURE__ */ (0,
|
|
4722
|
-
/* @__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, {})
|
|
4723
4791
|
]
|
|
4724
4792
|
}
|
|
4725
4793
|
));
|
|
4726
4794
|
ScrollArea.displayName = ScrollAreaPrimitive.Root.displayName;
|
|
4727
|
-
var ScrollBar =
|
|
4795
|
+
var ScrollBar = React10.forwardRef(({ className, orientation = "vertical", ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
4728
4796
|
ScrollAreaPrimitive.ScrollAreaScrollbar,
|
|
4729
4797
|
{
|
|
4730
4798
|
ref,
|
|
@@ -4736,20 +4804,16 @@ var ScrollBar = React9.forwardRef(({ className, orientation = "vertical", ...pro
|
|
|
4736
4804
|
className
|
|
4737
4805
|
),
|
|
4738
4806
|
...props,
|
|
4739
|
-
children: /* @__PURE__ */ (0,
|
|
4807
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(ScrollAreaPrimitive.ScrollAreaThumb, { className: "relative flex-1 rounded-full bg-border" })
|
|
4740
4808
|
}
|
|
4741
4809
|
));
|
|
4742
4810
|
ScrollBar.displayName = ScrollAreaPrimitive.ScrollAreaScrollbar.displayName;
|
|
4743
4811
|
|
|
4744
|
-
// src/components/composer/ConnectorMenuPanel.tsx
|
|
4745
|
-
var React11 = __toESM(require("react"), 1);
|
|
4746
|
-
var import_lucide_react3 = require("lucide-react");
|
|
4747
|
-
|
|
4748
4812
|
// src/components/ui/separator.tsx
|
|
4749
|
-
var
|
|
4750
|
-
var
|
|
4751
|
-
var Separator =
|
|
4752
|
-
({ 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)(
|
|
4753
4817
|
"div",
|
|
4754
4818
|
{
|
|
4755
4819
|
ref,
|
|
@@ -4767,7 +4831,7 @@ var Separator = React10.forwardRef(
|
|
|
4767
4831
|
Separator.displayName = "Separator";
|
|
4768
4832
|
|
|
4769
4833
|
// src/components/composer/ConnectorMenuPanel.tsx
|
|
4770
|
-
var
|
|
4834
|
+
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
4771
4835
|
function resolveConnectorManagementUrl(apiUrl, scope) {
|
|
4772
4836
|
const base2 = apiUrl?.trim() || window.location.href;
|
|
4773
4837
|
const path = scope.type === "project" ? `/project/${encodeURIComponent(scope.projectId)}/config` : `/xpert/w/${encodeURIComponent(scope.workspaceId)}/connectors`;
|
|
@@ -4799,7 +4863,7 @@ function ConnectorIcon({
|
|
|
4799
4863
|
label
|
|
4800
4864
|
}) {
|
|
4801
4865
|
if (option.icon?.type === "image" && typeof option.icon.value === "string") {
|
|
4802
|
-
return /* @__PURE__ */ (0,
|
|
4866
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
4803
4867
|
"img",
|
|
4804
4868
|
{
|
|
4805
4869
|
src: option.icon.value,
|
|
@@ -4808,13 +4872,13 @@ function ConnectorIcon({
|
|
|
4808
4872
|
}
|
|
4809
4873
|
);
|
|
4810
4874
|
}
|
|
4811
|
-
return /* @__PURE__ */ (0,
|
|
4875
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
4812
4876
|
"span",
|
|
4813
4877
|
{
|
|
4814
4878
|
"aria-hidden": "true",
|
|
4815
4879
|
title: label,
|
|
4816
4880
|
className: "flex size-7 items-center justify-center rounded-md bg-muted text-muted-foreground",
|
|
4817
|
-
children: /* @__PURE__ */ (0,
|
|
4881
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_lucide_react3.Cable, { className: "size-4" })
|
|
4818
4882
|
}
|
|
4819
4883
|
);
|
|
4820
4884
|
}
|
|
@@ -4830,22 +4894,22 @@ function ConnectorMenuPanel({
|
|
|
4830
4894
|
apiUrl
|
|
4831
4895
|
}) {
|
|
4832
4896
|
const { t, i18n: i18n2 } = useChatkitTranslation();
|
|
4833
|
-
const [query, setQuery] =
|
|
4834
|
-
const [scope, setScope] =
|
|
4835
|
-
const [options, setOptions] =
|
|
4836
|
-
const [loading, setLoading] =
|
|
4837
|
-
const [error, setError] =
|
|
4838
|
-
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);
|
|
4839
4903
|
const loadErrorMessage = t("composer.connectors.loadError");
|
|
4840
4904
|
const accessDeniedMessage = t("composer.connectors.accessDenied");
|
|
4841
4905
|
const scopeUnavailableMessage = t("composer.connectors.scopeUnavailable");
|
|
4842
|
-
const pollAbortRef =
|
|
4843
|
-
const popupRef =
|
|
4844
|
-
const selectedBindingIdSet =
|
|
4906
|
+
const pollAbortRef = React12.useRef(null);
|
|
4907
|
+
const popupRef = React12.useRef(null);
|
|
4908
|
+
const selectedBindingIdSet = React12.useMemo(
|
|
4845
4909
|
() => new Set(selectedBindingIds),
|
|
4846
4910
|
[selectedBindingIds]
|
|
4847
4911
|
);
|
|
4848
|
-
const loadConnectors =
|
|
4912
|
+
const loadConnectors = React12.useCallback(
|
|
4849
4913
|
async (signal) => {
|
|
4850
4914
|
if (!client || !xpertId) return;
|
|
4851
4915
|
const response = await client.connectors.runtimeOptions(xpertId, {
|
|
@@ -4857,7 +4921,7 @@ function ConnectorMenuPanel({
|
|
|
4857
4921
|
},
|
|
4858
4922
|
[client, projectId, xpertId]
|
|
4859
4923
|
);
|
|
4860
|
-
|
|
4924
|
+
React12.useEffect(() => {
|
|
4861
4925
|
if (!client || !xpertId) {
|
|
4862
4926
|
setScope(null);
|
|
4863
4927
|
setOptions([]);
|
|
@@ -4880,7 +4944,7 @@ function ConnectorMenuPanel({
|
|
|
4880
4944
|
});
|
|
4881
4945
|
return () => controller.abort();
|
|
4882
4946
|
}, [accessDeniedMessage, client, loadConnectors, loadErrorMessage, xpertId]);
|
|
4883
|
-
|
|
4947
|
+
React12.useEffect(
|
|
4884
4948
|
() => () => {
|
|
4885
4949
|
pollAbortRef.current?.abort();
|
|
4886
4950
|
if (popupRef.current && !popupRef.current.closed) {
|
|
@@ -4891,7 +4955,7 @@ function ConnectorMenuPanel({
|
|
|
4891
4955
|
);
|
|
4892
4956
|
const manageUrl = scope ? resolveConnectorManagementUrl(apiUrl, scope) : null;
|
|
4893
4957
|
const normalizedQuery = query.trim().toLocaleLowerCase();
|
|
4894
|
-
const filteredOptions =
|
|
4958
|
+
const filteredOptions = React12.useMemo(
|
|
4895
4959
|
() => options.filter((option) => {
|
|
4896
4960
|
if (!normalizedQuery) return true;
|
|
4897
4961
|
const searchable = `${localizeText(
|
|
@@ -4902,7 +4966,7 @@ function ConnectorMenuPanel({
|
|
|
4902
4966
|
}),
|
|
4903
4967
|
[i18n2.language, normalizedQuery, options]
|
|
4904
4968
|
);
|
|
4905
|
-
const refresh =
|
|
4969
|
+
const refresh = React12.useCallback(async () => {
|
|
4906
4970
|
setLoading(true);
|
|
4907
4971
|
try {
|
|
4908
4972
|
await loadConnectors();
|
|
@@ -4911,7 +4975,7 @@ function ConnectorMenuPanel({
|
|
|
4911
4975
|
setLoading(false);
|
|
4912
4976
|
}
|
|
4913
4977
|
}, [loadConnectors]);
|
|
4914
|
-
const pollAuthorization =
|
|
4978
|
+
const pollAuthorization = React12.useCallback(
|
|
4915
4979
|
async (bindingId, initial, popup, signal) => {
|
|
4916
4980
|
if (!client) return;
|
|
4917
4981
|
let status = initial;
|
|
@@ -4948,7 +5012,7 @@ function ConnectorMenuPanel({
|
|
|
4948
5012
|
},
|
|
4949
5013
|
[client, onSelectionChange, refresh, selectedBindingIds, xpertId]
|
|
4950
5014
|
);
|
|
4951
|
-
const openManageConnectors =
|
|
5015
|
+
const openManageConnectors = React12.useCallback(() => {
|
|
4952
5016
|
if (!manageUrl) {
|
|
4953
5017
|
setError(scopeUnavailableMessage);
|
|
4954
5018
|
return;
|
|
@@ -4960,7 +5024,7 @@ function ConnectorMenuPanel({
|
|
|
4960
5024
|
}
|
|
4961
5025
|
popup.opener = null;
|
|
4962
5026
|
}, [manageUrl, scopeUnavailableMessage, t]);
|
|
4963
|
-
const connectPersonalBinding =
|
|
5027
|
+
const connectPersonalBinding = React12.useCallback(
|
|
4964
5028
|
async (option) => {
|
|
4965
5029
|
if (!client) return;
|
|
4966
5030
|
if (option.profile) {
|
|
@@ -5046,7 +5110,7 @@ function ConnectorMenuPanel({
|
|
|
5046
5110
|
xpertId
|
|
5047
5111
|
]
|
|
5048
5112
|
);
|
|
5049
|
-
const handleOptionClick =
|
|
5113
|
+
const handleOptionClick = React12.useCallback(
|
|
5050
5114
|
(option) => {
|
|
5051
5115
|
if (!isConnectorUsable(option)) {
|
|
5052
5116
|
if (option.authorizationMode === "personal") {
|
|
@@ -5067,15 +5131,15 @@ function ConnectorMenuPanel({
|
|
|
5067
5131
|
selectedBindingIds
|
|
5068
5132
|
]
|
|
5069
5133
|
);
|
|
5070
|
-
return /* @__PURE__ */ (0,
|
|
5134
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
|
|
5071
5135
|
"div",
|
|
5072
5136
|
{
|
|
5073
5137
|
"data-slot": "composer-connector-panel",
|
|
5074
5138
|
className: "flex w-full min-w-0 max-w-full flex-col",
|
|
5075
5139
|
children: [
|
|
5076
|
-
/* @__PURE__ */ (0,
|
|
5077
|
-
/* @__PURE__ */ (0,
|
|
5078
|
-
/* @__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)(
|
|
5079
5143
|
Input,
|
|
5080
5144
|
{
|
|
5081
5145
|
value: query,
|
|
@@ -5085,15 +5149,15 @@ function ConnectorMenuPanel({
|
|
|
5085
5149
|
}
|
|
5086
5150
|
)
|
|
5087
5151
|
] }) }),
|
|
5088
|
-
/* @__PURE__ */ (0,
|
|
5089
|
-
/* @__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" }),
|
|
5090
5154
|
t("composer.connectors.loading")
|
|
5091
|
-
] }) : !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) => {
|
|
5092
5156
|
const label = localizeText(option.label, i18n2.language);
|
|
5093
5157
|
const selected = selectedBindingIdSet.has(option.bindingId);
|
|
5094
5158
|
const usable = isConnectorUsable(option);
|
|
5095
5159
|
const connecting = connectingBindingId === option.bindingId;
|
|
5096
|
-
return /* @__PURE__ */ (0,
|
|
5160
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
|
|
5097
5161
|
"button",
|
|
5098
5162
|
{
|
|
5099
5163
|
type: "button",
|
|
@@ -5105,13 +5169,13 @@ function ConnectorMenuPanel({
|
|
|
5105
5169
|
),
|
|
5106
5170
|
onClick: () => handleOptionClick(option),
|
|
5107
5171
|
children: [
|
|
5108
|
-
/* @__PURE__ */ (0,
|
|
5109
|
-
/* @__PURE__ */ (0,
|
|
5110
|
-
/* @__PURE__ */ (0,
|
|
5111
|
-
/* @__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") })
|
|
5112
5176
|
] }),
|
|
5113
|
-
/* @__PURE__ */ (0,
|
|
5114
|
-
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" }),
|
|
5115
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")
|
|
5116
5180
|
] })
|
|
5117
5181
|
]
|
|
@@ -5119,9 +5183,9 @@ function ConnectorMenuPanel({
|
|
|
5119
5183
|
option.bindingId
|
|
5120
5184
|
);
|
|
5121
5185
|
}) }) }),
|
|
5122
|
-
error ? /* @__PURE__ */ (0,
|
|
5123
|
-
/* @__PURE__ */ (0,
|
|
5124
|
-
/* @__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)(
|
|
5125
5189
|
"button",
|
|
5126
5190
|
{
|
|
5127
5191
|
type: "button",
|
|
@@ -5129,7 +5193,7 @@ function ConnectorMenuPanel({
|
|
|
5129
5193
|
disabled: !scope,
|
|
5130
5194
|
onClick: openManageConnectors,
|
|
5131
5195
|
children: [
|
|
5132
|
-
/* @__PURE__ */ (0,
|
|
5196
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_lucide_react3.ArrowUpRight, { className: "size-5" }),
|
|
5133
5197
|
t("composer.connectors.manage")
|
|
5134
5198
|
]
|
|
5135
5199
|
}
|
|
@@ -5142,27 +5206,29 @@ function isAccessDenied(error) {
|
|
|
5142
5206
|
return error instanceof Error && "status" in error && (error.status === 401 || error.status === 403);
|
|
5143
5207
|
}
|
|
5144
5208
|
function ConnectorMessage({ children }) {
|
|
5145
|
-
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 });
|
|
5146
5210
|
}
|
|
5147
5211
|
|
|
5148
5212
|
// src/components/composer/ComposerMenu.tsx
|
|
5149
|
-
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;
|
|
5150
5216
|
function getIconComponent(icon) {
|
|
5151
5217
|
const iconMap = {
|
|
5152
|
-
plus: /* @__PURE__ */ (0,
|
|
5153
|
-
document: /* @__PURE__ */ (0,
|
|
5154
|
-
write: /* @__PURE__ */ (0,
|
|
5155
|
-
sparkle: /* @__PURE__ */ (0,
|
|
5156
|
-
lightbulb: /* @__PURE__ */ (0,
|
|
5157
|
-
"settings-slider": /* @__PURE__ */ (0,
|
|
5158
|
-
search: /* @__PURE__ */ (0,
|
|
5159
|
-
globe: /* @__PURE__ */ (0,
|
|
5160
|
-
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 })
|
|
5161
5227
|
};
|
|
5162
5228
|
return iconMap[icon] || iconMap.sparkle;
|
|
5163
5229
|
}
|
|
5164
5230
|
function Toggle({ checked }) {
|
|
5165
|
-
return /* @__PURE__ */ (0,
|
|
5231
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
5166
5232
|
"span",
|
|
5167
5233
|
{
|
|
5168
5234
|
"aria-hidden": "true",
|
|
@@ -5170,7 +5236,7 @@ function Toggle({ checked }) {
|
|
|
5170
5236
|
"relative inline-flex h-6 w-10 shrink-0 items-center rounded-full transition-colors",
|
|
5171
5237
|
checked ? "bg-primary" : "bg-muted-foreground/20"
|
|
5172
5238
|
),
|
|
5173
|
-
children: /* @__PURE__ */ (0,
|
|
5239
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
5174
5240
|
"span",
|
|
5175
5241
|
{
|
|
5176
5242
|
className: cn(
|
|
@@ -5206,13 +5272,14 @@ function ComposerMenu({
|
|
|
5206
5272
|
}) {
|
|
5207
5273
|
const { t } = useChatkitTranslation();
|
|
5208
5274
|
const { theme } = useTheme();
|
|
5209
|
-
const [open, setOpen] =
|
|
5210
|
-
const [activePanel, setActivePanel] =
|
|
5275
|
+
const [open, setOpen] = React13.useState(false);
|
|
5276
|
+
const [activePanel, setActivePanel] = React13.useState(
|
|
5211
5277
|
null
|
|
5212
5278
|
);
|
|
5213
|
-
const [query, setQuery] =
|
|
5214
|
-
const [collisionBoundary, setCollisionBoundary] =
|
|
5215
|
-
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);
|
|
5216
5283
|
const roundedClass = getRoundedClass(theme.radius);
|
|
5217
5284
|
const panelRoundedClass = getPanelRoundedClass(theme.radius);
|
|
5218
5285
|
const menuItemRoundedClass = getMenuItemRoundedClass(theme.radius);
|
|
@@ -5238,8 +5305,148 @@ function ComposerMenu({
|
|
|
5238
5305
|
setActivePanel(panel);
|
|
5239
5306
|
setQuery("");
|
|
5240
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;
|
|
5241
5350
|
const normalizedQuery = query.trim().toLocaleLowerCase();
|
|
5242
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
|
+
] });
|
|
5243
5450
|
const renderCapabilityPanel = (panel) => {
|
|
5244
5451
|
const isSkills = panel === "skills";
|
|
5245
5452
|
const filteredSkills = isSkills ? skills.filter((skill) => matchesQuery2(skill.label, skill.description)) : [];
|
|
@@ -5250,7 +5457,7 @@ function ComposerMenu({
|
|
|
5250
5457
|
skill.id
|
|
5251
5458
|
) : false;
|
|
5252
5459
|
const skillDescription = skill.description ?? skill.repositoryName;
|
|
5253
|
-
return /* @__PURE__ */ (0,
|
|
5460
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
5254
5461
|
DropdownMenuCheckboxItem,
|
|
5255
5462
|
{
|
|
5256
5463
|
checked: selected,
|
|
@@ -5263,14 +5470,14 @@ function ComposerMenu({
|
|
|
5263
5470
|
selected && "bg-muted"
|
|
5264
5471
|
),
|
|
5265
5472
|
children: [
|
|
5266
|
-
/* @__PURE__ */ (0,
|
|
5473
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
5267
5474
|
"span",
|
|
5268
5475
|
{
|
|
5269
5476
|
className: cn(
|
|
5270
5477
|
"flex size-7 shrink-0 items-center justify-center text-muted-foreground",
|
|
5271
5478
|
skillDescription && "mt-0.5"
|
|
5272
5479
|
),
|
|
5273
|
-
children: /* @__PURE__ */ (0,
|
|
5480
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
5274
5481
|
RuntimeCapabilityIcon,
|
|
5275
5482
|
{
|
|
5276
5483
|
option: {
|
|
@@ -5285,9 +5492,9 @@ function ComposerMenu({
|
|
|
5285
5492
|
)
|
|
5286
5493
|
}
|
|
5287
5494
|
),
|
|
5288
|
-
/* @__PURE__ */ (0,
|
|
5289
|
-
/* @__PURE__ */ (0,
|
|
5290
|
-
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 })
|
|
5291
5498
|
] })
|
|
5292
5499
|
]
|
|
5293
5500
|
},
|
|
@@ -5313,7 +5520,7 @@ function ComposerMenu({
|
|
|
5313
5520
|
"subAgent",
|
|
5314
5521
|
subAgent.nodeKey
|
|
5315
5522
|
) : false;
|
|
5316
|
-
return /* @__PURE__ */ (0,
|
|
5523
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
5317
5524
|
DropdownMenuCheckboxItem,
|
|
5318
5525
|
{
|
|
5319
5526
|
checked: selected,
|
|
@@ -5329,7 +5536,7 @@ function ComposerMenu({
|
|
|
5329
5536
|
selected && "bg-muted"
|
|
5330
5537
|
),
|
|
5331
5538
|
children: [
|
|
5332
|
-
/* @__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)(
|
|
5333
5540
|
RuntimeCapabilityIcon,
|
|
5334
5541
|
{
|
|
5335
5542
|
option: {
|
|
@@ -5342,16 +5549,17 @@ function ComposerMenu({
|
|
|
5342
5549
|
variant: "list"
|
|
5343
5550
|
}
|
|
5344
5551
|
) }),
|
|
5345
|
-
/* @__PURE__ */ (0,
|
|
5346
|
-
/* @__PURE__ */ (0,
|
|
5347
|
-
(subAgent.description || subAgent.name) && /* @__PURE__ */ (0,
|
|
5348
|
-
] })
|
|
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)
|
|
5349
5557
|
]
|
|
5350
5558
|
},
|
|
5351
5559
|
subAgent.nodeKey
|
|
5352
5560
|
);
|
|
5353
5561
|
});
|
|
5354
|
-
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)(
|
|
5355
5563
|
"button",
|
|
5356
5564
|
{
|
|
5357
5565
|
type: "button",
|
|
@@ -5364,14 +5572,14 @@ function ComposerMenu({
|
|
|
5364
5572
|
setOpen(false);
|
|
5365
5573
|
},
|
|
5366
5574
|
children: [
|
|
5367
|
-
/* @__PURE__ */ (0,
|
|
5368
|
-
/* @__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 })
|
|
5369
5577
|
]
|
|
5370
5578
|
},
|
|
5371
5579
|
tool.id
|
|
5372
5580
|
)) : [];
|
|
5373
|
-
return /* @__PURE__ */ (0,
|
|
5374
|
-
/* @__PURE__ */ (0,
|
|
5581
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_jsx_runtime15.Fragment, { children: [
|
|
5582
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
5375
5583
|
PanelSearch,
|
|
5376
5584
|
{
|
|
5377
5585
|
value: query,
|
|
@@ -5381,29 +5589,109 @@ function ComposerMenu({
|
|
|
5381
5589
|
)
|
|
5382
5590
|
}
|
|
5383
5591
|
),
|
|
5384
|
-
/* @__PURE__ */ (0,
|
|
5385
|
-
|
|
5386
|
-
|
|
5387
|
-
|
|
5388
|
-
|
|
5389
|
-
|
|
5390
|
-
|
|
5391
|
-
|
|
5392
|
-
|
|
5393
|
-
|
|
5394
|
-
|
|
5395
|
-
|
|
5396
|
-
|
|
5397
|
-
|
|
5398
|
-
|
|
5399
|
-
|
|
5400
|
-
|
|
5401
|
-
|
|
5402
|
-
|
|
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
|
+
)
|
|
5403
5618
|
] });
|
|
5404
5619
|
};
|
|
5405
|
-
|
|
5406
|
-
|
|
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)(
|
|
5407
5695
|
Button,
|
|
5408
5696
|
{
|
|
5409
5697
|
ref: triggerRef,
|
|
@@ -5417,7 +5705,7 @@ function ComposerMenu({
|
|
|
5417
5705
|
"size-9 shrink-0 transition-[background-color,border-radius] duration-300 hover:bg-muted",
|
|
5418
5706
|
open ? "rounded-full bg-muted" : roundedClass
|
|
5419
5707
|
),
|
|
5420
|
-
children: /* @__PURE__ */ (0,
|
|
5708
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
5421
5709
|
import_lucide_react4.Plus,
|
|
5422
5710
|
{
|
|
5423
5711
|
className: cn(
|
|
@@ -5428,173 +5716,116 @@ function ComposerMenu({
|
|
|
5428
5716
|
)
|
|
5429
5717
|
}
|
|
5430
5718
|
) }),
|
|
5431
|
-
/* @__PURE__ */ (0,
|
|
5719
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
5432
5720
|
DropdownMenuContent,
|
|
5433
5721
|
{
|
|
5434
5722
|
align: "start",
|
|
5435
5723
|
side: "top",
|
|
5436
5724
|
sideOffset: 8,
|
|
5437
5725
|
collisionBoundary,
|
|
5438
|
-
collisionPadding:
|
|
5726
|
+
collisionPadding: COMPOSER_MENU_COLLISION_PADDING,
|
|
5727
|
+
"data-layout": canExpandSecondaryPanel ? "wide" : "narrow",
|
|
5439
5728
|
className: cn(
|
|
5440
|
-
"bg-transparent shadow-none ring-0",
|
|
5441
|
-
|
|
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"
|
|
5442
5731
|
),
|
|
5443
|
-
children: /* @__PURE__ */ (0,
|
|
5732
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
5444
5733
|
"div",
|
|
5445
5734
|
{
|
|
5735
|
+
"data-slot": "composer-menu-layout",
|
|
5446
5736
|
className: cn(
|
|
5447
|
-
"items-end
|
|
5448
|
-
|
|
5737
|
+
"flex items-end",
|
|
5738
|
+
secondaryPanelExpandsRight && "w-full min-w-0 gap-2"
|
|
5449
5739
|
),
|
|
5450
5740
|
children: [
|
|
5451
|
-
|
|
5452
|
-
|
|
5453
|
-
|
|
5454
|
-
|
|
5455
|
-
className: cn(
|
|
5456
|
-
"w-64 max-w-full shrink-0 overflow-hidden bg-popover p-1 text-popover-foreground shadow-md ring-1 ring-foreground/10",
|
|
5457
|
-
panelRoundedClass
|
|
5458
|
-
),
|
|
5459
|
-
children: [
|
|
5460
|
-
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
|
|
5461
|
-
DropdownMenuItem,
|
|
5462
|
-
{
|
|
5463
|
-
disabled: !attachmentsEnabled,
|
|
5464
|
-
onSelect: onAttachmentClick,
|
|
5465
|
-
className: cn("gap-3 p-1.5 font-normal", menuItemRoundedClass),
|
|
5466
|
-
children: [
|
|
5467
|
-
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_lucide_react4.Paperclip, { className: "size-5" }),
|
|
5468
|
-
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "flex-1 text-base", children: t("composer.addAttachment") }),
|
|
5469
|
-
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_lucide_react4.ChevronRight, { className: "size-4" })
|
|
5470
|
-
]
|
|
5471
|
-
}
|
|
5472
|
-
),
|
|
5473
|
-
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(DropdownMenuSeparator, { className: "my-2" }),
|
|
5474
|
-
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
5475
|
-
PrimaryPanelItem,
|
|
5476
|
-
{
|
|
5477
|
-
icon: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_lucide_react4.Target, {}),
|
|
5478
|
-
label: t("composer.workbuddy.targets"),
|
|
5479
|
-
active: activePanel === "targets",
|
|
5480
|
-
onSelect: () => choosePanel("targets"),
|
|
5481
|
-
className: menuItemRoundedClass
|
|
5482
|
-
}
|
|
5483
|
-
),
|
|
5484
|
-
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
5485
|
-
PrimaryPanelItem,
|
|
5486
|
-
{
|
|
5487
|
-
icon: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_lucide_react4.Bot, {}),
|
|
5488
|
-
label: t("composer.workbuddy.experts"),
|
|
5489
|
-
count: selectedSubAgentCount,
|
|
5490
|
-
active: activePanel === "experts",
|
|
5491
|
-
onSelect: () => choosePanel("experts"),
|
|
5492
|
-
className: menuItemRoundedClass
|
|
5493
|
-
}
|
|
5494
|
-
),
|
|
5495
|
-
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
5496
|
-
PrimaryPanelItem,
|
|
5497
|
-
{
|
|
5498
|
-
icon: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_lucide_react4.WandSparkles, {}),
|
|
5499
|
-
label: t("composer.capabilities.skills"),
|
|
5500
|
-
count: selectedSkillCount,
|
|
5501
|
-
active: activePanel === "skills",
|
|
5502
|
-
onSelect: () => choosePanel("skills"),
|
|
5503
|
-
className: menuItemRoundedClass
|
|
5504
|
-
}
|
|
5505
|
-
),
|
|
5506
|
-
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
5507
|
-
PrimaryPanelItem,
|
|
5508
|
-
{
|
|
5509
|
-
icon: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_lucide_react4.Plug, {}),
|
|
5510
|
-
label: t("composer.workbuddy.connectors"),
|
|
5511
|
-
count: selectedConnectorBindingIds?.length ?? 0,
|
|
5512
|
-
active: activePanel === "connectors",
|
|
5513
|
-
disabled: !connectorsEnabled,
|
|
5514
|
-
onSelect: () => choosePanel("connectors"),
|
|
5515
|
-
className: menuItemRoundedClass
|
|
5516
|
-
}
|
|
5517
|
-
)
|
|
5518
|
-
]
|
|
5519
|
-
}
|
|
5520
|
-
),
|
|
5521
|
-
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: [
|
|
5522
|
-
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
|
|
5523
|
-
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,
|
|
5524
5745
|
{
|
|
5525
|
-
|
|
5526
|
-
|
|
5527
|
-
|
|
5528
|
-
onSelect: (event) => {
|
|
5529
|
-
event.preventDefault();
|
|
5530
|
-
onGoalPanelOpenChange?.(!goalPanelOpen);
|
|
5531
|
-
},
|
|
5532
|
-
className: cn(
|
|
5533
|
-
"gap-3 p-1.5",
|
|
5534
|
-
menuItemRoundedClass,
|
|
5535
|
-
goalPanelOpen && "bg-muted"
|
|
5536
|
-
),
|
|
5537
|
-
children: [
|
|
5538
|
-
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_lucide_react4.Target, { className: "size-5" }),
|
|
5539
|
-
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "min-w-0 flex-1 text-base", children: t("chat.goal.label") }),
|
|
5540
|
-
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Toggle, { checked: goalPanelOpen })
|
|
5541
|
-
]
|
|
5746
|
+
label: activePanelLabel,
|
|
5747
|
+
onBack: returnToPrimaryPanel,
|
|
5748
|
+
className: menuItemRoundedClass
|
|
5542
5749
|
}
|
|
5543
|
-
),
|
|
5544
|
-
/* @__PURE__ */ (0,
|
|
5545
|
-
|
|
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,
|
|
5546
5797
|
{
|
|
5547
|
-
|
|
5548
|
-
|
|
5549
|
-
|
|
5550
|
-
|
|
5551
|
-
|
|
5552
|
-
|
|
5553
|
-
className: cn(
|
|
5554
|
-
"gap-3 p-1.5",
|
|
5555
|
-
menuItemRoundedClass,
|
|
5556
|
-
planModeEnabled && "bg-muted"
|
|
5557
|
-
),
|
|
5558
|
-
children: [
|
|
5559
|
-
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_lucide_react4.ListChecks, { className: "size-5" }),
|
|
5560
|
-
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "min-w-0 flex-1 text-base", children: t("composer.planMode") }),
|
|
5561
|
-
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Toggle, { checked: planModeEnabled })
|
|
5562
|
-
]
|
|
5798
|
+
client: connectorClient ?? null,
|
|
5799
|
+
xpertId: connectorXpertId,
|
|
5800
|
+
projectId: connectorProjectId,
|
|
5801
|
+
selectedBindingIds: selectedConnectorBindingIds,
|
|
5802
|
+
onSelectionChange: onConnectorSelectionChange,
|
|
5803
|
+
apiUrl
|
|
5563
5804
|
}
|
|
5564
5805
|
)
|
|
5565
|
-
] })
|
|
5566
|
-
ConnectorMenuPanel,
|
|
5567
|
-
{
|
|
5568
|
-
client: connectorClient ?? null,
|
|
5569
|
-
xpertId: connectorXpertId,
|
|
5570
|
-
projectId: connectorProjectId,
|
|
5571
|
-
selectedBindingIds: selectedConnectorBindingIds,
|
|
5572
|
-
onSelectionChange: onConnectorSelectionChange,
|
|
5573
|
-
apiUrl
|
|
5574
|
-
}
|
|
5575
|
-
) }) : null
|
|
5806
|
+
] }) : primaryPanel
|
|
5576
5807
|
]
|
|
5577
5808
|
}
|
|
5578
5809
|
)
|
|
5579
5810
|
}
|
|
5580
5811
|
),
|
|
5581
|
-
planModeEnabled ? /* @__PURE__ */ (0,
|
|
5812
|
+
planModeEnabled ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
5582
5813
|
ActiveIndicator,
|
|
5583
5814
|
{
|
|
5584
5815
|
label: t("composer.planModeActive"),
|
|
5585
5816
|
ariaLabel: t("composer.disablePlanMode"),
|
|
5586
|
-
icon: /* @__PURE__ */ (0,
|
|
5817
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_lucide_react4.ListChecks, {}),
|
|
5587
5818
|
roundedClass,
|
|
5588
5819
|
disabled,
|
|
5589
5820
|
onClick: () => onPlanModeChange?.(false)
|
|
5590
5821
|
}
|
|
5591
5822
|
) : null,
|
|
5592
|
-
goalCommandAvailable && goalPanelOpen ? /* @__PURE__ */ (0,
|
|
5823
|
+
goalCommandAvailable && goalPanelOpen ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
5593
5824
|
ActiveIndicator,
|
|
5594
5825
|
{
|
|
5595
5826
|
label: t("chat.goal.label"),
|
|
5596
5827
|
ariaLabel: t("chat.goal.hide"),
|
|
5597
|
-
icon: /* @__PURE__ */ (0,
|
|
5828
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_lucide_react4.Target, {}),
|
|
5598
5829
|
roundedClass,
|
|
5599
5830
|
disabled,
|
|
5600
5831
|
onClick: () => onGoalPanelOpenChange?.(false)
|
|
@@ -5602,6 +5833,29 @@ function ComposerMenu({
|
|
|
5602
5833
|
) : null
|
|
5603
5834
|
] });
|
|
5604
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
|
+
}
|
|
5605
5859
|
function PrimaryPanelItem({
|
|
5606
5860
|
icon,
|
|
5607
5861
|
label,
|
|
@@ -5611,7 +5865,7 @@ function PrimaryPanelItem({
|
|
|
5611
5865
|
onSelect,
|
|
5612
5866
|
className
|
|
5613
5867
|
}) {
|
|
5614
|
-
return /* @__PURE__ */ (0,
|
|
5868
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
5615
5869
|
DropdownMenuItem,
|
|
5616
5870
|
{
|
|
5617
5871
|
disabled,
|
|
@@ -5621,10 +5875,10 @@ function PrimaryPanelItem({
|
|
|
5621
5875
|
},
|
|
5622
5876
|
className: cn("gap-3 p-1.5 font-normal", className, active && "bg-muted"),
|
|
5623
5877
|
children: [
|
|
5624
|
-
|
|
5625
|
-
/* @__PURE__ */ (0,
|
|
5626
|
-
count > 0 ? /* @__PURE__ */ (0,
|
|
5627
|
-
/* @__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" })
|
|
5628
5882
|
]
|
|
5629
5883
|
}
|
|
5630
5884
|
);
|
|
@@ -5633,20 +5887,20 @@ function SecondaryPanel({
|
|
|
5633
5887
|
panelRoundedClass,
|
|
5634
5888
|
children
|
|
5635
5889
|
}) {
|
|
5636
|
-
return /* @__PURE__ */ (0,
|
|
5890
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
5637
5891
|
"div",
|
|
5638
5892
|
{
|
|
5639
5893
|
"data-slot": "composer-secondary-panel",
|
|
5640
5894
|
className: cn(
|
|
5641
|
-
"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",
|
|
5642
5896
|
panelRoundedClass
|
|
5643
5897
|
),
|
|
5644
|
-
children: /* @__PURE__ */ (0,
|
|
5898
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
5645
5899
|
"div",
|
|
5646
5900
|
{
|
|
5647
5901
|
"data-slot": "composer-secondary-scroll",
|
|
5648
|
-
className: "w-full min-w-0 overflow-x-
|
|
5649
|
-
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 })
|
|
5650
5904
|
}
|
|
5651
5905
|
)
|
|
5652
5906
|
}
|
|
@@ -5657,9 +5911,9 @@ function PanelSearch({
|
|
|
5657
5911
|
onChange,
|
|
5658
5912
|
placeholder
|
|
5659
5913
|
}) {
|
|
5660
|
-
return /* @__PURE__ */ (0,
|
|
5661
|
-
/* @__PURE__ */ (0,
|
|
5662
|
-
/* @__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)(
|
|
5663
5917
|
Input,
|
|
5664
5918
|
{
|
|
5665
5919
|
autoFocus: true,
|
|
@@ -5669,14 +5923,14 @@ function PanelSearch({
|
|
|
5669
5923
|
className: "h-8 border-0 bg-muted pl-10 text-base shadow-none focus-visible:ring-1"
|
|
5670
5924
|
}
|
|
5671
5925
|
)
|
|
5672
|
-
] });
|
|
5926
|
+
] }) });
|
|
5673
5927
|
}
|
|
5674
5928
|
function SkillGroup({
|
|
5675
5929
|
label,
|
|
5676
5930
|
children
|
|
5677
5931
|
}) {
|
|
5678
|
-
return /* @__PURE__ */ (0,
|
|
5679
|
-
/* @__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 }),
|
|
5680
5934
|
children
|
|
5681
5935
|
] });
|
|
5682
5936
|
}
|
|
@@ -5688,7 +5942,7 @@ function ActiveIndicator({
|
|
|
5688
5942
|
disabled,
|
|
5689
5943
|
onClick
|
|
5690
5944
|
}) {
|
|
5691
|
-
return /* @__PURE__ */ (0,
|
|
5945
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
5692
5946
|
"button",
|
|
5693
5947
|
{
|
|
5694
5948
|
type: "button",
|
|
@@ -5700,28 +5954,28 @@ function ActiveIndicator({
|
|
|
5700
5954
|
roundedClass
|
|
5701
5955
|
),
|
|
5702
5956
|
children: [
|
|
5703
|
-
|
|
5704
|
-
/* @__PURE__ */ (0,
|
|
5705
|
-
/* @__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" })
|
|
5706
5960
|
]
|
|
5707
5961
|
}
|
|
5708
5962
|
);
|
|
5709
5963
|
}
|
|
5710
5964
|
|
|
5711
5965
|
// src/components/composer/ModelPicker.tsx
|
|
5712
|
-
var
|
|
5966
|
+
var React14 = __toESM(require("react"), 1);
|
|
5713
5967
|
var import_lucide_react5 = require("lucide-react");
|
|
5714
|
-
var
|
|
5968
|
+
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
5715
5969
|
function ModelProviderAvatar({
|
|
5716
5970
|
avatar,
|
|
5717
5971
|
className,
|
|
5718
5972
|
imageClassName,
|
|
5719
5973
|
iconClassName
|
|
5720
5974
|
}) {
|
|
5721
|
-
const [failedUrl, setFailedUrl] =
|
|
5975
|
+
const [failedUrl, setFailedUrl] = React14.useState(null);
|
|
5722
5976
|
const avatarUrl = avatar?.url;
|
|
5723
5977
|
const showImage = Boolean(avatarUrl && failedUrl !== avatarUrl);
|
|
5724
|
-
return /* @__PURE__ */ (0,
|
|
5978
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
5725
5979
|
"span",
|
|
5726
5980
|
{
|
|
5727
5981
|
"aria-hidden": "true",
|
|
@@ -5731,7 +5985,7 @@ function ModelProviderAvatar({
|
|
|
5731
5985
|
className
|
|
5732
5986
|
),
|
|
5733
5987
|
style: avatar?.background ? { backgroundColor: avatar.background } : void 0,
|
|
5734
|
-
children: showImage ? /* @__PURE__ */ (0,
|
|
5988
|
+
children: showImage ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
5735
5989
|
"img",
|
|
5736
5990
|
{
|
|
5737
5991
|
"data-slot": "model-provider-avatar-image",
|
|
@@ -5740,7 +5994,7 @@ function ModelProviderAvatar({
|
|
|
5740
5994
|
className: cn("size-full object-contain p-1", imageClassName),
|
|
5741
5995
|
onError: () => setFailedUrl(avatarUrl ?? null)
|
|
5742
5996
|
}
|
|
5743
|
-
) : /* @__PURE__ */ (0,
|
|
5997
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_lucide_react5.Bot, { "aria-hidden": "true", className: cn("size-3.5", iconClassName) })
|
|
5744
5998
|
}
|
|
5745
5999
|
);
|
|
5746
6000
|
}
|
|
@@ -5756,8 +6010,8 @@ function ModelPicker({
|
|
|
5756
6010
|
const selectedModel = enabledModels.find(
|
|
5757
6011
|
(model) => model.id === selectedModelId
|
|
5758
6012
|
);
|
|
5759
|
-
return /* @__PURE__ */ (0,
|
|
5760
|
-
/* @__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)(
|
|
5761
6015
|
"button",
|
|
5762
6016
|
{
|
|
5763
6017
|
type: "button",
|
|
@@ -5771,7 +6025,7 @@ function ModelPicker({
|
|
|
5771
6025
|
"disabled:pointer-events-none disabled:opacity-50"
|
|
5772
6026
|
),
|
|
5773
6027
|
children: [
|
|
5774
|
-
/* @__PURE__ */ (0,
|
|
6028
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
5775
6029
|
ModelProviderAvatar,
|
|
5776
6030
|
{
|
|
5777
6031
|
avatar: selectedModel?.avatar,
|
|
@@ -5780,8 +6034,8 @@ function ModelPicker({
|
|
|
5780
6034
|
iconClassName: "size-3"
|
|
5781
6035
|
}
|
|
5782
6036
|
),
|
|
5783
|
-
/* @__PURE__ */ (0,
|
|
5784
|
-
/* @__PURE__ */ (0,
|
|
6037
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "truncate", children: selectedModel?.label ?? copy.label }),
|
|
6038
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
5785
6039
|
import_lucide_react5.ChevronDown,
|
|
5786
6040
|
{
|
|
5787
6041
|
"aria-hidden": "true",
|
|
@@ -5791,7 +6045,7 @@ function ModelPicker({
|
|
|
5791
6045
|
]
|
|
5792
6046
|
}
|
|
5793
6047
|
) }),
|
|
5794
|
-
/* @__PURE__ */ (0,
|
|
6048
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
|
|
5795
6049
|
DropdownMenuContent,
|
|
5796
6050
|
{
|
|
5797
6051
|
align: "end",
|
|
@@ -5800,8 +6054,8 @@ function ModelPicker({
|
|
|
5800
6054
|
collisionPadding: 12,
|
|
5801
6055
|
className: "w-80 max-w-[calc(100vw-1.5rem)] overflow-hidden rounded-xl p-0",
|
|
5802
6056
|
children: [
|
|
5803
|
-
/* @__PURE__ */ (0,
|
|
5804
|
-
/* @__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)(
|
|
5805
6059
|
ModelProviderAvatar,
|
|
5806
6060
|
{
|
|
5807
6061
|
avatar: selectedModel?.avatar,
|
|
@@ -5809,34 +6063,34 @@ function ModelPicker({
|
|
|
5809
6063
|
iconClassName: "size-4"
|
|
5810
6064
|
}
|
|
5811
6065
|
),
|
|
5812
|
-
/* @__PURE__ */ (0,
|
|
5813
|
-
/* @__PURE__ */ (0,
|
|
5814
|
-
/* @__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 })
|
|
5815
6069
|
] })
|
|
5816
6070
|
] }),
|
|
5817
|
-
/* @__PURE__ */ (0,
|
|
5818
|
-
/* @__PURE__ */ (0,
|
|
5819
|
-
/* @__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)(
|
|
5820
6074
|
DropdownMenuRadioGroup,
|
|
5821
6075
|
{
|
|
5822
6076
|
value: selectedModel?.id ?? "",
|
|
5823
6077
|
onValueChange: onSelect,
|
|
5824
6078
|
className: "space-y-0.5 px-1.5 pb-1.5",
|
|
5825
|
-
children: models.map((model) => /* @__PURE__ */ (0,
|
|
6079
|
+
children: models.map((model) => /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
|
|
5826
6080
|
DropdownMenuRadioItem,
|
|
5827
6081
|
{
|
|
5828
6082
|
value: model.id,
|
|
5829
6083
|
disabled: model.disabled,
|
|
5830
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",
|
|
5831
6085
|
children: [
|
|
5832
|
-
/* @__PURE__ */ (0,
|
|
5833
|
-
/* @__PURE__ */ (0,
|
|
5834
|
-
/* @__PURE__ */ (0,
|
|
5835
|
-
/* @__PURE__ */ (0,
|
|
5836
|
-
model.default ? /* @__PURE__ */ (0,
|
|
5837
|
-
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
|
|
5838
6092
|
] }),
|
|
5839
|
-
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
|
|
5840
6094
|
] })
|
|
5841
6095
|
]
|
|
5842
6096
|
},
|
|
@@ -5844,26 +6098,26 @@ function ModelPicker({
|
|
|
5844
6098
|
))
|
|
5845
6099
|
}
|
|
5846
6100
|
),
|
|
5847
|
-
/* @__PURE__ */ (0,
|
|
5848
|
-
/* @__PURE__ */ (0,
|
|
6101
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(DropdownMenuSeparator, { className: "mx-0 my-0" }),
|
|
6102
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
|
|
5849
6103
|
"div",
|
|
5850
6104
|
{
|
|
5851
6105
|
"data-slot": "model-picker-future-controls",
|
|
5852
6106
|
className: "flex items-center gap-2.5 bg-muted/30 px-3 py-2.5",
|
|
5853
6107
|
"aria-disabled": "true",
|
|
5854
6108
|
children: [
|
|
5855
|
-
/* @__PURE__ */ (0,
|
|
6109
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
5856
6110
|
import_lucide_react5.SlidersHorizontal,
|
|
5857
6111
|
{
|
|
5858
6112
|
"aria-hidden": "true",
|
|
5859
6113
|
className: "size-4 shrink-0 text-muted-foreground"
|
|
5860
6114
|
}
|
|
5861
6115
|
),
|
|
5862
|
-
/* @__PURE__ */ (0,
|
|
5863
|
-
/* @__PURE__ */ (0,
|
|
5864
|
-
/* @__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 })
|
|
5865
6119
|
] }),
|
|
5866
|
-
/* @__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 })
|
|
5867
6121
|
]
|
|
5868
6122
|
}
|
|
5869
6123
|
)
|
|
@@ -5874,9 +6128,9 @@ function ModelPicker({
|
|
|
5874
6128
|
}
|
|
5875
6129
|
|
|
5876
6130
|
// src/components/composer/WorkspaceFileMentionPalette.tsx
|
|
5877
|
-
var
|
|
6131
|
+
var React15 = __toESM(require("react"), 1);
|
|
5878
6132
|
var import_lucide_react6 = require("lucide-react");
|
|
5879
|
-
var
|
|
6133
|
+
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
5880
6134
|
var WORKSPACE_FILE_LIST_DEPTH = 12;
|
|
5881
6135
|
function getWorkspaceFilePath(file) {
|
|
5882
6136
|
return file.fullPath?.trim() || file.filePath.trim();
|
|
@@ -5888,7 +6142,7 @@ function flattenWorkspaceFiles(files) {
|
|
|
5888
6142
|
return [...isDirectory ? [] : [file], ...flattenWorkspaceFiles(children)];
|
|
5889
6143
|
});
|
|
5890
6144
|
}
|
|
5891
|
-
var WorkspaceFileMentionPalette =
|
|
6145
|
+
var WorkspaceFileMentionPalette = React15.forwardRef(function WorkspaceFileMentionPalette2({
|
|
5892
6146
|
client,
|
|
5893
6147
|
assistantId,
|
|
5894
6148
|
projectId,
|
|
@@ -5898,14 +6152,14 @@ var WorkspaceFileMentionPalette = React14.forwardRef(function WorkspaceFileMenti
|
|
|
5898
6152
|
className
|
|
5899
6153
|
}, ref) {
|
|
5900
6154
|
const { t } = useChatkitTranslation();
|
|
5901
|
-
const [files, setFiles] =
|
|
5902
|
-
const [loading, setLoading] =
|
|
5903
|
-
const [error, setError] =
|
|
5904
|
-
const [activeIndex, setActiveIndex] =
|
|
5905
|
-
const activeIndexRef =
|
|
5906
|
-
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([]);
|
|
5907
6161
|
const loadErrorMessage = t("composer.fileMentions.loadError");
|
|
5908
|
-
|
|
6162
|
+
React15.useEffect(() => {
|
|
5909
6163
|
if (!client || !projectId && !assistantId) {
|
|
5910
6164
|
setFiles([]);
|
|
5911
6165
|
setLoading(false);
|
|
@@ -5937,7 +6191,7 @@ var WorkspaceFileMentionPalette = React14.forwardRef(function WorkspaceFileMenti
|
|
|
5937
6191
|
return () => controller.abort();
|
|
5938
6192
|
}, [assistantId, client, loadErrorMessage, projectId]);
|
|
5939
6193
|
const normalizedQuery = query.trim().toLocaleLowerCase();
|
|
5940
|
-
const visibleFiles =
|
|
6194
|
+
const visibleFiles = React15.useMemo(
|
|
5941
6195
|
() => files.filter((file) => {
|
|
5942
6196
|
const filePath = getWorkspaceFilePath(file);
|
|
5943
6197
|
if (selectedFilePaths.has(filePath)) return false;
|
|
@@ -5946,17 +6200,17 @@ var WorkspaceFileMentionPalette = React14.forwardRef(function WorkspaceFileMenti
|
|
|
5946
6200
|
}),
|
|
5947
6201
|
[files, normalizedQuery, selectedFilePaths]
|
|
5948
6202
|
);
|
|
5949
|
-
|
|
6203
|
+
React15.useLayoutEffect(() => {
|
|
5950
6204
|
setActiveIndex((current) => {
|
|
5951
6205
|
const nextIndex = visibleFiles.length === 0 ? 0 : Math.min(current, visibleFiles.length - 1);
|
|
5952
6206
|
activeIndexRef.current = nextIndex;
|
|
5953
6207
|
return nextIndex;
|
|
5954
6208
|
});
|
|
5955
6209
|
}, [visibleFiles.length]);
|
|
5956
|
-
|
|
6210
|
+
React15.useEffect(() => {
|
|
5957
6211
|
optionRefs.current[activeIndex]?.scrollIntoView?.({ block: "nearest" });
|
|
5958
6212
|
}, [activeIndex]);
|
|
5959
|
-
|
|
6213
|
+
React15.useImperativeHandle(
|
|
5960
6214
|
ref,
|
|
5961
6215
|
() => ({
|
|
5962
6216
|
moveActive: (direction) => {
|
|
@@ -5975,7 +6229,7 @@ var WorkspaceFileMentionPalette = React14.forwardRef(function WorkspaceFileMenti
|
|
|
5975
6229
|
[onSelect, visibleFiles]
|
|
5976
6230
|
);
|
|
5977
6231
|
const unavailable = !client || !projectId && !assistantId;
|
|
5978
|
-
return /* @__PURE__ */ (0,
|
|
6232
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
5979
6233
|
"div",
|
|
5980
6234
|
{
|
|
5981
6235
|
"data-slot": "workspace-file-mention-palette",
|
|
@@ -5984,20 +6238,20 @@ var WorkspaceFileMentionPalette = React14.forwardRef(function WorkspaceFileMenti
|
|
|
5984
6238
|
className
|
|
5985
6239
|
),
|
|
5986
6240
|
children: [
|
|
5987
|
-
/* @__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: [
|
|
5988
6242
|
t("composer.fileMentions.title"),
|
|
5989
|
-
query ? /* @__PURE__ */ (0,
|
|
6243
|
+
query ? /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("span", { className: "ml-1 text-foreground", children: [
|
|
5990
6244
|
"@",
|
|
5991
6245
|
query
|
|
5992
6246
|
] }) : null
|
|
5993
6247
|
] }),
|
|
5994
|
-
/* @__PURE__ */ (0,
|
|
5995
|
-
/* @__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" }),
|
|
5996
6250
|
t("composer.fileMentions.loading")
|
|
5997
|
-
] }) : 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) => {
|
|
5998
6252
|
const filePath = getWorkspaceFilePath(file);
|
|
5999
6253
|
const label = file.filePath || filePath;
|
|
6000
|
-
return /* @__PURE__ */ (0,
|
|
6254
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
6001
6255
|
"button",
|
|
6002
6256
|
{
|
|
6003
6257
|
ref: (node) => {
|
|
@@ -6018,10 +6272,10 @@ var WorkspaceFileMentionPalette = React14.forwardRef(function WorkspaceFileMenti
|
|
|
6018
6272
|
index === activeIndex && "bg-muted"
|
|
6019
6273
|
),
|
|
6020
6274
|
children: [
|
|
6021
|
-
/* @__PURE__ */ (0,
|
|
6022
|
-
/* @__PURE__ */ (0,
|
|
6023
|
-
/* @__PURE__ */ (0,
|
|
6024
|
-
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
|
|
6025
6279
|
] })
|
|
6026
6280
|
]
|
|
6027
6281
|
},
|
|
@@ -6036,7 +6290,7 @@ function PaletteMessage({
|
|
|
6036
6290
|
children,
|
|
6037
6291
|
role
|
|
6038
6292
|
}) {
|
|
6039
|
-
return /* @__PURE__ */ (0,
|
|
6293
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
6040
6294
|
"div",
|
|
6041
6295
|
{
|
|
6042
6296
|
role,
|
|
@@ -6047,22 +6301,22 @@ function PaletteMessage({
|
|
|
6047
6301
|
}
|
|
6048
6302
|
|
|
6049
6303
|
// src/components/composer/ProjectSelector.tsx
|
|
6050
|
-
var
|
|
6304
|
+
var React17 = __toESM(require("react"), 1);
|
|
6051
6305
|
var import_lucide_react7 = require("lucide-react");
|
|
6052
6306
|
|
|
6053
6307
|
// src/components/ui/popover.tsx
|
|
6054
|
-
var
|
|
6308
|
+
var React16 = require("react");
|
|
6055
6309
|
var PopoverPrimitive = __toESM(require("@radix-ui/react-popover"), 1);
|
|
6056
|
-
var
|
|
6310
|
+
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
6057
6311
|
function Popover({
|
|
6058
6312
|
...props
|
|
6059
6313
|
}) {
|
|
6060
|
-
return /* @__PURE__ */ (0,
|
|
6314
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(PopoverPrimitive.Root, { "data-slot": "popover", ...props });
|
|
6061
6315
|
}
|
|
6062
6316
|
function PopoverTrigger({
|
|
6063
6317
|
...props
|
|
6064
6318
|
}) {
|
|
6065
|
-
return /* @__PURE__ */ (0,
|
|
6319
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(PopoverPrimitive.Trigger, { "data-slot": "popover-trigger", ...props });
|
|
6066
6320
|
}
|
|
6067
6321
|
function PopoverContent({
|
|
6068
6322
|
className,
|
|
@@ -6070,7 +6324,7 @@ function PopoverContent({
|
|
|
6070
6324
|
sideOffset = 4,
|
|
6071
6325
|
...props
|
|
6072
6326
|
}) {
|
|
6073
|
-
return /* @__PURE__ */ (0,
|
|
6327
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(PopoverPrimitive.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
6074
6328
|
PopoverPrimitive.Content,
|
|
6075
6329
|
{
|
|
6076
6330
|
"data-slot": "popover-content",
|
|
@@ -6086,7 +6340,7 @@ function PopoverContent({
|
|
|
6086
6340
|
}
|
|
6087
6341
|
|
|
6088
6342
|
// src/components/composer/ProjectSelector.tsx
|
|
6089
|
-
var
|
|
6343
|
+
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
6090
6344
|
var PROJECT_PAGE_SIZE = 100;
|
|
6091
6345
|
async function listAllAvailableProjects(projectsClient, xpertId, signal) {
|
|
6092
6346
|
const projects = [];
|
|
@@ -6120,20 +6374,20 @@ function ProjectSelector({
|
|
|
6120
6374
|
}) {
|
|
6121
6375
|
const { t } = useChatkitTranslation();
|
|
6122
6376
|
const { theme } = useTheme();
|
|
6123
|
-
const [open, setOpen] =
|
|
6124
|
-
const [query, setQuery] =
|
|
6125
|
-
const [createMode, setCreateMode] =
|
|
6126
|
-
const [newProjectName, setNewProjectName] =
|
|
6127
|
-
const [projects, setProjects] =
|
|
6128
|
-
const [loadFailed, setLoadFailed] =
|
|
6129
|
-
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);
|
|
6130
6384
|
const panelRoundedClass = getPanelRoundedClass(theme.radius);
|
|
6131
6385
|
const menuItemRoundedClass = getMenuItemRoundedClass(theme.radius);
|
|
6132
6386
|
const lockedProjectLabel = label?.trim();
|
|
6133
|
-
|
|
6387
|
+
React17.useEffect(() => {
|
|
6134
6388
|
if (disabled) setOpen(false);
|
|
6135
6389
|
}, [disabled]);
|
|
6136
|
-
|
|
6390
|
+
React17.useEffect(() => {
|
|
6137
6391
|
if (locked) {
|
|
6138
6392
|
setProjects([]);
|
|
6139
6393
|
setLoadFailed(false);
|
|
@@ -6173,12 +6427,12 @@ function ProjectSelector({
|
|
|
6173
6427
|
});
|
|
6174
6428
|
return () => controller.abort();
|
|
6175
6429
|
}, [client, locked, xpertId]);
|
|
6176
|
-
const activeProject =
|
|
6430
|
+
const activeProject = React17.useMemo(
|
|
6177
6431
|
() => projects.find((project) => project.id === activeProjectId) ?? null,
|
|
6178
6432
|
[activeProjectId, projects]
|
|
6179
6433
|
);
|
|
6180
6434
|
const normalizedQuery = query.trim().toLocaleLowerCase();
|
|
6181
|
-
const filteredProjects =
|
|
6435
|
+
const filteredProjects = React17.useMemo(
|
|
6182
6436
|
() => projects.filter((project) => {
|
|
6183
6437
|
if (!normalizedQuery) return true;
|
|
6184
6438
|
return project.name.toLocaleLowerCase().includes(normalizedQuery);
|
|
@@ -6188,24 +6442,24 @@ function ProjectSelector({
|
|
|
6188
6442
|
const hasAvailableProjects = locked ? Boolean(activeProjectId) : loadedFor?.client === client && loadedFor.xpertId === xpertId && !loadFailed && projects.length > 0;
|
|
6189
6443
|
const projectRailAvailable = hasAvailableProjects || Boolean(onProjectCreate);
|
|
6190
6444
|
const isLoadingProjects = !locked && Boolean(client && xpertId) && loadedFor === null && !loadFailed;
|
|
6191
|
-
|
|
6445
|
+
React17.useEffect(() => {
|
|
6192
6446
|
onAvailabilityChange?.(projectRailAvailable);
|
|
6193
6447
|
}, [onAvailabilityChange, projectRailAvailable]);
|
|
6194
6448
|
if (locked && activeProjectId) {
|
|
6195
|
-
return /* @__PURE__ */ (0,
|
|
6449
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
6196
6450
|
"div",
|
|
6197
6451
|
{
|
|
6198
6452
|
"data-slot": "composer-project-rail",
|
|
6199
6453
|
className: "flex h-10 min-w-0 items-center px-1",
|
|
6200
|
-
children: /* @__PURE__ */ (0,
|
|
6454
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
6201
6455
|
"div",
|
|
6202
6456
|
{
|
|
6203
6457
|
"data-slot": "composer-project-locked",
|
|
6204
6458
|
className: "inline-flex h-5 max-w-full items-center gap-1.5 rounded-sm px-2 text-sm text-muted-foreground",
|
|
6205
6459
|
title: lockedProjectLabel || activeProjectId,
|
|
6206
6460
|
children: [
|
|
6207
|
-
/* @__PURE__ */ (0,
|
|
6208
|
-
/* @__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 })
|
|
6209
6463
|
]
|
|
6210
6464
|
}
|
|
6211
6465
|
)
|
|
@@ -6213,12 +6467,12 @@ function ProjectSelector({
|
|
|
6213
6467
|
);
|
|
6214
6468
|
}
|
|
6215
6469
|
if (!projectRailAvailable) return null;
|
|
6216
|
-
return /* @__PURE__ */ (0,
|
|
6470
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
6217
6471
|
"div",
|
|
6218
6472
|
{
|
|
6219
6473
|
"data-slot": "composer-project-rail",
|
|
6220
6474
|
className: "flex h-10 min-w-0 items-center px-1",
|
|
6221
|
-
children: /* @__PURE__ */ (0,
|
|
6475
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
6222
6476
|
Popover,
|
|
6223
6477
|
{
|
|
6224
6478
|
open,
|
|
@@ -6231,7 +6485,7 @@ function ProjectSelector({
|
|
|
6231
6485
|
}
|
|
6232
6486
|
},
|
|
6233
6487
|
children: [
|
|
6234
|
-
/* @__PURE__ */ (0,
|
|
6488
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
6235
6489
|
"button",
|
|
6236
6490
|
{
|
|
6237
6491
|
type: "button",
|
|
@@ -6239,13 +6493,13 @@ function ProjectSelector({
|
|
|
6239
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",
|
|
6240
6494
|
"aria-label": t("composer.projects.select"),
|
|
6241
6495
|
children: [
|
|
6242
|
-
/* @__PURE__ */ (0,
|
|
6243
|
-
/* @__PURE__ */ (0,
|
|
6244
|
-
/* @__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" })
|
|
6245
6499
|
]
|
|
6246
6500
|
}
|
|
6247
6501
|
) }),
|
|
6248
|
-
/* @__PURE__ */ (0,
|
|
6502
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
6249
6503
|
PopoverContent,
|
|
6250
6504
|
{
|
|
6251
6505
|
side: "top",
|
|
@@ -6253,15 +6507,15 @@ function ProjectSelector({
|
|
|
6253
6507
|
sideOffset: 8,
|
|
6254
6508
|
collisionPadding: 8,
|
|
6255
6509
|
className: cn(
|
|
6256
|
-
"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",
|
|
6257
6511
|
panelRoundedClass
|
|
6258
6512
|
),
|
|
6259
|
-
children: /* @__PURE__ */ (0,
|
|
6513
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
6260
6514
|
"div",
|
|
6261
6515
|
{
|
|
6262
6516
|
"data-slot": "composer-project-command",
|
|
6263
|
-
className: "flex
|
|
6264
|
-
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)(
|
|
6265
6519
|
"form",
|
|
6266
6520
|
{
|
|
6267
6521
|
"data-slot": "composer-project-create-form",
|
|
@@ -6274,7 +6528,7 @@ function ProjectSelector({
|
|
|
6274
6528
|
setOpen(false);
|
|
6275
6529
|
},
|
|
6276
6530
|
children: [
|
|
6277
|
-
/* @__PURE__ */ (0,
|
|
6531
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
6278
6532
|
Input,
|
|
6279
6533
|
{
|
|
6280
6534
|
autoFocus: true,
|
|
@@ -6289,8 +6543,8 @@ function ProjectSelector({
|
|
|
6289
6543
|
)
|
|
6290
6544
|
}
|
|
6291
6545
|
),
|
|
6292
|
-
/* @__PURE__ */ (0,
|
|
6293
|
-
/* @__PURE__ */ (0,
|
|
6546
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "flex justify-end gap-2", children: [
|
|
6547
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
6294
6548
|
"button",
|
|
6295
6549
|
{
|
|
6296
6550
|
type: "button",
|
|
@@ -6302,7 +6556,7 @@ function ProjectSelector({
|
|
|
6302
6556
|
children: t("composer.projects.cancel")
|
|
6303
6557
|
}
|
|
6304
6558
|
),
|
|
6305
|
-
/* @__PURE__ */ (0,
|
|
6559
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
6306
6560
|
"button",
|
|
6307
6561
|
{
|
|
6308
6562
|
type: "submit",
|
|
@@ -6314,15 +6568,15 @@ function ProjectSelector({
|
|
|
6314
6568
|
] })
|
|
6315
6569
|
]
|
|
6316
6570
|
}
|
|
6317
|
-
) : /* @__PURE__ */ (0,
|
|
6318
|
-
/* @__PURE__ */ (0,
|
|
6571
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_jsx_runtime19.Fragment, { children: [
|
|
6572
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
6319
6573
|
"div",
|
|
6320
6574
|
{
|
|
6321
6575
|
"data-slot": "composer-project-search",
|
|
6322
|
-
className: "relative mb-2",
|
|
6576
|
+
className: "relative mb-2 shrink-0",
|
|
6323
6577
|
children: [
|
|
6324
|
-
/* @__PURE__ */ (0,
|
|
6325
|
-
/* @__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)(
|
|
6326
6580
|
Input,
|
|
6327
6581
|
{
|
|
6328
6582
|
autoFocus: true,
|
|
@@ -6338,70 +6592,77 @@ function ProjectSelector({
|
|
|
6338
6592
|
]
|
|
6339
6593
|
}
|
|
6340
6594
|
),
|
|
6341
|
-
/* @__PURE__ */ (0,
|
|
6595
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
6342
6596
|
"div",
|
|
6343
6597
|
{
|
|
6344
|
-
"data-slot": "composer-project-
|
|
6345
|
-
className: "
|
|
6346
|
-
children:
|
|
6347
|
-
|
|
6348
|
-
|
|
6349
|
-
|
|
6350
|
-
|
|
6351
|
-
|
|
6352
|
-
|
|
6353
|
-
"
|
|
6354
|
-
|
|
6355
|
-
|
|
6356
|
-
|
|
6357
|
-
|
|
6358
|
-
|
|
6359
|
-
|
|
6360
|
-
|
|
6361
|
-
|
|
6362
|
-
|
|
6363
|
-
|
|
6364
|
-
|
|
6365
|
-
|
|
6366
|
-
|
|
6367
|
-
|
|
6368
|
-
|
|
6369
|
-
|
|
6370
|
-
type: "button",
|
|
6371
|
-
"data-slot": "composer-project-item",
|
|
6372
|
-
className: cn(
|
|
6373
|
-
"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",
|
|
6374
|
-
menuItemRoundedClass,
|
|
6375
|
-
project.id === activeProjectId && "bg-accent text-accent-foreground"
|
|
6376
|
-
),
|
|
6377
|
-
onClick: () => {
|
|
6378
|
-
if (disabled) return;
|
|
6379
|
-
if (project.id !== activeProjectId) {
|
|
6380
|
-
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
|
+
]
|
|
6381
6624
|
}
|
|
6382
|
-
|
|
6383
|
-
},
|
|
6384
|
-
|
|
6385
|
-
|
|
6386
|
-
|
|
6387
|
-
|
|
6388
|
-
|
|
6389
|
-
|
|
6390
|
-
|
|
6391
|
-
|
|
6392
|
-
|
|
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
|
+
)
|
|
6393
6654
|
}
|
|
6394
|
-
)
|
|
6395
|
-
onProjectCreate ? /* @__PURE__ */ (0,
|
|
6655
|
+
),
|
|
6656
|
+
onProjectCreate ? /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
6396
6657
|
"button",
|
|
6397
6658
|
{
|
|
6398
6659
|
type: "button",
|
|
6399
6660
|
"data-slot": "composer-project-create",
|
|
6400
|
-
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",
|
|
6401
6662
|
onClick: () => setCreateMode(true),
|
|
6402
6663
|
children: [
|
|
6403
|
-
/* @__PURE__ */ (0,
|
|
6404
|
-
/* @__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") })
|
|
6405
6666
|
]
|
|
6406
6667
|
}
|
|
6407
6668
|
) : null
|
|
@@ -6417,77 +6678,11 @@ function ProjectSelector({
|
|
|
6417
6678
|
);
|
|
6418
6679
|
}
|
|
6419
6680
|
function ProjectMessage({ children }) {
|
|
6420
|
-
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 });
|
|
6421
6682
|
}
|
|
6422
6683
|
|
|
6423
6684
|
// src/components/composer/SendButton.tsx
|
|
6424
6685
|
var import_lucide_react8 = require("lucide-react");
|
|
6425
|
-
|
|
6426
|
-
// src/components/ui/tooltip.tsx
|
|
6427
|
-
var React17 = require("react");
|
|
6428
|
-
var TooltipPrimitive = __toESM(require("@radix-ui/react-tooltip"), 1);
|
|
6429
|
-
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
6430
|
-
function TooltipProvider({
|
|
6431
|
-
delayDuration = 0,
|
|
6432
|
-
...props
|
|
6433
|
-
}) {
|
|
6434
|
-
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
6435
|
-
TooltipPrimitive.Provider,
|
|
6436
|
-
{
|
|
6437
|
-
"data-slot": "tooltip-provider",
|
|
6438
|
-
delayDuration,
|
|
6439
|
-
...props
|
|
6440
|
-
}
|
|
6441
|
-
);
|
|
6442
|
-
}
|
|
6443
|
-
function Tooltip({
|
|
6444
|
-
...props
|
|
6445
|
-
}) {
|
|
6446
|
-
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(TooltipProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
6447
|
-
TooltipPrimitive.Root,
|
|
6448
|
-
{
|
|
6449
|
-
"data-slot": "tooltip",
|
|
6450
|
-
...props
|
|
6451
|
-
}
|
|
6452
|
-
) });
|
|
6453
|
-
}
|
|
6454
|
-
function TooltipTrigger({
|
|
6455
|
-
...props
|
|
6456
|
-
}) {
|
|
6457
|
-
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
6458
|
-
TooltipPrimitive.Trigger,
|
|
6459
|
-
{
|
|
6460
|
-
"data-slot": "tooltip-trigger",
|
|
6461
|
-
...props
|
|
6462
|
-
}
|
|
6463
|
-
);
|
|
6464
|
-
}
|
|
6465
|
-
function TooltipContent({
|
|
6466
|
-
className,
|
|
6467
|
-
sideOffset = 0,
|
|
6468
|
-
hideArrow = false,
|
|
6469
|
-
children,
|
|
6470
|
-
...props
|
|
6471
|
-
}) {
|
|
6472
|
-
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(TooltipPrimitive.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
6473
|
-
TooltipPrimitive.Content,
|
|
6474
|
-
{
|
|
6475
|
-
"data-slot": "tooltip-content",
|
|
6476
|
-
sideOffset,
|
|
6477
|
-
className: cn(
|
|
6478
|
-
"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",
|
|
6479
|
-
className
|
|
6480
|
-
),
|
|
6481
|
-
...props,
|
|
6482
|
-
children: [
|
|
6483
|
-
children,
|
|
6484
|
-
!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
|
|
6485
|
-
]
|
|
6486
|
-
}
|
|
6487
|
-
) });
|
|
6488
|
-
}
|
|
6489
|
-
|
|
6490
|
-
// src/components/composer/SendButton.tsx
|
|
6491
6686
|
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
6492
6687
|
function SendButton({
|
|
6493
6688
|
disabled = false,
|
|
@@ -23802,22 +23997,6 @@ function Chat({
|
|
|
23802
23997
|
]
|
|
23803
23998
|
}
|
|
23804
23999
|
),
|
|
23805
|
-
!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)(
|
|
23806
|
-
Button,
|
|
23807
|
-
{
|
|
23808
|
-
type: "button",
|
|
23809
|
-
size: "icon-sm",
|
|
23810
|
-
variant: hasUpdatesBelow ? "default" : "outline",
|
|
23811
|
-
className: cn(
|
|
23812
|
-
"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)]",
|
|
23813
|
-
hasUpdatesBelow && "animate-bounce"
|
|
23814
|
-
),
|
|
23815
|
-
onClick: () => scrollToBottom(true, true),
|
|
23816
|
-
"aria-label": t("chat.scrollToBottom"),
|
|
23817
|
-
title: t("chat.scrollToBottom"),
|
|
23818
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(import_lucide_react37.ArrowDown, { size: 16 })
|
|
23819
|
-
}
|
|
23820
|
-
) }),
|
|
23821
24000
|
quoteSelection && /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(
|
|
23822
24001
|
"div",
|
|
23823
24002
|
{
|
|
@@ -23880,6 +24059,29 @@ function Chat({
|
|
|
23880
24059
|
),
|
|
23881
24060
|
style: chatColumnStyle,
|
|
23882
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
|
+
),
|
|
23883
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 }),
|
|
23884
24086
|
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
|
23885
24087
|
ChatAttachments,
|