diff --git a/README.md b/README.md index 290c392..f3e6be9 100644 --- a/README.md +++ b/README.md @@ -97,6 +97,7 @@ - [X] 自定义上下文长度 - [X] 记忆存储及搜索 - [X] 自定义会话管理 +- [X] 支持获取引用消息,使用seq标记 - [ ] 支持调用更多工具 - [ ] 获取引用消息 - [ ] 适配多模态模型,查看图片等 @@ -129,6 +130,8 @@ { "maxFeed": 10,//使用rss推送功能时,本地记录的最长长度,用于检测最新文章 //功能是否启用 + "?autoUpdate": "是否自动更新插件", + "autoUpdate": true, "poke": true, "60s": true, "fanqie": true, diff --git a/config/config.json b/config/config.json index 1e8239e..ebbe6ab 100644 --- a/config/config.json +++ b/config/config.json @@ -4,6 +4,8 @@ "core": true, "?maxFeed": "最长订阅", "maxFeed": 10, + "?autoUpdate": "是否自动更新插件", + "autoUpdate": true, "poke": true, "60s": true, "fanqie": true, diff --git a/index.js b/index.js index 997b8bd..b96cf69 100644 --- a/index.js +++ b/index.js @@ -9,12 +9,18 @@ logger.info( chalk.rgb(134, 142, 204)(`crystelf-plugin ${Version.ver} 初始化~ by ${Version.author}`) ); -updater.checkAndUpdate().catch((err) => { - logger.error(err); -}); - await crystelfInit.CSH().then(logger.mark('[crystelf-plugin] crystelf-plugin 完成初始化')); +import ConfigControl from "./lib/config/configControl.js"; +const appConfig = await ConfigControl.get('config'); + +if(appConfig.autoUpdate) { + logger.info('[crystelf-plugin] 自动更新已启用,正在自动检查更新..'); + updater.checkAndUpdate().catch((err) => { + logger.error(err); + }); +} + const appPath = Path.apps; const jsFiles = await fc.readDirRecursive(appPath, 'js');