pi-powerline-footer 0.2.17 → 0.2.18
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/CHANGELOG.md +5 -0
- package/README.md +5 -1
- package/package.json +1 -1
- package/working-vibes.ts +7 -5
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
## [Unreleased]
|
|
4
4
|
|
|
5
|
+
## [0.2.18] - 2026-01-28
|
|
6
|
+
|
|
7
|
+
### Fixed
|
|
8
|
+
- **Race condition in vibe generation** — Fixed bug where stale vibe generations could overwrite newer ones by capturing AbortController in local variable
|
|
9
|
+
|
|
5
10
|
## [0.2.17] - 2026-01-28
|
|
6
11
|
|
|
7
12
|
### Added
|
package/README.md
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
|
+
<p>
|
|
2
|
+
<img src="banner.png" alt="pi-powerline-footer" width="1100">
|
|
3
|
+
</p>
|
|
4
|
+
|
|
1
5
|
# pi-powerline-footer
|
|
2
6
|
|
|
3
|
-
|
|
7
|
+
Customizes the default [pi](https://github.com/badlogic/pi-mono) editor with a powerline-style status bar, welcome overlay, and AI-generated "vibes" for loading messages. Inspired by [Powerlevel10k](https://github.com/romkatv/powerlevel10k) and [oh-my-pi](https://github.com/can1357/oh-my-pi).
|
|
4
8
|
|
|
5
9
|
<img width="1261" height="817" alt="Image" src="https://github.com/user-attachments/assets/4cc43320-3fb8-4503-b857-69dffa7028f2" />
|
|
6
10
|
|
package/package.json
CHANGED
package/working-vibes.ts
CHANGED
|
@@ -228,14 +228,16 @@ async function generateAndUpdate(
|
|
|
228
228
|
prompt: string,
|
|
229
229
|
setWorkingMessage: (msg?: string) => void,
|
|
230
230
|
): Promise<void> {
|
|
231
|
-
// Cancel any in-flight generation
|
|
231
|
+
// Cancel any in-flight generation and create new controller
|
|
232
|
+
// Capture in local variable to avoid race condition with subsequent calls
|
|
233
|
+
const controller = new AbortController();
|
|
232
234
|
currentGeneration?.abort();
|
|
233
|
-
currentGeneration =
|
|
235
|
+
currentGeneration = controller;
|
|
234
236
|
|
|
235
237
|
// Create timeout signal (3 seconds)
|
|
236
238
|
const timeoutSignal = AbortSignal.timeout(config.timeout);
|
|
237
239
|
const combinedSignal = AbortSignal.any([
|
|
238
|
-
|
|
240
|
+
controller.signal,
|
|
239
241
|
timeoutSignal,
|
|
240
242
|
]);
|
|
241
243
|
|
|
@@ -245,8 +247,8 @@ async function generateAndUpdate(
|
|
|
245
247
|
combinedSignal,
|
|
246
248
|
);
|
|
247
249
|
|
|
248
|
-
// Only update if still streaming and
|
|
249
|
-
if (isStreaming && !
|
|
250
|
+
// Only update if still streaming and THIS generation wasn't aborted
|
|
251
|
+
if (isStreaming && !controller.signal.aborted) {
|
|
250
252
|
setWorkingMessage(vibe);
|
|
251
253
|
}
|
|
252
254
|
} catch (error) {
|