@xpert-ai/chatkit-ui 0.3.9 → 0.3.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-d0xPgHLt.js → _baseUniq-o6HzEWPP.js} +1 -1
- package/dist/app/assets/{abap-C1gS5w_-.js → abap-C6-1sPrI.js} +1 -1
- package/dist/app/assets/{abnf-ChfNMdMs.js → abnf-B_713Ho1.js} +1 -1
- package/dist/app/assets/{actionscript-CqZVtlIo.js → actionscript-DzDuE3ox.js} +1 -1
- package/dist/app/assets/{ada-Df7ckVRN.js → ada-CZL6S3aD.js} +1 -1
- package/dist/app/assets/{agda-CKQcyuuk.js → agda-Cq6nCjKe.js} +1 -1
- package/dist/app/assets/{al-MgzFDjis.js → al-ZMkb2Kyd.js} +1 -1
- package/dist/app/assets/{antlr4-gQIdj_n8.js → antlr4-Dgdl4Ntb.js} +1 -1
- package/dist/app/assets/{apacheconf-CnI7fjGk.js → apacheconf-ClUBm_7j.js} +1 -1
- package/dist/app/assets/{apex-Cornexj6.js → apex-BTf0DZVV.js} +1 -1
- package/dist/app/assets/{apl-DIuyRn0r.js → apl-cNmUD0th.js} +1 -1
- package/dist/app/assets/{applescript-BFypMn1A.js → applescript-D-beiR9A.js} +1 -1
- package/dist/app/assets/{aql-vzuzjb2r.js → aql-v67Y-YZs.js} +1 -1
- package/dist/app/assets/{arc-DwTN8sQQ.js → arc-DlSYGjj9.js} +1 -1
- package/dist/app/assets/{architectureDiagram-Q4EWVU46-Bl19JwBX.js → architectureDiagram-Q4EWVU46-BXOCqJrq.js} +1 -1
- package/dist/app/assets/{arduino-D13WuUy2.js → arduino-BpzS1nC1.js} +1 -1
- package/dist/app/assets/{arff-C6nlhJZz.js → arff-CsJ5CW-W.js} +1 -1
- package/dist/app/assets/{asciidoc-CRuYDoOh.js → asciidoc-BTU_RYL4.js} +1 -1
- package/dist/app/assets/{asm6502-C0i8fFki.js → asm6502-U6FszQ5L.js} +1 -1
- package/dist/app/assets/{asmatmel-CR95ah4A.js → asmatmel-zid_De91.js} +1 -1
- package/dist/app/assets/{aspnet-lFqugAWo.js → aspnet-kkuC1wo9.js} +1 -1
- package/dist/app/assets/{autohotkey-CQ9anh_K.js → autohotkey-mg-MT2po.js} +1 -1
- package/dist/app/assets/{autoit-CNwovihf.js → autoit-CgpHVjU6.js} +1 -1
- package/dist/app/assets/{avisynth-DF8FJLhL.js → avisynth-BZWbMsxO.js} +1 -1
- package/dist/app/assets/{avro-idl-DSrfVYDF.js → avro-idl-Ct0ISkkH.js} +1 -1
- package/dist/app/assets/{bash-BijYMJSP.js → bash-D_LOxOea.js} +1 -1
- package/dist/app/assets/{basic-D48XI4ot.js → basic-wu82dq7P.js} +1 -1
- package/dist/app/assets/{batch-xe2X16t1.js → batch-LkZGC2dX.js} +1 -1
- package/dist/app/assets/{bbcode-v-rV5YMO.js → bbcode-BH2NkNxu.js} +1 -1
- package/dist/app/assets/{bicep-CjxvX8Fv.js → bicep-DGKrILm8.js} +1 -1
- package/dist/app/assets/{birb-B8HP6a91.js → birb-UNNWz9VN.js} +1 -1
- package/dist/app/assets/{bison-DQMPQckM.js → bison-CUvSsmyR.js} +1 -1
- package/dist/app/assets/{blockDiagram-DXYQGD6D-Bgyg4n__.js → blockDiagram-DXYQGD6D-BxQggcio.js} +1 -1
- package/dist/app/assets/{bnf-CNSRFWU5.js → bnf-BHI1Z0hn.js} +1 -1
- package/dist/app/assets/{brainfuck-B9vS2ynf.js → brainfuck-CbX2IFwh.js} +1 -1
- package/dist/app/assets/{brightscript-BYGxWYs0.js → brightscript-BOZjnzIt.js} +1 -1
- package/dist/app/assets/{bro-B_2GzStI.js → bro-DjqC4cIN.js} +1 -1
- package/dist/app/assets/{bsl-BKYZeIx_.js → bsl-bByDNkfu.js} +1 -1
- package/dist/app/assets/{c-DIpHG3VX.js → c-VahGyU-Z.js} +1 -1
- package/dist/app/assets/{c4Diagram-AHTNJAMY-D_tdo_wS.js → c4Diagram-AHTNJAMY-CwJ8mP6o.js} +1 -1
- package/dist/app/assets/{cfscript-B9TrFk7U.js → cfscript-Bgsey_t-.js} +1 -1
- package/dist/app/assets/{chaiscript-CIiSs9C5.js → chaiscript-CaNAol7k.js} +1 -1
- package/dist/app/assets/channel--mMkm_8G.js +1 -0
- package/dist/app/assets/{chunk-4BX2VUAB-xSWMtsdi.js → chunk-4BX2VUAB-B1_lWP7h.js} +1 -1
- package/dist/app/assets/{chunk-4TB4RGXK-CdkHTh9_.js → chunk-4TB4RGXK-CKtq_VWl.js} +1 -1
- package/dist/app/assets/{chunk-55IACEB6-CB293AOk.js → chunk-55IACEB6-DfyAJqc-.js} +1 -1
- package/dist/app/assets/{chunk-EDXVE4YY-Dfel9EpH.js → chunk-EDXVE4YY-IvTJi92M.js} +1 -1
- package/dist/app/assets/{chunk-FMBD7UC4-Dxv896Dl.js → chunk-FMBD7UC4-BX_vx0tx.js} +1 -1
- package/dist/app/assets/{chunk-OYMX7WX6-_qt8fetx.js → chunk-OYMX7WX6-DUAzb7el.js} +1 -1
- package/dist/app/assets/{chunk-QZHKN3VN-DeV7TYPp.js → chunk-QZHKN3VN-Crec0McH.js} +1 -1
- package/dist/app/assets/{chunk-YZCP3GAM-BGRB5RBo.js → chunk-YZCP3GAM-re08Oy2_.js} +1 -1
- package/dist/app/assets/{cil-BOW34EP0.js → cil-71R7ZiLb.js} +1 -1
- package/dist/app/assets/classDiagram-6PBFFD2Q-wdathR7C.js +1 -0
- package/dist/app/assets/classDiagram-v2-HSJHXN6E-wdathR7C.js +1 -0
- package/dist/app/assets/{clike-DJFHO0Um.js → clike-0BVdVlPZ.js} +1 -1
- package/dist/app/assets/{clojure-8gNY9mWl.js → clojure-BQ4G_N90.js} +1 -1
- package/dist/app/assets/clone-BwBrS_lI.js +1 -0
- package/dist/app/assets/{cmake-C_1AdYAM.js → cmake-D-6VV5r1.js} +1 -1
- package/dist/app/assets/{cobol-BxsZTTIX.js → cobol-BWw4ETsO.js} +1 -1
- package/dist/app/assets/{coffeescript-CS1zGQoK.js → coffeescript-VX2ASB-2.js} +1 -1
- package/dist/app/assets/{concurnas-CGXUVlfN.js → concurnas-C6rawzFm.js} +1 -1
- package/dist/app/assets/{coq-C_2X2wT-.js → coq-BJMXUHZn.js} +1 -1
- package/dist/app/assets/{core-SFwqVwer.js → core-DLrIFmIQ.js} +1 -1
- package/dist/app/assets/{cose-bilkent-S5V4N54A-D1r1R4bP.js → cose-bilkent-S5V4N54A-D45kYgUt.js} +1 -1
- package/dist/app/assets/{cpp-DPXVV7cM.js → cpp-Cu0mBsY-.js} +1 -1
- package/dist/app/assets/{crystal-DRwy0CaV.js → crystal-CKptwoF-.js} +1 -1
- package/dist/app/assets/{csharp-ZqBWMUsS.js → csharp-CYZgv-zo.js} +1 -1
- package/dist/app/assets/{cshtml-6xAyAupv.js → cshtml-BuOJGIid.js} +1 -1
- package/dist/app/assets/{csp-DBbfCY3c.js → csp-oEsOJvZB.js} +1 -1
- package/dist/app/assets/{css-kxoYE9Vx.js → css-B0MLJNOy.js} +1 -1
- package/dist/app/assets/{css-extras-CG5PiKdM.js → css-extras-JR2GXaTG.js} +1 -1
- package/dist/app/assets/{csv-CpI6nvH7.js → csv-nh-0u7QO.js} +1 -1
- package/dist/app/assets/{cypher-C2-ipLzt.js → cypher-ClNNXF75.js} +1 -1
- package/dist/app/assets/{d-CG1wQa-t.js → d-CWdZUMoh.js} +1 -1
- package/dist/app/assets/{dagre-KV5264BT-CKNPIeew.js → dagre-KV5264BT-BMrkKcda.js} +1 -1
- package/dist/app/assets/{dart-BD7Bdo3f.js → dart-ihZfCx4r.js} +1 -1
- package/dist/app/assets/{dataweave-BFXUgGdv.js → dataweave-ZM7I40Ox.js} +1 -1
- package/dist/app/assets/{dax-Jyo9z9jZ.js → dax-DgehXfC1.js} +1 -1
- package/dist/app/assets/{dhall-BwZWJDX6.js → dhall-B-8B_ccq.js} +1 -1
- package/dist/app/assets/{diagram-5BDNPKRD-D8nkpaMp.js → diagram-5BDNPKRD-l6kyxaOH.js} +1 -1
- package/dist/app/assets/{diagram-G4DWMVQ6-D4SCjqyL.js → diagram-G4DWMVQ6-Cnn3RVaZ.js} +1 -1
- package/dist/app/assets/{diagram-MMDJMWI5-DAExr0Ug.js → diagram-MMDJMWI5-eex0Zu03.js} +1 -1
- package/dist/app/assets/{diagram-TYMM5635-BxnFS5U9.js → diagram-TYMM5635-C6Le58WP.js} +1 -1
- package/dist/app/assets/{diff-NvDIKdih.js → diff-BdEZ_2JT.js} +1 -1
- package/dist/app/assets/{django-CnZMOnkh.js → django-DXYmPi1j.js} +1 -1
- package/dist/app/assets/{dns-zone-file-Bqe0FXm_.js → dns-zone-file-CdatFoZp.js} +1 -1
- package/dist/app/assets/{docker-C95fIiqp.js → docker-C7ZvW9JS.js} +1 -1
- package/dist/app/assets/{dot-Cs-4_cPq.js → dot-DawGiMaK.js} +1 -1
- package/dist/app/assets/{ebnf-49RPCfQW.js → ebnf-CiZXNkHY.js} +1 -1
- package/dist/app/assets/{editorconfig-CGRrdDWd.js → editorconfig-BvgNpfRF.js} +1 -1
- package/dist/app/assets/{eiffel-yWKy6gt7.js → eiffel-C2bgj5jb.js} +1 -1
- package/dist/app/assets/{ejs-C8VCyZ4X.js → ejs-D3oa_o2N.js} +1 -1
- package/dist/app/assets/{elixir-DEoWCTcj.js → elixir-C2M1tzST.js} +1 -1
- package/dist/app/assets/{elm-CruJ7qH0.js → elm-4FPTir66.js} +1 -1
- package/dist/app/assets/{erDiagram-SMLLAGMA-BoVoNduJ.js → erDiagram-SMLLAGMA-CO-YY4RS.js} +1 -1
- package/dist/app/assets/{erb-Cbr6CWzI.js → erb-BycImsXK.js} +1 -1
- package/dist/app/assets/{erlang-BmR56fIB.js → erlang-DM_L35YJ.js} +1 -1
- package/dist/app/assets/{etlua-CGX-AXY7.js → etlua-CxR_CAQl.js} +1 -1
- package/dist/app/assets/{excel-formula-CHzqz1ca.js → excel-formula-7kFhzyHw.js} +1 -1
- package/dist/app/assets/{factor-CjXIo1NM.js → factor-x7wU-3rN.js} +1 -1
- package/dist/app/assets/{false-DJoigJ1R.js → false-DOUNnw3d.js} +1 -1
- package/dist/app/assets/{firestore-security-rules-DvTV99BD.js → firestore-security-rules-DTC3Hd2Z.js} +1 -1
- package/dist/app/assets/{flow-5Fimpuuy.js → flow-Cy9gswVq.js} +1 -1
- package/dist/app/assets/{flowDiagram-DWJPFMVM-Bf98JRkn.js → flowDiagram-DWJPFMVM-CEJD5iZj.js} +1 -1
- package/dist/app/assets/{fortran-sGHHnv8E.js → fortran-qKGVyaPH.js} +1 -1
- package/dist/app/assets/{fsharp-DF5NSi4h.js → fsharp-BBqGjJcb.js} +1 -1
- package/dist/app/assets/{ftl-U2bKze5l.js → ftl-ife_OgBG.js} +1 -1
- package/dist/app/assets/{ganttDiagram-T4ZO3ILL-B1lS9yyx.js → ganttDiagram-T4ZO3ILL-9PZlx_Uq.js} +1 -1
- package/dist/app/assets/{gap-DS0Dwjow.js → gap-yfxS5XPA.js} +1 -1
- package/dist/app/assets/{gcode-BgAtQd_P.js → gcode-Bgg19DOc.js} +1 -1
- package/dist/app/assets/{gdscript-BuMjCx6M.js → gdscript-CBhHE5SS.js} +1 -1
- package/dist/app/assets/{gedcom-BgDEPuRo.js → gedcom-Ctm1PKdU.js} +1 -1
- package/dist/app/assets/{gherkin-Dt2S58oJ.js → gherkin-B0UyYQfJ.js} +1 -1
- package/dist/app/assets/{git-B17pJvML.js → git-DIrkjPbi.js} +1 -1
- package/dist/app/assets/{gitGraphDiagram-UUTBAWPF-DxR-klx0.js → gitGraphDiagram-UUTBAWPF-DwWNMDGY.js} +1 -1
- package/dist/app/assets/{glsl-DZWHGlCd.js → glsl-CH7j2HNR.js} +1 -1
- package/dist/app/assets/{gml-BJHlmT89.js → gml-CSH00tv_.js} +1 -1
- package/dist/app/assets/{gn-Dw5lsCZh.js → gn-BxeWNMcv.js} +1 -1
- package/dist/app/assets/{go-DdrOWPXi.js → go-MhuRmXjP.js} +1 -1
- package/dist/app/assets/{go-module-Y9IpOQIo.js → go-module-BSiyVsgM.js} +1 -1
- package/dist/app/assets/{graph-0am3WWmS.js → graph-CepdxPJJ.js} +1 -1
- package/dist/app/assets/{graphql-BrflsM4h.js → graphql-BAmq1q6o.js} +1 -1
- package/dist/app/assets/{groovy-CnZYUk2k.js → groovy-Dx2QuTb9.js} +1 -1
- package/dist/app/assets/{haml-XHFDPpx5.js → haml-XuFmtTqQ.js} +1 -1
- package/dist/app/assets/{handlebars-B9lcSQcu.js → handlebars-CAbnVnb3.js} +1 -1
- package/dist/app/assets/{haskell-DzwL6-Xr.js → haskell-ZWPWDFbB.js} +1 -1
- package/dist/app/assets/{haxe-C0Yplgr6.js → haxe-DMh38jAt.js} +1 -1
- package/dist/app/assets/{hcl-CyOerZba.js → hcl-BE_4zt1q.js} +1 -1
- package/dist/app/assets/{hlsl-pRuu1AaH.js → hlsl-TB2RVDX1.js} +1 -1
- package/dist/app/assets/{hoon-D08nyBFa.js → hoon-om1gSLm8.js} +1 -1
- package/dist/app/assets/{hpkp-CiFNdqmN.js → hpkp-Ci38KUv8.js} +1 -1
- package/dist/app/assets/{hsts-COtaeWhJ.js → hsts-CAEdyaAG.js} +1 -1
- package/dist/app/assets/{http-6LXOe686.js → http-THY6Y53C.js} +1 -1
- package/dist/app/assets/{ichigojam-BGznP2yR.js → ichigojam-s0kP-jjV.js} +1 -1
- package/dist/app/assets/{icon-iWKIofLO.js → icon-Y5BB6k3b.js} +1 -1
- package/dist/app/assets/{icu-message-format-B6KDlUs9.js → icu-message-format-6GheGdTN.js} +1 -1
- package/dist/app/assets/{idris-DPRNLFtu.js → idris-AihHk8dS.js} +1 -1
- package/dist/app/assets/{iecst-C7Nyn6zV.js → iecst-CD1Q8Tnd.js} +1 -1
- package/dist/app/assets/{ignore-Druw0ERe.js → ignore-BJVKkvqY.js} +1 -1
- package/dist/app/assets/{index-Ct3W-sCX.js → index-0WK7GO0-.js} +137 -137
- package/dist/app/assets/{infoDiagram-42DDH7IO-DgfNbsNV.js → infoDiagram-42DDH7IO-BhBoxXVX.js} +1 -1
- package/dist/app/assets/{inform7-DdB0jC5T.js → inform7-CerZVqbA.js} +1 -1
- package/dist/app/assets/{ini-BEgmuF3p.js → ini-DbH-6HIu.js} +1 -1
- package/dist/app/assets/{io-Bd_lzToj.js → io-Id1TPr6t.js} +1 -1
- package/dist/app/assets/{ishikawaDiagram-UXIWVN3A-xvKM_hYb.js → ishikawaDiagram-UXIWVN3A-a5HASfMP.js} +1 -1
- package/dist/app/assets/{j-CL9vLyD8.js → j-BLEsfI66.js} +1 -1
- package/dist/app/assets/{java-C_-jWrI5.js → java-Dk_dMkQq.js} +1 -1
- package/dist/app/assets/{javadoc-oLOO3RTE.js → javadoc-RXhLwA8L.js} +1 -1
- package/dist/app/assets/{javadoclike-DavcOos8.js → javadoclike-BUIjV7mD.js} +1 -1
- package/dist/app/assets/{javascript-B8XcxnUJ.js → javascript-Dx2iULzE.js} +1 -1
- package/dist/app/assets/{javastacktrace-DJ6bTQgY.js → javastacktrace-DkBumNW_.js} +1 -1
- package/dist/app/assets/{jexl-DvtAvSmJ.js → jexl-kq_Kr8N1.js} +1 -1
- package/dist/app/assets/{jolie-lzm-vq6i.js → jolie-TUxZc3iz.js} +1 -1
- package/dist/app/assets/{journeyDiagram-VCZTEJTY-ByRJK1DL.js → journeyDiagram-VCZTEJTY-cH7y7LfB.js} +1 -1
- package/dist/app/assets/{jq-nUdh3Rbv.js → jq-COVGaHBO.js} +1 -1
- package/dist/app/assets/{js-extras-DltKoZY0.js → js-extras-GrY_q6jW.js} +1 -1
- package/dist/app/assets/{js-templates-BA1d76n6.js → js-templates-DKangBnB.js} +1 -1
- package/dist/app/assets/{jsdoc-RoBDAQjI.js → jsdoc-DBwDG9t_.js} +1 -1
- package/dist/app/assets/{json-B0-P-Skd.js → json-Crs6JAAl.js} +1 -1
- package/dist/app/assets/{json5-qdYvLAg-.js → json5-Bjv9HTdW.js} +1 -1
- package/dist/app/assets/{jsonp-CiiIiQaD.js → jsonp-D5aVdmyI.js} +1 -1
- package/dist/app/assets/{jsstacktrace-bvVZoaVa.js → jsstacktrace-MmLxBswX.js} +1 -1
- package/dist/app/assets/{jsx-B1hqRxuW.js → jsx-D76iTPpw.js} +1 -1
- package/dist/app/assets/{julia-jDh_bsMD.js → julia-D0R0V64N.js} +1 -1
- package/dist/app/assets/{kanban-definition-6JOO6SKY-Cn5S-rw6.js → kanban-definition-6JOO6SKY-B6W3WFhP.js} +1 -1
- package/dist/app/assets/{keepalived-CsGbB8-D.js → keepalived-pv7Nc_3u.js} +1 -1
- package/dist/app/assets/{keyman-BvsFCHN2.js → keyman-D-qt4XfM.js} +1 -1
- package/dist/app/assets/{kotlin-zQApLeMF.js → kotlin-DklLWenR.js} +1 -1
- package/dist/app/assets/{kumir-DbjdtEBP.js → kumir-B5qtRLO8.js} +1 -1
- package/dist/app/assets/{kusto-DkLW5frr.js → kusto-DPgNV-aB.js} +1 -1
- package/dist/app/assets/{latex-BsvaU6ak.js → latex-Dt4W4pm4.js} +1 -1
- package/dist/app/assets/{latte-yvfmsIcN.js → latte-CnByxqzM.js} +1 -1
- package/dist/app/assets/{layout-B8-ojK4z.js → layout-DjgAEmz5.js} +1 -1
- package/dist/app/assets/{less-D6A9FgL9.js → less-Cd6bdXoN.js} +1 -1
- package/dist/app/assets/{lilypond-BL20AQ_C.js → lilypond-DWfhngiv.js} +1 -1
- package/dist/app/assets/{linear-C12MEFEe.js → linear-6Y24Iii_.js} +1 -1
- package/dist/app/assets/{liquid-Cimyj-gU.js → liquid-CQR5STti.js} +1 -1
- package/dist/app/assets/{lisp-CTjbko0t.js → lisp-C5V4YrgB.js} +1 -1
- package/dist/app/assets/{livescript-ChdmIgPq.js → livescript-C2o1Um1B.js} +1 -1
- package/dist/app/assets/{llvm-BYme-Ltp.js → llvm-eRxkXgPh.js} +1 -1
- package/dist/app/assets/{log-BBr5f3lD.js → log-B8C2pNrc.js} +1 -1
- package/dist/app/assets/{lolcode-B8MM9s5G.js → lolcode-DN_iYFOb.js} +1 -1
- package/dist/app/assets/{lua-Cq2SlI07.js → lua-Cii0g-ih.js} +1 -1
- package/dist/app/assets/{magma-BCExSZlm.js → magma-DU5b0nZe.js} +1 -1
- package/dist/app/assets/{makefile-v1kSzBBr.js → makefile-BATBhQbg.js} +1 -1
- package/dist/app/assets/{markdown-CPcPjdo9.js → markdown-CyFQtnhr.js} +1 -1
- package/dist/app/assets/{markup-D6bbyERo.js → markup-D7dtUU31.js} +1 -1
- package/dist/app/assets/{markup-templating-BwkcODju.js → markup-templating-BVUgC3Fv.js} +1 -1
- package/dist/app/assets/{matlab-CGkPi6UG.js → matlab-LDamQaVe.js} +1 -1
- package/dist/app/assets/{maxscript-DtVXZxfB.js → maxscript-Cke3roEA.js} +1 -1
- package/dist/app/assets/{mel-BgWvH0yq.js → mel-Bbam9VOL.js} +1 -1
- package/dist/app/assets/{mermaid-DQRyXLgP.js → mermaid-Co6MoeJw.js} +1 -1
- package/dist/app/assets/{min-117LUq84.js → min-BxxZzbCc.js} +1 -1
- package/dist/app/assets/{mindmap-definition-QFDTVHPH-DKVN3MvC.js → mindmap-definition-QFDTVHPH-DqMhwZE6.js} +1 -1
- package/dist/app/assets/{mizar-DFpgodRT.js → mizar-Bv0uG9Jl.js} +1 -1
- package/dist/app/assets/{mongodb-X3VdP8wI.js → mongodb-DM4nXhmT.js} +1 -1
- package/dist/app/assets/{monkey-BGsUfPIj.js → monkey-DFYmoJdR.js} +1 -1
- package/dist/app/assets/{moonscript-67KB-69D.js → moonscript-C54x0dZv.js} +1 -1
- package/dist/app/assets/{n1ql-BkjnoDbR.js → n1ql-Dqyc4X6B.js} +1 -1
- package/dist/app/assets/{n4js-fPEGvrEJ.js → n4js-DMN0iqI1.js} +1 -1
- package/dist/app/assets/{nand2tetris-hdl-C4wcR_vA.js → nand2tetris-hdl-Dbfe1CFh.js} +1 -1
- package/dist/app/assets/{naniscript-BKTtrk_9.js → naniscript-DUigyx_P.js} +1 -1
- package/dist/app/assets/{nasm-BXSsTnCl.js → nasm-BE-iJGmZ.js} +1 -1
- package/dist/app/assets/{neon-fX4oCkSV.js → neon-ByDZ6TdK.js} +1 -1
- package/dist/app/assets/{nevod-Dy4jLFaQ.js → nevod-CGctFSM4.js} +1 -1
- package/dist/app/assets/{nginx-CkrJfVjb.js → nginx-CpUZp5AB.js} +1 -1
- package/dist/app/assets/{nim-DTjYH2GX.js → nim-CH653Nty.js} +1 -1
- package/dist/app/assets/{nix-5AXCA7q2.js → nix-DWkDp4wO.js} +1 -1
- package/dist/app/assets/{nsis-BnZo3QR2.js → nsis-D2mCIH7e.js} +1 -1
- package/dist/app/assets/{objectivec-51s9H5pd.js → objectivec-Dzg3PZLr.js} +1 -1
- package/dist/app/assets/{ocaml-DoQW-QjO.js → ocaml-BaZ_JHo_.js} +1 -1
- package/dist/app/assets/{opencl-D1sEDnlY.js → opencl-CQ2Sws-3.js} +1 -1
- package/dist/app/assets/{openqasm-F04T33UE.js → openqasm-CYcP2Jue.js} +1 -1
- package/dist/app/assets/{oz-CK_3I76L.js → oz-Dd7LCxAb.js} +1 -1
- package/dist/app/assets/{parigp-D_b5_Wtg.js → parigp-V9xW4sFC.js} +1 -1
- package/dist/app/assets/{parser-DksIr1bV.js → parser-NdfacUXY.js} +1 -1
- package/dist/app/assets/{pascal-CjcqpqV4.js → pascal-eeV11KnY.js} +1 -1
- package/dist/app/assets/{pascaligo-dYB_PoDd.js → pascaligo-BCvdKr51.js} +1 -1
- package/dist/app/assets/{pcaxis-bGMgpdNI.js → pcaxis-CPcHUmiA.js} +1 -1
- package/dist/app/assets/{peoplecode-B3LaCUo4.js → peoplecode-BEaF_y5w.js} +1 -1
- package/dist/app/assets/{perl-CVc6ZEkF.js → perl-BgDz3epk.js} +1 -1
- package/dist/app/assets/{php-C4eHuBy0.js → php-CoVHsURd.js} +1 -1
- package/dist/app/assets/{php-extras-BOTpTo32.js → php-extras-B62THd35.js} +1 -1
- package/dist/app/assets/{phpdoc-Dz2jGN80.js → phpdoc-BiBmceI8.js} +1 -1
- package/dist/app/assets/{pieDiagram-DEJITSTG-EjU3DeXj.js → pieDiagram-DEJITSTG-CdxOa-_c.js} +1 -1
- package/dist/app/assets/{plsql-EvvlGDhf.js → plsql-DcW-ECB2.js} +1 -1
- package/dist/app/assets/{powerquery-Bx8oG4yc.js → powerquery-BB3KAvPk.js} +1 -1
- package/dist/app/assets/{powershell-DTQ8OLJx.js → powershell-B6pXMaya.js} +1 -1
- package/dist/app/assets/{processing-ypL9wQGc.js → processing-BCoiCIEL.js} +1 -1
- package/dist/app/assets/{prolog-Djeh1SVC.js → prolog-zERm80ia.js} +1 -1
- package/dist/app/assets/{promql-5YlFiZVO.js → promql-BzCyDVEG.js} +1 -1
- package/dist/app/assets/{properties-D5oJowAz.js → properties-KLJshh-y.js} +1 -1
- package/dist/app/assets/{protobuf-BorFzBTP.js → protobuf-CkY4_yDl.js} +1 -1
- package/dist/app/assets/{psl-Dq-ID9sG.js → psl-678OMRj3.js} +1 -1
- package/dist/app/assets/{pug-Bq7JBxjJ.js → pug-aYDUGyTW.js} +1 -1
- package/dist/app/assets/{puppet-Ctp7y8sN.js → puppet-DDSipSd3.js} +1 -1
- package/dist/app/assets/{pure-CD_Sveeg.js → pure-CCySSQgh.js} +1 -1
- package/dist/app/assets/{purebasic-C4lsqh5k.js → purebasic-B4E28S3c.js} +1 -1
- package/dist/app/assets/{purescript-C-GDoS4J.js → purescript-DQmYwfWM.js} +1 -1
- package/dist/app/assets/{q-CVxyBZ9E.js → q-DmN11G0W.js} +1 -1
- package/dist/app/assets/{qml-CmV_JxaT.js → qml-Bav4ShVA.js} +1 -1
- package/dist/app/assets/{qore-C3_N_AVw.js → qore-DlpkKC7s.js} +1 -1
- package/dist/app/assets/{qsharp-zxninFuK.js → qsharp-Db8XzKlO.js} +1 -1
- package/dist/app/assets/{quadrantDiagram-34T5L4WZ-DVG-z9Wm.js → quadrantDiagram-34T5L4WZ-CuI8QNVf.js} +1 -1
- package/dist/app/assets/{r-FFHkrdEU.js → r-UrBYMAwV.js} +1 -1
- package/dist/app/assets/{racket-CR6S_V2-.js → racket-DI7UzDAh.js} +1 -1
- package/dist/app/assets/{reason-_tboQ_5m.js → reason-3qRspytu.js} +1 -1
- package/dist/app/assets/{regex-BFHJ4x86.js → regex-BC-kNwhG.js} +1 -1
- package/dist/app/assets/{rego-BpQ0JDF4.js → rego-DPV60Y7E.js} +1 -1
- package/dist/app/assets/{renpy-RubyRAIS.js → renpy-CfdrLDsk.js} +1 -1
- package/dist/app/assets/{requirementDiagram-MS252O5E-CzL9VTK2.js → requirementDiagram-MS252O5E-mSVPj4GW.js} +1 -1
- package/dist/app/assets/{rest-CJXGDi_0.js → rest-fue1dMMF.js} +1 -1
- package/dist/app/assets/{rip-D4h6IvCS.js → rip-BMwJaBh1.js} +1 -1
- package/dist/app/assets/{roboconf-B_2W3it1.js → roboconf-CVhKwCtE.js} +1 -1
- package/dist/app/assets/{robotframework-DoUPNYL-.js → robotframework-D46lspLM.js} +1 -1
- package/dist/app/assets/{ruby-D4hXqfCP.js → ruby-Y8ECNxd-.js} +1 -1
- package/dist/app/assets/{rust-xaQexATD.js → rust-BGEPDhUl.js} +1 -1
- package/dist/app/assets/{sankeyDiagram-XADWPNL6-D3g_wF82.js → sankeyDiagram-XADWPNL6-D0rDQxH3.js} +1 -1
- package/dist/app/assets/{sas-WjHlQWyK.js → sas-HpwRSma8.js} +1 -1
- package/dist/app/assets/{sass-CA3SX0tn.js → sass-C8S_g3pi.js} +1 -1
- package/dist/app/assets/{scala-CqNF7m1U.js → scala-BDXC9YzQ.js} +1 -1
- package/dist/app/assets/{scheme-B6Oy2Dxb.js → scheme-Bz1gS-5U.js} +1 -1
- package/dist/app/assets/{scss-BTQ5ACRY.js → scss-CK3tWBk5.js} +1 -1
- package/dist/app/assets/{sequenceDiagram-FGHM5R23-BouSXWjC.js → sequenceDiagram-FGHM5R23-CvZ2gxFN.js} +1 -1
- package/dist/app/assets/{shell-session-weSY0RGE.js → shell-session-Dlpy3KwM.js} +1 -1
- package/dist/app/assets/{smali-BgqoDXlu.js → smali-inXCMGaN.js} +1 -1
- package/dist/app/assets/{smalltalk-icE7bzOg.js → smalltalk-emFCd9G0.js} +1 -1
- package/dist/app/assets/{smarty-DYpWn2Uz.js → smarty-9WlivmJ_.js} +1 -1
- package/dist/app/assets/{sml-BGfuCz49.js → sml-BPLAOzSM.js} +1 -1
- package/dist/app/assets/{solidity-B1T9jBzp.js → solidity-DsNcaJdQ.js} +1 -1
- package/dist/app/assets/{solution-file-ybInAZ4U.js → solution-file-Yt1yDsC6.js} +1 -1
- package/dist/app/assets/{soy-q7joM-6N.js → soy-BvQ_9PC9.js} +1 -1
- package/dist/app/assets/{sparql-DDtj6joZ.js → sparql-Co_5GMgg.js} +1 -1
- package/dist/app/assets/{splunk-spl-BEhkkAdi.js → splunk-spl-CIi7m0SN.js} +1 -1
- package/dist/app/assets/{sqf-BLNE23Ba.js → sqf-BMzaGs6N.js} +1 -1
- package/dist/app/assets/{sql-V2Lr_bfn.js → sql-CIzLB7Jl.js} +1 -1
- package/dist/app/assets/{squirrel-OE5feOpV.js → squirrel-pQOw9s_O.js} +1 -1
- package/dist/app/assets/{stan-B2PkCz9J.js → stan-X6TSWZ3J.js} +1 -1
- package/dist/app/assets/{stateDiagram-FHFEXIEX-fbCVjmaz.js → stateDiagram-FHFEXIEX-DHrv5_lW.js} +1 -1
- package/dist/app/assets/stateDiagram-v2-QKLJ7IA2-Mi2Qqm51.js +1 -0
- package/dist/app/assets/{stylus-D_d6yL1A.js → stylus-Dc8FVrBE.js} +1 -1
- package/dist/app/assets/{swift-B3_Cx38L.js → swift-Nb17T9Da.js} +1 -1
- package/dist/app/assets/{systemd-CQU3uaiT.js → systemd-Bh6mhwe0.js} +1 -1
- package/dist/app/assets/{t4-cs-BIR4iWO_.js → t4-cs-BXOewazB.js} +1 -1
- package/dist/app/assets/{t4-templating-BZfi_RK5.js → t4-templating-CvVs8AOu.js} +1 -1
- package/dist/app/assets/{t4-vb-CNuxB9JI.js → t4-vb-Da_aHQSz.js} +1 -1
- package/dist/app/assets/{tap-Cr-qkyup.js → tap-CeK_krr9.js} +1 -1
- package/dist/app/assets/{tcl-B6tkq1HR.js → tcl-B1_4s1NN.js} +1 -1
- package/dist/app/assets/{textile-B4c3IuSQ.js → textile-CIotBIcg.js} +1 -1
- package/dist/app/assets/{timeline-definition-GMOUNBTQ-BTNSPm6L.js → timeline-definition-GMOUNBTQ-Idd8mRvY.js} +1 -1
- package/dist/app/assets/{toml-BuZmAc0j.js → toml-4OD_ScNb.js} +1 -1
- package/dist/app/assets/{tremor-BgzE1Z9a.js → tremor-Dj67VH5m.js} +1 -1
- package/dist/app/assets/{tt2-9LnABId2.js → tt2-WN6mgHZs.js} +1 -1
- package/dist/app/assets/{turtle-Um3kIMRn.js → turtle-DaOM2rqc.js} +1 -1
- package/dist/app/assets/{twig-CGAb9AKY.js → twig-DYOf2PCc.js} +1 -1
- package/dist/app/assets/{typescript-73MpaaxW.js → typescript-CP4F_YEP.js} +1 -1
- package/dist/app/assets/{typoscript-UJYaBjPn.js → typoscript-Ca-_onRa.js} +1 -1
- package/dist/app/assets/{unrealscript-A4r5oxb3.js → unrealscript-CZXNdRNZ.js} +1 -1
- package/dist/app/assets/{uorazor-dujAYjPD.js → uorazor-Cgi4M9Hx.js} +1 -1
- package/dist/app/assets/{uri-BvlqfXH5.js → uri-C0HsAQWz.js} +1 -1
- package/dist/app/assets/{v-DLVTWguJ.js → v-CXBTFCNE.js} +1 -1
- package/dist/app/assets/{vala-B3Dfa-UK.js → vala-CkJoijNq.js} +1 -1
- package/dist/app/assets/{vbnet-DGTpJ-oF.js → vbnet-Bw813Rf9.js} +1 -1
- package/dist/app/assets/{velocity-qnM4PLkp.js → velocity-D6Cr8-IV.js} +1 -1
- package/dist/app/assets/{vennDiagram-DHZGUBPP-CytFJHAq.js → vennDiagram-DHZGUBPP-L7tEgOUJ.js} +1 -1
- package/dist/app/assets/{verilog-DnXDyJyP.js → verilog-C5hUvzKW.js} +1 -1
- package/dist/app/assets/{vhdl-CuhR5P4I.js → vhdl-1WE1L3lB.js} +1 -1
- package/dist/app/assets/{vim-B7Z9EsT_.js → vim-sSIYQMdS.js} +1 -1
- package/dist/app/assets/{visual-basic-DgV3Uotq.js → visual-basic---zDZ_1J.js} +1 -1
- package/dist/app/assets/{wardley-RL74JXVD-DVZ8ELDx.js → wardley-RL74JXVD-BygmHcr8.js} +1 -1
- package/dist/app/assets/{wardleyDiagram-NUSXRM2D-DyxQo5eh.js → wardleyDiagram-NUSXRM2D-CQXGGm97.js} +1 -1
- package/dist/app/assets/{warpscript-CWlyJgIb.js → warpscript-_YBcLkw_.js} +1 -1
- package/dist/app/assets/{wasm-Bu0uCup-.js → wasm-CFA5AE9r.js} +1 -1
- package/dist/app/assets/{web-idl-sRCqN9kX.js → web-idl-C1SxHUMy.js} +1 -1
- package/dist/app/assets/{wiki-BTh5pD0R.js → wiki-D9sHOvre.js} +1 -1
- package/dist/app/assets/{wolfram-Bkw4HjLP.js → wolfram-CPWRsLKq.js} +1 -1
- package/dist/app/assets/{wren-cUVq4Oaa.js → wren-RYBcpwe2.js} +1 -1
- package/dist/app/assets/{xeora-BMRdO2WB.js → xeora-CO7UHQdI.js} +1 -1
- package/dist/app/assets/{xml-doc-DYCv6AJy.js → xml-doc-sHBA_Lol.js} +1 -1
- package/dist/app/assets/{xojo-BLJUM2kN.js → xojo-RPTwT3Ta.js} +1 -1
- package/dist/app/assets/{xquery-BPFctU-s.js → xquery-NS9gR-L7.js} +1 -1
- package/dist/app/assets/{xychartDiagram-5P7HB3ND-DkY0ltP3.js → xychartDiagram-5P7HB3ND-CmSAJqr9.js} +1 -1
- package/dist/app/assets/{yaml-NbopZuT_.js → yaml-DvQPZF8D.js} +1 -1
- package/dist/app/assets/{yang-Bm2SeKGW.js → yang-DY8xn4cC.js} +1 -1
- package/dist/app/assets/{zig-DNyZ1auP.js → zig-DMcJdVmM.js} +1 -1
- package/dist/app/index.html +1 -1
- package/dist/index.cjs +319 -3
- package/dist/index.js +324 -4
- package/package.json +2 -2
- package/dist/app/assets/channel-Dpi0KiA6.js +0 -1
- package/dist/app/assets/classDiagram-6PBFFD2Q-BuYc7bkV.js +0 -1
- package/dist/app/assets/classDiagram-v2-HSJHXN6E-BuYc7bkV.js +0 -1
- package/dist/app/assets/clone-DQZsQeit.js +0 -1
- package/dist/app/assets/stateDiagram-v2-QKLJ7IA2-ZNQ3jknG.js +0 -1
package/dist/index.cjs
CHANGED
|
@@ -5774,8 +5774,35 @@ function formatUnknownMessageContent(content) {
|
|
|
5774
5774
|
const contentWithText = content;
|
|
5775
5775
|
return typeof contentWithText.text === "string" ? contentWithText.text : "";
|
|
5776
5776
|
}
|
|
5777
|
+
function normalizeMessageText(value) {
|
|
5778
|
+
return value.replace(/\s+/g, " ").trim();
|
|
5779
|
+
}
|
|
5780
|
+
function isSummaryTextBoundary(content) {
|
|
5781
|
+
if (!content || typeof content !== "object" || Array.isArray(content)) {
|
|
5782
|
+
return false;
|
|
5783
|
+
}
|
|
5784
|
+
return content.type === "component";
|
|
5785
|
+
}
|
|
5786
|
+
function getLatestMessageTextSegment(content) {
|
|
5787
|
+
if (!Array.isArray(content)) {
|
|
5788
|
+
return formatUnknownMessageContent(content);
|
|
5789
|
+
}
|
|
5790
|
+
let currentSegment = "";
|
|
5791
|
+
let latestSegment = "";
|
|
5792
|
+
for (const item of content) {
|
|
5793
|
+
if (isSummaryTextBoundary(item)) {
|
|
5794
|
+
if (normalizeMessageText(currentSegment)) {
|
|
5795
|
+
latestSegment = currentSegment;
|
|
5796
|
+
}
|
|
5797
|
+
currentSegment = "";
|
|
5798
|
+
continue;
|
|
5799
|
+
}
|
|
5800
|
+
currentSegment += formatUnknownMessageContent(item);
|
|
5801
|
+
}
|
|
5802
|
+
return normalizeMessageText(currentSegment) ? currentSegment : latestSegment;
|
|
5803
|
+
}
|
|
5777
5804
|
function getMessagePlainText(message) {
|
|
5778
|
-
return
|
|
5805
|
+
return normalizeMessageText(getLatestMessageTextSegment(message.content));
|
|
5779
5806
|
}
|
|
5780
5807
|
function findLatestMessageMatchByType(messages, types) {
|
|
5781
5808
|
for (let index = messages.length - 1; index >= 0; index -= 1) {
|
|
@@ -10205,6 +10232,7 @@ function RequestUserInputResultCard({
|
|
|
10205
10232
|
}
|
|
10206
10233
|
|
|
10207
10234
|
// src/components/thread/messages/widget.tsx
|
|
10235
|
+
var import_react7 = require("react");
|
|
10208
10236
|
var import_a2ui_react = require("@xpert-ai/a2ui-react");
|
|
10209
10237
|
var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
10210
10238
|
function WidgetMessage({ messageId, data }) {
|
|
@@ -10213,10 +10241,21 @@ function WidgetMessage({ messageId, data }) {
|
|
|
10213
10241
|
const baseSurfaceId = `widget-${messageId}`;
|
|
10214
10242
|
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: "space-y-3", children: widgets.map((widget, index) => {
|
|
10215
10243
|
const config = widget?.config;
|
|
10216
|
-
|
|
10244
|
+
const messages = Array.isArray(widget?.messages) ? widget.messages : [];
|
|
10245
|
+
const surfaceId = widgets.length > 1 ? `${baseSurfaceId}-${index}` : baseSurfaceId;
|
|
10246
|
+
if (messages.length > 0) {
|
|
10247
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
10248
|
+
FlatWidgetSurface,
|
|
10249
|
+
{
|
|
10250
|
+
messages,
|
|
10251
|
+
surfaceId
|
|
10252
|
+
},
|
|
10253
|
+
widget?.name ?? surfaceId
|
|
10254
|
+
);
|
|
10255
|
+
}
|
|
10256
|
+
if (!hasLegacySurface(config)) {
|
|
10217
10257
|
return null;
|
|
10218
10258
|
}
|
|
10219
|
-
const surfaceId = widgets.length > 1 ? `${baseSurfaceId}-${index}` : baseSurfaceId;
|
|
10220
10259
|
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
10221
10260
|
import_a2ui_react.SurfaceRenderer,
|
|
10222
10261
|
{
|
|
@@ -10227,6 +10266,283 @@ function WidgetMessage({ messageId, data }) {
|
|
|
10227
10266
|
);
|
|
10228
10267
|
}) });
|
|
10229
10268
|
}
|
|
10269
|
+
function FlatWidgetSurface({
|
|
10270
|
+
messages,
|
|
10271
|
+
surfaceId
|
|
10272
|
+
}) {
|
|
10273
|
+
const { processMessages } = (0, import_a2ui_react.useA2UI)();
|
|
10274
|
+
const normalizedMessages = (0, import_react7.useMemo)(
|
|
10275
|
+
() => normalizeFlatWidgetMessages(messages, surfaceId),
|
|
10276
|
+
[messages, surfaceId]
|
|
10277
|
+
);
|
|
10278
|
+
(0, import_react7.useEffect)(() => {
|
|
10279
|
+
if (normalizedMessages.length === 0) return;
|
|
10280
|
+
processMessages(normalizedMessages);
|
|
10281
|
+
return () => {
|
|
10282
|
+
processMessages([{ deleteSurface: { surfaceId } }]);
|
|
10283
|
+
};
|
|
10284
|
+
}, [normalizedMessages, processMessages, surfaceId]);
|
|
10285
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_a2ui_react.A2UIRenderer, { surfaceId });
|
|
10286
|
+
}
|
|
10287
|
+
function normalizeFlatWidgetMessages(messages, surfaceId) {
|
|
10288
|
+
const generatedTemplateDataPaths = collectTemplateDataPaths(messages);
|
|
10289
|
+
const indexedRowsByPath = collectIndexedRowsByPath(
|
|
10290
|
+
messages,
|
|
10291
|
+
generatedTemplateDataPaths
|
|
10292
|
+
);
|
|
10293
|
+
return messages.map((message) => ({
|
|
10294
|
+
...message,
|
|
10295
|
+
...message.beginRendering ? {
|
|
10296
|
+
beginRendering: {
|
|
10297
|
+
...message.beginRendering,
|
|
10298
|
+
surfaceId
|
|
10299
|
+
}
|
|
10300
|
+
} : {},
|
|
10301
|
+
...message.surfaceUpdate ? {
|
|
10302
|
+
surfaceUpdate: {
|
|
10303
|
+
...message.surfaceUpdate,
|
|
10304
|
+
surfaceId,
|
|
10305
|
+
components: normalizeComponentInstances(
|
|
10306
|
+
message.surfaceUpdate.components
|
|
10307
|
+
)
|
|
10308
|
+
}
|
|
10309
|
+
} : {},
|
|
10310
|
+
...message.dataModelUpdate ? {
|
|
10311
|
+
dataModelUpdate: normalizeDataModelUpdate(
|
|
10312
|
+
message.dataModelUpdate,
|
|
10313
|
+
surfaceId,
|
|
10314
|
+
indexedRowsByPath
|
|
10315
|
+
)
|
|
10316
|
+
} : {},
|
|
10317
|
+
...message.deleteSurface ? {
|
|
10318
|
+
deleteSurface: {
|
|
10319
|
+
...message.deleteSurface,
|
|
10320
|
+
surfaceId
|
|
10321
|
+
}
|
|
10322
|
+
} : {}
|
|
10323
|
+
}));
|
|
10324
|
+
}
|
|
10325
|
+
function normalizeDataModelUpdate(dataModelUpdate, surfaceId, indexedRowsByPath) {
|
|
10326
|
+
const path = dataModelUpdate.path ?? "/";
|
|
10327
|
+
const indexedRows = indexedRowsByPath.get(path);
|
|
10328
|
+
if (!indexedRows) {
|
|
10329
|
+
return {
|
|
10330
|
+
...dataModelUpdate,
|
|
10331
|
+
surfaceId
|
|
10332
|
+
};
|
|
10333
|
+
}
|
|
10334
|
+
return {
|
|
10335
|
+
...dataModelUpdate,
|
|
10336
|
+
surfaceId,
|
|
10337
|
+
contents: [
|
|
10338
|
+
{
|
|
10339
|
+
key: ".",
|
|
10340
|
+
valueString: JSON.stringify(indexedRows)
|
|
10341
|
+
}
|
|
10342
|
+
]
|
|
10343
|
+
};
|
|
10344
|
+
}
|
|
10345
|
+
function collectTemplateDataPaths(messages) {
|
|
10346
|
+
const paths = /* @__PURE__ */ new Set();
|
|
10347
|
+
for (const message of messages) {
|
|
10348
|
+
for (const component of message.surfaceUpdate?.components ?? []) {
|
|
10349
|
+
const componentType = getComponentType(component);
|
|
10350
|
+
if (componentType !== "List") continue;
|
|
10351
|
+
const properties = getComponentProperties(component);
|
|
10352
|
+
const children = getObjectProperty(properties, "children");
|
|
10353
|
+
const template = getObjectProperty(children, "template");
|
|
10354
|
+
const dataPath = getStringProperty(template, "dataPath") ?? getStringProperty(template, "dataBinding");
|
|
10355
|
+
if (dataPath) {
|
|
10356
|
+
paths.add(dataPath);
|
|
10357
|
+
}
|
|
10358
|
+
}
|
|
10359
|
+
}
|
|
10360
|
+
return paths;
|
|
10361
|
+
}
|
|
10362
|
+
function collectIndexedRowsByPath(messages, generatedTemplateDataPaths) {
|
|
10363
|
+
const indexedRowsByPath = /* @__PURE__ */ new Map();
|
|
10364
|
+
for (const message of messages) {
|
|
10365
|
+
const dataModelUpdate = message.dataModelUpdate;
|
|
10366
|
+
const path = dataModelUpdate?.path ?? "/";
|
|
10367
|
+
if (!dataModelUpdate || !generatedTemplateDataPaths.has(path)) {
|
|
10368
|
+
continue;
|
|
10369
|
+
}
|
|
10370
|
+
const indexedRows = convertIndexedValueMapsToRows(
|
|
10371
|
+
dataModelUpdate.contents
|
|
10372
|
+
);
|
|
10373
|
+
if (indexedRows) {
|
|
10374
|
+
indexedRowsByPath.set(path, indexedRows);
|
|
10375
|
+
}
|
|
10376
|
+
}
|
|
10377
|
+
return indexedRowsByPath;
|
|
10378
|
+
}
|
|
10379
|
+
function convertIndexedValueMapsToRows(contents) {
|
|
10380
|
+
const rows = [];
|
|
10381
|
+
let hasIndexedRows = false;
|
|
10382
|
+
for (const item of contents) {
|
|
10383
|
+
const value = readValueMapValue(item);
|
|
10384
|
+
if (value === void 0) {
|
|
10385
|
+
continue;
|
|
10386
|
+
}
|
|
10387
|
+
const match = item.key.match(/^(?:r(\d+)|row_(\d+))_(.+)$/);
|
|
10388
|
+
if (!match) {
|
|
10389
|
+
rows[0] = {
|
|
10390
|
+
...rows[0] ?? {},
|
|
10391
|
+
[item.key]: value
|
|
10392
|
+
};
|
|
10393
|
+
continue;
|
|
10394
|
+
}
|
|
10395
|
+
const index = Number(match[1] ?? match[2]);
|
|
10396
|
+
const field = match[3];
|
|
10397
|
+
if (!Number.isInteger(index)) {
|
|
10398
|
+
continue;
|
|
10399
|
+
}
|
|
10400
|
+
rows[index] = {
|
|
10401
|
+
...rows[index] ?? {},
|
|
10402
|
+
[field]: value
|
|
10403
|
+
};
|
|
10404
|
+
hasIndexedRows = true;
|
|
10405
|
+
}
|
|
10406
|
+
return hasIndexedRows ? rows.map((row) => row ?? {}) : void 0;
|
|
10407
|
+
}
|
|
10408
|
+
function readValueMapValue(valueMap) {
|
|
10409
|
+
if (valueMap.valueString !== void 0) return valueMap.valueString;
|
|
10410
|
+
if (valueMap.valueNumber !== void 0) return valueMap.valueNumber;
|
|
10411
|
+
if (valueMap.valueBoolean !== void 0) return valueMap.valueBoolean;
|
|
10412
|
+
if (Array.isArray(valueMap.valueMap)) {
|
|
10413
|
+
return valueMap.valueMap.reduce((result, item) => {
|
|
10414
|
+
const value = readValueMapValue(item);
|
|
10415
|
+
if (value !== void 0) {
|
|
10416
|
+
result[item.key] = value;
|
|
10417
|
+
}
|
|
10418
|
+
return result;
|
|
10419
|
+
}, {});
|
|
10420
|
+
}
|
|
10421
|
+
return void 0;
|
|
10422
|
+
}
|
|
10423
|
+
function normalizeComponentInstances(components) {
|
|
10424
|
+
return components.flatMap((component) => {
|
|
10425
|
+
const componentType = getComponentType(component);
|
|
10426
|
+
const properties = getComponentProperties(component);
|
|
10427
|
+
if (!componentType || !properties) {
|
|
10428
|
+
return [component];
|
|
10429
|
+
}
|
|
10430
|
+
const normalizedProperties = normalizeComponentProperties(
|
|
10431
|
+
componentType,
|
|
10432
|
+
properties
|
|
10433
|
+
);
|
|
10434
|
+
const normalizedComponent = {
|
|
10435
|
+
...component,
|
|
10436
|
+
component: {
|
|
10437
|
+
[componentType]: normalizedProperties
|
|
10438
|
+
}
|
|
10439
|
+
};
|
|
10440
|
+
const templateComponent = getGeneratedTemplateComponent(properties);
|
|
10441
|
+
if (!templateComponent) {
|
|
10442
|
+
return [normalizedComponent];
|
|
10443
|
+
}
|
|
10444
|
+
return [
|
|
10445
|
+
normalizedComponent,
|
|
10446
|
+
...normalizeComponentInstances([templateComponent])
|
|
10447
|
+
];
|
|
10448
|
+
});
|
|
10449
|
+
}
|
|
10450
|
+
function normalizeComponentProperties(componentType, properties) {
|
|
10451
|
+
const normalized = Object.fromEntries(
|
|
10452
|
+
Object.entries(properties).map(([key, value]) => [
|
|
10453
|
+
key,
|
|
10454
|
+
normalizePropertyValue(key, value)
|
|
10455
|
+
])
|
|
10456
|
+
);
|
|
10457
|
+
if (componentType !== "List") {
|
|
10458
|
+
return normalized;
|
|
10459
|
+
}
|
|
10460
|
+
const children = getObjectProperty(normalized, "children");
|
|
10461
|
+
const template = getObjectProperty(children, "template");
|
|
10462
|
+
const dataPath = getStringProperty(template, "dataPath");
|
|
10463
|
+
const itemTemplate = getObjectProperty(template, "itemTemplate");
|
|
10464
|
+
const componentId = getStringProperty(template, "componentId") ?? getStringProperty(itemTemplate, "id");
|
|
10465
|
+
if (!dataPath || !componentId) {
|
|
10466
|
+
return normalized;
|
|
10467
|
+
}
|
|
10468
|
+
const direction = getStringProperty(children, "direction");
|
|
10469
|
+
if (direction && !normalized.direction) {
|
|
10470
|
+
normalized.direction = direction;
|
|
10471
|
+
}
|
|
10472
|
+
normalized.children = {
|
|
10473
|
+
template: {
|
|
10474
|
+
componentId,
|
|
10475
|
+
dataBinding: dataPath
|
|
10476
|
+
}
|
|
10477
|
+
};
|
|
10478
|
+
return normalized;
|
|
10479
|
+
}
|
|
10480
|
+
function normalizePropertyValue(key, value) {
|
|
10481
|
+
if (key === "text" && typeof value === "string") {
|
|
10482
|
+
return { literalString: value };
|
|
10483
|
+
}
|
|
10484
|
+
if (Array.isArray(value)) {
|
|
10485
|
+
return value.map((item) => normalizePropertyValue(key, item));
|
|
10486
|
+
}
|
|
10487
|
+
if (!isPlainObject2(value)) {
|
|
10488
|
+
return value;
|
|
10489
|
+
}
|
|
10490
|
+
return Object.fromEntries(
|
|
10491
|
+
Object.entries(value).map(([childKey, childValue]) => [
|
|
10492
|
+
childKey,
|
|
10493
|
+
childKey === "path" && typeof childValue === "string" ? normalizeGeneratedIndexedPath(childValue) : normalizePropertyValue(childKey, childValue)
|
|
10494
|
+
])
|
|
10495
|
+
);
|
|
10496
|
+
}
|
|
10497
|
+
function normalizeGeneratedIndexedPath(path) {
|
|
10498
|
+
const match = path.match(/^\/[^/]+\/r\{index\}_(.+)$/);
|
|
10499
|
+
return match?.[1] ?? path;
|
|
10500
|
+
}
|
|
10501
|
+
function getGeneratedTemplateComponent(properties) {
|
|
10502
|
+
const children = getObjectProperty(properties, "children");
|
|
10503
|
+
const template = getObjectProperty(children, "template");
|
|
10504
|
+
const itemTemplate = getObjectProperty(template, "itemTemplate");
|
|
10505
|
+
const id = getStringProperty(itemTemplate, "id");
|
|
10506
|
+
const component = getObjectProperty(itemTemplate, "component");
|
|
10507
|
+
if (!id || !component) {
|
|
10508
|
+
return void 0;
|
|
10509
|
+
}
|
|
10510
|
+
return {
|
|
10511
|
+
id,
|
|
10512
|
+
component
|
|
10513
|
+
};
|
|
10514
|
+
}
|
|
10515
|
+
function getComponentType(component) {
|
|
10516
|
+
const entries = Object.keys(component.component ?? {});
|
|
10517
|
+
return entries.length === 1 ? entries[0] : void 0;
|
|
10518
|
+
}
|
|
10519
|
+
function getComponentProperties(component) {
|
|
10520
|
+
const componentType = getComponentType(component);
|
|
10521
|
+
if (!componentType) {
|
|
10522
|
+
return void 0;
|
|
10523
|
+
}
|
|
10524
|
+
return getObjectProperty(component.component, componentType);
|
|
10525
|
+
}
|
|
10526
|
+
function getObjectProperty(value, key) {
|
|
10527
|
+
if (!isPlainObject2(value)) {
|
|
10528
|
+
return void 0;
|
|
10529
|
+
}
|
|
10530
|
+
const property = value[key];
|
|
10531
|
+
return isPlainObject2(property) ? property : void 0;
|
|
10532
|
+
}
|
|
10533
|
+
function getStringProperty(value, key) {
|
|
10534
|
+
if (!isPlainObject2(value)) {
|
|
10535
|
+
return void 0;
|
|
10536
|
+
}
|
|
10537
|
+
const property = value[key];
|
|
10538
|
+
return typeof property === "string" ? property : void 0;
|
|
10539
|
+
}
|
|
10540
|
+
function isPlainObject2(value) {
|
|
10541
|
+
return !!value && typeof value === "object" && !Array.isArray(value);
|
|
10542
|
+
}
|
|
10543
|
+
function hasLegacySurface(surface) {
|
|
10544
|
+
return !!surface?.componentTree;
|
|
10545
|
+
}
|
|
10230
10546
|
|
|
10231
10547
|
// src/components/thread/messages/ai.tsx
|
|
10232
10548
|
var import_jsx_runtime39 = require("react/jsx-runtime");
|
package/dist/index.js
CHANGED
|
@@ -5813,8 +5813,35 @@ function formatUnknownMessageContent(content) {
|
|
|
5813
5813
|
const contentWithText = content;
|
|
5814
5814
|
return typeof contentWithText.text === "string" ? contentWithText.text : "";
|
|
5815
5815
|
}
|
|
5816
|
+
function normalizeMessageText(value) {
|
|
5817
|
+
return value.replace(/\s+/g, " ").trim();
|
|
5818
|
+
}
|
|
5819
|
+
function isSummaryTextBoundary(content) {
|
|
5820
|
+
if (!content || typeof content !== "object" || Array.isArray(content)) {
|
|
5821
|
+
return false;
|
|
5822
|
+
}
|
|
5823
|
+
return content.type === "component";
|
|
5824
|
+
}
|
|
5825
|
+
function getLatestMessageTextSegment(content) {
|
|
5826
|
+
if (!Array.isArray(content)) {
|
|
5827
|
+
return formatUnknownMessageContent(content);
|
|
5828
|
+
}
|
|
5829
|
+
let currentSegment = "";
|
|
5830
|
+
let latestSegment = "";
|
|
5831
|
+
for (const item of content) {
|
|
5832
|
+
if (isSummaryTextBoundary(item)) {
|
|
5833
|
+
if (normalizeMessageText(currentSegment)) {
|
|
5834
|
+
latestSegment = currentSegment;
|
|
5835
|
+
}
|
|
5836
|
+
currentSegment = "";
|
|
5837
|
+
continue;
|
|
5838
|
+
}
|
|
5839
|
+
currentSegment += formatUnknownMessageContent(item);
|
|
5840
|
+
}
|
|
5841
|
+
return normalizeMessageText(currentSegment) ? currentSegment : latestSegment;
|
|
5842
|
+
}
|
|
5816
5843
|
function getMessagePlainText(message) {
|
|
5817
|
-
return
|
|
5844
|
+
return normalizeMessageText(getLatestMessageTextSegment(message.content));
|
|
5818
5845
|
}
|
|
5819
5846
|
function findLatestMessageMatchByType(messages, types) {
|
|
5820
5847
|
for (let index = messages.length - 1; index >= 0; index -= 1) {
|
|
@@ -10295,7 +10322,12 @@ function RequestUserInputResultCard({
|
|
|
10295
10322
|
}
|
|
10296
10323
|
|
|
10297
10324
|
// src/components/thread/messages/widget.tsx
|
|
10298
|
-
import {
|
|
10325
|
+
import { useEffect as useEffect15, useMemo as useMemo10 } from "react";
|
|
10326
|
+
import {
|
|
10327
|
+
A2UIRenderer,
|
|
10328
|
+
SurfaceRenderer,
|
|
10329
|
+
useA2UI
|
|
10330
|
+
} from "@xpert-ai/a2ui-react";
|
|
10299
10331
|
import { jsx as jsx38 } from "react/jsx-runtime";
|
|
10300
10332
|
function WidgetMessage({ messageId, data }) {
|
|
10301
10333
|
const widgets = Array.isArray(data.widgets) ? data.widgets : [];
|
|
@@ -10303,10 +10335,21 @@ function WidgetMessage({ messageId, data }) {
|
|
|
10303
10335
|
const baseSurfaceId = `widget-${messageId}`;
|
|
10304
10336
|
return /* @__PURE__ */ jsx38("div", { className: "space-y-3", children: widgets.map((widget, index) => {
|
|
10305
10337
|
const config = widget?.config;
|
|
10306
|
-
|
|
10338
|
+
const messages = Array.isArray(widget?.messages) ? widget.messages : [];
|
|
10339
|
+
const surfaceId = widgets.length > 1 ? `${baseSurfaceId}-${index}` : baseSurfaceId;
|
|
10340
|
+
if (messages.length > 0) {
|
|
10341
|
+
return /* @__PURE__ */ jsx38(
|
|
10342
|
+
FlatWidgetSurface,
|
|
10343
|
+
{
|
|
10344
|
+
messages,
|
|
10345
|
+
surfaceId
|
|
10346
|
+
},
|
|
10347
|
+
widget?.name ?? surfaceId
|
|
10348
|
+
);
|
|
10349
|
+
}
|
|
10350
|
+
if (!hasLegacySurface(config)) {
|
|
10307
10351
|
return null;
|
|
10308
10352
|
}
|
|
10309
|
-
const surfaceId = widgets.length > 1 ? `${baseSurfaceId}-${index}` : baseSurfaceId;
|
|
10310
10353
|
return /* @__PURE__ */ jsx38(
|
|
10311
10354
|
SurfaceRenderer,
|
|
10312
10355
|
{
|
|
@@ -10317,6 +10360,283 @@ function WidgetMessage({ messageId, data }) {
|
|
|
10317
10360
|
);
|
|
10318
10361
|
}) });
|
|
10319
10362
|
}
|
|
10363
|
+
function FlatWidgetSurface({
|
|
10364
|
+
messages,
|
|
10365
|
+
surfaceId
|
|
10366
|
+
}) {
|
|
10367
|
+
const { processMessages } = useA2UI();
|
|
10368
|
+
const normalizedMessages = useMemo10(
|
|
10369
|
+
() => normalizeFlatWidgetMessages(messages, surfaceId),
|
|
10370
|
+
[messages, surfaceId]
|
|
10371
|
+
);
|
|
10372
|
+
useEffect15(() => {
|
|
10373
|
+
if (normalizedMessages.length === 0) return;
|
|
10374
|
+
processMessages(normalizedMessages);
|
|
10375
|
+
return () => {
|
|
10376
|
+
processMessages([{ deleteSurface: { surfaceId } }]);
|
|
10377
|
+
};
|
|
10378
|
+
}, [normalizedMessages, processMessages, surfaceId]);
|
|
10379
|
+
return /* @__PURE__ */ jsx38(A2UIRenderer, { surfaceId });
|
|
10380
|
+
}
|
|
10381
|
+
function normalizeFlatWidgetMessages(messages, surfaceId) {
|
|
10382
|
+
const generatedTemplateDataPaths = collectTemplateDataPaths(messages);
|
|
10383
|
+
const indexedRowsByPath = collectIndexedRowsByPath(
|
|
10384
|
+
messages,
|
|
10385
|
+
generatedTemplateDataPaths
|
|
10386
|
+
);
|
|
10387
|
+
return messages.map((message) => ({
|
|
10388
|
+
...message,
|
|
10389
|
+
...message.beginRendering ? {
|
|
10390
|
+
beginRendering: {
|
|
10391
|
+
...message.beginRendering,
|
|
10392
|
+
surfaceId
|
|
10393
|
+
}
|
|
10394
|
+
} : {},
|
|
10395
|
+
...message.surfaceUpdate ? {
|
|
10396
|
+
surfaceUpdate: {
|
|
10397
|
+
...message.surfaceUpdate,
|
|
10398
|
+
surfaceId,
|
|
10399
|
+
components: normalizeComponentInstances(
|
|
10400
|
+
message.surfaceUpdate.components
|
|
10401
|
+
)
|
|
10402
|
+
}
|
|
10403
|
+
} : {},
|
|
10404
|
+
...message.dataModelUpdate ? {
|
|
10405
|
+
dataModelUpdate: normalizeDataModelUpdate(
|
|
10406
|
+
message.dataModelUpdate,
|
|
10407
|
+
surfaceId,
|
|
10408
|
+
indexedRowsByPath
|
|
10409
|
+
)
|
|
10410
|
+
} : {},
|
|
10411
|
+
...message.deleteSurface ? {
|
|
10412
|
+
deleteSurface: {
|
|
10413
|
+
...message.deleteSurface,
|
|
10414
|
+
surfaceId
|
|
10415
|
+
}
|
|
10416
|
+
} : {}
|
|
10417
|
+
}));
|
|
10418
|
+
}
|
|
10419
|
+
function normalizeDataModelUpdate(dataModelUpdate, surfaceId, indexedRowsByPath) {
|
|
10420
|
+
const path = dataModelUpdate.path ?? "/";
|
|
10421
|
+
const indexedRows = indexedRowsByPath.get(path);
|
|
10422
|
+
if (!indexedRows) {
|
|
10423
|
+
return {
|
|
10424
|
+
...dataModelUpdate,
|
|
10425
|
+
surfaceId
|
|
10426
|
+
};
|
|
10427
|
+
}
|
|
10428
|
+
return {
|
|
10429
|
+
...dataModelUpdate,
|
|
10430
|
+
surfaceId,
|
|
10431
|
+
contents: [
|
|
10432
|
+
{
|
|
10433
|
+
key: ".",
|
|
10434
|
+
valueString: JSON.stringify(indexedRows)
|
|
10435
|
+
}
|
|
10436
|
+
]
|
|
10437
|
+
};
|
|
10438
|
+
}
|
|
10439
|
+
function collectTemplateDataPaths(messages) {
|
|
10440
|
+
const paths = /* @__PURE__ */ new Set();
|
|
10441
|
+
for (const message of messages) {
|
|
10442
|
+
for (const component of message.surfaceUpdate?.components ?? []) {
|
|
10443
|
+
const componentType = getComponentType(component);
|
|
10444
|
+
if (componentType !== "List") continue;
|
|
10445
|
+
const properties = getComponentProperties(component);
|
|
10446
|
+
const children = getObjectProperty(properties, "children");
|
|
10447
|
+
const template = getObjectProperty(children, "template");
|
|
10448
|
+
const dataPath = getStringProperty(template, "dataPath") ?? getStringProperty(template, "dataBinding");
|
|
10449
|
+
if (dataPath) {
|
|
10450
|
+
paths.add(dataPath);
|
|
10451
|
+
}
|
|
10452
|
+
}
|
|
10453
|
+
}
|
|
10454
|
+
return paths;
|
|
10455
|
+
}
|
|
10456
|
+
function collectIndexedRowsByPath(messages, generatedTemplateDataPaths) {
|
|
10457
|
+
const indexedRowsByPath = /* @__PURE__ */ new Map();
|
|
10458
|
+
for (const message of messages) {
|
|
10459
|
+
const dataModelUpdate = message.dataModelUpdate;
|
|
10460
|
+
const path = dataModelUpdate?.path ?? "/";
|
|
10461
|
+
if (!dataModelUpdate || !generatedTemplateDataPaths.has(path)) {
|
|
10462
|
+
continue;
|
|
10463
|
+
}
|
|
10464
|
+
const indexedRows = convertIndexedValueMapsToRows(
|
|
10465
|
+
dataModelUpdate.contents
|
|
10466
|
+
);
|
|
10467
|
+
if (indexedRows) {
|
|
10468
|
+
indexedRowsByPath.set(path, indexedRows);
|
|
10469
|
+
}
|
|
10470
|
+
}
|
|
10471
|
+
return indexedRowsByPath;
|
|
10472
|
+
}
|
|
10473
|
+
function convertIndexedValueMapsToRows(contents) {
|
|
10474
|
+
const rows = [];
|
|
10475
|
+
let hasIndexedRows = false;
|
|
10476
|
+
for (const item of contents) {
|
|
10477
|
+
const value = readValueMapValue(item);
|
|
10478
|
+
if (value === void 0) {
|
|
10479
|
+
continue;
|
|
10480
|
+
}
|
|
10481
|
+
const match = item.key.match(/^(?:r(\d+)|row_(\d+))_(.+)$/);
|
|
10482
|
+
if (!match) {
|
|
10483
|
+
rows[0] = {
|
|
10484
|
+
...rows[0] ?? {},
|
|
10485
|
+
[item.key]: value
|
|
10486
|
+
};
|
|
10487
|
+
continue;
|
|
10488
|
+
}
|
|
10489
|
+
const index = Number(match[1] ?? match[2]);
|
|
10490
|
+
const field = match[3];
|
|
10491
|
+
if (!Number.isInteger(index)) {
|
|
10492
|
+
continue;
|
|
10493
|
+
}
|
|
10494
|
+
rows[index] = {
|
|
10495
|
+
...rows[index] ?? {},
|
|
10496
|
+
[field]: value
|
|
10497
|
+
};
|
|
10498
|
+
hasIndexedRows = true;
|
|
10499
|
+
}
|
|
10500
|
+
return hasIndexedRows ? rows.map((row) => row ?? {}) : void 0;
|
|
10501
|
+
}
|
|
10502
|
+
function readValueMapValue(valueMap) {
|
|
10503
|
+
if (valueMap.valueString !== void 0) return valueMap.valueString;
|
|
10504
|
+
if (valueMap.valueNumber !== void 0) return valueMap.valueNumber;
|
|
10505
|
+
if (valueMap.valueBoolean !== void 0) return valueMap.valueBoolean;
|
|
10506
|
+
if (Array.isArray(valueMap.valueMap)) {
|
|
10507
|
+
return valueMap.valueMap.reduce((result, item) => {
|
|
10508
|
+
const value = readValueMapValue(item);
|
|
10509
|
+
if (value !== void 0) {
|
|
10510
|
+
result[item.key] = value;
|
|
10511
|
+
}
|
|
10512
|
+
return result;
|
|
10513
|
+
}, {});
|
|
10514
|
+
}
|
|
10515
|
+
return void 0;
|
|
10516
|
+
}
|
|
10517
|
+
function normalizeComponentInstances(components) {
|
|
10518
|
+
return components.flatMap((component) => {
|
|
10519
|
+
const componentType = getComponentType(component);
|
|
10520
|
+
const properties = getComponentProperties(component);
|
|
10521
|
+
if (!componentType || !properties) {
|
|
10522
|
+
return [component];
|
|
10523
|
+
}
|
|
10524
|
+
const normalizedProperties = normalizeComponentProperties(
|
|
10525
|
+
componentType,
|
|
10526
|
+
properties
|
|
10527
|
+
);
|
|
10528
|
+
const normalizedComponent = {
|
|
10529
|
+
...component,
|
|
10530
|
+
component: {
|
|
10531
|
+
[componentType]: normalizedProperties
|
|
10532
|
+
}
|
|
10533
|
+
};
|
|
10534
|
+
const templateComponent = getGeneratedTemplateComponent(properties);
|
|
10535
|
+
if (!templateComponent) {
|
|
10536
|
+
return [normalizedComponent];
|
|
10537
|
+
}
|
|
10538
|
+
return [
|
|
10539
|
+
normalizedComponent,
|
|
10540
|
+
...normalizeComponentInstances([templateComponent])
|
|
10541
|
+
];
|
|
10542
|
+
});
|
|
10543
|
+
}
|
|
10544
|
+
function normalizeComponentProperties(componentType, properties) {
|
|
10545
|
+
const normalized = Object.fromEntries(
|
|
10546
|
+
Object.entries(properties).map(([key, value]) => [
|
|
10547
|
+
key,
|
|
10548
|
+
normalizePropertyValue(key, value)
|
|
10549
|
+
])
|
|
10550
|
+
);
|
|
10551
|
+
if (componentType !== "List") {
|
|
10552
|
+
return normalized;
|
|
10553
|
+
}
|
|
10554
|
+
const children = getObjectProperty(normalized, "children");
|
|
10555
|
+
const template = getObjectProperty(children, "template");
|
|
10556
|
+
const dataPath = getStringProperty(template, "dataPath");
|
|
10557
|
+
const itemTemplate = getObjectProperty(template, "itemTemplate");
|
|
10558
|
+
const componentId = getStringProperty(template, "componentId") ?? getStringProperty(itemTemplate, "id");
|
|
10559
|
+
if (!dataPath || !componentId) {
|
|
10560
|
+
return normalized;
|
|
10561
|
+
}
|
|
10562
|
+
const direction = getStringProperty(children, "direction");
|
|
10563
|
+
if (direction && !normalized.direction) {
|
|
10564
|
+
normalized.direction = direction;
|
|
10565
|
+
}
|
|
10566
|
+
normalized.children = {
|
|
10567
|
+
template: {
|
|
10568
|
+
componentId,
|
|
10569
|
+
dataBinding: dataPath
|
|
10570
|
+
}
|
|
10571
|
+
};
|
|
10572
|
+
return normalized;
|
|
10573
|
+
}
|
|
10574
|
+
function normalizePropertyValue(key, value) {
|
|
10575
|
+
if (key === "text" && typeof value === "string") {
|
|
10576
|
+
return { literalString: value };
|
|
10577
|
+
}
|
|
10578
|
+
if (Array.isArray(value)) {
|
|
10579
|
+
return value.map((item) => normalizePropertyValue(key, item));
|
|
10580
|
+
}
|
|
10581
|
+
if (!isPlainObject2(value)) {
|
|
10582
|
+
return value;
|
|
10583
|
+
}
|
|
10584
|
+
return Object.fromEntries(
|
|
10585
|
+
Object.entries(value).map(([childKey, childValue]) => [
|
|
10586
|
+
childKey,
|
|
10587
|
+
childKey === "path" && typeof childValue === "string" ? normalizeGeneratedIndexedPath(childValue) : normalizePropertyValue(childKey, childValue)
|
|
10588
|
+
])
|
|
10589
|
+
);
|
|
10590
|
+
}
|
|
10591
|
+
function normalizeGeneratedIndexedPath(path) {
|
|
10592
|
+
const match = path.match(/^\/[^/]+\/r\{index\}_(.+)$/);
|
|
10593
|
+
return match?.[1] ?? path;
|
|
10594
|
+
}
|
|
10595
|
+
function getGeneratedTemplateComponent(properties) {
|
|
10596
|
+
const children = getObjectProperty(properties, "children");
|
|
10597
|
+
const template = getObjectProperty(children, "template");
|
|
10598
|
+
const itemTemplate = getObjectProperty(template, "itemTemplate");
|
|
10599
|
+
const id = getStringProperty(itemTemplate, "id");
|
|
10600
|
+
const component = getObjectProperty(itemTemplate, "component");
|
|
10601
|
+
if (!id || !component) {
|
|
10602
|
+
return void 0;
|
|
10603
|
+
}
|
|
10604
|
+
return {
|
|
10605
|
+
id,
|
|
10606
|
+
component
|
|
10607
|
+
};
|
|
10608
|
+
}
|
|
10609
|
+
function getComponentType(component) {
|
|
10610
|
+
const entries = Object.keys(component.component ?? {});
|
|
10611
|
+
return entries.length === 1 ? entries[0] : void 0;
|
|
10612
|
+
}
|
|
10613
|
+
function getComponentProperties(component) {
|
|
10614
|
+
const componentType = getComponentType(component);
|
|
10615
|
+
if (!componentType) {
|
|
10616
|
+
return void 0;
|
|
10617
|
+
}
|
|
10618
|
+
return getObjectProperty(component.component, componentType);
|
|
10619
|
+
}
|
|
10620
|
+
function getObjectProperty(value, key) {
|
|
10621
|
+
if (!isPlainObject2(value)) {
|
|
10622
|
+
return void 0;
|
|
10623
|
+
}
|
|
10624
|
+
const property = value[key];
|
|
10625
|
+
return isPlainObject2(property) ? property : void 0;
|
|
10626
|
+
}
|
|
10627
|
+
function getStringProperty(value, key) {
|
|
10628
|
+
if (!isPlainObject2(value)) {
|
|
10629
|
+
return void 0;
|
|
10630
|
+
}
|
|
10631
|
+
const property = value[key];
|
|
10632
|
+
return typeof property === "string" ? property : void 0;
|
|
10633
|
+
}
|
|
10634
|
+
function isPlainObject2(value) {
|
|
10635
|
+
return !!value && typeof value === "object" && !Array.isArray(value);
|
|
10636
|
+
}
|
|
10637
|
+
function hasLegacySurface(surface) {
|
|
10638
|
+
return !!surface?.componentTree;
|
|
10639
|
+
}
|
|
10320
10640
|
|
|
10321
10641
|
// src/components/thread/messages/ai.tsx
|
|
10322
10642
|
import { jsx as jsx39, jsxs as jsxs26 } from "react/jsx-runtime";
|