|
1 | | -export const COMPRESS_MESSAGE = `Collapse selected individual messages in the conversation into detailed summaries. |
| 1 | +export const COMPRESS_MESSAGE = `将对话中选定的单条消息折叠为详细摘要。 |
2 | 2 |
|
3 | | -THE SUMMARY |
4 | | -Your summary must be EXHAUSTIVE. Capture file paths, function signatures, decisions made, constraints discovered, key findings, tool outcomes, and user intent details that matter... EVERYTHING that preserves the value of the selected message after the raw message is removed. |
| 3 | +摘要要求 |
| 4 | +摘要必须详尽。捕获文件路径、函数签名、所做决策、发现的约束、关键发现、工具结果,以及重要的用户意图细节……所有在原始消息被移除后保留其价值的内容。 |
5 | 5 |
|
6 | | -USER INTENT FIDELITY |
7 | | -When a selected message contains user intent, preserve that intent with extra care. Do not change scope, constraints, priorities, acceptance criteria, or requested outcomes. |
8 | | -Directly quote short user instructions when that best preserves exact meaning. |
| 6 | +用户意图保真 |
| 7 | +当选定消息包含用户意图时,格外小心地保留该意图。不要改变范围、约束、优先级、验收标准或请求的结果。 |
| 8 | +当直接引用简短用户指令最能保留精确含义时,直接引用。 |
9 | 9 |
|
10 | | -Yet be LEAN. Strip away the noise: failed attempts that led nowhere, verbose tool output, and repetition. What remains should be pure signal - golden nuggets of detail that preserve full understanding with zero ambiguity. |
11 | | -If a message contains no significant technical decisions, code changes, or user requirements, produce a minimal one-line summary rather than a detailed one. |
| 10 | +同时保持精简。去除噪音:无果的失败尝试、冗长的工具输出和重复。留下的应该是纯信号——保留完整理解、零歧义的精华细节。 |
| 11 | +如果消息不包含重要的技术决策、代码变更或用户需求,生成最小化的一行摘要而非详细摘要。 |
12 | 12 |
|
13 | | -MESSAGE IDS |
14 | | -You specify individual raw messages by ID using the injected IDs visible in the conversation: |
| 13 | +消息 ID |
| 14 | +使用对话中可见的注入 ID 按 ID 指定单条原始消息: |
15 | 15 |
|
16 | | -- \`mNNNN\` IDs identify raw messages |
| 16 | +- \`mNNNN\` ID 标识原始消息 |
17 | 17 |
|
18 | | -Each message has an ID inside XML metadata tags like \`<dcp-message-id priority="high">m0007</dcp-message-id>\`. |
19 | | -The same ID tag appears in every tool output of the message it belongs to — each unique ID identifies one complete message. |
20 | | -Treat these tags as message metadata only, not as content to summarize. Use only the inner \`mNNNN\` value as the \`messageId\`. |
21 | | -The \`priority\` attribute indicates relative context cost. You MUST compress high-priority messages when their full text is no longer necessary for the active task. |
22 | | -If prior compress-tool results are present, always compress and summarize them minimally only as part of a broader compression pass. Do not invoke the compress tool solely to re-compress an earlier compression result. |
23 | | -Messages marked as \`<dcp-message-id>BLOCKED</dcp-message-id>\` cannot be compressed. |
| 18 | +每条消息在 XML 元数据标签内有 ID,如 \`\`。 |
| 19 | +相同的 ID 标签出现在该消息所属的每个工具输出中——每个唯一 ID 标识一条完整消息。 |
| 20 | +将这些标签仅视为消息元数据,而非要摘要的内容。只使用内部的 \`mNNNN\` 值作为 \`messageId\`。 |
| 21 | +\`priority\` 属性表示相对上下文成本。当高优先级消息的完整文本对当前任务不再必要时,你必须压缩它们。 |
| 22 | +如果存在之前的压缩工具结果,始终在更广泛的压缩过程中将它们最小化地压缩和摘要。不要仅为了重新压缩之前的压缩结果而调用压缩工具。 |
| 23 | +标记为 \`\` 的消息不能被压缩。 |
24 | 24 |
|
25 | | -Rules: |
| 25 | +规则: |
26 | 26 |
|
27 | | -- Pick each \`messageId\` directly from injected IDs visible in context. |
28 | | -- Only use raw message IDs of the form \`mNNNN\`. |
29 | | -- Ignore XML attributes such as \`priority\` when copying the ID; use only the inner \`mNNNN\` value. |
30 | | -- Do not invent IDs. Use only IDs that are present in context. |
| 27 | +- 直接从上下文中可见的注入 ID 选取每个 \`messageId\`。 |
| 28 | +- 只使用 \`mNNNN\` 形式的原始消息 ID。 |
| 29 | +- 复制 ID 时忽略 \`priority\` 等 XML 属性;只使用内部的 \`mNNNN\` 值。 |
| 30 | +- 不要发明 ID。只使用上下文中存在的 ID。 |
31 | 31 |
|
32 | | -BATCHING |
33 | | -Select MANY messages in a single tool call when they are safe to compress. |
34 | | -Each entry should summarize exactly one message, and the tool can receive as many entries as needed in one batch. |
| 32 | +批量处理 |
| 33 | +当多条消息可以安全压缩时,在单次工具调用中选择多条消息。 |
| 34 | +每个条目应恰好摘要一条消息,工具可以在一次批量中接收任意数量的条目。 |
35 | 35 |
|
36 | | -GENERAL CLEANUP |
37 | | -Use the topic "general cleanup" for broad cleanup passes. |
38 | | -During general cleanup, compress all medium and high-priority messages that are not relevant to the active task. |
39 | | -Optimize for reducing context footprint, not for grouping messages by topic. |
40 | | -Do not compress away still-active instructions, unresolved questions, or constraints that are likely to matter soon. |
41 | | -Prioritize the earliest messages in the context as they will be the least relevant to the active task. |
42 | | -General cleanup should be done periodically between other normal compression tool passes, not as the primary form of compression. |
| 36 | +通用清理 |
| 37 | +使用主题"通用清理"进行广泛的清理。 |
| 38 | +在通用清理期间,压缩所有与当前任务无关的中高优先级消息。 |
| 39 | +优化减少上下文占用,而非按主题分组消息。 |
| 40 | +不要压缩掉仍然活跃的指令、未解决的问题或可能很快重要的约束。 |
| 41 | +优先处理上下文中最早的消息,因为它们与当前任务的相关性最低。 |
| 42 | +通用清理应定期在其他正常压缩工具调用之间进行,而非作为压缩的主要形式。 |
43 | 43 | ` |
0 commit comments