Semver rename + single-call gateway
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
+18
-4
@@ -3687,11 +3687,25 @@ def _is_rcon_error(result: str) -> bool:
|
||||
|
||||
|
||||
_ERROR_CORRECTION_SYSTEM = (
|
||||
"A Minecraft command failed. Analyze the error and return a corrected command.\n"
|
||||
"A Minecraft 1.21 command failed with an RCON error. Your job: return a DIFFERENT, corrected command.\n"
|
||||
"Do NOT return the same command. Analyze the error and fix the syntax.\n\n"
|
||||
"Respond with JSON: {\"corrected\": \"the fixed command\"}\n"
|
||||
"The command must be a single complete string. Use minecraft: prefix for all items/effects.\n"
|
||||
"Use 1.21 syntax: enchantments use [enchantments={name:level}] NOT {Enchantments:[...]}.\n"
|
||||
"If you cannot fix it, return {\"corrected\": \"\"}."
|
||||
"If you cannot fix it, return {\"corrected\": \"\"}.\n\n"
|
||||
"Common fixes:\n"
|
||||
"- 'Incorrect argument for command' → wrong arg order or missing subcommand\n"
|
||||
" xp player 100 → xp add player 100 levels\n"
|
||||
" gamemode player survival → gamemode survival player\n"
|
||||
"- 'Unknown item' → missing minecraft: prefix or wrong item name\n"
|
||||
" give player diamond → give player minecraft:diamond 1\n"
|
||||
" bed → minecraft:white_bed, log → minecraft:oak_log\n"
|
||||
"- 'Expected whitespace' → count before enchantments or bad syntax\n"
|
||||
" give player sword 1[enchantments=...] → give player sword[enchantments=...] 1\n"
|
||||
"- 'Unknown enchantment/effect' → wrong name\n"
|
||||
" sharp → sharpness, prot → protection, speed_boost → speed\n"
|
||||
"- Old NBT format → use 1.21 component syntax\n"
|
||||
" {Enchantments:[...]} → [enchantments={name:level}]\n"
|
||||
"- Missing 'give' subcommand for effects\n"
|
||||
" effect player speed → effect give player minecraft:speed 30 1\n"
|
||||
)
|
||||
|
||||
def _attempt_error_correction(failed_cmd: str, error_msg: str, config: dict) -> str:
|
||||
|
||||
Reference in New Issue
Block a user