Skip to content

Commit 9bd009a

Browse files
committed
update copilot hover setting but still allow for opt out
1 parent ec844a3 commit 9bd009a

File tree

3 files changed

+11
-3
lines changed

3 files changed

+11
-3
lines changed

Extension/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3318,7 +3318,6 @@
33183318
"type": "string",
33193319
"enum": [
33203320
"default",
3321-
"enabled",
33223321
"disabled"
33233322
],
33243323
"default": "default",

Extension/package.nls.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -769,7 +769,7 @@
769769
]
770770
},
771771
"c_cpp.configuration.copilotHover.markdownDescription": {
772-
"message": "If `enabled`, the hover tooltip will display an option to generate a summary of the symbol with Copilot. If `disabled`, the option will not be displayed.",
772+
"message": "If `disabled`, no Copilot information will appear in Hover.",
773773
"comment": [
774774
"Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered."
775775
]

Extension/src/LanguageServer/settings.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -455,7 +455,16 @@ export class CppSettings extends Settings {
455455
&& this.intelliSenseEngine.toLowerCase() === "default"
456456
&& vscode.workspace.getConfiguration("workbench").get<any>("colorTheme") !== "Default High Contrast";
457457
}
458-
public get copilotHover(): string { return (vscode as any).lm ? this.getAsString("copilotHover") : "disabled"; }
458+
public get copilotHover(): string {
459+
if (!(vscode as any).lm) {
460+
return "disabled";
461+
}
462+
const val = super.Section.get<any>("copilotHover");
463+
if (val === undefined) {
464+
return "default";
465+
}
466+
return val as string;
467+
}
459468

460469
public get formattingEngine(): string { return this.getAsString("formatting"); }
461470
public get vcFormatIndentBraces(): boolean { return this.getAsBoolean("vcFormat.indent.braces"); }

0 commit comments

Comments
 (0)