refactor: streamline the course to 17 lessons
@@ -16,22 +16,22 @@
|
||||
<!-- Trigger Condition -->
|
||||
<rect x="20" y="54" width="680" height="44" rx="6" fill="#fef2f2" stroke="#fca5a5" stroke-width="1"/>
|
||||
<text x="35" y="70" fill="#991b1b" font-size="11" font-weight="600">Trigger Condition</text>
|
||||
<text x="140" y="70" fill="#991b1b" font-size="11">After Steps 1–3, estimate_size(messages) > CONTEXT_LIMIT.</text>
|
||||
<text x="140" y="86" fill="#991b1b" font-size="10">The current CONTEXT_LIMIT is 50,000 characters.</text>
|
||||
<text x="140" y="70" fill="#991b1b" font-size="11">After Steps 1–3, estimate_chars(messages) > CONTEXT_CHAR_LIMIT.</text>
|
||||
<text x="140" y="86" fill="#991b1b" font-size="10">The current CONTEXT_CHAR_LIMIT is 50,000 characters.</text>
|
||||
|
||||
<!-- Steps -->
|
||||
<rect x="20" y="106" width="200" height="110" rx="8" fill="#fff" stroke="#94a3b8" stroke-width="1.5"/>
|
||||
<text x="120" y="130" fill="#1e3a5f" font-size="12" font-weight="700" text-anchor="middle">Step 1: Save transcript</text>
|
||||
<text x="40" y="152" fill="#475569" font-size="10">Write conversation to .transcripts/</text>
|
||||
<text x="40" y="168" fill="#475569" font-size="10">One JSONL message per line</text>
|
||||
<text x="40" y="184" fill="#475569" font-size="10">File: transcript_{time}.jsonl</text>
|
||||
<text x="40" y="184" fill="#475569" font-size="10">File: transcript_{uuid}.jsonl</text>
|
||||
<text x="40" y="200" fill="#94a3b8" font-size="9">Full transcript stays on disk</text>
|
||||
|
||||
<line x1="225" y1="161" x2="265" y2="161" stroke="#dc2626" stroke-width="2" marker-end="url(#arrow)"/>
|
||||
|
||||
<rect x="270" y="106" width="200" height="110" rx="8" fill="#fff" stroke="#94a3b8" stroke-width="1.5"/>
|
||||
<text x="370" y="130" fill="#1e3a5f" font-size="12" font-weight="700" text-anchor="middle">Step 2: Factual summary</text>
|
||||
<text x="370" y="152" fill="#475569" font-size="9" text-anchor="middle">Conversation is untrusted data</text>
|
||||
<text x="370" y="152" fill="#475569" font-size="9" text-anchor="middle">Conversation is data to summarize</text>
|
||||
<text x="290" y="166" fill="#475569" font-size="9">Summary preserves 5 categories:</text>
|
||||
<text x="370" y="180" fill="#94a3b8" font-size="8" text-anchor="middle">goal · findings and decisions · files</text>
|
||||
<text x="370" y="192" fill="#94a3b8" font-size="8" text-anchor="middle">remaining work · user constraints</text>
|
||||
@@ -42,7 +42,7 @@
|
||||
<rect x="520" y="106" width="180" height="110" rx="8" fill="#fef2f2" stroke="#dc2626" stroke-width="2"/>
|
||||
<text x="610" y="130" fill="#991b1b" font-size="12" font-weight="700" text-anchor="middle">Step 3: Replace history</text>
|
||||
<text x="610" y="152" fill="#991b1b" font-size="9" text-anchor="middle">Old history → 1 message</text>
|
||||
<text x="610" y="168" fill="#991b1b" font-size="9" text-anchor="middle">Request + reference state</text>
|
||||
<text x="610" y="168" fill="#991b1b" font-size="9" text-anchor="middle">Request + conversation summary</text>
|
||||
<text x="610" y="184" fill="#991b1b" font-size="9" text-anchor="middle">System separates instructions/data</text>
|
||||
<text x="610" y="200" fill="#ef4444" font-size="9" text-anchor="middle">Transcript remains on disk</text>
|
||||
|
||||
@@ -61,8 +61,8 @@
|
||||
<rect x="380" y="234" width="320" height="94" rx="6" fill="#fef2f2" stroke="#dc2626" stroke-width="1"/>
|
||||
<text x="540" y="256" fill="#991b1b" font-size="11" font-weight="600" text-anchor="middle">After messages</text>
|
||||
<rect x="395" y="264" width="290" height="32" rx="4" fill="#fee2e2" stroke="#fca5a5" stroke-width="0.5"/>
|
||||
<text x="540" y="276" fill="#991b1b" font-size="9" text-anchor="middle">Authoritative request: captured at input</text>
|
||||
<text x="540" y="290" fill="#991b1b" font-size="9" text-anchor="middle">Reference state: untrusted factual summary</text>
|
||||
<text x="540" y="276" fill="#991b1b" font-size="9" text-anchor="middle">Current user request: captured at input</text>
|
||||
<text x="540" y="290" fill="#991b1b" font-size="9" text-anchor="middle">Conversation summary: facts and remaining work</text>
|
||||
<text x="540" y="318" fill="#94a3b8" font-size="9" text-anchor="middle">One summary message, well below the limit</text>
|
||||
|
||||
<!-- Error recovery -->
|
||||
|
||||
|
Before Width: | Height: | Size: 5.7 KiB After Width: | Height: | Size: 5.7 KiB |
@@ -16,22 +16,22 @@
|
||||
<!-- トリガー条件 -->
|
||||
<rect x="20" y="54" width="680" height="44" rx="6" fill="#fef2f2" stroke="#fca5a5" stroke-width="1"/>
|
||||
<text x="35" y="70" fill="#991b1b" font-size="11" font-weight="600">トリガー条件</text>
|
||||
<text x="115" y="70" fill="#991b1b" font-size="11">Step 1~3 の後、estimate_size(messages) > CONTEXT_LIMIT。</text>
|
||||
<text x="115" y="86" fill="#991b1b" font-size="10">現在の CONTEXT_LIMIT は 50,000 文字。</text>
|
||||
<text x="115" y="70" fill="#991b1b" font-size="11">Step 1~3 の後、estimate_chars(messages) > CONTEXT_CHAR_LIMIT。</text>
|
||||
<text x="115" y="86" fill="#991b1b" font-size="10">現在の CONTEXT_CHAR_LIMIT は 50,000 文字。</text>
|
||||
|
||||
<!-- ステップ -->
|
||||
<rect x="20" y="106" width="200" height="110" rx="8" fill="#fff" stroke="#94a3b8" stroke-width="1.5"/>
|
||||
<text x="120" y="130" fill="#1e3a5f" font-size="12" font-weight="700" text-anchor="middle">ステップ 1:transcript 保存</text>
|
||||
<text x="40" y="152" fill="#475569" font-size="10">完全な対話を .transcripts/ に書き込み</text>
|
||||
<text x="40" y="168" fill="#475569" font-size="10">JSONL 形式、1 行 1 メッセージ</text>
|
||||
<text x="40" y="184" fill="#475569" font-size="10">transcript_{time}.jsonl</text>
|
||||
<text x="40" y="184" fill="#475569" font-size="10">transcript_{uuid}.jsonl</text>
|
||||
<text x="40" y="200" fill="#94a3b8" font-size="9">内容はディスクに残る</text>
|
||||
|
||||
<line x1="225" y1="161" x2="265" y2="161" stroke="#dc2626" stroke-width="2" marker-end="url(#arrow)"/>
|
||||
|
||||
<rect x="270" y="106" width="200" height="110" rx="8" fill="#fff" stroke="#94a3b8" stroke-width="1.5"/>
|
||||
<text x="370" y="130" fill="#1e3a5f" font-size="12" font-weight="700" text-anchor="middle">ステップ 2:事実要約</text>
|
||||
<text x="370" y="152" fill="#475569" font-size="9" text-anchor="middle">元の対話は信頼しないデータ</text>
|
||||
<text x="370" y="152" fill="#475569" font-size="9" text-anchor="middle">元の対話は要約対象のデータ</text>
|
||||
<text x="290" y="166" fill="#475569" font-size="9">要約は 5 種類の情報を保持:</text>
|
||||
<text x="290" y="180" fill="#94a3b8" font-size="8">目標・発見と判断・関連ファイル</text>
|
||||
<text x="290" y="192" fill="#94a3b8" font-size="8">残作業・ユーザー制約</text>
|
||||
@@ -61,8 +61,8 @@
|
||||
<rect x="380" y="234" width="320" height="94" rx="6" fill="#fef2f2" stroke="#dc2626" stroke-width="1"/>
|
||||
<text x="540" y="256" fill="#991b1b" font-size="11" font-weight="600" text-anchor="middle">圧縮後 messages</text>
|
||||
<rect x="395" y="264" width="290" height="32" rx="4" fill="#fee2e2" stroke="#fca5a5" stroke-width="0.5"/>
|
||||
<text x="540" y="276" fill="#991b1b" font-size="9" text-anchor="middle">Authoritative request:入力時に取得した要求</text>
|
||||
<text x="540" y="290" fill="#991b1b" font-size="9" text-anchor="middle">Reference state:信頼しない事実要約</text>
|
||||
<text x="540" y="276" fill="#991b1b" font-size="9" text-anchor="middle">現在のユーザー要求:入力時に取得</text>
|
||||
<text x="540" y="290" fill="#991b1b" font-size="9" text-anchor="middle">対話要約:事実・判断・残作業</text>
|
||||
<text x="540" y="318" fill="#94a3b8" font-size="9" text-anchor="middle">1 件の要約メッセージ、上限を下回る</text>
|
||||
|
||||
<!-- エラー回復 -->
|
||||
|
||||
|
Before Width: | Height: | Size: 5.7 KiB After Width: | Height: | Size: 5.7 KiB |
@@ -16,22 +16,22 @@
|
||||
<!-- 触发条件 -->
|
||||
<rect x="20" y="54" width="680" height="44" rx="6" fill="#fef2f2" stroke="#fca5a5" stroke-width="1"/>
|
||||
<text x="35" y="70" fill="#991b1b" font-size="11" font-weight="600">触发条件</text>
|
||||
<text x="105" y="70" fill="#991b1b" font-size="11">前三步执行后,estimate_size(messages) > CONTEXT_LIMIT。</text>
|
||||
<text x="105" y="86" fill="#991b1b" font-size="10">当前实现的 CONTEXT_LIMIT 为 50,000 个字符。</text>
|
||||
<text x="105" y="70" fill="#991b1b" font-size="11">前三步执行后,estimate_chars(messages) > CONTEXT_CHAR_LIMIT。</text>
|
||||
<text x="105" y="86" fill="#991b1b" font-size="10">当前实现的 CONTEXT_CHAR_LIMIT 为 50,000 个字符。</text>
|
||||
|
||||
<!-- 步骤 -->
|
||||
<rect x="20" y="106" width="200" height="110" rx="8" fill="#fff" stroke="#94a3b8" stroke-width="1.5"/>
|
||||
<text x="120" y="130" fill="#1e3a5f" font-size="12" font-weight="700" text-anchor="middle">步骤 1:保存 transcript</text>
|
||||
<text x="40" y="152" fill="#475569" font-size="10">完整对话写入 .transcripts/</text>
|
||||
<text x="40" y="168" fill="#475569" font-size="10">JSONL 格式,一行一条消息</text>
|
||||
<text x="40" y="184" fill="#475569" font-size="10">文件名:transcript_{time}.jsonl</text>
|
||||
<text x="40" y="184" fill="#475569" font-size="10">文件名:transcript_{uuid}.jsonl</text>
|
||||
<text x="40" y="200" fill="#94a3b8" font-size="9">信息没有丢失,只是移出活跃区</text>
|
||||
|
||||
<line x1="225" y1="161" x2="265" y2="161" stroke="#dc2626" stroke-width="2" marker-end="url(#arrow)"/>
|
||||
|
||||
<rect x="270" y="106" width="200" height="110" rx="8" fill="#fff" stroke="#94a3b8" stroke-width="1.5"/>
|
||||
<text x="370" y="130" fill="#1e3a5f" font-size="12" font-weight="700" text-anchor="middle">步骤 2:生成事实摘要</text>
|
||||
<text x="370" y="152" fill="#475569" font-size="9" text-anchor="middle">原对话是不可信数据</text>
|
||||
<text x="370" y="152" fill="#475569" font-size="9" text-anchor="middle">原对话作为待摘要数据</text>
|
||||
<text x="290" y="166" fill="#475569" font-size="9">摘要保留 5 类信息:</text>
|
||||
<text x="290" y="180" fill="#94a3b8" font-size="8">目标·发现与决定·相关文件</text>
|
||||
<text x="290" y="192" fill="#94a3b8" font-size="8">剩余工作·用户约束</text>
|
||||
@@ -61,8 +61,8 @@
|
||||
<rect x="380" y="234" width="320" height="94" rx="6" fill="#fef2f2" stroke="#dc2626" stroke-width="1"/>
|
||||
<text x="540" y="256" fill="#991b1b" font-size="11" font-weight="600" text-anchor="middle">压缩后 messages</text>
|
||||
<rect x="395" y="264" width="290" height="32" rx="4" fill="#fee2e2" stroke="#fca5a5" stroke-width="0.5"/>
|
||||
<text x="540" y="276" fill="#991b1b" font-size="9" text-anchor="middle">Authoritative request:入口捕获的用户要求</text>
|
||||
<text x="540" y="290" fill="#991b1b" font-size="9" text-anchor="middle">Reference state:不可信的事实摘要</text>
|
||||
<text x="540" y="276" fill="#991b1b" font-size="9" text-anchor="middle">当前用户要求:入口时捕获</text>
|
||||
<text x="540" y="290" fill="#991b1b" font-size="9" text-anchor="middle">对话摘要:事实、决定与剩余工作</text>
|
||||
<text x="540" y="318" fill="#94a3b8" font-size="9" text-anchor="middle">1 条摘要消息,显著低于阈值</text>
|
||||
|
||||
<!-- 错误后补救 -->
|
||||
|
||||
|
Before Width: | Height: | Size: 5.6 KiB After Width: | Height: | Size: 5.7 KiB |
@@ -30,13 +30,13 @@
|
||||
<text x="410" y="31" fill="#fff" font-size="16" font-weight="700" text-anchor="middle">Context Compact: Compression Before LLM Calls, Three Triggers</text>
|
||||
|
||||
<!-- Labels -->
|
||||
<text x="50" y="74" fill="#94a3b8" font-size="11" font-weight="600">s07 Preserved</text>
|
||||
<text x="50" y="74" fill="#94a3b8" font-size="11" font-weight="600">Shared Kernel</text>
|
||||
<text x="180" y="74" fill="#d97706" font-size="11" font-weight="600">s08 New</text>
|
||||
|
||||
<!-- ===== ① messages[] ===== -->
|
||||
<rect x="40" y="132" width="100" height="52" rx="8" fill="#f0f4ff" stroke="#2563eb" stroke-width="1.5"/>
|
||||
<text x="90" y="155" fill="#1e3a5f" font-size="12" font-weight="600" text-anchor="middle">messages[]</text>
|
||||
<text x="90" y="172" fill="#64748b" font-size="9" text-anchor="middle">(s07 preserved)</text>
|
||||
<text x="90" y="172" fill="#64748b" font-size="9" text-anchor="middle">(shared)</text>
|
||||
|
||||
<!-- messages → pipeline entry -->
|
||||
<line x1="140" y1="158" x2="168" y2="158" stroke="#d97706" stroke-width="2" marker-end="url(#arrow-amber)"/>
|
||||
@@ -101,7 +101,7 @@
|
||||
<rect x="580" y="126" width="130" height="64" rx="8" fill="#f0f4ff" stroke="#2563eb" stroke-width="1.5"/>
|
||||
<text x="645" y="150" fill="#1e3a5f" font-size="10" font-weight="600" text-anchor="middle">TOOL_HANDLERS</text>
|
||||
<text x="645" y="166" fill="#64748b" font-size="9" text-anchor="middle">bash · read · write</text>
|
||||
<text x="645" y="180" fill="#64748b" font-size="9" text-anchor="middle">task · load_skill · ...</text>
|
||||
<text x="645" y="180" fill="#64748b" font-size="9" text-anchor="middle">edit · glob · compact</text>
|
||||
|
||||
<!-- LLM API error → emergency compact → retry next turn -->
|
||||
<path d="M 535 184 L 570 216 L 580 228" fill="none" stroke="#dc2626" stroke-width="1.5" stroke-dasharray="4,3" marker-end="url(#arrow-red)"/>
|
||||
@@ -123,7 +123,7 @@
|
||||
<rect x="50" y="390" width="720" height="116" rx="6" fill="#f8fafc" stroke="#e2e8f0" stroke-width="1"/>
|
||||
|
||||
<rect x="70" y="404" width="16" height="12" rx="3" fill="#f0f4ff" stroke="#2563eb" stroke-width="1"/>
|
||||
<text x="94" y="414" fill="#334155" font-size="10">s07 Preserved: loop, hooks, skill loading, sub-agents</text>
|
||||
<text x="94" y="414" fill="#334155" font-size="10">Shared: loop, hooks, permissions, five base tools</text>
|
||||
|
||||
<rect x="70" y="426" width="16" height="12" rx="3" fill="#fde68a" stroke="#d97706" stroke-width="1"/>
|
||||
<text x="94" y="436" fill="#334155" font-size="10">① Every Turn: Steps 1→2→3 run before each LLM call, 0 API</text>
|
||||
|
||||
|
Before Width: | Height: | Size: 9.0 KiB After Width: | Height: | Size: 9.0 KiB |
@@ -30,13 +30,13 @@
|
||||
<text x="410" y="31" fill="#fff" font-size="14" font-weight="700" text-anchor="middle">Context Compact:LLM 呼び出し前の圧縮と 3 つのトリガー</text>
|
||||
|
||||
<!-- ラベル -->
|
||||
<text x="50" y="74" fill="#94a3b8" font-size="11" font-weight="600">s07 保持</text>
|
||||
<text x="50" y="74" fill="#94a3b8" font-size="11" font-weight="600">共通カーネル</text>
|
||||
<text x="180" y="74" fill="#d97706" font-size="11" font-weight="600">s08 新規</text>
|
||||
|
||||
<!-- ===== ① messages[] ===== -->
|
||||
<rect x="40" y="132" width="100" height="52" rx="8" fill="#f0f4ff" stroke="#2563eb" stroke-width="1.5"/>
|
||||
<text x="90" y="155" fill="#1e3a5f" font-size="12" font-weight="600" text-anchor="middle">messages[]</text>
|
||||
<text x="90" y="172" fill="#64748b" font-size="9" text-anchor="middle">(s07 保持)</text>
|
||||
<text x="90" y="172" fill="#64748b" font-size="9" text-anchor="middle">(共通部分)</text>
|
||||
|
||||
<!-- messages → パイプライン入口 -->
|
||||
<line x1="140" y1="158" x2="168" y2="158" stroke="#d97706" stroke-width="2" marker-end="url(#arrow-amber)"/>
|
||||
@@ -101,7 +101,7 @@
|
||||
<rect x="580" y="126" width="130" height="64" rx="8" fill="#f0f4ff" stroke="#2563eb" stroke-width="1.5"/>
|
||||
<text x="645" y="150" fill="#1e3a5f" font-size="10" font-weight="600" text-anchor="middle">TOOL_HANDLERS</text>
|
||||
<text x="645" y="166" fill="#64748b" font-size="9" text-anchor="middle">bash · read · write</text>
|
||||
<text x="645" y="180" fill="#64748b" font-size="9" text-anchor="middle">task · load_skill · ...</text>
|
||||
<text x="645" y="180" fill="#64748b" font-size="9" text-anchor="middle">edit · glob · compact</text>
|
||||
|
||||
<!-- LLM API 例外 → 緊急圧縮 → 次ターンで再試行 -->
|
||||
<path d="M 535 184 L 570 216 L 580 228" fill="none" stroke="#dc2626" stroke-width="1.5" stroke-dasharray="4,3" marker-end="url(#arrow-red)"/>
|
||||
@@ -123,7 +123,7 @@
|
||||
<rect x="50" y="390" width="720" height="116" rx="6" fill="#f8fafc" stroke="#e2e8f0" stroke-width="1"/>
|
||||
|
||||
<rect x="70" y="404" width="16" height="12" rx="3" fill="#f0f4ff" stroke="#2563eb" stroke-width="1"/>
|
||||
<text x="94" y="414" fill="#334155" font-size="10">s07 保持:ループ、フック、スキルロード、サブエージェント</text>
|
||||
<text x="94" y="414" fill="#334155" font-size="10">共通:ループ、フック、権限確認、5 個の基本ツール</text>
|
||||
|
||||
<rect x="70" y="426" width="16" height="12" rx="3" fill="#fde68a" stroke="#d97706" stroke-width="1"/>
|
||||
<text x="94" y="436" fill="#334155" font-size="10">① 毎ターン:Step 1→2→3 を各 LLM 呼び出し前に実行、0 API</text>
|
||||
|
||||
|
Before Width: | Height: | Size: 9.1 KiB After Width: | Height: | Size: 9.1 KiB |
@@ -30,13 +30,13 @@
|
||||
<text x="410" y="31" fill="#fff" font-size="16" font-weight="700" text-anchor="middle">Context Compact:LLM 调用前压缩,三种触发方式</text>
|
||||
|
||||
<!-- 标签 -->
|
||||
<text x="50" y="74" fill="#94a3b8" font-size="11" font-weight="600">s07 保留</text>
|
||||
<text x="50" y="74" fill="#94a3b8" font-size="11" font-weight="600">共同骨架</text>
|
||||
<text x="180" y="74" fill="#d97706" font-size="11" font-weight="600">s08 新增</text>
|
||||
|
||||
<!-- ===== ① messages[] ===== -->
|
||||
<rect x="40" y="132" width="100" height="52" rx="8" fill="#f0f4ff" stroke="#2563eb" stroke-width="1.5"/>
|
||||
<text x="90" y="155" fill="#1e3a5f" font-size="12" font-weight="600" text-anchor="middle">messages[]</text>
|
||||
<text x="90" y="172" fill="#64748b" font-size="9" text-anchor="middle">(s07 保留)</text>
|
||||
<text x="90" y="172" fill="#64748b" font-size="9" text-anchor="middle">(共同部分)</text>
|
||||
|
||||
<!-- messages → 管线入口 -->
|
||||
<line x1="140" y1="158" x2="168" y2="158" stroke="#d97706" stroke-width="2" marker-end="url(#arrow-amber)"/>
|
||||
@@ -101,7 +101,7 @@
|
||||
<rect x="580" y="126" width="130" height="64" rx="8" fill="#f0f4ff" stroke="#2563eb" stroke-width="1.5"/>
|
||||
<text x="645" y="150" fill="#1e3a5f" font-size="10" font-weight="600" text-anchor="middle">TOOL_HANDLERS</text>
|
||||
<text x="645" y="166" fill="#64748b" font-size="9" text-anchor="middle">bash · read · write</text>
|
||||
<text x="645" y="180" fill="#64748b" font-size="9" text-anchor="middle">task · load_skill · ...</text>
|
||||
<text x="645" y="180" fill="#64748b" font-size="9" text-anchor="middle">edit · glob · compact</text>
|
||||
|
||||
<!-- LLM API 异常 → 应急压缩 → 下一轮重试 -->
|
||||
<path d="M 535 184 L 570 216 L 580 228" fill="none" stroke="#dc2626" stroke-width="1.5" stroke-dasharray="4,3" marker-end="url(#arrow-red)"/>
|
||||
@@ -123,7 +123,7 @@
|
||||
<rect x="50" y="390" width="720" height="116" rx="6" fill="#f8fafc" stroke="#e2e8f0" stroke-width="1"/>
|
||||
|
||||
<rect x="70" y="404" width="16" height="12" rx="3" fill="#f0f4ff" stroke="#2563eb" stroke-width="1"/>
|
||||
<text x="94" y="414" fill="#334155" font-size="10">s07 保留:循环、hook、技能加载、子 Agent</text>
|
||||
<text x="94" y="414" fill="#334155" font-size="10">共同骨架:循环、hook、权限检查、5 个基础工具</text>
|
||||
|
||||
<rect x="70" y="426" width="16" height="12" rx="3" fill="#fde68a" stroke="#d97706" stroke-width="1"/>
|
||||
<text x="94" y="436" fill="#334155" font-size="10">① 每轮自动:Step 1→2→3 在每次 LLM 调用前执行,0 API</text>
|
||||
|
||||
|
Before Width: | Height: | Size: 9.1 KiB After Width: | Height: | Size: 9.1 KiB |
@@ -81,7 +81,7 @@
|
||||
<text x="155" y="412" fill="#991b1b" font-size="13" font-weight="700">compact_history</text>
|
||||
<text x="305" y="412" fill="#991b1b" font-size="11">size above 50,000 → LLM summary</text>
|
||||
<text x="650" y="412" fill="#991b1b" font-size="10" text-anchor="end">1 API call</text>
|
||||
<text x="155" y="428" fill="#dc2626" font-size="9">Condition: estimate_size(messages) > CONTEXT_LIMIT</text>
|
||||
<text x="155" y="428" fill="#dc2626" font-size="9">Condition: estimate_chars(messages) > CONTEXT_CHAR_LIMIT</text>
|
||||
<text x="155" y="442" fill="#dc2626" font-size="9">Save a transcript, then replace active history with one summary</text>
|
||||
|
||||
<!-- ===== Emergency fallback title ===== -->
|
||||
|
||||
|
Before Width: | Height: | Size: 6.6 KiB After Width: | Height: | Size: 6.6 KiB |
@@ -81,7 +81,7 @@
|
||||
<text x="155" y="412" fill="#991b1b" font-size="13" font-weight="700">compact_history</text>
|
||||
<text x="305" y="412" fill="#991b1b" font-size="11">サイズが 50,000 超 → LLM 要約</text>
|
||||
<text x="590" y="412" fill="#991b1b" font-size="10" text-anchor="end">1 API 呼び出し</text>
|
||||
<text x="155" y="428" fill="#dc2626" font-size="9">条件:estimate_size(messages) > CONTEXT_LIMIT</text>
|
||||
<text x="155" y="428" fill="#dc2626" font-size="9">条件:estimate_chars(messages) > CONTEXT_CHAR_LIMIT</text>
|
||||
<text x="155" y="442" fill="#dc2626" font-size="9">transcript 保存後、現在の履歴を 1 件の要約に置換</text>
|
||||
|
||||
<!-- ===== 緊急フォールバックタイトル ===== -->
|
||||
|
||||
|
Before Width: | Height: | Size: 6.8 KiB After Width: | Height: | Size: 6.8 KiB |
@@ -81,7 +81,7 @@
|
||||
<text x="155" y="412" fill="#991b1b" font-size="13" font-weight="700">compact_history</text>
|
||||
<text x="305" y="412" fill="#991b1b" font-size="11">size 超过 50,000 → LLM 摘要</text>
|
||||
<text x="590" y="412" fill="#991b1b" font-size="10" text-anchor="end">1 API 调用</text>
|
||||
<text x="155" y="428" fill="#dc2626" font-size="9">条件:estimate_size(messages) > CONTEXT_LIMIT</text>
|
||||
<text x="155" y="428" fill="#dc2626" font-size="9">条件:estimate_chars(messages) > CONTEXT_CHAR_LIMIT</text>
|
||||
<text x="155" y="442" fill="#dc2626" font-size="9">先保存 transcript,再用一条摘要替换当前历史</text>
|
||||
|
||||
<!-- ===== 应急兜底标题 ===== -->
|
||||
|
||||
|
Before Width: | Height: | Size: 6.6 KiB After Width: | Height: | Size: 6.6 KiB |
@@ -39,11 +39,11 @@
|
||||
<text x="535" y="114" fill="#ca8a04" font-size="12" font-weight="600" text-anchor="middle">After (keep only latest 3 complete)</text>
|
||||
<rect x="390" y="122" width="310" height="95" rx="6" fill="#fefce8" stroke="#ca8a04" stroke-width="1"/>
|
||||
<rect x="400" y="130" width="290" height="10" rx="2" fill="#fef3c7"/>
|
||||
<text x="408" y="138" fill="#92400e" font-size="8" font-family="monospace">[Earlier tool result compacted. Re-run if needed.]</text>
|
||||
<text x="408" y="138" fill="#92400e" font-size="8" font-family="monospace">[Earlier tool result saved at .task_outputs/...]</text>
|
||||
<rect x="400" y="145" width="290" height="10" rx="2" fill="#fef3c7"/>
|
||||
<text x="408" y="153" fill="#92400e" font-size="8" font-family="monospace">[Earlier tool result compacted. Re-run if needed.]</text>
|
||||
<text x="408" y="153" fill="#92400e" font-size="8" font-family="monospace">[Earlier tool result omitted.]</text>
|
||||
<rect x="400" y="160" width="290" height="10" rx="2" fill="#fef3c7"/>
|
||||
<text x="408" y="168" fill="#92400e" font-size="8" font-family="monospace">[Earlier tool result compacted. Re-run if needed.]</text>
|
||||
<text x="408" y="168" fill="#92400e" font-size="8" font-family="monospace">[Earlier tool result omitted.]</text>
|
||||
<rect x="400" y="175" width="290" height="10" rx="2" fill="#fef3c7"/>
|
||||
<text x="408" y="183" fill="#92400e" font-size="8" font-family="monospace">Read file J: (full content, 2800 chars)</text>
|
||||
<text x="545" y="212" fill="#ca8a04" font-size="9" font-weight="600" text-anchor="middle">Keep latest 3; first 7 become placeholders</text>
|
||||
@@ -53,6 +53,6 @@
|
||||
<text x="35" y="248" fill="#1e3a5f" font-size="11" font-weight="600">Rule</text>
|
||||
<text x="75" y="248" fill="#475569" font-size="10">Keep the latest 3; replace older results above 120 characters with placeholders.</text>
|
||||
<text x="35" y="264" fill="#1e3a5f" font-size="11" font-weight="600">Placeholder</text>
|
||||
<text x="105" y="264" fill="#475569" font-size="10">Explain that the result was compacted and that the tool can be run again if needed.</text>
|
||||
<text x="105" y="264" fill="#475569" font-size="10">Keep the saved path when one exists; otherwise mark the result omitted.</text>
|
||||
<text x="105" y="280" fill="#94a3b8" font-size="9">The message structure remains valid for the next loop iteration.</text>
|
||||
</svg>
|
||||
|
||||
|
Before Width: | Height: | Size: 4.4 KiB After Width: | Height: | Size: 4.3 KiB |
@@ -39,11 +39,11 @@
|
||||
<text x="535" y="114" fill="#ca8a04" font-size="12" font-weight="600" text-anchor="middle">圧縮後(最新 3 件のみ完全保持)</text>
|
||||
<rect x="390" y="122" width="310" height="95" rx="6" fill="#fefce8" stroke="#ca8a04" stroke-width="1"/>
|
||||
<rect x="400" y="130" width="290" height="10" rx="2" fill="#fef3c7"/>
|
||||
<text x="408" y="138" fill="#92400e" font-size="8" font-family="monospace">[Earlier tool result compacted. Re-run if needed.]</text>
|
||||
<text x="408" y="138" fill="#92400e" font-size="8" font-family="monospace">[Earlier tool result saved at .task_outputs/...]</text>
|
||||
<rect x="400" y="145" width="290" height="10" rx="2" fill="#fef3c7"/>
|
||||
<text x="408" y="153" fill="#92400e" font-size="8" font-family="monospace">[Earlier tool result compacted. Re-run if needed.]</text>
|
||||
<text x="408" y="153" fill="#92400e" font-size="8" font-family="monospace">[Earlier tool result omitted.]</text>
|
||||
<rect x="400" y="160" width="290" height="10" rx="2" fill="#fef3c7"/>
|
||||
<text x="408" y="168" fill="#92400e" font-size="8" font-family="monospace">[Earlier tool result compacted. Re-run if needed.]</text>
|
||||
<text x="408" y="168" fill="#92400e" font-size="8" font-family="monospace">[Earlier tool result omitted.]</text>
|
||||
<rect x="400" y="175" width="290" height="10" rx="2" fill="#fef3c7"/>
|
||||
<text x="408" y="183" fill="#92400e" font-size="8" font-family="monospace">Read file J: (完全な内容, 2800 文字)</text>
|
||||
<text x="545" y="212" fill="#ca8a04" font-size="9" font-weight="600" text-anchor="middle">最新 3 件を保持、前 7 件は置換</text>
|
||||
@@ -53,6 +53,6 @@
|
||||
<text x="35" y="248" fill="#1e3a5f" font-size="11" font-weight="600">処理規則</text>
|
||||
<text x="95" y="248" fill="#475569" font-size="10">最新 3 件を保持し、120 文字超の古い結果をプレースホルダーに置換。</text>
|
||||
<text x="35" y="264" fill="#1e3a5f" font-size="11" font-weight="600">プレースホルダー</text>
|
||||
<text x="125" y="264" fill="#475569" font-size="10">結果が圧縮済みで、必要ならツールを再実行できることを示す。</text>
|
||||
<text x="125" y="264" fill="#475569" font-size="10">保存先があればパスを残し、なければ省略済みと示す。</text>
|
||||
<text x="125" y="280" fill="#94a3b8" font-size="9">メッセージ構造を保ったまま次のループへ進める。</text>
|
||||
</svg>
|
||||
|
||||
|
Before Width: | Height: | Size: 4.5 KiB After Width: | Height: | Size: 4.5 KiB |
@@ -38,11 +38,11 @@
|
||||
<text x="535" y="114" fill="#ca8a04" font-size="12" font-weight="600" text-anchor="middle">压缩后(只保留最近 3 条完整)</text>
|
||||
<rect x="390" y="122" width="310" height="95" rx="6" fill="#fefce8" stroke="#ca8a04" stroke-width="1"/>
|
||||
<rect x="400" y="130" width="290" height="10" rx="2" fill="#fef3c7"/>
|
||||
<text x="408" y="138" fill="#92400e" font-size="8" font-family="monospace">[Earlier tool result compacted. Re-run if needed.]</text>
|
||||
<text x="408" y="138" fill="#92400e" font-size="8" font-family="monospace">[Earlier tool result saved at .task_outputs/...]</text>
|
||||
<rect x="400" y="145" width="290" height="10" rx="2" fill="#fef3c7"/>
|
||||
<text x="408" y="153" fill="#92400e" font-size="8" font-family="monospace">[Earlier tool result compacted. Re-run if needed.]</text>
|
||||
<text x="408" y="153" fill="#92400e" font-size="8" font-family="monospace">[Earlier tool result omitted.]</text>
|
||||
<rect x="400" y="160" width="290" height="10" rx="2" fill="#fef3c7"/>
|
||||
<text x="408" y="168" fill="#92400e" font-size="8" font-family="monospace">[Earlier tool result compacted. Re-run if needed.]</text>
|
||||
<text x="408" y="168" fill="#92400e" font-size="8" font-family="monospace">[Earlier tool result omitted.]</text>
|
||||
<rect x="400" y="175" width="290" height="10" rx="2" fill="#fef3c7"/>
|
||||
<text x="408" y="183" fill="#92400e" font-size="8" font-family="monospace">Read file J: (完整内容, 2800 字符)</text>
|
||||
<text x="545" y="212" fill="#ca8a04" font-size="9" font-weight="600">只保留最近 3 条,前 7 条变占位</text>
|
||||
@@ -52,6 +52,6 @@
|
||||
<text x="35" y="248" fill="#1e3a5f" font-size="11" font-weight="600">处理规则</text>
|
||||
<text x="95" y="248" fill="#475569" font-size="10">最近 3 条保持完整,更早且超过 120 字符的结果替换为占位符。</text>
|
||||
<text x="35" y="264" fill="#1e3a5f" font-size="11" font-weight="600">占位内容</text>
|
||||
<text x="95" y="264" fill="#475569" font-size="10">说明原结果已压缩,并提示需要时重新运行对应工具。</text>
|
||||
<text x="95" y="264" fill="#475569" font-size="10">有落盘路径时保留路径,否则标记该结果已省略。</text>
|
||||
<text x="95" y="280" fill="#94a3b8" font-size="9">消息结构保持不变,后续循环仍可继续处理。</text>
|
||||
</svg>
|
||||
|
||||
|
Before Width: | Height: | Size: 4.3 KiB After Width: | Height: | Size: 4.3 KiB |