Repository navigation
Implement token-by-token streaming for topic and class AI descriptions - #114
Open
claude[bot] wants to merge 1 commit into
Open
claude[bot] wants to merge 1 commit into
claude[bot] wants to merge 1 commit into
Conversation
Implements #109 - Switch TopicDescriptionGenerationService to streaming LLM call using a plain-text prompt; publishes TOKEN_DELTA events for each token then STREAM_DONE on completion; falls back to structured JSON call for keywords and aiTitle - Create ClassDescriptionStreamEmitter and ClassDescriptionStreamService mirroring the existing topic stream infrastructure - Switch ClassDescriptionGenerationService to streaming with the same two-phase approach - Add SSE endpoint GET /api/classes/description/stream/{classId} to ClassesController - Fix TopicDescriptionStreamService.subscribe() to return STREAM_DONE immediately when aiDescription already exists (not just manualDescription) - Add streaming-system prompts to topics.yaml and classes.yaml for plain-text description generation - Fix TopicDetailPage stream trigger: subscribe on page load regardless of hasProcessingDocuments; add cleanup return to abort on unmount - Create useClassDescriptionStream hook mirroring useTopicDescriptionStream - Integrate class description streaming in ClassDetailPage; show streamedClassDescription while generating - Add per-topic description streaming in ClassDetailPage for topic preview cards; pass streamed descriptions through TopicList to TopicCard Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2 of 4 tasks
This branch has not been deployed
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.
Summary
TopicDescriptionGenerationServiceandClassDescriptionGenerationServiceto use a streaming LLM call (plain-text prompt) that publishesTOKEN_DELTAevents for each token, then a separate structured JSON call for keywords and AI titleClassDescriptionStreamEmitterandClassDescriptionStreamServicemirroring existing topic stream infrastructure; addGET /api/classes/description/stream/{classId}SSE endpoint toClassesControllerTopicDescriptionStreamService.subscribe()to returnSTREAM_DONEimmediately whenaiDescriptionalready exists (not just manualdescription), enabling safe on-load subscription withouthasProcessingDocumentsguardTopicDetailPagestream trigger to subscribe on page load regardless ofhasProcessingDocuments; add cleanup return to tear down streams on unmountuseClassDescriptionStreamhook; integrate class description streaming inClassDetailPageshowing tokens in the inline description fieldClassDetailPagefor topic preview cards; streamed descriptions flow throughTopicList→TopicCardIssue
Closes #109
Generated with Claude Code