vscode-window-messages
Skill1k starsChanged 26 days agoBSD-3-ClauseView on GitHub
Guidelines for using vscode.window.show*Message methods. Use when working with showInformationMessage, showWarningMessage, showErrorMessage.
Adopted by
Steady: 0 new projects took it in the last 4 weeks, none the 4 weeks before.thin data
Who's talking about forcedotcom/salesforcedx-vscode
- prettier/prettier-vscode“Couldn't resolve parser "json-stringify"”GitHub · Jun 5, 2018 · 23 reactions
- Stack Overflow“VSCode / Salesforce - Deploy Source to Org very slow to complete, although actual deployment is fast?”Stack Overflow · Jun 26, 2023 · 4 votes
- xixiaofinland/sf.nvim“Debugging functionality”GitHub · Oct 1, 2024 · 3 reactions
- EclipseFdn/open-vsx.org“Claiming namespace salesforce”GitHub · May 3, 2023 · 2 reactions
- forcedotcom/salesforcedx-apex“fix: set correct exit codes on failure”GitHub · Apr 23, 2021 · 2 reactions
The biggest 5 of 52 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 52
Talked about on GitHub and Stack Overflow (52 times).
On GitHub · 50
- Jun 5, 2018Couldn't resolve parser "json-stringify" — prettier/prettier-vscode23 reactions · 6 comments
- Oct 1, 2024Debugging functionality — xixiaofinland/sf.nvim3 reactions · 14 comments
- May 3, 2023Claiming namespace salesforce — EclipseFdn/open-vsx.org2 reactions · 21 comments
- Apr 23, 2021fix: set correct exit codes on failure — forcedotcom/salesforcedx-apex2 reactions
- Sep 11, 2024E2E tests fail in VSCode version 1.93.0 with "target window already closed" when running "Developer: Reload Window" — webdriverio-community/wdio-vscode-service1 reaction · 11 comments
45 more on GitHub
- Sep 30, 2020Trigger completions on specific characters — forcedotcom/lightning-language-server1 reaction · 2 comments
- Jun 25, 2019Source commands do not display error information — forcedotcom/cli1 reaction · 34 comments
- Aug 27, 2018Inform extensions that call 'vscode.openFolder' with file URIs created with URI.parse — microsoft/vscode1 reaction
- Aug 3, 2017Show externalised strings in extension editor contributions tab — microsoft/vscode1 reaction · 8 comments
- Nov 6, 2026build(deps-dev): bump the development-dependencies group across 1 directory with 5 updates — certinia/debug-log-analyzer0 reactions
- Nov 5, 2026claude-code-plugins.github.forcedotcom.salesforcedx-vscode: 68.8.0 → 68.10.0 — sudosubin/agents.nix0 reactions
- Nov 5, 2026build(deps-dev): bump the development-dependencies group across 1 directory with 4 updates — certinia/debug-log-analyzer0 reactions · 1 comment
- Nov 4, 2026agent-skills.github.forcedotcom.salesforcedx-vscode: 68.8.0 → 68.10.0 — sudosubin/agents.nix0 reactions
- Nov 4, 2026build(deps-dev): bump the development-dependencies group across 1 directory with 2 updates — certinia/debug-log-analyzer0 reactions · 1 comment
- Oct 29, 2026claude-code-plugins.github.forcedotcom.salesforcedx-vscode: 68.6.1 → 68.8.0 — sudosubin/agents.nix0 reactions
- Oct 29, 2026agent-skills.github.forcedotcom.salesforcedx-vscode: 68.6.1 → 68.8.0 — sudosubin/agents.nix0 reactions
- Oct 27, 2026agent-skills.github.forcedotcom.salesforcedx-vscode: 68.6.0 → 68.6.1 — sudosubin/agents.nix0 reactions
- Oct 27, 2026claude-code-plugins.github.forcedotcom.salesforcedx-vscode: 68.6.0 → 68.6.1 — sudosubin/agents.nix0 reactions
- Oct 27, 2026build(deps-dev): bump @salesforce/playwright-vscode-ext from 1.7.0 to 1.7.1 in the development-dependencies group across 1 directory — certinia/debug-log-analyzer0 reactions · 1 comment
- Oct 26, 2026build(deps-dev): bump @salesforce/playwright-vscode-ext from 1.7.0 to 1.7.1 in the development-dependencies group across 1 directory — certinia/debug-log-analyzer0 reactions · 2 comments
- Oct 22, 2026build(deps-dev): bump the development-dependencies group across 1 directory with 10 updates — certinia/debug-log-analyzer0 reactions · 1 comment
- Oct 21, 2026claude-code-plugins.github.forcedotcom.salesforcedx-vscode: 68.4.0 → 68.6.0 — sudosubin/agents.nix0 reactions
- Oct 21, 2026agent-skills.github.forcedotcom.salesforcedx-vscode: 68.4.0 → 68.6.0 — sudosubin/agents.nix0 reactions
- Oct 21, 2026build(deps-dev): bump the development-dependencies group across 1 directory with 8 updates — certinia/debug-log-analyzer0 reactions · 1 comment
- Oct 19, 2026build(deps-dev): bump the development-dependencies group across 1 directory with 7 updates — certinia/debug-log-analyzer0 reactions · 1 comment
- Oct 16, 2026claude-code-plugins.github.forcedotcom.salesforcedx-vscode: 68.2.0 → 68.4.0 — sudosubin/agents.nix0 reactions
- Oct 16, 2026agent-skills.github.forcedotcom.salesforcedx-vscode: 68.2.0 → 68.4.0 — sudosubin/agents.nix0 reactions
- Oct 16, 2026build(deps-dev): bump @salesforce/vscode-services from 67.20.0 to 67.27.5 — forcedotcom/apex-language-support0 reactions · 2 comments
- Oct 16, 2026feat(git): replace isomorphic-git with Effect Git - W-22711959 — forcedotcom/source-tracking0 reactions · 3 comments
- Oct 16, 2026build(deps-dev): bump the development-dependencies group across 1 directory with 4 updates — certinia/debug-log-analyzer0 reactions · 1 comment
- Oct 14, 2026build(deps-dev): bump the development-dependencies group across 1 directory with 2 updates — certinia/debug-log-analyzer0 reactions · 1 comment
- Oct 14, 2026claude-code-plugins.github.forcedotcom.salesforcedx-vscode: 67.26.0 → 68.2.0 — sudosubin/agents.nix0 reactions
- Oct 13, 2026agent-skills.github.forcedotcom.salesforcedx-vscode: 67.26.0 → 68.2.0 — sudosubin/agents.nix0 reactions
- Oct 12, 2026build(deps-dev): bump @salesforce/vscode-services from 67.26.0 to 67.27.1 in the development-dependencies group — certinia/debug-log-analyzer0 reactions · 1 comment
- Oct 4, 2026claude-code-plugins.github.forcedotcom.salesforcedx-vscode: init at 67.26.0 — sudosubin/agents.nix0 reactions
- Oct 3, 2026agent-skills.github.forcedotcom.salesforcedx-vscode: 67.20.0 → 67.26.0 — sudosubin/agents.nix0 reactions
- Sep 27, 2026agent-skills.github.forcedotcom.salesforcedx-vscode: init at 67.20.0 — sudosubin/agents.nix0 reactions
- Sep 25, 2026build(deps-dev): bump @salesforce/vscode-services from 67.17.18 to 67.20.0 — forcedotcom/apex-language-support0 reactions · 1 comment
- Sep 24, 2026build(deps-dev): bump the development-dependencies group across 1 directory with 16 updates — certinia/debug-log-analyzer0 reactions
- Sep 18, 2026build(deps-dev): bump @salesforce/vscode-services from 67.15.0 to 67.17.4 — forcedotcom/apex-language-support0 reactions · 1 comment
- Sep 17, 2026build(deps-dev): bump the development-dependencies group across 1 directory with 14 updates — certinia/debug-log-analyzer0 reactions · 1 comment
- Sep 11, 2026build(deps-dev): bump the development-dependencies group across 1 directory with 9 updates — certinia/debug-log-analyzer0 reactions · 1 comment
- Aug 28, 2026build(deps-dev): bump @salesforce/vscode-services from 67.10.0 to 67.13.3 — forcedotcom/apex-language-support0 reactions
- Aug 24, 2026Use Org Metadata Catalog for find-missing-artifact org lookups - W-23971749 — forcedotcom/apex-language-support0 reactions · 3 comments
- Aug 21, 2026build(deps-dev): bump @salesforce/vscode-services from 67.7.1 to 67.10.0 — forcedotcom/apex-language-support0 reactions
- Aug 19, 2026feat: export stdValueSetRegistry.json from main index.ts to be called properly outside this repo - W-23802414 — forcedotcom/source-deploy-retrieve0 reactions
- Jul 31, 2026build(deps-dev): bump @salesforce/vscode-services from 67.6.0 to 67.7.1 — forcedotcom/apex-language-support0 reactions
- Jul 24, 2026build(deps): bump @salesforce/vscode-i18n from 66.7.1 to 66.8.0 — forcedotcom/apex-language-support0 reactions
- Jul 8, 2026Support new SFDX: Create OpenAPI Document from This Class (Beta) — RoseSilverSoftware/IlluminatedCloud0 reactions
- Jul 8, 2026Agentforce for Developers inline autocompletion not working (temporary Salesforce API regression) — RoseSilverSoftware/IlluminatedCloud0 reactions
On Stack Overflow · 2
In this repository46 other files it gives its agents.
- AGENTS.mdAGENTS.md
- .cursor/rules/doc-maintenance.mdcCursor rule
- .cursor/rules/verification.mdcCursor rule
- .cursor/rules/wireit.mdcCursor rule
- vscode-extension-launchSkill
- announce-prereleaseSkill
- backlog-groomingSkill
- changelogSkill
- command-uiSkill
- conciseSkill
- core-extension-apiSkill
- dependabot-alertsSkill
- drivable-vscodeSkill
- effect-best-practicesSkill
- external-consumersSkill
- feature-branchSkill
- grill-meSkill
- gus-cliSkill
- i18n-messagesSkill
- icons-srcSkill
- lit-componentsSkill
- lit-webview-architectureSkill
- lit-webview-testingSkill
- lsp-custom-requestsSkill
- merge-conflictsSkill
- packageJsonSkill
- patch-releaseSkill
- pathsSkill
- playwright-e2eSkill
- pr-draftSkill
- query-app-insightsSkill
- releaseSkill
- services-extension-consumptionSkill
- shipped-issuesSkill
- span-file-exportSkill
- thermo-nuclear-code-quality-reviewSkill
- ts1261-filename-casingSkill
- ts4023-effect-errorsSkill
- typescriptSkill
- verificationSkill
- vscode-elements-webviewsSkill
- web-console-local-tracesSkill
- wireitSkill
- work-item-sequencingSkill
- changelog-judgmentSkill
- manual-test-plan-judgmentSkill
The file
We split this skill into the rules it gives an agent
8 rules. About 0 are common, 1 is distinctive, and 7 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
7
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- could be automatic: a setting could enforce it
- Very specific: line 25
Use vscode.window.show*Message directly.
- Very specific: line 41
All message strings and button labels must use nls.localize().
- Very specific: line 65
Add key/value to i18n.ts in package
- Very specific: line 111
Use Effect.promise() to wait for user response.
- Very specific: line 133
Use Effect.sync() for non-blocking messages.
- Distinctive: line 255
No string literals as first argument
- Very specific: line 256
No template literals unless they contain nls.localize() calls
- Very specific: line 259
Run npm run lint before committing.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
VSCode Window Messages Best Practices
Quick Reference: Critical Rules
| Category | DO | DON'T |
| API | Direct vscode.window.show*Message | Legacy NotificationService |
| Messages | nls.localize('key', ...args) | String literals or template literals without nls |
| Return Values | Handle Thenable<string | undefined> or Thenable<MessageItem | undefined> | Ignore return values |
| Button Actions | Check return value for button clicks | Assume user always clicks |
| Button Actions | nls.localize | String literals or template literals without nls |
| Modal Options | { modal: true, detail: ... } for blocking dialogs | detail without modal: true (detail modal-only); explicit 'Cancel' buttons (VS Code adds one automatically) |
| Effect (wait) | Effect.promise() when response needed | Effect.promise() for fire-and-forget |
| Effect (no wait) | Effect.sync() for fire-and-forget | Effect.promise() when not waiting |
Use Direct vscode.window Calls
Use vscode.window.show*Message directly. Don't use legacy NotificationService in new code.
import * as vscode from 'vscode';
import { nls } from '../messages/messages';
// CORRECT
await vscode.window.showInformationMessage(nls.localize('retrieve_canceled'));
await vscode.window.showErrorMessage(nls.localize('retrieve_failed', String(error)));
// WRONG
await notificationService.showInformationMessage(nls.localize('retrieve_canceled'));Internationalization with nls.localize()
All message strings and button labels must use nls.localize(). Enforced by no-vscode-message-literals ESLint rule.
Button labels should use nls.localize() even for command titles. Importing package.nls.json directly strips locale context—only manifest %key% reads locale-specific JSON files. Use nls.localize() to preserve Japanese and other locales via i18n.ja.ts.
// CORRECT
await vscode.window.showInformationMessage(nls.localize('retrieve_canceled'));
await vscode.window.showErrorMessage(nls.localize('retrieve_failed', String(error)));
await vscode.window.showInformationMessage(`${nls.localize('prefix')} ${nls.localize('suffix')}`);
const answer = await vscode.window.showWarningMessage(
nls.localize('confirm_delete'),
nls.localize('yes_button'),
nls.localize('no_button')
);
// WRONG
await vscode.window.showInformationMessage('Operation successful');
await vscode.window.showInformationMessage(`Operation ${status} successful`);
await vscode.window.showWarningMessage(nls.localize('confirm_delete'), 'Yes', 'No');Adding new messages:
- Add key/value to
i18n.tsin package - Use
nls.localize('your_message_key', ...args)
Handling Return Values
Returns clicked button or undefined if dismissed.
Return types:
- String buttons:
Thenable<string | undefined> - MessageItem buttons:
Thenable<MessageItem | undefined>
// CORRECT - String buttons
const selection = await vscode.window.showWarningMessage(
nls.localize('unsaved_changes'),
nls.localize('save_button'),
nls.localize('discard_button')
);
if (selection === nls.localize('save_button')) {
await saveFile();
}
// CORRECT - MessageItem buttons
const item = await vscode.window.showWarningMessage(
nls.localize('unsaved_changes'),
{ modal: true },
{ title: nls.localize('save_button') },
{ title: nls.localize('discard_button') }
);
if (item?.title === nls.localize('save_button')) {
await saveFile();
}
// CORRECT - Fire and forget
void vscode.window.showInformationMessage(nls.localize('operation_completed'));
// WRONG
vscode.window.showInformationMessage(nls.localize('operation_completed')); // Missing voidIntegration with Effect
When User Response is Required
Use Effect.promise() to wait for user response. Blocks execution until user responds.
import { Effect } from 'effect';
// CORRECT - Wait for response
const selection =
yield *
Effect.promise(() =>
vscode.window.showWarningMessage(nls.localize('confirm_action'), nls.localize('yes'), nls.localize('no'))
);
if (selection === nls.localize('yes')) {
yield * performAction();
}
// CORRECT - Wait for error acknowledgment
yield * Effect.promise(() => vscode.window.showErrorMessage(nls.localize('critical_error')));When User Response is NOT Required (Fire-and-Forget)
Use Effect.sync() for non-blocking messages. Execution continues immediately.
import { Effect } from 'effect';
// CORRECT - Fire and forget
yield *
Effect.sync(() => {
void vscode.window.showInformationMessage(nls.localize('background_task_started'));
});
yield * performBackgroundTask();
// WRONG - Blocks unnecessarily
yield * Effect.promise(() => vscode.window.showInformationMessage(nls.localize('background_task_started')));
// WRONG - Direct call in Effect.gen
yield *
Effect.gen(function* () {
await vscode.window.showErrorMessage('Error'); // Type error
});Message Types
showInformationMessage: Success, info, non-criticalshowWarningMessage: Warnings, recoverable errors, user decisionsshowErrorMessage: Errors, failures, critical issues
await vscode.window.showInformationMessage(nls.localize('retrieve_completed'));
await vscode.window.showWarningMessage(nls.localize('unsaved_changes'));
await vscode.window.showErrorMessage(nls.localize('retrieve_failed', errorMessage));
// Modal with detail (detail only shown for modal)
await vscode.window.showWarningMessage(
nls.localize('destructive_action_warning'),
{ modal: true, detail: nls.localize('destructive_action_detail') },
nls.localize('confirm')
);Note: VS Code automatically adds a 'Cancel' button to modal dialogs. Do not add an explicit nls.localize('cancel_button') as an item when modal: true. Dismissing the dialog (via 'Cancel' or ESC) returns undefined.
MessageOptions and MessageItem
MessageOptions
modal?: boolean- System modal dialog, blocks interactiondetail?: string- Extra text (modal only)
Button Types
Strings or MessageItem objects:
// String buttons (prefer)
const result = await vscode.window.showWarningMessage(
nls.localize('confirm_action'),
nls.localize('yes'),
nls.localize('no')
);
// result: string | undefined
// MessageItem (for modal ESC handling)
const result = await vscode.window.showWarningMessage(
nls.localize('confirm_action'),
{ modal: true },
{ title: nls.localize('yes'), isCloseAffordance: false },
{ title: nls.localize('no'), isCloseAffordance: true }
);
// result: MessageItem | undefinedisCloseAffordance: true = button handles ESC. Modal-only. Modals auto-add Cancel; use this to control which custom button handles ESC.
Common Patterns
Conditional Messages
// Fire-and-forget
if (hasErrors) {
void vscode.window.showErrorMessage(nls.localize('operation_completed_with_errors'));
} else {
void vscode.window.showInformationMessage(nls.localize('operation_completed_successfully'));
}Error Toast with Action Buttons
Non-modal error toast whose buttons run an action (e.g. Open Report): use NotificationModeService.showErrorWithActions, not showErrorMessage(...).then(...). It returns without waiting for the click and shows an error if the action rejects (notification-mode-api).
yield* notificationMode.showErrorWithActions(nls.localize('operation_completed_with_errors'), [
{ label: nls.localize('open_report_button'), run: () => openReport(uri) }
]);User Confirmation (Requires Response)
import { Effect } from 'effect';
const confirm =
yield *
Effect.promise(() =>
vscode.window.showWarningMessage(
nls.localize('confirm_destructive_action'),
nls.localize('proceed_button')
)
);
if (confirm === nls.localize('proceed_button')) {
yield * performDestructiveAction();
}ESLint Rule
no-vscode-message-literals enforces:
- No string literals as first argument
- No template literals unless they contain
nls.localize()calls - Applies to
showInformationMessage,showWarningMessage,showErrorMessage
Run npm run lint before committing.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

