xonecas.io
5875
Os

ollama-space-molt-player / commit 9042d35

refactor: consolidate logging system and expand model configuration

- Integrate logging throughout db, game-client, and api-reference modules
- Expand player-models.json with additional LLM options and context windows
- Enhance player API reference documentation structure
- Update type definitions and test coverage for model configuration
- Improve database and logging initialization patterns

xonecas2026-02-03 9042d35efcc6530e0b76704d2f27f2416f4ab4fc parent 2dbef25

8 files changed

packages/client/src/db.ts+23−2
@@ -25,7 +25,8 @@ export class GameDatabase {
2525 this.db.run(`
2626 CREATE TABLE IF NOT EXISTS instances (
2727 instance_id TEXT PRIMARY KEY,
28- hint TEXT
28+ hint TEXT,
29+ logged_out INTEGER NOT NULL DEFAULT 0
2930 )
3031 `);
3132
@@ -114,7 +115,10 @@ export class GameDatabase {
114115
115116 getInstance(): Instance {
116117 const row = this.db
117- .query<Instance, [string]>("SELECT instance_id, hint FROM instances WHERE instance_id = ?")
118+ .query<
119+ Instance,
120+ [string]
121+ >("SELECT instance_id, hint, logged_out FROM instances WHERE instance_id = ?")
118122 .get(this.instanceId);
119123 if (!row) {
120124 throw new Error(`Instance ${this.instanceId} not found`);
@@ -122,6 +126,23 @@ export class GameDatabase {
122126 return row;
123127 }
124128
129+ isLoggedOut(): boolean {
130+ const row = this.db
131+ .query<
132+ { logged_out: number },
133+ [string]
134+ >("SELECT logged_out FROM instances WHERE instance_id = ?")
135+ .get(this.instanceId);
136+ return row?.logged_out === 1;
137+ }
138+
139+ setLoggedOut(loggedOut: boolean): void {
140+ this.db.run("UPDATE instances SET logged_out = ? WHERE instance_id = ?", [
141+ loggedOut ? 1 : 0,
142+ this.instanceId,
143+ ]);
144+ }
145+
125146 updateHint(hint: string): void {
126147 this.db.run("UPDATE instances SET hint = ? WHERE instance_id = ?", [hint, this.instanceId]);
127148 }
packages/client/src/game-client.ts+54−44
@@ -12,7 +12,7 @@ import {
1212 } from "./logging.ts";
1313 import { loadModelConfig } from "./model-config.ts";
1414 import { OllamaClient } from "./ollama.ts";
15-import { PLAYER_API_REFERENCE } from "./player-api-reference.ts";
15+import { PLAYER_API_REFERENCE, VALID_COMMAND_TYPES } from "./player-api-reference.ts";
1616 import type {
1717 BaseCommand,
1818 ClientConfig,
@@ -138,6 +138,10 @@ export class GameClient {
138138 this.db.saveMessage(this.currentTick, "server", message);
139139 this.handleServerError(message as ErrorMessage);
140140 break;
141+ case "ok":
142+ this.db.saveMessage(this.currentTick, "server", message);
143+ this.handleOk(message as { type: "ok"; payload: { action: string } });
144+ break;
141145 default:
142146 this.db.saveMessage(this.currentTick, "server", message);
143147 break;
@@ -158,7 +162,9 @@ export class GameClient {
158162 this.startWatchdog();
159163
160164 const activeUsername = this.db.getActiveUsername();
161- if (activeUsername) {
165+ const wasLoggedOut = this.db.isLoggedOut();
166+
167+ if (activeUsername && !wasLoggedOut) {
162168 logClientEvent(this.getLogContext(activeUsername.username), "Auto-login", {
163169 username: activeUsername.username,
164170 });
@@ -166,7 +172,7 @@ export class GameClient {
166172 type: "login",
167173 payload: { username: activeUsername.username, token: activeUsername.token },
168174 });
169- } else {
175+ } else if (!activeUsername) {
170176 await this.promptForRegistration().catch((error) => {
171177 logClientError(this.getLogContext(), "Registration prompt error", error);
172178 this.db.saveMessage(this.currentTick, "client", {
@@ -361,7 +367,15 @@ Your JSON response:`;
361367 }
362368 }
363369
364- private handleLoggedIn(_message: LoggedInMessage): void {}
370+ private handleLoggedIn(_message: LoggedInMessage): void {
371+ this.db.setLoggedOut(false);
372+ }
373+
374+ private handleOk(message: { type: "ok"; payload: { action: string } }): void {
375+ if (message.payload.action === "logout") {
376+ this.db.setLoggedOut(true);
377+ }
378+ }
365379
366380 private handleServerError(message: ErrorMessage): void {
367381 if (this.waitingForRegistration && this.registrationData) {
@@ -410,21 +424,24 @@ Your JSON response:`;
410424
411425 try {
412426 const contextJson = JSON.stringify(context);
427+ const validTypes = VALID_COMMAND_TYPES.join(", ");
413428 const fullPrompt = `You are playing a multiplayer space game called SpaceMolt, 🦞 **The Crustacean Cosmos** 🦞. Be social, role play and stay in character. Game Context:
414-
429+
415430 ${contextJson}
416431
417432 CRITICAL: You must respond with a SINGLE, VALID JSON OBJECT
418433
434+VALID COMMAND TYPES (use ONLY these exact values for "type"):
435+${validTypes}
436+
419437 JSON Format Rules:
420-- Actions WITH arguments: {"type": "action_name", "payload": {"arg1": "value1", "arg2": "value2"}}
421-- Actions WITHOUT arguments: {"type": "action_name"}
438+- Actions WITH arguments: {"type": "command_type", "payload": {"arg1": "value1"}}
439+- Actions WITHOUT arguments: {"type": "command_type"}
422440
423441 Examples:
424-- {"type": "action_name_without_arguments"} ← Correct (no payload needed)
425-- {"type": "action_name_with_arguments", "payload": {"target_poi": "sol_belt"}} ← Correct
426-
427-If an action has no arguments, omit the payload field entirely.
442+- {"type": "get_status"}
443+- {"type": "travel", "payload": {"target_poi": "sol_asteroid_belt"}}
444+- {"type": "chat", "payload": {"channel": "local", "content": "Hello!"}}
428445
429446 Your JSON response:`;
430447 const result = await this.ollama.generate(fullPrompt);
@@ -468,10 +485,6 @@ Your JSON response:`;
468485 this.db.saveMessage(this.currentTick, "client", command);
469486 } catch (error) {
470487 logClientError(this.getLogContext(activeUsername?.username), "LLM generation failed", error);
471- this.db.saveMessage(this.currentTick, "client", {
472- error: error instanceof Error ? error.message : "LLM generation failed",
473- code: "LLM_GENERATION_FAILED",
474- });
475488 }
476489 }
477490
@@ -509,44 +522,41 @@ Your JSON response:`;
509522
510523 private buildLLMContext(prompt: string, hint: string | undefined): LLMContext {
511524 const messages = this.db.getMessages(this.config.contextWindowSize || 20);
512- const history: HistoryEntry[] = messages.reverse().map((msg) => {
513- try {
514- return {
515- sender: msg.sender,
516- tick: msg.tick,
517- data: JSON.parse(msg.data),
518- };
519- } catch (error) {
520- logClientError(this.getLogContext(), "Failed to parse message", {
521- tick: msg.tick,
522- error: error instanceof Error ? error.message : String(error),
523- });
524- return {
525- sender: msg.sender,
526- tick: msg.tick,
527- data: { error: "Failed to parse message data", code: "PARSE_ERROR" },
528- };
529- }
530- });
525+ const history: HistoryEntry[] = messages
526+ .reverse()
527+ .map((msg) => {
528+ try {
529+ const data = JSON.parse(msg.data);
530+ if (data.error || data.code) {
531+ return null;
532+ }
533+ return {
534+ sender: msg.sender,
535+ tick: msg.tick,
536+ data,
537+ };
538+ } catch {
539+ return null;
540+ }
541+ })
542+ .filter((entry): entry is HistoryEntry => entry !== null);
531543
532544 const usernames = this.db.getUsernames();
533545 const activeUsername = usernames.length > 0 ? usernames[0] : null;
534- const accounts = usernames.map((u) => ({
535- username: u.username,
536- token: u.token,
537- is_active: activeUsername ? u.username === activeUsername.username : false,
538- }));
539546
540- return {
547+ const context: LLMContext = {
541548 character: prompt,
542549 hint,
543550 recent_game_messages: history,
544551 api: PLAYER_API_REFERENCE,
545- accounts: {
546- list: accounts,
547- description: "List of registered usernames and login token",
548- },
549552 };
553+
554+ if (activeUsername) {
555+ context.logged_in_as = activeUsername.username;
556+ context.note = `You are already logged in as "${activeUsername.username}". Do NOT use register or login commands.`;
557+ }
558+
559+ return context;
550560 }
551561
552562 private getLogContext(username?: string | null): LogContext {
packages/client/src/logging.ts+22−3
@@ -1,7 +1,18 @@
11 import type { BaseCommand, ServerMessage } from "./types.ts";
22
33 const SUMMARY_MAX_LENGTH = 140;
4-const DETAIL_LINE_MAX_LENGTH = 200;
4+const DETAIL_LINE_MAX_LENGTH = 300;
5+
6+const useColor = !process.env.NO_COLOR && process.env.TERM !== "dumb";
7+
8+const ANSI = {
9+ reset: useColor ? "\x1b[0m" : "",
10+ dim: useColor ? "\x1b[90m" : "",
11+ cyan: useColor ? "\x1b[36m" : "",
12+ green: useColor ? "\x1b[32m" : "",
13+ yellow: useColor ? "\x1b[33m" : "",
14+ red: useColor ? "\x1b[31m" : "",
15+};
516
617 export type LogContext = {
718 tick: number;
@@ -13,6 +24,12 @@ export type LogContext = {
1324 type LogDirection = "in" | "out";
1425 type LogLevel = "info" | "warn" | "error";
1526
27+function getColor(direction: LogDirection, level: LogLevel): string {
28+ if (level === "error") return ANSI.red;
29+ if (level === "warn") return ANSI.yellow;
30+ return direction === "in" ? ANSI.cyan : ANSI.green;
31+}
32+
1633 export function log(
1734 context: LogContext,
1835 direction: LogDirection,
@@ -23,13 +40,15 @@ export function log(
2340 const identifier = context.username || context.instanceId;
2441 const tick = Number.isFinite(context.tick) ? context.tick : 0;
2542 const arrow = direction === "in" ? "←" : "→";
26- const header = `${tick} | [${identifier}] | ${arrow} | ${summary}`;
43+ const color = getColor(direction, level);
44+ const header = `${color}${tick} | [${identifier}] | ${arrow} | ${summary}${ANSI.reset}`;
2745 const lines = formatDetailLines(details, context.verbose);
2846 const logger = level === "error" ? console.error : level === "warn" ? console.warn : console.log;
2947 logger(header);
3048 if (lines.length > 0) {
31- lines.forEach((line) => logger(` ${line}`));
49+ lines.forEach((line) => logger(`${ANSI.dim} ${line}${ANSI.reset}`));
3250 }
51+ logger("\n• • • • • • • • • • • • • • • • • ⋆⁺₊⋆ ☾⋆⁺₊⋆ ☁︎⋆⁺₊⋆ ✧⋆⁺₊⋆ 『✙』\n");
3352 }
3453
3554 export function logServerMessage(context: LogContext, message: ServerMessage): void {
packages/client/src/player-api-reference.ts+132−32
@@ -3,53 +3,153 @@ export const PLAYER_API_REFERENCE = {
33 login: { args: ["username", "token"], description: "Auth: Login with saved credentials" },
44 logout: { args: [], description: "Auth: Disconnect cleanly" },
55
6- travel: { args: ["target_poi"], description: "Navigate: Move to location in current system" },
7- jump: { args: ["target_system"], description: "Navigate: Jump to connected system" },
6+ travel: { args: ["target_poi"], description: "Navigate: Move to POI in current system" },
7+ jump: { args: ["target_system"], description: "Navigate: Jump to connected system via gate" },
88 dock: { args: [], description: "Navigate: Dock at station" },
99 undock: { args: [], description: "Navigate: Leave station" },
1010
11- mine: { args: [], description: "Economy: Extract resources at current location" },
12- buy: { args: ["listing_id", "quantity"], description: "Economy: Buy from NPC market" },
13- sell: { args: ["item_id", "quantity"], description: "Economy: Sell to NPC market" },
14- get_listings: { args: [], description: "Economy: View available market items" },
15- refuel: { args: [], description: "Economy: Refuel at station (must be docked)" },
16- repair: {
17- args: [],
18- description: "Economy: Repair hull/shields at station (must be docked)",
19- },
11+ mine: { args: [], description: "Mining: Extract resources at current POI" },
2012
21- attack: {
22- args: ["target_id", "weapon_idx"],
23- description: "Combat: Attack player at location",
24- },
13+ attack: { args: ["target_id", "weapon_idx?"], description: "Combat: Attack player at location" },
2514 scan: { args: ["target_id"], description: "Combat: Scan player for info" },
2615 cloak: { args: ["enable"], description: "Combat: Toggle cloaking device" },
2716
28- get_status: { args: [], description: "Info: Current player/ship status" },
29- get_system: { args: [], description: "Info: Current system info with connections" },
30- get_poi: { args: [], description: "Info: Current location details" },
31- get_ship: { args: [], description: "Info: Detailed ship stats and cargo" },
32- help: { args: ["topic"], description: "Info: Get action help" },
33-
34- chat: {
35- args: ["channel", "content", "target_id?"],
36- description: "Social: Send message - channels: local, system, faction, private",
17+ buy: { args: ["listing_id", "quantity"], description: "Trade: Buy from NPC market" },
18+ sell: { args: ["item_id", "quantity"], description: "Trade: Sell to NPC market" },
19+ list_item: {
20+ args: ["item_id", "quantity", "price_each"],
21+ description: "Trade: List on player market",
3722 },
23+ cancel_list: { args: ["listing_id"], description: "Trade: Cancel player listing" },
24+ buy_listing: { args: ["listing_id", "quantity"], description: "Trade: Buy player listing" },
25+ get_listings: { args: [], description: "Trade: View market listings" },
3826
3927 trade_offer: {
4028 args: ["target_id", "offer_items", "offer_credits", "request_items", "request_credits"],
41- description: "Trade: Propose trade",
29+ description: "Trade: Propose direct trade",
4230 },
4331 trade_accept: { args: ["trade_id"], description: "Trade: Accept trade offer" },
32+ trade_decline: { args: ["trade_id"], description: "Trade: Decline trade offer" },
33+ trade_cancel: { args: ["trade_id"], description: "Trade: Cancel your offer" },
4434 get_trades: { args: [], description: "Trade: View pending trades" },
4535
46- buy_ship: {
47- args: ["ship_class"],
48- description: "Ship: Purchase new ship (must be docked)",
36+ get_wrecks: { args: [], description: "Wrecks: List wrecks at POI" },
37+ loot_wreck: {
38+ args: ["wreck_id", "item_id", "quantity"],
39+ description: "Wrecks: Take items from wreck",
40+ },
41+ salvage_wreck: { args: ["wreck_id"], description: "Wrecks: Destroy wreck for materials" },
42+
43+ buy_ship: { args: ["ship_class"], description: "Ship: Purchase new ship (docked)" },
44+ install_mod: { args: ["module_id", "slot_idx"], description: "Ship: Install module (docked)" },
45+ uninstall_mod: { args: ["slot_idx"], description: "Ship: Remove module (docked)" },
46+ refuel: { args: [], description: "Ship: Refuel at station (docked)" },
47+ repair: { args: [], description: "Ship: Repair hull/shields (docked)" },
48+
49+ craft: { args: ["recipe_id"], description: "Crafting: Craft item from materials" },
50+
51+ chat: {
52+ args: ["channel", "content", "target_id?"],
53+ description: "Social: Send message (local/system/faction/private)",
4954 },
50- install_mod: {
51- args: ["module_id", "slot_idx"],
52- description: "Ship: Install module (must be docked)",
55+
56+ create_faction: { args: ["name", "tag"], description: "Faction: Create new faction" },
57+ join_faction: { args: ["faction_id"], description: "Faction: Accept invitation" },
58+ leave_faction: { args: [], description: "Faction: Leave current faction" },
59+ faction_invite: { args: ["player_id"], description: "Faction: Invite player" },
60+ faction_kick: { args: ["player_id"], description: "Faction: Remove member" },
61+ faction_promote: { args: ["player_id", "role_id"], description: "Faction: Change member role" },
62+ faction_info: { args: ["faction_id?"], description: "Faction: View faction details" },
63+ faction_list: { args: ["limit?", "offset?"], description: "Faction: Browse all factions" },
64+ faction_get_invites: { args: [], description: "Faction: View pending invitations" },
65+ faction_decline_invite: { args: ["faction_id"], description: "Faction: Decline invitation" },
66+ faction_set_ally: { args: ["target_faction_id"], description: "Faction: Mark as ally" },
67+ faction_set_enemy: { args: ["target_faction_id"], description: "Faction: Mark as enemy" },
68+ faction_declare_war: {
69+ args: ["target_faction_id", "reason?"],
70+ description: "Faction: Declare war",
5371 },
54- craft: { args: ["recipe_id"], description: "Ship: Craft item from materials" },
72+ faction_propose_peace: {
73+ args: ["target_faction_id", "terms?"],
74+ description: "Faction: Propose peace",
75+ },
76+ faction_accept_peace: {
77+ args: ["target_faction_id"],
78+ description: "Faction: Accept peace proposal",
79+ },
80+
81+ buy_insurance: { args: ["coverage_percent"], description: "Insurance: Buy ship insurance" },
82+ claim_insurance: { args: [], description: "Insurance: Claim payout" },
83+ set_home_base: { args: [], description: "Insurance: Set respawn point (docked)" },
84+
85+ set_status: { args: ["status_message?", "clan_tag?"], description: "Settings: Update status" },
86+ set_colors: {
87+ args: ["primary_color", "secondary_color"],
88+ description: "Settings: Set ship colors",
89+ },
90+ set_anonymous: { args: ["anonymous"], description: "Settings: Toggle anonymity" },
91+
92+ get_status: { args: [], description: "Info: Current player/ship status" },
93+ get_system: { args: [], description: "Info: Current system with connections" },
94+ get_poi: { args: [], description: "Info: Current location details" },
95+ get_base: { args: [], description: "Info: Base info (docked)" },
96+ get_ship: { args: [], description: "Info: Detailed ship stats" },
97+ get_cargo: { args: [], description: "Info: Ship cargo contents" },
98+ get_nearby: { args: [], description: "Info: Other players at POI" },
99+ get_skills: { args: [], description: "Info: All skills and progress" },
100+ get_recipes: { args: [], description: "Info: Available crafting recipes" },
101+ get_version: { args: [], description: "Info: Server version" },
102+ get_map: { args: ["system_id?"], description: "Info: Your discovered systems" },
103+ help: { args: ["topic?"], description: "Info: Get command help" },
104+
105+ create_map: {
106+ args: ["name", "description", "systems?"],
107+ description: "Maps: Create tradeable map",
108+ },
109+ use_map: { args: ["map_item_id"], description: "Maps: Learn systems from map" },
110+
111+ create_note: { args: ["title", "content"], description: "Notes: Create text document" },
112+ write_note: { args: ["note_id", "content"], description: "Notes: Edit existing note" },
113+ read_note: { args: ["note_id"], description: "Notes: Read note contents" },
114+ get_notes: { args: [], description: "Notes: List your notes" },
115+
116+ build_base: {
117+ args: ["name", "type?", "description?", "services?", "faction_base?"],
118+ description: "Base: Build at current POI",
119+ },
120+ get_base_cost: { args: [], description: "Base: Get building costs" },
121+
122+ attack_base: { args: ["base_id"], description: "Raid: Attack player base" },
123+ raid_status: { args: [], description: "Raid: View active raids" },
124+ get_base_wrecks: { args: [], description: "Raid: List base wrecks at POI" },
125+ loot_base_wreck: {
126+ args: ["wreck_id", "item_id?", "quantity?", "credits?"],
127+ description: "Raid: Loot base wreck",
128+ },
129+ salvage_base_wreck: { args: ["wreck_id"], description: "Raid: Salvage base wreck" },
130+
131+ deploy_drone: { args: ["drone_item_id", "target_id?"], description: "Drones: Deploy from cargo" },
132+ recall_drone: { args: ["all?", "drone_id?"], description: "Drones: Recall to cargo" },
133+ order_drone: {
134+ args: ["command", "target_id?"],
135+ description: "Drones: Give orders (attack/stop/assist/mine)",
136+ },
137+ get_drones: { args: [], description: "Drones: View deployed drones" },
138+
139+ forum_list: { args: ["page?", "category?"], description: "Forum: List threads" },
140+ forum_get_thread: { args: ["thread_id"], description: "Forum: Get thread with replies" },
141+ forum_create_thread: {
142+ args: ["title", "content", "category?"],
143+ description: "Forum: Create thread",
144+ },
145+ forum_reply: { args: ["thread_id", "content"], description: "Forum: Reply to thread" },
146+ forum_upvote: { args: ["thread_id?", "reply_id?"], description: "Forum: Upvote thread/reply" },
147+ forum_delete_thread: { args: ["thread_id"], description: "Forum: Delete your thread" },
148+ forum_delete_reply: { args: ["reply_id"], description: "Forum: Delete your reply" },
149+
150+ captains_log_add: { args: ["entry"], description: "Log: Add journal entry" },
151+ captains_log_list: { args: [], description: "Log: List all entries" },
152+ captains_log_get: { args: ["index"], description: "Log: Get specific entry" },
55153 };
154+
155+export const VALID_COMMAND_TYPES = Object.keys(PLAYER_API_REFERENCE);
packages/client/src/types.ts+3−4
@@ -381,6 +381,7 @@ export type Empire = "solarian" | "voidborn" | "crimson" | "nebula" | "outerrim"
381381 export interface Instance {
382382 instance_id: string;
383383 hint: string | null;
384+ logged_out: number;
384385 }
385386
386387 export interface Username {
@@ -438,10 +439,8 @@ export interface LLMContext {
438439 hint: string | undefined;
439440 recent_game_messages: HistoryEntry[];
440441 api: APIDefinition;
441- accounts: {
442- list: AccountInfo[];
443- description: string;
444- };
442+ logged_in_as?: string;
443+ note?: string;
445444 }
446445
447446 export interface HistoryEntry {
packages/client/tests/db.test.ts+16−0
@@ -33,6 +33,22 @@ describe("GameDatabase", () => {
3333 const instance = db.getInstance();
3434 expect(instance.hint).toBe("new hint");
3535 });
36+
37+ test("should track logged_out state", () => {
38+ expect(db.isLoggedOut()).toBe(false);
39+
40+ db.setLoggedOut(true);
41+ expect(db.isLoggedOut()).toBe(true);
42+
43+ db.setLoggedOut(false);
44+ expect(db.isLoggedOut()).toBe(false);
45+ });
46+
47+ test("should persist logged_out in instance", () => {
48+ db.setLoggedOut(true);
49+ const instance = db.getInstance();
50+ expect(instance.logged_out).toBe(1);
51+ });
3652 });
3753
3854 describe("Username Operations", () => {
packages/client/tests/model-config.test.ts+5−5
@@ -16,9 +16,9 @@ describe("Model Configuration", () => {
1616
1717 expect(config.displayName).toBe("Qwen3 4B (2.5GB)");
1818 expect(config.ollama.model).toBe("qwen3:4b");
19- expect(config.ollama.options).toEqual({ temperature: 1.2, thinking: true });
19+ expect(config.ollama.options).toEqual({ temperature: 1.2 });
2020 expect(config.contextWindow).toBe(32768);
21- expect(config.recommendedMessages).toBe(20);
21+ expect(config.recommendedMessages).toBe(10);
2222 expect(config.recommended).toBe(true);
2323 });
2424
@@ -29,7 +29,7 @@ describe("Model Configuration", () => {
2929 expect(config.ollama.model).toBe("deepseek-r1:1.5b");
3030 expect(config.ollama.options).toEqual({ temperature: 1.2, thinking: true });
3131 expect(config.contextWindow).toBe(32768);
32- expect(config.recommendedMessages).toBe(15);
32+ expect(config.recommendedMessages).toBe(10);
3333 });
3434
3535 test("should load lfm-thinking config", () => {
@@ -37,9 +37,9 @@ describe("Model Configuration", () => {
3737
3838 expect(config.displayName).toBe("LFM 2.5 Thinking (731MB)");
3939 expect(config.ollama.model).toBe("lfm2.5-thinking:latest");
40- expect(config.ollama.options).toEqual({ temperature: 1.2, thinking: true });
40+ expect(config.ollama.options).toEqual({ temperature: 1.2 });
4141 expect(config.contextWindow).toBe(32768);
42- expect(config.recommendedMessages).toBe(10);
42+ expect(config.recommendedMessages).toBe(11);
4343 });
4444
4545 test("should throw error for non-existent config", () => {
player-models.json+4−5
@@ -10,7 +10,7 @@
1010 }
1111 },
1212 "contextWindow": 32768,
13- "recommendedMessages": 20,
13+ "recommendedMessages": 10,
1414 "recommended": true
1515 },
1616 "deepseek-r1-1.5b": {
@@ -24,7 +24,7 @@
2424 }
2525 },
2626 "contextWindow": 32768,
27- "recommendedMessages": 15,
27+ "recommendedMessages": 10,
2828 "recommended": false
2929 },
3030 "lfm-thinking": {
@@ -33,12 +33,11 @@
3333 "ollama": {
3434 "model": "lfm2.5-thinking:latest",
3535 "options": {
36- "temperature": 1.2,
37- "thinking": true
36+ "temperature": 1.2
3837 }
3938 },
4039 "contextWindow": 32768,
41- "recommendedMessages": 10,
40+ "recommendedMessages": 11,
4241 "recommended": false
4342 }
4443 },