Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -272,12 +272,17 @@ export async function activate(context: vscode.ExtensionContext) {
)
}

// Watch for cloud.enabled setting changes
context.subscriptions.push(
vscode.workspace.onDidChangeConfiguration(async (e) => {
if (e.affectsConfiguration("fastapi.cloud.enabled")) {
const requiresReload =
e.affectsConfiguration("fastapi.cloud.enabled") ||
e.affectsConfiguration("fastapi.codeLens.enabled") ||
e.affectsConfiguration("fastapi.entryPoint") ||
e.affectsConfiguration("fastapi.telemetry.enabled")

if (requiresReload) {
const action = await vscode.window.showWarningMessage(
"FastAPI Cloud setting changed. Reload the window to apply changes.",
"FastAPI setting changed. Reload the window to apply changes.",
"Reload Window",
)
if (action === "Reload Window") {
Expand Down
Loading