Feat(sdk, cli): 1998 extend form extension for settings#2032
Feat(sdk, cli): 1998 extend form extension for settings#2032jjeliga wants to merge 7 commits intoui/unify-settings-form-extsfrom
Conversation
Signed-off-by: Petr Bulánek <bulanek.petr@gmail.com>
Signed-off-by: Petr Bulánek <bulanek.petr@gmail.com>
Signed-off-by: Petr Bulánek <bulanek.petr@gmail.com>
Signed-off-by: Petr Bulánek <bulanek.petr@gmail.com>
Signed-off-by: Jan Jeliga <jeliga.jan@gmail.com>
…ettings Signed-off-by: Jan Jeliga <jeliga.jan@gmail.com>
Summary of ChangesHello @jjeliga, 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 refactors the agent settings mechanism by integrating it directly into the existing form extension. This change aims to provide a more unified and consistent approach for agents to define and interact with user-configurable options, whether they are initial forms or agent settings. It introduces new API constructs for settings under the form extension, deprecates the old standalone settings extension, and ensures backward compatibility for existing agents through updated CLI handling. Highlights
🧠 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. Changelog
Using Gemini Code AssistThe 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
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 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
|
There was a problem hiding this comment.
Code Review
This pull request refactors the agent settings to be part of the form extension, which is a good architectural improvement. It introduces a new API for settings while maintaining backward compatibility with the old one. The changes are well-structured, and the documentation and examples have been updated accordingly. I've identified one area of code duplication in the CLI command that could be refactored to improve maintainability.
| from agentstack_sdk.a2a.extensions.ui.settings import CheckboxGroupField as SettingsCheckboxGroupField | ||
| from agentstack_sdk.a2a.extensions.ui.settings import ( | ||
| CheckboxGroupFieldValue as SettingsCheckboxGroupFieldValue, | ||
| ) |
There was a problem hiding this comment.
I know these imports look weird, but that is the work of ruff. No-harm as it will be deleted soon
|
We switched to |
fc67cec to
8f868f2
Compare
Summary
Moving the settings extension under form.
Extending
FormServiceExtensionSpecto demand either form or settings or both.Extending
FormServiceExtensionServerto allow settings parsing.Allowing only
CheckboxGroupFieldandSingleSelectFieldto be used for settings to be aligned with the ui.Deprecating the old settings, but keeping them for now to allow compatibility with older agents.
Modifying cli
agent runcmd to be able to work with both the new and deprecated settings.Including examples using both old and new method.
Updated docs.
Linked Issues
Closes #1998
Documentation
If this PR adds new feature or changes existing. Make sure documentation is adjusted accordingly. If the docs is not needed, please explain why.