in vscode-extension/src/logging.ts [117:138]
public async writeAndShowErrorWithActions(
message: string,
actions: { prompt: string; action: () => Promise<void> }[]): Promise<void> {
this.writeError(message);
const fullActions = [
...actions,
{ prompt: "Show Logs", action: async () => { this.showLogPanel(); } },
];
const actionKeys: string[] = fullActions.map((action) => action.prompt);
const choice = await vscode.window.showErrorMessage(message, ...actionKeys);
if (choice) {
for (const action of fullActions) {
if (choice === action.prompt) {
await action.action();
return;
}
}
}
}