@tyroneross/navgator 0.2.0 → 0.2.2
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/.claude-plugin/marketplace.json +23 -0
- package/.claude-plugin/plugin.json +10 -7
- package/CLAUDE.md +72 -0
- package/README.md +49 -80
- package/dist/cli/index.js +1 -1
- package/hooks/hooks.json +5 -5
- package/package.json +5 -3
- package/scripts/install-plugin.sh +98 -0
- package/skills/check/SKILL.md +64 -0
- package/skills/connections/SKILL.md +54 -0
- package/skills/diagram/SKILL.md +64 -0
- package/skills/export/SKILL.md +49 -0
- package/skills/impact/SKILL.md +58 -0
- package/skills/install/SKILL.md +94 -0
- package/skills/scan/SKILL.md +75 -0
- package/skills/status/SKILL.md +37 -0
- package/skills/ui/SKILL.md +43 -0
- package/skills/update/SKILL.md +43 -0
- package/web/.next/standalone/web/.next/BUILD_ID +1 -0
- package/web/.next/standalone/web/.next/app-path-routes-manifest.json +13 -0
- package/web/.next/standalone/web/.next/build-manifest.json +20 -0
- package/web/.next/standalone/web/.next/package.json +1 -0
- package/web/.next/standalone/web/.next/prerender-manifest.json +88 -0
- package/web/.next/standalone/web/.next/required-server-files.json +317 -0
- package/web/.next/standalone/web/.next/routes-manifest.json +110 -0
- package/web/.next/standalone/web/.next/server/app/_global-error/page/app-paths-manifest.json +3 -0
- package/web/.next/standalone/web/.next/server/app/_global-error/page/build-manifest.json +17 -0
- package/web/.next/standalone/web/.next/server/app/_global-error/page/next-font-manifest.json +6 -0
- package/web/.next/standalone/web/.next/server/app/_global-error/page/react-loadable-manifest.json +1 -0
- package/web/.next/standalone/web/.next/server/app/_global-error/page/server-reference-manifest.json +4 -0
- package/web/.next/standalone/web/.next/server/app/_global-error/page.js +10 -0
- package/web/.next/standalone/web/.next/server/app/_global-error/page.js.map +5 -0
- package/web/.next/standalone/web/.next/server/app/_global-error/page.js.nft.json +1 -0
- package/web/.next/standalone/web/.next/server/app/_global-error/page_client-reference-manifest.js +2 -0
- package/web/.next/standalone/web/.next/server/app/_global-error.html +2 -0
- package/web/.next/standalone/web/.next/server/app/_global-error.meta +15 -0
- package/web/.next/standalone/web/.next/server/app/_global-error.rsc +12 -0
- package/web/.next/standalone/web/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +5 -0
- package/web/.next/standalone/web/.next/server/app/_global-error.segments/_full.segment.rsc +12 -0
- package/web/.next/standalone/web/.next/server/app/_global-error.segments/_head.segment.rsc +7 -0
- package/web/.next/standalone/web/.next/server/app/_global-error.segments/_index.segment.rsc +4 -0
- package/web/.next/standalone/web/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -0
- package/web/.next/standalone/web/.next/server/app/_not-found/page/app-paths-manifest.json +3 -0
- package/web/.next/standalone/web/.next/server/app/_not-found/page/build-manifest.json +17 -0
- package/web/.next/standalone/web/.next/server/app/_not-found/page/next-font-manifest.json +11 -0
- package/web/.next/standalone/web/.next/server/app/_not-found/page/react-loadable-manifest.json +1 -0
- package/web/.next/standalone/web/.next/server/app/_not-found/page/server-reference-manifest.json +4 -0
- package/web/.next/standalone/web/.next/server/app/_not-found/page.js +13 -0
- package/web/.next/standalone/web/.next/server/app/_not-found/page.js.map +5 -0
- package/web/.next/standalone/web/.next/server/app/_not-found/page.js.nft.json +1 -0
- package/web/.next/standalone/web/.next/server/app/_not-found/page_client-reference-manifest.js +2 -0
- package/web/.next/standalone/web/.next/server/app/_not-found.html +1 -0
- package/web/.next/standalone/web/.next/server/app/_not-found.meta +16 -0
- package/web/.next/standalone/web/.next/server/app/_not-found.rsc +17 -0
- package/web/.next/standalone/web/.next/server/app/_not-found.segments/_full.segment.rsc +17 -0
- package/web/.next/standalone/web/.next/server/app/_not-found.segments/_head.segment.rsc +8 -0
- package/web/.next/standalone/web/.next/server/app/_not-found.segments/_index.segment.rsc +8 -0
- package/web/.next/standalone/web/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +5 -0
- package/web/.next/standalone/web/.next/server/app/_not-found.segments/_not-found.segment.rsc +4 -0
- package/web/.next/standalone/web/.next/server/app/_not-found.segments/_tree.segment.rsc +3 -0
- package/web/.next/standalone/web/.next/server/app/api/components/route/app-paths-manifest.json +3 -0
- package/web/.next/standalone/web/.next/server/app/api/components/route/build-manifest.json +11 -0
- package/web/.next/standalone/web/.next/server/app/api/components/route/server-reference-manifest.json +4 -0
- package/web/.next/standalone/web/.next/server/app/api/components/route.js +6 -0
- package/web/.next/standalone/web/.next/server/app/api/components/route.js.map +5 -0
- package/web/.next/standalone/web/.next/server/app/api/components/route.js.nft.json +1 -0
- package/web/.next/standalone/web/.next/server/app/api/components/route_client-reference-manifest.js +2 -0
- package/web/.next/standalone/web/.next/server/app/api/connections/route/app-paths-manifest.json +3 -0
- package/web/.next/standalone/web/.next/server/app/api/connections/route/build-manifest.json +11 -0
- package/web/.next/standalone/web/.next/server/app/api/connections/route/server-reference-manifest.json +4 -0
- package/web/.next/standalone/web/.next/server/app/api/connections/route.js +6 -0
- package/web/.next/standalone/web/.next/server/app/api/connections/route.js.map +5 -0
- package/web/.next/standalone/web/.next/server/app/api/connections/route.js.nft.json +1 -0
- package/web/.next/standalone/web/.next/server/app/api/connections/route_client-reference-manifest.js +2 -0
- package/web/.next/standalone/web/.next/server/app/api/graph/route/app-paths-manifest.json +3 -0
- package/web/.next/standalone/web/.next/server/app/api/graph/route/build-manifest.json +11 -0
- package/web/.next/standalone/web/.next/server/app/api/graph/route/server-reference-manifest.json +4 -0
- package/web/.next/standalone/web/.next/server/app/api/graph/route.js +6 -0
- package/web/.next/standalone/web/.next/server/app/api/graph/route.js.map +5 -0
- package/web/.next/standalone/web/.next/server/app/api/graph/route.js.nft.json +1 -0
- package/web/.next/standalone/web/.next/server/app/api/graph/route_client-reference-manifest.js +2 -0
- package/web/.next/standalone/web/.next/server/app/api/projects/route/app-paths-manifest.json +3 -0
- package/web/.next/standalone/web/.next/server/app/api/projects/route/build-manifest.json +11 -0
- package/web/.next/standalone/web/.next/server/app/api/projects/route/server-reference-manifest.json +4 -0
- package/web/.next/standalone/web/.next/server/app/api/projects/route.js +6 -0
- package/web/.next/standalone/web/.next/server/app/api/projects/route.js.map +5 -0
- package/web/.next/standalone/web/.next/server/app/api/projects/route.js.nft.json +1 -0
- package/web/.next/standalone/web/.next/server/app/api/projects/route_client-reference-manifest.js +2 -0
- package/web/.next/standalone/web/.next/server/app/api/prompts/route/app-paths-manifest.json +3 -0
- package/web/.next/standalone/web/.next/server/app/api/prompts/route/build-manifest.json +11 -0
- package/web/.next/standalone/web/.next/server/app/api/prompts/route/server-reference-manifest.json +4 -0
- package/web/.next/standalone/web/.next/server/app/api/prompts/route.js +7 -0
- package/web/.next/standalone/web/.next/server/app/api/prompts/route.js.map +5 -0
- package/web/.next/standalone/web/.next/server/app/api/prompts/route.js.nft.json +1 -0
- package/web/.next/standalone/web/.next/server/app/api/prompts/route_client-reference-manifest.js +2 -0
- package/web/.next/standalone/web/.next/server/app/api/scan/route/app-paths-manifest.json +3 -0
- package/web/.next/standalone/web/.next/server/app/api/scan/route/build-manifest.json +11 -0
- package/web/.next/standalone/web/.next/server/app/api/scan/route/server-reference-manifest.json +4 -0
- package/web/.next/standalone/web/.next/server/app/api/scan/route.js +6 -0
- package/web/.next/standalone/web/.next/server/app/api/scan/route.js.map +5 -0
- package/web/.next/standalone/web/.next/server/app/api/scan/route.js.nft.json +1 -0
- package/web/.next/standalone/web/.next/server/app/api/scan/route_client-reference-manifest.js +2 -0
- package/web/.next/standalone/web/.next/server/app/api/settings/route/app-paths-manifest.json +3 -0
- package/web/.next/standalone/web/.next/server/app/api/settings/route/build-manifest.json +11 -0
- package/web/.next/standalone/web/.next/server/app/api/settings/route/server-reference-manifest.json +4 -0
- package/web/.next/standalone/web/.next/server/app/api/settings/route.js +6 -0
- package/web/.next/standalone/web/.next/server/app/api/settings/route.js.map +5 -0
- package/web/.next/standalone/web/.next/server/app/api/settings/route.js.nft.json +1 -0
- package/web/.next/standalone/web/.next/server/app/api/settings/route_client-reference-manifest.js +2 -0
- package/web/.next/standalone/web/.next/server/app/api/status/route/app-paths-manifest.json +3 -0
- package/web/.next/standalone/web/.next/server/app/api/status/route/build-manifest.json +11 -0
- package/web/.next/standalone/web/.next/server/app/api/status/route/server-reference-manifest.json +4 -0
- package/web/.next/standalone/web/.next/server/app/api/status/route.js +6 -0
- package/web/.next/standalone/web/.next/server/app/api/status/route.js.map +5 -0
- package/web/.next/standalone/web/.next/server/app/api/status/route.js.nft.json +1 -0
- package/web/.next/standalone/web/.next/server/app/api/status/route_client-reference-manifest.js +2 -0
- package/web/.next/standalone/web/.next/server/app/index.html +1 -0
- package/web/.next/standalone/web/.next/server/app/index.meta +14 -0
- package/web/.next/standalone/web/.next/server/app/index.rsc +23 -0
- package/web/.next/standalone/web/.next/server/app/index.segments/__PAGE__.segment.rsc +9 -0
- package/web/.next/standalone/web/.next/server/app/index.segments/_full.segment.rsc +23 -0
- package/web/.next/standalone/web/.next/server/app/index.segments/_head.segment.rsc +8 -0
- package/web/.next/standalone/web/.next/server/app/index.segments/_index.segment.rsc +8 -0
- package/web/.next/standalone/web/.next/server/app/index.segments/_tree.segment.rsc +5 -0
- package/web/.next/standalone/web/.next/server/app/page/app-paths-manifest.json +3 -0
- package/web/.next/standalone/web/.next/server/app/page/build-manifest.json +17 -0
- package/web/.next/standalone/web/.next/server/app/page/next-font-manifest.json +11 -0
- package/web/.next/standalone/web/.next/server/app/page/react-loadable-manifest.json +1 -0
- package/web/.next/standalone/web/.next/server/app/page/server-reference-manifest.json +4 -0
- package/web/.next/standalone/web/.next/server/app/page.js +15 -0
- package/web/.next/standalone/web/.next/server/app/page.js.map +5 -0
- package/web/.next/standalone/web/.next/server/app/page.js.nft.json +1 -0
- package/web/.next/standalone/web/.next/server/app/page_client-reference-manifest.js +2 -0
- package/web/.next/standalone/web/.next/server/app-paths-manifest.json +13 -0
- package/web/.next/standalone/web/.next/server/chunks/2374f_next_dist_esm_build_templates_app-route_0bb4e66a.js +19 -0
- package/web/.next/standalone/web/.next/server/chunks/[root-of-the-server]__006b837d._.js +3 -0
- package/web/.next/standalone/web/.next/server/chunks/[root-of-the-server]__1ab91221._.js +3 -0
- package/web/.next/standalone/web/.next/server/chunks/[root-of-the-server]__2e09fec9._.js +3 -0
- package/web/.next/standalone/web/.next/server/chunks/[root-of-the-server]__38d0390f._.js +3 -0
- package/web/.next/standalone/web/.next/server/chunks/[root-of-the-server]__539ef30d._.js +3 -0
- package/web/.next/standalone/web/.next/server/chunks/[root-of-the-server]__594bcf20._.js +3 -0
- package/web/.next/standalone/web/.next/server/chunks/[root-of-the-server]__b888fadf._.js +3 -0
- package/web/.next/standalone/web/.next/server/chunks/[root-of-the-server]__f3450c22._.js +21 -0
- package/web/.next/standalone/web/.next/server/chunks/[root-of-the-server]__fa2ec862._.js +3 -0
- package/web/.next/standalone/web/.next/server/chunks/[turbopack]_runtime.js +770 -0
- package/web/.next/standalone/web/.next/server/chunks/ssr/2374f_e6039567._.js +6 -0
- package/web/.next/standalone/web/.next/server/chunks/ssr/2374f_next_dist_09351209._.js +6 -0
- package/web/.next/standalone/web/.next/server/chunks/ssr/2374f_next_dist_222be7ae._.js +6 -0
- package/web/.next/standalone/web/.next/server/chunks/ssr/2374f_next_dist_2346e1b3._.js +3 -0
- package/web/.next/standalone/web/.next/server/chunks/ssr/2374f_next_dist_cec86455._.js +4 -0
- package/web/.next/standalone/web/.next/server/chunks/ssr/2374f_next_dist_client_components_9c5d1a14._.js +3 -0
- package/web/.next/standalone/web/.next/server/chunks/ssr/2374f_next_dist_client_components_builtin_forbidden_8eae0c85.js +3 -0
- package/web/.next/standalone/web/.next/server/chunks/ssr/2374f_next_dist_client_components_builtin_global-error_81159d60.js +3 -0
- package/web/.next/standalone/web/.next/server/chunks/ssr/2374f_next_dist_client_components_builtin_unauthorized_7d34a31c.js +3 -0
- package/web/.next/standalone/web/.next/server/chunks/ssr/2374f_next_dist_e03afa0e._.js +3 -0
- package/web/.next/standalone/web/.next/server/chunks/ssr/2374f_next_dist_esm_build_templates_app-page_2c8d71b9.js +4 -0
- package/web/.next/standalone/web/.next/server/chunks/ssr/2374f_next_dist_server_route-modules_app-page_vendored_ssr_react-dom_8910f04c.js +3 -0
- package/web/.next/standalone/web/.next/server/chunks/ssr/[root-of-the-server]__1a0663e6._.js +3 -0
- package/web/.next/standalone/web/.next/server/chunks/ssr/[root-of-the-server]__4306eafc._.js +3 -0
- package/web/.next/standalone/web/.next/server/chunks/ssr/[root-of-the-server]__44903626._.js +3 -0
- package/web/.next/standalone/web/.next/server/chunks/ssr/[root-of-the-server]__60278e3f._.js +3 -0
- package/web/.next/standalone/web/.next/server/chunks/ssr/[root-of-the-server]__61942f24._.js +4 -0
- package/web/.next/standalone/web/.next/server/chunks/ssr/[root-of-the-server]__8c45c3c9._.js +3 -0
- package/web/.next/standalone/web/.next/server/chunks/ssr/[root-of-the-server]__9a2f110d._.js +3 -0
- package/web/.next/standalone/web/.next/server/chunks/ssr/[root-of-the-server]__ed07bd88._.js +3 -0
- package/web/.next/standalone/web/.next/server/chunks/ssr/[root-of-the-server]__f2db61af._.js +3 -0
- package/web/.next/standalone/web/.next/server/chunks/ssr/[turbopack]_runtime.js +770 -0
- package/web/.next/standalone/web/.next/server/chunks/ssr/web_0103e631._.js +4 -0
- package/web/.next/standalone/web/.next/server/chunks/ssr/web_171de0df._.js +14 -0
- package/web/.next/standalone/web/.next/server/chunks/ssr/web__next-internal_server_app__global-error_page_actions_2a1e94d4.js +3 -0
- package/web/.next/standalone/web/.next/server/chunks/ssr/web__next-internal_server_app__not-found_page_actions_9eaa9845.js +3 -0
- package/web/.next/standalone/web/.next/server/chunks/ssr/web__next-internal_server_app_page_actions_ec26bf28.js +3 -0
- package/web/.next/standalone/web/.next/server/chunks/web__next-internal_server_app_api_components_route_actions_c88bf2a6.js +3 -0
- package/web/.next/standalone/web/.next/server/chunks/web__next-internal_server_app_api_connections_route_actions_b1d5e95a.js +3 -0
- package/web/.next/standalone/web/.next/server/chunks/web__next-internal_server_app_api_graph_route_actions_e2dd052c.js +3 -0
- package/web/.next/standalone/web/.next/server/chunks/web__next-internal_server_app_api_projects_route_actions_3f671cbb.js +3 -0
- package/web/.next/standalone/web/.next/server/chunks/web__next-internal_server_app_api_prompts_route_actions_85b56166.js +3 -0
- package/web/.next/standalone/web/.next/server/chunks/web__next-internal_server_app_api_scan_route_actions_861cde8d.js +3 -0
- package/web/.next/standalone/web/.next/server/chunks/web__next-internal_server_app_api_settings_route_actions_e19026ae.js +3 -0
- package/web/.next/standalone/web/.next/server/chunks/web__next-internal_server_app_api_status_route_actions_8b8c6c89.js +3 -0
- package/web/.next/standalone/web/.next/server/functions-config-manifest.json +4 -0
- package/web/.next/standalone/web/.next/server/middleware-build-manifest.js +21 -0
- package/web/.next/standalone/web/.next/server/middleware-manifest.json +6 -0
- package/web/.next/standalone/web/.next/server/next-font-manifest.js +1 -0
- package/web/.next/standalone/web/.next/server/next-font-manifest.json +15 -0
- package/web/.next/standalone/web/.next/server/pages/404.html +1 -0
- package/web/.next/standalone/web/.next/server/pages/500.html +2 -0
- package/web/.next/standalone/web/.next/server/pages-manifest.json +4 -0
- package/web/.next/standalone/web/.next/server/server-reference-manifest.js +1 -0
- package/web/.next/standalone/web/.next/server/server-reference-manifest.json +5 -0
- package/web/.next/standalone/web/.next/static/P-ZMQO7_Wnj487ks3guqa/_buildManifest.js +11 -0
- package/web/.next/standalone/web/.next/static/P-ZMQO7_Wnj487ks3guqa/_clientMiddlewareManifest.json +1 -0
- package/web/.next/standalone/web/.next/static/P-ZMQO7_Wnj487ks3guqa/_ssgManifest.js +1 -0
- package/web/.next/standalone/web/.next/static/chunks/062ae79751df2759.js +1 -0
- package/web/.next/standalone/web/.next/static/chunks/159889e17b2cf1f8.js +2 -0
- package/web/.next/standalone/web/.next/static/chunks/458d6f37339fc069.js +1 -0
- package/web/.next/standalone/web/.next/static/chunks/6d3d39425a878d7f.js +1 -0
- package/web/.next/standalone/web/.next/static/chunks/8a80e7184ad3a13f.css +2 -0
- package/web/.next/standalone/web/.next/static/chunks/a6dad97d9634a72d.js +1 -0
- package/web/.next/standalone/web/.next/static/chunks/c056475f5f4424b6.css +1 -0
- package/web/.next/standalone/web/.next/static/chunks/c57fee8cce8d7cb9.js +1 -0
- package/web/.next/standalone/web/.next/static/chunks/cb3513192b63e480.js +12 -0
- package/web/.next/standalone/web/.next/static/chunks/dd22b5f2beb2cc31.js +1 -0
- package/web/.next/standalone/web/.next/static/chunks/e0affeef0ddb9a97.js +4 -0
- package/web/.next/standalone/web/.next/static/chunks/f74a6859e1c4d5e3.js +1 -0
- package/web/.next/standalone/web/.next/static/chunks/turbopack-c0c89f9e6f0a38c4.js +3 -0
- package/web/.next/standalone/web/.next/static/media/4fa387ec64143e14-s.c1fdd6c2.woff2 +0 -0
- package/web/.next/standalone/web/.next/static/media/7178b3e590c64307-s.b97b3418.woff2 +0 -0
- package/web/.next/standalone/web/.next/static/media/797e433ab948586e-s.p.dbea232f.woff2 +0 -0
- package/web/.next/standalone/web/.next/static/media/8a480f0b521d4e75-s.8e0177b5.woff2 +0 -0
- package/web/.next/standalone/web/.next/static/media/bbc41e54d2fcbd21-s.799d8ef8.woff2 +0 -0
- package/web/.next/standalone/web/.next/static/media/caa3a2e1cccd8315-s.p.853070df.woff2 +0 -0
- package/web/.next/standalone/web/app/api/components/route.ts +252 -0
- package/web/.next/standalone/web/app/api/connections/route.ts +319 -0
- package/web/.next/standalone/web/app/api/graph/route.ts +235 -0
- package/web/.next/standalone/web/app/api/projects/route.ts +221 -0
- package/web/.next/standalone/web/app/api/prompts/route.ts +328 -0
- package/web/.next/standalone/web/app/api/scan/route.ts +108 -0
- package/web/.next/standalone/web/app/api/settings/route.ts +198 -0
- package/web/.next/standalone/web/app/api/status/route.ts +169 -0
- package/web/.next/standalone/web/app/globals.css +99 -0
- package/web/.next/standalone/web/app/layout.tsx +49 -0
- package/web/.next/standalone/web/app/page.tsx +94 -0
- package/web/.next/standalone/web/components/components-panel.tsx +240 -0
- package/web/.next/standalone/web/components/connections-panel.tsx +220 -0
- package/web/.next/standalone/web/components/diagram-view.tsx +735 -0
- package/web/.next/standalone/web/components/header.tsx +225 -0
- package/web/.next/standalone/web/components/impact-analysis.tsx +358 -0
- package/web/.next/standalone/web/components/llm-tracking-panel.tsx +1483 -0
- package/web/.next/standalone/web/components/settings-panel.tsx +671 -0
- package/web/.next/standalone/web/components/sidebar.tsx +74 -0
- package/web/.next/standalone/web/components/status-overview.tsx +326 -0
- package/web/.next/standalone/web/components/theme-provider.tsx +11 -0
- package/web/.next/standalone/web/components/ui/accordion.tsx +66 -0
- package/web/.next/standalone/web/components/ui/alert-dialog.tsx +157 -0
- package/web/.next/standalone/web/components/ui/alert.tsx +66 -0
- package/web/.next/standalone/web/components/ui/aspect-ratio.tsx +11 -0
- package/web/.next/standalone/web/components/ui/avatar.tsx +53 -0
- package/web/.next/standalone/web/components/ui/badge.tsx +46 -0
- package/web/.next/standalone/web/components/ui/breadcrumb.tsx +109 -0
- package/web/.next/standalone/web/components/ui/button-group.tsx +83 -0
- package/web/.next/standalone/web/components/ui/button.tsx +60 -0
- package/web/.next/standalone/web/components/ui/calendar.tsx +213 -0
- package/web/.next/standalone/web/components/ui/card.tsx +92 -0
- package/web/.next/standalone/web/components/ui/carousel.tsx +241 -0
- package/web/.next/standalone/web/components/ui/chart.tsx +353 -0
- package/web/.next/standalone/web/components/ui/checkbox.tsx +32 -0
- package/web/.next/standalone/web/components/ui/collapsible.tsx +33 -0
- package/web/.next/standalone/web/components/ui/command.tsx +184 -0
- package/web/.next/standalone/web/components/ui/context-menu.tsx +252 -0
- package/web/.next/standalone/web/components/ui/dialog.tsx +143 -0
- package/web/.next/standalone/web/components/ui/drawer.tsx +135 -0
- package/web/.next/standalone/web/components/ui/dropdown-menu.tsx +257 -0
- package/web/.next/standalone/web/components/ui/empty.tsx +104 -0
- package/web/.next/standalone/web/components/ui/field.tsx +244 -0
- package/web/.next/standalone/web/components/ui/form.tsx +167 -0
- package/web/.next/standalone/web/components/ui/hover-card.tsx +44 -0
- package/web/.next/standalone/web/components/ui/input-group.tsx +169 -0
- package/web/.next/standalone/web/components/ui/input-otp.tsx +77 -0
- package/web/.next/standalone/web/components/ui/input.tsx +21 -0
- package/web/.next/standalone/web/components/ui/item.tsx +193 -0
- package/web/.next/standalone/web/components/ui/kbd.tsx +28 -0
- package/web/.next/standalone/web/components/ui/label.tsx +24 -0
- package/web/.next/standalone/web/components/ui/menubar.tsx +276 -0
- package/web/.next/standalone/web/components/ui/navigation-menu.tsx +166 -0
- package/web/.next/standalone/web/components/ui/pagination.tsx +127 -0
- package/web/.next/standalone/web/components/ui/popover.tsx +48 -0
- package/web/.next/standalone/web/components/ui/progress.tsx +31 -0
- package/web/.next/standalone/web/components/ui/radio-group.tsx +45 -0
- package/web/.next/standalone/web/components/ui/resizable.tsx +56 -0
- package/web/.next/standalone/web/components/ui/scroll-area.tsx +58 -0
- package/web/.next/standalone/web/components/ui/select.tsx +185 -0
- package/web/.next/standalone/web/components/ui/separator.tsx +28 -0
- package/web/.next/standalone/web/components/ui/sheet.tsx +139 -0
- package/web/.next/standalone/web/components/ui/sidebar.tsx +726 -0
- package/web/.next/standalone/web/components/ui/skeleton.tsx +13 -0
- package/web/.next/standalone/web/components/ui/slider.tsx +63 -0
- package/web/.next/standalone/web/components/ui/sonner.tsx +25 -0
- package/web/.next/standalone/web/components/ui/spinner.tsx +16 -0
- package/web/.next/standalone/web/components/ui/switch.tsx +31 -0
- package/web/.next/standalone/web/components/ui/table.tsx +116 -0
- package/web/.next/standalone/web/components/ui/tabs.tsx +66 -0
- package/web/.next/standalone/web/components/ui/textarea.tsx +18 -0
- package/web/.next/standalone/web/components/ui/toast.tsx +129 -0
- package/web/.next/standalone/web/components/ui/toaster.tsx +35 -0
- package/web/.next/standalone/web/components/ui/toggle-group.tsx +73 -0
- package/web/.next/standalone/web/components/ui/toggle.tsx +47 -0
- package/web/.next/standalone/web/components/ui/tooltip.tsx +61 -0
- package/web/.next/standalone/web/components/ui/use-mobile.tsx +19 -0
- package/web/.next/standalone/web/components/ui/use-toast.ts +191 -0
- package/web/.next/standalone/web/components.json +21 -0
- package/web/.next/standalone/web/hooks/use-mobile.ts +19 -0
- package/web/.next/standalone/web/hooks/use-toast.ts +191 -0
- package/web/.next/standalone/web/lib/hooks/index.ts +8 -0
- package/web/.next/standalone/web/lib/hooks/use-components.ts +83 -0
- package/web/.next/standalone/web/lib/hooks/use-connections.ts +83 -0
- package/web/.next/standalone/web/lib/hooks/use-projects.ts +116 -0
- package/web/.next/standalone/web/lib/hooks/use-prompts.ts +122 -0
- package/web/.next/standalone/web/lib/hooks/use-settings.ts +135 -0
- package/web/.next/standalone/web/lib/hooks/use-status.ts +80 -0
- package/web/.next/standalone/web/lib/project-context.tsx +46 -0
- package/web/.next/standalone/web/lib/transform.ts +625 -0
- package/web/.next/standalone/web/lib/types.ts +198 -0
- package/web/.next/standalone/web/lib/utils.ts +6 -0
- package/web/.next/standalone/web/next.config.mjs +12 -0
- package/web/.next/standalone/web/package-lock.json +3987 -0
- package/web/.next/standalone/web/package.json +73 -0
- package/web/.next/standalone/web/pnpm-lock.yaml +5 -0
- package/web/.next/standalone/web/postcss.config.mjs +8 -0
- package/web/.next/standalone/web/public/apple-icon.png +0 -0
- package/web/.next/standalone/web/public/icon-dark-32x32.png +0 -0
- package/web/.next/standalone/web/public/icon-light-32x32.png +0 -0
- package/web/.next/standalone/web/public/icon.svg +26 -0
- package/web/.next/standalone/web/public/navgator-logo.png +0 -0
- package/web/.next/standalone/web/public/placeholder-logo.png +0 -0
- package/web/.next/standalone/web/public/placeholder-logo.svg +1 -0
- package/web/.next/standalone/web/public/placeholder-user.jpg +0 -0
- package/web/.next/standalone/web/public/placeholder.jpg +0 -0
- package/web/.next/standalone/web/public/placeholder.svg +1 -0
- package/web/.next/standalone/web/public/public/apple-icon.png +0 -0
- package/web/.next/standalone/web/public/public/icon-dark-32x32.png +0 -0
- package/web/.next/standalone/web/public/public/icon-light-32x32.png +0 -0
- package/web/.next/standalone/web/public/public/icon.svg +26 -0
- package/web/.next/standalone/web/public/public/navgator-logo.png +0 -0
- package/web/.next/standalone/web/public/public/placeholder-logo.png +0 -0
- package/web/.next/standalone/web/public/public/placeholder-logo.svg +1 -0
- package/web/.next/standalone/web/public/public/placeholder-user.jpg +0 -0
- package/web/.next/standalone/web/public/public/placeholder.jpg +0 -0
- package/web/.next/standalone/web/public/public/placeholder.svg +1 -0
- package/web/.next/standalone/web/server.js +38 -0
- package/web/.next/standalone/web/styles/globals.css +125 -0
- package/web/.next/standalone/web/tsconfig.json +41 -0
- package/web/.next/static/P-ZMQO7_Wnj487ks3guqa/_buildManifest.js +11 -0
- package/web/.next/static/P-ZMQO7_Wnj487ks3guqa/_clientMiddlewareManifest.json +1 -0
- package/web/.next/static/P-ZMQO7_Wnj487ks3guqa/_ssgManifest.js +1 -0
- package/web/.next/static/chunks/062ae79751df2759.js +1 -0
- package/web/.next/static/chunks/159889e17b2cf1f8.js +2 -0
- package/web/.next/static/chunks/458d6f37339fc069.js +1 -0
- package/web/.next/static/chunks/6d3d39425a878d7f.js +1 -0
- package/web/.next/static/chunks/8a80e7184ad3a13f.css +2 -0
- package/web/.next/static/chunks/a6dad97d9634a72d.js +1 -0
- package/web/.next/static/chunks/c056475f5f4424b6.css +1 -0
- package/web/.next/static/chunks/c57fee8cce8d7cb9.js +1 -0
- package/web/.next/static/chunks/cb3513192b63e480.js +12 -0
- package/web/.next/static/chunks/dd22b5f2beb2cc31.js +1 -0
- package/web/.next/static/chunks/e0affeef0ddb9a97.js +4 -0
- package/web/.next/static/chunks/f74a6859e1c4d5e3.js +1 -0
- package/web/.next/static/chunks/turbopack-c0c89f9e6f0a38c4.js +3 -0
- package/web/.next/static/media/4fa387ec64143e14-s.c1fdd6c2.woff2 +0 -0
- package/web/.next/static/media/7178b3e590c64307-s.b97b3418.woff2 +0 -0
- package/web/.next/static/media/797e433ab948586e-s.p.dbea232f.woff2 +0 -0
- package/web/.next/static/media/8a480f0b521d4e75-s.8e0177b5.woff2 +0 -0
- package/web/.next/static/media/bbc41e54d2fcbd21-s.799d8ef8.woff2 +0 -0
- package/web/.next/static/media/caa3a2e1cccd8315-s.p.853070df.woff2 +0 -0
- package/commands/nav-check.md +0 -64
- package/commands/nav-connections.md +0 -58
- package/commands/nav-diagram.md +0 -106
- package/commands/nav-export.md +0 -71
- package/commands/nav-impact.md +0 -58
- package/commands/nav-scan.md +0 -46
- package/commands/nav-status.md +0 -44
- package/skills/architecture-awareness/SKILL.md +0 -141
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Hook for fetching and managing the project registry
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { useState, useEffect, useCallback } from "react";
|
|
6
|
+
|
|
7
|
+
export interface RegisteredProject {
|
|
8
|
+
path: string;
|
|
9
|
+
name: string;
|
|
10
|
+
addedAt: number;
|
|
11
|
+
lastScan: number | null;
|
|
12
|
+
hasArchitecture: boolean;
|
|
13
|
+
componentCount: number;
|
|
14
|
+
connectionCount: number;
|
|
15
|
+
lastScanFormatted: string | null;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
interface UseProjectsResult {
|
|
19
|
+
projects: RegisteredProject[];
|
|
20
|
+
activeProject: string | null;
|
|
21
|
+
isLoading: boolean;
|
|
22
|
+
error: string | null;
|
|
23
|
+
setActiveProject: (path: string) => void;
|
|
24
|
+
addProject: (path: string) => Promise<void>;
|
|
25
|
+
removeProject: (path: string) => Promise<void>;
|
|
26
|
+
refresh: () => Promise<void>;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
const ACTIVE_PROJECT_KEY = "navgator-active-project";
|
|
30
|
+
|
|
31
|
+
export function useProjects(): UseProjectsResult {
|
|
32
|
+
const [projects, setProjects] = useState<RegisteredProject[]>([]);
|
|
33
|
+
const [activeProject, setActiveProjectState] = useState<string | null>(null);
|
|
34
|
+
const [isLoading, setIsLoading] = useState(false);
|
|
35
|
+
const [error, setError] = useState<string | null>(null);
|
|
36
|
+
|
|
37
|
+
const fetchProjects = useCallback(async () => {
|
|
38
|
+
setIsLoading(true);
|
|
39
|
+
setError(null);
|
|
40
|
+
try {
|
|
41
|
+
const response = await fetch("/api/projects");
|
|
42
|
+
const result = await response.json();
|
|
43
|
+
if (result.success) {
|
|
44
|
+
setProjects(result.data.projects);
|
|
45
|
+
} else {
|
|
46
|
+
setError(result.error || "Failed to fetch projects");
|
|
47
|
+
}
|
|
48
|
+
} catch (err) {
|
|
49
|
+
setError(err instanceof Error ? err.message : "Network error");
|
|
50
|
+
} finally {
|
|
51
|
+
setIsLoading(false);
|
|
52
|
+
}
|
|
53
|
+
}, []);
|
|
54
|
+
|
|
55
|
+
const setActiveProject = useCallback((path: string) => {
|
|
56
|
+
setActiveProjectState(path);
|
|
57
|
+
localStorage.setItem(ACTIVE_PROJECT_KEY, path);
|
|
58
|
+
// Dispatch custom event so other hooks/components react
|
|
59
|
+
window.dispatchEvent(new CustomEvent("navgator-project-changed", { detail: { path } }));
|
|
60
|
+
}, []);
|
|
61
|
+
|
|
62
|
+
const addProject = useCallback(async (path: string) => {
|
|
63
|
+
try {
|
|
64
|
+
await fetch("/api/projects", {
|
|
65
|
+
method: "POST",
|
|
66
|
+
headers: { "Content-Type": "application/json" },
|
|
67
|
+
body: JSON.stringify({ action: "add", path }),
|
|
68
|
+
});
|
|
69
|
+
await fetchProjects();
|
|
70
|
+
} catch (err) {
|
|
71
|
+
setError(err instanceof Error ? err.message : "Failed to add project");
|
|
72
|
+
}
|
|
73
|
+
}, [fetchProjects]);
|
|
74
|
+
|
|
75
|
+
const removeProject = useCallback(async (path: string) => {
|
|
76
|
+
try {
|
|
77
|
+
await fetch("/api/projects", {
|
|
78
|
+
method: "POST",
|
|
79
|
+
headers: { "Content-Type": "application/json" },
|
|
80
|
+
body: JSON.stringify({ action: "remove", path }),
|
|
81
|
+
});
|
|
82
|
+
// If we removed the active project, clear it
|
|
83
|
+
if (path === activeProject) {
|
|
84
|
+
setActiveProjectState(null);
|
|
85
|
+
localStorage.removeItem(ACTIVE_PROJECT_KEY);
|
|
86
|
+
}
|
|
87
|
+
await fetchProjects();
|
|
88
|
+
} catch (err) {
|
|
89
|
+
setError(err instanceof Error ? err.message : "Failed to remove project");
|
|
90
|
+
}
|
|
91
|
+
}, [fetchProjects, activeProject]);
|
|
92
|
+
|
|
93
|
+
// Load active project from localStorage on mount
|
|
94
|
+
useEffect(() => {
|
|
95
|
+
const stored = localStorage.getItem(ACTIVE_PROJECT_KEY);
|
|
96
|
+
if (stored) {
|
|
97
|
+
setActiveProjectState(stored);
|
|
98
|
+
}
|
|
99
|
+
}, []);
|
|
100
|
+
|
|
101
|
+
// Fetch projects on mount
|
|
102
|
+
useEffect(() => {
|
|
103
|
+
fetchProjects();
|
|
104
|
+
}, [fetchProjects]);
|
|
105
|
+
|
|
106
|
+
return {
|
|
107
|
+
projects,
|
|
108
|
+
activeProject,
|
|
109
|
+
isLoading,
|
|
110
|
+
error,
|
|
111
|
+
setActiveProject,
|
|
112
|
+
addProject,
|
|
113
|
+
removeProject,
|
|
114
|
+
refresh: fetchProjects,
|
|
115
|
+
};
|
|
116
|
+
}
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Hook for fetching and managing prompt/LLM call data
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { useState, useEffect, useCallback } from "react";
|
|
6
|
+
import type { LLMCall, Prompt, LLMTrackingSummary, PromptsApiResponse } from "../types";
|
|
7
|
+
import { useActiveProject } from "../project-context";
|
|
8
|
+
|
|
9
|
+
interface UsePromptsResult {
|
|
10
|
+
calls: LLMCall[];
|
|
11
|
+
prompts: Prompt[];
|
|
12
|
+
summary: LLMTrackingSummary | null;
|
|
13
|
+
isLoading: boolean;
|
|
14
|
+
error: string | null;
|
|
15
|
+
source: "scan" | "cache" | "mock" | null;
|
|
16
|
+
refresh: () => Promise<void>;
|
|
17
|
+
scan: (projectPath?: string) => Promise<void>;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
interface UsePromptsOptions {
|
|
21
|
+
/** Start in demo mode (use mock data) */
|
|
22
|
+
demoMode?: boolean;
|
|
23
|
+
/** Auto-fetch on mount */
|
|
24
|
+
autoFetch?: boolean;
|
|
25
|
+
/** Project path for scans */
|
|
26
|
+
projectPath?: string;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export function usePrompts(options: UsePromptsOptions = {}): UsePromptsResult {
|
|
30
|
+
const { demoMode = false, autoFetch = true, projectPath: explicitPath } = options;
|
|
31
|
+
const { activeProjectPath } = useActiveProject();
|
|
32
|
+
const projectPath = explicitPath || activeProjectPath || undefined;
|
|
33
|
+
|
|
34
|
+
const [calls, setCalls] = useState<LLMCall[]>([]);
|
|
35
|
+
const [prompts, setPrompts] = useState<Prompt[]>([]);
|
|
36
|
+
const [summary, setSummary] = useState<LLMTrackingSummary | null>(null);
|
|
37
|
+
const [isLoading, setIsLoading] = useState(false);
|
|
38
|
+
const [error, setError] = useState<string | null>(null);
|
|
39
|
+
const [source, setSource] = useState<"scan" | "cache" | "mock" | null>(null);
|
|
40
|
+
|
|
41
|
+
const fetchData = useCallback(
|
|
42
|
+
async (forceRefresh = false) => {
|
|
43
|
+
setIsLoading(true);
|
|
44
|
+
setError(null);
|
|
45
|
+
|
|
46
|
+
try {
|
|
47
|
+
const params = new URLSearchParams();
|
|
48
|
+
if (demoMode) params.set("demo", "true");
|
|
49
|
+
if (forceRefresh) params.set("refresh", "true");
|
|
50
|
+
if (projectPath) params.set("path", projectPath);
|
|
51
|
+
|
|
52
|
+
const response = await fetch(`/api/prompts?${params.toString()}`);
|
|
53
|
+
const result: PromptsApiResponse = await response.json();
|
|
54
|
+
|
|
55
|
+
if (result.success && result.data) {
|
|
56
|
+
setCalls(result.data.calls);
|
|
57
|
+
setPrompts(result.data.prompts);
|
|
58
|
+
setSummary(result.data.summary);
|
|
59
|
+
setSource(result.source);
|
|
60
|
+
} else {
|
|
61
|
+
setError(result.error || "Failed to fetch data");
|
|
62
|
+
}
|
|
63
|
+
} catch (err) {
|
|
64
|
+
setError(err instanceof Error ? err.message : "Network error");
|
|
65
|
+
} finally {
|
|
66
|
+
setIsLoading(false);
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
[demoMode, projectPath]
|
|
70
|
+
);
|
|
71
|
+
|
|
72
|
+
const refresh = useCallback(async () => {
|
|
73
|
+
await fetchData(true);
|
|
74
|
+
}, [fetchData]);
|
|
75
|
+
|
|
76
|
+
const scan = useCallback(
|
|
77
|
+
async (path?: string) => {
|
|
78
|
+
setIsLoading(true);
|
|
79
|
+
setError(null);
|
|
80
|
+
|
|
81
|
+
try {
|
|
82
|
+
const response = await fetch("/api/prompts", {
|
|
83
|
+
method: "POST",
|
|
84
|
+
headers: { "Content-Type": "application/json" },
|
|
85
|
+
body: JSON.stringify({ path: path || projectPath }),
|
|
86
|
+
});
|
|
87
|
+
const result: PromptsApiResponse = await response.json();
|
|
88
|
+
|
|
89
|
+
if (result.success && result.data) {
|
|
90
|
+
setCalls(result.data.calls);
|
|
91
|
+
setPrompts(result.data.prompts);
|
|
92
|
+
setSummary(result.data.summary);
|
|
93
|
+
setSource(result.source);
|
|
94
|
+
} else {
|
|
95
|
+
setError(result.error || "Scan failed");
|
|
96
|
+
}
|
|
97
|
+
} catch (err) {
|
|
98
|
+
setError(err instanceof Error ? err.message : "Network error");
|
|
99
|
+
} finally {
|
|
100
|
+
setIsLoading(false);
|
|
101
|
+
}
|
|
102
|
+
},
|
|
103
|
+
[projectPath]
|
|
104
|
+
);
|
|
105
|
+
|
|
106
|
+
useEffect(() => {
|
|
107
|
+
if (autoFetch) {
|
|
108
|
+
fetchData();
|
|
109
|
+
}
|
|
110
|
+
}, [autoFetch, fetchData]);
|
|
111
|
+
|
|
112
|
+
return {
|
|
113
|
+
calls,
|
|
114
|
+
prompts,
|
|
115
|
+
summary,
|
|
116
|
+
isLoading,
|
|
117
|
+
error,
|
|
118
|
+
source,
|
|
119
|
+
refresh,
|
|
120
|
+
scan,
|
|
121
|
+
};
|
|
122
|
+
}
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Hook for fetching and saving NavGator settings
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { useState, useEffect, useCallback } from "react";
|
|
6
|
+
|
|
7
|
+
export interface ScanConfig {
|
|
8
|
+
rootPath: string;
|
|
9
|
+
excludePaths: string[];
|
|
10
|
+
includePatterns: string[];
|
|
11
|
+
scanDepth: number;
|
|
12
|
+
watchMode: boolean;
|
|
13
|
+
autoScanOnChange: boolean;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export interface DetectionConfig {
|
|
17
|
+
npm: boolean;
|
|
18
|
+
database: boolean;
|
|
19
|
+
service: boolean;
|
|
20
|
+
queue: boolean;
|
|
21
|
+
cache: boolean;
|
|
22
|
+
storage: boolean;
|
|
23
|
+
auth: boolean;
|
|
24
|
+
llm: boolean;
|
|
25
|
+
staticAnalysis: boolean;
|
|
26
|
+
environmentVariables: boolean;
|
|
27
|
+
configFiles: boolean;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export interface NotificationConfig {
|
|
31
|
+
enabled: boolean;
|
|
32
|
+
onNewConnection: boolean;
|
|
33
|
+
onBreakingChange: boolean;
|
|
34
|
+
onSecurityIssue: boolean;
|
|
35
|
+
slackWebhook: string;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export interface DisplayConfig {
|
|
39
|
+
theme: "dark" | "light" | "system";
|
|
40
|
+
compactMode: boolean;
|
|
41
|
+
showLineNumbers: boolean;
|
|
42
|
+
diagramDirection: "TB" | "LR";
|
|
43
|
+
maxVisibleConnections: number;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export interface AllSettings {
|
|
47
|
+
scan: ScanConfig;
|
|
48
|
+
detection: DetectionConfig;
|
|
49
|
+
notifications: NotificationConfig;
|
|
50
|
+
display: DisplayConfig;
|
|
51
|
+
lastSaved?: number;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
interface UseSettingsResult {
|
|
55
|
+
settings: AllSettings | null;
|
|
56
|
+
isLoading: boolean;
|
|
57
|
+
isSaving: boolean;
|
|
58
|
+
error: string | null;
|
|
59
|
+
source: "local" | "cache" | "default" | null;
|
|
60
|
+
save: (data: Partial<AllSettings>) => Promise<boolean>;
|
|
61
|
+
refresh: () => Promise<void>;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export function useSettings(options: { autoFetch?: boolean } = {}): UseSettingsResult {
|
|
65
|
+
const { autoFetch = true } = options;
|
|
66
|
+
|
|
67
|
+
const [settings, setSettings] = useState<AllSettings | null>(null);
|
|
68
|
+
const [isLoading, setIsLoading] = useState(false);
|
|
69
|
+
const [isSaving, setIsSaving] = useState(false);
|
|
70
|
+
const [error, setError] = useState<string | null>(null);
|
|
71
|
+
const [source, setSource] = useState<"local" | "cache" | "default" | null>(null);
|
|
72
|
+
|
|
73
|
+
const fetchData = useCallback(async (forceRefresh = false) => {
|
|
74
|
+
setIsLoading(true);
|
|
75
|
+
setError(null);
|
|
76
|
+
|
|
77
|
+
try {
|
|
78
|
+
const params = new URLSearchParams();
|
|
79
|
+
if (forceRefresh) params.set("refresh", "true");
|
|
80
|
+
|
|
81
|
+
const response = await fetch(`/api/settings?${params.toString()}`);
|
|
82
|
+
const result = await response.json();
|
|
83
|
+
|
|
84
|
+
if (result.success && result.data) {
|
|
85
|
+
setSettings(result.data);
|
|
86
|
+
setSource(result.source);
|
|
87
|
+
} else {
|
|
88
|
+
setError(result.error || "Failed to fetch settings");
|
|
89
|
+
}
|
|
90
|
+
} catch (err) {
|
|
91
|
+
setError(err instanceof Error ? err.message : "Network error");
|
|
92
|
+
} finally {
|
|
93
|
+
setIsLoading(false);
|
|
94
|
+
}
|
|
95
|
+
}, []);
|
|
96
|
+
|
|
97
|
+
const save = useCallback(async (data: Partial<AllSettings>): Promise<boolean> => {
|
|
98
|
+
setIsSaving(true);
|
|
99
|
+
setError(null);
|
|
100
|
+
|
|
101
|
+
try {
|
|
102
|
+
const response = await fetch("/api/settings", {
|
|
103
|
+
method: "POST",
|
|
104
|
+
headers: { "Content-Type": "application/json" },
|
|
105
|
+
body: JSON.stringify(data),
|
|
106
|
+
});
|
|
107
|
+
const result = await response.json();
|
|
108
|
+
|
|
109
|
+
if (result.success && result.data) {
|
|
110
|
+
setSettings(result.data);
|
|
111
|
+
return true;
|
|
112
|
+
} else {
|
|
113
|
+
setError(result.error || "Failed to save settings");
|
|
114
|
+
return false;
|
|
115
|
+
}
|
|
116
|
+
} catch (err) {
|
|
117
|
+
setError(err instanceof Error ? err.message : "Network error");
|
|
118
|
+
return false;
|
|
119
|
+
} finally {
|
|
120
|
+
setIsSaving(false);
|
|
121
|
+
}
|
|
122
|
+
}, []);
|
|
123
|
+
|
|
124
|
+
const refresh = useCallback(async () => {
|
|
125
|
+
await fetchData(true);
|
|
126
|
+
}, [fetchData]);
|
|
127
|
+
|
|
128
|
+
useEffect(() => {
|
|
129
|
+
if (autoFetch) {
|
|
130
|
+
fetchData();
|
|
131
|
+
}
|
|
132
|
+
}, [autoFetch, fetchData]);
|
|
133
|
+
|
|
134
|
+
return { settings, isLoading, isSaving, error, source, save, refresh };
|
|
135
|
+
}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Hook for fetching and managing project status data
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { useState, useEffect, useCallback } from "react";
|
|
6
|
+
import type { ProjectStatus, StatusApiResponse } from "../types";
|
|
7
|
+
import { useActiveProject } from "../project-context";
|
|
8
|
+
|
|
9
|
+
interface UseStatusResult {
|
|
10
|
+
status: ProjectStatus | null;
|
|
11
|
+
isLoading: boolean;
|
|
12
|
+
error: string | null;
|
|
13
|
+
source: "scan" | "cache" | "mock" | null;
|
|
14
|
+
refresh: () => Promise<void>;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
interface UseStatusOptions {
|
|
18
|
+
autoFetch?: boolean;
|
|
19
|
+
projectPath?: string;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export function useStatus(options: UseStatusOptions = {}): UseStatusResult {
|
|
23
|
+
const { autoFetch = true, projectPath: explicitPath } = options;
|
|
24
|
+
const { activeProjectPath } = useActiveProject();
|
|
25
|
+
const projectPath = explicitPath || activeProjectPath || undefined;
|
|
26
|
+
|
|
27
|
+
const [status, setStatus] = useState<ProjectStatus | null>(null);
|
|
28
|
+
const [isLoading, setIsLoading] = useState(false);
|
|
29
|
+
const [error, setError] = useState<string | null>(null);
|
|
30
|
+
const [source, setSource] = useState<"scan" | "cache" | "mock" | null>(null);
|
|
31
|
+
|
|
32
|
+
const fetchData = useCallback(
|
|
33
|
+
async (forceRefresh = false) => {
|
|
34
|
+
setIsLoading(true);
|
|
35
|
+
setError(null);
|
|
36
|
+
|
|
37
|
+
try {
|
|
38
|
+
const params = new URLSearchParams();
|
|
39
|
+
if (forceRefresh) params.set("refresh", "true");
|
|
40
|
+
if (projectPath) params.set("path", projectPath);
|
|
41
|
+
|
|
42
|
+
const response = await fetch(`/api/status?${params.toString()}`);
|
|
43
|
+
const result: StatusApiResponse = await response.json();
|
|
44
|
+
|
|
45
|
+
if (result.success && result.data) {
|
|
46
|
+
setStatus(result.data);
|
|
47
|
+
setSource(result.source);
|
|
48
|
+
if (result.error) {
|
|
49
|
+
setError(result.error);
|
|
50
|
+
}
|
|
51
|
+
} else {
|
|
52
|
+
setError(result.error || "Failed to fetch status");
|
|
53
|
+
}
|
|
54
|
+
} catch (err) {
|
|
55
|
+
setError(err instanceof Error ? err.message : "Network error");
|
|
56
|
+
} finally {
|
|
57
|
+
setIsLoading(false);
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
[projectPath]
|
|
61
|
+
);
|
|
62
|
+
|
|
63
|
+
const refresh = useCallback(async () => {
|
|
64
|
+
await fetchData(true);
|
|
65
|
+
}, [fetchData]);
|
|
66
|
+
|
|
67
|
+
useEffect(() => {
|
|
68
|
+
if (autoFetch) {
|
|
69
|
+
fetchData();
|
|
70
|
+
}
|
|
71
|
+
}, [autoFetch, fetchData]);
|
|
72
|
+
|
|
73
|
+
return {
|
|
74
|
+
status,
|
|
75
|
+
isLoading,
|
|
76
|
+
error,
|
|
77
|
+
source,
|
|
78
|
+
refresh,
|
|
79
|
+
};
|
|
80
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
|
|
3
|
+
import { createContext, useContext, useState, useEffect, type ReactNode } from "react"
|
|
4
|
+
|
|
5
|
+
interface ProjectContextValue {
|
|
6
|
+
activeProjectPath: string | null
|
|
7
|
+
setActiveProjectPath: (path: string | null) => void
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
const ProjectContext = createContext<ProjectContextValue>({
|
|
11
|
+
activeProjectPath: null,
|
|
12
|
+
setActiveProjectPath: () => {},
|
|
13
|
+
})
|
|
14
|
+
|
|
15
|
+
const ACTIVE_PROJECT_KEY = "navgator-active-project"
|
|
16
|
+
|
|
17
|
+
export function ProjectProvider({ children }: { children: ReactNode }) {
|
|
18
|
+
const [activeProjectPath, setActiveProjectPathState] = useState<string | null>(null)
|
|
19
|
+
|
|
20
|
+
// Load from localStorage on mount
|
|
21
|
+
useEffect(() => {
|
|
22
|
+
const stored = localStorage.getItem(ACTIVE_PROJECT_KEY)
|
|
23
|
+
if (stored) {
|
|
24
|
+
setActiveProjectPathState(stored)
|
|
25
|
+
}
|
|
26
|
+
}, [])
|
|
27
|
+
|
|
28
|
+
const setActiveProjectPath = (path: string | null) => {
|
|
29
|
+
setActiveProjectPathState(path)
|
|
30
|
+
if (path) {
|
|
31
|
+
localStorage.setItem(ACTIVE_PROJECT_KEY, path)
|
|
32
|
+
} else {
|
|
33
|
+
localStorage.removeItem(ACTIVE_PROJECT_KEY)
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
return (
|
|
38
|
+
<ProjectContext.Provider value={{ activeProjectPath, setActiveProjectPath }}>
|
|
39
|
+
{children}
|
|
40
|
+
</ProjectContext.Provider>
|
|
41
|
+
)
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export function useActiveProject() {
|
|
45
|
+
return useContext(ProjectContext)
|
|
46
|
+
}
|