feat: terminal tab/window title with session name and thinking indicator - #5318
feat: terminal tab/window title with session name and thinking indicator#5318iRonin wants to merge 2 commits into
Conversation
7a2a3bc to
a542f09
Compare
…dicator Sets the terminal title via OSC 0 escape sequence (\x1b]0;...\x07): ⚕ Hermes — session name (named session, idle) ⚕ Hermes ⏳ (agent thinking) ⚕ Hermes (unnamed session) Symbol comes from the active skin's response_label (⚕ default, ⚔ Ares, etc.) so it adapts to the current theme. Updated at: - run() startup - _preload_resumed_session() when a titled session is resumed - /title command when a title is set or committed from pending - process_loop when agent starts (thinking=True) and finishes Skipped when stdout is not a TTY, TERM=dumb, or NO_COLOR is set.
Users on tmux/screen, or whose iTerm2 profile appends the job name
(Python) to the tab title, can now disable OSC title sequences:
display:
terminal_title: false
Default: true (enabled).
a542f09 to
5414006
Compare
teknium1
left a comment
There was a problem hiding this comment.
Thanks for the terminal-title contribution. The underlying request remains relevant for the classic CLI: current main still defaults to the prompt_toolkit interface (hermes_cli/config.py:1771-1776), while the equivalent title behavior is currently implemented only in the opt-in TUI (ui-tui/src/app/useMainApp.ts:576-586, commit d33965396).
Problems
cli.py:6057changes_on_tool_progressto three parameters, but the registered callback is invoked with four lifecycle arguments byagent/tool_executor.py:511. The PR body also still readsevent_typeatcli.py:6068, which is no longer a parameter. This breaks tool-progress handling.- The PR's
cli.pydiff includes 276 unrelated deletions/reversions, so it is not a safe feature-only salvage onto current main.
Suggested changes
- Reimplement the classic-CLI title feature narrowly on current main, preserving the existing tool-progress callback contract.
- Add focused lifecycle and opt-out tests for the title helper.
Automated hermes-sweeper review.
|
|
||
| def _on_tool_progress(self, event_type: str, function_name: str = None, preview: str = None, function_args: dict = None, **kwargs): | ||
| """Called on tool lifecycle events (tool.started, tool.completed, reasoning.available, etc.). | ||
| def _on_tool_progress(self, function_name: str, preview: str, function_args: dict): |
There was a problem hiding this comment.
_on_tool_progress remains registered as the agent lifecycle callback, whose executor calls it as (event_type, function_name, preview, function_args). This three-argument signature therefore raises TypeError for every tool event; the body also still references the now-undefined event_type below. Preserve the existing callback contract.
Sets the terminal window/tab title when Hermes starts and updates it as the session progresses.
Tab title format
response_labelbranding (⚕ default, ⚔ Ares, etc.)╭─ ⚕ Hermes — My Session ─╮Configuration