mirror of
https://github.com/swiftbar/SwiftBar.git
synced 2024-09-11 07:55:23 +03:00
fix(streamable): Append read stream buffer to ongoing response for long items (#372)
Process output is streamed into a buffer. By default this buffer fits 4k characters, which is too short for image data. With this change, if this block does not contain a stream separator, the complete block is appended to the in-progress content stored so far. Fixes #371.
This commit is contained in:
parent
569146d51d
commit
269a4107f1
@ -98,7 +98,7 @@ class StreamablePlugin: Plugin {
|
||||
self?.content = nil
|
||||
return
|
||||
}
|
||||
guard str.contains("\n") else {
|
||||
guard str.contains("\n") || !str.contains(streamSeparator) else {
|
||||
self?.streamInProgressContent.append(contentsOf: str)
|
||||
return
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user