-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Visual and customization improvements #2858
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Visual and customization improvements #2858
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Summary of Changes
Hello @rtejada-g, 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 developer experience and providing more customization options within the ADK. The changes aim to improve the clarity and utility of the web UI, facilitate local development of the web interface, and offer greater control over how tools and artifacts are presented and managed within the system.
Highlights
- Custom Display Names for Tools and Artifacts: Introduced the ability to specify a
displayName
forFunctionTool
instances, improving readability in the web UI. ThisdisplayName
is also now used for artifact filenames, providing more context-aware names for frontend rendering. - Local Web UI Development Support: Added support for serving a local
adk-web
build via theADK_WEB_DIR
environment variable, streamlining development and testing workflows. - Enhanced Graph Visualization: Updated the agent graph visualization with a new gradient background for nodes and improved color schemes for borders, fonts, and edges, enhancing visual clarity and contrast.
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 in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command>
or @gemini-code-assist <command>
. Below is a summary of the supported commands.
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 issue 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
-
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. ↩
Response from ADK Triaging Agent Hello @rtejada-g, thank you for creating this PR! To help us review your contribution more effectively, could you please address the following points from our contribution guidelines?
You can find more details in our contribution guidelines. Thanks! |
There was a problem hiding this 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 introduces several valuable visual and customization improvements, enhancing the developer experience. The changes for graph visualization and allowing displayName
for tools are well-implemented. I've identified a significant breaking change in FunctionTool
where require_confirmation
functionality was removed, which will likely impact existing users and tests. Additionally, I've suggested a refactoring in agent_graph.py
to improve code clarity and reduce duplication. Addressing these points will further strengthen the quality of this contribution.
*, | ||
name: Optional[str] = None, | ||
description: Optional[str] = None, | ||
displayName: Optional[str] = None, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't want to change the core interface just for display purposes. We want the adk web to show the exact name so it's easier for developers to map what they see in the UI with the code.
BASE_DIR = Path(__file__).parent.resolve() | ||
ANGULAR_DIST_PATH = BASE_DIR / "browser" | ||
# Default to the pre-packaged UI, but allow overriding for local development. | ||
if adk_web_dir_override := os.environ.get("ADK_WEB_DIR"): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd like to stick to the command-line flag. When the CLI flag is not set adk web should use current folder.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A CLI flag is interesting but couldn't find one that's used to specify the web directory, can you tell me which one? the ADK_WEB_DIR env var is another option to support where developers want to build a customized version of the adk-web UI and need to serve it with the adk-web command for testing and demos.
dark_green = '#0F5223' | ||
light_green = '#69CB87' | ||
light_gray = '#cccccc' | ||
# Gradient with more contrast: Very Dark Blue/Slate to a Lighter Blue. Google Blue for edges. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you attach a screenshot?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Several dev experience improvements and customization options for the ADK.
Features
displayName
forFunctionTool
: Improves graph readability in the web UI by allowing a custom display name for tools.displayName
for artifact filenames, providing the frontend with context-aware names for rendering.ADK_WEB_DIR
: Allows serving a localadk-web
build via an environment variable for easier development and testing.Dependency
This PR is a prerequisite for the frontend changes in
adk-web
. Please see the corresponding PR: google/adk-web#111Resolves #2859