Draft: feature: Add local file intermediary for network-resilient streaming#181
Draft: feature: Add local file intermediary for network-resilient streaming#181xiaocang wants to merge 5 commits intosugyan:mainfrom
Conversation
- Added functionality to load additional messages from streaming files based on session ID. - Merged non-duplicate streaming messages with existing conversation history. - Updated conversation metadata, including message count and end time. - Introduced a new utility function `getStreamingMessages` to retrieve messages from streaming files. This enhancement improves the conversation loading process by ensuring that the latest messages are included, providing a more comprehensive chat history.
|
Hi @xiaocang, thanks for working on this network resilience feature! I have a few questions about the use cases and scope: Could you help me understand the specific scenarios where this file-based streaming intermediary would be needed? If the network is unstable enough to require file-based resumption for the web UI streaming, wouldn't the underlying claude CLI command itself also struggle with network connectivity issues? This appears to be quite a large architectural change (1020+ lines) that touches many core components. I'm wondering if the expected use cases justify such an extensive modification. Could you share more details about the real-world scenarios you're trying to solve? Thanks! |
I connect to my computer's network on my phone and write code using the web version of claude code, then as soon as my phone locks up or my mobile network switches, the whole session is interrupted and I have to retype the commands again
I'm still developing on this branch and I'll try to minimize some more irrelevant changes |
Description
Implement local file-based streaming intermediary for network resilience
This architecture allows streaming to continue on server writing to local files
while client can disconnect/reconnect and resume reading from the same files,
providing true network resilience through file-based intermediary approach.
Type of Change
Please add the appropriate label(s) to this PR and check the relevant box(es):
bug- Bug fix (non-breaking change which fixes an issue)feature- New feature (non-breaking change which adds functionality)breaking- Breaking change (fix or feature that would cause existing functionality to not work as expected)documentation- Documentation updateperformance- Performance improvementrefactor- Code refactoringtest- Adding or updating testschore- Maintenance, dependencies, toolingChanges Made
Testing
make test)make format)make lint)make typecheck)make check)Checklist
Screenshots (if applicable)
Add screenshots to help explain your changes.
Additional Notes
Any additional information, dependencies, or context needed for reviewers.