Problem
When a slash command, plugin, or extension performs a long-running operation (e.g. context compression, skills install, MCP reload), the TUI input prompt remains active and unblocked. The user can type while the operation runs, which causes:
- Input being consumed during the operation (user types into a prompt that is about to be replaced)
- No visible status indicator in the TUI status bar
- Plugins have no standard way to signal 'I am busy, block input'
Proposal
Add a reusable busy command API that any plugin, extension, or core feature can use to:
- Block the TUI input prompt during long operations
- Display a spinner and status message in the TUI status bar
- Restore input automatically when the operation completes
Core Implementation
Add _busy_command(status: str) context manager to HermesCLI:
with self._busy_command("Installing skill..."):
# long-running operation here
# input is blocked, spinner shows in status bar
The context manager:
- Sets
_command_running = True -- blocks input rendering
- Sets
_command_status -- shown in status bar with spinner
- Prints the status message to the output
- On exit, resets both flags and restores the prompt
Plugin Integration
Plugins should be able to access this via the plugin context (ctx):
def register(ctx):
ctx.register_busy_indicator("my-plugin-status")
# Later, during a long operation:
ctx.set_busy("Processing files...")
try:
result = do_something_slow()
finally:
ctx.clear_busy()
Use Cases
| Feature |
Status Message |
/compress |
"Compressing context..." |
/skills install |
"Installing skill..." |
/reload-mcp |
"Reloading MCP servers..." |
| Plugin: memory flush |
"Saving memories..." |
| Plugin: file processing |
"Processing 23 files..." |
Implementation Notes
- The
_busy_command context manager already exists in cli.py -- this issue is about making it available to plugins as a formal API
- Add a
_compressing flag on AIAgent to block input during auto-compression in the agent loop
- Add
_compressor_info() method on AIAgent to return the active compressor name and settings for display
Problem
When a slash command, plugin, or extension performs a long-running operation (e.g. context compression, skills install, MCP reload), the TUI input prompt remains active and unblocked. The user can type while the operation runs, which causes:
Proposal
Add a reusable busy command API that any plugin, extension, or core feature can use to:
Core Implementation
Add
_busy_command(status: str)context manager toHermesCLI:The context manager:
_command_running = True-- blocks input rendering_command_status-- shown in status bar with spinnerPlugin Integration
Plugins should be able to access this via the plugin context (
ctx):Use Cases
/compress/skills install/reload-mcpImplementation Notes
_busy_commandcontext manager already exists incli.py-- this issue is about making it available to plugins as a formal API_compressingflag onAIAgentto block input during auto-compression in the agent loop_compressor_info()method onAIAgentto return the active compressor name and settings for display