sparkecoder 0.1.21 → 0.1.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/agent/index.d.ts +3 -3
- package/dist/agent/index.js +1361 -215
- package/dist/agent/index.js.map +1 -1
- package/dist/cli.js +2179 -349
- package/dist/cli.js.map +1 -1
- package/dist/db/index.d.ts +20 -2
- package/dist/db/index.js +97 -0
- package/dist/db/index.js.map +1 -1
- package/dist/{index-BzedNBK-.d.ts → index-BblbmG_0.d.ts} +42 -6
- package/dist/index.d.ts +6 -6
- package/dist/index.js +2165 -335
- package/dist/index.js.map +1 -1
- package/dist/{schema-CkrIadxa.d.ts → schema-D_8A4k01.d.ts} +270 -3
- package/dist/search-ybREg7F_.d.ts +254 -0
- package/dist/server/index.js +2163 -333
- package/dist/server/index.js.map +1 -1
- package/dist/tools/index.d.ts +7 -56
- package/dist/tools/index.js +894 -27
- package/dist/tools/index.js.map +1 -1
- package/package.json +5 -1
- package/web/.next/BUILD_ID +1 -1
- package/web/.next/standalone/web/.next/BUILD_ID +1 -1
- package/web/.next/standalone/web/.next/app-path-routes-manifest.json +4 -0
- package/web/.next/standalone/web/.next/build-manifest.json +7 -6
- package/web/.next/standalone/web/.next/prerender-manifest.json +99 -3
- package/web/.next/standalone/web/.next/required-server-files.json +28 -4
- package/web/.next/standalone/web/.next/routes-manifest.json +24 -0
- package/web/.next/standalone/web/.next/server/app/(main)/page/build-manifest.json +5 -4
- package/web/.next/standalone/web/.next/server/app/(main)/page.js +2 -2
- package/web/.next/standalone/web/.next/server/app/(main)/page.js.nft.json +1 -1
- package/web/.next/standalone/web/.next/server/app/(main)/page_client-reference-manifest.js +1 -1
- package/web/.next/standalone/web/.next/server/app/(main)/session/[id]/page/build-manifest.json +5 -4
- package/web/.next/standalone/web/.next/server/app/(main)/session/[id]/page.js +2 -2
- package/web/.next/standalone/web/.next/server/app/(main)/session/[id]/page.js.nft.json +1 -1
- package/web/.next/standalone/web/.next/server/app/(main)/session/[id]/page_client-reference-manifest.js +1 -1
- package/web/.next/standalone/web/.next/server/app/_global-error/page/build-manifest.json +5 -4
- package/web/.next/standalone/web/.next/server/app/_global-error/page.js +2 -2
- package/web/.next/standalone/web/.next/server/app/_global-error/page.js.nft.json +1 -1
- package/web/.next/standalone/web/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
- package/web/.next/standalone/web/.next/server/app/_global-error.html +2 -2
- package/web/.next/standalone/web/.next/server/app/_global-error.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/_not-found/page/build-manifest.json +5 -4
- package/web/.next/standalone/web/.next/server/app/_not-found/page.js +2 -2
- package/web/.next/standalone/web/.next/server/app/_not-found/page.js.nft.json +1 -1
- package/web/.next/standalone/web/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/web/.next/standalone/web/.next/server/app/_not-found.html +1 -1
- package/web/.next/standalone/web/.next/server/app/_not-found.rsc +2 -2
- package/web/.next/standalone/web/.next/server/app/_not-found.segments/_full.segment.rsc +2 -2
- package/web/.next/standalone/web/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/_not-found.segments/_index.segment.rsc +2 -2
- package/web/.next/standalone/web/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
- package/web/.next/standalone/web/.next/server/app/api/config/route.js.nft.json +1 -1
- package/web/.next/standalone/web/.next/server/app/api/health/route.js.nft.json +1 -1
- package/web/.next/standalone/web/.next/server/app/docs/installation/page/app-paths-manifest.json +3 -0
- package/web/.next/standalone/web/.next/server/app/docs/installation/page/build-manifest.json +18 -0
- package/web/.next/standalone/web/.next/server/app/docs/installation/page/next-font-manifest.json +11 -0
- package/web/.next/standalone/web/.next/server/app/docs/installation/page/react-loadable-manifest.json +1 -0
- package/web/.next/standalone/web/.next/server/app/docs/installation/page/server-reference-manifest.json +4 -0
- package/web/.next/standalone/web/.next/server/app/docs/installation/page.js +21 -0
- package/web/.next/standalone/web/.next/server/app/docs/installation/page.js.map +5 -0
- package/web/.next/standalone/web/.next/server/app/docs/installation/page.js.nft.json +1 -0
- package/web/.next/standalone/web/.next/server/app/docs/installation/page_client-reference-manifest.js +2 -0
- package/web/.next/standalone/web/.next/server/app/docs/installation.html +86 -0
- package/web/.next/standalone/web/.next/server/app/docs/installation.meta +16 -0
- package/web/.next/standalone/web/.next/server/app/docs/installation.rsc +36 -0
- package/web/.next/standalone/web/.next/server/app/docs/installation.segments/_full.segment.rsc +36 -0
- package/web/.next/standalone/web/.next/server/app/docs/installation.segments/_head.segment.rsc +6 -0
- package/web/.next/standalone/web/.next/server/app/docs/installation.segments/_index.segment.rsc +7 -0
- package/web/.next/standalone/web/.next/server/app/docs/installation.segments/_tree.segment.rsc +3 -0
- package/web/.next/standalone/web/.next/server/app/docs/installation.segments/docs/installation/__PAGE__.segment.rsc +22 -0
- package/web/.next/standalone/web/.next/server/app/docs/installation.segments/docs/installation.segment.rsc +4 -0
- package/web/.next/standalone/web/.next/server/app/docs/installation.segments/docs.segment.rsc +5 -0
- package/web/.next/standalone/web/.next/server/app/docs/page/app-paths-manifest.json +3 -0
- package/web/.next/standalone/web/.next/server/app/docs/page/build-manifest.json +18 -0
- package/web/.next/standalone/web/.next/server/app/docs/page/next-font-manifest.json +11 -0
- package/web/.next/standalone/web/.next/server/app/docs/page/react-loadable-manifest.json +1 -0
- package/web/.next/standalone/web/.next/server/app/docs/page/server-reference-manifest.json +4 -0
- package/web/.next/standalone/web/.next/server/app/docs/page.js +21 -0
- package/web/.next/standalone/web/.next/server/app/docs/page.js.map +5 -0
- package/web/.next/standalone/web/.next/server/app/docs/page.js.nft.json +1 -0
- package/web/.next/standalone/web/.next/server/app/docs/page_client-reference-manifest.js +2 -0
- package/web/.next/standalone/web/.next/server/app/docs/skills/page/app-paths-manifest.json +3 -0
- package/web/.next/standalone/web/.next/server/app/docs/skills/page/build-manifest.json +18 -0
- package/web/.next/standalone/web/.next/server/app/docs/skills/page/next-font-manifest.json +11 -0
- package/web/.next/standalone/web/.next/server/app/docs/skills/page/react-loadable-manifest.json +1 -0
- package/web/.next/standalone/web/.next/server/app/docs/skills/page/server-reference-manifest.json +4 -0
- package/web/.next/standalone/web/.next/server/app/docs/skills/page.js +21 -0
- package/web/.next/standalone/web/.next/server/app/docs/skills/page.js.map +5 -0
- package/web/.next/standalone/web/.next/server/app/docs/skills/page.js.nft.json +1 -0
- package/web/.next/standalone/web/.next/server/app/docs/skills/page_client-reference-manifest.js +2 -0
- package/web/.next/standalone/web/.next/server/app/docs/skills.html +268 -0
- package/web/.next/standalone/web/.next/server/app/docs/skills.meta +16 -0
- package/web/.next/standalone/web/.next/server/app/docs/skills.rsc +82 -0
- package/web/.next/standalone/web/.next/server/app/docs/skills.segments/_full.segment.rsc +82 -0
- package/web/.next/standalone/web/.next/server/app/docs/skills.segments/_head.segment.rsc +6 -0
- package/web/.next/standalone/web/.next/server/app/docs/skills.segments/_index.segment.rsc +7 -0
- package/web/.next/standalone/web/.next/server/app/docs/skills.segments/_tree.segment.rsc +3 -0
- package/web/.next/standalone/web/.next/server/app/docs/skills.segments/docs/skills/__PAGE__.segment.rsc +66 -0
- package/web/.next/standalone/web/.next/server/app/docs/skills.segments/docs/skills.segment.rsc +4 -0
- package/web/.next/standalone/web/.next/server/app/docs/skills.segments/docs.segment.rsc +5 -0
- package/web/.next/standalone/web/.next/server/app/docs/tools/page/app-paths-manifest.json +3 -0
- package/web/.next/standalone/web/.next/server/app/docs/tools/page/build-manifest.json +18 -0
- package/web/.next/standalone/web/.next/server/app/docs/tools/page/next-font-manifest.json +11 -0
- package/web/.next/standalone/web/.next/server/app/docs/tools/page/react-loadable-manifest.json +1 -0
- package/web/.next/standalone/web/.next/server/app/docs/tools/page/server-reference-manifest.json +4 -0
- package/web/.next/standalone/web/.next/server/app/docs/tools/page.js +21 -0
- package/web/.next/standalone/web/.next/server/app/docs/tools/page.js.map +5 -0
- package/web/.next/standalone/web/.next/server/app/docs/tools/page.js.nft.json +1 -0
- package/web/.next/standalone/web/.next/server/app/docs/tools/page_client-reference-manifest.js +2 -0
- package/web/.next/standalone/web/.next/server/app/docs/tools.html +242 -0
- package/web/.next/standalone/web/.next/server/app/docs/tools.meta +16 -0
- package/web/.next/standalone/web/.next/server/app/docs/tools.rsc +87 -0
- package/web/.next/standalone/web/.next/server/app/docs/tools.segments/_full.segment.rsc +87 -0
- package/web/.next/standalone/web/.next/server/app/docs/tools.segments/_head.segment.rsc +6 -0
- package/web/.next/standalone/web/.next/server/app/docs/tools.segments/_index.segment.rsc +7 -0
- package/web/.next/standalone/web/.next/server/app/docs/tools.segments/_tree.segment.rsc +3 -0
- package/web/.next/standalone/web/.next/server/app/docs/tools.segments/docs/tools/__PAGE__.segment.rsc +72 -0
- package/web/.next/standalone/web/.next/server/app/docs/tools.segments/docs/tools.segment.rsc +4 -0
- package/web/.next/standalone/web/.next/server/app/docs/tools.segments/docs.segment.rsc +5 -0
- package/web/.next/standalone/web/.next/server/app/docs.html +74 -0
- package/web/.next/standalone/web/.next/server/app/docs.meta +15 -0
- package/web/.next/standalone/web/.next/server/app/docs.rsc +34 -0
- package/web/.next/standalone/web/.next/server/app/docs.segments/_full.segment.rsc +34 -0
- package/web/.next/standalone/web/.next/server/app/docs.segments/_head.segment.rsc +6 -0
- package/web/.next/standalone/web/.next/server/app/docs.segments/_index.segment.rsc +7 -0
- package/web/.next/standalone/web/.next/server/app/docs.segments/_tree.segment.rsc +3 -0
- package/web/.next/standalone/web/.next/server/app/docs.segments/docs/__PAGE__.segment.rsc +20 -0
- package/web/.next/standalone/web/.next/server/app/docs.segments/docs.segment.rsc +5 -0
- package/web/.next/standalone/web/.next/server/app/index.html +1 -1
- package/web/.next/standalone/web/.next/server/app/index.rsc +4 -4
- package/web/.next/standalone/web/.next/server/app/index.segments/!KG1haW4p/__PAGE__.segment.rsc +2 -2
- package/web/.next/standalone/web/.next/server/app/index.segments/!KG1haW4p.segment.rsc +2 -2
- package/web/.next/standalone/web/.next/server/app/index.segments/_full.segment.rsc +4 -4
- package/web/.next/standalone/web/.next/server/app/index.segments/_head.segment.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/index.segments/_index.segment.rsc +2 -2
- package/web/.next/standalone/web/.next/server/app/index.segments/_tree.segment.rsc +2 -2
- package/web/.next/standalone/web/.next/server/app-paths-manifest.json +4 -0
- package/web/.next/standalone/web/.next/server/chunks/ssr/{2374f_378282b1._.js → 2374f_244589df._.js} +1 -1
- package/web/.next/standalone/web/.next/server/chunks/ssr/{2374f_5de336d2._.js → 2374f_41a27541._.js} +1 -1
- package/web/.next/standalone/web/.next/server/chunks/ssr/{2374f_30f9df13._.js → 2374f_47c9e2d5._.js} +1 -1
- package/web/.next/standalone/web/.next/server/chunks/ssr/{2374f_d94c2b70._.js → 2374f_4bf2df9d._.js} +1 -1
- package/web/.next/standalone/web/.next/server/chunks/ssr/2374f_663d1038._.js +3 -0
- package/web/.next/standalone/web/.next/server/chunks/ssr/2374f_954e49c0._.js +3 -0
- package/web/.next/standalone/web/.next/server/chunks/ssr/{2374f_1d78db71._.js → 2374f_c33b095a._.js} +1 -1
- package/web/.next/standalone/web/.next/server/chunks/ssr/{2374f_bbc99511._.js → 2374f_fa61fbb2._.js} +1 -1
- package/web/.next/standalone/web/.next/server/chunks/ssr/{2374f_8825dcc9._.js → 2374f_fb82ac0d._.js} +1 -1
- package/web/.next/standalone/web/.next/server/chunks/ssr/{web_96bca05b._.js → 2374f_next_dist_bbe64674._.js} +2 -2
- package/web/.next/standalone/web/.next/server/chunks/ssr/{[root-of-the-server]__7f04455b._.js → [root-of-the-server]__1e06ddf7._.js} +2 -2
- package/web/.next/standalone/web/.next/server/chunks/ssr/[root-of-the-server]__2b151e1c._.js +3 -0
- package/web/.next/standalone/web/.next/server/chunks/ssr/[root-of-the-server]__2dbf511a._.js +9 -0
- package/web/.next/standalone/web/.next/server/chunks/ssr/[root-of-the-server]__397fadd4._.js +3 -0
- package/web/.next/standalone/web/.next/server/chunks/ssr/[root-of-the-server]__44bd8bd1._.js +3 -0
- package/web/.next/standalone/web/.next/server/chunks/ssr/[root-of-the-server]__70cecda8._.js +3 -0
- package/web/.next/standalone/web/.next/server/chunks/ssr/[root-of-the-server]__9fdf9974._.js +3 -0
- package/web/.next/standalone/web/.next/server/chunks/ssr/{[root-of-the-server]__f18f92f4._.js → [root-of-the-server]__b050bb8f._.js} +2 -2
- package/web/.next/standalone/web/.next/server/chunks/ssr/[root-of-the-server]__d3034cd2._.js +3 -0
- package/web/.next/standalone/web/.next/server/chunks/ssr/{[root-of-the-server]__c3a1e22c._.js → [root-of-the-server]__ef2713cf._.js} +2 -2
- package/web/.next/standalone/web/.next/server/chunks/ssr/[root-of-the-server]__f764bebe._.js +3 -0
- package/web/.next/standalone/web/.next/server/chunks/ssr/web_046bf7db._.js +3 -0
- package/web/.next/standalone/web/.next/server/chunks/ssr/web_656c1e45._.js +7 -0
- package/web/.next/standalone/web/.next/server/chunks/ssr/web_76ccf09f._.js +8 -0
- package/web/.next/standalone/web/.next/server/chunks/ssr/web__next-internal_server_app_docs_installation_page_actions_52cc0648.js +3 -0
- package/web/.next/standalone/web/.next/server/chunks/ssr/web__next-internal_server_app_docs_page_actions_4fe77da8.js +3 -0
- package/web/.next/standalone/web/.next/server/chunks/ssr/web__next-internal_server_app_docs_skills_page_actions_251df2e1.js +3 -0
- package/web/.next/standalone/web/.next/server/chunks/ssr/web__next-internal_server_app_docs_tools_page_actions_3e6382b0.js +3 -0
- package/web/.next/standalone/web/.next/server/chunks/ssr/web_a565dc94._.js +4 -0
- package/web/.next/standalone/web/.next/server/chunks/ssr/web_b1cce0b7._.js +4 -0
- package/web/.next/standalone/web/.next/server/chunks/ssr/web_b42ed1be._.js +3 -0
- package/web/.next/standalone/web/.next/server/chunks/ssr/web_c0c2bee4._.js +4 -0
- package/web/.next/standalone/web/.next/server/chunks/ssr/web_eea9c122._.js +3 -0
- package/web/.next/standalone/web/.next/server/chunks/ssr/web_ff00a5c3._.js +4 -0
- package/web/.next/standalone/web/.next/server/chunks/ssr/web_src_app_(main)_layout_tsx_453f6492._.js +3 -0
- package/web/.next/standalone/web/.next/server/chunks/ssr/web_src_app_(main)_page_tsx_5ac4794b._.js +3 -0
- package/web/.next/standalone/web/.next/server/middleware-build-manifest.js +5 -4
- package/web/.next/standalone/web/.next/server/next-font-manifest.js +1 -1
- package/web/.next/standalone/web/.next/server/next-font-manifest.json +16 -0
- package/web/.next/standalone/web/.next/server/pages/404.html +1 -1
- package/web/.next/standalone/web/.next/server/pages/500.html +2 -2
- package/web/.next/standalone/web/.next/server/server-reference-manifest.js +1 -1
- package/web/.next/standalone/web/.next/server/server-reference-manifest.json +1 -1
- package/web/.next/standalone/web/.next/static/chunks/0cc382a66266188e.js +7 -0
- package/web/.next/standalone/web/.next/static/chunks/0fda34e553582102.js +1 -0
- package/web/.next/standalone/web/.next/static/{static/chunks/5ec82ce8f3aabaf0.js → chunks/6407c045dfc908fe.js} +3 -3
- package/web/.next/standalone/web/.next/static/chunks/651e187cc15d66de.js +1 -0
- package/web/.next/standalone/web/.next/static/chunks/862ced58ce21a270.js +4 -0
- package/web/.next/standalone/web/.next/static/chunks/89bc21c0443670f4.js +1 -0
- package/web/.next/standalone/web/.next/static/chunks/8f4edf22ededc29b.js +7 -0
- package/web/.next/standalone/web/.next/static/chunks/ad6b9dbb257d62cc.js +1 -0
- package/web/.next/standalone/web/.next/static/chunks/af22745850132107.css +1 -0
- package/web/.next/standalone/web/.next/static/chunks/b9ad1584d4e11d12.js +1 -0
- package/web/.next/standalone/web/.next/static/chunks/db9b22c844a35e20.js +5 -0
- package/web/.next/standalone/web/.next/static/chunks/turbopack-597558bb7b6982f6.js +4 -0
- package/web/.next/standalone/web/.next/static/static/chunks/0cc382a66266188e.js +7 -0
- package/web/.next/standalone/web/.next/static/static/chunks/0fda34e553582102.js +1 -0
- package/web/.next/{static/chunks/5ec82ce8f3aabaf0.js → standalone/web/.next/static/static/chunks/6407c045dfc908fe.js} +3 -3
- package/web/.next/standalone/web/.next/static/static/chunks/651e187cc15d66de.js +1 -0
- package/web/.next/standalone/web/.next/static/static/chunks/862ced58ce21a270.js +4 -0
- package/web/.next/standalone/web/.next/static/static/chunks/89bc21c0443670f4.js +1 -0
- package/web/.next/standalone/web/.next/static/static/chunks/8f4edf22ededc29b.js +7 -0
- package/web/.next/standalone/web/.next/static/static/chunks/ad6b9dbb257d62cc.js +1 -0
- package/web/.next/standalone/web/.next/static/static/chunks/af22745850132107.css +1 -0
- package/web/.next/standalone/web/.next/static/static/chunks/b9ad1584d4e11d12.js +1 -0
- package/web/.next/standalone/web/.next/static/static/chunks/db9b22c844a35e20.js +5 -0
- package/web/.next/standalone/web/.next/static/static/chunks/turbopack-597558bb7b6982f6.js +4 -0
- package/web/.next/standalone/web/mdx-components.tsx +119 -0
- package/web/.next/standalone/web/next.config.ts +15 -1
- package/web/.next/standalone/web/package-lock.json +559 -4
- package/web/.next/standalone/web/package.json +4 -0
- package/web/.next/standalone/web/runtime-config.json +1 -1
- package/web/.next/standalone/web/server.js +1 -1
- package/web/.next/standalone/web/src/app/(main)/page.tsx +127 -5
- package/web/.next/standalone/web/src/app/docs/installation/page.mdx +128 -0
- package/web/.next/standalone/web/src/app/docs/layout.tsx +74 -0
- package/web/.next/standalone/web/src/app/docs/page.mdx +90 -0
- package/web/.next/standalone/web/src/app/docs/skills/page.mdx +334 -0
- package/web/.next/standalone/web/src/app/docs/tools/page.mdx +300 -0
- package/web/.next/standalone/web/src/components/ai-elements/mention-input.tsx +809 -0
- package/web/.next/standalone/web/src/components/ai-elements/search-tool.tsx +400 -0
- package/web/.next/standalone/web/src/components/ai-elements/speech-input.tsx +89 -36
- package/web/.next/standalone/web/src/components/ai-elements/subagent-modal.tsx +275 -0
- package/web/.next/standalone/web/src/components/ai-elements/write-file-tool.tsx +19 -5
- package/web/.next/standalone/web/src/components/chat-interface.tsx +820 -50
- package/web/.next/standalone/web/src/hooks/use-workspace-files.ts +108 -0
- package/web/.next/standalone/web/src/lib/api.ts +223 -6
- package/web/.next/static/chunks/0cc382a66266188e.js +7 -0
- package/web/.next/static/chunks/0fda34e553582102.js +1 -0
- package/web/.next/{standalone/web/.next/static/chunks/5ec82ce8f3aabaf0.js → static/chunks/6407c045dfc908fe.js} +3 -3
- package/web/.next/static/chunks/651e187cc15d66de.js +1 -0
- package/web/.next/static/chunks/862ced58ce21a270.js +4 -0
- package/web/.next/static/chunks/89bc21c0443670f4.js +1 -0
- package/web/.next/static/chunks/8f4edf22ededc29b.js +7 -0
- package/web/.next/static/chunks/ad6b9dbb257d62cc.js +1 -0
- package/web/.next/static/chunks/af22745850132107.css +1 -0
- package/web/.next/static/chunks/b9ad1584d4e11d12.js +1 -0
- package/web/.next/static/chunks/db9b22c844a35e20.js +5 -0
- package/web/.next/static/chunks/turbopack-597558bb7b6982f6.js +4 -0
- package/web/package.json +4 -0
- package/dist/bash-CGAqW7HR.d.ts +0 -80
- package/web/.next/standalone/web/.next/server/chunks/ssr/2374f_9bf3c7f3._.js +0 -3
- package/web/.next/standalone/web/.next/server/chunks/ssr/[root-of-the-server]__0f6b5fa7._.js +0 -3
- package/web/.next/standalone/web/.next/server/chunks/ssr/[root-of-the-server]__513c6b45._.js +0 -3
- package/web/.next/standalone/web/.next/server/chunks/ssr/[root-of-the-server]__a984d933._.js +0 -9
- package/web/.next/standalone/web/.next/server/chunks/ssr/[root-of-the-server]__de58a952._.js +0 -3
- package/web/.next/standalone/web/.next/server/chunks/ssr/web_19b6934c._.js +0 -8
- package/web/.next/standalone/web/.next/server/chunks/ssr/web_d7d3e40d._.js +0 -7
- package/web/.next/standalone/web/.next/server/chunks/ssr/web_e6034803._.js +0 -3
- package/web/.next/standalone/web/.next/static/chunks/03d4169891280e04.js +0 -7
- package/web/.next/standalone/web/.next/static/chunks/2d5da0cfc011b8d9.js +0 -1
- package/web/.next/standalone/web/.next/static/chunks/634fd97fab9ed4e4.js +0 -4
- package/web/.next/standalone/web/.next/static/chunks/77e4bf0421481629.js +0 -1
- package/web/.next/standalone/web/.next/static/chunks/a86053f0894587f2.js +0 -7
- package/web/.next/standalone/web/.next/static/chunks/beb9625c4a470042.js +0 -1
- package/web/.next/standalone/web/.next/static/chunks/c2244168e74b8c78.js +0 -1
- package/web/.next/standalone/web/.next/static/chunks/c81c1aec4369c77f.js +0 -5
- package/web/.next/standalone/web/.next/static/chunks/d0a69c59b1c0d99c.css +0 -1
- package/web/.next/standalone/web/.next/static/chunks/turbopack-54bc7d566cd2d105.js +0 -4
- package/web/.next/standalone/web/.next/static/static/chunks/03d4169891280e04.js +0 -7
- package/web/.next/standalone/web/.next/static/static/chunks/2d5da0cfc011b8d9.js +0 -1
- package/web/.next/standalone/web/.next/static/static/chunks/634fd97fab9ed4e4.js +0 -4
- package/web/.next/standalone/web/.next/static/static/chunks/77e4bf0421481629.js +0 -1
- package/web/.next/standalone/web/.next/static/static/chunks/a86053f0894587f2.js +0 -7
- package/web/.next/standalone/web/.next/static/static/chunks/beb9625c4a470042.js +0 -1
- package/web/.next/standalone/web/.next/static/static/chunks/c2244168e74b8c78.js +0 -1
- package/web/.next/standalone/web/.next/static/static/chunks/c81c1aec4369c77f.js +0 -5
- package/web/.next/standalone/web/.next/static/static/chunks/d0a69c59b1c0d99c.css +0 -1
- package/web/.next/standalone/web/.next/static/static/chunks/turbopack-54bc7d566cd2d105.js +0 -4
- package/web/.next/static/chunks/03d4169891280e04.js +0 -7
- package/web/.next/static/chunks/2d5da0cfc011b8d9.js +0 -1
- package/web/.next/static/chunks/634fd97fab9ed4e4.js +0 -4
- package/web/.next/static/chunks/77e4bf0421481629.js +0 -1
- package/web/.next/static/chunks/a86053f0894587f2.js +0 -7
- package/web/.next/static/chunks/beb9625c4a470042.js +0 -1
- package/web/.next/static/chunks/c2244168e74b8c78.js +0 -1
- package/web/.next/static/chunks/c81c1aec4369c77f.js +0 -5
- package/web/.next/static/chunks/d0a69c59b1c0d99c.css +0 -1
- package/web/.next/static/chunks/turbopack-54bc7d566cd2d105.js +0 -4
- /package/web/.next/standalone/web/.next/static/{kABnAk0Y1tlcrUKDlM8UT → static/uXbuwS0U7fRElucaXbKUe}/_buildManifest.js +0 -0
- /package/web/.next/standalone/web/.next/static/{kABnAk0Y1tlcrUKDlM8UT → static/uXbuwS0U7fRElucaXbKUe}/_clientMiddlewareManifest.json +0 -0
- /package/web/.next/standalone/web/.next/static/{kABnAk0Y1tlcrUKDlM8UT → static/uXbuwS0U7fRElucaXbKUe}/_ssgManifest.js +0 -0
- /package/web/.next/standalone/web/.next/static/{static/kABnAk0Y1tlcrUKDlM8UT → uXbuwS0U7fRElucaXbKUe}/_buildManifest.js +0 -0
- /package/web/.next/standalone/web/.next/static/{static/kABnAk0Y1tlcrUKDlM8UT → uXbuwS0U7fRElucaXbKUe}/_clientMiddlewareManifest.json +0 -0
- /package/web/.next/standalone/web/.next/static/{static/kABnAk0Y1tlcrUKDlM8UT → uXbuwS0U7fRElucaXbKUe}/_ssgManifest.js +0 -0
- /package/web/.next/static/{kABnAk0Y1tlcrUKDlM8UT → uXbuwS0U7fRElucaXbKUe}/_buildManifest.js +0 -0
- /package/web/.next/static/{kABnAk0Y1tlcrUKDlM8UT → uXbuwS0U7fRElucaXbKUe}/_clientMiddlewareManifest.json +0 -0
- /package/web/.next/static/{kABnAk0Y1tlcrUKDlM8UT → uXbuwS0U7fRElucaXbKUe}/_ssgManifest.js +0 -0
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import { useState, useEffect, useCallback, useRef } from 'react';
|
|
2
|
+
import { getWorkspaceFiles, type WorkspaceFile } from '@/lib/api';
|
|
3
|
+
|
|
4
|
+
interface UseWorkspaceFilesOptions {
|
|
5
|
+
sessionId: string;
|
|
6
|
+
query: string;
|
|
7
|
+
enabled?: boolean;
|
|
8
|
+
limit?: number;
|
|
9
|
+
debounceMs?: number;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
interface UseWorkspaceFilesResult {
|
|
13
|
+
files: WorkspaceFile[];
|
|
14
|
+
isLoading: boolean;
|
|
15
|
+
error: string | null;
|
|
16
|
+
workingDirectory: string | null;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Hook to fetch workspace files for @ mentions with debouncing
|
|
21
|
+
*/
|
|
22
|
+
export function useWorkspaceFiles({
|
|
23
|
+
sessionId,
|
|
24
|
+
query,
|
|
25
|
+
enabled = true,
|
|
26
|
+
limit = 20,
|
|
27
|
+
debounceMs = 150,
|
|
28
|
+
}: UseWorkspaceFilesOptions): UseWorkspaceFilesResult {
|
|
29
|
+
const [files, setFiles] = useState<WorkspaceFile[]>([]);
|
|
30
|
+
const [isLoading, setIsLoading] = useState(false);
|
|
31
|
+
const [error, setError] = useState<string | null>(null);
|
|
32
|
+
const [workingDirectory, setWorkingDirectory] = useState<string | null>(null);
|
|
33
|
+
|
|
34
|
+
const timeoutRef = useRef<NodeJS.Timeout | null>(null);
|
|
35
|
+
const abortControllerRef = useRef<AbortController | null>(null);
|
|
36
|
+
|
|
37
|
+
const fetchFiles = useCallback(async (searchQuery: string) => {
|
|
38
|
+
// Cancel any previous request
|
|
39
|
+
if (abortControllerRef.current) {
|
|
40
|
+
abortControllerRef.current.abort();
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
abortControllerRef.current = new AbortController();
|
|
44
|
+
|
|
45
|
+
try {
|
|
46
|
+
setIsLoading(true);
|
|
47
|
+
setError(null);
|
|
48
|
+
|
|
49
|
+
const response = await getWorkspaceFiles(sessionId, searchQuery, limit);
|
|
50
|
+
|
|
51
|
+
setFiles(response.files);
|
|
52
|
+
setWorkingDirectory(response.workingDirectory);
|
|
53
|
+
|
|
54
|
+
if (response.error) {
|
|
55
|
+
setError(response.error);
|
|
56
|
+
}
|
|
57
|
+
} catch (err) {
|
|
58
|
+
if (err instanceof Error && err.name !== 'AbortError') {
|
|
59
|
+
setError(err.message);
|
|
60
|
+
setFiles([]);
|
|
61
|
+
}
|
|
62
|
+
} finally {
|
|
63
|
+
setIsLoading(false);
|
|
64
|
+
}
|
|
65
|
+
}, [sessionId, limit]);
|
|
66
|
+
|
|
67
|
+
useEffect(() => {
|
|
68
|
+
if (!enabled || !sessionId) {
|
|
69
|
+
setFiles([]);
|
|
70
|
+
return;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
// Clear previous timeout
|
|
74
|
+
if (timeoutRef.current) {
|
|
75
|
+
clearTimeout(timeoutRef.current);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
// Debounce the fetch
|
|
79
|
+
timeoutRef.current = setTimeout(() => {
|
|
80
|
+
fetchFiles(query);
|
|
81
|
+
}, debounceMs);
|
|
82
|
+
|
|
83
|
+
return () => {
|
|
84
|
+
if (timeoutRef.current) {
|
|
85
|
+
clearTimeout(timeoutRef.current);
|
|
86
|
+
}
|
|
87
|
+
};
|
|
88
|
+
}, [query, enabled, sessionId, debounceMs, fetchFiles]);
|
|
89
|
+
|
|
90
|
+
// Cleanup on unmount
|
|
91
|
+
useEffect(() => {
|
|
92
|
+
return () => {
|
|
93
|
+
if (abortControllerRef.current) {
|
|
94
|
+
abortControllerRef.current.abort();
|
|
95
|
+
}
|
|
96
|
+
if (timeoutRef.current) {
|
|
97
|
+
clearTimeout(timeoutRef.current);
|
|
98
|
+
}
|
|
99
|
+
};
|
|
100
|
+
}, []);
|
|
101
|
+
|
|
102
|
+
return {
|
|
103
|
+
files,
|
|
104
|
+
isLoading,
|
|
105
|
+
error,
|
|
106
|
+
workingDirectory,
|
|
107
|
+
};
|
|
108
|
+
}
|
|
@@ -49,7 +49,24 @@ export interface ToolResultContentPart {
|
|
|
49
49
|
result?: unknown; // AI SDK uses 'result' in some places
|
|
50
50
|
}
|
|
51
51
|
|
|
52
|
-
|
|
52
|
+
// User message content parts (for multimodal messages)
|
|
53
|
+
export interface ImageContentPart {
|
|
54
|
+
type: 'image';
|
|
55
|
+
image: string; // base64 data URL or raw base64
|
|
56
|
+
mediaType?: string;
|
|
57
|
+
filename?: string; // Original filename for context
|
|
58
|
+
savedPath?: string; // Path where file was saved on disk
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export interface FileContentPart {
|
|
62
|
+
type: 'file';
|
|
63
|
+
data: string; // base64 data
|
|
64
|
+
mediaType?: string;
|
|
65
|
+
filename?: string;
|
|
66
|
+
savedPath?: string; // Path where file was saved on disk
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export type ContentPart = TextContentPart | ReasoningContentPart | ToolCallContentPart | ToolResultContentPart | ImageContentPart | FileContentPart;
|
|
53
70
|
|
|
54
71
|
// AI SDK ModelMessage format (as returned by backend)
|
|
55
72
|
export interface Message {
|
|
@@ -235,6 +252,7 @@ function parseSSEStream(
|
|
|
235
252
|
|
|
236
253
|
const decoder = new TextDecoder();
|
|
237
254
|
let buffer = '';
|
|
255
|
+
const shouldDebugSSE = typeof window !== 'undefined' && (window as any).__sparkeSseDebug === true;
|
|
238
256
|
|
|
239
257
|
try {
|
|
240
258
|
while (true) {
|
|
@@ -257,10 +275,34 @@ function parseSSEStream(
|
|
|
257
275
|
if (event.type === 'data-stream-id' && onStreamId) {
|
|
258
276
|
onStreamId(event.streamId);
|
|
259
277
|
}
|
|
260
|
-
|
|
278
|
+
|
|
279
|
+
if (shouldDebugSSE && typeof window !== 'undefined') {
|
|
280
|
+
window.dispatchEvent(new CustomEvent('sparke:sse-event', {
|
|
281
|
+
detail: {
|
|
282
|
+
type: event.type,
|
|
283
|
+
size: data.length,
|
|
284
|
+
label: typeof event.label === 'string' ? event.label : undefined,
|
|
285
|
+
toolName: typeof event.toolName === 'string' ? event.toolName : undefined,
|
|
286
|
+
},
|
|
287
|
+
}));
|
|
288
|
+
}
|
|
289
|
+
|
|
261
290
|
onEvent(event as SSEEvent);
|
|
262
|
-
} catch {
|
|
263
|
-
|
|
291
|
+
} catch (err) {
|
|
292
|
+
console.warn('[SSE] Failed to parse event JSON', {
|
|
293
|
+
error: err instanceof Error ? err.message : String(err),
|
|
294
|
+
dataLength: data.length,
|
|
295
|
+
preview: data.slice(0, 200),
|
|
296
|
+
});
|
|
297
|
+
if (shouldDebugSSE && typeof window !== 'undefined') {
|
|
298
|
+
window.dispatchEvent(new CustomEvent('sparke:sse-parse-error', {
|
|
299
|
+
detail: {
|
|
300
|
+
error: err instanceof Error ? err.message : String(err),
|
|
301
|
+
size: data.length,
|
|
302
|
+
preview: data.slice(0, 200),
|
|
303
|
+
},
|
|
304
|
+
}));
|
|
305
|
+
}
|
|
264
306
|
}
|
|
265
307
|
}
|
|
266
308
|
}
|
|
@@ -272,6 +314,14 @@ function parseSSEStream(
|
|
|
272
314
|
});
|
|
273
315
|
}
|
|
274
316
|
|
|
317
|
+
// Attachment type for runAgent
|
|
318
|
+
export interface RunAgentAttachment {
|
|
319
|
+
type: 'image' | 'file';
|
|
320
|
+
data: string; // base64 data URL
|
|
321
|
+
mediaType?: string;
|
|
322
|
+
filename?: string;
|
|
323
|
+
}
|
|
324
|
+
|
|
275
325
|
// Streaming run with resumable stream support
|
|
276
326
|
export function runAgent(
|
|
277
327
|
sessionId: string,
|
|
@@ -279,14 +329,20 @@ export function runAgent(
|
|
|
279
329
|
onEvent: (event: SSEEvent) => void,
|
|
280
330
|
options?: {
|
|
281
331
|
onStreamId?: (streamId: string) => void;
|
|
332
|
+
attachments?: RunAgentAttachment[];
|
|
282
333
|
}
|
|
283
334
|
): () => void {
|
|
284
335
|
const controller = new AbortController();
|
|
285
336
|
|
|
337
|
+
const body: { prompt: string; attachments?: RunAgentAttachment[] } = { prompt };
|
|
338
|
+
if (options?.attachments && options.attachments.length > 0) {
|
|
339
|
+
body.attachments = options.attachments;
|
|
340
|
+
}
|
|
341
|
+
|
|
286
342
|
fetch(`${getApiBase()}/agents/${sessionId}/run`, {
|
|
287
343
|
method: 'POST',
|
|
288
344
|
headers: { 'Content-Type': 'application/json' },
|
|
289
|
-
body: JSON.stringify(
|
|
345
|
+
body: JSON.stringify(body),
|
|
290
346
|
signal: controller.signal,
|
|
291
347
|
})
|
|
292
348
|
.then(async (response) => {
|
|
@@ -360,7 +416,7 @@ export type SSEEvent =
|
|
|
360
416
|
| { type: 'tool-input-delta'; toolCallId: string; argsTextDelta: string }
|
|
361
417
|
| { type: 'tool-input-available'; toolCallId: string; toolName: string; input: unknown }
|
|
362
418
|
| { type: 'tool-output-available'; toolCallId: string; output: unknown }
|
|
363
|
-
| { type: 'tool-progress'; toolName: string; data:
|
|
419
|
+
| { type: 'tool-progress'; toolName: string; data: Record<string, unknown> }
|
|
364
420
|
| { type: 'data-approval-required'; data: PendingApproval }
|
|
365
421
|
| { type: 'data-stream-id'; streamId: string }
|
|
366
422
|
| { type: 'data-session'; data: { id: string; name: string; workingDirectory: string; model: string } }
|
|
@@ -447,6 +503,25 @@ export function streamTerminal(
|
|
|
447
503
|
return () => controller.abort();
|
|
448
504
|
}
|
|
449
505
|
|
|
506
|
+
// ============================================
|
|
507
|
+
// Version Check
|
|
508
|
+
// ============================================
|
|
509
|
+
|
|
510
|
+
export interface VersionInfo {
|
|
511
|
+
packageName: string;
|
|
512
|
+
currentVersion: string;
|
|
513
|
+
latestVersion: string;
|
|
514
|
+
updateAvailable: boolean;
|
|
515
|
+
updateCommand: string | null;
|
|
516
|
+
error?: string;
|
|
517
|
+
timestamp: string;
|
|
518
|
+
}
|
|
519
|
+
|
|
520
|
+
export async function checkVersion(): Promise<VersionInfo> {
|
|
521
|
+
const res = await fetch(`${getApiBase()}/health/version`);
|
|
522
|
+
return res.json();
|
|
523
|
+
}
|
|
524
|
+
|
|
450
525
|
// ============================================
|
|
451
526
|
// API Key Management
|
|
452
527
|
// ============================================
|
|
@@ -566,3 +641,145 @@ export async function getSessionDiff(sessionId: string): Promise<SessionDiffResp
|
|
|
566
641
|
}
|
|
567
642
|
return res.json();
|
|
568
643
|
}
|
|
644
|
+
|
|
645
|
+
// ============================================
|
|
646
|
+
// Attachments API
|
|
647
|
+
// ============================================
|
|
648
|
+
|
|
649
|
+
export interface Attachment {
|
|
650
|
+
id: string;
|
|
651
|
+
filename: string;
|
|
652
|
+
storedAs: string;
|
|
653
|
+
path: string;
|
|
654
|
+
size: number;
|
|
655
|
+
mediaType?: string;
|
|
656
|
+
sessionId: string;
|
|
657
|
+
}
|
|
658
|
+
|
|
659
|
+
export interface AttachmentsResponse {
|
|
660
|
+
sessionId: string;
|
|
661
|
+
attachments: Array<{
|
|
662
|
+
id: string;
|
|
663
|
+
filename: string;
|
|
664
|
+
path: string;
|
|
665
|
+
size: number;
|
|
666
|
+
createdAt: string;
|
|
667
|
+
}>;
|
|
668
|
+
count: number;
|
|
669
|
+
}
|
|
670
|
+
|
|
671
|
+
/**
|
|
672
|
+
* Upload an attachment for a session
|
|
673
|
+
* Accepts either a File object or base64 data
|
|
674
|
+
*/
|
|
675
|
+
export async function uploadAttachment(
|
|
676
|
+
sessionId: string,
|
|
677
|
+
file: File
|
|
678
|
+
): Promise<Attachment> {
|
|
679
|
+
const formData = new FormData();
|
|
680
|
+
formData.append('file', file);
|
|
681
|
+
|
|
682
|
+
const res = await fetch(`${getApiBase()}/sessions/${sessionId}/attachments`, {
|
|
683
|
+
method: 'POST',
|
|
684
|
+
body: formData,
|
|
685
|
+
});
|
|
686
|
+
|
|
687
|
+
if (!res.ok) {
|
|
688
|
+
const error = await res.json().catch(() => ({ error: 'Upload failed' }));
|
|
689
|
+
throw new Error(error.error || `Failed to upload: ${res.statusText}`);
|
|
690
|
+
}
|
|
691
|
+
|
|
692
|
+
return res.json();
|
|
693
|
+
}
|
|
694
|
+
|
|
695
|
+
/**
|
|
696
|
+
* Upload an attachment from a data URL (base64)
|
|
697
|
+
*/
|
|
698
|
+
export async function uploadAttachmentFromDataUrl(
|
|
699
|
+
sessionId: string,
|
|
700
|
+
filename: string,
|
|
701
|
+
dataUrl: string,
|
|
702
|
+
mediaType?: string
|
|
703
|
+
): Promise<Attachment> {
|
|
704
|
+
const res = await fetch(`${getApiBase()}/sessions/${sessionId}/attachments`, {
|
|
705
|
+
method: 'POST',
|
|
706
|
+
headers: { 'Content-Type': 'application/json' },
|
|
707
|
+
body: JSON.stringify({
|
|
708
|
+
filename,
|
|
709
|
+
data: dataUrl,
|
|
710
|
+
mediaType,
|
|
711
|
+
}),
|
|
712
|
+
});
|
|
713
|
+
|
|
714
|
+
if (!res.ok) {
|
|
715
|
+
const error = await res.json().catch(() => ({ error: 'Upload failed' }));
|
|
716
|
+
throw new Error(error.error || `Failed to upload: ${res.statusText}`);
|
|
717
|
+
}
|
|
718
|
+
|
|
719
|
+
return res.json();
|
|
720
|
+
}
|
|
721
|
+
|
|
722
|
+
/**
|
|
723
|
+
* List attachments for a session
|
|
724
|
+
*/
|
|
725
|
+
export async function getSessionAttachments(sessionId: string): Promise<AttachmentsResponse> {
|
|
726
|
+
const res = await fetch(`${getApiBase()}/sessions/${sessionId}/attachments`);
|
|
727
|
+
if (!res.ok) {
|
|
728
|
+
throw new Error(`Failed to get attachments: ${res.statusText}`);
|
|
729
|
+
}
|
|
730
|
+
return res.json();
|
|
731
|
+
}
|
|
732
|
+
|
|
733
|
+
/**
|
|
734
|
+
* Delete an attachment
|
|
735
|
+
*/
|
|
736
|
+
export async function deleteAttachment(sessionId: string, attachmentId: string): Promise<void> {
|
|
737
|
+
const res = await fetch(`${getApiBase()}/sessions/${sessionId}/attachments/${attachmentId}`, {
|
|
738
|
+
method: 'DELETE',
|
|
739
|
+
});
|
|
740
|
+
if (!res.ok) {
|
|
741
|
+
throw new Error(`Failed to delete attachment: ${res.statusText}`);
|
|
742
|
+
}
|
|
743
|
+
}
|
|
744
|
+
|
|
745
|
+
// ============================================
|
|
746
|
+
// Workspace Files API (for @ mentions)
|
|
747
|
+
// ============================================
|
|
748
|
+
|
|
749
|
+
export interface WorkspaceFile {
|
|
750
|
+
path: string; // Relative path from working directory
|
|
751
|
+
name: string; // File/folder name
|
|
752
|
+
type: 'file' | 'folder';
|
|
753
|
+
extension?: string; // For files only
|
|
754
|
+
}
|
|
755
|
+
|
|
756
|
+
export interface WorkspaceFilesResponse {
|
|
757
|
+
sessionId: string;
|
|
758
|
+
workingDirectory: string;
|
|
759
|
+
files: WorkspaceFile[];
|
|
760
|
+
count: number;
|
|
761
|
+
query?: string;
|
|
762
|
+
error?: string;
|
|
763
|
+
}
|
|
764
|
+
|
|
765
|
+
/**
|
|
766
|
+
* List workspace files for @ mentions
|
|
767
|
+
*/
|
|
768
|
+
export async function getWorkspaceFiles(
|
|
769
|
+
sessionId: string,
|
|
770
|
+
query?: string,
|
|
771
|
+
limit?: number
|
|
772
|
+
): Promise<WorkspaceFilesResponse> {
|
|
773
|
+
const params = new URLSearchParams();
|
|
774
|
+
if (query) params.set('query', query);
|
|
775
|
+
if (limit) params.set('limit', String(limit));
|
|
776
|
+
|
|
777
|
+
const url = `${getApiBase()}/sessions/${sessionId}/files${params.toString() ? '?' + params.toString() : ''}`;
|
|
778
|
+
const res = await fetch(url);
|
|
779
|
+
|
|
780
|
+
if (!res.ok) {
|
|
781
|
+
throw new Error(`Failed to get workspace files: ${res.statusText}`);
|
|
782
|
+
}
|
|
783
|
+
|
|
784
|
+
return res.json();
|
|
785
|
+
}
|