Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Conversation

caarlos0
Copy link
Member

use OSC9 progress bar sequence:

CleanShot.2025-09-29.at.17.16.29.mp4

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
@caarlos0 caarlos0 self-assigned this Sep 29, 2025
@caarlos0 caarlos0 requested a review from a team as a code owner September 29, 2025 20:17
@caarlos0 caarlos0 requested review from kujtimiihoxha and tauraamui and removed request for a team September 29, 2025 20:17
internal/app/app.go Outdated Show resolved Hide resolved
internal/tui/tui.go Outdated Show resolved Hide resolved
@meowgorithm meowgorithm requested a review from Copilot September 29, 2025 21:17
Copy link
Contributor

@Copilot 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 implements a progress bar feature using OSC9 terminal escape sequences to provide visual feedback during AI agent operations. The implementation shows progress during long-running agent tasks in both interactive TUI and non-interactive CLI modes.

  • Adds OSC9 progress bar support using the ansi package
  • Integrates progress events into the agent lifecycle to show/hide progress bars
  • Updates dependencies to support the new progress bar functionality

Reviewed Changes

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

File Description
internal/tui/tui.go Handles progress bar events in TUI mode using OSC9 sequences
internal/llm/agent/agent.go Publishes progress events at agent start/completion
internal/app/app.go Shows progress bar in non-interactive CLI mode
go.mod Updates ansi package version for OSC9 support

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

internal/tui/tui.go Outdated Show resolved Hide resolved
internal/app/app.go Outdated Show resolved Hide resolved
internal/tui/tui.go Outdated Show resolved Hide resolved
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
@kujtimiihoxha
Copy link
Member

I am wondering if this becomes annoying when the agent is in the loop of changing things, it will be loading all the time 🤔

Copy link
Member

@andreynering andreynering left a comment

Choose a reason for hiding this comment

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

I have no idea why, but for me this is not working properly on Ghostty. Shows a small blue square but it doesn't move. Might be a Ghostty issue instead of Crush's, but mentioning still. And yes, I am on thwe latest Ghostty release.

Screen.Recording.2025-09-30.at.10.25.49.mov

@caarlos0
Copy link
Member Author

make sure you are in latest nightly build - it was broken for me a couple of build ago as well

@andreynering
Copy link
Member

You're right. This is fixed on nightly. And it looks good!

Screen.Recording.2025-09-30.at.10.37.48.mov

@meowgorithm
Copy link
Member

This is cool! I do think we should test it a bit more. Here's some initial testing on my end in Ghostty.

In this case it worked exactly as expected:

a.mov

In this case the progress stopped partway though:

b.mov

We should also test on Windows Terminal.

@KujTim, can you provide a recording illustrating what you mean about it being annoying?

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
@caarlos0
Copy link
Member Author

caarlos0 commented Sep 30, 2025

In this case the progress stopped partway though:

it seems that, if we don't change the progress bar state, ghostty will hide it after some timeout.

reproducible: run this and wait:

printf "\033]9;4;3;0;\007";

ref: ghostty-org/ghostty#8823 (comment)

@meowgorithm
Copy link
Member

it seems that, if we don't change the progress bar state, ghostty will hide it after some timeout.

That makes sense. I'll just QA in Windows Terminal, otherwise this looks good.

Copy link
Member

@kujtimiihoxha kujtimiihoxha left a comment

Choose a reason for hiding this comment

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

@meowgorithm my comment was more of a question rather than anything else so I am ok with this getting merged.

@meowgorithm
Copy link
Member

WORKS GREAT ON WINDOWS TERMINAL!

@caarlos0 caarlos0 merged commit d0724b1 into main Oct 1, 2025
17 checks passed
@caarlos0 caarlos0 deleted the progress branch October 1, 2025 18:15
BumpyClock added a commit to BumpyClock/crush that referenced this pull request Oct 9, 2025
Merged 20 upstream commits while preserving:
- OAuth authentication for Claude Max/Pro (claudesub provider)
- OAuth authentication for GitHub Copilot (copilotsub provider)
- Sub-agent system and custom agent definitions
- Auth infrastructure (PKCE, token storage)

Conflict resolution:
- Accepted upstream version of internal/llm/agent/agent.go
- Merged internal/config/load.go to keep both GlobalDataDir() and new helper functions

Upstream changes integrated:
- Progress bar in TUI (charmbracelet#1162)
- MCP notifications support (charmbracelet#967)
- Filepath walk limits (charmbracelet#1052)
- Stream timeout fixes
- Crash reporting improvements
- Various bug fixes
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.

5 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.