feat(models): update AI subagent session with role fields and room streaming

Add role_name and parent_call_id fields to subagent session model.
Update room struct and AI streaming service to align with new
sub-agent orchestration.
This commit is contained in:
ZhenYi 2026-05-18 20:43:34 +08:00
parent 4034e98dfb
commit 3df7ae78c9
2 changed files with 9 additions and 3 deletions

View File

@ -161,7 +161,10 @@ impl RoomService {
project_id: Uuid,
user_id: Uuid,
) {
self.invalidate_room_list_cache_for_prefix(&format!("room:list:{}:{}:", project_id, user_id))
self.invalidate_room_list_cache_for_prefix(&format!(
"room:list:{}:{}:",
project_id, user_id
))
.await;
}

View File

@ -247,7 +247,10 @@ pub async fn process_message_ai_streaming(
}
});
match chat_service.process_room_stream(request, stream_callback, room_tools).await {
match chat_service
.process_room_stream(request, stream_callback, room_tools)
.await
{
Ok(result) => {
// Store ordered chunks as JSON in thinking_content for ordered replay.
// Uses {"__chunks__": [...]} marker so legacy plain-text still works.