feat(mem0-plugin): onboarding, project scoping, identity banner (#5207)

This commit is contained in:
Kartik
2026-05-20 22:30:07 +05:30
committed by GitHub
parent edd1b3e2f2
commit 606ede7c0a
35 changed files with 1378 additions and 36 deletions
+18
View File
@@ -25,6 +25,22 @@ if [ "$STOP_HOOK_ACTIVE" = "true" ]; then
exit 0
fi
# Print session-end report
REPORT=$(python3 "$SCRIPT_DIR/session_stats.py" report 2>/dev/null || echo "")
if [ -n "$REPORT" ]; then
echo ""
echo "---"
echo "**mem0 $REPORT**"
echo "---"
echo ""
fi
# Append to persistent session log (guarded — on_stop.sh uses set -euo pipefail)
if [ -n "$REPORT" ]; then
mkdir -p "$HOME/.mem0" 2>/dev/null || true
echo "$(date -u +%Y-%m-%dT%H:%M:%SZ) | $REPORT" >> "$HOME/.mem0/session-log.md" 2>/dev/null || true
fi
cat <<'EOF'
Before finishing, check if there are important learnings from this interaction that should be persisted using the mem0 `add_memory` tool:
@@ -37,6 +53,8 @@ Before finishing, check if there are important learnings from this interaction t
Memories can be as detailed as needed — include full context, reasoning, code snippets, file paths, and examples. Longer, searchable memories are more valuable than vague one-liners.
If nothing notable happened in this interaction, it's fine to skip. Only store genuinely useful learnings.
Always include `"project_id"` in the metadata of any memory you store.
EOF
# Capture transcript state in the background via Mem0 REST API