Release v0.7.26

This commit is contained in:
Mario Zechner 2025-11-20 17:29:24 +01:00
parent 4afb3231e4
commit 11aa39c5e4
13 changed files with 72 additions and 31 deletions

28
package-lock.json generated
View file

@ -3195,11 +3195,11 @@
}, },
"packages/agent": { "packages/agent": {
"name": "@mariozechner/pi-agent", "name": "@mariozechner/pi-agent",
"version": "0.7.25", "version": "0.7.26",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@mariozechner/pi-ai": "^0.7.24", "@mariozechner/pi-ai": "^0.7.25",
"@mariozechner/pi-tui": "^0.7.24" "@mariozechner/pi-tui": "^0.7.25"
}, },
"devDependencies": { "devDependencies": {
"@types/node": "^24.3.0", "@types/node": "^24.3.0",
@ -3225,7 +3225,7 @@
}, },
"packages/ai": { "packages/ai": {
"name": "@mariozechner/pi-ai", "name": "@mariozechner/pi-ai",
"version": "0.7.25", "version": "0.7.26",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@anthropic-ai/sdk": "^0.61.0", "@anthropic-ai/sdk": "^0.61.0",
@ -3272,11 +3272,11 @@
}, },
"packages/coding-agent": { "packages/coding-agent": {
"name": "@mariozechner/pi-coding-agent", "name": "@mariozechner/pi-coding-agent",
"version": "0.7.25", "version": "0.7.26",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@mariozechner/pi-agent": "^0.7.24", "@mariozechner/pi-agent": "^0.7.25",
"@mariozechner/pi-ai": "^0.7.24", "@mariozechner/pi-ai": "^0.7.25",
"chalk": "^5.5.0", "chalk": "^5.5.0",
"diff": "^8.0.2", "diff": "^8.0.2",
"glob": "^11.0.3" "glob": "^11.0.3"
@ -3319,10 +3319,10 @@
}, },
"packages/pods": { "packages/pods": {
"name": "@mariozechner/pi", "name": "@mariozechner/pi",
"version": "0.7.25", "version": "0.7.26",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@mariozechner/pi-agent": "^0.7.24", "@mariozechner/pi-agent": "^0.7.25",
"chalk": "^5.5.0" "chalk": "^5.5.0"
}, },
"bin": { "bin": {
@ -3345,7 +3345,7 @@
}, },
"packages/proxy": { "packages/proxy": {
"name": "@mariozechner/pi-proxy", "name": "@mariozechner/pi-proxy",
"version": "0.7.25", "version": "0.7.26",
"dependencies": { "dependencies": {
"@hono/node-server": "^1.14.0", "@hono/node-server": "^1.14.0",
"hono": "^4.6.16" "hono": "^4.6.16"
@ -3361,7 +3361,7 @@
}, },
"packages/tui": { "packages/tui": {
"name": "@mariozechner/pi-tui", "name": "@mariozechner/pi-tui",
"version": "0.7.25", "version": "0.7.26",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@types/mime-types": "^2.1.4", "@types/mime-types": "^2.1.4",
@ -3400,12 +3400,12 @@
}, },
"packages/web-ui": { "packages/web-ui": {
"name": "@mariozechner/pi-web-ui", "name": "@mariozechner/pi-web-ui",
"version": "0.7.25", "version": "0.7.26",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@lmstudio/sdk": "^1.5.0", "@lmstudio/sdk": "^1.5.0",
"@mariozechner/pi-ai": "^0.7.24", "@mariozechner/pi-ai": "^0.7.25",
"@mariozechner/pi-tui": "^0.7.24", "@mariozechner/pi-tui": "^0.7.25",
"docx-preview": "^0.3.7", "docx-preview": "^0.3.7",
"jszip": "^3.10.1", "jszip": "^3.10.1",
"lucide": "^0.544.0", "lucide": "^0.544.0",

View file

@ -1,6 +1,6 @@
{ {
"name": "@mariozechner/pi-agent", "name": "@mariozechner/pi-agent",
"version": "0.7.25", "version": "0.7.26",
"description": "General-purpose agent with transport abstraction, state management, and attachment support", "description": "General-purpose agent with transport abstraction, state management, and attachment support",
"type": "module", "type": "module",
"main": "./dist/index.js", "main": "./dist/index.js",
@ -18,8 +18,8 @@
"prepublishOnly": "npm run clean && npm run build" "prepublishOnly": "npm run clean && npm run build"
}, },
"dependencies": { "dependencies": {
"@mariozechner/pi-ai": "^0.7.25", "@mariozechner/pi-ai": "^0.7.26",
"@mariozechner/pi-tui": "^0.7.25" "@mariozechner/pi-tui": "^0.7.26"
}, },
"keywords": [ "keywords": [
"ai", "ai",

View file

@ -1,6 +1,6 @@
{ {
"name": "@mariozechner/pi-ai", "name": "@mariozechner/pi-ai",
"version": "0.7.25", "version": "0.7.26",
"description": "Unified LLM API with automatic model discovery and provider configuration", "description": "Unified LLM API with automatic model discovery and provider configuration",
"type": "module", "type": "module",
"main": "./dist/index.js", "main": "./dist/index.js",

View file

@ -2,14 +2,18 @@
## [Unreleased] ## [Unreleased]
## [0.7.26] - 2025-11-20
### Added ### Added
- **Tool Output Expansion**: Press `Ctrl+O` to toggle between collapsed and expanded tool output display. Expands all tool call outputs (bash, read, write, etc.) to show full content instead of truncated previews. ([#31](https://github.com/badlogic/pi-mono/issues/31))
- **Custom Headers**: Added support for custom HTTP headers in `models.json` configuration. Headers can be specified at both provider and model level, with model-level headers overriding provider-level ones. This enables bypassing Cloudflare bot detection and other proxy requirements. ([#39](https://github.com/badlogic/pi-mono/issues/39)) - **Custom Headers**: Added support for custom HTTP headers in `models.json` configuration. Headers can be specified at both provider and model level, with model-level headers overriding provider-level ones. This enables bypassing Cloudflare bot detection and other proxy requirements. ([#39](https://github.com/badlogic/pi-mono/issues/39))
### Fixed ### Fixed
- **Chutes AI Provider**: Fixed 400 errors when using Chutes AI provider. Added compatibility fixes for `store` field exclusion, `max_tokens` parameter usage, and system prompt role handling. ([#42](https://github.com/badlogic/pi-mono/pull/42) by [@butelo](https://github.com/butelo)) - **Chutes AI Provider**: Fixed 400 errors when using Chutes AI provider. Added compatibility fixes for `store` field exclusion, `max_tokens` parameter usage, and system prompt role handling. ([#42](https://github.com/badlogic/pi-mono/pull/42) by [@butelo](https://github.com/butelo))
- **Mistral/Chutes Syntax Error**: Fixed syntax error in merged PR that used `iif` instead of `if`. - **Mistral/Chutes Syntax Error**: Fixed syntax error in merged PR that used `iif` instead of `if`.
- **Anthropic OAuth Bug**: Fixed bug where `process.env.ANTHROPIC_API_KEY = undefined` set the env var to string "undefined" instead of deleting it. Now uses `delete` operator.
## [0.7.25] - 2025-11-20 ## [0.7.25] - 2025-11-20

View file

@ -396,6 +396,7 @@ Paste multiple lines of text (e.g., code snippets, logs) and they'll be automati
- **Tab**: Path completion - **Tab**: Path completion
- **Shift+Tab**: Cycle thinking level (for reasoning-capable models) - **Shift+Tab**: Cycle thinking level (for reasoning-capable models)
- **Ctrl+P**: Cycle models (use `--models` to scope) - **Ctrl+P**: Cycle models (use `--models` to scope)
- **Ctrl+O**: Toggle tool output expansion (collapsed ↔ full output)
- **Enter**: Send message - **Enter**: Send message
- **Shift+Enter**: Insert new line (multi-line input) - **Shift+Enter**: Insert new line (multi-line input)
- **Backspace**: Delete character backwards - **Backspace**: Delete character backwards

View file

@ -1,6 +1,6 @@
{ {
"name": "@mariozechner/pi-coding-agent", "name": "@mariozechner/pi-coding-agent",
"version": "0.7.25", "version": "0.7.26",
"description": "Coding agent CLI with read, bash, edit, write tools and session management", "description": "Coding agent CLI with read, bash, edit, write tools and session management",
"type": "module", "type": "module",
"bin": { "bin": {
@ -21,8 +21,8 @@
"prepublishOnly": "npm run clean && npm run build" "prepublishOnly": "npm run clean && npm run build"
}, },
"dependencies": { "dependencies": {
"@mariozechner/pi-agent": "^0.7.25", "@mariozechner/pi-agent": "^0.7.26",
"@mariozechner/pi-ai": "^0.7.25", "@mariozechner/pi-ai": "^0.7.26",
"chalk": "^5.5.0", "chalk": "^5.5.0",
"diff": "^8.0.2", "diff": "^8.0.2",
"glob": "^11.0.3" "glob": "^11.0.3"

View file

@ -8,8 +8,15 @@ export class CustomEditor extends Editor {
public onCtrlC?: () => void; public onCtrlC?: () => void;
public onShiftTab?: () => void; public onShiftTab?: () => void;
public onCtrlP?: () => void; public onCtrlP?: () => void;
public onCtrlO?: () => void;
handleInput(data: string): void { handleInput(data: string): void {
// Intercept Ctrl+O for tool output expansion
if (data === "\x0f" && this.onCtrlO) {
this.onCtrlO();
return;
}
// Intercept Ctrl+P for model cycling // Intercept Ctrl+P for model cycling
if (data === "\x10" && this.onCtrlP) { if (data === "\x10" && this.onCtrlP) {
this.onCtrlP(); this.onCtrlP();

View file

@ -127,6 +127,7 @@ export class ToolExecutionComponent extends Container {
private contentText: Text; private contentText: Text;
private toolName: string; private toolName: string;
private args: any; private args: any;
private expanded = false;
private result?: { private result?: {
content: Array<{ type: string; text?: string; data?: string; mimeType?: string }>; content: Array<{ type: string; text?: string; data?: string; mimeType?: string }>;
isError: boolean; isError: boolean;
@ -158,6 +159,11 @@ export class ToolExecutionComponent extends Container {
this.updateDisplay(); this.updateDisplay();
} }
setExpanded(expanded: boolean): void {
this.expanded = expanded;
this.updateDisplay();
}
private updateDisplay(): void { private updateDisplay(): void {
const bgColor = this.result const bgColor = this.result
? this.result.isError ? this.result.isError
@ -201,7 +207,7 @@ export class ToolExecutionComponent extends Container {
const output = this.getTextOutput().trim(); const output = this.getTextOutput().trim();
if (output) { if (output) {
const lines = output.split("\n"); const lines = output.split("\n");
const maxLines = 5; const maxLines = this.expanded ? lines.length : 5;
const displayLines = lines.slice(0, maxLines); const displayLines = lines.slice(0, maxLines);
const remaining = lines.length - maxLines; const remaining = lines.length - maxLines;
@ -218,7 +224,7 @@ export class ToolExecutionComponent extends Container {
if (this.result) { if (this.result) {
const output = this.getTextOutput(); const output = this.getTextOutput();
const lines = output.split("\n"); const lines = output.split("\n");
const maxLines = 10; const maxLines = this.expanded ? lines.length : 10;
const displayLines = lines.slice(0, maxLines); const displayLines = lines.slice(0, maxLines);
const remaining = lines.length - maxLines; const remaining = lines.length - maxLines;
@ -240,7 +246,7 @@ export class ToolExecutionComponent extends Container {
// Show first 10 lines of content if available // Show first 10 lines of content if available
if (fileContent) { if (fileContent) {
const maxLines = 10; const maxLines = this.expanded ? lines.length : 10;
const displayLines = lines.slice(0, maxLines); const displayLines = lines.slice(0, maxLines);
const remaining = lines.length - maxLines; const remaining = lines.length - maxLines;

View file

@ -77,6 +77,9 @@ export class TuiRenderer {
// Model scope for quick cycling // Model scope for quick cycling
private scopedModels: Model<any>[] = []; private scopedModels: Model<any>[] = [];
// Tool output expansion state
private toolOutputExpanded = false;
constructor( constructor(
agent: Agent, agent: Agent,
sessionManager: SessionManager, sessionManager: SessionManager,
@ -183,6 +186,9 @@ export class TuiRenderer {
chalk.dim("ctrl+p") + chalk.dim("ctrl+p") +
chalk.gray(" to cycle models") + chalk.gray(" to cycle models") +
"\n" + "\n" +
chalk.dim("ctrl+o") +
chalk.gray(" to expand tools") +
"\n" +
chalk.dim("/") + chalk.dim("/") +
chalk.gray(" for commands") + chalk.gray(" for commands") +
"\n" + "\n" +
@ -248,6 +254,10 @@ export class TuiRenderer {
this.cycleModel(); this.cycleModel();
}; };
this.editor.onCtrlO = () => {
this.toggleToolOutputExpansion();
};
// Handle editor submission // Handle editor submission
this.editor.onSubmit = async (text: string) => { this.editor.onSubmit = async (text: string) => {
text = text.trim(); text = text.trim();
@ -723,6 +733,19 @@ export class TuiRenderer {
this.ui.requestRender(); this.ui.requestRender();
} }
private toggleToolOutputExpansion(): void {
this.toolOutputExpanded = !this.toolOutputExpanded;
// Update all tool execution components
for (const child of this.chatContainer.children) {
if (child instanceof ToolExecutionComponent) {
child.setExpanded(this.toolOutputExpanded);
}
}
this.ui.requestRender();
}
clearEditor(): void { clearEditor(): void {
this.editor.setText(""); this.editor.setText("");
this.ui.requestRender(); this.ui.requestRender();

View file

@ -1,6 +1,6 @@
{ {
"name": "@mariozechner/pi", "name": "@mariozechner/pi",
"version": "0.7.25", "version": "0.7.26",
"description": "CLI tool for managing vLLM deployments on GPU pods", "description": "CLI tool for managing vLLM deployments on GPU pods",
"type": "module", "type": "module",
"bin": { "bin": {
@ -34,7 +34,7 @@
"node": ">=20.0.0" "node": ">=20.0.0"
}, },
"dependencies": { "dependencies": {
"@mariozechner/pi-agent": "^0.7.25", "@mariozechner/pi-agent": "^0.7.26",
"chalk": "^5.5.0" "chalk": "^5.5.0"
}, },
"devDependencies": {} "devDependencies": {}

View file

@ -1,6 +1,6 @@
{ {
"name": "@mariozechner/pi-proxy", "name": "@mariozechner/pi-proxy",
"version": "0.7.25", "version": "0.7.26",
"type": "module", "type": "module",
"description": "CORS and authentication proxy for pi-ai", "description": "CORS and authentication proxy for pi-ai",
"main": "dist/index.js", "main": "dist/index.js",

View file

@ -1,6 +1,6 @@
{ {
"name": "@mariozechner/pi-tui", "name": "@mariozechner/pi-tui",
"version": "0.7.25", "version": "0.7.26",
"description": "Terminal User Interface library with differential rendering for efficient text-based applications", "description": "Terminal User Interface library with differential rendering for efficient text-based applications",
"type": "module", "type": "module",
"main": "dist/index.js", "main": "dist/index.js",

View file

@ -1,6 +1,6 @@
{ {
"name": "@mariozechner/pi-web-ui", "name": "@mariozechner/pi-web-ui",
"version": "0.7.25", "version": "0.7.26",
"description": "Reusable web UI components for AI chat interfaces powered by @mariozechner/pi-ai", "description": "Reusable web UI components for AI chat interfaces powered by @mariozechner/pi-ai",
"type": "module", "type": "module",
"main": "dist/index.js", "main": "dist/index.js",
@ -18,8 +18,8 @@
}, },
"dependencies": { "dependencies": {
"@lmstudio/sdk": "^1.5.0", "@lmstudio/sdk": "^1.5.0",
"@mariozechner/pi-ai": "^0.7.25", "@mariozechner/pi-ai": "^0.7.26",
"@mariozechner/pi-tui": "^0.7.25", "@mariozechner/pi-tui": "^0.7.26",
"docx-preview": "^0.3.7", "docx-preview": "^0.3.7",
"jszip": "^3.10.1", "jszip": "^3.10.1",
"lucide": "^0.544.0", "lucide": "^0.544.0",