refactor: change token limit suggestions from tool_error to tool_output

This commit is contained in:
Paul Gauthier (aider) 2025-01-26 18:51:59 -08:00
parent ef84c4dfad
commit 546a662a30

View file

@ -1240,11 +1240,10 @@ class Coder:
f"\nInput tokens ({input_tokens:,}) exceeds model's"
f" {max_input_tokens:,} token limit!"
)
# turn these into tool_output ai!
self.io.tool_error("Try:")
self.io.tool_error("- Use /drop to remove unneeded files from the chat")
self.io.tool_error("- Use /clear to clear the chat history")
self.io.tool_error("- Break your code into smaller files")
self.io.tool_output("Try:")
self.io.tool_output("- Use /drop to remove unneeded files from the chat")
self.io.tool_output("- Use /clear to clear the chat history")
self.io.tool_output("- Break your code into smaller files")
# Special warning for Ollama models about context window size
if self.main_model.name.startswith(("ollama/", "ollama_chat/")):