larkup 0.1.14 → 0.1.21
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/.next/BUILD_ID +1 -0
- package/.next/app-path-routes-manifest.json +69 -0
- package/.next/build/chunks/[root-of-the-server]__0cstldc._.js +206 -0
- package/.next/build/chunks/[root-of-the-server]__0s3ts0r._.js +500 -0
- package/.next/build/chunks/[turbopack-node]_transforms_postcss_ts_0xqnjlz._.js +13 -0
- package/.next/build/chunks/[turbopack]_runtime.js +890 -0
- package/.next/build/chunks/node_modules__pnpm_04zrf.1._.js +7126 -0
- package/.next/build/package.json +1 -0
- package/.next/build/postcss.js +6 -0
- package/.next/build-manifest.json +22 -0
- package/.next/diagnostics/build-diagnostics.json +6 -0
- package/.next/diagnostics/framework.json +1 -0
- package/.next/diagnostics/route-bundle-stats.json +133 -0
- package/.next/export-marker.json +6 -0
- package/.next/fallback-build-manifest.json +13 -0
- package/.next/images-manifest.json +68 -0
- package/.next/next-minimal-server.js.nft.json +1 -0
- package/.next/next-server.js.nft.json +1 -0
- package/.next/package.json +1 -0
- package/.next/prerender-manifest.json +210 -0
- package/.next/required-server-files.js +356 -0
- package/.next/required-server-files.json +356 -0
- package/.next/routes-manifest.json +462 -0
- package/.next/server/app/_global-error/page/app-paths-manifest.json +3 -0
- package/.next/server/app/_global-error/page/build-manifest.json +18 -0
- package/.next/server/app/_global-error/page/next-font-manifest.json +6 -0
- package/.next/server/app/_global-error/page/react-loadable-manifest.json +1 -0
- package/.next/server/app/_global-error/page/server-reference-manifest.json +4 -0
- package/.next/server/app/_global-error/page.js +10 -0
- package/.next/server/app/_global-error/page.js.nft.json +1 -0
- package/.next/server/app/_global-error/page_client-reference-manifest.js +3 -0
- package/.next/server/app/_global-error.html +1 -0
- package/.next/server/app/_global-error.meta +15 -0
- package/.next/server/app/_global-error.rsc +15 -0
- package/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +5 -0
- package/.next/server/app/_global-error.segments/_full.segment.rsc +15 -0
- package/.next/server/app/_global-error.segments/_head.segment.rsc +6 -0
- package/.next/server/app/_global-error.segments/_index.segment.rsc +5 -0
- package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -0
- package/.next/server/app/_not-found/page/app-paths-manifest.json +3 -0
- package/.next/server/app/_not-found/page/build-manifest.json +18 -0
- package/.next/server/app/_not-found/page/next-font-manifest.json +11 -0
- package/.next/server/app/_not-found/page/react-loadable-manifest.json +1 -0
- package/.next/server/app/_not-found/page/server-reference-manifest.json +4 -0
- package/.next/server/app/_not-found/page.js +14 -0
- package/.next/server/app/_not-found/page.js.nft.json +1 -0
- package/.next/server/app/_not-found/page_client-reference-manifest.js +3 -0
- package/.next/server/app/_not-found.html +1 -0
- package/.next/server/app/_not-found.meta +16 -0
- package/.next/server/app/_not-found.rsc +28 -0
- package/.next/server/app/_not-found.segments/_full.segment.rsc +28 -0
- package/.next/server/app/_not-found.segments/_head.segment.rsc +6 -0
- package/.next/server/app/_not-found.segments/_index.segment.rsc +14 -0
- package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +5 -0
- package/.next/server/app/_not-found.segments/_not-found.segment.rsc +5 -0
- package/.next/server/app/_not-found.segments/_tree.segment.rsc +3 -0
- package/.next/server/app/analytics/page/app-paths-manifest.json +3 -0
- package/.next/server/app/analytics/page/build-manifest.json +18 -0
- package/.next/server/app/analytics/page/next-font-manifest.json +11 -0
- package/.next/server/app/analytics/page/react-loadable-manifest.json +1 -0
- package/.next/server/app/analytics/page/server-reference-manifest.json +4 -0
- package/.next/server/app/analytics/page.js +15 -0
- package/.next/server/app/analytics/page.js.nft.json +1 -0
- package/.next/server/app/analytics/page_client-reference-manifest.js +3 -0
- package/.next/server/app/analytics.html +1 -0
- package/.next/server/app/analytics.meta +15 -0
- package/.next/server/app/analytics.rsc +32 -0
- package/.next/server/app/analytics.segments/_full.segment.rsc +32 -0
- package/.next/server/app/analytics.segments/_head.segment.rsc +6 -0
- package/.next/server/app/analytics.segments/_index.segment.rsc +14 -0
- package/.next/server/app/analytics.segments/_tree.segment.rsc +5 -0
- package/.next/server/app/analytics.segments/analytics/__PAGE__.segment.rsc +6 -0
- package/.next/server/app/analytics.segments/analytics.segment.rsc +5 -0
- package/.next/server/app/api/analytics/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/analytics/route/build-manifest.json +9 -0
- package/.next/server/app/api/analytics/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/analytics/route.js +9 -0
- package/.next/server/app/api/analytics/route.js.nft.json +1 -0
- package/.next/server/app/api/analytics/route_client-reference-manifest.js +3 -0
- package/.next/server/app/api/chat/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/chat/route/build-manifest.json +9 -0
- package/.next/server/app/api/chat/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/chat/route.js +24 -0
- package/.next/server/app/api/chat/route.js.nft.json +1 -0
- package/.next/server/app/api/chat/route_client-reference-manifest.js +3 -0
- package/.next/server/app/api/chat/status/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/chat/status/route/build-manifest.json +9 -0
- package/.next/server/app/api/chat/status/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/chat/status/route.js +9 -0
- package/.next/server/app/api/chat/status/route.js.nft.json +1 -0
- package/.next/server/app/api/chat/status/route_client-reference-manifest.js +3 -0
- package/.next/server/app/api/chat/suggestions/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/chat/suggestions/route/build-manifest.json +9 -0
- package/.next/server/app/api/chat/suggestions/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/chat/suggestions/route.js +17 -0
- package/.next/server/app/api/chat/suggestions/route.js.nft.json +1 -0
- package/.next/server/app/api/chat/suggestions/route_client-reference-manifest.js +3 -0
- package/.next/server/app/api/config/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/config/route/build-manifest.json +9 -0
- package/.next/server/app/api/config/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/config/route.js +8 -0
- package/.next/server/app/api/config/route.js.nft.json +1 -0
- package/.next/server/app/api/config/route_client-reference-manifest.js +3 -0
- package/.next/server/app/api/config/test/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/config/test/route/build-manifest.json +9 -0
- package/.next/server/app/api/config/test/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/config/test/route.js +8 -0
- package/.next/server/app/api/config/test/route.js.nft.json +1 -0
- package/.next/server/app/api/config/test/route_client-reference-manifest.js +3 -0
- package/.next/server/app/api/config/test-embedding/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/config/test-embedding/route/build-manifest.json +9 -0
- package/.next/server/app/api/config/test-embedding/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/config/test-embedding/route.js +12 -0
- package/.next/server/app/api/config/test-embedding/route.js.nft.json +1 -0
- package/.next/server/app/api/config/test-embedding/route_client-reference-manifest.js +3 -0
- package/.next/server/app/api/config/test-llm/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/config/test-llm/route/build-manifest.json +9 -0
- package/.next/server/app/api/config/test-llm/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/config/test-llm/route.js +12 -0
- package/.next/server/app/api/config/test-llm/route.js.nft.json +1 -0
- package/.next/server/app/api/config/test-llm/route_client-reference-manifest.js +3 -0
- package/.next/server/app/api/config/test-provider/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/config/test-provider/route/build-manifest.json +9 -0
- package/.next/server/app/api/config/test-provider/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/config/test-provider/route.js +13 -0
- package/.next/server/app/api/config/test-provider/route.js.nft.json +1 -0
- package/.next/server/app/api/config/test-provider/route_client-reference-manifest.js +3 -0
- package/.next/server/app/api/config/verify/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/config/verify/route/build-manifest.json +9 -0
- package/.next/server/app/api/config/verify/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/config/verify/route.js +16 -0
- package/.next/server/app/api/config/verify/route.js.nft.json +1 -0
- package/.next/server/app/api/config/verify/route_client-reference-manifest.js +3 -0
- package/.next/server/app/api/connections/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/connections/route/build-manifest.json +9 -0
- package/.next/server/app/api/connections/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/connections/route.js +8 -0
- package/.next/server/app/api/connections/route.js.nft.json +1 -0
- package/.next/server/app/api/connections/route_client-reference-manifest.js +3 -0
- package/.next/server/app/api/connections/webhook/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/connections/webhook/route/build-manifest.json +9 -0
- package/.next/server/app/api/connections/webhook/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/connections/webhook/route.js +10 -0
- package/.next/server/app/api/connections/webhook/route.js.nft.json +1 -0
- package/.next/server/app/api/connections/webhook/route_client-reference-manifest.js +3 -0
- package/.next/server/app/api/demo/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/demo/route/build-manifest.json +9 -0
- package/.next/server/app/api/demo/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/demo/route.js +15 -0
- package/.next/server/app/api/demo/route.js.nft.json +1 -0
- package/.next/server/app/api/demo/route_client-reference-manifest.js +3 -0
- package/.next/server/app/api/deploy/cloud-project/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/deploy/cloud-project/route/build-manifest.json +9 -0
- package/.next/server/app/api/deploy/cloud-project/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/deploy/cloud-project/route.js +13 -0
- package/.next/server/app/api/deploy/cloud-project/route.js.nft.json +1 -0
- package/.next/server/app/api/deploy/cloud-project/route_client-reference-manifest.js +3 -0
- package/.next/server/app/api/deploy/ssh/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/deploy/ssh/route/build-manifest.json +9 -0
- package/.next/server/app/api/deploy/ssh/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/deploy/ssh/route.js +8 -0
- package/.next/server/app/api/deploy/ssh/route.js.nft.json +1 -0
- package/.next/server/app/api/deploy/ssh/route_client-reference-manifest.js +3 -0
- package/.next/server/app/api/deployment/blob-setup/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/deployment/blob-setup/route/build-manifest.json +9 -0
- package/.next/server/app/api/deployment/blob-setup/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/deployment/blob-setup/route.js +8 -0
- package/.next/server/app/api/deployment/blob-setup/route.js.nft.json +1 -0
- package/.next/server/app/api/deployment/blob-setup/route_client-reference-manifest.js +3 -0
- package/.next/server/app/api/deployment/config/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/deployment/config/route/build-manifest.json +9 -0
- package/.next/server/app/api/deployment/config/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/deployment/config/route.js +8 -0
- package/.next/server/app/api/deployment/config/route.js.nft.json +1 -0
- package/.next/server/app/api/deployment/config/route_client-reference-manifest.js +3 -0
- package/.next/server/app/api/describe-image/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/describe-image/route/build-manifest.json +9 -0
- package/.next/server/app/api/describe-image/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/describe-image/route.js +15 -0
- package/.next/server/app/api/describe-image/route.js.nft.json +1 -0
- package/.next/server/app/api/describe-image/route_client-reference-manifest.js +3 -0
- package/.next/server/app/api/doc-editor/edit/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/doc-editor/edit/route/build-manifest.json +9 -0
- package/.next/server/app/api/doc-editor/edit/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/doc-editor/edit/route.js +11 -0
- package/.next/server/app/api/doc-editor/edit/route.js.nft.json +1 -0
- package/.next/server/app/api/doc-editor/edit/route_client-reference-manifest.js +3 -0
- package/.next/server/app/api/doc-editor/export/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/doc-editor/export/route/build-manifest.json +9 -0
- package/.next/server/app/api/doc-editor/export/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/doc-editor/export/route.js +11 -0
- package/.next/server/app/api/doc-editor/export/route.js.nft.json +1 -0
- package/.next/server/app/api/doc-editor/export/route_client-reference-manifest.js +3 -0
- package/.next/server/app/api/doc-editor/extract-text/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/doc-editor/extract-text/route/build-manifest.json +9 -0
- package/.next/server/app/api/doc-editor/extract-text/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/doc-editor/extract-text/route.js +11 -0
- package/.next/server/app/api/doc-editor/extract-text/route.js.nft.json +1 -0
- package/.next/server/app/api/doc-editor/extract-text/route_client-reference-manifest.js +3 -0
- package/.next/server/app/api/doc-editor/parse/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/doc-editor/parse/route/build-manifest.json +9 -0
- package/.next/server/app/api/doc-editor/parse/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/doc-editor/parse/route.js +12 -0
- package/.next/server/app/api/doc-editor/parse/route.js.nft.json +1 -0
- package/.next/server/app/api/doc-editor/parse/route_client-reference-manifest.js +3 -0
- package/.next/server/app/api/doc-editor/restore/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/doc-editor/restore/route/build-manifest.json +9 -0
- package/.next/server/app/api/doc-editor/restore/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/doc-editor/restore/route.js +11 -0
- package/.next/server/app/api/doc-editor/restore/route.js.nft.json +1 -0
- package/.next/server/app/api/doc-editor/restore/route_client-reference-manifest.js +3 -0
- package/.next/server/app/api/document/sign/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/document/sign/route/build-manifest.json +9 -0
- package/.next/server/app/api/document/sign/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/document/sign/route.js +12 -0
- package/.next/server/app/api/document/sign/route.js.nft.json +1 -0
- package/.next/server/app/api/document/sign/route_client-reference-manifest.js +3 -0
- package/.next/server/app/api/documents/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/documents/route/build-manifest.json +9 -0
- package/.next/server/app/api/documents/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/documents/route.js +8 -0
- package/.next/server/app/api/documents/route.js.nft.json +1 -0
- package/.next/server/app/api/documents/route_client-reference-manifest.js +3 -0
- package/.next/server/app/api/firecrawl/local/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/firecrawl/local/route/build-manifest.json +9 -0
- package/.next/server/app/api/firecrawl/local/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/firecrawl/local/route.js +8 -0
- package/.next/server/app/api/firecrawl/local/route.js.nft.json +1 -0
- package/.next/server/app/api/firecrawl/local/route_client-reference-manifest.js +3 -0
- package/.next/server/app/api/index/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/index/route/build-manifest.json +9 -0
- package/.next/server/app/api/index/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/index/route.js +14 -0
- package/.next/server/app/api/index/route.js.nft.json +1 -0
- package/.next/server/app/api/index/route_client-reference-manifest.js +3 -0
- package/.next/server/app/api/integrations/notion/callback/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/integrations/notion/callback/route/build-manifest.json +9 -0
- package/.next/server/app/api/integrations/notion/callback/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/integrations/notion/callback/route.js +8 -0
- package/.next/server/app/api/integrations/notion/callback/route.js.nft.json +1 -0
- package/.next/server/app/api/integrations/notion/callback/route_client-reference-manifest.js +3 -0
- package/.next/server/app/api/integrations/notion/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/integrations/notion/route/build-manifest.json +9 -0
- package/.next/server/app/api/integrations/notion/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/integrations/notion/route.js +8 -0
- package/.next/server/app/api/integrations/notion/route.js.nft.json +1 -0
- package/.next/server/app/api/integrations/notion/route_client-reference-manifest.js +3 -0
- package/.next/server/app/api/jobs/[id]/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/jobs/[id]/route/build-manifest.json +9 -0
- package/.next/server/app/api/jobs/[id]/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/jobs/[id]/route.js +8 -0
- package/.next/server/app/api/jobs/[id]/route.js.nft.json +1 -0
- package/.next/server/app/api/jobs/[id]/route_client-reference-manifest.js +3 -0
- package/.next/server/app/api/jobs/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/jobs/route/build-manifest.json +9 -0
- package/.next/server/app/api/jobs/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/jobs/route.js +8 -0
- package/.next/server/app/api/jobs/route.js.nft.json +1 -0
- package/.next/server/app/api/jobs/route_client-reference-manifest.js +3 -0
- package/.next/server/app/api/marketplace/[toolId]/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/marketplace/[toolId]/route/build-manifest.json +9 -0
- package/.next/server/app/api/marketplace/[toolId]/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/marketplace/[toolId]/route.js +9 -0
- package/.next/server/app/api/marketplace/[toolId]/route.js.nft.json +1 -0
- package/.next/server/app/api/marketplace/[toolId]/route_client-reference-manifest.js +3 -0
- package/.next/server/app/api/marketplace/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/marketplace/route/build-manifest.json +9 -0
- package/.next/server/app/api/marketplace/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/marketplace/route.js +9 -0
- package/.next/server/app/api/marketplace/route.js.nft.json +1 -0
- package/.next/server/app/api/marketplace/route_client-reference-manifest.js +3 -0
- package/.next/server/app/api/media/[id]/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/media/[id]/route/build-manifest.json +9 -0
- package/.next/server/app/api/media/[id]/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/media/[id]/route.js +8 -0
- package/.next/server/app/api/media/[id]/route.js.nft.json +1 -0
- package/.next/server/app/api/media/[id]/route_client-reference-manifest.js +3 -0
- package/.next/server/app/api/media/process/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/media/process/route/build-manifest.json +9 -0
- package/.next/server/app/api/media/process/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/media/process/route.js +17 -0
- package/.next/server/app/api/media/process/route.js.nft.json +1 -0
- package/.next/server/app/api/media/process/route_client-reference-manifest.js +3 -0
- package/.next/server/app/api/media/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/media/route/build-manifest.json +9 -0
- package/.next/server/app/api/media/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/media/route.js +9 -0
- package/.next/server/app/api/media/route.js.nft.json +1 -0
- package/.next/server/app/api/media/route_client-reference-manifest.js +3 -0
- package/.next/server/app/api/media/stream/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/media/stream/route/build-manifest.json +9 -0
- package/.next/server/app/api/media/stream/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/media/stream/route.js +7 -0
- package/.next/server/app/api/media/stream/route.js.nft.json +1 -0
- package/.next/server/app/api/media/stream/route_client-reference-manifest.js +3 -0
- package/.next/server/app/api/models/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/models/route/build-manifest.json +9 -0
- package/.next/server/app/api/models/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/models/route.js +9 -0
- package/.next/server/app/api/models/route.js.nft.json +1 -0
- package/.next/server/app/api/models/route_client-reference-manifest.js +3 -0
- package/.next/server/app/api/parse-file/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/parse-file/route/build-manifest.json +9 -0
- package/.next/server/app/api/parse-file/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/parse-file/route.js +11 -0
- package/.next/server/app/api/parse-file/route.js.nft.json +1 -0
- package/.next/server/app/api/parse-file/route_client-reference-manifest.js +3 -0
- package/.next/server/app/api/proxy/verify/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/proxy/verify/route/build-manifest.json +9 -0
- package/.next/server/app/api/proxy/verify/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/proxy/verify/route.js +8 -0
- package/.next/server/app/api/proxy/verify/route.js.nft.json +1 -0
- package/.next/server/app/api/proxy/verify/route_client-reference-manifest.js +3 -0
- package/.next/server/app/api/sandbox/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/sandbox/route/build-manifest.json +9 -0
- package/.next/server/app/api/sandbox/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/sandbox/route.js +8 -0
- package/.next/server/app/api/sandbox/route.js.nft.json +1 -0
- package/.next/server/app/api/sandbox/route_client-reference-manifest.js +3 -0
- package/.next/server/app/api/search/bing/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/search/bing/route/build-manifest.json +9 -0
- package/.next/server/app/api/search/bing/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/search/bing/route.js +8 -0
- package/.next/server/app/api/search/bing/route.js.nft.json +1 -0
- package/.next/server/app/api/search/bing/route_client-reference-manifest.js +3 -0
- package/.next/server/app/api/search/brave/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/search/brave/route/build-manifest.json +9 -0
- package/.next/server/app/api/search/brave/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/search/brave/route.js +8 -0
- package/.next/server/app/api/search/brave/route.js.nft.json +1 -0
- package/.next/server/app/api/search/brave/route_client-reference-manifest.js +3 -0
- package/.next/server/app/api/search/exa/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/search/exa/route/build-manifest.json +9 -0
- package/.next/server/app/api/search/exa/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/search/exa/route.js +8 -0
- package/.next/server/app/api/search/exa/route.js.nft.json +1 -0
- package/.next/server/app/api/search/exa/route_client-reference-manifest.js +3 -0
- package/.next/server/app/api/search/google/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/search/google/route/build-manifest.json +9 -0
- package/.next/server/app/api/search/google/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/search/google/route.js +8 -0
- package/.next/server/app/api/search/google/route.js.nft.json +1 -0
- package/.next/server/app/api/search/google/route_client-reference-manifest.js +3 -0
- package/.next/server/app/api/search/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/search/route/build-manifest.json +9 -0
- package/.next/server/app/api/search/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/search/route.js +8 -0
- package/.next/server/app/api/search/route.js.nft.json +1 -0
- package/.next/server/app/api/search/route_client-reference-manifest.js +3 -0
- package/.next/server/app/api/search/tavily/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/search/tavily/route/build-manifest.json +9 -0
- package/.next/server/app/api/search/tavily/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/search/tavily/route.js +8 -0
- package/.next/server/app/api/search/tavily/route.js.nft.json +1 -0
- package/.next/server/app/api/search/tavily/route_client-reference-manifest.js +3 -0
- package/.next/server/app/api/search/verify/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/search/verify/route/build-manifest.json +9 -0
- package/.next/server/app/api/search/verify/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/search/verify/route.js +8 -0
- package/.next/server/app/api/search/verify/route.js.nft.json +1 -0
- package/.next/server/app/api/search/verify/route_client-reference-manifest.js +3 -0
- package/.next/server/app/api/server/agent/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/server/agent/route/build-manifest.json +9 -0
- package/.next/server/app/api/server/agent/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/server/agent/route.js +10 -0
- package/.next/server/app/api/server/agent/route.js.nft.json +1 -0
- package/.next/server/app/api/server/agent/route_client-reference-manifest.js +3 -0
- package/.next/server/app/api/server/download/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/server/download/route/build-manifest.json +9 -0
- package/.next/server/app/api/server/download/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/server/download/route.js +9 -0
- package/.next/server/app/api/server/download/route.js.nft.json +1 -0
- package/.next/server/app/api/server/download/route_client-reference-manifest.js +3 -0
- package/.next/server/app/api/server/generate/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/server/generate/route/build-manifest.json +9 -0
- package/.next/server/app/api/server/generate/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/server/generate/route.js +10 -0
- package/.next/server/app/api/server/generate/route.js.nft.json +1 -0
- package/.next/server/app/api/server/generate/route_client-reference-manifest.js +3 -0
- package/.next/server/app/api/server/local/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/server/local/route/build-manifest.json +9 -0
- package/.next/server/app/api/server/local/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/server/local/route.js +10 -0
- package/.next/server/app/api/server/local/route.js.nft.json +1 -0
- package/.next/server/app/api/server/local/route_client-reference-manifest.js +3 -0
- package/.next/server/app/api/servers/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/servers/route/build-manifest.json +9 -0
- package/.next/server/app/api/servers/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/servers/route.js +10 -0
- package/.next/server/app/api/servers/route.js.nft.json +1 -0
- package/.next/server/app/api/servers/route_client-reference-manifest.js +3 -0
- package/.next/server/app/api/tabular/query/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/tabular/query/route/build-manifest.json +9 -0
- package/.next/server/app/api/tabular/query/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/tabular/query/route.js +8 -0
- package/.next/server/app/api/tabular/query/route.js.nft.json +1 -0
- package/.next/server/app/api/tabular/query/route_client-reference-manifest.js +3 -0
- package/.next/server/app/api/tabular/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/tabular/route/build-manifest.json +9 -0
- package/.next/server/app/api/tabular/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/tabular/route.js +8 -0
- package/.next/server/app/api/tabular/route.js.nft.json +1 -0
- package/.next/server/app/api/tabular/route_client-reference-manifest.js +3 -0
- package/.next/server/app/api/upload-file/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/upload-file/route/build-manifest.json +9 -0
- package/.next/server/app/api/upload-file/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/upload-file/route.js +8 -0
- package/.next/server/app/api/upload-file/route.js.nft.json +1 -0
- package/.next/server/app/api/upload-file/route_client-reference-manifest.js +3 -0
- package/.next/server/app/api/uploads/[...slug]/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/uploads/[...slug]/route/build-manifest.json +9 -0
- package/.next/server/app/api/uploads/[...slug]/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/uploads/[...slug]/route.js +8 -0
- package/.next/server/app/api/uploads/[...slug]/route.js.nft.json +1 -0
- package/.next/server/app/api/uploads/[...slug]/route_client-reference-manifest.js +3 -0
- package/.next/server/app/api/vector-stores/install/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/vector-stores/install/route/build-manifest.json +9 -0
- package/.next/server/app/api/vector-stores/install/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/vector-stores/install/route.js +8 -0
- package/.next/server/app/api/vector-stores/install/route.js.nft.json +1 -0
- package/.next/server/app/api/vector-stores/install/route_client-reference-manifest.js +3 -0
- package/.next/server/app/api/vector-stores/status/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/vector-stores/status/route/build-manifest.json +9 -0
- package/.next/server/app/api/vector-stores/status/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/vector-stores/status/route.js +8 -0
- package/.next/server/app/api/vector-stores/status/route.js.nft.json +1 -0
- package/.next/server/app/api/vector-stores/status/route_client-reference-manifest.js +3 -0
- package/.next/server/app/chat/page/app-paths-manifest.json +3 -0
- package/.next/server/app/chat/page/build-manifest.json +18 -0
- package/.next/server/app/chat/page/next-font-manifest.json +11 -0
- package/.next/server/app/chat/page/react-loadable-manifest.json +1 -0
- package/.next/server/app/chat/page/server-reference-manifest.json +4 -0
- package/.next/server/app/chat/page.js +15 -0
- package/.next/server/app/chat/page.js.nft.json +1 -0
- package/.next/server/app/chat/page_client-reference-manifest.js +3 -0
- package/.next/server/app/chat.html +1 -0
- package/.next/server/app/chat.meta +15 -0
- package/.next/server/app/chat.rsc +29 -0
- package/.next/server/app/chat.segments/_full.segment.rsc +29 -0
- package/.next/server/app/chat.segments/_head.segment.rsc +6 -0
- package/.next/server/app/chat.segments/_index.segment.rsc +14 -0
- package/.next/server/app/chat.segments/_tree.segment.rsc +5 -0
- package/.next/server/app/chat.segments/chat/__PAGE__.segment.rsc +6 -0
- package/.next/server/app/chat.segments/chat.segment.rsc +5 -0
- package/.next/server/app/data/page/app-paths-manifest.json +3 -0
- package/.next/server/app/data/page/build-manifest.json +18 -0
- package/.next/server/app/data/page/next-font-manifest.json +11 -0
- package/.next/server/app/data/page/react-loadable-manifest.json +1 -0
- package/.next/server/app/data/page/server-reference-manifest.json +4 -0
- package/.next/server/app/data/page.js +15 -0
- package/.next/server/app/data/page.js.nft.json +1 -0
- package/.next/server/app/data/page_client-reference-manifest.js +3 -0
- package/.next/server/app/data.html +1 -0
- package/.next/server/app/data.meta +15 -0
- package/.next/server/app/data.rsc +32 -0
- package/.next/server/app/data.segments/_full.segment.rsc +32 -0
- package/.next/server/app/data.segments/_head.segment.rsc +6 -0
- package/.next/server/app/data.segments/_index.segment.rsc +14 -0
- package/.next/server/app/data.segments/_tree.segment.rsc +5 -0
- package/.next/server/app/data.segments/data/__PAGE__.segment.rsc +6 -0
- package/.next/server/app/data.segments/data.segment.rsc +5 -0
- package/.next/server/app/favicon.ico/route/app-paths-manifest.json +3 -0
- package/.next/server/app/favicon.ico/route/build-manifest.json +9 -0
- package/.next/server/app/favicon.ico/route.js +8 -0
- package/.next/server/app/favicon.ico/route.js.nft.json +1 -0
- package/.next/server/app/favicon.ico.body +0 -0
- package/.next/server/app/favicon.ico.meta +1 -0
- package/.next/server/app/index.html +1 -0
- package/.next/server/app/index.meta +14 -0
- package/.next/server/app/index.rsc +26 -0
- package/.next/server/app/index.segments/__PAGE__.segment.rsc +6 -0
- package/.next/server/app/index.segments/_full.segment.rsc +26 -0
- package/.next/server/app/index.segments/_head.segment.rsc +6 -0
- package/.next/server/app/index.segments/_index.segment.rsc +14 -0
- package/.next/server/app/index.segments/_tree.segment.rsc +5 -0
- package/.next/server/app/page/app-paths-manifest.json +3 -0
- package/.next/server/app/page/build-manifest.json +18 -0
- package/.next/server/app/page/next-font-manifest.json +11 -0
- package/.next/server/app/page/react-loadable-manifest.json +1 -0
- package/.next/server/app/page/server-reference-manifest.json +4 -0
- package/.next/server/app/page.js +16 -0
- package/.next/server/app/page.js.nft.json +1 -0
- package/.next/server/app/page_client-reference-manifest.js +3 -0
- package/.next/server/app/settings/page/app-paths-manifest.json +3 -0
- package/.next/server/app/settings/page/build-manifest.json +18 -0
- package/.next/server/app/settings/page/next-font-manifest.json +11 -0
- package/.next/server/app/settings/page/react-loadable-manifest.json +1 -0
- package/.next/server/app/settings/page/server-reference-manifest.json +41 -0
- package/.next/server/app/settings/page.js +16 -0
- package/.next/server/app/settings/page.js.nft.json +1 -0
- package/.next/server/app/settings/page_client-reference-manifest.js +3 -0
- package/.next/server/app/settings.html +1 -0
- package/.next/server/app/settings.meta +15 -0
- package/.next/server/app/settings.rsc +31 -0
- package/.next/server/app/settings.segments/_full.segment.rsc +31 -0
- package/.next/server/app/settings.segments/_head.segment.rsc +6 -0
- package/.next/server/app/settings.segments/_index.segment.rsc +14 -0
- package/.next/server/app/settings.segments/_tree.segment.rsc +5 -0
- package/.next/server/app/settings.segments/settings/__PAGE__.segment.rsc +9 -0
- package/.next/server/app/settings.segments/settings.segment.rsc +5 -0
- package/.next/server/app-paths-manifest.json +69 -0
- package/.next/server/chunks/00i._ai_dist_index_mjs_0u4.k1t._.js +34 -0
- package/.next/server/chunks/02dz_web__next-internal_server_app_api_config_test-embedding_route_actions_09--owe.js +3 -0
- package/.next/server/chunks/02dz_web__next-internal_server_app_api_config_test-provider_route_actions_0l6xr0t.js +3 -0
- package/.next/server/chunks/02dz_web__next-internal_server_app_api_deploy_cloud-project_route_actions_0pghds2.js +3 -0
- package/.next/server/chunks/02dz_web__next-internal_server_app_api_deployment_blob-setup_route_actions_0f55gkq.js +3 -0
- package/.next/server/chunks/02dz_web__next-internal_server_app_api_doc-editor_extract-text_route_actions_0dzj6iq.js +3 -0
- package/.next/server/chunks/02dz_web__next-internal_server_app_api_marketplace_[toolId]_route_actions_0cxbtrw.js +3 -0
- package/.next/server/chunks/02dz_web__next-internal_server_app_api_vector-stores_install_route_actions_0_220fs.js +3 -0
- package/.next/server/chunks/02dz_web__next-internal_server_app_api_vector-stores_status_route_actions_0~_~b02.js +3 -0
- package/.next/server/chunks/0gvc_next_03p7xh-._.js +13 -0
- package/.next/server/chunks/0gvc_next_dist_esm_build_templates_app-route_0--xko7.js +24 -0
- package/.next/server/chunks/0gvc_next_dist_esm_build_templates_app-route_0.07y39.js +3 -0
- package/.next/server/chunks/0gvc_next_dist_esm_build_templates_app-route_04i84m2.js +10 -0
- package/.next/server/chunks/0gvc_next_dist_esm_build_templates_app-route_05yqn19.js +3 -0
- package/.next/server/chunks/0gvc_next_dist_esm_build_templates_app-route_0_c4eox.js +3 -0
- package/.next/server/chunks/0m6-_@ai-sdk_anthropic_dist_index_093y5mm.js +10 -0
- package/.next/server/chunks/0nf3_next-internal_server_app_api_integrations_notion_callback_route_actions_0hyfnmw.js +3 -0
- package/.next/server/chunks/0ntz_@ai-sdk_openai_dist_index_mjs_03ljy2u._.js +13 -0
- package/.next/server/chunks/0ozc_@vercel_oidc_dist_token_0m1934l.js +3 -0
- package/.next/server/chunks/0rgj_zod_v4_0ponial._.js +64 -0
- package/.next/server/chunks/0rgj_zod_v4_0zoqna9._.js +64 -0
- package/.next/server/chunks/[externals]__01hpkma._.js +3 -0
- package/.next/server/chunks/[externals]__01tm01i._.js +3 -0
- package/.next/server/chunks/[externals]_chromadb_0goja~y._.js +3 -0
- package/.next/server/chunks/[externals]_fs_0eo4gmu._.js +3 -0
- package/.next/server/chunks/[externals]_path_0.09pfe._.js +3 -0
- package/.next/server/chunks/[externals]_stream_0g9s3ok._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0--6uey._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0.qd1p3._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0.r5yhr._.js +49 -0
- package/.next/server/chunks/[root-of-the-server]__0036943._.js +199 -0
- package/.next/server/chunks/[root-of-the-server]__00a7cyb._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__00nqa2u._.js +59 -0
- package/.next/server/chunks/[root-of-the-server]__0111be7._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__02c_z~9._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__02cpmox._.js +105 -0
- package/.next/server/chunks/[root-of-the-server]__02p-tv7._.js +105 -0
- package/.next/server/chunks/[root-of-the-server]__02p34d7._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__02t_0g7._.js +59 -0
- package/.next/server/chunks/[root-of-the-server]__03-x3no._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__03l~uw5._.js +143 -0
- package/.next/server/chunks/[root-of-the-server]__044l2_f._.js +143 -0
- package/.next/server/chunks/[root-of-the-server]__04kopvt._.js +63 -0
- package/.next/server/chunks/[root-of-the-server]__04l~ip-._.js +59 -0
- package/.next/server/chunks/[root-of-the-server]__04visk8._.js +105 -0
- package/.next/server/chunks/[root-of-the-server]__05wk..v._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__05x8tmf._.js +59 -0
- package/.next/server/chunks/[root-of-the-server]__06l96vc._.js +59 -0
- package/.next/server/chunks/[root-of-the-server]__06ohoeu._.js +59 -0
- package/.next/server/chunks/[root-of-the-server]__072q335._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__07_1411._.js +59 -0
- package/.next/server/chunks/[root-of-the-server]__09kos0n._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__09oyip3._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__09rsmk2._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0_by00t._.js +11 -0
- package/.next/server/chunks/[root-of-the-server]__0a9jp5~._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0acpo9m._.js +59 -0
- package/.next/server/chunks/[root-of-the-server]__0b17yoc._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0cumfx6._.js +9 -0
- package/.next/server/chunks/[root-of-the-server]__0d7p0xo._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0e_itje._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0exyn0q._.js +88 -0
- package/.next/server/chunks/[root-of-the-server]__0fcf_rl._.js +59 -0
- package/.next/server/chunks/[root-of-the-server]__0f~eq1-._.js +59 -0
- package/.next/server/chunks/[root-of-the-server]__0g36cgg._.js +143 -0
- package/.next/server/chunks/[root-of-the-server]__0g4hq1o._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0i9fj76._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0lczaer._.js +143 -0
- package/.next/server/chunks/[root-of-the-server]__0ljy49-._.js +59 -0
- package/.next/server/chunks/[root-of-the-server]__0lk5hkk._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0n0nerw._.js +59 -0
- package/.next/server/chunks/[root-of-the-server]__0np09bv._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0ns~dg6._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0oh5wgp._.js +59 -0
- package/.next/server/chunks/[root-of-the-server]__0oyc7s4._.js +105 -0
- package/.next/server/chunks/[root-of-the-server]__0pg~eys._.js +59 -0
- package/.next/server/chunks/[root-of-the-server]__0qhpl6k._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0qhwzn-._.js +21 -0
- package/.next/server/chunks/[root-of-the-server]__0qs73xp._.js +143 -0
- package/.next/server/chunks/[root-of-the-server]__0qtx78g._.js +59 -0
- package/.next/server/chunks/[root-of-the-server]__0r03jcl._.js +59 -0
- package/.next/server/chunks/[root-of-the-server]__0rdjqpy._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0sb7d93._.js +59 -0
- package/.next/server/chunks/[root-of-the-server]__0t36t5o._.js +60 -0
- package/.next/server/chunks/[root-of-the-server]__0t_hp52._.js +59 -0
- package/.next/server/chunks/[root-of-the-server]__0udlgj6._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0ufk3d0._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0uu6oan._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0v.0gyp._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0v03x56._.js +59 -0
- package/.next/server/chunks/[root-of-the-server]__0v4bbce._.js +59 -0
- package/.next/server/chunks/[root-of-the-server]__0v67rlo._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0vcdpoc._.js +59 -0
- package/.next/server/chunks/[root-of-the-server]__0veqa4o._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0wvxpqf._.js +59 -0
- package/.next/server/chunks/[root-of-the-server]__0wyl7x5._.js +59 -0
- package/.next/server/chunks/[root-of-the-server]__0y5y7tu._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0yo._sm._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0yx8vxp._.js +59 -0
- package/.next/server/chunks/[root-of-the-server]__0zh8t6z._.js +59 -0
- package/.next/server/chunks/[root-of-the-server]__0~q2fro._.js +59 -0
- package/.next/server/chunks/[root-of-the-server]__0~wsw0_._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__100gqj0._.js +143 -0
- package/.next/server/chunks/[root-of-the-server]__10au-r5._.js +13 -0
- package/.next/server/chunks/[root-of-the-server]__10d58x4._.js +59 -0
- package/.next/server/chunks/[root-of-the-server]__10zm06g._.js +143 -0
- package/.next/server/chunks/[root-of-the-server]__12kvuvp._.js +59 -0
- package/.next/server/chunks/[root-of-the-server]__13gq0t2._.js +3 -0
- package/.next/server/chunks/[turbopack]_runtime.js +903 -0
- package/.next/server/chunks/_01kokno._.js +3 -0
- package/.next/server/chunks/_059f-.0._.js +258 -0
- package/.next/server/chunks/_071mhy1._.js +32 -0
- package/.next/server/chunks/apps_web__next-internal_server_app_api_analytics_route_actions_0.uxcnt.js +3 -0
- package/.next/server/chunks/apps_web__next-internal_server_app_api_chat_route_actions_0q6zwqv.js +3 -0
- package/.next/server/chunks/apps_web__next-internal_server_app_api_chat_status_route_actions_0t_21~v.js +3 -0
- package/.next/server/chunks/apps_web__next-internal_server_app_api_chat_suggestions_route_actions_01umx_-.js +3 -0
- package/.next/server/chunks/apps_web__next-internal_server_app_api_config_route_actions_0-4ivvk.js +3 -0
- package/.next/server/chunks/apps_web__next-internal_server_app_api_config_test-llm_route_actions_0z5ew-0.js +3 -0
- package/.next/server/chunks/apps_web__next-internal_server_app_api_config_test_route_actions_08cur6r.js +3 -0
- package/.next/server/chunks/apps_web__next-internal_server_app_api_config_verify_route_actions_0hid6b..js +3 -0
- package/.next/server/chunks/apps_web__next-internal_server_app_api_connections_route_actions_0q3wdg3.js +3 -0
- package/.next/server/chunks/apps_web__next-internal_server_app_api_connections_webhook_route_actions_0wa28~b.js +3 -0
- package/.next/server/chunks/apps_web__next-internal_server_app_api_demo_route_actions_05lntn3.js +3 -0
- package/.next/server/chunks/apps_web__next-internal_server_app_api_deploy_ssh_route_actions_0r44rn0.js +3 -0
- package/.next/server/chunks/apps_web__next-internal_server_app_api_deployment_config_route_actions_0bkon.m.js +3 -0
- package/.next/server/chunks/apps_web__next-internal_server_app_api_describe-image_route_actions_0pmvs8v.js +3 -0
- package/.next/server/chunks/apps_web__next-internal_server_app_api_doc-editor_edit_route_actions_10hrovj.js +3 -0
- package/.next/server/chunks/apps_web__next-internal_server_app_api_doc-editor_export_route_actions_0rff01q.js +3 -0
- package/.next/server/chunks/apps_web__next-internal_server_app_api_doc-editor_parse_route_actions_0fkx6xw.js +3 -0
- package/.next/server/chunks/apps_web__next-internal_server_app_api_doc-editor_restore_route_actions_0g9uodw.js +3 -0
- package/.next/server/chunks/apps_web__next-internal_server_app_api_document_sign_route_actions_0_6rnl_.js +3 -0
- package/.next/server/chunks/apps_web__next-internal_server_app_api_documents_route_actions_0l2znaz.js +3 -0
- package/.next/server/chunks/apps_web__next-internal_server_app_api_firecrawl_local_route_actions_0ubjaim.js +3 -0
- package/.next/server/chunks/apps_web__next-internal_server_app_api_index_route_actions_0~2989e.js +3 -0
- package/.next/server/chunks/apps_web__next-internal_server_app_api_integrations_notion_route_actions_08es~5e.js +3 -0
- package/.next/server/chunks/apps_web__next-internal_server_app_api_jobs_[id]_route_actions_0.l39qd.js +3 -0
- package/.next/server/chunks/apps_web__next-internal_server_app_api_jobs_route_actions_08kx~8-.js +3 -0
- package/.next/server/chunks/apps_web__next-internal_server_app_api_marketplace_route_actions_0z~vymm.js +3 -0
- package/.next/server/chunks/apps_web__next-internal_server_app_api_media_[id]_route_actions_0wsnidd.js +3 -0
- package/.next/server/chunks/apps_web__next-internal_server_app_api_media_process_route_actions_0_j9maz.js +3 -0
- package/.next/server/chunks/apps_web__next-internal_server_app_api_media_route_actions_01szz-1.js +3 -0
- package/.next/server/chunks/apps_web__next-internal_server_app_api_media_stream_route_actions_0h2x_~2.js +3 -0
- package/.next/server/chunks/apps_web__next-internal_server_app_api_models_route_actions_0ervfbf.js +3 -0
- package/.next/server/chunks/apps_web__next-internal_server_app_api_parse-file_route_actions_134wu5p.js +3 -0
- package/.next/server/chunks/apps_web__next-internal_server_app_api_proxy_verify_route_actions_11frmb9.js +3 -0
- package/.next/server/chunks/apps_web__next-internal_server_app_api_sandbox_route_actions_0y9te9y.js +3 -0
- package/.next/server/chunks/apps_web__next-internal_server_app_api_search_bing_route_actions_0pfrdr1.js +3 -0
- package/.next/server/chunks/apps_web__next-internal_server_app_api_search_brave_route_actions_0sij14a.js +3 -0
- package/.next/server/chunks/apps_web__next-internal_server_app_api_search_exa_route_actions_013do9i.js +3 -0
- package/.next/server/chunks/apps_web__next-internal_server_app_api_search_google_route_actions_02aoghr.js +3 -0
- package/.next/server/chunks/apps_web__next-internal_server_app_api_search_route_actions_0_2o9ph.js +3 -0
- package/.next/server/chunks/apps_web__next-internal_server_app_api_search_tavily_route_actions_0z0cnd4.js +3 -0
- package/.next/server/chunks/apps_web__next-internal_server_app_api_search_verify_route_actions_0xtygzs.js +3 -0
- package/.next/server/chunks/apps_web__next-internal_server_app_api_server_agent_route_actions_11xuz1m.js +3 -0
- package/.next/server/chunks/apps_web__next-internal_server_app_api_server_download_route_actions_0vdr_bn.js +3 -0
- package/.next/server/chunks/apps_web__next-internal_server_app_api_server_generate_route_actions_12qf.pa.js +3 -0
- package/.next/server/chunks/apps_web__next-internal_server_app_api_server_local_route_actions_0c~tchb.js +3 -0
- package/.next/server/chunks/apps_web__next-internal_server_app_api_servers_route_actions_0_qimaq.js +3 -0
- package/.next/server/chunks/apps_web__next-internal_server_app_api_tabular_query_route_actions_0m_i8~j.js +3 -0
- package/.next/server/chunks/apps_web__next-internal_server_app_api_tabular_route_actions_06xgjmg.js +3 -0
- package/.next/server/chunks/apps_web__next-internal_server_app_api_upload-file_route_actions_0-df~h8.js +3 -0
- package/.next/server/chunks/apps_web__next-internal_server_app_api_uploads_[___slug]_route_actions_0-6rd8s.js +3 -0
- package/.next/server/chunks/apps_web__next-internal_server_app_favicon_ico_route_actions_0h5n1et.js +3 -0
- package/.next/server/chunks/node_modules__pnpm_00a45hz._.js +15 -0
- package/.next/server/chunks/node_modules__pnpm_01evtue._.js +36 -0
- package/.next/server/chunks/node_modules__pnpm_058qmaf._.js +36 -0
- package/.next/server/chunks/node_modules__pnpm_090g2s3._.js +3 -0
- package/.next/server/chunks/node_modules__pnpm_0of6.x_._.js +3 -0
- package/.next/server/chunks/node_modules__pnpm_0tui34u._.js +5 -0
- package/.next/server/chunks/node_modules__pnpm_11fyqx5._.js +15 -0
- package/.next/server/chunks/node_modules__pnpm_12rdsen._.js +36 -0
- package/.next/server/chunks/packages_070bs61._.js +3 -0
- package/.next/server/chunks/packages_0jmx5.-._.js +3 -0
- package/.next/server/chunks/packages_core_src_analytics-store_ts_03tqnqs._.js +3 -0
- package/.next/server/chunks/packages_core_src_embeddings_providers_ts_05f4_w-._.js +19 -0
- package/.next/server/chunks/packages_core_src_embeddings_registry_ts_031sc7-._.js +3 -0
- package/.next/server/chunks/packages_core_src_generator_generate-server_ts_0mt.je3._.js +1145 -0
- package/.next/server/chunks/packages_core_src_generator_server-runtime_ts_127f0ye._.js +648 -0
- package/.next/server/chunks/packages_core_src_index-store_ts_13sjtkb._.js +3 -0
- package/.next/server/chunks/packages_core_src_indexing_embedder_ts_0h75r~u._.js +20 -0
- package/.next/server/chunks/packages_core_src_media-store_ts_0v0lx36._.js +3 -0
- package/.next/server/chunks/packages_core_src_models-list_ts_03-odl5._.js +3 -0
- package/.next/server/chunks/packages_marketplace_src_0mxp_e3._.js +3 -0
- package/.next/server/chunks/packages_marketplace_src_storage-provider_ts_0mbs32-._.js +3 -0
- package/.next/server/chunks/packages_vector-stores_src_044u_tk._.js +3 -0
- package/.next/server/chunks/ssr/0ay0_framer-motion_dist_es_render_components_motion_proxy_mjs_00idub3._.js +3 -0
- package/.next/server/chunks/ssr/0gvc_next_dist_0e.uypd._.js +6 -0
- package/.next/server/chunks/ssr/0gvc_next_dist_client_components_0mj6fnc._.js +3 -0
- package/.next/server/chunks/ssr/0gvc_next_dist_client_components_builtin_forbidden_10qct8z.js +3 -0
- package/.next/server/chunks/ssr/0gvc_next_dist_client_components_builtin_global-error_0azu6.3.js +3 -0
- package/.next/server/chunks/ssr/0gvc_next_dist_client_components_builtin_unauthorized_03b6_.w.js +3 -0
- package/.next/server/chunks/ssr/0gvc_next_dist_esm_build_templates_app-page_0-imr0z.js +4 -0
- package/.next/server/chunks/ssr/0gvc_next_dist_esm_build_templates_app-page_00l31p..js +4 -0
- package/.next/server/chunks/ssr/0gvc_next_dist_esm_build_templates_app-page_0cjdc2w.js +4 -0
- package/.next/server/chunks/ssr/0gvc_next_dist_esm_build_templates_app-page_0fsrb82.js +4 -0
- package/.next/server/chunks/ssr/0gvc_next_dist_esm_build_templates_app-page_0l3eneq.js +4 -0
- package/.next/server/chunks/ssr/0gvc_next_dist_esm_build_templates_app-page_0l6387r.js +4 -0
- package/.next/server/chunks/ssr/0gvc_next_dist_esm_build_templates_app-page_0pk8tjk.js +4 -0
- package/.next/server/chunks/ssr/0hhw_pdfjs-dist_build_pdf_mjs_0emol.8._.js +47 -0
- package/.next/server/chunks/ssr/0ozc_@vercel_oidc_dist_token_0qkzh69.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__03nybtv._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__061054q._.js +33 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__0_lfs3c._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__0bxkvem._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__0ciwgj6._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__0f10~ff._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__0l9758p._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__0mib-aw._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__0o6u8a1._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__0q-0ign._.js +33 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__0u7t7hm._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__0yxrvhy._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__0z9yy2_._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__0zl.q74._.js +3 -0
- package/.next/server/chunks/ssr/[turbopack]_runtime.js +903 -0
- package/.next/server/chunks/ssr/_0-uky5v._.js +3 -0
- package/.next/server/chunks/ssr/_0007q7_._.js +3 -0
- package/.next/server/chunks/ssr/_003vid-._.js +3 -0
- package/.next/server/chunks/ssr/_03casre._.js +6 -0
- package/.next/server/chunks/ssr/_06imf71._.js +4 -0
- package/.next/server/chunks/ssr/_08uade7._.js +3 -0
- package/.next/server/chunks/ssr/_09~o4f.._.js +13 -0
- package/.next/server/chunks/ssr/_0_aolb-._.js +3 -0
- package/.next/server/chunks/ssr/_0_zom3a._.js +3 -0
- package/.next/server/chunks/ssr/_0erod4k._.js +3 -0
- package/.next/server/chunks/ssr/_0gh6844._.js +3 -0
- package/.next/server/chunks/ssr/_0h9s_hw._.js +3 -0
- package/.next/server/chunks/ssr/_0p1j64v._.js +3 -0
- package/.next/server/chunks/ssr/_0qi5c9~._.js +132 -0
- package/.next/server/chunks/ssr/_0qopd-r._.js +120 -0
- package/.next/server/chunks/ssr/_0s5_0n1._.js +3 -0
- package/.next/server/chunks/ssr/_11.lrfy._.js +6 -0
- package/.next/server/chunks/ssr/_13gucvb._.js +3 -0
- package/.next/server/chunks/ssr/apps_web__next-internal_server_app__global-error_page_actions_0.u5cfa.js +3 -0
- package/.next/server/chunks/ssr/apps_web__next-internal_server_app__not-found_page_actions_0appun9.js +3 -0
- package/.next/server/chunks/ssr/apps_web__next-internal_server_app_analytics_page_actions_04e3dmk.js +3 -0
- package/.next/server/chunks/ssr/apps_web__next-internal_server_app_chat_page_actions_0x9i55t.js +3 -0
- package/.next/server/chunks/ssr/apps_web__next-internal_server_app_data_page_actions_0f9t7xs.js +3 -0
- package/.next/server/chunks/ssr/apps_web__next-internal_server_app_page_actions_0rm5_5w.js +3 -0
- package/.next/server/chunks/ssr/apps_web_app_template_tsx_0.4m7c9._.js +3 -0
- package/.next/server/chunks/ssr/apps_web_app_template_tsx_0j2myib._.js +3 -0
- package/.next/server/chunks/ssr/apps_web_components_analytics_analytics-dashboard_tsx_0lrr85m._.js +3 -0
- package/.next/server/chunks/ssr/apps_web_components_ui_tabs_tsx_0435ww5._.js +3 -0
- package/.next/server/chunks/ssr/apps_web_lib_pdf-images_ts_0nzct~e._.js +3 -0
- package/.next/server/chunks/ssr/node_modules__pnpm_0auud-z._.js +3 -0
- package/.next/server/chunks/ssr/node_modules__pnpm_0efi01o._.js +3 -0
- package/.next/server/chunks/ssr/node_modules__pnpm_0ge5k63._.js +3 -0
- package/.next/server/chunks/ssr/node_modules__pnpm_0j6v-w5._.js +3 -0
- package/.next/server/chunks/ssr/node_modules__pnpm_0jmin55._.js +33 -0
- package/.next/server/chunks/ssr/node_modules__pnpm_0qjmu5-._.js +3 -0
- package/.next/server/chunks/ssr/node_modules__pnpm_0q~5d-e._.js +3 -0
- package/.next/server/chunks/ssr/node_modules__pnpm_0xnq.u3._.js +19 -0
- package/.next/server/chunks/ssr/packages_core_src_generator_generate-server_ts_0o.y7vi._.js +1145 -0
- package/.next/server/functions-config-manifest.json +52 -0
- package/.next/server/interception-route-rewrite-manifest.js +1 -0
- package/.next/server/middleware-build-manifest.js +22 -0
- package/.next/server/middleware-manifest.json +6 -0
- package/.next/server/next-font-manifest.js +1 -0
- package/.next/server/next-font-manifest.json +31 -0
- package/.next/server/pages/404.html +1 -0
- package/.next/server/pages/500.html +1 -0
- package/.next/server/pages-manifest.json +4 -0
- package/.next/server/prefetch-hints.json +1 -0
- package/.next/server/server-reference-manifest.js +1 -0
- package/.next/server/server-reference-manifest.json +42 -0
- package/.next/static/KqIuNxkoeAlhCusoxtMrS/_buildManifest.js +16 -0
- package/.next/static/KqIuNxkoeAlhCusoxtMrS/_clientMiddlewareManifest.js +1 -0
- package/.next/static/KqIuNxkoeAlhCusoxtMrS/_ssgManifest.js +1 -0
- package/.next/static/chunks/0-l-_.e4~p-tu.js +1 -0
- package/.next/static/chunks/00bdh97xa16uo.js +1 -0
- package/.next/static/chunks/00h-ng_jqta-2.js +1 -0
- package/.next/static/chunks/03jot0gqi~a10.js +1 -0
- package/.next/static/chunks/03~yq9q893hmn.js +1 -0
- package/.next/static/chunks/066jf0nk75nic.css +2 -0
- package/.next/static/chunks/06lztj0p4bq9f.js +31 -0
- package/.next/static/chunks/06mvsykkx_ufi.js +1 -0
- package/.next/static/chunks/090nmx8zs_1wf.js +1 -0
- package/.next/static/chunks/0_~l8kd_h3sbq.js +1 -0
- package/.next/static/chunks/0c-2rnxmjsotm.js +118 -0
- package/.next/static/chunks/0ho7lc.x2uknx.js +1 -0
- package/.next/static/chunks/0i-8kxwbvp9.l.js +129 -0
- package/.next/static/chunks/0l27y8_9hhe7s.js +4 -0
- package/.next/static/chunks/0q_qvc60_3aw4.js +1 -0
- package/.next/static/chunks/0r4ctb~yxw0ip.js +45 -0
- package/.next/static/chunks/0rp85cjcakb29.js +1 -0
- package/.next/static/chunks/0uawaqqylt5zw.css +1 -0
- package/.next/static/chunks/0ufxt21gvl.3g.js +1 -0
- package/.next/static/chunks/0vnayejbagbex.js +1 -0
- package/.next/static/chunks/0w6lgn24.0eip.js +1 -0
- package/.next/static/chunks/0wrbyfcre8l1-.js +1 -0
- package/.next/static/chunks/0xil-1~ra.qnv.js +1 -0
- package/.next/static/chunks/0zoh3o_.geqbv.js +1 -0
- package/.next/static/chunks/0~074ua5vk6f8.js +1 -0
- package/.next/static/chunks/0~_-3fik2n4-i.js +1 -0
- package/.next/static/chunks/10a_hianorzj3.js +1 -0
- package/.next/static/chunks/10k--lk9wf4pw.js +1 -0
- package/.next/static/chunks/14x~vj_4i-4bz.js +1 -0
- package/.next/static/chunks/15tyhmsp4jgmc.js +11 -0
- package/.next/static/chunks/16alfqkklv-bt.js +2 -0
- package/.next/static/chunks/176ixsksxtch_.js +1 -0
- package/.next/static/chunks/turbopack-06_~2vs.chjg_.js +1 -0
- package/.next/static/media/4fa387ec64143e14-s.0wkzw~je483f-.woff2 +0 -0
- package/.next/static/media/53b9e256198e5412-s.0-wfv7uh4i7h9.woff2 +0 -0
- package/.next/static/media/5ce348bf30bf5439-s.0zgw-jeven.3w.woff2 +0 -0
- package/.next/static/media/6306c77e7c8268e4-s.0rhz0arwfsn~5.woff2 +0 -0
- package/.next/static/media/7178b3e590c64307-s.0nx0ww8fni_q3.woff2 +0 -0
- package/.next/static/media/797e433ab948586e-s.p.08e28id.o-okb.woff2 +0 -0
- package/.next/static/media/7d817b4c03b0c5f1-s.0l76wvqk9d84w.woff2 +0 -0
- package/.next/static/media/8a480f0b521d4e75-s.0jzbimsg8vl84.woff2 +0 -0
- package/.next/static/media/bbc41e54d2fcbd21-s.0k4k9394f2q-k.woff2 +0 -0
- package/.next/static/media/caa3a2e1cccd8315-s.p.09~u27dqhyhd6.woff2 +0 -0
- package/.next/static/media/favicon.01rzdfen4476b.ico +0 -0
- package/.next/static/media/fef07dbb0973bf53-s.12tyk43_3sh9u.woff2 +0 -0
- package/.next/types/cache-life.d.ts +145 -0
- package/.next/types/routes.d.ts +136 -0
- package/.next/types/validator.ts +637 -0
- package/CHANGELOG.md +24 -0
- package/LICENSE +176 -0
- package/app/actions/vercel.ts +325 -152
- package/app/analytics/page.tsx +19 -0
- package/app/api/analytics/route.ts +31 -0
- package/app/api/chat/route.ts +331 -145
- package/app/api/chat/status/route.ts +73 -22
- package/app/api/chat/suggestions/route.ts +61 -48
- package/app/api/chat/tools.ts +995 -0
- package/app/api/config/route.ts +56 -32
- package/app/api/config/test/route.ts +33 -32
- package/app/api/config/test-llm/route.ts +9 -10
- package/app/api/config/verify/route.ts +315 -0
- package/app/api/connections/route.ts +39 -0
- package/app/api/connections/webhook/route.ts +43 -0
- package/app/api/demo/route.ts +32 -44
- package/app/api/deploy/cloud-project/route.ts +125 -0
- package/app/api/deploy/ssh/route.ts +173 -132
- package/app/api/deployment/blob-setup/route.ts +28 -0
- package/app/api/deployment/config/route.ts +23 -0
- package/app/api/describe-image/route.ts +84 -0
- package/app/api/doc-editor/edit/route.ts +88 -0
- package/app/api/doc-editor/export/route.ts +33 -0
- package/app/api/doc-editor/extract-text/route.ts +41 -0
- package/app/api/doc-editor/parse/route.ts +66 -0
- package/app/api/doc-editor/restore/route.ts +74 -0
- package/app/api/document/sign/route.ts +56 -0
- package/app/api/documents/route.ts +185 -35
- package/app/api/firecrawl/local/route.ts +63 -23
- package/app/api/index/route.ts +73 -59
- package/app/api/integrations/notion/callback/route.ts +121 -0
- package/app/api/integrations/notion/route.ts +304 -0
- package/app/api/jobs/route.ts +45 -47
- package/app/api/marketplace/[toolId]/route.ts +70 -0
- package/app/api/marketplace/route.ts +32 -0
- package/app/api/media/[id]/route.ts +108 -0
- package/app/api/media/process/route.ts +1242 -0
- package/app/api/media/route.ts +284 -0
- package/app/api/media/stream/route.ts +113 -0
- package/app/api/models/route.ts +23 -0
- package/app/api/proxy/verify/route.ts +66 -0
- package/app/api/sandbox/route.ts +59 -0
- package/app/api/search/bing/route.ts +87 -0
- package/app/api/search/brave/route.ts +89 -0
- package/app/api/search/exa/route.ts +101 -0
- package/app/api/search/google/route.ts +16 -29
- package/app/api/search/tavily/route.ts +94 -0
- package/app/api/search/verify/route.ts +28 -0
- package/app/api/server/agent/route.ts +41 -0
- package/app/api/server/download/route.ts +42 -34
- package/app/api/server/generate/route.ts +23 -23
- package/app/api/servers/route.ts +46 -62
- package/app/api/tabular/query/route.ts +26 -0
- package/app/api/tabular/route.ts +63 -0
- package/app/api/upload-file/route.ts +38 -0
- package/app/api/uploads/[...slug]/route.ts +90 -0
- package/app/api/vector-stores/install/route.ts +5 -6
- package/app/api/vector-stores/status/route.ts +9 -7
- package/app/chat/page.tsx +4 -8
- package/app/data/page.tsx +15 -8
- package/app/globals.css +150 -22
- package/app/layout.tsx +19 -17
- package/app/page.tsx +3 -32
- package/app/settings/page.tsx +80 -0
- package/app/themes.css +38 -2
- package/archive/redesign-v2/app/configure/page.tsx +53 -0
- package/archive/redesign-v2/app/demo/page.tsx +15 -0
- package/archive/redesign-v2/app/server/page.tsx +22 -0
- package/archive/redesign-v2/app/simple/chat/page.tsx +17 -0
- package/archive/redesign-v2/app/simple/docs/page.tsx +21 -0
- package/archive/redesign-v2/app/simple/settings/page.tsx +1104 -0
- package/{app → archive/redesign-v2/app-routes}/server/page.tsx +2 -2
- package/archive/redesign-v2/app-routes/simple/settings/page.tsx +1104 -0
- package/archive/redesign-v2/components/app-sidebar.tsx +188 -0
- package/archive/redesign-v2/components/app-topnav.tsx +195 -0
- package/archive/redesign-v2/components/global-settings.tsx +288 -0
- package/archive/redesign-v2/components/simple/simple-sidebar.tsx +171 -0
- package/archive/redesign-v2/components/simple/simple-topnav.tsx +175 -0
- package/bin/larkup.js +28 -0
- package/components/analytics/analytics-dashboard.tsx +504 -0
- package/components/app-sidebar.tsx +46 -57
- package/components/app-topnav.tsx +64 -150
- package/components/chat/canvas/doc-editor-provider.tsx +343 -0
- package/components/chat/canvas/document-canvas.tsx +102 -0
- package/components/chat/canvas/document-field.tsx +171 -0
- package/components/chat/canvas/document-viewer.tsx +453 -0
- package/components/chat/canvas/file-attachment-button.tsx +88 -0
- package/components/chat/canvas/file-chip.tsx +151 -0
- package/components/chat/chat-settings-modal.tsx +253 -149
- package/components/chat/chat-workspace.tsx +961 -149
- package/components/chat/message-item.tsx +935 -71
- package/components/chat/tools/chat-card.tsx +116 -0
- package/components/chat/tools/chat-chart.tsx +548 -0
- package/components/chat/tools/chat-data-table.tsx +370 -0
- package/components/chat/tools/chat-grid.tsx +99 -0
- package/components/chat/tools/chat-media-preview.tsx +246 -0
- package/components/chat/tools/chat-metrics.tsx +76 -0
- package/components/chat/tools/chat-sandbox-result.tsx +175 -0
- package/components/chat/tools/chat-signature-request.tsx +809 -0
- package/components/chat/tools/chat-tabs.tsx +66 -0
- package/components/chat/tools/corpus-data-result.tsx +206 -0
- package/components/chat/tools/knowledge-base-result.tsx +135 -0
- package/components/chat/tools/visual-placement-modal.tsx +316 -0
- package/components/chat/tools/visualization-tabs.tsx +37 -0
- package/components/client-layout-wrapper.tsx +52 -124
- package/components/configure/configure-form.tsx +301 -530
- package/components/configure/custom-model-modal.tsx +205 -0
- package/components/configure/store-fields.tsx +4 -1
- package/components/data/corpus-panel.tsx +329 -137
- package/components/data/data-workspace.tsx +428 -185
- package/components/data/firecrawl-notice.tsx +94 -122
- package/components/data/integrations-panel.tsx +408 -0
- package/components/data/jobs-panel.tsx +83 -105
- package/components/data/media-panel.tsx +1701 -0
- package/components/data/notion-panel.tsx +372 -0
- package/components/data/paste-panel.tsx +4 -3
- package/components/data/scrape-panel.tsx +389 -343
- package/components/data/tabular-preview.tsx +228 -0
- package/components/data/upload-panel.tsx +500 -206
- package/components/demo/demo-workspace.tsx +50 -83
- package/components/global-settings.tsx +71 -108
- package/components/index/global-index-progress.tsx +46 -0
- package/components/index/index-action-dialog.tsx +545 -0
- package/components/index/index-workspace.tsx +138 -219
- package/components/onboarding/simple-setup.tsx +126 -180
- package/components/onboarding/welcome-screen.tsx +428 -157
- package/components/server/deploy-button.tsx +95 -1233
- package/components/server/deploy-sheet.tsx +1061 -0
- package/components/server/server-workspace.tsx +62 -95
- package/components/settings/appearance-section.tsx +300 -0
- package/components/settings/connections-section.tsx +471 -0
- package/components/settings/deploy-section.tsx +24 -0
- package/components/settings/deployment-section.tsx +430 -0
- package/components/settings/general-section.tsx +734 -0
- package/components/settings/marketplace-section.tsx +385 -0
- package/components/settings/marketplace-tools-settings.tsx +436 -0
- package/components/settings/models-section.tsx +810 -0
- package/components/settings/playground-section.tsx +17 -0
- package/components/settings/prompts-section.tsx +384 -0
- package/components/settings/server-section.tsx +808 -0
- package/components/settings/settings-layout.tsx +147 -0
- package/components/settings/storage-section.tsx +394 -0
- package/components/simple/sdk-connect-dialog.tsx +38 -33
- package/components/simple/simple-sidebar.tsx +69 -72
- package/components/simple/simple-topnav.tsx +154 -0
- package/components/theme-customizer-provider.tsx +56 -79
- package/components/theme-switcher.tsx +92 -114
- package/components/ui/button.tsx +11 -13
- package/components/ui/card.tsx +17 -17
- package/components/ui/checkbox.tsx +5 -5
- package/components/ui/dialog.tsx +1 -1
- package/components/ui/dropdown-menu.tsx +24 -38
- package/components/ui/input.tsx +2 -2
- package/components/ui/popover.tsx +21 -34
- package/components/ui/provider-icon.tsx +88 -17
- package/components/ui/select.tsx +44 -61
- package/components/ui/sheet.tsx +33 -46
- package/components/ui/slider.tsx +52 -0
- package/components/ui/sonner.tsx +23 -36
- package/components/ui/table.tsx +19 -19
- package/components/ui/tabs.tsx +17 -24
- package/components/ui/textarea.tsx +4 -4
- package/components/unified-sidebar.tsx +222 -0
- package/components/update-banner.tsx +203 -0
- package/components/workspace/server-form-dialog.tsx +7 -7
- package/components/workspace/server-switcher.tsx +15 -37
- package/hooks/use-notion-auth.ts +60 -0
- package/lib/chat-model-provider.ts +115 -0
- package/lib/deployments.ts +119 -0
- package/lib/env-utils.ts +27 -0
- package/lib/media-knowledge.ts +431 -0
- package/lib/os-concurrency.ts +37 -0
- package/lib/pdf-images.ts +80 -0
- package/lib/search-provider-verification.ts +95 -0
- package/next.config.mjs +19 -2
- package/package.json +37 -20
- package/parse_log.mjs +67 -0
- package/public/icons/Confluence.png +0 -0
- package/public/icons/Salesforce.png +0 -0
- package/public/icons/audio.png +0 -0
- package/public/icons/bing.png +0 -0
- package/public/icons/brave.png +0 -0
- package/public/icons/deepgram.png +0 -0
- package/public/icons/discord.png +0 -0
- package/public/icons/elevenlabs.png +0 -0
- package/public/icons/exa.png +0 -0
- package/public/icons/excel.png +0 -0
- package/public/icons/fal.png +0 -0
- package/public/icons/firecrawl.png +0 -0
- package/public/icons/google-calender.png +0 -0
- package/public/icons/google-drive.png +0 -0
- package/public/icons/google.png +0 -0
- package/public/icons/grok.png +0 -0
- package/public/icons/image.png +0 -0
- package/public/icons/jira.png +0 -0
- package/public/icons/linear.png +0 -0
- package/public/icons/markdown.png +0 -0
- package/public/icons/onedrive.png +0 -0
- package/public/icons/outlook.png +0 -0
- package/public/icons/pdf.png +0 -0
- package/public/icons/revai.png +0 -0
- package/public/icons/revai.svg +1 -0
- package/public/icons/sap.png +0 -0
- package/public/icons/serpapi.svg +34 -0
- package/public/icons/serper.png +0 -0
- package/public/icons/sharepoint.png +0 -0
- package/public/icons/slack.png +0 -0
- package/public/icons/tavily.png +0 -0
- package/public/icons/telegram.png +0 -0
- package/public/icons/video.png +0 -0
- package/public/icons/webhook.png +0 -0
- package/public/icons/whatsapp.png +0 -0
- package/public/icons/word.png +0 -0
- package/public/logo-light2.png +0 -0
- package/public/logo.png +0 -0
- package/public/notion-white.png +0 -0
- package/public/notion.png +0 -0
- package/store/chat-store.ts +19 -0
- package/store/scrape-store.ts +78 -0
- package/tsconfig.json +1 -1
- package/verify-models.mjs +133 -0
- package/.env +0 -2
- package/app/index-data/page.tsx +0 -15
- package/app/simple/settings/page.tsx +0 -627
- package/components/chat/knowledge-base-result.tsx +0 -97
- /package/{app → archive/redesign-v2/app-routes}/configure/page.tsx +0 -0
- /package/{app → archive/redesign-v2/app-routes}/demo/page.tsx +0 -0
- /package/{app → archive/redesign-v2/app-routes}/simple/chat/page.tsx +0 -0
- /package/{app → archive/redesign-v2/app-routes}/simple/docs/page.tsx +0 -0
- /package/{app → archive/redesign-v2/app-routes}/simple/layout.tsx +0 -0
|
@@ -0,0 +1,1701 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import { useRef, useState, useEffect } from 'react';
|
|
4
|
+
import useSWR from 'swr';
|
|
5
|
+
import { toast } from 'sonner';
|
|
6
|
+
import { formatErrorMessage } from '@/lib/error-formatter';
|
|
7
|
+
import {
|
|
8
|
+
Image as ImageIcon,
|
|
9
|
+
Video,
|
|
10
|
+
AudioLines,
|
|
11
|
+
Loader2,
|
|
12
|
+
X,
|
|
13
|
+
Upload,
|
|
14
|
+
FileUp,
|
|
15
|
+
Check,
|
|
16
|
+
AlertCircle,
|
|
17
|
+
Clock,
|
|
18
|
+
Trash2,
|
|
19
|
+
Store,
|
|
20
|
+
Link2,
|
|
21
|
+
Sparkles,
|
|
22
|
+
} from 'lucide-react';
|
|
23
|
+
import { Button } from '@/components/ui/button';
|
|
24
|
+
import { cn } from '@/lib/utils';
|
|
25
|
+
import { Progress } from '@/components/ui/progress';
|
|
26
|
+
import { Textarea } from '@/components/ui/textarea';
|
|
27
|
+
import { Input } from '@/components/ui/input';
|
|
28
|
+
import { useWorkspace } from '@/components/workspace/workspace-provider';
|
|
29
|
+
import Link from 'next/link';
|
|
30
|
+
import { useRouter } from 'next/navigation';
|
|
31
|
+
import {
|
|
32
|
+
Dialog,
|
|
33
|
+
DialogContent,
|
|
34
|
+
DialogHeader,
|
|
35
|
+
DialogTitle,
|
|
36
|
+
DialogTrigger,
|
|
37
|
+
} from '@/components/ui/dialog';
|
|
38
|
+
|
|
39
|
+
/* ------------------------------------------------------------------ */
|
|
40
|
+
/* Types */
|
|
41
|
+
/* ------------------------------------------------------------------ */
|
|
42
|
+
|
|
43
|
+
type MediaSubTab = 'images' | 'video' | 'audio';
|
|
44
|
+
type MediaPipelineStage = 'download' | 'extract' | 'transcribe' | 'vision' | 'synthesize' | 'index';
|
|
45
|
+
|
|
46
|
+
interface MediaProcessingStep {
|
|
47
|
+
stage: MediaPipelineStage;
|
|
48
|
+
status: 'waiting' | 'running' | 'completed' | 'skipped' | 'failed';
|
|
49
|
+
percent?: number;
|
|
50
|
+
current?: number;
|
|
51
|
+
total?: number;
|
|
52
|
+
unit?: string;
|
|
53
|
+
message?: string;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
interface MediaAsset {
|
|
57
|
+
id: string;
|
|
58
|
+
type: 'image' | 'video' | 'audio';
|
|
59
|
+
fileName: string;
|
|
60
|
+
mimeType: string;
|
|
61
|
+
storageUri: string;
|
|
62
|
+
thumbnailUri?: string;
|
|
63
|
+
fileSize: number;
|
|
64
|
+
processingStatus: 'pending' | 'processing' | 'completed' | 'failed';
|
|
65
|
+
processingError?: string;
|
|
66
|
+
processingMessage?: string;
|
|
67
|
+
processingProgress?: number;
|
|
68
|
+
processingSteps?: MediaProcessingStep[];
|
|
69
|
+
processingRevision?: number;
|
|
70
|
+
caption?: string;
|
|
71
|
+
documentIds: string[];
|
|
72
|
+
createdAt: string;
|
|
73
|
+
dimensions?: { width: number; height: number };
|
|
74
|
+
durationSecs?: number;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
interface StagedMedia {
|
|
78
|
+
id: string;
|
|
79
|
+
file: File;
|
|
80
|
+
type: 'image' | 'video' | 'audio';
|
|
81
|
+
preview?: string;
|
|
82
|
+
durationSecs?: number;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
interface RemoteEstimate {
|
|
86
|
+
originalUrl: string;
|
|
87
|
+
title?: string;
|
|
88
|
+
durationSecs?: number;
|
|
89
|
+
entryCount?: number;
|
|
90
|
+
mediaType: 'video' | 'audio' | 'unknown';
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
interface MediaApiResponse {
|
|
94
|
+
assets: MediaAsset[];
|
|
95
|
+
stats: {
|
|
96
|
+
total: number;
|
|
97
|
+
byType: Record<string, number>;
|
|
98
|
+
byStatus: Record<string, number>;
|
|
99
|
+
totalBytes: number;
|
|
100
|
+
};
|
|
101
|
+
storage: { usedBytes: number; fileCount: number };
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
let globalStagedMedia: Record<string, StagedMedia[]> = { image: [], video: [], audio: [] };
|
|
105
|
+
|
|
106
|
+
/* ------------------------------------------------------------------ */
|
|
107
|
+
/* Helpers */
|
|
108
|
+
/* ------------------------------------------------------------------ */
|
|
109
|
+
|
|
110
|
+
function formatSize(bytes: number): string {
|
|
111
|
+
if (bytes < 1024) return `${bytes} B`;
|
|
112
|
+
if (bytes < 1024 * 1024) return `${(bytes / 1024).toFixed(1)} KB`;
|
|
113
|
+
if (bytes < 1024 * 1024 * 1024) return `${(bytes / (1024 * 1024)).toFixed(1)} MB`;
|
|
114
|
+
return `${(bytes / (1024 * 1024 * 1024)).toFixed(2)} GB`;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
function mediaAssetUrl(assetId: string, serverId?: string, thumbnail = false): string {
|
|
118
|
+
const query = new URLSearchParams();
|
|
119
|
+
if (thumbnail) query.set('thumb', 'true');
|
|
120
|
+
if (serverId) query.set('serverId', serverId);
|
|
121
|
+
const suffix = query.toString();
|
|
122
|
+
return `/api/media/${assetId}${suffix ? `?${suffix}` : ''}`;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
function getMediaType(file: File): 'image' | 'video' | 'audio' | null {
|
|
126
|
+
if (file.type.startsWith('image/')) return 'image';
|
|
127
|
+
if (file.type.startsWith('video/')) return 'video';
|
|
128
|
+
if (file.type.startsWith('audio/')) return 'audio';
|
|
129
|
+
return null;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
function estimateMedia(durationSecs: number, isVideo: boolean) {
|
|
133
|
+
const minutes = durationSecs / 60;
|
|
134
|
+
const visualWindowSecs =
|
|
135
|
+
durationSecs >= 4 * 60 * 60 ? 15 * 60 : durationSecs > 60 * 60 ? 5 * 60 : 60;
|
|
136
|
+
return {
|
|
137
|
+
transcriptionCost: minutes * 0.006,
|
|
138
|
+
processingMinutes: Math.max(1, Math.ceil(minutes * (isVideo ? 0.35 : 0.2))),
|
|
139
|
+
visualScenes: isVideo ? Math.max(1, Math.ceil(durationSecs / visualWindowSecs)) : 0,
|
|
140
|
+
};
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
function readMediaDuration(file: File): Promise<number | undefined> {
|
|
144
|
+
return new Promise((resolve) => {
|
|
145
|
+
const element = document.createElement(file.type.startsWith('video/') ? 'video' : 'audio');
|
|
146
|
+
const url = URL.createObjectURL(file);
|
|
147
|
+
element.preload = 'metadata';
|
|
148
|
+
element.onloadedmetadata = () => {
|
|
149
|
+
URL.revokeObjectURL(url);
|
|
150
|
+
resolve(Number.isFinite(element.duration) ? element.duration : undefined);
|
|
151
|
+
};
|
|
152
|
+
element.onerror = () => {
|
|
153
|
+
URL.revokeObjectURL(url);
|
|
154
|
+
resolve(undefined);
|
|
155
|
+
};
|
|
156
|
+
element.src = url;
|
|
157
|
+
});
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
const SUB_TABS: { id: MediaSubTab; label: string; icon: typeof ImageIcon; accept: string }[] = [
|
|
161
|
+
{ id: 'images', label: 'Images', icon: ImageIcon, accept: 'image/*' },
|
|
162
|
+
{ id: 'video', label: 'Video', icon: Video, accept: 'video/*' },
|
|
163
|
+
{ id: 'audio', label: 'Audio', icon: AudioLines, accept: 'audio/*' },
|
|
164
|
+
];
|
|
165
|
+
|
|
166
|
+
const TAB_TO_TYPE: Record<MediaSubTab, 'image' | 'video' | 'audio'> = {
|
|
167
|
+
images: 'image',
|
|
168
|
+
video: 'video',
|
|
169
|
+
audio: 'audio',
|
|
170
|
+
};
|
|
171
|
+
|
|
172
|
+
const fetcher = (url: string) => fetch(url).then((r) => r.json() as Promise<MediaApiResponse>);
|
|
173
|
+
|
|
174
|
+
const toolFetcher = (url: string) => fetch(url).then((r) => r.json() as Promise<{ tools: any[] }>);
|
|
175
|
+
|
|
176
|
+
function isActiveJob(asset: MediaAsset): boolean {
|
|
177
|
+
return (
|
|
178
|
+
asset.processingStatus === 'processing' ||
|
|
179
|
+
(asset.processingStatus === 'pending' && Boolean(asset.processingMessage))
|
|
180
|
+
);
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
const INDEXING_PROGRESS_CLASS =
|
|
184
|
+
'[&_[data-slot=progress-indicator]]:bg-emerald-500 dark:[&_[data-slot=progress-indicator]]:bg-emerald-400';
|
|
185
|
+
|
|
186
|
+
/* ------------------------------------------------------------------ */
|
|
187
|
+
/* Main component */
|
|
188
|
+
/* ------------------------------------------------------------------ */
|
|
189
|
+
|
|
190
|
+
export function MediaPanel({
|
|
191
|
+
onAdded,
|
|
192
|
+
onIndexed,
|
|
193
|
+
}: {
|
|
194
|
+
onAdded: () => void;
|
|
195
|
+
onIndexed: (asset: MediaAsset) => void;
|
|
196
|
+
}) {
|
|
197
|
+
const [activeTab, setActiveTab] = useState<MediaSubTab>('images');
|
|
198
|
+
const mediaType = TAB_TO_TYPE[activeTab];
|
|
199
|
+
const previousStatusesRef = useRef<Map<string, MediaAsset['processingStatus']> | null>(null);
|
|
200
|
+
const { activeServer } = useWorkspace();
|
|
201
|
+
const serverId = activeServer?.id;
|
|
202
|
+
const serverQuery = serverId ? `&serverId=${encodeURIComponent(serverId)}` : '';
|
|
203
|
+
const router = useRouter();
|
|
204
|
+
|
|
205
|
+
const { data, mutate, isLoading } = useSWR(`/api/media?type=${mediaType}${serverQuery}`, fetcher);
|
|
206
|
+
|
|
207
|
+
useEffect(() => {
|
|
208
|
+
previousStatusesRef.current = null;
|
|
209
|
+
const stream = new EventSource(`/api/media/stream?type=${mediaType}${serverQuery}`);
|
|
210
|
+
let fallbackTimer: ReturnType<typeof setInterval> | undefined;
|
|
211
|
+
const handleUpdate = (event: MessageEvent<string>) => {
|
|
212
|
+
try {
|
|
213
|
+
const nextData = JSON.parse(event.data) as MediaApiResponse;
|
|
214
|
+
const previousStatuses = previousStatusesRef.current;
|
|
215
|
+
const nextStatuses = new Map(
|
|
216
|
+
nextData.assets.map((asset) => [asset.id, asset.processingStatus]),
|
|
217
|
+
);
|
|
218
|
+
|
|
219
|
+
// The first SSE snapshot establishes the baseline. Subsequent updates
|
|
220
|
+
// let us react only to a job that just finished, not old completed media.
|
|
221
|
+
if (previousStatuses) {
|
|
222
|
+
for (const asset of nextData.assets) {
|
|
223
|
+
const previousStatus = previousStatuses.get(asset.id);
|
|
224
|
+
if (
|
|
225
|
+
asset.processingStatus === 'completed' &&
|
|
226
|
+
(previousStatus === 'pending' || previousStatus === 'processing')
|
|
227
|
+
) {
|
|
228
|
+
onIndexed(asset);
|
|
229
|
+
try {
|
|
230
|
+
const ctx = new (window.AudioContext || (window as any).webkitAudioContext)();
|
|
231
|
+
const osc = ctx.createOscillator();
|
|
232
|
+
const gain = ctx.createGain();
|
|
233
|
+
osc.connect(gain);
|
|
234
|
+
gain.connect(ctx.destination);
|
|
235
|
+
osc.type = 'sine';
|
|
236
|
+
osc.frequency.setValueAtTime(880, ctx.currentTime);
|
|
237
|
+
gain.gain.setValueAtTime(0.05, ctx.currentTime);
|
|
238
|
+
gain.gain.exponentialRampToValueAtTime(0.001, ctx.currentTime + 0.1);
|
|
239
|
+
osc.start(ctx.currentTime);
|
|
240
|
+
osc.stop(ctx.currentTime + 0.1);
|
|
241
|
+
} catch (e) {
|
|
242
|
+
// Ignore audio context errors
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
if (
|
|
246
|
+
asset.processingStatus === 'failed' &&
|
|
247
|
+
(previousStatus === 'pending' || previousStatus === 'processing')
|
|
248
|
+
) {
|
|
249
|
+
const msg = asset.processingMessage || `Failed to index ${asset.fileName}`;
|
|
250
|
+
if (
|
|
251
|
+
msg.toLowerCase().includes('api key') ||
|
|
252
|
+
msg.toLowerCase().includes('configuration') ||
|
|
253
|
+
msg.toLowerCase().includes('missing provider') ||
|
|
254
|
+
msg.toLowerCase().includes('choose an audio provider')
|
|
255
|
+
) {
|
|
256
|
+
toast.error(`Indexing failed: ${asset.fileName}`, {
|
|
257
|
+
description: msg,
|
|
258
|
+
duration: 10000,
|
|
259
|
+
action: {
|
|
260
|
+
label: 'Go to Settings',
|
|
261
|
+
onClick: () => router.push('/settings?section=tool-settings'),
|
|
262
|
+
},
|
|
263
|
+
});
|
|
264
|
+
} else {
|
|
265
|
+
toast.error(`Indexing failed: ${asset.fileName}`, {
|
|
266
|
+
description: msg,
|
|
267
|
+
duration: 8000,
|
|
268
|
+
});
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
previousStatusesRef.current = nextStatuses;
|
|
274
|
+
void mutate(nextData, { revalidate: false });
|
|
275
|
+
} catch {
|
|
276
|
+
// Ignore a malformed update and keep the last successful snapshot.
|
|
277
|
+
}
|
|
278
|
+
};
|
|
279
|
+
|
|
280
|
+
stream.onopen = () => {
|
|
281
|
+
if (fallbackTimer) clearInterval(fallbackTimer);
|
|
282
|
+
fallbackTimer = undefined;
|
|
283
|
+
};
|
|
284
|
+
stream.onerror = () => {
|
|
285
|
+
void mutate();
|
|
286
|
+
fallbackTimer ??= setInterval(() => void mutate(), 5_000);
|
|
287
|
+
};
|
|
288
|
+
stream.addEventListener('media-update', handleUpdate);
|
|
289
|
+
return () => {
|
|
290
|
+
if (fallbackTimer) clearInterval(fallbackTimer);
|
|
291
|
+
stream.removeEventListener('media-update', handleUpdate);
|
|
292
|
+
stream.close();
|
|
293
|
+
};
|
|
294
|
+
}, [mediaType, mutate, onIndexed, serverQuery]);
|
|
295
|
+
|
|
296
|
+
const { data: toolsData, mutate: mutateTools } = useSWR('/api/marketplace', toolFetcher);
|
|
297
|
+
|
|
298
|
+
const configUrl = serverId
|
|
299
|
+
? `/api/config?serverId=${encodeURIComponent(serverId)}`
|
|
300
|
+
: '/api/config';
|
|
301
|
+
const { data: configData } = useSWR(configUrl, (url) => fetch(url).then((r) => r.json()));
|
|
302
|
+
|
|
303
|
+
// Check if Video & Audio tool is installed and enabled
|
|
304
|
+
const videoAudioTool = toolsData?.tools?.find((t: any) => t.id === 'video-audio');
|
|
305
|
+
const isToolInstalled = videoAudioTool?.status === 'installed';
|
|
306
|
+
const enabledTools = configData?.config?.enabledTools;
|
|
307
|
+
const isToolEnabled = enabledTools
|
|
308
|
+
? enabledTools.length === 0 || enabledTools.includes('video-audio')
|
|
309
|
+
: true;
|
|
310
|
+
|
|
311
|
+
const needsTool = activeTab !== 'images' && !isToolInstalled;
|
|
312
|
+
const isToolDisabled = activeTab !== 'images' && isToolInstalled && !isToolEnabled;
|
|
313
|
+
|
|
314
|
+
const assets = data?.assets ?? [];
|
|
315
|
+
const storageBytes = data?.storage?.usedBytes ?? 0;
|
|
316
|
+
|
|
317
|
+
return (
|
|
318
|
+
<div className="space-y-5">
|
|
319
|
+
{/* Sub-tab navigation */}
|
|
320
|
+
<div className="flex flex-wrap items-center justify-between gap-4 mb-2">
|
|
321
|
+
<div className="flex items-center gap-1 border border-border/90 rounded-lg bg-muted/60 p-1">
|
|
322
|
+
{SUB_TABS.map((tab) => {
|
|
323
|
+
const Icon = tab.icon;
|
|
324
|
+
const isActive = activeTab === tab.id;
|
|
325
|
+
const count = data?.stats?.byType?.[TAB_TO_TYPE[tab.id]] ?? 0;
|
|
326
|
+
|
|
327
|
+
return (
|
|
328
|
+
<button
|
|
329
|
+
key={tab.id}
|
|
330
|
+
type="button"
|
|
331
|
+
onClick={() => setActiveTab(tab.id)}
|
|
332
|
+
className={cn(
|
|
333
|
+
'relative flex items-center gap-1.5 px-3 py-1.5 text-[13px] font-medium transition-all duration-200 rounded-md',
|
|
334
|
+
isActive
|
|
335
|
+
? 'bg-background text-foreground ring-1 ring-border'
|
|
336
|
+
: 'text-muted-foreground hover:text-foreground hover:bg-muted/80',
|
|
337
|
+
)}
|
|
338
|
+
>
|
|
339
|
+
<Icon className="size-3.5" strokeWidth={isActive ? 2 : 1.75} />
|
|
340
|
+
{tab.label}
|
|
341
|
+
{count > 0 && (
|
|
342
|
+
<span
|
|
343
|
+
className={cn(
|
|
344
|
+
'flex h-4 items-center justify-center rounded-full px-1.5 text-[10px] tabular-nums',
|
|
345
|
+
isActive
|
|
346
|
+
? 'bg-secondary text-secondary-foreground'
|
|
347
|
+
: 'bg-secondary/50 text-muted-foreground',
|
|
348
|
+
)}
|
|
349
|
+
>
|
|
350
|
+
{count}
|
|
351
|
+
</span>
|
|
352
|
+
)}
|
|
353
|
+
</button>
|
|
354
|
+
);
|
|
355
|
+
})}
|
|
356
|
+
</div>
|
|
357
|
+
|
|
358
|
+
{/* Storage usage (subtle) */}
|
|
359
|
+
{storageBytes > 0 && (
|
|
360
|
+
<div className="text-[11px] text-muted-foreground/50 tabular-nums">
|
|
361
|
+
{formatSize(storageBytes)} used
|
|
362
|
+
</div>
|
|
363
|
+
)}
|
|
364
|
+
</div>
|
|
365
|
+
|
|
366
|
+
{/* Content: either install prompt or upload + gallery */}
|
|
367
|
+
{needsTool ? (
|
|
368
|
+
<InstallPrompt
|
|
369
|
+
toolId="video-audio"
|
|
370
|
+
toolName={videoAudioTool?.name ?? 'Video & Audio'}
|
|
371
|
+
toolDescription={
|
|
372
|
+
videoAudioTool?.description ??
|
|
373
|
+
'Process video and audio files with transcription and frame analysis.'
|
|
374
|
+
}
|
|
375
|
+
installSize={videoAudioTool?.installSize ?? '~15 MB'}
|
|
376
|
+
systemDeps={videoAudioTool?.systemDeps}
|
|
377
|
+
onInstallComplete={() => mutateTools()}
|
|
378
|
+
/>
|
|
379
|
+
) : isToolDisabled ? (
|
|
380
|
+
<DisabledPrompt />
|
|
381
|
+
) : (
|
|
382
|
+
<MediaContent
|
|
383
|
+
mediaType={mediaType}
|
|
384
|
+
tab={activeTab}
|
|
385
|
+
assets={assets}
|
|
386
|
+
isLoading={isLoading}
|
|
387
|
+
storageUsedBytes={data?.storage?.usedBytes ?? 0}
|
|
388
|
+
serverId={serverId}
|
|
389
|
+
onMutate={() => mutate()}
|
|
390
|
+
onUploadComplete={() => {
|
|
391
|
+
mutate();
|
|
392
|
+
onAdded();
|
|
393
|
+
}}
|
|
394
|
+
/>
|
|
395
|
+
)}
|
|
396
|
+
</div>
|
|
397
|
+
);
|
|
398
|
+
}
|
|
399
|
+
|
|
400
|
+
/* ------------------------------------------------------------------ */
|
|
401
|
+
/* Install prompt (for Video & Audio tab when tool not installed) */
|
|
402
|
+
/* ------------------------------------------------------------------ */
|
|
403
|
+
|
|
404
|
+
function InstallPrompt({
|
|
405
|
+
toolId,
|
|
406
|
+
toolName,
|
|
407
|
+
toolDescription,
|
|
408
|
+
installSize,
|
|
409
|
+
systemDeps,
|
|
410
|
+
onInstallComplete,
|
|
411
|
+
}: {
|
|
412
|
+
toolId: string;
|
|
413
|
+
toolName: string;
|
|
414
|
+
toolDescription: string;
|
|
415
|
+
installSize: string;
|
|
416
|
+
systemDeps?: string[];
|
|
417
|
+
onInstallComplete: () => void;
|
|
418
|
+
}) {
|
|
419
|
+
const [installing, setInstalling] = useState(false);
|
|
420
|
+
|
|
421
|
+
const handleInstall = async () => {
|
|
422
|
+
setInstalling(true);
|
|
423
|
+
try {
|
|
424
|
+
const res = await fetch(`/api/marketplace/${toolId}`, {
|
|
425
|
+
method: 'POST',
|
|
426
|
+
});
|
|
427
|
+
if (!res.ok) {
|
|
428
|
+
const err = await res.json();
|
|
429
|
+
throw new Error(err.error || 'Install failed');
|
|
430
|
+
}
|
|
431
|
+
toast.success('Tool installed successfully');
|
|
432
|
+
onInstallComplete();
|
|
433
|
+
} catch (err) {
|
|
434
|
+
toast.error(err instanceof Error ? err.message : 'Failed to install tool');
|
|
435
|
+
} finally {
|
|
436
|
+
setInstalling(false);
|
|
437
|
+
}
|
|
438
|
+
};
|
|
439
|
+
|
|
440
|
+
return (
|
|
441
|
+
<div className="flex flex-col items-center justify-center py-16 text-center">
|
|
442
|
+
<div className="flex size-14 items-center border border-border/90 justify-center rounded-xl bg-white">
|
|
443
|
+
<Store className="size-6 text-muted-foreground" />
|
|
444
|
+
</div>
|
|
445
|
+
<h3 className="mt-4 text-sm font-medium text-foreground">{toolName}</h3>
|
|
446
|
+
<p className="mt-1.5 max-w-sm text-[13px] leading-relaxed text-muted-foreground">
|
|
447
|
+
{toolDescription}
|
|
448
|
+
</p>
|
|
449
|
+
<div className="mt-3 flex items-center gap-3 text-[11px] text-muted-foreground/90">
|
|
450
|
+
<span>{installSize}</span>
|
|
451
|
+
{/* {systemDeps?.length ? (
|
|
452
|
+
<>
|
|
453
|
+
<span>·</span>
|
|
454
|
+
<span>Requires: {systemDeps.join(', ')}</span>
|
|
455
|
+
</>
|
|
456
|
+
) : null} */}
|
|
457
|
+
</div>
|
|
458
|
+
<Button
|
|
459
|
+
variant="default"
|
|
460
|
+
size="sm"
|
|
461
|
+
className="mt-5 gap-1.5 text-[12px]"
|
|
462
|
+
disabled={installing}
|
|
463
|
+
onClick={handleInstall}
|
|
464
|
+
>
|
|
465
|
+
{installing ? (
|
|
466
|
+
<Loader2 className="size-3.5 animate-spin" />
|
|
467
|
+
) : (
|
|
468
|
+
<Store className="size-3.5" />
|
|
469
|
+
)}
|
|
470
|
+
{installing ? 'Installing...' : 'Install directly'}
|
|
471
|
+
</Button>
|
|
472
|
+
</div>
|
|
473
|
+
);
|
|
474
|
+
}
|
|
475
|
+
|
|
476
|
+
/* ------------------------------------------------------------------ */
|
|
477
|
+
/* Disabled prompt (for Video & Audio tab when tool is disabled) */
|
|
478
|
+
/* ------------------------------------------------------------------ */
|
|
479
|
+
|
|
480
|
+
function DisabledPrompt() {
|
|
481
|
+
return (
|
|
482
|
+
<div className="flex flex-col items-center justify-center py-16 text-center">
|
|
483
|
+
<div className="flex size-14 items-center border border-border/90 justify-center rounded-xl bg-white">
|
|
484
|
+
<AlertCircle className="size-6 text-muted-foreground" />
|
|
485
|
+
</div>
|
|
486
|
+
<h3 className="mt-4 text-sm font-medium text-foreground">
|
|
487
|
+
Video & Audio Processing Disabled
|
|
488
|
+
</h3>
|
|
489
|
+
<p className="mt-1.5 max-w-sm text-[13px] leading-relaxed text-muted-foreground">
|
|
490
|
+
The Video & Audio tool is currently disabled in your agent settings. You cannot index new
|
|
491
|
+
video or audio files until it is re-enabled.
|
|
492
|
+
</p>
|
|
493
|
+
<Button
|
|
494
|
+
variant="default"
|
|
495
|
+
size="sm"
|
|
496
|
+
className="mt-5 text-[12px]"
|
|
497
|
+
render={<Link href="/settings?tab=prompts">Go to Settings</Link>}
|
|
498
|
+
/>
|
|
499
|
+
</div>
|
|
500
|
+
);
|
|
501
|
+
}
|
|
502
|
+
|
|
503
|
+
function MediaContent({
|
|
504
|
+
mediaType,
|
|
505
|
+
tab,
|
|
506
|
+
assets,
|
|
507
|
+
isLoading,
|
|
508
|
+
storageUsedBytes,
|
|
509
|
+
serverId,
|
|
510
|
+
onMutate,
|
|
511
|
+
onUploadComplete,
|
|
512
|
+
}: {
|
|
513
|
+
mediaType: 'image' | 'video' | 'audio';
|
|
514
|
+
tab: MediaSubTab;
|
|
515
|
+
assets: MediaAsset[];
|
|
516
|
+
isLoading: boolean;
|
|
517
|
+
storageUsedBytes: number;
|
|
518
|
+
serverId?: string;
|
|
519
|
+
onMutate: () => void | Promise<unknown>;
|
|
520
|
+
onUploadComplete: () => void;
|
|
521
|
+
}) {
|
|
522
|
+
const inputRef = useRef<HTMLInputElement>(null);
|
|
523
|
+
const router = useRouter();
|
|
524
|
+
const [staged, setStagedState] = useState<StagedMedia[]>(globalStagedMedia[mediaType] || []);
|
|
525
|
+
|
|
526
|
+
useEffect(() => {
|
|
527
|
+
setStagedState(globalStagedMedia[mediaType] || []);
|
|
528
|
+
setUrlsText('');
|
|
529
|
+
setRemoteEstimates(null);
|
|
530
|
+
}, [mediaType]);
|
|
531
|
+
|
|
532
|
+
const setStaged = (val: React.SetStateAction<StagedMedia[]>) => {
|
|
533
|
+
setStagedState((prev) => {
|
|
534
|
+
const next = typeof val === 'function' ? (val as Function)(prev) : val;
|
|
535
|
+
globalStagedMedia[mediaType] = next;
|
|
536
|
+
return next;
|
|
537
|
+
});
|
|
538
|
+
};
|
|
539
|
+
|
|
540
|
+
const [dragging, setDragging] = useState(false);
|
|
541
|
+
const [uploading, setUploading] = useState(false);
|
|
542
|
+
const [progress, setProgress] = useState<{
|
|
543
|
+
message?: string;
|
|
544
|
+
current: number;
|
|
545
|
+
total: number;
|
|
546
|
+
} | null>(null);
|
|
547
|
+
const [urlsText, setUrlsText] = useState('');
|
|
548
|
+
const [remoteEstimates, setRemoteEstimates] = useState<RemoteEstimate[] | null>(null);
|
|
549
|
+
const [checkingUrls, setCheckingUrls] = useState(false);
|
|
550
|
+
const [importingUrls, setImportingUrls] = useState(false);
|
|
551
|
+
const [importMode, setImportMode] = useState<'upload' | 'url'>('upload');
|
|
552
|
+
const mediaApiUrl = serverId
|
|
553
|
+
? `/api/media?serverId=${encodeURIComponent(serverId)}`
|
|
554
|
+
: '/api/media';
|
|
555
|
+
|
|
556
|
+
const accept = SUB_TABS.find((t) => t.id === tab)?.accept ?? '*/*';
|
|
557
|
+
|
|
558
|
+
async function handleFiles(files: FileList | File[]) {
|
|
559
|
+
const inspected = await Promise.all(
|
|
560
|
+
Array.from(files).map(async (file): Promise<StagedMedia | null> => {
|
|
561
|
+
const type = getMediaType(file);
|
|
562
|
+
if (type !== mediaType) {
|
|
563
|
+
toast.error(`${file.name} is not a${mediaType === 'audio' ? 'n' : ''} ${mediaType} file`);
|
|
564
|
+
return null;
|
|
565
|
+
}
|
|
566
|
+
const id = Math.random().toString(36).slice(2);
|
|
567
|
+
const preview =
|
|
568
|
+
type === 'image' || type === 'audio' ? URL.createObjectURL(file) : undefined;
|
|
569
|
+
const durationSecs = type === 'image' ? undefined : await readMediaDuration(file);
|
|
570
|
+
return { id, file, type, preview, durationSecs };
|
|
571
|
+
}),
|
|
572
|
+
);
|
|
573
|
+
const newFiles = inspected.filter((item): item is StagedMedia => item !== null);
|
|
574
|
+
if (newFiles.length > 0) setStaged((prev) => [...prev, ...newFiles]);
|
|
575
|
+
}
|
|
576
|
+
|
|
577
|
+
function removeFile(id: string) {
|
|
578
|
+
setStaged((prev) => {
|
|
579
|
+
const file = prev.find((f) => f.id === id);
|
|
580
|
+
if (file?.preview) URL.revokeObjectURL(file.preview);
|
|
581
|
+
return prev.filter((f) => f.id !== id);
|
|
582
|
+
});
|
|
583
|
+
}
|
|
584
|
+
|
|
585
|
+
function showErrorToast(err: unknown) {
|
|
586
|
+
const msg = formatErrorMessage(err);
|
|
587
|
+
if (
|
|
588
|
+
msg.toLowerCase().includes('api key') ||
|
|
589
|
+
msg.toLowerCase().includes('configuration') ||
|
|
590
|
+
msg.toLowerCase().includes('missing provider')
|
|
591
|
+
) {
|
|
592
|
+
toast.error(msg, {
|
|
593
|
+
duration: 10000,
|
|
594
|
+
action: {
|
|
595
|
+
label: 'Go to Settings',
|
|
596
|
+
onClick: () => router.push('/settings?section=tool-settings'),
|
|
597
|
+
},
|
|
598
|
+
});
|
|
599
|
+
} else {
|
|
600
|
+
toast.error(msg);
|
|
601
|
+
}
|
|
602
|
+
}
|
|
603
|
+
|
|
604
|
+
async function processAssets(assetIds: string[]) {
|
|
605
|
+
const PROCESS_BATCH_SIZE = 4;
|
|
606
|
+
for (let i = 0; i < assetIds.length; i += PROCESS_BATCH_SIZE) {
|
|
607
|
+
const batch = assetIds.slice(i, i + PROCESS_BATCH_SIZE);
|
|
608
|
+
const res = await fetch('/api/media/process', {
|
|
609
|
+
method: 'POST',
|
|
610
|
+
headers: { 'Content-Type': 'application/json' },
|
|
611
|
+
body: JSON.stringify({ assetIds: batch, serverId }),
|
|
612
|
+
});
|
|
613
|
+
|
|
614
|
+
if (!res.ok) {
|
|
615
|
+
let err;
|
|
616
|
+
try {
|
|
617
|
+
err = await res.json();
|
|
618
|
+
} catch {
|
|
619
|
+
err = { error: 'Media processing failed' };
|
|
620
|
+
}
|
|
621
|
+
throw new Error(err.error ?? 'Media processing failed');
|
|
622
|
+
}
|
|
623
|
+
}
|
|
624
|
+
await onMutate();
|
|
625
|
+
}
|
|
626
|
+
|
|
627
|
+
function parsedUrls() {
|
|
628
|
+
return urlsText
|
|
629
|
+
.split(/[\n,]/)
|
|
630
|
+
.map((url) => url.trim())
|
|
631
|
+
.filter(Boolean)
|
|
632
|
+
.slice(0, 10);
|
|
633
|
+
}
|
|
634
|
+
|
|
635
|
+
async function reviewRemoteEstimate() {
|
|
636
|
+
const urls = parsedUrls();
|
|
637
|
+
if (urls.length === 0) return;
|
|
638
|
+
setCheckingUrls(true);
|
|
639
|
+
try {
|
|
640
|
+
const res = await fetch(mediaApiUrl, {
|
|
641
|
+
method: 'POST',
|
|
642
|
+
headers: { 'Content-Type': 'application/json' },
|
|
643
|
+
body: JSON.stringify({ urls, estimateOnly: true, mediaType }),
|
|
644
|
+
});
|
|
645
|
+
const data = await res.json();
|
|
646
|
+
if (!res.ok) throw new Error(data.error ?? 'Could not inspect media URLs');
|
|
647
|
+
setRemoteEstimates(data.estimates);
|
|
648
|
+
} catch (err) {
|
|
649
|
+
showErrorToast(err);
|
|
650
|
+
} finally {
|
|
651
|
+
setCheckingUrls(false);
|
|
652
|
+
}
|
|
653
|
+
}
|
|
654
|
+
|
|
655
|
+
async function importRemoteUrls() {
|
|
656
|
+
const urls = parsedUrls();
|
|
657
|
+
if (urls.length === 0 || !remoteEstimates) return;
|
|
658
|
+
setImportingUrls(true);
|
|
659
|
+
try {
|
|
660
|
+
const res = await fetch(mediaApiUrl, {
|
|
661
|
+
method: 'POST',
|
|
662
|
+
headers: { 'Content-Type': 'application/json' },
|
|
663
|
+
body: JSON.stringify({ urls, mediaType }),
|
|
664
|
+
});
|
|
665
|
+
const data = await res.json();
|
|
666
|
+
if (!res.ok) throw new Error(data.error ?? 'Media import failed');
|
|
667
|
+
const ids = (data.assets as MediaAsset[]).map((asset) => asset.id);
|
|
668
|
+
await processAssets(ids);
|
|
669
|
+
toast.success(`${mediaType === 'video' ? 'Video' : 'Audio'} indexing started`);
|
|
670
|
+
setUrlsText('');
|
|
671
|
+
setRemoteEstimates(null);
|
|
672
|
+
setProgress(null);
|
|
673
|
+
onUploadComplete();
|
|
674
|
+
} catch (err) {
|
|
675
|
+
showErrorToast(err);
|
|
676
|
+
setProgress(null);
|
|
677
|
+
} finally {
|
|
678
|
+
setImportingUrls(false);
|
|
679
|
+
}
|
|
680
|
+
}
|
|
681
|
+
|
|
682
|
+
async function uploadAll() {
|
|
683
|
+
if (staged.length === 0) return;
|
|
684
|
+
setUploading(true);
|
|
685
|
+
|
|
686
|
+
const BATCH_SIZE = 5;
|
|
687
|
+
let uploaded = 0;
|
|
688
|
+
const uploadedAssetIds: string[] = [];
|
|
689
|
+
const total = staged.length;
|
|
690
|
+
setProgress({ message: 'Starting upload...', current: 0, total });
|
|
691
|
+
|
|
692
|
+
try {
|
|
693
|
+
for (let i = 0; i < staged.length; i += BATCH_SIZE) {
|
|
694
|
+
setProgress({ message: 'Uploading files...', current: uploaded, total });
|
|
695
|
+
const batch = staged.slice(i, i + BATCH_SIZE);
|
|
696
|
+
const formData = new FormData();
|
|
697
|
+
batch.forEach((item) => formData.append('file', item.file));
|
|
698
|
+
|
|
699
|
+
const res = await fetch(mediaApiUrl, {
|
|
700
|
+
method: 'POST',
|
|
701
|
+
body: formData,
|
|
702
|
+
});
|
|
703
|
+
|
|
704
|
+
const responseData = await res.json();
|
|
705
|
+
if (!res.ok) {
|
|
706
|
+
const err = responseData;
|
|
707
|
+
throw new Error(err.error ?? 'Upload failed');
|
|
708
|
+
}
|
|
709
|
+
uploadedAssetIds.push(
|
|
710
|
+
...(responseData.assets as MediaAsset[]).map((asset: MediaAsset) => asset.id),
|
|
711
|
+
);
|
|
712
|
+
|
|
713
|
+
uploaded += batch.length;
|
|
714
|
+
setProgress({ message: 'Uploading files...', current: uploaded, total });
|
|
715
|
+
}
|
|
716
|
+
|
|
717
|
+
if (uploadedAssetIds.length > 0) {
|
|
718
|
+
setProgress({ message: 'Queueing files for indexing...', current: 0, total: uploaded });
|
|
719
|
+
await processAssets(uploadedAssetIds);
|
|
720
|
+
}
|
|
721
|
+
const mediaLabel =
|
|
722
|
+
mediaType === 'video' ? 'Video' : mediaType === 'audio' ? 'Audio' : 'Image';
|
|
723
|
+
toast.success(`${mediaLabel} indexing started`);
|
|
724
|
+
setProgress(null);
|
|
725
|
+
|
|
726
|
+
staged.forEach((f) => {
|
|
727
|
+
if (f.preview) URL.revokeObjectURL(f.preview);
|
|
728
|
+
});
|
|
729
|
+
globalStagedMedia[mediaType] = [];
|
|
730
|
+
setStaged([]);
|
|
731
|
+
setUploading(false);
|
|
732
|
+
|
|
733
|
+
onUploadComplete();
|
|
734
|
+
} catch (err) {
|
|
735
|
+
showErrorToast(err);
|
|
736
|
+
setUploading(false);
|
|
737
|
+
setProgress(null);
|
|
738
|
+
}
|
|
739
|
+
}
|
|
740
|
+
|
|
741
|
+
async function handleDelete(assetId: string) {
|
|
742
|
+
try {
|
|
743
|
+
const query = new URLSearchParams({ id: assetId });
|
|
744
|
+
if (serverId) query.set('serverId', serverId);
|
|
745
|
+
const response = await fetch(`/api/media?${query.toString()}`, { method: 'DELETE' });
|
|
746
|
+
if (!response.ok) {
|
|
747
|
+
const body = (await response.json().catch(() => null)) as { error?: string } | null;
|
|
748
|
+
throw new Error(body?.error || 'Failed to delete media.');
|
|
749
|
+
}
|
|
750
|
+
toast.success('File removed');
|
|
751
|
+
onMutate();
|
|
752
|
+
} catch (error) {
|
|
753
|
+
showErrorToast(error);
|
|
754
|
+
}
|
|
755
|
+
}
|
|
756
|
+
|
|
757
|
+
async function handleRetry(assetId: string) {
|
|
758
|
+
setProgress({ message: 'Retrying media processing...', current: 0, total: 1 });
|
|
759
|
+
try {
|
|
760
|
+
await processAssets([assetId]);
|
|
761
|
+
toast.success(
|
|
762
|
+
`${
|
|
763
|
+
mediaType === 'video' ? 'Video' : mediaType === 'audio' ? 'Audio' : 'Image'
|
|
764
|
+
} indexing started`,
|
|
765
|
+
);
|
|
766
|
+
onMutate();
|
|
767
|
+
} catch (err) {
|
|
768
|
+
showErrorToast(err);
|
|
769
|
+
} finally {
|
|
770
|
+
setProgress(null);
|
|
771
|
+
}
|
|
772
|
+
}
|
|
773
|
+
|
|
774
|
+
const stagedDuration = staged.reduce((total, item) => total + (item.durationSecs ?? 0), 0);
|
|
775
|
+
const stagedEstimate = estimateMedia(stagedDuration, mediaType === 'video');
|
|
776
|
+
const remoteDuration =
|
|
777
|
+
remoteEstimates?.reduce((total, estimate) => total + (estimate.durationSecs ?? 0), 0) ?? 0;
|
|
778
|
+
const remoteEstimate = estimateMedia(remoteDuration, mediaType === 'video');
|
|
779
|
+
const activeAssets = assets.filter(isActiveJob);
|
|
780
|
+
|
|
781
|
+
return (
|
|
782
|
+
<div className="space-y-4">
|
|
783
|
+
{progress && (
|
|
784
|
+
<div className="space-y-1.5 rounded-lg border border-border bg-muted/20 px-3 py-2.5">
|
|
785
|
+
<div className="flex items-center justify-between text-[11px] text-muted-foreground tabular-nums">
|
|
786
|
+
<span>{progress.message || `Processing ${progress.current} of ${progress.total}`}</span>
|
|
787
|
+
<span>{Math.round((progress.current / Math.max(progress.total, 1)) * 100)}%</span>
|
|
788
|
+
</div>
|
|
789
|
+
<Progress
|
|
790
|
+
value={(progress.current / Math.max(progress.total, 1)) * 100}
|
|
791
|
+
className="h-1.5"
|
|
792
|
+
/>
|
|
793
|
+
</div>
|
|
794
|
+
)}
|
|
795
|
+
|
|
796
|
+
{activeAssets.length > 0 ? (
|
|
797
|
+
<ActiveIndexingList assets={activeAssets} onCancel={handleDelete} />
|
|
798
|
+
) : null}
|
|
799
|
+
|
|
800
|
+
{mediaType !== 'image' && (
|
|
801
|
+
<div className="mt-5 flex items-center gap-4 border-b border-border/40 mb-4 px-2">
|
|
802
|
+
<button
|
|
803
|
+
type="button"
|
|
804
|
+
onClick={() => setImportMode('upload')}
|
|
805
|
+
className={cn(
|
|
806
|
+
'flex items-center gap-1.5 pb-2.5 text-[13px] font-medium border-b-2 transition-colors -mb-px',
|
|
807
|
+
importMode === 'upload'
|
|
808
|
+
? 'border-primary text-foreground'
|
|
809
|
+
: 'border-transparent text-muted-foreground hover:text-foreground hover:border-border',
|
|
810
|
+
)}
|
|
811
|
+
>
|
|
812
|
+
<Upload className="size-3.5" />
|
|
813
|
+
Upload File
|
|
814
|
+
</button>
|
|
815
|
+
<button
|
|
816
|
+
type="button"
|
|
817
|
+
onClick={() => setImportMode('url')}
|
|
818
|
+
className={cn(
|
|
819
|
+
'flex items-center gap-1.5 pb-2.5 text-[13px] font-medium border-b-2 transition-colors -mb-1px',
|
|
820
|
+
importMode === 'url'
|
|
821
|
+
? 'border-primary text-foreground'
|
|
822
|
+
: 'border-transparent text-muted-foreground hover:text-foreground hover:border-border',
|
|
823
|
+
)}
|
|
824
|
+
>
|
|
825
|
+
<Link2 className="size-3.5" />
|
|
826
|
+
Import URL
|
|
827
|
+
</button>
|
|
828
|
+
</div>
|
|
829
|
+
)}
|
|
830
|
+
|
|
831
|
+
{mediaType !== 'image' && importMode === 'url' ? (
|
|
832
|
+
<div className="w-full">
|
|
833
|
+
<div className="flex items-center gap-2">
|
|
834
|
+
<Input
|
|
835
|
+
aria-label={`Import ${mediaType} URL`}
|
|
836
|
+
value={urlsText}
|
|
837
|
+
onChange={(event) => {
|
|
838
|
+
setUrlsText(event.target.value);
|
|
839
|
+
setRemoteEstimates(null);
|
|
840
|
+
}}
|
|
841
|
+
placeholder={
|
|
842
|
+
mediaType === 'video'
|
|
843
|
+
? 'https://youtube.com/watch?v=…'
|
|
844
|
+
: 'https://cdn.example.com/episode.mp3'
|
|
845
|
+
}
|
|
846
|
+
className="bg-background text-xs h-9 flex-1"
|
|
847
|
+
/>
|
|
848
|
+
<Button
|
|
849
|
+
type="button"
|
|
850
|
+
variant="outline"
|
|
851
|
+
size="sm"
|
|
852
|
+
className="h-9 text-xs"
|
|
853
|
+
disabled={checkingUrls || importingUrls || parsedUrls().length === 0}
|
|
854
|
+
onClick={reviewRemoteEstimate}
|
|
855
|
+
>
|
|
856
|
+
{checkingUrls ? (
|
|
857
|
+
<Loader2 className="mr-1.5 size-3 animate-spin" />
|
|
858
|
+
) : (
|
|
859
|
+
<Clock className="mr-1.5 size-3" />
|
|
860
|
+
)}
|
|
861
|
+
Review
|
|
862
|
+
</Button>
|
|
863
|
+
<Button
|
|
864
|
+
type="button"
|
|
865
|
+
size="sm"
|
|
866
|
+
className="h-9 text-xs"
|
|
867
|
+
disabled={!remoteEstimates || importingUrls}
|
|
868
|
+
onClick={importRemoteUrls}
|
|
869
|
+
>
|
|
870
|
+
{importingUrls ? (
|
|
871
|
+
<Loader2 className="mr-1.5 size-3 animate-spin" />
|
|
872
|
+
) : (
|
|
873
|
+
<Sparkles className="mr-1.5 size-3" />
|
|
874
|
+
)}
|
|
875
|
+
Import
|
|
876
|
+
</Button>
|
|
877
|
+
</div>
|
|
878
|
+
<p className="mt-2 pl-1 text-[11px] leading-relaxed text-muted-foreground">
|
|
879
|
+
Direct {mediaType} links
|
|
880
|
+
{mediaType === 'video' ? ', YouTube videos, or playlists' : ''}. Add up to 10 URLs
|
|
881
|
+
separated by commas.
|
|
882
|
+
</p>
|
|
883
|
+
{remoteEstimates ? (
|
|
884
|
+
<div className="mt-4 flex flex-col gap-4 border-t border-border/70 pt-4">
|
|
885
|
+
<div className="grid gap-2 sm:grid-cols-3">
|
|
886
|
+
<EstimateMetric
|
|
887
|
+
label="Media"
|
|
888
|
+
value={`${remoteEstimates.reduce(
|
|
889
|
+
(sum: any, item: any) => sum + (item.entryCount ?? 1),
|
|
890
|
+
0,
|
|
891
|
+
)} item(s) · ${
|
|
892
|
+
remoteDuration ? formatDuration(remoteDuration) : 'duration unavailable'
|
|
893
|
+
}`}
|
|
894
|
+
/>
|
|
895
|
+
<EstimateMetric
|
|
896
|
+
label="Expected time"
|
|
897
|
+
value={
|
|
898
|
+
remoteDuration
|
|
899
|
+
? `~${remoteEstimate.processingMinutes} min`
|
|
900
|
+
: 'Calculated during import'
|
|
901
|
+
}
|
|
902
|
+
/>
|
|
903
|
+
<EstimateMetric
|
|
904
|
+
label="Estimated API cost"
|
|
905
|
+
value={
|
|
906
|
+
remoteDuration
|
|
907
|
+
? `~$${remoteEstimate.transcriptionCost.toFixed(2)} +`
|
|
908
|
+
: 'Model-dependent'
|
|
909
|
+
}
|
|
910
|
+
/>
|
|
911
|
+
</div>
|
|
912
|
+
|
|
913
|
+
{(mediaType === 'audio'
|
|
914
|
+
? remoteEstimates.slice(0, 1)
|
|
915
|
+
: remoteEstimates.filter((est: any) => est.mediaType === 'video').slice(0, 1)
|
|
916
|
+
).map((est: any, i: number) => {
|
|
917
|
+
if (mediaType === 'audio') {
|
|
918
|
+
return (
|
|
919
|
+
<div key={i} className="rounded-xl border border-border/70 bg-muted/20 p-3">
|
|
920
|
+
<p className="mb-2 truncate text-[11px] font-medium text-foreground">
|
|
921
|
+
Preview before importing
|
|
922
|
+
</p>
|
|
923
|
+
<audio
|
|
924
|
+
controls
|
|
925
|
+
preload="metadata"
|
|
926
|
+
src={est.originalUrl}
|
|
927
|
+
className="h-9 w-full"
|
|
928
|
+
/>
|
|
929
|
+
</div>
|
|
930
|
+
);
|
|
931
|
+
}
|
|
932
|
+
let embedUrl = est.originalUrl;
|
|
933
|
+
if (est.isYouTube) {
|
|
934
|
+
try {
|
|
935
|
+
const u = new URL(est.originalUrl);
|
|
936
|
+
const v = u.hostname.includes('youtu.be')
|
|
937
|
+
? u.pathname.slice(1)
|
|
938
|
+
: u.searchParams.get('v');
|
|
939
|
+
embedUrl = `https://www.youtube.com/embed/${v}`;
|
|
940
|
+
} catch (e) {
|
|
941
|
+
// ignore
|
|
942
|
+
}
|
|
943
|
+
return (
|
|
944
|
+
<div
|
|
945
|
+
key={i}
|
|
946
|
+
className="relative w-full overflow-hidden rounded-xl aspect-video shadow-md border border-border/50 ring-1 ring-border/20 bg-black"
|
|
947
|
+
>
|
|
948
|
+
<iframe
|
|
949
|
+
src={embedUrl}
|
|
950
|
+
className="absolute inset-0 w-full h-full"
|
|
951
|
+
frameBorder="0"
|
|
952
|
+
allowFullScreen
|
|
953
|
+
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
|
|
954
|
+
/>
|
|
955
|
+
</div>
|
|
956
|
+
);
|
|
957
|
+
} else {
|
|
958
|
+
return (
|
|
959
|
+
<video
|
|
960
|
+
key={i}
|
|
961
|
+
src={embedUrl}
|
|
962
|
+
controls
|
|
963
|
+
className="w-full max-w-sm rounded-md aspect-video bg-muted object-cover shadow-sm border border-border"
|
|
964
|
+
/>
|
|
965
|
+
);
|
|
966
|
+
}
|
|
967
|
+
})}
|
|
968
|
+
</div>
|
|
969
|
+
) : null}
|
|
970
|
+
</div>
|
|
971
|
+
) : (
|
|
972
|
+
<div
|
|
973
|
+
onDragOver={(e) => {
|
|
974
|
+
e.preventDefault();
|
|
975
|
+
setDragging(true);
|
|
976
|
+
}}
|
|
977
|
+
onDragLeave={(e) => {
|
|
978
|
+
e.preventDefault();
|
|
979
|
+
setDragging(false);
|
|
980
|
+
}}
|
|
981
|
+
onDrop={(e) => {
|
|
982
|
+
e.preventDefault();
|
|
983
|
+
setDragging(false);
|
|
984
|
+
if (e.dataTransfer.files.length > 0) handleFiles(e.dataTransfer.files);
|
|
985
|
+
}}
|
|
986
|
+
onClick={() => inputRef.current?.click()}
|
|
987
|
+
className={cn(
|
|
988
|
+
'flex flex-col items-center justify-center gap-2.5 rounded-xl border-2 border-dashed px-6 py-10 cursor-pointer transition-colors',
|
|
989
|
+
dragging
|
|
990
|
+
? 'border-primary bg-primary/5'
|
|
991
|
+
: 'border-border hover:border-primary/40 hover:bg-muted/20',
|
|
992
|
+
)}
|
|
993
|
+
>
|
|
994
|
+
<Upload className="size-5 text-muted-foreground" />
|
|
995
|
+
<div className="text-center">
|
|
996
|
+
<p className="text-[13px] font-medium text-foreground">
|
|
997
|
+
Drop {mediaType} files here or click to browse
|
|
998
|
+
</p>
|
|
999
|
+
<p className="mt-0.5 text-[11px] text-muted-foreground">
|
|
1000
|
+
{mediaType === 'image' && 'PNG, JPG, WebP, GIF, SVG'}
|
|
1001
|
+
{mediaType === 'video' && 'MP4, WebM, MOV, AVI'}
|
|
1002
|
+
{mediaType === 'audio' && 'MP3, WAV, OGG, M4A, FLAC'}
|
|
1003
|
+
</p>
|
|
1004
|
+
</div>
|
|
1005
|
+
<input
|
|
1006
|
+
ref={inputRef}
|
|
1007
|
+
type="file"
|
|
1008
|
+
multiple
|
|
1009
|
+
accept={accept}
|
|
1010
|
+
className="hidden"
|
|
1011
|
+
onChange={(e) => e.target.files && handleFiles(e.target.files)}
|
|
1012
|
+
/>
|
|
1013
|
+
</div>
|
|
1014
|
+
)}
|
|
1015
|
+
|
|
1016
|
+
{/* Staged files */}
|
|
1017
|
+
{staged.length > 0 && (
|
|
1018
|
+
<div className="space-y-3">
|
|
1019
|
+
{mediaType !== 'image' && stagedDuration > 0 ? (
|
|
1020
|
+
<div className="grid gap-2 rounded-lg border border-border bg-muted/15 px-3 py-2.5 sm:grid-cols-3">
|
|
1021
|
+
<EstimateMetric label="Duration" value={formatDuration(stagedDuration)} />
|
|
1022
|
+
<EstimateMetric
|
|
1023
|
+
label="Expected time"
|
|
1024
|
+
value={`~${stagedEstimate.processingMinutes} min`}
|
|
1025
|
+
/>
|
|
1026
|
+
<EstimateMetric
|
|
1027
|
+
label="Estimated API cost"
|
|
1028
|
+
value={`~$${stagedEstimate.transcriptionCost.toFixed(2)}${
|
|
1029
|
+
mediaType === 'video'
|
|
1030
|
+
? ` + up to ${stagedEstimate.visualScenes} vision calls`
|
|
1031
|
+
: ''
|
|
1032
|
+
}`}
|
|
1033
|
+
/>
|
|
1034
|
+
</div>
|
|
1035
|
+
) : null}
|
|
1036
|
+
|
|
1037
|
+
<div className="flex items-center justify-between">
|
|
1038
|
+
<span className="text-[13px] font-medium text-foreground">
|
|
1039
|
+
{staged.length} file{staged.length !== 1 ? 's' : ''} ready
|
|
1040
|
+
</span>
|
|
1041
|
+
<div className="flex items-center gap-3">
|
|
1042
|
+
<button
|
|
1043
|
+
type="button"
|
|
1044
|
+
onClick={() => {
|
|
1045
|
+
staged.forEach((f) => {
|
|
1046
|
+
if (f.preview) URL.revokeObjectURL(f.preview);
|
|
1047
|
+
});
|
|
1048
|
+
setStaged([]);
|
|
1049
|
+
}}
|
|
1050
|
+
className="text-[11px] text-muted-foreground hover:text-foreground transition-colors cursor-pointer"
|
|
1051
|
+
>
|
|
1052
|
+
Clear All
|
|
1053
|
+
</button>
|
|
1054
|
+
<Button
|
|
1055
|
+
onClick={uploadAll}
|
|
1056
|
+
disabled={uploading || staged.length === 0}
|
|
1057
|
+
size="sm"
|
|
1058
|
+
className="h-7 text-xs px-3"
|
|
1059
|
+
>
|
|
1060
|
+
{uploading ? (
|
|
1061
|
+
<Loader2 className="size-3 animate-spin mr-1.5" />
|
|
1062
|
+
) : (
|
|
1063
|
+
<FileUp className="size-3 mr-1.5" />
|
|
1064
|
+
)}
|
|
1065
|
+
Upload {staged.length} file{staged.length !== 1 ? 's' : ''}
|
|
1066
|
+
</Button>
|
|
1067
|
+
</div>
|
|
1068
|
+
</div>
|
|
1069
|
+
|
|
1070
|
+
<div className="max-h-87.5 overflow-y-auto pr-1">
|
|
1071
|
+
{/* Grid preview for staged images */}
|
|
1072
|
+
{mediaType === 'image' ? (
|
|
1073
|
+
<div className="grid grid-cols-2 sm:grid-cols-4 gap-3">
|
|
1074
|
+
{staged.slice(0, 8).map((item) => (
|
|
1075
|
+
<div
|
|
1076
|
+
key={item.id}
|
|
1077
|
+
className="group relative aspect-4/3 rounded-xl overflow-hidden bg-muted/30 border border-border/50"
|
|
1078
|
+
>
|
|
1079
|
+
{item.preview && (
|
|
1080
|
+
<img
|
|
1081
|
+
src={item.preview}
|
|
1082
|
+
alt={item.file.name}
|
|
1083
|
+
className="size-full object-cover transition-transform duration-300 group-hover:scale-105"
|
|
1084
|
+
/>
|
|
1085
|
+
)}
|
|
1086
|
+
<button
|
|
1087
|
+
type="button"
|
|
1088
|
+
onClick={(e) => {
|
|
1089
|
+
e.stopPropagation();
|
|
1090
|
+
removeFile(item.id);
|
|
1091
|
+
}}
|
|
1092
|
+
className="absolute right-2 top-2 rounded-full bg-black/50 p-1.5 text-white opacity-0 group-hover:opacity-100 transition-opacity"
|
|
1093
|
+
>
|
|
1094
|
+
<X className="size-3.5" />
|
|
1095
|
+
</button>
|
|
1096
|
+
</div>
|
|
1097
|
+
))}
|
|
1098
|
+
{staged.length > 8 && (
|
|
1099
|
+
<div className="flex items-center justify-center rounded-xl bg-muted/30 border border-border/50 text-muted-foreground text-sm font-medium aspect-4/3">
|
|
1100
|
+
+{staged.length - 8} more
|
|
1101
|
+
</div>
|
|
1102
|
+
)}
|
|
1103
|
+
</div>
|
|
1104
|
+
) : (
|
|
1105
|
+
<div className="flex flex-col gap-1.5">
|
|
1106
|
+
{staged.slice(0, 10).map((item) => {
|
|
1107
|
+
const Icon = mediaType === 'video' ? Video : AudioLines;
|
|
1108
|
+
return (
|
|
1109
|
+
<div
|
|
1110
|
+
key={item.id}
|
|
1111
|
+
className="flex items-center gap-3 rounded-lg border border-border px-3 py-2 group"
|
|
1112
|
+
>
|
|
1113
|
+
<div className="flex size-8 items-center justify-center rounded-md bg-muted">
|
|
1114
|
+
<Icon className="size-3.5 text-muted-foreground" />
|
|
1115
|
+
</div>
|
|
1116
|
+
<div className="min-w-0 flex-1">
|
|
1117
|
+
<p className="truncate text-[12px] font-medium text-foreground">
|
|
1118
|
+
{item.file.name}
|
|
1119
|
+
</p>
|
|
1120
|
+
<p className="text-[10px] text-muted-foreground">
|
|
1121
|
+
{formatSize(item.file.size)}
|
|
1122
|
+
</p>
|
|
1123
|
+
</div>
|
|
1124
|
+
{mediaType === 'audio' && item.preview ? (
|
|
1125
|
+
<audio
|
|
1126
|
+
aria-label={`Preview ${item.file.name}`}
|
|
1127
|
+
controls
|
|
1128
|
+
preload="metadata"
|
|
1129
|
+
src={item.preview}
|
|
1130
|
+
className="h-8 max-w-44"
|
|
1131
|
+
onClick={(event) => event.stopPropagation()}
|
|
1132
|
+
/>
|
|
1133
|
+
) : null}
|
|
1134
|
+
<button
|
|
1135
|
+
type="button"
|
|
1136
|
+
onClick={() => removeFile(item.id)}
|
|
1137
|
+
className="opacity-0 group-hover:opacity-100 p-1 text-muted-foreground hover:text-foreground transition-all"
|
|
1138
|
+
>
|
|
1139
|
+
<X className="size-3" />
|
|
1140
|
+
</button>
|
|
1141
|
+
</div>
|
|
1142
|
+
);
|
|
1143
|
+
})}
|
|
1144
|
+
{staged.length > 10 && (
|
|
1145
|
+
<div className="flex items-center justify-center py-2 text-xs text-muted-foreground border border-dashed rounded-lg bg-muted/10">
|
|
1146
|
+
+{staged.length - 10} more files
|
|
1147
|
+
</div>
|
|
1148
|
+
)}
|
|
1149
|
+
</div>
|
|
1150
|
+
)}
|
|
1151
|
+
</div>
|
|
1152
|
+
</div>
|
|
1153
|
+
)}
|
|
1154
|
+
|
|
1155
|
+
{/* Gallery of uploaded assets */}
|
|
1156
|
+
{isLoading && assets.length === 0 ? (
|
|
1157
|
+
<div className="flex justify-center py-10">
|
|
1158
|
+
<Loader2 className="size-4 animate-spin text-muted-foreground" />
|
|
1159
|
+
</div>
|
|
1160
|
+
) : assets.length > 0 ? (
|
|
1161
|
+
<div className="space-y-2">
|
|
1162
|
+
<div className="flex items-center justify-between py-2 px-3 rounded-lg border border-border bg-muted/20">
|
|
1163
|
+
<h4 className="text-[13px] font-medium text-foreground">
|
|
1164
|
+
{assets.length} Uploaded {mediaType === 'image' ? 'Image' : 'File'}
|
|
1165
|
+
{assets.length !== 1 ? 's' : ''}
|
|
1166
|
+
</h4>
|
|
1167
|
+
<Dialog>
|
|
1168
|
+
<DialogTrigger
|
|
1169
|
+
render={
|
|
1170
|
+
<Button variant="outline" size="sm" className="h-7 text-xs px-3">
|
|
1171
|
+
View Uploads
|
|
1172
|
+
</Button>
|
|
1173
|
+
}
|
|
1174
|
+
/>
|
|
1175
|
+
<DialogContent className="max-w-4xl max-h-[85vh] flex flex-col p-0">
|
|
1176
|
+
<DialogHeader className="px-6 py-4 border-b">
|
|
1177
|
+
<DialogTitle>
|
|
1178
|
+
Uploaded {mediaType === 'image' ? 'Images' : 'Files'} ({assets.length})
|
|
1179
|
+
</DialogTitle>
|
|
1180
|
+
</DialogHeader>
|
|
1181
|
+
<div className="flex-1 overflow-y-auto px-6 py-4">
|
|
1182
|
+
{mediaType === 'image' ? (
|
|
1183
|
+
<ImageGallery assets={assets} onDelete={handleDelete} serverId={serverId} />
|
|
1184
|
+
) : (
|
|
1185
|
+
<FileList
|
|
1186
|
+
assets={assets}
|
|
1187
|
+
mediaType={mediaType}
|
|
1188
|
+
onDelete={handleDelete}
|
|
1189
|
+
onProcess={handleRetry}
|
|
1190
|
+
/>
|
|
1191
|
+
)}
|
|
1192
|
+
</div>
|
|
1193
|
+
</DialogContent>
|
|
1194
|
+
</Dialog>
|
|
1195
|
+
</div>
|
|
1196
|
+
</div>
|
|
1197
|
+
) : staged.length === 0 ? (
|
|
1198
|
+
<div className="py-10 text-center">
|
|
1199
|
+
<p className="text-[13px] text-muted-foreground">No {mediaType} files yet</p>
|
|
1200
|
+
</div>
|
|
1201
|
+
) : null}
|
|
1202
|
+
|
|
1203
|
+
{/* Storage warning */}
|
|
1204
|
+
{storageUsedBytes > 1024 * 1024 * 1024 && (
|
|
1205
|
+
<div className="flex items-start gap-2.5 rounded-lg border border-amber-200 bg-amber-50 px-3.5 py-3">
|
|
1206
|
+
<AlertCircle className="size-4 mt-0.5 shrink-0 text-amber-600" />
|
|
1207
|
+
<div>
|
|
1208
|
+
<p className="text-[12px] font-medium text-amber-800">
|
|
1209
|
+
Storage usage: {formatSize(storageUsedBytes)}
|
|
1210
|
+
</p>
|
|
1211
|
+
<p className="mt-0.5 text-[11px] text-amber-600">
|
|
1212
|
+
Media files are stored locally. Cloud storage support coming soon.
|
|
1213
|
+
</p>
|
|
1214
|
+
</div>
|
|
1215
|
+
</div>
|
|
1216
|
+
)}
|
|
1217
|
+
</div>
|
|
1218
|
+
);
|
|
1219
|
+
}
|
|
1220
|
+
|
|
1221
|
+
/* ------------------------------------------------------------------ */
|
|
1222
|
+
/* Image gallery grid */
|
|
1223
|
+
/* ------------------------------------------------------------------ */
|
|
1224
|
+
|
|
1225
|
+
function ImageGallery({
|
|
1226
|
+
assets,
|
|
1227
|
+
onDelete,
|
|
1228
|
+
serverId,
|
|
1229
|
+
}: {
|
|
1230
|
+
assets: MediaAsset[];
|
|
1231
|
+
onDelete: (id: string) => void;
|
|
1232
|
+
serverId?: string;
|
|
1233
|
+
}) {
|
|
1234
|
+
const [visibleCount, setVisibleCount] = useState(12);
|
|
1235
|
+
const [expandedAsset, setExpandedAsset] = useState<MediaAsset | null>(null);
|
|
1236
|
+
|
|
1237
|
+
const visibleAssets = assets.slice(0, visibleCount);
|
|
1238
|
+
const hasMore = visibleCount < assets.length;
|
|
1239
|
+
|
|
1240
|
+
return (
|
|
1241
|
+
<div className="space-y-6">
|
|
1242
|
+
<div className="grid grid-cols-2 sm:grid-cols-3 gap-3">
|
|
1243
|
+
{visibleAssets.map((asset) => (
|
|
1244
|
+
<div
|
|
1245
|
+
key={asset.id}
|
|
1246
|
+
onClick={() => setExpandedAsset(asset)}
|
|
1247
|
+
className="group relative aspect-2/1 sm:aspect-21/9 rounded-xl overflow-hidden bg-muted/30 border border-border/50 cursor-pointer"
|
|
1248
|
+
>
|
|
1249
|
+
<img
|
|
1250
|
+
src={mediaAssetUrl(asset.id, serverId, true)}
|
|
1251
|
+
alt={asset.fileName}
|
|
1252
|
+
className="size-full object-cover transition-transform duration-300 group-hover:scale-105"
|
|
1253
|
+
loading="lazy"
|
|
1254
|
+
onError={(e) => {
|
|
1255
|
+
// Fallback to original if no thumbnail
|
|
1256
|
+
(e.target as HTMLImageElement).src = mediaAssetUrl(asset.id, serverId);
|
|
1257
|
+
}}
|
|
1258
|
+
/>
|
|
1259
|
+
|
|
1260
|
+
{/* Processing status overlay */}
|
|
1261
|
+
{asset.processingStatus === 'processing' && (
|
|
1262
|
+
<div className="absolute inset-0 flex flex-col items-center justify-center bg-black/50 backdrop-blur-sm p-4 text-center">
|
|
1263
|
+
<Loader2 className="size-5 animate-spin text-white mb-2" />
|
|
1264
|
+
<span className="text-[10px] text-white/90 line-clamp-2 leading-tight">
|
|
1265
|
+
{asset.processingMessage || 'Processing...'}
|
|
1266
|
+
</span>
|
|
1267
|
+
<Progress
|
|
1268
|
+
value={asset.processingProgress ?? 0}
|
|
1269
|
+
className={cn('mt-2 h-1.5 w-4/5 bg-white/20', INDEXING_PROGRESS_CLASS)}
|
|
1270
|
+
/>
|
|
1271
|
+
<span className="mt-1 text-[9px] tabular-nums text-white/75">
|
|
1272
|
+
{Math.round(asset.processingProgress ?? 0)}%
|
|
1273
|
+
</span>
|
|
1274
|
+
</div>
|
|
1275
|
+
)}
|
|
1276
|
+
{asset.processingStatus === 'failed' && (
|
|
1277
|
+
<div className="absolute inset-0 flex flex-col items-center justify-center bg-black/50 backdrop-blur-sm p-4 text-center">
|
|
1278
|
+
<AlertCircle className="size-5 text-red-400 mb-2" />
|
|
1279
|
+
<span className="text-[10px] text-red-200 line-clamp-2 leading-tight">
|
|
1280
|
+
{asset.processingError || 'Failed'}
|
|
1281
|
+
</span>
|
|
1282
|
+
</div>
|
|
1283
|
+
)}
|
|
1284
|
+
{asset.processingStatus === 'pending' && (
|
|
1285
|
+
<div className="absolute bottom-2 right-2 bg-black/50 backdrop-blur-sm px-2 py-1 rounded-sm flex items-center gap-1.5 max-w-[80%]">
|
|
1286
|
+
<Clock className="size-3 text-white/80 shrink-0" />
|
|
1287
|
+
<span className="text-[9px] text-white/90 truncate">
|
|
1288
|
+
{asset.processingMessage || 'Pending...'}
|
|
1289
|
+
</span>
|
|
1290
|
+
</div>
|
|
1291
|
+
)}
|
|
1292
|
+
|
|
1293
|
+
{/* Hover actions */}
|
|
1294
|
+
<div className="absolute inset-0 bg-black/0 group-hover:bg-black/20 transition-colors pointer-events-none">
|
|
1295
|
+
{!isActiveJob(asset) ? (
|
|
1296
|
+
<button
|
|
1297
|
+
type="button"
|
|
1298
|
+
aria-label={`Delete ${asset.fileName}`}
|
|
1299
|
+
onClick={(e) => {
|
|
1300
|
+
e.stopPropagation();
|
|
1301
|
+
onDelete(asset.id);
|
|
1302
|
+
}}
|
|
1303
|
+
className="absolute right-2 top-2 rounded-full bg-black/50 p-1.5 text-white opacity-0 group-hover:opacity-100 transition-opacity pointer-events-auto hover:bg-black/70"
|
|
1304
|
+
>
|
|
1305
|
+
<Trash2 className="size-3.5" />
|
|
1306
|
+
</button>
|
|
1307
|
+
) : null}
|
|
1308
|
+
</div>
|
|
1309
|
+
</div>
|
|
1310
|
+
))}
|
|
1311
|
+
</div>
|
|
1312
|
+
|
|
1313
|
+
{hasMore && (
|
|
1314
|
+
<div className="flex justify-center pt-2 pb-6">
|
|
1315
|
+
<Button
|
|
1316
|
+
variant="outline"
|
|
1317
|
+
onClick={() => setVisibleCount((prev) => prev + 12)}
|
|
1318
|
+
className="text-muted-foreground"
|
|
1319
|
+
>
|
|
1320
|
+
Load More
|
|
1321
|
+
</Button>
|
|
1322
|
+
</div>
|
|
1323
|
+
)}
|
|
1324
|
+
|
|
1325
|
+
{/* Lightbox Overlay */}
|
|
1326
|
+
{expandedAsset && (
|
|
1327
|
+
<div
|
|
1328
|
+
className="fixed inset-0 z-9999 flex items-center justify-center bg-black/80 backdrop-blur-sm p-4 md:p-8 animate-in fade-in duration-200"
|
|
1329
|
+
onClick={() => setExpandedAsset(null)}
|
|
1330
|
+
>
|
|
1331
|
+
<div className="relative max-w-full max-h-full">
|
|
1332
|
+
<img
|
|
1333
|
+
src={mediaAssetUrl(expandedAsset.id, serverId)}
|
|
1334
|
+
alt={expandedAsset.fileName}
|
|
1335
|
+
className="max-w-full max-h-[90vh] rounded-lg object-contain"
|
|
1336
|
+
onClick={(e) => e.stopPropagation()} // Prevent click from closing immediately
|
|
1337
|
+
/>
|
|
1338
|
+
<button
|
|
1339
|
+
onClick={() => setExpandedAsset(null)}
|
|
1340
|
+
className="absolute -top-3 -right-3 md:-top-5 md:-right-5 rounded-full bg-black/50 border border-white/20 p-2 text-white hover:bg-black/80 transition-colors"
|
|
1341
|
+
>
|
|
1342
|
+
<X className="size-5" />
|
|
1343
|
+
</button>
|
|
1344
|
+
<div className="absolute bottom-0 inset-x-0 p-4 bg-linear-to-t from-black/80 to-transparent text-white rounded-b-lg opacity-0 hover:opacity-100 transition-opacity flex justify-between items-end">
|
|
1345
|
+
<div>
|
|
1346
|
+
<p className="text-sm font-medium">{expandedAsset.fileName}</p>
|
|
1347
|
+
<p className="text-xs text-white/70 mt-1">{formatSize(expandedAsset.fileSize)}</p>
|
|
1348
|
+
</div>
|
|
1349
|
+
</div>
|
|
1350
|
+
</div>
|
|
1351
|
+
</div>
|
|
1352
|
+
)}
|
|
1353
|
+
</div>
|
|
1354
|
+
);
|
|
1355
|
+
}
|
|
1356
|
+
|
|
1357
|
+
/* ------------------------------------------------------------------ */
|
|
1358
|
+
/* Video/Audio file list */
|
|
1359
|
+
/* ------------------------------------------------------------------ */
|
|
1360
|
+
|
|
1361
|
+
function FileList({
|
|
1362
|
+
assets,
|
|
1363
|
+
mediaType,
|
|
1364
|
+
onDelete,
|
|
1365
|
+
onProcess,
|
|
1366
|
+
}: {
|
|
1367
|
+
assets: MediaAsset[];
|
|
1368
|
+
mediaType: 'video' | 'audio';
|
|
1369
|
+
onDelete: (id: string) => void;
|
|
1370
|
+
onProcess: (id: string) => void;
|
|
1371
|
+
}) {
|
|
1372
|
+
const Icon = mediaType === 'video' ? Video : AudioLines;
|
|
1373
|
+
|
|
1374
|
+
return (
|
|
1375
|
+
<div className="flex flex-col gap-1.5">
|
|
1376
|
+
{assets.map((asset) => (
|
|
1377
|
+
<div
|
|
1378
|
+
key={asset.id}
|
|
1379
|
+
className="flex items-center gap-3 rounded-lg border border-border px-3 py-2.5 group"
|
|
1380
|
+
>
|
|
1381
|
+
<div className="flex size-9 items-center justify-center rounded-md bg-muted shrink-0">
|
|
1382
|
+
<Icon className="size-4 text-muted-foreground" />
|
|
1383
|
+
</div>
|
|
1384
|
+
<div className="min-w-0 flex-1">
|
|
1385
|
+
<p className="truncate text-[12px] font-medium text-foreground">{asset.fileName}</p>
|
|
1386
|
+
<div className="flex items-center gap-2 mt-0.5">
|
|
1387
|
+
<span className="text-[10px] text-muted-foreground">
|
|
1388
|
+
{formatSize(asset.fileSize)}
|
|
1389
|
+
</span>
|
|
1390
|
+
{asset.durationSecs ? (
|
|
1391
|
+
<span className="text-[10px] text-muted-foreground">
|
|
1392
|
+
· {Math.floor(asset.durationSecs / 60)}:
|
|
1393
|
+
{String(Math.floor(asset.durationSecs % 60)).padStart(2, '0')}
|
|
1394
|
+
</span>
|
|
1395
|
+
) : null}
|
|
1396
|
+
<StatusBadge asset={asset} />
|
|
1397
|
+
</div>
|
|
1398
|
+
{isActiveJob(asset) ? (
|
|
1399
|
+
<Progress
|
|
1400
|
+
value={asset.processingProgress ?? 1}
|
|
1401
|
+
className={cn('mt-2 h-1', INDEXING_PROGRESS_CLASS)}
|
|
1402
|
+
/>
|
|
1403
|
+
) : null}
|
|
1404
|
+
</div>
|
|
1405
|
+
<div className="flex items-center gap-1">
|
|
1406
|
+
{asset.processingStatus === 'failed' ? (
|
|
1407
|
+
<Button
|
|
1408
|
+
type="button"
|
|
1409
|
+
variant="secondary"
|
|
1410
|
+
size="sm"
|
|
1411
|
+
className="h-7 px-2 text-[11px]"
|
|
1412
|
+
onClick={() => onProcess(asset.id)}
|
|
1413
|
+
>
|
|
1414
|
+
Retry
|
|
1415
|
+
</Button>
|
|
1416
|
+
) : null}
|
|
1417
|
+
{asset.processingStatus === 'completed' ? (
|
|
1418
|
+
<Button
|
|
1419
|
+
type="button"
|
|
1420
|
+
variant="ghost"
|
|
1421
|
+
size="sm"
|
|
1422
|
+
className="h-7 px-2 text-[11px] text-muted-foreground"
|
|
1423
|
+
onClick={() => onProcess(asset.id)}
|
|
1424
|
+
>
|
|
1425
|
+
Re-index
|
|
1426
|
+
</Button>
|
|
1427
|
+
) : null}
|
|
1428
|
+
{!isActiveJob(asset) ? (
|
|
1429
|
+
<button
|
|
1430
|
+
type="button"
|
|
1431
|
+
aria-label={`Delete ${asset.fileName}`}
|
|
1432
|
+
onClick={() => onDelete(asset.id)}
|
|
1433
|
+
className="text-red-500 p-1.5 rounded cursor-pointer hover:text-red-600 transition-all"
|
|
1434
|
+
>
|
|
1435
|
+
<Trash2 className="size-3.5" />
|
|
1436
|
+
</button>
|
|
1437
|
+
) : null}
|
|
1438
|
+
</div>
|
|
1439
|
+
</div>
|
|
1440
|
+
))}
|
|
1441
|
+
</div>
|
|
1442
|
+
);
|
|
1443
|
+
}
|
|
1444
|
+
|
|
1445
|
+
/* ------------------------------------------------------------------ */
|
|
1446
|
+
/* Status badge */
|
|
1447
|
+
/* ------------------------------------------------------------------ */
|
|
1448
|
+
|
|
1449
|
+
function useETA(status: string, progress: number, createdAt: string) {
|
|
1450
|
+
const [eta, setEta] = useState<string | null>(null);
|
|
1451
|
+
|
|
1452
|
+
useEffect(() => {
|
|
1453
|
+
if (status !== 'processing' && status !== 'pending') {
|
|
1454
|
+
setEta(null);
|
|
1455
|
+
return;
|
|
1456
|
+
}
|
|
1457
|
+
const interval = setInterval(() => {
|
|
1458
|
+
if (progress <= 0 || progress >= 100) {
|
|
1459
|
+
setEta(null);
|
|
1460
|
+
return;
|
|
1461
|
+
}
|
|
1462
|
+
const startTime = new Date(createdAt).getTime();
|
|
1463
|
+
const elapsed = Date.now() - startTime;
|
|
1464
|
+
if (elapsed < 5000) return;
|
|
1465
|
+
|
|
1466
|
+
const estimatedTotal = elapsed / (progress / 100);
|
|
1467
|
+
const remaining = estimatedTotal - elapsed;
|
|
1468
|
+
if (remaining <= 0) {
|
|
1469
|
+
setEta(null);
|
|
1470
|
+
return;
|
|
1471
|
+
}
|
|
1472
|
+
|
|
1473
|
+
const secs = Math.floor(remaining / 1000);
|
|
1474
|
+
setEta(secs < 60 ? `${secs}s left` : `${Math.floor(secs / 60)}m left`);
|
|
1475
|
+
}, 1000);
|
|
1476
|
+
return () => clearInterval(interval);
|
|
1477
|
+
}, [status, progress, createdAt]);
|
|
1478
|
+
|
|
1479
|
+
return eta;
|
|
1480
|
+
}
|
|
1481
|
+
|
|
1482
|
+
function StatusBadge({ asset }: { asset: MediaAsset }) {
|
|
1483
|
+
const status = asset.processingStatus;
|
|
1484
|
+
const eta = useETA(status, asset.processingProgress ?? 0, asset.createdAt);
|
|
1485
|
+
|
|
1486
|
+
if (status === 'completed') {
|
|
1487
|
+
return (
|
|
1488
|
+
<span className="flex items-center gap-0.5 text-[10px] text-emerald-600">
|
|
1489
|
+
<Check className="size-2.5" />
|
|
1490
|
+
Indexed
|
|
1491
|
+
</span>
|
|
1492
|
+
);
|
|
1493
|
+
}
|
|
1494
|
+
if (status === 'processing') {
|
|
1495
|
+
return (
|
|
1496
|
+
<span className="flex items-center gap-1 text-[10px] text-blue-600 bg-blue-50/50 px-1.5 py-0.5 rounded-sm">
|
|
1497
|
+
<Loader2 className="size-2.5 animate-spin shrink-0" />
|
|
1498
|
+
<span
|
|
1499
|
+
className="truncate max-w-30 sm:max-w-50"
|
|
1500
|
+
title={asset.processingMessage || 'Processing...'}
|
|
1501
|
+
>
|
|
1502
|
+
{asset.processingMessage || 'Processing...'}
|
|
1503
|
+
</span>
|
|
1504
|
+
<span className="tabular-nums">{Math.round(asset.processingProgress ?? 0)}%</span>
|
|
1505
|
+
{eta && <span className="text-[9px] text-blue-500/80 ml-0.5">({eta})</span>}
|
|
1506
|
+
</span>
|
|
1507
|
+
);
|
|
1508
|
+
}
|
|
1509
|
+
if (status === 'pending' && asset.processingMessage) {
|
|
1510
|
+
return (
|
|
1511
|
+
<span className="flex items-center gap-1 rounded-sm bg-blue-50/50 px-1.5 py-0.5 text-[10px] text-blue-600">
|
|
1512
|
+
<Loader2 className="size-2.5 shrink-0 animate-spin" />
|
|
1513
|
+
<span className="max-w-30 truncate sm:max-w-50" title={asset.processingMessage}>
|
|
1514
|
+
{asset.processingMessage}
|
|
1515
|
+
</span>
|
|
1516
|
+
<span className="tabular-nums">{Math.round(asset.processingProgress ?? 1)}%</span>
|
|
1517
|
+
{eta && <span className="text-[9px] text-blue-500/80 ml-0.5">({eta})</span>}
|
|
1518
|
+
</span>
|
|
1519
|
+
);
|
|
1520
|
+
}
|
|
1521
|
+
if (status === 'failed') {
|
|
1522
|
+
return (
|
|
1523
|
+
<span
|
|
1524
|
+
className="flex items-center gap-0.5 text-[10px] text-red-500"
|
|
1525
|
+
title={asset.processingError}
|
|
1526
|
+
>
|
|
1527
|
+
<AlertCircle className="size-2.5 shrink-0" />
|
|
1528
|
+
<span className="truncate max-w-30">{asset.processingError || 'Failed'}</span>
|
|
1529
|
+
</span>
|
|
1530
|
+
);
|
|
1531
|
+
}
|
|
1532
|
+
return (
|
|
1533
|
+
<span className="flex items-center gap-1 text-[10px] text-muted-foreground/60">
|
|
1534
|
+
<Clock className="size-2.5 shrink-0" />
|
|
1535
|
+
<span className="truncate max-w-30" title={asset.processingMessage || 'Pending...'}>
|
|
1536
|
+
{asset.processingMessage || 'Pending...'}
|
|
1537
|
+
</span>
|
|
1538
|
+
</span>
|
|
1539
|
+
);
|
|
1540
|
+
}
|
|
1541
|
+
|
|
1542
|
+
function ActiveIndexingList({
|
|
1543
|
+
assets,
|
|
1544
|
+
onCancel,
|
|
1545
|
+
}: {
|
|
1546
|
+
assets: MediaAsset[];
|
|
1547
|
+
onCancel: (id: string) => void;
|
|
1548
|
+
}) {
|
|
1549
|
+
return (
|
|
1550
|
+
<section
|
|
1551
|
+
aria-live="polite"
|
|
1552
|
+
aria-label="Active media indexing jobs"
|
|
1553
|
+
className="space-y-3 rounded-xl border border-emerald-300 bg-emerald-50/20 p-3 dark:border-emerald-700/60 dark:bg-emerald-950/20"
|
|
1554
|
+
>
|
|
1555
|
+
<div className="flex items-center gap-2">
|
|
1556
|
+
<Loader2 className="size-3.5 animate-spin text-emerald-600 dark:text-emerald-400" />
|
|
1557
|
+
<div className="min-w-0 flex-1">
|
|
1558
|
+
<p className="text-[12px] font-medium text-foreground">
|
|
1559
|
+
Indexing {assets.length} {assets.length === 1 ? 'file' : 'files'}
|
|
1560
|
+
</p>
|
|
1561
|
+
</div>
|
|
1562
|
+
</div>
|
|
1563
|
+
|
|
1564
|
+
<div className="space-y-2">
|
|
1565
|
+
{assets.map((asset) => {
|
|
1566
|
+
const progress = Math.max(1, Math.min(100, asset.processingProgress ?? 1));
|
|
1567
|
+
return (
|
|
1568
|
+
<div
|
|
1569
|
+
key={asset.id}
|
|
1570
|
+
className="space-y-2 rounded-lg border border-transparent bg-background/40 p-2.5 relative group"
|
|
1571
|
+
>
|
|
1572
|
+
<div className="flex items-start justify-between gap-3">
|
|
1573
|
+
<div className="min-w-0 pr-6">
|
|
1574
|
+
<p className="truncate text-[11px] font-medium text-foreground">
|
|
1575
|
+
{asset.fileName}
|
|
1576
|
+
</p>
|
|
1577
|
+
</div>
|
|
1578
|
+
<div className="flex items-center gap-2">
|
|
1579
|
+
<span className="shrink-0 text-[10px] font-medium tabular-nums text-emerald-600 dark:text-emerald-400">
|
|
1580
|
+
{Math.round(progress)}%
|
|
1581
|
+
</span>
|
|
1582
|
+
<button
|
|
1583
|
+
type="button"
|
|
1584
|
+
title="Cancel Indexing"
|
|
1585
|
+
onClick={() => onCancel(asset.id)}
|
|
1586
|
+
className="p-1 -mr-1 rounded-full text-muted-foreground hover:bg-red-100 hover:text-red-600 dark:hover:bg-red-900/30 transition-colors"
|
|
1587
|
+
>
|
|
1588
|
+
<X className="size-3" />
|
|
1589
|
+
</button>
|
|
1590
|
+
</div>
|
|
1591
|
+
</div>
|
|
1592
|
+
<Progress
|
|
1593
|
+
value={progress}
|
|
1594
|
+
className={cn(
|
|
1595
|
+
'h-1.5 **:data-[slot=progress-indicator]:transition-[transform] **:data-[slot=progress-indicator]:duration-500 **:data-[slot=progress-indicator]:ease-out',
|
|
1596
|
+
INDEXING_PROGRESS_CLASS,
|
|
1597
|
+
)}
|
|
1598
|
+
/>
|
|
1599
|
+
<div className="flex items-center gap-1.5">
|
|
1600
|
+
<ElapsedTime startTime={asset.createdAt} />
|
|
1601
|
+
<p className="truncate text-[10px] text-muted-foreground animate-pulse">
|
|
1602
|
+
{asset.processingMessage || 'Preparing media indexing...'}
|
|
1603
|
+
</p>
|
|
1604
|
+
</div>
|
|
1605
|
+
{asset.processingSteps?.length ? (
|
|
1606
|
+
<PipelineSteps steps={asset.processingSteps} />
|
|
1607
|
+
) : null}
|
|
1608
|
+
</div>
|
|
1609
|
+
);
|
|
1610
|
+
})}
|
|
1611
|
+
</div>
|
|
1612
|
+
</section>
|
|
1613
|
+
);
|
|
1614
|
+
}
|
|
1615
|
+
|
|
1616
|
+
const PIPELINE_STAGE_LABELS: Record<MediaPipelineStage, string> = {
|
|
1617
|
+
download: 'Download media',
|
|
1618
|
+
extract: 'Extract media',
|
|
1619
|
+
transcribe: 'Transcribe audio',
|
|
1620
|
+
vision: 'Understand visuals',
|
|
1621
|
+
synthesize: 'Connect notes',
|
|
1622
|
+
index: 'Search index',
|
|
1623
|
+
};
|
|
1624
|
+
|
|
1625
|
+
function PipelineSteps({ steps }: { steps: MediaProcessingStep[] }) {
|
|
1626
|
+
return (
|
|
1627
|
+
<div className="grid gap-1 pt-0.5 sm:grid-cols-2 lg:grid-cols-3">
|
|
1628
|
+
{steps.map((step) => {
|
|
1629
|
+
const hasCount = step.current !== undefined && step.total !== undefined;
|
|
1630
|
+
const label = hasCount
|
|
1631
|
+
? `${step.current} / ${step.total}${step.unit ? ` ${step.unit}` : ''}`
|
|
1632
|
+
: PIPELINE_STAGE_LABELS[step.stage];
|
|
1633
|
+
const isRunning = step.status === 'running';
|
|
1634
|
+
const isComplete = step.status === 'completed' || step.status === 'skipped';
|
|
1635
|
+
|
|
1636
|
+
return (
|
|
1637
|
+
<div
|
|
1638
|
+
key={step.stage}
|
|
1639
|
+
className={cn(
|
|
1640
|
+
'flex min-w-0 items-center gap-1.5 rounded-md border px-2 py-1 text-[9px]',
|
|
1641
|
+
isRunning
|
|
1642
|
+
? 'border-emerald-300 bg-emerald-50/70 text-emerald-700 dark:border-emerald-700/70 dark:bg-emerald-950/40 dark:text-emerald-300'
|
|
1643
|
+
: 'border-border/60 bg-background/40 text-muted-foreground',
|
|
1644
|
+
)}
|
|
1645
|
+
>
|
|
1646
|
+
{isRunning ? (
|
|
1647
|
+
<Loader2 className="size-2.5 shrink-0 animate-spin" aria-hidden="true" />
|
|
1648
|
+
) : isComplete ? (
|
|
1649
|
+
<Check className="size-2.5 shrink-0 text-emerald-600" aria-hidden="true" />
|
|
1650
|
+
) : step.status === 'failed' ? (
|
|
1651
|
+
<AlertCircle className="size-2.5 shrink-0 text-destructive" aria-hidden="true" />
|
|
1652
|
+
) : (
|
|
1653
|
+
<Clock className="size-2.5 shrink-0" aria-hidden="true" />
|
|
1654
|
+
)}
|
|
1655
|
+
<span className="truncate tabular-nums" title={step.message || label}>
|
|
1656
|
+
{label}
|
|
1657
|
+
</span>
|
|
1658
|
+
</div>
|
|
1659
|
+
);
|
|
1660
|
+
})}
|
|
1661
|
+
</div>
|
|
1662
|
+
);
|
|
1663
|
+
}
|
|
1664
|
+
|
|
1665
|
+
function ElapsedTime({ startTime }: { startTime: string }) {
|
|
1666
|
+
const [elapsed, setElapsed] = useState(0);
|
|
1667
|
+
useEffect(() => {
|
|
1668
|
+
const start = new Date(startTime).getTime();
|
|
1669
|
+
const update = () => setElapsed(Math.max(0, Math.floor((Date.now() - start) / 1000)));
|
|
1670
|
+
update();
|
|
1671
|
+
const interval = setInterval(update, 1000);
|
|
1672
|
+
return () => clearInterval(interval);
|
|
1673
|
+
}, [startTime]);
|
|
1674
|
+
const mins = Math.floor(elapsed / 60);
|
|
1675
|
+
const secs = elapsed % 60;
|
|
1676
|
+
return (
|
|
1677
|
+
<span className="font-mono tabular-nums text-[10px] text-muted-foreground/60">
|
|
1678
|
+
{mins}:{secs.toString().padStart(2, '0')}
|
|
1679
|
+
</span>
|
|
1680
|
+
);
|
|
1681
|
+
}
|
|
1682
|
+
|
|
1683
|
+
function EstimateMetric({ label, value }: { label: string; value: string }) {
|
|
1684
|
+
return (
|
|
1685
|
+
<div className="min-w-0">
|
|
1686
|
+
<p className="text-[10px] font-medium uppercase tracking-wide text-muted-foreground/70">
|
|
1687
|
+
{label}
|
|
1688
|
+
</p>
|
|
1689
|
+
<p className="mt-0.5 truncate text-[11px] text-foreground" title={value}>
|
|
1690
|
+
{value}
|
|
1691
|
+
</p>
|
|
1692
|
+
</div>
|
|
1693
|
+
);
|
|
1694
|
+
}
|
|
1695
|
+
|
|
1696
|
+
function formatDuration(seconds: number): string {
|
|
1697
|
+
const hours = Math.floor(seconds / 3600);
|
|
1698
|
+
const minutes = Math.floor((seconds % 3600) / 60);
|
|
1699
|
+
const secs = Math.floor(seconds % 60);
|
|
1700
|
+
return hours > 0 ? `${hours}h ${minutes}m` : `${minutes}:${String(secs).padStart(2, '0')}`;
|
|
1701
|
+
}
|