From 4107538da8304066892e11dbb26388ca65c679f6 Mon Sep 17 00:00:00 2001 From: Brooklyn Nicholson Date: Wed, 22 Apr 2026 16:34:05 -0500 Subject: [PATCH] style(debug): add missing blank line between LogSnapshot and helpers MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Copilot on #14145 flagged PEP 8 / Black convention — two blank lines between top-level class and next top-level function. --- hermes_cli/debug.py | 1 + ui-tui/src/__tests__/subagentTree.test.ts | 5 +---- ui-tui/src/app/useConfigSync.ts | 2 +- ui-tui/src/app/useInputHandlers.ts | 6 +----- ui-tui/src/app/useMainApp.ts | 11 +++++------ ui-tui/src/components/appChrome.tsx | 4 ++-- 6 files changed, 11 insertions(+), 18 deletions(-) diff --git a/hermes_cli/debug.py b/hermes_cli/debug.py index d5947be82..8915d8a6a 100644 --- a/hermes_cli/debug.py +++ b/hermes_cli/debug.py @@ -332,6 +332,7 @@ class LogSnapshot: tail_text: str full_text: Optional[str] + def _primary_log_path(log_name: str) -> Optional[Path]: """Where *log_name* would live if present. Doesn't check existence.""" from hermes_cli.logs import LOG_FILES diff --git a/ui-tui/src/__tests__/subagentTree.test.ts b/ui-tui/src/__tests__/subagentTree.test.ts index 887754ce0..bd892d7ac 100644 --- a/ui-tui/src/__tests__/subagentTree.test.ts +++ b/ui-tui/src/__tests__/subagentTree.test.ts @@ -395,10 +395,7 @@ describe('topLevelSubagents', () => { }) it('excludes children whose parent is present', () => { - const items = [ - makeItem({ id: 'p', index: 0 }), - makeItem({ depth: 1, id: 'c', index: 0, parentId: 'p' }) - ] + const items = [makeItem({ id: 'p', index: 0 }), makeItem({ depth: 1, id: 'c', index: 0, parentId: 'p' })] expect(topLevelSubagents(items).map(s => s.id)).toEqual(['p']) }) diff --git a/ui-tui/src/app/useConfigSync.ts b/ui-tui/src/app/useConfigSync.ts index 63b0100cc..9e7c93ce9 100644 --- a/ui-tui/src/app/useConfigSync.ts +++ b/ui-tui/src/app/useConfigSync.ts @@ -22,7 +22,7 @@ const STATUSBAR_ALIAS: Record = { } export const normalizeStatusBar = (raw: unknown): StatusBarMode => - raw === false ? 'off' : typeof raw === 'string' ? STATUSBAR_ALIAS[raw.trim().toLowerCase()] ?? 'top' : 'top' + raw === false ? 'off' : typeof raw === 'string' ? (STATUSBAR_ALIAS[raw.trim().toLowerCase()] ?? 'top') : 'top' const MTIME_POLL_MS = 5000 diff --git a/ui-tui/src/app/useInputHandlers.ts b/ui-tui/src/app/useInputHandlers.ts index 1d9e834f9..211eb8396 100644 --- a/ui-tui/src/app/useInputHandlers.ts +++ b/ui-tui/src/app/useInputHandlers.ts @@ -386,11 +386,7 @@ export function useInputHandlers(ctx: InputHandlerContext): InputHandlerResult { return void gateway .rpc('config.set', { key: 'yolo', session_id: live.sid }) - .then(r => - actions.sys( - r?.value === '1' ? 'yolo on' : r?.value === '0' ? 'yolo off' : 'failed to toggle yolo' - ) - ) + .then(r => actions.sys(r?.value === '1' ? 'yolo on' : r?.value === '0' ? 'yolo off' : 'failed to toggle yolo')) .catch(() => actions.sys('failed to toggle yolo')) } diff --git a/ui-tui/src/app/useMainApp.ts b/ui-tui/src/app/useMainApp.ts index 36b1e0179..39c4b534c 100644 --- a/ui-tui/src/app/useMainApp.ts +++ b/ui-tui/src/app/useMainApp.ts @@ -1,4 +1,4 @@ -import { useApp, useHasSelection, useSelection, useStdout, useTerminalTitle, type ScrollBoxHandle } from '@hermes/ink' +import { type ScrollBoxHandle, useApp, useHasSelection, useSelection, useStdout, useTerminalTitle } from '@hermes/ink' import { useStore } from '@nanostores/react' import { useCallback, useEffect, useMemo, useRef, useState } from 'react' @@ -316,13 +316,12 @@ export function useMainApp(gw: GatewayClient) { // Tab title: `⚠` waiting on approval/sudo/secret/clarify, `⏳` busy, `✓` idle. const model = ui.info?.model?.replace(/^.*\//, '') ?? '' - const marker = - overlay.approval || overlay.sudo || overlay.secret || overlay.clarify ? '⚠' : ui.busy ? '⏳' : '✓' + + const marker = overlay.approval || overlay.sudo || overlay.secret || overlay.clarify ? '⚠' : ui.busy ? '⏳' : '✓' + const tabCwd = ui.info?.cwd - useTerminalTitle( - model ? `${marker} ${model}${tabCwd ? ` · ${shortCwd(tabCwd, 24)}` : ''}` : 'Hermes' - ) + useTerminalTitle(model ? `${marker} ${model}${tabCwd ? ` · ${shortCwd(tabCwd, 24)}` : ''}` : 'Hermes') useEffect(() => { if (!ui.sid || !stdout) { diff --git a/ui-tui/src/components/appChrome.tsx b/ui-tui/src/components/appChrome.tsx index b9b5e9450..d12a4debf 100644 --- a/ui-tui/src/components/appChrome.tsx +++ b/ui-tui/src/components/appChrome.tsx @@ -1,6 +1,6 @@ -import { Box, Text, type ScrollBoxHandle } from '@hermes/ink' +import { Box, type ScrollBoxHandle, Text } from '@hermes/ink' import { useStore } from '@nanostores/react' -import { useCallback, useEffect, useMemo, useState, useSyncExternalStore, type ReactNode, type RefObject } from 'react' +import { type ReactNode, type RefObject, useCallback, useEffect, useMemo, useState, useSyncExternalStore } from 'react' import { $delegationState } from '../app/delegationStore.js' import { $turnState } from '../app/turnStore.js'