style(debug): add missing blank line between LogSnapshot and helpers

Copilot on #14145 flagged PEP 8 / Black convention — two blank lines
between top-level class and next top-level function.
This commit is contained in:
Brooklyn Nicholson 2026-04-22 16:34:05 -05:00
parent 103c71ac36
commit 4107538da8
6 changed files with 11 additions and 18 deletions

View file

@ -332,6 +332,7 @@ class LogSnapshot:
tail_text: str tail_text: str
full_text: Optional[str] full_text: Optional[str]
def _primary_log_path(log_name: str) -> Optional[Path]: def _primary_log_path(log_name: str) -> Optional[Path]:
"""Where *log_name* would live if present. Doesn't check existence.""" """Where *log_name* would live if present. Doesn't check existence."""
from hermes_cli.logs import LOG_FILES from hermes_cli.logs import LOG_FILES

View file

@ -395,10 +395,7 @@ describe('topLevelSubagents', () => {
}) })
it('excludes children whose parent is present', () => { it('excludes children whose parent is present', () => {
const items = [ const items = [makeItem({ id: 'p', index: 0 }), makeItem({ depth: 1, id: 'c', index: 0, parentId: 'p' })]
makeItem({ id: 'p', index: 0 }),
makeItem({ depth: 1, id: 'c', index: 0, parentId: 'p' })
]
expect(topLevelSubagents(items).map(s => s.id)).toEqual(['p']) expect(topLevelSubagents(items).map(s => s.id)).toEqual(['p'])
}) })

View file

@ -22,7 +22,7 @@ const STATUSBAR_ALIAS: Record<string, StatusBarMode> = {
} }
export const normalizeStatusBar = (raw: unknown): StatusBarMode => 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 const MTIME_POLL_MS = 5000

View file

@ -386,11 +386,7 @@ export function useInputHandlers(ctx: InputHandlerContext): InputHandlerResult {
return void gateway return void gateway
.rpc<ConfigSetResponse>('config.set', { key: 'yolo', session_id: live.sid }) .rpc<ConfigSetResponse>('config.set', { key: 'yolo', session_id: live.sid })
.then(r => .then(r => actions.sys(r?.value === '1' ? 'yolo on' : r?.value === '0' ? 'yolo off' : 'failed to toggle yolo'))
actions.sys(
r?.value === '1' ? 'yolo on' : r?.value === '0' ? 'yolo off' : 'failed to toggle yolo'
)
)
.catch(() => actions.sys('failed to toggle yolo')) .catch(() => actions.sys('failed to toggle yolo'))
} }

View file

@ -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 { useStore } from '@nanostores/react'
import { useCallback, useEffect, useMemo, useRef, useState } from '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. // Tab title: `⚠` waiting on approval/sudo/secret/clarify, `⏳` busy, `✓` idle.
const model = ui.info?.model?.replace(/^.*\//, '') ?? '' 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 const tabCwd = ui.info?.cwd
useTerminalTitle( useTerminalTitle(model ? `${marker} ${model}${tabCwd ? ` · ${shortCwd(tabCwd, 24)}` : ''}` : 'Hermes')
model ? `${marker} ${model}${tabCwd ? ` · ${shortCwd(tabCwd, 24)}` : ''}` : 'Hermes'
)
useEffect(() => { useEffect(() => {
if (!ui.sid || !stdout) { if (!ui.sid || !stdout) {

View file

@ -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 { 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 { $delegationState } from '../app/delegationStore.js'
import { $turnState } from '../app/turnStore.js' import { $turnState } from '../app/turnStore.js'