Handle WebSocket code generation requests using a pipeline pattern
(websocket: WebSocket)
| 853 | |
| 854 | @router.websocket("/generate-code") |
| 855 | async def stream_code(websocket: WebSocket): |
| 856 | """Handle WebSocket code generation requests using a pipeline pattern""" |
| 857 | pipeline = Pipeline() |
| 858 | |
| 859 | # Configure the pipeline |
| 860 | pipeline.use(WebSocketSetupMiddleware()) |
| 861 | pipeline.use(ParameterExtractionMiddleware()) |
| 862 | pipeline.use(StatusBroadcastMiddleware()) |
| 863 | pipeline.use(PromptCreationMiddleware()) |
| 864 | pipeline.use(CodeGenerationMiddleware()) |
| 865 | pipeline.use(PostProcessingMiddleware()) |
| 866 | |
| 867 | # Execute the pipeline |
| 868 | await pipeline.execute(websocket) |
nothing calls this directly
no test coverage detected