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:
Brooklyn Nicholson 2026-04-27 13:10:13 -05:00
parent 4f59510dd4
commit 8a33ed6136
3 changed files with 36 additions and 4 deletions

View file

@ -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()