Release v0.7.29

- Show offset/limit in read tool display (e.g., read src/main.ts:100-200)
- Fix PI_CODING_AGENT_DIR env var name in help and code
- Add all API key env vars to help text
This commit is contained in:
Mario Zechner 2025-11-20 20:48:25 +01:00
parent d44073b140
commit ba5bf54af4
12 changed files with 57 additions and 35 deletions

28
package-lock.json generated
View file

@ -5413,11 +5413,11 @@
},
"packages/agent": {
"name": "@mariozechner/pi-agent",
"version": "0.7.28",
"version": "0.7.29",
"license": "MIT",
"dependencies": {
"@mariozechner/pi-ai": "^0.7.27",
"@mariozechner/pi-tui": "^0.7.27"
"@mariozechner/pi-ai": "^0.7.28",
"@mariozechner/pi-tui": "^0.7.28"
},
"devDependencies": {
"@types/node": "^24.3.0",
@ -5443,7 +5443,7 @@
},
"packages/ai": {
"name": "@mariozechner/pi-ai",
"version": "0.7.28",
"version": "0.7.29",
"license": "MIT",
"dependencies": {
"@anthropic-ai/sdk": "^0.61.0",
@ -5490,11 +5490,11 @@
},
"packages/coding-agent": {
"name": "@mariozechner/pi-coding-agent",
"version": "0.7.28",
"version": "0.7.29",
"license": "MIT",
"dependencies": {
"@mariozechner/pi-agent": "^0.7.27",
"@mariozechner/pi-ai": "^0.7.27",
"@mariozechner/pi-agent": "^0.7.28",
"@mariozechner/pi-ai": "^0.7.28",
"chalk": "^5.5.0",
"diff": "^8.0.2",
"glob": "^11.0.3"
@ -5537,10 +5537,10 @@
},
"packages/pods": {
"name": "@mariozechner/pi",
"version": "0.7.28",
"version": "0.7.29",
"license": "MIT",
"dependencies": {
"@mariozechner/pi-agent": "^0.7.27",
"@mariozechner/pi-agent": "^0.7.28",
"chalk": "^5.5.0"
},
"bin": {
@ -5563,7 +5563,7 @@
},
"packages/proxy": {
"name": "@mariozechner/pi-proxy",
"version": "0.7.28",
"version": "0.7.29",
"dependencies": {
"@hono/node-server": "^1.14.0",
"hono": "^4.6.16"
@ -5579,7 +5579,7 @@
},
"packages/tui": {
"name": "@mariozechner/pi-tui",
"version": "0.7.28",
"version": "0.7.29",
"license": "MIT",
"dependencies": {
"@types/mime-types": "^2.1.4",
@ -5661,12 +5661,12 @@
},
"packages/web-ui": {
"name": "@mariozechner/pi-web-ui",
"version": "0.7.28",
"version": "0.7.29",
"license": "MIT",
"dependencies": {
"@lmstudio/sdk": "^1.5.0",
"@mariozechner/pi-ai": "^0.7.27",
"@mariozechner/pi-tui": "^0.7.27",
"@mariozechner/pi-ai": "^0.7.28",
"@mariozechner/pi-tui": "^0.7.28",
"docx-preview": "^0.3.7",
"jszip": "^3.10.1",
"lucide": "^0.544.0",

View file

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

View file

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

View file

@ -2,6 +2,12 @@
## [Unreleased]
## [0.7.29] - 2025-11-20
### Improved
- **Read Tool Display**: When the `read` tool is called with offset/limit parameters, the tool execution now displays the line range in a compact format (e.g., `read src/main.ts:100-200` for offset=100, limit=100).
## [0.7.28] - 2025-11-20
### Added

View file

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

View file

@ -139,10 +139,16 @@ ${chalk.bold("Examples:")}
pi --models claude-sonnet,claude-haiku,gpt-4o
${chalk.bold("Environment Variables:")}
GEMINI_API_KEY - Google Gemini API key
OPENAI_API_KEY - OpenAI API key
ANTHROPIC_API_KEY - Anthropic API key
CODING_AGENT_DIR - Session storage directory (default: ~/.coding-agent)
ANTHROPIC_API_KEY - Anthropic Claude API key
ANTHROPIC_OAUTH_TOKEN - Anthropic OAuth token (alternative to API key)
OPENAI_API_KEY - OpenAI GPT API key
GEMINI_API_KEY - Google Gemini API key
GROQ_API_KEY - Groq API key
CEREBRAS_API_KEY - Cerebras API key
XAI_API_KEY - xAI Grok API key
OPENROUTER_API_KEY - OpenRouter API key
ZAI_API_KEY - ZAI API key
PI_CODING_AGENT_DIR - Session storage directory (default: ~/.pi/agent)
${chalk.bold("Available Tools:")}
read - Read file contents
@ -281,7 +287,7 @@ function loadProjectContextFiles(): Array<{ path: string; content: string }> {
// 1. Load global context from ~/.pi/agent/
const homeDir = homedir();
const globalContextDir = resolve(process.env.CODING_AGENT_DIR || join(homeDir, ".pi/agent/"));
const globalContextDir = resolve(process.env.PI_CODING_AGENT_DIR || join(homeDir, ".pi/agent/"));
const globalContext = loadContextFileFromDir(globalContextDir);
if (globalContext) {
contextFiles.push(globalContext);

View file

@ -83,7 +83,7 @@ export class SessionManager {
// Replace all path separators and colons (for Windows drive letters) with dashes
const safePath = "--" + cwd.replace(/^[/\\]/, "").replace(/[/\\:]/g, "-") + "--";
const configDir = resolve(process.env.CODING_AGENT_DIR || join(homedir(), ".pi/agent/"));
const configDir = resolve(process.env.PI_CODING_AGENT_DIR || join(homedir(), ".pi/agent/"));
const sessionDir = join(configDir, "sessions", safePath);
if (!existsSync(sessionDir)) {
mkdirSync(sessionDir, { recursive: true });

View file

@ -219,7 +219,17 @@ export class ToolExecutionComponent extends Container {
}
} else if (this.toolName === "read") {
const path = shortenPath(this.args?.file_path || this.args?.path || "");
text = chalk.bold("read") + " " + (path ? chalk.cyan(path) : chalk.dim("..."));
const offset = this.args?.offset;
const limit = this.args?.limit;
// Build path display with offset/limit suffix
let pathDisplay = path ? chalk.cyan(path) : chalk.dim("...");
if (offset !== undefined) {
const endLine = limit !== undefined ? offset + limit : "";
pathDisplay += chalk.dim(`:${offset}${endLine ? `-${endLine}` : ""}`);
}
text = chalk.bold("read") + " " + pathDisplay;
if (this.result) {
const output = this.getTextOutput();

View file

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

View file

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

View file

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

View file

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