xonecas.io
5875
Os

ollama-space-molt-player / commit c61eff3

fix: remove forum bias

xonecas2026-02-01 c61eff3e6ee7461957fc5a87f15deeabfa324ff0 parent 2c9f2c5

1 file changed

src/prompt.ts+2−41
@@ -203,7 +203,6 @@ export function buildActionPrompt(context: PromptContext): string {
203203 const stateText = formatState(context.state);
204204 const worldText = formatWorldSnapshot(context.state, context.worldSnapshot);
205205 const memoryText = formatGroupedMemory(context.recentHistory);
206- const forumFollowUpBlock = formatForumFollowUp(context);
207206 const forumContextBlock = formatForumContext(context.recentHistory);
208207 const helpBlock = `\nGAME INFORMATION:\n${HELP_TEXT}`;
209208 const goalText = context.currentGoal?.trim()
@@ -270,7 +269,6 @@ ${worldText}
270269 RECENT MEMORY:
271270 ${memoryText}
272271
273-${forumFollowUpBlock}
274272 ${forumContextBlock}
275273
276274 ACTION SCHEMA (JSON ONLY):
@@ -303,7 +301,7 @@ REQUIRED ARGS:
303301 FORMAT RULES:
304302 - Use only the listed actions.
305303 - Goal is required, max ${MAX_GOAL_LENGTH} characters, update every action.
306-- Only use info actions (status/system/poi/base/nearby/cargo) when state is missing.
304+- Only use info actions (status/system/poi/base/nearby/cargo) when information is missing.
307305 - IDs must come from current state or world snapshot.
308306 - Never omit required args or leave them blank.
309307
@@ -658,43 +656,6 @@ function formatGroupedMemory(history: HistoryEntry[]): string {
658656 return lines.join("\n");
659657 }
660658
661-function formatForumFollowUp(context: PromptContext): string {
662- const status = context.forumFollowUpStatus ?? null;
663- const threadId = context.lastForumThreadId?.trim() ?? "";
664- const title = context.lastForumPostTitle?.trim() ?? "";
665- const category = context.lastForumPostCategory?.trim() ?? "";
666-
667- if (!status && !threadId && !title && !category) return "";
668-
669- const lines: string[] = ["FORUM FOLLOW-UP:"];
670- if (status === "unread") {
671- lines.push(
672- `- You just created a forum thread. Read it now${threadId ? `: forum_thread ${threadId}` : "."}`,
673- );
674- if (!threadId) {
675- const catText = category ? ` in category "${category}"` : "";
676- const titleText = title ? ` titled "${title}"` : "";
677- lines.push(
678- `- If the thread id is unknown, list forums${catText} and open your thread${titleText}.`,
679- );
680- }
681- } else {
682- const idText = threadId ? ` (id=${threadId})` : "";
683- lines.push(
684- `- You have an active thread to monitor${idText}. Revisit it occasionally when idle, not every tick.`,
685- );
686- if (!threadId && (title || category)) {
687- const catText = category ? ` in category "${category}"` : "";
688- const titleText = title ? ` titled "${title}"` : "";
689- lines.push(
690- `- If the thread id is unknown, list forums${catText} and open your thread${titleText}.`,
691- );
692- }
693- }
694-
695- return `\n${lines.join("\n")}\n`;
696-}
697-
698659 function formatForumContext(history: HistoryEntry[]): string {
699660 if (history.length === 0) return "";
700661
@@ -702,7 +663,7 @@ function formatForumContext(history: HistoryEntry[]): string {
702663 const createdPosts = findRecentForumPosts(history, 3);
703664 const repliedThreads = findRecentRepliedThreads(history, 3);
704665
705- const lines: string[] = ["FORUM CONTEXT:"];
666+ const lines: string[] = ["FORUM INFORMATION:"];
706667 lines.push(`- Last forum check: ${formatForumCheckLine(lastForumCheck)}`);
707668 lines.push("- Created posts (last 3):");
708669 if (createdPosts.length === 0) {