Skip to content

Commit 43b7d50

Browse files
Show notification while SSR is in progress
Ideally we would (a) show progress and (b) allow cancellation, but at least now there's some indication to the user that something is happening.
1 parent ca31b1d commit 43b7d50

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

editors/code/src/commands.ts

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -171,9 +171,15 @@ export function ssr(ctx: Ctx): Cmd {
171171
const request = await vscode.window.showInputBox(options);
172172
if (!request) return;
173173

174-
const edit = await client.sendRequest(ra.ssr, { query: request, parseOnly: false });
175-
176-
await vscode.workspace.applyEdit(client.protocol2CodeConverter.asWorkspaceEdit(edit));
174+
vscode.window.withProgress({
175+
location: vscode.ProgressLocation.Notification,
176+
title: "Structured search replace in progress...",
177+
cancellable: false,
178+
}, async (_progress, _token) => {
179+
const edit = await client.sendRequest(ra.ssr, { query: request, parseOnly: false });
180+
181+
await vscode.workspace.applyEdit(client.protocol2CodeConverter.asWorkspaceEdit(edit));
182+
});
177183
};
178184
}
179185

0 commit comments

Comments
 (0)