Skip to content

feat: titleFrame - send the generated title after stream.done (0.8.0) - #13

Merged
anilguleroglu merged 2 commits into
mainfrom
feat/title-after-done
Oct 15, 2026
Merged

anilguleroglu merged 2 commits into
mainfrom
feat/title-after-done

Conversation

@anilguleroglu

Copy link
Copy Markdown
Contributor

Summary

A chat's copy, feedback and other answer buttons appear only on stream.done. On a conversation's first message, finalizeTurn sent that frame only after the title model answered, so the answer sat finished on screen for a second or more (up to the title timeout) before its buttons showed.

  • titleFrame on a streamed message. With "titleFrame": true:
    • stream.done goes out as soon as the answer is stored, without a title.
    • The conversation is given back at that point, so a next message is not refused with conversation_busy, and the rateLimit slot is released.
    • The title is generated afterwards and sent on the same stream as a new stream.title frame ({ conversationId, title }), followed by the session.title event.
    • The stream closes after the title, or right after stream.done when no title is made.
  • Without the flag nothing changes: the title stays in stream.done, the JSON answer and the event order are as before.
  • ActiveRun.handBack() / sendLate() / afterRelease keep the starting connection open after the run is over. emit is closed by then, so nothing more goes into the run's log.
  • New export StreamTitleEvent. Swagger and the streaming / chat-experience guides are updated.
  • Version 0.8.0.

chat-ui (next PR) sends the flag when its callbacks take the title.

Test plan

  • npx vitest run: 1840 passed (memory, SQLite and Mongo providers; Postgres skipped locally).
  • New tests:
    • stream.done comes without a title while the title model is still blocked.
    • The conversation is idle and a second message is answered during that wait.
    • stream.title comes after stream.done, and the title is stored once with one session.title event.
    • Without the flag the title stays in the done frame.
    • With the flag but no title to make, the stream ends at stream.done.
  • npm run lint, npm run build
  • Local console portal (:3300) running this build.

🤖 Generated with Claude Code

https://claude.ai/code/session_017S1VJk5SuTVqr4dr2at3cH

anilguleroglu and others added 2 commits October 15, 2026 22:55
…done

A streamed message with titleFrame: true no longer waits for the title model
before stream.done: the turn ends and the conversation is given back as soon as
the answer is stored, and the title follows on the same stream as a
stream.title frame. Without the flag nothing changes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017S1VJk5SuTVqr4dr2at3cH
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017S1VJk5SuTVqr4dr2at3cH
@anilguleroglu
anilguleroglu requested a review from a team October 15, 2026 20:05
@anilguleroglu
anilguleroglu merged commit de36290 into main Oct 15, 2026
6 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.

1 participant