upfynai-code 0.1.0 → 2.2.0
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/client/dist/api-docs.html +879 -0
- package/client/dist/assets/AppContent-CTSHQdyq.js +513 -0
- package/client/dist/assets/CanvasPanel-Cig0Mo9s.js +6 -0
- package/client/dist/assets/CanvasPanel-q4HEqNtV.css +1 -0
- package/client/dist/assets/KaTeX_AMS-Regular-BQhdFMY1.woff2 +0 -0
- package/client/dist/assets/KaTeX_AMS-Regular-DMm9YOAa.woff +0 -0
- package/client/dist/assets/KaTeX_AMS-Regular-DRggAlZN.ttf +0 -0
- package/client/dist/assets/KaTeX_Caligraphic-Bold-ATXxdsX0.ttf +0 -0
- package/client/dist/assets/KaTeX_Caligraphic-Bold-BEiXGLvX.woff +0 -0
- package/client/dist/assets/KaTeX_Caligraphic-Bold-Dq_IR9rO.woff2 +0 -0
- package/client/dist/assets/KaTeX_Caligraphic-Regular-CTRA-rTL.woff +0 -0
- package/client/dist/assets/KaTeX_Caligraphic-Regular-Di6jR-x-.woff2 +0 -0
- package/client/dist/assets/KaTeX_Caligraphic-Regular-wX97UBjC.ttf +0 -0
- package/client/dist/assets/KaTeX_Fraktur-Bold-BdnERNNW.ttf +0 -0
- package/client/dist/assets/KaTeX_Fraktur-Bold-BsDP51OF.woff +0 -0
- package/client/dist/assets/KaTeX_Fraktur-Bold-CL6g_b3V.woff2 +0 -0
- package/client/dist/assets/KaTeX_Fraktur-Regular-CB_wures.ttf +0 -0
- package/client/dist/assets/KaTeX_Fraktur-Regular-CTYiF6lA.woff2 +0 -0
- package/client/dist/assets/KaTeX_Fraktur-Regular-Dxdc4cR9.woff +0 -0
- package/client/dist/assets/KaTeX_Main-Bold-Cx986IdX.woff2 +0 -0
- package/client/dist/assets/KaTeX_Main-Bold-Jm3AIy58.woff +0 -0
- package/client/dist/assets/KaTeX_Main-Bold-waoOVXN0.ttf +0 -0
- package/client/dist/assets/KaTeX_Main-BoldItalic-DxDJ3AOS.woff2 +0 -0
- package/client/dist/assets/KaTeX_Main-BoldItalic-DzxPMmG6.ttf +0 -0
- package/client/dist/assets/KaTeX_Main-BoldItalic-SpSLRI95.woff +0 -0
- package/client/dist/assets/KaTeX_Main-Italic-3WenGoN9.ttf +0 -0
- package/client/dist/assets/KaTeX_Main-Italic-BMLOBm91.woff +0 -0
- package/client/dist/assets/KaTeX_Main-Italic-NWA7e6Wa.woff2 +0 -0
- package/client/dist/assets/KaTeX_Main-Regular-B22Nviop.woff2 +0 -0
- package/client/dist/assets/KaTeX_Main-Regular-Dr94JaBh.woff +0 -0
- package/client/dist/assets/KaTeX_Main-Regular-ypZvNtVU.ttf +0 -0
- package/client/dist/assets/KaTeX_Math-BoldItalic-B3XSjfu4.ttf +0 -0
- package/client/dist/assets/KaTeX_Math-BoldItalic-CZnvNsCZ.woff2 +0 -0
- package/client/dist/assets/KaTeX_Math-BoldItalic-iY-2wyZ7.woff +0 -0
- package/client/dist/assets/KaTeX_Math-Italic-DA0__PXp.woff +0 -0
- package/client/dist/assets/KaTeX_Math-Italic-flOr_0UB.ttf +0 -0
- package/client/dist/assets/KaTeX_Math-Italic-t53AETM-.woff2 +0 -0
- package/client/dist/assets/KaTeX_SansSerif-Bold-CFMepnvq.ttf +0 -0
- package/client/dist/assets/KaTeX_SansSerif-Bold-D1sUS0GD.woff2 +0 -0
- package/client/dist/assets/KaTeX_SansSerif-Bold-DbIhKOiC.woff +0 -0
- package/client/dist/assets/KaTeX_SansSerif-Italic-C3H0VqGB.woff2 +0 -0
- package/client/dist/assets/KaTeX_SansSerif-Italic-DN2j7dab.woff +0 -0
- package/client/dist/assets/KaTeX_SansSerif-Italic-YYjJ1zSn.ttf +0 -0
- package/client/dist/assets/KaTeX_SansSerif-Regular-BNo7hRIc.ttf +0 -0
- package/client/dist/assets/KaTeX_SansSerif-Regular-CS6fqUqJ.woff +0 -0
- package/client/dist/assets/KaTeX_SansSerif-Regular-DDBCnlJ7.woff2 +0 -0
- package/client/dist/assets/KaTeX_Script-Regular-C5JkGWo-.ttf +0 -0
- package/client/dist/assets/KaTeX_Script-Regular-D3wIWfF6.woff2 +0 -0
- package/client/dist/assets/KaTeX_Script-Regular-D5yQViql.woff +0 -0
- package/client/dist/assets/KaTeX_Size1-Regular-C195tn64.woff +0 -0
- package/client/dist/assets/KaTeX_Size1-Regular-Dbsnue_I.ttf +0 -0
- package/client/dist/assets/KaTeX_Size1-Regular-mCD8mA8B.woff2 +0 -0
- package/client/dist/assets/KaTeX_Size2-Regular-B7gKUWhC.ttf +0 -0
- package/client/dist/assets/KaTeX_Size2-Regular-Dy4dx90m.woff2 +0 -0
- package/client/dist/assets/KaTeX_Size2-Regular-oD1tc_U0.woff +0 -0
- package/client/dist/assets/KaTeX_Size3-Regular-CTq5MqoE.woff +0 -0
- package/client/dist/assets/KaTeX_Size3-Regular-DgpXs0kz.ttf +0 -0
- package/client/dist/assets/KaTeX_Size4-Regular-BF-4gkZK.woff +0 -0
- package/client/dist/assets/KaTeX_Size4-Regular-DWFBv043.ttf +0 -0
- package/client/dist/assets/KaTeX_Size4-Regular-Dl5lxZxV.woff2 +0 -0
- package/client/dist/assets/KaTeX_Typewriter-Regular-C0xS9mPB.woff +0 -0
- package/client/dist/assets/KaTeX_Typewriter-Regular-CO6r4hn1.woff2 +0 -0
- package/client/dist/assets/KaTeX_Typewriter-Regular-D3Ib7_Hf.ttf +0 -0
- package/client/dist/assets/LoginModal-silya-zP.js +11 -0
- package/client/dist/assets/MarkdownPreview-B3c7OEj6.js +1 -0
- package/client/dist/assets/Onboarding-Coxo6mFA.js +1 -0
- package/client/dist/assets/SetupForm-BzYOsbji.js +1 -0
- package/client/dist/assets/Tableau10-B-NsZVaP.js +1 -0
- package/client/dist/assets/_commonjs-dynamic-modules-TDtrdbi3.js +1 -0
- package/client/dist/assets/ar-SA-G6X2FPQ2-Bmw2-hDt.js +10 -0
- package/client/dist/assets/arc-BMqY7_Ci.js +1 -0
- package/client/dist/assets/array-BKyUJesY.js +1 -0
- package/client/dist/assets/az-AZ-76LH7QW2-Dh1le_qs.js +1 -0
- package/client/dist/assets/bg-BG-XCXSNQG7-Cbav8Z9z.js +5 -0
- package/client/dist/assets/blockDiagram-38ab4fdb-ChHJxsXw.js +118 -0
- package/client/dist/assets/bn-BD-2XOGV67Q-DCNjOaWz.js +5 -0
- package/client/dist/assets/c4Diagram-3d4e48cf-b8Xue4Z6.js +10 -0
- package/client/dist/assets/ca-ES-6MX7JW3Y-Dl_vM7NS.js +8 -0
- package/client/dist/assets/channel-CSnvHe_M.js +1 -0
- package/client/dist/assets/classDiagram-70f12bd4-BheP7Ggo.js +2 -0
- package/client/dist/assets/classDiagram-v2-f2320105-xtym7GEZ.js +2 -0
- package/client/dist/assets/clone-B75abXxS.js +1 -0
- package/client/dist/assets/createText-2e5e7dd3-_n4jI_fO.js +5 -0
- package/client/dist/assets/cs-CZ-2BRQDIVT-ftsKDdz4.js +11 -0
- package/client/dist/assets/da-DK-5WZEPLOC-DAjdwGRO.js +5 -0
- package/client/dist/assets/de-DE-XR44H4JA-BJXczHGT.js +8 -0
- package/client/dist/assets/directory-open-01563666-DWU9wJ6I.js +1 -0
- package/client/dist/assets/directory-open-4ed118d0-CunoC1EB.js +1 -0
- package/client/dist/assets/edges-e0da2a9e-CfPZr4YM.js +4 -0
- package/client/dist/assets/el-GR-BZB4AONW-DW2p_uy7.js +10 -0
- package/client/dist/assets/erDiagram-9861fffd-CF33V-Of.js +51 -0
- package/client/dist/assets/es-ES-U4NZUMDT-DLOIGnrl.js +9 -0
- package/client/dist/assets/eu-ES-A7QVB2H4-LJXbf89m.js +11 -0
- package/client/dist/assets/fa-IR-HGAKTJCU-Dvx65fgW.js +8 -0
- package/client/dist/assets/fi-FI-Z5N7JZ37-EoL65BQh.js +6 -0
- package/client/dist/assets/file-open-002ab408-DIuFHtCF.js +1 -0
- package/client/dist/assets/file-open-7c801643-684qeFg4.js +1 -0
- package/client/dist/assets/file-save-3189631c-C1wFhQhH.js +1 -0
- package/client/dist/assets/file-save-745eba88-Bb9F9Kg7.js +1 -0
- package/client/dist/assets/flowDb-956e92f1-HgoXVy2H.js +10 -0
- package/client/dist/assets/flowDiagram-66a62f08-tffoET0H.js +4 -0
- package/client/dist/assets/flowDiagram-v2-96b9c2cf-Byc3JCHh.js +1 -0
- package/client/dist/assets/flowchart-elk-definition-4a651766-DJbI2dpv.js +139 -0
- package/client/dist/assets/fr-FR-RHASNOE6-DNk_jdDs.js +9 -0
- package/client/dist/assets/ganttDiagram-c361ad54-2XX670FU.js +257 -0
- package/client/dist/assets/gitGraphDiagram-72cf32ee-CcUfruAo.js +70 -0
- package/client/dist/assets/gl-ES-HMX3MZ6V-dxzFjZlG.js +10 -0
- package/client/dist/assets/graph-BSbiMSBC.js +1 -0
- package/client/dist/assets/he-IL-6SHJWFNN-Cogsfdt1.js +10 -0
- package/client/dist/assets/hi-IN-IWLTKZ5I-L6wbgi4F.js +4 -0
- package/client/dist/assets/hu-HU-A5ZG7DT2-DSA6ZDsH.js +7 -0
- package/client/dist/assets/id-ID-SAP4L64H-BK_vGGS6.js +10 -0
- package/client/dist/assets/image-blob-reduce.esm-BLtmMM_J.js +2 -0
- package/client/dist/assets/index-3862675e-Bv32HUgT.js +1 -0
- package/client/dist/assets/index-B8wwD_Xo.css +1 -0
- package/client/dist/assets/index-BPwf8Fw3.js +27 -0
- package/client/dist/assets/index-D1urGMYu.js +95 -0
- package/client/dist/assets/infoDiagram-f8f76790-w4mR4pxn.js +7 -0
- package/client/dist/assets/init-Gi6I4Gst.js +1 -0
- package/client/dist/assets/it-IT-JPQ66NNP-BLdHYMhn.js +11 -0
- package/client/dist/assets/ja-JP-DBVTYXUO-B_vmexl_.js +8 -0
- package/client/dist/assets/journeyDiagram-49397b02-D9nmO17e.js +139 -0
- package/client/dist/assets/kaa-6HZHGXH3-5s-3jl6F.js +1 -0
- package/client/dist/assets/kab-KAB-ZGHBKWFO-2QaVDuSf.js +8 -0
- package/client/dist/assets/kk-KZ-P5N5QNE5-CTC52Vbi.js +1 -0
- package/client/dist/assets/km-KH-HSX4SM5Z-DxawH8UZ.js +11 -0
- package/client/dist/assets/ko-KR-MTYHY66A-CmosEM8_.js +9 -0
- package/client/dist/assets/ku-TR-6OUDTVRD-DbiLen4y.js +9 -0
- package/client/dist/assets/layout-jmt3H9tA.js +1 -0
- package/client/dist/assets/line-JTlRayUJ.js +1 -0
- package/client/dist/assets/linear-DJeB5p7x.js +1 -0
- package/client/dist/assets/lt-LT-XHIRWOB4-CH15wrjA.js +3 -0
- package/client/dist/assets/lv-LV-5QDEKY6T-dhgfPuCQ.js +7 -0
- package/client/dist/assets/mindmap-definition-fc14e90a-BOOrexmz.js +415 -0
- package/client/dist/assets/mr-IN-CRQNXWMA-3Gi6iq7A.js +13 -0
- package/client/dist/assets/my-MM-5M5IBNSE-CpH4rdJj.js +1 -0
- package/client/dist/assets/nb-NO-T6EIAALU-Du6iiGql.js +10 -0
- package/client/dist/assets/nl-NL-IS3SIHDZ-BGvsd1MT.js +8 -0
- package/client/dist/assets/nn-NO-6E72VCQL-B-odvJZW.js +8 -0
- package/client/dist/assets/oc-FR-POXYY2M6-COC8xNjo.js +8 -0
- package/client/dist/assets/ordinal-Cboi1Yqb.js +1 -0
- package/client/dist/assets/pa-IN-N4M65BXN-CE21PUQH.js +4 -0
- package/client/dist/assets/path-CbwjOpE9.js +1 -0
- package/client/dist/assets/pdf-TYrZqVzP.js +12 -0
- package/client/dist/assets/pdf.worker-BA9kU3Pw.mjs +61080 -0
- package/client/dist/assets/percentages-BXMCSKIN-C9GT0OD3.js +199 -0
- package/client/dist/assets/pica-VkdyTzi8.js +2 -0
- package/client/dist/assets/pieDiagram-8a3498a8-Cvfh7Qr5.js +35 -0
- package/client/dist/assets/pl-PL-T2D74RX3-D4xFVSoT.js +9 -0
- package/client/dist/assets/pt-BR-5N22H2LF-CCq257gA.js +9 -0
- package/client/dist/assets/pt-PT-UZXXM6DQ-1l8gt5vA.js +9 -0
- package/client/dist/assets/quadrantDiagram-120e2f19-BA0js1aD.js +7 -0
- package/client/dist/assets/requirementDiagram-deff3bca-B0QNFfIn.js +52 -0
- package/client/dist/assets/ro-RO-JPDTUUEW-yosBW01E.js +11 -0
- package/client/dist/assets/roundRect-mAH3dD0p.js +1 -0
- package/client/dist/assets/ru-RU-B4JR7IUQ-8LkEJUix.js +9 -0
- package/client/dist/assets/sankeyDiagram-04a897e0-D4T9eCXn.js +8 -0
- package/client/dist/assets/sequenceDiagram-704730f1-CfBUTCrO.js +122 -0
- package/client/dist/assets/si-LK-N5RQ5JYF-D8rjbqtd.js +1 -0
- package/client/dist/assets/sk-SK-C5VTKIMK-Bg14sAzN.js +6 -0
- package/client/dist/assets/sl-SI-NN7IZMDC-CMTib6Zs.js +6 -0
- package/client/dist/assets/stateDiagram-587899a1-BGgvmVSZ.js +1 -0
- package/client/dist/assets/stateDiagram-v2-d93cdb3a-Qn3DpYuO.js +1 -0
- package/client/dist/assets/styles-6aaf32cf-IdVZLPrD.js +207 -0
- package/client/dist/assets/styles-9a916d00-BAC3L45X.js +160 -0
- package/client/dist/assets/styles-c10674c1-COhXxX8c.js +116 -0
- package/client/dist/assets/subset-shared.chunk-BWHnFai4.js +22 -0
- package/client/dist/assets/subset-worker.chunk-C8QUSruZ.js +1 -0
- package/client/dist/assets/sv-SE-XGPEYMSR-C1425rOF.js +10 -0
- package/client/dist/assets/svgDrawCommon-08f97a94-Cfk-fgnN.js +1 -0
- package/client/dist/assets/ta-IN-2NMHFXQM-BHHo1zpF.js +9 -0
- package/client/dist/assets/th-TH-HPSO5L25-CZVzm_WT.js +2 -0
- package/client/dist/assets/timeline-definition-85554ec2-VAvuJith.js +61 -0
- package/client/dist/assets/tr-TR-DEFEU3FU-DE1lclCq.js +7 -0
- package/client/dist/assets/uk-UA-QMV73CPH-D4lJZ85O.js +6 -0
- package/client/dist/assets/vendor-codemirror-BARtJV1V.js +16 -0
- package/client/dist/assets/vendor-codemirror-langs-52_y1wip.js +20 -0
- package/client/dist/assets/vendor-i18n-ByAl-gdx.js +1 -0
- package/client/dist/assets/vendor-icons-D33IkSIf.js +1 -0
- package/client/dist/assets/vendor-markdown-CIVH08vJ.js +298 -0
- package/client/dist/assets/vendor-react-CHoMc7ka.js +8 -0
- package/client/dist/assets/vendor-syntax-Djb62v3a.js +9 -0
- package/client/dist/assets/vendor-xterm-DBb3RXlu.js +66 -0
- package/client/dist/assets/vendor-xterm-DrlLKa8f.css +1 -0
- package/client/dist/assets/vi-VN-M7AON7JQ-Dgc_SShk.js +5 -0
- package/client/dist/assets/xychartDiagram-e933f94c-BeyVBJhb.js +7 -0
- package/client/dist/assets/zh-CN-LNUGB5OW-MH4Yh8in.js +10 -0
- package/client/dist/assets/zh-HK-E62DVLB3-D4XHehjx.js +1 -0
- package/client/dist/assets/zh-TW-RAJ6MFWO--efj3evj.js +9 -0
- package/client/dist/clear-cache.html +85 -0
- package/client/dist/convert-icons.md +53 -0
- package/client/dist/favicon.png +0 -0
- package/client/dist/favicon.svg +9 -0
- package/client/dist/generate-icons.js +49 -0
- package/client/dist/icons/claude-ai-icon.svg +1 -0
- package/client/dist/icons/codex-white.svg +3 -0
- package/client/dist/icons/codex.svg +3 -0
- package/client/dist/icons/cursor-white.svg +12 -0
- package/client/dist/icons/cursor.svg +1 -0
- package/client/dist/icons/icon-128x128.png +0 -0
- package/client/dist/icons/icon-128x128.svg +12 -0
- package/client/dist/icons/icon-144x144.png +0 -0
- package/client/dist/icons/icon-144x144.svg +12 -0
- package/client/dist/icons/icon-152x152.png +0 -0
- package/client/dist/icons/icon-152x152.svg +12 -0
- package/client/dist/icons/icon-192x192.png +0 -0
- package/client/dist/icons/icon-192x192.svg +12 -0
- package/client/dist/icons/icon-384x384.png +0 -0
- package/client/dist/icons/icon-384x384.svg +12 -0
- package/client/dist/icons/icon-512x512.png +0 -0
- package/client/dist/icons/icon-512x512.svg +12 -0
- package/client/dist/icons/icon-72x72.png +0 -0
- package/client/dist/icons/icon-72x72.svg +12 -0
- package/client/dist/icons/icon-96x96.png +0 -0
- package/client/dist/icons/icon-96x96.svg +12 -0
- package/client/dist/icons/icon-template.svg +12 -0
- package/client/dist/index.html +128 -0
- package/client/dist/logo-128.png +0 -0
- package/client/dist/logo-256.png +0 -0
- package/client/dist/logo-32.png +0 -0
- package/client/dist/logo-512.png +0 -0
- package/client/dist/logo-64.png +0 -0
- package/client/dist/logo.svg +17 -0
- package/client/dist/manifest.json +61 -0
- package/client/dist/mcp-docs.html +119 -0
- package/client/dist/screenshots/cli-selection.png +0 -0
- package/client/dist/screenshots/desktop-main.png +0 -0
- package/client/dist/screenshots/mobile-chat.png +0 -0
- package/client/dist/screenshots/tools-modal.png +0 -0
- package/client/dist/sw.js +19 -0
- package/commands/upfynai-connect.md +46 -0
- package/commands/upfynai-disconnect.md +31 -0
- package/commands/upfynai-doctor.md +99 -0
- package/commands/upfynai-export.md +49 -0
- package/commands/upfynai-local.md +82 -0
- package/commands/upfynai-status.md +75 -0
- package/commands/upfynai-stop.md +49 -0
- package/commands/upfynai-uninstall.md +58 -0
- package/commands/upfynai.md +50 -0
- package/package.json +106 -47
- package/scripts/build-client.js +17 -0
- package/scripts/fix-node-pty.js +67 -0
- package/scripts/install-commands.js +78 -0
- package/server/claude-sdk.js +714 -0
- package/server/cli.js +419 -0
- package/server/constants/config.js +5 -0
- package/server/cursor-cli.js +270 -0
- package/server/database/auth.db +0 -0
- package/server/database/db.js +606 -0
- package/server/database/init.sql +70 -0
- package/server/index.js +2269 -0
- package/server/load-env.js +26 -0
- package/server/mcp-server.js +620 -0
- package/server/middleware/auth.js +158 -0
- package/server/openai-codex.js +403 -0
- package/server/projects.js +1849 -0
- package/server/relay-client.js +314 -0
- package/server/routes/agent.js +1231 -0
- package/server/routes/auth.js +220 -0
- package/server/routes/cli-auth.js +263 -0
- package/server/routes/codex.js +344 -0
- package/server/routes/commands.js +601 -0
- package/server/routes/cursor.js +808 -0
- package/server/routes/git.js +1165 -0
- package/server/routes/mcp-utils.js +48 -0
- package/server/routes/mcp.js +552 -0
- package/server/routes/payments.js +172 -0
- package/server/routes/projects.js +549 -0
- package/server/routes/settings.js +178 -0
- package/server/routes/taskmaster.js +1964 -0
- package/server/routes/user.js +106 -0
- package/server/utils/commandParser.js +303 -0
- package/server/utils/gitConfig.js +24 -0
- package/server/utils/mcp-detector.js +198 -0
- package/server/utils/taskmaster-websocket.js +129 -0
- package/shared/modelConstants.js +67 -0
- package/LICENSE +0 -22
- package/bin/cli.js +0 -86
- package/dist/assets/CanvasPanel-B48gAKVY.js +0 -538
- package/dist/assets/CanvasPanel-B48gAKVY.js.map +0 -1
- package/dist/assets/CanvasPanel-BsOG3EVs.css +0 -1
- package/dist/assets/index-CEhTwG68.css +0 -1
- package/dist/assets/index-GqAGWpJI.js +0 -70
- package/dist/assets/index-GqAGWpJI.js.map +0 -1
- package/dist/index.html +0 -18
- package/index.html +0 -17
- package/src/App.tsx +0 -226
- package/src/components/canvas/CanvasPanel.tsx +0 -62
- package/src/components/canvas/layout/graph-builder.ts +0 -136
- package/src/components/canvas/shapes/CompactionNodeShape.tsx +0 -76
- package/src/components/canvas/shapes/SessionNodeShape.tsx +0 -93
- package/src/components/canvas/shapes/StatuslineWidgetShape.tsx +0 -125
- package/src/components/canvas/shapes/TextResponseNodeShape.tsx +0 -86
- package/src/components/canvas/shapes/ToolCallNodeShape.tsx +0 -107
- package/src/components/canvas/shapes/ToolResultNodeShape.tsx +0 -87
- package/src/components/canvas/shapes/shared-styles.ts +0 -35
- package/src/components/chat/ChatPanel.tsx +0 -96
- package/src/components/chat/InputBar.tsx +0 -81
- package/src/components/chat/MessageList.tsx +0 -130
- package/src/components/chat/PermissionDialog.tsx +0 -70
- package/src/components/layout/FolderSelector.tsx +0 -152
- package/src/components/layout/ModelSelector.tsx +0 -65
- package/src/components/layout/SessionManager.tsx +0 -115
- package/src/components/statusline/StatuslineBar.tsx +0 -114
- package/src/main.tsx +0 -10
- package/src/server/claude-session.ts +0 -156
- package/src/server/index.ts +0 -149
- package/src/services/stream-consumer.ts +0 -330
- package/src/statusline-core/bin/statusline.sh +0 -121
- package/src/statusline-core/commands/sls-config.md +0 -42
- package/src/statusline-core/commands/sls-doctor.md +0 -35
- package/src/statusline-core/commands/sls-help.md +0 -48
- package/src/statusline-core/commands/sls-layout.md +0 -38
- package/src/statusline-core/commands/sls-preview.md +0 -34
- package/src/statusline-core/commands/sls-theme.md +0 -40
- package/src/statusline-core/installer.js +0 -228
- package/src/statusline-core/layouts/compact.sh +0 -21
- package/src/statusline-core/layouts/full.sh +0 -62
- package/src/statusline-core/layouts/standard.sh +0 -39
- package/src/statusline-core/lib/core.sh +0 -389
- package/src/statusline-core/lib/helpers.sh +0 -81
- package/src/statusline-core/lib/json-parser.sh +0 -71
- package/src/statusline-core/themes/catppuccin.sh +0 -32
- package/src/statusline-core/themes/default.sh +0 -37
- package/src/statusline-core/themes/gruvbox.sh +0 -32
- package/src/statusline-core/themes/nord.sh +0 -32
- package/src/statusline-core/themes/tokyo-night.sh +0 -32
- package/src/store/canvas-store.ts +0 -50
- package/src/store/chat-store.ts +0 -60
- package/src/store/permission-store.ts +0 -29
- package/src/store/session-store.ts +0 -52
- package/src/store/statusline-store.ts +0 -160
- package/src/styles/global.css +0 -117
- package/src/themes/index.ts +0 -149
- package/src/types/canvas-graph.ts +0 -24
- package/src/types/sdk-messages.ts +0 -156
- package/src/types/statusline-fields.ts +0 -67
- package/src/vite-env.d.ts +0 -1
- package/tsconfig.json +0 -26
- package/vite.config.ts +0 -24
|
@@ -1,125 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
BaseBoxShapeUtil,
|
|
3
|
-
HTMLContainer,
|
|
4
|
-
type TLBaseShape,
|
|
5
|
-
} from '@tldraw/tldraw';
|
|
6
|
-
import { NODE_COLORS } from './shared-styles';
|
|
7
|
-
|
|
8
|
-
export type StatuslineWidgetShape = TLBaseShape<
|
|
9
|
-
'statuslineWidget',
|
|
10
|
-
{
|
|
11
|
-
w: number;
|
|
12
|
-
h: number;
|
|
13
|
-
model: string;
|
|
14
|
-
cost: string;
|
|
15
|
-
tokensIn: string;
|
|
16
|
-
tokensOut: string;
|
|
17
|
-
contextPct: number;
|
|
18
|
-
skill: string;
|
|
19
|
-
turns: number;
|
|
20
|
-
}
|
|
21
|
-
>;
|
|
22
|
-
|
|
23
|
-
// @ts-expect-error — custom shape type not in tldraw's built-in TLShape union
|
|
24
|
-
export class StatuslineWidgetShapeUtil extends BaseBoxShapeUtil<StatuslineWidgetShape> {
|
|
25
|
-
static type = 'statuslineWidget' as const;
|
|
26
|
-
|
|
27
|
-
getDefaultProps(): StatuslineWidgetShape['props'] {
|
|
28
|
-
return {
|
|
29
|
-
w: 220,
|
|
30
|
-
h: 140,
|
|
31
|
-
model: 'unknown',
|
|
32
|
-
cost: '$0.00',
|
|
33
|
-
tokensIn: '0',
|
|
34
|
-
tokensOut: '0',
|
|
35
|
-
contextPct: 0,
|
|
36
|
-
skill: 'Idle',
|
|
37
|
-
turns: 0,
|
|
38
|
-
};
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
component(shape: StatuslineWidgetShape) {
|
|
42
|
-
const { model, cost, tokensIn, tokensOut, contextPct, skill, turns } = shape.props;
|
|
43
|
-
const color = NODE_COLORS.statusline;
|
|
44
|
-
|
|
45
|
-
const ctxColor = contextPct > 90 ? '#dc2626'
|
|
46
|
-
: contextPct > 75 ? '#ef4444'
|
|
47
|
-
: contextPct > 40 ? '#fb923c'
|
|
48
|
-
: '#e4e4e7';
|
|
49
|
-
|
|
50
|
-
return (
|
|
51
|
-
<HTMLContainer>
|
|
52
|
-
<div
|
|
53
|
-
style={{
|
|
54
|
-
width: shape.props.w,
|
|
55
|
-
height: shape.props.h,
|
|
56
|
-
background: '#0a0a0f',
|
|
57
|
-
border: `1.5px solid ${color}50`,
|
|
58
|
-
borderRadius: 10,
|
|
59
|
-
padding: 10,
|
|
60
|
-
fontFamily: 'JetBrains Mono, monospace',
|
|
61
|
-
fontSize: 10,
|
|
62
|
-
display: 'flex',
|
|
63
|
-
flexDirection: 'column',
|
|
64
|
-
gap: 3,
|
|
65
|
-
pointerEvents: 'all',
|
|
66
|
-
}}
|
|
67
|
-
>
|
|
68
|
-
{/* Header */}
|
|
69
|
-
<div style={{ display: 'flex', alignItems: 'center', gap: 4, marginBottom: 2 }}>
|
|
70
|
-
<span style={{
|
|
71
|
-
background: color, color: '#0a0a0f', fontSize: 8,
|
|
72
|
-
fontWeight: 800, padding: '1px 4px', borderRadius: 2,
|
|
73
|
-
letterSpacing: 1,
|
|
74
|
-
}}>UC</span>
|
|
75
|
-
<span style={{ color, fontSize: 10, fontWeight: 600 }}>Statusline</span>
|
|
76
|
-
</div>
|
|
77
|
-
|
|
78
|
-
{/* Fields */}
|
|
79
|
-
<Row label="Model" value={model} color="#a855f7" />
|
|
80
|
-
<Row label="Skill" value={skill} color={color} />
|
|
81
|
-
<Row label="Tokens" value={`${tokensIn} + ${tokensOut}`} color="#f59e0b" />
|
|
82
|
-
<Row label="Cost" value={cost} color="#22c55e" />
|
|
83
|
-
<Row label="Turns" value={String(turns)} color="#787882" />
|
|
84
|
-
|
|
85
|
-
{/* Context bar */}
|
|
86
|
-
<div style={{ display: 'flex', alignItems: 'center', gap: 4, marginTop: 2 }}>
|
|
87
|
-
<span style={{ color: ctxColor, minWidth: 28 }}>Ctx</span>
|
|
88
|
-
<div style={{
|
|
89
|
-
flex: 1, height: 5, borderRadius: 3,
|
|
90
|
-
background: '#28282d', overflow: 'hidden',
|
|
91
|
-
}}>
|
|
92
|
-
<div style={{
|
|
93
|
-
width: `${contextPct}%`, height: '100%',
|
|
94
|
-
background: ctxColor, borderRadius: 3,
|
|
95
|
-
}} />
|
|
96
|
-
</div>
|
|
97
|
-
<span style={{ color: ctxColor, minWidth: 26, textAlign: 'right' }}>
|
|
98
|
-
{contextPct}%
|
|
99
|
-
</span>
|
|
100
|
-
</div>
|
|
101
|
-
</div>
|
|
102
|
-
</HTMLContainer>
|
|
103
|
-
);
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
indicator(shape: StatuslineWidgetShape) {
|
|
107
|
-
return (
|
|
108
|
-
<rect
|
|
109
|
-
width={shape.props.w}
|
|
110
|
-
height={shape.props.h}
|
|
111
|
-
rx={10}
|
|
112
|
-
ry={10}
|
|
113
|
-
/>
|
|
114
|
-
);
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
function Row({ label, value, color }: { label: string; value: string; color: string }) {
|
|
119
|
-
return (
|
|
120
|
-
<div style={{ display: 'flex', justifyContent: 'space-between' }}>
|
|
121
|
-
<span style={{ color: '#505058' }}>{label}</span>
|
|
122
|
-
<span style={{ color, fontWeight: 500 }}>{value}</span>
|
|
123
|
-
</div>
|
|
124
|
-
);
|
|
125
|
-
}
|
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
BaseBoxShapeUtil,
|
|
3
|
-
HTMLContainer,
|
|
4
|
-
type TLBaseShape,
|
|
5
|
-
} from '@tldraw/tldraw';
|
|
6
|
-
import { SHAPE_DEFAULTS, NODE_COLORS, truncate } from './shared-styles';
|
|
7
|
-
|
|
8
|
-
export type TextResponseNodeShape = TLBaseShape<
|
|
9
|
-
'textResponseNode',
|
|
10
|
-
{
|
|
11
|
-
w: number;
|
|
12
|
-
h: number;
|
|
13
|
-
text: string;
|
|
14
|
-
}
|
|
15
|
-
>;
|
|
16
|
-
|
|
17
|
-
// @ts-expect-error — custom shape type not in tldraw's built-in TLShape union
|
|
18
|
-
export class TextResponseNodeShapeUtil extends BaseBoxShapeUtil<TextResponseNodeShape> {
|
|
19
|
-
static type = 'textResponseNode' as const;
|
|
20
|
-
|
|
21
|
-
getDefaultProps(): TextResponseNodeShape['props'] {
|
|
22
|
-
return {
|
|
23
|
-
w: 280,
|
|
24
|
-
h: 72,
|
|
25
|
-
text: '',
|
|
26
|
-
};
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
component(shape: TextResponseNodeShape) {
|
|
30
|
-
const color = NODE_COLORS.textResponse;
|
|
31
|
-
|
|
32
|
-
return (
|
|
33
|
-
<HTMLContainer>
|
|
34
|
-
<div
|
|
35
|
-
style={{
|
|
36
|
-
width: shape.props.w,
|
|
37
|
-
height: shape.props.h,
|
|
38
|
-
background: '#141419',
|
|
39
|
-
border: `1.5px solid ${color}30`,
|
|
40
|
-
borderLeft: `3px solid ${color}`,
|
|
41
|
-
borderRadius: SHAPE_DEFAULTS.borderRadius,
|
|
42
|
-
padding: SHAPE_DEFAULTS.padding,
|
|
43
|
-
fontFamily: 'Inter, system-ui, sans-serif',
|
|
44
|
-
display: 'flex',
|
|
45
|
-
flexDirection: 'column',
|
|
46
|
-
gap: 4,
|
|
47
|
-
overflow: 'hidden',
|
|
48
|
-
pointerEvents: 'all',
|
|
49
|
-
}}
|
|
50
|
-
>
|
|
51
|
-
<div style={{ display: 'flex', alignItems: 'center', gap: 6 }}>
|
|
52
|
-
<span style={{ fontSize: 12 }}>💬</span>
|
|
53
|
-
<span style={{ color, fontSize: 11, fontWeight: 600 }}>
|
|
54
|
-
Claude Response
|
|
55
|
-
</span>
|
|
56
|
-
</div>
|
|
57
|
-
<div
|
|
58
|
-
style={{
|
|
59
|
-
color: '#a0a0a8',
|
|
60
|
-
fontSize: 11,
|
|
61
|
-
lineHeight: 1.4,
|
|
62
|
-
overflow: 'hidden',
|
|
63
|
-
textOverflow: 'ellipsis',
|
|
64
|
-
display: '-webkit-box',
|
|
65
|
-
WebkitLineClamp: 2,
|
|
66
|
-
WebkitBoxOrient: 'vertical',
|
|
67
|
-
}}
|
|
68
|
-
>
|
|
69
|
-
{truncate(shape.props.text, 200)}
|
|
70
|
-
</div>
|
|
71
|
-
</div>
|
|
72
|
-
</HTMLContainer>
|
|
73
|
-
);
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
indicator(shape: TextResponseNodeShape) {
|
|
77
|
-
return (
|
|
78
|
-
<rect
|
|
79
|
-
width={shape.props.w}
|
|
80
|
-
height={shape.props.h}
|
|
81
|
-
rx={SHAPE_DEFAULTS.borderRadius}
|
|
82
|
-
ry={SHAPE_DEFAULTS.borderRadius}
|
|
83
|
-
/>
|
|
84
|
-
);
|
|
85
|
-
}
|
|
86
|
-
}
|
|
@@ -1,107 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
BaseBoxShapeUtil,
|
|
3
|
-
HTMLContainer,
|
|
4
|
-
type TLBaseShape,
|
|
5
|
-
} from '@tldraw/tldraw';
|
|
6
|
-
import { SHAPE_DEFAULTS, NODE_COLORS, getToolIcon, truncate } from './shared-styles';
|
|
7
|
-
|
|
8
|
-
export type ToolCallNodeShape = TLBaseShape<
|
|
9
|
-
'toolCallNode',
|
|
10
|
-
{
|
|
11
|
-
w: number;
|
|
12
|
-
h: number;
|
|
13
|
-
toolName: string;
|
|
14
|
-
toolInput: string;
|
|
15
|
-
status: 'pending' | 'running' | 'complete' | 'denied';
|
|
16
|
-
}
|
|
17
|
-
>;
|
|
18
|
-
|
|
19
|
-
const STATUS_COLORS: Record<string, string> = {
|
|
20
|
-
pending: '#f59e0b',
|
|
21
|
-
running: '#60a5fa',
|
|
22
|
-
complete: '#22c55e',
|
|
23
|
-
denied: '#ef4444',
|
|
24
|
-
};
|
|
25
|
-
|
|
26
|
-
// @ts-expect-error — custom shape type not in tldraw's built-in TLShape union
|
|
27
|
-
export class ToolCallNodeShapeUtil extends BaseBoxShapeUtil<ToolCallNodeShape> {
|
|
28
|
-
static type = 'toolCallNode' as const;
|
|
29
|
-
|
|
30
|
-
getDefaultProps(): ToolCallNodeShape['props'] {
|
|
31
|
-
return {
|
|
32
|
-
w: 260,
|
|
33
|
-
h: 72,
|
|
34
|
-
toolName: '',
|
|
35
|
-
toolInput: '',
|
|
36
|
-
status: 'complete',
|
|
37
|
-
};
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
component(shape: ToolCallNodeShape) {
|
|
41
|
-
const color = NODE_COLORS.toolCall;
|
|
42
|
-
const statusColor = STATUS_COLORS[shape.props.status];
|
|
43
|
-
const icon = getToolIcon(shape.props.toolName);
|
|
44
|
-
|
|
45
|
-
return (
|
|
46
|
-
<HTMLContainer>
|
|
47
|
-
<div
|
|
48
|
-
style={{
|
|
49
|
-
width: shape.props.w,
|
|
50
|
-
height: shape.props.h,
|
|
51
|
-
background: '#141419',
|
|
52
|
-
border: `1.5px solid ${color}40`,
|
|
53
|
-
borderLeft: `3px solid ${color}`,
|
|
54
|
-
borderRadius: SHAPE_DEFAULTS.borderRadius,
|
|
55
|
-
padding: SHAPE_DEFAULTS.padding,
|
|
56
|
-
fontFamily: 'Inter, system-ui, sans-serif',
|
|
57
|
-
display: 'flex',
|
|
58
|
-
flexDirection: 'column',
|
|
59
|
-
gap: 4,
|
|
60
|
-
pointerEvents: 'all',
|
|
61
|
-
}}
|
|
62
|
-
>
|
|
63
|
-
<div style={{ display: 'flex', alignItems: 'center', gap: 6 }}>
|
|
64
|
-
<span style={{ fontSize: 14 }}>{icon}</span>
|
|
65
|
-
<span style={{ color, fontSize: 12, fontWeight: 600 }}>
|
|
66
|
-
{shape.props.toolName}
|
|
67
|
-
</span>
|
|
68
|
-
<span
|
|
69
|
-
style={{
|
|
70
|
-
marginLeft: 'auto',
|
|
71
|
-
fontSize: 9,
|
|
72
|
-
color: statusColor,
|
|
73
|
-
fontWeight: 600,
|
|
74
|
-
textTransform: 'uppercase',
|
|
75
|
-
}}
|
|
76
|
-
>
|
|
77
|
-
{shape.props.status}
|
|
78
|
-
</span>
|
|
79
|
-
</div>
|
|
80
|
-
<div
|
|
81
|
-
style={{
|
|
82
|
-
color: '#787882',
|
|
83
|
-
fontSize: 10,
|
|
84
|
-
fontFamily: 'JetBrains Mono, monospace',
|
|
85
|
-
overflow: 'hidden',
|
|
86
|
-
textOverflow: 'ellipsis',
|
|
87
|
-
whiteSpace: 'nowrap',
|
|
88
|
-
}}
|
|
89
|
-
>
|
|
90
|
-
{truncate(shape.props.toolInput, 80)}
|
|
91
|
-
</div>
|
|
92
|
-
</div>
|
|
93
|
-
</HTMLContainer>
|
|
94
|
-
);
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
indicator(shape: ToolCallNodeShape) {
|
|
98
|
-
return (
|
|
99
|
-
<rect
|
|
100
|
-
width={shape.props.w}
|
|
101
|
-
height={shape.props.h}
|
|
102
|
-
rx={SHAPE_DEFAULTS.borderRadius}
|
|
103
|
-
ry={SHAPE_DEFAULTS.borderRadius}
|
|
104
|
-
/>
|
|
105
|
-
);
|
|
106
|
-
}
|
|
107
|
-
}
|
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
BaseBoxShapeUtil,
|
|
3
|
-
HTMLContainer,
|
|
4
|
-
type TLBaseShape,
|
|
5
|
-
} from '@tldraw/tldraw';
|
|
6
|
-
import { SHAPE_DEFAULTS, NODE_COLORS, truncate } from './shared-styles';
|
|
7
|
-
|
|
8
|
-
export type ToolResultNodeShape = TLBaseShape<
|
|
9
|
-
'toolResultNode',
|
|
10
|
-
{
|
|
11
|
-
w: number;
|
|
12
|
-
h: number;
|
|
13
|
-
toolName: string;
|
|
14
|
-
outputSummary: string;
|
|
15
|
-
isError: boolean;
|
|
16
|
-
}
|
|
17
|
-
>;
|
|
18
|
-
|
|
19
|
-
// @ts-expect-error — custom shape type not in tldraw's built-in TLShape union
|
|
20
|
-
export class ToolResultNodeShapeUtil extends BaseBoxShapeUtil<ToolResultNodeShape> {
|
|
21
|
-
static type = 'toolResultNode' as const;
|
|
22
|
-
|
|
23
|
-
getDefaultProps(): ToolResultNodeShape['props'] {
|
|
24
|
-
return {
|
|
25
|
-
w: 260,
|
|
26
|
-
h: 64,
|
|
27
|
-
toolName: '',
|
|
28
|
-
outputSummary: '',
|
|
29
|
-
isError: false,
|
|
30
|
-
};
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
component(shape: ToolResultNodeShape) {
|
|
34
|
-
const color = shape.props.isError ? NODE_COLORS.compaction : NODE_COLORS.toolResult;
|
|
35
|
-
|
|
36
|
-
return (
|
|
37
|
-
<HTMLContainer>
|
|
38
|
-
<div
|
|
39
|
-
style={{
|
|
40
|
-
width: shape.props.w,
|
|
41
|
-
height: shape.props.h,
|
|
42
|
-
background: '#141419',
|
|
43
|
-
border: `1.5px solid ${color}30`,
|
|
44
|
-
borderLeft: `3px solid ${color}`,
|
|
45
|
-
borderRadius: SHAPE_DEFAULTS.borderRadius,
|
|
46
|
-
padding: SHAPE_DEFAULTS.padding,
|
|
47
|
-
fontFamily: 'Inter, system-ui, sans-serif',
|
|
48
|
-
display: 'flex',
|
|
49
|
-
flexDirection: 'column',
|
|
50
|
-
gap: 4,
|
|
51
|
-
pointerEvents: 'all',
|
|
52
|
-
}}
|
|
53
|
-
>
|
|
54
|
-
<div style={{ display: 'flex', alignItems: 'center', gap: 6 }}>
|
|
55
|
-
<span style={{ fontSize: 12 }}>{shape.props.isError ? '❌' : '✅'}</span>
|
|
56
|
-
<span style={{ color, fontSize: 11, fontWeight: 600 }}>
|
|
57
|
-
{shape.props.toolName} result
|
|
58
|
-
</span>
|
|
59
|
-
</div>
|
|
60
|
-
<div
|
|
61
|
-
style={{
|
|
62
|
-
color: '#787882',
|
|
63
|
-
fontSize: 10,
|
|
64
|
-
fontFamily: 'JetBrains Mono, monospace',
|
|
65
|
-
overflow: 'hidden',
|
|
66
|
-
textOverflow: 'ellipsis',
|
|
67
|
-
whiteSpace: 'nowrap',
|
|
68
|
-
}}
|
|
69
|
-
>
|
|
70
|
-
{truncate(shape.props.outputSummary, 100)}
|
|
71
|
-
</div>
|
|
72
|
-
</div>
|
|
73
|
-
</HTMLContainer>
|
|
74
|
-
);
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
indicator(shape: ToolResultNodeShape) {
|
|
78
|
-
return (
|
|
79
|
-
<rect
|
|
80
|
-
width={shape.props.w}
|
|
81
|
-
height={shape.props.h}
|
|
82
|
-
rx={SHAPE_DEFAULTS.borderRadius}
|
|
83
|
-
ry={SHAPE_DEFAULTS.borderRadius}
|
|
84
|
-
/>
|
|
85
|
-
);
|
|
86
|
-
}
|
|
87
|
-
}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
// Shared constants and helpers for custom tldraw shapes
|
|
2
|
-
export const SHAPE_DEFAULTS = {
|
|
3
|
-
width: 260,
|
|
4
|
-
height: 72,
|
|
5
|
-
padding: 12,
|
|
6
|
-
borderRadius: 8,
|
|
7
|
-
fontSize: 12,
|
|
8
|
-
labelSize: 10,
|
|
9
|
-
};
|
|
10
|
-
|
|
11
|
-
export const NODE_COLORS: Record<string, string> = {
|
|
12
|
-
session: '#a855f7',
|
|
13
|
-
toolCall: '#f59e0b',
|
|
14
|
-
toolResult: '#22c55e',
|
|
15
|
-
textResponse: '#60a5fa',
|
|
16
|
-
compaction: '#ef4444',
|
|
17
|
-
statusline: '#ec4899',
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
export const TOOL_ICONS: Record<string, string> = {
|
|
21
|
-
Read: '📄', Write: '✏️', Edit: '🔧', Bash: '⌨️', Glob: '🔍',
|
|
22
|
-
Grep: '🔎', Task: '🤖', WebSearch: '🌐', WebFetch: '📡',
|
|
23
|
-
MultiEdit: '🔧', Skill: '⚡', AskUserQuestion: '❓',
|
|
24
|
-
EnterPlanMode: '📋', ExitPlanMode: '✅', NotebookEdit: '📓',
|
|
25
|
-
default: '🔹',
|
|
26
|
-
};
|
|
27
|
-
|
|
28
|
-
export function getToolIcon(name: string): string {
|
|
29
|
-
return TOOL_ICONS[name] || TOOL_ICONS.default;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
export function truncate(str: string, max: number): string {
|
|
33
|
-
if (str.length <= max) return str;
|
|
34
|
-
return str.slice(0, max - 1) + '…';
|
|
35
|
-
}
|
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
import { useRef, useEffect } from 'react';
|
|
2
|
-
import { useChatStore } from '../../store/chat-store';
|
|
3
|
-
import { useSessionStore } from '../../store/session-store';
|
|
4
|
-
import { useThemeStore } from '../../themes';
|
|
5
|
-
import { MessageList } from './MessageList';
|
|
6
|
-
import { InputBar } from './InputBar';
|
|
7
|
-
import { PermissionDialog } from './PermissionDialog';
|
|
8
|
-
|
|
9
|
-
export function ChatPanel() {
|
|
10
|
-
const theme = useThemeStore((s) => s.activeTheme);
|
|
11
|
-
const messages = useChatStore((s) => s.messages);
|
|
12
|
-
const streamingText = useChatStore((s) => s.streamingText);
|
|
13
|
-
const isConnected = useSessionStore((s) => s.isConnected);
|
|
14
|
-
const scrollRef = useRef<HTMLDivElement>(null);
|
|
15
|
-
|
|
16
|
-
// Auto-scroll to bottom on new messages
|
|
17
|
-
useEffect(() => {
|
|
18
|
-
if (scrollRef.current) {
|
|
19
|
-
scrollRef.current.scrollTop = scrollRef.current.scrollHeight;
|
|
20
|
-
}
|
|
21
|
-
}, [messages, streamingText]);
|
|
22
|
-
|
|
23
|
-
return (
|
|
24
|
-
<div style={{
|
|
25
|
-
flex: 1, display: 'flex', flexDirection: 'column',
|
|
26
|
-
minWidth: 400, position: 'relative',
|
|
27
|
-
}}>
|
|
28
|
-
{/* Connection indicator */}
|
|
29
|
-
<div style={{
|
|
30
|
-
padding: '4px 16px', fontSize: 11,
|
|
31
|
-
color: isConnected ? theme.colors.success : theme.colors.error,
|
|
32
|
-
background: theme.colors.bgSurface,
|
|
33
|
-
borderBottom: `1px solid ${theme.colors.border}`,
|
|
34
|
-
}}>
|
|
35
|
-
{isConnected ? '● Connected' : '○ Connecting...'}
|
|
36
|
-
</div>
|
|
37
|
-
|
|
38
|
-
{/* Messages */}
|
|
39
|
-
<div ref={scrollRef} style={{
|
|
40
|
-
flex: 1, overflowY: 'auto', padding: '12px 0',
|
|
41
|
-
}}>
|
|
42
|
-
{messages.length === 0 && !streamingText ? (
|
|
43
|
-
<WelcomeScreen />
|
|
44
|
-
) : (
|
|
45
|
-
<MessageList messages={messages} streamingText={streamingText} />
|
|
46
|
-
)}
|
|
47
|
-
</div>
|
|
48
|
-
|
|
49
|
-
{/* Permission dialogs */}
|
|
50
|
-
<PermissionDialog />
|
|
51
|
-
|
|
52
|
-
{/* Input */}
|
|
53
|
-
<InputBar />
|
|
54
|
-
</div>
|
|
55
|
-
);
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
function WelcomeScreen() {
|
|
59
|
-
const theme = useThemeStore((s) => s.activeTheme);
|
|
60
|
-
|
|
61
|
-
return (
|
|
62
|
-
<div style={{
|
|
63
|
-
display: 'flex', flexDirection: 'column', alignItems: 'center',
|
|
64
|
-
justifyContent: 'center', height: '100%', gap: 16, padding: 40,
|
|
65
|
-
}}>
|
|
66
|
-
<div style={{
|
|
67
|
-
color: theme.colors.bg, fontWeight: 800, fontSize: 28,
|
|
68
|
-
background: theme.colors.skill, borderRadius: 8, padding: '8px 16px',
|
|
69
|
-
letterSpacing: 2,
|
|
70
|
-
}}>UC</div>
|
|
71
|
-
<div style={{ marginTop: 8 }}>
|
|
72
|
-
<span style={{ color: theme.colors.skill, fontWeight: 700, fontSize: 24 }}>UpfynAI</span>
|
|
73
|
-
<span style={{ color: theme.colors.accent, fontWeight: 700, fontSize: 24 }}>-Code</span>
|
|
74
|
-
</div>
|
|
75
|
-
<p style={{ color: theme.colors.textMuted, textAlign: 'center', maxWidth: 400, fontSize: 13 }}>
|
|
76
|
-
Visual AI coding interface powered by Claude Code SDK.
|
|
77
|
-
Type a message below to start a session.
|
|
78
|
-
</p>
|
|
79
|
-
<div style={{
|
|
80
|
-
display: 'flex', gap: 8, flexWrap: 'wrap', justifyContent: 'center', marginTop: 8,
|
|
81
|
-
}}>
|
|
82
|
-
{['Read the README', 'Find all TODO comments', 'Explain the architecture'].map((s) => (
|
|
83
|
-
<button key={s} onClick={() => {
|
|
84
|
-
useChatStore.getState().setInput(s);
|
|
85
|
-
}} style={{
|
|
86
|
-
background: theme.colors.bgPanel, color: theme.colors.textMuted,
|
|
87
|
-
border: `1px solid ${theme.colors.border}`, borderRadius: 6,
|
|
88
|
-
padding: '6px 12px', fontSize: 12, cursor: 'pointer',
|
|
89
|
-
}}>
|
|
90
|
-
{s}
|
|
91
|
-
</button>
|
|
92
|
-
))}
|
|
93
|
-
</div>
|
|
94
|
-
</div>
|
|
95
|
-
);
|
|
96
|
-
}
|
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
import { useRef, useCallback } from 'react';
|
|
2
|
-
import { useChatStore } from '../../store/chat-store';
|
|
3
|
-
import { useSessionStore } from '../../store/session-store';
|
|
4
|
-
import { useThemeStore } from '../../themes';
|
|
5
|
-
import { sendPrompt } from '../../services/stream-consumer';
|
|
6
|
-
|
|
7
|
-
export function InputBar() {
|
|
8
|
-
const theme = useThemeStore((s) => s.activeTheme);
|
|
9
|
-
const input = useChatStore((s) => s.input);
|
|
10
|
-
const isWaiting = useChatStore((s) => s.isWaiting);
|
|
11
|
-
const isStreaming = useSessionStore((s) => s.isStreaming);
|
|
12
|
-
const setInput = useChatStore((s) => s.setInput);
|
|
13
|
-
const textareaRef = useRef<HTMLTextAreaElement>(null);
|
|
14
|
-
|
|
15
|
-
const handleSend = useCallback(() => {
|
|
16
|
-
const text = input.trim();
|
|
17
|
-
if (!text || isWaiting || isStreaming) return;
|
|
18
|
-
sendPrompt(text);
|
|
19
|
-
}, [input, isWaiting, isStreaming]);
|
|
20
|
-
|
|
21
|
-
const handleKeyDown = useCallback((e: React.KeyboardEvent) => {
|
|
22
|
-
if (e.key === 'Enter' && !e.shiftKey) {
|
|
23
|
-
e.preventDefault();
|
|
24
|
-
handleSend();
|
|
25
|
-
}
|
|
26
|
-
}, [handleSend]);
|
|
27
|
-
|
|
28
|
-
return (
|
|
29
|
-
<div style={{
|
|
30
|
-
padding: '8px 16px', borderTop: `1px solid ${theme.colors.border}`,
|
|
31
|
-
background: theme.colors.bgSurface, flexShrink: 0,
|
|
32
|
-
}}>
|
|
33
|
-
<div style={{
|
|
34
|
-
display: 'flex', gap: 8, alignItems: 'flex-end',
|
|
35
|
-
background: theme.colors.bgPanel, borderRadius: 8,
|
|
36
|
-
border: `1px solid ${theme.colors.border}`, padding: '8px 12px',
|
|
37
|
-
}}>
|
|
38
|
-
<textarea
|
|
39
|
-
ref={textareaRef}
|
|
40
|
-
value={input}
|
|
41
|
-
onChange={(e) => {
|
|
42
|
-
setInput(e.target.value);
|
|
43
|
-
// Auto-resize
|
|
44
|
-
e.target.style.height = 'auto';
|
|
45
|
-
e.target.style.height = Math.min(e.target.scrollHeight, 200) + 'px';
|
|
46
|
-
}}
|
|
47
|
-
onKeyDown={handleKeyDown}
|
|
48
|
-
placeholder={isWaiting ? 'Waiting for response...' : 'Message Claude Code...'}
|
|
49
|
-
disabled={isWaiting || isStreaming}
|
|
50
|
-
rows={1}
|
|
51
|
-
style={{
|
|
52
|
-
flex: 1, background: 'transparent', border: 'none', outline: 'none',
|
|
53
|
-
color: theme.colors.text, fontFamily: 'var(--font-sans)', fontSize: 14,
|
|
54
|
-
resize: 'none', lineHeight: 1.5, maxHeight: 200,
|
|
55
|
-
}}
|
|
56
|
-
/>
|
|
57
|
-
<button
|
|
58
|
-
onClick={handleSend}
|
|
59
|
-
disabled={!input.trim() || isWaiting || isStreaming}
|
|
60
|
-
style={{
|
|
61
|
-
background: input.trim() && !isWaiting ? theme.colors.accent : theme.colors.bgHover,
|
|
62
|
-
color: input.trim() && !isWaiting ? '#fff' : theme.colors.textDim,
|
|
63
|
-
border: 'none', borderRadius: 6, padding: '6px 16px',
|
|
64
|
-
fontSize: 13, fontWeight: 600, cursor: input.trim() && !isWaiting ? 'pointer' : 'default',
|
|
65
|
-
transition: 'background 0.15s',
|
|
66
|
-
flexShrink: 0,
|
|
67
|
-
}}
|
|
68
|
-
>
|
|
69
|
-
{isWaiting || isStreaming ? '...' : 'Send'}
|
|
70
|
-
</button>
|
|
71
|
-
</div>
|
|
72
|
-
<div style={{
|
|
73
|
-
display: 'flex', justifyContent: 'space-between', marginTop: 4,
|
|
74
|
-
fontSize: 11, color: theme.colors.textDim, padding: '0 4px',
|
|
75
|
-
}}>
|
|
76
|
-
<span>Enter to send, Shift+Enter for newline</span>
|
|
77
|
-
<span>Powered by Claude Code SDK</span>
|
|
78
|
-
</div>
|
|
79
|
-
</div>
|
|
80
|
-
);
|
|
81
|
-
}
|