mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-04-25 00:51:20 +00:00
fix(tui): tab title shows cwd + waiting-for-input marker
Previously the terminal tab title was `{⏳/✓} {model} — Hermes` which
only distinguished busy vs idle. Users juggling multiple Hermes tabs had
no way to tell which one was waiting on them for approval/clarify/sudo/
secret, and no cue for which workspace the tab was attached to.
- 3-state marker: `⚠` when an overlay prompt is open, `⏳` busy, `✓` idle.
- Append `· {shortCwd}` (28-char budget, $HOME → ~) so the tab surfaces
the workspace directly.
- Drop the `— Hermes` suffix — the marker already signals what this is,
and tab titles are tight.
This commit is contained in:
parent
e0d698cfb3
commit
8410ac05a9
1 changed files with 8 additions and 4 deletions
|
|
@ -5,7 +5,7 @@ import { useCallback, useEffect, useMemo, useRef, useState } from 'react'
|
|||
import { STARTUP_RESUME_ID } from '../config/env.js'
|
||||
import { MAX_HISTORY, WHEEL_SCROLL_STEP } from '../config/limits.js'
|
||||
import { attachedImageNotice, imageTokenMeta } from '../domain/messages.js'
|
||||
import { fmtCwdBranch } from '../domain/paths.js'
|
||||
import { fmtCwdBranch, shortCwd } from '../domain/paths.js'
|
||||
import { type GatewayClient } from '../gatewayClient.js'
|
||||
import type {
|
||||
ClarifyRespondResponse,
|
||||
|
|
@ -315,10 +315,14 @@ export function useMainApp(gw: GatewayClient) {
|
|||
useConfigSync({ gw, setBellOnComplete, setVoiceEnabled, sid: ui.sid })
|
||||
|
||||
// ── Terminal tab title ─────────────────────────────────────────────
|
||||
// Show model name + status so users can identify the Hermes tab.
|
||||
// model + cwd + 3-state marker so multi-instance users can spot which tab
|
||||
// is working, which is idle, and which is waiting on them.
|
||||
// `⚠` blocked on approval/sudo/secret/clarify, `⏳` busy, `✓` idle.
|
||||
const shortModel = ui.info?.model?.replace(/^.*\//, '') ?? ''
|
||||
const titleStatus = ui.busy ? '⏳' : '✓'
|
||||
const terminalTitle = shortModel ? `${titleStatus} ${shortModel} — Hermes` : 'Hermes'
|
||||
const blockedOnInput = !!(overlay.approval || overlay.sudo || overlay.secret || overlay.clarify)
|
||||
const titleStatus = blockedOnInput ? '⚠' : ui.busy ? '⏳' : '✓'
|
||||
const cwdTag = ui.info?.cwd ? ` · ${shortCwd(ui.info.cwd, 24)}` : ''
|
||||
const terminalTitle = shortModel ? `${titleStatus} ${shortModel}${cwdTag}` : 'Hermes'
|
||||
useTerminalTitle(terminalTitle)
|
||||
|
||||
useEffect(() => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue