module

Enkaidu::Session::Lifecycle

Instance methods

erase_history

Reset session history without affecting any other configuration.

Source
load_session(io : IO, tail_num_chats = -1)

Load a session a previously saved session (expects JSONL-format per the #save_session method) and render past N chat events (or none by default) last N chats..

Source
reset_session(sys_prompt_name : String | Nil)

Unload everything and start a new session as if we restarted Enkaidu, including auto loading from the configuration; use given system prompt name if any

Source
save_session(io : IO) : Nil

Save session to a JSONL file, where each line in order is as follows:

  • about the file / app
  • active MCP server connection info
  • active toolsets and selected tools
  • chat session
Source