Repository navigation
feat: wire up AskUserTool with dialog - #17411
Conversation
Summary of ChangesHello @jackwotherspoon, 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 introduces a significant enhancement to the CLI's interactive capabilities by implementing a user-facing dialog for the Highlights
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
The pull request effectively integrates the AskUserTool with the AskUserDialog UI component, establishing a clear communication flow via the message bus. The implementation correctly handles user input, navigation between questions, and cancellation, providing a robust and user-friendly experience. The use of React Context for managing dialog state and actions is well-applied, and the code adheres to good React practices. I did not identify any critical or high-severity issues in the changes.
|
Size Change: +40.6 kB (+0.17%) Total Size: 23.4 MB
ℹ️ View Unchanged
|
|
Tested this locally and it works really well, exciting 🎉 Ran """ it('should show ask user dialog when request is received', async () => {
// ... setup ...
act(() => {
config.getMessageBus().publish({
type: MessageBusType.ASK_USER_REQUEST,
questions: [...],
correlationId: 'test-id'
});
});
// ... assert dialog is visible ...
});""" |
| } | ||
|
|
||
| if (keyMatchers[Command.QUIT](key)) { | ||
| // Skip when ask_user dialog is open (use Esc to cancel instead) |
There was a problem hiding this comment.
Now that bubbling event listeners are in we should be able to do better here. The ask_user dialog should be capturing the QUIT key so it doesn't get bubbled up here rather than this sort of inverted control logic

Summary
AskUserToolto theAskUserDialogUI component via the message busAskUserActionsContextto manage dialog state and provide submit/cancel handlers to child componentsDialogManagerwith appropriate priority orderingCtrl+Cgracefully when the dialog is open (uses Esc to cancel instead)Details
The integration follows the existing message bus pattern used for tool confirmations:
AskUserToolpublishesASK_USER_REQUESTwith questions and a correlationIdAppContainersubscribes to requests and stores them inaskUserRequeststateDialogManagerrendersAskUserDialogwhen a request is presentASK_USER_RESPONSEwith answers and the matching correlationIdAskUserInvocation.execute()resolves its promise with formatted answersRelated Issues
Closes #17157
How to Validate
Ask a prompt like:
Pre-Merge Checklist