A personal assistant that lives on your desktop, remembers what matters, and can use your Mac for you.
TypeScript
fix(daemon): report readable bytes only while the app channel stream is open
Rowell Urbaez Reyes76f91f3990bc
diff --git a/packages/daemon/native/windows-app-channel-stream.cc b/packages/daemon/native/windows-app-channel-stream.ccindex 6df28d9..7392466 100644--- a/packages/daemon/native/windows-app-channel-stream.cc+++ b/packages/daemon/native/windows-app-channel-stream.cc@@ -237,8 +237,12 @@ size_t TakeStreamRead(Stream* s, void* destination, size_t capacity) noexcept {return count;}StreamStatus InspectStream(const Stream* s) noexcept {+ // Report only what TakeStreamRead can actually deliver: outside the open phase it+ // returns 0, so advertising readable bytes there promises data that a drain drops.+ const size_t readable =+ s->phase == StreamPhase::open ? s->read_size - s->read_offset : 0;return {s->phase, s->error, s->eof, s->read.pending || s->write.pending,- s->read_size - s->read_offset, s->queued_bytes, s->queued_items,+ readable, s->queued_bytes, s->queued_items,s->accepted, s->completed};}void StopStream(Stream* s, StopMode mode) noexcept {