feat: show notification for devstar-home

This commit is contained in:
Levi Yan
2025-01-15 15:14:34 +08:00
parent 4f831a0d5b
commit 96f28a7424

View File

@@ -43,6 +43,24 @@ export default class DSHome {
const need_return = message.need_return
if (!need_return) {
// ================= don't need return ==============
// frequent
switch (message.command) {
// ----------------- frequent -----------------------
case 'showInformationNotification':
vscode.window.showInformationMessage(data.message);
break;
case 'showWarningNotification':
vscode.window.showWarningMessage(data.message)
break;
case 'showErrorNotification':
const selection = await vscode.window.showErrorMessage(data.message, 'Open Console', 'Report a problem',);
if (selection === 'Open Console') {
vscode.commands.executeCommand('workbench.action.toggleDevTools');
} else if (selection === 'Report a problem') {
vscode.commands.executeCommand('vscode.open', vscode.Uri.parse('https://gitee.com/SuperIDE/DevStar/issues'));
}
break;
}
} else {
// ================= need return ====================
switch (message.command) {