MCPcopy Index your code
hub / github.com/LeetCode-OpenSource/vscode-leetcode / promptHintMessage

Function promptHintMessage

src/utils/uiUtils.ts:61–73  ·  view source on GitHub ↗
(config: string, message: string, choiceConfirm: string, onConfirm: () => Promise<any>)

Source from the content-addressed store, hash-verified

59}
60
61export async function promptHintMessage(config: string, message: string, choiceConfirm: string, onConfirm: () => Promise<any>): Promise<void> {
62 if (getWorkspaceConfiguration().get<boolean>(config)) {
63 const choiceNoShowAgain: string = "Don't show again";
64 const choice: string | undefined = await vscode.window.showInformationMessage(
65 message, choiceConfirm, choiceNoShowAgain,
66 );
67 if (choice === choiceConfirm) {
68 await onConfirm();
69 } else if (choice === choiceNoShowAgain) {
70 await getWorkspaceConfiguration().update(config, false, true /* UserSetting */);
71 }
72 }
73}
74
75export async function openSettingsEditor(query?: string): Promise<void> {
76 await vscode.commands.executeCommand("workbench.action.openSettings", query);

Callers 3

showProblemInternalFunction · 0.90
showMarkdownConfigHintFunction · 0.90
showKeybindingsHintMethod · 0.90

Calls 1

Tested by

no test coverage detected