From fc538f6ca1f395a47bfce527e48a25abe571f1df Mon Sep 17 00:00:00 2001 From: Jian Zhang Date: Sat, 17 Jan 2026 17:54:00 +0800 Subject: [PATCH] feat(coding-agent): export VERSION and update custom-header example (#798) Co-authored-by: Jian Zhang --- packages/coding-agent/examples/extensions/custom-header.ts | 3 ++- packages/coding-agent/src/index.ts | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/coding-agent/examples/extensions/custom-header.ts b/packages/coding-agent/examples/extensions/custom-header.ts index fc08cb6d..94ebb3d9 100644 --- a/packages/coding-agent/examples/extensions/custom-header.ts +++ b/packages/coding-agent/examples/extensions/custom-header.ts @@ -6,6 +6,7 @@ */ import type { ExtensionAPI, Theme } from "@mariozechner/pi-coding-agent"; +import { VERSION } from "@mariozechner/pi-coding-agent"; // --- PI MASCOT --- // Based on pi_mascot.ts - the pi agent character @@ -52,7 +53,7 @@ export default function (pi: ExtensionAPI) { render(_width: number): string[] { const mascotLines = getPiMascot(theme); // Add a subtitle with hint - const subtitle = theme.fg("muted", " shitty coding agent"); + const subtitle = `${theme.fg("muted", " shitty coding agent")}${theme.fg("dim", ` v${VERSION}`)}`; return [...mascotLines, subtitle]; }, invalidate() {}, diff --git a/packages/coding-agent/src/index.ts b/packages/coding-agent/src/index.ts index bb929dc4..6a159afd 100644 --- a/packages/coding-agent/src/index.ts +++ b/packages/coding-agent/src/index.ts @@ -1,7 +1,7 @@ // Core session management // Config paths -export { getAgentDir } from "./config.js"; +export { getAgentDir, VERSION } from "./config.js"; export { AgentSession, type AgentSessionConfig,