commit-history
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseThe user wants a list of agent-linked commits. Filter args: $ARGUMENTS
Parse for optional , , and tokens. A bare numeric token becomes the limit. Defaults: no branch filter, no repo filter, limit 100, max 500.
$ARGUMENTSbranch=<name>repo=<url-or-fragment>limit=<n>Call the MCP tool with the parsed filters. If the MCP tool is unavailable, fall back to HTTP: build and append each filter as a URL-encoded query parameter (use or on , , and ) so values containing , , or cannot corrupt the request. Include when set.
memory_commitsGET $AGENTMEMORY_URL/agentmemory/commitsURLSearchParamsencodeURIComponentbranchrepolimit?&#Authorization: Bearer $AGENTMEMORY_SECRETRender the result as a reverse-chronological list:
- Short SHA, branch, authored timestamp
- Commit message first line
- Linked session id(s) (first 8 chars each) and observation counts where present
- File count when is provided
files
If the result is empty, tell the user the filter matched no commits and suggest dropping the branch/repo filter. Do not invent commits.
用户需要一份与Agent关联的提交列表。筛选参数:$ARGUMENTS
解析以获取可选的、和参数。单独的数值参数将作为limit值。默认设置:无分支筛选、无仓库筛选、limit为100,最大为500。
$ARGUMENTSbranch=<名称>repo=<链接或片段>limit=<数量>调用带有解析后筛选条件的 MCP工具。如果MCP工具不可用,则回退到HTTP方式:构建请求,并将每个筛选条件作为URL编码的查询参数添加(对、和使用或),以避免包含、或的值破坏请求。当设置了时,需包含请求头。
memory_commitsGET $AGENTMEMORY_URL/agentmemory/commitsbranchrepolimitURLSearchParamsencodeURIComponent?&#$AGENTMEMORY_SECRETAuthorization: Bearer $AGENTMEMORY_SECRET将结果按时间倒序渲染为列表:
- 短SHA值、分支、提交时间戳
- 提交信息首行
- 关联的会话ID(每个显示前8个字符)及存在的观测计数
- 当提供字段时显示文件数量
files
如果结果为空,告知用户当前筛选条件未匹配到任何提交,并建议取消分支/仓库筛选。不得编造提交记录。