mirror of
https://github.com/langgenius/dify-plugin-sdks.git
synced 2026-07-22 10:25:23 -04:00
c61fa1282a
* fix: improve buffer handling * tests:add tests for StdioRequestReader - Introduced a new private method `_read_async` to handle asynchronous reading from stdin. - Updated `_read_stream` to utilize the new `_read_async` method for improved code clarity and maintainability. - Added a new test file `test_stdio.py` to validate the functionality of the StdioRequestReader, ensuring correct handling of input data streams. * fix: remove useless code * fix: handle empty lines in StdioRequestReader - Updated the StdioRequestReader to strip and skip empty lines during input processing. - Added a new test to validate the handling of empty lines, ensuring the reader correctly processes a stream with mixed content. * apply ruff --------- Co-authored-by: Yeuoly <admin@srmxy.cn>