Repository navigation
feat(chat): streaming replies with live tool status, retry button, same pipeline as the JSON endpoint - #228
Merged
Merged
Conversation
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…llback Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
|
Deployment failed for project okara-alternative with the following error: Learn More: https://vercel.com/kumar2421s-projects?upgradeToPro=build-rate-limit |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
New POST /api/chat/stream (SSE: status/delta/done/error, 10s keepalive, abort on disconnect, maxDuration 60); POST /api/chat JSON stays as the fallback. runAssistantTurnStream reuses runAssistantTurn via optional hooks (no forked pipeline): same candidate plan, fallback (blocked once a delta has streamed), entitlement check, charge-once-after-success; a client abort before a reply charges nothing. Plan-limit denials arrive as an in-stream error event with code chat_limit + used/limit/resetsAt/plan so the unlock panel fires exactly like the JSON path; the stream shares the 12/min per-user limiter with /api/chat and returns a JSON 429 before streaming. Real token streaming only where a driver supports it (no-tools path: any provider; Anthropic/Google context path); the tool path (OpenAI/Groq/Mistral/etc.) shows live tool-status chips then types the finished answer in ~24-char chunks (presentation only, documented). Client: streamChatMessage falls back to JSON only if the stream fails BEFORE the first byte; after that a broken stream is an error event (no silent re-run of a charged turn). Reducer actions stream_start/status/delta/done/retry; MessageBubble tool-status chip (role=status, aria-live polite, motion-reduce safe); 'Try again' button wired to the newest error bubble. 2031 tests pass. Not verified: Vercel SSE buffering and the 60s cap, a real browser, real provider drivers.
🤖 Generated with Claude Code