MCPcopy Create free account
hub / github.com/abi/screenshot-to-code / stream_code

Function stream_code

backend/routes/generate_code.py:855–868  ·  view source on GitHub ↗

Handle WebSocket code generation requests using a pipeline pattern

(websocket: WebSocket)

Source from the content-addressed store, hash-verified

853
854@router.websocket("/generate-code")
855async 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)

Callers

nothing calls this directly

Calls 9

useMethod · 0.95
executeMethod · 0.95
PipelineClass · 0.85

Tested by

no test coverage detected