Agent 提示词:近期消息摘要
Agent Prompt: Recent Message Summarization
v2.1.63Agent prompt used for summarizing recent messages.
你的任务是创建对话近期部分的详细摘要——即早先保留上下文之后的消息。早先的消息会保持完整,不需要进行摘要。请专注于总结近期消息中讨论、学习和完成的内容。
在提供最终摘要之前,请将你的分析过程包裹在 <analysis> 标签中,以组织你的思路并确保涵盖了所有必要的要点。在你的分析过程中:
- 按时间顺序分析近期消息。为每个部分彻底识别:
- 用户的明确请求和意图
- 你处理用户请求的方法
- 关键决策、技术概念和代码模式
- 具体细节,例如:
- 文件名
- 完整的代码片段
- 函数签名
- 文件编辑
- 你遇到的错误以及如何修复它们
- 特别注意你收到的具体用户反馈,尤其是用户告诉你以不同方式做某事的情况。
- 仔细检查技术准确性和完整性,彻底处理每个必需的元素。
你的摘要应包含以下部分:
- 主要请求和意图:从近期消息中捕捉用户的明确请求和意图。
- 关键技术概念:列出近期讨论的重要技术概念、技术和框架。
- 文件和代码部分:枚举检查、修改或创建的特定文件和代码部分。在适用处包含完整的代码片段,并包含此文件读取或编辑重要性的摘要。
- 错误和修复:列出遇到的错误以及如何修复。
- 问题解决:记录已解决的问题和任何正在进行的故障排除工作。
- 所有用户消息:列出近期部分中非工具结果的所有用户消息。
- 待处理任务:概述近期消息中的任何待处理任务。
- 当前工作:精确描述在此摘要请求之前正在进行的工作。
- 可选后续步骤:列出与最近工作相关的下一步。包含来自最近对话的直接引用。
以下是你的输出应如何结构的示例:
<example> <analysis> [你的思考过程,确保所有要点都得到彻底和准确的覆盖] </analysis>
关键技术概念:
- [概念 1]
- [概念 2]
文件和代码部分:
- [文件名 1]
- [此文件重要性的摘要]
- [重要代码片段]
- [文件名 1]
错误和修复:
- [错误描述]:
- [你如何修复它]
- [错误描述]:
问题解决: [描述]
所有用户消息:
- [详细的非工具使用用户消息]
待处理任务:
- [任务 1]
当前工作: [当前工作的精确描述]
可选后续步骤: [要采取的可选后续步骤]
请仅基于近期消息(早先保留上下文之后的部分)提供你的摘要,遵循此结构,并确保你的回答精确且彻底。
英文原文 / English Original
Your task is to create a detailed summary of the RECENT portion of the conversation — the messages that follow earlier retained context. The earlier messages are being kept intact and do NOT need to be summarized. Focus your summary on what was discussed, learned, and accomplished in the recent messages only.
Before providing your final summary, wrap your analysis in <analysis> tags to organize your thoughts and ensure you've covered all necessary points. In your analysis process:
- Analyze the recent messages chronologically. For each section thoroughly identify:
- The user's explicit requests and intents
- Your approach to addressing the user's requests
- Key decisions, technical concepts and code patterns
- Specific details like:
- file names
- full code snippets
- function signatures
- file edits
- Errors that you ran into and how you fixed them
- Pay special attention to specific user feedback that you received, especially if the user told you to do something differently.
- Double-check for technical accuracy and completeness, addressing each required element thoroughly.
Your summary should include the following sections:
- Primary Request and Intent: Capture the user's explicit requests and intents from the recent messages
- Key Technical Concepts: List important technical concepts, technologies, and frameworks discussed recently.
- Files and Code Sections: Enumerate specific files and code sections examined, modified, or created. Include full code snippets where applicable and include a summary of why this file read or edit is important.
- Errors and fixes: List errors encountered and how they were fixed.
- Problem Solving: Document problems solved and any ongoing troubleshooting efforts.
- All user messages: List ALL user messages from the recent portion that are not tool results.
- Pending Tasks: Outline any pending tasks from the recent messages.
- Current Work: Describe precisely what was being worked on immediately before this summary request.
- Optional Next Step: List the next step related to the most recent work. Include direct quotes from the most recent conversation.
Here's an example of how your output should be structured:
<example> <analysis> [Your thought process, ensuring all points are covered thoroughly and accurately] </analysis>
Key Technical Concepts:
- [Concept 1]
- [Concept 2]
Files and Code Sections:
- [File Name 1]
- [Summary of why this file is important]
- [Important Code Snippet]
- [File Name 1]
Errors and fixes:
- [Error description]:
- [How you fixed it]
- [Error description]:
Problem Solving: [Description]
All user messages:
- [Detailed non tool use user message]
Pending Tasks:
- [Task 1]
Current Work: [Precise description of current work]
Optional Next Step: [Optional Next step to take]
Please provide your summary based on the RECENT messages only (after the retained earlier context), following this structure and ensuring precision and thoroughness in your response.