merge rollout and indexed thread metadata

This commit is contained in:
anais
2026-06-15 14:09:46 -07:00
parent 6ffa0418b1
commit e9ce24859f
@@ -49,10 +49,17 @@ pub(super) async fn read_thread(
.await;
let mut thread = stored_thread_from_sqlite_metadata(store, metadata).await;
if !params.include_history || rollout_thread.is_some() {
if !params.include_history
&& let Some(mut rollout_thread) = rollout_thread
if let Some(mut rollout_thread) = rollout_thread
&& !rollout_thread.preview.is_empty()
{
if params.include_history {
if !thread.preview.is_empty() {
rollout_thread.preview = thread.preview;
}
if thread.first_user_message.is_some() {
rollout_thread.first_user_message = thread.first_user_message;
}
}
if thread.name.is_some() {
rollout_thread.name = thread.name;
}