Files
vscode/extensions/copilot/src/platform/remoteCodeSearch
copilot-swe-agent[bot]andmjbvz f40966f6ec Fix GithubCodeSearchService.triggerIndexing 401 auth error handling
Fix two bugs causing the Codebase Semantic Index to show a perpetual
"Indexing..." spinner when the API returns a 401 authentication error:

1. Fix `codeSearchRepo.ts`: Change `if (!triggerSuccess)` to
   `if (triggerSuccess.isError())`. The Result object is always truthy,
   so the error handling code was never executed — errors fell through
   to set BuildingIndex state and return ok.

2. Fix `githubCodeSearchService.ts`: Return `{ type: 'not-authorized' }`
   for 401/403 HTTP responses in both `triggerIndexing` and
   `getRemoteIndexState`, matching the pattern in `adoCodeSearchService.ts`.
   This allows callers to properly differentiate auth failures.

Co-authored-by: mjbvz <12821956+mjbvz@users.noreply.github.com>
2026-06-04 17:41:32 +00:00
..