mirror of
https://github.com/microsoft/vscode-extension-samples.git
synced 2026-04-27 16:55:44 +08:00
Merge pull request #1080 from microsoft/isidorn/courageous-fly
no need to check if error or usage enabled on logger. This is auto-checked
This commit is contained in:
@ -128,13 +128,11 @@ export function activate(context: vscode.ExtensionContext) {
|
||||
});
|
||||
|
||||
context.subscriptions.push(cat.onDidReceiveFeedback((feedback: vscode.ChatResultFeedback) => {
|
||||
if (logger.isUsageEnabled) {
|
||||
// Log chat result feedback to be able to compute the success matric of the participant
|
||||
// unhelpful / totalRequests is a good success metric
|
||||
logger.logUsage('chatResultFeedback', {
|
||||
kind: feedback.kind
|
||||
});
|
||||
}
|
||||
// Log chat result feedback to be able to compute the success matric of the participant
|
||||
// unhelpful / totalRequests is a good success metric
|
||||
logger.logUsage('chatResultFeedback', {
|
||||
kind: feedback.kind
|
||||
});
|
||||
}));
|
||||
|
||||
context.subscriptions.push(
|
||||
@ -201,9 +199,7 @@ function handleError(logger: vscode.TelemetryLogger, err: any, stream: vscode.Ch
|
||||
// - model does not exist
|
||||
// - user consent not given
|
||||
// - quote limits exceeded
|
||||
if (logger.isErrorsEnabled) {
|
||||
logger.logError(err);
|
||||
}
|
||||
logger.logError(err);
|
||||
|
||||
if (err instanceof vscode.LanguageModelError) {
|
||||
console.log(err.message, err.code, err.cause);
|
||||
|
||||
Reference in New Issue
Block a user