Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

fix(edit): replace inline message deletion with shared helper

Steven Enamakela5307714b263
diff --git a/crates/openhuman-core/src/threads/ops/edit.rs b/crates/openhuman-core/src/threads/ops/edit.rs
index 6c6abcd7c1..59a96273ca 100644
--- a/crates/openhuman-core/src/threads/ops/edit.rs
+++ b/crates/openhuman-core/src/threads/ops/edit.rs
@@ -178,13 +178,7 @@ pub async fn regenerate(request: RegenerateRequest) -> Result<RpcOutcome<Value>,
.ok_or_else(|| ThreadsError::Message(format!("thread {thread_id} has no turn to regenerate")))?;
clear_dropped_turn_states(&dir, &thread_id, &cut_request_id).await;
- conversations::blocking::delete_messages_from(
- dir.clone(),
- thread_id.clone(),
- run_reply_message_id(&cut_request_id),
- )
- .await
- .map_err(|e| ThreadsError::from_thread_scoped_store_error(&thread_id, e))?;
+ super::delete_after(&thread_id, &run_reply_message_id(&cut_request_id)).await?;
crate::web_chat::invalidate_thread_sessions(&thread_id).await;