mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-16 17:01:02 +00:00
Release v0.7.26
This commit is contained in:
parent
4afb3231e4
commit
11aa39c5e4
13 changed files with 72 additions and 31 deletions
|
|
@ -2,14 +2,18 @@
|
|||
|
||||
## [Unreleased]
|
||||
|
||||
## [0.7.26] - 2025-11-20
|
||||
|
||||
### 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))
|
||||
|
||||
### 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))
|
||||
- **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
|
||||
|
||||
|
|
|
|||
|
|
@ -396,6 +396,7 @@ Paste multiple lines of text (e.g., code snippets, logs) and they'll be automati
|
|||
- **Tab**: Path completion
|
||||
- **Shift+Tab**: Cycle thinking level (for reasoning-capable models)
|
||||
- **Ctrl+P**: Cycle models (use `--models` to scope)
|
||||
- **Ctrl+O**: Toggle tool output expansion (collapsed ↔ full output)
|
||||
- **Enter**: Send message
|
||||
- **Shift+Enter**: Insert new line (multi-line input)
|
||||
- **Backspace**: Delete character backwards
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"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",
|
||||
"type": "module",
|
||||
"bin": {
|
||||
|
|
@ -21,8 +21,8 @@
|
|||
"prepublishOnly": "npm run clean && npm run build"
|
||||
},
|
||||
"dependencies": {
|
||||
"@mariozechner/pi-agent": "^0.7.25",
|
||||
"@mariozechner/pi-ai": "^0.7.25",
|
||||
"@mariozechner/pi-agent": "^0.7.26",
|
||||
"@mariozechner/pi-ai": "^0.7.26",
|
||||
"chalk": "^5.5.0",
|
||||
"diff": "^8.0.2",
|
||||
"glob": "^11.0.3"
|
||||
|
|
|
|||
|
|
@ -8,8 +8,15 @@ export class CustomEditor extends Editor {
|
|||
public onCtrlC?: () => void;
|
||||
public onShiftTab?: () => void;
|
||||
public onCtrlP?: () => void;
|
||||
public onCtrlO?: () => 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
|
||||
if (data === "\x10" && this.onCtrlP) {
|
||||
this.onCtrlP();
|
||||
|
|
|
|||
|
|
@ -127,6 +127,7 @@ export class ToolExecutionComponent extends Container {
|
|||
private contentText: Text;
|
||||
private toolName: string;
|
||||
private args: any;
|
||||
private expanded = false;
|
||||
private result?: {
|
||||
content: Array<{ type: string; text?: string; data?: string; mimeType?: string }>;
|
||||
isError: boolean;
|
||||
|
|
@ -158,6 +159,11 @@ export class ToolExecutionComponent extends Container {
|
|||
this.updateDisplay();
|
||||
}
|
||||
|
||||
setExpanded(expanded: boolean): void {
|
||||
this.expanded = expanded;
|
||||
this.updateDisplay();
|
||||
}
|
||||
|
||||
private updateDisplay(): void {
|
||||
const bgColor = this.result
|
||||
? this.result.isError
|
||||
|
|
@ -201,7 +207,7 @@ export class ToolExecutionComponent extends Container {
|
|||
const output = this.getTextOutput().trim();
|
||||
if (output) {
|
||||
const lines = output.split("\n");
|
||||
const maxLines = 5;
|
||||
const maxLines = this.expanded ? lines.length : 5;
|
||||
const displayLines = lines.slice(0, maxLines);
|
||||
const remaining = lines.length - maxLines;
|
||||
|
||||
|
|
@ -218,7 +224,7 @@ export class ToolExecutionComponent extends Container {
|
|||
if (this.result) {
|
||||
const output = this.getTextOutput();
|
||||
const lines = output.split("\n");
|
||||
const maxLines = 10;
|
||||
const maxLines = this.expanded ? lines.length : 10;
|
||||
const displayLines = lines.slice(0, maxLines);
|
||||
const remaining = lines.length - maxLines;
|
||||
|
||||
|
|
@ -240,7 +246,7 @@ export class ToolExecutionComponent extends Container {
|
|||
|
||||
// Show first 10 lines of content if available
|
||||
if (fileContent) {
|
||||
const maxLines = 10;
|
||||
const maxLines = this.expanded ? lines.length : 10;
|
||||
const displayLines = lines.slice(0, maxLines);
|
||||
const remaining = lines.length - maxLines;
|
||||
|
||||
|
|
|
|||
|
|
@ -77,6 +77,9 @@ export class TuiRenderer {
|
|||
// Model scope for quick cycling
|
||||
private scopedModels: Model<any>[] = [];
|
||||
|
||||
// Tool output expansion state
|
||||
private toolOutputExpanded = false;
|
||||
|
||||
constructor(
|
||||
agent: Agent,
|
||||
sessionManager: SessionManager,
|
||||
|
|
@ -183,6 +186,9 @@ export class TuiRenderer {
|
|||
chalk.dim("ctrl+p") +
|
||||
chalk.gray(" to cycle models") +
|
||||
"\n" +
|
||||
chalk.dim("ctrl+o") +
|
||||
chalk.gray(" to expand tools") +
|
||||
"\n" +
|
||||
chalk.dim("/") +
|
||||
chalk.gray(" for commands") +
|
||||
"\n" +
|
||||
|
|
@ -248,6 +254,10 @@ export class TuiRenderer {
|
|||
this.cycleModel();
|
||||
};
|
||||
|
||||
this.editor.onCtrlO = () => {
|
||||
this.toggleToolOutputExpansion();
|
||||
};
|
||||
|
||||
// Handle editor submission
|
||||
this.editor.onSubmit = async (text: string) => {
|
||||
text = text.trim();
|
||||
|
|
@ -723,6 +733,19 @@ export class TuiRenderer {
|
|||
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 {
|
||||
this.editor.setText("");
|
||||
this.ui.requestRender();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue