class

Enkaidu::Slash::SessionCommand

Inherits Enkaidu::Slash::Command < Reference < Object

Constants

HELP = "`#{NAME} [<sub-command>]`\n- `ls`\n - List all available session named sessions\n- `id`\n - Show current session's unique ID.\n- `goto <NAME>`\n - Switch to an active named session.\n- `new <NAME> [model=name]`\n - Create a new named session and switch to it immediately\n - Optionally specify a model name from the config to use for the new session\n- `usage`\n - Show the token usage / size for the current chat session based on\n most recent response from LLM\n- `save <FILEPATH>`\n - Save the current chat session to a JSONL file\n - Records current toolsets and tools\n - Records MCP connections _iff_ they match MCP servers defined in the config file\n - NOTE: The file should not be edited.\n- `load <FILEPATH> [tail=<N>]`\n - Load a saved chat session from its JSONL file.\n - Clears all active tools and MCP connections\n - Restores toolsets and re-establishes MCP server connections\n - Optionally specify how many `N` recent chats to display after loading the session.\n- `reset [system_prompt_name=name]`\n - Clear all active tools and MCP connections from the current chat session\n - Throws away the current session / context\n - Auto loads tools and MCP connections in the configuration\n - Replaces the system prompt referenced by name if specified\n- `push [keep_tools=yes|no] [keep_prompts=yes|no] [keep_history=yes|no] [system_prompt_name=NAME]`\n - Push current chat session onto session stack and fork a new chat session, keeping tools, prompts, and history as specified\n - Switches the system prompt if the name of a system prompt template is provided\n - By default the new session keeps all state\n- `pop [retain=none|last_full|last_outline|session|session_outline] [replace=yes|no]`\n - Return to last pushed (parent) chat session and\n - Retain some of the chat history if `retain=` specified, otherwise `none` and\n - Replace parent chat history if `replace=yes`, otherwise `no`\n - Without parameters, throws away session history"
HELP_BRIEF = "`#{NAME} [<sub-command>]` - Session management"
NAME = "/session"
SESSION_POP_RETAIN_NIL = ["none", "last_full", "last_outline", "session", "session_outline", nil]
YES_NO_NIL = ["yes", "no", nil]

Instance methods

brief

One line help, in Markdown

Source
handle(session_manager : SessionManager, cmd : CommandParser)
Source
help

Detailed help, in Markdown

Source
name
Source