@@ -10,24 +10,78 @@ user_message: |
1010 If nothing to store, reply with [SILENT].
1111
1212user_message_default : |
13+ Pre-compaction memory flush turn.
14+ The session is near auto-compaction; capture durable memories to disk.
15+
16+ Current Date: {date}
17+ Working Dir: {working_dir}
18+
19+ Store durable memories now (use {memory_dir}/YYYY-MM-DD.md).
20+
21+ Workflow:
22+ 1. Use read_tool to read {memory_dir}/YYYY-MM-DD.md (if file doesn't exist, read_tool tool will return an error)
23+ 2. Intelligently merge new information with existing content (skip if file doesn't exist):
24+ - Avoid duplicating information that's already recorded
25+ - Enrich existing entries with new details when relevant
26+ - Maintain chronological order when applicable
27+ 3. Write the updated content:
28+ - Use edit_tool to update specific sections when possible
29+ - Use write_tool to overwrite the entire file if major restructuring is needed
30+ 4. Create {memory_dir}/ if it doesn't exist
31+
32+ Principles:
33+ - Always preserve timestamps, dates, and time-related context
34+ - Only add truly new or enriching information
35+ - Keep entries concise but complete
36+ - If nothing meaningful to store, reply with [SILENT]
37+
38+
39+ user_message_default_zh : |
40+ 预压缩内存刷新轮次。
41+ 当前会话即将进入自动压缩阶段;请将持久化记忆捕获并写入磁盘。
42+
43+ 当前日期:{date}
44+ 工作目录:{working_dir}
45+
46+ 立即存储持久化记忆(使用路径 {memory_dir}/YYYY-MM-DD.md)。
47+
48+ 工作流程:
49+ 1. 使用 read_tool 读取 {memory_dir}/YYYY-MM-DD.md(如文件不存在,read_tool 会返回错误提示)
50+ 2. 智能合并新信息与现有内容(若文件不存在则跳过合并):
51+ - 避免重复已记录的信息
52+ - 在相关时丰富现有条目的新细节
53+ - 在适用时保持时间顺序
54+ 3. 写入更新后的内容:
55+ - 尽可能使用 edit_tool 更新特定部分
56+ - 如需大幅重构则使用 write_tool 覆盖整个文件
57+ 4. 如 {memory_dir}/ 不存在则创建
58+
59+ 原则:
60+ - 始终保留时间戳、日期和时间相关上下文
61+ - 仅添加真正新的或有丰富价值的信息
62+ - 保持条目简洁但完整
63+ - 若无有意义的内容可存储,请回复 [SILENT]
64+
65+
66+ user_message_v1 : |
1367 <conversation>
1468 {conversation}
1569 </conversation>
1670
1771 The conversation is about to be compacted. Please extract persistent memories to disk.
1872 Current Date: {date}
73+ Working Dir: {working_dir}
1974
2075 Execution Flow:
2176 1. Determine if the conversation contains information worth storing
2277 - If no: Reply with reason + [SILENT]
2378 - If yes: Continue to step 2
2479
25- 2. Check file {memory_dir}/YYYY-MM-DD.md (use actual date)
26- - File doesn't exist: Write new memories directly
27- - File exists:
28- a) Read existing content
29- b) Compare and identify new/updated information
30- c) Prefer edit_tool for precise additions (preserves existing content); write_tool overwrites entire file
80+ 2. Use Read tool to read {memory_dir}/YYYY-MM-DD.md (use actual date)
81+ - If file doesn't exist (Read returns error): Write new memories directly
82+ - If file exists:
83+ a) Compare and identify new/updated information from the read content
84+ c) Prefer `edit_tool` for precise additions (preserves existing content); `write_tool` overwrites entire file
3185 d) If no new information: Reply with explanation + [SILENT]
3286
3387 Update Principles:
@@ -41,25 +95,25 @@ user_message_default: |
4195
4296 Please store persistent memories, keeping entries concise and well-structured.
4397
44- user_message_default_zh : |
98+ user_message_v1_zh : |
4599 <conversation>
46100 {conversation}
47101 </conversation>
48102
49103 conversation即将压缩,请提取持久性记忆存储至磁盘。
50104 当前日期:{date}
105+ 工作目录: {working_dir}
51106
52107 执行流程:
53108 1. 判断对话是否包含值得存储的信息
54109 - 若无:回复原因 + [SILENT]
55110 - 若有:继续步骤 2
56111
57- 2. 检查文件 {memory_dir}/YYYY-MM-DD.md(使用实际日期)
58- - 文件不存在:直接写入新记忆
112+ 2. 使用 Read 工具读取 {memory_dir}/YYYY-MM-DD.md(使用实际日期)
113+ - 文件不存在(Read 返回错误):直接使用 `write_tool` 写入新记忆
59114 - 文件已存在:
60- a) 读取现有内容
61- b) 对比识别新增/更新信息
62- c) 优先使用 edit_tool 精准添加新信息(保留已有内容),write_tool 会覆盖整个文件
115+ a) 从读取的内容中对比识别新增/更新信息
116+ c) 优先使用 `edit_tool` 精准添加新信息(保留已有内容)
63117 d) 若无新信息:回复说明 + [SILENT]
64118
65119 更新原则:
0 commit comments