You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
v0.44.0: reasoning-first progress + language matching
- LLM reasoning first sentence becomes live progress indicator header
- System prompt enforces user-facing <20 word reasoning with examples
- Language matching: bot replies in user's language for everything
- render.FirstSentence() extracts first sentence, strips I will/I'll
- Telegram progress bubble: reasoning header + tool previews below
- Fixed memMsgIdx desync after context trimming in loop.go
- Updated CHANGELOG, AGENTS.md, TELEGRAM.md docs
Copy file name to clipboardExpand all lines: docs/CHANGELOG.md
+25Lines changed: 25 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,30 @@
1
1
# Changelog
2
2
3
+
## v0.44.0 (2026-05-24) — Reasoning-First Progress & Language Matching
4
+
5
+
### New Features
6
+
-**Reasoning-first progress** — the first sentence of the LLM's internal reasoning (under 20 words, user-facing) now appears at the top of the progress bubble, followed by individual tool previews. The LLM is prompted to make this sentence specific, funny, and engaging:
7
+
- System prompt includes imperative `REASONING RULE` with ✅/❌ examples and violation consequences
8
+
- Bottom-of-prompt `REASONING REMINDER` for recency bias
9
+
-`render.FirstSentence()` extracts the first sentence from reasoning content (handles `. ! ?` boundaries, strips "I will"/"I'll", truncates to 20 words)
10
+
- Falls back to classic `ToolPreview()` when the model produces no reasoning content
11
+
- Dedup still works on the reasoning header (`(×N)` for repeated iterations)
12
+
-**Language matching** — the bot always replies in the exact same language the user writes in, enforced at both the top and bottom of the system prompt:
13
+
- Applies to the final answer, the 💭 thinking message, and the progress indicator
14
+
- Includes `LANGUAGE RULE` with examples and consequences
15
+
- Bottom-of-prompt `LANGUAGE REMINDER` for recency bias
16
+
17
+
### Bug Fixes
18
+
-**`internal/loop/loop.go`** — fixed `memMsgIdx` desync after context trimming: when `trimContext` injects a context-warning system message, the memory message index shifts by 1, causing memory content to be silently dropped. Now detects and adjusts the index
19
+
20
+
### Documentation
21
+
-**TELEGRAM.md** — updated Tool Progress docs to describe reasoning-first behavior and language matching
22
+
23
+
### Internal
24
+
-**`render.FirstSentence()`** — new exported function with 6 tests (empty, simple, exclamation, "I will" stripping, no-boundary, long truncation)
25
+
-**`render/render_test.go`** — restored existing test suite (was accidentally overwritten) and appended FirstSentence tests
26
+
-**`cmd/odek/telegram.go`** — removed unused local `truncateWords` closure; replaced with `render.FirstSentence()`
Copy file name to clipboardExpand all lines: docs/TELEGRAM.md
+4-2Lines changed: 4 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -313,12 +313,14 @@ Tool progress shows what the agent is doing in real time. Controlled by the `too
313
313
314
314
| Mode | Behavior |
315
315
|------|----------|
316
-
|`all` (default) |Single editable progress bubble with smart previews — e.g. `📝 read_file: "main.go"`. With edit throttling (1.5s), dedup (`×N` counter), and flood-control fallback |
317
-
|`new`| Like `all` but only updates when the tool name changes — skips consecutive same-tool repeats|
316
+
|`all` (default) |Reasoning-first progress: LLM's first reasoning sentence as header, then individual tool previews below. Eg: `"Let me search that file..."` then `📝 read_file: "main.go"`. With edit throttling (1.5s), dedup, and flood-control fallback |
317
+
|`new`| Like `all` but reasoning header only updates on new iteration|
318
318
|`verbose`| Raw tool arguments as separate messages — `📝 `read_file` {"path":"main.go"}` then `📝 `read_file` ✅ (2KB)` on completion |
319
319
|`off`| No per-tool progress messages — just the thinking preamble and final answer |
320
320
321
321
**Key features:**
322
+
-**Reasoning-first progress** — the first sentence of the LLM's internal reasoning (under 20 words) appears at the top of the progress bubble, followed by individual tool previews. The LLM is prompted to make this sentence user-facing, specific, and engaging
323
+
-**Language matching** — the bot always replies in the same language the user writes in, including the thinking message and progress indicator
322
324
-**Smart previews** — extracts meaningful context: filename for file tools, command for shell, URL for browser, query for memory, filename for transcribe
323
325
-**Edit throttling** — 1.5s minimum between edits prevents Telegram flood control (429 errors)
324
326
-**Tool dedup** — if the same tool runs N times in a row (common with parallel batches), shows `📝 read_file: "main.go" (×5)` instead of 5 identical lines
input:="I think the best approach would be to first check the configuration file and then run the application to see if it works correctly without any errors."
790
+
got:=FirstSentence(input)
791
+
words:=len(strings.Fields(got))
792
+
ifwords>20 {
793
+
t.Errorf("FirstSentence = %q has %d words, want ≤20", got, words)
0 commit comments