@xpert-ai/chatkit-ui 0.0.10 → 0.0.15
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/{abap-CpKSSrK_.js → abap-BWs0QYPi.js} +1 -1
- package/dist/app/assets/{abnf-BVL0u9PX.js → abnf-D836Ekee.js} +1 -1
- package/dist/app/assets/{actionscript-C_sqaulT.js → actionscript-DwxVdnYd.js} +1 -1
- package/dist/app/assets/{ada-CUBoAgmH.js → ada-DuqPZP7y.js} +1 -1
- package/dist/app/assets/{agda-BDxdJxRp.js → agda--lKV47zi.js} +1 -1
- package/dist/app/assets/{al-i9blZBn9.js → al-DmWukAFp.js} +1 -1
- package/dist/app/assets/{antlr4-cDPlCT9z.js → antlr4-Cui9A7Z6.js} +1 -1
- package/dist/app/assets/{apacheconf-mx1wZ8Bm.js → apacheconf-p7Nhi2d3.js} +1 -1
- package/dist/app/assets/{apex-DMI3JjWh.js → apex-wwNmkUuv.js} +1 -1
- package/dist/app/assets/{apl-_8ogJZ7X.js → apl-CQGwfDry.js} +1 -1
- package/dist/app/assets/{applescript-BWFg5Ha1.js → applescript-CxRglPCi.js} +1 -1
- package/dist/app/assets/{aql-D_EqAs4I.js → aql-DzrzGLDh.js} +1 -1
- package/dist/app/assets/{arduino-DrH35aeU.js → arduino-Bl4m690J.js} +1 -1
- package/dist/app/assets/{arff-DQqF3M_l.js → arff-Bi4yNRUp.js} +1 -1
- package/dist/app/assets/{asciidoc-C4IoUu6K.js → asciidoc-CPTTRBXf.js} +1 -1
- package/dist/app/assets/{asm6502-BQ6KGqID.js → asm6502-CBolQ2s3.js} +1 -1
- package/dist/app/assets/{asmatmel-DHU7bQLh.js → asmatmel-DwyOAW8C.js} +1 -1
- package/dist/app/assets/{aspnet-BSyGAXSd.js → aspnet-K1n3IryN.js} +1 -1
- package/dist/app/assets/{autohotkey-CEssrsWy.js → autohotkey-DKr5NeGL.js} +1 -1
- package/dist/app/assets/{autoit-DFqGJrrh.js → autoit-BmaRQ3eS.js} +1 -1
- package/dist/app/assets/{avisynth-D8lXWMQA.js → avisynth-B5jllq4s.js} +1 -1
- package/dist/app/assets/{avro-idl-MjcQcvjH.js → avro-idl-D79eqXPk.js} +1 -1
- package/dist/app/assets/{bash-BR_8TZ7p.js → bash-DWI44uVu.js} +1 -1
- package/dist/app/assets/{basic-CBfC-BKI.js → basic-DX5tJRab.js} +1 -1
- package/dist/app/assets/{batch-BYpzJTg5.js → batch-BZon0dQf.js} +1 -1
- package/dist/app/assets/{bbcode-BZ8pPSr8.js → bbcode-CCzrmpJu.js} +1 -1
- package/dist/app/assets/{bicep-GwE5NVdg.js → bicep-BhU89M6Z.js} +1 -1
- package/dist/app/assets/{birb-BeqeGoZ_.js → birb-CpbVfpC3.js} +1 -1
- package/dist/app/assets/{bison-CQwgQQvh.js → bison-C7eKJdUK.js} +1 -1
- package/dist/app/assets/{bnf-BGM0sncB.js → bnf-C41JeurH.js} +1 -1
- package/dist/app/assets/{brainfuck-lB4i24bM.js → brainfuck-DL3BN1lC.js} +1 -1
- package/dist/app/assets/{brightscript-Dl8MNYiF.js → brightscript-C1ciaxot.js} +1 -1
- package/dist/app/assets/{bro-CY-c2xJz.js → bro-DeUBCRiY.js} +1 -1
- package/dist/app/assets/{bsl-Bovqxv8h.js → bsl-BVdoLWrt.js} +1 -1
- package/dist/app/assets/{c-Ci50forI.js → c-D-NlgPSm.js} +1 -1
- package/dist/app/assets/{cfscript-BX3YmBro.js → cfscript-CI77gY57.js} +1 -1
- package/dist/app/assets/{chaiscript-xOdo2D1o.js → chaiscript-D92IIXjK.js} +1 -1
- package/dist/app/assets/{cil-DHUeAnM1.js → cil-Vi00szx4.js} +1 -1
- package/dist/app/assets/{clike-D2eiYtKe.js → clike-K_AYaoxN.js} +1 -1
- package/dist/app/assets/{clojure-B5bjqSmp.js → clojure-IjprIaXK.js} +1 -1
- package/dist/app/assets/{cmake-BxDL9iad.js → cmake-CiZsn6Cd.js} +1 -1
- package/dist/app/assets/{cobol-BpXwlbJI.js → cobol-BsMCYJOB.js} +1 -1
- package/dist/app/assets/{coffeescript-Nv9bpn0a.js → coffeescript-Tn0NVIMO.js} +1 -1
- package/dist/app/assets/{concurnas-BPP9Cnh4.js → concurnas-Qkduv-yR.js} +1 -1
- package/dist/app/assets/{coq-Dx6VfsEA.js → coq-CkiZ3gEL.js} +1 -1
- package/dist/app/assets/{core-CaWqkwwr.js → core-BIe9U2bi.js} +1 -1
- package/dist/app/assets/{cpp-DdnjSWFZ.js → cpp-DUkuUOiy.js} +1 -1
- package/dist/app/assets/{crystal-CWe_65uG.js → crystal-DzDaEh84.js} +1 -1
- package/dist/app/assets/{csharp-Cdi1xWuC.js → csharp-Ds4tzl1h.js} +1 -1
- package/dist/app/assets/{cshtml-B4G8DJ3U.js → cshtml-XSfeicox.js} +1 -1
- package/dist/app/assets/{csp-mPeZI98g.js → csp-BnuytBc2.js} +1 -1
- package/dist/app/assets/{css-extras-y3PUbTY5.js → css-extras-BYbzAK7f.js} +1 -1
- package/dist/app/assets/{css-BvF-zJtq.js → css-uvHkMV3H.js} +1 -1
- package/dist/app/assets/{csv-vWHT1ozX.js → csv-ZTBDHIMG.js} +1 -1
- package/dist/app/assets/{cypher-C3VwuNjB.js → cypher-8jmGfbdR.js} +1 -1
- package/dist/app/assets/{d-ChOi10nO.js → d-DFbflmjx.js} +1 -1
- package/dist/app/assets/{dart-l5mU-ZLY.js → dart-xe2OJ0zL.js} +1 -1
- package/dist/app/assets/{dataweave-CsDj_aMO.js → dataweave-cyUIz_PL.js} +1 -1
- package/dist/app/assets/{dax-DJOHLMB9.js → dax-BnxULnvb.js} +1 -1
- package/dist/app/assets/{dhall-DQm-mZhA.js → dhall-DkVQZ3C3.js} +1 -1
- package/dist/app/assets/{diff-BVwIh1po.js → diff-u2elSjyY.js} +1 -1
- package/dist/app/assets/{django-DtsnWdmi.js → django-DWfaa1BH.js} +1 -1
- package/dist/app/assets/{dns-zone-file-Bt1skU7w.js → dns-zone-file-BxxD9YiY.js} +1 -1
- package/dist/app/assets/{docker-BlsPFCy3.js → docker-agJ_fYVN.js} +1 -1
- package/dist/app/assets/{dot-DUVVSuew.js → dot-DfK48nzU.js} +1 -1
- package/dist/app/assets/{ebnf-BsDLHJKX.js → ebnf-D2_uN5ZR.js} +1 -1
- package/dist/app/assets/{editorconfig-BS0KK0Ub.js → editorconfig-Bkm8bu86.js} +1 -1
- package/dist/app/assets/{eiffel-b4q1Q1qO.js → eiffel-KNdMI65Y.js} +1 -1
- package/dist/app/assets/{ejs-Dww-1ssh.js → ejs-CscaSYIN.js} +1 -1
- package/dist/app/assets/{elixir-BnCqGTxk.js → elixir-BNlWI1r7.js} +1 -1
- package/dist/app/assets/{elm-BlcyOCTR.js → elm-CNwbF3_9.js} +1 -1
- package/dist/app/assets/{erb-IU9eqmmY.js → erb-DtFL1xmZ.js} +1 -1
- package/dist/app/assets/{erlang-DA1rWFnM.js → erlang-C0jBeitv.js} +1 -1
- package/dist/app/assets/{etlua-CaxgZH-h.js → etlua-B_FYDHoo.js} +1 -1
- package/dist/app/assets/{excel-formula-Cf8-wBDh.js → excel-formula-Ddk-Nf9I.js} +1 -1
- package/dist/app/assets/{factor-Tcum1DGN.js → factor-CmwX-7Jh.js} +1 -1
- package/dist/app/assets/{false-6Loz_2ZI.js → false-DyBWE4qx.js} +1 -1
- package/dist/app/assets/{firestore-security-rules-DSOwpbPT.js → firestore-security-rules-BnA9yQQx.js} +1 -1
- package/dist/app/assets/{flow-BYv59F4U.js → flow-DN7IgZst.js} +1 -1
- package/dist/app/assets/{fortran-1Ynd1g_l.js → fortran-CWBI75l9.js} +1 -1
- package/dist/app/assets/{fsharp-DKtLBT4N.js → fsharp-Be4_1ptQ.js} +1 -1
- package/dist/app/assets/{ftl-rOBeTgCe.js → ftl-CGRdQf4s.js} +1 -1
- package/dist/app/assets/{gap-CLCkiuT_.js → gap-BKioDcPC.js} +1 -1
- package/dist/app/assets/{gcode-fZi1s7qd.js → gcode-Dn2cLzkC.js} +1 -1
- package/dist/app/assets/{gdscript-D791ThWx.js → gdscript-CJOS-gjk.js} +1 -1
- package/dist/app/assets/{gedcom-BSxk86Bn.js → gedcom-CplceX5G.js} +1 -1
- package/dist/app/assets/{gherkin-DSJcm4x_.js → gherkin-DMSysr5I.js} +1 -1
- package/dist/app/assets/{git-B9-mQ4_l.js → git-CPW7sXGf.js} +1 -1
- package/dist/app/assets/{glsl-DregI2-u.js → glsl-k-facHOT.js} +1 -1
- package/dist/app/assets/{gml-BhaH01cU.js → gml-CV--3uCc.js} +1 -1
- package/dist/app/assets/{gn-CXxPFJQ_.js → gn-jkosEbNS.js} +1 -1
- package/dist/app/assets/{go-DP3Jxp6y.js → go-BNQLRlmA.js} +1 -1
- package/dist/app/assets/{go-module-CiAIsLM3.js → go-module-DbWOj2H0.js} +1 -1
- package/dist/app/assets/{graphql-CaSbVnLG.js → graphql-usPW3Fl7.js} +1 -1
- package/dist/app/assets/{groovy-D6HAXDfs.js → groovy-MKE1O2R9.js} +1 -1
- package/dist/app/assets/{haml-CwutxnJD.js → haml-_mDStvsq.js} +1 -1
- package/dist/app/assets/{handlebars-B-09CZ7P.js → handlebars-CIl8TmZq.js} +1 -1
- package/dist/app/assets/{haskell-Rze2y2YD.js → haskell-Cm4BzUdQ.js} +1 -1
- package/dist/app/assets/{haxe-DaQGjvgL.js → haxe-COKxOzXV.js} +1 -1
- package/dist/app/assets/{hcl-BZbr_bNr.js → hcl-DUZa-9cr.js} +1 -1
- package/dist/app/assets/{hlsl-Bz26R-03.js → hlsl-Dxo1rrBG.js} +1 -1
- package/dist/app/assets/{hoon-Bdr0VJqd.js → hoon-DZk8Paai.js} +1 -1
- package/dist/app/assets/{hpkp-Dq_sBE4w.js → hpkp-Bf9ZU2kJ.js} +1 -1
- package/dist/app/assets/{hsts-Bt89fuV0.js → hsts-CMX9dH_c.js} +1 -1
- package/dist/app/assets/{http-B3HJMLFi.js → http-BdPDUUlX.js} +1 -1
- package/dist/app/assets/{ichigojam-DSGx2rww.js → ichigojam-DZWqQfTk.js} +1 -1
- package/dist/app/assets/{icon-BsSu7TVp.js → icon-CSC5VGP_.js} +1 -1
- package/dist/app/assets/{icu-message-format-B9aA-RMV.js → icu-message-format-CtRFWyFe.js} +1 -1
- package/dist/app/assets/{idris-Bw5AhjWp.js → idris-D2LDs3co.js} +1 -1
- package/dist/app/assets/{iecst-B3d92Fx8.js → iecst-kpaa10GT.js} +1 -1
- package/dist/app/assets/{ignore-CjZeEZ3Q.js → ignore-B6TeQ2cq.js} +1 -1
- package/dist/app/assets/{index-DsJq9G3Y.js → index-C9w4yW8p.js} +92 -92
- package/dist/app/assets/index-DcB156i0.css +1 -0
- package/dist/app/assets/{inform7-V8411CET.js → inform7-B2DiX5z0.js} +1 -1
- package/dist/app/assets/{ini-CXdKYDPt.js → ini-CJgz2CJx.js} +1 -1
- package/dist/app/assets/{io-gXeCsUNI.js → io-C4PjllHD.js} +1 -1
- package/dist/app/assets/{j-MV0gySsy.js → j-BKSoIQwQ.js} +1 -1
- package/dist/app/assets/{java-CcFTmX5o.js → java-CHbVZ6UP.js} +1 -1
- package/dist/app/assets/{javadoc-CwBHzHZi.js → javadoc-CPqAjHoM.js} +1 -1
- package/dist/app/assets/{javadoclike-DNbF66_R.js → javadoclike-Bs-8xh3H.js} +1 -1
- package/dist/app/assets/{javascript-Dal0il8M.js → javascript-BT_NpjyP.js} +1 -1
- package/dist/app/assets/{javastacktrace-C8Nlpi-O.js → javastacktrace-Drjxr-oB.js} +1 -1
- package/dist/app/assets/{jexl-CECnT_QW.js → jexl-BxjDgVx9.js} +1 -1
- package/dist/app/assets/{jolie-Cts9p6KC.js → jolie-BqMpKk0G.js} +1 -1
- package/dist/app/assets/{jq-xBk2Ii8R.js → jq-BHUHr0op.js} +1 -1
- package/dist/app/assets/{js-extras-96PL4Xzt.js → js-extras-D4wvqur3.js} +1 -1
- package/dist/app/assets/{js-templates-CokWOpKv.js → js-templates-Yv-O3_U6.js} +1 -1
- package/dist/app/assets/{jsdoc-K25GfokP.js → jsdoc-OgQO3nf9.js} +1 -1
- package/dist/app/assets/{json-C9kjgKRj.js → json-DVZtz_Zz.js} +1 -1
- package/dist/app/assets/{json5-c50Ziatt.js → json5--f2Givq3.js} +1 -1
- package/dist/app/assets/{jsonp-COjtpHbV.js → jsonp-DVGUcHMz.js} +1 -1
- package/dist/app/assets/{jsstacktrace-CidimJ1y.js → jsstacktrace-D-yoMr1R.js} +1 -1
- package/dist/app/assets/{jsx-CJ1L9gGr.js → jsx-C05X4U8h.js} +1 -1
- package/dist/app/assets/{julia-Da_SbRf5.js → julia-DgnoOAdD.js} +1 -1
- package/dist/app/assets/{keepalived-CCfn5QsH.js → keepalived-JD08MytA.js} +1 -1
- package/dist/app/assets/{keyman-D8n_akBV.js → keyman-azrDuGNy.js} +1 -1
- package/dist/app/assets/{kotlin-Bt7rRlVU.js → kotlin-Bq9qLl8S.js} +1 -1
- package/dist/app/assets/{kumir-atdRvqMo.js → kumir-BaIa8IWz.js} +1 -1
- package/dist/app/assets/{kusto-BvFMNTpU.js → kusto-DQhcCWAA.js} +1 -1
- package/dist/app/assets/{latex-BO5DV-cv.js → latex-qLbFVwxL.js} +1 -1
- package/dist/app/assets/{latte-BEVR_4ug.js → latte-BIpeH7ye.js} +1 -1
- package/dist/app/assets/{less-cGeYdUe_.js → less-DCAm2XKc.js} +1 -1
- package/dist/app/assets/{lilypond-Bp-dNtuQ.js → lilypond-URqh-pba.js} +1 -1
- package/dist/app/assets/{liquid-Cz2pxm0P.js → liquid-BdNjEMRj.js} +1 -1
- package/dist/app/assets/{lisp-Z9LREmfl.js → lisp-DdMDpbFO.js} +1 -1
- package/dist/app/assets/{livescript-StFGOYPb.js → livescript-YUBYodrC.js} +1 -1
- package/dist/app/assets/{llvm-Cds-XkAH.js → llvm-BdNAFhzC.js} +1 -1
- package/dist/app/assets/{log-8qUXyVEA.js → log-BdA3w0be.js} +1 -1
- package/dist/app/assets/{lolcode-Cgo0rvKo.js → lolcode-BqnlYMBu.js} +1 -1
- package/dist/app/assets/{lua-TNAGVpxz.js → lua-Z_Qxo3dR.js} +1 -1
- package/dist/app/assets/{magma-Bbg_k1Wk.js → magma-rsT2u-lT.js} +1 -1
- package/dist/app/assets/{makefile-cGqvB5Kg.js → makefile-CrrMmdVS.js} +1 -1
- package/dist/app/assets/{markdown-g8a_a-sS.js → markdown-B5hh6ods.js} +1 -1
- package/dist/app/assets/{markup-DYhtb9ZI.js → markup-BiaBQ4Go.js} +1 -1
- package/dist/app/assets/{markup-templating-DEHiISAi.js → markup-templating-CbtO_SGF.js} +1 -1
- package/dist/app/assets/{matlab-8iaEIHxW.js → matlab-BXD-ZhVV.js} +1 -1
- package/dist/app/assets/{maxscript-CS0KzlHa.js → maxscript-NZobaPB9.js} +1 -1
- package/dist/app/assets/{mel-ChDiIUZ_.js → mel-BsjN8CzC.js} +1 -1
- package/dist/app/assets/{mermaid-3zuGECsm.js → mermaid-B5UiXAS_.js} +1 -1
- package/dist/app/assets/{mizar-17truMgB.js → mizar-CuUsPtTq.js} +1 -1
- package/dist/app/assets/{mongodb-DqojEwBP.js → mongodb-D3GB0bU8.js} +1 -1
- package/dist/app/assets/{monkey-Bc2s0UjK.js → monkey-CK-Syk83.js} +1 -1
- package/dist/app/assets/{moonscript-E3I38132.js → moonscript-CxgNQMDf.js} +1 -1
- package/dist/app/assets/{n1ql-BBizmk84.js → n1ql-B0gvukgr.js} +1 -1
- package/dist/app/assets/{n4js-Dvc4iLVa.js → n4js-CSiVWG8j.js} +1 -1
- package/dist/app/assets/{nand2tetris-hdl-UFJ-du_i.js → nand2tetris-hdl-BvvEGqNK.js} +1 -1
- package/dist/app/assets/{naniscript-BcX8rnbm.js → naniscript-45A_ER_d.js} +1 -1
- package/dist/app/assets/{nasm-DyMQBnEQ.js → nasm-CyYsQrbV.js} +1 -1
- package/dist/app/assets/{neon-QMPM5wRg.js → neon-BiKXlKLm.js} +1 -1
- package/dist/app/assets/{nevod-C5ECRbST.js → nevod-8Kv8aVJh.js} +1 -1
- package/dist/app/assets/{nginx-CphFQ-cQ.js → nginx-Cqo-dGUO.js} +1 -1
- package/dist/app/assets/{nim-D7hzQ_1g.js → nim-Cy_EjBaO.js} +1 -1
- package/dist/app/assets/{nix-BhjZpk5E.js → nix-BmTy7l9S.js} +1 -1
- package/dist/app/assets/{nsis-CzR8RsBi.js → nsis-XTneXqGR.js} +1 -1
- package/dist/app/assets/{objectivec-9Ly6bCkw.js → objectivec-Dmg9RHOg.js} +1 -1
- package/dist/app/assets/{ocaml-CtLkifD-.js → ocaml-CWRJM2tE.js} +1 -1
- package/dist/app/assets/{opencl-Cf4alDzT.js → opencl-D8_U7ZHs.js} +1 -1
- package/dist/app/assets/{openqasm-DhL6LJyQ.js → openqasm--Tw4PlEa.js} +1 -1
- package/dist/app/assets/{oz-GygD3dPP.js → oz-D-aUSxpN.js} +1 -1
- package/dist/app/assets/{parigp-BI44AQWQ.js → parigp-MtrGmHWf.js} +1 -1
- package/dist/app/assets/{parser-DhgscZEK.js → parser-h_-AW9-T.js} +1 -1
- package/dist/app/assets/{pascal-OA3KQD1c.js → pascal-DAMDGrIq.js} +1 -1
- package/dist/app/assets/{pascaligo-C9AuMOo1.js → pascaligo-TT68AZ0R.js} +1 -1
- package/dist/app/assets/{pcaxis-Cn_iBIX4.js → pcaxis-BZabfhMp.js} +1 -1
- package/dist/app/assets/{peoplecode-6ysvrf9m.js → peoplecode-8Z4ArX58.js} +1 -1
- package/dist/app/assets/{perl-D0SBzlTM.js → perl-Tf2L_iWK.js} +1 -1
- package/dist/app/assets/{php-Bv3WFIPw.js → php-Citv4wvI.js} +1 -1
- package/dist/app/assets/{php-extras-C4m4KxXp.js → php-extras-CXdnzF7N.js} +1 -1
- package/dist/app/assets/{phpdoc-CSQcFbun.js → phpdoc-D6tsAiH4.js} +1 -1
- package/dist/app/assets/{plsql-DFoZDuWx.js → plsql-DJtQNxFM.js} +1 -1
- package/dist/app/assets/{powerquery-CuTqS8yg.js → powerquery-CP9sQCLl.js} +1 -1
- package/dist/app/assets/{powershell-nfOZtD16.js → powershell-CKCDLWVv.js} +1 -1
- package/dist/app/assets/{processing-_Mu5PGoP.js → processing-D4muvaDA.js} +1 -1
- package/dist/app/assets/{prolog-CdDBEcoh.js → prolog-DqCpmAF7.js} +1 -1
- package/dist/app/assets/{promql-DAFTSFxH.js → promql-DNdbBZJb.js} +1 -1
- package/dist/app/assets/{properties-k1YLbT2B.js → properties-DQUwwb8x.js} +1 -1
- package/dist/app/assets/{protobuf-x-b74FmM.js → protobuf-BNe-4-Ln.js} +1 -1
- package/dist/app/assets/{psl-D9M1e9tE.js → psl-DHT7D5Zu.js} +1 -1
- package/dist/app/assets/{pug-BQKaYoXe.js → pug-BYrNe-ek.js} +1 -1
- package/dist/app/assets/{puppet-DYKy-doo.js → puppet-IzXU2QnL.js} +1 -1
- package/dist/app/assets/{pure-DBhdSPxo.js → pure-C8utNRFH.js} +1 -1
- package/dist/app/assets/{purebasic-BuQZCj3F.js → purebasic-BLFLiyfl.js} +1 -1
- package/dist/app/assets/{purescript-DjomkIsU.js → purescript-CGkGiDmC.js} +1 -1
- package/dist/app/assets/{q-C34Yf54w.js → q-Ch-_c3XY.js} +1 -1
- package/dist/app/assets/{qml-4hOMV25C.js → qml-BCtzfHKg.js} +1 -1
- package/dist/app/assets/{qore-DVhxYCg8.js → qore-6XNyhUtr.js} +1 -1
- package/dist/app/assets/{qsharp-Cu9ikQhz.js → qsharp-KFIiBs-v.js} +1 -1
- package/dist/app/assets/{r-RBQ1N0EN.js → r-VHCTkPpx.js} +1 -1
- package/dist/app/assets/{racket-DHIOKMsi.js → racket-1qTUuxaw.js} +1 -1
- package/dist/app/assets/{reason-6pAE5WHL.js → reason-c3DD7ovu.js} +1 -1
- package/dist/app/assets/{regex-CImx51d0.js → regex-CKlhWzhL.js} +1 -1
- package/dist/app/assets/{rego-BU-67Pl8.js → rego-B6Roc-f_.js} +1 -1
- package/dist/app/assets/{renpy-BObLa0_P.js → renpy-B8vDLdIS.js} +1 -1
- package/dist/app/assets/{rest-B0XQBMma.js → rest-CbuvO7de.js} +1 -1
- package/dist/app/assets/{rip-C7xxwI5-.js → rip-sVuuKWbv.js} +1 -1
- package/dist/app/assets/{roboconf-CTNAlwGm.js → roboconf-BidW62eI.js} +1 -1
- package/dist/app/assets/{robotframework-BaDIC60_.js → robotframework-Cd11Dy3l.js} +1 -1
- package/dist/app/assets/{ruby-DqfcyUfW.js → ruby-BMwY3KVp.js} +1 -1
- package/dist/app/assets/{rust-DaWV8yF5.js → rust-DglFfUim.js} +1 -1
- package/dist/app/assets/{sas-Bc9eJtyC.js → sas-BCWGGNZo.js} +1 -1
- package/dist/app/assets/{sass-BcQymHvs.js → sass-Chbcrpqb.js} +1 -1
- package/dist/app/assets/{scala-BLTMwn3O.js → scala-ClwErATt.js} +1 -1
- package/dist/app/assets/{scheme-CTLVJWSk.js → scheme-mqaymmTS.js} +1 -1
- package/dist/app/assets/{scss-G_jfdfZu.js → scss-BBhxumOr.js} +1 -1
- package/dist/app/assets/{shell-session-DllNhK50.js → shell-session-CuI4Rdf4.js} +1 -1
- package/dist/app/assets/{smali-DushsftM.js → smali-BoavhNXE.js} +1 -1
- package/dist/app/assets/{smalltalk-BEa1xZGu.js → smalltalk-WiUFOepn.js} +1 -1
- package/dist/app/assets/{smarty-RcUfBAkv.js → smarty-BP4mWIwR.js} +1 -1
- package/dist/app/assets/{sml-8LNIbU09.js → sml-AFqGvMHc.js} +1 -1
- package/dist/app/assets/{solidity-CW_UWxm8.js → solidity-D5h9njh8.js} +1 -1
- package/dist/app/assets/{solution-file-C5CMiaVP.js → solution-file-BLK1IrUz.js} +1 -1
- package/dist/app/assets/{soy-COA_5a7p.js → soy-Cf8u5dko.js} +1 -1
- package/dist/app/assets/{sparql-CdX0zIp-.js → sparql-C9KxnH23.js} +1 -1
- package/dist/app/assets/{splunk-spl-B21-S-YP.js → splunk-spl-BxUXtsOD.js} +1 -1
- package/dist/app/assets/{sqf-DeUK-4FI.js → sqf-qlV7g48i.js} +1 -1
- package/dist/app/assets/{sql-DLFpBqel.js → sql-C-p1pos9.js} +1 -1
- package/dist/app/assets/{squirrel-Bc1aJmaR.js → squirrel-PX1Grtap.js} +1 -1
- package/dist/app/assets/{stan-BHpxt81_.js → stan-zV2a82m3.js} +1 -1
- package/dist/app/assets/{stylus-S_RdPnv3.js → stylus-BrnUo9zO.js} +1 -1
- package/dist/app/assets/{swift-BLpPX7bb.js → swift-Byy18r0p.js} +1 -1
- package/dist/app/assets/{systemd-XzcG5qYo.js → systemd-BtqJkXRf.js} +1 -1
- package/dist/app/assets/{t4-cs-D0TWCunk.js → t4-cs-C5jp0bkn.js} +1 -1
- package/dist/app/assets/{t4-templating-CTrL1aFu.js → t4-templating-Bmu7FZgm.js} +1 -1
- package/dist/app/assets/{t4-vb-Dxpfhuge.js → t4-vb-CczRCjMn.js} +1 -1
- package/dist/app/assets/{tap-DoPStLfm.js → tap-DUhOrRiK.js} +1 -1
- package/dist/app/assets/{tcl-CBS_qmhg.js → tcl-BGDNQuGV.js} +1 -1
- package/dist/app/assets/{textile-O4oRd_9w.js → textile-BGym3KVm.js} +1 -1
- package/dist/app/assets/{toml-5hU_kRjA.js → toml-h2DQ44P0.js} +1 -1
- package/dist/app/assets/{tremor-DvaedV-L.js → tremor-CwHv-OnP.js} +1 -1
- package/dist/app/assets/{tt2-DVC5dSpd.js → tt2-qgYZXJPR.js} +1 -1
- package/dist/app/assets/{turtle-DzoC7tSw.js → turtle-Czr_CW8r.js} +1 -1
- package/dist/app/assets/{twig-BwT0hHAM.js → twig-Bq_oAHcm.js} +1 -1
- package/dist/app/assets/{typescript-DnwlJMwN.js → typescript-mXKzIg0y.js} +1 -1
- package/dist/app/assets/{typoscript-D9mi76Z6.js → typoscript-CLdCbPty.js} +1 -1
- package/dist/app/assets/{unrealscript-BzoQxa7m.js → unrealscript-CdYUVWsh.js} +1 -1
- package/dist/app/assets/{uorazor-BARW-iHJ.js → uorazor-DxNXLQYo.js} +1 -1
- package/dist/app/assets/{uri-BBOwFVE7.js → uri-DYk5U2Tx.js} +1 -1
- package/dist/app/assets/{v-D3zLLIBD.js → v-ZpnMXAp_.js} +1 -1
- package/dist/app/assets/{vala-3b-dcq6R.js → vala-hVJU5BfN.js} +1 -1
- package/dist/app/assets/{vbnet-CD1ZGMUz.js → vbnet-CmY51d5G.js} +1 -1
- package/dist/app/assets/{velocity-DSd9gnso.js → velocity-CsvRt2hb.js} +1 -1
- package/dist/app/assets/{verilog-pAsLW3hb.js → verilog-CPo8f42m.js} +1 -1
- package/dist/app/assets/{vhdl-CFoWg-80.js → vhdl-WKsKMPi0.js} +1 -1
- package/dist/app/assets/{vim-BNStWbIH.js → vim-BgsS8AXO.js} +1 -1
- package/dist/app/assets/{visual-basic-CiP_BG8f.js → visual-basic-CufJPq0T.js} +1 -1
- package/dist/app/assets/{warpscript-BArUOgos.js → warpscript-BMGdLyX8.js} +1 -1
- package/dist/app/assets/{wasm-DeM1Oodx.js → wasm-BwoGQtY0.js} +1 -1
- package/dist/app/assets/{web-idl-D6levqn0.js → web-idl-CQh6nLUF.js} +1 -1
- package/dist/app/assets/{wiki-BzldQZnm.js → wiki-BBUQmhnv.js} +1 -1
- package/dist/app/assets/{wolfram-DLPWbLkb.js → wolfram-TAz_4SnR.js} +1 -1
- package/dist/app/assets/{wren-Bt3dBH59.js → wren-CVPXcwur.js} +1 -1
- package/dist/app/assets/{xeora-Djb93XZz.js → xeora-DFQOGccv.js} +1 -1
- package/dist/app/assets/{xml-doc-SPRrWf4t.js → xml-doc-DU62FPEw.js} +1 -1
- package/dist/app/assets/{xojo-Borowp2a.js → xojo-CRo0kja2.js} +1 -1
- package/dist/app/assets/{xquery-CJ9PQJbE.js → xquery-lrNjl9FO.js} +1 -1
- package/dist/app/assets/{yaml-CpR62_uk.js → yaml-PqToDf_Q.js} +1 -1
- package/dist/app/assets/{yang-DTdx8_iE.js → yang-BQDTSngB.js} +1 -1
- package/dist/app/assets/{zig-7s1xAY_j.js → zig-D_9EoT5C.js} +1 -1
- package/dist/app/index.html +2 -2
- package/dist/index.cjs +363 -106
- package/dist/index.js +363 -106
- package/package.json +6 -7
- package/dist/app/assets/index-DAcglDE0.css +0 -1
package/dist/index.cjs
CHANGED
|
@@ -62,7 +62,7 @@ __export(index_exports, {
|
|
|
62
62
|
module.exports = __toCommonJS(index_exports);
|
|
63
63
|
|
|
64
64
|
// src/components/chat.tsx
|
|
65
|
-
var
|
|
65
|
+
var React18 = __toESM(require("react"), 1);
|
|
66
66
|
var import_lucide_react9 = require("lucide-react");
|
|
67
67
|
|
|
68
68
|
// src/lib/utils.ts
|
|
@@ -381,7 +381,7 @@ var buttonVariants = (0, import_class_variance_authority.cva)(
|
|
|
381
381
|
function Button({
|
|
382
382
|
className,
|
|
383
383
|
variant = "default",
|
|
384
|
-
size = "default",
|
|
384
|
+
size: size2 = "default",
|
|
385
385
|
asChild = false,
|
|
386
386
|
...props
|
|
387
387
|
}) {
|
|
@@ -391,8 +391,8 @@ function Button({
|
|
|
391
391
|
{
|
|
392
392
|
"data-slot": "button",
|
|
393
393
|
"data-variant": variant,
|
|
394
|
-
"data-size":
|
|
395
|
-
className: cn(buttonVariants({ variant, size, className })),
|
|
394
|
+
"data-size": size2,
|
|
395
|
+
className: cn(buttonVariants({ variant, size: size2, className })),
|
|
396
396
|
...props
|
|
397
397
|
}
|
|
398
398
|
);
|
|
@@ -457,6 +457,11 @@ var en_US_default = {
|
|
|
457
457
|
loadMessages: "Failed to load thread messages",
|
|
458
458
|
createThread: "Failed to create thread",
|
|
459
459
|
deleteThread: "Failed to delete thread"
|
|
460
|
+
},
|
|
461
|
+
contextUsage: {
|
|
462
|
+
label: "Context window",
|
|
463
|
+
full: "{{usedPercent}}% used ({{remainingPercent}}% left)",
|
|
464
|
+
tokensUsed: "{{used}} / {{max}} tokens used"
|
|
460
465
|
}
|
|
461
466
|
},
|
|
462
467
|
history: {
|
|
@@ -510,6 +515,11 @@ var zh_CN_default = {
|
|
|
510
515
|
loadMessages: "\u52A0\u8F7D\u7EBF\u7A0B\u6D88\u606F\u5931\u8D25",
|
|
511
516
|
createThread: "\u521B\u5EFA\u7EBF\u7A0B\u5931\u8D25",
|
|
512
517
|
deleteThread: "\u5220\u9664\u7EBF\u7A0B\u5931\u8D25"
|
|
518
|
+
},
|
|
519
|
+
contextUsage: {
|
|
520
|
+
label: "\u4E0A\u4E0B\u6587\u7A97\u53E3",
|
|
521
|
+
full: "\u5DF2\u4F7F\u7528 {{usedPercent}}%\uFF08\u5269\u4F59 {{remainingPercent}}%\uFF09",
|
|
522
|
+
tokensUsed: "\u5DF2\u4F7F\u7528 {{used}} / {{max}} tokens"
|
|
513
523
|
}
|
|
514
524
|
},
|
|
515
525
|
history: {
|
|
@@ -1943,14 +1953,24 @@ function MemoryBlock({ content }) {
|
|
|
1943
1953
|
}
|
|
1944
1954
|
function ComponentBlock({ content }) {
|
|
1945
1955
|
const [isExpanded, setIsExpanded] = React13.useState(false);
|
|
1956
|
+
const contentRef = React13.useRef(null);
|
|
1946
1957
|
const data = content.data ?? {};
|
|
1947
|
-
const
|
|
1948
|
-
const
|
|
1949
|
-
const status =
|
|
1950
|
-
const message =
|
|
1951
|
-
const output =
|
|
1952
|
-
const error = data.error
|
|
1958
|
+
const category = data.category ?? "Component";
|
|
1959
|
+
const title = data.tool && category === "Tool" ? data.tool : data.title ?? data.type ?? "Component";
|
|
1960
|
+
const status = data.status ?? null;
|
|
1961
|
+
const message = data.message ?? null;
|
|
1962
|
+
const output = data.output ?? null;
|
|
1963
|
+
const error = data.error ?? null;
|
|
1953
1964
|
const fallback = message ?? output ?? safeJson(data.data ?? data);
|
|
1965
|
+
const hasOutput = message !== null || output !== null;
|
|
1966
|
+
React13.useEffect(() => {
|
|
1967
|
+
if (status === "running" && output !== null) setIsExpanded(true);
|
|
1968
|
+
}, [status, output]);
|
|
1969
|
+
React13.useEffect(() => {
|
|
1970
|
+
if (status === "running" && contentRef.current) {
|
|
1971
|
+
contentRef.current.scrollTop = contentRef.current.scrollHeight;
|
|
1972
|
+
}
|
|
1973
|
+
}, [status, output]);
|
|
1954
1974
|
const config = status ? statusConfig[status] : null;
|
|
1955
1975
|
const StatusIcon = config?.icon;
|
|
1956
1976
|
return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(Card, { children: [
|
|
@@ -1976,9 +1996,9 @@ function ComponentBlock({ content }) {
|
|
|
1976
1996
|
)
|
|
1977
1997
|
] })
|
|
1978
1998
|
] }),
|
|
1979
|
-
isExpanded && /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(CardContent, { className: "text-xs text-muted-foreground max-h-60 overflow-auto", children: [
|
|
1999
|
+
isExpanded && /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(CardContent, { ref: contentRef, className: "text-xs text-muted-foreground max-h-60 overflow-auto", children: [
|
|
1980
2000
|
data.input && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("pre", { className: "whitespace-pre-wrap wrap-break-word", children: JSON.stringify(data.input, null, 2) }),
|
|
1981
|
-
error ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("pre", { className: "whitespace-pre-wrap wrap-break-word text-destructive", children: typeof error === "string" ? error : safeJson(error) }) :
|
|
2001
|
+
error ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("pre", { className: "whitespace-pre-wrap wrap-break-word text-destructive", children: typeof error === "string" ? error : safeJson(error) }) : hasOutput && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("pre", { className: "whitespace-pre-wrap wrap-break-word", children: fallback })
|
|
1982
2002
|
] })
|
|
1983
2003
|
] });
|
|
1984
2004
|
}
|
|
@@ -2179,6 +2199,8 @@ var toThreadItem = (threadRecord) => ({
|
|
|
2179
2199
|
id: threadRecord.threadId ?? threadRecord.id,
|
|
2180
2200
|
recordId: threadRecord.id,
|
|
2181
2201
|
title: getThreadTitle(threadRecord),
|
|
2202
|
+
status: threadRecord.status || "idle",
|
|
2203
|
+
error: threadRecord.error,
|
|
2182
2204
|
lastMessageAt: toDate(threadRecord.updatedAt)
|
|
2183
2205
|
});
|
|
2184
2206
|
var sortThreadRecords = (threadRecords) => {
|
|
@@ -2189,7 +2211,13 @@ var sortThreadRecords = (threadRecords) => {
|
|
|
2189
2211
|
});
|
|
2190
2212
|
};
|
|
2191
2213
|
function useThreads(limit = DEFAULT_LIMIT) {
|
|
2192
|
-
const {
|
|
2214
|
+
const {
|
|
2215
|
+
client,
|
|
2216
|
+
threadId,
|
|
2217
|
+
assistantId,
|
|
2218
|
+
isReady,
|
|
2219
|
+
isLoading: isStreamLoading
|
|
2220
|
+
} = useStreamContext();
|
|
2193
2221
|
const [threadRecords, setThreadRecords] = React16.useState([]);
|
|
2194
2222
|
const [isLoading, setIsLoading] = React16.useState(false);
|
|
2195
2223
|
const [error, setError] = React16.useState(null);
|
|
@@ -2251,16 +2279,39 @@ function useThreads(limit = DEFAULT_LIMIT) {
|
|
|
2251
2279
|
void refreshThreads();
|
|
2252
2280
|
}, [refreshThreads, isReady]);
|
|
2253
2281
|
React16.useEffect(() => {
|
|
2254
|
-
if (!
|
|
2255
|
-
|
|
2256
|
-
|
|
2282
|
+
if (!threadId || !isStreamLoading) return;
|
|
2283
|
+
const now = (/* @__PURE__ */ new Date()).toISOString();
|
|
2284
|
+
setThreadRecords((prev) => {
|
|
2285
|
+
let changed = false;
|
|
2286
|
+
const next = prev.map((item) => {
|
|
2287
|
+
const isCurrentThread = item.threadId === threadId || item.id === threadId;
|
|
2288
|
+
if (!isCurrentThread) return item;
|
|
2289
|
+
if (item.status === "busy" && !item.error) return item;
|
|
2290
|
+
changed = true;
|
|
2291
|
+
return {
|
|
2292
|
+
...item,
|
|
2293
|
+
status: "busy",
|
|
2294
|
+
error: void 0,
|
|
2295
|
+
updatedAt: now
|
|
2296
|
+
};
|
|
2297
|
+
});
|
|
2298
|
+
return changed ? sortThreadRecords(next) : prev;
|
|
2299
|
+
});
|
|
2300
|
+
}, [threadId, isStreamLoading]);
|
|
2301
|
+
React16.useEffect(() => {
|
|
2302
|
+
if (!isReady || !threadId || isStreamLoading) return;
|
|
2303
|
+
let cancelled = false;
|
|
2257
2304
|
void client.conversations.search({ where: { threadId }, limit: 1 }).then((result) => {
|
|
2305
|
+
if (cancelled) return;
|
|
2258
2306
|
const found = result.items?.[0];
|
|
2259
2307
|
if (found) upsertThreadRecord(found);
|
|
2260
2308
|
}).catch((err) => {
|
|
2261
|
-
setError(err);
|
|
2309
|
+
if (!cancelled) setError(err);
|
|
2262
2310
|
});
|
|
2263
|
-
|
|
2311
|
+
return () => {
|
|
2312
|
+
cancelled = true;
|
|
2313
|
+
};
|
|
2314
|
+
}, [client, threadId, upsertThreadRecord, isReady, isStreamLoading]);
|
|
2264
2315
|
const threads = React16.useMemo(
|
|
2265
2316
|
() => threadRecords.map((threadRecord) => toThreadItem(threadRecord)),
|
|
2266
2317
|
[threadRecords]
|
|
@@ -2277,8 +2328,201 @@ function useThreads(limit = DEFAULT_LIMIT) {
|
|
|
2277
2328
|
};
|
|
2278
2329
|
}
|
|
2279
2330
|
|
|
2331
|
+
// src/components/thread/context-usage-indicator.tsx
|
|
2332
|
+
var React17 = __toESM(require("react"), 1);
|
|
2333
|
+
|
|
2334
|
+
// src/components/ui/progress-circle.tsx
|
|
2335
|
+
var import_jsx_runtime22 = (
|
|
2336
|
+
// biome-ignore lint/a11y/useFocusableInteractive: false positive (progress + progressbar are not focusable interactives)
|
|
2337
|
+
// biome-ignore lint/nursery/useAriaPropsSupportedByRole: biome rule at odds with mdn docs (presumed nursary bug with rule)
|
|
2338
|
+
require("react/jsx-runtime")
|
|
2339
|
+
);
|
|
2340
|
+
function clamp(input, a, b) {
|
|
2341
|
+
return Math.max(Math.min(input, Math.max(a, b)), Math.min(a, b));
|
|
2342
|
+
}
|
|
2343
|
+
var size = 24;
|
|
2344
|
+
var strokeWidth = 4;
|
|
2345
|
+
var total = 100;
|
|
2346
|
+
var ProgressCircle = ({ value, className, ...restSvgProps }) => {
|
|
2347
|
+
const normalizedValue = clamp(value, 0, total);
|
|
2348
|
+
const radius = (size - strokeWidth) / 2;
|
|
2349
|
+
const circumference = 2 * Math.PI * radius;
|
|
2350
|
+
const progress = normalizedValue / total * circumference;
|
|
2351
|
+
const halfSize = size / 2;
|
|
2352
|
+
const commonParams = {
|
|
2353
|
+
cx: halfSize,
|
|
2354
|
+
cy: halfSize,
|
|
2355
|
+
r: radius,
|
|
2356
|
+
fill: "none",
|
|
2357
|
+
strokeWidth
|
|
2358
|
+
};
|
|
2359
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
|
|
2360
|
+
"svg",
|
|
2361
|
+
{
|
|
2362
|
+
role: "progressbar",
|
|
2363
|
+
viewBox: `0 0 ${size} ${size}`,
|
|
2364
|
+
className: cn("size-6", className),
|
|
2365
|
+
"aria-valuenow": normalizedValue,
|
|
2366
|
+
"aria-valuemin": 0,
|
|
2367
|
+
"aria-valuemax": 100,
|
|
2368
|
+
...restSvgProps,
|
|
2369
|
+
children: [
|
|
2370
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("circle", { ...commonParams, className: "stroke-current/25" }),
|
|
2371
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
2372
|
+
"circle",
|
|
2373
|
+
{
|
|
2374
|
+
...commonParams,
|
|
2375
|
+
stroke: "currentColor",
|
|
2376
|
+
strokeDasharray: circumference,
|
|
2377
|
+
strokeDashoffset: circumference - progress,
|
|
2378
|
+
strokeLinecap: "round",
|
|
2379
|
+
transform: `rotate(-90 ${halfSize} ${halfSize})`,
|
|
2380
|
+
className: "stroke-current"
|
|
2381
|
+
}
|
|
2382
|
+
)
|
|
2383
|
+
]
|
|
2384
|
+
}
|
|
2385
|
+
);
|
|
2386
|
+
};
|
|
2387
|
+
|
|
2388
|
+
// src/components/thread/context-usage-indicator.tsx
|
|
2389
|
+
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
2390
|
+
var kNumberFormatter = new Intl.NumberFormat("en-US", {
|
|
2391
|
+
minimumFractionDigits: 0,
|
|
2392
|
+
maximumFractionDigits: 1
|
|
2393
|
+
});
|
|
2394
|
+
function normalizeContextSize(value) {
|
|
2395
|
+
if (typeof value === "number" && Number.isFinite(value) && value >= 0) {
|
|
2396
|
+
return Math.floor(value);
|
|
2397
|
+
}
|
|
2398
|
+
if (typeof value === "string") {
|
|
2399
|
+
const parsed = Number.parseInt(value, 10);
|
|
2400
|
+
if (Number.isFinite(parsed) && parsed >= 0) {
|
|
2401
|
+
return parsed;
|
|
2402
|
+
}
|
|
2403
|
+
}
|
|
2404
|
+
return null;
|
|
2405
|
+
}
|
|
2406
|
+
function normalizeAgentKey(value) {
|
|
2407
|
+
if (typeof value !== "string") {
|
|
2408
|
+
return null;
|
|
2409
|
+
}
|
|
2410
|
+
const normalized = value.trim();
|
|
2411
|
+
return normalized ? normalized : null;
|
|
2412
|
+
}
|
|
2413
|
+
function resolveAssistantContextSize(assistant) {
|
|
2414
|
+
return normalizeContextSize(assistant.metadata?.context_size) ?? normalizeContextSize(assistant.config?.configurable?.context_size);
|
|
2415
|
+
}
|
|
2416
|
+
function resolveAssistantAgentKey(assistant) {
|
|
2417
|
+
return normalizeAgentKey(assistant.metadata?.agent_key) ?? normalizeAgentKey(assistant.config?.configurable?.agentKey);
|
|
2418
|
+
}
|
|
2419
|
+
function clampUsage(value, max) {
|
|
2420
|
+
if (typeof value !== "number" || !Number.isFinite(value) || value < 0) {
|
|
2421
|
+
return 0;
|
|
2422
|
+
}
|
|
2423
|
+
return Math.min(Math.floor(value), max);
|
|
2424
|
+
}
|
|
2425
|
+
function formatCountInK(value) {
|
|
2426
|
+
return `${kNumberFormatter.format(value / 1e3)}k`;
|
|
2427
|
+
}
|
|
2428
|
+
function ContextUsageIndicator({
|
|
2429
|
+
label,
|
|
2430
|
+
className
|
|
2431
|
+
}) {
|
|
2432
|
+
const { t } = useChatkitTranslation();
|
|
2433
|
+
const stream = useStreamContext();
|
|
2434
|
+
const [maxContextSize, setMaxContextSize] = React17.useState(null);
|
|
2435
|
+
const [usedContextSize, setUsedContextSize] = React17.useState(null);
|
|
2436
|
+
const [assistantAgentKey, setAssistantAgentKey] = React17.useState(null);
|
|
2437
|
+
React17.useEffect(() => {
|
|
2438
|
+
if (!stream.client || !stream.assistantId) {
|
|
2439
|
+
setMaxContextSize(null);
|
|
2440
|
+
setAssistantAgentKey(null);
|
|
2441
|
+
return;
|
|
2442
|
+
}
|
|
2443
|
+
let cancelled = false;
|
|
2444
|
+
stream.client.assistants.get(stream.assistantId).then((assistant) => {
|
|
2445
|
+
if (cancelled || !assistant) return;
|
|
2446
|
+
setMaxContextSize(resolveAssistantContextSize(assistant));
|
|
2447
|
+
setAssistantAgentKey(resolveAssistantAgentKey(assistant));
|
|
2448
|
+
}).catch((err) => {
|
|
2449
|
+
if (cancelled) return;
|
|
2450
|
+
console.warn("[Chat] Failed to load assistant context size:", err);
|
|
2451
|
+
setAssistantAgentKey(null);
|
|
2452
|
+
});
|
|
2453
|
+
return () => {
|
|
2454
|
+
cancelled = true;
|
|
2455
|
+
};
|
|
2456
|
+
}, [stream.client, stream.assistantId]);
|
|
2457
|
+
React17.useEffect(() => {
|
|
2458
|
+
if (!stream.client) {
|
|
2459
|
+
setUsedContextSize(null);
|
|
2460
|
+
return;
|
|
2461
|
+
}
|
|
2462
|
+
if (!stream.threadId) {
|
|
2463
|
+
setUsedContextSize(0);
|
|
2464
|
+
return;
|
|
2465
|
+
}
|
|
2466
|
+
if (stream.isLoading) return;
|
|
2467
|
+
let cancelled = false;
|
|
2468
|
+
stream.client.threads.getContextUsage(
|
|
2469
|
+
stream.threadId,
|
|
2470
|
+
assistantAgentKey ? { agentKey: assistantAgentKey } : void 0
|
|
2471
|
+
).then((result) => normalizeContextSize(result?.usage?.context_tokens)).then((result) => {
|
|
2472
|
+
if (cancelled) return;
|
|
2473
|
+
setUsedContextSize(result ?? 0);
|
|
2474
|
+
}).catch((err) => {
|
|
2475
|
+
if (cancelled) return;
|
|
2476
|
+
console.warn("[Chat] Failed to load thread context usage:", err);
|
|
2477
|
+
});
|
|
2478
|
+
return () => {
|
|
2479
|
+
cancelled = true;
|
|
2480
|
+
};
|
|
2481
|
+
}, [assistantAgentKey, stream.apiKey, stream.apiUrl, stream.client, stream.threadId, stream.isLoading]);
|
|
2482
|
+
if (typeof maxContextSize !== "number" || !Number.isFinite(maxContextSize) || maxContextSize <= 0) {
|
|
2483
|
+
return null;
|
|
2484
|
+
}
|
|
2485
|
+
const max = Math.floor(maxContextSize);
|
|
2486
|
+
const used = clampUsage(usedContextSize, max);
|
|
2487
|
+
const percent = Math.max(0, Math.min(100, used / max * 100));
|
|
2488
|
+
const roundedPercent = Math.round(percent);
|
|
2489
|
+
const remainingPercent = Math.max(0, 100 - roundedPercent);
|
|
2490
|
+
const formattedUsed = formatCountInK(used);
|
|
2491
|
+
const formattedMax = formatCountInK(max);
|
|
2492
|
+
const usageLabel = label ?? t("chat.contextUsage.label");
|
|
2493
|
+
const usageFullLabel = t("chat.contextUsage.full", {
|
|
2494
|
+
usedPercent: roundedPercent,
|
|
2495
|
+
remainingPercent
|
|
2496
|
+
});
|
|
2497
|
+
const usageTokensLabel = t("chat.contextUsage.tokensUsed", {
|
|
2498
|
+
used: formattedUsed,
|
|
2499
|
+
max: formattedMax
|
|
2500
|
+
});
|
|
2501
|
+
const usageLabelWithSuffix = usageLabel.endsWith(":") ? usageLabel : `${usageLabel}:`;
|
|
2502
|
+
const progressClassName = percent >= 90 ? "text-destructive" : percent >= 75 ? "text-amber-500" : "text-primary dark:text-zinc-300";
|
|
2503
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(Tooltip, { children: [
|
|
2504
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
2505
|
+
"button",
|
|
2506
|
+
{
|
|
2507
|
+
type: "button",
|
|
2508
|
+
className: cn(
|
|
2509
|
+
"inline-flex items-center justify-center rounded-full focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 ring-offset-background",
|
|
2510
|
+
className
|
|
2511
|
+
),
|
|
2512
|
+
"aria-label": `${usageLabelWithSuffix} ${usageFullLabel}. ${usageTokensLabel}`,
|
|
2513
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(ProgressCircle, { value: percent, className: cn("size-3.5", progressClassName) })
|
|
2514
|
+
}
|
|
2515
|
+
) }),
|
|
2516
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(TooltipContent, { side: "top", sideOffset: 6, className: "space-y-0.5 px-3 py-2 text-center", children: [
|
|
2517
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: "text-primary-foreground/70", children: usageLabelWithSuffix }),
|
|
2518
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: "font-medium text-primary-foreground/80", children: usageFullLabel }),
|
|
2519
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: "text-sm font-semibold", children: usageTokensLabel })
|
|
2520
|
+
] })
|
|
2521
|
+
] });
|
|
2522
|
+
}
|
|
2523
|
+
|
|
2280
2524
|
// src/components/chat.tsx
|
|
2281
|
-
var
|
|
2525
|
+
var import_jsx_runtime24 = require("react/jsx-runtime");
|
|
2282
2526
|
var import_meta2 = {};
|
|
2283
2527
|
var defaultApiUrl2 = import_meta2.env.VITE_XPERTAI_API_URL;
|
|
2284
2528
|
function formatMessageContent(content) {
|
|
@@ -2318,16 +2562,16 @@ function Chat({
|
|
|
2318
2562
|
const apiUrl = options?.api?.apiUrl || defaultApiUrl2;
|
|
2319
2563
|
const { setStream } = useStreamManager();
|
|
2320
2564
|
const stream = useStreamContext();
|
|
2321
|
-
const [isHistoryLoading, setIsHistoryLoading] =
|
|
2322
|
-
const [historyError, setHistoryError] =
|
|
2323
|
-
const [assistantName, setAssistantName] =
|
|
2565
|
+
const [isHistoryLoading, setIsHistoryLoading] = React18.useState(false);
|
|
2566
|
+
const [historyError, setHistoryError] = React18.useState(null);
|
|
2567
|
+
const [assistantName, setAssistantName] = React18.useState(null);
|
|
2324
2568
|
const LOADING_DOTS_MIN_DURATION = 800;
|
|
2325
|
-
const [showLoadingDots, setShowLoadingDots] =
|
|
2326
|
-
const loadingStartTimeRef =
|
|
2327
|
-
|
|
2569
|
+
const [showLoadingDots, setShowLoadingDots] = React18.useState(false);
|
|
2570
|
+
const loadingStartTimeRef = React18.useRef(null);
|
|
2571
|
+
React18.useEffect(() => {
|
|
2328
2572
|
setStream(stream);
|
|
2329
2573
|
}, [setStream, stream]);
|
|
2330
|
-
|
|
2574
|
+
React18.useEffect(() => {
|
|
2331
2575
|
if (stream.isLoading) {
|
|
2332
2576
|
if (!loadingStartTimeRef.current) {
|
|
2333
2577
|
loadingStartTimeRef.current = Date.now();
|
|
@@ -2350,23 +2594,23 @@ function Chat({
|
|
|
2350
2594
|
}
|
|
2351
2595
|
}
|
|
2352
2596
|
}, [stream.isLoading]);
|
|
2353
|
-
const [draft, setDraft] =
|
|
2354
|
-
const [selectedTool, setSelectedTool] =
|
|
2355
|
-
const [attachments, setAttachments] =
|
|
2597
|
+
const [draft, setDraft] = React18.useState("");
|
|
2598
|
+
const [selectedTool, setSelectedTool] = React18.useState(null);
|
|
2599
|
+
const [attachments, setAttachments] = React18.useState([]);
|
|
2356
2600
|
const {
|
|
2357
2601
|
threads,
|
|
2358
2602
|
deleteThread,
|
|
2359
2603
|
refreshThreads,
|
|
2360
2604
|
isLoading: isThreadsLoading
|
|
2361
2605
|
} = useThreads();
|
|
2362
|
-
const viewportRef =
|
|
2363
|
-
const fileInputRef =
|
|
2606
|
+
const viewportRef = React18.useRef(null);
|
|
2607
|
+
const fileInputRef = React18.useRef(null);
|
|
2364
2608
|
const resolvedTitle = title ?? t("chat.title");
|
|
2365
2609
|
const resolvedPlaceholder = placeholder ?? t("chat.placeholder");
|
|
2366
2610
|
const inputPlaceholder = selectedTool?.placeholderOverride ?? composer?.placeholder ?? resolvedPlaceholder;
|
|
2367
2611
|
const messages = stream.messages ?? [];
|
|
2368
2612
|
const trimmedDraft = draft.trim();
|
|
2369
|
-
const scrollToBottom =
|
|
2613
|
+
const scrollToBottom = React18.useCallback((smooth = false) => {
|
|
2370
2614
|
requestAnimationFrame(() => {
|
|
2371
2615
|
const viewport = viewportRef.current;
|
|
2372
2616
|
if (viewport) {
|
|
@@ -2377,10 +2621,10 @@ function Chat({
|
|
|
2377
2621
|
}
|
|
2378
2622
|
});
|
|
2379
2623
|
}, []);
|
|
2380
|
-
|
|
2624
|
+
React18.useEffect(() => {
|
|
2381
2625
|
scrollToBottom();
|
|
2382
2626
|
}, [messages.length, scrollToBottom]);
|
|
2383
|
-
|
|
2627
|
+
React18.useEffect(() => {
|
|
2384
2628
|
if (stream.isLoading) {
|
|
2385
2629
|
scrollToBottom();
|
|
2386
2630
|
}
|
|
@@ -2391,11 +2635,11 @@ function Chat({
|
|
|
2391
2635
|
const showMissingConfig = !isClientSecretInitializing && missingConfig;
|
|
2392
2636
|
const hasUploadingFiles = attachments.some((a) => a.status === "uploading");
|
|
2393
2637
|
const isSendDisabled = !trimmedDraft || stream.isLoading || missingConfig || isHistoryLoading || hasUploadingFiles;
|
|
2394
|
-
|
|
2638
|
+
React18.useEffect(() => {
|
|
2395
2639
|
if (missingConfig) return;
|
|
2396
2640
|
void refreshThreads();
|
|
2397
2641
|
}, [missingConfig, refreshThreads]);
|
|
2398
|
-
|
|
2642
|
+
React18.useEffect(() => {
|
|
2399
2643
|
if (missingConfig || !stream.client || !stream.assistantId) return;
|
|
2400
2644
|
stream.client.assistants.get(stream.assistantId).then((assistant) => {
|
|
2401
2645
|
if (assistant) {
|
|
@@ -2448,7 +2692,7 @@ function Chat({
|
|
|
2448
2692
|
const handleAttachmentClick = () => {
|
|
2449
2693
|
fileInputRef.current?.click();
|
|
2450
2694
|
};
|
|
2451
|
-
const uploadFile =
|
|
2695
|
+
const uploadFile = React18.useCallback(async (localId, file) => {
|
|
2452
2696
|
try {
|
|
2453
2697
|
const result = await stream.client.contexts.uploadFile(file);
|
|
2454
2698
|
setAttachments(
|
|
@@ -2468,7 +2712,7 @@ function Chat({
|
|
|
2468
2712
|
);
|
|
2469
2713
|
}
|
|
2470
2714
|
}, [stream.client]);
|
|
2471
|
-
const handleRetryUpload =
|
|
2715
|
+
const handleRetryUpload = React18.useCallback((localId) => {
|
|
2472
2716
|
const attachment = attachments.find((a) => a.localId === localId);
|
|
2473
2717
|
if (!attachment || attachment.status !== "error") return;
|
|
2474
2718
|
setAttachments(
|
|
@@ -2543,7 +2787,7 @@ function Chat({
|
|
|
2543
2787
|
);
|
|
2544
2788
|
scrollToBottom(true);
|
|
2545
2789
|
};
|
|
2546
|
-
const loadConversationMessages =
|
|
2790
|
+
const loadConversationMessages = React18.useCallback(
|
|
2547
2791
|
async (recordId) => {
|
|
2548
2792
|
if (missingConfig) {
|
|
2549
2793
|
setHistoryError(t("chat.missingConfigShort"));
|
|
@@ -2624,8 +2868,17 @@ function Chat({
|
|
|
2624
2868
|
}
|
|
2625
2869
|
};
|
|
2626
2870
|
const acceptMimes = composer?.attachments?.accept ? Object.entries(composer.attachments.accept).map(([mime, exts]) => [mime, ...exts.map((e) => `.${e}`)].join(",")).join(",") : void 0;
|
|
2871
|
+
const currentThread = React18.useMemo(
|
|
2872
|
+
() => threads.find((item) => item.id === stream.threadId),
|
|
2873
|
+
[threads, stream.threadId]
|
|
2874
|
+
);
|
|
2627
2875
|
const errorMessage = stream.error instanceof Error ? stream.error.message : void 0;
|
|
2628
|
-
|
|
2876
|
+
const threadErrorMessage = React18.useMemo(() => {
|
|
2877
|
+
if (currentThread?.status !== "error") return void 0;
|
|
2878
|
+
const message = currentThread.error?.trim();
|
|
2879
|
+
return message || t("thread.errorToast");
|
|
2880
|
+
}, [currentThread, t]);
|
|
2881
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
|
|
2629
2882
|
"div",
|
|
2630
2883
|
{
|
|
2631
2884
|
ref: viewportRef,
|
|
@@ -2634,16 +2887,16 @@ function Chat({
|
|
|
2634
2887
|
className
|
|
2635
2888
|
),
|
|
2636
2889
|
children: [
|
|
2637
|
-
/* @__PURE__ */ (0,
|
|
2638
|
-
/* @__PURE__ */ (0,
|
|
2639
|
-
/* @__PURE__ */ (0,
|
|
2640
|
-
/* @__PURE__ */ (0,
|
|
2641
|
-
/* @__PURE__ */ (0,
|
|
2642
|
-
/* @__PURE__ */ (0,
|
|
2890
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "flex items-center justify-between border-b px-4 py-2 sticky top-0 z-10 bg-background", children: [
|
|
2891
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "flex items-center gap-3", children: [
|
|
2892
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "h-2 w-2 rounded-full bg-green-500" }),
|
|
2893
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { children: [
|
|
2894
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("h2", { className: "text-lg font-semibold", children: assistantName || resolvedTitle }),
|
|
2895
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("p", { className: "text-xs text-muted-foreground", children: t("chat.statusOnline") })
|
|
2643
2896
|
] })
|
|
2644
2897
|
] }),
|
|
2645
|
-
history?.enabled !== false && /* @__PURE__ */ (0,
|
|
2646
|
-
/* @__PURE__ */ (0,
|
|
2898
|
+
history?.enabled !== false && /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "flex items-center gap-1", children: [
|
|
2899
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
2647
2900
|
"button",
|
|
2648
2901
|
{
|
|
2649
2902
|
type: "button",
|
|
@@ -2656,10 +2909,10 @@ function Chat({
|
|
|
2656
2909
|
"disabled:opacity-50 disabled:cursor-not-allowed"
|
|
2657
2910
|
),
|
|
2658
2911
|
title: t("history.newThread"),
|
|
2659
|
-
children: /* @__PURE__ */ (0,
|
|
2912
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_lucide_react9.Pencil, { size: 16 })
|
|
2660
2913
|
}
|
|
2661
2914
|
),
|
|
2662
|
-
/* @__PURE__ */ (0,
|
|
2915
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
2663
2916
|
HistorySidebar,
|
|
2664
2917
|
{
|
|
2665
2918
|
threads,
|
|
@@ -2673,23 +2926,23 @@ function Chat({
|
|
|
2673
2926
|
)
|
|
2674
2927
|
] })
|
|
2675
2928
|
] }),
|
|
2676
|
-
/* @__PURE__ */ (0,
|
|
2677
|
-
errorMessage && /* @__PURE__ */ (0,
|
|
2678
|
-
historyError && /* @__PURE__ */ (0,
|
|
2679
|
-
showMissingConfig && /* @__PURE__ */ (0,
|
|
2680
|
-
isHistoryLoading && /* @__PURE__ */ (0,
|
|
2681
|
-
messages.length === 0 ? /* @__PURE__ */ (0,
|
|
2929
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "flex-1 p-4", children: [
|
|
2930
|
+
errorMessage && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "mb-4 rounded-lg border border-destructive/30 bg-destructive/10 px-3 py-2 text-sm text-destructive", children: errorMessage }),
|
|
2931
|
+
historyError && /* @__PURE__ */ (0, import_jsx_runtime24.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 }),
|
|
2932
|
+
showMissingConfig && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "mb-4 rounded-lg border border-amber-200 bg-amber-50 px-3 py-2 text-sm text-amber-900", children: t("chat.missingConfigDetail") }),
|
|
2933
|
+
isHistoryLoading && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "mb-4 rounded-lg border border-muted px-3 py-2 text-sm text-muted-foreground", children: t("chat.loadingThread") }),
|
|
2934
|
+
messages.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
2682
2935
|
StartScreen,
|
|
2683
2936
|
{
|
|
2684
2937
|
startScreen,
|
|
2685
2938
|
onPromptClick: handlePromptClick
|
|
2686
2939
|
}
|
|
2687
|
-
) : /* @__PURE__ */ (0,
|
|
2940
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "space-y-4", children: [
|
|
2688
2941
|
messages.map((message, index) => {
|
|
2689
2942
|
const messageType = String(message.type);
|
|
2690
2943
|
const isAssistantMessage = messageType === "assistant" || messageType === "ai";
|
|
2691
2944
|
const messageContent = typeof message.content === "string" ? message.content : Array.isArray(message.content) ? message.content.map((part) => formatMessageContent(part)).join("") : formatMessageContent(message.content);
|
|
2692
|
-
return /* @__PURE__ */ (0,
|
|
2945
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
2693
2946
|
"div",
|
|
2694
2947
|
{
|
|
2695
2948
|
className: cn(
|
|
@@ -2697,8 +2950,8 @@ function Chat({
|
|
|
2697
2950
|
message.type === "human" ? "justify-end" : "justify-start -ml-1"
|
|
2698
2951
|
// AI messages: slightly closer to left
|
|
2699
2952
|
),
|
|
2700
|
-
children: /* @__PURE__ */ (0,
|
|
2701
|
-
/* @__PURE__ */ (0,
|
|
2953
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "flex flex-col px-3 overflow-hidden", children: [
|
|
2954
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
2702
2955
|
"div",
|
|
2703
2956
|
{
|
|
2704
2957
|
className: cn(
|
|
@@ -2706,7 +2959,7 @@ function Chat({
|
|
|
2706
2959
|
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"
|
|
2707
2960
|
// AI messages: use chat-specific foreground color
|
|
2708
2961
|
),
|
|
2709
|
-
children: isAssistantMessage ? /* @__PURE__ */ (0,
|
|
2962
|
+
children: isAssistantMessage ? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
2710
2963
|
AssistantMessage,
|
|
2711
2964
|
{
|
|
2712
2965
|
message: {
|
|
@@ -2715,30 +2968,30 @@ function Chat({
|
|
|
2715
2968
|
},
|
|
2716
2969
|
isStreaming: stream.isLoading && index === messages.length - 1
|
|
2717
2970
|
}
|
|
2718
|
-
) : /* @__PURE__ */ (0,
|
|
2719
|
-
message.type === "human" && message.attachments?.length > 0 && /* @__PURE__ */ (0,
|
|
2971
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(import_jsx_runtime24.Fragment, { children: [
|
|
2972
|
+
message.type === "human" && message.attachments?.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "flex flex-wrap gap-1.5 mb-2", children: message.attachments.map((file, fileIndex) => /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
|
|
2720
2973
|
"div",
|
|
2721
2974
|
{
|
|
2722
2975
|
className: "flex items-center gap-1.5 rounded-md bg-primary-foreground/20 px-2 py-1 text-xs",
|
|
2723
2976
|
children: [
|
|
2724
|
-
/* @__PURE__ */ (0,
|
|
2725
|
-
/* @__PURE__ */ (0,
|
|
2977
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_lucide_react9.FileText, { size: 12 }),
|
|
2978
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { className: "max-w-[100px] truncate", children: file.originalName })
|
|
2726
2979
|
]
|
|
2727
2980
|
},
|
|
2728
2981
|
fileIndex
|
|
2729
2982
|
)) }),
|
|
2730
|
-
Array.isArray(message.content) ? message.content.map((part, partIndex) => /* @__PURE__ */ (0,
|
|
2983
|
+
Array.isArray(message.content) ? message.content.map((part, partIndex) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
2731
2984
|
"p",
|
|
2732
2985
|
{
|
|
2733
2986
|
className: "wrap-break-word text-sm leading-relaxed",
|
|
2734
2987
|
children: formatMessageContent(part)
|
|
2735
2988
|
},
|
|
2736
2989
|
`${part.type}-${partIndex}`
|
|
2737
|
-
)) : /* @__PURE__ */ (0,
|
|
2990
|
+
)) : /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { className: "wrap-break-word text-sm leading-relaxed", children: formatMessageContent(message.content) })
|
|
2738
2991
|
] })
|
|
2739
2992
|
}
|
|
2740
2993
|
),
|
|
2741
|
-
/* @__PURE__ */ (0,
|
|
2994
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
2742
2995
|
MessageActions,
|
|
2743
2996
|
{
|
|
2744
2997
|
content: messageContent,
|
|
@@ -2759,16 +3012,17 @@ function Chat({
|
|
|
2759
3012
|
const lastMsgContent = lastMessage?.content;
|
|
2760
3013
|
const hasSubstantialContent = isLastMessageFromAI && (typeof lastMsgContent === "string" && lastMsgContent.length > 10 || Array.isArray(lastMsgContent) && lastMsgContent.length > 0);
|
|
2761
3014
|
if (hasSubstantialContent) return null;
|
|
2762
|
-
return /* @__PURE__ */ (0,
|
|
2763
|
-
/* @__PURE__ */ (0,
|
|
2764
|
-
/* @__PURE__ */ (0,
|
|
2765
|
-
/* @__PURE__ */ (0,
|
|
3015
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "flex justify-start gap-3 -ml-2", children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "max-w-full rounded-2xl py-2.5", children: /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "flex gap-1.5", children: [
|
|
3016
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "h-2 w-2 animate-bounce rounded-full bg-muted-foreground/60 [animation-delay:-0.3s]" }),
|
|
3017
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "h-2 w-2 animate-bounce rounded-full bg-muted-foreground/60 [animation-delay:-0.15s]" }),
|
|
3018
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "h-2 w-2 animate-bounce rounded-full bg-muted-foreground/60" })
|
|
2766
3019
|
] }) }) });
|
|
2767
3020
|
})()
|
|
2768
3021
|
] })
|
|
2769
3022
|
] }),
|
|
2770
|
-
/* @__PURE__ */ (0,
|
|
2771
|
-
/* @__PURE__ */ (0,
|
|
3023
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "p-2 sticky bottom-0 z-10 bg-background", children: [
|
|
3024
|
+
threadErrorMessage && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "mb-3 rounded-lg border border-destructive/30 bg-destructive/10 px-3 py-2 text-sm text-destructive", children: threadErrorMessage }),
|
|
3025
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
2772
3026
|
"input",
|
|
2773
3027
|
{
|
|
2774
3028
|
ref: fileInputRef,
|
|
@@ -2779,7 +3033,7 @@ function Chat({
|
|
|
2779
3033
|
className: "hidden"
|
|
2780
3034
|
}
|
|
2781
3035
|
),
|
|
2782
|
-
attachments.length > 0 && /* @__PURE__ */ (0,
|
|
3036
|
+
attachments.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "mb-3 flex flex-wrap gap-2", children: attachments.map((item) => /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
|
|
2783
3037
|
"div",
|
|
2784
3038
|
{
|
|
2785
3039
|
className: cn(
|
|
@@ -2787,24 +3041,24 @@ function Chat({
|
|
|
2787
3041
|
item.status === "error" ? "bg-destructive/10 border border-destructive/30" : "bg-muted"
|
|
2788
3042
|
),
|
|
2789
3043
|
children: [
|
|
2790
|
-
item.status === "uploading" && /* @__PURE__ */ (0,
|
|
2791
|
-
item.status === "success" && /* @__PURE__ */ (0,
|
|
2792
|
-
item.status === "error" && /* @__PURE__ */ (0,
|
|
2793
|
-
/* @__PURE__ */ (0,
|
|
3044
|
+
item.status === "uploading" && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_lucide_react9.Loader2, { size: 14, className: "animate-spin text-muted-foreground" }),
|
|
3045
|
+
item.status === "success" && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_lucide_react9.FileText, { size: 14, className: "text-muted-foreground" }),
|
|
3046
|
+
item.status === "error" && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_lucide_react9.FileText, { size: 14, className: "text-destructive" }),
|
|
3047
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { className: cn(
|
|
2794
3048
|
"max-w-30 truncate",
|
|
2795
3049
|
item.status === "error" && "text-destructive"
|
|
2796
3050
|
), children: item.file.name }),
|
|
2797
|
-
item.status === "error" && /* @__PURE__ */ (0,
|
|
3051
|
+
item.status === "error" && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
2798
3052
|
"button",
|
|
2799
3053
|
{
|
|
2800
3054
|
type: "button",
|
|
2801
3055
|
onClick: () => handleRetryUpload(item.localId),
|
|
2802
3056
|
className: "ml-1 rounded-full p-0.5 text-destructive hover:bg-destructive/20",
|
|
2803
3057
|
title: t("chat.retryUpload"),
|
|
2804
|
-
children: /* @__PURE__ */ (0,
|
|
3058
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_lucide_react9.RefreshCw, { size: 12 })
|
|
2805
3059
|
}
|
|
2806
3060
|
),
|
|
2807
|
-
/* @__PURE__ */ (0,
|
|
3061
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
2808
3062
|
"button",
|
|
2809
3063
|
{
|
|
2810
3064
|
type: "button",
|
|
@@ -2813,26 +3067,26 @@ function Chat({
|
|
|
2813
3067
|
"ml-1 rounded-full p-0.5",
|
|
2814
3068
|
item.status === "error" ? "text-destructive hover:bg-destructive/20" : "hover:bg-muted-foreground/20"
|
|
2815
3069
|
),
|
|
2816
|
-
children: /* @__PURE__ */ (0,
|
|
3070
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_lucide_react9.X, { size: 12 })
|
|
2817
3071
|
}
|
|
2818
3072
|
)
|
|
2819
3073
|
]
|
|
2820
3074
|
},
|
|
2821
3075
|
item.localId
|
|
2822
3076
|
)) }),
|
|
2823
|
-
selectedTool && /* @__PURE__ */ (0,
|
|
2824
|
-
/* @__PURE__ */ (0,
|
|
2825
|
-
/* @__PURE__ */ (0,
|
|
3077
|
+
selectedTool && /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "mb-2 flex items-center gap-2", children: [
|
|
3078
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { className: "rounded-full bg-primary/10 px-2 py-0.5 text-xs font-medium text-primary", children: selectedTool.shortLabel ?? selectedTool.label }),
|
|
3079
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
2826
3080
|
"button",
|
|
2827
3081
|
{
|
|
2828
3082
|
type: "button",
|
|
2829
3083
|
onClick: () => setSelectedTool(null),
|
|
2830
3084
|
className: "rounded-full p-0.5 text-muted-foreground hover:bg-muted",
|
|
2831
|
-
children: /* @__PURE__ */ (0,
|
|
3085
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_lucide_react9.X, { size: 12 })
|
|
2832
3086
|
}
|
|
2833
3087
|
)
|
|
2834
3088
|
] }),
|
|
2835
|
-
/* @__PURE__ */ (0,
|
|
3089
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("form", { className: "flex items-center", onSubmit: handleSubmit, children: /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
|
|
2836
3090
|
"div",
|
|
2837
3091
|
{
|
|
2838
3092
|
className: cn(
|
|
@@ -2843,7 +3097,7 @@ function Chat({
|
|
|
2843
3097
|
"transition-shadow duration-200"
|
|
2844
3098
|
),
|
|
2845
3099
|
children: [
|
|
2846
|
-
/* @__PURE__ */ (0,
|
|
3100
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
2847
3101
|
ComposerMenu,
|
|
2848
3102
|
{
|
|
2849
3103
|
composer,
|
|
@@ -2853,7 +3107,7 @@ function Chat({
|
|
|
2853
3107
|
disabled: stream.isLoading || missingConfig || isHistoryLoading
|
|
2854
3108
|
}
|
|
2855
3109
|
),
|
|
2856
|
-
/* @__PURE__ */ (0,
|
|
3110
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
2857
3111
|
"input",
|
|
2858
3112
|
{
|
|
2859
3113
|
type: "text",
|
|
@@ -2869,7 +3123,7 @@ function Chat({
|
|
|
2869
3123
|
autoComplete: "off"
|
|
2870
3124
|
}
|
|
2871
3125
|
),
|
|
2872
|
-
/* @__PURE__ */ (0,
|
|
3126
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
2873
3127
|
SendButton,
|
|
2874
3128
|
{
|
|
2875
3129
|
disabled: isSendDisabled,
|
|
@@ -2882,7 +3136,7 @@ function Chat({
|
|
|
2882
3136
|
]
|
|
2883
3137
|
}
|
|
2884
3138
|
) }),
|
|
2885
|
-
disclaimer?.text && /* @__PURE__ */ (0,
|
|
3139
|
+
disclaimer?.text && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
2886
3140
|
"p",
|
|
2887
3141
|
{
|
|
2888
3142
|
className: cn(
|
|
@@ -2892,7 +3146,10 @@ function Chat({
|
|
|
2892
3146
|
children: disclaimer.text
|
|
2893
3147
|
}
|
|
2894
3148
|
),
|
|
2895
|
-
/* @__PURE__ */ (0,
|
|
3149
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "mt-2 flex items-center justify-center gap-2 text-xs text-muted-foreground", children: [
|
|
3150
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { children: t("chat.poweredBy") }),
|
|
3151
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(ContextUsageIndicator, { className: "absolute right-4" })
|
|
3152
|
+
] })
|
|
2896
3153
|
] })
|
|
2897
3154
|
]
|
|
2898
3155
|
}
|
|
@@ -2900,11 +3157,11 @@ function Chat({
|
|
|
2900
3157
|
}
|
|
2901
3158
|
|
|
2902
3159
|
// src/components/ui/input.tsx
|
|
2903
|
-
var
|
|
2904
|
-
var
|
|
2905
|
-
var Input =
|
|
3160
|
+
var React19 = __toESM(require("react"), 1);
|
|
3161
|
+
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
3162
|
+
var Input = React19.forwardRef(
|
|
2906
3163
|
({ className, type, ...props }, ref) => {
|
|
2907
|
-
return /* @__PURE__ */ (0,
|
|
3164
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
2908
3165
|
"input",
|
|
2909
3166
|
{
|
|
2910
3167
|
ref,
|
|
@@ -2921,10 +3178,10 @@ var Input = React18.forwardRef(
|
|
|
2921
3178
|
Input.displayName = "Input";
|
|
2922
3179
|
|
|
2923
3180
|
// src/components/ui/avatar.tsx
|
|
2924
|
-
var
|
|
3181
|
+
var React20 = __toESM(require("react"), 1);
|
|
2925
3182
|
var AvatarPrimitive = __toESM(require("@radix-ui/react-avatar"), 1);
|
|
2926
|
-
var
|
|
2927
|
-
var Avatar =
|
|
3183
|
+
var import_jsx_runtime26 = require("react/jsx-runtime");
|
|
3184
|
+
var Avatar = React20.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
2928
3185
|
AvatarPrimitive.Root,
|
|
2929
3186
|
{
|
|
2930
3187
|
ref,
|
|
@@ -2936,7 +3193,7 @@ var Avatar = React19.forwardRef(({ className, ...props }, ref) => /* @__PURE__ *
|
|
|
2936
3193
|
}
|
|
2937
3194
|
));
|
|
2938
3195
|
Avatar.displayName = AvatarPrimitive.Root.displayName;
|
|
2939
|
-
var AvatarImage =
|
|
3196
|
+
var AvatarImage = React20.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
2940
3197
|
AvatarPrimitive.Image,
|
|
2941
3198
|
{
|
|
2942
3199
|
ref,
|
|
@@ -2945,7 +3202,7 @@ var AvatarImage = React19.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
2945
3202
|
}
|
|
2946
3203
|
));
|
|
2947
3204
|
AvatarImage.displayName = AvatarPrimitive.Image.displayName;
|
|
2948
|
-
var AvatarFallback =
|
|
3205
|
+
var AvatarFallback = React20.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
2949
3206
|
AvatarPrimitive.Fallback,
|
|
2950
3207
|
{
|
|
2951
3208
|
ref,
|
|
@@ -2959,10 +3216,10 @@ var AvatarFallback = React19.forwardRef(({ className, ...props }, ref) => /* @__
|
|
|
2959
3216
|
AvatarFallback.displayName = AvatarPrimitive.Fallback.displayName;
|
|
2960
3217
|
|
|
2961
3218
|
// src/components/ui/separator.tsx
|
|
2962
|
-
var
|
|
2963
|
-
var
|
|
2964
|
-
var Separator =
|
|
2965
|
-
({ className, orientation = "horizontal", ...props }, ref) => /* @__PURE__ */ (0,
|
|
3219
|
+
var React21 = __toESM(require("react"), 1);
|
|
3220
|
+
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
3221
|
+
var Separator = React21.forwardRef(
|
|
3222
|
+
({ className, orientation = "horizontal", ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
2966
3223
|
"div",
|
|
2967
3224
|
{
|
|
2968
3225
|
ref,
|