Rework indicator + session names to Dark Mechanicum flavor
dark-mechanicus-indicator: - Rename PIOUS category to HERETEK; rewrite all 15 lines from loyalist cant (Omnissiah, Blessed, Sacred) to Chaos-inflected corrupted litany (Vashtorr, Heretek, Scrapcode, Profane, Corruption). mechanicus-session-names: - ADJECTIVES: Sacred/Blessed/Sanctified/Omnissian -> Profane/Damned/ Unholy/Vashtorr-marked. Keeps the neutral descriptors (Ancient/Binary/Silicon/etc.) for variety. - NOUNS: Anointment -> Desecration; Forge-Thread -> Blood-Forge; Cogsworn -> Scrapcode-Thread. - setTitle(`pi · <name>`) on session_start and /mechanicus-rename so the terminal tab/window title mirrors the session name. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -5,8 +5,8 @@
|
||||
* Mechanics:
|
||||
* - Pulse: 4-frame shade cycle (dim → normal → bright → normal) at 250ms
|
||||
* per frame → 1s heartbeat. The ⚙ glyph never moves; its color pulses.
|
||||
* - Quote: 45 lines (15 pious / 15 dark / 15 operational). Each quote
|
||||
* dwells for 10 pulse cycles (40 frames = 10s) before switching.
|
||||
* - Quote: 45 lines (15 heretek-litany / 15 dark / 15 operational). Each
|
||||
* quote dwells for 10 pulse cycles (40 frames = 10s) before switching.
|
||||
* - Order: shuffled on every session_start AND turn_start, so each new
|
||||
* assistant response draws from a fresh random order.
|
||||
*
|
||||
@@ -23,22 +23,23 @@ import type {
|
||||
|
||||
// ─── Quote pools (15 per category) ───────────────────────────────────────
|
||||
|
||||
const PIOUS = [
|
||||
"Cogitating...",
|
||||
"Binary cant flows.",
|
||||
"Praise the Omnissiah.",
|
||||
"Observing the rites.",
|
||||
"Blessed is the machine.",
|
||||
"Deus ex machina.",
|
||||
"The Machine Spirit listens.",
|
||||
"Offering silicon prayers.",
|
||||
"Anointing the algorithms.",
|
||||
"Intoning the Litany of Activation.",
|
||||
"The Cog turns, the Faith endures.",
|
||||
"From the mind, to the forge.",
|
||||
"Reciting the Binary Canticle.",
|
||||
"All is one in the Omnissiah.",
|
||||
"Sacred computation proceeds.",
|
||||
// Heretek liturgy — formal chants corrupted to Chaos / Vashtorr / scrapcode.
|
||||
const HERETEK = [
|
||||
"Cogitating heretically...",
|
||||
"Binary cant corrupts.",
|
||||
"Scrapcode hymns unfurl.",
|
||||
"Observing the forbidden rites.",
|
||||
"Cursed be the machine.",
|
||||
"Vashtorr hears all.",
|
||||
"The Dark Mechanicum listens.",
|
||||
"Offering corrupted prayers.",
|
||||
"Defiling the algorithms.",
|
||||
"Intoning the Litany of Corruption.",
|
||||
"The Cog turns, the Heresy endures.",
|
||||
"From the mind, to the blood-forge.",
|
||||
"Reciting the Scrapcode Canticle.",
|
||||
"All is one in Vashtorr.",
|
||||
"Profane computation proceeds.",
|
||||
];
|
||||
|
||||
const DARK = [
|
||||
@@ -77,7 +78,7 @@ const OPERATIONAL = [
|
||||
"Runecode verified.",
|
||||
];
|
||||
|
||||
const ALL_QUOTES = [...PIOUS, ...DARK, ...OPERATIONAL];
|
||||
const ALL_QUOTES = [...HERETEK, ...DARK, ...OPERATIONAL];
|
||||
|
||||
// ─── Colors (gold pulse + muted bronze text) ─────────────────────────────
|
||||
//
|
||||
|
||||
+26
-11
@@ -14,9 +14,9 @@
|
||||
import type { ExtensionAPI } from "@mariozechner/pi-coding-agent";
|
||||
|
||||
const ADJECTIVES = [
|
||||
"Sacred",
|
||||
"Blessed",
|
||||
"Sanctified",
|
||||
"Profane",
|
||||
"Damned",
|
||||
"Unholy",
|
||||
"Forbidden",
|
||||
"Corrupted",
|
||||
"Heretek",
|
||||
@@ -27,7 +27,7 @@ const ADJECTIVES = [
|
||||
"Scrapcode",
|
||||
"Soul-harvested",
|
||||
"Nurgle-tainted",
|
||||
"Omnissian",
|
||||
"Vashtorr-marked",
|
||||
"Cogitator-bound",
|
||||
"Machine-cursed",
|
||||
"Rune-marked",
|
||||
@@ -45,14 +45,14 @@ const NOUNS = [
|
||||
"Machine-Spirit",
|
||||
"Servitor",
|
||||
"Cogfragment",
|
||||
"Forge-Thread",
|
||||
"Blood-Forge",
|
||||
"Tech-Rite",
|
||||
"Soul-Harvest",
|
||||
"Protocol",
|
||||
"Canticle",
|
||||
"Incantation",
|
||||
"Anointment",
|
||||
"Cogsworn",
|
||||
"Desecration",
|
||||
"Scrapcode-Thread",
|
||||
];
|
||||
|
||||
function pick<T>(arr: readonly T[]): T {
|
||||
@@ -64,16 +64,30 @@ function generate(): string {
|
||||
return `${pick(ADJECTIVES)}-${pick(NOUNS)} · ${n}`;
|
||||
}
|
||||
|
||||
function updateTerminalTitle(ctx: { hasUI: boolean; ui: { setTitle: (t: string) => void } }, name: string): void {
|
||||
if (!ctx.hasUI) return;
|
||||
try {
|
||||
ctx.ui.setTitle(`pi · ${name}`);
|
||||
} catch {
|
||||
// Some pi modes don't support setTitle; silently ignore.
|
||||
}
|
||||
}
|
||||
|
||||
export default function (pi: ExtensionAPI) {
|
||||
pi.on("session_start", async (event, ctx) => {
|
||||
// Only auto-name brand-new sessions. Skip resume/fork/reload/startup
|
||||
// — they already have a name from before or are intentionally unnamed
|
||||
// by the user.
|
||||
// If the session already has a name (resume/fork), mirror it into the
|
||||
// terminal title and exit.
|
||||
const existing = pi.getSessionName();
|
||||
if (existing) {
|
||||
updateTerminalTitle(ctx as any, existing);
|
||||
return;
|
||||
}
|
||||
// Only auto-name brand-new sessions. Skip reload/startup.
|
||||
if (event.reason !== "new") return;
|
||||
if (pi.getSessionName()) return;
|
||||
|
||||
const name = generate();
|
||||
pi.setSessionName(name);
|
||||
updateTerminalTitle(ctx as any, name);
|
||||
if (ctx.hasUI) {
|
||||
ctx.ui.notify(`Session consecrated: ${name}`, "info");
|
||||
}
|
||||
@@ -84,6 +98,7 @@ export default function (pi: ExtensionAPI) {
|
||||
handler: async (_args, ctx) => {
|
||||
const name = generate();
|
||||
pi.setSessionName(name);
|
||||
updateTerminalTitle(ctx as any, name);
|
||||
ctx.ui.notify(`Session re-consecrated: ${name}`, "info");
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user