// SPDX-FileCopyrightText: 2026 Adrian Haasler García // // SPDX-License-Identifier: AGPL-3.0-only import type { ExtensionAPI, Theme } from "@mariozechner/pi-coding-agent"; function getBanner(theme: Theme): string[] { const accent = (text: string) => theme.fg("accent", text); return [ accent(" ▄ ") + " ▄", accent(" █▀█ ▀▀█ ▀▀█") + " █▀█ █▀█ █▀▄▀█▀", accent(" █ █ █▀█ █▀█") + " █ █ █▀▀ █ █ █", accent(" ▀ ▀ ▀▀▀ ▀▀▀") + " ▀▀█ ▀▀▀ ▀ ▀ ▀▀", " ▀▀▀" ] } export default function (pi: ExtensionAPI) { // Show banner when session starts pi.on("session_start", async (_event, ctx) => { if (!ctx.hasUI) return ctx.ui.setHeader((_tui, theme) => { return { render(_width: number): string[] { return getBanner(theme); }, invalidate() {}, }; }); }); }