Skip to content

plugins: add capability to show real time updates to the cli#28

Merged
macabeus merged 1 commit intomainfrom
improve-cli-ux
Mar 5, 2026
Merged

plugins: add capability to show real time updates to the cli#28
macabeus merged 1 commit intomainfrom
improve-cli-ux

Conversation

@macabeus
Copy link
Copy Markdown
Owner

@macabeus macabeus commented Mar 5, 2026

Add the new optional method setStatusCallback for the Pugin interface.

It's used to display on the CLI a few lines with the real time status for the plugin.
For now, only the Claude Runner plugin uses it.

image

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 adds a plugin status callback mechanism that enables real-time UI updates from plugins during execution. The Claude Runner plugin uses this to display live tool call activity, streaming text, elapsed time, and tool call counters in the CLI. The new setStatusCallback optional method on the Plugin interface receives a callback that plugins invoke with structured PluginStatusData (log lines and stats), which the PluginManager relays as PluginStatusUpdateEvent pipeline events for the Ink-based CLI to render.

Changes:

  • Added PluginStatusData type and optional setStatusCallback method to the Plugin interface, plus a new PluginStatusUpdateEvent pipeline event type.
  • Implemented live status emission in ClaudeRunnerPlugin with tool call tracking, text streaming, and elapsed time display, using a 1-second interval timer alongside per-message updates.
  • Wired the status callback in PluginManager and rendered the status data (stats bar + log lines) in the run.tsx Ink UI component.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/shared/types.ts Added PluginStatusData interface and optional setStatusCallback to Plugin interface
src/shared/pipeline-events.ts Added PluginStatusUpdateEvent to the pipeline event union
src/plugins/claude-runner/claude-runner-plugin.ts Implemented status emission with timer, tool/text tracking, and formatted stats
src/plugins/claude-runner/claude-runner-plugin.spec.ts Added tests verifying status callback emits structured data with tool/text indicators
src/plugin-manager.ts Wired setStatusCallback before plugin execution and clears status on completion/error
src/commands/run.tsx Extended PluginStatus with logLines/stats, handled new event, rendered status in UI

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

@macabeus macabeus force-pushed the improve-cli-ux branch 2 times, most recently from 1dbadf4 to a7a06b6 Compare March 5, 2026 01:17
@macabeus macabeus merged commit a10c3a5 into main Mar 5, 2026
1 check passed
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.

2 participants