Skip to content

Commit 28662ab

Browse files
🔧 chore(extension): 移除配置验证并优化错误处理格式
- 删除扩展激活时的配置验证逻辑 - 调整错误提示参数的换行格式,提高可读性
1 parent 791cb75 commit 28662ab

File tree

1 file changed

+4
-10
lines changed

1 file changed

+4
-10
lines changed

src/extension.ts

+4-10
Original file line numberDiff line numberDiff line change
@@ -18,21 +18,15 @@ export function activate(context: vscode.ExtensionContext) {
1818
// 初始化配置管理器并添加到订阅列表
1919
context.subscriptions.push(ConfigurationManager.getInstance());
2020

21-
// 在扩展激活时验证配置
22-
ConfigurationManager.getInstance()
23-
.validateConfiguration()
24-
.then((isValid) => {
25-
if (!isValid) {
26-
console.log("Configuration validation failed");
27-
}
28-
});
29-
3021
// 注册所有命令
3122
registerCommands(context);
3223
} catch (e) {
3324
console.error("Error activating extension:", e);
3425
// 添加用户可见的错误提示
35-
NotificationHandler.error("extension.activation.failed", e instanceof Error ? e.message : String(e));
26+
NotificationHandler.error(
27+
"extension.activation.failed",
28+
e instanceof Error ? e.message : String(e)
29+
);
3630
throw e;
3731
}
3832
}

0 commit comments

Comments
 (0)