Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.4.2] - 2026-06-14

### Fixed

- 🔧 **Tool calls no longer jump to the top during streaming.** Fixed a regression from 0.4.1 where tool call indicators appeared at the very top of the assistant message while streaming, instead of in their correct position after the preceding text. They would snap back to the correct position only after the response completed. Caused by a premature text buffer flush in the usage event handler that was left over from the pre-parallel-execution refactor.

## [0.4.1] - 2026-06-13

### Changed
Expand Down
2 changes: 1 addition & 1 deletion cptr/utils/chat_task.py
Original file line number Diff line number Diff line change
Expand Up @@ -1042,7 +1042,6 @@ def _sync_state():
pending_calls.append(event)

elif event["type"] == "usage":
_flush_text()
usage = {k: v for k, v in event.items() if k != "type"}
if "total_tokens" not in usage:
usage["total_tokens"] = usage.get("input_tokens", 0) + usage.get(
Expand All @@ -1053,6 +1052,7 @@ def _sync_state():

if not pending_calls:
# No tool calls — final response, we're done
_flush_text()
logger.info(
"[task %s] save (usage): content=%d chars, output=%d items, types=%s",
message_id[:8],
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "cptr"
version = "0.4.1"
version = "0.4.2"
description = "Your computer, from anywhere. Code, manage, and control your machine from the web."
license = {file = "LICENSE"}
readme = "README.md"
Expand Down
Loading
Loading