mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-05-07 02:51:50 +00:00
fix(tui): address rollback guard and parity registry review
Load slash command names from the Python registry instead of regex-parsing source, and guard native rollback when no TUI session is active.
This commit is contained in:
parent
4f59510dd4
commit
8a33ed6136
3 changed files with 36 additions and 4 deletions
|
|
@ -134,6 +134,10 @@ export const opsCommands: SlashCommand[] = [
|
|||
help: 'list, diff, or restore checkpoints',
|
||||
name: 'rollback',
|
||||
run: (arg, ctx) => {
|
||||
if (!ctx.sid) {
|
||||
return ctx.transcript.sys('no active session — nothing to rollback')
|
||||
}
|
||||
|
||||
const trimmed = arg.trim()
|
||||
const [first = '', ...rest] = trimmed.split(/\s+/).filter(Boolean)
|
||||
const lower = first.toLowerCase()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue