Scope google_genai snippet markers to the excerpted code - #346
Merged
Conversation
The docs page for the Google GenAI plugin pulled four of these snippets with `selectedLines` ranges that started partway into the file, so snipsync rendered each one with a leading `# ...` elision marker. The marker also sits at column 0, which zeroes out the common indent prefix and suppresses snipsync's dedenting, so the worker excerpts rendered indented as well. Move the SNIPSTART/SNIPEND markers to wrap exactly the code the page shows, so the page can drop `selectedLines` entirely: - tools/run_worker.py: the Worker construction with its activity - vertex_ai/run_worker.py: the vertexai=True client and plugin - mcp/run_worker.py: echo_session through the plugin registration - streaming/run_workflow.py: consume() through the Client.connect that installs the Pydantic data converter The streaming range was also wrong, not just offset: it began at a dangling `if` inside consume() and omitted the stream.subscribe() call that the surrounding prose describes. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
DABH
approved these changes
Aug 10, 2026
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.
The Google GenAI plugin page pulled four of these snippets with
selectedLinesranges that started partway into the file, so snipsync rendered each with a leading# ...elision marker. That marker sits at column 0, which zeroes out the common indent prefix and suppresses snipsync's dedenting, so the two worker excerpts rendered indented as well.This moves the
SNIPSTART/SNIPENDmarkers to wrap exactly the code the page shows, so the page can dropselectedLinesentirely:tools/run_worker.py— theWorkerconstruction with its activityvertex_ai/run_worker.py— thevertexai=Trueclient and pluginmcp/run_worker.py—echo_sessionthrough the plugin registrationstreaming/run_workflow.py—consume()through theClient.connectthat installs the Pydantic data converterThe streaming range was also wrong rather than just offset: it began at a dangling
ifinsideconsume()and omitted thestream.subscribe()call the surrounding prose describes.No runtime code changes — comment lines only.
uv run poe lint(ruff check, ruff format, mypy) passes.🤖 Generated with Claude Code