refactor(chat_manager.py): add comment to clarify iteration direction in get_file_responses method

This commit is contained in:
Gabriel Almeida 2023-04-25 22:12:06 -03:00
commit d3b72f3958

View file

@ -124,7 +124,8 @@ class ChatManager:
history = self.chat_history.get_history(client_id, filter=False)
file_responses = []
if history:
for msg in history:
# Iterate backwards through the history
for msg in reversed(history):
if isinstance(msg, FileResponse):
file_responses.append(msg)
if msg.type == "start":