ai-agent-book 精选快照(<2MB 代码与文档,来自 github.com/bojieli/ai-agent-book)
Build latest book artifacts / build (push) Canceled after 0s
dependency resolution / resolve (3.11) (push) Canceled after 0s
dependency resolution / resolve (3.13) (push) Canceled after 0s
deploy-pages / build (push) Canceled after 0s
deploy-pages / deploy (push) Canceled after 0s
i18n consistency check / check (push) Canceled after 0s
provider adoption tests / test (chapter2/context-compression) (push) Canceled after 0s
provider adoption tests / test (chapter2/prompt-injection) (push) Canceled after 0s
provider adoption tests / test (chapter2/system-hint) (push) Canceled after 0s
provider adoption tests / test (chapter3/log-sanitization) (push) Canceled after 0s
web-search-agent tests / test (push) Canceled after 0s
web-search-agent tests / agentbook (push) Canceled after 0s

This commit is contained in:
2026-08-20 13:12:50 +00:00
commit b119135836
10275 changed files with 3284984 additions and 0 deletions
+52
View File
@@ -0,0 +1,52 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 40 880 520" width="880" height="520" style="background:#ffffff">
<defs><marker id="ah" markerWidth="12" markerHeight="8" refX="12" refY="4" orient="auto"><polygon points="0 0, 12 4, 0 8" fill="#333333"/></marker><marker id="ah-light" markerWidth="12" markerHeight="8" refX="12" refY="4" orient="auto"><polygon points="0 0, 12 4, 0 8" fill="#999999"/></marker></defs>
<rect x="20" y="55" width="410" height="240" rx="6" fill="#ffffff" stroke="#333333" stroke-width="2"/>
<rect x="20" y="55" width="410" height="36" rx="6" fill="#d0d0d0" stroke="#333333" stroke-width="2"/>
<text x="225.0" y="73" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="16" fill="#333333" text-anchor="middle" dominant-baseline="central" font-weight="bold">正則內容匹配 (grep)</text>
<text x="32" y="109" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="14" fill="#666666" text-anchor="start" dominant-baseline="central" font-weight="bold">查詢:</text>
<rect x="28" y="119" width="394" height="24" rx="3" fill="#f5f5f5" stroke="#999999" stroke-width="2"/>
<text x="34" y="131" font-family="'Courier New', Courier, monospace" font-size="11" fill="#333333" text-anchor="start" dominant-baseline="central">rg &quot;def handle_.*&quot; --type py</text>
<text x="32" y="157" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="14" fill="#666666" text-anchor="start" dominant-baseline="central" font-weight="bold">結果:</text>
<rect x="28" y="167" width="394" height="72" rx="3" fill="#f5f5f5" stroke="#999999" stroke-width="2"/>
<text x="34" y="183" font-family="'Courier New', Courier, monospace" font-size="10" fill="#333333" text-anchor="start" dominant-baseline="central">src/api.py:42: def handle_request(..)</text>
<text x="34" y="203" font-family="'Courier New', Courier, monospace" font-size="10" fill="#333333" text-anchor="start" dominant-baseline="central">src/api.py:89: def handle_timeout(..)</text>
<text x="34" y="223" font-family="'Courier New', Courier, monospace" font-size="10" fill="#333333" text-anchor="start" dominant-baseline="central">src/ws.py:15: def handle_connect(..)</text>
<text x="225.0" y="281" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="14" fill="#666666" text-anchor="middle" dominant-baseline="central" font-weight="normal">精確文字 → 所有出現位置</text>
<rect x="450" y="55" width="410" height="240" rx="6" fill="#ffffff" stroke="#333333" stroke-width="2"/>
<rect x="450" y="55" width="410" height="36" rx="6" fill="#f0f0f0" stroke="#333333" stroke-width="2"/>
<text x="655.0" y="73" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="16" fill="#333333" text-anchor="middle" dominant-baseline="central" font-weight="bold">檔名匹配 (glob)</text>
<text x="462" y="109" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="14" fill="#666666" text-anchor="start" dominant-baseline="central" font-weight="bold">查詢:</text>
<rect x="458" y="119" width="394" height="24" rx="3" fill="#f5f5f5" stroke="#999999" stroke-width="2"/>
<text x="464" y="131" font-family="'Courier New', Courier, monospace" font-size="11" fill="#333333" text-anchor="start" dominant-baseline="central">glob: **/test_*.py</text>
<text x="462" y="157" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="14" fill="#666666" text-anchor="start" dominant-baseline="central" font-weight="bold">結果:</text>
<rect x="458" y="167" width="394" height="72" rx="3" fill="#f5f5f5" stroke="#999999" stroke-width="2"/>
<text x="464" y="183" font-family="'Courier New', Courier, monospace" font-size="10" fill="#333333" text-anchor="start" dominant-baseline="central">tests/test_api.py</text>
<text x="464" y="203" font-family="'Courier New', Courier, monospace" font-size="10" fill="#333333" text-anchor="start" dominant-baseline="central">tests/test_auth.py</text>
<text x="464" y="223" font-family="'Courier New', Courier, monospace" font-size="10" fill="#333333" text-anchor="start" dominant-baseline="central">tests/unit/test_parser.py</text>
<text x="655.0" y="281" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="14" fill="#666666" text-anchor="middle" dominant-baseline="central" font-weight="normal">路徑模式 → 不讀取檔案內容</text>
<rect x="20" y="315" width="410" height="240" rx="6" fill="#ffffff" stroke="#333333" stroke-width="2"/>
<rect x="20" y="315" width="410" height="36" rx="6" fill="#f0f0f0" stroke="#333333" stroke-width="2"/>
<text x="225.0" y="333" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="16" fill="#333333" text-anchor="middle" dominant-baseline="central" font-weight="bold">語義程式碼搜尋</text>
<text x="32" y="369" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="14" fill="#666666" text-anchor="start" dominant-baseline="central" font-weight="bold">查詢:</text>
<rect x="28" y="379" width="394" height="24" rx="3" fill="#f5f5f5" stroke="#999999" stroke-width="2"/>
<text x="34" y="391" font-family="'Courier New', Courier, monospace" font-size="11" fill="#333333" text-anchor="start" dominant-baseline="central">&quot;處理使用者輸入驗證&quot;</text>
<text x="32" y="417" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="14" fill="#666666" text-anchor="start" dominant-baseline="central" font-weight="bold">結果:</text>
<rect x="28" y="427" width="394" height="72" rx="3" fill="#f5f5f5" stroke="#999999" stroke-width="2"/>
<text x="34" y="443" font-family="'Courier New', Courier, monospace" font-size="10" fill="#333333" text-anchor="start" dominant-baseline="central">[0.91] src/validators.py:validate_input()</text>
<text x="34" y="463" font-family="'Courier New', Courier, monospace" font-size="10" fill="#333333" text-anchor="start" dominant-baseline="central">[0.87] src/forms.py:sanitize_fields()</text>
<text x="34" y="483" font-family="'Courier New', Courier, monospace" font-size="10" fill="#333333" text-anchor="start" dominant-baseline="central">[0.82] src/api.py:check_params()</text>
<text x="225.0" y="541" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="14" fill="#666666" text-anchor="middle" dominant-baseline="central" font-weight="normal">自然語言 → 向量+BM25混合</text>
<rect x="450" y="315" width="410" height="240" rx="6" fill="#ffffff" stroke="#333333" stroke-width="2"/>
<rect x="450" y="315" width="410" height="36" rx="6" fill="#d0d0d0" stroke="#333333" stroke-width="2"/>
<text x="655.0" y="333" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="16" fill="#333333" text-anchor="middle" dominant-baseline="central" font-weight="bold">符號定義/引用</text>
<text x="462" y="369" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="14" fill="#666666" text-anchor="start" dominant-baseline="central" font-weight="bold">查詢:</text>
<rect x="458" y="379" width="394" height="24" rx="3" fill="#f5f5f5" stroke="#999999" stroke-width="2"/>
<text x="464" y="391" font-family="'Courier New', Courier, monospace" font-size="11" fill="#333333" text-anchor="start" dominant-baseline="central">find_references: UserService</text>
<text x="462" y="417" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="14" fill="#666666" text-anchor="start" dominant-baseline="central" font-weight="bold">結果:</text>
<rect x="458" y="427" width="394" height="92" rx="3" fill="#f5f5f5" stroke="#999999" stroke-width="2"/>
<text x="464" y="443" font-family="'Courier New', Courier, monospace" font-size="10" fill="#333333" text-anchor="start" dominant-baseline="central">定義: src/services/user.py:12</text>
<text x="464" y="463" font-family="'Courier New', Courier, monospace" font-size="10" fill="#333333" text-anchor="start" dominant-baseline="central">引用: src/api/routes.py:34 (import)</text>
<text x="464" y="483" font-family="'Courier New', Courier, monospace" font-size="10" fill="#333333" text-anchor="start" dominant-baseline="central">引用: src/api/routes.py:56 (呼叫)</text>
<text x="464" y="503" font-family="'Courier New', Courier, monospace" font-size="10" fill="#333333" text-anchor="start" dominant-baseline="central">引用: tests/test_user.py:8 (測試)</text>
<text x="655.0" y="541" font-family="Arial, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif" font-size="14" fill="#666666" text-anchor="middle" dominant-baseline="central" font-weight="normal">AST級 → 消除同名歧義</text>
</svg>

After

Width:  |  Height:  |  Size: 8.9 KiB