@nikcli-ai/app 0.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.turbo/turbo-build.log +661 -0
- package/.turbo/turbo-typecheck.log +1 -0
- package/AGENTS.md +30 -0
- package/README.md +51 -0
- package/dist/_headers +17 -0
- package/dist/apple-touch-icon-v3.png +0 -0
- package/dist/apple-touch-icon.png +0 -0
- package/dist/assets/BlexMonoNerdFontMono-Bold-B8jzonSj.woff2 +0 -0
- package/dist/assets/BlexMonoNerdFontMono-Medium-BvtJB5kd.woff2 +0 -0
- package/dist/assets/BlexMonoNerdFontMono-Regular-DSJ7IWr2.woff2 +0 -0
- package/dist/assets/CaskaydiaCoveNerdFontMono-Bold-CxABrWmj.woff2 +0 -0
- package/dist/assets/CaskaydiaCoveNerdFontMono-Regular-C_H0OSLN.woff2 +0 -0
- package/dist/assets/FiraCodeNerdFontMono-Bold-BjAeM3gJ.woff2 +0 -0
- package/dist/assets/FiraCodeNerdFontMono-Regular-io3c92n9.woff2 +0 -0
- package/dist/assets/HackNerdFontMono-Bold-BNG4kp7w.woff2 +0 -0
- package/dist/assets/HackNerdFontMono-Regular-IcpSchWC.woff2 +0 -0
- package/dist/assets/InconsolataNerdFontMono-Bold-oTRjQesI.woff2 +0 -0
- package/dist/assets/InconsolataNerdFontMono-Regular-CRHGEvh2.woff2 +0 -0
- package/dist/assets/IntoneMonoNerdFontMono-Bold-BL6LrHzx.woff2 +0 -0
- package/dist/assets/IntoneMonoNerdFontMono-Regular-BwjBdmsJ.woff2 +0 -0
- package/dist/assets/JetBrainsMonoNerdFontMono-Bold-CU80ifuM.woff2 +0 -0
- package/dist/assets/JetBrainsMonoNerdFontMono-Regular-QVq88ZfU.woff2 +0 -0
- package/dist/assets/KaTeX_AMS-Regular-BQhdFMY1.woff2 +0 -0
- package/dist/assets/KaTeX_AMS-Regular-DMm9YOAa.woff +0 -0
- package/dist/assets/KaTeX_AMS-Regular-DRggAlZN.ttf +0 -0
- package/dist/assets/KaTeX_Caligraphic-Bold-ATXxdsX0.ttf +0 -0
- package/dist/assets/KaTeX_Caligraphic-Bold-BEiXGLvX.woff +0 -0
- package/dist/assets/KaTeX_Caligraphic-Bold-Dq_IR9rO.woff2 +0 -0
- package/dist/assets/KaTeX_Caligraphic-Regular-CTRA-rTL.woff +0 -0
- package/dist/assets/KaTeX_Caligraphic-Regular-Di6jR-x-.woff2 +0 -0
- package/dist/assets/KaTeX_Caligraphic-Regular-wX97UBjC.ttf +0 -0
- package/dist/assets/KaTeX_Fraktur-Bold-BdnERNNW.ttf +0 -0
- package/dist/assets/KaTeX_Fraktur-Bold-BsDP51OF.woff +0 -0
- package/dist/assets/KaTeX_Fraktur-Bold-CL6g_b3V.woff2 +0 -0
- package/dist/assets/KaTeX_Fraktur-Regular-CB_wures.ttf +0 -0
- package/dist/assets/KaTeX_Fraktur-Regular-CTYiF6lA.woff2 +0 -0
- package/dist/assets/KaTeX_Fraktur-Regular-Dxdc4cR9.woff +0 -0
- package/dist/assets/KaTeX_Main-Bold-Cx986IdX.woff2 +0 -0
- package/dist/assets/KaTeX_Main-Bold-Jm3AIy58.woff +0 -0
- package/dist/assets/KaTeX_Main-Bold-waoOVXN0.ttf +0 -0
- package/dist/assets/KaTeX_Main-BoldItalic-DxDJ3AOS.woff2 +0 -0
- package/dist/assets/KaTeX_Main-BoldItalic-DzxPMmG6.ttf +0 -0
- package/dist/assets/KaTeX_Main-BoldItalic-SpSLRI95.woff +0 -0
- package/dist/assets/KaTeX_Main-Italic-3WenGoN9.ttf +0 -0
- package/dist/assets/KaTeX_Main-Italic-BMLOBm91.woff +0 -0
- package/dist/assets/KaTeX_Main-Italic-NWA7e6Wa.woff2 +0 -0
- package/dist/assets/KaTeX_Main-Regular-B22Nviop.woff2 +0 -0
- package/dist/assets/KaTeX_Main-Regular-Dr94JaBh.woff +0 -0
- package/dist/assets/KaTeX_Main-Regular-ypZvNtVU.ttf +0 -0
- package/dist/assets/KaTeX_Math-BoldItalic-B3XSjfu4.ttf +0 -0
- package/dist/assets/KaTeX_Math-BoldItalic-CZnvNsCZ.woff2 +0 -0
- package/dist/assets/KaTeX_Math-BoldItalic-iY-2wyZ7.woff +0 -0
- package/dist/assets/KaTeX_Math-Italic-DA0__PXp.woff +0 -0
- package/dist/assets/KaTeX_Math-Italic-flOr_0UB.ttf +0 -0
- package/dist/assets/KaTeX_Math-Italic-t53AETM-.woff2 +0 -0
- package/dist/assets/KaTeX_SansSerif-Bold-CFMepnvq.ttf +0 -0
- package/dist/assets/KaTeX_SansSerif-Bold-D1sUS0GD.woff2 +0 -0
- package/dist/assets/KaTeX_SansSerif-Bold-DbIhKOiC.woff +0 -0
- package/dist/assets/KaTeX_SansSerif-Italic-C3H0VqGB.woff2 +0 -0
- package/dist/assets/KaTeX_SansSerif-Italic-DN2j7dab.woff +0 -0
- package/dist/assets/KaTeX_SansSerif-Italic-YYjJ1zSn.ttf +0 -0
- package/dist/assets/KaTeX_SansSerif-Regular-BNo7hRIc.ttf +0 -0
- package/dist/assets/KaTeX_SansSerif-Regular-CS6fqUqJ.woff +0 -0
- package/dist/assets/KaTeX_SansSerif-Regular-DDBCnlJ7.woff2 +0 -0
- package/dist/assets/KaTeX_Script-Regular-C5JkGWo-.ttf +0 -0
- package/dist/assets/KaTeX_Script-Regular-D3wIWfF6.woff2 +0 -0
- package/dist/assets/KaTeX_Script-Regular-D5yQViql.woff +0 -0
- package/dist/assets/KaTeX_Size1-Regular-C195tn64.woff +0 -0
- package/dist/assets/KaTeX_Size1-Regular-Dbsnue_I.ttf +0 -0
- package/dist/assets/KaTeX_Size1-Regular-mCD8mA8B.woff2 +0 -0
- package/dist/assets/KaTeX_Size2-Regular-B7gKUWhC.ttf +0 -0
- package/dist/assets/KaTeX_Size2-Regular-Dy4dx90m.woff2 +0 -0
- package/dist/assets/KaTeX_Size2-Regular-oD1tc_U0.woff +0 -0
- package/dist/assets/KaTeX_Size3-Regular-CTq5MqoE.woff +0 -0
- package/dist/assets/KaTeX_Size3-Regular-DgpXs0kz.ttf +0 -0
- package/dist/assets/KaTeX_Size4-Regular-BF-4gkZK.woff +0 -0
- package/dist/assets/KaTeX_Size4-Regular-DWFBv043.ttf +0 -0
- package/dist/assets/KaTeX_Size4-Regular-Dl5lxZxV.woff2 +0 -0
- package/dist/assets/KaTeX_Typewriter-Regular-C0xS9mPB.woff +0 -0
- package/dist/assets/KaTeX_Typewriter-Regular-CO6r4hn1.woff2 +0 -0
- package/dist/assets/KaTeX_Typewriter-Regular-D3Ib7_Hf.ttf +0 -0
- package/dist/assets/MesloLGSNerdFontMono-Bold-CrpVO3ec.woff2 +0 -0
- package/dist/assets/MesloLGSNerdFontMono-Regular-j-nTZDWZ.woff2 +0 -0
- package/dist/assets/RobotoMonoNerdFontMono-Bold-DNxuDepp.woff2 +0 -0
- package/dist/assets/RobotoMonoNerdFontMono-Regular-DvxS3QZC.woff2 +0 -0
- package/dist/assets/SauceCodeProNerdFontMono-Bold-DloEeUVQ.woff2 +0 -0
- package/dist/assets/SauceCodeProNerdFontMono-Regular-Ba96Bdne.woff2 +0 -0
- package/dist/assets/UbuntuMonoNerdFontMono-Bold-wLXUURqB.woff2 +0 -0
- package/dist/assets/UbuntuMonoNerdFontMono-Regular-tdnXLyap.woff2 +0 -0
- package/dist/assets/abap-BXYWi5l2.js +1 -0
- package/dist/assets/abap-BdImnpbu.js +1 -0
- package/dist/assets/actionscript-3-CfeIJUat.js +1 -0
- package/dist/assets/actionscript-3-LjD3sNyx.js +1 -0
- package/dist/assets/ada-DeReRNhg.js +1 -0
- package/dist/assets/ada-bCR0ucgS.js +1 -0
- package/dist/assets/alert-01-BuOD_o_q.aac +0 -0
- package/dist/assets/alert-02-CS75AsoP.aac +0 -0
- package/dist/assets/alert-04-CaGsIGFP.aac +0 -0
- package/dist/assets/alert-05-D2gbGoRH.aac +0 -0
- package/dist/assets/alert-06-GK5Tqy6u.aac +0 -0
- package/dist/assets/alert-07-0r0kiLGz.aac +0 -0
- package/dist/assets/alert-08-CZowNquU.aac +0 -0
- package/dist/assets/alert-10-Ck5hR7zH.aac +0 -0
- package/dist/assets/android-studio-D0DqtVA4.svg +1 -0
- package/dist/assets/andromeeda-C-Jbm3Hp.js +1 -0
- package/dist/assets/angular-html-6NEUuZou.js +1 -0
- package/dist/assets/angular-html-CU67Zn6k.js +1 -0
- package/dist/assets/angular-ts-BfBSdvnY.js +1 -0
- package/dist/assets/angular-ts-BwZT4LLn.js +1 -0
- package/dist/assets/antigravity-XfClf80L.svg +1 -0
- package/dist/assets/apache-CCUDgqAf.js +1 -0
- package/dist/assets/apache-Pmp26Uib.js +1 -0
- package/dist/assets/apex-DDbsPZ6N.js +1 -0
- package/dist/assets/apex-ynV6aGfE.js +1 -0
- package/dist/assets/apl-C-KxP0FL.js +1 -0
- package/dist/assets/apl-dKokRX4l.js +1 -0
- package/dist/assets/applescript-Co6uUVPk.js +1 -0
- package/dist/assets/applescript-Dd26Nb5t.js +1 -0
- package/dist/assets/ara-BRHolxvo.js +1 -0
- package/dist/assets/ara-D6vCOKVX.js +1 -0
- package/dist/assets/asciidoc-DZ9uQOoP.js +1 -0
- package/dist/assets/asciidoc-Dv7Oe6Be.js +1 -0
- package/dist/assets/asm-CbVMAfFB.js +1 -0
- package/dist/assets/asm-D_Q5rh1f.js +1 -0
- package/dist/assets/astro-CbQHKStN.js +1 -0
- package/dist/assets/astro-OEl6i-aI.js +1 -0
- package/dist/assets/aurora-x-D-2ljcwZ.js +1 -0
- package/dist/assets/awk-DMzUqQB5.js +1 -0
- package/dist/assets/awk-UmR4Ublb.js +1 -0
- package/dist/assets/ayu-dark-Cv9koXgw.js +1 -0
- package/dist/assets/ballerina-BFfxhgS-.js +1 -0
- package/dist/assets/ballerina-BMbY-1wP.js +1 -0
- package/dist/assets/bat-BkioyH1T.js +1 -0
- package/dist/assets/bat-Dcnh2ot_.js +1 -0
- package/dist/assets/beancount-B92nBv9q.js +1 -0
- package/dist/assets/beancount-k_qm7-4y.js +1 -0
- package/dist/assets/berry-C9fz7p0n.js +1 -0
- package/dist/assets/berry-uYugtg8r.js +1 -0
- package/dist/assets/bibtex-CHM0blh-.js +1 -0
- package/dist/assets/bibtex-DELXwv0g.js +1 -0
- package/dist/assets/bicep-Bmn6On1c.js +1 -0
- package/dist/assets/bicep-D2njIRU5.js +1 -0
- package/dist/assets/bip-bop-03-DXp7Zb0f.aac +0 -0
- package/dist/assets/bip-bop-04-CfVtpI7z.aac +0 -0
- package/dist/assets/bip-bop-06-BuvNosjK.aac +0 -0
- package/dist/assets/bip-bop-08-DBf7Bwjz.aac +0 -0
- package/dist/assets/bip-bop-09-CxEgoAHQ.aac +0 -0
- package/dist/assets/blade-CwZbp2Ca.js +1 -0
- package/dist/assets/blade-DVc8C-J4.js +1 -0
- package/dist/assets/bsl-BO_Y6i37.js +1 -0
- package/dist/assets/bsl-C4qeDxuX.js +1 -0
- package/dist/assets/c-BIGW1oBm.js +1 -0
- package/dist/assets/c-CyUOlKFr.js +1 -0
- package/dist/assets/cadence-Bv_4Rxtq.js +1 -0
- package/dist/assets/cadence-bIHbUj02.js +1 -0
- package/dist/assets/cairo-C_mOTUpN.js +1 -0
- package/dist/assets/cairo-KRGpt6FW.js +1 -0
- package/dist/assets/catppuccin-frappe-DFWUc33u.js +1 -0
- package/dist/assets/catppuccin-latte-C9dUb6Cb.js +1 -0
- package/dist/assets/catppuccin-macchiato-DQyhUUbL.js +1 -0
- package/dist/assets/catppuccin-mocha-D87Tk5Gz.js +1 -0
- package/dist/assets/clarity-A4x-rz24.js +1 -0
- package/dist/assets/clarity-D53aC0YG.js +1 -0
- package/dist/assets/clojure-Bb2-3A0I.js +1 -0
- package/dist/assets/clojure-P80f7IUj.js +1 -0
- package/dist/assets/cmake-Cv5ljclQ.js +1 -0
- package/dist/assets/cmake-D1j8_8rp.js +1 -0
- package/dist/assets/cobol-Cg3yRVOY.js +1 -0
- package/dist/assets/cobol-nwyudZeR.js +1 -0
- package/dist/assets/codeowners-Bp6g37R7.js +1 -0
- package/dist/assets/codeowners-CKT8dJip.js +1 -0
- package/dist/assets/codeql-DXd8ggn3.js +1 -0
- package/dist/assets/codeql-DsOJ9woJ.js +1 -0
- package/dist/assets/coffee-CSg58a7P.js +1 -0
- package/dist/assets/coffee-Ch7k5sss.js +1 -0
- package/dist/assets/common-lisp-Cg-RD9OK.js +1 -0
- package/dist/assets/common-lisp-v102bg8X.js +1 -0
- package/dist/assets/coq-CxCehFeR.js +1 -0
- package/dist/assets/coq-DkFqJrB1.js +1 -0
- package/dist/assets/cpp-C28rag7_.js +1 -0
- package/dist/assets/cpp-CofmeUqb.js +1 -0
- package/dist/assets/crystal-kLfOnxTY.js +1 -0
- package/dist/assets/crystal-tKQVLTB8.js +1 -0
- package/dist/assets/csharp-DFQpaWb6.js +1 -0
- package/dist/assets/csharp-K5feNrxe.js +1 -0
- package/dist/assets/css-BSK200cd.js +1 -0
- package/dist/assets/css-DPfMkruS.js +1 -0
- package/dist/assets/csv-AZNL9t8Q.js +1 -0
- package/dist/assets/csv-fuZLfV_i.js +1 -0
- package/dist/assets/cue-D82EKSYY.js +1 -0
- package/dist/assets/cue-nzsbQn5T.js +1 -0
- package/dist/assets/cypher-BM7Pwunj.js +1 -0
- package/dist/assets/cypher-COkxafJQ.js +1 -0
- package/dist/assets/d-85-TOEBH.js +1 -0
- package/dist/assets/d-TG9YRPoI.js +1 -0
- package/dist/assets/dark-plus-C3mMm8J8.js +1 -0
- package/dist/assets/dart-CF10PKvl.js +1 -0
- package/dist/assets/dart-DArdxSyj.js +1 -0
- package/dist/assets/dax-B28Cho4e.js +1 -0
- package/dist/assets/dax-CEL-wOlO.js +1 -0
- package/dist/assets/desktop-BmXAJ9_W.js +1 -0
- package/dist/assets/desktop-Z9LhWKWr.js +1 -0
- package/dist/assets/diff-BlzBhZx2.js +1 -0
- package/dist/assets/diff-D97Zzqfu.js +1 -0
- package/dist/assets/docker-BcOcwvcX.js +1 -0
- package/dist/assets/docker-DIG_IqVK.js +1 -0
- package/dist/assets/dotenv-Bf0GLMGc.js +1 -0
- package/dist/assets/dotenv-Da5cRb03.js +1 -0
- package/dist/assets/dracula-BzJJZx-M.js +1 -0
- package/dist/assets/dracula-soft-BXkSAIEj.js +1 -0
- package/dist/assets/dream-maker-BtqSS_iP.js +1 -0
- package/dist/assets/dream-maker-DBhfoDN-.js +1 -0
- package/dist/assets/edge-BkV0erSs.js +1 -0
- package/dist/assets/edge-C9mkmEUa.js +1 -0
- package/dist/assets/elixir-B1OcFvXE.js +1 -0
- package/dist/assets/elixir-CDX3lj18.js +1 -0
- package/dist/assets/elm-BX_9EnK8.js +1 -0
- package/dist/assets/elm-DbKCFpqz.js +1 -0
- package/dist/assets/emacs-lisp-C9XAeP06.js +1 -0
- package/dist/assets/emacs-lisp-fXIB3QbG.js +1 -0
- package/dist/assets/erb-BOJIQeun.js +1 -0
- package/dist/assets/erb-CjsbKF3w.js +1 -0
- package/dist/assets/erlang-Dh270pQQ.js +1 -0
- package/dist/assets/erlang-DsQrWhSR.js +1 -0
- package/dist/assets/everforest-dark-BgDCqdQA.js +1 -0
- package/dist/assets/everforest-light-C8M2exoo.js +1 -0
- package/dist/assets/fennel-BYunw83y.js +1 -0
- package/dist/assets/fennel-CKW7gc4E.js +1 -0
- package/dist/assets/finder-CGxGn0h3.png +0 -0
- package/dist/assets/fish-BiaFC76h.js +1 -0
- package/dist/assets/fish-BvzEVeQv.js +1 -0
- package/dist/assets/fluent-C1VbA1FI.js +1 -0
- package/dist/assets/fluent-C4IJs8-o.js +1 -0
- package/dist/assets/fortran-fixed-form-BZjJHVRy.js +1 -0
- package/dist/assets/fortran-fixed-form-VBUom2Po.js +1 -0
- package/dist/assets/fortran-free-form-D22FLkUw.js +1 -0
- package/dist/assets/fortran-free-form-xZZnushS.js +1 -0
- package/dist/assets/fsharp-B6CigNpP.js +1 -0
- package/dist/assets/fsharp-CXgrBDvD.js +1 -0
- package/dist/assets/gdresource-B57lXvxj.js +1 -0
- package/dist/assets/gdresource-B7Tvp0Sc.js +1 -0
- package/dist/assets/gdscript-DTMYz4Jt.js +1 -0
- package/dist/assets/gdscript-etqGfJNh.js +1 -0
- package/dist/assets/gdshader-DkwncUOv.js +1 -0
- package/dist/assets/gdshader-MbeiIFWW.js +1 -0
- package/dist/assets/genie-CTXGoN_z.js +1 -0
- package/dist/assets/genie-D0YGMca9.js +1 -0
- package/dist/assets/gherkin-DQeIZrj7.js +1 -0
- package/dist/assets/gherkin-DyxjwDmM.js +1 -0
- package/dist/assets/ghostty-web-CsYhFgbJ.js +13 -0
- package/dist/assets/git-commit-BicZTByO.js +1 -0
- package/dist/assets/git-commit-F4YmCXRG.js +1 -0
- package/dist/assets/git-rebase-Bzlpfr7M.js +1 -0
- package/dist/assets/git-rebase-r7XF79zn.js +1 -0
- package/dist/assets/github-dark-DHJKELXO.js +1 -0
- package/dist/assets/github-dark-default-Cuk6v7N8.js +1 -0
- package/dist/assets/github-dark-dimmed-DH5Ifo-i.js +1 -0
- package/dist/assets/github-dark-high-contrast-E3gJ1_iC.js +1 -0
- package/dist/assets/github-light-DAi9KRSo.js +1 -0
- package/dist/assets/github-light-default-D7oLnXFd.js +1 -0
- package/dist/assets/github-light-high-contrast-BfjtVDDH.js +1 -0
- package/dist/assets/gleam-B-IqXlZK.js +1 -0
- package/dist/assets/gleam-BspZqrRM.js +1 -0
- package/dist/assets/glimmer-js-Rg0-pVw9.js +1 -0
- package/dist/assets/glimmer-js-cZi37nA1.js +1 -0
- package/dist/assets/glimmer-ts-BY3QTAW9.js +1 -0
- package/dist/assets/glimmer-ts-U6CK756n.js +1 -0
- package/dist/assets/glsl-Bk7TyU8J.js +1 -0
- package/dist/assets/glsl-DplSGwfg.js +1 -0
- package/dist/assets/gnuplot-BBjkHhdK.js +1 -0
- package/dist/assets/gnuplot-DdkO51Og.js +1 -0
- package/dist/assets/go-BYCC9JQ2.js +1 -0
- package/dist/assets/go-Dn2_MT6a.js +1 -0
- package/dist/assets/graphql-By4-2MiP.js +1 -0
- package/dist/assets/graphql-ChdNCCLP.js +1 -0
- package/dist/assets/groovy-DjMbfbx0.js +1 -0
- package/dist/assets/groovy-gcz8RCvz.js +1 -0
- package/dist/assets/gruvbox-dark-hard-CFHQjOhq.js +1 -0
- package/dist/assets/gruvbox-dark-medium-GsRaNv29.js +1 -0
- package/dist/assets/gruvbox-dark-soft-CVdnzihN.js +1 -0
- package/dist/assets/gruvbox-light-hard-CH1njM8p.js +1 -0
- package/dist/assets/gruvbox-light-medium-DRw_LuNl.js +1 -0
- package/dist/assets/gruvbox-light-soft-hJgmCMqR.js +1 -0
- package/dist/assets/hack-CaT9iCJl.js +1 -0
- package/dist/assets/hack-Ce3HFLQu.js +1 -0
- package/dist/assets/haml-B8DHNrY2.js +1 -0
- package/dist/assets/haml-C-C08OMF.js +1 -0
- package/dist/assets/handlebars-BFxKmXBZ.js +1 -0
- package/dist/assets/handlebars-BL8al0AC.js +1 -0
- package/dist/assets/haskell-Df6bDoY_.js +1 -0
- package/dist/assets/haskell-DtebQ3Kv.js +1 -0
- package/dist/assets/haxe-CzTSHFRz.js +1 -0
- package/dist/assets/haxe-n0Q_eay_.js +1 -0
- package/dist/assets/hcl-BWvSN4gD.js +1 -0
- package/dist/assets/hcl-shhv74hy.js +1 -0
- package/dist/assets/hjson-BEMFYqr7.js +1 -0
- package/dist/assets/hjson-D5-asLiD.js +1 -0
- package/dist/assets/hlsl-D3lLCCz7.js +1 -0
- package/dist/assets/hlsl-Pefxhtaj.js +1 -0
- package/dist/assets/home-DDFZTO3p.js +1 -0
- package/dist/assets/houston-DnULxvSX.js +1 -0
- package/dist/assets/html-DBrZJmtb.js +1 -0
- package/dist/assets/html-GMplVEZG.js +1 -0
- package/dist/assets/html-derivative-BFtXZ54Q.js +1 -0
- package/dist/assets/html-derivative-DgyNW28a.js +1 -0
- package/dist/assets/http-D0p2QOuJ.js +1 -0
- package/dist/assets/http-jrhK8wxY.js +1 -0
- package/dist/assets/hurl-CeF7EoTQ.js +1 -0
- package/dist/assets/hurl-irOxFIW8.js +1 -0
- package/dist/assets/hxml-B_SuSTPP.js +1 -0
- package/dist/assets/hxml-Bvhsp5Yf.js +1 -0
- package/dist/assets/hy-CTpXmg0M.js +1 -0
- package/dist/assets/hy-DFXneXwc.js +1 -0
- package/dist/assets/imba-DGztddWO.js +1 -0
- package/dist/assets/imba-z_cUhu9e.js +1 -0
- package/dist/assets/index-D0jX0BNw.js +1844 -0
- package/dist/assets/index-DDCRe3lm.css +1 -0
- package/dist/assets/ini-BEwlwnbL.js +1 -0
- package/dist/assets/ini-DOGW4-0C.js +1 -0
- package/dist/assets/inter-FIwubZjA.woff2 +0 -0
- package/dist/assets/iosevka-nerd-font-DKH7rjGs.woff2 +0 -0
- package/dist/assets/iosevka-nerd-font-bold-BObfzjZJ.woff2 +0 -0
- package/dist/assets/java-B2AjWfgk.js +1 -0
- package/dist/assets/java-CylS5w8V.js +1 -0
- package/dist/assets/javascript-XPxc2APE.js +1 -0
- package/dist/assets/javascript-wDzz0qaB.js +1 -0
- package/dist/assets/jinja-4LBKfQ-Z.js +1 -0
- package/dist/assets/jinja-DlBE7Xgz.js +1 -0
- package/dist/assets/jison-DRGa8fbr.js +1 -0
- package/dist/assets/jison-wvAkD_A8.js +1 -0
- package/dist/assets/json-CjLXzM_z.js +1 -0
- package/dist/assets/json-Cp-IABpG.js +1 -0
- package/dist/assets/json5-C9tS-k6U.js +1 -0
- package/dist/assets/json5-DE06a0U2.js +1 -0
- package/dist/assets/jsonc-BYi4HS05.js +1 -0
- package/dist/assets/jsonc-Des-eS-w.js +1 -0
- package/dist/assets/jsonl-CuhIcKDk.js +1 -0
- package/dist/assets/jsonl-DcaNXYhu.js +1 -0
- package/dist/assets/jsonnet-DFQXde-d.js +1 -0
- package/dist/assets/jsonnet-DtQdHwK-.js +1 -0
- package/dist/assets/jssm-BlhucWo7.js +1 -0
- package/dist/assets/jssm-C2t-YnRu.js +1 -0
- package/dist/assets/jsx-BGEKFWBk.js +1 -0
- package/dist/assets/jsx-g9-lgVsj.js +1 -0
- package/dist/assets/julia-Bh5qjrIj.js +1 -0
- package/dist/assets/julia-C8NyazO9.js +1 -0
- package/dist/assets/kanagawa-dragon-CkXjmgJE.js +1 -0
- package/dist/assets/kanagawa-lotus-CfQXZHmo.js +1 -0
- package/dist/assets/kanagawa-wave-DWedfzmr.js +1 -0
- package/dist/assets/kdl-DJsF4U57.js +1 -0
- package/dist/assets/kdl-DV7GczEv.js +1 -0
- package/dist/assets/kotlin-BdnUsdx6.js +1 -0
- package/dist/assets/kotlin-DwKqsDKK.js +1 -0
- package/dist/assets/kusto-BvAqAH-y.js +1 -0
- package/dist/assets/kusto-w7PrLrBe.js +1 -0
- package/dist/assets/laserwave-DUszq2jm.js +1 -0
- package/dist/assets/latex-BdAV_C_H.js +1 -0
- package/dist/assets/latex-BuzO6rjU.js +1 -0
- package/dist/assets/lean-Bc6EcWN3.js +1 -0
- package/dist/assets/lean-Dle5D8N4.js +1 -0
- package/dist/assets/less-B1dDrJ26.js +1 -0
- package/dist/assets/less-C76OjOdF.js +1 -0
- package/dist/assets/light-plus-B7mTdjB0.js +1 -0
- package/dist/assets/liquid-DYVedYrR.js +1 -0
- package/dist/assets/liquid-DdraCjph.js +1 -0
- package/dist/assets/llvm-BtvRca6l.js +1 -0
- package/dist/assets/llvm-s1WuUfOe.js +1 -0
- package/dist/assets/log-2UxHyX5q.js +1 -0
- package/dist/assets/log-CbW7hOWU.js +1 -0
- package/dist/assets/logo-BbooMuDm.js +1 -0
- package/dist/assets/logo-BtOb2qkB.js +1 -0
- package/dist/assets/lua-BbnMAYS6.js +1 -0
- package/dist/assets/lua-tkfysgZP.js +1 -0
- package/dist/assets/luau-CBwFb-vO.js +1 -0
- package/dist/assets/luau-CXu1NL6O.js +1 -0
- package/dist/assets/make-CHLpvVh8.js +1 -0
- package/dist/assets/make-s9FKP0VE.js +1 -0
- package/dist/assets/markdown-CKXSK5AY.js +1 -0
- package/dist/assets/markdown-Cvjx9yec.js +1 -0
- package/dist/assets/marko-BsqRlKIY.js +1 -0
- package/dist/assets/marko-CPi9NSCl.js +1 -0
- package/dist/assets/material-theme-D5KoaKCx.js +1 -0
- package/dist/assets/material-theme-darker-BfHTSMKl.js +1 -0
- package/dist/assets/material-theme-lighter-B0m2ddpp.js +1 -0
- package/dist/assets/material-theme-ocean-CyktbL80.js +1 -0
- package/dist/assets/material-theme-palenight-Csfq5Kiy.js +1 -0
- package/dist/assets/matlab-BQKM-LA_.js +1 -0
- package/dist/assets/matlab-D7o27uSR.js +1 -0
- package/dist/assets/mdc-BBM-UqJy.js +1 -0
- package/dist/assets/mdc-DUICxH0z.js +1 -0
- package/dist/assets/mdx-BWRhHdFl.js +1 -0
- package/dist/assets/mdx-Cmh6b_Ma.js +1 -0
- package/dist/assets/mermaid-DKYwYmdq.js +1 -0
- package/dist/assets/mermaid-DrapLM8U.js +1 -0
- package/dist/assets/min-dark-CafNBF8u.js +1 -0
- package/dist/assets/min-light-CTRr51gU.js +1 -0
- package/dist/assets/mipsasm-BElnB_7Q.js +1 -0
- package/dist/assets/mipsasm-CKIfxQSi.js +1 -0
- package/dist/assets/mojo-1DNp92w6.js +1 -0
- package/dist/assets/mojo-Dz6zCmiK.js +1 -0
- package/dist/assets/monokai-D4h5O-jR.js +1 -0
- package/dist/assets/move-Bu9oaDYs.js +1 -0
- package/dist/assets/move-Dvu4btzz.js +1 -0
- package/dist/assets/narrat-Cy2k80UN.js +1 -0
- package/dist/assets/narrat-DRg8JJMk.js +1 -0
- package/dist/assets/nextflow-BO4ujnzu.js +1 -0
- package/dist/assets/nextflow-BrzmwbiE.js +1 -0
- package/dist/assets/nginx-DknmC5AR.js +1 -0
- package/dist/assets/nginx-XmDIhN78.js +1 -0
- package/dist/assets/night-owl-C39BiMTA.js +1 -0
- package/dist/assets/nim-CVrawwO9.js +1 -0
- package/dist/assets/nim-Cm6-Nayq.js +1 -0
- package/dist/assets/nix-DcZRBjkC.js +1 -0
- package/dist/assets/nix-c8nO5XWb.js +1 -0
- package/dist/assets/nope-02-EygnDbCM.aac +0 -0
- package/dist/assets/nope-05-DZsXzrQW.aac +0 -0
- package/dist/assets/nope-08-COPo0uNf.aac +0 -0
- package/dist/assets/nope-11-CVdXg8G-.aac +0 -0
- package/dist/assets/nope-12-BJR1Ka3c.aac +0 -0
- package/dist/assets/nord-Ddv68eIx.js +1 -0
- package/dist/assets/nushell-C-sUppwS.js +1 -0
- package/dist/assets/nushell-Dqv-0Q5X.js +1 -0
- package/dist/assets/objective-c-DXmwc3jG.js +1 -0
- package/dist/assets/objective-c-sgtl-PdD.js +1 -0
- package/dist/assets/objective-cpp-BTQ37cYs.js +1 -0
- package/dist/assets/objective-cpp-CLxacb5B.js +1 -0
- package/dist/assets/ocaml-BvBP9Lm0.js +1 -0
- package/dist/assets/ocaml-C0hk2d4L.js +1 -0
- package/dist/assets/one-dark-pro-DVMEJ2y_.js +1 -0
- package/dist/assets/one-light-PoHY5YXO.js +1 -0
- package/dist/assets/openscad-C4EeE6gA.js +1 -0
- package/dist/assets/openscad-Dmi2c_42.js +1 -0
- package/dist/assets/pascal-D93ZcfNL.js +1 -0
- package/dist/assets/pascal-DYjw0AuS.js +1 -0
- package/dist/assets/perl-C0TMdlhV.js +1 -0
- package/dist/assets/perl-Djxv1YJ9.js +1 -0
- package/dist/assets/php-CDn_0X-4.js +1 -0
- package/dist/assets/php-DEfiO3Bd.js +1 -0
- package/dist/assets/pierre-dark-BXuwtOqb.js +1 -0
- package/dist/assets/pierre-light-dckrK0oj.js +1 -0
- package/dist/assets/pkl-Cij4Vm9z.js +1 -0
- package/dist/assets/pkl-u5AG7uiY.js +1 -0
- package/dist/assets/plastic-3e1v2bzS.js +1 -0
- package/dist/assets/plsql-Bd6NdBJI.js +1 -0
- package/dist/assets/plsql-ChMvpjG-.js +1 -0
- package/dist/assets/po-BTJTHyun.js +1 -0
- package/dist/assets/po-CUhVi7la.js +1 -0
- package/dist/assets/poimandres-CS3Unz2-.js +1 -0
- package/dist/assets/polar-B-qJ3AIy.js +1 -0
- package/dist/assets/polar-C0HS_06l.js +1 -0
- package/dist/assets/postcss-BSGhOJ4k.js +1 -0
- package/dist/assets/postcss-CXtECtnM.js +1 -0
- package/dist/assets/powerquery-CC1XieQO.js +1 -0
- package/dist/assets/powerquery-CEu0bR-o.js +1 -0
- package/dist/assets/powershell-DdRAnR4Z.js +1 -0
- package/dist/assets/powershell-Dpen1YoG.js +1 -0
- package/dist/assets/prisma-C0hJlfqX.js +1 -0
- package/dist/assets/prisma-Dd19v3D-.js +1 -0
- package/dist/assets/prolog-CbFg5uaA.js +1 -0
- package/dist/assets/prolog-bSi0SE3D.js +1 -0
- package/dist/assets/proto-DIGPV07t.js +1 -0
- package/dist/assets/proto-DyJlTyXw.js +1 -0
- package/dist/assets/pug-CGlum2m_.js +1 -0
- package/dist/assets/pug-ClQUpJlV.js +1 -0
- package/dist/assets/puppet-BMWR74SV.js +1 -0
- package/dist/assets/puppet-ja2MI9-b.js +1 -0
- package/dist/assets/purescript-CklMAg4u.js +1 -0
- package/dist/assets/purescript-CxgsQa43.js +1 -0
- package/dist/assets/python-B6aJPvgy.js +1 -0
- package/dist/assets/python-DgE28U1V.js +1 -0
- package/dist/assets/qml-3beO22l8.js +1 -0
- package/dist/assets/qml-BEkX6VoX.js +1 -0
- package/dist/assets/qmldir-C8lEn-DE.js +1 -0
- package/dist/assets/qmldir-DNYHzgow.js +1 -0
- package/dist/assets/qss-BZsEMKxJ.js +1 -0
- package/dist/assets/qss-IeuSbFQv.js +1 -0
- package/dist/assets/r-BfG_C0qz.js +1 -0
- package/dist/assets/r-DiinP2Uv.js +1 -0
- package/dist/assets/racket-BqYA7rlc.js +1 -0
- package/dist/assets/racket-CzHBKLyy.js +1 -0
- package/dist/assets/raku-CPccoUN1.js +1 -0
- package/dist/assets/raku-DXvB9xmW.js +1 -0
- package/dist/assets/razor-8rj0VRTp.js +1 -0
- package/dist/assets/razor-CE9lU5zL.js +1 -0
- package/dist/assets/red-bN70gL4F.js +1 -0
- package/dist/assets/reg-C-SQnVFl.js +1 -0
- package/dist/assets/reg-DkqHJyC0.js +1 -0
- package/dist/assets/regexp-BW_zLBm-.js +1 -0
- package/dist/assets/regexp-CDVJQ6XC.js +1 -0
- package/dist/assets/rel-BIqKdwke.js +1 -0
- package/dist/assets/rel-C3B-1QV4.js +1 -0
- package/dist/assets/riscv-BM1_JUlF.js +1 -0
- package/dist/assets/riscv-s6spwTFp.js +1 -0
- package/dist/assets/rose-pine-dawn-DHQR4-dF.js +1 -0
- package/dist/assets/rose-pine-moon-D4_iv3hh.js +1 -0
- package/dist/assets/rose-pine-qdsjHGoJ.js +1 -0
- package/dist/assets/rosmsg-BJDFO7_C.js +1 -0
- package/dist/assets/rosmsg-TcL_zzr8.js +1 -0
- package/dist/assets/rst-8IYWyo0X.js +1 -0
- package/dist/assets/rst-B0xPkSld.js +1 -0
- package/dist/assets/ruby-BvKwtOVI.js +1 -0
- package/dist/assets/ruby-CHyTNJrF.js +1 -0
- package/dist/assets/rust-B1yitclQ.js +1 -0
- package/dist/assets/rust-DJErdhjk.js +1 -0
- package/dist/assets/sas-BZeeyq_z.js +1 -0
- package/dist/assets/sas-cz2c8ADy.js +1 -0
- package/dist/assets/sass-CIfQ9yqV.js +1 -0
- package/dist/assets/sass-Cj5Yp3dK.js +1 -0
- package/dist/assets/scala-C151Ov-r.js +1 -0
- package/dist/assets/scala-CWwlNtab.js +1 -0
- package/dist/assets/scheme-ByM66cy_.js +1 -0
- package/dist/assets/scheme-C98Dy4si.js +1 -0
- package/dist/assets/scss-Dk05w39G.js +1 -0
- package/dist/assets/scss-OYdSNvt2.js +1 -0
- package/dist/assets/sdbl-C5Q1usnU.js +1 -0
- package/dist/assets/sdbl-DVxCFoDh.js +1 -0
- package/dist/assets/session-fRmszlju.js +41 -0
- package/dist/assets/shaderlab-DNkMdb2B.js +1 -0
- package/dist/assets/shaderlab-Dg9Lc6iA.js +1 -0
- package/dist/assets/shellscript-CE-5zpiL.js +1 -0
- package/dist/assets/shellscript-Yzrsuije.js +1 -0
- package/dist/assets/shellsession-BADoaaVG.js +1 -0
- package/dist/assets/shellsession-BhddCRKA.js +1 -0
- package/dist/assets/slack-dark-BthQWCQV.js +1 -0
- package/dist/assets/slack-ochin-DqwNpetd.js +1 -0
- package/dist/assets/smalltalk-BERRCDM3.js +1 -0
- package/dist/assets/smalltalk-GKfhTxrk.js +1 -0
- package/dist/assets/snazzy-light-Bw305WKR.js +1 -0
- package/dist/assets/solarized-dark-DXbdFlpD.js +1 -0
- package/dist/assets/solarized-light-L9t79GZl.js +1 -0
- package/dist/assets/solidity-DanOLEvk.js +1 -0
- package/dist/assets/solidity-rGO070M0.js +1 -0
- package/dist/assets/soy-Brmx7dQM.js +1 -0
- package/dist/assets/soy-C6ERzLIv.js +1 -0
- package/dist/assets/sparql-CHK3vDkL.js +1 -0
- package/dist/assets/sparql-rVzFXLq3.js +1 -0
- package/dist/assets/splunk-BtCnVYZw.js +1 -0
- package/dist/assets/splunk-YU1HCmJX.js +1 -0
- package/dist/assets/sprite-BxALe73Z.svg +882 -0
- package/dist/assets/sprite-Fb-TFjRY.svg +11707 -0
- package/dist/assets/sql-BLtJtn59.js +1 -0
- package/dist/assets/sql-CKXjX23X.js +1 -0
- package/dist/assets/ssh-config-Cpnw3KEt.js +1 -0
- package/dist/assets/ssh-config-_ykCGR6B.js +1 -0
- package/dist/assets/staplebops-03-Aug82oH0.aac +0 -0
- package/dist/assets/staplebops-04-olyHi8qQ.aac +0 -0
- package/dist/assets/staplebops-06-Cj_2vOI4.aac +0 -0
- package/dist/assets/staplebops-07-cqQEvbIf.aac +0 -0
- package/dist/assets/stata-BH5u7GGu.js +1 -0
- package/dist/assets/stata-BJqnY-gO.js +1 -0
- package/dist/assets/stylus-BEDo0Tqx.js +1 -0
- package/dist/assets/stylus-CHekGIgu.js +1 -0
- package/dist/assets/svelte-3Dk4HxPD.js +1 -0
- package/dist/assets/svelte-DmnhoTkn.js +1 -0
- package/dist/assets/swift-Deru3G9w.js +1 -0
- package/dist/assets/swift-Dg5xB15N.js +1 -0
- package/dist/assets/synthwave-84-CbfX1IO0.js +1 -0
- package/dist/assets/system-verilog-CnnmHF94.js +1 -0
- package/dist/assets/system-verilog-rKNYENrf.js +1 -0
- package/dist/assets/systemd-4A_iFExJ.js +1 -0
- package/dist/assets/systemd-C1FfcI00.js +1 -0
- package/dist/assets/talonscript-CkByrt1z.js +1 -0
- package/dist/assets/talonscript-bksoRmW6.js +1 -0
- package/dist/assets/tasl-Bl4tsGRM.js +1 -0
- package/dist/assets/tasl-QIJgUcNo.js +1 -0
- package/dist/assets/tcl-B2_VAYrd.js +1 -0
- package/dist/assets/tcl-dwOrl1Do.js +1 -0
- package/dist/assets/templ-CyHhV9jl.js +1 -0
- package/dist/assets/templ-W15q3VgB.js +1 -0
- package/dist/assets/terminal-Cpd_WDea.png +0 -0
- package/dist/assets/terraform-BETggiCN.js +1 -0
- package/dist/assets/terraform-Ba94thAr.js +1 -0
- package/dist/assets/tex-CxkMU7Pf.js +1 -0
- package/dist/assets/tex-DZ7Smwga.js +1 -0
- package/dist/assets/textmate-B-hymv65.png +0 -0
- package/dist/assets/tokyo-night-hegEt444.js +1 -0
- package/dist/assets/toml-Btlk-g9G.js +1 -0
- package/dist/assets/toml-vGWfd6FD.js +1 -0
- package/dist/assets/ts-tags-DMPjx__B.js +1 -0
- package/dist/assets/ts-tags-zn1MmPIZ.js +1 -0
- package/dist/assets/tsv-B_m7g4N7.js +1 -0
- package/dist/assets/tsv-DYfmKMIW.js +1 -0
- package/dist/assets/tsx-COt5Ahok.js +1 -0
- package/dist/assets/tsx-Dio8iE-N.js +1 -0
- package/dist/assets/turtle-BsS91CYL.js +1 -0
- package/dist/assets/turtle-whXsfw69.js +1 -0
- package/dist/assets/twig-CO9l9SDP.js +1 -0
- package/dist/assets/twig-vsFUeHgy.js +1 -0
- package/dist/assets/typescript-BPQ3VLAy.js +1 -0
- package/dist/assets/typescript-DttGkNCf.js +1 -0
- package/dist/assets/typespec-BGHnOYBU.js +1 -0
- package/dist/assets/typespec-C_z-8Pri.js +1 -0
- package/dist/assets/typst-D2RORpaG.js +1 -0
- package/dist/assets/typst-DHCkPAjA.js +1 -0
- package/dist/assets/v-BcVCzyr7.js +1 -0
- package/dist/assets/v-CvM42WIw.js +1 -0
- package/dist/assets/vala-B_5xOBNr.js +1 -0
- package/dist/assets/vala-CsfeWuGM.js +1 -0
- package/dist/assets/vb-BVDm3zBt.js +1 -0
- package/dist/assets/vb-D17OF-Vu.js +1 -0
- package/dist/assets/verilog-BQ8w6xss.js +1 -0
- package/dist/assets/verilog-D5iownw6.js +1 -0
- package/dist/assets/vesper-DU1UobuO.js +1 -0
- package/dist/assets/vhdl-Bmgbkl_-.js +1 -0
- package/dist/assets/vhdl-CeAyd5Ju.js +1 -0
- package/dist/assets/viml-3ZODU9FQ.js +1 -0
- package/dist/assets/viml-CJc9bBzg.js +1 -0
- package/dist/assets/vitesse-black-Bkuqu6BP.js +1 -0
- package/dist/assets/vitesse-dark-D0r3Knsf.js +1 -0
- package/dist/assets/vitesse-light-CVO1_9PV.js +1 -0
- package/dist/assets/vue-BJuclMoA.js +1 -0
- package/dist/assets/vue-DnHKYNfI.js +1 -0
- package/dist/assets/vue-html-CChd_i61.js +1 -0
- package/dist/assets/vue-html-CRAum25o.js +1 -0
- package/dist/assets/vue-vine-8moa0y9V.js +1 -0
- package/dist/assets/vue-vine-CDS6dxm6.js +1 -0
- package/dist/assets/vyper-B6NKdirK.js +1 -0
- package/dist/assets/vyper-CDx5xZoG.js +1 -0
- package/dist/assets/wasm-CG6Dc4jp.js +1 -0
- package/dist/assets/wasm-LUzQYg3H.js +1 -0
- package/dist/assets/wasm-MzD3tlZU.js +1 -0
- package/dist/assets/wenyan-8fXatRyt.js +1 -0
- package/dist/assets/wenyan-BV7otONQ.js +1 -0
- package/dist/assets/wgsl-CECC3vJ5.js +1 -0
- package/dist/assets/wgsl-Dx-B1_4e.js +1 -0
- package/dist/assets/wikitext-BaRWL9sq.js +1 -0
- package/dist/assets/wikitext-BhOHFoWU.js +1 -0
- package/dist/assets/wit-5i3qLPDT.js +1 -0
- package/dist/assets/wit-MEd50GYB.js +1 -0
- package/dist/assets/wolfram-CmMaIVaG.js +1 -0
- package/dist/assets/wolfram-lXgVvXCa.js +1 -0
- package/dist/assets/worker-CKpRWWws.js +153 -0
- package/dist/assets/xcode-4zqeTePl.png +0 -0
- package/dist/assets/xml-DtyAt_xK.js +1 -0
- package/dist/assets/xml-sdJ4AIDG.js +1 -0
- package/dist/assets/xsl-Btrj9DhN.js +1 -0
- package/dist/assets/xsl-CtQFsRM5.js +1 -0
- package/dist/assets/yaml-B92AUxDB.js +1 -0
- package/dist/assets/yaml-Buea-lGh.js +1 -0
- package/dist/assets/yup-01-BtRq6dLN.aac +0 -0
- package/dist/assets/yup-03-BHLEoqSS.aac +0 -0
- package/dist/assets/yup-04-C7yadpJT.aac +0 -0
- package/dist/assets/yup-05-CuuaeyjC.aac +0 -0
- package/dist/assets/zenscript-DVFEvuxE.js +1 -0
- package/dist/assets/zenscript-Dja4fBOE.js +1 -0
- package/dist/assets/zig-LhWa2ADv.js +1 -0
- package/dist/assets/zig-VOosw3JB.js +1 -0
- package/dist/favicon-96x96-v3.png +0 -0
- package/dist/favicon-96x96.png +0 -0
- package/dist/favicon-v3.ico +0 -0
- package/dist/favicon-v3.svg +7 -0
- package/dist/favicon.ico +0 -0
- package/dist/favicon.svg +7 -0
- package/dist/index.html +24 -0
- package/dist/oc-theme-preload.js +28 -0
- package/dist/site.webmanifest +21 -0
- package/dist/social-share-zen.png +0 -0
- package/dist/social-share.png +0 -0
- package/dist/web-app-manifest-192x192.png +0 -0
- package/dist/web-app-manifest-512x512.png +0 -0
- package/e2e/AGENTS.md +176 -0
- package/e2e/actions.ts +421 -0
- package/e2e/app/home.spec.ts +21 -0
- package/e2e/app/navigation.spec.ts +10 -0
- package/e2e/app/palette.spec.ts +11 -0
- package/e2e/app/server-default.spec.ts +55 -0
- package/e2e/app/session.spec.ts +16 -0
- package/e2e/app/titlebar-history.spec.ts +42 -0
- package/e2e/files/file-open.spec.ts +18 -0
- package/e2e/files/file-tree.spec.ts +37 -0
- package/e2e/files/file-viewer.spec.ts +26 -0
- package/e2e/fixtures.ts +87 -0
- package/e2e/models/model-picker.spec.ts +42 -0
- package/e2e/models/models-visibility.spec.ts +61 -0
- package/e2e/projects/project-edit.spec.ts +53 -0
- package/e2e/projects/projects-close.spec.ts +74 -0
- package/e2e/projects/projects-switch.spec.ts +35 -0
- package/e2e/projects/workspaces.spec.ts +333 -0
- package/e2e/prompt/context.spec.ts +40 -0
- package/e2e/prompt/prompt-mention.spec.ts +26 -0
- package/e2e/prompt/prompt-slash-open.spec.ts +22 -0
- package/e2e/prompt/prompt.spec.ts +58 -0
- package/e2e/selectors.ts +57 -0
- package/e2e/session/session.spec.ts +157 -0
- package/e2e/settings/settings-keybinds.spec.ts +320 -0
- package/e2e/settings/settings-models.spec.ts +122 -0
- package/e2e/settings/settings-providers.spec.ts +136 -0
- package/e2e/settings/settings.spec.ts +292 -0
- package/e2e/sidebar/sidebar-session-links.spec.ts +31 -0
- package/e2e/sidebar/sidebar.spec.ts +14 -0
- package/e2e/status/status-popover.spec.ts +94 -0
- package/e2e/terminal/terminal-init.spec.ts +26 -0
- package/e2e/terminal/terminal.spec.ts +17 -0
- package/e2e/thinking-level.spec.ts +25 -0
- package/e2e/tsconfig.json +8 -0
- package/e2e/utils.ts +35 -0
- package/happydom.ts +75 -0
- package/index.html +23 -0
- package/package.json +72 -0
- package/playwright.config.ts +43 -0
- package/public/_headers +17 -0
- package/public/oc-theme-preload.js +28 -0
- package/script/e2e-local.ts +140 -0
- package/src/addons/serialize.test.ts +319 -0
- package/src/addons/serialize.ts +634 -0
- package/src/app.tsx +170 -0
- package/src/components/dialog-connect-provider.tsx +456 -0
- package/src/components/dialog-custom-provider.tsx +424 -0
- package/src/components/dialog-edit-project.tsx +245 -0
- package/src/components/dialog-fork.tsx +100 -0
- package/src/components/dialog-manage-models.tsx +76 -0
- package/src/components/dialog-release-notes.tsx +158 -0
- package/src/components/dialog-select-directory.tsx +326 -0
- package/src/components/dialog-select-file.tsx +404 -0
- package/src/components/dialog-select-mcp.tsx +96 -0
- package/src/components/dialog-select-model-unpaid.tsx +132 -0
- package/src/components/dialog-select-model.tsx +271 -0
- package/src/components/dialog-select-provider.tsx +87 -0
- package/src/components/dialog-select-server.tsx +536 -0
- package/src/components/dialog-settings.tsx +82 -0
- package/src/components/file-tree.test.ts +77 -0
- package/src/components/file-tree.tsx +468 -0
- package/src/components/link.tsx +17 -0
- package/src/components/model-tooltip.tsx +91 -0
- package/src/components/prompt-input/attachments.ts +145 -0
- package/src/components/prompt-input/build-request-parts.test.ts +277 -0
- package/src/components/prompt-input/build-request-parts.ts +190 -0
- package/src/components/prompt-input/context-items.tsx +82 -0
- package/src/components/prompt-input/drag-overlay.tsx +20 -0
- package/src/components/prompt-input/editor-dom.test.ts +51 -0
- package/src/components/prompt-input/editor-dom.ts +135 -0
- package/src/components/prompt-input/history.test.ts +69 -0
- package/src/components/prompt-input/history.ts +160 -0
- package/src/components/prompt-input/image-attachments.tsx +51 -0
- package/src/components/prompt-input/placeholder.test.ts +35 -0
- package/src/components/prompt-input/placeholder.ts +13 -0
- package/src/components/prompt-input/slash-popover.tsx +144 -0
- package/src/components/prompt-input/submit.ts +411 -0
- package/src/components/prompt-input.tsx +1199 -0
- package/src/components/question-dock.tsx +295 -0
- package/src/components/server/server-row.tsx +77 -0
- package/src/components/session/index.ts +5 -0
- package/src/components/session/session-context-metrics.test.ts +93 -0
- package/src/components/session/session-context-metrics.ts +94 -0
- package/src/components/session/session-context-tab.tsx +400 -0
- package/src/components/session/session-header.tsx +571 -0
- package/src/components/session/session-new-view.tsx +78 -0
- package/src/components/session/session-sortable-tab.tsx +63 -0
- package/src/components/session/session-sortable-terminal-tab.tsx +190 -0
- package/src/components/session-context-usage.tsx +100 -0
- package/src/components/settings-agents.tsx +15 -0
- package/src/components/settings-commands.tsx +15 -0
- package/src/components/settings-general.tsx +434 -0
- package/src/components/settings-keybinds.tsx +435 -0
- package/src/components/settings-mcp.tsx +15 -0
- package/src/components/settings-models.tsx +130 -0
- package/src/components/settings-permissions.tsx +228 -0
- package/src/components/settings-providers.tsx +264 -0
- package/src/components/status-popover.tsx +371 -0
- package/src/components/terminal.tsx +464 -0
- package/src/components/titlebar-history.test.ts +63 -0
- package/src/components/titlebar-history.ts +57 -0
- package/src/components/titlebar.tsx +261 -0
- package/src/context/command-keybind.test.ts +43 -0
- package/src/context/command.test.ts +25 -0
- package/src/context/command.tsx +365 -0
- package/src/context/comments.test.ts +111 -0
- package/src/context/comments.tsx +185 -0
- package/src/context/file/content-cache.ts +88 -0
- package/src/context/file/path.test.ts +352 -0
- package/src/context/file/path.ts +143 -0
- package/src/context/file/tree-store.ts +170 -0
- package/src/context/file/types.ts +41 -0
- package/src/context/file/view-cache.ts +136 -0
- package/src/context/file/watcher.test.ts +118 -0
- package/src/context/file/watcher.ts +52 -0
- package/src/context/file-content-eviction-accounting.test.ts +65 -0
- package/src/context/file.tsx +263 -0
- package/src/context/global-sdk.tsx +108 -0
- package/src/context/global-sync/bootstrap.ts +195 -0
- package/src/context/global-sync/child-store.ts +263 -0
- package/src/context/global-sync/event-reducer.test.ts +201 -0
- package/src/context/global-sync/event-reducer.ts +319 -0
- package/src/context/global-sync/eviction.ts +28 -0
- package/src/context/global-sync/queue.ts +83 -0
- package/src/context/global-sync/session-load.ts +26 -0
- package/src/context/global-sync/session-trim.test.ts +59 -0
- package/src/context/global-sync/session-trim.ts +56 -0
- package/src/context/global-sync/types.ts +134 -0
- package/src/context/global-sync/utils.ts +25 -0
- package/src/context/global-sync.test.ts +136 -0
- package/src/context/global-sync.tsx +365 -0
- package/src/context/highlights.tsx +225 -0
- package/src/context/language.tsx +226 -0
- package/src/context/layout-scroll.test.ts +36 -0
- package/src/context/layout-scroll.ts +118 -0
- package/src/context/layout.test.ts +69 -0
- package/src/context/layout.tsx +844 -0
- package/src/context/local.tsx +229 -0
- package/src/context/models.tsx +140 -0
- package/src/context/notification-index.ts +66 -0
- package/src/context/notification.test.ts +73 -0
- package/src/context/notification.tsx +199 -0
- package/src/context/permission.tsx +186 -0
- package/src/context/platform.tsx +75 -0
- package/src/context/prompt.tsx +246 -0
- package/src/context/sdk.tsx +48 -0
- package/src/context/server.tsx +208 -0
- package/src/context/settings.tsx +177 -0
- package/src/context/sync-optimistic.test.ts +56 -0
- package/src/context/sync.tsx +358 -0
- package/src/context/terminal.test.ts +38 -0
- package/src/context/terminal.tsx +283 -0
- package/src/entry.tsx +104 -0
- package/src/env.d.ts +8 -0
- package/src/hooks/use-providers.ts +31 -0
- package/src/i18n/ar.ts +716 -0
- package/src/i18n/br.ts +722 -0
- package/src/i18n/bs.ts +749 -0
- package/src/i18n/da.ts +721 -0
- package/src/i18n/de.ts +766 -0
- package/src/i18n/en.ts +792 -0
- package/src/i18n/es.ts +727 -0
- package/src/i18n/fr.ts +733 -0
- package/src/i18n/ja.ts +715 -0
- package/src/i18n/ko.ts +720 -0
- package/src/i18n/no.ts +723 -0
- package/src/i18n/parity.test.ts +31 -0
- package/src/i18n/pl.ts +723 -0
- package/src/i18n/ru.ts +727 -0
- package/src/i18n/th.ts +714 -0
- package/src/i18n/zh.ts +754 -0
- package/src/i18n/zht.ts +752 -0
- package/src/index.css +1 -0
- package/src/index.ts +3 -0
- package/src/pages/directory-layout.tsx +71 -0
- package/src/pages/error.tsx +290 -0
- package/src/pages/home.tsx +126 -0
- package/src/pages/layout/deep-links.ts +26 -0
- package/src/pages/layout/helpers.test.ts +63 -0
- package/src/pages/layout/helpers.ts +65 -0
- package/src/pages/layout/inline-editor.tsx +113 -0
- package/src/pages/layout/sidebar-items.tsx +328 -0
- package/src/pages/layout/sidebar-project-helpers.test.ts +63 -0
- package/src/pages/layout/sidebar-project-helpers.ts +11 -0
- package/src/pages/layout/sidebar-project.tsx +283 -0
- package/src/pages/layout/sidebar-shell-helpers.ts +1 -0
- package/src/pages/layout/sidebar-shell.test.ts +13 -0
- package/src/pages/layout/sidebar-shell.tsx +109 -0
- package/src/pages/layout/sidebar-workspace-helpers.ts +2 -0
- package/src/pages/layout/sidebar-workspace.test.ts +13 -0
- package/src/pages/layout/sidebar-workspace.tsx +410 -0
- package/src/pages/layout.tsx +1996 -0
- package/src/pages/session/file-tab-scroll.test.ts +40 -0
- package/src/pages/session/file-tab-scroll.ts +67 -0
- package/src/pages/session/file-tabs.tsx +516 -0
- package/src/pages/session/helpers.test.ts +61 -0
- package/src/pages/session/helpers.ts +38 -0
- package/src/pages/session/message-gesture.test.ts +62 -0
- package/src/pages/session/message-gesture.ts +21 -0
- package/src/pages/session/message-timeline.tsx +348 -0
- package/src/pages/session/review-tab.tsx +158 -0
- package/src/pages/session/scroll-spy.test.ts +127 -0
- package/src/pages/session/scroll-spy.ts +274 -0
- package/src/pages/session/session-command-helpers.ts +10 -0
- package/src/pages/session/session-mobile-tabs.tsx +36 -0
- package/src/pages/session/session-prompt-dock.test.ts +22 -0
- package/src/pages/session/session-prompt-dock.tsx +137 -0
- package/src/pages/session/session-prompt-helpers.ts +4 -0
- package/src/pages/session/session-side-panel.tsx +319 -0
- package/src/pages/session/terminal-label.ts +16 -0
- package/src/pages/session/terminal-panel.test.ts +25 -0
- package/src/pages/session/terminal-panel.tsx +169 -0
- package/src/pages/session/use-session-commands.test.ts +44 -0
- package/src/pages/session/use-session-commands.tsx +455 -0
- package/src/pages/session/use-session-hash-scroll.test.ts +16 -0
- package/src/pages/session/use-session-hash-scroll.ts +174 -0
- package/src/pages/session.tsx +1755 -0
- package/src/sst-env.d.ts +12 -0
- package/src/utils/agent.ts +11 -0
- package/src/utils/aim.ts +138 -0
- package/src/utils/base64.ts +10 -0
- package/src/utils/dom.ts +51 -0
- package/src/utils/id.ts +99 -0
- package/src/utils/index.ts +1 -0
- package/src/utils/perf.ts +135 -0
- package/src/utils/persist.ts +451 -0
- package/src/utils/prompt.ts +203 -0
- package/src/utils/runtime-adapters.test.ts +62 -0
- package/src/utils/runtime-adapters.ts +39 -0
- package/src/utils/same.ts +6 -0
- package/src/utils/scoped-cache.test.ts +69 -0
- package/src/utils/scoped-cache.ts +104 -0
- package/src/utils/server-health.test.ts +42 -0
- package/src/utils/server-health.ts +29 -0
- package/src/utils/solid-dnd.tsx +55 -0
- package/src/utils/sound.ts +117 -0
- package/src/utils/speech.ts +326 -0
- package/src/utils/time.ts +14 -0
- package/src/utils/worktree.test.ts +46 -0
- package/src/utils/worktree.ts +73 -0
- package/sst-env.d.ts +10 -0
- package/tsconfig.json +26 -0
- package/vite.config.ts +15 -0
- package/vite.js +26 -0
|
@@ -0,0 +1,1199 @@
|
|
|
1
|
+
import { useFilteredList } from "@nikcli-ai/ui/hooks"
|
|
2
|
+
import { createEffect, on, Component, Show, For, onCleanup, Switch, Match, createMemo, createSignal } from "solid-js"
|
|
3
|
+
import { createStore } from "solid-js/store"
|
|
4
|
+
import { createFocusSignal } from "@solid-primitives/active-element"
|
|
5
|
+
import { useLocal } from "@/context/local"
|
|
6
|
+
import { useFile } from "@/context/file"
|
|
7
|
+
import {
|
|
8
|
+
ContentPart,
|
|
9
|
+
DEFAULT_PROMPT,
|
|
10
|
+
isPromptEqual,
|
|
11
|
+
Prompt,
|
|
12
|
+
usePrompt,
|
|
13
|
+
ImageAttachmentPart,
|
|
14
|
+
AgentPart,
|
|
15
|
+
FileAttachmentPart,
|
|
16
|
+
} from "@/context/prompt"
|
|
17
|
+
import { useLayout } from "@/context/layout"
|
|
18
|
+
import { useSDK } from "@/context/sdk"
|
|
19
|
+
import { useParams } from "@solidjs/router"
|
|
20
|
+
import { useSync } from "@/context/sync"
|
|
21
|
+
import { useComments } from "@/context/comments"
|
|
22
|
+
import { Button } from "@nikcli-ai/ui/button"
|
|
23
|
+
import { Icon } from "@nikcli-ai/ui/icon"
|
|
24
|
+
import { ProviderIcon } from "@nikcli-ai/ui/provider-icon"
|
|
25
|
+
import type { IconName } from "@nikcli-ai/ui/icons/provider"
|
|
26
|
+
import { Tooltip, TooltipKeybind } from "@nikcli-ai/ui/tooltip"
|
|
27
|
+
import { IconButton } from "@nikcli-ai/ui/icon-button"
|
|
28
|
+
import { Select } from "@nikcli-ai/ui/select"
|
|
29
|
+
import { useDialog } from "@nikcli-ai/ui/context/dialog"
|
|
30
|
+
import { ModelSelectorPopover } from "@/components/dialog-select-model"
|
|
31
|
+
import { DialogSelectModelUnpaid } from "@/components/dialog-select-model-unpaid"
|
|
32
|
+
import { useProviders } from "@/hooks/use-providers"
|
|
33
|
+
import { useCommand } from "@/context/command"
|
|
34
|
+
import { Persist, persisted } from "@/utils/persist"
|
|
35
|
+
import { SessionContextUsage } from "@/components/session-context-usage"
|
|
36
|
+
import { usePermission } from "@/context/permission"
|
|
37
|
+
import { useLanguage } from "@/context/language"
|
|
38
|
+
import { createTextFragment, getCursorPosition, setCursorPosition, setRangeEdge } from "./prompt-input/editor-dom"
|
|
39
|
+
import { createPromptAttachments, ACCEPTED_FILE_TYPES } from "./prompt-input/attachments"
|
|
40
|
+
import { navigatePromptHistory, prependHistoryEntry, promptLength } from "./prompt-input/history"
|
|
41
|
+
import { createPromptSubmit } from "./prompt-input/submit"
|
|
42
|
+
import { PromptPopover, type AtOption, type SlashCommand } from "./prompt-input/slash-popover"
|
|
43
|
+
import { PromptContextItems } from "./prompt-input/context-items"
|
|
44
|
+
import { PromptImageAttachments } from "./prompt-input/image-attachments"
|
|
45
|
+
import { PromptDragOverlay } from "./prompt-input/drag-overlay"
|
|
46
|
+
import { promptPlaceholder } from "./prompt-input/placeholder"
|
|
47
|
+
import { ImagePreview } from "@nikcli-ai/ui/image-preview"
|
|
48
|
+
|
|
49
|
+
interface PromptInputProps {
|
|
50
|
+
class?: string
|
|
51
|
+
ref?: (el: HTMLDivElement) => void
|
|
52
|
+
newSessionWorktree?: string
|
|
53
|
+
onNewSessionWorktreeReset?: () => void
|
|
54
|
+
onSubmit?: () => void
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
const EXAMPLES = [
|
|
58
|
+
"prompt.example.1",
|
|
59
|
+
"prompt.example.2",
|
|
60
|
+
"prompt.example.3",
|
|
61
|
+
"prompt.example.4",
|
|
62
|
+
"prompt.example.5",
|
|
63
|
+
"prompt.example.6",
|
|
64
|
+
"prompt.example.7",
|
|
65
|
+
"prompt.example.8",
|
|
66
|
+
"prompt.example.9",
|
|
67
|
+
"prompt.example.10",
|
|
68
|
+
"prompt.example.11",
|
|
69
|
+
"prompt.example.12",
|
|
70
|
+
"prompt.example.13",
|
|
71
|
+
"prompt.example.14",
|
|
72
|
+
"prompt.example.15",
|
|
73
|
+
"prompt.example.16",
|
|
74
|
+
"prompt.example.17",
|
|
75
|
+
"prompt.example.18",
|
|
76
|
+
"prompt.example.19",
|
|
77
|
+
"prompt.example.20",
|
|
78
|
+
"prompt.example.21",
|
|
79
|
+
"prompt.example.22",
|
|
80
|
+
"prompt.example.23",
|
|
81
|
+
"prompt.example.24",
|
|
82
|
+
"prompt.example.25",
|
|
83
|
+
] as const
|
|
84
|
+
|
|
85
|
+
export const PromptInput: Component<PromptInputProps> = (props) => {
|
|
86
|
+
const sdk = useSDK()
|
|
87
|
+
const sync = useSync()
|
|
88
|
+
const local = useLocal()
|
|
89
|
+
const files = useFile()
|
|
90
|
+
const prompt = usePrompt()
|
|
91
|
+
const commentCount = createMemo(() => prompt.context.items().filter((item) => !!item.comment?.trim()).length)
|
|
92
|
+
const layout = useLayout()
|
|
93
|
+
const comments = useComments()
|
|
94
|
+
const params = useParams()
|
|
95
|
+
const dialog = useDialog()
|
|
96
|
+
const providers = useProviders()
|
|
97
|
+
const command = useCommand()
|
|
98
|
+
const permission = usePermission()
|
|
99
|
+
const language = useLanguage()
|
|
100
|
+
let editorRef!: HTMLDivElement
|
|
101
|
+
let fileInputRef!: HTMLInputElement
|
|
102
|
+
let scrollRef!: HTMLDivElement
|
|
103
|
+
let slashPopoverRef!: HTMLDivElement
|
|
104
|
+
|
|
105
|
+
const mirror = { input: false }
|
|
106
|
+
|
|
107
|
+
const scrollCursorIntoView = () => {
|
|
108
|
+
const container = scrollRef
|
|
109
|
+
const selection = window.getSelection()
|
|
110
|
+
if (!container || !selection || selection.rangeCount === 0) return
|
|
111
|
+
|
|
112
|
+
const range = selection.getRangeAt(0)
|
|
113
|
+
if (!editorRef.contains(range.startContainer)) return
|
|
114
|
+
|
|
115
|
+
const rect = range.getBoundingClientRect()
|
|
116
|
+
if (!rect.height) return
|
|
117
|
+
|
|
118
|
+
const containerRect = container.getBoundingClientRect()
|
|
119
|
+
const top = rect.top - containerRect.top + container.scrollTop
|
|
120
|
+
const bottom = rect.bottom - containerRect.top + container.scrollTop
|
|
121
|
+
const padding = 12
|
|
122
|
+
|
|
123
|
+
if (top < container.scrollTop + padding) {
|
|
124
|
+
container.scrollTop = Math.max(0, top - padding)
|
|
125
|
+
return
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
if (bottom > container.scrollTop + container.clientHeight - padding) {
|
|
129
|
+
container.scrollTop = bottom - container.clientHeight + padding
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
const queueScroll = () => {
|
|
134
|
+
requestAnimationFrame(scrollCursorIntoView)
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
const sessionKey = createMemo(() => `${params.dir}${params.id ? "/" + params.id : ""}`)
|
|
138
|
+
const tabs = createMemo(() => layout.tabs(sessionKey))
|
|
139
|
+
const view = createMemo(() => layout.view(sessionKey))
|
|
140
|
+
|
|
141
|
+
const commentInReview = (path: string) => {
|
|
142
|
+
const sessionID = params.id
|
|
143
|
+
if (!sessionID) return false
|
|
144
|
+
|
|
145
|
+
const diffs = sync.data.session_diff[sessionID]
|
|
146
|
+
if (!diffs) return false
|
|
147
|
+
return diffs.some((diff) => diff.file === path)
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
const openComment = (item: { path: string; commentID?: string; commentOrigin?: "review" | "file" }) => {
|
|
151
|
+
if (!item.commentID) return
|
|
152
|
+
|
|
153
|
+
const focus = { file: item.path, id: item.commentID }
|
|
154
|
+
comments.setActive(focus)
|
|
155
|
+
|
|
156
|
+
const wantsReview = item.commentOrigin === "review" || (item.commentOrigin !== "file" && commentInReview(item.path))
|
|
157
|
+
if (wantsReview) {
|
|
158
|
+
if (!view().reviewPanel.opened()) view().reviewPanel.open()
|
|
159
|
+
layout.fileTree.open()
|
|
160
|
+
layout.fileTree.setTab("changes")
|
|
161
|
+
requestAnimationFrame(() => comments.setFocus(focus))
|
|
162
|
+
return
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
if (!view().reviewPanel.opened()) view().reviewPanel.open()
|
|
166
|
+
layout.fileTree.open()
|
|
167
|
+
layout.fileTree.setTab("all")
|
|
168
|
+
const tab = files.tab(item.path)
|
|
169
|
+
tabs().open(tab)
|
|
170
|
+
files.load(item.path)
|
|
171
|
+
requestAnimationFrame(() => comments.setFocus(focus))
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
const recent = createMemo(() => {
|
|
175
|
+
const all = tabs().all()
|
|
176
|
+
const active = tabs().active()
|
|
177
|
+
const order = active ? [active, ...all.filter((x) => x !== active)] : all
|
|
178
|
+
const seen = new Set<string>()
|
|
179
|
+
const paths: string[] = []
|
|
180
|
+
|
|
181
|
+
for (const tab of order) {
|
|
182
|
+
const path = files.pathFromTab(tab)
|
|
183
|
+
if (!path) continue
|
|
184
|
+
if (seen.has(path)) continue
|
|
185
|
+
seen.add(path)
|
|
186
|
+
paths.push(path)
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
return paths
|
|
190
|
+
})
|
|
191
|
+
const info = createMemo(() => (params.id ? sync.session.get(params.id) : undefined))
|
|
192
|
+
const status = createMemo(
|
|
193
|
+
() =>
|
|
194
|
+
sync.data.session_status[params.id ?? ""] ?? {
|
|
195
|
+
type: "idle",
|
|
196
|
+
},
|
|
197
|
+
)
|
|
198
|
+
const working = createMemo(() => status()?.type !== "idle")
|
|
199
|
+
const imageAttachments = createMemo(() =>
|
|
200
|
+
prompt.current().filter((part): part is ImageAttachmentPart => part.type === "image"),
|
|
201
|
+
)
|
|
202
|
+
|
|
203
|
+
const [store, setStore] = createStore<{
|
|
204
|
+
popover: "at" | "slash" | null
|
|
205
|
+
historyIndex: number
|
|
206
|
+
savedPrompt: Prompt | null
|
|
207
|
+
placeholder: number
|
|
208
|
+
draggingType: "image" | "@mention" | null
|
|
209
|
+
mode: "normal" | "shell"
|
|
210
|
+
applyingHistory: boolean
|
|
211
|
+
}>({
|
|
212
|
+
popover: null,
|
|
213
|
+
historyIndex: -1,
|
|
214
|
+
savedPrompt: null,
|
|
215
|
+
placeholder: Math.floor(Math.random() * EXAMPLES.length),
|
|
216
|
+
draggingType: null,
|
|
217
|
+
mode: "normal",
|
|
218
|
+
applyingHistory: false,
|
|
219
|
+
})
|
|
220
|
+
const placeholder = createMemo(() =>
|
|
221
|
+
promptPlaceholder({
|
|
222
|
+
mode: store.mode,
|
|
223
|
+
commentCount: commentCount(),
|
|
224
|
+
example: language.t(EXAMPLES[store.placeholder]),
|
|
225
|
+
t: (key, params) => language.t(key as Parameters<typeof language.t>[0], params as never),
|
|
226
|
+
}),
|
|
227
|
+
)
|
|
228
|
+
|
|
229
|
+
const MAX_HISTORY = 100
|
|
230
|
+
const [history, setHistory] = persisted(
|
|
231
|
+
Persist.global("prompt-history", ["prompt-history.v1"]),
|
|
232
|
+
createStore<{
|
|
233
|
+
entries: Prompt[]
|
|
234
|
+
}>({
|
|
235
|
+
entries: [],
|
|
236
|
+
}),
|
|
237
|
+
)
|
|
238
|
+
const [shellHistory, setShellHistory] = persisted(
|
|
239
|
+
Persist.global("prompt-history-shell", ["prompt-history-shell.v1"]),
|
|
240
|
+
createStore<{
|
|
241
|
+
entries: Prompt[]
|
|
242
|
+
}>({
|
|
243
|
+
entries: [],
|
|
244
|
+
}),
|
|
245
|
+
)
|
|
246
|
+
|
|
247
|
+
const applyHistoryPrompt = (p: Prompt, position: "start" | "end") => {
|
|
248
|
+
const length = position === "start" ? 0 : promptLength(p)
|
|
249
|
+
setStore("applyingHistory", true)
|
|
250
|
+
prompt.set(p, length)
|
|
251
|
+
requestAnimationFrame(() => {
|
|
252
|
+
editorRef.focus()
|
|
253
|
+
setCursorPosition(editorRef, length)
|
|
254
|
+
setStore("applyingHistory", false)
|
|
255
|
+
queueScroll()
|
|
256
|
+
})
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
const getCaretState = () => {
|
|
260
|
+
const selection = window.getSelection()
|
|
261
|
+
const textLength = promptLength(prompt.current())
|
|
262
|
+
if (!selection || selection.rangeCount === 0) {
|
|
263
|
+
return { collapsed: false, cursorPosition: 0, textLength }
|
|
264
|
+
}
|
|
265
|
+
const anchorNode = selection.anchorNode
|
|
266
|
+
if (!anchorNode || !editorRef.contains(anchorNode)) {
|
|
267
|
+
return { collapsed: false, cursorPosition: 0, textLength }
|
|
268
|
+
}
|
|
269
|
+
return {
|
|
270
|
+
collapsed: selection.isCollapsed,
|
|
271
|
+
cursorPosition: getCursorPosition(editorRef),
|
|
272
|
+
textLength,
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
const isFocused = createFocusSignal(() => editorRef)
|
|
277
|
+
|
|
278
|
+
createEffect(() => {
|
|
279
|
+
params.id
|
|
280
|
+
if (params.id) return
|
|
281
|
+
const interval = setInterval(() => {
|
|
282
|
+
setStore("placeholder", (prev) => (prev + 1) % EXAMPLES.length)
|
|
283
|
+
}, 6500)
|
|
284
|
+
onCleanup(() => clearInterval(interval))
|
|
285
|
+
})
|
|
286
|
+
|
|
287
|
+
const [composing, setComposing] = createSignal(false)
|
|
288
|
+
const isImeComposing = (event: KeyboardEvent) => event.isComposing || composing() || event.keyCode === 229
|
|
289
|
+
|
|
290
|
+
createEffect(() => {
|
|
291
|
+
if (!isFocused()) setStore("popover", null)
|
|
292
|
+
})
|
|
293
|
+
|
|
294
|
+
// Safety: reset composing state on focus change to prevent stuck state
|
|
295
|
+
// This handles edge cases where compositionend event may not fire
|
|
296
|
+
createEffect(() => {
|
|
297
|
+
if (!isFocused()) setComposing(false)
|
|
298
|
+
})
|
|
299
|
+
|
|
300
|
+
const agentList = createMemo(() =>
|
|
301
|
+
sync.data.agent
|
|
302
|
+
.filter((agent) => !agent.hidden && agent.mode !== "primary")
|
|
303
|
+
.map((agent): AtOption => ({ type: "agent", name: agent.name, display: agent.name })),
|
|
304
|
+
)
|
|
305
|
+
|
|
306
|
+
const handleAtSelect = (option: AtOption | undefined) => {
|
|
307
|
+
if (!option) return
|
|
308
|
+
if (option.type === "agent") {
|
|
309
|
+
addPart({ type: "agent", name: option.name, content: "@" + option.name, start: 0, end: 0 })
|
|
310
|
+
} else {
|
|
311
|
+
addPart({ type: "file", path: option.path, content: "@" + option.path, start: 0, end: 0 })
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
const atKey = (x: AtOption | undefined) => {
|
|
316
|
+
if (!x) return ""
|
|
317
|
+
return x.type === "agent" ? `agent:${x.name}` : `file:${x.path}`
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
const {
|
|
321
|
+
flat: atFlat,
|
|
322
|
+
active: atActive,
|
|
323
|
+
setActive: setAtActive,
|
|
324
|
+
onInput: atOnInput,
|
|
325
|
+
onKeyDown: atOnKeyDown,
|
|
326
|
+
} = useFilteredList<AtOption>({
|
|
327
|
+
items: async (query) => {
|
|
328
|
+
const agents = agentList()
|
|
329
|
+
const open = recent()
|
|
330
|
+
const seen = new Set(open)
|
|
331
|
+
const pinned: AtOption[] = open.map((path) => ({ type: "file", path, display: path, recent: true }))
|
|
332
|
+
const paths = await files.searchFilesAndDirectories(query)
|
|
333
|
+
const fileOptions: AtOption[] = paths
|
|
334
|
+
.filter((path) => !seen.has(path))
|
|
335
|
+
.map((path) => ({ type: "file", path, display: path }))
|
|
336
|
+
return [...agents, ...pinned, ...fileOptions]
|
|
337
|
+
},
|
|
338
|
+
key: atKey,
|
|
339
|
+
filterKeys: ["display"],
|
|
340
|
+
groupBy: (item) => {
|
|
341
|
+
if (item.type === "agent") return "agent"
|
|
342
|
+
if (item.recent) return "recent"
|
|
343
|
+
return "file"
|
|
344
|
+
},
|
|
345
|
+
sortGroupsBy: (a, b) => {
|
|
346
|
+
const rank = (category: string) => {
|
|
347
|
+
if (category === "agent") return 0
|
|
348
|
+
if (category === "recent") return 1
|
|
349
|
+
return 2
|
|
350
|
+
}
|
|
351
|
+
return rank(a.category) - rank(b.category)
|
|
352
|
+
},
|
|
353
|
+
onSelect: handleAtSelect,
|
|
354
|
+
})
|
|
355
|
+
|
|
356
|
+
const slashCommands = createMemo<SlashCommand[]>(() => {
|
|
357
|
+
const builtin = command.options
|
|
358
|
+
.filter((opt) => !opt.disabled && !opt.id.startsWith("suggested.") && opt.slash)
|
|
359
|
+
.map((opt) => ({
|
|
360
|
+
id: opt.id,
|
|
361
|
+
trigger: opt.slash!,
|
|
362
|
+
title: opt.title,
|
|
363
|
+
description: opt.description,
|
|
364
|
+
keybind: opt.keybind,
|
|
365
|
+
type: "builtin" as const,
|
|
366
|
+
}))
|
|
367
|
+
|
|
368
|
+
const custom = sync.data.command.map((cmd) => ({
|
|
369
|
+
id: `custom.${cmd.name}`,
|
|
370
|
+
trigger: cmd.name,
|
|
371
|
+
title: cmd.name,
|
|
372
|
+
description: cmd.description,
|
|
373
|
+
type: "custom" as const,
|
|
374
|
+
source: cmd.skill ? ("skill" as const) : cmd.mcp ? ("mcp" as const) : ("command" as const),
|
|
375
|
+
}))
|
|
376
|
+
|
|
377
|
+
return [...custom, ...builtin]
|
|
378
|
+
})
|
|
379
|
+
|
|
380
|
+
const handleSlashSelect = (cmd: SlashCommand | undefined) => {
|
|
381
|
+
if (!cmd) return
|
|
382
|
+
setStore("popover", null)
|
|
383
|
+
|
|
384
|
+
if (cmd.type === "custom") {
|
|
385
|
+
const text = `/${cmd.trigger} `
|
|
386
|
+
editorRef.innerHTML = ""
|
|
387
|
+
editorRef.textContent = text
|
|
388
|
+
prompt.set([{ type: "text", content: text, start: 0, end: text.length }], text.length)
|
|
389
|
+
requestAnimationFrame(() => {
|
|
390
|
+
editorRef.focus()
|
|
391
|
+
const range = document.createRange()
|
|
392
|
+
const sel = window.getSelection()
|
|
393
|
+
range.selectNodeContents(editorRef)
|
|
394
|
+
range.collapse(false)
|
|
395
|
+
sel?.removeAllRanges()
|
|
396
|
+
sel?.addRange(range)
|
|
397
|
+
})
|
|
398
|
+
return
|
|
399
|
+
}
|
|
400
|
+
|
|
401
|
+
editorRef.innerHTML = ""
|
|
402
|
+
prompt.set([{ type: "text", content: "", start: 0, end: 0 }], 0)
|
|
403
|
+
command.trigger(cmd.id, "slash")
|
|
404
|
+
}
|
|
405
|
+
|
|
406
|
+
const {
|
|
407
|
+
flat: slashFlat,
|
|
408
|
+
active: slashActive,
|
|
409
|
+
setActive: setSlashActive,
|
|
410
|
+
onInput: slashOnInput,
|
|
411
|
+
onKeyDown: slashOnKeyDown,
|
|
412
|
+
refetch: slashRefetch,
|
|
413
|
+
} = useFilteredList<SlashCommand>({
|
|
414
|
+
items: slashCommands,
|
|
415
|
+
key: (x) => x?.id,
|
|
416
|
+
filterKeys: ["trigger", "title", "description"],
|
|
417
|
+
onSelect: handleSlashSelect,
|
|
418
|
+
})
|
|
419
|
+
|
|
420
|
+
const createPill = (part: FileAttachmentPart | AgentPart) => {
|
|
421
|
+
const pill = document.createElement("span")
|
|
422
|
+
pill.textContent = part.content
|
|
423
|
+
pill.setAttribute("data-type", part.type)
|
|
424
|
+
if (part.type === "file") pill.setAttribute("data-path", part.path)
|
|
425
|
+
if (part.type === "agent") pill.setAttribute("data-name", part.name)
|
|
426
|
+
pill.setAttribute("contenteditable", "false")
|
|
427
|
+
pill.style.userSelect = "text"
|
|
428
|
+
pill.style.cursor = "default"
|
|
429
|
+
return pill
|
|
430
|
+
}
|
|
431
|
+
|
|
432
|
+
const isNormalizedEditor = () =>
|
|
433
|
+
Array.from(editorRef.childNodes).every((node) => {
|
|
434
|
+
if (node.nodeType === Node.TEXT_NODE) {
|
|
435
|
+
const text = node.textContent ?? ""
|
|
436
|
+
if (!text.includes("\u200B")) return true
|
|
437
|
+
if (text !== "\u200B") return false
|
|
438
|
+
|
|
439
|
+
const prev = node.previousSibling
|
|
440
|
+
const next = node.nextSibling
|
|
441
|
+
const prevIsBr = prev?.nodeType === Node.ELEMENT_NODE && (prev as HTMLElement).tagName === "BR"
|
|
442
|
+
const nextIsBr = next?.nodeType === Node.ELEMENT_NODE && (next as HTMLElement).tagName === "BR"
|
|
443
|
+
if (!prevIsBr && !nextIsBr) return false
|
|
444
|
+
if (nextIsBr && !prevIsBr && prev) return false
|
|
445
|
+
return true
|
|
446
|
+
}
|
|
447
|
+
if (node.nodeType !== Node.ELEMENT_NODE) return false
|
|
448
|
+
const el = node as HTMLElement
|
|
449
|
+
if (el.dataset.type === "file") return true
|
|
450
|
+
if (el.dataset.type === "agent") return true
|
|
451
|
+
return el.tagName === "BR"
|
|
452
|
+
})
|
|
453
|
+
|
|
454
|
+
const renderEditor = (parts: Prompt) => {
|
|
455
|
+
editorRef.innerHTML = ""
|
|
456
|
+
for (const part of parts) {
|
|
457
|
+
if (part.type === "text") {
|
|
458
|
+
editorRef.appendChild(createTextFragment(part.content))
|
|
459
|
+
continue
|
|
460
|
+
}
|
|
461
|
+
if (part.type === "file" || part.type === "agent") {
|
|
462
|
+
editorRef.appendChild(createPill(part))
|
|
463
|
+
}
|
|
464
|
+
}
|
|
465
|
+
}
|
|
466
|
+
|
|
467
|
+
createEffect(
|
|
468
|
+
on(
|
|
469
|
+
() => sync.data.command,
|
|
470
|
+
() => slashRefetch(),
|
|
471
|
+
{ defer: true },
|
|
472
|
+
),
|
|
473
|
+
)
|
|
474
|
+
|
|
475
|
+
// Auto-scroll active command into view when navigating with keyboard
|
|
476
|
+
createEffect(() => {
|
|
477
|
+
const activeId = slashActive()
|
|
478
|
+
if (!activeId || !slashPopoverRef) return
|
|
479
|
+
|
|
480
|
+
requestAnimationFrame(() => {
|
|
481
|
+
const element = slashPopoverRef.querySelector(`[data-slash-id="${activeId}"]`)
|
|
482
|
+
element?.scrollIntoView({ block: "nearest", behavior: "smooth" })
|
|
483
|
+
})
|
|
484
|
+
})
|
|
485
|
+
|
|
486
|
+
const selectPopoverActive = () => {
|
|
487
|
+
if (store.popover === "at") {
|
|
488
|
+
const items = atFlat()
|
|
489
|
+
if (items.length === 0) return
|
|
490
|
+
const active = atActive()
|
|
491
|
+
const item = items.find((entry) => atKey(entry) === active) ?? items[0]
|
|
492
|
+
handleAtSelect(item)
|
|
493
|
+
return
|
|
494
|
+
}
|
|
495
|
+
|
|
496
|
+
if (store.popover === "slash") {
|
|
497
|
+
const items = slashFlat()
|
|
498
|
+
if (items.length === 0) return
|
|
499
|
+
const active = slashActive()
|
|
500
|
+
const item = items.find((entry) => entry.id === active) ?? items[0]
|
|
501
|
+
handleSlashSelect(item)
|
|
502
|
+
}
|
|
503
|
+
}
|
|
504
|
+
|
|
505
|
+
createEffect(
|
|
506
|
+
on(
|
|
507
|
+
() => prompt.current(),
|
|
508
|
+
(currentParts) => {
|
|
509
|
+
const inputParts = currentParts.filter((part) => part.type !== "image")
|
|
510
|
+
|
|
511
|
+
if (mirror.input) {
|
|
512
|
+
mirror.input = false
|
|
513
|
+
if (isNormalizedEditor()) return
|
|
514
|
+
|
|
515
|
+
const selection = window.getSelection()
|
|
516
|
+
let cursorPosition: number | null = null
|
|
517
|
+
if (selection && selection.rangeCount > 0 && editorRef.contains(selection.anchorNode)) {
|
|
518
|
+
cursorPosition = getCursorPosition(editorRef)
|
|
519
|
+
}
|
|
520
|
+
|
|
521
|
+
renderEditor(inputParts)
|
|
522
|
+
|
|
523
|
+
if (cursorPosition !== null) {
|
|
524
|
+
setCursorPosition(editorRef, cursorPosition)
|
|
525
|
+
}
|
|
526
|
+
return
|
|
527
|
+
}
|
|
528
|
+
|
|
529
|
+
const domParts = parseFromDOM()
|
|
530
|
+
if (isNormalizedEditor() && isPromptEqual(inputParts, domParts)) return
|
|
531
|
+
|
|
532
|
+
const selection = window.getSelection()
|
|
533
|
+
let cursorPosition: number | null = null
|
|
534
|
+
if (selection && selection.rangeCount > 0 && editorRef.contains(selection.anchorNode)) {
|
|
535
|
+
cursorPosition = getCursorPosition(editorRef)
|
|
536
|
+
}
|
|
537
|
+
|
|
538
|
+
renderEditor(inputParts)
|
|
539
|
+
|
|
540
|
+
if (cursorPosition !== null) {
|
|
541
|
+
setCursorPosition(editorRef, cursorPosition)
|
|
542
|
+
}
|
|
543
|
+
},
|
|
544
|
+
),
|
|
545
|
+
)
|
|
546
|
+
|
|
547
|
+
const parseFromDOM = (): Prompt => {
|
|
548
|
+
const parts: Prompt = []
|
|
549
|
+
let position = 0
|
|
550
|
+
let buffer = ""
|
|
551
|
+
|
|
552
|
+
const flushText = () => {
|
|
553
|
+
const content = buffer.replace(/\r\n?/g, "\n").replace(/\u200B/g, "")
|
|
554
|
+
buffer = ""
|
|
555
|
+
if (!content) return
|
|
556
|
+
parts.push({ type: "text", content, start: position, end: position + content.length })
|
|
557
|
+
position += content.length
|
|
558
|
+
}
|
|
559
|
+
|
|
560
|
+
const pushFile = (file: HTMLElement) => {
|
|
561
|
+
const content = file.textContent ?? ""
|
|
562
|
+
parts.push({
|
|
563
|
+
type: "file",
|
|
564
|
+
path: file.dataset.path!,
|
|
565
|
+
content,
|
|
566
|
+
start: position,
|
|
567
|
+
end: position + content.length,
|
|
568
|
+
})
|
|
569
|
+
position += content.length
|
|
570
|
+
}
|
|
571
|
+
|
|
572
|
+
const pushAgent = (agent: HTMLElement) => {
|
|
573
|
+
const content = agent.textContent ?? ""
|
|
574
|
+
parts.push({
|
|
575
|
+
type: "agent",
|
|
576
|
+
name: agent.dataset.name!,
|
|
577
|
+
content,
|
|
578
|
+
start: position,
|
|
579
|
+
end: position + content.length,
|
|
580
|
+
})
|
|
581
|
+
position += content.length
|
|
582
|
+
}
|
|
583
|
+
|
|
584
|
+
const visit = (node: Node) => {
|
|
585
|
+
if (node.nodeType === Node.TEXT_NODE) {
|
|
586
|
+
buffer += node.textContent ?? ""
|
|
587
|
+
return
|
|
588
|
+
}
|
|
589
|
+
if (node.nodeType !== Node.ELEMENT_NODE) return
|
|
590
|
+
|
|
591
|
+
const el = node as HTMLElement
|
|
592
|
+
if (el.dataset.type === "file") {
|
|
593
|
+
flushText()
|
|
594
|
+
pushFile(el)
|
|
595
|
+
return
|
|
596
|
+
}
|
|
597
|
+
if (el.dataset.type === "agent") {
|
|
598
|
+
flushText()
|
|
599
|
+
pushAgent(el)
|
|
600
|
+
return
|
|
601
|
+
}
|
|
602
|
+
if (el.tagName === "BR") {
|
|
603
|
+
buffer += "\n"
|
|
604
|
+
return
|
|
605
|
+
}
|
|
606
|
+
|
|
607
|
+
for (const child of Array.from(el.childNodes)) {
|
|
608
|
+
visit(child)
|
|
609
|
+
}
|
|
610
|
+
}
|
|
611
|
+
|
|
612
|
+
const children = Array.from(editorRef.childNodes)
|
|
613
|
+
children.forEach((child, index) => {
|
|
614
|
+
const isBlock = child.nodeType === Node.ELEMENT_NODE && ["DIV", "P"].includes((child as HTMLElement).tagName)
|
|
615
|
+
visit(child)
|
|
616
|
+
if (isBlock && index < children.length - 1) {
|
|
617
|
+
buffer += "\n"
|
|
618
|
+
}
|
|
619
|
+
})
|
|
620
|
+
|
|
621
|
+
flushText()
|
|
622
|
+
|
|
623
|
+
if (parts.length === 0) parts.push(...DEFAULT_PROMPT)
|
|
624
|
+
return parts
|
|
625
|
+
}
|
|
626
|
+
|
|
627
|
+
const handleInput = () => {
|
|
628
|
+
const rawParts = parseFromDOM()
|
|
629
|
+
const images = imageAttachments()
|
|
630
|
+
const cursorPosition = getCursorPosition(editorRef)
|
|
631
|
+
const rawText = rawParts.map((p) => ("content" in p ? p.content : "")).join("")
|
|
632
|
+
const trimmed = rawText.replace(/\u200B/g, "").trim()
|
|
633
|
+
const hasNonText = rawParts.some((part) => part.type !== "text")
|
|
634
|
+
const shouldReset = trimmed.length === 0 && !hasNonText && images.length === 0
|
|
635
|
+
|
|
636
|
+
if (shouldReset) {
|
|
637
|
+
setStore("popover", null)
|
|
638
|
+
if (store.historyIndex >= 0 && !store.applyingHistory) {
|
|
639
|
+
setStore("historyIndex", -1)
|
|
640
|
+
setStore("savedPrompt", null)
|
|
641
|
+
}
|
|
642
|
+
if (prompt.dirty()) {
|
|
643
|
+
mirror.input = true
|
|
644
|
+
prompt.set(DEFAULT_PROMPT, 0)
|
|
645
|
+
}
|
|
646
|
+
queueScroll()
|
|
647
|
+
return
|
|
648
|
+
}
|
|
649
|
+
|
|
650
|
+
const shellMode = store.mode === "shell"
|
|
651
|
+
|
|
652
|
+
if (!shellMode) {
|
|
653
|
+
const atMatch = rawText.substring(0, cursorPosition).match(/@(\S*)$/)
|
|
654
|
+
const slashMatch = rawText.match(/^\/(\S*)$/)
|
|
655
|
+
|
|
656
|
+
if (atMatch) {
|
|
657
|
+
atOnInput(atMatch[1])
|
|
658
|
+
setStore("popover", "at")
|
|
659
|
+
} else if (slashMatch) {
|
|
660
|
+
slashOnInput(slashMatch[1])
|
|
661
|
+
setStore("popover", "slash")
|
|
662
|
+
} else {
|
|
663
|
+
setStore("popover", null)
|
|
664
|
+
}
|
|
665
|
+
} else {
|
|
666
|
+
setStore("popover", null)
|
|
667
|
+
}
|
|
668
|
+
|
|
669
|
+
if (store.historyIndex >= 0 && !store.applyingHistory) {
|
|
670
|
+
setStore("historyIndex", -1)
|
|
671
|
+
setStore("savedPrompt", null)
|
|
672
|
+
}
|
|
673
|
+
|
|
674
|
+
mirror.input = true
|
|
675
|
+
prompt.set([...rawParts, ...images], cursorPosition)
|
|
676
|
+
queueScroll()
|
|
677
|
+
}
|
|
678
|
+
|
|
679
|
+
const addPart = (part: ContentPart) => {
|
|
680
|
+
const selection = window.getSelection()
|
|
681
|
+
if (!selection || selection.rangeCount === 0) return
|
|
682
|
+
|
|
683
|
+
const cursorPosition = getCursorPosition(editorRef)
|
|
684
|
+
const currentPrompt = prompt.current()
|
|
685
|
+
const rawText = currentPrompt.map((p) => ("content" in p ? p.content : "")).join("")
|
|
686
|
+
const textBeforeCursor = rawText.substring(0, cursorPosition)
|
|
687
|
+
const atMatch = textBeforeCursor.match(/@(\S*)$/)
|
|
688
|
+
|
|
689
|
+
if (part.type === "file" || part.type === "agent") {
|
|
690
|
+
const pill = createPill(part)
|
|
691
|
+
const gap = document.createTextNode(" ")
|
|
692
|
+
const range = selection.getRangeAt(0)
|
|
693
|
+
|
|
694
|
+
if (atMatch) {
|
|
695
|
+
const start = atMatch.index ?? cursorPosition - atMatch[0].length
|
|
696
|
+
setRangeEdge(editorRef, range, "start", start)
|
|
697
|
+
setRangeEdge(editorRef, range, "end", cursorPosition)
|
|
698
|
+
}
|
|
699
|
+
|
|
700
|
+
range.deleteContents()
|
|
701
|
+
range.insertNode(gap)
|
|
702
|
+
range.insertNode(pill)
|
|
703
|
+
range.setStartAfter(gap)
|
|
704
|
+
range.collapse(true)
|
|
705
|
+
selection.removeAllRanges()
|
|
706
|
+
selection.addRange(range)
|
|
707
|
+
} else if (part.type === "text") {
|
|
708
|
+
const range = selection.getRangeAt(0)
|
|
709
|
+
const fragment = createTextFragment(part.content)
|
|
710
|
+
const last = fragment.lastChild
|
|
711
|
+
range.deleteContents()
|
|
712
|
+
range.insertNode(fragment)
|
|
713
|
+
if (last) {
|
|
714
|
+
if (last.nodeType === Node.TEXT_NODE) {
|
|
715
|
+
const text = last.textContent ?? ""
|
|
716
|
+
if (text === "\u200B") {
|
|
717
|
+
range.setStart(last, 0)
|
|
718
|
+
}
|
|
719
|
+
if (text !== "\u200B") {
|
|
720
|
+
range.setStart(last, text.length)
|
|
721
|
+
}
|
|
722
|
+
}
|
|
723
|
+
if (last.nodeType !== Node.TEXT_NODE) {
|
|
724
|
+
range.setStartAfter(last)
|
|
725
|
+
}
|
|
726
|
+
}
|
|
727
|
+
range.collapse(true)
|
|
728
|
+
selection.removeAllRanges()
|
|
729
|
+
selection.addRange(range)
|
|
730
|
+
}
|
|
731
|
+
|
|
732
|
+
handleInput()
|
|
733
|
+
setStore("popover", null)
|
|
734
|
+
}
|
|
735
|
+
|
|
736
|
+
const addToHistory = (prompt: Prompt, mode: "normal" | "shell") => {
|
|
737
|
+
const currentHistory = mode === "shell" ? shellHistory : history
|
|
738
|
+
const setCurrentHistory = mode === "shell" ? setShellHistory : setHistory
|
|
739
|
+
const next = prependHistoryEntry(currentHistory.entries, prompt)
|
|
740
|
+
if (next === currentHistory.entries) return
|
|
741
|
+
setCurrentHistory("entries", next)
|
|
742
|
+
}
|
|
743
|
+
|
|
744
|
+
const navigateHistory = (direction: "up" | "down") => {
|
|
745
|
+
const result = navigatePromptHistory({
|
|
746
|
+
direction,
|
|
747
|
+
entries: store.mode === "shell" ? shellHistory.entries : history.entries,
|
|
748
|
+
historyIndex: store.historyIndex,
|
|
749
|
+
currentPrompt: prompt.current(),
|
|
750
|
+
savedPrompt: store.savedPrompt,
|
|
751
|
+
})
|
|
752
|
+
if (!result.handled) return false
|
|
753
|
+
setStore("historyIndex", result.historyIndex)
|
|
754
|
+
setStore("savedPrompt", result.savedPrompt)
|
|
755
|
+
applyHistoryPrompt(result.prompt, result.cursor)
|
|
756
|
+
return true
|
|
757
|
+
}
|
|
758
|
+
|
|
759
|
+
const { addImageAttachment, removeImageAttachment, handlePaste } = createPromptAttachments({
|
|
760
|
+
editor: () => editorRef,
|
|
761
|
+
isFocused,
|
|
762
|
+
isDialogActive: () => !!dialog.active,
|
|
763
|
+
setDraggingType: (type) => setStore("draggingType", type),
|
|
764
|
+
focusEditor: () => {
|
|
765
|
+
editorRef.focus()
|
|
766
|
+
setCursorPosition(editorRef, promptLength(prompt.current()))
|
|
767
|
+
},
|
|
768
|
+
addPart,
|
|
769
|
+
})
|
|
770
|
+
|
|
771
|
+
const { abort, handleSubmit } = createPromptSubmit({
|
|
772
|
+
info,
|
|
773
|
+
imageAttachments,
|
|
774
|
+
commentCount,
|
|
775
|
+
mode: () => store.mode,
|
|
776
|
+
working,
|
|
777
|
+
editor: () => editorRef,
|
|
778
|
+
queueScroll,
|
|
779
|
+
promptLength,
|
|
780
|
+
addToHistory,
|
|
781
|
+
resetHistoryNavigation: () => {
|
|
782
|
+
setStore("historyIndex", -1)
|
|
783
|
+
setStore("savedPrompt", null)
|
|
784
|
+
},
|
|
785
|
+
setMode: (mode) => setStore("mode", mode),
|
|
786
|
+
setPopover: (popover) => setStore("popover", popover),
|
|
787
|
+
newSessionWorktree: props.newSessionWorktree,
|
|
788
|
+
onNewSessionWorktreeReset: props.onNewSessionWorktreeReset,
|
|
789
|
+
onSubmit: props.onSubmit,
|
|
790
|
+
})
|
|
791
|
+
|
|
792
|
+
const handleKeyDown = (event: KeyboardEvent) => {
|
|
793
|
+
if (event.key === "Backspace") {
|
|
794
|
+
const selection = window.getSelection()
|
|
795
|
+
if (selection && selection.isCollapsed) {
|
|
796
|
+
const node = selection.anchorNode
|
|
797
|
+
const offset = selection.anchorOffset
|
|
798
|
+
if (node && node.nodeType === Node.TEXT_NODE) {
|
|
799
|
+
const text = node.textContent ?? ""
|
|
800
|
+
if (/^\u200B+$/.test(text) && offset > 0) {
|
|
801
|
+
const range = document.createRange()
|
|
802
|
+
range.setStart(node, 0)
|
|
803
|
+
range.collapse(true)
|
|
804
|
+
selection.removeAllRanges()
|
|
805
|
+
selection.addRange(range)
|
|
806
|
+
}
|
|
807
|
+
}
|
|
808
|
+
}
|
|
809
|
+
}
|
|
810
|
+
|
|
811
|
+
if (event.key === "!" && store.mode === "normal") {
|
|
812
|
+
const cursorPosition = getCursorPosition(editorRef)
|
|
813
|
+
if (cursorPosition === 0) {
|
|
814
|
+
setStore("mode", "shell")
|
|
815
|
+
setStore("popover", null)
|
|
816
|
+
event.preventDefault()
|
|
817
|
+
return
|
|
818
|
+
}
|
|
819
|
+
}
|
|
820
|
+
if (store.mode === "shell") {
|
|
821
|
+
const { collapsed, cursorPosition, textLength } = getCaretState()
|
|
822
|
+
if (event.key === "Escape") {
|
|
823
|
+
setStore("mode", "normal")
|
|
824
|
+
event.preventDefault()
|
|
825
|
+
return
|
|
826
|
+
}
|
|
827
|
+
if (event.key === "Backspace" && collapsed && cursorPosition === 0 && textLength === 0) {
|
|
828
|
+
setStore("mode", "normal")
|
|
829
|
+
event.preventDefault()
|
|
830
|
+
return
|
|
831
|
+
}
|
|
832
|
+
}
|
|
833
|
+
|
|
834
|
+
// Handle Shift+Enter BEFORE IME check - Shift+Enter is never used for IME input
|
|
835
|
+
// and should always insert a newline regardless of composition state
|
|
836
|
+
if (event.key === "Enter" && event.shiftKey) {
|
|
837
|
+
addPart({ type: "text", content: "\n", start: 0, end: 0 })
|
|
838
|
+
event.preventDefault()
|
|
839
|
+
return
|
|
840
|
+
}
|
|
841
|
+
|
|
842
|
+
if (event.key === "Enter" && isImeComposing(event)) {
|
|
843
|
+
return
|
|
844
|
+
}
|
|
845
|
+
|
|
846
|
+
const ctrl = event.ctrlKey && !event.metaKey && !event.altKey && !event.shiftKey
|
|
847
|
+
|
|
848
|
+
if (store.popover) {
|
|
849
|
+
if (event.key === "Tab") {
|
|
850
|
+
selectPopoverActive()
|
|
851
|
+
event.preventDefault()
|
|
852
|
+
return
|
|
853
|
+
}
|
|
854
|
+
const nav = event.key === "ArrowUp" || event.key === "ArrowDown" || event.key === "Enter"
|
|
855
|
+
const ctrlNav = ctrl && (event.key === "n" || event.key === "p")
|
|
856
|
+
if (nav || ctrlNav) {
|
|
857
|
+
if (store.popover === "at") {
|
|
858
|
+
atOnKeyDown(event)
|
|
859
|
+
event.preventDefault()
|
|
860
|
+
return
|
|
861
|
+
}
|
|
862
|
+
if (store.popover === "slash") {
|
|
863
|
+
slashOnKeyDown(event)
|
|
864
|
+
}
|
|
865
|
+
event.preventDefault()
|
|
866
|
+
return
|
|
867
|
+
}
|
|
868
|
+
}
|
|
869
|
+
|
|
870
|
+
if (ctrl && event.code === "KeyG") {
|
|
871
|
+
if (store.popover) {
|
|
872
|
+
setStore("popover", null)
|
|
873
|
+
event.preventDefault()
|
|
874
|
+
return
|
|
875
|
+
}
|
|
876
|
+
if (working()) {
|
|
877
|
+
abort()
|
|
878
|
+
event.preventDefault()
|
|
879
|
+
}
|
|
880
|
+
return
|
|
881
|
+
}
|
|
882
|
+
|
|
883
|
+
if (event.key === "ArrowUp" || event.key === "ArrowDown") {
|
|
884
|
+
if (event.altKey || event.ctrlKey || event.metaKey) return
|
|
885
|
+
const { collapsed } = getCaretState()
|
|
886
|
+
if (!collapsed) return
|
|
887
|
+
|
|
888
|
+
const cursorPosition = getCursorPosition(editorRef)
|
|
889
|
+
const textLength = promptLength(prompt.current())
|
|
890
|
+
const textContent = prompt
|
|
891
|
+
.current()
|
|
892
|
+
.map((part) => ("content" in part ? part.content : ""))
|
|
893
|
+
.join("")
|
|
894
|
+
const isEmpty = textContent.trim() === "" || textLength <= 1
|
|
895
|
+
const hasNewlines = textContent.includes("\n")
|
|
896
|
+
const inHistory = store.historyIndex >= 0
|
|
897
|
+
const atStart = cursorPosition <= (isEmpty ? 1 : 0)
|
|
898
|
+
const atEnd = cursorPosition >= (isEmpty ? textLength - 1 : textLength)
|
|
899
|
+
const allowUp = isEmpty || atStart || (!hasNewlines && !inHistory) || (inHistory && atEnd)
|
|
900
|
+
const allowDown = isEmpty || atEnd || (!hasNewlines && !inHistory) || (inHistory && atStart)
|
|
901
|
+
|
|
902
|
+
if (event.key === "ArrowUp") {
|
|
903
|
+
if (!allowUp) return
|
|
904
|
+
if (navigateHistory("up")) {
|
|
905
|
+
event.preventDefault()
|
|
906
|
+
}
|
|
907
|
+
return
|
|
908
|
+
}
|
|
909
|
+
|
|
910
|
+
if (!allowDown) return
|
|
911
|
+
if (navigateHistory("down")) {
|
|
912
|
+
event.preventDefault()
|
|
913
|
+
}
|
|
914
|
+
return
|
|
915
|
+
}
|
|
916
|
+
|
|
917
|
+
// Note: Shift+Enter is handled earlier, before IME check
|
|
918
|
+
if (event.key === "Enter" && !event.shiftKey) {
|
|
919
|
+
handleSubmit(event)
|
|
920
|
+
}
|
|
921
|
+
if (event.key === "Escape") {
|
|
922
|
+
if (store.popover) {
|
|
923
|
+
setStore("popover", null)
|
|
924
|
+
} else if (working()) {
|
|
925
|
+
abort()
|
|
926
|
+
}
|
|
927
|
+
}
|
|
928
|
+
}
|
|
929
|
+
|
|
930
|
+
return (
|
|
931
|
+
<div class="relative size-full _max-h-[320px] flex flex-col gap-3">
|
|
932
|
+
<PromptPopover
|
|
933
|
+
popover={store.popover}
|
|
934
|
+
setSlashPopoverRef={(el) => (slashPopoverRef = el)}
|
|
935
|
+
atFlat={atFlat()}
|
|
936
|
+
atActive={atActive() ?? undefined}
|
|
937
|
+
atKey={atKey}
|
|
938
|
+
setAtActive={setAtActive}
|
|
939
|
+
onAtSelect={handleAtSelect}
|
|
940
|
+
slashFlat={slashFlat()}
|
|
941
|
+
slashActive={slashActive() ?? undefined}
|
|
942
|
+
setSlashActive={setSlashActive}
|
|
943
|
+
onSlashSelect={handleSlashSelect}
|
|
944
|
+
commandKeybind={command.keybind}
|
|
945
|
+
t={(key) => language.t(key as Parameters<typeof language.t>[0])}
|
|
946
|
+
/>
|
|
947
|
+
<form
|
|
948
|
+
onSubmit={handleSubmit}
|
|
949
|
+
classList={{
|
|
950
|
+
"group/prompt-input": true,
|
|
951
|
+
"bg-surface-raised-stronger-non-alpha shadow-xs-border relative": true,
|
|
952
|
+
"rounded-[14px] overflow-clip focus-within:shadow-xs-border": true,
|
|
953
|
+
"border-icon-info-active border-dashed": store.draggingType !== null,
|
|
954
|
+
[props.class ?? ""]: !!props.class,
|
|
955
|
+
}}
|
|
956
|
+
>
|
|
957
|
+
<PromptDragOverlay
|
|
958
|
+
type={store.draggingType}
|
|
959
|
+
label={language.t(store.draggingType === "@mention" ? "prompt.dropzone.file.label" : "prompt.dropzone.label")}
|
|
960
|
+
/>
|
|
961
|
+
<PromptContextItems
|
|
962
|
+
items={prompt.context.items()}
|
|
963
|
+
active={(item) => {
|
|
964
|
+
const active = comments.active()
|
|
965
|
+
return !!item.commentID && item.commentID === active?.id && item.path === active?.file
|
|
966
|
+
}}
|
|
967
|
+
openComment={openComment}
|
|
968
|
+
remove={(item) => {
|
|
969
|
+
if (item.commentID) comments.remove(item.path, item.commentID)
|
|
970
|
+
prompt.context.remove(item.key)
|
|
971
|
+
}}
|
|
972
|
+
t={(key) => language.t(key as Parameters<typeof language.t>[0])}
|
|
973
|
+
/>
|
|
974
|
+
<PromptImageAttachments
|
|
975
|
+
attachments={imageAttachments()}
|
|
976
|
+
onOpen={(attachment) =>
|
|
977
|
+
dialog.show(() => <ImagePreview src={attachment.dataUrl} alt={attachment.filename} />)
|
|
978
|
+
}
|
|
979
|
+
onRemove={removeImageAttachment}
|
|
980
|
+
removeLabel={language.t("prompt.attachment.remove")}
|
|
981
|
+
/>
|
|
982
|
+
<div class="relative max-h-[240px] overflow-y-auto" ref={(el) => (scrollRef = el)}>
|
|
983
|
+
<div
|
|
984
|
+
data-component="prompt-input"
|
|
985
|
+
ref={(el) => {
|
|
986
|
+
editorRef = el
|
|
987
|
+
props.ref?.(el)
|
|
988
|
+
}}
|
|
989
|
+
role="textbox"
|
|
990
|
+
aria-multiline="true"
|
|
991
|
+
aria-label={placeholder()}
|
|
992
|
+
contenteditable="true"
|
|
993
|
+
autocapitalize="off"
|
|
994
|
+
autocorrect="off"
|
|
995
|
+
spellcheck={false}
|
|
996
|
+
onInput={handleInput}
|
|
997
|
+
onPaste={handlePaste}
|
|
998
|
+
onCompositionStart={() => setComposing(true)}
|
|
999
|
+
onCompositionEnd={() => setComposing(false)}
|
|
1000
|
+
onKeyDown={handleKeyDown}
|
|
1001
|
+
classList={{
|
|
1002
|
+
"select-text": true,
|
|
1003
|
+
"w-full p-3 pr-12 text-14-regular text-text-strong focus:outline-none whitespace-pre-wrap": true,
|
|
1004
|
+
"[&_[data-type=file]]:text-syntax-property": true,
|
|
1005
|
+
"[&_[data-type=agent]]:text-syntax-type": true,
|
|
1006
|
+
"font-mono!": store.mode === "shell",
|
|
1007
|
+
}}
|
|
1008
|
+
/>
|
|
1009
|
+
<Show when={!prompt.dirty()}>
|
|
1010
|
+
<div class="absolute top-0 inset-x-0 p-3 pr-12 text-14-regular text-text-weak pointer-events-none whitespace-nowrap truncate">
|
|
1011
|
+
{placeholder()}
|
|
1012
|
+
</div>
|
|
1013
|
+
</Show>
|
|
1014
|
+
</div>
|
|
1015
|
+
<div class="relative p-3 flex items-center justify-between gap-2">
|
|
1016
|
+
<div class="flex items-center gap-2 min-w-0 flex-1">
|
|
1017
|
+
<Switch>
|
|
1018
|
+
<Match when={store.mode === "shell"}>
|
|
1019
|
+
<div class="flex items-center gap-2 px-2 h-6">
|
|
1020
|
+
<Icon name="console" size="small" class="text-icon-primary" />
|
|
1021
|
+
<span class="text-12-regular text-text-primary">{language.t("prompt.mode.shell")}</span>
|
|
1022
|
+
<span class="text-12-regular text-text-weak">{language.t("prompt.mode.shell.exit")}</span>
|
|
1023
|
+
</div>
|
|
1024
|
+
</Match>
|
|
1025
|
+
<Match when={store.mode === "normal"}>
|
|
1026
|
+
<TooltipKeybind
|
|
1027
|
+
placement="top"
|
|
1028
|
+
gutter={8}
|
|
1029
|
+
title={language.t("command.agent.cycle")}
|
|
1030
|
+
keybind={command.keybind("agent.cycle")}
|
|
1031
|
+
>
|
|
1032
|
+
<Select
|
|
1033
|
+
options={local.agent.list().map((agent) => agent.name)}
|
|
1034
|
+
current={local.agent.current()?.name ?? ""}
|
|
1035
|
+
onSelect={local.agent.set}
|
|
1036
|
+
class={`capitalize ${local.model.variant.list().length > 0 ? "max-w-full" : "max-w-[120px]"}`}
|
|
1037
|
+
valueClass="truncate"
|
|
1038
|
+
variant="ghost"
|
|
1039
|
+
/>
|
|
1040
|
+
</TooltipKeybind>
|
|
1041
|
+
<Show
|
|
1042
|
+
when={providers.paid().length > 0}
|
|
1043
|
+
fallback={
|
|
1044
|
+
<TooltipKeybind
|
|
1045
|
+
placement="top"
|
|
1046
|
+
gutter={8}
|
|
1047
|
+
title={language.t("command.model.choose")}
|
|
1048
|
+
keybind={command.keybind("model.choose")}
|
|
1049
|
+
>
|
|
1050
|
+
<Button
|
|
1051
|
+
as="div"
|
|
1052
|
+
variant="ghost"
|
|
1053
|
+
class="px-2 min-w-0 max-w-[240px]"
|
|
1054
|
+
onClick={() => dialog.show(() => <DialogSelectModelUnpaid />)}
|
|
1055
|
+
>
|
|
1056
|
+
<Show when={local.model.current()?.provider?.id}>
|
|
1057
|
+
<ProviderIcon id={local.model.current()!.provider.id as IconName} class="size-4 shrink-0" />
|
|
1058
|
+
</Show>
|
|
1059
|
+
<span class="truncate">
|
|
1060
|
+
{local.model.current()?.name ?? language.t("dialog.model.select.title")}
|
|
1061
|
+
</span>
|
|
1062
|
+
<Icon name="chevron-down" size="small" class="shrink-0" />
|
|
1063
|
+
</Button>
|
|
1064
|
+
</TooltipKeybind>
|
|
1065
|
+
}
|
|
1066
|
+
>
|
|
1067
|
+
<TooltipKeybind
|
|
1068
|
+
placement="top"
|
|
1069
|
+
gutter={8}
|
|
1070
|
+
title={language.t("command.model.choose")}
|
|
1071
|
+
keybind={command.keybind("model.choose")}
|
|
1072
|
+
>
|
|
1073
|
+
<ModelSelectorPopover
|
|
1074
|
+
triggerAs={Button}
|
|
1075
|
+
triggerProps={{ variant: "ghost", class: "min-w-0 max-w-[240px]" }}
|
|
1076
|
+
>
|
|
1077
|
+
<Show when={local.model.current()?.provider?.id}>
|
|
1078
|
+
<ProviderIcon id={local.model.current()!.provider.id as IconName} class="size-4 shrink-0" />
|
|
1079
|
+
</Show>
|
|
1080
|
+
<span class="truncate">
|
|
1081
|
+
{local.model.current()?.name ?? language.t("dialog.model.select.title")}
|
|
1082
|
+
</span>
|
|
1083
|
+
<Icon name="chevron-down" size="small" class="shrink-0" />
|
|
1084
|
+
</ModelSelectorPopover>
|
|
1085
|
+
</TooltipKeybind>
|
|
1086
|
+
</Show>
|
|
1087
|
+
<Show when={local.model.variant.list().length > 0}>
|
|
1088
|
+
<TooltipKeybind
|
|
1089
|
+
placement="top"
|
|
1090
|
+
gutter={8}
|
|
1091
|
+
title={language.t("command.model.variant.cycle")}
|
|
1092
|
+
keybind={command.keybind("model.variant.cycle")}
|
|
1093
|
+
>
|
|
1094
|
+
<Button
|
|
1095
|
+
data-action="model-variant-cycle"
|
|
1096
|
+
variant="ghost"
|
|
1097
|
+
class="text-text-base _hidden group-hover/prompt-input:inline-block capitalize text-12-regular"
|
|
1098
|
+
onClick={() => local.model.variant.cycle()}
|
|
1099
|
+
>
|
|
1100
|
+
{local.model.variant.current() ?? language.t("common.default")}
|
|
1101
|
+
</Button>
|
|
1102
|
+
</TooltipKeybind>
|
|
1103
|
+
</Show>
|
|
1104
|
+
<Show when={permission.permissionsEnabled() && params.id}>
|
|
1105
|
+
<TooltipKeybind
|
|
1106
|
+
placement="top"
|
|
1107
|
+
gutter={8}
|
|
1108
|
+
title={language.t("command.permissions.autoaccept.enable")}
|
|
1109
|
+
keybind={command.keybind("permissions.autoaccept")}
|
|
1110
|
+
>
|
|
1111
|
+
<Button
|
|
1112
|
+
variant="ghost"
|
|
1113
|
+
onClick={() => permission.toggleAutoAccept(params.id!, sdk.directory)}
|
|
1114
|
+
classList={{
|
|
1115
|
+
"_hidden group-hover/prompt-input:flex size-6 items-center justify-center": true,
|
|
1116
|
+
"text-text-base": !permission.isAutoAccepting(params.id!, sdk.directory),
|
|
1117
|
+
"hover:bg-surface-success-base": permission.isAutoAccepting(params.id!, sdk.directory),
|
|
1118
|
+
}}
|
|
1119
|
+
aria-label={
|
|
1120
|
+
permission.isAutoAccepting(params.id!, sdk.directory)
|
|
1121
|
+
? language.t("command.permissions.autoaccept.disable")
|
|
1122
|
+
: language.t("command.permissions.autoaccept.enable")
|
|
1123
|
+
}
|
|
1124
|
+
aria-pressed={permission.isAutoAccepting(params.id!, sdk.directory)}
|
|
1125
|
+
>
|
|
1126
|
+
<Icon
|
|
1127
|
+
name="chevron-double-right"
|
|
1128
|
+
size="small"
|
|
1129
|
+
classList={{ "text-icon-success-base": permission.isAutoAccepting(params.id!, sdk.directory) }}
|
|
1130
|
+
/>
|
|
1131
|
+
</Button>
|
|
1132
|
+
</TooltipKeybind>
|
|
1133
|
+
</Show>
|
|
1134
|
+
</Match>
|
|
1135
|
+
</Switch>
|
|
1136
|
+
</div>
|
|
1137
|
+
<div class="flex items-center gap-1 shrink-0">
|
|
1138
|
+
<input
|
|
1139
|
+
ref={fileInputRef}
|
|
1140
|
+
type="file"
|
|
1141
|
+
accept={ACCEPTED_FILE_TYPES.join(",")}
|
|
1142
|
+
class="hidden"
|
|
1143
|
+
onChange={(e) => {
|
|
1144
|
+
const file = e.currentTarget.files?.[0]
|
|
1145
|
+
if (file) addImageAttachment(file)
|
|
1146
|
+
e.currentTarget.value = ""
|
|
1147
|
+
}}
|
|
1148
|
+
/>
|
|
1149
|
+
<div class="flex items-center gap-1 mr-1">
|
|
1150
|
+
<SessionContextUsage />
|
|
1151
|
+
<Show when={store.mode === "normal"}>
|
|
1152
|
+
<Tooltip placement="top" value={language.t("prompt.action.attachFile")}>
|
|
1153
|
+
<Button
|
|
1154
|
+
type="button"
|
|
1155
|
+
variant="ghost"
|
|
1156
|
+
class="size-6 px-1"
|
|
1157
|
+
onClick={() => fileInputRef.click()}
|
|
1158
|
+
aria-label={language.t("prompt.action.attachFile")}
|
|
1159
|
+
>
|
|
1160
|
+
<Icon name="photo" class="size-4.5" />
|
|
1161
|
+
</Button>
|
|
1162
|
+
</Tooltip>
|
|
1163
|
+
</Show>
|
|
1164
|
+
</div>
|
|
1165
|
+
<Tooltip
|
|
1166
|
+
placement="top"
|
|
1167
|
+
inactive={!prompt.dirty() && !working()}
|
|
1168
|
+
value={
|
|
1169
|
+
<Switch>
|
|
1170
|
+
<Match when={working()}>
|
|
1171
|
+
<div class="flex items-center gap-2">
|
|
1172
|
+
<span>{language.t("prompt.action.stop")}</span>
|
|
1173
|
+
<span class="text-icon-base text-12-medium text-[10px]!">{language.t("common.key.esc")}</span>
|
|
1174
|
+
</div>
|
|
1175
|
+
</Match>
|
|
1176
|
+
<Match when={true}>
|
|
1177
|
+
<div class="flex items-center gap-2">
|
|
1178
|
+
<span>{language.t("prompt.action.send")}</span>
|
|
1179
|
+
<Icon name="enter" size="small" class="text-icon-base" />
|
|
1180
|
+
</div>
|
|
1181
|
+
</Match>
|
|
1182
|
+
</Switch>
|
|
1183
|
+
}
|
|
1184
|
+
>
|
|
1185
|
+
<IconButton
|
|
1186
|
+
type="submit"
|
|
1187
|
+
disabled={!prompt.dirty() && !working() && commentCount() === 0}
|
|
1188
|
+
icon={working() ? "stop" : "arrow-up"}
|
|
1189
|
+
variant="primary"
|
|
1190
|
+
class="h-6 w-4.5"
|
|
1191
|
+
aria-label={working() ? language.t("prompt.action.stop") : language.t("prompt.action.send")}
|
|
1192
|
+
/>
|
|
1193
|
+
</Tooltip>
|
|
1194
|
+
</div>
|
|
1195
|
+
</div>
|
|
1196
|
+
</form>
|
|
1197
|
+
</div>
|
|
1198
|
+
)
|
|
1199
|
+
}
|