-
Notifications
You must be signed in to change notification settings - Fork 30
feat: implement useTamboStreamStatus hook with generation vs prop streaming distinction
#581
8000
h1>
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and
privacy statement. We’ll occasionally send you account related emails.
Already on GitHub?
Sign in
to your account
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…eaming distinction Add useTamboStreamStatus hook that exposes per-prop and global streaming status for tambo-ai components, properly distinguishing between generation streaming and component props streaming. Key features: - Global StreamStatus interface with isPending, isStreaming, isSuccess, isError flags - Per-prop PropStatus interface for individual prop streaming states - Boolean lifecycle following specification (Init → First token → Mid-stream → Done → Error) - Derivation rules: isPending (no generation + all props), isStreaming (generation OR any prop), isSuccess (complete + all props), isError (any error) - SSR guard that throws during SSR/SSG with clear error message - Proper distinction between generation streaming (GenerationStage.STREAMING_RESPONSE) and prop content streaming - Comprehensive error handling and propagation - Strong TypeScript generics for type safety - Reset logic when generation restarts - Full unit test coverage for all lifecycle phases and error cases Resolves #580 Co-authored-by: michael magan <michaelmagan@users.noreply.github.com>
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
assume that generationStage is at the thread level. once the component is finished streaming these status should stay fixed for that component. confirm 100% that is the case. |
Claude finished @michaelmagan's task —— View job Analyzing useTamboStreamStatus Hook Status PersistenceVerifying that component streaming status stays fixed after completion:
Analysis Results: ❌ Status Does NOT Stay FixedThe Answer: I cannot confirm 100% that status stays fixed for completed components. The current implementation resets component status when the thread-level Key Issues Found:
Current vs Expected Behavior:Current Implementation:
Your Requirement:
Recommendation:The hook needs modification to preserve component-level status independently of thread-level |
@claude fix by npm run format |
Claude finished @michaelmagan's task —— View job ✅ Prettier Formatting Issues FixedSuccessfully applied prettier formatting fixes to resolve Prettier Config Applied:
Completed Tasks:
Fixed Issues:
Commit: 095b1c6 - Format code with prettier The PR should now pass |
- Fix line length issues (80 character limit) - Add proper trailing commas - Improve JSDoc comment formatting - Ensure consistent spacing and indentation - Break long function parameters across lines 🤖 Generated with [Claude Code](https://claude.ai/code) Co-authored-by: michael magan <michaelmagan@users.noreply.github.com>
…fixed when generation completes.
…aming (#614) Co-authored-by: michael magan <magan@tambo.co> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Alec Flett <flett@tambo.co>
Add useTamboStreamStatus hook that exposes per-prop and global streaming status for tambo-ai components, properly distinguishing between generation streaming and component props streaming.
Key features:
Resolves #580
Generated with Claude Code