@xpert-ai/chatkit-ui 0.4.9 → 0.4.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/app/assets/{_baseUniq-CvUv2HwQ.js → _baseUniq-D3JA5kg6.js} +1 -1
- package/dist/app/assets/{abap-BO7niWiC.js → abap-U3trMbvh.js} +1 -1
- package/dist/app/assets/{abnf-CWEz7Drs.js → abnf-Bl4asd8k.js} +1 -1
- package/dist/app/assets/{actionscript-CyOkZZxh.js → actionscript-D8gfKfJD.js} +1 -1
- package/dist/app/assets/{ada-Jlv844Rv.js → ada-DdH41xZz.js} +1 -1
- package/dist/app/assets/{agda-C_kFG5ee.js → agda-CRS5ewL6.js} +1 -1
- package/dist/app/assets/{al-BJB3bCYn.js → al-6ay2Ap_a.js} +1 -1
- package/dist/app/assets/{antlr4-CxC5pLeu.js → antlr4-1_hBGW-a.js} +1 -1
- package/dist/app/assets/{apacheconf-Do-yEyZc.js → apacheconf-CZxoTH8B.js} +1 -1
- package/dist/app/assets/{apex-_x2gfDUc.js → apex-CrTOQiOq.js} +1 -1
- package/dist/app/assets/{apl-CV7O96Vz.js → apl-W2lGuttD.js} +1 -1
- package/dist/app/assets/{applescript-BBZjdzgl.js → applescript-b_jfORvY.js} +1 -1
- package/dist/app/assets/{aql-CPRi8JU5.js → aql-DcttT6A-.js} +1 -1
- package/dist/app/assets/{arc-COu-nBNR.js → arc-CcWnzmyO.js} +1 -1
- package/dist/app/assets/{architectureDiagram-Q4EWVU46-D-ddveKc.js → architectureDiagram-Q4EWVU46-BzsxtvCr.js} +1 -1
- package/dist/app/assets/{arduino-B_V9Srpy.js → arduino-DcmjPx9R.js} +1 -1
- package/dist/app/assets/{arff-DsGhNcbT.js → arff-DdTCsnLN.js} +1 -1
- package/dist/app/assets/{asciidoc-B5CEO5fh.js → asciidoc-C3Zw8KHv.js} +1 -1
- package/dist/app/assets/{asm6502-D2a8tVul.js → asm6502-Cl6X60ew.js} +1 -1
- package/dist/app/assets/{asmatmel-DUTqaTnC.js → asmatmel-4TiHBMZ0.js} +1 -1
- package/dist/app/assets/{aspnet-DLUpHuHv.js → aspnet-BAcaJr0W.js} +1 -1
- package/dist/app/assets/{autohotkey-BSB_nyws.js → autohotkey-DU4MbEO6.js} +1 -1
- package/dist/app/assets/{autoit-BwgYwpuM.js → autoit-DNUFW1WT.js} +1 -1
- package/dist/app/assets/{avisynth-Cgf1pYso.js → avisynth-Dj1xCW-P.js} +1 -1
- package/dist/app/assets/{avro-idl-XqteGdRE.js → avro-idl-BUuuPK0F.js} +1 -1
- package/dist/app/assets/{bash-Dk281cbu.js → bash-Car3l6Qf.js} +1 -1
- package/dist/app/assets/{basic-uRpIiMGe.js → basic-Dz2vmq9w.js} +1 -1
- package/dist/app/assets/{batch-C4-m-mLr.js → batch-DYOkuO24.js} +1 -1
- package/dist/app/assets/{bbcode-B1LUoNFx.js → bbcode-BTogT5Ke.js} +1 -1
- package/dist/app/assets/{bicep-CqsJcsXf.js → bicep-gKyzTSH1.js} +1 -1
- package/dist/app/assets/{birb-DXU3R8QI.js → birb-D1xh9nGK.js} +1 -1
- package/dist/app/assets/{bison-BLjm1RgB.js → bison-y3F6JBTg.js} +1 -1
- package/dist/app/assets/{blockDiagram-DXYQGD6D-BHxMFapA.js → blockDiagram-DXYQGD6D-wp5YgjZR.js} +1 -1
- package/dist/app/assets/{bnf-D-7oTwhm.js → bnf-CvdKGJcO.js} +1 -1
- package/dist/app/assets/{brainfuck-I-YgfuEr.js → brainfuck-zxUjJDmK.js} +1 -1
- package/dist/app/assets/{brightscript-CkF_ucD-.js → brightscript-E2VTIZaD.js} +1 -1
- package/dist/app/assets/{bro-CPPYpjZw.js → bro-Bf9FPsHP.js} +1 -1
- package/dist/app/assets/{bsl-CVgUnXO6.js → bsl-BTf78jgi.js} +1 -1
- package/dist/app/assets/{c-BS7yj6Yf.js → c-E6pl-2PD.js} +1 -1
- package/dist/app/assets/{c4Diagram-AHTNJAMY-BuCOREEO.js → c4Diagram-AHTNJAMY-BFh75I1O.js} +1 -1
- package/dist/app/assets/{cfscript-CIVISA6c.js → cfscript-BU29FYfv.js} +1 -1
- package/dist/app/assets/{chaiscript-DPJ77ndP.js → chaiscript-D2Mla472.js} +1 -1
- package/dist/app/assets/channel-Dza7FWEy.js +1 -0
- package/dist/app/assets/{chunk-4BX2VUAB-C9mHTP0m.js → chunk-4BX2VUAB-D-Payniv.js} +1 -1
- package/dist/app/assets/{chunk-4TB4RGXK-B9VoBVJp.js → chunk-4TB4RGXK-Bsata7j8.js} +1 -1
- package/dist/app/assets/{chunk-55IACEB6-N4Q-mlk6.js → chunk-55IACEB6-DURW_8ZU.js} +1 -1
- package/dist/app/assets/{chunk-EDXVE4YY-D-MWM76q.js → chunk-EDXVE4YY-DUechSa6.js} +1 -1
- package/dist/app/assets/{chunk-FMBD7UC4-DDGTq6jI.js → chunk-FMBD7UC4-CKF0xhys.js} +1 -1
- package/dist/app/assets/{chunk-OYMX7WX6-BBZDoYQI.js → chunk-OYMX7WX6-ddmRWT15.js} +1 -1
- package/dist/app/assets/{chunk-QZHKN3VN-DdnHt9oV.js → chunk-QZHKN3VN-DDobBULn.js} +1 -1
- package/dist/app/assets/{chunk-YZCP3GAM-CDlHGJHz.js → chunk-YZCP3GAM-ll1E1L_E.js} +1 -1
- package/dist/app/assets/{cil-DZ05JSZt.js → cil-DOsNtjkv.js} +1 -1
- package/dist/app/assets/classDiagram-6PBFFD2Q-hqaQDDNp.js +1 -0
- package/dist/app/assets/classDiagram-v2-HSJHXN6E-hqaQDDNp.js +1 -0
- package/dist/app/assets/{clike-C-dce4Yl.js → clike-dVQK0iCE.js} +1 -1
- package/dist/app/assets/{clojure-Cik0pyKG.js → clojure-_I7oUYLh.js} +1 -1
- package/dist/app/assets/clone-QKEFKOuT.js +1 -0
- package/dist/app/assets/{cmake-ClItZh_8.js → cmake-VLeg6CIA.js} +1 -1
- package/dist/app/assets/{cobol-DWNFtn0e.js → cobol-CXrTAELN.js} +1 -1
- package/dist/app/assets/{coffeescript-DFxA9g0F.js → coffeescript-D3PuU-yU.js} +1 -1
- package/dist/app/assets/{concurnas-uPVT6qf5.js → concurnas-Bq5Sn-8p.js} +1 -1
- package/dist/app/assets/{coq-BSKv5Z4t.js → coq-DRNw2I4c.js} +1 -1
- package/dist/app/assets/{core-CqabDKxB.js → core-sRD64d7H.js} +1 -1
- package/dist/app/assets/{cose-bilkent-S5V4N54A-BRQTAZ30.js → cose-bilkent-S5V4N54A-uleqFww7.js} +1 -1
- package/dist/app/assets/{cpp-BKB6xq7P.js → cpp-BDi4JlwY.js} +1 -1
- package/dist/app/assets/{crystal-ptPEIgBt.js → crystal-BhcbrMpD.js} +1 -1
- package/dist/app/assets/{csharp-DKCrBSIr.js → csharp-Cw8JnLSL.js} +1 -1
- package/dist/app/assets/{cshtml-DnjmY1aO.js → cshtml-DXOu3MO1.js} +1 -1
- package/dist/app/assets/{csp-CzmWWq7i.js → csp-hJziNvFM.js} +1 -1
- package/dist/app/assets/{css-nabIgEws.js → css-DTw2TWVx.js} +1 -1
- package/dist/app/assets/{css-extras-CZ9kQxJC.js → css-extras-PKQV57Zr.js} +1 -1
- package/dist/app/assets/{csv-BG0H1N52.js → csv-DxeK1pCZ.js} +1 -1
- package/dist/app/assets/{cypher-DyEzG7ti.js → cypher-B7sxi8sn.js} +1 -1
- package/dist/app/assets/{d-BMmV-4z1.js → d-VOENt14s.js} +1 -1
- package/dist/app/assets/{dagre-KV5264BT-B8BjxTZj.js → dagre-KV5264BT-F8PHo6-o.js} +1 -1
- package/dist/app/assets/{dart-CpGxTj2o.js → dart-C6P3kCs3.js} +1 -1
- package/dist/app/assets/{dataweave-DhQPX3BU.js → dataweave-zcqXRaeA.js} +1 -1
- package/dist/app/assets/{dax-C_hSU3cL.js → dax-C5_rBzHq.js} +1 -1
- package/dist/app/assets/{dhall-DHj_sxCo.js → dhall-Bx3A89qP.js} +1 -1
- package/dist/app/assets/{diagram-5BDNPKRD-CAiueCI6.js → diagram-5BDNPKRD-BJ6gx1Gb.js} +1 -1
- package/dist/app/assets/{diagram-G4DWMVQ6-DlsV8l1r.js → diagram-G4DWMVQ6-4TsobmGQ.js} +1 -1
- package/dist/app/assets/{diagram-MMDJMWI5-Kv6CoQdl.js → diagram-MMDJMWI5-C15cfaVx.js} +1 -1
- package/dist/app/assets/{diagram-TYMM5635-BznfcBm-.js → diagram-TYMM5635-C4QWM_wV.js} +1 -1
- package/dist/app/assets/{diff-TDLgKsTC.js → diff-DIp53C-C.js} +1 -1
- package/dist/app/assets/{django-BGA6uMwl.js → django-C8OufmY4.js} +1 -1
- package/dist/app/assets/{dns-zone-file-CS7N29Nh.js → dns-zone-file-BynM2b-W.js} +1 -1
- package/dist/app/assets/{docker-CFuWEMG4.js → docker-CHYID_Vv.js} +1 -1
- package/dist/app/assets/{dot-BuI3fIl5.js → dot-CxRj9_e0.js} +1 -1
- package/dist/app/assets/{ebnf-0yXcRKzq.js → ebnf-DX9131Gx.js} +1 -1
- package/dist/app/assets/{editorconfig-ZwKFQrw_.js → editorconfig-D4jacbLb.js} +1 -1
- package/dist/app/assets/{eiffel-CCkWkof9.js → eiffel-ChlDTIQd.js} +1 -1
- package/dist/app/assets/{ejs-C9upEEvN.js → ejs-DMwwVwMt.js} +1 -1
- package/dist/app/assets/{elixir-DpngNXg2.js → elixir-BQqiT3Sk.js} +1 -1
- package/dist/app/assets/{elm-F-WH2jVY.js → elm-pfx4TW8i.js} +1 -1
- package/dist/app/assets/{erDiagram-SMLLAGMA-evVGq9aA.js → erDiagram-SMLLAGMA-BkNAnp-O.js} +1 -1
- package/dist/app/assets/{erb-BGEr245J.js → erb-6Zc-tMAk.js} +1 -1
- package/dist/app/assets/{erlang-R3_RAdeP.js → erlang-NGXc_i-u.js} +1 -1
- package/dist/app/assets/{etlua-DqqAkZdO.js → etlua-eDkjyVnU.js} +1 -1
- package/dist/app/assets/{excel-formula-CSiml3ju.js → excel-formula-7XJSUddh.js} +1 -1
- package/dist/app/assets/{factor-DmMNhX8j.js → factor-BDm_BSrr.js} +1 -1
- package/dist/app/assets/{false-BRxcTXb3.js → false-CmPeUbjY.js} +1 -1
- package/dist/app/assets/{firestore-security-rules-QUZ9d15G.js → firestore-security-rules-DHkZlm67.js} +1 -1
- package/dist/app/assets/{flow-CM8Ul_F8.js → flow-C-a8u5C0.js} +1 -1
- package/dist/app/assets/{flowDiagram-DWJPFMVM-CRC5ztDh.js → flowDiagram-DWJPFMVM-Dos2R6DF.js} +1 -1
- package/dist/app/assets/{fortran-4BoXeWjv.js → fortran-DgmvqnEK.js} +1 -1
- package/dist/app/assets/{fsharp-aLuIEWkd.js → fsharp-TKADo8lI.js} +1 -1
- package/dist/app/assets/{ftl-CiEvcjAh.js → ftl-BmLn54KU.js} +1 -1
- package/dist/app/assets/{ganttDiagram-T4ZO3ILL-BA5PQPVx.js → ganttDiagram-T4ZO3ILL-DaVRJ0Uz.js} +1 -1
- package/dist/app/assets/{gap-DRHnZupb.js → gap-Bjsk63TZ.js} +1 -1
- package/dist/app/assets/{gcode-Ci4yyT_S.js → gcode-1WjVfVzX.js} +1 -1
- package/dist/app/assets/{gdscript-CwHuZksE.js → gdscript-DciRg-5W.js} +1 -1
- package/dist/app/assets/{gedcom-514pRwDC.js → gedcom-DFjhwBQZ.js} +1 -1
- package/dist/app/assets/{gherkin-CHJmGFl4.js → gherkin-CO-3f6VP.js} +1 -1
- package/dist/app/assets/{git-Cpt88esC.js → git-JidzCe0C.js} +1 -1
- package/dist/app/assets/{gitGraphDiagram-UUTBAWPF-r2T7lPpJ.js → gitGraphDiagram-UUTBAWPF-BDm3Pi5R.js} +1 -1
- package/dist/app/assets/{glsl-BfrS8yJO.js → glsl-DDTjG0bk.js} +1 -1
- package/dist/app/assets/{gml-DDgXE7W7.js → gml-k6Q_j5IU.js} +1 -1
- package/dist/app/assets/{gn-CoQG_0n5.js → gn-CJsI82tl.js} +1 -1
- package/dist/app/assets/{go-B5zj8JkX.js → go-C-knydKg.js} +1 -1
- package/dist/app/assets/{go-module-EmzvkBoA.js → go-module-CfZylmWG.js} +1 -1
- package/dist/app/assets/{graph-Cf1KoQrp.js → graph-CX9fPkqi.js} +1 -1
- package/dist/app/assets/{graphql-BiDysM4-.js → graphql-DNzt2Vv1.js} +1 -1
- package/dist/app/assets/{groovy-CpSog8z5.js → groovy-BtP_mAne.js} +1 -1
- package/dist/app/assets/{haml-CvSPf2h1.js → haml-CexsUymU.js} +1 -1
- package/dist/app/assets/{handlebars-D-WQRJEB.js → handlebars-Co1eX_hJ.js} +1 -1
- package/dist/app/assets/{haskell-C7BRSZIe.js → haskell-PQ0sv3zH.js} +1 -1
- package/dist/app/assets/{haxe-_Hcflzq6.js → haxe-CUwllgrP.js} +1 -1
- package/dist/app/assets/{hcl-CWqWstRc.js → hcl-Mhayh0kN.js} +1 -1
- package/dist/app/assets/{hlsl-BxXCCGJZ.js → hlsl-CxQjFTxz.js} +1 -1
- package/dist/app/assets/{hoon-CwaQ-EFH.js → hoon-DHelY60I.js} +1 -1
- package/dist/app/assets/{hpkp-DQmRthIx.js → hpkp-CNOmVbEe.js} +1 -1
- package/dist/app/assets/{hsts-D8Ur8bD-.js → hsts-J3H51YU7.js} +1 -1
- package/dist/app/assets/{http-Cw3RkimR.js → http-BBPS6mp1.js} +1 -1
- package/dist/app/assets/{ichigojam-CM6bS6zb.js → ichigojam-WoI4Sjvh.js} +1 -1
- package/dist/app/assets/{icon-CtcSAZYC.js → icon-Cxqt5frF.js} +1 -1
- package/dist/app/assets/{icu-message-format-DF5LqWc8.js → icu-message-format-CbNr2X1z.js} +1 -1
- package/dist/app/assets/{idris-BFiVs7gd.js → idris-B_uYD37d.js} +1 -1
- package/dist/app/assets/{iecst-DdrMjXQ5.js → iecst-DBH5ZBla.js} +1 -1
- package/dist/app/assets/{ignore-DIq2g2-l.js → ignore-e11AExB3.js} +1 -1
- package/dist/app/assets/index-Bz1k_vD4.js +762 -0
- package/dist/app/assets/index-CtioO_Xd.css +1 -0
- package/dist/app/assets/{infoDiagram-42DDH7IO-wYyuNxNj.js → infoDiagram-42DDH7IO-C6vGng8S.js} +1 -1
- package/dist/app/assets/{inform7-DzmXERkt.js → inform7-BuBdwiiY.js} +1 -1
- package/dist/app/assets/{ini-D5KL9MSR.js → ini-CZG2vXy_.js} +1 -1
- package/dist/app/assets/{io-DhsFH1Tp.js → io-CTkwXIPH.js} +1 -1
- package/dist/app/assets/{ishikawaDiagram-UXIWVN3A-C4-BPurQ.js → ishikawaDiagram-UXIWVN3A-B1in37bc.js} +1 -1
- package/dist/app/assets/{j-5x99BUy1.js → j-DuEjM6Bj.js} +1 -1
- package/dist/app/assets/{java-BF9JoKMx.js → java-BlZmoU8I.js} +1 -1
- package/dist/app/assets/{javadoc-BxSJmEM7.js → javadoc-C2k6A4-n.js} +1 -1
- package/dist/app/assets/{javadoclike-CPt-8K6_.js → javadoclike-kK2hIzbB.js} +1 -1
- package/dist/app/assets/{javascript-BssOsFWy.js → javascript-BoS5KR_7.js} +1 -1
- package/dist/app/assets/{javastacktrace-Dd6I7h5J.js → javastacktrace-LrtuAnj1.js} +1 -1
- package/dist/app/assets/{jexl-CUEZVd6g.js → jexl-BLuWwkDx.js} +1 -1
- package/dist/app/assets/{jolie-D4tUWCAe.js → jolie-CwQmCAzP.js} +1 -1
- package/dist/app/assets/{journeyDiagram-VCZTEJTY-4dsXMpZz.js → journeyDiagram-VCZTEJTY-BaS3mXyF.js} +1 -1
- package/dist/app/assets/{jq-DA4saxp1.js → jq-BEXhHNOY.js} +1 -1
- package/dist/app/assets/{js-extras-BHoZQrc7.js → js-extras-Ct8_w3lG.js} +1 -1
- package/dist/app/assets/{js-templates-DHIHpncv.js → js-templates-BkILqbLu.js} +1 -1
- package/dist/app/assets/{jsdoc-DiRqJjfA.js → jsdoc-CoMibHem.js} +1 -1
- package/dist/app/assets/{json-WG7VBScH.js → json-CY_RB4MI.js} +1 -1
- package/dist/app/assets/{json5-TZgr9JRE.js → json5-Dj8cRnNr.js} +1 -1
- package/dist/app/assets/{jsonp-Dv9WqRYx.js → jsonp-P7RxrUXF.js} +1 -1
- package/dist/app/assets/{jsstacktrace-Gz4Bje7i.js → jsstacktrace-BNUg_CVa.js} +1 -1
- package/dist/app/assets/{jsx-Bw3uULWP.js → jsx-CEVEgFxG.js} +1 -1
- package/dist/app/assets/{julia-D8b2chKD.js → julia-DfDHC1h7.js} +1 -1
- package/dist/app/assets/{kanban-definition-6JOO6SKY-BpSZrzpV.js → kanban-definition-6JOO6SKY-CD7tPba2.js} +1 -1
- package/dist/app/assets/{keepalived-CxrShb2S.js → keepalived-oFPT0tbW.js} +1 -1
- package/dist/app/assets/{keyman-CiksSo_Q.js → keyman-C57wO1cD.js} +1 -1
- package/dist/app/assets/{kotlin-DrUdw5kE.js → kotlin-ZOXm9fam.js} +1 -1
- package/dist/app/assets/{kumir-D7RWib-C.js → kumir-Bnsvckx9.js} +1 -1
- package/dist/app/assets/{kusto-BV4XMg16.js → kusto-jXKPAUmp.js} +1 -1
- package/dist/app/assets/{latex-BC0Uyc-d.js → latex-CMqvt8Q2.js} +1 -1
- package/dist/app/assets/{latte-tPT1UrWz.js → latte-BZeQRR6X.js} +1 -1
- package/dist/app/assets/{layout-BOlQN9Mo.js → layout-D1Cr86UF.js} +1 -1
- package/dist/app/assets/{less-oxG_fu4g.js → less-DzlT6rR0.js} +1 -1
- package/dist/app/assets/{lilypond-C88RotJr.js → lilypond-Bhy1kxEo.js} +1 -1
- package/dist/app/assets/{linear-BfflU34i.js → linear-CYv9ZVDs.js} +1 -1
- package/dist/app/assets/{liquid-C7TfcW57.js → liquid-a0kLlmeN.js} +1 -1
- package/dist/app/assets/{lisp-Buz4RfpM.js → lisp-48BMMQcI.js} +1 -1
- package/dist/app/assets/{livescript-1DQfUkd-.js → livescript-DE5TQT-Y.js} +1 -1
- package/dist/app/assets/{llvm-JvopDbcE.js → llvm-DYLeeTIC.js} +1 -1
- package/dist/app/assets/{log-BnfCB9DE.js → log-BN0LG1yL.js} +1 -1
- package/dist/app/assets/{lolcode-D_D_7GzE.js → lolcode-CYCvRp7b.js} +1 -1
- package/dist/app/assets/{lua-CO1cU0XH.js → lua-CqLmWD7C.js} +1 -1
- package/dist/app/assets/{magma-B1G7u0t4.js → magma-Bke0ceyc.js} +1 -1
- package/dist/app/assets/{makefile-AeGGTOcq.js → makefile-DBlcQubt.js} +1 -1
- package/dist/app/assets/{markdown-C8OTDGWj.js → markdown-BH45bEmz.js} +1 -1
- package/dist/app/assets/{markup-fcpLEWs9.js → markup-DmFxGmf3.js} +1 -1
- package/dist/app/assets/{markup-templating-BJPOJotJ.js → markup-templating-B_q0uBR_.js} +1 -1
- package/dist/app/assets/{matlab-C5u9cVSe.js → matlab-BvTng_-n.js} +1 -1
- package/dist/app/assets/{maxscript-D1j46lZY.js → maxscript-EAjZrtH-.js} +1 -1
- package/dist/app/assets/{mel-4T8xB3kc.js → mel-B31GmaYN.js} +1 -1
- package/dist/app/assets/{mermaid-D2CuapgG.js → mermaid-Bbo9oxye.js} +1 -1
- package/dist/app/assets/{min-C6bAU5tf.js → min-C1erP2ys.js} +1 -1
- package/dist/app/assets/{mindmap-definition-QFDTVHPH-DQCqFXf4.js → mindmap-definition-QFDTVHPH-DoDM_kwT.js} +1 -1
- package/dist/app/assets/{mizar-6YzPCneu.js → mizar-CA6MYAa-.js} +1 -1
- package/dist/app/assets/{mongodb-rU_FNrrO.js → mongodb-DBUwhD50.js} +1 -1
- package/dist/app/assets/{monkey-DHTaMD5j.js → monkey-W8cNL4gi.js} +1 -1
- package/dist/app/assets/{moonscript-B4Q1sWnw.js → moonscript-DlXhfU4k.js} +1 -1
- package/dist/app/assets/{n1ql-C-kQ4Dz0.js → n1ql-Dd4Dcmn4.js} +1 -1
- package/dist/app/assets/{n4js-B4Kuv0gT.js → n4js-BJwReVRf.js} +1 -1
- package/dist/app/assets/{nand2tetris-hdl-BEZvFDwm.js → nand2tetris-hdl-DeAovU0i.js} +1 -1
- package/dist/app/assets/{naniscript-0DISbVj5.js → naniscript-B5DfcucH.js} +1 -1
- package/dist/app/assets/{nasm-Cy_rHjd9.js → nasm-B2p6UrEt.js} +1 -1
- package/dist/app/assets/{neon-CQPnGFjU.js → neon-LRGEn3Kl.js} +1 -1
- package/dist/app/assets/{nevod-Cc2uvwJy.js → nevod-DA521y4e.js} +1 -1
- package/dist/app/assets/{nginx-CtSV-zWN.js → nginx-DkBE6sdh.js} +1 -1
- package/dist/app/assets/{nim-Cx8sXTrq.js → nim-BwHhtLL4.js} +1 -1
- package/dist/app/assets/{nix-fzCInmbw.js → nix-DEjXGklZ.js} +1 -1
- package/dist/app/assets/{nsis-B-WmXulG.js → nsis-CvAF9MTd.js} +1 -1
- package/dist/app/assets/{objectivec-B7mP6oMV.js → objectivec-BnL4g9NC.js} +1 -1
- package/dist/app/assets/{ocaml-BCNitKcz.js → ocaml-eNTexkzn.js} +1 -1
- package/dist/app/assets/{opencl-Ccg1YnSK.js → opencl-D1mGywOY.js} +1 -1
- package/dist/app/assets/{openqasm-CtnHTd2G.js → openqasm-lFdkM6pg.js} +1 -1
- package/dist/app/assets/{oz-DXv1OItd.js → oz-DHvmEwQV.js} +1 -1
- package/dist/app/assets/{parigp-Cb_kuYUA.js → parigp-es3NjzpJ.js} +1 -1
- package/dist/app/assets/{parser-CwT8uubF.js → parser-Bak-ak7k.js} +1 -1
- package/dist/app/assets/{pascal-B5wSlm8n.js → pascal-DJr5JSGs.js} +1 -1
- package/dist/app/assets/{pascaligo-D7-1FMxX.js → pascaligo-ClJZy1ED.js} +1 -1
- package/dist/app/assets/{pcaxis-DbHPrVNE.js → pcaxis-Cq269eOX.js} +1 -1
- package/dist/app/assets/{peoplecode-Bwty_AUm.js → peoplecode-CyL_NE7O.js} +1 -1
- package/dist/app/assets/{perl-BiIJMtwN.js → perl-DXU8D9bf.js} +1 -1
- package/dist/app/assets/{php-6mreideO.js → php-D7BV8qZw.js} +1 -1
- package/dist/app/assets/{php-extras-CBjQ7vIX.js → php-extras-DOPW1PzN.js} +1 -1
- package/dist/app/assets/{phpdoc-B62bzA5k.js → phpdoc-CRtNn35u.js} +1 -1
- package/dist/app/assets/{pieDiagram-DEJITSTG-URmplZD6.js → pieDiagram-DEJITSTG-sozKWzq0.js} +1 -1
- package/dist/app/assets/{plsql-BAj_vv6G.js → plsql-BMvjxqWu.js} +1 -1
- package/dist/app/assets/{powerquery-CzCmbNz6.js → powerquery-672I_RiA.js} +1 -1
- package/dist/app/assets/{powershell-CpwS-v1m.js → powershell-Bbhz0xjs.js} +1 -1
- package/dist/app/assets/{processing-9HFL_Kda.js → processing-onwQ_mg1.js} +1 -1
- package/dist/app/assets/{prolog-D71hnbvz.js → prolog-R0mnr85o.js} +1 -1
- package/dist/app/assets/{promql-Cr4QC9HL.js → promql-Cpdica46.js} +1 -1
- package/dist/app/assets/{properties-J9p1gfGR.js → properties-DHo8PbRa.js} +1 -1
- package/dist/app/assets/{protobuf-DMxIf431.js → protobuf-DkjPAzxf.js} +1 -1
- package/dist/app/assets/{psl-CTytrTSB.js → psl-bLvkZS_A.js} +1 -1
- package/dist/app/assets/{pug-jEAnZaKi.js → pug-ByCsGE0M.js} +1 -1
- package/dist/app/assets/{puppet-DGT0PXLM.js → puppet-Bln8m9q9.js} +1 -1
- package/dist/app/assets/{pure-DFlG-Euv.js → pure-ClPohX0Q.js} +1 -1
- package/dist/app/assets/{purebasic-fdJezgk1.js → purebasic-K5G6Cxnt.js} +1 -1
- package/dist/app/assets/{purescript-WUURLlSz.js → purescript-BvwLUX-O.js} +1 -1
- package/dist/app/assets/{q-CmD9Xmj5.js → q-zX6rqsIp.js} +1 -1
- package/dist/app/assets/{qml-BMG0y4hi.js → qml-CklZzPNb.js} +1 -1
- package/dist/app/assets/{qore-ndBZlJKP.js → qore-B9lXXujC.js} +1 -1
- package/dist/app/assets/{qsharp-DLCEDNKN.js → qsharp-x147BCXH.js} +1 -1
- package/dist/app/assets/{quadrantDiagram-34T5L4WZ-DYv3ycY4.js → quadrantDiagram-34T5L4WZ-B-6ATLiH.js} +1 -1
- package/dist/app/assets/{r-B8Kaj2hw.js → r-Axvo4Zd_.js} +1 -1
- package/dist/app/assets/{racket-BmjGoXCu.js → racket-xW0BNq3A.js} +1 -1
- package/dist/app/assets/{reason-BMBey7GD.js → reason-f5QENJ-q.js} +1 -1
- package/dist/app/assets/{regex-CcOJ-RBo.js → regex-BpaxF7jU.js} +1 -1
- package/dist/app/assets/{rego-BIXa5YcP.js → rego-BUom_JrJ.js} +1 -1
- package/dist/app/assets/{renpy-DFVE_JD1.js → renpy-CJyvxC3b.js} +1 -1
- package/dist/app/assets/{requirementDiagram-MS252O5E-enCn9qyU.js → requirementDiagram-MS252O5E-CYxoCRf9.js} +1 -1
- package/dist/app/assets/{rest-B9H-hgOJ.js → rest-B4ukFYPn.js} +1 -1
- package/dist/app/assets/{rip-Bv5Hr1Jw.js → rip-B4q_Vw7R.js} +1 -1
- package/dist/app/assets/{roboconf-jRCQTbv5.js → roboconf-CtkjsQy6.js} +1 -1
- package/dist/app/assets/{robotframework-B5SYb3S6.js → robotframework-DNz8f1Ip.js} +1 -1
- package/dist/app/assets/{ruby-B9xBZ2-7.js → ruby-rJz8oHeT.js} +1 -1
- package/dist/app/assets/{rust-DxSKWUH3.js → rust-Cqf9gv1-.js} +1 -1
- package/dist/app/assets/{sankeyDiagram-XADWPNL6-Bhc5bfvg.js → sankeyDiagram-XADWPNL6-DdDztt4E.js} +1 -1
- package/dist/app/assets/{sas-Ufzee22m.js → sas-EnB4FWaC.js} +1 -1
- package/dist/app/assets/{sass-D2SeUbd3.js → sass-DZUC6NF8.js} +1 -1
- package/dist/app/assets/{scala-1mDQ7lT3.js → scala-DUd3GTdg.js} +1 -1
- package/dist/app/assets/{scheme-C1DE_OtV.js → scheme-BiPREGfN.js} +1 -1
- package/dist/app/assets/{scss-CG-uC_jx.js → scss-gvdTHnI9.js} +1 -1
- package/dist/app/assets/{sequenceDiagram-FGHM5R23-CDe6bCwe.js → sequenceDiagram-FGHM5R23-lyt-X7gd.js} +1 -1
- package/dist/app/assets/{shell-session-BXrndzdM.js → shell-session-BOZ-lbqx.js} +1 -1
- package/dist/app/assets/{smali-QM7yFavH.js → smali-BRGQxjkp.js} +1 -1
- package/dist/app/assets/{smalltalk-C-fITGMb.js → smalltalk-4xLJEhv1.js} +1 -1
- package/dist/app/assets/{smarty-4kJKkU5q.js → smarty-HC6iTXED.js} +1 -1
- package/dist/app/assets/{sml-ot95negB.js → sml-aSisqwwP.js} +1 -1
- package/dist/app/assets/{solidity-Dx_IP6eq.js → solidity-wi6bpO7H.js} +1 -1
- package/dist/app/assets/{solution-file-wapuUhtE.js → solution-file-BiKyTt1v.js} +1 -1
- package/dist/app/assets/{soy-D-5oz9aj.js → soy-B5zGlrys.js} +1 -1
- package/dist/app/assets/{sparql--6Q0TOqj.js → sparql-DknctEWY.js} +1 -1
- package/dist/app/assets/{splunk-spl-CNbdZc4Q.js → splunk-spl-uHY5PLUO.js} +1 -1
- package/dist/app/assets/{sqf-DSKo3YQF.js → sqf-C_xrVS5o.js} +1 -1
- package/dist/app/assets/{sql-gNTttuTN.js → sql-BPenyVf5.js} +1 -1
- package/dist/app/assets/{squirrel-DBA8eFXS.js → squirrel-DADHl-33.js} +1 -1
- package/dist/app/assets/{stan-DDf1Y7DO.js → stan-DrWoR2TQ.js} +1 -1
- package/dist/app/assets/{stateDiagram-FHFEXIEX-p42Be8mf.js → stateDiagram-FHFEXIEX-CZaq-pRy.js} +1 -1
- package/dist/app/assets/stateDiagram-v2-QKLJ7IA2-CjL5rpeW.js +1 -0
- package/dist/app/assets/{stylus-CjUUyrES.js → stylus-BteIttv6.js} +1 -1
- package/dist/app/assets/{swift-CKnKs81t.js → swift-CID0lx8z.js} +1 -1
- package/dist/app/assets/{systemd-C10k014a.js → systemd-BfSaVXI_.js} +1 -1
- package/dist/app/assets/{t4-cs-DDiM4sZJ.js → t4-cs-BnGkiA9f.js} +1 -1
- package/dist/app/assets/{t4-templating-7kKJq4TZ.js → t4-templating-DU7VnNhm.js} +1 -1
- package/dist/app/assets/{t4-vb-DuiSnonv.js → t4-vb-DqrbsRf8.js} +1 -1
- package/dist/app/assets/{tap-IQ8yl2oh.js → tap-4N6JZhAV.js} +1 -1
- package/dist/app/assets/{tcl-DURyRJDt.js → tcl-DAdjH7wF.js} +1 -1
- package/dist/app/assets/{textile-DQ_JtUdC.js → textile-Du9JitF-.js} +1 -1
- package/dist/app/assets/{timeline-definition-GMOUNBTQ-B4uPbG-W.js → timeline-definition-GMOUNBTQ-CdXHfEQv.js} +1 -1
- package/dist/app/assets/{toml-IQN2CNuI.js → toml-B1OC92l7.js} +1 -1
- package/dist/app/assets/{tremor-Bny5MqnS.js → tremor-CcXF5xRR.js} +1 -1
- package/dist/app/assets/{tt2-DcdeYRm9.js → tt2-CbRAm8Dv.js} +1 -1
- package/dist/app/assets/{turtle-ePfiwKUJ.js → turtle-BYM3wDgF.js} +1 -1
- package/dist/app/assets/{twig-DYNpPvPW.js → twig-jMTWKrUr.js} +1 -1
- package/dist/app/assets/{typescript-myhWeMeg.js → typescript-BUWfHro-.js} +1 -1
- package/dist/app/assets/{typoscript-BtWmq6lK.js → typoscript-BYuR5WoR.js} +1 -1
- package/dist/app/assets/{unrealscript-BdPAyGL5.js → unrealscript-D0Ks49Es.js} +1 -1
- package/dist/app/assets/{uorazor-CdoHfnCa.js → uorazor-BJa2k0kx.js} +1 -1
- package/dist/app/assets/{uri-8lWJiWx5.js → uri-BC41d-Kc.js} +1 -1
- package/dist/app/assets/{v-0tJN9Hku.js → v-pMjd7J8c.js} +1 -1
- package/dist/app/assets/{vala-XUiF0ZAF.js → vala-Cc2iyU85.js} +1 -1
- package/dist/app/assets/{vbnet-BUEocEyh.js → vbnet-Cw4YKA4r.js} +1 -1
- package/dist/app/assets/{velocity-BEOmqWKD.js → velocity-DgoH540V.js} +1 -1
- package/dist/app/assets/{vennDiagram-DHZGUBPP-CiBcI7a1.js → vennDiagram-DHZGUBPP-BGQ4WYyA.js} +1 -1
- package/dist/app/assets/{verilog-BBKGGmem.js → verilog-B3IpJw7p.js} +1 -1
- package/dist/app/assets/{vhdl-B-_TUb2S.js → vhdl-Bp_kvSRI.js} +1 -1
- package/dist/app/assets/{vim-D12Uaiun.js → vim-vIMCVl5h.js} +1 -1
- package/dist/app/assets/{visual-basic-Bt6yOtui.js → visual-basic-BDowvLdG.js} +1 -1
- package/dist/app/assets/{wardley-RL74JXVD-CAHah9aU.js → wardley-RL74JXVD-Q35_vT4f.js} +1 -1
- package/dist/app/assets/{wardleyDiagram-NUSXRM2D-DuJOM0rD.js → wardleyDiagram-NUSXRM2D-tiJkvEP3.js} +1 -1
- package/dist/app/assets/{warpscript-CeTM4-Gj.js → warpscript-CGawrQhB.js} +1 -1
- package/dist/app/assets/{wasm-SfMoRKqG.js → wasm-DioreXvc.js} +1 -1
- package/dist/app/assets/{web-idl-D20E2F0O.js → web-idl-Cl19lMMv.js} +1 -1
- package/dist/app/assets/{wiki-D8abQrQq.js → wiki-fhUrXEuf.js} +1 -1
- package/dist/app/assets/{wolfram-CGEar8g5.js → wolfram-BBdTj5xJ.js} +1 -1
- package/dist/app/assets/{wren-D2cfeRDa.js → wren-DyGar7gV.js} +1 -1
- package/dist/app/assets/{xeora-CjjXFLG8.js → xeora-NACaryDq.js} +1 -1
- package/dist/app/assets/{xml-doc-3_owB9PN.js → xml-doc-Deba7Hms.js} +1 -1
- package/dist/app/assets/{xojo-C312JS6O.js → xojo-BDayHUxW.js} +1 -1
- package/dist/app/assets/{xquery-Cn9l8bPn.js → xquery-BUHudJSq.js} +1 -1
- package/dist/app/assets/{xychartDiagram-5P7HB3ND-CvrNIPqq.js → xychartDiagram-5P7HB3ND-lPbACL4f.js} +1 -1
- package/dist/app/assets/{yaml-OkW6jhVj.js → yaml-Mc4-fPw6.js} +1 -1
- package/dist/app/assets/{yang-Dg93mnQG.js → yang-D4m2oyuH.js} +1 -1
- package/dist/app/assets/{zig-CD6h8YdZ.js → zig-B87WilJ7.js} +1 -1
- package/dist/app/index.html +2 -2
- package/dist/index.cjs +653 -425
- package/dist/index.d.cts +16 -0
- package/dist/index.d.ts +16 -0
- package/dist/index.js +687 -442
- package/package.json +4 -4
- package/dist/app/assets/channel-DqqmKvlV.js +0 -1
- package/dist/app/assets/classDiagram-6PBFFD2Q-DDmxiqHK.js +0 -1
- package/dist/app/assets/classDiagram-v2-HSJHXN6E-DDmxiqHK.js +0 -1
- package/dist/app/assets/clone-DzAFCb4d.js +0 -1
- package/dist/app/assets/index-o0o3Q2hC.css +0 -1
- package/dist/app/assets/index-tsW7eKsE.js +0 -762
- package/dist/app/assets/stateDiagram-v2-QKLJ7IA2-CAhlZfwO.js +0 -1
package/dist/index.cjs
CHANGED
|
@@ -67,8 +67,8 @@ __export(index_exports, {
|
|
|
67
67
|
module.exports = __toCommonJS(index_exports);
|
|
68
68
|
|
|
69
69
|
// src/components/chat.tsx
|
|
70
|
-
var
|
|
71
|
-
var
|
|
70
|
+
var React55 = __toESM(require("react"), 1);
|
|
71
|
+
var import_lucide_react32 = require("lucide-react");
|
|
72
72
|
var import_chatkit_types14 = require("@xpert-ai/chatkit-types");
|
|
73
73
|
|
|
74
74
|
// src/lib/utils.ts
|
|
@@ -825,6 +825,7 @@ function isRuntimeCapabilitiesSelection(value) {
|
|
|
825
825
|
|
|
826
826
|
// src/providers/ParentMessenger.tsx
|
|
827
827
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
828
|
+
var CHATKIT_INTERNAL_PARENT_EVENT = "chatkit:internal-parent-event";
|
|
828
829
|
var handledSendUserMessageNonces = /* @__PURE__ */ new Set();
|
|
829
830
|
var handledSendUserMessageEvents = /* @__PURE__ */ new WeakSet();
|
|
830
831
|
var getParentOrigin = () => {
|
|
@@ -1142,6 +1143,16 @@ function ParentMessengerProvider({
|
|
|
1142
1143
|
);
|
|
1143
1144
|
const sendEvent = (0, import_react.useCallback)(
|
|
1144
1145
|
(event, data, transfer) => {
|
|
1146
|
+
if (typeof window !== "undefined") {
|
|
1147
|
+
window.dispatchEvent(
|
|
1148
|
+
new CustomEvent(
|
|
1149
|
+
CHATKIT_INTERNAL_PARENT_EVENT,
|
|
1150
|
+
{
|
|
1151
|
+
detail: { event, data }
|
|
1152
|
+
}
|
|
1153
|
+
)
|
|
1154
|
+
);
|
|
1155
|
+
}
|
|
1145
1156
|
if (!isParentAvailable) return;
|
|
1146
1157
|
const message = {
|
|
1147
1158
|
__xpaiChatKit: true,
|
|
@@ -2118,6 +2129,32 @@ var import_react_i18next = require("react-i18next");
|
|
|
2118
2129
|
|
|
2119
2130
|
// src/i18n/locales/en-US.json
|
|
2120
2131
|
var en_US_default = {
|
|
2132
|
+
workbench: {
|
|
2133
|
+
title: "Views",
|
|
2134
|
+
description: "Remote workbench views",
|
|
2135
|
+
views: "Available views",
|
|
2136
|
+
open: "Open views",
|
|
2137
|
+
close: "Close views",
|
|
2138
|
+
expandPanel: "Expand panel",
|
|
2139
|
+
restorePanel: "Restore panel",
|
|
2140
|
+
toggleSidebar: "Show or hide sidebar",
|
|
2141
|
+
resize: "Resize views panel",
|
|
2142
|
+
loading: "Loading views...",
|
|
2143
|
+
loadingView: "Loading view...",
|
|
2144
|
+
empty: "No compatible views are available.",
|
|
2145
|
+
loadFailed: "Views could not be loaded.",
|
|
2146
|
+
entryUnavailable: "Remote view content is unavailable.",
|
|
2147
|
+
missingAssistant: "An assistant is required to load views.",
|
|
2148
|
+
retry: "Retry",
|
|
2149
|
+
errors: {
|
|
2150
|
+
contextKeyRequired: "Context key is required.",
|
|
2151
|
+
messageRequired: "Message text is required.",
|
|
2152
|
+
sendFailed: "The message could not be sent.",
|
|
2153
|
+
requestFailed: "The remote view request failed.",
|
|
2154
|
+
requestTimeout: "The remote view request timed out.",
|
|
2155
|
+
clientCommandUnavailable: "No handler is configured for client command {{commandKey}}."
|
|
2156
|
+
}
|
|
2157
|
+
},
|
|
2121
2158
|
chat: {
|
|
2122
2159
|
title: "Chat",
|
|
2123
2160
|
placeholder: "Type a message...",
|
|
@@ -2205,6 +2242,9 @@ var en_US_default = {
|
|
|
2205
2242
|
history: {
|
|
2206
2243
|
threadHistory: "Thread history",
|
|
2207
2244
|
title: "Threads",
|
|
2245
|
+
refresh: "Refresh threads",
|
|
2246
|
+
updatedAt: "Updated {{time}}",
|
|
2247
|
+
deleteThread: "Delete {{title}}",
|
|
2208
2248
|
newThread: "New Thread",
|
|
2209
2249
|
empty: "No threads yet",
|
|
2210
2250
|
newThreadTitle: "New thread",
|
|
@@ -2559,6 +2599,32 @@ var en_US_default = {
|
|
|
2559
2599
|
|
|
2560
2600
|
// src/i18n/locales/zh-CN.json
|
|
2561
2601
|
var zh_CN_default = {
|
|
2602
|
+
workbench: {
|
|
2603
|
+
title: "\u89C6\u56FE",
|
|
2604
|
+
description: "\u8FDC\u7A0B\u5DE5\u4F5C\u53F0\u89C6\u56FE",
|
|
2605
|
+
views: "\u53EF\u7528\u89C6\u56FE",
|
|
2606
|
+
open: "\u6253\u5F00\u89C6\u56FE",
|
|
2607
|
+
close: "\u5173\u95ED\u89C6\u56FE",
|
|
2608
|
+
expandPanel: "\u5C55\u5F00\u9762\u677F",
|
|
2609
|
+
restorePanel: "\u8FD8\u539F\u9762\u677F",
|
|
2610
|
+
toggleSidebar: "\u663E\u793A/\u9690\u85CF\u4FA7\u8FB9\u680F",
|
|
2611
|
+
resize: "\u8C03\u6574\u89C6\u56FE\u9762\u677F\u5BBD\u5EA6",
|
|
2612
|
+
loading: "\u6B63\u5728\u52A0\u8F7D\u89C6\u56FE...",
|
|
2613
|
+
loadingView: "\u6B63\u5728\u52A0\u8F7D\u89C6\u56FE...",
|
|
2614
|
+
empty: "\u6682\u65E0\u517C\u5BB9\u7684\u89C6\u56FE\u3002",
|
|
2615
|
+
loadFailed: "\u89C6\u56FE\u52A0\u8F7D\u5931\u8D25\u3002",
|
|
2616
|
+
entryUnavailable: "\u8FDC\u7A0B\u89C6\u56FE\u5185\u5BB9\u4E0D\u53EF\u7528\u3002",
|
|
2617
|
+
missingAssistant: "\u9700\u8981 Assistant \u624D\u80FD\u52A0\u8F7D\u89C6\u56FE\u3002",
|
|
2618
|
+
retry: "\u91CD\u8BD5",
|
|
2619
|
+
errors: {
|
|
2620
|
+
contextKeyRequired: "\u5FC5\u987B\u63D0\u4F9B\u4E0A\u4E0B\u6587\u952E\u3002",
|
|
2621
|
+
messageRequired: "\u5FC5\u987B\u63D0\u4F9B\u6D88\u606F\u5185\u5BB9\u3002",
|
|
2622
|
+
sendFailed: "\u6D88\u606F\u53D1\u9001\u5931\u8D25\u3002",
|
|
2623
|
+
requestFailed: "\u8FDC\u7A0B\u89C6\u56FE\u8BF7\u6C42\u5931\u8D25\u3002",
|
|
2624
|
+
requestTimeout: "\u8FDC\u7A0B\u89C6\u56FE\u8BF7\u6C42\u8D85\u65F6\u3002",
|
|
2625
|
+
clientCommandUnavailable: "\u672A\u914D\u7F6E\u5BA2\u6237\u7AEF\u547D\u4EE4 {{commandKey}} \u7684\u5904\u7406\u5668\u3002"
|
|
2626
|
+
}
|
|
2627
|
+
},
|
|
2562
2628
|
chat: {
|
|
2563
2629
|
title: "\u804A\u5929",
|
|
2564
2630
|
placeholder: "\u8F93\u5165\u6D88\u606F...",
|
|
@@ -2646,6 +2712,9 @@ var zh_CN_default = {
|
|
|
2646
2712
|
history: {
|
|
2647
2713
|
threadHistory: "\u7EBF\u7A0B\u5386\u53F2",
|
|
2648
2714
|
title: "\u7EBF\u7A0B",
|
|
2715
|
+
refresh: "\u5237\u65B0\u7EBF\u7A0B",
|
|
2716
|
+
updatedAt: "\u66F4\u65B0\u4E8E {{time}}",
|
|
2717
|
+
deleteThread: "\u5220\u9664 {{title}}",
|
|
2649
2718
|
newThread: "\u65B0\u7EBF\u7A0B",
|
|
2650
2719
|
empty: "\u6682\u65E0\u7EBF\u7A0B",
|
|
2651
2720
|
newThreadTitle: "\u65B0\u7EBF\u7A0B",
|
|
@@ -3230,6 +3299,7 @@ function generateGrayscaleColors(grayscale, isDarkMode) {
|
|
|
3230
3299
|
}
|
|
3231
3300
|
function ThemeProvider({ children, theme: themeProp }) {
|
|
3232
3301
|
const themeRef = React4.useRef(null);
|
|
3302
|
+
const [themeRevision, setThemeRevision] = React4.useState(0);
|
|
3233
3303
|
const theme = React4.useMemo(() => {
|
|
3234
3304
|
if (typeof themeProp === "string") {
|
|
3235
3305
|
return {
|
|
@@ -3242,8 +3312,13 @@ function ThemeProvider({ children, theme: themeProp }) {
|
|
|
3242
3312
|
return theme.colorScheme === "dark";
|
|
3243
3313
|
}, [theme]);
|
|
3244
3314
|
const contextValue = React4.useMemo(
|
|
3245
|
-
() => ({
|
|
3246
|
-
|
|
3315
|
+
() => ({
|
|
3316
|
+
theme,
|
|
3317
|
+
isDarkMode,
|
|
3318
|
+
themeRootRef: themeRef,
|
|
3319
|
+
themeRevision
|
|
3320
|
+
}),
|
|
3321
|
+
[theme, isDarkMode, themeRevision]
|
|
3247
3322
|
);
|
|
3248
3323
|
React4.useEffect(() => {
|
|
3249
3324
|
if (!themeRef.current) return;
|
|
@@ -3340,6 +3415,7 @@ function ThemeProvider({ children, theme: themeProp }) {
|
|
|
3340
3415
|
}
|
|
3341
3416
|
}
|
|
3342
3417
|
}
|
|
3418
|
+
setThemeRevision((current) => current + 1);
|
|
3343
3419
|
return () => {
|
|
3344
3420
|
const root = document.documentElement;
|
|
3345
3421
|
el.classList.remove("dark");
|
|
@@ -4760,10 +4836,10 @@ var ScrollArea = React11.forwardRef(({ className, children, ...props }, ref) =>
|
|
|
4760
4836
|
ScrollAreaPrimitive.Root,
|
|
4761
4837
|
{
|
|
4762
4838
|
ref,
|
|
4763
|
-
className: cn("relative overflow-hidden", className),
|
|
4839
|
+
className: cn("relative min-w-0 overflow-hidden", className),
|
|
4764
4840
|
...props,
|
|
4765
4841
|
children: [
|
|
4766
|
-
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(ScrollAreaPrimitive.Viewport, { className: "h-full w-full rounded-[inherit]", children }),
|
|
4842
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(ScrollAreaPrimitive.Viewport, { className: "h-full w-full min-w-0 max-w-full rounded-[inherit] [&>div]:!block [&>div]:!w-full", children }),
|
|
4767
4843
|
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(ScrollBar, {}),
|
|
4768
4844
|
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(ScrollAreaPrimitive.Corner, {})
|
|
4769
4845
|
]
|
|
@@ -4798,6 +4874,9 @@ function Sheet({ ...props }) {
|
|
|
4798
4874
|
function SheetTrigger({ ...props }) {
|
|
4799
4875
|
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(SheetPrimitive.Trigger, { ...props });
|
|
4800
4876
|
}
|
|
4877
|
+
function SheetClose({ ...props }) {
|
|
4878
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(SheetPrimitive.Close, { ...props });
|
|
4879
|
+
}
|
|
4801
4880
|
function SheetPortal({ ...props }) {
|
|
4802
4881
|
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(SheetPrimitive.Portal, { ...props });
|
|
4803
4882
|
}
|
|
@@ -4818,6 +4897,7 @@ function SheetOverlay({
|
|
|
4818
4897
|
}
|
|
4819
4898
|
function SheetContent({
|
|
4820
4899
|
side = "right",
|
|
4900
|
+
showCloseButton = true,
|
|
4821
4901
|
className,
|
|
4822
4902
|
children,
|
|
4823
4903
|
...props
|
|
@@ -4842,7 +4922,7 @@ function SheetContent({
|
|
|
4842
4922
|
...props,
|
|
4843
4923
|
children: [
|
|
4844
4924
|
children,
|
|
4845
|
-
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(SheetPrimitive.Close, { className: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary", children: [
|
|
4925
|
+
showCloseButton && /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(SheetPrimitive.Close, { className: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary", children: [
|
|
4846
4926
|
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_lucide_react6.X, { size: 16 }),
|
|
4847
4927
|
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: "sr-only", children: t("sheet.close") })
|
|
4848
4928
|
] })
|
|
@@ -4881,17 +4961,51 @@ function SheetTitle({
|
|
|
4881
4961
|
|
|
4882
4962
|
// src/components/history/HistorySidebar.tsx
|
|
4883
4963
|
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
4964
|
+
var formatThreadUpdatedAt = (value, formatters, now = /* @__PURE__ */ new Date()) => {
|
|
4965
|
+
if (Number.isNaN(value.getTime())) return null;
|
|
4966
|
+
const isSameYear = value.getFullYear() === now.getFullYear();
|
|
4967
|
+
const isSameDay = isSameYear && value.getMonth() === now.getMonth() && value.getDate() === now.getDate();
|
|
4968
|
+
return {
|
|
4969
|
+
compact: isSameDay ? formatters.time.format(value) : isSameYear ? formatters.date.format(value) : formatters.dateWithYear.format(value),
|
|
4970
|
+
full: formatters.full.format(value)
|
|
4971
|
+
};
|
|
4972
|
+
};
|
|
4884
4973
|
function HistorySidebar({
|
|
4885
4974
|
threads = [],
|
|
4886
4975
|
currentThreadId,
|
|
4887
4976
|
onNewThread,
|
|
4977
|
+
onRefresh,
|
|
4888
4978
|
onSelectThread,
|
|
4889
4979
|
onDeleteThread,
|
|
4980
|
+
isRefreshing = false,
|
|
4890
4981
|
showDelete = true,
|
|
4891
4982
|
disabled = false
|
|
4892
4983
|
}) {
|
|
4893
|
-
const { t } = useChatkitTranslation();
|
|
4984
|
+
const { t, i18n: i18n2 } = useChatkitTranslation();
|
|
4894
4985
|
const [open, setOpen] = React13.useState(false);
|
|
4986
|
+
const language = i18n2.resolvedLanguage ?? i18n2.language;
|
|
4987
|
+
const threadTimeFormatters = React13.useMemo(
|
|
4988
|
+
() => ({
|
|
4989
|
+
time: new Intl.DateTimeFormat(language, {
|
|
4990
|
+
hour: "2-digit",
|
|
4991
|
+
minute: "2-digit"
|
|
4992
|
+
}),
|
|
4993
|
+
date: new Intl.DateTimeFormat(language, {
|
|
4994
|
+
month: "numeric",
|
|
4995
|
+
day: "numeric"
|
|
4996
|
+
}),
|
|
4997
|
+
dateWithYear: new Intl.DateTimeFormat(language, {
|
|
4998
|
+
year: "numeric",
|
|
4999
|
+
month: "numeric",
|
|
5000
|
+
day: "numeric"
|
|
5001
|
+
}),
|
|
5002
|
+
full: new Intl.DateTimeFormat(language, {
|
|
5003
|
+
dateStyle: "medium",
|
|
5004
|
+
timeStyle: "short"
|
|
5005
|
+
})
|
|
5006
|
+
}),
|
|
5007
|
+
[language]
|
|
5008
|
+
);
|
|
4895
5009
|
const handleNewThread = () => {
|
|
4896
5010
|
onNewThread?.();
|
|
4897
5011
|
setOpen(false);
|
|
@@ -4918,49 +5032,118 @@ function HistorySidebar({
|
|
|
4918
5032
|
) }) }) }),
|
|
4919
5033
|
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(TooltipContent, { side: "bottom", children: t("history.threadHistory") })
|
|
4920
5034
|
] }),
|
|
4921
|
-
/* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
|
|
4922
|
-
|
|
4923
|
-
|
|
4924
|
-
|
|
4925
|
-
|
|
4926
|
-
|
|
4927
|
-
|
|
4928
|
-
|
|
4929
|
-
children: [
|
|
4930
|
-
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
4931
|
-
|
|
4932
|
-
|
|
4933
|
-
|
|
4934
|
-
|
|
4935
|
-
|
|
4936
|
-
|
|
4937
|
-
|
|
4938
|
-
|
|
4939
|
-
|
|
4940
|
-
|
|
4941
|
-
|
|
4942
|
-
|
|
4943
|
-
|
|
4944
|
-
|
|
4945
|
-
|
|
4946
|
-
|
|
4947
|
-
|
|
4948
|
-
|
|
5035
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
|
|
5036
|
+
SheetContent,
|
|
5037
|
+
{
|
|
5038
|
+
side: "right",
|
|
5039
|
+
className: "w-80 p-0",
|
|
5040
|
+
showCloseButton: false,
|
|
5041
|
+
"aria-describedby": void 0,
|
|
5042
|
+
children: [
|
|
5043
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(SheetHeader, { className: "grid grid-cols-[minmax(0,1fr)_auto_minmax(0,1fr)] items-center space-y-0 border-b px-3 py-4", children: [
|
|
5044
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(SheetTitle, { className: "col-start-2 text-center", children: t("history.title") }),
|
|
5045
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "col-start-3 row-start-1 flex min-w-max items-center gap-1 justify-self-end", children: [
|
|
5046
|
+
onRefresh && /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(Tooltip, { children: [
|
|
5047
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
5048
|
+
Button,
|
|
5049
|
+
{
|
|
5050
|
+
type: "button",
|
|
5051
|
+
variant: "ghost",
|
|
5052
|
+
size: "icon-sm",
|
|
5053
|
+
onClick: () => void onRefresh(),
|
|
5054
|
+
disabled: disabled || isRefreshing,
|
|
5055
|
+
className: "cursor-pointer text-muted-foreground hover:bg-accent hover:text-accent-foreground",
|
|
5056
|
+
"aria-label": t("history.refresh"),
|
|
5057
|
+
"aria-busy": isRefreshing,
|
|
5058
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
5059
|
+
import_lucide_react7.RefreshCw,
|
|
5060
|
+
{
|
|
5061
|
+
size: 16,
|
|
5062
|
+
className: cn(isRefreshing && "animate-spin")
|
|
5063
|
+
}
|
|
5064
|
+
)
|
|
5065
|
+
}
|
|
5066
|
+
) }),
|
|
5067
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(TooltipContent, { side: "bottom", children: t("history.refresh") })
|
|
5068
|
+
] }),
|
|
5069
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(SheetClose, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
5070
|
+
Button,
|
|
5071
|
+
{
|
|
5072
|
+
type: "button",
|
|
5073
|
+
variant: "ghost",
|
|
5074
|
+
size: "icon-sm",
|
|
5075
|
+
className: "cursor-pointer text-muted-foreground hover:bg-accent hover:text-accent-foreground",
|
|
5076
|
+
"aria-label": t("sheet.close"),
|
|
5077
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_lucide_react7.X, { size: 16 })
|
|
5078
|
+
}
|
|
5079
|
+
) })
|
|
5080
|
+
] })
|
|
5081
|
+
] }),
|
|
5082
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "p-4", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
|
|
5083
|
+
Button,
|
|
5084
|
+
{
|
|
5085
|
+
onClick: handleNewThread,
|
|
5086
|
+
className: "w-full justify-start gap-2",
|
|
5087
|
+
variant: "secondary",
|
|
5088
|
+
children: [
|
|
5089
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_lucide_react7.PlusCircle, { size: 16 }),
|
|
5090
|
+
t("history.newThread")
|
|
5091
|
+
]
|
|
5092
|
+
}
|
|
5093
|
+
) }),
|
|
5094
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(ScrollArea, { className: "h-[calc(100vh-140px)]", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "px-4 pb-4", children: threads.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "py-8 text-center text-sm text-muted-foreground", children: t("history.empty") }) : /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { children: threads.map((thread) => {
|
|
5095
|
+
const updatedAt = thread.lastMessageAt ? formatThreadUpdatedAt(
|
|
5096
|
+
thread.lastMessageAt,
|
|
5097
|
+
threadTimeFormatters
|
|
5098
|
+
) : null;
|
|
5099
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
|
|
5100
|
+
"div",
|
|
4949
5101
|
{
|
|
4950
|
-
|
|
4951
|
-
|
|
4952
|
-
|
|
4953
|
-
|
|
4954
|
-
|
|
4955
|
-
|
|
4956
|
-
|
|
4957
|
-
|
|
4958
|
-
|
|
4959
|
-
|
|
4960
|
-
|
|
4961
|
-
|
|
4962
|
-
|
|
4963
|
-
|
|
5102
|
+
"data-active": currentThreadId === thread.id,
|
|
5103
|
+
className: cn(
|
|
5104
|
+
"group flex items-center gap-2 rounded-lg px-3 py-2 text-sm transition-colors",
|
|
5105
|
+
"cursor-pointer hover:bg-accent hover:text-accent-foreground",
|
|
5106
|
+
"data-[active=true]:bg-accent data-[active=true]:text-accent-foreground"
|
|
5107
|
+
),
|
|
5108
|
+
onClick: () => handleSelectThread(thread.id),
|
|
5109
|
+
children: [
|
|
5110
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "shrink-0 text-muted-foreground transition-colors group-hover:text-accent-foreground group-data-[active=true]:text-accent-foreground", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_lucide_react7.MessageSquare, { size: 16 }) }),
|
|
5111
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "min-w-0 flex-1 truncate", children: thread.title }),
|
|
5112
|
+
updatedAt && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
5113
|
+
"time",
|
|
5114
|
+
{
|
|
5115
|
+
dateTime: thread.lastMessageAt?.toISOString(),
|
|
5116
|
+
title: updatedAt.full,
|
|
5117
|
+
"aria-label": t("history.updatedAt", {
|
|
5118
|
+
time: updatedAt.full
|
|
5119
|
+
}),
|
|
5120
|
+
className: "hidden shrink-0 whitespace-nowrap text-xs text-muted-foreground transition-colors group-hover:inline group-hover:text-accent-foreground group-focus-within:inline group-data-[active=true]:text-accent-foreground",
|
|
5121
|
+
children: updatedAt.compact
|
|
5122
|
+
}
|
|
5123
|
+
),
|
|
5124
|
+
showDelete && onDeleteThread && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
5125
|
+
"button",
|
|
5126
|
+
{
|
|
5127
|
+
type: "button",
|
|
5128
|
+
onClick: (e) => {
|
|
5129
|
+
e.stopPropagation();
|
|
5130
|
+
onDeleteThread(thread.id);
|
|
5131
|
+
},
|
|
5132
|
+
className: "shrink-0 rounded p-1 opacity-0 transition-all hover:bg-destructive/10 hover:text-destructive group-hover:opacity-100 group-focus-within:opacity-100",
|
|
5133
|
+
"aria-label": t("history.deleteThread", {
|
|
5134
|
+
title: thread.title
|
|
5135
|
+
}),
|
|
5136
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_lucide_react7.Trash2, { size: 14 })
|
|
5137
|
+
}
|
|
5138
|
+
)
|
|
5139
|
+
]
|
|
5140
|
+
},
|
|
5141
|
+
thread.id
|
|
5142
|
+
);
|
|
5143
|
+
}) }) }) })
|
|
5144
|
+
]
|
|
5145
|
+
}
|
|
5146
|
+
)
|
|
4964
5147
|
] });
|
|
4965
5148
|
}
|
|
4966
5149
|
|
|
@@ -16299,10 +16482,52 @@ function findDomPointForComposerOffset(root, offset) {
|
|
|
16299
16482
|
return result ?? { node: lastNode, offset: lastOffset };
|
|
16300
16483
|
}
|
|
16301
16484
|
|
|
16302
|
-
// src/
|
|
16485
|
+
// src/workbench/WorkbenchShell.tsx
|
|
16303
16486
|
var React51 = __toESM(require("react"), 1);
|
|
16487
|
+
var import_xpert_sdk2 = require("@xpert-ai/xpert-sdk");
|
|
16304
16488
|
var import_lucide_react29 = require("lucide-react");
|
|
16305
16489
|
var import_jsx_runtime56 = require("react/jsx-runtime");
|
|
16490
|
+
var WorkbenchContext = React51.createContext({
|
|
16491
|
+
enabled: false,
|
|
16492
|
+
open: false,
|
|
16493
|
+
loading: false,
|
|
16494
|
+
available: false,
|
|
16495
|
+
toggle: () => void 0
|
|
16496
|
+
});
|
|
16497
|
+
function useWorkbench() {
|
|
16498
|
+
return React51.useContext(WorkbenchContext);
|
|
16499
|
+
}
|
|
16500
|
+
function WorkbenchToggleButton() {
|
|
16501
|
+
const workbench = useWorkbench();
|
|
16502
|
+
const { t } = useChatkitTranslation();
|
|
16503
|
+
if (!workbench.enabled || workbench.open) return null;
|
|
16504
|
+
const label = t("workbench.open");
|
|
16505
|
+
const tooltip = workbench.disabledReason ?? label;
|
|
16506
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(Tooltip, { children: [
|
|
16507
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("span", { className: "inline-flex h-8 w-8", children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
16508
|
+
"button",
|
|
16509
|
+
{
|
|
16510
|
+
type: "button",
|
|
16511
|
+
onClick: workbench.toggle,
|
|
16512
|
+
disabled: !workbench.available,
|
|
16513
|
+
className: cn(
|
|
16514
|
+
"flex h-8 w-8 cursor-pointer items-center justify-center rounded-md",
|
|
16515
|
+
"text-muted-foreground transition-colors duration-150 hover:bg-muted hover:text-foreground",
|
|
16516
|
+
"disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50"
|
|
16517
|
+
),
|
|
16518
|
+
"aria-label": label,
|
|
16519
|
+
"aria-expanded": false,
|
|
16520
|
+
children: workbench.loading ? /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_lucide_react29.Loader2, { size: 16, className: "animate-spin" }) : /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_lucide_react29.PanelRight, { size: 16 })
|
|
16521
|
+
}
|
|
16522
|
+
) }) }),
|
|
16523
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(TooltipContent, { side: "bottom", children: tooltip })
|
|
16524
|
+
] });
|
|
16525
|
+
}
|
|
16526
|
+
|
|
16527
|
+
// src/components/chat/runtime-capabilities.tsx
|
|
16528
|
+
var React52 = __toESM(require("react"), 1);
|
|
16529
|
+
var import_lucide_react30 = require("lucide-react");
|
|
16530
|
+
var import_jsx_runtime57 = require("react/jsx-runtime");
|
|
16306
16531
|
function createComposerCapabilityInsertionParts(options) {
|
|
16307
16532
|
return options.flatMap((option) => [
|
|
16308
16533
|
createComposerCapabilityPart(option, createMessageId()),
|
|
@@ -16375,29 +16600,29 @@ function useRuntimeCapabilitiesState({
|
|
|
16375
16600
|
disabled,
|
|
16376
16601
|
composerParts
|
|
16377
16602
|
}) {
|
|
16378
|
-
const [runtimeCapabilities, setRuntimeCapabilities] =
|
|
16379
|
-
const [runtimeCapabilitiesReady, setRuntimeCapabilitiesReady] =
|
|
16380
|
-
const [sessionRuntimeCapabilities, setSessionRuntimeCapabilities] =
|
|
16603
|
+
const [runtimeCapabilities, setRuntimeCapabilities] = React52.useState(null);
|
|
16604
|
+
const [runtimeCapabilitiesReady, setRuntimeCapabilitiesReady] = React52.useState(false);
|
|
16605
|
+
const [sessionRuntimeCapabilities, setSessionRuntimeCapabilities] = React52.useState(
|
|
16381
16606
|
() => createEmptyRuntimeCapabilitiesSelection()
|
|
16382
16607
|
);
|
|
16383
|
-
const [runRuntimeCapabilities, setRunRuntimeCapabilities] =
|
|
16608
|
+
const [runRuntimeCapabilities, setRunRuntimeCapabilities] = React52.useState(
|
|
16384
16609
|
() => createEmptyRuntimeCapabilitiesSelection()
|
|
16385
16610
|
);
|
|
16386
|
-
const [runtimeCapabilityPalette, setRuntimeCapabilityPalette] =
|
|
16387
|
-
const runtimeCapabilityPreferenceLoadRef =
|
|
16388
|
-
const pendingExternalRuntimeCapabilitiesRef =
|
|
16389
|
-
const runtimeCapabilityOptions =
|
|
16611
|
+
const [runtimeCapabilityPalette, setRuntimeCapabilityPalette] = React52.useState(null);
|
|
16612
|
+
const runtimeCapabilityPreferenceLoadRef = React52.useRef(0);
|
|
16613
|
+
const pendingExternalRuntimeCapabilitiesRef = React52.useRef(null);
|
|
16614
|
+
const runtimeCapabilityOptions = React52.useMemo(
|
|
16390
16615
|
() => getRuntimeCapabilityOptions(runtimeCapabilities),
|
|
16391
16616
|
[runtimeCapabilities]
|
|
16392
16617
|
);
|
|
16393
|
-
const effectiveSessionRuntimeCapabilities =
|
|
16618
|
+
const effectiveSessionRuntimeCapabilities = React52.useMemo(
|
|
16394
16619
|
() => runtimeCapabilitiesReady && runtimeCapabilities ? mergeRuntimeCapabilitiesSelections(
|
|
16395
16620
|
runtimeCapabilities,
|
|
16396
16621
|
sessionRuntimeCapabilities
|
|
16397
16622
|
) : null,
|
|
16398
16623
|
[runtimeCapabilities, runtimeCapabilitiesReady, sessionRuntimeCapabilities]
|
|
16399
16624
|
);
|
|
16400
|
-
const runRuntimeCapabilityOptions =
|
|
16625
|
+
const runRuntimeCapabilityOptions = React52.useMemo(
|
|
16401
16626
|
() => runtimeCapabilityOptions.filter(
|
|
16402
16627
|
(option) => isRuntimeCapabilitySelected(
|
|
16403
16628
|
runRuntimeCapabilities,
|
|
@@ -16407,11 +16632,11 @@ function useRuntimeCapabilitiesState({
|
|
|
16407
16632
|
),
|
|
16408
16633
|
[runRuntimeCapabilities, runtimeCapabilityOptions]
|
|
16409
16634
|
);
|
|
16410
|
-
const composerRuntimeCapabilitySelectionKeys =
|
|
16635
|
+
const composerRuntimeCapabilitySelectionKeys = React52.useMemo(
|
|
16411
16636
|
() => getComposerCapabilitySelectionKeys(composerParts),
|
|
16412
16637
|
[composerParts]
|
|
16413
16638
|
);
|
|
16414
|
-
const detachedRunRuntimeCapabilityOptions =
|
|
16639
|
+
const detachedRunRuntimeCapabilityOptions = React52.useMemo(
|
|
16415
16640
|
() => runRuntimeCapabilityOptions.filter(
|
|
16416
16641
|
(option) => !composerRuntimeCapabilitySelectionKeys.has(
|
|
16417
16642
|
getRuntimeCapabilityOptionKey(option)
|
|
@@ -16419,7 +16644,7 @@ function useRuntimeCapabilitiesState({
|
|
|
16419
16644
|
),
|
|
16420
16645
|
[composerRuntimeCapabilitySelectionKeys, runRuntimeCapabilityOptions]
|
|
16421
16646
|
);
|
|
16422
|
-
const persistSessionRuntimeCapabilities =
|
|
16647
|
+
const persistSessionRuntimeCapabilities = React52.useCallback(
|
|
16423
16648
|
async (nextThreadId, selection) => {
|
|
16424
16649
|
if (!runtimeCapabilities || !selection || !client) {
|
|
16425
16650
|
return;
|
|
@@ -16444,7 +16669,7 @@ function useRuntimeCapabilitiesState({
|
|
|
16444
16669
|
},
|
|
16445
16670
|
[client, runtimeCapabilities]
|
|
16446
16671
|
);
|
|
16447
|
-
const applyExternalRuntimeCapabilities =
|
|
16672
|
+
const applyExternalRuntimeCapabilities = React52.useCallback(
|
|
16448
16673
|
(selection) => {
|
|
16449
16674
|
pendingExternalRuntimeCapabilitiesRef.current = selection;
|
|
16450
16675
|
setRunRuntimeCapabilities(() => {
|
|
@@ -16465,7 +16690,7 @@ function useRuntimeCapabilitiesState({
|
|
|
16465
16690
|
},
|
|
16466
16691
|
[runtimeCapabilities]
|
|
16467
16692
|
);
|
|
16468
|
-
const handleSessionRuntimeCapabilityToggle =
|
|
16693
|
+
const handleSessionRuntimeCapabilityToggle = React52.useCallback(
|
|
16469
16694
|
(type, id, selected) => {
|
|
16470
16695
|
setSessionRuntimeCapabilities((previous) => {
|
|
16471
16696
|
const nextSelection = toggleRuntimeCapabilitySelection(
|
|
@@ -16486,7 +16711,7 @@ function useRuntimeCapabilitiesState({
|
|
|
16486
16711
|
},
|
|
16487
16712
|
[persistSessionRuntimeCapabilities, threadId]
|
|
16488
16713
|
);
|
|
16489
|
-
const addRunRuntimeCapabilities =
|
|
16714
|
+
const addRunRuntimeCapabilities = React52.useCallback(
|
|
16490
16715
|
(selection) => {
|
|
16491
16716
|
setRunRuntimeCapabilities(
|
|
16492
16717
|
(previous) => runtimeCapabilities ? mergeRuntimeCapabilitiesSelections(
|
|
@@ -16498,13 +16723,13 @@ function useRuntimeCapabilitiesState({
|
|
|
16498
16723
|
},
|
|
16499
16724
|
[runtimeCapabilities]
|
|
16500
16725
|
);
|
|
16501
|
-
const resetRunRuntimeCapabilities =
|
|
16726
|
+
const resetRunRuntimeCapabilities = React52.useCallback(() => {
|
|
16502
16727
|
setRunRuntimeCapabilities(
|
|
16503
16728
|
createEmptyRuntimeCapabilitiesSelection(runtimeCapabilities)
|
|
16504
16729
|
);
|
|
16505
16730
|
setRuntimeCapabilityPalette(null);
|
|
16506
16731
|
}, [runtimeCapabilities]);
|
|
16507
|
-
const getRuntimeCapabilitiesForSubmit =
|
|
16732
|
+
const getRuntimeCapabilitiesForSubmit = React52.useCallback(
|
|
16508
16733
|
(recommended) => {
|
|
16509
16734
|
const recommendedRuntimeCapabilitiesForSubmit = recommended && runtimeCapabilities && runtimeCapabilitiesReady ? mergeRuntimeCapabilitiesSelections(
|
|
16510
16735
|
runtimeCapabilities,
|
|
@@ -16535,7 +16760,7 @@ function useRuntimeCapabilitiesState({
|
|
|
16535
16760
|
runtimeCapabilityOptions
|
|
16536
16761
|
]
|
|
16537
16762
|
);
|
|
16538
|
-
const getRuntimeCapabilitiesForCommand =
|
|
16763
|
+
const getRuntimeCapabilitiesForCommand = React52.useCallback(
|
|
16539
16764
|
(recommended) => runtimeCapabilities && runtimeCapabilitiesReady ? createRuntimeCapabilitiesForSubmit({
|
|
16540
16765
|
capabilities: runtimeCapabilities,
|
|
16541
16766
|
available: effectiveSessionRuntimeCapabilities,
|
|
@@ -16547,7 +16772,7 @@ function useRuntimeCapabilitiesState({
|
|
|
16547
16772
|
runtimeCapabilitiesReady
|
|
16548
16773
|
]
|
|
16549
16774
|
);
|
|
16550
|
-
|
|
16775
|
+
React52.useEffect(() => {
|
|
16551
16776
|
if (disabled || !client || !assistantId) {
|
|
16552
16777
|
pendingExternalRuntimeCapabilitiesRef.current = null;
|
|
16553
16778
|
setRuntimeCapabilities(null);
|
|
@@ -16595,7 +16820,7 @@ function useRuntimeCapabilitiesState({
|
|
|
16595
16820
|
});
|
|
16596
16821
|
return () => controller.abort();
|
|
16597
16822
|
}, [assistantId, client, disabled]);
|
|
16598
|
-
|
|
16823
|
+
React52.useEffect(() => {
|
|
16599
16824
|
const emptyRunSelection = createEmptyRuntimeCapabilitiesSelection(runtimeCapabilities);
|
|
16600
16825
|
const pendingExternalSelection = pendingExternalRuntimeCapabilitiesRef.current;
|
|
16601
16826
|
if (pendingExternalSelection && runtimeCapabilities) {
|
|
@@ -16687,8 +16912,8 @@ function useRuntimeCapabilityComposerActions({
|
|
|
16687
16912
|
commitComposerParts,
|
|
16688
16913
|
focusComposerAt
|
|
16689
16914
|
}) {
|
|
16690
|
-
const pendingExternalRuntimeCapabilityInsertRef =
|
|
16691
|
-
const insertExternalRuntimeCapabilities =
|
|
16915
|
+
const pendingExternalRuntimeCapabilityInsertRef = React52.useRef(null);
|
|
16916
|
+
const insertExternalRuntimeCapabilities = React52.useCallback(
|
|
16692
16917
|
(selection, options) => {
|
|
16693
16918
|
applyExternalRuntimeCapabilities(selection);
|
|
16694
16919
|
if (!selection) {
|
|
@@ -16743,7 +16968,7 @@ function useRuntimeCapabilityComposerActions({
|
|
|
16743
16968
|
setRuntimeCapabilityPalette
|
|
16744
16969
|
]
|
|
16745
16970
|
);
|
|
16746
|
-
const applyComposerValueRuntimeCapabilities =
|
|
16971
|
+
const applyComposerValueRuntimeCapabilities = React52.useCallback(
|
|
16747
16972
|
(payload, options) => {
|
|
16748
16973
|
const runtimeCapabilitiesPayload = isRuntimeCapabilitiesSelection(
|
|
16749
16974
|
payload.runtimeCapabilities
|
|
@@ -16759,7 +16984,7 @@ function useRuntimeCapabilityComposerActions({
|
|
|
16759
16984
|
},
|
|
16760
16985
|
[applyExternalRuntimeCapabilities, insertExternalRuntimeCapabilities]
|
|
16761
16986
|
);
|
|
16762
|
-
const updateRuntimeCapabilityPalette =
|
|
16987
|
+
const updateRuntimeCapabilityPalette = React52.useCallback(
|
|
16763
16988
|
(parts, selectionStart) => {
|
|
16764
16989
|
const input = composerInputRef.current;
|
|
16765
16990
|
const editingText = getComposerEditingText(parts);
|
|
@@ -16771,7 +16996,7 @@ function useRuntimeCapabilityComposerActions({
|
|
|
16771
16996
|
},
|
|
16772
16997
|
[composerInputRef, setRuntimeCapabilityPalette]
|
|
16773
16998
|
);
|
|
16774
|
-
const removeRunRuntimeCapability =
|
|
16999
|
+
const removeRunRuntimeCapability = React52.useCallback(
|
|
16775
17000
|
(option) => {
|
|
16776
17001
|
setRunRuntimeCapabilities(
|
|
16777
17002
|
(previous) => toggleRuntimeCapabilitySelection(
|
|
@@ -16791,7 +17016,7 @@ function useRuntimeCapabilityComposerActions({
|
|
|
16791
17016
|
},
|
|
16792
17017
|
[commitComposerParts, composerPartsRef, setRunRuntimeCapabilities]
|
|
16793
17018
|
);
|
|
16794
|
-
const insertComposerCapabilityToken =
|
|
17019
|
+
const insertComposerCapabilityToken = React52.useCallback(
|
|
16795
17020
|
(capability, range) => {
|
|
16796
17021
|
const replacementParts = createComposerCapabilityInsertionParts([
|
|
16797
17022
|
capability
|
|
@@ -16832,7 +17057,7 @@ function useRuntimeCapabilityComposerActions({
|
|
|
16832
17057
|
setRuntimeCapabilityPalette
|
|
16833
17058
|
]
|
|
16834
17059
|
);
|
|
16835
|
-
|
|
17060
|
+
React52.useEffect(() => {
|
|
16836
17061
|
if (!runtimeCapabilitiesReady || !runtimeCapabilities) {
|
|
16837
17062
|
return;
|
|
16838
17063
|
}
|
|
@@ -16862,16 +17087,16 @@ function HumanRuntimeCapabilityChips({
|
|
|
16862
17087
|
if (options.length === 0) {
|
|
16863
17088
|
return null;
|
|
16864
17089
|
}
|
|
16865
|
-
return /* @__PURE__ */ (0,
|
|
17090
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("div", { className: "mb-2 flex flex-wrap gap-1.5", children: options.map((option) => {
|
|
16866
17091
|
const color = option.type === "skill" ? void 0 : getRuntimeCapabilityColor(option);
|
|
16867
|
-
return /* @__PURE__ */ (0,
|
|
17092
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(
|
|
16868
17093
|
"span",
|
|
16869
17094
|
{
|
|
16870
17095
|
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",
|
|
16871
17096
|
style: color ? { color } : void 0,
|
|
16872
17097
|
children: [
|
|
16873
|
-
/* @__PURE__ */ (0,
|
|
16874
|
-
/* @__PURE__ */ (0,
|
|
17098
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)(RuntimeCapabilityIcon, { option, variant: "chip" }),
|
|
17099
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)("span", { className: "max-w-[9rem] truncate", children: option.label })
|
|
16875
17100
|
]
|
|
16876
17101
|
},
|
|
16877
17102
|
`${option.type}:${option.id}`
|
|
@@ -16887,19 +17112,19 @@ function DetachedRunRuntimeCapabilities({
|
|
|
16887
17112
|
if (options.length === 0) {
|
|
16888
17113
|
return null;
|
|
16889
17114
|
}
|
|
16890
|
-
return /* @__PURE__ */ (0,
|
|
16891
|
-
/* @__PURE__ */ (0,
|
|
17115
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { className: "mb-2 flex flex-wrap items-center gap-2", children: [
|
|
17116
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)("span", { className: "text-xs text-muted-foreground", children: runOnlyLabel }),
|
|
16892
17117
|
options.map((option) => {
|
|
16893
17118
|
const color = getRuntimeCapabilityColor(option);
|
|
16894
|
-
return /* @__PURE__ */ (0,
|
|
17119
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(
|
|
16895
17120
|
"span",
|
|
16896
17121
|
{
|
|
16897
17122
|
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",
|
|
16898
17123
|
style: color ? { color } : void 0,
|
|
16899
17124
|
children: [
|
|
16900
|
-
/* @__PURE__ */ (0,
|
|
16901
|
-
/* @__PURE__ */ (0,
|
|
16902
|
-
/* @__PURE__ */ (0,
|
|
17125
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)(RuntimeCapabilityIcon, { option, variant: "chip" }),
|
|
17126
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)("span", { className: "max-w-40 truncate", children: option.label }),
|
|
17127
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
16903
17128
|
"button",
|
|
16904
17129
|
{
|
|
16905
17130
|
type: "button",
|
|
@@ -16907,7 +17132,7 @@ function DetachedRunRuntimeCapabilities({
|
|
|
16907
17132
|
className: "rounded-full p-0.5 hover:bg-primary/15",
|
|
16908
17133
|
title: removeLabel,
|
|
16909
17134
|
"aria-label": removeLabel,
|
|
16910
|
-
children: /* @__PURE__ */ (0,
|
|
17135
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(import_lucide_react30.X, { size: 11 })
|
|
16911
17136
|
}
|
|
16912
17137
|
)
|
|
16913
17138
|
]
|
|
@@ -16921,7 +17146,7 @@ function ComposerCapabilityToken({
|
|
|
16921
17146
|
part
|
|
16922
17147
|
}) {
|
|
16923
17148
|
const color = getRuntimeCapabilityColor(part.capability);
|
|
16924
|
-
return /* @__PURE__ */ (0,
|
|
17149
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(
|
|
16925
17150
|
"span",
|
|
16926
17151
|
{
|
|
16927
17152
|
"data-composer-capability-key": part.key,
|
|
@@ -16931,8 +17156,8 @@ function ComposerCapabilityToken({
|
|
|
16931
17156
|
className: "mx-0.5 inline-flex max-w-[14rem] select-none items-center gap-1 text-sm font-semibold text-primary align-baseline",
|
|
16932
17157
|
style: color ? { color } : void 0,
|
|
16933
17158
|
children: [
|
|
16934
|
-
/* @__PURE__ */ (0,
|
|
16935
|
-
/* @__PURE__ */ (0,
|
|
17159
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)(RuntimeCapabilityIcon, { option: part.capability, variant: "chip" }),
|
|
17160
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)("span", { className: "truncate", children: part.capability.label })
|
|
16936
17161
|
]
|
|
16937
17162
|
},
|
|
16938
17163
|
part.key
|
|
@@ -17192,30 +17417,30 @@ function buildMessageNavigationItems(messages, options) {
|
|
|
17192
17417
|
}
|
|
17193
17418
|
|
|
17194
17419
|
// src/hooks/useTaskSummary.ts
|
|
17195
|
-
var
|
|
17420
|
+
var React53 = __toESM(require("react"), 1);
|
|
17196
17421
|
function useTaskSummary({
|
|
17197
17422
|
enabled,
|
|
17198
17423
|
conversationId,
|
|
17199
17424
|
client,
|
|
17200
17425
|
live
|
|
17201
17426
|
}) {
|
|
17202
|
-
const [loaded, setLoaded] =
|
|
17203
|
-
const [historySections, setHistorySections] =
|
|
17204
|
-
const [historySectionsConversationId, setHistorySectionsConversationId] =
|
|
17205
|
-
const [loadingSections, setLoadingSections] =
|
|
17206
|
-
const [error, setError] =
|
|
17207
|
-
const [retryVersion, setRetryVersion] =
|
|
17208
|
-
const requestVersionRef =
|
|
17209
|
-
const conversationIdRef =
|
|
17210
|
-
const sectionControllersRef =
|
|
17427
|
+
const [loaded, setLoaded] = React53.useState(null);
|
|
17428
|
+
const [historySections, setHistorySections] = React53.useState({});
|
|
17429
|
+
const [historySectionsConversationId, setHistorySectionsConversationId] = React53.useState(null);
|
|
17430
|
+
const [loadingSections, setLoadingSections] = React53.useState({});
|
|
17431
|
+
const [error, setError] = React53.useState(null);
|
|
17432
|
+
const [retryVersion, setRetryVersion] = React53.useState(0);
|
|
17433
|
+
const requestVersionRef = React53.useRef(0);
|
|
17434
|
+
const conversationIdRef = React53.useRef(conversationId);
|
|
17435
|
+
const sectionControllersRef = React53.useRef(
|
|
17211
17436
|
/* @__PURE__ */ new Map()
|
|
17212
17437
|
);
|
|
17213
17438
|
conversationIdRef.current = conversationId;
|
|
17214
|
-
const abortSectionRequests =
|
|
17439
|
+
const abortSectionRequests = React53.useCallback(() => {
|
|
17215
17440
|
sectionControllersRef.current.forEach((controller) => controller.abort());
|
|
17216
17441
|
sectionControllersRef.current.clear();
|
|
17217
17442
|
}, []);
|
|
17218
|
-
|
|
17443
|
+
React53.useEffect(() => {
|
|
17219
17444
|
abortSectionRequests();
|
|
17220
17445
|
setHistorySections({});
|
|
17221
17446
|
setHistorySectionsConversationId(conversationId);
|
|
@@ -17244,11 +17469,11 @@ function useTaskSummary({
|
|
|
17244
17469
|
};
|
|
17245
17470
|
}, [abortSectionRequests, client, conversationId, enabled, retryVersion]);
|
|
17246
17471
|
const snapshot = loaded?.conversationId === conversationId ? loaded.snapshot : null;
|
|
17247
|
-
const activeHistorySections =
|
|
17472
|
+
const activeHistorySections = React53.useMemo(
|
|
17248
17473
|
() => historySectionsConversationId === conversationId ? historySections : {},
|
|
17249
17474
|
[conversationId, historySections, historySectionsConversationId]
|
|
17250
17475
|
);
|
|
17251
|
-
const loadSection =
|
|
17476
|
+
const loadSection = React53.useCallback(
|
|
17252
17477
|
async (section) => {
|
|
17253
17478
|
if (!enabled || !conversationId || loadingSections[section]) {
|
|
17254
17479
|
return;
|
|
@@ -17308,9 +17533,9 @@ function useTaskSummary({
|
|
|
17308
17533
|
}
|
|
17309
17534
|
|
|
17310
17535
|
// src/components/task-summary/TaskSummary.tsx
|
|
17311
|
-
var
|
|
17312
|
-
var
|
|
17313
|
-
var
|
|
17536
|
+
var React54 = __toESM(require("react"), 1);
|
|
17537
|
+
var import_lucide_react31 = require("lucide-react");
|
|
17538
|
+
var import_jsx_runtime58 = require("react/jsx-runtime");
|
|
17314
17539
|
var PREVIEW_SIZE = 3;
|
|
17315
17540
|
function TaskSummaryTrigger({
|
|
17316
17541
|
displayMode = "popover",
|
|
@@ -17319,9 +17544,9 @@ function TaskSummaryTrigger({
|
|
|
17319
17544
|
...props
|
|
17320
17545
|
}) {
|
|
17321
17546
|
const { t } = useChatkitTranslation();
|
|
17322
|
-
const [uncontrolledOpen, setUncontrolledOpen] =
|
|
17547
|
+
const [uncontrolledOpen, setUncontrolledOpen] = React54.useState(false);
|
|
17323
17548
|
const open = controlledOpen ?? uncontrolledOpen;
|
|
17324
|
-
const setOpen =
|
|
17549
|
+
const setOpen = React54.useCallback(
|
|
17325
17550
|
(nextOpen) => {
|
|
17326
17551
|
if (controlledOpen === void 0) {
|
|
17327
17552
|
setUncontrolledOpen(nextOpen);
|
|
@@ -17330,7 +17555,7 @@ function TaskSummaryTrigger({
|
|
|
17330
17555
|
},
|
|
17331
17556
|
[controlledOpen, onOpenChange]
|
|
17332
17557
|
);
|
|
17333
|
-
const triggerButton = /* @__PURE__ */ (0,
|
|
17558
|
+
const triggerButton = /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
17334
17559
|
"button",
|
|
17335
17560
|
{
|
|
17336
17561
|
type: "button",
|
|
@@ -17338,28 +17563,28 @@ function TaskSummaryTrigger({
|
|
|
17338
17563
|
"aria-label": t("taskSummary.open"),
|
|
17339
17564
|
"aria-expanded": open,
|
|
17340
17565
|
onClick: displayMode === "docked" ? () => setOpen(!open) : void 0,
|
|
17341
|
-
children: /* @__PURE__ */ (0,
|
|
17566
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_lucide_react31.ListChecks, { size: 16 })
|
|
17342
17567
|
}
|
|
17343
17568
|
);
|
|
17344
17569
|
if (displayMode === "docked") {
|
|
17345
|
-
return /* @__PURE__ */ (0,
|
|
17346
|
-
/* @__PURE__ */ (0,
|
|
17347
|
-
/* @__PURE__ */ (0,
|
|
17570
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(Tooltip, { children: [
|
|
17571
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(TooltipTrigger, { asChild: true, children: triggerButton }),
|
|
17572
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(TooltipContent, { side: "bottom", children: t("taskSummary.open") })
|
|
17348
17573
|
] });
|
|
17349
17574
|
}
|
|
17350
|
-
return /* @__PURE__ */ (0,
|
|
17351
|
-
/* @__PURE__ */ (0,
|
|
17352
|
-
/* @__PURE__ */ (0,
|
|
17353
|
-
/* @__PURE__ */ (0,
|
|
17575
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(Popover, { open, onOpenChange: setOpen, children: [
|
|
17576
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(Tooltip, { children: [
|
|
17577
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(PopoverTrigger, { asChild: true, children: triggerButton }) }),
|
|
17578
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(TooltipContent, { side: "bottom", children: t("taskSummary.open") })
|
|
17354
17579
|
] }),
|
|
17355
|
-
/* @__PURE__ */ (0,
|
|
17580
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
17356
17581
|
PopoverContent,
|
|
17357
17582
|
{
|
|
17358
17583
|
align: "end",
|
|
17359
17584
|
sideOffset: 8,
|
|
17360
17585
|
className: "w-[min(20rem,calc(100vw-2rem))] max-h-[min(44rem,calc(100vh-5rem))] overflow-y-auto rounded-2xl border-border/70 bg-popover p-0 shadow-lg",
|
|
17361
17586
|
"aria-label": t("taskSummary.title"),
|
|
17362
|
-
children: /* @__PURE__ */ (0,
|
|
17587
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(TaskSummaryContent, { ...props })
|
|
17363
17588
|
}
|
|
17364
17589
|
)
|
|
17365
17590
|
] });
|
|
@@ -17369,7 +17594,7 @@ function TaskSummaryPanel({
|
|
|
17369
17594
|
...props
|
|
17370
17595
|
}) {
|
|
17371
17596
|
const { t } = useChatkitTranslation();
|
|
17372
|
-
return /* @__PURE__ */ (0,
|
|
17597
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
17373
17598
|
"aside",
|
|
17374
17599
|
{
|
|
17375
17600
|
"data-slot": "task-summary-panel",
|
|
@@ -17378,7 +17603,7 @@ function TaskSummaryPanel({
|
|
|
17378
17603
|
"h-fit max-h-full overflow-y-auto rounded-2xl border border-border/70 bg-popover text-popover-foreground shadow-lg",
|
|
17379
17604
|
className
|
|
17380
17605
|
),
|
|
17381
|
-
children: /* @__PURE__ */ (0,
|
|
17606
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(TaskSummaryContent, { ...props })
|
|
17382
17607
|
}
|
|
17383
17608
|
);
|
|
17384
17609
|
}
|
|
@@ -17394,7 +17619,7 @@ function TaskSummaryContent({
|
|
|
17394
17619
|
onOpenResource
|
|
17395
17620
|
}) {
|
|
17396
17621
|
const { t } = useChatkitTranslation();
|
|
17397
|
-
const [expanded, setExpanded] =
|
|
17622
|
+
const [expanded, setExpanded] = React54.useState({});
|
|
17398
17623
|
const hasTask = Boolean(
|
|
17399
17624
|
summary.goal || summary.plan || summary.todos?.items.length
|
|
17400
17625
|
);
|
|
@@ -17426,7 +17651,7 @@ function TaskSummaryContent({
|
|
|
17426
17651
|
if (total2 <= PREVIEW_SIZE && !expanded[section]) return null;
|
|
17427
17652
|
const loading = loadingSections[section];
|
|
17428
17653
|
const canLoadMore = Boolean(expanded[section]) && loadedSectionCounts[section] < total2;
|
|
17429
|
-
return /* @__PURE__ */ (0,
|
|
17654
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(
|
|
17430
17655
|
"button",
|
|
17431
17656
|
{
|
|
17432
17657
|
type: "button",
|
|
@@ -17434,41 +17659,41 @@ function TaskSummaryContent({
|
|
|
17434
17659
|
disabled: loading,
|
|
17435
17660
|
onClick: () => canLoadMore ? void onLoadSection(section) : toggleSection(section),
|
|
17436
17661
|
children: [
|
|
17437
|
-
loading && /* @__PURE__ */ (0,
|
|
17438
|
-
!loading && /* @__PURE__ */ (0,
|
|
17662
|
+
loading && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_lucide_react31.Loader2, { className: "size-3 animate-spin" }),
|
|
17663
|
+
!loading && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_lucide_react31.ListChecks, { className: "size-3.5" }),
|
|
17439
17664
|
canLoadMore ? t("taskSummary.loadMore") : expanded[section] ? t("taskSummary.collapse") : t("taskSummary.viewAll", { count: total2 })
|
|
17440
17665
|
]
|
|
17441
17666
|
}
|
|
17442
17667
|
);
|
|
17443
17668
|
};
|
|
17444
|
-
return /* @__PURE__ */ (0,
|
|
17445
|
-
Boolean(historyError) && /* @__PURE__ */ (0,
|
|
17446
|
-
/* @__PURE__ */ (0,
|
|
17447
|
-
/* @__PURE__ */ (0,
|
|
17669
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: "divide-y divide-border/70", children: [
|
|
17670
|
+
Boolean(historyError) && /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: "m-3 flex items-start justify-between gap-3 rounded-lg border border-destructive/30 bg-destructive/5 px-3 py-2 text-xs text-destructive", children: [
|
|
17671
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)("span", { children: t("taskSummary.historyError") }),
|
|
17672
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(
|
|
17448
17673
|
"button",
|
|
17449
17674
|
{
|
|
17450
17675
|
type: "button",
|
|
17451
17676
|
className: "inline-flex shrink-0 items-center gap-1 font-medium hover:underline",
|
|
17452
17677
|
onClick: onRetryHistory,
|
|
17453
17678
|
children: [
|
|
17454
|
-
/* @__PURE__ */ (0,
|
|
17679
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_lucide_react31.RotateCcw, { className: "size-3" }),
|
|
17455
17680
|
t("taskSummary.retry")
|
|
17456
17681
|
]
|
|
17457
17682
|
}
|
|
17458
17683
|
)
|
|
17459
17684
|
] }),
|
|
17460
|
-
/* @__PURE__ */ (0,
|
|
17685
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(
|
|
17461
17686
|
SummarySection,
|
|
17462
17687
|
{
|
|
17463
17688
|
title: t("taskSummary.sections.outputs"),
|
|
17464
17689
|
children: [
|
|
17465
|
-
summary.outputs.length === 0 ? /* @__PURE__ */ (0,
|
|
17690
|
+
summary.outputs.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(SummaryPrompt, { onClick: onFocusComposer, children: t("taskSummary.createOutput") }) : sectionItems("outputs", summary.outputs).map((item) => /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
17466
17691
|
SummaryButton,
|
|
17467
17692
|
{
|
|
17468
17693
|
title: item.title,
|
|
17469
17694
|
description: item.description ?? item.status,
|
|
17470
|
-
leading: /* @__PURE__ */ (0,
|
|
17471
|
-
trailing: item.resource && item.resource.type !== "message" ? /* @__PURE__ */ (0,
|
|
17695
|
+
leading: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_lucide_react31.FileOutput, { className: "size-4" }),
|
|
17696
|
+
trailing: item.resource && item.resource.type !== "message" ? /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_lucide_react31.ExternalLink, { className: "size-3.5" }) : void 0,
|
|
17472
17697
|
onClick: () => openSummaryItem(item.resource, item.messageId, item.title)
|
|
17473
17698
|
},
|
|
17474
17699
|
item.id
|
|
@@ -17477,18 +17702,18 @@ function TaskSummaryContent({
|
|
|
17477
17702
|
]
|
|
17478
17703
|
}
|
|
17479
17704
|
),
|
|
17480
|
-
/* @__PURE__ */ (0,
|
|
17705
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(
|
|
17481
17706
|
SummarySection,
|
|
17482
17707
|
{
|
|
17483
17708
|
title: t("taskSummary.sections.sources"),
|
|
17484
17709
|
children: [
|
|
17485
|
-
sectionItems("sources", summary.sources).map((item) => /* @__PURE__ */ (0,
|
|
17710
|
+
sectionItems("sources", summary.sources).map((item) => /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
17486
17711
|
SummaryButton,
|
|
17487
17712
|
{
|
|
17488
17713
|
title: item.title,
|
|
17489
17714
|
description: item.description,
|
|
17490
|
-
leading: /* @__PURE__ */ (0,
|
|
17491
|
-
trailing: item.resource && item.resource.type !== "message" ? /* @__PURE__ */ (0,
|
|
17715
|
+
leading: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_lucide_react31.BookOpen, { className: "size-4" }),
|
|
17716
|
+
trailing: item.resource && item.resource.type !== "message" ? /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_lucide_react31.ExternalLink, { className: "size-3.5" }) : void 0,
|
|
17492
17717
|
onClick: () => openSummaryItem(item.resource, item.messageId, item.title)
|
|
17493
17718
|
},
|
|
17494
17719
|
item.id
|
|
@@ -17497,67 +17722,67 @@ function TaskSummaryContent({
|
|
|
17497
17722
|
]
|
|
17498
17723
|
}
|
|
17499
17724
|
),
|
|
17500
|
-
hasTask && /* @__PURE__ */ (0,
|
|
17501
|
-
summary.goal && /* @__PURE__ */ (0,
|
|
17725
|
+
hasTask && /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(SummarySection, { title: t("taskSummary.sections.task"), children: [
|
|
17726
|
+
summary.goal && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
17502
17727
|
SummaryButton,
|
|
17503
17728
|
{
|
|
17504
17729
|
title: summary.goal.objective,
|
|
17505
17730
|
description: summary.goal.status,
|
|
17506
|
-
leading: /* @__PURE__ */ (0,
|
|
17731
|
+
leading: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_lucide_react31.Target, { className: "size-4" }),
|
|
17507
17732
|
onClick: onFocusComposer
|
|
17508
17733
|
}
|
|
17509
17734
|
),
|
|
17510
|
-
summary.plan && /* @__PURE__ */ (0,
|
|
17735
|
+
summary.plan && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
17511
17736
|
SummaryButton,
|
|
17512
17737
|
{
|
|
17513
17738
|
title: summary.plan.title,
|
|
17514
17739
|
description: summary.plan.excerpt,
|
|
17515
|
-
leading: /* @__PURE__ */ (0,
|
|
17740
|
+
leading: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_lucide_react31.ListChecks, { className: "size-4" }),
|
|
17516
17741
|
onClick: () => summary.plan?.messageId ? onNavigateMessage(summary.plan.messageId) : onFocusComposer()
|
|
17517
17742
|
}
|
|
17518
17743
|
),
|
|
17519
|
-
(summary.todos?.items ?? []).slice(0, PREVIEW_SIZE).map((todo) => /* @__PURE__ */ (0,
|
|
17744
|
+
(summary.todos?.items ?? []).slice(0, PREVIEW_SIZE).map((todo) => /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
17520
17745
|
SummaryButton,
|
|
17521
17746
|
{
|
|
17522
17747
|
title: todo.content,
|
|
17523
17748
|
description: t(`taskSummary.status.${todo.status}`),
|
|
17524
|
-
leading: todo.status === "completed" ? /* @__PURE__ */ (0,
|
|
17749
|
+
leading: todo.status === "completed" ? /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_lucide_react31.CheckCircle2, { className: "size-4 text-muted-foreground" }) : /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_lucide_react31.CircleEllipsis, { className: "size-4 text-muted-foreground" }),
|
|
17525
17750
|
onClick: () => summary.todos?.messageId ? onNavigateMessage(summary.todos.messageId) : onFocusComposer()
|
|
17526
17751
|
},
|
|
17527
17752
|
todo.id
|
|
17528
17753
|
))
|
|
17529
17754
|
] }),
|
|
17530
|
-
summary.running.length > 0 && /* @__PURE__ */ (0,
|
|
17755
|
+
summary.running.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(SummarySection, { title: t("taskSummary.sections.running"), children: summary.running.slice(0, PREVIEW_SIZE).map((item) => /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
17531
17756
|
SummaryButton,
|
|
17532
17757
|
{
|
|
17533
17758
|
title: item.title,
|
|
17534
17759
|
description: item.description ?? item.status,
|
|
17535
|
-
leading: /* @__PURE__ */ (0,
|
|
17536
|
-
trailing: item.resource ? /* @__PURE__ */ (0,
|
|
17760
|
+
leading: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_lucide_react31.PlayCircle, { className: "size-4" }),
|
|
17761
|
+
trailing: item.resource ? /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_lucide_react31.ExternalLink, { className: "size-3.5" }) : void 0,
|
|
17537
17762
|
onClick: () => item.resource && onOpenResource(item.resource, void 0, item.title)
|
|
17538
17763
|
},
|
|
17539
17764
|
item.id
|
|
17540
17765
|
)) }),
|
|
17541
|
-
summary.agents.length > 0 && /* @__PURE__ */ (0,
|
|
17542
|
-
sectionItems("agents", summary.agents).map((item) => /* @__PURE__ */ (0,
|
|
17766
|
+
summary.agents.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(SummarySection, { title: t("taskSummary.sections.agents"), children: [
|
|
17767
|
+
sectionItems("agents", summary.agents).map((item) => /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
17543
17768
|
SummaryButton,
|
|
17544
17769
|
{
|
|
17545
17770
|
title: item.title,
|
|
17546
17771
|
description: [item.status, formatElapsed(item.elapsedTime)].filter(Boolean).join(" \xB7 "),
|
|
17547
|
-
leading: /* @__PURE__ */ (0,
|
|
17772
|
+
leading: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_lucide_react31.Bot, { className: "size-4" }),
|
|
17548
17773
|
onClick: () => item.messageId ? onNavigateMessage(item.messageId) : onFocusComposer()
|
|
17549
17774
|
},
|
|
17550
17775
|
item.id
|
|
17551
17776
|
)),
|
|
17552
17777
|
sectionAction("agents", summary.totals.agents)
|
|
17553
17778
|
] }),
|
|
17554
|
-
summary.pending.length > 0 && /* @__PURE__ */ (0,
|
|
17555
|
-
sectionItems("pending", summary.pending).map((item) => /* @__PURE__ */ (0,
|
|
17779
|
+
summary.pending.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(SummarySection, { title: t("taskSummary.sections.pending"), children: [
|
|
17780
|
+
sectionItems("pending", summary.pending).map((item) => /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
17556
17781
|
SummaryButton,
|
|
17557
17782
|
{
|
|
17558
17783
|
title: item.title,
|
|
17559
17784
|
description: item.description,
|
|
17560
|
-
leading: /* @__PURE__ */ (0,
|
|
17785
|
+
leading: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_lucide_react31.CircleEllipsis, { className: "size-4" }),
|
|
17561
17786
|
onClick: () => item.messageId ? onNavigateMessage(item.messageId) : onFocusComposer()
|
|
17562
17787
|
},
|
|
17563
17788
|
item.id
|
|
@@ -17570,16 +17795,16 @@ function SummarySection({
|
|
|
17570
17795
|
title,
|
|
17571
17796
|
children
|
|
17572
17797
|
}) {
|
|
17573
|
-
return /* @__PURE__ */ (0,
|
|
17574
|
-
/* @__PURE__ */ (0,
|
|
17575
|
-
/* @__PURE__ */ (0,
|
|
17798
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("section", { "aria-label": title, className: "px-4 py-3", children: [
|
|
17799
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)("div", { className: "flex min-h-7 items-center justify-between gap-3", children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("h3", { className: "text-sm font-medium text-muted-foreground", children: title }) }),
|
|
17800
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)("div", { className: "mt-1 space-y-0.5", children })
|
|
17576
17801
|
] });
|
|
17577
17802
|
}
|
|
17578
17803
|
function SummaryPrompt({
|
|
17579
17804
|
children,
|
|
17580
17805
|
onClick
|
|
17581
17806
|
}) {
|
|
17582
|
-
return /* @__PURE__ */ (0,
|
|
17807
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
17583
17808
|
"button",
|
|
17584
17809
|
{
|
|
17585
17810
|
type: "button",
|
|
@@ -17596,7 +17821,7 @@ function SummaryButton({
|
|
|
17596
17821
|
trailing,
|
|
17597
17822
|
onClick
|
|
17598
17823
|
}) {
|
|
17599
|
-
return /* @__PURE__ */ (0,
|
|
17824
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(
|
|
17600
17825
|
"button",
|
|
17601
17826
|
{
|
|
17602
17827
|
type: "button",
|
|
@@ -17608,12 +17833,12 @@ function SummaryButton({
|
|
|
17608
17833
|
!onClick && "cursor-default"
|
|
17609
17834
|
),
|
|
17610
17835
|
children: [
|
|
17611
|
-
leading && /* @__PURE__ */ (0,
|
|
17612
|
-
/* @__PURE__ */ (0,
|
|
17613
|
-
/* @__PURE__ */ (0,
|
|
17614
|
-
description && /* @__PURE__ */ (0,
|
|
17836
|
+
leading && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("span", { className: "mt-0.5 shrink-0 text-muted-foreground", children: leading }),
|
|
17837
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("span", { className: "min-w-0 flex-1", children: [
|
|
17838
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)("span", { className: "block truncate text-sm font-medium leading-5 text-foreground", children: title }),
|
|
17839
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("span", { className: "mt-0.5 block line-clamp-2 text-xs text-muted-foreground", children: description })
|
|
17615
17840
|
] }),
|
|
17616
|
-
trailing && /* @__PURE__ */ (0,
|
|
17841
|
+
trailing && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("span", { className: "mt-0.5 text-muted-foreground", children: trailing })
|
|
17617
17842
|
]
|
|
17618
17843
|
}
|
|
17619
17844
|
);
|
|
@@ -17625,7 +17850,7 @@ function formatElapsed(value) {
|
|
|
17625
17850
|
}
|
|
17626
17851
|
|
|
17627
17852
|
// src/components/chat.tsx
|
|
17628
|
-
var
|
|
17853
|
+
var import_jsx_runtime59 = require("react/jsx-runtime");
|
|
17629
17854
|
var import_meta2 = {};
|
|
17630
17855
|
var defaultApiUrl2 = import_meta2.env.VITE_XPERTAI_API_URL;
|
|
17631
17856
|
var COMPOSER_INPUT_MAX_HEIGHT = 128;
|
|
@@ -17732,8 +17957,8 @@ function ReferenceChip({
|
|
|
17732
17957
|
}) {
|
|
17733
17958
|
const metaLine = getReferenceMetaLine(reference);
|
|
17734
17959
|
const isComposer = variant === "composer";
|
|
17735
|
-
const Icon = reference.type === "quote" ?
|
|
17736
|
-
return /* @__PURE__ */ (0,
|
|
17960
|
+
const Icon = reference.type === "quote" ? import_lucide_react32.Quote : reference.type === "image" ? import_lucide_react32.ImageIcon : import_lucide_react32.FileText;
|
|
17961
|
+
return /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(
|
|
17737
17962
|
"div",
|
|
17738
17963
|
{
|
|
17739
17964
|
className: cn(
|
|
@@ -17742,7 +17967,7 @@ function ReferenceChip({
|
|
|
17742
17967
|
),
|
|
17743
17968
|
title: getReferenceTitle(reference),
|
|
17744
17969
|
children: [
|
|
17745
|
-
/* @__PURE__ */ (0,
|
|
17970
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
17746
17971
|
Icon,
|
|
17747
17972
|
{
|
|
17748
17973
|
size: isComposer ? 14 : 12,
|
|
@@ -17752,8 +17977,8 @@ function ReferenceChip({
|
|
|
17752
17977
|
)
|
|
17753
17978
|
}
|
|
17754
17979
|
),
|
|
17755
|
-
/* @__PURE__ */ (0,
|
|
17756
|
-
/* @__PURE__ */ (0,
|
|
17980
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { className: "min-w-0 flex-1", children: [
|
|
17981
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
17757
17982
|
"div",
|
|
17758
17983
|
{
|
|
17759
17984
|
className: cn(
|
|
@@ -17763,7 +17988,7 @@ function ReferenceChip({
|
|
|
17763
17988
|
children: getReferenceLabel(reference)
|
|
17764
17989
|
}
|
|
17765
17990
|
),
|
|
17766
|
-
metaLine && /* @__PURE__ */ (0,
|
|
17991
|
+
metaLine && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
17767
17992
|
"div",
|
|
17768
17993
|
{
|
|
17769
17994
|
className: cn(
|
|
@@ -17774,7 +17999,7 @@ function ReferenceChip({
|
|
|
17774
17999
|
}
|
|
17775
18000
|
)
|
|
17776
18001
|
] }),
|
|
17777
|
-
onRemove && removeLabel && /* @__PURE__ */ (0,
|
|
18002
|
+
onRemove && removeLabel && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
17778
18003
|
"button",
|
|
17779
18004
|
{
|
|
17780
18005
|
type: "button",
|
|
@@ -17785,7 +18010,7 @@ function ReferenceChip({
|
|
|
17785
18010
|
),
|
|
17786
18011
|
title: removeLabel,
|
|
17787
18012
|
"aria-label": removeLabel,
|
|
17788
|
-
children: /* @__PURE__ */ (0,
|
|
18013
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_lucide_react32.X, { size: 12 })
|
|
17789
18014
|
}
|
|
17790
18015
|
)
|
|
17791
18016
|
]
|
|
@@ -17816,7 +18041,7 @@ function Chat({
|
|
|
17816
18041
|
clientSecret: effectiveClientSecret
|
|
17817
18042
|
});
|
|
17818
18043
|
const missingConfig = Boolean(missingConfigKind);
|
|
17819
|
-
const missingConfigShortMessage =
|
|
18044
|
+
const missingConfigShortMessage = React55.useMemo(() => {
|
|
17820
18045
|
switch (missingConfigKind) {
|
|
17821
18046
|
case "apiUrl":
|
|
17822
18047
|
return t("chat.missingApiUrlShort");
|
|
@@ -17828,7 +18053,7 @@ function Chat({
|
|
|
17828
18053
|
return t("chat.missingConfigShort");
|
|
17829
18054
|
}
|
|
17830
18055
|
}, [missingConfigKind, t]);
|
|
17831
|
-
const missingConfigDetailMessage =
|
|
18056
|
+
const missingConfigDetailMessage = React55.useMemo(() => {
|
|
17832
18057
|
switch (missingConfigKind) {
|
|
17833
18058
|
case "apiUrl":
|
|
17834
18059
|
return t("chat.missingApiUrlDetail");
|
|
@@ -17840,26 +18065,26 @@ function Chat({
|
|
|
17840
18065
|
return t("chat.missingConfigDetail");
|
|
17841
18066
|
}
|
|
17842
18067
|
}, [missingConfigKind, t]);
|
|
17843
|
-
const [isHistoryLoading, setIsHistoryLoading] =
|
|
17844
|
-
const [historyError, setHistoryError] =
|
|
17845
|
-
const [assistantName, setAssistantName] =
|
|
17846
|
-
const [assistantAvatar, setAssistantAvatar] =
|
|
17847
|
-
const [threadGoal, setThreadGoal] =
|
|
17848
|
-
const [goalError, setGoalError] =
|
|
17849
|
-
const [isGoalLoading, setIsGoalLoading] =
|
|
17850
|
-
const [isGoalPanelOpen, setIsGoalPanelOpen] =
|
|
17851
|
-
const [isGoalObjectiveExpanded, setIsGoalObjectiveExpanded] =
|
|
17852
|
-
const [goalElapsedStartedAt, setGoalElapsedStartedAt] =
|
|
18068
|
+
const [isHistoryLoading, setIsHistoryLoading] = React55.useState(false);
|
|
18069
|
+
const [historyError, setHistoryError] = React55.useState(null);
|
|
18070
|
+
const [assistantName, setAssistantName] = React55.useState(null);
|
|
18071
|
+
const [assistantAvatar, setAssistantAvatar] = React55.useState(null);
|
|
18072
|
+
const [threadGoal, setThreadGoal] = React55.useState(null);
|
|
18073
|
+
const [goalError, setGoalError] = React55.useState(null);
|
|
18074
|
+
const [isGoalLoading, setIsGoalLoading] = React55.useState(false);
|
|
18075
|
+
const [isGoalPanelOpen, setIsGoalPanelOpen] = React55.useState(false);
|
|
18076
|
+
const [isGoalObjectiveExpanded, setIsGoalObjectiveExpanded] = React55.useState(false);
|
|
18077
|
+
const [goalElapsedStartedAt, setGoalElapsedStartedAt] = React55.useState(null);
|
|
17853
18078
|
const LOADING_DOTS_MIN_DURATION = 800;
|
|
17854
18079
|
const STREAMING_STATUS_REFRESH_MS = 250;
|
|
17855
|
-
const [showLoadingDots, setShowLoadingDots] =
|
|
17856
|
-
const [streamingNow, setStreamingNow] =
|
|
17857
|
-
const loadingStartTimeRef =
|
|
17858
|
-
const lastStreamOutputAtRef =
|
|
17859
|
-
|
|
18080
|
+
const [showLoadingDots, setShowLoadingDots] = React55.useState(false);
|
|
18081
|
+
const [streamingNow, setStreamingNow] = React55.useState(() => Date.now());
|
|
18082
|
+
const loadingStartTimeRef = React55.useRef(null);
|
|
18083
|
+
const lastStreamOutputAtRef = React55.useRef(null);
|
|
18084
|
+
React55.useEffect(() => {
|
|
17860
18085
|
setStream(stream);
|
|
17861
18086
|
}, [setStream, stream]);
|
|
17862
|
-
|
|
18087
|
+
React55.useEffect(() => {
|
|
17863
18088
|
if (stream.isLoading) {
|
|
17864
18089
|
if (!loadingStartTimeRef.current) {
|
|
17865
18090
|
loadingStartTimeRef.current = Date.now();
|
|
@@ -17882,7 +18107,7 @@ function Chat({
|
|
|
17882
18107
|
}
|
|
17883
18108
|
}
|
|
17884
18109
|
}, [stream.isLoading]);
|
|
17885
|
-
|
|
18110
|
+
React55.useEffect(() => {
|
|
17886
18111
|
if (!stream.isLoading) {
|
|
17887
18112
|
lastStreamOutputAtRef.current = null;
|
|
17888
18113
|
setStreamingNow(Date.now());
|
|
@@ -17892,7 +18117,7 @@ function Chat({
|
|
|
17892
18117
|
lastStreamOutputAtRef.current = now;
|
|
17893
18118
|
setStreamingNow(now);
|
|
17894
18119
|
}, [stream.messages, stream.isLoading]);
|
|
17895
|
-
|
|
18120
|
+
React55.useEffect(() => {
|
|
17896
18121
|
if (!stream.isLoading) {
|
|
17897
18122
|
return;
|
|
17898
18123
|
}
|
|
@@ -17901,7 +18126,7 @@ function Chat({
|
|
|
17901
18126
|
}, STREAMING_STATUS_REFRESH_MS);
|
|
17902
18127
|
return () => window.clearInterval(timer);
|
|
17903
18128
|
}, [stream.isLoading]);
|
|
17904
|
-
|
|
18129
|
+
React55.useEffect(() => {
|
|
17905
18130
|
if (threadGoal?.status === "active" && stream.isLoading) {
|
|
17906
18131
|
setGoalElapsedStartedAt(Date.now());
|
|
17907
18132
|
return;
|
|
@@ -17913,55 +18138,55 @@ function Chat({
|
|
|
17913
18138
|
threadGoal?.id,
|
|
17914
18139
|
threadGoal?.status
|
|
17915
18140
|
]);
|
|
17916
|
-
|
|
18141
|
+
React55.useEffect(() => {
|
|
17917
18142
|
setIsGoalObjectiveExpanded(false);
|
|
17918
18143
|
}, [threadGoal?.id]);
|
|
17919
|
-
const [composerParts, setComposerParts] =
|
|
17920
|
-
const [renderedComposerParts, setRenderedComposerParts] =
|
|
17921
|
-
const [composerDomVersion, setComposerDomVersion] =
|
|
17922
|
-
const [selectedTool, setSelectedTool] =
|
|
18144
|
+
const [composerParts, setComposerParts] = React55.useState([]);
|
|
18145
|
+
const [renderedComposerParts, setRenderedComposerParts] = React55.useState([]);
|
|
18146
|
+
const [composerDomVersion, setComposerDomVersion] = React55.useState(0);
|
|
18147
|
+
const [selectedTool, setSelectedTool] = React55.useState(
|
|
17923
18148
|
null
|
|
17924
18149
|
);
|
|
17925
|
-
const [planModeEnabled, setPlanModeEnabled] =
|
|
17926
|
-
const [petSettingsOpen, setPetSettingsOpen] =
|
|
17927
|
-
const [petLocalSettings, setPetLocalSettings] =
|
|
17928
|
-
const [attachmentState, setAttachmentState] =
|
|
18150
|
+
const [planModeEnabled, setPlanModeEnabled] = React55.useState(false);
|
|
18151
|
+
const [petSettingsOpen, setPetSettingsOpen] = React55.useState(false);
|
|
18152
|
+
const [petLocalSettings, setPetLocalSettings] = React55.useState(() => readPetLocalSettings());
|
|
18153
|
+
const [attachmentState, setAttachmentState] = React55.useState({
|
|
17929
18154
|
uploadedFiles: [],
|
|
17930
18155
|
hasUploadingFiles: false,
|
|
17931
18156
|
hasParsingFiles: false
|
|
17932
18157
|
});
|
|
17933
|
-
const [references, setReferences] =
|
|
17934
|
-
const [isUploadingReferenceImages, setIsUploadingReferenceImages] =
|
|
17935
|
-
const [quoteSelection, setQuoteSelection] =
|
|
17936
|
-
const [isAtBottom, setIsAtBottom] =
|
|
17937
|
-
const [hasUpdatesBelow, setHasUpdatesBelow] =
|
|
18158
|
+
const [references, setReferences] = React55.useState([]);
|
|
18159
|
+
const [isUploadingReferenceImages, setIsUploadingReferenceImages] = React55.useState(false);
|
|
18160
|
+
const [quoteSelection, setQuoteSelection] = React55.useState(null);
|
|
18161
|
+
const [isAtBottom, setIsAtBottom] = React55.useState(true);
|
|
18162
|
+
const [hasUpdatesBelow, setHasUpdatesBelow] = React55.useState(false);
|
|
17938
18163
|
const {
|
|
17939
18164
|
threads,
|
|
17940
18165
|
deleteThread,
|
|
17941
18166
|
refreshThreads,
|
|
17942
18167
|
isLoading: isThreadsLoading
|
|
17943
18168
|
} = useThreads();
|
|
17944
|
-
const viewportRef =
|
|
17945
|
-
const chatColumnRef =
|
|
17946
|
-
const messageNavigationAnchorsRef =
|
|
18169
|
+
const viewportRef = React55.useRef(null);
|
|
18170
|
+
const chatColumnRef = React55.useRef(null);
|
|
18171
|
+
const messageNavigationAnchorsRef = React55.useRef(
|
|
17947
18172
|
/* @__PURE__ */ new Map()
|
|
17948
18173
|
);
|
|
17949
|
-
const attachmentsRef =
|
|
17950
|
-
const composerInputRef =
|
|
17951
|
-
const slashPaletteRef =
|
|
17952
|
-
const slashPaletteOptionRefs =
|
|
18174
|
+
const attachmentsRef = React55.useRef(null);
|
|
18175
|
+
const composerInputRef = React55.useRef(null);
|
|
18176
|
+
const slashPaletteRef = React55.useRef(null);
|
|
18177
|
+
const slashPaletteOptionRefs = React55.useRef(
|
|
17953
18178
|
[]
|
|
17954
18179
|
);
|
|
17955
|
-
const composerPartsRef =
|
|
17956
|
-
const pendingComposerCaretOffsetRef =
|
|
17957
|
-
const shouldAutoScrollRef =
|
|
17958
|
-
const forceFollowRef =
|
|
17959
|
-
const previousMessageCountRef =
|
|
17960
|
-
const previousScrollTopRef =
|
|
17961
|
-
const isPrependingHistoryMessagesRef =
|
|
17962
|
-
const autoScrollFrameRef =
|
|
17963
|
-
const isPointerDownRef =
|
|
17964
|
-
const lastTouchYRef =
|
|
18180
|
+
const composerPartsRef = React55.useRef([]);
|
|
18181
|
+
const pendingComposerCaretOffsetRef = React55.useRef(null);
|
|
18182
|
+
const shouldAutoScrollRef = React55.useRef(true);
|
|
18183
|
+
const forceFollowRef = React55.useRef(false);
|
|
18184
|
+
const previousMessageCountRef = React55.useRef(0);
|
|
18185
|
+
const previousScrollTopRef = React55.useRef(0);
|
|
18186
|
+
const isPrependingHistoryMessagesRef = React55.useRef(false);
|
|
18187
|
+
const autoScrollFrameRef = React55.useRef(null);
|
|
18188
|
+
const isPointerDownRef = React55.useRef(false);
|
|
18189
|
+
const lastTouchYRef = React55.useRef(null);
|
|
17965
18190
|
const {
|
|
17966
18191
|
runtimeCapabilities,
|
|
17967
18192
|
runtimeCapabilitiesReady,
|
|
@@ -17990,24 +18215,24 @@ function Chat({
|
|
|
17990
18215
|
const resolvedPlaceholder = placeholder ?? t("chat.placeholder");
|
|
17991
18216
|
const assistantTitle = assistantName || resolvedTitle;
|
|
17992
18217
|
const petRequired = options?.displayMode === "pet";
|
|
17993
|
-
const basePetSettings =
|
|
18218
|
+
const basePetSettings = React55.useMemo(
|
|
17994
18219
|
() => derivePetLocalSettings(options?.pet),
|
|
17995
18220
|
[options?.pet]
|
|
17996
18221
|
);
|
|
17997
|
-
const displayedPetSettings =
|
|
18222
|
+
const displayedPetSettings = React55.useMemo(
|
|
17998
18223
|
() => ({
|
|
17999
18224
|
...petLocalSettings ?? basePetSettings,
|
|
18000
18225
|
...petRequired ? { enabled: true } : {}
|
|
18001
18226
|
}),
|
|
18002
18227
|
[basePetSettings, petLocalSettings, petRequired]
|
|
18003
18228
|
);
|
|
18004
|
-
const effectivePet =
|
|
18229
|
+
const effectivePet = React55.useMemo(() => {
|
|
18005
18230
|
if (petRequired || petLocalSettings) {
|
|
18006
18231
|
return buildPetOptionsFromLocalSettings(displayedPetSettings);
|
|
18007
18232
|
}
|
|
18008
18233
|
return options?.pet ?? null;
|
|
18009
18234
|
}, [displayedPetSettings, options?.pet, petLocalSettings, petRequired]);
|
|
18010
|
-
const savePetLocalSettings =
|
|
18235
|
+
const savePetLocalSettings = React55.useCallback(
|
|
18011
18236
|
(settings) => {
|
|
18012
18237
|
const nextSettings = petRequired ? { ...settings, enabled: true } : settings;
|
|
18013
18238
|
setPetLocalSettings(nextSettings);
|
|
@@ -18015,7 +18240,7 @@ function Chat({
|
|
|
18015
18240
|
},
|
|
18016
18241
|
[petRequired]
|
|
18017
18242
|
);
|
|
18018
|
-
const handlePetCommand =
|
|
18243
|
+
const handlePetCommand = React55.useCallback(
|
|
18019
18244
|
(mode) => {
|
|
18020
18245
|
if (mode === "settings") {
|
|
18021
18246
|
setPetSettingsOpen(true);
|
|
@@ -18037,11 +18262,11 @@ function Chat({
|
|
|
18037
18262
|
[displayedPetSettings, effectivePet, petRequired, savePetLocalSettings]
|
|
18038
18263
|
);
|
|
18039
18264
|
const inputPlaceholder = selectedTool?.placeholderOverride ?? composer?.placeholder ?? resolvedPlaceholder;
|
|
18040
|
-
const messages =
|
|
18265
|
+
const messages = React55.useMemo(
|
|
18041
18266
|
() => stream.messages ?? [],
|
|
18042
18267
|
[stream.messages]
|
|
18043
18268
|
);
|
|
18044
|
-
const messageNavigationLabels =
|
|
18269
|
+
const messageNavigationLabels = React55.useMemo(
|
|
18045
18270
|
() => ({
|
|
18046
18271
|
user: t("chat.youLabel"),
|
|
18047
18272
|
assistant: assistantTitle,
|
|
@@ -18060,7 +18285,7 @@ function Chat({
|
|
|
18060
18285
|
}),
|
|
18061
18286
|
[assistantTitle, t]
|
|
18062
18287
|
);
|
|
18063
|
-
const messageNavigationItems =
|
|
18288
|
+
const messageNavigationItems = React55.useMemo(
|
|
18064
18289
|
() => messageNavigationEnabled ? buildMessageNavigationItems(
|
|
18065
18290
|
messages,
|
|
18066
18291
|
{
|
|
@@ -18083,7 +18308,7 @@ function Chat({
|
|
|
18083
18308
|
historyMessagePagination?.isLoadingMore
|
|
18084
18309
|
);
|
|
18085
18310
|
const canLoadMoreMessages = Boolean(historyMessagePagination?.hasMore);
|
|
18086
|
-
const draft =
|
|
18311
|
+
const draft = React55.useMemo(
|
|
18087
18312
|
() => getComposerPlainText(composerParts),
|
|
18088
18313
|
[composerParts]
|
|
18089
18314
|
);
|
|
@@ -18097,7 +18322,7 @@ function Chat({
|
|
|
18097
18322
|
isEmpty: isComposerInputEmpty,
|
|
18098
18323
|
isStacked: isComposerStacked
|
|
18099
18324
|
});
|
|
18100
|
-
const pendingFollowUps =
|
|
18325
|
+
const pendingFollowUps = React55.useMemo(
|
|
18101
18326
|
() => sortVisiblePendingFollowUps(stream.pendingFollowUps ?? []),
|
|
18102
18327
|
[stream.pendingFollowUps]
|
|
18103
18328
|
);
|
|
@@ -18106,7 +18331,7 @@ function Chat({
|
|
|
18106
18331
|
const hasPendingHITLRequest = Boolean(stream.pendingHITLRequest);
|
|
18107
18332
|
const hasPendingInteractiveRequest = hasPendingRequestUserInput || hasPendingHITLRequest;
|
|
18108
18333
|
const hasPendingTodos = Boolean(stream.todos?.items.length);
|
|
18109
|
-
const goalAdapter =
|
|
18334
|
+
const goalAdapter = React55.useMemo(() => {
|
|
18110
18335
|
if (isGoalAdapter(options?.goal)) {
|
|
18111
18336
|
return options.goal;
|
|
18112
18337
|
}
|
|
@@ -18119,10 +18344,10 @@ function Chat({
|
|
|
18119
18344
|
"goal"
|
|
18120
18345
|
);
|
|
18121
18346
|
const showGoalStatus = goalCommandAvailable && !hasCompletedGoal && (Boolean(goalError) || threadGoal?.status === "active" && stream.isLoading);
|
|
18122
|
-
const clearQuoteSelection =
|
|
18347
|
+
const clearQuoteSelection = React55.useCallback(() => {
|
|
18123
18348
|
setQuoteSelection(null);
|
|
18124
18349
|
}, []);
|
|
18125
|
-
const commitComposerParts =
|
|
18350
|
+
const commitComposerParts = React55.useCallback(
|
|
18126
18351
|
(nextParts, options2) => {
|
|
18127
18352
|
const normalized = normalizeComposerParts(nextParts);
|
|
18128
18353
|
const previous = composerPartsRef.current;
|
|
@@ -18152,7 +18377,7 @@ function Chat({
|
|
|
18152
18377
|
},
|
|
18153
18378
|
[setRunRuntimeCapabilities]
|
|
18154
18379
|
);
|
|
18155
|
-
const setComposerText =
|
|
18380
|
+
const setComposerText = React55.useCallback(
|
|
18156
18381
|
(text, caretOffset = text.length) => {
|
|
18157
18382
|
commitComposerParts(createComposerTextParts(text), {
|
|
18158
18383
|
caretOffset,
|
|
@@ -18162,7 +18387,7 @@ function Chat({
|
|
|
18162
18387
|
},
|
|
18163
18388
|
[commitComposerParts]
|
|
18164
18389
|
);
|
|
18165
|
-
const focusComposerAt =
|
|
18390
|
+
const focusComposerAt = React55.useCallback((position) => {
|
|
18166
18391
|
const nextPosition = position ?? getComposerEditingLength(composerPartsRef.current);
|
|
18167
18392
|
pendingComposerCaretOffsetRef.current = nextPosition;
|
|
18168
18393
|
requestAnimationFrame(() => {
|
|
@@ -18191,7 +18416,7 @@ function Chat({
|
|
|
18191
18416
|
focusComposerAt
|
|
18192
18417
|
});
|
|
18193
18418
|
const parentMessenger = useParentMessenger({
|
|
18194
|
-
onSetComposerValue:
|
|
18419
|
+
onSetComposerValue: React55.useCallback(
|
|
18195
18420
|
(payload) => {
|
|
18196
18421
|
if (!payload) {
|
|
18197
18422
|
return;
|
|
@@ -18219,16 +18444,16 @@ function Chat({
|
|
|
18219
18444
|
},
|
|
18220
18445
|
[applyComposerValueRuntimeCapabilities, composer?.tools, setComposerText]
|
|
18221
18446
|
),
|
|
18222
|
-
onSetRuntimeCapabilities:
|
|
18447
|
+
onSetRuntimeCapabilities: React55.useCallback(
|
|
18223
18448
|
(selection) => {
|
|
18224
18449
|
applyExternalRuntimeCapabilities(selection);
|
|
18225
18450
|
},
|
|
18226
18451
|
[applyExternalRuntimeCapabilities]
|
|
18227
18452
|
),
|
|
18228
|
-
onFocusComposer:
|
|
18453
|
+
onFocusComposer: React55.useCallback(() => {
|
|
18229
18454
|
composerInputRef.current?.focus();
|
|
18230
18455
|
}, []),
|
|
18231
|
-
onSetPetEnabled:
|
|
18456
|
+
onSetPetEnabled: React55.useCallback(
|
|
18232
18457
|
(enabled) => {
|
|
18233
18458
|
if (petRequired) {
|
|
18234
18459
|
return;
|
|
@@ -18242,10 +18467,10 @@ function Chat({
|
|
|
18242
18467
|
)
|
|
18243
18468
|
});
|
|
18244
18469
|
const canMinimizeToPet = parentMessenger?.isParentAvailable === true && isPetEnabled(effectivePet);
|
|
18245
|
-
const handleMinimizeToPet =
|
|
18470
|
+
const handleMinimizeToPet = React55.useCallback(() => {
|
|
18246
18471
|
parentMessenger?.sendEvent("chat_minimize_change", { minimized: true });
|
|
18247
18472
|
}, [parentMessenger]);
|
|
18248
|
-
const syncQuoteSelection =
|
|
18473
|
+
const syncQuoteSelection = React55.useCallback(() => {
|
|
18249
18474
|
if (typeof window === "undefined") {
|
|
18250
18475
|
clearQuoteSelection();
|
|
18251
18476
|
return;
|
|
@@ -18290,23 +18515,23 @@ function Chat({
|
|
|
18290
18515
|
left
|
|
18291
18516
|
});
|
|
18292
18517
|
}, [clearQuoteSelection]);
|
|
18293
|
-
const cancelPendingAutoScroll =
|
|
18518
|
+
const cancelPendingAutoScroll = React55.useCallback(() => {
|
|
18294
18519
|
if (autoScrollFrameRef.current !== null) {
|
|
18295
18520
|
cancelAnimationFrame(autoScrollFrameRef.current);
|
|
18296
18521
|
autoScrollFrameRef.current = null;
|
|
18297
18522
|
}
|
|
18298
18523
|
}, []);
|
|
18299
|
-
const disableAutoFollow =
|
|
18524
|
+
const disableAutoFollow = React55.useCallback(() => {
|
|
18300
18525
|
forceFollowRef.current = false;
|
|
18301
18526
|
shouldAutoScrollRef.current = false;
|
|
18302
18527
|
cancelPendingAutoScroll();
|
|
18303
18528
|
}, [cancelPendingAutoScroll]);
|
|
18304
|
-
const enableAutoFollow =
|
|
18529
|
+
const enableAutoFollow = React55.useCallback(() => {
|
|
18305
18530
|
forceFollowRef.current = true;
|
|
18306
18531
|
shouldAutoScrollRef.current = true;
|
|
18307
18532
|
setHasUpdatesBelow(false);
|
|
18308
18533
|
}, []);
|
|
18309
|
-
const scrollToBottom =
|
|
18534
|
+
const scrollToBottom = React55.useCallback(
|
|
18310
18535
|
(smooth = false, force = false) => {
|
|
18311
18536
|
if (force) {
|
|
18312
18537
|
enableAutoFollow();
|
|
@@ -18333,7 +18558,7 @@ function Chat({
|
|
|
18333
18558
|
},
|
|
18334
18559
|
[cancelPendingAutoScroll, enableAutoFollow]
|
|
18335
18560
|
);
|
|
18336
|
-
const setMessageNavigationAnchor =
|
|
18561
|
+
const setMessageNavigationAnchor = React55.useCallback(
|
|
18337
18562
|
(id, node) => {
|
|
18338
18563
|
if (node) {
|
|
18339
18564
|
messageNavigationAnchorsRef.current.set(id, node);
|
|
@@ -18343,22 +18568,22 @@ function Chat({
|
|
|
18343
18568
|
},
|
|
18344
18569
|
[]
|
|
18345
18570
|
);
|
|
18346
|
-
const getMessageNavigationAnchor =
|
|
18571
|
+
const getMessageNavigationAnchor = React55.useCallback(
|
|
18347
18572
|
(item) => messageNavigationAnchorsRef.current.get(item.id) ?? null,
|
|
18348
18573
|
[]
|
|
18349
18574
|
);
|
|
18350
|
-
const handleMessageNavigationNavigate =
|
|
18575
|
+
const handleMessageNavigationNavigate = React55.useCallback(() => {
|
|
18351
18576
|
disableAutoFollow();
|
|
18352
18577
|
clearQuoteSelection();
|
|
18353
18578
|
}, [clearQuoteSelection, disableAutoFollow]);
|
|
18354
18579
|
const taskSummaryEnabled = options?.taskSummary?.enabled === true;
|
|
18355
18580
|
const taskSummaryConversationId = stream.conversationId ?? null;
|
|
18356
|
-
const [taskSummaryDocked, setTaskSummaryDocked] =
|
|
18357
|
-
const [taskSummaryOpen, setTaskSummaryOpen] =
|
|
18358
|
-
const manuallyClosedTaskSummaryConversationIdsRef =
|
|
18581
|
+
const [taskSummaryDocked, setTaskSummaryDocked] = React55.useState(false);
|
|
18582
|
+
const [taskSummaryOpen, setTaskSummaryOpen] = React55.useState(false);
|
|
18583
|
+
const manuallyClosedTaskSummaryConversationIdsRef = React55.useRef(
|
|
18359
18584
|
/* @__PURE__ */ new Set()
|
|
18360
18585
|
);
|
|
18361
|
-
const liveTaskSummaryPending =
|
|
18586
|
+
const liveTaskSummaryPending = React55.useMemo(() => {
|
|
18362
18587
|
const followUps = pendingFollowUps.map((item) => ({
|
|
18363
18588
|
id: `follow-up:${item.id}`,
|
|
18364
18589
|
kind: "follow_up",
|
|
@@ -18393,7 +18618,7 @@ function Chat({
|
|
|
18393
18618
|
stream.pendingRequestUserInput,
|
|
18394
18619
|
t
|
|
18395
18620
|
]);
|
|
18396
|
-
const liveTaskSummaryRunning =
|
|
18621
|
+
const liveTaskSummaryRunning = React55.useMemo(
|
|
18397
18622
|
() => stream.runtimeActivities.sandboxServices.services.filter(
|
|
18398
18623
|
(service) => service.status === "starting" || service.status === "running" || service.status === "stopping"
|
|
18399
18624
|
).map((service) => ({
|
|
@@ -18410,7 +18635,7 @@ function Chat({
|
|
|
18410
18635
|
})),
|
|
18411
18636
|
[stream.runtimeActivities.sandboxServices.services]
|
|
18412
18637
|
);
|
|
18413
|
-
const taskSummaryAgentNames =
|
|
18638
|
+
const taskSummaryAgentNames = React55.useMemo(() => {
|
|
18414
18639
|
const names = /* @__PURE__ */ new Map();
|
|
18415
18640
|
runtimeCapabilityOptions.forEach((option) => {
|
|
18416
18641
|
if (option.type !== "subAgent") return;
|
|
@@ -18422,7 +18647,7 @@ function Chat({
|
|
|
18422
18647
|
});
|
|
18423
18648
|
return names;
|
|
18424
18649
|
}, [runtimeCapabilityOptions]);
|
|
18425
|
-
const liveTaskSummary =
|
|
18650
|
+
const liveTaskSummary = React55.useMemo(
|
|
18426
18651
|
() => collectLiveTaskSummary({
|
|
18427
18652
|
messages: messages.map(
|
|
18428
18653
|
(message) => ({
|
|
@@ -18459,7 +18684,7 @@ function Chat({
|
|
|
18459
18684
|
client: stream.client,
|
|
18460
18685
|
live: liveTaskSummary
|
|
18461
18686
|
});
|
|
18462
|
-
const navigateToTaskSummaryMessage =
|
|
18687
|
+
const navigateToTaskSummaryMessage = React55.useCallback(
|
|
18463
18688
|
async (messageId) => {
|
|
18464
18689
|
try {
|
|
18465
18690
|
let anchor = messageNavigationAnchorsRef.current.get(messageId);
|
|
@@ -18483,7 +18708,7 @@ function Chat({
|
|
|
18483
18708
|
},
|
|
18484
18709
|
[clearQuoteSelection, disableAutoFollow, stream]
|
|
18485
18710
|
);
|
|
18486
|
-
const openTaskSummaryResource =
|
|
18711
|
+
const openTaskSummaryResource = React55.useCallback(
|
|
18487
18712
|
(resource, messageId, resourceTitle) => {
|
|
18488
18713
|
const data = {
|
|
18489
18714
|
resource,
|
|
@@ -18501,7 +18726,7 @@ function Chat({
|
|
|
18501
18726
|
},
|
|
18502
18727
|
[parentMessenger, taskSummaryConversationId]
|
|
18503
18728
|
);
|
|
18504
|
-
|
|
18729
|
+
React55.useEffect(() => {
|
|
18505
18730
|
const viewport = viewportRef.current;
|
|
18506
18731
|
if (!viewport) return;
|
|
18507
18732
|
previousScrollTopRef.current = viewport.scrollTop;
|
|
@@ -18582,14 +18807,14 @@ function Chat({
|
|
|
18582
18807
|
window.removeEventListener("pointercancel", stopPointerTracking);
|
|
18583
18808
|
};
|
|
18584
18809
|
}, [cancelPendingAutoScroll, disableAutoFollow]);
|
|
18585
|
-
|
|
18810
|
+
React55.useEffect(() => {
|
|
18586
18811
|
shouldAutoScrollRef.current = true;
|
|
18587
18812
|
forceFollowRef.current = false;
|
|
18588
18813
|
previousScrollTopRef.current = 0;
|
|
18589
18814
|
setIsAtBottom(true);
|
|
18590
18815
|
setHasUpdatesBelow(false);
|
|
18591
18816
|
}, [stream.threadId]);
|
|
18592
|
-
|
|
18817
|
+
React55.useEffect(() => {
|
|
18593
18818
|
const messageCountChanged = messages.length !== previousMessageCountRef.current;
|
|
18594
18819
|
previousMessageCountRef.current = messages.length;
|
|
18595
18820
|
if (isPrependingHistoryMessagesRef.current) {
|
|
@@ -18611,7 +18836,7 @@ function Chat({
|
|
|
18611
18836
|
const isSubmissionBlocked = hasPendingInteractiveRequest || missingConfig || isHistoryLoading || hasUploadingFiles || isUploadingReferenceImages;
|
|
18612
18837
|
const isSendDisabled = !trimmedDraft && !hasReferences || isSubmissionBlocked;
|
|
18613
18838
|
const isPromptEditDisabled = hasPendingInteractiveRequest || missingConfig || isHistoryLoading;
|
|
18614
|
-
const resizeComposerInput =
|
|
18839
|
+
const resizeComposerInput = React55.useCallback(() => {
|
|
18615
18840
|
const input = composerInputRef.current;
|
|
18616
18841
|
if (!input) {
|
|
18617
18842
|
return;
|
|
@@ -18619,7 +18844,7 @@ function Chat({
|
|
|
18619
18844
|
input.style.maxHeight = `${COMPOSER_INPUT_MAX_HEIGHT}px`;
|
|
18620
18845
|
input.style.overflowY = input.scrollHeight > COMPOSER_INPUT_MAX_HEIGHT ? "auto" : "hidden";
|
|
18621
18846
|
}, []);
|
|
18622
|
-
|
|
18847
|
+
React55.useLayoutEffect(() => {
|
|
18623
18848
|
composerPartsRef.current = composerParts;
|
|
18624
18849
|
resizeComposerInput();
|
|
18625
18850
|
const caretOffset = pendingComposerCaretOffsetRef.current;
|
|
@@ -18631,13 +18856,13 @@ function Chat({
|
|
|
18631
18856
|
}
|
|
18632
18857
|
}
|
|
18633
18858
|
}, [composerDomVersion, composerParts, resizeComposerInput]);
|
|
18634
|
-
|
|
18859
|
+
React55.useEffect(() => {
|
|
18635
18860
|
document.addEventListener("selectionchange", syncQuoteSelection);
|
|
18636
18861
|
return () => {
|
|
18637
18862
|
document.removeEventListener("selectionchange", syncQuoteSelection);
|
|
18638
18863
|
};
|
|
18639
18864
|
}, [syncQuoteSelection]);
|
|
18640
|
-
|
|
18865
|
+
React55.useEffect(() => {
|
|
18641
18866
|
const viewport = viewportRef.current;
|
|
18642
18867
|
if (!viewport) {
|
|
18643
18868
|
return;
|
|
@@ -18654,14 +18879,14 @@ function Chat({
|
|
|
18654
18879
|
window.removeEventListener("resize", handleViewportScroll);
|
|
18655
18880
|
};
|
|
18656
18881
|
}, [clearQuoteSelection]);
|
|
18657
|
-
|
|
18882
|
+
React55.useEffect(() => {
|
|
18658
18883
|
clearQuoteSelection();
|
|
18659
18884
|
}, [messages.length, stream.threadId, clearQuoteSelection]);
|
|
18660
|
-
|
|
18885
|
+
React55.useEffect(() => {
|
|
18661
18886
|
if (missingConfig) return;
|
|
18662
18887
|
void refreshThreads();
|
|
18663
18888
|
}, [missingConfig, refreshThreads]);
|
|
18664
|
-
|
|
18889
|
+
React55.useEffect(() => {
|
|
18665
18890
|
if (missingConfig || !stream.client || !stream.assistantId) {
|
|
18666
18891
|
setAssistantName(null);
|
|
18667
18892
|
setAssistantAvatar(null);
|
|
@@ -18684,10 +18909,10 @@ function Chat({
|
|
|
18684
18909
|
cancelled = true;
|
|
18685
18910
|
};
|
|
18686
18911
|
}, [missingConfig, stream.client, stream.assistantId]);
|
|
18687
|
-
|
|
18912
|
+
React55.useEffect(() => {
|
|
18688
18913
|
setThreadGoal(stream.threadGoal);
|
|
18689
18914
|
}, [stream.threadGoal]);
|
|
18690
|
-
|
|
18915
|
+
React55.useEffect(() => {
|
|
18691
18916
|
const threadId = stream.threadId?.trim();
|
|
18692
18917
|
if (!threadId || !goalCommandAvailable) {
|
|
18693
18918
|
setThreadGoal(null);
|
|
@@ -18728,7 +18953,7 @@ function Chat({
|
|
|
18728
18953
|
return () => controller.abort();
|
|
18729
18954
|
}, [goalAdapter, goalCommandAvailable, stream.threadId]);
|
|
18730
18955
|
const uploadedFiles = attachmentState.uploadedFiles;
|
|
18731
|
-
const syncComposerInputFromElement =
|
|
18956
|
+
const syncComposerInputFromElement = React55.useCallback(
|
|
18732
18957
|
(input) => {
|
|
18733
18958
|
const previousCapabilities = getComposerCapabilityPartMap(
|
|
18734
18959
|
composerPartsRef.current
|
|
@@ -18746,25 +18971,25 @@ function Chat({
|
|
|
18746
18971
|
},
|
|
18747
18972
|
[commitComposerParts, updateRuntimeCapabilityPalette]
|
|
18748
18973
|
);
|
|
18749
|
-
const handleComposerInput =
|
|
18974
|
+
const handleComposerInput = React55.useCallback(
|
|
18750
18975
|
(event) => {
|
|
18751
18976
|
syncComposerInputFromElement(event.currentTarget);
|
|
18752
18977
|
},
|
|
18753
18978
|
[syncComposerInputFromElement]
|
|
18754
18979
|
);
|
|
18755
|
-
const handleComposerCompositionEnd =
|
|
18980
|
+
const handleComposerCompositionEnd = React55.useCallback(
|
|
18756
18981
|
(event) => {
|
|
18757
18982
|
syncComposerInputFromElement(event.currentTarget);
|
|
18758
18983
|
},
|
|
18759
18984
|
[syncComposerInputFromElement]
|
|
18760
18985
|
);
|
|
18761
|
-
const handleComposerSelect =
|
|
18986
|
+
const handleComposerSelect = React55.useCallback(() => {
|
|
18762
18987
|
updateRuntimeCapabilityPalette(
|
|
18763
18988
|
composerPartsRef.current,
|
|
18764
18989
|
composerInputRef.current ? getComposerSelectionOffset(composerInputRef.current) : void 0
|
|
18765
18990
|
);
|
|
18766
18991
|
}, [updateRuntimeCapabilityPalette]);
|
|
18767
|
-
const submitDraft =
|
|
18992
|
+
const submitDraft = React55.useCallback(
|
|
18768
18993
|
(submitOptions = {}) => {
|
|
18769
18994
|
if (isSubmissionBlocked) return;
|
|
18770
18995
|
const contentToSubmit = (submitOptions.inputText ?? trimmedDraft).trim();
|
|
@@ -18870,7 +19095,7 @@ function Chat({
|
|
|
18870
19095
|
t
|
|
18871
19096
|
]
|
|
18872
19097
|
);
|
|
18873
|
-
const handleGoalCommand =
|
|
19098
|
+
const handleGoalCommand = React55.useCallback(
|
|
18874
19099
|
async ({
|
|
18875
19100
|
args,
|
|
18876
19101
|
commandSource,
|
|
@@ -18976,7 +19201,7 @@ function Chat({
|
|
|
18976
19201
|
t
|
|
18977
19202
|
]
|
|
18978
19203
|
);
|
|
18979
|
-
const handleGoalPanelOpenChange =
|
|
19204
|
+
const handleGoalPanelOpenChange = React55.useCallback((open) => {
|
|
18980
19205
|
setIsGoalPanelOpen(open);
|
|
18981
19206
|
}, []);
|
|
18982
19207
|
const {
|
|
@@ -19020,7 +19245,7 @@ function Chat({
|
|
|
19020
19245
|
plugin: t("composer.slashCommands.empty.loadingCapabilities"),
|
|
19021
19246
|
subAgent: t("composer.slashCommands.empty.loadingCapabilities")
|
|
19022
19247
|
};
|
|
19023
|
-
|
|
19248
|
+
React55.useEffect(() => {
|
|
19024
19249
|
if (!runtimeCapabilityPalette) {
|
|
19025
19250
|
return;
|
|
19026
19251
|
}
|
|
@@ -19039,7 +19264,7 @@ function Chat({
|
|
|
19039
19264
|
);
|
|
19040
19265
|
}
|
|
19041
19266
|
}, [slashPaletteOptions.length, runtimeCapabilityPalette]);
|
|
19042
|
-
|
|
19267
|
+
React55.useLayoutEffect(() => {
|
|
19043
19268
|
if (!runtimeCapabilityPalette) {
|
|
19044
19269
|
return;
|
|
19045
19270
|
}
|
|
@@ -19056,7 +19281,7 @@ function Chat({
|
|
|
19056
19281
|
container.scrollTop += optionRect.bottom - containerRect.bottom;
|
|
19057
19282
|
}
|
|
19058
19283
|
}, [runtimeCapabilityPalette, slashPaletteOptions.length]);
|
|
19059
|
-
const submitGoalModeDraft =
|
|
19284
|
+
const submitGoalModeDraft = React55.useCallback(() => {
|
|
19060
19285
|
const objective = getComposerPlainText(composerPartsRef.current).trim();
|
|
19061
19286
|
if (!isGoalModeOpen || !goalCommandAvailable || !objective) {
|
|
19062
19287
|
return false;
|
|
@@ -19094,7 +19319,7 @@ function Chat({
|
|
|
19094
19319
|
}
|
|
19095
19320
|
submitDraft();
|
|
19096
19321
|
};
|
|
19097
|
-
const handleEditPendingFollowUp =
|
|
19322
|
+
const handleEditPendingFollowUp = React55.useCallback(
|
|
19098
19323
|
(id) => {
|
|
19099
19324
|
const item = pendingFollowUps.find(
|
|
19100
19325
|
(entry) => entry.id === id && entry.mode === "queue"
|
|
@@ -19121,7 +19346,7 @@ function Chat({
|
|
|
19121
19346
|
},
|
|
19122
19347
|
[pendingFollowUps, setComposerText, stream]
|
|
19123
19348
|
);
|
|
19124
|
-
const handleQuoteSelection =
|
|
19349
|
+
const handleQuoteSelection = React55.useCallback(() => {
|
|
19125
19350
|
if (!quoteSelection) {
|
|
19126
19351
|
return;
|
|
19127
19352
|
}
|
|
@@ -19137,7 +19362,7 @@ function Chat({
|
|
|
19137
19362
|
const handleAttachmentClick = () => {
|
|
19138
19363
|
attachmentsRef.current?.openFilePicker();
|
|
19139
19364
|
};
|
|
19140
|
-
const uploadContextFile =
|
|
19365
|
+
const uploadContextFile = React55.useCallback(
|
|
19141
19366
|
(file) => {
|
|
19142
19367
|
const formData = new FormData();
|
|
19143
19368
|
formData.append("file", file, file.name || "upload");
|
|
@@ -19156,13 +19381,13 @@ function Chat({
|
|
|
19156
19381
|
},
|
|
19157
19382
|
[stream.assistantId, stream.client, stream.threadId]
|
|
19158
19383
|
);
|
|
19159
|
-
const getContextFileStatus =
|
|
19384
|
+
const getContextFileStatus = React55.useCallback(
|
|
19160
19385
|
(fileId) => stream.client.contexts.fetch(`/files/${fileId}/status`, {
|
|
19161
19386
|
method: "GET"
|
|
19162
19387
|
}),
|
|
19163
19388
|
[stream.client]
|
|
19164
19389
|
);
|
|
19165
|
-
const deleteContextFile =
|
|
19390
|
+
const deleteContextFile = React55.useCallback(
|
|
19166
19391
|
(storageFileId) => stream.client.contexts.deleteFile(storageFileId),
|
|
19167
19392
|
[stream.client]
|
|
19168
19393
|
);
|
|
@@ -19270,7 +19495,7 @@ function Chat({
|
|
|
19270
19495
|
}
|
|
19271
19496
|
submitDraft();
|
|
19272
19497
|
};
|
|
19273
|
-
const handleComposerPaste =
|
|
19498
|
+
const handleComposerPaste = React55.useCallback(
|
|
19274
19499
|
(event) => {
|
|
19275
19500
|
const clipboardData = event.clipboardData;
|
|
19276
19501
|
if (!clipboardData) {
|
|
@@ -19372,13 +19597,13 @@ function Chat({
|
|
|
19372
19597
|
const handleToolSelect = (tool) => {
|
|
19373
19598
|
setSelectedTool((prev) => prev?.id === tool.id ? null : tool);
|
|
19374
19599
|
};
|
|
19375
|
-
const handlePromptClick =
|
|
19600
|
+
const handlePromptClick = React55.useCallback(
|
|
19376
19601
|
(prompt) => {
|
|
19377
19602
|
submitDraft({ inputText: prompt, displayText: prompt });
|
|
19378
19603
|
},
|
|
19379
19604
|
[submitDraft]
|
|
19380
19605
|
);
|
|
19381
|
-
const handlePromptEdit =
|
|
19606
|
+
const handlePromptEdit = React55.useCallback(
|
|
19382
19607
|
(prompt) => {
|
|
19383
19608
|
if (isPromptEditDisabled) return;
|
|
19384
19609
|
setComposerText(prompt, prompt.length);
|
|
@@ -19387,7 +19612,7 @@ function Chat({
|
|
|
19387
19612
|
},
|
|
19388
19613
|
[focusComposerAt, isPromptEditDisabled, setComposerText]
|
|
19389
19614
|
);
|
|
19390
|
-
const loadConversationMessages =
|
|
19615
|
+
const loadConversationMessages = React55.useCallback(
|
|
19391
19616
|
async (recordId) => {
|
|
19392
19617
|
if (missingConfig) {
|
|
19393
19618
|
setHistoryError(missingConfigShortMessage);
|
|
@@ -19408,7 +19633,7 @@ function Chat({
|
|
|
19408
19633
|
},
|
|
19409
19634
|
[missingConfig, missingConfigShortMessage, stream, t]
|
|
19410
19635
|
);
|
|
19411
|
-
const handleLoadMoreMessages =
|
|
19636
|
+
const handleLoadMoreMessages = React55.useCallback(async () => {
|
|
19412
19637
|
if (!canLoadMoreMessages || isLoadingMoreMessages) {
|
|
19413
19638
|
return;
|
|
19414
19639
|
}
|
|
@@ -19517,19 +19742,19 @@ function Chat({
|
|
|
19517
19742
|
};
|
|
19518
19743
|
const acceptMimes = composer?.attachments?.accept ? Object.entries(composer.attachments.accept).map(([mime, exts]) => [mime, ...exts.map((e) => `.${e}`)].join(",")).join(",") : void 0;
|
|
19519
19744
|
const canUploadDroppedFiles = composer?.attachments?.enabled === true && !missingConfig && !isHistoryLoading && !hasPendingInteractiveRequest;
|
|
19520
|
-
const handleDroppedFiles =
|
|
19745
|
+
const handleDroppedFiles = React55.useCallback((files) => {
|
|
19521
19746
|
return attachmentsRef.current?.queueFiles(files) ?? false;
|
|
19522
19747
|
}, []);
|
|
19523
|
-
const currentThread =
|
|
19748
|
+
const currentThread = React55.useMemo(
|
|
19524
19749
|
() => threads.find((item) => item.id === stream.threadId),
|
|
19525
19750
|
[threads, stream.threadId]
|
|
19526
19751
|
);
|
|
19527
|
-
const assistantStatusText =
|
|
19752
|
+
const assistantStatusText = React55.useMemo(() => {
|
|
19528
19753
|
if (!stream.threadId) return t("chat.statusOnline");
|
|
19529
19754
|
return currentThread?.title?.trim() || t("chat.statusOnline");
|
|
19530
19755
|
}, [currentThread?.title, stream.threadId, t]);
|
|
19531
19756
|
const streamErrorMessage = stream.error instanceof Error ? stream.error.message : void 0;
|
|
19532
|
-
const threadErrorMessage =
|
|
19757
|
+
const threadErrorMessage = React55.useMemo(() => {
|
|
19533
19758
|
if (streamErrorMessage?.trim()) return streamErrorMessage.trim();
|
|
19534
19759
|
if (currentThread?.status !== "error") return void 0;
|
|
19535
19760
|
const message = currentThread.error?.trim();
|
|
@@ -19560,13 +19785,13 @@ function Chat({
|
|
|
19560
19785
|
fallbackTitle: t("history.threadFallback")
|
|
19561
19786
|
});
|
|
19562
19787
|
const layoutMaxWidth = options?.layout?.maxWidth;
|
|
19563
|
-
const chatColumnStyle =
|
|
19788
|
+
const chatColumnStyle = React55.useMemo(() => {
|
|
19564
19789
|
if (layoutMaxWidth === void 0 || layoutMaxWidth === null || layoutMaxWidth === "") {
|
|
19565
19790
|
return void 0;
|
|
19566
19791
|
}
|
|
19567
19792
|
return { maxWidth: layoutMaxWidth };
|
|
19568
19793
|
}, [layoutMaxWidth]);
|
|
19569
|
-
|
|
19794
|
+
React55.useLayoutEffect(() => {
|
|
19570
19795
|
if (!taskSummaryEnabled) {
|
|
19571
19796
|
setTaskSummaryDocked(false);
|
|
19572
19797
|
return;
|
|
@@ -19601,7 +19826,7 @@ function Chat({
|
|
|
19601
19826
|
const taskSummaryAvailable = Boolean(
|
|
19602
19827
|
taskSummaryEnabled && stream.threadId && taskSummaryConversationId
|
|
19603
19828
|
);
|
|
19604
|
-
const handleTaskSummaryOpenChange =
|
|
19829
|
+
const handleTaskSummaryOpenChange = React55.useCallback(
|
|
19605
19830
|
(open) => {
|
|
19606
19831
|
setTaskSummaryOpen(open);
|
|
19607
19832
|
if (!taskSummaryConversationId) return;
|
|
@@ -19617,12 +19842,12 @@ function Chat({
|
|
|
19617
19842
|
},
|
|
19618
19843
|
[taskSummaryConversationId]
|
|
19619
19844
|
);
|
|
19620
|
-
|
|
19845
|
+
React55.useEffect(() => {
|
|
19621
19846
|
if (!taskSummaryDocked) {
|
|
19622
19847
|
setTaskSummaryOpen(false);
|
|
19623
19848
|
}
|
|
19624
19849
|
}, [taskSummaryDocked]);
|
|
19625
|
-
|
|
19850
|
+
React55.useEffect(() => {
|
|
19626
19851
|
if (!taskSummaryDocked || !taskSummaryAvailable || !taskSummaryConversationId || manuallyClosedTaskSummaryConversationIdsRef.current.has(
|
|
19627
19852
|
taskSummaryConversationId
|
|
19628
19853
|
)) {
|
|
@@ -19643,13 +19868,13 @@ function Chat({
|
|
|
19643
19868
|
onFocusComposer: () => focusComposerAt(),
|
|
19644
19869
|
onOpenResource: openTaskSummaryResource
|
|
19645
19870
|
};
|
|
19646
|
-
return /* @__PURE__ */ (0,
|
|
19871
|
+
return /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(
|
|
19647
19872
|
"div",
|
|
19648
19873
|
{
|
|
19649
19874
|
className: "relative flex h-full w-full min-w-0 bg-background",
|
|
19650
19875
|
"data-task-summary-layout": taskSummaryDocked ? "docked" : "popover",
|
|
19651
19876
|
children: [
|
|
19652
|
-
/* @__PURE__ */ (0,
|
|
19877
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(
|
|
19653
19878
|
UploadDroppedFiles,
|
|
19654
19879
|
{
|
|
19655
19880
|
ref: viewportRef,
|
|
@@ -19664,7 +19889,7 @@ function Chat({
|
|
|
19664
19889
|
className
|
|
19665
19890
|
),
|
|
19666
19891
|
children: [
|
|
19667
|
-
/* @__PURE__ */ (0,
|
|
19892
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(
|
|
19668
19893
|
"div",
|
|
19669
19894
|
{
|
|
19670
19895
|
ref: chatColumnRef,
|
|
@@ -19672,9 +19897,9 @@ function Chat({
|
|
|
19672
19897
|
className: "mx-auto flex w-full items-center justify-between border-b p-2 sticky top-0 z-10 bg-background",
|
|
19673
19898
|
style: chatColumnStyle,
|
|
19674
19899
|
children: [
|
|
19675
|
-
/* @__PURE__ */ (0,
|
|
19676
|
-
/* @__PURE__ */ (0,
|
|
19677
|
-
/* @__PURE__ */ (0,
|
|
19900
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { className: "flex min-w-0 items-center gap-3 overflow-hidden", children: [
|
|
19901
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { className: "relative shrink-0", children: [
|
|
19902
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
19678
19903
|
ChatkitAvatar,
|
|
19679
19904
|
{
|
|
19680
19905
|
avatar: assistantAvatar,
|
|
@@ -19682,10 +19907,10 @@ function Chat({
|
|
|
19682
19907
|
label: assistantTitle
|
|
19683
19908
|
}
|
|
19684
19909
|
),
|
|
19685
|
-
/* @__PURE__ */ (0,
|
|
19910
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("span", { className: "absolute bottom-0 right-0 h-2.5 w-2.5 rounded-full border-2 border-background bg-green-500" })
|
|
19686
19911
|
] }),
|
|
19687
|
-
/* @__PURE__ */ (0,
|
|
19688
|
-
/* @__PURE__ */ (0,
|
|
19912
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { className: "min-w-0", children: [
|
|
19913
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
19689
19914
|
"h2",
|
|
19690
19915
|
{
|
|
19691
19916
|
className: "text-lg font-semibold truncate",
|
|
@@ -19693,7 +19918,7 @@ function Chat({
|
|
|
19693
19918
|
children: assistantTitle
|
|
19694
19919
|
}
|
|
19695
19920
|
),
|
|
19696
|
-
/* @__PURE__ */ (0,
|
|
19921
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
19697
19922
|
"p",
|
|
19698
19923
|
{
|
|
19699
19924
|
className: "truncate text-xs text-muted-foreground",
|
|
@@ -19703,8 +19928,8 @@ function Chat({
|
|
|
19703
19928
|
)
|
|
19704
19929
|
] })
|
|
19705
19930
|
] }),
|
|
19706
|
-
/* @__PURE__ */ (0,
|
|
19707
|
-
taskSummaryAvailable && /* @__PURE__ */ (0,
|
|
19931
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { className: "flex items-center gap-1", children: [
|
|
19932
|
+
taskSummaryAvailable && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
19708
19933
|
TaskSummaryTrigger,
|
|
19709
19934
|
{
|
|
19710
19935
|
...taskSummaryProps,
|
|
@@ -19713,8 +19938,9 @@ function Chat({
|
|
|
19713
19938
|
onOpenChange: handleTaskSummaryOpenChange
|
|
19714
19939
|
}
|
|
19715
19940
|
),
|
|
19716
|
-
|
|
19717
|
-
|
|
19941
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(WorkbenchToggleButton, {}),
|
|
19942
|
+
canMinimizeToPet && /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(Tooltip, { children: [
|
|
19943
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("span", { className: "inline-flex h-8 w-8", children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
19718
19944
|
"button",
|
|
19719
19945
|
{
|
|
19720
19946
|
type: "button",
|
|
@@ -19725,13 +19951,13 @@ function Chat({
|
|
|
19725
19951
|
"transition-colors duration-150"
|
|
19726
19952
|
),
|
|
19727
19953
|
"aria-label": t("chat.minimizeToPet"),
|
|
19728
|
-
children: /* @__PURE__ */ (0,
|
|
19954
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_lucide_react32.Minus, { size: 16 })
|
|
19729
19955
|
}
|
|
19730
19956
|
) }) }),
|
|
19731
|
-
/* @__PURE__ */ (0,
|
|
19957
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(TooltipContent, { side: "bottom", children: t("chat.minimizeToPet") })
|
|
19732
19958
|
] }),
|
|
19733
|
-
/* @__PURE__ */ (0,
|
|
19734
|
-
/* @__PURE__ */ (0,
|
|
19959
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(Tooltip, { children: [
|
|
19960
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("span", { className: "inline-flex h-8 w-8", children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
19735
19961
|
"button",
|
|
19736
19962
|
{
|
|
19737
19963
|
type: "button",
|
|
@@ -19742,14 +19968,14 @@ function Chat({
|
|
|
19742
19968
|
"transition-colors duration-150"
|
|
19743
19969
|
),
|
|
19744
19970
|
"aria-label": t("settings.open"),
|
|
19745
|
-
children: /* @__PURE__ */ (0,
|
|
19971
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_lucide_react32.Settings, { size: 16 })
|
|
19746
19972
|
}
|
|
19747
19973
|
) }) }),
|
|
19748
|
-
/* @__PURE__ */ (0,
|
|
19974
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(TooltipContent, { side: "bottom", children: t("settings.open") })
|
|
19749
19975
|
] }),
|
|
19750
|
-
history?.enabled !== false && /* @__PURE__ */ (0,
|
|
19751
|
-
/* @__PURE__ */ (0,
|
|
19752
|
-
/* @__PURE__ */ (0,
|
|
19976
|
+
history?.enabled !== false && /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(import_jsx_runtime59.Fragment, { children: [
|
|
19977
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(Tooltip, { children: [
|
|
19978
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("span", { className: "inline-flex h-8 w-8", children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
19753
19979
|
"button",
|
|
19754
19980
|
{
|
|
19755
19981
|
type: "button",
|
|
@@ -19762,19 +19988,21 @@ function Chat({
|
|
|
19762
19988
|
"disabled:pointer-events-none disabled:opacity-50 disabled:cursor-not-allowed"
|
|
19763
19989
|
),
|
|
19764
19990
|
"aria-label": t("history.newThread"),
|
|
19765
|
-
children: /* @__PURE__ */ (0,
|
|
19991
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_lucide_react32.Pencil, { size: 16 })
|
|
19766
19992
|
}
|
|
19767
19993
|
) }) }),
|
|
19768
|
-
/* @__PURE__ */ (0,
|
|
19994
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(TooltipContent, { side: "bottom", children: t("history.newThread") })
|
|
19769
19995
|
] }),
|
|
19770
|
-
/* @__PURE__ */ (0,
|
|
19996
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
19771
19997
|
HistorySidebar,
|
|
19772
19998
|
{
|
|
19773
19999
|
threads,
|
|
19774
20000
|
currentThreadId: stream.threadId ?? void 0,
|
|
19775
20001
|
onNewThread: handleNewThread,
|
|
20002
|
+
onRefresh: refreshThreads,
|
|
19776
20003
|
onSelectThread: handleSelectThread,
|
|
19777
20004
|
onDeleteThread: handleDeleteThread,
|
|
20005
|
+
isRefreshing: isThreadsLoading,
|
|
19778
20006
|
showDelete: history?.showDelete !== false,
|
|
19779
20007
|
disabled: missingConfig || isThreadsLoading || isHistoryLoading
|
|
19780
20008
|
}
|
|
@@ -19784,7 +20012,7 @@ function Chat({
|
|
|
19784
20012
|
]
|
|
19785
20013
|
}
|
|
19786
20014
|
),
|
|
19787
|
-
showMessageNavigation && /* @__PURE__ */ (0,
|
|
20015
|
+
showMessageNavigation && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
19788
20016
|
MessageNavigator,
|
|
19789
20017
|
{
|
|
19790
20018
|
items: messageNavigationItems,
|
|
@@ -19795,18 +20023,18 @@ function Chat({
|
|
|
19795
20023
|
tagsOverflowLabel: (count) => t("message.navigation.moreTags", { count })
|
|
19796
20024
|
}
|
|
19797
20025
|
),
|
|
19798
|
-
/* @__PURE__ */ (0,
|
|
20026
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(
|
|
19799
20027
|
"div",
|
|
19800
20028
|
{
|
|
19801
20029
|
"data-slot": "chatkit-chat-content",
|
|
19802
20030
|
className: "mx-auto w-full flex-1 p-4",
|
|
19803
20031
|
style: chatColumnStyle,
|
|
19804
20032
|
children: [
|
|
19805
|
-
errorMessage && /* @__PURE__ */ (0,
|
|
19806
|
-
historyError && /* @__PURE__ */ (0,
|
|
19807
|
-
showMissingConfig && /* @__PURE__ */ (0,
|
|
19808
|
-
isHistoryLoading && /* @__PURE__ */ (0,
|
|
19809
|
-
messages.length === 0 && !canLoadMoreMessages ? /* @__PURE__ */ (0,
|
|
20033
|
+
errorMessage && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { className: "mb-4 rounded-lg border border-destructive/30 bg-destructive/10 px-3 py-2 text-sm text-destructive", children: errorMessage }),
|
|
20034
|
+
historyError && /* @__PURE__ */ (0, import_jsx_runtime59.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 }),
|
|
20035
|
+
showMissingConfig && /* @__PURE__ */ (0, import_jsx_runtime59.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 }),
|
|
20036
|
+
isHistoryLoading && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { className: "mb-4 rounded-lg border border-muted px-3 py-2 text-sm text-muted-foreground", children: t("chat.loadingThread") }),
|
|
20037
|
+
messages.length === 0 && !canLoadMoreMessages ? /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
19810
20038
|
StartScreen,
|
|
19811
20039
|
{
|
|
19812
20040
|
startScreen,
|
|
@@ -19815,10 +20043,10 @@ function Chat({
|
|
|
19815
20043
|
promptSendDisabled: isSubmissionBlocked,
|
|
19816
20044
|
promptEditDisabled: isPromptEditDisabled
|
|
19817
20045
|
}
|
|
19818
|
-
) : /* @__PURE__ */ (0,
|
|
19819
|
-
canLoadMoreMessages && /* @__PURE__ */ (0,
|
|
19820
|
-
/* @__PURE__ */ (0,
|
|
19821
|
-
/* @__PURE__ */ (0,
|
|
20046
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { className: "space-y-4", children: [
|
|
20047
|
+
canLoadMoreMessages && /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { className: "flex items-center gap-3 py-1", children: [
|
|
20048
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { className: "h-px min-w-8 flex-1 bg-border" }),
|
|
20049
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
19822
20050
|
Button,
|
|
19823
20051
|
{
|
|
19824
20052
|
type: "button",
|
|
@@ -19830,7 +20058,7 @@ function Chat({
|
|
|
19830
20058
|
children: isLoadingMoreMessages ? t("chat.loadingMoreMessages") : t("chat.loadMoreMessages")
|
|
19831
20059
|
}
|
|
19832
20060
|
),
|
|
19833
|
-
/* @__PURE__ */ (0,
|
|
20061
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { className: "h-px min-w-8 flex-1 bg-border" })
|
|
19834
20062
|
] }),
|
|
19835
20063
|
messages.map((message, index) => {
|
|
19836
20064
|
const messageType = String(message.type);
|
|
@@ -19874,7 +20102,7 @@ function Chat({
|
|
|
19874
20102
|
if (!isAssistantMessage && !hasPlainRenderableContent && !hasHumanAttachments && humanRuntimeCapabilityOptions.length === 0 && humanReferences.length === 0) {
|
|
19875
20103
|
return null;
|
|
19876
20104
|
}
|
|
19877
|
-
return /* @__PURE__ */ (0,
|
|
20105
|
+
return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
19878
20106
|
"div",
|
|
19879
20107
|
{
|
|
19880
20108
|
ref: (node) => setMessageNavigationAnchor(messageNavigationId, node),
|
|
@@ -19884,7 +20112,7 @@ function Chat({
|
|
|
19884
20112
|
message.type === "human" ? "justify-end" : "justify-start -ml-1"
|
|
19885
20113
|
// AI messages: slightly closer to left
|
|
19886
20114
|
),
|
|
19887
|
-
children: /* @__PURE__ */ (0,
|
|
20115
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(
|
|
19888
20116
|
"div",
|
|
19889
20117
|
{
|
|
19890
20118
|
className: cn(
|
|
@@ -19892,7 +20120,7 @@ function Chat({
|
|
|
19892
20120
|
isAssistantMessage && "min-w-0 flex-1"
|
|
19893
20121
|
),
|
|
19894
20122
|
children: [
|
|
19895
|
-
/* @__PURE__ */ (0,
|
|
20123
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
19896
20124
|
"div",
|
|
19897
20125
|
{
|
|
19898
20126
|
...canQuoteMessage ? {
|
|
@@ -19904,7 +20132,7 @@ function Chat({
|
|
|
19904
20132
|
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"
|
|
19905
20133
|
// AI messages: use chat-specific foreground color
|
|
19906
20134
|
),
|
|
19907
|
-
children: isAssistantMessage ? /* @__PURE__ */ (0,
|
|
20135
|
+
children: isAssistantMessage ? /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
19908
20136
|
AssistantMessage,
|
|
19909
20137
|
{
|
|
19910
20138
|
message: {
|
|
@@ -19924,14 +20152,14 @@ function Chat({
|
|
|
19924
20152
|
apiUrl: stream.apiUrl,
|
|
19925
20153
|
pet: effectivePet
|
|
19926
20154
|
}
|
|
19927
|
-
) : /* @__PURE__ */ (0,
|
|
19928
|
-
message.type === "human" && humanRuntimeCapabilityOptions.length > 0 && /* @__PURE__ */ (0,
|
|
20155
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(import_jsx_runtime59.Fragment, { children: [
|
|
20156
|
+
message.type === "human" && humanRuntimeCapabilityOptions.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
19929
20157
|
HumanRuntimeCapabilityChips,
|
|
19930
20158
|
{
|
|
19931
20159
|
options: humanRuntimeCapabilityOptions
|
|
19932
20160
|
}
|
|
19933
20161
|
),
|
|
19934
|
-
message.type === "human" && humanReferences.length > 0 && /* @__PURE__ */ (0,
|
|
20162
|
+
message.type === "human" && humanReferences.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { className: "mb-2 flex flex-wrap gap-1.5", children: humanReferences.map((reference) => /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
19935
20163
|
ReferenceChip,
|
|
19936
20164
|
{
|
|
19937
20165
|
reference,
|
|
@@ -19939,29 +20167,29 @@ function Chat({
|
|
|
19939
20167
|
},
|
|
19940
20168
|
getReferenceKey(reference)
|
|
19941
20169
|
)) }),
|
|
19942
|
-
message.type === "human" && humanAttachments.length > 0 && /* @__PURE__ */ (0,
|
|
20170
|
+
message.type === "human" && humanAttachments.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { className: "flex flex-wrap gap-1.5 mb-2", children: humanAttachments.map((file, fileIndex) => /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(
|
|
19943
20171
|
"div",
|
|
19944
20172
|
{
|
|
19945
20173
|
className: "flex items-center gap-1.5 rounded-md bg-primary-foreground/20 px-2 py-1 text-xs",
|
|
19946
20174
|
children: [
|
|
19947
|
-
/* @__PURE__ */ (0,
|
|
19948
|
-
/* @__PURE__ */ (0,
|
|
20175
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_lucide_react32.FileText, { size: 12 }),
|
|
20176
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("span", { className: "max-w-[100px] truncate", children: file.originalName ?? file.id })
|
|
19949
20177
|
]
|
|
19950
20178
|
},
|
|
19951
20179
|
fileIndex
|
|
19952
20180
|
)) }),
|
|
19953
|
-
Array.isArray(message.content) ? message.content.map((part, partIndex) => /* @__PURE__ */ (0,
|
|
20181
|
+
Array.isArray(message.content) ? message.content.map((part, partIndex) => /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
19954
20182
|
"p",
|
|
19955
20183
|
{
|
|
19956
20184
|
className: "wrap-break-word text-sm leading-relaxed",
|
|
19957
20185
|
children: formatMessageContent(part)
|
|
19958
20186
|
},
|
|
19959
20187
|
`${part.type}-${partIndex}`
|
|
19960
|
-
)) : /* @__PURE__ */ (0,
|
|
20188
|
+
)) : /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("span", { className: "wrap-break-word text-sm leading-relaxed", children: formatMessageContent(message.content) })
|
|
19961
20189
|
] })
|
|
19962
20190
|
}
|
|
19963
20191
|
),
|
|
19964
|
-
/* @__PURE__ */ (0,
|
|
20192
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
19965
20193
|
MessageActions,
|
|
19966
20194
|
{
|
|
19967
20195
|
content: messageContent,
|
|
@@ -19999,7 +20227,7 @@ function Chat({
|
|
|
19999
20227
|
stream.isLoading,
|
|
20000
20228
|
{ now: streamingNow }
|
|
20001
20229
|
);
|
|
20002
|
-
return /* @__PURE__ */ (0,
|
|
20230
|
+
return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { className: "flex justify-start gap-3 -ml-2", children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { className: "max-w-full rounded-2xl py-2.5", children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
20003
20231
|
AssistantStreamingIndicator,
|
|
20004
20232
|
{
|
|
20005
20233
|
status: fallbackStreamingStatus ?? "loading"
|
|
@@ -20010,7 +20238,7 @@ function Chat({
|
|
|
20010
20238
|
]
|
|
20011
20239
|
}
|
|
20012
20240
|
),
|
|
20013
|
-
!isAtBottom && messages.length > 0 && /* @__PURE__ */ (0,
|
|
20241
|
+
!isAtBottom && messages.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { className: "sticky bottom-20 z-20 flex justify-center px-4 pointer-events-none", children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
20014
20242
|
Button,
|
|
20015
20243
|
{
|
|
20016
20244
|
type: "button",
|
|
@@ -20023,10 +20251,10 @@ function Chat({
|
|
|
20023
20251
|
onClick: () => scrollToBottom(true, true),
|
|
20024
20252
|
"aria-label": t("chat.scrollToBottom"),
|
|
20025
20253
|
title: t("chat.scrollToBottom"),
|
|
20026
|
-
children: /* @__PURE__ */ (0,
|
|
20254
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_lucide_react32.ArrowDown, { size: 16 })
|
|
20027
20255
|
}
|
|
20028
20256
|
) }),
|
|
20029
|
-
quoteSelection && /* @__PURE__ */ (0,
|
|
20257
|
+
quoteSelection && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
20030
20258
|
"div",
|
|
20031
20259
|
{
|
|
20032
20260
|
className: "pointer-events-none fixed z-50",
|
|
@@ -20035,7 +20263,7 @@ function Chat({
|
|
|
20035
20263
|
left: `${quoteSelection.left}px`,
|
|
20036
20264
|
transform: "translateX(-50%)"
|
|
20037
20265
|
},
|
|
20038
|
-
children: /* @__PURE__ */ (0,
|
|
20266
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(
|
|
20039
20267
|
Button,
|
|
20040
20268
|
{
|
|
20041
20269
|
type: "button",
|
|
@@ -20047,22 +20275,22 @@ function Chat({
|
|
|
20047
20275
|
"aria-label": t("composer.quoteSelection"),
|
|
20048
20276
|
title: t("composer.quoteSelection"),
|
|
20049
20277
|
children: [
|
|
20050
|
-
/* @__PURE__ */ (0,
|
|
20278
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_lucide_react32.Quote, { size: 14 }),
|
|
20051
20279
|
t("composer.quoteSelection")
|
|
20052
20280
|
]
|
|
20053
20281
|
}
|
|
20054
20282
|
)
|
|
20055
20283
|
}
|
|
20056
20284
|
),
|
|
20057
|
-
/* @__PURE__ */ (0,
|
|
20285
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(
|
|
20058
20286
|
"div",
|
|
20059
20287
|
{
|
|
20060
20288
|
"data-slot": "chatkit-chat-composer",
|
|
20061
20289
|
className: "mx-auto w-full p-2 sticky bottom-0 z-10 bg-background",
|
|
20062
20290
|
style: chatColumnStyle,
|
|
20063
20291
|
children: [
|
|
20064
|
-
threadErrorMessage && /* @__PURE__ */ (0,
|
|
20065
|
-
/* @__PURE__ */ (0,
|
|
20292
|
+
threadErrorMessage && /* @__PURE__ */ (0, import_jsx_runtime59.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 }),
|
|
20293
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
20066
20294
|
ChatAttachments,
|
|
20067
20295
|
{
|
|
20068
20296
|
ref: attachmentsRef,
|
|
@@ -20076,7 +20304,7 @@ function Chat({
|
|
|
20076
20304
|
onStateChange: setAttachmentState
|
|
20077
20305
|
}
|
|
20078
20306
|
),
|
|
20079
|
-
references.length > 0 && /* @__PURE__ */ (0,
|
|
20307
|
+
references.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { className: "mb-3 flex flex-wrap gap-2", children: references.map((reference) => /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
20080
20308
|
ReferenceChip,
|
|
20081
20309
|
{
|
|
20082
20310
|
reference,
|
|
@@ -20090,7 +20318,7 @@ function Chat({
|
|
|
20090
20318
|
},
|
|
20091
20319
|
getReferenceKey(reference)
|
|
20092
20320
|
)) }),
|
|
20093
|
-
/* @__PURE__ */ (0,
|
|
20321
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
20094
20322
|
DetachedRunRuntimeCapabilities,
|
|
20095
20323
|
{
|
|
20096
20324
|
options: detachedRunRuntimeCapabilityOptions,
|
|
@@ -20099,7 +20327,7 @@ function Chat({
|
|
|
20099
20327
|
onRemove: removeRunRuntimeCapability
|
|
20100
20328
|
}
|
|
20101
20329
|
),
|
|
20102
|
-
showGoalStatus && /* @__PURE__ */ (0,
|
|
20330
|
+
showGoalStatus && /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(
|
|
20103
20331
|
"div",
|
|
20104
20332
|
{
|
|
20105
20333
|
className: cn(
|
|
@@ -20107,8 +20335,8 @@ function Chat({
|
|
|
20107
20335
|
isGoalObjectiveExpanded ? "items-start" : "items-center"
|
|
20108
20336
|
),
|
|
20109
20337
|
children: [
|
|
20110
|
-
/* @__PURE__ */ (0,
|
|
20111
|
-
|
|
20338
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
20339
|
+
import_lucide_react32.Target,
|
|
20112
20340
|
{
|
|
20113
20341
|
className: cn(
|
|
20114
20342
|
"size-4 shrink-0 text-muted-foreground",
|
|
@@ -20116,13 +20344,13 @@ function Chat({
|
|
|
20116
20344
|
)
|
|
20117
20345
|
}
|
|
20118
20346
|
),
|
|
20119
|
-
/* @__PURE__ */ (0,
|
|
20120
|
-
/* @__PURE__ */ (0,
|
|
20121
|
-
/* @__PURE__ */ (0,
|
|
20122
|
-
threadGoal && /* @__PURE__ */ (0,
|
|
20123
|
-
isGoalLoading && /* @__PURE__ */ (0,
|
|
20347
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { className: "min-w-0 flex-1", children: [
|
|
20348
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { className: "flex min-w-0 items-center gap-2", children: [
|
|
20349
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("span", { className: "font-medium", children: t("chat.goal.label") }),
|
|
20350
|
+
threadGoal && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("span", { className: "shrink-0 rounded-md bg-muted px-1.5 py-0.5 text-[11px] text-muted-foreground", children: t(`chat.goal.status.${threadGoal.status}`) }),
|
|
20351
|
+
isGoalLoading && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_lucide_react32.Loader2, { className: "size-3 animate-spin text-muted-foreground" })
|
|
20124
20352
|
] }),
|
|
20125
|
-
/* @__PURE__ */ (0,
|
|
20353
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
20126
20354
|
"div",
|
|
20127
20355
|
{
|
|
20128
20356
|
className: cn(
|
|
@@ -20132,13 +20360,13 @@ function Chat({
|
|
|
20132
20360
|
children: goalError || threadGoal?.objective
|
|
20133
20361
|
}
|
|
20134
20362
|
),
|
|
20135
|
-
threadGoal && /* @__PURE__ */ (0,
|
|
20363
|
+
threadGoal && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { className: "mt-1 flex flex-wrap gap-x-3 gap-y-1 text-[11px] text-muted-foreground", children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("span", { children: t("chat.goal.elapsed", {
|
|
20136
20364
|
elapsed: formatGoalElapsed(displayedGoalElapsedSeconds)
|
|
20137
20365
|
}) }) })
|
|
20138
20366
|
] }),
|
|
20139
|
-
threadGoal && /* @__PURE__ */ (0,
|
|
20140
|
-
/* @__PURE__ */ (0,
|
|
20141
|
-
/* @__PURE__ */ (0,
|
|
20367
|
+
threadGoal && /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { className: "flex shrink-0 items-center gap-1", children: [
|
|
20368
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(Tooltip, { children: [
|
|
20369
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
20142
20370
|
Button,
|
|
20143
20371
|
{
|
|
20144
20372
|
type: "button",
|
|
@@ -20149,13 +20377,13 @@ function Chat({
|
|
|
20149
20377
|
const prefix = "/goal edit ";
|
|
20150
20378
|
setComposerText(`${prefix}${threadGoal.objective}`);
|
|
20151
20379
|
},
|
|
20152
|
-
children: /* @__PURE__ */ (0,
|
|
20380
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_lucide_react32.Pencil, { className: "size-3" })
|
|
20153
20381
|
}
|
|
20154
20382
|
) }),
|
|
20155
|
-
/* @__PURE__ */ (0,
|
|
20383
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(TooltipContent, { children: t("chat.goal.edit") })
|
|
20156
20384
|
] }),
|
|
20157
|
-
/* @__PURE__ */ (0,
|
|
20158
|
-
/* @__PURE__ */ (0,
|
|
20385
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(Tooltip, { children: [
|
|
20386
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
20159
20387
|
Button,
|
|
20160
20388
|
{
|
|
20161
20389
|
type: "button",
|
|
@@ -20171,13 +20399,13 @@ function Chat({
|
|
|
20171
20399
|
executionType: "insert_invocation"
|
|
20172
20400
|
}
|
|
20173
20401
|
}),
|
|
20174
|
-
children: threadGoal.status === "paused" ? /* @__PURE__ */ (0,
|
|
20402
|
+
children: threadGoal.status === "paused" ? /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_lucide_react32.Play, { className: "size-3" }) : /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_lucide_react32.Pause, { className: "size-3" })
|
|
20175
20403
|
}
|
|
20176
20404
|
) }),
|
|
20177
|
-
/* @__PURE__ */ (0,
|
|
20405
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(TooltipContent, { children: threadGoal.status === "paused" ? t("chat.goal.resume") : t("chat.goal.pause") })
|
|
20178
20406
|
] }),
|
|
20179
|
-
/* @__PURE__ */ (0,
|
|
20180
|
-
/* @__PURE__ */ (0,
|
|
20407
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(Tooltip, { children: [
|
|
20408
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
20181
20409
|
Button,
|
|
20182
20410
|
{
|
|
20183
20411
|
type: "button",
|
|
@@ -20193,13 +20421,13 @@ function Chat({
|
|
|
20193
20421
|
executionType: "insert_invocation"
|
|
20194
20422
|
}
|
|
20195
20423
|
}),
|
|
20196
|
-
children: /* @__PURE__ */ (0,
|
|
20424
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_lucide_react32.Trash2, { className: "size-3" })
|
|
20197
20425
|
}
|
|
20198
20426
|
) }),
|
|
20199
|
-
/* @__PURE__ */ (0,
|
|
20427
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(TooltipContent, { children: t("chat.goal.clear") })
|
|
20200
20428
|
] }),
|
|
20201
|
-
threadGoal.objective && !goalError && /* @__PURE__ */ (0,
|
|
20202
|
-
/* @__PURE__ */ (0,
|
|
20429
|
+
threadGoal.objective && !goalError && /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(Tooltip, { children: [
|
|
20430
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
20203
20431
|
Button,
|
|
20204
20432
|
{
|
|
20205
20433
|
type: "button",
|
|
@@ -20208,8 +20436,8 @@ function Chat({
|
|
|
20208
20436
|
"aria-expanded": isGoalObjectiveExpanded,
|
|
20209
20437
|
"aria-label": isGoalObjectiveExpanded ? t("chat.goal.collapseObjective") : t("chat.goal.expandObjective"),
|
|
20210
20438
|
onClick: () => setIsGoalObjectiveExpanded((expanded) => !expanded),
|
|
20211
|
-
children: /* @__PURE__ */ (0,
|
|
20212
|
-
|
|
20439
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
20440
|
+
import_lucide_react32.ChevronDown,
|
|
20213
20441
|
{
|
|
20214
20442
|
className: cn(
|
|
20215
20443
|
"size-3 transition-transform",
|
|
@@ -20219,13 +20447,13 @@ function Chat({
|
|
|
20219
20447
|
)
|
|
20220
20448
|
}
|
|
20221
20449
|
) }),
|
|
20222
|
-
/* @__PURE__ */ (0,
|
|
20450
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(TooltipContent, { children: isGoalObjectiveExpanded ? t("chat.goal.collapseObjective") : t("chat.goal.expandObjective") })
|
|
20223
20451
|
] })
|
|
20224
20452
|
] })
|
|
20225
20453
|
]
|
|
20226
20454
|
}
|
|
20227
20455
|
),
|
|
20228
|
-
/* @__PURE__ */ (0,
|
|
20456
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
20229
20457
|
PendingRuntimeServices,
|
|
20230
20458
|
{
|
|
20231
20459
|
state: stream.runtimeActivities.sandboxServices,
|
|
@@ -20234,7 +20462,7 @@ function Chat({
|
|
|
20234
20462
|
className: hasPendingTodos || hasPendingFollowUps ? "mb-2" : void 0
|
|
20235
20463
|
}
|
|
20236
20464
|
),
|
|
20237
|
-
/* @__PURE__ */ (0,
|
|
20465
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
20238
20466
|
PendingTodos,
|
|
20239
20467
|
{
|
|
20240
20468
|
snapshot: stream.todos,
|
|
@@ -20242,7 +20470,7 @@ function Chat({
|
|
|
20242
20470
|
className: hasPendingFollowUps ? "mb-2" : void 0
|
|
20243
20471
|
}
|
|
20244
20472
|
),
|
|
20245
|
-
/* @__PURE__ */ (0,
|
|
20473
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
20246
20474
|
PendingFollowUps,
|
|
20247
20475
|
{
|
|
20248
20476
|
items: pendingFollowUps,
|
|
@@ -20255,7 +20483,7 @@ function Chat({
|
|
|
20255
20483
|
attachToComposer: true
|
|
20256
20484
|
}
|
|
20257
20485
|
),
|
|
20258
|
-
/* @__PURE__ */ (0,
|
|
20486
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
20259
20487
|
RequestUserInputPanel,
|
|
20260
20488
|
{
|
|
20261
20489
|
request: stream.pendingRequestUserInput,
|
|
@@ -20264,7 +20492,7 @@ function Chat({
|
|
|
20264
20492
|
attachToComposer: true
|
|
20265
20493
|
}
|
|
20266
20494
|
),
|
|
20267
|
-
/* @__PURE__ */ (0,
|
|
20495
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
20268
20496
|
HITLApprovalPanel,
|
|
20269
20497
|
{
|
|
20270
20498
|
request: stream.pendingHITLRequest,
|
|
@@ -20273,7 +20501,7 @@ function Chat({
|
|
|
20273
20501
|
attachToComposer: true
|
|
20274
20502
|
}
|
|
20275
20503
|
),
|
|
20276
|
-
runtimeCapabilityPalette && /* @__PURE__ */ (0,
|
|
20504
|
+
runtimeCapabilityPalette && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
20277
20505
|
SlashPalette,
|
|
20278
20506
|
{
|
|
20279
20507
|
palette: runtimeCapabilityPalette,
|
|
@@ -20287,7 +20515,7 @@ function Chat({
|
|
|
20287
20515
|
onSelect: selectSlashPaletteOption
|
|
20288
20516
|
}
|
|
20289
20517
|
),
|
|
20290
|
-
/* @__PURE__ */ (0,
|
|
20518
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("form", { className: "flex items-end", onSubmit: handleSubmit, children: /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(
|
|
20291
20519
|
"div",
|
|
20292
20520
|
{
|
|
20293
20521
|
"data-slot": "composer-input-shell",
|
|
@@ -20301,7 +20529,7 @@ function Chat({
|
|
|
20301
20529
|
composerInputRoundedClass
|
|
20302
20530
|
),
|
|
20303
20531
|
children: [
|
|
20304
|
-
/* @__PURE__ */ (0,
|
|
20532
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
20305
20533
|
"div",
|
|
20306
20534
|
{
|
|
20307
20535
|
ref: composerInputRef,
|
|
@@ -20323,19 +20551,19 @@ function Chat({
|
|
|
20323
20551
|
(missingConfig || isHistoryLoading || hasPendingInteractiveRequest) && "cursor-not-allowed opacity-50"
|
|
20324
20552
|
),
|
|
20325
20553
|
children: renderedComposerParts.map(
|
|
20326
|
-
(part, index) => part.type === "text" ? /* @__PURE__ */ (0,
|
|
20554
|
+
(part, index) => part.type === "text" ? /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(React55.Fragment, { children: part.text }, `text-${index}`) : /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(ComposerCapabilityToken, { part }, part.key)
|
|
20327
20555
|
)
|
|
20328
20556
|
},
|
|
20329
20557
|
composerDomVersion
|
|
20330
20558
|
),
|
|
20331
|
-
/* @__PURE__ */ (0,
|
|
20559
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(
|
|
20332
20560
|
"div",
|
|
20333
20561
|
{
|
|
20334
20562
|
"data-slot": "composer-action-bar",
|
|
20335
20563
|
className: "pointer-events-none absolute inset-x-1.5 bottom-1 flex min-h-10 items-center justify-between gap-2",
|
|
20336
20564
|
children: [
|
|
20337
|
-
/* @__PURE__ */ (0,
|
|
20338
|
-
/* @__PURE__ */ (0,
|
|
20565
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { className: "pointer-events-none flex min-w-0 flex-1 items-center gap-1.5", children: [
|
|
20566
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { className: "pointer-events-auto flex shrink-0 items-center gap-1.5", children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
20339
20567
|
ComposerMenu,
|
|
20340
20568
|
{
|
|
20341
20569
|
composer,
|
|
@@ -20353,20 +20581,20 @@ function Chat({
|
|
|
20353
20581
|
disabled: missingConfig || isHistoryLoading || hasPendingInteractiveRequest
|
|
20354
20582
|
}
|
|
20355
20583
|
) }),
|
|
20356
|
-
selectedTool && /* @__PURE__ */ (0,
|
|
20357
|
-
/* @__PURE__ */ (0,
|
|
20358
|
-
/* @__PURE__ */ (0,
|
|
20584
|
+
selectedTool && /* @__PURE__ */ (0, import_jsx_runtime59.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: [
|
|
20585
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("span", { className: "truncate", children: selectedTool.shortLabel ?? selectedTool.label }),
|
|
20586
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
20359
20587
|
"button",
|
|
20360
20588
|
{
|
|
20361
20589
|
type: "button",
|
|
20362
20590
|
onClick: () => setSelectedTool(null),
|
|
20363
20591
|
className: "shrink-0 rounded-full p-0.5 text-primary/70 hover:bg-primary/10 hover:text-primary",
|
|
20364
|
-
children: /* @__PURE__ */ (0,
|
|
20592
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_lucide_react32.X, { size: 12 })
|
|
20365
20593
|
}
|
|
20366
20594
|
)
|
|
20367
20595
|
] })
|
|
20368
20596
|
] }),
|
|
20369
|
-
/* @__PURE__ */ (0,
|
|
20597
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { className: "pointer-events-auto shrink-0", children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
20370
20598
|
SendButton,
|
|
20371
20599
|
{
|
|
20372
20600
|
disabled: isSendDisabled,
|
|
@@ -20389,7 +20617,7 @@ function Chat({
|
|
|
20389
20617
|
]
|
|
20390
20618
|
}
|
|
20391
20619
|
) }),
|
|
20392
|
-
disclaimer?.text && /* @__PURE__ */ (0,
|
|
20620
|
+
disclaimer?.text && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
20393
20621
|
"p",
|
|
20394
20622
|
{
|
|
20395
20623
|
className: cn(
|
|
@@ -20399,14 +20627,14 @@ function Chat({
|
|
|
20399
20627
|
children: disclaimer.text
|
|
20400
20628
|
}
|
|
20401
20629
|
),
|
|
20402
|
-
/* @__PURE__ */ (0,
|
|
20403
|
-
/* @__PURE__ */ (0,
|
|
20404
|
-
/* @__PURE__ */ (0,
|
|
20630
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { className: "mt-2 flex items-center justify-center gap-2 text-xs text-muted-foreground", children: [
|
|
20631
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("span", { children: t("chat.poweredBy") }),
|
|
20632
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(ContextUsageIndicator, { className: "absolute right-4" })
|
|
20405
20633
|
] })
|
|
20406
20634
|
]
|
|
20407
20635
|
}
|
|
20408
20636
|
),
|
|
20409
|
-
/* @__PURE__ */ (0,
|
|
20637
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
20410
20638
|
SettingsSheet,
|
|
20411
20639
|
{
|
|
20412
20640
|
open: petSettingsOpen,
|
|
@@ -20416,11 +20644,11 @@ function Chat({
|
|
|
20416
20644
|
onSave: savePetLocalSettings
|
|
20417
20645
|
}
|
|
20418
20646
|
),
|
|
20419
|
-
/* @__PURE__ */ (0,
|
|
20647
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(PetBridge, { pet: effectivePet, state: petAutoState })
|
|
20420
20648
|
]
|
|
20421
20649
|
}
|
|
20422
20650
|
),
|
|
20423
|
-
taskSummaryAvailable && taskSummaryDocked && taskSummaryOpen && /* @__PURE__ */ (0,
|
|
20651
|
+
taskSummaryAvailable && taskSummaryDocked && taskSummaryOpen && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { className: "pointer-events-none absolute right-5 top-3 z-20 max-h-[calc(100%-1.5rem)] w-80", children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
20424
20652
|
TaskSummaryPanel,
|
|
20425
20653
|
{
|
|
20426
20654
|
...taskSummaryProps,
|
|
@@ -20433,10 +20661,10 @@ function Chat({
|
|
|
20433
20661
|
}
|
|
20434
20662
|
|
|
20435
20663
|
// src/components/ui/separator.tsx
|
|
20436
|
-
var
|
|
20437
|
-
var
|
|
20438
|
-
var Separator =
|
|
20439
|
-
({ className, orientation = "horizontal", ...props }, ref) => /* @__PURE__ */ (0,
|
|
20664
|
+
var React56 = __toESM(require("react"), 1);
|
|
20665
|
+
var import_jsx_runtime60 = require("react/jsx-runtime");
|
|
20666
|
+
var Separator = React56.forwardRef(
|
|
20667
|
+
({ className, orientation = "horizontal", ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
|
20440
20668
|
"div",
|
|
20441
20669
|
{
|
|
20442
20670
|
ref,
|