Skip to content

Commit bca1d45

Browse files
committed
update displayed error to better convey content exclusion
1 parent 8a76de9 commit bca1d45

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

Extension/src/LanguageServer/extension.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1434,15 +1434,16 @@ async function onCopilotHover(): Promise<void> {
14341434
const fileUri = vscode.Uri.file(file);
14351435
if (await vscodelm.fileIsIgnored(fileUri, copilotHoverProvider.getCurrentHoverCancellationToken() ?? CancellationToken.None)) {
14361436
// Context is not available for this file.
1437-
telemetry.logLanguageServerEvent("CopilotHover", { "Message": "Copilot summary is not available for this file." });
1438-
await showCopilotContent(copilotHoverProvider, hoverDocument, hoverPosition, localize("copilot.hover.unavailable", "Copilot summary is not available for this file."));
1437+
telemetry.logLanguageServerEvent("CopilotHover", { "Message": "Copilot summary is not available for definition or declaration." });
1438+
await showCopilotContent(copilotHoverProvider, hoverDocument, hoverPosition, localize("copilot.hover.unavailable", "Copilot summary is not available." + "\n\n" +
1439+
localize("copilot.hover.excluded", "The file containing this symbol's defintion or declaration has been excluded from use with Copilot.")));
14391440
return;
14401441
}
14411442
}
14421443
if (requestInfo.content.length === 0) {
14431444
// Context is not available for this symbol.
14441445
telemetry.logLanguageServerEvent("CopilotHover", { "Message": "Copilot summary is not available for this symbol." });
1445-
await showCopilotContent(copilotHoverProvider, hoverDocument, hoverPosition, localize("copilot.hover.unavailable", "Copilot summary is not available for this symbol."));
1446+
await showCopilotContent(copilotHoverProvider, hoverDocument, hoverPosition, localize("copilot.hover.unavailable.symbol", "Copilot summary is not available for this symbol."));
14461447
return;
14471448
}
14481449

0 commit comments

Comments
 (0)