fix(git): harden nested repository discovery

- discard an in-flight discovery when the runtime switches, mirroring the
  isRequestCurrent pattern, so a late completion cannot repopulate the
  cleared map and suppress a fresh scan
- treat a 501 from /api/fs/git-dirs as an explicit 'unsupported' marker
  instead of a generic failure; the VS Code webview now answers the route
  with unsupportedWebRouteResponse so non-repo roots show the honest
  not-a-repository state without a futile Retry
This commit is contained in:
jaygupta17
2026-08-25 19:15:35 +05:30
parent f56b934dc9
commit 5e3f9d1ba2
4 changed files with 97 additions and 9 deletions
+4
View File
@@ -388,6 +388,10 @@ const handleLocalApiRequest = async (input: RequestInfo | URL, url: URL, init: R
return unsupportedWebRouteResponse('Scheduled tasks');
}
if (normalizedPathname === '/api/fs/git-dirs') {
return unsupportedWebRouteResponse('Nested git repository discovery');
}
if (normalizedPathname === '/api/sessions/snapshot' && method === 'GET') {
const activity = await sendBridgeMessage<Record<string, { type: 'idle' | 'busy' | 'cooldown' }>>('api:session-activity:get')
.catch(() => ({}));