Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
AI-170: Added websocket_input and websocket_output components (#50)
* feat: AI-170: websocket input and output components (start) * Refactor HttpServerInputBase to work as a websocket input component * refactor: implement WebSocket input component using Flask-SocketIO * style: Format code and improve consistency in websocket_input.py * refactor: update WebSocket input to use send_message and improve invoke method * refactor: wrap WebSocket messages in events before enqueueing * feat: implement WebsocketOutput component for sending messages * refactor: implement WebSocket input/output with shared connection management * refactor: simplify WebSocket output component and improve error handling * style: replace f-strings with format directives in logging statements * feat: implement WebSocket connection tracking and improve message handling * refactor: replace f-strings with format directives in logging statements * chore: Remove unused comment about f-strings in logging * fix: replace self.socketio.sid with request.sid for correct session ID handling * More changes * feat: add HTML serving capability to WebsocketInput * refactor: Improve WebsocketInput class structure and remove unused import * refactor: simplify WebsocketInput component * fix: resolve HTML file path issues in WebsocketInput * refactor: implement event processing for WebSocket input * Add example for websocket * refactor: centralize event processing and error handling in ComponentBase * fix: update websocket.yaml to correctly pass payload and socket_id * style: enhance UI design and responsiveness of WebSocket example app * style: implement light/dark mode theme based on browser preference * fix: improve dark mode implementation and add smooth transitions * style: adjust input and button spacing in WebSocket example app * feat: add info icon with popup explanation to WebSocket example app * refactor: simplify WebSocket example app interface * More adjustments * style: reduce padding above top title and adjust container spacing * Remove unnecessary whitespace * Fix a few warnings * feat: add payload encoding and format to WebSocket components * refactor: reorganize imports and improve code formatting * refactor: simplify encode_payload function * refactor: use centralized payload encoding/decoding functions * Some additional cleanup * change the default payload encoding to 'none' so that strings will be sent * Fix warning * refactor: implement WebSocket base class and enhance output functionality * feat: import request object in websocket_input.py * refactor: move common config to base class and use deep copy * refactor: merge base_info into websocket component info structures * More refactoring to allow websocket_output to share some code * refactor: make WebsocketBase abstract and enforce listen_port requirement * refactor: remove listen_port validation in WebsocketBase * feat: implement threaded WebSocket server for output component * default the encoding to none * feat: enable WebSocket server debugging * Tweak the dynamic module loader to give better output if a dynamically loaded module fails due to it not being able to be loaded by it failing to load another module. Also turn off websocket debug logs * AI-170: Add new broker type: dev_broker (#51) * feat: implement DevBroker for development purposes * refactor: convert Solace message to dictionary in receive_message * refactor: align DevBroker with solace_messaging subscription handling * More changes * More tweaks * Last few issues * refactor: standardize use of 'queue_name' in dev_broker_messaging * Remove queue_id
- Loading branch information