@llblab/pi-telegram 0.39.3 → 0.39.4
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 +4 -0
- package/lib/status.ts +14 -4
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
> Each release keeps at most 8 outcome records of at most 512 characters.
|
|
4
4
|
|
|
5
|
+
## 0.39.4: Headless Status Bar Hotfix
|
|
6
|
+
|
|
7
|
+
- `Headless Hosts`: Skips status-bar rendering when a print, RPC, ACP, or other non-interactive host has not initialized its theme, preventing repeated extension errors during lifecycle status refreshes while preserving normal interactive status updates and error propagation.
|
|
8
|
+
|
|
5
9
|
## 0.39.3: Windows IPC And Outbound Voice Hotfix
|
|
6
10
|
|
|
7
11
|
- `Windows IPC Replacement`: Replaces an older same-process Named Pipe server before a new session generation listens on the stable endpoint, preventing `EADDRINUSE` during reload while keeping a late stop from invalidating its successor.
|
package/lib/status.ts
CHANGED
|
@@ -628,18 +628,28 @@ export function createTelegramStatusHtmlBuilder<TContext>(deps: {
|
|
|
628
628
|
);
|
|
629
629
|
}
|
|
630
630
|
|
|
631
|
+
function resolveStatusBarTheme(
|
|
632
|
+
ctx: TelegramStatusRuntimeContext,
|
|
633
|
+
): TelegramStatusBarTheme | undefined {
|
|
634
|
+
try {
|
|
635
|
+
const theme = ctx.ui?.theme;
|
|
636
|
+
return typeof theme?.fg === "function" ? theme : undefined;
|
|
637
|
+
} catch {
|
|
638
|
+
return undefined;
|
|
639
|
+
}
|
|
640
|
+
}
|
|
641
|
+
|
|
631
642
|
export function createTelegramStatusRuntime<
|
|
632
643
|
TContext extends TelegramStatusRuntimeContext,
|
|
633
644
|
>(deps: TelegramStatusRuntimeDeps<TContext>): TelegramStatusRuntime<TContext> {
|
|
634
645
|
const statusKey = deps.statusKey ?? "telegram";
|
|
635
646
|
return {
|
|
636
647
|
updateStatus: (ctx, error) => {
|
|
648
|
+
const theme = resolveStatusBarTheme(ctx);
|
|
649
|
+
if (!theme) return;
|
|
637
650
|
ctx.ui.setStatus(
|
|
638
651
|
statusKey,
|
|
639
|
-
buildTelegramStatusBarText(
|
|
640
|
-
ctx.ui.theme,
|
|
641
|
-
deps.getStatusBarState(ctx, error),
|
|
642
|
-
),
|
|
652
|
+
buildTelegramStatusBarText(theme, deps.getStatusBarState(ctx, error)),
|
|
643
653
|
);
|
|
644
654
|
},
|
|
645
655
|
getStatusLines: (options) =>
|