Skip to content

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

refactor(channels): drop debug-only test channel handle variant

Steven Enamakel19d998109de5
diff --git a/crates/openhuman-core/src/channels/runtime/startup.rs b/crates/openhuman-core/src/channels/runtime/startup.rs
index 6175e91acc..2fcefd20a9 100644
--- a/crates/openhuman-core/src/channels/runtime/startup.rs
+++ b/crates/openhuman-core/src/channels/runtime/startup.rs
@@ -25,8 +25,6 @@ pub(crate) type ChannelHandle = dyn tinychannels_runtime::Channel;
pub(crate) enum ChannelHandle {
Module(module_providers::ModuleChannel),
Relay(std::sync::Arc<crate::channels::providers::relay::RelayChannel>),
- #[cfg(debug_assertions)]
- Test(std::sync::Arc<dyn tinychannels_runtime::Channel>),
}
#[cfg(not(test))]
@@ -35,8 +33,6 @@ impl ChannelHandle {
match self {
Self::Module(channel) => &channel.name,
Self::Relay(channel) => channel.name(),
- #[cfg(debug_assertions)]
- Self::Test(channel) => channel.name(),
}
}
@@ -44,8 +40,6 @@ impl ChannelHandle {
match self {
Self::Module(channel) => channel.proactive_target(),
Self::Relay(_) => None,
- #[cfg(debug_assertions)]
- Self::Test(channel) => channel.proactive_target(),
}
}
@@ -53,8 +47,6 @@ impl ChannelHandle {
match self {
Self::Module(channel) => channel.capabilities(),
Self::Relay(_) => tinychannels_bus::ChannelCapabilities::unknown(),
- #[cfg(debug_assertions)]
- Self::Test(channel) => channel.capabilities(),
}
}
@@ -62,8 +54,6 @@ impl ChannelHandle {
match self {
Self::Module(channel) => channel.interaction.supports_reactions,
Self::Relay(_) => false,
- #[cfg(debug_assertions)]
- Self::Test(channel) => channel.supports_reactions(),
}
}
@@ -74,8 +64,6 @@ impl ChannelHandle {
match self {
Self::Module(channel) => channel.send_prepared(message).await,
Self::Relay(channel) => channel.send(message).await,
- #[cfg(debug_assertions)]
- Self::Test(channel) => channel.send(message).await,
}
}
@@ -94,8 +82,6 @@ impl ChannelHandle {
})
.await,
Self::Relay(_) => Ok(()),
- #[cfg(debug_assertions)]
- Self::Test(channel) => channel.start_typing(recipient).await,
}
}
@@ -107,8 +93,6 @@ impl ChannelHandle {
})
.await,
Self::Relay(_) => Ok(()),
- #[cfg(debug_assertions)]
- Self::Test(channel) => channel.stop_typing(recipient).await,
}
}
@@ -120,8 +104,6 @@ impl ChannelHandle {
match self {
Self::Module(channel) => channel.begin_typing_refresh(recipient, interval_secs).await,
Self::Relay(_) => Ok(None),
- #[cfg(debug_assertions)]
- Self::Test(channel) => channel.begin_typing_refresh(recipient, interval_secs).await,
}
}
@@ -129,8 +111,6 @@ impl ChannelHandle {
match self {
Self::Module(channel) => channel.end_typing_refresh(handle).await,
Self::Relay(_) => Ok(()),
- #[cfg(debug_assertions)]
- Self::Test(channel) => channel.end_typing_refresh(handle).await,
}
}
}