@xpert-ai/chatkit-ui 0.3.5 → 0.3.6
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-CAxobs9N.js → _baseUniq-PQJUyd2p.js} +1 -1
- package/dist/app/assets/{abap-wdK8JaHa.js → abap-DBNQvwwq.js} +1 -1
- package/dist/app/assets/{abnf-B4QVrCDX.js → abnf-DAYjyqbD.js} +1 -1
- package/dist/app/assets/{actionscript-BbKSvJrq.js → actionscript-CC6WSmTp.js} +1 -1
- package/dist/app/assets/{ada-BkwiItKH.js → ada-BKGodcKv.js} +1 -1
- package/dist/app/assets/{agda-BHGf_Fgl.js → agda-Btmo1dV2.js} +1 -1
- package/dist/app/assets/{al-CpdhQzD9.js → al-ZGIJe93k.js} +1 -1
- package/dist/app/assets/{antlr4-CLQ7xEno.js → antlr4-5WGUtMyl.js} +1 -1
- package/dist/app/assets/{apacheconf-6iBdrfFM.js → apacheconf-DUR_1QqW.js} +1 -1
- package/dist/app/assets/{apex-DBXBvaz5.js → apex-BintsQD-.js} +1 -1
- package/dist/app/assets/{apl-D8vc149P.js → apl-B7pUHOBS.js} +1 -1
- package/dist/app/assets/{applescript-BTZUYWS_.js → applescript-CanCSogn.js} +1 -1
- package/dist/app/assets/{aql-BxB6KDJQ.js → aql-iDHrUFca.js} +1 -1
- package/dist/app/assets/{arc-CNi1G9DJ.js → arc-VbTm84dM.js} +1 -1
- package/dist/app/assets/{architectureDiagram-Q4EWVU46-BL0mPAR9.js → architectureDiagram-Q4EWVU46-BwbXOlsJ.js} +1 -1
- package/dist/app/assets/{arduino-Cx04QCrp.js → arduino-CvuY6cDV.js} +1 -1
- package/dist/app/assets/{arff-MqnrnEC8.js → arff-C7UK1Sqo.js} +1 -1
- package/dist/app/assets/{asciidoc-sz7M5yXr.js → asciidoc-jaQgm_Ci.js} +1 -1
- package/dist/app/assets/{asm6502-BZ8xfWko.js → asm6502-Bec9iTSO.js} +1 -1
- package/dist/app/assets/{asmatmel-D-cI_as7.js → asmatmel-CWWLYM-f.js} +1 -1
- package/dist/app/assets/{aspnet-wNdsZF1M.js → aspnet-EICvaNos.js} +1 -1
- package/dist/app/assets/{autohotkey-CERdGivs.js → autohotkey-CgvCc8dt.js} +1 -1
- package/dist/app/assets/{autoit-CQsoUza0.js → autoit-BbrdfXjj.js} +1 -1
- package/dist/app/assets/{avisynth-DMTk2nsi.js → avisynth-C7cOgG-q.js} +1 -1
- package/dist/app/assets/{avro-idl-VdXZfwVL.js → avro-idl-BsT9yVqS.js} +1 -1
- package/dist/app/assets/{bash-BKoQnhB6.js → bash-BF1ylQ6_.js} +1 -1
- package/dist/app/assets/{basic-BvRsQ9vo.js → basic-DyO_cuAQ.js} +1 -1
- package/dist/app/assets/{batch-DkZb4POU.js → batch-DdxmhDRT.js} +1 -1
- package/dist/app/assets/{bbcode-BkkYngk6.js → bbcode-Csh0dpf7.js} +1 -1
- package/dist/app/assets/{bicep-DY62eX6n.js → bicep-CEnRCsw4.js} +1 -1
- package/dist/app/assets/{birb-Cf3Wn8DP.js → birb-H4aZEyfE.js} +1 -1
- package/dist/app/assets/{bison-CMVsgR8E.js → bison-B4NzJQL4.js} +1 -1
- package/dist/app/assets/{blockDiagram-DXYQGD6D-DdgOXTCq.js → blockDiagram-DXYQGD6D-BQrs2vZp.js} +1 -1
- package/dist/app/assets/{bnf-C53AC5ba.js → bnf-BpnLOKBL.js} +1 -1
- package/dist/app/assets/{brainfuck-DBcYtGip.js → brainfuck-BcXFtTZS.js} +1 -1
- package/dist/app/assets/{brightscript-uWYyj7Le.js → brightscript-C-G4maiE.js} +1 -1
- package/dist/app/assets/{bro-Bnqn5jLn.js → bro-JcLlkXX7.js} +1 -1
- package/dist/app/assets/{bsl-eeHcx6I3.js → bsl-C7EgrPBt.js} +1 -1
- package/dist/app/assets/{c-Y_E2ZZ8h.js → c-0vDIBgc3.js} +1 -1
- package/dist/app/assets/{c4Diagram-AHTNJAMY-BAZeiIaA.js → c4Diagram-AHTNJAMY-wtHHI5rn.js} +1 -1
- package/dist/app/assets/{cfscript-swSriW5q.js → cfscript-B5a7v4dm.js} +1 -1
- package/dist/app/assets/{chaiscript-BHR5pIfl.js → chaiscript-CC6j4sQE.js} +1 -1
- package/dist/app/assets/channel-B6zrZ2OM.js +1 -0
- package/dist/app/assets/{chunk-4BX2VUAB-Deyo77pg.js → chunk-4BX2VUAB-Dlz831RQ.js} +1 -1
- package/dist/app/assets/{chunk-4TB4RGXK-BSgPz1Fn.js → chunk-4TB4RGXK-D5P5dUqt.js} +1 -1
- package/dist/app/assets/{chunk-55IACEB6-DekOqO8-.js → chunk-55IACEB6-BqMvjwUA.js} +1 -1
- package/dist/app/assets/{chunk-EDXVE4YY-VI2aoR3H.js → chunk-EDXVE4YY-DnPhlqJA.js} +1 -1
- package/dist/app/assets/{chunk-FMBD7UC4-DVPMFZIh.js → chunk-FMBD7UC4-DNRIZD8O.js} +1 -1
- package/dist/app/assets/{chunk-OYMX7WX6-C_5OySCp.js → chunk-OYMX7WX6-JXHjhCxm.js} +1 -1
- package/dist/app/assets/{chunk-QZHKN3VN-CQ4PJ94U.js → chunk-QZHKN3VN-BkxXCZY4.js} +1 -1
- package/dist/app/assets/{chunk-YZCP3GAM-40VMFur6.js → chunk-YZCP3GAM-EpFGzvxp.js} +1 -1
- package/dist/app/assets/{cil-BlB-Qnhz.js → cil-iQdhNO4Q.js} +1 -1
- package/dist/app/assets/classDiagram-6PBFFD2Q-CrRCjWNC.js +1 -0
- package/dist/app/assets/classDiagram-v2-HSJHXN6E-CrRCjWNC.js +1 -0
- package/dist/app/assets/{clike-cGW_OpAz.js → clike-CQAeHYPM.js} +1 -1
- package/dist/app/assets/{clojure-BwM8_y2w.js → clojure-Cql6MpyZ.js} +1 -1
- package/dist/app/assets/clone-DF9MaeHz.js +1 -0
- package/dist/app/assets/{cmake-B_tPIs0N.js → cmake-BfKHjCsg.js} +1 -1
- package/dist/app/assets/{cobol-awMTn3SL.js → cobol-CKkM0fVl.js} +1 -1
- package/dist/app/assets/{coffeescript-BdPUATdq.js → coffeescript-CgyUEXhV.js} +1 -1
- package/dist/app/assets/{concurnas-DD4NroNG.js → concurnas-CeEqG40V.js} +1 -1
- package/dist/app/assets/{coq-WP9t6Mya.js → coq-CkWZFRlP.js} +1 -1
- package/dist/app/assets/{core-Dl1d1z_B.js → core-CcAPm-aU.js} +1 -1
- package/dist/app/assets/{cose-bilkent-S5V4N54A-CIsQWWLS.js → cose-bilkent-S5V4N54A-kULVHEg6.js} +1 -1
- package/dist/app/assets/{cpp-DRq2558J.js → cpp-Bwq_b1tA.js} +1 -1
- package/dist/app/assets/{crystal-CmMEvlYk.js → crystal-YNIUD3Bs.js} +1 -1
- package/dist/app/assets/{csharp-CmdWJQ_7.js → csharp-P6DguRUY.js} +1 -1
- package/dist/app/assets/{cshtml-D-PG0yKy.js → cshtml-B5QmdkLH.js} +1 -1
- package/dist/app/assets/{csp-CoYEQK4_.js → csp-DFeKy3lq.js} +1 -1
- package/dist/app/assets/{css-qzCJaYzE.js → css-CRC3M3rp.js} +1 -1
- package/dist/app/assets/{css-extras-CvcfPwL5.js → css-extras-BFuChsao.js} +1 -1
- package/dist/app/assets/{csv-BOSHHM-P.js → csv-C4LMPB8f.js} +1 -1
- package/dist/app/assets/{cypher-DF-LRYf2.js → cypher-HIcVk2j0.js} +1 -1
- package/dist/app/assets/{d-DT7HGItG.js → d-BnjQOzu7.js} +1 -1
- package/dist/app/assets/{dagre-KV5264BT-BXDHR3FY.js → dagre-KV5264BT-DYeQuZ_S.js} +1 -1
- package/dist/app/assets/{dart-C53tv9tc.js → dart-BY_HEqIc.js} +1 -1
- package/dist/app/assets/{dataweave-DfVl-B8U.js → dataweave-IZkekg5J.js} +1 -1
- package/dist/app/assets/{dax-CtLDIvLu.js → dax-BDxI87qH.js} +1 -1
- package/dist/app/assets/{dhall-B4vfpjKK.js → dhall-BI7me9By.js} +1 -1
- package/dist/app/assets/{diagram-5BDNPKRD-C2jQZSnh.js → diagram-5BDNPKRD-DqUtPt3D.js} +1 -1
- package/dist/app/assets/{diagram-G4DWMVQ6-DkBF8pst.js → diagram-G4DWMVQ6-DUz5iheG.js} +1 -1
- package/dist/app/assets/{diagram-MMDJMWI5-DkBy1EJI.js → diagram-MMDJMWI5-DqMZVdpe.js} +1 -1
- package/dist/app/assets/{diagram-TYMM5635-BG7IFHFj.js → diagram-TYMM5635-D4dMAYPV.js} +1 -1
- package/dist/app/assets/{diff-CAGXr455.js → diff-D1eveguk.js} +1 -1
- package/dist/app/assets/{django-Bt-Xandi.js → django-n2RdeMZg.js} +1 -1
- package/dist/app/assets/{dns-zone-file-CUQqHN_u.js → dns-zone-file-C7ZVuM_8.js} +1 -1
- package/dist/app/assets/{docker-Cmx-jfGB.js → docker-2dKv2uP8.js} +1 -1
- package/dist/app/assets/{dot-CtNw9lX4.js → dot-CnM9kCZh.js} +1 -1
- package/dist/app/assets/{ebnf-Dl_Q5Or1.js → ebnf-DNNgDJ77.js} +1 -1
- package/dist/app/assets/{editorconfig-DZYXnV_C.js → editorconfig-BOtWIdJu.js} +1 -1
- package/dist/app/assets/{eiffel-CgccC4xz.js → eiffel-DZJsL-6U.js} +1 -1
- package/dist/app/assets/{ejs-Cj1dQzfI.js → ejs-DlY_5WK7.js} +1 -1
- package/dist/app/assets/{elixir-B3SWPivz.js → elixir-DnflWYYw.js} +1 -1
- package/dist/app/assets/{elm-Bp_TQfaA.js → elm-DiBtRJyK.js} +1 -1
- package/dist/app/assets/{erDiagram-SMLLAGMA-Cby23XmU.js → erDiagram-SMLLAGMA-s249XOhW.js} +1 -1
- package/dist/app/assets/{erb-Cb-K6pZE.js → erb-Ctwnlnto.js} +1 -1
- package/dist/app/assets/{erlang-F72Fjwv2.js → erlang-BnrgWRyV.js} +1 -1
- package/dist/app/assets/{etlua-DFUJG9GZ.js → etlua-B-b2a1aT.js} +1 -1
- package/dist/app/assets/{excel-formula-B8hn4WlO.js → excel-formula-BfwuYhTY.js} +1 -1
- package/dist/app/assets/{factor-BlEqbeI0.js → factor-2cFlXUFG.js} +1 -1
- package/dist/app/assets/{false-DMURsqlU.js → false-DVJW4Xbm.js} +1 -1
- package/dist/app/assets/{firestore-security-rules-DswDVNNa.js → firestore-security-rules-BDB3ruEY.js} +1 -1
- package/dist/app/assets/{flow-C4reo-gu.js → flow-v_X8TsCx.js} +1 -1
- package/dist/app/assets/{flowDiagram-DWJPFMVM-BxNNsar9.js → flowDiagram-DWJPFMVM-Dz8lk_A8.js} +1 -1
- package/dist/app/assets/{fortran-BAmD5KHF.js → fortran-VlXf9wYr.js} +1 -1
- package/dist/app/assets/{fsharp-CPq2O12L.js → fsharp-BgmRbToz.js} +1 -1
- package/dist/app/assets/{ftl-Cgbeq2-z.js → ftl-CX7l6a-K.js} +1 -1
- package/dist/app/assets/{ganttDiagram-T4ZO3ILL-BLd3DH-5.js → ganttDiagram-T4ZO3ILL-C8JxZNAd.js} +1 -1
- package/dist/app/assets/{gap-Bge3tvcZ.js → gap-C3towync.js} +1 -1
- package/dist/app/assets/{gcode-CAVcsFdN.js → gcode-pPl8BHC6.js} +1 -1
- package/dist/app/assets/{gdscript-nkDP0xMM.js → gdscript-CQ5KQpTU.js} +1 -1
- package/dist/app/assets/{gedcom-BA8GnDnW.js → gedcom-UKqoiZ_B.js} +1 -1
- package/dist/app/assets/{gherkin-DvBWzm8E.js → gherkin-oHLPyBSJ.js} +1 -1
- package/dist/app/assets/{git-LJ9ums7L.js → git-QJvYrr1x.js} +1 -1
- package/dist/app/assets/{gitGraphDiagram-UUTBAWPF-JZEE6gBT.js → gitGraphDiagram-UUTBAWPF-D8hAIW7o.js} +1 -1
- package/dist/app/assets/{glsl-D4U4_9LH.js → glsl-D9mjvqGV.js} +1 -1
- package/dist/app/assets/{gml-CQtoiCZT.js → gml-DyeDbLje.js} +1 -1
- package/dist/app/assets/{gn-DxTb0Jqi.js → gn-CQxx-3wR.js} +1 -1
- package/dist/app/assets/{go-D7ELL60F.js → go-BlxfTxGG.js} +1 -1
- package/dist/app/assets/{go-module-Ck8j-Kcm.js → go-module-aUBiuILx.js} +1 -1
- package/dist/app/assets/{graph-pBSG-4mT.js → graph-D-X2uhF1.js} +1 -1
- package/dist/app/assets/{graphql-C-10AxQD.js → graphql-Clt8HaZ7.js} +1 -1
- package/dist/app/assets/{groovy-SpWCEWzX.js → groovy-CZSeQO36.js} +1 -1
- package/dist/app/assets/{haml-C2aM6_El.js → haml-DMf7PiKp.js} +1 -1
- package/dist/app/assets/{handlebars-ChMYyLZl.js → handlebars-BphhMxT6.js} +1 -1
- package/dist/app/assets/{haskell-DagwvSeE.js → haskell-Ccj1mGN_.js} +1 -1
- package/dist/app/assets/{haxe-BG5B6d9K.js → haxe-CtvRdMmt.js} +1 -1
- package/dist/app/assets/{hcl-B8Gd__02.js → hcl-HQGsM91R.js} +1 -1
- package/dist/app/assets/{hlsl-CSu8CgjO.js → hlsl-U_2FN4GV.js} +1 -1
- package/dist/app/assets/{hoon-BUjyY25K.js → hoon-DSS3mQR5.js} +1 -1
- package/dist/app/assets/{hpkp-C5yMlUDS.js → hpkp-BPnzFZ5n.js} +1 -1
- package/dist/app/assets/{hsts-DzNiiTKI.js → hsts-BRaWTgmx.js} +1 -1
- package/dist/app/assets/{http-DYWI6rav.js → http-DgZif8XP.js} +1 -1
- package/dist/app/assets/{ichigojam-DrBDAbYO.js → ichigojam-ypramSfH.js} +1 -1
- package/dist/app/assets/{icon-BezsFCDL.js → icon-DsD0Czia.js} +1 -1
- package/dist/app/assets/{icu-message-format-BCSOltos.js → icu-message-format-BVJiYPkB.js} +1 -1
- package/dist/app/assets/{idris-B8Tj6LSh.js → idris-BvurrLkY.js} +1 -1
- package/dist/app/assets/{iecst-CfA7HSP8.js → iecst-Clwdf_8K.js} +1 -1
- package/dist/app/assets/{ignore-E_v5CiMN.js → ignore-DkK-S7HP.js} +1 -1
- package/dist/app/assets/{index-CAv2vOlh.js → index-D-y0b7ri.js} +142 -142
- package/dist/app/assets/index-D4gddvdJ.css +1 -0
- package/dist/app/assets/{infoDiagram-42DDH7IO-eZsn31yB.js → infoDiagram-42DDH7IO-BocjJZwC.js} +1 -1
- package/dist/app/assets/{inform7-Dj75C-lM.js → inform7-yFSTqWIe.js} +1 -1
- package/dist/app/assets/{ini-DnYgp5_G.js → ini-BcO8nYi7.js} +1 -1
- package/dist/app/assets/{io-D59cMlU5.js → io-BBkn-xXo.js} +1 -1
- package/dist/app/assets/{ishikawaDiagram-UXIWVN3A-Cb8G56a8.js → ishikawaDiagram-UXIWVN3A-Dlw93ArC.js} +1 -1
- package/dist/app/assets/{j-CuOplqKY.js → j-M5UTfImQ.js} +1 -1
- package/dist/app/assets/{java-DiKpa4Y3.js → java-Xjo5k22g.js} +1 -1
- package/dist/app/assets/{javadoc-DshvkFVS.js → javadoc-D6lpCK4S.js} +1 -1
- package/dist/app/assets/{javadoclike-Dl0yZMbR.js → javadoclike-DGBCsKaU.js} +1 -1
- package/dist/app/assets/{javascript-C3lRkH0T.js → javascript-DkE8xAaV.js} +1 -1
- package/dist/app/assets/{javastacktrace-BAZDNyis.js → javastacktrace-Be5zC165.js} +1 -1
- package/dist/app/assets/{jexl-BvqPLTYh.js → jexl-C1l-HPYI.js} +1 -1
- package/dist/app/assets/{jolie-DXjsE0XX.js → jolie-CRI76P3X.js} +1 -1
- package/dist/app/assets/{journeyDiagram-VCZTEJTY-9aLWSRay.js → journeyDiagram-VCZTEJTY-BOongVs3.js} +1 -1
- package/dist/app/assets/{jq-CLFx4HBH.js → jq-CrFpn7ql.js} +1 -1
- package/dist/app/assets/{js-extras-D33J2WNl.js → js-extras-BvLZUIJ5.js} +1 -1
- package/dist/app/assets/{js-templates-DlMN6fgo.js → js-templates-fYKII4Os.js} +1 -1
- package/dist/app/assets/{jsdoc-CGVgLZ2j.js → jsdoc-DGONDzA5.js} +1 -1
- package/dist/app/assets/{json-BTnVvJgU.js → json-BxIxewuG.js} +1 -1
- package/dist/app/assets/{json5-BW8yCajk.js → json5-BP9OBqRe.js} +1 -1
- package/dist/app/assets/{jsonp-iQTQx19C.js → jsonp-Br67zaRL.js} +1 -1
- package/dist/app/assets/{jsstacktrace-DXxcFNfy.js → jsstacktrace-BB-1Bcpa.js} +1 -1
- package/dist/app/assets/{jsx-D1npDekI.js → jsx-BNfIlN8n.js} +1 -1
- package/dist/app/assets/{julia-E711iN6A.js → julia-DVIi4XSJ.js} +1 -1
- package/dist/app/assets/{kanban-definition-6JOO6SKY-COnahS5T.js → kanban-definition-6JOO6SKY-DD7E-Llo.js} +1 -1
- package/dist/app/assets/{keepalived-Da5-tKqr.js → keepalived-DmPJ3LF8.js} +1 -1
- package/dist/app/assets/{keyman-CR_is7Lf.js → keyman-Cp-gCfcq.js} +1 -1
- package/dist/app/assets/{kotlin-6F8UihuI.js → kotlin-DCptm4kq.js} +1 -1
- package/dist/app/assets/{kumir-BGVXhhZU.js → kumir-Cohjvjog.js} +1 -1
- package/dist/app/assets/{kusto-xzJ5QDBT.js → kusto-C2dOIgK1.js} +1 -1
- package/dist/app/assets/{latex-jsq1GqdL.js → latex-DaFCffTw.js} +1 -1
- package/dist/app/assets/{latte-CqObxNvY.js → latte-D2mtlTen.js} +1 -1
- package/dist/app/assets/{layout-Od8azvI5.js → layout-C7fpWjpB.js} +1 -1
- package/dist/app/assets/{less-vdQIwlhr.js → less-CycfawGH.js} +1 -1
- package/dist/app/assets/{lilypond-CYhZp9Do.js → lilypond-DrvS8AAl.js} +1 -1
- package/dist/app/assets/{linear-BVmuh868.js → linear-2np4qyjJ.js} +1 -1
- package/dist/app/assets/{liquid-CF_8y_W1.js → liquid-BQH0bAHC.js} +1 -1
- package/dist/app/assets/{lisp-DqmYhGox.js → lisp-BCWvn2A1.js} +1 -1
- package/dist/app/assets/{livescript-DEuoDOv7.js → livescript-DGRf3L1-.js} +1 -1
- package/dist/app/assets/{llvm-DlajzOZN.js → llvm-C_6xvGBO.js} +1 -1
- package/dist/app/assets/{log-CU2WH4Lm.js → log-uCcZN8k2.js} +1 -1
- package/dist/app/assets/{lolcode-CDbraZlO.js → lolcode-XEyTNgnB.js} +1 -1
- package/dist/app/assets/{lua-C7PRrDvP.js → lua-Dy0fpGeF.js} +1 -1
- package/dist/app/assets/{magma-CEu2U_uQ.js → magma-D6d2r_W9.js} +1 -1
- package/dist/app/assets/{makefile-BpvnX-Nx.js → makefile-DOydYPAQ.js} +1 -1
- package/dist/app/assets/{markdown-BTkzQyNu.js → markdown-CPxRHFza.js} +1 -1
- package/dist/app/assets/{markup-Dje0J_2C.js → markup-jgYp2Lb8.js} +1 -1
- package/dist/app/assets/{markup-templating-cYyMwZ4b.js → markup-templating-lT8EutTe.js} +1 -1
- package/dist/app/assets/{matlab-RV1EEhcL.js → matlab-y_OOgSc_.js} +1 -1
- package/dist/app/assets/{maxscript-Bo7lyT0p.js → maxscript-PMli6_xE.js} +1 -1
- package/dist/app/assets/{mel-kP-zTDHf.js → mel-CIopQCOU.js} +1 -1
- package/dist/app/assets/{mermaid-D1yX-Bwv.js → mermaid-CN6aoo9D.js} +1 -1
- package/dist/app/assets/{min-z4SxYbt2.js → min-DDl12nhy.js} +1 -1
- package/dist/app/assets/{mindmap-definition-QFDTVHPH-Dm1nn9t1.js → mindmap-definition-QFDTVHPH-Bosd0mf9.js} +1 -1
- package/dist/app/assets/{mizar-DD-lNTs3.js → mizar-A9B8KORd.js} +1 -1
- package/dist/app/assets/{mongodb-By_x69ne.js → mongodb-DV-yCsoK.js} +1 -1
- package/dist/app/assets/{monkey-CQneMnOq.js → monkey-HEFodtZa.js} +1 -1
- package/dist/app/assets/{moonscript-Cv1IiKWR.js → moonscript-Bj3xAxEV.js} +1 -1
- package/dist/app/assets/{n1ql-BZ-dWxn_.js → n1ql-DX2KWloB.js} +1 -1
- package/dist/app/assets/{n4js-aHhU-EQW.js → n4js-DQoNqDS9.js} +1 -1
- package/dist/app/assets/{nand2tetris-hdl-Ct9NqibY.js → nand2tetris-hdl-BFqj7ePK.js} +1 -1
- package/dist/app/assets/{naniscript-jrYYiXE3.js → naniscript-Cz--o1by.js} +1 -1
- package/dist/app/assets/{nasm-CR4fygO0.js → nasm-Dcb8t8q6.js} +1 -1
- package/dist/app/assets/{neon-Bn9xaC-T.js → neon-CK7vx6_x.js} +1 -1
- package/dist/app/assets/{nevod-DwwkUQZl.js → nevod-BePMNPK5.js} +1 -1
- package/dist/app/assets/{nginx-CxzxW55o.js → nginx-BmbGx2v1.js} +1 -1
- package/dist/app/assets/{nim-_ziHrYai.js → nim-B8GUCE2H.js} +1 -1
- package/dist/app/assets/{nix-CnfynVyh.js → nix-lGZ9zLZy.js} +1 -1
- package/dist/app/assets/{nsis-CTa60cBQ.js → nsis-kBAOh3Cs.js} +1 -1
- package/dist/app/assets/{objectivec-CxzV-EqQ.js → objectivec-Bngj8IHt.js} +1 -1
- package/dist/app/assets/{ocaml-CXQfo6wC.js → ocaml-Bba8eOIn.js} +1 -1
- package/dist/app/assets/{opencl-CdW2Jum5.js → opencl-DgfdBrQ_.js} +1 -1
- package/dist/app/assets/{openqasm-99txnqqb.js → openqasm-CQV2wxlC.js} +1 -1
- package/dist/app/assets/{oz-CIEq0aNc.js → oz-CcMDAMF8.js} +1 -1
- package/dist/app/assets/{parigp-D9vfJxo4.js → parigp-Cr7bHjhJ.js} +1 -1
- package/dist/app/assets/{parser-DndpAxSG.js → parser-DX-CvQ44.js} +1 -1
- package/dist/app/assets/{pascal-RZKxz-_c.js → pascal-CCpiRTqn.js} +1 -1
- package/dist/app/assets/{pascaligo-B7sniYrp.js → pascaligo-uYvOwN6J.js} +1 -1
- package/dist/app/assets/{pcaxis-B5p4fAPz.js → pcaxis-dCoAlH4q.js} +1 -1
- package/dist/app/assets/{peoplecode-fCeRfJQ5.js → peoplecode-BZU0iRIF.js} +1 -1
- package/dist/app/assets/{perl-CYh0437K.js → perl-Iesy2DKz.js} +1 -1
- package/dist/app/assets/{php-rTdvXKxw.js → php-a3Z68PaM.js} +1 -1
- package/dist/app/assets/{php-extras-DCzP567Q.js → php-extras-CSgWIoUx.js} +1 -1
- package/dist/app/assets/{phpdoc-BLbjAEWJ.js → phpdoc-ClEamK9m.js} +1 -1
- package/dist/app/assets/{pieDiagram-DEJITSTG-BuH3UT8S.js → pieDiagram-DEJITSTG-D3AaN8D3.js} +1 -1
- package/dist/app/assets/{plsql-B9JKIw1T.js → plsql-BUydR2je.js} +1 -1
- package/dist/app/assets/{powerquery-Beeqnhtp.js → powerquery-CbE5r1LK.js} +1 -1
- package/dist/app/assets/{powershell-DofDkeyl.js → powershell-DubIcaqQ.js} +1 -1
- package/dist/app/assets/{processing-C-Nru_27.js → processing-CGZk9MFa.js} +1 -1
- package/dist/app/assets/{prolog-Blc4S8Hs.js → prolog-DWiKE05T.js} +1 -1
- package/dist/app/assets/{promql-BsC9xRrD.js → promql-ZM0X0cVe.js} +1 -1
- package/dist/app/assets/{properties-BNFVcgDb.js → properties-C_MgCVL7.js} +1 -1
- package/dist/app/assets/{protobuf-BlpX_T1K.js → protobuf-DTptx08I.js} +1 -1
- package/dist/app/assets/{psl-D2Hoa7_4.js → psl-AUkZATpo.js} +1 -1
- package/dist/app/assets/{pug-DBlY2nRe.js → pug-CiJR0sLM.js} +1 -1
- package/dist/app/assets/{puppet-BfKwQiWD.js → puppet-DRojzo7w.js} +1 -1
- package/dist/app/assets/{pure-CgWRG2Cz.js → pure-DAC784GG.js} +1 -1
- package/dist/app/assets/{purebasic-C4IB7b6g.js → purebasic-VM4UEIrk.js} +1 -1
- package/dist/app/assets/{purescript-DpbOv2_5.js → purescript-w5sMhquf.js} +1 -1
- package/dist/app/assets/{q-Bhw7S_Ff.js → q-CBWya0ez.js} +1 -1
- package/dist/app/assets/{qml-BCy5slwb.js → qml-BO1SKCTG.js} +1 -1
- package/dist/app/assets/{qore-C00kyzGf.js → qore-BLEy3V2Q.js} +1 -1
- package/dist/app/assets/{qsharp-CN2CDpkI.js → qsharp-DpGm5nXm.js} +1 -1
- package/dist/app/assets/{quadrantDiagram-34T5L4WZ-DF36QwGT.js → quadrantDiagram-34T5L4WZ-zqVJRfM0.js} +1 -1
- package/dist/app/assets/{r-B_BK6AZu.js → r-DJwW4woE.js} +1 -1
- package/dist/app/assets/{racket-ByLawBwM.js → racket-tfAlhm9J.js} +1 -1
- package/dist/app/assets/{reason-BDBRcGMx.js → reason-CuQcs6Us.js} +1 -1
- package/dist/app/assets/{regex-ChgfKyvR.js → regex-BjBaDCpX.js} +1 -1
- package/dist/app/assets/{rego-D_XvU-HX.js → rego-DWENKceX.js} +1 -1
- package/dist/app/assets/{renpy-5nIbfjm_.js → renpy-BgVqATTk.js} +1 -1
- package/dist/app/assets/{requirementDiagram-MS252O5E-DoM__lrz.js → requirementDiagram-MS252O5E-B8E8SJly.js} +1 -1
- package/dist/app/assets/{rest-D0kyBqSB.js → rest-B9oIUmDJ.js} +1 -1
- package/dist/app/assets/{rip-CYiR9G3s.js → rip-kd5zQPVz.js} +1 -1
- package/dist/app/assets/{roboconf-NbRqT12s.js → roboconf-B1kUkQdY.js} +1 -1
- package/dist/app/assets/{robotframework-DVLdugea.js → robotframework-B8Cn6zw0.js} +1 -1
- package/dist/app/assets/{ruby-CXYqjyLr.js → ruby-CnbgIhf_.js} +1 -1
- package/dist/app/assets/{rust-DtiosDKR.js → rust-C8OTkz5t.js} +1 -1
- package/dist/app/assets/{sankeyDiagram-XADWPNL6-DAGXEQXz.js → sankeyDiagram-XADWPNL6-BWdy5fPK.js} +1 -1
- package/dist/app/assets/{sas-CBuO0A4r.js → sas-Dw7vQpkk.js} +1 -1
- package/dist/app/assets/{sass-DAOC_JY6.js → sass-b7SoCESY.js} +1 -1
- package/dist/app/assets/{scala-DrjxfsaL.js → scala-D-p3rZbv.js} +1 -1
- package/dist/app/assets/{scheme-Dqq_pAgd.js → scheme-BPbr0IV_.js} +1 -1
- package/dist/app/assets/{scss-Cs8enbPf.js → scss-Cyjt-V6Q.js} +1 -1
- package/dist/app/assets/{sequenceDiagram-FGHM5R23-D_580_d2.js → sequenceDiagram-FGHM5R23-D-ACA62M.js} +1 -1
- package/dist/app/assets/{shell-session-jQLXH-IX.js → shell-session-C7s1XZ_p.js} +1 -1
- package/dist/app/assets/{smali-BjlQ2Fb8.js → smali-C621-SJz.js} +1 -1
- package/dist/app/assets/{smalltalk-CvvaQ-vE.js → smalltalk-CuF0kpcz.js} +1 -1
- package/dist/app/assets/{smarty-CuW15FKs.js → smarty-CHbvlN7a.js} +1 -1
- package/dist/app/assets/{sml-C2rZNwaS.js → sml-BGi33Pu0.js} +1 -1
- package/dist/app/assets/{solidity-Bz0UCY5q.js → solidity-CZYdcu6z.js} +1 -1
- package/dist/app/assets/{solution-file-DY6Szhc0.js → solution-file-ChgVI9u6.js} +1 -1
- package/dist/app/assets/{soy-DupXqVr6.js → soy-CWvn9QzG.js} +1 -1
- package/dist/app/assets/{sparql-CKXEGfsk.js → sparql-7JjN18LQ.js} +1 -1
- package/dist/app/assets/{splunk-spl-ylrNAn0q.js → splunk-spl-DOh97vYU.js} +1 -1
- package/dist/app/assets/{sqf-lJvrZCtE.js → sqf-x5ivlIR7.js} +1 -1
- package/dist/app/assets/{sql-B7hLAkUR.js → sql-BshsXXbk.js} +1 -1
- package/dist/app/assets/{squirrel-BH1Y674s.js → squirrel-BtrGPSbs.js} +1 -1
- package/dist/app/assets/{stan-fR7Qg8Ut.js → stan-sDuPYbZs.js} +1 -1
- package/dist/app/assets/{stateDiagram-FHFEXIEX-B8jUR8FD.js → stateDiagram-FHFEXIEX-C06KYdye.js} +1 -1
- package/dist/app/assets/stateDiagram-v2-QKLJ7IA2-sEMQqWl2.js +1 -0
- package/dist/app/assets/{stylus-s7kCNuJK.js → stylus-9qu1XZ91.js} +1 -1
- package/dist/app/assets/{swift-CCtYkHCf.js → swift-UgAKrg8O.js} +1 -1
- package/dist/app/assets/{systemd-BCElHahC.js → systemd-D1t2IK6h.js} +1 -1
- package/dist/app/assets/{t4-cs-H1_QKrKm.js → t4-cs-D5pPXmrn.js} +1 -1
- package/dist/app/assets/{t4-templating-6bPJc-Uq.js → t4-templating-DGpA7dEe.js} +1 -1
- package/dist/app/assets/{t4-vb-DJucVBb5.js → t4-vb-DeaFY-L7.js} +1 -1
- package/dist/app/assets/{tap-B_SCHNXn.js → tap-B2Jlbmzn.js} +1 -1
- package/dist/app/assets/{tcl-BNEpqSgM.js → tcl-D3Cxl9RS.js} +1 -1
- package/dist/app/assets/{textile-uWVZjI0f.js → textile-vleyTozU.js} +1 -1
- package/dist/app/assets/{timeline-definition-GMOUNBTQ-pCO1IuTh.js → timeline-definition-GMOUNBTQ-DSaRfuOY.js} +1 -1
- package/dist/app/assets/{toml-IfqaxX6C.js → toml-Qo-F6Xf4.js} +1 -1
- package/dist/app/assets/{tremor-CXc27b0y.js → tremor-J5ixbTSm.js} +1 -1
- package/dist/app/assets/{tt2-CSiBMY4w.js → tt2-DOa_Af-o.js} +1 -1
- package/dist/app/assets/{turtle-BG1NGns7.js → turtle-D8Su1Ry0.js} +1 -1
- package/dist/app/assets/{twig-BApA7lBN.js → twig-GBJoDW8g.js} +1 -1
- package/dist/app/assets/{typescript-CRhq3lVo.js → typescript-DimFy1wk.js} +1 -1
- package/dist/app/assets/{typoscript-CbCyspbX.js → typoscript-Corm9VPj.js} +1 -1
- package/dist/app/assets/{unrealscript-C0oIJrK_.js → unrealscript-dSS5kIDz.js} +1 -1
- package/dist/app/assets/{uorazor-CCeC8ukV.js → uorazor-BGl4DTbK.js} +1 -1
- package/dist/app/assets/{uri-BbJq2oKI.js → uri-B403JigU.js} +1 -1
- package/dist/app/assets/{v-DWbZTbl1.js → v-D1nzy8SK.js} +1 -1
- package/dist/app/assets/{vala-cNE5mkqv.js → vala-CbskSA-6.js} +1 -1
- package/dist/app/assets/{vbnet-C4ps1ulT.js → vbnet-BQwFvsFF.js} +1 -1
- package/dist/app/assets/{velocity-BqiV4VvP.js → velocity-dmmAE00U.js} +1 -1
- package/dist/app/assets/{vennDiagram-DHZGUBPP-DsozMeQe.js → vennDiagram-DHZGUBPP-BZ7Hb9Hn.js} +1 -1
- package/dist/app/assets/{verilog-uM22GI8M.js → verilog-BMPc4qiW.js} +1 -1
- package/dist/app/assets/{vhdl-CjipXQit.js → vhdl-BwLIiaQ3.js} +1 -1
- package/dist/app/assets/{vim-DAu-IiFJ.js → vim-NxGSno01.js} +1 -1
- package/dist/app/assets/{visual-basic-CdGIHeQV.js → visual-basic-DT3do2iL.js} +1 -1
- package/dist/app/assets/{wardley-RL74JXVD-oEncjGLp.js → wardley-RL74JXVD-BQuDsmFg.js} +1 -1
- package/dist/app/assets/{wardleyDiagram-NUSXRM2D-DNMPqgtw.js → wardleyDiagram-NUSXRM2D-DwMCEfDA.js} +1 -1
- package/dist/app/assets/{warpscript-ijeKRGom.js → warpscript-natO4zPn.js} +1 -1
- package/dist/app/assets/{wasm-CyK5pI_Y.js → wasm-BfugFzDn.js} +1 -1
- package/dist/app/assets/{web-idl-3RbxQwXD.js → web-idl-Bics_ax6.js} +1 -1
- package/dist/app/assets/{wiki-Vqqp-2xX.js → wiki-Blq646qq.js} +1 -1
- package/dist/app/assets/{wolfram-Bsi7joP0.js → wolfram-Ddn6uV9M.js} +1 -1
- package/dist/app/assets/{wren-WQYmqFb4.js → wren-CZ9gfbdr.js} +1 -1
- package/dist/app/assets/{xeora-D38FYsRy.js → xeora-zVJDHWYP.js} +1 -1
- package/dist/app/assets/{xml-doc-wUzx0i81.js → xml-doc-D9g-q5Fh.js} +1 -1
- package/dist/app/assets/{xojo-CGKogxG9.js → xojo-WpdjfLKR.js} +1 -1
- package/dist/app/assets/{xquery-Dv5QvWSQ.js → xquery-DFrusbUY.js} +1 -1
- package/dist/app/assets/{xychartDiagram-5P7HB3ND-BsbjEvIN.js → xychartDiagram-5P7HB3ND-BRMmacnH.js} +1 -1
- package/dist/app/assets/{yaml-BGAxdcfl.js → yaml-DB6og7ei.js} +1 -1
- package/dist/app/assets/{yang-DbR14Qhe.js → yang-CdFoUEPj.js} +1 -1
- package/dist/app/assets/{zig-BZnMCGLn.js → zig-C79X6U04.js} +1 -1
- package/dist/app/index.html +2 -2
- package/dist/index.cjs +707 -452
- package/dist/index.js +707 -452
- package/package.json +1 -1
- package/dist/app/assets/channel-C4IK_RZn.js +0 -1
- package/dist/app/assets/classDiagram-6PBFFD2Q-LicCc7Qv.js +0 -1
- package/dist/app/assets/classDiagram-v2-HSJHXN6E-LicCc7Qv.js +0 -1
- package/dist/app/assets/clone-BC1Apkgy.js +0 -1
- package/dist/app/assets/index-BojjVNpv.css +0 -1
- package/dist/app/assets/stateDiagram-v2-QKLJ7IA2-ByxORwfu.js +0 -1
package/dist/index.cjs
CHANGED
|
@@ -1518,6 +1518,13 @@ var en_US_default = {
|
|
|
1518
1518
|
option: "Option",
|
|
1519
1519
|
other: "Other"
|
|
1520
1520
|
},
|
|
1521
|
+
knowledgeRetriever: {
|
|
1522
|
+
queryTitle: "Query",
|
|
1523
|
+
resultsTitle: "Retrieved results ({{count}})",
|
|
1524
|
+
rawDataTitle: "Raw data",
|
|
1525
|
+
noResults: "No knowledge results found",
|
|
1526
|
+
scoreLabel: "Score"
|
|
1527
|
+
},
|
|
1521
1528
|
agentRun: {
|
|
1522
1529
|
defaultTitle: "Sub-agent",
|
|
1523
1530
|
inputLabel: "Input",
|
|
@@ -1843,6 +1850,13 @@ var zh_CN_default = {
|
|
|
1843
1850
|
option: "\u9009\u9879",
|
|
1844
1851
|
other: "\u5176\u4ED6"
|
|
1845
1852
|
},
|
|
1853
|
+
knowledgeRetriever: {
|
|
1854
|
+
queryTitle: "\u67E5\u8BE2",
|
|
1855
|
+
resultsTitle: "\u68C0\u7D22\u7ED3\u679C\uFF08{{count}}\uFF09",
|
|
1856
|
+
rawDataTitle: "\u539F\u59CB\u6570\u636E",
|
|
1857
|
+
noResults: "\u672A\u627E\u5230\u77E5\u8BC6\u7ED3\u679C",
|
|
1858
|
+
scoreLabel: "\u5206\u6570"
|
|
1859
|
+
},
|
|
1846
1860
|
agentRun: {
|
|
1847
1861
|
defaultTitle: "\u5B50\u667A\u80FD\u4F53",
|
|
1848
1862
|
inputLabel: "\u8F93\u5165",
|
|
@@ -8516,8 +8530,305 @@ function AgentRunGroup({
|
|
|
8516
8530
|
] });
|
|
8517
8531
|
}
|
|
8518
8532
|
|
|
8519
|
-
// src/
|
|
8533
|
+
// src/i18n/localized-text.ts
|
|
8534
|
+
function resolveLocalizedText(value, language) {
|
|
8535
|
+
if (typeof value === "string") {
|
|
8536
|
+
const trimmed = value.trim();
|
|
8537
|
+
return trimmed || null;
|
|
8538
|
+
}
|
|
8539
|
+
if (!value || typeof value !== "object") return null;
|
|
8540
|
+
const localized = value;
|
|
8541
|
+
const normalizedLanguage = language.trim();
|
|
8542
|
+
const underscoredLanguage = normalizedLanguage.replace(/-/g, "_");
|
|
8543
|
+
const languagePrefix = normalizedLanguage.split("-")[0];
|
|
8544
|
+
const preferredKeys = normalizedLanguage.startsWith("zh") ? [
|
|
8545
|
+
normalizedLanguage,
|
|
8546
|
+
underscoredLanguage,
|
|
8547
|
+
"zh_Hans",
|
|
8548
|
+
"zh-Hans",
|
|
8549
|
+
"zh_CN",
|
|
8550
|
+
"zh-CN",
|
|
8551
|
+
"zh",
|
|
8552
|
+
"en_US",
|
|
8553
|
+
"en-US",
|
|
8554
|
+
"en"
|
|
8555
|
+
] : [
|
|
8556
|
+
normalizedLanguage,
|
|
8557
|
+
underscoredLanguage,
|
|
8558
|
+
"en_US",
|
|
8559
|
+
"en-US",
|
|
8560
|
+
"en",
|
|
8561
|
+
languagePrefix,
|
|
8562
|
+
"zh_Hans",
|
|
8563
|
+
"zh-Hans",
|
|
8564
|
+
"zh_CN",
|
|
8565
|
+
"zh-CN",
|
|
8566
|
+
"zh"
|
|
8567
|
+
];
|
|
8568
|
+
for (const key of preferredKeys) {
|
|
8569
|
+
const candidate = localized[key];
|
|
8570
|
+
if (typeof candidate === "string" && candidate.trim()) {
|
|
8571
|
+
return candidate.trim();
|
|
8572
|
+
}
|
|
8573
|
+
}
|
|
8574
|
+
for (const candidate of Object.values(localized)) {
|
|
8575
|
+
if (typeof candidate === "string" && candidate.trim()) {
|
|
8576
|
+
return candidate.trim();
|
|
8577
|
+
}
|
|
8578
|
+
}
|
|
8579
|
+
return null;
|
|
8580
|
+
}
|
|
8581
|
+
|
|
8582
|
+
// src/components/thread/messages/knowledge-retriever-component-renderer.tsx
|
|
8520
8583
|
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
8584
|
+
var KNOWLEDGE_RETRIEVER_TITLE = "Knowledge Retriever";
|
|
8585
|
+
var KNOWLEDGE_METADATA_SKIP_KEYS = /* @__PURE__ */ new Set([
|
|
8586
|
+
"assets",
|
|
8587
|
+
"children",
|
|
8588
|
+
"loc",
|
|
8589
|
+
"relevanceScore",
|
|
8590
|
+
"score"
|
|
8591
|
+
]);
|
|
8592
|
+
var knowledgeRetrieverComponentRenderer = {
|
|
8593
|
+
id: "knowledge-retriever",
|
|
8594
|
+
presentation: "grouped-step",
|
|
8595
|
+
match: isKnowledgeRetrieverComponent,
|
|
8596
|
+
getTitle: () => KNOWLEDGE_RETRIEVER_TITLE,
|
|
8597
|
+
hasDetails: hasKnowledgeRetrieverDetails,
|
|
8598
|
+
renderDetails: KnowledgeRetrieverDetails
|
|
8599
|
+
};
|
|
8600
|
+
function normalizeToolToken(value) {
|
|
8601
|
+
if (typeof value !== "string") return null;
|
|
8602
|
+
const normalized = value.trim().toLowerCase().replace(/[\s-]+/g, "_");
|
|
8603
|
+
return normalized || null;
|
|
8604
|
+
}
|
|
8605
|
+
function isRecord2(value) {
|
|
8606
|
+
return Boolean(value) && typeof value === "object" && !Array.isArray(value);
|
|
8607
|
+
}
|
|
8608
|
+
function readString(value) {
|
|
8609
|
+
if (typeof value !== "string") return void 0;
|
|
8610
|
+
const trimmed = value.trim();
|
|
8611
|
+
return trimmed || void 0;
|
|
8612
|
+
}
|
|
8613
|
+
function stringifyValue(value) {
|
|
8614
|
+
if (value === null || value === void 0) return void 0;
|
|
8615
|
+
if (typeof value === "string") return readString(value);
|
|
8616
|
+
if (typeof value === "number" || typeof value === "boolean") {
|
|
8617
|
+
return String(value);
|
|
8618
|
+
}
|
|
8619
|
+
try {
|
|
8620
|
+
const serialized = JSON.stringify(value);
|
|
8621
|
+
return serialized && serialized !== "{}" ? serialized : void 0;
|
|
8622
|
+
} catch {
|
|
8623
|
+
return String(value);
|
|
8624
|
+
}
|
|
8625
|
+
}
|
|
8626
|
+
function truncateMetadataValue(value) {
|
|
8627
|
+
return value.length > 90 ? `${value.slice(0, 87)}...` : value;
|
|
8628
|
+
}
|
|
8629
|
+
function formatScore(value) {
|
|
8630
|
+
if (typeof value === "number") {
|
|
8631
|
+
return Number.isFinite(value) ? value.toFixed(value < 1 ? 3 : 2) : void 0;
|
|
8632
|
+
}
|
|
8633
|
+
return readString(value);
|
|
8634
|
+
}
|
|
8635
|
+
function getLineRange(metadata) {
|
|
8636
|
+
const loc = metadata.loc;
|
|
8637
|
+
if (!isRecord2(loc)) return void 0;
|
|
8638
|
+
const lines = loc.lines;
|
|
8639
|
+
if (!isRecord2(lines)) return void 0;
|
|
8640
|
+
const from = stringifyValue(lines.from);
|
|
8641
|
+
const to = stringifyValue(lines.to);
|
|
8642
|
+
if (from && to) return `${from}-${to}`;
|
|
8643
|
+
return from ?? to;
|
|
8644
|
+
}
|
|
8645
|
+
function normalizeMetadataEntries(metadata) {
|
|
8646
|
+
return Object.entries(metadata).flatMap(([key, value]) => {
|
|
8647
|
+
if (KNOWLEDGE_METADATA_SKIP_KEYS.has(key)) return [];
|
|
8648
|
+
const formatted = stringifyValue(value);
|
|
8649
|
+
if (!formatted) return [];
|
|
8650
|
+
return [
|
|
8651
|
+
{
|
|
8652
|
+
key,
|
|
8653
|
+
value: truncateMetadataValue(formatted)
|
|
8654
|
+
}
|
|
8655
|
+
];
|
|
8656
|
+
});
|
|
8657
|
+
}
|
|
8658
|
+
function normalizeKnowledgeResult(value, fallbackTitle) {
|
|
8659
|
+
if (!isRecord2(value)) return null;
|
|
8660
|
+
const metadata = isRecord2(value.metadata) ? value.metadata : {};
|
|
8661
|
+
const document2 = isRecord2(value.document) ? value.document : {};
|
|
8662
|
+
const content = readString(value.pageContent);
|
|
8663
|
+
const title = readString(document2.name) ?? readString(metadata.originalFileName) ?? readString(metadata.source) ?? readString(value.id) ?? readString(metadata.chunkId) ?? fallbackTitle;
|
|
8664
|
+
if (!content && Object.keys(metadata).length === 0 && Object.keys(document2).length === 0) {
|
|
8665
|
+
return null;
|
|
8666
|
+
}
|
|
8667
|
+
return {
|
|
8668
|
+
id: readString(value.id) ?? readString(metadata.chunkId),
|
|
8669
|
+
title,
|
|
8670
|
+
url: readString(document2.fileUrl),
|
|
8671
|
+
content,
|
|
8672
|
+
lineRange: getLineRange(metadata),
|
|
8673
|
+
score: formatScore(
|
|
8674
|
+
metadata.relevanceScore ?? metadata.score ?? value.score
|
|
8675
|
+
),
|
|
8676
|
+
metadata: normalizeMetadataEntries(metadata)
|
|
8677
|
+
};
|
|
8678
|
+
}
|
|
8679
|
+
function getKnowledgeResults(data) {
|
|
8680
|
+
if (!Array.isArray(data.data)) return [];
|
|
8681
|
+
return data.data.flatMap((item, index) => {
|
|
8682
|
+
const result = normalizeKnowledgeResult(item, `Result ${index + 1}`);
|
|
8683
|
+
return result ? [result] : [];
|
|
8684
|
+
});
|
|
8685
|
+
}
|
|
8686
|
+
function getRawKnowledgeData(data) {
|
|
8687
|
+
return data.data ?? data.output ?? null;
|
|
8688
|
+
}
|
|
8689
|
+
function getRetrieverQuery(data, language) {
|
|
8690
|
+
const input = data.input;
|
|
8691
|
+
if (isRecord2(input)) {
|
|
8692
|
+
return readString(input.query) ?? readString(input.input) ?? readString(input.question);
|
|
8693
|
+
}
|
|
8694
|
+
return readString(resolveLocalizedText(data.message, language)) ?? readString(input);
|
|
8695
|
+
}
|
|
8696
|
+
function hasKnowledgeRetrieverDetails(_content, data) {
|
|
8697
|
+
return isKnowledgeRetrieverComponent(_content, data);
|
|
8698
|
+
}
|
|
8699
|
+
function isKnowledgeRetrieverComponent(_content, data) {
|
|
8700
|
+
return normalizeToolToken(data.type) === "knowledges";
|
|
8701
|
+
}
|
|
8702
|
+
function KnowledgeRawDataBlock({ value }) {
|
|
8703
|
+
const { t } = useChatkitTranslation();
|
|
8704
|
+
const detected = detectJsonValue(value);
|
|
8705
|
+
if (detected.kind === "text") {
|
|
8706
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(PlainTextBlock, { value: detected.text });
|
|
8707
|
+
}
|
|
8708
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(Tabs, { defaultValue: "tree", className: "min-w-0", children: [
|
|
8709
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "mb-2 flex min-w-0 items-center justify-between gap-2", children: [
|
|
8710
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("span", { className: "min-w-0 truncate text-[11px] text-muted-foreground", children: [
|
|
8711
|
+
t("message.toolGroup.jsonTitle"),
|
|
8712
|
+
" \xB7",
|
|
8713
|
+
" ",
|
|
8714
|
+
getJsonValueSummary(detected.value)
|
|
8715
|
+
] }),
|
|
8716
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(TabsList, { className: "rounded-md p-0.5", children: [
|
|
8717
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(TabsTrigger, { className: "px-2 py-0.5 text-[11px]", value: "tree", children: t("message.toolGroup.jsonTree") }),
|
|
8718
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(TabsTrigger, { className: "px-2 py-0.5 text-[11px]", value: "raw", children: t("message.toolGroup.jsonRaw") })
|
|
8719
|
+
] })
|
|
8720
|
+
] }),
|
|
8721
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(TabsContent, { value: "tree", className: "mt-0", children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(JsonTreeView, { value: detected.value }) }),
|
|
8722
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(TabsContent, { value: "raw", className: "mt-0", children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(RawJsonBlock, { raw: detected.raw }) })
|
|
8723
|
+
] });
|
|
8724
|
+
}
|
|
8725
|
+
function KnowledgeRetrieverDetails({
|
|
8726
|
+
data
|
|
8727
|
+
}) {
|
|
8728
|
+
const { i18n: i18n2, t } = useChatkitTranslation();
|
|
8729
|
+
const query = getRetrieverQuery(data, i18n2.language);
|
|
8730
|
+
const results = getKnowledgeResults(data);
|
|
8731
|
+
const rawData = getRawKnowledgeData(data);
|
|
8732
|
+
const hasArrayData = Array.isArray(data.data);
|
|
8733
|
+
const hasRawFallback = rawData !== null && rawData !== void 0 && (!hasArrayData || Array.isArray(data.data) && data.data.length > 0 && results.length === 0);
|
|
8734
|
+
const showEmptyState = results.length === 0 && !hasRawFallback && data.status !== "running";
|
|
8735
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "min-w-0 space-y-3 px-3 py-2", children: [
|
|
8736
|
+
query ? /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "min-w-0 space-y-1", children: [
|
|
8737
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "text-[11px] font-medium text-muted-foreground", children: t("message.knowledgeRetriever.queryTitle") }),
|
|
8738
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "min-w-0 whitespace-pre-wrap wrap-break-word rounded-md bg-muted/40 px-3 py-2 font-mono text-[12px] leading-5 text-foreground/80", children: query })
|
|
8739
|
+
] }) : null,
|
|
8740
|
+
results.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "min-w-0 space-y-2", children: [
|
|
8741
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "text-[11px] font-medium text-muted-foreground", children: t("message.knowledgeRetriever.resultsTitle", {
|
|
8742
|
+
count: results.length
|
|
8743
|
+
}) }),
|
|
8744
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "space-y-2", children: results.map((result, index) => /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
8745
|
+
KnowledgeResultCard,
|
|
8746
|
+
{
|
|
8747
|
+
result,
|
|
8748
|
+
index
|
|
8749
|
+
},
|
|
8750
|
+
result.id ?? `${result.title}-${index}`
|
|
8751
|
+
)) })
|
|
8752
|
+
] }) : null,
|
|
8753
|
+
hasRawFallback ? /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "min-w-0 space-y-1", children: [
|
|
8754
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "text-[11px] font-medium text-muted-foreground", children: t("message.knowledgeRetriever.rawDataTitle") }),
|
|
8755
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(KnowledgeRawDataBlock, { value: rawData })
|
|
8756
|
+
] }) : null,
|
|
8757
|
+
showEmptyState ? /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "rounded-md border border-dashed border-border/70 px-3 py-4 text-center text-xs text-muted-foreground", children: t("message.knowledgeRetriever.noResults") }) : null
|
|
8758
|
+
] });
|
|
8759
|
+
}
|
|
8760
|
+
function KnowledgeResultCard({
|
|
8761
|
+
result,
|
|
8762
|
+
index
|
|
8763
|
+
}) {
|
|
8764
|
+
const { t } = useChatkitTranslation();
|
|
8765
|
+
const titleId = `knowledge-result-${index + 1}`;
|
|
8766
|
+
const metadata = [
|
|
8767
|
+
...result.score ? [
|
|
8768
|
+
{
|
|
8769
|
+
key: t("message.knowledgeRetriever.scoreLabel"),
|
|
8770
|
+
value: result.score
|
|
8771
|
+
}
|
|
8772
|
+
] : [],
|
|
8773
|
+
...result.metadata
|
|
8774
|
+
];
|
|
8775
|
+
const titleClassName = "min-w-0 line-clamp-2 text-sm font-medium leading-5 text-foreground";
|
|
8776
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("article", { className: "min-w-0 rounded-md border border-border/60 bg-background/80 px-3 py-2", children: /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "flex min-w-0 items-start gap-2", children: [
|
|
8777
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "mt-0.5 inline-flex h-5 w-5 shrink-0 items-center justify-center rounded-full bg-muted text-[11px] font-medium text-muted-foreground", children: index + 1 }),
|
|
8778
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "min-w-0 flex-1", children: [
|
|
8779
|
+
result.url ? /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(
|
|
8780
|
+
"a",
|
|
8781
|
+
{
|
|
8782
|
+
id: titleId,
|
|
8783
|
+
href: result.url,
|
|
8784
|
+
target: "_blank",
|
|
8785
|
+
rel: "noreferrer",
|
|
8786
|
+
className: cn(titleClassName, "hover:underline"),
|
|
8787
|
+
children: [
|
|
8788
|
+
result.title,
|
|
8789
|
+
result.lineRange ? /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("span", { className: "ml-1 text-muted-foreground", children: [
|
|
8790
|
+
"[",
|
|
8791
|
+
result.lineRange,
|
|
8792
|
+
"]"
|
|
8793
|
+
] }) : null
|
|
8794
|
+
]
|
|
8795
|
+
}
|
|
8796
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { id: titleId, className: titleClassName, children: [
|
|
8797
|
+
result.title,
|
|
8798
|
+
result.lineRange ? /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("span", { className: "ml-1 text-muted-foreground", children: [
|
|
8799
|
+
"[",
|
|
8800
|
+
result.lineRange,
|
|
8801
|
+
"]"
|
|
8802
|
+
] }) : null
|
|
8803
|
+
] }),
|
|
8804
|
+
result.content ? /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("p", { className: "mt-1 line-clamp-3 whitespace-pre-wrap text-xs leading-5 text-muted-foreground", children: result.content }) : null,
|
|
8805
|
+
metadata.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
8806
|
+
"div",
|
|
8807
|
+
{
|
|
8808
|
+
className: "mt-2 flex flex-wrap gap-1.5",
|
|
8809
|
+
"aria-labelledby": titleId,
|
|
8810
|
+
children: metadata.slice(0, 10).map((item) => /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(
|
|
8811
|
+
"span",
|
|
8812
|
+
{
|
|
8813
|
+
className: "inline-flex min-w-0 max-w-full items-center gap-1 rounded-md bg-muted/50 px-1.5 py-0.5 text-[11px] leading-4 text-muted-foreground",
|
|
8814
|
+
children: [
|
|
8815
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("span", { className: "shrink-0 font-medium text-foreground/70", children: [
|
|
8816
|
+
item.key,
|
|
8817
|
+
":"
|
|
8818
|
+
] }),
|
|
8819
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "min-w-0 truncate font-mono", children: item.value })
|
|
8820
|
+
]
|
|
8821
|
+
},
|
|
8822
|
+
`${item.key}:${item.value}`
|
|
8823
|
+
))
|
|
8824
|
+
}
|
|
8825
|
+
) : null
|
|
8826
|
+
] })
|
|
8827
|
+
] }) });
|
|
8828
|
+
}
|
|
8829
|
+
|
|
8830
|
+
// src/components/thread/messages/web-search-component-renderer.tsx
|
|
8831
|
+
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
8521
8832
|
var webSearchComponentRenderer = {
|
|
8522
8833
|
id: "computer-web-search-sources",
|
|
8523
8834
|
presentation: "grouped-step",
|
|
@@ -8525,7 +8836,7 @@ var webSearchComponentRenderer = {
|
|
|
8525
8836
|
hasDetails: hasWebSearchSources,
|
|
8526
8837
|
renderDetails: WebSearchToolCallOutput
|
|
8527
8838
|
};
|
|
8528
|
-
function
|
|
8839
|
+
function normalizeToolToken2(value) {
|
|
8529
8840
|
if (typeof value !== "string") return null;
|
|
8530
8841
|
const normalized = value.trim().toLowerCase().replace(/[\s-]+/g, "_");
|
|
8531
8842
|
return normalized || null;
|
|
@@ -8570,9 +8881,9 @@ function hasWebSearchSources(_content, data) {
|
|
|
8570
8881
|
}
|
|
8571
8882
|
function isComputerWebSearchComponent(_content, data) {
|
|
8572
8883
|
const isComputer = data.category === "Computer";
|
|
8573
|
-
const isWebSearch =
|
|
8884
|
+
const isWebSearch = normalizeToolToken2(data.type) === "web_search";
|
|
8574
8885
|
if (!isComputer || !isWebSearch) return false;
|
|
8575
|
-
return
|
|
8886
|
+
return normalizeToolToken2(data.tool) === "web_search" || getWebSearchSources(data).length > 0;
|
|
8576
8887
|
}
|
|
8577
8888
|
function getSourceHost(url) {
|
|
8578
8889
|
try {
|
|
@@ -8587,9 +8898,9 @@ function WebSearchToolCallOutput({
|
|
|
8587
8898
|
const { t } = useChatkitTranslation();
|
|
8588
8899
|
const sources = getWebSearchSources(data);
|
|
8589
8900
|
if (sources.length === 0 || data.error !== void 0) return null;
|
|
8590
|
-
return /* @__PURE__ */ (0,
|
|
8591
|
-
/* @__PURE__ */ (0,
|
|
8592
|
-
/* @__PURE__ */ (0,
|
|
8901
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "space-y-2", children: [
|
|
8902
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "text-[11px] font-medium text-muted-foreground", children: t("message.toolGroup.sourcesTitle") }),
|
|
8903
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "space-y-2", children: sources.map((source, index) => {
|
|
8593
8904
|
const sourceHost = getSourceHost(source.url);
|
|
8594
8905
|
const snippet = source.content ?? source.description;
|
|
8595
8906
|
const metaParts = [
|
|
@@ -8597,13 +8908,13 @@ function WebSearchToolCallOutput({
|
|
|
8597
8908
|
source.publishedDate,
|
|
8598
8909
|
source.author
|
|
8599
8910
|
].filter((item) => Boolean(item));
|
|
8600
|
-
return /* @__PURE__ */ (0,
|
|
8911
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
|
|
8601
8912
|
"div",
|
|
8602
8913
|
{
|
|
8603
8914
|
className: "min-w-0 rounded-md border border-border/60 bg-background/80 px-3 py-2",
|
|
8604
8915
|
children: [
|
|
8605
|
-
metaParts.length > 0 ? /* @__PURE__ */ (0,
|
|
8606
|
-
/* @__PURE__ */ (0,
|
|
8916
|
+
metaParts.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "mb-1 truncate text-[11px] text-muted-foreground", children: metaParts.join(" / ") }) : null,
|
|
8917
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
8607
8918
|
"a",
|
|
8608
8919
|
{
|
|
8609
8920
|
href: source.url,
|
|
@@ -8613,7 +8924,7 @@ function WebSearchToolCallOutput({
|
|
|
8613
8924
|
children: source.title
|
|
8614
8925
|
}
|
|
8615
8926
|
),
|
|
8616
|
-
snippet ? /* @__PURE__ */ (0,
|
|
8927
|
+
snippet ? /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("p", { className: "mt-1 line-clamp-3 text-xs leading-5 text-muted-foreground", children: snippet }) : null
|
|
8617
8928
|
]
|
|
8618
8929
|
},
|
|
8619
8930
|
`${source.url}-${index}`
|
|
@@ -8624,6 +8935,7 @@ function WebSearchToolCallOutput({
|
|
|
8624
8935
|
|
|
8625
8936
|
// src/components/thread/messages/component-message-renderers.tsx
|
|
8626
8937
|
var COMPONENT_MESSAGE_RENDERERS = [
|
|
8938
|
+
knowledgeRetrieverComponentRenderer,
|
|
8627
8939
|
webSearchComponentRenderer
|
|
8628
8940
|
];
|
|
8629
8941
|
function getComponentMessageRenderer(content, data) {
|
|
@@ -8642,58 +8954,7 @@ function hasComponentMessageRendererDetails(renderer, content, data) {
|
|
|
8642
8954
|
// src/components/thread/messages/tool-component-group.tsx
|
|
8643
8955
|
var React29 = __toESM(require("react"), 1);
|
|
8644
8956
|
var import_lucide_react17 = require("lucide-react");
|
|
8645
|
-
|
|
8646
|
-
// src/i18n/localized-text.ts
|
|
8647
|
-
function resolveLocalizedText(value, language) {
|
|
8648
|
-
if (typeof value === "string") {
|
|
8649
|
-
const trimmed = value.trim();
|
|
8650
|
-
return trimmed || null;
|
|
8651
|
-
}
|
|
8652
|
-
if (!value || typeof value !== "object") return null;
|
|
8653
|
-
const localized = value;
|
|
8654
|
-
const normalizedLanguage = language.trim();
|
|
8655
|
-
const underscoredLanguage = normalizedLanguage.replace(/-/g, "_");
|
|
8656
|
-
const languagePrefix = normalizedLanguage.split("-")[0];
|
|
8657
|
-
const preferredKeys = normalizedLanguage.startsWith("zh") ? [
|
|
8658
|
-
normalizedLanguage,
|
|
8659
|
-
underscoredLanguage,
|
|
8660
|
-
"zh_Hans",
|
|
8661
|
-
"zh-Hans",
|
|
8662
|
-
"zh_CN",
|
|
8663
|
-
"zh-CN",
|
|
8664
|
-
"zh",
|
|
8665
|
-
"en_US",
|
|
8666
|
-
"en-US",
|
|
8667
|
-
"en"
|
|
8668
|
-
] : [
|
|
8669
|
-
normalizedLanguage,
|
|
8670
|
-
underscoredLanguage,
|
|
8671
|
-
"en_US",
|
|
8672
|
-
"en-US",
|
|
8673
|
-
"en",
|
|
8674
|
-
languagePrefix,
|
|
8675
|
-
"zh_Hans",
|
|
8676
|
-
"zh-Hans",
|
|
8677
|
-
"zh_CN",
|
|
8678
|
-
"zh-CN",
|
|
8679
|
-
"zh"
|
|
8680
|
-
];
|
|
8681
|
-
for (const key of preferredKeys) {
|
|
8682
|
-
const candidate = localized[key];
|
|
8683
|
-
if (typeof candidate === "string" && candidate.trim()) {
|
|
8684
|
-
return candidate.trim();
|
|
8685
|
-
}
|
|
8686
|
-
}
|
|
8687
|
-
for (const candidate of Object.values(localized)) {
|
|
8688
|
-
if (typeof candidate === "string" && candidate.trim()) {
|
|
8689
|
-
return candidate.trim();
|
|
8690
|
-
}
|
|
8691
|
-
}
|
|
8692
|
-
return null;
|
|
8693
|
-
}
|
|
8694
|
-
|
|
8695
|
-
// src/components/thread/messages/tool-component-group.tsx
|
|
8696
|
-
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
8957
|
+
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
8697
8958
|
var toolStatusConfig = {
|
|
8698
8959
|
success: {
|
|
8699
8960
|
iconClass: "border-green-500 text-green-700",
|
|
@@ -8865,13 +9126,13 @@ function isSkippableToolGroupSeparator(content) {
|
|
|
8865
9126
|
}
|
|
8866
9127
|
return false;
|
|
8867
9128
|
}
|
|
8868
|
-
function
|
|
9129
|
+
function normalizeToolToken3(value) {
|
|
8869
9130
|
if (typeof value !== "string") return null;
|
|
8870
9131
|
const normalized = value.trim().toLowerCase().replace(/[\s-]+/g, "_");
|
|
8871
9132
|
return normalized || null;
|
|
8872
9133
|
}
|
|
8873
9134
|
function classifyToolToken(value) {
|
|
8874
|
-
const normalized =
|
|
9135
|
+
const normalized = normalizeToolToken3(
|
|
8875
9136
|
typeof value === "string" ? value : resolveLocalizedText(value, "en-US")
|
|
8876
9137
|
);
|
|
8877
9138
|
if (!normalized) return null;
|
|
@@ -8910,8 +9171,8 @@ function getToolActivityLabel(content, language, statusOverride) {
|
|
|
8910
9171
|
if (status === "running") {
|
|
8911
9172
|
return message ?? title ?? tool ?? type ?? "Tool";
|
|
8912
9173
|
}
|
|
8913
|
-
const titleToken =
|
|
8914
|
-
const genericTitle = titleToken !== null && [tool, type].map((candidate) =>
|
|
9174
|
+
const titleToken = normalizeToolToken3(title);
|
|
9175
|
+
const genericTitle = titleToken !== null && [tool, type].map((candidate) => normalizeToolToken3(candidate)).some((candidate) => candidate === titleToken);
|
|
8915
9176
|
if (message && (!title || genericTitle)) {
|
|
8916
9177
|
return message;
|
|
8917
9178
|
}
|
|
@@ -8995,7 +9256,7 @@ function createToolsetAvatarUrl(toolsetId, apiUrl) {
|
|
|
8995
9256
|
}
|
|
8996
9257
|
}
|
|
8997
9258
|
function shouldUseToolsetAvatar(toolset) {
|
|
8998
|
-
const normalized =
|
|
9259
|
+
const normalized = normalizeToolToken3(toolset);
|
|
8999
9260
|
return normalized === "mcp" || normalized === "openapi";
|
|
9000
9261
|
}
|
|
9001
9262
|
function useToolsetAvatar(toolsetId, enabled, apiUrl) {
|
|
@@ -9033,7 +9294,7 @@ function ToolAvatarIcon({
|
|
|
9033
9294
|
className
|
|
9034
9295
|
}) {
|
|
9035
9296
|
if (avatar.url) {
|
|
9036
|
-
return /* @__PURE__ */ (0,
|
|
9297
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
9037
9298
|
"img",
|
|
9038
9299
|
{
|
|
9039
9300
|
alt: "",
|
|
@@ -9046,7 +9307,7 @@ function ToolAvatarIcon({
|
|
|
9046
9307
|
}
|
|
9047
9308
|
const emoji = unicodeFromUnified2(avatar.emoji?.unified);
|
|
9048
9309
|
if (emoji) {
|
|
9049
|
-
return /* @__PURE__ */ (0,
|
|
9310
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
9050
9311
|
"span",
|
|
9051
9312
|
{
|
|
9052
9313
|
"aria-hidden": "true",
|
|
@@ -9061,7 +9322,7 @@ function ToolAvatarIcon({
|
|
|
9061
9322
|
}
|
|
9062
9323
|
);
|
|
9063
9324
|
}
|
|
9064
|
-
return /* @__PURE__ */ (0,
|
|
9325
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
9065
9326
|
import_lucide_react17.CircleHelp,
|
|
9066
9327
|
{
|
|
9067
9328
|
className,
|
|
@@ -9071,7 +9332,7 @@ function ToolAvatarIcon({
|
|
|
9071
9332
|
);
|
|
9072
9333
|
}
|
|
9073
9334
|
function getKnownToolsetIcon(toolset) {
|
|
9074
|
-
const normalized =
|
|
9335
|
+
const normalized = normalizeToolToken3(toolset);
|
|
9075
9336
|
if (!normalized) return null;
|
|
9076
9337
|
switch (normalized) {
|
|
9077
9338
|
case "project":
|
|
@@ -9094,7 +9355,7 @@ function getKnownToolsetIcon(toolset) {
|
|
|
9094
9355
|
}
|
|
9095
9356
|
}
|
|
9096
9357
|
function getStepTypeIcon(type) {
|
|
9097
|
-
const normalized =
|
|
9358
|
+
const normalized = normalizeToolToken3(type);
|
|
9098
9359
|
if (!normalized) return null;
|
|
9099
9360
|
switch (normalized) {
|
|
9100
9361
|
case "file":
|
|
@@ -9129,7 +9390,7 @@ function ToolStepIcon({
|
|
|
9129
9390
|
setFailedIconUrl(null);
|
|
9130
9391
|
}, [iconUrl]);
|
|
9131
9392
|
if (avatar) {
|
|
9132
|
-
return /* @__PURE__ */ (0,
|
|
9393
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
9133
9394
|
ToolAvatarIcon,
|
|
9134
9395
|
{
|
|
9135
9396
|
avatar,
|
|
@@ -9139,7 +9400,7 @@ function ToolStepIcon({
|
|
|
9139
9400
|
);
|
|
9140
9401
|
}
|
|
9141
9402
|
if (iconUrl && failedIconUrl !== iconUrl) {
|
|
9142
|
-
return /* @__PURE__ */ (0,
|
|
9403
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
9143
9404
|
"img",
|
|
9144
9405
|
{
|
|
9145
9406
|
alt: "",
|
|
@@ -9153,7 +9414,7 @@ function ToolStepIcon({
|
|
|
9153
9414
|
}
|
|
9154
9415
|
const TypeIcon = getStepTypeIcon(data.type);
|
|
9155
9416
|
if (TypeIcon) {
|
|
9156
|
-
return /* @__PURE__ */ (0,
|
|
9417
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
9157
9418
|
TypeIcon,
|
|
9158
9419
|
{
|
|
9159
9420
|
className,
|
|
@@ -9164,7 +9425,7 @@ function ToolStepIcon({
|
|
|
9164
9425
|
}
|
|
9165
9426
|
const ToolsetIcon = getKnownToolsetIcon(data.toolset);
|
|
9166
9427
|
if (ToolsetIcon) {
|
|
9167
|
-
return /* @__PURE__ */ (0,
|
|
9428
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
9168
9429
|
ToolsetIcon,
|
|
9169
9430
|
{
|
|
9170
9431
|
className,
|
|
@@ -9174,7 +9435,7 @@ function ToolStepIcon({
|
|
|
9174
9435
|
);
|
|
9175
9436
|
}
|
|
9176
9437
|
if (usesToolsetAvatar) {
|
|
9177
|
-
return /* @__PURE__ */ (0,
|
|
9438
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
9178
9439
|
import_lucide_react17.CircleHelp,
|
|
9179
9440
|
{
|
|
9180
9441
|
className,
|
|
@@ -9183,7 +9444,7 @@ function ToolStepIcon({
|
|
|
9183
9444
|
}
|
|
9184
9445
|
);
|
|
9185
9446
|
}
|
|
9186
|
-
return /* @__PURE__ */ (0,
|
|
9447
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
9187
9448
|
import_lucide_react17.CircleHelp,
|
|
9188
9449
|
{
|
|
9189
9450
|
className,
|
|
@@ -9214,7 +9475,7 @@ function ToolCallCopyButton({ value }) {
|
|
|
9214
9475
|
}).catch(() => void 0);
|
|
9215
9476
|
}, [clearResetTimeout, value]);
|
|
9216
9477
|
const label = isCopied ? t("message.toolGroup.copied") : t("message.toolGroup.copy");
|
|
9217
|
-
return /* @__PURE__ */ (0,
|
|
9478
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
9218
9479
|
"button",
|
|
9219
9480
|
{
|
|
9220
9481
|
type: "button",
|
|
@@ -9222,7 +9483,7 @@ function ToolCallCopyButton({ value }) {
|
|
|
9222
9483
|
"aria-label": label,
|
|
9223
9484
|
title: label,
|
|
9224
9485
|
onClick: handleCopy,
|
|
9225
|
-
children: isCopied ? /* @__PURE__ */ (0,
|
|
9486
|
+
children: isCopied ? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_lucide_react17.Check, { className: "h-3.5 w-3.5", "aria-hidden": "true" }) : /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_lucide_react17.Copy, { className: "h-3.5 w-3.5", "aria-hidden": "true" })
|
|
9226
9487
|
}
|
|
9227
9488
|
);
|
|
9228
9489
|
}
|
|
@@ -9233,28 +9494,28 @@ function ToolCallValueBlock({
|
|
|
9233
9494
|
const { t } = useChatkitTranslation();
|
|
9234
9495
|
const detected = detectJsonValue(value);
|
|
9235
9496
|
if (detected.kind === "text") {
|
|
9236
|
-
return /* @__PURE__ */ (0,
|
|
9237
|
-
/* @__PURE__ */ (0,
|
|
9238
|
-
/* @__PURE__ */ (0,
|
|
9497
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "min-w-0 space-y-1", children: [
|
|
9498
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "flex justify-end", children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(ToolCallCopyButton, { value: detected.text }) }),
|
|
9499
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(PlainTextBlock, { value: detected.text, destructive })
|
|
9239
9500
|
] });
|
|
9240
9501
|
}
|
|
9241
|
-
return /* @__PURE__ */ (0,
|
|
9242
|
-
/* @__PURE__ */ (0,
|
|
9243
|
-
/* @__PURE__ */ (0,
|
|
9502
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(Tabs, { defaultValue: "tree", className: "min-w-0", children: [
|
|
9503
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "mb-2 flex min-w-0 items-center justify-between gap-2", children: [
|
|
9504
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("span", { className: "min-w-0 truncate text-[11px] text-muted-foreground", children: [
|
|
9244
9505
|
t("message.toolGroup.jsonTitle"),
|
|
9245
9506
|
" \xB7 ",
|
|
9246
9507
|
getJsonValueSummary(detected.value)
|
|
9247
9508
|
] }),
|
|
9248
|
-
/* @__PURE__ */ (0,
|
|
9249
|
-
/* @__PURE__ */ (0,
|
|
9250
|
-
/* @__PURE__ */ (0,
|
|
9251
|
-
/* @__PURE__ */ (0,
|
|
9252
|
-
/* @__PURE__ */ (0,
|
|
9509
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "flex shrink-0 items-center gap-1", children: [
|
|
9510
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(ToolCallCopyButton, { value: detected.raw }),
|
|
9511
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(TabsList, { className: "rounded-md p-0.5", children: [
|
|
9512
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(TabsTrigger, { className: "px-2 py-0.5 text-[11px]", value: "tree", children: t("message.toolGroup.jsonTree") }),
|
|
9513
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(TabsTrigger, { className: "px-2 py-0.5 text-[11px]", value: "raw", children: t("message.toolGroup.jsonRaw") })
|
|
9253
9514
|
] })
|
|
9254
9515
|
] })
|
|
9255
9516
|
] }),
|
|
9256
|
-
/* @__PURE__ */ (0,
|
|
9257
|
-
/* @__PURE__ */ (0,
|
|
9517
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(TabsContent, { value: "tree", className: "mt-0", children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(JsonTreeView, { value: detected.value }) }),
|
|
9518
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(TabsContent, { value: "raw", className: "mt-0", children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(RawJsonBlock, { raw: detected.raw }) })
|
|
9258
9519
|
] });
|
|
9259
9520
|
}
|
|
9260
9521
|
function DefaultToolCallOutput({ data }) {
|
|
@@ -9262,15 +9523,15 @@ function DefaultToolCallOutput({ data }) {
|
|
|
9262
9523
|
const output = data.output ?? null;
|
|
9263
9524
|
const error = data.error ?? null;
|
|
9264
9525
|
if (error) {
|
|
9265
|
-
return /* @__PURE__ */ (0,
|
|
9266
|
-
/* @__PURE__ */ (0,
|
|
9267
|
-
/* @__PURE__ */ (0,
|
|
9526
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "space-y-1", children: [
|
|
9527
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "text-[11px] font-medium text-destructive", children: t("message.toolGroup.errorTitle") }),
|
|
9528
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(ToolCallValueBlock, { value: error, destructive: true })
|
|
9268
9529
|
] });
|
|
9269
9530
|
}
|
|
9270
9531
|
if (output === null) return null;
|
|
9271
|
-
return /* @__PURE__ */ (0,
|
|
9272
|
-
/* @__PURE__ */ (0,
|
|
9273
|
-
/* @__PURE__ */ (0,
|
|
9532
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "space-y-1", children: [
|
|
9533
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "text-[11px] font-medium text-muted-foreground", children: t("message.toolGroup.outputTitle") }),
|
|
9534
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(ToolCallValueBlock, { value: output })
|
|
9274
9535
|
] });
|
|
9275
9536
|
}
|
|
9276
9537
|
function ToolCallDetails({ content }) {
|
|
@@ -9280,19 +9541,19 @@ function ToolCallDetails({ content }) {
|
|
|
9280
9541
|
const hasCustomDetails = data.error === void 0 && hasComponentMessageRendererDetails(renderer, content, data);
|
|
9281
9542
|
const CustomDetailsRenderer = hasCustomDetails ? renderer?.renderDetails : void 0;
|
|
9282
9543
|
if (CustomDetailsRenderer) {
|
|
9283
|
-
return /* @__PURE__ */ (0,
|
|
9544
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "ml-6 mt-1 max-h-60 overflow-auto rounded-md bg-muted/30 text-xs text-muted-foreground", children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(CustomDetailsRenderer, { content, data }) });
|
|
9284
9545
|
}
|
|
9285
9546
|
const OutputRenderer = getToolCallOutputRenderer(data);
|
|
9286
9547
|
const hasInput = data.input !== void 0 && data.input !== null;
|
|
9287
9548
|
const hasOutput = data.error !== void 0 || data.output !== void 0;
|
|
9288
9549
|
if (!hasInput && !hasOutput) return null;
|
|
9289
|
-
return /* @__PURE__ */ (0,
|
|
9290
|
-
hasInput && /* @__PURE__ */ (0,
|
|
9291
|
-
/* @__PURE__ */ (0,
|
|
9292
|
-
/* @__PURE__ */ (0,
|
|
9550
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("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: [
|
|
9551
|
+
hasInput && /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "space-y-1", children: [
|
|
9552
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "text-[11px] font-medium text-muted-foreground", children: t("message.toolGroup.inputTitle") }),
|
|
9553
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(ToolCallValueBlock, { value: data.input })
|
|
9293
9554
|
] }),
|
|
9294
|
-
hasInput && hasOutput ? /* @__PURE__ */ (0,
|
|
9295
|
-
hasOutput ? /* @__PURE__ */ (0,
|
|
9555
|
+
hasInput && hasOutput ? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "h-2" }) : null,
|
|
9556
|
+
hasOutput ? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(OutputRenderer, { content, data }) : null
|
|
9296
9557
|
] });
|
|
9297
9558
|
}
|
|
9298
9559
|
function areToolCallRowPropsEqual(previous, next) {
|
|
@@ -9308,9 +9569,9 @@ function ToolCallRowContent({
|
|
|
9308
9569
|
const data = getToolStepData(content);
|
|
9309
9570
|
const status = getEffectiveToolStepStatus(data, isThreadRunning);
|
|
9310
9571
|
const hasError = status === "fail" || Boolean(data.error);
|
|
9311
|
-
const label = getToolActivityLabel(content, i18n2.language, status);
|
|
9312
9572
|
const detailsId = React29.useId();
|
|
9313
9573
|
const renderer = getComponentMessageRenderer(content, data);
|
|
9574
|
+
const label = renderer?.getTitle?.(content, data, i18n2.language) ?? getToolActivityLabel(content, i18n2.language, status);
|
|
9314
9575
|
const hasCustomDetails = data.error === void 0 && hasComponentMessageRendererDetails(renderer, content, data);
|
|
9315
9576
|
const hasDetails = data.input !== void 0 || data.error !== void 0 || data.output !== void 0 || hasCustomDetails;
|
|
9316
9577
|
const fallbackEndedAt = useFrozenTimestamp(
|
|
@@ -9326,8 +9587,8 @@ function ToolCallRowContent({
|
|
|
9326
9587
|
setIsExpanded(true);
|
|
9327
9588
|
}
|
|
9328
9589
|
}, [data.output, status]);
|
|
9329
|
-
return /* @__PURE__ */ (0,
|
|
9330
|
-
/* @__PURE__ */ (0,
|
|
9590
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("li", { className: "ck-tool-call-row-enter min-w-0", children: [
|
|
9591
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
|
|
9331
9592
|
"button",
|
|
9332
9593
|
{
|
|
9333
9594
|
type: "button",
|
|
@@ -9344,7 +9605,7 @@ function ToolCallRowContent({
|
|
|
9344
9605
|
if (hasDetails) setIsExpanded((prev) => !prev);
|
|
9345
9606
|
},
|
|
9346
9607
|
children: [
|
|
9347
|
-
status ? /* @__PURE__ */ (0,
|
|
9608
|
+
status ? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
9348
9609
|
ToolStepIcon,
|
|
9349
9610
|
{
|
|
9350
9611
|
data,
|
|
@@ -9355,8 +9616,8 @@ function ToolCallRowContent({
|
|
|
9355
9616
|
hasError ? "text-destructive" : "text-muted-foreground"
|
|
9356
9617
|
)
|
|
9357
9618
|
}
|
|
9358
|
-
) : /* @__PURE__ */ (0,
|
|
9359
|
-
/* @__PURE__ */ (0,
|
|
9619
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { className: "h-3.5 w-3.5 shrink-0", "aria-hidden": "true" }),
|
|
9620
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
9360
9621
|
"span",
|
|
9361
9622
|
{
|
|
9362
9623
|
className: cn(
|
|
@@ -9367,8 +9628,8 @@ function ToolCallRowContent({
|
|
|
9367
9628
|
children: label
|
|
9368
9629
|
}
|
|
9369
9630
|
),
|
|
9370
|
-
durationLabel ? /* @__PURE__ */ (0,
|
|
9371
|
-
hasDetails ? /* @__PURE__ */ (0,
|
|
9631
|
+
durationLabel ? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { className: "shrink-0 text-[11px] tabular-nums text-muted-foreground/80", children: durationLabel }) : null,
|
|
9632
|
+
hasDetails ? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
9372
9633
|
import_lucide_react17.ChevronRight,
|
|
9373
9634
|
{
|
|
9374
9635
|
"aria-hidden": "true",
|
|
@@ -9381,7 +9642,7 @@ function ToolCallRowContent({
|
|
|
9381
9642
|
]
|
|
9382
9643
|
}
|
|
9383
9644
|
),
|
|
9384
|
-
hasDetails && isExpanded ? /* @__PURE__ */ (0,
|
|
9645
|
+
hasDetails && isExpanded ? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { id: detailsId, children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(ToolCallDetails, { content }) }) : null
|
|
9385
9646
|
] });
|
|
9386
9647
|
}
|
|
9387
9648
|
var ToolCallRow = React29.memo(ToolCallRowContent, areToolCallRowPropsEqual);
|
|
@@ -9412,9 +9673,9 @@ function ToolComponentGroup({
|
|
|
9412
9673
|
const StatusIcon = config.icon;
|
|
9413
9674
|
React29.useEffect(() => {
|
|
9414
9675
|
setIsExpanded(!hasFollowingItem);
|
|
9415
|
-
}, [hasFollowingItem
|
|
9416
|
-
return /* @__PURE__ */ (0,
|
|
9417
|
-
/* @__PURE__ */ (0,
|
|
9676
|
+
}, [hasFollowingItem]);
|
|
9677
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "px-1 py-1", children: [
|
|
9678
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
|
|
9418
9679
|
"button",
|
|
9419
9680
|
{
|
|
9420
9681
|
type: "button",
|
|
@@ -9423,8 +9684,8 @@ function ToolComponentGroup({
|
|
|
9423
9684
|
"aria-controls": contentId,
|
|
9424
9685
|
onClick: () => setIsExpanded((prev) => !prev),
|
|
9425
9686
|
children: [
|
|
9426
|
-
/* @__PURE__ */ (0,
|
|
9427
|
-
/* @__PURE__ */ (0,
|
|
9687
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "flex min-w-0 items-center gap-2 text-sm font-medium text-muted-foreground", children: [
|
|
9688
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
9428
9689
|
StatusIcon,
|
|
9429
9690
|
{
|
|
9430
9691
|
className: cn(
|
|
@@ -9433,9 +9694,9 @@ function ToolComponentGroup({
|
|
|
9433
9694
|
)
|
|
9434
9695
|
}
|
|
9435
9696
|
),
|
|
9436
|
-
/* @__PURE__ */ (0,
|
|
9697
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { className: "truncate", children: summary })
|
|
9437
9698
|
] }),
|
|
9438
|
-
/* @__PURE__ */ (0,
|
|
9699
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
9439
9700
|
import_lucide_react17.ChevronRight,
|
|
9440
9701
|
{
|
|
9441
9702
|
"aria-hidden": "true",
|
|
@@ -9448,7 +9709,7 @@ function ToolComponentGroup({
|
|
|
9448
9709
|
]
|
|
9449
9710
|
}
|
|
9450
9711
|
),
|
|
9451
|
-
isExpanded && /* @__PURE__ */ (0,
|
|
9712
|
+
isExpanded && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("ul", { id: contentId, className: "mt-2 space-y-1.5 overflow-y-auto pr-1", children: items.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
9452
9713
|
ToolCallRow,
|
|
9453
9714
|
{
|
|
9454
9715
|
content: item,
|
|
@@ -9465,11 +9726,11 @@ function ToolComponentGroup({
|
|
|
9465
9726
|
var React30 = require("react");
|
|
9466
9727
|
var import_chatkit_types6 = require("@xpert-ai/chatkit-types");
|
|
9467
9728
|
var import_lucide_react18 = require("lucide-react");
|
|
9468
|
-
var
|
|
9469
|
-
function
|
|
9729
|
+
var import_jsx_runtime35 = require("react/jsx-runtime");
|
|
9730
|
+
function isRecord3(value) {
|
|
9470
9731
|
return !!value && typeof value === "object" && !Array.isArray(value);
|
|
9471
9732
|
}
|
|
9472
|
-
function
|
|
9733
|
+
function readString2(record, keys) {
|
|
9473
9734
|
for (const key of keys) {
|
|
9474
9735
|
const value = record[key];
|
|
9475
9736
|
if (typeof value === "string" && value.trim()) {
|
|
@@ -9479,12 +9740,12 @@ function readString(record, keys) {
|
|
|
9479
9740
|
return null;
|
|
9480
9741
|
}
|
|
9481
9742
|
function getToolCallId(value) {
|
|
9482
|
-
if (!
|
|
9483
|
-
return
|
|
9743
|
+
if (!isRecord3(value)) return null;
|
|
9744
|
+
return readString2(value, ["id"]);
|
|
9484
9745
|
}
|
|
9485
9746
|
function getToolCallName(value) {
|
|
9486
|
-
if (!
|
|
9487
|
-
return
|
|
9747
|
+
if (!isRecord3(value)) return null;
|
|
9748
|
+
return readString2(value, ["name"]);
|
|
9488
9749
|
}
|
|
9489
9750
|
function pushClientToolCallsFromRecord(record, calls) {
|
|
9490
9751
|
const clientToolCalls = record.clientToolCalls;
|
|
@@ -9508,16 +9769,16 @@ function findRequestUserInputClientToolCallById(messages, id) {
|
|
|
9508
9769
|
) ?? null;
|
|
9509
9770
|
}
|
|
9510
9771
|
function normalizeAnswer(value) {
|
|
9511
|
-
if (!
|
|
9512
|
-
const id =
|
|
9513
|
-
const question =
|
|
9514
|
-
const answerValue =
|
|
9515
|
-
const type =
|
|
9772
|
+
if (!isRecord3(value)) return null;
|
|
9773
|
+
const id = readString2(value, ["id"]);
|
|
9774
|
+
const question = readString2(value, ["question"]);
|
|
9775
|
+
const answerValue = readString2(value, ["value"]);
|
|
9776
|
+
const type = readString2(value, ["type"]);
|
|
9516
9777
|
if (!id || !question || !answerValue || type !== "option" && type !== "other") {
|
|
9517
9778
|
return null;
|
|
9518
9779
|
}
|
|
9519
|
-
const label =
|
|
9520
|
-
const description =
|
|
9780
|
+
const label = readString2(value, ["label"]);
|
|
9781
|
+
const description = readString2(value, ["description"]);
|
|
9521
9782
|
return {
|
|
9522
9783
|
id,
|
|
9523
9784
|
question,
|
|
@@ -9536,7 +9797,7 @@ function parseResultOutput(output) {
|
|
|
9536
9797
|
return null;
|
|
9537
9798
|
}
|
|
9538
9799
|
}
|
|
9539
|
-
if (!
|
|
9800
|
+
if (!isRecord3(result) || !Array.isArray(result.answers)) {
|
|
9540
9801
|
return null;
|
|
9541
9802
|
}
|
|
9542
9803
|
const hasExplicitType = result.type === import_chatkit_types6.REQUEST_USER_INPUT_RESULT_TYPE;
|
|
@@ -9550,7 +9811,7 @@ function parseResultOutput(output) {
|
|
|
9550
9811
|
};
|
|
9551
9812
|
}
|
|
9552
9813
|
function getRequestUserInputResultCardData(content, messages) {
|
|
9553
|
-
const data =
|
|
9814
|
+
const data = isRecord3(content.data) ? content.data : null;
|
|
9554
9815
|
if (data?.status !== "success") {
|
|
9555
9816
|
return null;
|
|
9556
9817
|
}
|
|
@@ -9577,7 +9838,7 @@ function RequestUserInputResultCard({
|
|
|
9577
9838
|
className
|
|
9578
9839
|
}) {
|
|
9579
9840
|
const { t } = useChatkitTranslation();
|
|
9580
|
-
return /* @__PURE__ */ (0,
|
|
9841
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
|
|
9581
9842
|
"section",
|
|
9582
9843
|
{
|
|
9583
9844
|
"aria-label": t("message.requestUserInputResult.title"),
|
|
@@ -9586,23 +9847,23 @@ function RequestUserInputResultCard({
|
|
|
9586
9847
|
className
|
|
9587
9848
|
),
|
|
9588
9849
|
children: [
|
|
9589
|
-
/* @__PURE__ */ (0,
|
|
9590
|
-
/* @__PURE__ */ (0,
|
|
9591
|
-
/* @__PURE__ */ (0,
|
|
9850
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "mb-2 flex items-center gap-2 text-sm font-semibold text-foreground", children: [
|
|
9851
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_lucide_react18.CheckCircle2, { className: "h-4 w-4 text-primary" }),
|
|
9852
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { children: t("message.requestUserInputResult.title") })
|
|
9592
9853
|
] }),
|
|
9593
|
-
/* @__PURE__ */ (0,
|
|
9854
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "space-y-2", children: result.answers.map((answer, index) => /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
|
|
9594
9855
|
"div",
|
|
9595
9856
|
{
|
|
9596
9857
|
className: "rounded-md bg-background/70 px-2.5 py-2",
|
|
9597
9858
|
children: [
|
|
9598
|
-
/* @__PURE__ */ (0,
|
|
9599
|
-
/* @__PURE__ */ (0,
|
|
9600
|
-
/* @__PURE__ */ (0,
|
|
9601
|
-
/* @__PURE__ */ (0,
|
|
9859
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "text-xs font-medium leading-5 text-muted-foreground", children: answer.question }),
|
|
9860
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "mt-0.5 flex min-w-0 flex-wrap items-center gap-1.5", children: [
|
|
9861
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { className: "min-w-0 wrap-break-word text-sm font-semibold text-foreground", children: answer.label ?? answer.value }),
|
|
9862
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { className: "rounded-full bg-muted px-1.5 py-0.5 text-[11px] font-medium text-muted-foreground", children: t(
|
|
9602
9863
|
answer.type === "other" ? "message.requestUserInputResult.other" : "message.requestUserInputResult.option"
|
|
9603
9864
|
) })
|
|
9604
9865
|
] }),
|
|
9605
|
-
answer.description ? /* @__PURE__ */ (0,
|
|
9866
|
+
answer.description ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "mt-1 text-xs leading-5 text-muted-foreground", children: answer.description }) : null
|
|
9606
9867
|
]
|
|
9607
9868
|
},
|
|
9608
9869
|
`${answer.id}-${index}`
|
|
@@ -9614,18 +9875,18 @@ function RequestUserInputResultCard({
|
|
|
9614
9875
|
|
|
9615
9876
|
// src/components/thread/messages/widget.tsx
|
|
9616
9877
|
var import_a2ui_react = require("@xpert-ai/a2ui-react");
|
|
9617
|
-
var
|
|
9878
|
+
var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
9618
9879
|
function WidgetMessage({ messageId, data }) {
|
|
9619
9880
|
const widgets = Array.isArray(data.widgets) ? data.widgets : [];
|
|
9620
9881
|
if (widgets.length === 0) return null;
|
|
9621
9882
|
const baseSurfaceId = `widget-${messageId}`;
|
|
9622
|
-
return /* @__PURE__ */ (0,
|
|
9883
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { className: "space-y-3", children: widgets.map((widget, index) => {
|
|
9623
9884
|
const config = widget?.config;
|
|
9624
9885
|
if (!config || typeof config !== "object") {
|
|
9625
9886
|
return null;
|
|
9626
9887
|
}
|
|
9627
9888
|
const surfaceId = widgets.length > 1 ? `${baseSurfaceId}-${index}` : baseSurfaceId;
|
|
9628
|
-
return /* @__PURE__ */ (0,
|
|
9889
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
9629
9890
|
import_a2ui_react.SurfaceRenderer,
|
|
9630
9891
|
{
|
|
9631
9892
|
surfaceId,
|
|
@@ -9637,7 +9898,7 @@ function WidgetMessage({ messageId, data }) {
|
|
|
9637
9898
|
}
|
|
9638
9899
|
|
|
9639
9900
|
// src/components/thread/messages/ai.tsx
|
|
9640
|
-
var
|
|
9901
|
+
var import_jsx_runtime37 = require("react/jsx-runtime");
|
|
9641
9902
|
var assistantMessageStackClassName = "space-y-3 in-data-[density=compact]:space-y-2 in-data-[density=spacious]:space-y-4";
|
|
9642
9903
|
function isTextContent3(content) {
|
|
9643
9904
|
return content.type === "text";
|
|
@@ -9671,11 +9932,11 @@ function formatDisplayValue3(value) {
|
|
|
9671
9932
|
function ReasoningBlock({ reasoning }) {
|
|
9672
9933
|
const blocks = reasoning.filter((item) => item.text?.trim());
|
|
9673
9934
|
if (blocks.length === 0) return null;
|
|
9674
|
-
return /* @__PURE__ */ (0,
|
|
9935
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: "space-y-2", children: blocks.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
9675
9936
|
"div",
|
|
9676
9937
|
{
|
|
9677
9938
|
className: "rounded-lg border bg-muted/40 p-3 text-xs text-muted-foreground",
|
|
9678
|
-
children: /* @__PURE__ */ (0,
|
|
9939
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("p", { className: "whitespace-pre-wrap wrap-break-word leading-relaxed", children: item.text })
|
|
9679
9940
|
},
|
|
9680
9941
|
item.id ?? `reasoning-${index}`
|
|
9681
9942
|
)) });
|
|
@@ -9683,20 +9944,20 @@ function ReasoningBlock({ reasoning }) {
|
|
|
9683
9944
|
function ImageBlock({ content }) {
|
|
9684
9945
|
const imageUrl = typeof content.image_url === "string" ? content.image_url : typeof content.image_url?.url === "string" ? content.image_url.url : null;
|
|
9685
9946
|
if (!imageUrl) {
|
|
9686
|
-
return /* @__PURE__ */ (0,
|
|
9687
|
-
/* @__PURE__ */ (0,
|
|
9688
|
-
/* @__PURE__ */ (0,
|
|
9947
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(Card, { children: [
|
|
9948
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(CardHeader, { className: "space-y-1", children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(CardTitle, { className: "text-sm", children: "Image" }) }),
|
|
9949
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(CardContent, { className: "text-xs text-muted-foreground", children: safeJson3(content) })
|
|
9689
9950
|
] });
|
|
9690
9951
|
}
|
|
9691
|
-
return /* @__PURE__ */ (0,
|
|
9952
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("figure", { className: "overflow-hidden rounded-lg border bg-background", children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("img", { src: imageUrl, alt: "Assistant output", className: "h-auto w-full object-cover" }) });
|
|
9692
9953
|
}
|
|
9693
9954
|
function MemoryBlock({ content }) {
|
|
9694
|
-
return /* @__PURE__ */ (0,
|
|
9695
|
-
/* @__PURE__ */ (0,
|
|
9696
|
-
/* @__PURE__ */ (0,
|
|
9697
|
-
/* @__PURE__ */ (0,
|
|
9955
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(Card, { children: [
|
|
9956
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(CardHeader, { className: "flex flex-row items-center justify-between gap-2", children: [
|
|
9957
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(CardTitle, { className: "text-sm", children: "Memory" }),
|
|
9958
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Badge, { variant: "secondary", children: "Memory" })
|
|
9698
9959
|
] }),
|
|
9699
|
-
/* @__PURE__ */ (0,
|
|
9960
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(CardContent, { className: "text-xs text-muted-foreground", children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("pre", { className: "whitespace-pre-wrap wrap-break-word", children: safeJson3(content.data ?? []) }) })
|
|
9700
9961
|
] });
|
|
9701
9962
|
}
|
|
9702
9963
|
function parseStepDate2(value) {
|
|
@@ -9796,24 +10057,24 @@ function ComponentBlock({ content }) {
|
|
|
9796
10057
|
}, [isExpanded, output, status]);
|
|
9797
10058
|
const config = status ? toolStatusConfig[status] : null;
|
|
9798
10059
|
const StatusIcon = config?.icon;
|
|
9799
|
-
return /* @__PURE__ */ (0,
|
|
9800
|
-
/* @__PURE__ */ (0,
|
|
9801
|
-
/* @__PURE__ */ (0,
|
|
9802
|
-
status && StatusIcon && /* @__PURE__ */ (0,
|
|
9803
|
-
/* @__PURE__ */ (0,
|
|
10060
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(Card, { children: [
|
|
10061
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(CardHeader, { className: "flex flex-row items-center justify-between gap-2 px-2 py-1 cursor-pointer", onClick: () => setIsExpanded(!isExpanded), children: [
|
|
10062
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { className: "flex items-center space-x-1 flex-1 min-w-0", children: [
|
|
10063
|
+
status && StatusIcon && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(StatusIcon, { className: cn("h-4 w-4", config?.iconClass, status === "running" && "animate-spin") }),
|
|
10064
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(CardTitle, { className: "text-sm truncate", children: title })
|
|
9804
10065
|
] }),
|
|
9805
|
-
/* @__PURE__ */ (0,
|
|
9806
|
-
durationLabel && /* @__PURE__ */ (0,
|
|
9807
|
-
/* @__PURE__ */ (0,
|
|
9808
|
-
/* @__PURE__ */ (0,
|
|
10066
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { className: "flex flex-wrap items-center gap-2 shrink-0", children: [
|
|
10067
|
+
durationLabel && /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { className: "inline-flex items-center gap-1 text-[11px] text-muted-foreground tabular-nums", children: [
|
|
10068
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_lucide_react19.Clock3, { className: "h-3 w-3" }),
|
|
10069
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)("span", { children: durationLabel })
|
|
9809
10070
|
] }),
|
|
9810
|
-
/* @__PURE__ */ (0,
|
|
9811
|
-
/* @__PURE__ */ (0,
|
|
10071
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Badge, { variant: "secondary", className: "rounded-lg px-1.5", children: category }),
|
|
10072
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
9812
10073
|
"button",
|
|
9813
10074
|
{
|
|
9814
10075
|
className: "text-muted-foreground hover:text-foreground transition-colors",
|
|
9815
10076
|
"aria-label": isExpanded ? "Collapse" : "Expand",
|
|
9816
|
-
children: /* @__PURE__ */ (0,
|
|
10077
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
9817
10078
|
import_lucide_react19.ChevronDown,
|
|
9818
10079
|
{
|
|
9819
10080
|
className: cn("h-4 w-4 transition-transform", isExpanded && "rotate-180")
|
|
@@ -9823,35 +10084,35 @@ function ComponentBlock({ content }) {
|
|
|
9823
10084
|
)
|
|
9824
10085
|
] })
|
|
9825
10086
|
] }),
|
|
9826
|
-
isExpanded && /* @__PURE__ */ (0,
|
|
9827
|
-
data.input && /* @__PURE__ */ (0,
|
|
9828
|
-
error ? /* @__PURE__ */ (0,
|
|
10087
|
+
isExpanded && /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(CardContent, { ref: contentRef, className: "text-xs text-muted-foreground max-h-60 overflow-auto", children: [
|
|
10088
|
+
data.input && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("pre", { className: "whitespace-pre-wrap wrap-break-word", children: formatDisplayValue3(data.input) }),
|
|
10089
|
+
error ? /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("pre", { className: "whitespace-pre-wrap wrap-break-word text-destructive", children: formatDisplayValue3(error) }) : hasOutput && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("pre", { className: "whitespace-pre-wrap wrap-break-word", children: formatDisplayValue3(fallback) })
|
|
9829
10090
|
] })
|
|
9830
10091
|
] });
|
|
9831
10092
|
}
|
|
9832
10093
|
function UnknownBlock({ content }) {
|
|
9833
|
-
return /* @__PURE__ */ (0,
|
|
9834
|
-
/* @__PURE__ */ (0,
|
|
9835
|
-
/* @__PURE__ */ (0,
|
|
9836
|
-
/* @__PURE__ */ (0,
|
|
10094
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(Card, { children: [
|
|
10095
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(CardHeader, { className: "flex flex-row items-center justify-between gap-2", children: [
|
|
10096
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(CardTitle, { className: "text-sm", children: "Assistant Content" }),
|
|
10097
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Badge, { variant: "outline", children: content.type ?? "unknown" })
|
|
9837
10098
|
] }),
|
|
9838
|
-
/* @__PURE__ */ (0,
|
|
10099
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(CardContent, { className: "text-xs text-muted-foreground", children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("pre", { className: "whitespace-pre-wrap break-words", children: safeJson3(content) }) })
|
|
9839
10100
|
] });
|
|
9840
10101
|
}
|
|
9841
10102
|
function renderContentItem(content, index, message, lookupMessages, options) {
|
|
9842
10103
|
const messageId = message.id;
|
|
9843
10104
|
const textClassName = options?.isAgentOutput ? "text-sm [&_.markdown-content_p]:!leading-6" : void 0;
|
|
9844
10105
|
if (typeof content === "string") {
|
|
9845
|
-
return /* @__PURE__ */ (0,
|
|
10106
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: textClassName, children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(MarkdownText, { children: content }) }, `text-${index}`);
|
|
9846
10107
|
}
|
|
9847
10108
|
if (isTextContent3(content)) {
|
|
9848
|
-
return /* @__PURE__ */ (0,
|
|
10109
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: textClassName, children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(MarkdownText, { children: content.text }) }, content.id ?? `text-${index}`);
|
|
9849
10110
|
}
|
|
9850
10111
|
if (isReasoningContent3(content)) {
|
|
9851
|
-
return /* @__PURE__ */ (0,
|
|
10112
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(ReasoningBlock, { reasoning: [content] }) }, content.id ?? `reasoning-${index}`);
|
|
9852
10113
|
}
|
|
9853
10114
|
if (isImageContent(content)) {
|
|
9854
|
-
return /* @__PURE__ */ (0,
|
|
10115
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(ImageBlock, { content }) }, content.id ?? `image-${index}`);
|
|
9855
10116
|
}
|
|
9856
10117
|
if (isComponentContent3(content)) {
|
|
9857
10118
|
const requestUserInputResult = getRequestUserInputResultCardData(
|
|
@@ -9859,13 +10120,13 @@ function renderContentItem(content, index, message, lookupMessages, options) {
|
|
|
9859
10120
|
lookupMessages
|
|
9860
10121
|
);
|
|
9861
10122
|
if (requestUserInputResult) {
|
|
9862
|
-
return /* @__PURE__ */ (0,
|
|
10123
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(RequestUserInputResultCard, { result: requestUserInputResult }) }, content.id ?? `request-user-input-result-${index}`);
|
|
9863
10124
|
}
|
|
9864
10125
|
if (isWidgetComponent2(content)) {
|
|
9865
|
-
return /* @__PURE__ */ (0,
|
|
10126
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(WidgetMessage, { messageId, data: content.data }) }, content.id ?? `widget-${index}`);
|
|
9866
10127
|
}
|
|
9867
10128
|
if (getComponentMessagePresentation(content, getToolStepData(content)) === "grouped-step") {
|
|
9868
|
-
return /* @__PURE__ */ (0,
|
|
10129
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
9869
10130
|
ToolComponentGroup,
|
|
9870
10131
|
{
|
|
9871
10132
|
items: [content],
|
|
@@ -9876,15 +10137,15 @@ function renderContentItem(content, index, message, lookupMessages, options) {
|
|
|
9876
10137
|
}
|
|
9877
10138
|
) }, content.id ?? `component-group-${index}`);
|
|
9878
10139
|
}
|
|
9879
|
-
return /* @__PURE__ */ (0,
|
|
10140
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(ComponentBlock, { content }) }, content.id ?? `component-${index}`);
|
|
9880
10141
|
}
|
|
9881
10142
|
if (isMemoryContent(content)) {
|
|
9882
|
-
return /* @__PURE__ */ (0,
|
|
10143
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(MemoryBlock, { content }) }, content.id ?? `memory-${index}`);
|
|
9883
10144
|
}
|
|
9884
10145
|
if (isAgentEventContent(content)) {
|
|
9885
|
-
return /* @__PURE__ */ (0,
|
|
10146
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(AgentEventRow, { content }) }, content.id ?? `agent-event-${index}`);
|
|
9886
10147
|
}
|
|
9887
|
-
return /* @__PURE__ */ (0,
|
|
10148
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(UnknownBlock, { content }) }, content.id ?? `unknown-${index}`);
|
|
9888
10149
|
}
|
|
9889
10150
|
function renderContentUnit(unit, message, lookupMessages, hasFollowingItem, options) {
|
|
9890
10151
|
if (unit.type === "item") {
|
|
@@ -9895,22 +10156,16 @@ function renderContentUnit(unit, message, lookupMessages, hasFollowingItem, opti
|
|
|
9895
10156
|
isAgentOutput: options?.isAgentOutput
|
|
9896
10157
|
});
|
|
9897
10158
|
}
|
|
9898
|
-
return /* @__PURE__ */ (0,
|
|
9899
|
-
|
|
10159
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
10160
|
+
ToolComponentGroup,
|
|
9900
10161
|
{
|
|
9901
|
-
|
|
9902
|
-
|
|
9903
|
-
|
|
9904
|
-
|
|
9905
|
-
|
|
9906
|
-
|
|
9907
|
-
|
|
9908
|
-
apiUrl: options?.apiUrl
|
|
9909
|
-
}
|
|
9910
|
-
)
|
|
9911
|
-
},
|
|
9912
|
-
`tool-group-${unit.startIndex}-${unit.items[0]?.id ?? "tool"}-${unit.items.length}`
|
|
9913
|
-
);
|
|
10162
|
+
items: unit.items,
|
|
10163
|
+
hasFollowingItem,
|
|
10164
|
+
isThreadRunning: options?.isThreadRunning,
|
|
10165
|
+
organizationId: options?.organizationId,
|
|
10166
|
+
apiUrl: options?.apiUrl
|
|
10167
|
+
}
|
|
10168
|
+
) }, `tool-group-${unit.startIndex}-${unit.items[0]?.id ?? "tool"}`);
|
|
9914
10169
|
}
|
|
9915
10170
|
function renderEntryBatch(entries, message, lookupMessages, hasFollowingItem, options) {
|
|
9916
10171
|
if (entries.length === 0) return null;
|
|
@@ -9938,7 +10193,7 @@ function renderAssistantRenderUnits(units, message, lookupMessages, options, dep
|
|
|
9938
10193
|
const batch = entryBatch;
|
|
9939
10194
|
entryBatch = [];
|
|
9940
10195
|
rendered.push(
|
|
9941
|
-
/* @__PURE__ */ (0,
|
|
10196
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(React31.Fragment, { children: renderEntryBatch(batch, message, lookupMessages, hasFollowingItem, {
|
|
9942
10197
|
...options,
|
|
9943
10198
|
isAgentOutput: depth > 0
|
|
9944
10199
|
}) }, `entries-${batch[0]?.order ?? rendered.length}`)
|
|
@@ -9955,7 +10210,7 @@ function renderAssistantRenderUnits(units, message, lookupMessages, options, dep
|
|
|
9955
10210
|
}
|
|
9956
10211
|
flushEntries(true);
|
|
9957
10212
|
rendered.push(
|
|
9958
|
-
/* @__PURE__ */ (0,
|
|
10213
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
9959
10214
|
AgentRunGroup,
|
|
9960
10215
|
{
|
|
9961
10216
|
node: unit.node,
|
|
@@ -9980,7 +10235,7 @@ function renderContent(message, lookupMessages, options) {
|
|
|
9980
10235
|
message
|
|
9981
10236
|
);
|
|
9982
10237
|
if (renderTree.hasAgentRuns) {
|
|
9983
|
-
return /* @__PURE__ */ (0,
|
|
10238
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: assistantMessageStackClassName, children: renderAssistantRenderUnits(
|
|
9984
10239
|
renderTree.units,
|
|
9985
10240
|
message,
|
|
9986
10241
|
lookupMessages,
|
|
@@ -9990,13 +10245,13 @@ function renderContent(message, lookupMessages, options) {
|
|
|
9990
10245
|
const content = message.content;
|
|
9991
10246
|
if (typeof content === "string") {
|
|
9992
10247
|
if (!content.trim()) return null;
|
|
9993
|
-
return /* @__PURE__ */ (0,
|
|
10248
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(MarkdownText, { children: content });
|
|
9994
10249
|
}
|
|
9995
10250
|
if (!Array.isArray(content) || content.length === 0) return null;
|
|
9996
10251
|
const renderUnits = buildToolComponentRenderUnits(content, {
|
|
9997
10252
|
shouldGroupComponent: (item) => getRequestUserInputResultCardData(item, lookupMessages) === null
|
|
9998
10253
|
});
|
|
9999
|
-
return /* @__PURE__ */ (0,
|
|
10254
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: "space-y-3", children: renderUnits.map(
|
|
10000
10255
|
(unit, index) => renderContentUnit(
|
|
10001
10256
|
unit,
|
|
10002
10257
|
message,
|
|
@@ -10016,7 +10271,7 @@ function AssistantStreamingIndicator({
|
|
|
10016
10271
|
thinking: t("message.thinking"),
|
|
10017
10272
|
answering: t("message.answering")
|
|
10018
10273
|
};
|
|
10019
|
-
return /* @__PURE__ */ (0,
|
|
10274
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
|
|
10020
10275
|
"div",
|
|
10021
10276
|
{
|
|
10022
10277
|
className: cn(
|
|
@@ -10024,18 +10279,18 @@ function AssistantStreamingIndicator({
|
|
|
10024
10279
|
className
|
|
10025
10280
|
),
|
|
10026
10281
|
children: [
|
|
10027
|
-
status === "loading" && /* @__PURE__ */ (0,
|
|
10028
|
-
status === "thinking" && /* @__PURE__ */ (0,
|
|
10029
|
-
/* @__PURE__ */ (0,
|
|
10030
|
-
/* @__PURE__ */ (0,
|
|
10031
|
-
/* @__PURE__ */ (0,
|
|
10282
|
+
status === "loading" && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_lucide_react19.Loader2, { className: "h-3.5 w-3.5 animate-spin" }),
|
|
10283
|
+
status === "thinking" && /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { className: "flex items-end gap-1", "aria-hidden": "true", children: [
|
|
10284
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)("span", { className: "h-1.5 w-1.5 rounded-full bg-current animate-bounce [animation-delay:-0.3s]" }),
|
|
10285
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)("span", { className: "h-1.5 w-1.5 rounded-full bg-current animate-bounce [animation-delay:-0.15s]" }),
|
|
10286
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)("span", { className: "h-1.5 w-1.5 rounded-full bg-current animate-bounce" })
|
|
10032
10287
|
] }),
|
|
10033
|
-
status === "answering" && /* @__PURE__ */ (0,
|
|
10034
|
-
/* @__PURE__ */ (0,
|
|
10035
|
-
/* @__PURE__ */ (0,
|
|
10036
|
-
/* @__PURE__ */ (0,
|
|
10288
|
+
status === "answering" && /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { className: "flex items-end gap-1", "aria-hidden": "true", children: [
|
|
10289
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)("span", { className: "h-2 w-0.5 rounded-full bg-current animate-pulse [animation-delay:-0.25s]" }),
|
|
10290
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)("span", { className: "h-3 w-0.5 rounded-full bg-current animate-pulse [animation-delay:-0.1s]" }),
|
|
10291
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)("span", { className: "h-2.5 w-0.5 rounded-full bg-current animate-pulse" })
|
|
10037
10292
|
] }),
|
|
10038
|
-
/* @__PURE__ */ (0,
|
|
10293
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)("span", { children: labelMap[status] })
|
|
10039
10294
|
]
|
|
10040
10295
|
}
|
|
10041
10296
|
);
|
|
@@ -10064,42 +10319,42 @@ function AssistantMessage({
|
|
|
10064
10319
|
organizationId,
|
|
10065
10320
|
apiUrl
|
|
10066
10321
|
});
|
|
10067
|
-
const reasoningNode = hasReasoning ? /* @__PURE__ */ (0,
|
|
10322
|
+
const reasoningNode = hasReasoning ? /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(ReasoningBlock, { reasoning: rootReasoning ?? [] }) : null;
|
|
10068
10323
|
if (!hasContent && !hasReasoning && !resolvedStreamingStatus) return null;
|
|
10069
10324
|
const streamingClass = isStreaming ? "streaming-active" : "";
|
|
10070
10325
|
if (!hasContent && !hasReasoning && resolvedStreamingStatus) {
|
|
10071
|
-
return /* @__PURE__ */ (0,
|
|
10326
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: cn("space-y-3", streamingClass, className), children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(AssistantStreamingIndicator, { status: resolvedStreamingStatus }) });
|
|
10072
10327
|
}
|
|
10073
10328
|
if (hasContent && hasReasoning) {
|
|
10074
|
-
return /* @__PURE__ */ (0,
|
|
10075
|
-
/* @__PURE__ */ (0,
|
|
10329
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { className: cn("space-y-3", streamingClass, className), children: [
|
|
10330
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
|
|
10076
10331
|
Tabs,
|
|
10077
10332
|
{
|
|
10078
10333
|
defaultValue: message.status === "reasoning" ? "reasoning" : "answer",
|
|
10079
10334
|
className: "w-full",
|
|
10080
10335
|
children: [
|
|
10081
|
-
/* @__PURE__ */ (0,
|
|
10082
|
-
/* @__PURE__ */ (0,
|
|
10083
|
-
/* @__PURE__ */ (0,
|
|
10336
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(TabsList, { className: "", children: [
|
|
10337
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(TabsTrigger, { value: "answer", children: t("message.answer") }),
|
|
10338
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(TabsTrigger, { value: "reasoning", children: t("message.reasoning") })
|
|
10084
10339
|
] }),
|
|
10085
|
-
/* @__PURE__ */ (0,
|
|
10086
|
-
/* @__PURE__ */ (0,
|
|
10340
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(TabsContent, { value: "answer", className: "space-y-3", children: answerNode }),
|
|
10341
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(TabsContent, { value: "reasoning", className: "space-y-3", children: reasoningNode })
|
|
10087
10342
|
]
|
|
10088
10343
|
}
|
|
10089
10344
|
),
|
|
10090
|
-
resolvedStreamingStatus ? /* @__PURE__ */ (0,
|
|
10345
|
+
resolvedStreamingStatus ? /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(AssistantStreamingIndicator, { status: resolvedStreamingStatus }) : null
|
|
10091
10346
|
] });
|
|
10092
10347
|
}
|
|
10093
|
-
return /* @__PURE__ */ (0,
|
|
10348
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { className: cn("space-y-3", streamingClass, className), children: [
|
|
10094
10349
|
hasReasoning ? reasoningNode : answerNode,
|
|
10095
|
-
resolvedStreamingStatus ? /* @__PURE__ */ (0,
|
|
10350
|
+
resolvedStreamingStatus ? /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(AssistantStreamingIndicator, { status: resolvedStreamingStatus }) : null
|
|
10096
10351
|
] });
|
|
10097
10352
|
}
|
|
10098
10353
|
|
|
10099
10354
|
// src/components/thread/MessageActions.tsx
|
|
10100
10355
|
var React32 = __toESM(require("react"), 1);
|
|
10101
10356
|
var import_lucide_react20 = require("lucide-react");
|
|
10102
|
-
var
|
|
10357
|
+
var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
10103
10358
|
function MessageActions({
|
|
10104
10359
|
content,
|
|
10105
10360
|
isAssistant = false,
|
|
@@ -10121,7 +10376,7 @@ function MessageActions({
|
|
|
10121
10376
|
if (isStreaming) {
|
|
10122
10377
|
return null;
|
|
10123
10378
|
}
|
|
10124
|
-
return /* @__PURE__ */ (0,
|
|
10379
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(
|
|
10125
10380
|
"div",
|
|
10126
10381
|
{
|
|
10127
10382
|
className: cn(
|
|
@@ -10129,7 +10384,7 @@ function MessageActions({
|
|
|
10129
10384
|
className
|
|
10130
10385
|
),
|
|
10131
10386
|
children: [
|
|
10132
|
-
/* @__PURE__ */ (0,
|
|
10387
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
10133
10388
|
"button",
|
|
10134
10389
|
{
|
|
10135
10390
|
type: "button",
|
|
@@ -10139,17 +10394,17 @@ function MessageActions({
|
|
|
10139
10394
|
copied && "text-green-500"
|
|
10140
10395
|
),
|
|
10141
10396
|
title: copied ? t("messageActions.copied") : t("messageActions.copy"),
|
|
10142
|
-
children: copied ? /* @__PURE__ */ (0,
|
|
10397
|
+
children: copied ? /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_lucide_react20.Check, { size: 14 }) : /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_lucide_react20.Copy, { size: 14 })
|
|
10143
10398
|
}
|
|
10144
10399
|
),
|
|
10145
|
-
isAssistant && onRetry && /* @__PURE__ */ (0,
|
|
10400
|
+
isAssistant && onRetry && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
10146
10401
|
"button",
|
|
10147
10402
|
{
|
|
10148
10403
|
type: "button",
|
|
10149
10404
|
onClick: onRetry,
|
|
10150
10405
|
className: "p-1.5 rounded-md text-muted-foreground hover:text-foreground hover:bg-muted transition-colors",
|
|
10151
10406
|
title: t("messageActions.regenerate"),
|
|
10152
|
-
children: /* @__PURE__ */ (0,
|
|
10407
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_lucide_react20.RefreshCw, { size: 14 })
|
|
10153
10408
|
}
|
|
10154
10409
|
)
|
|
10155
10410
|
]
|
|
@@ -10160,18 +10415,18 @@ function MessageActions({
|
|
|
10160
10415
|
// src/components/thread/StartScreen.tsx
|
|
10161
10416
|
var React33 = require("react");
|
|
10162
10417
|
var import_lucide_react21 = require("lucide-react");
|
|
10163
|
-
var
|
|
10418
|
+
var import_jsx_runtime39 = require("react/jsx-runtime");
|
|
10164
10419
|
function getIconComponent2(icon) {
|
|
10165
10420
|
const iconMap = {
|
|
10166
|
-
"circle-question": /* @__PURE__ */ (0,
|
|
10167
|
-
"lightbulb": /* @__PURE__ */ (0,
|
|
10168
|
-
"sparkle": /* @__PURE__ */ (0,
|
|
10169
|
-
"write": /* @__PURE__ */ (0,
|
|
10170
|
-
"search": /* @__PURE__ */ (0,
|
|
10171
|
-
"globe": /* @__PURE__ */ (0,
|
|
10172
|
-
"book-open": /* @__PURE__ */ (0,
|
|
10173
|
-
"compass": /* @__PURE__ */ (0,
|
|
10174
|
-
"bolt": /* @__PURE__ */ (0,
|
|
10421
|
+
"circle-question": /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_lucide_react21.HelpCircle, { size: 20 }),
|
|
10422
|
+
"lightbulb": /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_lucide_react21.Lightbulb, { size: 20 }),
|
|
10423
|
+
"sparkle": /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_lucide_react21.Sparkles, { size: 20 }),
|
|
10424
|
+
"write": /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_lucide_react21.Pencil, { size: 20 }),
|
|
10425
|
+
"search": /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_lucide_react21.Search, { size: 20 }),
|
|
10426
|
+
"globe": /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_lucide_react21.Globe, { size: 20 }),
|
|
10427
|
+
"book-open": /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_lucide_react21.BookOpen, { size: 20 }),
|
|
10428
|
+
"compass": /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_lucide_react21.Compass, { size: 20 }),
|
|
10429
|
+
"bolt": /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_lucide_react21.Zap, { size: 20 })
|
|
10175
10430
|
};
|
|
10176
10431
|
return icon ? iconMap[icon] || iconMap["sparkle"] : iconMap["sparkle"];
|
|
10177
10432
|
}
|
|
@@ -10179,9 +10434,9 @@ function StartScreen({ startScreen, onPromptClick, className }) {
|
|
|
10179
10434
|
const { t } = useChatkitTranslation();
|
|
10180
10435
|
const greeting = startScreen?.greeting ?? t("startScreen.greeting");
|
|
10181
10436
|
const prompts = startScreen?.prompts ?? [];
|
|
10182
|
-
return /* @__PURE__ */ (0,
|
|
10183
|
-
/* @__PURE__ */ (0,
|
|
10184
|
-
prompts.length > 0 && /* @__PURE__ */ (0,
|
|
10437
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: cn("flex flex-col items-center justify-center py-12 px-4", className), children: [
|
|
10438
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: "mb-8 text-center", children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("h2", { className: "text-2xl font-semibold text-foreground mb-2", children: greeting }) }),
|
|
10439
|
+
prompts.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: "w-full max-w-2xl", children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: "grid grid-cols-1 sm:grid-cols-2 gap-3", children: prompts.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
|
|
10185
10440
|
"button",
|
|
10186
10441
|
{
|
|
10187
10442
|
type: "button",
|
|
@@ -10192,8 +10447,8 @@ function StartScreen({ startScreen, onPromptClick, className }) {
|
|
|
10192
10447
|
"focus:outline-none focus:ring-2 focus:ring-primary/20"
|
|
10193
10448
|
),
|
|
10194
10449
|
children: [
|
|
10195
|
-
/* @__PURE__ */ (0,
|
|
10196
|
-
/* @__PURE__ */ (0,
|
|
10450
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { className: "flex h-10 w-10 shrink-0 items-center justify-center rounded-lg bg-primary/10 text-primary", children: getIconComponent2(item.icon) }),
|
|
10451
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { className: "text-sm font-medium text-foreground", children: item.label })
|
|
10197
10452
|
]
|
|
10198
10453
|
},
|
|
10199
10454
|
`prompt-${index}`
|
|
@@ -10392,7 +10647,7 @@ function useThreads(limit = DEFAULT_LIMIT) {
|
|
|
10392
10647
|
var React35 = __toESM(require("react"), 1);
|
|
10393
10648
|
|
|
10394
10649
|
// src/components/ui/progress-circle.tsx
|
|
10395
|
-
var
|
|
10650
|
+
var import_jsx_runtime40 = (
|
|
10396
10651
|
// biome-ignore lint/a11y/useFocusableInteractive: false positive (progress + progressbar are not focusable interactives)
|
|
10397
10652
|
// biome-ignore lint/nursery/useAriaPropsSupportedByRole: biome rule at odds with mdn docs (presumed nursary bug with rule)
|
|
10398
10653
|
require("react/jsx-runtime")
|
|
@@ -10416,7 +10671,7 @@ var ProgressCircle = ({ value, className, ...restSvgProps }) => {
|
|
|
10416
10671
|
fill: "none",
|
|
10417
10672
|
strokeWidth
|
|
10418
10673
|
};
|
|
10419
|
-
return /* @__PURE__ */ (0,
|
|
10674
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
|
|
10420
10675
|
"svg",
|
|
10421
10676
|
{
|
|
10422
10677
|
role: "progressbar",
|
|
@@ -10427,8 +10682,8 @@ var ProgressCircle = ({ value, className, ...restSvgProps }) => {
|
|
|
10427
10682
|
"aria-valuemax": 100,
|
|
10428
10683
|
...restSvgProps,
|
|
10429
10684
|
children: [
|
|
10430
|
-
/* @__PURE__ */ (0,
|
|
10431
|
-
/* @__PURE__ */ (0,
|
|
10685
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)("circle", { ...commonParams, className: "stroke-current/25" }),
|
|
10686
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
10432
10687
|
"circle",
|
|
10433
10688
|
{
|
|
10434
10689
|
...commonParams,
|
|
@@ -10446,7 +10701,7 @@ var ProgressCircle = ({ value, className, ...restSvgProps }) => {
|
|
|
10446
10701
|
};
|
|
10447
10702
|
|
|
10448
10703
|
// src/components/thread/context-usage-indicator.tsx
|
|
10449
|
-
var
|
|
10704
|
+
var import_jsx_runtime41 = require("react/jsx-runtime");
|
|
10450
10705
|
var kNumberFormatter = new Intl.NumberFormat("en-US", {
|
|
10451
10706
|
minimumFractionDigits: 0,
|
|
10452
10707
|
maximumFractionDigits: 1
|
|
@@ -10588,8 +10843,8 @@ function ContextUsageIndicator({
|
|
|
10588
10843
|
});
|
|
10589
10844
|
const usageLabelWithSuffix = usageLabel.endsWith(":") ? usageLabel : `${usageLabel}:`;
|
|
10590
10845
|
const progressClassName = percent >= 90 ? "text-destructive" : percent >= 75 ? "text-amber-500" : "text-primary dark:text-zinc-300";
|
|
10591
|
-
return /* @__PURE__ */ (0,
|
|
10592
|
-
/* @__PURE__ */ (0,
|
|
10846
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(Tooltip, { children: [
|
|
10847
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
10593
10848
|
"button",
|
|
10594
10849
|
{
|
|
10595
10850
|
type: "button",
|
|
@@ -10598,13 +10853,13 @@ function ContextUsageIndicator({
|
|
|
10598
10853
|
className
|
|
10599
10854
|
),
|
|
10600
10855
|
"aria-label": `${usageLabelWithSuffix} ${usageFullLabel}. ${usageTokensLabel}`,
|
|
10601
|
-
children: /* @__PURE__ */ (0,
|
|
10856
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(ProgressCircle, { value: percent, className: cn("size-3.5", progressClassName) })
|
|
10602
10857
|
}
|
|
10603
10858
|
) }),
|
|
10604
|
-
/* @__PURE__ */ (0,
|
|
10605
|
-
/* @__PURE__ */ (0,
|
|
10606
|
-
/* @__PURE__ */ (0,
|
|
10607
|
-
/* @__PURE__ */ (0,
|
|
10859
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(TooltipContent, { side: "top", sideOffset: 6, className: "space-y-0.5 px-3 py-2 text-center", children: [
|
|
10860
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { className: "text-primary-foreground/70", children: usageLabelWithSuffix }),
|
|
10861
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { className: "font-medium text-primary-foreground/80", children: usageFullLabel }),
|
|
10862
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { className: "text-sm font-semibold", children: usageTokensLabel })
|
|
10608
10863
|
] })
|
|
10609
10864
|
] });
|
|
10610
10865
|
}
|
|
@@ -10637,10 +10892,10 @@ var import_lucide_react23 = require("lucide-react");
|
|
|
10637
10892
|
|
|
10638
10893
|
// src/components/ui/input.tsx
|
|
10639
10894
|
var React37 = __toESM(require("react"), 1);
|
|
10640
|
-
var
|
|
10895
|
+
var import_jsx_runtime42 = require("react/jsx-runtime");
|
|
10641
10896
|
var Input = React37.forwardRef(
|
|
10642
10897
|
({ className, type, ...props }, ref) => {
|
|
10643
|
-
return /* @__PURE__ */ (0,
|
|
10898
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
10644
10899
|
"input",
|
|
10645
10900
|
{
|
|
10646
10901
|
ref,
|
|
@@ -10660,17 +10915,17 @@ Input.displayName = "Input";
|
|
|
10660
10915
|
var React38 = require("react");
|
|
10661
10916
|
var import_radix_ui2 = require("radix-ui");
|
|
10662
10917
|
var import_lucide_react22 = require("lucide-react");
|
|
10663
|
-
var
|
|
10918
|
+
var import_jsx_runtime43 = require("react/jsx-runtime");
|
|
10664
10919
|
function Select({
|
|
10665
10920
|
...props
|
|
10666
10921
|
}) {
|
|
10667
|
-
return /* @__PURE__ */ (0,
|
|
10922
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_radix_ui2.Select.Root, { "data-slot": "select", ...props });
|
|
10668
10923
|
}
|
|
10669
10924
|
function SelectGroup({
|
|
10670
10925
|
className,
|
|
10671
10926
|
...props
|
|
10672
10927
|
}) {
|
|
10673
|
-
return /* @__PURE__ */ (0,
|
|
10928
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
10674
10929
|
import_radix_ui2.Select.Group,
|
|
10675
10930
|
{
|
|
10676
10931
|
"data-slot": "select-group",
|
|
@@ -10682,7 +10937,7 @@ function SelectGroup({
|
|
|
10682
10937
|
function SelectValue({
|
|
10683
10938
|
...props
|
|
10684
10939
|
}) {
|
|
10685
|
-
return /* @__PURE__ */ (0,
|
|
10940
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_radix_ui2.Select.Value, { "data-slot": "select-value", ...props });
|
|
10686
10941
|
}
|
|
10687
10942
|
function SelectTrigger({
|
|
10688
10943
|
className,
|
|
@@ -10690,7 +10945,7 @@ function SelectTrigger({
|
|
|
10690
10945
|
children,
|
|
10691
10946
|
...props
|
|
10692
10947
|
}) {
|
|
10693
|
-
return /* @__PURE__ */ (0,
|
|
10948
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
|
|
10694
10949
|
import_radix_ui2.Select.Trigger,
|
|
10695
10950
|
{
|
|
10696
10951
|
"data-slot": "select-trigger",
|
|
@@ -10702,7 +10957,7 @@ function SelectTrigger({
|
|
|
10702
10957
|
...props,
|
|
10703
10958
|
children: [
|
|
10704
10959
|
children,
|
|
10705
|
-
/* @__PURE__ */ (0,
|
|
10960
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_radix_ui2.Select.Icon, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_lucide_react22.ChevronDownIcon, { className: "pointer-events-none size-4 text-muted-foreground" }) })
|
|
10706
10961
|
]
|
|
10707
10962
|
}
|
|
10708
10963
|
);
|
|
@@ -10714,7 +10969,7 @@ function SelectContent({
|
|
|
10714
10969
|
align = "center",
|
|
10715
10970
|
...props
|
|
10716
10971
|
}) {
|
|
10717
|
-
return /* @__PURE__ */ (0,
|
|
10972
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_radix_ui2.Select.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
|
|
10718
10973
|
import_radix_ui2.Select.Content,
|
|
10719
10974
|
{
|
|
10720
10975
|
"data-slot": "select-content",
|
|
@@ -10724,8 +10979,8 @@ function SelectContent({
|
|
|
10724
10979
|
align,
|
|
10725
10980
|
...props,
|
|
10726
10981
|
children: [
|
|
10727
|
-
/* @__PURE__ */ (0,
|
|
10728
|
-
/* @__PURE__ */ (0,
|
|
10982
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(SelectScrollUpButton, {}),
|
|
10983
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
10729
10984
|
import_radix_ui2.Select.Viewport,
|
|
10730
10985
|
{
|
|
10731
10986
|
"data-position": position,
|
|
@@ -10736,7 +10991,7 @@ function SelectContent({
|
|
|
10736
10991
|
children
|
|
10737
10992
|
}
|
|
10738
10993
|
),
|
|
10739
|
-
/* @__PURE__ */ (0,
|
|
10994
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(SelectScrollDownButton, {})
|
|
10740
10995
|
]
|
|
10741
10996
|
}
|
|
10742
10997
|
) });
|
|
@@ -10746,7 +11001,7 @@ function SelectItem({
|
|
|
10746
11001
|
children,
|
|
10747
11002
|
...props
|
|
10748
11003
|
}) {
|
|
10749
|
-
return /* @__PURE__ */ (0,
|
|
11004
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
|
|
10750
11005
|
import_radix_ui2.Select.Item,
|
|
10751
11006
|
{
|
|
10752
11007
|
"data-slot": "select-item",
|
|
@@ -10756,8 +11011,8 @@ function SelectItem({
|
|
|
10756
11011
|
),
|
|
10757
11012
|
...props,
|
|
10758
11013
|
children: [
|
|
10759
|
-
/* @__PURE__ */ (0,
|
|
10760
|
-
/* @__PURE__ */ (0,
|
|
11014
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)("span", { className: "pointer-events-none absolute right-2 flex size-4 items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_radix_ui2.Select.ItemIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_lucide_react22.CheckIcon, { className: "pointer-events-none" }) }) }),
|
|
11015
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_radix_ui2.Select.ItemText, { children })
|
|
10761
11016
|
]
|
|
10762
11017
|
}
|
|
10763
11018
|
);
|
|
@@ -10766,7 +11021,7 @@ function SelectScrollUpButton({
|
|
|
10766
11021
|
className,
|
|
10767
11022
|
...props
|
|
10768
11023
|
}) {
|
|
10769
|
-
return /* @__PURE__ */ (0,
|
|
11024
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
10770
11025
|
import_radix_ui2.Select.ScrollUpButton,
|
|
10771
11026
|
{
|
|
10772
11027
|
"data-slot": "select-scroll-up-button",
|
|
@@ -10775,7 +11030,7 @@ function SelectScrollUpButton({
|
|
|
10775
11030
|
className
|
|
10776
11031
|
),
|
|
10777
11032
|
...props,
|
|
10778
|
-
children: /* @__PURE__ */ (0,
|
|
11033
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
10779
11034
|
import_lucide_react22.ChevronUpIcon,
|
|
10780
11035
|
{}
|
|
10781
11036
|
)
|
|
@@ -10786,7 +11041,7 @@ function SelectScrollDownButton({
|
|
|
10786
11041
|
className,
|
|
10787
11042
|
...props
|
|
10788
11043
|
}) {
|
|
10789
|
-
return /* @__PURE__ */ (0,
|
|
11044
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
10790
11045
|
import_radix_ui2.Select.ScrollDownButton,
|
|
10791
11046
|
{
|
|
10792
11047
|
"data-slot": "select-scroll-down-button",
|
|
@@ -10795,7 +11050,7 @@ function SelectScrollDownButton({
|
|
|
10795
11050
|
className
|
|
10796
11051
|
),
|
|
10797
11052
|
...props,
|
|
10798
|
-
children: /* @__PURE__ */ (0,
|
|
11053
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
10799
11054
|
import_lucide_react22.ChevronDownIcon,
|
|
10800
11055
|
{}
|
|
10801
11056
|
)
|
|
@@ -10806,7 +11061,7 @@ function SelectScrollDownButton({
|
|
|
10806
11061
|
// src/components/ui/slider.tsx
|
|
10807
11062
|
var React39 = __toESM(require("react"), 1);
|
|
10808
11063
|
var import_radix_ui3 = require("radix-ui");
|
|
10809
|
-
var
|
|
11064
|
+
var import_jsx_runtime44 = require("react/jsx-runtime");
|
|
10810
11065
|
function Slider({
|
|
10811
11066
|
className,
|
|
10812
11067
|
defaultValue,
|
|
@@ -10819,7 +11074,7 @@ function Slider({
|
|
|
10819
11074
|
() => Array.isArray(value) ? value : Array.isArray(defaultValue) ? defaultValue : [min, max],
|
|
10820
11075
|
[value, defaultValue, min, max]
|
|
10821
11076
|
);
|
|
10822
|
-
return /* @__PURE__ */ (0,
|
|
11077
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(
|
|
10823
11078
|
import_radix_ui3.Slider.Root,
|
|
10824
11079
|
{
|
|
10825
11080
|
"data-slot": "slider",
|
|
@@ -10833,12 +11088,12 @@ function Slider({
|
|
|
10833
11088
|
),
|
|
10834
11089
|
...props,
|
|
10835
11090
|
children: [
|
|
10836
|
-
/* @__PURE__ */ (0,
|
|
11091
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
10837
11092
|
import_radix_ui3.Slider.Track,
|
|
10838
11093
|
{
|
|
10839
11094
|
"data-slot": "slider-track",
|
|
10840
11095
|
className: "relative grow overflow-hidden rounded-full bg-muted data-horizontal:h-1 data-horizontal:w-full data-vertical:h-full data-vertical:w-1",
|
|
10841
|
-
children: /* @__PURE__ */ (0,
|
|
11096
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
10842
11097
|
import_radix_ui3.Slider.Range,
|
|
10843
11098
|
{
|
|
10844
11099
|
"data-slot": "slider-range",
|
|
@@ -10847,7 +11102,7 @@ function Slider({
|
|
|
10847
11102
|
)
|
|
10848
11103
|
}
|
|
10849
11104
|
),
|
|
10850
|
-
Array.from({ length: _values.length }, (_, index) => /* @__PURE__ */ (0,
|
|
11105
|
+
Array.from({ length: _values.length }, (_, index) => /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
10851
11106
|
import_radix_ui3.Slider.Thumb,
|
|
10852
11107
|
{
|
|
10853
11108
|
"data-slot": "slider-thumb",
|
|
@@ -10869,7 +11124,7 @@ var import_radix_ui5 = require("radix-ui");
|
|
|
10869
11124
|
var React40 = require("react");
|
|
10870
11125
|
var import_class_variance_authority2 = require("class-variance-authority");
|
|
10871
11126
|
var import_radix_ui4 = require("radix-ui");
|
|
10872
|
-
var
|
|
11127
|
+
var import_jsx_runtime45 = require("react/jsx-runtime");
|
|
10873
11128
|
var toggleVariants = (0, import_class_variance_authority2.cva)(
|
|
10874
11129
|
"group/toggle inline-flex items-center justify-center gap-1 rounded-lg text-sm font-medium whitespace-nowrap transition-all outline-none hover:bg-muted hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 aria-pressed:bg-muted data-[state=on]:bg-muted dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
10875
11130
|
{
|
|
@@ -10892,7 +11147,7 @@ var toggleVariants = (0, import_class_variance_authority2.cva)(
|
|
|
10892
11147
|
);
|
|
10893
11148
|
|
|
10894
11149
|
// src/components/ui/toggle-group.tsx
|
|
10895
|
-
var
|
|
11150
|
+
var import_jsx_runtime46 = require("react/jsx-runtime");
|
|
10896
11151
|
var ToggleGroupContext = React41.createContext({
|
|
10897
11152
|
size: "default",
|
|
10898
11153
|
variant: "default",
|
|
@@ -10908,7 +11163,7 @@ function ToggleGroup({
|
|
|
10908
11163
|
children,
|
|
10909
11164
|
...props
|
|
10910
11165
|
}) {
|
|
10911
|
-
return /* @__PURE__ */ (0,
|
|
11166
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
10912
11167
|
import_radix_ui5.ToggleGroup.Root,
|
|
10913
11168
|
{
|
|
10914
11169
|
"data-slot": "toggle-group",
|
|
@@ -10922,7 +11177,7 @@ function ToggleGroup({
|
|
|
10922
11177
|
className
|
|
10923
11178
|
),
|
|
10924
11179
|
...props,
|
|
10925
|
-
children: /* @__PURE__ */ (0,
|
|
11180
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
10926
11181
|
ToggleGroupContext.Provider,
|
|
10927
11182
|
{
|
|
10928
11183
|
value: { variant, size: size2, spacing, orientation },
|
|
@@ -10940,7 +11195,7 @@ function ToggleGroupItem({
|
|
|
10940
11195
|
...props
|
|
10941
11196
|
}) {
|
|
10942
11197
|
const context = React41.useContext(ToggleGroupContext);
|
|
10943
|
-
return /* @__PURE__ */ (0,
|
|
11198
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
10944
11199
|
import_radix_ui5.ToggleGroup.Item,
|
|
10945
11200
|
{
|
|
10946
11201
|
"data-slot": "toggle-group-item",
|
|
@@ -11176,7 +11431,7 @@ var React42 = require("react");
|
|
|
11176
11431
|
var import_chatkit_types9 = require("@xpert-ai/chatkit-types");
|
|
11177
11432
|
|
|
11178
11433
|
// src/components/pet/PetPreview.tsx
|
|
11179
|
-
var
|
|
11434
|
+
var import_jsx_runtime47 = require("react/jsx-runtime");
|
|
11180
11435
|
function escapeCssUrl(value) {
|
|
11181
11436
|
return value.replace(/["\\]/g, "\\$&");
|
|
11182
11437
|
}
|
|
@@ -11184,7 +11439,7 @@ function PetPreview({ src, label, className }) {
|
|
|
11184
11439
|
const scale = 0.13;
|
|
11185
11440
|
const width = import_chatkit_types9.petSpriteAtlas.cellWidth;
|
|
11186
11441
|
const height = import_chatkit_types9.petSpriteAtlas.cellHeight;
|
|
11187
|
-
return /* @__PURE__ */ (0,
|
|
11442
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
11188
11443
|
"span",
|
|
11189
11444
|
{
|
|
11190
11445
|
className: cn(
|
|
@@ -11193,7 +11448,7 @@ function PetPreview({ src, label, className }) {
|
|
|
11193
11448
|
),
|
|
11194
11449
|
"aria-hidden": "true",
|
|
11195
11450
|
title: label,
|
|
11196
|
-
children: /* @__PURE__ */ (0,
|
|
11451
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
11197
11452
|
"span",
|
|
11198
11453
|
{
|
|
11199
11454
|
className: "absolute left-1/2 top-1/2 block",
|
|
@@ -11215,7 +11470,7 @@ function PetPreview({ src, label, className }) {
|
|
|
11215
11470
|
}
|
|
11216
11471
|
|
|
11217
11472
|
// src/components/settings/SettingsSheet.tsx
|
|
11218
|
-
var
|
|
11473
|
+
var import_jsx_runtime48 = require("react/jsx-runtime");
|
|
11219
11474
|
var CHARACTER_TYPES2 = [
|
|
11220
11475
|
"builtin",
|
|
11221
11476
|
"atlas"
|
|
@@ -11255,23 +11510,23 @@ function SettingsSheet({
|
|
|
11255
11510
|
defaultValue: selectedBuiltinPet.label
|
|
11256
11511
|
}
|
|
11257
11512
|
);
|
|
11258
|
-
return /* @__PURE__ */ (0,
|
|
11259
|
-
/* @__PURE__ */ (0,
|
|
11260
|
-
/* @__PURE__ */ (0,
|
|
11261
|
-
/* @__PURE__ */ (0,
|
|
11513
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(Sheet, { open, onOpenChange, children: /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(SheetContent, { side: "right", className: "w-[min(92vw,26rem)] overflow-y-auto", children: [
|
|
11514
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(SheetHeader, { children: /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
11515
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)("span", { className: "flex h-8 w-8 items-center justify-center rounded-md bg-primary/10 text-primary", children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_lucide_react23.Settings, { size: 16 }) }),
|
|
11516
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(SheetTitle, { children: t("settings.title") })
|
|
11262
11517
|
] }) }),
|
|
11263
|
-
/* @__PURE__ */ (0,
|
|
11264
|
-
/* @__PURE__ */ (0,
|
|
11265
|
-
/* @__PURE__ */ (0,
|
|
11266
|
-
/* @__PURE__ */ (0,
|
|
11267
|
-
/* @__PURE__ */ (0,
|
|
11518
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("form", { className: "mt-6 space-y-5", onSubmit: handleSubmit, children: [
|
|
11519
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("section", { className: "space-y-5", children: [
|
|
11520
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
11521
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)("span", { className: "flex h-7 w-7 items-center justify-center rounded-md bg-muted text-muted-foreground", children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_lucide_react23.PawPrint, { size: 15 }) }),
|
|
11522
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)("h3", { className: "text-sm font-semibold", children: t("pet.settings.title") })
|
|
11268
11523
|
] }),
|
|
11269
|
-
/* @__PURE__ */ (0,
|
|
11270
|
-
/* @__PURE__ */ (0,
|
|
11271
|
-
/* @__PURE__ */ (0,
|
|
11272
|
-
petRequired && /* @__PURE__ */ (0,
|
|
11524
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("label", { className: "flex items-center justify-between gap-4 rounded-md border border-border px-3 py-2", children: [
|
|
11525
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("span", { className: "min-w-0", children: [
|
|
11526
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)("span", { className: "block text-sm font-medium", children: t("pet.settings.enabled") }),
|
|
11527
|
+
petRequired && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("span", { className: "mt-0.5 block text-xs text-muted-foreground", children: t("pet.settings.requiredHint") })
|
|
11273
11528
|
] }),
|
|
11274
|
-
/* @__PURE__ */ (0,
|
|
11529
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
11275
11530
|
"button",
|
|
11276
11531
|
{
|
|
11277
11532
|
type: "button",
|
|
@@ -11284,7 +11539,7 @@ function SettingsSheet({
|
|
|
11284
11539
|
draft.enabled ? "bg-primary" : "bg-muted-foreground/20",
|
|
11285
11540
|
petRequired ? "cursor-not-allowed opacity-70" : ""
|
|
11286
11541
|
].join(" "),
|
|
11287
|
-
children: /* @__PURE__ */ (0,
|
|
11542
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
11288
11543
|
"span",
|
|
11289
11544
|
{
|
|
11290
11545
|
className: [
|
|
@@ -11297,9 +11552,9 @@ function SettingsSheet({
|
|
|
11297
11552
|
)
|
|
11298
11553
|
] })
|
|
11299
11554
|
] }),
|
|
11300
|
-
/* @__PURE__ */ (0,
|
|
11301
|
-
/* @__PURE__ */ (0,
|
|
11302
|
-
/* @__PURE__ */ (0,
|
|
11555
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "space-y-2", children: [
|
|
11556
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)("span", { id: "chatkit-pet-type-label", className: "text-sm font-medium", children: t("pet.settings.characterType") }),
|
|
11557
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
11303
11558
|
ToggleGroup,
|
|
11304
11559
|
{
|
|
11305
11560
|
id: "chatkit-pet-type",
|
|
@@ -11314,7 +11569,7 @@ function SettingsSheet({
|
|
|
11314
11569
|
variant: "outline",
|
|
11315
11570
|
spacing: 2,
|
|
11316
11571
|
className: "!w-full",
|
|
11317
|
-
children: CHARACTER_TYPES2.map((type) => /* @__PURE__ */ (0,
|
|
11572
|
+
children: CHARACTER_TYPES2.map((type) => /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
11318
11573
|
ToggleGroupItem,
|
|
11319
11574
|
{
|
|
11320
11575
|
value: type,
|
|
@@ -11326,8 +11581,8 @@ function SettingsSheet({
|
|
|
11326
11581
|
}
|
|
11327
11582
|
)
|
|
11328
11583
|
] }),
|
|
11329
|
-
draft.characterType === "builtin" && /* @__PURE__ */ (0,
|
|
11330
|
-
/* @__PURE__ */ (0,
|
|
11584
|
+
draft.characterType === "builtin" && /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "space-y-2", children: [
|
|
11585
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
11331
11586
|
"label",
|
|
11332
11587
|
{
|
|
11333
11588
|
htmlFor: "chatkit-pet-builtin",
|
|
@@ -11335,7 +11590,7 @@ function SettingsSheet({
|
|
|
11335
11590
|
children: t("pet.settings.builtin")
|
|
11336
11591
|
}
|
|
11337
11592
|
),
|
|
11338
|
-
/* @__PURE__ */ (0,
|
|
11593
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(
|
|
11339
11594
|
Select,
|
|
11340
11595
|
{
|
|
11341
11596
|
value: selectedBuiltinPet.id,
|
|
@@ -11346,26 +11601,26 @@ function SettingsSheet({
|
|
|
11346
11601
|
}
|
|
11347
11602
|
},
|
|
11348
11603
|
children: [
|
|
11349
|
-
/* @__PURE__ */ (0,
|
|
11604
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
11350
11605
|
SelectTrigger,
|
|
11351
11606
|
{
|
|
11352
11607
|
id: "chatkit-pet-builtin",
|
|
11353
11608
|
className: "min-h-12 w-full px-3 py-2",
|
|
11354
|
-
children: /* @__PURE__ */ (0,
|
|
11609
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(SelectValue, { placeholder: selectedBuiltinPetLabel })
|
|
11355
11610
|
}
|
|
11356
11611
|
),
|
|
11357
|
-
/* @__PURE__ */ (0,
|
|
11612
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(SelectContent, { className: "w-[var(--radix-select-trigger-width)]", children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(SelectGroup, { children: INCLUDED_PET_OPTIONS.map((pet) => {
|
|
11358
11613
|
const label = t(`pet.settings.builtins.${pet.id}`, {
|
|
11359
11614
|
defaultValue: pet.label
|
|
11360
11615
|
});
|
|
11361
|
-
return /* @__PURE__ */ (0,
|
|
11616
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
11362
11617
|
SelectItem,
|
|
11363
11618
|
{
|
|
11364
11619
|
value: pet.id,
|
|
11365
11620
|
className: "min-h-10 py-1.5 pl-2 pr-8",
|
|
11366
|
-
children: /* @__PURE__ */ (0,
|
|
11367
|
-
/* @__PURE__ */ (0,
|
|
11368
|
-
/* @__PURE__ */ (0,
|
|
11621
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("span", { className: "flex min-w-0 items-center gap-2", children: [
|
|
11622
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(PetPreview, { src: pet.previewSrc, label }),
|
|
11623
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)("span", { className: "min-w-0 truncate", children: label })
|
|
11369
11624
|
] })
|
|
11370
11625
|
},
|
|
11371
11626
|
pet.id
|
|
@@ -11375,8 +11630,8 @@ function SettingsSheet({
|
|
|
11375
11630
|
}
|
|
11376
11631
|
)
|
|
11377
11632
|
] }),
|
|
11378
|
-
draft.characterType === "atlas" && /* @__PURE__ */ (0,
|
|
11379
|
-
/* @__PURE__ */ (0,
|
|
11633
|
+
draft.characterType === "atlas" && /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "space-y-2", children: [
|
|
11634
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
11380
11635
|
"label",
|
|
11381
11636
|
{
|
|
11382
11637
|
className: "text-sm font-medium",
|
|
@@ -11384,7 +11639,7 @@ function SettingsSheet({
|
|
|
11384
11639
|
children: t("pet.settings.atlasUrl")
|
|
11385
11640
|
}
|
|
11386
11641
|
),
|
|
11387
|
-
/* @__PURE__ */ (0,
|
|
11642
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
11388
11643
|
Input,
|
|
11389
11644
|
{
|
|
11390
11645
|
id: "chatkit-pet-atlas",
|
|
@@ -11394,15 +11649,15 @@ function SettingsSheet({
|
|
|
11394
11649
|
}
|
|
11395
11650
|
)
|
|
11396
11651
|
] }),
|
|
11397
|
-
/* @__PURE__ */ (0,
|
|
11398
|
-
/* @__PURE__ */ (0,
|
|
11399
|
-
/* @__PURE__ */ (0,
|
|
11400
|
-
/* @__PURE__ */ (0,
|
|
11652
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "space-y-2", children: [
|
|
11653
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "flex items-center justify-between gap-4", children: [
|
|
11654
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)("label", { className: "text-sm font-medium", htmlFor: "chatkit-pet-scale", children: t("pet.settings.scale") }),
|
|
11655
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("span", { className: "text-xs tabular-nums text-muted-foreground", children: [
|
|
11401
11656
|
draft.scale.toFixed(2),
|
|
11402
11657
|
"x"
|
|
11403
11658
|
] })
|
|
11404
11659
|
] }),
|
|
11405
|
-
/* @__PURE__ */ (0,
|
|
11660
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
11406
11661
|
Slider,
|
|
11407
11662
|
{
|
|
11408
11663
|
id: "chatkit-pet-scale",
|
|
@@ -11416,8 +11671,8 @@ function SettingsSheet({
|
|
|
11416
11671
|
}
|
|
11417
11672
|
)
|
|
11418
11673
|
] }),
|
|
11419
|
-
/* @__PURE__ */ (0,
|
|
11420
|
-
/* @__PURE__ */ (0,
|
|
11674
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("label", { className: "flex items-center gap-2 text-sm", children: [
|
|
11675
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
11421
11676
|
"input",
|
|
11422
11677
|
{
|
|
11423
11678
|
type: "checkbox",
|
|
@@ -11428,8 +11683,8 @@ function SettingsSheet({
|
|
|
11428
11683
|
),
|
|
11429
11684
|
t("pet.settings.draggable")
|
|
11430
11685
|
] }),
|
|
11431
|
-
/* @__PURE__ */ (0,
|
|
11432
|
-
/* @__PURE__ */ (0,
|
|
11686
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("label", { className: "flex items-center gap-2 text-sm", children: [
|
|
11687
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
11433
11688
|
"input",
|
|
11434
11689
|
{
|
|
11435
11690
|
type: "checkbox",
|
|
@@ -11440,8 +11695,8 @@ function SettingsSheet({
|
|
|
11440
11695
|
),
|
|
11441
11696
|
t("pet.settings.persistPosition")
|
|
11442
11697
|
] }),
|
|
11443
|
-
/* @__PURE__ */ (0,
|
|
11444
|
-
/* @__PURE__ */ (0,
|
|
11698
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "flex justify-end gap-2 pt-2", children: [
|
|
11699
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
11445
11700
|
Button,
|
|
11446
11701
|
{
|
|
11447
11702
|
type: "button",
|
|
@@ -11450,7 +11705,7 @@ function SettingsSheet({
|
|
|
11450
11705
|
children: t("pet.settings.cancel")
|
|
11451
11706
|
}
|
|
11452
11707
|
),
|
|
11453
|
-
/* @__PURE__ */ (0,
|
|
11708
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(Button, { type: "submit", children: t("pet.settings.save") })
|
|
11454
11709
|
] })
|
|
11455
11710
|
] })
|
|
11456
11711
|
] }) });
|
|
@@ -11956,7 +12211,7 @@ function findDomPointForComposerOffset(root, offset) {
|
|
|
11956
12211
|
}
|
|
11957
12212
|
|
|
11958
12213
|
// src/components/chat.tsx
|
|
11959
|
-
var
|
|
12214
|
+
var import_jsx_runtime49 = require("react/jsx-runtime");
|
|
11960
12215
|
var import_meta2 = {};
|
|
11961
12216
|
var defaultApiUrl2 = import_meta2.env.VITE_XPERTAI_API_URL;
|
|
11962
12217
|
var COMPOSER_INPUT_MAX_HEIGHT = 128;
|
|
@@ -12090,7 +12345,7 @@ function ReferenceChip({
|
|
|
12090
12345
|
const metaLine = getReferenceMetaLine(reference);
|
|
12091
12346
|
const isComposer = variant === "composer";
|
|
12092
12347
|
const Icon = reference.type === "quote" ? import_lucide_react24.Quote : reference.type === "image" ? import_lucide_react24.ImageIcon : import_lucide_react24.FileText;
|
|
12093
|
-
return /* @__PURE__ */ (0,
|
|
12348
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
|
|
12094
12349
|
"div",
|
|
12095
12350
|
{
|
|
12096
12351
|
className: cn(
|
|
@@ -12099,7 +12354,7 @@ function ReferenceChip({
|
|
|
12099
12354
|
),
|
|
12100
12355
|
title: getReferenceTitle(reference),
|
|
12101
12356
|
children: [
|
|
12102
|
-
/* @__PURE__ */ (0,
|
|
12357
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
12103
12358
|
Icon,
|
|
12104
12359
|
{
|
|
12105
12360
|
size: isComposer ? 14 : 12,
|
|
@@ -12109,8 +12364,8 @@ function ReferenceChip({
|
|
|
12109
12364
|
)
|
|
12110
12365
|
}
|
|
12111
12366
|
),
|
|
12112
|
-
/* @__PURE__ */ (0,
|
|
12113
|
-
/* @__PURE__ */ (0,
|
|
12367
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "min-w-0 flex-1", children: [
|
|
12368
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
12114
12369
|
"div",
|
|
12115
12370
|
{
|
|
12116
12371
|
className: cn(
|
|
@@ -12120,7 +12375,7 @@ function ReferenceChip({
|
|
|
12120
12375
|
children: getReferenceLabel(reference)
|
|
12121
12376
|
}
|
|
12122
12377
|
),
|
|
12123
|
-
metaLine && /* @__PURE__ */ (0,
|
|
12378
|
+
metaLine && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
12124
12379
|
"div",
|
|
12125
12380
|
{
|
|
12126
12381
|
className: cn(
|
|
@@ -12131,7 +12386,7 @@ function ReferenceChip({
|
|
|
12131
12386
|
}
|
|
12132
12387
|
)
|
|
12133
12388
|
] }),
|
|
12134
|
-
onRemove && removeLabel && /* @__PURE__ */ (0,
|
|
12389
|
+
onRemove && removeLabel && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
12135
12390
|
"button",
|
|
12136
12391
|
{
|
|
12137
12392
|
type: "button",
|
|
@@ -12142,7 +12397,7 @@ function ReferenceChip({
|
|
|
12142
12397
|
),
|
|
12143
12398
|
title: removeLabel,
|
|
12144
12399
|
"aria-label": removeLabel,
|
|
12145
|
-
children: /* @__PURE__ */ (0,
|
|
12400
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_lucide_react24.X, { size: 12 })
|
|
12146
12401
|
}
|
|
12147
12402
|
)
|
|
12148
12403
|
]
|
|
@@ -13748,7 +14003,7 @@ function Chat({
|
|
|
13748
14003
|
fallbackTitle: t("history.threadFallback")
|
|
13749
14004
|
});
|
|
13750
14005
|
const assistantTitle = assistantName || resolvedTitle;
|
|
13751
|
-
return /* @__PURE__ */ (0,
|
|
14006
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
|
|
13752
14007
|
"div",
|
|
13753
14008
|
{
|
|
13754
14009
|
ref: viewportRef,
|
|
@@ -13758,10 +14013,10 @@ function Chat({
|
|
|
13758
14013
|
className
|
|
13759
14014
|
),
|
|
13760
14015
|
children: [
|
|
13761
|
-
/* @__PURE__ */ (0,
|
|
13762
|
-
/* @__PURE__ */ (0,
|
|
13763
|
-
/* @__PURE__ */ (0,
|
|
13764
|
-
/* @__PURE__ */ (0,
|
|
14016
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "flex items-center justify-between border-b p-2 sticky top-0 z-10 bg-background", children: [
|
|
14017
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "flex items-center gap-3 overflow-hidden", children: [
|
|
14018
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "relative shrink-0", children: [
|
|
14019
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
13765
14020
|
ChatkitAvatar,
|
|
13766
14021
|
{
|
|
13767
14022
|
avatar: assistantAvatar,
|
|
@@ -13769,10 +14024,10 @@ function Chat({
|
|
|
13769
14024
|
label: assistantTitle
|
|
13770
14025
|
}
|
|
13771
14026
|
),
|
|
13772
|
-
/* @__PURE__ */ (0,
|
|
14027
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)("span", { className: "absolute bottom-0 right-0 h-2.5 w-2.5 rounded-full border-2 border-background bg-green-500" })
|
|
13773
14028
|
] }),
|
|
13774
|
-
/* @__PURE__ */ (0,
|
|
13775
|
-
/* @__PURE__ */ (0,
|
|
14029
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "truncate", children: [
|
|
14030
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
13776
14031
|
"h2",
|
|
13777
14032
|
{
|
|
13778
14033
|
className: "text-lg font-semibold truncate",
|
|
@@ -13780,12 +14035,12 @@ function Chat({
|
|
|
13780
14035
|
children: assistantTitle
|
|
13781
14036
|
}
|
|
13782
14037
|
),
|
|
13783
|
-
/* @__PURE__ */ (0,
|
|
14038
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)("p", { className: "text-xs text-muted-foreground", children: t("chat.statusOnline") })
|
|
13784
14039
|
] })
|
|
13785
14040
|
] }),
|
|
13786
|
-
/* @__PURE__ */ (0,
|
|
13787
|
-
/* @__PURE__ */ (0,
|
|
13788
|
-
/* @__PURE__ */ (0,
|
|
14041
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "flex items-center gap-1", children: [
|
|
14042
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(Tooltip, { children: [
|
|
14043
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("span", { className: "inline-flex h-8 w-8", children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
13789
14044
|
"button",
|
|
13790
14045
|
{
|
|
13791
14046
|
type: "button",
|
|
@@ -13796,14 +14051,14 @@ function Chat({
|
|
|
13796
14051
|
"transition-colors duration-150"
|
|
13797
14052
|
),
|
|
13798
14053
|
"aria-label": t("settings.open"),
|
|
13799
|
-
children: /* @__PURE__ */ (0,
|
|
14054
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_lucide_react24.Settings, { size: 16 })
|
|
13800
14055
|
}
|
|
13801
14056
|
) }) }),
|
|
13802
|
-
/* @__PURE__ */ (0,
|
|
14057
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(TooltipContent, { side: "bottom", children: t("settings.open") })
|
|
13803
14058
|
] }),
|
|
13804
|
-
history?.enabled !== false && /* @__PURE__ */ (0,
|
|
13805
|
-
/* @__PURE__ */ (0,
|
|
13806
|
-
/* @__PURE__ */ (0,
|
|
14059
|
+
history?.enabled !== false && /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(import_jsx_runtime49.Fragment, { children: [
|
|
14060
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(Tooltip, { children: [
|
|
14061
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("span", { className: "inline-flex h-8 w-8", children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
13807
14062
|
"button",
|
|
13808
14063
|
{
|
|
13809
14064
|
type: "button",
|
|
@@ -13816,12 +14071,12 @@ function Chat({
|
|
|
13816
14071
|
"disabled:pointer-events-none disabled:opacity-50 disabled:cursor-not-allowed"
|
|
13817
14072
|
),
|
|
13818
14073
|
"aria-label": t("history.newThread"),
|
|
13819
|
-
children: /* @__PURE__ */ (0,
|
|
14074
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_lucide_react24.Pencil, { size: 16 })
|
|
13820
14075
|
}
|
|
13821
14076
|
) }) }),
|
|
13822
|
-
/* @__PURE__ */ (0,
|
|
14077
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(TooltipContent, { side: "bottom", children: t("history.newThread") })
|
|
13823
14078
|
] }),
|
|
13824
|
-
/* @__PURE__ */ (0,
|
|
14079
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
13825
14080
|
HistorySidebar,
|
|
13826
14081
|
{
|
|
13827
14082
|
threads,
|
|
@@ -13836,18 +14091,18 @@ function Chat({
|
|
|
13836
14091
|
] })
|
|
13837
14092
|
] })
|
|
13838
14093
|
] }),
|
|
13839
|
-
/* @__PURE__ */ (0,
|
|
13840
|
-
errorMessage && /* @__PURE__ */ (0,
|
|
13841
|
-
historyError && /* @__PURE__ */ (0,
|
|
13842
|
-
showMissingConfig && /* @__PURE__ */ (0,
|
|
13843
|
-
isHistoryLoading && /* @__PURE__ */ (0,
|
|
13844
|
-
messages.length === 0 ? /* @__PURE__ */ (0,
|
|
14094
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "flex-1 p-4", children: [
|
|
14095
|
+
errorMessage && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: "mb-4 rounded-lg border border-destructive/30 bg-destructive/10 px-3 py-2 text-sm text-destructive", children: errorMessage }),
|
|
14096
|
+
historyError && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: "mb-4 rounded-lg border border-amber-200 bg-amber-50 px-3 py-2 text-sm text-amber-900", children: historyError }),
|
|
14097
|
+
showMissingConfig && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: "mb-4 rounded-lg border border-amber-200 bg-amber-50 px-3 py-2 text-sm text-amber-900", children: missingConfigDetailMessage }),
|
|
14098
|
+
isHistoryLoading && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: "mb-4 rounded-lg border border-muted px-3 py-2 text-sm text-muted-foreground", children: t("chat.loadingThread") }),
|
|
14099
|
+
messages.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
13845
14100
|
StartScreen,
|
|
13846
14101
|
{
|
|
13847
14102
|
startScreen,
|
|
13848
14103
|
onPromptClick: handlePromptClick
|
|
13849
14104
|
}
|
|
13850
|
-
) : /* @__PURE__ */ (0,
|
|
14105
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "space-y-4", children: [
|
|
13851
14106
|
messages.map((message, index) => {
|
|
13852
14107
|
const messageType = String(message.type);
|
|
13853
14108
|
const isAssistantMessage = messageType === "assistant" || messageType === "ai";
|
|
@@ -13880,7 +14135,7 @@ function Chat({
|
|
|
13880
14135
|
if (!isAssistantMessage && !hasPlainRenderableContent && !hasHumanAttachments && humanRuntimeCapabilityOptions.length === 0 && humanReferences.length === 0) {
|
|
13881
14136
|
return null;
|
|
13882
14137
|
}
|
|
13883
|
-
return /* @__PURE__ */ (0,
|
|
14138
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
13884
14139
|
"div",
|
|
13885
14140
|
{
|
|
13886
14141
|
className: cn(
|
|
@@ -13888,8 +14143,8 @@ function Chat({
|
|
|
13888
14143
|
message.type === "human" ? "justify-end" : "justify-start -ml-1"
|
|
13889
14144
|
// AI messages: slightly closer to left
|
|
13890
14145
|
),
|
|
13891
|
-
children: /* @__PURE__ */ (0,
|
|
13892
|
-
/* @__PURE__ */ (0,
|
|
14146
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "flex flex-col px-3 overflow-hidden", children: [
|
|
14147
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
13893
14148
|
"div",
|
|
13894
14149
|
{
|
|
13895
14150
|
...canQuoteMessage ? {
|
|
@@ -13901,7 +14156,7 @@ function Chat({
|
|
|
13901
14156
|
message.type === "human" ? "bg-primary text-primary-foreground px-4 py-2.5" : message.type === "system" ? "bg-muted text-muted-foreground text-xs px-4 py-2.5" : "py-1 text-chat-foreground"
|
|
13902
14157
|
// AI messages: use chat-specific foreground color
|
|
13903
14158
|
),
|
|
13904
|
-
children: isAssistantMessage ? /* @__PURE__ */ (0,
|
|
14159
|
+
children: isAssistantMessage ? /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
13905
14160
|
AssistantMessage,
|
|
13906
14161
|
{
|
|
13907
14162
|
message: {
|
|
@@ -13920,25 +14175,25 @@ function Chat({
|
|
|
13920
14175
|
organizationId: stream.organizationId,
|
|
13921
14176
|
apiUrl: stream.apiUrl
|
|
13922
14177
|
}
|
|
13923
|
-
) : /* @__PURE__ */ (0,
|
|
13924
|
-
message.type === "human" && humanRuntimeCapabilityOptions.length > 0 && /* @__PURE__ */ (0,
|
|
14178
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(import_jsx_runtime49.Fragment, { children: [
|
|
14179
|
+
message.type === "human" && humanRuntimeCapabilityOptions.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: "mb-2 flex flex-wrap gap-1.5", children: humanRuntimeCapabilityOptions.map((option) => /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
|
|
13925
14180
|
"span",
|
|
13926
14181
|
{
|
|
13927
14182
|
className: "inline-flex max-w-full items-center gap-1 rounded-md bg-primary-foreground/20 px-2 py-1 text-xs font-medium text-primary-foreground",
|
|
13928
14183
|
children: [
|
|
13929
|
-
/* @__PURE__ */ (0,
|
|
14184
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
13930
14185
|
RuntimeCapabilityIcon,
|
|
13931
14186
|
{
|
|
13932
14187
|
option,
|
|
13933
14188
|
variant: "chip"
|
|
13934
14189
|
}
|
|
13935
14190
|
),
|
|
13936
|
-
/* @__PURE__ */ (0,
|
|
14191
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)("span", { className: "max-w-[9rem] truncate", children: option.label })
|
|
13937
14192
|
]
|
|
13938
14193
|
},
|
|
13939
14194
|
`${option.type}:${option.id}`
|
|
13940
14195
|
)) }),
|
|
13941
|
-
message.type === "human" && humanReferences.length > 0 && /* @__PURE__ */ (0,
|
|
14196
|
+
message.type === "human" && humanReferences.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: "mb-2 flex flex-wrap gap-1.5", children: humanReferences.map((reference) => /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
13942
14197
|
ReferenceChip,
|
|
13943
14198
|
{
|
|
13944
14199
|
reference,
|
|
@@ -13946,29 +14201,29 @@ function Chat({
|
|
|
13946
14201
|
},
|
|
13947
14202
|
getReferenceKey(reference)
|
|
13948
14203
|
)) }),
|
|
13949
|
-
message.type === "human" && humanAttachments.length > 0 && /* @__PURE__ */ (0,
|
|
14204
|
+
message.type === "human" && humanAttachments.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: "flex flex-wrap gap-1.5 mb-2", children: humanAttachments.map((file, fileIndex) => /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
|
|
13950
14205
|
"div",
|
|
13951
14206
|
{
|
|
13952
14207
|
className: "flex items-center gap-1.5 rounded-md bg-primary-foreground/20 px-2 py-1 text-xs",
|
|
13953
14208
|
children: [
|
|
13954
|
-
/* @__PURE__ */ (0,
|
|
13955
|
-
/* @__PURE__ */ (0,
|
|
14209
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_lucide_react24.FileText, { size: 12 }),
|
|
14210
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)("span", { className: "max-w-[100px] truncate", children: file.originalName })
|
|
13956
14211
|
]
|
|
13957
14212
|
},
|
|
13958
14213
|
fileIndex
|
|
13959
14214
|
)) }),
|
|
13960
|
-
Array.isArray(message.content) ? message.content.map((part, partIndex) => /* @__PURE__ */ (0,
|
|
14215
|
+
Array.isArray(message.content) ? message.content.map((part, partIndex) => /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
13961
14216
|
"p",
|
|
13962
14217
|
{
|
|
13963
14218
|
className: "wrap-break-word text-sm leading-relaxed",
|
|
13964
14219
|
children: formatMessageContent(part)
|
|
13965
14220
|
},
|
|
13966
14221
|
`${part.type}-${partIndex}`
|
|
13967
|
-
)) : /* @__PURE__ */ (0,
|
|
14222
|
+
)) : /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("span", { className: "wrap-break-word text-sm leading-relaxed", children: formatMessageContent(message.content) })
|
|
13968
14223
|
] })
|
|
13969
14224
|
}
|
|
13970
14225
|
),
|
|
13971
|
-
/* @__PURE__ */ (0,
|
|
14226
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
13972
14227
|
MessageActions,
|
|
13973
14228
|
{
|
|
13974
14229
|
content: messageContent,
|
|
@@ -14004,7 +14259,7 @@ function Chat({
|
|
|
14004
14259
|
stream.isLoading,
|
|
14005
14260
|
{ now: streamingNow }
|
|
14006
14261
|
);
|
|
14007
|
-
return /* @__PURE__ */ (0,
|
|
14262
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: "flex justify-start gap-3 -ml-2", children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: "max-w-full rounded-2xl py-2.5", children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
14008
14263
|
AssistantStreamingIndicator,
|
|
14009
14264
|
{
|
|
14010
14265
|
status: fallbackStreamingStatus ?? "loading"
|
|
@@ -14013,7 +14268,7 @@ function Chat({
|
|
|
14013
14268
|
})()
|
|
14014
14269
|
] })
|
|
14015
14270
|
] }),
|
|
14016
|
-
!isAtBottom && messages.length > 0 && /* @__PURE__ */ (0,
|
|
14271
|
+
!isAtBottom && messages.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: "sticky bottom-20 z-20 flex justify-center px-4 pointer-events-none", children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
14017
14272
|
Button,
|
|
14018
14273
|
{
|
|
14019
14274
|
type: "button",
|
|
@@ -14026,10 +14281,10 @@ function Chat({
|
|
|
14026
14281
|
onClick: () => scrollToBottom(true, true),
|
|
14027
14282
|
"aria-label": t("chat.scrollToBottom"),
|
|
14028
14283
|
title: t("chat.scrollToBottom"),
|
|
14029
|
-
children: /* @__PURE__ */ (0,
|
|
14284
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_lucide_react24.ArrowDown, { size: 16 })
|
|
14030
14285
|
}
|
|
14031
14286
|
) }),
|
|
14032
|
-
quoteSelection && /* @__PURE__ */ (0,
|
|
14287
|
+
quoteSelection && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
14033
14288
|
"div",
|
|
14034
14289
|
{
|
|
14035
14290
|
className: "pointer-events-none fixed z-50",
|
|
@@ -14038,7 +14293,7 @@ function Chat({
|
|
|
14038
14293
|
left: `${quoteSelection.left}px`,
|
|
14039
14294
|
transform: "translateX(-50%)"
|
|
14040
14295
|
},
|
|
14041
|
-
children: /* @__PURE__ */ (0,
|
|
14296
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
|
|
14042
14297
|
Button,
|
|
14043
14298
|
{
|
|
14044
14299
|
type: "button",
|
|
@@ -14050,16 +14305,16 @@ function Chat({
|
|
|
14050
14305
|
"aria-label": t("composer.quoteSelection"),
|
|
14051
14306
|
title: t("composer.quoteSelection"),
|
|
14052
14307
|
children: [
|
|
14053
|
-
/* @__PURE__ */ (0,
|
|
14308
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_lucide_react24.Quote, { size: 14 }),
|
|
14054
14309
|
t("composer.quoteSelection")
|
|
14055
14310
|
]
|
|
14056
14311
|
}
|
|
14057
14312
|
)
|
|
14058
14313
|
}
|
|
14059
14314
|
),
|
|
14060
|
-
/* @__PURE__ */ (0,
|
|
14061
|
-
threadErrorMessage && /* @__PURE__ */ (0,
|
|
14062
|
-
/* @__PURE__ */ (0,
|
|
14315
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "p-2 sticky bottom-0 z-10 bg-background", children: [
|
|
14316
|
+
threadErrorMessage && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: "mb-3 rounded-lg border border-destructive/30 bg-destructive/10 px-3 py-2 text-sm text-destructive overflow-auto", children: threadErrorMessage }),
|
|
14317
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
14063
14318
|
"input",
|
|
14064
14319
|
{
|
|
14065
14320
|
ref: fileInputRef,
|
|
@@ -14070,7 +14325,7 @@ function Chat({
|
|
|
14070
14325
|
className: "hidden"
|
|
14071
14326
|
}
|
|
14072
14327
|
),
|
|
14073
|
-
attachments.length > 0 && /* @__PURE__ */ (0,
|
|
14328
|
+
attachments.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: "mb-3 flex flex-wrap gap-2", children: attachments.map((item) => /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
|
|
14074
14329
|
"div",
|
|
14075
14330
|
{
|
|
14076
14331
|
className: cn(
|
|
@@ -14078,16 +14333,16 @@ function Chat({
|
|
|
14078
14333
|
item.status === "error" ? "bg-destructive/10 border border-destructive/30" : "bg-muted"
|
|
14079
14334
|
),
|
|
14080
14335
|
children: [
|
|
14081
|
-
item.status === "uploading" && /* @__PURE__ */ (0,
|
|
14336
|
+
item.status === "uploading" && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
14082
14337
|
import_lucide_react24.Loader2,
|
|
14083
14338
|
{
|
|
14084
14339
|
size: 14,
|
|
14085
14340
|
className: "animate-spin text-muted-foreground"
|
|
14086
14341
|
}
|
|
14087
14342
|
),
|
|
14088
|
-
item.status === "success" && /* @__PURE__ */ (0,
|
|
14089
|
-
item.status === "error" && /* @__PURE__ */ (0,
|
|
14090
|
-
/* @__PURE__ */ (0,
|
|
14343
|
+
item.status === "success" && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_lucide_react24.FileText, { size: 14, className: "text-muted-foreground" }),
|
|
14344
|
+
item.status === "error" && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_lucide_react24.FileText, { size: 14, className: "text-destructive" }),
|
|
14345
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
14091
14346
|
"span",
|
|
14092
14347
|
{
|
|
14093
14348
|
className: cn(
|
|
@@ -14097,17 +14352,17 @@ function Chat({
|
|
|
14097
14352
|
children: item.file.name
|
|
14098
14353
|
}
|
|
14099
14354
|
),
|
|
14100
|
-
item.status === "error" && /* @__PURE__ */ (0,
|
|
14355
|
+
item.status === "error" && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
14101
14356
|
"button",
|
|
14102
14357
|
{
|
|
14103
14358
|
type: "button",
|
|
14104
14359
|
onClick: () => handleRetryUpload(item.localId),
|
|
14105
14360
|
className: "ml-1 rounded-full p-0.5 text-destructive hover:bg-destructive/20",
|
|
14106
14361
|
title: t("chat.retryUpload"),
|
|
14107
|
-
children: /* @__PURE__ */ (0,
|
|
14362
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_lucide_react24.RefreshCw, { size: 12 })
|
|
14108
14363
|
}
|
|
14109
14364
|
),
|
|
14110
|
-
/* @__PURE__ */ (0,
|
|
14365
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
14111
14366
|
"button",
|
|
14112
14367
|
{
|
|
14113
14368
|
type: "button",
|
|
@@ -14116,14 +14371,14 @@ function Chat({
|
|
|
14116
14371
|
"ml-1 rounded-full p-0.5",
|
|
14117
14372
|
item.status === "error" ? "text-destructive hover:bg-destructive/20" : "hover:bg-muted-foreground/20"
|
|
14118
14373
|
),
|
|
14119
|
-
children: /* @__PURE__ */ (0,
|
|
14374
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_lucide_react24.X, { size: 12 })
|
|
14120
14375
|
}
|
|
14121
14376
|
)
|
|
14122
14377
|
]
|
|
14123
14378
|
},
|
|
14124
14379
|
item.localId
|
|
14125
14380
|
)) }),
|
|
14126
|
-
references.length > 0 && /* @__PURE__ */ (0,
|
|
14381
|
+
references.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: "mb-3 flex flex-wrap gap-2", children: references.map((reference) => /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
14127
14382
|
ReferenceChip,
|
|
14128
14383
|
{
|
|
14129
14384
|
reference,
|
|
@@ -14137,16 +14392,16 @@ function Chat({
|
|
|
14137
14392
|
},
|
|
14138
14393
|
getReferenceKey(reference)
|
|
14139
14394
|
)) }),
|
|
14140
|
-
detachedRunRuntimeCapabilityOptions.length > 0 && /* @__PURE__ */ (0,
|
|
14141
|
-
/* @__PURE__ */ (0,
|
|
14142
|
-
detachedRunRuntimeCapabilityOptions.map((option) => /* @__PURE__ */ (0,
|
|
14395
|
+
detachedRunRuntimeCapabilityOptions.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "mb-2 flex flex-wrap items-center gap-2", children: [
|
|
14396
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)("span", { className: "text-xs text-muted-foreground", children: t("composer.capabilities.runOnly") }),
|
|
14397
|
+
detachedRunRuntimeCapabilityOptions.map((option) => /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
|
|
14143
14398
|
"span",
|
|
14144
14399
|
{
|
|
14145
14400
|
className: "inline-flex max-w-full items-center gap-1 rounded-full bg-primary/10 px-2 py-0.5 text-xs font-medium text-primary",
|
|
14146
14401
|
children: [
|
|
14147
|
-
/* @__PURE__ */ (0,
|
|
14148
|
-
/* @__PURE__ */ (0,
|
|
14149
|
-
/* @__PURE__ */ (0,
|
|
14402
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(RuntimeCapabilityIcon, { option, variant: "chip" }),
|
|
14403
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)("span", { className: "max-w-40 truncate", children: option.label }),
|
|
14404
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
14150
14405
|
"button",
|
|
14151
14406
|
{
|
|
14152
14407
|
type: "button",
|
|
@@ -14154,7 +14409,7 @@ function Chat({
|
|
|
14154
14409
|
className: "rounded-full p-0.5 hover:bg-primary/15",
|
|
14155
14410
|
title: t("composer.capabilities.removeRunCapability"),
|
|
14156
14411
|
"aria-label": t("composer.capabilities.removeRunCapability"),
|
|
14157
|
-
children: /* @__PURE__ */ (0,
|
|
14412
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_lucide_react24.X, { size: 11 })
|
|
14158
14413
|
}
|
|
14159
14414
|
)
|
|
14160
14415
|
]
|
|
@@ -14162,7 +14417,7 @@ function Chat({
|
|
|
14162
14417
|
`${option.type}:${option.id}`
|
|
14163
14418
|
))
|
|
14164
14419
|
] }),
|
|
14165
|
-
/* @__PURE__ */ (0,
|
|
14420
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
14166
14421
|
PendingRuntimeServices,
|
|
14167
14422
|
{
|
|
14168
14423
|
state: stream.runtimeActivities.sandboxServices,
|
|
@@ -14171,7 +14426,7 @@ function Chat({
|
|
|
14171
14426
|
className: hasPendingTodos || hasPendingFollowUps ? "mb-2" : void 0
|
|
14172
14427
|
}
|
|
14173
14428
|
),
|
|
14174
|
-
/* @__PURE__ */ (0,
|
|
14429
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
14175
14430
|
PendingTodos,
|
|
14176
14431
|
{
|
|
14177
14432
|
snapshot: stream.todos,
|
|
@@ -14179,7 +14434,7 @@ function Chat({
|
|
|
14179
14434
|
className: hasPendingFollowUps ? "mb-2" : void 0
|
|
14180
14435
|
}
|
|
14181
14436
|
),
|
|
14182
|
-
/* @__PURE__ */ (0,
|
|
14437
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
14183
14438
|
PendingFollowUps,
|
|
14184
14439
|
{
|
|
14185
14440
|
items: pendingFollowUps,
|
|
@@ -14194,7 +14449,7 @@ function Chat({
|
|
|
14194
14449
|
attachToComposer: true
|
|
14195
14450
|
}
|
|
14196
14451
|
),
|
|
14197
|
-
/* @__PURE__ */ (0,
|
|
14452
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
14198
14453
|
RequestUserInputPanel,
|
|
14199
14454
|
{
|
|
14200
14455
|
request: stream.pendingRequestUserInput,
|
|
@@ -14203,7 +14458,7 @@ function Chat({
|
|
|
14203
14458
|
attachToComposer: true
|
|
14204
14459
|
}
|
|
14205
14460
|
),
|
|
14206
|
-
/* @__PURE__ */ (0,
|
|
14461
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
14207
14462
|
HITLApprovalPanel,
|
|
14208
14463
|
{
|
|
14209
14464
|
request: stream.pendingHITLRequest,
|
|
@@ -14212,7 +14467,7 @@ function Chat({
|
|
|
14212
14467
|
attachToComposer: true
|
|
14213
14468
|
}
|
|
14214
14469
|
),
|
|
14215
|
-
runtimeCapabilityPalette && /* @__PURE__ */ (0,
|
|
14470
|
+
runtimeCapabilityPalette && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
14216
14471
|
SlashPalette,
|
|
14217
14472
|
{
|
|
14218
14473
|
palette: runtimeCapabilityPalette,
|
|
@@ -14226,7 +14481,7 @@ function Chat({
|
|
|
14226
14481
|
onSelect: selectSlashPaletteOption
|
|
14227
14482
|
}
|
|
14228
14483
|
),
|
|
14229
|
-
/* @__PURE__ */ (0,
|
|
14484
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)("form", { className: "flex items-end", onSubmit: handleSubmit, children: /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
|
|
14230
14485
|
"div",
|
|
14231
14486
|
{
|
|
14232
14487
|
"data-slot": "composer-input-shell",
|
|
@@ -14240,7 +14495,7 @@ function Chat({
|
|
|
14240
14495
|
composerInputRoundedClass
|
|
14241
14496
|
),
|
|
14242
14497
|
children: [
|
|
14243
|
-
/* @__PURE__ */ (0,
|
|
14498
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
14244
14499
|
"div",
|
|
14245
14500
|
{
|
|
14246
14501
|
ref: composerInputRef,
|
|
@@ -14262,7 +14517,7 @@ function Chat({
|
|
|
14262
14517
|
(missingConfig || isHistoryLoading || hasPendingInteractiveRequest) && "cursor-not-allowed opacity-50"
|
|
14263
14518
|
),
|
|
14264
14519
|
children: renderedComposerParts.map(
|
|
14265
|
-
(part, index) => part.type === "text" ? /* @__PURE__ */ (0,
|
|
14520
|
+
(part, index) => part.type === "text" ? /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(React44.Fragment, { children: part.text }, `text-${index}`) : /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
|
|
14266
14521
|
"span",
|
|
14267
14522
|
{
|
|
14268
14523
|
"data-composer-capability-key": part.key,
|
|
@@ -14271,14 +14526,14 @@ function Chat({
|
|
|
14271
14526
|
contentEditable: false,
|
|
14272
14527
|
className: "mx-0.5 inline-flex max-w-[14rem] select-none items-center gap-1 text-sm font-semibold text-primary align-baseline",
|
|
14273
14528
|
children: [
|
|
14274
|
-
/* @__PURE__ */ (0,
|
|
14529
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
14275
14530
|
RuntimeCapabilityIcon,
|
|
14276
14531
|
{
|
|
14277
14532
|
option: part.capability,
|
|
14278
14533
|
variant: "chip"
|
|
14279
14534
|
}
|
|
14280
14535
|
),
|
|
14281
|
-
/* @__PURE__ */ (0,
|
|
14536
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)("span", { className: "truncate", children: part.capability.label })
|
|
14282
14537
|
]
|
|
14283
14538
|
},
|
|
14284
14539
|
part.key
|
|
@@ -14287,14 +14542,14 @@ function Chat({
|
|
|
14287
14542
|
},
|
|
14288
14543
|
composerDomVersion
|
|
14289
14544
|
),
|
|
14290
|
-
/* @__PURE__ */ (0,
|
|
14545
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
|
|
14291
14546
|
"div",
|
|
14292
14547
|
{
|
|
14293
14548
|
"data-slot": "composer-action-bar",
|
|
14294
14549
|
className: "pointer-events-none absolute inset-x-1.5 bottom-1 flex min-h-10 items-center justify-between gap-2",
|
|
14295
14550
|
children: [
|
|
14296
|
-
/* @__PURE__ */ (0,
|
|
14297
|
-
/* @__PURE__ */ (0,
|
|
14551
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "pointer-events-none flex min-w-0 flex-1 items-center gap-1.5", children: [
|
|
14552
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: "pointer-events-auto flex shrink-0 items-center gap-1.5", children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
14298
14553
|
ComposerMenu,
|
|
14299
14554
|
{
|
|
14300
14555
|
composer,
|
|
@@ -14309,20 +14564,20 @@ function Chat({
|
|
|
14309
14564
|
disabled: missingConfig || isHistoryLoading || hasPendingInteractiveRequest
|
|
14310
14565
|
}
|
|
14311
14566
|
) }),
|
|
14312
|
-
selectedTool && /* @__PURE__ */ (0,
|
|
14313
|
-
/* @__PURE__ */ (0,
|
|
14314
|
-
/* @__PURE__ */ (0,
|
|
14567
|
+
selectedTool && /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("span", { className: "pointer-events-auto inline-flex h-8 min-w-0 max-w-[14rem] shrink items-center gap-1.5 rounded-full bg-primary/10 px-2 text-xs font-medium text-primary transition-all duration-200", children: [
|
|
14568
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)("span", { className: "truncate", children: selectedTool.shortLabel ?? selectedTool.label }),
|
|
14569
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
14315
14570
|
"button",
|
|
14316
14571
|
{
|
|
14317
14572
|
type: "button",
|
|
14318
14573
|
onClick: () => setSelectedTool(null),
|
|
14319
14574
|
className: "shrink-0 rounded-full p-0.5 text-primary/70 hover:bg-primary/10 hover:text-primary",
|
|
14320
|
-
children: /* @__PURE__ */ (0,
|
|
14575
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_lucide_react24.X, { size: 12 })
|
|
14321
14576
|
}
|
|
14322
14577
|
)
|
|
14323
14578
|
] })
|
|
14324
14579
|
] }),
|
|
14325
|
-
/* @__PURE__ */ (0,
|
|
14580
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: "pointer-events-auto shrink-0", children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
14326
14581
|
SendButton,
|
|
14327
14582
|
{
|
|
14328
14583
|
disabled: isSendDisabled,
|
|
@@ -14349,7 +14604,7 @@ function Chat({
|
|
|
14349
14604
|
]
|
|
14350
14605
|
}
|
|
14351
14606
|
) }),
|
|
14352
|
-
disclaimer?.text && /* @__PURE__ */ (0,
|
|
14607
|
+
disclaimer?.text && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
14353
14608
|
"p",
|
|
14354
14609
|
{
|
|
14355
14610
|
className: cn(
|
|
@@ -14359,12 +14614,12 @@ function Chat({
|
|
|
14359
14614
|
children: disclaimer.text
|
|
14360
14615
|
}
|
|
14361
14616
|
),
|
|
14362
|
-
/* @__PURE__ */ (0,
|
|
14363
|
-
/* @__PURE__ */ (0,
|
|
14364
|
-
/* @__PURE__ */ (0,
|
|
14617
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "mt-2 flex items-center justify-center gap-2 text-xs text-muted-foreground", children: [
|
|
14618
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)("span", { children: t("chat.poweredBy") }),
|
|
14619
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(ContextUsageIndicator, { className: "absolute right-4" })
|
|
14365
14620
|
] })
|
|
14366
14621
|
] }),
|
|
14367
|
-
/* @__PURE__ */ (0,
|
|
14622
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
14368
14623
|
SettingsSheet,
|
|
14369
14624
|
{
|
|
14370
14625
|
open: petSettingsOpen,
|
|
@@ -14374,7 +14629,7 @@ function Chat({
|
|
|
14374
14629
|
onSave: savePetLocalSettings
|
|
14375
14630
|
}
|
|
14376
14631
|
),
|
|
14377
|
-
/* @__PURE__ */ (0,
|
|
14632
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(PetBridge, { pet: effectivePet, state: petAutoState })
|
|
14378
14633
|
]
|
|
14379
14634
|
}
|
|
14380
14635
|
);
|
|
@@ -14382,9 +14637,9 @@ function Chat({
|
|
|
14382
14637
|
|
|
14383
14638
|
// src/components/ui/separator.tsx
|
|
14384
14639
|
var React45 = __toESM(require("react"), 1);
|
|
14385
|
-
var
|
|
14640
|
+
var import_jsx_runtime50 = require("react/jsx-runtime");
|
|
14386
14641
|
var Separator = React45.forwardRef(
|
|
14387
|
-
({ className, orientation = "horizontal", ...props }, ref) => /* @__PURE__ */ (0,
|
|
14642
|
+
({ className, orientation = "horizontal", ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
14388
14643
|
"div",
|
|
14389
14644
|
{
|
|
14390
14645
|
ref,
|