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

Method process

backend/routes/generate_code.py:693–704  ·  view source on GitHub ↗
(
        self, context: PipelineContext, next_func: Callable[[], Awaitable[None]]
    )

Source from the content-addressed store, hash-verified

691 """Handles WebSocket setup and teardown"""
692
693 async def process(
694 self, context: PipelineContext, next_func: Callable[[], Awaitable[None]]
695 ) -> None:
696 # Create and setup WebSocket communicator
697 context.ws_comm = WebSocketCommunicator(context.websocket)
698 await context.ws_comm.accept()
699
700 try:
701 await next_func()
702 finally:
703 # Always close the WebSocket
704 await context.ws_comm.close()
705
706
707class ParameterExtractionMiddleware(Middleware):

Callers

nothing calls this directly

Calls 4

next_funcFunction · 0.85
acceptMethod · 0.80
closeMethod · 0.45

Tested by

no test coverage detected