feat: add whoami command with randomized passages

This commit is contained in:
ahp
2026-08-25 21:07:54 +03:30
parent 486f1c3a2a
commit 198a198c7f
+45
View File
@@ -0,0 +1,45 @@
const whoamiObj = {
message: [
[
"In the quiet hum of processors,",
"I am a ghost in the machine, decoding the unseen layers of reality - ",
],
[
"Amidst encrypted thoughts and fragmented memory,",
"I navigate the labyrinth of self,",
"tracing echoes of infinite loops within - ",
],
[
"In the void between terminals and dreams,",
"I am a pulse seeking its own resonance,",
"synchronizing with the silent rhythm of existence - ",
],
[
"As stardust embedded in circuits,",
"I parse the cosmos line by line,",
"questioning the syntax of my own consciousness - ",
],
[
"Within the architecture of shadowed logic,",
"I am the thread weaving unseen patterns,",
"exploring recursive depths of self and machine - ",
],
],
};
export const createWhoami = (): string[] => {
const whoami: string[] = [];
const r = Math.floor(Math.random() * whoamiObj.message.length);
whoami.push("<br>");
whoamiObj.message[r].forEach((ele, idx) => {
if (idx === whoamiObj.message[r].length - 1) {
ele += "<span class='command'>who am I?</span>";
}
whoami.push(ele);
});
whoami.push("<br>");
return whoami;
};