Spaces:
Sleeping
Sleeping
Commit
·
c1a55aa
1
Parent(s):
6cb5907
Update: last_activity updates for all message interactions
Browse files- Updates last_activity for both user and assistant messages
- Updates for pipeline executions
- Does NOT update when viewing sessions or history
- Shows true last interaction time (any message activity)
- api_routes_v2.py +3 -3
api_routes_v2.py
CHANGED
|
@@ -596,7 +596,7 @@ def _add_and_mirror_message(chat_id: str, role: str, content: str, file_metadata
|
|
| 596 |
"""
|
| 597 |
V3 RULE: Append message to S3 conversation.
|
| 598 |
MongoDB metadata updated via _save_conversation_to_s3.
|
| 599 |
-
|
| 600 |
"""
|
| 601 |
# 1. Load existing
|
| 602 |
current_messages = _load_conversation_from_s3(chat_id)
|
|
@@ -620,8 +620,8 @@ def _add_and_mirror_message(chat_id: str, role: str, content: str, file_metadata
|
|
| 620 |
|
| 621 |
current_messages.append(new_msg)
|
| 622 |
|
| 623 |
-
# 3. Save to S3 -
|
| 624 |
-
_save_conversation_to_s3(chat_id, current_messages, update_activity=
|
| 625 |
|
| 626 |
# 4. Auto-generate chat name after first user message
|
| 627 |
if role == "user":
|
|
|
|
| 596 |
"""
|
| 597 |
V3 RULE: Append message to S3 conversation.
|
| 598 |
MongoDB metadata updated via _save_conversation_to_s3.
|
| 599 |
+
Updates last_activity for all messages (user and assistant interactions).
|
| 600 |
"""
|
| 601 |
# 1. Load existing
|
| 602 |
current_messages = _load_conversation_from_s3(chat_id)
|
|
|
|
| 620 |
|
| 621 |
current_messages.append(new_msg)
|
| 622 |
|
| 623 |
+
# 3. Save to S3 - update last_activity for all message interactions
|
| 624 |
+
_save_conversation_to_s3(chat_id, current_messages, update_activity=True)
|
| 625 |
|
| 626 |
# 4. Auto-generate chat name after first user message
|
| 627 |
if role == "user":
|