Skip to content

Commit b6ab4ec

Browse files
Bill-Billionclaude
andcommitted
fix: address PR #265 review feedback (Q1-Q7, s01-s03)
Q1: Remove stale sessions/zh/ directory (三套结构清理) Q3: Fix s01 code.py path (sessions/zh → s01_agent_loop) Q4: Extend SVG dangling lines to touch containers Q5: Remove orphan fence lines breaking s02 README rendering Q7: Fix s03 wording ("返回错误" → "返回一条阻止信息") Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
1 parent 89f41d7 commit b6ab4ec

7 files changed

Lines changed: 4 additions & 387 deletions

File tree

s01_agent_loop/code.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
s01: The Agent Loop — 一个循环 + 一个工具 = 一个 Agent
44
55
运行方式:
6-
python sessions/zh/s01_agent_loop/code.py
6+
python s01_agent_loop/code.py
77
88
需要:
99
- pip install anthropic python-dotenv

s02_tool_use/README.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,8 +135,6 @@ for block in concurrent:
135135
```
136136

137137
**关键修正**:教学版最初把 bash 放在 sequential 组(因为它"可能改文件系统")。但 bash 的实际行为取决于具体命令——`ls -la` 是只读的,完全可以和 read 并发跑;`rm file.txt` 才需要排队。CC 的 `isConcurrencySafe()` 是按具体输入判断的,不是按工具名。教学版用了简化版的分区(按工具名硬编码),代码更简单但丢了这个粒度。
138-
results.append(execute_tool(block))
139-
```
140138

141139
这不是完美的并发(教学版没有线程池),但传达了核心概念:**某些工具可以同时跑,某些不行**
142140

s02_tool_use/images/concurrency-comparison.svg

Lines changed: 2 additions & 2 deletions
Loading

s03_permission/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ Agent 可能执行 `rm -rf /`。你可能说"不会吧,模型不会这么蠢"
3636

3737
### 解法
3838

39-
一张表,先查,命中就直接返回错误
39+
一张表,先查,命中就返回一条阻止信息(拒绝原因)
4040

4141
```python
4242
DENY_LIST = [

sessions/zh/s01_agent_loop/README.md

Lines changed: 0 additions & 175 deletions
This file was deleted.

sessions/zh/s01_agent_loop/code.py

Lines changed: 0 additions & 126 deletions
This file was deleted.

0 commit comments

Comments
 (0)