Load a session
CRITICAL: This command is READ-ONLY. NEVER modify, edit, or update any session file content.
Context
- •Sessions: @.sessions/
Preflight
- •
If
$ARGUMENTSis provided: Set$SESSION_NAMEto$ARGUMENTS, ensuring it is a valid session filename with.mdextension. - •
If
$ARGUMENTSis not provided Set$SESSION_NAMEto the current session name from.sessions/.current-session, if it exists. If it does not exist, STOP and prompt the user to specify a session name.
Task
- •Take the
$SESSION_NAMEand check if a file exists at.sessions/$SESSION_NAME. - •If the session file does not exist:
- •Notify the user that the session was not found.
- •List all available
.mdsession files located in the.sessions/directory. - •Prompt the user to choose from the list.
- •If the session file does exist:
- •Update the current session pointer by writing the
$SESSION_NAMEfilename to.sessions/.current-session.
- •Update the current session pointer by writing the
- •Read the session file content.
- •Check for running Background Bash Shells.
Output
markdown
Loaded the session `$SESSION_NAME` successfully. Here is a summary of the session:
<session content summary>
Let's continue working on this session.