mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-16 19:04:37 +00:00
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:
parent
d44073b140
commit
ba5bf54af4
12 changed files with 57 additions and 35 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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 });
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue