Skip to content

Commit c15d497

Browse files
committed
feat: Add --show-thinking flag and Ctrl+O tool output toggle (PR langchain-ai#333)
- Add --show-thinking CLI flag to display agent reasoning process - Add Ctrl+O keybinding to toggle tool output visibility - Update toolbar to show tool output state with color indicators - Display tool outputs with ↳ symbol in dim cyan style - Update help documentation and README with new features - Add comprehensive testing guide (docs/PR333_TESTING_GUIDE.md) Changes: - src/cli/config.py: Add show_thinking and show_tool_outputs to SessionState - src/cli/execution.py: Add logic to display tool outputs and reasoning - src/cli/input.py: Add Ctrl+O keybinding and toolbar indicators - src/cli/main.py: Add --show-thinking argument and tips - src/cli/ui.py: Update help documentation - README.md: Document new CLI features - docs/PR333_TESTING_GUIDE.md: Add comprehensive testing guide
1 parent c725552 commit c15d497

File tree

7 files changed

+477
-8
lines changed

7 files changed

+477
-8
lines changed

README.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,35 @@ hkex
110110
- 性能优化与最佳实践
111111
- 4 个详细示例输出
112112

113+
#### CLI 增强功能
114+
115+
```bash
116+
# 显示 Agent 推理过程
117+
hkex --show-thinking
118+
119+
# 启用自动批准模式
120+
hkex --auto-approve
121+
122+
# 组合使用
123+
hkex --show-thinking --auto-approve
124+
```
125+
126+
**交互式快捷键**
127+
- `Ctrl+T` - 切换自动批准模式
128+
- `Ctrl+O` - 切换工具输出显示/隐藏
129+
- `Ctrl+E` - 打开外部编辑器
130+
- `Ctrl+C` - 中断 Agent 执行
131+
132+
**工具输出可见性**
133+
- 默认情况下,工具调用的详细输出是隐藏的,只显示最终结果
134+
-`Ctrl+O` 可以实时切换工具输出的显示状态
135+
- 工具输出以 `` 符号和淡青色显示,便于区分
136+
137+
**推理过程显示**
138+
- 使用 `--show-thinking` 标志可以看到 Agent 的思考过程
139+
- 推理内容以暗淡样式显示,不干扰正常输出
140+
- 适合调试和理解 Agent 的决策逻辑
141+
113142
#### Python API
114143

115144
```python

0 commit comments

Comments
 (0)