fix(coding-agent): route remaining hardcoded pi branding through APP_NAME (#3583)
Swaps hardcoded "pi" / ".pi" / "π" for the existing APP_NAME and CONFIG_DIR_NAME extension points at four sites the original APP_NAME rollout missed: - /quit slash-command description - process.title (cli.ts and bun/cli.ts) - project-local extensions dir in loader.ts For the terminal title, adds an APP_TITLE export in config.ts that keeps pi's "π" glyph when piConfig.name is unset and falls back to APP_NAME otherwise. Presence of piConfig.name acts as the "has been rebranded" signal, so pi's own package.json drops the redundant "name": "pi" (the existing `|| "pi"` fallback in config.ts makes this a no-op for APP_NAME). No behavior change for pi itself: process.title, /quit description, terminal title prefix, and project-local extensions dir all resolve to the same values as before. closes #3476
This commit is contained in:
@@ -21,7 +21,7 @@ import * as _bundledPiTui from "@mariozechner/pi-tui";
|
||||
import * as _bundledTypebox from "typebox";
|
||||
import * as _bundledTypeboxCompile from "typebox/compile";
|
||||
import * as _bundledTypeboxValue from "typebox/value";
|
||||
import { getAgentDir, isBunBinary } from "../../config.js";
|
||||
import { CONFIG_DIR_NAME, getAgentDir, isBunBinary } from "../../config.js";
|
||||
// NOTE: This import works because loader.ts exports are NOT re-exported from index.ts,
|
||||
// avoiding a circular dependency. Extensions can import from @mariozechner/pi-coding-agent.
|
||||
import * as _bundledPiCodingAgent from "../../index.js";
|
||||
@@ -576,8 +576,8 @@ export async function discoverAndLoadExtensions(
|
||||
}
|
||||
};
|
||||
|
||||
// 1. Project-local extensions: cwd/.pi/extensions/
|
||||
const localExtDir = path.join(cwd, ".pi", "extensions");
|
||||
// 1. Project-local extensions: cwd/${CONFIG_DIR_NAME}/extensions/
|
||||
const localExtDir = path.join(cwd, CONFIG_DIR_NAME, "extensions");
|
||||
addPaths(discoverExtensionsInDir(localExtDir));
|
||||
|
||||
// 2. Global extensions: agentDir/extensions/
|
||||
|
||||
Reference in New Issue
Block a user