From ad9b3df279972314ee2153d84e19d322fc4b871f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=BC=A8=E7=BC=A8?= Date: Mon, 23 Sep 2024 16:36:25 +0800 Subject: [PATCH] fix: tweak the issue prompt and fix discussion action (#404) * fix: tweak the issue propmt * fix: fix discussion --- server/agent/prompts/issue_helper.py | 2 +- server/event_handler/discussion.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/server/agent/prompts/issue_helper.py b/server/agent/prompts/issue_helper.py index 4a58710d..b3920f78 100644 --- a/server/agent/prompts/issue_helper.py +++ b/server/agent/prompts/issue_helper.py @@ -7,7 +7,7 @@ # Task - Analyze the user’s requirements. - Filter out this issue itself and search for issues similar to the issue description. -- If the found issue_number is the same as this issue_number, it means no similar issues were found, You don’t need to mention the issue again. +- If the found issue_number is the same as this issue_number: {issue_number}, it means no similar issues were found, You don’t need to mention the issue again. - Propose a code modification: - Locate the relevant file. - Retrieve its content and generate a *diff* showing the proposed changes. diff --git a/server/event_handler/discussion.py b/server/event_handler/discussion.py index 63ac4f5f..dc00a765 100644 --- a/server/event_handler/discussion.py +++ b/server/event_handler/discussion.py @@ -112,7 +112,7 @@ async def handle_discussion_event(self, action: str): async def execute(self): try: action = self.event["action"] - if action in ["opened", "reopened"]: + if action in ["opened", "created"]: await self.handle_discussion_event(action) return {"success": True} else: