@mrclrchtr/supi-extras 4.2.0 → 4.4.0

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.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mrclrchtr/supi-core",
3
- "version": "4.2.0",
3
+ "version": "4.4.0",
4
4
  "description": "SuPi core — shared infrastructure for SuPi extensions (XML context tags, config system)",
5
5
  "license": "MIT",
6
6
  "repository": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mrclrchtr/supi-extras",
3
- "version": "4.2.0",
3
+ "version": "4.4.0",
4
4
  "description": "SuPi extras — command aliases, skill shorthand, tab spinner, /supi-stash prompt stash with TUI overlay, and other small utilities",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -33,7 +33,7 @@
33
33
  ],
34
34
  "dependencies": {
35
35
  "clipboardy": "^5.3.1",
36
- "@mrclrchtr/supi-core": "4.2.0"
36
+ "@mrclrchtr/supi-core": "4.4.0"
37
37
  },
38
38
  "bundledDependencies": [
39
39
  "@mrclrchtr/supi-core"
@@ -31,9 +31,15 @@ import {
31
31
  export default function supiFooter(pi: ExtensionAPI) {
32
32
  let currentModel: unknown;
33
33
  let requestRender: (() => void) | undefined;
34
+ let unregisterInvalidate: (() => void) | undefined;
34
35
 
35
36
  pi.on("session_start", (_event, ctx) => {
36
37
  currentModel = ctx.model;
38
+ if (!unregisterInvalidate) {
39
+ unregisterInvalidate = pi.events.on("supi:lsp:invalidate", () => {
40
+ requestRender?.();
41
+ });
42
+ }
37
43
  installFooter(ctx);
38
44
  });
39
45
 
@@ -42,17 +48,17 @@ export default function supiFooter(pi: ExtensionAPI) {
42
48
  requestRender?.();
43
49
  });
44
50
 
45
- pi.on("thinking_level_select", (_event, _ctx) => {
51
+ pi.on("thinking_level_select", () => {
46
52
  requestRender?.();
47
53
  });
48
54
 
49
55
  pi.on("session_shutdown", () => {
50
56
  currentModel = undefined;
51
57
  requestRender = undefined;
58
+ unregisterInvalidate?.();
59
+ unregisterInvalidate = undefined;
52
60
  });
53
61
 
54
- // ---- footer installation ----
55
-
56
62
  // biome-ignore lint/suspicious/noExplicitAny: ctx type from pi session_start handler is complex
57
63
  function installFooter(ctx: any) {
58
64
  ctx.ui.setFooter(
@@ -151,8 +157,6 @@ export default function supiFooter(pi: ExtensionAPI) {
151
157
  theme.fg("dim", statsLeft) + theme.fg("dim", laidOut.padding) + laidOut.styled;
152
158
 
153
159
  const lines = [pwdLine, truncateToWidth(statsLine, width, theme.fg("dim", "..."))];
154
-
155
- // Extension statuses
156
160
  buildStatusLine(lines, footerData, width, theme);
157
161
 
158
162
  return lines;