@seqyuan/annodex 0.1.12 → 0.1.13
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 +39 -0
- package/.next/build-manifest.json +20 -0
- package/.next/diagnostics/build-diagnostics.json +6 -0
- package/.next/diagnostics/framework.json +1 -0
- package/.next/export-marker.json +6 -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 +109 -0
- package/.next/react-loadable-manifest.json +2320 -0
- package/.next/required-server-files.js +343 -0
- package/.next/required-server-files.json +343 -0
- package/.next/routes-manifest.json +286 -0
- package/.next/server/app/_global-error/page.js +32 -0
- package/.next/server/app/_global-error/page.js.nft.json +1 -0
- package/.next/server/app/_global-error/page_client-reference-manifest.js +1 -0
- package/.next/server/app/_global-error.html +1 -0
- package/.next/server/app/_global-error.meta +16 -0
- package/.next/server/app/_global-error.rsc +14 -0
- package/.next/server/app/_global-error.segments/_full.segment.rsc +14 -0
- package/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +5 -0
- package/.next/server/app/_global-error.segments/_global-error.segment.rsc +5 -0
- package/.next/server/app/_global-error.segments/_head.segment.rsc +5 -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.js +2 -0
- package/.next/server/app/_not-found/page.js.nft.json +1 -0
- package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -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 +18 -0
- package/.next/server/app/_not-found.segments/_full.segment.rsc +18 -0
- package/.next/server/app/_not-found.segments/_head.segment.rsc +6 -0
- package/.next/server/app/_not-found.segments/_index.segment.rsc +5 -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 +4 -0
- package/.next/server/app/api/agent/[id]/events/route.js +3 -0
- package/.next/server/app/api/agent/[id]/events/route.js.nft.json +1 -0
- package/.next/server/app/api/agent/[id]/events/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/agent/[id]/route.js +1 -0
- package/.next/server/app/api/agent/[id]/route.js.nft.json +1 -0
- package/.next/server/app/api/agent/[id]/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/agent/new/route.js +1 -0
- package/.next/server/app/api/agent/new/route.js.nft.json +1 -0
- package/.next/server/app/api/agent/new/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/auth/all-providers/route.js +1 -0
- package/.next/server/app/api/auth/all-providers/route.js.nft.json +1 -0
- package/.next/server/app/api/auth/all-providers/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/auth/api-key/[provider]/route.js +1 -0
- package/.next/server/app/api/auth/api-key/[provider]/route.js.nft.json +1 -0
- package/.next/server/app/api/auth/api-key/[provider]/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/auth/login/[provider]/route.js +1 -0
- package/.next/server/app/api/auth/login/[provider]/route.js.nft.json +1 -0
- package/.next/server/app/api/auth/login/[provider]/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/auth/login/route.js +1 -0
- package/.next/server/app/api/auth/login/route.js.nft.json +1 -0
- package/.next/server/app/api/auth/login/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/auth/logout/[provider]/route.js +1 -0
- package/.next/server/app/api/auth/logout/[provider]/route.js.nft.json +1 -0
- package/.next/server/app/api/auth/logout/[provider]/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/auth/providers/route.js +1 -0
- package/.next/server/app/api/auth/providers/route.js.nft.json +1 -0
- package/.next/server/app/api/auth/providers/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/auth/status/route.js +1 -0
- package/.next/server/app/api/auth/status/route.js.nft.json +1 -0
- package/.next/server/app/api/auth/status/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/default-cwd/route.js +1 -0
- package/.next/server/app/api/default-cwd/route.js.nft.json +1 -0
- package/.next/server/app/api/default-cwd/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/files/[...path]/route.js +4 -0
- package/.next/server/app/api/files/[...path]/route.js.nft.json +1 -0
- package/.next/server/app/api/files/[...path]/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/harness/route.js +1 -0
- package/.next/server/app/api/harness/route.js.nft.json +1 -0
- package/.next/server/app/api/harness/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/home/route.js +1 -0
- package/.next/server/app/api/home/route.js.nft.json +1 -0
- package/.next/server/app/api/home/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/internal/runtime/route.js +1 -0
- package/.next/server/app/api/internal/runtime/route.js.nft.json +1 -0
- package/.next/server/app/api/internal/runtime/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/models/route.js +1 -0
- package/.next/server/app/api/models/route.js.nft.json +1 -0
- package/.next/server/app/api/models/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/models-config/discover/route.js +1 -0
- package/.next/server/app/api/models-config/discover/route.js.nft.json +1 -0
- package/.next/server/app/api/models-config/discover/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/models-config/route.js +1 -0
- package/.next/server/app/api/models-config/route.js.nft.json +1 -0
- package/.next/server/app/api/models-config/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/models-config/test/route.js +1 -0
- package/.next/server/app/api/models-config/test/route.js.nft.json +1 -0
- package/.next/server/app/api/models-config/test/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/projects/browse/route.js +1 -0
- package/.next/server/app/api/projects/browse/route.js.nft.json +1 -0
- package/.next/server/app/api/projects/browse/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/projects/route.js +1 -0
- package/.next/server/app/api/projects/route.js.nft.json +1 -0
- package/.next/server/app/api/projects/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/reports/[id]/route.js +10 -0
- package/.next/server/app/api/reports/[id]/route.js.nft.json +1 -0
- package/.next/server/app/api/reports/[id]/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/search/route.js +1 -0
- package/.next/server/app/api/search/route.js.nft.json +1 -0
- package/.next/server/app/api/search/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/sessions/[id]/context/route.js +1 -0
- package/.next/server/app/api/sessions/[id]/context/route.js.nft.json +1 -0
- package/.next/server/app/api/sessions/[id]/context/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/sessions/[id]/route.js +1 -0
- package/.next/server/app/api/sessions/[id]/route.js.nft.json +1 -0
- package/.next/server/app/api/sessions/[id]/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/sessions/new/route.js +1 -0
- package/.next/server/app/api/sessions/new/route.js.nft.json +1 -0
- package/.next/server/app/api/sessions/new/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/sessions/route.js +1 -0
- package/.next/server/app/api/sessions/route.js.nft.json +1 -0
- package/.next/server/app/api/sessions/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/settings/route.js +1 -0
- package/.next/server/app/api/settings/route.js.nft.json +1 -0
- package/.next/server/app/api/settings/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/skills/install/route.js +5 -0
- package/.next/server/app/api/skills/install/route.js.nft.json +1 -0
- package/.next/server/app/api/skills/install/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/skills/route.js +6 -0
- package/.next/server/app/api/skills/route.js.nft.json +1 -0
- package/.next/server/app/api/skills/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/skills/search/route.js +1 -0
- package/.next/server/app/api/skills/search/route.js.nft.json +1 -0
- package/.next/server/app/api/skills/search/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/soul/route.js +1 -0
- package/.next/server/app/api/soul/route.js.nft.json +1 -0
- package/.next/server/app/api/soul/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/version/route.js +1 -0
- package/.next/server/app/api/version/route.js.nft.json +1 -0
- package/.next/server/app/api/version/route_client-reference-manifest.js +1 -0
- package/.next/server/app/index.html +1 -0
- package/.next/server/app/index.meta +14 -0
- package/.next/server/app/index.rsc +17 -0
- package/.next/server/app/index.segments/__PAGE__.segment.rsc +6 -0
- package/.next/server/app/index.segments/_full.segment.rsc +17 -0
- package/.next/server/app/index.segments/_head.segment.rsc +6 -0
- package/.next/server/app/index.segments/_index.segment.rsc +5 -0
- package/.next/server/app/index.segments/_tree.segment.rsc +4 -0
- package/.next/server/app/login/page.js +2 -0
- package/.next/server/app/login/page.js.nft.json +1 -0
- package/.next/server/app/login/page_client-reference-manifest.js +1 -0
- package/.next/server/app/login.html +1 -0
- package/.next/server/app/login.meta +15 -0
- package/.next/server/app/login.rsc +22 -0
- package/.next/server/app/login.segments/_full.segment.rsc +22 -0
- package/.next/server/app/login.segments/_head.segment.rsc +6 -0
- package/.next/server/app/login.segments/_index.segment.rsc +5 -0
- package/.next/server/app/login.segments/_tree.segment.rsc +4 -0
- package/.next/server/app/login.segments/login/__PAGE__.segment.rsc +9 -0
- package/.next/server/app/login.segments/login.segment.rsc +5 -0
- package/.next/server/app/page.js +261 -0
- package/.next/server/app/page.js.nft.json +1 -0
- package/.next/server/app/page_client-reference-manifest.js +1 -0
- package/.next/server/app-paths-manifest.json +39 -0
- package/.next/server/chunks/1048.js +1 -0
- package/.next/server/chunks/1367.js +77 -0
- package/.next/server/chunks/1381.js +1 -0
- package/.next/server/chunks/165.js +1 -0
- package/.next/server/chunks/1681.js +215 -0
- package/.next/server/chunks/1688.js +45 -0
- package/.next/server/chunks/1703.js +79 -0
- package/.next/server/chunks/1712.js +43 -0
- package/.next/server/chunks/1813.js +1 -0
- package/.next/server/chunks/2325.js +80 -0
- package/.next/server/chunks/258.js +1 -0
- package/.next/server/chunks/2671.js +287 -0
- package/.next/server/chunks/2778.js +1 -0
- package/.next/server/chunks/2943.js +1 -0
- package/.next/server/chunks/3031.js +226 -0
- package/.next/server/chunks/3181.js +1 -0
- package/.next/server/chunks/3493.js +1 -0
- package/.next/server/chunks/3672.js +1 -0
- package/.next/server/chunks/3701.js +104 -0
- package/.next/server/chunks/4013.js +1 -0
- package/.next/server/chunks/402.js +2 -0
- package/.next/server/chunks/4035.js +80 -0
- package/.next/server/chunks/4248.js +153 -0
- package/.next/server/chunks/4367.js +1 -0
- package/.next/server/chunks/4406.js +141 -0
- package/.next/server/chunks/4741.js +18 -0
- package/.next/server/chunks/4768.js +1 -0
- package/.next/server/chunks/4858.js +148 -0
- package/.next/server/chunks/4980.js +1 -0
- package/.next/server/chunks/5155.js +5 -0
- package/.next/server/chunks/5293.js +166 -0
- package/.next/server/chunks/5399.js +8 -0
- package/.next/server/chunks/5409.js +1 -0
- package/.next/server/chunks/5797.js +93 -0
- package/.next/server/chunks/5851.js +36 -0
- package/.next/server/chunks/6206.js +1 -0
- package/.next/server/chunks/6296.js +1 -0
- package/.next/server/chunks/63.js +45 -0
- package/.next/server/chunks/6346.js +1 -0
- package/.next/server/chunks/6406.js +23 -0
- package/.next/server/chunks/642.js +1 -0
- package/.next/server/chunks/6429.js +50 -0
- package/.next/server/chunks/6729.js +64 -0
- package/.next/server/chunks/6907.js +115 -0
- package/.next/server/chunks/6980.js +1 -0
- package/.next/server/chunks/7073.js +24 -0
- package/.next/server/chunks/7233.js +24 -0
- package/.next/server/chunks/7307.js +1 -0
- package/.next/server/chunks/7362.js +9 -0
- package/.next/server/chunks/7567.js +29 -0
- package/.next/server/chunks/7765.js +1 -0
- package/.next/server/chunks/7890.js +1 -0
- package/.next/server/chunks/8065.js +1 -0
- package/.next/server/chunks/8238.js +34 -0
- package/.next/server/chunks/8276.js +1 -0
- package/.next/server/chunks/8336.js +1 -0
- package/.next/server/chunks/8477.js +3 -0
- package/.next/server/chunks/8490.js +1 -0
- package/.next/server/chunks/8916.js +1 -0
- package/.next/server/chunks/9280.js +252 -0
- package/.next/server/chunks/9315.js +1 -0
- package/.next/server/chunks/9537.js +90 -0
- package/.next/server/chunks/966.js +1 -0
- package/.next/server/chunks/9818.js +21 -0
- package/.next/server/chunks/static/media/pdf.worker.min.c476e1a0.mjs +6 -0
- package/.next/server/functions-config-manifest.json +16 -0
- package/.next/server/interception-route-rewrite-manifest.js +1 -0
- package/.next/server/middleware-build-manifest.js +1 -0
- package/.next/server/middleware-manifest.json +6 -0
- package/.next/server/middleware-react-loadable-manifest.js +1 -0
- package/.next/server/middleware.js +18 -0
- package/.next/server/middleware.js.nft.json +1 -0
- package/.next/server/next-font-manifest.js +1 -0
- package/.next/server/next-font-manifest.json +1 -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 +1 -0
- package/.next/server/webpack-runtime.js +1 -0
- package/.next/static/chunks/0b9a0da7.9075af772487e743.js +62 -0
- package/.next/static/chunks/1413.922d232de90c0c41.js +115 -0
- package/.next/static/chunks/1643.467a526a1f24f54d.js +24 -0
- package/.next/static/chunks/1852.5543122f11aa7fed.js +1 -0
- package/.next/static/chunks/1960.b1e26436d7a5f586.js +1 -0
- package/.next/static/chunks/2170a4aa.4213bb2183c9cdf9.js +1 -0
- package/.next/static/chunks/2274.6cd173f80a1405a2.js +21 -0
- package/.next/static/chunks/2419.347fdfe3c170854d.js +166 -0
- package/.next/static/chunks/2619.9aac8983f30c7c8a.js +1 -0
- package/.next/static/chunks/2623.d20fabd8e18197c6.js +287 -0
- package/.next/static/chunks/2729.f5365061a849d659.js +34 -0
- package/.next/static/chunks/2821.934bcf60fbdc28c6.js +1 -0
- package/.next/static/chunks/2918becc.abff2ece1de37bc1.js +153 -0
- package/.next/static/chunks/2947.114e51cb06d1c01a.js +23 -0
- package/.next/static/chunks/3079.4c511fa1144e3adf.js +79 -0
- package/.next/static/chunks/3274.208ca44844cd7d95.js +148 -0
- package/.next/static/chunks/3308.465a94263d04bfea.js +73 -0
- package/.next/static/chunks/3325.e4bfe1ca657f3b5b.js +80 -0
- package/.next/static/chunks/3506.2a7eaa08b9f55337.js +90 -0
- package/.next/static/chunks/363642f4-043c1475ab9af70e.js +1 -0
- package/.next/static/chunks/3794-123fdf632563f469.js +32 -0
- package/.next/static/chunks/3837.a755ccfe6f9c1c1c.js +5 -0
- package/.next/static/chunks/394.91597771688df6d0.js +1 -0
- package/.next/static/chunks/3997.1009c06025691712.js +1 -0
- package/.next/static/chunks/4453.91a357dc43c21745.js +1 -0
- package/.next/static/chunks/4491.44fdf20580ac72bd.js +24 -0
- package/.next/static/chunks/4829.cf1d50e43e6d9db5.js +1 -0
- package/.next/static/chunks/498.fe1d9da9ecad6c36.js +1 -0
- package/.next/static/chunks/4bd1b696-e356ca5ba0218e27.js +1 -0
- package/.next/static/chunks/5019.b5a1a2b8daf17525.js +1 -0
- package/.next/static/chunks/5034.8f16c3fa3ce75411.js +1 -0
- package/.next/static/chunks/5074.d16651da01ec4e02.js +1 -0
- package/.next/static/chunks/51fb665c.0950e1b79671348d.js +45 -0
- package/.next/static/chunks/532.5956ed631aff722b.js +9 -0
- package/.next/static/chunks/5326.69460442bdcd6cd3.js +1 -0
- package/.next/static/chunks/5403.ff110bf5bf600758.js +64 -0
- package/.next/static/chunks/547.902a733488cfe3f7.js +77 -0
- package/.next/static/chunks/5567.540d7fc108ad6ee5.js +215 -0
- package/.next/static/chunks/5590.ef62922166d308b4.js +1 -0
- package/.next/static/chunks/5690.9d6eb1edb1399995.js +1 -0
- package/.next/static/chunks/5749.25faee4a1e55b854.js +226 -0
- package/.next/static/chunks/58bb9007.1ccb6bba34b4c635.js +80 -0
- package/.next/static/chunks/6121.f3f43f1896ea0cd9.js +1 -0
- package/.next/static/chunks/6600.583c88eef37aa524.js +1 -0
- package/.next/static/chunks/6696.a41aec266e657d54.js +141 -0
- package/.next/static/chunks/6922.42148793782d2fe7.js +1 -0
- package/.next/static/chunks/7006.e191611ffc2b9528.js +43 -0
- package/.next/static/chunks/7343.9fbb58204d8ac681.js +1 -0
- package/.next/static/chunks/73972abe.25a4cffa03b2bcef.js +119 -0
- package/.next/static/chunks/7547.58bda8a2aabba0d4.js +93 -0
- package/.next/static/chunks/7648.4ae2f183b4db0353.js +1 -0
- package/.next/static/chunks/7874.8db6929b94cdf697.js +1 -0
- package/.next/static/chunks/7959.1f20a35df316216a.js +104 -0
- package/.next/static/chunks/83.85d62d7fc9850b75.js +29 -0
- package/.next/static/chunks/8436.cab94b59cca0a8ff.js +1 -0
- package/.next/static/chunks/8451.ff6ff72b57dc52e1.js +1 -0
- package/.next/static/chunks/8489.45f22859734f514f.js +36 -0
- package/.next/static/chunks/8568.f85d8b36fc9a9037.js +1 -0
- package/.next/static/chunks/8771-3e14b6810486df1f.js +1 -0
- package/.next/static/chunks/8863.be51033a67436277.js +1 -0
- package/.next/static/chunks/90542734.dc1a2723e4f6affb.js +1 -0
- package/.next/static/chunks/9500.1488aec06ee78127.js +1 -0
- package/.next/static/chunks/9633.155548b5fca6e580.js +1 -0
- package/.next/static/chunks/9779.673004a62d70e36a.js +1 -0
- package/.next/static/chunks/app/_global-error/page-cc518af6b1ffb191.js +1 -0
- package/.next/static/chunks/app/_not-found/page-c72daab99269beff.js +1 -0
- package/.next/static/chunks/app/api/agent/[id]/events/route-cc518af6b1ffb191.js +1 -0
- package/.next/static/chunks/app/api/agent/[id]/route-cc518af6b1ffb191.js +1 -0
- package/.next/static/chunks/app/api/agent/new/route-cc518af6b1ffb191.js +1 -0
- package/.next/static/chunks/app/api/auth/all-providers/route-cc518af6b1ffb191.js +1 -0
- package/.next/static/chunks/app/api/auth/api-key/[provider]/route-cc518af6b1ffb191.js +1 -0
- package/.next/static/chunks/app/api/auth/login/[provider]/route-cc518af6b1ffb191.js +1 -0
- package/.next/static/chunks/app/api/auth/login/route-cc518af6b1ffb191.js +1 -0
- package/.next/static/chunks/app/api/auth/logout/[provider]/route-cc518af6b1ffb191.js +1 -0
- package/.next/static/chunks/app/api/auth/providers/route-cc518af6b1ffb191.js +1 -0
- package/.next/static/chunks/app/api/auth/status/route-cc518af6b1ffb191.js +1 -0
- package/.next/static/chunks/app/api/default-cwd/route-cc518af6b1ffb191.js +1 -0
- package/.next/static/chunks/app/api/files/[...path]/route-cc518af6b1ffb191.js +1 -0
- package/.next/static/chunks/app/api/harness/route-cc518af6b1ffb191.js +1 -0
- package/.next/static/chunks/app/api/home/route-cc518af6b1ffb191.js +1 -0
- package/.next/static/chunks/app/api/internal/runtime/route-cc518af6b1ffb191.js +1 -0
- package/.next/static/chunks/app/api/models/route-cc518af6b1ffb191.js +1 -0
- package/.next/static/chunks/app/api/models-config/discover/route-cc518af6b1ffb191.js +1 -0
- package/.next/static/chunks/app/api/models-config/route-cc518af6b1ffb191.js +1 -0
- package/.next/static/chunks/app/api/models-config/test/route-cc518af6b1ffb191.js +1 -0
- package/.next/static/chunks/app/api/projects/browse/route-cc518af6b1ffb191.js +1 -0
- package/.next/static/chunks/app/api/projects/route-cc518af6b1ffb191.js +1 -0
- package/.next/static/chunks/app/api/reports/[id]/route-cc518af6b1ffb191.js +1 -0
- package/.next/static/chunks/app/api/search/route-cc518af6b1ffb191.js +1 -0
- package/.next/static/chunks/app/api/sessions/[id]/context/route-cc518af6b1ffb191.js +1 -0
- package/.next/static/chunks/app/api/sessions/[id]/route-cc518af6b1ffb191.js +1 -0
- package/.next/static/chunks/app/api/sessions/new/route-cc518af6b1ffb191.js +1 -0
- package/.next/static/chunks/app/api/sessions/route-cc518af6b1ffb191.js +1 -0
- package/.next/static/chunks/app/api/settings/route-cc518af6b1ffb191.js +1 -0
- package/.next/static/chunks/app/api/skills/install/route-cc518af6b1ffb191.js +1 -0
- package/.next/static/chunks/app/api/skills/route-cc518af6b1ffb191.js +1 -0
- package/.next/static/chunks/app/api/skills/search/route-cc518af6b1ffb191.js +1 -0
- package/.next/static/chunks/app/api/soul/route-cc518af6b1ffb191.js +1 -0
- package/.next/static/chunks/app/api/version/route-cc518af6b1ffb191.js +1 -0
- package/.next/static/chunks/app/layout-be148b7ae915b22a.js +1 -0
- package/.next/static/chunks/app/login/page-ebf0e6de99062783.js +1 -0
- package/.next/static/chunks/app/page-0594cb7a3cbb0211.js +260 -0
- package/.next/static/chunks/d3ac728e.7964f816a1ca64e5.js +1 -0
- package/.next/static/chunks/framework-711ef29bc66f648c.js +1 -0
- package/.next/static/chunks/main-app-45a0f19af99d61b6.js +1 -0
- package/.next/static/chunks/main-f74964b7ae52493e.js +5 -0
- package/.next/static/chunks/next/dist/client/components/builtin/app-error-cc518af6b1ffb191.js +1 -0
- package/.next/static/chunks/next/dist/client/components/builtin/forbidden-cc518af6b1ffb191.js +1 -0
- package/.next/static/chunks/next/dist/client/components/builtin/global-error-9bfa08b9491621f2.js +1 -0
- package/.next/static/chunks/next/dist/client/components/builtin/not-found-cc518af6b1ffb191.js +1 -0
- package/.next/static/chunks/next/dist/client/components/builtin/unauthorized-cc518af6b1ffb191.js +1 -0
- package/.next/static/chunks/polyfills-42372ed130431b0a.js +1 -0
- package/.next/static/chunks/webpack-fcf4a889ecbd753c.js +1 -0
- package/.next/static/css/45029451a1d7255d.css +3 -0
- package/.next/static/media/15605e25b523335c-s.woff2 +0 -0
- package/.next/static/media/1a3dce5cfb5f7760-s.woff2 +0 -0
- package/.next/static/media/1cdd02902f937a18-s.woff2 +0 -0
- package/.next/static/media/4c4b3b30b6bcb2be-s.woff2 +0 -0
- package/.next/static/media/641a7b8a5800ee0e-s.woff2 +0 -0
- package/.next/static/media/7deddc85b7ffd1dc-s.p.woff2 +0 -0
- package/.next/static/media/ec14413c594b3356-s.p.woff2 +0 -0
- package/.next/static/media/pdf.worker.min.29aaf158.mjs +6 -0
- package/.next/static/nmfQlwnkhzbPmuiCmhW-_/_buildManifest.js +1 -0
- package/.next/static/nmfQlwnkhzbPmuiCmhW-_/_ssgManifest.js +1 -0
- package/package.json +21 -21
- package/app/api/agent/[id]/events/route.ts +0 -94
- package/app/api/agent/[id]/route.ts +0 -83
- package/app/api/agent/new/route.ts +0 -53
- package/app/api/auth/all-providers/route.ts +0 -21
- package/app/api/auth/api-key/[provider]/route.ts +0 -7
- package/app/api/auth/login/[provider]/route.ts +0 -7
- package/app/api/auth/login/route.ts +0 -22
- package/app/api/auth/logout/[provider]/route.ts +0 -7
- package/app/api/auth/providers/route.ts +0 -15
- package/app/api/auth/status/route.ts +0 -6
- package/app/api/default-cwd/route.ts +0 -22
- package/app/api/files/[...path]/route.ts +0 -621
- package/app/api/harness/route.ts +0 -47
- package/app/api/home/route.ts +0 -6
- package/app/api/internal/runtime/route.ts +0 -26
- package/app/api/models/route.ts +0 -67
- package/app/api/models-config/discover/route.ts +0 -42
- package/app/api/models-config/route.ts +0 -152
- package/app/api/models-config/test/route.ts +0 -154
- package/app/api/projects/browse/route.ts +0 -51
- package/app/api/projects/route.ts +0 -83
- package/app/api/reports/[id]/route.ts +0 -108
- package/app/api/search/route.ts +0 -122
- package/app/api/sessions/[id]/context/route.ts +0 -23
- package/app/api/sessions/[id]/route.ts +0 -124
- package/app/api/sessions/new/route.ts +0 -5
- package/app/api/sessions/route.ts +0 -16
- package/app/api/settings/route.ts +0 -51
- package/app/api/skills/install/route.ts +0 -249
- package/app/api/skills/route.ts +0 -161
- package/app/api/skills/search/route.ts +0 -121
- package/app/api/soul/route.ts +0 -47
- package/app/api/version/route.ts +0 -55
- package/app/globals.css +0 -736
- package/app/layout.tsx +0 -40
- package/app/login/page.tsx +0 -133
- package/app/page.tsx +0 -10
- package/components/AppShell.tsx +0 -1058
- package/components/ChatInput.tsx +0 -1103
- package/components/ChatMinimap.tsx +0 -381
- package/components/ChatWindow.tsx +0 -576
- package/components/CodeMirrorEditor.tsx +0 -137
- package/components/ConversationSearch.tsx +0 -369
- package/components/DataTableViewer.tsx +0 -248
- package/components/FileExplorer.tsx +0 -758
- package/components/FileIcons.tsx +0 -241
- package/components/FileViewer.tsx +0 -1273
- package/components/GlobalFileEditor.tsx +0 -98
- package/components/MarkdownRenderer.tsx +0 -331
- package/components/MermaidDiagram.tsx +0 -80
- package/components/MessageView.tsx +0 -1141
- package/components/ModelsConfig.tsx +0 -1991
- package/components/ProjectContext.tsx +0 -252
- package/components/ProjectFolderPicker.tsx +0 -202
- package/components/ProjectsConfig.tsx +0 -288
- package/components/ProviderIcons.tsx +0 -91
- package/components/ReportPanel.tsx +0 -237
- package/components/ResizeHandle.tsx +0 -105
- package/components/SessionSidebar.tsx +0 -1464
- package/components/SettingsDialog.tsx +0 -287
- package/components/SkillsConfig.tsx +0 -1093
- package/components/SubagentPanel.tsx +0 -191
- package/components/TabBar.tsx +0 -115
- package/components/ToolPanel.tsx +0 -131
- package/components/WidgetRenderer.tsx +0 -505
- package/components/viewers/DocumentToolbar.tsx +0 -78
- package/components/viewers/DocxViewer.tsx +0 -97
- package/components/viewers/PdfViewer.tsx +0 -206
- package/components/viewers/PptxViewer.tsx +0 -240
- package/components/viewers/XlsxViewer.tsx +0 -143
- package/hooks/useAgentSession.ts +0 -710
- package/hooks/useAudio.ts +0 -50
- package/hooks/useDragDrop.ts +0 -52
- package/hooks/useResizable.ts +0 -60
- package/hooks/useTheme.ts +0 -85
- package/lib/agent-client.ts +0 -39
- package/lib/annodex-config.ts +0 -556
- package/lib/auth-token.ts +0 -74
- package/lib/auth.ts +0 -90
- package/lib/brand.ts +0 -5
- package/lib/code-theme.ts +0 -32
- package/lib/codex-compat-proxy.ts +0 -1603
- package/lib/codex-home.ts +0 -6
- package/lib/codex-server.ts +0 -796
- package/lib/codex-session.ts +0 -590
- package/lib/codex-usage.ts +0 -213
- package/lib/file-paths.ts +0 -34
- package/lib/model-discovery.ts +0 -379
- package/lib/normalize.ts +0 -30
- package/lib/npx.ts +0 -87
- package/lib/pi-types.ts +0 -49
- package/lib/projects.ts +0 -269
- package/lib/provider-api.ts +0 -88
- package/lib/report-prompt.ts +0 -61
- package/lib/report-store.ts +0 -597
- package/lib/report-update-parser.ts +0 -66
- package/lib/rpc-manager.ts +0 -668
- package/lib/runtime-state.ts +0 -117
- package/lib/session-reader.ts +0 -903
- package/lib/session-runtime.ts +0 -105
- package/lib/subagent-progress.ts +0 -279
- package/lib/types.ts +0 -241
- package/lib/widget-export.ts +0 -318
- package/lib/widget-guidelines.ts +0 -288
- package/lib/widget-prompt.ts +0 -76
- package/lib/widget-utils.ts +0 -523
- package/postcss.config.mjs +0 -8
- package/proxy.ts +0 -64
- package/scripts/postinstall.cjs +0 -25
- package/tsconfig.json +0 -41
|
@@ -1,98 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import { useEffect, useState, useCallback } from "react";
|
|
4
|
-
import { CodeMirrorEditor } from "./CodeMirrorEditor";
|
|
5
|
-
import { useTheme } from "@/hooks/useTheme";
|
|
6
|
-
|
|
7
|
-
interface Props {
|
|
8
|
-
filePath: string; // "__soul__" or "__harness__"
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
const FILE_CONFIG: Record<string, { apiPath: string; title: string }> = {
|
|
12
|
-
"__soul__": { apiPath: "/api/soul", title: "SOUL.md" },
|
|
13
|
-
"__harness__": { apiPath: "/api/harness", title: "HARNESS.md" },
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
export function GlobalFileEditor({ filePath }: Props) {
|
|
17
|
-
const config = FILE_CONFIG[filePath];
|
|
18
|
-
const { isDark } = useTheme();
|
|
19
|
-
const [content, setContent] = useState("");
|
|
20
|
-
const [loading, setLoading] = useState(true);
|
|
21
|
-
const [error, setError] = useState<string | null>(null);
|
|
22
|
-
const [saving, setSaving] = useState(false);
|
|
23
|
-
const [saved, setSaved] = useState(false);
|
|
24
|
-
|
|
25
|
-
useEffect(() => {
|
|
26
|
-
if (!config) return;
|
|
27
|
-
setLoading(true);
|
|
28
|
-
fetch(config.apiPath)
|
|
29
|
-
.then((r) => r.json())
|
|
30
|
-
.then((d: { content?: string }) => setContent(d.content ?? ""))
|
|
31
|
-
.catch((e) => setError(String(e)))
|
|
32
|
-
.finally(() => setLoading(false));
|
|
33
|
-
}, [config]);
|
|
34
|
-
|
|
35
|
-
const handleSave = useCallback(async () => {
|
|
36
|
-
if (!config) return;
|
|
37
|
-
setSaving(true);
|
|
38
|
-
try {
|
|
39
|
-
await fetch(config.apiPath, {
|
|
40
|
-
method: "PUT",
|
|
41
|
-
headers: { "Content-Type": "application/json" },
|
|
42
|
-
body: JSON.stringify({ content }),
|
|
43
|
-
});
|
|
44
|
-
setSaved(true);
|
|
45
|
-
setTimeout(() => setSaved(false), 2000);
|
|
46
|
-
} catch (e) {
|
|
47
|
-
setError(String(e));
|
|
48
|
-
} finally {
|
|
49
|
-
setSaving(false);
|
|
50
|
-
}
|
|
51
|
-
}, [config, content]);
|
|
52
|
-
|
|
53
|
-
if (!config) return null;
|
|
54
|
-
if (loading) {
|
|
55
|
-
return <div style={{ height: "100%", display: "flex", alignItems: "center", justifyContent: "center", color: "var(--text-muted)", fontSize: 13 }}>Loading…</div>;
|
|
56
|
-
}
|
|
57
|
-
if (error) {
|
|
58
|
-
return <div style={{ height: "100%", display: "flex", alignItems: "center", justifyContent: "center", color: "#f87171", fontSize: 13 }}>{error}</div>;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
return (
|
|
62
|
-
<div style={{ display: "flex", flexDirection: "column", height: "100%", overflow: "hidden" }}>
|
|
63
|
-
{/* Toolbar */}
|
|
64
|
-
<div style={{
|
|
65
|
-
display: "flex", alignItems: "center", gap: 12,
|
|
66
|
-
padding: "4px 16px", borderBottom: "1px solid var(--border)",
|
|
67
|
-
fontSize: 11, color: "var(--text-dim)", background: "var(--bg)", flexShrink: 0,
|
|
68
|
-
}}>
|
|
69
|
-
<span style={{ fontFamily: "var(--font-mono)", fontWeight: 600, color: "var(--text)" }}>{config.title}</span>
|
|
70
|
-
<span style={{ marginLeft: "auto", fontSize: 10, color: "var(--text-dim)" }}>Global</span>
|
|
71
|
-
{saved && (
|
|
72
|
-
<span style={{ color: "#4ade80", fontWeight: 600, animation: "saved-pop 0.3s ease" }}>✓ Saved</span>
|
|
73
|
-
)}
|
|
74
|
-
<button
|
|
75
|
-
onClick={handleSave}
|
|
76
|
-
disabled={saving}
|
|
77
|
-
title="Save (Ctrl+S)"
|
|
78
|
-
style={{
|
|
79
|
-
padding: "2px 10px", fontSize: 11, cursor: saving ? "not-allowed" : "pointer",
|
|
80
|
-
background: "var(--accent)", color: "#fff", border: "1px solid var(--accent)",
|
|
81
|
-
borderRadius: 5, fontWeight: 600, opacity: saving ? 0.6 : 1,
|
|
82
|
-
}}
|
|
83
|
-
>
|
|
84
|
-
{saving ? "Saving…" : "Save"}
|
|
85
|
-
</button>
|
|
86
|
-
</div>
|
|
87
|
-
<div style={{ flex: 1, overflow: "hidden" }}>
|
|
88
|
-
<CodeMirrorEditor
|
|
89
|
-
initialContent={content}
|
|
90
|
-
language="markdown"
|
|
91
|
-
isDark={isDark}
|
|
92
|
-
onChange={setContent}
|
|
93
|
-
onSave={handleSave}
|
|
94
|
-
/>
|
|
95
|
-
</div>
|
|
96
|
-
</div>
|
|
97
|
-
);
|
|
98
|
-
}
|
|
@@ -1,331 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import type { CSSProperties } from "react";
|
|
4
|
-
import { useState } from "react";
|
|
5
|
-
import ReactMarkdown from "react-markdown";
|
|
6
|
-
import remarkGfm from "remark-gfm";
|
|
7
|
-
import { Prism as SyntaxHighlighter } from "react-syntax-highlighter";
|
|
8
|
-
import { useTheme } from "@/hooks/useTheme";
|
|
9
|
-
import { isMermaidLanguage, MermaidDiagram } from "@/components/MermaidDiagram";
|
|
10
|
-
import { WidgetRenderer } from "@/components/WidgetRenderer";
|
|
11
|
-
import { parseShowWidgets } from "@/lib/widget-utils";
|
|
12
|
-
import { resolveCodeTheme } from "@/lib/code-theme";
|
|
13
|
-
import { encodeFilePathForApi, getFileName, normalizeFilePathSlashes } from "@/lib/file-paths";
|
|
14
|
-
|
|
15
|
-
interface Props {
|
|
16
|
-
content: string;
|
|
17
|
-
className?: string;
|
|
18
|
-
style?: CSSProperties;
|
|
19
|
-
codeBlockVariant?: "chat" | "file";
|
|
20
|
-
baseFilePath?: string;
|
|
21
|
-
onOpenLocalFile?: (filePath: string, fileName: string) => void;
|
|
22
|
-
onWidgetSendMessage?: (message: string) => void;
|
|
23
|
-
renderVisualCodeBlocks?: boolean;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
function copyText(text: string): Promise<void> {
|
|
27
|
-
if (navigator.clipboard?.writeText) {
|
|
28
|
-
return navigator.clipboard.writeText(text);
|
|
29
|
-
}
|
|
30
|
-
try {
|
|
31
|
-
const ta = document.createElement("textarea");
|
|
32
|
-
ta.value = text;
|
|
33
|
-
ta.style.position = "fixed";
|
|
34
|
-
ta.style.opacity = "0";
|
|
35
|
-
document.body.appendChild(ta);
|
|
36
|
-
ta.select();
|
|
37
|
-
document.execCommand("copy");
|
|
38
|
-
document.body.removeChild(ta);
|
|
39
|
-
return Promise.resolve();
|
|
40
|
-
} catch {
|
|
41
|
-
return Promise.reject();
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
function getLanguage(className?: string): string {
|
|
46
|
-
return className?.replace(/^language-/, "").trim() ?? "";
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
function isWidgetLanguage(language: string): boolean {
|
|
50
|
-
return language.trim().toLowerCase() === "show-widget";
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
function isVisualCodeBlock(language: string, code: string): boolean {
|
|
54
|
-
const lang = language.trim().toLowerCase();
|
|
55
|
-
const trimmed = code.trim();
|
|
56
|
-
if (!trimmed) return false;
|
|
57
|
-
|
|
58
|
-
if (lang === "svg" || (lang === "xml" && /^<svg[\s>]/i.test(trimmed))) {
|
|
59
|
-
return /^<svg[\s>]/i.test(trimmed);
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
if (lang !== "html") return false;
|
|
63
|
-
if (/<!doctype|<html[\s>]|<head[\s>]|<body[\s>]/i.test(trimmed)) return false;
|
|
64
|
-
return /^<(style|svg|div|section|article|main|figure|canvas)\b/i.test(trimmed);
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
function isExternalUrl(value: string): boolean {
|
|
68
|
-
return /^[a-z][a-z\d+.-]*:/i.test(value) || value.startsWith("//");
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
function splitMarkdownUrl(value: string): string {
|
|
72
|
-
const match = /^([^?#]*)(.*)$/.exec(value);
|
|
73
|
-
return match?.[1] ?? value;
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
function safeDecodeUri(value: string): string {
|
|
77
|
-
try {
|
|
78
|
-
return decodeURI(value);
|
|
79
|
-
} catch {
|
|
80
|
-
return value;
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
function normalizeResolvedPath(filePath: string): string {
|
|
85
|
-
const normalized = normalizeFilePathSlashes(filePath);
|
|
86
|
-
const absolute = normalized.startsWith("/");
|
|
87
|
-
const parts: string[] = [];
|
|
88
|
-
for (const part of normalized.split("/")) {
|
|
89
|
-
if (!part || part === ".") continue;
|
|
90
|
-
if (part === "..") {
|
|
91
|
-
if (parts.length > 0 && parts[parts.length - 1] !== "..") parts.pop();
|
|
92
|
-
else if (!absolute) parts.push(part);
|
|
93
|
-
continue;
|
|
94
|
-
}
|
|
95
|
-
parts.push(part);
|
|
96
|
-
}
|
|
97
|
-
return `${absolute ? "/" : ""}${parts.join("/")}`;
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
function dirname(filePath: string): string {
|
|
101
|
-
const normalized = normalizeFilePathSlashes(filePath);
|
|
102
|
-
const index = normalized.lastIndexOf("/");
|
|
103
|
-
return index >= 0 ? normalized.slice(0, index) : "";
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
function resolveLocalMarkdownPath(baseFilePath: string | undefined, url: string | undefined): string | null {
|
|
107
|
-
if (!baseFilePath || !url) return null;
|
|
108
|
-
if (url.startsWith("#") || isExternalUrl(url)) return null;
|
|
109
|
-
|
|
110
|
-
const pathPart = splitMarkdownUrl(url);
|
|
111
|
-
if (!pathPart) return null;
|
|
112
|
-
|
|
113
|
-
const decodedPath = safeDecodeUri(pathPart);
|
|
114
|
-
if (decodedPath.startsWith("/")) return normalizeResolvedPath(decodedPath);
|
|
115
|
-
return normalizeResolvedPath(`${dirname(baseFilePath)}/${decodedPath}`);
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
function fileReadUrl(filePath: string): string {
|
|
119
|
-
return `/api/files/${encodeFilePathForApi(filePath)}?type=read`;
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
function parseMarkdownWidget(code: string): { title?: string; code: string } | null {
|
|
123
|
-
const segments = parseShowWidgets(`\`\`\`show-widget\n${code}\n\`\`\``);
|
|
124
|
-
const widget = segments.find((segment) => segment.type === "widget");
|
|
125
|
-
return widget?.type === "widget" ? { title: widget.title, code: widget.code } : null;
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
function MarkdownCodeBlock({
|
|
129
|
-
code,
|
|
130
|
-
language,
|
|
131
|
-
variant,
|
|
132
|
-
}: {
|
|
133
|
-
code: string;
|
|
134
|
-
language: string;
|
|
135
|
-
variant: "chat" | "file";
|
|
136
|
-
}) {
|
|
137
|
-
const { isDark } = useTheme();
|
|
138
|
-
const [copied, setCopied] = useState(false);
|
|
139
|
-
const showLineNumbers = variant === "chat";
|
|
140
|
-
|
|
141
|
-
const copy = () => {
|
|
142
|
-
copyText(code).then(() => {
|
|
143
|
-
setCopied(true);
|
|
144
|
-
setTimeout(() => setCopied(false), 1500);
|
|
145
|
-
});
|
|
146
|
-
};
|
|
147
|
-
|
|
148
|
-
return (
|
|
149
|
-
<div
|
|
150
|
-
className={`markdown-code-block markdown-code-block-${variant}`}
|
|
151
|
-
style={{
|
|
152
|
-
position: "relative",
|
|
153
|
-
marginTop: variant === "file" ? 12 : 4,
|
|
154
|
-
marginBottom: variant === "file" ? 12 : 4,
|
|
155
|
-
borderRadius: 6,
|
|
156
|
-
overflow: "hidden",
|
|
157
|
-
border: "1px solid var(--border)",
|
|
158
|
-
}}
|
|
159
|
-
>
|
|
160
|
-
<div
|
|
161
|
-
style={{
|
|
162
|
-
padding: "3px 10px",
|
|
163
|
-
background: "var(--bg-panel)",
|
|
164
|
-
borderBottom: "1px solid var(--border)",
|
|
165
|
-
fontSize: 11,
|
|
166
|
-
color: "var(--text-dim)",
|
|
167
|
-
display: "flex",
|
|
168
|
-
justifyContent: "space-between",
|
|
169
|
-
alignItems: "center",
|
|
170
|
-
}}
|
|
171
|
-
>
|
|
172
|
-
<span>{language || "text"}</span>
|
|
173
|
-
<button
|
|
174
|
-
onClick={copy}
|
|
175
|
-
style={{
|
|
176
|
-
background: "none",
|
|
177
|
-
border: "none",
|
|
178
|
-
color: "var(--text-muted)",
|
|
179
|
-
cursor: "pointer",
|
|
180
|
-
fontSize: 11,
|
|
181
|
-
}}
|
|
182
|
-
>
|
|
183
|
-
{copied ? "copied" : "copy"}
|
|
184
|
-
</button>
|
|
185
|
-
</div>
|
|
186
|
-
<SyntaxHighlighter
|
|
187
|
-
language={language || "text"}
|
|
188
|
-
style={resolveCodeTheme(isDark)}
|
|
189
|
-
showLineNumbers={showLineNumbers}
|
|
190
|
-
lineNumberStyle={{ color: "var(--text-dim)", fontStyle: "normal" }}
|
|
191
|
-
customStyle={{
|
|
192
|
-
margin: 0,
|
|
193
|
-
padding: variant === "file" ? "12px 16px" : "10px 12px",
|
|
194
|
-
fontSize: variant === "file" ? 13 : 12.5,
|
|
195
|
-
lineHeight: 1.6,
|
|
196
|
-
borderRadius: 0,
|
|
197
|
-
background: "var(--bg)",
|
|
198
|
-
}}
|
|
199
|
-
codeTagProps={{ style: { fontFamily: "var(--font-mono)" } }}
|
|
200
|
-
>
|
|
201
|
-
{code}
|
|
202
|
-
</SyntaxHighlighter>
|
|
203
|
-
</div>
|
|
204
|
-
);
|
|
205
|
-
}
|
|
206
|
-
|
|
207
|
-
export function MarkdownRenderer({
|
|
208
|
-
content,
|
|
209
|
-
className = "markdown-body",
|
|
210
|
-
style,
|
|
211
|
-
codeBlockVariant = "chat",
|
|
212
|
-
baseFilePath,
|
|
213
|
-
onOpenLocalFile,
|
|
214
|
-
onWidgetSendMessage,
|
|
215
|
-
renderVisualCodeBlocks = false,
|
|
216
|
-
}: Props) {
|
|
217
|
-
return (
|
|
218
|
-
<div className={className} style={style}>
|
|
219
|
-
<ReactMarkdown
|
|
220
|
-
remarkPlugins={[remarkGfm]}
|
|
221
|
-
components={{
|
|
222
|
-
code({ className, children, node, ...props }) {
|
|
223
|
-
void node;
|
|
224
|
-
const language = getLanguage(className);
|
|
225
|
-
const raw = String(children);
|
|
226
|
-
const code = raw.replace(/\n$/, "");
|
|
227
|
-
const isBlock = className?.includes("language-") || raw.includes("\n");
|
|
228
|
-
|
|
229
|
-
if (isBlock && isMermaidLanguage(language)) {
|
|
230
|
-
return <MermaidDiagram chart={code} />;
|
|
231
|
-
}
|
|
232
|
-
|
|
233
|
-
if (isBlock && isWidgetLanguage(language)) {
|
|
234
|
-
const widget = parseMarkdownWidget(code);
|
|
235
|
-
if (widget) {
|
|
236
|
-
return (
|
|
237
|
-
<WidgetRenderer
|
|
238
|
-
code={widget.code}
|
|
239
|
-
isStreaming={false}
|
|
240
|
-
title={widget.title}
|
|
241
|
-
onSendMessage={onWidgetSendMessage}
|
|
242
|
-
/>
|
|
243
|
-
);
|
|
244
|
-
}
|
|
245
|
-
}
|
|
246
|
-
|
|
247
|
-
if (isBlock && renderVisualCodeBlocks && isVisualCodeBlock(language, code)) {
|
|
248
|
-
return (
|
|
249
|
-
<WidgetRenderer
|
|
250
|
-
code={code}
|
|
251
|
-
isStreaming={false}
|
|
252
|
-
title={`${language || "visual"} preview`}
|
|
253
|
-
onSendMessage={onWidgetSendMessage}
|
|
254
|
-
/>
|
|
255
|
-
);
|
|
256
|
-
}
|
|
257
|
-
|
|
258
|
-
if (isBlock) {
|
|
259
|
-
return (
|
|
260
|
-
<MarkdownCodeBlock
|
|
261
|
-
code={code}
|
|
262
|
-
language={language}
|
|
263
|
-
variant={codeBlockVariant}
|
|
264
|
-
/>
|
|
265
|
-
);
|
|
266
|
-
}
|
|
267
|
-
|
|
268
|
-
return (
|
|
269
|
-
<code
|
|
270
|
-
style={{
|
|
271
|
-
background: "var(--bg-selected)",
|
|
272
|
-
padding: "1px 4px",
|
|
273
|
-
borderRadius: 3,
|
|
274
|
-
fontFamily: "var(--font-mono)",
|
|
275
|
-
fontSize: "0.9em",
|
|
276
|
-
}}
|
|
277
|
-
{...props}
|
|
278
|
-
>
|
|
279
|
-
{children}
|
|
280
|
-
</code>
|
|
281
|
-
);
|
|
282
|
-
},
|
|
283
|
-
pre({ children }) {
|
|
284
|
-
return <>{children}</>;
|
|
285
|
-
},
|
|
286
|
-
a({ href, children, node, ...props }) {
|
|
287
|
-
void node;
|
|
288
|
-
const resolvedPath = resolveLocalMarkdownPath(baseFilePath, href);
|
|
289
|
-
const isLocalFile = !!resolvedPath;
|
|
290
|
-
const isExternal = !!href && isExternalUrl(href);
|
|
291
|
-
|
|
292
|
-
return (
|
|
293
|
-
<a
|
|
294
|
-
{...props}
|
|
295
|
-
href={isLocalFile ? fileReadUrl(resolvedPath) : href}
|
|
296
|
-
target={isExternal ? "_blank" : undefined}
|
|
297
|
-
rel={isExternal ? "noreferrer" : undefined}
|
|
298
|
-
onClick={(event) => {
|
|
299
|
-
if (!resolvedPath || !onOpenLocalFile) return;
|
|
300
|
-
event.preventDefault();
|
|
301
|
-
onOpenLocalFile(resolvedPath, getFileName(resolvedPath));
|
|
302
|
-
}}
|
|
303
|
-
title={isLocalFile ? resolvedPath : props.title}
|
|
304
|
-
>
|
|
305
|
-
{children}
|
|
306
|
-
</a>
|
|
307
|
-
);
|
|
308
|
-
},
|
|
309
|
-
img({ src, alt, node, ...props }) {
|
|
310
|
-
void node;
|
|
311
|
-
const source = typeof src === "string" ? src : undefined;
|
|
312
|
-
const resolvedPath = resolveLocalMarkdownPath(baseFilePath, source);
|
|
313
|
-
const resolvedSrc = resolvedPath ? fileReadUrl(resolvedPath) : source;
|
|
314
|
-
return (
|
|
315
|
-
// eslint-disable-next-line @next/next/no-img-element
|
|
316
|
-
<img
|
|
317
|
-
{...props}
|
|
318
|
-
src={resolvedSrc}
|
|
319
|
-
alt={alt ?? ""}
|
|
320
|
-
loading="lazy"
|
|
321
|
-
title={resolvedPath ?? props.title}
|
|
322
|
-
/>
|
|
323
|
-
);
|
|
324
|
-
},
|
|
325
|
-
}}
|
|
326
|
-
>
|
|
327
|
-
{content}
|
|
328
|
-
</ReactMarkdown>
|
|
329
|
-
</div>
|
|
330
|
-
);
|
|
331
|
-
}
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import { useEffect, useRef, useState } from "react";
|
|
4
|
-
import { useTheme } from "@/hooks/useTheme";
|
|
5
|
-
|
|
6
|
-
interface Props {
|
|
7
|
-
chart: string;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
export function isMermaidLanguage(language: string): boolean {
|
|
11
|
-
const normalized = language.trim().toLowerCase();
|
|
12
|
-
return normalized === "mermaid" || normalized === "mmd";
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
export function MermaidDiagram({ chart }: Props) {
|
|
16
|
-
const { isDark } = useTheme();
|
|
17
|
-
const [svg, setSvg] = useState<string | null>(null);
|
|
18
|
-
const [error, setError] = useState<string | null>(null);
|
|
19
|
-
const idRef = useRef(`mermaid-${Math.random().toString(36).slice(2)}`);
|
|
20
|
-
|
|
21
|
-
useEffect(() => {
|
|
22
|
-
let cancelled = false;
|
|
23
|
-
const source = chart.trim();
|
|
24
|
-
|
|
25
|
-
setSvg(null);
|
|
26
|
-
setError(null);
|
|
27
|
-
|
|
28
|
-
if (!source) {
|
|
29
|
-
setError("Empty Mermaid diagram");
|
|
30
|
-
return;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
import("mermaid")
|
|
34
|
-
.then(({ default: mermaid }) => {
|
|
35
|
-
mermaid.initialize({
|
|
36
|
-
startOnLoad: false,
|
|
37
|
-
securityLevel: "strict",
|
|
38
|
-
theme: isDark ? "dark" : "default",
|
|
39
|
-
suppressErrorRendering: true,
|
|
40
|
-
});
|
|
41
|
-
return mermaid.parse(source, { suppressErrors: true }).then((parsed) => {
|
|
42
|
-
if (!parsed) throw new Error("Invalid Mermaid syntax");
|
|
43
|
-
return mermaid.render(`${idRef.current}-${Date.now()}`, source);
|
|
44
|
-
});
|
|
45
|
-
})
|
|
46
|
-
.then((result) => {
|
|
47
|
-
if (!cancelled) setSvg(result.svg);
|
|
48
|
-
})
|
|
49
|
-
.catch((err: unknown) => {
|
|
50
|
-
if (!cancelled) setError(err instanceof Error ? err.message : String(err));
|
|
51
|
-
});
|
|
52
|
-
|
|
53
|
-
return () => {
|
|
54
|
-
cancelled = true;
|
|
55
|
-
};
|
|
56
|
-
}, [chart, isDark]);
|
|
57
|
-
|
|
58
|
-
if (error) {
|
|
59
|
-
return (
|
|
60
|
-
<div className="mermaid-diagram mermaid-diagram-error">
|
|
61
|
-
<div className="mermaid-diagram-error-title">Mermaid render failed</div>
|
|
62
|
-
<div className="mermaid-diagram-error-message">{error}</div>
|
|
63
|
-
<pre>{chart}</pre>
|
|
64
|
-
</div>
|
|
65
|
-
);
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
return (
|
|
69
|
-
<div className="mermaid-diagram">
|
|
70
|
-
{svg ? (
|
|
71
|
-
<div
|
|
72
|
-
className="mermaid-diagram-canvas"
|
|
73
|
-
dangerouslySetInnerHTML={{ __html: svg }}
|
|
74
|
-
/>
|
|
75
|
-
) : (
|
|
76
|
-
<div className="mermaid-diagram-loading">Rendering diagram...</div>
|
|
77
|
-
)}
|
|
78
|
-
</div>
|
|
79
|
-
);
|
|
80
|
-
}
|