Skip to content

feat: improve InputPrompt component functionality#6432

Closed
mohab-kamle wants to merge 1 commit into
google-gemini:mainfrom
mohab-kamle:fix/typing-during-response
Closed

feat: improve InputPrompt component functionality#6432
mohab-kamle wants to merge 1 commit into
google-gemini:mainfrom
mohab-kamle:fix/typing-during-response

Conversation

@mohab-kamle

Copy link
Copy Markdown

TLDR

Fixes a bug where the input box vanishes while the model is generating a response.
Now, the input box remains visible and active, allowing users to type concurrently.
This improves workflow by removing the strict stop-and-wait interaction.

Dive Deeper

Previously, the input component was being unmounted during response generation.
This PR ensures that the input remains rendered at all times and only disables submission, not typing, when the model is still responding.

This creates a smoother and more natural user experience:

  • Users can prepare follow-up questions while waiting.

  • No loss of thought flow due to missing input.

Reviewer Test Plan

Run the app and start a conversation with the model.

While the model is generating a long response, attempt to type in the input box.

Verify that the input field remains visible and accepts text.

Ensure pressing Enter still queues the message after the response completes.

Testing Matrix

           | 🍏 | 🪟 | 🐧

-- | -- | -- | --
npm run | ? | ✅ | ✅
npx | ? | ✅ | ✅
Docker | ? | ✅ | ✅
Podman | ? | - | -
Seatbelt | ? | - | -

Linked issues / bugs

Resolves #6424

@mohab-kamle mohab-kamle requested a review from a team as a code owner August 17, 2025 15:47

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Summary of Changes

Hello @mohab-kamle, 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 significantly enhances the user experience of the InputPrompt component by ensuring the input box remains visible and active even while the model is generating a response. Previously, the input box would disappear, interrupting the user's workflow. The update allows users to type concurrently, prepare follow-up questions, and maintain their thought flow without interruption. While typing is always enabled, message submission is intelligently disabled only when the model is actively streaming a response, preventing premature submissions and ensuring a smoother interaction.

Highlights

  • Input box visibility during response generation: The input box no longer vanishes when the model is generating a response; it remains visible and active, allowing users to type concurrently.
  • User interaction during streaming: Users can now type in the input box even while the model is streaming a response, improving workflow and enabling preparation of follow-up questions.
  • Input submission logic: Submission of new messages is now disabled only when the model is actively responding, preventing new submissions until the current response is complete, but allowing typing.
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

  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.

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

Copy link
Copy Markdown
Contributor

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 successfully addresses the issue of the input box disappearing during model response generation. The changes ensure the input prompt remains visible and usable for typing, improving the user experience. The logic to prevent submission while the model is responding is correctly implemented in the InputPrompt component. I have one suggestion to improve code clarity in App.tsx.

Comment thread packages/cli/src/ui/App.tsx
@abhipatel12

Copy link
Copy Markdown
Contributor

Hey thanks for the contribution. A PR fixing this is already being reviewed at #6049

@sripasg sripasg added the size/s A small PR label Jun 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/s A small PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Chat input box disappears while awaiting a response, preventing concurrent typing.

3 participants