Skip to content

docs: PR 1 Audit and Fix Broken/Outdated Code Examples in Documentation#1910

Merged
pilartomas merged 8 commits intomainfrom
DocsCodeExamples
Feb 5, 2026
Merged

docs: PR 1 Audit and Fix Broken/Outdated Code Examples in Documentation#1910
pilartomas merged 8 commits intomainfrom
DocsCodeExamples

Conversation

@sandijean90
Copy link
Contributor

@sandijean90 sandijean90 commented Jan 27, 2026

Summary

Quickstart code snippet audit and fix

Note: these changes will affect stable docs as they need to be reflected before the next release

Linked Issues

#1907
#1909
#1922
#1946
#1949

Documentation

This is documentation. This documentation will edit stable and development directly since they are urgent changes that can not wait until the next release.

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @sandijean90, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request focuses on enhancing the clarity and correctness of the quickstart documentation by revising a command-line example. The update ensures that users are provided with an accurate and functional snippet, improving their initial experience with the agentstack tool.

Highlights

  • Documentation Update: The agentstack run chat command example in the quickstart guides has been updated to use a more robust and illustrative phrase, "Hi, who are you", instead of "Hi!". This change aims to demonstrate proper escaping of special characters and prevent potential issues for users following the documentation.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@sandijean90 sandijean90 changed the title Fixed dquote> for not properly escaping special charater in quickstart Audit and Fix Broken/Outdated Code Examples in Documentation Jan 27, 2026
@sandijean90 sandijean90 added bug Something isn't working docs Improvements or additions to documentation labels Jan 27, 2026
Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the example command in the quickstart documentation, making it more descriptive. It also improves readability by aligning the comments in the code block. While this alignment is aesthetically pleasing, I've added a suggestion to consider using a single space for comments to improve long-term maintainability, though this is a stylistic choice.

Signed-off-by: Sandi Besen <[email protected]>
@sandijean90 sandijean90 changed the title Audit and Fix Broken/Outdated Code Examples in Documentation docs: Audit and Fix Broken/Outdated Code Examples in Documentation Jan 29, 2026
Signed-off-by: Sandi Besen <[email protected]>
Signed-off-by: Sandi Besen <[email protected]>
Comment on lines +49 to +58
yield AgentArtifact(
parts=[
TextPart(text="Here is the documentation you requested."),
FilePart(file=FileWithUri(
uri="https://example.com/report.pdf",
mime_type="application/pdf",
name="Report.pdf"
))
]
)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JanPokorny can you please ensure this is technically accurate and suggest changes if not

Copy link
Contributor Author

@sandijean90 sandijean90 Feb 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pilartomas Tagging you to review this code snippet so we can merge since Jan is out this week

@sandijean90 sandijean90 marked this pull request as ready for review February 3, 2026 15:07
@dosubot dosubot bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Feb 3, 2026
@sandijean90 sandijean90 changed the title docs: Audit and Fix Broken/Outdated Code Examples in Documentation docs: PR 1 Audit and Fix Broken/Outdated Code Examples in Documentation Feb 3, 2026
@sandijean90 sandijean90 moved this to PR in Review in Agent Stack Feb 3, 2026
Copy link
Contributor

@pilartomas pilartomas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

Comment on lines +13 to +19
| Type | Best For... | Key Benefit |
| :--- | :--- | :--- |
| **Simple Data** (`str`, `dict`) | Simple text or JSON | Automatic conversion |
| **AgentMessage** | Standard conversational responses | Auto-generates IDs and handles `TextPart` wrapping |
| **AgentArtifact** | Returning files, documents, or assets | Automatically wraps content into A2A `Part` objects |
| **A2A Components** | Advanced protocol-level control | Full control over `Role`, `UUID`, and `Part` lists |
| **TaskStatus** | Tracking stateful progress | Allows you to signal specific states like `input_required` |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is a good simplification. The reality is more complicated but that would be overwhelming imo. It should magically work for arbitrary yielded value anyway.

I'd maybe also add a note about resuming a yield with value (applies to input_required and auth_required statuses. E.g.

response = yield InputRequired(message=message)

The full scope is

RunYield: TypeAlias = (
    Message  # includes AgentMessage (subclass)
    | Part
    | TaskStatus  # includes InputRequired and AuthRequired (subclasses)
    | Artifact
    | TextPart
    | FilePart
    | FileWithBytes
    | FileWithUri
    | Metadata
    | DataPart
    | TaskStatusUpdateEvent
    | TaskArtifactUpdateEvent
    | str
    | JsonDict
    | Exception
)
RunYieldResume: TypeAlias = Message | None

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Feb 4, 2026
Copy link
Contributor

@pilartomas pilartomas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The checks are failing because you've made changes into docs/stable subdir. Please move them to docs/development. They will be moved automatically to stable during release.

@dosubot dosubot bot removed the lgtm This PR has been approved by a maintainer label Feb 4, 2026
@sandijean90
Copy link
Contributor Author

@pilartomas FYI these changes should be made to stable as well as dev as they need to be reflected immediately prior to the release of the Deep Learning course next week.

@tomkis
Copy link
Collaborator

tomkis commented Feb 5, 2026

@tomkis are we going to release before that happens? ☝️

Yep, we are planning releasing today.

So lets just make sure this is merged.

@pilartomas
Copy link
Contributor

pilartomas commented Feb 5, 2026

@tomkis are we going to release before that happens? ☝️

@pilartomas pilartomas merged commit e0d7968 into main Feb 5, 2026
7 of 12 checks passed
@pilartomas pilartomas deleted the DocsCodeExamples branch February 5, 2026 07:28
@github-project-automation github-project-automation bot moved this from PR in Review to Done in Agent Stack Feb 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working docs Improvements or additions to documentation size:L This PR changes 100-499 lines, ignoring generated files.

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants