Commit d9f7c692a624
Changed files (1)
dots
pi
agent
extensions
dots/pi/agent/extensions/hostname.ts
@@ -0,0 +1,16 @@
+/**
+ * Hostname Extension
+ *
+ * Displays the current hostname in the status line (footer).
+ * Useful when working across multiple machines.
+ */
+
+import type { ExtensionAPI } from "@mariozechner/pi-coding-agent";
+import { hostname } from "node:os";
+
+export default function (pi: ExtensionAPI) {
+ pi.on("session_start", async (_event, ctx) => {
+ const host = hostname();
+ ctx.ui.setStatus("hostname", ctx.ui.theme.fg("accent", `🖥️ ${host}`));
+ });
+}