mirror of
https://github.com/Jerryplusy/crystelf-plugin.git
synced 2025-12-06 08:01:56 +00:00
🧹 refactor(userConfigManager): remove unnecessary logger import and logging for user config save action
This commit is contained in:
parent
bb6cfa8689
commit
71f956d418
@ -1,6 +1,5 @@
|
|||||||
import fs from 'fs/promises';
|
import fs from 'fs/promises';
|
||||||
import path from 'path';
|
import path from 'path';
|
||||||
import { logger } from '../../utils/log.js';
|
|
||||||
import ConfigControl from '../config/configControl.js';
|
import ConfigControl from '../config/configControl.js';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -68,8 +67,6 @@ class UserConfigManager {
|
|||||||
await fs.writeFile(userConfigPath, JSON.stringify(filteredConfig, null, 2));
|
await fs.writeFile(userConfigPath, JSON.stringify(filteredConfig, null, 2));
|
||||||
const mergedConfig = this.mergeConfigs(this.globalConfig, filteredConfig);
|
const mergedConfig = this.mergeConfigs(this.globalConfig, filteredConfig);
|
||||||
this.userConfigs.set(userId, mergedConfig);
|
this.userConfigs.set(userId, mergedConfig);
|
||||||
|
|
||||||
logger.info(`[crystelf-ai] 保存用户 ${userId} 的AI配置`);
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
logger.error(`[crystelf-ai] 保存用户 ${userId} 配置失败: ${error.message}`);
|
logger.error(`[crystelf-ai] 保存用户 ${userId} 配置失败: ${error.message}`);
|
||||||
throw error;
|
throw error;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user