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:
@@ -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(() => ({}));
|
||||
|
||||
Reference in New Issue
Block a user