@pi-kaush/pi-tool-call-markers 0.3.10 → 0.3.12

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/CHANGELOG.md CHANGED
@@ -2,10 +2,16 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
- - Give the codemode tool its own `¢¢` anchor and collapsed label. Codemode
5
+ - Paint collapsed rows with the theme's `dim` token instead of
6
+ `syntaxComment`. Pi's generated `system` theme solves `syntaxComment` to
7
+ the same contrast as `muted` and `toolOutput`, so collapsed tool calls
8
+ read almost like chat text there. `dim` stays a step below in every
9
+ theme; `collapsedToolCall` and `collapsedThinkingCall` overrides still win.
10
+
11
+ - Give the codemode tool its own `¢` anchor and collapsed label. Codemode
6
12
  rows used to collapse to a script preview; they now show the nested
7
13
  calls the script ran (repeats deduped to `name ×N`) followed by the
8
- script's `// @options:` params — `¢¢ read ×2, fffind · "max_output_tokens":
14
+ script's `// @options:` params — `¢ read ×2, fffind · "max_output_tokens":
9
15
  2500, "timeout_ms": 120000` — so the row says what the script did and
10
16
  how it ran. While the script streams, the call list grows live; scripts
11
17
  with neither calls nor a parsable options line keep the generic args
package/README.md CHANGED
@@ -21,7 +21,7 @@ Collapsed tool rows use semantic theme colors with no gear, background fill, box
21
21
  ```
22
22
 
23
23
  - **Two-column outer inset.** Tool markers and image output align with an inset conversation surface. Very narrow terminals reduce the decoration before useful content.
24
- - **`│` tool-call rail.** Every collapsed call anchors on a bold glyph instead of its tool name — `●` read, `+` write, `±` edit, `○` local search, `≡` ls, `↗` web search and fetch, `¢¢` codemode, and `$` bash; unmapped tools fall back to `*` — with a single space between the anchor and the call text, no joining colon. Grouped rows flow directly across tool types.
24
+ - **`│` tool-call rail.** Every collapsed call anchors on a bold glyph instead of its tool name — `●` read, `+` write, `±` edit, `○` local search, `≡` ls, `↗` web search and fetch, `¢` codemode, and `$` bash; unmapped tools fall back to `*` — with a single space between the anchor and the call text, no joining colon. Grouped rows flow directly across tool types.
25
25
  - **Semantic, low-contrast status.** The anchor and the call content share the collapsed mute, pending state is warning-colored, and failures remain error-colored. Ordinary tool states have no background.
26
26
  - **Width-safe outcome tails.** Long summaries truncate before useful tails such as `→ done`, `→ 42 lines`, `→ +2/-1`, or a `bash` duration.
27
27
  - **Stable running groups.** Adjacent calls group as they appear, including settled failures, which stay error-colored inside the group. Pending state and elapsed `bash` time settle into the final outcome without changing the row count.
@@ -135,7 +135,7 @@ Names are comma-separated and matched exactly. Listed rows never join a group, a
135
135
 
136
136
  ### Collapsed-row colors
137
137
 
138
- Collapsed rows (tool calls, `+ Thought`, subagents) default to the theme's `syntaxComment` color — it ships with every Pi theme and reads as a muted tone — with the row's anchor and the call content sharing it. Failures stay error-colored and live spinners keep their existing tints.
138
+ Collapsed rows (tool calls, `+ Thought`, subagents) default to the theme's `dim` color — it ships with every Pi theme and sits below `muted`, including in the generated `system` theme — with the row's anchor and the call content sharing it. Failures stay error-colored and live spinners keep their existing tints.
139
139
 
140
140
  A theme can override each collapsed kind independently with optional color tokens:
141
141
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-kaush/pi-tool-call-markers",
3
- "version": "0.3.10",
3
+ "version": "0.3.12",
4
4
  "description": "Compact and group Pi tool calls, with a bundled extension for adjacent thinking blocks.",
5
5
  "license": "MIT",
6
6
  "author": "Kaushik Gopal",
package/src/index.ts CHANGED
@@ -42,7 +42,7 @@ const TOOL_CALL_GLYPHS: ReadonlyMap<string, string> = new Map([
42
42
  ["web_search", "↗"],
43
43
  ["fetch_content", "↗"],
44
44
  ["get_search_content", "↗"],
45
- ["codemode", "¢¢"],
45
+ ["codemode", "¢"],
46
46
  ]);
47
47
  const PRESENTATION_PATCHED = Symbol.for("kg.pi.toolPresentation.v3");
48
48
  const LEGACY_PRESENTATION_PATCHED = Symbol.for("kg.pi.toolPresentation.v2");
package/src/muted.ts CHANGED
@@ -1,17 +1,18 @@
1
1
  // Collapsed-row color policy.
2
2
  //
3
3
  // Collapsed blocks (tool calls, settled "+ Thought" labels, subagent rows)
4
- // default to the theme's `syntaxComment` token — it ships with every Pi
5
- // theme and reads as a muted tone — instead of the louder
6
- // muted/toolTitle/toolOutput split. A theme can override each collapsed
7
- // kind independently with a `collapsedToolCall` or `collapsedThinkingCall`
8
- // color token.
4
+ // default to the theme's `dim` token — it ships with every Pi theme and sits
5
+ // below `muted` — instead of the louder muted/toolTitle/toolOutput split.
6
+ // Pi's generated `system` theme solves `syntaxComment` to the same contrast
7
+ // as `muted`, so only `dim` keeps collapsed rows clearly behind chat text.
8
+ // A theme can override each collapsed kind independently with a
9
+ // `collapsedToolCall` or `collapsedThinkingCall` color token.
9
10
  //
10
11
  // Failures always fall back to the historical tokens.
11
12
 
12
13
  const TOOL_OVERRIDE_TOKEN = "collapsedToolCall";
13
14
  const THINKING_OVERRIDE_TOKEN = "collapsedThinkingCall";
14
- const DEFAULT_TOKEN = "syntaxComment";
15
+ const DEFAULT_TOKEN = "dim";
15
16
 
16
17
  type CollapsedTheme = {
17
18
  fg(color: string, text: string): string;
@@ -57,7 +58,7 @@ export function paletteSample(theme: CollapsedTheme): string {
57
58
  return PALETTE_TOKENS.map((token) => tokenAnsi(theme, token) ?? "").join(",");
58
59
  }
59
60
 
60
- // Override token when defined, else the theme's syntaxComment color, else
61
+ // Override token when defined, else the theme's dim color, else
61
62
  // null (caller falls back to the historical tokens).
62
63
  function collapsedAnsi(
63
64
  theme: CollapsedTheme,
@@ -95,8 +96,7 @@ export function fgCollapsed(
95
96
  }
96
97
 
97
98
  // Decoration rails recede further than collapsed text. No palette token is
98
- // guaranteed lighter than the collapsed color (e.g. catppuccin-latte's `dim`
99
- // resolves to the same overlay0 as syntaxComment), so apply the terminal's
99
+ // guaranteed lighter than the collapsed `dim` color, so apply the terminal's
100
100
  // faint attribute: it lightens toward the background on light themes and
101
101
  // darkens on dark ones. The rail keeps this muted weight even on failed
102
102
  // rows, where only the row's text turns error-colored.