@astrofoundry/pi-astro 0.14.0 → 0.14.1
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.
|
@@ -86,13 +86,6 @@ describe("astro-welcome extension", () => {
|
|
|
86
86
|
expect(ctx.ui.onTerminalInput).toHaveBeenCalledTimes(1);
|
|
87
87
|
});
|
|
88
88
|
|
|
89
|
-
it("does nothing when reason is not 'startup' (e.g. reload, resume)", async () => {
|
|
90
|
-
const { pi } = await install();
|
|
91
|
-
const ctx = makeCtx();
|
|
92
|
-
await pi.handlers.session_start({ reason: "reload" }, ctx);
|
|
93
|
-
expect(ctx.ui.setHeader).not.toHaveBeenCalled();
|
|
94
|
-
});
|
|
95
|
-
|
|
96
89
|
it("does nothing when ctx.hasUI is false", async () => {
|
|
97
90
|
const { pi } = await install();
|
|
98
91
|
const ctx = makeCtx({ hasUI: false });
|
|
@@ -50,8 +50,7 @@ export default function astroWelcomeExtension(pi: ExtensionAPI): void {
|
|
|
50
50
|
activeCtx = null;
|
|
51
51
|
}
|
|
52
52
|
|
|
53
|
-
pi.on("session_start", async (
|
|
54
|
-
if (event.reason !== "startup") return;
|
|
53
|
+
pi.on("session_start", async (_event, ctx) => {
|
|
55
54
|
if (!ctx.hasUI) return;
|
|
56
55
|
dismissed = false;
|
|
57
56
|
activeCtx = ctx;
|