recap

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese
The user wants a recap. Time window args: $ARGUMENTS
Parse
$ARGUMENTS
to determine the window:
  • today
    -> sessions started on the current local date
  • this week
    -> sessions started in the last 7 days
  • last <n>
    -> the most recent N sessions
  • bare numeric -> treat as
    last <n>
  • empty -> default to
    last 10
Call the
memory_sessions
MCP tool, then filter to the current project (match by
cwd
against the working directory). Apply the time window. Sort by
startedAt
descending.
Group the surviving sessions by their local calendar date (YYYY-MM-DD). For each date:
  • List each session: id (first 8 chars), title or first prompt, observation count, status
  • Indent two or three highlight observations per session (importance >= 7) drawn from
    memory_recall
    with a per-session query, limit 3
End with a one-line total: "N sessions across M days, K observations."
If MCP tools are unavailable, fall back to HTTP:
GET $AGENTMEMORY_URL/agentmemory/sessions
and
POST $AGENTMEMORY_URL/agentmemory/recall
with
Authorization: Bearer $AGENTMEMORY_SECRET
when set. Do not invent sessions; if the window is empty, say so.
用户需要一份回顾。时间窗口参数:$ARGUMENTS
解析
$ARGUMENTS
以确定时间窗口:
  • today
    -> 当天本地日期开始的会话
  • this week
    -> 过去7天内开始的会话
  • last <n>
    -> 最近的N次会话
  • 纯数字 -> 视为
    last <n>
  • 空值 -> 默认使用
    last 10
调用
memory_sessions
MCP工具,然后根据工作目录(匹配
cwd
)筛选当前项目的会话。应用时间窗口筛选,按
startedAt
降序排序。
将筛选后的会话按本地日历日期(YYYY-MM-DD)分组。对于每个日期:
  • 列出每个会话:ID(前8个字符)、标题或首个提示词、观测次数、状态
  • 缩进显示每个会话的2到3条重点观测记录(重要性≥7),通过针对单个会话的查询从
    memory_recall
    获取,最多3条
最后以一行总结收尾:“共M天内的N次会话,K条观测记录。”
若MCP工具不可用,则回退到HTTP方式:调用
GET $AGENTMEMORY_URL/agentmemory/sessions
,以及在设置了
Authorization: Bearer $AGENTMEMORY_SECRET
时调用
POST $AGENTMEMORY_URL/agentmemory/recall
。请勿虚构会话;若时间窗口内无会话,请如实说明。