mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-05-07 02:51:50 +00:00
chore(tui): drop unreachable return + prettier pass
- createGatewayEventHandler: remove dead `return` after a block that always returns (tool.complete case). The inner block exits via both branches so the outer statement was never reachable. Was pre-existing on main; fixed here because it was the only thing blocking `npm run fix` on this branch. - agentsOverlay + ops: prettier reformatting. `npm run fix` / `npm run type-check` / `npm test` all clean.
This commit is contained in:
parent
06ebe34b40
commit
f06adcc1ae
3 changed files with 33 additions and 49 deletions
|
|
@ -8,12 +8,7 @@ import type {
|
|||
import type { PanelSection } from '../../../types.js'
|
||||
import { applyDelegationStatus, getDelegationState } from '../../delegationStore.js'
|
||||
import { patchOverlayState } from '../../overlayStore.js'
|
||||
import {
|
||||
getSpawnHistory,
|
||||
pushDiskSnapshot,
|
||||
setDiffPair,
|
||||
type SpawnSnapshot
|
||||
} from '../../spawnHistoryStore.js'
|
||||
import { getSpawnHistory, pushDiskSnapshot, setDiffPair, type SpawnSnapshot } from '../../spawnHistoryStore.js'
|
||||
import type { SlashCommand } from '../types.js'
|
||||
|
||||
interface SkillInfo {
|
||||
|
|
@ -101,10 +96,11 @@ export const opsCommands: SlashCommand[] = [
|
|||
|
||||
// ── Disk-backed listing ─────────────────────────────────────
|
||||
if (lower === 'list' || lower === 'ls') {
|
||||
ctx.gateway.rpc<SpawnTreeListResponse>('spawn_tree.list', {
|
||||
limit: 30,
|
||||
session_id: ctx.sid ?? 'default'
|
||||
})
|
||||
ctx.gateway
|
||||
.rpc<SpawnTreeListResponse>('spawn_tree.list', {
|
||||
limit: 30,
|
||||
session_id: ctx.sid ?? 'default'
|
||||
})
|
||||
.then(
|
||||
ctx.guarded<SpawnTreeListResponse>(r => {
|
||||
const entries = r.entries ?? []
|
||||
|
|
@ -136,7 +132,8 @@ export const opsCommands: SlashCommand[] = [
|
|||
return ctx.transcript.sys('usage: /replay load <path>')
|
||||
}
|
||||
|
||||
ctx.gateway.rpc<SpawnTreeLoadResponse>('spawn_tree.load', { path })
|
||||
ctx.gateway
|
||||
.rpc<SpawnTreeLoadResponse>('spawn_tree.load', { path })
|
||||
.then(
|
||||
ctx.guarded<SpawnTreeLoadResponse>(r => {
|
||||
if (!r.subagents?.length) {
|
||||
|
|
@ -202,9 +199,7 @@ export const opsCommands: SlashCommand[] = [
|
|||
const candidate = resolve(b!)
|
||||
|
||||
if (!baseline || !candidate) {
|
||||
return ctx.transcript.sys(
|
||||
`replay-diff: could not resolve indices · history has ${history.length} entries`
|
||||
)
|
||||
return ctx.transcript.sys(`replay-diff: could not resolve indices · history has ${history.length} entries`)
|
||||
}
|
||||
|
||||
setDiffPair({ baseline, candidate })
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue