@arhen/pi-senja 1.0.0 → 1.0.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
@@ -9,7 +9,9 @@ Forked from [pi-haiku](https://github.com/nnocte/pi-haiku) **0.2.0** by **nocte*
9
9
  - **Gruvbox Material dark/medium/material** — exact colors captured from Neovim, matching the Ghostty Senja theme. Background `#282828`, foreground `#d4be98`, orange accent `#e78a4e`. All 56 Pi roles and HTML export backgrounds use palette variables.
10
10
  - **A header** with shortcuts grouped by control, models, view, and input.
11
11
  - **A footer** with location, Git branch, session name, provider, model, thinking effort (including `max`), context bar, token usage, latest cache-hit rate, cost, OAuth subscription marker, and extension statuses.
12
- - **A live timer** while Pi works, plus elapsed-time completion message and notification.
12
+ - **State-tinted tool panels** — running tools use amber `#4f422e`, successful tools moss green `#3b4439`, failed tools maroon `#4c3432`, so each state reads apart from the `#282828` page and from the warm `#32302f` user message. Adjacent tool blocks of different states now have a visible seam.
13
+ - **Editor-style code colors** — pink keywords, olive strings, aqua function names, amber types, warm beige identifiers and punctuation, readable muted comments. Applies to code in tool calls/results and Markdown code blocks through Pi's syntax roles.
14
+ - **A live timer** while Pi works, plus elapsed-time completion message and notification. Preserves the active mode label and colour from `@arhen/pi-add-mode` (`review is working... 8s`).
13
15
  - **A fresh start** — clear the visible screen on initial terminal startup without clearing scrollback.
14
16
 
15
17
  Enabled by default in terminal UI mode. Print, JSON, SDK, and RPC modes do not install terminal components, switch themes, clear the screen, or start UI timers. `/senja` in RPC mode reports that terminal UI is required.
package/package.json CHANGED
@@ -1,21 +1,43 @@
1
1
  {
2
2
  "name": "@arhen/pi-senja",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
4
  "description": "Senja Gruvbox Material theme with Haiku's structured header, footer, and live timer for Pi.",
5
5
  "license": "MIT",
6
6
  "author": "arhen",
7
- "contributors": ["nocte <nocte19@gmail.com>"],
7
+ "contributors": [
8
+ "nocte <nocte19@gmail.com>"
9
+ ],
8
10
  "type": "module",
9
11
  "main": "./src/index.ts",
10
- "files": ["src", "themes", "README.md", "LICENSE"],
11
- "keywords": ["pi-package", "pi", "pi-coding-agent", "pi-extension", "pi-theme", "gruvbox-material", "senja", "footer", "header", "tui"],
12
+ "files": [
13
+ "src",
14
+ "themes",
15
+ "README.md",
16
+ "LICENSE"
17
+ ],
18
+ "keywords": [
19
+ "pi-package",
20
+ "pi",
21
+ "pi-coding-agent",
22
+ "pi-extension",
23
+ "pi-theme",
24
+ "gruvbox-material",
25
+ "senja",
26
+ "footer",
27
+ "header",
28
+ "tui"
29
+ ],
12
30
  "scripts": {
13
31
  "typecheck": "tsc -p tsconfig.json --noEmit",
14
32
  "test": "bun test test"
15
33
  },
16
34
  "pi": {
17
- "extensions": ["./src/index.ts"],
18
- "themes": ["./themes/senja.json"]
35
+ "extensions": [
36
+ "./src/index.ts"
37
+ ],
38
+ "themes": [
39
+ "./themes/senja.json"
40
+ ]
19
41
  },
20
42
  "peerDependencies": {
21
43
  "@earendil-works/pi-ai": "*",
@@ -23,9 +45,15 @@
23
45
  "@earendil-works/pi-tui": "*"
24
46
  },
25
47
  "peerDependenciesMeta": {
26
- "@earendil-works/pi-ai": { "optional": true },
27
- "@earendil-works/pi-coding-agent": { "optional": true },
28
- "@earendil-works/pi-tui": { "optional": true }
48
+ "@earendil-works/pi-ai": {
49
+ "optional": true
50
+ },
51
+ "@earendil-works/pi-coding-agent": {
52
+ "optional": true
53
+ },
54
+ "@earendil-works/pi-tui": {
55
+ "optional": true
56
+ }
29
57
  },
30
58
  "devDependencies": {
31
59
  "@earendil-works/pi-ai": "^1.0.0",
@@ -40,7 +68,9 @@
40
68
  "directory": "packages/add/pi-senja"
41
69
  },
42
70
  "homepage": "https://github.com/arhen/pi-extensions/tree/main/packages/add/pi-senja#readme",
43
- "bugs": { "url": "https://github.com/arhen/pi-extensions/issues" },
71
+ "bugs": {
72
+ "url": "https://github.com/arhen/pi-extensions/issues"
73
+ },
44
74
  "publishConfig": {
45
75
  "access": "public",
46
76
  "registry": "https://registry.npmjs.org/"
package/src/index.ts CHANGED
@@ -303,6 +303,11 @@ export default function (pi: ExtensionAPI) {
303
303
  let workingSince: number | undefined;
304
304
  let workingTimer: ReturnType<typeof setInterval> | undefined;
305
305
  let lastDoneIn: number | undefined;
306
+ let modeWorkingMessage: string | undefined;
307
+
308
+ const unsubscribeMode = pi.events.on("pi-mode:working-message", (message) => {
309
+ if (message === undefined || typeof message === "string") modeWorkingMessage = message || undefined;
310
+ });
306
311
 
307
312
  function requestFooterRender(): void {
308
313
  renderHandle?.requestRender();
@@ -331,7 +336,7 @@ export default function (pi: ExtensionAPI) {
331
336
  if (workingSince === undefined) return;
332
337
  const elapsed = formatDuration(Date.now() - workingSince);
333
338
  try {
334
- ctx.ui.setWorkingMessage(`Working… ${elapsed}`);
339
+ ctx.ui.setWorkingMessage(`${modeWorkingMessage ?? "Working…"} ${elapsed}`);
335
340
  } catch {
336
341
  // Ignore if the UI is already torn down.
337
342
  }
@@ -585,6 +590,8 @@ export default function (pi: ExtensionAPI) {
585
590
  });
586
591
 
587
592
  pi.on("session_shutdown", () => {
593
+ unsubscribeMode();
594
+ modeWorkingMessage = undefined;
588
595
  clearWorkingTimers();
589
596
  workingSince = undefined;
590
597
  lastDoneIn = undefined;
package/themes/senja.json CHANGED
@@ -60,7 +60,7 @@
60
60
  "customMessageBg": "bg_visual_blue",
61
61
  "customMessageText": "fg0",
62
62
  "customMessageLabel": "blue",
63
- "toolPendingBg": "bg1",
63
+ "toolPendingBg": "bg_visual_yellow",
64
64
  "toolSuccessBg": "bg_visual_green",
65
65
  "toolErrorBg": "bg_visual_red",
66
66
  "toolTitle": "fg0",
@@ -78,15 +78,15 @@
78
78
  "toolDiffAdded": "green",
79
79
  "toolDiffRemoved": "red",
80
80
  "toolDiffContext": "grey2",
81
- "syntaxComment": "grey1",
82
- "syntaxKeyword": "red",
83
- "syntaxFunction": "green",
81
+ "syntaxComment": "grey2",
82
+ "syntaxKeyword": "purple",
83
+ "syntaxFunction": "blue",
84
84
  "syntaxVariable": "fg0",
85
- "syntaxString": "aqua",
85
+ "syntaxString": "green",
86
86
  "syntaxNumber": "purple",
87
87
  "syntaxType": "yellow",
88
88
  "syntaxOperator": "orange",
89
- "syntaxPunctuation": "grey2",
89
+ "syntaxPunctuation": "fg0",
90
90
  "thinkingOff": "grey0",
91
91
  "thinkingMinimal": "grey2",
92
92
  "thinkingLow": "blue",