@pi-kaush/pi-tool-call-markers 0.3.11 → 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,6 +2,12 @@
2
2
 
3
3
  ## Unreleased
4
4
 
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
+
5
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
package/README.md CHANGED
@@ -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.11",
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/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.