Skip to content

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

refactor(core): update rpc models and remove old test

Steven Enamakel004e1ae57d48
diff --git a/crates/openhuman-core/src/threads/rpc_models.rs b/crates/openhuman-core/src/threads/rpc_models.rs
index 3f05de8cde..82bdb731b7 100644
--- a/crates/openhuman-core/src/threads/rpc_models.rs
+++ b/crates/openhuman-core/src/threads/rpc_models.rs
@@ -199,3 +199,7 @@ pub struct PurgeConversationThreadsResponse {
pub agent_threads_deleted: usize,
pub agent_messages_deleted: usize,
}
+
+#[cfg(test)]
+#[path = "rpc_models_tests.rs"]
+mod tests;
diff --git a/crates/openhuman-core/src/threads/rpc_models_tests.rs b/crates/openhuman-core/src/threads/rpc_models_tests.rs
new file mode 100644
index 0000000000..f1527d2e4d
--- /dev/null
+++ b/crates/openhuman-core/src/threads/rpc_models_tests.rs
@@ -0,0 +1,18 @@
+use super::*;
+
+#[test]
+fn queued_chat_ack_serializes_request_identity_and_opaque_refs() {
+ let ack = QueuedChatAck {
+ queued: true,
+ queue_mode: "followup".into(),
+ client_id: "client".into(),
+ thread_id: "thread".into(),
+ request_id: "request".into(),
+ queue_depth: 1,
+ queued_attachments: vec![],
+ };
+ let value = serde_json::to_value(ack).unwrap();
+ assert_eq!(value["request_id"], "request");
+ assert_eq!(value["queued_attachments"], serde_json::json!([]));
+ assert!(value.get("requestId").is_none());
+}
diff --git a/crates/openhuman-core/src/web_chat/types_tests.rs b/crates/openhuman-core/src/web_chat/types_tests.rs
index 139c3330f8..c5d584aec0 100644
--- a/crates/openhuman-core/src/web_chat/types_tests.rs
+++ b/crates/openhuman-core/src/web_chat/types_tests.rs
@@ -1,18 +1,2 @@
use super::*;
-#[test]
-fn queued_chat_ack_serializes_request_identity_and_sanitized_parts() {
- let ack = QueuedChatAck {
- queued: true,
- queue_mode: "followup".into(),
- client_id: "client".into(),
- thread_id: "thread".into(),
- request_id: "request".into(),
- queue_depth: 1,
- queued_attachments: vec![],
- };
- let value = serde_json::to_value(ack).unwrap();
- assert_eq!(value["request_id"], "request");
- assert_eq!(value["queued_attachments"], serde_json::json!([]));
- assert!(value.get("requestId").is_none());
-}