mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-30 09: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
|
continue
|
||||||
|
|
||||||
self.io.tool_output(f"\nExecuting: {cmd}")
|
self.io.tool_output(f"\nExecuting: {cmd}")
|
||||||
# catch switchcoder exception and print error that cmd is only supported with interactive /commands ai!
|
try:
|
||||||
self.run(cmd)
|
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):
|
def completions_raw_save(self, document, complete_event):
|
||||||
return self.completions_raw_read_only(document, complete_event)
|
return self.completions_raw_read_only(document, complete_event)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue