feat: 添加后端服务地址自定义配置功能
- 在设置面板添加后端服务地址配置项 - 支持保存、加载和重置自定义配置 - 配置持久化存储,重启后保留 - 添加 SSE 请求日志用于验证配置
This commit is contained in:
@ -9,10 +9,19 @@ import { isTokenExpired } from "./utils/jwtUtils";
|
||||
import { NotificationService } from "./services/notificationService";
|
||||
import { InvitationService } from "./services/invitationService";
|
||||
import { ICCoderCodeActionProvider } from "./providers/codeActionProvider";
|
||||
import { setCustomConfig } from "./config/settings";
|
||||
|
||||
export async function activate(context: vscode.ExtensionContext) {
|
||||
console.log("🎉 IC Coder 插件已激活!");
|
||||
|
||||
// 加载保存的配置
|
||||
const savedSettings = context.globalState.get('generalSettings') as any;
|
||||
if (savedSettings?.backendUrl) {
|
||||
setCustomConfig({
|
||||
backendUrl: savedSettings.backendUrl,
|
||||
});
|
||||
}
|
||||
|
||||
// 创建装饰类型(代码旁边的提示)
|
||||
const decorationType = vscode.window.createTextEditorDecorationType({
|
||||
after: {
|
||||
@ -83,7 +92,7 @@ export async function activate(context: vscode.ExtensionContext) {
|
||||
});
|
||||
|
||||
// 【已禁用】Authentication Provider 注册 - 无需登录
|
||||
// const authProvider = new ICCoderAuthenticationProvider(context);
|
||||
const authProvider = new ICCoderAuthenticationProvider(context);
|
||||
// context.subscriptions.push(
|
||||
// vscode.authentication.registerAuthenticationProvider(
|
||||
// "iccoder",
|
||||
|
||||
Reference in New Issue
Block a user