mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-31 01:35:00 +00:00
style: Improve code formatting and readability
This commit is contained in:
parent
f95c4626cf
commit
114fb2a889
1 changed files with 8 additions and 2 deletions
|
@ -1172,11 +1172,17 @@ class Commands:
|
|||
|
||||
try:
|
||||
pyperclip.copy(last_assistant_message)
|
||||
preview = last_assistant_message[:50] + "..." if len(last_assistant_message) > 50 else last_assistant_message
|
||||
preview = (
|
||||
last_assistant_message[:50] + "..."
|
||||
if len(last_assistant_message) > 50
|
||||
else last_assistant_message
|
||||
)
|
||||
self.io.tool_output(f"Copied last assistant message to clipboard. Preview: {preview}")
|
||||
except pyperclip.PyperclipException as e:
|
||||
self.io.tool_error(f"Failed to copy to clipboard: {str(e)}")
|
||||
self.io.tool_output("You may need to install xclip or xsel on Linux, or pbcopy on macOS.")
|
||||
self.io.tool_output(
|
||||
"You may need to install xclip or xsel on Linux, or pbcopy on macOS."
|
||||
)
|
||||
except Exception as e:
|
||||
self.io.tool_error(f"An unexpected error occurred while copying to clipboard: {str(e)}")
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue