prune_history
Method
This is a method of the Agent class in the agent module.Prune chat history to keep only the last N messages. Useful for cleaning up large history after image analysis sessions to prevent context window saturation.
Signature
Parameters
Number of recent messages to keep
Returns
Number of messages deleted

