From a653e57237cd35e4763192b3e9f466957ea3c4bd Mon Sep 17 00:00:00 2001 From: qa296 <3546639503@qq.com> Date: Fri, 7 Nov 2025 15:27:41 +0000 Subject: [PATCH] fix(plugin-generator): avoid duplicate rejection message on plugin generation cancel Previously, when rejecting a pending plugin generation, the system would sometimes send two messages for cancellation due to a redundant yield after processing. This resulted in confusing user experience and cluttered message output. This commit removes the unnecessary yield in the plugin generation rejection command, ensuring users only receive a single, accurate confirmation that plugin generation has stopped. No changes to business logic or API behavior were introduced, but the user-facing output is now cleaner and more consistent. --- main.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/main.py b/main.py index 72fbe57..44c5625 100644 --- a/main.py +++ b/main.py @@ -301,8 +301,7 @@ async def reject_generation(self, event: AstrMessageEvent): # 取消插件生成流程 try: - result = await self.plugin_generator.continue_plugin_generation(False, event=event) - yield event.plain_result("已完全停止插件生成") + await self.plugin_generator.continue_plugin_generation(False, event=event) except Exception as e: self.logger.error(f"拒绝插件生成过程中发生错误: {str(e)}") yield event.plain_result(f"停止插件生成失败:{str(e)}")