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

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 from 8466547 to 0d3e257 Compare May 11, 2026 17:33
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 0d3e257 to 01672b4 Compare May 11, 2026 20:29
// For agent-mode responses (agent rounds/tool calls) we always force the view
// to scroll to the bottom so prompts that require user action (e.g. Continue,
// permission dialogs) are visible even if the user previously scrolled away.
if (value.getAgentRounds() != null && !value.getAgentRounds().isEmpty()) {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Is there any reason to force scroll to bottom always when new agent round comes? Even if the user scroll is up (when scroll bar is not at the bottom)?

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