mirror of
https://github.com/shareAI-lab/analysis_claude_code.git
synced 2026-09-21 21:03:38 +08:00
docs(s08): clarify reactive_compact aggressive wording refers to trigger, not compression
The original phrasing "more aggressive than compact_history" was ambiguous: the code shows reactive_compact is actually more conservative in compression (keeps ~5 recent messages vs replacing everything with a summary). The real difference is the trigger mechanism — reactive_compact is an emergency response to a 413 error, not a proactive threshold-based trigger. Clarify in all three README languages that the aggressiveness is about the trigger, not the compression strategy. Closes #467
This commit is contained in:
@@ -136,7 +136,7 @@ def compact_history(messages):
|
||||
|
||||
API がまだ `prompt_too_long`(413)を返すことがある。コンテキストの増加速度が圧縮のトリガー速度を上回る場合。
|
||||
|
||||
この時 **reactive_compact** がトリガーされる:compact_history よりもさらに積極的だが、末尾を残す際も孤立した `tool_result` を残さないようにする。
|
||||
この時 **reactive_compact** がトリガーされる。トリガー方式は compact_history より積極的(413 エラー後の緊急対応)だが、圧縮方針はより温和で、末尾約 5 件のメッセージを保持し、早期の履歴だけを要約する。孤立した `tool_result` を残さないよう配慮する。
|
||||
|
||||
```python
|
||||
def reactive_compact(messages):
|
||||
|
||||
Reference in New Issue
Block a user