pi-autosuggestions 0.3.2 → 0.3.3

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 +1 @@
1
- {".":"0.3.2"}
1
+ {".":"0.3.3"}
package/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.3.3](https://github.com/0xPlayerOne/pi-autosuggestions/compare/pi-autosuggestions-v0.3.2...pi-autosuggestions-v0.3.3) (2026-09-04)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * force white blinking bar cursor in terminals with themed cursors ([20a3a24](https://github.com/0xPlayerOne/pi-autosuggestions/commit/20a3a2499cad2ec3a83e1c8d1edd0c96b6d6a2ee))
9
+
3
10
  ## [0.3.2](https://github.com/0xPlayerOne/pi-autosuggestions/compare/pi-autosuggestions-v0.3.1...pi-autosuggestions-v0.3.2) (2026-09-04)
4
11
 
5
12
 
package/README.md CHANGED
@@ -90,8 +90,11 @@ The editor's fake block cursor is replaced by your terminal's **native blinking
90
90
  bar cursor** — the same behavior as Apple Terminal's bar style: it overlays the
91
91
  cell edge without ever covering the character, blinks on its own, and pauses
92
92
  blinking while you type. On ghost rows the bar rides the suggestion's first
93
- character. The extension requests the blinking-bar shape via `DECSCUSR`
94
- (`CSI 5 q`); terminals without that escape use their profile's cursor shape.
93
+ character. The extension forces the cursor **white** (OSC 12) and requests the
94
+ blinking-bar shape (DECSCUSR `CSI 5 q`) so it doesn't inherit the terminal
95
+ theme's cursor color; both are restored to your terminal's defaults when pi
96
+ exits. If blinking stays off (e.g. Warp), check the terminal's own cursor-blink
97
+ setting (Warp: Settings → Appearance → Cursor → Blinking).
95
98
  A software beam cursor is kept as a fallback if the hardware cursor is
96
99
  unavailable.
97
100
 
@@ -61,9 +61,12 @@ class BashInlineEditor extends CustomEditor {
61
61
  super(tui, theme, keybindings);
62
62
  // Native terminal cursor = the Apple-Terminal-style blinking bar: it
63
63
  // draws over the glyph's cell edge without covering the character.
64
- // DECSCUSR 5 q requests a blinking bar where the terminal supports
65
- // it; otherwise the terminal profile's cursor shape is used as-is.
64
+ // - DECSCUSR 5 q: blinking bar shape (Warp honors this).
65
+ // - OSC 12: force the cursor color white — terminals like Warp paint
66
+ // the native cursor with the theme's color (often blue), which we
67
+ // don't control from the theme.
66
68
  tui.setShowHardwareCursor(true);
69
+ tui.terminal.write("\x1b]12;#ffffff\x1b\\");
67
70
  tui.terminal.write("\x1b[5 q");
68
71
  // Wrap onChange so programmatic text changes (paste, undo, history,
69
72
  // setText) also refresh the inline suggestion.
@@ -536,4 +539,13 @@ export default function (pi: ExtensionAPI): void {
536
539
  pi.on("session_start", (_event, ctx) => {
537
540
  ctx.ui.setEditorComponent((tui, theme, keybindings) => new BashInlineEditor(tui, theme, keybindings));
538
541
  });
542
+ // Restore the terminal's own cursor color and shape when pi exits so the
543
+ // shell afterwards isn't left with our forced white bar.
544
+ process.on("exit", () => {
545
+ try {
546
+ process.stdout.write("\x1b]104;12\x1b\\\x1b[0 q");
547
+ } catch {
548
+ // terminal gone — nothing to restore
549
+ }
550
+ });
539
551
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-autosuggestions",
3
- "version": "0.3.2",
3
+ "version": "0.3.3",
4
4
  "description": "zsh-autosuggestions-style ghost completions for the pi coding agent — history-based inline suggestions, path completion in bash mode, blinking beam cursor",
5
5
  "keywords": [
6
6
  "pi-package",