Skip to content

In Agent mode: Auto scroll to prompts like 'Continue'.#26

Open
raghucssit wants to merge 1 commit into
microsoft:mainfrom
raghucssit:auto_scroll_to_prompt
Open

In Agent mode: Auto scroll to prompts like 'Continue'.#26
raghucssit wants to merge 1 commit into
microsoft:mainfrom
raghucssit:auto_scroll_to_prompt

Conversation

@raghucssit
Copy link
Copy Markdown

User must be made aware some action is needed from them to continue the work by agent. Usually this happens when "Too many requests" or "Command line run prompt" etc.

see #120

Copilot AI review requested due to automatic review settings April 27, 2026 15:13
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR improves the Agent-mode chat UX by ensuring the chat view scrolls to the bottom when interactive prompts (e.g., “Continue”, tool confirmations, command-line prompts) appear, so users notice they need to take action.

Changes:

  • Force-scroll ChatContentViewer to bottom for Agent-mode (agent rounds) updates, regardless of prior manual scroll state.
  • Expose scrollToBottom() publicly and introduce forceScrollToBottom() with delayed follow-up scrolling to handle layout timing.
  • Trigger scrolling when tool confirmation dialogs are created/closed so newly revealed controls are visible.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 5 comments.

File Description
com.microsoft.copilot.eclipse.ui/src/com/microsoft/copilot/eclipse/ui/chat/InvokeToolConfirmationDialog.java Scrolls the chat viewer after Continue/Cancel actions so follow-up UI is visible.
com.microsoft.copilot.eclipse.ui/src/com/microsoft/copilot/eclipse/ui/chat/ChatContentViewer.java Adds forced scrolling behavior for agent rounds; makes scrolling APIs available to child widgets.
com.microsoft.copilot.eclipse.ui/src/com/microsoft/copilot/eclipse/ui/chat/BaseTurnWidget.java Scrolls the chat viewer to reveal newly created tool confirmation dialogs (prefer showControl).

@raghucssit raghucssit force-pushed the auto_scroll_to_prompt branch 2 times, most recently from affbd79 to 8466547 Compare May 7, 2026 14:55
@raghucssit
Copy link
Copy Markdown
Author

@jdneo I have fixed the copilot review comments..
Please check this PR.

@jdneo
Copy link
Copy Markdown
Member

jdneo commented May 9, 2026

@raghucssit Thank you. I left some comments.

@raghucssit raghucssit force-pushed the auto_scroll_to_prompt branch 2 times, most recently from 0d3e257 to 01672b4 Compare May 11, 2026 20:29
@iloveeclipse
Copy link
Copy Markdown

@microsoft microsoft deleted a comment from eclipse-proplus May 13, 2026
@raghucssit raghucssit force-pushed the auto_scroll_to_prompt branch from 01672b4 to 8afafa1 Compare June 3, 2026 22:30
User must be made aware some action is needed from them to continue the
work by agent. Usually this happens when "Too many requests" or "Command
line run prompt" etc.

see https://github.com/microsoft/copilot-eclipse-feedback/issues/184
@raghucssit raghucssit force-pushed the auto_scroll_to_prompt branch from 8afafa1 to a2565d4 Compare June 3, 2026 22:50
@raghucssit
Copy link
Copy Markdown
Author

I have fixed the problem without changing any existing behavior.
Also I have added a preference for user if they don't want to get notified about any prompt dialog, warning and error they can turn of this auto scroll functionality at preference page Window-->Preferences..-->GitHub Copilot-->General-->Automatically scroll to new confirmation dialogs/prompts in Chat View.

image

What is the fix ?
All these prompts in question are new widgets on scrolled composite. Whenever they are created we ask scrolled composite to show the newly created windget.

How to test ?
For prompts and warning dialog about too many tool request:

  1. Set Agent Max Requests to 2 at Windows-->Preferences..-->GitHub Copilot-->Chat
  2. Then use this prompt: I want to reproduce error "Oops, maximum tool attempts reached. You can type "continue" to proceed or rephrase your request." . please run in terminal for 10 seconds each for 3 times. after each command ran print/response some sample 30 lines.
  3. This will first ask you to run terminal tool so the prompt dialog appears. Now after first command is ran it prints some lines so cursor may be on top, or you have 10 seconds time you can scroll up and read something for second terminal tool run you will be scrolled down. Before third command runs you should get warning maxiumum tool attempts reached. Again you should be scrolled down to show this warning.

For Error Banner:
It is difficult to reproduce. But used some work around like below.

  1. You can launch eclipse run time normally and start doing any work in Chat View.
  2. Meanwhile go to command prompt and kill copilot agent.
    search the process: ps aux | grep -i "copilot-agent"
    kill the process: kill -9 <PID from above search>
  3. Now return to eclipse and initiate any request at prompt. You should get below dialog.
error_banner
  1. For better checking keep a break point at the beginning of com.microsoft.copilot.eclipse.ui.chat.ChatContentViewer.renderErrorMessage(String) and you can scroll to the top in the Chat View.

@raghucssit
Copy link
Copy Markdown
Author

@jdneo Apologize for the long delay, I was busy at something else.
I have fixed the issue without affecting any existing behavior and also added preference for people to turn off if they don't want.
Build has not run. Please trigger the build if there are any build issues I will fix them.
I have added detailed steps to test the new fix in the above comment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants