You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Keep description under 72 characters, imperative mood
Examples: "feat: add user authentication", "fix(api): resolve timeout issue"
If jujutsu is detected:
Show current status: !jj status
Create a conventional commit message and commit with: !jj commit -m "<message>"
If no VCS is detected, inform the user that this directory is not a git or jujutsu repository.
Based on the staged changes, analyze what was modified and suggest an appropriate conventional commit type and
description. Then execute the commit with the conventional message format.
List all session summaries in the .sessions directory
List all session summary files in the .sessions directory and provide a brief overview.
Session Summary Files
Find all session summary files in .sessions directory:
!find .sessions -maxdepth 1 -name "session-summary-*.md" -type f 2>/dev/null | sort -r || echo "No .sessions directory found"
File Details
For each session summary file found, show:
Filename and creation timestamp
File size and last modified date
Brief excerpt from the first few lines
!if [ -d ".sessions" ]; then for file in $(find .sessions -maxdepth 1 -name "session-summary-*.md" -type f | sort -r); do echo "## $file"; ls -la "$file"; echo "### Preview:"; head -10 "$file" | tail -8; echo "---"; done; else echo "No .sessions directory found in current working directory"; fi
Current Directory Context
Working directory: !pwd Sessions directory:
!ls -la .sessions 2>/dev/null || echo ".sessions directory does not exist" Total session files:
!find .sessions -maxdepth 1 -name "session-summary-*.md" -type f 2>/dev/null | wc -l
If no session summary files are found, suggest:
Creating a .sessions directory: mkdir .sessions
Running /session-save to create one for the current session and save it in .sessions
Resume an OpenCode session from a markdown summary file
Resume an OpenCode session using context from a previously generated session summary file.
Find Available Session Summaries
List available session summary files in the .sessions directory:
!ls -la .sessions/session-summary-*.md 2>/dev/null | head -10 || echo "No session summary files found in .sessions directory"
Select Summary File
If multiple summary files exist, you should ask the user which one to use, or use the most recent one by default.
Most recent summary file: !ls -t .sessions/session-summary-*.md 2>/dev/null | head -1 || echo "none"
Load and Process Summary
Read the summary file: Load the content of the selected session summary file
Parse the context: Extract key information from the summary including:
Previous working directory and git status
Tasks that were completed
Current state of files and changes
Tools and technologies used
Key decisions and context
Next steps and TODOs
Set up context:
Verify current directory matches the summary (or note differences)
Check current git status: !git status --porcelain 2>/dev/null || echo "Not a git repository"
Compare current state with the summary to identify what has changed
Present session context: Provide a clear summary of:
What was accomplished in the previous session
Current state vs. previous state
Recommended next actions from the summary
Any discrepancies between expected and actual current state
Instructions for Resume
After loading the context:
Acknowledge the loaded session: Confirm what session was loaded and key context
Identify changes: Note any differences between the summary and current state
Suggest next steps: Based on the "Next Steps" section from the summary
Ask for direction: Ask the user what they'd like to work on next
Usage
To use this command:
Run /session-resume
If multiple summaries exist, specify which one: /session-resume .sessions/session-summary-YYYY-MM-DD-HHMMSS.md
The assistant will load the context and help you continue where you left off
This command helps maintain continuity across OpenCode sessions by preserving and restoring the working context.
Update an existing session summary with current findings and progress
Update an existing session summary by comparing the current state with a previously saved session and merging the new
findings.
Find Available Session Summaries
List available session summary files in the .sessions directory:
!ls -la .sessions/session-summary-*.md 2>/dev/null | head -10 || echo "No session summary files found in .sessions directory"
Select Session to Update
Most recent summary file (default): !ls -t .sessions/session-summary-*.md 2>/dev/null | head -1 || echo "none"
If the user specifies a particular session file, use that one. Otherwise, use the most recent one.
Current Session Context
Capture current session state:
Current State
Working directory: !pwd
Current git status: !git status --porcelain 2>/dev/null || echo "Not a git repository"
Recent git commits since last session: !git log --oneline -5 2>/dev/null || echo "No git history"
Modified files: !git diff --name-only HEAD 2>/dev/null || echo "No git changes"
Load and Compare Existing Session
Read the existing session summary: Load the content of the selected session file
Compare states: Identify what has changed since the last session:
New files created or modified
Git commits added
Tasks completed or progressed
New challenges encountered
Update Process
Preserve Original Context: Keep the original session overview and initial context
Append New Findings: Add a new section with timestamp for this update
Update Current State: Refresh the current state section with latest information
Merge Tasks: Combine completed tasks from both sessions
Update Next Steps: Revise next steps based on current progress
Updated Session Structure
The updated session should maintain the original structure but include: