@d3ara1n/pi-editor-shell 0.3.0 → 0.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.
package/README.md CHANGED
@@ -37,7 +37,11 @@ The default pi editor only draws a horizontal line above and below the input are
37
37
 
38
38
  ## Installation
39
39
 
40
- Add the package directory to the `extensions` array in `~/.pi/agent/settings.json`:
40
+ ```bash
41
+ pi install npm:@d3ara1n/pi-editor-shell
42
+ ```
43
+
44
+ Or add to `~/.pi/agent/settings.json`:
41
45
 
42
46
  ```jsonc
43
47
  {
@@ -47,8 +51,6 @@ Add the package directory to the `extensions` array in `~/.pi/agent/settings.jso
47
51
  }
48
52
  ```
49
53
 
50
- Then run `/reload` or restart pi.
51
-
52
54
  ## Caveats
53
55
 
54
56
  - **Mutually exclusive** with other editor-replacing extensions (`border-status-editor`, `rainbow-editor`, `modal-editor`, …). Disable those when enabling this one — `setEditorComponent` is last-writer-wins.
package/package.json CHANGED
@@ -1,11 +1,12 @@
1
1
  {
2
2
  "name": "@d3ara1n/pi-editor-shell",
3
- "version": "0.3.0",
3
+ "version": "0.4.0",
4
4
  "type": "module",
5
5
  "description": "Replaces pi's default editor and status bar with a unified rounded-corner shell — no Nerd Font required",
6
6
  "keywords": [
7
7
  "pi-package",
8
- "pi"
8
+ "pi",
9
+ "pi-extension"
9
10
  ],
10
11
  "main": "src/index.ts",
11
12
  "peerDependencies": {
@@ -15,7 +16,8 @@
15
16
  "pi": {
16
17
  "extensions": [
17
18
  "./src/index.ts"
18
- ]
19
+ ],
20
+ "image": "https://raw.githubusercontent.com/d3ara1n/pi-extensions/main/packages/pi-editor-shell/preview.png"
19
21
  },
20
22
  "license": "MIT",
21
23
  "repository": {
package/preview.png ADDED
Binary file
package/src/index.ts CHANGED
@@ -310,6 +310,10 @@ export default function (pi: ExtensionAPI) {
310
310
  ctx.ui.setWorkingVisible(false);
311
311
 
312
312
  ctx.ui.setEditorComponent((tui, theme, keybindings) => {
313
+ // pi may rebuild the editor mid-session (model switch, reload). Stop the
314
+ // previous editor's spinner timer so it can't keep firing requestRender()
315
+ // on a stale tui handle.
316
+ editor?.setSpinner(null);
313
317
  editor = new CardEditor(tui, theme, keybindings, provider);
314
318
  return editor;
315
319
  });