@trim21/personal-pi-extensions 0.0.289 → 0.0.290

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trim21/personal-pi-extensions",
3
- "version": "0.0.289",
3
+ "version": "0.0.290",
4
4
  "type": "module",
5
5
  "description": "Custom pi coding-agent extensions: bwrap sandbox, workspace guard, opencode edit, and more",
6
6
  "keywords": [
@@ -53,8 +53,8 @@ const MAX_OUTPUT_BYTES = 50 * 1024;
53
53
  const DEFAULT_TOOLS = ["read", "grep", "find", "ls"];
54
54
  /** Progress log keeps only the most recent lines (rolling window). */
55
55
  const MAX_PROGRESS_LINES = 5;
56
- /** Progress line content (without the `tool:` / `text:` prefix) is capped at 15 chars; longer text is folded to the first/last 7 chars joined by `…`. */
57
- const MAX_PROGRESS_CHARS_PER_LINE = 15;
56
+ /** Progress line content (without the `tool:` / `text:` prefix) is capped at 21 chars; longer text is folded to the first/last 9 chars joined by ` … `. */
57
+ const MAX_PROGRESS_CHARS_PER_LINE = 21;
58
58
 
59
59
  /**
60
60
  * Tool → extension override map: when a subagent's frontmatter enables a
@@ -134,15 +134,15 @@ function getFinalOutput(messages: AgentMessage[]): string {
134
134
  }
135
135
 
136
136
  /**
137
- * Fold over-long progress line content: keep the first/last 7 chars joined by
138
- * a single `…` ellipsis, so the folded line never exceeds
139
- * `MAX_PROGRESS_CHARS_PER_LINE` chars (7 + 1 + 7 = 15). Shorter text is
137
+ * Fold over-long progress line content: keep the first/last 9 chars joined by
138
+ * ` ` (space, ellipsis, space), so the folded line never exceeds
139
+ * `MAX_PROGRESS_CHARS_PER_LINE` chars (9 + 3 + 9 = 21). Shorter text is
140
140
  * returned as-is.
141
141
  */
142
142
  function foldProgressLine(text: string): string {
143
143
  if (text.length <= MAX_PROGRESS_CHARS_PER_LINE) return text;
144
- const keep = Math.floor((MAX_PROGRESS_CHARS_PER_LINE - 1) / 2);
145
- return `${text.slice(0, keep)}…${text.slice(-keep)}`;
144
+ const keep = Math.floor((MAX_PROGRESS_CHARS_PER_LINE - 3) / 2);
145
+ return `${text.slice(0, keep)} … ${text.slice(-keep)}`;
146
146
  }
147
147
 
148
148
  function formatTokens(count: number): string {