From 8c1724fc6af8a223666eecd4687c29f1371d6ddd Mon Sep 17 00:00:00 2001 From: Igor Soarez Date: Mon, 5 Oct 2026 09:40:20 +0300 Subject: pi: compact tool output, pinned, 3-line previews for every tool pi-compact-tools draws each tool call as a short, expandable row; Ctrl+O shows the whole result. Every built-in and every custom tool, MCP ones included, is compacted and starts as a 3-line preview -- previewLines only applies to rows that do not start hidden, so nothing does. Pinned to the v0.14.0 commit, byte-identical to the npm tarball: the package had 32 releases in its first three weeks, and unpinned that would be new code across the fleet nearly every day. The config is linked rather than generated so it is the same everywhere, and /compact-tools saves through the link by design. AGENTS.md now says which linked files their tools rewrite, and that such a change is not an agent's to commit or revert. From change request 4d685a. --- AGENTS.md | 2 ++ config/pi/compact-tools.json | 28 ++++++++++++++++++++++++++++ config/pi/settings.json | 3 ++- link.sh | 1 + 4 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 config/pi/compact-tools.json diff --git a/AGENTS.md b/AGENTS.md index 316f972..64d3b52 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -268,6 +268,8 @@ theme --list-bat ### Configuration Management The repository uses a centralized linking system where `link.sh` creates symlinks from `config/` files to their expected locations in `$HOME` and `$XDG_CONFIG_HOME`. This allows version control of dotfiles while maintaining standard file locations. +Two linked files are rewritten by the tool that reads them, so on a machine in use they differ from the repo and that is their normal state: `config/claude/settings.json`, which Claude Code writes to (model, theme), and `config/pi/compact-tools.json`, which pi-compact-tools' `/compact-tools` command saves through the link on purpose. **Do not commit, revert or "fix" a change to either without asking.** One meant for every machine is committed deliberately; one that is a single machine's preference stays where it is. + `link.sh` holds only the plain one-line links. Anything with logic of its own is a part in `link/` (`ssh`, `claude`, `pi`, `skills`, `icloud`, `hammerspoon`, `kwin`): a script with the same `[yes]` dry-run interface that decides for itself whether it applies, and can be run alone (`link/ssh.sh yes`). Shared helpers are in `link/lib.sh`. New logic goes in a part, not in `link.sh`. A part named in `~/.config/dot/skip`, one per line, does nothing on that machine — whether it is reached through `link.sh` or run on its own. That file is hand-written and in no repo, like `~/.localenv`: it is for a machine where a part would do the wrong thing, such as one whose `~/.claude/settings.json` belongs to its owner rather than to this account, and it keeps that machine's exception out of this repo, which every machine shares. diff --git a/config/pi/compact-tools.json b/config/pi/compact-tools.json new file mode 100644 index 0000000..09a5768 --- /dev/null +++ b/config/pi/compact-tools.json @@ -0,0 +1,28 @@ +{ + "style": "compact", + "tools": [ + "read", + "write", + "edit", + "bash", + "powershell", + "grep", + "find", + "ls" + ], + "previewLines": 3, + "auto_compact": { + "read": false, + "write": false, + "edit": false, + "bash": false, + "powershell": false, + "grep": false, + "find": false, + "ls": false + }, + "custom_tools": { + "enabled": true, + "auto_compact": false + } +} diff --git a/config/pi/settings.json b/config/pi/settings.json index 239fe1b..9891dcc 100644 --- a/config/pi/settings.json +++ b/config/pi/settings.json @@ -6,6 +6,7 @@ "theme": "dark", "packages": [ "npm:@narumitw/pi-goal", - "git:github.com/Optomatica/pi-auto-session-name@3253c3d1c29c71cb034b2fbffb3efe5f83d35802" + "git:github.com/Optomatica/pi-auto-session-name@3253c3d1c29c71cb034b2fbffb3efe5f83d35802", + "git:github.com/nedleeds/pi-compact-tools@bfbf9a7d85dc757f089bd296e65d81847fc9e030" ] } diff --git a/link.sh b/link.sh index 4f5bbff..a1f61b2 100755 --- a/link.sh +++ b/link.sh @@ -36,6 +36,7 @@ link_all "$config_dir/bat" "$xdg_config_dir/bat" link "$config_dir/aider.conf.yml" "$HOME/.aider.conf.yml" link "$config_dir/pi/extensions" "$HOME/.pi/agent/extensions" +link "$config_dir/pi/compact-tools.json" "$HOME/.pi/agent/compact-tools.json" # settings.json and models.json are both generated by link/pi.sh; AGENTS.md and # mcp.json, if any, come from another layer. -- cgit v1.2.3