@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 +6 -0
- package/README.md +1 -1
- package/package.json +1 -1
- package/src/muted.ts +9 -9
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 `
|
|
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
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 `
|
|
5
|
-
//
|
|
6
|
-
//
|
|
7
|
-
//
|
|
8
|
-
//
|
|
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 = "
|
|
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
|
|
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
|
|
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.
|