Skip to content

Commit

Permalink
Add drop and clear for moa
Browse files Browse the repository at this point in the history
  • Loading branch information
gembancud committed Dec 13, 2024
1 parent fe86266 commit b474127
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions aider/coders/mixture_of_architects_coder.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ def preproc_user_input(self, inp):
cmd = words[0].lower()
args = " ".join(words[1:])

if cmd in ["/drop", "/discuss", "/code"]:
if cmd in ["/drop", "/discuss", "/code", "/clear", "/reset"]:
cmd = cmd[1:] # strip the /
return self.handle_discussion_commands(cmd, args)

Expand All @@ -218,8 +218,22 @@ def handle_discussion_commands(self, cmd, args):
/drop <name> - Remove an architect from the discussion
/discuss <msg> - Start a new discussion round
/code <msg> - Move to implementation phase
/clear - Clear chat and discussion history
/reset - Drop files and clear all history
"""
if cmd == "drop":
if cmd == "clear":
self.discussion_messages = []
self.io.tool_output("Chat history and discussion history cleared.")
return
elif cmd == "reset":
self.abs_fnames = set()
self.abs_read_only_fnames = set()
self.discussion_messages = []
self.io.tool_output(
"All files dropped, chat history and discussion history cleared."
)
return
elif cmd == "drop":
nato_name = args.strip().lower()
for arch in self.architects:
if arch.name == nato_name:
Expand Down

0 comments on commit b474127

Please sign in to comment.