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:
@@ -5,13 +5,14 @@
|
||||
*
|
||||
* Test with: npx tsx src/cli-new.ts [args...]
|
||||
*/
|
||||
process.title = "pi";
|
||||
import { EnvHttpProxyAgent, setGlobalDispatcher } from "undici";
|
||||
import { APP_NAME } from "./config.js";
|
||||
import { main } from "./main.js";
|
||||
|
||||
process.title = APP_NAME;
|
||||
process.env.PI_CODING_AGENT = "true";
|
||||
process.emitWarning = (() => {}) as typeof process.emitWarning;
|
||||
|
||||
import { EnvHttpProxyAgent, setGlobalDispatcher } from "undici";
|
||||
import { main } from "./main.js";
|
||||
|
||||
setGlobalDispatcher(new EnvHttpProxyAgent());
|
||||
|
||||
main(process.argv.slice(2));
|
||||
|
||||
Reference in New Issue
Block a user