feat: support streamed reasoning summaries and working status - #22
Merged
Merged
Conversation
Reviewer's GuideReplaces the assistant’s blinking cursor with a lifecycle-safe working status row, and normalizes streamed reasoning summaries (OpenAI-compatible and Codex) across SSE chunks while preserving ordinary reasoning content and inline code formatting. Sequence diagram for streamed reasoning summary handlingsequenceDiagram
participant CodexResponsesProtocol
participant ReasoningSummaryStream
participant ModelStreamCallback
CodexResponsesProtocol->>ReasoningSummaryStream: startPart() on response.reasoning_summary_part.added
CodexResponsesProtocol->>ReasoningSummaryStream: append(delta) on response.reasoning_summary_text.delta
ReasoningSummaryStream-->>ModelStreamCallback: onReasoningDelta(normalized_text)
CodexResponsesProtocol->>ReasoningSummaryStream: flush() on response.reasoning_text.delta
CodexResponsesProtocol->>ModelStreamCallback: onReasoningDelta(delta)
CodexResponsesProtocol->>ReasoningSummaryStream: flush() on response.completed / output_item events
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey - I've left some high level feedback:
- OpenAiChatReasoningStrategy.matches() hard-codes model ID prefixes (gpt-5, o1/o3/o4); consider centralizing these in a shared configuration or capability check so new OpenAI reasoning-capable models don’t require code changes here.
- ReasoningSummaryStream and InlineEmphasisParser both inject the literal " | " separator; if this is part of user-visible text you may want to centralize or localize the separator to avoid inconsistencies across languages and future UI changes.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- OpenAiChatReasoningStrategy.matches() hard-codes model ID prefixes (gpt-5, o1/o3/o4); consider centralizing these in a shared configuration or capability check so new OpenAI reasoning-capable models don’t require code changes here.
- ReasoningSummaryStream and InlineEmphasisParser both inject the literal " | " separator; if this is part of user-visible text you may want to centralize or localize the separator to avoid inconsistencies across languages and future UI changes.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
15 tasks
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
Improve assistant streaming feedback and reasoning-summary compatibility without changing ordinary assistant text, tool-call, persistence, or conversation flows.
Type of change
Scope
Chat UI, OpenAI-compatible protocol, Codex Responses protocol, and reasoning-summary rendering.
Changes
WorkingStatusViewwith localized Working/Thinking labels, accessibility content descriptions, reduced-animation handling, and attach/detach-safe animator lifecycle.StreamingCursorViewinAssistantMessageView; show the status for the entire assistant stream and hide it on completion or compact rows.reasoning_effortfor GPT/o-series Chat Completions models.reasoning.summarypayloads and preserve summary identity across SSE chunks.|while preserving ordinaryreasoning_contentverbatim.update.md.Testing
./gradlew :app:testDebugUnitTestpasses./gradlew :app:lintDebugpasses./gradlew :app:assembleDebugbuilds./gradlew :app:assembleDebugUserCertbuildsManual verification covered Working/Thinking transitions, status dismissal after completion, multi-part reasoning-summary separators, normal answer rendering, and no lingering status animation after generation.
Additional regression coverage:
WorkingStatusViewTestOpenAiCompatibleProtocolTestCodexResponsesProtocolTestInlineEmphasisParserTestCompliance checklist
app/src/main/java(no Kotlin sources added)ChatMessagefieldsupdate.mdupdated for user-facing changesRisk / rollback
Risk is limited to streamed reasoning parsing and assistant streaming-status rendering. Ordinary assistant text, tool calls, stored message formats, database schema, and conversation/model execution flow are unchanged.
Rollback by reverting this PR to restore the previous blinking cursor and raw reasoning-summary concatenation.
Summary by Sourcery
Improve assistant streaming feedback and reasoning-summary compatibility across supported model protocols.
New Features:
Bug Fixes:
Documentation:
Tests:
Chores: