Repository navigation
Suppress CLI draft while live ACP response is streaming (fix duplicate TUI/Qt streaming) - #2329
Merged
Merged
Conversation
…e TUI/Qt streaming)
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.
Root cause (IDEN-5: two live presentations of one in-progress reply)
When a thread connected over live ACP (Antigravity ACP via
ExternalTurnTranscriptSink.on_chunkevery 0.25s, or Pi viaTurnDraftPublication) streams assistant text:AgentMessageChunkstreams into a liveAgentResponse(Textual) /QtResponseBlock(Qt) viaLiveOutput.ExternalTranscript.draftfiresTranscriptDraftUpdate(DraftFold)->CanonicalSourcePublication.show_draft->Conversation.show_draft(src/toad/widgets/conversation.py:1028) /QtThreadView.show_draft(src/toad/qt/thread_view.py:256), mountingCliDraftright belowAgentResponseso the same reply streams twice in parallel untilExternalTranscript.finishclears the draft toNoDraft.Fix
LiveResponsePresentation(SnapshotPresentation)insrc/toad/commit_claims.py, inherited byAgentResponseandQtResponseBlock(whileQtThoughtBlockinheritsSnapshotPresentation, QtLiveBlockdirectly so thoughts never suppress assistant drafts).DraftCoverage/covers_live_draftinsrc/toad/client/committed_presentation.pyand suppressDraftFoldtoNoDraft()inCanonicalSourcePublication.show_draft(src/toad/transcript_publication.py:271) whenever a live response presentation is already inview.live_blocks.TurnPresentation.clear_draft+ResponseStream.claim_draft(src/toad/live_output.py) so opening a live response block clears anyCliDraftthat arrived milliseconds earlier.CliDraftreordering insideDraftPresentation.draft(src/toad/widgets/cli_draft.py) soNoDraftticks no longer churnmove_child.LiveResponsePresentationinlive_blocks, so theirCliDraftbehavior is unchanged.fragment_classesontoTranscriptHistory/QtTranscriptHistorysoPreparedPageCommit.captureworks overClosedHistory(fixingtest_closed_same_source_commit_acquires_complete_coverage), and fix the staleloaderassertion + missingrequire_commit()intests/textual/test_checkpoint_first_source.py.Verification
REL_IMPORTS=0,qt_inherit_ratchet: 0/0/0/0/0,shadow_check: 0,guarded_imports: 0.test_live_draft_suppression.py,test_checkpoint_first_source.py,test_shared_hook_sequences.py,test_deleted_rendering_names.py):45 passed in 10.05s, plustest_closed_same_source_commit_acquires_complete_coverage2 passed.