From c03e31b7be40a7a1b5c2053116c7824b56cefba7 Mon Sep 17 00:00:00 2001 From: zhayujie Date: Mon, 25 Sep 2023 23:15:59 +0800 Subject: [PATCH] fix: linkai instruction bug --- plugins/linkai/linkai.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/plugins/linkai/linkai.py b/plugins/linkai/linkai.py index 03c6e85..4e53c94 100644 --- a/plugins/linkai/linkai.py +++ b/plugins/linkai/linkai.py @@ -160,6 +160,7 @@ class LinkAI(Plugin): # 保存插件配置 super().save_config(self.config) _set_reply_text(f"应用设置成功: {app_code}", e_context, level=ReplyType.INFO) + return if len(cmd) == 3 and cmd[1] == "sum" and (cmd[2] == "open" or cmd[2] == "close"): # 知识库开关指令 @@ -176,11 +177,12 @@ class LinkAI(Plugin): else: self.sum_config["enabled"] = is_open _set_reply_text(f"文章总结功能{tips_text}", e_context, level=ReplyType.INFO) - else: - _set_reply_text(f"指令错误,请输入{_get_trigger_prefix()}linkai help 获取帮助", e_context, - level=ReplyType.INFO) return + _set_reply_text(f"指令错误,请输入{_get_trigger_prefix()}linkai help 获取帮助", e_context, + level=ReplyType.INFO) + return + def _is_summary_open(self, context) -> bool: if not self.sum_config or not self.sum_config.get("enabled"): return False