fix(antigravity): Buffer sequential thoughts and text tokens to prevent token-by-token streaming#157
Merged
Merged
Conversation
…nt token-by-token streaming
…sher helper functions
Collaborator
Author
|
Added #155 to address the latency we will see with the buffering. This change still needs to go through to avoid using the wrong content type. |
rakyll
approved these changes
Jun 22, 2026
| cd "${ROOT}" | ||
|
|
||
| # Add GOPATH/bin to PATH so that go-installed tools (like ko) can be found. | ||
| if command -v go >/dev/null 2>&1; then |
Member
There was a problem hiding this comment.
This should be in your bash profile, install-ax.sh isn't the right place for it.
This doesn't seem to the correct place.
Collaborator
Author
There was a problem hiding this comment.
These were from another branch that should I was testing. Now the PR is scoped correctly.
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
python/antigravity/harness_server.py) to buffer contiguous blocks of sequentialTextandThoughttokens. Consolidated tokens are yielded as a singleTextContentmessage when the contiguous block ends or when a different message type (like aToolCall) is received, adhering to the Interactions proto standard.harness_server.pyusing clean local helper functions (flush_text(),flush_thought()) to eliminate code duplication across boundary switches, tool calls, and loop flushes.Type of Change
Related Issues
Closes #146
Test Plan
python3 -m pytest python/antigravity/harness_server_test.py) and ran all Go unit tests (make test).ax-server, and ran client queries successfully, returning consolidated responses.Notes for Reviewer
TextContentenvelopes.