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
41 lines
1.9 KiB
TypeScript
41 lines
1.9 KiB
TypeScript
import { APP_NAME } from "../config.js";
|
|
import type { SourceInfo } from "./source-info.js";
|
|
|
|
export type SlashCommandSource = "extension" | "prompt" | "skill";
|
|
|
|
export interface SlashCommandInfo {
|
|
name: string;
|
|
description?: string;
|
|
source: SlashCommandSource;
|
|
sourceInfo: SourceInfo;
|
|
}
|
|
|
|
export interface BuiltinSlashCommand {
|
|
name: string;
|
|
description: string;
|
|
}
|
|
|
|
export const BUILTIN_SLASH_COMMANDS: ReadonlyArray<BuiltinSlashCommand> = [
|
|
{ name: "settings", description: "Open settings menu" },
|
|
{ name: "model", description: "Select model (opens selector UI)" },
|
|
{ name: "scoped-models", description: "Enable/disable models for Ctrl+P cycling" },
|
|
{ name: "export", description: "Export session (HTML default, or specify path: .html/.jsonl)" },
|
|
{ name: "import", description: "Import and resume a session from a JSONL file" },
|
|
{ name: "share", description: "Share session as a secret GitHub gist" },
|
|
{ name: "copy", description: "Copy last agent message to clipboard" },
|
|
{ name: "name", description: "Set session display name" },
|
|
{ name: "session", description: "Show session info and stats" },
|
|
{ name: "changelog", description: "Show changelog entries" },
|
|
{ name: "hotkeys", description: "Show all keyboard shortcuts" },
|
|
{ name: "fork", description: "Create a new fork from a previous user message" },
|
|
{ name: "clone", description: "Duplicate the current session at the current position" },
|
|
{ name: "tree", description: "Navigate session tree (switch branches)" },
|
|
{ name: "login", description: "Login with OAuth provider" },
|
|
{ name: "logout", description: "Logout from OAuth provider" },
|
|
{ name: "new", description: "Start a new session" },
|
|
{ name: "compact", description: "Manually compact the session context" },
|
|
{ name: "resume", description: "Resume a different session" },
|
|
{ name: "reload", description: "Reload keybindings, extensions, skills, prompts, and themes" },
|
|
{ name: "quit", description: `Quit ${APP_NAME}` },
|
|
];
|