@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.js
CHANGED
|
@@ -1725,7 +1725,7 @@ function isCompletedOutputStatus(value) {
|
|
|
1725
1725
|
function sourceFromReference(reference, message) {
|
|
1726
1726
|
const updatedAt = message.updatedAt ?? message.createdAt;
|
|
1727
1727
|
const common = {
|
|
1728
|
-
id: reference.id ?? `${reference.type}:${reference.text}
|
|
1728
|
+
id: stringValue(reference.id) ?? `${reference.type}:${reference.text}`.trim(),
|
|
1729
1729
|
title: reference.label?.trim() || reference.text.trim().slice(0, 80),
|
|
1730
1730
|
messageId: message.id,
|
|
1731
1731
|
updatedAt
|
|
@@ -1884,7 +1884,7 @@ function collectLiveTaskSummary({
|
|
|
1884
1884
|
)
|
|
1885
1885
|
)
|
|
1886
1886
|
]).filter(isCompletedOpenableOutput),
|
|
1887
|
-
sources:
|
|
1887
|
+
sources: mergeSources([
|
|
1888
1888
|
...contributions.flatMap((item) => item.sources ?? []).filter((source) => source.kind !== "sub_agent"),
|
|
1889
1889
|
...messages.flatMap((message) => [
|
|
1890
1890
|
...(message.references ?? []).map(
|
|
@@ -1907,10 +1907,10 @@ function mergeTaskSummary(history, live, historySections) {
|
|
|
1907
1907
|
...historySections?.outputs ?? history?.outputs.items ?? [],
|
|
1908
1908
|
...live.outputs
|
|
1909
1909
|
]).filter(isCompletedOpenableOutput);
|
|
1910
|
-
const
|
|
1911
|
-
|
|
1912
|
-
|
|
1913
|
-
|
|
1910
|
+
const historySources = historySections?.sources ?? history?.sources.items ?? [];
|
|
1911
|
+
const sources = mergeSources([...historySources, ...live.sources]);
|
|
1912
|
+
const historySourceTotal = history?.sources.total ?? 0;
|
|
1913
|
+
const sourceTotal = historySources.length >= historySourceTotal ? sources.length : Math.max(historySourceTotal, sources.length);
|
|
1914
1914
|
const historyAgents = historySections?.agents ?? history?.agents.items ?? [];
|
|
1915
1915
|
const eligibleHistoryAgents = historyAgents.filter(
|
|
1916
1916
|
(agent) => Boolean(agent.parentId)
|
|
@@ -1944,12 +1944,15 @@ function mergeTaskSummary(history, live, historySections) {
|
|
|
1944
1944
|
running: live.running,
|
|
1945
1945
|
totals: {
|
|
1946
1946
|
outputs: Math.max(history?.outputs.total ?? 0, outputs.length),
|
|
1947
|
-
sources:
|
|
1947
|
+
sources: sourceTotal,
|
|
1948
1948
|
agents: Math.max(historyAgentTotal, agents.length),
|
|
1949
1949
|
pending: Math.max(history?.pending.total ?? 0, pending.length)
|
|
1950
1950
|
}
|
|
1951
1951
|
};
|
|
1952
1952
|
}
|
|
1953
|
+
function mergeSources(items) {
|
|
1954
|
+
return mergeLatest(items.map((item) => ({ ...item, id: item.id.trim() })));
|
|
1955
|
+
}
|
|
1953
1956
|
function mergeLatest(items) {
|
|
1954
1957
|
const byId = /* @__PURE__ */ new Map();
|
|
1955
1958
|
items.forEach((item) => {
|
|
@@ -2555,13 +2558,15 @@ var useStreamContext = () => {
|
|
|
2555
2558
|
};
|
|
2556
2559
|
|
|
2557
2560
|
// src/components/composer/ComposerMenu.tsx
|
|
2558
|
-
import * as
|
|
2561
|
+
import * as React13 from "react";
|
|
2559
2562
|
import {
|
|
2563
|
+
ArrowLeft,
|
|
2560
2564
|
Bot,
|
|
2561
2565
|
ChevronRight,
|
|
2562
2566
|
FileText,
|
|
2563
2567
|
Globe,
|
|
2564
2568
|
Images,
|
|
2569
|
+
Info,
|
|
2565
2570
|
Lightbulb,
|
|
2566
2571
|
ListChecks,
|
|
2567
2572
|
Paperclip,
|
|
@@ -4708,25 +4713,100 @@ var Input = React8.forwardRef(
|
|
|
4708
4713
|
);
|
|
4709
4714
|
Input.displayName = "Input";
|
|
4710
4715
|
|
|
4716
|
+
// src/components/ui/tooltip.tsx
|
|
4717
|
+
import "react";
|
|
4718
|
+
import * as TooltipPrimitive from "@radix-ui/react-tooltip";
|
|
4719
|
+
import { jsx as jsx11, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
4720
|
+
function TooltipProvider({
|
|
4721
|
+
delayDuration = 0,
|
|
4722
|
+
...props
|
|
4723
|
+
}) {
|
|
4724
|
+
return /* @__PURE__ */ jsx11(
|
|
4725
|
+
TooltipPrimitive.Provider,
|
|
4726
|
+
{
|
|
4727
|
+
"data-slot": "tooltip-provider",
|
|
4728
|
+
delayDuration,
|
|
4729
|
+
...props
|
|
4730
|
+
}
|
|
4731
|
+
);
|
|
4732
|
+
}
|
|
4733
|
+
function Tooltip({
|
|
4734
|
+
...props
|
|
4735
|
+
}) {
|
|
4736
|
+
return /* @__PURE__ */ jsx11(TooltipProvider, { children: /* @__PURE__ */ jsx11(
|
|
4737
|
+
TooltipPrimitive.Root,
|
|
4738
|
+
{
|
|
4739
|
+
"data-slot": "tooltip",
|
|
4740
|
+
...props
|
|
4741
|
+
}
|
|
4742
|
+
) });
|
|
4743
|
+
}
|
|
4744
|
+
function TooltipTrigger({
|
|
4745
|
+
...props
|
|
4746
|
+
}) {
|
|
4747
|
+
return /* @__PURE__ */ jsx11(
|
|
4748
|
+
TooltipPrimitive.Trigger,
|
|
4749
|
+
{
|
|
4750
|
+
"data-slot": "tooltip-trigger",
|
|
4751
|
+
...props
|
|
4752
|
+
}
|
|
4753
|
+
);
|
|
4754
|
+
}
|
|
4755
|
+
function TooltipContent({
|
|
4756
|
+
className,
|
|
4757
|
+
sideOffset = 0,
|
|
4758
|
+
hideArrow = false,
|
|
4759
|
+
children,
|
|
4760
|
+
...props
|
|
4761
|
+
}) {
|
|
4762
|
+
return /* @__PURE__ */ jsx11(TooltipPrimitive.Portal, { children: /* @__PURE__ */ jsxs3(
|
|
4763
|
+
TooltipPrimitive.Content,
|
|
4764
|
+
{
|
|
4765
|
+
"data-slot": "tooltip-content",
|
|
4766
|
+
sideOffset,
|
|
4767
|
+
className: cn(
|
|
4768
|
+
"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",
|
|
4769
|
+
className
|
|
4770
|
+
),
|
|
4771
|
+
...props,
|
|
4772
|
+
children: [
|
|
4773
|
+
children,
|
|
4774
|
+
!hideArrow ? /* @__PURE__ */ jsx11(TooltipPrimitive.Arrow, { className: "bg-primary fill-primary z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]" }) : null
|
|
4775
|
+
]
|
|
4776
|
+
}
|
|
4777
|
+
) });
|
|
4778
|
+
}
|
|
4779
|
+
|
|
4780
|
+
// src/components/composer/ConnectorMenuPanel.tsx
|
|
4781
|
+
import * as React12 from "react";
|
|
4782
|
+
import {
|
|
4783
|
+
ArrowUpRight,
|
|
4784
|
+
Cable,
|
|
4785
|
+
Check,
|
|
4786
|
+
Link2,
|
|
4787
|
+
Loader2,
|
|
4788
|
+
Search
|
|
4789
|
+
} from "lucide-react";
|
|
4790
|
+
|
|
4711
4791
|
// src/components/ui/scroll-area.tsx
|
|
4712
|
-
import * as
|
|
4792
|
+
import * as React10 from "react";
|
|
4713
4793
|
import * as ScrollAreaPrimitive from "@radix-ui/react-scroll-area";
|
|
4714
|
-
import { jsx as
|
|
4715
|
-
var ScrollArea =
|
|
4794
|
+
import { jsx as jsx12, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
4795
|
+
var ScrollArea = React10.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs4(
|
|
4716
4796
|
ScrollAreaPrimitive.Root,
|
|
4717
4797
|
{
|
|
4718
4798
|
ref,
|
|
4719
4799
|
className: cn("relative min-w-0 overflow-hidden", className),
|
|
4720
4800
|
...props,
|
|
4721
4801
|
children: [
|
|
4722
|
-
/* @__PURE__ */
|
|
4723
|
-
/* @__PURE__ */
|
|
4724
|
-
/* @__PURE__ */
|
|
4802
|
+
/* @__PURE__ */ jsx12(ScrollAreaPrimitive.Viewport, { className: "h-full w-full min-w-0 max-w-full rounded-[inherit] [&>div]:!block [&>div]:!w-full", children }),
|
|
4803
|
+
/* @__PURE__ */ jsx12(ScrollBar, {}),
|
|
4804
|
+
/* @__PURE__ */ jsx12(ScrollAreaPrimitive.Corner, {})
|
|
4725
4805
|
]
|
|
4726
4806
|
}
|
|
4727
4807
|
));
|
|
4728
4808
|
ScrollArea.displayName = ScrollAreaPrimitive.Root.displayName;
|
|
4729
|
-
var ScrollBar =
|
|
4809
|
+
var ScrollBar = React10.forwardRef(({ className, orientation = "vertical", ...props }, ref) => /* @__PURE__ */ jsx12(
|
|
4730
4810
|
ScrollAreaPrimitive.ScrollAreaScrollbar,
|
|
4731
4811
|
{
|
|
4732
4812
|
ref,
|
|
@@ -4738,27 +4818,16 @@ var ScrollBar = React9.forwardRef(({ className, orientation = "vertical", ...pro
|
|
|
4738
4818
|
className
|
|
4739
4819
|
),
|
|
4740
4820
|
...props,
|
|
4741
|
-
children: /* @__PURE__ */
|
|
4821
|
+
children: /* @__PURE__ */ jsx12(ScrollAreaPrimitive.ScrollAreaThumb, { className: "relative flex-1 rounded-full bg-border" })
|
|
4742
4822
|
}
|
|
4743
4823
|
));
|
|
4744
4824
|
ScrollBar.displayName = ScrollAreaPrimitive.ScrollAreaScrollbar.displayName;
|
|
4745
4825
|
|
|
4746
|
-
// src/components/composer/ConnectorMenuPanel.tsx
|
|
4747
|
-
import * as React11 from "react";
|
|
4748
|
-
import {
|
|
4749
|
-
ArrowUpRight,
|
|
4750
|
-
Cable,
|
|
4751
|
-
Check,
|
|
4752
|
-
Link2,
|
|
4753
|
-
Loader2,
|
|
4754
|
-
Search
|
|
4755
|
-
} from "lucide-react";
|
|
4756
|
-
|
|
4757
4826
|
// src/components/ui/separator.tsx
|
|
4758
|
-
import * as
|
|
4759
|
-
import { jsx as
|
|
4760
|
-
var Separator =
|
|
4761
|
-
({ className, orientation = "horizontal", ...props }, ref) => /* @__PURE__ */
|
|
4827
|
+
import * as React11 from "react";
|
|
4828
|
+
import { jsx as jsx13 } from "react/jsx-runtime";
|
|
4829
|
+
var Separator = React11.forwardRef(
|
|
4830
|
+
({ className, orientation = "horizontal", ...props }, ref) => /* @__PURE__ */ jsx13(
|
|
4762
4831
|
"div",
|
|
4763
4832
|
{
|
|
4764
4833
|
ref,
|
|
@@ -4776,7 +4845,7 @@ var Separator = React10.forwardRef(
|
|
|
4776
4845
|
Separator.displayName = "Separator";
|
|
4777
4846
|
|
|
4778
4847
|
// src/components/composer/ConnectorMenuPanel.tsx
|
|
4779
|
-
import { jsx as
|
|
4848
|
+
import { jsx as jsx14, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
4780
4849
|
function resolveConnectorManagementUrl(apiUrl, scope) {
|
|
4781
4850
|
const base2 = apiUrl?.trim() || window.location.href;
|
|
4782
4851
|
const path = scope.type === "project" ? `/project/${encodeURIComponent(scope.projectId)}/config` : `/xpert/w/${encodeURIComponent(scope.workspaceId)}/connectors`;
|
|
@@ -4808,7 +4877,7 @@ function ConnectorIcon({
|
|
|
4808
4877
|
label
|
|
4809
4878
|
}) {
|
|
4810
4879
|
if (option.icon?.type === "image" && typeof option.icon.value === "string") {
|
|
4811
|
-
return /* @__PURE__ */
|
|
4880
|
+
return /* @__PURE__ */ jsx14(
|
|
4812
4881
|
"img",
|
|
4813
4882
|
{
|
|
4814
4883
|
src: option.icon.value,
|
|
@@ -4817,13 +4886,13 @@ function ConnectorIcon({
|
|
|
4817
4886
|
}
|
|
4818
4887
|
);
|
|
4819
4888
|
}
|
|
4820
|
-
return /* @__PURE__ */
|
|
4889
|
+
return /* @__PURE__ */ jsx14(
|
|
4821
4890
|
"span",
|
|
4822
4891
|
{
|
|
4823
4892
|
"aria-hidden": "true",
|
|
4824
4893
|
title: label,
|
|
4825
4894
|
className: "flex size-7 items-center justify-center rounded-md bg-muted text-muted-foreground",
|
|
4826
|
-
children: /* @__PURE__ */
|
|
4895
|
+
children: /* @__PURE__ */ jsx14(Cable, { className: "size-4" })
|
|
4827
4896
|
}
|
|
4828
4897
|
);
|
|
4829
4898
|
}
|
|
@@ -4839,22 +4908,22 @@ function ConnectorMenuPanel({
|
|
|
4839
4908
|
apiUrl
|
|
4840
4909
|
}) {
|
|
4841
4910
|
const { t, i18n: i18n2 } = useChatkitTranslation();
|
|
4842
|
-
const [query, setQuery] =
|
|
4843
|
-
const [scope, setScope] =
|
|
4844
|
-
const [options, setOptions] =
|
|
4845
|
-
const [loading, setLoading] =
|
|
4846
|
-
const [error, setError] =
|
|
4847
|
-
const [connectingBindingId, setConnectingBindingId] =
|
|
4911
|
+
const [query, setQuery] = React12.useState("");
|
|
4912
|
+
const [scope, setScope] = React12.useState(null);
|
|
4913
|
+
const [options, setOptions] = React12.useState([]);
|
|
4914
|
+
const [loading, setLoading] = React12.useState(false);
|
|
4915
|
+
const [error, setError] = React12.useState(null);
|
|
4916
|
+
const [connectingBindingId, setConnectingBindingId] = React12.useState(null);
|
|
4848
4917
|
const loadErrorMessage = t("composer.connectors.loadError");
|
|
4849
4918
|
const accessDeniedMessage = t("composer.connectors.accessDenied");
|
|
4850
4919
|
const scopeUnavailableMessage = t("composer.connectors.scopeUnavailable");
|
|
4851
|
-
const pollAbortRef =
|
|
4852
|
-
const popupRef =
|
|
4853
|
-
const selectedBindingIdSet =
|
|
4920
|
+
const pollAbortRef = React12.useRef(null);
|
|
4921
|
+
const popupRef = React12.useRef(null);
|
|
4922
|
+
const selectedBindingIdSet = React12.useMemo(
|
|
4854
4923
|
() => new Set(selectedBindingIds),
|
|
4855
4924
|
[selectedBindingIds]
|
|
4856
4925
|
);
|
|
4857
|
-
const loadConnectors =
|
|
4926
|
+
const loadConnectors = React12.useCallback(
|
|
4858
4927
|
async (signal) => {
|
|
4859
4928
|
if (!client || !xpertId) return;
|
|
4860
4929
|
const response = await client.connectors.runtimeOptions(xpertId, {
|
|
@@ -4866,7 +4935,7 @@ function ConnectorMenuPanel({
|
|
|
4866
4935
|
},
|
|
4867
4936
|
[client, projectId, xpertId]
|
|
4868
4937
|
);
|
|
4869
|
-
|
|
4938
|
+
React12.useEffect(() => {
|
|
4870
4939
|
if (!client || !xpertId) {
|
|
4871
4940
|
setScope(null);
|
|
4872
4941
|
setOptions([]);
|
|
@@ -4889,7 +4958,7 @@ function ConnectorMenuPanel({
|
|
|
4889
4958
|
});
|
|
4890
4959
|
return () => controller.abort();
|
|
4891
4960
|
}, [accessDeniedMessage, client, loadConnectors, loadErrorMessage, xpertId]);
|
|
4892
|
-
|
|
4961
|
+
React12.useEffect(
|
|
4893
4962
|
() => () => {
|
|
4894
4963
|
pollAbortRef.current?.abort();
|
|
4895
4964
|
if (popupRef.current && !popupRef.current.closed) {
|
|
@@ -4900,7 +4969,7 @@ function ConnectorMenuPanel({
|
|
|
4900
4969
|
);
|
|
4901
4970
|
const manageUrl = scope ? resolveConnectorManagementUrl(apiUrl, scope) : null;
|
|
4902
4971
|
const normalizedQuery = query.trim().toLocaleLowerCase();
|
|
4903
|
-
const filteredOptions =
|
|
4972
|
+
const filteredOptions = React12.useMemo(
|
|
4904
4973
|
() => options.filter((option) => {
|
|
4905
4974
|
if (!normalizedQuery) return true;
|
|
4906
4975
|
const searchable = `${localizeText(
|
|
@@ -4911,7 +4980,7 @@ function ConnectorMenuPanel({
|
|
|
4911
4980
|
}),
|
|
4912
4981
|
[i18n2.language, normalizedQuery, options]
|
|
4913
4982
|
);
|
|
4914
|
-
const refresh =
|
|
4983
|
+
const refresh = React12.useCallback(async () => {
|
|
4915
4984
|
setLoading(true);
|
|
4916
4985
|
try {
|
|
4917
4986
|
await loadConnectors();
|
|
@@ -4920,7 +4989,7 @@ function ConnectorMenuPanel({
|
|
|
4920
4989
|
setLoading(false);
|
|
4921
4990
|
}
|
|
4922
4991
|
}, [loadConnectors]);
|
|
4923
|
-
const pollAuthorization =
|
|
4992
|
+
const pollAuthorization = React12.useCallback(
|
|
4924
4993
|
async (bindingId, initial, popup, signal) => {
|
|
4925
4994
|
if (!client) return;
|
|
4926
4995
|
let status = initial;
|
|
@@ -4957,7 +5026,7 @@ function ConnectorMenuPanel({
|
|
|
4957
5026
|
},
|
|
4958
5027
|
[client, onSelectionChange, refresh, selectedBindingIds, xpertId]
|
|
4959
5028
|
);
|
|
4960
|
-
const openManageConnectors =
|
|
5029
|
+
const openManageConnectors = React12.useCallback(() => {
|
|
4961
5030
|
if (!manageUrl) {
|
|
4962
5031
|
setError(scopeUnavailableMessage);
|
|
4963
5032
|
return;
|
|
@@ -4969,7 +5038,7 @@ function ConnectorMenuPanel({
|
|
|
4969
5038
|
}
|
|
4970
5039
|
popup.opener = null;
|
|
4971
5040
|
}, [manageUrl, scopeUnavailableMessage, t]);
|
|
4972
|
-
const connectPersonalBinding =
|
|
5041
|
+
const connectPersonalBinding = React12.useCallback(
|
|
4973
5042
|
async (option) => {
|
|
4974
5043
|
if (!client) return;
|
|
4975
5044
|
if (option.profile) {
|
|
@@ -5055,7 +5124,7 @@ function ConnectorMenuPanel({
|
|
|
5055
5124
|
xpertId
|
|
5056
5125
|
]
|
|
5057
5126
|
);
|
|
5058
|
-
const handleOptionClick =
|
|
5127
|
+
const handleOptionClick = React12.useCallback(
|
|
5059
5128
|
(option) => {
|
|
5060
5129
|
if (!isConnectorUsable(option)) {
|
|
5061
5130
|
if (option.authorizationMode === "personal") {
|
|
@@ -5076,15 +5145,15 @@ function ConnectorMenuPanel({
|
|
|
5076
5145
|
selectedBindingIds
|
|
5077
5146
|
]
|
|
5078
5147
|
);
|
|
5079
|
-
return /* @__PURE__ */
|
|
5148
|
+
return /* @__PURE__ */ jsxs5(
|
|
5080
5149
|
"div",
|
|
5081
5150
|
{
|
|
5082
5151
|
"data-slot": "composer-connector-panel",
|
|
5083
5152
|
className: "flex w-full min-w-0 max-w-full flex-col",
|
|
5084
5153
|
children: [
|
|
5085
|
-
/* @__PURE__ */
|
|
5086
|
-
/* @__PURE__ */
|
|
5087
|
-
/* @__PURE__ */
|
|
5154
|
+
/* @__PURE__ */ jsx14("div", { className: "p-3 pb-2", children: /* @__PURE__ */ jsxs5("div", { className: "relative", children: [
|
|
5155
|
+
/* @__PURE__ */ jsx14(Search, { className: "pointer-events-none absolute left-3 top-1/2 size-5 -translate-y-1/2 text-muted-foreground" }),
|
|
5156
|
+
/* @__PURE__ */ jsx14(
|
|
5088
5157
|
Input,
|
|
5089
5158
|
{
|
|
5090
5159
|
value: query,
|
|
@@ -5094,15 +5163,15 @@ function ConnectorMenuPanel({
|
|
|
5094
5163
|
}
|
|
5095
5164
|
)
|
|
5096
5165
|
] }) }),
|
|
5097
|
-
/* @__PURE__ */
|
|
5098
|
-
/* @__PURE__ */
|
|
5166
|
+
/* @__PURE__ */ jsx14(ScrollArea, { className: "max-h-72 min-h-0 px-3", children: /* @__PURE__ */ jsx14("div", { "data-slot": "composer-connector-list", className: "space-y-1 pb-2", children: loading ? /* @__PURE__ */ jsxs5(ConnectorMessage, { children: [
|
|
5167
|
+
/* @__PURE__ */ jsx14(Loader2, { className: "mr-2 inline size-4 animate-spin" }),
|
|
5099
5168
|
t("composer.connectors.loading")
|
|
5100
|
-
] }) : !xpertId ? /* @__PURE__ */
|
|
5169
|
+
] }) : !xpertId ? /* @__PURE__ */ jsx14(ConnectorMessage, { children: scopeUnavailableMessage }) : filteredOptions.length === 0 ? /* @__PURE__ */ jsx14(ConnectorMessage, { children: t("composer.connectors.empty") }) : filteredOptions.map((option) => {
|
|
5101
5170
|
const label = localizeText(option.label, i18n2.language);
|
|
5102
5171
|
const selected = selectedBindingIdSet.has(option.bindingId);
|
|
5103
5172
|
const usable = isConnectorUsable(option);
|
|
5104
5173
|
const connecting = connectingBindingId === option.bindingId;
|
|
5105
|
-
return /* @__PURE__ */
|
|
5174
|
+
return /* @__PURE__ */ jsxs5(
|
|
5106
5175
|
"button",
|
|
5107
5176
|
{
|
|
5108
5177
|
type: "button",
|
|
@@ -5114,13 +5183,13 @@ function ConnectorMenuPanel({
|
|
|
5114
5183
|
),
|
|
5115
5184
|
onClick: () => handleOptionClick(option),
|
|
5116
5185
|
children: [
|
|
5117
|
-
/* @__PURE__ */
|
|
5118
|
-
/* @__PURE__ */
|
|
5119
|
-
/* @__PURE__ */
|
|
5120
|
-
/* @__PURE__ */
|
|
5186
|
+
/* @__PURE__ */ jsx14(ConnectorIcon, { option, label }),
|
|
5187
|
+
/* @__PURE__ */ jsxs5("span", { className: "min-w-0 flex-1", children: [
|
|
5188
|
+
/* @__PURE__ */ jsx14("span", { className: "block truncate text-base", children: label || option.provider }),
|
|
5189
|
+
/* @__PURE__ */ jsx14("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") })
|
|
5121
5190
|
] }),
|
|
5122
|
-
/* @__PURE__ */
|
|
5123
|
-
connecting ? /* @__PURE__ */
|
|
5191
|
+
/* @__PURE__ */ jsxs5("span", { className: "inline-flex shrink-0 items-center gap-1.5 text-sm text-muted-foreground", children: [
|
|
5192
|
+
connecting ? /* @__PURE__ */ jsx14(Loader2, { className: "size-4 animate-spin" }) : selected ? /* @__PURE__ */ jsx14(Check, { className: "size-4 text-primary" }) : usable ? /* @__PURE__ */ jsx14("span", { className: "size-4 rounded-full border border-current" }) : /* @__PURE__ */ jsx14(Link2, { className: "size-4" }),
|
|
5124
5193
|
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")
|
|
5125
5194
|
] })
|
|
5126
5195
|
]
|
|
@@ -5128,9 +5197,9 @@ function ConnectorMenuPanel({
|
|
|
5128
5197
|
option.bindingId
|
|
5129
5198
|
);
|
|
5130
5199
|
}) }) }),
|
|
5131
|
-
error ? /* @__PURE__ */
|
|
5132
|
-
/* @__PURE__ */
|
|
5133
|
-
/* @__PURE__ */
|
|
5200
|
+
error ? /* @__PURE__ */ jsx14("div", { role: "alert", className: "px-4 py-2 text-sm text-destructive", children: error }) : null,
|
|
5201
|
+
/* @__PURE__ */ jsx14(Separator, {}),
|
|
5202
|
+
/* @__PURE__ */ jsxs5(
|
|
5134
5203
|
"button",
|
|
5135
5204
|
{
|
|
5136
5205
|
type: "button",
|
|
@@ -5138,7 +5207,7 @@ function ConnectorMenuPanel({
|
|
|
5138
5207
|
disabled: !scope,
|
|
5139
5208
|
onClick: openManageConnectors,
|
|
5140
5209
|
children: [
|
|
5141
|
-
/* @__PURE__ */
|
|
5210
|
+
/* @__PURE__ */ jsx14(ArrowUpRight, { className: "size-5" }),
|
|
5142
5211
|
t("composer.connectors.manage")
|
|
5143
5212
|
]
|
|
5144
5213
|
}
|
|
@@ -5151,27 +5220,29 @@ function isAccessDenied(error) {
|
|
|
5151
5220
|
return error instanceof Error && "status" in error && (error.status === 401 || error.status === 403);
|
|
5152
5221
|
}
|
|
5153
5222
|
function ConnectorMessage({ children }) {
|
|
5154
|
-
return /* @__PURE__ */
|
|
5223
|
+
return /* @__PURE__ */ jsx14("div", { className: "flex min-h-40 items-center justify-center px-4 text-center text-sm text-muted-foreground", children });
|
|
5155
5224
|
}
|
|
5156
5225
|
|
|
5157
5226
|
// src/components/composer/ComposerMenu.tsx
|
|
5158
|
-
import { jsx as
|
|
5227
|
+
import { Fragment, jsx as jsx15, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
5228
|
+
var COMPOSER_MENU_EXPANDED_WIDTH_REM = 33;
|
|
5229
|
+
var COMPOSER_MENU_COLLISION_PADDING = 12;
|
|
5159
5230
|
function getIconComponent(icon) {
|
|
5160
5231
|
const iconMap = {
|
|
5161
|
-
plus: /* @__PURE__ */
|
|
5162
|
-
document: /* @__PURE__ */
|
|
5163
|
-
write: /* @__PURE__ */
|
|
5164
|
-
sparkle: /* @__PURE__ */
|
|
5165
|
-
lightbulb: /* @__PURE__ */
|
|
5166
|
-
"settings-slider": /* @__PURE__ */
|
|
5167
|
-
search: /* @__PURE__ */
|
|
5168
|
-
globe: /* @__PURE__ */
|
|
5169
|
-
images: /* @__PURE__ */
|
|
5232
|
+
plus: /* @__PURE__ */ jsx15(Plus, { size: 16 }),
|
|
5233
|
+
document: /* @__PURE__ */ jsx15(FileText, { size: 16 }),
|
|
5234
|
+
write: /* @__PURE__ */ jsx15(Pencil, { size: 16 }),
|
|
5235
|
+
sparkle: /* @__PURE__ */ jsx15(Sparkles, { size: 16 }),
|
|
5236
|
+
lightbulb: /* @__PURE__ */ jsx15(Lightbulb, { size: 16 }),
|
|
5237
|
+
"settings-slider": /* @__PURE__ */ jsx15(SlidersHorizontal, { size: 16 }),
|
|
5238
|
+
search: /* @__PURE__ */ jsx15(Search2, { size: 16 }),
|
|
5239
|
+
globe: /* @__PURE__ */ jsx15(Globe, { size: 16 }),
|
|
5240
|
+
images: /* @__PURE__ */ jsx15(Images, { size: 16 })
|
|
5170
5241
|
};
|
|
5171
5242
|
return iconMap[icon] || iconMap.sparkle;
|
|
5172
5243
|
}
|
|
5173
5244
|
function Toggle({ checked }) {
|
|
5174
|
-
return /* @__PURE__ */
|
|
5245
|
+
return /* @__PURE__ */ jsx15(
|
|
5175
5246
|
"span",
|
|
5176
5247
|
{
|
|
5177
5248
|
"aria-hidden": "true",
|
|
@@ -5179,7 +5250,7 @@ function Toggle({ checked }) {
|
|
|
5179
5250
|
"relative inline-flex h-6 w-10 shrink-0 items-center rounded-full transition-colors",
|
|
5180
5251
|
checked ? "bg-primary" : "bg-muted-foreground/20"
|
|
5181
5252
|
),
|
|
5182
|
-
children: /* @__PURE__ */
|
|
5253
|
+
children: /* @__PURE__ */ jsx15(
|
|
5183
5254
|
"span",
|
|
5184
5255
|
{
|
|
5185
5256
|
className: cn(
|
|
@@ -5215,13 +5286,14 @@ function ComposerMenu({
|
|
|
5215
5286
|
}) {
|
|
5216
5287
|
const { t } = useChatkitTranslation();
|
|
5217
5288
|
const { theme } = useTheme();
|
|
5218
|
-
const [open, setOpen] =
|
|
5219
|
-
const [activePanel, setActivePanel] =
|
|
5289
|
+
const [open, setOpen] = React13.useState(false);
|
|
5290
|
+
const [activePanel, setActivePanel] = React13.useState(
|
|
5220
5291
|
null
|
|
5221
5292
|
);
|
|
5222
|
-
const [query, setQuery] =
|
|
5223
|
-
const [collisionBoundary, setCollisionBoundary] =
|
|
5224
|
-
const
|
|
5293
|
+
const [query, setQuery] = React13.useState("");
|
|
5294
|
+
const [collisionBoundary, setCollisionBoundary] = React13.useState();
|
|
5295
|
+
const [canExpandSecondaryPanel, setCanExpandSecondaryPanel] = React13.useState(false);
|
|
5296
|
+
const triggerRef = React13.useRef(null);
|
|
5225
5297
|
const roundedClass = getRoundedClass(theme.radius);
|
|
5226
5298
|
const panelRoundedClass = getPanelRoundedClass(theme.radius);
|
|
5227
5299
|
const menuItemRoundedClass = getMenuItemRoundedClass(theme.radius);
|
|
@@ -5247,8 +5319,148 @@ function ComposerMenu({
|
|
|
5247
5319
|
setActivePanel(panel);
|
|
5248
5320
|
setQuery("");
|
|
5249
5321
|
};
|
|
5322
|
+
React13.useLayoutEffect(() => {
|
|
5323
|
+
if (!open || !collisionBoundary) {
|
|
5324
|
+
setCanExpandSecondaryPanel(false);
|
|
5325
|
+
return;
|
|
5326
|
+
}
|
|
5327
|
+
const updateLayout = () => {
|
|
5328
|
+
const trigger = triggerRef.current;
|
|
5329
|
+
if (!trigger) {
|
|
5330
|
+
setCanExpandSecondaryPanel(false);
|
|
5331
|
+
return;
|
|
5332
|
+
}
|
|
5333
|
+
const boundaryRect = collisionBoundary.getBoundingClientRect();
|
|
5334
|
+
const triggerRect = trigger.getBoundingClientRect();
|
|
5335
|
+
const rootFontSize = Number.parseFloat(
|
|
5336
|
+
window.getComputedStyle(document.documentElement).fontSize
|
|
5337
|
+
);
|
|
5338
|
+
const remInPixels = Number.isFinite(rootFontSize) ? rootFontSize : 16;
|
|
5339
|
+
const menuLeft = Math.max(
|
|
5340
|
+
triggerRect.left,
|
|
5341
|
+
boundaryRect.left + COMPOSER_MENU_COLLISION_PADDING
|
|
5342
|
+
);
|
|
5343
|
+
const availableWidth = boundaryRect.right - COMPOSER_MENU_COLLISION_PADDING - menuLeft;
|
|
5344
|
+
const requiredWidth = COMPOSER_MENU_EXPANDED_WIDTH_REM * remInPixels;
|
|
5345
|
+
setCanExpandSecondaryPanel(availableWidth >= requiredWidth);
|
|
5346
|
+
};
|
|
5347
|
+
updateLayout();
|
|
5348
|
+
window.addEventListener("resize", updateLayout);
|
|
5349
|
+
const resizeObserver = typeof ResizeObserver === "function" ? new ResizeObserver(updateLayout) : null;
|
|
5350
|
+
resizeObserver?.observe(collisionBoundary);
|
|
5351
|
+
if (triggerRef.current) {
|
|
5352
|
+
resizeObserver?.observe(triggerRef.current);
|
|
5353
|
+
}
|
|
5354
|
+
return () => {
|
|
5355
|
+
window.removeEventListener("resize", updateLayout);
|
|
5356
|
+
resizeObserver?.disconnect();
|
|
5357
|
+
};
|
|
5358
|
+
}, [collisionBoundary, open]);
|
|
5359
|
+
const returnToPrimaryPanel = () => {
|
|
5360
|
+
setActivePanel(null);
|
|
5361
|
+
setQuery("");
|
|
5362
|
+
};
|
|
5363
|
+
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;
|
|
5250
5364
|
const normalizedQuery = query.trim().toLocaleLowerCase();
|
|
5251
5365
|
const matchesQuery2 = (label, description) => !normalizedQuery || `${label} ${description ?? ""}`.toLocaleLowerCase().includes(normalizedQuery);
|
|
5366
|
+
const renderDetailPills = (label, values) => {
|
|
5367
|
+
if (!values?.length) return null;
|
|
5368
|
+
return /* @__PURE__ */ jsxs6("div", { className: "space-y-1", children: [
|
|
5369
|
+
/* @__PURE__ */ jsx15("div", { className: "text-[11px] font-medium uppercase text-muted-foreground", children: label }),
|
|
5370
|
+
/* @__PURE__ */ jsxs6("div", { className: "flex flex-wrap gap-1", children: [
|
|
5371
|
+
values.slice(0, 6).map((value) => /* @__PURE__ */ jsx15(
|
|
5372
|
+
"span",
|
|
5373
|
+
{
|
|
5374
|
+
className: "max-w-full truncate rounded-md bg-muted px-1.5 py-0.5 text-[11px] text-foreground",
|
|
5375
|
+
children: value
|
|
5376
|
+
},
|
|
5377
|
+
value
|
|
5378
|
+
)),
|
|
5379
|
+
values.length > 6 ? /* @__PURE__ */ jsxs6("span", { className: "rounded-md bg-muted px-1.5 py-0.5 text-[11px] text-muted-foreground", children: [
|
|
5380
|
+
"+",
|
|
5381
|
+
values.length - 6
|
|
5382
|
+
] }) : null
|
|
5383
|
+
] })
|
|
5384
|
+
] });
|
|
5385
|
+
};
|
|
5386
|
+
const renderSubAgentDetailCard = (subAgent) => {
|
|
5387
|
+
const agentKind = subAgent.type === "xpert" ? t("composer.capabilities.xpertAgent") : t("composer.capabilities.agent");
|
|
5388
|
+
return /* @__PURE__ */ jsxs6(
|
|
5389
|
+
"div",
|
|
5390
|
+
{
|
|
5391
|
+
"data-slot": "runtime-sub-agent-detail-card",
|
|
5392
|
+
className: cn(
|
|
5393
|
+
"pointer-events-none w-80 space-y-3 border border-border bg-popover p-3 text-popover-foreground shadow-lg",
|
|
5394
|
+
panelRoundedClass
|
|
5395
|
+
),
|
|
5396
|
+
children: [
|
|
5397
|
+
/* @__PURE__ */ jsxs6("div", { className: "flex items-start gap-3", children: [
|
|
5398
|
+
/* @__PURE__ */ jsx15(
|
|
5399
|
+
ChatkitAvatar,
|
|
5400
|
+
{
|
|
5401
|
+
avatar: normalizeChatkitAvatar(subAgent.avatar),
|
|
5402
|
+
label: subAgent.label,
|
|
5403
|
+
className: "h-9 w-9 shrink-0",
|
|
5404
|
+
fallbackClassName: "text-xs"
|
|
5405
|
+
}
|
|
5406
|
+
),
|
|
5407
|
+
/* @__PURE__ */ jsxs6("div", { className: "min-w-0 flex-1", children: [
|
|
5408
|
+
/* @__PURE__ */ jsx15("div", { className: "truncate text-sm font-medium", children: subAgent.label }),
|
|
5409
|
+
/* @__PURE__ */ jsx15("div", { className: "truncate text-xs text-muted-foreground", children: subAgent.name ?? agentKind })
|
|
5410
|
+
] })
|
|
5411
|
+
] }),
|
|
5412
|
+
subAgent.description ? /* @__PURE__ */ jsx15("div", { className: "line-clamp-4 text-xs leading-5 text-muted-foreground", children: subAgent.description }) : null,
|
|
5413
|
+
/* @__PURE__ */ jsxs6("div", { className: "grid grid-cols-2 gap-2 text-xs", children: [
|
|
5414
|
+
/* @__PURE__ */ jsxs6("div", { className: "rounded-md bg-muted px-2 py-1", children: [
|
|
5415
|
+
/* @__PURE__ */ jsx15("span", { className: "block text-[11px] text-muted-foreground", children: t("composer.capabilities.type") }),
|
|
5416
|
+
/* @__PURE__ */ jsx15("span", { className: "font-medium", children: agentKind })
|
|
5417
|
+
] }),
|
|
5418
|
+
subAgent.agentKey || subAgent.xpertId ? /* @__PURE__ */ jsxs6("div", { className: "rounded-md bg-muted px-2 py-1", children: [
|
|
5419
|
+
/* @__PURE__ */ jsx15("span", { className: "block text-[11px] text-muted-foreground", children: t("composer.capabilities.identifier") }),
|
|
5420
|
+
/* @__PURE__ */ jsx15("span", { className: "block truncate font-mono text-[11px]", children: subAgent.agentKey ?? subAgent.xpertId })
|
|
5421
|
+
] }) : null
|
|
5422
|
+
] }),
|
|
5423
|
+
renderDetailPills(
|
|
5424
|
+
t("composer.capabilities.tools"),
|
|
5425
|
+
subAgent.toolNames
|
|
5426
|
+
),
|
|
5427
|
+
renderDetailPills(
|
|
5428
|
+
t("composer.capabilities.toolsets"),
|
|
5429
|
+
subAgent.toolsetNames
|
|
5430
|
+
),
|
|
5431
|
+
renderDetailPills(
|
|
5432
|
+
t("composer.capabilities.knowledge"),
|
|
5433
|
+
subAgent.knowledgebaseNames
|
|
5434
|
+
)
|
|
5435
|
+
]
|
|
5436
|
+
}
|
|
5437
|
+
);
|
|
5438
|
+
};
|
|
5439
|
+
const renderSubAgentInfoButton = (subAgent) => /* @__PURE__ */ jsxs6(Tooltip, { children: [
|
|
5440
|
+
/* @__PURE__ */ jsx15(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx15(
|
|
5441
|
+
"button",
|
|
5442
|
+
{
|
|
5443
|
+
type: "button",
|
|
5444
|
+
"aria-label": t("composer.capabilities.agentDetails"),
|
|
5445
|
+
"data-slot": "runtime-sub-agent-info-trigger",
|
|
5446
|
+
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",
|
|
5447
|
+
onClick: (event) => event.stopPropagation(),
|
|
5448
|
+
onPointerDown: (event) => event.stopPropagation(),
|
|
5449
|
+
children: /* @__PURE__ */ jsx15(Info, { size: 14 })
|
|
5450
|
+
}
|
|
5451
|
+
) }),
|
|
5452
|
+
/* @__PURE__ */ jsx15(
|
|
5453
|
+
TooltipContent,
|
|
5454
|
+
{
|
|
5455
|
+
side: "top",
|
|
5456
|
+
align: "center",
|
|
5457
|
+
sideOffset: 8,
|
|
5458
|
+
hideArrow: true,
|
|
5459
|
+
className: "bg-transparent p-0 text-popover-foreground shadow-none",
|
|
5460
|
+
children: renderSubAgentDetailCard(subAgent)
|
|
5461
|
+
}
|
|
5462
|
+
)
|
|
5463
|
+
] });
|
|
5252
5464
|
const renderCapabilityPanel = (panel) => {
|
|
5253
5465
|
const isSkills = panel === "skills";
|
|
5254
5466
|
const filteredSkills = isSkills ? skills.filter((skill) => matchesQuery2(skill.label, skill.description)) : [];
|
|
@@ -5259,7 +5471,7 @@ function ComposerMenu({
|
|
|
5259
5471
|
skill.id
|
|
5260
5472
|
) : false;
|
|
5261
5473
|
const skillDescription = skill.description ?? skill.repositoryName;
|
|
5262
|
-
return /* @__PURE__ */
|
|
5474
|
+
return /* @__PURE__ */ jsxs6(
|
|
5263
5475
|
DropdownMenuCheckboxItem,
|
|
5264
5476
|
{
|
|
5265
5477
|
checked: selected,
|
|
@@ -5272,14 +5484,14 @@ function ComposerMenu({
|
|
|
5272
5484
|
selected && "bg-muted"
|
|
5273
5485
|
),
|
|
5274
5486
|
children: [
|
|
5275
|
-
/* @__PURE__ */
|
|
5487
|
+
/* @__PURE__ */ jsx15(
|
|
5276
5488
|
"span",
|
|
5277
5489
|
{
|
|
5278
5490
|
className: cn(
|
|
5279
5491
|
"flex size-7 shrink-0 items-center justify-center text-muted-foreground",
|
|
5280
5492
|
skillDescription && "mt-0.5"
|
|
5281
5493
|
),
|
|
5282
|
-
children: /* @__PURE__ */
|
|
5494
|
+
children: /* @__PURE__ */ jsx15(
|
|
5283
5495
|
RuntimeCapabilityIcon,
|
|
5284
5496
|
{
|
|
5285
5497
|
option: {
|
|
@@ -5294,9 +5506,9 @@ function ComposerMenu({
|
|
|
5294
5506
|
)
|
|
5295
5507
|
}
|
|
5296
5508
|
),
|
|
5297
|
-
/* @__PURE__ */
|
|
5298
|
-
/* @__PURE__ */
|
|
5299
|
-
skillDescription && /* @__PURE__ */
|
|
5509
|
+
/* @__PURE__ */ jsxs6("span", { className: "min-w-0 flex-1 text-left", children: [
|
|
5510
|
+
/* @__PURE__ */ jsx15("span", { className: "block truncate", children: skill.label }),
|
|
5511
|
+
skillDescription && /* @__PURE__ */ jsx15("span", { className: "block truncate text-xs text-muted-foreground", children: skillDescription })
|
|
5300
5512
|
] })
|
|
5301
5513
|
]
|
|
5302
5514
|
},
|
|
@@ -5322,7 +5534,7 @@ function ComposerMenu({
|
|
|
5322
5534
|
"subAgent",
|
|
5323
5535
|
subAgent.nodeKey
|
|
5324
5536
|
) : false;
|
|
5325
|
-
return /* @__PURE__ */
|
|
5537
|
+
return /* @__PURE__ */ jsxs6(
|
|
5326
5538
|
DropdownMenuCheckboxItem,
|
|
5327
5539
|
{
|
|
5328
5540
|
checked: selected,
|
|
@@ -5338,7 +5550,7 @@ function ComposerMenu({
|
|
|
5338
5550
|
selected && "bg-muted"
|
|
5339
5551
|
),
|
|
5340
5552
|
children: [
|
|
5341
|
-
/* @__PURE__ */
|
|
5553
|
+
/* @__PURE__ */ jsx15("span", { className: "mt-0.5 flex size-7 shrink-0 items-center justify-center text-muted-foreground", children: /* @__PURE__ */ jsx15(
|
|
5342
5554
|
RuntimeCapabilityIcon,
|
|
5343
5555
|
{
|
|
5344
5556
|
option: {
|
|
@@ -5351,16 +5563,17 @@ function ComposerMenu({
|
|
|
5351
5563
|
variant: "list"
|
|
5352
5564
|
}
|
|
5353
5565
|
) }),
|
|
5354
|
-
/* @__PURE__ */
|
|
5355
|
-
/* @__PURE__ */
|
|
5356
|
-
(subAgent.description || subAgent.name) && /* @__PURE__ */
|
|
5357
|
-
] })
|
|
5566
|
+
/* @__PURE__ */ jsxs6("span", { className: "min-w-0 flex-1 text-left", children: [
|
|
5567
|
+
/* @__PURE__ */ jsx15("span", { className: "block truncate", children: subAgent.label }),
|
|
5568
|
+
(subAgent.description || subAgent.name) && /* @__PURE__ */ jsx15("span", { className: "block truncate text-xs text-muted-foreground", children: subAgent.description ?? subAgent.name })
|
|
5569
|
+
] }),
|
|
5570
|
+
renderSubAgentInfoButton(subAgent)
|
|
5358
5571
|
]
|
|
5359
5572
|
},
|
|
5360
5573
|
subAgent.nodeKey
|
|
5361
5574
|
);
|
|
5362
5575
|
});
|
|
5363
|
-
const toolRows = isSkills ? tools.filter((tool) => matchesQuery2(tool.label, tool.shortLabel)).map((tool) => /* @__PURE__ */
|
|
5576
|
+
const toolRows = isSkills ? tools.filter((tool) => matchesQuery2(tool.label, tool.shortLabel)).map((tool) => /* @__PURE__ */ jsxs6(
|
|
5364
5577
|
"button",
|
|
5365
5578
|
{
|
|
5366
5579
|
type: "button",
|
|
@@ -5373,14 +5586,14 @@ function ComposerMenu({
|
|
|
5373
5586
|
setOpen(false);
|
|
5374
5587
|
},
|
|
5375
5588
|
children: [
|
|
5376
|
-
/* @__PURE__ */
|
|
5377
|
-
/* @__PURE__ */
|
|
5589
|
+
/* @__PURE__ */ jsx15("span", { className: "flex size-7 shrink-0 items-center justify-center text-muted-foreground", children: getIconComponent(tool.icon) }),
|
|
5590
|
+
/* @__PURE__ */ jsx15("span", { className: "truncate", children: tool.label })
|
|
5378
5591
|
]
|
|
5379
5592
|
},
|
|
5380
5593
|
tool.id
|
|
5381
5594
|
)) : [];
|
|
5382
|
-
return /* @__PURE__ */
|
|
5383
|
-
/* @__PURE__ */
|
|
5595
|
+
return /* @__PURE__ */ jsxs6(Fragment, { children: [
|
|
5596
|
+
/* @__PURE__ */ jsx15(
|
|
5384
5597
|
PanelSearch,
|
|
5385
5598
|
{
|
|
5386
5599
|
value: query,
|
|
@@ -5390,29 +5603,109 @@ function ComposerMenu({
|
|
|
5390
5603
|
)
|
|
5391
5604
|
}
|
|
5392
5605
|
),
|
|
5393
|
-
/* @__PURE__ */
|
|
5394
|
-
|
|
5395
|
-
|
|
5396
|
-
|
|
5397
|
-
|
|
5398
|
-
|
|
5399
|
-
|
|
5400
|
-
|
|
5401
|
-
|
|
5402
|
-
|
|
5403
|
-
|
|
5404
|
-
|
|
5405
|
-
|
|
5406
|
-
|
|
5407
|
-
|
|
5408
|
-
|
|
5409
|
-
|
|
5410
|
-
|
|
5411
|
-
|
|
5606
|
+
/* @__PURE__ */ jsx15(
|
|
5607
|
+
"div",
|
|
5608
|
+
{
|
|
5609
|
+
"data-slot": "composer-capability-scroll",
|
|
5610
|
+
className: "max-h-72 overflow-y-auto overscroll-contain px-2 pb-2",
|
|
5611
|
+
children: /* @__PURE__ */ jsxs6("div", { "data-slot": "composer-capability-list", className: "space-y-1", children: [
|
|
5612
|
+
isSkills && expertSkills.length > 0 ? /* @__PURE__ */ jsx15(SkillGroup, { label: t("composer.workbuddy.expertSkills"), children: expertSkills.map(renderSkillRow) }) : null,
|
|
5613
|
+
isSkills ? Array.from(projectSkillGroups.entries()).map(
|
|
5614
|
+
([projectLabel, projectSkills]) => /* @__PURE__ */ jsx15(
|
|
5615
|
+
SkillGroup,
|
|
5616
|
+
{
|
|
5617
|
+
label: t("composer.workbuddy.projectSkills", {
|
|
5618
|
+
project: projectLabel
|
|
5619
|
+
}),
|
|
5620
|
+
children: projectSkills.map(renderSkillRow)
|
|
5621
|
+
},
|
|
5622
|
+
projectLabel
|
|
5623
|
+
)
|
|
5624
|
+
) : capabilityRows,
|
|
5625
|
+
toolRows,
|
|
5626
|
+
(isSkills ? filteredSkills.length : capabilityRows.length) === 0 && toolRows.length === 0 ? /* @__PURE__ */ jsx15("div", { className: "flex min-h-32 items-center justify-center px-4 text-center text-sm text-muted-foreground", children: t(
|
|
5627
|
+
isSkills ? "composer.workbuddy.emptySkills" : "composer.workbuddy.emptyExperts"
|
|
5628
|
+
) }) : null
|
|
5629
|
+
] })
|
|
5630
|
+
}
|
|
5631
|
+
)
|
|
5412
5632
|
] });
|
|
5413
5633
|
};
|
|
5414
|
-
|
|
5415
|
-
|
|
5634
|
+
const primaryPanel = /* @__PURE__ */ jsxs6(
|
|
5635
|
+
"div",
|
|
5636
|
+
{
|
|
5637
|
+
"data-slot": "composer-primary-panel",
|
|
5638
|
+
className: cn(
|
|
5639
|
+
"w-64 max-w-full shrink-0 overflow-hidden bg-popover p-1 text-popover-foreground shadow-md ring-1 ring-foreground/10",
|
|
5640
|
+
panelRoundedClass
|
|
5641
|
+
),
|
|
5642
|
+
children: [
|
|
5643
|
+
/* @__PURE__ */ jsxs6(
|
|
5644
|
+
DropdownMenuItem,
|
|
5645
|
+
{
|
|
5646
|
+
disabled: !attachmentsEnabled,
|
|
5647
|
+
onSelect: onAttachmentClick,
|
|
5648
|
+
className: cn("gap-3 p-1.5 font-normal", menuItemRoundedClass),
|
|
5649
|
+
children: [
|
|
5650
|
+
/* @__PURE__ */ jsx15(Paperclip, { className: "size-5" }),
|
|
5651
|
+
/* @__PURE__ */ jsx15("span", { className: "flex-1 text-base", children: t("composer.addAttachment") }),
|
|
5652
|
+
/* @__PURE__ */ jsx15(ChevronRight, { className: "size-4" })
|
|
5653
|
+
]
|
|
5654
|
+
}
|
|
5655
|
+
),
|
|
5656
|
+
/* @__PURE__ */ jsx15(DropdownMenuSeparator, { className: "my-2" }),
|
|
5657
|
+
/* @__PURE__ */ jsx15(
|
|
5658
|
+
PrimaryPanelItem,
|
|
5659
|
+
{
|
|
5660
|
+
icon: /* @__PURE__ */ jsx15(Target, {}),
|
|
5661
|
+
label: t("composer.workbuddy.targets"),
|
|
5662
|
+
active: activePanel === "targets",
|
|
5663
|
+
onSelect: () => choosePanel("targets"),
|
|
5664
|
+
className: menuItemRoundedClass
|
|
5665
|
+
}
|
|
5666
|
+
),
|
|
5667
|
+
/* @__PURE__ */ jsx15(
|
|
5668
|
+
PrimaryPanelItem,
|
|
5669
|
+
{
|
|
5670
|
+
icon: /* @__PURE__ */ jsx15(Bot, {}),
|
|
5671
|
+
label: t("composer.workbuddy.experts"),
|
|
5672
|
+
count: selectedSubAgentCount,
|
|
5673
|
+
active: activePanel === "experts",
|
|
5674
|
+
onSelect: () => choosePanel("experts"),
|
|
5675
|
+
className: menuItemRoundedClass
|
|
5676
|
+
}
|
|
5677
|
+
),
|
|
5678
|
+
/* @__PURE__ */ jsx15(
|
|
5679
|
+
PrimaryPanelItem,
|
|
5680
|
+
{
|
|
5681
|
+
icon: /* @__PURE__ */ jsx15(WandSparkles, {}),
|
|
5682
|
+
label: t("composer.capabilities.skills"),
|
|
5683
|
+
count: selectedSkillCount,
|
|
5684
|
+
active: activePanel === "skills",
|
|
5685
|
+
onSelect: () => choosePanel("skills"),
|
|
5686
|
+
className: menuItemRoundedClass
|
|
5687
|
+
}
|
|
5688
|
+
),
|
|
5689
|
+
/* @__PURE__ */ jsx15(
|
|
5690
|
+
PrimaryPanelItem,
|
|
5691
|
+
{
|
|
5692
|
+
icon: /* @__PURE__ */ jsx15(Plug2, {}),
|
|
5693
|
+
label: t("composer.workbuddy.connectors"),
|
|
5694
|
+
count: selectedConnectorBindingIds?.length ?? 0,
|
|
5695
|
+
active: activePanel === "connectors",
|
|
5696
|
+
disabled: !connectorsEnabled,
|
|
5697
|
+
onSelect: () => choosePanel("connectors"),
|
|
5698
|
+
className: menuItemRoundedClass
|
|
5699
|
+
}
|
|
5700
|
+
)
|
|
5701
|
+
]
|
|
5702
|
+
}
|
|
5703
|
+
);
|
|
5704
|
+
const secondaryPanelExpandsRight = Boolean(
|
|
5705
|
+
activePanel && activePanelLabel && canExpandSecondaryPanel
|
|
5706
|
+
);
|
|
5707
|
+
return /* @__PURE__ */ jsxs6(DropdownMenu, { open, onOpenChange: handleOpenChange, modal: false, children: [
|
|
5708
|
+
/* @__PURE__ */ jsx15(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsx15(
|
|
5416
5709
|
Button,
|
|
5417
5710
|
{
|
|
5418
5711
|
ref: triggerRef,
|
|
@@ -5426,7 +5719,7 @@ function ComposerMenu({
|
|
|
5426
5719
|
"size-9 shrink-0 transition-[background-color,border-radius] duration-300 hover:bg-muted",
|
|
5427
5720
|
open ? "rounded-full bg-muted" : roundedClass
|
|
5428
5721
|
),
|
|
5429
|
-
children: /* @__PURE__ */
|
|
5722
|
+
children: /* @__PURE__ */ jsx15(
|
|
5430
5723
|
Plus,
|
|
5431
5724
|
{
|
|
5432
5725
|
className: cn(
|
|
@@ -5437,173 +5730,116 @@ function ComposerMenu({
|
|
|
5437
5730
|
)
|
|
5438
5731
|
}
|
|
5439
5732
|
) }),
|
|
5440
|
-
/* @__PURE__ */
|
|
5733
|
+
/* @__PURE__ */ jsx15(
|
|
5441
5734
|
DropdownMenuContent,
|
|
5442
5735
|
{
|
|
5443
5736
|
align: "start",
|
|
5444
5737
|
side: "top",
|
|
5445
5738
|
sideOffset: 8,
|
|
5446
5739
|
collisionBoundary,
|
|
5447
|
-
collisionPadding:
|
|
5740
|
+
collisionPadding: COMPOSER_MENU_COLLISION_PADDING,
|
|
5741
|
+
"data-layout": canExpandSecondaryPanel ? "wide" : "narrow",
|
|
5448
5742
|
className: cn(
|
|
5449
|
-
"bg-transparent shadow-none ring-0",
|
|
5450
|
-
|
|
5743
|
+
"max-w-(--radix-dropdown-menu-content-available-width) bg-transparent p-1 shadow-none ring-0",
|
|
5744
|
+
secondaryPanelExpandsRight ? "w-[33rem] overflow-visible" : "w-[16.5rem] overflow-hidden"
|
|
5451
5745
|
),
|
|
5452
|
-
children: /* @__PURE__ */
|
|
5746
|
+
children: /* @__PURE__ */ jsxs6(
|
|
5453
5747
|
"div",
|
|
5454
5748
|
{
|
|
5749
|
+
"data-slot": "composer-menu-layout",
|
|
5455
5750
|
className: cn(
|
|
5456
|
-
"items-end
|
|
5457
|
-
|
|
5751
|
+
"flex items-end",
|
|
5752
|
+
secondaryPanelExpandsRight && "w-full min-w-0 gap-2"
|
|
5458
5753
|
),
|
|
5459
5754
|
children: [
|
|
5460
|
-
|
|
5461
|
-
|
|
5462
|
-
|
|
5463
|
-
|
|
5464
|
-
className: cn(
|
|
5465
|
-
"w-64 max-w-full shrink-0 overflow-hidden bg-popover p-1 text-popover-foreground shadow-md ring-1 ring-foreground/10",
|
|
5466
|
-
panelRoundedClass
|
|
5467
|
-
),
|
|
5468
|
-
children: [
|
|
5469
|
-
/* @__PURE__ */ jsxs5(
|
|
5470
|
-
DropdownMenuItem,
|
|
5471
|
-
{
|
|
5472
|
-
disabled: !attachmentsEnabled,
|
|
5473
|
-
onSelect: onAttachmentClick,
|
|
5474
|
-
className: cn("gap-3 p-1.5 font-normal", menuItemRoundedClass),
|
|
5475
|
-
children: [
|
|
5476
|
-
/* @__PURE__ */ jsx14(Paperclip, { className: "size-5" }),
|
|
5477
|
-
/* @__PURE__ */ jsx14("span", { className: "flex-1 text-base", children: t("composer.addAttachment") }),
|
|
5478
|
-
/* @__PURE__ */ jsx14(ChevronRight, { className: "size-4" })
|
|
5479
|
-
]
|
|
5480
|
-
}
|
|
5481
|
-
),
|
|
5482
|
-
/* @__PURE__ */ jsx14(DropdownMenuSeparator, { className: "my-2" }),
|
|
5483
|
-
/* @__PURE__ */ jsx14(
|
|
5484
|
-
PrimaryPanelItem,
|
|
5485
|
-
{
|
|
5486
|
-
icon: /* @__PURE__ */ jsx14(Target, {}),
|
|
5487
|
-
label: t("composer.workbuddy.targets"),
|
|
5488
|
-
active: activePanel === "targets",
|
|
5489
|
-
onSelect: () => choosePanel("targets"),
|
|
5490
|
-
className: menuItemRoundedClass
|
|
5491
|
-
}
|
|
5492
|
-
),
|
|
5493
|
-
/* @__PURE__ */ jsx14(
|
|
5494
|
-
PrimaryPanelItem,
|
|
5495
|
-
{
|
|
5496
|
-
icon: /* @__PURE__ */ jsx14(Bot, {}),
|
|
5497
|
-
label: t("composer.workbuddy.experts"),
|
|
5498
|
-
count: selectedSubAgentCount,
|
|
5499
|
-
active: activePanel === "experts",
|
|
5500
|
-
onSelect: () => choosePanel("experts"),
|
|
5501
|
-
className: menuItemRoundedClass
|
|
5502
|
-
}
|
|
5503
|
-
),
|
|
5504
|
-
/* @__PURE__ */ jsx14(
|
|
5505
|
-
PrimaryPanelItem,
|
|
5506
|
-
{
|
|
5507
|
-
icon: /* @__PURE__ */ jsx14(WandSparkles, {}),
|
|
5508
|
-
label: t("composer.capabilities.skills"),
|
|
5509
|
-
count: selectedSkillCount,
|
|
5510
|
-
active: activePanel === "skills",
|
|
5511
|
-
onSelect: () => choosePanel("skills"),
|
|
5512
|
-
className: menuItemRoundedClass
|
|
5513
|
-
}
|
|
5514
|
-
),
|
|
5515
|
-
/* @__PURE__ */ jsx14(
|
|
5516
|
-
PrimaryPanelItem,
|
|
5517
|
-
{
|
|
5518
|
-
icon: /* @__PURE__ */ jsx14(Plug2, {}),
|
|
5519
|
-
label: t("composer.workbuddy.connectors"),
|
|
5520
|
-
count: selectedConnectorBindingIds?.length ?? 0,
|
|
5521
|
-
active: activePanel === "connectors",
|
|
5522
|
-
disabled: !connectorsEnabled,
|
|
5523
|
-
onSelect: () => choosePanel("connectors"),
|
|
5524
|
-
className: menuItemRoundedClass
|
|
5525
|
-
}
|
|
5526
|
-
)
|
|
5527
|
-
]
|
|
5528
|
-
}
|
|
5529
|
-
),
|
|
5530
|
-
activePanel === "targets" ? /* @__PURE__ */ jsx14(SecondaryPanel, { panelRoundedClass, children: /* @__PURE__ */ jsxs5("div", { className: "space-y-1 p-1", children: [
|
|
5531
|
-
/* @__PURE__ */ jsxs5(
|
|
5532
|
-
DropdownMenuItem,
|
|
5755
|
+
secondaryPanelExpandsRight ? primaryPanel : null,
|
|
5756
|
+
activePanel && activePanelLabel ? /* @__PURE__ */ jsxs6(SecondaryPanel, { panelRoundedClass, children: [
|
|
5757
|
+
!secondaryPanelExpandsRight ? /* @__PURE__ */ jsx15(
|
|
5758
|
+
PanelHeader,
|
|
5533
5759
|
{
|
|
5534
|
-
|
|
5535
|
-
|
|
5536
|
-
|
|
5537
|
-
onSelect: (event) => {
|
|
5538
|
-
event.preventDefault();
|
|
5539
|
-
onGoalPanelOpenChange?.(!goalPanelOpen);
|
|
5540
|
-
},
|
|
5541
|
-
className: cn(
|
|
5542
|
-
"gap-3 p-1.5",
|
|
5543
|
-
menuItemRoundedClass,
|
|
5544
|
-
goalPanelOpen && "bg-muted"
|
|
5545
|
-
),
|
|
5546
|
-
children: [
|
|
5547
|
-
/* @__PURE__ */ jsx14(Target, { className: "size-5" }),
|
|
5548
|
-
/* @__PURE__ */ jsx14("span", { className: "min-w-0 flex-1 text-base", children: t("chat.goal.label") }),
|
|
5549
|
-
/* @__PURE__ */ jsx14(Toggle, { checked: goalPanelOpen })
|
|
5550
|
-
]
|
|
5760
|
+
label: activePanelLabel,
|
|
5761
|
+
onBack: returnToPrimaryPanel,
|
|
5762
|
+
className: menuItemRoundedClass
|
|
5551
5763
|
}
|
|
5552
|
-
),
|
|
5553
|
-
/* @__PURE__ */
|
|
5554
|
-
|
|
5764
|
+
) : null,
|
|
5765
|
+
activePanel === "targets" ? /* @__PURE__ */ jsxs6("div", { className: "space-y-1 p-1", children: [
|
|
5766
|
+
/* @__PURE__ */ jsxs6(
|
|
5767
|
+
DropdownMenuItem,
|
|
5768
|
+
{
|
|
5769
|
+
role: "switch",
|
|
5770
|
+
"aria-checked": goalPanelOpen,
|
|
5771
|
+
disabled: !goalCommandAvailable,
|
|
5772
|
+
onSelect: (event) => {
|
|
5773
|
+
event.preventDefault();
|
|
5774
|
+
onGoalPanelOpenChange?.(!goalPanelOpen);
|
|
5775
|
+
},
|
|
5776
|
+
className: cn(
|
|
5777
|
+
"gap-3 p-1.5",
|
|
5778
|
+
menuItemRoundedClass,
|
|
5779
|
+
goalPanelOpen && "bg-muted"
|
|
5780
|
+
),
|
|
5781
|
+
children: [
|
|
5782
|
+
/* @__PURE__ */ jsx15(Target, { className: "size-5" }),
|
|
5783
|
+
/* @__PURE__ */ jsx15("span", { className: "min-w-0 flex-1 text-base", children: t("chat.goal.label") }),
|
|
5784
|
+
/* @__PURE__ */ jsx15(Toggle, { checked: goalPanelOpen })
|
|
5785
|
+
]
|
|
5786
|
+
}
|
|
5787
|
+
),
|
|
5788
|
+
/* @__PURE__ */ jsxs6(
|
|
5789
|
+
DropdownMenuItem,
|
|
5790
|
+
{
|
|
5791
|
+
role: "switch",
|
|
5792
|
+
"aria-checked": planModeEnabled,
|
|
5793
|
+
onSelect: (event) => {
|
|
5794
|
+
event.preventDefault();
|
|
5795
|
+
onPlanModeChange?.(!planModeEnabled);
|
|
5796
|
+
},
|
|
5797
|
+
className: cn(
|
|
5798
|
+
"gap-3 p-1.5",
|
|
5799
|
+
menuItemRoundedClass,
|
|
5800
|
+
planModeEnabled && "bg-muted"
|
|
5801
|
+
),
|
|
5802
|
+
children: [
|
|
5803
|
+
/* @__PURE__ */ jsx15(ListChecks, { className: "size-5" }),
|
|
5804
|
+
/* @__PURE__ */ jsx15("span", { className: "min-w-0 flex-1 text-base", children: t("composer.planMode") }),
|
|
5805
|
+
/* @__PURE__ */ jsx15(Toggle, { checked: planModeEnabled })
|
|
5806
|
+
]
|
|
5807
|
+
}
|
|
5808
|
+
)
|
|
5809
|
+
] }) : activePanel === "experts" || activePanel === "skills" ? renderCapabilityPanel(activePanel) : /* @__PURE__ */ jsx15(
|
|
5810
|
+
ConnectorMenuPanel,
|
|
5555
5811
|
{
|
|
5556
|
-
|
|
5557
|
-
|
|
5558
|
-
|
|
5559
|
-
|
|
5560
|
-
|
|
5561
|
-
|
|
5562
|
-
className: cn(
|
|
5563
|
-
"gap-3 p-1.5",
|
|
5564
|
-
menuItemRoundedClass,
|
|
5565
|
-
planModeEnabled && "bg-muted"
|
|
5566
|
-
),
|
|
5567
|
-
children: [
|
|
5568
|
-
/* @__PURE__ */ jsx14(ListChecks, { className: "size-5" }),
|
|
5569
|
-
/* @__PURE__ */ jsx14("span", { className: "min-w-0 flex-1 text-base", children: t("composer.planMode") }),
|
|
5570
|
-
/* @__PURE__ */ jsx14(Toggle, { checked: planModeEnabled })
|
|
5571
|
-
]
|
|
5812
|
+
client: connectorClient ?? null,
|
|
5813
|
+
xpertId: connectorXpertId,
|
|
5814
|
+
projectId: connectorProjectId,
|
|
5815
|
+
selectedBindingIds: selectedConnectorBindingIds,
|
|
5816
|
+
onSelectionChange: onConnectorSelectionChange,
|
|
5817
|
+
apiUrl
|
|
5572
5818
|
}
|
|
5573
5819
|
)
|
|
5574
|
-
] })
|
|
5575
|
-
ConnectorMenuPanel,
|
|
5576
|
-
{
|
|
5577
|
-
client: connectorClient ?? null,
|
|
5578
|
-
xpertId: connectorXpertId,
|
|
5579
|
-
projectId: connectorProjectId,
|
|
5580
|
-
selectedBindingIds: selectedConnectorBindingIds,
|
|
5581
|
-
onSelectionChange: onConnectorSelectionChange,
|
|
5582
|
-
apiUrl
|
|
5583
|
-
}
|
|
5584
|
-
) }) : null
|
|
5820
|
+
] }) : primaryPanel
|
|
5585
5821
|
]
|
|
5586
5822
|
}
|
|
5587
5823
|
)
|
|
5588
5824
|
}
|
|
5589
5825
|
),
|
|
5590
|
-
planModeEnabled ? /* @__PURE__ */
|
|
5826
|
+
planModeEnabled ? /* @__PURE__ */ jsx15(
|
|
5591
5827
|
ActiveIndicator,
|
|
5592
5828
|
{
|
|
5593
5829
|
label: t("composer.planModeActive"),
|
|
5594
5830
|
ariaLabel: t("composer.disablePlanMode"),
|
|
5595
|
-
icon: /* @__PURE__ */
|
|
5831
|
+
icon: /* @__PURE__ */ jsx15(ListChecks, {}),
|
|
5596
5832
|
roundedClass,
|
|
5597
5833
|
disabled,
|
|
5598
5834
|
onClick: () => onPlanModeChange?.(false)
|
|
5599
5835
|
}
|
|
5600
5836
|
) : null,
|
|
5601
|
-
goalCommandAvailable && goalPanelOpen ? /* @__PURE__ */
|
|
5837
|
+
goalCommandAvailable && goalPanelOpen ? /* @__PURE__ */ jsx15(
|
|
5602
5838
|
ActiveIndicator,
|
|
5603
5839
|
{
|
|
5604
5840
|
label: t("chat.goal.label"),
|
|
5605
5841
|
ariaLabel: t("chat.goal.hide"),
|
|
5606
|
-
icon: /* @__PURE__ */
|
|
5842
|
+
icon: /* @__PURE__ */ jsx15(Target, {}),
|
|
5607
5843
|
roundedClass,
|
|
5608
5844
|
disabled,
|
|
5609
5845
|
onClick: () => onGoalPanelOpenChange?.(false)
|
|
@@ -5611,6 +5847,29 @@ function ComposerMenu({
|
|
|
5611
5847
|
) : null
|
|
5612
5848
|
] });
|
|
5613
5849
|
}
|
|
5850
|
+
function PanelHeader({
|
|
5851
|
+
label,
|
|
5852
|
+
onBack,
|
|
5853
|
+
className
|
|
5854
|
+
}) {
|
|
5855
|
+
return /* @__PURE__ */ jsxs6(Fragment, { children: [
|
|
5856
|
+
/* @__PURE__ */ jsxs6(
|
|
5857
|
+
DropdownMenuItem,
|
|
5858
|
+
{
|
|
5859
|
+
onSelect: (event) => {
|
|
5860
|
+
event.preventDefault();
|
|
5861
|
+
onBack();
|
|
5862
|
+
},
|
|
5863
|
+
className: cn("gap-3 p-1.5 font-normal", className),
|
|
5864
|
+
children: [
|
|
5865
|
+
/* @__PURE__ */ jsx15(ArrowLeft, { className: "size-5" }),
|
|
5866
|
+
/* @__PURE__ */ jsx15("span", { className: "min-w-0 flex-1 text-base", children: label })
|
|
5867
|
+
]
|
|
5868
|
+
}
|
|
5869
|
+
),
|
|
5870
|
+
/* @__PURE__ */ jsx15(DropdownMenuSeparator, { className: "my-0" })
|
|
5871
|
+
] });
|
|
5872
|
+
}
|
|
5614
5873
|
function PrimaryPanelItem({
|
|
5615
5874
|
icon,
|
|
5616
5875
|
label,
|
|
@@ -5620,7 +5879,7 @@ function PrimaryPanelItem({
|
|
|
5620
5879
|
onSelect,
|
|
5621
5880
|
className
|
|
5622
5881
|
}) {
|
|
5623
|
-
return /* @__PURE__ */
|
|
5882
|
+
return /* @__PURE__ */ jsxs6(
|
|
5624
5883
|
DropdownMenuItem,
|
|
5625
5884
|
{
|
|
5626
5885
|
disabled,
|
|
@@ -5630,10 +5889,10 @@ function PrimaryPanelItem({
|
|
|
5630
5889
|
},
|
|
5631
5890
|
className: cn("gap-3 p-1.5 font-normal", className, active && "bg-muted"),
|
|
5632
5891
|
children: [
|
|
5633
|
-
|
|
5634
|
-
/* @__PURE__ */
|
|
5635
|
-
count > 0 ? /* @__PURE__ */
|
|
5636
|
-
/* @__PURE__ */
|
|
5892
|
+
React13.cloneElement(icon, { className: "size-5" }),
|
|
5893
|
+
/* @__PURE__ */ jsx15("span", { className: "min-w-0 flex-1 text-base", children: label }),
|
|
5894
|
+
count > 0 ? /* @__PURE__ */ jsx15("span", { className: "rounded-full bg-primary/10 px-1.5 py-0.5 text-xs font-normal text-primary", children: count }) : null,
|
|
5895
|
+
/* @__PURE__ */ jsx15(ChevronRight, { className: "size-4" })
|
|
5637
5896
|
]
|
|
5638
5897
|
}
|
|
5639
5898
|
);
|
|
@@ -5642,20 +5901,20 @@ function SecondaryPanel({
|
|
|
5642
5901
|
panelRoundedClass,
|
|
5643
5902
|
children
|
|
5644
5903
|
}) {
|
|
5645
|
-
return /* @__PURE__ */
|
|
5904
|
+
return /* @__PURE__ */ jsx15(
|
|
5646
5905
|
"div",
|
|
5647
5906
|
{
|
|
5648
5907
|
"data-slot": "composer-secondary-panel",
|
|
5649
5908
|
className: cn(
|
|
5650
|
-
"min-w-0 max-w-full
|
|
5909
|
+
"w-64 min-w-0 max-w-full overflow-hidden bg-popover text-popover-foreground shadow-lg ring-1 ring-foreground/10",
|
|
5651
5910
|
panelRoundedClass
|
|
5652
5911
|
),
|
|
5653
|
-
children: /* @__PURE__ */
|
|
5912
|
+
children: /* @__PURE__ */ jsx15(
|
|
5654
5913
|
"div",
|
|
5655
5914
|
{
|
|
5656
5915
|
"data-slot": "composer-secondary-scroll",
|
|
5657
|
-
className: "w-full min-w-0 overflow-x-
|
|
5658
|
-
children: /* @__PURE__ */
|
|
5916
|
+
className: "w-full min-w-0 overflow-x-hidden",
|
|
5917
|
+
children: /* @__PURE__ */ jsx15("div", { className: "w-full min-w-0", children })
|
|
5659
5918
|
}
|
|
5660
5919
|
)
|
|
5661
5920
|
}
|
|
@@ -5666,9 +5925,9 @@ function PanelSearch({
|
|
|
5666
5925
|
onChange,
|
|
5667
5926
|
placeholder
|
|
5668
5927
|
}) {
|
|
5669
|
-
return /* @__PURE__ */
|
|
5670
|
-
/* @__PURE__ */
|
|
5671
|
-
/* @__PURE__ */
|
|
5928
|
+
return /* @__PURE__ */ jsx15("div", { "data-slot": "composer-panel-search", className: "px-2 pt-1 pb-2", children: /* @__PURE__ */ jsxs6("div", { className: "relative", children: [
|
|
5929
|
+
/* @__PURE__ */ jsx15(Search2, { className: "pointer-events-none absolute left-3 top-1/2 size-5 -translate-y-1/2 text-muted-foreground" }),
|
|
5930
|
+
/* @__PURE__ */ jsx15(
|
|
5672
5931
|
Input,
|
|
5673
5932
|
{
|
|
5674
5933
|
autoFocus: true,
|
|
@@ -5678,14 +5937,14 @@ function PanelSearch({
|
|
|
5678
5937
|
className: "h-8 border-0 bg-muted pl-10 text-base shadow-none focus-visible:ring-1"
|
|
5679
5938
|
}
|
|
5680
5939
|
)
|
|
5681
|
-
] });
|
|
5940
|
+
] }) });
|
|
5682
5941
|
}
|
|
5683
5942
|
function SkillGroup({
|
|
5684
5943
|
label,
|
|
5685
5944
|
children
|
|
5686
5945
|
}) {
|
|
5687
|
-
return /* @__PURE__ */
|
|
5688
|
-
/* @__PURE__ */
|
|
5946
|
+
return /* @__PURE__ */ jsxs6("section", { "data-slot": "composer-skill-group", className: "space-y-1", children: [
|
|
5947
|
+
/* @__PURE__ */ jsx15("div", { className: "px-1.5 pt-1 text-xs font-normal text-muted-foreground", children: label }),
|
|
5689
5948
|
children
|
|
5690
5949
|
] });
|
|
5691
5950
|
}
|
|
@@ -5697,7 +5956,7 @@ function ActiveIndicator({
|
|
|
5697
5956
|
disabled,
|
|
5698
5957
|
onClick
|
|
5699
5958
|
}) {
|
|
5700
|
-
return /* @__PURE__ */
|
|
5959
|
+
return /* @__PURE__ */ jsxs6(
|
|
5701
5960
|
"button",
|
|
5702
5961
|
{
|
|
5703
5962
|
type: "button",
|
|
@@ -5709,28 +5968,28 @@ function ActiveIndicator({
|
|
|
5709
5968
|
roundedClass
|
|
5710
5969
|
),
|
|
5711
5970
|
children: [
|
|
5712
|
-
|
|
5713
|
-
/* @__PURE__ */
|
|
5714
|
-
/* @__PURE__ */
|
|
5971
|
+
React13.cloneElement(icon, { className: "mr-1.5 size-3.5" }),
|
|
5972
|
+
/* @__PURE__ */ jsx15("span", { children: label }),
|
|
5973
|
+
/* @__PURE__ */ jsx15(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" })
|
|
5715
5974
|
]
|
|
5716
5975
|
}
|
|
5717
5976
|
);
|
|
5718
5977
|
}
|
|
5719
5978
|
|
|
5720
5979
|
// src/components/composer/ModelPicker.tsx
|
|
5721
|
-
import * as
|
|
5980
|
+
import * as React14 from "react";
|
|
5722
5981
|
import { Bot as Bot2, ChevronDown, SlidersHorizontal as SlidersHorizontal2 } from "lucide-react";
|
|
5723
|
-
import { jsx as
|
|
5982
|
+
import { jsx as jsx16, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
5724
5983
|
function ModelProviderAvatar({
|
|
5725
5984
|
avatar,
|
|
5726
5985
|
className,
|
|
5727
5986
|
imageClassName,
|
|
5728
5987
|
iconClassName
|
|
5729
5988
|
}) {
|
|
5730
|
-
const [failedUrl, setFailedUrl] =
|
|
5989
|
+
const [failedUrl, setFailedUrl] = React14.useState(null);
|
|
5731
5990
|
const avatarUrl = avatar?.url;
|
|
5732
5991
|
const showImage = Boolean(avatarUrl && failedUrl !== avatarUrl);
|
|
5733
|
-
return /* @__PURE__ */
|
|
5992
|
+
return /* @__PURE__ */ jsx16(
|
|
5734
5993
|
"span",
|
|
5735
5994
|
{
|
|
5736
5995
|
"aria-hidden": "true",
|
|
@@ -5740,7 +5999,7 @@ function ModelProviderAvatar({
|
|
|
5740
5999
|
className
|
|
5741
6000
|
),
|
|
5742
6001
|
style: avatar?.background ? { backgroundColor: avatar.background } : void 0,
|
|
5743
|
-
children: showImage ? /* @__PURE__ */
|
|
6002
|
+
children: showImage ? /* @__PURE__ */ jsx16(
|
|
5744
6003
|
"img",
|
|
5745
6004
|
{
|
|
5746
6005
|
"data-slot": "model-provider-avatar-image",
|
|
@@ -5749,7 +6008,7 @@ function ModelProviderAvatar({
|
|
|
5749
6008
|
className: cn("size-full object-contain p-1", imageClassName),
|
|
5750
6009
|
onError: () => setFailedUrl(avatarUrl ?? null)
|
|
5751
6010
|
}
|
|
5752
|
-
) : /* @__PURE__ */
|
|
6011
|
+
) : /* @__PURE__ */ jsx16(Bot2, { "aria-hidden": "true", className: cn("size-3.5", iconClassName) })
|
|
5753
6012
|
}
|
|
5754
6013
|
);
|
|
5755
6014
|
}
|
|
@@ -5765,8 +6024,8 @@ function ModelPicker({
|
|
|
5765
6024
|
const selectedModel = enabledModels.find(
|
|
5766
6025
|
(model) => model.id === selectedModelId
|
|
5767
6026
|
);
|
|
5768
|
-
return /* @__PURE__ */
|
|
5769
|
-
/* @__PURE__ */
|
|
6027
|
+
return /* @__PURE__ */ jsxs7(DropdownMenu, { children: [
|
|
6028
|
+
/* @__PURE__ */ jsx16(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsxs7(
|
|
5770
6029
|
"button",
|
|
5771
6030
|
{
|
|
5772
6031
|
type: "button",
|
|
@@ -5780,7 +6039,7 @@ function ModelPicker({
|
|
|
5780
6039
|
"disabled:pointer-events-none disabled:opacity-50"
|
|
5781
6040
|
),
|
|
5782
6041
|
children: [
|
|
5783
|
-
/* @__PURE__ */
|
|
6042
|
+
/* @__PURE__ */ jsx16(
|
|
5784
6043
|
ModelProviderAvatar,
|
|
5785
6044
|
{
|
|
5786
6045
|
avatar: selectedModel?.avatar,
|
|
@@ -5789,8 +6048,8 @@ function ModelPicker({
|
|
|
5789
6048
|
iconClassName: "size-3"
|
|
5790
6049
|
}
|
|
5791
6050
|
),
|
|
5792
|
-
/* @__PURE__ */
|
|
5793
|
-
/* @__PURE__ */
|
|
6051
|
+
/* @__PURE__ */ jsx16("span", { className: "truncate", children: selectedModel?.label ?? copy.label }),
|
|
6052
|
+
/* @__PURE__ */ jsx16(
|
|
5794
6053
|
ChevronDown,
|
|
5795
6054
|
{
|
|
5796
6055
|
"aria-hidden": "true",
|
|
@@ -5800,7 +6059,7 @@ function ModelPicker({
|
|
|
5800
6059
|
]
|
|
5801
6060
|
}
|
|
5802
6061
|
) }),
|
|
5803
|
-
/* @__PURE__ */
|
|
6062
|
+
/* @__PURE__ */ jsxs7(
|
|
5804
6063
|
DropdownMenuContent,
|
|
5805
6064
|
{
|
|
5806
6065
|
align: "end",
|
|
@@ -5809,8 +6068,8 @@ function ModelPicker({
|
|
|
5809
6068
|
collisionPadding: 12,
|
|
5810
6069
|
className: "w-80 max-w-[calc(100vw-1.5rem)] overflow-hidden rounded-xl p-0",
|
|
5811
6070
|
children: [
|
|
5812
|
-
/* @__PURE__ */
|
|
5813
|
-
/* @__PURE__ */
|
|
6071
|
+
/* @__PURE__ */ jsxs7("div", { className: "flex items-start gap-3 px-3 py-3", children: [
|
|
6072
|
+
/* @__PURE__ */ jsx16(
|
|
5814
6073
|
ModelProviderAvatar,
|
|
5815
6074
|
{
|
|
5816
6075
|
avatar: selectedModel?.avatar,
|
|
@@ -5818,34 +6077,34 @@ function ModelPicker({
|
|
|
5818
6077
|
iconClassName: "size-4"
|
|
5819
6078
|
}
|
|
5820
6079
|
),
|
|
5821
|
-
/* @__PURE__ */
|
|
5822
|
-
/* @__PURE__ */
|
|
5823
|
-
/* @__PURE__ */
|
|
6080
|
+
/* @__PURE__ */ jsxs7("span", { className: "min-w-0 flex-1", children: [
|
|
6081
|
+
/* @__PURE__ */ jsx16("span", { className: "block text-sm font-semibold text-popover-foreground", children: copy.title }),
|
|
6082
|
+
/* @__PURE__ */ jsx16("span", { className: "mt-0.5 block text-xs leading-4 text-muted-foreground", children: copy.description })
|
|
5824
6083
|
] })
|
|
5825
6084
|
] }),
|
|
5826
|
-
/* @__PURE__ */
|
|
5827
|
-
/* @__PURE__ */
|
|
5828
|
-
/* @__PURE__ */
|
|
6085
|
+
/* @__PURE__ */ jsx16(DropdownMenuSeparator, { className: "mx-0 my-0" }),
|
|
6086
|
+
/* @__PURE__ */ jsx16(DropdownMenuLabel, { className: "px-3 pt-2.5 pb-1 text-[11px] font-semibold tracking-wide uppercase", children: copy.availableModels }),
|
|
6087
|
+
/* @__PURE__ */ jsx16(
|
|
5829
6088
|
DropdownMenuRadioGroup,
|
|
5830
6089
|
{
|
|
5831
6090
|
value: selectedModel?.id ?? "",
|
|
5832
6091
|
onValueChange: onSelect,
|
|
5833
6092
|
className: "space-y-0.5 px-1.5 pb-1.5",
|
|
5834
|
-
children: models.map((model) => /* @__PURE__ */
|
|
6093
|
+
children: models.map((model) => /* @__PURE__ */ jsxs7(
|
|
5835
6094
|
DropdownMenuRadioItem,
|
|
5836
6095
|
{
|
|
5837
6096
|
value: model.id,
|
|
5838
6097
|
disabled: model.disabled,
|
|
5839
6098
|
className: "min-h-12 cursor-pointer items-center gap-2.5 rounded-lg px-2 py-2 pr-9 data-disabled:cursor-not-allowed",
|
|
5840
6099
|
children: [
|
|
5841
|
-
/* @__PURE__ */
|
|
5842
|
-
/* @__PURE__ */
|
|
5843
|
-
/* @__PURE__ */
|
|
5844
|
-
/* @__PURE__ */
|
|
5845
|
-
model.default ? /* @__PURE__ */
|
|
5846
|
-
model.disabled ? /* @__PURE__ */
|
|
6100
|
+
/* @__PURE__ */ jsx16(ModelProviderAvatar, { avatar: model.avatar, className: "size-7" }),
|
|
6101
|
+
/* @__PURE__ */ jsxs7("span", { className: "min-w-0 flex-1", children: [
|
|
6102
|
+
/* @__PURE__ */ jsxs7("span", { className: "flex min-w-0 items-center gap-1.5", children: [
|
|
6103
|
+
/* @__PURE__ */ jsx16("span", { className: "truncate font-medium text-popover-foreground", children: model.label }),
|
|
6104
|
+
model.default ? /* @__PURE__ */ jsx16("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,
|
|
6105
|
+
model.disabled ? /* @__PURE__ */ jsx16("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
|
|
5847
6106
|
] }),
|
|
5848
|
-
model.description ? /* @__PURE__ */
|
|
6107
|
+
model.description ? /* @__PURE__ */ jsx16("span", { className: "mt-0.5 block truncate text-xs text-muted-foreground", children: model.description }) : null
|
|
5849
6108
|
] })
|
|
5850
6109
|
]
|
|
5851
6110
|
},
|
|
@@ -5853,26 +6112,26 @@ function ModelPicker({
|
|
|
5853
6112
|
))
|
|
5854
6113
|
}
|
|
5855
6114
|
),
|
|
5856
|
-
/* @__PURE__ */
|
|
5857
|
-
/* @__PURE__ */
|
|
6115
|
+
/* @__PURE__ */ jsx16(DropdownMenuSeparator, { className: "mx-0 my-0" }),
|
|
6116
|
+
/* @__PURE__ */ jsxs7(
|
|
5858
6117
|
"div",
|
|
5859
6118
|
{
|
|
5860
6119
|
"data-slot": "model-picker-future-controls",
|
|
5861
6120
|
className: "flex items-center gap-2.5 bg-muted/30 px-3 py-2.5",
|
|
5862
6121
|
"aria-disabled": "true",
|
|
5863
6122
|
children: [
|
|
5864
|
-
/* @__PURE__ */
|
|
6123
|
+
/* @__PURE__ */ jsx16(
|
|
5865
6124
|
SlidersHorizontal2,
|
|
5866
6125
|
{
|
|
5867
6126
|
"aria-hidden": "true",
|
|
5868
6127
|
className: "size-4 shrink-0 text-muted-foreground"
|
|
5869
6128
|
}
|
|
5870
6129
|
),
|
|
5871
|
-
/* @__PURE__ */
|
|
5872
|
-
/* @__PURE__ */
|
|
5873
|
-
/* @__PURE__ */
|
|
6130
|
+
/* @__PURE__ */ jsxs7("span", { className: "min-w-0 flex-1", children: [
|
|
6131
|
+
/* @__PURE__ */ jsx16("span", { className: "block text-xs font-medium text-popover-foreground", children: copy.futureTitle }),
|
|
6132
|
+
/* @__PURE__ */ jsx16("span", { className: "block truncate text-[11px] text-muted-foreground", children: copy.futureDescription })
|
|
5874
6133
|
] }),
|
|
5875
|
-
/* @__PURE__ */
|
|
6134
|
+
/* @__PURE__ */ jsx16("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 })
|
|
5876
6135
|
]
|
|
5877
6136
|
}
|
|
5878
6137
|
)
|
|
@@ -5883,9 +6142,9 @@ function ModelPicker({
|
|
|
5883
6142
|
}
|
|
5884
6143
|
|
|
5885
6144
|
// src/components/composer/WorkspaceFileMentionPalette.tsx
|
|
5886
|
-
import * as
|
|
6145
|
+
import * as React15 from "react";
|
|
5887
6146
|
import { FileText as FileText2, Loader2 as Loader22 } from "lucide-react";
|
|
5888
|
-
import { jsx as
|
|
6147
|
+
import { jsx as jsx17, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
5889
6148
|
var WORKSPACE_FILE_LIST_DEPTH = 12;
|
|
5890
6149
|
function getWorkspaceFilePath(file) {
|
|
5891
6150
|
return file.fullPath?.trim() || file.filePath.trim();
|
|
@@ -5897,7 +6156,7 @@ function flattenWorkspaceFiles(files) {
|
|
|
5897
6156
|
return [...isDirectory ? [] : [file], ...flattenWorkspaceFiles(children)];
|
|
5898
6157
|
});
|
|
5899
6158
|
}
|
|
5900
|
-
var WorkspaceFileMentionPalette =
|
|
6159
|
+
var WorkspaceFileMentionPalette = React15.forwardRef(function WorkspaceFileMentionPalette2({
|
|
5901
6160
|
client,
|
|
5902
6161
|
assistantId,
|
|
5903
6162
|
projectId,
|
|
@@ -5907,14 +6166,14 @@ var WorkspaceFileMentionPalette = React14.forwardRef(function WorkspaceFileMenti
|
|
|
5907
6166
|
className
|
|
5908
6167
|
}, ref) {
|
|
5909
6168
|
const { t } = useChatkitTranslation();
|
|
5910
|
-
const [files, setFiles] =
|
|
5911
|
-
const [loading, setLoading] =
|
|
5912
|
-
const [error, setError] =
|
|
5913
|
-
const [activeIndex, setActiveIndex] =
|
|
5914
|
-
const activeIndexRef =
|
|
5915
|
-
const optionRefs =
|
|
6169
|
+
const [files, setFiles] = React15.useState([]);
|
|
6170
|
+
const [loading, setLoading] = React15.useState(false);
|
|
6171
|
+
const [error, setError] = React15.useState(null);
|
|
6172
|
+
const [activeIndex, setActiveIndex] = React15.useState(0);
|
|
6173
|
+
const activeIndexRef = React15.useRef(0);
|
|
6174
|
+
const optionRefs = React15.useRef([]);
|
|
5916
6175
|
const loadErrorMessage = t("composer.fileMentions.loadError");
|
|
5917
|
-
|
|
6176
|
+
React15.useEffect(() => {
|
|
5918
6177
|
if (!client || !projectId && !assistantId) {
|
|
5919
6178
|
setFiles([]);
|
|
5920
6179
|
setLoading(false);
|
|
@@ -5946,7 +6205,7 @@ var WorkspaceFileMentionPalette = React14.forwardRef(function WorkspaceFileMenti
|
|
|
5946
6205
|
return () => controller.abort();
|
|
5947
6206
|
}, [assistantId, client, loadErrorMessage, projectId]);
|
|
5948
6207
|
const normalizedQuery = query.trim().toLocaleLowerCase();
|
|
5949
|
-
const visibleFiles =
|
|
6208
|
+
const visibleFiles = React15.useMemo(
|
|
5950
6209
|
() => files.filter((file) => {
|
|
5951
6210
|
const filePath = getWorkspaceFilePath(file);
|
|
5952
6211
|
if (selectedFilePaths.has(filePath)) return false;
|
|
@@ -5955,17 +6214,17 @@ var WorkspaceFileMentionPalette = React14.forwardRef(function WorkspaceFileMenti
|
|
|
5955
6214
|
}),
|
|
5956
6215
|
[files, normalizedQuery, selectedFilePaths]
|
|
5957
6216
|
);
|
|
5958
|
-
|
|
6217
|
+
React15.useLayoutEffect(() => {
|
|
5959
6218
|
setActiveIndex((current) => {
|
|
5960
6219
|
const nextIndex = visibleFiles.length === 0 ? 0 : Math.min(current, visibleFiles.length - 1);
|
|
5961
6220
|
activeIndexRef.current = nextIndex;
|
|
5962
6221
|
return nextIndex;
|
|
5963
6222
|
});
|
|
5964
6223
|
}, [visibleFiles.length]);
|
|
5965
|
-
|
|
6224
|
+
React15.useEffect(() => {
|
|
5966
6225
|
optionRefs.current[activeIndex]?.scrollIntoView?.({ block: "nearest" });
|
|
5967
6226
|
}, [activeIndex]);
|
|
5968
|
-
|
|
6227
|
+
React15.useImperativeHandle(
|
|
5969
6228
|
ref,
|
|
5970
6229
|
() => ({
|
|
5971
6230
|
moveActive: (direction) => {
|
|
@@ -5984,7 +6243,7 @@ var WorkspaceFileMentionPalette = React14.forwardRef(function WorkspaceFileMenti
|
|
|
5984
6243
|
[onSelect, visibleFiles]
|
|
5985
6244
|
);
|
|
5986
6245
|
const unavailable = !client || !projectId && !assistantId;
|
|
5987
|
-
return /* @__PURE__ */
|
|
6246
|
+
return /* @__PURE__ */ jsxs8(
|
|
5988
6247
|
"div",
|
|
5989
6248
|
{
|
|
5990
6249
|
"data-slot": "workspace-file-mention-palette",
|
|
@@ -5993,20 +6252,20 @@ var WorkspaceFileMentionPalette = React14.forwardRef(function WorkspaceFileMenti
|
|
|
5993
6252
|
className
|
|
5994
6253
|
),
|
|
5995
6254
|
children: [
|
|
5996
|
-
/* @__PURE__ */
|
|
6255
|
+
/* @__PURE__ */ jsxs8("div", { className: "border-b border-border px-3 py-2 text-xs font-medium text-muted-foreground", children: [
|
|
5997
6256
|
t("composer.fileMentions.title"),
|
|
5998
|
-
query ? /* @__PURE__ */
|
|
6257
|
+
query ? /* @__PURE__ */ jsxs8("span", { className: "ml-1 text-foreground", children: [
|
|
5999
6258
|
"@",
|
|
6000
6259
|
query
|
|
6001
6260
|
] }) : null
|
|
6002
6261
|
] }),
|
|
6003
|
-
/* @__PURE__ */
|
|
6004
|
-
/* @__PURE__ */
|
|
6262
|
+
/* @__PURE__ */ jsx17("div", { className: "max-h-56 overflow-y-auto p-1", children: unavailable ? /* @__PURE__ */ jsx17(PaletteMessage, { children: t("composer.fileMentions.unavailable") }) : loading ? /* @__PURE__ */ jsxs8(PaletteMessage, { children: [
|
|
6263
|
+
/* @__PURE__ */ jsx17(Loader22, { className: "size-4 animate-spin" }),
|
|
6005
6264
|
t("composer.fileMentions.loading")
|
|
6006
|
-
] }) : error ? /* @__PURE__ */
|
|
6265
|
+
] }) : error ? /* @__PURE__ */ jsx17(PaletteMessage, { role: "alert", children: error }) : visibleFiles.length === 0 ? /* @__PURE__ */ jsx17(PaletteMessage, { children: t("composer.fileMentions.empty") }) : visibleFiles.map((file, index) => {
|
|
6007
6266
|
const filePath = getWorkspaceFilePath(file);
|
|
6008
6267
|
const label = file.filePath || filePath;
|
|
6009
|
-
return /* @__PURE__ */
|
|
6268
|
+
return /* @__PURE__ */ jsxs8(
|
|
6010
6269
|
"button",
|
|
6011
6270
|
{
|
|
6012
6271
|
ref: (node) => {
|
|
@@ -6027,10 +6286,10 @@ var WorkspaceFileMentionPalette = React14.forwardRef(function WorkspaceFileMenti
|
|
|
6027
6286
|
index === activeIndex && "bg-muted"
|
|
6028
6287
|
),
|
|
6029
6288
|
children: [
|
|
6030
|
-
/* @__PURE__ */
|
|
6031
|
-
/* @__PURE__ */
|
|
6032
|
-
/* @__PURE__ */
|
|
6033
|
-
filePath || file.mimeType ? /* @__PURE__ */
|
|
6289
|
+
/* @__PURE__ */ jsx17("span", { className: "flex size-8 shrink-0 items-center justify-center rounded-md bg-background text-muted-foreground", children: /* @__PURE__ */ jsx17(FileText2, { className: "size-4" }) }),
|
|
6290
|
+
/* @__PURE__ */ jsxs8("span", { className: "min-w-0 flex-1", children: [
|
|
6291
|
+
/* @__PURE__ */ jsx17("span", { className: "block truncate font-medium", children: label }),
|
|
6292
|
+
filePath || file.mimeType ? /* @__PURE__ */ jsx17("span", { className: "block truncate text-xs text-muted-foreground", children: filePath || file.mimeType }) : null
|
|
6034
6293
|
] })
|
|
6035
6294
|
]
|
|
6036
6295
|
},
|
|
@@ -6045,7 +6304,7 @@ function PaletteMessage({
|
|
|
6045
6304
|
children,
|
|
6046
6305
|
role
|
|
6047
6306
|
}) {
|
|
6048
|
-
return /* @__PURE__ */
|
|
6307
|
+
return /* @__PURE__ */ jsx17(
|
|
6049
6308
|
"div",
|
|
6050
6309
|
{
|
|
6051
6310
|
role,
|
|
@@ -6056,7 +6315,7 @@ function PaletteMessage({
|
|
|
6056
6315
|
}
|
|
6057
6316
|
|
|
6058
6317
|
// src/components/composer/ProjectSelector.tsx
|
|
6059
|
-
import * as
|
|
6318
|
+
import * as React17 from "react";
|
|
6060
6319
|
import {
|
|
6061
6320
|
Check as Check2,
|
|
6062
6321
|
ChevronDown as ChevronDown2,
|
|
@@ -6070,16 +6329,16 @@ import {
|
|
|
6070
6329
|
// src/components/ui/popover.tsx
|
|
6071
6330
|
import "react";
|
|
6072
6331
|
import * as PopoverPrimitive from "@radix-ui/react-popover";
|
|
6073
|
-
import { jsx as
|
|
6332
|
+
import { jsx as jsx18 } from "react/jsx-runtime";
|
|
6074
6333
|
function Popover({
|
|
6075
6334
|
...props
|
|
6076
6335
|
}) {
|
|
6077
|
-
return /* @__PURE__ */
|
|
6336
|
+
return /* @__PURE__ */ jsx18(PopoverPrimitive.Root, { "data-slot": "popover", ...props });
|
|
6078
6337
|
}
|
|
6079
6338
|
function PopoverTrigger({
|
|
6080
6339
|
...props
|
|
6081
6340
|
}) {
|
|
6082
|
-
return /* @__PURE__ */
|
|
6341
|
+
return /* @__PURE__ */ jsx18(PopoverPrimitive.Trigger, { "data-slot": "popover-trigger", ...props });
|
|
6083
6342
|
}
|
|
6084
6343
|
function PopoverContent({
|
|
6085
6344
|
className,
|
|
@@ -6087,7 +6346,7 @@ function PopoverContent({
|
|
|
6087
6346
|
sideOffset = 4,
|
|
6088
6347
|
...props
|
|
6089
6348
|
}) {
|
|
6090
|
-
return /* @__PURE__ */
|
|
6349
|
+
return /* @__PURE__ */ jsx18(PopoverPrimitive.Portal, { children: /* @__PURE__ */ jsx18(
|
|
6091
6350
|
PopoverPrimitive.Content,
|
|
6092
6351
|
{
|
|
6093
6352
|
"data-slot": "popover-content",
|
|
@@ -6103,7 +6362,7 @@ function PopoverContent({
|
|
|
6103
6362
|
}
|
|
6104
6363
|
|
|
6105
6364
|
// src/components/composer/ProjectSelector.tsx
|
|
6106
|
-
import { Fragment, jsx as
|
|
6365
|
+
import { Fragment as Fragment2, jsx as jsx19, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
6107
6366
|
var PROJECT_PAGE_SIZE = 100;
|
|
6108
6367
|
async function listAllAvailableProjects(projectsClient, xpertId, signal) {
|
|
6109
6368
|
const projects = [];
|
|
@@ -6137,20 +6396,20 @@ function ProjectSelector({
|
|
|
6137
6396
|
}) {
|
|
6138
6397
|
const { t } = useChatkitTranslation();
|
|
6139
6398
|
const { theme } = useTheme();
|
|
6140
|
-
const [open, setOpen] =
|
|
6141
|
-
const [query, setQuery] =
|
|
6142
|
-
const [createMode, setCreateMode] =
|
|
6143
|
-
const [newProjectName, setNewProjectName] =
|
|
6144
|
-
const [projects, setProjects] =
|
|
6145
|
-
const [loadFailed, setLoadFailed] =
|
|
6146
|
-
const [loadedFor, setLoadedFor] =
|
|
6399
|
+
const [open, setOpen] = React17.useState(false);
|
|
6400
|
+
const [query, setQuery] = React17.useState("");
|
|
6401
|
+
const [createMode, setCreateMode] = React17.useState(false);
|
|
6402
|
+
const [newProjectName, setNewProjectName] = React17.useState("");
|
|
6403
|
+
const [projects, setProjects] = React17.useState([]);
|
|
6404
|
+
const [loadFailed, setLoadFailed] = React17.useState(false);
|
|
6405
|
+
const [loadedFor, setLoadedFor] = React17.useState(null);
|
|
6147
6406
|
const panelRoundedClass = getPanelRoundedClass(theme.radius);
|
|
6148
6407
|
const menuItemRoundedClass = getMenuItemRoundedClass(theme.radius);
|
|
6149
6408
|
const lockedProjectLabel = label?.trim();
|
|
6150
|
-
|
|
6409
|
+
React17.useEffect(() => {
|
|
6151
6410
|
if (disabled) setOpen(false);
|
|
6152
6411
|
}, [disabled]);
|
|
6153
|
-
|
|
6412
|
+
React17.useEffect(() => {
|
|
6154
6413
|
if (locked) {
|
|
6155
6414
|
setProjects([]);
|
|
6156
6415
|
setLoadFailed(false);
|
|
@@ -6190,12 +6449,12 @@ function ProjectSelector({
|
|
|
6190
6449
|
});
|
|
6191
6450
|
return () => controller.abort();
|
|
6192
6451
|
}, [client, locked, xpertId]);
|
|
6193
|
-
const activeProject =
|
|
6452
|
+
const activeProject = React17.useMemo(
|
|
6194
6453
|
() => projects.find((project) => project.id === activeProjectId) ?? null,
|
|
6195
6454
|
[activeProjectId, projects]
|
|
6196
6455
|
);
|
|
6197
6456
|
const normalizedQuery = query.trim().toLocaleLowerCase();
|
|
6198
|
-
const filteredProjects =
|
|
6457
|
+
const filteredProjects = React17.useMemo(
|
|
6199
6458
|
() => projects.filter((project) => {
|
|
6200
6459
|
if (!normalizedQuery) return true;
|
|
6201
6460
|
return project.name.toLocaleLowerCase().includes(normalizedQuery);
|
|
@@ -6205,24 +6464,24 @@ function ProjectSelector({
|
|
|
6205
6464
|
const hasAvailableProjects = locked ? Boolean(activeProjectId) : loadedFor?.client === client && loadedFor.xpertId === xpertId && !loadFailed && projects.length > 0;
|
|
6206
6465
|
const projectRailAvailable = hasAvailableProjects || Boolean(onProjectCreate);
|
|
6207
6466
|
const isLoadingProjects = !locked && Boolean(client && xpertId) && loadedFor === null && !loadFailed;
|
|
6208
|
-
|
|
6467
|
+
React17.useEffect(() => {
|
|
6209
6468
|
onAvailabilityChange?.(projectRailAvailable);
|
|
6210
6469
|
}, [onAvailabilityChange, projectRailAvailable]);
|
|
6211
6470
|
if (locked && activeProjectId) {
|
|
6212
|
-
return /* @__PURE__ */
|
|
6471
|
+
return /* @__PURE__ */ jsx19(
|
|
6213
6472
|
"div",
|
|
6214
6473
|
{
|
|
6215
6474
|
"data-slot": "composer-project-rail",
|
|
6216
6475
|
className: "flex h-10 min-w-0 items-center px-1",
|
|
6217
|
-
children: /* @__PURE__ */
|
|
6476
|
+
children: /* @__PURE__ */ jsxs9(
|
|
6218
6477
|
"div",
|
|
6219
6478
|
{
|
|
6220
6479
|
"data-slot": "composer-project-locked",
|
|
6221
6480
|
className: "inline-flex h-5 max-w-full items-center gap-1.5 rounded-sm px-2 text-sm text-muted-foreground",
|
|
6222
6481
|
title: lockedProjectLabel || activeProjectId,
|
|
6223
6482
|
children: [
|
|
6224
|
-
/* @__PURE__ */
|
|
6225
|
-
/* @__PURE__ */
|
|
6483
|
+
/* @__PURE__ */ jsx19(FolderLock, { className: "size-3.5 shrink-0" }),
|
|
6484
|
+
/* @__PURE__ */ jsx19("span", { className: "truncate", children: lockedProjectLabel || activeProjectId })
|
|
6226
6485
|
]
|
|
6227
6486
|
}
|
|
6228
6487
|
)
|
|
@@ -6230,12 +6489,12 @@ function ProjectSelector({
|
|
|
6230
6489
|
);
|
|
6231
6490
|
}
|
|
6232
6491
|
if (!projectRailAvailable) return null;
|
|
6233
|
-
return /* @__PURE__ */
|
|
6492
|
+
return /* @__PURE__ */ jsx19(
|
|
6234
6493
|
"div",
|
|
6235
6494
|
{
|
|
6236
6495
|
"data-slot": "composer-project-rail",
|
|
6237
6496
|
className: "flex h-10 min-w-0 items-center px-1",
|
|
6238
|
-
children: /* @__PURE__ */
|
|
6497
|
+
children: /* @__PURE__ */ jsxs9(
|
|
6239
6498
|
Popover,
|
|
6240
6499
|
{
|
|
6241
6500
|
open,
|
|
@@ -6248,7 +6507,7 @@ function ProjectSelector({
|
|
|
6248
6507
|
}
|
|
6249
6508
|
},
|
|
6250
6509
|
children: [
|
|
6251
|
-
/* @__PURE__ */
|
|
6510
|
+
/* @__PURE__ */ jsx19(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxs9(
|
|
6252
6511
|
"button",
|
|
6253
6512
|
{
|
|
6254
6513
|
type: "button",
|
|
@@ -6256,13 +6515,13 @@ function ProjectSelector({
|
|
|
6256
6515
|
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",
|
|
6257
6516
|
"aria-label": t("composer.projects.select"),
|
|
6258
6517
|
children: [
|
|
6259
|
-
/* @__PURE__ */
|
|
6260
|
-
/* @__PURE__ */
|
|
6261
|
-
/* @__PURE__ */
|
|
6518
|
+
/* @__PURE__ */ jsx19(Folder, { className: "size-3.5 shrink-0" }),
|
|
6519
|
+
/* @__PURE__ */ jsx19("span", { className: "truncate", children: activeProject?.name ?? t("composer.projects.select") }),
|
|
6520
|
+
/* @__PURE__ */ jsx19(ChevronDown2, { className: "size-3.5 shrink-0" })
|
|
6262
6521
|
]
|
|
6263
6522
|
}
|
|
6264
6523
|
) }),
|
|
6265
|
-
/* @__PURE__ */
|
|
6524
|
+
/* @__PURE__ */ jsx19(
|
|
6266
6525
|
PopoverContent,
|
|
6267
6526
|
{
|
|
6268
6527
|
side: "top",
|
|
@@ -6270,15 +6529,15 @@ function ProjectSelector({
|
|
|
6270
6529
|
sideOffset: 8,
|
|
6271
6530
|
collisionPadding: 8,
|
|
6272
6531
|
className: cn(
|
|
6273
|
-
"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",
|
|
6532
|
+
"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",
|
|
6274
6533
|
panelRoundedClass
|
|
6275
6534
|
),
|
|
6276
|
-
children: /* @__PURE__ */
|
|
6535
|
+
children: /* @__PURE__ */ jsx19(
|
|
6277
6536
|
"div",
|
|
6278
6537
|
{
|
|
6279
6538
|
"data-slot": "composer-project-command",
|
|
6280
|
-
className: "flex
|
|
6281
|
-
children: createMode ? /* @__PURE__ */
|
|
6539
|
+
className: "flex min-h-0 w-full flex-col overflow-hidden",
|
|
6540
|
+
children: createMode ? /* @__PURE__ */ jsxs9(
|
|
6282
6541
|
"form",
|
|
6283
6542
|
{
|
|
6284
6543
|
"data-slot": "composer-project-create-form",
|
|
@@ -6291,7 +6550,7 @@ function ProjectSelector({
|
|
|
6291
6550
|
setOpen(false);
|
|
6292
6551
|
},
|
|
6293
6552
|
children: [
|
|
6294
|
-
/* @__PURE__ */
|
|
6553
|
+
/* @__PURE__ */ jsx19(
|
|
6295
6554
|
Input,
|
|
6296
6555
|
{
|
|
6297
6556
|
autoFocus: true,
|
|
@@ -6306,8 +6565,8 @@ function ProjectSelector({
|
|
|
6306
6565
|
)
|
|
6307
6566
|
}
|
|
6308
6567
|
),
|
|
6309
|
-
/* @__PURE__ */
|
|
6310
|
-
/* @__PURE__ */
|
|
6568
|
+
/* @__PURE__ */ jsxs9("div", { className: "flex justify-end gap-2", children: [
|
|
6569
|
+
/* @__PURE__ */ jsx19(
|
|
6311
6570
|
"button",
|
|
6312
6571
|
{
|
|
6313
6572
|
type: "button",
|
|
@@ -6319,7 +6578,7 @@ function ProjectSelector({
|
|
|
6319
6578
|
children: t("composer.projects.cancel")
|
|
6320
6579
|
}
|
|
6321
6580
|
),
|
|
6322
|
-
/* @__PURE__ */
|
|
6581
|
+
/* @__PURE__ */ jsx19(
|
|
6323
6582
|
"button",
|
|
6324
6583
|
{
|
|
6325
6584
|
type: "submit",
|
|
@@ -6331,15 +6590,15 @@ function ProjectSelector({
|
|
|
6331
6590
|
] })
|
|
6332
6591
|
]
|
|
6333
6592
|
}
|
|
6334
|
-
) : /* @__PURE__ */
|
|
6335
|
-
/* @__PURE__ */
|
|
6593
|
+
) : /* @__PURE__ */ jsxs9(Fragment2, { children: [
|
|
6594
|
+
/* @__PURE__ */ jsxs9(
|
|
6336
6595
|
"div",
|
|
6337
6596
|
{
|
|
6338
6597
|
"data-slot": "composer-project-search",
|
|
6339
|
-
className: "relative mb-2",
|
|
6598
|
+
className: "relative mb-2 shrink-0",
|
|
6340
6599
|
children: [
|
|
6341
|
-
/* @__PURE__ */
|
|
6342
|
-
/* @__PURE__ */
|
|
6600
|
+
/* @__PURE__ */ jsx19(Search3, { className: "pointer-events-none absolute left-3 top-1/2 z-10 size-4 -translate-y-1/2 text-muted-foreground" }),
|
|
6601
|
+
/* @__PURE__ */ jsx19(
|
|
6343
6602
|
Input,
|
|
6344
6603
|
{
|
|
6345
6604
|
autoFocus: true,
|
|
@@ -6355,70 +6614,77 @@ function ProjectSelector({
|
|
|
6355
6614
|
]
|
|
6356
6615
|
}
|
|
6357
6616
|
),
|
|
6358
|
-
/* @__PURE__ */
|
|
6617
|
+
/* @__PURE__ */ jsx19(
|
|
6359
6618
|
"div",
|
|
6360
6619
|
{
|
|
6361
|
-
"data-slot": "composer-project-
|
|
6362
|
-
className: "
|
|
6363
|
-
children:
|
|
6364
|
-
|
|
6365
|
-
|
|
6366
|
-
|
|
6367
|
-
|
|
6368
|
-
|
|
6369
|
-
|
|
6370
|
-
"
|
|
6371
|
-
|
|
6372
|
-
|
|
6373
|
-
|
|
6374
|
-
|
|
6375
|
-
|
|
6376
|
-
|
|
6377
|
-
|
|
6378
|
-
|
|
6379
|
-
|
|
6380
|
-
|
|
6381
|
-
|
|
6382
|
-
|
|
6383
|
-
|
|
6384
|
-
|
|
6385
|
-
|
|
6386
|
-
|
|
6387
|
-
type: "button",
|
|
6388
|
-
"data-slot": "composer-project-item",
|
|
6389
|
-
className: cn(
|
|
6390
|
-
"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",
|
|
6391
|
-
menuItemRoundedClass,
|
|
6392
|
-
project.id === activeProjectId && "bg-accent text-accent-foreground"
|
|
6393
|
-
),
|
|
6394
|
-
onClick: () => {
|
|
6395
|
-
if (disabled) return;
|
|
6396
|
-
if (project.id !== activeProjectId) {
|
|
6397
|
-
onProjectChange?.(project.id);
|
|
6620
|
+
"data-slot": "composer-project-scroll-region",
|
|
6621
|
+
className: "min-h-0 flex-1 max-h-75 overflow-y-auto overscroll-contain",
|
|
6622
|
+
children: /* @__PURE__ */ jsxs9(
|
|
6623
|
+
"div",
|
|
6624
|
+
{
|
|
6625
|
+
"data-slot": "composer-project-list",
|
|
6626
|
+
className: "flex flex-col",
|
|
6627
|
+
children: [
|
|
6628
|
+
activeProjectId && !normalizedQuery ? /* @__PURE__ */ jsxs9(
|
|
6629
|
+
"button",
|
|
6630
|
+
{
|
|
6631
|
+
type: "button",
|
|
6632
|
+
"data-slot": "composer-project-clear",
|
|
6633
|
+
className: cn(
|
|
6634
|
+
"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",
|
|
6635
|
+
menuItemRoundedClass
|
|
6636
|
+
),
|
|
6637
|
+
onClick: () => {
|
|
6638
|
+
if (disabled) return;
|
|
6639
|
+
onProjectChange?.(null);
|
|
6640
|
+
setOpen(false);
|
|
6641
|
+
},
|
|
6642
|
+
children: [
|
|
6643
|
+
/* @__PURE__ */ jsx19(FolderX, { className: "size-5 shrink-0 text-muted-foreground" }),
|
|
6644
|
+
/* @__PURE__ */ jsx19("span", { className: "min-w-0 flex-1 truncate font-normal", children: t("composer.projects.none") })
|
|
6645
|
+
]
|
|
6398
6646
|
}
|
|
6399
|
-
|
|
6400
|
-
},
|
|
6401
|
-
|
|
6402
|
-
|
|
6403
|
-
|
|
6404
|
-
|
|
6405
|
-
|
|
6406
|
-
|
|
6407
|
-
|
|
6408
|
-
|
|
6409
|
-
|
|
6647
|
+
) : null,
|
|
6648
|
+
isLoadingProjects ? /* @__PURE__ */ jsx19(ProjectMessage, { children: t("composer.projects.loading") }) : loadFailed ? /* @__PURE__ */ jsx19(ProjectMessage, { children: t("composer.projects.loadError") }) : filteredProjects.length === 0 ? /* @__PURE__ */ jsx19(ProjectMessage, { children: t("composer.projects.empty") }) : filteredProjects.map((project) => /* @__PURE__ */ jsxs9(
|
|
6649
|
+
"button",
|
|
6650
|
+
{
|
|
6651
|
+
type: "button",
|
|
6652
|
+
"data-slot": "composer-project-item",
|
|
6653
|
+
className: cn(
|
|
6654
|
+
"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",
|
|
6655
|
+
menuItemRoundedClass,
|
|
6656
|
+
project.id === activeProjectId && "bg-accent text-accent-foreground"
|
|
6657
|
+
),
|
|
6658
|
+
onClick: () => {
|
|
6659
|
+
if (disabled) return;
|
|
6660
|
+
if (project.id !== activeProjectId) {
|
|
6661
|
+
onProjectChange?.(project.id);
|
|
6662
|
+
}
|
|
6663
|
+
setOpen(false);
|
|
6664
|
+
},
|
|
6665
|
+
children: [
|
|
6666
|
+
/* @__PURE__ */ jsx19(Folder, { className: "size-5 shrink-0 text-muted-foreground" }),
|
|
6667
|
+
/* @__PURE__ */ jsx19("span", { className: "min-w-0 flex-1 truncate font-normal", children: project.name }),
|
|
6668
|
+
project.id === activeProjectId ? /* @__PURE__ */ jsx19(Check2, { className: "size-4 shrink-0" }) : null
|
|
6669
|
+
]
|
|
6670
|
+
},
|
|
6671
|
+
project.id
|
|
6672
|
+
))
|
|
6673
|
+
]
|
|
6674
|
+
}
|
|
6675
|
+
)
|
|
6410
6676
|
}
|
|
6411
|
-
)
|
|
6412
|
-
onProjectCreate ? /* @__PURE__ */
|
|
6677
|
+
),
|
|
6678
|
+
onProjectCreate ? /* @__PURE__ */ jsxs9(
|
|
6413
6679
|
"button",
|
|
6414
6680
|
{
|
|
6415
6681
|
type: "button",
|
|
6416
6682
|
"data-slot": "composer-project-create",
|
|
6417
|
-
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",
|
|
6683
|
+
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",
|
|
6418
6684
|
onClick: () => setCreateMode(true),
|
|
6419
6685
|
children: [
|
|
6420
|
-
/* @__PURE__ */
|
|
6421
|
-
/* @__PURE__ */
|
|
6686
|
+
/* @__PURE__ */ jsx19(Plus2, { className: "size-4 shrink-0" }),
|
|
6687
|
+
/* @__PURE__ */ jsx19("span", { children: t("composer.projects.new") })
|
|
6422
6688
|
]
|
|
6423
6689
|
}
|
|
6424
6690
|
) : null
|
|
@@ -6434,77 +6700,11 @@ function ProjectSelector({
|
|
|
6434
6700
|
);
|
|
6435
6701
|
}
|
|
6436
6702
|
function ProjectMessage({ children }) {
|
|
6437
|
-
return /* @__PURE__ */
|
|
6703
|
+
return /* @__PURE__ */ jsx19("div", { className: "flex min-h-24 items-center justify-center px-4 text-center text-sm text-muted-foreground", children });
|
|
6438
6704
|
}
|
|
6439
6705
|
|
|
6440
6706
|
// src/components/composer/SendButton.tsx
|
|
6441
6707
|
import { ArrowUp, Square } from "lucide-react";
|
|
6442
|
-
|
|
6443
|
-
// src/components/ui/tooltip.tsx
|
|
6444
|
-
import "react";
|
|
6445
|
-
import * as TooltipPrimitive from "@radix-ui/react-tooltip";
|
|
6446
|
-
import { jsx as jsx19, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
6447
|
-
function TooltipProvider({
|
|
6448
|
-
delayDuration = 0,
|
|
6449
|
-
...props
|
|
6450
|
-
}) {
|
|
6451
|
-
return /* @__PURE__ */ jsx19(
|
|
6452
|
-
TooltipPrimitive.Provider,
|
|
6453
|
-
{
|
|
6454
|
-
"data-slot": "tooltip-provider",
|
|
6455
|
-
delayDuration,
|
|
6456
|
-
...props
|
|
6457
|
-
}
|
|
6458
|
-
);
|
|
6459
|
-
}
|
|
6460
|
-
function Tooltip({
|
|
6461
|
-
...props
|
|
6462
|
-
}) {
|
|
6463
|
-
return /* @__PURE__ */ jsx19(TooltipProvider, { children: /* @__PURE__ */ jsx19(
|
|
6464
|
-
TooltipPrimitive.Root,
|
|
6465
|
-
{
|
|
6466
|
-
"data-slot": "tooltip",
|
|
6467
|
-
...props
|
|
6468
|
-
}
|
|
6469
|
-
) });
|
|
6470
|
-
}
|
|
6471
|
-
function TooltipTrigger({
|
|
6472
|
-
...props
|
|
6473
|
-
}) {
|
|
6474
|
-
return /* @__PURE__ */ jsx19(
|
|
6475
|
-
TooltipPrimitive.Trigger,
|
|
6476
|
-
{
|
|
6477
|
-
"data-slot": "tooltip-trigger",
|
|
6478
|
-
...props
|
|
6479
|
-
}
|
|
6480
|
-
);
|
|
6481
|
-
}
|
|
6482
|
-
function TooltipContent({
|
|
6483
|
-
className,
|
|
6484
|
-
sideOffset = 0,
|
|
6485
|
-
hideArrow = false,
|
|
6486
|
-
children,
|
|
6487
|
-
...props
|
|
6488
|
-
}) {
|
|
6489
|
-
return /* @__PURE__ */ jsx19(TooltipPrimitive.Portal, { children: /* @__PURE__ */ jsxs9(
|
|
6490
|
-
TooltipPrimitive.Content,
|
|
6491
|
-
{
|
|
6492
|
-
"data-slot": "tooltip-content",
|
|
6493
|
-
sideOffset,
|
|
6494
|
-
className: cn(
|
|
6495
|
-
"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",
|
|
6496
|
-
className
|
|
6497
|
-
),
|
|
6498
|
-
...props,
|
|
6499
|
-
children: [
|
|
6500
|
-
children,
|
|
6501
|
-
!hideArrow ? /* @__PURE__ */ jsx19(TooltipPrimitive.Arrow, { className: "bg-primary fill-primary z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]" }) : null
|
|
6502
|
-
]
|
|
6503
|
-
}
|
|
6504
|
-
) });
|
|
6505
|
-
}
|
|
6506
|
-
|
|
6507
|
-
// src/components/composer/SendButton.tsx
|
|
6508
6708
|
import { jsx as jsx20, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
6509
6709
|
function SendButton({
|
|
6510
6710
|
disabled = false,
|
|
@@ -7037,7 +7237,7 @@ import * as React21 from "react";
|
|
|
7037
7237
|
import {
|
|
7038
7238
|
CornerDownLeft,
|
|
7039
7239
|
Ellipsis,
|
|
7040
|
-
Info,
|
|
7240
|
+
Info as Info2,
|
|
7041
7241
|
PencilLine,
|
|
7042
7242
|
Trash2 as Trash22
|
|
7043
7243
|
} from "lucide-react";
|
|
@@ -7228,7 +7428,7 @@ function PendingFollowUps({
|
|
|
7228
7428
|
] })
|
|
7229
7429
|
] }),
|
|
7230
7430
|
/* @__PURE__ */ jsxs14("div", { className: "flex items-center gap-1.5 text-[10px] leading-4 text-muted-foreground", children: [
|
|
7231
|
-
/* @__PURE__ */ jsx24(
|
|
7431
|
+
/* @__PURE__ */ jsx24(Info2, { className: "h-3 w-3 shrink-0" }),
|
|
7232
7432
|
/* @__PURE__ */ jsx24("span", { className: "truncate", children: item.mode === "queue" ? canSendItemNow ? t("chat.followUps.manualQueueHint") : t("chat.followUps.queueHint") : t("chat.followUps.steerHint") })
|
|
7233
7433
|
] })
|
|
7234
7434
|
] })
|
|
@@ -8458,7 +8658,7 @@ import {
|
|
|
8458
8658
|
ChevronLeft as ChevronLeft2,
|
|
8459
8659
|
ChevronRight as ChevronRight5,
|
|
8460
8660
|
CornerDownLeft as CornerDownLeft3,
|
|
8461
|
-
Info as
|
|
8661
|
+
Info as Info3
|
|
8462
8662
|
} from "lucide-react";
|
|
8463
8663
|
import { jsx as jsx29, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
8464
8664
|
var emptyQuestions = [];
|
|
@@ -8955,7 +9155,7 @@ function RequestUserInputPanel({
|
|
|
8955
9155
|
"aria-label": t("composer.requestUserInput.optionInfo", {
|
|
8956
9156
|
label: parsedLabel.label
|
|
8957
9157
|
}),
|
|
8958
|
-
children: /* @__PURE__ */ jsx29(
|
|
9158
|
+
children: /* @__PURE__ */ jsx29(Info3, { className: "h-3.5 w-3.5" })
|
|
8959
9159
|
}
|
|
8960
9160
|
) }),
|
|
8961
9161
|
/* @__PURE__ */ jsx29(
|
|
@@ -9301,7 +9501,7 @@ function useConversationSummaryEvent({
|
|
|
9301
9501
|
// src/components/chat/attachments.tsx
|
|
9302
9502
|
import * as React28 from "react";
|
|
9303
9503
|
import { FileText as FileText3, Loader2 as Loader24, RefreshCw as RefreshCw2, X as X5 } from "lucide-react";
|
|
9304
|
-
import { Fragment as
|
|
9504
|
+
import { Fragment as Fragment4, jsx as jsx30, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
9305
9505
|
var ACTIVE_PARSE_STATUSES = /* @__PURE__ */ new Set([
|
|
9306
9506
|
"uploaded",
|
|
9307
9507
|
"scanning",
|
|
@@ -9611,7 +9811,7 @@ var ChatAttachments = React28.forwardRef(function ChatAttachments2({
|
|
|
9611
9811
|
}
|
|
9612
9812
|
);
|
|
9613
9813
|
}
|
|
9614
|
-
return /* @__PURE__ */ jsxs20(
|
|
9814
|
+
return /* @__PURE__ */ jsxs20(Fragment4, { children: [
|
|
9615
9815
|
/* @__PURE__ */ jsx30(
|
|
9616
9816
|
"input",
|
|
9617
9817
|
{
|
|
@@ -11468,7 +11668,7 @@ var TooltipIconButton = forwardRef11(({ children, tooltip, side = "bottom", clas
|
|
|
11468
11668
|
TooltipIconButton.displayName = "TooltipIconButton";
|
|
11469
11669
|
|
|
11470
11670
|
// src/components/thread/mermaid-block.tsx
|
|
11471
|
-
import { Fragment as
|
|
11671
|
+
import { Fragment as Fragment5, jsx as jsx38, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
11472
11672
|
var HEX_COLOR_PATTERN = /^#([\da-f]{3,8})$/i;
|
|
11473
11673
|
var MERMAID_DIRECTIVE_PATTERN = /%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi;
|
|
11474
11674
|
var MERMAID_FRONTMATTER_PATTERN = /^-{3}\s*[\n\r](.*?)[\n\r]-{3}\s*[\n\r]+/s;
|
|
@@ -11840,7 +12040,7 @@ function MermaidBlock({ code }) {
|
|
|
11840
12040
|
}, [clearCopyResetTimeout, code, isCopied]);
|
|
11841
12041
|
const hasRenderedDiagram = svgMarkup !== null && !renderError;
|
|
11842
12042
|
const statusMessage = isRendering ? t("markdown.mermaid.rendering") : t("markdown.mermaid.failed");
|
|
11843
|
-
return /* @__PURE__ */ jsxs23(
|
|
12043
|
+
return /* @__PURE__ */ jsxs23(Fragment5, { children: [
|
|
11844
12044
|
/* @__PURE__ */ jsx38(
|
|
11845
12045
|
Tabs,
|
|
11846
12046
|
{
|
|
@@ -11958,7 +12158,7 @@ function MermaidBlock({ code }) {
|
|
|
11958
12158
|
|
|
11959
12159
|
// src/components/thread/markdown-text.tsx
|
|
11960
12160
|
import "katex/dist/katex.min.css";
|
|
11961
|
-
import { Fragment as
|
|
12161
|
+
import { Fragment as Fragment6, jsx as jsx39, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
11962
12162
|
var markdownTableMinWidth = "max(7rem, calc(8rem * var(--density-spacing, 1)))";
|
|
11963
12163
|
var markdownTableCellPaddingInline = "calc(var(--density-padding, 1rem) * 1.25)";
|
|
11964
12164
|
var markdownTableCellPaddingBlock = "max(0.5rem, calc(var(--density-padding, 1rem) * 0.75))";
|
|
@@ -12446,7 +12646,7 @@ var defaultComponents = {
|
|
|
12446
12646
|
...stripMarkdownNode(props)
|
|
12447
12647
|
}
|
|
12448
12648
|
),
|
|
12449
|
-
pre: ({ className, children }) => Children.toArray(children).length === 1 && (isMermaidBlockChild(Children.toArray(children)[0]) || isMermaidCodeElement(Children.toArray(children)[0])) ? /* @__PURE__ */ jsx39(
|
|
12649
|
+
pre: ({ className, children }) => Children.toArray(children).length === 1 && (isMermaidBlockChild(Children.toArray(children)[0]) || isMermaidCodeElement(Children.toArray(children)[0])) ? /* @__PURE__ */ jsx39(Fragment6, { children }) : /* @__PURE__ */ jsx39(
|
|
12450
12650
|
"div",
|
|
12451
12651
|
{
|
|
12452
12652
|
className: cn(
|
|
@@ -12471,7 +12671,7 @@ var defaultComponents = {
|
|
|
12471
12671
|
if (language === "mermaid") {
|
|
12472
12672
|
return /* @__PURE__ */ jsx39(MermaidBlock, { code: normalizedCode });
|
|
12473
12673
|
}
|
|
12474
|
-
return /* @__PURE__ */ jsxs24(
|
|
12674
|
+
return /* @__PURE__ */ jsxs24(Fragment6, { children: [
|
|
12475
12675
|
/* @__PURE__ */ jsx39(CodeHeader, { language, code: normalizedCode }),
|
|
12476
12676
|
/* @__PURE__ */ jsx39(SyntaxHighlighter, { language, className, children: normalizedCode })
|
|
12477
12677
|
] });
|
|
@@ -12523,13 +12723,13 @@ import {
|
|
|
12523
12723
|
ChevronRight as ChevronRight6,
|
|
12524
12724
|
Clock3,
|
|
12525
12725
|
GitBranch,
|
|
12526
|
-
Info as
|
|
12726
|
+
Info as Info4,
|
|
12527
12727
|
Loader2 as Loader26,
|
|
12528
12728
|
MessageSquareText,
|
|
12529
12729
|
Wrench,
|
|
12530
12730
|
XCircle
|
|
12531
12731
|
} from "lucide-react";
|
|
12532
|
-
import { Fragment as
|
|
12732
|
+
import { Fragment as Fragment7, jsx as jsx40, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
12533
12733
|
function safeJson2(value) {
|
|
12534
12734
|
try {
|
|
12535
12735
|
return JSON.stringify(value, null, 2);
|
|
@@ -12613,7 +12813,7 @@ function MiddlewareEventRow({ content }) {
|
|
|
12613
12813
|
}
|
|
12614
12814
|
),
|
|
12615
12815
|
/* @__PURE__ */ jsx40("span", { className: "min-w-0 truncate font-medium", children: label }),
|
|
12616
|
-
detail ? /* @__PURE__ */ jsxs25(
|
|
12816
|
+
detail ? /* @__PURE__ */ jsxs25(Fragment7, { children: [
|
|
12617
12817
|
/* @__PURE__ */ jsx40("span", { className: "text-muted-foreground/50", children: "\xB7" }),
|
|
12618
12818
|
/* @__PURE__ */ jsx40("span", { className: "min-w-0 truncate", children: detail })
|
|
12619
12819
|
] }) : null
|
|
@@ -12730,7 +12930,7 @@ function AgentEventRow({ content }) {
|
|
|
12730
12930
|
isError ? "bg-destructive/10 text-destructive" : "bg-muted/40 text-muted-foreground"
|
|
12731
12931
|
),
|
|
12732
12932
|
children: [
|
|
12733
|
-
/* @__PURE__ */ jsx40(
|
|
12933
|
+
/* @__PURE__ */ jsx40(Info4, { className: "mt-0.5 h-3.5 w-3.5 shrink-0" }),
|
|
12734
12934
|
/* @__PURE__ */ jsxs25("div", { className: "min-w-0 flex-1", children: [
|
|
12735
12935
|
/* @__PURE__ */ jsx40("div", { className: "truncate font-medium", children: label }),
|
|
12736
12936
|
detail ? /* @__PURE__ */ jsx40("div", { className: "wrap-break-word", children: detail }) : null,
|
|
@@ -12807,7 +13007,7 @@ function AgentRunGroup({
|
|
|
12807
13007
|
)
|
|
12808
13008
|
} : null,
|
|
12809
13009
|
counts.events > 0 ? {
|
|
12810
|
-
icon:
|
|
13010
|
+
icon: Info4,
|
|
12811
13011
|
count: counts.events,
|
|
12812
13012
|
label: t(
|
|
12813
13013
|
`message.agentRun.counts.events.${counts.events === 1 ? "one" : "other"}`,
|
|
@@ -13928,7 +14128,7 @@ function ToolOutputAttachments({
|
|
|
13928
14128
|
}
|
|
13929
14129
|
|
|
13930
14130
|
// src/components/thread/messages/tool-component-group.tsx
|
|
13931
|
-
import { Fragment as
|
|
14131
|
+
import { Fragment as Fragment8, jsx as jsx46, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
13932
14132
|
var toolStatusConfig = {
|
|
13933
14133
|
success: {
|
|
13934
14134
|
iconClass: "border-green-500 text-green-700",
|
|
@@ -14570,7 +14770,7 @@ function ToolCallDetails({ content }) {
|
|
|
14570
14770
|
return /* @__PURE__ */ jsxs31("div", { className: "ml-6 mt-1 max-h-60 overflow-auto rounded-md bg-muted/30 px-3 py-2 text-xs text-muted-foreground", children: [
|
|
14571
14771
|
hasInput && /* @__PURE__ */ jsxs31("div", { className: "space-y-1", children: [
|
|
14572
14772
|
/* @__PURE__ */ jsxs31("div", { className: "flex min-w-0 items-baseline gap-1 text-[11px] font-medium text-muted-foreground", children: [
|
|
14573
|
-
toolName ? /* @__PURE__ */ jsxs31(
|
|
14773
|
+
toolName ? /* @__PURE__ */ jsxs31(Fragment8, { children: [
|
|
14574
14774
|
/* @__PURE__ */ jsx46("span", { className: "min-w-0 break-all font-mono text-foreground/80", children: toolName }),
|
|
14575
14775
|
/* @__PURE__ */ jsx46("span", { "aria-hidden": "true", children: "\xB7" })
|
|
14576
14776
|
] }) : null,
|
|
@@ -15466,7 +15666,7 @@ function clickDownload(uri, filename) {
|
|
|
15466
15666
|
}
|
|
15467
15667
|
|
|
15468
15668
|
// src/components/thread/messages/mcp-app.tsx
|
|
15469
|
-
import { Fragment as
|
|
15669
|
+
import { Fragment as Fragment9, jsx as jsx49, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
15470
15670
|
var EMPTY_INPUT_SCHEMA = {
|
|
15471
15671
|
type: "object",
|
|
15472
15672
|
properties: {}
|
|
@@ -16827,7 +17027,7 @@ function McpAppMessage({
|
|
|
16827
17027
|
if (isTornDown) {
|
|
16828
17028
|
return null;
|
|
16829
17029
|
}
|
|
16830
|
-
return /* @__PURE__ */ jsxs33(
|
|
17030
|
+
return /* @__PURE__ */ jsxs33(Fragment9, { children: [
|
|
16831
17031
|
displayMode === "fullscreen" ? /* @__PURE__ */ jsx49(
|
|
16832
17032
|
"div",
|
|
16833
17033
|
{
|
|
@@ -21118,7 +21318,7 @@ function formatElapsed(value) {
|
|
|
21118
21318
|
}
|
|
21119
21319
|
|
|
21120
21320
|
// src/components/chat.tsx
|
|
21121
|
-
import { Fragment as
|
|
21321
|
+
import { Fragment as Fragment12, jsx as jsx65, jsxs as jsxs46 } from "react/jsx-runtime";
|
|
21122
21322
|
var defaultApiUrl2 = import.meta.env.VITE_XPERTAI_API_URL;
|
|
21123
21323
|
var COMPOSER_INPUT_MAX_HEIGHT = 128;
|
|
21124
21324
|
var LONG_TEXT_REFERENCE_THRESHOLD = 5e3;
|
|
@@ -23695,7 +23895,7 @@ function Chat({
|
|
|
23695
23895
|
) }) }),
|
|
23696
23896
|
/* @__PURE__ */ jsx65(TooltipContent, { side: "bottom", children: t("settings.open") })
|
|
23697
23897
|
] }),
|
|
23698
|
-
history?.enabled !== false && /* @__PURE__ */ jsxs46(
|
|
23898
|
+
history?.enabled !== false && /* @__PURE__ */ jsxs46(Fragment12, { children: [
|
|
23699
23899
|
/* @__PURE__ */ jsxs46(Tooltip, { children: [
|
|
23700
23900
|
/* @__PURE__ */ jsx65(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx65("span", { className: "inline-flex h-8 w-8", children: /* @__PURE__ */ jsx65(
|
|
23701
23901
|
"button",
|
|
@@ -23879,7 +24079,7 @@ function Chat({
|
|
|
23879
24079
|
pet: effectivePet,
|
|
23880
24080
|
mcpApps: options?.mcpApps
|
|
23881
24081
|
}
|
|
23882
|
-
) : /* @__PURE__ */ jsxs46(
|
|
24082
|
+
) : /* @__PURE__ */ jsxs46(Fragment12, { children: [
|
|
23883
24083
|
message.type === "human" && humanRuntimeCapabilityOptions.length > 0 && /* @__PURE__ */ jsx65(
|
|
23884
24084
|
HumanRuntimeCapabilityChips,
|
|
23885
24085
|
{
|
|
@@ -23965,22 +24165,6 @@ function Chat({
|
|
|
23965
24165
|
]
|
|
23966
24166
|
}
|
|
23967
24167
|
),
|
|
23968
|
-
!isAtBottom && messages.length > 0 && /* @__PURE__ */ jsx65("div", { className: "sticky bottom-20 z-20 flex justify-center px-4 pointer-events-none", children: /* @__PURE__ */ jsx65(
|
|
23969
|
-
Button,
|
|
23970
|
-
{
|
|
23971
|
-
type: "button",
|
|
23972
|
-
size: "icon-sm",
|
|
23973
|
-
variant: hasUpdatesBelow ? "default" : "outline",
|
|
23974
|
-
className: cn(
|
|
23975
|
-
"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)]",
|
|
23976
|
-
hasUpdatesBelow && "animate-bounce"
|
|
23977
|
-
),
|
|
23978
|
-
onClick: () => scrollToBottom(true, true),
|
|
23979
|
-
"aria-label": t("chat.scrollToBottom"),
|
|
23980
|
-
title: t("chat.scrollToBottom"),
|
|
23981
|
-
children: /* @__PURE__ */ jsx65(ArrowDown2, { size: 16 })
|
|
23982
|
-
}
|
|
23983
|
-
) }),
|
|
23984
24168
|
quoteSelection && /* @__PURE__ */ jsxs46(
|
|
23985
24169
|
"div",
|
|
23986
24170
|
{
|
|
@@ -24043,6 +24227,29 @@ function Chat({
|
|
|
24043
24227
|
),
|
|
24044
24228
|
style: chatColumnStyle,
|
|
24045
24229
|
children: [
|
|
24230
|
+
!isAtBottom && messages.length > 0 && /* @__PURE__ */ jsx65(
|
|
24231
|
+
"div",
|
|
24232
|
+
{
|
|
24233
|
+
"data-slot": "scroll-to-bottom",
|
|
24234
|
+
className: "pointer-events-none absolute left-1/2 top-0 z-20 flex -translate-x-1/2 -translate-y-full justify-center",
|
|
24235
|
+
children: /* @__PURE__ */ jsx65(
|
|
24236
|
+
Button,
|
|
24237
|
+
{
|
|
24238
|
+
type: "button",
|
|
24239
|
+
size: "icon-sm",
|
|
24240
|
+
variant: hasUpdatesBelow ? "default" : "outline",
|
|
24241
|
+
className: cn(
|
|
24242
|
+
"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)]",
|
|
24243
|
+
hasUpdatesBelow && "animate-bounce"
|
|
24244
|
+
),
|
|
24245
|
+
onClick: () => scrollToBottom(true, true),
|
|
24246
|
+
"aria-label": t("chat.scrollToBottom"),
|
|
24247
|
+
title: t("chat.scrollToBottom"),
|
|
24248
|
+
children: /* @__PURE__ */ jsx65(ArrowDown2, { size: 16 })
|
|
24249
|
+
}
|
|
24250
|
+
)
|
|
24251
|
+
}
|
|
24252
|
+
),
|
|
24046
24253
|
threadErrorMessage && /* @__PURE__ */ jsx65("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 }),
|
|
24047
24254
|
/* @__PURE__ */ jsx65(
|
|
24048
24255
|
ChatAttachments,
|