Release v0.25.2

This commit is contained in:
Mario Zechner 2025-12-21 02:59:03 +01:00
parent d07d784ed3
commit 299986f06b
12 changed files with 54 additions and 41 deletions

View file

@ -2,6 +2,12 @@
## [Unreleased]
## [0.25.2] - 2025-12-21
### Fixed
- **Image shifting in tool output**: Fixed an issue where images in tool output would shift down (due to accumulating spacers) each time the tool output was expanded or collapsed via Ctrl+O.
## [0.25.1] - 2025-12-21
### Fixed

View file

@ -1,6 +1,6 @@
{
"name": "@mariozechner/pi-coding-agent",
"version": "0.25.1",
"version": "0.25.2",
"description": "Coding agent CLI with read, bash, edit, write tools and session management",
"type": "module",
"piConfig": {
@ -39,9 +39,9 @@
"prepublishOnly": "npm run clean && npm run build"
},
"dependencies": {
"@mariozechner/pi-agent-core": "^0.25.1",
"@mariozechner/pi-ai": "^0.25.1",
"@mariozechner/pi-tui": "^0.25.1",
"@mariozechner/pi-agent-core": "^0.25.2",
"@mariozechner/pi-ai": "^0.25.2",
"@mariozechner/pi-tui": "^0.25.2",
"chalk": "^5.5.0",
"cli-highlight": "^2.1.11",
"diff": "^8.0.2",

View file

@ -44,6 +44,7 @@ export class ToolExecutionComponent extends Container {
private contentBox?: Box; // Only used for custom tools
private contentText: Text; // For built-in tools (with its own padding/bg)
private imageComponents: Image[] = [];
private imageSpacers: Spacer[] = [];
private toolName: string;
private args: any;
private expanded = false;
@ -173,6 +174,10 @@ export class ToolExecutionComponent extends Container {
this.removeChild(img);
}
this.imageComponents = [];
for (const spacer of this.imageSpacers) {
this.removeChild(spacer);
}
this.imageSpacers = [];
if (this.result) {
const imageBlocks = this.result.content?.filter((c: any) => c.type === "image") || [];
@ -180,7 +185,9 @@ export class ToolExecutionComponent extends Container {
for (const img of imageBlocks) {
if (caps.images && this.showImages && img.data && img.mimeType) {
this.addChild(new Spacer(1));
const spacer = new Spacer(1);
this.addChild(spacer);
this.imageSpacers.push(spacer);
const imageComponent = new Image(
img.data,
img.mimeType,