Skip to content

Commit e8c0779

Browse files
committed
docs: detailed tool_progress config section + /mode command update
- CONFIG.md: added full Tool Progress section with value table, cleanup docs, how-it-works walkthrough with examples - commands.go: /mode now shows tool_progress options (all/new/verbose/off + tool_progress_cleanup) and updated command description - Updated default config example in CONFIG.md to include tool_progress and tool_progress_cleanup
1 parent b9ceff2 commit e8c0779

2 files changed

Lines changed: 56 additions & 3 deletions

File tree

docs/CONFIG.md

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ Shared across all projects:
3939
"no_color": false,
4040
"no_agents": false,
4141
"max_tool_parallel": 4,
42+
"tool_progress": "all",
43+
"tool_progress_cleanup": true,
4244
"system": ""
4345
}
4446
```
@@ -323,6 +325,49 @@ odek run "Daily summary" --deliver
323325

324326
See [docs/TELEGRAM.md](docs/TELEGRAM.md#cron-integration) for full cron setup instructions.
325327

328+
## Tool Progress
329+
330+
Controls how per-tool progress messages appear inside the Telegram bot during agent runs. Independent from `interaction_mode` — you can have engaging terminal output with minimal Telegram progress, or verbose terminal with rich progress bubbles.
331+
332+
```json
333+
{
334+
"tool_progress": "all",
335+
"tool_progress_cleanup": true
336+
}
337+
```
338+
339+
### `tool_progress`
340+
341+
| Value | Behavior | Use case |
342+
|-------|----------|----------|
343+
| `"all"` (default) | Single editable progress bubble with smart previews — e.g. `📝 read_file: "main.go"`. Includes edit throttling (1.5s), tool dedup (`×N` counter for repeated same-tool), and automatic flood-control fallback | General use — shows what the agent is doing without spamming the chat |
344+
| `"new"` | Same as `"all"` but only updates when the tool name changes. Consecutive `read_file` calls produce one line; a `shell` call starts a new line | Long-running agents with repetitive tool chains (e.g. reading 50 files in batch) |
345+
| `"verbose"` | Raw tool arguments as separate messages. Each tool call sends a new message with full JSON args; on completion the result is sent as a new message `✅ (size)` | Debugging — see exactly what the agent passes to each tool |
346+
| `"off"` | No per-tool progress messages at all. Only the initial "🤔 Looking into that..." and final answer are shown | Privacy-sensitive contexts or users who prefer zero noise |
347+
348+
### `tool_progress_cleanup`
349+
350+
Default: `true`. Controls whether the progress message bubble is deleted after the agent's final answer arrives:
351+
- `true` — delete the progress bubble (clean chat, no stale tool traces)
352+
- `false` — keep the progress bubble as a breadcrumb of what the agent did
353+
354+
### How it works
355+
356+
The progress system is an evolving single message that gets edited in-place (similar to an animated status). Each tool call adds a line like:
357+
358+
```
359+
📝 read_file: "main.go"
360+
💻 shell: "npm test"
361+
📝 read_file: "utils.go" (×3)
362+
```
363+
364+
Key behaviors:
365+
- **Smart previews** — instead of showing raw JSON args, the system extracts meaningful context: filename for file tools, the command text for shell, URL for browser, query text for memory/search tools, audio filename for transcribe
366+
- **Edit throttling** — edits are rate-limited to one every 1.5 seconds to avoid hitting Telegram's flood control limits. Rapid tool chains don't produce 429 errors
367+
- **Tool dedup** — when the same tool runs consecutively (common with parallel batch tools like `batch_read`), identical lines are collapsed into a `(×N)` counter instead of repeating N times
368+
- **Flood control fallback** — if an edit message fails with "flood" or "retry after", the system automatically switches to sending new messages instead of editing. This prevents the bot from becoming unresponsive under heavy load
369+
- **Content reset** — when the agent calls `send_message` mid-run to send an interim message, the progress bubble resets below that content, keeping the chat timeline in correct order
370+
326371
## odek init
327372

328373
Create a config file template:

internal/telegram/commands.go

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ func init() {
4747
},
4848
{
4949
Command: "mode",
50-
Description: "Toggle agent modes (sandbox, verbose)",
50+
Description: "Show agent modes (interaction_mode, tool_progress, sandbox)",
5151
Handler: modeHandler,
5252
},
5353
{
@@ -135,10 +135,18 @@ func stopHandler(args string) (string, error) {
135135

136136
func modeHandler(args string) (string, error) {
137137
return "⚙️ *Agent Modes*\n\n" +
138-
"Modes are set at startup via `odek.json` or CLI flags:\n" +
138+
"Modes are set at startup via `odek.json` or CLI flags:\n\n" +
139+
"*Interaction Mode:*\n" +
139140
"• `interaction_mode: engaging` — emoji-rich narration (default)\n" +
140141
"• `interaction_mode: enhance` — narrated tool summaries (persist)\n" +
141-
"• `interaction_mode: verbose` — raw tool call output\n" +
142+
"• `interaction_mode: verbose` — raw tool call output\n\n" +
143+
"*Tool Progress (Telegram):*\n" +
144+
"• `tool_progress: all` — smart previews with throttling (default)\n" +
145+
"• `tool_progress: new` — only on tool change\n" +
146+
"• `tool_progress: verbose` — raw tool args\n" +
147+
"• `tool_progress: off` — no progress messages\n" +
148+
"• `tool_progress_cleanup: true` — delete progress on answer\n\n" +
149+
"*Other:*\n" +
142150
"• `sandbox: true` — run in Docker isolation\n" +
143151
"• `skills.verbose: true` — show skill learning details\n\n" +
144152
"Restart the bot after changing config.", nil

0 commit comments

Comments
 (0)