feat: Unified registry and major code cleanup by ChatGPT5
- Unified Box Registry: Replaced 600+ line match statement with clean factory pattern - Code cleanup: Removed unused imports, variables, and dead code - Import fixes: Fixed RangeBox, NullBox, MapBox imports - Transport Debug: Added Debug trait implementation for Transport interface - WASM build: Successfully tested with wasm_playground preset ready for integration - Performance: Build time stable, WASM package generated successfully (1.89MB) This commit represents a major architectural improvement with the unified registry system now fully operational, reducing code duplication and improving maintainability. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@ -24,6 +24,17 @@ pub struct InProcessTransport {
|
||||
receive_callback: Arc<Mutex<Option<Box<dyn Fn(IntentEnvelope) + Send + Sync>>>>,
|
||||
}
|
||||
|
||||
impl std::fmt::Debug for InProcessTransport {
|
||||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||
f.debug_struct("InProcessTransport")
|
||||
.field("node_id", &self.node_id)
|
||||
.field("bus", &"MessageBus")
|
||||
.field("endpoint", &"BusEndpoint")
|
||||
.field("receive_callback", &"<callback>")
|
||||
.finish()
|
||||
}
|
||||
}
|
||||
|
||||
impl InProcessTransport {
|
||||
/// 新しいInProcessTransportを作成
|
||||
pub fn new(node_id: String) -> Self {
|
||||
|
||||
@ -34,7 +34,7 @@ pub enum TransportError {
|
||||
}
|
||||
|
||||
/// Abstract transport trait for different communication methods
|
||||
pub trait Transport: Send + Sync {
|
||||
pub trait Transport: Send + Sync + std::fmt::Debug {
|
||||
/// Get the node ID of this transport
|
||||
fn node_id(&self) -> &str;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user