Skip to content

Set typescript.native-preview.serverRunning=false on extension startup #998

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 30, 2025

Conversation

jakebailey
Copy link
Member

Disabling via the command restarts the extension host, leaving this context around. Clear it right on initialize back to false so it's always correct.

Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR ensures that the "typescript.native-preview.serverRunning" context is reset to false immediately on extension activation to avoid leaving an outdated context behind when restarting the extension host.

  • Added a call to reset the context flag during initialization.

@@ -6,6 +6,8 @@ import { setupStatusBar } from "./statusBar";
import { setupVersionStatusItem } from "./versionStatusItem";

export async function activate(context: vscode.ExtensionContext) {
await vscode.commands.executeCommand("setContext", "typescript.native-preview.serverRunning", false);
Copy link
Preview

Copilot AI May 30, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] Consider adding an inline comment explaining the rationale behind resetting the 'typescript.native-preview.serverRunning' context on activation to improve clarity for future maintenance.

Copilot uses AI. Check for mistakes.

@jakebailey jakebailey added this pull request to the merge queue May 30, 2025
Merged via the queue into main with commit dd11489 May 30, 2025
23 checks passed
@jakebailey jakebailey deleted the jabaile/clear-server-running-extension branch May 30, 2025 19:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants