mirror of
https://github.com/FoundationAgents/MetaGPT.git
synced 2026-06-02 14:45:17 +02:00
fix
This commit is contained in:
parent
b36f34c144
commit
e6ae39da57
1 changed files with 1 additions and 2 deletions
|
|
@ -164,7 +164,6 @@ class CodeReview(Action):
|
|||
system_prompt = [CODE_REVIEW_COMFIRM_SYSTEM_PROMPT.format(code_language=code_language)]
|
||||
resp = await self.llm.aask(prompt, system_msgs=system_prompt)
|
||||
if "True" in resp or "true" in resp:
|
||||
cmt["code"] = get_code_block_from_patch(patch, code_start_line, code_end_line)
|
||||
new_comments.append(cmt)
|
||||
except Exception:
|
||||
logger.info("False")
|
||||
|
|
@ -209,6 +208,6 @@ class CodeReview(Action):
|
|||
comments = await self.confirm_comments(patch=patch, comments=comments, points=points)
|
||||
for comment in comments:
|
||||
if comment["code"]:
|
||||
if not (comment["code"].startswith("-") or comment["code"].isspace()):
|
||||
if not (comment["code"].isspace()):
|
||||
result.append(comment)
|
||||
return result
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue