mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-05-13 03:52:00 +00:00
feat(tui): add /sessions slash command for browsing and resuming previous sessions
This commit is contained in:
parent
b62a82e0c3
commit
09a491464c
2 changed files with 16 additions and 0 deletions
|
|
@ -109,6 +109,9 @@ COMMAND_REGISTRY: list[CommandDef] = [
|
||||||
CommandDef("resume", "Resume a previously-named session", "Session",
|
CommandDef("resume", "Resume a previously-named session", "Session",
|
||||||
args_hint="[name]"),
|
args_hint="[name]"),
|
||||||
|
|
||||||
|
# Configuration
|
||||||
|
CommandDef("sessions", "Browse and resume previous sessions", "Session"),
|
||||||
|
|
||||||
# Configuration
|
# Configuration
|
||||||
CommandDef("config", "Show current configuration", "Configuration",
|
CommandDef("config", "Show current configuration", "Configuration",
|
||||||
cli_only=True),
|
cli_only=True),
|
||||||
|
|
|
||||||
|
|
@ -92,6 +92,19 @@ export const sessionCommands: SlashCommand[] = [
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
help: 'browse and resume previous sessions',
|
||||||
|
name: 'sessions',
|
||||||
|
run: (arg, ctx) => {
|
||||||
|
if (ctx.session.guardBusySessionSwitch('switch sessions')) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (!arg.trim()) {
|
||||||
|
return patchOverlayState({ picker: true })
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
help: 'attach an image',
|
help: 'attach an image',
|
||||||
name: 'image',
|
name: 'image',
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue