@xpert-ai/chatkit-ui 0.5.9 → 0.5.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/app/assets/{_baseUniq-BLpvr8Li.js → _baseUniq-D2IgWDBu.js} +1 -1
- package/dist/app/assets/{abap-DuWq8-Fa.js → abap-DKQsRD7P.js} +1 -1
- package/dist/app/assets/{abnf-BHjR3bmX.js → abnf-CakdgbfU.js} +1 -1
- package/dist/app/assets/{actionscript-DJxrYQDx.js → actionscript-3FXzXQwC.js} +1 -1
- package/dist/app/assets/{ada-CbL6tAKZ.js → ada-CuBckY_v.js} +1 -1
- package/dist/app/assets/{agda-Ck6x7eDV.js → agda-CnA4hf2k.js} +1 -1
- package/dist/app/assets/{al-DdXfEkta.js → al-Dr9yufze.js} +1 -1
- package/dist/app/assets/{antlr4-upUqmaYh.js → antlr4-CFBfIi_k.js} +1 -1
- package/dist/app/assets/{apacheconf-CupXJx2-.js → apacheconf-BLh4uw9F.js} +1 -1
- package/dist/app/assets/{apex-0YDHPbgn.js → apex-CGB146ZB.js} +1 -1
- package/dist/app/assets/{apl-RmSfPwym.js → apl-BtxcLf1U.js} +1 -1
- package/dist/app/assets/{applescript-COai1tTm.js → applescript-D66cJ8Zt.js} +1 -1
- package/dist/app/assets/{aql-CbZi1-r0.js → aql-ZzZfKTYl.js} +1 -1
- package/dist/app/assets/{arc-DIn4pjjH.js → arc-DSmA74t9.js} +1 -1
- package/dist/app/assets/{architectureDiagram-Q4EWVU46-Dmhp32t-.js → architectureDiagram-Q4EWVU46-DGDj7CiR.js} +1 -1
- package/dist/app/assets/{arduino-CQPi4w3l.js → arduino-B8otSxwK.js} +1 -1
- package/dist/app/assets/{arff-CeuE6lSG.js → arff-It4tXSji.js} +1 -1
- package/dist/app/assets/{asciidoc-DCNYoRln.js → asciidoc-CoVKUtvA.js} +1 -1
- package/dist/app/assets/{asm6502-Pd3JHkRr.js → asm6502-Cc5IYXwp.js} +1 -1
- package/dist/app/assets/{asmatmel-Cc5XZnaJ.js → asmatmel-nwknX6Ax.js} +1 -1
- package/dist/app/assets/{aspnet-C533BcWB.js → aspnet-D2vXH52u.js} +1 -1
- package/dist/app/assets/{autohotkey-DKsSzBeu.js → autohotkey-ClW4PB5b.js} +1 -1
- package/dist/app/assets/{autoit-BBqFqs2I.js → autoit-Dbvw9dgZ.js} +1 -1
- package/dist/app/assets/{avisynth-BQhu1vn5.js → avisynth-oLVaCUHU.js} +1 -1
- package/dist/app/assets/{avro-idl-CLl66iQZ.js → avro-idl-CbQ-4JLu.js} +1 -1
- package/dist/app/assets/{bash-D-02JHh4.js → bash-Bv948m2A.js} +1 -1
- package/dist/app/assets/{basic-D0Z8Jj8l.js → basic-VBc5WgjX.js} +1 -1
- package/dist/app/assets/{batch-B6HFRBhp.js → batch-CMFv4W8s.js} +1 -1
- package/dist/app/assets/{bbcode-CE7knYbs.js → bbcode-Qh4ZvzxB.js} +1 -1
- package/dist/app/assets/{bicep--WgDi_5T.js → bicep-Cgkhnd97.js} +1 -1
- package/dist/app/assets/{birb-CRszBx8p.js → birb-DeLlvx-X.js} +1 -1
- package/dist/app/assets/{bison-2yOIavxu.js → bison-CGen_SSr.js} +1 -1
- package/dist/app/assets/{blockDiagram-DXYQGD6D-CdfVTYe6.js → blockDiagram-DXYQGD6D-B5-rR5rG.js} +1 -1
- package/dist/app/assets/{bnf-Dg8yqReW.js → bnf-U9dFTeu-.js} +1 -1
- package/dist/app/assets/{brainfuck-CMcDLgle.js → brainfuck-BCCbpUkW.js} +1 -1
- package/dist/app/assets/{brightscript-Cqzcw5aY.js → brightscript-C-DXt555.js} +1 -1
- package/dist/app/assets/{bro-CCYADGfA.js → bro-DfMBFbKl.js} +1 -1
- package/dist/app/assets/{bsl-BazS2rLi.js → bsl-C4lGlqLv.js} +1 -1
- package/dist/app/assets/{c-CzdIRBJL.js → c-CEpyTi9M.js} +1 -1
- package/dist/app/assets/{c4Diagram-AHTNJAMY-CzWbdT2z.js → c4Diagram-AHTNJAMY-DZFR4LX5.js} +1 -1
- package/dist/app/assets/{cfscript-BfocvIBZ.js → cfscript-C1mgQcJX.js} +1 -1
- package/dist/app/assets/{chaiscript-DEeofdbI.js → chaiscript-GY864__g.js} +1 -1
- package/dist/app/assets/channel-DO2dFFeD.js +1 -0
- package/dist/app/assets/{chunk-4BX2VUAB-DXvcZJRe.js → chunk-4BX2VUAB-DiaddUUX.js} +1 -1
- package/dist/app/assets/{chunk-4TB4RGXK-Cvk3MhhJ.js → chunk-4TB4RGXK-DrUvOYr-.js} +1 -1
- package/dist/app/assets/{chunk-55IACEB6-Om7ibAwr.js → chunk-55IACEB6-CUhGHrcY.js} +1 -1
- package/dist/app/assets/{chunk-EDXVE4YY-DbAgli9I.js → chunk-EDXVE4YY-BKjxVlPZ.js} +1 -1
- package/dist/app/assets/{chunk-FMBD7UC4-DObpaYUO.js → chunk-FMBD7UC4-B_mrLSZS.js} +1 -1
- package/dist/app/assets/{chunk-OYMX7WX6-rGMgjhKm.js → chunk-OYMX7WX6-CnRJKMn5.js} +1 -1
- package/dist/app/assets/{chunk-QZHKN3VN-BtHCPSxj.js → chunk-QZHKN3VN-DOzIfAuc.js} +1 -1
- package/dist/app/assets/{chunk-YZCP3GAM-CDkTBaPo.js → chunk-YZCP3GAM-CF4CA5J_.js} +1 -1
- package/dist/app/assets/{cil-BNlTLivw.js → cil-DWowjYol.js} +1 -1
- package/dist/app/assets/classDiagram-6PBFFD2Q-BRGe5HhN.js +1 -0
- package/dist/app/assets/classDiagram-v2-HSJHXN6E-BRGe5HhN.js +1 -0
- package/dist/app/assets/{clike-BBIPxwPb.js → clike-BEIk774o.js} +1 -1
- package/dist/app/assets/{clojure-SjJCVW3l.js → clojure-BqYu8Hwb.js} +1 -1
- package/dist/app/assets/clone-CWn4bKYm.js +1 -0
- package/dist/app/assets/{cmake-DKXTFLeQ.js → cmake-DHPsr83P.js} +1 -1
- package/dist/app/assets/{cobol-DDV2T8Ov.js → cobol-CapXB_EH.js} +1 -1
- package/dist/app/assets/{coffeescript-DLlO3-WB.js → coffeescript-BdfidV1s.js} +1 -1
- package/dist/app/assets/{concurnas-Zk22sd4q.js → concurnas-CCu18Ufm.js} +1 -1
- package/dist/app/assets/{coq-CB49fGLj.js → coq-DUNJO9aB.js} +1 -1
- package/dist/app/assets/{core-GilJv2TY.js → core-B01CD3we.js} +1 -1
- package/dist/app/assets/{cose-bilkent-S5V4N54A-dCcXah1N.js → cose-bilkent-S5V4N54A-CQckuOjI.js} +1 -1
- package/dist/app/assets/{cpp-_nLYhTeO.js → cpp-B0ecrLNz.js} +1 -1
- package/dist/app/assets/{crystal-0uF3fCBY.js → crystal-DmkOtBqh.js} +1 -1
- package/dist/app/assets/{csharp-9a018lXK.js → csharp-vJJWDRM_.js} +1 -1
- package/dist/app/assets/{cshtml-DeRWrMgA.js → cshtml-uk9lpGeI.js} +1 -1
- package/dist/app/assets/{csp-C1JPZRc6.js → csp-CSKaxlzW.js} +1 -1
- package/dist/app/assets/{css-CtlaCojl.js → css-KUP-u3ce.js} +1 -1
- package/dist/app/assets/{css-extras-_r0fSC4K.js → css-extras-ChFO6rAa.js} +1 -1
- package/dist/app/assets/{csv-DEVHAMet.js → csv-13C91ywp.js} +1 -1
- package/dist/app/assets/{cypher-OQlwpa7A.js → cypher-CDv7U88j.js} +1 -1
- package/dist/app/assets/{d-CBefACWo.js → d-R3GD5sst.js} +1 -1
- package/dist/app/assets/{dagre-KV5264BT-BbcR5yFp.js → dagre-KV5264BT-DlJMTF3p.js} +1 -1
- package/dist/app/assets/{dart-DnZNI7st.js → dart-fv3MR8Hg.js} +1 -1
- package/dist/app/assets/{dataweave-C0KQEfm3.js → dataweave-mTqsBuam.js} +1 -1
- package/dist/app/assets/{dax-C85xkJS9.js → dax-DkcjI-jT.js} +1 -1
- package/dist/app/assets/{dhall-Dr7lP2CR.js → dhall-BefzxTmu.js} +1 -1
- package/dist/app/assets/{diagram-5BDNPKRD-CAF6Irol.js → diagram-5BDNPKRD-Bab3u4VF.js} +1 -1
- package/dist/app/assets/{diagram-G4DWMVQ6-BjM_224a.js → diagram-G4DWMVQ6-BQXBct1X.js} +1 -1
- package/dist/app/assets/{diagram-MMDJMWI5-DLUB15w5.js → diagram-MMDJMWI5-CD0uh5Ye.js} +1 -1
- package/dist/app/assets/{diagram-TYMM5635-DBbpw92w.js → diagram-TYMM5635-BM4_XVz0.js} +1 -1
- package/dist/app/assets/{diff-BMBQT17e.js → diff-BJTtN3z2.js} +1 -1
- package/dist/app/assets/{django-ciXFTeWU.js → django-V8o6VdtL.js} +1 -1
- package/dist/app/assets/{dns-zone-file-DC-B5K-Z.js → dns-zone-file-DGmhWmbZ.js} +1 -1
- package/dist/app/assets/{docker-A8DlJ91e.js → docker-Cxh8gjCE.js} +1 -1
- package/dist/app/assets/{dot-DC8VHvNV.js → dot-BqUlz0Yh.js} +1 -1
- package/dist/app/assets/{ebnf-92ogoCIr.js → ebnf-CflZCOtn.js} +1 -1
- package/dist/app/assets/{editorconfig-D-VWzvau.js → editorconfig-mlabAduJ.js} +1 -1
- package/dist/app/assets/{eiffel-BQlPy2tR.js → eiffel-D-ZftpAV.js} +1 -1
- package/dist/app/assets/{ejs-hYRRXYEf.js → ejs-BpupKyky.js} +1 -1
- package/dist/app/assets/{elixir-BQaOfAKO.js → elixir-DDXBoeTT.js} +1 -1
- package/dist/app/assets/{elm-CMZDaOsd.js → elm-B3Zk26Rv.js} +1 -1
- package/dist/app/assets/{erDiagram-SMLLAGMA-D7RIpy8K.js → erDiagram-SMLLAGMA--xo95hAu.js} +1 -1
- package/dist/app/assets/{erb-BhUx9oZj.js → erb-B4HRGpX_.js} +1 -1
- package/dist/app/assets/{erlang-BEE4gQmE.js → erlang-DWUEsa_Z.js} +1 -1
- package/dist/app/assets/{etlua-Do5lhS9I.js → etlua-DNYtr6oM.js} +1 -1
- package/dist/app/assets/{excel-formula-CmwpMtyy.js → excel-formula-CSN7OAl9.js} +1 -1
- package/dist/app/assets/{factor-B2pJs6O3.js → factor-BJmYTOs4.js} +1 -1
- package/dist/app/assets/{false-DvjmZdOv.js → false-B8XKor7S.js} +1 -1
- package/dist/app/assets/{firestore-security-rules-CFb_h360.js → firestore-security-rules-DpOBaWEX.js} +1 -1
- package/dist/app/assets/{flow-D0Mztv7X.js → flow-BPVkPCFp.js} +1 -1
- package/dist/app/assets/{flowDiagram-DWJPFMVM-Bs64njF4.js → flowDiagram-DWJPFMVM-Cku5HglU.js} +1 -1
- package/dist/app/assets/{fortran-1pOElj0a.js → fortran-CifNmxB7.js} +1 -1
- package/dist/app/assets/{fsharp-B6O1vScF.js → fsharp-BlAKmRE2.js} +1 -1
- package/dist/app/assets/{ftl-BC1JMSb3.js → ftl-Dw-6EXX_.js} +1 -1
- package/dist/app/assets/{ganttDiagram-T4ZO3ILL-BaqYXbd5.js → ganttDiagram-T4ZO3ILL-8zwkLWJJ.js} +1 -1
- package/dist/app/assets/{gap-DHN_hna1.js → gap-DfZYaqN5.js} +1 -1
- package/dist/app/assets/{gcode-CYOpCOHU.js → gcode-BcsKjycL.js} +1 -1
- package/dist/app/assets/{gdscript-C_fDjtde.js → gdscript-D0yJLAbl.js} +1 -1
- package/dist/app/assets/{gedcom-BVEMpxDC.js → gedcom-DOTC-Rbm.js} +1 -1
- package/dist/app/assets/{gherkin-CbpN6mFf.js → gherkin-COFqb4jr.js} +1 -1
- package/dist/app/assets/{git-Bf1dI9II.js → git-CJki4Ldf.js} +1 -1
- package/dist/app/assets/{gitGraphDiagram-UUTBAWPF-BdL4HwfB.js → gitGraphDiagram-UUTBAWPF-CTgTar7o.js} +1 -1
- package/dist/app/assets/{glsl-DHfVVpll.js → glsl-XdY2jSgC.js} +1 -1
- package/dist/app/assets/{gml-CKW0I1sM.js → gml-BJndVAI_.js} +1 -1
- package/dist/app/assets/{gn-BolaXeCK.js → gn-CRDj_suq.js} +1 -1
- package/dist/app/assets/{go-CvNTUNQj.js → go-DtgLD33c.js} +1 -1
- package/dist/app/assets/{go-module-DHNsqTFu.js → go-module-XcABENI5.js} +1 -1
- package/dist/app/assets/{graph-w3lwjjfd.js → graph-D42NbYvZ.js} +1 -1
- package/dist/app/assets/{graphql-CqMPX6Uj.js → graphql-U9RNf196.js} +1 -1
- package/dist/app/assets/{groovy-ric2FEOh.js → groovy-DYv_DcRO.js} +1 -1
- package/dist/app/assets/{haml-Cxb5CUqP.js → haml-CS7AG81a.js} +1 -1
- package/dist/app/assets/{handlebars-Cn3du5zM.js → handlebars-BQsIa7Yr.js} +1 -1
- package/dist/app/assets/{haskell-C6_pQzAW.js → haskell-cZHjtICv.js} +1 -1
- package/dist/app/assets/{haxe-ByVxVzJ9.js → haxe-9NO5IDEY.js} +1 -1
- package/dist/app/assets/{hcl-B54wt0UB.js → hcl-DqYubIgC.js} +1 -1
- package/dist/app/assets/{hlsl-zd81HZk_.js → hlsl-DXP88JTf.js} +1 -1
- package/dist/app/assets/{hoon-CIsFAweE.js → hoon-xEqjx25t.js} +1 -1
- package/dist/app/assets/{hpkp-BjSjLyAt.js → hpkp-D3qO_isK.js} +1 -1
- package/dist/app/assets/{hsts-DYV6IErn.js → hsts-p9_ZAj_s.js} +1 -1
- package/dist/app/assets/{http-vOpsxP66.js → http-D_1e7uZw.js} +1 -1
- package/dist/app/assets/{ichigojam-0LTExBpZ.js → ichigojam-CJIbCoZL.js} +1 -1
- package/dist/app/assets/{icon-B-Gp4jiE.js → icon-BLbuV0eW.js} +1 -1
- package/dist/app/assets/{icu-message-format-jiNYPlT8.js → icu-message-format-DlSBVpMt.js} +1 -1
- package/dist/app/assets/{idris-ZMBybD9e.js → idris-CBILCmxl.js} +1 -1
- package/dist/app/assets/{iecst-B3wVu7MT.js → iecst-DXWop1Zf.js} +1 -1
- package/dist/app/assets/{ignore-DCDIFGnd.js → ignore-C4KHRM09.js} +1 -1
- package/dist/app/assets/index-D-hjfkvG.css +1 -0
- package/dist/app/assets/{index-Bc4smTvC.js → index-DL7IzKZE.js} +139 -139
- package/dist/app/assets/{infoDiagram-42DDH7IO-Bbh4hemk.js → infoDiagram-42DDH7IO-BW7T1qQI.js} +1 -1
- package/dist/app/assets/{inform7-BI05xVNw.js → inform7-D10IYW8x.js} +1 -1
- package/dist/app/assets/{ini-vxj4aj2b.js → ini-BiWopMvy.js} +1 -1
- package/dist/app/assets/{io-Dv10BjOU.js → io-DpgtsV68.js} +1 -1
- package/dist/app/assets/{ishikawaDiagram-UXIWVN3A-BuEYSyJU.js → ishikawaDiagram-UXIWVN3A-BQozHXop.js} +1 -1
- package/dist/app/assets/{j-BW8yPUOH.js → j-BWcDL_us.js} +1 -1
- package/dist/app/assets/{java-BkBlxlrY.js → java-DB-NooXn.js} +1 -1
- package/dist/app/assets/{javadoc-Cx6tkfWS.js → javadoc-ldLhLMvj.js} +1 -1
- package/dist/app/assets/{javadoclike-BBfuCCPL.js → javadoclike-Bmyr9i8Z.js} +1 -1
- package/dist/app/assets/{javascript-CAUiQeA4.js → javascript-DCGTWx76.js} +1 -1
- package/dist/app/assets/{javastacktrace-DVKSc9mr.js → javastacktrace-UOTBekVt.js} +1 -1
- package/dist/app/assets/{jexl-Ctv9A-4Y.js → jexl-BU7SpMMt.js} +1 -1
- package/dist/app/assets/{jolie-8oLOtI3_.js → jolie-BJxyHhnJ.js} +1 -1
- package/dist/app/assets/{journeyDiagram-VCZTEJTY-DUm9Kxjg.js → journeyDiagram-VCZTEJTY-CRYhm-tV.js} +1 -1
- package/dist/app/assets/{jq-C5TPho8v.js → jq-DmaOhZ5k.js} +1 -1
- package/dist/app/assets/{js-extras-CvvS7hCP.js → js-extras-BvOzNSZ4.js} +1 -1
- package/dist/app/assets/{js-templates-D1ItFqxK.js → js-templates-CQYpiryc.js} +1 -1
- package/dist/app/assets/{jsdoc-D0lTE-nD.js → jsdoc-CiNlXmsX.js} +1 -1
- package/dist/app/assets/{json-Bj6Xy1YF.js → json-CVmcFi3A.js} +1 -1
- package/dist/app/assets/{json5-CvDs8NVg.js → json5-CWSKQL2a.js} +1 -1
- package/dist/app/assets/{jsonp-BFor_KVf.js → jsonp-WiiijTf_.js} +1 -1
- package/dist/app/assets/{jsstacktrace-DaDHvFwg.js → jsstacktrace-Bnvsk6Ui.js} +1 -1
- package/dist/app/assets/{jsx-9z5hmKsA.js → jsx-Ca4_694E.js} +1 -1
- package/dist/app/assets/{julia-DwK7_L2k.js → julia-BMjo4YZg.js} +1 -1
- package/dist/app/assets/{kanban-definition-6JOO6SKY-B4PLi6a2.js → kanban-definition-6JOO6SKY-CfwQlQvz.js} +1 -1
- package/dist/app/assets/{keepalived-QQAuR044.js → keepalived-BTxVPl_d.js} +1 -1
- package/dist/app/assets/{keyman-WSDbwfnX.js → keyman-B5tt0Vgc.js} +1 -1
- package/dist/app/assets/{kotlin-CGASEpWD.js → kotlin-O6hS1AV0.js} +1 -1
- package/dist/app/assets/{kumir-Doyw9YhD.js → kumir-DEqNUPw1.js} +1 -1
- package/dist/app/assets/{kusto-xM5aYCkT.js → kusto-DcY6M7fT.js} +1 -1
- package/dist/app/assets/{latex-7t6762ct.js → latex-Bca_WVtH.js} +1 -1
- package/dist/app/assets/{latte-CYYMtaGq.js → latte-DocB5NP7.js} +1 -1
- package/dist/app/assets/{layout-Cq9HzFXC.js → layout-DLTiCZIC.js} +1 -1
- package/dist/app/assets/{less-B-rkr2Db.js → less-BDIPtABN.js} +1 -1
- package/dist/app/assets/{lilypond-BJWXSiTf.js → lilypond-DNKpFRP6.js} +1 -1
- package/dist/app/assets/{linear-DRDsgNmW.js → linear-BICCBRGJ.js} +1 -1
- package/dist/app/assets/{liquid--20_a0Si.js → liquid-DHvis4ej.js} +1 -1
- package/dist/app/assets/{lisp-B_0ZteJz.js → lisp-BYhfTD5g.js} +1 -1
- package/dist/app/assets/{livescript-1Jx0SETD.js → livescript-CoBSdkri.js} +1 -1
- package/dist/app/assets/{llvm-B9HfHMKf.js → llvm-BfT7zy4f.js} +1 -1
- package/dist/app/assets/{log-CRWfAu0Z.js → log-CIXx7stU.js} +1 -1
- package/dist/app/assets/{lolcode-DMRD9BNM.js → lolcode-DFtQmoeI.js} +1 -1
- package/dist/app/assets/{lua-D-hyZPBj.js → lua-CG8Tqm-m.js} +1 -1
- package/dist/app/assets/{magma-CIgc0Q1n.js → magma-BXLm0PIg.js} +1 -1
- package/dist/app/assets/{makefile-CBunZoPa.js → makefile-CoBY9bAE.js} +1 -1
- package/dist/app/assets/{markdown-DvJvDbDy.js → markdown-CG4FHI4y.js} +1 -1
- package/dist/app/assets/{markup-D3VPet1J.js → markup-hEUfFQLW.js} +1 -1
- package/dist/app/assets/{markup-templating-D7DvUP7P.js → markup-templating-C7leQ_ll.js} +1 -1
- package/dist/app/assets/{matlab-CjKtwgDT.js → matlab-Co4EhBs0.js} +1 -1
- package/dist/app/assets/{maxscript-CvzRNTSR.js → maxscript-xS-wBTSY.js} +1 -1
- package/dist/app/assets/{mel-DVwlWwS1.js → mel-C4vcGlDE.js} +1 -1
- package/dist/app/assets/{mermaid-mTOAb9I1.js → mermaid-BCYt2FtJ.js} +1 -1
- package/dist/app/assets/{min-6n2-iCAm.js → min-BIFp-Zzt.js} +1 -1
- package/dist/app/assets/{mindmap-definition-QFDTVHPH-eTB4aUJ6.js → mindmap-definition-QFDTVHPH-D15Yo8P8.js} +1 -1
- package/dist/app/assets/{mizar-D1v4Nv22.js → mizar-CtxASDJ8.js} +1 -1
- package/dist/app/assets/{mongodb-B6xPI5vi.js → mongodb-DAPiQzR1.js} +1 -1
- package/dist/app/assets/{monkey-8ZQGq2j6.js → monkey-Cv6o6ODG.js} +1 -1
- package/dist/app/assets/{moonscript-qkDyELmz.js → moonscript-yg8tl7gD.js} +1 -1
- package/dist/app/assets/{n1ql-7qzjjhYg.js → n1ql-nZAriQql.js} +1 -1
- package/dist/app/assets/{n4js--0WDRpBj.js → n4js-BvUGuNwP.js} +1 -1
- package/dist/app/assets/{nand2tetris-hdl-zYT29X94.js → nand2tetris-hdl-oaib87Jl.js} +1 -1
- package/dist/app/assets/{naniscript-BEKVFrJA.js → naniscript-C3uipmpo.js} +1 -1
- package/dist/app/assets/{nasm-BxgE8BWF.js → nasm-BTTpC0Y-.js} +1 -1
- package/dist/app/assets/{neon-CRmkHhWg.js → neon-CRwuwdfL.js} +1 -1
- package/dist/app/assets/{nevod-DqOKiweO.js → nevod-D12XFova.js} +1 -1
- package/dist/app/assets/{nginx-BepDunyM.js → nginx-CVNrLcUk.js} +1 -1
- package/dist/app/assets/{nim-DOYwB93n.js → nim-CSs8ZnzG.js} +1 -1
- package/dist/app/assets/{nix-OcEzpwWS.js → nix-CQIWJ2mC.js} +1 -1
- package/dist/app/assets/{nsis-WQEGbgSb.js → nsis-C6EHbEzC.js} +1 -1
- package/dist/app/assets/{objectivec-B8PulHhQ.js → objectivec-C47nBh0B.js} +1 -1
- package/dist/app/assets/{ocaml-DrKpTrGd.js → ocaml-C2CHzOTW.js} +1 -1
- package/dist/app/assets/{opencl-DJD4I4Az.js → opencl-DZtwCKMS.js} +1 -1
- package/dist/app/assets/{openqasm-BzLNaS1E.js → openqasm-3qzNMNem.js} +1 -1
- package/dist/app/assets/{oz-CddQDW4N.js → oz-B9NhgVuR.js} +1 -1
- package/dist/app/assets/{parigp-DL9Pul5Z.js → parigp-BAjwmqKA.js} +1 -1
- package/dist/app/assets/{parser-BaeyVs6E.js → parser-C2bSATZf.js} +1 -1
- package/dist/app/assets/{pascal-DZwRqOCW.js → pascal-DUg6Pj8m.js} +1 -1
- package/dist/app/assets/{pascaligo-CglPcMbu.js → pascaligo-DQwf2r6T.js} +1 -1
- package/dist/app/assets/{pcaxis-m1flL1nx.js → pcaxis-Bneftqn3.js} +1 -1
- package/dist/app/assets/{peoplecode-BPZXOWEd.js → peoplecode-D_I9ioJ2.js} +1 -1
- package/dist/app/assets/{perl-DEj9sd22.js → perl-BoI40emm.js} +1 -1
- package/dist/app/assets/{php-ChAzX5Xy.js → php-Ckc4YVDo.js} +1 -1
- package/dist/app/assets/{php-extras-BEC2cMHJ.js → php-extras-Djzck7Am.js} +1 -1
- package/dist/app/assets/{phpdoc-Efem6iWX.js → phpdoc-CMJ1S9wI.js} +1 -1
- package/dist/app/assets/{pieDiagram-DEJITSTG-I2O3vbig.js → pieDiagram-DEJITSTG-gLePwLOg.js} +1 -1
- package/dist/app/assets/{plsql-Bgiemx8O.js → plsql-BatH1vdO.js} +1 -1
- package/dist/app/assets/{powerquery-DoH4a5fD.js → powerquery-GO-yaDqw.js} +1 -1
- package/dist/app/assets/{powershell-CXwYZoB9.js → powershell-C-8FBdYU.js} +1 -1
- package/dist/app/assets/{processing-BG-k24bE.js → processing-V90606l_.js} +1 -1
- package/dist/app/assets/{prolog-BQk3s9Cz.js → prolog-Drs76NuO.js} +1 -1
- package/dist/app/assets/{promql-Cn8XzgOs.js → promql-SJxB2Onu.js} +1 -1
- package/dist/app/assets/{properties-BzFCc7p8.js → properties-CFU7bsCx.js} +1 -1
- package/dist/app/assets/{protobuf-DsVZomkz.js → protobuf-TAE1VG1c.js} +1 -1
- package/dist/app/assets/{psl-BL1By2Di.js → psl-DX1gaLlH.js} +1 -1
- package/dist/app/assets/{pug-CJXPw-_y.js → pug-SVNfK3WX.js} +1 -1
- package/dist/app/assets/{puppet-BgLD34yT.js → puppet-C3VEK9xy.js} +1 -1
- package/dist/app/assets/{pure-D5KRS3X3.js → pure-DOW9flm0.js} +1 -1
- package/dist/app/assets/{purebasic-BO_zjFwL.js → purebasic-gMFZF0zO.js} +1 -1
- package/dist/app/assets/{purescript-Ddc7moMi.js → purescript-Dyi4Uo_r.js} +1 -1
- package/dist/app/assets/{q-CsHjuzhk.js → q-CgQpf4g7.js} +1 -1
- package/dist/app/assets/{qml-YbRFzx0z.js → qml-DyWljaHh.js} +1 -1
- package/dist/app/assets/{qore-BFgUYB1S.js → qore-CC_OKt7I.js} +1 -1
- package/dist/app/assets/{qsharp-DRh0td2A.js → qsharp-BxAVXLL-.js} +1 -1
- package/dist/app/assets/{quadrantDiagram-34T5L4WZ-sLTzbhk2.js → quadrantDiagram-34T5L4WZ-D5RCEJLY.js} +1 -1
- package/dist/app/assets/{r-5gqFGwLd.js → r-LMFH_6S-.js} +1 -1
- package/dist/app/assets/{racket-BgmD87H8.js → racket-B5ieNa-n.js} +1 -1
- package/dist/app/assets/{reason-D_tR9ps8.js → reason-CmzoycMk.js} +1 -1
- package/dist/app/assets/{regex-hcOGgwnQ.js → regex-Cj9kl_9-.js} +1 -1
- package/dist/app/assets/{rego-C0pl_3VC.js → rego-DL6PBDi-.js} +1 -1
- package/dist/app/assets/{renpy-lT_4OszV.js → renpy-Ded4q7JV.js} +1 -1
- package/dist/app/assets/{requirementDiagram-MS252O5E-CEJ8Rcnr.js → requirementDiagram-MS252O5E-BEDR4uCm.js} +1 -1
- package/dist/app/assets/{rest-BBI-g8mr.js → rest-DUsMjto8.js} +1 -1
- package/dist/app/assets/{rip-C3KbnjS_.js → rip-r4YeUU_w.js} +1 -1
- package/dist/app/assets/{roboconf-CoZ--fPi.js → roboconf-COWIkT4K.js} +1 -1
- package/dist/app/assets/{robotframework-DY6-Pswb.js → robotframework-BF0iBnMx.js} +1 -1
- package/dist/app/assets/{ruby-Bs6f5Nvi.js → ruby-Ba0RjeE3.js} +1 -1
- package/dist/app/assets/{rust-D0f4oPW4.js → rust-CYfVjTQs.js} +1 -1
- package/dist/app/assets/{sankeyDiagram-XADWPNL6-Dx6TM5mU.js → sankeyDiagram-XADWPNL6-Bpw04zKX.js} +1 -1
- package/dist/app/assets/{sas-RrsOkHla.js → sas-CKeiCMEw.js} +1 -1
- package/dist/app/assets/{sass-D3DRkshk.js → sass-B-MrWZ_Z.js} +1 -1
- package/dist/app/assets/{scala-2yub5Noi.js → scala-IxNzB4Gx.js} +1 -1
- package/dist/app/assets/{scheme-DUUET_XL.js → scheme-B6YidWdS.js} +1 -1
- package/dist/app/assets/{scss-mXwcbbk-.js → scss-D8ZfZlWB.js} +1 -1
- package/dist/app/assets/{sequenceDiagram-FGHM5R23-9GU2p9Ma.js → sequenceDiagram-FGHM5R23-CR3PT2M9.js} +1 -1
- package/dist/app/assets/{shell-session-DoXxry6a.js → shell-session-CjX7cdQF.js} +1 -1
- package/dist/app/assets/{smali-BM6j_ZPX.js → smali-BuTsBw7B.js} +1 -1
- package/dist/app/assets/{smalltalk-Bcd172Pc.js → smalltalk-CRauZrmD.js} +1 -1
- package/dist/app/assets/{smarty-oKqEpnDS.js → smarty-W-NhEl1G.js} +1 -1
- package/dist/app/assets/{sml-B1upkj4b.js → sml-JcB2sh8O.js} +1 -1
- package/dist/app/assets/{solidity-xeq40f3P.js → solidity-A0X_REkw.js} +1 -1
- package/dist/app/assets/{solution-file-DRFXyDTT.js → solution-file-Dn58IXR1.js} +1 -1
- package/dist/app/assets/{soy-OSBkuqMW.js → soy-BmrmCTts.js} +1 -1
- package/dist/app/assets/{sparql-D3k_wEdU.js → sparql-By7yQYO_.js} +1 -1
- package/dist/app/assets/{splunk-spl-FKET7kp7.js → splunk-spl-RBvpet2v.js} +1 -1
- package/dist/app/assets/{sqf-BSn0GDGB.js → sqf-BOBjY1ie.js} +1 -1
- package/dist/app/assets/{sql-D6mgKQB5.js → sql-CIJLTEB_.js} +1 -1
- package/dist/app/assets/{squirrel-DFu-guJ8.js → squirrel-P_qDyvNR.js} +1 -1
- package/dist/app/assets/{stan-CDr-fjyl.js → stan-DfolqpQm.js} +1 -1
- package/dist/app/assets/{stateDiagram-FHFEXIEX-z2DiLwCm.js → stateDiagram-FHFEXIEX-Be1VOY7u.js} +1 -1
- package/dist/app/assets/stateDiagram-v2-QKLJ7IA2-DDG5P4Fr.js +1 -0
- package/dist/app/assets/{stylus-BFOCUvnx.js → stylus-RLaU-5mi.js} +1 -1
- package/dist/app/assets/{swift-uHqpQZ6J.js → swift-DWbusDXZ.js} +1 -1
- package/dist/app/assets/{systemd-CYQNlgLz.js → systemd-BW6SjPXj.js} +1 -1
- package/dist/app/assets/{t4-cs-usG5jkwF.js → t4-cs-CSIaeOoL.js} +1 -1
- package/dist/app/assets/{t4-templating-D4wDOtGr.js → t4-templating-D-xW__LI.js} +1 -1
- package/dist/app/assets/{t4-vb-C1p1TL0w.js → t4-vb-CZJRbC4E.js} +1 -1
- package/dist/app/assets/{tap-DFMBztgQ.js → tap-DdzfI0sl.js} +1 -1
- package/dist/app/assets/{tcl-BCt4zqi_.js → tcl-D1sWO5wM.js} +1 -1
- package/dist/app/assets/{textile-Bloj03Mi.js → textile-BdNIUgfD.js} +1 -1
- package/dist/app/assets/{timeline-definition-GMOUNBTQ-d06kVX17.js → timeline-definition-GMOUNBTQ-DQbm2zyn.js} +1 -1
- package/dist/app/assets/{toml-BhS4WNxa.js → toml-DBOUYp3d.js} +1 -1
- package/dist/app/assets/{tremor-DviIbCpH.js → tremor-BkeNnxUV.js} +1 -1
- package/dist/app/assets/{tt2-DE0j1lmS.js → tt2-1Co1YYMZ.js} +1 -1
- package/dist/app/assets/{turtle-BxCayuSl.js → turtle-BKE870Gl.js} +1 -1
- package/dist/app/assets/{twig-DtCkUjxy.js → twig-B7bxb9gS.js} +1 -1
- package/dist/app/assets/{typescript-3pYqwxJ2.js → typescript-C8ySnIZx.js} +1 -1
- package/dist/app/assets/{typoscript-Dy8ykcri.js → typoscript-BAEnu72Y.js} +1 -1
- package/dist/app/assets/{unrealscript-C4Peef6q.js → unrealscript-Drlja5bL.js} +1 -1
- package/dist/app/assets/{uorazor-91g1sfeu.js → uorazor-C_bLkY4E.js} +1 -1
- package/dist/app/assets/{uri-DDMRMgIp.js → uri-ZLQjjfD6.js} +1 -1
- package/dist/app/assets/{v-2gwj9f62.js → v-BlIU_M9K.js} +1 -1
- package/dist/app/assets/{vala-CUiPsFoo.js → vala-c80sATdZ.js} +1 -1
- package/dist/app/assets/{vbnet-Zsyt2tdN.js → vbnet-wgmjanEH.js} +1 -1
- package/dist/app/assets/{velocity-CSkxzAQi.js → velocity-CcyO8B-L.js} +1 -1
- package/dist/app/assets/{vennDiagram-DHZGUBPP-eRSD5RJQ.js → vennDiagram-DHZGUBPP-Cn-A6_UP.js} +1 -1
- package/dist/app/assets/{verilog-BtHxNyJ7.js → verilog-ZZAdWzv5.js} +1 -1
- package/dist/app/assets/{vhdl-C0vU6j5h.js → vhdl-DiEUz_8J.js} +1 -1
- package/dist/app/assets/{vim-dvVtnnHy.js → vim-CPduAUTW.js} +1 -1
- package/dist/app/assets/{visual-basic-B-m3tLsh.js → visual-basic-D3f9wJBq.js} +1 -1
- package/dist/app/assets/{wardley-RL74JXVD-BgTJCIjC.js → wardley-RL74JXVD-Ac1K5zkk.js} +1 -1
- package/dist/app/assets/{wardleyDiagram-NUSXRM2D-B19yXjvI.js → wardleyDiagram-NUSXRM2D-BmUdT2lv.js} +1 -1
- package/dist/app/assets/{warpscript-1YJK0eIR.js → warpscript-BwS1dvut.js} +1 -1
- package/dist/app/assets/{wasm-B18nYup5.js → wasm-CzMZ_iIf.js} +1 -1
- package/dist/app/assets/{web-idl-DaaOjvPO.js → web-idl-Di3yKTMk.js} +1 -1
- package/dist/app/assets/{wiki-6hqpglgh.js → wiki-fL798PJt.js} +1 -1
- package/dist/app/assets/{wolfram-uGnnCOiH.js → wolfram-DbSh4dXu.js} +1 -1
- package/dist/app/assets/{wren-BVgxyvFh.js → wren-CZ2hZsKA.js} +1 -1
- package/dist/app/assets/{xeora-BIlCKODO.js → xeora-jrOKeaLe.js} +1 -1
- package/dist/app/assets/{xml-doc-COhD3a_e.js → xml-doc-Cjfng7b5.js} +1 -1
- package/dist/app/assets/{xojo-CffC0OLi.js → xojo-BmwJ2ZYb.js} +1 -1
- package/dist/app/assets/{xquery-BysER8W6.js → xquery-P7OvQLzZ.js} +1 -1
- package/dist/app/assets/{xychartDiagram-5P7HB3ND-Ba1Vo7v6.js → xychartDiagram-5P7HB3ND-Bk3ni12B.js} +1 -1
- package/dist/app/assets/{yaml-BjlUOXdf.js → yaml-6z4s_ND7.js} +1 -1
- package/dist/app/assets/{yang-CE61CGXZ.js → yang-DgTVGWPT.js} +1 -1
- package/dist/app/assets/{zig-BwDJZvRM.js → zig-Dq-PN1UV.js} +1 -1
- package/dist/app/index.html +2 -2
- package/dist/index.cjs +718 -513
- package/dist/index.js +749 -542
- 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
|
@@ -1740,7 +1740,7 @@ function isCompletedOutputStatus(value) {
|
|
|
1740
1740
|
function sourceFromReference(reference, message) {
|
|
1741
1741
|
const updatedAt = message.updatedAt ?? message.createdAt;
|
|
1742
1742
|
const common = {
|
|
1743
|
-
id: reference.id ?? `${reference.type}:${reference.text}
|
|
1743
|
+
id: stringValue(reference.id) ?? `${reference.type}:${reference.text}`.trim(),
|
|
1744
1744
|
title: reference.label?.trim() || reference.text.trim().slice(0, 80),
|
|
1745
1745
|
messageId: message.id,
|
|
1746
1746
|
updatedAt
|
|
@@ -1899,7 +1899,7 @@ function collectLiveTaskSummary({
|
|
|
1899
1899
|
)
|
|
1900
1900
|
)
|
|
1901
1901
|
]).filter(isCompletedOpenableOutput),
|
|
1902
|
-
sources:
|
|
1902
|
+
sources: mergeSources([
|
|
1903
1903
|
...contributions.flatMap((item) => item.sources ?? []).filter((source) => source.kind !== "sub_agent"),
|
|
1904
1904
|
...messages.flatMap((message) => [
|
|
1905
1905
|
...(message.references ?? []).map(
|
|
@@ -1922,10 +1922,10 @@ function mergeTaskSummary(history, live, historySections) {
|
|
|
1922
1922
|
...historySections?.outputs ?? history?.outputs.items ?? [],
|
|
1923
1923
|
...live.outputs
|
|
1924
1924
|
]).filter(isCompletedOpenableOutput);
|
|
1925
|
-
const
|
|
1926
|
-
|
|
1927
|
-
|
|
1928
|
-
|
|
1925
|
+
const historySources = historySections?.sources ?? history?.sources.items ?? [];
|
|
1926
|
+
const sources = mergeSources([...historySources, ...live.sources]);
|
|
1927
|
+
const historySourceTotal = history?.sources.total ?? 0;
|
|
1928
|
+
const sourceTotal = historySources.length >= historySourceTotal ? sources.length : Math.max(historySourceTotal, sources.length);
|
|
1929
1929
|
const historyAgents = historySections?.agents ?? history?.agents.items ?? [];
|
|
1930
1930
|
const eligibleHistoryAgents = historyAgents.filter(
|
|
1931
1931
|
(agent) => Boolean(agent.parentId)
|
|
@@ -1959,12 +1959,15 @@ function mergeTaskSummary(history, live, historySections) {
|
|
|
1959
1959
|
running: live.running,
|
|
1960
1960
|
totals: {
|
|
1961
1961
|
outputs: Math.max(history?.outputs.total ?? 0, outputs.length),
|
|
1962
|
-
sources:
|
|
1962
|
+
sources: sourceTotal,
|
|
1963
1963
|
agents: Math.max(historyAgentTotal, agents.length),
|
|
1964
1964
|
pending: Math.max(history?.pending.total ?? 0, pending.length)
|
|
1965
1965
|
}
|
|
1966
1966
|
};
|
|
1967
1967
|
}
|
|
1968
|
+
function mergeSources(items) {
|
|
1969
|
+
return mergeLatest(items.map((item) => ({ ...item, id: item.id.trim() })));
|
|
1970
|
+
}
|
|
1968
1971
|
function mergeLatest(items) {
|
|
1969
1972
|
const byId = /* @__PURE__ */ new Map();
|
|
1970
1973
|
items.forEach((item) => {
|
|
@@ -2571,7 +2574,7 @@ var useStreamContext = () => {
|
|
|
2571
2574
|
};
|
|
2572
2575
|
|
|
2573
2576
|
// src/components/composer/ComposerMenu.tsx
|
|
2574
|
-
var
|
|
2577
|
+
var React13 = __toESM(require("react"), 1);
|
|
2575
2578
|
var import_lucide_react4 = require("lucide-react");
|
|
2576
2579
|
|
|
2577
2580
|
// src/i18n/useChatkitTranslation.ts
|
|
@@ -4706,25 +4709,93 @@ var Input = React8.forwardRef(
|
|
|
4706
4709
|
);
|
|
4707
4710
|
Input.displayName = "Input";
|
|
4708
4711
|
|
|
4712
|
+
// src/components/ui/tooltip.tsx
|
|
4713
|
+
var React9 = require("react");
|
|
4714
|
+
var TooltipPrimitive = __toESM(require("@radix-ui/react-tooltip"), 1);
|
|
4715
|
+
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
4716
|
+
function TooltipProvider({
|
|
4717
|
+
delayDuration = 0,
|
|
4718
|
+
...props
|
|
4719
|
+
}) {
|
|
4720
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
4721
|
+
TooltipPrimitive.Provider,
|
|
4722
|
+
{
|
|
4723
|
+
"data-slot": "tooltip-provider",
|
|
4724
|
+
delayDuration,
|
|
4725
|
+
...props
|
|
4726
|
+
}
|
|
4727
|
+
);
|
|
4728
|
+
}
|
|
4729
|
+
function Tooltip({
|
|
4730
|
+
...props
|
|
4731
|
+
}) {
|
|
4732
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(TooltipProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
4733
|
+
TooltipPrimitive.Root,
|
|
4734
|
+
{
|
|
4735
|
+
"data-slot": "tooltip",
|
|
4736
|
+
...props
|
|
4737
|
+
}
|
|
4738
|
+
) });
|
|
4739
|
+
}
|
|
4740
|
+
function TooltipTrigger({
|
|
4741
|
+
...props
|
|
4742
|
+
}) {
|
|
4743
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
4744
|
+
TooltipPrimitive.Trigger,
|
|
4745
|
+
{
|
|
4746
|
+
"data-slot": "tooltip-trigger",
|
|
4747
|
+
...props
|
|
4748
|
+
}
|
|
4749
|
+
);
|
|
4750
|
+
}
|
|
4751
|
+
function TooltipContent({
|
|
4752
|
+
className,
|
|
4753
|
+
sideOffset = 0,
|
|
4754
|
+
hideArrow = false,
|
|
4755
|
+
children,
|
|
4756
|
+
...props
|
|
4757
|
+
}) {
|
|
4758
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(TooltipPrimitive.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
|
|
4759
|
+
TooltipPrimitive.Content,
|
|
4760
|
+
{
|
|
4761
|
+
"data-slot": "tooltip-content",
|
|
4762
|
+
sideOffset,
|
|
4763
|
+
className: cn(
|
|
4764
|
+
"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",
|
|
4765
|
+
className
|
|
4766
|
+
),
|
|
4767
|
+
...props,
|
|
4768
|
+
children: [
|
|
4769
|
+
children,
|
|
4770
|
+
!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
|
|
4771
|
+
]
|
|
4772
|
+
}
|
|
4773
|
+
) });
|
|
4774
|
+
}
|
|
4775
|
+
|
|
4776
|
+
// src/components/composer/ConnectorMenuPanel.tsx
|
|
4777
|
+
var React12 = __toESM(require("react"), 1);
|
|
4778
|
+
var import_lucide_react3 = require("lucide-react");
|
|
4779
|
+
|
|
4709
4780
|
// src/components/ui/scroll-area.tsx
|
|
4710
|
-
var
|
|
4781
|
+
var React10 = __toESM(require("react"), 1);
|
|
4711
4782
|
var ScrollAreaPrimitive = __toESM(require("@radix-ui/react-scroll-area"), 1);
|
|
4712
|
-
var
|
|
4713
|
-
var ScrollArea =
|
|
4783
|
+
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
4784
|
+
var ScrollArea = React10.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
|
|
4714
4785
|
ScrollAreaPrimitive.Root,
|
|
4715
4786
|
{
|
|
4716
4787
|
ref,
|
|
4717
4788
|
className: cn("relative min-w-0 overflow-hidden", className),
|
|
4718
4789
|
...props,
|
|
4719
4790
|
children: [
|
|
4720
|
-
/* @__PURE__ */ (0,
|
|
4721
|
-
/* @__PURE__ */ (0,
|
|
4722
|
-
/* @__PURE__ */ (0,
|
|
4791
|
+
/* @__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 }),
|
|
4792
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(ScrollBar, {}),
|
|
4793
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(ScrollAreaPrimitive.Corner, {})
|
|
4723
4794
|
]
|
|
4724
4795
|
}
|
|
4725
4796
|
));
|
|
4726
4797
|
ScrollArea.displayName = ScrollAreaPrimitive.Root.displayName;
|
|
4727
|
-
var ScrollBar =
|
|
4798
|
+
var ScrollBar = React10.forwardRef(({ className, orientation = "vertical", ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
4728
4799
|
ScrollAreaPrimitive.ScrollAreaScrollbar,
|
|
4729
4800
|
{
|
|
4730
4801
|
ref,
|
|
@@ -4736,20 +4807,16 @@ var ScrollBar = React9.forwardRef(({ className, orientation = "vertical", ...pro
|
|
|
4736
4807
|
className
|
|
4737
4808
|
),
|
|
4738
4809
|
...props,
|
|
4739
|
-
children: /* @__PURE__ */ (0,
|
|
4810
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(ScrollAreaPrimitive.ScrollAreaThumb, { className: "relative flex-1 rounded-full bg-border" })
|
|
4740
4811
|
}
|
|
4741
4812
|
));
|
|
4742
4813
|
ScrollBar.displayName = ScrollAreaPrimitive.ScrollAreaScrollbar.displayName;
|
|
4743
4814
|
|
|
4744
|
-
// src/components/composer/ConnectorMenuPanel.tsx
|
|
4745
|
-
var React11 = __toESM(require("react"), 1);
|
|
4746
|
-
var import_lucide_react3 = require("lucide-react");
|
|
4747
|
-
|
|
4748
4815
|
// src/components/ui/separator.tsx
|
|
4749
|
-
var
|
|
4750
|
-
var
|
|
4751
|
-
var Separator =
|
|
4752
|
-
({ className, orientation = "horizontal", ...props }, ref) => /* @__PURE__ */ (0,
|
|
4816
|
+
var React11 = __toESM(require("react"), 1);
|
|
4817
|
+
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
4818
|
+
var Separator = React11.forwardRef(
|
|
4819
|
+
({ className, orientation = "horizontal", ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
4753
4820
|
"div",
|
|
4754
4821
|
{
|
|
4755
4822
|
ref,
|
|
@@ -4767,7 +4834,7 @@ var Separator = React10.forwardRef(
|
|
|
4767
4834
|
Separator.displayName = "Separator";
|
|
4768
4835
|
|
|
4769
4836
|
// src/components/composer/ConnectorMenuPanel.tsx
|
|
4770
|
-
var
|
|
4837
|
+
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
4771
4838
|
function resolveConnectorManagementUrl(apiUrl, scope) {
|
|
4772
4839
|
const base2 = apiUrl?.trim() || window.location.href;
|
|
4773
4840
|
const path = scope.type === "project" ? `/project/${encodeURIComponent(scope.projectId)}/config` : `/xpert/w/${encodeURIComponent(scope.workspaceId)}/connectors`;
|
|
@@ -4799,7 +4866,7 @@ function ConnectorIcon({
|
|
|
4799
4866
|
label
|
|
4800
4867
|
}) {
|
|
4801
4868
|
if (option.icon?.type === "image" && typeof option.icon.value === "string") {
|
|
4802
|
-
return /* @__PURE__ */ (0,
|
|
4869
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
4803
4870
|
"img",
|
|
4804
4871
|
{
|
|
4805
4872
|
src: option.icon.value,
|
|
@@ -4808,13 +4875,13 @@ function ConnectorIcon({
|
|
|
4808
4875
|
}
|
|
4809
4876
|
);
|
|
4810
4877
|
}
|
|
4811
|
-
return /* @__PURE__ */ (0,
|
|
4878
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
4812
4879
|
"span",
|
|
4813
4880
|
{
|
|
4814
4881
|
"aria-hidden": "true",
|
|
4815
4882
|
title: label,
|
|
4816
4883
|
className: "flex size-7 items-center justify-center rounded-md bg-muted text-muted-foreground",
|
|
4817
|
-
children: /* @__PURE__ */ (0,
|
|
4884
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_lucide_react3.Cable, { className: "size-4" })
|
|
4818
4885
|
}
|
|
4819
4886
|
);
|
|
4820
4887
|
}
|
|
@@ -4830,22 +4897,22 @@ function ConnectorMenuPanel({
|
|
|
4830
4897
|
apiUrl
|
|
4831
4898
|
}) {
|
|
4832
4899
|
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] =
|
|
4900
|
+
const [query, setQuery] = React12.useState("");
|
|
4901
|
+
const [scope, setScope] = React12.useState(null);
|
|
4902
|
+
const [options, setOptions] = React12.useState([]);
|
|
4903
|
+
const [loading, setLoading] = React12.useState(false);
|
|
4904
|
+
const [error, setError] = React12.useState(null);
|
|
4905
|
+
const [connectingBindingId, setConnectingBindingId] = React12.useState(null);
|
|
4839
4906
|
const loadErrorMessage = t("composer.connectors.loadError");
|
|
4840
4907
|
const accessDeniedMessage = t("composer.connectors.accessDenied");
|
|
4841
4908
|
const scopeUnavailableMessage = t("composer.connectors.scopeUnavailable");
|
|
4842
|
-
const pollAbortRef =
|
|
4843
|
-
const popupRef =
|
|
4844
|
-
const selectedBindingIdSet =
|
|
4909
|
+
const pollAbortRef = React12.useRef(null);
|
|
4910
|
+
const popupRef = React12.useRef(null);
|
|
4911
|
+
const selectedBindingIdSet = React12.useMemo(
|
|
4845
4912
|
() => new Set(selectedBindingIds),
|
|
4846
4913
|
[selectedBindingIds]
|
|
4847
4914
|
);
|
|
4848
|
-
const loadConnectors =
|
|
4915
|
+
const loadConnectors = React12.useCallback(
|
|
4849
4916
|
async (signal) => {
|
|
4850
4917
|
if (!client || !xpertId) return;
|
|
4851
4918
|
const response = await client.connectors.runtimeOptions(xpertId, {
|
|
@@ -4857,7 +4924,7 @@ function ConnectorMenuPanel({
|
|
|
4857
4924
|
},
|
|
4858
4925
|
[client, projectId, xpertId]
|
|
4859
4926
|
);
|
|
4860
|
-
|
|
4927
|
+
React12.useEffect(() => {
|
|
4861
4928
|
if (!client || !xpertId) {
|
|
4862
4929
|
setScope(null);
|
|
4863
4930
|
setOptions([]);
|
|
@@ -4880,7 +4947,7 @@ function ConnectorMenuPanel({
|
|
|
4880
4947
|
});
|
|
4881
4948
|
return () => controller.abort();
|
|
4882
4949
|
}, [accessDeniedMessage, client, loadConnectors, loadErrorMessage, xpertId]);
|
|
4883
|
-
|
|
4950
|
+
React12.useEffect(
|
|
4884
4951
|
() => () => {
|
|
4885
4952
|
pollAbortRef.current?.abort();
|
|
4886
4953
|
if (popupRef.current && !popupRef.current.closed) {
|
|
@@ -4891,7 +4958,7 @@ function ConnectorMenuPanel({
|
|
|
4891
4958
|
);
|
|
4892
4959
|
const manageUrl = scope ? resolveConnectorManagementUrl(apiUrl, scope) : null;
|
|
4893
4960
|
const normalizedQuery = query.trim().toLocaleLowerCase();
|
|
4894
|
-
const filteredOptions =
|
|
4961
|
+
const filteredOptions = React12.useMemo(
|
|
4895
4962
|
() => options.filter((option) => {
|
|
4896
4963
|
if (!normalizedQuery) return true;
|
|
4897
4964
|
const searchable = `${localizeText(
|
|
@@ -4902,7 +4969,7 @@ function ConnectorMenuPanel({
|
|
|
4902
4969
|
}),
|
|
4903
4970
|
[i18n2.language, normalizedQuery, options]
|
|
4904
4971
|
);
|
|
4905
|
-
const refresh =
|
|
4972
|
+
const refresh = React12.useCallback(async () => {
|
|
4906
4973
|
setLoading(true);
|
|
4907
4974
|
try {
|
|
4908
4975
|
await loadConnectors();
|
|
@@ -4911,7 +4978,7 @@ function ConnectorMenuPanel({
|
|
|
4911
4978
|
setLoading(false);
|
|
4912
4979
|
}
|
|
4913
4980
|
}, [loadConnectors]);
|
|
4914
|
-
const pollAuthorization =
|
|
4981
|
+
const pollAuthorization = React12.useCallback(
|
|
4915
4982
|
async (bindingId, initial, popup, signal) => {
|
|
4916
4983
|
if (!client) return;
|
|
4917
4984
|
let status = initial;
|
|
@@ -4948,7 +5015,7 @@ function ConnectorMenuPanel({
|
|
|
4948
5015
|
},
|
|
4949
5016
|
[client, onSelectionChange, refresh, selectedBindingIds, xpertId]
|
|
4950
5017
|
);
|
|
4951
|
-
const openManageConnectors =
|
|
5018
|
+
const openManageConnectors = React12.useCallback(() => {
|
|
4952
5019
|
if (!manageUrl) {
|
|
4953
5020
|
setError(scopeUnavailableMessage);
|
|
4954
5021
|
return;
|
|
@@ -4960,7 +5027,7 @@ function ConnectorMenuPanel({
|
|
|
4960
5027
|
}
|
|
4961
5028
|
popup.opener = null;
|
|
4962
5029
|
}, [manageUrl, scopeUnavailableMessage, t]);
|
|
4963
|
-
const connectPersonalBinding =
|
|
5030
|
+
const connectPersonalBinding = React12.useCallback(
|
|
4964
5031
|
async (option) => {
|
|
4965
5032
|
if (!client) return;
|
|
4966
5033
|
if (option.profile) {
|
|
@@ -5046,7 +5113,7 @@ function ConnectorMenuPanel({
|
|
|
5046
5113
|
xpertId
|
|
5047
5114
|
]
|
|
5048
5115
|
);
|
|
5049
|
-
const handleOptionClick =
|
|
5116
|
+
const handleOptionClick = React12.useCallback(
|
|
5050
5117
|
(option) => {
|
|
5051
5118
|
if (!isConnectorUsable(option)) {
|
|
5052
5119
|
if (option.authorizationMode === "personal") {
|
|
@@ -5067,15 +5134,15 @@ function ConnectorMenuPanel({
|
|
|
5067
5134
|
selectedBindingIds
|
|
5068
5135
|
]
|
|
5069
5136
|
);
|
|
5070
|
-
return /* @__PURE__ */ (0,
|
|
5137
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
|
|
5071
5138
|
"div",
|
|
5072
5139
|
{
|
|
5073
5140
|
"data-slot": "composer-connector-panel",
|
|
5074
5141
|
className: "flex w-full min-w-0 max-w-full flex-col",
|
|
5075
5142
|
children: [
|
|
5076
|
-
/* @__PURE__ */ (0,
|
|
5077
|
-
/* @__PURE__ */ (0,
|
|
5078
|
-
/* @__PURE__ */ (0,
|
|
5143
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "p-3 pb-2", children: /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "relative", children: [
|
|
5144
|
+
/* @__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" }),
|
|
5145
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
5079
5146
|
Input,
|
|
5080
5147
|
{
|
|
5081
5148
|
value: query,
|
|
@@ -5085,15 +5152,15 @@ function ConnectorMenuPanel({
|
|
|
5085
5152
|
}
|
|
5086
5153
|
)
|
|
5087
5154
|
] }) }),
|
|
5088
|
-
/* @__PURE__ */ (0,
|
|
5089
|
-
/* @__PURE__ */ (0,
|
|
5155
|
+
/* @__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: [
|
|
5156
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_lucide_react3.Loader2, { className: "mr-2 inline size-4 animate-spin" }),
|
|
5090
5157
|
t("composer.connectors.loading")
|
|
5091
|
-
] }) : !xpertId ? /* @__PURE__ */ (0,
|
|
5158
|
+
] }) : !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
5159
|
const label = localizeText(option.label, i18n2.language);
|
|
5093
5160
|
const selected = selectedBindingIdSet.has(option.bindingId);
|
|
5094
5161
|
const usable = isConnectorUsable(option);
|
|
5095
5162
|
const connecting = connectingBindingId === option.bindingId;
|
|
5096
|
-
return /* @__PURE__ */ (0,
|
|
5163
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
|
|
5097
5164
|
"button",
|
|
5098
5165
|
{
|
|
5099
5166
|
type: "button",
|
|
@@ -5105,13 +5172,13 @@ function ConnectorMenuPanel({
|
|
|
5105
5172
|
),
|
|
5106
5173
|
onClick: () => handleOptionClick(option),
|
|
5107
5174
|
children: [
|
|
5108
|
-
/* @__PURE__ */ (0,
|
|
5109
|
-
/* @__PURE__ */ (0,
|
|
5110
|
-
/* @__PURE__ */ (0,
|
|
5111
|
-
/* @__PURE__ */ (0,
|
|
5175
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(ConnectorIcon, { option, label }),
|
|
5176
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("span", { className: "min-w-0 flex-1", children: [
|
|
5177
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "block truncate text-base", children: label || option.provider }),
|
|
5178
|
+
/* @__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
5179
|
] }),
|
|
5113
|
-
/* @__PURE__ */ (0,
|
|
5114
|
-
connecting ? /* @__PURE__ */ (0,
|
|
5180
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("span", { className: "inline-flex shrink-0 items-center gap-1.5 text-sm text-muted-foreground", children: [
|
|
5181
|
+
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
5182
|
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
5183
|
] })
|
|
5117
5184
|
]
|
|
@@ -5119,9 +5186,9 @@ function ConnectorMenuPanel({
|
|
|
5119
5186
|
option.bindingId
|
|
5120
5187
|
);
|
|
5121
5188
|
}) }) }),
|
|
5122
|
-
error ? /* @__PURE__ */ (0,
|
|
5123
|
-
/* @__PURE__ */ (0,
|
|
5124
|
-
/* @__PURE__ */ (0,
|
|
5189
|
+
error ? /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { role: "alert", className: "px-4 py-2 text-sm text-destructive", children: error }) : null,
|
|
5190
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(Separator, {}),
|
|
5191
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
|
|
5125
5192
|
"button",
|
|
5126
5193
|
{
|
|
5127
5194
|
type: "button",
|
|
@@ -5129,7 +5196,7 @@ function ConnectorMenuPanel({
|
|
|
5129
5196
|
disabled: !scope,
|
|
5130
5197
|
onClick: openManageConnectors,
|
|
5131
5198
|
children: [
|
|
5132
|
-
/* @__PURE__ */ (0,
|
|
5199
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_lucide_react3.ArrowUpRight, { className: "size-5" }),
|
|
5133
5200
|
t("composer.connectors.manage")
|
|
5134
5201
|
]
|
|
5135
5202
|
}
|
|
@@ -5142,27 +5209,29 @@ function isAccessDenied(error) {
|
|
|
5142
5209
|
return error instanceof Error && "status" in error && (error.status === 401 || error.status === 403);
|
|
5143
5210
|
}
|
|
5144
5211
|
function ConnectorMessage({ children }) {
|
|
5145
|
-
return /* @__PURE__ */ (0,
|
|
5212
|
+
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
5213
|
}
|
|
5147
5214
|
|
|
5148
5215
|
// src/components/composer/ComposerMenu.tsx
|
|
5149
|
-
var
|
|
5216
|
+
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
5217
|
+
var COMPOSER_MENU_EXPANDED_WIDTH_REM = 33;
|
|
5218
|
+
var COMPOSER_MENU_COLLISION_PADDING = 12;
|
|
5150
5219
|
function getIconComponent(icon) {
|
|
5151
5220
|
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,
|
|
5221
|
+
plus: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_lucide_react4.Plus, { size: 16 }),
|
|
5222
|
+
document: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_lucide_react4.FileText, { size: 16 }),
|
|
5223
|
+
write: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_lucide_react4.Pencil, { size: 16 }),
|
|
5224
|
+
sparkle: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_lucide_react4.Sparkles, { size: 16 }),
|
|
5225
|
+
lightbulb: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_lucide_react4.Lightbulb, { size: 16 }),
|
|
5226
|
+
"settings-slider": /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_lucide_react4.SlidersHorizontal, { size: 16 }),
|
|
5227
|
+
search: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_lucide_react4.Search, { size: 16 }),
|
|
5228
|
+
globe: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_lucide_react4.Globe, { size: 16 }),
|
|
5229
|
+
images: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_lucide_react4.Images, { size: 16 })
|
|
5161
5230
|
};
|
|
5162
5231
|
return iconMap[icon] || iconMap.sparkle;
|
|
5163
5232
|
}
|
|
5164
5233
|
function Toggle({ checked }) {
|
|
5165
|
-
return /* @__PURE__ */ (0,
|
|
5234
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
5166
5235
|
"span",
|
|
5167
5236
|
{
|
|
5168
5237
|
"aria-hidden": "true",
|
|
@@ -5170,7 +5239,7 @@ function Toggle({ checked }) {
|
|
|
5170
5239
|
"relative inline-flex h-6 w-10 shrink-0 items-center rounded-full transition-colors",
|
|
5171
5240
|
checked ? "bg-primary" : "bg-muted-foreground/20"
|
|
5172
5241
|
),
|
|
5173
|
-
children: /* @__PURE__ */ (0,
|
|
5242
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
5174
5243
|
"span",
|
|
5175
5244
|
{
|
|
5176
5245
|
className: cn(
|
|
@@ -5206,13 +5275,14 @@ function ComposerMenu({
|
|
|
5206
5275
|
}) {
|
|
5207
5276
|
const { t } = useChatkitTranslation();
|
|
5208
5277
|
const { theme } = useTheme();
|
|
5209
|
-
const [open, setOpen] =
|
|
5210
|
-
const [activePanel, setActivePanel] =
|
|
5278
|
+
const [open, setOpen] = React13.useState(false);
|
|
5279
|
+
const [activePanel, setActivePanel] = React13.useState(
|
|
5211
5280
|
null
|
|
5212
5281
|
);
|
|
5213
|
-
const [query, setQuery] =
|
|
5214
|
-
const [collisionBoundary, setCollisionBoundary] =
|
|
5215
|
-
const
|
|
5282
|
+
const [query, setQuery] = React13.useState("");
|
|
5283
|
+
const [collisionBoundary, setCollisionBoundary] = React13.useState();
|
|
5284
|
+
const [canExpandSecondaryPanel, setCanExpandSecondaryPanel] = React13.useState(false);
|
|
5285
|
+
const triggerRef = React13.useRef(null);
|
|
5216
5286
|
const roundedClass = getRoundedClass(theme.radius);
|
|
5217
5287
|
const panelRoundedClass = getPanelRoundedClass(theme.radius);
|
|
5218
5288
|
const menuItemRoundedClass = getMenuItemRoundedClass(theme.radius);
|
|
@@ -5238,8 +5308,148 @@ function ComposerMenu({
|
|
|
5238
5308
|
setActivePanel(panel);
|
|
5239
5309
|
setQuery("");
|
|
5240
5310
|
};
|
|
5311
|
+
React13.useLayoutEffect(() => {
|
|
5312
|
+
if (!open || !collisionBoundary) {
|
|
5313
|
+
setCanExpandSecondaryPanel(false);
|
|
5314
|
+
return;
|
|
5315
|
+
}
|
|
5316
|
+
const updateLayout = () => {
|
|
5317
|
+
const trigger = triggerRef.current;
|
|
5318
|
+
if (!trigger) {
|
|
5319
|
+
setCanExpandSecondaryPanel(false);
|
|
5320
|
+
return;
|
|
5321
|
+
}
|
|
5322
|
+
const boundaryRect = collisionBoundary.getBoundingClientRect();
|
|
5323
|
+
const triggerRect = trigger.getBoundingClientRect();
|
|
5324
|
+
const rootFontSize = Number.parseFloat(
|
|
5325
|
+
window.getComputedStyle(document.documentElement).fontSize
|
|
5326
|
+
);
|
|
5327
|
+
const remInPixels = Number.isFinite(rootFontSize) ? rootFontSize : 16;
|
|
5328
|
+
const menuLeft = Math.max(
|
|
5329
|
+
triggerRect.left,
|
|
5330
|
+
boundaryRect.left + COMPOSER_MENU_COLLISION_PADDING
|
|
5331
|
+
);
|
|
5332
|
+
const availableWidth = boundaryRect.right - COMPOSER_MENU_COLLISION_PADDING - menuLeft;
|
|
5333
|
+
const requiredWidth = COMPOSER_MENU_EXPANDED_WIDTH_REM * remInPixels;
|
|
5334
|
+
setCanExpandSecondaryPanel(availableWidth >= requiredWidth);
|
|
5335
|
+
};
|
|
5336
|
+
updateLayout();
|
|
5337
|
+
window.addEventListener("resize", updateLayout);
|
|
5338
|
+
const resizeObserver = typeof ResizeObserver === "function" ? new ResizeObserver(updateLayout) : null;
|
|
5339
|
+
resizeObserver?.observe(collisionBoundary);
|
|
5340
|
+
if (triggerRef.current) {
|
|
5341
|
+
resizeObserver?.observe(triggerRef.current);
|
|
5342
|
+
}
|
|
5343
|
+
return () => {
|
|
5344
|
+
window.removeEventListener("resize", updateLayout);
|
|
5345
|
+
resizeObserver?.disconnect();
|
|
5346
|
+
};
|
|
5347
|
+
}, [collisionBoundary, open]);
|
|
5348
|
+
const returnToPrimaryPanel = () => {
|
|
5349
|
+
setActivePanel(null);
|
|
5350
|
+
setQuery("");
|
|
5351
|
+
};
|
|
5352
|
+
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
5353
|
const normalizedQuery = query.trim().toLocaleLowerCase();
|
|
5242
5354
|
const matchesQuery2 = (label, description) => !normalizedQuery || `${label} ${description ?? ""}`.toLocaleLowerCase().includes(normalizedQuery);
|
|
5355
|
+
const renderDetailPills = (label, values) => {
|
|
5356
|
+
if (!values?.length) return null;
|
|
5357
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "space-y-1", children: [
|
|
5358
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "text-[11px] font-medium uppercase text-muted-foreground", children: label }),
|
|
5359
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "flex flex-wrap gap-1", children: [
|
|
5360
|
+
values.slice(0, 6).map((value) => /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
5361
|
+
"span",
|
|
5362
|
+
{
|
|
5363
|
+
className: "max-w-full truncate rounded-md bg-muted px-1.5 py-0.5 text-[11px] text-foreground",
|
|
5364
|
+
children: value
|
|
5365
|
+
},
|
|
5366
|
+
value
|
|
5367
|
+
)),
|
|
5368
|
+
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: [
|
|
5369
|
+
"+",
|
|
5370
|
+
values.length - 6
|
|
5371
|
+
] }) : null
|
|
5372
|
+
] })
|
|
5373
|
+
] });
|
|
5374
|
+
};
|
|
5375
|
+
const renderSubAgentDetailCard = (subAgent) => {
|
|
5376
|
+
const agentKind = subAgent.type === "xpert" ? t("composer.capabilities.xpertAgent") : t("composer.capabilities.agent");
|
|
5377
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
5378
|
+
"div",
|
|
5379
|
+
{
|
|
5380
|
+
"data-slot": "runtime-sub-agent-detail-card",
|
|
5381
|
+
className: cn(
|
|
5382
|
+
"pointer-events-none w-80 space-y-3 border border-border bg-popover p-3 text-popover-foreground shadow-lg",
|
|
5383
|
+
panelRoundedClass
|
|
5384
|
+
),
|
|
5385
|
+
children: [
|
|
5386
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "flex items-start gap-3", children: [
|
|
5387
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
5388
|
+
ChatkitAvatar,
|
|
5389
|
+
{
|
|
5390
|
+
avatar: normalizeChatkitAvatar(subAgent.avatar),
|
|
5391
|
+
label: subAgent.label,
|
|
5392
|
+
className: "h-9 w-9 shrink-0",
|
|
5393
|
+
fallbackClassName: "text-xs"
|
|
5394
|
+
}
|
|
5395
|
+
),
|
|
5396
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "min-w-0 flex-1", children: [
|
|
5397
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "truncate text-sm font-medium", children: subAgent.label }),
|
|
5398
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "truncate text-xs text-muted-foreground", children: subAgent.name ?? agentKind })
|
|
5399
|
+
] })
|
|
5400
|
+
] }),
|
|
5401
|
+
subAgent.description ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "line-clamp-4 text-xs leading-5 text-muted-foreground", children: subAgent.description }) : null,
|
|
5402
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "grid grid-cols-2 gap-2 text-xs", children: [
|
|
5403
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "rounded-md bg-muted px-2 py-1", children: [
|
|
5404
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: "block text-[11px] text-muted-foreground", children: t("composer.capabilities.type") }),
|
|
5405
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: "font-medium", children: agentKind })
|
|
5406
|
+
] }),
|
|
5407
|
+
subAgent.agentKey || subAgent.xpertId ? /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "rounded-md bg-muted px-2 py-1", children: [
|
|
5408
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: "block text-[11px] text-muted-foreground", children: t("composer.capabilities.identifier") }),
|
|
5409
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: "block truncate font-mono text-[11px]", children: subAgent.agentKey ?? subAgent.xpertId })
|
|
5410
|
+
] }) : null
|
|
5411
|
+
] }),
|
|
5412
|
+
renderDetailPills(
|
|
5413
|
+
t("composer.capabilities.tools"),
|
|
5414
|
+
subAgent.toolNames
|
|
5415
|
+
),
|
|
5416
|
+
renderDetailPills(
|
|
5417
|
+
t("composer.capabilities.toolsets"),
|
|
5418
|
+
subAgent.toolsetNames
|
|
5419
|
+
),
|
|
5420
|
+
renderDetailPills(
|
|
5421
|
+
t("composer.capabilities.knowledge"),
|
|
5422
|
+
subAgent.knowledgebaseNames
|
|
5423
|
+
)
|
|
5424
|
+
]
|
|
5425
|
+
}
|
|
5426
|
+
);
|
|
5427
|
+
};
|
|
5428
|
+
const renderSubAgentInfoButton = (subAgent) => /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(Tooltip, { children: [
|
|
5429
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
5430
|
+
"button",
|
|
5431
|
+
{
|
|
5432
|
+
type: "button",
|
|
5433
|
+
"aria-label": t("composer.capabilities.agentDetails"),
|
|
5434
|
+
"data-slot": "runtime-sub-agent-info-trigger",
|
|
5435
|
+
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",
|
|
5436
|
+
onClick: (event) => event.stopPropagation(),
|
|
5437
|
+
onPointerDown: (event) => event.stopPropagation(),
|
|
5438
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_lucide_react4.Info, { size: 14 })
|
|
5439
|
+
}
|
|
5440
|
+
) }),
|
|
5441
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
5442
|
+
TooltipContent,
|
|
5443
|
+
{
|
|
5444
|
+
side: "top",
|
|
5445
|
+
align: "center",
|
|
5446
|
+
sideOffset: 8,
|
|
5447
|
+
hideArrow: true,
|
|
5448
|
+
className: "bg-transparent p-0 text-popover-foreground shadow-none",
|
|
5449
|
+
children: renderSubAgentDetailCard(subAgent)
|
|
5450
|
+
}
|
|
5451
|
+
)
|
|
5452
|
+
] });
|
|
5243
5453
|
const renderCapabilityPanel = (panel) => {
|
|
5244
5454
|
const isSkills = panel === "skills";
|
|
5245
5455
|
const filteredSkills = isSkills ? skills.filter((skill) => matchesQuery2(skill.label, skill.description)) : [];
|
|
@@ -5250,7 +5460,7 @@ function ComposerMenu({
|
|
|
5250
5460
|
skill.id
|
|
5251
5461
|
) : false;
|
|
5252
5462
|
const skillDescription = skill.description ?? skill.repositoryName;
|
|
5253
|
-
return /* @__PURE__ */ (0,
|
|
5463
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
5254
5464
|
DropdownMenuCheckboxItem,
|
|
5255
5465
|
{
|
|
5256
5466
|
checked: selected,
|
|
@@ -5263,14 +5473,14 @@ function ComposerMenu({
|
|
|
5263
5473
|
selected && "bg-muted"
|
|
5264
5474
|
),
|
|
5265
5475
|
children: [
|
|
5266
|
-
/* @__PURE__ */ (0,
|
|
5476
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
5267
5477
|
"span",
|
|
5268
5478
|
{
|
|
5269
5479
|
className: cn(
|
|
5270
5480
|
"flex size-7 shrink-0 items-center justify-center text-muted-foreground",
|
|
5271
5481
|
skillDescription && "mt-0.5"
|
|
5272
5482
|
),
|
|
5273
|
-
children: /* @__PURE__ */ (0,
|
|
5483
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
5274
5484
|
RuntimeCapabilityIcon,
|
|
5275
5485
|
{
|
|
5276
5486
|
option: {
|
|
@@ -5285,9 +5495,9 @@ function ComposerMenu({
|
|
|
5285
5495
|
)
|
|
5286
5496
|
}
|
|
5287
5497
|
),
|
|
5288
|
-
/* @__PURE__ */ (0,
|
|
5289
|
-
/* @__PURE__ */ (0,
|
|
5290
|
-
skillDescription && /* @__PURE__ */ (0,
|
|
5498
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("span", { className: "min-w-0 flex-1 text-left", children: [
|
|
5499
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: "block truncate", children: skill.label }),
|
|
5500
|
+
skillDescription && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: "block truncate text-xs text-muted-foreground", children: skillDescription })
|
|
5291
5501
|
] })
|
|
5292
5502
|
]
|
|
5293
5503
|
},
|
|
@@ -5313,7 +5523,7 @@ function ComposerMenu({
|
|
|
5313
5523
|
"subAgent",
|
|
5314
5524
|
subAgent.nodeKey
|
|
5315
5525
|
) : false;
|
|
5316
|
-
return /* @__PURE__ */ (0,
|
|
5526
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
5317
5527
|
DropdownMenuCheckboxItem,
|
|
5318
5528
|
{
|
|
5319
5529
|
checked: selected,
|
|
@@ -5329,7 +5539,7 @@ function ComposerMenu({
|
|
|
5329
5539
|
selected && "bg-muted"
|
|
5330
5540
|
),
|
|
5331
5541
|
children: [
|
|
5332
|
-
/* @__PURE__ */ (0,
|
|
5542
|
+
/* @__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
5543
|
RuntimeCapabilityIcon,
|
|
5334
5544
|
{
|
|
5335
5545
|
option: {
|
|
@@ -5342,16 +5552,17 @@ function ComposerMenu({
|
|
|
5342
5552
|
variant: "list"
|
|
5343
5553
|
}
|
|
5344
5554
|
) }),
|
|
5345
|
-
/* @__PURE__ */ (0,
|
|
5346
|
-
/* @__PURE__ */ (0,
|
|
5347
|
-
(subAgent.description || subAgent.name) && /* @__PURE__ */ (0,
|
|
5348
|
-
] })
|
|
5555
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("span", { className: "min-w-0 flex-1 text-left", children: [
|
|
5556
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: "block truncate", children: subAgent.label }),
|
|
5557
|
+
(subAgent.description || subAgent.name) && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: "block truncate text-xs text-muted-foreground", children: subAgent.description ?? subAgent.name })
|
|
5558
|
+
] }),
|
|
5559
|
+
renderSubAgentInfoButton(subAgent)
|
|
5349
5560
|
]
|
|
5350
5561
|
},
|
|
5351
5562
|
subAgent.nodeKey
|
|
5352
5563
|
);
|
|
5353
5564
|
});
|
|
5354
|
-
const toolRows = isSkills ? tools.filter((tool) => matchesQuery2(tool.label, tool.shortLabel)).map((tool) => /* @__PURE__ */ (0,
|
|
5565
|
+
const toolRows = isSkills ? tools.filter((tool) => matchesQuery2(tool.label, tool.shortLabel)).map((tool) => /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
5355
5566
|
"button",
|
|
5356
5567
|
{
|
|
5357
5568
|
type: "button",
|
|
@@ -5364,14 +5575,14 @@ function ComposerMenu({
|
|
|
5364
5575
|
setOpen(false);
|
|
5365
5576
|
},
|
|
5366
5577
|
children: [
|
|
5367
|
-
/* @__PURE__ */ (0,
|
|
5368
|
-
/* @__PURE__ */ (0,
|
|
5578
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: "flex size-7 shrink-0 items-center justify-center text-muted-foreground", children: getIconComponent(tool.icon) }),
|
|
5579
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: "truncate", children: tool.label })
|
|
5369
5580
|
]
|
|
5370
5581
|
},
|
|
5371
5582
|
tool.id
|
|
5372
5583
|
)) : [];
|
|
5373
|
-
return /* @__PURE__ */ (0,
|
|
5374
|
-
/* @__PURE__ */ (0,
|
|
5584
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_jsx_runtime15.Fragment, { children: [
|
|
5585
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
5375
5586
|
PanelSearch,
|
|
5376
5587
|
{
|
|
5377
5588
|
value: query,
|
|
@@ -5381,29 +5592,109 @@ function ComposerMenu({
|
|
|
5381
5592
|
)
|
|
5382
5593
|
}
|
|
5383
5594
|
),
|
|
5384
|
-
/* @__PURE__ */ (0,
|
|
5385
|
-
|
|
5386
|
-
|
|
5387
|
-
|
|
5388
|
-
|
|
5389
|
-
|
|
5390
|
-
|
|
5391
|
-
|
|
5392
|
-
|
|
5393
|
-
|
|
5394
|
-
|
|
5395
|
-
|
|
5396
|
-
|
|
5397
|
-
|
|
5398
|
-
|
|
5399
|
-
|
|
5400
|
-
|
|
5401
|
-
|
|
5402
|
-
|
|
5595
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
5596
|
+
"div",
|
|
5597
|
+
{
|
|
5598
|
+
"data-slot": "composer-capability-scroll",
|
|
5599
|
+
className: "max-h-72 overflow-y-auto overscroll-contain px-2 pb-2",
|
|
5600
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { "data-slot": "composer-capability-list", className: "space-y-1", children: [
|
|
5601
|
+
isSkills && expertSkills.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(SkillGroup, { label: t("composer.workbuddy.expertSkills"), children: expertSkills.map(renderSkillRow) }) : null,
|
|
5602
|
+
isSkills ? Array.from(projectSkillGroups.entries()).map(
|
|
5603
|
+
([projectLabel, projectSkills]) => /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
5604
|
+
SkillGroup,
|
|
5605
|
+
{
|
|
5606
|
+
label: t("composer.workbuddy.projectSkills", {
|
|
5607
|
+
project: projectLabel
|
|
5608
|
+
}),
|
|
5609
|
+
children: projectSkills.map(renderSkillRow)
|
|
5610
|
+
},
|
|
5611
|
+
projectLabel
|
|
5612
|
+
)
|
|
5613
|
+
) : capabilityRows,
|
|
5614
|
+
toolRows,
|
|
5615
|
+
(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(
|
|
5616
|
+
isSkills ? "composer.workbuddy.emptySkills" : "composer.workbuddy.emptyExperts"
|
|
5617
|
+
) }) : null
|
|
5618
|
+
] })
|
|
5619
|
+
}
|
|
5620
|
+
)
|
|
5403
5621
|
] });
|
|
5404
5622
|
};
|
|
5405
|
-
|
|
5406
|
-
|
|
5623
|
+
const primaryPanel = /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
5624
|
+
"div",
|
|
5625
|
+
{
|
|
5626
|
+
"data-slot": "composer-primary-panel",
|
|
5627
|
+
className: cn(
|
|
5628
|
+
"w-64 max-w-full shrink-0 overflow-hidden bg-popover p-1 text-popover-foreground shadow-md ring-1 ring-foreground/10",
|
|
5629
|
+
panelRoundedClass
|
|
5630
|
+
),
|
|
5631
|
+
children: [
|
|
5632
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
5633
|
+
DropdownMenuItem,
|
|
5634
|
+
{
|
|
5635
|
+
disabled: !attachmentsEnabled,
|
|
5636
|
+
onSelect: onAttachmentClick,
|
|
5637
|
+
className: cn("gap-3 p-1.5 font-normal", menuItemRoundedClass),
|
|
5638
|
+
children: [
|
|
5639
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_lucide_react4.Paperclip, { className: "size-5" }),
|
|
5640
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: "flex-1 text-base", children: t("composer.addAttachment") }),
|
|
5641
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_lucide_react4.ChevronRight, { className: "size-4" })
|
|
5642
|
+
]
|
|
5643
|
+
}
|
|
5644
|
+
),
|
|
5645
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(DropdownMenuSeparator, { className: "my-2" }),
|
|
5646
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
5647
|
+
PrimaryPanelItem,
|
|
5648
|
+
{
|
|
5649
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_lucide_react4.Target, {}),
|
|
5650
|
+
label: t("composer.workbuddy.targets"),
|
|
5651
|
+
active: activePanel === "targets",
|
|
5652
|
+
onSelect: () => choosePanel("targets"),
|
|
5653
|
+
className: menuItemRoundedClass
|
|
5654
|
+
}
|
|
5655
|
+
),
|
|
5656
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
5657
|
+
PrimaryPanelItem,
|
|
5658
|
+
{
|
|
5659
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_lucide_react4.Bot, {}),
|
|
5660
|
+
label: t("composer.workbuddy.experts"),
|
|
5661
|
+
count: selectedSubAgentCount,
|
|
5662
|
+
active: activePanel === "experts",
|
|
5663
|
+
onSelect: () => choosePanel("experts"),
|
|
5664
|
+
className: menuItemRoundedClass
|
|
5665
|
+
}
|
|
5666
|
+
),
|
|
5667
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
5668
|
+
PrimaryPanelItem,
|
|
5669
|
+
{
|
|
5670
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_lucide_react4.WandSparkles, {}),
|
|
5671
|
+
label: t("composer.capabilities.skills"),
|
|
5672
|
+
count: selectedSkillCount,
|
|
5673
|
+
active: activePanel === "skills",
|
|
5674
|
+
onSelect: () => choosePanel("skills"),
|
|
5675
|
+
className: menuItemRoundedClass
|
|
5676
|
+
}
|
|
5677
|
+
),
|
|
5678
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
5679
|
+
PrimaryPanelItem,
|
|
5680
|
+
{
|
|
5681
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_lucide_react4.Plug, {}),
|
|
5682
|
+
label: t("composer.workbuddy.connectors"),
|
|
5683
|
+
count: selectedConnectorBindingIds?.length ?? 0,
|
|
5684
|
+
active: activePanel === "connectors",
|
|
5685
|
+
disabled: !connectorsEnabled,
|
|
5686
|
+
onSelect: () => choosePanel("connectors"),
|
|
5687
|
+
className: menuItemRoundedClass
|
|
5688
|
+
}
|
|
5689
|
+
)
|
|
5690
|
+
]
|
|
5691
|
+
}
|
|
5692
|
+
);
|
|
5693
|
+
const secondaryPanelExpandsRight = Boolean(
|
|
5694
|
+
activePanel && activePanelLabel && canExpandSecondaryPanel
|
|
5695
|
+
);
|
|
5696
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(DropdownMenu, { open, onOpenChange: handleOpenChange, modal: false, children: [
|
|
5697
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
5407
5698
|
Button,
|
|
5408
5699
|
{
|
|
5409
5700
|
ref: triggerRef,
|
|
@@ -5417,7 +5708,7 @@ function ComposerMenu({
|
|
|
5417
5708
|
"size-9 shrink-0 transition-[background-color,border-radius] duration-300 hover:bg-muted",
|
|
5418
5709
|
open ? "rounded-full bg-muted" : roundedClass
|
|
5419
5710
|
),
|
|
5420
|
-
children: /* @__PURE__ */ (0,
|
|
5711
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
5421
5712
|
import_lucide_react4.Plus,
|
|
5422
5713
|
{
|
|
5423
5714
|
className: cn(
|
|
@@ -5428,173 +5719,116 @@ function ComposerMenu({
|
|
|
5428
5719
|
)
|
|
5429
5720
|
}
|
|
5430
5721
|
) }),
|
|
5431
|
-
/* @__PURE__ */ (0,
|
|
5722
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
5432
5723
|
DropdownMenuContent,
|
|
5433
5724
|
{
|
|
5434
5725
|
align: "start",
|
|
5435
5726
|
side: "top",
|
|
5436
5727
|
sideOffset: 8,
|
|
5437
5728
|
collisionBoundary,
|
|
5438
|
-
collisionPadding:
|
|
5729
|
+
collisionPadding: COMPOSER_MENU_COLLISION_PADDING,
|
|
5730
|
+
"data-layout": canExpandSecondaryPanel ? "wide" : "narrow",
|
|
5439
5731
|
className: cn(
|
|
5440
|
-
"bg-transparent shadow-none ring-0",
|
|
5441
|
-
|
|
5732
|
+
"max-w-(--radix-dropdown-menu-content-available-width) bg-transparent p-1 shadow-none ring-0",
|
|
5733
|
+
secondaryPanelExpandsRight ? "w-[33rem] overflow-visible" : "w-[16.5rem] overflow-hidden"
|
|
5442
5734
|
),
|
|
5443
|
-
children: /* @__PURE__ */ (0,
|
|
5735
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
5444
5736
|
"div",
|
|
5445
5737
|
{
|
|
5738
|
+
"data-slot": "composer-menu-layout",
|
|
5446
5739
|
className: cn(
|
|
5447
|
-
"items-end
|
|
5448
|
-
|
|
5740
|
+
"flex items-end",
|
|
5741
|
+
secondaryPanelExpandsRight && "w-full min-w-0 gap-2"
|
|
5449
5742
|
),
|
|
5450
5743
|
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,
|
|
5744
|
+
secondaryPanelExpandsRight ? primaryPanel : null,
|
|
5745
|
+
activePanel && activePanelLabel ? /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(SecondaryPanel, { panelRoundedClass, children: [
|
|
5746
|
+
!secondaryPanelExpandsRight ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
5747
|
+
PanelHeader,
|
|
5524
5748
|
{
|
|
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
|
-
]
|
|
5749
|
+
label: activePanelLabel,
|
|
5750
|
+
onBack: returnToPrimaryPanel,
|
|
5751
|
+
className: menuItemRoundedClass
|
|
5542
5752
|
}
|
|
5543
|
-
),
|
|
5544
|
-
/* @__PURE__ */ (0,
|
|
5545
|
-
|
|
5753
|
+
) : null,
|
|
5754
|
+
activePanel === "targets" ? /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "space-y-1 p-1", children: [
|
|
5755
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
5756
|
+
DropdownMenuItem,
|
|
5757
|
+
{
|
|
5758
|
+
role: "switch",
|
|
5759
|
+
"aria-checked": goalPanelOpen,
|
|
5760
|
+
disabled: !goalCommandAvailable,
|
|
5761
|
+
onSelect: (event) => {
|
|
5762
|
+
event.preventDefault();
|
|
5763
|
+
onGoalPanelOpenChange?.(!goalPanelOpen);
|
|
5764
|
+
},
|
|
5765
|
+
className: cn(
|
|
5766
|
+
"gap-3 p-1.5",
|
|
5767
|
+
menuItemRoundedClass,
|
|
5768
|
+
goalPanelOpen && "bg-muted"
|
|
5769
|
+
),
|
|
5770
|
+
children: [
|
|
5771
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_lucide_react4.Target, { className: "size-5" }),
|
|
5772
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: "min-w-0 flex-1 text-base", children: t("chat.goal.label") }),
|
|
5773
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Toggle, { checked: goalPanelOpen })
|
|
5774
|
+
]
|
|
5775
|
+
}
|
|
5776
|
+
),
|
|
5777
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
5778
|
+
DropdownMenuItem,
|
|
5779
|
+
{
|
|
5780
|
+
role: "switch",
|
|
5781
|
+
"aria-checked": planModeEnabled,
|
|
5782
|
+
onSelect: (event) => {
|
|
5783
|
+
event.preventDefault();
|
|
5784
|
+
onPlanModeChange?.(!planModeEnabled);
|
|
5785
|
+
},
|
|
5786
|
+
className: cn(
|
|
5787
|
+
"gap-3 p-1.5",
|
|
5788
|
+
menuItemRoundedClass,
|
|
5789
|
+
planModeEnabled && "bg-muted"
|
|
5790
|
+
),
|
|
5791
|
+
children: [
|
|
5792
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_lucide_react4.ListChecks, { className: "size-5" }),
|
|
5793
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: "min-w-0 flex-1 text-base", children: t("composer.planMode") }),
|
|
5794
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Toggle, { checked: planModeEnabled })
|
|
5795
|
+
]
|
|
5796
|
+
}
|
|
5797
|
+
)
|
|
5798
|
+
] }) : activePanel === "experts" || activePanel === "skills" ? renderCapabilityPanel(activePanel) : /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
5799
|
+
ConnectorMenuPanel,
|
|
5546
5800
|
{
|
|
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
|
-
]
|
|
5801
|
+
client: connectorClient ?? null,
|
|
5802
|
+
xpertId: connectorXpertId,
|
|
5803
|
+
projectId: connectorProjectId,
|
|
5804
|
+
selectedBindingIds: selectedConnectorBindingIds,
|
|
5805
|
+
onSelectionChange: onConnectorSelectionChange,
|
|
5806
|
+
apiUrl
|
|
5563
5807
|
}
|
|
5564
5808
|
)
|
|
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
|
|
5809
|
+
] }) : primaryPanel
|
|
5576
5810
|
]
|
|
5577
5811
|
}
|
|
5578
5812
|
)
|
|
5579
5813
|
}
|
|
5580
5814
|
),
|
|
5581
|
-
planModeEnabled ? /* @__PURE__ */ (0,
|
|
5815
|
+
planModeEnabled ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
5582
5816
|
ActiveIndicator,
|
|
5583
5817
|
{
|
|
5584
5818
|
label: t("composer.planModeActive"),
|
|
5585
5819
|
ariaLabel: t("composer.disablePlanMode"),
|
|
5586
|
-
icon: /* @__PURE__ */ (0,
|
|
5820
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_lucide_react4.ListChecks, {}),
|
|
5587
5821
|
roundedClass,
|
|
5588
5822
|
disabled,
|
|
5589
5823
|
onClick: () => onPlanModeChange?.(false)
|
|
5590
5824
|
}
|
|
5591
5825
|
) : null,
|
|
5592
|
-
goalCommandAvailable && goalPanelOpen ? /* @__PURE__ */ (0,
|
|
5826
|
+
goalCommandAvailable && goalPanelOpen ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
5593
5827
|
ActiveIndicator,
|
|
5594
5828
|
{
|
|
5595
5829
|
label: t("chat.goal.label"),
|
|
5596
5830
|
ariaLabel: t("chat.goal.hide"),
|
|
5597
|
-
icon: /* @__PURE__ */ (0,
|
|
5831
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_lucide_react4.Target, {}),
|
|
5598
5832
|
roundedClass,
|
|
5599
5833
|
disabled,
|
|
5600
5834
|
onClick: () => onGoalPanelOpenChange?.(false)
|
|
@@ -5602,6 +5836,29 @@ function ComposerMenu({
|
|
|
5602
5836
|
) : null
|
|
5603
5837
|
] });
|
|
5604
5838
|
}
|
|
5839
|
+
function PanelHeader({
|
|
5840
|
+
label,
|
|
5841
|
+
onBack,
|
|
5842
|
+
className
|
|
5843
|
+
}) {
|
|
5844
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_jsx_runtime15.Fragment, { children: [
|
|
5845
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
5846
|
+
DropdownMenuItem,
|
|
5847
|
+
{
|
|
5848
|
+
onSelect: (event) => {
|
|
5849
|
+
event.preventDefault();
|
|
5850
|
+
onBack();
|
|
5851
|
+
},
|
|
5852
|
+
className: cn("gap-3 p-1.5 font-normal", className),
|
|
5853
|
+
children: [
|
|
5854
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_lucide_react4.ArrowLeft, { className: "size-5" }),
|
|
5855
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: "min-w-0 flex-1 text-base", children: label })
|
|
5856
|
+
]
|
|
5857
|
+
}
|
|
5858
|
+
),
|
|
5859
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(DropdownMenuSeparator, { className: "my-0" })
|
|
5860
|
+
] });
|
|
5861
|
+
}
|
|
5605
5862
|
function PrimaryPanelItem({
|
|
5606
5863
|
icon,
|
|
5607
5864
|
label,
|
|
@@ -5611,7 +5868,7 @@ function PrimaryPanelItem({
|
|
|
5611
5868
|
onSelect,
|
|
5612
5869
|
className
|
|
5613
5870
|
}) {
|
|
5614
|
-
return /* @__PURE__ */ (0,
|
|
5871
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
5615
5872
|
DropdownMenuItem,
|
|
5616
5873
|
{
|
|
5617
5874
|
disabled,
|
|
@@ -5621,10 +5878,10 @@ function PrimaryPanelItem({
|
|
|
5621
5878
|
},
|
|
5622
5879
|
className: cn("gap-3 p-1.5 font-normal", className, active && "bg-muted"),
|
|
5623
5880
|
children: [
|
|
5624
|
-
|
|
5625
|
-
/* @__PURE__ */ (0,
|
|
5626
|
-
count > 0 ? /* @__PURE__ */ (0,
|
|
5627
|
-
/* @__PURE__ */ (0,
|
|
5881
|
+
React13.cloneElement(icon, { className: "size-5" }),
|
|
5882
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: "min-w-0 flex-1 text-base", children: label }),
|
|
5883
|
+
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,
|
|
5884
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_lucide_react4.ChevronRight, { className: "size-4" })
|
|
5628
5885
|
]
|
|
5629
5886
|
}
|
|
5630
5887
|
);
|
|
@@ -5633,20 +5890,20 @@ function SecondaryPanel({
|
|
|
5633
5890
|
panelRoundedClass,
|
|
5634
5891
|
children
|
|
5635
5892
|
}) {
|
|
5636
|
-
return /* @__PURE__ */ (0,
|
|
5893
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
5637
5894
|
"div",
|
|
5638
5895
|
{
|
|
5639
5896
|
"data-slot": "composer-secondary-panel",
|
|
5640
5897
|
className: cn(
|
|
5641
|
-
"min-w-0 max-w-full
|
|
5898
|
+
"w-64 min-w-0 max-w-full overflow-hidden bg-popover text-popover-foreground shadow-lg ring-1 ring-foreground/10",
|
|
5642
5899
|
panelRoundedClass
|
|
5643
5900
|
),
|
|
5644
|
-
children: /* @__PURE__ */ (0,
|
|
5901
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
5645
5902
|
"div",
|
|
5646
5903
|
{
|
|
5647
5904
|
"data-slot": "composer-secondary-scroll",
|
|
5648
|
-
className: "w-full min-w-0 overflow-x-
|
|
5649
|
-
children: /* @__PURE__ */ (0,
|
|
5905
|
+
className: "w-full min-w-0 overflow-x-hidden",
|
|
5906
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "w-full min-w-0", children })
|
|
5650
5907
|
}
|
|
5651
5908
|
)
|
|
5652
5909
|
}
|
|
@@ -5657,9 +5914,9 @@ function PanelSearch({
|
|
|
5657
5914
|
onChange,
|
|
5658
5915
|
placeholder
|
|
5659
5916
|
}) {
|
|
5660
|
-
return /* @__PURE__ */ (0,
|
|
5661
|
-
/* @__PURE__ */ (0,
|
|
5662
|
-
/* @__PURE__ */ (0,
|
|
5917
|
+
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: [
|
|
5918
|
+
/* @__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" }),
|
|
5919
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
5663
5920
|
Input,
|
|
5664
5921
|
{
|
|
5665
5922
|
autoFocus: true,
|
|
@@ -5669,14 +5926,14 @@ function PanelSearch({
|
|
|
5669
5926
|
className: "h-8 border-0 bg-muted pl-10 text-base shadow-none focus-visible:ring-1"
|
|
5670
5927
|
}
|
|
5671
5928
|
)
|
|
5672
|
-
] });
|
|
5929
|
+
] }) });
|
|
5673
5930
|
}
|
|
5674
5931
|
function SkillGroup({
|
|
5675
5932
|
label,
|
|
5676
5933
|
children
|
|
5677
5934
|
}) {
|
|
5678
|
-
return /* @__PURE__ */ (0,
|
|
5679
|
-
/* @__PURE__ */ (0,
|
|
5935
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("section", { "data-slot": "composer-skill-group", className: "space-y-1", children: [
|
|
5936
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "px-1.5 pt-1 text-xs font-normal text-muted-foreground", children: label }),
|
|
5680
5937
|
children
|
|
5681
5938
|
] });
|
|
5682
5939
|
}
|
|
@@ -5688,7 +5945,7 @@ function ActiveIndicator({
|
|
|
5688
5945
|
disabled,
|
|
5689
5946
|
onClick
|
|
5690
5947
|
}) {
|
|
5691
|
-
return /* @__PURE__ */ (0,
|
|
5948
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
5692
5949
|
"button",
|
|
5693
5950
|
{
|
|
5694
5951
|
type: "button",
|
|
@@ -5700,28 +5957,28 @@ function ActiveIndicator({
|
|
|
5700
5957
|
roundedClass
|
|
5701
5958
|
),
|
|
5702
5959
|
children: [
|
|
5703
|
-
|
|
5704
|
-
/* @__PURE__ */ (0,
|
|
5705
|
-
/* @__PURE__ */ (0,
|
|
5960
|
+
React13.cloneElement(icon, { className: "mr-1.5 size-3.5" }),
|
|
5961
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { children: label }),
|
|
5962
|
+
/* @__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
5963
|
]
|
|
5707
5964
|
}
|
|
5708
5965
|
);
|
|
5709
5966
|
}
|
|
5710
5967
|
|
|
5711
5968
|
// src/components/composer/ModelPicker.tsx
|
|
5712
|
-
var
|
|
5969
|
+
var React14 = __toESM(require("react"), 1);
|
|
5713
5970
|
var import_lucide_react5 = require("lucide-react");
|
|
5714
|
-
var
|
|
5971
|
+
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
5715
5972
|
function ModelProviderAvatar({
|
|
5716
5973
|
avatar,
|
|
5717
5974
|
className,
|
|
5718
5975
|
imageClassName,
|
|
5719
5976
|
iconClassName
|
|
5720
5977
|
}) {
|
|
5721
|
-
const [failedUrl, setFailedUrl] =
|
|
5978
|
+
const [failedUrl, setFailedUrl] = React14.useState(null);
|
|
5722
5979
|
const avatarUrl = avatar?.url;
|
|
5723
5980
|
const showImage = Boolean(avatarUrl && failedUrl !== avatarUrl);
|
|
5724
|
-
return /* @__PURE__ */ (0,
|
|
5981
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
5725
5982
|
"span",
|
|
5726
5983
|
{
|
|
5727
5984
|
"aria-hidden": "true",
|
|
@@ -5731,7 +5988,7 @@ function ModelProviderAvatar({
|
|
|
5731
5988
|
className
|
|
5732
5989
|
),
|
|
5733
5990
|
style: avatar?.background ? { backgroundColor: avatar.background } : void 0,
|
|
5734
|
-
children: showImage ? /* @__PURE__ */ (0,
|
|
5991
|
+
children: showImage ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
5735
5992
|
"img",
|
|
5736
5993
|
{
|
|
5737
5994
|
"data-slot": "model-provider-avatar-image",
|
|
@@ -5740,7 +5997,7 @@ function ModelProviderAvatar({
|
|
|
5740
5997
|
className: cn("size-full object-contain p-1", imageClassName),
|
|
5741
5998
|
onError: () => setFailedUrl(avatarUrl ?? null)
|
|
5742
5999
|
}
|
|
5743
|
-
) : /* @__PURE__ */ (0,
|
|
6000
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_lucide_react5.Bot, { "aria-hidden": "true", className: cn("size-3.5", iconClassName) })
|
|
5744
6001
|
}
|
|
5745
6002
|
);
|
|
5746
6003
|
}
|
|
@@ -5756,8 +6013,8 @@ function ModelPicker({
|
|
|
5756
6013
|
const selectedModel = enabledModels.find(
|
|
5757
6014
|
(model) => model.id === selectedModelId
|
|
5758
6015
|
);
|
|
5759
|
-
return /* @__PURE__ */ (0,
|
|
5760
|
-
/* @__PURE__ */ (0,
|
|
6016
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(DropdownMenu, { children: [
|
|
6017
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
|
|
5761
6018
|
"button",
|
|
5762
6019
|
{
|
|
5763
6020
|
type: "button",
|
|
@@ -5771,7 +6028,7 @@ function ModelPicker({
|
|
|
5771
6028
|
"disabled:pointer-events-none disabled:opacity-50"
|
|
5772
6029
|
),
|
|
5773
6030
|
children: [
|
|
5774
|
-
/* @__PURE__ */ (0,
|
|
6031
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
5775
6032
|
ModelProviderAvatar,
|
|
5776
6033
|
{
|
|
5777
6034
|
avatar: selectedModel?.avatar,
|
|
@@ -5780,8 +6037,8 @@ function ModelPicker({
|
|
|
5780
6037
|
iconClassName: "size-3"
|
|
5781
6038
|
}
|
|
5782
6039
|
),
|
|
5783
|
-
/* @__PURE__ */ (0,
|
|
5784
|
-
/* @__PURE__ */ (0,
|
|
6040
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "truncate", children: selectedModel?.label ?? copy.label }),
|
|
6041
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
5785
6042
|
import_lucide_react5.ChevronDown,
|
|
5786
6043
|
{
|
|
5787
6044
|
"aria-hidden": "true",
|
|
@@ -5791,7 +6048,7 @@ function ModelPicker({
|
|
|
5791
6048
|
]
|
|
5792
6049
|
}
|
|
5793
6050
|
) }),
|
|
5794
|
-
/* @__PURE__ */ (0,
|
|
6051
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
|
|
5795
6052
|
DropdownMenuContent,
|
|
5796
6053
|
{
|
|
5797
6054
|
align: "end",
|
|
@@ -5800,8 +6057,8 @@ function ModelPicker({
|
|
|
5800
6057
|
collisionPadding: 12,
|
|
5801
6058
|
className: "w-80 max-w-[calc(100vw-1.5rem)] overflow-hidden rounded-xl p-0",
|
|
5802
6059
|
children: [
|
|
5803
|
-
/* @__PURE__ */ (0,
|
|
5804
|
-
/* @__PURE__ */ (0,
|
|
6060
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "flex items-start gap-3 px-3 py-3", children: [
|
|
6061
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
5805
6062
|
ModelProviderAvatar,
|
|
5806
6063
|
{
|
|
5807
6064
|
avatar: selectedModel?.avatar,
|
|
@@ -5809,34 +6066,34 @@ function ModelPicker({
|
|
|
5809
6066
|
iconClassName: "size-4"
|
|
5810
6067
|
}
|
|
5811
6068
|
),
|
|
5812
|
-
/* @__PURE__ */ (0,
|
|
5813
|
-
/* @__PURE__ */ (0,
|
|
5814
|
-
/* @__PURE__ */ (0,
|
|
6069
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("span", { className: "min-w-0 flex-1", children: [
|
|
6070
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "block text-sm font-semibold text-popover-foreground", children: copy.title }),
|
|
6071
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "mt-0.5 block text-xs leading-4 text-muted-foreground", children: copy.description })
|
|
5815
6072
|
] })
|
|
5816
6073
|
] }),
|
|
5817
|
-
/* @__PURE__ */ (0,
|
|
5818
|
-
/* @__PURE__ */ (0,
|
|
5819
|
-
/* @__PURE__ */ (0,
|
|
6074
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(DropdownMenuSeparator, { className: "mx-0 my-0" }),
|
|
6075
|
+
/* @__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 }),
|
|
6076
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
5820
6077
|
DropdownMenuRadioGroup,
|
|
5821
6078
|
{
|
|
5822
6079
|
value: selectedModel?.id ?? "",
|
|
5823
6080
|
onValueChange: onSelect,
|
|
5824
6081
|
className: "space-y-0.5 px-1.5 pb-1.5",
|
|
5825
|
-
children: models.map((model) => /* @__PURE__ */ (0,
|
|
6082
|
+
children: models.map((model) => /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
|
|
5826
6083
|
DropdownMenuRadioItem,
|
|
5827
6084
|
{
|
|
5828
6085
|
value: model.id,
|
|
5829
6086
|
disabled: model.disabled,
|
|
5830
6087
|
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
6088
|
children: [
|
|
5832
|
-
/* @__PURE__ */ (0,
|
|
5833
|
-
/* @__PURE__ */ (0,
|
|
5834
|
-
/* @__PURE__ */ (0,
|
|
5835
|
-
/* @__PURE__ */ (0,
|
|
5836
|
-
model.default ? /* @__PURE__ */ (0,
|
|
5837
|
-
model.disabled ? /* @__PURE__ */ (0,
|
|
6089
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(ModelProviderAvatar, { avatar: model.avatar, className: "size-7" }),
|
|
6090
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("span", { className: "min-w-0 flex-1", children: [
|
|
6091
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("span", { className: "flex min-w-0 items-center gap-1.5", children: [
|
|
6092
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "truncate font-medium text-popover-foreground", children: model.label }),
|
|
6093
|
+
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,
|
|
6094
|
+
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
6095
|
] }),
|
|
5839
|
-
model.description ? /* @__PURE__ */ (0,
|
|
6096
|
+
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
6097
|
] })
|
|
5841
6098
|
]
|
|
5842
6099
|
},
|
|
@@ -5844,26 +6101,26 @@ function ModelPicker({
|
|
|
5844
6101
|
))
|
|
5845
6102
|
}
|
|
5846
6103
|
),
|
|
5847
|
-
/* @__PURE__ */ (0,
|
|
5848
|
-
/* @__PURE__ */ (0,
|
|
6104
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(DropdownMenuSeparator, { className: "mx-0 my-0" }),
|
|
6105
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
|
|
5849
6106
|
"div",
|
|
5850
6107
|
{
|
|
5851
6108
|
"data-slot": "model-picker-future-controls",
|
|
5852
6109
|
className: "flex items-center gap-2.5 bg-muted/30 px-3 py-2.5",
|
|
5853
6110
|
"aria-disabled": "true",
|
|
5854
6111
|
children: [
|
|
5855
|
-
/* @__PURE__ */ (0,
|
|
6112
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
5856
6113
|
import_lucide_react5.SlidersHorizontal,
|
|
5857
6114
|
{
|
|
5858
6115
|
"aria-hidden": "true",
|
|
5859
6116
|
className: "size-4 shrink-0 text-muted-foreground"
|
|
5860
6117
|
}
|
|
5861
6118
|
),
|
|
5862
|
-
/* @__PURE__ */ (0,
|
|
5863
|
-
/* @__PURE__ */ (0,
|
|
5864
|
-
/* @__PURE__ */ (0,
|
|
6119
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("span", { className: "min-w-0 flex-1", children: [
|
|
6120
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "block text-xs font-medium text-popover-foreground", children: copy.futureTitle }),
|
|
6121
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "block truncate text-[11px] text-muted-foreground", children: copy.futureDescription })
|
|
5865
6122
|
] }),
|
|
5866
|
-
/* @__PURE__ */ (0,
|
|
6123
|
+
/* @__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
6124
|
]
|
|
5868
6125
|
}
|
|
5869
6126
|
)
|
|
@@ -5874,9 +6131,9 @@ function ModelPicker({
|
|
|
5874
6131
|
}
|
|
5875
6132
|
|
|
5876
6133
|
// src/components/composer/WorkspaceFileMentionPalette.tsx
|
|
5877
|
-
var
|
|
6134
|
+
var React15 = __toESM(require("react"), 1);
|
|
5878
6135
|
var import_lucide_react6 = require("lucide-react");
|
|
5879
|
-
var
|
|
6136
|
+
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
5880
6137
|
var WORKSPACE_FILE_LIST_DEPTH = 12;
|
|
5881
6138
|
function getWorkspaceFilePath(file) {
|
|
5882
6139
|
return file.fullPath?.trim() || file.filePath.trim();
|
|
@@ -5888,7 +6145,7 @@ function flattenWorkspaceFiles(files) {
|
|
|
5888
6145
|
return [...isDirectory ? [] : [file], ...flattenWorkspaceFiles(children)];
|
|
5889
6146
|
});
|
|
5890
6147
|
}
|
|
5891
|
-
var WorkspaceFileMentionPalette =
|
|
6148
|
+
var WorkspaceFileMentionPalette = React15.forwardRef(function WorkspaceFileMentionPalette2({
|
|
5892
6149
|
client,
|
|
5893
6150
|
assistantId,
|
|
5894
6151
|
projectId,
|
|
@@ -5898,14 +6155,14 @@ var WorkspaceFileMentionPalette = React14.forwardRef(function WorkspaceFileMenti
|
|
|
5898
6155
|
className
|
|
5899
6156
|
}, ref) {
|
|
5900
6157
|
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 =
|
|
6158
|
+
const [files, setFiles] = React15.useState([]);
|
|
6159
|
+
const [loading, setLoading] = React15.useState(false);
|
|
6160
|
+
const [error, setError] = React15.useState(null);
|
|
6161
|
+
const [activeIndex, setActiveIndex] = React15.useState(0);
|
|
6162
|
+
const activeIndexRef = React15.useRef(0);
|
|
6163
|
+
const optionRefs = React15.useRef([]);
|
|
5907
6164
|
const loadErrorMessage = t("composer.fileMentions.loadError");
|
|
5908
|
-
|
|
6165
|
+
React15.useEffect(() => {
|
|
5909
6166
|
if (!client || !projectId && !assistantId) {
|
|
5910
6167
|
setFiles([]);
|
|
5911
6168
|
setLoading(false);
|
|
@@ -5937,7 +6194,7 @@ var WorkspaceFileMentionPalette = React14.forwardRef(function WorkspaceFileMenti
|
|
|
5937
6194
|
return () => controller.abort();
|
|
5938
6195
|
}, [assistantId, client, loadErrorMessage, projectId]);
|
|
5939
6196
|
const normalizedQuery = query.trim().toLocaleLowerCase();
|
|
5940
|
-
const visibleFiles =
|
|
6197
|
+
const visibleFiles = React15.useMemo(
|
|
5941
6198
|
() => files.filter((file) => {
|
|
5942
6199
|
const filePath = getWorkspaceFilePath(file);
|
|
5943
6200
|
if (selectedFilePaths.has(filePath)) return false;
|
|
@@ -5946,17 +6203,17 @@ var WorkspaceFileMentionPalette = React14.forwardRef(function WorkspaceFileMenti
|
|
|
5946
6203
|
}),
|
|
5947
6204
|
[files, normalizedQuery, selectedFilePaths]
|
|
5948
6205
|
);
|
|
5949
|
-
|
|
6206
|
+
React15.useLayoutEffect(() => {
|
|
5950
6207
|
setActiveIndex((current) => {
|
|
5951
6208
|
const nextIndex = visibleFiles.length === 0 ? 0 : Math.min(current, visibleFiles.length - 1);
|
|
5952
6209
|
activeIndexRef.current = nextIndex;
|
|
5953
6210
|
return nextIndex;
|
|
5954
6211
|
});
|
|
5955
6212
|
}, [visibleFiles.length]);
|
|
5956
|
-
|
|
6213
|
+
React15.useEffect(() => {
|
|
5957
6214
|
optionRefs.current[activeIndex]?.scrollIntoView?.({ block: "nearest" });
|
|
5958
6215
|
}, [activeIndex]);
|
|
5959
|
-
|
|
6216
|
+
React15.useImperativeHandle(
|
|
5960
6217
|
ref,
|
|
5961
6218
|
() => ({
|
|
5962
6219
|
moveActive: (direction) => {
|
|
@@ -5975,7 +6232,7 @@ var WorkspaceFileMentionPalette = React14.forwardRef(function WorkspaceFileMenti
|
|
|
5975
6232
|
[onSelect, visibleFiles]
|
|
5976
6233
|
);
|
|
5977
6234
|
const unavailable = !client || !projectId && !assistantId;
|
|
5978
|
-
return /* @__PURE__ */ (0,
|
|
6235
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
5979
6236
|
"div",
|
|
5980
6237
|
{
|
|
5981
6238
|
"data-slot": "workspace-file-mention-palette",
|
|
@@ -5984,20 +6241,20 @@ var WorkspaceFileMentionPalette = React14.forwardRef(function WorkspaceFileMenti
|
|
|
5984
6241
|
className
|
|
5985
6242
|
),
|
|
5986
6243
|
children: [
|
|
5987
|
-
/* @__PURE__ */ (0,
|
|
6244
|
+
/* @__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
6245
|
t("composer.fileMentions.title"),
|
|
5989
|
-
query ? /* @__PURE__ */ (0,
|
|
6246
|
+
query ? /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("span", { className: "ml-1 text-foreground", children: [
|
|
5990
6247
|
"@",
|
|
5991
6248
|
query
|
|
5992
6249
|
] }) : null
|
|
5993
6250
|
] }),
|
|
5994
|
-
/* @__PURE__ */ (0,
|
|
5995
|
-
/* @__PURE__ */ (0,
|
|
6251
|
+
/* @__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: [
|
|
6252
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_lucide_react6.Loader2, { className: "size-4 animate-spin" }),
|
|
5996
6253
|
t("composer.fileMentions.loading")
|
|
5997
|
-
] }) : error ? /* @__PURE__ */ (0,
|
|
6254
|
+
] }) : 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
6255
|
const filePath = getWorkspaceFilePath(file);
|
|
5999
6256
|
const label = file.filePath || filePath;
|
|
6000
|
-
return /* @__PURE__ */ (0,
|
|
6257
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
6001
6258
|
"button",
|
|
6002
6259
|
{
|
|
6003
6260
|
ref: (node) => {
|
|
@@ -6018,10 +6275,10 @@ var WorkspaceFileMentionPalette = React14.forwardRef(function WorkspaceFileMenti
|
|
|
6018
6275
|
index === activeIndex && "bg-muted"
|
|
6019
6276
|
),
|
|
6020
6277
|
children: [
|
|
6021
|
-
/* @__PURE__ */ (0,
|
|
6022
|
-
/* @__PURE__ */ (0,
|
|
6023
|
-
/* @__PURE__ */ (0,
|
|
6024
|
-
filePath || file.mimeType ? /* @__PURE__ */ (0,
|
|
6278
|
+
/* @__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" }) }),
|
|
6279
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("span", { className: "min-w-0 flex-1", children: [
|
|
6280
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "block truncate font-medium", children: label }),
|
|
6281
|
+
filePath || file.mimeType ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "block truncate text-xs text-muted-foreground", children: filePath || file.mimeType }) : null
|
|
6025
6282
|
] })
|
|
6026
6283
|
]
|
|
6027
6284
|
},
|
|
@@ -6036,7 +6293,7 @@ function PaletteMessage({
|
|
|
6036
6293
|
children,
|
|
6037
6294
|
role
|
|
6038
6295
|
}) {
|
|
6039
|
-
return /* @__PURE__ */ (0,
|
|
6296
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
6040
6297
|
"div",
|
|
6041
6298
|
{
|
|
6042
6299
|
role,
|
|
@@ -6047,22 +6304,22 @@ function PaletteMessage({
|
|
|
6047
6304
|
}
|
|
6048
6305
|
|
|
6049
6306
|
// src/components/composer/ProjectSelector.tsx
|
|
6050
|
-
var
|
|
6307
|
+
var React17 = __toESM(require("react"), 1);
|
|
6051
6308
|
var import_lucide_react7 = require("lucide-react");
|
|
6052
6309
|
|
|
6053
6310
|
// src/components/ui/popover.tsx
|
|
6054
|
-
var
|
|
6311
|
+
var React16 = require("react");
|
|
6055
6312
|
var PopoverPrimitive = __toESM(require("@radix-ui/react-popover"), 1);
|
|
6056
|
-
var
|
|
6313
|
+
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
6057
6314
|
function Popover({
|
|
6058
6315
|
...props
|
|
6059
6316
|
}) {
|
|
6060
|
-
return /* @__PURE__ */ (0,
|
|
6317
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(PopoverPrimitive.Root, { "data-slot": "popover", ...props });
|
|
6061
6318
|
}
|
|
6062
6319
|
function PopoverTrigger({
|
|
6063
6320
|
...props
|
|
6064
6321
|
}) {
|
|
6065
|
-
return /* @__PURE__ */ (0,
|
|
6322
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(PopoverPrimitive.Trigger, { "data-slot": "popover-trigger", ...props });
|
|
6066
6323
|
}
|
|
6067
6324
|
function PopoverContent({
|
|
6068
6325
|
className,
|
|
@@ -6070,7 +6327,7 @@ function PopoverContent({
|
|
|
6070
6327
|
sideOffset = 4,
|
|
6071
6328
|
...props
|
|
6072
6329
|
}) {
|
|
6073
|
-
return /* @__PURE__ */ (0,
|
|
6330
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(PopoverPrimitive.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
6074
6331
|
PopoverPrimitive.Content,
|
|
6075
6332
|
{
|
|
6076
6333
|
"data-slot": "popover-content",
|
|
@@ -6086,7 +6343,7 @@ function PopoverContent({
|
|
|
6086
6343
|
}
|
|
6087
6344
|
|
|
6088
6345
|
// src/components/composer/ProjectSelector.tsx
|
|
6089
|
-
var
|
|
6346
|
+
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
6090
6347
|
var PROJECT_PAGE_SIZE = 100;
|
|
6091
6348
|
async function listAllAvailableProjects(projectsClient, xpertId, signal) {
|
|
6092
6349
|
const projects = [];
|
|
@@ -6120,20 +6377,20 @@ function ProjectSelector({
|
|
|
6120
6377
|
}) {
|
|
6121
6378
|
const { t } = useChatkitTranslation();
|
|
6122
6379
|
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] =
|
|
6380
|
+
const [open, setOpen] = React17.useState(false);
|
|
6381
|
+
const [query, setQuery] = React17.useState("");
|
|
6382
|
+
const [createMode, setCreateMode] = React17.useState(false);
|
|
6383
|
+
const [newProjectName, setNewProjectName] = React17.useState("");
|
|
6384
|
+
const [projects, setProjects] = React17.useState([]);
|
|
6385
|
+
const [loadFailed, setLoadFailed] = React17.useState(false);
|
|
6386
|
+
const [loadedFor, setLoadedFor] = React17.useState(null);
|
|
6130
6387
|
const panelRoundedClass = getPanelRoundedClass(theme.radius);
|
|
6131
6388
|
const menuItemRoundedClass = getMenuItemRoundedClass(theme.radius);
|
|
6132
6389
|
const lockedProjectLabel = label?.trim();
|
|
6133
|
-
|
|
6390
|
+
React17.useEffect(() => {
|
|
6134
6391
|
if (disabled) setOpen(false);
|
|
6135
6392
|
}, [disabled]);
|
|
6136
|
-
|
|
6393
|
+
React17.useEffect(() => {
|
|
6137
6394
|
if (locked) {
|
|
6138
6395
|
setProjects([]);
|
|
6139
6396
|
setLoadFailed(false);
|
|
@@ -6173,12 +6430,12 @@ function ProjectSelector({
|
|
|
6173
6430
|
});
|
|
6174
6431
|
return () => controller.abort();
|
|
6175
6432
|
}, [client, locked, xpertId]);
|
|
6176
|
-
const activeProject =
|
|
6433
|
+
const activeProject = React17.useMemo(
|
|
6177
6434
|
() => projects.find((project) => project.id === activeProjectId) ?? null,
|
|
6178
6435
|
[activeProjectId, projects]
|
|
6179
6436
|
);
|
|
6180
6437
|
const normalizedQuery = query.trim().toLocaleLowerCase();
|
|
6181
|
-
const filteredProjects =
|
|
6438
|
+
const filteredProjects = React17.useMemo(
|
|
6182
6439
|
() => projects.filter((project) => {
|
|
6183
6440
|
if (!normalizedQuery) return true;
|
|
6184
6441
|
return project.name.toLocaleLowerCase().includes(normalizedQuery);
|
|
@@ -6188,24 +6445,24 @@ function ProjectSelector({
|
|
|
6188
6445
|
const hasAvailableProjects = locked ? Boolean(activeProjectId) : loadedFor?.client === client && loadedFor.xpertId === xpertId && !loadFailed && projects.length > 0;
|
|
6189
6446
|
const projectRailAvailable = hasAvailableProjects || Boolean(onProjectCreate);
|
|
6190
6447
|
const isLoadingProjects = !locked && Boolean(client && xpertId) && loadedFor === null && !loadFailed;
|
|
6191
|
-
|
|
6448
|
+
React17.useEffect(() => {
|
|
6192
6449
|
onAvailabilityChange?.(projectRailAvailable);
|
|
6193
6450
|
}, [onAvailabilityChange, projectRailAvailable]);
|
|
6194
6451
|
if (locked && activeProjectId) {
|
|
6195
|
-
return /* @__PURE__ */ (0,
|
|
6452
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
6196
6453
|
"div",
|
|
6197
6454
|
{
|
|
6198
6455
|
"data-slot": "composer-project-rail",
|
|
6199
6456
|
className: "flex h-10 min-w-0 items-center px-1",
|
|
6200
|
-
children: /* @__PURE__ */ (0,
|
|
6457
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
6201
6458
|
"div",
|
|
6202
6459
|
{
|
|
6203
6460
|
"data-slot": "composer-project-locked",
|
|
6204
6461
|
className: "inline-flex h-5 max-w-full items-center gap-1.5 rounded-sm px-2 text-sm text-muted-foreground",
|
|
6205
6462
|
title: lockedProjectLabel || activeProjectId,
|
|
6206
6463
|
children: [
|
|
6207
|
-
/* @__PURE__ */ (0,
|
|
6208
|
-
/* @__PURE__ */ (0,
|
|
6464
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lucide_react7.FolderLock, { className: "size-3.5 shrink-0" }),
|
|
6465
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "truncate", children: lockedProjectLabel || activeProjectId })
|
|
6209
6466
|
]
|
|
6210
6467
|
}
|
|
6211
6468
|
)
|
|
@@ -6213,12 +6470,12 @@ function ProjectSelector({
|
|
|
6213
6470
|
);
|
|
6214
6471
|
}
|
|
6215
6472
|
if (!projectRailAvailable) return null;
|
|
6216
|
-
return /* @__PURE__ */ (0,
|
|
6473
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
6217
6474
|
"div",
|
|
6218
6475
|
{
|
|
6219
6476
|
"data-slot": "composer-project-rail",
|
|
6220
6477
|
className: "flex h-10 min-w-0 items-center px-1",
|
|
6221
|
-
children: /* @__PURE__ */ (0,
|
|
6478
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
6222
6479
|
Popover,
|
|
6223
6480
|
{
|
|
6224
6481
|
open,
|
|
@@ -6231,7 +6488,7 @@ function ProjectSelector({
|
|
|
6231
6488
|
}
|
|
6232
6489
|
},
|
|
6233
6490
|
children: [
|
|
6234
|
-
/* @__PURE__ */ (0,
|
|
6491
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
6235
6492
|
"button",
|
|
6236
6493
|
{
|
|
6237
6494
|
type: "button",
|
|
@@ -6239,13 +6496,13 @@ function ProjectSelector({
|
|
|
6239
6496
|
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
6497
|
"aria-label": t("composer.projects.select"),
|
|
6241
6498
|
children: [
|
|
6242
|
-
/* @__PURE__ */ (0,
|
|
6243
|
-
/* @__PURE__ */ (0,
|
|
6244
|
-
/* @__PURE__ */ (0,
|
|
6499
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lucide_react7.Folder, { className: "size-3.5 shrink-0" }),
|
|
6500
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "truncate", children: activeProject?.name ?? t("composer.projects.select") }),
|
|
6501
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lucide_react7.ChevronDown, { className: "size-3.5 shrink-0" })
|
|
6245
6502
|
]
|
|
6246
6503
|
}
|
|
6247
6504
|
) }),
|
|
6248
|
-
/* @__PURE__ */ (0,
|
|
6505
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
6249
6506
|
PopoverContent,
|
|
6250
6507
|
{
|
|
6251
6508
|
side: "top",
|
|
@@ -6253,15 +6510,15 @@ function ProjectSelector({
|
|
|
6253
6510
|
sideOffset: 8,
|
|
6254
6511
|
collisionPadding: 8,
|
|
6255
6512
|
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",
|
|
6513
|
+
"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
6514
|
panelRoundedClass
|
|
6258
6515
|
),
|
|
6259
|
-
children: /* @__PURE__ */ (0,
|
|
6516
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
6260
6517
|
"div",
|
|
6261
6518
|
{
|
|
6262
6519
|
"data-slot": "composer-project-command",
|
|
6263
|
-
className: "flex
|
|
6264
|
-
children: createMode ? /* @__PURE__ */ (0,
|
|
6520
|
+
className: "flex min-h-0 w-full flex-col overflow-hidden",
|
|
6521
|
+
children: createMode ? /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
6265
6522
|
"form",
|
|
6266
6523
|
{
|
|
6267
6524
|
"data-slot": "composer-project-create-form",
|
|
@@ -6274,7 +6531,7 @@ function ProjectSelector({
|
|
|
6274
6531
|
setOpen(false);
|
|
6275
6532
|
},
|
|
6276
6533
|
children: [
|
|
6277
|
-
/* @__PURE__ */ (0,
|
|
6534
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
6278
6535
|
Input,
|
|
6279
6536
|
{
|
|
6280
6537
|
autoFocus: true,
|
|
@@ -6289,8 +6546,8 @@ function ProjectSelector({
|
|
|
6289
6546
|
)
|
|
6290
6547
|
}
|
|
6291
6548
|
),
|
|
6292
|
-
/* @__PURE__ */ (0,
|
|
6293
|
-
/* @__PURE__ */ (0,
|
|
6549
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "flex justify-end gap-2", children: [
|
|
6550
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
6294
6551
|
"button",
|
|
6295
6552
|
{
|
|
6296
6553
|
type: "button",
|
|
@@ -6302,7 +6559,7 @@ function ProjectSelector({
|
|
|
6302
6559
|
children: t("composer.projects.cancel")
|
|
6303
6560
|
}
|
|
6304
6561
|
),
|
|
6305
|
-
/* @__PURE__ */ (0,
|
|
6562
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
6306
6563
|
"button",
|
|
6307
6564
|
{
|
|
6308
6565
|
type: "submit",
|
|
@@ -6314,15 +6571,15 @@ function ProjectSelector({
|
|
|
6314
6571
|
] })
|
|
6315
6572
|
]
|
|
6316
6573
|
}
|
|
6317
|
-
) : /* @__PURE__ */ (0,
|
|
6318
|
-
/* @__PURE__ */ (0,
|
|
6574
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_jsx_runtime19.Fragment, { children: [
|
|
6575
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
6319
6576
|
"div",
|
|
6320
6577
|
{
|
|
6321
6578
|
"data-slot": "composer-project-search",
|
|
6322
|
-
className: "relative mb-2",
|
|
6579
|
+
className: "relative mb-2 shrink-0",
|
|
6323
6580
|
children: [
|
|
6324
|
-
/* @__PURE__ */ (0,
|
|
6325
|
-
/* @__PURE__ */ (0,
|
|
6581
|
+
/* @__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" }),
|
|
6582
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
6326
6583
|
Input,
|
|
6327
6584
|
{
|
|
6328
6585
|
autoFocus: true,
|
|
@@ -6338,70 +6595,77 @@ function ProjectSelector({
|
|
|
6338
6595
|
]
|
|
6339
6596
|
}
|
|
6340
6597
|
),
|
|
6341
|
-
/* @__PURE__ */ (0,
|
|
6598
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
6342
6599
|
"div",
|
|
6343
6600
|
{
|
|
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);
|
|
6601
|
+
"data-slot": "composer-project-scroll-region",
|
|
6602
|
+
className: "min-h-0 flex-1 max-h-75 overflow-y-auto overscroll-contain",
|
|
6603
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
6604
|
+
"div",
|
|
6605
|
+
{
|
|
6606
|
+
"data-slot": "composer-project-list",
|
|
6607
|
+
className: "flex flex-col",
|
|
6608
|
+
children: [
|
|
6609
|
+
activeProjectId && !normalizedQuery ? /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
6610
|
+
"button",
|
|
6611
|
+
{
|
|
6612
|
+
type: "button",
|
|
6613
|
+
"data-slot": "composer-project-clear",
|
|
6614
|
+
className: cn(
|
|
6615
|
+
"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",
|
|
6616
|
+
menuItemRoundedClass
|
|
6617
|
+
),
|
|
6618
|
+
onClick: () => {
|
|
6619
|
+
if (disabled) return;
|
|
6620
|
+
onProjectChange?.(null);
|
|
6621
|
+
setOpen(false);
|
|
6622
|
+
},
|
|
6623
|
+
children: [
|
|
6624
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lucide_react7.FolderX, { className: "size-5 shrink-0 text-muted-foreground" }),
|
|
6625
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "min-w-0 flex-1 truncate font-normal", children: t("composer.projects.none") })
|
|
6626
|
+
]
|
|
6381
6627
|
}
|
|
6382
|
-
|
|
6383
|
-
},
|
|
6384
|
-
|
|
6385
|
-
|
|
6386
|
-
|
|
6387
|
-
|
|
6388
|
-
|
|
6389
|
-
|
|
6390
|
-
|
|
6391
|
-
|
|
6392
|
-
|
|
6628
|
+
) : null,
|
|
6629
|
+
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)(
|
|
6630
|
+
"button",
|
|
6631
|
+
{
|
|
6632
|
+
type: "button",
|
|
6633
|
+
"data-slot": "composer-project-item",
|
|
6634
|
+
className: cn(
|
|
6635
|
+
"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",
|
|
6636
|
+
menuItemRoundedClass,
|
|
6637
|
+
project.id === activeProjectId && "bg-accent text-accent-foreground"
|
|
6638
|
+
),
|
|
6639
|
+
onClick: () => {
|
|
6640
|
+
if (disabled) return;
|
|
6641
|
+
if (project.id !== activeProjectId) {
|
|
6642
|
+
onProjectChange?.(project.id);
|
|
6643
|
+
}
|
|
6644
|
+
setOpen(false);
|
|
6645
|
+
},
|
|
6646
|
+
children: [
|
|
6647
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lucide_react7.Folder, { className: "size-5 shrink-0 text-muted-foreground" }),
|
|
6648
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "min-w-0 flex-1 truncate font-normal", children: project.name }),
|
|
6649
|
+
project.id === activeProjectId ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lucide_react7.Check, { className: "size-4 shrink-0" }) : null
|
|
6650
|
+
]
|
|
6651
|
+
},
|
|
6652
|
+
project.id
|
|
6653
|
+
))
|
|
6654
|
+
]
|
|
6655
|
+
}
|
|
6656
|
+
)
|
|
6393
6657
|
}
|
|
6394
|
-
)
|
|
6395
|
-
onProjectCreate ? /* @__PURE__ */ (0,
|
|
6658
|
+
),
|
|
6659
|
+
onProjectCreate ? /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
6396
6660
|
"button",
|
|
6397
6661
|
{
|
|
6398
6662
|
type: "button",
|
|
6399
6663
|
"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",
|
|
6664
|
+
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
6665
|
onClick: () => setCreateMode(true),
|
|
6402
6666
|
children: [
|
|
6403
|
-
/* @__PURE__ */ (0,
|
|
6404
|
-
/* @__PURE__ */ (0,
|
|
6667
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lucide_react7.Plus, { className: "size-4 shrink-0" }),
|
|
6668
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { children: t("composer.projects.new") })
|
|
6405
6669
|
]
|
|
6406
6670
|
}
|
|
6407
6671
|
) : null
|
|
@@ -6417,77 +6681,11 @@ function ProjectSelector({
|
|
|
6417
6681
|
);
|
|
6418
6682
|
}
|
|
6419
6683
|
function ProjectMessage({ children }) {
|
|
6420
|
-
return /* @__PURE__ */ (0,
|
|
6684
|
+
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
6685
|
}
|
|
6422
6686
|
|
|
6423
6687
|
// src/components/composer/SendButton.tsx
|
|
6424
6688
|
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
6689
|
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
6492
6690
|
function SendButton({
|
|
6493
6691
|
disabled = false,
|
|
@@ -23802,22 +24000,6 @@ function Chat({
|
|
|
23802
24000
|
]
|
|
23803
24001
|
}
|
|
23804
24002
|
),
|
|
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
24003
|
quoteSelection && /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(
|
|
23822
24004
|
"div",
|
|
23823
24005
|
{
|
|
@@ -23880,6 +24062,29 @@ function Chat({
|
|
|
23880
24062
|
),
|
|
23881
24063
|
style: chatColumnStyle,
|
|
23882
24064
|
children: [
|
|
24065
|
+
!isAtBottom && messages.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
|
24066
|
+
"div",
|
|
24067
|
+
{
|
|
24068
|
+
"data-slot": "scroll-to-bottom",
|
|
24069
|
+
className: "pointer-events-none absolute left-1/2 top-0 z-20 flex -translate-x-1/2 -translate-y-full justify-center",
|
|
24070
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
|
24071
|
+
Button,
|
|
24072
|
+
{
|
|
24073
|
+
type: "button",
|
|
24074
|
+
size: "icon-sm",
|
|
24075
|
+
variant: hasUpdatesBelow ? "default" : "outline",
|
|
24076
|
+
className: cn(
|
|
24077
|
+
"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)]",
|
|
24078
|
+
hasUpdatesBelow && "animate-bounce"
|
|
24079
|
+
),
|
|
24080
|
+
onClick: () => scrollToBottom(true, true),
|
|
24081
|
+
"aria-label": t("chat.scrollToBottom"),
|
|
24082
|
+
title: t("chat.scrollToBottom"),
|
|
24083
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(import_lucide_react37.ArrowDown, { size: 16 })
|
|
24084
|
+
}
|
|
24085
|
+
)
|
|
24086
|
+
}
|
|
24087
|
+
),
|
|
23883
24088
|
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
24089
|
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
|
23885
24090
|
ChatAttachments,
|