mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-28 08:14:59 +00:00
fix: Handle SwitchCoder exception in cmd_load
This commit is contained in:
parent
befe6be86c
commit
91c9b1bfe7
1 changed files with 6 additions and 2 deletions
|
@ -1309,8 +1309,12 @@ class Commands:
|
|||
continue
|
||||
|
||||
self.io.tool_output(f"\nExecuting: {cmd}")
|
||||
# catch switchcoder exception and print error that cmd is only supported with interactive /commands ai!
|
||||
self.run(cmd)
|
||||
try:
|
||||
self.run(cmd)
|
||||
except SwitchCoder:
|
||||
self.io.tool_error(
|
||||
f"Command '{cmd}' is only supported in interactive mode, skipping."
|
||||
)
|
||||
|
||||
def completions_raw_save(self, document, complete_event):
|
||||
return self.completions_raw_read_only(document, complete_event)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue