Skip to content

Commit a783956

Browse files
committed
A couple bug fixes from the previous PR.
1 parent 197855c commit a783956

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

Extension/src/LanguageServer/lmTool.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,17 @@
55
'use strict';
66

77
import * as vscode from 'vscode';
8-
import { localize } from 'vscode-nls';
8+
import * as nls from 'vscode-nls';
99
import * as util from '../common';
1010
import * as logger from '../logger';
1111
import * as telemetry from '../telemetry';
1212
import { ChatContextResult, ProjectContextResult } from './client';
1313
import { getClients } from './extension';
1414
import { checkDuration } from './utils';
1515

16+
nls.config({ messageFormat: nls.MessageFormat.bundle, bundleFormat: nls.BundleFormat.standalone })();
17+
const localize: nls.LocalizeFunc = nls.loadMessageBundle();
18+
1619
const MSVC: string = 'MSVC';
1720
const Clang: string = 'Clang';
1821
const GCC: string = 'GCC';
@@ -177,7 +180,7 @@ export async function getProjectContext(uri: vscode.Uri, context: { flags: Recor
177180
// Intentionally swallow any exception.
178181
}
179182
telemetryProperties["error"] = "true";
180-
return undefined;
183+
throw exception; // Throw the exception for auto-retry.
181184
} finally {
182185
telemetry.logCopilotEvent('ProjectContext', telemetryProperties, telemetryMetrics);
183186
}

0 commit comments

Comments
 (0)