Fix: fix double response bug in the code

ISSUES FIXED: #4
This commit is contained in:
2025-10-01 19:54:25 +05:30
parent 201ee39ebe
commit 2fa50b55c6
+4 -15
View File
@@ -633,21 +633,10 @@ class ReactiveCleverAgentsApp:
self.stream_router.split_stream(source, targets)
self.logger.debug(f"Split stream {source} into {list(targets.keys())}")
# Re-setup subscriptions after all merges/splits to ensure proper connections
# Only check routes
all_stream_names = set()
# Add stream routes
for route_name, route_config in self.config.routes.items():
if route_config.type == RouteType.STREAM:
all_stream_names.add(route_name)
# Re-setup subscriptions
for stream_name in all_stream_names:
if stream_name in self.stream_router.stream_configs:
self.stream_router._setup_subscriptions(
self.stream_router.stream_configs[stream_name]
)
# NOTE: Subscriptions are already set up in create_stream()
# Re-setting them here would create duplicates, causing double output
# Merge and split operations automatically handle stream connections
self.logger.debug("Stream operations setup completed - subscriptions already configured")
# Removed _setup_langgraphs - use routes instead