LordXido commited on
Commit
e2e8242
·
verified ·
1 Parent(s): f672c5a

Update llm.js

Browse files
Files changed (1) hide show
  1. llm.js +18 -14
llm.js CHANGED
@@ -1,21 +1,25 @@
1
- const lanes = {
2
- control: [],
3
- world: [],
4
- agent: [],
5
- system: []
6
- };
7
-
8
  export function parseCommand(text) {
9
  const t = text.toLowerCase();
10
 
11
- if (t.includes("spawn")) return route("agent", { action: "spawn" });
12
- if (t.includes("faster")) return route("world", { speed: 2.0 });
13
- if (t.includes("reset")) return route("system", { reset: true });
 
 
 
 
 
 
 
 
14
 
15
- return route("control", { raw: text });
16
  }
17
 
18
- function route(lane, payload) {
19
- lanes[lane].push(payload);
20
- return { lane, payload };
 
 
 
21
  }
 
 
 
 
 
 
 
 
1
  export function parseCommand(text) {
2
  const t = text.toLowerCase();
3
 
4
+ if (t.includes("fractal")) {
5
+ return packet("world", { power: 8.0 });
6
+ }
7
+
8
+ if (t.includes("stronger")) {
9
+ return packet("world", { power: 12.0 });
10
+ }
11
+
12
+ if (t.includes("reset")) {
13
+ return packet("system", { reset: true });
14
+ }
15
 
16
+ return packet("control", { raw: text });
17
  }
18
 
19
+ function packet(lane, payload) {
20
+ return {
21
+ lane,
22
+ payload,
23
+ timestamp: performance.now()
24
+ };
25
  }