You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
let agent_msg_id_set: std::collections::HashSet<RecordId> =
944
949
agent_msg_ids.into_iter().collect();
@@ -1046,7 +1051,7 @@ impl AgentHandle {
1046
1051
1047
1052
// Query the agent_messages relation table directly
1048
1053
let sql = format!(
1049
-
"SELECT position, batch, sequence_num, ->(msg{}) AS messages FROM agent_messages WHERE (in = agent:{} AND out IS NOT NULL) ORDER BY batch NUMERIC DESC, sequence_num NUMERIC DESC, position NUMERIC DESC LIMIT $limit FETCH messages",
1054
+
"SELECT position, batch, sequence_num, message_type, ->(msg{}) AS messages FROM agent_messages WHERE (in = agent:{} AND message_type = 'archived' AND out IS NOT NULL) ORDER BY batch NUMERIC DESC, sequence_num NUMERIC DESC, position NUMERIC DESC LIMIT $limit FETCH messages",
1050
1055
where_clause,
1051
1056
self.agent_id.to_key()
1052
1057
);
@@ -1194,7 +1199,7 @@ impl AgentHandle {
1194
1199
for agent in&agents {
1195
1200
let agent_id = crate::AgentId::from_record(agent.id.clone());
1196
1201
let agent_msg_sql = format!(
1197
-
"SELECT out FROM agent_messages WHERE in = {} AND out IS NOT NULL",
1202
+
"SELECT out FROM agent_messages WHERE in = {} AND out IS NOT NULL AND message_type = 'archived'",
0 commit comments