mirror of
https://github.com/Jerryplusy/crystelf-plugin.git
synced 2025-12-05 15:41:56 +00:00
🚀 feat(config): enable auto-update option for the crystelf-plugin in the configuration file.
🎉 feat(index): implement automatic update checks based on the config setting in the plugin initialization.
This commit is contained in:
parent
56d4ac06c4
commit
c82f3e9cb7
@ -97,6 +97,7 @@
|
|||||||
- [X] 自定义上下文长度
|
- [X] 自定义上下文长度
|
||||||
- [X] 记忆存储及搜索
|
- [X] 记忆存储及搜索
|
||||||
- [X] 自定义会话管理
|
- [X] 自定义会话管理
|
||||||
|
- [X] 支持获取引用消息,使用seq标记
|
||||||
- [ ] 支持调用更多工具
|
- [ ] 支持调用更多工具
|
||||||
- [ ] 获取引用消息
|
- [ ] 获取引用消息
|
||||||
- [ ] 适配多模态模型,查看图片等
|
- [ ] 适配多模态模型,查看图片等
|
||||||
@ -129,6 +130,8 @@
|
|||||||
{
|
{
|
||||||
"maxFeed": 10,//使用rss推送功能时,本地记录的最长长度,用于检测最新文章
|
"maxFeed": 10,//使用rss推送功能时,本地记录的最长长度,用于检测最新文章
|
||||||
//功能是否启用
|
//功能是否启用
|
||||||
|
"?autoUpdate": "是否自动更新插件",
|
||||||
|
"autoUpdate": true,
|
||||||
"poke": true,
|
"poke": true,
|
||||||
"60s": true,
|
"60s": true,
|
||||||
"fanqie": true,
|
"fanqie": true,
|
||||||
|
|||||||
@ -4,6 +4,8 @@
|
|||||||
"core": true,
|
"core": true,
|
||||||
"?maxFeed": "最长订阅",
|
"?maxFeed": "最长订阅",
|
||||||
"maxFeed": 10,
|
"maxFeed": 10,
|
||||||
|
"?autoUpdate": "是否自动更新插件",
|
||||||
|
"autoUpdate": true,
|
||||||
"poke": true,
|
"poke": true,
|
||||||
"60s": true,
|
"60s": true,
|
||||||
"fanqie": true,
|
"fanqie": true,
|
||||||
|
|||||||
10
index.js
10
index.js
@ -9,11 +9,17 @@ logger.info(
|
|||||||
chalk.rgb(134, 142, 204)(`crystelf-plugin ${Version.ver} 初始化~ by ${Version.author}`)
|
chalk.rgb(134, 142, 204)(`crystelf-plugin ${Version.ver} 初始化~ by ${Version.author}`)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
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) => {
|
updater.checkAndUpdate().catch((err) => {
|
||||||
logger.error(err);
|
logger.error(err);
|
||||||
});
|
});
|
||||||
|
}
|
||||||
await crystelfInit.CSH().then(logger.mark('[crystelf-plugin] crystelf-plugin 完成初始化'));
|
|
||||||
|
|
||||||
const appPath = Path.apps;
|
const appPath = Path.apps;
|
||||||
const jsFiles = await fc.readDirRecursive(appPath, 'js');
|
const jsFiles = await fc.readDirRecursive(appPath, 'js');
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user