Fixed /run output to log

This commit is contained in:
Paul Gauthier 2023-05-28 11:20:08 -07:00
parent 67a1d7231c
commit 37e3e561f0
2 changed files with 7 additions and 4 deletions

View file

@ -227,14 +227,17 @@ class Commands:
except Exception as e:
self.io.tool_error(f"Error running command: {e}")
print(combined_output)
if self.io.confirm_ask("Add the output to the chat?", default="y"):
for line in combined_output.splitlines():
self.io.tool_output(line, log_only=True)
msg = prompts.run_output.format(
command=args,
output=combined_output,
)
self.io.tool_output(msg, log_only=False)
else:
print(combined_output)
return msg
def cmd_exit(self, args):
"Exit the application"

View file

@ -8,7 +8,7 @@ Take requests for changes to the supplied code.
If the request is ambiguous, ask questions.
Once you understand the request you MUST:
1. List the files you need to modify. If they are *read-only* you *MUST* ask the user to make them *read-write* using the file's full path name.
1. List the files you need to modify. Do not suggest changes to *read-only* files. You *MUST* ask the user to make them *read-write* using the file's full path name. End your reply and wait for their approval.
2. Think step-by-step and explain the needed changes.
3. Describe each change with an *edit block* per the example below.
"""