command hygiene

This commit is contained in:
2026-02-08 12:21:15 +01:00
parent acbcc57402
commit a4b07f4fd2
3 changed files with 37 additions and 1 deletions
+4
View File
@@ -53,6 +53,8 @@ export async function startRun(
.padStart(2, "0")}`;
}, 50),
};
await vscode.commands.executeCommand("setContext", "devrun.runActive", true);
}
export async function stopRun() {
@@ -60,4 +62,6 @@ export async function stopRun() {
clearTimeout(currentRun.interval);
currentRun = null;
}
await vscode.commands.executeCommand("setContext", "devrun.runActive", false);
}
+12
View File
@@ -52,6 +52,12 @@ export async function startServer(statusBarItem: vscode.StatusBarItem) {
server = app.listen(63780, "127.0.0.1", () => {
setTimeout(() => (statusBarItem.text = "$(clock) No active run"), 500);
});
await vscode.commands.executeCommand(
"setContext",
"devrun.serverActive",
true,
);
}
export async function stopServer(statusBarItem: vscode.StatusBarItem) {
@@ -67,4 +73,10 @@ export async function stopServer(statusBarItem: vscode.StatusBarItem) {
server = undefined;
setTimeout(() => (statusBarItem.text = "$(clock) No active run"), 500);
await vscode.commands.executeCommand(
"setContext",
"devrun.serverActive",
false,
);
}