Skip to content

feat: add streaming summary with segmented SSE updates - #35

Merged
Luna1xiao merged 1 commit into
Luna1xiao:mainfrom
OrangerXu:OrangerXu/summary-stream
Jun 29, 2026
Merged

Luna1xiao merged 1 commit into
Luna1xiao:mainfrom
OrangerXu:OrangerXu/summary-stream

Conversation

@OrangerXu

Copy link
Copy Markdown

Summary

  • Add POST /agents/summary/stream SSE endpoint that emits incremental summary chunks (start/chunk/complete), mirroring the existing translation stream pattern.
  • Implement segmented summarization in SummaryAgent for direct, single_pass, and hierarchical strategies, with token streaming during merge/direct phases.
  • Update the UI to consume the stream and render summary text incrementally for better perceived responsiveness.

Test plan

  • pnpm -r typecheck
  • pnpm -r --if-present test (13 tests)
  • ruff check
  • pytest -m "not network" (168 tests)
  • Manual smoke test: start backend + UI, click Summary on a long article and verify text appears segment by segment

Made with Cursor

Mirror the translation stream pattern so summary text appears incrementally in the UI instead of blocking until completion.

Co-authored-by: Cursor <cursoragent@cursor.com>
@OrangerXu
OrangerXu requested a review from Luna1xiao as a code owner June 29, 2026 03:41
@Luna1xiao
Luna1xiao merged commit fb959be into Luna1xiao:main Jun 29, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants