pi-compact-tools 0.4.0 → 0.4.2

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/README.md CHANGED
@@ -35,6 +35,7 @@ Completed `edit` rows show their full diff initially by default. The per-tool `a
35
35
  - Click or `Ctrl+O` always cycles through meaningful detail levels
36
36
  - Short previews, full output, and initially visible edit diffs by default
37
37
  - Dark `│` and `└─` visual grouping
38
+ - Distinct cool-blue thinking text
38
39
  - Windows, Unix, and classic Mac line-ending support
39
40
  - No Nerd Font requirement
40
41
 
@@ -101,6 +102,8 @@ Default configuration:
101
102
 
102
103
  These defaults use emoji and standard Unicode, so they work without a Nerd Font. Fast tools finish immediately; no artificial spinner delay is added.
103
104
 
105
+ For a minimal blinking spinner that reuses the successful-tool circle, copy [`examples/compact-tools-2.json`](examples/compact-tools-2.json). Its frames use `● ● (blank) ● ●` at 120 ms intervals. The renderer's built-in frame dimming turns this into a fade-out/fade-in animation without Nerd Font glyphs. Duration indicators use a small `•` whose color changes by elapsed time; the fast tier uses the theme's warning color value `#E0A052` directly. Rename it to `compact-tools.json` or copy its contents to the active configuration path.
106
+
104
107
  `auto_compact` controls each tool's initial state independently:
105
108
 
106
109
  - `true` starts at the compact summary.
@@ -0,0 +1,21 @@
1
+ {
2
+ "$schema": "https://raw.githubusercontent.com/nedleeds/pi-compact-tools/main/schemas/compact-tools.schema.json",
3
+ "tools": ["read", "write", "edit", "bash"],
4
+ "auto_compact": {
5
+ "read": true,
6
+ "write": true,
7
+ "edit": false,
8
+ "bash": true
9
+ },
10
+ "previewLines": 10,
11
+ "spinner": {
12
+ "frames": ["●", "●", " ", "●", "●"],
13
+ "intervalMs": 120
14
+ },
15
+ "durationIndicators": [
16
+ { "underMs": 1000, "icon": "•", "color": "#E0A052" },
17
+ { "underMs": 10000, "icon": "•", "color": "#D95C3F" },
18
+ { "underMs": 30000, "icon": "•", "color": "#79C0FF" },
19
+ { "icon": "•", "color": "#D2A8FF" }
20
+ ]
21
+ }
@@ -53,6 +53,7 @@ export function normalizeLineEndings(value: string): string {
53
53
  return value.replace(/\r\n?|\n/g, "\n");
54
54
  }
55
55
 
56
+
56
57
  export function classifyCallStatus(isError: boolean, executionStarted: boolean, completed: boolean): RowStatus {
57
58
  if (isError) return "error";
58
59
  if (completed) return "success";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-compact-tools",
3
- "version": "0.4.0",
3
+ "version": "0.4.2",
4
4
  "description": "Compact, expandable UI for pi's built-in tools, bundled with a polished GitHub Dark theme.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -3,6 +3,7 @@ import { readFile } from "node:fs/promises";
3
3
  const resources = [
4
4
  "themes/github-dark-pro.json",
5
5
  "examples/compact-tools.json",
6
+ "examples/compact-tools-2.json",
6
7
  "schemas/compact-tools.schema.json",
7
8
  ];
8
9
 
@@ -22,6 +23,9 @@ if (theme.name !== "github-dark-pro" || !theme.colors || typeof theme.colors !==
22
23
  if (!theme.colors.border || !theme.colors.dim || !theme.colors.muted) {
23
24
  throw new Error("github-dark-pro must define spinner and separator colors");
24
25
  }
26
+ if (!theme.vars?.thinkingText) {
27
+ throw new Error("github-dark-pro must define a distinct thinking text color");
28
+ }
25
29
 
26
30
  const example = JSON.parse(
27
31
  await readFile(new URL("../examples/compact-tools.json", import.meta.url), "utf8"),
@@ -38,6 +42,19 @@ if (!example.auto_compact || example.auto_compact.edit !== false) {
38
42
  if (Object.values(example.auto_compact).some((enabled) => typeof enabled !== "boolean")) {
39
43
  throw new Error("example auto_compact values must be booleans");
40
44
  }
45
+ const blinkExample = JSON.parse(
46
+ await readFile(new URL("../examples/compact-tools-2.json", import.meta.url), "utf8"),
47
+ );
48
+ if (JSON.stringify(blinkExample.spinner?.frames) !== JSON.stringify(["●", "●", " ", "●", "●"])) {
49
+ throw new Error("compact-tools-2 spinner must fade through repeated circles and a blank frame");
50
+ }
51
+ if (
52
+ !Array.isArray(blinkExample.durationIndicators) ||
53
+ blinkExample.durationIndicators.some((indicator) => indicator.icon !== "•") ||
54
+ blinkExample.durationIndicators[0]?.color !== "#E0A052"
55
+ ) {
56
+ throw new Error("compact-tools-2 must use bullet duration indicators and the explicit warning hex color");
57
+ }
41
58
  const indicators = example.durationIndicators;
42
59
  if (!Array.isArray(indicators) || indicators.length === 0 || indicators.at(-1)?.underMs !== undefined) {
43
60
  throw new Error("example durationIndicators must end with a fallback rule");
@@ -12,6 +12,8 @@
12
12
  "toolStatus": "#59616B",
13
13
  "blue": "#58A6FF",
14
14
  "blueSoft": "#79C0FF",
15
+ "quoteText": "#86C6FF",
16
+ "inlineCode": "#D2A8FF",
15
17
  "green": "#3FB950",
16
18
  "red": "#F85149",
17
19
  "yellow": "#E0A052",
@@ -20,6 +22,7 @@
20
22
  "toolAccent": "#95A7FF",
21
23
  "toolName": "#8B85D6",
22
24
  "toolText": "#98A1AC",
25
+ "thinkingText": "#9FCFF8",
23
26
  "pink": "#FF7B72"
24
27
  },
25
28
  "colors": {
@@ -33,7 +36,7 @@
33
36
  "muted": "muted",
34
37
  "dim": "dim",
35
38
  "text": "text",
36
- "thinkingText": "muted",
39
+ "thinkingText": "thinkingText",
37
40
 
38
41
  "selectedBg": "surfaceMuted",
39
42
  "searchMatchBg": "#3B2E10",
@@ -54,10 +57,10 @@
54
57
  "mdHeading": "textBright",
55
58
  "mdLink": "blue",
56
59
  "mdLinkUrl": "dim",
57
- "mdCode": "blueSoft",
60
+ "mdCode": "inlineCode",
58
61
  "mdCodeBlock": "text",
59
62
  "mdCodeBlockBorder": "#484F58",
60
- "mdQuote": "muted",
63
+ "mdQuote": "quoteText",
61
64
  "mdQuoteBorder": "border",
62
65
  "mdHr": "borderSubtle",
63
66
  "mdListBullet": "muted",